diff --git a/generation_config.yaml b/generation_config.yaml index 10ab615e932c..e5add8939823 100644 --- a/generation_config.yaml +++ b/generation_config.yaml @@ -1,4 +1,4 @@ -googleapis_commitish: f7b17174725f43b5cb11b0b8c6bbad20a3dc5bd1 +googleapis_commitish: 7af3f2c7b8927cffb548fd2cf09b04c6371437ee libraries_bom_version: 26.83.0 is_monorepo: true libraries: diff --git a/java-aiplatform/google-cloud-aiplatform/src/main/resources/META-INF/native-image/com.google.cloud.aiplatform.v1beta1/reflect-config.json b/java-aiplatform/google-cloud-aiplatform/src/main/resources/META-INF/native-image/com.google.cloud.aiplatform.v1beta1/reflect-config.json index 12b95a657341..fc7ab666763f 100644 --- a/java-aiplatform/google-cloud-aiplatform/src/main/resources/META-INF/native-image/com.google.cloud.aiplatform.v1beta1/reflect-config.json +++ b/java-aiplatform/google-cloud-aiplatform/src/main/resources/META-INF/native-image/com.google.cloud.aiplatform.v1beta1/reflect-config.json @@ -20789,6 +20789,15 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.aiplatform.v1beta1.PublisherModelConfig$ModelProvider", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.aiplatform.v1beta1.PublisherModelEulaAcceptance", "queryAllDeclaredConstructors": true, diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/EndpointProto.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/EndpointProto.java index 992375bffeef..cf58a4cf796b 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/EndpointProto.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/EndpointProto.java @@ -224,10 +224,15 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\024bigquery_destination\030\003 \001(\01324.googl" + "e.cloud.aiplatform.v1beta1.BigQueryDestination\0224\n" + "\'request_response_logging_schema_version\030\004 \001(\tB\003\340A\003\022\033\n" - + "\023enable_otel_logging\030\006 \001(\010\"t\n" + + "\023enable_otel_logging\030\006 \001(\010\"\245\002\n" + "\024PublisherModelConfig\022\\\n" - + "\016logging_config\030\003 \001(\0132D.google.cloud.aiplatf" - + "orm.v1beta1.PredictRequestResponseLoggingConfig\"N\n" + + "\016logging_config\030\003 \001(\0132D.google.cloud.aiplat" + + "form.v1beta1.PredictRequestResponseLoggingConfig\022o\n" + + "\035data_sharing_enabled_provider\030\004 \001(\0162C.google.cloud.aiplatform.v1beta" + + "1.PublisherModelConfig.ModelProviderB\003\340A\001\">\n\r" + + "ModelProvider\022\036\n" + + "\032MODEL_PROVIDER_UNSPECIFIED\020\000\022\r\n" + + "\tANTHROPIC\020\001\"N\n" + "\026ClientConnectionConfig\0224\n" + "\021inference_timeout\030\001 \001(\0132\031.google.protobuf.Duration\"5\n" + "\026FasterDeploymentConfig\022\033\n" @@ -242,15 +247,15 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\017max_unavailableB\013\n" + "\tmax_surge\"\232\001\n" + "\033GenAiAdvancedFeaturesConfig\022Z\n\n" - + "rag_config\030\001" - + " \001(\0132F.google.cloud.aiplatform.v1beta1.GenAiAdvancedFeaturesConfig.RagConfig\032\037\n" + + "rag_config\030\001 \001(\0132F.google.cloud.ai" + + "platform.v1beta1.GenAiAdvancedFeaturesConfig.RagConfig\032\037\n" + "\tRagConfig\022\022\n\n" + "enable_rag\030\001 \001(\010\"\243\003\n" + "\027SpeculativeDecodingSpec\022q\n" - + "\027draft_model_speculation\030\002 \001(\0132N.google.cloud.aiplatform.v1b" - + "eta1.SpeculativeDecodingSpec.DraftModelSpeculationH\000\022f\n" - + "\021ngram_speculation\030\003 \001(\0132" - + "I.google.cloud.aiplatform.v1beta1.SpeculativeDecodingSpec.NgramSpeculationH\000\022\037\n" + + "\027draft_model_speculation\030\002 \001(\0132N.google.cl" + + "oud.aiplatform.v1beta1.SpeculativeDecodingSpec.DraftModelSpeculationH\000\022f\n" + + "\021ngram_speculation\030\003 \001(\0132I.google.cloud.aiplatf" + + "orm.v1beta1.SpeculativeDecodingSpec.NgramSpeculationH\000\022\037\n" + "\027speculative_token_count\030\001 \001(\005\032U\n" + "\025DraftModelSpeculation\022<\n" + "\013draft_model\030\001 \001(\tB\'\340A\002\372A!\n" @@ -259,10 +264,10 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "ngram_size\030\001 \001(\005B\r\n" + "\013speculationB\344\001\n" + "#com.google.cloud.aiplatform.v1beta1B\r" - + "EndpointProtoP\001ZCcloud.google.com/go/aiplatform/apiv1beta1/aiplatfo" - + "rmpb;aiplatformpb\252\002\037Google.Cloud.AIPlatf" - + "orm.V1Beta1\312\002\037Google\\Cloud\\AIPlatform\\V1" - + "beta1\352\002\"Google::Cloud::AIPlatform::V1beta1b\006proto3" + + "EndpointProtoP\001ZCcloud.google.com/go/aiplatform/a" + + "piv1beta1/aiplatformpb;aiplatformpb\252\002\037Go" + + "ogle.Cloud.AIPlatform.V1Beta1\312\002\037Google\\C" + + "loud\\AIPlatform\\V1beta1\352\002\"Google::Cloud::AIPlatform::V1beta1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -395,7 +400,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1beta1_PublisherModelConfig_descriptor, new java.lang.String[] { - "LoggingConfig", + "LoggingConfig", "DataSharingEnabledProvider", }); internal_static_google_cloud_aiplatform_v1beta1_ClientConnectionConfig_descriptor = getDescriptor().getMessageType(5); diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/PublisherModelConfig.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/PublisherModelConfig.java index a0edf1428ea6..8080af78367e 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/PublisherModelConfig.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/PublisherModelConfig.java @@ -51,7 +51,9 @@ private PublisherModelConfig(com.google.protobuf.GeneratedMessage.Builder bui super(builder); } - private PublisherModelConfig() {} + private PublisherModelConfig() { + dataSharingEnabledProvider_ = 0; + } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.aiplatform.v1beta1.EndpointProto @@ -68,6 +70,154 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { com.google.cloud.aiplatform.v1beta1.PublisherModelConfig.Builder.class); } + /** + * + * + *
+   * A model provider (publisher) that prediction data may be shared with.
+   * 
+ * + * Protobuf enum {@code google.cloud.aiplatform.v1beta1.PublisherModelConfig.ModelProvider} + */ + public enum ModelProvider implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Unspecified model provider.
+     * 
+ * + * MODEL_PROVIDER_UNSPECIFIED = 0; + */ + MODEL_PROVIDER_UNSPECIFIED(0), + /** + * + * + *
+     * Anthropic.
+     * 
+ * + * ANTHROPIC = 1; + */ + ANTHROPIC(1), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ModelProvider"); + } + + /** + * + * + *
+     * Unspecified model provider.
+     * 
+ * + * MODEL_PROVIDER_UNSPECIFIED = 0; + */ + public static final int MODEL_PROVIDER_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+     * Anthropic.
+     * 
+ * + * ANTHROPIC = 1; + */ + public static final int ANTHROPIC_VALUE = 1; + + 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 ModelProvider 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 ModelProvider forNumber(int value) { + switch (value) { + case 0: + return MODEL_PROVIDER_UNSPECIFIED; + case 1: + return ANTHROPIC; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public ModelProvider findValueByNumber(int number) { + return ModelProvider.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.PublisherModelConfig.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final ModelProvider[] VALUES = values(); + + public static ModelProvider valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private ModelProvider(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.aiplatform.v1beta1.PublisherModelConfig.ModelProvider) + } + private int bitField0_; public static final int LOGGING_CONFIG_FIELD_NUMBER = 3; private com.google.cloud.aiplatform.v1beta1.PredictRequestResponseLoggingConfig loggingConfig_; @@ -129,6 +279,57 @@ public boolean hasLoggingConfig() { : loggingConfig_; } + public static final int DATA_SHARING_ENABLED_PROVIDER_FIELD_NUMBER = 4; + private int dataSharingEnabledProvider_ = 0; + + /** + * + * + *
+   * Optional. The model provider (publisher) for which the customer has enabled
+   * data sharing. For publisher models that are configured to require data
+   * sharing, a prediction request is only allowed when the model's publisher
+   * matches this provider. Otherwise, the request is rejected.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.PublisherModelConfig.ModelProvider data_sharing_enabled_provider = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for dataSharingEnabledProvider. + */ + @java.lang.Override + public int getDataSharingEnabledProviderValue() { + return dataSharingEnabledProvider_; + } + + /** + * + * + *
+   * Optional. The model provider (publisher) for which the customer has enabled
+   * data sharing. For publisher models that are configured to require data
+   * sharing, a prediction request is only allowed when the model's publisher
+   * matches this provider. Otherwise, the request is rejected.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.PublisherModelConfig.ModelProvider data_sharing_enabled_provider = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The dataSharingEnabledProvider. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.PublisherModelConfig.ModelProvider + getDataSharingEnabledProvider() { + com.google.cloud.aiplatform.v1beta1.PublisherModelConfig.ModelProvider result = + com.google.cloud.aiplatform.v1beta1.PublisherModelConfig.ModelProvider.forNumber( + dataSharingEnabledProvider_); + return result == null + ? com.google.cloud.aiplatform.v1beta1.PublisherModelConfig.ModelProvider.UNRECOGNIZED + : result; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -146,6 +347,12 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(3, getLoggingConfig()); } + if (dataSharingEnabledProvider_ + != com.google.cloud.aiplatform.v1beta1.PublisherModelConfig.ModelProvider + .MODEL_PROVIDER_UNSPECIFIED + .getNumber()) { + output.writeEnum(4, dataSharingEnabledProvider_); + } getUnknownFields().writeTo(output); } @@ -158,6 +365,12 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getLoggingConfig()); } + if (dataSharingEnabledProvider_ + != com.google.cloud.aiplatform.v1beta1.PublisherModelConfig.ModelProvider + .MODEL_PROVIDER_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(4, dataSharingEnabledProvider_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -178,6 +391,7 @@ public boolean equals(final java.lang.Object obj) { if (hasLoggingConfig()) { if (!getLoggingConfig().equals(other.getLoggingConfig())) return false; } + if (dataSharingEnabledProvider_ != other.dataSharingEnabledProvider_) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -193,6 +407,8 @@ public int hashCode() { hash = (37 * hash) + LOGGING_CONFIG_FIELD_NUMBER; hash = (53 * hash) + getLoggingConfig().hashCode(); } + hash = (37 * hash) + DATA_SHARING_ENABLED_PROVIDER_FIELD_NUMBER; + hash = (53 * hash) + dataSharingEnabledProvider_; hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -348,6 +564,7 @@ public Builder clear() { loggingConfigBuilder_.dispose(); loggingConfigBuilder_ = null; } + dataSharingEnabledProvider_ = 0; return this; } @@ -390,6 +607,9 @@ private void buildPartial0(com.google.cloud.aiplatform.v1beta1.PublisherModelCon loggingConfigBuilder_ == null ? loggingConfig_ : loggingConfigBuilder_.build(); to_bitField0_ |= 0x00000001; } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.dataSharingEnabledProvider_ = dataSharingEnabledProvider_; + } result.bitField0_ |= to_bitField0_; } @@ -409,6 +629,9 @@ public Builder mergeFrom(com.google.cloud.aiplatform.v1beta1.PublisherModelConfi if (other.hasLoggingConfig()) { mergeLoggingConfig(other.getLoggingConfig()); } + if (other.dataSharingEnabledProvider_ != 0) { + setDataSharingEnabledProviderValue(other.getDataSharingEnabledProviderValue()); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -442,6 +665,12 @@ public Builder mergeFrom( bitField0_ |= 0x00000001; break; } // case 26 + case 32: + { + dataSharingEnabledProvider_ = input.readEnum(); + bitField0_ |= 0x00000002; + break; + } // case 32 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -684,6 +913,131 @@ public Builder clearLoggingConfig() { return loggingConfigBuilder_; } + private int dataSharingEnabledProvider_ = 0; + + /** + * + * + *
+     * Optional. The model provider (publisher) for which the customer has enabled
+     * data sharing. For publisher models that are configured to require data
+     * sharing, a prediction request is only allowed when the model's publisher
+     * matches this provider. Otherwise, the request is rejected.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.PublisherModelConfig.ModelProvider data_sharing_enabled_provider = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for dataSharingEnabledProvider. + */ + @java.lang.Override + public int getDataSharingEnabledProviderValue() { + return dataSharingEnabledProvider_; + } + + /** + * + * + *
+     * Optional. The model provider (publisher) for which the customer has enabled
+     * data sharing. For publisher models that are configured to require data
+     * sharing, a prediction request is only allowed when the model's publisher
+     * matches this provider. Otherwise, the request is rejected.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.PublisherModelConfig.ModelProvider data_sharing_enabled_provider = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The enum numeric value on the wire for dataSharingEnabledProvider to set. + * @return This builder for chaining. + */ + public Builder setDataSharingEnabledProviderValue(int value) { + dataSharingEnabledProvider_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The model provider (publisher) for which the customer has enabled
+     * data sharing. For publisher models that are configured to require data
+     * sharing, a prediction request is only allowed when the model's publisher
+     * matches this provider. Otherwise, the request is rejected.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.PublisherModelConfig.ModelProvider data_sharing_enabled_provider = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The dataSharingEnabledProvider. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.PublisherModelConfig.ModelProvider + getDataSharingEnabledProvider() { + com.google.cloud.aiplatform.v1beta1.PublisherModelConfig.ModelProvider result = + com.google.cloud.aiplatform.v1beta1.PublisherModelConfig.ModelProvider.forNumber( + dataSharingEnabledProvider_); + return result == null + ? com.google.cloud.aiplatform.v1beta1.PublisherModelConfig.ModelProvider.UNRECOGNIZED + : result; + } + + /** + * + * + *
+     * Optional. The model provider (publisher) for which the customer has enabled
+     * data sharing. For publisher models that are configured to require data
+     * sharing, a prediction request is only allowed when the model's publisher
+     * matches this provider. Otherwise, the request is rejected.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.PublisherModelConfig.ModelProvider data_sharing_enabled_provider = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The dataSharingEnabledProvider to set. + * @return This builder for chaining. + */ + public Builder setDataSharingEnabledProvider( + com.google.cloud.aiplatform.v1beta1.PublisherModelConfig.ModelProvider value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + dataSharingEnabledProvider_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The model provider (publisher) for which the customer has enabled
+     * data sharing. For publisher models that are configured to require data
+     * sharing, a prediction request is only allowed when the model's publisher
+     * matches this provider. Otherwise, the request is rejected.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.PublisherModelConfig.ModelProvider data_sharing_enabled_provider = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearDataSharingEnabledProvider() { + bitField0_ = (bitField0_ & ~0x00000002); + dataSharingEnabledProvider_ = 0; + onChanged(); + return this; + } + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1beta1.PublisherModelConfig) } diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/PublisherModelConfigOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/PublisherModelConfigOrBuilder.java index 7c9f94eea746..57eefa6cb536 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/PublisherModelConfigOrBuilder.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/PublisherModelConfigOrBuilder.java @@ -66,4 +66,41 @@ public interface PublisherModelConfigOrBuilder */ com.google.cloud.aiplatform.v1beta1.PredictRequestResponseLoggingConfigOrBuilder getLoggingConfigOrBuilder(); + + /** + * + * + *
+   * Optional. The model provider (publisher) for which the customer has enabled
+   * data sharing. For publisher models that are configured to require data
+   * sharing, a prediction request is only allowed when the model's publisher
+   * matches this provider. Otherwise, the request is rejected.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.PublisherModelConfig.ModelProvider data_sharing_enabled_provider = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for dataSharingEnabledProvider. + */ + int getDataSharingEnabledProviderValue(); + + /** + * + * + *
+   * Optional. The model provider (publisher) for which the customer has enabled
+   * data sharing. For publisher models that are configured to require data
+   * sharing, a prediction request is only allowed when the model's publisher
+   * matches this provider. Otherwise, the request is rejected.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.PublisherModelConfig.ModelProvider data_sharing_enabled_provider = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The dataSharingEnabledProvider. + */ + com.google.cloud.aiplatform.v1beta1.PublisherModelConfig.ModelProvider + getDataSharingEnabledProvider(); } diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/endpoint.proto b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/endpoint.proto index 42fbeae165ea..a484031985e5 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/endpoint.proto +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/endpoint.proto @@ -400,8 +400,24 @@ message PredictRequestResponseLoggingConfig { // This message contains configs of a publisher model. message PublisherModelConfig { + // A model provider (publisher) that prediction data may be shared with. + enum ModelProvider { + // Unspecified model provider. + MODEL_PROVIDER_UNSPECIFIED = 0; + + // Anthropic. + ANTHROPIC = 1; + } + // The prediction request/response logging config. PredictRequestResponseLoggingConfig logging_config = 3; + + // Optional. The model provider (publisher) for which the customer has enabled + // data sharing. For publisher models that are configured to require data + // sharing, a prediction request is only allowed when the model's publisher + // matches this provider. Otherwise, the request is rejected. + ModelProvider data_sharing_enabled_provider = 4 + [(google.api.field_behavior) = OPTIONAL]; } // Configurations (e.g. inference timeout) that are applied on your endpoints. diff --git a/java-datamanager/data-manager/src/main/java/com/google/ads/datamanager/v1/IngestionServiceClient.java b/java-datamanager/data-manager/src/main/java/com/google/ads/datamanager/v1/IngestionServiceClient.java index e6665dc956bc..88b5c6c5999b 100644 --- a/java-datamanager/data-manager/src/main/java/com/google/ads/datamanager/v1/IngestionServiceClient.java +++ b/java-datamanager/data-manager/src/main/java/com/google/ads/datamanager/v1/IngestionServiceClient.java @@ -107,6 +107,21 @@ * * * + *

IngestAdEvents + *

Uploads a list of [AdEvent][google.ads.datamanager.v1.AdEvent] resources to Google Analytics. + *

This feature is only available to accounts on an allowlist. + * + *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • ingestAdEvents(IngestAdEventsRequest request) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • ingestAdEventsCallable() + *

+ * + * + * *

RetrieveRequestStatus *

Gets the status of a request given request id. * @@ -438,6 +453,71 @@ public final UnaryCallable ingestEven return stub.ingestEventsCallable(); } + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Uploads a list of [AdEvent][google.ads.datamanager.v1.AdEvent] resources to Google Analytics. + * + *

This feature is only available to accounts on an allowlist. + * + *

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 (IngestionServiceClient ingestionServiceClient = IngestionServiceClient.create()) {
+   *   IngestAdEventsRequest request =
+   *       IngestAdEventsRequest.newBuilder()
+   *           .addAllAdEvents(new ArrayList())
+   *           .setEncryptionInfo(EncryptionInfo.newBuilder().build())
+   *           .setValidateOnly(true)
+   *           .build();
+   *   IngestAdEventsResponse response = ingestionServiceClient.ingestAdEvents(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 IngestAdEventsResponse ingestAdEvents(IngestAdEventsRequest request) { + return ingestAdEventsCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Uploads a list of [AdEvent][google.ads.datamanager.v1.AdEvent] resources to Google Analytics. + * + *

This feature is only available to accounts on an allowlist. + * + *

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 (IngestionServiceClient ingestionServiceClient = IngestionServiceClient.create()) {
+   *   IngestAdEventsRequest request =
+   *       IngestAdEventsRequest.newBuilder()
+   *           .addAllAdEvents(new ArrayList())
+   *           .setEncryptionInfo(EncryptionInfo.newBuilder().build())
+   *           .setValidateOnly(true)
+   *           .build();
+   *   ApiFuture future =
+   *       ingestionServiceClient.ingestAdEventsCallable().futureCall(request);
+   *   // Do something.
+   *   IngestAdEventsResponse response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + ingestAdEventsCallable() { + return stub.ingestAdEventsCallable(); + } + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Gets the status of a request given request id. diff --git a/java-datamanager/data-manager/src/main/java/com/google/ads/datamanager/v1/IngestionServiceSettings.java b/java-datamanager/data-manager/src/main/java/com/google/ads/datamanager/v1/IngestionServiceSettings.java index 1e72290fc33f..0ff50e96d9cc 100644 --- a/java-datamanager/data-manager/src/main/java/com/google/ads/datamanager/v1/IngestionServiceSettings.java +++ b/java-datamanager/data-manager/src/main/java/com/google/ads/datamanager/v1/IngestionServiceSettings.java @@ -102,6 +102,11 @@ public UnaryCallSettings ingestEvents return ((IngestionServiceStubSettings) getStubSettings()).ingestEventsSettings(); } + /** Returns the object with the settings used for calls to ingestAdEvents. */ + public UnaryCallSettings ingestAdEventsSettings() { + return ((IngestionServiceStubSettings) getStubSettings()).ingestAdEventsSettings(); + } + /** Returns the object with the settings used for calls to retrieveRequestStatus. */ public UnaryCallSettings retrieveRequestStatusSettings() { @@ -238,6 +243,12 @@ public Builder applyToAllUnaryMethods( return getStubSettingsBuilder().ingestEventsSettings(); } + /** Returns the builder for the settings used for calls to ingestAdEvents. */ + public UnaryCallSettings.Builder + ingestAdEventsSettings() { + return getStubSettingsBuilder().ingestAdEventsSettings(); + } + /** Returns the builder for the settings used for calls to retrieveRequestStatus. */ public UnaryCallSettings.Builder retrieveRequestStatusSettings() { diff --git a/java-datamanager/data-manager/src/main/java/com/google/ads/datamanager/v1/gapic_metadata.json b/java-datamanager/data-manager/src/main/java/com/google/ads/datamanager/v1/gapic_metadata.json index 48e4057a76c6..64ef439f1111 100644 --- a/java-datamanager/data-manager/src/main/java/com/google/ads/datamanager/v1/gapic_metadata.json +++ b/java-datamanager/data-manager/src/main/java/com/google/ads/datamanager/v1/gapic_metadata.json @@ -10,6 +10,9 @@ "grpc": { "libraryClient": "IngestionServiceClient", "rpcs": { + "IngestAdEvents": { + "methods": ["ingestAdEvents", "ingestAdEventsCallable"] + }, "IngestAudienceMembers": { "methods": ["ingestAudienceMembers", "ingestAudienceMembersCallable"] }, diff --git a/java-datamanager/data-manager/src/main/java/com/google/ads/datamanager/v1/stub/GrpcIngestionServiceStub.java b/java-datamanager/data-manager/src/main/java/com/google/ads/datamanager/v1/stub/GrpcIngestionServiceStub.java index d1bfc365a912..1b9c8f169200 100644 --- a/java-datamanager/data-manager/src/main/java/com/google/ads/datamanager/v1/stub/GrpcIngestionServiceStub.java +++ b/java-datamanager/data-manager/src/main/java/com/google/ads/datamanager/v1/stub/GrpcIngestionServiceStub.java @@ -16,6 +16,8 @@ package com.google.ads.datamanager.v1.stub; +import com.google.ads.datamanager.v1.IngestAdEventsRequest; +import com.google.ads.datamanager.v1.IngestAdEventsResponse; import com.google.ads.datamanager.v1.IngestAudienceMembersRequest; import com.google.ads.datamanager.v1.IngestAudienceMembersResponse; import com.google.ads.datamanager.v1.IngestEventsRequest; @@ -80,6 +82,18 @@ public class GrpcIngestionServiceStub extends IngestionServiceStub { .setSampledToLocalTracing(true) .build(); + private static final MethodDescriptor + ingestAdEventsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.ads.datamanager.v1.IngestionService/IngestAdEvents") + .setRequestMarshaller( + ProtoUtils.marshaller(IngestAdEventsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(IngestAdEventsResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + private static final MethodDescriptor retrieveRequestStatusMethodDescriptor = MethodDescriptor.newBuilder() @@ -97,6 +111,7 @@ public class GrpcIngestionServiceStub extends IngestionServiceStub { private final UnaryCallable removeAudienceMembersCallable; private final UnaryCallable ingestEventsCallable; + private final UnaryCallable ingestAdEventsCallable; private final UnaryCallable retrieveRequestStatusCallable; @@ -160,6 +175,11 @@ protected GrpcIngestionServiceStub( GrpcCallSettings.newBuilder() .setMethodDescriptor(ingestEventsMethodDescriptor) .build(); + GrpcCallSettings + ingestAdEventsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(ingestAdEventsMethodDescriptor) + .build(); GrpcCallSettings retrieveRequestStatusTransportSettings = GrpcCallSettings @@ -180,6 +200,9 @@ protected GrpcIngestionServiceStub( this.ingestEventsCallable = callableFactory.createUnaryCallable( ingestEventsTransportSettings, settings.ingestEventsSettings(), clientContext); + this.ingestAdEventsCallable = + callableFactory.createUnaryCallable( + ingestAdEventsTransportSettings, settings.ingestAdEventsSettings(), clientContext); this.retrieveRequestStatusCallable = callableFactory.createUnaryCallable( retrieveRequestStatusTransportSettings, @@ -211,6 +234,11 @@ public UnaryCallable ingestEventsCall return ingestEventsCallable; } + @Override + public UnaryCallable ingestAdEventsCallable() { + return ingestAdEventsCallable; + } + @Override public UnaryCallable retrieveRequestStatusCallable() { diff --git a/java-datamanager/data-manager/src/main/java/com/google/ads/datamanager/v1/stub/HttpJsonIngestionServiceStub.java b/java-datamanager/data-manager/src/main/java/com/google/ads/datamanager/v1/stub/HttpJsonIngestionServiceStub.java index 79b3e3b58d72..0f41fc286d40 100644 --- a/java-datamanager/data-manager/src/main/java/com/google/ads/datamanager/v1/stub/HttpJsonIngestionServiceStub.java +++ b/java-datamanager/data-manager/src/main/java/com/google/ads/datamanager/v1/stub/HttpJsonIngestionServiceStub.java @@ -16,6 +16,8 @@ package com.google.ads.datamanager.v1.stub; +import com.google.ads.datamanager.v1.IngestAdEventsRequest; +import com.google.ads.datamanager.v1.IngestAdEventsResponse; import com.google.ads.datamanager.v1.IngestAudienceMembersRequest; import com.google.ads.datamanager.v1.IngestAudienceMembersResponse; import com.google.ads.datamanager.v1.IngestEventsRequest; @@ -166,6 +168,42 @@ public class HttpJsonIngestionServiceStub extends IngestionServiceStub { .build()) .build(); + private static final ApiMethodDescriptor + ingestAdEventsMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.ads.datamanager.v1.IngestionService/IngestAdEvents") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/adEvents:ingest", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().build(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(IngestAdEventsResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + private static final ApiMethodDescriptor< RetrieveRequestStatusRequest, RetrieveRequestStatusResponse> retrieveRequestStatusMethodDescriptor = @@ -207,6 +245,7 @@ public class HttpJsonIngestionServiceStub extends IngestionServiceStub { private final UnaryCallable removeAudienceMembersCallable; private final UnaryCallable ingestEventsCallable; + private final UnaryCallable ingestAdEventsCallable; private final UnaryCallable retrieveRequestStatusCallable; @@ -271,6 +310,12 @@ protected HttpJsonIngestionServiceStub( .setMethodDescriptor(ingestEventsMethodDescriptor) .setTypeRegistry(typeRegistry) .build(); + HttpJsonCallSettings + ingestAdEventsTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(ingestAdEventsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); HttpJsonCallSettings retrieveRequestStatusTransportSettings = HttpJsonCallSettings @@ -292,6 +337,9 @@ protected HttpJsonIngestionServiceStub( this.ingestEventsCallable = callableFactory.createUnaryCallable( ingestEventsTransportSettings, settings.ingestEventsSettings(), clientContext); + this.ingestAdEventsCallable = + callableFactory.createUnaryCallable( + ingestAdEventsTransportSettings, settings.ingestAdEventsSettings(), clientContext); this.retrieveRequestStatusCallable = callableFactory.createUnaryCallable( retrieveRequestStatusTransportSettings, @@ -308,6 +356,7 @@ public static List getMethodDescriptors() { methodDescriptors.add(ingestAudienceMembersMethodDescriptor); methodDescriptors.add(removeAudienceMembersMethodDescriptor); methodDescriptors.add(ingestEventsMethodDescriptor); + methodDescriptors.add(ingestAdEventsMethodDescriptor); methodDescriptors.add(retrieveRequestStatusMethodDescriptor); return methodDescriptors; } @@ -329,6 +378,11 @@ public UnaryCallable ingestEventsCall return ingestEventsCallable; } + @Override + public UnaryCallable ingestAdEventsCallable() { + return ingestAdEventsCallable; + } + @Override public UnaryCallable retrieveRequestStatusCallable() { diff --git a/java-datamanager/data-manager/src/main/java/com/google/ads/datamanager/v1/stub/IngestionServiceStub.java b/java-datamanager/data-manager/src/main/java/com/google/ads/datamanager/v1/stub/IngestionServiceStub.java index f88edd3f131a..ddea8d1bc7c9 100644 --- a/java-datamanager/data-manager/src/main/java/com/google/ads/datamanager/v1/stub/IngestionServiceStub.java +++ b/java-datamanager/data-manager/src/main/java/com/google/ads/datamanager/v1/stub/IngestionServiceStub.java @@ -16,6 +16,8 @@ package com.google.ads.datamanager.v1.stub; +import com.google.ads.datamanager.v1.IngestAdEventsRequest; +import com.google.ads.datamanager.v1.IngestAdEventsResponse; import com.google.ads.datamanager.v1.IngestAudienceMembersRequest; import com.google.ads.datamanager.v1.IngestAudienceMembersResponse; import com.google.ads.datamanager.v1.IngestEventsRequest; @@ -51,6 +53,10 @@ public UnaryCallable ingestEventsCall throw new UnsupportedOperationException("Not implemented: ingestEventsCallable()"); } + public UnaryCallable ingestAdEventsCallable() { + throw new UnsupportedOperationException("Not implemented: ingestAdEventsCallable()"); + } + public UnaryCallable retrieveRequestStatusCallable() { throw new UnsupportedOperationException("Not implemented: retrieveRequestStatusCallable()"); diff --git a/java-datamanager/data-manager/src/main/java/com/google/ads/datamanager/v1/stub/IngestionServiceStubSettings.java b/java-datamanager/data-manager/src/main/java/com/google/ads/datamanager/v1/stub/IngestionServiceStubSettings.java index 8c13f0f4c3ed..6edfe164836f 100644 --- a/java-datamanager/data-manager/src/main/java/com/google/ads/datamanager/v1/stub/IngestionServiceStubSettings.java +++ b/java-datamanager/data-manager/src/main/java/com/google/ads/datamanager/v1/stub/IngestionServiceStubSettings.java @@ -16,6 +16,8 @@ package com.google.ads.datamanager.v1.stub; +import com.google.ads.datamanager.v1.IngestAdEventsRequest; +import com.google.ads.datamanager.v1.IngestAdEventsResponse; import com.google.ads.datamanager.v1.IngestAudienceMembersRequest; import com.google.ads.datamanager.v1.IngestAudienceMembersResponse; import com.google.ads.datamanager.v1.IngestEventsRequest; @@ -114,6 +116,8 @@ public class IngestionServiceStubSettings extends StubSettings removeAudienceMembersSettings; private final UnaryCallSettings ingestEventsSettings; + private final UnaryCallSettings + ingestAdEventsSettings; private final UnaryCallSettings retrieveRequestStatusSettings; @@ -134,6 +138,11 @@ public UnaryCallSettings ingestEvents return ingestEventsSettings; } + /** Returns the object with the settings used for calls to ingestAdEvents. */ + public UnaryCallSettings ingestAdEventsSettings() { + return ingestAdEventsSettings; + } + /** Returns the object with the settings used for calls to retrieveRequestStatus. */ public UnaryCallSettings retrieveRequestStatusSettings() { @@ -254,6 +263,7 @@ protected IngestionServiceStubSettings(Builder settingsBuilder) throws IOExcepti ingestAudienceMembersSettings = settingsBuilder.ingestAudienceMembersSettings().build(); removeAudienceMembersSettings = settingsBuilder.removeAudienceMembersSettings().build(); ingestEventsSettings = settingsBuilder.ingestEventsSettings().build(); + ingestAdEventsSettings = settingsBuilder.ingestAdEventsSettings().build(); retrieveRequestStatusSettings = settingsBuilder.retrieveRequestStatusSettings().build(); } @@ -277,6 +287,8 @@ public static class Builder extends StubSettings.Builder ingestEventsSettings; + private final UnaryCallSettings.Builder + ingestAdEventsSettings; private final UnaryCallSettings.Builder< RetrieveRequestStatusRequest, RetrieveRequestStatusResponse> retrieveRequestStatusSettings; @@ -310,6 +322,7 @@ protected Builder(ClientContext clientContext) { ingestAudienceMembersSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); removeAudienceMembersSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); ingestEventsSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + ingestAdEventsSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); retrieveRequestStatusSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); unaryMethodSettingsBuilders = @@ -317,6 +330,7 @@ protected Builder(ClientContext clientContext) { ingestAudienceMembersSettings, removeAudienceMembersSettings, ingestEventsSettings, + ingestAdEventsSettings, retrieveRequestStatusSettings); initDefaults(this); } @@ -327,6 +341,7 @@ protected Builder(IngestionServiceStubSettings settings) { ingestAudienceMembersSettings = settings.ingestAudienceMembersSettings.toBuilder(); removeAudienceMembersSettings = settings.removeAudienceMembersSettings.toBuilder(); ingestEventsSettings = settings.ingestEventsSettings.toBuilder(); + ingestAdEventsSettings = settings.ingestAdEventsSettings.toBuilder(); retrieveRequestStatusSettings = settings.retrieveRequestStatusSettings.toBuilder(); unaryMethodSettingsBuilders = @@ -334,6 +349,7 @@ protected Builder(IngestionServiceStubSettings settings) { ingestAudienceMembersSettings, removeAudienceMembersSettings, ingestEventsSettings, + ingestAdEventsSettings, retrieveRequestStatusSettings); } @@ -377,6 +393,11 @@ private static Builder initDefaults(Builder builder) { .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + builder + .ingestAdEventsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + builder .retrieveRequestStatusSettings() .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) @@ -418,6 +439,12 @@ public Builder applyToAllUnaryMethods( return ingestEventsSettings; } + /** Returns the builder for the settings used for calls to ingestAdEvents. */ + public UnaryCallSettings.Builder + ingestAdEventsSettings() { + return ingestAdEventsSettings; + } + /** Returns the builder for the settings used for calls to retrieveRequestStatus. */ public UnaryCallSettings.Builder retrieveRequestStatusSettings() { diff --git a/java-datamanager/data-manager/src/main/resources/META-INF/native-image/com.google.ads.datamanager.v1/reflect-config.json b/java-datamanager/data-manager/src/main/resources/META-INF/native-image/com.google.ads.datamanager.v1/reflect-config.json index 8f70505a68c2..15bfcf0c244d 100644 --- a/java-datamanager/data-manager/src/main/resources/META-INF/native-image/com.google.ads.datamanager.v1/reflect-config.json +++ b/java-datamanager/data-manager/src/main/resources/META-INF/native-image/com.google.ads.datamanager.v1/reflect-config.json @@ -1,4 +1,49 @@ [ + { + "name": "com.google.ads.datamanager.v1.AdEvent", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.ads.datamanager.v1.AdEvent$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.ads.datamanager.v1.AdEvent$EventSubtype", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.ads.datamanager.v1.AdEvent$EventType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.ads.datamanager.v1.AdFormat", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.ads.datamanager.v1.AdIdentifiers", "queryAllDeclaredConstructors": true, @@ -17,6 +62,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.ads.datamanager.v1.AdPlacement", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.ads.datamanager.v1.AdType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.ads.datamanager.v1.AddressInfo", "queryAllDeclaredConstructors": true, @@ -44,6 +107,15 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.ads.datamanager.v1.AttributionHint", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.ads.datamanager.v1.AudienceMember", "queryAllDeclaredConstructors": true, @@ -206,6 +278,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.ads.datamanager.v1.CoordinatorKeyInfo", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.ads.datamanager.v1.CoordinatorKeyInfo$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.ads.datamanager.v1.CreatePartnerLinkRequest", "queryAllDeclaredConstructors": true, @@ -584,6 +674,15 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.ads.datamanager.v1.FeatureSet", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.ads.datamanager.v1.GcpWrappedKeyInfo", "queryAllDeclaredConstructors": true, @@ -674,6 +773,42 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.ads.datamanager.v1.IngestAdEventsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.ads.datamanager.v1.IngestAdEventsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.ads.datamanager.v1.IngestAdEventsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.ads.datamanager.v1.IngestAdEventsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.ads.datamanager.v1.IngestAudienceMembersRequest", "queryAllDeclaredConstructors": true, @@ -998,6 +1133,15 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.ads.datamanager.v1.MediaQuartile", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.ads.datamanager.v1.MobileData", "queryAllDeclaredConstructors": true, @@ -1106,6 +1250,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.ads.datamanager.v1.PartnerCustomerAccount", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.ads.datamanager.v1.PartnerCustomerAccount$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.ads.datamanager.v1.PartnerLink", "queryAllDeclaredConstructors": true, @@ -1124,6 +1286,42 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.ads.datamanager.v1.PartnerLinkMetadata", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.ads.datamanager.v1.PartnerLinkMetadata$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.ads.datamanager.v1.Platform", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.ads.datamanager.v1.PlatformType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.ads.datamanager.v1.PpidData", "queryAllDeclaredConstructors": true, @@ -1772,6 +1970,15 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.ads.datamanager.v1.TargetingType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.ads.datamanager.v1.TermsOfService", "queryAllDeclaredConstructors": true, @@ -2150,6 +2357,33 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.ads.datamanager.v1.ViewType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.ads.datamanager.v1.ViewabilityInfo", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.ads.datamanager.v1.ViewabilityInfo$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.ads.datamanager.v1.WarningCount", "queryAllDeclaredConstructors": true, diff --git a/java-datamanager/data-manager/src/test/java/com/google/ads/datamanager/v1/IngestionServiceClientHttpJsonTest.java b/java-datamanager/data-manager/src/test/java/com/google/ads/datamanager/v1/IngestionServiceClientHttpJsonTest.java index 4f0e450708af..5c4affa6f640 100644 --- a/java-datamanager/data-manager/src/test/java/com/google/ads/datamanager/v1/IngestionServiceClientHttpJsonTest.java +++ b/java-datamanager/data-manager/src/test/java/com/google/ads/datamanager/v1/IngestionServiceClientHttpJsonTest.java @@ -246,6 +246,57 @@ public void ingestEventsExceptionTest() throws Exception { } } + @Test + public void ingestAdEventsTest() throws Exception { + IngestAdEventsResponse expectedResponse = IngestAdEventsResponse.newBuilder().build(); + mockService.addResponse(expectedResponse); + + IngestAdEventsRequest request = + IngestAdEventsRequest.newBuilder() + .addAllAdEvents(new ArrayList()) + .setEncryptionInfo(EncryptionInfo.newBuilder().build()) + .setValidateOnly(true) + .build(); + + IngestAdEventsResponse actualResponse = client.ingestAdEvents(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void ingestAdEventsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + IngestAdEventsRequest request = + IngestAdEventsRequest.newBuilder() + .addAllAdEvents(new ArrayList()) + .setEncryptionInfo(EncryptionInfo.newBuilder().build()) + .setValidateOnly(true) + .build(); + client.ingestAdEvents(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + @Test public void retrieveRequestStatusTest() throws Exception { RetrieveRequestStatusResponse expectedResponse = diff --git a/java-datamanager/data-manager/src/test/java/com/google/ads/datamanager/v1/IngestionServiceClientTest.java b/java-datamanager/data-manager/src/test/java/com/google/ads/datamanager/v1/IngestionServiceClientTest.java index 602f913a473a..ab60a33290c5 100644 --- a/java-datamanager/data-manager/src/test/java/com/google/ads/datamanager/v1/IngestionServiceClientTest.java +++ b/java-datamanager/data-manager/src/test/java/com/google/ads/datamanager/v1/IngestionServiceClientTest.java @@ -249,6 +249,53 @@ public void ingestEventsExceptionTest() throws Exception { } } + @Test + public void ingestAdEventsTest() throws Exception { + IngestAdEventsResponse expectedResponse = IngestAdEventsResponse.newBuilder().build(); + mockIngestionService.addResponse(expectedResponse); + + IngestAdEventsRequest request = + IngestAdEventsRequest.newBuilder() + .addAllAdEvents(new ArrayList()) + .setEncryptionInfo(EncryptionInfo.newBuilder().build()) + .setValidateOnly(true) + .build(); + + IngestAdEventsResponse actualResponse = client.ingestAdEvents(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockIngestionService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + IngestAdEventsRequest actualRequest = ((IngestAdEventsRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getAdEventsList(), actualRequest.getAdEventsList()); + Assert.assertEquals(request.getEncryptionInfo(), actualRequest.getEncryptionInfo()); + Assert.assertEquals(request.getValidateOnly(), actualRequest.getValidateOnly()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void ingestAdEventsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockIngestionService.addException(exception); + + try { + IngestAdEventsRequest request = + IngestAdEventsRequest.newBuilder() + .addAllAdEvents(new ArrayList()) + .setEncryptionInfo(EncryptionInfo.newBuilder().build()) + .setValidateOnly(true) + .build(); + client.ingestAdEvents(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + @Test public void retrieveRequestStatusTest() throws Exception { RetrieveRequestStatusResponse expectedResponse = diff --git a/java-datamanager/data-manager/src/test/java/com/google/ads/datamanager/v1/MockIngestionServiceImpl.java b/java-datamanager/data-manager/src/test/java/com/google/ads/datamanager/v1/MockIngestionServiceImpl.java index 9276a124352a..d2fbaddd10e6 100644 --- a/java-datamanager/data-manager/src/test/java/com/google/ads/datamanager/v1/MockIngestionServiceImpl.java +++ b/java-datamanager/data-manager/src/test/java/com/google/ads/datamanager/v1/MockIngestionServiceImpl.java @@ -125,6 +125,27 @@ public void ingestEvents( } } + @Override + public void ingestAdEvents( + IngestAdEventsRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof IngestAdEventsResponse) { + requests.add(request); + responseObserver.onNext(((IngestAdEventsResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method IngestAdEvents, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + IngestAdEventsResponse.class.getName(), + Exception.class.getName()))); + } + } + @Override public void retrieveRequestStatus( RetrieveRequestStatusRequest request, diff --git a/java-datamanager/data-manager/src/test/java/com/google/ads/datamanager/v1/PartnerLinkServiceClientHttpJsonTest.java b/java-datamanager/data-manager/src/test/java/com/google/ads/datamanager/v1/PartnerLinkServiceClientHttpJsonTest.java index 2eb55a6c5386..498278a9b0ef 100644 --- a/java-datamanager/data-manager/src/test/java/com/google/ads/datamanager/v1/PartnerLinkServiceClientHttpJsonTest.java +++ b/java-datamanager/data-manager/src/test/java/com/google/ads/datamanager/v1/PartnerLinkServiceClientHttpJsonTest.java @@ -84,6 +84,9 @@ public void createPartnerLinkTest() throws Exception { .setPartnerLinkId("partnerLinkId171029917") .setOwningAccount(ProductAccount.newBuilder().build()) .setPartnerAccount(ProductAccount.newBuilder().build()) + .setFeatureSet(FeatureSet.forNumber(0)) + .setPartnerCustomerAccount(PartnerCustomerAccount.newBuilder().build()) + .setPartnerLinkMetadata(PartnerLinkMetadata.newBuilder().build()) .build(); mockService.addResponse(expectedResponse); @@ -133,6 +136,9 @@ public void createPartnerLinkTest2() throws Exception { .setPartnerLinkId("partnerLinkId171029917") .setOwningAccount(ProductAccount.newBuilder().build()) .setPartnerAccount(ProductAccount.newBuilder().build()) + .setFeatureSet(FeatureSet.forNumber(0)) + .setPartnerCustomerAccount(PartnerCustomerAccount.newBuilder().build()) + .setPartnerLinkMetadata(PartnerLinkMetadata.newBuilder().build()) .build(); mockService.addResponse(expectedResponse); diff --git a/java-datamanager/data-manager/src/test/java/com/google/ads/datamanager/v1/PartnerLinkServiceClientTest.java b/java-datamanager/data-manager/src/test/java/com/google/ads/datamanager/v1/PartnerLinkServiceClientTest.java index bf162e007659..a37a442e73a6 100644 --- a/java-datamanager/data-manager/src/test/java/com/google/ads/datamanager/v1/PartnerLinkServiceClientTest.java +++ b/java-datamanager/data-manager/src/test/java/com/google/ads/datamanager/v1/PartnerLinkServiceClientTest.java @@ -87,6 +87,9 @@ public void createPartnerLinkTest() throws Exception { .setPartnerLinkId("partnerLinkId171029917") .setOwningAccount(ProductAccount.newBuilder().build()) .setPartnerAccount(ProductAccount.newBuilder().build()) + .setFeatureSet(FeatureSet.forNumber(0)) + .setPartnerCustomerAccount(PartnerCustomerAccount.newBuilder().build()) + .setPartnerLinkMetadata(PartnerLinkMetadata.newBuilder().build()) .build(); mockPartnerLinkService.addResponse(expectedResponse); @@ -131,6 +134,9 @@ public void createPartnerLinkTest2() throws Exception { .setPartnerLinkId("partnerLinkId171029917") .setOwningAccount(ProductAccount.newBuilder().build()) .setPartnerAccount(ProductAccount.newBuilder().build()) + .setFeatureSet(FeatureSet.forNumber(0)) + .setPartnerCustomerAccount(PartnerCustomerAccount.newBuilder().build()) + .setPartnerLinkMetadata(PartnerLinkMetadata.newBuilder().build()) .build(); mockPartnerLinkService.addResponse(expectedResponse); diff --git a/java-datamanager/grpc-data-manager-v1/src/main/java/com/google/ads/datamanager/v1/IngestionServiceGrpc.java b/java-datamanager/grpc-data-manager-v1/src/main/java/com/google/ads/datamanager/v1/IngestionServiceGrpc.java index 73780e756689..5762aa5fedf9 100644 --- a/java-datamanager/grpc-data-manager-v1/src/main/java/com/google/ads/datamanager/v1/IngestionServiceGrpc.java +++ b/java-datamanager/grpc-data-manager-v1/src/main/java/com/google/ads/datamanager/v1/IngestionServiceGrpc.java @@ -179,6 +179,53 @@ private IngestionServiceGrpc() {} return getIngestEventsMethod; } + private static volatile io.grpc.MethodDescriptor< + com.google.ads.datamanager.v1.IngestAdEventsRequest, + com.google.ads.datamanager.v1.IngestAdEventsResponse> + getIngestAdEventsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "IngestAdEvents", + requestType = com.google.ads.datamanager.v1.IngestAdEventsRequest.class, + responseType = com.google.ads.datamanager.v1.IngestAdEventsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.ads.datamanager.v1.IngestAdEventsRequest, + com.google.ads.datamanager.v1.IngestAdEventsResponse> + getIngestAdEventsMethod() { + io.grpc.MethodDescriptor< + com.google.ads.datamanager.v1.IngestAdEventsRequest, + com.google.ads.datamanager.v1.IngestAdEventsResponse> + getIngestAdEventsMethod; + if ((getIngestAdEventsMethod = IngestionServiceGrpc.getIngestAdEventsMethod) == null) { + synchronized (IngestionServiceGrpc.class) { + if ((getIngestAdEventsMethod = IngestionServiceGrpc.getIngestAdEventsMethod) == null) { + IngestionServiceGrpc.getIngestAdEventsMethod = + getIngestAdEventsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "IngestAdEvents")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.ads.datamanager.v1.IngestAdEventsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.ads.datamanager.v1.IngestAdEventsResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new IngestionServiceMethodDescriptorSupplier("IngestAdEvents")) + .build(); + } + } + } + return getIngestAdEventsMethod; + } + private static volatile io.grpc.MethodDescriptor< com.google.ads.datamanager.v1.RetrieveRequestStatusRequest, com.google.ads.datamanager.v1.RetrieveRequestStatusResponse> @@ -343,6 +390,24 @@ default void ingestEvents( getIngestEventsMethod(), responseObserver); } + /** + * + * + *
+     * Uploads a list of
+     * [AdEvent][google.ads.datamanager.v1.AdEvent] resources to Google
+     * Analytics.
+     * This feature is only available to accounts on an allowlist.
+     * 
+ */ + default void ingestAdEvents( + com.google.ads.datamanager.v1.IngestAdEventsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getIngestAdEventsMethod(), responseObserver); + } + /** * * @@ -450,6 +515,26 @@ public void ingestEvents( responseObserver); } + /** + * + * + *
+     * Uploads a list of
+     * [AdEvent][google.ads.datamanager.v1.AdEvent] resources to Google
+     * Analytics.
+     * This feature is only available to accounts on an allowlist.
+     * 
+ */ + public void ingestAdEvents( + com.google.ads.datamanager.v1.IngestAdEventsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getIngestAdEventsMethod(), getCallOptions()), + request, + responseObserver); + } + /** * * @@ -535,6 +620,23 @@ public com.google.ads.datamanager.v1.IngestEventsResponse ingestEvents( getChannel(), getIngestEventsMethod(), getCallOptions(), request); } + /** + * + * + *
+     * Uploads a list of
+     * [AdEvent][google.ads.datamanager.v1.AdEvent] resources to Google
+     * Analytics.
+     * This feature is only available to accounts on an allowlist.
+     * 
+ */ + public com.google.ads.datamanager.v1.IngestAdEventsResponse ingestAdEvents( + com.google.ads.datamanager.v1.IngestAdEventsRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getIngestAdEventsMethod(), getCallOptions(), request); + } + /** * * @@ -614,6 +716,22 @@ public com.google.ads.datamanager.v1.IngestEventsResponse ingestEvents( getChannel(), getIngestEventsMethod(), getCallOptions(), request); } + /** + * + * + *
+     * Uploads a list of
+     * [AdEvent][google.ads.datamanager.v1.AdEvent] resources to Google
+     * Analytics.
+     * This feature is only available to accounts on an allowlist.
+     * 
+ */ + public com.google.ads.datamanager.v1.IngestAdEventsResponse ingestAdEvents( + com.google.ads.datamanager.v1.IngestAdEventsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getIngestAdEventsMethod(), getCallOptions(), request); + } + /** * * @@ -695,6 +813,23 @@ protected IngestionServiceFutureStub build( getChannel().newCall(getIngestEventsMethod(), getCallOptions()), request); } + /** + * + * + *
+     * Uploads a list of
+     * [AdEvent][google.ads.datamanager.v1.AdEvent] resources to Google
+     * Analytics.
+     * This feature is only available to accounts on an allowlist.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.ads.datamanager.v1.IngestAdEventsResponse> + ingestAdEvents(com.google.ads.datamanager.v1.IngestAdEventsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getIngestAdEventsMethod(), getCallOptions()), request); + } + /** * * @@ -713,7 +848,8 @@ protected IngestionServiceFutureStub build( private static final int METHODID_INGEST_AUDIENCE_MEMBERS = 0; private static final int METHODID_REMOVE_AUDIENCE_MEMBERS = 1; private static final int METHODID_INGEST_EVENTS = 2; - private static final int METHODID_RETRIEVE_REQUEST_STATUS = 3; + private static final int METHODID_INGEST_AD_EVENTS = 3; + private static final int METHODID_RETRIEVE_REQUEST_STATUS = 4; private static final class MethodHandlers implements io.grpc.stub.ServerCalls.UnaryMethod, @@ -752,6 +888,12 @@ public void invoke(Req request, io.grpc.stub.StreamObserver responseObserv (io.grpc.stub.StreamObserver) responseObserver); break; + case METHODID_INGEST_AD_EVENTS: + serviceImpl.ingestAdEvents( + (com.google.ads.datamanager.v1.IngestAdEventsRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; case METHODID_RETRIEVE_REQUEST_STATUS: serviceImpl.retrieveRequestStatus( (com.google.ads.datamanager.v1.RetrieveRequestStatusRequest) request, @@ -798,6 +940,13 @@ public static final io.grpc.ServerServiceDefinition bindService(AsyncService ser com.google.ads.datamanager.v1.IngestEventsRequest, com.google.ads.datamanager.v1.IngestEventsResponse>( service, METHODID_INGEST_EVENTS))) + .addMethod( + getIngestAdEventsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.ads.datamanager.v1.IngestAdEventsRequest, + com.google.ads.datamanager.v1.IngestAdEventsResponse>( + service, METHODID_INGEST_AD_EVENTS))) .addMethod( getRetrieveRequestStatusMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall( @@ -859,6 +1008,7 @@ public static io.grpc.ServiceDescriptor getServiceDescriptor() { .addMethod(getIngestAudienceMembersMethod()) .addMethod(getRemoveAudienceMembersMethod()) .addMethod(getIngestEventsMethod()) + .addMethod(getIngestAdEventsMethod()) .addMethod(getRetrieveRequestStatusMethod()) .build(); } diff --git a/java-datamanager/proto-data-manager-v1/src/main/java/com/google/ads/datamanager/v1/AdEvent.java b/java-datamanager/proto-data-manager-v1/src/main/java/com/google/ads/datamanager/v1/AdEvent.java new file mode 100644 index 000000000000..711bd79f7d7c --- /dev/null +++ b/java-datamanager/proto-data-manager-v1/src/main/java/com/google/ads/datamanager/v1/AdEvent.java @@ -0,0 +1,8395 @@ +/* + * 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/ads/datamanager/v1/ad_event.proto +// Protobuf Java Version: 4.33.2 + +package com.google.ads.datamanager.v1; + +/** + * + * + *
+ * An ad event.
+ * 
+ * + * Protobuf type {@code google.ads.datamanager.v1.AdEvent} + */ +@com.google.protobuf.Generated +public final class AdEvent extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.ads.datamanager.v1.AdEvent) + AdEventOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "AdEvent"); + } + + // Use AdEvent.newBuilder() to construct. + private AdEvent(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private AdEvent() { + advertiserId_ = ""; + eventType_ = 0; + eventId_ = ""; + mobileDeviceId_ = ""; + campaignId_ = ""; + campaignName_ = ""; + adGroupId_ = ""; + adId_ = ""; + regionCode_ = ""; + source_ = ""; + medium_ = ""; + attributionHint_ = 0; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.ads.datamanager.v1.AdEventProto + .internal_static_google_ads_datamanager_v1_AdEvent_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.ads.datamanager.v1.AdEventProto + .internal_static_google_ads_datamanager_v1_AdEvent_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.ads.datamanager.v1.AdEvent.class, + com.google.ads.datamanager.v1.AdEvent.Builder.class); + } + + /** + * + * + *
+   * The type of the event.
+   * 
+ * + * Protobuf enum {@code google.ads.datamanager.v1.AdEvent.EventType} + */ + public enum EventType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Unspecified event type.
+     * 
+ * + * EVENT_TYPE_UNSPECIFIED = 0; + */ + EVENT_TYPE_UNSPECIFIED(0), + /** + * + * + *
+     * View event.
+     * 
+ * + * EVENT_TYPE_VIEW = 1; + */ + EVENT_TYPE_VIEW(1), + /** + * + * + *
+     * Click event.
+     * 
+ * + * EVENT_TYPE_CLICK = 2; + */ + EVENT_TYPE_CLICK(2), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "EventType"); + } + + /** + * + * + *
+     * Unspecified event type.
+     * 
+ * + * EVENT_TYPE_UNSPECIFIED = 0; + */ + public static final int EVENT_TYPE_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+     * View event.
+     * 
+ * + * EVENT_TYPE_VIEW = 1; + */ + public static final int EVENT_TYPE_VIEW_VALUE = 1; + + /** + * + * + *
+     * Click event.
+     * 
+ * + * EVENT_TYPE_CLICK = 2; + */ + public static final int EVENT_TYPE_CLICK_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 EventType 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 EventType forNumber(int value) { + switch (value) { + case 0: + return EVENT_TYPE_UNSPECIFIED; + case 1: + return EVENT_TYPE_VIEW; + case 2: + return EVENT_TYPE_CLICK; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public EventType findValueByNumber(int number) { + return EventType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.ads.datamanager.v1.AdEvent.getDescriptor().getEnumTypes().get(0); + } + + private static final EventType[] VALUES = values(); + + public static EventType valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private EventType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.ads.datamanager.v1.AdEvent.EventType) + } + + /** + * + * + *
+   * Additional classification about the type of ad event.
+   * 
+ * + * Protobuf enum {@code google.ads.datamanager.v1.AdEvent.EventSubtype} + */ + public enum EventSubtype implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Unspecified event subtype.
+     * 
+ * + * EVENT_SUBTYPE_UNSPECIFIED = 0; + */ + EVENT_SUBTYPE_UNSPECIFIED(0), + /** + * + * + *
+     * Impression event.
+     * 
+ * + * EVENT_SUBTYPE_IMPRESSION = 1; + */ + EVENT_SUBTYPE_IMPRESSION(1), + /** + * + * + *
+     * Engaged view event.
+     * 
+ * + * EVENT_SUBTYPE_ENGAGED_VIEW = 2; + */ + EVENT_SUBTYPE_ENGAGED_VIEW(2), + /** + * + * + *
+     * Onsite click event.
+     * 
+ * + * EVENT_SUBTYPE_ONSITE_CLICK = 3; + */ + EVENT_SUBTYPE_ONSITE_CLICK(3), + /** + * + * + *
+     * Outbound click event.
+     * 
+ * + * EVENT_SUBTYPE_OUTBOUND_CLICK = 4; + */ + EVENT_SUBTYPE_OUTBOUND_CLICK(4), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "EventSubtype"); + } + + /** + * + * + *
+     * Unspecified event subtype.
+     * 
+ * + * EVENT_SUBTYPE_UNSPECIFIED = 0; + */ + public static final int EVENT_SUBTYPE_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+     * Impression event.
+     * 
+ * + * EVENT_SUBTYPE_IMPRESSION = 1; + */ + public static final int EVENT_SUBTYPE_IMPRESSION_VALUE = 1; + + /** + * + * + *
+     * Engaged view event.
+     * 
+ * + * EVENT_SUBTYPE_ENGAGED_VIEW = 2; + */ + public static final int EVENT_SUBTYPE_ENGAGED_VIEW_VALUE = 2; + + /** + * + * + *
+     * Onsite click event.
+     * 
+ * + * EVENT_SUBTYPE_ONSITE_CLICK = 3; + */ + public static final int EVENT_SUBTYPE_ONSITE_CLICK_VALUE = 3; + + /** + * + * + *
+     * Outbound click event.
+     * 
+ * + * EVENT_SUBTYPE_OUTBOUND_CLICK = 4; + */ + public static final int EVENT_SUBTYPE_OUTBOUND_CLICK_VALUE = 4; + + 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 EventSubtype 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 EventSubtype forNumber(int value) { + switch (value) { + case 0: + return EVENT_SUBTYPE_UNSPECIFIED; + case 1: + return EVENT_SUBTYPE_IMPRESSION; + case 2: + return EVENT_SUBTYPE_ENGAGED_VIEW; + case 3: + return EVENT_SUBTYPE_ONSITE_CLICK; + case 4: + return EVENT_SUBTYPE_OUTBOUND_CLICK; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public EventSubtype findValueByNumber(int number) { + return EventSubtype.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.ads.datamanager.v1.AdEvent.getDescriptor().getEnumTypes().get(1); + } + + private static final EventSubtype[] VALUES = values(); + + public static EventSubtype valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private EventSubtype(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.ads.datamanager.v1.AdEvent.EventSubtype) + } + + private int bitField0_; + private int eventSubtypeOneofCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object eventSubtypeOneof_; + + public enum EventSubtypeOneofCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + EVENT_SUBTYPE(3), + EVENT_SUBTYPE_STRING(4), + EVENTSUBTYPEONEOF_NOT_SET(0); + private final int value; + + private EventSubtypeOneofCase(int value) { + this.value = value; + } + + /** + * @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 EventSubtypeOneofCase valueOf(int value) { + return forNumber(value); + } + + public static EventSubtypeOneofCase forNumber(int value) { + switch (value) { + case 3: + return EVENT_SUBTYPE; + case 4: + return EVENT_SUBTYPE_STRING; + case 0: + return EVENTSUBTYPEONEOF_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public EventSubtypeOneofCase getEventSubtypeOneofCase() { + return EventSubtypeOneofCase.forNumber(eventSubtypeOneofCase_); + } + + private int adTypeOneofCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object adTypeOneof_; + + public enum AdTypeOneofCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + AD_TYPE(14), + AD_TYPE_STRING(15), + ADTYPEONEOF_NOT_SET(0); + private final int value; + + private AdTypeOneofCase(int value) { + this.value = value; + } + + /** + * @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 AdTypeOneofCase valueOf(int value) { + return forNumber(value); + } + + public static AdTypeOneofCase forNumber(int value) { + switch (value) { + case 14: + return AD_TYPE; + case 15: + return AD_TYPE_STRING; + case 0: + return ADTYPEONEOF_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public AdTypeOneofCase getAdTypeOneofCase() { + return AdTypeOneofCase.forNumber(adTypeOneofCase_); + } + + private int adFormatOneofCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object adFormatOneof_; + + public enum AdFormatOneofCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + AD_FORMAT(16), + AD_FORMAT_STRING(17), + ADFORMATONEOF_NOT_SET(0); + private final int value; + + private AdFormatOneofCase(int value) { + this.value = value; + } + + /** + * @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 AdFormatOneofCase valueOf(int value) { + return forNumber(value); + } + + public static AdFormatOneofCase forNumber(int value) { + switch (value) { + case 16: + return AD_FORMAT; + case 17: + return AD_FORMAT_STRING; + case 0: + return ADFORMATONEOF_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public AdFormatOneofCase getAdFormatOneofCase() { + return AdFormatOneofCase.forNumber(adFormatOneofCase_); + } + + private int adPlacementOneofCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object adPlacementOneof_; + + public enum AdPlacementOneofCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + AD_PLACEMENT(18), + AD_PLACEMENT_STRING(19), + ADPLACEMENTONEOF_NOT_SET(0); + private final int value; + + private AdPlacementOneofCase(int value) { + this.value = value; + } + + /** + * @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 AdPlacementOneofCase valueOf(int value) { + return forNumber(value); + } + + public static AdPlacementOneofCase forNumber(int value) { + switch (value) { + case 18: + return AD_PLACEMENT; + case 19: + return AD_PLACEMENT_STRING; + case 0: + return ADPLACEMENTONEOF_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public AdPlacementOneofCase getAdPlacementOneofCase() { + return AdPlacementOneofCase.forNumber(adPlacementOneofCase_); + } + + private int targetingTypeOneofCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object targetingTypeOneof_; + + public enum TargetingTypeOneofCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + TARGETING_TYPE(25), + TARGETING_TYPE_STRING(26), + TARGETINGTYPEONEOF_NOT_SET(0); + private final int value; + + private TargetingTypeOneofCase(int value) { + this.value = value; + } + + /** + * @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 TargetingTypeOneofCase valueOf(int value) { + return forNumber(value); + } + + public static TargetingTypeOneofCase forNumber(int value) { + switch (value) { + case 25: + return TARGETING_TYPE; + case 26: + return TARGETING_TYPE_STRING; + case 0: + return TARGETINGTYPEONEOF_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public TargetingTypeOneofCase getTargetingTypeOneofCase() { + return TargetingTypeOneofCase.forNumber(targetingTypeOneofCase_); + } + + private int platformTypeOneofCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object platformTypeOneof_; + + public enum PlatformTypeOneofCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + PLATFORM_TYPE(27), + PLATFORM_TYPE_STRING(28), + PLATFORMTYPEONEOF_NOT_SET(0); + private final int value; + + private PlatformTypeOneofCase(int value) { + this.value = value; + } + + /** + * @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 PlatformTypeOneofCase valueOf(int value) { + return forNumber(value); + } + + public static PlatformTypeOneofCase forNumber(int value) { + switch (value) { + case 27: + return PLATFORM_TYPE; + case 28: + return PLATFORM_TYPE_STRING; + case 0: + return PLATFORMTYPEONEOF_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public PlatformTypeOneofCase getPlatformTypeOneofCase() { + return PlatformTypeOneofCase.forNumber(platformTypeOneofCase_); + } + + private int platformOneofCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object platformOneof_; + + public enum PlatformOneofCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + PLATFORM(29), + PLATFORM_STRING(30), + PLATFORMONEOF_NOT_SET(0); + private final int value; + + private PlatformOneofCase(int value) { + this.value = value; + } + + /** + * @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 PlatformOneofCase valueOf(int value) { + return forNumber(value); + } + + public static PlatformOneofCase forNumber(int value) { + switch (value) { + case 29: + return PLATFORM; + case 30: + return PLATFORM_STRING; + case 0: + return PLATFORMONEOF_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public PlatformOneofCase getPlatformOneofCase() { + return PlatformOneofCase.forNumber(platformOneofCase_); + } + + public static final int ADVERTISER_ID_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object advertiserId_ = ""; + + /** + * + * + *
+   * Required. The ID of the advertiser for the ad event.
+   *
+   * This must match the ID sent in the linking flow.
+   * 
+ * + * string advertiser_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The advertiserId. + */ + @java.lang.Override + public java.lang.String getAdvertiserId() { + java.lang.Object ref = advertiserId_; + 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(); + advertiserId_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. The ID of the advertiser for the ad event.
+   *
+   * This must match the ID sent in the linking flow.
+   * 
+ * + * string advertiser_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for advertiserId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getAdvertiserIdBytes() { + java.lang.Object ref = advertiserId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + advertiserId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int EVENT_TYPE_FIELD_NUMBER = 2; + private int eventType_ = 0; + + /** + * + * + *
+   * Required. The type of the event.
+   * 
+ * + * + * .google.ads.datamanager.v1.AdEvent.EventType event_type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for eventType. + */ + @java.lang.Override + public int getEventTypeValue() { + return eventType_; + } + + /** + * + * + *
+   * Required. The type of the event.
+   * 
+ * + * + * .google.ads.datamanager.v1.AdEvent.EventType event_type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The eventType. + */ + @java.lang.Override + public com.google.ads.datamanager.v1.AdEvent.EventType getEventType() { + com.google.ads.datamanager.v1.AdEvent.EventType result = + com.google.ads.datamanager.v1.AdEvent.EventType.forNumber(eventType_); + return result == null ? com.google.ads.datamanager.v1.AdEvent.EventType.UNRECOGNIZED : result; + } + + public static final int EVENT_SUBTYPE_FIELD_NUMBER = 3; + + /** + * + * + *
+   * Enum value for event subtype.
+   * 
+ * + * .google.ads.datamanager.v1.AdEvent.EventSubtype event_subtype = 3; + * + * @return Whether the eventSubtype field is set. + */ + public boolean hasEventSubtype() { + return eventSubtypeOneofCase_ == 3; + } + + /** + * + * + *
+   * Enum value for event subtype.
+   * 
+ * + * .google.ads.datamanager.v1.AdEvent.EventSubtype event_subtype = 3; + * + * @return The enum numeric value on the wire for eventSubtype. + */ + public int getEventSubtypeValue() { + if (eventSubtypeOneofCase_ == 3) { + return (java.lang.Integer) eventSubtypeOneof_; + } + return 0; + } + + /** + * + * + *
+   * Enum value for event subtype.
+   * 
+ * + * .google.ads.datamanager.v1.AdEvent.EventSubtype event_subtype = 3; + * + * @return The eventSubtype. + */ + public com.google.ads.datamanager.v1.AdEvent.EventSubtype getEventSubtype() { + if (eventSubtypeOneofCase_ == 3) { + com.google.ads.datamanager.v1.AdEvent.EventSubtype result = + com.google.ads.datamanager.v1.AdEvent.EventSubtype.forNumber( + (java.lang.Integer) eventSubtypeOneof_); + return result == null + ? com.google.ads.datamanager.v1.AdEvent.EventSubtype.UNRECOGNIZED + : result; + } + return com.google.ads.datamanager.v1.AdEvent.EventSubtype.EVENT_SUBTYPE_UNSPECIFIED; + } + + public static final int EVENT_SUBTYPE_STRING_FIELD_NUMBER = 4; + + /** + * + * + *
+   * String value for event subtype.
+   * 
+ * + * string event_subtype_string = 4; + * + * @return Whether the eventSubtypeString field is set. + */ + public boolean hasEventSubtypeString() { + return eventSubtypeOneofCase_ == 4; + } + + /** + * + * + *
+   * String value for event subtype.
+   * 
+ * + * string event_subtype_string = 4; + * + * @return The eventSubtypeString. + */ + public java.lang.String getEventSubtypeString() { + java.lang.Object ref = ""; + if (eventSubtypeOneofCase_ == 4) { + ref = eventSubtypeOneof_; + } + 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(); + if (eventSubtypeOneofCase_ == 4) { + eventSubtypeOneof_ = s; + } + return s; + } + } + + /** + * + * + *
+   * String value for event subtype.
+   * 
+ * + * string event_subtype_string = 4; + * + * @return The bytes for eventSubtypeString. + */ + public com.google.protobuf.ByteString getEventSubtypeStringBytes() { + java.lang.Object ref = ""; + if (eventSubtypeOneofCase_ == 4) { + ref = eventSubtypeOneof_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (eventSubtypeOneofCase_ == 4) { + eventSubtypeOneof_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TIMESTAMP_FIELD_NUMBER = 5; + private com.google.protobuf.Timestamp timestamp_; + + /** + * + * + *
+   * Required. The time the event occurred.
+   * 
+ * + * .google.protobuf.Timestamp timestamp = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the timestamp field is set. + */ + @java.lang.Override + public boolean hasTimestamp() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Required. The time the event occurred.
+   * 
+ * + * .google.protobuf.Timestamp timestamp = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The timestamp. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getTimestamp() { + return timestamp_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : timestamp_; + } + + /** + * + * + *
+   * Required. The time the event occurred.
+   * 
+ * + * .google.protobuf.Timestamp timestamp = 5 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getTimestampOrBuilder() { + return timestamp_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : timestamp_; + } + + public static final int EVENT_ID_FIELD_NUMBER = 6; + + @SuppressWarnings("serial") + private volatile java.lang.Object eventId_ = ""; + + /** + * + * + *
+   * Optional. An ID created and managed by the caller that uniquely identifies
+   * this event.
+   *
+   * Required if you want to deduplicate ad events that are included
+   * in multiple requests. Otherwise, this field is optional.
+   * 
+ * + * string event_id = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The eventId. + */ + @java.lang.Override + public java.lang.String getEventId() { + java.lang.Object ref = eventId_; + 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(); + eventId_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. An ID created and managed by the caller that uniquely identifies
+   * this event.
+   *
+   * Required if you want to deduplicate ad events that are included
+   * in multiple requests. Otherwise, this field is optional.
+   * 
+ * + * string event_id = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for eventId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getEventIdBytes() { + java.lang.Object ref = eventId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + eventId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int USER_DATA_FIELD_NUMBER = 7; + private com.google.ads.datamanager.v1.UserData userData_; + + /** + * + * + *
+   * Optional. Multiple pieces of user-provided data, representing the user the
+   * event is associated with.
+   *
+   * It is possible to provide multiple instances of the same type of data (e.g.
+   * email address). The more data provided, the more likely a match will be
+   * found.
+   * 
+ * + * + * .google.ads.datamanager.v1.UserData user_data = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the userData field is set. + */ + @java.lang.Override + public boolean hasUserData() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * Optional. Multiple pieces of user-provided data, representing the user the
+   * event is associated with.
+   *
+   * It is possible to provide multiple instances of the same type of data (e.g.
+   * email address). The more data provided, the more likely a match will be
+   * found.
+   * 
+ * + * + * .google.ads.datamanager.v1.UserData user_data = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The userData. + */ + @java.lang.Override + public com.google.ads.datamanager.v1.UserData getUserData() { + return userData_ == null + ? com.google.ads.datamanager.v1.UserData.getDefaultInstance() + : userData_; + } + + /** + * + * + *
+   * Optional. Multiple pieces of user-provided data, representing the user the
+   * event is associated with.
+   *
+   * It is possible to provide multiple instances of the same type of data (e.g.
+   * email address). The more data provided, the more likely a match will be
+   * found.
+   * 
+ * + * + * .google.ads.datamanager.v1.UserData user_data = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.ads.datamanager.v1.UserDataOrBuilder getUserDataOrBuilder() { + return userData_ == null + ? com.google.ads.datamanager.v1.UserData.getDefaultInstance() + : userData_; + } + + public static final int DEVICE_INFO_FIELD_NUMBER = 8; + private com.google.ads.datamanager.v1.DeviceInfo deviceInfo_; + + /** + * + * + *
+   * Optional. Information gathered about the device being used when the ad
+   * event happened.
+   * 
+ * + * + * .google.ads.datamanager.v1.DeviceInfo device_info = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the deviceInfo field is set. + */ + @java.lang.Override + public boolean hasDeviceInfo() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+   * Optional. Information gathered about the device being used when the ad
+   * event happened.
+   * 
+ * + * + * .google.ads.datamanager.v1.DeviceInfo device_info = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The deviceInfo. + */ + @java.lang.Override + public com.google.ads.datamanager.v1.DeviceInfo getDeviceInfo() { + return deviceInfo_ == null + ? com.google.ads.datamanager.v1.DeviceInfo.getDefaultInstance() + : deviceInfo_; + } + + /** + * + * + *
+   * Optional. Information gathered about the device being used when the ad
+   * event happened.
+   * 
+ * + * + * .google.ads.datamanager.v1.DeviceInfo device_info = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.ads.datamanager.v1.DeviceInfoOrBuilder getDeviceInfoOrBuilder() { + return deviceInfo_ == null + ? com.google.ads.datamanager.v1.DeviceInfo.getDefaultInstance() + : deviceInfo_; + } + + public static final int MOBILE_DEVICE_ID_FIELD_NUMBER = 9; + + @SuppressWarnings("serial") + private volatile java.lang.Object mobileDeviceId_ = ""; + + /** + * + * + *
+   * Optional. The device ID of the device that the ad was served to.
+   * 
+ * + * string mobile_device_id = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The mobileDeviceId. + */ + @java.lang.Override + public java.lang.String getMobileDeviceId() { + java.lang.Object ref = mobileDeviceId_; + 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(); + mobileDeviceId_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. The device ID of the device that the ad was served to.
+   * 
+ * + * string mobile_device_id = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for mobileDeviceId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getMobileDeviceIdBytes() { + java.lang.Object ref = mobileDeviceId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + mobileDeviceId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CAMPAIGN_ID_FIELD_NUMBER = 10; + + @SuppressWarnings("serial") + private volatile java.lang.Object campaignId_ = ""; + + /** + * + * + *
+   * Required. The ID of the associated campaign.
+   * 
+ * + * string campaign_id = 10 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The campaignId. + */ + @java.lang.Override + public java.lang.String getCampaignId() { + java.lang.Object ref = campaignId_; + 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(); + campaignId_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. The ID of the associated campaign.
+   * 
+ * + * string campaign_id = 10 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for campaignId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getCampaignIdBytes() { + java.lang.Object ref = campaignId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + campaignId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CAMPAIGN_NAME_FIELD_NUMBER = 11; + + @SuppressWarnings("serial") + private volatile java.lang.Object campaignName_ = ""; + + /** + * + * + *
+   * Required. The name of the associated campaign.
+   * 
+ * + * string campaign_name = 11 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The campaignName. + */ + @java.lang.Override + public java.lang.String getCampaignName() { + java.lang.Object ref = campaignName_; + 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(); + campaignName_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. The name of the associated campaign.
+   * 
+ * + * string campaign_name = 11 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for campaignName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getCampaignNameBytes() { + java.lang.Object ref = campaignName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + campaignName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int AD_GROUP_ID_FIELD_NUMBER = 12; + + @SuppressWarnings("serial") + private volatile java.lang.Object adGroupId_ = ""; + + /** + * + * + *
+   * Optional. The ID of the associated ad group.
+   * 
+ * + * string ad_group_id = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The adGroupId. + */ + @java.lang.Override + public java.lang.String getAdGroupId() { + java.lang.Object ref = adGroupId_; + 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(); + adGroupId_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. The ID of the associated ad group.
+   * 
+ * + * string ad_group_id = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for adGroupId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getAdGroupIdBytes() { + java.lang.Object ref = adGroupId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + adGroupId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int AD_ID_FIELD_NUMBER = 13; + + @SuppressWarnings("serial") + private volatile java.lang.Object adId_ = ""; + + /** + * + * + *
+   * Optional. The ID of the associated ad within the group.
+   * 
+ * + * string ad_id = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The adId. + */ + @java.lang.Override + public java.lang.String getAdId() { + java.lang.Object ref = adId_; + 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(); + adId_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. The ID of the associated ad within the group.
+   * 
+ * + * string ad_id = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for adId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getAdIdBytes() { + java.lang.Object ref = adId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + adId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int AD_TYPE_FIELD_NUMBER = 14; + + /** + * + * + *
+   * Enum value for ad type.
+   * 
+ * + * .google.ads.datamanager.v1.AdType ad_type = 14; + * + * @return Whether the adType field is set. + */ + public boolean hasAdType() { + return adTypeOneofCase_ == 14; + } + + /** + * + * + *
+   * Enum value for ad type.
+   * 
+ * + * .google.ads.datamanager.v1.AdType ad_type = 14; + * + * @return The enum numeric value on the wire for adType. + */ + public int getAdTypeValue() { + if (adTypeOneofCase_ == 14) { + return (java.lang.Integer) adTypeOneof_; + } + return 0; + } + + /** + * + * + *
+   * Enum value for ad type.
+   * 
+ * + * .google.ads.datamanager.v1.AdType ad_type = 14; + * + * @return The adType. + */ + public com.google.ads.datamanager.v1.AdType getAdType() { + if (adTypeOneofCase_ == 14) { + com.google.ads.datamanager.v1.AdType result = + com.google.ads.datamanager.v1.AdType.forNumber((java.lang.Integer) adTypeOneof_); + return result == null ? com.google.ads.datamanager.v1.AdType.UNRECOGNIZED : result; + } + return com.google.ads.datamanager.v1.AdType.AD_TYPE_UNSPECIFIED; + } + + public static final int AD_TYPE_STRING_FIELD_NUMBER = 15; + + /** + * + * + *
+   * String value for ad type.
+   * 
+ * + * string ad_type_string = 15; + * + * @return Whether the adTypeString field is set. + */ + public boolean hasAdTypeString() { + return adTypeOneofCase_ == 15; + } + + /** + * + * + *
+   * String value for ad type.
+   * 
+ * + * string ad_type_string = 15; + * + * @return The adTypeString. + */ + public java.lang.String getAdTypeString() { + java.lang.Object ref = ""; + if (adTypeOneofCase_ == 15) { + ref = adTypeOneof_; + } + 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(); + if (adTypeOneofCase_ == 15) { + adTypeOneof_ = s; + } + return s; + } + } + + /** + * + * + *
+   * String value for ad type.
+   * 
+ * + * string ad_type_string = 15; + * + * @return The bytes for adTypeString. + */ + public com.google.protobuf.ByteString getAdTypeStringBytes() { + java.lang.Object ref = ""; + if (adTypeOneofCase_ == 15) { + ref = adTypeOneof_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (adTypeOneofCase_ == 15) { + adTypeOneof_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int AD_FORMAT_FIELD_NUMBER = 16; + + /** + * + * + *
+   * Enum value for ad format.
+   * 
+ * + * .google.ads.datamanager.v1.AdFormat ad_format = 16; + * + * @return Whether the adFormat field is set. + */ + public boolean hasAdFormat() { + return adFormatOneofCase_ == 16; + } + + /** + * + * + *
+   * Enum value for ad format.
+   * 
+ * + * .google.ads.datamanager.v1.AdFormat ad_format = 16; + * + * @return The enum numeric value on the wire for adFormat. + */ + public int getAdFormatValue() { + if (adFormatOneofCase_ == 16) { + return (java.lang.Integer) adFormatOneof_; + } + return 0; + } + + /** + * + * + *
+   * Enum value for ad format.
+   * 
+ * + * .google.ads.datamanager.v1.AdFormat ad_format = 16; + * + * @return The adFormat. + */ + public com.google.ads.datamanager.v1.AdFormat getAdFormat() { + if (adFormatOneofCase_ == 16) { + com.google.ads.datamanager.v1.AdFormat result = + com.google.ads.datamanager.v1.AdFormat.forNumber((java.lang.Integer) adFormatOneof_); + return result == null ? com.google.ads.datamanager.v1.AdFormat.UNRECOGNIZED : result; + } + return com.google.ads.datamanager.v1.AdFormat.AD_FORMAT_UNSPECIFIED; + } + + public static final int AD_FORMAT_STRING_FIELD_NUMBER = 17; + + /** + * + * + *
+   * String value for ad format.
+   * 
+ * + * string ad_format_string = 17; + * + * @return Whether the adFormatString field is set. + */ + public boolean hasAdFormatString() { + return adFormatOneofCase_ == 17; + } + + /** + * + * + *
+   * String value for ad format.
+   * 
+ * + * string ad_format_string = 17; + * + * @return The adFormatString. + */ + public java.lang.String getAdFormatString() { + java.lang.Object ref = ""; + if (adFormatOneofCase_ == 17) { + ref = adFormatOneof_; + } + 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(); + if (adFormatOneofCase_ == 17) { + adFormatOneof_ = s; + } + return s; + } + } + + /** + * + * + *
+   * String value for ad format.
+   * 
+ * + * string ad_format_string = 17; + * + * @return The bytes for adFormatString. + */ + public com.google.protobuf.ByteString getAdFormatStringBytes() { + java.lang.Object ref = ""; + if (adFormatOneofCase_ == 17) { + ref = adFormatOneof_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (adFormatOneofCase_ == 17) { + adFormatOneof_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int AD_PLACEMENT_FIELD_NUMBER = 18; + + /** + * + * + *
+   * Enum value for ad placement.
+   * 
+ * + * .google.ads.datamanager.v1.AdPlacement ad_placement = 18; + * + * @return Whether the adPlacement field is set. + */ + public boolean hasAdPlacement() { + return adPlacementOneofCase_ == 18; + } + + /** + * + * + *
+   * Enum value for ad placement.
+   * 
+ * + * .google.ads.datamanager.v1.AdPlacement ad_placement = 18; + * + * @return The enum numeric value on the wire for adPlacement. + */ + public int getAdPlacementValue() { + if (adPlacementOneofCase_ == 18) { + return (java.lang.Integer) adPlacementOneof_; + } + return 0; + } + + /** + * + * + *
+   * Enum value for ad placement.
+   * 
+ * + * .google.ads.datamanager.v1.AdPlacement ad_placement = 18; + * + * @return The adPlacement. + */ + public com.google.ads.datamanager.v1.AdPlacement getAdPlacement() { + if (adPlacementOneofCase_ == 18) { + com.google.ads.datamanager.v1.AdPlacement result = + com.google.ads.datamanager.v1.AdPlacement.forNumber( + (java.lang.Integer) adPlacementOneof_); + return result == null ? com.google.ads.datamanager.v1.AdPlacement.UNRECOGNIZED : result; + } + return com.google.ads.datamanager.v1.AdPlacement.AD_PLACEMENT_UNSPECIFIED; + } + + public static final int AD_PLACEMENT_STRING_FIELD_NUMBER = 19; + + /** + * + * + *
+   * String value for ad placement.
+   * 
+ * + * string ad_placement_string = 19; + * + * @return Whether the adPlacementString field is set. + */ + public boolean hasAdPlacementString() { + return adPlacementOneofCase_ == 19; + } + + /** + * + * + *
+   * String value for ad placement.
+   * 
+ * + * string ad_placement_string = 19; + * + * @return The adPlacementString. + */ + public java.lang.String getAdPlacementString() { + java.lang.Object ref = ""; + if (adPlacementOneofCase_ == 19) { + ref = adPlacementOneof_; + } + 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(); + if (adPlacementOneofCase_ == 19) { + adPlacementOneof_ = s; + } + return s; + } + } + + /** + * + * + *
+   * String value for ad placement.
+   * 
+ * + * string ad_placement_string = 19; + * + * @return The bytes for adPlacementString. + */ + public com.google.protobuf.ByteString getAdPlacementStringBytes() { + java.lang.Object ref = ""; + if (adPlacementOneofCase_ == 19) { + ref = adPlacementOneof_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (adPlacementOneofCase_ == 19) { + adPlacementOneof_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int AD_HEIGHT_FIELD_NUMBER = 20; + private int adHeight_ = 0; + + /** + * + * + *
+   * Optional. The height of the ad in pixels.
+   * 
+ * + * int32 ad_height = 20 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The adHeight. + */ + @java.lang.Override + public int getAdHeight() { + return adHeight_; + } + + public static final int AD_WIDTH_FIELD_NUMBER = 21; + private int adWidth_ = 0; + + /** + * + * + *
+   * Optional. The width of the ad in pixels.
+   * 
+ * + * int32 ad_width = 21 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The adWidth. + */ + @java.lang.Override + public int getAdWidth() { + return adWidth_; + } + + public static final int REGION_CODE_FIELD_NUMBER = 22; + + @SuppressWarnings("serial") + private volatile java.lang.Object regionCode_ = ""; + + /** + * + * + *
+   * Required. The ISO 3166-2 country plus subdivision.
+   * 
+ * + * string region_code = 22 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The regionCode. + */ + @java.lang.Override + public java.lang.String getRegionCode() { + java.lang.Object ref = regionCode_; + 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(); + regionCode_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. The ISO 3166-2 country plus subdivision.
+   * 
+ * + * string region_code = 22 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for regionCode. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRegionCodeBytes() { + java.lang.Object ref = regionCode_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + regionCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SOURCE_FIELD_NUMBER = 23; + + @SuppressWarnings("serial") + private volatile java.lang.Object source_ = ""; + + /** + * + * + *
+   * Required. The platform source of the ad, akin to the Google Analytics
+   * source.
+   * 
+ * + * string source = 23 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The source. + */ + @java.lang.Override + public java.lang.String getSource() { + java.lang.Object ref = source_; + 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(); + source_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. The platform source of the ad, akin to the Google Analytics
+   * source.
+   * 
+ * + * string source = 23 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for source. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSourceBytes() { + java.lang.Object ref = source_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + source_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int MEDIUM_FIELD_NUMBER = 24; + + @SuppressWarnings("serial") + private volatile java.lang.Object medium_ = ""; + + /** + * + * + *
+   * Required. The medium of the ad, akin to the Google Analytics medium.
+   * 
+ * + * string medium = 24 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The medium. + */ + @java.lang.Override + public java.lang.String getMedium() { + java.lang.Object ref = medium_; + 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(); + medium_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. The medium of the ad, akin to the Google Analytics medium.
+   * 
+ * + * string medium = 24 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for medium. + */ + @java.lang.Override + public com.google.protobuf.ByteString getMediumBytes() { + java.lang.Object ref = medium_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + medium_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TARGETING_TYPE_FIELD_NUMBER = 25; + + /** + * + * + *
+   * Enum value for targeting type.
+   * 
+ * + * .google.ads.datamanager.v1.TargetingType targeting_type = 25; + * + * @return Whether the targetingType field is set. + */ + public boolean hasTargetingType() { + return targetingTypeOneofCase_ == 25; + } + + /** + * + * + *
+   * Enum value for targeting type.
+   * 
+ * + * .google.ads.datamanager.v1.TargetingType targeting_type = 25; + * + * @return The enum numeric value on the wire for targetingType. + */ + public int getTargetingTypeValue() { + if (targetingTypeOneofCase_ == 25) { + return (java.lang.Integer) targetingTypeOneof_; + } + return 0; + } + + /** + * + * + *
+   * Enum value for targeting type.
+   * 
+ * + * .google.ads.datamanager.v1.TargetingType targeting_type = 25; + * + * @return The targetingType. + */ + public com.google.ads.datamanager.v1.TargetingType getTargetingType() { + if (targetingTypeOneofCase_ == 25) { + com.google.ads.datamanager.v1.TargetingType result = + com.google.ads.datamanager.v1.TargetingType.forNumber( + (java.lang.Integer) targetingTypeOneof_); + return result == null ? com.google.ads.datamanager.v1.TargetingType.UNRECOGNIZED : result; + } + return com.google.ads.datamanager.v1.TargetingType.TARGETING_TYPE_UNSPECIFIED; + } + + public static final int TARGETING_TYPE_STRING_FIELD_NUMBER = 26; + + /** + * + * + *
+   * String value for targeting type.
+   * 
+ * + * string targeting_type_string = 26; + * + * @return Whether the targetingTypeString field is set. + */ + public boolean hasTargetingTypeString() { + return targetingTypeOneofCase_ == 26; + } + + /** + * + * + *
+   * String value for targeting type.
+   * 
+ * + * string targeting_type_string = 26; + * + * @return The targetingTypeString. + */ + public java.lang.String getTargetingTypeString() { + java.lang.Object ref = ""; + if (targetingTypeOneofCase_ == 26) { + ref = targetingTypeOneof_; + } + 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(); + if (targetingTypeOneofCase_ == 26) { + targetingTypeOneof_ = s; + } + return s; + } + } + + /** + * + * + *
+   * String value for targeting type.
+   * 
+ * + * string targeting_type_string = 26; + * + * @return The bytes for targetingTypeString. + */ + public com.google.protobuf.ByteString getTargetingTypeStringBytes() { + java.lang.Object ref = ""; + if (targetingTypeOneofCase_ == 26) { + ref = targetingTypeOneof_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (targetingTypeOneofCase_ == 26) { + targetingTypeOneof_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PLATFORM_TYPE_FIELD_NUMBER = 27; + + /** + * + * + *
+   * Enum value for platform type.
+   * 
+ * + * .google.ads.datamanager.v1.PlatformType platform_type = 27; + * + * @return Whether the platformType field is set. + */ + public boolean hasPlatformType() { + return platformTypeOneofCase_ == 27; + } + + /** + * + * + *
+   * Enum value for platform type.
+   * 
+ * + * .google.ads.datamanager.v1.PlatformType platform_type = 27; + * + * @return The enum numeric value on the wire for platformType. + */ + public int getPlatformTypeValue() { + if (platformTypeOneofCase_ == 27) { + return (java.lang.Integer) platformTypeOneof_; + } + return 0; + } + + /** + * + * + *
+   * Enum value for platform type.
+   * 
+ * + * .google.ads.datamanager.v1.PlatformType platform_type = 27; + * + * @return The platformType. + */ + public com.google.ads.datamanager.v1.PlatformType getPlatformType() { + if (platformTypeOneofCase_ == 27) { + com.google.ads.datamanager.v1.PlatformType result = + com.google.ads.datamanager.v1.PlatformType.forNumber( + (java.lang.Integer) platformTypeOneof_); + return result == null ? com.google.ads.datamanager.v1.PlatformType.UNRECOGNIZED : result; + } + return com.google.ads.datamanager.v1.PlatformType.PLATFORM_TYPE_UNSPECIFIED; + } + + public static final int PLATFORM_TYPE_STRING_FIELD_NUMBER = 28; + + /** + * + * + *
+   * String value for platform type.
+   * 
+ * + * string platform_type_string = 28; + * + * @return Whether the platformTypeString field is set. + */ + public boolean hasPlatformTypeString() { + return platformTypeOneofCase_ == 28; + } + + /** + * + * + *
+   * String value for platform type.
+   * 
+ * + * string platform_type_string = 28; + * + * @return The platformTypeString. + */ + public java.lang.String getPlatformTypeString() { + java.lang.Object ref = ""; + if (platformTypeOneofCase_ == 28) { + ref = platformTypeOneof_; + } + 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(); + if (platformTypeOneofCase_ == 28) { + platformTypeOneof_ = s; + } + return s; + } + } + + /** + * + * + *
+   * String value for platform type.
+   * 
+ * + * string platform_type_string = 28; + * + * @return The bytes for platformTypeString. + */ + public com.google.protobuf.ByteString getPlatformTypeStringBytes() { + java.lang.Object ref = ""; + if (platformTypeOneofCase_ == 28) { + ref = platformTypeOneof_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (platformTypeOneofCase_ == 28) { + platformTypeOneof_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PLATFORM_FIELD_NUMBER = 29; + + /** + * + * + *
+   * Enum value for platform.
+   * 
+ * + * .google.ads.datamanager.v1.Platform platform = 29; + * + * @return Whether the platform field is set. + */ + public boolean hasPlatform() { + return platformOneofCase_ == 29; + } + + /** + * + * + *
+   * Enum value for platform.
+   * 
+ * + * .google.ads.datamanager.v1.Platform platform = 29; + * + * @return The enum numeric value on the wire for platform. + */ + public int getPlatformValue() { + if (platformOneofCase_ == 29) { + return (java.lang.Integer) platformOneof_; + } + return 0; + } + + /** + * + * + *
+   * Enum value for platform.
+   * 
+ * + * .google.ads.datamanager.v1.Platform platform = 29; + * + * @return The platform. + */ + public com.google.ads.datamanager.v1.Platform getPlatform() { + if (platformOneofCase_ == 29) { + com.google.ads.datamanager.v1.Platform result = + com.google.ads.datamanager.v1.Platform.forNumber((java.lang.Integer) platformOneof_); + return result == null ? com.google.ads.datamanager.v1.Platform.UNRECOGNIZED : result; + } + return com.google.ads.datamanager.v1.Platform.PLATFORM_UNSPECIFIED; + } + + public static final int PLATFORM_STRING_FIELD_NUMBER = 30; + + /** + * + * + *
+   * String value for platform.
+   * 
+ * + * string platform_string = 30; + * + * @return Whether the platformString field is set. + */ + public boolean hasPlatformString() { + return platformOneofCase_ == 30; + } + + /** + * + * + *
+   * String value for platform.
+   * 
+ * + * string platform_string = 30; + * + * @return The platformString. + */ + public java.lang.String getPlatformString() { + java.lang.Object ref = ""; + if (platformOneofCase_ == 30) { + ref = platformOneof_; + } + 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(); + if (platformOneofCase_ == 30) { + platformOneof_ = s; + } + return s; + } + } + + /** + * + * + *
+   * String value for platform.
+   * 
+ * + * string platform_string = 30; + * + * @return The bytes for platformString. + */ + public com.google.protobuf.ByteString getPlatformStringBytes() { + java.lang.Object ref = ""; + if (platformOneofCase_ == 30) { + ref = platformOneof_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (platformOneofCase_ == 30) { + platformOneof_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ATTRIBUTION_HINT_FIELD_NUMBER = 31; + private int attributionHint_ = 0; + + /** + * + * + *
+   * Optional. The partner-assumed attribution status for this ad event.
+   *
+   * This acts only as a signal for how the partner assumed attribution played
+   * out, and does not force an end result in final reports.
+   * 
+ * + * + * .google.ads.datamanager.v1.AttributionHint attribution_hint = 31 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for attributionHint. + */ + @java.lang.Override + public int getAttributionHintValue() { + return attributionHint_; + } + + /** + * + * + *
+   * Optional. The partner-assumed attribution status for this ad event.
+   *
+   * This acts only as a signal for how the partner assumed attribution played
+   * out, and does not force an end result in final reports.
+   * 
+ * + * + * .google.ads.datamanager.v1.AttributionHint attribution_hint = 31 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The attributionHint. + */ + @java.lang.Override + public com.google.ads.datamanager.v1.AttributionHint getAttributionHint() { + com.google.ads.datamanager.v1.AttributionHint result = + com.google.ads.datamanager.v1.AttributionHint.forNumber(attributionHint_); + return result == null ? com.google.ads.datamanager.v1.AttributionHint.UNRECOGNIZED : result; + } + + public static final int VIEWABILITY_INFO_FIELD_NUMBER = 32; + private com.google.ads.datamanager.v1.ViewabilityInfo viewabilityInfo_; + + /** + * + * + *
+   * Required. Details of the viewability of the ad served.
+   * 
+ * + * + * .google.ads.datamanager.v1.ViewabilityInfo viewability_info = 32 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the viewabilityInfo field is set. + */ + @java.lang.Override + public boolean hasViewabilityInfo() { + return ((bitField0_ & 0x00000008) != 0); + } + + /** + * + * + *
+   * Required. Details of the viewability of the ad served.
+   * 
+ * + * + * .google.ads.datamanager.v1.ViewabilityInfo viewability_info = 32 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The viewabilityInfo. + */ + @java.lang.Override + public com.google.ads.datamanager.v1.ViewabilityInfo getViewabilityInfo() { + return viewabilityInfo_ == null + ? com.google.ads.datamanager.v1.ViewabilityInfo.getDefaultInstance() + : viewabilityInfo_; + } + + /** + * + * + *
+   * Required. Details of the viewability of the ad served.
+   * 
+ * + * + * .google.ads.datamanager.v1.ViewabilityInfo viewability_info = 32 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.ads.datamanager.v1.ViewabilityInfoOrBuilder getViewabilityInfoOrBuilder() { + return viewabilityInfo_ == null + ? com.google.ads.datamanager.v1.ViewabilityInfo.getDefaultInstance() + : viewabilityInfo_; + } + + public static final int MEASUREMENT_ALLOWED_FIELD_NUMBER = 33; + private boolean measurementAllowed_ = false; + + /** + * + * + *
+   * Optional. Represents if the row is allowed to be used for measurement
+   * purposes, as governed by applicable privacy laws within regional
+   * jurisdiction.
+   * 
+ * + * optional bool measurement_allowed = 33 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the measurementAllowed field is set. + */ + @java.lang.Override + public boolean hasMeasurementAllowed() { + return ((bitField0_ & 0x00000010) != 0); + } + + /** + * + * + *
+   * Optional. Represents if the row is allowed to be used for measurement
+   * purposes, as governed by applicable privacy laws within regional
+   * jurisdiction.
+   * 
+ * + * optional bool measurement_allowed = 33 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The measurementAllowed. + */ + @java.lang.Override + public boolean getMeasurementAllowed() { + return measurementAllowed_; + } + + 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(advertiserId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, advertiserId_); + } + if (eventType_ + != com.google.ads.datamanager.v1.AdEvent.EventType.EVENT_TYPE_UNSPECIFIED.getNumber()) { + output.writeEnum(2, eventType_); + } + if (eventSubtypeOneofCase_ == 3) { + output.writeEnum(3, ((java.lang.Integer) eventSubtypeOneof_)); + } + if (eventSubtypeOneofCase_ == 4) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, eventSubtypeOneof_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(5, getTimestamp()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(eventId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 6, eventId_); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(7, getUserData()); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeMessage(8, getDeviceInfo()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(mobileDeviceId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 9, mobileDeviceId_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(campaignId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 10, campaignId_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(campaignName_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 11, campaignName_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(adGroupId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 12, adGroupId_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(adId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 13, adId_); + } + if (adTypeOneofCase_ == 14) { + output.writeEnum(14, ((java.lang.Integer) adTypeOneof_)); + } + if (adTypeOneofCase_ == 15) { + com.google.protobuf.GeneratedMessage.writeString(output, 15, adTypeOneof_); + } + if (adFormatOneofCase_ == 16) { + output.writeEnum(16, ((java.lang.Integer) adFormatOneof_)); + } + if (adFormatOneofCase_ == 17) { + com.google.protobuf.GeneratedMessage.writeString(output, 17, adFormatOneof_); + } + if (adPlacementOneofCase_ == 18) { + output.writeEnum(18, ((java.lang.Integer) adPlacementOneof_)); + } + if (adPlacementOneofCase_ == 19) { + com.google.protobuf.GeneratedMessage.writeString(output, 19, adPlacementOneof_); + } + if (adHeight_ != 0) { + output.writeInt32(20, adHeight_); + } + if (adWidth_ != 0) { + output.writeInt32(21, adWidth_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(regionCode_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 22, regionCode_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(source_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 23, source_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(medium_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 24, medium_); + } + if (targetingTypeOneofCase_ == 25) { + output.writeEnum(25, ((java.lang.Integer) targetingTypeOneof_)); + } + if (targetingTypeOneofCase_ == 26) { + com.google.protobuf.GeneratedMessage.writeString(output, 26, targetingTypeOneof_); + } + if (platformTypeOneofCase_ == 27) { + output.writeEnum(27, ((java.lang.Integer) platformTypeOneof_)); + } + if (platformTypeOneofCase_ == 28) { + com.google.protobuf.GeneratedMessage.writeString(output, 28, platformTypeOneof_); + } + if (platformOneofCase_ == 29) { + output.writeEnum(29, ((java.lang.Integer) platformOneof_)); + } + if (platformOneofCase_ == 30) { + com.google.protobuf.GeneratedMessage.writeString(output, 30, platformOneof_); + } + if (attributionHint_ + != com.google.ads.datamanager.v1.AttributionHint.ATTRIBUTION_HINT_UNSPECIFIED.getNumber()) { + output.writeEnum(31, attributionHint_); + } + if (((bitField0_ & 0x00000008) != 0)) { + output.writeMessage(32, getViewabilityInfo()); + } + if (((bitField0_ & 0x00000010) != 0)) { + output.writeBool(33, measurementAllowed_); + } + 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(advertiserId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, advertiserId_); + } + if (eventType_ + != com.google.ads.datamanager.v1.AdEvent.EventType.EVENT_TYPE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, eventType_); + } + if (eventSubtypeOneofCase_ == 3) { + size += + com.google.protobuf.CodedOutputStream.computeEnumSize( + 3, ((java.lang.Integer) eventSubtypeOneof_)); + } + if (eventSubtypeOneofCase_ == 4) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, eventSubtypeOneof_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getTimestamp()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(eventId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(6, eventId_); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getUserData()); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, getDeviceInfo()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(mobileDeviceId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(9, mobileDeviceId_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(campaignId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(10, campaignId_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(campaignName_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(11, campaignName_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(adGroupId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(12, adGroupId_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(adId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(13, adId_); + } + if (adTypeOneofCase_ == 14) { + size += + com.google.protobuf.CodedOutputStream.computeEnumSize( + 14, ((java.lang.Integer) adTypeOneof_)); + } + if (adTypeOneofCase_ == 15) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(15, adTypeOneof_); + } + if (adFormatOneofCase_ == 16) { + size += + com.google.protobuf.CodedOutputStream.computeEnumSize( + 16, ((java.lang.Integer) adFormatOneof_)); + } + if (adFormatOneofCase_ == 17) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(17, adFormatOneof_); + } + if (adPlacementOneofCase_ == 18) { + size += + com.google.protobuf.CodedOutputStream.computeEnumSize( + 18, ((java.lang.Integer) adPlacementOneof_)); + } + if (adPlacementOneofCase_ == 19) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(19, adPlacementOneof_); + } + if (adHeight_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(20, adHeight_); + } + if (adWidth_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(21, adWidth_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(regionCode_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(22, regionCode_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(source_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(23, source_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(medium_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(24, medium_); + } + if (targetingTypeOneofCase_ == 25) { + size += + com.google.protobuf.CodedOutputStream.computeEnumSize( + 25, ((java.lang.Integer) targetingTypeOneof_)); + } + if (targetingTypeOneofCase_ == 26) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(26, targetingTypeOneof_); + } + if (platformTypeOneofCase_ == 27) { + size += + com.google.protobuf.CodedOutputStream.computeEnumSize( + 27, ((java.lang.Integer) platformTypeOneof_)); + } + if (platformTypeOneofCase_ == 28) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(28, platformTypeOneof_); + } + if (platformOneofCase_ == 29) { + size += + com.google.protobuf.CodedOutputStream.computeEnumSize( + 29, ((java.lang.Integer) platformOneof_)); + } + if (platformOneofCase_ == 30) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(30, platformOneof_); + } + if (attributionHint_ + != com.google.ads.datamanager.v1.AttributionHint.ATTRIBUTION_HINT_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(31, attributionHint_); + } + if (((bitField0_ & 0x00000008) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(32, getViewabilityInfo()); + } + if (((bitField0_ & 0x00000010) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(33, measurementAllowed_); + } + 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.ads.datamanager.v1.AdEvent)) { + return super.equals(obj); + } + com.google.ads.datamanager.v1.AdEvent other = (com.google.ads.datamanager.v1.AdEvent) obj; + + if (!getAdvertiserId().equals(other.getAdvertiserId())) return false; + if (eventType_ != other.eventType_) return false; + if (hasTimestamp() != other.hasTimestamp()) return false; + if (hasTimestamp()) { + if (!getTimestamp().equals(other.getTimestamp())) return false; + } + if (!getEventId().equals(other.getEventId())) return false; + if (hasUserData() != other.hasUserData()) return false; + if (hasUserData()) { + if (!getUserData().equals(other.getUserData())) return false; + } + if (hasDeviceInfo() != other.hasDeviceInfo()) return false; + if (hasDeviceInfo()) { + if (!getDeviceInfo().equals(other.getDeviceInfo())) return false; + } + if (!getMobileDeviceId().equals(other.getMobileDeviceId())) return false; + if (!getCampaignId().equals(other.getCampaignId())) return false; + if (!getCampaignName().equals(other.getCampaignName())) return false; + if (!getAdGroupId().equals(other.getAdGroupId())) return false; + if (!getAdId().equals(other.getAdId())) return false; + if (getAdHeight() != other.getAdHeight()) return false; + if (getAdWidth() != other.getAdWidth()) return false; + if (!getRegionCode().equals(other.getRegionCode())) return false; + if (!getSource().equals(other.getSource())) return false; + if (!getMedium().equals(other.getMedium())) return false; + if (attributionHint_ != other.attributionHint_) return false; + if (hasViewabilityInfo() != other.hasViewabilityInfo()) return false; + if (hasViewabilityInfo()) { + if (!getViewabilityInfo().equals(other.getViewabilityInfo())) return false; + } + if (hasMeasurementAllowed() != other.hasMeasurementAllowed()) return false; + if (hasMeasurementAllowed()) { + if (getMeasurementAllowed() != other.getMeasurementAllowed()) return false; + } + if (!getEventSubtypeOneofCase().equals(other.getEventSubtypeOneofCase())) return false; + switch (eventSubtypeOneofCase_) { + case 3: + if (getEventSubtypeValue() != other.getEventSubtypeValue()) return false; + break; + case 4: + if (!getEventSubtypeString().equals(other.getEventSubtypeString())) return false; + break; + case 0: + default: + } + if (!getAdTypeOneofCase().equals(other.getAdTypeOneofCase())) return false; + switch (adTypeOneofCase_) { + case 14: + if (getAdTypeValue() != other.getAdTypeValue()) return false; + break; + case 15: + if (!getAdTypeString().equals(other.getAdTypeString())) return false; + break; + case 0: + default: + } + if (!getAdFormatOneofCase().equals(other.getAdFormatOneofCase())) return false; + switch (adFormatOneofCase_) { + case 16: + if (getAdFormatValue() != other.getAdFormatValue()) return false; + break; + case 17: + if (!getAdFormatString().equals(other.getAdFormatString())) return false; + break; + case 0: + default: + } + if (!getAdPlacementOneofCase().equals(other.getAdPlacementOneofCase())) return false; + switch (adPlacementOneofCase_) { + case 18: + if (getAdPlacementValue() != other.getAdPlacementValue()) return false; + break; + case 19: + if (!getAdPlacementString().equals(other.getAdPlacementString())) return false; + break; + case 0: + default: + } + if (!getTargetingTypeOneofCase().equals(other.getTargetingTypeOneofCase())) return false; + switch (targetingTypeOneofCase_) { + case 25: + if (getTargetingTypeValue() != other.getTargetingTypeValue()) return false; + break; + case 26: + if (!getTargetingTypeString().equals(other.getTargetingTypeString())) return false; + break; + case 0: + default: + } + if (!getPlatformTypeOneofCase().equals(other.getPlatformTypeOneofCase())) return false; + switch (platformTypeOneofCase_) { + case 27: + if (getPlatformTypeValue() != other.getPlatformTypeValue()) return false; + break; + case 28: + if (!getPlatformTypeString().equals(other.getPlatformTypeString())) return false; + break; + case 0: + default: + } + if (!getPlatformOneofCase().equals(other.getPlatformOneofCase())) return false; + switch (platformOneofCase_) { + case 29: + if (getPlatformValue() != other.getPlatformValue()) return false; + break; + case 30: + if (!getPlatformString().equals(other.getPlatformString())) return false; + break; + case 0: + default: + } + 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) + ADVERTISER_ID_FIELD_NUMBER; + hash = (53 * hash) + getAdvertiserId().hashCode(); + hash = (37 * hash) + EVENT_TYPE_FIELD_NUMBER; + hash = (53 * hash) + eventType_; + if (hasTimestamp()) { + hash = (37 * hash) + TIMESTAMP_FIELD_NUMBER; + hash = (53 * hash) + getTimestamp().hashCode(); + } + hash = (37 * hash) + EVENT_ID_FIELD_NUMBER; + hash = (53 * hash) + getEventId().hashCode(); + if (hasUserData()) { + hash = (37 * hash) + USER_DATA_FIELD_NUMBER; + hash = (53 * hash) + getUserData().hashCode(); + } + if (hasDeviceInfo()) { + hash = (37 * hash) + DEVICE_INFO_FIELD_NUMBER; + hash = (53 * hash) + getDeviceInfo().hashCode(); + } + hash = (37 * hash) + MOBILE_DEVICE_ID_FIELD_NUMBER; + hash = (53 * hash) + getMobileDeviceId().hashCode(); + hash = (37 * hash) + CAMPAIGN_ID_FIELD_NUMBER; + hash = (53 * hash) + getCampaignId().hashCode(); + hash = (37 * hash) + CAMPAIGN_NAME_FIELD_NUMBER; + hash = (53 * hash) + getCampaignName().hashCode(); + hash = (37 * hash) + AD_GROUP_ID_FIELD_NUMBER; + hash = (53 * hash) + getAdGroupId().hashCode(); + hash = (37 * hash) + AD_ID_FIELD_NUMBER; + hash = (53 * hash) + getAdId().hashCode(); + hash = (37 * hash) + AD_HEIGHT_FIELD_NUMBER; + hash = (53 * hash) + getAdHeight(); + hash = (37 * hash) + AD_WIDTH_FIELD_NUMBER; + hash = (53 * hash) + getAdWidth(); + hash = (37 * hash) + REGION_CODE_FIELD_NUMBER; + hash = (53 * hash) + getRegionCode().hashCode(); + hash = (37 * hash) + SOURCE_FIELD_NUMBER; + hash = (53 * hash) + getSource().hashCode(); + hash = (37 * hash) + MEDIUM_FIELD_NUMBER; + hash = (53 * hash) + getMedium().hashCode(); + hash = (37 * hash) + ATTRIBUTION_HINT_FIELD_NUMBER; + hash = (53 * hash) + attributionHint_; + if (hasViewabilityInfo()) { + hash = (37 * hash) + VIEWABILITY_INFO_FIELD_NUMBER; + hash = (53 * hash) + getViewabilityInfo().hashCode(); + } + if (hasMeasurementAllowed()) { + hash = (37 * hash) + MEASUREMENT_ALLOWED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getMeasurementAllowed()); + } + switch (eventSubtypeOneofCase_) { + case 3: + hash = (37 * hash) + EVENT_SUBTYPE_FIELD_NUMBER; + hash = (53 * hash) + getEventSubtypeValue(); + break; + case 4: + hash = (37 * hash) + EVENT_SUBTYPE_STRING_FIELD_NUMBER; + hash = (53 * hash) + getEventSubtypeString().hashCode(); + break; + case 0: + default: + } + switch (adTypeOneofCase_) { + case 14: + hash = (37 * hash) + AD_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getAdTypeValue(); + break; + case 15: + hash = (37 * hash) + AD_TYPE_STRING_FIELD_NUMBER; + hash = (53 * hash) + getAdTypeString().hashCode(); + break; + case 0: + default: + } + switch (adFormatOneofCase_) { + case 16: + hash = (37 * hash) + AD_FORMAT_FIELD_NUMBER; + hash = (53 * hash) + getAdFormatValue(); + break; + case 17: + hash = (37 * hash) + AD_FORMAT_STRING_FIELD_NUMBER; + hash = (53 * hash) + getAdFormatString().hashCode(); + break; + case 0: + default: + } + switch (adPlacementOneofCase_) { + case 18: + hash = (37 * hash) + AD_PLACEMENT_FIELD_NUMBER; + hash = (53 * hash) + getAdPlacementValue(); + break; + case 19: + hash = (37 * hash) + AD_PLACEMENT_STRING_FIELD_NUMBER; + hash = (53 * hash) + getAdPlacementString().hashCode(); + break; + case 0: + default: + } + switch (targetingTypeOneofCase_) { + case 25: + hash = (37 * hash) + TARGETING_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getTargetingTypeValue(); + break; + case 26: + hash = (37 * hash) + TARGETING_TYPE_STRING_FIELD_NUMBER; + hash = (53 * hash) + getTargetingTypeString().hashCode(); + break; + case 0: + default: + } + switch (platformTypeOneofCase_) { + case 27: + hash = (37 * hash) + PLATFORM_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getPlatformTypeValue(); + break; + case 28: + hash = (37 * hash) + PLATFORM_TYPE_STRING_FIELD_NUMBER; + hash = (53 * hash) + getPlatformTypeString().hashCode(); + break; + case 0: + default: + } + switch (platformOneofCase_) { + case 29: + hash = (37 * hash) + PLATFORM_FIELD_NUMBER; + hash = (53 * hash) + getPlatformValue(); + break; + case 30: + hash = (37 * hash) + PLATFORM_STRING_FIELD_NUMBER; + hash = (53 * hash) + getPlatformString().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.ads.datamanager.v1.AdEvent parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.ads.datamanager.v1.AdEvent parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.ads.datamanager.v1.AdEvent parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.ads.datamanager.v1.AdEvent 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.ads.datamanager.v1.AdEvent parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.ads.datamanager.v1.AdEvent parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.ads.datamanager.v1.AdEvent parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.ads.datamanager.v1.AdEvent 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.ads.datamanager.v1.AdEvent parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.ads.datamanager.v1.AdEvent 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.ads.datamanager.v1.AdEvent parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.ads.datamanager.v1.AdEvent 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.ads.datamanager.v1.AdEvent 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; + } + + /** + * + * + *
+   * An ad event.
+   * 
+ * + * Protobuf type {@code google.ads.datamanager.v1.AdEvent} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.ads.datamanager.v1.AdEvent) + com.google.ads.datamanager.v1.AdEventOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.ads.datamanager.v1.AdEventProto + .internal_static_google_ads_datamanager_v1_AdEvent_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.ads.datamanager.v1.AdEventProto + .internal_static_google_ads_datamanager_v1_AdEvent_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.ads.datamanager.v1.AdEvent.class, + com.google.ads.datamanager.v1.AdEvent.Builder.class); + } + + // Construct using com.google.ads.datamanager.v1.AdEvent.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetTimestampFieldBuilder(); + internalGetUserDataFieldBuilder(); + internalGetDeviceInfoFieldBuilder(); + internalGetViewabilityInfoFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + bitField1_ = 0; + advertiserId_ = ""; + eventType_ = 0; + timestamp_ = null; + if (timestampBuilder_ != null) { + timestampBuilder_.dispose(); + timestampBuilder_ = null; + } + eventId_ = ""; + userData_ = null; + if (userDataBuilder_ != null) { + userDataBuilder_.dispose(); + userDataBuilder_ = null; + } + deviceInfo_ = null; + if (deviceInfoBuilder_ != null) { + deviceInfoBuilder_.dispose(); + deviceInfoBuilder_ = null; + } + mobileDeviceId_ = ""; + campaignId_ = ""; + campaignName_ = ""; + adGroupId_ = ""; + adId_ = ""; + adHeight_ = 0; + adWidth_ = 0; + regionCode_ = ""; + source_ = ""; + medium_ = ""; + attributionHint_ = 0; + viewabilityInfo_ = null; + if (viewabilityInfoBuilder_ != null) { + viewabilityInfoBuilder_.dispose(); + viewabilityInfoBuilder_ = null; + } + measurementAllowed_ = false; + eventSubtypeOneofCase_ = 0; + eventSubtypeOneof_ = null; + adTypeOneofCase_ = 0; + adTypeOneof_ = null; + adFormatOneofCase_ = 0; + adFormatOneof_ = null; + adPlacementOneofCase_ = 0; + adPlacementOneof_ = null; + targetingTypeOneofCase_ = 0; + targetingTypeOneof_ = null; + platformTypeOneofCase_ = 0; + platformTypeOneof_ = null; + platformOneofCase_ = 0; + platformOneof_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.ads.datamanager.v1.AdEventProto + .internal_static_google_ads_datamanager_v1_AdEvent_descriptor; + } + + @java.lang.Override + public com.google.ads.datamanager.v1.AdEvent getDefaultInstanceForType() { + return com.google.ads.datamanager.v1.AdEvent.getDefaultInstance(); + } + + @java.lang.Override + public com.google.ads.datamanager.v1.AdEvent build() { + com.google.ads.datamanager.v1.AdEvent result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.ads.datamanager.v1.AdEvent buildPartial() { + com.google.ads.datamanager.v1.AdEvent result = + new com.google.ads.datamanager.v1.AdEvent(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + if (bitField1_ != 0) { + buildPartial1(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.ads.datamanager.v1.AdEvent result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.advertiserId_ = advertiserId_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.eventType_ = eventType_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000010) != 0)) { + result.timestamp_ = timestampBuilder_ == null ? timestamp_ : timestampBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.eventId_ = eventId_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.userData_ = userDataBuilder_ == null ? userData_ : userDataBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.deviceInfo_ = deviceInfoBuilder_ == null ? deviceInfo_ : deviceInfoBuilder_.build(); + to_bitField0_ |= 0x00000004; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.mobileDeviceId_ = mobileDeviceId_; + } + if (((from_bitField0_ & 0x00000200) != 0)) { + result.campaignId_ = campaignId_; + } + if (((from_bitField0_ & 0x00000400) != 0)) { + result.campaignName_ = campaignName_; + } + if (((from_bitField0_ & 0x00000800) != 0)) { + result.adGroupId_ = adGroupId_; + } + if (((from_bitField0_ & 0x00001000) != 0)) { + result.adId_ = adId_; + } + if (((from_bitField0_ & 0x00080000) != 0)) { + result.adHeight_ = adHeight_; + } + if (((from_bitField0_ & 0x00100000) != 0)) { + result.adWidth_ = adWidth_; + } + if (((from_bitField0_ & 0x00200000) != 0)) { + result.regionCode_ = regionCode_; + } + if (((from_bitField0_ & 0x00400000) != 0)) { + result.source_ = source_; + } + if (((from_bitField0_ & 0x00800000) != 0)) { + result.medium_ = medium_; + } + if (((from_bitField0_ & 0x40000000) != 0)) { + result.attributionHint_ = attributionHint_; + } + if (((from_bitField0_ & 0x80000000) != 0)) { + result.viewabilityInfo_ = + viewabilityInfoBuilder_ == null ? viewabilityInfo_ : viewabilityInfoBuilder_.build(); + to_bitField0_ |= 0x00000008; + } + result.bitField0_ |= to_bitField0_; + } + + private void buildPartial1(com.google.ads.datamanager.v1.AdEvent result) { + int from_bitField1_ = bitField1_; + int to_bitField0_ = 0; + if (((from_bitField1_ & 0x00000001) != 0)) { + result.measurementAllowed_ = measurementAllowed_; + to_bitField0_ |= 0x00000010; + } + result.bitField0_ |= to_bitField0_; + } + + private void buildPartialOneofs(com.google.ads.datamanager.v1.AdEvent result) { + result.eventSubtypeOneofCase_ = eventSubtypeOneofCase_; + result.eventSubtypeOneof_ = this.eventSubtypeOneof_; + result.adTypeOneofCase_ = adTypeOneofCase_; + result.adTypeOneof_ = this.adTypeOneof_; + result.adFormatOneofCase_ = adFormatOneofCase_; + result.adFormatOneof_ = this.adFormatOneof_; + result.adPlacementOneofCase_ = adPlacementOneofCase_; + result.adPlacementOneof_ = this.adPlacementOneof_; + result.targetingTypeOneofCase_ = targetingTypeOneofCase_; + result.targetingTypeOneof_ = this.targetingTypeOneof_; + result.platformTypeOneofCase_ = platformTypeOneofCase_; + result.platformTypeOneof_ = this.platformTypeOneof_; + result.platformOneofCase_ = platformOneofCase_; + result.platformOneof_ = this.platformOneof_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.ads.datamanager.v1.AdEvent) { + return mergeFrom((com.google.ads.datamanager.v1.AdEvent) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.ads.datamanager.v1.AdEvent other) { + if (other == com.google.ads.datamanager.v1.AdEvent.getDefaultInstance()) return this; + if (!other.getAdvertiserId().isEmpty()) { + advertiserId_ = other.advertiserId_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.eventType_ != 0) { + setEventTypeValue(other.getEventTypeValue()); + } + if (other.hasTimestamp()) { + mergeTimestamp(other.getTimestamp()); + } + if (!other.getEventId().isEmpty()) { + eventId_ = other.eventId_; + bitField0_ |= 0x00000020; + onChanged(); + } + if (other.hasUserData()) { + mergeUserData(other.getUserData()); + } + if (other.hasDeviceInfo()) { + mergeDeviceInfo(other.getDeviceInfo()); + } + if (!other.getMobileDeviceId().isEmpty()) { + mobileDeviceId_ = other.mobileDeviceId_; + bitField0_ |= 0x00000100; + onChanged(); + } + if (!other.getCampaignId().isEmpty()) { + campaignId_ = other.campaignId_; + bitField0_ |= 0x00000200; + onChanged(); + } + if (!other.getCampaignName().isEmpty()) { + campaignName_ = other.campaignName_; + bitField0_ |= 0x00000400; + onChanged(); + } + if (!other.getAdGroupId().isEmpty()) { + adGroupId_ = other.adGroupId_; + bitField0_ |= 0x00000800; + onChanged(); + } + if (!other.getAdId().isEmpty()) { + adId_ = other.adId_; + bitField0_ |= 0x00001000; + onChanged(); + } + if (other.getAdHeight() != 0) { + setAdHeight(other.getAdHeight()); + } + if (other.getAdWidth() != 0) { + setAdWidth(other.getAdWidth()); + } + if (!other.getRegionCode().isEmpty()) { + regionCode_ = other.regionCode_; + bitField0_ |= 0x00200000; + onChanged(); + } + if (!other.getSource().isEmpty()) { + source_ = other.source_; + bitField0_ |= 0x00400000; + onChanged(); + } + if (!other.getMedium().isEmpty()) { + medium_ = other.medium_; + bitField0_ |= 0x00800000; + onChanged(); + } + if (other.attributionHint_ != 0) { + setAttributionHintValue(other.getAttributionHintValue()); + } + if (other.hasViewabilityInfo()) { + mergeViewabilityInfo(other.getViewabilityInfo()); + } + if (other.hasMeasurementAllowed()) { + setMeasurementAllowed(other.getMeasurementAllowed()); + } + switch (other.getEventSubtypeOneofCase()) { + case EVENT_SUBTYPE: + { + setEventSubtypeValue(other.getEventSubtypeValue()); + break; + } + case EVENT_SUBTYPE_STRING: + { + eventSubtypeOneofCase_ = 4; + eventSubtypeOneof_ = other.eventSubtypeOneof_; + onChanged(); + break; + } + case EVENTSUBTYPEONEOF_NOT_SET: + { + break; + } + } + switch (other.getAdTypeOneofCase()) { + case AD_TYPE: + { + setAdTypeValue(other.getAdTypeValue()); + break; + } + case AD_TYPE_STRING: + { + adTypeOneofCase_ = 15; + adTypeOneof_ = other.adTypeOneof_; + onChanged(); + break; + } + case ADTYPEONEOF_NOT_SET: + { + break; + } + } + switch (other.getAdFormatOneofCase()) { + case AD_FORMAT: + { + setAdFormatValue(other.getAdFormatValue()); + break; + } + case AD_FORMAT_STRING: + { + adFormatOneofCase_ = 17; + adFormatOneof_ = other.adFormatOneof_; + onChanged(); + break; + } + case ADFORMATONEOF_NOT_SET: + { + break; + } + } + switch (other.getAdPlacementOneofCase()) { + case AD_PLACEMENT: + { + setAdPlacementValue(other.getAdPlacementValue()); + break; + } + case AD_PLACEMENT_STRING: + { + adPlacementOneofCase_ = 19; + adPlacementOneof_ = other.adPlacementOneof_; + onChanged(); + break; + } + case ADPLACEMENTONEOF_NOT_SET: + { + break; + } + } + switch (other.getTargetingTypeOneofCase()) { + case TARGETING_TYPE: + { + setTargetingTypeValue(other.getTargetingTypeValue()); + break; + } + case TARGETING_TYPE_STRING: + { + targetingTypeOneofCase_ = 26; + targetingTypeOneof_ = other.targetingTypeOneof_; + onChanged(); + break; + } + case TARGETINGTYPEONEOF_NOT_SET: + { + break; + } + } + switch (other.getPlatformTypeOneofCase()) { + case PLATFORM_TYPE: + { + setPlatformTypeValue(other.getPlatformTypeValue()); + break; + } + case PLATFORM_TYPE_STRING: + { + platformTypeOneofCase_ = 28; + platformTypeOneof_ = other.platformTypeOneof_; + onChanged(); + break; + } + case PLATFORMTYPEONEOF_NOT_SET: + { + break; + } + } + switch (other.getPlatformOneofCase()) { + case PLATFORM: + { + setPlatformValue(other.getPlatformValue()); + break; + } + case PLATFORM_STRING: + { + platformOneofCase_ = 30; + platformOneof_ = other.platformOneof_; + onChanged(); + break; + } + case PLATFORMONEOF_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + advertiserId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + eventType_ = input.readEnum(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 24: + { + int rawValue = input.readEnum(); + eventSubtypeOneofCase_ = 3; + eventSubtypeOneof_ = rawValue; + break; + } // case 24 + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + eventSubtypeOneofCase_ = 4; + eventSubtypeOneof_ = s; + break; + } // case 34 + case 42: + { + input.readMessage( + internalGetTimestampFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 50: + { + eventId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 50 + case 58: + { + input.readMessage( + internalGetUserDataFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000040; + break; + } // case 58 + case 66: + { + input.readMessage( + internalGetDeviceInfoFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000080; + break; + } // case 66 + case 74: + { + mobileDeviceId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000100; + break; + } // case 74 + case 82: + { + campaignId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000200; + break; + } // case 82 + case 90: + { + campaignName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000400; + break; + } // case 90 + case 98: + { + adGroupId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000800; + break; + } // case 98 + case 106: + { + adId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00001000; + break; + } // case 106 + case 112: + { + int rawValue = input.readEnum(); + adTypeOneofCase_ = 14; + adTypeOneof_ = rawValue; + break; + } // case 112 + case 122: + { + java.lang.String s = input.readStringRequireUtf8(); + adTypeOneofCase_ = 15; + adTypeOneof_ = s; + break; + } // case 122 + case 128: + { + int rawValue = input.readEnum(); + adFormatOneofCase_ = 16; + adFormatOneof_ = rawValue; + break; + } // case 128 + case 138: + { + java.lang.String s = input.readStringRequireUtf8(); + adFormatOneofCase_ = 17; + adFormatOneof_ = s; + break; + } // case 138 + case 144: + { + int rawValue = input.readEnum(); + adPlacementOneofCase_ = 18; + adPlacementOneof_ = rawValue; + break; + } // case 144 + case 154: + { + java.lang.String s = input.readStringRequireUtf8(); + adPlacementOneofCase_ = 19; + adPlacementOneof_ = s; + break; + } // case 154 + case 160: + { + adHeight_ = input.readInt32(); + bitField0_ |= 0x00080000; + break; + } // case 160 + case 168: + { + adWidth_ = input.readInt32(); + bitField0_ |= 0x00100000; + break; + } // case 168 + case 178: + { + regionCode_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00200000; + break; + } // case 178 + case 186: + { + source_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00400000; + break; + } // case 186 + case 194: + { + medium_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00800000; + break; + } // case 194 + case 200: + { + int rawValue = input.readEnum(); + targetingTypeOneofCase_ = 25; + targetingTypeOneof_ = rawValue; + break; + } // case 200 + case 210: + { + java.lang.String s = input.readStringRequireUtf8(); + targetingTypeOneofCase_ = 26; + targetingTypeOneof_ = s; + break; + } // case 210 + case 216: + { + int rawValue = input.readEnum(); + platformTypeOneofCase_ = 27; + platformTypeOneof_ = rawValue; + break; + } // case 216 + case 226: + { + java.lang.String s = input.readStringRequireUtf8(); + platformTypeOneofCase_ = 28; + platformTypeOneof_ = s; + break; + } // case 226 + case 232: + { + int rawValue = input.readEnum(); + platformOneofCase_ = 29; + platformOneof_ = rawValue; + break; + } // case 232 + case 242: + { + java.lang.String s = input.readStringRequireUtf8(); + platformOneofCase_ = 30; + platformOneof_ = s; + break; + } // case 242 + case 248: + { + attributionHint_ = input.readEnum(); + bitField0_ |= 0x40000000; + break; + } // case 248 + case 258: + { + input.readMessage( + internalGetViewabilityInfoFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x80000000; + break; + } // case 258 + case 264: + { + measurementAllowed_ = input.readBool(); + bitField1_ |= 0x00000001; + break; + } // case 264 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int eventSubtypeOneofCase_ = 0; + private java.lang.Object eventSubtypeOneof_; + + public EventSubtypeOneofCase getEventSubtypeOneofCase() { + return EventSubtypeOneofCase.forNumber(eventSubtypeOneofCase_); + } + + public Builder clearEventSubtypeOneof() { + eventSubtypeOneofCase_ = 0; + eventSubtypeOneof_ = null; + onChanged(); + return this; + } + + private int adTypeOneofCase_ = 0; + private java.lang.Object adTypeOneof_; + + public AdTypeOneofCase getAdTypeOneofCase() { + return AdTypeOneofCase.forNumber(adTypeOneofCase_); + } + + public Builder clearAdTypeOneof() { + adTypeOneofCase_ = 0; + adTypeOneof_ = null; + onChanged(); + return this; + } + + private int adFormatOneofCase_ = 0; + private java.lang.Object adFormatOneof_; + + public AdFormatOneofCase getAdFormatOneofCase() { + return AdFormatOneofCase.forNumber(adFormatOneofCase_); + } + + public Builder clearAdFormatOneof() { + adFormatOneofCase_ = 0; + adFormatOneof_ = null; + onChanged(); + return this; + } + + private int adPlacementOneofCase_ = 0; + private java.lang.Object adPlacementOneof_; + + public AdPlacementOneofCase getAdPlacementOneofCase() { + return AdPlacementOneofCase.forNumber(adPlacementOneofCase_); + } + + public Builder clearAdPlacementOneof() { + adPlacementOneofCase_ = 0; + adPlacementOneof_ = null; + onChanged(); + return this; + } + + private int targetingTypeOneofCase_ = 0; + private java.lang.Object targetingTypeOneof_; + + public TargetingTypeOneofCase getTargetingTypeOneofCase() { + return TargetingTypeOneofCase.forNumber(targetingTypeOneofCase_); + } + + public Builder clearTargetingTypeOneof() { + targetingTypeOneofCase_ = 0; + targetingTypeOneof_ = null; + onChanged(); + return this; + } + + private int platformTypeOneofCase_ = 0; + private java.lang.Object platformTypeOneof_; + + public PlatformTypeOneofCase getPlatformTypeOneofCase() { + return PlatformTypeOneofCase.forNumber(platformTypeOneofCase_); + } + + public Builder clearPlatformTypeOneof() { + platformTypeOneofCase_ = 0; + platformTypeOneof_ = null; + onChanged(); + return this; + } + + private int platformOneofCase_ = 0; + private java.lang.Object platformOneof_; + + public PlatformOneofCase getPlatformOneofCase() { + return PlatformOneofCase.forNumber(platformOneofCase_); + } + + public Builder clearPlatformOneof() { + platformOneofCase_ = 0; + platformOneof_ = null; + onChanged(); + return this; + } + + private int bitField0_; + private int bitField1_; + + private java.lang.Object advertiserId_ = ""; + + /** + * + * + *
+     * Required. The ID of the advertiser for the ad event.
+     *
+     * This must match the ID sent in the linking flow.
+     * 
+ * + * string advertiser_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The advertiserId. + */ + public java.lang.String getAdvertiserId() { + java.lang.Object ref = advertiserId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + advertiserId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. The ID of the advertiser for the ad event.
+     *
+     * This must match the ID sent in the linking flow.
+     * 
+ * + * string advertiser_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for advertiserId. + */ + public com.google.protobuf.ByteString getAdvertiserIdBytes() { + java.lang.Object ref = advertiserId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + advertiserId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. The ID of the advertiser for the ad event.
+     *
+     * This must match the ID sent in the linking flow.
+     * 
+ * + * string advertiser_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The advertiserId to set. + * @return This builder for chaining. + */ + public Builder setAdvertiserId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + advertiserId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The ID of the advertiser for the ad event.
+     *
+     * This must match the ID sent in the linking flow.
+     * 
+ * + * string advertiser_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearAdvertiserId() { + advertiserId_ = getDefaultInstance().getAdvertiserId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The ID of the advertiser for the ad event.
+     *
+     * This must match the ID sent in the linking flow.
+     * 
+ * + * string advertiser_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for advertiserId to set. + * @return This builder for chaining. + */ + public Builder setAdvertiserIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + advertiserId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int eventType_ = 0; + + /** + * + * + *
+     * Required. The type of the event.
+     * 
+ * + * + * .google.ads.datamanager.v1.AdEvent.EventType event_type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for eventType. + */ + @java.lang.Override + public int getEventTypeValue() { + return eventType_; + } + + /** + * + * + *
+     * Required. The type of the event.
+     * 
+ * + * + * .google.ads.datamanager.v1.AdEvent.EventType event_type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The enum numeric value on the wire for eventType to set. + * @return This builder for chaining. + */ + public Builder setEventTypeValue(int value) { + eventType_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The type of the event.
+     * 
+ * + * + * .google.ads.datamanager.v1.AdEvent.EventType event_type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The eventType. + */ + @java.lang.Override + public com.google.ads.datamanager.v1.AdEvent.EventType getEventType() { + com.google.ads.datamanager.v1.AdEvent.EventType result = + com.google.ads.datamanager.v1.AdEvent.EventType.forNumber(eventType_); + return result == null ? com.google.ads.datamanager.v1.AdEvent.EventType.UNRECOGNIZED : result; + } + + /** + * + * + *
+     * Required. The type of the event.
+     * 
+ * + * + * .google.ads.datamanager.v1.AdEvent.EventType event_type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The eventType to set. + * @return This builder for chaining. + */ + public Builder setEventType(com.google.ads.datamanager.v1.AdEvent.EventType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + eventType_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The type of the event.
+     * 
+ * + * + * .google.ads.datamanager.v1.AdEvent.EventType event_type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return This builder for chaining. + */ + public Builder clearEventType() { + bitField0_ = (bitField0_ & ~0x00000002); + eventType_ = 0; + onChanged(); + return this; + } + + /** + * + * + *
+     * Enum value for event subtype.
+     * 
+ * + * .google.ads.datamanager.v1.AdEvent.EventSubtype event_subtype = 3; + * + * @return Whether the eventSubtype field is set. + */ + @java.lang.Override + public boolean hasEventSubtype() { + return eventSubtypeOneofCase_ == 3; + } + + /** + * + * + *
+     * Enum value for event subtype.
+     * 
+ * + * .google.ads.datamanager.v1.AdEvent.EventSubtype event_subtype = 3; + * + * @return The enum numeric value on the wire for eventSubtype. + */ + @java.lang.Override + public int getEventSubtypeValue() { + if (eventSubtypeOneofCase_ == 3) { + return ((java.lang.Integer) eventSubtypeOneof_).intValue(); + } + return 0; + } + + /** + * + * + *
+     * Enum value for event subtype.
+     * 
+ * + * .google.ads.datamanager.v1.AdEvent.EventSubtype event_subtype = 3; + * + * @param value The enum numeric value on the wire for eventSubtype to set. + * @return This builder for chaining. + */ + public Builder setEventSubtypeValue(int value) { + eventSubtypeOneofCase_ = 3; + eventSubtypeOneof_ = value; + onChanged(); + return this; + } + + /** + * + * + *
+     * Enum value for event subtype.
+     * 
+ * + * .google.ads.datamanager.v1.AdEvent.EventSubtype event_subtype = 3; + * + * @return The eventSubtype. + */ + @java.lang.Override + public com.google.ads.datamanager.v1.AdEvent.EventSubtype getEventSubtype() { + if (eventSubtypeOneofCase_ == 3) { + com.google.ads.datamanager.v1.AdEvent.EventSubtype result = + com.google.ads.datamanager.v1.AdEvent.EventSubtype.forNumber( + (java.lang.Integer) eventSubtypeOneof_); + return result == null + ? com.google.ads.datamanager.v1.AdEvent.EventSubtype.UNRECOGNIZED + : result; + } + return com.google.ads.datamanager.v1.AdEvent.EventSubtype.EVENT_SUBTYPE_UNSPECIFIED; + } + + /** + * + * + *
+     * Enum value for event subtype.
+     * 
+ * + * .google.ads.datamanager.v1.AdEvent.EventSubtype event_subtype = 3; + * + * @param value The eventSubtype to set. + * @return This builder for chaining. + */ + public Builder setEventSubtype(com.google.ads.datamanager.v1.AdEvent.EventSubtype value) { + if (value == null) { + throw new NullPointerException(); + } + eventSubtypeOneofCase_ = 3; + eventSubtypeOneof_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+     * Enum value for event subtype.
+     * 
+ * + * .google.ads.datamanager.v1.AdEvent.EventSubtype event_subtype = 3; + * + * @return This builder for chaining. + */ + public Builder clearEventSubtype() { + if (eventSubtypeOneofCase_ == 3) { + eventSubtypeOneofCase_ = 0; + eventSubtypeOneof_ = null; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * String value for event subtype.
+     * 
+ * + * string event_subtype_string = 4; + * + * @return Whether the eventSubtypeString field is set. + */ + @java.lang.Override + public boolean hasEventSubtypeString() { + return eventSubtypeOneofCase_ == 4; + } + + /** + * + * + *
+     * String value for event subtype.
+     * 
+ * + * string event_subtype_string = 4; + * + * @return The eventSubtypeString. + */ + @java.lang.Override + public java.lang.String getEventSubtypeString() { + java.lang.Object ref = ""; + if (eventSubtypeOneofCase_ == 4) { + ref = eventSubtypeOneof_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (eventSubtypeOneofCase_ == 4) { + eventSubtypeOneof_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * String value for event subtype.
+     * 
+ * + * string event_subtype_string = 4; + * + * @return The bytes for eventSubtypeString. + */ + @java.lang.Override + public com.google.protobuf.ByteString getEventSubtypeStringBytes() { + java.lang.Object ref = ""; + if (eventSubtypeOneofCase_ == 4) { + ref = eventSubtypeOneof_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (eventSubtypeOneofCase_ == 4) { + eventSubtypeOneof_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * String value for event subtype.
+     * 
+ * + * string event_subtype_string = 4; + * + * @param value The eventSubtypeString to set. + * @return This builder for chaining. + */ + public Builder setEventSubtypeString(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + eventSubtypeOneofCase_ = 4; + eventSubtypeOneof_ = value; + onChanged(); + return this; + } + + /** + * + * + *
+     * String value for event subtype.
+     * 
+ * + * string event_subtype_string = 4; + * + * @return This builder for chaining. + */ + public Builder clearEventSubtypeString() { + if (eventSubtypeOneofCase_ == 4) { + eventSubtypeOneofCase_ = 0; + eventSubtypeOneof_ = null; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * String value for event subtype.
+     * 
+ * + * string event_subtype_string = 4; + * + * @param value The bytes for eventSubtypeString to set. + * @return This builder for chaining. + */ + public Builder setEventSubtypeStringBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + eventSubtypeOneofCase_ = 4; + eventSubtypeOneof_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp timestamp_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + timestampBuilder_; + + /** + * + * + *
+     * Required. The time the event occurred.
+     * 
+ * + * .google.protobuf.Timestamp timestamp = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the timestamp field is set. + */ + public boolean hasTimestamp() { + return ((bitField0_ & 0x00000010) != 0); + } + + /** + * + * + *
+     * Required. The time the event occurred.
+     * 
+ * + * .google.protobuf.Timestamp timestamp = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The timestamp. + */ + public com.google.protobuf.Timestamp getTimestamp() { + if (timestampBuilder_ == null) { + return timestamp_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : timestamp_; + } else { + return timestampBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Required. The time the event occurred.
+     * 
+ * + * .google.protobuf.Timestamp timestamp = 5 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setTimestamp(com.google.protobuf.Timestamp value) { + if (timestampBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + timestamp_ = value; + } else { + timestampBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The time the event occurred.
+     * 
+ * + * .google.protobuf.Timestamp timestamp = 5 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setTimestamp(com.google.protobuf.Timestamp.Builder builderForValue) { + if (timestampBuilder_ == null) { + timestamp_ = builderForValue.build(); + } else { + timestampBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The time the event occurred.
+     * 
+ * + * .google.protobuf.Timestamp timestamp = 5 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeTimestamp(com.google.protobuf.Timestamp value) { + if (timestampBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) + && timestamp_ != null + && timestamp_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getTimestampBuilder().mergeFrom(value); + } else { + timestamp_ = value; + } + } else { + timestampBuilder_.mergeFrom(value); + } + if (timestamp_ != null) { + bitField0_ |= 0x00000010; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Required. The time the event occurred.
+     * 
+ * + * .google.protobuf.Timestamp timestamp = 5 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearTimestamp() { + bitField0_ = (bitField0_ & ~0x00000010); + timestamp_ = null; + if (timestampBuilder_ != null) { + timestampBuilder_.dispose(); + timestampBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The time the event occurred.
+     * 
+ * + * .google.protobuf.Timestamp timestamp = 5 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.Timestamp.Builder getTimestampBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return internalGetTimestampFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Required. The time the event occurred.
+     * 
+ * + * .google.protobuf.Timestamp timestamp = 5 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.TimestampOrBuilder getTimestampOrBuilder() { + if (timestampBuilder_ != null) { + return timestampBuilder_.getMessageOrBuilder(); + } else { + return timestamp_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : timestamp_; + } + } + + /** + * + * + *
+     * Required. The time the event occurred.
+     * 
+ * + * .google.protobuf.Timestamp timestamp = 5 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + internalGetTimestampFieldBuilder() { + if (timestampBuilder_ == null) { + timestampBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getTimestamp(), getParentForChildren(), isClean()); + timestamp_ = null; + } + return timestampBuilder_; + } + + private java.lang.Object eventId_ = ""; + + /** + * + * + *
+     * Optional. An ID created and managed by the caller that uniquely identifies
+     * this event.
+     *
+     * Required if you want to deduplicate ad events that are included
+     * in multiple requests. Otherwise, this field is optional.
+     * 
+ * + * string event_id = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The eventId. + */ + public java.lang.String getEventId() { + java.lang.Object ref = eventId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + eventId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. An ID created and managed by the caller that uniquely identifies
+     * this event.
+     *
+     * Required if you want to deduplicate ad events that are included
+     * in multiple requests. Otherwise, this field is optional.
+     * 
+ * + * string event_id = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for eventId. + */ + public com.google.protobuf.ByteString getEventIdBytes() { + java.lang.Object ref = eventId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + eventId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. An ID created and managed by the caller that uniquely identifies
+     * this event.
+     *
+     * Required if you want to deduplicate ad events that are included
+     * in multiple requests. Otherwise, this field is optional.
+     * 
+ * + * string event_id = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The eventId to set. + * @return This builder for chaining. + */ + public Builder setEventId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + eventId_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. An ID created and managed by the caller that uniquely identifies
+     * this event.
+     *
+     * Required if you want to deduplicate ad events that are included
+     * in multiple requests. Otherwise, this field is optional.
+     * 
+ * + * string event_id = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearEventId() { + eventId_ = getDefaultInstance().getEventId(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. An ID created and managed by the caller that uniquely identifies
+     * this event.
+     *
+     * Required if you want to deduplicate ad events that are included
+     * in multiple requests. Otherwise, this field is optional.
+     * 
+ * + * string event_id = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for eventId to set. + * @return This builder for chaining. + */ + public Builder setEventIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + eventId_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + private com.google.ads.datamanager.v1.UserData userData_; + private com.google.protobuf.SingleFieldBuilder< + com.google.ads.datamanager.v1.UserData, + com.google.ads.datamanager.v1.UserData.Builder, + com.google.ads.datamanager.v1.UserDataOrBuilder> + userDataBuilder_; + + /** + * + * + *
+     * Optional. Multiple pieces of user-provided data, representing the user the
+     * event is associated with.
+     *
+     * It is possible to provide multiple instances of the same type of data (e.g.
+     * email address). The more data provided, the more likely a match will be
+     * found.
+     * 
+ * + * + * .google.ads.datamanager.v1.UserData user_data = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the userData field is set. + */ + public boolean hasUserData() { + return ((bitField0_ & 0x00000040) != 0); + } + + /** + * + * + *
+     * Optional. Multiple pieces of user-provided data, representing the user the
+     * event is associated with.
+     *
+     * It is possible to provide multiple instances of the same type of data (e.g.
+     * email address). The more data provided, the more likely a match will be
+     * found.
+     * 
+ * + * + * .google.ads.datamanager.v1.UserData user_data = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The userData. + */ + public com.google.ads.datamanager.v1.UserData getUserData() { + if (userDataBuilder_ == null) { + return userData_ == null + ? com.google.ads.datamanager.v1.UserData.getDefaultInstance() + : userData_; + } else { + return userDataBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Optional. Multiple pieces of user-provided data, representing the user the
+     * event is associated with.
+     *
+     * It is possible to provide multiple instances of the same type of data (e.g.
+     * email address). The more data provided, the more likely a match will be
+     * found.
+     * 
+ * + * + * .google.ads.datamanager.v1.UserData user_data = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setUserData(com.google.ads.datamanager.v1.UserData value) { + if (userDataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + userData_ = value; + } else { + userDataBuilder_.setMessage(value); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Multiple pieces of user-provided data, representing the user the
+     * event is associated with.
+     *
+     * It is possible to provide multiple instances of the same type of data (e.g.
+     * email address). The more data provided, the more likely a match will be
+     * found.
+     * 
+ * + * + * .google.ads.datamanager.v1.UserData user_data = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setUserData(com.google.ads.datamanager.v1.UserData.Builder builderForValue) { + if (userDataBuilder_ == null) { + userData_ = builderForValue.build(); + } else { + userDataBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Multiple pieces of user-provided data, representing the user the
+     * event is associated with.
+     *
+     * It is possible to provide multiple instances of the same type of data (e.g.
+     * email address). The more data provided, the more likely a match will be
+     * found.
+     * 
+ * + * + * .google.ads.datamanager.v1.UserData user_data = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeUserData(com.google.ads.datamanager.v1.UserData value) { + if (userDataBuilder_ == null) { + if (((bitField0_ & 0x00000040) != 0) + && userData_ != null + && userData_ != com.google.ads.datamanager.v1.UserData.getDefaultInstance()) { + getUserDataBuilder().mergeFrom(value); + } else { + userData_ = value; + } + } else { + userDataBuilder_.mergeFrom(value); + } + if (userData_ != null) { + bitField0_ |= 0x00000040; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Optional. Multiple pieces of user-provided data, representing the user the
+     * event is associated with.
+     *
+     * It is possible to provide multiple instances of the same type of data (e.g.
+     * email address). The more data provided, the more likely a match will be
+     * found.
+     * 
+ * + * + * .google.ads.datamanager.v1.UserData user_data = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearUserData() { + bitField0_ = (bitField0_ & ~0x00000040); + userData_ = null; + if (userDataBuilder_ != null) { + userDataBuilder_.dispose(); + userDataBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Multiple pieces of user-provided data, representing the user the
+     * event is associated with.
+     *
+     * It is possible to provide multiple instances of the same type of data (e.g.
+     * email address). The more data provided, the more likely a match will be
+     * found.
+     * 
+ * + * + * .google.ads.datamanager.v1.UserData user_data = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.ads.datamanager.v1.UserData.Builder getUserDataBuilder() { + bitField0_ |= 0x00000040; + onChanged(); + return internalGetUserDataFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. Multiple pieces of user-provided data, representing the user the
+     * event is associated with.
+     *
+     * It is possible to provide multiple instances of the same type of data (e.g.
+     * email address). The more data provided, the more likely a match will be
+     * found.
+     * 
+ * + * + * .google.ads.datamanager.v1.UserData user_data = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.ads.datamanager.v1.UserDataOrBuilder getUserDataOrBuilder() { + if (userDataBuilder_ != null) { + return userDataBuilder_.getMessageOrBuilder(); + } else { + return userData_ == null + ? com.google.ads.datamanager.v1.UserData.getDefaultInstance() + : userData_; + } + } + + /** + * + * + *
+     * Optional. Multiple pieces of user-provided data, representing the user the
+     * event is associated with.
+     *
+     * It is possible to provide multiple instances of the same type of data (e.g.
+     * email address). The more data provided, the more likely a match will be
+     * found.
+     * 
+ * + * + * .google.ads.datamanager.v1.UserData user_data = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.ads.datamanager.v1.UserData, + com.google.ads.datamanager.v1.UserData.Builder, + com.google.ads.datamanager.v1.UserDataOrBuilder> + internalGetUserDataFieldBuilder() { + if (userDataBuilder_ == null) { + userDataBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.ads.datamanager.v1.UserData, + com.google.ads.datamanager.v1.UserData.Builder, + com.google.ads.datamanager.v1.UserDataOrBuilder>( + getUserData(), getParentForChildren(), isClean()); + userData_ = null; + } + return userDataBuilder_; + } + + private com.google.ads.datamanager.v1.DeviceInfo deviceInfo_; + private com.google.protobuf.SingleFieldBuilder< + com.google.ads.datamanager.v1.DeviceInfo, + com.google.ads.datamanager.v1.DeviceInfo.Builder, + com.google.ads.datamanager.v1.DeviceInfoOrBuilder> + deviceInfoBuilder_; + + /** + * + * + *
+     * Optional. Information gathered about the device being used when the ad
+     * event happened.
+     * 
+ * + * + * .google.ads.datamanager.v1.DeviceInfo device_info = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the deviceInfo field is set. + */ + public boolean hasDeviceInfo() { + return ((bitField0_ & 0x00000080) != 0); + } + + /** + * + * + *
+     * Optional. Information gathered about the device being used when the ad
+     * event happened.
+     * 
+ * + * + * .google.ads.datamanager.v1.DeviceInfo device_info = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The deviceInfo. + */ + public com.google.ads.datamanager.v1.DeviceInfo getDeviceInfo() { + if (deviceInfoBuilder_ == null) { + return deviceInfo_ == null + ? com.google.ads.datamanager.v1.DeviceInfo.getDefaultInstance() + : deviceInfo_; + } else { + return deviceInfoBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Optional. Information gathered about the device being used when the ad
+     * event happened.
+     * 
+ * + * + * .google.ads.datamanager.v1.DeviceInfo device_info = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setDeviceInfo(com.google.ads.datamanager.v1.DeviceInfo value) { + if (deviceInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + deviceInfo_ = value; + } else { + deviceInfoBuilder_.setMessage(value); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Information gathered about the device being used when the ad
+     * event happened.
+     * 
+ * + * + * .google.ads.datamanager.v1.DeviceInfo device_info = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setDeviceInfo(com.google.ads.datamanager.v1.DeviceInfo.Builder builderForValue) { + if (deviceInfoBuilder_ == null) { + deviceInfo_ = builderForValue.build(); + } else { + deviceInfoBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Information gathered about the device being used when the ad
+     * event happened.
+     * 
+ * + * + * .google.ads.datamanager.v1.DeviceInfo device_info = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeDeviceInfo(com.google.ads.datamanager.v1.DeviceInfo value) { + if (deviceInfoBuilder_ == null) { + if (((bitField0_ & 0x00000080) != 0) + && deviceInfo_ != null + && deviceInfo_ != com.google.ads.datamanager.v1.DeviceInfo.getDefaultInstance()) { + getDeviceInfoBuilder().mergeFrom(value); + } else { + deviceInfo_ = value; + } + } else { + deviceInfoBuilder_.mergeFrom(value); + } + if (deviceInfo_ != null) { + bitField0_ |= 0x00000080; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Optional. Information gathered about the device being used when the ad
+     * event happened.
+     * 
+ * + * + * .google.ads.datamanager.v1.DeviceInfo device_info = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearDeviceInfo() { + bitField0_ = (bitField0_ & ~0x00000080); + deviceInfo_ = null; + if (deviceInfoBuilder_ != null) { + deviceInfoBuilder_.dispose(); + deviceInfoBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Information gathered about the device being used when the ad
+     * event happened.
+     * 
+ * + * + * .google.ads.datamanager.v1.DeviceInfo device_info = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.ads.datamanager.v1.DeviceInfo.Builder getDeviceInfoBuilder() { + bitField0_ |= 0x00000080; + onChanged(); + return internalGetDeviceInfoFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. Information gathered about the device being used when the ad
+     * event happened.
+     * 
+ * + * + * .google.ads.datamanager.v1.DeviceInfo device_info = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.ads.datamanager.v1.DeviceInfoOrBuilder getDeviceInfoOrBuilder() { + if (deviceInfoBuilder_ != null) { + return deviceInfoBuilder_.getMessageOrBuilder(); + } else { + return deviceInfo_ == null + ? com.google.ads.datamanager.v1.DeviceInfo.getDefaultInstance() + : deviceInfo_; + } + } + + /** + * + * + *
+     * Optional. Information gathered about the device being used when the ad
+     * event happened.
+     * 
+ * + * + * .google.ads.datamanager.v1.DeviceInfo device_info = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.ads.datamanager.v1.DeviceInfo, + com.google.ads.datamanager.v1.DeviceInfo.Builder, + com.google.ads.datamanager.v1.DeviceInfoOrBuilder> + internalGetDeviceInfoFieldBuilder() { + if (deviceInfoBuilder_ == null) { + deviceInfoBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.ads.datamanager.v1.DeviceInfo, + com.google.ads.datamanager.v1.DeviceInfo.Builder, + com.google.ads.datamanager.v1.DeviceInfoOrBuilder>( + getDeviceInfo(), getParentForChildren(), isClean()); + deviceInfo_ = null; + } + return deviceInfoBuilder_; + } + + private java.lang.Object mobileDeviceId_ = ""; + + /** + * + * + *
+     * Optional. The device ID of the device that the ad was served to.
+     * 
+ * + * string mobile_device_id = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The mobileDeviceId. + */ + public java.lang.String getMobileDeviceId() { + java.lang.Object ref = mobileDeviceId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + mobileDeviceId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. The device ID of the device that the ad was served to.
+     * 
+ * + * string mobile_device_id = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for mobileDeviceId. + */ + public com.google.protobuf.ByteString getMobileDeviceIdBytes() { + java.lang.Object ref = mobileDeviceId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + mobileDeviceId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. The device ID of the device that the ad was served to.
+     * 
+ * + * string mobile_device_id = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The mobileDeviceId to set. + * @return This builder for chaining. + */ + public Builder setMobileDeviceId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + mobileDeviceId_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The device ID of the device that the ad was served to.
+     * 
+ * + * string mobile_device_id = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearMobileDeviceId() { + mobileDeviceId_ = getDefaultInstance().getMobileDeviceId(); + bitField0_ = (bitField0_ & ~0x00000100); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The device ID of the device that the ad was served to.
+     * 
+ * + * string mobile_device_id = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for mobileDeviceId to set. + * @return This builder for chaining. + */ + public Builder setMobileDeviceIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + mobileDeviceId_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + + private java.lang.Object campaignId_ = ""; + + /** + * + * + *
+     * Required. The ID of the associated campaign.
+     * 
+ * + * string campaign_id = 10 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The campaignId. + */ + public java.lang.String getCampaignId() { + java.lang.Object ref = campaignId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + campaignId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. The ID of the associated campaign.
+     * 
+ * + * string campaign_id = 10 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for campaignId. + */ + public com.google.protobuf.ByteString getCampaignIdBytes() { + java.lang.Object ref = campaignId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + campaignId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. The ID of the associated campaign.
+     * 
+ * + * string campaign_id = 10 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The campaignId to set. + * @return This builder for chaining. + */ + public Builder setCampaignId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + campaignId_ = value; + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The ID of the associated campaign.
+     * 
+ * + * string campaign_id = 10 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearCampaignId() { + campaignId_ = getDefaultInstance().getCampaignId(); + bitField0_ = (bitField0_ & ~0x00000200); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The ID of the associated campaign.
+     * 
+ * + * string campaign_id = 10 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for campaignId to set. + * @return This builder for chaining. + */ + public Builder setCampaignIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + campaignId_ = value; + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + + private java.lang.Object campaignName_ = ""; + + /** + * + * + *
+     * Required. The name of the associated campaign.
+     * 
+ * + * string campaign_name = 11 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The campaignName. + */ + public java.lang.String getCampaignName() { + java.lang.Object ref = campaignName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + campaignName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. The name of the associated campaign.
+     * 
+ * + * string campaign_name = 11 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for campaignName. + */ + public com.google.protobuf.ByteString getCampaignNameBytes() { + java.lang.Object ref = campaignName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + campaignName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. The name of the associated campaign.
+     * 
+ * + * string campaign_name = 11 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The campaignName to set. + * @return This builder for chaining. + */ + public Builder setCampaignName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + campaignName_ = value; + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The name of the associated campaign.
+     * 
+ * + * string campaign_name = 11 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearCampaignName() { + campaignName_ = getDefaultInstance().getCampaignName(); + bitField0_ = (bitField0_ & ~0x00000400); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The name of the associated campaign.
+     * 
+ * + * string campaign_name = 11 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for campaignName to set. + * @return This builder for chaining. + */ + public Builder setCampaignNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + campaignName_ = value; + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + + private java.lang.Object adGroupId_ = ""; + + /** + * + * + *
+     * Optional. The ID of the associated ad group.
+     * 
+ * + * string ad_group_id = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The adGroupId. + */ + public java.lang.String getAdGroupId() { + java.lang.Object ref = adGroupId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + adGroupId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. The ID of the associated ad group.
+     * 
+ * + * string ad_group_id = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for adGroupId. + */ + public com.google.protobuf.ByteString getAdGroupIdBytes() { + java.lang.Object ref = adGroupId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + adGroupId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. The ID of the associated ad group.
+     * 
+ * + * string ad_group_id = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The adGroupId to set. + * @return This builder for chaining. + */ + public Builder setAdGroupId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + adGroupId_ = value; + bitField0_ |= 0x00000800; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The ID of the associated ad group.
+     * 
+ * + * string ad_group_id = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearAdGroupId() { + adGroupId_ = getDefaultInstance().getAdGroupId(); + bitField0_ = (bitField0_ & ~0x00000800); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The ID of the associated ad group.
+     * 
+ * + * string ad_group_id = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for adGroupId to set. + * @return This builder for chaining. + */ + public Builder setAdGroupIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + adGroupId_ = value; + bitField0_ |= 0x00000800; + onChanged(); + return this; + } + + private java.lang.Object adId_ = ""; + + /** + * + * + *
+     * Optional. The ID of the associated ad within the group.
+     * 
+ * + * string ad_id = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The adId. + */ + public java.lang.String getAdId() { + java.lang.Object ref = adId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + adId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. The ID of the associated ad within the group.
+     * 
+ * + * string ad_id = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for adId. + */ + public com.google.protobuf.ByteString getAdIdBytes() { + java.lang.Object ref = adId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + adId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. The ID of the associated ad within the group.
+     * 
+ * + * string ad_id = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The adId to set. + * @return This builder for chaining. + */ + public Builder setAdId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + adId_ = value; + bitField0_ |= 0x00001000; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The ID of the associated ad within the group.
+     * 
+ * + * string ad_id = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearAdId() { + adId_ = getDefaultInstance().getAdId(); + bitField0_ = (bitField0_ & ~0x00001000); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The ID of the associated ad within the group.
+     * 
+ * + * string ad_id = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for adId to set. + * @return This builder for chaining. + */ + public Builder setAdIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + adId_ = value; + bitField0_ |= 0x00001000; + onChanged(); + return this; + } + + /** + * + * + *
+     * Enum value for ad type.
+     * 
+ * + * .google.ads.datamanager.v1.AdType ad_type = 14; + * + * @return Whether the adType field is set. + */ + @java.lang.Override + public boolean hasAdType() { + return adTypeOneofCase_ == 14; + } + + /** + * + * + *
+     * Enum value for ad type.
+     * 
+ * + * .google.ads.datamanager.v1.AdType ad_type = 14; + * + * @return The enum numeric value on the wire for adType. + */ + @java.lang.Override + public int getAdTypeValue() { + if (adTypeOneofCase_ == 14) { + return ((java.lang.Integer) adTypeOneof_).intValue(); + } + return 0; + } + + /** + * + * + *
+     * Enum value for ad type.
+     * 
+ * + * .google.ads.datamanager.v1.AdType ad_type = 14; + * + * @param value The enum numeric value on the wire for adType to set. + * @return This builder for chaining. + */ + public Builder setAdTypeValue(int value) { + adTypeOneofCase_ = 14; + adTypeOneof_ = value; + onChanged(); + return this; + } + + /** + * + * + *
+     * Enum value for ad type.
+     * 
+ * + * .google.ads.datamanager.v1.AdType ad_type = 14; + * + * @return The adType. + */ + @java.lang.Override + public com.google.ads.datamanager.v1.AdType getAdType() { + if (adTypeOneofCase_ == 14) { + com.google.ads.datamanager.v1.AdType result = + com.google.ads.datamanager.v1.AdType.forNumber((java.lang.Integer) adTypeOneof_); + return result == null ? com.google.ads.datamanager.v1.AdType.UNRECOGNIZED : result; + } + return com.google.ads.datamanager.v1.AdType.AD_TYPE_UNSPECIFIED; + } + + /** + * + * + *
+     * Enum value for ad type.
+     * 
+ * + * .google.ads.datamanager.v1.AdType ad_type = 14; + * + * @param value The adType to set. + * @return This builder for chaining. + */ + public Builder setAdType(com.google.ads.datamanager.v1.AdType value) { + if (value == null) { + throw new NullPointerException(); + } + adTypeOneofCase_ = 14; + adTypeOneof_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+     * Enum value for ad type.
+     * 
+ * + * .google.ads.datamanager.v1.AdType ad_type = 14; + * + * @return This builder for chaining. + */ + public Builder clearAdType() { + if (adTypeOneofCase_ == 14) { + adTypeOneofCase_ = 0; + adTypeOneof_ = null; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * String value for ad type.
+     * 
+ * + * string ad_type_string = 15; + * + * @return Whether the adTypeString field is set. + */ + @java.lang.Override + public boolean hasAdTypeString() { + return adTypeOneofCase_ == 15; + } + + /** + * + * + *
+     * String value for ad type.
+     * 
+ * + * string ad_type_string = 15; + * + * @return The adTypeString. + */ + @java.lang.Override + public java.lang.String getAdTypeString() { + java.lang.Object ref = ""; + if (adTypeOneofCase_ == 15) { + ref = adTypeOneof_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (adTypeOneofCase_ == 15) { + adTypeOneof_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * String value for ad type.
+     * 
+ * + * string ad_type_string = 15; + * + * @return The bytes for adTypeString. + */ + @java.lang.Override + public com.google.protobuf.ByteString getAdTypeStringBytes() { + java.lang.Object ref = ""; + if (adTypeOneofCase_ == 15) { + ref = adTypeOneof_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (adTypeOneofCase_ == 15) { + adTypeOneof_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * String value for ad type.
+     * 
+ * + * string ad_type_string = 15; + * + * @param value The adTypeString to set. + * @return This builder for chaining. + */ + public Builder setAdTypeString(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + adTypeOneofCase_ = 15; + adTypeOneof_ = value; + onChanged(); + return this; + } + + /** + * + * + *
+     * String value for ad type.
+     * 
+ * + * string ad_type_string = 15; + * + * @return This builder for chaining. + */ + public Builder clearAdTypeString() { + if (adTypeOneofCase_ == 15) { + adTypeOneofCase_ = 0; + adTypeOneof_ = null; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * String value for ad type.
+     * 
+ * + * string ad_type_string = 15; + * + * @param value The bytes for adTypeString to set. + * @return This builder for chaining. + */ + public Builder setAdTypeStringBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + adTypeOneofCase_ = 15; + adTypeOneof_ = value; + onChanged(); + return this; + } + + /** + * + * + *
+     * Enum value for ad format.
+     * 
+ * + * .google.ads.datamanager.v1.AdFormat ad_format = 16; + * + * @return Whether the adFormat field is set. + */ + @java.lang.Override + public boolean hasAdFormat() { + return adFormatOneofCase_ == 16; + } + + /** + * + * + *
+     * Enum value for ad format.
+     * 
+ * + * .google.ads.datamanager.v1.AdFormat ad_format = 16; + * + * @return The enum numeric value on the wire for adFormat. + */ + @java.lang.Override + public int getAdFormatValue() { + if (adFormatOneofCase_ == 16) { + return ((java.lang.Integer) adFormatOneof_).intValue(); + } + return 0; + } + + /** + * + * + *
+     * Enum value for ad format.
+     * 
+ * + * .google.ads.datamanager.v1.AdFormat ad_format = 16; + * + * @param value The enum numeric value on the wire for adFormat to set. + * @return This builder for chaining. + */ + public Builder setAdFormatValue(int value) { + adFormatOneofCase_ = 16; + adFormatOneof_ = value; + onChanged(); + return this; + } + + /** + * + * + *
+     * Enum value for ad format.
+     * 
+ * + * .google.ads.datamanager.v1.AdFormat ad_format = 16; + * + * @return The adFormat. + */ + @java.lang.Override + public com.google.ads.datamanager.v1.AdFormat getAdFormat() { + if (adFormatOneofCase_ == 16) { + com.google.ads.datamanager.v1.AdFormat result = + com.google.ads.datamanager.v1.AdFormat.forNumber((java.lang.Integer) adFormatOneof_); + return result == null ? com.google.ads.datamanager.v1.AdFormat.UNRECOGNIZED : result; + } + return com.google.ads.datamanager.v1.AdFormat.AD_FORMAT_UNSPECIFIED; + } + + /** + * + * + *
+     * Enum value for ad format.
+     * 
+ * + * .google.ads.datamanager.v1.AdFormat ad_format = 16; + * + * @param value The adFormat to set. + * @return This builder for chaining. + */ + public Builder setAdFormat(com.google.ads.datamanager.v1.AdFormat value) { + if (value == null) { + throw new NullPointerException(); + } + adFormatOneofCase_ = 16; + adFormatOneof_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+     * Enum value for ad format.
+     * 
+ * + * .google.ads.datamanager.v1.AdFormat ad_format = 16; + * + * @return This builder for chaining. + */ + public Builder clearAdFormat() { + if (adFormatOneofCase_ == 16) { + adFormatOneofCase_ = 0; + adFormatOneof_ = null; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * String value for ad format.
+     * 
+ * + * string ad_format_string = 17; + * + * @return Whether the adFormatString field is set. + */ + @java.lang.Override + public boolean hasAdFormatString() { + return adFormatOneofCase_ == 17; + } + + /** + * + * + *
+     * String value for ad format.
+     * 
+ * + * string ad_format_string = 17; + * + * @return The adFormatString. + */ + @java.lang.Override + public java.lang.String getAdFormatString() { + java.lang.Object ref = ""; + if (adFormatOneofCase_ == 17) { + ref = adFormatOneof_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (adFormatOneofCase_ == 17) { + adFormatOneof_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * String value for ad format.
+     * 
+ * + * string ad_format_string = 17; + * + * @return The bytes for adFormatString. + */ + @java.lang.Override + public com.google.protobuf.ByteString getAdFormatStringBytes() { + java.lang.Object ref = ""; + if (adFormatOneofCase_ == 17) { + ref = adFormatOneof_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (adFormatOneofCase_ == 17) { + adFormatOneof_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * String value for ad format.
+     * 
+ * + * string ad_format_string = 17; + * + * @param value The adFormatString to set. + * @return This builder for chaining. + */ + public Builder setAdFormatString(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + adFormatOneofCase_ = 17; + adFormatOneof_ = value; + onChanged(); + return this; + } + + /** + * + * + *
+     * String value for ad format.
+     * 
+ * + * string ad_format_string = 17; + * + * @return This builder for chaining. + */ + public Builder clearAdFormatString() { + if (adFormatOneofCase_ == 17) { + adFormatOneofCase_ = 0; + adFormatOneof_ = null; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * String value for ad format.
+     * 
+ * + * string ad_format_string = 17; + * + * @param value The bytes for adFormatString to set. + * @return This builder for chaining. + */ + public Builder setAdFormatStringBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + adFormatOneofCase_ = 17; + adFormatOneof_ = value; + onChanged(); + return this; + } + + /** + * + * + *
+     * Enum value for ad placement.
+     * 
+ * + * .google.ads.datamanager.v1.AdPlacement ad_placement = 18; + * + * @return Whether the adPlacement field is set. + */ + @java.lang.Override + public boolean hasAdPlacement() { + return adPlacementOneofCase_ == 18; + } + + /** + * + * + *
+     * Enum value for ad placement.
+     * 
+ * + * .google.ads.datamanager.v1.AdPlacement ad_placement = 18; + * + * @return The enum numeric value on the wire for adPlacement. + */ + @java.lang.Override + public int getAdPlacementValue() { + if (adPlacementOneofCase_ == 18) { + return ((java.lang.Integer) adPlacementOneof_).intValue(); + } + return 0; + } + + /** + * + * + *
+     * Enum value for ad placement.
+     * 
+ * + * .google.ads.datamanager.v1.AdPlacement ad_placement = 18; + * + * @param value The enum numeric value on the wire for adPlacement to set. + * @return This builder for chaining. + */ + public Builder setAdPlacementValue(int value) { + adPlacementOneofCase_ = 18; + adPlacementOneof_ = value; + onChanged(); + return this; + } + + /** + * + * + *
+     * Enum value for ad placement.
+     * 
+ * + * .google.ads.datamanager.v1.AdPlacement ad_placement = 18; + * + * @return The adPlacement. + */ + @java.lang.Override + public com.google.ads.datamanager.v1.AdPlacement getAdPlacement() { + if (adPlacementOneofCase_ == 18) { + com.google.ads.datamanager.v1.AdPlacement result = + com.google.ads.datamanager.v1.AdPlacement.forNumber( + (java.lang.Integer) adPlacementOneof_); + return result == null ? com.google.ads.datamanager.v1.AdPlacement.UNRECOGNIZED : result; + } + return com.google.ads.datamanager.v1.AdPlacement.AD_PLACEMENT_UNSPECIFIED; + } + + /** + * + * + *
+     * Enum value for ad placement.
+     * 
+ * + * .google.ads.datamanager.v1.AdPlacement ad_placement = 18; + * + * @param value The adPlacement to set. + * @return This builder for chaining. + */ + public Builder setAdPlacement(com.google.ads.datamanager.v1.AdPlacement value) { + if (value == null) { + throw new NullPointerException(); + } + adPlacementOneofCase_ = 18; + adPlacementOneof_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+     * Enum value for ad placement.
+     * 
+ * + * .google.ads.datamanager.v1.AdPlacement ad_placement = 18; + * + * @return This builder for chaining. + */ + public Builder clearAdPlacement() { + if (adPlacementOneofCase_ == 18) { + adPlacementOneofCase_ = 0; + adPlacementOneof_ = null; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * String value for ad placement.
+     * 
+ * + * string ad_placement_string = 19; + * + * @return Whether the adPlacementString field is set. + */ + @java.lang.Override + public boolean hasAdPlacementString() { + return adPlacementOneofCase_ == 19; + } + + /** + * + * + *
+     * String value for ad placement.
+     * 
+ * + * string ad_placement_string = 19; + * + * @return The adPlacementString. + */ + @java.lang.Override + public java.lang.String getAdPlacementString() { + java.lang.Object ref = ""; + if (adPlacementOneofCase_ == 19) { + ref = adPlacementOneof_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (adPlacementOneofCase_ == 19) { + adPlacementOneof_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * String value for ad placement.
+     * 
+ * + * string ad_placement_string = 19; + * + * @return The bytes for adPlacementString. + */ + @java.lang.Override + public com.google.protobuf.ByteString getAdPlacementStringBytes() { + java.lang.Object ref = ""; + if (adPlacementOneofCase_ == 19) { + ref = adPlacementOneof_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (adPlacementOneofCase_ == 19) { + adPlacementOneof_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * String value for ad placement.
+     * 
+ * + * string ad_placement_string = 19; + * + * @param value The adPlacementString to set. + * @return This builder for chaining. + */ + public Builder setAdPlacementString(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + adPlacementOneofCase_ = 19; + adPlacementOneof_ = value; + onChanged(); + return this; + } + + /** + * + * + *
+     * String value for ad placement.
+     * 
+ * + * string ad_placement_string = 19; + * + * @return This builder for chaining. + */ + public Builder clearAdPlacementString() { + if (adPlacementOneofCase_ == 19) { + adPlacementOneofCase_ = 0; + adPlacementOneof_ = null; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * String value for ad placement.
+     * 
+ * + * string ad_placement_string = 19; + * + * @param value The bytes for adPlacementString to set. + * @return This builder for chaining. + */ + public Builder setAdPlacementStringBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + adPlacementOneofCase_ = 19; + adPlacementOneof_ = value; + onChanged(); + return this; + } + + private int adHeight_; + + /** + * + * + *
+     * Optional. The height of the ad in pixels.
+     * 
+ * + * int32 ad_height = 20 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The adHeight. + */ + @java.lang.Override + public int getAdHeight() { + return adHeight_; + } + + /** + * + * + *
+     * Optional. The height of the ad in pixels.
+     * 
+ * + * int32 ad_height = 20 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The adHeight to set. + * @return This builder for chaining. + */ + public Builder setAdHeight(int value) { + + adHeight_ = value; + bitField0_ |= 0x00080000; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The height of the ad in pixels.
+     * 
+ * + * int32 ad_height = 20 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearAdHeight() { + bitField0_ = (bitField0_ & ~0x00080000); + adHeight_ = 0; + onChanged(); + return this; + } + + private int adWidth_; + + /** + * + * + *
+     * Optional. The width of the ad in pixels.
+     * 
+ * + * int32 ad_width = 21 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The adWidth. + */ + @java.lang.Override + public int getAdWidth() { + return adWidth_; + } + + /** + * + * + *
+     * Optional. The width of the ad in pixels.
+     * 
+ * + * int32 ad_width = 21 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The adWidth to set. + * @return This builder for chaining. + */ + public Builder setAdWidth(int value) { + + adWidth_ = value; + bitField0_ |= 0x00100000; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The width of the ad in pixels.
+     * 
+ * + * int32 ad_width = 21 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearAdWidth() { + bitField0_ = (bitField0_ & ~0x00100000); + adWidth_ = 0; + onChanged(); + return this; + } + + private java.lang.Object regionCode_ = ""; + + /** + * + * + *
+     * Required. The ISO 3166-2 country plus subdivision.
+     * 
+ * + * string region_code = 22 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The regionCode. + */ + public java.lang.String getRegionCode() { + java.lang.Object ref = regionCode_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + regionCode_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. The ISO 3166-2 country plus subdivision.
+     * 
+ * + * string region_code = 22 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for regionCode. + */ + public com.google.protobuf.ByteString getRegionCodeBytes() { + java.lang.Object ref = regionCode_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + regionCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. The ISO 3166-2 country plus subdivision.
+     * 
+ * + * string region_code = 22 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The regionCode to set. + * @return This builder for chaining. + */ + public Builder setRegionCode(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + regionCode_ = value; + bitField0_ |= 0x00200000; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The ISO 3166-2 country plus subdivision.
+     * 
+ * + * string region_code = 22 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearRegionCode() { + regionCode_ = getDefaultInstance().getRegionCode(); + bitField0_ = (bitField0_ & ~0x00200000); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The ISO 3166-2 country plus subdivision.
+     * 
+ * + * string region_code = 22 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for regionCode to set. + * @return This builder for chaining. + */ + public Builder setRegionCodeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + regionCode_ = value; + bitField0_ |= 0x00200000; + onChanged(); + return this; + } + + private java.lang.Object source_ = ""; + + /** + * + * + *
+     * Required. The platform source of the ad, akin to the Google Analytics
+     * source.
+     * 
+ * + * string source = 23 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The source. + */ + public java.lang.String getSource() { + java.lang.Object ref = source_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + source_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. The platform source of the ad, akin to the Google Analytics
+     * source.
+     * 
+ * + * string source = 23 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for source. + */ + public com.google.protobuf.ByteString getSourceBytes() { + java.lang.Object ref = source_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + source_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. The platform source of the ad, akin to the Google Analytics
+     * source.
+     * 
+ * + * string source = 23 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The source to set. + * @return This builder for chaining. + */ + public Builder setSource(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + source_ = value; + bitField0_ |= 0x00400000; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The platform source of the ad, akin to the Google Analytics
+     * source.
+     * 
+ * + * string source = 23 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearSource() { + source_ = getDefaultInstance().getSource(); + bitField0_ = (bitField0_ & ~0x00400000); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The platform source of the ad, akin to the Google Analytics
+     * source.
+     * 
+ * + * string source = 23 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for source to set. + * @return This builder for chaining. + */ + public Builder setSourceBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + source_ = value; + bitField0_ |= 0x00400000; + onChanged(); + return this; + } + + private java.lang.Object medium_ = ""; + + /** + * + * + *
+     * Required. The medium of the ad, akin to the Google Analytics medium.
+     * 
+ * + * string medium = 24 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The medium. + */ + public java.lang.String getMedium() { + java.lang.Object ref = medium_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + medium_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. The medium of the ad, akin to the Google Analytics medium.
+     * 
+ * + * string medium = 24 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for medium. + */ + public com.google.protobuf.ByteString getMediumBytes() { + java.lang.Object ref = medium_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + medium_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. The medium of the ad, akin to the Google Analytics medium.
+     * 
+ * + * string medium = 24 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The medium to set. + * @return This builder for chaining. + */ + public Builder setMedium(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + medium_ = value; + bitField0_ |= 0x00800000; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The medium of the ad, akin to the Google Analytics medium.
+     * 
+ * + * string medium = 24 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearMedium() { + medium_ = getDefaultInstance().getMedium(); + bitField0_ = (bitField0_ & ~0x00800000); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The medium of the ad, akin to the Google Analytics medium.
+     * 
+ * + * string medium = 24 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for medium to set. + * @return This builder for chaining. + */ + public Builder setMediumBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + medium_ = value; + bitField0_ |= 0x00800000; + onChanged(); + return this; + } + + /** + * + * + *
+     * Enum value for targeting type.
+     * 
+ * + * .google.ads.datamanager.v1.TargetingType targeting_type = 25; + * + * @return Whether the targetingType field is set. + */ + @java.lang.Override + public boolean hasTargetingType() { + return targetingTypeOneofCase_ == 25; + } + + /** + * + * + *
+     * Enum value for targeting type.
+     * 
+ * + * .google.ads.datamanager.v1.TargetingType targeting_type = 25; + * + * @return The enum numeric value on the wire for targetingType. + */ + @java.lang.Override + public int getTargetingTypeValue() { + if (targetingTypeOneofCase_ == 25) { + return ((java.lang.Integer) targetingTypeOneof_).intValue(); + } + return 0; + } + + /** + * + * + *
+     * Enum value for targeting type.
+     * 
+ * + * .google.ads.datamanager.v1.TargetingType targeting_type = 25; + * + * @param value The enum numeric value on the wire for targetingType to set. + * @return This builder for chaining. + */ + public Builder setTargetingTypeValue(int value) { + targetingTypeOneofCase_ = 25; + targetingTypeOneof_ = value; + onChanged(); + return this; + } + + /** + * + * + *
+     * Enum value for targeting type.
+     * 
+ * + * .google.ads.datamanager.v1.TargetingType targeting_type = 25; + * + * @return The targetingType. + */ + @java.lang.Override + public com.google.ads.datamanager.v1.TargetingType getTargetingType() { + if (targetingTypeOneofCase_ == 25) { + com.google.ads.datamanager.v1.TargetingType result = + com.google.ads.datamanager.v1.TargetingType.forNumber( + (java.lang.Integer) targetingTypeOneof_); + return result == null ? com.google.ads.datamanager.v1.TargetingType.UNRECOGNIZED : result; + } + return com.google.ads.datamanager.v1.TargetingType.TARGETING_TYPE_UNSPECIFIED; + } + + /** + * + * + *
+     * Enum value for targeting type.
+     * 
+ * + * .google.ads.datamanager.v1.TargetingType targeting_type = 25; + * + * @param value The targetingType to set. + * @return This builder for chaining. + */ + public Builder setTargetingType(com.google.ads.datamanager.v1.TargetingType value) { + if (value == null) { + throw new NullPointerException(); + } + targetingTypeOneofCase_ = 25; + targetingTypeOneof_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+     * Enum value for targeting type.
+     * 
+ * + * .google.ads.datamanager.v1.TargetingType targeting_type = 25; + * + * @return This builder for chaining. + */ + public Builder clearTargetingType() { + if (targetingTypeOneofCase_ == 25) { + targetingTypeOneofCase_ = 0; + targetingTypeOneof_ = null; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * String value for targeting type.
+     * 
+ * + * string targeting_type_string = 26; + * + * @return Whether the targetingTypeString field is set. + */ + @java.lang.Override + public boolean hasTargetingTypeString() { + return targetingTypeOneofCase_ == 26; + } + + /** + * + * + *
+     * String value for targeting type.
+     * 
+ * + * string targeting_type_string = 26; + * + * @return The targetingTypeString. + */ + @java.lang.Override + public java.lang.String getTargetingTypeString() { + java.lang.Object ref = ""; + if (targetingTypeOneofCase_ == 26) { + ref = targetingTypeOneof_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (targetingTypeOneofCase_ == 26) { + targetingTypeOneof_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * String value for targeting type.
+     * 
+ * + * string targeting_type_string = 26; + * + * @return The bytes for targetingTypeString. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTargetingTypeStringBytes() { + java.lang.Object ref = ""; + if (targetingTypeOneofCase_ == 26) { + ref = targetingTypeOneof_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (targetingTypeOneofCase_ == 26) { + targetingTypeOneof_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * String value for targeting type.
+     * 
+ * + * string targeting_type_string = 26; + * + * @param value The targetingTypeString to set. + * @return This builder for chaining. + */ + public Builder setTargetingTypeString(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + targetingTypeOneofCase_ = 26; + targetingTypeOneof_ = value; + onChanged(); + return this; + } + + /** + * + * + *
+     * String value for targeting type.
+     * 
+ * + * string targeting_type_string = 26; + * + * @return This builder for chaining. + */ + public Builder clearTargetingTypeString() { + if (targetingTypeOneofCase_ == 26) { + targetingTypeOneofCase_ = 0; + targetingTypeOneof_ = null; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * String value for targeting type.
+     * 
+ * + * string targeting_type_string = 26; + * + * @param value The bytes for targetingTypeString to set. + * @return This builder for chaining. + */ + public Builder setTargetingTypeStringBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + targetingTypeOneofCase_ = 26; + targetingTypeOneof_ = value; + onChanged(); + return this; + } + + /** + * + * + *
+     * Enum value for platform type.
+     * 
+ * + * .google.ads.datamanager.v1.PlatformType platform_type = 27; + * + * @return Whether the platformType field is set. + */ + @java.lang.Override + public boolean hasPlatformType() { + return platformTypeOneofCase_ == 27; + } + + /** + * + * + *
+     * Enum value for platform type.
+     * 
+ * + * .google.ads.datamanager.v1.PlatformType platform_type = 27; + * + * @return The enum numeric value on the wire for platformType. + */ + @java.lang.Override + public int getPlatformTypeValue() { + if (platformTypeOneofCase_ == 27) { + return ((java.lang.Integer) platformTypeOneof_).intValue(); + } + return 0; + } + + /** + * + * + *
+     * Enum value for platform type.
+     * 
+ * + * .google.ads.datamanager.v1.PlatformType platform_type = 27; + * + * @param value The enum numeric value on the wire for platformType to set. + * @return This builder for chaining. + */ + public Builder setPlatformTypeValue(int value) { + platformTypeOneofCase_ = 27; + platformTypeOneof_ = value; + onChanged(); + return this; + } + + /** + * + * + *
+     * Enum value for platform type.
+     * 
+ * + * .google.ads.datamanager.v1.PlatformType platform_type = 27; + * + * @return The platformType. + */ + @java.lang.Override + public com.google.ads.datamanager.v1.PlatformType getPlatformType() { + if (platformTypeOneofCase_ == 27) { + com.google.ads.datamanager.v1.PlatformType result = + com.google.ads.datamanager.v1.PlatformType.forNumber( + (java.lang.Integer) platformTypeOneof_); + return result == null ? com.google.ads.datamanager.v1.PlatformType.UNRECOGNIZED : result; + } + return com.google.ads.datamanager.v1.PlatformType.PLATFORM_TYPE_UNSPECIFIED; + } + + /** + * + * + *
+     * Enum value for platform type.
+     * 
+ * + * .google.ads.datamanager.v1.PlatformType platform_type = 27; + * + * @param value The platformType to set. + * @return This builder for chaining. + */ + public Builder setPlatformType(com.google.ads.datamanager.v1.PlatformType value) { + if (value == null) { + throw new NullPointerException(); + } + platformTypeOneofCase_ = 27; + platformTypeOneof_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+     * Enum value for platform type.
+     * 
+ * + * .google.ads.datamanager.v1.PlatformType platform_type = 27; + * + * @return This builder for chaining. + */ + public Builder clearPlatformType() { + if (platformTypeOneofCase_ == 27) { + platformTypeOneofCase_ = 0; + platformTypeOneof_ = null; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * String value for platform type.
+     * 
+ * + * string platform_type_string = 28; + * + * @return Whether the platformTypeString field is set. + */ + @java.lang.Override + public boolean hasPlatformTypeString() { + return platformTypeOneofCase_ == 28; + } + + /** + * + * + *
+     * String value for platform type.
+     * 
+ * + * string platform_type_string = 28; + * + * @return The platformTypeString. + */ + @java.lang.Override + public java.lang.String getPlatformTypeString() { + java.lang.Object ref = ""; + if (platformTypeOneofCase_ == 28) { + ref = platformTypeOneof_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (platformTypeOneofCase_ == 28) { + platformTypeOneof_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * String value for platform type.
+     * 
+ * + * string platform_type_string = 28; + * + * @return The bytes for platformTypeString. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPlatformTypeStringBytes() { + java.lang.Object ref = ""; + if (platformTypeOneofCase_ == 28) { + ref = platformTypeOneof_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (platformTypeOneofCase_ == 28) { + platformTypeOneof_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * String value for platform type.
+     * 
+ * + * string platform_type_string = 28; + * + * @param value The platformTypeString to set. + * @return This builder for chaining. + */ + public Builder setPlatformTypeString(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + platformTypeOneofCase_ = 28; + platformTypeOneof_ = value; + onChanged(); + return this; + } + + /** + * + * + *
+     * String value for platform type.
+     * 
+ * + * string platform_type_string = 28; + * + * @return This builder for chaining. + */ + public Builder clearPlatformTypeString() { + if (platformTypeOneofCase_ == 28) { + platformTypeOneofCase_ = 0; + platformTypeOneof_ = null; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * String value for platform type.
+     * 
+ * + * string platform_type_string = 28; + * + * @param value The bytes for platformTypeString to set. + * @return This builder for chaining. + */ + public Builder setPlatformTypeStringBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + platformTypeOneofCase_ = 28; + platformTypeOneof_ = value; + onChanged(); + return this; + } + + /** + * + * + *
+     * Enum value for platform.
+     * 
+ * + * .google.ads.datamanager.v1.Platform platform = 29; + * + * @return Whether the platform field is set. + */ + @java.lang.Override + public boolean hasPlatform() { + return platformOneofCase_ == 29; + } + + /** + * + * + *
+     * Enum value for platform.
+     * 
+ * + * .google.ads.datamanager.v1.Platform platform = 29; + * + * @return The enum numeric value on the wire for platform. + */ + @java.lang.Override + public int getPlatformValue() { + if (platformOneofCase_ == 29) { + return ((java.lang.Integer) platformOneof_).intValue(); + } + return 0; + } + + /** + * + * + *
+     * Enum value for platform.
+     * 
+ * + * .google.ads.datamanager.v1.Platform platform = 29; + * + * @param value The enum numeric value on the wire for platform to set. + * @return This builder for chaining. + */ + public Builder setPlatformValue(int value) { + platformOneofCase_ = 29; + platformOneof_ = value; + onChanged(); + return this; + } + + /** + * + * + *
+     * Enum value for platform.
+     * 
+ * + * .google.ads.datamanager.v1.Platform platform = 29; + * + * @return The platform. + */ + @java.lang.Override + public com.google.ads.datamanager.v1.Platform getPlatform() { + if (platformOneofCase_ == 29) { + com.google.ads.datamanager.v1.Platform result = + com.google.ads.datamanager.v1.Platform.forNumber((java.lang.Integer) platformOneof_); + return result == null ? com.google.ads.datamanager.v1.Platform.UNRECOGNIZED : result; + } + return com.google.ads.datamanager.v1.Platform.PLATFORM_UNSPECIFIED; + } + + /** + * + * + *
+     * Enum value for platform.
+     * 
+ * + * .google.ads.datamanager.v1.Platform platform = 29; + * + * @param value The platform to set. + * @return This builder for chaining. + */ + public Builder setPlatform(com.google.ads.datamanager.v1.Platform value) { + if (value == null) { + throw new NullPointerException(); + } + platformOneofCase_ = 29; + platformOneof_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+     * Enum value for platform.
+     * 
+ * + * .google.ads.datamanager.v1.Platform platform = 29; + * + * @return This builder for chaining. + */ + public Builder clearPlatform() { + if (platformOneofCase_ == 29) { + platformOneofCase_ = 0; + platformOneof_ = null; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * String value for platform.
+     * 
+ * + * string platform_string = 30; + * + * @return Whether the platformString field is set. + */ + @java.lang.Override + public boolean hasPlatformString() { + return platformOneofCase_ == 30; + } + + /** + * + * + *
+     * String value for platform.
+     * 
+ * + * string platform_string = 30; + * + * @return The platformString. + */ + @java.lang.Override + public java.lang.String getPlatformString() { + java.lang.Object ref = ""; + if (platformOneofCase_ == 30) { + ref = platformOneof_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (platformOneofCase_ == 30) { + platformOneof_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * String value for platform.
+     * 
+ * + * string platform_string = 30; + * + * @return The bytes for platformString. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPlatformStringBytes() { + java.lang.Object ref = ""; + if (platformOneofCase_ == 30) { + ref = platformOneof_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (platformOneofCase_ == 30) { + platformOneof_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * String value for platform.
+     * 
+ * + * string platform_string = 30; + * + * @param value The platformString to set. + * @return This builder for chaining. + */ + public Builder setPlatformString(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + platformOneofCase_ = 30; + platformOneof_ = value; + onChanged(); + return this; + } + + /** + * + * + *
+     * String value for platform.
+     * 
+ * + * string platform_string = 30; + * + * @return This builder for chaining. + */ + public Builder clearPlatformString() { + if (platformOneofCase_ == 30) { + platformOneofCase_ = 0; + platformOneof_ = null; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * String value for platform.
+     * 
+ * + * string platform_string = 30; + * + * @param value The bytes for platformString to set. + * @return This builder for chaining. + */ + public Builder setPlatformStringBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + platformOneofCase_ = 30; + platformOneof_ = value; + onChanged(); + return this; + } + + private int attributionHint_ = 0; + + /** + * + * + *
+     * Optional. The partner-assumed attribution status for this ad event.
+     *
+     * This acts only as a signal for how the partner assumed attribution played
+     * out, and does not force an end result in final reports.
+     * 
+ * + * + * .google.ads.datamanager.v1.AttributionHint attribution_hint = 31 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for attributionHint. + */ + @java.lang.Override + public int getAttributionHintValue() { + return attributionHint_; + } + + /** + * + * + *
+     * Optional. The partner-assumed attribution status for this ad event.
+     *
+     * This acts only as a signal for how the partner assumed attribution played
+     * out, and does not force an end result in final reports.
+     * 
+ * + * + * .google.ads.datamanager.v1.AttributionHint attribution_hint = 31 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The enum numeric value on the wire for attributionHint to set. + * @return This builder for chaining. + */ + public Builder setAttributionHintValue(int value) { + attributionHint_ = value; + bitField0_ |= 0x40000000; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The partner-assumed attribution status for this ad event.
+     *
+     * This acts only as a signal for how the partner assumed attribution played
+     * out, and does not force an end result in final reports.
+     * 
+ * + * + * .google.ads.datamanager.v1.AttributionHint attribution_hint = 31 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The attributionHint. + */ + @java.lang.Override + public com.google.ads.datamanager.v1.AttributionHint getAttributionHint() { + com.google.ads.datamanager.v1.AttributionHint result = + com.google.ads.datamanager.v1.AttributionHint.forNumber(attributionHint_); + return result == null ? com.google.ads.datamanager.v1.AttributionHint.UNRECOGNIZED : result; + } + + /** + * + * + *
+     * Optional. The partner-assumed attribution status for this ad event.
+     *
+     * This acts only as a signal for how the partner assumed attribution played
+     * out, and does not force an end result in final reports.
+     * 
+ * + * + * .google.ads.datamanager.v1.AttributionHint attribution_hint = 31 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The attributionHint to set. + * @return This builder for chaining. + */ + public Builder setAttributionHint(com.google.ads.datamanager.v1.AttributionHint value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x40000000; + attributionHint_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The partner-assumed attribution status for this ad event.
+     *
+     * This acts only as a signal for how the partner assumed attribution played
+     * out, and does not force an end result in final reports.
+     * 
+ * + * + * .google.ads.datamanager.v1.AttributionHint attribution_hint = 31 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearAttributionHint() { + bitField0_ = (bitField0_ & ~0x40000000); + attributionHint_ = 0; + onChanged(); + return this; + } + + private com.google.ads.datamanager.v1.ViewabilityInfo viewabilityInfo_; + private com.google.protobuf.SingleFieldBuilder< + com.google.ads.datamanager.v1.ViewabilityInfo, + com.google.ads.datamanager.v1.ViewabilityInfo.Builder, + com.google.ads.datamanager.v1.ViewabilityInfoOrBuilder> + viewabilityInfoBuilder_; + + /** + * + * + *
+     * Required. Details of the viewability of the ad served.
+     * 
+ * + * + * .google.ads.datamanager.v1.ViewabilityInfo viewability_info = 32 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the viewabilityInfo field is set. + */ + public boolean hasViewabilityInfo() { + return ((bitField0_ & 0x80000000) != 0); + } + + /** + * + * + *
+     * Required. Details of the viewability of the ad served.
+     * 
+ * + * + * .google.ads.datamanager.v1.ViewabilityInfo viewability_info = 32 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The viewabilityInfo. + */ + public com.google.ads.datamanager.v1.ViewabilityInfo getViewabilityInfo() { + if (viewabilityInfoBuilder_ == null) { + return viewabilityInfo_ == null + ? com.google.ads.datamanager.v1.ViewabilityInfo.getDefaultInstance() + : viewabilityInfo_; + } else { + return viewabilityInfoBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Required. Details of the viewability of the ad served.
+     * 
+ * + * + * .google.ads.datamanager.v1.ViewabilityInfo viewability_info = 32 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setViewabilityInfo(com.google.ads.datamanager.v1.ViewabilityInfo value) { + if (viewabilityInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + viewabilityInfo_ = value; + } else { + viewabilityInfoBuilder_.setMessage(value); + } + bitField0_ |= 0x80000000; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Details of the viewability of the ad served.
+     * 
+ * + * + * .google.ads.datamanager.v1.ViewabilityInfo viewability_info = 32 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setViewabilityInfo( + com.google.ads.datamanager.v1.ViewabilityInfo.Builder builderForValue) { + if (viewabilityInfoBuilder_ == null) { + viewabilityInfo_ = builderForValue.build(); + } else { + viewabilityInfoBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x80000000; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Details of the viewability of the ad served.
+     * 
+ * + * + * .google.ads.datamanager.v1.ViewabilityInfo viewability_info = 32 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeViewabilityInfo(com.google.ads.datamanager.v1.ViewabilityInfo value) { + if (viewabilityInfoBuilder_ == null) { + if (((bitField0_ & 0x80000000) != 0) + && viewabilityInfo_ != null + && viewabilityInfo_ + != com.google.ads.datamanager.v1.ViewabilityInfo.getDefaultInstance()) { + getViewabilityInfoBuilder().mergeFrom(value); + } else { + viewabilityInfo_ = value; + } + } else { + viewabilityInfoBuilder_.mergeFrom(value); + } + if (viewabilityInfo_ != null) { + bitField0_ |= 0x80000000; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Required. Details of the viewability of the ad served.
+     * 
+ * + * + * .google.ads.datamanager.v1.ViewabilityInfo viewability_info = 32 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearViewabilityInfo() { + bitField0_ = (bitField0_ & ~0x80000000); + viewabilityInfo_ = null; + if (viewabilityInfoBuilder_ != null) { + viewabilityInfoBuilder_.dispose(); + viewabilityInfoBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Details of the viewability of the ad served.
+     * 
+ * + * + * .google.ads.datamanager.v1.ViewabilityInfo viewability_info = 32 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.ads.datamanager.v1.ViewabilityInfo.Builder getViewabilityInfoBuilder() { + bitField0_ |= 0x80000000; + onChanged(); + return internalGetViewabilityInfoFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Required. Details of the viewability of the ad served.
+     * 
+ * + * + * .google.ads.datamanager.v1.ViewabilityInfo viewability_info = 32 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.ads.datamanager.v1.ViewabilityInfoOrBuilder getViewabilityInfoOrBuilder() { + if (viewabilityInfoBuilder_ != null) { + return viewabilityInfoBuilder_.getMessageOrBuilder(); + } else { + return viewabilityInfo_ == null + ? com.google.ads.datamanager.v1.ViewabilityInfo.getDefaultInstance() + : viewabilityInfo_; + } + } + + /** + * + * + *
+     * Required. Details of the viewability of the ad served.
+     * 
+ * + * + * .google.ads.datamanager.v1.ViewabilityInfo viewability_info = 32 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.ads.datamanager.v1.ViewabilityInfo, + com.google.ads.datamanager.v1.ViewabilityInfo.Builder, + com.google.ads.datamanager.v1.ViewabilityInfoOrBuilder> + internalGetViewabilityInfoFieldBuilder() { + if (viewabilityInfoBuilder_ == null) { + viewabilityInfoBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.ads.datamanager.v1.ViewabilityInfo, + com.google.ads.datamanager.v1.ViewabilityInfo.Builder, + com.google.ads.datamanager.v1.ViewabilityInfoOrBuilder>( + getViewabilityInfo(), getParentForChildren(), isClean()); + viewabilityInfo_ = null; + } + return viewabilityInfoBuilder_; + } + + private boolean measurementAllowed_; + + /** + * + * + *
+     * Optional. Represents if the row is allowed to be used for measurement
+     * purposes, as governed by applicable privacy laws within regional
+     * jurisdiction.
+     * 
+ * + * optional bool measurement_allowed = 33 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the measurementAllowed field is set. + */ + @java.lang.Override + public boolean hasMeasurementAllowed() { + return ((bitField1_ & 0x00000001) != 0); + } + + /** + * + * + *
+     * Optional. Represents if the row is allowed to be used for measurement
+     * purposes, as governed by applicable privacy laws within regional
+     * jurisdiction.
+     * 
+ * + * optional bool measurement_allowed = 33 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The measurementAllowed. + */ + @java.lang.Override + public boolean getMeasurementAllowed() { + return measurementAllowed_; + } + + /** + * + * + *
+     * Optional. Represents if the row is allowed to be used for measurement
+     * purposes, as governed by applicable privacy laws within regional
+     * jurisdiction.
+     * 
+ * + * optional bool measurement_allowed = 33 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The measurementAllowed to set. + * @return This builder for chaining. + */ + public Builder setMeasurementAllowed(boolean value) { + + measurementAllowed_ = value; + bitField1_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Represents if the row is allowed to be used for measurement
+     * purposes, as governed by applicable privacy laws within regional
+     * jurisdiction.
+     * 
+ * + * optional bool measurement_allowed = 33 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearMeasurementAllowed() { + bitField1_ = (bitField1_ & ~0x00000001); + measurementAllowed_ = false; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.ads.datamanager.v1.AdEvent) + } + + // @@protoc_insertion_point(class_scope:google.ads.datamanager.v1.AdEvent) + private static final com.google.ads.datamanager.v1.AdEvent DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.ads.datamanager.v1.AdEvent(); + } + + public static com.google.ads.datamanager.v1.AdEvent getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AdEvent parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.ads.datamanager.v1.AdEvent getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-datamanager/proto-data-manager-v1/src/main/java/com/google/ads/datamanager/v1/AdEventOrBuilder.java b/java-datamanager/proto-data-manager-v1/src/main/java/com/google/ads/datamanager/v1/AdEventOrBuilder.java new file mode 100644 index 000000000000..2e459242b3ed --- /dev/null +++ b/java-datamanager/proto-data-manager-v1/src/main/java/com/google/ads/datamanager/v1/AdEventOrBuilder.java @@ -0,0 +1,1171 @@ +/* + * 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/ads/datamanager/v1/ad_event.proto +// Protobuf Java Version: 4.33.2 + +package com.google.ads.datamanager.v1; + +@com.google.protobuf.Generated +public interface AdEventOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.ads.datamanager.v1.AdEvent) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The ID of the advertiser for the ad event.
+   *
+   * This must match the ID sent in the linking flow.
+   * 
+ * + * string advertiser_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The advertiserId. + */ + java.lang.String getAdvertiserId(); + + /** + * + * + *
+   * Required. The ID of the advertiser for the ad event.
+   *
+   * This must match the ID sent in the linking flow.
+   * 
+ * + * string advertiser_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for advertiserId. + */ + com.google.protobuf.ByteString getAdvertiserIdBytes(); + + /** + * + * + *
+   * Required. The type of the event.
+   * 
+ * + * + * .google.ads.datamanager.v1.AdEvent.EventType event_type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for eventType. + */ + int getEventTypeValue(); + + /** + * + * + *
+   * Required. The type of the event.
+   * 
+ * + * + * .google.ads.datamanager.v1.AdEvent.EventType event_type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The eventType. + */ + com.google.ads.datamanager.v1.AdEvent.EventType getEventType(); + + /** + * + * + *
+   * Enum value for event subtype.
+   * 
+ * + * .google.ads.datamanager.v1.AdEvent.EventSubtype event_subtype = 3; + * + * @return Whether the eventSubtype field is set. + */ + boolean hasEventSubtype(); + + /** + * + * + *
+   * Enum value for event subtype.
+   * 
+ * + * .google.ads.datamanager.v1.AdEvent.EventSubtype event_subtype = 3; + * + * @return The enum numeric value on the wire for eventSubtype. + */ + int getEventSubtypeValue(); + + /** + * + * + *
+   * Enum value for event subtype.
+   * 
+ * + * .google.ads.datamanager.v1.AdEvent.EventSubtype event_subtype = 3; + * + * @return The eventSubtype. + */ + com.google.ads.datamanager.v1.AdEvent.EventSubtype getEventSubtype(); + + /** + * + * + *
+   * String value for event subtype.
+   * 
+ * + * string event_subtype_string = 4; + * + * @return Whether the eventSubtypeString field is set. + */ + boolean hasEventSubtypeString(); + + /** + * + * + *
+   * String value for event subtype.
+   * 
+ * + * string event_subtype_string = 4; + * + * @return The eventSubtypeString. + */ + java.lang.String getEventSubtypeString(); + + /** + * + * + *
+   * String value for event subtype.
+   * 
+ * + * string event_subtype_string = 4; + * + * @return The bytes for eventSubtypeString. + */ + com.google.protobuf.ByteString getEventSubtypeStringBytes(); + + /** + * + * + *
+   * Required. The time the event occurred.
+   * 
+ * + * .google.protobuf.Timestamp timestamp = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the timestamp field is set. + */ + boolean hasTimestamp(); + + /** + * + * + *
+   * Required. The time the event occurred.
+   * 
+ * + * .google.protobuf.Timestamp timestamp = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The timestamp. + */ + com.google.protobuf.Timestamp getTimestamp(); + + /** + * + * + *
+   * Required. The time the event occurred.
+   * 
+ * + * .google.protobuf.Timestamp timestamp = 5 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.protobuf.TimestampOrBuilder getTimestampOrBuilder(); + + /** + * + * + *
+   * Optional. An ID created and managed by the caller that uniquely identifies
+   * this event.
+   *
+   * Required if you want to deduplicate ad events that are included
+   * in multiple requests. Otherwise, this field is optional.
+   * 
+ * + * string event_id = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The eventId. + */ + java.lang.String getEventId(); + + /** + * + * + *
+   * Optional. An ID created and managed by the caller that uniquely identifies
+   * this event.
+   *
+   * Required if you want to deduplicate ad events that are included
+   * in multiple requests. Otherwise, this field is optional.
+   * 
+ * + * string event_id = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for eventId. + */ + com.google.protobuf.ByteString getEventIdBytes(); + + /** + * + * + *
+   * Optional. Multiple pieces of user-provided data, representing the user the
+   * event is associated with.
+   *
+   * It is possible to provide multiple instances of the same type of data (e.g.
+   * email address). The more data provided, the more likely a match will be
+   * found.
+   * 
+ * + * + * .google.ads.datamanager.v1.UserData user_data = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the userData field is set. + */ + boolean hasUserData(); + + /** + * + * + *
+   * Optional. Multiple pieces of user-provided data, representing the user the
+   * event is associated with.
+   *
+   * It is possible to provide multiple instances of the same type of data (e.g.
+   * email address). The more data provided, the more likely a match will be
+   * found.
+   * 
+ * + * + * .google.ads.datamanager.v1.UserData user_data = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The userData. + */ + com.google.ads.datamanager.v1.UserData getUserData(); + + /** + * + * + *
+   * Optional. Multiple pieces of user-provided data, representing the user the
+   * event is associated with.
+   *
+   * It is possible to provide multiple instances of the same type of data (e.g.
+   * email address). The more data provided, the more likely a match will be
+   * found.
+   * 
+ * + * + * .google.ads.datamanager.v1.UserData user_data = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.ads.datamanager.v1.UserDataOrBuilder getUserDataOrBuilder(); + + /** + * + * + *
+   * Optional. Information gathered about the device being used when the ad
+   * event happened.
+   * 
+ * + * + * .google.ads.datamanager.v1.DeviceInfo device_info = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the deviceInfo field is set. + */ + boolean hasDeviceInfo(); + + /** + * + * + *
+   * Optional. Information gathered about the device being used when the ad
+   * event happened.
+   * 
+ * + * + * .google.ads.datamanager.v1.DeviceInfo device_info = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The deviceInfo. + */ + com.google.ads.datamanager.v1.DeviceInfo getDeviceInfo(); + + /** + * + * + *
+   * Optional. Information gathered about the device being used when the ad
+   * event happened.
+   * 
+ * + * + * .google.ads.datamanager.v1.DeviceInfo device_info = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.ads.datamanager.v1.DeviceInfoOrBuilder getDeviceInfoOrBuilder(); + + /** + * + * + *
+   * Optional. The device ID of the device that the ad was served to.
+   * 
+ * + * string mobile_device_id = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The mobileDeviceId. + */ + java.lang.String getMobileDeviceId(); + + /** + * + * + *
+   * Optional. The device ID of the device that the ad was served to.
+   * 
+ * + * string mobile_device_id = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for mobileDeviceId. + */ + com.google.protobuf.ByteString getMobileDeviceIdBytes(); + + /** + * + * + *
+   * Required. The ID of the associated campaign.
+   * 
+ * + * string campaign_id = 10 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The campaignId. + */ + java.lang.String getCampaignId(); + + /** + * + * + *
+   * Required. The ID of the associated campaign.
+   * 
+ * + * string campaign_id = 10 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for campaignId. + */ + com.google.protobuf.ByteString getCampaignIdBytes(); + + /** + * + * + *
+   * Required. The name of the associated campaign.
+   * 
+ * + * string campaign_name = 11 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The campaignName. + */ + java.lang.String getCampaignName(); + + /** + * + * + *
+   * Required. The name of the associated campaign.
+   * 
+ * + * string campaign_name = 11 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for campaignName. + */ + com.google.protobuf.ByteString getCampaignNameBytes(); + + /** + * + * + *
+   * Optional. The ID of the associated ad group.
+   * 
+ * + * string ad_group_id = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The adGroupId. + */ + java.lang.String getAdGroupId(); + + /** + * + * + *
+   * Optional. The ID of the associated ad group.
+   * 
+ * + * string ad_group_id = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for adGroupId. + */ + com.google.protobuf.ByteString getAdGroupIdBytes(); + + /** + * + * + *
+   * Optional. The ID of the associated ad within the group.
+   * 
+ * + * string ad_id = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The adId. + */ + java.lang.String getAdId(); + + /** + * + * + *
+   * Optional. The ID of the associated ad within the group.
+   * 
+ * + * string ad_id = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for adId. + */ + com.google.protobuf.ByteString getAdIdBytes(); + + /** + * + * + *
+   * Enum value for ad type.
+   * 
+ * + * .google.ads.datamanager.v1.AdType ad_type = 14; + * + * @return Whether the adType field is set. + */ + boolean hasAdType(); + + /** + * + * + *
+   * Enum value for ad type.
+   * 
+ * + * .google.ads.datamanager.v1.AdType ad_type = 14; + * + * @return The enum numeric value on the wire for adType. + */ + int getAdTypeValue(); + + /** + * + * + *
+   * Enum value for ad type.
+   * 
+ * + * .google.ads.datamanager.v1.AdType ad_type = 14; + * + * @return The adType. + */ + com.google.ads.datamanager.v1.AdType getAdType(); + + /** + * + * + *
+   * String value for ad type.
+   * 
+ * + * string ad_type_string = 15; + * + * @return Whether the adTypeString field is set. + */ + boolean hasAdTypeString(); + + /** + * + * + *
+   * String value for ad type.
+   * 
+ * + * string ad_type_string = 15; + * + * @return The adTypeString. + */ + java.lang.String getAdTypeString(); + + /** + * + * + *
+   * String value for ad type.
+   * 
+ * + * string ad_type_string = 15; + * + * @return The bytes for adTypeString. + */ + com.google.protobuf.ByteString getAdTypeStringBytes(); + + /** + * + * + *
+   * Enum value for ad format.
+   * 
+ * + * .google.ads.datamanager.v1.AdFormat ad_format = 16; + * + * @return Whether the adFormat field is set. + */ + boolean hasAdFormat(); + + /** + * + * + *
+   * Enum value for ad format.
+   * 
+ * + * .google.ads.datamanager.v1.AdFormat ad_format = 16; + * + * @return The enum numeric value on the wire for adFormat. + */ + int getAdFormatValue(); + + /** + * + * + *
+   * Enum value for ad format.
+   * 
+ * + * .google.ads.datamanager.v1.AdFormat ad_format = 16; + * + * @return The adFormat. + */ + com.google.ads.datamanager.v1.AdFormat getAdFormat(); + + /** + * + * + *
+   * String value for ad format.
+   * 
+ * + * string ad_format_string = 17; + * + * @return Whether the adFormatString field is set. + */ + boolean hasAdFormatString(); + + /** + * + * + *
+   * String value for ad format.
+   * 
+ * + * string ad_format_string = 17; + * + * @return The adFormatString. + */ + java.lang.String getAdFormatString(); + + /** + * + * + *
+   * String value for ad format.
+   * 
+ * + * string ad_format_string = 17; + * + * @return The bytes for adFormatString. + */ + com.google.protobuf.ByteString getAdFormatStringBytes(); + + /** + * + * + *
+   * Enum value for ad placement.
+   * 
+ * + * .google.ads.datamanager.v1.AdPlacement ad_placement = 18; + * + * @return Whether the adPlacement field is set. + */ + boolean hasAdPlacement(); + + /** + * + * + *
+   * Enum value for ad placement.
+   * 
+ * + * .google.ads.datamanager.v1.AdPlacement ad_placement = 18; + * + * @return The enum numeric value on the wire for adPlacement. + */ + int getAdPlacementValue(); + + /** + * + * + *
+   * Enum value for ad placement.
+   * 
+ * + * .google.ads.datamanager.v1.AdPlacement ad_placement = 18; + * + * @return The adPlacement. + */ + com.google.ads.datamanager.v1.AdPlacement getAdPlacement(); + + /** + * + * + *
+   * String value for ad placement.
+   * 
+ * + * string ad_placement_string = 19; + * + * @return Whether the adPlacementString field is set. + */ + boolean hasAdPlacementString(); + + /** + * + * + *
+   * String value for ad placement.
+   * 
+ * + * string ad_placement_string = 19; + * + * @return The adPlacementString. + */ + java.lang.String getAdPlacementString(); + + /** + * + * + *
+   * String value for ad placement.
+   * 
+ * + * string ad_placement_string = 19; + * + * @return The bytes for adPlacementString. + */ + com.google.protobuf.ByteString getAdPlacementStringBytes(); + + /** + * + * + *
+   * Optional. The height of the ad in pixels.
+   * 
+ * + * int32 ad_height = 20 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The adHeight. + */ + int getAdHeight(); + + /** + * + * + *
+   * Optional. The width of the ad in pixels.
+   * 
+ * + * int32 ad_width = 21 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The adWidth. + */ + int getAdWidth(); + + /** + * + * + *
+   * Required. The ISO 3166-2 country plus subdivision.
+   * 
+ * + * string region_code = 22 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The regionCode. + */ + java.lang.String getRegionCode(); + + /** + * + * + *
+   * Required. The ISO 3166-2 country plus subdivision.
+   * 
+ * + * string region_code = 22 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for regionCode. + */ + com.google.protobuf.ByteString getRegionCodeBytes(); + + /** + * + * + *
+   * Required. The platform source of the ad, akin to the Google Analytics
+   * source.
+   * 
+ * + * string source = 23 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The source. + */ + java.lang.String getSource(); + + /** + * + * + *
+   * Required. The platform source of the ad, akin to the Google Analytics
+   * source.
+   * 
+ * + * string source = 23 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for source. + */ + com.google.protobuf.ByteString getSourceBytes(); + + /** + * + * + *
+   * Required. The medium of the ad, akin to the Google Analytics medium.
+   * 
+ * + * string medium = 24 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The medium. + */ + java.lang.String getMedium(); + + /** + * + * + *
+   * Required. The medium of the ad, akin to the Google Analytics medium.
+   * 
+ * + * string medium = 24 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for medium. + */ + com.google.protobuf.ByteString getMediumBytes(); + + /** + * + * + *
+   * Enum value for targeting type.
+   * 
+ * + * .google.ads.datamanager.v1.TargetingType targeting_type = 25; + * + * @return Whether the targetingType field is set. + */ + boolean hasTargetingType(); + + /** + * + * + *
+   * Enum value for targeting type.
+   * 
+ * + * .google.ads.datamanager.v1.TargetingType targeting_type = 25; + * + * @return The enum numeric value on the wire for targetingType. + */ + int getTargetingTypeValue(); + + /** + * + * + *
+   * Enum value for targeting type.
+   * 
+ * + * .google.ads.datamanager.v1.TargetingType targeting_type = 25; + * + * @return The targetingType. + */ + com.google.ads.datamanager.v1.TargetingType getTargetingType(); + + /** + * + * + *
+   * String value for targeting type.
+   * 
+ * + * string targeting_type_string = 26; + * + * @return Whether the targetingTypeString field is set. + */ + boolean hasTargetingTypeString(); + + /** + * + * + *
+   * String value for targeting type.
+   * 
+ * + * string targeting_type_string = 26; + * + * @return The targetingTypeString. + */ + java.lang.String getTargetingTypeString(); + + /** + * + * + *
+   * String value for targeting type.
+   * 
+ * + * string targeting_type_string = 26; + * + * @return The bytes for targetingTypeString. + */ + com.google.protobuf.ByteString getTargetingTypeStringBytes(); + + /** + * + * + *
+   * Enum value for platform type.
+   * 
+ * + * .google.ads.datamanager.v1.PlatformType platform_type = 27; + * + * @return Whether the platformType field is set. + */ + boolean hasPlatformType(); + + /** + * + * + *
+   * Enum value for platform type.
+   * 
+ * + * .google.ads.datamanager.v1.PlatformType platform_type = 27; + * + * @return The enum numeric value on the wire for platformType. + */ + int getPlatformTypeValue(); + + /** + * + * + *
+   * Enum value for platform type.
+   * 
+ * + * .google.ads.datamanager.v1.PlatformType platform_type = 27; + * + * @return The platformType. + */ + com.google.ads.datamanager.v1.PlatformType getPlatformType(); + + /** + * + * + *
+   * String value for platform type.
+   * 
+ * + * string platform_type_string = 28; + * + * @return Whether the platformTypeString field is set. + */ + boolean hasPlatformTypeString(); + + /** + * + * + *
+   * String value for platform type.
+   * 
+ * + * string platform_type_string = 28; + * + * @return The platformTypeString. + */ + java.lang.String getPlatformTypeString(); + + /** + * + * + *
+   * String value for platform type.
+   * 
+ * + * string platform_type_string = 28; + * + * @return The bytes for platformTypeString. + */ + com.google.protobuf.ByteString getPlatformTypeStringBytes(); + + /** + * + * + *
+   * Enum value for platform.
+   * 
+ * + * .google.ads.datamanager.v1.Platform platform = 29; + * + * @return Whether the platform field is set. + */ + boolean hasPlatform(); + + /** + * + * + *
+   * Enum value for platform.
+   * 
+ * + * .google.ads.datamanager.v1.Platform platform = 29; + * + * @return The enum numeric value on the wire for platform. + */ + int getPlatformValue(); + + /** + * + * + *
+   * Enum value for platform.
+   * 
+ * + * .google.ads.datamanager.v1.Platform platform = 29; + * + * @return The platform. + */ + com.google.ads.datamanager.v1.Platform getPlatform(); + + /** + * + * + *
+   * String value for platform.
+   * 
+ * + * string platform_string = 30; + * + * @return Whether the platformString field is set. + */ + boolean hasPlatformString(); + + /** + * + * + *
+   * String value for platform.
+   * 
+ * + * string platform_string = 30; + * + * @return The platformString. + */ + java.lang.String getPlatformString(); + + /** + * + * + *
+   * String value for platform.
+   * 
+ * + * string platform_string = 30; + * + * @return The bytes for platformString. + */ + com.google.protobuf.ByteString getPlatformStringBytes(); + + /** + * + * + *
+   * Optional. The partner-assumed attribution status for this ad event.
+   *
+   * This acts only as a signal for how the partner assumed attribution played
+   * out, and does not force an end result in final reports.
+   * 
+ * + * + * .google.ads.datamanager.v1.AttributionHint attribution_hint = 31 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for attributionHint. + */ + int getAttributionHintValue(); + + /** + * + * + *
+   * Optional. The partner-assumed attribution status for this ad event.
+   *
+   * This acts only as a signal for how the partner assumed attribution played
+   * out, and does not force an end result in final reports.
+   * 
+ * + * + * .google.ads.datamanager.v1.AttributionHint attribution_hint = 31 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The attributionHint. + */ + com.google.ads.datamanager.v1.AttributionHint getAttributionHint(); + + /** + * + * + *
+   * Required. Details of the viewability of the ad served.
+   * 
+ * + * + * .google.ads.datamanager.v1.ViewabilityInfo viewability_info = 32 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the viewabilityInfo field is set. + */ + boolean hasViewabilityInfo(); + + /** + * + * + *
+   * Required. Details of the viewability of the ad served.
+   * 
+ * + * + * .google.ads.datamanager.v1.ViewabilityInfo viewability_info = 32 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The viewabilityInfo. + */ + com.google.ads.datamanager.v1.ViewabilityInfo getViewabilityInfo(); + + /** + * + * + *
+   * Required. Details of the viewability of the ad served.
+   * 
+ * + * + * .google.ads.datamanager.v1.ViewabilityInfo viewability_info = 32 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.ads.datamanager.v1.ViewabilityInfoOrBuilder getViewabilityInfoOrBuilder(); + + /** + * + * + *
+   * Optional. Represents if the row is allowed to be used for measurement
+   * purposes, as governed by applicable privacy laws within regional
+   * jurisdiction.
+   * 
+ * + * optional bool measurement_allowed = 33 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the measurementAllowed field is set. + */ + boolean hasMeasurementAllowed(); + + /** + * + * + *
+   * Optional. Represents if the row is allowed to be used for measurement
+   * purposes, as governed by applicable privacy laws within regional
+   * jurisdiction.
+   * 
+ * + * optional bool measurement_allowed = 33 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The measurementAllowed. + */ + boolean getMeasurementAllowed(); + + com.google.ads.datamanager.v1.AdEvent.EventSubtypeOneofCase getEventSubtypeOneofCase(); + + com.google.ads.datamanager.v1.AdEvent.AdTypeOneofCase getAdTypeOneofCase(); + + com.google.ads.datamanager.v1.AdEvent.AdFormatOneofCase getAdFormatOneofCase(); + + com.google.ads.datamanager.v1.AdEvent.AdPlacementOneofCase getAdPlacementOneofCase(); + + com.google.ads.datamanager.v1.AdEvent.TargetingTypeOneofCase getTargetingTypeOneofCase(); + + com.google.ads.datamanager.v1.AdEvent.PlatformTypeOneofCase getPlatformTypeOneofCase(); + + com.google.ads.datamanager.v1.AdEvent.PlatformOneofCase getPlatformOneofCase(); +} diff --git a/java-datamanager/proto-data-manager-v1/src/main/java/com/google/ads/datamanager/v1/AdEventProto.java b/java-datamanager/proto-data-manager-v1/src/main/java/com/google/ads/datamanager/v1/AdEventProto.java new file mode 100644 index 000000000000..c4af4c7c9a18 --- /dev/null +++ b/java-datamanager/proto-data-manager-v1/src/main/java/com/google/ads/datamanager/v1/AdEventProto.java @@ -0,0 +1,270 @@ +/* + * 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/ads/datamanager/v1/ad_event.proto +// Protobuf Java Version: 4.33.2 + +package com.google.ads.datamanager.v1; + +@com.google.protobuf.Generated +public final class AdEventProto extends com.google.protobuf.GeneratedFile { + private AdEventProto() {} + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "AdEventProto"); + } + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_ads_datamanager_v1_AdEvent_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_ads_datamanager_v1_AdEvent_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n" + + "(google/ads/datamanager/v1/ad_event.pro" + + "to\022\031google.ads.datamanager.v1\032+google/ad" + + "s/datamanager/v1/device_info.proto\032)google/ads/datamanager/v1/user_data.proto\0320g" + + "oogle/ads/datamanager/v1/viewability_inf" + + "o.proto\032\037google/api/field_behavior.proto\032\037google/protobuf/timestamp.proto\"\240\016\n" + + "\007AdEvent\022\032\n\r" + + "advertiser_id\030\001 \001(\tB\003\340A\002\022E\n\n" + + "event_type\030\002" + + " \001(\0162,.google.ads.datamanager.v1.AdEvent.EventTypeB\003\340A\002\022H\n\r" + + "event_subtype\030\003" + + " \001(\0162/.google.ads.datamanager.v1.AdEvent.EventSubtypeH\000\022\036\n" + + "\024event_subtype_string\030\004 \001(\tH\000\0222\n" + + "\ttimestamp\030\005 \001(\0132\032.google.protobuf.TimestampB\003\340A\002\022\025\n" + + "\010event_id\030\006 \001(\tB\003\340A\001\022;\n" + + "\tuser_data\030\007" + + " \001(\0132#.google.ads.datamanager.v1.UserDataB\003\340A\001\022?\n" + + "\013device_info\030\010" + + " \001(\0132%.google.ads.datamanager.v1.DeviceInfoB\003\340A\001\022\035\n" + + "\020mobile_device_id\030\t \001(\tB\003\340A\001\022\030\n" + + "\013campaign_id\030\n" + + " \001(\tB\003\340A\002\022\032\n\r" + + "campaign_name\030\013 \001(\tB\003\340A\002\022\030\n" + + "\013ad_group_id\030\014 \001(\tB\003\340A\001\022\022\n" + + "\005ad_id\030\r" + + " \001(\tB\003\340A\001\0224\n" + + "\007ad_type\030\016 \001(\0162!.google.ads.datamanager.v1.AdTypeH\001\022\030\n" + + "\016ad_type_string\030\017 \001(\tH\001\0228\n" + + "\tad_format\030\020 \001(\0162#.google.ads.datamanager.v1.AdFormatH\002\022\032\n" + + "\020ad_format_string\030\021 \001(\tH\002\022>\n" + + "\014ad_placement\030\022" + + " \001(\0162&.google.ads.datamanager.v1.AdPlacementH\003\022\035\n" + + "\023ad_placement_string\030\023 \001(\tH\003\022\026\n" + + "\tad_height\030\024 \001(\005B\003\340A\001\022\025\n" + + "\010ad_width\030\025 \001(\005B\003\340A\001\022\030\n" + + "\013region_code\030\026 \001(\tB\003\340A\002\022\023\n" + + "\006source\030\027 \001(\tB\003\340A\002\022\023\n" + + "\006medium\030\030 \001(\tB\003\340A\002\022B\n" + + "\016targeting_type\030\031" + + " \001(\0162(.google.ads.datamanager.v1.TargetingTypeH\004\022\037\n" + + "\025targeting_type_string\030\032 \001(\tH\004\022@\n\r" + + "platform_type\030\033 \001" + + "(\0162\'.google.ads.datamanager.v1.PlatformTypeH\005\022\036\n" + + "\024platform_type_string\030\034 \001(\tH\005\0227\n" + + "\010platform\030\035 \001(\0162#.google.ads.datamanager.v1.PlatformH\006\022\031\n" + + "\017platform_string\030\036 \001(\tH\006\022I\n" + + "\020attribution_hint\030\037" + + " \001(\0162*.google.ads.datamanager.v1.AttributionHintB\003\340A\001\022I\n" + + "\020viewability_info\030 " + + " \001(\0132*.google.ads.datamanager.v1.ViewabilityInfoB\003\340A\002\022%\n" + + "\023measurement_allowed\030! \001(\010B\003\340A\001H\007\210\001\001\"R\n" + + "\tEventType\022\032\n" + + "\026EVENT_TYPE_UNSPECIFIED\020\000\022\023\n" + + "\017EVENT_TYPE_VIEW\020\001\022\024\n" + + "\020EVENT_TYPE_CLICK\020\002\"\255\001\n" + + "\014EventSubtype\022\035\n" + + "\031EVENT_SUBTYPE_UNSPECIFIED\020\000\022\034\n" + + "\030EVENT_SUBTYPE_IMPRESSION\020\001\022\036\n" + + "\032EVENT_SUBTYPE_ENGAGED_VIEW\020\002\022\036\n" + + "\032EVENT_SUBTYPE_ONSITE_CLICK\020\003\022 \n" + + "\034EVENT_SUBTYPE_OUTBOUND_CLICK\020\004B\025\n" + + "\023event_subtype_oneofB\017\n\r" + + "ad_type_oneofB\021\n" + + "\017ad_format_oneofB\024\n" + + "\022ad_placement_oneofB\026\n" + + "\024targeting_type_oneofB\025\n" + + "\023platform_type_oneofB\020\n" + + "\016platform_oneofB\026\n" + + "\024_measurement_allowed*\253\001\n" + + "\006AdType\022\027\n" + + "\023AD_TYPE_UNSPECIFIED\020\000\022\023\n" + + "\017AD_TYPE_DISPLAY\020\001\022\020\n" + + "\014AD_TYPE_TEXT\020\002\022\021\n\r" + + "AD_TYPE_IMAGE\020\003\022\026\n" + + "\022AD_TYPE_RICH_MEDIA\020\004\022\020\n" + + "\014AD_TYPE_HTML\020\005\022\021\n\r" + + "AD_TYPE_AUDIO\020\006\022\021\n\r" + + "AD_TYPE_VIDEO\020\007*\337\003\n" + + "\010AdFormat\022\031\n" + + "\025AD_FORMAT_UNSPECIFIED\020\000\022\020\n" + + "\014AD_FORMAT_AR\020\001\022\023\n" + + "\017AD_FORMAT_AUDIO\020\002\022\024\n" + + "\020AD_FORMAT_BANNER\020\003\022\024\n" + + "\020AD_FORMAT_BUMPER\020\004\022\026\n" + + "\022AD_FORMAT_CAROUSEL\020\005\022\030\n" + + "\024AD_FORMAT_COLLECTION\020\006\022\023\n" + + "\017AD_FORMAT_IMAGE\020\007\022\031\n" + + "\025AD_FORMAT_INTERACTIVE\020\010\022\032\n" + + "\026AD_FORMAT_INTERSTITIAL\020\t\022\025\n" + + "\021AD_FORMAT_IN_FEED\020\n" + + "\022\027\n" + + "\023AD_FORMAT_IN_STREAM\020\013\022!\n" + + "\035AD_FORMAT_IN_STREAM_SKIPPABLE\020\014\022%\n" + + "!AD_FORMAT_IN_STREAM_NON_SKIPPABLE\020\r" + + "\022\024\n" + + "\020AD_FORMAT_NATIVE\020\016\022\024\n" + + "\020AD_FORMAT_SHORTS\020\017\022\023\n" + + "\017AD_FORMAT_STORY\020\020\022\027\n" + + "\023AD_FORMAT_SPONSORED\020\021\022\023\n" + + "\017AD_FORMAT_VIDEO\020\022*\217\002\n" + + "\013AdPlacement\022\034\n" + + "\030AD_PLACEMENT_UNSPECIFIED\020\000\022\031\n" + + "\025AD_PLACEMENT_DISCOVER\020\001\022\025\n" + + "\021AD_PLACEMENT_FEED\020\002\022\027\n" + + "\023AD_PLACEMENT_FOOTER\020\003\022\027\n" + + "\023AD_PLACEMENT_HEADER\020\004\022\025\n" + + "\021AD_PLACEMENT_HOME\020\005\022\033\n" + + "\027AD_PLACEMENT_IN_CONTENT\020\006\022\031\n" + + "\025AD_PLACEMENT_PROMOTED\020\007\022\027\n" + + "\023AD_PLACEMENT_SEARCH\020\010\022\026\n" + + "\022AD_PLACEMENT_STORY\020\t*\237\002\n\r" + + "TargetingType\022\036\n" + + "\032TARGETING_TYPE_UNSPECIFIED\020\000\022\033\n" + + "\027TARGETING_TYPE_AUDIENCE\020\001\022\035\n" + + "\031TARGETING_TYPE_CONTEXTUAL\020\002\022\036\n" + + "\032TARGETING_TYPE_DEMOGRAPHIC\020\003\022\031\n" + + "\025TARGETING_TYPE_DEVICE\020\004\022\026\n" + + "\022TARGETING_TYPE_GEO\020\005\022\033\n" + + "\027TARGETING_TYPE_INTEREST\020\006\022\"\n" + + "\036TARGETING_TYPE_PURCHASE_INTENT\020\007\022\036\n" + + "\032TARGETING_TYPE_REMARKETING\020\010*\254\001\n" + + "\014PlatformType\022\035\n" + + "\031PLATFORM_TYPE_UNSPECIFIED\020\000\022\030\n" + + "\024PLATFORM_TYPE_MOBILE\020\001\022\031\n" + + "\025PLATFORM_TYPE_DESKTOP\020\002\022\025\n" + + "\021PLATFORM_TYPE_CTV\020\003\022\027\n" + + "\023PLATFORM_TYPE_PHONE\020\004\022\030\n" + + "\024PLATFORM_TYPE_TABLET\020\005*^\n" + + "\010Platform\022\030\n" + + "\024PLATFORM_UNSPECIFIED\020\000\022\020\n" + + "\014PLATFORM_IOS\020\001\022\024\n" + + "\020PLATFORM_ANDROID\020\002\022\020\n" + + "\014PLATFORM_WEB\020\003*w\n" + + "\017AttributionHint\022 \n" + + "\034ATTRIBUTION_HINT_UNSPECIFIED\020\000\022\036\n" + + "\032ATTRIBUTION_HINT_CONVERTED\020\001\022\"\n" + + "\036ATTRIBUTION_HINT_NOT_CONVERTED\020\002B\311\001\n" + + "\035com.google.ads.datamanager.v1B\014AdEventProto" + + "P\001ZAcloud.google.com/go/datamanager/apiv" + + "1/datamanagerpb;datamanagerpb\252\002\031Google.A" + + "ds.DataManager.V1\312\002\031Google\\Ads\\DataManag" + + "er\\V1\352\002\034Google::Ads::DataManager::V1b\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.ads.datamanager.v1.DeviceInfoProto.getDescriptor(), + com.google.ads.datamanager.v1.UserDataProto.getDescriptor(), + com.google.ads.datamanager.v1.ViewabilityInfoProto.getDescriptor(), + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), + }); + internal_static_google_ads_datamanager_v1_AdEvent_descriptor = + getDescriptor().getMessageType(0); + internal_static_google_ads_datamanager_v1_AdEvent_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_ads_datamanager_v1_AdEvent_descriptor, + new java.lang.String[] { + "AdvertiserId", + "EventType", + "EventSubtype", + "EventSubtypeString", + "Timestamp", + "EventId", + "UserData", + "DeviceInfo", + "MobileDeviceId", + "CampaignId", + "CampaignName", + "AdGroupId", + "AdId", + "AdType", + "AdTypeString", + "AdFormat", + "AdFormatString", + "AdPlacement", + "AdPlacementString", + "AdHeight", + "AdWidth", + "RegionCode", + "Source", + "Medium", + "TargetingType", + "TargetingTypeString", + "PlatformType", + "PlatformTypeString", + "Platform", + "PlatformString", + "AttributionHint", + "ViewabilityInfo", + "MeasurementAllowed", + "EventSubtypeOneof", + "AdTypeOneof", + "AdFormatOneof", + "AdPlacementOneof", + "TargetingTypeOneof", + "PlatformTypeOneof", + "PlatformOneof", + }); + descriptor.resolveAllFeaturesImmutable(); + com.google.ads.datamanager.v1.DeviceInfoProto.getDescriptor(); + com.google.ads.datamanager.v1.UserDataProto.getDescriptor(); + com.google.ads.datamanager.v1.ViewabilityInfoProto.getDescriptor(); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-datamanager/proto-data-manager-v1/src/main/java/com/google/ads/datamanager/v1/AdFormat.java b/java-datamanager/proto-data-manager-v1/src/main/java/com/google/ads/datamanager/v1/AdFormat.java new file mode 100644 index 000000000000..a582aac4dac3 --- /dev/null +++ b/java-datamanager/proto-data-manager-v1/src/main/java/com/google/ads/datamanager/v1/AdFormat.java @@ -0,0 +1,559 @@ +/* + * 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/ads/datamanager/v1/ad_event.proto +// Protobuf Java Version: 4.33.2 + +package com.google.ads.datamanager.v1; + +/** + * + * + *
+ * The format of the ad served.
+ * 
+ * + * Protobuf enum {@code google.ads.datamanager.v1.AdFormat} + */ +@com.google.protobuf.Generated +public enum AdFormat implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+   * Unspecified ad format.
+   * 
+ * + * AD_FORMAT_UNSPECIFIED = 0; + */ + AD_FORMAT_UNSPECIFIED(0), + /** + * + * + *
+   * AR ad.
+   * 
+ * + * AD_FORMAT_AR = 1; + */ + AD_FORMAT_AR(1), + /** + * + * + *
+   * Audio ad.
+   * 
+ * + * AD_FORMAT_AUDIO = 2; + */ + AD_FORMAT_AUDIO(2), + /** + * + * + *
+   * Banner ad.
+   * 
+ * + * AD_FORMAT_BANNER = 3; + */ + AD_FORMAT_BANNER(3), + /** + * + * + *
+   * Bumper ad.
+   * 
+ * + * AD_FORMAT_BUMPER = 4; + */ + AD_FORMAT_BUMPER(4), + /** + * + * + *
+   * Carousel ad.
+   * 
+ * + * AD_FORMAT_CAROUSEL = 5; + */ + AD_FORMAT_CAROUSEL(5), + /** + * + * + *
+   * Collection ad.
+   * 
+ * + * AD_FORMAT_COLLECTION = 6; + */ + AD_FORMAT_COLLECTION(6), + /** + * + * + *
+   * Image ad.
+   * 
+ * + * AD_FORMAT_IMAGE = 7; + */ + AD_FORMAT_IMAGE(7), + /** + * + * + *
+   * Interactive ad.
+   * 
+ * + * AD_FORMAT_INTERACTIVE = 8; + */ + AD_FORMAT_INTERACTIVE(8), + /** + * + * + *
+   * Interstitial ad.
+   * 
+ * + * AD_FORMAT_INTERSTITIAL = 9; + */ + AD_FORMAT_INTERSTITIAL(9), + /** + * + * + *
+   * In-feed ad.
+   * 
+ * + * AD_FORMAT_IN_FEED = 10; + */ + AD_FORMAT_IN_FEED(10), + /** + * + * + *
+   * In-stream ad.
+   * 
+ * + * AD_FORMAT_IN_STREAM = 11; + */ + AD_FORMAT_IN_STREAM(11), + /** + * + * + *
+   * In-stream skippable ad.
+   * 
+ * + * AD_FORMAT_IN_STREAM_SKIPPABLE = 12; + */ + AD_FORMAT_IN_STREAM_SKIPPABLE(12), + /** + * + * + *
+   * In-stream non-skippable ad.
+   * 
+ * + * AD_FORMAT_IN_STREAM_NON_SKIPPABLE = 13; + */ + AD_FORMAT_IN_STREAM_NON_SKIPPABLE(13), + /** + * + * + *
+   * Native ad.
+   * 
+ * + * AD_FORMAT_NATIVE = 14; + */ + AD_FORMAT_NATIVE(14), + /** + * + * + *
+   * Shorts ad.
+   * 
+ * + * AD_FORMAT_SHORTS = 15; + */ + AD_FORMAT_SHORTS(15), + /** + * + * + *
+   * Story ad.
+   * 
+ * + * AD_FORMAT_STORY = 16; + */ + AD_FORMAT_STORY(16), + /** + * + * + *
+   * Sponsored ad.
+   * 
+ * + * AD_FORMAT_SPONSORED = 17; + */ + AD_FORMAT_SPONSORED(17), + /** + * + * + *
+   * Video ad.
+   * 
+ * + * AD_FORMAT_VIDEO = 18; + */ + AD_FORMAT_VIDEO(18), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "AdFormat"); + } + + /** + * + * + *
+   * Unspecified ad format.
+   * 
+ * + * AD_FORMAT_UNSPECIFIED = 0; + */ + public static final int AD_FORMAT_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+   * AR ad.
+   * 
+ * + * AD_FORMAT_AR = 1; + */ + public static final int AD_FORMAT_AR_VALUE = 1; + + /** + * + * + *
+   * Audio ad.
+   * 
+ * + * AD_FORMAT_AUDIO = 2; + */ + public static final int AD_FORMAT_AUDIO_VALUE = 2; + + /** + * + * + *
+   * Banner ad.
+   * 
+ * + * AD_FORMAT_BANNER = 3; + */ + public static final int AD_FORMAT_BANNER_VALUE = 3; + + /** + * + * + *
+   * Bumper ad.
+   * 
+ * + * AD_FORMAT_BUMPER = 4; + */ + public static final int AD_FORMAT_BUMPER_VALUE = 4; + + /** + * + * + *
+   * Carousel ad.
+   * 
+ * + * AD_FORMAT_CAROUSEL = 5; + */ + public static final int AD_FORMAT_CAROUSEL_VALUE = 5; + + /** + * + * + *
+   * Collection ad.
+   * 
+ * + * AD_FORMAT_COLLECTION = 6; + */ + public static final int AD_FORMAT_COLLECTION_VALUE = 6; + + /** + * + * + *
+   * Image ad.
+   * 
+ * + * AD_FORMAT_IMAGE = 7; + */ + public static final int AD_FORMAT_IMAGE_VALUE = 7; + + /** + * + * + *
+   * Interactive ad.
+   * 
+ * + * AD_FORMAT_INTERACTIVE = 8; + */ + public static final int AD_FORMAT_INTERACTIVE_VALUE = 8; + + /** + * + * + *
+   * Interstitial ad.
+   * 
+ * + * AD_FORMAT_INTERSTITIAL = 9; + */ + public static final int AD_FORMAT_INTERSTITIAL_VALUE = 9; + + /** + * + * + *
+   * In-feed ad.
+   * 
+ * + * AD_FORMAT_IN_FEED = 10; + */ + public static final int AD_FORMAT_IN_FEED_VALUE = 10; + + /** + * + * + *
+   * In-stream ad.
+   * 
+ * + * AD_FORMAT_IN_STREAM = 11; + */ + public static final int AD_FORMAT_IN_STREAM_VALUE = 11; + + /** + * + * + *
+   * In-stream skippable ad.
+   * 
+ * + * AD_FORMAT_IN_STREAM_SKIPPABLE = 12; + */ + public static final int AD_FORMAT_IN_STREAM_SKIPPABLE_VALUE = 12; + + /** + * + * + *
+   * In-stream non-skippable ad.
+   * 
+ * + * AD_FORMAT_IN_STREAM_NON_SKIPPABLE = 13; + */ + public static final int AD_FORMAT_IN_STREAM_NON_SKIPPABLE_VALUE = 13; + + /** + * + * + *
+   * Native ad.
+   * 
+ * + * AD_FORMAT_NATIVE = 14; + */ + public static final int AD_FORMAT_NATIVE_VALUE = 14; + + /** + * + * + *
+   * Shorts ad.
+   * 
+ * + * AD_FORMAT_SHORTS = 15; + */ + public static final int AD_FORMAT_SHORTS_VALUE = 15; + + /** + * + * + *
+   * Story ad.
+   * 
+ * + * AD_FORMAT_STORY = 16; + */ + public static final int AD_FORMAT_STORY_VALUE = 16; + + /** + * + * + *
+   * Sponsored ad.
+   * 
+ * + * AD_FORMAT_SPONSORED = 17; + */ + public static final int AD_FORMAT_SPONSORED_VALUE = 17; + + /** + * + * + *
+   * Video ad.
+   * 
+ * + * AD_FORMAT_VIDEO = 18; + */ + public static final int AD_FORMAT_VIDEO_VALUE = 18; + + 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 AdFormat 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 AdFormat forNumber(int value) { + switch (value) { + case 0: + return AD_FORMAT_UNSPECIFIED; + case 1: + return AD_FORMAT_AR; + case 2: + return AD_FORMAT_AUDIO; + case 3: + return AD_FORMAT_BANNER; + case 4: + return AD_FORMAT_BUMPER; + case 5: + return AD_FORMAT_CAROUSEL; + case 6: + return AD_FORMAT_COLLECTION; + case 7: + return AD_FORMAT_IMAGE; + case 8: + return AD_FORMAT_INTERACTIVE; + case 9: + return AD_FORMAT_INTERSTITIAL; + case 10: + return AD_FORMAT_IN_FEED; + case 11: + return AD_FORMAT_IN_STREAM; + case 12: + return AD_FORMAT_IN_STREAM_SKIPPABLE; + case 13: + return AD_FORMAT_IN_STREAM_NON_SKIPPABLE; + case 14: + return AD_FORMAT_NATIVE; + case 15: + return AD_FORMAT_SHORTS; + case 16: + return AD_FORMAT_STORY; + case 17: + return AD_FORMAT_SPONSORED; + case 18: + return AD_FORMAT_VIDEO; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public AdFormat findValueByNumber(int number) { + return AdFormat.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.ads.datamanager.v1.AdEventProto.getDescriptor().getEnumTypes().get(1); + } + + private static final AdFormat[] VALUES = values(); + + public static AdFormat valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private AdFormat(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.ads.datamanager.v1.AdFormat) +} diff --git a/java-datamanager/proto-data-manager-v1/src/main/java/com/google/ads/datamanager/v1/AdPlacement.java b/java-datamanager/proto-data-manager-v1/src/main/java/com/google/ads/datamanager/v1/AdPlacement.java new file mode 100644 index 000000000000..a2e459867d9c --- /dev/null +++ b/java-datamanager/proto-data-manager-v1/src/main/java/com/google/ads/datamanager/v1/AdPlacement.java @@ -0,0 +1,352 @@ +/* + * 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/ads/datamanager/v1/ad_event.proto +// Protobuf Java Version: 4.33.2 + +package com.google.ads.datamanager.v1; + +/** + * + * + *
+ * The placement of the ad served.
+ * 
+ * + * Protobuf enum {@code google.ads.datamanager.v1.AdPlacement} + */ +@com.google.protobuf.Generated +public enum AdPlacement implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+   * Unspecified ad placement.
+   * 
+ * + * AD_PLACEMENT_UNSPECIFIED = 0; + */ + AD_PLACEMENT_UNSPECIFIED(0), + /** + * + * + *
+   * Discover placement.
+   * 
+ * + * AD_PLACEMENT_DISCOVER = 1; + */ + AD_PLACEMENT_DISCOVER(1), + /** + * + * + *
+   * Feed placement.
+   * 
+ * + * AD_PLACEMENT_FEED = 2; + */ + AD_PLACEMENT_FEED(2), + /** + * + * + *
+   * Footer placement.
+   * 
+ * + * AD_PLACEMENT_FOOTER = 3; + */ + AD_PLACEMENT_FOOTER(3), + /** + * + * + *
+   * Header placement.
+   * 
+ * + * AD_PLACEMENT_HEADER = 4; + */ + AD_PLACEMENT_HEADER(4), + /** + * + * + *
+   * Home placement.
+   * 
+ * + * AD_PLACEMENT_HOME = 5; + */ + AD_PLACEMENT_HOME(5), + /** + * + * + *
+   * In-content placement.
+   * 
+ * + * AD_PLACEMENT_IN_CONTENT = 6; + */ + AD_PLACEMENT_IN_CONTENT(6), + /** + * + * + *
+   * Promoted placement.
+   * 
+ * + * AD_PLACEMENT_PROMOTED = 7; + */ + AD_PLACEMENT_PROMOTED(7), + /** + * + * + *
+   * Search placement.
+   * 
+ * + * AD_PLACEMENT_SEARCH = 8; + */ + AD_PLACEMENT_SEARCH(8), + /** + * + * + *
+   * Story placement.
+   * 
+ * + * AD_PLACEMENT_STORY = 9; + */ + AD_PLACEMENT_STORY(9), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "AdPlacement"); + } + + /** + * + * + *
+   * Unspecified ad placement.
+   * 
+ * + * AD_PLACEMENT_UNSPECIFIED = 0; + */ + public static final int AD_PLACEMENT_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+   * Discover placement.
+   * 
+ * + * AD_PLACEMENT_DISCOVER = 1; + */ + public static final int AD_PLACEMENT_DISCOVER_VALUE = 1; + + /** + * + * + *
+   * Feed placement.
+   * 
+ * + * AD_PLACEMENT_FEED = 2; + */ + public static final int AD_PLACEMENT_FEED_VALUE = 2; + + /** + * + * + *
+   * Footer placement.
+   * 
+ * + * AD_PLACEMENT_FOOTER = 3; + */ + public static final int AD_PLACEMENT_FOOTER_VALUE = 3; + + /** + * + * + *
+   * Header placement.
+   * 
+ * + * AD_PLACEMENT_HEADER = 4; + */ + public static final int AD_PLACEMENT_HEADER_VALUE = 4; + + /** + * + * + *
+   * Home placement.
+   * 
+ * + * AD_PLACEMENT_HOME = 5; + */ + public static final int AD_PLACEMENT_HOME_VALUE = 5; + + /** + * + * + *
+   * In-content placement.
+   * 
+ * + * AD_PLACEMENT_IN_CONTENT = 6; + */ + public static final int AD_PLACEMENT_IN_CONTENT_VALUE = 6; + + /** + * + * + *
+   * Promoted placement.
+   * 
+ * + * AD_PLACEMENT_PROMOTED = 7; + */ + public static final int AD_PLACEMENT_PROMOTED_VALUE = 7; + + /** + * + * + *
+   * Search placement.
+   * 
+ * + * AD_PLACEMENT_SEARCH = 8; + */ + public static final int AD_PLACEMENT_SEARCH_VALUE = 8; + + /** + * + * + *
+   * Story placement.
+   * 
+ * + * AD_PLACEMENT_STORY = 9; + */ + public static final int AD_PLACEMENT_STORY_VALUE = 9; + + 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 AdPlacement 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 AdPlacement forNumber(int value) { + switch (value) { + case 0: + return AD_PLACEMENT_UNSPECIFIED; + case 1: + return AD_PLACEMENT_DISCOVER; + case 2: + return AD_PLACEMENT_FEED; + case 3: + return AD_PLACEMENT_FOOTER; + case 4: + return AD_PLACEMENT_HEADER; + case 5: + return AD_PLACEMENT_HOME; + case 6: + return AD_PLACEMENT_IN_CONTENT; + case 7: + return AD_PLACEMENT_PROMOTED; + case 8: + return AD_PLACEMENT_SEARCH; + case 9: + return AD_PLACEMENT_STORY; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public AdPlacement findValueByNumber(int number) { + return AdPlacement.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.ads.datamanager.v1.AdEventProto.getDescriptor().getEnumTypes().get(2); + } + + private static final AdPlacement[] VALUES = values(); + + public static AdPlacement valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private AdPlacement(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.ads.datamanager.v1.AdPlacement) +} diff --git a/java-datamanager/proto-data-manager-v1/src/main/java/com/google/ads/datamanager/v1/AdType.java b/java-datamanager/proto-data-manager-v1/src/main/java/com/google/ads/datamanager/v1/AdType.java new file mode 100644 index 000000000000..8986c9978274 --- /dev/null +++ b/java-datamanager/proto-data-manager-v1/src/main/java/com/google/ads/datamanager/v1/AdType.java @@ -0,0 +1,306 @@ +/* + * 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/ads/datamanager/v1/ad_event.proto +// Protobuf Java Version: 4.33.2 + +package com.google.ads.datamanager.v1; + +/** + * + * + *
+ * The type of the ad served.
+ * 
+ * + * Protobuf enum {@code google.ads.datamanager.v1.AdType} + */ +@com.google.protobuf.Generated +public enum AdType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+   * Unspecified ad type.
+   * 
+ * + * AD_TYPE_UNSPECIFIED = 0; + */ + AD_TYPE_UNSPECIFIED(0), + /** + * + * + *
+   * Display ad.
+   * 
+ * + * AD_TYPE_DISPLAY = 1; + */ + AD_TYPE_DISPLAY(1), + /** + * + * + *
+   * Text ad.
+   * 
+ * + * AD_TYPE_TEXT = 2; + */ + AD_TYPE_TEXT(2), + /** + * + * + *
+   * Image ad.
+   * 
+ * + * AD_TYPE_IMAGE = 3; + */ + AD_TYPE_IMAGE(3), + /** + * + * + *
+   * Rich media ad.
+   * 
+ * + * AD_TYPE_RICH_MEDIA = 4; + */ + AD_TYPE_RICH_MEDIA(4), + /** + * + * + *
+   * HTML ad.
+   * 
+ * + * AD_TYPE_HTML = 5; + */ + AD_TYPE_HTML(5), + /** + * + * + *
+   * Audio ad.
+   * 
+ * + * AD_TYPE_AUDIO = 6; + */ + AD_TYPE_AUDIO(6), + /** + * + * + *
+   * Video ad.
+   * 
+ * + * AD_TYPE_VIDEO = 7; + */ + AD_TYPE_VIDEO(7), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "AdType"); + } + + /** + * + * + *
+   * Unspecified ad type.
+   * 
+ * + * AD_TYPE_UNSPECIFIED = 0; + */ + public static final int AD_TYPE_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+   * Display ad.
+   * 
+ * + * AD_TYPE_DISPLAY = 1; + */ + public static final int AD_TYPE_DISPLAY_VALUE = 1; + + /** + * + * + *
+   * Text ad.
+   * 
+ * + * AD_TYPE_TEXT = 2; + */ + public static final int AD_TYPE_TEXT_VALUE = 2; + + /** + * + * + *
+   * Image ad.
+   * 
+ * + * AD_TYPE_IMAGE = 3; + */ + public static final int AD_TYPE_IMAGE_VALUE = 3; + + /** + * + * + *
+   * Rich media ad.
+   * 
+ * + * AD_TYPE_RICH_MEDIA = 4; + */ + public static final int AD_TYPE_RICH_MEDIA_VALUE = 4; + + /** + * + * + *
+   * HTML ad.
+   * 
+ * + * AD_TYPE_HTML = 5; + */ + public static final int AD_TYPE_HTML_VALUE = 5; + + /** + * + * + *
+   * Audio ad.
+   * 
+ * + * AD_TYPE_AUDIO = 6; + */ + public static final int AD_TYPE_AUDIO_VALUE = 6; + + /** + * + * + *
+   * Video ad.
+   * 
+ * + * AD_TYPE_VIDEO = 7; + */ + public static final int AD_TYPE_VIDEO_VALUE = 7; + + 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 AdType 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 AdType forNumber(int value) { + switch (value) { + case 0: + return AD_TYPE_UNSPECIFIED; + case 1: + return AD_TYPE_DISPLAY; + case 2: + return AD_TYPE_TEXT; + case 3: + return AD_TYPE_IMAGE; + case 4: + return AD_TYPE_RICH_MEDIA; + case 5: + return AD_TYPE_HTML; + case 6: + return AD_TYPE_AUDIO; + case 7: + return AD_TYPE_VIDEO; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public AdType findValueByNumber(int number) { + return AdType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.ads.datamanager.v1.AdEventProto.getDescriptor().getEnumTypes().get(0); + } + + private static final AdType[] VALUES = values(); + + public static AdType valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private AdType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.ads.datamanager.v1.AdType) +} diff --git a/java-datamanager/proto-data-manager-v1/src/main/java/com/google/ads/datamanager/v1/AttributionHint.java b/java-datamanager/proto-data-manager-v1/src/main/java/com/google/ads/datamanager/v1/AttributionHint.java new file mode 100644 index 000000000000..8314f6bf3c3d --- /dev/null +++ b/java-datamanager/proto-data-manager-v1/src/main/java/com/google/ads/datamanager/v1/AttributionHint.java @@ -0,0 +1,191 @@ +/* + * 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/ads/datamanager/v1/ad_event.proto +// Protobuf Java Version: 4.33.2 + +package com.google.ads.datamanager.v1; + +/** + * + * + *
+ * The partner-assumed attribution status for this ad event.
+ * 
+ * + * Protobuf enum {@code google.ads.datamanager.v1.AttributionHint} + */ +@com.google.protobuf.Generated +public enum AttributionHint implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+   * Unknown attribution status.
+   * 
+ * + * ATTRIBUTION_HINT_UNSPECIFIED = 0; + */ + ATTRIBUTION_HINT_UNSPECIFIED(0), + /** + * + * + *
+   * Converted status.
+   * 
+ * + * ATTRIBUTION_HINT_CONVERTED = 1; + */ + ATTRIBUTION_HINT_CONVERTED(1), + /** + * + * + *
+   * Not converted status.
+   * 
+ * + * ATTRIBUTION_HINT_NOT_CONVERTED = 2; + */ + ATTRIBUTION_HINT_NOT_CONVERTED(2), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "AttributionHint"); + } + + /** + * + * + *
+   * Unknown attribution status.
+   * 
+ * + * ATTRIBUTION_HINT_UNSPECIFIED = 0; + */ + public static final int ATTRIBUTION_HINT_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+   * Converted status.
+   * 
+ * + * ATTRIBUTION_HINT_CONVERTED = 1; + */ + public static final int ATTRIBUTION_HINT_CONVERTED_VALUE = 1; + + /** + * + * + *
+   * Not converted status.
+   * 
+ * + * ATTRIBUTION_HINT_NOT_CONVERTED = 2; + */ + public static final int ATTRIBUTION_HINT_NOT_CONVERTED_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 AttributionHint 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 AttributionHint forNumber(int value) { + switch (value) { + case 0: + return ATTRIBUTION_HINT_UNSPECIFIED; + case 1: + return ATTRIBUTION_HINT_CONVERTED; + case 2: + return ATTRIBUTION_HINT_NOT_CONVERTED; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public AttributionHint findValueByNumber(int number) { + return AttributionHint.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.ads.datamanager.v1.AdEventProto.getDescriptor().getEnumTypes().get(6); + } + + private static final AttributionHint[] VALUES = values(); + + public static AttributionHint valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private AttributionHint(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.ads.datamanager.v1.AttributionHint) +} diff --git a/java-datamanager/proto-data-manager-v1/src/main/java/com/google/ads/datamanager/v1/CoordinatorKeyInfo.java b/java-datamanager/proto-data-manager-v1/src/main/java/com/google/ads/datamanager/v1/CoordinatorKeyInfo.java new file mode 100644 index 000000000000..67deae3a3a8a --- /dev/null +++ b/java-datamanager/proto-data-manager-v1/src/main/java/com/google/ads/datamanager/v1/CoordinatorKeyInfo.java @@ -0,0 +1,596 @@ +/* + * 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/ads/datamanager/v1/encryption_info.proto +// Protobuf Java Version: 4.33.2 + +package com.google.ads.datamanager.v1; + +/** + * + * + *
+ * Information about the coordinator key.
+ * 
+ * + * Protobuf type {@code google.ads.datamanager.v1.CoordinatorKeyInfo} + */ +@com.google.protobuf.Generated +public final class CoordinatorKeyInfo extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.ads.datamanager.v1.CoordinatorKeyInfo) + CoordinatorKeyInfoOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "CoordinatorKeyInfo"); + } + + // Use CoordinatorKeyInfo.newBuilder() to construct. + private CoordinatorKeyInfo(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private CoordinatorKeyInfo() { + keyId_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.ads.datamanager.v1.EncryptionInfoProto + .internal_static_google_ads_datamanager_v1_CoordinatorKeyInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.ads.datamanager.v1.EncryptionInfoProto + .internal_static_google_ads_datamanager_v1_CoordinatorKeyInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.ads.datamanager.v1.CoordinatorKeyInfo.class, + com.google.ads.datamanager.v1.CoordinatorKeyInfo.Builder.class); + } + + public static final int KEY_ID_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object keyId_ = ""; + + /** + * + * + *
+   * Required. The ID of the chosen coordinator key.
+   * 
+ * + * string key_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The keyId. + */ + @java.lang.Override + public java.lang.String getKeyId() { + java.lang.Object ref = keyId_; + 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(); + keyId_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. The ID of the chosen coordinator key.
+   * 
+ * + * string key_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for keyId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getKeyIdBytes() { + java.lang.Object ref = keyId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + keyId_ = 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 { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(keyId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, keyId_); + } + 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(keyId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, keyId_); + } + 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.ads.datamanager.v1.CoordinatorKeyInfo)) { + return super.equals(obj); + } + com.google.ads.datamanager.v1.CoordinatorKeyInfo other = + (com.google.ads.datamanager.v1.CoordinatorKeyInfo) obj; + + if (!getKeyId().equals(other.getKeyId())) 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) + KEY_ID_FIELD_NUMBER; + hash = (53 * hash) + getKeyId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.ads.datamanager.v1.CoordinatorKeyInfo parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.ads.datamanager.v1.CoordinatorKeyInfo parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.ads.datamanager.v1.CoordinatorKeyInfo parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.ads.datamanager.v1.CoordinatorKeyInfo 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.ads.datamanager.v1.CoordinatorKeyInfo parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.ads.datamanager.v1.CoordinatorKeyInfo parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.ads.datamanager.v1.CoordinatorKeyInfo parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.ads.datamanager.v1.CoordinatorKeyInfo 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.ads.datamanager.v1.CoordinatorKeyInfo parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.ads.datamanager.v1.CoordinatorKeyInfo 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.ads.datamanager.v1.CoordinatorKeyInfo parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.ads.datamanager.v1.CoordinatorKeyInfo 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.ads.datamanager.v1.CoordinatorKeyInfo 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; + } + + /** + * + * + *
+   * Information about the coordinator key.
+   * 
+ * + * Protobuf type {@code google.ads.datamanager.v1.CoordinatorKeyInfo} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.ads.datamanager.v1.CoordinatorKeyInfo) + com.google.ads.datamanager.v1.CoordinatorKeyInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.ads.datamanager.v1.EncryptionInfoProto + .internal_static_google_ads_datamanager_v1_CoordinatorKeyInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.ads.datamanager.v1.EncryptionInfoProto + .internal_static_google_ads_datamanager_v1_CoordinatorKeyInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.ads.datamanager.v1.CoordinatorKeyInfo.class, + com.google.ads.datamanager.v1.CoordinatorKeyInfo.Builder.class); + } + + // Construct using com.google.ads.datamanager.v1.CoordinatorKeyInfo.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + keyId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.ads.datamanager.v1.EncryptionInfoProto + .internal_static_google_ads_datamanager_v1_CoordinatorKeyInfo_descriptor; + } + + @java.lang.Override + public com.google.ads.datamanager.v1.CoordinatorKeyInfo getDefaultInstanceForType() { + return com.google.ads.datamanager.v1.CoordinatorKeyInfo.getDefaultInstance(); + } + + @java.lang.Override + public com.google.ads.datamanager.v1.CoordinatorKeyInfo build() { + com.google.ads.datamanager.v1.CoordinatorKeyInfo result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.ads.datamanager.v1.CoordinatorKeyInfo buildPartial() { + com.google.ads.datamanager.v1.CoordinatorKeyInfo result = + new com.google.ads.datamanager.v1.CoordinatorKeyInfo(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.ads.datamanager.v1.CoordinatorKeyInfo result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.keyId_ = keyId_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.ads.datamanager.v1.CoordinatorKeyInfo) { + return mergeFrom((com.google.ads.datamanager.v1.CoordinatorKeyInfo) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.ads.datamanager.v1.CoordinatorKeyInfo other) { + if (other == com.google.ads.datamanager.v1.CoordinatorKeyInfo.getDefaultInstance()) + return this; + if (!other.getKeyId().isEmpty()) { + keyId_ = other.keyId_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + keyId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object keyId_ = ""; + + /** + * + * + *
+     * Required. The ID of the chosen coordinator key.
+     * 
+ * + * string key_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The keyId. + */ + public java.lang.String getKeyId() { + java.lang.Object ref = keyId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + keyId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. The ID of the chosen coordinator key.
+     * 
+ * + * string key_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for keyId. + */ + public com.google.protobuf.ByteString getKeyIdBytes() { + java.lang.Object ref = keyId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + keyId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. The ID of the chosen coordinator key.
+     * 
+ * + * string key_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The keyId to set. + * @return This builder for chaining. + */ + public Builder setKeyId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + keyId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The ID of the chosen coordinator key.
+     * 
+ * + * string key_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearKeyId() { + keyId_ = getDefaultInstance().getKeyId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The ID of the chosen coordinator key.
+     * 
+ * + * string key_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for keyId to set. + * @return This builder for chaining. + */ + public Builder setKeyIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + keyId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.ads.datamanager.v1.CoordinatorKeyInfo) + } + + // @@protoc_insertion_point(class_scope:google.ads.datamanager.v1.CoordinatorKeyInfo) + private static final com.google.ads.datamanager.v1.CoordinatorKeyInfo DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.ads.datamanager.v1.CoordinatorKeyInfo(); + } + + public static com.google.ads.datamanager.v1.CoordinatorKeyInfo getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CoordinatorKeyInfo parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.ads.datamanager.v1.CoordinatorKeyInfo getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-datamanager/proto-data-manager-v1/src/main/java/com/google/ads/datamanager/v1/CoordinatorKeyInfoOrBuilder.java b/java-datamanager/proto-data-manager-v1/src/main/java/com/google/ads/datamanager/v1/CoordinatorKeyInfoOrBuilder.java new file mode 100644 index 000000000000..6824701d1ac5 --- /dev/null +++ b/java-datamanager/proto-data-manager-v1/src/main/java/com/google/ads/datamanager/v1/CoordinatorKeyInfoOrBuilder.java @@ -0,0 +1,54 @@ +/* + * 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/ads/datamanager/v1/encryption_info.proto +// Protobuf Java Version: 4.33.2 + +package com.google.ads.datamanager.v1; + +@com.google.protobuf.Generated +public interface CoordinatorKeyInfoOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.ads.datamanager.v1.CoordinatorKeyInfo) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The ID of the chosen coordinator key.
+   * 
+ * + * string key_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The keyId. + */ + java.lang.String getKeyId(); + + /** + * + * + *
+   * Required. The ID of the chosen coordinator key.
+   * 
+ * + * string key_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for keyId. + */ + com.google.protobuf.ByteString getKeyIdBytes(); +} diff --git a/java-datamanager/proto-data-manager-v1/src/main/java/com/google/ads/datamanager/v1/DestinationProto.java b/java-datamanager/proto-data-manager-v1/src/main/java/com/google/ads/datamanager/v1/DestinationProto.java index c727d6c7d905..5e368705cb97 100644 --- a/java-datamanager/proto-data-manager-v1/src/main/java/com/google/ads/datamanager/v1/DestinationProto.java +++ b/java-datamanager/proto-data-manager-v1/src/main/java/com/google/ads/datamanager/v1/DestinationProto.java @@ -72,7 +72,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "amanager.v1.ProductB\002\030\001\022\027\n\naccount_id\030\002 " + "\001(\tB\003\340A\002\022P\n\014account_type\030\003 \001(\01625.google." + "ads.datamanager.v1.ProductAccount.Accoun" - + "tTypeB\003\340A\001\"\341\001\n\013AccountType\022\034\n\030ACCOUNT_TY" + + "tTypeB\003\340A\002\"\341\001\n\013AccountType\022\034\n\030ACCOUNT_TY" + "PE_UNSPECIFIED\020\000\022\016\n\nGOOGLE_ADS\020\001\022\031\n\025DISP" + "LAY_VIDEO_PARTNER\020\002\022\034\n\030DISPLAY_VIDEO_ADV" + "ERTISER\020\003\022\020\n\014DATA_PARTNER\020\004\022\035\n\031GOOGLE_AN" diff --git a/java-datamanager/proto-data-manager-v1/src/main/java/com/google/ads/datamanager/v1/DeviceInfo.java b/java-datamanager/proto-data-manager-v1/src/main/java/com/google/ads/datamanager/v1/DeviceInfo.java index 351ed6d813c8..4bae5dcb334a 100644 --- a/java-datamanager/proto-data-manager-v1/src/main/java/com/google/ads/datamanager/v1/DeviceInfo.java +++ b/java-datamanager/proto-data-manager-v1/src/main/java/com/google/ads/datamanager/v1/DeviceInfo.java @@ -154,7 +154,9 @@ public com.google.protobuf.ByteString getUserAgentBytes() { * more details. * * - * string ip_address = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * string ip_address = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * * * @return The ipAddress. */ @@ -188,7 +190,9 @@ public java.lang.String getIpAddress() { * more details. * * - * string ip_address = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * string ip_address = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * * * @return The bytes for ipAddress. */ @@ -1367,7 +1371,9 @@ public Builder setUserAgentBytes(com.google.protobuf.ByteString value) { * more details. * * - * string ip_address = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * string ip_address = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * * * @return The ipAddress. */ @@ -1400,7 +1406,9 @@ public java.lang.String getIpAddress() { * more details. * * - * string ip_address = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * string ip_address = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * * * @return The bytes for ipAddress. */ @@ -1433,7 +1441,9 @@ public com.google.protobuf.ByteString getIpAddressBytes() { * more details. * * - * string ip_address = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * string ip_address = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * * * @param value The ipAddress to set. * @return This builder for chaining. @@ -1465,7 +1475,9 @@ public Builder setIpAddress(java.lang.String value) { * more details. * * - * string ip_address = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * string ip_address = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * * * @return This builder for chaining. */ @@ -1493,7 +1505,9 @@ public Builder clearIpAddress() { * more details. * * - * string ip_address = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * string ip_address = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * * * @param value The bytes for ipAddress to set. * @return This builder for chaining. diff --git a/java-datamanager/proto-data-manager-v1/src/main/java/com/google/ads/datamanager/v1/DeviceInfoOrBuilder.java b/java-datamanager/proto-data-manager-v1/src/main/java/com/google/ads/datamanager/v1/DeviceInfoOrBuilder.java index 149a8edde854..06d257129aa3 100644 --- a/java-datamanager/proto-data-manager-v1/src/main/java/com/google/ads/datamanager/v1/DeviceInfoOrBuilder.java +++ b/java-datamanager/proto-data-manager-v1/src/main/java/com/google/ads/datamanager/v1/DeviceInfoOrBuilder.java @@ -69,7 +69,9 @@ public interface DeviceInfoOrBuilder * more details. * * - * string ip_address = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * string ip_address = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * * * @return The ipAddress. */ @@ -92,7 +94,9 @@ public interface DeviceInfoOrBuilder * more details. * * - * string ip_address = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * string ip_address = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * * * @return The bytes for ipAddress. */ diff --git a/java-datamanager/proto-data-manager-v1/src/main/java/com/google/ads/datamanager/v1/DeviceInfoProto.java b/java-datamanager/proto-data-manager-v1/src/main/java/com/google/ads/datamanager/v1/DeviceInfoProto.java index 6b3820a7d1d2..dadd1661f238 100644 --- a/java-datamanager/proto-data-manager-v1/src/main/java/com/google/ads/datamanager/v1/DeviceInfoProto.java +++ b/java-datamanager/proto-data-manager-v1/src/main/java/com/google/ads/datamanager/v1/DeviceInfoProto.java @@ -55,10 +55,11 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { java.lang.String[] descriptorData = { "\n" + "+google/ads/datamanager/v1/device_info." - + "proto\022\031google.ads.datamanager.v1\032\037google/api/field_behavior.proto\"\312\002\n\n" + + "proto\022\031google.ads.datamanager.v1\032\037google" + + "/api/field_behavior.proto\032\033google/api/field_info.proto\"\322\002\n\n" + "DeviceInfo\022\027\n\n" - + "user_agent\030\001 \001(\tB\003\340A\001\022\027\n\n" - + "ip_address\030\002 \001(\tB\003\340A\001\022\025\n" + + "user_agent\030\001 \001(\tB\003\340A\001\022\037\n\n" + + "ip_address\030\002 \001(\tB\013\340A\001\342\214\317\327\010\002\010\004\022\025\n" + "\010category\030\003 \001(\tB\003\340A\001\022\032\n\r" + "language_code\030\004 \001(\tB\003\340A\001\022\032\n\r" + "screen_height\030\005 \001(\005B\003\340A\001\022\031\n" @@ -70,17 +71,18 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + " \001(\tB\003\340A\001\022\024\n" + "\007browser\030\013 \001(\tB\003\340A\001\022\034\n" + "\017browser_version\030\014 \001(\tB\003\340A\001B\314\001\n" - + "\035com.google.ads.datamanager.v1B\017Device" - + "InfoProtoP\001ZAcloud.google.com/go/dataman" - + "ager/apiv1/datamanagerpb;datamanagerpb\252\002" - + "\031Google.Ads.DataManager.V1\312\002\031Google\\Ads\\" - + "DataManager\\V1\352\002\034Google::Ads::DataManager::V1b\006proto3" + + "\035com.google.ads.datamanager.v1B\017DeviceInf" + + "oProtoP\001ZAcloud.google.com/go/datamanage" + + "r/apiv1/datamanagerpb;datamanagerpb\252\002\031Go" + + "ogle.Ads.DataManager.V1\312\002\031Google\\Ads\\Dat" + + "aManager\\V1\352\002\034Google::Ads::DataManager::V1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] { com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.FieldInfoProto.getDescriptor(), }); internal_static_google_ads_datamanager_v1_DeviceInfo_descriptor = getDescriptor().getMessageType(0); @@ -103,9 +105,11 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { }); descriptor.resolveAllFeaturesImmutable(); com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.FieldInfoProto.getDescriptor(); com.google.protobuf.ExtensionRegistry registry = com.google.protobuf.ExtensionRegistry.newInstance(); registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.FieldInfoProto.fieldInfo); com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( descriptor, registry); } diff --git a/java-datamanager/proto-data-manager-v1/src/main/java/com/google/ads/datamanager/v1/EncryptionInfo.java b/java-datamanager/proto-data-manager-v1/src/main/java/com/google/ads/datamanager/v1/EncryptionInfo.java index f2393e373a81..9f475c68fa97 100644 --- a/java-datamanager/proto-data-manager-v1/src/main/java/com/google/ads/datamanager/v1/EncryptionInfo.java +++ b/java-datamanager/proto-data-manager-v1/src/main/java/com/google/ads/datamanager/v1/EncryptionInfo.java @@ -79,6 +79,7 @@ public enum WrappedKeyCase com.google.protobuf.AbstractMessage.InternalOneOfEnum { GCP_WRAPPED_KEY_INFO(1), AWS_WRAPPED_KEY_INFO(2), + COORDINATOR_KEY_INFO(3), WRAPPEDKEY_NOT_SET(0); private final int value; @@ -102,6 +103,8 @@ public static WrappedKeyCase forNumber(int value) { return GCP_WRAPPED_KEY_INFO; case 2: return AWS_WRAPPED_KEY_INFO; + case 3: + return COORDINATOR_KEY_INFO; case 0: return WRAPPEDKEY_NOT_SET; default: @@ -226,6 +229,82 @@ public com.google.ads.datamanager.v1.AwsWrappedKeyInfoOrBuilder getAwsWrappedKey return com.google.ads.datamanager.v1.AwsWrappedKeyInfo.getDefaultInstance(); } + public static final int COORDINATOR_KEY_INFO_FIELD_NUMBER = 3; + + /** + * + * + *
+   * Key information for the chosen coordinator key.
+   *
+   * This is not supported for the
+   * [IngestEvents][google.ads.datamanager.v1.IngestionService.IngestEvents],
+   * [IngestAudienceMembers][google.ads.datamanager.v1.IngestionService.IngestAudienceMembers],
+   * and
+   * [RemoveAudienceMembers][google.ads.datamanager.v1.IngestionService.RemoveAudienceMembers]
+   * methods.
+   * 
+ * + * .google.ads.datamanager.v1.CoordinatorKeyInfo coordinator_key_info = 3; + * + * @return Whether the coordinatorKeyInfo field is set. + */ + @java.lang.Override + public boolean hasCoordinatorKeyInfo() { + return wrappedKeyCase_ == 3; + } + + /** + * + * + *
+   * Key information for the chosen coordinator key.
+   *
+   * This is not supported for the
+   * [IngestEvents][google.ads.datamanager.v1.IngestionService.IngestEvents],
+   * [IngestAudienceMembers][google.ads.datamanager.v1.IngestionService.IngestAudienceMembers],
+   * and
+   * [RemoveAudienceMembers][google.ads.datamanager.v1.IngestionService.RemoveAudienceMembers]
+   * methods.
+   * 
+ * + * .google.ads.datamanager.v1.CoordinatorKeyInfo coordinator_key_info = 3; + * + * @return The coordinatorKeyInfo. + */ + @java.lang.Override + public com.google.ads.datamanager.v1.CoordinatorKeyInfo getCoordinatorKeyInfo() { + if (wrappedKeyCase_ == 3) { + return (com.google.ads.datamanager.v1.CoordinatorKeyInfo) wrappedKey_; + } + return com.google.ads.datamanager.v1.CoordinatorKeyInfo.getDefaultInstance(); + } + + /** + * + * + *
+   * Key information for the chosen coordinator key.
+   *
+   * This is not supported for the
+   * [IngestEvents][google.ads.datamanager.v1.IngestionService.IngestEvents],
+   * [IngestAudienceMembers][google.ads.datamanager.v1.IngestionService.IngestAudienceMembers],
+   * and
+   * [RemoveAudienceMembers][google.ads.datamanager.v1.IngestionService.RemoveAudienceMembers]
+   * methods.
+   * 
+ * + * .google.ads.datamanager.v1.CoordinatorKeyInfo coordinator_key_info = 3; + */ + @java.lang.Override + public com.google.ads.datamanager.v1.CoordinatorKeyInfoOrBuilder + getCoordinatorKeyInfoOrBuilder() { + if (wrappedKeyCase_ == 3) { + return (com.google.ads.datamanager.v1.CoordinatorKeyInfo) wrappedKey_; + } + return com.google.ads.datamanager.v1.CoordinatorKeyInfo.getDefaultInstance(); + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -246,6 +325,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (wrappedKeyCase_ == 2) { output.writeMessage(2, (com.google.ads.datamanager.v1.AwsWrappedKeyInfo) wrappedKey_); } + if (wrappedKeyCase_ == 3) { + output.writeMessage(3, (com.google.ads.datamanager.v1.CoordinatorKeyInfo) wrappedKey_); + } getUnknownFields().writeTo(output); } @@ -265,6 +347,11 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 2, (com.google.ads.datamanager.v1.AwsWrappedKeyInfo) wrappedKey_); } + if (wrappedKeyCase_ == 3) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 3, (com.google.ads.datamanager.v1.CoordinatorKeyInfo) wrappedKey_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -289,6 +376,9 @@ public boolean equals(final java.lang.Object obj) { case 2: if (!getAwsWrappedKeyInfo().equals(other.getAwsWrappedKeyInfo())) return false; break; + case 3: + if (!getCoordinatorKeyInfo().equals(other.getCoordinatorKeyInfo())) return false; + break; case 0: default: } @@ -312,6 +402,10 @@ public int hashCode() { hash = (37 * hash) + AWS_WRAPPED_KEY_INFO_FIELD_NUMBER; hash = (53 * hash) + getAwsWrappedKeyInfo().hashCode(); break; + case 3: + hash = (37 * hash) + COORDINATOR_KEY_INFO_FIELD_NUMBER; + hash = (53 * hash) + getCoordinatorKeyInfo().hashCode(); + break; case 0: default: } @@ -461,6 +555,9 @@ public Builder clear() { if (awsWrappedKeyInfoBuilder_ != null) { awsWrappedKeyInfoBuilder_.clear(); } + if (coordinatorKeyInfoBuilder_ != null) { + coordinatorKeyInfoBuilder_.clear(); + } wrappedKeyCase_ = 0; wrappedKey_ = null; return this; @@ -511,6 +608,9 @@ private void buildPartialOneofs(com.google.ads.datamanager.v1.EncryptionInfo res if (wrappedKeyCase_ == 2 && awsWrappedKeyInfoBuilder_ != null) { result.wrappedKey_ = awsWrappedKeyInfoBuilder_.build(); } + if (wrappedKeyCase_ == 3 && coordinatorKeyInfoBuilder_ != null) { + result.wrappedKey_ = coordinatorKeyInfoBuilder_.build(); + } } @java.lang.Override @@ -536,6 +636,11 @@ public Builder mergeFrom(com.google.ads.datamanager.v1.EncryptionInfo other) { mergeAwsWrappedKeyInfo(other.getAwsWrappedKeyInfo()); break; } + case COORDINATOR_KEY_INFO: + { + mergeCoordinatorKeyInfo(other.getCoordinatorKeyInfo()); + break; + } case WRAPPEDKEY_NOT_SET: { break; @@ -581,6 +686,13 @@ public Builder mergeFrom( wrappedKeyCase_ = 2; break; } // case 18 + case 26: + { + input.readMessage( + internalGetCoordinatorKeyInfoFieldBuilder().getBuilder(), extensionRegistry); + wrappedKeyCase_ = 3; + break; + } // case 26 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -1054,6 +1166,289 @@ public com.google.ads.datamanager.v1.AwsWrappedKeyInfo.Builder getAwsWrappedKeyI return awsWrappedKeyInfoBuilder_; } + private com.google.protobuf.SingleFieldBuilder< + com.google.ads.datamanager.v1.CoordinatorKeyInfo, + com.google.ads.datamanager.v1.CoordinatorKeyInfo.Builder, + com.google.ads.datamanager.v1.CoordinatorKeyInfoOrBuilder> + coordinatorKeyInfoBuilder_; + + /** + * + * + *
+     * Key information for the chosen coordinator key.
+     *
+     * This is not supported for the
+     * [IngestEvents][google.ads.datamanager.v1.IngestionService.IngestEvents],
+     * [IngestAudienceMembers][google.ads.datamanager.v1.IngestionService.IngestAudienceMembers],
+     * and
+     * [RemoveAudienceMembers][google.ads.datamanager.v1.IngestionService.RemoveAudienceMembers]
+     * methods.
+     * 
+ * + * .google.ads.datamanager.v1.CoordinatorKeyInfo coordinator_key_info = 3; + * + * @return Whether the coordinatorKeyInfo field is set. + */ + @java.lang.Override + public boolean hasCoordinatorKeyInfo() { + return wrappedKeyCase_ == 3; + } + + /** + * + * + *
+     * Key information for the chosen coordinator key.
+     *
+     * This is not supported for the
+     * [IngestEvents][google.ads.datamanager.v1.IngestionService.IngestEvents],
+     * [IngestAudienceMembers][google.ads.datamanager.v1.IngestionService.IngestAudienceMembers],
+     * and
+     * [RemoveAudienceMembers][google.ads.datamanager.v1.IngestionService.RemoveAudienceMembers]
+     * methods.
+     * 
+ * + * .google.ads.datamanager.v1.CoordinatorKeyInfo coordinator_key_info = 3; + * + * @return The coordinatorKeyInfo. + */ + @java.lang.Override + public com.google.ads.datamanager.v1.CoordinatorKeyInfo getCoordinatorKeyInfo() { + if (coordinatorKeyInfoBuilder_ == null) { + if (wrappedKeyCase_ == 3) { + return (com.google.ads.datamanager.v1.CoordinatorKeyInfo) wrappedKey_; + } + return com.google.ads.datamanager.v1.CoordinatorKeyInfo.getDefaultInstance(); + } else { + if (wrappedKeyCase_ == 3) { + return coordinatorKeyInfoBuilder_.getMessage(); + } + return com.google.ads.datamanager.v1.CoordinatorKeyInfo.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Key information for the chosen coordinator key.
+     *
+     * This is not supported for the
+     * [IngestEvents][google.ads.datamanager.v1.IngestionService.IngestEvents],
+     * [IngestAudienceMembers][google.ads.datamanager.v1.IngestionService.IngestAudienceMembers],
+     * and
+     * [RemoveAudienceMembers][google.ads.datamanager.v1.IngestionService.RemoveAudienceMembers]
+     * methods.
+     * 
+ * + * .google.ads.datamanager.v1.CoordinatorKeyInfo coordinator_key_info = 3; + */ + public Builder setCoordinatorKeyInfo(com.google.ads.datamanager.v1.CoordinatorKeyInfo value) { + if (coordinatorKeyInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + wrappedKey_ = value; + onChanged(); + } else { + coordinatorKeyInfoBuilder_.setMessage(value); + } + wrappedKeyCase_ = 3; + return this; + } + + /** + * + * + *
+     * Key information for the chosen coordinator key.
+     *
+     * This is not supported for the
+     * [IngestEvents][google.ads.datamanager.v1.IngestionService.IngestEvents],
+     * [IngestAudienceMembers][google.ads.datamanager.v1.IngestionService.IngestAudienceMembers],
+     * and
+     * [RemoveAudienceMembers][google.ads.datamanager.v1.IngestionService.RemoveAudienceMembers]
+     * methods.
+     * 
+ * + * .google.ads.datamanager.v1.CoordinatorKeyInfo coordinator_key_info = 3; + */ + public Builder setCoordinatorKeyInfo( + com.google.ads.datamanager.v1.CoordinatorKeyInfo.Builder builderForValue) { + if (coordinatorKeyInfoBuilder_ == null) { + wrappedKey_ = builderForValue.build(); + onChanged(); + } else { + coordinatorKeyInfoBuilder_.setMessage(builderForValue.build()); + } + wrappedKeyCase_ = 3; + return this; + } + + /** + * + * + *
+     * Key information for the chosen coordinator key.
+     *
+     * This is not supported for the
+     * [IngestEvents][google.ads.datamanager.v1.IngestionService.IngestEvents],
+     * [IngestAudienceMembers][google.ads.datamanager.v1.IngestionService.IngestAudienceMembers],
+     * and
+     * [RemoveAudienceMembers][google.ads.datamanager.v1.IngestionService.RemoveAudienceMembers]
+     * methods.
+     * 
+ * + * .google.ads.datamanager.v1.CoordinatorKeyInfo coordinator_key_info = 3; + */ + public Builder mergeCoordinatorKeyInfo(com.google.ads.datamanager.v1.CoordinatorKeyInfo value) { + if (coordinatorKeyInfoBuilder_ == null) { + if (wrappedKeyCase_ == 3 + && wrappedKey_ + != com.google.ads.datamanager.v1.CoordinatorKeyInfo.getDefaultInstance()) { + wrappedKey_ = + com.google.ads.datamanager.v1.CoordinatorKeyInfo.newBuilder( + (com.google.ads.datamanager.v1.CoordinatorKeyInfo) wrappedKey_) + .mergeFrom(value) + .buildPartial(); + } else { + wrappedKey_ = value; + } + onChanged(); + } else { + if (wrappedKeyCase_ == 3) { + coordinatorKeyInfoBuilder_.mergeFrom(value); + } else { + coordinatorKeyInfoBuilder_.setMessage(value); + } + } + wrappedKeyCase_ = 3; + return this; + } + + /** + * + * + *
+     * Key information for the chosen coordinator key.
+     *
+     * This is not supported for the
+     * [IngestEvents][google.ads.datamanager.v1.IngestionService.IngestEvents],
+     * [IngestAudienceMembers][google.ads.datamanager.v1.IngestionService.IngestAudienceMembers],
+     * and
+     * [RemoveAudienceMembers][google.ads.datamanager.v1.IngestionService.RemoveAudienceMembers]
+     * methods.
+     * 
+ * + * .google.ads.datamanager.v1.CoordinatorKeyInfo coordinator_key_info = 3; + */ + public Builder clearCoordinatorKeyInfo() { + if (coordinatorKeyInfoBuilder_ == null) { + if (wrappedKeyCase_ == 3) { + wrappedKeyCase_ = 0; + wrappedKey_ = null; + onChanged(); + } + } else { + if (wrappedKeyCase_ == 3) { + wrappedKeyCase_ = 0; + wrappedKey_ = null; + } + coordinatorKeyInfoBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Key information for the chosen coordinator key.
+     *
+     * This is not supported for the
+     * [IngestEvents][google.ads.datamanager.v1.IngestionService.IngestEvents],
+     * [IngestAudienceMembers][google.ads.datamanager.v1.IngestionService.IngestAudienceMembers],
+     * and
+     * [RemoveAudienceMembers][google.ads.datamanager.v1.IngestionService.RemoveAudienceMembers]
+     * methods.
+     * 
+ * + * .google.ads.datamanager.v1.CoordinatorKeyInfo coordinator_key_info = 3; + */ + public com.google.ads.datamanager.v1.CoordinatorKeyInfo.Builder getCoordinatorKeyInfoBuilder() { + return internalGetCoordinatorKeyInfoFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Key information for the chosen coordinator key.
+     *
+     * This is not supported for the
+     * [IngestEvents][google.ads.datamanager.v1.IngestionService.IngestEvents],
+     * [IngestAudienceMembers][google.ads.datamanager.v1.IngestionService.IngestAudienceMembers],
+     * and
+     * [RemoveAudienceMembers][google.ads.datamanager.v1.IngestionService.RemoveAudienceMembers]
+     * methods.
+     * 
+ * + * .google.ads.datamanager.v1.CoordinatorKeyInfo coordinator_key_info = 3; + */ + @java.lang.Override + public com.google.ads.datamanager.v1.CoordinatorKeyInfoOrBuilder + getCoordinatorKeyInfoOrBuilder() { + if ((wrappedKeyCase_ == 3) && (coordinatorKeyInfoBuilder_ != null)) { + return coordinatorKeyInfoBuilder_.getMessageOrBuilder(); + } else { + if (wrappedKeyCase_ == 3) { + return (com.google.ads.datamanager.v1.CoordinatorKeyInfo) wrappedKey_; + } + return com.google.ads.datamanager.v1.CoordinatorKeyInfo.getDefaultInstance(); + } + } + + /** + * + * + *
+     * Key information for the chosen coordinator key.
+     *
+     * This is not supported for the
+     * [IngestEvents][google.ads.datamanager.v1.IngestionService.IngestEvents],
+     * [IngestAudienceMembers][google.ads.datamanager.v1.IngestionService.IngestAudienceMembers],
+     * and
+     * [RemoveAudienceMembers][google.ads.datamanager.v1.IngestionService.RemoveAudienceMembers]
+     * methods.
+     * 
+ * + * .google.ads.datamanager.v1.CoordinatorKeyInfo coordinator_key_info = 3; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.ads.datamanager.v1.CoordinatorKeyInfo, + com.google.ads.datamanager.v1.CoordinatorKeyInfo.Builder, + com.google.ads.datamanager.v1.CoordinatorKeyInfoOrBuilder> + internalGetCoordinatorKeyInfoFieldBuilder() { + if (coordinatorKeyInfoBuilder_ == null) { + if (!(wrappedKeyCase_ == 3)) { + wrappedKey_ = com.google.ads.datamanager.v1.CoordinatorKeyInfo.getDefaultInstance(); + } + coordinatorKeyInfoBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.ads.datamanager.v1.CoordinatorKeyInfo, + com.google.ads.datamanager.v1.CoordinatorKeyInfo.Builder, + com.google.ads.datamanager.v1.CoordinatorKeyInfoOrBuilder>( + (com.google.ads.datamanager.v1.CoordinatorKeyInfo) wrappedKey_, + getParentForChildren(), + isClean()); + wrappedKey_ = null; + } + wrappedKeyCase_ = 3; + onChanged(); + return coordinatorKeyInfoBuilder_; + } + // @@protoc_insertion_point(builder_scope:google.ads.datamanager.v1.EncryptionInfo) } diff --git a/java-datamanager/proto-data-manager-v1/src/main/java/com/google/ads/datamanager/v1/EncryptionInfoOrBuilder.java b/java-datamanager/proto-data-manager-v1/src/main/java/com/google/ads/datamanager/v1/EncryptionInfoOrBuilder.java index a7b5a9b555ea..f7408b37f6ae 100644 --- a/java-datamanager/proto-data-manager-v1/src/main/java/com/google/ads/datamanager/v1/EncryptionInfoOrBuilder.java +++ b/java-datamanager/proto-data-manager-v1/src/main/java/com/google/ads/datamanager/v1/EncryptionInfoOrBuilder.java @@ -100,5 +100,63 @@ public interface EncryptionInfoOrBuilder */ com.google.ads.datamanager.v1.AwsWrappedKeyInfoOrBuilder getAwsWrappedKeyInfoOrBuilder(); + /** + * + * + *
+   * Key information for the chosen coordinator key.
+   *
+   * This is not supported for the
+   * [IngestEvents][google.ads.datamanager.v1.IngestionService.IngestEvents],
+   * [IngestAudienceMembers][google.ads.datamanager.v1.IngestionService.IngestAudienceMembers],
+   * and
+   * [RemoveAudienceMembers][google.ads.datamanager.v1.IngestionService.RemoveAudienceMembers]
+   * methods.
+   * 
+ * + * .google.ads.datamanager.v1.CoordinatorKeyInfo coordinator_key_info = 3; + * + * @return Whether the coordinatorKeyInfo field is set. + */ + boolean hasCoordinatorKeyInfo(); + + /** + * + * + *
+   * Key information for the chosen coordinator key.
+   *
+   * This is not supported for the
+   * [IngestEvents][google.ads.datamanager.v1.IngestionService.IngestEvents],
+   * [IngestAudienceMembers][google.ads.datamanager.v1.IngestionService.IngestAudienceMembers],
+   * and
+   * [RemoveAudienceMembers][google.ads.datamanager.v1.IngestionService.RemoveAudienceMembers]
+   * methods.
+   * 
+ * + * .google.ads.datamanager.v1.CoordinatorKeyInfo coordinator_key_info = 3; + * + * @return The coordinatorKeyInfo. + */ + com.google.ads.datamanager.v1.CoordinatorKeyInfo getCoordinatorKeyInfo(); + + /** + * + * + *
+   * Key information for the chosen coordinator key.
+   *
+   * This is not supported for the
+   * [IngestEvents][google.ads.datamanager.v1.IngestionService.IngestEvents],
+   * [IngestAudienceMembers][google.ads.datamanager.v1.IngestionService.IngestAudienceMembers],
+   * and
+   * [RemoveAudienceMembers][google.ads.datamanager.v1.IngestionService.RemoveAudienceMembers]
+   * methods.
+   * 
+ * + * .google.ads.datamanager.v1.CoordinatorKeyInfo coordinator_key_info = 3; + */ + com.google.ads.datamanager.v1.CoordinatorKeyInfoOrBuilder getCoordinatorKeyInfoOrBuilder(); + com.google.ads.datamanager.v1.EncryptionInfo.WrappedKeyCase getWrappedKeyCase(); } diff --git a/java-datamanager/proto-data-manager-v1/src/main/java/com/google/ads/datamanager/v1/EncryptionInfoProto.java b/java-datamanager/proto-data-manager-v1/src/main/java/com/google/ads/datamanager/v1/EncryptionInfoProto.java index cc530e5c4306..d1c53cc2812c 100644 --- a/java-datamanager/proto-data-manager-v1/src/main/java/com/google/ads/datamanager/v1/EncryptionInfoProto.java +++ b/java-datamanager/proto-data-manager-v1/src/main/java/com/google/ads/datamanager/v1/EncryptionInfoProto.java @@ -52,6 +52,10 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_ads_datamanager_v1_AwsWrappedKeyInfo_descriptor; static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_ads_datamanager_v1_AwsWrappedKeyInfo_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_ads_datamanager_v1_CoordinatorKeyInfo_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_ads_datamanager_v1_CoordinatorKeyInfo_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { return descriptor; @@ -63,16 +67,18 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { java.lang.String[] descriptorData = { "\n" + "/google/ads/datamanager/v1/encryption_i" - + "nfo.proto\022\031google.ads.datamanager.v1\032\037google/api/field_behavior.proto\"\273\001\n" + + "nfo.proto\022\031google.ads.datamanager.v1\032\037google/api/field_behavior.proto\"\212\002\n" + "\016EncryptionInfo\022L\n" + "\024gcp_wrapped_key_info\030\001 \001(\0132," + ".google.ads.datamanager.v1.GcpWrappedKeyInfoH\000\022L\n" + "\024aws_wrapped_key_info\030\002 \001(\0132,.g" - + "oogle.ads.datamanager.v1.AwsWrappedKeyInfoH\000B\r\n" + + "oogle.ads.datamanager.v1.AwsWrappedKeyInfoH\000\022M\n" + + "\024coordinator_key_info\030\003 \001(\0132-.goo" + + "gle.ads.datamanager.v1.CoordinatorKeyInfoH\000B\r\n" + "\013wrapped_key\"\352\001\n" + "\021GcpWrappedKeyInfo\022K\n" - + "\010key_type\030\001 \001(\01624.google.ads.dataman" - + "ager.v1.GcpWrappedKeyInfo.KeyTypeB\003\340A\002\022\031\n" + + "\010key_type\030\001" + + " \001(\01624.google.ads.datamanager.v1.GcpWrappedKeyInfo.KeyTypeB\003\340A\002\022\031\n" + "\014wip_provider\030\002 \001(\tB\003\340A\002\022\024\n" + "\007kek_uri\030\003 \001(\tB\003\340A\002\022\032\n\r" + "encrypted_dek\030\004 \001(\tB\003\340A\002\";\n" @@ -87,12 +93,14 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "encrypted_dek\030\004 \001(\tB\003\340A\002\";\n" + "\007KeyType\022\030\n" + "\024KEY_TYPE_UNSPECIFIED\020\000\022\026\n" - + "\022XCHACHA20_POLY1305\020\001B\320\001\n" - + "\035com.google.ads.datamanager.v1B\023EncryptionInfoProtoP\001ZAcloud.google" - + ".com/go/datamanager/apiv1/datamanagerpb;" - + "datamanagerpb\252\002\031Google.Ads.DataManager.V" - + "1\312\002\031Google\\Ads\\DataManager\\V1\352\002\034Google::" - + "Ads::DataManager::V1b\006proto3" + + "\022XCHACHA20_POLY1305\020\001\")\n" + + "\022CoordinatorKeyInfo\022\023\n" + + "\006key_id\030\001 \001(\tB\003\340A\002B\320\001\n" + + "\035com.google.ads.datamanager.v1B\023EncryptionInfoProtoP\001ZAcloud.goog" + + "le.com/go/datamanager/apiv1/datamanagerp" + + "b;datamanagerpb\252\002\031Google.Ads.DataManager" + + ".V1\312\002\031Google\\Ads\\DataManager\\V1\352\002\034Google" + + "::Ads::DataManager::V1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -106,7 +114,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_ads_datamanager_v1_EncryptionInfo_descriptor, new java.lang.String[] { - "GcpWrappedKeyInfo", "AwsWrappedKeyInfo", "WrappedKey", + "GcpWrappedKeyInfo", "AwsWrappedKeyInfo", "CoordinatorKeyInfo", "WrappedKey", }); internal_static_google_ads_datamanager_v1_GcpWrappedKeyInfo_descriptor = getDescriptor().getMessageType(1); @@ -124,6 +132,14 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "KeyType", "RoleArn", "KekUri", "EncryptedDek", }); + internal_static_google_ads_datamanager_v1_CoordinatorKeyInfo_descriptor = + getDescriptor().getMessageType(3); + internal_static_google_ads_datamanager_v1_CoordinatorKeyInfo_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_ads_datamanager_v1_CoordinatorKeyInfo_descriptor, + new java.lang.String[] { + "KeyId", + }); descriptor.resolveAllFeaturesImmutable(); com.google.api.FieldBehaviorProto.getDescriptor(); com.google.protobuf.ExtensionRegistry registry = diff --git a/java-datamanager/proto-data-manager-v1/src/main/java/com/google/ads/datamanager/v1/ErrorReason.java b/java-datamanager/proto-data-manager-v1/src/main/java/com/google/ads/datamanager/v1/ErrorReason.java index 0a382ea940f0..951020b8e456 100644 --- a/java-datamanager/proto-data-manager-v1/src/main/java/com/google/ads/datamanager/v1/ErrorReason.java +++ b/java-datamanager/proto-data-manager-v1/src/main/java/com/google/ads/datamanager/v1/ErrorReason.java @@ -431,6 +431,8 @@ public enum ErrorReason implements com.google.protobuf.ProtocolMessageEnum { * *
    * Events data contains no user identifiers or ad identifiers.
+   * For Floodlight Event ingestion this error indicates requests contains no ad
+   * identifiers.
    * 
* * NO_IDENTIFIERS_PROVIDED = 39; @@ -1732,6 +1734,8 @@ public enum ErrorReason implements com.google.protobuf.ProtocolMessageEnum { * *
    * Events data contains no user identifiers or ad identifiers.
+   * For Floodlight Event ingestion this error indicates requests contains no ad
+   * identifiers.
    * 
* * NO_IDENTIFIERS_PROVIDED = 39; diff --git a/java-datamanager/proto-data-manager-v1/src/main/java/com/google/ads/datamanager/v1/FeatureSet.java b/java-datamanager/proto-data-manager-v1/src/main/java/com/google/ads/datamanager/v1/FeatureSet.java new file mode 100644 index 000000000000..299d60c955e3 --- /dev/null +++ b/java-datamanager/proto-data-manager-v1/src/main/java/com/google/ads/datamanager/v1/FeatureSet.java @@ -0,0 +1,195 @@ +/* + * 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/ads/datamanager/v1/partner_link_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.ads.datamanager.v1; + +/** + * + * + *
+ * The set of supported features for a partner link.
+ * 
+ * + * Protobuf enum {@code google.ads.datamanager.v1.FeatureSet} + */ +@com.google.protobuf.Generated +public enum FeatureSet implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+   * Unspecified feature set. If unspecified, the system behavior defaults to
+   * [FEATURE_SET_AUDIENCE_AND_EVENT_MANAGEMENT][google.ads.datamanager.v1.FeatureSet.FEATURE_SET_AUDIENCE_AND_EVENT_MANAGEMENT].
+   * 
+ * + * FEATURE_SET_UNSPECIFIED = 0; + */ + FEATURE_SET_UNSPECIFIED(0), + /** + * + * + *
+   * Indicates a link used for audience and event management.
+   * 
+ * + * FEATURE_SET_AUDIENCE_AND_EVENT_MANAGEMENT = 1; + */ + FEATURE_SET_AUDIENCE_AND_EVENT_MANAGEMENT(1), + /** + * + * + *
+   * Indicates a link used for ad event management.
+   * 
+ * + * FEATURE_SET_AD_EVENT_MANAGEMENT = 2; + */ + FEATURE_SET_AD_EVENT_MANAGEMENT(2), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "FeatureSet"); + } + + /** + * + * + *
+   * Unspecified feature set. If unspecified, the system behavior defaults to
+   * [FEATURE_SET_AUDIENCE_AND_EVENT_MANAGEMENT][google.ads.datamanager.v1.FeatureSet.FEATURE_SET_AUDIENCE_AND_EVENT_MANAGEMENT].
+   * 
+ * + * FEATURE_SET_UNSPECIFIED = 0; + */ + public static final int FEATURE_SET_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+   * Indicates a link used for audience and event management.
+   * 
+ * + * FEATURE_SET_AUDIENCE_AND_EVENT_MANAGEMENT = 1; + */ + public static final int FEATURE_SET_AUDIENCE_AND_EVENT_MANAGEMENT_VALUE = 1; + + /** + * + * + *
+   * Indicates a link used for ad event management.
+   * 
+ * + * FEATURE_SET_AD_EVENT_MANAGEMENT = 2; + */ + public static final int FEATURE_SET_AD_EVENT_MANAGEMENT_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 FeatureSet 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 FeatureSet forNumber(int value) { + switch (value) { + case 0: + return FEATURE_SET_UNSPECIFIED; + case 1: + return FEATURE_SET_AUDIENCE_AND_EVENT_MANAGEMENT; + case 2: + return FEATURE_SET_AD_EVENT_MANAGEMENT; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public FeatureSet findValueByNumber(int number) { + return FeatureSet.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.ads.datamanager.v1.PartnerLinkServiceProto.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final FeatureSet[] VALUES = values(); + + public static FeatureSet valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private FeatureSet(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.ads.datamanager.v1.FeatureSet) +} diff --git a/java-datamanager/proto-data-manager-v1/src/main/java/com/google/ads/datamanager/v1/IngestAdEventsRequest.java b/java-datamanager/proto-data-manager-v1/src/main/java/com/google/ads/datamanager/v1/IngestAdEventsRequest.java new file mode 100644 index 000000000000..d9c7d6201c14 --- /dev/null +++ b/java-datamanager/proto-data-manager-v1/src/main/java/com/google/ads/datamanager/v1/IngestAdEventsRequest.java @@ -0,0 +1,1396 @@ +/* + * 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/ads/datamanager/v1/ingestion_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.ads.datamanager.v1; + +/** + * + * + *
+ * Request to upload ad events.
+ * 
+ * + * Protobuf type {@code google.ads.datamanager.v1.IngestAdEventsRequest} + */ +@com.google.protobuf.Generated +public final class IngestAdEventsRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.ads.datamanager.v1.IngestAdEventsRequest) + IngestAdEventsRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "IngestAdEventsRequest"); + } + + // Use IngestAdEventsRequest.newBuilder() to construct. + private IngestAdEventsRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private IngestAdEventsRequest() { + adEvents_ = java.util.Collections.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.ads.datamanager.v1.IngestionServiceProto + .internal_static_google_ads_datamanager_v1_IngestAdEventsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.ads.datamanager.v1.IngestionServiceProto + .internal_static_google_ads_datamanager_v1_IngestAdEventsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.ads.datamanager.v1.IngestAdEventsRequest.class, + com.google.ads.datamanager.v1.IngestAdEventsRequest.Builder.class); + } + + private int bitField0_; + public static final int AD_EVENTS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List adEvents_; + + /** + * + * + *
+   * Required. Required (at least 1). A list of ad events.
+   * 
+ * + * + * repeated .google.ads.datamanager.v1.AdEvent ad_events = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public java.util.List getAdEventsList() { + return adEvents_; + } + + /** + * + * + *
+   * Required. Required (at least 1). A list of ad events.
+   * 
+ * + * + * repeated .google.ads.datamanager.v1.AdEvent ad_events = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public java.util.List + getAdEventsOrBuilderList() { + return adEvents_; + } + + /** + * + * + *
+   * Required. Required (at least 1). A list of ad events.
+   * 
+ * + * + * repeated .google.ads.datamanager.v1.AdEvent ad_events = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public int getAdEventsCount() { + return adEvents_.size(); + } + + /** + * + * + *
+   * Required. Required (at least 1). A list of ad events.
+   * 
+ * + * + * repeated .google.ads.datamanager.v1.AdEvent ad_events = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.ads.datamanager.v1.AdEvent getAdEvents(int index) { + return adEvents_.get(index); + } + + /** + * + * + *
+   * Required. Required (at least 1). A list of ad events.
+   * 
+ * + * + * repeated .google.ads.datamanager.v1.AdEvent ad_events = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.ads.datamanager.v1.AdEventOrBuilder getAdEventsOrBuilder(int index) { + return adEvents_.get(index); + } + + public static final int ENCRYPTION_INFO_FIELD_NUMBER = 2; + private com.google.ads.datamanager.v1.EncryptionInfo encryptionInfo_; + + /** + * + * + *
+   * Optional. Information about encryption keys which are used to encrypt the
+   * data.
+   * 
+ * + * + * .google.ads.datamanager.v1.EncryptionInfo encryption_info = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the encryptionInfo field is set. + */ + @java.lang.Override + public boolean hasEncryptionInfo() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Optional. Information about encryption keys which are used to encrypt the
+   * data.
+   * 
+ * + * + * .google.ads.datamanager.v1.EncryptionInfo encryption_info = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The encryptionInfo. + */ + @java.lang.Override + public com.google.ads.datamanager.v1.EncryptionInfo getEncryptionInfo() { + return encryptionInfo_ == null + ? com.google.ads.datamanager.v1.EncryptionInfo.getDefaultInstance() + : encryptionInfo_; + } + + /** + * + * + *
+   * Optional. Information about encryption keys which are used to encrypt the
+   * data.
+   * 
+ * + * + * .google.ads.datamanager.v1.EncryptionInfo encryption_info = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.ads.datamanager.v1.EncryptionInfoOrBuilder getEncryptionInfoOrBuilder() { + return encryptionInfo_ == null + ? com.google.ads.datamanager.v1.EncryptionInfo.getDefaultInstance() + : encryptionInfo_; + } + + public static final int VALIDATE_ONLY_FIELD_NUMBER = 3; + private boolean validateOnly_ = false; + + /** + * + * + *
+   * Optional. If true, the request is validated, but not executed.
+   * 
+ * + * bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The validateOnly. + */ + @java.lang.Override + public boolean getValidateOnly() { + return validateOnly_; + } + + 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 < adEvents_.size(); i++) { + output.writeMessage(1, adEvents_.get(i)); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getEncryptionInfo()); + } + if (validateOnly_ != false) { + output.writeBool(3, validateOnly_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < adEvents_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, adEvents_.get(i)); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getEncryptionInfo()); + } + if (validateOnly_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, validateOnly_); + } + 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.ads.datamanager.v1.IngestAdEventsRequest)) { + return super.equals(obj); + } + com.google.ads.datamanager.v1.IngestAdEventsRequest other = + (com.google.ads.datamanager.v1.IngestAdEventsRequest) obj; + + if (!getAdEventsList().equals(other.getAdEventsList())) return false; + if (hasEncryptionInfo() != other.hasEncryptionInfo()) return false; + if (hasEncryptionInfo()) { + if (!getEncryptionInfo().equals(other.getEncryptionInfo())) return false; + } + if (getValidateOnly() != other.getValidateOnly()) 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 (getAdEventsCount() > 0) { + hash = (37 * hash) + AD_EVENTS_FIELD_NUMBER; + hash = (53 * hash) + getAdEventsList().hashCode(); + } + if (hasEncryptionInfo()) { + hash = (37 * hash) + ENCRYPTION_INFO_FIELD_NUMBER; + hash = (53 * hash) + getEncryptionInfo().hashCode(); + } + hash = (37 * hash) + VALIDATE_ONLY_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getValidateOnly()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.ads.datamanager.v1.IngestAdEventsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.ads.datamanager.v1.IngestAdEventsRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.ads.datamanager.v1.IngestAdEventsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.ads.datamanager.v1.IngestAdEventsRequest 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.ads.datamanager.v1.IngestAdEventsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.ads.datamanager.v1.IngestAdEventsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.ads.datamanager.v1.IngestAdEventsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.ads.datamanager.v1.IngestAdEventsRequest 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.ads.datamanager.v1.IngestAdEventsRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.ads.datamanager.v1.IngestAdEventsRequest 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.ads.datamanager.v1.IngestAdEventsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.ads.datamanager.v1.IngestAdEventsRequest 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.ads.datamanager.v1.IngestAdEventsRequest 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 to upload ad events.
+   * 
+ * + * Protobuf type {@code google.ads.datamanager.v1.IngestAdEventsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.ads.datamanager.v1.IngestAdEventsRequest) + com.google.ads.datamanager.v1.IngestAdEventsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.ads.datamanager.v1.IngestionServiceProto + .internal_static_google_ads_datamanager_v1_IngestAdEventsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.ads.datamanager.v1.IngestionServiceProto + .internal_static_google_ads_datamanager_v1_IngestAdEventsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.ads.datamanager.v1.IngestAdEventsRequest.class, + com.google.ads.datamanager.v1.IngestAdEventsRequest.Builder.class); + } + + // Construct using com.google.ads.datamanager.v1.IngestAdEventsRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetAdEventsFieldBuilder(); + internalGetEncryptionInfoFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (adEventsBuilder_ == null) { + adEvents_ = java.util.Collections.emptyList(); + } else { + adEvents_ = null; + adEventsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + encryptionInfo_ = null; + if (encryptionInfoBuilder_ != null) { + encryptionInfoBuilder_.dispose(); + encryptionInfoBuilder_ = null; + } + validateOnly_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.ads.datamanager.v1.IngestionServiceProto + .internal_static_google_ads_datamanager_v1_IngestAdEventsRequest_descriptor; + } + + @java.lang.Override + public com.google.ads.datamanager.v1.IngestAdEventsRequest getDefaultInstanceForType() { + return com.google.ads.datamanager.v1.IngestAdEventsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.ads.datamanager.v1.IngestAdEventsRequest build() { + com.google.ads.datamanager.v1.IngestAdEventsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.ads.datamanager.v1.IngestAdEventsRequest buildPartial() { + com.google.ads.datamanager.v1.IngestAdEventsRequest result = + new com.google.ads.datamanager.v1.IngestAdEventsRequest(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.ads.datamanager.v1.IngestAdEventsRequest result) { + if (adEventsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + adEvents_ = java.util.Collections.unmodifiableList(adEvents_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.adEvents_ = adEvents_; + } else { + result.adEvents_ = adEventsBuilder_.build(); + } + } + + private void buildPartial0(com.google.ads.datamanager.v1.IngestAdEventsRequest result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.encryptionInfo_ = + encryptionInfoBuilder_ == null ? encryptionInfo_ : encryptionInfoBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.validateOnly_ = validateOnly_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.ads.datamanager.v1.IngestAdEventsRequest) { + return mergeFrom((com.google.ads.datamanager.v1.IngestAdEventsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.ads.datamanager.v1.IngestAdEventsRequest other) { + if (other == com.google.ads.datamanager.v1.IngestAdEventsRequest.getDefaultInstance()) + return this; + if (adEventsBuilder_ == null) { + if (!other.adEvents_.isEmpty()) { + if (adEvents_.isEmpty()) { + adEvents_ = other.adEvents_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureAdEventsIsMutable(); + adEvents_.addAll(other.adEvents_); + } + onChanged(); + } + } else { + if (!other.adEvents_.isEmpty()) { + if (adEventsBuilder_.isEmpty()) { + adEventsBuilder_.dispose(); + adEventsBuilder_ = null; + adEvents_ = other.adEvents_; + bitField0_ = (bitField0_ & ~0x00000001); + adEventsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetAdEventsFieldBuilder() + : null; + } else { + adEventsBuilder_.addAllMessages(other.adEvents_); + } + } + } + if (other.hasEncryptionInfo()) { + mergeEncryptionInfo(other.getEncryptionInfo()); + } + if (other.getValidateOnly() != false) { + setValidateOnly(other.getValidateOnly()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.ads.datamanager.v1.AdEvent m = + input.readMessage( + com.google.ads.datamanager.v1.AdEvent.parser(), extensionRegistry); + if (adEventsBuilder_ == null) { + ensureAdEventsIsMutable(); + adEvents_.add(m); + } else { + adEventsBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + input.readMessage( + internalGetEncryptionInfoFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: + { + validateOnly_ = input.readBool(); + bitField0_ |= 0x00000004; + break; + } // case 24 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List adEvents_ = + java.util.Collections.emptyList(); + + private void ensureAdEventsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + adEvents_ = new java.util.ArrayList(adEvents_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.ads.datamanager.v1.AdEvent, + com.google.ads.datamanager.v1.AdEvent.Builder, + com.google.ads.datamanager.v1.AdEventOrBuilder> + adEventsBuilder_; + + /** + * + * + *
+     * Required. Required (at least 1). A list of ad events.
+     * 
+ * + * + * repeated .google.ads.datamanager.v1.AdEvent ad_events = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List getAdEventsList() { + if (adEventsBuilder_ == null) { + return java.util.Collections.unmodifiableList(adEvents_); + } else { + return adEventsBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * Required. Required (at least 1). A list of ad events.
+     * 
+ * + * + * repeated .google.ads.datamanager.v1.AdEvent ad_events = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public int getAdEventsCount() { + if (adEventsBuilder_ == null) { + return adEvents_.size(); + } else { + return adEventsBuilder_.getCount(); + } + } + + /** + * + * + *
+     * Required. Required (at least 1). A list of ad events.
+     * 
+ * + * + * repeated .google.ads.datamanager.v1.AdEvent ad_events = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.ads.datamanager.v1.AdEvent getAdEvents(int index) { + if (adEventsBuilder_ == null) { + return adEvents_.get(index); + } else { + return adEventsBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * Required. Required (at least 1). A list of ad events.
+     * 
+ * + * + * repeated .google.ads.datamanager.v1.AdEvent ad_events = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setAdEvents(int index, com.google.ads.datamanager.v1.AdEvent value) { + if (adEventsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAdEventsIsMutable(); + adEvents_.set(index, value); + onChanged(); + } else { + adEventsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Required. Required (at least 1). A list of ad events.
+     * 
+ * + * + * repeated .google.ads.datamanager.v1.AdEvent ad_events = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setAdEvents( + int index, com.google.ads.datamanager.v1.AdEvent.Builder builderForValue) { + if (adEventsBuilder_ == null) { + ensureAdEventsIsMutable(); + adEvents_.set(index, builderForValue.build()); + onChanged(); + } else { + adEventsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Required. Required (at least 1). A list of ad events.
+     * 
+ * + * + * repeated .google.ads.datamanager.v1.AdEvent ad_events = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addAdEvents(com.google.ads.datamanager.v1.AdEvent value) { + if (adEventsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAdEventsIsMutable(); + adEvents_.add(value); + onChanged(); + } else { + adEventsBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * Required. Required (at least 1). A list of ad events.
+     * 
+ * + * + * repeated .google.ads.datamanager.v1.AdEvent ad_events = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addAdEvents(int index, com.google.ads.datamanager.v1.AdEvent value) { + if (adEventsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAdEventsIsMutable(); + adEvents_.add(index, value); + onChanged(); + } else { + adEventsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Required. Required (at least 1). A list of ad events.
+     * 
+ * + * + * repeated .google.ads.datamanager.v1.AdEvent ad_events = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addAdEvents(com.google.ads.datamanager.v1.AdEvent.Builder builderForValue) { + if (adEventsBuilder_ == null) { + ensureAdEventsIsMutable(); + adEvents_.add(builderForValue.build()); + onChanged(); + } else { + adEventsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Required. Required (at least 1). A list of ad events.
+     * 
+ * + * + * repeated .google.ads.datamanager.v1.AdEvent ad_events = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addAdEvents( + int index, com.google.ads.datamanager.v1.AdEvent.Builder builderForValue) { + if (adEventsBuilder_ == null) { + ensureAdEventsIsMutable(); + adEvents_.add(index, builderForValue.build()); + onChanged(); + } else { + adEventsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Required. Required (at least 1). A list of ad events.
+     * 
+ * + * + * repeated .google.ads.datamanager.v1.AdEvent ad_events = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addAllAdEvents( + java.lang.Iterable values) { + if (adEventsBuilder_ == null) { + ensureAdEventsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, adEvents_); + onChanged(); + } else { + adEventsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * Required. Required (at least 1). A list of ad events.
+     * 
+ * + * + * repeated .google.ads.datamanager.v1.AdEvent ad_events = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearAdEvents() { + if (adEventsBuilder_ == null) { + adEvents_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + adEventsBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Required. Required (at least 1). A list of ad events.
+     * 
+ * + * + * repeated .google.ads.datamanager.v1.AdEvent ad_events = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder removeAdEvents(int index) { + if (adEventsBuilder_ == null) { + ensureAdEventsIsMutable(); + adEvents_.remove(index); + onChanged(); + } else { + adEventsBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * Required. Required (at least 1). A list of ad events.
+     * 
+ * + * + * repeated .google.ads.datamanager.v1.AdEvent ad_events = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.ads.datamanager.v1.AdEvent.Builder getAdEventsBuilder(int index) { + return internalGetAdEventsFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * Required. Required (at least 1). A list of ad events.
+     * 
+ * + * + * repeated .google.ads.datamanager.v1.AdEvent ad_events = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.ads.datamanager.v1.AdEventOrBuilder getAdEventsOrBuilder(int index) { + if (adEventsBuilder_ == null) { + return adEvents_.get(index); + } else { + return adEventsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * Required. Required (at least 1). A list of ad events.
+     * 
+ * + * + * repeated .google.ads.datamanager.v1.AdEvent ad_events = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List + getAdEventsOrBuilderList() { + if (adEventsBuilder_ != null) { + return adEventsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(adEvents_); + } + } + + /** + * + * + *
+     * Required. Required (at least 1). A list of ad events.
+     * 
+ * + * + * repeated .google.ads.datamanager.v1.AdEvent ad_events = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.ads.datamanager.v1.AdEvent.Builder addAdEventsBuilder() { + return internalGetAdEventsFieldBuilder() + .addBuilder(com.google.ads.datamanager.v1.AdEvent.getDefaultInstance()); + } + + /** + * + * + *
+     * Required. Required (at least 1). A list of ad events.
+     * 
+ * + * + * repeated .google.ads.datamanager.v1.AdEvent ad_events = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.ads.datamanager.v1.AdEvent.Builder addAdEventsBuilder(int index) { + return internalGetAdEventsFieldBuilder() + .addBuilder(index, com.google.ads.datamanager.v1.AdEvent.getDefaultInstance()); + } + + /** + * + * + *
+     * Required. Required (at least 1). A list of ad events.
+     * 
+ * + * + * repeated .google.ads.datamanager.v1.AdEvent ad_events = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List getAdEventsBuilderList() { + return internalGetAdEventsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.ads.datamanager.v1.AdEvent, + com.google.ads.datamanager.v1.AdEvent.Builder, + com.google.ads.datamanager.v1.AdEventOrBuilder> + internalGetAdEventsFieldBuilder() { + if (adEventsBuilder_ == null) { + adEventsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.ads.datamanager.v1.AdEvent, + com.google.ads.datamanager.v1.AdEvent.Builder, + com.google.ads.datamanager.v1.AdEventOrBuilder>( + adEvents_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + adEvents_ = null; + } + return adEventsBuilder_; + } + + private com.google.ads.datamanager.v1.EncryptionInfo encryptionInfo_; + private com.google.protobuf.SingleFieldBuilder< + com.google.ads.datamanager.v1.EncryptionInfo, + com.google.ads.datamanager.v1.EncryptionInfo.Builder, + com.google.ads.datamanager.v1.EncryptionInfoOrBuilder> + encryptionInfoBuilder_; + + /** + * + * + *
+     * Optional. Information about encryption keys which are used to encrypt the
+     * data.
+     * 
+ * + * + * .google.ads.datamanager.v1.EncryptionInfo encryption_info = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the encryptionInfo field is set. + */ + public boolean hasEncryptionInfo() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+     * Optional. Information about encryption keys which are used to encrypt the
+     * data.
+     * 
+ * + * + * .google.ads.datamanager.v1.EncryptionInfo encryption_info = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The encryptionInfo. + */ + public com.google.ads.datamanager.v1.EncryptionInfo getEncryptionInfo() { + if (encryptionInfoBuilder_ == null) { + return encryptionInfo_ == null + ? com.google.ads.datamanager.v1.EncryptionInfo.getDefaultInstance() + : encryptionInfo_; + } else { + return encryptionInfoBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Optional. Information about encryption keys which are used to encrypt the
+     * data.
+     * 
+ * + * + * .google.ads.datamanager.v1.EncryptionInfo encryption_info = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setEncryptionInfo(com.google.ads.datamanager.v1.EncryptionInfo value) { + if (encryptionInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + encryptionInfo_ = value; + } else { + encryptionInfoBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Information about encryption keys which are used to encrypt the
+     * data.
+     * 
+ * + * + * .google.ads.datamanager.v1.EncryptionInfo encryption_info = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setEncryptionInfo( + com.google.ads.datamanager.v1.EncryptionInfo.Builder builderForValue) { + if (encryptionInfoBuilder_ == null) { + encryptionInfo_ = builderForValue.build(); + } else { + encryptionInfoBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Information about encryption keys which are used to encrypt the
+     * data.
+     * 
+ * + * + * .google.ads.datamanager.v1.EncryptionInfo encryption_info = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeEncryptionInfo(com.google.ads.datamanager.v1.EncryptionInfo value) { + if (encryptionInfoBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && encryptionInfo_ != null + && encryptionInfo_ + != com.google.ads.datamanager.v1.EncryptionInfo.getDefaultInstance()) { + getEncryptionInfoBuilder().mergeFrom(value); + } else { + encryptionInfo_ = value; + } + } else { + encryptionInfoBuilder_.mergeFrom(value); + } + if (encryptionInfo_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Optional. Information about encryption keys which are used to encrypt the
+     * data.
+     * 
+ * + * + * .google.ads.datamanager.v1.EncryptionInfo encryption_info = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearEncryptionInfo() { + bitField0_ = (bitField0_ & ~0x00000002); + encryptionInfo_ = null; + if (encryptionInfoBuilder_ != null) { + encryptionInfoBuilder_.dispose(); + encryptionInfoBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Information about encryption keys which are used to encrypt the
+     * data.
+     * 
+ * + * + * .google.ads.datamanager.v1.EncryptionInfo encryption_info = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.ads.datamanager.v1.EncryptionInfo.Builder getEncryptionInfoBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return internalGetEncryptionInfoFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. Information about encryption keys which are used to encrypt the
+     * data.
+     * 
+ * + * + * .google.ads.datamanager.v1.EncryptionInfo encryption_info = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.ads.datamanager.v1.EncryptionInfoOrBuilder getEncryptionInfoOrBuilder() { + if (encryptionInfoBuilder_ != null) { + return encryptionInfoBuilder_.getMessageOrBuilder(); + } else { + return encryptionInfo_ == null + ? com.google.ads.datamanager.v1.EncryptionInfo.getDefaultInstance() + : encryptionInfo_; + } + } + + /** + * + * + *
+     * Optional. Information about encryption keys which are used to encrypt the
+     * data.
+     * 
+ * + * + * .google.ads.datamanager.v1.EncryptionInfo encryption_info = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.ads.datamanager.v1.EncryptionInfo, + com.google.ads.datamanager.v1.EncryptionInfo.Builder, + com.google.ads.datamanager.v1.EncryptionInfoOrBuilder> + internalGetEncryptionInfoFieldBuilder() { + if (encryptionInfoBuilder_ == null) { + encryptionInfoBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.ads.datamanager.v1.EncryptionInfo, + com.google.ads.datamanager.v1.EncryptionInfo.Builder, + com.google.ads.datamanager.v1.EncryptionInfoOrBuilder>( + getEncryptionInfo(), getParentForChildren(), isClean()); + encryptionInfo_ = null; + } + return encryptionInfoBuilder_; + } + + private boolean validateOnly_; + + /** + * + * + *
+     * Optional. If true, the request is validated, but not executed.
+     * 
+ * + * bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The validateOnly. + */ + @java.lang.Override + public boolean getValidateOnly() { + return validateOnly_; + } + + /** + * + * + *
+     * Optional. If true, the request is validated, but not executed.
+     * 
+ * + * bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The validateOnly to set. + * @return This builder for chaining. + */ + public Builder setValidateOnly(boolean value) { + + validateOnly_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. If true, the request is validated, but not executed.
+     * 
+ * + * bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearValidateOnly() { + bitField0_ = (bitField0_ & ~0x00000004); + validateOnly_ = false; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.ads.datamanager.v1.IngestAdEventsRequest) + } + + // @@protoc_insertion_point(class_scope:google.ads.datamanager.v1.IngestAdEventsRequest) + private static final com.google.ads.datamanager.v1.IngestAdEventsRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.ads.datamanager.v1.IngestAdEventsRequest(); + } + + public static com.google.ads.datamanager.v1.IngestAdEventsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public IngestAdEventsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.ads.datamanager.v1.IngestAdEventsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-datamanager/proto-data-manager-v1/src/main/java/com/google/ads/datamanager/v1/IngestAdEventsRequestOrBuilder.java b/java-datamanager/proto-data-manager-v1/src/main/java/com/google/ads/datamanager/v1/IngestAdEventsRequestOrBuilder.java new file mode 100644 index 000000000000..6d600a7fe862 --- /dev/null +++ b/java-datamanager/proto-data-manager-v1/src/main/java/com/google/ads/datamanager/v1/IngestAdEventsRequestOrBuilder.java @@ -0,0 +1,153 @@ +/* + * 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/ads/datamanager/v1/ingestion_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.ads.datamanager.v1; + +@com.google.protobuf.Generated +public interface IngestAdEventsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.ads.datamanager.v1.IngestAdEventsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Required (at least 1). A list of ad events.
+   * 
+ * + * + * repeated .google.ads.datamanager.v1.AdEvent ad_events = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + java.util.List getAdEventsList(); + + /** + * + * + *
+   * Required. Required (at least 1). A list of ad events.
+   * 
+ * + * + * repeated .google.ads.datamanager.v1.AdEvent ad_events = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.ads.datamanager.v1.AdEvent getAdEvents(int index); + + /** + * + * + *
+   * Required. Required (at least 1). A list of ad events.
+   * 
+ * + * + * repeated .google.ads.datamanager.v1.AdEvent ad_events = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + int getAdEventsCount(); + + /** + * + * + *
+   * Required. Required (at least 1). A list of ad events.
+   * 
+ * + * + * repeated .google.ads.datamanager.v1.AdEvent ad_events = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + java.util.List + getAdEventsOrBuilderList(); + + /** + * + * + *
+   * Required. Required (at least 1). A list of ad events.
+   * 
+ * + * + * repeated .google.ads.datamanager.v1.AdEvent ad_events = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.ads.datamanager.v1.AdEventOrBuilder getAdEventsOrBuilder(int index); + + /** + * + * + *
+   * Optional. Information about encryption keys which are used to encrypt the
+   * data.
+   * 
+ * + * + * .google.ads.datamanager.v1.EncryptionInfo encryption_info = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the encryptionInfo field is set. + */ + boolean hasEncryptionInfo(); + + /** + * + * + *
+   * Optional. Information about encryption keys which are used to encrypt the
+   * data.
+   * 
+ * + * + * .google.ads.datamanager.v1.EncryptionInfo encryption_info = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The encryptionInfo. + */ + com.google.ads.datamanager.v1.EncryptionInfo getEncryptionInfo(); + + /** + * + * + *
+   * Optional. Information about encryption keys which are used to encrypt the
+   * data.
+   * 
+ * + * + * .google.ads.datamanager.v1.EncryptionInfo encryption_info = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.ads.datamanager.v1.EncryptionInfoOrBuilder getEncryptionInfoOrBuilder(); + + /** + * + * + *
+   * Optional. If true, the request is validated, but not executed.
+   * 
+ * + * bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The validateOnly. + */ + boolean getValidateOnly(); +} diff --git a/java-datamanager/proto-data-manager-v1/src/main/java/com/google/ads/datamanager/v1/IngestAdEventsResponse.java b/java-datamanager/proto-data-manager-v1/src/main/java/com/google/ads/datamanager/v1/IngestAdEventsResponse.java new file mode 100644 index 000000000000..9225ce909a1e --- /dev/null +++ b/java-datamanager/proto-data-manager-v1/src/main/java/com/google/ads/datamanager/v1/IngestAdEventsResponse.java @@ -0,0 +1,396 @@ +/* + * 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/ads/datamanager/v1/ingestion_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.ads.datamanager.v1; + +/** + * + * + *
+ * Response from an ad event ingestion operation.
+ * 
+ * + * Protobuf type {@code google.ads.datamanager.v1.IngestAdEventsResponse} + */ +@com.google.protobuf.Generated +public final class IngestAdEventsResponse extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.ads.datamanager.v1.IngestAdEventsResponse) + IngestAdEventsResponseOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "IngestAdEventsResponse"); + } + + // Use IngestAdEventsResponse.newBuilder() to construct. + private IngestAdEventsResponse(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private IngestAdEventsResponse() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.ads.datamanager.v1.IngestionServiceProto + .internal_static_google_ads_datamanager_v1_IngestAdEventsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.ads.datamanager.v1.IngestionServiceProto + .internal_static_google_ads_datamanager_v1_IngestAdEventsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.ads.datamanager.v1.IngestAdEventsResponse.class, + com.google.ads.datamanager.v1.IngestAdEventsResponse.Builder.class); + } + + 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 { + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + 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.ads.datamanager.v1.IngestAdEventsResponse)) { + return super.equals(obj); + } + com.google.ads.datamanager.v1.IngestAdEventsResponse other = + (com.google.ads.datamanager.v1.IngestAdEventsResponse) obj; + + 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 = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.ads.datamanager.v1.IngestAdEventsResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.ads.datamanager.v1.IngestAdEventsResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.ads.datamanager.v1.IngestAdEventsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.ads.datamanager.v1.IngestAdEventsResponse 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.ads.datamanager.v1.IngestAdEventsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.ads.datamanager.v1.IngestAdEventsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.ads.datamanager.v1.IngestAdEventsResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.ads.datamanager.v1.IngestAdEventsResponse 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.ads.datamanager.v1.IngestAdEventsResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.ads.datamanager.v1.IngestAdEventsResponse 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.ads.datamanager.v1.IngestAdEventsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.ads.datamanager.v1.IngestAdEventsResponse 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.ads.datamanager.v1.IngestAdEventsResponse 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 from an ad event ingestion operation.
+   * 
+ * + * Protobuf type {@code google.ads.datamanager.v1.IngestAdEventsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.ads.datamanager.v1.IngestAdEventsResponse) + com.google.ads.datamanager.v1.IngestAdEventsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.ads.datamanager.v1.IngestionServiceProto + .internal_static_google_ads_datamanager_v1_IngestAdEventsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.ads.datamanager.v1.IngestionServiceProto + .internal_static_google_ads_datamanager_v1_IngestAdEventsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.ads.datamanager.v1.IngestAdEventsResponse.class, + com.google.ads.datamanager.v1.IngestAdEventsResponse.Builder.class); + } + + // Construct using com.google.ads.datamanager.v1.IngestAdEventsResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.ads.datamanager.v1.IngestionServiceProto + .internal_static_google_ads_datamanager_v1_IngestAdEventsResponse_descriptor; + } + + @java.lang.Override + public com.google.ads.datamanager.v1.IngestAdEventsResponse getDefaultInstanceForType() { + return com.google.ads.datamanager.v1.IngestAdEventsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.ads.datamanager.v1.IngestAdEventsResponse build() { + com.google.ads.datamanager.v1.IngestAdEventsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.ads.datamanager.v1.IngestAdEventsResponse buildPartial() { + com.google.ads.datamanager.v1.IngestAdEventsResponse result = + new com.google.ads.datamanager.v1.IngestAdEventsResponse(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.ads.datamanager.v1.IngestAdEventsResponse) { + return mergeFrom((com.google.ads.datamanager.v1.IngestAdEventsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.ads.datamanager.v1.IngestAdEventsResponse other) { + if (other == com.google.ads.datamanager.v1.IngestAdEventsResponse.getDefaultInstance()) + return this; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + // @@protoc_insertion_point(builder_scope:google.ads.datamanager.v1.IngestAdEventsResponse) + } + + // @@protoc_insertion_point(class_scope:google.ads.datamanager.v1.IngestAdEventsResponse) + private static final com.google.ads.datamanager.v1.IngestAdEventsResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.ads.datamanager.v1.IngestAdEventsResponse(); + } + + public static com.google.ads.datamanager.v1.IngestAdEventsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public IngestAdEventsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.ads.datamanager.v1.IngestAdEventsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-datamanager/proto-data-manager-v1/src/main/java/com/google/ads/datamanager/v1/IngestAdEventsResponseOrBuilder.java b/java-datamanager/proto-data-manager-v1/src/main/java/com/google/ads/datamanager/v1/IngestAdEventsResponseOrBuilder.java new file mode 100644 index 000000000000..43f7c86ae055 --- /dev/null +++ b/java-datamanager/proto-data-manager-v1/src/main/java/com/google/ads/datamanager/v1/IngestAdEventsResponseOrBuilder.java @@ -0,0 +1,27 @@ +/* + * 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/ads/datamanager/v1/ingestion_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.ads.datamanager.v1; + +@com.google.protobuf.Generated +public interface IngestAdEventsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.ads.datamanager.v1.IngestAdEventsResponse) + com.google.protobuf.MessageOrBuilder {} diff --git a/java-datamanager/proto-data-manager-v1/src/main/java/com/google/ads/datamanager/v1/IngestionServiceProto.java b/java-datamanager/proto-data-manager-v1/src/main/java/com/google/ads/datamanager/v1/IngestionServiceProto.java index aaaf7d0a7d3e..be5d49edc1d8 100644 --- a/java-datamanager/proto-data-manager-v1/src/main/java/com/google/ads/datamanager/v1/IngestionServiceProto.java +++ b/java-datamanager/proto-data-manager-v1/src/main/java/com/google/ads/datamanager/v1/IngestionServiceProto.java @@ -64,6 +64,14 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_ads_datamanager_v1_IngestEventsResponse_descriptor; static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_ads_datamanager_v1_IngestEventsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_ads_datamanager_v1_IngestAdEventsRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_ads_datamanager_v1_IngestAdEventsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_ads_datamanager_v1_IngestAdEventsResponse_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_ads_datamanager_v1_IngestAdEventsResponse_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_ads_datamanager_v1_RetrieveRequestStatusRequest_descriptor; static final com.google.protobuf.GeneratedMessage.FieldAccessorTable @@ -83,86 +91,97 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { java.lang.String[] descriptorData = { "\n1google/ads/datamanager/v1/ingestion_se" + "rvice.proto\022\031google.ads.datamanager.v1\032(" - + "google/ads/datamanager/v1/audience.proto" - + "\032\'google/ads/datamanager/v1/consent.prot" - + "o\032+google/ads/datamanager/v1/destination" - + ".proto\032/google/ads/datamanager/v1/encryp" - + "tion_info.proto\032%google/ads/datamanager/" - + "v1/event.proto\032>google/ads/datamanager/v" - + "1/request_status_per_destination.proto\0320" - + "google/ads/datamanager/v1/terms_of_servi" - + "ce.proto\032\034google/api/annotations.proto\032\027" - + "google/api/client.proto\032\037google/api/fiel" - + "d_behavior.proto\"\320\003\n\034IngestAudienceMembe" - + "rsRequest\022A\n\014destinations\030\001 \003(\0132&.google" - + ".ads.datamanager.v1.DestinationB\003\340A\002\022H\n\020" - + "audience_members\030\002 \003(\0132).google.ads.data" - + "manager.v1.AudienceMemberB\003\340A\002\0228\n\007consen" - + "t\030\003 \001(\0132\".google.ads.datamanager.v1.Cons" - + "entB\003\340A\001\022\032\n\rvalidate_only\030\004 \001(\010B\003\340A\001\022:\n\010" - + "encoding\030\005 \001(\0162#.google.ads.datamanager." - + "v1.EncodingB\003\340A\001\022G\n\017encryption_info\030\006 \001(" - + "\0132).google.ads.datamanager.v1.Encryption" - + "InfoB\003\340A\001\022H\n\020terms_of_service\030\007 \001(\0132).go" - + "ogle.ads.datamanager.v1.TermsOfServiceB\003" - + "\340A\001\"3\n\035IngestAudienceMembersResponse\022\022\n\n" - + "request_id\030\001 \001(\t\"\314\002\n\034RemoveAudienceMembe" - + "rsRequest\022A\n\014destinations\030\001 \003(\0132&.google" - + ".ads.datamanager.v1.DestinationB\003\340A\002\022H\n\020" - + "audience_members\030\002 \003(\0132).google.ads.data" - + "manager.v1.AudienceMemberB\003\340A\002\022\032\n\rvalida" - + "te_only\030\003 \001(\010B\003\340A\001\022:\n\010encoding\030\004 \001(\0162#.g" - + "oogle.ads.datamanager.v1.EncodingB\003\340A\001\022G" - + "\n\017encryption_info\030\005 \001(\0132).google.ads.dat" - + "amanager.v1.EncryptionInfoB\003\340A\001\"3\n\035Remov" - + "eAudienceMembersResponse\022\022\n\nrequest_id\030\001" - + " \001(\t\"\352\002\n\023IngestEventsRequest\022A\n\014destinat" - + "ions\030\001 \003(\0132&.google.ads.datamanager.v1.D" - + "estinationB\003\340A\002\0225\n\006events\030\002 \003(\0132 .google" - + ".ads.datamanager.v1.EventB\003\340A\002\0228\n\007consen" - + "t\030\003 \001(\0132\".google.ads.datamanager.v1.Cons" - + "entB\003\340A\001\022\032\n\rvalidate_only\030\004 \001(\010B\003\340A\001\022:\n\010" - + "encoding\030\005 \001(\0162#.google.ads.datamanager." - + "v1.EncodingB\003\340A\001\022G\n\017encryption_info\030\006 \001(" - + "\0132).google.ads.datamanager.v1.Encryption" - + "InfoB\003\340A\001\"*\n\024IngestEventsResponse\022\022\n\nreq" - + "uest_id\030\001 \001(\t\"7\n\034RetrieveRequestStatusRe" - + "quest\022\027\n\nrequest_id\030\001 \001(\tB\003\340A\002\"\177\n\035Retrie" - + "veRequestStatusResponse\022^\n\036request_statu" - + "s_per_destination\030\001 \003(\01326.google.ads.dat" - + "amanager.v1.RequestStatusPerDestination*" - + "9\n\010Encoding\022\030\n\024ENCODING_UNSPECIFIED\020\000\022\007\n" - + "\003HEX\020\001\022\n\n\006BASE64\020\0022\210\006\n\020IngestionService\022" - + "\261\001\n\025IngestAudienceMembers\0227.google.ads.d" - + "atamanager.v1.IngestAudienceMembersReque" - + "st\0328.google.ads.datamanager.v1.IngestAud" - + "ienceMembersResponse\"%\202\323\344\223\002\037\"\032/v1/audien" - + "ceMembers:ingest:\001*\022\261\001\n\025RemoveAudienceMe" - + "mbers\0227.google.ads.datamanager.v1.Remove" - + "AudienceMembersRequest\0328.google.ads.data" - + "manager.v1.RemoveAudienceMembersResponse" - + "\"%\202\323\344\223\002\037\"\032/v1/audienceMembers:remove:\001*\022" - + "\215\001\n\014IngestEvents\022..google.ads.datamanage" - + "r.v1.IngestEventsRequest\032/.google.ads.da" - + "tamanager.v1.IngestEventsResponse\"\034\202\323\344\223\002" - + "\026\"\021/v1/events:ingest:\001*\022\256\001\n\025RetrieveRequ" - + "estStatus\0227.google.ads.datamanager.v1.Re" - + "trieveRequestStatusRequest\0328.google.ads." - + "datamanager.v1.RetrieveRequestStatusResp" - + "onse\"\"\202\323\344\223\002\034\022\032/v1/requestStatus:retrieve" - + "\032K\312A\032datamanager.googleapis.com\322A+https:" - + "//www.googleapis.com/auth/datamanagerB\322\001" - + "\n\035com.google.ads.datamanager.v1B\025Ingesti" - + "onServiceProtoP\001ZAcloud.google.com/go/da" - + "tamanager/apiv1/datamanagerpb;datamanage" - + "rpb\252\002\031Google.Ads.DataManager.V1\312\002\031Google" - + "\\Ads\\DataManager\\V1\352\002\034Google::Ads::DataM" - + "anager::V1b\006proto3" + + "google/ads/datamanager/v1/ad_event.proto" + + "\032(google/ads/datamanager/v1/audience.pro" + + "to\032\'google/ads/datamanager/v1/consent.pr" + + "oto\032+google/ads/datamanager/v1/destinati" + + "on.proto\032/google/ads/datamanager/v1/encr" + + "yption_info.proto\032%google/ads/datamanage" + + "r/v1/event.proto\032>google/ads/datamanager" + + "/v1/request_status_per_destination.proto" + + "\0320google/ads/datamanager/v1/terms_of_ser" + + "vice.proto\032\034google/api/annotations.proto" + + "\032\027google/api/client.proto\032\037google/api/fi" + + "eld_behavior.proto\"\320\003\n\034IngestAudienceMem" + + "bersRequest\022A\n\014destinations\030\001 \003(\0132&.goog" + + "le.ads.datamanager.v1.DestinationB\003\340A\002\022H" + + "\n\020audience_members\030\002 \003(\0132).google.ads.da" + + "tamanager.v1.AudienceMemberB\003\340A\002\0228\n\007cons" + + "ent\030\003 \001(\0132\".google.ads.datamanager.v1.Co" + + "nsentB\003\340A\001\022\032\n\rvalidate_only\030\004 \001(\010B\003\340A\001\022:" + + "\n\010encoding\030\005 \001(\0162#.google.ads.datamanage" + + "r.v1.EncodingB\003\340A\001\022G\n\017encryption_info\030\006 " + + "\001(\0132).google.ads.datamanager.v1.Encrypti" + + "onInfoB\003\340A\001\022H\n\020terms_of_service\030\007 \001(\0132)." + + "google.ads.datamanager.v1.TermsOfService" + + "B\003\340A\001\"3\n\035IngestAudienceMembersResponse\022\022" + + "\n\nrequest_id\030\001 \001(\t\"\314\002\n\034RemoveAudienceMem" + + "bersRequest\022A\n\014destinations\030\001 \003(\0132&.goog" + + "le.ads.datamanager.v1.DestinationB\003\340A\002\022H" + + "\n\020audience_members\030\002 \003(\0132).google.ads.da" + + "tamanager.v1.AudienceMemberB\003\340A\002\022\032\n\rvali" + + "date_only\030\003 \001(\010B\003\340A\001\022:\n\010encoding\030\004 \001(\0162#" + + ".google.ads.datamanager.v1.EncodingB\003\340A\001" + + "\022G\n\017encryption_info\030\005 \001(\0132).google.ads.d" + + "atamanager.v1.EncryptionInfoB\003\340A\001\"3\n\035Rem" + + "oveAudienceMembersResponse\022\022\n\nrequest_id" + + "\030\001 \001(\t\"\352\002\n\023IngestEventsRequest\022A\n\014destin" + + "ations\030\001 \003(\0132&.google.ads.datamanager.v1" + + ".DestinationB\003\340A\002\0225\n\006events\030\002 \003(\0132 .goog" + + "le.ads.datamanager.v1.EventB\003\340A\002\0228\n\007cons" + + "ent\030\003 \001(\0132\".google.ads.datamanager.v1.Co" + + "nsentB\003\340A\001\022\032\n\rvalidate_only\030\004 \001(\010B\003\340A\001\022:" + + "\n\010encoding\030\005 \001(\0162#.google.ads.datamanage" + + "r.v1.EncodingB\003\340A\001\022G\n\017encryption_info\030\006 " + + "\001(\0132).google.ads.datamanager.v1.Encrypti" + + "onInfoB\003\340A\001\"*\n\024IngestEventsResponse\022\022\n\nr" + + "equest_id\030\001 \001(\t\"\270\001\n\025IngestAdEventsReques" + + "t\022:\n\tad_events\030\001 \003(\0132\".google.ads.datama" + + "nager.v1.AdEventB\003\340A\002\022G\n\017encryption_info" + + "\030\002 \001(\0132).google.ads.datamanager.v1.Encry" + + "ptionInfoB\003\340A\001\022\032\n\rvalidate_only\030\003 \001(\010B\003\340" + + "A\001\"\030\n\026IngestAdEventsResponse\"7\n\034Retrieve" + + "RequestStatusRequest\022\027\n\nrequest_id\030\001 \001(\t" + + "B\003\340A\002\"\177\n\035RetrieveRequestStatusResponse\022^" + + "\n\036request_status_per_destination\030\001 \003(\01326" + + ".google.ads.datamanager.v1.RequestStatus" + + "PerDestination*9\n\010Encoding\022\030\n\024ENCODING_U" + + "NSPECIFIED\020\000\022\007\n\003HEX\020\001\022\n\n\006BASE64\020\0022\240\007\n\020In" + + "gestionService\022\261\001\n\025IngestAudienceMembers" + + "\0227.google.ads.datamanager.v1.IngestAudie" + + "nceMembersRequest\0328.google.ads.datamanag" + + "er.v1.IngestAudienceMembersResponse\"%\202\323\344" + + "\223\002\037\"\032/v1/audienceMembers:ingest:\001*\022\261\001\n\025R" + + "emoveAudienceMembers\0227.google.ads.datama" + + "nager.v1.RemoveAudienceMembersRequest\0328." + + "google.ads.datamanager.v1.RemoveAudience" + + "MembersResponse\"%\202\323\344\223\002\037\"\032/v1/audienceMem" + + "bers:remove:\001*\022\215\001\n\014IngestEvents\022..google" + + ".ads.datamanager.v1.IngestEventsRequest\032" + + "/.google.ads.datamanager.v1.IngestEvents" + + "Response\"\034\202\323\344\223\002\026\"\021/v1/events:ingest:\001*\022\225" + + "\001\n\016IngestAdEvents\0220.google.ads.datamanag" + + "er.v1.IngestAdEventsRequest\0321.google.ads" + + ".datamanager.v1.IngestAdEventsResponse\"\036" + + "\202\323\344\223\002\030\"\023/v1/adEvents:ingest:\001*\022\256\001\n\025Retri" + + "eveRequestStatus\0227.google.ads.datamanage" + + "r.v1.RetrieveRequestStatusRequest\0328.goog" + + "le.ads.datamanager.v1.RetrieveRequestSta" + + "tusResponse\"\"\202\323\344\223\002\034\022\032/v1/requestStatus:r" + + "etrieve\032K\312A\032datamanager.googleapis.com\322A" + + "+https://www.googleapis.com/auth/dataman" + + "agerB\322\001\n\035com.google.ads.datamanager.v1B\025" + + "IngestionServiceProtoP\001ZAcloud.google.co" + + "m/go/datamanager/apiv1/datamanagerpb;dat" + + "amanagerpb\252\002\031Google.Ads.DataManager.V1\312\002" + + "\031Google\\Ads\\DataManager\\V1\352\002\034Google::Ads" + + "::DataManager::V1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.ads.datamanager.v1.AdEventProto.getDescriptor(), com.google.ads.datamanager.v1.AudienceProto.getDescriptor(), com.google.ads.datamanager.v1.ConsentProto.getDescriptor(), com.google.ads.datamanager.v1.DestinationProto.getDescriptor(), @@ -228,8 +247,22 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "RequestId", }); - internal_static_google_ads_datamanager_v1_RetrieveRequestStatusRequest_descriptor = + internal_static_google_ads_datamanager_v1_IngestAdEventsRequest_descriptor = getDescriptor().getMessageType(6); + internal_static_google_ads_datamanager_v1_IngestAdEventsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_ads_datamanager_v1_IngestAdEventsRequest_descriptor, + new java.lang.String[] { + "AdEvents", "EncryptionInfo", "ValidateOnly", + }); + internal_static_google_ads_datamanager_v1_IngestAdEventsResponse_descriptor = + getDescriptor().getMessageType(7); + internal_static_google_ads_datamanager_v1_IngestAdEventsResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_ads_datamanager_v1_IngestAdEventsResponse_descriptor, + new java.lang.String[] {}); + internal_static_google_ads_datamanager_v1_RetrieveRequestStatusRequest_descriptor = + getDescriptor().getMessageType(8); internal_static_google_ads_datamanager_v1_RetrieveRequestStatusRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_ads_datamanager_v1_RetrieveRequestStatusRequest_descriptor, @@ -237,7 +270,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "RequestId", }); internal_static_google_ads_datamanager_v1_RetrieveRequestStatusResponse_descriptor = - getDescriptor().getMessageType(7); + getDescriptor().getMessageType(9); internal_static_google_ads_datamanager_v1_RetrieveRequestStatusResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_ads_datamanager_v1_RetrieveRequestStatusResponse_descriptor, @@ -245,6 +278,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "RequestStatusPerDestination", }); descriptor.resolveAllFeaturesImmutable(); + com.google.ads.datamanager.v1.AdEventProto.getDescriptor(); com.google.ads.datamanager.v1.AudienceProto.getDescriptor(); com.google.ads.datamanager.v1.ConsentProto.getDescriptor(); com.google.ads.datamanager.v1.DestinationProto.getDescriptor(); diff --git a/java-datamanager/proto-data-manager-v1/src/main/java/com/google/ads/datamanager/v1/MediaQuartile.java b/java-datamanager/proto-data-manager-v1/src/main/java/com/google/ads/datamanager/v1/MediaQuartile.java new file mode 100644 index 000000000000..f10745307b70 --- /dev/null +++ b/java-datamanager/proto-data-manager-v1/src/main/java/com/google/ads/datamanager/v1/MediaQuartile.java @@ -0,0 +1,260 @@ +/* + * 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/ads/datamanager/v1/viewability_info.proto +// Protobuf Java Version: 4.33.2 + +package com.google.ads.datamanager.v1; + +/** + * + * + *
+ * The amount of the media that was played as discrete quartiles.
+ * 
+ * + * Protobuf enum {@code google.ads.datamanager.v1.MediaQuartile} + */ +@com.google.protobuf.Generated +public enum MediaQuartile implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+   * Unspecified media quartile.
+   * 
+ * + * MEDIA_QUARTILE_UNSPECIFIED = 0; + */ + MEDIA_QUARTILE_UNSPECIFIED(0), + /** + * + * + *
+   * Start.
+   * 
+ * + * MEDIA_QUARTILE_START = 1; + */ + MEDIA_QUARTILE_START(1), + /** + * + * + *
+   * First quartile.
+   * 
+ * + * MEDIA_QUARTILE_FIRST_QUARTILE = 2; + */ + MEDIA_QUARTILE_FIRST_QUARTILE(2), + /** + * + * + *
+   * Midpoint.
+   * 
+ * + * MEDIA_QUARTILE_MIDPOINT = 3; + */ + MEDIA_QUARTILE_MIDPOINT(3), + /** + * + * + *
+   * Third quartile.
+   * 
+ * + * MEDIA_QUARTILE_THIRD_QUARTILE = 4; + */ + MEDIA_QUARTILE_THIRD_QUARTILE(4), + /** + * + * + *
+   * Complete.
+   * 
+ * + * MEDIA_QUARTILE_COMPLETE = 5; + */ + MEDIA_QUARTILE_COMPLETE(5), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "MediaQuartile"); + } + + /** + * + * + *
+   * Unspecified media quartile.
+   * 
+ * + * MEDIA_QUARTILE_UNSPECIFIED = 0; + */ + public static final int MEDIA_QUARTILE_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+   * Start.
+   * 
+ * + * MEDIA_QUARTILE_START = 1; + */ + public static final int MEDIA_QUARTILE_START_VALUE = 1; + + /** + * + * + *
+   * First quartile.
+   * 
+ * + * MEDIA_QUARTILE_FIRST_QUARTILE = 2; + */ + public static final int MEDIA_QUARTILE_FIRST_QUARTILE_VALUE = 2; + + /** + * + * + *
+   * Midpoint.
+   * 
+ * + * MEDIA_QUARTILE_MIDPOINT = 3; + */ + public static final int MEDIA_QUARTILE_MIDPOINT_VALUE = 3; + + /** + * + * + *
+   * Third quartile.
+   * 
+ * + * MEDIA_QUARTILE_THIRD_QUARTILE = 4; + */ + public static final int MEDIA_QUARTILE_THIRD_QUARTILE_VALUE = 4; + + /** + * + * + *
+   * Complete.
+   * 
+ * + * MEDIA_QUARTILE_COMPLETE = 5; + */ + public static final int MEDIA_QUARTILE_COMPLETE_VALUE = 5; + + 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 MediaQuartile 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 MediaQuartile forNumber(int value) { + switch (value) { + case 0: + return MEDIA_QUARTILE_UNSPECIFIED; + case 1: + return MEDIA_QUARTILE_START; + case 2: + return MEDIA_QUARTILE_FIRST_QUARTILE; + case 3: + return MEDIA_QUARTILE_MIDPOINT; + case 4: + return MEDIA_QUARTILE_THIRD_QUARTILE; + case 5: + return MEDIA_QUARTILE_COMPLETE; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public MediaQuartile findValueByNumber(int number) { + return MediaQuartile.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.ads.datamanager.v1.ViewabilityInfoProto.getDescriptor().getEnumTypes().get(1); + } + + private static final MediaQuartile[] VALUES = values(); + + public static MediaQuartile valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private MediaQuartile(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.ads.datamanager.v1.MediaQuartile) +} diff --git a/java-datamanager/proto-data-manager-v1/src/main/java/com/google/ads/datamanager/v1/PartnerCustomerAccount.java b/java-datamanager/proto-data-manager-v1/src/main/java/com/google/ads/datamanager/v1/PartnerCustomerAccount.java new file mode 100644 index 000000000000..7a639085e49e --- /dev/null +++ b/java-datamanager/proto-data-manager-v1/src/main/java/com/google/ads/datamanager/v1/PartnerCustomerAccount.java @@ -0,0 +1,981 @@ +/* + * 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/ads/datamanager/v1/partner_link_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.ads.datamanager.v1; + +/** + * + * + *
+ * Represents a customer account in the partner's system.
+ * 
+ * + * Protobuf type {@code google.ads.datamanager.v1.PartnerCustomerAccount} + */ +@com.google.protobuf.Generated +public final class PartnerCustomerAccount extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.ads.datamanager.v1.PartnerCustomerAccount) + PartnerCustomerAccountOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "PartnerCustomerAccount"); + } + + // Use PartnerCustomerAccount.newBuilder() to construct. + private PartnerCustomerAccount(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private PartnerCustomerAccount() { + accountId_ = ""; + accountName_ = ""; + accountType_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.ads.datamanager.v1.PartnerLinkServiceProto + .internal_static_google_ads_datamanager_v1_PartnerCustomerAccount_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.ads.datamanager.v1.PartnerLinkServiceProto + .internal_static_google_ads_datamanager_v1_PartnerCustomerAccount_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.ads.datamanager.v1.PartnerCustomerAccount.class, + com.google.ads.datamanager.v1.PartnerCustomerAccount.Builder.class); + } + + public static final int ACCOUNT_ID_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object accountId_ = ""; + + /** + * + * + *
+   * Required. The identifier of the customer account in the partner's ID space.
+   * 
+ * + * string account_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The accountId. + */ + @java.lang.Override + public java.lang.String getAccountId() { + java.lang.Object ref = accountId_; + 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(); + accountId_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. The identifier of the customer account in the partner's ID space.
+   * 
+ * + * string account_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for accountId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getAccountIdBytes() { + java.lang.Object ref = accountId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + accountId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ACCOUNT_NAME_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object accountName_ = ""; + + /** + * + * + *
+   * Optional. The name of the account.
+   * 
+ * + * string account_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The accountName. + */ + @java.lang.Override + public java.lang.String getAccountName() { + java.lang.Object ref = accountName_; + 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(); + accountName_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. The name of the account.
+   * 
+ * + * string account_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for accountName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getAccountNameBytes() { + java.lang.Object ref = accountName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + accountName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ACCOUNT_TYPE_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object accountType_ = ""; + + /** + * + * + *
+   * Optional. The type of the account. Can be used to distinguish between
+   * advertiser accounts and business level accounts, for example.
+   * 
+ * + * string account_type = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The accountType. + */ + @java.lang.Override + public java.lang.String getAccountType() { + java.lang.Object ref = accountType_; + 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(); + accountType_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. The type of the account. Can be used to distinguish between
+   * advertiser accounts and business level accounts, for example.
+   * 
+ * + * string account_type = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for accountType. + */ + @java.lang.Override + public com.google.protobuf.ByteString getAccountTypeBytes() { + java.lang.Object ref = accountType_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + accountType_ = 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 { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(accountId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, accountId_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(accountName_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, accountName_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(accountType_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, accountType_); + } + 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(accountId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, accountId_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(accountName_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, accountName_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(accountType_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, accountType_); + } + 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.ads.datamanager.v1.PartnerCustomerAccount)) { + return super.equals(obj); + } + com.google.ads.datamanager.v1.PartnerCustomerAccount other = + (com.google.ads.datamanager.v1.PartnerCustomerAccount) obj; + + if (!getAccountId().equals(other.getAccountId())) return false; + if (!getAccountName().equals(other.getAccountName())) return false; + if (!getAccountType().equals(other.getAccountType())) 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) + ACCOUNT_ID_FIELD_NUMBER; + hash = (53 * hash) + getAccountId().hashCode(); + hash = (37 * hash) + ACCOUNT_NAME_FIELD_NUMBER; + hash = (53 * hash) + getAccountName().hashCode(); + hash = (37 * hash) + ACCOUNT_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getAccountType().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.ads.datamanager.v1.PartnerCustomerAccount parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.ads.datamanager.v1.PartnerCustomerAccount parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.ads.datamanager.v1.PartnerCustomerAccount parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.ads.datamanager.v1.PartnerCustomerAccount 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.ads.datamanager.v1.PartnerCustomerAccount parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.ads.datamanager.v1.PartnerCustomerAccount parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.ads.datamanager.v1.PartnerCustomerAccount parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.ads.datamanager.v1.PartnerCustomerAccount 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.ads.datamanager.v1.PartnerCustomerAccount parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.ads.datamanager.v1.PartnerCustomerAccount 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.ads.datamanager.v1.PartnerCustomerAccount parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.ads.datamanager.v1.PartnerCustomerAccount 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.ads.datamanager.v1.PartnerCustomerAccount 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; + } + + /** + * + * + *
+   * Represents a customer account in the partner's system.
+   * 
+ * + * Protobuf type {@code google.ads.datamanager.v1.PartnerCustomerAccount} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.ads.datamanager.v1.PartnerCustomerAccount) + com.google.ads.datamanager.v1.PartnerCustomerAccountOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.ads.datamanager.v1.PartnerLinkServiceProto + .internal_static_google_ads_datamanager_v1_PartnerCustomerAccount_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.ads.datamanager.v1.PartnerLinkServiceProto + .internal_static_google_ads_datamanager_v1_PartnerCustomerAccount_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.ads.datamanager.v1.PartnerCustomerAccount.class, + com.google.ads.datamanager.v1.PartnerCustomerAccount.Builder.class); + } + + // Construct using com.google.ads.datamanager.v1.PartnerCustomerAccount.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + accountId_ = ""; + accountName_ = ""; + accountType_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.ads.datamanager.v1.PartnerLinkServiceProto + .internal_static_google_ads_datamanager_v1_PartnerCustomerAccount_descriptor; + } + + @java.lang.Override + public com.google.ads.datamanager.v1.PartnerCustomerAccount getDefaultInstanceForType() { + return com.google.ads.datamanager.v1.PartnerCustomerAccount.getDefaultInstance(); + } + + @java.lang.Override + public com.google.ads.datamanager.v1.PartnerCustomerAccount build() { + com.google.ads.datamanager.v1.PartnerCustomerAccount result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.ads.datamanager.v1.PartnerCustomerAccount buildPartial() { + com.google.ads.datamanager.v1.PartnerCustomerAccount result = + new com.google.ads.datamanager.v1.PartnerCustomerAccount(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.ads.datamanager.v1.PartnerCustomerAccount result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.accountId_ = accountId_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.accountName_ = accountName_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.accountType_ = accountType_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.ads.datamanager.v1.PartnerCustomerAccount) { + return mergeFrom((com.google.ads.datamanager.v1.PartnerCustomerAccount) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.ads.datamanager.v1.PartnerCustomerAccount other) { + if (other == com.google.ads.datamanager.v1.PartnerCustomerAccount.getDefaultInstance()) + return this; + if (!other.getAccountId().isEmpty()) { + accountId_ = other.accountId_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getAccountName().isEmpty()) { + accountName_ = other.accountName_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getAccountType().isEmpty()) { + accountType_ = other.accountType_; + bitField0_ |= 0x00000004; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + accountId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + accountName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + accountType_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object accountId_ = ""; + + /** + * + * + *
+     * Required. The identifier of the customer account in the partner's ID space.
+     * 
+ * + * string account_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The accountId. + */ + public java.lang.String getAccountId() { + java.lang.Object ref = accountId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + accountId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. The identifier of the customer account in the partner's ID space.
+     * 
+ * + * string account_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for accountId. + */ + public com.google.protobuf.ByteString getAccountIdBytes() { + java.lang.Object ref = accountId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + accountId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. The identifier of the customer account in the partner's ID space.
+     * 
+ * + * string account_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The accountId to set. + * @return This builder for chaining. + */ + public Builder setAccountId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + accountId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The identifier of the customer account in the partner's ID space.
+     * 
+ * + * string account_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearAccountId() { + accountId_ = getDefaultInstance().getAccountId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The identifier of the customer account in the partner's ID space.
+     * 
+ * + * string account_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for accountId to set. + * @return This builder for chaining. + */ + public Builder setAccountIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + accountId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object accountName_ = ""; + + /** + * + * + *
+     * Optional. The name of the account.
+     * 
+ * + * string account_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The accountName. + */ + public java.lang.String getAccountName() { + java.lang.Object ref = accountName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + accountName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. The name of the account.
+     * 
+ * + * string account_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for accountName. + */ + public com.google.protobuf.ByteString getAccountNameBytes() { + java.lang.Object ref = accountName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + accountName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. The name of the account.
+     * 
+ * + * string account_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The accountName to set. + * @return This builder for chaining. + */ + public Builder setAccountName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + accountName_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The name of the account.
+     * 
+ * + * string account_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearAccountName() { + accountName_ = getDefaultInstance().getAccountName(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The name of the account.
+     * 
+ * + * string account_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for accountName to set. + * @return This builder for chaining. + */ + public Builder setAccountNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + accountName_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object accountType_ = ""; + + /** + * + * + *
+     * Optional. The type of the account. Can be used to distinguish between
+     * advertiser accounts and business level accounts, for example.
+     * 
+ * + * string account_type = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The accountType. + */ + public java.lang.String getAccountType() { + java.lang.Object ref = accountType_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + accountType_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. The type of the account. Can be used to distinguish between
+     * advertiser accounts and business level accounts, for example.
+     * 
+ * + * string account_type = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for accountType. + */ + public com.google.protobuf.ByteString getAccountTypeBytes() { + java.lang.Object ref = accountType_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + accountType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. The type of the account. Can be used to distinguish between
+     * advertiser accounts and business level accounts, for example.
+     * 
+ * + * string account_type = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The accountType to set. + * @return This builder for chaining. + */ + public Builder setAccountType(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + accountType_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The type of the account. Can be used to distinguish between
+     * advertiser accounts and business level accounts, for example.
+     * 
+ * + * string account_type = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearAccountType() { + accountType_ = getDefaultInstance().getAccountType(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The type of the account. Can be used to distinguish between
+     * advertiser accounts and business level accounts, for example.
+     * 
+ * + * string account_type = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for accountType to set. + * @return This builder for chaining. + */ + public Builder setAccountTypeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + accountType_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.ads.datamanager.v1.PartnerCustomerAccount) + } + + // @@protoc_insertion_point(class_scope:google.ads.datamanager.v1.PartnerCustomerAccount) + private static final com.google.ads.datamanager.v1.PartnerCustomerAccount DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.ads.datamanager.v1.PartnerCustomerAccount(); + } + + public static com.google.ads.datamanager.v1.PartnerCustomerAccount getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PartnerCustomerAccount parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.ads.datamanager.v1.PartnerCustomerAccount getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-datamanager/proto-data-manager-v1/src/main/java/com/google/ads/datamanager/v1/PartnerCustomerAccountOrBuilder.java b/java-datamanager/proto-data-manager-v1/src/main/java/com/google/ads/datamanager/v1/PartnerCustomerAccountOrBuilder.java new file mode 100644 index 000000000000..4cb27fa98ff0 --- /dev/null +++ b/java-datamanager/proto-data-manager-v1/src/main/java/com/google/ads/datamanager/v1/PartnerCustomerAccountOrBuilder.java @@ -0,0 +1,108 @@ +/* + * 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/ads/datamanager/v1/partner_link_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.ads.datamanager.v1; + +@com.google.protobuf.Generated +public interface PartnerCustomerAccountOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.ads.datamanager.v1.PartnerCustomerAccount) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The identifier of the customer account in the partner's ID space.
+   * 
+ * + * string account_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The accountId. + */ + java.lang.String getAccountId(); + + /** + * + * + *
+   * Required. The identifier of the customer account in the partner's ID space.
+   * 
+ * + * string account_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for accountId. + */ + com.google.protobuf.ByteString getAccountIdBytes(); + + /** + * + * + *
+   * Optional. The name of the account.
+   * 
+ * + * string account_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The accountName. + */ + java.lang.String getAccountName(); + + /** + * + * + *
+   * Optional. The name of the account.
+   * 
+ * + * string account_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for accountName. + */ + com.google.protobuf.ByteString getAccountNameBytes(); + + /** + * + * + *
+   * Optional. The type of the account. Can be used to distinguish between
+   * advertiser accounts and business level accounts, for example.
+   * 
+ * + * string account_type = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The accountType. + */ + java.lang.String getAccountType(); + + /** + * + * + *
+   * Optional. The type of the account. Can be used to distinguish between
+   * advertiser accounts and business level accounts, for example.
+   * 
+ * + * string account_type = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for accountType. + */ + com.google.protobuf.ByteString getAccountTypeBytes(); +} diff --git a/java-datamanager/proto-data-manager-v1/src/main/java/com/google/ads/datamanager/v1/PartnerLink.java b/java-datamanager/proto-data-manager-v1/src/main/java/com/google/ads/datamanager/v1/PartnerLink.java index 82f4198373d2..fc0e66ccd452 100644 --- a/java-datamanager/proto-data-manager-v1/src/main/java/com/google/ads/datamanager/v1/PartnerLink.java +++ b/java-datamanager/proto-data-manager-v1/src/main/java/com/google/ads/datamanager/v1/PartnerLink.java @@ -54,6 +54,7 @@ private PartnerLink(com.google.protobuf.GeneratedMessage.Builder builder) { private PartnerLink() { name_ = ""; partnerLinkId_ = ""; + featureSet_ = 0; } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @@ -300,6 +301,186 @@ public com.google.ads.datamanager.v1.ProductAccountOrBuilder getPartnerAccountOr : partnerAccount_; } + public static final int FEATURE_SET_FIELD_NUMBER = 5; + private int featureSet_ = 0; + + /** + * + * + *
+   * Optional. Immutable. The set of features supported for the partner link.
+   * If not specified, the system behavior defaults to
+   * [FEATURE_SET_AUDIENCE_AND_EVENT_MANAGEMENT][google.ads.datamanager.v1.FeatureSet.FEATURE_SET_AUDIENCE_AND_EVENT_MANAGEMENT].
+   * 
+ * + * + * .google.ads.datamanager.v1.FeatureSet feature_set = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The enum numeric value on the wire for featureSet. + */ + @java.lang.Override + public int getFeatureSetValue() { + return featureSet_; + } + + /** + * + * + *
+   * Optional. Immutable. The set of features supported for the partner link.
+   * If not specified, the system behavior defaults to
+   * [FEATURE_SET_AUDIENCE_AND_EVENT_MANAGEMENT][google.ads.datamanager.v1.FeatureSet.FEATURE_SET_AUDIENCE_AND_EVENT_MANAGEMENT].
+   * 
+ * + * + * .google.ads.datamanager.v1.FeatureSet feature_set = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The featureSet. + */ + @java.lang.Override + public com.google.ads.datamanager.v1.FeatureSet getFeatureSet() { + com.google.ads.datamanager.v1.FeatureSet result = + com.google.ads.datamanager.v1.FeatureSet.forNumber(featureSet_); + return result == null ? com.google.ads.datamanager.v1.FeatureSet.UNRECOGNIZED : result; + } + + public static final int PARTNER_CUSTOMER_ACCOUNT_FIELD_NUMBER = 6; + private com.google.ads.datamanager.v1.PartnerCustomerAccount partnerCustomerAccount_; + + /** + * + * + *
+   * Optional. The customer account in the partner system.
+   * This is required for partner links with the
+   * [FEATURE_SET_AD_EVENT_MANAGEMENT][google.ads.datamanager.v1.FeatureSet.FEATURE_SET_AD_EVENT_MANAGEMENT]
+   * feature set.
+   * 
+ * + * + * .google.ads.datamanager.v1.PartnerCustomerAccount partner_customer_account = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the partnerCustomerAccount field is set. + */ + @java.lang.Override + public boolean hasPartnerCustomerAccount() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+   * Optional. The customer account in the partner system.
+   * This is required for partner links with the
+   * [FEATURE_SET_AD_EVENT_MANAGEMENT][google.ads.datamanager.v1.FeatureSet.FEATURE_SET_AD_EVENT_MANAGEMENT]
+   * feature set.
+   * 
+ * + * + * .google.ads.datamanager.v1.PartnerCustomerAccount partner_customer_account = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The partnerCustomerAccount. + */ + @java.lang.Override + public com.google.ads.datamanager.v1.PartnerCustomerAccount getPartnerCustomerAccount() { + return partnerCustomerAccount_ == null + ? com.google.ads.datamanager.v1.PartnerCustomerAccount.getDefaultInstance() + : partnerCustomerAccount_; + } + + /** + * + * + *
+   * Optional. The customer account in the partner system.
+   * This is required for partner links with the
+   * [FEATURE_SET_AD_EVENT_MANAGEMENT][google.ads.datamanager.v1.FeatureSet.FEATURE_SET_AD_EVENT_MANAGEMENT]
+   * feature set.
+   * 
+ * + * + * .google.ads.datamanager.v1.PartnerCustomerAccount partner_customer_account = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.ads.datamanager.v1.PartnerCustomerAccountOrBuilder + getPartnerCustomerAccountOrBuilder() { + return partnerCustomerAccount_ == null + ? com.google.ads.datamanager.v1.PartnerCustomerAccount.getDefaultInstance() + : partnerCustomerAccount_; + } + + public static final int PARTNER_LINK_METADATA_FIELD_NUMBER = 7; + private com.google.ads.datamanager.v1.PartnerLinkMetadata partnerLinkMetadata_; + + /** + * + * + *
+   * Optional. Metadata associated with the partner link.
+   * This is optional and only accepted for partner links with the
+   * [FEATURE_SET_AD_EVENT_MANAGEMENT][google.ads.datamanager.v1.FeatureSet.FEATURE_SET_AD_EVENT_MANAGEMENT].
+   * 
+ * + * + * .google.ads.datamanager.v1.PartnerLinkMetadata partner_link_metadata = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the partnerLinkMetadata field is set. + */ + @java.lang.Override + public boolean hasPartnerLinkMetadata() { + return ((bitField0_ & 0x00000008) != 0); + } + + /** + * + * + *
+   * Optional. Metadata associated with the partner link.
+   * This is optional and only accepted for partner links with the
+   * [FEATURE_SET_AD_EVENT_MANAGEMENT][google.ads.datamanager.v1.FeatureSet.FEATURE_SET_AD_EVENT_MANAGEMENT].
+   * 
+ * + * + * .google.ads.datamanager.v1.PartnerLinkMetadata partner_link_metadata = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The partnerLinkMetadata. + */ + @java.lang.Override + public com.google.ads.datamanager.v1.PartnerLinkMetadata getPartnerLinkMetadata() { + return partnerLinkMetadata_ == null + ? com.google.ads.datamanager.v1.PartnerLinkMetadata.getDefaultInstance() + : partnerLinkMetadata_; + } + + /** + * + * + *
+   * Optional. Metadata associated with the partner link.
+   * This is optional and only accepted for partner links with the
+   * [FEATURE_SET_AD_EVENT_MANAGEMENT][google.ads.datamanager.v1.FeatureSet.FEATURE_SET_AD_EVENT_MANAGEMENT].
+   * 
+ * + * + * .google.ads.datamanager.v1.PartnerLinkMetadata partner_link_metadata = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.ads.datamanager.v1.PartnerLinkMetadataOrBuilder + getPartnerLinkMetadataOrBuilder() { + return partnerLinkMetadata_ == null + ? com.google.ads.datamanager.v1.PartnerLinkMetadata.getDefaultInstance() + : partnerLinkMetadata_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -326,6 +507,16 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000002) != 0)) { output.writeMessage(4, getPartnerAccount()); } + if (featureSet_ + != com.google.ads.datamanager.v1.FeatureSet.FEATURE_SET_UNSPECIFIED.getNumber()) { + output.writeEnum(5, featureSet_); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeMessage(6, getPartnerCustomerAccount()); + } + if (((bitField0_ & 0x00000008) != 0)) { + output.writeMessage(7, getPartnerLinkMetadata()); + } getUnknownFields().writeTo(output); } @@ -347,6 +538,17 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000002) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getPartnerAccount()); } + if (featureSet_ + != com.google.ads.datamanager.v1.FeatureSet.FEATURE_SET_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(5, featureSet_); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(6, getPartnerCustomerAccount()); + } + if (((bitField0_ & 0x00000008) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getPartnerLinkMetadata()); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -373,6 +575,15 @@ public boolean equals(final java.lang.Object obj) { if (hasPartnerAccount()) { if (!getPartnerAccount().equals(other.getPartnerAccount())) return false; } + if (featureSet_ != other.featureSet_) return false; + if (hasPartnerCustomerAccount() != other.hasPartnerCustomerAccount()) return false; + if (hasPartnerCustomerAccount()) { + if (!getPartnerCustomerAccount().equals(other.getPartnerCustomerAccount())) return false; + } + if (hasPartnerLinkMetadata() != other.hasPartnerLinkMetadata()) return false; + if (hasPartnerLinkMetadata()) { + if (!getPartnerLinkMetadata().equals(other.getPartnerLinkMetadata())) return false; + } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -396,6 +607,16 @@ public int hashCode() { hash = (37 * hash) + PARTNER_ACCOUNT_FIELD_NUMBER; hash = (53 * hash) + getPartnerAccount().hashCode(); } + hash = (37 * hash) + FEATURE_SET_FIELD_NUMBER; + hash = (53 * hash) + featureSet_; + if (hasPartnerCustomerAccount()) { + hash = (37 * hash) + PARTNER_CUSTOMER_ACCOUNT_FIELD_NUMBER; + hash = (53 * hash) + getPartnerCustomerAccount().hashCode(); + } + if (hasPartnerLinkMetadata()) { + hash = (37 * hash) + PARTNER_LINK_METADATA_FIELD_NUMBER; + hash = (53 * hash) + getPartnerLinkMetadata().hashCode(); + } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -539,6 +760,8 @@ private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { internalGetOwningAccountFieldBuilder(); internalGetPartnerAccountFieldBuilder(); + internalGetPartnerCustomerAccountFieldBuilder(); + internalGetPartnerLinkMetadataFieldBuilder(); } } @@ -558,6 +781,17 @@ public Builder clear() { partnerAccountBuilder_.dispose(); partnerAccountBuilder_ = null; } + featureSet_ = 0; + partnerCustomerAccount_ = null; + if (partnerCustomerAccountBuilder_ != null) { + partnerCustomerAccountBuilder_.dispose(); + partnerCustomerAccountBuilder_ = null; + } + partnerLinkMetadata_ = null; + if (partnerLinkMetadataBuilder_ != null) { + partnerLinkMetadataBuilder_.dispose(); + partnerLinkMetadataBuilder_ = null; + } return this; } @@ -611,6 +845,23 @@ private void buildPartial0(com.google.ads.datamanager.v1.PartnerLink result) { partnerAccountBuilder_ == null ? partnerAccount_ : partnerAccountBuilder_.build(); to_bitField0_ |= 0x00000002; } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.featureSet_ = featureSet_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.partnerCustomerAccount_ = + partnerCustomerAccountBuilder_ == null + ? partnerCustomerAccount_ + : partnerCustomerAccountBuilder_.build(); + to_bitField0_ |= 0x00000004; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.partnerLinkMetadata_ = + partnerLinkMetadataBuilder_ == null + ? partnerLinkMetadata_ + : partnerLinkMetadataBuilder_.build(); + to_bitField0_ |= 0x00000008; + } result.bitField0_ |= to_bitField0_; } @@ -642,6 +893,15 @@ public Builder mergeFrom(com.google.ads.datamanager.v1.PartnerLink other) { if (other.hasPartnerAccount()) { mergePartnerAccount(other.getPartnerAccount()); } + if (other.featureSet_ != 0) { + setFeatureSetValue(other.getFeatureSetValue()); + } + if (other.hasPartnerCustomerAccount()) { + mergePartnerCustomerAccount(other.getPartnerCustomerAccount()); + } + if (other.hasPartnerLinkMetadata()) { + mergePartnerLinkMetadata(other.getPartnerLinkMetadata()); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -694,6 +954,27 @@ public Builder mergeFrom( bitField0_ |= 0x00000008; break; } // case 34 + case 40: + { + featureSet_ = input.readEnum(); + bitField0_ |= 0x00000010; + break; + } // case 40 + case 50: + { + input.readMessage( + internalGetPartnerCustomerAccountFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 50 + case 58: + { + input.readMessage( + internalGetPartnerLinkMetadataFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000040; + break; + } // case 58 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -1373,6 +1654,601 @@ public com.google.ads.datamanager.v1.ProductAccountOrBuilder getPartnerAccountOr return partnerAccountBuilder_; } + private int featureSet_ = 0; + + /** + * + * + *
+     * Optional. Immutable. The set of features supported for the partner link.
+     * If not specified, the system behavior defaults to
+     * [FEATURE_SET_AUDIENCE_AND_EVENT_MANAGEMENT][google.ads.datamanager.v1.FeatureSet.FEATURE_SET_AUDIENCE_AND_EVENT_MANAGEMENT].
+     * 
+ * + * + * .google.ads.datamanager.v1.FeatureSet feature_set = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The enum numeric value on the wire for featureSet. + */ + @java.lang.Override + public int getFeatureSetValue() { + return featureSet_; + } + + /** + * + * + *
+     * Optional. Immutable. The set of features supported for the partner link.
+     * If not specified, the system behavior defaults to
+     * [FEATURE_SET_AUDIENCE_AND_EVENT_MANAGEMENT][google.ads.datamanager.v1.FeatureSet.FEATURE_SET_AUDIENCE_AND_EVENT_MANAGEMENT].
+     * 
+ * + * + * .google.ads.datamanager.v1.FeatureSet feature_set = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @param value The enum numeric value on the wire for featureSet to set. + * @return This builder for chaining. + */ + public Builder setFeatureSetValue(int value) { + featureSet_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Immutable. The set of features supported for the partner link.
+     * If not specified, the system behavior defaults to
+     * [FEATURE_SET_AUDIENCE_AND_EVENT_MANAGEMENT][google.ads.datamanager.v1.FeatureSet.FEATURE_SET_AUDIENCE_AND_EVENT_MANAGEMENT].
+     * 
+ * + * + * .google.ads.datamanager.v1.FeatureSet feature_set = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The featureSet. + */ + @java.lang.Override + public com.google.ads.datamanager.v1.FeatureSet getFeatureSet() { + com.google.ads.datamanager.v1.FeatureSet result = + com.google.ads.datamanager.v1.FeatureSet.forNumber(featureSet_); + return result == null ? com.google.ads.datamanager.v1.FeatureSet.UNRECOGNIZED : result; + } + + /** + * + * + *
+     * Optional. Immutable. The set of features supported for the partner link.
+     * If not specified, the system behavior defaults to
+     * [FEATURE_SET_AUDIENCE_AND_EVENT_MANAGEMENT][google.ads.datamanager.v1.FeatureSet.FEATURE_SET_AUDIENCE_AND_EVENT_MANAGEMENT].
+     * 
+ * + * + * .google.ads.datamanager.v1.FeatureSet feature_set = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @param value The featureSet to set. + * @return This builder for chaining. + */ + public Builder setFeatureSet(com.google.ads.datamanager.v1.FeatureSet value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000010; + featureSet_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Immutable. The set of features supported for the partner link.
+     * If not specified, the system behavior defaults to
+     * [FEATURE_SET_AUDIENCE_AND_EVENT_MANAGEMENT][google.ads.datamanager.v1.FeatureSet.FEATURE_SET_AUDIENCE_AND_EVENT_MANAGEMENT].
+     * 
+ * + * + * .google.ads.datamanager.v1.FeatureSet feature_set = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return This builder for chaining. + */ + public Builder clearFeatureSet() { + bitField0_ = (bitField0_ & ~0x00000010); + featureSet_ = 0; + onChanged(); + return this; + } + + private com.google.ads.datamanager.v1.PartnerCustomerAccount partnerCustomerAccount_; + private com.google.protobuf.SingleFieldBuilder< + com.google.ads.datamanager.v1.PartnerCustomerAccount, + com.google.ads.datamanager.v1.PartnerCustomerAccount.Builder, + com.google.ads.datamanager.v1.PartnerCustomerAccountOrBuilder> + partnerCustomerAccountBuilder_; + + /** + * + * + *
+     * Optional. The customer account in the partner system.
+     * This is required for partner links with the
+     * [FEATURE_SET_AD_EVENT_MANAGEMENT][google.ads.datamanager.v1.FeatureSet.FEATURE_SET_AD_EVENT_MANAGEMENT]
+     * feature set.
+     * 
+ * + * + * .google.ads.datamanager.v1.PartnerCustomerAccount partner_customer_account = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the partnerCustomerAccount field is set. + */ + public boolean hasPartnerCustomerAccount() { + return ((bitField0_ & 0x00000020) != 0); + } + + /** + * + * + *
+     * Optional. The customer account in the partner system.
+     * This is required for partner links with the
+     * [FEATURE_SET_AD_EVENT_MANAGEMENT][google.ads.datamanager.v1.FeatureSet.FEATURE_SET_AD_EVENT_MANAGEMENT]
+     * feature set.
+     * 
+ * + * + * .google.ads.datamanager.v1.PartnerCustomerAccount partner_customer_account = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The partnerCustomerAccount. + */ + public com.google.ads.datamanager.v1.PartnerCustomerAccount getPartnerCustomerAccount() { + if (partnerCustomerAccountBuilder_ == null) { + return partnerCustomerAccount_ == null + ? com.google.ads.datamanager.v1.PartnerCustomerAccount.getDefaultInstance() + : partnerCustomerAccount_; + } else { + return partnerCustomerAccountBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Optional. The customer account in the partner system.
+     * This is required for partner links with the
+     * [FEATURE_SET_AD_EVENT_MANAGEMENT][google.ads.datamanager.v1.FeatureSet.FEATURE_SET_AD_EVENT_MANAGEMENT]
+     * feature set.
+     * 
+ * + * + * .google.ads.datamanager.v1.PartnerCustomerAccount partner_customer_account = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setPartnerCustomerAccount( + com.google.ads.datamanager.v1.PartnerCustomerAccount value) { + if (partnerCustomerAccountBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + partnerCustomerAccount_ = value; + } else { + partnerCustomerAccountBuilder_.setMessage(value); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The customer account in the partner system.
+     * This is required for partner links with the
+     * [FEATURE_SET_AD_EVENT_MANAGEMENT][google.ads.datamanager.v1.FeatureSet.FEATURE_SET_AD_EVENT_MANAGEMENT]
+     * feature set.
+     * 
+ * + * + * .google.ads.datamanager.v1.PartnerCustomerAccount partner_customer_account = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setPartnerCustomerAccount( + com.google.ads.datamanager.v1.PartnerCustomerAccount.Builder builderForValue) { + if (partnerCustomerAccountBuilder_ == null) { + partnerCustomerAccount_ = builderForValue.build(); + } else { + partnerCustomerAccountBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The customer account in the partner system.
+     * This is required for partner links with the
+     * [FEATURE_SET_AD_EVENT_MANAGEMENT][google.ads.datamanager.v1.FeatureSet.FEATURE_SET_AD_EVENT_MANAGEMENT]
+     * feature set.
+     * 
+ * + * + * .google.ads.datamanager.v1.PartnerCustomerAccount partner_customer_account = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergePartnerCustomerAccount( + com.google.ads.datamanager.v1.PartnerCustomerAccount value) { + if (partnerCustomerAccountBuilder_ == null) { + if (((bitField0_ & 0x00000020) != 0) + && partnerCustomerAccount_ != null + && partnerCustomerAccount_ + != com.google.ads.datamanager.v1.PartnerCustomerAccount.getDefaultInstance()) { + getPartnerCustomerAccountBuilder().mergeFrom(value); + } else { + partnerCustomerAccount_ = value; + } + } else { + partnerCustomerAccountBuilder_.mergeFrom(value); + } + if (partnerCustomerAccount_ != null) { + bitField0_ |= 0x00000020; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Optional. The customer account in the partner system.
+     * This is required for partner links with the
+     * [FEATURE_SET_AD_EVENT_MANAGEMENT][google.ads.datamanager.v1.FeatureSet.FEATURE_SET_AD_EVENT_MANAGEMENT]
+     * feature set.
+     * 
+ * + * + * .google.ads.datamanager.v1.PartnerCustomerAccount partner_customer_account = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearPartnerCustomerAccount() { + bitField0_ = (bitField0_ & ~0x00000020); + partnerCustomerAccount_ = null; + if (partnerCustomerAccountBuilder_ != null) { + partnerCustomerAccountBuilder_.dispose(); + partnerCustomerAccountBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The customer account in the partner system.
+     * This is required for partner links with the
+     * [FEATURE_SET_AD_EVENT_MANAGEMENT][google.ads.datamanager.v1.FeatureSet.FEATURE_SET_AD_EVENT_MANAGEMENT]
+     * feature set.
+     * 
+ * + * + * .google.ads.datamanager.v1.PartnerCustomerAccount partner_customer_account = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.ads.datamanager.v1.PartnerCustomerAccount.Builder + getPartnerCustomerAccountBuilder() { + bitField0_ |= 0x00000020; + onChanged(); + return internalGetPartnerCustomerAccountFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. The customer account in the partner system.
+     * This is required for partner links with the
+     * [FEATURE_SET_AD_EVENT_MANAGEMENT][google.ads.datamanager.v1.FeatureSet.FEATURE_SET_AD_EVENT_MANAGEMENT]
+     * feature set.
+     * 
+ * + * + * .google.ads.datamanager.v1.PartnerCustomerAccount partner_customer_account = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.ads.datamanager.v1.PartnerCustomerAccountOrBuilder + getPartnerCustomerAccountOrBuilder() { + if (partnerCustomerAccountBuilder_ != null) { + return partnerCustomerAccountBuilder_.getMessageOrBuilder(); + } else { + return partnerCustomerAccount_ == null + ? com.google.ads.datamanager.v1.PartnerCustomerAccount.getDefaultInstance() + : partnerCustomerAccount_; + } + } + + /** + * + * + *
+     * Optional. The customer account in the partner system.
+     * This is required for partner links with the
+     * [FEATURE_SET_AD_EVENT_MANAGEMENT][google.ads.datamanager.v1.FeatureSet.FEATURE_SET_AD_EVENT_MANAGEMENT]
+     * feature set.
+     * 
+ * + * + * .google.ads.datamanager.v1.PartnerCustomerAccount partner_customer_account = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.ads.datamanager.v1.PartnerCustomerAccount, + com.google.ads.datamanager.v1.PartnerCustomerAccount.Builder, + com.google.ads.datamanager.v1.PartnerCustomerAccountOrBuilder> + internalGetPartnerCustomerAccountFieldBuilder() { + if (partnerCustomerAccountBuilder_ == null) { + partnerCustomerAccountBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.ads.datamanager.v1.PartnerCustomerAccount, + com.google.ads.datamanager.v1.PartnerCustomerAccount.Builder, + com.google.ads.datamanager.v1.PartnerCustomerAccountOrBuilder>( + getPartnerCustomerAccount(), getParentForChildren(), isClean()); + partnerCustomerAccount_ = null; + } + return partnerCustomerAccountBuilder_; + } + + private com.google.ads.datamanager.v1.PartnerLinkMetadata partnerLinkMetadata_; + private com.google.protobuf.SingleFieldBuilder< + com.google.ads.datamanager.v1.PartnerLinkMetadata, + com.google.ads.datamanager.v1.PartnerLinkMetadata.Builder, + com.google.ads.datamanager.v1.PartnerLinkMetadataOrBuilder> + partnerLinkMetadataBuilder_; + + /** + * + * + *
+     * Optional. Metadata associated with the partner link.
+     * This is optional and only accepted for partner links with the
+     * [FEATURE_SET_AD_EVENT_MANAGEMENT][google.ads.datamanager.v1.FeatureSet.FEATURE_SET_AD_EVENT_MANAGEMENT].
+     * 
+ * + * + * .google.ads.datamanager.v1.PartnerLinkMetadata partner_link_metadata = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the partnerLinkMetadata field is set. + */ + public boolean hasPartnerLinkMetadata() { + return ((bitField0_ & 0x00000040) != 0); + } + + /** + * + * + *
+     * Optional. Metadata associated with the partner link.
+     * This is optional and only accepted for partner links with the
+     * [FEATURE_SET_AD_EVENT_MANAGEMENT][google.ads.datamanager.v1.FeatureSet.FEATURE_SET_AD_EVENT_MANAGEMENT].
+     * 
+ * + * + * .google.ads.datamanager.v1.PartnerLinkMetadata partner_link_metadata = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The partnerLinkMetadata. + */ + public com.google.ads.datamanager.v1.PartnerLinkMetadata getPartnerLinkMetadata() { + if (partnerLinkMetadataBuilder_ == null) { + return partnerLinkMetadata_ == null + ? com.google.ads.datamanager.v1.PartnerLinkMetadata.getDefaultInstance() + : partnerLinkMetadata_; + } else { + return partnerLinkMetadataBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Optional. Metadata associated with the partner link.
+     * This is optional and only accepted for partner links with the
+     * [FEATURE_SET_AD_EVENT_MANAGEMENT][google.ads.datamanager.v1.FeatureSet.FEATURE_SET_AD_EVENT_MANAGEMENT].
+     * 
+ * + * + * .google.ads.datamanager.v1.PartnerLinkMetadata partner_link_metadata = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setPartnerLinkMetadata(com.google.ads.datamanager.v1.PartnerLinkMetadata value) { + if (partnerLinkMetadataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + partnerLinkMetadata_ = value; + } else { + partnerLinkMetadataBuilder_.setMessage(value); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Metadata associated with the partner link.
+     * This is optional and only accepted for partner links with the
+     * [FEATURE_SET_AD_EVENT_MANAGEMENT][google.ads.datamanager.v1.FeatureSet.FEATURE_SET_AD_EVENT_MANAGEMENT].
+     * 
+ * + * + * .google.ads.datamanager.v1.PartnerLinkMetadata partner_link_metadata = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setPartnerLinkMetadata( + com.google.ads.datamanager.v1.PartnerLinkMetadata.Builder builderForValue) { + if (partnerLinkMetadataBuilder_ == null) { + partnerLinkMetadata_ = builderForValue.build(); + } else { + partnerLinkMetadataBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Metadata associated with the partner link.
+     * This is optional and only accepted for partner links with the
+     * [FEATURE_SET_AD_EVENT_MANAGEMENT][google.ads.datamanager.v1.FeatureSet.FEATURE_SET_AD_EVENT_MANAGEMENT].
+     * 
+ * + * + * .google.ads.datamanager.v1.PartnerLinkMetadata partner_link_metadata = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergePartnerLinkMetadata( + com.google.ads.datamanager.v1.PartnerLinkMetadata value) { + if (partnerLinkMetadataBuilder_ == null) { + if (((bitField0_ & 0x00000040) != 0) + && partnerLinkMetadata_ != null + && partnerLinkMetadata_ + != com.google.ads.datamanager.v1.PartnerLinkMetadata.getDefaultInstance()) { + getPartnerLinkMetadataBuilder().mergeFrom(value); + } else { + partnerLinkMetadata_ = value; + } + } else { + partnerLinkMetadataBuilder_.mergeFrom(value); + } + if (partnerLinkMetadata_ != null) { + bitField0_ |= 0x00000040; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Optional. Metadata associated with the partner link.
+     * This is optional and only accepted for partner links with the
+     * [FEATURE_SET_AD_EVENT_MANAGEMENT][google.ads.datamanager.v1.FeatureSet.FEATURE_SET_AD_EVENT_MANAGEMENT].
+     * 
+ * + * + * .google.ads.datamanager.v1.PartnerLinkMetadata partner_link_metadata = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearPartnerLinkMetadata() { + bitField0_ = (bitField0_ & ~0x00000040); + partnerLinkMetadata_ = null; + if (partnerLinkMetadataBuilder_ != null) { + partnerLinkMetadataBuilder_.dispose(); + partnerLinkMetadataBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Metadata associated with the partner link.
+     * This is optional and only accepted for partner links with the
+     * [FEATURE_SET_AD_EVENT_MANAGEMENT][google.ads.datamanager.v1.FeatureSet.FEATURE_SET_AD_EVENT_MANAGEMENT].
+     * 
+ * + * + * .google.ads.datamanager.v1.PartnerLinkMetadata partner_link_metadata = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.ads.datamanager.v1.PartnerLinkMetadata.Builder + getPartnerLinkMetadataBuilder() { + bitField0_ |= 0x00000040; + onChanged(); + return internalGetPartnerLinkMetadataFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. Metadata associated with the partner link.
+     * This is optional and only accepted for partner links with the
+     * [FEATURE_SET_AD_EVENT_MANAGEMENT][google.ads.datamanager.v1.FeatureSet.FEATURE_SET_AD_EVENT_MANAGEMENT].
+     * 
+ * + * + * .google.ads.datamanager.v1.PartnerLinkMetadata partner_link_metadata = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.ads.datamanager.v1.PartnerLinkMetadataOrBuilder + getPartnerLinkMetadataOrBuilder() { + if (partnerLinkMetadataBuilder_ != null) { + return partnerLinkMetadataBuilder_.getMessageOrBuilder(); + } else { + return partnerLinkMetadata_ == null + ? com.google.ads.datamanager.v1.PartnerLinkMetadata.getDefaultInstance() + : partnerLinkMetadata_; + } + } + + /** + * + * + *
+     * Optional. Metadata associated with the partner link.
+     * This is optional and only accepted for partner links with the
+     * [FEATURE_SET_AD_EVENT_MANAGEMENT][google.ads.datamanager.v1.FeatureSet.FEATURE_SET_AD_EVENT_MANAGEMENT].
+     * 
+ * + * + * .google.ads.datamanager.v1.PartnerLinkMetadata partner_link_metadata = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.ads.datamanager.v1.PartnerLinkMetadata, + com.google.ads.datamanager.v1.PartnerLinkMetadata.Builder, + com.google.ads.datamanager.v1.PartnerLinkMetadataOrBuilder> + internalGetPartnerLinkMetadataFieldBuilder() { + if (partnerLinkMetadataBuilder_ == null) { + partnerLinkMetadataBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.ads.datamanager.v1.PartnerLinkMetadata, + com.google.ads.datamanager.v1.PartnerLinkMetadata.Builder, + com.google.ads.datamanager.v1.PartnerLinkMetadataOrBuilder>( + getPartnerLinkMetadata(), getParentForChildren(), isClean()); + partnerLinkMetadata_ = null; + } + return partnerLinkMetadataBuilder_; + } + // @@protoc_insertion_point(builder_scope:google.ads.datamanager.v1.PartnerLink) } diff --git a/java-datamanager/proto-data-manager-v1/src/main/java/com/google/ads/datamanager/v1/PartnerLinkMetadata.java b/java-datamanager/proto-data-manager-v1/src/main/java/com/google/ads/datamanager/v1/PartnerLinkMetadata.java new file mode 100644 index 000000000000..de1f2c56297e --- /dev/null +++ b/java-datamanager/proto-data-manager-v1/src/main/java/com/google/ads/datamanager/v1/PartnerLinkMetadata.java @@ -0,0 +1,985 @@ +/* + * 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/ads/datamanager/v1/partner_link_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.ads.datamanager.v1; + +/** + * + * + *
+ * Represents metadata associated with a partner link.
+ * 
+ * + * Protobuf type {@code google.ads.datamanager.v1.PartnerLinkMetadata} + */ +@com.google.protobuf.Generated +public final class PartnerLinkMetadata extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.ads.datamanager.v1.PartnerLinkMetadata) + PartnerLinkMetadataOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "PartnerLinkMetadata"); + } + + // Use PartnerLinkMetadata.newBuilder() to construct. + private PartnerLinkMetadata(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private PartnerLinkMetadata() { + implicitAccounts_ = java.util.Collections.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.ads.datamanager.v1.PartnerLinkServiceProto + .internal_static_google_ads_datamanager_v1_PartnerLinkMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.ads.datamanager.v1.PartnerLinkServiceProto + .internal_static_google_ads_datamanager_v1_PartnerLinkMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.ads.datamanager.v1.PartnerLinkMetadata.class, + com.google.ads.datamanager.v1.PartnerLinkMetadata.Builder.class); + } + + public static final int IMPLICIT_ACCOUNTS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List implicitAccounts_; + + /** + * + * + *
+   * Optional. The list of implicit accounts.
+   * 
+ * + * + * repeated .google.ads.datamanager.v1.PartnerCustomerAccount implicit_accounts = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List + getImplicitAccountsList() { + return implicitAccounts_; + } + + /** + * + * + *
+   * Optional. The list of implicit accounts.
+   * 
+ * + * + * repeated .google.ads.datamanager.v1.PartnerCustomerAccount implicit_accounts = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List + getImplicitAccountsOrBuilderList() { + return implicitAccounts_; + } + + /** + * + * + *
+   * Optional. The list of implicit accounts.
+   * 
+ * + * + * repeated .google.ads.datamanager.v1.PartnerCustomerAccount implicit_accounts = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public int getImplicitAccountsCount() { + return implicitAccounts_.size(); + } + + /** + * + * + *
+   * Optional. The list of implicit accounts.
+   * 
+ * + * + * repeated .google.ads.datamanager.v1.PartnerCustomerAccount implicit_accounts = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.ads.datamanager.v1.PartnerCustomerAccount getImplicitAccounts(int index) { + return implicitAccounts_.get(index); + } + + /** + * + * + *
+   * Optional. The list of implicit accounts.
+   * 
+ * + * + * repeated .google.ads.datamanager.v1.PartnerCustomerAccount implicit_accounts = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.ads.datamanager.v1.PartnerCustomerAccountOrBuilder getImplicitAccountsOrBuilder( + int index) { + return implicitAccounts_.get(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 { + for (int i = 0; i < implicitAccounts_.size(); i++) { + output.writeMessage(1, implicitAccounts_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < implicitAccounts_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, implicitAccounts_.get(i)); + } + 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.ads.datamanager.v1.PartnerLinkMetadata)) { + return super.equals(obj); + } + com.google.ads.datamanager.v1.PartnerLinkMetadata other = + (com.google.ads.datamanager.v1.PartnerLinkMetadata) obj; + + if (!getImplicitAccountsList().equals(other.getImplicitAccountsList())) 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 (getImplicitAccountsCount() > 0) { + hash = (37 * hash) + IMPLICIT_ACCOUNTS_FIELD_NUMBER; + hash = (53 * hash) + getImplicitAccountsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.ads.datamanager.v1.PartnerLinkMetadata parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.ads.datamanager.v1.PartnerLinkMetadata parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.ads.datamanager.v1.PartnerLinkMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.ads.datamanager.v1.PartnerLinkMetadata 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.ads.datamanager.v1.PartnerLinkMetadata parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.ads.datamanager.v1.PartnerLinkMetadata parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.ads.datamanager.v1.PartnerLinkMetadata parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.ads.datamanager.v1.PartnerLinkMetadata 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.ads.datamanager.v1.PartnerLinkMetadata parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.ads.datamanager.v1.PartnerLinkMetadata 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.ads.datamanager.v1.PartnerLinkMetadata parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.ads.datamanager.v1.PartnerLinkMetadata 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.ads.datamanager.v1.PartnerLinkMetadata 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; + } + + /** + * + * + *
+   * Represents metadata associated with a partner link.
+   * 
+ * + * Protobuf type {@code google.ads.datamanager.v1.PartnerLinkMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.ads.datamanager.v1.PartnerLinkMetadata) + com.google.ads.datamanager.v1.PartnerLinkMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.ads.datamanager.v1.PartnerLinkServiceProto + .internal_static_google_ads_datamanager_v1_PartnerLinkMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.ads.datamanager.v1.PartnerLinkServiceProto + .internal_static_google_ads_datamanager_v1_PartnerLinkMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.ads.datamanager.v1.PartnerLinkMetadata.class, + com.google.ads.datamanager.v1.PartnerLinkMetadata.Builder.class); + } + + // Construct using com.google.ads.datamanager.v1.PartnerLinkMetadata.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (implicitAccountsBuilder_ == null) { + implicitAccounts_ = java.util.Collections.emptyList(); + } else { + implicitAccounts_ = null; + implicitAccountsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.ads.datamanager.v1.PartnerLinkServiceProto + .internal_static_google_ads_datamanager_v1_PartnerLinkMetadata_descriptor; + } + + @java.lang.Override + public com.google.ads.datamanager.v1.PartnerLinkMetadata getDefaultInstanceForType() { + return com.google.ads.datamanager.v1.PartnerLinkMetadata.getDefaultInstance(); + } + + @java.lang.Override + public com.google.ads.datamanager.v1.PartnerLinkMetadata build() { + com.google.ads.datamanager.v1.PartnerLinkMetadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.ads.datamanager.v1.PartnerLinkMetadata buildPartial() { + com.google.ads.datamanager.v1.PartnerLinkMetadata result = + new com.google.ads.datamanager.v1.PartnerLinkMetadata(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.ads.datamanager.v1.PartnerLinkMetadata result) { + if (implicitAccountsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + implicitAccounts_ = java.util.Collections.unmodifiableList(implicitAccounts_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.implicitAccounts_ = implicitAccounts_; + } else { + result.implicitAccounts_ = implicitAccountsBuilder_.build(); + } + } + + private void buildPartial0(com.google.ads.datamanager.v1.PartnerLinkMetadata result) { + int from_bitField0_ = bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.ads.datamanager.v1.PartnerLinkMetadata) { + return mergeFrom((com.google.ads.datamanager.v1.PartnerLinkMetadata) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.ads.datamanager.v1.PartnerLinkMetadata other) { + if (other == com.google.ads.datamanager.v1.PartnerLinkMetadata.getDefaultInstance()) + return this; + if (implicitAccountsBuilder_ == null) { + if (!other.implicitAccounts_.isEmpty()) { + if (implicitAccounts_.isEmpty()) { + implicitAccounts_ = other.implicitAccounts_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureImplicitAccountsIsMutable(); + implicitAccounts_.addAll(other.implicitAccounts_); + } + onChanged(); + } + } else { + if (!other.implicitAccounts_.isEmpty()) { + if (implicitAccountsBuilder_.isEmpty()) { + implicitAccountsBuilder_.dispose(); + implicitAccountsBuilder_ = null; + implicitAccounts_ = other.implicitAccounts_; + bitField0_ = (bitField0_ & ~0x00000001); + implicitAccountsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetImplicitAccountsFieldBuilder() + : null; + } else { + implicitAccountsBuilder_.addAllMessages(other.implicitAccounts_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.ads.datamanager.v1.PartnerCustomerAccount m = + input.readMessage( + com.google.ads.datamanager.v1.PartnerCustomerAccount.parser(), + extensionRegistry); + if (implicitAccountsBuilder_ == null) { + ensureImplicitAccountsIsMutable(); + implicitAccounts_.add(m); + } else { + implicitAccountsBuilder_.addMessage(m); + } + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List implicitAccounts_ = + java.util.Collections.emptyList(); + + private void ensureImplicitAccountsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + implicitAccounts_ = + new java.util.ArrayList( + implicitAccounts_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.ads.datamanager.v1.PartnerCustomerAccount, + com.google.ads.datamanager.v1.PartnerCustomerAccount.Builder, + com.google.ads.datamanager.v1.PartnerCustomerAccountOrBuilder> + implicitAccountsBuilder_; + + /** + * + * + *
+     * Optional. The list of implicit accounts.
+     * 
+ * + * + * repeated .google.ads.datamanager.v1.PartnerCustomerAccount implicit_accounts = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getImplicitAccountsList() { + if (implicitAccountsBuilder_ == null) { + return java.util.Collections.unmodifiableList(implicitAccounts_); + } else { + return implicitAccountsBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * Optional. The list of implicit accounts.
+     * 
+ * + * + * repeated .google.ads.datamanager.v1.PartnerCustomerAccount implicit_accounts = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public int getImplicitAccountsCount() { + if (implicitAccountsBuilder_ == null) { + return implicitAccounts_.size(); + } else { + return implicitAccountsBuilder_.getCount(); + } + } + + /** + * + * + *
+     * Optional. The list of implicit accounts.
+     * 
+ * + * + * repeated .google.ads.datamanager.v1.PartnerCustomerAccount implicit_accounts = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.ads.datamanager.v1.PartnerCustomerAccount getImplicitAccounts(int index) { + if (implicitAccountsBuilder_ == null) { + return implicitAccounts_.get(index); + } else { + return implicitAccountsBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * Optional. The list of implicit accounts.
+     * 
+ * + * + * repeated .google.ads.datamanager.v1.PartnerCustomerAccount implicit_accounts = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setImplicitAccounts( + int index, com.google.ads.datamanager.v1.PartnerCustomerAccount value) { + if (implicitAccountsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureImplicitAccountsIsMutable(); + implicitAccounts_.set(index, value); + onChanged(); + } else { + implicitAccountsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Optional. The list of implicit accounts.
+     * 
+ * + * + * repeated .google.ads.datamanager.v1.PartnerCustomerAccount implicit_accounts = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setImplicitAccounts( + int index, com.google.ads.datamanager.v1.PartnerCustomerAccount.Builder builderForValue) { + if (implicitAccountsBuilder_ == null) { + ensureImplicitAccountsIsMutable(); + implicitAccounts_.set(index, builderForValue.build()); + onChanged(); + } else { + implicitAccountsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Optional. The list of implicit accounts.
+     * 
+ * + * + * repeated .google.ads.datamanager.v1.PartnerCustomerAccount implicit_accounts = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addImplicitAccounts(com.google.ads.datamanager.v1.PartnerCustomerAccount value) { + if (implicitAccountsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureImplicitAccountsIsMutable(); + implicitAccounts_.add(value); + onChanged(); + } else { + implicitAccountsBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * Optional. The list of implicit accounts.
+     * 
+ * + * + * repeated .google.ads.datamanager.v1.PartnerCustomerAccount implicit_accounts = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addImplicitAccounts( + int index, com.google.ads.datamanager.v1.PartnerCustomerAccount value) { + if (implicitAccountsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureImplicitAccountsIsMutable(); + implicitAccounts_.add(index, value); + onChanged(); + } else { + implicitAccountsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Optional. The list of implicit accounts.
+     * 
+ * + * + * repeated .google.ads.datamanager.v1.PartnerCustomerAccount implicit_accounts = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addImplicitAccounts( + com.google.ads.datamanager.v1.PartnerCustomerAccount.Builder builderForValue) { + if (implicitAccountsBuilder_ == null) { + ensureImplicitAccountsIsMutable(); + implicitAccounts_.add(builderForValue.build()); + onChanged(); + } else { + implicitAccountsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Optional. The list of implicit accounts.
+     * 
+ * + * + * repeated .google.ads.datamanager.v1.PartnerCustomerAccount implicit_accounts = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addImplicitAccounts( + int index, com.google.ads.datamanager.v1.PartnerCustomerAccount.Builder builderForValue) { + if (implicitAccountsBuilder_ == null) { + ensureImplicitAccountsIsMutable(); + implicitAccounts_.add(index, builderForValue.build()); + onChanged(); + } else { + implicitAccountsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Optional. The list of implicit accounts.
+     * 
+ * + * + * repeated .google.ads.datamanager.v1.PartnerCustomerAccount implicit_accounts = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addAllImplicitAccounts( + java.lang.Iterable values) { + if (implicitAccountsBuilder_ == null) { + ensureImplicitAccountsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, implicitAccounts_); + onChanged(); + } else { + implicitAccountsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * Optional. The list of implicit accounts.
+     * 
+ * + * + * repeated .google.ads.datamanager.v1.PartnerCustomerAccount implicit_accounts = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearImplicitAccounts() { + if (implicitAccountsBuilder_ == null) { + implicitAccounts_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + implicitAccountsBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Optional. The list of implicit accounts.
+     * 
+ * + * + * repeated .google.ads.datamanager.v1.PartnerCustomerAccount implicit_accounts = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder removeImplicitAccounts(int index) { + if (implicitAccountsBuilder_ == null) { + ensureImplicitAccountsIsMutable(); + implicitAccounts_.remove(index); + onChanged(); + } else { + implicitAccountsBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * Optional. The list of implicit accounts.
+     * 
+ * + * + * repeated .google.ads.datamanager.v1.PartnerCustomerAccount implicit_accounts = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.ads.datamanager.v1.PartnerCustomerAccount.Builder getImplicitAccountsBuilder( + int index) { + return internalGetImplicitAccountsFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * Optional. The list of implicit accounts.
+     * 
+ * + * + * repeated .google.ads.datamanager.v1.PartnerCustomerAccount implicit_accounts = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.ads.datamanager.v1.PartnerCustomerAccountOrBuilder + getImplicitAccountsOrBuilder(int index) { + if (implicitAccountsBuilder_ == null) { + return implicitAccounts_.get(index); + } else { + return implicitAccountsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * Optional. The list of implicit accounts.
+     * 
+ * + * + * repeated .google.ads.datamanager.v1.PartnerCustomerAccount implicit_accounts = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getImplicitAccountsOrBuilderList() { + if (implicitAccountsBuilder_ != null) { + return implicitAccountsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(implicitAccounts_); + } + } + + /** + * + * + *
+     * Optional. The list of implicit accounts.
+     * 
+ * + * + * repeated .google.ads.datamanager.v1.PartnerCustomerAccount implicit_accounts = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.ads.datamanager.v1.PartnerCustomerAccount.Builder + addImplicitAccountsBuilder() { + return internalGetImplicitAccountsFieldBuilder() + .addBuilder(com.google.ads.datamanager.v1.PartnerCustomerAccount.getDefaultInstance()); + } + + /** + * + * + *
+     * Optional. The list of implicit accounts.
+     * 
+ * + * + * repeated .google.ads.datamanager.v1.PartnerCustomerAccount implicit_accounts = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.ads.datamanager.v1.PartnerCustomerAccount.Builder addImplicitAccountsBuilder( + int index) { + return internalGetImplicitAccountsFieldBuilder() + .addBuilder( + index, com.google.ads.datamanager.v1.PartnerCustomerAccount.getDefaultInstance()); + } + + /** + * + * + *
+     * Optional. The list of implicit accounts.
+     * 
+ * + * + * repeated .google.ads.datamanager.v1.PartnerCustomerAccount implicit_accounts = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getImplicitAccountsBuilderList() { + return internalGetImplicitAccountsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.ads.datamanager.v1.PartnerCustomerAccount, + com.google.ads.datamanager.v1.PartnerCustomerAccount.Builder, + com.google.ads.datamanager.v1.PartnerCustomerAccountOrBuilder> + internalGetImplicitAccountsFieldBuilder() { + if (implicitAccountsBuilder_ == null) { + implicitAccountsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.ads.datamanager.v1.PartnerCustomerAccount, + com.google.ads.datamanager.v1.PartnerCustomerAccount.Builder, + com.google.ads.datamanager.v1.PartnerCustomerAccountOrBuilder>( + implicitAccounts_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + implicitAccounts_ = null; + } + return implicitAccountsBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.ads.datamanager.v1.PartnerLinkMetadata) + } + + // @@protoc_insertion_point(class_scope:google.ads.datamanager.v1.PartnerLinkMetadata) + private static final com.google.ads.datamanager.v1.PartnerLinkMetadata DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.ads.datamanager.v1.PartnerLinkMetadata(); + } + + public static com.google.ads.datamanager.v1.PartnerLinkMetadata getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PartnerLinkMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.ads.datamanager.v1.PartnerLinkMetadata getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-datamanager/proto-data-manager-v1/src/main/java/com/google/ads/datamanager/v1/PartnerLinkMetadataOrBuilder.java b/java-datamanager/proto-data-manager-v1/src/main/java/com/google/ads/datamanager/v1/PartnerLinkMetadataOrBuilder.java new file mode 100644 index 000000000000..8968f8349543 --- /dev/null +++ b/java-datamanager/proto-data-manager-v1/src/main/java/com/google/ads/datamanager/v1/PartnerLinkMetadataOrBuilder.java @@ -0,0 +1,95 @@ +/* + * 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/ads/datamanager/v1/partner_link_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.ads.datamanager.v1; + +@com.google.protobuf.Generated +public interface PartnerLinkMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.ads.datamanager.v1.PartnerLinkMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Optional. The list of implicit accounts.
+   * 
+ * + * + * repeated .google.ads.datamanager.v1.PartnerCustomerAccount implicit_accounts = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List getImplicitAccountsList(); + + /** + * + * + *
+   * Optional. The list of implicit accounts.
+   * 
+ * + * + * repeated .google.ads.datamanager.v1.PartnerCustomerAccount implicit_accounts = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.ads.datamanager.v1.PartnerCustomerAccount getImplicitAccounts(int index); + + /** + * + * + *
+   * Optional. The list of implicit accounts.
+   * 
+ * + * + * repeated .google.ads.datamanager.v1.PartnerCustomerAccount implicit_accounts = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + int getImplicitAccountsCount(); + + /** + * + * + *
+   * Optional. The list of implicit accounts.
+   * 
+ * + * + * repeated .google.ads.datamanager.v1.PartnerCustomerAccount implicit_accounts = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List + getImplicitAccountsOrBuilderList(); + + /** + * + * + *
+   * Optional. The list of implicit accounts.
+   * 
+ * + * + * repeated .google.ads.datamanager.v1.PartnerCustomerAccount implicit_accounts = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.ads.datamanager.v1.PartnerCustomerAccountOrBuilder getImplicitAccountsOrBuilder( + int index); +} diff --git a/java-datamanager/proto-data-manager-v1/src/main/java/com/google/ads/datamanager/v1/PartnerLinkOrBuilder.java b/java-datamanager/proto-data-manager-v1/src/main/java/com/google/ads/datamanager/v1/PartnerLinkOrBuilder.java index ba31e2586cb5..56ff11b12874 100644 --- a/java-datamanager/proto-data-manager-v1/src/main/java/com/google/ads/datamanager/v1/PartnerLinkOrBuilder.java +++ b/java-datamanager/proto-data-manager-v1/src/main/java/com/google/ads/datamanager/v1/PartnerLinkOrBuilder.java @@ -167,4 +167,140 @@ public interface PartnerLinkOrBuilder * */ com.google.ads.datamanager.v1.ProductAccountOrBuilder getPartnerAccountOrBuilder(); + + /** + * + * + *
+   * Optional. Immutable. The set of features supported for the partner link.
+   * If not specified, the system behavior defaults to
+   * [FEATURE_SET_AUDIENCE_AND_EVENT_MANAGEMENT][google.ads.datamanager.v1.FeatureSet.FEATURE_SET_AUDIENCE_AND_EVENT_MANAGEMENT].
+   * 
+ * + * + * .google.ads.datamanager.v1.FeatureSet feature_set = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The enum numeric value on the wire for featureSet. + */ + int getFeatureSetValue(); + + /** + * + * + *
+   * Optional. Immutable. The set of features supported for the partner link.
+   * If not specified, the system behavior defaults to
+   * [FEATURE_SET_AUDIENCE_AND_EVENT_MANAGEMENT][google.ads.datamanager.v1.FeatureSet.FEATURE_SET_AUDIENCE_AND_EVENT_MANAGEMENT].
+   * 
+ * + * + * .google.ads.datamanager.v1.FeatureSet feature_set = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The featureSet. + */ + com.google.ads.datamanager.v1.FeatureSet getFeatureSet(); + + /** + * + * + *
+   * Optional. The customer account in the partner system.
+   * This is required for partner links with the
+   * [FEATURE_SET_AD_EVENT_MANAGEMENT][google.ads.datamanager.v1.FeatureSet.FEATURE_SET_AD_EVENT_MANAGEMENT]
+   * feature set.
+   * 
+ * + * + * .google.ads.datamanager.v1.PartnerCustomerAccount partner_customer_account = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the partnerCustomerAccount field is set. + */ + boolean hasPartnerCustomerAccount(); + + /** + * + * + *
+   * Optional. The customer account in the partner system.
+   * This is required for partner links with the
+   * [FEATURE_SET_AD_EVENT_MANAGEMENT][google.ads.datamanager.v1.FeatureSet.FEATURE_SET_AD_EVENT_MANAGEMENT]
+   * feature set.
+   * 
+ * + * + * .google.ads.datamanager.v1.PartnerCustomerAccount partner_customer_account = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The partnerCustomerAccount. + */ + com.google.ads.datamanager.v1.PartnerCustomerAccount getPartnerCustomerAccount(); + + /** + * + * + *
+   * Optional. The customer account in the partner system.
+   * This is required for partner links with the
+   * [FEATURE_SET_AD_EVENT_MANAGEMENT][google.ads.datamanager.v1.FeatureSet.FEATURE_SET_AD_EVENT_MANAGEMENT]
+   * feature set.
+   * 
+ * + * + * .google.ads.datamanager.v1.PartnerCustomerAccount partner_customer_account = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.ads.datamanager.v1.PartnerCustomerAccountOrBuilder + getPartnerCustomerAccountOrBuilder(); + + /** + * + * + *
+   * Optional. Metadata associated with the partner link.
+   * This is optional and only accepted for partner links with the
+   * [FEATURE_SET_AD_EVENT_MANAGEMENT][google.ads.datamanager.v1.FeatureSet.FEATURE_SET_AD_EVENT_MANAGEMENT].
+   * 
+ * + * + * .google.ads.datamanager.v1.PartnerLinkMetadata partner_link_metadata = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the partnerLinkMetadata field is set. + */ + boolean hasPartnerLinkMetadata(); + + /** + * + * + *
+   * Optional. Metadata associated with the partner link.
+   * This is optional and only accepted for partner links with the
+   * [FEATURE_SET_AD_EVENT_MANAGEMENT][google.ads.datamanager.v1.FeatureSet.FEATURE_SET_AD_EVENT_MANAGEMENT].
+   * 
+ * + * + * .google.ads.datamanager.v1.PartnerLinkMetadata partner_link_metadata = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The partnerLinkMetadata. + */ + com.google.ads.datamanager.v1.PartnerLinkMetadata getPartnerLinkMetadata(); + + /** + * + * + *
+   * Optional. Metadata associated with the partner link.
+   * This is optional and only accepted for partner links with the
+   * [FEATURE_SET_AD_EVENT_MANAGEMENT][google.ads.datamanager.v1.FeatureSet.FEATURE_SET_AD_EVENT_MANAGEMENT].
+   * 
+ * + * + * .google.ads.datamanager.v1.PartnerLinkMetadata partner_link_metadata = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.ads.datamanager.v1.PartnerLinkMetadataOrBuilder getPartnerLinkMetadataOrBuilder(); } diff --git a/java-datamanager/proto-data-manager-v1/src/main/java/com/google/ads/datamanager/v1/PartnerLinkServiceProto.java b/java-datamanager/proto-data-manager-v1/src/main/java/com/google/ads/datamanager/v1/PartnerLinkServiceProto.java index 9767dd1e026c..c85fd546c55a 100644 --- a/java-datamanager/proto-data-manager-v1/src/main/java/com/google/ads/datamanager/v1/PartnerLinkServiceProto.java +++ b/java-datamanager/proto-data-manager-v1/src/main/java/com/google/ads/datamanager/v1/PartnerLinkServiceProto.java @@ -60,6 +60,14 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_ads_datamanager_v1_PartnerLink_descriptor; static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_ads_datamanager_v1_PartnerLink_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_ads_datamanager_v1_PartnerCustomerAccount_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_ads_datamanager_v1_PartnerCustomerAccount_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_ads_datamanager_v1_PartnerLinkMetadata_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_ads_datamanager_v1_PartnerLinkMetadata_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { return descriptor; @@ -69,59 +77,75 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { static { java.lang.String[] descriptorData = { - "\n4google/ads/datamanager/v1/partner_link" - + "_service.proto\022\031google.ads.datamanager.v" + "\n" + + "4google/ads/datamanager/v1/partner_link_service.proto\022\031google.ads.datamanager.v" + "1\032+google/ads/datamanager/v1/destination" + ".proto\032\034google/api/annotations.proto\032\027go" + "ogle/api/client.proto\032\037google/api/field_" - + "behavior.proto\032\031google/api/resource.prot" - + "o\032\033google/protobuf/empty.proto\"\235\001\n\030Creat" - + "ePartnerLinkRequest\022>\n\006parent\030\001 \001(\tB.\340A\002" - + "\372A(\022&datamanager.googleapis.com/PartnerL" - + "ink\022A\n\014partner_link\030\002 \001(\0132&.google.ads.d" - + "atamanager.v1.PartnerLinkB\003\340A\002\"X\n\030Delete" - + "PartnerLinkRequest\022<\n\004name\030\001 \001(\tB.\340A\002\372A(" - + "\n&datamanager.googleapis.com/PartnerLink" - + "\"\227\001\n\031SearchPartnerLinksRequest\022>\n\006parent" - + "\030\001 \001(\tB.\340A\002\372A(\022&datamanager.googleapis.c" - + "om/PartnerLink\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npag" - + "e_token\030\003 \001(\t\022\023\n\006filter\030\004 \001(\tB\003\340A\001\"t\n\032Se" - + "archPartnerLinksResponse\022=\n\rpartner_link" - + "s\030\001 \003(\0132&.google.ads.datamanager.v1.Part" - + "nerLink\022\027\n\017next_page_token\030\002 \001(\t\"\345\002\n\013Par" - + "tnerLink\022\021\n\004name\030\001 \001(\tB\003\340A\010\022\034\n\017partner_l" - + "ink_id\030\002 \001(\tB\003\340A\003\022F\n\016owning_account\030\003 \001(" - + "\0132).google.ads.datamanager.v1.ProductAcc" - + "ountB\003\340A\002\022G\n\017partner_account\030\004 \001(\0132).goo" - + "gle.ads.datamanager.v1.ProductAccountB\003\340" - + "A\002:\223\001\352A\217\001\n&datamanager.googleapis.com/Pa" - + "rtnerLink\022JaccountTypes/{account_type}/a" - + "ccounts/{account}/partnerLinks/{partner_" - + "link}*\014partnerLinks2\013partnerLink2\346\005\n\022Par" - + "tnerLinkService\022\321\001\n\021CreatePartnerLink\0223." - + "google.ads.datamanager.v1.CreatePartnerL" - + "inkRequest\032&.google.ads.datamanager.v1.P" - + "artnerLink\"_\332A\023parent,partner_link\202\323\344\223\002C" - + "\"3/v1/{parent=accountTypes/*/accounts/*}" - + "/partnerLinks:\014partner_link\022\244\001\n\021DeletePa" - + "rtnerLink\0223.google.ads.datamanager.v1.De" - + "letePartnerLinkRequest\032\026.google.protobuf" - + ".Empty\"B\332A\004name\202\323\344\223\0025*3/v1/{name=account" - + "Types/*/accounts/*/partnerLinks/*}\022\316\001\n\022S" - + "earchPartnerLinks\0224.google.ads.datamanag" - + "er.v1.SearchPartnerLinksRequest\0325.google" - + ".ads.datamanager.v1.SearchPartnerLinksRe" - + "sponse\"K\332A\006parent\202\323\344\223\002<\022:/v1/{parent=acc" - + "ountTypes/*/accounts/*}/partnerLinks:sea" - + "rch\032\203\001\312A\032datamanager.googleapis.com\322Acht" - + "tps://www.googleapis.com/auth/datamanage" - + "r,https://www.googleapis.com/auth/datama" - + "nager.partnerlinkB\324\001\n\035com.google.ads.dat" - + "amanager.v1B\027PartnerLinkServiceProtoP\001ZA" - + "cloud.google.com/go/datamanager/apiv1/da" - + "tamanagerpb;datamanagerpb\252\002\031Google.Ads.D" - + "ataManager.V1\312\002\031Google\\Ads\\DataManager\\V" - + "1\352\002\034Google::Ads::DataManager::V1b\006proto3" + + "behavior.proto\032\031google/api/resource.proto\032\033google/protobuf/empty.proto\"\235\001\n" + + "\030CreatePartnerLinkRequest\022>\n" + + "\006parent\030\001 \001(\tB.\340A\002" + + "\372A(\022&datamanager.googleapis.com/PartnerLink\022A\n" + + "\014partner_link\030\002" + + " \001(\0132&.google.ads.datamanager.v1.PartnerLinkB\003\340A\002\"X\n" + + "\030DeletePartnerLinkRequest\022<\n" + + "\004name\030\001 \001(\tB.\340A\002\372A(\n" + + "&datamanager.googleapis.com/PartnerLink\"\227\001\n" + + "\031SearchPartnerLinksRequest\022>\n" + + "\006parent\030\001 \001(" + + "\tB.\340A\002\372A(\022&datamanager.googleapis.com/PartnerLink\022\021\n" + + "\tpage_size\030\002 \001(\005\022\022\n\n" + + "page_token\030\003 \001(\t\022\023\n" + + "\006filter\030\004 \001(\tB\003\340A\001\"t\n" + + "\032SearchPartnerLinksResponse\022=\n\r" + + "partner_links\030\001 \003(\0132&.google.ads.datamanager.v1.PartnerLink\022\027\n" + + "\017next_page_token\030\002 \001(\t\"\327\004\n" + + "\013PartnerLink\022\021\n" + + "\004name\030\001 \001(\tB\003\340A\010\022\034\n" + + "\017partner_link_id\030\002 \001(\tB\003\340A\003\022F\n" + + "\016owning_account\030\003 \001(" + + "\0132).google.ads.datamanager.v1.ProductAccountB\003\340A\002\022G\n" + + "\017partner_account\030\004 \001(\0132).goo" + + "gle.ads.datamanager.v1.ProductAccountB\003\340A\002\022B\n" + + "\013feature_set\030\005" + + " \001(\0162%.google.ads.datamanager.v1.FeatureSetB\006\340A\001\340A\005\022X\n" + + "\030partner_customer_account\030\006 \001(\01321.google.ads.da" + + "tamanager.v1.PartnerCustomerAccountB\003\340A\001\022R\n" + + "\025partner_link_metadata\030\007 \001(\0132..google" + + ".ads.datamanager.v1.PartnerLinkMetadataB\003\340A\001:\223\001\352A\217\001\n" + + "&datamanager.googleapis.com/PartnerLink\022JaccountTypes/{account_type}" + + "/accounts/{account}/partnerLinks/{partner_link}*\014partnerLinks2\013partnerLink\"g\n" + + "\026PartnerCustomerAccount\022\027\n\n" + + "account_id\030\001 \001(\tB\003\340A\002\022\031\n" + + "\014account_name\030\002 \001(\tB\003\340A\001\022\031\n" + + "\014account_type\030\003 \001(\tB\003\340A\001\"h\n" + + "\023PartnerLinkMetadata\022Q\n" + + "\021implicit_accounts\030\001 \003(\01321.google.a" + + "ds.datamanager.v1.PartnerCustomerAccountB\003\340A\001*}\n\n" + + "FeatureSet\022\033\n" + + "\027FEATURE_SET_UNSPECIFIED\020\000\022-\n" + + ")FEATURE_SET_AUDIENCE_AND_EVENT_MANAGEMENT\020\001\022#\n" + + "\037FEATURE_SET_AD_EVENT_MANAGEMENT\020\0022\346\005\n" + + "\022PartnerLinkService\022\321\001\n" + + "\021CreatePartnerLink\0223.google.ads.datamanag" + + "er.v1.CreatePartnerLinkRequest\032&.google." + + "ads.datamanager.v1.PartnerLink\"_\332A\023paren" + + "t,partner_link\202\323\344\223\002C\"3/v1/{parent=accoun" + + "tTypes/*/accounts/*}/partnerLinks:\014partner_link\022\244\001\n" + + "\021DeletePartnerLink\0223.google.ads.datamanager.v1.DeletePartnerLinkReque" + + "st\032\026.google.protobuf.Empty\"B\332A\004name\202\323\344\223\002" + + "5*3/v1/{name=accountTypes/*/accounts/*/partnerLinks/*}\022\316\001\n" + + "\022SearchPartnerLinks\0224.google.ads.datamanager.v1.SearchPartnerL" + + "inksRequest\0325.google.ads.datamanager.v1." + + "SearchPartnerLinksResponse\"K\332A\006parent\202\323\344" + + "\223\002<\022:/v1/{parent=accountTypes/*/accounts" + + "/*}/partnerLinks:search\032\203\001\312A\032datamanager" + + ".googleapis.com\322Achttps://www.googleapis.com/auth/datamanager,https://www.google" + + "apis.com/auth/datamanager.partnerlinkB\324\001\n" + + "\035com.google.ads.datamanager.v1B\027Partner" + + "LinkServiceProtoP\001ZAcloud.google.com/go/datamanager/apiv1/datamanagerpb;datamana" + + "gerpb\252\002\031Google.Ads.DataManager.V1\312\002\031Goog" + + "le\\Ads\\DataManager\\V1\352\002\034Google::Ads::DataManager::V1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -172,7 +196,29 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_ads_datamanager_v1_PartnerLink_descriptor, new java.lang.String[] { - "Name", "PartnerLinkId", "OwningAccount", "PartnerAccount", + "Name", + "PartnerLinkId", + "OwningAccount", + "PartnerAccount", + "FeatureSet", + "PartnerCustomerAccount", + "PartnerLinkMetadata", + }); + internal_static_google_ads_datamanager_v1_PartnerCustomerAccount_descriptor = + getDescriptor().getMessageType(5); + internal_static_google_ads_datamanager_v1_PartnerCustomerAccount_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_ads_datamanager_v1_PartnerCustomerAccount_descriptor, + new java.lang.String[] { + "AccountId", "AccountName", "AccountType", + }); + internal_static_google_ads_datamanager_v1_PartnerLinkMetadata_descriptor = + getDescriptor().getMessageType(6); + internal_static_google_ads_datamanager_v1_PartnerLinkMetadata_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_ads_datamanager_v1_PartnerLinkMetadata_descriptor, + new java.lang.String[] { + "ImplicitAccounts", }); descriptor.resolveAllFeaturesImmutable(); com.google.ads.datamanager.v1.DestinationProto.getDescriptor(); diff --git a/java-datamanager/proto-data-manager-v1/src/main/java/com/google/ads/datamanager/v1/Platform.java b/java-datamanager/proto-data-manager-v1/src/main/java/com/google/ads/datamanager/v1/Platform.java new file mode 100644 index 000000000000..254b89d681d5 --- /dev/null +++ b/java-datamanager/proto-data-manager-v1/src/main/java/com/google/ads/datamanager/v1/Platform.java @@ -0,0 +1,214 @@ +/* + * 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/ads/datamanager/v1/ad_event.proto +// Protobuf Java Version: 4.33.2 + +package com.google.ads.datamanager.v1; + +/** + * + * + *
+ * Further detail of the platform on which the ad was served.
+ * 
+ * + * Protobuf enum {@code google.ads.datamanager.v1.Platform} + */ +@com.google.protobuf.Generated +public enum Platform implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+   * Unspecified platform.
+   * 
+ * + * PLATFORM_UNSPECIFIED = 0; + */ + PLATFORM_UNSPECIFIED(0), + /** + * + * + *
+   * iOS platform.
+   * 
+ * + * PLATFORM_IOS = 1; + */ + PLATFORM_IOS(1), + /** + * + * + *
+   * Android platform.
+   * 
+ * + * PLATFORM_ANDROID = 2; + */ + PLATFORM_ANDROID(2), + /** + * + * + *
+   * Web platform.
+   * 
+ * + * PLATFORM_WEB = 3; + */ + PLATFORM_WEB(3), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Platform"); + } + + /** + * + * + *
+   * Unspecified platform.
+   * 
+ * + * PLATFORM_UNSPECIFIED = 0; + */ + public static final int PLATFORM_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+   * iOS platform.
+   * 
+ * + * PLATFORM_IOS = 1; + */ + public static final int PLATFORM_IOS_VALUE = 1; + + /** + * + * + *
+   * Android platform.
+   * 
+ * + * PLATFORM_ANDROID = 2; + */ + public static final int PLATFORM_ANDROID_VALUE = 2; + + /** + * + * + *
+   * Web platform.
+   * 
+ * + * PLATFORM_WEB = 3; + */ + public static final int PLATFORM_WEB_VALUE = 3; + + 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 Platform 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 Platform forNumber(int value) { + switch (value) { + case 0: + return PLATFORM_UNSPECIFIED; + case 1: + return PLATFORM_IOS; + case 2: + return PLATFORM_ANDROID; + case 3: + return PLATFORM_WEB; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public Platform findValueByNumber(int number) { + return Platform.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.ads.datamanager.v1.AdEventProto.getDescriptor().getEnumTypes().get(5); + } + + private static final Platform[] VALUES = values(); + + public static Platform valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private Platform(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.ads.datamanager.v1.Platform) +} diff --git a/java-datamanager/proto-data-manager-v1/src/main/java/com/google/ads/datamanager/v1/PlatformType.java b/java-datamanager/proto-data-manager-v1/src/main/java/com/google/ads/datamanager/v1/PlatformType.java new file mode 100644 index 000000000000..8be32849c2b4 --- /dev/null +++ b/java-datamanager/proto-data-manager-v1/src/main/java/com/google/ads/datamanager/v1/PlatformType.java @@ -0,0 +1,260 @@ +/* + * 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/ads/datamanager/v1/ad_event.proto +// Protobuf Java Version: 4.33.2 + +package com.google.ads.datamanager.v1; + +/** + * + * + *
+ * The type of the platform on which the ad was served.
+ * 
+ * + * Protobuf enum {@code google.ads.datamanager.v1.PlatformType} + */ +@com.google.protobuf.Generated +public enum PlatformType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+   * Unspecified platform type.
+   * 
+ * + * PLATFORM_TYPE_UNSPECIFIED = 0; + */ + PLATFORM_TYPE_UNSPECIFIED(0), + /** + * + * + *
+   * Mobile platform.
+   * 
+ * + * PLATFORM_TYPE_MOBILE = 1; + */ + PLATFORM_TYPE_MOBILE(1), + /** + * + * + *
+   * Desktop platform.
+   * 
+ * + * PLATFORM_TYPE_DESKTOP = 2; + */ + PLATFORM_TYPE_DESKTOP(2), + /** + * + * + *
+   * CTV platform.
+   * 
+ * + * PLATFORM_TYPE_CTV = 3; + */ + PLATFORM_TYPE_CTV(3), + /** + * + * + *
+   * Phone platform.
+   * 
+ * + * PLATFORM_TYPE_PHONE = 4; + */ + PLATFORM_TYPE_PHONE(4), + /** + * + * + *
+   * Tablet platform.
+   * 
+ * + * PLATFORM_TYPE_TABLET = 5; + */ + PLATFORM_TYPE_TABLET(5), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "PlatformType"); + } + + /** + * + * + *
+   * Unspecified platform type.
+   * 
+ * + * PLATFORM_TYPE_UNSPECIFIED = 0; + */ + public static final int PLATFORM_TYPE_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+   * Mobile platform.
+   * 
+ * + * PLATFORM_TYPE_MOBILE = 1; + */ + public static final int PLATFORM_TYPE_MOBILE_VALUE = 1; + + /** + * + * + *
+   * Desktop platform.
+   * 
+ * + * PLATFORM_TYPE_DESKTOP = 2; + */ + public static final int PLATFORM_TYPE_DESKTOP_VALUE = 2; + + /** + * + * + *
+   * CTV platform.
+   * 
+ * + * PLATFORM_TYPE_CTV = 3; + */ + public static final int PLATFORM_TYPE_CTV_VALUE = 3; + + /** + * + * + *
+   * Phone platform.
+   * 
+ * + * PLATFORM_TYPE_PHONE = 4; + */ + public static final int PLATFORM_TYPE_PHONE_VALUE = 4; + + /** + * + * + *
+   * Tablet platform.
+   * 
+ * + * PLATFORM_TYPE_TABLET = 5; + */ + public static final int PLATFORM_TYPE_TABLET_VALUE = 5; + + 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 PlatformType 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 PlatformType forNumber(int value) { + switch (value) { + case 0: + return PLATFORM_TYPE_UNSPECIFIED; + case 1: + return PLATFORM_TYPE_MOBILE; + case 2: + return PLATFORM_TYPE_DESKTOP; + case 3: + return PLATFORM_TYPE_CTV; + case 4: + return PLATFORM_TYPE_PHONE; + case 5: + return PLATFORM_TYPE_TABLET; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public PlatformType findValueByNumber(int number) { + return PlatformType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.ads.datamanager.v1.AdEventProto.getDescriptor().getEnumTypes().get(4); + } + + private static final PlatformType[] VALUES = values(); + + public static PlatformType valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private PlatformType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.ads.datamanager.v1.PlatformType) +} diff --git a/java-datamanager/proto-data-manager-v1/src/main/java/com/google/ads/datamanager/v1/ProductAccount.java b/java-datamanager/proto-data-manager-v1/src/main/java/com/google/ads/datamanager/v1/ProductAccount.java index 255205f00259..77419700a60d 100644 --- a/java-datamanager/proto-data-manager-v1/src/main/java/com/google/ads/datamanager/v1/ProductAccount.java +++ b/java-datamanager/proto-data-manager-v1/src/main/java/com/google/ads/datamanager/v1/ProductAccount.java @@ -464,13 +464,13 @@ public com.google.protobuf.ByteString getAccountIdBytes() { * * *
-   * Optional. The type of the account. For example, `GOOGLE_ADS`.
+   * Required. The type of the account. For example, `GOOGLE_ADS`.
    * Either `account_type` or the deprecated `product` is required.
    * If both are set, the values must match.
    * 
* * - * .google.ads.datamanager.v1.ProductAccount.AccountType account_type = 3 [(.google.api.field_behavior) = OPTIONAL]; + * .google.ads.datamanager.v1.ProductAccount.AccountType account_type = 3 [(.google.api.field_behavior) = REQUIRED]; * * * @return The enum numeric value on the wire for accountType. @@ -484,13 +484,13 @@ public int getAccountTypeValue() { * * *
-   * Optional. The type of the account. For example, `GOOGLE_ADS`.
+   * Required. The type of the account. For example, `GOOGLE_ADS`.
    * Either `account_type` or the deprecated `product` is required.
    * If both are set, the values must match.
    * 
* * - * .google.ads.datamanager.v1.ProductAccount.AccountType account_type = 3 [(.google.api.field_behavior) = OPTIONAL]; + * .google.ads.datamanager.v1.ProductAccount.AccountType account_type = 3 [(.google.api.field_behavior) = REQUIRED]; * * * @return The accountType. @@ -1098,13 +1098,13 @@ public Builder setAccountIdBytes(com.google.protobuf.ByteString value) { * * *
-     * Optional. The type of the account. For example, `GOOGLE_ADS`.
+     * Required. The type of the account. For example, `GOOGLE_ADS`.
      * Either `account_type` or the deprecated `product` is required.
      * If both are set, the values must match.
      * 
* * - * .google.ads.datamanager.v1.ProductAccount.AccountType account_type = 3 [(.google.api.field_behavior) = OPTIONAL]; + * .google.ads.datamanager.v1.ProductAccount.AccountType account_type = 3 [(.google.api.field_behavior) = REQUIRED]; * * * @return The enum numeric value on the wire for accountType. @@ -1118,13 +1118,13 @@ public int getAccountTypeValue() { * * *
-     * Optional. The type of the account. For example, `GOOGLE_ADS`.
+     * Required. The type of the account. For example, `GOOGLE_ADS`.
      * Either `account_type` or the deprecated `product` is required.
      * If both are set, the values must match.
      * 
* * - * .google.ads.datamanager.v1.ProductAccount.AccountType account_type = 3 [(.google.api.field_behavior) = OPTIONAL]; + * .google.ads.datamanager.v1.ProductAccount.AccountType account_type = 3 [(.google.api.field_behavior) = REQUIRED]; * * * @param value The enum numeric value on the wire for accountType to set. @@ -1141,13 +1141,13 @@ public Builder setAccountTypeValue(int value) { * * *
-     * Optional. The type of the account. For example, `GOOGLE_ADS`.
+     * Required. The type of the account. For example, `GOOGLE_ADS`.
      * Either `account_type` or the deprecated `product` is required.
      * If both are set, the values must match.
      * 
* * - * .google.ads.datamanager.v1.ProductAccount.AccountType account_type = 3 [(.google.api.field_behavior) = OPTIONAL]; + * .google.ads.datamanager.v1.ProductAccount.AccountType account_type = 3 [(.google.api.field_behavior) = REQUIRED]; * * * @return The accountType. @@ -1165,13 +1165,13 @@ public com.google.ads.datamanager.v1.ProductAccount.AccountType getAccountType() * * *
-     * Optional. The type of the account. For example, `GOOGLE_ADS`.
+     * Required. The type of the account. For example, `GOOGLE_ADS`.
      * Either `account_type` or the deprecated `product` is required.
      * If both are set, the values must match.
      * 
* * - * .google.ads.datamanager.v1.ProductAccount.AccountType account_type = 3 [(.google.api.field_behavior) = OPTIONAL]; + * .google.ads.datamanager.v1.ProductAccount.AccountType account_type = 3 [(.google.api.field_behavior) = REQUIRED]; * * * @param value The accountType to set. @@ -1191,13 +1191,13 @@ public Builder setAccountType(com.google.ads.datamanager.v1.ProductAccount.Accou * * *
-     * Optional. The type of the account. For example, `GOOGLE_ADS`.
+     * Required. The type of the account. For example, `GOOGLE_ADS`.
      * Either `account_type` or the deprecated `product` is required.
      * If both are set, the values must match.
      * 
* * - * .google.ads.datamanager.v1.ProductAccount.AccountType account_type = 3 [(.google.api.field_behavior) = OPTIONAL]; + * .google.ads.datamanager.v1.ProductAccount.AccountType account_type = 3 [(.google.api.field_behavior) = REQUIRED]; * * * @return This builder for chaining. diff --git a/java-datamanager/proto-data-manager-v1/src/main/java/com/google/ads/datamanager/v1/ProductAccountOrBuilder.java b/java-datamanager/proto-data-manager-v1/src/main/java/com/google/ads/datamanager/v1/ProductAccountOrBuilder.java index 90ce9ceab24d..36392b288c03 100644 --- a/java-datamanager/proto-data-manager-v1/src/main/java/com/google/ads/datamanager/v1/ProductAccountOrBuilder.java +++ b/java-datamanager/proto-data-manager-v1/src/main/java/com/google/ads/datamanager/v1/ProductAccountOrBuilder.java @@ -92,13 +92,13 @@ public interface ProductAccountOrBuilder * * *
-   * Optional. The type of the account. For example, `GOOGLE_ADS`.
+   * Required. The type of the account. For example, `GOOGLE_ADS`.
    * Either `account_type` or the deprecated `product` is required.
    * If both are set, the values must match.
    * 
* * - * .google.ads.datamanager.v1.ProductAccount.AccountType account_type = 3 [(.google.api.field_behavior) = OPTIONAL]; + * .google.ads.datamanager.v1.ProductAccount.AccountType account_type = 3 [(.google.api.field_behavior) = REQUIRED]; * * * @return The enum numeric value on the wire for accountType. @@ -109,13 +109,13 @@ public interface ProductAccountOrBuilder * * *
-   * Optional. The type of the account. For example, `GOOGLE_ADS`.
+   * Required. The type of the account. For example, `GOOGLE_ADS`.
    * Either `account_type` or the deprecated `product` is required.
    * If both are set, the values must match.
    * 
* * - * .google.ads.datamanager.v1.ProductAccount.AccountType account_type = 3 [(.google.api.field_behavior) = OPTIONAL]; + * .google.ads.datamanager.v1.ProductAccount.AccountType account_type = 3 [(.google.api.field_behavior) = REQUIRED]; * * * @return The accountType. diff --git a/java-datamanager/proto-data-manager-v1/src/main/java/com/google/ads/datamanager/v1/TargetingType.java b/java-datamanager/proto-data-manager-v1/src/main/java/com/google/ads/datamanager/v1/TargetingType.java new file mode 100644 index 000000000000..aa96b85fd6c0 --- /dev/null +++ b/java-datamanager/proto-data-manager-v1/src/main/java/com/google/ads/datamanager/v1/TargetingType.java @@ -0,0 +1,329 @@ +/* + * 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/ads/datamanager/v1/ad_event.proto +// Protobuf Java Version: 4.33.2 + +package com.google.ads.datamanager.v1; + +/** + * + * + *
+ * The type of targeting used to serve the ad.
+ * 
+ * + * Protobuf enum {@code google.ads.datamanager.v1.TargetingType} + */ +@com.google.protobuf.Generated +public enum TargetingType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+   * Unspecified targeting type.
+   * 
+ * + * TARGETING_TYPE_UNSPECIFIED = 0; + */ + TARGETING_TYPE_UNSPECIFIED(0), + /** + * + * + *
+   * Audience targeting.
+   * 
+ * + * TARGETING_TYPE_AUDIENCE = 1; + */ + TARGETING_TYPE_AUDIENCE(1), + /** + * + * + *
+   * Contextual targeting.
+   * 
+ * + * TARGETING_TYPE_CONTEXTUAL = 2; + */ + TARGETING_TYPE_CONTEXTUAL(2), + /** + * + * + *
+   * Demographic targeting.
+   * 
+ * + * TARGETING_TYPE_DEMOGRAPHIC = 3; + */ + TARGETING_TYPE_DEMOGRAPHIC(3), + /** + * + * + *
+   * Device targeting.
+   * 
+ * + * TARGETING_TYPE_DEVICE = 4; + */ + TARGETING_TYPE_DEVICE(4), + /** + * + * + *
+   * Geo targeting.
+   * 
+ * + * TARGETING_TYPE_GEO = 5; + */ + TARGETING_TYPE_GEO(5), + /** + * + * + *
+   * Interest targeting.
+   * 
+ * + * TARGETING_TYPE_INTEREST = 6; + */ + TARGETING_TYPE_INTEREST(6), + /** + * + * + *
+   * Purchase intent targeting.
+   * 
+ * + * TARGETING_TYPE_PURCHASE_INTENT = 7; + */ + TARGETING_TYPE_PURCHASE_INTENT(7), + /** + * + * + *
+   * Remarketing targeting.
+   * 
+ * + * TARGETING_TYPE_REMARKETING = 8; + */ + TARGETING_TYPE_REMARKETING(8), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "TargetingType"); + } + + /** + * + * + *
+   * Unspecified targeting type.
+   * 
+ * + * TARGETING_TYPE_UNSPECIFIED = 0; + */ + public static final int TARGETING_TYPE_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+   * Audience targeting.
+   * 
+ * + * TARGETING_TYPE_AUDIENCE = 1; + */ + public static final int TARGETING_TYPE_AUDIENCE_VALUE = 1; + + /** + * + * + *
+   * Contextual targeting.
+   * 
+ * + * TARGETING_TYPE_CONTEXTUAL = 2; + */ + public static final int TARGETING_TYPE_CONTEXTUAL_VALUE = 2; + + /** + * + * + *
+   * Demographic targeting.
+   * 
+ * + * TARGETING_TYPE_DEMOGRAPHIC = 3; + */ + public static final int TARGETING_TYPE_DEMOGRAPHIC_VALUE = 3; + + /** + * + * + *
+   * Device targeting.
+   * 
+ * + * TARGETING_TYPE_DEVICE = 4; + */ + public static final int TARGETING_TYPE_DEVICE_VALUE = 4; + + /** + * + * + *
+   * Geo targeting.
+   * 
+ * + * TARGETING_TYPE_GEO = 5; + */ + public static final int TARGETING_TYPE_GEO_VALUE = 5; + + /** + * + * + *
+   * Interest targeting.
+   * 
+ * + * TARGETING_TYPE_INTEREST = 6; + */ + public static final int TARGETING_TYPE_INTEREST_VALUE = 6; + + /** + * + * + *
+   * Purchase intent targeting.
+   * 
+ * + * TARGETING_TYPE_PURCHASE_INTENT = 7; + */ + public static final int TARGETING_TYPE_PURCHASE_INTENT_VALUE = 7; + + /** + * + * + *
+   * Remarketing targeting.
+   * 
+ * + * TARGETING_TYPE_REMARKETING = 8; + */ + public static final int TARGETING_TYPE_REMARKETING_VALUE = 8; + + 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 TargetingType 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 TargetingType forNumber(int value) { + switch (value) { + case 0: + return TARGETING_TYPE_UNSPECIFIED; + case 1: + return TARGETING_TYPE_AUDIENCE; + case 2: + return TARGETING_TYPE_CONTEXTUAL; + case 3: + return TARGETING_TYPE_DEMOGRAPHIC; + case 4: + return TARGETING_TYPE_DEVICE; + case 5: + return TARGETING_TYPE_GEO; + case 6: + return TARGETING_TYPE_INTEREST; + case 7: + return TARGETING_TYPE_PURCHASE_INTENT; + case 8: + return TARGETING_TYPE_REMARKETING; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public TargetingType findValueByNumber(int number) { + return TargetingType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.ads.datamanager.v1.AdEventProto.getDescriptor().getEnumTypes().get(3); + } + + private static final TargetingType[] VALUES = values(); + + public static TargetingType valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private TargetingType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.ads.datamanager.v1.TargetingType) +} diff --git a/java-datamanager/proto-data-manager-v1/src/main/java/com/google/ads/datamanager/v1/ViewType.java b/java-datamanager/proto-data-manager-v1/src/main/java/com/google/ads/datamanager/v1/ViewType.java new file mode 100644 index 000000000000..0df0028928e6 --- /dev/null +++ b/java-datamanager/proto-data-manager-v1/src/main/java/com/google/ads/datamanager/v1/ViewType.java @@ -0,0 +1,191 @@ +/* + * 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/ads/datamanager/v1/viewability_info.proto +// Protobuf Java Version: 4.33.2 + +package com.google.ads.datamanager.v1; + +/** + * + * + *
+ * The type of the event.
+ * 
+ * + * Protobuf enum {@code google.ads.datamanager.v1.ViewType} + */ +@com.google.protobuf.Generated +public enum ViewType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+   * Unspecified view type.
+   * 
+ * + * VIEW_TYPE_UNSPECIFIED = 0; + */ + VIEW_TYPE_UNSPECIFIED(0), + /** + * + * + *
+   * MRC viewed.
+   * 
+ * + * VIEW_TYPE_MRC_VIEWED = 1; + */ + VIEW_TYPE_MRC_VIEWED(1), + /** + * + * + *
+   * MRC rendered.
+   * 
+ * + * VIEW_TYPE_MRC_RENDERED = 2; + */ + VIEW_TYPE_MRC_RENDERED(2), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ViewType"); + } + + /** + * + * + *
+   * Unspecified view type.
+   * 
+ * + * VIEW_TYPE_UNSPECIFIED = 0; + */ + public static final int VIEW_TYPE_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+   * MRC viewed.
+   * 
+ * + * VIEW_TYPE_MRC_VIEWED = 1; + */ + public static final int VIEW_TYPE_MRC_VIEWED_VALUE = 1; + + /** + * + * + *
+   * MRC rendered.
+   * 
+ * + * VIEW_TYPE_MRC_RENDERED = 2; + */ + public static final int VIEW_TYPE_MRC_RENDERED_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 ViewType 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 ViewType forNumber(int value) { + switch (value) { + case 0: + return VIEW_TYPE_UNSPECIFIED; + case 1: + return VIEW_TYPE_MRC_VIEWED; + case 2: + return VIEW_TYPE_MRC_RENDERED; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public ViewType findValueByNumber(int number) { + return ViewType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.ads.datamanager.v1.ViewabilityInfoProto.getDescriptor().getEnumTypes().get(0); + } + + private static final ViewType[] VALUES = values(); + + public static ViewType valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private ViewType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.ads.datamanager.v1.ViewType) +} diff --git a/java-datamanager/proto-data-manager-v1/src/main/java/com/google/ads/datamanager/v1/ViewabilityInfo.java b/java-datamanager/proto-data-manager-v1/src/main/java/com/google/ads/datamanager/v1/ViewabilityInfo.java new file mode 100644 index 000000000000..653ab9493b17 --- /dev/null +++ b/java-datamanager/proto-data-manager-v1/src/main/java/com/google/ads/datamanager/v1/ViewabilityInfo.java @@ -0,0 +1,1970 @@ +/* + * 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/ads/datamanager/v1/viewability_info.proto +// Protobuf Java Version: 4.33.2 + +package com.google.ads.datamanager.v1; + +/** + * + * + *
+ * Details of the viewability of the ad served.
+ * 
+ * + * Protobuf type {@code google.ads.datamanager.v1.ViewabilityInfo} + */ +@com.google.protobuf.Generated +public final class ViewabilityInfo extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.ads.datamanager.v1.ViewabilityInfo) + ViewabilityInfoOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ViewabilityInfo"); + } + + // Use ViewabilityInfo.newBuilder() to construct. + private ViewabilityInfo(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ViewabilityInfo() { + viewType_ = 0; + mediaQuartile_ = 0; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.ads.datamanager.v1.ViewabilityInfoProto + .internal_static_google_ads_datamanager_v1_ViewabilityInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.ads.datamanager.v1.ViewabilityInfoProto + .internal_static_google_ads_datamanager_v1_ViewabilityInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.ads.datamanager.v1.ViewabilityInfo.class, + com.google.ads.datamanager.v1.ViewabilityInfo.Builder.class); + } + + private int bitField0_; + public static final int VIEW_TYPE_FIELD_NUMBER = 1; + private int viewType_ = 0; + + /** + * + * + *
+   * Required. The type of the event.
+   * 
+ * + * + * .google.ads.datamanager.v1.ViewType view_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for viewType. + */ + @java.lang.Override + public int getViewTypeValue() { + return viewType_; + } + + /** + * + * + *
+   * Required. The type of the event.
+   * 
+ * + * + * .google.ads.datamanager.v1.ViewType view_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The viewType. + */ + @java.lang.Override + public com.google.ads.datamanager.v1.ViewType getViewType() { + com.google.ads.datamanager.v1.ViewType result = + com.google.ads.datamanager.v1.ViewType.forNumber(viewType_); + return result == null ? com.google.ads.datamanager.v1.ViewType.UNRECOGNIZED : result; + } + + public static final int VIEWABLE_PERCENT_FIELD_NUMBER = 2; + private int viewablePercent_ = 0; + + /** + * + * + *
+   * Optional. The numerical percent (0-100) of the pixels that were viewable.
+   * 
+ * + * int32 viewable_percent = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The viewablePercent. + */ + @java.lang.Override + public int getViewablePercent() { + return viewablePercent_; + } + + public static final int VIEWABLE_DURATION_FIELD_NUMBER = 3; + private com.google.protobuf.Duration viewableDuration_; + + /** + * + * + *
+   * Optional. The amount of time the ad was viewable for.
+   * 
+ * + * + * .google.protobuf.Duration viewable_duration = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the viewableDuration field is set. + */ + @java.lang.Override + public boolean hasViewableDuration() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Optional. The amount of time the ad was viewable for.
+   * 
+ * + * + * .google.protobuf.Duration viewable_duration = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The viewableDuration. + */ + @java.lang.Override + public com.google.protobuf.Duration getViewableDuration() { + return viewableDuration_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : viewableDuration_; + } + + /** + * + * + *
+   * Optional. The amount of time the ad was viewable for.
+   * 
+ * + * + * .google.protobuf.Duration viewable_duration = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.protobuf.DurationOrBuilder getViewableDurationOrBuilder() { + return viewableDuration_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : viewableDuration_; + } + + public static final int MEDIA_SKIPPABLE_FIELD_NUMBER = 4; + private boolean mediaSkippable_ = false; + + /** + * + * + *
+   * Optional. Whether the ad media was skippable or not.
+   * 
+ * + * bool media_skippable = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The mediaSkippable. + */ + @java.lang.Override + public boolean getMediaSkippable() { + return mediaSkippable_; + } + + public static final int MEDIA_QUARTILE_FIELD_NUMBER = 5; + private int mediaQuartile_ = 0; + + /** + * + * + *
+   * Optional. The amount of the media that was played as discrete quartiles.
+   * 
+ * + * + * .google.ads.datamanager.v1.MediaQuartile media_quartile = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for mediaQuartile. + */ + @java.lang.Override + public int getMediaQuartileValue() { + return mediaQuartile_; + } + + /** + * + * + *
+   * Optional. The amount of the media that was played as discrete quartiles.
+   * 
+ * + * + * .google.ads.datamanager.v1.MediaQuartile media_quartile = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The mediaQuartile. + */ + @java.lang.Override + public com.google.ads.datamanager.v1.MediaQuartile getMediaQuartile() { + com.google.ads.datamanager.v1.MediaQuartile result = + com.google.ads.datamanager.v1.MediaQuartile.forNumber(mediaQuartile_); + return result == null ? com.google.ads.datamanager.v1.MediaQuartile.UNRECOGNIZED : result; + } + + public static final int MEDIA_DURATION_FIELD_NUMBER = 6; + private com.google.protobuf.Duration mediaDuration_; + + /** + * + * + *
+   * Optional. The duration of the ad media.
+   * 
+ * + * .google.protobuf.Duration media_duration = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the mediaDuration field is set. + */ + @java.lang.Override + public boolean hasMediaDuration() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * Optional. The duration of the ad media.
+   * 
+ * + * .google.protobuf.Duration media_duration = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The mediaDuration. + */ + @java.lang.Override + public com.google.protobuf.Duration getMediaDuration() { + return mediaDuration_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : mediaDuration_; + } + + /** + * + * + *
+   * Optional. The duration of the ad media.
+   * 
+ * + * .google.protobuf.Duration media_duration = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.protobuf.DurationOrBuilder getMediaDurationOrBuilder() { + return mediaDuration_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : mediaDuration_; + } + + public static final int MEDIA_VOLUME_PERCENT_FIELD_NUMBER = 7; + private int mediaVolumePercent_ = 0; + + /** + * + * + *
+   * Optional. The numerical percent (0-100) of the volume of the media
+   * playback.
+   * 
+ * + * int32 media_volume_percent = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The mediaVolumePercent. + */ + @java.lang.Override + public int getMediaVolumePercent() { + return mediaVolumePercent_; + } + + public static final int PLAYBACK_DURATION_FIELD_NUMBER = 8; + private com.google.protobuf.Duration playbackDuration_; + + /** + * + * + *
+   * Optional. The duration of playback of the ad media, regardless of whether
+   * it was viewable or not.
+   * 
+ * + * + * .google.protobuf.Duration playback_duration = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the playbackDuration field is set. + */ + @java.lang.Override + public boolean hasPlaybackDuration() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+   * Optional. The duration of playback of the ad media, regardless of whether
+   * it was viewable or not.
+   * 
+ * + * + * .google.protobuf.Duration playback_duration = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The playbackDuration. + */ + @java.lang.Override + public com.google.protobuf.Duration getPlaybackDuration() { + return playbackDuration_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : playbackDuration_; + } + + /** + * + * + *
+   * Optional. The duration of playback of the ad media, regardless of whether
+   * it was viewable or not.
+   * 
+ * + * + * .google.protobuf.Duration playback_duration = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.protobuf.DurationOrBuilder getPlaybackDurationOrBuilder() { + return playbackDuration_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : playbackDuration_; + } + + 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 (viewType_ != com.google.ads.datamanager.v1.ViewType.VIEW_TYPE_UNSPECIFIED.getNumber()) { + output.writeEnum(1, viewType_); + } + if (viewablePercent_ != 0) { + output.writeInt32(2, viewablePercent_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(3, getViewableDuration()); + } + if (mediaSkippable_ != false) { + output.writeBool(4, mediaSkippable_); + } + if (mediaQuartile_ + != com.google.ads.datamanager.v1.MediaQuartile.MEDIA_QUARTILE_UNSPECIFIED.getNumber()) { + output.writeEnum(5, mediaQuartile_); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(6, getMediaDuration()); + } + if (mediaVolumePercent_ != 0) { + output.writeInt32(7, mediaVolumePercent_); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeMessage(8, getPlaybackDuration()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (viewType_ != com.google.ads.datamanager.v1.ViewType.VIEW_TYPE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, viewType_); + } + if (viewablePercent_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, viewablePercent_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getViewableDuration()); + } + if (mediaSkippable_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(4, mediaSkippable_); + } + if (mediaQuartile_ + != com.google.ads.datamanager.v1.MediaQuartile.MEDIA_QUARTILE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(5, mediaQuartile_); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getMediaDuration()); + } + if (mediaVolumePercent_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(7, mediaVolumePercent_); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, getPlaybackDuration()); + } + 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.ads.datamanager.v1.ViewabilityInfo)) { + return super.equals(obj); + } + com.google.ads.datamanager.v1.ViewabilityInfo other = + (com.google.ads.datamanager.v1.ViewabilityInfo) obj; + + if (viewType_ != other.viewType_) return false; + if (getViewablePercent() != other.getViewablePercent()) return false; + if (hasViewableDuration() != other.hasViewableDuration()) return false; + if (hasViewableDuration()) { + if (!getViewableDuration().equals(other.getViewableDuration())) return false; + } + if (getMediaSkippable() != other.getMediaSkippable()) return false; + if (mediaQuartile_ != other.mediaQuartile_) return false; + if (hasMediaDuration() != other.hasMediaDuration()) return false; + if (hasMediaDuration()) { + if (!getMediaDuration().equals(other.getMediaDuration())) return false; + } + if (getMediaVolumePercent() != other.getMediaVolumePercent()) return false; + if (hasPlaybackDuration() != other.hasPlaybackDuration()) return false; + if (hasPlaybackDuration()) { + if (!getPlaybackDuration().equals(other.getPlaybackDuration())) 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) + VIEW_TYPE_FIELD_NUMBER; + hash = (53 * hash) + viewType_; + hash = (37 * hash) + VIEWABLE_PERCENT_FIELD_NUMBER; + hash = (53 * hash) + getViewablePercent(); + if (hasViewableDuration()) { + hash = (37 * hash) + VIEWABLE_DURATION_FIELD_NUMBER; + hash = (53 * hash) + getViewableDuration().hashCode(); + } + hash = (37 * hash) + MEDIA_SKIPPABLE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getMediaSkippable()); + hash = (37 * hash) + MEDIA_QUARTILE_FIELD_NUMBER; + hash = (53 * hash) + mediaQuartile_; + if (hasMediaDuration()) { + hash = (37 * hash) + MEDIA_DURATION_FIELD_NUMBER; + hash = (53 * hash) + getMediaDuration().hashCode(); + } + hash = (37 * hash) + MEDIA_VOLUME_PERCENT_FIELD_NUMBER; + hash = (53 * hash) + getMediaVolumePercent(); + if (hasPlaybackDuration()) { + hash = (37 * hash) + PLAYBACK_DURATION_FIELD_NUMBER; + hash = (53 * hash) + getPlaybackDuration().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.ads.datamanager.v1.ViewabilityInfo parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.ads.datamanager.v1.ViewabilityInfo parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.ads.datamanager.v1.ViewabilityInfo parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.ads.datamanager.v1.ViewabilityInfo 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.ads.datamanager.v1.ViewabilityInfo parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.ads.datamanager.v1.ViewabilityInfo parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.ads.datamanager.v1.ViewabilityInfo parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.ads.datamanager.v1.ViewabilityInfo 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.ads.datamanager.v1.ViewabilityInfo parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.ads.datamanager.v1.ViewabilityInfo 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.ads.datamanager.v1.ViewabilityInfo parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.ads.datamanager.v1.ViewabilityInfo 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.ads.datamanager.v1.ViewabilityInfo 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; + } + + /** + * + * + *
+   * Details of the viewability of the ad served.
+   * 
+ * + * Protobuf type {@code google.ads.datamanager.v1.ViewabilityInfo} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.ads.datamanager.v1.ViewabilityInfo) + com.google.ads.datamanager.v1.ViewabilityInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.ads.datamanager.v1.ViewabilityInfoProto + .internal_static_google_ads_datamanager_v1_ViewabilityInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.ads.datamanager.v1.ViewabilityInfoProto + .internal_static_google_ads_datamanager_v1_ViewabilityInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.ads.datamanager.v1.ViewabilityInfo.class, + com.google.ads.datamanager.v1.ViewabilityInfo.Builder.class); + } + + // Construct using com.google.ads.datamanager.v1.ViewabilityInfo.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetViewableDurationFieldBuilder(); + internalGetMediaDurationFieldBuilder(); + internalGetPlaybackDurationFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + viewType_ = 0; + viewablePercent_ = 0; + viewableDuration_ = null; + if (viewableDurationBuilder_ != null) { + viewableDurationBuilder_.dispose(); + viewableDurationBuilder_ = null; + } + mediaSkippable_ = false; + mediaQuartile_ = 0; + mediaDuration_ = null; + if (mediaDurationBuilder_ != null) { + mediaDurationBuilder_.dispose(); + mediaDurationBuilder_ = null; + } + mediaVolumePercent_ = 0; + playbackDuration_ = null; + if (playbackDurationBuilder_ != null) { + playbackDurationBuilder_.dispose(); + playbackDurationBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.ads.datamanager.v1.ViewabilityInfoProto + .internal_static_google_ads_datamanager_v1_ViewabilityInfo_descriptor; + } + + @java.lang.Override + public com.google.ads.datamanager.v1.ViewabilityInfo getDefaultInstanceForType() { + return com.google.ads.datamanager.v1.ViewabilityInfo.getDefaultInstance(); + } + + @java.lang.Override + public com.google.ads.datamanager.v1.ViewabilityInfo build() { + com.google.ads.datamanager.v1.ViewabilityInfo result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.ads.datamanager.v1.ViewabilityInfo buildPartial() { + com.google.ads.datamanager.v1.ViewabilityInfo result = + new com.google.ads.datamanager.v1.ViewabilityInfo(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.ads.datamanager.v1.ViewabilityInfo result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.viewType_ = viewType_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.viewablePercent_ = viewablePercent_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.viewableDuration_ = + viewableDurationBuilder_ == null ? viewableDuration_ : viewableDurationBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.mediaSkippable_ = mediaSkippable_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.mediaQuartile_ = mediaQuartile_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.mediaDuration_ = + mediaDurationBuilder_ == null ? mediaDuration_ : mediaDurationBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.mediaVolumePercent_ = mediaVolumePercent_; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.playbackDuration_ = + playbackDurationBuilder_ == null ? playbackDuration_ : playbackDurationBuilder_.build(); + to_bitField0_ |= 0x00000004; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.ads.datamanager.v1.ViewabilityInfo) { + return mergeFrom((com.google.ads.datamanager.v1.ViewabilityInfo) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.ads.datamanager.v1.ViewabilityInfo other) { + if (other == com.google.ads.datamanager.v1.ViewabilityInfo.getDefaultInstance()) return this; + if (other.viewType_ != 0) { + setViewTypeValue(other.getViewTypeValue()); + } + if (other.getViewablePercent() != 0) { + setViewablePercent(other.getViewablePercent()); + } + if (other.hasViewableDuration()) { + mergeViewableDuration(other.getViewableDuration()); + } + if (other.getMediaSkippable() != false) { + setMediaSkippable(other.getMediaSkippable()); + } + if (other.mediaQuartile_ != 0) { + setMediaQuartileValue(other.getMediaQuartileValue()); + } + if (other.hasMediaDuration()) { + mergeMediaDuration(other.getMediaDuration()); + } + if (other.getMediaVolumePercent() != 0) { + setMediaVolumePercent(other.getMediaVolumePercent()); + } + if (other.hasPlaybackDuration()) { + mergePlaybackDuration(other.getPlaybackDuration()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + viewType_ = input.readEnum(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 16: + { + viewablePercent_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: + { + input.readMessage( + internalGetViewableDurationFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 32: + { + mediaSkippable_ = input.readBool(); + bitField0_ |= 0x00000008; + break; + } // case 32 + case 40: + { + mediaQuartile_ = input.readEnum(); + bitField0_ |= 0x00000010; + break; + } // case 40 + case 50: + { + input.readMessage( + internalGetMediaDurationFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 50 + case 56: + { + mediaVolumePercent_ = input.readInt32(); + bitField0_ |= 0x00000040; + break; + } // case 56 + case 66: + { + input.readMessage( + internalGetPlaybackDurationFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000080; + break; + } // case 66 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private int viewType_ = 0; + + /** + * + * + *
+     * Required. The type of the event.
+     * 
+ * + * + * .google.ads.datamanager.v1.ViewType view_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for viewType. + */ + @java.lang.Override + public int getViewTypeValue() { + return viewType_; + } + + /** + * + * + *
+     * Required. The type of the event.
+     * 
+ * + * + * .google.ads.datamanager.v1.ViewType view_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The enum numeric value on the wire for viewType to set. + * @return This builder for chaining. + */ + public Builder setViewTypeValue(int value) { + viewType_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The type of the event.
+     * 
+ * + * + * .google.ads.datamanager.v1.ViewType view_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The viewType. + */ + @java.lang.Override + public com.google.ads.datamanager.v1.ViewType getViewType() { + com.google.ads.datamanager.v1.ViewType result = + com.google.ads.datamanager.v1.ViewType.forNumber(viewType_); + return result == null ? com.google.ads.datamanager.v1.ViewType.UNRECOGNIZED : result; + } + + /** + * + * + *
+     * Required. The type of the event.
+     * 
+ * + * + * .google.ads.datamanager.v1.ViewType view_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The viewType to set. + * @return This builder for chaining. + */ + public Builder setViewType(com.google.ads.datamanager.v1.ViewType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + viewType_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The type of the event.
+     * 
+ * + * + * .google.ads.datamanager.v1.ViewType view_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return This builder for chaining. + */ + public Builder clearViewType() { + bitField0_ = (bitField0_ & ~0x00000001); + viewType_ = 0; + onChanged(); + return this; + } + + private int viewablePercent_; + + /** + * + * + *
+     * Optional. The numerical percent (0-100) of the pixels that were viewable.
+     * 
+ * + * int32 viewable_percent = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The viewablePercent. + */ + @java.lang.Override + public int getViewablePercent() { + return viewablePercent_; + } + + /** + * + * + *
+     * Optional. The numerical percent (0-100) of the pixels that were viewable.
+     * 
+ * + * int32 viewable_percent = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The viewablePercent to set. + * @return This builder for chaining. + */ + public Builder setViewablePercent(int value) { + + viewablePercent_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The numerical percent (0-100) of the pixels that were viewable.
+     * 
+ * + * int32 viewable_percent = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearViewablePercent() { + bitField0_ = (bitField0_ & ~0x00000002); + viewablePercent_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.Duration viewableDuration_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + viewableDurationBuilder_; + + /** + * + * + *
+     * Optional. The amount of time the ad was viewable for.
+     * 
+ * + * + * .google.protobuf.Duration viewable_duration = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the viewableDuration field is set. + */ + public boolean hasViewableDuration() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+     * Optional. The amount of time the ad was viewable for.
+     * 
+ * + * + * .google.protobuf.Duration viewable_duration = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The viewableDuration. + */ + public com.google.protobuf.Duration getViewableDuration() { + if (viewableDurationBuilder_ == null) { + return viewableDuration_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : viewableDuration_; + } else { + return viewableDurationBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Optional. The amount of time the ad was viewable for.
+     * 
+ * + * + * .google.protobuf.Duration viewable_duration = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setViewableDuration(com.google.protobuf.Duration value) { + if (viewableDurationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + viewableDuration_ = value; + } else { + viewableDurationBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The amount of time the ad was viewable for.
+     * 
+ * + * + * .google.protobuf.Duration viewable_duration = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setViewableDuration(com.google.protobuf.Duration.Builder builderForValue) { + if (viewableDurationBuilder_ == null) { + viewableDuration_ = builderForValue.build(); + } else { + viewableDurationBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The amount of time the ad was viewable for.
+     * 
+ * + * + * .google.protobuf.Duration viewable_duration = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeViewableDuration(com.google.protobuf.Duration value) { + if (viewableDurationBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && viewableDuration_ != null + && viewableDuration_ != com.google.protobuf.Duration.getDefaultInstance()) { + getViewableDurationBuilder().mergeFrom(value); + } else { + viewableDuration_ = value; + } + } else { + viewableDurationBuilder_.mergeFrom(value); + } + if (viewableDuration_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Optional. The amount of time the ad was viewable for.
+     * 
+ * + * + * .google.protobuf.Duration viewable_duration = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearViewableDuration() { + bitField0_ = (bitField0_ & ~0x00000004); + viewableDuration_ = null; + if (viewableDurationBuilder_ != null) { + viewableDurationBuilder_.dispose(); + viewableDurationBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The amount of time the ad was viewable for.
+     * 
+ * + * + * .google.protobuf.Duration viewable_duration = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.Duration.Builder getViewableDurationBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return internalGetViewableDurationFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. The amount of time the ad was viewable for.
+     * 
+ * + * + * .google.protobuf.Duration viewable_duration = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.DurationOrBuilder getViewableDurationOrBuilder() { + if (viewableDurationBuilder_ != null) { + return viewableDurationBuilder_.getMessageOrBuilder(); + } else { + return viewableDuration_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : viewableDuration_; + } + } + + /** + * + * + *
+     * Optional. The amount of time the ad was viewable for.
+     * 
+ * + * + * .google.protobuf.Duration viewable_duration = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + internalGetViewableDurationFieldBuilder() { + if (viewableDurationBuilder_ == null) { + viewableDurationBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder>( + getViewableDuration(), getParentForChildren(), isClean()); + viewableDuration_ = null; + } + return viewableDurationBuilder_; + } + + private boolean mediaSkippable_; + + /** + * + * + *
+     * Optional. Whether the ad media was skippable or not.
+     * 
+ * + * bool media_skippable = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The mediaSkippable. + */ + @java.lang.Override + public boolean getMediaSkippable() { + return mediaSkippable_; + } + + /** + * + * + *
+     * Optional. Whether the ad media was skippable or not.
+     * 
+ * + * bool media_skippable = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The mediaSkippable to set. + * @return This builder for chaining. + */ + public Builder setMediaSkippable(boolean value) { + + mediaSkippable_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Whether the ad media was skippable or not.
+     * 
+ * + * bool media_skippable = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearMediaSkippable() { + bitField0_ = (bitField0_ & ~0x00000008); + mediaSkippable_ = false; + onChanged(); + return this; + } + + private int mediaQuartile_ = 0; + + /** + * + * + *
+     * Optional. The amount of the media that was played as discrete quartiles.
+     * 
+ * + * + * .google.ads.datamanager.v1.MediaQuartile media_quartile = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for mediaQuartile. + */ + @java.lang.Override + public int getMediaQuartileValue() { + return mediaQuartile_; + } + + /** + * + * + *
+     * Optional. The amount of the media that was played as discrete quartiles.
+     * 
+ * + * + * .google.ads.datamanager.v1.MediaQuartile media_quartile = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The enum numeric value on the wire for mediaQuartile to set. + * @return This builder for chaining. + */ + public Builder setMediaQuartileValue(int value) { + mediaQuartile_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The amount of the media that was played as discrete quartiles.
+     * 
+ * + * + * .google.ads.datamanager.v1.MediaQuartile media_quartile = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The mediaQuartile. + */ + @java.lang.Override + public com.google.ads.datamanager.v1.MediaQuartile getMediaQuartile() { + com.google.ads.datamanager.v1.MediaQuartile result = + com.google.ads.datamanager.v1.MediaQuartile.forNumber(mediaQuartile_); + return result == null ? com.google.ads.datamanager.v1.MediaQuartile.UNRECOGNIZED : result; + } + + /** + * + * + *
+     * Optional. The amount of the media that was played as discrete quartiles.
+     * 
+ * + * + * .google.ads.datamanager.v1.MediaQuartile media_quartile = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The mediaQuartile to set. + * @return This builder for chaining. + */ + public Builder setMediaQuartile(com.google.ads.datamanager.v1.MediaQuartile value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000010; + mediaQuartile_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The amount of the media that was played as discrete quartiles.
+     * 
+ * + * + * .google.ads.datamanager.v1.MediaQuartile media_quartile = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearMediaQuartile() { + bitField0_ = (bitField0_ & ~0x00000010); + mediaQuartile_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.Duration mediaDuration_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + mediaDurationBuilder_; + + /** + * + * + *
+     * Optional. The duration of the ad media.
+     * 
+ * + * .google.protobuf.Duration media_duration = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the mediaDuration field is set. + */ + public boolean hasMediaDuration() { + return ((bitField0_ & 0x00000020) != 0); + } + + /** + * + * + *
+     * Optional. The duration of the ad media.
+     * 
+ * + * .google.protobuf.Duration media_duration = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The mediaDuration. + */ + public com.google.protobuf.Duration getMediaDuration() { + if (mediaDurationBuilder_ == null) { + return mediaDuration_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : mediaDuration_; + } else { + return mediaDurationBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Optional. The duration of the ad media.
+     * 
+ * + * .google.protobuf.Duration media_duration = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setMediaDuration(com.google.protobuf.Duration value) { + if (mediaDurationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + mediaDuration_ = value; + } else { + mediaDurationBuilder_.setMessage(value); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The duration of the ad media.
+     * 
+ * + * .google.protobuf.Duration media_duration = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setMediaDuration(com.google.protobuf.Duration.Builder builderForValue) { + if (mediaDurationBuilder_ == null) { + mediaDuration_ = builderForValue.build(); + } else { + mediaDurationBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The duration of the ad media.
+     * 
+ * + * .google.protobuf.Duration media_duration = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeMediaDuration(com.google.protobuf.Duration value) { + if (mediaDurationBuilder_ == null) { + if (((bitField0_ & 0x00000020) != 0) + && mediaDuration_ != null + && mediaDuration_ != com.google.protobuf.Duration.getDefaultInstance()) { + getMediaDurationBuilder().mergeFrom(value); + } else { + mediaDuration_ = value; + } + } else { + mediaDurationBuilder_.mergeFrom(value); + } + if (mediaDuration_ != null) { + bitField0_ |= 0x00000020; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Optional. The duration of the ad media.
+     * 
+ * + * .google.protobuf.Duration media_duration = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearMediaDuration() { + bitField0_ = (bitField0_ & ~0x00000020); + mediaDuration_ = null; + if (mediaDurationBuilder_ != null) { + mediaDurationBuilder_.dispose(); + mediaDurationBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The duration of the ad media.
+     * 
+ * + * .google.protobuf.Duration media_duration = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.Duration.Builder getMediaDurationBuilder() { + bitField0_ |= 0x00000020; + onChanged(); + return internalGetMediaDurationFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. The duration of the ad media.
+     * 
+ * + * .google.protobuf.Duration media_duration = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.DurationOrBuilder getMediaDurationOrBuilder() { + if (mediaDurationBuilder_ != null) { + return mediaDurationBuilder_.getMessageOrBuilder(); + } else { + return mediaDuration_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : mediaDuration_; + } + } + + /** + * + * + *
+     * Optional. The duration of the ad media.
+     * 
+ * + * .google.protobuf.Duration media_duration = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + internalGetMediaDurationFieldBuilder() { + if (mediaDurationBuilder_ == null) { + mediaDurationBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder>( + getMediaDuration(), getParentForChildren(), isClean()); + mediaDuration_ = null; + } + return mediaDurationBuilder_; + } + + private int mediaVolumePercent_; + + /** + * + * + *
+     * Optional. The numerical percent (0-100) of the volume of the media
+     * playback.
+     * 
+ * + * int32 media_volume_percent = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The mediaVolumePercent. + */ + @java.lang.Override + public int getMediaVolumePercent() { + return mediaVolumePercent_; + } + + /** + * + * + *
+     * Optional. The numerical percent (0-100) of the volume of the media
+     * playback.
+     * 
+ * + * int32 media_volume_percent = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The mediaVolumePercent to set. + * @return This builder for chaining. + */ + public Builder setMediaVolumePercent(int value) { + + mediaVolumePercent_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The numerical percent (0-100) of the volume of the media
+     * playback.
+     * 
+ * + * int32 media_volume_percent = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearMediaVolumePercent() { + bitField0_ = (bitField0_ & ~0x00000040); + mediaVolumePercent_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.Duration playbackDuration_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + playbackDurationBuilder_; + + /** + * + * + *
+     * Optional. The duration of playback of the ad media, regardless of whether
+     * it was viewable or not.
+     * 
+ * + * + * .google.protobuf.Duration playback_duration = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the playbackDuration field is set. + */ + public boolean hasPlaybackDuration() { + return ((bitField0_ & 0x00000080) != 0); + } + + /** + * + * + *
+     * Optional. The duration of playback of the ad media, regardless of whether
+     * it was viewable or not.
+     * 
+ * + * + * .google.protobuf.Duration playback_duration = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The playbackDuration. + */ + public com.google.protobuf.Duration getPlaybackDuration() { + if (playbackDurationBuilder_ == null) { + return playbackDuration_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : playbackDuration_; + } else { + return playbackDurationBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Optional. The duration of playback of the ad media, regardless of whether
+     * it was viewable or not.
+     * 
+ * + * + * .google.protobuf.Duration playback_duration = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setPlaybackDuration(com.google.protobuf.Duration value) { + if (playbackDurationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + playbackDuration_ = value; + } else { + playbackDurationBuilder_.setMessage(value); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The duration of playback of the ad media, regardless of whether
+     * it was viewable or not.
+     * 
+ * + * + * .google.protobuf.Duration playback_duration = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setPlaybackDuration(com.google.protobuf.Duration.Builder builderForValue) { + if (playbackDurationBuilder_ == null) { + playbackDuration_ = builderForValue.build(); + } else { + playbackDurationBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The duration of playback of the ad media, regardless of whether
+     * it was viewable or not.
+     * 
+ * + * + * .google.protobuf.Duration playback_duration = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergePlaybackDuration(com.google.protobuf.Duration value) { + if (playbackDurationBuilder_ == null) { + if (((bitField0_ & 0x00000080) != 0) + && playbackDuration_ != null + && playbackDuration_ != com.google.protobuf.Duration.getDefaultInstance()) { + getPlaybackDurationBuilder().mergeFrom(value); + } else { + playbackDuration_ = value; + } + } else { + playbackDurationBuilder_.mergeFrom(value); + } + if (playbackDuration_ != null) { + bitField0_ |= 0x00000080; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Optional. The duration of playback of the ad media, regardless of whether
+     * it was viewable or not.
+     * 
+ * + * + * .google.protobuf.Duration playback_duration = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearPlaybackDuration() { + bitField0_ = (bitField0_ & ~0x00000080); + playbackDuration_ = null; + if (playbackDurationBuilder_ != null) { + playbackDurationBuilder_.dispose(); + playbackDurationBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The duration of playback of the ad media, regardless of whether
+     * it was viewable or not.
+     * 
+ * + * + * .google.protobuf.Duration playback_duration = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.Duration.Builder getPlaybackDurationBuilder() { + bitField0_ |= 0x00000080; + onChanged(); + return internalGetPlaybackDurationFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. The duration of playback of the ad media, regardless of whether
+     * it was viewable or not.
+     * 
+ * + * + * .google.protobuf.Duration playback_duration = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.DurationOrBuilder getPlaybackDurationOrBuilder() { + if (playbackDurationBuilder_ != null) { + return playbackDurationBuilder_.getMessageOrBuilder(); + } else { + return playbackDuration_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : playbackDuration_; + } + } + + /** + * + * + *
+     * Optional. The duration of playback of the ad media, regardless of whether
+     * it was viewable or not.
+     * 
+ * + * + * .google.protobuf.Duration playback_duration = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + internalGetPlaybackDurationFieldBuilder() { + if (playbackDurationBuilder_ == null) { + playbackDurationBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder>( + getPlaybackDuration(), getParentForChildren(), isClean()); + playbackDuration_ = null; + } + return playbackDurationBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.ads.datamanager.v1.ViewabilityInfo) + } + + // @@protoc_insertion_point(class_scope:google.ads.datamanager.v1.ViewabilityInfo) + private static final com.google.ads.datamanager.v1.ViewabilityInfo DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.ads.datamanager.v1.ViewabilityInfo(); + } + + public static com.google.ads.datamanager.v1.ViewabilityInfo getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ViewabilityInfo parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.ads.datamanager.v1.ViewabilityInfo getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-datamanager/proto-data-manager-v1/src/main/java/com/google/ads/datamanager/v1/ViewabilityInfoOrBuilder.java b/java-datamanager/proto-data-manager-v1/src/main/java/com/google/ads/datamanager/v1/ViewabilityInfoOrBuilder.java new file mode 100644 index 000000000000..7ed0e0a15a0a --- /dev/null +++ b/java-datamanager/proto-data-manager-v1/src/main/java/com/google/ads/datamanager/v1/ViewabilityInfoOrBuilder.java @@ -0,0 +1,257 @@ +/* + * 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/ads/datamanager/v1/viewability_info.proto +// Protobuf Java Version: 4.33.2 + +package com.google.ads.datamanager.v1; + +@com.google.protobuf.Generated +public interface ViewabilityInfoOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.ads.datamanager.v1.ViewabilityInfo) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The type of the event.
+   * 
+ * + * + * .google.ads.datamanager.v1.ViewType view_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for viewType. + */ + int getViewTypeValue(); + + /** + * + * + *
+   * Required. The type of the event.
+   * 
+ * + * + * .google.ads.datamanager.v1.ViewType view_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The viewType. + */ + com.google.ads.datamanager.v1.ViewType getViewType(); + + /** + * + * + *
+   * Optional. The numerical percent (0-100) of the pixels that were viewable.
+   * 
+ * + * int32 viewable_percent = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The viewablePercent. + */ + int getViewablePercent(); + + /** + * + * + *
+   * Optional. The amount of time the ad was viewable for.
+   * 
+ * + * + * .google.protobuf.Duration viewable_duration = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the viewableDuration field is set. + */ + boolean hasViewableDuration(); + + /** + * + * + *
+   * Optional. The amount of time the ad was viewable for.
+   * 
+ * + * + * .google.protobuf.Duration viewable_duration = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The viewableDuration. + */ + com.google.protobuf.Duration getViewableDuration(); + + /** + * + * + *
+   * Optional. The amount of time the ad was viewable for.
+   * 
+ * + * + * .google.protobuf.Duration viewable_duration = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.protobuf.DurationOrBuilder getViewableDurationOrBuilder(); + + /** + * + * + *
+   * Optional. Whether the ad media was skippable or not.
+   * 
+ * + * bool media_skippable = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The mediaSkippable. + */ + boolean getMediaSkippable(); + + /** + * + * + *
+   * Optional. The amount of the media that was played as discrete quartiles.
+   * 
+ * + * + * .google.ads.datamanager.v1.MediaQuartile media_quartile = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for mediaQuartile. + */ + int getMediaQuartileValue(); + + /** + * + * + *
+   * Optional. The amount of the media that was played as discrete quartiles.
+   * 
+ * + * + * .google.ads.datamanager.v1.MediaQuartile media_quartile = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The mediaQuartile. + */ + com.google.ads.datamanager.v1.MediaQuartile getMediaQuartile(); + + /** + * + * + *
+   * Optional. The duration of the ad media.
+   * 
+ * + * .google.protobuf.Duration media_duration = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the mediaDuration field is set. + */ + boolean hasMediaDuration(); + + /** + * + * + *
+   * Optional. The duration of the ad media.
+   * 
+ * + * .google.protobuf.Duration media_duration = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The mediaDuration. + */ + com.google.protobuf.Duration getMediaDuration(); + + /** + * + * + *
+   * Optional. The duration of the ad media.
+   * 
+ * + * .google.protobuf.Duration media_duration = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.protobuf.DurationOrBuilder getMediaDurationOrBuilder(); + + /** + * + * + *
+   * Optional. The numerical percent (0-100) of the volume of the media
+   * playback.
+   * 
+ * + * int32 media_volume_percent = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The mediaVolumePercent. + */ + int getMediaVolumePercent(); + + /** + * + * + *
+   * Optional. The duration of playback of the ad media, regardless of whether
+   * it was viewable or not.
+   * 
+ * + * + * .google.protobuf.Duration playback_duration = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the playbackDuration field is set. + */ + boolean hasPlaybackDuration(); + + /** + * + * + *
+   * Optional. The duration of playback of the ad media, regardless of whether
+   * it was viewable or not.
+   * 
+ * + * + * .google.protobuf.Duration playback_duration = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The playbackDuration. + */ + com.google.protobuf.Duration getPlaybackDuration(); + + /** + * + * + *
+   * Optional. The duration of playback of the ad media, regardless of whether
+   * it was viewable or not.
+   * 
+ * + * + * .google.protobuf.Duration playback_duration = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.protobuf.DurationOrBuilder getPlaybackDurationOrBuilder(); +} diff --git a/java-datamanager/proto-data-manager-v1/src/main/java/com/google/ads/datamanager/v1/ViewabilityInfoProto.java b/java-datamanager/proto-data-manager-v1/src/main/java/com/google/ads/datamanager/v1/ViewabilityInfoProto.java new file mode 100644 index 000000000000..412db6191407 --- /dev/null +++ b/java-datamanager/proto-data-manager-v1/src/main/java/com/google/ads/datamanager/v1/ViewabilityInfoProto.java @@ -0,0 +1,118 @@ +/* + * 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/ads/datamanager/v1/viewability_info.proto +// Protobuf Java Version: 4.33.2 + +package com.google.ads.datamanager.v1; + +@com.google.protobuf.Generated +public final class ViewabilityInfoProto extends com.google.protobuf.GeneratedFile { + private ViewabilityInfoProto() {} + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ViewabilityInfoProto"); + } + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_ads_datamanager_v1_ViewabilityInfo_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_ads_datamanager_v1_ViewabilityInfo_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n0google/ads/datamanager/v1/viewability_" + + "info.proto\022\031google.ads.datamanager.v1\032\037g" + + "oogle/api/field_behavior.proto\032\036google/p" + + "rotobuf/duration.proto\"\243\003\n\017ViewabilityIn" + + "fo\022;\n\tview_type\030\001 \001(\0162#.google.ads.datam" + + "anager.v1.ViewTypeB\003\340A\002\022\035\n\020viewable_perc" + + "ent\030\002 \001(\005B\003\340A\001\0229\n\021viewable_duration\030\003 \001(" + + "\0132\031.google.protobuf.DurationB\003\340A\001\022\034\n\017med" + + "ia_skippable\030\004 \001(\010B\003\340A\001\022E\n\016media_quartil" + + "e\030\005 \001(\0162(.google.ads.datamanager.v1.Medi" + + "aQuartileB\003\340A\001\0226\n\016media_duration\030\006 \001(\0132\031" + + ".google.protobuf.DurationB\003\340A\001\022!\n\024media_" + + "volume_percent\030\007 \001(\005B\003\340A\001\0229\n\021playback_du" + + "ration\030\010 \001(\0132\031.google.protobuf.DurationB" + + "\003\340A\001*[\n\010ViewType\022\031\n\025VIEW_TYPE_UNSPECIFIE" + + "D\020\000\022\030\n\024VIEW_TYPE_MRC_VIEWED\020\001\022\032\n\026VIEW_TY" + + "PE_MRC_RENDERED\020\002*\311\001\n\rMediaQuartile\022\036\n\032M" + + "EDIA_QUARTILE_UNSPECIFIED\020\000\022\030\n\024MEDIA_QUA" + + "RTILE_START\020\001\022!\n\035MEDIA_QUARTILE_FIRST_QU" + + "ARTILE\020\002\022\033\n\027MEDIA_QUARTILE_MIDPOINT\020\003\022!\n" + + "\035MEDIA_QUARTILE_THIRD_QUARTILE\020\004\022\033\n\027MEDI" + + "A_QUARTILE_COMPLETE\020\005B\321\001\n\035com.google.ads" + + ".datamanager.v1B\024ViewabilityInfoProtoP\001Z" + + "Acloud.google.com/go/datamanager/apiv1/d" + + "atamanagerpb;datamanagerpb\252\002\031Google.Ads." + + "DataManager.V1\312\002\031Google\\Ads\\DataManager\\" + + "V1\352\002\034Google::Ads::DataManager::V1b\006proto" + + "3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.protobuf.DurationProto.getDescriptor(), + }); + internal_static_google_ads_datamanager_v1_ViewabilityInfo_descriptor = + getDescriptor().getMessageType(0); + internal_static_google_ads_datamanager_v1_ViewabilityInfo_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_ads_datamanager_v1_ViewabilityInfo_descriptor, + new java.lang.String[] { + "ViewType", + "ViewablePercent", + "ViewableDuration", + "MediaSkippable", + "MediaQuartile", + "MediaDuration", + "MediaVolumePercent", + "PlaybackDuration", + }); + descriptor.resolveAllFeaturesImmutable(); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.protobuf.DurationProto.getDescriptor(); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-datamanager/proto-data-manager-v1/src/main/proto/google/ads/datamanager/v1/ad_event.proto b/java-datamanager/proto-data-manager-v1/src/main/proto/google/ads/datamanager/v1/ad_event.proto new file mode 100644 index 000000000000..12f3c58dcd34 --- /dev/null +++ b/java-datamanager/proto-data-manager-v1/src/main/proto/google/ads/datamanager/v1/ad_event.proto @@ -0,0 +1,425 @@ +// 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 +// +// http://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. + +syntax = "proto3"; + +package google.ads.datamanager.v1; + +import "google/ads/datamanager/v1/device_info.proto"; +import "google/ads/datamanager/v1/user_data.proto"; +import "google/ads/datamanager/v1/viewability_info.proto"; +import "google/api/field_behavior.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Ads.DataManager.V1"; +option go_package = "cloud.google.com/go/datamanager/apiv1/datamanagerpb;datamanagerpb"; +option java_multiple_files = true; +option java_outer_classname = "AdEventProto"; +option java_package = "com.google.ads.datamanager.v1"; +option php_namespace = "Google\\Ads\\DataManager\\V1"; +option ruby_package = "Google::Ads::DataManager::V1"; + +// An ad event. +message AdEvent { + // The type of the event. + enum EventType { + // Unspecified event type. + EVENT_TYPE_UNSPECIFIED = 0; + + // View event. + EVENT_TYPE_VIEW = 1; + + // Click event. + EVENT_TYPE_CLICK = 2; + } + + // Additional classification about the type of ad event. + enum EventSubtype { + // Unspecified event subtype. + EVENT_SUBTYPE_UNSPECIFIED = 0; + + // Impression event. + EVENT_SUBTYPE_IMPRESSION = 1; + + // Engaged view event. + EVENT_SUBTYPE_ENGAGED_VIEW = 2; + + // Onsite click event. + EVENT_SUBTYPE_ONSITE_CLICK = 3; + + // Outbound click event. + EVENT_SUBTYPE_OUTBOUND_CLICK = 4; + } + + // Required. The ID of the advertiser for the ad event. + // + // This must match the ID sent in the linking flow. + string advertiser_id = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The type of the event. + EventType event_type = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Additional classification about the type of ad event. + // + // A raw string is accepted to handle values other than the pure enums. + // The enum is preferred if possible. + oneof event_subtype_oneof { + // Enum value for event subtype. + EventSubtype event_subtype = 3; + + // String value for event subtype. + string event_subtype_string = 4; + } + + // Required. The time the event occurred. + google.protobuf.Timestamp timestamp = 5 + [(google.api.field_behavior) = REQUIRED]; + + // Optional. An ID created and managed by the caller that uniquely identifies + // this event. + // + // Required if you want to deduplicate ad events that are included + // in multiple requests. Otherwise, this field is optional. + string event_id = 6 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Multiple pieces of user-provided data, representing the user the + // event is associated with. + // + // It is possible to provide multiple instances of the same type of data (e.g. + // email address). The more data provided, the more likely a match will be + // found. + UserData user_data = 7 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Information gathered about the device being used when the ad + // event happened. + DeviceInfo device_info = 8 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The device ID of the device that the ad was served to. + string mobile_device_id = 9 [(google.api.field_behavior) = OPTIONAL]; + + // Required. The ID of the associated campaign. + string campaign_id = 10 [(google.api.field_behavior) = REQUIRED]; + + // Required. The name of the associated campaign. + string campaign_name = 11 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The ID of the associated ad group. + string ad_group_id = 12 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The ID of the associated ad within the group. + string ad_id = 13 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The type of the ad served. + // + // A raw string is accepted to handle values other than the pure enums. + // The enum is preferred if possible. + oneof ad_type_oneof { + // Enum value for ad type. + AdType ad_type = 14; + + // String value for ad type. + string ad_type_string = 15; + } + + // Optional. The type of the ad served. + // + // A raw string is accepted to handle values other than the pure enums. + // The enum is preferred if possible. + oneof ad_format_oneof { + // Enum value for ad format. + AdFormat ad_format = 16; + + // String value for ad format. + string ad_format_string = 17; + } + + // Optional. The placement of the ad served. + // + // A raw string is accepted to handle values other than the pure enums. + // The enum is preferred if possible. + oneof ad_placement_oneof { + // Enum value for ad placement. + AdPlacement ad_placement = 18; + + // String value for ad placement. + string ad_placement_string = 19; + } + + // Optional. The height of the ad in pixels. + int32 ad_height = 20 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The width of the ad in pixels. + int32 ad_width = 21 [(google.api.field_behavior) = OPTIONAL]; + + // Required. The ISO 3166-2 country plus subdivision. + string region_code = 22 [(google.api.field_behavior) = REQUIRED]; + + // Required. The platform source of the ad, akin to the Google Analytics + // source. + string source = 23 [(google.api.field_behavior) = REQUIRED]; + + // Required. The medium of the ad, akin to the Google Analytics medium. + string medium = 24 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The type of targeting used to serve the ad. + // + // A raw string is accepted to handle values other than the pure enums. + // The enum is preferred if possible. + oneof targeting_type_oneof { + // Enum value for targeting type. + TargetingType targeting_type = 25; + + // String value for targeting type. + string targeting_type_string = 26; + } + + // Optional. The type of the platform on which the ad was served. + // + // A raw string is accepted to handle values other than the pure enums. + // The enum is preferred if possible. + oneof platform_type_oneof { + // Enum value for platform type. + PlatformType platform_type = 27; + + // String value for platform type. + string platform_type_string = 28; + } + + // Optional. Further detail of the platform on which the ad was served. + // + // A raw string is accepted to handle values other than the pure enums. + // The enum is preferred if possible. + oneof platform_oneof { + // Enum value for platform. + Platform platform = 29; + + // String value for platform. + string platform_string = 30; + } + + // Optional. The partner-assumed attribution status for this ad event. + // + // This acts only as a signal for how the partner assumed attribution played + // out, and does not force an end result in final reports. + AttributionHint attribution_hint = 31 + [(google.api.field_behavior) = OPTIONAL]; + + // Required. Details of the viewability of the ad served. + ViewabilityInfo viewability_info = 32 + [(google.api.field_behavior) = REQUIRED]; + + // Optional. Represents if the row is allowed to be used for measurement + // purposes, as governed by applicable privacy laws within regional + // jurisdiction. + optional bool measurement_allowed = 33 + [(google.api.field_behavior) = OPTIONAL]; +} + +// The type of the ad served. +enum AdType { + // Unspecified ad type. + AD_TYPE_UNSPECIFIED = 0; + + // Display ad. + AD_TYPE_DISPLAY = 1; + + // Text ad. + AD_TYPE_TEXT = 2; + + // Image ad. + AD_TYPE_IMAGE = 3; + + // Rich media ad. + AD_TYPE_RICH_MEDIA = 4; + + // HTML ad. + AD_TYPE_HTML = 5; + + // Audio ad. + AD_TYPE_AUDIO = 6; + + // Video ad. + AD_TYPE_VIDEO = 7; +} + +// The format of the ad served. +enum AdFormat { + // Unspecified ad format. + AD_FORMAT_UNSPECIFIED = 0; + + // AR ad. + AD_FORMAT_AR = 1; + + // Audio ad. + AD_FORMAT_AUDIO = 2; + + // Banner ad. + AD_FORMAT_BANNER = 3; + + // Bumper ad. + AD_FORMAT_BUMPER = 4; + + // Carousel ad. + AD_FORMAT_CAROUSEL = 5; + + // Collection ad. + AD_FORMAT_COLLECTION = 6; + + // Image ad. + AD_FORMAT_IMAGE = 7; + + // Interactive ad. + AD_FORMAT_INTERACTIVE = 8; + + // Interstitial ad. + AD_FORMAT_INTERSTITIAL = 9; + + // In-feed ad. + AD_FORMAT_IN_FEED = 10; + + // In-stream ad. + AD_FORMAT_IN_STREAM = 11; + + // In-stream skippable ad. + AD_FORMAT_IN_STREAM_SKIPPABLE = 12; + + // In-stream non-skippable ad. + AD_FORMAT_IN_STREAM_NON_SKIPPABLE = 13; + + // Native ad. + AD_FORMAT_NATIVE = 14; + + // Shorts ad. + AD_FORMAT_SHORTS = 15; + + // Story ad. + AD_FORMAT_STORY = 16; + + // Sponsored ad. + AD_FORMAT_SPONSORED = 17; + + // Video ad. + AD_FORMAT_VIDEO = 18; +} + +// The placement of the ad served. +enum AdPlacement { + // Unspecified ad placement. + AD_PLACEMENT_UNSPECIFIED = 0; + + // Discover placement. + AD_PLACEMENT_DISCOVER = 1; + + // Feed placement. + AD_PLACEMENT_FEED = 2; + + // Footer placement. + AD_PLACEMENT_FOOTER = 3; + + // Header placement. + AD_PLACEMENT_HEADER = 4; + + // Home placement. + AD_PLACEMENT_HOME = 5; + + // In-content placement. + AD_PLACEMENT_IN_CONTENT = 6; + + // Promoted placement. + AD_PLACEMENT_PROMOTED = 7; + + // Search placement. + AD_PLACEMENT_SEARCH = 8; + + // Story placement. + AD_PLACEMENT_STORY = 9; +} + +// The type of targeting used to serve the ad. +enum TargetingType { + // Unspecified targeting type. + TARGETING_TYPE_UNSPECIFIED = 0; + + // Audience targeting. + TARGETING_TYPE_AUDIENCE = 1; + + // Contextual targeting. + TARGETING_TYPE_CONTEXTUAL = 2; + + // Demographic targeting. + TARGETING_TYPE_DEMOGRAPHIC = 3; + + // Device targeting. + TARGETING_TYPE_DEVICE = 4; + + // Geo targeting. + TARGETING_TYPE_GEO = 5; + + // Interest targeting. + TARGETING_TYPE_INTEREST = 6; + + // Purchase intent targeting. + TARGETING_TYPE_PURCHASE_INTENT = 7; + + // Remarketing targeting. + TARGETING_TYPE_REMARKETING = 8; +} + +// The type of the platform on which the ad was served. +enum PlatformType { + // Unspecified platform type. + PLATFORM_TYPE_UNSPECIFIED = 0; + + // Mobile platform. + PLATFORM_TYPE_MOBILE = 1; + + // Desktop platform. + PLATFORM_TYPE_DESKTOP = 2; + + // CTV platform. + PLATFORM_TYPE_CTV = 3; + + // Phone platform. + PLATFORM_TYPE_PHONE = 4; + + // Tablet platform. + PLATFORM_TYPE_TABLET = 5; +} + +// Further detail of the platform on which the ad was served. +enum Platform { + // Unspecified platform. + PLATFORM_UNSPECIFIED = 0; + + // iOS platform. + PLATFORM_IOS = 1; + + // Android platform. + PLATFORM_ANDROID = 2; + + // Web platform. + PLATFORM_WEB = 3; +} + +// The partner-assumed attribution status for this ad event. +enum AttributionHint { + // Unknown attribution status. + ATTRIBUTION_HINT_UNSPECIFIED = 0; + + // Converted status. + ATTRIBUTION_HINT_CONVERTED = 1; + + // Not converted status. + ATTRIBUTION_HINT_NOT_CONVERTED = 2; +} diff --git a/java-datamanager/proto-data-manager-v1/src/main/proto/google/ads/datamanager/v1/destination.proto b/java-datamanager/proto-data-manager-v1/src/main/proto/google/ads/datamanager/v1/destination.proto index 069d1fd31fb7..f345a1174815 100644 --- a/java-datamanager/proto-data-manager-v1/src/main/proto/google/ads/datamanager/v1/destination.proto +++ b/java-datamanager/proto-data-manager-v1/src/main/proto/google/ads/datamanager/v1/destination.proto @@ -104,10 +104,10 @@ message ProductAccount { // Required. The ID of the account. For example, your Google Ads account ID. string account_id = 2 [(google.api.field_behavior) = REQUIRED]; - // Optional. The type of the account. For example, `GOOGLE_ADS`. + // Required. The type of the account. For example, `GOOGLE_ADS`. // Either `account_type` or the deprecated `product` is required. // If both are set, the values must match. - AccountType account_type = 3 [(google.api.field_behavior) = OPTIONAL]; + AccountType account_type = 3 [(google.api.field_behavior) = REQUIRED]; } // Deprecated. Use diff --git a/java-datamanager/proto-data-manager-v1/src/main/proto/google/ads/datamanager/v1/device_info.proto b/java-datamanager/proto-data-manager-v1/src/main/proto/google/ads/datamanager/v1/device_info.proto index 48067f839c1e..1f4f4a4cb324 100644 --- a/java-datamanager/proto-data-manager-v1/src/main/proto/google/ads/datamanager/v1/device_info.proto +++ b/java-datamanager/proto-data-manager-v1/src/main/proto/google/ads/datamanager/v1/device_info.proto @@ -17,6 +17,7 @@ syntax = "proto3"; package google.ads.datamanager.v1; import "google/api/field_behavior.proto"; +import "google/api/field_info.proto"; option csharp_namespace = "Google.Ads.DataManager.V1"; option go_package = "cloud.google.com/go/datamanager/apiv1/datamanagerpb;datamanagerpb"; @@ -42,7 +43,10 @@ message DeviceInfo { // applicable Google policies. See the [About offline conversion // imports](https://support.google.com/google-ads/answer/2998031) page for // more details. - string ip_address = 2 [(google.api.field_behavior) = OPTIONAL]; + string ip_address = 2 [ + (google.api.field_info).format = IPV4_OR_IPV6, + (google.api.field_behavior) = OPTIONAL + ]; // Optional. The category of device. For example, “desktop”, “tablet”, // “mobile”, “smart TV”. diff --git a/java-datamanager/proto-data-manager-v1/src/main/proto/google/ads/datamanager/v1/encryption_info.proto b/java-datamanager/proto-data-manager-v1/src/main/proto/google/ads/datamanager/v1/encryption_info.proto index 365e5cd12e05..58ee7eac9919 100644 --- a/java-datamanager/proto-data-manager-v1/src/main/proto/google/ads/datamanager/v1/encryption_info.proto +++ b/java-datamanager/proto-data-manager-v1/src/main/proto/google/ads/datamanager/v1/encryption_info.proto @@ -36,6 +36,16 @@ message EncryptionInfo { // Amazon Web Services wrapped key information. AwsWrappedKeyInfo aws_wrapped_key_info = 2; + + // Key information for the chosen coordinator key. + // + // This is not supported for the + // [IngestEvents][google.ads.datamanager.v1.IngestionService.IngestEvents], + // [IngestAudienceMembers][google.ads.datamanager.v1.IngestionService.IngestAudienceMembers], + // and + // [RemoveAudienceMembers][google.ads.datamanager.v1.IngestionService.RemoveAudienceMembers] + // methods. + CoordinatorKeyInfo coordinator_key_info = 3; } } @@ -98,3 +108,9 @@ message AwsWrappedKeyInfo { // Required. The base64 encoded encrypted data encryption key. string encrypted_dek = 4 [(google.api.field_behavior) = REQUIRED]; } + +// Information about the coordinator key. +message CoordinatorKeyInfo { + // Required. The ID of the chosen coordinator key. + string key_id = 1 [(google.api.field_behavior) = REQUIRED]; +} diff --git a/java-datamanager/proto-data-manager-v1/src/main/proto/google/ads/datamanager/v1/error.proto b/java-datamanager/proto-data-manager-v1/src/main/proto/google/ads/datamanager/v1/error.proto index 9295d9374933..98d6ae724528 100644 --- a/java-datamanager/proto-data-manager-v1/src/main/proto/google/ads/datamanager/v1/error.proto +++ b/java-datamanager/proto-data-manager-v1/src/main/proto/google/ads/datamanager/v1/error.proto @@ -148,6 +148,8 @@ enum ErrorReason { UNSUPPORTED_LINKED_ACCOUNT_FOR_DATA_PARTNER = 38; // Events data contains no user identifiers or ad identifiers. + // For Floodlight Event ingestion this error indicates requests contains no ad + // identifiers. NO_IDENTIFIERS_PROVIDED = 39; // The property type is not supported. diff --git a/java-datamanager/proto-data-manager-v1/src/main/proto/google/ads/datamanager/v1/ingestion_service.proto b/java-datamanager/proto-data-manager-v1/src/main/proto/google/ads/datamanager/v1/ingestion_service.proto index d388f7691b90..538e2d2ff472 100644 --- a/java-datamanager/proto-data-manager-v1/src/main/proto/google/ads/datamanager/v1/ingestion_service.proto +++ b/java-datamanager/proto-data-manager-v1/src/main/proto/google/ads/datamanager/v1/ingestion_service.proto @@ -16,6 +16,7 @@ syntax = "proto3"; package google.ads.datamanager.v1; +import "google/ads/datamanager/v1/ad_event.proto"; import "google/ads/datamanager/v1/audience.proto"; import "google/ads/datamanager/v1/consent.proto"; import "google/ads/datamanager/v1/destination.proto"; @@ -73,6 +74,18 @@ service IngestionService { }; } + // Uploads a list of + // [AdEvent][google.ads.datamanager.v1.AdEvent] resources to Google + // Analytics. + // + // This feature is only available to accounts on an allowlist. + rpc IngestAdEvents(IngestAdEventsRequest) returns (IngestAdEventsResponse) { + option (google.api.http) = { + post: "/v1/adEvents:ingest" + body: "*" + }; + } + // Gets the status of a request given request id. rpc RetrieveRequestStatus(RetrieveRequestStatusRequest) returns (RetrieveRequestStatusResponse) { @@ -210,6 +223,22 @@ message IngestEventsResponse { string request_id = 1; } +// Request to upload ad events. +message IngestAdEventsRequest { + // Required. Required (at least 1). A list of ad events. + repeated AdEvent ad_events = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Information about encryption keys which are used to encrypt the + // data. + EncryptionInfo encryption_info = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If true, the request is validated, but not executed. + bool validate_only = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response from an ad event ingestion operation. +message IngestAdEventsResponse {} + // Request to get the status of request made to the DM API for a given request // ID. Returns a // [RetrieveRequestStatusResponse][google.ads.datamanager.v1.RetrieveRequestStatusResponse]. diff --git a/java-datamanager/proto-data-manager-v1/src/main/proto/google/ads/datamanager/v1/partner_link_service.proto b/java-datamanager/proto-data-manager-v1/src/main/proto/google/ads/datamanager/v1/partner_link_service.proto index 3e37a1c00841..9148b1366832 100644 --- a/java-datamanager/proto-data-manager-v1/src/main/proto/google/ads/datamanager/v1/partner_link_service.proto +++ b/java-datamanager/proto-data-manager-v1/src/main/proto/google/ads/datamanager/v1/partner_link_service.proto @@ -216,4 +216,58 @@ message PartnerLink { // Required. The partner account granted access by the owning account. ProductAccount partner_account = 4 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Immutable. The set of features supported for the partner link. + // If not specified, the system behavior defaults to + // [FEATURE_SET_AUDIENCE_AND_EVENT_MANAGEMENT][google.ads.datamanager.v1.FeatureSet.FEATURE_SET_AUDIENCE_AND_EVENT_MANAGEMENT]. + FeatureSet feature_set = 5 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.field_behavior) = IMMUTABLE + ]; + + // Optional. The customer account in the partner system. + // This is required for partner links with the + // [FEATURE_SET_AD_EVENT_MANAGEMENT][google.ads.datamanager.v1.FeatureSet.FEATURE_SET_AD_EVENT_MANAGEMENT] + // feature set. + PartnerCustomerAccount partner_customer_account = 6 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Metadata associated with the partner link. + // This is optional and only accepted for partner links with the + // [FEATURE_SET_AD_EVENT_MANAGEMENT][google.ads.datamanager.v1.FeatureSet.FEATURE_SET_AD_EVENT_MANAGEMENT]. + PartnerLinkMetadata partner_link_metadata = 7 + [(google.api.field_behavior) = OPTIONAL]; +} + +// Represents a customer account in the partner's system. +message PartnerCustomerAccount { + // Required. The identifier of the customer account in the partner's ID space. + string account_id = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The name of the account. + string account_name = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The type of the account. Can be used to distinguish between + // advertiser accounts and business level accounts, for example. + string account_type = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// Represents metadata associated with a partner link. +message PartnerLinkMetadata { + // Optional. The list of implicit accounts. + repeated PartnerCustomerAccount implicit_accounts = 1 + [(google.api.field_behavior) = OPTIONAL]; +} + +// The set of supported features for a partner link. +enum FeatureSet { + // Unspecified feature set. If unspecified, the system behavior defaults to + // [FEATURE_SET_AUDIENCE_AND_EVENT_MANAGEMENT][google.ads.datamanager.v1.FeatureSet.FEATURE_SET_AUDIENCE_AND_EVENT_MANAGEMENT]. + FEATURE_SET_UNSPECIFIED = 0; + + // Indicates a link used for audience and event management. + FEATURE_SET_AUDIENCE_AND_EVENT_MANAGEMENT = 1; + + // Indicates a link used for ad event management. + FEATURE_SET_AD_EVENT_MANAGEMENT = 2; } diff --git a/java-datamanager/proto-data-manager-v1/src/main/proto/google/ads/datamanager/v1/viewability_info.proto b/java-datamanager/proto-data-manager-v1/src/main/proto/google/ads/datamanager/v1/viewability_info.proto new file mode 100644 index 000000000000..b1b87791a415 --- /dev/null +++ b/java-datamanager/proto-data-manager-v1/src/main/proto/google/ads/datamanager/v1/viewability_info.proto @@ -0,0 +1,93 @@ +// 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 +// +// http://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. + +syntax = "proto3"; + +package google.ads.datamanager.v1; + +import "google/api/field_behavior.proto"; +import "google/protobuf/duration.proto"; + +option csharp_namespace = "Google.Ads.DataManager.V1"; +option go_package = "cloud.google.com/go/datamanager/apiv1/datamanagerpb;datamanagerpb"; +option java_multiple_files = true; +option java_outer_classname = "ViewabilityInfoProto"; +option java_package = "com.google.ads.datamanager.v1"; +option php_namespace = "Google\\Ads\\DataManager\\V1"; +option ruby_package = "Google::Ads::DataManager::V1"; + +// Details of the viewability of the ad served. +message ViewabilityInfo { + // Required. The type of the event. + ViewType view_type = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The numerical percent (0-100) of the pixels that were viewable. + int32 viewable_percent = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The amount of time the ad was viewable for. + google.protobuf.Duration viewable_duration = 3 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Whether the ad media was skippable or not. + bool media_skippable = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The amount of the media that was played as discrete quartiles. + MediaQuartile media_quartile = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The duration of the ad media. + google.protobuf.Duration media_duration = 6 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The numerical percent (0-100) of the volume of the media + // playback. + int32 media_volume_percent = 7 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The duration of playback of the ad media, regardless of whether + // it was viewable or not. + google.protobuf.Duration playback_duration = 8 + [(google.api.field_behavior) = OPTIONAL]; +} + +// The type of the event. +enum ViewType { + // Unspecified view type. + VIEW_TYPE_UNSPECIFIED = 0; + + // MRC viewed. + VIEW_TYPE_MRC_VIEWED = 1; + + // MRC rendered. + VIEW_TYPE_MRC_RENDERED = 2; +} + +// The amount of the media that was played as discrete quartiles. +enum MediaQuartile { + // Unspecified media quartile. + MEDIA_QUARTILE_UNSPECIFIED = 0; + + // Start. + MEDIA_QUARTILE_START = 1; + + // First quartile. + MEDIA_QUARTILE_FIRST_QUARTILE = 2; + + // Midpoint. + MEDIA_QUARTILE_MIDPOINT = 3; + + // Third quartile. + MEDIA_QUARTILE_THIRD_QUARTILE = 4; + + // Complete. + MEDIA_QUARTILE_COMPLETE = 5; +} diff --git a/java-datamanager/samples/snippets/generated/com/google/ads/datamanager/v1/ingestionservice/ingestadevents/AsyncIngestAdEvents.java b/java-datamanager/samples/snippets/generated/com/google/ads/datamanager/v1/ingestionservice/ingestadevents/AsyncIngestAdEvents.java new file mode 100644 index 000000000000..986c8c327ec9 --- /dev/null +++ b/java-datamanager/samples/snippets/generated/com/google/ads/datamanager/v1/ingestionservice/ingestadevents/AsyncIngestAdEvents.java @@ -0,0 +1,54 @@ +/* + * 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.ads.datamanager.v1.samples; + +// [START datamanager_v1_generated_IngestionService_IngestAdEvents_async] +import com.google.ads.datamanager.v1.AdEvent; +import com.google.ads.datamanager.v1.EncryptionInfo; +import com.google.ads.datamanager.v1.IngestAdEventsRequest; +import com.google.ads.datamanager.v1.IngestAdEventsResponse; +import com.google.ads.datamanager.v1.IngestionServiceClient; +import com.google.api.core.ApiFuture; +import java.util.ArrayList; + +public class AsyncIngestAdEvents { + + public static void main(String[] args) throws Exception { + asyncIngestAdEvents(); + } + + public static void asyncIngestAdEvents() 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 (IngestionServiceClient ingestionServiceClient = IngestionServiceClient.create()) { + IngestAdEventsRequest request = + IngestAdEventsRequest.newBuilder() + .addAllAdEvents(new ArrayList()) + .setEncryptionInfo(EncryptionInfo.newBuilder().build()) + .setValidateOnly(true) + .build(); + ApiFuture future = + ingestionServiceClient.ingestAdEventsCallable().futureCall(request); + // Do something. + IngestAdEventsResponse response = future.get(); + } + } +} +// [END datamanager_v1_generated_IngestionService_IngestAdEvents_async] diff --git a/java-datamanager/samples/snippets/generated/com/google/ads/datamanager/v1/ingestionservice/ingestadevents/SyncIngestAdEvents.java b/java-datamanager/samples/snippets/generated/com/google/ads/datamanager/v1/ingestionservice/ingestadevents/SyncIngestAdEvents.java new file mode 100644 index 000000000000..547cfbf78820 --- /dev/null +++ b/java-datamanager/samples/snippets/generated/com/google/ads/datamanager/v1/ingestionservice/ingestadevents/SyncIngestAdEvents.java @@ -0,0 +1,50 @@ +/* + * 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.ads.datamanager.v1.samples; + +// [START datamanager_v1_generated_IngestionService_IngestAdEvents_sync] +import com.google.ads.datamanager.v1.AdEvent; +import com.google.ads.datamanager.v1.EncryptionInfo; +import com.google.ads.datamanager.v1.IngestAdEventsRequest; +import com.google.ads.datamanager.v1.IngestAdEventsResponse; +import com.google.ads.datamanager.v1.IngestionServiceClient; +import java.util.ArrayList; + +public class SyncIngestAdEvents { + + public static void main(String[] args) throws Exception { + syncIngestAdEvents(); + } + + public static void syncIngestAdEvents() 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 (IngestionServiceClient ingestionServiceClient = IngestionServiceClient.create()) { + IngestAdEventsRequest request = + IngestAdEventsRequest.newBuilder() + .addAllAdEvents(new ArrayList()) + .setEncryptionInfo(EncryptionInfo.newBuilder().build()) + .setValidateOnly(true) + .build(); + IngestAdEventsResponse response = ingestionServiceClient.ingestAdEvents(request); + } + } +} +// [END datamanager_v1_generated_IngestionService_IngestAdEvents_sync] diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/AclConfigServiceClient.java b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/AclConfigServiceClient.java new file mode 100644 index 000000000000..78518248c9a5 --- /dev/null +++ b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/AclConfigServiceClient.java @@ -0,0 +1,403 @@ +/* + * 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.discoveryengine.v1beta; + +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.discoveryengine.v1beta.stub.AclConfigServiceStub; +import com.google.cloud.discoveryengine.v1beta.stub.AclConfigServiceStubSettings; +import java.io.IOException; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Service Description: Service for managing Acl Configuration. + * + *

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: + * + *

{@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 (AclConfigServiceClient aclConfigServiceClient = AclConfigServiceClient.create()) {
+ *   UpdateAclConfigRequest request =
+ *       UpdateAclConfigRequest.newBuilder().setAclConfig(AclConfig.newBuilder().build()).build();
+ *   AclConfig response = aclConfigServiceClient.updateAclConfig(request);
+ * }
+ * }
+ * + *

Note: close() needs to be called on the AclConfigServiceClient object to clean up resources + * such as threads. In the example above, try-with-resources is used, which automatically calls + * close(). + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
Methods
MethodDescriptionMethod Variants

UpdateAclConfig

Default ACL configuration for use in a location of a customer's project. Updates will only reflect to new data stores. Existing data stores will still use the old value.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • updateAclConfig(UpdateAclConfigRequest request) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • updateAclConfigCallable() + *

+ *

GetAclConfig

Gets the [AclConfig][google.cloud.discoveryengine.v1beta.AclConfig].

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • getAclConfig(GetAclConfigRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • getAclConfig(AclConfigName name) + *

  • getAclConfig(String name) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • getAclConfigCallable() + *

+ *
+ * + *

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 AclConfigServiceSettings to + * create(). For example: + * + *

To customize credentials: + * + *

{@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
+ * AclConfigServiceSettings aclConfigServiceSettings =
+ *     AclConfigServiceSettings.newBuilder()
+ *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ *         .build();
+ * AclConfigServiceClient aclConfigServiceClient =
+ *     AclConfigServiceClient.create(aclConfigServiceSettings);
+ * }
+ * + *

To customize the endpoint: + * + *

{@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
+ * AclConfigServiceSettings aclConfigServiceSettings =
+ *     AclConfigServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * AclConfigServiceClient aclConfigServiceClient =
+ *     AclConfigServiceClient.create(aclConfigServiceSettings);
+ * }
+ * + *

To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over + * the wire: + * + *

{@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
+ * AclConfigServiceSettings aclConfigServiceSettings =
+ *     AclConfigServiceSettings.newHttpJsonBuilder().build();
+ * AclConfigServiceClient aclConfigServiceClient =
+ *     AclConfigServiceClient.create(aclConfigServiceSettings);
+ * }
+ * + *

Please refer to the GitHub repository's samples for more quickstart code snippets. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class AclConfigServiceClient implements BackgroundResource { + private final AclConfigServiceSettings settings; + private final AclConfigServiceStub stub; + + /** Constructs an instance of AclConfigServiceClient with default settings. */ + public static final AclConfigServiceClient create() throws IOException { + return create(AclConfigServiceSettings.newBuilder().build()); + } + + /** + * Constructs an instance of AclConfigServiceClient, 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 AclConfigServiceClient create(AclConfigServiceSettings settings) + throws IOException { + return new AclConfigServiceClient(settings); + } + + /** + * Constructs an instance of AclConfigServiceClient, using the given stub for making calls. This + * is for advanced usage - prefer using create(AclConfigServiceSettings). + */ + public static final AclConfigServiceClient create(AclConfigServiceStub stub) { + return new AclConfigServiceClient(stub); + } + + /** + * Constructs an instance of AclConfigServiceClient, 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 AclConfigServiceClient(AclConfigServiceSettings settings) throws IOException { + this.settings = settings; + this.stub = ((AclConfigServiceStubSettings) settings.getStubSettings()).createStub(); + } + + protected AclConfigServiceClient(AclConfigServiceStub stub) { + this.settings = null; + this.stub = stub; + } + + public final AclConfigServiceSettings getSettings() { + return settings; + } + + public AclConfigServiceStub getStub() { + return stub; + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Default ACL configuration for use in a location of a customer's project. Updates will only + * reflect to new data stores. Existing data stores will still use the old value. + * + *

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 (AclConfigServiceClient aclConfigServiceClient = AclConfigServiceClient.create()) {
+   *   UpdateAclConfigRequest request =
+   *       UpdateAclConfigRequest.newBuilder().setAclConfig(AclConfig.newBuilder().build()).build();
+   *   AclConfig response = aclConfigServiceClient.updateAclConfig(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 AclConfig updateAclConfig(UpdateAclConfigRequest request) { + return updateAclConfigCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Default ACL configuration for use in a location of a customer's project. Updates will only + * reflect to new data stores. Existing data stores will still use the old value. + * + *

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 (AclConfigServiceClient aclConfigServiceClient = AclConfigServiceClient.create()) {
+   *   UpdateAclConfigRequest request =
+   *       UpdateAclConfigRequest.newBuilder().setAclConfig(AclConfig.newBuilder().build()).build();
+   *   ApiFuture future =
+   *       aclConfigServiceClient.updateAclConfigCallable().futureCall(request);
+   *   // Do something.
+   *   AclConfig response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable updateAclConfigCallable() { + return stub.updateAclConfigCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the [AclConfig][google.cloud.discoveryengine.v1beta.AclConfig]. + * + *

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 (AclConfigServiceClient aclConfigServiceClient = AclConfigServiceClient.create()) {
+   *   AclConfigName name = AclConfigName.of("[PROJECT]", "[LOCATION]");
+   *   AclConfig response = aclConfigServiceClient.getAclConfig(name);
+   * }
+   * }
+ * + * @param name Required. Resource name of + * [AclConfig][google.cloud.discoveryengine.v1beta.AclConfig], such as + * `projects/*/locations/*/aclConfig`. + *

If the caller does not have permission to access the + * [AclConfig][google.cloud.discoveryengine.v1beta.AclConfig], regardless of whether or not it + * exists, a PERMISSION_DENIED error is returned. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final AclConfig getAclConfig(AclConfigName name) { + GetAclConfigRequest request = + GetAclConfigRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getAclConfig(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the [AclConfig][google.cloud.discoveryengine.v1beta.AclConfig]. + * + *

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 (AclConfigServiceClient aclConfigServiceClient = AclConfigServiceClient.create()) {
+   *   String name = AclConfigName.of("[PROJECT]", "[LOCATION]").toString();
+   *   AclConfig response = aclConfigServiceClient.getAclConfig(name);
+   * }
+   * }
+ * + * @param name Required. Resource name of + * [AclConfig][google.cloud.discoveryengine.v1beta.AclConfig], such as + * `projects/*/locations/*/aclConfig`. + *

If the caller does not have permission to access the + * [AclConfig][google.cloud.discoveryengine.v1beta.AclConfig], regardless of whether or not it + * exists, a PERMISSION_DENIED error is returned. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final AclConfig getAclConfig(String name) { + GetAclConfigRequest request = GetAclConfigRequest.newBuilder().setName(name).build(); + return getAclConfig(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the [AclConfig][google.cloud.discoveryengine.v1beta.AclConfig]. + * + *

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 (AclConfigServiceClient aclConfigServiceClient = AclConfigServiceClient.create()) {
+   *   GetAclConfigRequest request =
+   *       GetAclConfigRequest.newBuilder()
+   *           .setName(AclConfigName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .build();
+   *   AclConfig response = aclConfigServiceClient.getAclConfig(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 AclConfig getAclConfig(GetAclConfigRequest request) { + return getAclConfigCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the [AclConfig][google.cloud.discoveryengine.v1beta.AclConfig]. + * + *

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 (AclConfigServiceClient aclConfigServiceClient = AclConfigServiceClient.create()) {
+   *   GetAclConfigRequest request =
+   *       GetAclConfigRequest.newBuilder()
+   *           .setName(AclConfigName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .build();
+   *   ApiFuture future =
+   *       aclConfigServiceClient.getAclConfigCallable().futureCall(request);
+   *   // Do something.
+   *   AclConfig response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getAclConfigCallable() { + return stub.getAclConfigCallable(); + } + + @Override + public final void close() { + stub.close(); + } + + @Override + public void shutdown() { + stub.shutdown(); + } + + @Override + public boolean isShutdown() { + return stub.isShutdown(); + } + + @Override + public boolean isTerminated() { + return stub.isTerminated(); + } + + @Override + public void shutdownNow() { + stub.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return stub.awaitTermination(duration, unit); + } +} diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/AclConfigServiceSettings.java b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/AclConfigServiceSettings.java new file mode 100644 index 000000000000..b0684c152127 --- /dev/null +++ b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/AclConfigServiceSettings.java @@ -0,0 +1,227 @@ +/* + * 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.discoveryengine.v1beta; + +import com.google.api.core.ApiFunction; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.cloud.discoveryengine.v1beta.stub.AclConfigServiceStubSettings; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link AclConfigServiceClient}. + * + *

The default instance has everything set to sensible defaults: + * + *

    + *
  • The default service address (discoveryengine.googleapis.com) and default port (443) are + * used. + *
  • Credentials are acquired automatically through Application Default Credentials. + *
  • Retries are configured for idempotent methods but not for non-idempotent methods. + *
+ * + *

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 updateAclConfig: + * + *

{@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
+ * AclConfigServiceSettings.Builder aclConfigServiceSettingsBuilder =
+ *     AclConfigServiceSettings.newBuilder();
+ * aclConfigServiceSettingsBuilder
+ *     .updateAclConfigSettings()
+ *     .setRetrySettings(
+ *         aclConfigServiceSettingsBuilder
+ *             .updateAclConfigSettings()
+ *             .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());
+ * AclConfigServiceSettings aclConfigServiceSettings = aclConfigServiceSettingsBuilder.build();
+ * }
+ * + * Please refer to the [Client Side Retry + * Guide](https://docs.cloud.google.com/java/docs/client-retries) for additional support in setting + * retries. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class AclConfigServiceSettings extends ClientSettings { + + /** Returns the object with the settings used for calls to updateAclConfig. */ + public UnaryCallSettings updateAclConfigSettings() { + return ((AclConfigServiceStubSettings) getStubSettings()).updateAclConfigSettings(); + } + + /** Returns the object with the settings used for calls to getAclConfig. */ + public UnaryCallSettings getAclConfigSettings() { + return ((AclConfigServiceStubSettings) getStubSettings()).getAclConfigSettings(); + } + + public static final AclConfigServiceSettings create(AclConfigServiceStubSettings stub) + throws IOException { + return new AclConfigServiceSettings.Builder(stub.toBuilder()).build(); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return AclConfigServiceStubSettings.defaultExecutorProviderBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return AclConfigServiceStubSettings.getDefaultEndpoint(); + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return AclConfigServiceStubSettings.getDefaultServiceScopes(); + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return AclConfigServiceStubSettings.defaultCredentialsProviderBuilder(); + } + + /** Returns a builder for the default gRPC ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return AclConfigServiceStubSettings.defaultGrpcTransportProviderBuilder(); + } + + /** Returns a builder for the default REST ChannelProvider for this service. */ + @BetaApi + public static InstantiatingHttpJsonChannelProvider.Builder + defaultHttpJsonTransportProviderBuilder() { + return AclConfigServiceStubSettings.defaultHttpJsonTransportProviderBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return AclConfigServiceStubSettings.defaultTransportChannelProvider(); + } + + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return AclConfigServiceStubSettings.defaultApiClientHeaderProviderBuilder(); + } + + /** Returns a new gRPC builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new REST builder for this class. */ + public static Builder newHttpJsonBuilder() { + return Builder.createHttpJsonDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected AclConfigServiceSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + } + + /** Builder for AclConfigServiceSettings. */ + public static class Builder extends ClientSettings.Builder { + + protected Builder() throws IOException { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(AclConfigServiceStubSettings.newBuilder(clientContext)); + } + + protected Builder(AclConfigServiceSettings settings) { + super(settings.getStubSettings().toBuilder()); + } + + protected Builder(AclConfigServiceStubSettings.Builder stubSettings) { + super(stubSettings); + } + + private static Builder createDefault() { + return new Builder(AclConfigServiceStubSettings.newBuilder()); + } + + private static Builder createHttpJsonDefault() { + return new Builder(AclConfigServiceStubSettings.newHttpJsonBuilder()); + } + + public AclConfigServiceStubSettings.Builder getStubSettingsBuilder() { + return ((AclConfigServiceStubSettings.Builder) getStubSettings()); + } + + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) { + super.applyToAllUnaryMethods( + getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); + return this; + } + + /** Returns the builder for the settings used for calls to updateAclConfig. */ + public UnaryCallSettings.Builder updateAclConfigSettings() { + return getStubSettingsBuilder().updateAclConfigSettings(); + } + + /** Returns the builder for the settings used for calls to getAclConfig. */ + public UnaryCallSettings.Builder getAclConfigSettings() { + return getStubSettingsBuilder().getAclConfigSettings(); + } + + @Override + public AclConfigServiceSettings build() throws IOException { + return new AclConfigServiceSettings(this); + } + } +} diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/AssistantServiceClient.java b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/AssistantServiceClient.java new file mode 100644 index 000000000000..013b04e4cdcc --- /dev/null +++ b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/AssistantServiceClient.java @@ -0,0 +1,1020 @@ +/* + * 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.discoveryengine.v1beta; + +import com.google.api.core.ApiFuture; +import com.google.api.core.ApiFutures; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.paging.AbstractFixedSizeCollection; +import com.google.api.gax.paging.AbstractPage; +import com.google.api.gax.paging.AbstractPagedListResponse; +import com.google.api.gax.rpc.PageContext; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.discoveryengine.v1beta.stub.AssistantServiceStub; +import com.google.cloud.discoveryengine.v1beta.stub.AssistantServiceStubSettings; +import com.google.common.util.concurrent.MoreExecutors; +import com.google.protobuf.Empty; +import com.google.protobuf.FieldMask; +import java.io.IOException; +import java.util.List; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Service Description: Service for managing Assistant configuration and assisting users. + * + *

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: + * + *

{@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 (AssistantServiceClient assistantServiceClient = AssistantServiceClient.create()) {
+ *   CreateAssistantRequest request =
+ *       CreateAssistantRequest.newBuilder()
+ *           .setParent(
+ *               EngineName.of("[PROJECT]", "[LOCATION]", "[COLLECTION]", "[ENGINE]").toString())
+ *           .setAssistant(Assistant.newBuilder().build())
+ *           .setAssistantId("assistantId-324518759")
+ *           .build();
+ *   Assistant response = assistantServiceClient.createAssistant(request);
+ * }
+ * }
+ * + *

Note: close() needs to be called on the AssistantServiceClient object to clean up resources + * such as threads. In the example above, try-with-resources is used, which automatically calls + * close(). + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
Methods
MethodDescriptionMethod Variants

StreamAssist

Assists the user with a query in a streaming fashion.

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • streamAssistCallable() + *

+ *

CreateAssistant

Creates an [Assistant][google.cloud.discoveryengine.v1beta.Assistant].

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • createAssistant(CreateAssistantRequest request) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • createAssistantCallable() + *

+ *

DeleteAssistant

Deletes an [Assistant][google.cloud.discoveryengine.v1beta.Assistant].

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • deleteAssistant(DeleteAssistantRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • deleteAssistant(AssistantName name) + *

  • deleteAssistant(String name) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • deleteAssistantCallable() + *

+ *

UpdateAssistant

Updates an [Assistant][google.cloud.discoveryengine.v1beta.Assistant]

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • updateAssistant(UpdateAssistantRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • updateAssistant(Assistant assistant, FieldMask updateMask) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • updateAssistantCallable() + *

+ *

GetAssistant

Gets an [Assistant][google.cloud.discoveryengine.v1beta.Assistant].

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • getAssistant(GetAssistantRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • getAssistant(AssistantName name) + *

  • getAssistant(String name) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • getAssistantCallable() + *

+ *

ListAssistants

Lists all [Assistant][google.cloud.discoveryengine.v1beta.Assistant]s under an [Engine][google.cloud.discoveryengine.v1beta.Engine].

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • listAssistants(ListAssistantsRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • listAssistants(EngineName parent) + *

  • listAssistants(String parent) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • listAssistantsPagedCallable() + *

  • listAssistantsCallable() + *

+ *
+ * + *

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 AssistantServiceSettings to + * create(). For example: + * + *

To customize credentials: + * + *

{@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
+ * AssistantServiceSettings assistantServiceSettings =
+ *     AssistantServiceSettings.newBuilder()
+ *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ *         .build();
+ * AssistantServiceClient assistantServiceClient =
+ *     AssistantServiceClient.create(assistantServiceSettings);
+ * }
+ * + *

To customize the endpoint: + * + *

{@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
+ * AssistantServiceSettings assistantServiceSettings =
+ *     AssistantServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * AssistantServiceClient assistantServiceClient =
+ *     AssistantServiceClient.create(assistantServiceSettings);
+ * }
+ * + *

To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over + * the wire: + * + *

{@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
+ * AssistantServiceSettings assistantServiceSettings =
+ *     AssistantServiceSettings.newHttpJsonBuilder().build();
+ * AssistantServiceClient assistantServiceClient =
+ *     AssistantServiceClient.create(assistantServiceSettings);
+ * }
+ * + *

Please refer to the GitHub repository's samples for more quickstart code snippets. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class AssistantServiceClient implements BackgroundResource { + private final AssistantServiceSettings settings; + private final AssistantServiceStub stub; + + /** Constructs an instance of AssistantServiceClient with default settings. */ + public static final AssistantServiceClient create() throws IOException { + return create(AssistantServiceSettings.newBuilder().build()); + } + + /** + * Constructs an instance of AssistantServiceClient, 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 AssistantServiceClient create(AssistantServiceSettings settings) + throws IOException { + return new AssistantServiceClient(settings); + } + + /** + * Constructs an instance of AssistantServiceClient, using the given stub for making calls. This + * is for advanced usage - prefer using create(AssistantServiceSettings). + */ + public static final AssistantServiceClient create(AssistantServiceStub stub) { + return new AssistantServiceClient(stub); + } + + /** + * Constructs an instance of AssistantServiceClient, 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 AssistantServiceClient(AssistantServiceSettings settings) throws IOException { + this.settings = settings; + this.stub = ((AssistantServiceStubSettings) settings.getStubSettings()).createStub(); + } + + protected AssistantServiceClient(AssistantServiceStub stub) { + this.settings = null; + this.stub = stub; + } + + public final AssistantServiceSettings getSettings() { + return settings; + } + + public AssistantServiceStub getStub() { + return stub; + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Assists the user with a query in a streaming fashion. + * + *

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 (AssistantServiceClient assistantServiceClient = AssistantServiceClient.create()) {
+   *   StreamAssistRequest request =
+   *       StreamAssistRequest.newBuilder()
+   *           .setName(
+   *               AssistantName.of(
+   *                       "[PROJECT]", "[LOCATION]", "[COLLECTION]", "[ENGINE]", "[ASSISTANT]")
+   *                   .toString())
+   *           .setQuery(Query.newBuilder().build())
+   *           .setSession(
+   *               SessionName.ofProjectLocationDataStoreSessionName(
+   *                       "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[SESSION]")
+   *                   .toString())
+   *           .setUserMetadata(AssistUserMetadata.newBuilder().build())
+   *           .setToolsSpec(StreamAssistRequest.ToolsSpec.newBuilder().build())
+   *           .setGenerationSpec(StreamAssistRequest.GenerationSpec.newBuilder().build())
+   *           .build();
+   *   ServerStream stream =
+   *       assistantServiceClient.streamAssistCallable().call(request);
+   *   for (StreamAssistResponse response : stream) {
+   *     // Do something when a response is received.
+   *   }
+   * }
+   * }
+ */ + public final ServerStreamingCallable + streamAssistCallable() { + return stub.streamAssistCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates an [Assistant][google.cloud.discoveryengine.v1beta.Assistant]. + * + *

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 (AssistantServiceClient assistantServiceClient = AssistantServiceClient.create()) {
+   *   CreateAssistantRequest request =
+   *       CreateAssistantRequest.newBuilder()
+   *           .setParent(
+   *               EngineName.of("[PROJECT]", "[LOCATION]", "[COLLECTION]", "[ENGINE]").toString())
+   *           .setAssistant(Assistant.newBuilder().build())
+   *           .setAssistantId("assistantId-324518759")
+   *           .build();
+   *   Assistant response = assistantServiceClient.createAssistant(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 Assistant createAssistant(CreateAssistantRequest request) { + return createAssistantCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates an [Assistant][google.cloud.discoveryengine.v1beta.Assistant]. + * + *

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 (AssistantServiceClient assistantServiceClient = AssistantServiceClient.create()) {
+   *   CreateAssistantRequest request =
+   *       CreateAssistantRequest.newBuilder()
+   *           .setParent(
+   *               EngineName.of("[PROJECT]", "[LOCATION]", "[COLLECTION]", "[ENGINE]").toString())
+   *           .setAssistant(Assistant.newBuilder().build())
+   *           .setAssistantId("assistantId-324518759")
+   *           .build();
+   *   ApiFuture future =
+   *       assistantServiceClient.createAssistantCallable().futureCall(request);
+   *   // Do something.
+   *   Assistant response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable createAssistantCallable() { + return stub.createAssistantCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes an [Assistant][google.cloud.discoveryengine.v1beta.Assistant]. + * + *

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 (AssistantServiceClient assistantServiceClient = AssistantServiceClient.create()) {
+   *   AssistantName name =
+   *       AssistantName.of("[PROJECT]", "[LOCATION]", "[COLLECTION]", "[ENGINE]", "[ASSISTANT]");
+   *   assistantServiceClient.deleteAssistant(name);
+   * }
+   * }
+ * + * @param name Required. Resource name of + * [Assistant][google.cloud.discoveryengine.v1beta.Assistant]. Format: + * `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/assistants/{assistant}` + *

If the caller does not have permission to delete the + * [Assistant][google.cloud.discoveryengine.v1beta.Assistant], regardless of whether or not it + * exists, a PERMISSION_DENIED error is returned. + *

If the [Assistant][google.cloud.discoveryengine.v1beta.Assistant] to delete does not + * exist, a NOT_FOUND error is returned. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteAssistant(AssistantName name) { + DeleteAssistantRequest request = + DeleteAssistantRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + deleteAssistant(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes an [Assistant][google.cloud.discoveryengine.v1beta.Assistant]. + * + *

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 (AssistantServiceClient assistantServiceClient = AssistantServiceClient.create()) {
+   *   String name =
+   *       AssistantName.of("[PROJECT]", "[LOCATION]", "[COLLECTION]", "[ENGINE]", "[ASSISTANT]")
+   *           .toString();
+   *   assistantServiceClient.deleteAssistant(name);
+   * }
+   * }
+ * + * @param name Required. Resource name of + * [Assistant][google.cloud.discoveryengine.v1beta.Assistant]. Format: + * `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/assistants/{assistant}` + *

If the caller does not have permission to delete the + * [Assistant][google.cloud.discoveryengine.v1beta.Assistant], regardless of whether or not it + * exists, a PERMISSION_DENIED error is returned. + *

If the [Assistant][google.cloud.discoveryengine.v1beta.Assistant] to delete does not + * exist, a NOT_FOUND error is returned. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteAssistant(String name) { + DeleteAssistantRequest request = DeleteAssistantRequest.newBuilder().setName(name).build(); + deleteAssistant(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes an [Assistant][google.cloud.discoveryengine.v1beta.Assistant]. + * + *

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 (AssistantServiceClient assistantServiceClient = AssistantServiceClient.create()) {
+   *   DeleteAssistantRequest request =
+   *       DeleteAssistantRequest.newBuilder()
+   *           .setName(
+   *               AssistantName.of(
+   *                       "[PROJECT]", "[LOCATION]", "[COLLECTION]", "[ENGINE]", "[ASSISTANT]")
+   *                   .toString())
+   *           .build();
+   *   assistantServiceClient.deleteAssistant(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 void deleteAssistant(DeleteAssistantRequest request) { + deleteAssistantCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes an [Assistant][google.cloud.discoveryengine.v1beta.Assistant]. + * + *

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 (AssistantServiceClient assistantServiceClient = AssistantServiceClient.create()) {
+   *   DeleteAssistantRequest request =
+   *       DeleteAssistantRequest.newBuilder()
+   *           .setName(
+   *               AssistantName.of(
+   *                       "[PROJECT]", "[LOCATION]", "[COLLECTION]", "[ENGINE]", "[ASSISTANT]")
+   *                   .toString())
+   *           .build();
+   *   ApiFuture future =
+   *       assistantServiceClient.deleteAssistantCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable deleteAssistantCallable() { + return stub.deleteAssistantCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates an [Assistant][google.cloud.discoveryengine.v1beta.Assistant] + * + *

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 (AssistantServiceClient assistantServiceClient = AssistantServiceClient.create()) {
+   *   Assistant assistant = Assistant.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   Assistant response = assistantServiceClient.updateAssistant(assistant, updateMask);
+   * }
+   * }
+ * + * @param assistant Required. The [Assistant][google.cloud.discoveryengine.v1beta.Assistant] to + * update. + *

The [Assistant][google.cloud.discoveryengine.v1beta.Assistant]'s `name` field is used to + * identify the [Assistant][google.cloud.discoveryengine.v1beta.Assistant] to update. Format: + * `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/assistants/{assistant}` + *

If the caller does not have permission to update the + * [Assistant][google.cloud.discoveryengine.v1beta.Assistant], regardless of whether or not it + * exists, a PERMISSION_DENIED error is returned. + *

If the [Assistant][google.cloud.discoveryengine.v1beta.Assistant] to update does not + * exist, a NOT_FOUND error is returned. + * @param updateMask The list of fields to update. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Assistant updateAssistant(Assistant assistant, FieldMask updateMask) { + UpdateAssistantRequest request = + UpdateAssistantRequest.newBuilder() + .setAssistant(assistant) + .setUpdateMask(updateMask) + .build(); + return updateAssistant(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates an [Assistant][google.cloud.discoveryengine.v1beta.Assistant] + * + *

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 (AssistantServiceClient assistantServiceClient = AssistantServiceClient.create()) {
+   *   UpdateAssistantRequest request =
+   *       UpdateAssistantRequest.newBuilder()
+   *           .setAssistant(Assistant.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   Assistant response = assistantServiceClient.updateAssistant(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 Assistant updateAssistant(UpdateAssistantRequest request) { + return updateAssistantCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates an [Assistant][google.cloud.discoveryengine.v1beta.Assistant] + * + *

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 (AssistantServiceClient assistantServiceClient = AssistantServiceClient.create()) {
+   *   UpdateAssistantRequest request =
+   *       UpdateAssistantRequest.newBuilder()
+   *           .setAssistant(Assistant.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       assistantServiceClient.updateAssistantCallable().futureCall(request);
+   *   // Do something.
+   *   Assistant response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable updateAssistantCallable() { + return stub.updateAssistantCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets an [Assistant][google.cloud.discoveryengine.v1beta.Assistant]. + * + *

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 (AssistantServiceClient assistantServiceClient = AssistantServiceClient.create()) {
+   *   AssistantName name =
+   *       AssistantName.of("[PROJECT]", "[LOCATION]", "[COLLECTION]", "[ENGINE]", "[ASSISTANT]");
+   *   Assistant response = assistantServiceClient.getAssistant(name);
+   * }
+   * }
+ * + * @param name Required. Resource name of + * [Assistant][google.cloud.discoveryengine.v1beta.Assistant]. Format: + * `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/assistants/{assistant}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Assistant getAssistant(AssistantName name) { + GetAssistantRequest request = + GetAssistantRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getAssistant(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets an [Assistant][google.cloud.discoveryengine.v1beta.Assistant]. + * + *

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 (AssistantServiceClient assistantServiceClient = AssistantServiceClient.create()) {
+   *   String name =
+   *       AssistantName.of("[PROJECT]", "[LOCATION]", "[COLLECTION]", "[ENGINE]", "[ASSISTANT]")
+   *           .toString();
+   *   Assistant response = assistantServiceClient.getAssistant(name);
+   * }
+   * }
+ * + * @param name Required. Resource name of + * [Assistant][google.cloud.discoveryengine.v1beta.Assistant]. Format: + * `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/assistants/{assistant}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Assistant getAssistant(String name) { + GetAssistantRequest request = GetAssistantRequest.newBuilder().setName(name).build(); + return getAssistant(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets an [Assistant][google.cloud.discoveryengine.v1beta.Assistant]. + * + *

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 (AssistantServiceClient assistantServiceClient = AssistantServiceClient.create()) {
+   *   GetAssistantRequest request =
+   *       GetAssistantRequest.newBuilder()
+   *           .setName(
+   *               AssistantName.of(
+   *                       "[PROJECT]", "[LOCATION]", "[COLLECTION]", "[ENGINE]", "[ASSISTANT]")
+   *                   .toString())
+   *           .build();
+   *   Assistant response = assistantServiceClient.getAssistant(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 Assistant getAssistant(GetAssistantRequest request) { + return getAssistantCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets an [Assistant][google.cloud.discoveryengine.v1beta.Assistant]. + * + *

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 (AssistantServiceClient assistantServiceClient = AssistantServiceClient.create()) {
+   *   GetAssistantRequest request =
+   *       GetAssistantRequest.newBuilder()
+   *           .setName(
+   *               AssistantName.of(
+   *                       "[PROJECT]", "[LOCATION]", "[COLLECTION]", "[ENGINE]", "[ASSISTANT]")
+   *                   .toString())
+   *           .build();
+   *   ApiFuture future =
+   *       assistantServiceClient.getAssistantCallable().futureCall(request);
+   *   // Do something.
+   *   Assistant response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getAssistantCallable() { + return stub.getAssistantCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all [Assistant][google.cloud.discoveryengine.v1beta.Assistant]s under an + * [Engine][google.cloud.discoveryengine.v1beta.Engine]. + * + *

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 (AssistantServiceClient assistantServiceClient = AssistantServiceClient.create()) {
+   *   EngineName parent = EngineName.of("[PROJECT]", "[LOCATION]", "[COLLECTION]", "[ENGINE]");
+   *   for (Assistant element : assistantServiceClient.listAssistants(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The parent resource name. Format: + * `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListAssistantsPagedResponse listAssistants(EngineName parent) { + ListAssistantsRequest request = + ListAssistantsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listAssistants(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all [Assistant][google.cloud.discoveryengine.v1beta.Assistant]s under an + * [Engine][google.cloud.discoveryengine.v1beta.Engine]. + * + *

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 (AssistantServiceClient assistantServiceClient = AssistantServiceClient.create()) {
+   *   String parent =
+   *       EngineName.of("[PROJECT]", "[LOCATION]", "[COLLECTION]", "[ENGINE]").toString();
+   *   for (Assistant element : assistantServiceClient.listAssistants(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The parent resource name. Format: + * `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListAssistantsPagedResponse listAssistants(String parent) { + ListAssistantsRequest request = ListAssistantsRequest.newBuilder().setParent(parent).build(); + return listAssistants(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all [Assistant][google.cloud.discoveryengine.v1beta.Assistant]s under an + * [Engine][google.cloud.discoveryengine.v1beta.Engine]. + * + *

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 (AssistantServiceClient assistantServiceClient = AssistantServiceClient.create()) {
+   *   ListAssistantsRequest request =
+   *       ListAssistantsRequest.newBuilder()
+   *           .setParent(
+   *               EngineName.of("[PROJECT]", "[LOCATION]", "[COLLECTION]", "[ENGINE]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (Assistant element : assistantServiceClient.listAssistants(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 ListAssistantsPagedResponse listAssistants(ListAssistantsRequest request) { + return listAssistantsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all [Assistant][google.cloud.discoveryengine.v1beta.Assistant]s under an + * [Engine][google.cloud.discoveryengine.v1beta.Engine]. + * + *

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 (AssistantServiceClient assistantServiceClient = AssistantServiceClient.create()) {
+   *   ListAssistantsRequest request =
+   *       ListAssistantsRequest.newBuilder()
+   *           .setParent(
+   *               EngineName.of("[PROJECT]", "[LOCATION]", "[COLLECTION]", "[ENGINE]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future =
+   *       assistantServiceClient.listAssistantsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (Assistant element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listAssistantsPagedCallable() { + return stub.listAssistantsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all [Assistant][google.cloud.discoveryengine.v1beta.Assistant]s under an + * [Engine][google.cloud.discoveryengine.v1beta.Engine]. + * + *

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 (AssistantServiceClient assistantServiceClient = AssistantServiceClient.create()) {
+   *   ListAssistantsRequest request =
+   *       ListAssistantsRequest.newBuilder()
+   *           .setParent(
+   *               EngineName.of("[PROJECT]", "[LOCATION]", "[COLLECTION]", "[ENGINE]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   while (true) {
+   *     ListAssistantsResponse response =
+   *         assistantServiceClient.listAssistantsCallable().call(request);
+   *     for (Assistant element : response.getAssistantsList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listAssistantsCallable() { + return stub.listAssistantsCallable(); + } + + @Override + public final void close() { + stub.close(); + } + + @Override + public void shutdown() { + stub.shutdown(); + } + + @Override + public boolean isShutdown() { + return stub.isShutdown(); + } + + @Override + public boolean isTerminated() { + return stub.isTerminated(); + } + + @Override + public void shutdownNow() { + stub.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return stub.awaitTermination(duration, unit); + } + + public static class ListAssistantsPagedResponse + extends AbstractPagedListResponse< + ListAssistantsRequest, + ListAssistantsResponse, + Assistant, + ListAssistantsPage, + ListAssistantsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListAssistantsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListAssistantsPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListAssistantsPagedResponse(ListAssistantsPage page) { + super(page, ListAssistantsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListAssistantsPage + extends AbstractPage< + ListAssistantsRequest, ListAssistantsResponse, Assistant, ListAssistantsPage> { + + private ListAssistantsPage( + PageContext context, + ListAssistantsResponse response) { + super(context, response); + } + + private static ListAssistantsPage createEmptyPage() { + return new ListAssistantsPage(null, null); + } + + @Override + protected ListAssistantsPage createPage( + PageContext context, + ListAssistantsResponse response) { + return new ListAssistantsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListAssistantsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListAssistantsRequest, + ListAssistantsResponse, + Assistant, + ListAssistantsPage, + ListAssistantsFixedSizeCollection> { + + private ListAssistantsFixedSizeCollection(List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListAssistantsFixedSizeCollection createEmptyCollection() { + return new ListAssistantsFixedSizeCollection(null, 0); + } + + @Override + protected ListAssistantsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListAssistantsFixedSizeCollection(pages, collectionSize); + } + } +} diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/AssistantServiceSettings.java b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/AssistantServiceSettings.java new file mode 100644 index 000000000000..4d310fdc2b11 --- /dev/null +++ b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/AssistantServiceSettings.java @@ -0,0 +1,278 @@ +/* + * 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.discoveryengine.v1beta; + +import static com.google.cloud.discoveryengine.v1beta.AssistantServiceClient.ListAssistantsPagedResponse; + +import com.google.api.core.ApiFunction; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientSettings; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.cloud.discoveryengine.v1beta.stub.AssistantServiceStubSettings; +import com.google.protobuf.Empty; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link AssistantServiceClient}. + * + *

The default instance has everything set to sensible defaults: + * + *

    + *
  • The default service address (discoveryengine.googleapis.com) and default port (443) are + * used. + *
  • Credentials are acquired automatically through Application Default Credentials. + *
  • Retries are configured for idempotent methods but not for non-idempotent methods. + *
+ * + *

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 createAssistant: + * + *

{@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
+ * AssistantServiceSettings.Builder assistantServiceSettingsBuilder =
+ *     AssistantServiceSettings.newBuilder();
+ * assistantServiceSettingsBuilder
+ *     .createAssistantSettings()
+ *     .setRetrySettings(
+ *         assistantServiceSettingsBuilder
+ *             .createAssistantSettings()
+ *             .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());
+ * AssistantServiceSettings assistantServiceSettings = assistantServiceSettingsBuilder.build();
+ * }
+ * + * Please refer to the [Client Side Retry + * Guide](https://docs.cloud.google.com/java/docs/client-retries) for additional support in setting + * retries. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class AssistantServiceSettings extends ClientSettings { + + /** Returns the object with the settings used for calls to streamAssist. */ + public ServerStreamingCallSettings + streamAssistSettings() { + return ((AssistantServiceStubSettings) getStubSettings()).streamAssistSettings(); + } + + /** Returns the object with the settings used for calls to createAssistant. */ + public UnaryCallSettings createAssistantSettings() { + return ((AssistantServiceStubSettings) getStubSettings()).createAssistantSettings(); + } + + /** Returns the object with the settings used for calls to deleteAssistant. */ + public UnaryCallSettings deleteAssistantSettings() { + return ((AssistantServiceStubSettings) getStubSettings()).deleteAssistantSettings(); + } + + /** Returns the object with the settings used for calls to updateAssistant. */ + public UnaryCallSettings updateAssistantSettings() { + return ((AssistantServiceStubSettings) getStubSettings()).updateAssistantSettings(); + } + + /** Returns the object with the settings used for calls to getAssistant. */ + public UnaryCallSettings getAssistantSettings() { + return ((AssistantServiceStubSettings) getStubSettings()).getAssistantSettings(); + } + + /** Returns the object with the settings used for calls to listAssistants. */ + public PagedCallSettings< + ListAssistantsRequest, ListAssistantsResponse, ListAssistantsPagedResponse> + listAssistantsSettings() { + return ((AssistantServiceStubSettings) getStubSettings()).listAssistantsSettings(); + } + + public static final AssistantServiceSettings create(AssistantServiceStubSettings stub) + throws IOException { + return new AssistantServiceSettings.Builder(stub.toBuilder()).build(); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return AssistantServiceStubSettings.defaultExecutorProviderBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return AssistantServiceStubSettings.getDefaultEndpoint(); + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return AssistantServiceStubSettings.getDefaultServiceScopes(); + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return AssistantServiceStubSettings.defaultCredentialsProviderBuilder(); + } + + /** Returns a builder for the default gRPC ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return AssistantServiceStubSettings.defaultGrpcTransportProviderBuilder(); + } + + /** Returns a builder for the default REST ChannelProvider for this service. */ + @BetaApi + public static InstantiatingHttpJsonChannelProvider.Builder + defaultHttpJsonTransportProviderBuilder() { + return AssistantServiceStubSettings.defaultHttpJsonTransportProviderBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return AssistantServiceStubSettings.defaultTransportChannelProvider(); + } + + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return AssistantServiceStubSettings.defaultApiClientHeaderProviderBuilder(); + } + + /** Returns a new gRPC builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new REST builder for this class. */ + public static Builder newHttpJsonBuilder() { + return Builder.createHttpJsonDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected AssistantServiceSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + } + + /** Builder for AssistantServiceSettings. */ + public static class Builder extends ClientSettings.Builder { + + protected Builder() throws IOException { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(AssistantServiceStubSettings.newBuilder(clientContext)); + } + + protected Builder(AssistantServiceSettings settings) { + super(settings.getStubSettings().toBuilder()); + } + + protected Builder(AssistantServiceStubSettings.Builder stubSettings) { + super(stubSettings); + } + + private static Builder createDefault() { + return new Builder(AssistantServiceStubSettings.newBuilder()); + } + + private static Builder createHttpJsonDefault() { + return new Builder(AssistantServiceStubSettings.newHttpJsonBuilder()); + } + + public AssistantServiceStubSettings.Builder getStubSettingsBuilder() { + return ((AssistantServiceStubSettings.Builder) getStubSettings()); + } + + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) { + super.applyToAllUnaryMethods( + getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); + return this; + } + + /** Returns the builder for the settings used for calls to streamAssist. */ + public ServerStreamingCallSettings.Builder + streamAssistSettings() { + return getStubSettingsBuilder().streamAssistSettings(); + } + + /** Returns the builder for the settings used for calls to createAssistant. */ + public UnaryCallSettings.Builder createAssistantSettings() { + return getStubSettingsBuilder().createAssistantSettings(); + } + + /** Returns the builder for the settings used for calls to deleteAssistant. */ + public UnaryCallSettings.Builder deleteAssistantSettings() { + return getStubSettingsBuilder().deleteAssistantSettings(); + } + + /** Returns the builder for the settings used for calls to updateAssistant. */ + public UnaryCallSettings.Builder updateAssistantSettings() { + return getStubSettingsBuilder().updateAssistantSettings(); + } + + /** Returns the builder for the settings used for calls to getAssistant. */ + public UnaryCallSettings.Builder getAssistantSettings() { + return getStubSettingsBuilder().getAssistantSettings(); + } + + /** Returns the builder for the settings used for calls to listAssistants. */ + public PagedCallSettings.Builder< + ListAssistantsRequest, ListAssistantsResponse, ListAssistantsPagedResponse> + listAssistantsSettings() { + return getStubSettingsBuilder().listAssistantsSettings(); + } + + @Override + public AssistantServiceSettings build() throws IOException { + return new AssistantServiceSettings(this); + } + } +} diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/CmekConfigServiceClient.java b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/CmekConfigServiceClient.java new file mode 100644 index 000000000000..c0237896cd4e --- /dev/null +++ b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/CmekConfigServiceClient.java @@ -0,0 +1,824 @@ +/* + * 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.discoveryengine.v1beta; + +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.httpjson.longrunning.OperationsClient; +import com.google.api.gax.longrunning.OperationFuture; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.discoveryengine.v1beta.stub.CmekConfigServiceStub; +import com.google.cloud.discoveryengine.v1beta.stub.CmekConfigServiceStubSettings; +import com.google.longrunning.Operation; +import com.google.protobuf.Empty; +import java.io.IOException; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Service Description: Service for managing CMEK related tasks + * + *

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: + * + *

{@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 (CmekConfigServiceClient cmekConfigServiceClient = CmekConfigServiceClient.create()) {
+ *   CmekConfigName name = CmekConfigName.ofProjectLocationName("[PROJECT]", "[LOCATION]");
+ *   CmekConfig response = cmekConfigServiceClient.getCmekConfig(name);
+ * }
+ * }
+ * + *

Note: close() needs to be called on the CmekConfigServiceClient object to clean up resources + * such as threads. In the example above, try-with-resources is used, which automatically calls + * close(). + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
Methods
MethodDescriptionMethod Variants

UpdateCmekConfig

Provisions a CMEK key for use in a location of a customer's project. This method will also conduct location validation on the provided cmekConfig to make sure the key is valid and can be used in the selected location.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • updateCmekConfigAsync(UpdateCmekConfigRequest request) + *

+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • updateCmekConfigAsync(CmekConfig config) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • updateCmekConfigOperationCallable() + *

  • updateCmekConfigCallable() + *

+ *

GetCmekConfig

Gets the [CmekConfig][google.cloud.discoveryengine.v1beta.CmekConfig].

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • getCmekConfig(GetCmekConfigRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • getCmekConfig(CmekConfigName name) + *

  • getCmekConfig(String name) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • getCmekConfigCallable() + *

+ *

ListCmekConfigs

Lists all the [CmekConfig][google.cloud.discoveryengine.v1beta.CmekConfig]s with the project.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • listCmekConfigs(ListCmekConfigsRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • listCmekConfigs(LocationName parent) + *

  • listCmekConfigs(String parent) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • listCmekConfigsCallable() + *

+ *

DeleteCmekConfig

De-provisions a CmekConfig.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • deleteCmekConfigAsync(DeleteCmekConfigRequest request) + *

+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • deleteCmekConfigAsync(CmekConfigName name) + *

  • deleteCmekConfigAsync(String name) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • deleteCmekConfigOperationCallable() + *

  • deleteCmekConfigCallable() + *

+ *
+ * + *

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 CmekConfigServiceSettings to + * create(). For example: + * + *

To customize credentials: + * + *

{@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
+ * CmekConfigServiceSettings cmekConfigServiceSettings =
+ *     CmekConfigServiceSettings.newBuilder()
+ *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ *         .build();
+ * CmekConfigServiceClient cmekConfigServiceClient =
+ *     CmekConfigServiceClient.create(cmekConfigServiceSettings);
+ * }
+ * + *

To customize the endpoint: + * + *

{@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
+ * CmekConfigServiceSettings cmekConfigServiceSettings =
+ *     CmekConfigServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * CmekConfigServiceClient cmekConfigServiceClient =
+ *     CmekConfigServiceClient.create(cmekConfigServiceSettings);
+ * }
+ * + *

To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over + * the wire: + * + *

{@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
+ * CmekConfigServiceSettings cmekConfigServiceSettings =
+ *     CmekConfigServiceSettings.newHttpJsonBuilder().build();
+ * CmekConfigServiceClient cmekConfigServiceClient =
+ *     CmekConfigServiceClient.create(cmekConfigServiceSettings);
+ * }
+ * + *

Please refer to the GitHub repository's samples for more quickstart code snippets. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class CmekConfigServiceClient implements BackgroundResource { + private final CmekConfigServiceSettings settings; + private final CmekConfigServiceStub stub; + private final OperationsClient httpJsonOperationsClient; + private final com.google.longrunning.OperationsClient operationsClient; + + /** Constructs an instance of CmekConfigServiceClient with default settings. */ + public static final CmekConfigServiceClient create() throws IOException { + return create(CmekConfigServiceSettings.newBuilder().build()); + } + + /** + * Constructs an instance of CmekConfigServiceClient, 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 CmekConfigServiceClient create(CmekConfigServiceSettings settings) + throws IOException { + return new CmekConfigServiceClient(settings); + } + + /** + * Constructs an instance of CmekConfigServiceClient, using the given stub for making calls. This + * is for advanced usage - prefer using create(CmekConfigServiceSettings). + */ + public static final CmekConfigServiceClient create(CmekConfigServiceStub stub) { + return new CmekConfigServiceClient(stub); + } + + /** + * Constructs an instance of CmekConfigServiceClient, 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 CmekConfigServiceClient(CmekConfigServiceSettings settings) throws IOException { + this.settings = settings; + this.stub = ((CmekConfigServiceStubSettings) settings.getStubSettings()).createStub(); + this.operationsClient = + com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub()); + this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub()); + } + + protected CmekConfigServiceClient(CmekConfigServiceStub stub) { + this.settings = null; + this.stub = stub; + this.operationsClient = + com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub()); + this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub()); + } + + public final CmekConfigServiceSettings getSettings() { + return settings; + } + + public CmekConfigServiceStub getStub() { + return stub; + } + + /** + * Returns the OperationsClient that can be used to query the status of a long-running operation + * returned by another API method call. + */ + public final com.google.longrunning.OperationsClient getOperationsClient() { + return operationsClient; + } + + /** + * Returns the OperationsClient that can be used to query the status of a long-running operation + * returned by another API method call. + */ + @BetaApi + public final OperationsClient getHttpJsonOperationsClient() { + return httpJsonOperationsClient; + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Provisions a CMEK key for use in a location of a customer's project. This method will also + * conduct location validation on the provided cmekConfig to make sure the key is valid and can be + * used in the selected location. + * + *

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 (CmekConfigServiceClient cmekConfigServiceClient = CmekConfigServiceClient.create()) {
+   *   CmekConfig config = CmekConfig.newBuilder().build();
+   *   CmekConfig response = cmekConfigServiceClient.updateCmekConfigAsync(config).get();
+   * }
+   * }
+ * + * @param config Required. The CmekConfig resource. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture updateCmekConfigAsync( + CmekConfig config) { + UpdateCmekConfigRequest request = + UpdateCmekConfigRequest.newBuilder().setConfig(config).build(); + return updateCmekConfigAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Provisions a CMEK key for use in a location of a customer's project. This method will also + * conduct location validation on the provided cmekConfig to make sure the key is valid and can be + * used in the selected location. + * + *

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 (CmekConfigServiceClient cmekConfigServiceClient = CmekConfigServiceClient.create()) {
+   *   UpdateCmekConfigRequest request =
+   *       UpdateCmekConfigRequest.newBuilder()
+   *           .setConfig(CmekConfig.newBuilder().build())
+   *           .setSetDefault(true)
+   *           .build();
+   *   CmekConfig response = cmekConfigServiceClient.updateCmekConfigAsync(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 updateCmekConfigAsync( + UpdateCmekConfigRequest request) { + return updateCmekConfigOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Provisions a CMEK key for use in a location of a customer's project. This method will also + * conduct location validation on the provided cmekConfig to make sure the key is valid and can be + * used in the selected location. + * + *

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 (CmekConfigServiceClient cmekConfigServiceClient = CmekConfigServiceClient.create()) {
+   *   UpdateCmekConfigRequest request =
+   *       UpdateCmekConfigRequest.newBuilder()
+   *           .setConfig(CmekConfig.newBuilder().build())
+   *           .setSetDefault(true)
+   *           .build();
+   *   OperationFuture future =
+   *       cmekConfigServiceClient.updateCmekConfigOperationCallable().futureCall(request);
+   *   // Do something.
+   *   CmekConfig response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + updateCmekConfigOperationCallable() { + return stub.updateCmekConfigOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Provisions a CMEK key for use in a location of a customer's project. This method will also + * conduct location validation on the provided cmekConfig to make sure the key is valid and can be + * used in the selected location. + * + *

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 (CmekConfigServiceClient cmekConfigServiceClient = CmekConfigServiceClient.create()) {
+   *   UpdateCmekConfigRequest request =
+   *       UpdateCmekConfigRequest.newBuilder()
+   *           .setConfig(CmekConfig.newBuilder().build())
+   *           .setSetDefault(true)
+   *           .build();
+   *   ApiFuture future =
+   *       cmekConfigServiceClient.updateCmekConfigCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable updateCmekConfigCallable() { + return stub.updateCmekConfigCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the [CmekConfig][google.cloud.discoveryengine.v1beta.CmekConfig]. + * + *

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 (CmekConfigServiceClient cmekConfigServiceClient = CmekConfigServiceClient.create()) {
+   *   CmekConfigName name = CmekConfigName.ofProjectLocationName("[PROJECT]", "[LOCATION]");
+   *   CmekConfig response = cmekConfigServiceClient.getCmekConfig(name);
+   * }
+   * }
+ * + * @param name Required. Resource name of + * [CmekConfig][google.cloud.discoveryengine.v1beta.CmekConfig], such as + * `projects/*/locations/*/cmekConfig` or + * `projects/*/locations/*/cmekConfigs/*`. + *

If the caller does not have permission to access the + * [CmekConfig][google.cloud.discoveryengine.v1beta.CmekConfig], regardless of whether or not + * it exists, a PERMISSION_DENIED error is returned. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final CmekConfig getCmekConfig(CmekConfigName name) { + GetCmekConfigRequest request = + GetCmekConfigRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getCmekConfig(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the [CmekConfig][google.cloud.discoveryengine.v1beta.CmekConfig]. + * + *

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 (CmekConfigServiceClient cmekConfigServiceClient = CmekConfigServiceClient.create()) {
+   *   String name = CmekConfigName.ofProjectLocationName("[PROJECT]", "[LOCATION]").toString();
+   *   CmekConfig response = cmekConfigServiceClient.getCmekConfig(name);
+   * }
+   * }
+ * + * @param name Required. Resource name of + * [CmekConfig][google.cloud.discoveryengine.v1beta.CmekConfig], such as + * `projects/*/locations/*/cmekConfig` or + * `projects/*/locations/*/cmekConfigs/*`. + *

If the caller does not have permission to access the + * [CmekConfig][google.cloud.discoveryengine.v1beta.CmekConfig], regardless of whether or not + * it exists, a PERMISSION_DENIED error is returned. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final CmekConfig getCmekConfig(String name) { + GetCmekConfigRequest request = GetCmekConfigRequest.newBuilder().setName(name).build(); + return getCmekConfig(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the [CmekConfig][google.cloud.discoveryengine.v1beta.CmekConfig]. + * + *

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 (CmekConfigServiceClient cmekConfigServiceClient = CmekConfigServiceClient.create()) {
+   *   GetCmekConfigRequest request =
+   *       GetCmekConfigRequest.newBuilder()
+   *           .setName(CmekConfigName.ofProjectLocationName("[PROJECT]", "[LOCATION]").toString())
+   *           .build();
+   *   CmekConfig response = cmekConfigServiceClient.getCmekConfig(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 CmekConfig getCmekConfig(GetCmekConfigRequest request) { + return getCmekConfigCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the [CmekConfig][google.cloud.discoveryengine.v1beta.CmekConfig]. + * + *

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 (CmekConfigServiceClient cmekConfigServiceClient = CmekConfigServiceClient.create()) {
+   *   GetCmekConfigRequest request =
+   *       GetCmekConfigRequest.newBuilder()
+   *           .setName(CmekConfigName.ofProjectLocationName("[PROJECT]", "[LOCATION]").toString())
+   *           .build();
+   *   ApiFuture future =
+   *       cmekConfigServiceClient.getCmekConfigCallable().futureCall(request);
+   *   // Do something.
+   *   CmekConfig response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getCmekConfigCallable() { + return stub.getCmekConfigCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all the [CmekConfig][google.cloud.discoveryengine.v1beta.CmekConfig]s with the project. + * + *

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 (CmekConfigServiceClient cmekConfigServiceClient = CmekConfigServiceClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   ListCmekConfigsResponse response = cmekConfigServiceClient.listCmekConfigs(parent);
+   * }
+   * }
+ * + * @param parent Required. The parent location resource name, such as + * `projects/{project}/locations/{location}`. + *

If the caller does not have permission to list + * [CmekConfig][google.cloud.discoveryengine.v1beta.CmekConfig]s under this location, + * regardless of whether or not a CmekConfig exists, a PERMISSION_DENIED error is returned. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListCmekConfigsResponse listCmekConfigs(LocationName parent) { + ListCmekConfigsRequest request = + ListCmekConfigsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listCmekConfigs(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all the [CmekConfig][google.cloud.discoveryengine.v1beta.CmekConfig]s with the project. + * + *

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 (CmekConfigServiceClient cmekConfigServiceClient = CmekConfigServiceClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   ListCmekConfigsResponse response = cmekConfigServiceClient.listCmekConfigs(parent);
+   * }
+   * }
+ * + * @param parent Required. The parent location resource name, such as + * `projects/{project}/locations/{location}`. + *

If the caller does not have permission to list + * [CmekConfig][google.cloud.discoveryengine.v1beta.CmekConfig]s under this location, + * regardless of whether or not a CmekConfig exists, a PERMISSION_DENIED error is returned. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListCmekConfigsResponse listCmekConfigs(String parent) { + ListCmekConfigsRequest request = ListCmekConfigsRequest.newBuilder().setParent(parent).build(); + return listCmekConfigs(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all the [CmekConfig][google.cloud.discoveryengine.v1beta.CmekConfig]s with the project. + * + *

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 (CmekConfigServiceClient cmekConfigServiceClient = CmekConfigServiceClient.create()) {
+   *   ListCmekConfigsRequest request =
+   *       ListCmekConfigsRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .build();
+   *   ListCmekConfigsResponse response = cmekConfigServiceClient.listCmekConfigs(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 ListCmekConfigsResponse listCmekConfigs(ListCmekConfigsRequest request) { + return listCmekConfigsCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all the [CmekConfig][google.cloud.discoveryengine.v1beta.CmekConfig]s with the project. + * + *

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 (CmekConfigServiceClient cmekConfigServiceClient = CmekConfigServiceClient.create()) {
+   *   ListCmekConfigsRequest request =
+   *       ListCmekConfigsRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .build();
+   *   ApiFuture future =
+   *       cmekConfigServiceClient.listCmekConfigsCallable().futureCall(request);
+   *   // Do something.
+   *   ListCmekConfigsResponse response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + listCmekConfigsCallable() { + return stub.listCmekConfigsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * De-provisions a CmekConfig. + * + *

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 (CmekConfigServiceClient cmekConfigServiceClient = CmekConfigServiceClient.create()) {
+   *   CmekConfigName name =
+   *       CmekConfigName.ofProjectLocationCmekConfigName(
+   *           "[PROJECT]", "[LOCATION]", "[CMEK_CONFIG]");
+   *   cmekConfigServiceClient.deleteCmekConfigAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. The resource name of the + * [CmekConfig][google.cloud.discoveryengine.v1beta.CmekConfig] to delete, such as + * `projects/{project}/locations/{location}/cmekConfigs/{cmek_config}`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteCmekConfigAsync( + CmekConfigName name) { + DeleteCmekConfigRequest request = + DeleteCmekConfigRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return deleteCmekConfigAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * De-provisions a CmekConfig. + * + *

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 (CmekConfigServiceClient cmekConfigServiceClient = CmekConfigServiceClient.create()) {
+   *   String name = CmekConfigName.ofProjectLocationName("[PROJECT]", "[LOCATION]").toString();
+   *   cmekConfigServiceClient.deleteCmekConfigAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. The resource name of the + * [CmekConfig][google.cloud.discoveryengine.v1beta.CmekConfig] to delete, such as + * `projects/{project}/locations/{location}/cmekConfigs/{cmek_config}`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteCmekConfigAsync(String name) { + DeleteCmekConfigRequest request = DeleteCmekConfigRequest.newBuilder().setName(name).build(); + return deleteCmekConfigAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * De-provisions a CmekConfig. + * + *

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 (CmekConfigServiceClient cmekConfigServiceClient = CmekConfigServiceClient.create()) {
+   *   DeleteCmekConfigRequest request =
+   *       DeleteCmekConfigRequest.newBuilder()
+   *           .setName(
+   *               CmekConfigName.ofProjectLocationCmekConfigName(
+   *                       "[PROJECT]", "[LOCATION]", "[CMEK_CONFIG]")
+   *                   .toString())
+   *           .build();
+   *   cmekConfigServiceClient.deleteCmekConfigAsync(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 deleteCmekConfigAsync( + DeleteCmekConfigRequest request) { + return deleteCmekConfigOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * De-provisions a CmekConfig. + * + *

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 (CmekConfigServiceClient cmekConfigServiceClient = CmekConfigServiceClient.create()) {
+   *   DeleteCmekConfigRequest request =
+   *       DeleteCmekConfigRequest.newBuilder()
+   *           .setName(
+   *               CmekConfigName.ofProjectLocationCmekConfigName(
+   *                       "[PROJECT]", "[LOCATION]", "[CMEK_CONFIG]")
+   *                   .toString())
+   *           .build();
+   *   OperationFuture future =
+   *       cmekConfigServiceClient.deleteCmekConfigOperationCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final OperationCallable + deleteCmekConfigOperationCallable() { + return stub.deleteCmekConfigOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * De-provisions a CmekConfig. + * + *

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 (CmekConfigServiceClient cmekConfigServiceClient = CmekConfigServiceClient.create()) {
+   *   DeleteCmekConfigRequest request =
+   *       DeleteCmekConfigRequest.newBuilder()
+   *           .setName(
+   *               CmekConfigName.ofProjectLocationCmekConfigName(
+   *                       "[PROJECT]", "[LOCATION]", "[CMEK_CONFIG]")
+   *                   .toString())
+   *           .build();
+   *   ApiFuture future =
+   *       cmekConfigServiceClient.deleteCmekConfigCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable deleteCmekConfigCallable() { + return stub.deleteCmekConfigCallable(); + } + + @Override + public final void close() { + stub.close(); + } + + @Override + public void shutdown() { + stub.shutdown(); + } + + @Override + public boolean isShutdown() { + return stub.isShutdown(); + } + + @Override + public boolean isTerminated() { + return stub.isTerminated(); + } + + @Override + public void shutdownNow() { + stub.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return stub.awaitTermination(duration, unit); + } +} diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/CmekConfigServiceSettings.java b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/CmekConfigServiceSettings.java new file mode 100644 index 000000000000..29ce467cd95f --- /dev/null +++ b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/CmekConfigServiceSettings.java @@ -0,0 +1,305 @@ +/* + * 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.discoveryengine.v1beta; + +import com.google.api.core.ApiFunction; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientSettings; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.cloud.discoveryengine.v1beta.stub.CmekConfigServiceStubSettings; +import com.google.longrunning.Operation; +import com.google.protobuf.Empty; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link CmekConfigServiceClient}. + * + *

The default instance has everything set to sensible defaults: + * + *

    + *
  • The default service address (discoveryengine.googleapis.com) and default port (443) are + * used. + *
  • Credentials are acquired automatically through Application Default Credentials. + *
  • Retries are configured for idempotent methods but not for non-idempotent methods. + *
+ * + *

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 getCmekConfig: + * + *

{@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
+ * CmekConfigServiceSettings.Builder cmekConfigServiceSettingsBuilder =
+ *     CmekConfigServiceSettings.newBuilder();
+ * cmekConfigServiceSettingsBuilder
+ *     .getCmekConfigSettings()
+ *     .setRetrySettings(
+ *         cmekConfigServiceSettingsBuilder
+ *             .getCmekConfigSettings()
+ *             .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());
+ * CmekConfigServiceSettings cmekConfigServiceSettings = cmekConfigServiceSettingsBuilder.build();
+ * }
+ * + * Please refer to the [Client Side Retry + * Guide](https://docs.cloud.google.com/java/docs/client-retries) for additional support in setting + * retries. + * + *

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 updateCmekConfig: + * + *

{@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
+ * CmekConfigServiceSettings.Builder cmekConfigServiceSettingsBuilder =
+ *     CmekConfigServiceSettings.newBuilder();
+ * TimedRetryAlgorithm timedRetryAlgorithm =
+ *     OperationalTimedPollAlgorithm.create(
+ *         RetrySettings.newBuilder()
+ *             .setInitialRetryDelayDuration(Duration.ofMillis(500))
+ *             .setRetryDelayMultiplier(1.5)
+ *             .setMaxRetryDelayDuration(Duration.ofMillis(5000))
+ *             .setTotalTimeoutDuration(Duration.ofHours(24))
+ *             .build());
+ * cmekConfigServiceSettingsBuilder
+ *     .createClusterOperationSettings()
+ *     .setPollingAlgorithm(timedRetryAlgorithm)
+ *     .build();
+ * }
+ */ +@BetaApi +@Generated("by gapic-generator-java") +public class CmekConfigServiceSettings extends ClientSettings { + + /** Returns the object with the settings used for calls to updateCmekConfig. */ + public UnaryCallSettings updateCmekConfigSettings() { + return ((CmekConfigServiceStubSettings) getStubSettings()).updateCmekConfigSettings(); + } + + /** Returns the object with the settings used for calls to updateCmekConfig. */ + public OperationCallSettings + updateCmekConfigOperationSettings() { + return ((CmekConfigServiceStubSettings) getStubSettings()).updateCmekConfigOperationSettings(); + } + + /** Returns the object with the settings used for calls to getCmekConfig. */ + public UnaryCallSettings getCmekConfigSettings() { + return ((CmekConfigServiceStubSettings) getStubSettings()).getCmekConfigSettings(); + } + + /** Returns the object with the settings used for calls to listCmekConfigs. */ + public UnaryCallSettings + listCmekConfigsSettings() { + return ((CmekConfigServiceStubSettings) getStubSettings()).listCmekConfigsSettings(); + } + + /** Returns the object with the settings used for calls to deleteCmekConfig. */ + public UnaryCallSettings deleteCmekConfigSettings() { + return ((CmekConfigServiceStubSettings) getStubSettings()).deleteCmekConfigSettings(); + } + + /** Returns the object with the settings used for calls to deleteCmekConfig. */ + public OperationCallSettings + deleteCmekConfigOperationSettings() { + return ((CmekConfigServiceStubSettings) getStubSettings()).deleteCmekConfigOperationSettings(); + } + + public static final CmekConfigServiceSettings create(CmekConfigServiceStubSettings stub) + throws IOException { + return new CmekConfigServiceSettings.Builder(stub.toBuilder()).build(); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return CmekConfigServiceStubSettings.defaultExecutorProviderBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return CmekConfigServiceStubSettings.getDefaultEndpoint(); + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return CmekConfigServiceStubSettings.getDefaultServiceScopes(); + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return CmekConfigServiceStubSettings.defaultCredentialsProviderBuilder(); + } + + /** Returns a builder for the default gRPC ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return CmekConfigServiceStubSettings.defaultGrpcTransportProviderBuilder(); + } + + /** Returns a builder for the default REST ChannelProvider for this service. */ + @BetaApi + public static InstantiatingHttpJsonChannelProvider.Builder + defaultHttpJsonTransportProviderBuilder() { + return CmekConfigServiceStubSettings.defaultHttpJsonTransportProviderBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return CmekConfigServiceStubSettings.defaultTransportChannelProvider(); + } + + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return CmekConfigServiceStubSettings.defaultApiClientHeaderProviderBuilder(); + } + + /** Returns a new gRPC builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new REST builder for this class. */ + public static Builder newHttpJsonBuilder() { + return Builder.createHttpJsonDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected CmekConfigServiceSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + } + + /** Builder for CmekConfigServiceSettings. */ + public static class Builder extends ClientSettings.Builder { + + protected Builder() throws IOException { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(CmekConfigServiceStubSettings.newBuilder(clientContext)); + } + + protected Builder(CmekConfigServiceSettings settings) { + super(settings.getStubSettings().toBuilder()); + } + + protected Builder(CmekConfigServiceStubSettings.Builder stubSettings) { + super(stubSettings); + } + + private static Builder createDefault() { + return new Builder(CmekConfigServiceStubSettings.newBuilder()); + } + + private static Builder createHttpJsonDefault() { + return new Builder(CmekConfigServiceStubSettings.newHttpJsonBuilder()); + } + + public CmekConfigServiceStubSettings.Builder getStubSettingsBuilder() { + return ((CmekConfigServiceStubSettings.Builder) getStubSettings()); + } + + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) { + super.applyToAllUnaryMethods( + getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); + return this; + } + + /** Returns the builder for the settings used for calls to updateCmekConfig. */ + public UnaryCallSettings.Builder + updateCmekConfigSettings() { + return getStubSettingsBuilder().updateCmekConfigSettings(); + } + + /** Returns the builder for the settings used for calls to updateCmekConfig. */ + public OperationCallSettings.Builder< + UpdateCmekConfigRequest, CmekConfig, UpdateCmekConfigMetadata> + updateCmekConfigOperationSettings() { + return getStubSettingsBuilder().updateCmekConfigOperationSettings(); + } + + /** Returns the builder for the settings used for calls to getCmekConfig. */ + public UnaryCallSettings.Builder getCmekConfigSettings() { + return getStubSettingsBuilder().getCmekConfigSettings(); + } + + /** Returns the builder for the settings used for calls to listCmekConfigs. */ + public UnaryCallSettings.Builder + listCmekConfigsSettings() { + return getStubSettingsBuilder().listCmekConfigsSettings(); + } + + /** Returns the builder for the settings used for calls to deleteCmekConfig. */ + public UnaryCallSettings.Builder + deleteCmekConfigSettings() { + return getStubSettingsBuilder().deleteCmekConfigSettings(); + } + + /** Returns the builder for the settings used for calls to deleteCmekConfig. */ + public OperationCallSettings.Builder + deleteCmekConfigOperationSettings() { + return getStubSettingsBuilder().deleteCmekConfigOperationSettings(); + } + + @Override + public CmekConfigServiceSettings build() throws IOException { + return new CmekConfigServiceSettings(this); + } + } +} diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/CompletionServiceClient.java b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/CompletionServiceClient.java index ee26da0b8f41..4f88e387fcb3 100644 --- a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/CompletionServiceClient.java +++ b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/CompletionServiceClient.java @@ -157,6 +157,20 @@ * * * + * + *

RemoveSuggestion + *

Removes the search history suggestion in an engine for a user. This will remove the suggestion from being returned in the [AdvancedCompleteQueryResponse.recent_search_suggestions][google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryResponse.recent_search_suggestions] for this user. If the user searches the same suggestion again, the new history will override and suggest this suggestion again. + * + *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • removeSuggestion(RemoveSuggestionRequest request) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • removeSuggestionCallable() + *

+ * + * * * *

See the individual methods for example code. @@ -387,6 +401,9 @@ public final UnaryCallable complete * .setIncludeTailSuggestions(true) * .setBoostSpec(AdvancedCompleteQueryRequest.BoostSpec.newBuilder().build()) * .addAllSuggestionTypes(new ArrayList()) + * .addAllSuggestionTypeSpecs( + * new ArrayList()) + * .addAllExperimentIds(new ArrayList()) * .build(); * AdvancedCompleteQueryResponse response = * completionServiceClient.advancedCompleteQuery(request); @@ -427,6 +444,9 @@ public final AdvancedCompleteQueryResponse advancedCompleteQuery( * .setIncludeTailSuggestions(true) * .setBoostSpec(AdvancedCompleteQueryRequest.BoostSpec.newBuilder().build()) * .addAllSuggestionTypes(new ArrayList()) + * .addAllSuggestionTypeSpecs( + * new ArrayList()) + * .addAllExperimentIds(new ArrayList()) * .build(); * ApiFuture future = * completionServiceClient.advancedCompleteQueryCallable().futureCall(request); @@ -882,6 +902,83 @@ public final AdvancedCompleteQueryResponse advancedCompleteQuery( return stub.purgeCompletionSuggestionsCallable(); } + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Removes the search history suggestion in an engine for a user. This will remove the suggestion + * from being returned in the + * [AdvancedCompleteQueryResponse.recent_search_suggestions][google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryResponse.recent_search_suggestions] + * for this user. If the user searches the same suggestion again, the new history will override + * and suggest this suggestion again. + * + *

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 (CompletionServiceClient completionServiceClient = CompletionServiceClient.create()) {
+   *   RemoveSuggestionRequest request =
+   *       RemoveSuggestionRequest.newBuilder()
+   *           .setCompletionConfig(
+   *               CompletionConfigName.ofProjectLocationCollectionEngineName(
+   *                       "[PROJECT]", "[LOCATION]", "[COLLECTION]", "[ENGINE]")
+   *                   .toString())
+   *           .setUserPseudoId("userPseudoId-1155274652")
+   *           .setUserInfo(UserInfo.newBuilder().build())
+   *           .setRemoveTime(Timestamp.newBuilder().build())
+   *           .build();
+   *   RemoveSuggestionResponse response = completionServiceClient.removeSuggestion(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 RemoveSuggestionResponse removeSuggestion(RemoveSuggestionRequest request) { + return removeSuggestionCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Removes the search history suggestion in an engine for a user. This will remove the suggestion + * from being returned in the + * [AdvancedCompleteQueryResponse.recent_search_suggestions][google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryResponse.recent_search_suggestions] + * for this user. If the user searches the same suggestion again, the new history will override + * and suggest this suggestion again. + * + *

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 (CompletionServiceClient completionServiceClient = CompletionServiceClient.create()) {
+   *   RemoveSuggestionRequest request =
+   *       RemoveSuggestionRequest.newBuilder()
+   *           .setCompletionConfig(
+   *               CompletionConfigName.ofProjectLocationCollectionEngineName(
+   *                       "[PROJECT]", "[LOCATION]", "[COLLECTION]", "[ENGINE]")
+   *                   .toString())
+   *           .setUserPseudoId("userPseudoId-1155274652")
+   *           .setUserInfo(UserInfo.newBuilder().build())
+   *           .setRemoveTime(Timestamp.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       completionServiceClient.removeSuggestionCallable().futureCall(request);
+   *   // Do something.
+   *   RemoveSuggestionResponse response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + removeSuggestionCallable() { + return stub.removeSuggestionCallable(); + } + @Override public final void close() { stub.close(); diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/CompletionServiceSettings.java b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/CompletionServiceSettings.java index 471120e1b42f..670d31206bd4 100644 --- a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/CompletionServiceSettings.java +++ b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/CompletionServiceSettings.java @@ -193,6 +193,12 @@ public UnaryCallSettings completeQu .purgeCompletionSuggestionsOperationSettings(); } + /** Returns the object with the settings used for calls to removeSuggestion. */ + public UnaryCallSettings + removeSuggestionSettings() { + return ((CompletionServiceStubSettings) getStubSettings()).removeSuggestionSettings(); + } + public static final CompletionServiceSettings create(CompletionServiceStubSettings stub) throws IOException { return new CompletionServiceSettings.Builder(stub.toBuilder()).build(); @@ -377,6 +383,12 @@ public Builder applyToAllUnaryMethods( return getStubSettingsBuilder().purgeCompletionSuggestionsOperationSettings(); } + /** Returns the builder for the settings used for calls to removeSuggestion. */ + public UnaryCallSettings.Builder + removeSuggestionSettings() { + return getStubSettingsBuilder().removeSuggestionSettings(); + } + @Override public CompletionServiceSettings build() throws IOException { return new CompletionServiceSettings(this); diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/ConversationalSearchServiceClient.java b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/ConversationalSearchServiceClient.java index e89e547f3ed4..51d7904725b4 100644 --- a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/ConversationalSearchServiceClient.java +++ b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/ConversationalSearchServiceClient.java @@ -24,6 +24,7 @@ import com.google.api.gax.paging.AbstractPage; import com.google.api.gax.paging.AbstractPagedListResponse; import com.google.api.gax.rpc.PageContext; +import com.google.api.gax.rpc.ServerStreamingCallable; import com.google.api.gax.rpc.UnaryCallable; import com.google.cloud.discoveryengine.v1beta.stub.ConversationalSearchServiceStub; import com.google.cloud.discoveryengine.v1beta.stub.ConversationalSearchServiceStubSettings; @@ -202,6 +203,17 @@ * * * + *

StreamAnswerQuery + *

Answer query method (streaming). + *

It takes one [AnswerQueryRequest][google.cloud.discoveryengine.v1beta.AnswerQueryRequest] and returns multiple [AnswerQueryResponse][google.cloud.discoveryengine.v1beta.AnswerQueryResponse] messages in a stream. + * + *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • streamAnswerQueryCallable() + *

+ * + * + * *

GetAnswer *

Gets a Answer. * @@ -1363,6 +1375,7 @@ public final ListConversationsPagedResponse listConversations(ListConversationsR * .setAsynchronousMode(true) * .setUserPseudoId("userPseudoId-1155274652") * .putAllUserLabels(new HashMap()) + * .setEndUserSpec(AnswerQueryRequest.EndUserSpec.newBuilder().build()) * .build(); * AnswerQueryResponse response = conversationalSearchServiceClient.answerQuery(request); * } @@ -1410,6 +1423,7 @@ public final AnswerQueryResponse answerQuery(AnswerQueryRequest request) { * .setAsynchronousMode(true) * .setUserPseudoId("userPseudoId-1155274652") * .putAllUserLabels(new HashMap()) + * .setEndUserSpec(AnswerQueryRequest.EndUserSpec.newBuilder().build()) * .build(); * ApiFuture future = * conversationalSearchServiceClient.answerQueryCallable().futureCall(request); @@ -1422,6 +1436,61 @@ public final UnaryCallable answerQueryC return stub.answerQueryCallable(); } + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Answer query method (streaming). + * + *

It takes one [AnswerQueryRequest][google.cloud.discoveryengine.v1beta.AnswerQueryRequest] + * and returns multiple + * [AnswerQueryResponse][google.cloud.discoveryengine.v1beta.AnswerQueryResponse] messages in a + * stream. + * + *

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 (ConversationalSearchServiceClient conversationalSearchServiceClient =
+   *     ConversationalSearchServiceClient.create()) {
+   *   AnswerQueryRequest request =
+   *       AnswerQueryRequest.newBuilder()
+   *           .setServingConfig(
+   *               ServingConfigName.ofProjectLocationDataStoreServingConfigName(
+   *                       "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[SERVING_CONFIG]")
+   *                   .toString())
+   *           .setQuery(Query.newBuilder().build())
+   *           .setSession(
+   *               SessionName.ofProjectLocationDataStoreSessionName(
+   *                       "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[SESSION]")
+   *                   .toString())
+   *           .setSafetySpec(AnswerQueryRequest.SafetySpec.newBuilder().build())
+   *           .setRelatedQuestionsSpec(AnswerQueryRequest.RelatedQuestionsSpec.newBuilder().build())
+   *           .setGroundingSpec(AnswerQueryRequest.GroundingSpec.newBuilder().build())
+   *           .setAnswerGenerationSpec(AnswerQueryRequest.AnswerGenerationSpec.newBuilder().build())
+   *           .setSearchSpec(AnswerQueryRequest.SearchSpec.newBuilder().build())
+   *           .setQueryUnderstandingSpec(
+   *               AnswerQueryRequest.QueryUnderstandingSpec.newBuilder().build())
+   *           .setAsynchronousMode(true)
+   *           .setUserPseudoId("userPseudoId-1155274652")
+   *           .putAllUserLabels(new HashMap())
+   *           .setEndUserSpec(AnswerQueryRequest.EndUserSpec.newBuilder().build())
+   *           .build();
+   *   ServerStream stream =
+   *       conversationalSearchServiceClient.streamAnswerQueryCallable().call(request);
+   *   for (AnswerQueryResponse response : stream) {
+   *     // Do something when a response is received.
+   *   }
+   * }
+   * }
+ */ + public final ServerStreamingCallable + streamAnswerQueryCallable() { + return stub.streamAnswerQueryCallable(); + } + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Gets a Answer. @@ -1646,6 +1715,7 @@ public final Session createSession(String parent, Session session) { * "[PROJECT]", "[LOCATION]", "[DATA_STORE]") * .toString()) * .setSession(Session.newBuilder().build()) + * .setSessionId("sessionId607796817") * .build(); * Session response = conversationalSearchServiceClient.createSession(request); * } @@ -1682,6 +1752,7 @@ public final Session createSession(CreateSessionRequest request) { * "[PROJECT]", "[LOCATION]", "[DATA_STORE]") * .toString()) * .setSession(Session.newBuilder().build()) + * .setSessionId("sessionId607796817") * .build(); * ApiFuture future = * conversationalSearchServiceClient.createSessionCallable().futureCall(request); diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/ConversationalSearchServiceSettings.java b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/ConversationalSearchServiceSettings.java index 1567c3116dca..fc9ea030268e 100644 --- a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/ConversationalSearchServiceSettings.java +++ b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/ConversationalSearchServiceSettings.java @@ -29,6 +29,7 @@ import com.google.api.gax.rpc.ClientContext; import com.google.api.gax.rpc.ClientSettings; import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallSettings; import com.google.api.gax.rpc.TransportChannelProvider; import com.google.api.gax.rpc.UnaryCallSettings; import com.google.cloud.discoveryengine.v1beta.stub.ConversationalSearchServiceStubSettings; @@ -137,6 +138,13 @@ public UnaryCallSettings answerQuerySet return ((ConversationalSearchServiceStubSettings) getStubSettings()).answerQuerySettings(); } + /** Returns the object with the settings used for calls to streamAnswerQuery. */ + public ServerStreamingCallSettings + streamAnswerQuerySettings() { + return ((ConversationalSearchServiceStubSettings) getStubSettings()) + .streamAnswerQuerySettings(); + } + /** Returns the object with the settings used for calls to getAnswer. */ public UnaryCallSettings getAnswerSettings() { return ((ConversationalSearchServiceStubSettings) getStubSettings()).getAnswerSettings(); @@ -324,6 +332,12 @@ public Builder applyToAllUnaryMethods( return getStubSettingsBuilder().answerQuerySettings(); } + /** Returns the builder for the settings used for calls to streamAnswerQuery. */ + public ServerStreamingCallSettings.Builder + streamAnswerQuerySettings() { + return getStubSettingsBuilder().streamAnswerQuerySettings(); + } + /** Returns the builder for the settings used for calls to getAnswer. */ public UnaryCallSettings.Builder getAnswerSettings() { return getStubSettingsBuilder().getAnswerSettings(); diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/DocumentServiceClient.java b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/DocumentServiceClient.java index 9fdb4c118705..555f6b21e2b9 100644 --- a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/DocumentServiceClient.java +++ b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/DocumentServiceClient.java @@ -710,7 +710,7 @@ public final UnaryCallable listDocu * [parent][google.cloud.discoveryengine.v1beta.CreateDocumentRequest.parent]. Otherwise, an * `ALREADY_EXISTS` error is returned. *

This field must conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) standard with - * a length limit of 63 characters. Otherwise, an `INVALID_ARGUMENT` error is returned. + * a length limit of 128 characters. Otherwise, an `INVALID_ARGUMENT` error is returned. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Document createDocument(BranchName parent, Document document, String documentId) { @@ -761,7 +761,7 @@ public final Document createDocument(BranchName parent, Document document, Strin * [parent][google.cloud.discoveryengine.v1beta.CreateDocumentRequest.parent]. Otherwise, an * `ALREADY_EXISTS` error is returned. *

This field must conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) standard with - * a length limit of 63 characters. Otherwise, an `INVALID_ARGUMENT` error is returned. + * a length limit of 128 characters. Otherwise, an `INVALID_ARGUMENT` error is returned. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Document createDocument(String parent, Document document, String documentId) { @@ -1097,6 +1097,7 @@ public final UnaryCallable deleteDocumentCallable( * .setUpdateMask(FieldMask.newBuilder().build()) * .setAutoGenerateIds(true) * .setIdField("idField1629396127") + * .setForceRefreshContent(true) * .build(); * ImportDocumentsResponse response = documentServiceClient.importDocumentsAsync(request).get(); * } @@ -1137,6 +1138,7 @@ public final UnaryCallable deleteDocumentCallable( * .setUpdateMask(FieldMask.newBuilder().build()) * .setAutoGenerateIds(true) * .setIdField("idField1629396127") + * .setForceRefreshContent(true) * .build(); * OperationFuture future = * documentServiceClient.importDocumentsOperationCallable().futureCall(request); @@ -1178,6 +1180,7 @@ public final UnaryCallable deleteDocumentCallable( * .setUpdateMask(FieldMask.newBuilder().build()) * .setAutoGenerateIds(true) * .setIdField("idField1629396127") + * .setForceRefreshContent(true) * .build(); * ApiFuture future = * documentServiceClient.importDocumentsCallable().futureCall(request); diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/EngineServiceClient.java b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/EngineServiceClient.java index 5c7e67fad6d2..b6de51f6f657 100644 --- a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/EngineServiceClient.java +++ b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/EngineServiceClient.java @@ -28,9 +28,13 @@ import com.google.api.gax.rpc.OperationCallable; import com.google.api.gax.rpc.PageContext; import com.google.api.gax.rpc.UnaryCallable; +import com.google.api.resourcenames.ResourceName; import com.google.cloud.discoveryengine.v1beta.stub.EngineServiceStub; import com.google.cloud.discoveryengine.v1beta.stub.EngineServiceStubSettings; import com.google.common.util.concurrent.MoreExecutors; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; import com.google.longrunning.Operation; import com.google.protobuf.Empty; import com.google.protobuf.FieldMask; @@ -72,7 +76,7 @@ * * *

CreateEngine - *

Creates a [Engine][google.cloud.discoveryengine.v1beta.Engine]. + *

Creates an [Engine][google.cloud.discoveryengine.v1beta.Engine]. * *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

*
    @@ -92,7 +96,7 @@ * * *

    DeleteEngine - *

    Deletes a [Engine][google.cloud.discoveryengine.v1beta.Engine]. + *

    Deletes an [Engine][google.cloud.discoveryengine.v1beta.Engine]. * *

    Request object method variants only take one parameter, a request object, which must be constructed before the call.

    *
      @@ -130,7 +134,7 @@ * * *

      GetEngine - *

      Gets a [Engine][google.cloud.discoveryengine.v1beta.Engine]. + *

      Gets an [Engine][google.cloud.discoveryengine.v1beta.Engine]. * *

      Request object method variants only take one parameter, a request object, which must be constructed before the call.

      *
        @@ -169,7 +173,7 @@ * * *

        PauseEngine - *

        Pauses the training of an existing engine. Only applicable if [SolutionType][google.cloud.discoveryengine.v1beta.SolutionType] is [SOLUTION_TYPE_RECOMMENDATION][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_RECOMMENDATION]. + *

        Pauses the training of an existing [Engine][google.cloud.discoveryengine.v1beta.Engine]. Only applicable if [SolutionType][google.cloud.discoveryengine.v1beta.SolutionType] is [SOLUTION_TYPE_RECOMMENDATION][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_RECOMMENDATION]. * *

        Request object method variants only take one parameter, a request object, which must be constructed before the call.

        *
          @@ -188,7 +192,7 @@ * * *

          ResumeEngine - *

          Resumes the training of an existing engine. Only applicable if [SolutionType][google.cloud.discoveryengine.v1beta.SolutionType] is [SOLUTION_TYPE_RECOMMENDATION][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_RECOMMENDATION]. + *

          Resumes the training of an existing [Engine][google.cloud.discoveryengine.v1beta.Engine]. Only applicable if [SolutionType][google.cloud.discoveryengine.v1beta.SolutionType] is [SOLUTION_TYPE_RECOMMENDATION][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_RECOMMENDATION]. * *

          Request object method variants only take one parameter, a request object, which must be constructed before the call.

          *
            @@ -207,7 +211,7 @@ * * *

            TuneEngine - *

            Tunes an existing engine. Only applicable if [SolutionType][google.cloud.discoveryengine.v1beta.SolutionType] is [SOLUTION_TYPE_RECOMMENDATION][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_RECOMMENDATION]. + *

            Tunes an existing [Engine][google.cloud.discoveryengine.v1beta.Engine]. Only applicable if [SolutionType][google.cloud.discoveryengine.v1beta.SolutionType] is [SOLUTION_TYPE_RECOMMENDATION][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_RECOMMENDATION]. * *

            Request object method variants only take one parameter, a request object, which must be constructed before the call.

            *
              @@ -225,6 +229,45 @@ *
            * * + * + *

            GetIamPolicy + *

            Gets the IAM access control policy for an [Engine][google.cloud.discoveryengine.v1beta.Engine]. A `NOT_FOUND` error is returned if the resource does not exist. An empty policy is returned if the resource exists but does not have a policy set on it. + * + *

            Request object method variants only take one parameter, a request object, which must be constructed before the call.

            + *
              + *
            • getIamPolicy(GetIamPolicyRequest request) + *

            + *

            "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

            + *
              + *
            • getIamPolicy(ResourceName resource) + *

            • getIamPolicy(String resource) + *

            + *

            Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

            + *
              + *
            • getIamPolicyCallable() + *

            + * + * + * + *

            SetIamPolicy + *

            Sets the IAM access control policy for an [Engine][google.cloud.discoveryengine.v1beta.Engine]. A `NOT_FOUND` error is returned if the resource does not exist. + *

            **Important:** When setting a policy directly on an Engine resource, the only recommended roles in the bindings are: `roles/discoveryengine.admin`, `roles/discoveryengine.agentspaceAdmin`, `roles/discoveryengine.user`, `roles/discoveryengine.agentspaceUser`, `roles/discoveryengine.viewer`, `roles/discoveryengine.agentspaceViewer`. Attempting to grant any other role will result in a warning in logging. + * + *

            Request object method variants only take one parameter, a request object, which must be constructed before the call.

            + *
              + *
            • setIamPolicy(SetIamPolicyRequest request) + *

            + *

            "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

            + *
              + *
            • setIamPolicy(ResourceName resource, Policy policy) + *

            • setIamPolicy(String resource, Policy policy) + *

            + *

            Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

            + *
              + *
            • setIamPolicyCallable() + *

            + * + * * * *

            See the individual methods for example code. @@ -358,7 +401,7 @@ public final OperationsClient getHttpJsonOperationsClient() { // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Creates a [Engine][google.cloud.discoveryengine.v1beta.Engine]. + * Creates an [Engine][google.cloud.discoveryengine.v1beta.Engine]. * *

            Sample code: * @@ -399,7 +442,7 @@ public final OperationFuture createEngineAsync( // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Creates a [Engine][google.cloud.discoveryengine.v1beta.Engine]. + * Creates an [Engine][google.cloud.discoveryengine.v1beta.Engine]. * *

            Sample code: * @@ -440,7 +483,7 @@ public final OperationFuture createEngineAsync( // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Creates a [Engine][google.cloud.discoveryengine.v1beta.Engine]. + * Creates an [Engine][google.cloud.discoveryengine.v1beta.Engine]. * *

            Sample code: * @@ -471,7 +514,7 @@ public final OperationFuture createEngineAsync( // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Creates a [Engine][google.cloud.discoveryengine.v1beta.Engine]. + * Creates an [Engine][google.cloud.discoveryengine.v1beta.Engine]. * *

            Sample code: * @@ -502,7 +545,7 @@ public final OperationFuture createEngineAsync( // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Creates a [Engine][google.cloud.discoveryengine.v1beta.Engine]. + * Creates an [Engine][google.cloud.discoveryengine.v1beta.Engine]. * *

            Sample code: * @@ -531,7 +574,7 @@ public final UnaryCallable createEngineCallable( // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Deletes a [Engine][google.cloud.discoveryengine.v1beta.Engine]. + * Deletes an [Engine][google.cloud.discoveryengine.v1beta.Engine]. * *

            Sample code: * @@ -565,7 +608,7 @@ public final OperationFuture deleteEngineAsync(Engi // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Deletes a [Engine][google.cloud.discoveryengine.v1beta.Engine]. + * Deletes an [Engine][google.cloud.discoveryengine.v1beta.Engine]. * *

            Sample code: * @@ -598,7 +641,7 @@ public final OperationFuture deleteEngineAsync(Stri // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Deletes a [Engine][google.cloud.discoveryengine.v1beta.Engine]. + * Deletes an [Engine][google.cloud.discoveryengine.v1beta.Engine]. * *

            Sample code: * @@ -628,7 +671,7 @@ public final OperationFuture deleteEngineAsync( // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Deletes a [Engine][google.cloud.discoveryengine.v1beta.Engine]. + * Deletes an [Engine][google.cloud.discoveryengine.v1beta.Engine]. * *

            Sample code: * @@ -658,7 +701,7 @@ public final OperationFuture deleteEngineAsync( // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Deletes a [Engine][google.cloud.discoveryengine.v1beta.Engine]. + * Deletes an [Engine][google.cloud.discoveryengine.v1beta.Engine]. * *

            Sample code: * @@ -779,7 +822,7 @@ public final UnaryCallable updateEngineCallable() { // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Gets a [Engine][google.cloud.discoveryengine.v1beta.Engine]. + * Gets an [Engine][google.cloud.discoveryengine.v1beta.Engine]. * *

            Sample code: * @@ -808,7 +851,7 @@ public final Engine getEngine(EngineName name) { // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Gets a [Engine][google.cloud.discoveryengine.v1beta.Engine]. + * Gets an [Engine][google.cloud.discoveryengine.v1beta.Engine]. * *

            Sample code: * @@ -836,7 +879,7 @@ public final Engine getEngine(String name) { // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Gets a [Engine][google.cloud.discoveryengine.v1beta.Engine]. + * Gets an [Engine][google.cloud.discoveryengine.v1beta.Engine]. * *

            Sample code: * @@ -865,7 +908,7 @@ public final Engine getEngine(GetEngineRequest request) { // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Gets a [Engine][google.cloud.discoveryengine.v1beta.Engine]. + * Gets an [Engine][google.cloud.discoveryengine.v1beta.Engine]. * *

            Sample code: * @@ -1064,8 +1107,8 @@ public final UnaryCallable listEnginesC // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Pauses the training of an existing engine. Only applicable if - * [SolutionType][google.cloud.discoveryengine.v1beta.SolutionType] is + * Pauses the training of an existing [Engine][google.cloud.discoveryengine.v1beta.Engine]. Only + * applicable if [SolutionType][google.cloud.discoveryengine.v1beta.SolutionType] is * [SOLUTION_TYPE_RECOMMENDATION][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_RECOMMENDATION]. * *

            Sample code: @@ -1094,8 +1137,8 @@ public final Engine pauseEngine(EngineName name) { // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Pauses the training of an existing engine. Only applicable if - * [SolutionType][google.cloud.discoveryengine.v1beta.SolutionType] is + * Pauses the training of an existing [Engine][google.cloud.discoveryengine.v1beta.Engine]. Only + * applicable if [SolutionType][google.cloud.discoveryengine.v1beta.SolutionType] is * [SOLUTION_TYPE_RECOMMENDATION][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_RECOMMENDATION]. * *

            Sample code: @@ -1123,8 +1166,8 @@ public final Engine pauseEngine(String name) { // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Pauses the training of an existing engine. Only applicable if - * [SolutionType][google.cloud.discoveryengine.v1beta.SolutionType] is + * Pauses the training of an existing [Engine][google.cloud.discoveryengine.v1beta.Engine]. Only + * applicable if [SolutionType][google.cloud.discoveryengine.v1beta.SolutionType] is * [SOLUTION_TYPE_RECOMMENDATION][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_RECOMMENDATION]. * *

            Sample code: @@ -1154,8 +1197,8 @@ public final Engine pauseEngine(PauseEngineRequest request) { // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Pauses the training of an existing engine. Only applicable if - * [SolutionType][google.cloud.discoveryengine.v1beta.SolutionType] is + * Pauses the training of an existing [Engine][google.cloud.discoveryengine.v1beta.Engine]. Only + * applicable if [SolutionType][google.cloud.discoveryengine.v1beta.SolutionType] is * [SOLUTION_TYPE_RECOMMENDATION][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_RECOMMENDATION]. * *

            Sample code: @@ -1184,8 +1227,8 @@ public final UnaryCallable pauseEngineCallable() { // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Resumes the training of an existing engine. Only applicable if - * [SolutionType][google.cloud.discoveryengine.v1beta.SolutionType] is + * Resumes the training of an existing [Engine][google.cloud.discoveryengine.v1beta.Engine]. Only + * applicable if [SolutionType][google.cloud.discoveryengine.v1beta.SolutionType] is * [SOLUTION_TYPE_RECOMMENDATION][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_RECOMMENDATION]. * *

            Sample code: @@ -1214,8 +1257,8 @@ public final Engine resumeEngine(EngineName name) { // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Resumes the training of an existing engine. Only applicable if - * [SolutionType][google.cloud.discoveryengine.v1beta.SolutionType] is + * Resumes the training of an existing [Engine][google.cloud.discoveryengine.v1beta.Engine]. Only + * applicable if [SolutionType][google.cloud.discoveryengine.v1beta.SolutionType] is * [SOLUTION_TYPE_RECOMMENDATION][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_RECOMMENDATION]. * *

            Sample code: @@ -1243,8 +1286,8 @@ public final Engine resumeEngine(String name) { // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Resumes the training of an existing engine. Only applicable if - * [SolutionType][google.cloud.discoveryengine.v1beta.SolutionType] is + * Resumes the training of an existing [Engine][google.cloud.discoveryengine.v1beta.Engine]. Only + * applicable if [SolutionType][google.cloud.discoveryengine.v1beta.SolutionType] is * [SOLUTION_TYPE_RECOMMENDATION][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_RECOMMENDATION]. * *

            Sample code: @@ -1274,8 +1317,8 @@ public final Engine resumeEngine(ResumeEngineRequest request) { // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Resumes the training of an existing engine. Only applicable if - * [SolutionType][google.cloud.discoveryengine.v1beta.SolutionType] is + * Resumes the training of an existing [Engine][google.cloud.discoveryengine.v1beta.Engine]. Only + * applicable if [SolutionType][google.cloud.discoveryengine.v1beta.SolutionType] is * [SOLUTION_TYPE_RECOMMENDATION][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_RECOMMENDATION]. * *

            Sample code: @@ -1304,7 +1347,7 @@ public final UnaryCallable resumeEngineCallable() { // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Tunes an existing engine. Only applicable if + * Tunes an existing [Engine][google.cloud.discoveryengine.v1beta.Engine]. Only applicable if * [SolutionType][google.cloud.discoveryengine.v1beta.SolutionType] is * [SOLUTION_TYPE_RECOMMENDATION][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_RECOMMENDATION]. * @@ -1335,7 +1378,7 @@ public final OperationFuture tuneEngineA // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Tunes an existing engine. Only applicable if + * Tunes an existing [Engine][google.cloud.discoveryengine.v1beta.Engine]. Only applicable if * [SolutionType][google.cloud.discoveryengine.v1beta.SolutionType] is * [SOLUTION_TYPE_RECOMMENDATION][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_RECOMMENDATION]. * @@ -1365,7 +1408,7 @@ public final OperationFuture tuneEngineA // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Tunes an existing engine. Only applicable if + * Tunes an existing [Engine][google.cloud.discoveryengine.v1beta.Engine]. Only applicable if * [SolutionType][google.cloud.discoveryengine.v1beta.SolutionType] is * [SOLUTION_TYPE_RECOMMENDATION][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_RECOMMENDATION]. * @@ -1397,7 +1440,7 @@ public final OperationFuture tuneEngineA // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Tunes an existing engine. Only applicable if + * Tunes an existing [Engine][google.cloud.discoveryengine.v1beta.Engine]. Only applicable if * [SolutionType][google.cloud.discoveryengine.v1beta.SolutionType] is * [SOLUTION_TYPE_RECOMMENDATION][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_RECOMMENDATION]. * @@ -1429,7 +1472,7 @@ public final OperationFuture tuneEngineA // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Tunes an existing engine. Only applicable if + * Tunes an existing [Engine][google.cloud.discoveryengine.v1beta.Engine]. Only applicable if * [SolutionType][google.cloud.discoveryengine.v1beta.SolutionType] is * [SOLUTION_TYPE_RECOMMENDATION][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_RECOMMENDATION]. * @@ -1457,6 +1500,290 @@ public final UnaryCallable tuneEngineCallable() { return stub.tuneEngineCallable(); } + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the IAM access control policy for an [Engine][google.cloud.discoveryengine.v1beta.Engine]. + * A `NOT_FOUND` error is returned if the resource does not exist. An empty policy is returned if + * the resource exists but does not have a policy set on it. + * + *

            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 (EngineServiceClient engineServiceClient = EngineServiceClient.create()) {
            +   *   ResourceName resource = EngineName.of("[PROJECT]", "[LOCATION]", "[COLLECTION]", "[ENGINE]");
            +   *   Policy response = engineServiceClient.getIamPolicy(resource);
            +   * }
            +   * }
            + * + * @param resource REQUIRED: The resource for which the policy is being requested. See the + * operation documentation for the appropriate value for this field. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Policy getIamPolicy(ResourceName resource) { + GetIamPolicyRequest request = + GetIamPolicyRequest.newBuilder() + .setResource(resource == null ? null : resource.toString()) + .build(); + return getIamPolicy(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the IAM access control policy for an [Engine][google.cloud.discoveryengine.v1beta.Engine]. + * A `NOT_FOUND` error is returned if the resource does not exist. An empty policy is returned if + * the resource exists but does not have a policy set on it. + * + *

            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 (EngineServiceClient engineServiceClient = EngineServiceClient.create()) {
            +   *   String resource = AclConfigName.of("[PROJECT]", "[LOCATION]").toString();
            +   *   Policy response = engineServiceClient.getIamPolicy(resource);
            +   * }
            +   * }
            + * + * @param resource REQUIRED: The resource for which the policy is being requested. See the + * operation documentation for the appropriate value for this field. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Policy getIamPolicy(String resource) { + GetIamPolicyRequest request = GetIamPolicyRequest.newBuilder().setResource(resource).build(); + return getIamPolicy(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the IAM access control policy for an [Engine][google.cloud.discoveryengine.v1beta.Engine]. + * A `NOT_FOUND` error is returned if the resource does not exist. An empty policy is returned if + * the resource exists but does not have a policy set on it. + * + *

            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 (EngineServiceClient engineServiceClient = EngineServiceClient.create()) {
            +   *   GetIamPolicyRequest request =
            +   *       GetIamPolicyRequest.newBuilder()
            +   *           .setResource(
            +   *               EngineName.of("[PROJECT]", "[LOCATION]", "[COLLECTION]", "[ENGINE]").toString())
            +   *           .setOptions(GetPolicyOptions.newBuilder().build())
            +   *           .build();
            +   *   Policy response = engineServiceClient.getIamPolicy(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 Policy getIamPolicy(GetIamPolicyRequest request) { + return getIamPolicyCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the IAM access control policy for an [Engine][google.cloud.discoveryengine.v1beta.Engine]. + * A `NOT_FOUND` error is returned if the resource does not exist. An empty policy is returned if + * the resource exists but does not have a policy set on it. + * + *

            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 (EngineServiceClient engineServiceClient = EngineServiceClient.create()) {
            +   *   GetIamPolicyRequest request =
            +   *       GetIamPolicyRequest.newBuilder()
            +   *           .setResource(
            +   *               EngineName.of("[PROJECT]", "[LOCATION]", "[COLLECTION]", "[ENGINE]").toString())
            +   *           .setOptions(GetPolicyOptions.newBuilder().build())
            +   *           .build();
            +   *   ApiFuture future = engineServiceClient.getIamPolicyCallable().futureCall(request);
            +   *   // Do something.
            +   *   Policy response = future.get();
            +   * }
            +   * }
            + */ + public final UnaryCallable getIamPolicyCallable() { + return stub.getIamPolicyCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Sets the IAM access control policy for an [Engine][google.cloud.discoveryengine.v1beta.Engine]. + * A `NOT_FOUND` error is returned if the resource does not exist. + * + *

            **Important:** When setting a policy directly on an Engine resource, the + * only recommended roles in the bindings are: `roles/discoveryengine.admin`, + * `roles/discoveryengine.agentspaceAdmin`, `roles/discoveryengine.user`, + * `roles/discoveryengine.agentspaceUser`, `roles/discoveryengine.viewer`, + * `roles/discoveryengine.agentspaceViewer`. Attempting to grant any other role will result in a + * warning in logging. + * + *

            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 (EngineServiceClient engineServiceClient = EngineServiceClient.create()) {
            +   *   ResourceName resource = EngineName.of("[PROJECT]", "[LOCATION]", "[COLLECTION]", "[ENGINE]");
            +   *   Policy policy = Policy.newBuilder().build();
            +   *   Policy response = engineServiceClient.setIamPolicy(resource, policy);
            +   * }
            +   * }
            + * + * @param resource REQUIRED: The resource for which the policy is being specified. See the + * operation documentation for the appropriate value for this field. + * @param policy REQUIRED: The complete policy to be applied to the `resource`. The size of the + * policy is limited to a few 10s of KB. An empty policy is a valid policy but certain Cloud + * Platform services (such as Projects) might reject them. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Policy setIamPolicy(ResourceName resource, Policy policy) { + SetIamPolicyRequest request = + SetIamPolicyRequest.newBuilder() + .setResource(resource == null ? null : resource.toString()) + .setPolicy(policy) + .build(); + return setIamPolicy(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Sets the IAM access control policy for an [Engine][google.cloud.discoveryengine.v1beta.Engine]. + * A `NOT_FOUND` error is returned if the resource does not exist. + * + *

            **Important:** When setting a policy directly on an Engine resource, the + * only recommended roles in the bindings are: `roles/discoveryengine.admin`, + * `roles/discoveryengine.agentspaceAdmin`, `roles/discoveryengine.user`, + * `roles/discoveryengine.agentspaceUser`, `roles/discoveryengine.viewer`, + * `roles/discoveryengine.agentspaceViewer`. Attempting to grant any other role will result in a + * warning in logging. + * + *

            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 (EngineServiceClient engineServiceClient = EngineServiceClient.create()) {
            +   *   String resource = AclConfigName.of("[PROJECT]", "[LOCATION]").toString();
            +   *   Policy policy = Policy.newBuilder().build();
            +   *   Policy response = engineServiceClient.setIamPolicy(resource, policy);
            +   * }
            +   * }
            + * + * @param resource REQUIRED: The resource for which the policy is being specified. See the + * operation documentation for the appropriate value for this field. + * @param policy REQUIRED: The complete policy to be applied to the `resource`. The size of the + * policy is limited to a few 10s of KB. An empty policy is a valid policy but certain Cloud + * Platform services (such as Projects) might reject them. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Policy setIamPolicy(String resource, Policy policy) { + SetIamPolicyRequest request = + SetIamPolicyRequest.newBuilder().setResource(resource).setPolicy(policy).build(); + return setIamPolicy(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Sets the IAM access control policy for an [Engine][google.cloud.discoveryengine.v1beta.Engine]. + * A `NOT_FOUND` error is returned if the resource does not exist. + * + *

            **Important:** When setting a policy directly on an Engine resource, the + * only recommended roles in the bindings are: `roles/discoveryengine.admin`, + * `roles/discoveryengine.agentspaceAdmin`, `roles/discoveryengine.user`, + * `roles/discoveryengine.agentspaceUser`, `roles/discoveryengine.viewer`, + * `roles/discoveryengine.agentspaceViewer`. Attempting to grant any other role will result in a + * warning in logging. + * + *

            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 (EngineServiceClient engineServiceClient = EngineServiceClient.create()) {
            +   *   SetIamPolicyRequest request =
            +   *       SetIamPolicyRequest.newBuilder()
            +   *           .setResource(
            +   *               EngineName.of("[PROJECT]", "[LOCATION]", "[COLLECTION]", "[ENGINE]").toString())
            +   *           .setPolicy(Policy.newBuilder().build())
            +   *           .setUpdateMask(FieldMask.newBuilder().build())
            +   *           .build();
            +   *   Policy response = engineServiceClient.setIamPolicy(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 Policy setIamPolicy(SetIamPolicyRequest request) { + return setIamPolicyCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Sets the IAM access control policy for an [Engine][google.cloud.discoveryengine.v1beta.Engine]. + * A `NOT_FOUND` error is returned if the resource does not exist. + * + *

            **Important:** When setting a policy directly on an Engine resource, the + * only recommended roles in the bindings are: `roles/discoveryengine.admin`, + * `roles/discoveryengine.agentspaceAdmin`, `roles/discoveryengine.user`, + * `roles/discoveryengine.agentspaceUser`, `roles/discoveryengine.viewer`, + * `roles/discoveryengine.agentspaceViewer`. Attempting to grant any other role will result in a + * warning in logging. + * + *

            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 (EngineServiceClient engineServiceClient = EngineServiceClient.create()) {
            +   *   SetIamPolicyRequest request =
            +   *       SetIamPolicyRequest.newBuilder()
            +   *           .setResource(
            +   *               EngineName.of("[PROJECT]", "[LOCATION]", "[COLLECTION]", "[ENGINE]").toString())
            +   *           .setPolicy(Policy.newBuilder().build())
            +   *           .setUpdateMask(FieldMask.newBuilder().build())
            +   *           .build();
            +   *   ApiFuture future = engineServiceClient.setIamPolicyCallable().futureCall(request);
            +   *   // Do something.
            +   *   Policy response = future.get();
            +   * }
            +   * }
            + */ + public final UnaryCallable setIamPolicyCallable() { + return stub.setIamPolicyCallable(); + } + @Override public final void close() { stub.close(); diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/EngineServiceSettings.java b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/EngineServiceSettings.java index a957bf4749d6..d0f38471a3ff 100644 --- a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/EngineServiceSettings.java +++ b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/EngineServiceSettings.java @@ -32,6 +32,9 @@ import com.google.api.gax.rpc.TransportChannelProvider; import com.google.api.gax.rpc.UnaryCallSettings; import com.google.cloud.discoveryengine.v1beta.stub.EngineServiceStubSettings; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; import com.google.longrunning.Operation; import com.google.protobuf.Empty; import java.io.IOException; @@ -176,6 +179,16 @@ public UnaryCallSettings tuneEngineSettings() { return ((EngineServiceStubSettings) getStubSettings()).tuneEngineOperationSettings(); } + /** Returns the object with the settings used for calls to getIamPolicy. */ + public UnaryCallSettings getIamPolicySettings() { + return ((EngineServiceStubSettings) getStubSettings()).getIamPolicySettings(); + } + + /** Returns the object with the settings used for calls to setIamPolicy. */ + public UnaryCallSettings setIamPolicySettings() { + return ((EngineServiceStubSettings) getStubSettings()).setIamPolicySettings(); + } + public static final EngineServiceSettings create(EngineServiceStubSettings stub) throws IOException { return new EngineServiceSettings.Builder(stub.toBuilder()).build(); @@ -348,6 +361,16 @@ public UnaryCallSettings.Builder tuneEngineSetting return getStubSettingsBuilder().tuneEngineOperationSettings(); } + /** Returns the builder for the settings used for calls to getIamPolicy. */ + public UnaryCallSettings.Builder getIamPolicySettings() { + return getStubSettingsBuilder().getIamPolicySettings(); + } + + /** Returns the builder for the settings used for calls to setIamPolicy. */ + public UnaryCallSettings.Builder setIamPolicySettings() { + return getStubSettingsBuilder().setIamPolicySettings(); + } + @Override public EngineServiceSettings build() throws IOException { return new EngineServiceSettings(this); diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/EvaluationServiceClient.java b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/EvaluationServiceClient.java index 60e37a9fb2d9..4b302e08ba04 100644 --- a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/EvaluationServiceClient.java +++ b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/EvaluationServiceClient.java @@ -767,9 +767,10 @@ public final UnaryCallable createEvaluationC * * @param evaluation Required. The evaluation resource name, such as * `projects/{project}/locations/{location}/evaluations/{evaluation}`. - *

            If the caller does not have permission to list [EvaluationResult][] under this - * evaluation, regardless of whether or not this evaluation set exists, a `PERMISSION_DENIED` - * error is returned. + *

            If the caller does not have permission to list + * [ListEvaluationResultsResponse.EvaluationResult][google.cloud.discoveryengine.v1beta.ListEvaluationResultsResponse.EvaluationResult] + * under this evaluation, regardless of whether or not this evaluation set exists, a + * `PERMISSION_DENIED` error is returned. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListEvaluationResultsPagedResponse listEvaluationResults(EvaluationName evaluation) { @@ -804,9 +805,10 @@ public final ListEvaluationResultsPagedResponse listEvaluationResults(Evaluation * * @param evaluation Required. The evaluation resource name, such as * `projects/{project}/locations/{location}/evaluations/{evaluation}`. - *

            If the caller does not have permission to list [EvaluationResult][] under this - * evaluation, regardless of whether or not this evaluation set exists, a `PERMISSION_DENIED` - * error is returned. + *

            If the caller does not have permission to list + * [ListEvaluationResultsResponse.EvaluationResult][google.cloud.discoveryengine.v1beta.ListEvaluationResultsResponse.EvaluationResult] + * under this evaluation, regardless of whether or not this evaluation set exists, a + * `PERMISSION_DENIED` error is returned. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListEvaluationResultsPagedResponse listEvaluationResults(String evaluation) { diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/IdentityMappingStoreServiceClient.java b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/IdentityMappingStoreServiceClient.java new file mode 100644 index 000000000000..eacd312a2f2d --- /dev/null +++ b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/IdentityMappingStoreServiceClient.java @@ -0,0 +1,1499 @@ +/* + * 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.discoveryengine.v1beta; + +import com.google.api.core.ApiFuture; +import com.google.api.core.ApiFutures; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.httpjson.longrunning.OperationsClient; +import com.google.api.gax.longrunning.OperationFuture; +import com.google.api.gax.paging.AbstractFixedSizeCollection; +import com.google.api.gax.paging.AbstractPage; +import com.google.api.gax.paging.AbstractPagedListResponse; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PageContext; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.discoveryengine.v1beta.stub.IdentityMappingStoreServiceStub; +import com.google.cloud.discoveryengine.v1beta.stub.IdentityMappingStoreServiceStubSettings; +import com.google.common.util.concurrent.MoreExecutors; +import com.google.longrunning.Operation; +import com.google.protobuf.Empty; +import java.io.IOException; +import java.util.List; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Service Description: Service for managing Identity Mapping Stores. + * + *

            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: + * + *

            {@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 (IdentityMappingStoreServiceClient identityMappingStoreServiceClient =
            + *     IdentityMappingStoreServiceClient.create()) {
            + *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
            + *   IdentityMappingStore identityMappingStore = IdentityMappingStore.newBuilder().build();
            + *   String identityMappingStoreId = "identityMappingStoreId677904780";
            + *   IdentityMappingStore response =
            + *       identityMappingStoreServiceClient.createIdentityMappingStore(
            + *           parent, identityMappingStore, identityMappingStoreId);
            + * }
            + * }
            + * + *

            Note: close() needs to be called on the IdentityMappingStoreServiceClient object to clean up + * resources such as threads. In the example above, try-with-resources is used, which automatically + * calls close(). + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
            Methods
            MethodDescriptionMethod Variants

            CreateIdentityMappingStore

            Creates a new Identity Mapping Store.

            + *

            Request object method variants only take one parameter, a request object, which must be constructed before the call.

            + *
              + *
            • createIdentityMappingStore(CreateIdentityMappingStoreRequest request) + *

            + *

            "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

            + *
              + *
            • createIdentityMappingStore(LocationName parent, IdentityMappingStore identityMappingStore, String identityMappingStoreId) + *

            • createIdentityMappingStore(String parent, IdentityMappingStore identityMappingStore, String identityMappingStoreId) + *

            + *

            Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

            + *
              + *
            • createIdentityMappingStoreCallable() + *

            + *

            GetIdentityMappingStore

            Gets the Identity Mapping Store.

            + *

            Request object method variants only take one parameter, a request object, which must be constructed before the call.

            + *
              + *
            • getIdentityMappingStore(GetIdentityMappingStoreRequest request) + *

            + *

            "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

            + *
              + *
            • getIdentityMappingStore(IdentityMappingStoreName name) + *

            • getIdentityMappingStore(String name) + *

            + *

            Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

            + *
              + *
            • getIdentityMappingStoreCallable() + *

            + *

            DeleteIdentityMappingStore

            Deletes the Identity Mapping Store.

            + *

            Request object method variants only take one parameter, a request object, which must be constructed before the call.

            + *
              + *
            • deleteIdentityMappingStoreAsync(DeleteIdentityMappingStoreRequest request) + *

            + *

            Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

            + *
              + *
            • deleteIdentityMappingStoreAsync(IdentityMappingStoreName name) + *

            • deleteIdentityMappingStoreAsync(String name) + *

            + *

            Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

            + *
              + *
            • deleteIdentityMappingStoreOperationCallable() + *

            • deleteIdentityMappingStoreCallable() + *

            + *

            ImportIdentityMappings

            Imports a list of Identity Mapping Entries to an Identity Mapping Store.

            + *

            Request object method variants only take one parameter, a request object, which must be constructed before the call.

            + *
              + *
            • importIdentityMappingsAsync(ImportIdentityMappingsRequest request) + *

            + *

            Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

            + *
              + *
            • importIdentityMappingsOperationCallable() + *

            • importIdentityMappingsCallable() + *

            + *

            PurgeIdentityMappings

            Purges specified or all Identity Mapping Entries from an Identity Mapping Store.

            + *

            Request object method variants only take one parameter, a request object, which must be constructed before the call.

            + *
              + *
            • purgeIdentityMappingsAsync(PurgeIdentityMappingsRequest request) + *

            + *

            Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

            + *
              + *
            • purgeIdentityMappingsOperationCallable() + *

            • purgeIdentityMappingsCallable() + *

            + *

            ListIdentityMappings

            Lists Identity Mappings in an Identity Mapping Store.

            + *

            Request object method variants only take one parameter, a request object, which must be constructed before the call.

            + *
              + *
            • listIdentityMappings(ListIdentityMappingsRequest request) + *

            + *

            Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

            + *
              + *
            • listIdentityMappingsPagedCallable() + *

            • listIdentityMappingsCallable() + *

            + *

            ListIdentityMappingStores

            Lists all Identity Mapping Stores.

            + *

            Request object method variants only take one parameter, a request object, which must be constructed before the call.

            + *
              + *
            • listIdentityMappingStores(ListIdentityMappingStoresRequest request) + *

            + *

            "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

            + *
              + *
            • listIdentityMappingStores(LocationName parent) + *

            • listIdentityMappingStores(String parent) + *

            + *

            Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

            + *
              + *
            • listIdentityMappingStoresPagedCallable() + *

            • listIdentityMappingStoresCallable() + *

            + *
            + * + *

            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 + * IdentityMappingStoreServiceSettings to create(). For example: + * + *

            To customize credentials: + * + *

            {@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
            + * IdentityMappingStoreServiceSettings identityMappingStoreServiceSettings =
            + *     IdentityMappingStoreServiceSettings.newBuilder()
            + *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
            + *         .build();
            + * IdentityMappingStoreServiceClient identityMappingStoreServiceClient =
            + *     IdentityMappingStoreServiceClient.create(identityMappingStoreServiceSettings);
            + * }
            + * + *

            To customize the endpoint: + * + *

            {@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
            + * IdentityMappingStoreServiceSettings identityMappingStoreServiceSettings =
            + *     IdentityMappingStoreServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
            + * IdentityMappingStoreServiceClient identityMappingStoreServiceClient =
            + *     IdentityMappingStoreServiceClient.create(identityMappingStoreServiceSettings);
            + * }
            + * + *

            To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over + * the wire: + * + *

            {@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
            + * IdentityMappingStoreServiceSettings identityMappingStoreServiceSettings =
            + *     IdentityMappingStoreServiceSettings.newHttpJsonBuilder().build();
            + * IdentityMappingStoreServiceClient identityMappingStoreServiceClient =
            + *     IdentityMappingStoreServiceClient.create(identityMappingStoreServiceSettings);
            + * }
            + * + *

            Please refer to the GitHub repository's samples for more quickstart code snippets. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class IdentityMappingStoreServiceClient implements BackgroundResource { + private final IdentityMappingStoreServiceSettings settings; + private final IdentityMappingStoreServiceStub stub; + private final OperationsClient httpJsonOperationsClient; + private final com.google.longrunning.OperationsClient operationsClient; + + /** Constructs an instance of IdentityMappingStoreServiceClient with default settings. */ + public static final IdentityMappingStoreServiceClient create() throws IOException { + return create(IdentityMappingStoreServiceSettings.newBuilder().build()); + } + + /** + * Constructs an instance of IdentityMappingStoreServiceClient, 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 IdentityMappingStoreServiceClient create( + IdentityMappingStoreServiceSettings settings) throws IOException { + return new IdentityMappingStoreServiceClient(settings); + } + + /** + * Constructs an instance of IdentityMappingStoreServiceClient, using the given stub for making + * calls. This is for advanced usage - prefer using create(IdentityMappingStoreServiceSettings). + */ + public static final IdentityMappingStoreServiceClient create( + IdentityMappingStoreServiceStub stub) { + return new IdentityMappingStoreServiceClient(stub); + } + + /** + * Constructs an instance of IdentityMappingStoreServiceClient, 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 IdentityMappingStoreServiceClient(IdentityMappingStoreServiceSettings settings) + throws IOException { + this.settings = settings; + this.stub = ((IdentityMappingStoreServiceStubSettings) settings.getStubSettings()).createStub(); + this.operationsClient = + com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub()); + this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub()); + } + + protected IdentityMappingStoreServiceClient(IdentityMappingStoreServiceStub stub) { + this.settings = null; + this.stub = stub; + this.operationsClient = + com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub()); + this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub()); + } + + public final IdentityMappingStoreServiceSettings getSettings() { + return settings; + } + + public IdentityMappingStoreServiceStub getStub() { + return stub; + } + + /** + * Returns the OperationsClient that can be used to query the status of a long-running operation + * returned by another API method call. + */ + public final com.google.longrunning.OperationsClient getOperationsClient() { + return operationsClient; + } + + /** + * Returns the OperationsClient that can be used to query the status of a long-running operation + * returned by another API method call. + */ + @BetaApi + public final OperationsClient getHttpJsonOperationsClient() { + return httpJsonOperationsClient; + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new Identity Mapping Store. + * + *

            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 (IdentityMappingStoreServiceClient identityMappingStoreServiceClient =
            +   *     IdentityMappingStoreServiceClient.create()) {
            +   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
            +   *   IdentityMappingStore identityMappingStore = IdentityMappingStore.newBuilder().build();
            +   *   String identityMappingStoreId = "identityMappingStoreId677904780";
            +   *   IdentityMappingStore response =
            +   *       identityMappingStoreServiceClient.createIdentityMappingStore(
            +   *           parent, identityMappingStore, identityMappingStoreId);
            +   * }
            +   * }
            + * + * @param parent Required. The parent collection resource name, such as + * `projects/{project}/locations/{location}`. + * @param identityMappingStore Required. The Identity Mapping Store to create. + * @param identityMappingStoreId Required. The ID of the Identity Mapping Store to create. + *

            The ID must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), and hyphens + * (-). The maximum length is 63 characters. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final IdentityMappingStore createIdentityMappingStore( + LocationName parent, + IdentityMappingStore identityMappingStore, + String identityMappingStoreId) { + CreateIdentityMappingStoreRequest request = + CreateIdentityMappingStoreRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setIdentityMappingStore(identityMappingStore) + .setIdentityMappingStoreId(identityMappingStoreId) + .build(); + return createIdentityMappingStore(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new Identity Mapping Store. + * + *

            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 (IdentityMappingStoreServiceClient identityMappingStoreServiceClient =
            +   *     IdentityMappingStoreServiceClient.create()) {
            +   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
            +   *   IdentityMappingStore identityMappingStore = IdentityMappingStore.newBuilder().build();
            +   *   String identityMappingStoreId = "identityMappingStoreId677904780";
            +   *   IdentityMappingStore response =
            +   *       identityMappingStoreServiceClient.createIdentityMappingStore(
            +   *           parent, identityMappingStore, identityMappingStoreId);
            +   * }
            +   * }
            + * + * @param parent Required. The parent collection resource name, such as + * `projects/{project}/locations/{location}`. + * @param identityMappingStore Required. The Identity Mapping Store to create. + * @param identityMappingStoreId Required. The ID of the Identity Mapping Store to create. + *

            The ID must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), and hyphens + * (-). The maximum length is 63 characters. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final IdentityMappingStore createIdentityMappingStore( + String parent, IdentityMappingStore identityMappingStore, String identityMappingStoreId) { + CreateIdentityMappingStoreRequest request = + CreateIdentityMappingStoreRequest.newBuilder() + .setParent(parent) + .setIdentityMappingStore(identityMappingStore) + .setIdentityMappingStoreId(identityMappingStoreId) + .build(); + return createIdentityMappingStore(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new Identity Mapping Store. + * + *

            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 (IdentityMappingStoreServiceClient identityMappingStoreServiceClient =
            +   *     IdentityMappingStoreServiceClient.create()) {
            +   *   CreateIdentityMappingStoreRequest request =
            +   *       CreateIdentityMappingStoreRequest.newBuilder()
            +   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
            +   *           .setIdentityMappingStoreId("identityMappingStoreId677904780")
            +   *           .setIdentityMappingStore(IdentityMappingStore.newBuilder().build())
            +   *           .build();
            +   *   IdentityMappingStore response =
            +   *       identityMappingStoreServiceClient.createIdentityMappingStore(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 IdentityMappingStore createIdentityMappingStore( + CreateIdentityMappingStoreRequest request) { + return createIdentityMappingStoreCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new Identity Mapping Store. + * + *

            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 (IdentityMappingStoreServiceClient identityMappingStoreServiceClient =
            +   *     IdentityMappingStoreServiceClient.create()) {
            +   *   CreateIdentityMappingStoreRequest request =
            +   *       CreateIdentityMappingStoreRequest.newBuilder()
            +   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
            +   *           .setIdentityMappingStoreId("identityMappingStoreId677904780")
            +   *           .setIdentityMappingStore(IdentityMappingStore.newBuilder().build())
            +   *           .build();
            +   *   ApiFuture future =
            +   *       identityMappingStoreServiceClient
            +   *           .createIdentityMappingStoreCallable()
            +   *           .futureCall(request);
            +   *   // Do something.
            +   *   IdentityMappingStore response = future.get();
            +   * }
            +   * }
            + */ + public final UnaryCallable + createIdentityMappingStoreCallable() { + return stub.createIdentityMappingStoreCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the Identity Mapping Store. + * + *

            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 (IdentityMappingStoreServiceClient identityMappingStoreServiceClient =
            +   *     IdentityMappingStoreServiceClient.create()) {
            +   *   IdentityMappingStoreName name =
            +   *       IdentityMappingStoreName.of("[PROJECT]", "[LOCATION]", "[IDENTITY_MAPPING_STORE]");
            +   *   IdentityMappingStore response =
            +   *       identityMappingStoreServiceClient.getIdentityMappingStore(name);
            +   * }
            +   * }
            + * + * @param name Required. The name of the Identity Mapping Store to get. Format: + * `projects/{project}/locations/{location}/identityMappingStores/{identityMappingStore}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final IdentityMappingStore getIdentityMappingStore(IdentityMappingStoreName name) { + GetIdentityMappingStoreRequest request = + GetIdentityMappingStoreRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return getIdentityMappingStore(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the Identity Mapping Store. + * + *

            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 (IdentityMappingStoreServiceClient identityMappingStoreServiceClient =
            +   *     IdentityMappingStoreServiceClient.create()) {
            +   *   String name =
            +   *       IdentityMappingStoreName.of("[PROJECT]", "[LOCATION]", "[IDENTITY_MAPPING_STORE]")
            +   *           .toString();
            +   *   IdentityMappingStore response =
            +   *       identityMappingStoreServiceClient.getIdentityMappingStore(name);
            +   * }
            +   * }
            + * + * @param name Required. The name of the Identity Mapping Store to get. Format: + * `projects/{project}/locations/{location}/identityMappingStores/{identityMappingStore}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final IdentityMappingStore getIdentityMappingStore(String name) { + GetIdentityMappingStoreRequest request = + GetIdentityMappingStoreRequest.newBuilder().setName(name).build(); + return getIdentityMappingStore(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the Identity Mapping Store. + * + *

            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 (IdentityMappingStoreServiceClient identityMappingStoreServiceClient =
            +   *     IdentityMappingStoreServiceClient.create()) {
            +   *   GetIdentityMappingStoreRequest request =
            +   *       GetIdentityMappingStoreRequest.newBuilder()
            +   *           .setName(
            +   *               IdentityMappingStoreName.of("[PROJECT]", "[LOCATION]", "[IDENTITY_MAPPING_STORE]")
            +   *                   .toString())
            +   *           .build();
            +   *   IdentityMappingStore response =
            +   *       identityMappingStoreServiceClient.getIdentityMappingStore(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 IdentityMappingStore getIdentityMappingStore( + GetIdentityMappingStoreRequest request) { + return getIdentityMappingStoreCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the Identity Mapping Store. + * + *

            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 (IdentityMappingStoreServiceClient identityMappingStoreServiceClient =
            +   *     IdentityMappingStoreServiceClient.create()) {
            +   *   GetIdentityMappingStoreRequest request =
            +   *       GetIdentityMappingStoreRequest.newBuilder()
            +   *           .setName(
            +   *               IdentityMappingStoreName.of("[PROJECT]", "[LOCATION]", "[IDENTITY_MAPPING_STORE]")
            +   *                   .toString())
            +   *           .build();
            +   *   ApiFuture future =
            +   *       identityMappingStoreServiceClient.getIdentityMappingStoreCallable().futureCall(request);
            +   *   // Do something.
            +   *   IdentityMappingStore response = future.get();
            +   * }
            +   * }
            + */ + public final UnaryCallable + getIdentityMappingStoreCallable() { + return stub.getIdentityMappingStoreCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes the Identity Mapping Store. + * + *

            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 (IdentityMappingStoreServiceClient identityMappingStoreServiceClient =
            +   *     IdentityMappingStoreServiceClient.create()) {
            +   *   IdentityMappingStoreName name =
            +   *       IdentityMappingStoreName.of("[PROJECT]", "[LOCATION]", "[IDENTITY_MAPPING_STORE]");
            +   *   identityMappingStoreServiceClient.deleteIdentityMappingStoreAsync(name).get();
            +   * }
            +   * }
            + * + * @param name Required. The name of the Identity Mapping Store to delete. Format: + * `projects/{project}/locations/{location}/identityMappingStores/{identityMappingStore}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture + deleteIdentityMappingStoreAsync(IdentityMappingStoreName name) { + DeleteIdentityMappingStoreRequest request = + DeleteIdentityMappingStoreRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return deleteIdentityMappingStoreAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes the Identity Mapping Store. + * + *

            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 (IdentityMappingStoreServiceClient identityMappingStoreServiceClient =
            +   *     IdentityMappingStoreServiceClient.create()) {
            +   *   String name =
            +   *       IdentityMappingStoreName.of("[PROJECT]", "[LOCATION]", "[IDENTITY_MAPPING_STORE]")
            +   *           .toString();
            +   *   identityMappingStoreServiceClient.deleteIdentityMappingStoreAsync(name).get();
            +   * }
            +   * }
            + * + * @param name Required. The name of the Identity Mapping Store to delete. Format: + * `projects/{project}/locations/{location}/identityMappingStores/{identityMappingStore}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture + deleteIdentityMappingStoreAsync(String name) { + DeleteIdentityMappingStoreRequest request = + DeleteIdentityMappingStoreRequest.newBuilder().setName(name).build(); + return deleteIdentityMappingStoreAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes the Identity Mapping Store. + * + *

            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 (IdentityMappingStoreServiceClient identityMappingStoreServiceClient =
            +   *     IdentityMappingStoreServiceClient.create()) {
            +   *   DeleteIdentityMappingStoreRequest request =
            +   *       DeleteIdentityMappingStoreRequest.newBuilder()
            +   *           .setName(
            +   *               IdentityMappingStoreName.of("[PROJECT]", "[LOCATION]", "[IDENTITY_MAPPING_STORE]")
            +   *                   .toString())
            +   *           .build();
            +   *   identityMappingStoreServiceClient.deleteIdentityMappingStoreAsync(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 + deleteIdentityMappingStoreAsync(DeleteIdentityMappingStoreRequest request) { + return deleteIdentityMappingStoreOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes the Identity Mapping Store. + * + *

            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 (IdentityMappingStoreServiceClient identityMappingStoreServiceClient =
            +   *     IdentityMappingStoreServiceClient.create()) {
            +   *   DeleteIdentityMappingStoreRequest request =
            +   *       DeleteIdentityMappingStoreRequest.newBuilder()
            +   *           .setName(
            +   *               IdentityMappingStoreName.of("[PROJECT]", "[LOCATION]", "[IDENTITY_MAPPING_STORE]")
            +   *                   .toString())
            +   *           .build();
            +   *   OperationFuture future =
            +   *       identityMappingStoreServiceClient
            +   *           .deleteIdentityMappingStoreOperationCallable()
            +   *           .futureCall(request);
            +   *   // Do something.
            +   *   future.get();
            +   * }
            +   * }
            + */ + public final OperationCallable< + DeleteIdentityMappingStoreRequest, Empty, DeleteIdentityMappingStoreMetadata> + deleteIdentityMappingStoreOperationCallable() { + return stub.deleteIdentityMappingStoreOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes the Identity Mapping Store. + * + *

            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 (IdentityMappingStoreServiceClient identityMappingStoreServiceClient =
            +   *     IdentityMappingStoreServiceClient.create()) {
            +   *   DeleteIdentityMappingStoreRequest request =
            +   *       DeleteIdentityMappingStoreRequest.newBuilder()
            +   *           .setName(
            +   *               IdentityMappingStoreName.of("[PROJECT]", "[LOCATION]", "[IDENTITY_MAPPING_STORE]")
            +   *                   .toString())
            +   *           .build();
            +   *   ApiFuture future =
            +   *       identityMappingStoreServiceClient
            +   *           .deleteIdentityMappingStoreCallable()
            +   *           .futureCall(request);
            +   *   // Do something.
            +   *   future.get();
            +   * }
            +   * }
            + */ + public final UnaryCallable + deleteIdentityMappingStoreCallable() { + return stub.deleteIdentityMappingStoreCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Imports a list of Identity Mapping Entries to an Identity Mapping Store. + * + *

            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 (IdentityMappingStoreServiceClient identityMappingStoreServiceClient =
            +   *     IdentityMappingStoreServiceClient.create()) {
            +   *   ImportIdentityMappingsRequest request =
            +   *       ImportIdentityMappingsRequest.newBuilder()
            +   *           .setIdentityMappingStore(
            +   *               IdentityMappingStoreName.of("[PROJECT]", "[LOCATION]", "[IDENTITY_MAPPING_STORE]")
            +   *                   .toString())
            +   *           .build();
            +   *   ImportIdentityMappingsResponse response =
            +   *       identityMappingStoreServiceClient.importIdentityMappingsAsync(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< + ImportIdentityMappingsResponse, IdentityMappingEntryOperationMetadata> + importIdentityMappingsAsync(ImportIdentityMappingsRequest request) { + return importIdentityMappingsOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Imports a list of Identity Mapping Entries to an Identity Mapping Store. + * + *

            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 (IdentityMappingStoreServiceClient identityMappingStoreServiceClient =
            +   *     IdentityMappingStoreServiceClient.create()) {
            +   *   ImportIdentityMappingsRequest request =
            +   *       ImportIdentityMappingsRequest.newBuilder()
            +   *           .setIdentityMappingStore(
            +   *               IdentityMappingStoreName.of("[PROJECT]", "[LOCATION]", "[IDENTITY_MAPPING_STORE]")
            +   *                   .toString())
            +   *           .build();
            +   *   OperationFuture
            +   *       future =
            +   *           identityMappingStoreServiceClient
            +   *               .importIdentityMappingsOperationCallable()
            +   *               .futureCall(request);
            +   *   // Do something.
            +   *   ImportIdentityMappingsResponse response = future.get();
            +   * }
            +   * }
            + */ + public final OperationCallable< + ImportIdentityMappingsRequest, + ImportIdentityMappingsResponse, + IdentityMappingEntryOperationMetadata> + importIdentityMappingsOperationCallable() { + return stub.importIdentityMappingsOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Imports a list of Identity Mapping Entries to an Identity Mapping Store. + * + *

            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 (IdentityMappingStoreServiceClient identityMappingStoreServiceClient =
            +   *     IdentityMappingStoreServiceClient.create()) {
            +   *   ImportIdentityMappingsRequest request =
            +   *       ImportIdentityMappingsRequest.newBuilder()
            +   *           .setIdentityMappingStore(
            +   *               IdentityMappingStoreName.of("[PROJECT]", "[LOCATION]", "[IDENTITY_MAPPING_STORE]")
            +   *                   .toString())
            +   *           .build();
            +   *   ApiFuture future =
            +   *       identityMappingStoreServiceClient.importIdentityMappingsCallable().futureCall(request);
            +   *   // Do something.
            +   *   Operation response = future.get();
            +   * }
            +   * }
            + */ + public final UnaryCallable + importIdentityMappingsCallable() { + return stub.importIdentityMappingsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Purges specified or all Identity Mapping Entries from an Identity Mapping Store. + * + *

            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 (IdentityMappingStoreServiceClient identityMappingStoreServiceClient =
            +   *     IdentityMappingStoreServiceClient.create()) {
            +   *   PurgeIdentityMappingsRequest request =
            +   *       PurgeIdentityMappingsRequest.newBuilder()
            +   *           .setIdentityMappingStore(
            +   *               IdentityMappingStoreName.of("[PROJECT]", "[LOCATION]", "[IDENTITY_MAPPING_STORE]")
            +   *                   .toString())
            +   *           .setFilter("filter-1274492040")
            +   *           .setForce(true)
            +   *           .build();
            +   *   identityMappingStoreServiceClient.purgeIdentityMappingsAsync(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 + purgeIdentityMappingsAsync(PurgeIdentityMappingsRequest request) { + return purgeIdentityMappingsOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Purges specified or all Identity Mapping Entries from an Identity Mapping Store. + * + *

            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 (IdentityMappingStoreServiceClient identityMappingStoreServiceClient =
            +   *     IdentityMappingStoreServiceClient.create()) {
            +   *   PurgeIdentityMappingsRequest request =
            +   *       PurgeIdentityMappingsRequest.newBuilder()
            +   *           .setIdentityMappingStore(
            +   *               IdentityMappingStoreName.of("[PROJECT]", "[LOCATION]", "[IDENTITY_MAPPING_STORE]")
            +   *                   .toString())
            +   *           .setFilter("filter-1274492040")
            +   *           .setForce(true)
            +   *           .build();
            +   *   OperationFuture future =
            +   *       identityMappingStoreServiceClient
            +   *           .purgeIdentityMappingsOperationCallable()
            +   *           .futureCall(request);
            +   *   // Do something.
            +   *   future.get();
            +   * }
            +   * }
            + */ + public final OperationCallable< + PurgeIdentityMappingsRequest, Empty, IdentityMappingEntryOperationMetadata> + purgeIdentityMappingsOperationCallable() { + return stub.purgeIdentityMappingsOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Purges specified or all Identity Mapping Entries from an Identity Mapping Store. + * + *

            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 (IdentityMappingStoreServiceClient identityMappingStoreServiceClient =
            +   *     IdentityMappingStoreServiceClient.create()) {
            +   *   PurgeIdentityMappingsRequest request =
            +   *       PurgeIdentityMappingsRequest.newBuilder()
            +   *           .setIdentityMappingStore(
            +   *               IdentityMappingStoreName.of("[PROJECT]", "[LOCATION]", "[IDENTITY_MAPPING_STORE]")
            +   *                   .toString())
            +   *           .setFilter("filter-1274492040")
            +   *           .setForce(true)
            +   *           .build();
            +   *   ApiFuture future =
            +   *       identityMappingStoreServiceClient.purgeIdentityMappingsCallable().futureCall(request);
            +   *   // Do something.
            +   *   future.get();
            +   * }
            +   * }
            + */ + public final UnaryCallable + purgeIdentityMappingsCallable() { + return stub.purgeIdentityMappingsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Identity Mappings in an Identity Mapping Store. + * + *

            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 (IdentityMappingStoreServiceClient identityMappingStoreServiceClient =
            +   *     IdentityMappingStoreServiceClient.create()) {
            +   *   ListIdentityMappingsRequest request =
            +   *       ListIdentityMappingsRequest.newBuilder()
            +   *           .setIdentityMappingStore(
            +   *               IdentityMappingStoreName.of("[PROJECT]", "[LOCATION]", "[IDENTITY_MAPPING_STORE]")
            +   *                   .toString())
            +   *           .setPageSize(883849137)
            +   *           .setPageToken("pageToken873572522")
            +   *           .build();
            +   *   for (IdentityMappingEntry element :
            +   *       identityMappingStoreServiceClient.listIdentityMappings(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 ListIdentityMappingsPagedResponse listIdentityMappings( + ListIdentityMappingsRequest request) { + return listIdentityMappingsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Identity Mappings in an Identity Mapping Store. + * + *

            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 (IdentityMappingStoreServiceClient identityMappingStoreServiceClient =
            +   *     IdentityMappingStoreServiceClient.create()) {
            +   *   ListIdentityMappingsRequest request =
            +   *       ListIdentityMappingsRequest.newBuilder()
            +   *           .setIdentityMappingStore(
            +   *               IdentityMappingStoreName.of("[PROJECT]", "[LOCATION]", "[IDENTITY_MAPPING_STORE]")
            +   *                   .toString())
            +   *           .setPageSize(883849137)
            +   *           .setPageToken("pageToken873572522")
            +   *           .build();
            +   *   ApiFuture future =
            +   *       identityMappingStoreServiceClient.listIdentityMappingsPagedCallable().futureCall(request);
            +   *   // Do something.
            +   *   for (IdentityMappingEntry element : future.get().iterateAll()) {
            +   *     // doThingsWith(element);
            +   *   }
            +   * }
            +   * }
            + */ + public final UnaryCallable + listIdentityMappingsPagedCallable() { + return stub.listIdentityMappingsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Identity Mappings in an Identity Mapping Store. + * + *

            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 (IdentityMappingStoreServiceClient identityMappingStoreServiceClient =
            +   *     IdentityMappingStoreServiceClient.create()) {
            +   *   ListIdentityMappingsRequest request =
            +   *       ListIdentityMappingsRequest.newBuilder()
            +   *           .setIdentityMappingStore(
            +   *               IdentityMappingStoreName.of("[PROJECT]", "[LOCATION]", "[IDENTITY_MAPPING_STORE]")
            +   *                   .toString())
            +   *           .setPageSize(883849137)
            +   *           .setPageToken("pageToken873572522")
            +   *           .build();
            +   *   while (true) {
            +   *     ListIdentityMappingsResponse response =
            +   *         identityMappingStoreServiceClient.listIdentityMappingsCallable().call(request);
            +   *     for (IdentityMappingEntry element : response.getIdentityMappingEntriesList()) {
            +   *       // doThingsWith(element);
            +   *     }
            +   *     String nextPageToken = response.getNextPageToken();
            +   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
            +   *       request = request.toBuilder().setPageToken(nextPageToken).build();
            +   *     } else {
            +   *       break;
            +   *     }
            +   *   }
            +   * }
            +   * }
            + */ + public final UnaryCallable + listIdentityMappingsCallable() { + return stub.listIdentityMappingsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all Identity Mapping Stores. + * + *

            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 (IdentityMappingStoreServiceClient identityMappingStoreServiceClient =
            +   *     IdentityMappingStoreServiceClient.create()) {
            +   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
            +   *   for (IdentityMappingStore element :
            +   *       identityMappingStoreServiceClient.listIdentityMappingStores(parent).iterateAll()) {
            +   *     // doThingsWith(element);
            +   *   }
            +   * }
            +   * }
            + * + * @param parent Required. The parent of the Identity Mapping Stores to list. Format: + * `projects/{project}/locations/{location}`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListIdentityMappingStoresPagedResponse listIdentityMappingStores( + LocationName parent) { + ListIdentityMappingStoresRequest request = + ListIdentityMappingStoresRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listIdentityMappingStores(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all Identity Mapping Stores. + * + *

            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 (IdentityMappingStoreServiceClient identityMappingStoreServiceClient =
            +   *     IdentityMappingStoreServiceClient.create()) {
            +   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
            +   *   for (IdentityMappingStore element :
            +   *       identityMappingStoreServiceClient.listIdentityMappingStores(parent).iterateAll()) {
            +   *     // doThingsWith(element);
            +   *   }
            +   * }
            +   * }
            + * + * @param parent Required. The parent of the Identity Mapping Stores to list. Format: + * `projects/{project}/locations/{location}`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListIdentityMappingStoresPagedResponse listIdentityMappingStores(String parent) { + ListIdentityMappingStoresRequest request = + ListIdentityMappingStoresRequest.newBuilder().setParent(parent).build(); + return listIdentityMappingStores(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all Identity Mapping Stores. + * + *

            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 (IdentityMappingStoreServiceClient identityMappingStoreServiceClient =
            +   *     IdentityMappingStoreServiceClient.create()) {
            +   *   ListIdentityMappingStoresRequest request =
            +   *       ListIdentityMappingStoresRequest.newBuilder()
            +   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
            +   *           .setPageSize(883849137)
            +   *           .setPageToken("pageToken873572522")
            +   *           .build();
            +   *   for (IdentityMappingStore element :
            +   *       identityMappingStoreServiceClient.listIdentityMappingStores(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 ListIdentityMappingStoresPagedResponse listIdentityMappingStores( + ListIdentityMappingStoresRequest request) { + return listIdentityMappingStoresPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all Identity Mapping Stores. + * + *

            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 (IdentityMappingStoreServiceClient identityMappingStoreServiceClient =
            +   *     IdentityMappingStoreServiceClient.create()) {
            +   *   ListIdentityMappingStoresRequest request =
            +   *       ListIdentityMappingStoresRequest.newBuilder()
            +   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
            +   *           .setPageSize(883849137)
            +   *           .setPageToken("pageToken873572522")
            +   *           .build();
            +   *   ApiFuture future =
            +   *       identityMappingStoreServiceClient
            +   *           .listIdentityMappingStoresPagedCallable()
            +   *           .futureCall(request);
            +   *   // Do something.
            +   *   for (IdentityMappingStore element : future.get().iterateAll()) {
            +   *     // doThingsWith(element);
            +   *   }
            +   * }
            +   * }
            + */ + public final UnaryCallable< + ListIdentityMappingStoresRequest, ListIdentityMappingStoresPagedResponse> + listIdentityMappingStoresPagedCallable() { + return stub.listIdentityMappingStoresPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all Identity Mapping Stores. + * + *

            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 (IdentityMappingStoreServiceClient identityMappingStoreServiceClient =
            +   *     IdentityMappingStoreServiceClient.create()) {
            +   *   ListIdentityMappingStoresRequest request =
            +   *       ListIdentityMappingStoresRequest.newBuilder()
            +   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
            +   *           .setPageSize(883849137)
            +   *           .setPageToken("pageToken873572522")
            +   *           .build();
            +   *   while (true) {
            +   *     ListIdentityMappingStoresResponse response =
            +   *         identityMappingStoreServiceClient.listIdentityMappingStoresCallable().call(request);
            +   *     for (IdentityMappingStore element : response.getIdentityMappingStoresList()) {
            +   *       // doThingsWith(element);
            +   *     }
            +   *     String nextPageToken = response.getNextPageToken();
            +   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
            +   *       request = request.toBuilder().setPageToken(nextPageToken).build();
            +   *     } else {
            +   *       break;
            +   *     }
            +   *   }
            +   * }
            +   * }
            + */ + public final UnaryCallable + listIdentityMappingStoresCallable() { + return stub.listIdentityMappingStoresCallable(); + } + + @Override + public final void close() { + stub.close(); + } + + @Override + public void shutdown() { + stub.shutdown(); + } + + @Override + public boolean isShutdown() { + return stub.isShutdown(); + } + + @Override + public boolean isTerminated() { + return stub.isTerminated(); + } + + @Override + public void shutdownNow() { + stub.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return stub.awaitTermination(duration, unit); + } + + public static class ListIdentityMappingsPagedResponse + extends AbstractPagedListResponse< + ListIdentityMappingsRequest, + ListIdentityMappingsResponse, + IdentityMappingEntry, + ListIdentityMappingsPage, + ListIdentityMappingsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext + context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListIdentityMappingsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListIdentityMappingsPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListIdentityMappingsPagedResponse(ListIdentityMappingsPage page) { + super(page, ListIdentityMappingsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListIdentityMappingsPage + extends AbstractPage< + ListIdentityMappingsRequest, + ListIdentityMappingsResponse, + IdentityMappingEntry, + ListIdentityMappingsPage> { + + private ListIdentityMappingsPage( + PageContext + context, + ListIdentityMappingsResponse response) { + super(context, response); + } + + private static ListIdentityMappingsPage createEmptyPage() { + return new ListIdentityMappingsPage(null, null); + } + + @Override + protected ListIdentityMappingsPage createPage( + PageContext + context, + ListIdentityMappingsResponse response) { + return new ListIdentityMappingsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext + context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListIdentityMappingsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListIdentityMappingsRequest, + ListIdentityMappingsResponse, + IdentityMappingEntry, + ListIdentityMappingsPage, + ListIdentityMappingsFixedSizeCollection> { + + private ListIdentityMappingsFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListIdentityMappingsFixedSizeCollection createEmptyCollection() { + return new ListIdentityMappingsFixedSizeCollection(null, 0); + } + + @Override + protected ListIdentityMappingsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListIdentityMappingsFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListIdentityMappingStoresPagedResponse + extends AbstractPagedListResponse< + ListIdentityMappingStoresRequest, + ListIdentityMappingStoresResponse, + IdentityMappingStore, + ListIdentityMappingStoresPage, + ListIdentityMappingStoresFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext< + ListIdentityMappingStoresRequest, + ListIdentityMappingStoresResponse, + IdentityMappingStore> + context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListIdentityMappingStoresPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListIdentityMappingStoresPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListIdentityMappingStoresPagedResponse(ListIdentityMappingStoresPage page) { + super(page, ListIdentityMappingStoresFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListIdentityMappingStoresPage + extends AbstractPage< + ListIdentityMappingStoresRequest, + ListIdentityMappingStoresResponse, + IdentityMappingStore, + ListIdentityMappingStoresPage> { + + private ListIdentityMappingStoresPage( + PageContext< + ListIdentityMappingStoresRequest, + ListIdentityMappingStoresResponse, + IdentityMappingStore> + context, + ListIdentityMappingStoresResponse response) { + super(context, response); + } + + private static ListIdentityMappingStoresPage createEmptyPage() { + return new ListIdentityMappingStoresPage(null, null); + } + + @Override + protected ListIdentityMappingStoresPage createPage( + PageContext< + ListIdentityMappingStoresRequest, + ListIdentityMappingStoresResponse, + IdentityMappingStore> + context, + ListIdentityMappingStoresResponse response) { + return new ListIdentityMappingStoresPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext< + ListIdentityMappingStoresRequest, + ListIdentityMappingStoresResponse, + IdentityMappingStore> + context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListIdentityMappingStoresFixedSizeCollection + extends AbstractFixedSizeCollection< + ListIdentityMappingStoresRequest, + ListIdentityMappingStoresResponse, + IdentityMappingStore, + ListIdentityMappingStoresPage, + ListIdentityMappingStoresFixedSizeCollection> { + + private ListIdentityMappingStoresFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListIdentityMappingStoresFixedSizeCollection createEmptyCollection() { + return new ListIdentityMappingStoresFixedSizeCollection(null, 0); + } + + @Override + protected ListIdentityMappingStoresFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListIdentityMappingStoresFixedSizeCollection(pages, collectionSize); + } + } +} diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/IdentityMappingStoreServiceSettings.java b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/IdentityMappingStoreServiceSettings.java new file mode 100644 index 000000000000..591a54ec81b0 --- /dev/null +++ b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/IdentityMappingStoreServiceSettings.java @@ -0,0 +1,395 @@ +/* + * 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.discoveryengine.v1beta; + +import static com.google.cloud.discoveryengine.v1beta.IdentityMappingStoreServiceClient.ListIdentityMappingStoresPagedResponse; +import static com.google.cloud.discoveryengine.v1beta.IdentityMappingStoreServiceClient.ListIdentityMappingsPagedResponse; + +import com.google.api.core.ApiFunction; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientSettings; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.cloud.discoveryengine.v1beta.stub.IdentityMappingStoreServiceStubSettings; +import com.google.longrunning.Operation; +import com.google.protobuf.Empty; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link IdentityMappingStoreServiceClient}. + * + *

            The default instance has everything set to sensible defaults: + * + *

              + *
            • The default service address (discoveryengine.googleapis.com) and default port (443) are + * used. + *
            • Credentials are acquired automatically through Application Default Credentials. + *
            • Retries are configured for idempotent methods but not for non-idempotent methods. + *
            + * + *

            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 createIdentityMappingStore: + * + *

            {@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
            + * IdentityMappingStoreServiceSettings.Builder identityMappingStoreServiceSettingsBuilder =
            + *     IdentityMappingStoreServiceSettings.newBuilder();
            + * identityMappingStoreServiceSettingsBuilder
            + *     .createIdentityMappingStoreSettings()
            + *     .setRetrySettings(
            + *         identityMappingStoreServiceSettingsBuilder
            + *             .createIdentityMappingStoreSettings()
            + *             .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());
            + * IdentityMappingStoreServiceSettings identityMappingStoreServiceSettings =
            + *     identityMappingStoreServiceSettingsBuilder.build();
            + * }
            + * + * Please refer to the [Client Side Retry + * Guide](https://docs.cloud.google.com/java/docs/client-retries) for additional support in setting + * retries. + * + *

            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 deleteIdentityMappingStore: + * + *

            {@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
            + * IdentityMappingStoreServiceSettings.Builder identityMappingStoreServiceSettingsBuilder =
            + *     IdentityMappingStoreServiceSettings.newBuilder();
            + * TimedRetryAlgorithm timedRetryAlgorithm =
            + *     OperationalTimedPollAlgorithm.create(
            + *         RetrySettings.newBuilder()
            + *             .setInitialRetryDelayDuration(Duration.ofMillis(500))
            + *             .setRetryDelayMultiplier(1.5)
            + *             .setMaxRetryDelayDuration(Duration.ofMillis(5000))
            + *             .setTotalTimeoutDuration(Duration.ofHours(24))
            + *             .build());
            + * identityMappingStoreServiceSettingsBuilder
            + *     .createClusterOperationSettings()
            + *     .setPollingAlgorithm(timedRetryAlgorithm)
            + *     .build();
            + * }
            + */ +@BetaApi +@Generated("by gapic-generator-java") +public class IdentityMappingStoreServiceSettings + extends ClientSettings { + + /** Returns the object with the settings used for calls to createIdentityMappingStore. */ + public UnaryCallSettings + createIdentityMappingStoreSettings() { + return ((IdentityMappingStoreServiceStubSettings) getStubSettings()) + .createIdentityMappingStoreSettings(); + } + + /** Returns the object with the settings used for calls to getIdentityMappingStore. */ + public UnaryCallSettings + getIdentityMappingStoreSettings() { + return ((IdentityMappingStoreServiceStubSettings) getStubSettings()) + .getIdentityMappingStoreSettings(); + } + + /** Returns the object with the settings used for calls to deleteIdentityMappingStore. */ + public UnaryCallSettings + deleteIdentityMappingStoreSettings() { + return ((IdentityMappingStoreServiceStubSettings) getStubSettings()) + .deleteIdentityMappingStoreSettings(); + } + + /** Returns the object with the settings used for calls to deleteIdentityMappingStore. */ + public OperationCallSettings< + DeleteIdentityMappingStoreRequest, Empty, DeleteIdentityMappingStoreMetadata> + deleteIdentityMappingStoreOperationSettings() { + return ((IdentityMappingStoreServiceStubSettings) getStubSettings()) + .deleteIdentityMappingStoreOperationSettings(); + } + + /** Returns the object with the settings used for calls to importIdentityMappings. */ + public UnaryCallSettings + importIdentityMappingsSettings() { + return ((IdentityMappingStoreServiceStubSettings) getStubSettings()) + .importIdentityMappingsSettings(); + } + + /** Returns the object with the settings used for calls to importIdentityMappings. */ + public OperationCallSettings< + ImportIdentityMappingsRequest, + ImportIdentityMappingsResponse, + IdentityMappingEntryOperationMetadata> + importIdentityMappingsOperationSettings() { + return ((IdentityMappingStoreServiceStubSettings) getStubSettings()) + .importIdentityMappingsOperationSettings(); + } + + /** Returns the object with the settings used for calls to purgeIdentityMappings. */ + public UnaryCallSettings + purgeIdentityMappingsSettings() { + return ((IdentityMappingStoreServiceStubSettings) getStubSettings()) + .purgeIdentityMappingsSettings(); + } + + /** Returns the object with the settings used for calls to purgeIdentityMappings. */ + public OperationCallSettings< + PurgeIdentityMappingsRequest, Empty, IdentityMappingEntryOperationMetadata> + purgeIdentityMappingsOperationSettings() { + return ((IdentityMappingStoreServiceStubSettings) getStubSettings()) + .purgeIdentityMappingsOperationSettings(); + } + + /** Returns the object with the settings used for calls to listIdentityMappings. */ + public PagedCallSettings< + ListIdentityMappingsRequest, + ListIdentityMappingsResponse, + ListIdentityMappingsPagedResponse> + listIdentityMappingsSettings() { + return ((IdentityMappingStoreServiceStubSettings) getStubSettings()) + .listIdentityMappingsSettings(); + } + + /** Returns the object with the settings used for calls to listIdentityMappingStores. */ + public PagedCallSettings< + ListIdentityMappingStoresRequest, + ListIdentityMappingStoresResponse, + ListIdentityMappingStoresPagedResponse> + listIdentityMappingStoresSettings() { + return ((IdentityMappingStoreServiceStubSettings) getStubSettings()) + .listIdentityMappingStoresSettings(); + } + + public static final IdentityMappingStoreServiceSettings create( + IdentityMappingStoreServiceStubSettings stub) throws IOException { + return new IdentityMappingStoreServiceSettings.Builder(stub.toBuilder()).build(); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return IdentityMappingStoreServiceStubSettings.defaultExecutorProviderBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return IdentityMappingStoreServiceStubSettings.getDefaultEndpoint(); + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return IdentityMappingStoreServiceStubSettings.getDefaultServiceScopes(); + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return IdentityMappingStoreServiceStubSettings.defaultCredentialsProviderBuilder(); + } + + /** Returns a builder for the default gRPC ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return IdentityMappingStoreServiceStubSettings.defaultGrpcTransportProviderBuilder(); + } + + /** Returns a builder for the default REST ChannelProvider for this service. */ + @BetaApi + public static InstantiatingHttpJsonChannelProvider.Builder + defaultHttpJsonTransportProviderBuilder() { + return IdentityMappingStoreServiceStubSettings.defaultHttpJsonTransportProviderBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return IdentityMappingStoreServiceStubSettings.defaultTransportChannelProvider(); + } + + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return IdentityMappingStoreServiceStubSettings.defaultApiClientHeaderProviderBuilder(); + } + + /** Returns a new gRPC builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new REST builder for this class. */ + public static Builder newHttpJsonBuilder() { + return Builder.createHttpJsonDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected IdentityMappingStoreServiceSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + } + + /** Builder for IdentityMappingStoreServiceSettings. */ + public static class Builder + extends ClientSettings.Builder { + + protected Builder() throws IOException { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(IdentityMappingStoreServiceStubSettings.newBuilder(clientContext)); + } + + protected Builder(IdentityMappingStoreServiceSettings settings) { + super(settings.getStubSettings().toBuilder()); + } + + protected Builder(IdentityMappingStoreServiceStubSettings.Builder stubSettings) { + super(stubSettings); + } + + private static Builder createDefault() { + return new Builder(IdentityMappingStoreServiceStubSettings.newBuilder()); + } + + private static Builder createHttpJsonDefault() { + return new Builder(IdentityMappingStoreServiceStubSettings.newHttpJsonBuilder()); + } + + public IdentityMappingStoreServiceStubSettings.Builder getStubSettingsBuilder() { + return ((IdentityMappingStoreServiceStubSettings.Builder) getStubSettings()); + } + + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

            Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) { + super.applyToAllUnaryMethods( + getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); + return this; + } + + /** Returns the builder for the settings used for calls to createIdentityMappingStore. */ + public UnaryCallSettings.Builder + createIdentityMappingStoreSettings() { + return getStubSettingsBuilder().createIdentityMappingStoreSettings(); + } + + /** Returns the builder for the settings used for calls to getIdentityMappingStore. */ + public UnaryCallSettings.Builder + getIdentityMappingStoreSettings() { + return getStubSettingsBuilder().getIdentityMappingStoreSettings(); + } + + /** Returns the builder for the settings used for calls to deleteIdentityMappingStore. */ + public UnaryCallSettings.Builder + deleteIdentityMappingStoreSettings() { + return getStubSettingsBuilder().deleteIdentityMappingStoreSettings(); + } + + /** Returns the builder for the settings used for calls to deleteIdentityMappingStore. */ + public OperationCallSettings.Builder< + DeleteIdentityMappingStoreRequest, Empty, DeleteIdentityMappingStoreMetadata> + deleteIdentityMappingStoreOperationSettings() { + return getStubSettingsBuilder().deleteIdentityMappingStoreOperationSettings(); + } + + /** Returns the builder for the settings used for calls to importIdentityMappings. */ + public UnaryCallSettings.Builder + importIdentityMappingsSettings() { + return getStubSettingsBuilder().importIdentityMappingsSettings(); + } + + /** Returns the builder for the settings used for calls to importIdentityMappings. */ + public OperationCallSettings.Builder< + ImportIdentityMappingsRequest, + ImportIdentityMappingsResponse, + IdentityMappingEntryOperationMetadata> + importIdentityMappingsOperationSettings() { + return getStubSettingsBuilder().importIdentityMappingsOperationSettings(); + } + + /** Returns the builder for the settings used for calls to purgeIdentityMappings. */ + public UnaryCallSettings.Builder + purgeIdentityMappingsSettings() { + return getStubSettingsBuilder().purgeIdentityMappingsSettings(); + } + + /** Returns the builder for the settings used for calls to purgeIdentityMappings. */ + public OperationCallSettings.Builder< + PurgeIdentityMappingsRequest, Empty, IdentityMappingEntryOperationMetadata> + purgeIdentityMappingsOperationSettings() { + return getStubSettingsBuilder().purgeIdentityMappingsOperationSettings(); + } + + /** Returns the builder for the settings used for calls to listIdentityMappings. */ + public PagedCallSettings.Builder< + ListIdentityMappingsRequest, + ListIdentityMappingsResponse, + ListIdentityMappingsPagedResponse> + listIdentityMappingsSettings() { + return getStubSettingsBuilder().listIdentityMappingsSettings(); + } + + /** Returns the builder for the settings used for calls to listIdentityMappingStores. */ + public PagedCallSettings.Builder< + ListIdentityMappingStoresRequest, + ListIdentityMappingStoresResponse, + ListIdentityMappingStoresPagedResponse> + listIdentityMappingStoresSettings() { + return getStubSettingsBuilder().listIdentityMappingStoresSettings(); + } + + @Override + public IdentityMappingStoreServiceSettings build() throws IOException { + return new IdentityMappingStoreServiceSettings(this); + } + } +} diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/LicenseConfigServiceClient.java b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/LicenseConfigServiceClient.java new file mode 100644 index 000000000000..edaf4250679d --- /dev/null +++ b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/LicenseConfigServiceClient.java @@ -0,0 +1,1478 @@ +/* + * 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.discoveryengine.v1beta; + +import com.google.api.core.ApiFuture; +import com.google.api.core.ApiFutures; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.paging.AbstractFixedSizeCollection; +import com.google.api.gax.paging.AbstractPage; +import com.google.api.gax.paging.AbstractPagedListResponse; +import com.google.api.gax.rpc.PageContext; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.discoveryengine.v1beta.stub.LicenseConfigServiceStub; +import com.google.cloud.discoveryengine.v1beta.stub.LicenseConfigServiceStubSettings; +import com.google.common.util.concurrent.MoreExecutors; +import com.google.protobuf.FieldMask; +import java.io.IOException; +import java.util.List; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Service Description: Service for managing license config related resources. + * + *

            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: + * + *

            {@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 (LicenseConfigServiceClient licenseConfigServiceClient =
            + *     LicenseConfigServiceClient.create()) {
            + *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
            + *   LicenseConfig licenseConfig = LicenseConfig.newBuilder().build();
            + *   String licenseConfigId = "licenseConfigId-372057250";
            + *   LicenseConfig response =
            + *       licenseConfigServiceClient.createLicenseConfig(parent, licenseConfig, licenseConfigId);
            + * }
            + * }
            + * + *

            Note: close() needs to be called on the LicenseConfigServiceClient object to clean up + * resources such as threads. In the example above, try-with-resources is used, which automatically + * calls close(). + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
            Methods
            MethodDescriptionMethod Variants

            CreateLicenseConfig

            Creates a [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig] This method should only be used for creating NotebookLm licenses or Gemini Enterprise free trial licenses.

            + *

            Request object method variants only take one parameter, a request object, which must be constructed before the call.

            + *
              + *
            • createLicenseConfig(CreateLicenseConfigRequest request) + *

            + *

            "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

            + *
              + *
            • createLicenseConfig(LocationName parent, LicenseConfig licenseConfig, String licenseConfigId) + *

            • createLicenseConfig(String parent, LicenseConfig licenseConfig, String licenseConfigId) + *

            + *

            Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

            + *
              + *
            • createLicenseConfigCallable() + *

            + *

            UpdateLicenseConfig

            Updates the [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig]

            + *

            Request object method variants only take one parameter, a request object, which must be constructed before the call.

            + *
              + *
            • updateLicenseConfig(UpdateLicenseConfigRequest request) + *

            + *

            "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

            + *
              + *
            • updateLicenseConfig(LicenseConfig licenseConfig, FieldMask updateMask) + *

            + *

            Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

            + *
              + *
            • updateLicenseConfigCallable() + *

            + *

            GetLicenseConfig

            Gets a [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig].

            + *

            Request object method variants only take one parameter, a request object, which must be constructed before the call.

            + *
              + *
            • getLicenseConfig(GetLicenseConfigRequest request) + *

            + *

            "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

            + *
              + *
            • getLicenseConfig(LicenseConfigName name) + *

            • getLicenseConfig(String name) + *

            + *

            Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

            + *
              + *
            • getLicenseConfigCallable() + *

            + *

            ListLicenseConfigs

            Lists all the [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig]s associated with the project.

            + *

            Request object method variants only take one parameter, a request object, which must be constructed before the call.

            + *
              + *
            • listLicenseConfigs(ListLicenseConfigsRequest request) + *

            + *

            "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

            + *
              + *
            • listLicenseConfigs(LocationName parent) + *

            • listLicenseConfigs(String parent) + *

            + *

            Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

            + *
              + *
            • listLicenseConfigsPagedCallable() + *

            • listLicenseConfigsCallable() + *

            + *

            DistributeLicenseConfig

            Distributes a [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig] from billing account level to project level.

            + *

            Request object method variants only take one parameter, a request object, which must be constructed before the call.

            + *
              + *
            • distributeLicenseConfig(DistributeLicenseConfigRequest request) + *

            + *

            "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

            + *
              + *
            • distributeLicenseConfig(BillingAccountLicenseConfigName billingAccountLicenseConfig, long projectNumber, String location, long licenseCount, String licenseConfigId) + *

            • distributeLicenseConfig(String billingAccountLicenseConfig, long projectNumber, String location, long licenseCount, String licenseConfigId) + *

            + *

            Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

            + *
              + *
            • distributeLicenseConfigCallable() + *

            + *

            RetractLicenseConfig

            This method is called from the billing account side to retract the [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig] from the given project back to the billing account.

            + *

            Request object method variants only take one parameter, a request object, which must be constructed before the call.

            + *
              + *
            • retractLicenseConfig(RetractLicenseConfigRequest request) + *

            + *

            "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

            + *
              + *
            • retractLicenseConfig(BillingAccountLicenseConfigName billingAccountLicenseConfig, LicenseConfigName licenseConfig, boolean fullRetract, long licenseCount) + *

            • retractLicenseConfig(BillingAccountLicenseConfigName billingAccountLicenseConfig, String licenseConfig, boolean fullRetract, long licenseCount) + *

            • retractLicenseConfig(String billingAccountLicenseConfig, LicenseConfigName licenseConfig, boolean fullRetract, long licenseCount) + *

            • retractLicenseConfig(String billingAccountLicenseConfig, String licenseConfig, boolean fullRetract, long licenseCount) + *

            + *

            Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

            + *
              + *
            • retractLicenseConfigCallable() + *

            + *
            + * + *

            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 LicenseConfigServiceSettings + * to create(). For example: + * + *

            To customize credentials: + * + *

            {@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
            + * LicenseConfigServiceSettings licenseConfigServiceSettings =
            + *     LicenseConfigServiceSettings.newBuilder()
            + *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
            + *         .build();
            + * LicenseConfigServiceClient licenseConfigServiceClient =
            + *     LicenseConfigServiceClient.create(licenseConfigServiceSettings);
            + * }
            + * + *

            To customize the endpoint: + * + *

            {@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
            + * LicenseConfigServiceSettings licenseConfigServiceSettings =
            + *     LicenseConfigServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
            + * LicenseConfigServiceClient licenseConfigServiceClient =
            + *     LicenseConfigServiceClient.create(licenseConfigServiceSettings);
            + * }
            + * + *

            To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over + * the wire: + * + *

            {@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
            + * LicenseConfigServiceSettings licenseConfigServiceSettings =
            + *     LicenseConfigServiceSettings.newHttpJsonBuilder().build();
            + * LicenseConfigServiceClient licenseConfigServiceClient =
            + *     LicenseConfigServiceClient.create(licenseConfigServiceSettings);
            + * }
            + * + *

            Please refer to the GitHub repository's samples for more quickstart code snippets. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class LicenseConfigServiceClient implements BackgroundResource { + private final LicenseConfigServiceSettings settings; + private final LicenseConfigServiceStub stub; + + /** Constructs an instance of LicenseConfigServiceClient with default settings. */ + public static final LicenseConfigServiceClient create() throws IOException { + return create(LicenseConfigServiceSettings.newBuilder().build()); + } + + /** + * Constructs an instance of LicenseConfigServiceClient, 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 LicenseConfigServiceClient create(LicenseConfigServiceSettings settings) + throws IOException { + return new LicenseConfigServiceClient(settings); + } + + /** + * Constructs an instance of LicenseConfigServiceClient, using the given stub for making calls. + * This is for advanced usage - prefer using create(LicenseConfigServiceSettings). + */ + public static final LicenseConfigServiceClient create(LicenseConfigServiceStub stub) { + return new LicenseConfigServiceClient(stub); + } + + /** + * Constructs an instance of LicenseConfigServiceClient, 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 LicenseConfigServiceClient(LicenseConfigServiceSettings settings) throws IOException { + this.settings = settings; + this.stub = ((LicenseConfigServiceStubSettings) settings.getStubSettings()).createStub(); + } + + protected LicenseConfigServiceClient(LicenseConfigServiceStub stub) { + this.settings = null; + this.stub = stub; + } + + public final LicenseConfigServiceSettings getSettings() { + return settings; + } + + public LicenseConfigServiceStub getStub() { + return stub; + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig] This method should + * only be used for creating NotebookLm licenses or Gemini Enterprise free trial licenses. + * + *

            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 (LicenseConfigServiceClient licenseConfigServiceClient =
            +   *     LicenseConfigServiceClient.create()) {
            +   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
            +   *   LicenseConfig licenseConfig = LicenseConfig.newBuilder().build();
            +   *   String licenseConfigId = "licenseConfigId-372057250";
            +   *   LicenseConfig response =
            +   *       licenseConfigServiceClient.createLicenseConfig(parent, licenseConfig, licenseConfigId);
            +   * }
            +   * }
            + * + * @param parent Required. The parent resource name, such as + * `projects/{project}/locations/{location}`. + * @param licenseConfig Required. The + * [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig] to create. + * @param licenseConfigId Optional. The ID to use for the + * [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig], which will become the + * final component of the [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig]'s + * resource name. We are using the tier (product edition) name as the license config id such + * as `search` or `search_and_assistant`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final LicenseConfig createLicenseConfig( + LocationName parent, LicenseConfig licenseConfig, String licenseConfigId) { + CreateLicenseConfigRequest request = + CreateLicenseConfigRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setLicenseConfig(licenseConfig) + .setLicenseConfigId(licenseConfigId) + .build(); + return createLicenseConfig(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig] This method should + * only be used for creating NotebookLm licenses or Gemini Enterprise free trial licenses. + * + *

            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 (LicenseConfigServiceClient licenseConfigServiceClient =
            +   *     LicenseConfigServiceClient.create()) {
            +   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
            +   *   LicenseConfig licenseConfig = LicenseConfig.newBuilder().build();
            +   *   String licenseConfigId = "licenseConfigId-372057250";
            +   *   LicenseConfig response =
            +   *       licenseConfigServiceClient.createLicenseConfig(parent, licenseConfig, licenseConfigId);
            +   * }
            +   * }
            + * + * @param parent Required. The parent resource name, such as + * `projects/{project}/locations/{location}`. + * @param licenseConfig Required. The + * [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig] to create. + * @param licenseConfigId Optional. The ID to use for the + * [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig], which will become the + * final component of the [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig]'s + * resource name. We are using the tier (product edition) name as the license config id such + * as `search` or `search_and_assistant`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final LicenseConfig createLicenseConfig( + String parent, LicenseConfig licenseConfig, String licenseConfigId) { + CreateLicenseConfigRequest request = + CreateLicenseConfigRequest.newBuilder() + .setParent(parent) + .setLicenseConfig(licenseConfig) + .setLicenseConfigId(licenseConfigId) + .build(); + return createLicenseConfig(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig] This method should + * only be used for creating NotebookLm licenses or Gemini Enterprise free trial licenses. + * + *

            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 (LicenseConfigServiceClient licenseConfigServiceClient =
            +   *     LicenseConfigServiceClient.create()) {
            +   *   CreateLicenseConfigRequest request =
            +   *       CreateLicenseConfigRequest.newBuilder()
            +   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
            +   *           .setLicenseConfig(LicenseConfig.newBuilder().build())
            +   *           .setLicenseConfigId("licenseConfigId-372057250")
            +   *           .build();
            +   *   LicenseConfig response = licenseConfigServiceClient.createLicenseConfig(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 LicenseConfig createLicenseConfig(CreateLicenseConfigRequest request) { + return createLicenseConfigCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig] This method should + * only be used for creating NotebookLm licenses or Gemini Enterprise free trial licenses. + * + *

            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 (LicenseConfigServiceClient licenseConfigServiceClient =
            +   *     LicenseConfigServiceClient.create()) {
            +   *   CreateLicenseConfigRequest request =
            +   *       CreateLicenseConfigRequest.newBuilder()
            +   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
            +   *           .setLicenseConfig(LicenseConfig.newBuilder().build())
            +   *           .setLicenseConfigId("licenseConfigId-372057250")
            +   *           .build();
            +   *   ApiFuture future =
            +   *       licenseConfigServiceClient.createLicenseConfigCallable().futureCall(request);
            +   *   // Do something.
            +   *   LicenseConfig response = future.get();
            +   * }
            +   * }
            + */ + public final UnaryCallable + createLicenseConfigCallable() { + return stub.createLicenseConfigCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig] + * + *

            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 (LicenseConfigServiceClient licenseConfigServiceClient =
            +   *     LicenseConfigServiceClient.create()) {
            +   *   LicenseConfig licenseConfig = LicenseConfig.newBuilder().build();
            +   *   FieldMask updateMask = FieldMask.newBuilder().build();
            +   *   LicenseConfig response =
            +   *       licenseConfigServiceClient.updateLicenseConfig(licenseConfig, updateMask);
            +   * }
            +   * }
            + * + * @param licenseConfig Required. The + * [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig] to update. + * @param updateMask Optional. Indicates which fields in the provided + * [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig] to update. + *

            If an unsupported or unknown field is provided, an INVALID_ARGUMENT error is returned. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final LicenseConfig updateLicenseConfig( + LicenseConfig licenseConfig, FieldMask updateMask) { + UpdateLicenseConfigRequest request = + UpdateLicenseConfigRequest.newBuilder() + .setLicenseConfig(licenseConfig) + .setUpdateMask(updateMask) + .build(); + return updateLicenseConfig(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig] + * + *

            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 (LicenseConfigServiceClient licenseConfigServiceClient =
            +   *     LicenseConfigServiceClient.create()) {
            +   *   UpdateLicenseConfigRequest request =
            +   *       UpdateLicenseConfigRequest.newBuilder()
            +   *           .setLicenseConfig(LicenseConfig.newBuilder().build())
            +   *           .setUpdateMask(FieldMask.newBuilder().build())
            +   *           .build();
            +   *   LicenseConfig response = licenseConfigServiceClient.updateLicenseConfig(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 LicenseConfig updateLicenseConfig(UpdateLicenseConfigRequest request) { + return updateLicenseConfigCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig] + * + *

            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 (LicenseConfigServiceClient licenseConfigServiceClient =
            +   *     LicenseConfigServiceClient.create()) {
            +   *   UpdateLicenseConfigRequest request =
            +   *       UpdateLicenseConfigRequest.newBuilder()
            +   *           .setLicenseConfig(LicenseConfig.newBuilder().build())
            +   *           .setUpdateMask(FieldMask.newBuilder().build())
            +   *           .build();
            +   *   ApiFuture future =
            +   *       licenseConfigServiceClient.updateLicenseConfigCallable().futureCall(request);
            +   *   // Do something.
            +   *   LicenseConfig response = future.get();
            +   * }
            +   * }
            + */ + public final UnaryCallable + updateLicenseConfigCallable() { + return stub.updateLicenseConfigCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig]. + * + *

            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 (LicenseConfigServiceClient licenseConfigServiceClient =
            +   *     LicenseConfigServiceClient.create()) {
            +   *   LicenseConfigName name = LicenseConfigName.of("[PROJECT]", "[LOCATION]", "[LICENSE_CONFIG]");
            +   *   LicenseConfig response = licenseConfigServiceClient.getLicenseConfig(name);
            +   * }
            +   * }
            + * + * @param name Required. Full resource name of + * [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig], such as + * `projects/{project}/locations/{location}/licenseConfigs/*`. + *

            If the caller does not have permission to access the + * [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig], regardless of whether + * or not it exists, a PERMISSION_DENIED error is returned. + *

            If the requested [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig] does + * not exist, a NOT_FOUND error is returned. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final LicenseConfig getLicenseConfig(LicenseConfigName name) { + GetLicenseConfigRequest request = + GetLicenseConfigRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getLicenseConfig(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig]. + * + *

            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 (LicenseConfigServiceClient licenseConfigServiceClient =
            +   *     LicenseConfigServiceClient.create()) {
            +   *   String name = LicenseConfigName.of("[PROJECT]", "[LOCATION]", "[LICENSE_CONFIG]").toString();
            +   *   LicenseConfig response = licenseConfigServiceClient.getLicenseConfig(name);
            +   * }
            +   * }
            + * + * @param name Required. Full resource name of + * [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig], such as + * `projects/{project}/locations/{location}/licenseConfigs/*`. + *

            If the caller does not have permission to access the + * [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig], regardless of whether + * or not it exists, a PERMISSION_DENIED error is returned. + *

            If the requested [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig] does + * not exist, a NOT_FOUND error is returned. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final LicenseConfig getLicenseConfig(String name) { + GetLicenseConfigRequest request = GetLicenseConfigRequest.newBuilder().setName(name).build(); + return getLicenseConfig(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig]. + * + *

            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 (LicenseConfigServiceClient licenseConfigServiceClient =
            +   *     LicenseConfigServiceClient.create()) {
            +   *   GetLicenseConfigRequest request =
            +   *       GetLicenseConfigRequest.newBuilder()
            +   *           .setName(
            +   *               LicenseConfigName.of("[PROJECT]", "[LOCATION]", "[LICENSE_CONFIG]").toString())
            +   *           .build();
            +   *   LicenseConfig response = licenseConfigServiceClient.getLicenseConfig(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 LicenseConfig getLicenseConfig(GetLicenseConfigRequest request) { + return getLicenseConfigCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig]. + * + *

            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 (LicenseConfigServiceClient licenseConfigServiceClient =
            +   *     LicenseConfigServiceClient.create()) {
            +   *   GetLicenseConfigRequest request =
            +   *       GetLicenseConfigRequest.newBuilder()
            +   *           .setName(
            +   *               LicenseConfigName.of("[PROJECT]", "[LOCATION]", "[LICENSE_CONFIG]").toString())
            +   *           .build();
            +   *   ApiFuture future =
            +   *       licenseConfigServiceClient.getLicenseConfigCallable().futureCall(request);
            +   *   // Do something.
            +   *   LicenseConfig response = future.get();
            +   * }
            +   * }
            + */ + public final UnaryCallable getLicenseConfigCallable() { + return stub.getLicenseConfigCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all the [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig]s associated + * with the project. + * + *

            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 (LicenseConfigServiceClient licenseConfigServiceClient =
            +   *     LicenseConfigServiceClient.create()) {
            +   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
            +   *   for (LicenseConfig element :
            +   *       licenseConfigServiceClient.listLicenseConfigs(parent).iterateAll()) {
            +   *     // doThingsWith(element);
            +   *   }
            +   * }
            +   * }
            + * + * @param parent Required. The parent branch resource name, such as + * `projects/{project}/locations/{location}`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListLicenseConfigsPagedResponse listLicenseConfigs(LocationName parent) { + ListLicenseConfigsRequest request = + ListLicenseConfigsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listLicenseConfigs(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all the [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig]s associated + * with the project. + * + *

            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 (LicenseConfigServiceClient licenseConfigServiceClient =
            +   *     LicenseConfigServiceClient.create()) {
            +   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
            +   *   for (LicenseConfig element :
            +   *       licenseConfigServiceClient.listLicenseConfigs(parent).iterateAll()) {
            +   *     // doThingsWith(element);
            +   *   }
            +   * }
            +   * }
            + * + * @param parent Required. The parent branch resource name, such as + * `projects/{project}/locations/{location}`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListLicenseConfigsPagedResponse listLicenseConfigs(String parent) { + ListLicenseConfigsRequest request = + ListLicenseConfigsRequest.newBuilder().setParent(parent).build(); + return listLicenseConfigs(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all the [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig]s associated + * with the project. + * + *

            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 (LicenseConfigServiceClient licenseConfigServiceClient =
            +   *     LicenseConfigServiceClient.create()) {
            +   *   ListLicenseConfigsRequest request =
            +   *       ListLicenseConfigsRequest.newBuilder()
            +   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
            +   *           .setPageSize(883849137)
            +   *           .setPageToken("pageToken873572522")
            +   *           .setFilter("filter-1274492040")
            +   *           .build();
            +   *   for (LicenseConfig element :
            +   *       licenseConfigServiceClient.listLicenseConfigs(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 ListLicenseConfigsPagedResponse listLicenseConfigs( + ListLicenseConfigsRequest request) { + return listLicenseConfigsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all the [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig]s associated + * with the project. + * + *

            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 (LicenseConfigServiceClient licenseConfigServiceClient =
            +   *     LicenseConfigServiceClient.create()) {
            +   *   ListLicenseConfigsRequest request =
            +   *       ListLicenseConfigsRequest.newBuilder()
            +   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
            +   *           .setPageSize(883849137)
            +   *           .setPageToken("pageToken873572522")
            +   *           .setFilter("filter-1274492040")
            +   *           .build();
            +   *   ApiFuture future =
            +   *       licenseConfigServiceClient.listLicenseConfigsPagedCallable().futureCall(request);
            +   *   // Do something.
            +   *   for (LicenseConfig element : future.get().iterateAll()) {
            +   *     // doThingsWith(element);
            +   *   }
            +   * }
            +   * }
            + */ + public final UnaryCallable + listLicenseConfigsPagedCallable() { + return stub.listLicenseConfigsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all the [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig]s associated + * with the project. + * + *

            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 (LicenseConfigServiceClient licenseConfigServiceClient =
            +   *     LicenseConfigServiceClient.create()) {
            +   *   ListLicenseConfigsRequest request =
            +   *       ListLicenseConfigsRequest.newBuilder()
            +   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
            +   *           .setPageSize(883849137)
            +   *           .setPageToken("pageToken873572522")
            +   *           .setFilter("filter-1274492040")
            +   *           .build();
            +   *   while (true) {
            +   *     ListLicenseConfigsResponse response =
            +   *         licenseConfigServiceClient.listLicenseConfigsCallable().call(request);
            +   *     for (LicenseConfig element : response.getLicenseConfigsList()) {
            +   *       // doThingsWith(element);
            +   *     }
            +   *     String nextPageToken = response.getNextPageToken();
            +   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
            +   *       request = request.toBuilder().setPageToken(nextPageToken).build();
            +   *     } else {
            +   *       break;
            +   *     }
            +   *   }
            +   * }
            +   * }
            + */ + public final UnaryCallable + listLicenseConfigsCallable() { + return stub.listLicenseConfigsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Distributes a [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig] from billing + * account level to project level. + * + *

            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 (LicenseConfigServiceClient licenseConfigServiceClient =
            +   *     LicenseConfigServiceClient.create()) {
            +   *   BillingAccountLicenseConfigName billingAccountLicenseConfig =
            +   *       BillingAccountLicenseConfigName.of(
            +   *           "[BILLING_ACCOUNT]", "[BILLING_ACCOUNT_LICENSE_CONFIG]");
            +   *   long projectNumber = 828084015;
            +   *   String location = "location1901043637";
            +   *   long licenseCount = -1565113455;
            +   *   String licenseConfigId = "licenseConfigId-372057250";
            +   *   DistributeLicenseConfigResponse response =
            +   *       licenseConfigServiceClient.distributeLicenseConfig(
            +   *           billingAccountLicenseConfig, projectNumber, location, licenseCount, licenseConfigId);
            +   * }
            +   * }
            + * + * @param billingAccountLicenseConfig Required. Full resource name of + * [BillingAccountLicenseConfig][]. + *

            Format: + * `billingAccounts/{billing_account}/billingAccountLicenseConfigs/{billing_account_license_config_id}`. + * @param projectNumber Required. The target GCP project number to distribute the license config + * to. + * @param location Required. The target GCP project region to distribute the license config to. + * @param licenseCount Required. The number of licenses to distribute. + * @param licenseConfigId Optional. Distribute seats to this license config instead of creating a + * new one. If not specified, a new license config will be created from the billing account + * license config. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final DistributeLicenseConfigResponse distributeLicenseConfig( + BillingAccountLicenseConfigName billingAccountLicenseConfig, + long projectNumber, + String location, + long licenseCount, + String licenseConfigId) { + DistributeLicenseConfigRequest request = + DistributeLicenseConfigRequest.newBuilder() + .setBillingAccountLicenseConfig( + billingAccountLicenseConfig == null ? null : billingAccountLicenseConfig.toString()) + .setProjectNumber(projectNumber) + .setLocation(location) + .setLicenseCount(licenseCount) + .setLicenseConfigId(licenseConfigId) + .build(); + return distributeLicenseConfig(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Distributes a [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig] from billing + * account level to project level. + * + *

            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 (LicenseConfigServiceClient licenseConfigServiceClient =
            +   *     LicenseConfigServiceClient.create()) {
            +   *   String billingAccountLicenseConfig =
            +   *       BillingAccountLicenseConfigName.of(
            +   *               "[BILLING_ACCOUNT]", "[BILLING_ACCOUNT_LICENSE_CONFIG]")
            +   *           .toString();
            +   *   long projectNumber = 828084015;
            +   *   String location = "location1901043637";
            +   *   long licenseCount = -1565113455;
            +   *   String licenseConfigId = "licenseConfigId-372057250";
            +   *   DistributeLicenseConfigResponse response =
            +   *       licenseConfigServiceClient.distributeLicenseConfig(
            +   *           billingAccountLicenseConfig, projectNumber, location, licenseCount, licenseConfigId);
            +   * }
            +   * }
            + * + * @param billingAccountLicenseConfig Required. Full resource name of + * [BillingAccountLicenseConfig][]. + *

            Format: + * `billingAccounts/{billing_account}/billingAccountLicenseConfigs/{billing_account_license_config_id}`. + * @param projectNumber Required. The target GCP project number to distribute the license config + * to. + * @param location Required. The target GCP project region to distribute the license config to. + * @param licenseCount Required. The number of licenses to distribute. + * @param licenseConfigId Optional. Distribute seats to this license config instead of creating a + * new one. If not specified, a new license config will be created from the billing account + * license config. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final DistributeLicenseConfigResponse distributeLicenseConfig( + String billingAccountLicenseConfig, + long projectNumber, + String location, + long licenseCount, + String licenseConfigId) { + DistributeLicenseConfigRequest request = + DistributeLicenseConfigRequest.newBuilder() + .setBillingAccountLicenseConfig(billingAccountLicenseConfig) + .setProjectNumber(projectNumber) + .setLocation(location) + .setLicenseCount(licenseCount) + .setLicenseConfigId(licenseConfigId) + .build(); + return distributeLicenseConfig(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Distributes a [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig] from billing + * account level to project level. + * + *

            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 (LicenseConfigServiceClient licenseConfigServiceClient =
            +   *     LicenseConfigServiceClient.create()) {
            +   *   DistributeLicenseConfigRequest request =
            +   *       DistributeLicenseConfigRequest.newBuilder()
            +   *           .setBillingAccountLicenseConfig(
            +   *               BillingAccountLicenseConfigName.of(
            +   *                       "[BILLING_ACCOUNT]", "[BILLING_ACCOUNT_LICENSE_CONFIG]")
            +   *                   .toString())
            +   *           .setProjectNumber(828084015)
            +   *           .setLocation("location1901043637")
            +   *           .setLicenseCount(-1565113455)
            +   *           .setLicenseConfigId("licenseConfigId-372057250")
            +   *           .build();
            +   *   DistributeLicenseConfigResponse response =
            +   *       licenseConfigServiceClient.distributeLicenseConfig(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 DistributeLicenseConfigResponse distributeLicenseConfig( + DistributeLicenseConfigRequest request) { + return distributeLicenseConfigCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Distributes a [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig] from billing + * account level to project level. + * + *

            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 (LicenseConfigServiceClient licenseConfigServiceClient =
            +   *     LicenseConfigServiceClient.create()) {
            +   *   DistributeLicenseConfigRequest request =
            +   *       DistributeLicenseConfigRequest.newBuilder()
            +   *           .setBillingAccountLicenseConfig(
            +   *               BillingAccountLicenseConfigName.of(
            +   *                       "[BILLING_ACCOUNT]", "[BILLING_ACCOUNT_LICENSE_CONFIG]")
            +   *                   .toString())
            +   *           .setProjectNumber(828084015)
            +   *           .setLocation("location1901043637")
            +   *           .setLicenseCount(-1565113455)
            +   *           .setLicenseConfigId("licenseConfigId-372057250")
            +   *           .build();
            +   *   ApiFuture future =
            +   *       licenseConfigServiceClient.distributeLicenseConfigCallable().futureCall(request);
            +   *   // Do something.
            +   *   DistributeLicenseConfigResponse response = future.get();
            +   * }
            +   * }
            + */ + public final UnaryCallable + distributeLicenseConfigCallable() { + return stub.distributeLicenseConfigCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * This method is called from the billing account side to retract the + * [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig] from the given project back + * to the billing account. + * + *

            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 (LicenseConfigServiceClient licenseConfigServiceClient =
            +   *     LicenseConfigServiceClient.create()) {
            +   *   BillingAccountLicenseConfigName billingAccountLicenseConfig =
            +   *       BillingAccountLicenseConfigName.of(
            +   *           "[BILLING_ACCOUNT]", "[BILLING_ACCOUNT_LICENSE_CONFIG]");
            +   *   LicenseConfigName licenseConfig =
            +   *       LicenseConfigName.of("[PROJECT]", "[LOCATION]", "[LICENSE_CONFIG]");
            +   *   boolean fullRetract = true;
            +   *   long licenseCount = -1565113455;
            +   *   RetractLicenseConfigResponse response =
            +   *       licenseConfigServiceClient.retractLicenseConfig(
            +   *           billingAccountLicenseConfig, licenseConfig, fullRetract, licenseCount);
            +   * }
            +   * }
            + * + * @param billingAccountLicenseConfig Required. Full resource name of + * [BillingAccountLicenseConfig][]. + *

            Format: + * `billingAccounts/{billing_account}/billingAccountLicenseConfigs/{billing_account_license_config_id}`. + * @param licenseConfig Required. Full resource name of + * [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig]. + *

            Format: `projects/{project}/locations/{location}/licenseConfigs/{license_config_id}`. + * @param fullRetract Optional. If set to true, retract the entire license config. Otherwise, + * retract the specified license count. + * @param licenseCount Optional. The number of licenses to retract. Only used when full_retract is + * false. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final RetractLicenseConfigResponse retractLicenseConfig( + BillingAccountLicenseConfigName billingAccountLicenseConfig, + LicenseConfigName licenseConfig, + boolean fullRetract, + long licenseCount) { + RetractLicenseConfigRequest request = + RetractLicenseConfigRequest.newBuilder() + .setBillingAccountLicenseConfig( + billingAccountLicenseConfig == null ? null : billingAccountLicenseConfig.toString()) + .setLicenseConfig(licenseConfig == null ? null : licenseConfig.toString()) + .setFullRetract(fullRetract) + .setLicenseCount(licenseCount) + .build(); + return retractLicenseConfig(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * This method is called from the billing account side to retract the + * [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig] from the given project back + * to the billing account. + * + *

            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 (LicenseConfigServiceClient licenseConfigServiceClient =
            +   *     LicenseConfigServiceClient.create()) {
            +   *   BillingAccountLicenseConfigName billingAccountLicenseConfig =
            +   *       BillingAccountLicenseConfigName.of(
            +   *           "[BILLING_ACCOUNT]", "[BILLING_ACCOUNT_LICENSE_CONFIG]");
            +   *   String licenseConfig =
            +   *       LicenseConfigName.of("[PROJECT]", "[LOCATION]", "[LICENSE_CONFIG]").toString();
            +   *   boolean fullRetract = true;
            +   *   long licenseCount = -1565113455;
            +   *   RetractLicenseConfigResponse response =
            +   *       licenseConfigServiceClient.retractLicenseConfig(
            +   *           billingAccountLicenseConfig, licenseConfig, fullRetract, licenseCount);
            +   * }
            +   * }
            + * + * @param billingAccountLicenseConfig Required. Full resource name of + * [BillingAccountLicenseConfig][]. + *

            Format: + * `billingAccounts/{billing_account}/billingAccountLicenseConfigs/{billing_account_license_config_id}`. + * @param licenseConfig Required. Full resource name of + * [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig]. + *

            Format: `projects/{project}/locations/{location}/licenseConfigs/{license_config_id}`. + * @param fullRetract Optional. If set to true, retract the entire license config. Otherwise, + * retract the specified license count. + * @param licenseCount Optional. The number of licenses to retract. Only used when full_retract is + * false. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final RetractLicenseConfigResponse retractLicenseConfig( + BillingAccountLicenseConfigName billingAccountLicenseConfig, + String licenseConfig, + boolean fullRetract, + long licenseCount) { + RetractLicenseConfigRequest request = + RetractLicenseConfigRequest.newBuilder() + .setBillingAccountLicenseConfig( + billingAccountLicenseConfig == null ? null : billingAccountLicenseConfig.toString()) + .setLicenseConfig(licenseConfig) + .setFullRetract(fullRetract) + .setLicenseCount(licenseCount) + .build(); + return retractLicenseConfig(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * This method is called from the billing account side to retract the + * [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig] from the given project back + * to the billing account. + * + *

            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 (LicenseConfigServiceClient licenseConfigServiceClient =
            +   *     LicenseConfigServiceClient.create()) {
            +   *   String billingAccountLicenseConfig =
            +   *       BillingAccountLicenseConfigName.of(
            +   *               "[BILLING_ACCOUNT]", "[BILLING_ACCOUNT_LICENSE_CONFIG]")
            +   *           .toString();
            +   *   LicenseConfigName licenseConfig =
            +   *       LicenseConfigName.of("[PROJECT]", "[LOCATION]", "[LICENSE_CONFIG]");
            +   *   boolean fullRetract = true;
            +   *   long licenseCount = -1565113455;
            +   *   RetractLicenseConfigResponse response =
            +   *       licenseConfigServiceClient.retractLicenseConfig(
            +   *           billingAccountLicenseConfig, licenseConfig, fullRetract, licenseCount);
            +   * }
            +   * }
            + * + * @param billingAccountLicenseConfig Required. Full resource name of + * [BillingAccountLicenseConfig][]. + *

            Format: + * `billingAccounts/{billing_account}/billingAccountLicenseConfigs/{billing_account_license_config_id}`. + * @param licenseConfig Required. Full resource name of + * [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig]. + *

            Format: `projects/{project}/locations/{location}/licenseConfigs/{license_config_id}`. + * @param fullRetract Optional. If set to true, retract the entire license config. Otherwise, + * retract the specified license count. + * @param licenseCount Optional. The number of licenses to retract. Only used when full_retract is + * false. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final RetractLicenseConfigResponse retractLicenseConfig( + String billingAccountLicenseConfig, + LicenseConfigName licenseConfig, + boolean fullRetract, + long licenseCount) { + RetractLicenseConfigRequest request = + RetractLicenseConfigRequest.newBuilder() + .setBillingAccountLicenseConfig(billingAccountLicenseConfig) + .setLicenseConfig(licenseConfig == null ? null : licenseConfig.toString()) + .setFullRetract(fullRetract) + .setLicenseCount(licenseCount) + .build(); + return retractLicenseConfig(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * This method is called from the billing account side to retract the + * [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig] from the given project back + * to the billing account. + * + *

            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 (LicenseConfigServiceClient licenseConfigServiceClient =
            +   *     LicenseConfigServiceClient.create()) {
            +   *   String billingAccountLicenseConfig =
            +   *       BillingAccountLicenseConfigName.of(
            +   *               "[BILLING_ACCOUNT]", "[BILLING_ACCOUNT_LICENSE_CONFIG]")
            +   *           .toString();
            +   *   String licenseConfig =
            +   *       LicenseConfigName.of("[PROJECT]", "[LOCATION]", "[LICENSE_CONFIG]").toString();
            +   *   boolean fullRetract = true;
            +   *   long licenseCount = -1565113455;
            +   *   RetractLicenseConfigResponse response =
            +   *       licenseConfigServiceClient.retractLicenseConfig(
            +   *           billingAccountLicenseConfig, licenseConfig, fullRetract, licenseCount);
            +   * }
            +   * }
            + * + * @param billingAccountLicenseConfig Required. Full resource name of + * [BillingAccountLicenseConfig][]. + *

            Format: + * `billingAccounts/{billing_account}/billingAccountLicenseConfigs/{billing_account_license_config_id}`. + * @param licenseConfig Required. Full resource name of + * [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig]. + *

            Format: `projects/{project}/locations/{location}/licenseConfigs/{license_config_id}`. + * @param fullRetract Optional. If set to true, retract the entire license config. Otherwise, + * retract the specified license count. + * @param licenseCount Optional. The number of licenses to retract. Only used when full_retract is + * false. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final RetractLicenseConfigResponse retractLicenseConfig( + String billingAccountLicenseConfig, + String licenseConfig, + boolean fullRetract, + long licenseCount) { + RetractLicenseConfigRequest request = + RetractLicenseConfigRequest.newBuilder() + .setBillingAccountLicenseConfig(billingAccountLicenseConfig) + .setLicenseConfig(licenseConfig) + .setFullRetract(fullRetract) + .setLicenseCount(licenseCount) + .build(); + return retractLicenseConfig(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * This method is called from the billing account side to retract the + * [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig] from the given project back + * to the billing account. + * + *

            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 (LicenseConfigServiceClient licenseConfigServiceClient =
            +   *     LicenseConfigServiceClient.create()) {
            +   *   RetractLicenseConfigRequest request =
            +   *       RetractLicenseConfigRequest.newBuilder()
            +   *           .setBillingAccountLicenseConfig(
            +   *               BillingAccountLicenseConfigName.of(
            +   *                       "[BILLING_ACCOUNT]", "[BILLING_ACCOUNT_LICENSE_CONFIG]")
            +   *                   .toString())
            +   *           .setLicenseConfig(
            +   *               LicenseConfigName.of("[PROJECT]", "[LOCATION]", "[LICENSE_CONFIG]").toString())
            +   *           .setFullRetract(true)
            +   *           .setLicenseCount(-1565113455)
            +   *           .build();
            +   *   RetractLicenseConfigResponse response =
            +   *       licenseConfigServiceClient.retractLicenseConfig(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 RetractLicenseConfigResponse retractLicenseConfig( + RetractLicenseConfigRequest request) { + return retractLicenseConfigCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * This method is called from the billing account side to retract the + * [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig] from the given project back + * to the billing account. + * + *

            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 (LicenseConfigServiceClient licenseConfigServiceClient =
            +   *     LicenseConfigServiceClient.create()) {
            +   *   RetractLicenseConfigRequest request =
            +   *       RetractLicenseConfigRequest.newBuilder()
            +   *           .setBillingAccountLicenseConfig(
            +   *               BillingAccountLicenseConfigName.of(
            +   *                       "[BILLING_ACCOUNT]", "[BILLING_ACCOUNT_LICENSE_CONFIG]")
            +   *                   .toString())
            +   *           .setLicenseConfig(
            +   *               LicenseConfigName.of("[PROJECT]", "[LOCATION]", "[LICENSE_CONFIG]").toString())
            +   *           .setFullRetract(true)
            +   *           .setLicenseCount(-1565113455)
            +   *           .build();
            +   *   ApiFuture future =
            +   *       licenseConfigServiceClient.retractLicenseConfigCallable().futureCall(request);
            +   *   // Do something.
            +   *   RetractLicenseConfigResponse response = future.get();
            +   * }
            +   * }
            + */ + public final UnaryCallable + retractLicenseConfigCallable() { + return stub.retractLicenseConfigCallable(); + } + + @Override + public final void close() { + stub.close(); + } + + @Override + public void shutdown() { + stub.shutdown(); + } + + @Override + public boolean isShutdown() { + return stub.isShutdown(); + } + + @Override + public boolean isTerminated() { + return stub.isTerminated(); + } + + @Override + public void shutdownNow() { + stub.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return stub.awaitTermination(duration, unit); + } + + public static class ListLicenseConfigsPagedResponse + extends AbstractPagedListResponse< + ListLicenseConfigsRequest, + ListLicenseConfigsResponse, + LicenseConfig, + ListLicenseConfigsPage, + ListLicenseConfigsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListLicenseConfigsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListLicenseConfigsPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListLicenseConfigsPagedResponse(ListLicenseConfigsPage page) { + super(page, ListLicenseConfigsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListLicenseConfigsPage + extends AbstractPage< + ListLicenseConfigsRequest, + ListLicenseConfigsResponse, + LicenseConfig, + ListLicenseConfigsPage> { + + private ListLicenseConfigsPage( + PageContext context, + ListLicenseConfigsResponse response) { + super(context, response); + } + + private static ListLicenseConfigsPage createEmptyPage() { + return new ListLicenseConfigsPage(null, null); + } + + @Override + protected ListLicenseConfigsPage createPage( + PageContext context, + ListLicenseConfigsResponse response) { + return new ListLicenseConfigsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListLicenseConfigsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListLicenseConfigsRequest, + ListLicenseConfigsResponse, + LicenseConfig, + ListLicenseConfigsPage, + ListLicenseConfigsFixedSizeCollection> { + + private ListLicenseConfigsFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListLicenseConfigsFixedSizeCollection createEmptyCollection() { + return new ListLicenseConfigsFixedSizeCollection(null, 0); + } + + @Override + protected ListLicenseConfigsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListLicenseConfigsFixedSizeCollection(pages, collectionSize); + } + } +} diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/LicenseConfigServiceSettings.java b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/LicenseConfigServiceSettings.java new file mode 100644 index 000000000000..2b3a2cc5a286 --- /dev/null +++ b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/LicenseConfigServiceSettings.java @@ -0,0 +1,286 @@ +/* + * 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.discoveryengine.v1beta; + +import static com.google.cloud.discoveryengine.v1beta.LicenseConfigServiceClient.ListLicenseConfigsPagedResponse; + +import com.google.api.core.ApiFunction; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientSettings; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.cloud.discoveryengine.v1beta.stub.LicenseConfigServiceStubSettings; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link LicenseConfigServiceClient}. + * + *

            The default instance has everything set to sensible defaults: + * + *

              + *
            • The default service address (discoveryengine.googleapis.com) and default port (443) are + * used. + *
            • Credentials are acquired automatically through Application Default Credentials. + *
            • Retries are configured for idempotent methods but not for non-idempotent methods. + *
            + * + *

            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 createLicenseConfig: + * + *

            {@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
            + * LicenseConfigServiceSettings.Builder licenseConfigServiceSettingsBuilder =
            + *     LicenseConfigServiceSettings.newBuilder();
            + * licenseConfigServiceSettingsBuilder
            + *     .createLicenseConfigSettings()
            + *     .setRetrySettings(
            + *         licenseConfigServiceSettingsBuilder
            + *             .createLicenseConfigSettings()
            + *             .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());
            + * LicenseConfigServiceSettings licenseConfigServiceSettings =
            + *     licenseConfigServiceSettingsBuilder.build();
            + * }
            + * + * Please refer to the [Client Side Retry + * Guide](https://docs.cloud.google.com/java/docs/client-retries) for additional support in setting + * retries. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class LicenseConfigServiceSettings extends ClientSettings { + + /** Returns the object with the settings used for calls to createLicenseConfig. */ + public UnaryCallSettings + createLicenseConfigSettings() { + return ((LicenseConfigServiceStubSettings) getStubSettings()).createLicenseConfigSettings(); + } + + /** Returns the object with the settings used for calls to updateLicenseConfig. */ + public UnaryCallSettings + updateLicenseConfigSettings() { + return ((LicenseConfigServiceStubSettings) getStubSettings()).updateLicenseConfigSettings(); + } + + /** Returns the object with the settings used for calls to getLicenseConfig. */ + public UnaryCallSettings getLicenseConfigSettings() { + return ((LicenseConfigServiceStubSettings) getStubSettings()).getLicenseConfigSettings(); + } + + /** Returns the object with the settings used for calls to listLicenseConfigs. */ + public PagedCallSettings< + ListLicenseConfigsRequest, ListLicenseConfigsResponse, ListLicenseConfigsPagedResponse> + listLicenseConfigsSettings() { + return ((LicenseConfigServiceStubSettings) getStubSettings()).listLicenseConfigsSettings(); + } + + /** Returns the object with the settings used for calls to distributeLicenseConfig. */ + public UnaryCallSettings + distributeLicenseConfigSettings() { + return ((LicenseConfigServiceStubSettings) getStubSettings()).distributeLicenseConfigSettings(); + } + + /** Returns the object with the settings used for calls to retractLicenseConfig. */ + public UnaryCallSettings + retractLicenseConfigSettings() { + return ((LicenseConfigServiceStubSettings) getStubSettings()).retractLicenseConfigSettings(); + } + + public static final LicenseConfigServiceSettings create(LicenseConfigServiceStubSettings stub) + throws IOException { + return new LicenseConfigServiceSettings.Builder(stub.toBuilder()).build(); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return LicenseConfigServiceStubSettings.defaultExecutorProviderBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return LicenseConfigServiceStubSettings.getDefaultEndpoint(); + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return LicenseConfigServiceStubSettings.getDefaultServiceScopes(); + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return LicenseConfigServiceStubSettings.defaultCredentialsProviderBuilder(); + } + + /** Returns a builder for the default gRPC ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return LicenseConfigServiceStubSettings.defaultGrpcTransportProviderBuilder(); + } + + /** Returns a builder for the default REST ChannelProvider for this service. */ + @BetaApi + public static InstantiatingHttpJsonChannelProvider.Builder + defaultHttpJsonTransportProviderBuilder() { + return LicenseConfigServiceStubSettings.defaultHttpJsonTransportProviderBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return LicenseConfigServiceStubSettings.defaultTransportChannelProvider(); + } + + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return LicenseConfigServiceStubSettings.defaultApiClientHeaderProviderBuilder(); + } + + /** Returns a new gRPC builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new REST builder for this class. */ + public static Builder newHttpJsonBuilder() { + return Builder.createHttpJsonDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected LicenseConfigServiceSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + } + + /** Builder for LicenseConfigServiceSettings. */ + public static class Builder + extends ClientSettings.Builder { + + protected Builder() throws IOException { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(LicenseConfigServiceStubSettings.newBuilder(clientContext)); + } + + protected Builder(LicenseConfigServiceSettings settings) { + super(settings.getStubSettings().toBuilder()); + } + + protected Builder(LicenseConfigServiceStubSettings.Builder stubSettings) { + super(stubSettings); + } + + private static Builder createDefault() { + return new Builder(LicenseConfigServiceStubSettings.newBuilder()); + } + + private static Builder createHttpJsonDefault() { + return new Builder(LicenseConfigServiceStubSettings.newHttpJsonBuilder()); + } + + public LicenseConfigServiceStubSettings.Builder getStubSettingsBuilder() { + return ((LicenseConfigServiceStubSettings.Builder) getStubSettings()); + } + + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

            Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) { + super.applyToAllUnaryMethods( + getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); + return this; + } + + /** Returns the builder for the settings used for calls to createLicenseConfig. */ + public UnaryCallSettings.Builder + createLicenseConfigSettings() { + return getStubSettingsBuilder().createLicenseConfigSettings(); + } + + /** Returns the builder for the settings used for calls to updateLicenseConfig. */ + public UnaryCallSettings.Builder + updateLicenseConfigSettings() { + return getStubSettingsBuilder().updateLicenseConfigSettings(); + } + + /** Returns the builder for the settings used for calls to getLicenseConfig. */ + public UnaryCallSettings.Builder + getLicenseConfigSettings() { + return getStubSettingsBuilder().getLicenseConfigSettings(); + } + + /** Returns the builder for the settings used for calls to listLicenseConfigs. */ + public PagedCallSettings.Builder< + ListLicenseConfigsRequest, ListLicenseConfigsResponse, ListLicenseConfigsPagedResponse> + listLicenseConfigsSettings() { + return getStubSettingsBuilder().listLicenseConfigsSettings(); + } + + /** Returns the builder for the settings used for calls to distributeLicenseConfig. */ + public UnaryCallSettings.Builder< + DistributeLicenseConfigRequest, DistributeLicenseConfigResponse> + distributeLicenseConfigSettings() { + return getStubSettingsBuilder().distributeLicenseConfigSettings(); + } + + /** Returns the builder for the settings used for calls to retractLicenseConfig. */ + public UnaryCallSettings.Builder + retractLicenseConfigSettings() { + return getStubSettingsBuilder().retractLicenseConfigSettings(); + } + + @Override + public LicenseConfigServiceSettings build() throws IOException { + return new LicenseConfigServiceSettings(this); + } + } +} diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/ProjectServiceClient.java b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/ProjectServiceClient.java index e52431b95011..572b71b9d09c 100644 --- a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/ProjectServiceClient.java +++ b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/ProjectServiceClient.java @@ -300,6 +300,7 @@ public final OperationFuture provisionProject * .setName(ProjectName.of("[PROJECT]").toString()) * .setAcceptDataUseTerms(true) * .setDataUseTermsVersion("dataUseTermsVersion-1913570450") + * .setSaasParams(ProvisionProjectRequest.SaasParams.newBuilder().build()) * .build(); * Project response = projectServiceClient.provisionProjectAsync(request).get(); * } @@ -335,6 +336,7 @@ public final OperationFuture provisionProject * .setName(ProjectName.of("[PROJECT]").toString()) * .setAcceptDataUseTerms(true) * .setDataUseTermsVersion("dataUseTermsVersion-1913570450") + * .setSaasParams(ProvisionProjectRequest.SaasParams.newBuilder().build()) * .build(); * OperationFuture future = * projectServiceClient.provisionProjectOperationCallable().futureCall(request); @@ -370,6 +372,7 @@ public final OperationFuture provisionProject * .setName(ProjectName.of("[PROJECT]").toString()) * .setAcceptDataUseTerms(true) * .setDataUseTermsVersion("dataUseTermsVersion-1913570450") + * .setSaasParams(ProvisionProjectRequest.SaasParams.newBuilder().build()) * .build(); * ApiFuture future = * projectServiceClient.provisionProjectCallable().futureCall(request); diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/SearchServiceClient.java b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/SearchServiceClient.java index c784044653d3..090a09825b8a 100644 --- a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/SearchServiceClient.java +++ b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/SearchServiceClient.java @@ -58,12 +58,14 @@ * "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[BRANCH]") * .toString()) * .setQuery("query107944136") + * .addAllPageCategories(new ArrayList()) * .setImageQuery(SearchRequest.ImageQuery.newBuilder().build()) * .setPageSize(883849137) * .setPageToken("pageToken873572522") * .setOffset(-1019779949) * .setOneBoxPageSize(1988477988) * .addAllDataStoreSpecs(new ArrayList()) + * .setNumResultsPerDataStore(397658288) * .setFilter("filter-1274492040") * .setCanonicalFilter("canonicalFilter-722283124") * .setOrderBy("orderBy-1207110587") @@ -84,12 +86,19 @@ * .setNaturalLanguageQueryUnderstandingSpec( * SearchRequest.NaturalLanguageQueryUnderstandingSpec.newBuilder().build()) * .setSearchAsYouTypeSpec(SearchRequest.SearchAsYouTypeSpec.newBuilder().build()) + * .setDisplaySpec(SearchRequest.DisplaySpec.newBuilder().build()) + * .addAllCrowdingSpecs(new ArrayList()) * .setSession( * SessionName.ofProjectLocationDataStoreSessionName( * "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[SESSION]") * .toString()) * .setSessionSpec(SearchRequest.SessionSpec.newBuilder().build()) + * .setRelevanceFilterSpec(SearchRequest.RelevanceFilterSpec.newBuilder().build()) * .setPersonalizationSpec(SearchRequest.PersonalizationSpec.newBuilder().build()) + * .setRelevanceScoreSpec(SearchRequest.RelevanceScoreSpec.newBuilder().build()) + * .setSearchAddonSpec(SearchRequest.SearchAddonSpec.newBuilder().build()) + * .setCustomRankingParams(SearchRequest.CustomRankingParams.newBuilder().build()) + * .setEntity("entity-1298275357") * .build(); * for (SearchResponse.SearchResult element : searchServiceClient.search(request).iterateAll()) { * // doThingsWith(element); @@ -269,12 +278,14 @@ public SearchServiceStub getStub() { * "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[BRANCH]") * .toString()) * .setQuery("query107944136") + * .addAllPageCategories(new ArrayList()) * .setImageQuery(SearchRequest.ImageQuery.newBuilder().build()) * .setPageSize(883849137) * .setPageToken("pageToken873572522") * .setOffset(-1019779949) * .setOneBoxPageSize(1988477988) * .addAllDataStoreSpecs(new ArrayList()) + * .setNumResultsPerDataStore(397658288) * .setFilter("filter-1274492040") * .setCanonicalFilter("canonicalFilter-722283124") * .setOrderBy("orderBy-1207110587") @@ -295,12 +306,19 @@ public SearchServiceStub getStub() { * .setNaturalLanguageQueryUnderstandingSpec( * SearchRequest.NaturalLanguageQueryUnderstandingSpec.newBuilder().build()) * .setSearchAsYouTypeSpec(SearchRequest.SearchAsYouTypeSpec.newBuilder().build()) + * .setDisplaySpec(SearchRequest.DisplaySpec.newBuilder().build()) + * .addAllCrowdingSpecs(new ArrayList()) * .setSession( * SessionName.ofProjectLocationDataStoreSessionName( * "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[SESSION]") * .toString()) * .setSessionSpec(SearchRequest.SessionSpec.newBuilder().build()) + * .setRelevanceFilterSpec(SearchRequest.RelevanceFilterSpec.newBuilder().build()) * .setPersonalizationSpec(SearchRequest.PersonalizationSpec.newBuilder().build()) + * .setRelevanceScoreSpec(SearchRequest.RelevanceScoreSpec.newBuilder().build()) + * .setSearchAddonSpec(SearchRequest.SearchAddonSpec.newBuilder().build()) + * .setCustomRankingParams(SearchRequest.CustomRankingParams.newBuilder().build()) + * .setEntity("entity-1298275357") * .build(); * for (SearchResponse.SearchResult element : searchServiceClient.search(request).iterateAll()) { * // doThingsWith(element); @@ -339,12 +357,14 @@ public final SearchPagedResponse search(SearchRequest request) { * "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[BRANCH]") * .toString()) * .setQuery("query107944136") + * .addAllPageCategories(new ArrayList()) * .setImageQuery(SearchRequest.ImageQuery.newBuilder().build()) * .setPageSize(883849137) * .setPageToken("pageToken873572522") * .setOffset(-1019779949) * .setOneBoxPageSize(1988477988) * .addAllDataStoreSpecs(new ArrayList()) + * .setNumResultsPerDataStore(397658288) * .setFilter("filter-1274492040") * .setCanonicalFilter("canonicalFilter-722283124") * .setOrderBy("orderBy-1207110587") @@ -365,12 +385,19 @@ public final SearchPagedResponse search(SearchRequest request) { * .setNaturalLanguageQueryUnderstandingSpec( * SearchRequest.NaturalLanguageQueryUnderstandingSpec.newBuilder().build()) * .setSearchAsYouTypeSpec(SearchRequest.SearchAsYouTypeSpec.newBuilder().build()) + * .setDisplaySpec(SearchRequest.DisplaySpec.newBuilder().build()) + * .addAllCrowdingSpecs(new ArrayList()) * .setSession( * SessionName.ofProjectLocationDataStoreSessionName( * "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[SESSION]") * .toString()) * .setSessionSpec(SearchRequest.SessionSpec.newBuilder().build()) + * .setRelevanceFilterSpec(SearchRequest.RelevanceFilterSpec.newBuilder().build()) * .setPersonalizationSpec(SearchRequest.PersonalizationSpec.newBuilder().build()) + * .setRelevanceScoreSpec(SearchRequest.RelevanceScoreSpec.newBuilder().build()) + * .setSearchAddonSpec(SearchRequest.SearchAddonSpec.newBuilder().build()) + * .setCustomRankingParams(SearchRequest.CustomRankingParams.newBuilder().build()) + * .setEntity("entity-1298275357") * .build(); * ApiFuture future = * searchServiceClient.searchPagedCallable().futureCall(request); @@ -409,12 +436,14 @@ public final UnaryCallable searchPagedCallab * "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[BRANCH]") * .toString()) * .setQuery("query107944136") + * .addAllPageCategories(new ArrayList()) * .setImageQuery(SearchRequest.ImageQuery.newBuilder().build()) * .setPageSize(883849137) * .setPageToken("pageToken873572522") * .setOffset(-1019779949) * .setOneBoxPageSize(1988477988) * .addAllDataStoreSpecs(new ArrayList()) + * .setNumResultsPerDataStore(397658288) * .setFilter("filter-1274492040") * .setCanonicalFilter("canonicalFilter-722283124") * .setOrderBy("orderBy-1207110587") @@ -435,12 +464,19 @@ public final UnaryCallable searchPagedCallab * .setNaturalLanguageQueryUnderstandingSpec( * SearchRequest.NaturalLanguageQueryUnderstandingSpec.newBuilder().build()) * .setSearchAsYouTypeSpec(SearchRequest.SearchAsYouTypeSpec.newBuilder().build()) + * .setDisplaySpec(SearchRequest.DisplaySpec.newBuilder().build()) + * .addAllCrowdingSpecs(new ArrayList()) * .setSession( * SessionName.ofProjectLocationDataStoreSessionName( * "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[SESSION]") * .toString()) * .setSessionSpec(SearchRequest.SessionSpec.newBuilder().build()) + * .setRelevanceFilterSpec(SearchRequest.RelevanceFilterSpec.newBuilder().build()) * .setPersonalizationSpec(SearchRequest.PersonalizationSpec.newBuilder().build()) + * .setRelevanceScoreSpec(SearchRequest.RelevanceScoreSpec.newBuilder().build()) + * .setSearchAddonSpec(SearchRequest.SearchAddonSpec.newBuilder().build()) + * .setCustomRankingParams(SearchRequest.CustomRankingParams.newBuilder().build()) + * .setEntity("entity-1298275357") * .build(); * while (true) { * SearchResponse response = searchServiceClient.searchCallable().call(request); @@ -496,12 +532,14 @@ public final UnaryCallable searchCallable() { * "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[BRANCH]") * .toString()) * .setQuery("query107944136") + * .addAllPageCategories(new ArrayList()) * .setImageQuery(SearchRequest.ImageQuery.newBuilder().build()) * .setPageSize(883849137) * .setPageToken("pageToken873572522") * .setOffset(-1019779949) * .setOneBoxPageSize(1988477988) * .addAllDataStoreSpecs(new ArrayList()) + * .setNumResultsPerDataStore(397658288) * .setFilter("filter-1274492040") * .setCanonicalFilter("canonicalFilter-722283124") * .setOrderBy("orderBy-1207110587") @@ -522,12 +560,19 @@ public final UnaryCallable searchCallable() { * .setNaturalLanguageQueryUnderstandingSpec( * SearchRequest.NaturalLanguageQueryUnderstandingSpec.newBuilder().build()) * .setSearchAsYouTypeSpec(SearchRequest.SearchAsYouTypeSpec.newBuilder().build()) + * .setDisplaySpec(SearchRequest.DisplaySpec.newBuilder().build()) + * .addAllCrowdingSpecs(new ArrayList()) * .setSession( * SessionName.ofProjectLocationDataStoreSessionName( * "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[SESSION]") * .toString()) * .setSessionSpec(SearchRequest.SessionSpec.newBuilder().build()) + * .setRelevanceFilterSpec(SearchRequest.RelevanceFilterSpec.newBuilder().build()) * .setPersonalizationSpec(SearchRequest.PersonalizationSpec.newBuilder().build()) + * .setRelevanceScoreSpec(SearchRequest.RelevanceScoreSpec.newBuilder().build()) + * .setSearchAddonSpec(SearchRequest.SearchAddonSpec.newBuilder().build()) + * .setCustomRankingParams(SearchRequest.CustomRankingParams.newBuilder().build()) + * .setEntity("entity-1298275357") * .build(); * for (SearchResponse.SearchResult element : * searchServiceClient.searchLite(request).iterateAll()) { @@ -578,12 +623,14 @@ public final SearchLitePagedResponse searchLite(SearchRequest request) { * "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[BRANCH]") * .toString()) * .setQuery("query107944136") + * .addAllPageCategories(new ArrayList()) * .setImageQuery(SearchRequest.ImageQuery.newBuilder().build()) * .setPageSize(883849137) * .setPageToken("pageToken873572522") * .setOffset(-1019779949) * .setOneBoxPageSize(1988477988) * .addAllDataStoreSpecs(new ArrayList()) + * .setNumResultsPerDataStore(397658288) * .setFilter("filter-1274492040") * .setCanonicalFilter("canonicalFilter-722283124") * .setOrderBy("orderBy-1207110587") @@ -604,12 +651,19 @@ public final SearchLitePagedResponse searchLite(SearchRequest request) { * .setNaturalLanguageQueryUnderstandingSpec( * SearchRequest.NaturalLanguageQueryUnderstandingSpec.newBuilder().build()) * .setSearchAsYouTypeSpec(SearchRequest.SearchAsYouTypeSpec.newBuilder().build()) + * .setDisplaySpec(SearchRequest.DisplaySpec.newBuilder().build()) + * .addAllCrowdingSpecs(new ArrayList()) * .setSession( * SessionName.ofProjectLocationDataStoreSessionName( * "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[SESSION]") * .toString()) * .setSessionSpec(SearchRequest.SessionSpec.newBuilder().build()) + * .setRelevanceFilterSpec(SearchRequest.RelevanceFilterSpec.newBuilder().build()) * .setPersonalizationSpec(SearchRequest.PersonalizationSpec.newBuilder().build()) + * .setRelevanceScoreSpec(SearchRequest.RelevanceScoreSpec.newBuilder().build()) + * .setSearchAddonSpec(SearchRequest.SearchAddonSpec.newBuilder().build()) + * .setCustomRankingParams(SearchRequest.CustomRankingParams.newBuilder().build()) + * .setEntity("entity-1298275357") * .build(); * ApiFuture future = * searchServiceClient.searchLitePagedCallable().futureCall(request); @@ -659,12 +713,14 @@ public final UnaryCallable searchLitePag * "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[BRANCH]") * .toString()) * .setQuery("query107944136") + * .addAllPageCategories(new ArrayList()) * .setImageQuery(SearchRequest.ImageQuery.newBuilder().build()) * .setPageSize(883849137) * .setPageToken("pageToken873572522") * .setOffset(-1019779949) * .setOneBoxPageSize(1988477988) * .addAllDataStoreSpecs(new ArrayList()) + * .setNumResultsPerDataStore(397658288) * .setFilter("filter-1274492040") * .setCanonicalFilter("canonicalFilter-722283124") * .setOrderBy("orderBy-1207110587") @@ -685,12 +741,19 @@ public final UnaryCallable searchLitePag * .setNaturalLanguageQueryUnderstandingSpec( * SearchRequest.NaturalLanguageQueryUnderstandingSpec.newBuilder().build()) * .setSearchAsYouTypeSpec(SearchRequest.SearchAsYouTypeSpec.newBuilder().build()) + * .setDisplaySpec(SearchRequest.DisplaySpec.newBuilder().build()) + * .addAllCrowdingSpecs(new ArrayList()) * .setSession( * SessionName.ofProjectLocationDataStoreSessionName( * "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[SESSION]") * .toString()) * .setSessionSpec(SearchRequest.SessionSpec.newBuilder().build()) + * .setRelevanceFilterSpec(SearchRequest.RelevanceFilterSpec.newBuilder().build()) * .setPersonalizationSpec(SearchRequest.PersonalizationSpec.newBuilder().build()) + * .setRelevanceScoreSpec(SearchRequest.RelevanceScoreSpec.newBuilder().build()) + * .setSearchAddonSpec(SearchRequest.SearchAddonSpec.newBuilder().build()) + * .setCustomRankingParams(SearchRequest.CustomRankingParams.newBuilder().build()) + * .setEntity("entity-1298275357") * .build(); * while (true) { * SearchResponse response = searchServiceClient.searchLiteCallable().call(request); diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/ServingConfigServiceClient.java b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/ServingConfigServiceClient.java index 7460da874392..97b18c67e372 100644 --- a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/ServingConfigServiceClient.java +++ b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/ServingConfigServiceClient.java @@ -28,6 +28,7 @@ import com.google.cloud.discoveryengine.v1beta.stub.ServingConfigServiceStub; import com.google.cloud.discoveryengine.v1beta.stub.ServingConfigServiceStubSettings; import com.google.common.util.concurrent.MoreExecutors; +import com.google.protobuf.Empty; import com.google.protobuf.FieldMask; import java.io.IOException; import java.util.List; @@ -50,10 +51,12 @@ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (ServingConfigServiceClient servingConfigServiceClient = * ServingConfigServiceClient.create()) { + * DataStoreName parent = + * DataStoreName.ofProjectLocationDataStoreName("[PROJECT]", "[LOCATION]", "[DATA_STORE]"); * ServingConfig servingConfig = ServingConfig.newBuilder().build(); - * FieldMask updateMask = FieldMask.newBuilder().build(); + * String servingConfigId = "servingConfigId-831052759"; * ServingConfig response = - * servingConfigServiceClient.updateServingConfig(servingConfig, updateMask); + * servingConfigServiceClient.createServingConfig(parent, servingConfig, servingConfigId); * } * } * @@ -69,6 +72,48 @@ * Method Variants * * + *

            CreateServingConfig + *

            Creates a ServingConfig. + *

            Note: The Google Cloud console works only with the default serving config. Additional ServingConfigs can be created and managed only via the API. + *

            A maximum of 100 [ServingConfig][google.cloud.discoveryengine.v1beta.ServingConfig]s are allowed in an [Engine][google.cloud.discoveryengine.v1beta.Engine], otherwise a RESOURCE_EXHAUSTED error is returned. + * + *

            Request object method variants only take one parameter, a request object, which must be constructed before the call.

            + *
              + *
            • createServingConfig(CreateServingConfigRequest request) + *

            + *

            "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

            + *
              + *
            • createServingConfig(DataStoreName parent, ServingConfig servingConfig, String servingConfigId) + *

            • createServingConfig(EngineName parent, ServingConfig servingConfig, String servingConfigId) + *

            • createServingConfig(String parent, ServingConfig servingConfig, String servingConfigId) + *

            + *

            Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

            + *
              + *
            • createServingConfigCallable() + *

            + * + * + * + *

            DeleteServingConfig + *

            Deletes a ServingConfig. + *

            Returns a NOT_FOUND error if the ServingConfig does not exist. + * + *

            Request object method variants only take one parameter, a request object, which must be constructed before the call.

            + *
              + *
            • deleteServingConfig(DeleteServingConfigRequest request) + *

            + *

            "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

            + *
              + *
            • deleteServingConfig(ServingConfigName name) + *

            • deleteServingConfig(String name) + *

            + *

            Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

            + *
              + *
            • deleteServingConfigCallable() + *

            + * + * + * *

            UpdateServingConfig *

            Updates a ServingConfig. *

            Returns a NOT_FOUND error if the ServingConfig does not exist. @@ -237,6 +282,376 @@ public ServingConfigServiceStub getStub() { return stub; } + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a ServingConfig. + * + *

            Note: The Google Cloud console works only with the default serving config. Additional + * ServingConfigs can be created and managed only via the API. + * + *

            A maximum of 100 [ServingConfig][google.cloud.discoveryengine.v1beta.ServingConfig]s are + * allowed in an [Engine][google.cloud.discoveryengine.v1beta.Engine], otherwise a + * RESOURCE_EXHAUSTED error is returned. + * + *

            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 (ServingConfigServiceClient servingConfigServiceClient =
            +   *     ServingConfigServiceClient.create()) {
            +   *   DataStoreName parent =
            +   *       DataStoreName.ofProjectLocationDataStoreName("[PROJECT]", "[LOCATION]", "[DATA_STORE]");
            +   *   ServingConfig servingConfig = ServingConfig.newBuilder().build();
            +   *   String servingConfigId = "servingConfigId-831052759";
            +   *   ServingConfig response =
            +   *       servingConfigServiceClient.createServingConfig(parent, servingConfig, servingConfigId);
            +   * }
            +   * }
            + * + * @param parent Required. Full resource name of parent. Format: + * `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}` + * @param servingConfig Required. The ServingConfig to create. + * @param servingConfigId Required. The ID to use for the ServingConfig, which will become the + * final component of the ServingConfig's resource name. + *

            This value should be 4-63 characters, and valid characters are + * /[a-zA-Z0-9][a-zA-Z0-9_-]+/. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ServingConfig createServingConfig( + DataStoreName parent, ServingConfig servingConfig, String servingConfigId) { + CreateServingConfigRequest request = + CreateServingConfigRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setServingConfig(servingConfig) + .setServingConfigId(servingConfigId) + .build(); + return createServingConfig(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a ServingConfig. + * + *

            Note: The Google Cloud console works only with the default serving config. Additional + * ServingConfigs can be created and managed only via the API. + * + *

            A maximum of 100 [ServingConfig][google.cloud.discoveryengine.v1beta.ServingConfig]s are + * allowed in an [Engine][google.cloud.discoveryengine.v1beta.Engine], otherwise a + * RESOURCE_EXHAUSTED error is returned. + * + *

            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 (ServingConfigServiceClient servingConfigServiceClient =
            +   *     ServingConfigServiceClient.create()) {
            +   *   EngineName parent = EngineName.of("[PROJECT]", "[LOCATION]", "[COLLECTION]", "[ENGINE]");
            +   *   ServingConfig servingConfig = ServingConfig.newBuilder().build();
            +   *   String servingConfigId = "servingConfigId-831052759";
            +   *   ServingConfig response =
            +   *       servingConfigServiceClient.createServingConfig(parent, servingConfig, servingConfigId);
            +   * }
            +   * }
            + * + * @param parent Required. Full resource name of parent. Format: + * `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}` + * @param servingConfig Required. The ServingConfig to create. + * @param servingConfigId Required. The ID to use for the ServingConfig, which will become the + * final component of the ServingConfig's resource name. + *

            This value should be 4-63 characters, and valid characters are + * /[a-zA-Z0-9][a-zA-Z0-9_-]+/. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ServingConfig createServingConfig( + EngineName parent, ServingConfig servingConfig, String servingConfigId) { + CreateServingConfigRequest request = + CreateServingConfigRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setServingConfig(servingConfig) + .setServingConfigId(servingConfigId) + .build(); + return createServingConfig(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a ServingConfig. + * + *

            Note: The Google Cloud console works only with the default serving config. Additional + * ServingConfigs can be created and managed only via the API. + * + *

            A maximum of 100 [ServingConfig][google.cloud.discoveryengine.v1beta.ServingConfig]s are + * allowed in an [Engine][google.cloud.discoveryengine.v1beta.Engine], otherwise a + * RESOURCE_EXHAUSTED error is returned. + * + *

            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 (ServingConfigServiceClient servingConfigServiceClient =
            +   *     ServingConfigServiceClient.create()) {
            +   *   String parent =
            +   *       DataStoreName.ofProjectLocationDataStoreName("[PROJECT]", "[LOCATION]", "[DATA_STORE]")
            +   *           .toString();
            +   *   ServingConfig servingConfig = ServingConfig.newBuilder().build();
            +   *   String servingConfigId = "servingConfigId-831052759";
            +   *   ServingConfig response =
            +   *       servingConfigServiceClient.createServingConfig(parent, servingConfig, servingConfigId);
            +   * }
            +   * }
            + * + * @param parent Required. Full resource name of parent. Format: + * `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}` + * @param servingConfig Required. The ServingConfig to create. + * @param servingConfigId Required. The ID to use for the ServingConfig, which will become the + * final component of the ServingConfig's resource name. + *

            This value should be 4-63 characters, and valid characters are + * /[a-zA-Z0-9][a-zA-Z0-9_-]+/. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ServingConfig createServingConfig( + String parent, ServingConfig servingConfig, String servingConfigId) { + CreateServingConfigRequest request = + CreateServingConfigRequest.newBuilder() + .setParent(parent) + .setServingConfig(servingConfig) + .setServingConfigId(servingConfigId) + .build(); + return createServingConfig(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a ServingConfig. + * + *

            Note: The Google Cloud console works only with the default serving config. Additional + * ServingConfigs can be created and managed only via the API. + * + *

            A maximum of 100 [ServingConfig][google.cloud.discoveryengine.v1beta.ServingConfig]s are + * allowed in an [Engine][google.cloud.discoveryengine.v1beta.Engine], otherwise a + * RESOURCE_EXHAUSTED error is returned. + * + *

            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 (ServingConfigServiceClient servingConfigServiceClient =
            +   *     ServingConfigServiceClient.create()) {
            +   *   CreateServingConfigRequest request =
            +   *       CreateServingConfigRequest.newBuilder()
            +   *           .setParent(
            +   *               DataStoreName.ofProjectLocationDataStoreName(
            +   *                       "[PROJECT]", "[LOCATION]", "[DATA_STORE]")
            +   *                   .toString())
            +   *           .setServingConfig(ServingConfig.newBuilder().build())
            +   *           .setServingConfigId("servingConfigId-831052759")
            +   *           .build();
            +   *   ServingConfig response = servingConfigServiceClient.createServingConfig(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 ServingConfig createServingConfig(CreateServingConfigRequest request) { + return createServingConfigCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a ServingConfig. + * + *

            Note: The Google Cloud console works only with the default serving config. Additional + * ServingConfigs can be created and managed only via the API. + * + *

            A maximum of 100 [ServingConfig][google.cloud.discoveryengine.v1beta.ServingConfig]s are + * allowed in an [Engine][google.cloud.discoveryengine.v1beta.Engine], otherwise a + * RESOURCE_EXHAUSTED error is returned. + * + *

            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 (ServingConfigServiceClient servingConfigServiceClient =
            +   *     ServingConfigServiceClient.create()) {
            +   *   CreateServingConfigRequest request =
            +   *       CreateServingConfigRequest.newBuilder()
            +   *           .setParent(
            +   *               DataStoreName.ofProjectLocationDataStoreName(
            +   *                       "[PROJECT]", "[LOCATION]", "[DATA_STORE]")
            +   *                   .toString())
            +   *           .setServingConfig(ServingConfig.newBuilder().build())
            +   *           .setServingConfigId("servingConfigId-831052759")
            +   *           .build();
            +   *   ApiFuture future =
            +   *       servingConfigServiceClient.createServingConfigCallable().futureCall(request);
            +   *   // Do something.
            +   *   ServingConfig response = future.get();
            +   * }
            +   * }
            + */ + public final UnaryCallable + createServingConfigCallable() { + return stub.createServingConfigCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a ServingConfig. + * + *

            Returns a NOT_FOUND error if the ServingConfig does not exist. + * + *

            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 (ServingConfigServiceClient servingConfigServiceClient =
            +   *     ServingConfigServiceClient.create()) {
            +   *   ServingConfigName name =
            +   *       ServingConfigName.ofProjectLocationDataStoreServingConfigName(
            +   *           "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[SERVING_CONFIG]");
            +   *   servingConfigServiceClient.deleteServingConfig(name);
            +   * }
            +   * }
            + * + * @param name Required. The resource name of the ServingConfig to delete. Format: + * `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/servingConfigs/{serving_config_id}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteServingConfig(ServingConfigName name) { + DeleteServingConfigRequest request = + DeleteServingConfigRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + deleteServingConfig(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a ServingConfig. + * + *

            Returns a NOT_FOUND error if the ServingConfig does not exist. + * + *

            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 (ServingConfigServiceClient servingConfigServiceClient =
            +   *     ServingConfigServiceClient.create()) {
            +   *   String name =
            +   *       ServingConfigName.ofProjectLocationDataStoreServingConfigName(
            +   *               "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[SERVING_CONFIG]")
            +   *           .toString();
            +   *   servingConfigServiceClient.deleteServingConfig(name);
            +   * }
            +   * }
            + * + * @param name Required. The resource name of the ServingConfig to delete. Format: + * `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/servingConfigs/{serving_config_id}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteServingConfig(String name) { + DeleteServingConfigRequest request = + DeleteServingConfigRequest.newBuilder().setName(name).build(); + deleteServingConfig(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a ServingConfig. + * + *

            Returns a NOT_FOUND error if the ServingConfig does not exist. + * + *

            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 (ServingConfigServiceClient servingConfigServiceClient =
            +   *     ServingConfigServiceClient.create()) {
            +   *   DeleteServingConfigRequest request =
            +   *       DeleteServingConfigRequest.newBuilder()
            +   *           .setName(
            +   *               ServingConfigName.ofProjectLocationDataStoreServingConfigName(
            +   *                       "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[SERVING_CONFIG]")
            +   *                   .toString())
            +   *           .build();
            +   *   servingConfigServiceClient.deleteServingConfig(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 void deleteServingConfig(DeleteServingConfigRequest request) { + deleteServingConfigCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a ServingConfig. + * + *

            Returns a NOT_FOUND error if the ServingConfig does not exist. + * + *

            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 (ServingConfigServiceClient servingConfigServiceClient =
            +   *     ServingConfigServiceClient.create()) {
            +   *   DeleteServingConfigRequest request =
            +   *       DeleteServingConfigRequest.newBuilder()
            +   *           .setName(
            +   *               ServingConfigName.ofProjectLocationDataStoreServingConfigName(
            +   *                       "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[SERVING_CONFIG]")
            +   *                   .toString())
            +   *           .build();
            +   *   ApiFuture future =
            +   *       servingConfigServiceClient.deleteServingConfigCallable().futureCall(request);
            +   *   // Do something.
            +   *   future.get();
            +   * }
            +   * }
            + */ + public final UnaryCallable deleteServingConfigCallable() { + return stub.deleteServingConfigCallable(); + } + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Updates a ServingConfig. diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/ServingConfigServiceSettings.java b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/ServingConfigServiceSettings.java index fcbf49279ee6..f10b24c3fed6 100644 --- a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/ServingConfigServiceSettings.java +++ b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/ServingConfigServiceSettings.java @@ -31,6 +31,7 @@ import com.google.api.gax.rpc.TransportChannelProvider; import com.google.api.gax.rpc.UnaryCallSettings; import com.google.cloud.discoveryengine.v1beta.stub.ServingConfigServiceStubSettings; +import com.google.protobuf.Empty; import java.io.IOException; import java.util.List; import javax.annotation.Generated; @@ -53,7 +54,7 @@ * *

            For example, to set the * [RetrySettings](https://cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.retrying.RetrySettings) - * of updateServingConfig: + * of createServingConfig: * *

            {@code
              * // This snippet has been automatically generated and should be regarded as a code template only.
            @@ -64,10 +65,10 @@
              * ServingConfigServiceSettings.Builder servingConfigServiceSettingsBuilder =
              *     ServingConfigServiceSettings.newBuilder();
              * servingConfigServiceSettingsBuilder
            - *     .updateServingConfigSettings()
            + *     .createServingConfigSettings()
              *     .setRetrySettings(
              *         servingConfigServiceSettingsBuilder
            - *             .updateServingConfigSettings()
            + *             .createServingConfigSettings()
              *             .getRetrySettings()
              *             .toBuilder()
              *             .setInitialRetryDelayDuration(Duration.ofSeconds(1))
            @@ -91,6 +92,17 @@
             @Generated("by gapic-generator-java")
             public class ServingConfigServiceSettings extends ClientSettings {
             
            +  /** Returns the object with the settings used for calls to createServingConfig. */
            +  public UnaryCallSettings
            +      createServingConfigSettings() {
            +    return ((ServingConfigServiceStubSettings) getStubSettings()).createServingConfigSettings();
            +  }
            +
            +  /** Returns the object with the settings used for calls to deleteServingConfig. */
            +  public UnaryCallSettings deleteServingConfigSettings() {
            +    return ((ServingConfigServiceStubSettings) getStubSettings()).deleteServingConfigSettings();
            +  }
            +
               /** Returns the object with the settings used for calls to updateServingConfig. */
               public UnaryCallSettings
                   updateServingConfigSettings() {
            @@ -222,6 +234,18 @@ public Builder applyToAllUnaryMethods(
                   return this;
                 }
             
            +    /** Returns the builder for the settings used for calls to createServingConfig. */
            +    public UnaryCallSettings.Builder
            +        createServingConfigSettings() {
            +      return getStubSettingsBuilder().createServingConfigSettings();
            +    }
            +
            +    /** Returns the builder for the settings used for calls to deleteServingConfig. */
            +    public UnaryCallSettings.Builder
            +        deleteServingConfigSettings() {
            +      return getStubSettingsBuilder().deleteServingConfigSettings();
            +    }
            +
                 /** Returns the builder for the settings used for calls to updateServingConfig. */
                 public UnaryCallSettings.Builder
                     updateServingConfigSettings() {
            diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/SessionServiceClient.java b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/SessionServiceClient.java
            index 29115aeee095..525d49c9ba03 100644
            --- a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/SessionServiceClient.java
            +++ b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/SessionServiceClient.java
            @@ -365,6 +365,7 @@ public final Session createSession(String parent, Session session) {
                *                       "[PROJECT]", "[LOCATION]", "[DATA_STORE]")
                *                   .toString())
                *           .setSession(Session.newBuilder().build())
            +   *           .setSessionId("sessionId607796817")
                *           .build();
                *   Session response = sessionServiceClient.createSession(request);
                * }
            @@ -400,6 +401,7 @@ public final Session createSession(CreateSessionRequest request) {
                *                       "[PROJECT]", "[LOCATION]", "[DATA_STORE]")
                *                   .toString())
                *           .setSession(Session.newBuilder().build())
            +   *           .setSessionId("sessionId607796817")
                *           .build();
                *   ApiFuture future = sessionServiceClient.createSessionCallable().futureCall(request);
                *   // Do something.
            diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/UserLicenseServiceClient.java b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/UserLicenseServiceClient.java
            new file mode 100644
            index 000000000000..fec207703e9d
            --- /dev/null
            +++ b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/UserLicenseServiceClient.java
            @@ -0,0 +1,763 @@
            +/*
            + * 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.discoveryengine.v1beta;
            +
            +import com.google.api.core.ApiFuture;
            +import com.google.api.core.ApiFutures;
            +import com.google.api.core.BetaApi;
            +import com.google.api.gax.core.BackgroundResource;
            +import com.google.api.gax.httpjson.longrunning.OperationsClient;
            +import com.google.api.gax.longrunning.OperationFuture;
            +import com.google.api.gax.paging.AbstractFixedSizeCollection;
            +import com.google.api.gax.paging.AbstractPage;
            +import com.google.api.gax.paging.AbstractPagedListResponse;
            +import com.google.api.gax.rpc.OperationCallable;
            +import com.google.api.gax.rpc.PageContext;
            +import com.google.api.gax.rpc.UnaryCallable;
            +import com.google.cloud.discoveryengine.v1beta.stub.UserLicenseServiceStub;
            +import com.google.cloud.discoveryengine.v1beta.stub.UserLicenseServiceStubSettings;
            +import com.google.common.util.concurrent.MoreExecutors;
            +import com.google.longrunning.Operation;
            +import java.io.IOException;
            +import java.util.List;
            +import java.util.concurrent.TimeUnit;
            +import javax.annotation.Generated;
            +
            +// AUTO-GENERATED DOCUMENTATION AND CLASS.
            +/**
            + * Service Description: Service for managing User Licenses.
            + *
            + * 

            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: + * + *

            {@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 (UserLicenseServiceClient userLicenseServiceClient = UserLicenseServiceClient.create()) {
            + *   UserStoreName parent = UserStoreName.of("[PROJECT]", "[LOCATION]", "[USER_STORE]");
            + *   ListLicenseConfigsUsageStatsResponse response =
            + *       userLicenseServiceClient.listLicenseConfigsUsageStats(parent);
            + * }
            + * }
            + * + *

            Note: close() needs to be called on the UserLicenseServiceClient object to clean up resources + * such as threads. In the example above, try-with-resources is used, which automatically calls + * close(). + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
            Methods
            MethodDescriptionMethod Variants

            ListUserLicenses

            Lists the User Licenses.

            + *

            Request object method variants only take one parameter, a request object, which must be constructed before the call.

            + *
              + *
            • listUserLicenses(ListUserLicensesRequest request) + *

            + *

            "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

            + *
              + *
            • listUserLicenses(UserStoreName parent) + *

            • listUserLicenses(String parent) + *

            + *

            Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

            + *
              + *
            • listUserLicensesPagedCallable() + *

            • listUserLicensesCallable() + *

            + *

            ListLicenseConfigsUsageStats

            Lists all the [LicenseConfigUsageStats][google.cloud.discoveryengine.v1beta.LicenseConfigUsageStats]s associated with the project.

            + *

            Request object method variants only take one parameter, a request object, which must be constructed before the call.

            + *
              + *
            • listLicenseConfigsUsageStats(ListLicenseConfigsUsageStatsRequest request) + *

            + *

            "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

            + *
              + *
            • listLicenseConfigsUsageStats(UserStoreName parent) + *

            • listLicenseConfigsUsageStats(String parent) + *

            + *

            Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

            + *
              + *
            • listLicenseConfigsUsageStatsCallable() + *

            + *

            BatchUpdateUserLicenses

            Updates the User License. This method is used for batch assign/unassign licenses to users.

            + *

            Request object method variants only take one parameter, a request object, which must be constructed before the call.

            + *
              + *
            • batchUpdateUserLicensesAsync(BatchUpdateUserLicensesRequest request) + *

            + *

            Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

            + *
              + *
            • batchUpdateUserLicensesOperationCallable() + *

            • batchUpdateUserLicensesCallable() + *

            + *
            + * + *

            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 UserLicenseServiceSettings to + * create(). For example: + * + *

            To customize credentials: + * + *

            {@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
            + * UserLicenseServiceSettings userLicenseServiceSettings =
            + *     UserLicenseServiceSettings.newBuilder()
            + *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
            + *         .build();
            + * UserLicenseServiceClient userLicenseServiceClient =
            + *     UserLicenseServiceClient.create(userLicenseServiceSettings);
            + * }
            + * + *

            To customize the endpoint: + * + *

            {@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
            + * UserLicenseServiceSettings userLicenseServiceSettings =
            + *     UserLicenseServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
            + * UserLicenseServiceClient userLicenseServiceClient =
            + *     UserLicenseServiceClient.create(userLicenseServiceSettings);
            + * }
            + * + *

            To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over + * the wire: + * + *

            {@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
            + * UserLicenseServiceSettings userLicenseServiceSettings =
            + *     UserLicenseServiceSettings.newHttpJsonBuilder().build();
            + * UserLicenseServiceClient userLicenseServiceClient =
            + *     UserLicenseServiceClient.create(userLicenseServiceSettings);
            + * }
            + * + *

            Please refer to the GitHub repository's samples for more quickstart code snippets. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class UserLicenseServiceClient implements BackgroundResource { + private final UserLicenseServiceSettings settings; + private final UserLicenseServiceStub stub; + private final OperationsClient httpJsonOperationsClient; + private final com.google.longrunning.OperationsClient operationsClient; + + /** Constructs an instance of UserLicenseServiceClient with default settings. */ + public static final UserLicenseServiceClient create() throws IOException { + return create(UserLicenseServiceSettings.newBuilder().build()); + } + + /** + * Constructs an instance of UserLicenseServiceClient, 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 UserLicenseServiceClient create(UserLicenseServiceSettings settings) + throws IOException { + return new UserLicenseServiceClient(settings); + } + + /** + * Constructs an instance of UserLicenseServiceClient, using the given stub for making calls. This + * is for advanced usage - prefer using create(UserLicenseServiceSettings). + */ + public static final UserLicenseServiceClient create(UserLicenseServiceStub stub) { + return new UserLicenseServiceClient(stub); + } + + /** + * Constructs an instance of UserLicenseServiceClient, 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 UserLicenseServiceClient(UserLicenseServiceSettings settings) throws IOException { + this.settings = settings; + this.stub = ((UserLicenseServiceStubSettings) settings.getStubSettings()).createStub(); + this.operationsClient = + com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub()); + this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub()); + } + + protected UserLicenseServiceClient(UserLicenseServiceStub stub) { + this.settings = null; + this.stub = stub; + this.operationsClient = + com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub()); + this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub()); + } + + public final UserLicenseServiceSettings getSettings() { + return settings; + } + + public UserLicenseServiceStub getStub() { + return stub; + } + + /** + * Returns the OperationsClient that can be used to query the status of a long-running operation + * returned by another API method call. + */ + public final com.google.longrunning.OperationsClient getOperationsClient() { + return operationsClient; + } + + /** + * Returns the OperationsClient that can be used to query the status of a long-running operation + * returned by another API method call. + */ + @BetaApi + public final OperationsClient getHttpJsonOperationsClient() { + return httpJsonOperationsClient; + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists the User Licenses. + * + *

            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 (UserLicenseServiceClient userLicenseServiceClient = UserLicenseServiceClient.create()) {
            +   *   UserStoreName parent = UserStoreName.of("[PROJECT]", "[LOCATION]", "[USER_STORE]");
            +   *   for (UserLicense element : userLicenseServiceClient.listUserLicenses(parent).iterateAll()) {
            +   *     // doThingsWith(element);
            +   *   }
            +   * }
            +   * }
            + * + * @param parent Required. The parent [UserStore][google.cloud.discoveryengine.v1beta.UserStore] + * resource name, format: + * `projects/{project}/locations/{location}/userStores/{user_store_id}`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListUserLicensesPagedResponse listUserLicenses(UserStoreName parent) { + ListUserLicensesRequest request = + ListUserLicensesRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listUserLicenses(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists the User Licenses. + * + *

            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 (UserLicenseServiceClient userLicenseServiceClient = UserLicenseServiceClient.create()) {
            +   *   String parent = UserStoreName.of("[PROJECT]", "[LOCATION]", "[USER_STORE]").toString();
            +   *   for (UserLicense element : userLicenseServiceClient.listUserLicenses(parent).iterateAll()) {
            +   *     // doThingsWith(element);
            +   *   }
            +   * }
            +   * }
            + * + * @param parent Required. The parent [UserStore][google.cloud.discoveryengine.v1beta.UserStore] + * resource name, format: + * `projects/{project}/locations/{location}/userStores/{user_store_id}`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListUserLicensesPagedResponse listUserLicenses(String parent) { + ListUserLicensesRequest request = + ListUserLicensesRequest.newBuilder().setParent(parent).build(); + return listUserLicenses(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists the User Licenses. + * + *

            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 (UserLicenseServiceClient userLicenseServiceClient = UserLicenseServiceClient.create()) {
            +   *   ListUserLicensesRequest request =
            +   *       ListUserLicensesRequest.newBuilder()
            +   *           .setParent(UserStoreName.of("[PROJECT]", "[LOCATION]", "[USER_STORE]").toString())
            +   *           .setPageSize(883849137)
            +   *           .setPageToken("pageToken873572522")
            +   *           .setFilter("filter-1274492040")
            +   *           .setOrderBy("orderBy-1207110587")
            +   *           .build();
            +   *   for (UserLicense element : userLicenseServiceClient.listUserLicenses(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 ListUserLicensesPagedResponse listUserLicenses(ListUserLicensesRequest request) { + return listUserLicensesPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists the User Licenses. + * + *

            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 (UserLicenseServiceClient userLicenseServiceClient = UserLicenseServiceClient.create()) {
            +   *   ListUserLicensesRequest request =
            +   *       ListUserLicensesRequest.newBuilder()
            +   *           .setParent(UserStoreName.of("[PROJECT]", "[LOCATION]", "[USER_STORE]").toString())
            +   *           .setPageSize(883849137)
            +   *           .setPageToken("pageToken873572522")
            +   *           .setFilter("filter-1274492040")
            +   *           .setOrderBy("orderBy-1207110587")
            +   *           .build();
            +   *   ApiFuture future =
            +   *       userLicenseServiceClient.listUserLicensesPagedCallable().futureCall(request);
            +   *   // Do something.
            +   *   for (UserLicense element : future.get().iterateAll()) {
            +   *     // doThingsWith(element);
            +   *   }
            +   * }
            +   * }
            + */ + public final UnaryCallable + listUserLicensesPagedCallable() { + return stub.listUserLicensesPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists the User Licenses. + * + *

            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 (UserLicenseServiceClient userLicenseServiceClient = UserLicenseServiceClient.create()) {
            +   *   ListUserLicensesRequest request =
            +   *       ListUserLicensesRequest.newBuilder()
            +   *           .setParent(UserStoreName.of("[PROJECT]", "[LOCATION]", "[USER_STORE]").toString())
            +   *           .setPageSize(883849137)
            +   *           .setPageToken("pageToken873572522")
            +   *           .setFilter("filter-1274492040")
            +   *           .setOrderBy("orderBy-1207110587")
            +   *           .build();
            +   *   while (true) {
            +   *     ListUserLicensesResponse response =
            +   *         userLicenseServiceClient.listUserLicensesCallable().call(request);
            +   *     for (UserLicense element : response.getUserLicensesList()) {
            +   *       // doThingsWith(element);
            +   *     }
            +   *     String nextPageToken = response.getNextPageToken();
            +   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
            +   *       request = request.toBuilder().setPageToken(nextPageToken).build();
            +   *     } else {
            +   *       break;
            +   *     }
            +   *   }
            +   * }
            +   * }
            + */ + public final UnaryCallable + listUserLicensesCallable() { + return stub.listUserLicensesCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all the + * [LicenseConfigUsageStats][google.cloud.discoveryengine.v1beta.LicenseConfigUsageStats]s + * associated with the project. + * + *

            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 (UserLicenseServiceClient userLicenseServiceClient = UserLicenseServiceClient.create()) {
            +   *   UserStoreName parent = UserStoreName.of("[PROJECT]", "[LOCATION]", "[USER_STORE]");
            +   *   ListLicenseConfigsUsageStatsResponse response =
            +   *       userLicenseServiceClient.listLicenseConfigsUsageStats(parent);
            +   * }
            +   * }
            + * + * @param parent Required. The parent branch resource name, such as + * `projects/{project}/locations/{location}/userStores/{user_store_id}`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListLicenseConfigsUsageStatsResponse listLicenseConfigsUsageStats( + UserStoreName parent) { + ListLicenseConfigsUsageStatsRequest request = + ListLicenseConfigsUsageStatsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listLicenseConfigsUsageStats(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all the + * [LicenseConfigUsageStats][google.cloud.discoveryengine.v1beta.LicenseConfigUsageStats]s + * associated with the project. + * + *

            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 (UserLicenseServiceClient userLicenseServiceClient = UserLicenseServiceClient.create()) {
            +   *   String parent = UserStoreName.of("[PROJECT]", "[LOCATION]", "[USER_STORE]").toString();
            +   *   ListLicenseConfigsUsageStatsResponse response =
            +   *       userLicenseServiceClient.listLicenseConfigsUsageStats(parent);
            +   * }
            +   * }
            + * + * @param parent Required. The parent branch resource name, such as + * `projects/{project}/locations/{location}/userStores/{user_store_id}`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListLicenseConfigsUsageStatsResponse listLicenseConfigsUsageStats(String parent) { + ListLicenseConfigsUsageStatsRequest request = + ListLicenseConfigsUsageStatsRequest.newBuilder().setParent(parent).build(); + return listLicenseConfigsUsageStats(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all the + * [LicenseConfigUsageStats][google.cloud.discoveryengine.v1beta.LicenseConfigUsageStats]s + * associated with the project. + * + *

            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 (UserLicenseServiceClient userLicenseServiceClient = UserLicenseServiceClient.create()) {
            +   *   ListLicenseConfigsUsageStatsRequest request =
            +   *       ListLicenseConfigsUsageStatsRequest.newBuilder()
            +   *           .setParent(UserStoreName.of("[PROJECT]", "[LOCATION]", "[USER_STORE]").toString())
            +   *           .build();
            +   *   ListLicenseConfigsUsageStatsResponse response =
            +   *       userLicenseServiceClient.listLicenseConfigsUsageStats(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 ListLicenseConfigsUsageStatsResponse listLicenseConfigsUsageStats( + ListLicenseConfigsUsageStatsRequest request) { + return listLicenseConfigsUsageStatsCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all the + * [LicenseConfigUsageStats][google.cloud.discoveryengine.v1beta.LicenseConfigUsageStats]s + * associated with the project. + * + *

            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 (UserLicenseServiceClient userLicenseServiceClient = UserLicenseServiceClient.create()) {
            +   *   ListLicenseConfigsUsageStatsRequest request =
            +   *       ListLicenseConfigsUsageStatsRequest.newBuilder()
            +   *           .setParent(UserStoreName.of("[PROJECT]", "[LOCATION]", "[USER_STORE]").toString())
            +   *           .build();
            +   *   ApiFuture future =
            +   *       userLicenseServiceClient.listLicenseConfigsUsageStatsCallable().futureCall(request);
            +   *   // Do something.
            +   *   ListLicenseConfigsUsageStatsResponse response = future.get();
            +   * }
            +   * }
            + */ + public final UnaryCallable< + ListLicenseConfigsUsageStatsRequest, ListLicenseConfigsUsageStatsResponse> + listLicenseConfigsUsageStatsCallable() { + return stub.listLicenseConfigsUsageStatsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the User License. This method is used for batch assign/unassign licenses to users. + * + *

            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 (UserLicenseServiceClient userLicenseServiceClient = UserLicenseServiceClient.create()) {
            +   *   BatchUpdateUserLicensesRequest request =
            +   *       BatchUpdateUserLicensesRequest.newBuilder()
            +   *           .setParent(UserStoreName.of("[PROJECT]", "[LOCATION]", "[USER_STORE]").toString())
            +   *           .setDeleteUnassignedUserLicenses(true)
            +   *           .build();
            +   *   BatchUpdateUserLicensesResponse response =
            +   *       userLicenseServiceClient.batchUpdateUserLicensesAsync(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 + batchUpdateUserLicensesAsync(BatchUpdateUserLicensesRequest request) { + return batchUpdateUserLicensesOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the User License. This method is used for batch assign/unassign licenses to users. + * + *

            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 (UserLicenseServiceClient userLicenseServiceClient = UserLicenseServiceClient.create()) {
            +   *   BatchUpdateUserLicensesRequest request =
            +   *       BatchUpdateUserLicensesRequest.newBuilder()
            +   *           .setParent(UserStoreName.of("[PROJECT]", "[LOCATION]", "[USER_STORE]").toString())
            +   *           .setDeleteUnassignedUserLicenses(true)
            +   *           .build();
            +   *   OperationFuture future =
            +   *       userLicenseServiceClient.batchUpdateUserLicensesOperationCallable().futureCall(request);
            +   *   // Do something.
            +   *   BatchUpdateUserLicensesResponse response = future.get();
            +   * }
            +   * }
            + */ + public final OperationCallable< + BatchUpdateUserLicensesRequest, + BatchUpdateUserLicensesResponse, + BatchUpdateUserLicensesMetadata> + batchUpdateUserLicensesOperationCallable() { + return stub.batchUpdateUserLicensesOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the User License. This method is used for batch assign/unassign licenses to users. + * + *

            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 (UserLicenseServiceClient userLicenseServiceClient = UserLicenseServiceClient.create()) {
            +   *   BatchUpdateUserLicensesRequest request =
            +   *       BatchUpdateUserLicensesRequest.newBuilder()
            +   *           .setParent(UserStoreName.of("[PROJECT]", "[LOCATION]", "[USER_STORE]").toString())
            +   *           .setDeleteUnassignedUserLicenses(true)
            +   *           .build();
            +   *   ApiFuture future =
            +   *       userLicenseServiceClient.batchUpdateUserLicensesCallable().futureCall(request);
            +   *   // Do something.
            +   *   Operation response = future.get();
            +   * }
            +   * }
            + */ + public final UnaryCallable + batchUpdateUserLicensesCallable() { + return stub.batchUpdateUserLicensesCallable(); + } + + @Override + public final void close() { + stub.close(); + } + + @Override + public void shutdown() { + stub.shutdown(); + } + + @Override + public boolean isShutdown() { + return stub.isShutdown(); + } + + @Override + public boolean isTerminated() { + return stub.isTerminated(); + } + + @Override + public void shutdownNow() { + stub.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return stub.awaitTermination(duration, unit); + } + + public static class ListUserLicensesPagedResponse + extends AbstractPagedListResponse< + ListUserLicensesRequest, + ListUserLicensesResponse, + UserLicense, + ListUserLicensesPage, + ListUserLicensesFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListUserLicensesPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListUserLicensesPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListUserLicensesPagedResponse(ListUserLicensesPage page) { + super(page, ListUserLicensesFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListUserLicensesPage + extends AbstractPage< + ListUserLicensesRequest, ListUserLicensesResponse, UserLicense, ListUserLicensesPage> { + + private ListUserLicensesPage( + PageContext context, + ListUserLicensesResponse response) { + super(context, response); + } + + private static ListUserLicensesPage createEmptyPage() { + return new ListUserLicensesPage(null, null); + } + + @Override + protected ListUserLicensesPage createPage( + PageContext context, + ListUserLicensesResponse response) { + return new ListUserLicensesPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListUserLicensesFixedSizeCollection + extends AbstractFixedSizeCollection< + ListUserLicensesRequest, + ListUserLicensesResponse, + UserLicense, + ListUserLicensesPage, + ListUserLicensesFixedSizeCollection> { + + private ListUserLicensesFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListUserLicensesFixedSizeCollection createEmptyCollection() { + return new ListUserLicensesFixedSizeCollection(null, 0); + } + + @Override + protected ListUserLicensesFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListUserLicensesFixedSizeCollection(pages, collectionSize); + } + } +} diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/UserLicenseServiceSettings.java b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/UserLicenseServiceSettings.java new file mode 100644 index 000000000000..bc7aa19a612e --- /dev/null +++ b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/UserLicenseServiceSettings.java @@ -0,0 +1,299 @@ +/* + * 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.discoveryengine.v1beta; + +import static com.google.cloud.discoveryengine.v1beta.UserLicenseServiceClient.ListUserLicensesPagedResponse; + +import com.google.api.core.ApiFunction; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientSettings; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.cloud.discoveryengine.v1beta.stub.UserLicenseServiceStubSettings; +import com.google.longrunning.Operation; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link UserLicenseServiceClient}. + * + *

            The default instance has everything set to sensible defaults: + * + *

              + *
            • The default service address (discoveryengine.googleapis.com) and default port (443) are + * used. + *
            • Credentials are acquired automatically through Application Default Credentials. + *
            • Retries are configured for idempotent methods but not for non-idempotent methods. + *
            + * + *

            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 listLicenseConfigsUsageStats: + * + *

            {@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
            + * UserLicenseServiceSettings.Builder userLicenseServiceSettingsBuilder =
            + *     UserLicenseServiceSettings.newBuilder();
            + * userLicenseServiceSettingsBuilder
            + *     .listLicenseConfigsUsageStatsSettings()
            + *     .setRetrySettings(
            + *         userLicenseServiceSettingsBuilder
            + *             .listLicenseConfigsUsageStatsSettings()
            + *             .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());
            + * UserLicenseServiceSettings userLicenseServiceSettings =
            + *     userLicenseServiceSettingsBuilder.build();
            + * }
            + * + * Please refer to the [Client Side Retry + * Guide](https://docs.cloud.google.com/java/docs/client-retries) for additional support in setting + * retries. + * + *

            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 batchUpdateUserLicenses: + * + *

            {@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
            + * UserLicenseServiceSettings.Builder userLicenseServiceSettingsBuilder =
            + *     UserLicenseServiceSettings.newBuilder();
            + * TimedRetryAlgorithm timedRetryAlgorithm =
            + *     OperationalTimedPollAlgorithm.create(
            + *         RetrySettings.newBuilder()
            + *             .setInitialRetryDelayDuration(Duration.ofMillis(500))
            + *             .setRetryDelayMultiplier(1.5)
            + *             .setMaxRetryDelayDuration(Duration.ofMillis(5000))
            + *             .setTotalTimeoutDuration(Duration.ofHours(24))
            + *             .build());
            + * userLicenseServiceSettingsBuilder
            + *     .createClusterOperationSettings()
            + *     .setPollingAlgorithm(timedRetryAlgorithm)
            + *     .build();
            + * }
            + */ +@BetaApi +@Generated("by gapic-generator-java") +public class UserLicenseServiceSettings extends ClientSettings { + + /** Returns the object with the settings used for calls to listUserLicenses. */ + public PagedCallSettings< + ListUserLicensesRequest, ListUserLicensesResponse, ListUserLicensesPagedResponse> + listUserLicensesSettings() { + return ((UserLicenseServiceStubSettings) getStubSettings()).listUserLicensesSettings(); + } + + /** Returns the object with the settings used for calls to listLicenseConfigsUsageStats. */ + public UnaryCallSettings< + ListLicenseConfigsUsageStatsRequest, ListLicenseConfigsUsageStatsResponse> + listLicenseConfigsUsageStatsSettings() { + return ((UserLicenseServiceStubSettings) getStubSettings()) + .listLicenseConfigsUsageStatsSettings(); + } + + /** Returns the object with the settings used for calls to batchUpdateUserLicenses. */ + public UnaryCallSettings + batchUpdateUserLicensesSettings() { + return ((UserLicenseServiceStubSettings) getStubSettings()).batchUpdateUserLicensesSettings(); + } + + /** Returns the object with the settings used for calls to batchUpdateUserLicenses. */ + public OperationCallSettings< + BatchUpdateUserLicensesRequest, + BatchUpdateUserLicensesResponse, + BatchUpdateUserLicensesMetadata> + batchUpdateUserLicensesOperationSettings() { + return ((UserLicenseServiceStubSettings) getStubSettings()) + .batchUpdateUserLicensesOperationSettings(); + } + + public static final UserLicenseServiceSettings create(UserLicenseServiceStubSettings stub) + throws IOException { + return new UserLicenseServiceSettings.Builder(stub.toBuilder()).build(); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return UserLicenseServiceStubSettings.defaultExecutorProviderBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return UserLicenseServiceStubSettings.getDefaultEndpoint(); + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return UserLicenseServiceStubSettings.getDefaultServiceScopes(); + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return UserLicenseServiceStubSettings.defaultCredentialsProviderBuilder(); + } + + /** Returns a builder for the default gRPC ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return UserLicenseServiceStubSettings.defaultGrpcTransportProviderBuilder(); + } + + /** Returns a builder for the default REST ChannelProvider for this service. */ + @BetaApi + public static InstantiatingHttpJsonChannelProvider.Builder + defaultHttpJsonTransportProviderBuilder() { + return UserLicenseServiceStubSettings.defaultHttpJsonTransportProviderBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return UserLicenseServiceStubSettings.defaultTransportChannelProvider(); + } + + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return UserLicenseServiceStubSettings.defaultApiClientHeaderProviderBuilder(); + } + + /** Returns a new gRPC builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new REST builder for this class. */ + public static Builder newHttpJsonBuilder() { + return Builder.createHttpJsonDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected UserLicenseServiceSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + } + + /** Builder for UserLicenseServiceSettings. */ + public static class Builder extends ClientSettings.Builder { + + protected Builder() throws IOException { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(UserLicenseServiceStubSettings.newBuilder(clientContext)); + } + + protected Builder(UserLicenseServiceSettings settings) { + super(settings.getStubSettings().toBuilder()); + } + + protected Builder(UserLicenseServiceStubSettings.Builder stubSettings) { + super(stubSettings); + } + + private static Builder createDefault() { + return new Builder(UserLicenseServiceStubSettings.newBuilder()); + } + + private static Builder createHttpJsonDefault() { + return new Builder(UserLicenseServiceStubSettings.newHttpJsonBuilder()); + } + + public UserLicenseServiceStubSettings.Builder getStubSettingsBuilder() { + return ((UserLicenseServiceStubSettings.Builder) getStubSettings()); + } + + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

            Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) { + super.applyToAllUnaryMethods( + getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); + return this; + } + + /** Returns the builder for the settings used for calls to listUserLicenses. */ + public PagedCallSettings.Builder< + ListUserLicensesRequest, ListUserLicensesResponse, ListUserLicensesPagedResponse> + listUserLicensesSettings() { + return getStubSettingsBuilder().listUserLicensesSettings(); + } + + /** Returns the builder for the settings used for calls to listLicenseConfigsUsageStats. */ + public UnaryCallSettings.Builder< + ListLicenseConfigsUsageStatsRequest, ListLicenseConfigsUsageStatsResponse> + listLicenseConfigsUsageStatsSettings() { + return getStubSettingsBuilder().listLicenseConfigsUsageStatsSettings(); + } + + /** Returns the builder for the settings used for calls to batchUpdateUserLicenses. */ + public UnaryCallSettings.Builder + batchUpdateUserLicensesSettings() { + return getStubSettingsBuilder().batchUpdateUserLicensesSettings(); + } + + /** Returns the builder for the settings used for calls to batchUpdateUserLicenses. */ + public OperationCallSettings.Builder< + BatchUpdateUserLicensesRequest, + BatchUpdateUserLicensesResponse, + BatchUpdateUserLicensesMetadata> + batchUpdateUserLicensesOperationSettings() { + return getStubSettingsBuilder().batchUpdateUserLicensesOperationSettings(); + } + + @Override + public UserLicenseServiceSettings build() throws IOException { + return new UserLicenseServiceSettings(this); + } + } +} diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/UserStoreServiceClient.java b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/UserStoreServiceClient.java new file mode 100644 index 000000000000..3c4627815cbc --- /dev/null +++ b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/UserStoreServiceClient.java @@ -0,0 +1,436 @@ +/* + * 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.discoveryengine.v1beta; + +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.discoveryengine.v1beta.stub.UserStoreServiceStub; +import com.google.cloud.discoveryengine.v1beta.stub.UserStoreServiceStubSettings; +import com.google.protobuf.FieldMask; +import java.io.IOException; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Service Description: Service for managing User Stores. + * + *

            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: + * + *

            {@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 (UserStoreServiceClient userStoreServiceClient = UserStoreServiceClient.create()) {
            + *   UserStoreName name = UserStoreName.of("[PROJECT]", "[LOCATION]", "[USER_STORE]");
            + *   UserStore response = userStoreServiceClient.getUserStore(name);
            + * }
            + * }
            + * + *

            Note: close() needs to be called on the UserStoreServiceClient object to clean up resources + * such as threads. In the example above, try-with-resources is used, which automatically calls + * close(). + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
            Methods
            MethodDescriptionMethod Variants

            GetUserStore

            Gets the User Store.

            + *

            Request object method variants only take one parameter, a request object, which must be constructed before the call.

            + *
              + *
            • getUserStore(GetUserStoreRequest request) + *

            + *

            "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

            + *
              + *
            • getUserStore(UserStoreName name) + *

            • getUserStore(String name) + *

            + *

            Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

            + *
              + *
            • getUserStoreCallable() + *

            + *

            UpdateUserStore

            Updates the User Store.

            + *

            Request object method variants only take one parameter, a request object, which must be constructed before the call.

            + *
              + *
            • updateUserStore(UpdateUserStoreRequest request) + *

            + *

            "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

            + *
              + *
            • updateUserStore(UserStore userStore, FieldMask updateMask) + *

            + *

            Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

            + *
              + *
            • updateUserStoreCallable() + *

            + *
            + * + *

            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 UserStoreServiceSettings to + * create(). For example: + * + *

            To customize credentials: + * + *

            {@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
            + * UserStoreServiceSettings userStoreServiceSettings =
            + *     UserStoreServiceSettings.newBuilder()
            + *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
            + *         .build();
            + * UserStoreServiceClient userStoreServiceClient =
            + *     UserStoreServiceClient.create(userStoreServiceSettings);
            + * }
            + * + *

            To customize the endpoint: + * + *

            {@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
            + * UserStoreServiceSettings userStoreServiceSettings =
            + *     UserStoreServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
            + * UserStoreServiceClient userStoreServiceClient =
            + *     UserStoreServiceClient.create(userStoreServiceSettings);
            + * }
            + * + *

            To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over + * the wire: + * + *

            {@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
            + * UserStoreServiceSettings userStoreServiceSettings =
            + *     UserStoreServiceSettings.newHttpJsonBuilder().build();
            + * UserStoreServiceClient userStoreServiceClient =
            + *     UserStoreServiceClient.create(userStoreServiceSettings);
            + * }
            + * + *

            Please refer to the GitHub repository's samples for more quickstart code snippets. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class UserStoreServiceClient implements BackgroundResource { + private final UserStoreServiceSettings settings; + private final UserStoreServiceStub stub; + + /** Constructs an instance of UserStoreServiceClient with default settings. */ + public static final UserStoreServiceClient create() throws IOException { + return create(UserStoreServiceSettings.newBuilder().build()); + } + + /** + * Constructs an instance of UserStoreServiceClient, 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 UserStoreServiceClient create(UserStoreServiceSettings settings) + throws IOException { + return new UserStoreServiceClient(settings); + } + + /** + * Constructs an instance of UserStoreServiceClient, using the given stub for making calls. This + * is for advanced usage - prefer using create(UserStoreServiceSettings). + */ + public static final UserStoreServiceClient create(UserStoreServiceStub stub) { + return new UserStoreServiceClient(stub); + } + + /** + * Constructs an instance of UserStoreServiceClient, 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 UserStoreServiceClient(UserStoreServiceSettings settings) throws IOException { + this.settings = settings; + this.stub = ((UserStoreServiceStubSettings) settings.getStubSettings()).createStub(); + } + + protected UserStoreServiceClient(UserStoreServiceStub stub) { + this.settings = null; + this.stub = stub; + } + + public final UserStoreServiceSettings getSettings() { + return settings; + } + + public UserStoreServiceStub getStub() { + return stub; + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the User Store. + * + *

            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 (UserStoreServiceClient userStoreServiceClient = UserStoreServiceClient.create()) {
            +   *   UserStoreName name = UserStoreName.of("[PROJECT]", "[LOCATION]", "[USER_STORE]");
            +   *   UserStore response = userStoreServiceClient.getUserStore(name);
            +   * }
            +   * }
            + * + * @param name Required. The name of the User Store to get. Format: + * `projects/{project}/locations/{location}/userStores/{user_store_id}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final UserStore getUserStore(UserStoreName name) { + GetUserStoreRequest request = + GetUserStoreRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getUserStore(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the User Store. + * + *

            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 (UserStoreServiceClient userStoreServiceClient = UserStoreServiceClient.create()) {
            +   *   String name = UserStoreName.of("[PROJECT]", "[LOCATION]", "[USER_STORE]").toString();
            +   *   UserStore response = userStoreServiceClient.getUserStore(name);
            +   * }
            +   * }
            + * + * @param name Required. The name of the User Store to get. Format: + * `projects/{project}/locations/{location}/userStores/{user_store_id}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final UserStore getUserStore(String name) { + GetUserStoreRequest request = GetUserStoreRequest.newBuilder().setName(name).build(); + return getUserStore(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the User Store. + * + *

            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 (UserStoreServiceClient userStoreServiceClient = UserStoreServiceClient.create()) {
            +   *   GetUserStoreRequest request =
            +   *       GetUserStoreRequest.newBuilder()
            +   *           .setName(UserStoreName.of("[PROJECT]", "[LOCATION]", "[USER_STORE]").toString())
            +   *           .build();
            +   *   UserStore response = userStoreServiceClient.getUserStore(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 UserStore getUserStore(GetUserStoreRequest request) { + return getUserStoreCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the User Store. + * + *

            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 (UserStoreServiceClient userStoreServiceClient = UserStoreServiceClient.create()) {
            +   *   GetUserStoreRequest request =
            +   *       GetUserStoreRequest.newBuilder()
            +   *           .setName(UserStoreName.of("[PROJECT]", "[LOCATION]", "[USER_STORE]").toString())
            +   *           .build();
            +   *   ApiFuture future =
            +   *       userStoreServiceClient.getUserStoreCallable().futureCall(request);
            +   *   // Do something.
            +   *   UserStore response = future.get();
            +   * }
            +   * }
            + */ + public final UnaryCallable getUserStoreCallable() { + return stub.getUserStoreCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the User Store. + * + *

            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 (UserStoreServiceClient userStoreServiceClient = UserStoreServiceClient.create()) {
            +   *   UserStore userStore = UserStore.newBuilder().build();
            +   *   FieldMask updateMask = FieldMask.newBuilder().build();
            +   *   UserStore response = userStoreServiceClient.updateUserStore(userStore, updateMask);
            +   * }
            +   * }
            + * + * @param userStore Required. The User Store to update. Format: + * `projects/{project}/locations/{location}/userStores/{user_store_id}` + * @param updateMask Optional. The list of fields to update. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final UserStore updateUserStore(UserStore userStore, FieldMask updateMask) { + UpdateUserStoreRequest request = + UpdateUserStoreRequest.newBuilder() + .setUserStore(userStore) + .setUpdateMask(updateMask) + .build(); + return updateUserStore(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the User Store. + * + *

            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 (UserStoreServiceClient userStoreServiceClient = UserStoreServiceClient.create()) {
            +   *   UpdateUserStoreRequest request =
            +   *       UpdateUserStoreRequest.newBuilder()
            +   *           .setUserStore(UserStore.newBuilder().build())
            +   *           .setUpdateMask(FieldMask.newBuilder().build())
            +   *           .build();
            +   *   UserStore response = userStoreServiceClient.updateUserStore(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 UserStore updateUserStore(UpdateUserStoreRequest request) { + return updateUserStoreCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the User Store. + * + *

            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 (UserStoreServiceClient userStoreServiceClient = UserStoreServiceClient.create()) {
            +   *   UpdateUserStoreRequest request =
            +   *       UpdateUserStoreRequest.newBuilder()
            +   *           .setUserStore(UserStore.newBuilder().build())
            +   *           .setUpdateMask(FieldMask.newBuilder().build())
            +   *           .build();
            +   *   ApiFuture future =
            +   *       userStoreServiceClient.updateUserStoreCallable().futureCall(request);
            +   *   // Do something.
            +   *   UserStore response = future.get();
            +   * }
            +   * }
            + */ + public final UnaryCallable updateUserStoreCallable() { + return stub.updateUserStoreCallable(); + } + + @Override + public final void close() { + stub.close(); + } + + @Override + public void shutdown() { + stub.shutdown(); + } + + @Override + public boolean isShutdown() { + return stub.isShutdown(); + } + + @Override + public boolean isTerminated() { + return stub.isTerminated(); + } + + @Override + public void shutdownNow() { + stub.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return stub.awaitTermination(duration, unit); + } +} diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/UserStoreServiceSettings.java b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/UserStoreServiceSettings.java new file mode 100644 index 000000000000..0a21ea2a2f0a --- /dev/null +++ b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/UserStoreServiceSettings.java @@ -0,0 +1,227 @@ +/* + * 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.discoveryengine.v1beta; + +import com.google.api.core.ApiFunction; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.cloud.discoveryengine.v1beta.stub.UserStoreServiceStubSettings; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link UserStoreServiceClient}. + * + *

            The default instance has everything set to sensible defaults: + * + *

              + *
            • The default service address (discoveryengine.googleapis.com) and default port (443) are + * used. + *
            • Credentials are acquired automatically through Application Default Credentials. + *
            • Retries are configured for idempotent methods but not for non-idempotent methods. + *
            + * + *

            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 getUserStore: + * + *

            {@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
            + * UserStoreServiceSettings.Builder userStoreServiceSettingsBuilder =
            + *     UserStoreServiceSettings.newBuilder();
            + * userStoreServiceSettingsBuilder
            + *     .getUserStoreSettings()
            + *     .setRetrySettings(
            + *         userStoreServiceSettingsBuilder
            + *             .getUserStoreSettings()
            + *             .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());
            + * UserStoreServiceSettings userStoreServiceSettings = userStoreServiceSettingsBuilder.build();
            + * }
            + * + * Please refer to the [Client Side Retry + * Guide](https://docs.cloud.google.com/java/docs/client-retries) for additional support in setting + * retries. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class UserStoreServiceSettings extends ClientSettings { + + /** Returns the object with the settings used for calls to getUserStore. */ + public UnaryCallSettings getUserStoreSettings() { + return ((UserStoreServiceStubSettings) getStubSettings()).getUserStoreSettings(); + } + + /** Returns the object with the settings used for calls to updateUserStore. */ + public UnaryCallSettings updateUserStoreSettings() { + return ((UserStoreServiceStubSettings) getStubSettings()).updateUserStoreSettings(); + } + + public static final UserStoreServiceSettings create(UserStoreServiceStubSettings stub) + throws IOException { + return new UserStoreServiceSettings.Builder(stub.toBuilder()).build(); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return UserStoreServiceStubSettings.defaultExecutorProviderBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return UserStoreServiceStubSettings.getDefaultEndpoint(); + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return UserStoreServiceStubSettings.getDefaultServiceScopes(); + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return UserStoreServiceStubSettings.defaultCredentialsProviderBuilder(); + } + + /** Returns a builder for the default gRPC ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return UserStoreServiceStubSettings.defaultGrpcTransportProviderBuilder(); + } + + /** Returns a builder for the default REST ChannelProvider for this service. */ + @BetaApi + public static InstantiatingHttpJsonChannelProvider.Builder + defaultHttpJsonTransportProviderBuilder() { + return UserStoreServiceStubSettings.defaultHttpJsonTransportProviderBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return UserStoreServiceStubSettings.defaultTransportChannelProvider(); + } + + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return UserStoreServiceStubSettings.defaultApiClientHeaderProviderBuilder(); + } + + /** Returns a new gRPC builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new REST builder for this class. */ + public static Builder newHttpJsonBuilder() { + return Builder.createHttpJsonDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected UserStoreServiceSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + } + + /** Builder for UserStoreServiceSettings. */ + public static class Builder extends ClientSettings.Builder { + + protected Builder() throws IOException { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(UserStoreServiceStubSettings.newBuilder(clientContext)); + } + + protected Builder(UserStoreServiceSettings settings) { + super(settings.getStubSettings().toBuilder()); + } + + protected Builder(UserStoreServiceStubSettings.Builder stubSettings) { + super(stubSettings); + } + + private static Builder createDefault() { + return new Builder(UserStoreServiceStubSettings.newBuilder()); + } + + private static Builder createHttpJsonDefault() { + return new Builder(UserStoreServiceStubSettings.newHttpJsonBuilder()); + } + + public UserStoreServiceStubSettings.Builder getStubSettingsBuilder() { + return ((UserStoreServiceStubSettings.Builder) getStubSettings()); + } + + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

            Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) { + super.applyToAllUnaryMethods( + getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); + return this; + } + + /** Returns the builder for the settings used for calls to getUserStore. */ + public UnaryCallSettings.Builder getUserStoreSettings() { + return getStubSettingsBuilder().getUserStoreSettings(); + } + + /** Returns the builder for the settings used for calls to updateUserStore. */ + public UnaryCallSettings.Builder updateUserStoreSettings() { + return getStubSettingsBuilder().updateUserStoreSettings(); + } + + @Override + public UserStoreServiceSettings build() throws IOException { + return new UserStoreServiceSettings(this); + } + } +} diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/gapic_metadata.json b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/gapic_metadata.json index 4e29abd47958..fcbca1f2ad4b 100644 --- a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/gapic_metadata.json +++ b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/gapic_metadata.json @@ -5,6 +5,69 @@ "protoPackage": "google.cloud.discoveryengine.v1beta", "libraryPackage": "com.google.cloud.discoveryengine.v1beta", "services": { + "AclConfigService": { + "clients": { + "grpc": { + "libraryClient": "AclConfigServiceClient", + "rpcs": { + "GetAclConfig": { + "methods": ["getAclConfig", "getAclConfig", "getAclConfig", "getAclConfigCallable"] + }, + "UpdateAclConfig": { + "methods": ["updateAclConfig", "updateAclConfigCallable"] + } + } + } + } + }, + "AssistantService": { + "clients": { + "grpc": { + "libraryClient": "AssistantServiceClient", + "rpcs": { + "CreateAssistant": { + "methods": ["createAssistant", "createAssistantCallable"] + }, + "DeleteAssistant": { + "methods": ["deleteAssistant", "deleteAssistant", "deleteAssistant", "deleteAssistantCallable"] + }, + "GetAssistant": { + "methods": ["getAssistant", "getAssistant", "getAssistant", "getAssistantCallable"] + }, + "ListAssistants": { + "methods": ["listAssistants", "listAssistants", "listAssistants", "listAssistantsPagedCallable", "listAssistantsCallable"] + }, + "StreamAssist": { + "methods": ["streamAssistCallable"] + }, + "UpdateAssistant": { + "methods": ["updateAssistant", "updateAssistant", "updateAssistantCallable"] + } + } + } + } + }, + "CmekConfigService": { + "clients": { + "grpc": { + "libraryClient": "CmekConfigServiceClient", + "rpcs": { + "DeleteCmekConfig": { + "methods": ["deleteCmekConfigAsync", "deleteCmekConfigAsync", "deleteCmekConfigAsync", "deleteCmekConfigOperationCallable", "deleteCmekConfigCallable"] + }, + "GetCmekConfig": { + "methods": ["getCmekConfig", "getCmekConfig", "getCmekConfig", "getCmekConfigCallable"] + }, + "ListCmekConfigs": { + "methods": ["listCmekConfigs", "listCmekConfigs", "listCmekConfigs", "listCmekConfigsCallable"] + }, + "UpdateCmekConfig": { + "methods": ["updateCmekConfigAsync", "updateCmekConfigAsync", "updateCmekConfigOperationCallable", "updateCmekConfigCallable"] + } + } + } + } + }, "CompletionService": { "clients": { "grpc": { @@ -27,6 +90,9 @@ }, "PurgeSuggestionDenyListEntries": { "methods": ["purgeSuggestionDenyListEntriesAsync", "purgeSuggestionDenyListEntriesOperationCallable", "purgeSuggestionDenyListEntriesCallable"] + }, + "RemoveSuggestion": { + "methods": ["removeSuggestion", "removeSuggestionCallable"] } } } @@ -94,6 +160,9 @@ "ListSessions": { "methods": ["listSessions", "listSessions", "listSessions", "listSessionsPagedCallable", "listSessionsCallable"] }, + "StreamAnswerQuery": { + "methods": ["streamAnswerQueryCallable"] + }, "UpdateConversation": { "methods": ["updateConversation", "updateConversation", "updateConversationCallable"] }, @@ -175,6 +244,9 @@ "GetEngine": { "methods": ["getEngine", "getEngine", "getEngine", "getEngineCallable"] }, + "GetIamPolicy": { + "methods": ["getIamPolicy", "getIamPolicy", "getIamPolicy", "getIamPolicyCallable"] + }, "ListEngines": { "methods": ["listEngines", "listEngines", "listEngines", "listEnginesPagedCallable", "listEnginesCallable"] }, @@ -184,6 +256,9 @@ "ResumeEngine": { "methods": ["resumeEngine", "resumeEngine", "resumeEngine", "resumeEngineCallable"] }, + "SetIamPolicy": { + "methods": ["setIamPolicy", "setIamPolicy", "setIamPolicy", "setIamPolicyCallable"] + }, "TuneEngine": { "methods": ["tuneEngineAsync", "tuneEngineAsync", "tuneEngineAsync", "tuneEngineOperationCallable", "tuneEngineCallable"] }, @@ -233,6 +308,63 @@ } } }, + "IdentityMappingStoreService": { + "clients": { + "grpc": { + "libraryClient": "IdentityMappingStoreServiceClient", + "rpcs": { + "CreateIdentityMappingStore": { + "methods": ["createIdentityMappingStore", "createIdentityMappingStore", "createIdentityMappingStore", "createIdentityMappingStoreCallable"] + }, + "DeleteIdentityMappingStore": { + "methods": ["deleteIdentityMappingStoreAsync", "deleteIdentityMappingStoreAsync", "deleteIdentityMappingStoreAsync", "deleteIdentityMappingStoreOperationCallable", "deleteIdentityMappingStoreCallable"] + }, + "GetIdentityMappingStore": { + "methods": ["getIdentityMappingStore", "getIdentityMappingStore", "getIdentityMappingStore", "getIdentityMappingStoreCallable"] + }, + "ImportIdentityMappings": { + "methods": ["importIdentityMappingsAsync", "importIdentityMappingsOperationCallable", "importIdentityMappingsCallable"] + }, + "ListIdentityMappingStores": { + "methods": ["listIdentityMappingStores", "listIdentityMappingStores", "listIdentityMappingStores", "listIdentityMappingStoresPagedCallable", "listIdentityMappingStoresCallable"] + }, + "ListIdentityMappings": { + "methods": ["listIdentityMappings", "listIdentityMappingsPagedCallable", "listIdentityMappingsCallable"] + }, + "PurgeIdentityMappings": { + "methods": ["purgeIdentityMappingsAsync", "purgeIdentityMappingsOperationCallable", "purgeIdentityMappingsCallable"] + } + } + } + } + }, + "LicenseConfigService": { + "clients": { + "grpc": { + "libraryClient": "LicenseConfigServiceClient", + "rpcs": { + "CreateLicenseConfig": { + "methods": ["createLicenseConfig", "createLicenseConfig", "createLicenseConfig", "createLicenseConfigCallable"] + }, + "DistributeLicenseConfig": { + "methods": ["distributeLicenseConfig", "distributeLicenseConfig", "distributeLicenseConfig", "distributeLicenseConfigCallable"] + }, + "GetLicenseConfig": { + "methods": ["getLicenseConfig", "getLicenseConfig", "getLicenseConfig", "getLicenseConfigCallable"] + }, + "ListLicenseConfigs": { + "methods": ["listLicenseConfigs", "listLicenseConfigs", "listLicenseConfigs", "listLicenseConfigsPagedCallable", "listLicenseConfigsCallable"] + }, + "RetractLicenseConfig": { + "methods": ["retractLicenseConfig", "retractLicenseConfig", "retractLicenseConfig", "retractLicenseConfig", "retractLicenseConfig", "retractLicenseConfigCallable"] + }, + "UpdateLicenseConfig": { + "methods": ["updateLicenseConfig", "updateLicenseConfig", "updateLicenseConfigCallable"] + } + } + } + } + }, "ProjectService": { "clients": { "grpc": { @@ -379,6 +511,12 @@ "grpc": { "libraryClient": "ServingConfigServiceClient", "rpcs": { + "CreateServingConfig": { + "methods": ["createServingConfig", "createServingConfig", "createServingConfig", "createServingConfig", "createServingConfigCallable"] + }, + "DeleteServingConfig": { + "methods": ["deleteServingConfig", "deleteServingConfig", "deleteServingConfig", "deleteServingConfigCallable"] + }, "GetServingConfig": { "methods": ["getServingConfig", "getServingConfig", "getServingConfig", "getServingConfigCallable"] }, @@ -490,6 +628,39 @@ } } } + }, + "UserLicenseService": { + "clients": { + "grpc": { + "libraryClient": "UserLicenseServiceClient", + "rpcs": { + "BatchUpdateUserLicenses": { + "methods": ["batchUpdateUserLicensesAsync", "batchUpdateUserLicensesOperationCallable", "batchUpdateUserLicensesCallable"] + }, + "ListLicenseConfigsUsageStats": { + "methods": ["listLicenseConfigsUsageStats", "listLicenseConfigsUsageStats", "listLicenseConfigsUsageStats", "listLicenseConfigsUsageStatsCallable"] + }, + "ListUserLicenses": { + "methods": ["listUserLicenses", "listUserLicenses", "listUserLicenses", "listUserLicensesPagedCallable", "listUserLicensesCallable"] + } + } + } + } + }, + "UserStoreService": { + "clients": { + "grpc": { + "libraryClient": "UserStoreServiceClient", + "rpcs": { + "GetUserStore": { + "methods": ["getUserStore", "getUserStore", "getUserStore", "getUserStoreCallable"] + }, + "UpdateUserStore": { + "methods": ["updateUserStore", "updateUserStore", "updateUserStoreCallable"] + } + } + } + } } } } \ No newline at end of file diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/package-info.java b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/package-info.java index 674d15ce0e75..0ed6ffaa9720 100644 --- a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/package-info.java +++ b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/package-info.java @@ -19,6 +19,67 @@ * *

            The interfaces provided are listed below, along with usage samples. * + *

            ======================= AclConfigServiceClient ======================= + * + *

            Service Description: Service for managing Acl Configuration. + * + *

            Sample for AclConfigServiceClient: + * + *

            {@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 (AclConfigServiceClient aclConfigServiceClient = AclConfigServiceClient.create()) {
            + *   UpdateAclConfigRequest request =
            + *       UpdateAclConfigRequest.newBuilder().setAclConfig(AclConfig.newBuilder().build()).build();
            + *   AclConfig response = aclConfigServiceClient.updateAclConfig(request);
            + * }
            + * }
            + * + *

            ======================= AssistantServiceClient ======================= + * + *

            Service Description: Service for managing Assistant configuration and assisting users. + * + *

            Sample for AssistantServiceClient: + * + *

            {@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 (AssistantServiceClient assistantServiceClient = AssistantServiceClient.create()) {
            + *   CreateAssistantRequest request =
            + *       CreateAssistantRequest.newBuilder()
            + *           .setParent(
            + *               EngineName.of("[PROJECT]", "[LOCATION]", "[COLLECTION]", "[ENGINE]").toString())
            + *           .setAssistant(Assistant.newBuilder().build())
            + *           .setAssistantId("assistantId-324518759")
            + *           .build();
            + *   Assistant response = assistantServiceClient.createAssistant(request);
            + * }
            + * }
            + * + *

            ======================= CmekConfigServiceClient ======================= + * + *

            Service Description: Service for managing CMEK related tasks + * + *

            Sample for CmekConfigServiceClient: + * + *

            {@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 (CmekConfigServiceClient cmekConfigServiceClient = CmekConfigServiceClient.create()) {
            + *   CmekConfigName name = CmekConfigName.ofProjectLocationName("[PROJECT]", "[LOCATION]");
            + *   CmekConfig response = cmekConfigServiceClient.getCmekConfig(name);
            + * }
            + * }
            + * *

            ======================= CompletionServiceClient ======================= * *

            Service Description: Service for Auto-Completion. @@ -201,6 +262,51 @@ * } * }

            * + *

            ======================= IdentityMappingStoreServiceClient ======================= + * + *

            Service Description: Service for managing Identity Mapping Stores. + * + *

            Sample for IdentityMappingStoreServiceClient: + * + *

            {@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 (IdentityMappingStoreServiceClient identityMappingStoreServiceClient =
            + *     IdentityMappingStoreServiceClient.create()) {
            + *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
            + *   IdentityMappingStore identityMappingStore = IdentityMappingStore.newBuilder().build();
            + *   String identityMappingStoreId = "identityMappingStoreId677904780";
            + *   IdentityMappingStore response =
            + *       identityMappingStoreServiceClient.createIdentityMappingStore(
            + *           parent, identityMappingStore, identityMappingStoreId);
            + * }
            + * }
            + * + *

            ======================= LicenseConfigServiceClient ======================= + * + *

            Service Description: Service for managing license config related resources. + * + *

            Sample for LicenseConfigServiceClient: + * + *

            {@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 (LicenseConfigServiceClient licenseConfigServiceClient =
            + *     LicenseConfigServiceClient.create()) {
            + *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
            + *   LicenseConfig licenseConfig = LicenseConfig.newBuilder().build();
            + *   String licenseConfigId = "licenseConfigId-372057250";
            + *   LicenseConfig response =
            + *       licenseConfigServiceClient.createLicenseConfig(parent, licenseConfig, licenseConfigId);
            + * }
            + * }
            + * *

            ======================= ProjectServiceClient ======================= * *

            Service Description: Service for operations on the @@ -365,12 +471,14 @@ * "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[BRANCH]") * .toString()) * .setQuery("query107944136") + * .addAllPageCategories(new ArrayList()) * .setImageQuery(SearchRequest.ImageQuery.newBuilder().build()) * .setPageSize(883849137) * .setPageToken("pageToken873572522") * .setOffset(-1019779949) * .setOneBoxPageSize(1988477988) * .addAllDataStoreSpecs(new ArrayList()) + * .setNumResultsPerDataStore(397658288) * .setFilter("filter-1274492040") * .setCanonicalFilter("canonicalFilter-722283124") * .setOrderBy("orderBy-1207110587") @@ -391,12 +499,19 @@ * .setNaturalLanguageQueryUnderstandingSpec( * SearchRequest.NaturalLanguageQueryUnderstandingSpec.newBuilder().build()) * .setSearchAsYouTypeSpec(SearchRequest.SearchAsYouTypeSpec.newBuilder().build()) + * .setDisplaySpec(SearchRequest.DisplaySpec.newBuilder().build()) + * .addAllCrowdingSpecs(new ArrayList()) * .setSession( * SessionName.ofProjectLocationDataStoreSessionName( * "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[SESSION]") * .toString()) * .setSessionSpec(SearchRequest.SessionSpec.newBuilder().build()) + * .setRelevanceFilterSpec(SearchRequest.RelevanceFilterSpec.newBuilder().build()) * .setPersonalizationSpec(SearchRequest.PersonalizationSpec.newBuilder().build()) + * .setRelevanceScoreSpec(SearchRequest.RelevanceScoreSpec.newBuilder().build()) + * .setSearchAddonSpec(SearchRequest.SearchAddonSpec.newBuilder().build()) + * .setCustomRankingParams(SearchRequest.CustomRankingParams.newBuilder().build()) + * .setEntity("entity-1298275357") * .build(); * for (SearchResponse.SearchResult element : searchServiceClient.search(request).iterateAll()) { * // doThingsWith(element); @@ -443,10 +558,12 @@ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * try (ServingConfigServiceClient servingConfigServiceClient = * ServingConfigServiceClient.create()) { + * DataStoreName parent = + * DataStoreName.ofProjectLocationDataStoreName("[PROJECT]", "[LOCATION]", "[DATA_STORE]"); * ServingConfig servingConfig = ServingConfig.newBuilder().build(); - * FieldMask updateMask = FieldMask.newBuilder().build(); + * String servingConfigId = "servingConfigId-831052759"; * ServingConfig response = - * servingConfigServiceClient.updateServingConfig(servingConfig, updateMask); + * servingConfigServiceClient.createServingConfig(parent, servingConfig, servingConfigId); * } * } * @@ -517,6 +634,43 @@ * UserEvent response = userEventServiceClient.writeUserEvent(request); * } * } + * + *

            ======================= UserLicenseServiceClient ======================= + * + *

            Service Description: Service for managing User Licenses. + * + *

            Sample for UserLicenseServiceClient: + * + *

            {@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 (UserLicenseServiceClient userLicenseServiceClient = UserLicenseServiceClient.create()) {
            + *   UserStoreName parent = UserStoreName.of("[PROJECT]", "[LOCATION]", "[USER_STORE]");
            + *   ListLicenseConfigsUsageStatsResponse response =
            + *       userLicenseServiceClient.listLicenseConfigsUsageStats(parent);
            + * }
            + * }
            + * + *

            ======================= UserStoreServiceClient ======================= + * + *

            Service Description: Service for managing User Stores. + * + *

            Sample for UserStoreServiceClient: + * + *

            {@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 (UserStoreServiceClient userStoreServiceClient = UserStoreServiceClient.create()) {
            + *   UserStoreName name = UserStoreName.of("[PROJECT]", "[LOCATION]", "[USER_STORE]");
            + *   UserStore response = userStoreServiceClient.getUserStore(name);
            + * }
            + * }
            */ @Generated("by gapic-generator-java") package com.google.cloud.discoveryengine.v1beta; diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/AclConfigServiceStub.java b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/AclConfigServiceStub.java new file mode 100644 index 000000000000..829160d0caf2 --- /dev/null +++ b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/AclConfigServiceStub.java @@ -0,0 +1,47 @@ +/* + * 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.discoveryengine.v1beta.stub; + +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.discoveryengine.v1beta.AclConfig; +import com.google.cloud.discoveryengine.v1beta.GetAclConfigRequest; +import com.google.cloud.discoveryengine.v1beta.UpdateAclConfigRequest; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Base stub class for the AclConfigService service API. + * + *

            This class is for advanced usage and reflects the underlying API directly. + */ +@BetaApi +@Generated("by gapic-generator-java") +public abstract class AclConfigServiceStub implements BackgroundResource { + + public UnaryCallable updateAclConfigCallable() { + throw new UnsupportedOperationException("Not implemented: updateAclConfigCallable()"); + } + + public UnaryCallable getAclConfigCallable() { + throw new UnsupportedOperationException("Not implemented: getAclConfigCallable()"); + } + + @Override + public abstract void close(); +} diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/AclConfigServiceStubSettings.java b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/AclConfigServiceStubSettings.java new file mode 100644 index 000000000000..7abb93460a48 --- /dev/null +++ b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/AclConfigServiceStubSettings.java @@ -0,0 +1,371 @@ +/* + * 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.discoveryengine.v1beta.stub; + +import com.google.api.core.ApiFunction; +import com.google.api.core.BetaApi; +import com.google.api.core.ObsoleteApi; +import com.google.api.gax.core.GaxProperties; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.GrpcTransportChannel; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.httpjson.GaxHttpJsonProperties; +import com.google.api.gax.httpjson.HttpJsonTransportChannel; +import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; +import com.google.api.gax.retrying.RetrySettings; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.LibraryMetadata; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.StubSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.cloud.discoveryengine.v1beta.AclConfig; +import com.google.cloud.discoveryengine.v1beta.GetAclConfigRequest; +import com.google.cloud.discoveryengine.v1beta.UpdateAclConfigRequest; +import com.google.common.collect.ImmutableList; +import com.google.common.collect.ImmutableMap; +import com.google.common.collect.ImmutableSet; +import com.google.common.collect.Lists; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link AclConfigServiceStub}. + * + *

            The default instance has everything set to sensible defaults: + * + *

              + *
            • The default service address (discoveryengine.googleapis.com) and default port (443) are + * used. + *
            • Credentials are acquired automatically through Application Default Credentials. + *
            • Retries are configured for idempotent methods but not for non-idempotent methods. + *
            + * + *

            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 updateAclConfig: + * + *

            {@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
            + * AclConfigServiceStubSettings.Builder aclConfigServiceSettingsBuilder =
            + *     AclConfigServiceStubSettings.newBuilder();
            + * aclConfigServiceSettingsBuilder
            + *     .updateAclConfigSettings()
            + *     .setRetrySettings(
            + *         aclConfigServiceSettingsBuilder
            + *             .updateAclConfigSettings()
            + *             .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());
            + * AclConfigServiceStubSettings aclConfigServiceSettings = aclConfigServiceSettingsBuilder.build();
            + * }
            + * + * Please refer to the [Client Side Retry + * Guide](https://docs.cloud.google.com/java/docs/client-retries) for additional support in setting + * retries. + */ +@BetaApi +@Generated("by gapic-generator-java") +@SuppressWarnings("CanonicalDuration") +public class AclConfigServiceStubSettings extends StubSettings { + /** The default scopes of the service. */ + private static final ImmutableList DEFAULT_SERVICE_SCOPES = + ImmutableList.builder() + .add("https://www.googleapis.com/auth/cloud-platform") + .add("https://www.googleapis.com/auth/discoveryengine.readwrite") + .add("https://www.googleapis.com/auth/discoveryengine.serving.readwrite") + .build(); + + private final UnaryCallSettings updateAclConfigSettings; + private final UnaryCallSettings getAclConfigSettings; + + /** Returns the object with the settings used for calls to updateAclConfig. */ + public UnaryCallSettings updateAclConfigSettings() { + return updateAclConfigSettings; + } + + /** Returns the object with the settings used for calls to getAclConfig. */ + public UnaryCallSettings getAclConfigSettings() { + return getAclConfigSettings; + } + + public AclConfigServiceStub createStub() throws IOException { + if (getTransportChannelProvider() + .getTransportName() + .equals(GrpcTransportChannel.getGrpcTransportName())) { + return GrpcAclConfigServiceStub.create(this); + } + if (getTransportChannelProvider() + .getTransportName() + .equals(HttpJsonTransportChannel.getHttpJsonTransportName())) { + return HttpJsonAclConfigServiceStub.create(this); + } + throw new UnsupportedOperationException( + String.format( + "Transport not supported: %s", getTransportChannelProvider().getTransportName())); + } + + /** Returns the default service name. */ + @Override + public String getServiceName() { + return "discoveryengine"; + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return InstantiatingExecutorProvider.newBuilder(); + } + + /** Returns the default service endpoint. */ + @ObsoleteApi("Use getEndpoint() instead") + public static String getDefaultEndpoint() { + return "discoveryengine.googleapis.com:443"; + } + + /** Returns the default mTLS service endpoint. */ + public static String getDefaultMtlsEndpoint() { + return "discoveryengine.mtls.googleapis.com:443"; + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return DEFAULT_SERVICE_SCOPES; + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return GoogleCredentialsProvider.newBuilder() + .setScopesToApply(DEFAULT_SERVICE_SCOPES) + .setUseJwtAccessWithScope(true); + } + + /** Returns a builder for the default gRPC ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return InstantiatingGrpcChannelProvider.newBuilder() + .setMaxInboundMessageSize(Integer.MAX_VALUE); + } + + /** Returns a builder for the default REST ChannelProvider for this service. */ + @BetaApi + public static InstantiatingHttpJsonChannelProvider.Builder + defaultHttpJsonTransportProviderBuilder() { + return InstantiatingHttpJsonChannelProvider.newBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return defaultGrpcTransportProviderBuilder().build(); + } + + public static ApiClientHeaderProvider.Builder defaultGrpcApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", GaxProperties.getLibraryVersion(AclConfigServiceStubSettings.class)) + .setTransportToken( + GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion()); + } + + public static ApiClientHeaderProvider.Builder defaultHttpJsonApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", GaxProperties.getLibraryVersion(AclConfigServiceStubSettings.class)) + .setTransportToken( + GaxHttpJsonProperties.getHttpJsonTokenName(), + GaxHttpJsonProperties.getHttpJsonVersion()); + } + + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return AclConfigServiceStubSettings.defaultGrpcApiClientHeaderProviderBuilder(); + } + + /** Returns a new gRPC builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new REST builder for this class. */ + public static Builder newHttpJsonBuilder() { + return Builder.createHttpJsonDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected AclConfigServiceStubSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + + updateAclConfigSettings = settingsBuilder.updateAclConfigSettings().build(); + getAclConfigSettings = settingsBuilder.getAclConfigSettings().build(); + } + + @Override + protected LibraryMetadata getLibraryMetadata() { + return LibraryMetadata.newBuilder() + .setArtifactName("com.google.cloud:google-cloud-discoveryengine") + .setRepository("googleapis/google-cloud-java") + .setVersion(Version.VERSION) + .build(); + } + + /** Builder for AclConfigServiceStubSettings. */ + public static class Builder extends StubSettings.Builder { + private final ImmutableList> unaryMethodSettingsBuilders; + private final UnaryCallSettings.Builder + updateAclConfigSettings; + private final UnaryCallSettings.Builder getAclConfigSettings; + private static final ImmutableMap> + RETRYABLE_CODE_DEFINITIONS; + + static { + ImmutableMap.Builder> definitions = + ImmutableMap.builder(); + definitions.put("no_retry_codes", ImmutableSet.copyOf(Lists.newArrayList())); + RETRYABLE_CODE_DEFINITIONS = definitions.build(); + } + + private static final ImmutableMap RETRY_PARAM_DEFINITIONS; + + static { + ImmutableMap.Builder definitions = ImmutableMap.builder(); + RetrySettings settings = null; + settings = RetrySettings.newBuilder().setRpcTimeoutMultiplier(1.0).build(); + definitions.put("no_retry_params", settings); + RETRY_PARAM_DEFINITIONS = definitions.build(); + } + + protected Builder() { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(clientContext); + + updateAclConfigSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + getAclConfigSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + updateAclConfigSettings, getAclConfigSettings); + initDefaults(this); + } + + protected Builder(AclConfigServiceStubSettings settings) { + super(settings); + + updateAclConfigSettings = settings.updateAclConfigSettings.toBuilder(); + getAclConfigSettings = settings.getAclConfigSettings.toBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + updateAclConfigSettings, getAclConfigSettings); + } + + private static Builder createDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultTransportChannelProvider()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); + builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + + private static Builder createHttpJsonDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultHttpJsonTransportProviderBuilder().build()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultHttpJsonApiClientHeaderProviderBuilder().build()); + builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + + private static Builder initDefaults(Builder builder) { + builder + .updateAclConfigSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .getAclConfigSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + return builder; + } + + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

            Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) { + super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); + return this; + } + + public ImmutableList> unaryMethodSettingsBuilders() { + return unaryMethodSettingsBuilders; + } + + /** Returns the builder for the settings used for calls to updateAclConfig. */ + public UnaryCallSettings.Builder updateAclConfigSettings() { + return updateAclConfigSettings; + } + + /** Returns the builder for the settings used for calls to getAclConfig. */ + public UnaryCallSettings.Builder getAclConfigSettings() { + return getAclConfigSettings; + } + + @Override + public AclConfigServiceStubSettings build() throws IOException { + return new AclConfigServiceStubSettings(this); + } + } +} diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/AssistantServiceStub.java b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/AssistantServiceStub.java new file mode 100644 index 000000000000..359a27ade3ce --- /dev/null +++ b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/AssistantServiceStub.java @@ -0,0 +1,78 @@ +/* + * 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.discoveryengine.v1beta.stub; + +import static com.google.cloud.discoveryengine.v1beta.AssistantServiceClient.ListAssistantsPagedResponse; + +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.discoveryengine.v1beta.Assistant; +import com.google.cloud.discoveryengine.v1beta.CreateAssistantRequest; +import com.google.cloud.discoveryengine.v1beta.DeleteAssistantRequest; +import com.google.cloud.discoveryengine.v1beta.GetAssistantRequest; +import com.google.cloud.discoveryengine.v1beta.ListAssistantsRequest; +import com.google.cloud.discoveryengine.v1beta.ListAssistantsResponse; +import com.google.cloud.discoveryengine.v1beta.StreamAssistRequest; +import com.google.cloud.discoveryengine.v1beta.StreamAssistResponse; +import com.google.cloud.discoveryengine.v1beta.UpdateAssistantRequest; +import com.google.protobuf.Empty; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Base stub class for the AssistantService service API. + * + *

            This class is for advanced usage and reflects the underlying API directly. + */ +@BetaApi +@Generated("by gapic-generator-java") +public abstract class AssistantServiceStub implements BackgroundResource { + + public ServerStreamingCallable streamAssistCallable() { + throw new UnsupportedOperationException("Not implemented: streamAssistCallable()"); + } + + public UnaryCallable createAssistantCallable() { + throw new UnsupportedOperationException("Not implemented: createAssistantCallable()"); + } + + public UnaryCallable deleteAssistantCallable() { + throw new UnsupportedOperationException("Not implemented: deleteAssistantCallable()"); + } + + public UnaryCallable updateAssistantCallable() { + throw new UnsupportedOperationException("Not implemented: updateAssistantCallable()"); + } + + public UnaryCallable getAssistantCallable() { + throw new UnsupportedOperationException("Not implemented: getAssistantCallable()"); + } + + public UnaryCallable + listAssistantsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listAssistantsPagedCallable()"); + } + + public UnaryCallable listAssistantsCallable() { + throw new UnsupportedOperationException("Not implemented: listAssistantsCallable()"); + } + + @Override + public abstract void close(); +} diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/AssistantServiceStubSettings.java b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/AssistantServiceStubSettings.java new file mode 100644 index 000000000000..6861d94d7e98 --- /dev/null +++ b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/AssistantServiceStubSettings.java @@ -0,0 +1,578 @@ +/* + * 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.discoveryengine.v1beta.stub; + +import static com.google.cloud.discoveryengine.v1beta.AssistantServiceClient.ListAssistantsPagedResponse; + +import com.google.api.core.ApiFunction; +import com.google.api.core.ApiFuture; +import com.google.api.core.BetaApi; +import com.google.api.core.ObsoleteApi; +import com.google.api.gax.core.GaxProperties; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.GrpcTransportChannel; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.httpjson.GaxHttpJsonProperties; +import com.google.api.gax.httpjson.HttpJsonTransportChannel; +import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; +import com.google.api.gax.retrying.RetrySettings; +import com.google.api.gax.rpc.ApiCallContext; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.LibraryMetadata; +import com.google.api.gax.rpc.PageContext; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.PagedListDescriptor; +import com.google.api.gax.rpc.PagedListResponseFactory; +import com.google.api.gax.rpc.ServerStreamingCallSettings; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.StubSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.discoveryengine.v1beta.Assistant; +import com.google.cloud.discoveryengine.v1beta.CreateAssistantRequest; +import com.google.cloud.discoveryengine.v1beta.DeleteAssistantRequest; +import com.google.cloud.discoveryengine.v1beta.GetAssistantRequest; +import com.google.cloud.discoveryengine.v1beta.ListAssistantsRequest; +import com.google.cloud.discoveryengine.v1beta.ListAssistantsResponse; +import com.google.cloud.discoveryengine.v1beta.StreamAssistRequest; +import com.google.cloud.discoveryengine.v1beta.StreamAssistResponse; +import com.google.cloud.discoveryengine.v1beta.UpdateAssistantRequest; +import com.google.common.collect.ImmutableList; +import com.google.common.collect.ImmutableMap; +import com.google.common.collect.ImmutableSet; +import com.google.common.collect.Lists; +import com.google.protobuf.Empty; +import java.io.IOException; +import java.time.Duration; +import java.util.List; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link AssistantServiceStub}. + * + *

            The default instance has everything set to sensible defaults: + * + *

              + *
            • The default service address (discoveryengine.googleapis.com) and default port (443) are + * used. + *
            • Credentials are acquired automatically through Application Default Credentials. + *
            • Retries are configured for idempotent methods but not for non-idempotent methods. + *
            + * + *

            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 createAssistant: + * + *

            {@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
            + * AssistantServiceStubSettings.Builder assistantServiceSettingsBuilder =
            + *     AssistantServiceStubSettings.newBuilder();
            + * assistantServiceSettingsBuilder
            + *     .createAssistantSettings()
            + *     .setRetrySettings(
            + *         assistantServiceSettingsBuilder
            + *             .createAssistantSettings()
            + *             .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());
            + * AssistantServiceStubSettings assistantServiceSettings = assistantServiceSettingsBuilder.build();
            + * }
            + * + * Please refer to the [Client Side Retry + * Guide](https://docs.cloud.google.com/java/docs/client-retries) for additional support in setting + * retries. + */ +@BetaApi +@Generated("by gapic-generator-java") +@SuppressWarnings("CanonicalDuration") +public class AssistantServiceStubSettings extends StubSettings { + /** The default scopes of the service. */ + private static final ImmutableList DEFAULT_SERVICE_SCOPES = + ImmutableList.builder() + .add("https://www.googleapis.com/auth/cloud-platform") + .add("https://www.googleapis.com/auth/discoveryengine.assist.readwrite") + .add("https://www.googleapis.com/auth/discoveryengine.readwrite") + .add("https://www.googleapis.com/auth/discoveryengine.serving.readwrite") + .build(); + + private final ServerStreamingCallSettings + streamAssistSettings; + private final UnaryCallSettings createAssistantSettings; + private final UnaryCallSettings deleteAssistantSettings; + private final UnaryCallSettings updateAssistantSettings; + private final UnaryCallSettings getAssistantSettings; + private final PagedCallSettings< + ListAssistantsRequest, ListAssistantsResponse, ListAssistantsPagedResponse> + listAssistantsSettings; + + private static final PagedListDescriptor + LIST_ASSISTANTS_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListAssistantsRequest injectToken(ListAssistantsRequest payload, String token) { + return ListAssistantsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListAssistantsRequest injectPageSize( + ListAssistantsRequest payload, int pageSize) { + return ListAssistantsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListAssistantsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListAssistantsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListAssistantsResponse payload) { + return payload.getAssistantsList(); + } + }; + + private static final PagedListResponseFactory< + ListAssistantsRequest, ListAssistantsResponse, ListAssistantsPagedResponse> + LIST_ASSISTANTS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListAssistantsRequest, ListAssistantsResponse, ListAssistantsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListAssistantsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_ASSISTANTS_PAGE_STR_DESC, request, context); + return ListAssistantsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + /** Returns the object with the settings used for calls to streamAssist. */ + public ServerStreamingCallSettings + streamAssistSettings() { + return streamAssistSettings; + } + + /** Returns the object with the settings used for calls to createAssistant. */ + public UnaryCallSettings createAssistantSettings() { + return createAssistantSettings; + } + + /** Returns the object with the settings used for calls to deleteAssistant. */ + public UnaryCallSettings deleteAssistantSettings() { + return deleteAssistantSettings; + } + + /** Returns the object with the settings used for calls to updateAssistant. */ + public UnaryCallSettings updateAssistantSettings() { + return updateAssistantSettings; + } + + /** Returns the object with the settings used for calls to getAssistant. */ + public UnaryCallSettings getAssistantSettings() { + return getAssistantSettings; + } + + /** Returns the object with the settings used for calls to listAssistants. */ + public PagedCallSettings< + ListAssistantsRequest, ListAssistantsResponse, ListAssistantsPagedResponse> + listAssistantsSettings() { + return listAssistantsSettings; + } + + public AssistantServiceStub createStub() throws IOException { + if (getTransportChannelProvider() + .getTransportName() + .equals(GrpcTransportChannel.getGrpcTransportName())) { + return GrpcAssistantServiceStub.create(this); + } + if (getTransportChannelProvider() + .getTransportName() + .equals(HttpJsonTransportChannel.getHttpJsonTransportName())) { + return HttpJsonAssistantServiceStub.create(this); + } + throw new UnsupportedOperationException( + String.format( + "Transport not supported: %s", getTransportChannelProvider().getTransportName())); + } + + /** Returns the default service name. */ + @Override + public String getServiceName() { + return "discoveryengine"; + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return InstantiatingExecutorProvider.newBuilder(); + } + + /** Returns the default service endpoint. */ + @ObsoleteApi("Use getEndpoint() instead") + public static String getDefaultEndpoint() { + return "discoveryengine.googleapis.com:443"; + } + + /** Returns the default mTLS service endpoint. */ + public static String getDefaultMtlsEndpoint() { + return "discoveryengine.mtls.googleapis.com:443"; + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return DEFAULT_SERVICE_SCOPES; + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return GoogleCredentialsProvider.newBuilder() + .setScopesToApply(DEFAULT_SERVICE_SCOPES) + .setUseJwtAccessWithScope(true); + } + + /** Returns a builder for the default gRPC ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return InstantiatingGrpcChannelProvider.newBuilder() + .setMaxInboundMessageSize(Integer.MAX_VALUE); + } + + /** Returns a builder for the default REST ChannelProvider for this service. */ + @BetaApi + public static InstantiatingHttpJsonChannelProvider.Builder + defaultHttpJsonTransportProviderBuilder() { + return InstantiatingHttpJsonChannelProvider.newBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return defaultGrpcTransportProviderBuilder().build(); + } + + public static ApiClientHeaderProvider.Builder defaultGrpcApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", GaxProperties.getLibraryVersion(AssistantServiceStubSettings.class)) + .setTransportToken( + GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion()); + } + + public static ApiClientHeaderProvider.Builder defaultHttpJsonApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", GaxProperties.getLibraryVersion(AssistantServiceStubSettings.class)) + .setTransportToken( + GaxHttpJsonProperties.getHttpJsonTokenName(), + GaxHttpJsonProperties.getHttpJsonVersion()); + } + + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return AssistantServiceStubSettings.defaultGrpcApiClientHeaderProviderBuilder(); + } + + /** Returns a new gRPC builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new REST builder for this class. */ + public static Builder newHttpJsonBuilder() { + return Builder.createHttpJsonDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected AssistantServiceStubSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + + streamAssistSettings = settingsBuilder.streamAssistSettings().build(); + createAssistantSettings = settingsBuilder.createAssistantSettings().build(); + deleteAssistantSettings = settingsBuilder.deleteAssistantSettings().build(); + updateAssistantSettings = settingsBuilder.updateAssistantSettings().build(); + getAssistantSettings = settingsBuilder.getAssistantSettings().build(); + listAssistantsSettings = settingsBuilder.listAssistantsSettings().build(); + } + + @Override + protected LibraryMetadata getLibraryMetadata() { + return LibraryMetadata.newBuilder() + .setArtifactName("com.google.cloud:google-cloud-discoveryengine") + .setRepository("googleapis/google-cloud-java") + .setVersion(Version.VERSION) + .build(); + } + + /** Builder for AssistantServiceStubSettings. */ + public static class Builder extends StubSettings.Builder { + private final ImmutableList> unaryMethodSettingsBuilders; + private final ServerStreamingCallSettings.Builder + streamAssistSettings; + private final UnaryCallSettings.Builder + createAssistantSettings; + private final UnaryCallSettings.Builder deleteAssistantSettings; + private final UnaryCallSettings.Builder + updateAssistantSettings; + private final UnaryCallSettings.Builder getAssistantSettings; + private final PagedCallSettings.Builder< + ListAssistantsRequest, ListAssistantsResponse, ListAssistantsPagedResponse> + listAssistantsSettings; + private static final ImmutableMap> + RETRYABLE_CODE_DEFINITIONS; + + static { + ImmutableMap.Builder> definitions = + ImmutableMap.builder(); + definitions.put( + "retry_policy_4_codes", + ImmutableSet.copyOf(Lists.newArrayList(StatusCode.Code.UNAVAILABLE))); + definitions.put( + "no_retry_2_codes", ImmutableSet.copyOf(Lists.newArrayList())); + definitions.put( + "retry_policy_1_codes", + ImmutableSet.copyOf(Lists.newArrayList(StatusCode.Code.UNAVAILABLE))); + RETRYABLE_CODE_DEFINITIONS = definitions.build(); + } + + private static final ImmutableMap RETRY_PARAM_DEFINITIONS; + + static { + ImmutableMap.Builder definitions = ImmutableMap.builder(); + RetrySettings settings = null; + settings = + RetrySettings.newBuilder() + .setInitialRetryDelayDuration(Duration.ofMillis(1000L)) + .setRetryDelayMultiplier(1.3) + .setMaxRetryDelayDuration(Duration.ofMillis(30000L)) + .setInitialRpcTimeoutDuration(Duration.ofMillis(300000L)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeoutDuration(Duration.ofMillis(300000L)) + .setTotalTimeoutDuration(Duration.ofMillis(300000L)) + .build(); + definitions.put("retry_policy_4_params", settings); + settings = + RetrySettings.newBuilder() + .setInitialRpcTimeoutDuration(Duration.ofMillis(30000L)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeoutDuration(Duration.ofMillis(30000L)) + .setTotalTimeoutDuration(Duration.ofMillis(30000L)) + .build(); + definitions.put("no_retry_2_params", settings); + settings = + RetrySettings.newBuilder() + .setInitialRetryDelayDuration(Duration.ofMillis(1000L)) + .setRetryDelayMultiplier(1.3) + .setMaxRetryDelayDuration(Duration.ofMillis(10000L)) + .setInitialRpcTimeoutDuration(Duration.ofMillis(30000L)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeoutDuration(Duration.ofMillis(30000L)) + .setTotalTimeoutDuration(Duration.ofMillis(30000L)) + .build(); + definitions.put("retry_policy_1_params", settings); + RETRY_PARAM_DEFINITIONS = definitions.build(); + } + + protected Builder() { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(clientContext); + + streamAssistSettings = ServerStreamingCallSettings.newBuilder(); + createAssistantSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deleteAssistantSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updateAssistantSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + getAssistantSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listAssistantsSettings = PagedCallSettings.newBuilder(LIST_ASSISTANTS_PAGE_STR_FACT); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + createAssistantSettings, + deleteAssistantSettings, + updateAssistantSettings, + getAssistantSettings, + listAssistantsSettings); + initDefaults(this); + } + + protected Builder(AssistantServiceStubSettings settings) { + super(settings); + + streamAssistSettings = settings.streamAssistSettings.toBuilder(); + createAssistantSettings = settings.createAssistantSettings.toBuilder(); + deleteAssistantSettings = settings.deleteAssistantSettings.toBuilder(); + updateAssistantSettings = settings.updateAssistantSettings.toBuilder(); + getAssistantSettings = settings.getAssistantSettings.toBuilder(); + listAssistantsSettings = settings.listAssistantsSettings.toBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + createAssistantSettings, + deleteAssistantSettings, + updateAssistantSettings, + getAssistantSettings, + listAssistantsSettings); + } + + private static Builder createDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultTransportChannelProvider()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); + builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + + private static Builder createHttpJsonDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultHttpJsonTransportProviderBuilder().build()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultHttpJsonApiClientHeaderProviderBuilder().build()); + builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + + private static Builder initDefaults(Builder builder) { + builder + .streamAssistSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_4_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_4_params")); + + builder + .createAssistantSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_2_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_2_params")); + + builder + .deleteAssistantSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_2_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_2_params")); + + builder + .updateAssistantSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_2_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_2_params")); + + builder + .getAssistantSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params")); + + builder + .listAssistantsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params")); + + return builder; + } + + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

            Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) { + super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); + return this; + } + + public ImmutableList> unaryMethodSettingsBuilders() { + return unaryMethodSettingsBuilders; + } + + /** Returns the builder for the settings used for calls to streamAssist. */ + public ServerStreamingCallSettings.Builder + streamAssistSettings() { + return streamAssistSettings; + } + + /** Returns the builder for the settings used for calls to createAssistant. */ + public UnaryCallSettings.Builder createAssistantSettings() { + return createAssistantSettings; + } + + /** Returns the builder for the settings used for calls to deleteAssistant. */ + public UnaryCallSettings.Builder deleteAssistantSettings() { + return deleteAssistantSettings; + } + + /** Returns the builder for the settings used for calls to updateAssistant. */ + public UnaryCallSettings.Builder updateAssistantSettings() { + return updateAssistantSettings; + } + + /** Returns the builder for the settings used for calls to getAssistant. */ + public UnaryCallSettings.Builder getAssistantSettings() { + return getAssistantSettings; + } + + /** Returns the builder for the settings used for calls to listAssistants. */ + public PagedCallSettings.Builder< + ListAssistantsRequest, ListAssistantsResponse, ListAssistantsPagedResponse> + listAssistantsSettings() { + return listAssistantsSettings; + } + + @Override + public AssistantServiceStubSettings build() throws IOException { + return new AssistantServiceStubSettings(this); + } + } +} diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/CmekConfigServiceStub.java b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/CmekConfigServiceStub.java new file mode 100644 index 000000000000..37e2158ff508 --- /dev/null +++ b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/CmekConfigServiceStub.java @@ -0,0 +1,82 @@ +/* + * 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.discoveryengine.v1beta.stub; + +import com.google.api.core.BetaApi; +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.discoveryengine.v1beta.CmekConfig; +import com.google.cloud.discoveryengine.v1beta.DeleteCmekConfigMetadata; +import com.google.cloud.discoveryengine.v1beta.DeleteCmekConfigRequest; +import com.google.cloud.discoveryengine.v1beta.GetCmekConfigRequest; +import com.google.cloud.discoveryengine.v1beta.ListCmekConfigsRequest; +import com.google.cloud.discoveryengine.v1beta.ListCmekConfigsResponse; +import com.google.cloud.discoveryengine.v1beta.UpdateCmekConfigMetadata; +import com.google.cloud.discoveryengine.v1beta.UpdateCmekConfigRequest; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.OperationsStub; +import com.google.protobuf.Empty; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Base stub class for the CmekConfigService service API. + * + *

            This class is for advanced usage and reflects the underlying API directly. + */ +@BetaApi +@Generated("by gapic-generator-java") +public abstract class CmekConfigServiceStub implements BackgroundResource { + + public OperationsStub getOperationsStub() { + return null; + } + + public com.google.api.gax.httpjson.longrunning.stub.OperationsStub getHttpJsonOperationsStub() { + return null; + } + + public OperationCallable + updateCmekConfigOperationCallable() { + throw new UnsupportedOperationException("Not implemented: updateCmekConfigOperationCallable()"); + } + + public UnaryCallable updateCmekConfigCallable() { + throw new UnsupportedOperationException("Not implemented: updateCmekConfigCallable()"); + } + + public UnaryCallable getCmekConfigCallable() { + throw new UnsupportedOperationException("Not implemented: getCmekConfigCallable()"); + } + + public UnaryCallable listCmekConfigsCallable() { + throw new UnsupportedOperationException("Not implemented: listCmekConfigsCallable()"); + } + + public OperationCallable + deleteCmekConfigOperationCallable() { + throw new UnsupportedOperationException("Not implemented: deleteCmekConfigOperationCallable()"); + } + + public UnaryCallable deleteCmekConfigCallable() { + throw new UnsupportedOperationException("Not implemented: deleteCmekConfigCallable()"); + } + + @Override + public abstract void close(); +} diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/CmekConfigServiceStubSettings.java b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/CmekConfigServiceStubSettings.java new file mode 100644 index 000000000000..25b95e17d33e --- /dev/null +++ b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/CmekConfigServiceStubSettings.java @@ -0,0 +1,552 @@ +/* + * 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.discoveryengine.v1beta.stub; + +import com.google.api.core.ApiFunction; +import com.google.api.core.BetaApi; +import com.google.api.core.ObsoleteApi; +import com.google.api.gax.core.GaxProperties; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.GrpcTransportChannel; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.grpc.ProtoOperationTransformers; +import com.google.api.gax.httpjson.GaxHttpJsonProperties; +import com.google.api.gax.httpjson.HttpJsonTransportChannel; +import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; +import com.google.api.gax.longrunning.OperationSnapshot; +import com.google.api.gax.longrunning.OperationTimedPollAlgorithm; +import com.google.api.gax.retrying.RetrySettings; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.LibraryMetadata; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.StubSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.cloud.discoveryengine.v1beta.CmekConfig; +import com.google.cloud.discoveryengine.v1beta.DeleteCmekConfigMetadata; +import com.google.cloud.discoveryengine.v1beta.DeleteCmekConfigRequest; +import com.google.cloud.discoveryengine.v1beta.GetCmekConfigRequest; +import com.google.cloud.discoveryengine.v1beta.ListCmekConfigsRequest; +import com.google.cloud.discoveryengine.v1beta.ListCmekConfigsResponse; +import com.google.cloud.discoveryengine.v1beta.UpdateCmekConfigMetadata; +import com.google.cloud.discoveryengine.v1beta.UpdateCmekConfigRequest; +import com.google.common.collect.ImmutableList; +import com.google.common.collect.ImmutableMap; +import com.google.common.collect.ImmutableSet; +import com.google.common.collect.Lists; +import com.google.longrunning.Operation; +import com.google.protobuf.Empty; +import java.io.IOException; +import java.time.Duration; +import java.util.List; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link CmekConfigServiceStub}. + * + *

            The default instance has everything set to sensible defaults: + * + *

              + *
            • The default service address (discoveryengine.googleapis.com) and default port (443) are + * used. + *
            • Credentials are acquired automatically through Application Default Credentials. + *
            • Retries are configured for idempotent methods but not for non-idempotent methods. + *
            + * + *

            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 getCmekConfig: + * + *

            {@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
            + * CmekConfigServiceStubSettings.Builder cmekConfigServiceSettingsBuilder =
            + *     CmekConfigServiceStubSettings.newBuilder();
            + * cmekConfigServiceSettingsBuilder
            + *     .getCmekConfigSettings()
            + *     .setRetrySettings(
            + *         cmekConfigServiceSettingsBuilder
            + *             .getCmekConfigSettings()
            + *             .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());
            + * CmekConfigServiceStubSettings cmekConfigServiceSettings =
            + *     cmekConfigServiceSettingsBuilder.build();
            + * }
            + * + * Please refer to the [Client Side Retry + * Guide](https://docs.cloud.google.com/java/docs/client-retries) for additional support in setting + * retries. + * + *

            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 updateCmekConfig: + * + *

            {@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
            + * CmekConfigServiceStubSettings.Builder cmekConfigServiceSettingsBuilder =
            + *     CmekConfigServiceStubSettings.newBuilder();
            + * TimedRetryAlgorithm timedRetryAlgorithm =
            + *     OperationalTimedPollAlgorithm.create(
            + *         RetrySettings.newBuilder()
            + *             .setInitialRetryDelayDuration(Duration.ofMillis(500))
            + *             .setRetryDelayMultiplier(1.5)
            + *             .setMaxRetryDelayDuration(Duration.ofMillis(5000))
            + *             .setTotalTimeoutDuration(Duration.ofHours(24))
            + *             .build());
            + * cmekConfigServiceSettingsBuilder
            + *     .createClusterOperationSettings()
            + *     .setPollingAlgorithm(timedRetryAlgorithm)
            + *     .build();
            + * }
            + */ +@BetaApi +@Generated("by gapic-generator-java") +@SuppressWarnings("CanonicalDuration") +public class CmekConfigServiceStubSettings extends StubSettings { + /** The default scopes of the service. */ + private static final ImmutableList DEFAULT_SERVICE_SCOPES = + ImmutableList.builder() + .add("https://www.googleapis.com/auth/cloud-platform") + .add("https://www.googleapis.com/auth/discoveryengine.readwrite") + .add("https://www.googleapis.com/auth/discoveryengine.serving.readwrite") + .build(); + + private final UnaryCallSettings updateCmekConfigSettings; + private final OperationCallSettings + updateCmekConfigOperationSettings; + private final UnaryCallSettings getCmekConfigSettings; + private final UnaryCallSettings + listCmekConfigsSettings; + private final UnaryCallSettings deleteCmekConfigSettings; + private final OperationCallSettings + deleteCmekConfigOperationSettings; + + /** Returns the object with the settings used for calls to updateCmekConfig. */ + public UnaryCallSettings updateCmekConfigSettings() { + return updateCmekConfigSettings; + } + + /** Returns the object with the settings used for calls to updateCmekConfig. */ + public OperationCallSettings + updateCmekConfigOperationSettings() { + return updateCmekConfigOperationSettings; + } + + /** Returns the object with the settings used for calls to getCmekConfig. */ + public UnaryCallSettings getCmekConfigSettings() { + return getCmekConfigSettings; + } + + /** Returns the object with the settings used for calls to listCmekConfigs. */ + public UnaryCallSettings + listCmekConfigsSettings() { + return listCmekConfigsSettings; + } + + /** Returns the object with the settings used for calls to deleteCmekConfig. */ + public UnaryCallSettings deleteCmekConfigSettings() { + return deleteCmekConfigSettings; + } + + /** Returns the object with the settings used for calls to deleteCmekConfig. */ + public OperationCallSettings + deleteCmekConfigOperationSettings() { + return deleteCmekConfigOperationSettings; + } + + public CmekConfigServiceStub createStub() throws IOException { + if (getTransportChannelProvider() + .getTransportName() + .equals(GrpcTransportChannel.getGrpcTransportName())) { + return GrpcCmekConfigServiceStub.create(this); + } + if (getTransportChannelProvider() + .getTransportName() + .equals(HttpJsonTransportChannel.getHttpJsonTransportName())) { + return HttpJsonCmekConfigServiceStub.create(this); + } + throw new UnsupportedOperationException( + String.format( + "Transport not supported: %s", getTransportChannelProvider().getTransportName())); + } + + /** Returns the default service name. */ + @Override + public String getServiceName() { + return "discoveryengine"; + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return InstantiatingExecutorProvider.newBuilder(); + } + + /** Returns the default service endpoint. */ + @ObsoleteApi("Use getEndpoint() instead") + public static String getDefaultEndpoint() { + return "discoveryengine.googleapis.com:443"; + } + + /** Returns the default mTLS service endpoint. */ + public static String getDefaultMtlsEndpoint() { + return "discoveryengine.mtls.googleapis.com:443"; + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return DEFAULT_SERVICE_SCOPES; + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return GoogleCredentialsProvider.newBuilder() + .setScopesToApply(DEFAULT_SERVICE_SCOPES) + .setUseJwtAccessWithScope(true); + } + + /** Returns a builder for the default gRPC ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return InstantiatingGrpcChannelProvider.newBuilder() + .setMaxInboundMessageSize(Integer.MAX_VALUE); + } + + /** Returns a builder for the default REST ChannelProvider for this service. */ + @BetaApi + public static InstantiatingHttpJsonChannelProvider.Builder + defaultHttpJsonTransportProviderBuilder() { + return InstantiatingHttpJsonChannelProvider.newBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return defaultGrpcTransportProviderBuilder().build(); + } + + public static ApiClientHeaderProvider.Builder defaultGrpcApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", GaxProperties.getLibraryVersion(CmekConfigServiceStubSettings.class)) + .setTransportToken( + GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion()); + } + + public static ApiClientHeaderProvider.Builder defaultHttpJsonApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", GaxProperties.getLibraryVersion(CmekConfigServiceStubSettings.class)) + .setTransportToken( + GaxHttpJsonProperties.getHttpJsonTokenName(), + GaxHttpJsonProperties.getHttpJsonVersion()); + } + + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return CmekConfigServiceStubSettings.defaultGrpcApiClientHeaderProviderBuilder(); + } + + /** Returns a new gRPC builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new REST builder for this class. */ + public static Builder newHttpJsonBuilder() { + return Builder.createHttpJsonDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected CmekConfigServiceStubSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + + updateCmekConfigSettings = settingsBuilder.updateCmekConfigSettings().build(); + updateCmekConfigOperationSettings = settingsBuilder.updateCmekConfigOperationSettings().build(); + getCmekConfigSettings = settingsBuilder.getCmekConfigSettings().build(); + listCmekConfigsSettings = settingsBuilder.listCmekConfigsSettings().build(); + deleteCmekConfigSettings = settingsBuilder.deleteCmekConfigSettings().build(); + deleteCmekConfigOperationSettings = settingsBuilder.deleteCmekConfigOperationSettings().build(); + } + + @Override + protected LibraryMetadata getLibraryMetadata() { + return LibraryMetadata.newBuilder() + .setArtifactName("com.google.cloud:google-cloud-discoveryengine") + .setRepository("googleapis/google-cloud-java") + .setVersion(Version.VERSION) + .build(); + } + + /** Builder for CmekConfigServiceStubSettings. */ + public static class Builder extends StubSettings.Builder { + private final ImmutableList> unaryMethodSettingsBuilders; + private final UnaryCallSettings.Builder + updateCmekConfigSettings; + private final OperationCallSettings.Builder< + UpdateCmekConfigRequest, CmekConfig, UpdateCmekConfigMetadata> + updateCmekConfigOperationSettings; + private final UnaryCallSettings.Builder getCmekConfigSettings; + private final UnaryCallSettings.Builder + listCmekConfigsSettings; + private final UnaryCallSettings.Builder + deleteCmekConfigSettings; + private final OperationCallSettings.Builder< + DeleteCmekConfigRequest, Empty, DeleteCmekConfigMetadata> + deleteCmekConfigOperationSettings; + private static final ImmutableMap> + RETRYABLE_CODE_DEFINITIONS; + + static { + ImmutableMap.Builder> definitions = + ImmutableMap.builder(); + definitions.put("no_retry_codes", ImmutableSet.copyOf(Lists.newArrayList())); + RETRYABLE_CODE_DEFINITIONS = definitions.build(); + } + + private static final ImmutableMap RETRY_PARAM_DEFINITIONS; + + static { + ImmutableMap.Builder definitions = ImmutableMap.builder(); + RetrySettings settings = null; + settings = RetrySettings.newBuilder().setRpcTimeoutMultiplier(1.0).build(); + definitions.put("no_retry_params", settings); + RETRY_PARAM_DEFINITIONS = definitions.build(); + } + + protected Builder() { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(clientContext); + + updateCmekConfigSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updateCmekConfigOperationSettings = OperationCallSettings.newBuilder(); + getCmekConfigSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listCmekConfigsSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deleteCmekConfigSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deleteCmekConfigOperationSettings = OperationCallSettings.newBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + updateCmekConfigSettings, + getCmekConfigSettings, + listCmekConfigsSettings, + deleteCmekConfigSettings); + initDefaults(this); + } + + protected Builder(CmekConfigServiceStubSettings settings) { + super(settings); + + updateCmekConfigSettings = settings.updateCmekConfigSettings.toBuilder(); + updateCmekConfigOperationSettings = settings.updateCmekConfigOperationSettings.toBuilder(); + getCmekConfigSettings = settings.getCmekConfigSettings.toBuilder(); + listCmekConfigsSettings = settings.listCmekConfigsSettings.toBuilder(); + deleteCmekConfigSettings = settings.deleteCmekConfigSettings.toBuilder(); + deleteCmekConfigOperationSettings = settings.deleteCmekConfigOperationSettings.toBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + updateCmekConfigSettings, + getCmekConfigSettings, + listCmekConfigsSettings, + deleteCmekConfigSettings); + } + + private static Builder createDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultTransportChannelProvider()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); + builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + + private static Builder createHttpJsonDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultHttpJsonTransportProviderBuilder().build()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultHttpJsonApiClientHeaderProviderBuilder().build()); + builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + + private static Builder initDefaults(Builder builder) { + builder + .updateCmekConfigSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .getCmekConfigSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .listCmekConfigsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .deleteCmekConfigSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .updateCmekConfigOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(CmekConfig.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(UpdateCmekConfigMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelayDuration(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelayDuration(Duration.ofMillis(45000L)) + .setInitialRpcTimeoutDuration(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeoutDuration(Duration.ZERO) + .setTotalTimeoutDuration(Duration.ofMillis(300000L)) + .build())); + + builder + .deleteCmekConfigOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Empty.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(DeleteCmekConfigMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelayDuration(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelayDuration(Duration.ofMillis(45000L)) + .setInitialRpcTimeoutDuration(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeoutDuration(Duration.ZERO) + .setTotalTimeoutDuration(Duration.ofMillis(300000L)) + .build())); + + return builder; + } + + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

            Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) { + super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); + return this; + } + + public ImmutableList> unaryMethodSettingsBuilders() { + return unaryMethodSettingsBuilders; + } + + /** Returns the builder for the settings used for calls to updateCmekConfig. */ + public UnaryCallSettings.Builder + updateCmekConfigSettings() { + return updateCmekConfigSettings; + } + + /** Returns the builder for the settings used for calls to updateCmekConfig. */ + public OperationCallSettings.Builder< + UpdateCmekConfigRequest, CmekConfig, UpdateCmekConfigMetadata> + updateCmekConfigOperationSettings() { + return updateCmekConfigOperationSettings; + } + + /** Returns the builder for the settings used for calls to getCmekConfig. */ + public UnaryCallSettings.Builder getCmekConfigSettings() { + return getCmekConfigSettings; + } + + /** Returns the builder for the settings used for calls to listCmekConfigs. */ + public UnaryCallSettings.Builder + listCmekConfigsSettings() { + return listCmekConfigsSettings; + } + + /** Returns the builder for the settings used for calls to deleteCmekConfig. */ + public UnaryCallSettings.Builder + deleteCmekConfigSettings() { + return deleteCmekConfigSettings; + } + + /** Returns the builder for the settings used for calls to deleteCmekConfig. */ + public OperationCallSettings.Builder + deleteCmekConfigOperationSettings() { + return deleteCmekConfigOperationSettings; + } + + @Override + public CmekConfigServiceStubSettings build() throws IOException { + return new CmekConfigServiceStubSettings(this); + } + } +} diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/CompletionServiceStub.java b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/CompletionServiceStub.java index 444b47bd8842..6afcc7283d5c 100644 --- a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/CompletionServiceStub.java +++ b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/CompletionServiceStub.java @@ -36,6 +36,8 @@ import com.google.cloud.discoveryengine.v1beta.PurgeSuggestionDenyListEntriesMetadata; import com.google.cloud.discoveryengine.v1beta.PurgeSuggestionDenyListEntriesRequest; import com.google.cloud.discoveryengine.v1beta.PurgeSuggestionDenyListEntriesResponse; +import com.google.cloud.discoveryengine.v1beta.RemoveSuggestionRequest; +import com.google.cloud.discoveryengine.v1beta.RemoveSuggestionResponse; import com.google.longrunning.Operation; import com.google.longrunning.stub.OperationsStub; import javax.annotation.Generated; @@ -127,6 +129,11 @@ public UnaryCallable completeQueryC "Not implemented: purgeCompletionSuggestionsCallable()"); } + public UnaryCallable + removeSuggestionCallable() { + throw new UnsupportedOperationException("Not implemented: removeSuggestionCallable()"); + } + @Override public abstract void close(); } diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/CompletionServiceStubSettings.java b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/CompletionServiceStubSettings.java index d3e56a4cd695..771825ff98b2 100644 --- a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/CompletionServiceStubSettings.java +++ b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/CompletionServiceStubSettings.java @@ -56,6 +56,8 @@ import com.google.cloud.discoveryengine.v1beta.PurgeSuggestionDenyListEntriesMetadata; import com.google.cloud.discoveryengine.v1beta.PurgeSuggestionDenyListEntriesRequest; import com.google.cloud.discoveryengine.v1beta.PurgeSuggestionDenyListEntriesResponse; +import com.google.cloud.discoveryengine.v1beta.RemoveSuggestionRequest; +import com.google.cloud.discoveryengine.v1beta.RemoveSuggestionResponse; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; @@ -150,7 +152,13 @@ public class CompletionServiceStubSettings extends StubSettings { /** The default scopes of the service. */ private static final ImmutableList DEFAULT_SERVICE_SCOPES = - ImmutableList.builder().add("https://www.googleapis.com/auth/cloud-platform").build(); + ImmutableList.builder() + .add("https://www.googleapis.com/auth/cloud-platform") + .add("https://www.googleapis.com/auth/cloud_search.query") + .add("https://www.googleapis.com/auth/discoveryengine.assist.readwrite") + .add("https://www.googleapis.com/auth/discoveryengine.readwrite") + .add("https://www.googleapis.com/auth/discoveryengine.serving.readwrite") + .build(); private final UnaryCallSettings completeQuerySettings; @@ -184,6 +192,8 @@ public class CompletionServiceStubSettings extends StubSettings purgeCompletionSuggestionsOperationSettings; + private final UnaryCallSettings + removeSuggestionSettings; /** Returns the object with the settings used for calls to completeQuery. */ public UnaryCallSettings completeQuerySettings() { @@ -256,6 +266,12 @@ public UnaryCallSettings completeQu return purgeCompletionSuggestionsOperationSettings; } + /** Returns the object with the settings used for calls to removeSuggestion. */ + public UnaryCallSettings + removeSuggestionSettings() { + return removeSuggestionSettings; + } + public CompletionServiceStub createStub() throws IOException { if (getTransportChannelProvider() .getTransportName() @@ -385,6 +401,7 @@ protected CompletionServiceStubSettings(Builder settingsBuilder) throws IOExcept settingsBuilder.purgeCompletionSuggestionsSettings().build(); purgeCompletionSuggestionsOperationSettings = settingsBuilder.purgeCompletionSuggestionsOperationSettings().build(); + removeSuggestionSettings = settingsBuilder.removeSuggestionSettings().build(); } @Override @@ -432,6 +449,8 @@ public static class Builder extends StubSettings.Builder purgeCompletionSuggestionsOperationSettings; + private final UnaryCallSettings.Builder + removeSuggestionSettings; private static final ImmutableMap> RETRYABLE_CODE_DEFINITIONS; @@ -480,6 +499,7 @@ protected Builder(ClientContext clientContext) { importCompletionSuggestionsOperationSettings = OperationCallSettings.newBuilder(); purgeCompletionSuggestionsSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); purgeCompletionSuggestionsOperationSettings = OperationCallSettings.newBuilder(); + removeSuggestionSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); unaryMethodSettingsBuilders = ImmutableList.>of( @@ -488,7 +508,8 @@ protected Builder(ClientContext clientContext) { importSuggestionDenyListEntriesSettings, purgeSuggestionDenyListEntriesSettings, importCompletionSuggestionsSettings, - purgeCompletionSuggestionsSettings); + purgeCompletionSuggestionsSettings, + removeSuggestionSettings); initDefaults(this); } @@ -512,6 +533,7 @@ protected Builder(CompletionServiceStubSettings settings) { purgeCompletionSuggestionsSettings = settings.purgeCompletionSuggestionsSettings.toBuilder(); purgeCompletionSuggestionsOperationSettings = settings.purgeCompletionSuggestionsOperationSettings.toBuilder(); + removeSuggestionSettings = settings.removeSuggestionSettings.toBuilder(); unaryMethodSettingsBuilders = ImmutableList.>of( @@ -520,7 +542,8 @@ protected Builder(CompletionServiceStubSettings settings) { importSuggestionDenyListEntriesSettings, purgeSuggestionDenyListEntriesSettings, importCompletionSuggestionsSettings, - purgeCompletionSuggestionsSettings); + purgeCompletionSuggestionsSettings, + removeSuggestionSettings); } private static Builder createDefault() { @@ -578,6 +601,11 @@ private static Builder initDefaults(Builder builder) { .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + builder + .removeSuggestionSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + builder .importSuggestionDenyListEntriesOperationSettings() .setInitialCallSettings( @@ -776,6 +804,12 @@ public Builder applyToAllUnaryMethods( return purgeCompletionSuggestionsOperationSettings; } + /** Returns the builder for the settings used for calls to removeSuggestion. */ + public UnaryCallSettings.Builder + removeSuggestionSettings() { + return removeSuggestionSettings; + } + @Override public CompletionServiceStubSettings build() throws IOException { return new CompletionServiceStubSettings(this); diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/ControlServiceStubSettings.java b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/ControlServiceStubSettings.java index 2c2e42820e0f..f028c2f9f3bc 100644 --- a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/ControlServiceStubSettings.java +++ b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/ControlServiceStubSettings.java @@ -119,7 +119,11 @@ public class ControlServiceStubSettings extends StubSettings { /** The default scopes of the service. */ private static final ImmutableList DEFAULT_SERVICE_SCOPES = - ImmutableList.builder().add("https://www.googleapis.com/auth/cloud-platform").build(); + ImmutableList.builder() + .add("https://www.googleapis.com/auth/cloud-platform") + .add("https://www.googleapis.com/auth/discoveryengine.readwrite") + .add("https://www.googleapis.com/auth/discoveryengine.serving.readwrite") + .build(); private final UnaryCallSettings createControlSettings; private final UnaryCallSettings deleteControlSettings; diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/ConversationalSearchServiceStub.java b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/ConversationalSearchServiceStub.java index 81ae6b0e44ab..c594f2676e24 100644 --- a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/ConversationalSearchServiceStub.java +++ b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/ConversationalSearchServiceStub.java @@ -21,6 +21,7 @@ import com.google.api.core.BetaApi; import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.rpc.ServerStreamingCallable; import com.google.api.gax.rpc.UnaryCallable; import com.google.cloud.discoveryengine.v1beta.Answer; import com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest; @@ -90,6 +91,11 @@ public UnaryCallable answerQueryCallabl throw new UnsupportedOperationException("Not implemented: answerQueryCallable()"); } + public ServerStreamingCallable + streamAnswerQueryCallable() { + throw new UnsupportedOperationException("Not implemented: streamAnswerQueryCallable()"); + } + public UnaryCallable getAnswerCallable() { throw new UnsupportedOperationException("Not implemented: getAnswerCallable()"); } diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/ConversationalSearchServiceStubSettings.java b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/ConversationalSearchServiceStubSettings.java index 65815a637f2e..cd35cc645ceb 100644 --- a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/ConversationalSearchServiceStubSettings.java +++ b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/ConversationalSearchServiceStubSettings.java @@ -41,6 +41,7 @@ import com.google.api.gax.rpc.PagedCallSettings; import com.google.api.gax.rpc.PagedListDescriptor; import com.google.api.gax.rpc.PagedListResponseFactory; +import com.google.api.gax.rpc.ServerStreamingCallSettings; import com.google.api.gax.rpc.StatusCode; import com.google.api.gax.rpc.StubSettings; import com.google.api.gax.rpc.TransportChannelProvider; @@ -135,7 +136,11 @@ public class ConversationalSearchServiceStubSettings extends StubSettings { /** The default scopes of the service. */ private static final ImmutableList DEFAULT_SERVICE_SCOPES = - ImmutableList.builder().add("https://www.googleapis.com/auth/cloud-platform").build(); + ImmutableList.builder() + .add("https://www.googleapis.com/auth/cloud-platform") + .add("https://www.googleapis.com/auth/discoveryengine.readwrite") + .add("https://www.googleapis.com/auth/discoveryengine.serving.readwrite") + .build(); private final UnaryCallSettings converseConversationSettings; @@ -149,6 +154,8 @@ public class ConversationalSearchServiceStubSettings ListConversationsRequest, ListConversationsResponse, ListConversationsPagedResponse> listConversationsSettings; private final UnaryCallSettings answerQuerySettings; + private final ServerStreamingCallSettings + streamAnswerQuerySettings; private final UnaryCallSettings getAnswerSettings; private final UnaryCallSettings createSessionSettings; private final UnaryCallSettings deleteSessionSettings; @@ -306,6 +313,12 @@ public UnaryCallSettings answerQuerySet return answerQuerySettings; } + /** Returns the object with the settings used for calls to streamAnswerQuery. */ + public ServerStreamingCallSettings + streamAnswerQuerySettings() { + return streamAnswerQuerySettings; + } + /** Returns the object with the settings used for calls to getAnswer. */ public UnaryCallSettings getAnswerSettings() { return getAnswerSettings; @@ -455,6 +468,7 @@ protected ConversationalSearchServiceStubSettings(Builder settingsBuilder) throw getConversationSettings = settingsBuilder.getConversationSettings().build(); listConversationsSettings = settingsBuilder.listConversationsSettings().build(); answerQuerySettings = settingsBuilder.answerQuerySettings().build(); + streamAnswerQuerySettings = settingsBuilder.streamAnswerQuerySettings().build(); getAnswerSettings = settingsBuilder.getAnswerSettings().build(); createSessionSettings = settingsBuilder.createSessionSettings().build(); deleteSessionSettings = settingsBuilder.deleteSessionSettings().build(); @@ -492,6 +506,8 @@ public static class Builder listConversationsSettings; private final UnaryCallSettings.Builder answerQuerySettings; + private final ServerStreamingCallSettings.Builder + streamAnswerQuerySettings; private final UnaryCallSettings.Builder getAnswerSettings; private final UnaryCallSettings.Builder createSessionSettings; private final UnaryCallSettings.Builder deleteSessionSettings; @@ -545,6 +561,7 @@ protected Builder(ClientContext clientContext) { getConversationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); listConversationsSettings = PagedCallSettings.newBuilder(LIST_CONVERSATIONS_PAGE_STR_FACT); answerQuerySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + streamAnswerQuerySettings = ServerStreamingCallSettings.newBuilder(); getAnswerSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); createSessionSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); deleteSessionSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); @@ -580,6 +597,7 @@ protected Builder(ConversationalSearchServiceStubSettings settings) { getConversationSettings = settings.getConversationSettings.toBuilder(); listConversationsSettings = settings.listConversationsSettings.toBuilder(); answerQuerySettings = settings.answerQuerySettings.toBuilder(); + streamAnswerQuerySettings = settings.streamAnswerQuerySettings.toBuilder(); getAnswerSettings = settings.getAnswerSettings.toBuilder(); createSessionSettings = settings.createSessionSettings.toBuilder(); deleteSessionSettings = settings.deleteSessionSettings.toBuilder(); @@ -664,6 +682,11 @@ private static Builder initDefaults(Builder builder) { .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes")) .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params")); + builder + .streamAnswerQuerySettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params")); + builder .getAnswerSettings() .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes")) @@ -755,6 +778,12 @@ public Builder applyToAllUnaryMethods( return answerQuerySettings; } + /** Returns the builder for the settings used for calls to streamAnswerQuery. */ + public ServerStreamingCallSettings.Builder + streamAnswerQuerySettings() { + return streamAnswerQuerySettings; + } + /** Returns the builder for the settings used for calls to getAnswer. */ public UnaryCallSettings.Builder getAnswerSettings() { return getAnswerSettings; diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/DataStoreServiceStubSettings.java b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/DataStoreServiceStubSettings.java index a53daae642b7..4d31592d86c0 100644 --- a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/DataStoreServiceStubSettings.java +++ b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/DataStoreServiceStubSettings.java @@ -152,7 +152,11 @@ public class DataStoreServiceStubSettings extends StubSettings { /** The default scopes of the service. */ private static final ImmutableList DEFAULT_SERVICE_SCOPES = - ImmutableList.builder().add("https://www.googleapis.com/auth/cloud-platform").build(); + ImmutableList.builder() + .add("https://www.googleapis.com/auth/cloud-platform") + .add("https://www.googleapis.com/auth/discoveryengine.readwrite") + .add("https://www.googleapis.com/auth/discoveryengine.serving.readwrite") + .build(); private final UnaryCallSettings createDataStoreSettings; private final OperationCallSettings diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/DocumentServiceStubSettings.java b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/DocumentServiceStubSettings.java index f80777f77ad4..643557f23575 100644 --- a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/DocumentServiceStubSettings.java +++ b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/DocumentServiceStubSettings.java @@ -158,7 +158,11 @@ public class DocumentServiceStubSettings extends StubSettings { /** The default scopes of the service. */ private static final ImmutableList DEFAULT_SERVICE_SCOPES = - ImmutableList.builder().add("https://www.googleapis.com/auth/cloud-platform").build(); + ImmutableList.builder() + .add("https://www.googleapis.com/auth/cloud-platform") + .add("https://www.googleapis.com/auth/discoveryengine.readwrite") + .add("https://www.googleapis.com/auth/discoveryengine.serving.readwrite") + .build(); private final UnaryCallSettings getDocumentSettings; private final PagedCallSettings< @@ -451,7 +455,7 @@ public static class Builder extends StubSettings.BuildernewArrayList(StatusCode.Code.UNAVAILABLE))); definitions.put( - "retry_policy_2_codes", + "retry_policy_4_codes", ImmutableSet.copyOf(Lists.newArrayList(StatusCode.Code.UNAVAILABLE))); RETRYABLE_CODE_DEFINITIONS = definitions.build(); } @@ -482,7 +486,7 @@ public static class Builder extends StubSettings.BuildernewUnaryCallSettingsBuilder() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_2_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_2_params")) + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_4_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_4_params")) .build()) .setResponseTransformer( ProtoOperationTransformers.ResponseTransformer.create(ImportDocumentsResponse.class)) diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/EngineServiceStub.java b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/EngineServiceStub.java index 14bc34b18062..f7eb4d6df66b 100644 --- a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/EngineServiceStub.java +++ b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/EngineServiceStub.java @@ -36,6 +36,9 @@ import com.google.cloud.discoveryengine.v1beta.TuneEngineRequest; import com.google.cloud.discoveryengine.v1beta.TuneEngineResponse; import com.google.cloud.discoveryengine.v1beta.UpdateEngineRequest; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; import com.google.longrunning.Operation; import com.google.longrunning.stub.OperationsStub; import com.google.protobuf.Empty; @@ -110,6 +113,14 @@ public UnaryCallable tuneEngineCallable() { throw new UnsupportedOperationException("Not implemented: tuneEngineCallable()"); } + public UnaryCallable getIamPolicyCallable() { + throw new UnsupportedOperationException("Not implemented: getIamPolicyCallable()"); + } + + public UnaryCallable setIamPolicyCallable() { + throw new UnsupportedOperationException("Not implemented: setIamPolicyCallable()"); + } + @Override public abstract void close(); } diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/EngineServiceStubSettings.java b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/EngineServiceStubSettings.java index ebc9527825b2..824151a0a558 100644 --- a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/EngineServiceStubSettings.java +++ b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/EngineServiceStubSettings.java @@ -67,6 +67,9 @@ import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; import com.google.common.collect.Lists; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; import com.google.longrunning.Operation; import com.google.protobuf.Empty; import java.io.IOException; @@ -157,7 +160,11 @@ public class EngineServiceStubSettings extends StubSettings { /** The default scopes of the service. */ private static final ImmutableList DEFAULT_SERVICE_SCOPES = - ImmutableList.builder().add("https://www.googleapis.com/auth/cloud-platform").build(); + ImmutableList.builder() + .add("https://www.googleapis.com/auth/cloud-platform") + .add("https://www.googleapis.com/auth/discoveryengine.readwrite") + .add("https://www.googleapis.com/auth/discoveryengine.serving.readwrite") + .build(); private final UnaryCallSettings createEngineSettings; private final OperationCallSettings @@ -174,6 +181,8 @@ public class EngineServiceStubSettings extends StubSettings tuneEngineSettings; private final OperationCallSettings tuneEngineOperationSettings; + private final UnaryCallSettings getIamPolicySettings; + private final UnaryCallSettings setIamPolicySettings; private static final PagedListDescriptor LIST_ENGINES_PAGE_STR_DESC = @@ -285,6 +294,16 @@ public UnaryCallSettings tuneEngineSettings() { return tuneEngineOperationSettings; } + /** Returns the object with the settings used for calls to getIamPolicy. */ + public UnaryCallSettings getIamPolicySettings() { + return getIamPolicySettings; + } + + /** Returns the object with the settings used for calls to setIamPolicy. */ + public UnaryCallSettings setIamPolicySettings() { + return setIamPolicySettings; + } + public EngineServiceStub createStub() throws IOException { if (getTransportChannelProvider() .getTransportName() @@ -407,6 +426,8 @@ protected EngineServiceStubSettings(Builder settingsBuilder) throws IOException resumeEngineSettings = settingsBuilder.resumeEngineSettings().build(); tuneEngineSettings = settingsBuilder.tuneEngineSettings().build(); tuneEngineOperationSettings = settingsBuilder.tuneEngineOperationSettings().build(); + getIamPolicySettings = settingsBuilder.getIamPolicySettings().build(); + setIamPolicySettings = settingsBuilder.setIamPolicySettings().build(); } @Override @@ -438,6 +459,8 @@ public static class Builder extends StubSettings.Builder tuneEngineOperationSettings; + private final UnaryCallSettings.Builder getIamPolicySettings; + private final UnaryCallSettings.Builder setIamPolicySettings; private static final ImmutableMap> RETRYABLE_CODE_DEFINITIONS; @@ -476,6 +499,8 @@ protected Builder(ClientContext clientContext) { resumeEngineSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); tuneEngineSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); tuneEngineOperationSettings = OperationCallSettings.newBuilder(); + getIamPolicySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + setIamPolicySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); unaryMethodSettingsBuilders = ImmutableList.>of( @@ -486,7 +511,9 @@ protected Builder(ClientContext clientContext) { listEnginesSettings, pauseEngineSettings, resumeEngineSettings, - tuneEngineSettings); + tuneEngineSettings, + getIamPolicySettings, + setIamPolicySettings); initDefaults(this); } @@ -504,6 +531,8 @@ protected Builder(EngineServiceStubSettings settings) { resumeEngineSettings = settings.resumeEngineSettings.toBuilder(); tuneEngineSettings = settings.tuneEngineSettings.toBuilder(); tuneEngineOperationSettings = settings.tuneEngineOperationSettings.toBuilder(); + getIamPolicySettings = settings.getIamPolicySettings.toBuilder(); + setIamPolicySettings = settings.setIamPolicySettings.toBuilder(); unaryMethodSettingsBuilders = ImmutableList.>of( @@ -514,7 +543,9 @@ protected Builder(EngineServiceStubSettings settings) { listEnginesSettings, pauseEngineSettings, resumeEngineSettings, - tuneEngineSettings); + tuneEngineSettings, + getIamPolicySettings, + setIamPolicySettings); } private static Builder createDefault() { @@ -582,6 +613,16 @@ private static Builder initDefaults(Builder builder) { .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + builder + .getIamPolicySettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .setIamPolicySettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + builder .createEngineOperationSettings() .setInitialCallSettings( @@ -731,6 +772,16 @@ public UnaryCallSettings.Builder tuneEngineSetting return tuneEngineOperationSettings; } + /** Returns the builder for the settings used for calls to getIamPolicy. */ + public UnaryCallSettings.Builder getIamPolicySettings() { + return getIamPolicySettings; + } + + /** Returns the builder for the settings used for calls to setIamPolicy. */ + public UnaryCallSettings.Builder setIamPolicySettings() { + return setIamPolicySettings; + } + @Override public EngineServiceStubSettings build() throws IOException { return new EngineServiceStubSettings(this); diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/EvaluationServiceStubSettings.java b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/EvaluationServiceStubSettings.java index 091719e4cfb4..f337564d12f2 100644 --- a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/EvaluationServiceStubSettings.java +++ b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/EvaluationServiceStubSettings.java @@ -152,7 +152,12 @@ public class EvaluationServiceStubSettings extends StubSettings { /** The default scopes of the service. */ private static final ImmutableList DEFAULT_SERVICE_SCOPES = - ImmutableList.builder().add("https://www.googleapis.com/auth/cloud-platform").build(); + ImmutableList.builder() + .add("https://www.googleapis.com/auth/cloud-platform") + .add("https://www.googleapis.com/auth/discoveryengine.assist.readwrite") + .add("https://www.googleapis.com/auth/discoveryengine.readwrite") + .add("https://www.googleapis.com/auth/discoveryengine.serving.readwrite") + .build(); private final UnaryCallSettings getEvaluationSettings; private final PagedCallSettings< @@ -476,7 +481,7 @@ public static class Builder extends StubSettings.BuildernewArrayList(StatusCode.Code.UNAVAILABLE))); definitions.put( - "no_retry_3_codes", ImmutableSet.copyOf(Lists.newArrayList())); + "no_retry_5_codes", ImmutableSet.copyOf(Lists.newArrayList())); RETRYABLE_CODE_DEFINITIONS = definitions.build(); } @@ -503,7 +508,7 @@ public static class Builder extends StubSettings.BuildernewUnaryCallSettingsBuilder() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_3_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_3_params")) + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_5_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_5_params")) .build()) .setResponseTransformer( ProtoOperationTransformers.ResponseTransformer.create(Evaluation.class)) diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/GroundedGenerationServiceStubSettings.java b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/GroundedGenerationServiceStubSettings.java index 8496b61112af..edb1c2966f85 100644 --- a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/GroundedGenerationServiceStubSettings.java +++ b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/GroundedGenerationServiceStubSettings.java @@ -109,7 +109,11 @@ public class GroundedGenerationServiceStubSettings extends StubSettings { /** The default scopes of the service. */ private static final ImmutableList DEFAULT_SERVICE_SCOPES = - ImmutableList.builder().add("https://www.googleapis.com/auth/cloud-platform").build(); + ImmutableList.builder() + .add("https://www.googleapis.com/auth/cloud-platform") + .add("https://www.googleapis.com/auth/discoveryengine.readwrite") + .add("https://www.googleapis.com/auth/discoveryengine.serving.readwrite") + .build(); private final StreamingCallSettings< GenerateGroundedContentRequest, GenerateGroundedContentResponse> diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/GrpcAclConfigServiceCallableFactory.java b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/GrpcAclConfigServiceCallableFactory.java new file mode 100644 index 000000000000..c9a3dbf0f007 --- /dev/null +++ b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/GrpcAclConfigServiceCallableFactory.java @@ -0,0 +1,115 @@ +/* + * 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.discoveryengine.v1beta.stub; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcCallableFactory; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.BidiStreamingCallable; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientStreamingCallable; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.StreamingCallSettings; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.OperationsStub; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC callable factory implementation for the AclConfigService service API. + * + *

            This class is for advanced usage. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class GrpcAclConfigServiceCallableFactory implements GrpcStubCallableFactory { + + @Override + public UnaryCallable createUnaryCallable( + GrpcCallSettings grpcCallSettings, + UnaryCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createUnaryCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public + UnaryCallable createPagedCallable( + GrpcCallSettings grpcCallSettings, + PagedCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createPagedCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public UnaryCallable createBatchingCallable( + GrpcCallSettings grpcCallSettings, + BatchingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBatchingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + OperationCallable createOperationCallable( + GrpcCallSettings grpcCallSettings, + OperationCallSettings callSettings, + ClientContext clientContext, + OperationsStub operationsStub) { + return GrpcCallableFactory.createOperationCallable( + grpcCallSettings, callSettings, clientContext, operationsStub); + } + + @Override + public + BidiStreamingCallable createBidiStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBidiStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + ServerStreamingCallable createServerStreamingCallable( + GrpcCallSettings grpcCallSettings, + ServerStreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createServerStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + ClientStreamingCallable createClientStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createClientStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } +} diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/GrpcAclConfigServiceStub.java b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/GrpcAclConfigServiceStub.java new file mode 100644 index 000000000000..48708a28e548 --- /dev/null +++ b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/GrpcAclConfigServiceStub.java @@ -0,0 +1,198 @@ +/* + * 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.discoveryengine.v1beta.stub; + +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.RequestParamsBuilder; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.discoveryengine.v1beta.AclConfig; +import com.google.cloud.discoveryengine.v1beta.GetAclConfigRequest; +import com.google.cloud.discoveryengine.v1beta.UpdateAclConfigRequest; +import com.google.longrunning.stub.GrpcOperationsStub; +import io.grpc.MethodDescriptor; +import io.grpc.protobuf.ProtoUtils; +import java.io.IOException; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC stub implementation for the AclConfigService service API. + * + *

            This class is for advanced usage and reflects the underlying API directly. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class GrpcAclConfigServiceStub extends AclConfigServiceStub { + private static final MethodDescriptor + updateAclConfigMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.discoveryengine.v1beta.AclConfigService/UpdateAclConfig") + .setRequestMarshaller( + ProtoUtils.marshaller(UpdateAclConfigRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(AclConfig.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + getAclConfigMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.discoveryengine.v1beta.AclConfigService/GetAclConfig") + .setRequestMarshaller(ProtoUtils.marshaller(GetAclConfigRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(AclConfig.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private final UnaryCallable updateAclConfigCallable; + private final UnaryCallable getAclConfigCallable; + + private final BackgroundResource backgroundResources; + private final GrpcOperationsStub operationsStub; + private final GrpcStubCallableFactory callableFactory; + + public static final GrpcAclConfigServiceStub create(AclConfigServiceStubSettings settings) + throws IOException { + return new GrpcAclConfigServiceStub(settings, ClientContext.create(settings)); + } + + public static final GrpcAclConfigServiceStub create(ClientContext clientContext) + throws IOException { + return new GrpcAclConfigServiceStub( + AclConfigServiceStubSettings.newBuilder().build(), clientContext); + } + + public static final GrpcAclConfigServiceStub create( + ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { + return new GrpcAclConfigServiceStub( + AclConfigServiceStubSettings.newBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of GrpcAclConfigServiceStub, 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 GrpcAclConfigServiceStub( + AclConfigServiceStubSettings settings, ClientContext clientContext) throws IOException { + this(settings, clientContext, new GrpcAclConfigServiceCallableFactory()); + } + + /** + * Constructs an instance of GrpcAclConfigServiceStub, 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 GrpcAclConfigServiceStub( + AclConfigServiceStubSettings settings, + ClientContext clientContext, + GrpcStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); + + GrpcCallSettings updateAclConfigTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateAclConfigMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("acl_config.name", String.valueOf(request.getAclConfig().getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings getAclConfigTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getAclConfigMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getName()) + .build(); + + this.updateAclConfigCallable = + callableFactory.createUnaryCallable( + updateAclConfigTransportSettings, settings.updateAclConfigSettings(), clientContext); + this.getAclConfigCallable = + callableFactory.createUnaryCallable( + getAclConfigTransportSettings, settings.getAclConfigSettings(), clientContext); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + public GrpcOperationsStub getOperationsStub() { + return operationsStub; + } + + @Override + public UnaryCallable updateAclConfigCallable() { + return updateAclConfigCallable; + } + + @Override + public UnaryCallable getAclConfigCallable() { + return getAclConfigCallable; + } + + @Override + public final void close() { + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } + } + + @Override + public void shutdown() { + backgroundResources.shutdown(); + } + + @Override + public boolean isShutdown() { + return backgroundResources.isShutdown(); + } + + @Override + public boolean isTerminated() { + return backgroundResources.isTerminated(); + } + + @Override + public void shutdownNow() { + backgroundResources.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return backgroundResources.awaitTermination(duration, unit); + } +} diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/GrpcAssistantServiceCallableFactory.java b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/GrpcAssistantServiceCallableFactory.java new file mode 100644 index 000000000000..21fd9505b249 --- /dev/null +++ b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/GrpcAssistantServiceCallableFactory.java @@ -0,0 +1,115 @@ +/* + * 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.discoveryengine.v1beta.stub; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcCallableFactory; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.BidiStreamingCallable; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientStreamingCallable; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.StreamingCallSettings; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.OperationsStub; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC callable factory implementation for the AssistantService service API. + * + *

            This class is for advanced usage. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class GrpcAssistantServiceCallableFactory implements GrpcStubCallableFactory { + + @Override + public UnaryCallable createUnaryCallable( + GrpcCallSettings grpcCallSettings, + UnaryCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createUnaryCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public + UnaryCallable createPagedCallable( + GrpcCallSettings grpcCallSettings, + PagedCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createPagedCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public UnaryCallable createBatchingCallable( + GrpcCallSettings grpcCallSettings, + BatchingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBatchingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + OperationCallable createOperationCallable( + GrpcCallSettings grpcCallSettings, + OperationCallSettings callSettings, + ClientContext clientContext, + OperationsStub operationsStub) { + return GrpcCallableFactory.createOperationCallable( + grpcCallSettings, callSettings, clientContext, operationsStub); + } + + @Override + public + BidiStreamingCallable createBidiStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBidiStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + ServerStreamingCallable createServerStreamingCallable( + GrpcCallSettings grpcCallSettings, + ServerStreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createServerStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + ClientStreamingCallable createClientStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createClientStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } +} diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/GrpcAssistantServiceStub.java b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/GrpcAssistantServiceStub.java new file mode 100644 index 000000000000..78510f29fc2b --- /dev/null +++ b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/GrpcAssistantServiceStub.java @@ -0,0 +1,350 @@ +/* + * 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.discoveryengine.v1beta.stub; + +import static com.google.cloud.discoveryengine.v1beta.AssistantServiceClient.ListAssistantsPagedResponse; + +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.RequestParamsBuilder; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.discoveryengine.v1beta.Assistant; +import com.google.cloud.discoveryengine.v1beta.CreateAssistantRequest; +import com.google.cloud.discoveryengine.v1beta.DeleteAssistantRequest; +import com.google.cloud.discoveryengine.v1beta.GetAssistantRequest; +import com.google.cloud.discoveryengine.v1beta.ListAssistantsRequest; +import com.google.cloud.discoveryengine.v1beta.ListAssistantsResponse; +import com.google.cloud.discoveryengine.v1beta.StreamAssistRequest; +import com.google.cloud.discoveryengine.v1beta.StreamAssistResponse; +import com.google.cloud.discoveryengine.v1beta.UpdateAssistantRequest; +import com.google.longrunning.stub.GrpcOperationsStub; +import com.google.protobuf.Empty; +import io.grpc.MethodDescriptor; +import io.grpc.protobuf.ProtoUtils; +import java.io.IOException; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC stub implementation for the AssistantService service API. + * + *

            This class is for advanced usage and reflects the underlying API directly. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class GrpcAssistantServiceStub extends AssistantServiceStub { + private static final MethodDescriptor + streamAssistMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.SERVER_STREAMING) + .setFullMethodName( + "google.cloud.discoveryengine.v1beta.AssistantService/StreamAssist") + .setRequestMarshaller(ProtoUtils.marshaller(StreamAssistRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(StreamAssistResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + createAssistantMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.discoveryengine.v1beta.AssistantService/CreateAssistant") + .setRequestMarshaller( + ProtoUtils.marshaller(CreateAssistantRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Assistant.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + deleteAssistantMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.discoveryengine.v1beta.AssistantService/DeleteAssistant") + .setRequestMarshaller( + ProtoUtils.marshaller(DeleteAssistantRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + updateAssistantMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.discoveryengine.v1beta.AssistantService/UpdateAssistant") + .setRequestMarshaller( + ProtoUtils.marshaller(UpdateAssistantRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Assistant.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + getAssistantMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.discoveryengine.v1beta.AssistantService/GetAssistant") + .setRequestMarshaller(ProtoUtils.marshaller(GetAssistantRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Assistant.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + listAssistantsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.discoveryengine.v1beta.AssistantService/ListAssistants") + .setRequestMarshaller( + ProtoUtils.marshaller(ListAssistantsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListAssistantsResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private final ServerStreamingCallable + streamAssistCallable; + private final UnaryCallable createAssistantCallable; + private final UnaryCallable deleteAssistantCallable; + private final UnaryCallable updateAssistantCallable; + private final UnaryCallable getAssistantCallable; + private final UnaryCallable listAssistantsCallable; + private final UnaryCallable + listAssistantsPagedCallable; + + private final BackgroundResource backgroundResources; + private final GrpcOperationsStub operationsStub; + private final GrpcStubCallableFactory callableFactory; + + public static final GrpcAssistantServiceStub create(AssistantServiceStubSettings settings) + throws IOException { + return new GrpcAssistantServiceStub(settings, ClientContext.create(settings)); + } + + public static final GrpcAssistantServiceStub create(ClientContext clientContext) + throws IOException { + return new GrpcAssistantServiceStub( + AssistantServiceStubSettings.newBuilder().build(), clientContext); + } + + public static final GrpcAssistantServiceStub create( + ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { + return new GrpcAssistantServiceStub( + AssistantServiceStubSettings.newBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of GrpcAssistantServiceStub, 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 GrpcAssistantServiceStub( + AssistantServiceStubSettings settings, ClientContext clientContext) throws IOException { + this(settings, clientContext, new GrpcAssistantServiceCallableFactory()); + } + + /** + * Constructs an instance of GrpcAssistantServiceStub, 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 GrpcAssistantServiceStub( + AssistantServiceStubSettings settings, + ClientContext clientContext, + GrpcStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); + + GrpcCallSettings streamAssistTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(streamAssistMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getName()) + .build(); + GrpcCallSettings createAssistantTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createAssistantMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .build(); + GrpcCallSettings deleteAssistantTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteAssistantMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getName()) + .build(); + GrpcCallSettings updateAssistantTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateAssistantMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("assistant.name", String.valueOf(request.getAssistant().getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings getAssistantTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getAssistantMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getName()) + .build(); + GrpcCallSettings + listAssistantsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listAssistantsMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .build(); + + this.streamAssistCallable = + callableFactory.createServerStreamingCallable( + streamAssistTransportSettings, settings.streamAssistSettings(), clientContext); + this.createAssistantCallable = + callableFactory.createUnaryCallable( + createAssistantTransportSettings, settings.createAssistantSettings(), clientContext); + this.deleteAssistantCallable = + callableFactory.createUnaryCallable( + deleteAssistantTransportSettings, settings.deleteAssistantSettings(), clientContext); + this.updateAssistantCallable = + callableFactory.createUnaryCallable( + updateAssistantTransportSettings, settings.updateAssistantSettings(), clientContext); + this.getAssistantCallable = + callableFactory.createUnaryCallable( + getAssistantTransportSettings, settings.getAssistantSettings(), clientContext); + this.listAssistantsCallable = + callableFactory.createUnaryCallable( + listAssistantsTransportSettings, settings.listAssistantsSettings(), clientContext); + this.listAssistantsPagedCallable = + callableFactory.createPagedCallable( + listAssistantsTransportSettings, settings.listAssistantsSettings(), clientContext); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + public GrpcOperationsStub getOperationsStub() { + return operationsStub; + } + + @Override + public ServerStreamingCallable streamAssistCallable() { + return streamAssistCallable; + } + + @Override + public UnaryCallable createAssistantCallable() { + return createAssistantCallable; + } + + @Override + public UnaryCallable deleteAssistantCallable() { + return deleteAssistantCallable; + } + + @Override + public UnaryCallable updateAssistantCallable() { + return updateAssistantCallable; + } + + @Override + public UnaryCallable getAssistantCallable() { + return getAssistantCallable; + } + + @Override + public UnaryCallable listAssistantsCallable() { + return listAssistantsCallable; + } + + @Override + public UnaryCallable + listAssistantsPagedCallable() { + return listAssistantsPagedCallable; + } + + @Override + public final void close() { + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } + } + + @Override + public void shutdown() { + backgroundResources.shutdown(); + } + + @Override + public boolean isShutdown() { + return backgroundResources.isShutdown(); + } + + @Override + public boolean isTerminated() { + return backgroundResources.isTerminated(); + } + + @Override + public void shutdownNow() { + backgroundResources.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return backgroundResources.awaitTermination(duration, unit); + } +} diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/GrpcCmekConfigServiceCallableFactory.java b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/GrpcCmekConfigServiceCallableFactory.java new file mode 100644 index 000000000000..825c5a3aaed3 --- /dev/null +++ b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/GrpcCmekConfigServiceCallableFactory.java @@ -0,0 +1,115 @@ +/* + * 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.discoveryengine.v1beta.stub; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcCallableFactory; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.BidiStreamingCallable; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientStreamingCallable; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.StreamingCallSettings; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.OperationsStub; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC callable factory implementation for the CmekConfigService service API. + * + *

            This class is for advanced usage. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class GrpcCmekConfigServiceCallableFactory implements GrpcStubCallableFactory { + + @Override + public UnaryCallable createUnaryCallable( + GrpcCallSettings grpcCallSettings, + UnaryCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createUnaryCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public + UnaryCallable createPagedCallable( + GrpcCallSettings grpcCallSettings, + PagedCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createPagedCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public UnaryCallable createBatchingCallable( + GrpcCallSettings grpcCallSettings, + BatchingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBatchingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + OperationCallable createOperationCallable( + GrpcCallSettings grpcCallSettings, + OperationCallSettings callSettings, + ClientContext clientContext, + OperationsStub operationsStub) { + return GrpcCallableFactory.createOperationCallable( + grpcCallSettings, callSettings, clientContext, operationsStub); + } + + @Override + public + BidiStreamingCallable createBidiStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBidiStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + ServerStreamingCallable createServerStreamingCallable( + GrpcCallSettings grpcCallSettings, + ServerStreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createServerStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + ClientStreamingCallable createClientStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createClientStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } +} diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/GrpcCmekConfigServiceStub.java b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/GrpcCmekConfigServiceStub.java new file mode 100644 index 000000000000..23fc62473f89 --- /dev/null +++ b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/GrpcCmekConfigServiceStub.java @@ -0,0 +1,302 @@ +/* + * 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.discoveryengine.v1beta.stub; + +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.RequestParamsBuilder; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.discoveryengine.v1beta.CmekConfig; +import com.google.cloud.discoveryengine.v1beta.DeleteCmekConfigMetadata; +import com.google.cloud.discoveryengine.v1beta.DeleteCmekConfigRequest; +import com.google.cloud.discoveryengine.v1beta.GetCmekConfigRequest; +import com.google.cloud.discoveryengine.v1beta.ListCmekConfigsRequest; +import com.google.cloud.discoveryengine.v1beta.ListCmekConfigsResponse; +import com.google.cloud.discoveryengine.v1beta.UpdateCmekConfigMetadata; +import com.google.cloud.discoveryengine.v1beta.UpdateCmekConfigRequest; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.GrpcOperationsStub; +import com.google.protobuf.Empty; +import io.grpc.MethodDescriptor; +import io.grpc.protobuf.ProtoUtils; +import java.io.IOException; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC stub implementation for the CmekConfigService service API. + * + *

            This class is for advanced usage and reflects the underlying API directly. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class GrpcCmekConfigServiceStub extends CmekConfigServiceStub { + private static final MethodDescriptor + updateCmekConfigMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.discoveryengine.v1beta.CmekConfigService/UpdateCmekConfig") + .setRequestMarshaller( + ProtoUtils.marshaller(UpdateCmekConfigRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + getCmekConfigMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.discoveryengine.v1beta.CmekConfigService/GetCmekConfig") + .setRequestMarshaller( + ProtoUtils.marshaller(GetCmekConfigRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(CmekConfig.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + listCmekConfigsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.discoveryengine.v1beta.CmekConfigService/ListCmekConfigs") + .setRequestMarshaller( + ProtoUtils.marshaller(ListCmekConfigsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListCmekConfigsResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + deleteCmekConfigMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.discoveryengine.v1beta.CmekConfigService/DeleteCmekConfig") + .setRequestMarshaller( + ProtoUtils.marshaller(DeleteCmekConfigRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private final UnaryCallable updateCmekConfigCallable; + private final OperationCallable + updateCmekConfigOperationCallable; + private final UnaryCallable getCmekConfigCallable; + private final UnaryCallable + listCmekConfigsCallable; + private final UnaryCallable deleteCmekConfigCallable; + private final OperationCallable + deleteCmekConfigOperationCallable; + + private final BackgroundResource backgroundResources; + private final GrpcOperationsStub operationsStub; + private final GrpcStubCallableFactory callableFactory; + + public static final GrpcCmekConfigServiceStub create(CmekConfigServiceStubSettings settings) + throws IOException { + return new GrpcCmekConfigServiceStub(settings, ClientContext.create(settings)); + } + + public static final GrpcCmekConfigServiceStub create(ClientContext clientContext) + throws IOException { + return new GrpcCmekConfigServiceStub( + CmekConfigServiceStubSettings.newBuilder().build(), clientContext); + } + + public static final GrpcCmekConfigServiceStub create( + ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { + return new GrpcCmekConfigServiceStub( + CmekConfigServiceStubSettings.newBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of GrpcCmekConfigServiceStub, 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 GrpcCmekConfigServiceStub( + CmekConfigServiceStubSettings settings, ClientContext clientContext) throws IOException { + this(settings, clientContext, new GrpcCmekConfigServiceCallableFactory()); + } + + /** + * Constructs an instance of GrpcCmekConfigServiceStub, 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 GrpcCmekConfigServiceStub( + CmekConfigServiceStubSettings settings, + ClientContext clientContext, + GrpcStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); + + GrpcCallSettings updateCmekConfigTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateCmekConfigMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("config.name", String.valueOf(request.getConfig().getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings getCmekConfigTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getCmekConfigMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getName()) + .build(); + GrpcCallSettings + listCmekConfigsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listCmekConfigsMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .build(); + GrpcCallSettings deleteCmekConfigTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteCmekConfigMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getName()) + .build(); + + this.updateCmekConfigCallable = + callableFactory.createUnaryCallable( + updateCmekConfigTransportSettings, settings.updateCmekConfigSettings(), clientContext); + this.updateCmekConfigOperationCallable = + callableFactory.createOperationCallable( + updateCmekConfigTransportSettings, + settings.updateCmekConfigOperationSettings(), + clientContext, + operationsStub); + this.getCmekConfigCallable = + callableFactory.createUnaryCallable( + getCmekConfigTransportSettings, settings.getCmekConfigSettings(), clientContext); + this.listCmekConfigsCallable = + callableFactory.createUnaryCallable( + listCmekConfigsTransportSettings, settings.listCmekConfigsSettings(), clientContext); + this.deleteCmekConfigCallable = + callableFactory.createUnaryCallable( + deleteCmekConfigTransportSettings, settings.deleteCmekConfigSettings(), clientContext); + this.deleteCmekConfigOperationCallable = + callableFactory.createOperationCallable( + deleteCmekConfigTransportSettings, + settings.deleteCmekConfigOperationSettings(), + clientContext, + operationsStub); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + public GrpcOperationsStub getOperationsStub() { + return operationsStub; + } + + @Override + public UnaryCallable updateCmekConfigCallable() { + return updateCmekConfigCallable; + } + + @Override + public OperationCallable + updateCmekConfigOperationCallable() { + return updateCmekConfigOperationCallable; + } + + @Override + public UnaryCallable getCmekConfigCallable() { + return getCmekConfigCallable; + } + + @Override + public UnaryCallable listCmekConfigsCallable() { + return listCmekConfigsCallable; + } + + @Override + public UnaryCallable deleteCmekConfigCallable() { + return deleteCmekConfigCallable; + } + + @Override + public OperationCallable + deleteCmekConfigOperationCallable() { + return deleteCmekConfigOperationCallable; + } + + @Override + public final void close() { + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } + } + + @Override + public void shutdown() { + backgroundResources.shutdown(); + } + + @Override + public boolean isShutdown() { + return backgroundResources.isShutdown(); + } + + @Override + public boolean isTerminated() { + return backgroundResources.isTerminated(); + } + + @Override + public void shutdownNow() { + backgroundResources.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return backgroundResources.awaitTermination(duration, unit); + } +} diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/GrpcCompletionServiceStub.java b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/GrpcCompletionServiceStub.java index 36bc0357700c..1c485fdecea5 100644 --- a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/GrpcCompletionServiceStub.java +++ b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/GrpcCompletionServiceStub.java @@ -41,6 +41,8 @@ import com.google.cloud.discoveryengine.v1beta.PurgeSuggestionDenyListEntriesMetadata; import com.google.cloud.discoveryengine.v1beta.PurgeSuggestionDenyListEntriesRequest; import com.google.cloud.discoveryengine.v1beta.PurgeSuggestionDenyListEntriesResponse; +import com.google.cloud.discoveryengine.v1beta.RemoveSuggestionRequest; +import com.google.cloud.discoveryengine.v1beta.RemoveSuggestionResponse; import com.google.longrunning.Operation; import com.google.longrunning.stub.GrpcOperationsStub; import io.grpc.MethodDescriptor; @@ -133,6 +135,19 @@ public class GrpcCompletionServiceStub extends CompletionServiceStub { .setSampledToLocalTracing(true) .build(); + private static final MethodDescriptor + removeSuggestionMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.discoveryengine.v1beta.CompletionService/RemoveSuggestion") + .setRequestMarshaller( + ProtoUtils.marshaller(RemoveSuggestionRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(RemoveSuggestionResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + private final UnaryCallable completeQueryCallable; private final UnaryCallable advancedCompleteQueryCallable; @@ -164,6 +179,8 @@ public class GrpcCompletionServiceStub extends CompletionServiceStub { PurgeCompletionSuggestionsResponse, PurgeCompletionSuggestionsMetadata> purgeCompletionSuggestionsOperationCallable; + private final UnaryCallable + removeSuggestionCallable; private final BackgroundResource backgroundResources; private final GrpcOperationsStub operationsStub; @@ -282,6 +299,19 @@ protected GrpcCompletionServiceStub( }) .setResourceNameExtractor(request -> request.getParent()) .build(); + GrpcCallSettings + removeSuggestionTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(removeSuggestionMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add( + "completion_config", String.valueOf(request.getCompletionConfig())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getCompletionConfig()) + .build(); this.completeQueryCallable = callableFactory.createUnaryCallable( @@ -335,6 +365,9 @@ protected GrpcCompletionServiceStub( settings.purgeCompletionSuggestionsOperationSettings(), clientContext, operationsStub); + this.removeSuggestionCallable = + callableFactory.createUnaryCallable( + removeSuggestionTransportSettings, settings.removeSuggestionSettings(), clientContext); this.backgroundResources = new BackgroundResourceAggregation(clientContext.getBackgroundResources()); @@ -415,6 +448,12 @@ public UnaryCallable completeQueryC return purgeCompletionSuggestionsOperationCallable; } + @Override + public UnaryCallable + removeSuggestionCallable() { + return removeSuggestionCallable; + } + @Override public final void close() { try { diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/GrpcConversationalSearchServiceStub.java b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/GrpcConversationalSearchServiceStub.java index e373894db43b..6e49e849d255 100644 --- a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/GrpcConversationalSearchServiceStub.java +++ b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/GrpcConversationalSearchServiceStub.java @@ -26,6 +26,7 @@ import com.google.api.gax.grpc.GrpcStubCallableFactory; import com.google.api.gax.rpc.ClientContext; import com.google.api.gax.rpc.RequestParamsBuilder; +import com.google.api.gax.rpc.ServerStreamingCallable; import com.google.api.gax.rpc.UnaryCallable; import com.google.cloud.discoveryengine.v1beta.Answer; import com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest; @@ -150,6 +151,18 @@ public class GrpcConversationalSearchServiceStub extends ConversationalSearchSer .setSampledToLocalTracing(true) .build(); + private static final MethodDescriptor + streamAnswerQueryMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.SERVER_STREAMING) + .setFullMethodName( + "google.cloud.discoveryengine.v1beta.ConversationalSearchService/StreamAnswerQuery") + .setRequestMarshaller(ProtoUtils.marshaller(AnswerQueryRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(AnswerQueryResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + private static final MethodDescriptor getAnswerMethodDescriptor = MethodDescriptor.newBuilder() .setType(MethodDescriptor.MethodType.UNARY) @@ -227,6 +240,8 @@ public class GrpcConversationalSearchServiceStub extends ConversationalSearchSer private final UnaryCallable listConversationsPagedCallable; private final UnaryCallable answerQueryCallable; + private final ServerStreamingCallable + streamAnswerQueryCallable; private final UnaryCallable getAnswerCallable; private final UnaryCallable createSessionCallable; private final UnaryCallable deleteSessionCallable; @@ -362,6 +377,17 @@ protected GrpcConversationalSearchServiceStub( }) .setResourceNameExtractor(request -> request.getServingConfig()) .build(); + GrpcCallSettings streamAnswerQueryTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(streamAnswerQueryMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("serving_config", String.valueOf(request.getServingConfig())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getServingConfig()) + .build(); GrpcCallSettings getAnswerTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(getAnswerMethodDescriptor) @@ -464,6 +490,11 @@ protected GrpcConversationalSearchServiceStub( this.answerQueryCallable = callableFactory.createUnaryCallable( answerQueryTransportSettings, settings.answerQuerySettings(), clientContext); + this.streamAnswerQueryCallable = + callableFactory.createServerStreamingCallable( + streamAnswerQueryTransportSettings, + settings.streamAnswerQuerySettings(), + clientContext); this.getAnswerCallable = callableFactory.createUnaryCallable( getAnswerTransportSettings, settings.getAnswerSettings(), clientContext); @@ -537,6 +568,12 @@ public UnaryCallable answerQueryCallabl return answerQueryCallable; } + @Override + public ServerStreamingCallable + streamAnswerQueryCallable() { + return streamAnswerQueryCallable; + } + @Override public UnaryCallable getAnswerCallable() { return getAnswerCallable; diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/GrpcDataStoreServiceStub.java b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/GrpcDataStoreServiceStub.java index 1975c33cdab3..464ff43fe9e0 100644 --- a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/GrpcDataStoreServiceStub.java +++ b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/GrpcDataStoreServiceStub.java @@ -179,7 +179,7 @@ protected GrpcDataStoreServiceStub( builder.add("parent", String.valueOf(request.getParent())); return builder.build(); }) - .setResourceNameExtractor(request -> request.getParent()) + .setResourceNameExtractor(request -> request.getCmekConfigName()) .build(); GrpcCallSettings getDataStoreTransportSettings = GrpcCallSettings.newBuilder() diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/GrpcEngineServiceStub.java b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/GrpcEngineServiceStub.java index a4438d170408..41ac45940a80 100644 --- a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/GrpcEngineServiceStub.java +++ b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/GrpcEngineServiceStub.java @@ -41,6 +41,9 @@ import com.google.cloud.discoveryengine.v1beta.TuneEngineRequest; import com.google.cloud.discoveryengine.v1beta.TuneEngineResponse; import com.google.cloud.discoveryengine.v1beta.UpdateEngineRequest; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; import com.google.longrunning.Operation; import com.google.longrunning.stub.GrpcOperationsStub; import com.google.protobuf.Empty; @@ -135,6 +138,24 @@ public class GrpcEngineServiceStub extends EngineServiceStub { .setSampledToLocalTracing(true) .build(); + private static final MethodDescriptor getIamPolicyMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.discoveryengine.v1beta.EngineService/GetIamPolicy") + .setRequestMarshaller(ProtoUtils.marshaller(GetIamPolicyRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Policy.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor setIamPolicyMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.discoveryengine.v1beta.EngineService/SetIamPolicy") + .setRequestMarshaller(ProtoUtils.marshaller(SetIamPolicyRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Policy.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + private final UnaryCallable createEngineCallable; private final OperationCallable createEngineOperationCallable; @@ -151,6 +172,8 @@ public class GrpcEngineServiceStub extends EngineServiceStub { private final UnaryCallable tuneEngineCallable; private final OperationCallable tuneEngineOperationCallable; + private final UnaryCallable getIamPolicyCallable; + private final UnaryCallable setIamPolicyCallable; private final BackgroundResource backgroundResources; private final GrpcOperationsStub operationsStub; @@ -281,6 +304,28 @@ protected GrpcEngineServiceStub( }) .setResourceNameExtractor(request -> request.getName()) .build(); + GrpcCallSettings getIamPolicyTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getIamPolicyMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("resource", String.valueOf(request.getResource())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getResource()) + .build(); + GrpcCallSettings setIamPolicyTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(setIamPolicyMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("resource", String.valueOf(request.getResource())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getResource()) + .build(); this.createEngineCallable = callableFactory.createUnaryCallable( @@ -327,6 +372,12 @@ protected GrpcEngineServiceStub( settings.tuneEngineOperationSettings(), clientContext, operationsStub); + this.getIamPolicyCallable = + callableFactory.createUnaryCallable( + getIamPolicyTransportSettings, settings.getIamPolicySettings(), clientContext); + this.setIamPolicyCallable = + callableFactory.createUnaryCallable( + setIamPolicyTransportSettings, settings.setIamPolicySettings(), clientContext); this.backgroundResources = new BackgroundResourceAggregation(clientContext.getBackgroundResources()); @@ -399,6 +450,16 @@ public UnaryCallable tuneEngineCallable() { return tuneEngineOperationCallable; } + @Override + public UnaryCallable getIamPolicyCallable() { + return getIamPolicyCallable; + } + + @Override + public UnaryCallable setIamPolicyCallable() { + return setIamPolicyCallable; + } + @Override public final void close() { try { diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/GrpcIdentityMappingStoreServiceCallableFactory.java b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/GrpcIdentityMappingStoreServiceCallableFactory.java new file mode 100644 index 000000000000..f006693f3c75 --- /dev/null +++ b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/GrpcIdentityMappingStoreServiceCallableFactory.java @@ -0,0 +1,115 @@ +/* + * 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.discoveryengine.v1beta.stub; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcCallableFactory; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.BidiStreamingCallable; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientStreamingCallable; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.StreamingCallSettings; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.OperationsStub; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC callable factory implementation for the IdentityMappingStoreService service API. + * + *

            This class is for advanced usage. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class GrpcIdentityMappingStoreServiceCallableFactory implements GrpcStubCallableFactory { + + @Override + public UnaryCallable createUnaryCallable( + GrpcCallSettings grpcCallSettings, + UnaryCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createUnaryCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public + UnaryCallable createPagedCallable( + GrpcCallSettings grpcCallSettings, + PagedCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createPagedCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public UnaryCallable createBatchingCallable( + GrpcCallSettings grpcCallSettings, + BatchingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBatchingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + OperationCallable createOperationCallable( + GrpcCallSettings grpcCallSettings, + OperationCallSettings callSettings, + ClientContext clientContext, + OperationsStub operationsStub) { + return GrpcCallableFactory.createOperationCallable( + grpcCallSettings, callSettings, clientContext, operationsStub); + } + + @Override + public + BidiStreamingCallable createBidiStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBidiStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + ServerStreamingCallable createServerStreamingCallable( + GrpcCallSettings grpcCallSettings, + ServerStreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createServerStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + ClientStreamingCallable createClientStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createClientStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } +} diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/GrpcIdentityMappingStoreServiceStub.java b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/GrpcIdentityMappingStoreServiceStub.java new file mode 100644 index 000000000000..27c89f69b1e8 --- /dev/null +++ b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/GrpcIdentityMappingStoreServiceStub.java @@ -0,0 +1,504 @@ +/* + * 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.discoveryengine.v1beta.stub; + +import static com.google.cloud.discoveryengine.v1beta.IdentityMappingStoreServiceClient.ListIdentityMappingStoresPagedResponse; +import static com.google.cloud.discoveryengine.v1beta.IdentityMappingStoreServiceClient.ListIdentityMappingsPagedResponse; + +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.RequestParamsBuilder; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.discoveryengine.v1beta.CreateIdentityMappingStoreRequest; +import com.google.cloud.discoveryengine.v1beta.DeleteIdentityMappingStoreMetadata; +import com.google.cloud.discoveryengine.v1beta.DeleteIdentityMappingStoreRequest; +import com.google.cloud.discoveryengine.v1beta.GetIdentityMappingStoreRequest; +import com.google.cloud.discoveryengine.v1beta.IdentityMappingEntryOperationMetadata; +import com.google.cloud.discoveryengine.v1beta.IdentityMappingStore; +import com.google.cloud.discoveryengine.v1beta.ImportIdentityMappingsRequest; +import com.google.cloud.discoveryengine.v1beta.ImportIdentityMappingsResponse; +import com.google.cloud.discoveryengine.v1beta.ListIdentityMappingStoresRequest; +import com.google.cloud.discoveryengine.v1beta.ListIdentityMappingStoresResponse; +import com.google.cloud.discoveryengine.v1beta.ListIdentityMappingsRequest; +import com.google.cloud.discoveryengine.v1beta.ListIdentityMappingsResponse; +import com.google.cloud.discoveryengine.v1beta.PurgeIdentityMappingsRequest; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.GrpcOperationsStub; +import com.google.protobuf.Empty; +import io.grpc.MethodDescriptor; +import io.grpc.protobuf.ProtoUtils; +import java.io.IOException; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC stub implementation for the IdentityMappingStoreService service API. + * + *

            This class is for advanced usage and reflects the underlying API directly. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class GrpcIdentityMappingStoreServiceStub extends IdentityMappingStoreServiceStub { + private static final MethodDescriptor + createIdentityMappingStoreMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.discoveryengine.v1beta.IdentityMappingStoreService/CreateIdentityMappingStore") + .setRequestMarshaller( + ProtoUtils.marshaller(CreateIdentityMappingStoreRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(IdentityMappingStore.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + getIdentityMappingStoreMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.discoveryengine.v1beta.IdentityMappingStoreService/GetIdentityMappingStore") + .setRequestMarshaller( + ProtoUtils.marshaller(GetIdentityMappingStoreRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(IdentityMappingStore.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + deleteIdentityMappingStoreMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.discoveryengine.v1beta.IdentityMappingStoreService/DeleteIdentityMappingStore") + .setRequestMarshaller( + ProtoUtils.marshaller(DeleteIdentityMappingStoreRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + importIdentityMappingsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.discoveryengine.v1beta.IdentityMappingStoreService/ImportIdentityMappings") + .setRequestMarshaller( + ProtoUtils.marshaller(ImportIdentityMappingsRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + purgeIdentityMappingsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.discoveryengine.v1beta.IdentityMappingStoreService/PurgeIdentityMappings") + .setRequestMarshaller( + ProtoUtils.marshaller(PurgeIdentityMappingsRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + listIdentityMappingsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.discoveryengine.v1beta.IdentityMappingStoreService/ListIdentityMappings") + .setRequestMarshaller( + ProtoUtils.marshaller(ListIdentityMappingsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListIdentityMappingsResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor< + ListIdentityMappingStoresRequest, ListIdentityMappingStoresResponse> + listIdentityMappingStoresMethodDescriptor = + MethodDescriptor + .newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.discoveryengine.v1beta.IdentityMappingStoreService/ListIdentityMappingStores") + .setRequestMarshaller( + ProtoUtils.marshaller(ListIdentityMappingStoresRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListIdentityMappingStoresResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private final UnaryCallable + createIdentityMappingStoreCallable; + private final UnaryCallable + getIdentityMappingStoreCallable; + private final UnaryCallable + deleteIdentityMappingStoreCallable; + private final OperationCallable< + DeleteIdentityMappingStoreRequest, Empty, DeleteIdentityMappingStoreMetadata> + deleteIdentityMappingStoreOperationCallable; + private final UnaryCallable + importIdentityMappingsCallable; + private final OperationCallable< + ImportIdentityMappingsRequest, + ImportIdentityMappingsResponse, + IdentityMappingEntryOperationMetadata> + importIdentityMappingsOperationCallable; + private final UnaryCallable + purgeIdentityMappingsCallable; + private final OperationCallable< + PurgeIdentityMappingsRequest, Empty, IdentityMappingEntryOperationMetadata> + purgeIdentityMappingsOperationCallable; + private final UnaryCallable + listIdentityMappingsCallable; + private final UnaryCallable + listIdentityMappingsPagedCallable; + private final UnaryCallable + listIdentityMappingStoresCallable; + private final UnaryCallable< + ListIdentityMappingStoresRequest, ListIdentityMappingStoresPagedResponse> + listIdentityMappingStoresPagedCallable; + + private final BackgroundResource backgroundResources; + private final GrpcOperationsStub operationsStub; + private final GrpcStubCallableFactory callableFactory; + + public static final GrpcIdentityMappingStoreServiceStub create( + IdentityMappingStoreServiceStubSettings settings) throws IOException { + return new GrpcIdentityMappingStoreServiceStub(settings, ClientContext.create(settings)); + } + + public static final GrpcIdentityMappingStoreServiceStub create(ClientContext clientContext) + throws IOException { + return new GrpcIdentityMappingStoreServiceStub( + IdentityMappingStoreServiceStubSettings.newBuilder().build(), clientContext); + } + + public static final GrpcIdentityMappingStoreServiceStub create( + ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { + return new GrpcIdentityMappingStoreServiceStub( + IdentityMappingStoreServiceStubSettings.newBuilder().build(), + clientContext, + callableFactory); + } + + /** + * Constructs an instance of GrpcIdentityMappingStoreServiceStub, 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 GrpcIdentityMappingStoreServiceStub( + IdentityMappingStoreServiceStubSettings settings, ClientContext clientContext) + throws IOException { + this(settings, clientContext, new GrpcIdentityMappingStoreServiceCallableFactory()); + } + + /** + * Constructs an instance of GrpcIdentityMappingStoreServiceStub, 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 GrpcIdentityMappingStoreServiceStub( + IdentityMappingStoreServiceStubSettings settings, + ClientContext clientContext, + GrpcStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); + + GrpcCallSettings + createIdentityMappingStoreTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createIdentityMappingStoreMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getCmekConfigName()) + .build(); + GrpcCallSettings + getIdentityMappingStoreTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getIdentityMappingStoreMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getName()) + .build(); + GrpcCallSettings + deleteIdentityMappingStoreTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteIdentityMappingStoreMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getName()) + .build(); + GrpcCallSettings + importIdentityMappingsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(importIdentityMappingsMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add( + "identity_mapping_store", + String.valueOf(request.getIdentityMappingStore())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getIdentityMappingStore()) + .build(); + GrpcCallSettings + purgeIdentityMappingsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(purgeIdentityMappingsMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add( + "identity_mapping_store", + String.valueOf(request.getIdentityMappingStore())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getIdentityMappingStore()) + .build(); + GrpcCallSettings + listIdentityMappingsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listIdentityMappingsMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add( + "identity_mapping_store", + String.valueOf(request.getIdentityMappingStore())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getIdentityMappingStore()) + .build(); + GrpcCallSettings + listIdentityMappingStoresTransportSettings = + GrpcCallSettings + .newBuilder() + .setMethodDescriptor(listIdentityMappingStoresMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .build(); + + this.createIdentityMappingStoreCallable = + callableFactory.createUnaryCallable( + createIdentityMappingStoreTransportSettings, + settings.createIdentityMappingStoreSettings(), + clientContext); + this.getIdentityMappingStoreCallable = + callableFactory.createUnaryCallable( + getIdentityMappingStoreTransportSettings, + settings.getIdentityMappingStoreSettings(), + clientContext); + this.deleteIdentityMappingStoreCallable = + callableFactory.createUnaryCallable( + deleteIdentityMappingStoreTransportSettings, + settings.deleteIdentityMappingStoreSettings(), + clientContext); + this.deleteIdentityMappingStoreOperationCallable = + callableFactory.createOperationCallable( + deleteIdentityMappingStoreTransportSettings, + settings.deleteIdentityMappingStoreOperationSettings(), + clientContext, + operationsStub); + this.importIdentityMappingsCallable = + callableFactory.createUnaryCallable( + importIdentityMappingsTransportSettings, + settings.importIdentityMappingsSettings(), + clientContext); + this.importIdentityMappingsOperationCallable = + callableFactory.createOperationCallable( + importIdentityMappingsTransportSettings, + settings.importIdentityMappingsOperationSettings(), + clientContext, + operationsStub); + this.purgeIdentityMappingsCallable = + callableFactory.createUnaryCallable( + purgeIdentityMappingsTransportSettings, + settings.purgeIdentityMappingsSettings(), + clientContext); + this.purgeIdentityMappingsOperationCallable = + callableFactory.createOperationCallable( + purgeIdentityMappingsTransportSettings, + settings.purgeIdentityMappingsOperationSettings(), + clientContext, + operationsStub); + this.listIdentityMappingsCallable = + callableFactory.createUnaryCallable( + listIdentityMappingsTransportSettings, + settings.listIdentityMappingsSettings(), + clientContext); + this.listIdentityMappingsPagedCallable = + callableFactory.createPagedCallable( + listIdentityMappingsTransportSettings, + settings.listIdentityMappingsSettings(), + clientContext); + this.listIdentityMappingStoresCallable = + callableFactory.createUnaryCallable( + listIdentityMappingStoresTransportSettings, + settings.listIdentityMappingStoresSettings(), + clientContext); + this.listIdentityMappingStoresPagedCallable = + callableFactory.createPagedCallable( + listIdentityMappingStoresTransportSettings, + settings.listIdentityMappingStoresSettings(), + clientContext); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + public GrpcOperationsStub getOperationsStub() { + return operationsStub; + } + + @Override + public UnaryCallable + createIdentityMappingStoreCallable() { + return createIdentityMappingStoreCallable; + } + + @Override + public UnaryCallable + getIdentityMappingStoreCallable() { + return getIdentityMappingStoreCallable; + } + + @Override + public UnaryCallable + deleteIdentityMappingStoreCallable() { + return deleteIdentityMappingStoreCallable; + } + + @Override + public OperationCallable< + DeleteIdentityMappingStoreRequest, Empty, DeleteIdentityMappingStoreMetadata> + deleteIdentityMappingStoreOperationCallable() { + return deleteIdentityMappingStoreOperationCallable; + } + + @Override + public UnaryCallable importIdentityMappingsCallable() { + return importIdentityMappingsCallable; + } + + @Override + public OperationCallable< + ImportIdentityMappingsRequest, + ImportIdentityMappingsResponse, + IdentityMappingEntryOperationMetadata> + importIdentityMappingsOperationCallable() { + return importIdentityMappingsOperationCallable; + } + + @Override + public UnaryCallable purgeIdentityMappingsCallable() { + return purgeIdentityMappingsCallable; + } + + @Override + public OperationCallable< + PurgeIdentityMappingsRequest, Empty, IdentityMappingEntryOperationMetadata> + purgeIdentityMappingsOperationCallable() { + return purgeIdentityMappingsOperationCallable; + } + + @Override + public UnaryCallable + listIdentityMappingsCallable() { + return listIdentityMappingsCallable; + } + + @Override + public UnaryCallable + listIdentityMappingsPagedCallable() { + return listIdentityMappingsPagedCallable; + } + + @Override + public UnaryCallable + listIdentityMappingStoresCallable() { + return listIdentityMappingStoresCallable; + } + + @Override + public UnaryCallable + listIdentityMappingStoresPagedCallable() { + return listIdentityMappingStoresPagedCallable; + } + + @Override + public final void close() { + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } + } + + @Override + public void shutdown() { + backgroundResources.shutdown(); + } + + @Override + public boolean isShutdown() { + return backgroundResources.isShutdown(); + } + + @Override + public boolean isTerminated() { + return backgroundResources.isTerminated(); + } + + @Override + public void shutdownNow() { + backgroundResources.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return backgroundResources.awaitTermination(duration, unit); + } +} diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/GrpcLicenseConfigServiceCallableFactory.java b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/GrpcLicenseConfigServiceCallableFactory.java new file mode 100644 index 000000000000..45a21f9befc6 --- /dev/null +++ b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/GrpcLicenseConfigServiceCallableFactory.java @@ -0,0 +1,115 @@ +/* + * 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.discoveryengine.v1beta.stub; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcCallableFactory; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.BidiStreamingCallable; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientStreamingCallable; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.StreamingCallSettings; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.OperationsStub; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC callable factory implementation for the LicenseConfigService service API. + * + *

            This class is for advanced usage. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class GrpcLicenseConfigServiceCallableFactory implements GrpcStubCallableFactory { + + @Override + public UnaryCallable createUnaryCallable( + GrpcCallSettings grpcCallSettings, + UnaryCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createUnaryCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public + UnaryCallable createPagedCallable( + GrpcCallSettings grpcCallSettings, + PagedCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createPagedCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public UnaryCallable createBatchingCallable( + GrpcCallSettings grpcCallSettings, + BatchingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBatchingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + OperationCallable createOperationCallable( + GrpcCallSettings grpcCallSettings, + OperationCallSettings callSettings, + ClientContext clientContext, + OperationsStub operationsStub) { + return GrpcCallableFactory.createOperationCallable( + grpcCallSettings, callSettings, clientContext, operationsStub); + } + + @Override + public + BidiStreamingCallable createBidiStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBidiStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + ServerStreamingCallable createServerStreamingCallable( + GrpcCallSettings grpcCallSettings, + ServerStreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createServerStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + ClientStreamingCallable createClientStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createClientStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } +} diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/GrpcLicenseConfigServiceStub.java b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/GrpcLicenseConfigServiceStub.java new file mode 100644 index 000000000000..e30d85d616bb --- /dev/null +++ b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/GrpcLicenseConfigServiceStub.java @@ -0,0 +1,384 @@ +/* + * 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.discoveryengine.v1beta.stub; + +import static com.google.cloud.discoveryengine.v1beta.LicenseConfigServiceClient.ListLicenseConfigsPagedResponse; + +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.RequestParamsBuilder; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.discoveryengine.v1beta.CreateLicenseConfigRequest; +import com.google.cloud.discoveryengine.v1beta.DistributeLicenseConfigRequest; +import com.google.cloud.discoveryengine.v1beta.DistributeLicenseConfigResponse; +import com.google.cloud.discoveryengine.v1beta.GetLicenseConfigRequest; +import com.google.cloud.discoveryengine.v1beta.LicenseConfig; +import com.google.cloud.discoveryengine.v1beta.ListLicenseConfigsRequest; +import com.google.cloud.discoveryengine.v1beta.ListLicenseConfigsResponse; +import com.google.cloud.discoveryengine.v1beta.RetractLicenseConfigRequest; +import com.google.cloud.discoveryengine.v1beta.RetractLicenseConfigResponse; +import com.google.cloud.discoveryengine.v1beta.UpdateLicenseConfigRequest; +import com.google.longrunning.stub.GrpcOperationsStub; +import io.grpc.MethodDescriptor; +import io.grpc.protobuf.ProtoUtils; +import java.io.IOException; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC stub implementation for the LicenseConfigService service API. + * + *

            This class is for advanced usage and reflects the underlying API directly. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class GrpcLicenseConfigServiceStub extends LicenseConfigServiceStub { + private static final MethodDescriptor + createLicenseConfigMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.discoveryengine.v1beta.LicenseConfigService/CreateLicenseConfig") + .setRequestMarshaller( + ProtoUtils.marshaller(CreateLicenseConfigRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(LicenseConfig.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + updateLicenseConfigMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.discoveryengine.v1beta.LicenseConfigService/UpdateLicenseConfig") + .setRequestMarshaller( + ProtoUtils.marshaller(UpdateLicenseConfigRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(LicenseConfig.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + getLicenseConfigMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.discoveryengine.v1beta.LicenseConfigService/GetLicenseConfig") + .setRequestMarshaller( + ProtoUtils.marshaller(GetLicenseConfigRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(LicenseConfig.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + listLicenseConfigsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.discoveryengine.v1beta.LicenseConfigService/ListLicenseConfigs") + .setRequestMarshaller( + ProtoUtils.marshaller(ListLicenseConfigsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListLicenseConfigsResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor< + DistributeLicenseConfigRequest, DistributeLicenseConfigResponse> + distributeLicenseConfigMethodDescriptor = + MethodDescriptor + .newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.discoveryengine.v1beta.LicenseConfigService/DistributeLicenseConfig") + .setRequestMarshaller( + ProtoUtils.marshaller(DistributeLicenseConfigRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(DistributeLicenseConfigResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + retractLicenseConfigMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.discoveryengine.v1beta.LicenseConfigService/RetractLicenseConfig") + .setRequestMarshaller( + ProtoUtils.marshaller(RetractLicenseConfigRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(RetractLicenseConfigResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private final UnaryCallable + createLicenseConfigCallable; + private final UnaryCallable + updateLicenseConfigCallable; + private final UnaryCallable getLicenseConfigCallable; + private final UnaryCallable + listLicenseConfigsCallable; + private final UnaryCallable + listLicenseConfigsPagedCallable; + private final UnaryCallable + distributeLicenseConfigCallable; + private final UnaryCallable + retractLicenseConfigCallable; + + private final BackgroundResource backgroundResources; + private final GrpcOperationsStub operationsStub; + private final GrpcStubCallableFactory callableFactory; + + public static final GrpcLicenseConfigServiceStub create(LicenseConfigServiceStubSettings settings) + throws IOException { + return new GrpcLicenseConfigServiceStub(settings, ClientContext.create(settings)); + } + + public static final GrpcLicenseConfigServiceStub create(ClientContext clientContext) + throws IOException { + return new GrpcLicenseConfigServiceStub( + LicenseConfigServiceStubSettings.newBuilder().build(), clientContext); + } + + public static final GrpcLicenseConfigServiceStub create( + ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { + return new GrpcLicenseConfigServiceStub( + LicenseConfigServiceStubSettings.newBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of GrpcLicenseConfigServiceStub, 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 GrpcLicenseConfigServiceStub( + LicenseConfigServiceStubSettings settings, ClientContext clientContext) throws IOException { + this(settings, clientContext, new GrpcLicenseConfigServiceCallableFactory()); + } + + /** + * Constructs an instance of GrpcLicenseConfigServiceStub, 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 GrpcLicenseConfigServiceStub( + LicenseConfigServiceStubSettings settings, + ClientContext clientContext, + GrpcStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); + + GrpcCallSettings + createLicenseConfigTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createLicenseConfigMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .build(); + GrpcCallSettings + updateLicenseConfigTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateLicenseConfigMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add( + "license_config.name", + String.valueOf(request.getLicenseConfig().getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings getLicenseConfigTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getLicenseConfigMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getName()) + .build(); + GrpcCallSettings + listLicenseConfigsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listLicenseConfigsMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .build(); + GrpcCallSettings + distributeLicenseConfigTransportSettings = + GrpcCallSettings + .newBuilder() + .setMethodDescriptor(distributeLicenseConfigMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add( + "billing_account_license_config", + String.valueOf(request.getBillingAccountLicenseConfig())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getBillingAccountLicenseConfig()) + .build(); + GrpcCallSettings + retractLicenseConfigTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(retractLicenseConfigMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add( + "billing_account_license_config", + String.valueOf(request.getBillingAccountLicenseConfig())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getBillingAccountLicenseConfig()) + .build(); + + this.createLicenseConfigCallable = + callableFactory.createUnaryCallable( + createLicenseConfigTransportSettings, + settings.createLicenseConfigSettings(), + clientContext); + this.updateLicenseConfigCallable = + callableFactory.createUnaryCallable( + updateLicenseConfigTransportSettings, + settings.updateLicenseConfigSettings(), + clientContext); + this.getLicenseConfigCallable = + callableFactory.createUnaryCallable( + getLicenseConfigTransportSettings, settings.getLicenseConfigSettings(), clientContext); + this.listLicenseConfigsCallable = + callableFactory.createUnaryCallable( + listLicenseConfigsTransportSettings, + settings.listLicenseConfigsSettings(), + clientContext); + this.listLicenseConfigsPagedCallable = + callableFactory.createPagedCallable( + listLicenseConfigsTransportSettings, + settings.listLicenseConfigsSettings(), + clientContext); + this.distributeLicenseConfigCallable = + callableFactory.createUnaryCallable( + distributeLicenseConfigTransportSettings, + settings.distributeLicenseConfigSettings(), + clientContext); + this.retractLicenseConfigCallable = + callableFactory.createUnaryCallable( + retractLicenseConfigTransportSettings, + settings.retractLicenseConfigSettings(), + clientContext); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + public GrpcOperationsStub getOperationsStub() { + return operationsStub; + } + + @Override + public UnaryCallable createLicenseConfigCallable() { + return createLicenseConfigCallable; + } + + @Override + public UnaryCallable updateLicenseConfigCallable() { + return updateLicenseConfigCallable; + } + + @Override + public UnaryCallable getLicenseConfigCallable() { + return getLicenseConfigCallable; + } + + @Override + public UnaryCallable + listLicenseConfigsCallable() { + return listLicenseConfigsCallable; + } + + @Override + public UnaryCallable + listLicenseConfigsPagedCallable() { + return listLicenseConfigsPagedCallable; + } + + @Override + public UnaryCallable + distributeLicenseConfigCallable() { + return distributeLicenseConfigCallable; + } + + @Override + public UnaryCallable + retractLicenseConfigCallable() { + return retractLicenseConfigCallable; + } + + @Override + public final void close() { + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } + } + + @Override + public void shutdown() { + backgroundResources.shutdown(); + } + + @Override + public boolean isShutdown() { + return backgroundResources.isShutdown(); + } + + @Override + public boolean isTerminated() { + return backgroundResources.isTerminated(); + } + + @Override + public void shutdownNow() { + backgroundResources.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return backgroundResources.awaitTermination(duration, unit); + } +} diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/GrpcServingConfigServiceStub.java b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/GrpcServingConfigServiceStub.java index 5fdc799d0c2b..fea1f3dce36b 100644 --- a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/GrpcServingConfigServiceStub.java +++ b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/GrpcServingConfigServiceStub.java @@ -26,12 +26,15 @@ import com.google.api.gax.rpc.ClientContext; import com.google.api.gax.rpc.RequestParamsBuilder; import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.discoveryengine.v1beta.CreateServingConfigRequest; +import com.google.cloud.discoveryengine.v1beta.DeleteServingConfigRequest; import com.google.cloud.discoveryengine.v1beta.GetServingConfigRequest; import com.google.cloud.discoveryengine.v1beta.ListServingConfigsRequest; import com.google.cloud.discoveryengine.v1beta.ListServingConfigsResponse; import com.google.cloud.discoveryengine.v1beta.ServingConfig; import com.google.cloud.discoveryengine.v1beta.UpdateServingConfigRequest; import com.google.longrunning.stub.GrpcOperationsStub; +import com.google.protobuf.Empty; import io.grpc.MethodDescriptor; import io.grpc.protobuf.ProtoUtils; import java.io.IOException; @@ -47,6 +50,30 @@ @BetaApi @Generated("by gapic-generator-java") public class GrpcServingConfigServiceStub extends ServingConfigServiceStub { + private static final MethodDescriptor + createServingConfigMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.discoveryengine.v1beta.ServingConfigService/CreateServingConfig") + .setRequestMarshaller( + ProtoUtils.marshaller(CreateServingConfigRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(ServingConfig.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + deleteServingConfigMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.discoveryengine.v1beta.ServingConfigService/DeleteServingConfig") + .setRequestMarshaller( + ProtoUtils.marshaller(DeleteServingConfigRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + private static final MethodDescriptor updateServingConfigMethodDescriptor = MethodDescriptor.newBuilder() @@ -84,6 +111,9 @@ public class GrpcServingConfigServiceStub extends ServingConfigServiceStub { .setSampledToLocalTracing(true) .build(); + private final UnaryCallable + createServingConfigCallable; + private final UnaryCallable deleteServingConfigCallable; private final UnaryCallable updateServingConfigCallable; private final UnaryCallable getServingConfigCallable; @@ -136,6 +166,29 @@ protected GrpcServingConfigServiceStub( this.callableFactory = callableFactory; this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); + GrpcCallSettings + createServingConfigTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createServingConfigMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .build(); + GrpcCallSettings deleteServingConfigTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteServingConfigMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getName()) + .build(); GrpcCallSettings updateServingConfigTransportSettings = GrpcCallSettings.newBuilder() @@ -173,6 +226,16 @@ protected GrpcServingConfigServiceStub( .setResourceNameExtractor(request -> request.getParent()) .build(); + this.createServingConfigCallable = + callableFactory.createUnaryCallable( + createServingConfigTransportSettings, + settings.createServingConfigSettings(), + clientContext); + this.deleteServingConfigCallable = + callableFactory.createUnaryCallable( + deleteServingConfigTransportSettings, + settings.deleteServingConfigSettings(), + clientContext); this.updateServingConfigCallable = callableFactory.createUnaryCallable( updateServingConfigTransportSettings, @@ -200,6 +263,16 @@ public GrpcOperationsStub getOperationsStub() { return operationsStub; } + @Override + public UnaryCallable createServingConfigCallable() { + return createServingConfigCallable; + } + + @Override + public UnaryCallable deleteServingConfigCallable() { + return deleteServingConfigCallable; + } + @Override public UnaryCallable updateServingConfigCallable() { return updateServingConfigCallable; diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/GrpcUserLicenseServiceCallableFactory.java b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/GrpcUserLicenseServiceCallableFactory.java new file mode 100644 index 000000000000..71917c9a1a9c --- /dev/null +++ b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/GrpcUserLicenseServiceCallableFactory.java @@ -0,0 +1,115 @@ +/* + * 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.discoveryengine.v1beta.stub; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcCallableFactory; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.BidiStreamingCallable; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientStreamingCallable; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.StreamingCallSettings; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.OperationsStub; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC callable factory implementation for the UserLicenseService service API. + * + *

            This class is for advanced usage. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class GrpcUserLicenseServiceCallableFactory implements GrpcStubCallableFactory { + + @Override + public UnaryCallable createUnaryCallable( + GrpcCallSettings grpcCallSettings, + UnaryCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createUnaryCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public + UnaryCallable createPagedCallable( + GrpcCallSettings grpcCallSettings, + PagedCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createPagedCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public UnaryCallable createBatchingCallable( + GrpcCallSettings grpcCallSettings, + BatchingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBatchingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + OperationCallable createOperationCallable( + GrpcCallSettings grpcCallSettings, + OperationCallSettings callSettings, + ClientContext clientContext, + OperationsStub operationsStub) { + return GrpcCallableFactory.createOperationCallable( + grpcCallSettings, callSettings, clientContext, operationsStub); + } + + @Override + public + BidiStreamingCallable createBidiStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBidiStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + ServerStreamingCallable createServerStreamingCallable( + GrpcCallSettings grpcCallSettings, + ServerStreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createServerStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + ClientStreamingCallable createClientStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createClientStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } +} diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/GrpcUserLicenseServiceStub.java b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/GrpcUserLicenseServiceStub.java new file mode 100644 index 000000000000..25e8e0c09fc0 --- /dev/null +++ b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/GrpcUserLicenseServiceStub.java @@ -0,0 +1,292 @@ +/* + * 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.discoveryengine.v1beta.stub; + +import static com.google.cloud.discoveryengine.v1beta.UserLicenseServiceClient.ListUserLicensesPagedResponse; + +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.RequestParamsBuilder; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesMetadata; +import com.google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesRequest; +import com.google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesResponse; +import com.google.cloud.discoveryengine.v1beta.ListLicenseConfigsUsageStatsRequest; +import com.google.cloud.discoveryengine.v1beta.ListLicenseConfigsUsageStatsResponse; +import com.google.cloud.discoveryengine.v1beta.ListUserLicensesRequest; +import com.google.cloud.discoveryengine.v1beta.ListUserLicensesResponse; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.GrpcOperationsStub; +import io.grpc.MethodDescriptor; +import io.grpc.protobuf.ProtoUtils; +import java.io.IOException; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC stub implementation for the UserLicenseService service API. + * + *

            This class is for advanced usage and reflects the underlying API directly. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class GrpcUserLicenseServiceStub extends UserLicenseServiceStub { + private static final MethodDescriptor + listUserLicensesMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.discoveryengine.v1beta.UserLicenseService/ListUserLicenses") + .setRequestMarshaller( + ProtoUtils.marshaller(ListUserLicensesRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListUserLicensesResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor< + ListLicenseConfigsUsageStatsRequest, ListLicenseConfigsUsageStatsResponse> + listLicenseConfigsUsageStatsMethodDescriptor = + MethodDescriptor + . + newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.discoveryengine.v1beta.UserLicenseService/ListLicenseConfigsUsageStats") + .setRequestMarshaller( + ProtoUtils.marshaller(ListLicenseConfigsUsageStatsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListLicenseConfigsUsageStatsResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + batchUpdateUserLicensesMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.discoveryengine.v1beta.UserLicenseService/BatchUpdateUserLicenses") + .setRequestMarshaller( + ProtoUtils.marshaller(BatchUpdateUserLicensesRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private final UnaryCallable + listUserLicensesCallable; + private final UnaryCallable + listUserLicensesPagedCallable; + private final UnaryCallable< + ListLicenseConfigsUsageStatsRequest, ListLicenseConfigsUsageStatsResponse> + listLicenseConfigsUsageStatsCallable; + private final UnaryCallable + batchUpdateUserLicensesCallable; + private final OperationCallable< + BatchUpdateUserLicensesRequest, + BatchUpdateUserLicensesResponse, + BatchUpdateUserLicensesMetadata> + batchUpdateUserLicensesOperationCallable; + + private final BackgroundResource backgroundResources; + private final GrpcOperationsStub operationsStub; + private final GrpcStubCallableFactory callableFactory; + + public static final GrpcUserLicenseServiceStub create(UserLicenseServiceStubSettings settings) + throws IOException { + return new GrpcUserLicenseServiceStub(settings, ClientContext.create(settings)); + } + + public static final GrpcUserLicenseServiceStub create(ClientContext clientContext) + throws IOException { + return new GrpcUserLicenseServiceStub( + UserLicenseServiceStubSettings.newBuilder().build(), clientContext); + } + + public static final GrpcUserLicenseServiceStub create( + ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { + return new GrpcUserLicenseServiceStub( + UserLicenseServiceStubSettings.newBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of GrpcUserLicenseServiceStub, 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 GrpcUserLicenseServiceStub( + UserLicenseServiceStubSettings settings, ClientContext clientContext) throws IOException { + this(settings, clientContext, new GrpcUserLicenseServiceCallableFactory()); + } + + /** + * Constructs an instance of GrpcUserLicenseServiceStub, 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 GrpcUserLicenseServiceStub( + UserLicenseServiceStubSettings settings, + ClientContext clientContext, + GrpcStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); + + GrpcCallSettings + listUserLicensesTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listUserLicensesMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .build(); + GrpcCallSettings + listLicenseConfigsUsageStatsTransportSettings = + GrpcCallSettings + . + newBuilder() + .setMethodDescriptor(listLicenseConfigsUsageStatsMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .build(); + GrpcCallSettings + batchUpdateUserLicensesTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(batchUpdateUserLicensesMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .build(); + + this.listUserLicensesCallable = + callableFactory.createUnaryCallable( + listUserLicensesTransportSettings, settings.listUserLicensesSettings(), clientContext); + this.listUserLicensesPagedCallable = + callableFactory.createPagedCallable( + listUserLicensesTransportSettings, settings.listUserLicensesSettings(), clientContext); + this.listLicenseConfigsUsageStatsCallable = + callableFactory.createUnaryCallable( + listLicenseConfigsUsageStatsTransportSettings, + settings.listLicenseConfigsUsageStatsSettings(), + clientContext); + this.batchUpdateUserLicensesCallable = + callableFactory.createUnaryCallable( + batchUpdateUserLicensesTransportSettings, + settings.batchUpdateUserLicensesSettings(), + clientContext); + this.batchUpdateUserLicensesOperationCallable = + callableFactory.createOperationCallable( + batchUpdateUserLicensesTransportSettings, + settings.batchUpdateUserLicensesOperationSettings(), + clientContext, + operationsStub); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + public GrpcOperationsStub getOperationsStub() { + return operationsStub; + } + + @Override + public UnaryCallable + listUserLicensesCallable() { + return listUserLicensesCallable; + } + + @Override + public UnaryCallable + listUserLicensesPagedCallable() { + return listUserLicensesPagedCallable; + } + + @Override + public UnaryCallable + listLicenseConfigsUsageStatsCallable() { + return listLicenseConfigsUsageStatsCallable; + } + + @Override + public UnaryCallable + batchUpdateUserLicensesCallable() { + return batchUpdateUserLicensesCallable; + } + + @Override + public OperationCallable< + BatchUpdateUserLicensesRequest, + BatchUpdateUserLicensesResponse, + BatchUpdateUserLicensesMetadata> + batchUpdateUserLicensesOperationCallable() { + return batchUpdateUserLicensesOperationCallable; + } + + @Override + public final void close() { + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } + } + + @Override + public void shutdown() { + backgroundResources.shutdown(); + } + + @Override + public boolean isShutdown() { + return backgroundResources.isShutdown(); + } + + @Override + public boolean isTerminated() { + return backgroundResources.isTerminated(); + } + + @Override + public void shutdownNow() { + backgroundResources.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return backgroundResources.awaitTermination(duration, unit); + } +} diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/GrpcUserStoreServiceCallableFactory.java b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/GrpcUserStoreServiceCallableFactory.java new file mode 100644 index 000000000000..2d7d67a126dd --- /dev/null +++ b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/GrpcUserStoreServiceCallableFactory.java @@ -0,0 +1,115 @@ +/* + * 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.discoveryengine.v1beta.stub; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcCallableFactory; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.BidiStreamingCallable; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientStreamingCallable; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.StreamingCallSettings; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.OperationsStub; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC callable factory implementation for the UserStoreService service API. + * + *

            This class is for advanced usage. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class GrpcUserStoreServiceCallableFactory implements GrpcStubCallableFactory { + + @Override + public UnaryCallable createUnaryCallable( + GrpcCallSettings grpcCallSettings, + UnaryCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createUnaryCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public + UnaryCallable createPagedCallable( + GrpcCallSettings grpcCallSettings, + PagedCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createPagedCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public UnaryCallable createBatchingCallable( + GrpcCallSettings grpcCallSettings, + BatchingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBatchingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + OperationCallable createOperationCallable( + GrpcCallSettings grpcCallSettings, + OperationCallSettings callSettings, + ClientContext clientContext, + OperationsStub operationsStub) { + return GrpcCallableFactory.createOperationCallable( + grpcCallSettings, callSettings, clientContext, operationsStub); + } + + @Override + public + BidiStreamingCallable createBidiStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBidiStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + ServerStreamingCallable createServerStreamingCallable( + GrpcCallSettings grpcCallSettings, + ServerStreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createServerStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + ClientStreamingCallable createClientStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createClientStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } +} diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/GrpcUserStoreServiceStub.java b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/GrpcUserStoreServiceStub.java new file mode 100644 index 000000000000..988732d3a9b8 --- /dev/null +++ b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/GrpcUserStoreServiceStub.java @@ -0,0 +1,198 @@ +/* + * 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.discoveryengine.v1beta.stub; + +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.RequestParamsBuilder; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.discoveryengine.v1beta.GetUserStoreRequest; +import com.google.cloud.discoveryengine.v1beta.UpdateUserStoreRequest; +import com.google.cloud.discoveryengine.v1beta.UserStore; +import com.google.longrunning.stub.GrpcOperationsStub; +import io.grpc.MethodDescriptor; +import io.grpc.protobuf.ProtoUtils; +import java.io.IOException; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC stub implementation for the UserStoreService service API. + * + *

            This class is for advanced usage and reflects the underlying API directly. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class GrpcUserStoreServiceStub extends UserStoreServiceStub { + private static final MethodDescriptor + getUserStoreMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.discoveryengine.v1beta.UserStoreService/GetUserStore") + .setRequestMarshaller(ProtoUtils.marshaller(GetUserStoreRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(UserStore.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + updateUserStoreMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.discoveryengine.v1beta.UserStoreService/UpdateUserStore") + .setRequestMarshaller( + ProtoUtils.marshaller(UpdateUserStoreRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(UserStore.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private final UnaryCallable getUserStoreCallable; + private final UnaryCallable updateUserStoreCallable; + + private final BackgroundResource backgroundResources; + private final GrpcOperationsStub operationsStub; + private final GrpcStubCallableFactory callableFactory; + + public static final GrpcUserStoreServiceStub create(UserStoreServiceStubSettings settings) + throws IOException { + return new GrpcUserStoreServiceStub(settings, ClientContext.create(settings)); + } + + public static final GrpcUserStoreServiceStub create(ClientContext clientContext) + throws IOException { + return new GrpcUserStoreServiceStub( + UserStoreServiceStubSettings.newBuilder().build(), clientContext); + } + + public static final GrpcUserStoreServiceStub create( + ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { + return new GrpcUserStoreServiceStub( + UserStoreServiceStubSettings.newBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of GrpcUserStoreServiceStub, 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 GrpcUserStoreServiceStub( + UserStoreServiceStubSettings settings, ClientContext clientContext) throws IOException { + this(settings, clientContext, new GrpcUserStoreServiceCallableFactory()); + } + + /** + * Constructs an instance of GrpcUserStoreServiceStub, 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 GrpcUserStoreServiceStub( + UserStoreServiceStubSettings settings, + ClientContext clientContext, + GrpcStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); + + GrpcCallSettings getUserStoreTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getUserStoreMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getName()) + .build(); + GrpcCallSettings updateUserStoreTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateUserStoreMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("user_store.name", String.valueOf(request.getUserStore().getName())); + return builder.build(); + }) + .build(); + + this.getUserStoreCallable = + callableFactory.createUnaryCallable( + getUserStoreTransportSettings, settings.getUserStoreSettings(), clientContext); + this.updateUserStoreCallable = + callableFactory.createUnaryCallable( + updateUserStoreTransportSettings, settings.updateUserStoreSettings(), clientContext); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + public GrpcOperationsStub getOperationsStub() { + return operationsStub; + } + + @Override + public UnaryCallable getUserStoreCallable() { + return getUserStoreCallable; + } + + @Override + public UnaryCallable updateUserStoreCallable() { + return updateUserStoreCallable; + } + + @Override + public final void close() { + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } + } + + @Override + public void shutdown() { + backgroundResources.shutdown(); + } + + @Override + public boolean isShutdown() { + return backgroundResources.isShutdown(); + } + + @Override + public boolean isTerminated() { + return backgroundResources.isTerminated(); + } + + @Override + public void shutdownNow() { + backgroundResources.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return backgroundResources.awaitTermination(duration, unit); + } +} diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/HttpJsonAclConfigServiceCallableFactory.java b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/HttpJsonAclConfigServiceCallableFactory.java new file mode 100644 index 000000000000..1a05e6997796 --- /dev/null +++ b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/HttpJsonAclConfigServiceCallableFactory.java @@ -0,0 +1,103 @@ +/* + * 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.discoveryengine.v1beta.stub; + +import com.google.api.core.BetaApi; +import com.google.api.gax.httpjson.HttpJsonCallSettings; +import com.google.api.gax.httpjson.HttpJsonCallableFactory; +import com.google.api.gax.httpjson.HttpJsonOperationSnapshotCallable; +import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; +import com.google.api.gax.httpjson.longrunning.stub.OperationsStub; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.Operation; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * REST callable factory implementation for the AclConfigService service API. + * + *

            This class is for advanced usage. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class HttpJsonAclConfigServiceCallableFactory + implements HttpJsonStubCallableFactory { + + @Override + public UnaryCallable createUnaryCallable( + HttpJsonCallSettings httpJsonCallSettings, + UnaryCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createUnaryCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @Override + public + UnaryCallable createPagedCallable( + HttpJsonCallSettings httpJsonCallSettings, + PagedCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createPagedCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @Override + public UnaryCallable createBatchingCallable( + HttpJsonCallSettings httpJsonCallSettings, + BatchingCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createBatchingCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @Override + public + OperationCallable createOperationCallable( + HttpJsonCallSettings httpJsonCallSettings, + OperationCallSettings callSettings, + ClientContext clientContext, + OperationsStub operationsStub) { + UnaryCallable innerCallable = + HttpJsonCallableFactory.createBaseUnaryCallable( + httpJsonCallSettings, callSettings.getInitialCallSettings(), clientContext); + HttpJsonOperationSnapshotCallable initialCallable = + new HttpJsonOperationSnapshotCallable( + innerCallable, + httpJsonCallSettings.getMethodDescriptor().getOperationSnapshotFactory()); + return HttpJsonCallableFactory.createOperationCallable( + callSettings, clientContext, operationsStub.longRunningClient(), initialCallable); + } + + @Override + public + ServerStreamingCallable createServerStreamingCallable( + HttpJsonCallSettings httpJsonCallSettings, + ServerStreamingCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createServerStreamingCallable( + httpJsonCallSettings, callSettings, clientContext); + } +} diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/HttpJsonAclConfigServiceStub.java b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/HttpJsonAclConfigServiceStub.java new file mode 100644 index 000000000000..174e1841b4c7 --- /dev/null +++ b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/HttpJsonAclConfigServiceStub.java @@ -0,0 +1,262 @@ +/* + * 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.discoveryengine.v1beta.stub; + +import com.google.api.core.BetaApi; +import com.google.api.core.InternalApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.httpjson.ApiMethodDescriptor; +import com.google.api.gax.httpjson.HttpJsonCallSettings; +import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; +import com.google.api.gax.httpjson.ProtoMessageRequestFormatter; +import com.google.api.gax.httpjson.ProtoMessageResponseParser; +import com.google.api.gax.httpjson.ProtoRestSerializer; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.RequestParamsBuilder; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.discoveryengine.v1beta.AclConfig; +import com.google.cloud.discoveryengine.v1beta.GetAclConfigRequest; +import com.google.cloud.discoveryengine.v1beta.UpdateAclConfigRequest; +import com.google.protobuf.TypeRegistry; +import java.io.IOException; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * REST stub implementation for the AclConfigService service API. + * + *

            This class is for advanced usage and reflects the underlying API directly. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class HttpJsonAclConfigServiceStub extends AclConfigServiceStub { + private static final TypeRegistry typeRegistry = TypeRegistry.newBuilder().build(); + + private static final ApiMethodDescriptor + updateAclConfigMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.discoveryengine.v1beta.AclConfigService/UpdateAclConfig") + .setHttpMethod("PATCH") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1beta/{aclConfig.name=projects/*/locations/*/aclConfig}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam( + fields, "aclConfig.name", request.getAclConfig().getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("aclConfig", request.getAclConfig(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(AclConfig.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + getAclConfigMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.discoveryengine.v1beta.AclConfigService/GetAclConfig") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1beta/{name=projects/*/locations/*/aclConfig}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(AclConfig.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private final UnaryCallable updateAclConfigCallable; + private final UnaryCallable getAclConfigCallable; + + private final BackgroundResource backgroundResources; + private final HttpJsonStubCallableFactory callableFactory; + + public static final HttpJsonAclConfigServiceStub create(AclConfigServiceStubSettings settings) + throws IOException { + return new HttpJsonAclConfigServiceStub(settings, ClientContext.create(settings)); + } + + public static final HttpJsonAclConfigServiceStub create(ClientContext clientContext) + throws IOException { + return new HttpJsonAclConfigServiceStub( + AclConfigServiceStubSettings.newHttpJsonBuilder().build(), clientContext); + } + + public static final HttpJsonAclConfigServiceStub create( + ClientContext clientContext, HttpJsonStubCallableFactory callableFactory) throws IOException { + return new HttpJsonAclConfigServiceStub( + AclConfigServiceStubSettings.newHttpJsonBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of HttpJsonAclConfigServiceStub, 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 HttpJsonAclConfigServiceStub( + AclConfigServiceStubSettings settings, ClientContext clientContext) throws IOException { + this(settings, clientContext, new HttpJsonAclConfigServiceCallableFactory()); + } + + /** + * Constructs an instance of HttpJsonAclConfigServiceStub, 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 HttpJsonAclConfigServiceStub( + AclConfigServiceStubSettings settings, + ClientContext clientContext, + HttpJsonStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + + HttpJsonCallSettings updateAclConfigTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(updateAclConfigMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("acl_config.name", String.valueOf(request.getAclConfig().getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings getAclConfigTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getAclConfigMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getName()) + .build(); + + this.updateAclConfigCallable = + callableFactory.createUnaryCallable( + updateAclConfigTransportSettings, settings.updateAclConfigSettings(), clientContext); + this.getAclConfigCallable = + callableFactory.createUnaryCallable( + getAclConfigTransportSettings, settings.getAclConfigSettings(), clientContext); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + @InternalApi + public static List getMethodDescriptors() { + List methodDescriptors = new ArrayList<>(); + methodDescriptors.add(updateAclConfigMethodDescriptor); + methodDescriptors.add(getAclConfigMethodDescriptor); + return methodDescriptors; + } + + @Override + public UnaryCallable updateAclConfigCallable() { + return updateAclConfigCallable; + } + + @Override + public UnaryCallable getAclConfigCallable() { + return getAclConfigCallable; + } + + @Override + public final void close() { + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } + } + + @Override + public void shutdown() { + backgroundResources.shutdown(); + } + + @Override + public boolean isShutdown() { + return backgroundResources.isShutdown(); + } + + @Override + public boolean isTerminated() { + return backgroundResources.isTerminated(); + } + + @Override + public void shutdownNow() { + backgroundResources.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return backgroundResources.awaitTermination(duration, unit); + } +} diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/HttpJsonAssistantServiceCallableFactory.java b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/HttpJsonAssistantServiceCallableFactory.java new file mode 100644 index 000000000000..9a096e92b502 --- /dev/null +++ b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/HttpJsonAssistantServiceCallableFactory.java @@ -0,0 +1,103 @@ +/* + * 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.discoveryengine.v1beta.stub; + +import com.google.api.core.BetaApi; +import com.google.api.gax.httpjson.HttpJsonCallSettings; +import com.google.api.gax.httpjson.HttpJsonCallableFactory; +import com.google.api.gax.httpjson.HttpJsonOperationSnapshotCallable; +import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; +import com.google.api.gax.httpjson.longrunning.stub.OperationsStub; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.Operation; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * REST callable factory implementation for the AssistantService service API. + * + *

            This class is for advanced usage. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class HttpJsonAssistantServiceCallableFactory + implements HttpJsonStubCallableFactory { + + @Override + public UnaryCallable createUnaryCallable( + HttpJsonCallSettings httpJsonCallSettings, + UnaryCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createUnaryCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @Override + public + UnaryCallable createPagedCallable( + HttpJsonCallSettings httpJsonCallSettings, + PagedCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createPagedCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @Override + public UnaryCallable createBatchingCallable( + HttpJsonCallSettings httpJsonCallSettings, + BatchingCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createBatchingCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @Override + public + OperationCallable createOperationCallable( + HttpJsonCallSettings httpJsonCallSettings, + OperationCallSettings callSettings, + ClientContext clientContext, + OperationsStub operationsStub) { + UnaryCallable innerCallable = + HttpJsonCallableFactory.createBaseUnaryCallable( + httpJsonCallSettings, callSettings.getInitialCallSettings(), clientContext); + HttpJsonOperationSnapshotCallable initialCallable = + new HttpJsonOperationSnapshotCallable( + innerCallable, + httpJsonCallSettings.getMethodDescriptor().getOperationSnapshotFactory()); + return HttpJsonCallableFactory.createOperationCallable( + callSettings, clientContext, operationsStub.longRunningClient(), initialCallable); + } + + @Override + public + ServerStreamingCallable createServerStreamingCallable( + HttpJsonCallSettings httpJsonCallSettings, + ServerStreamingCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createServerStreamingCallable( + httpJsonCallSettings, callSettings, clientContext); + } +} diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/HttpJsonAssistantServiceStub.java b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/HttpJsonAssistantServiceStub.java new file mode 100644 index 000000000000..577b5cb90daf --- /dev/null +++ b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/HttpJsonAssistantServiceStub.java @@ -0,0 +1,524 @@ +/* + * 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.discoveryengine.v1beta.stub; + +import static com.google.cloud.discoveryengine.v1beta.AssistantServiceClient.ListAssistantsPagedResponse; + +import com.google.api.core.BetaApi; +import com.google.api.core.InternalApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.httpjson.ApiMethodDescriptor; +import com.google.api.gax.httpjson.HttpJsonCallSettings; +import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; +import com.google.api.gax.httpjson.ProtoMessageRequestFormatter; +import com.google.api.gax.httpjson.ProtoMessageResponseParser; +import com.google.api.gax.httpjson.ProtoRestSerializer; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.RequestParamsBuilder; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.discoveryengine.v1beta.Assistant; +import com.google.cloud.discoveryengine.v1beta.CreateAssistantRequest; +import com.google.cloud.discoveryengine.v1beta.DeleteAssistantRequest; +import com.google.cloud.discoveryengine.v1beta.GetAssistantRequest; +import com.google.cloud.discoveryengine.v1beta.ListAssistantsRequest; +import com.google.cloud.discoveryengine.v1beta.ListAssistantsResponse; +import com.google.cloud.discoveryengine.v1beta.StreamAssistRequest; +import com.google.cloud.discoveryengine.v1beta.StreamAssistResponse; +import com.google.cloud.discoveryengine.v1beta.UpdateAssistantRequest; +import com.google.protobuf.Empty; +import com.google.protobuf.TypeRegistry; +import java.io.IOException; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * REST stub implementation for the AssistantService service API. + * + *

            This class is for advanced usage and reflects the underlying API directly. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class HttpJsonAssistantServiceStub extends AssistantServiceStub { + private static final TypeRegistry typeRegistry = TypeRegistry.newBuilder().build(); + + private static final ApiMethodDescriptor + streamAssistMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.discoveryengine.v1beta.AssistantService/StreamAssist") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.SERVER_STREAMING) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1beta/{name=projects/*/locations/*/collections/*/engines/*/assistants/*}:streamAssist", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearName().build(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(StreamAssistResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + createAssistantMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.discoveryengine.v1beta.AssistantService/CreateAssistant") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1beta/{parent=projects/*/locations/*/collections/*/engines/*}/assistants", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam( + fields, "assistantId", request.getAssistantId()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("assistant", request.getAssistant(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Assistant.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + deleteAssistantMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.discoveryengine.v1beta.AssistantService/DeleteAssistant") + .setHttpMethod("DELETE") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1beta/{name=projects/*/locations/*/collections/*/engines/*/assistants/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Empty.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + updateAssistantMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.discoveryengine.v1beta.AssistantService/UpdateAssistant") + .setHttpMethod("PATCH") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1beta/{assistant.name=projects/*/locations/*/collections/*/engines/*/assistants/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam( + fields, "assistant.name", request.getAssistant().getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "updateMask", request.getUpdateMask()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("assistant", request.getAssistant(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Assistant.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + getAssistantMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.discoveryengine.v1beta.AssistantService/GetAssistant") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1beta/{name=projects/*/locations/*/collections/*/engines/*/assistants/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Assistant.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + listAssistantsMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.discoveryengine.v1beta.AssistantService/ListAssistants") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1beta/{parent=projects/*/locations/*/collections/*/engines/*}/assistants", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "pageSize", request.getPageSize()); + serializer.putQueryParam(fields, "pageToken", request.getPageToken()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListAssistantsResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private final ServerStreamingCallable + streamAssistCallable; + private final UnaryCallable createAssistantCallable; + private final UnaryCallable deleteAssistantCallable; + private final UnaryCallable updateAssistantCallable; + private final UnaryCallable getAssistantCallable; + private final UnaryCallable listAssistantsCallable; + private final UnaryCallable + listAssistantsPagedCallable; + + private final BackgroundResource backgroundResources; + private final HttpJsonStubCallableFactory callableFactory; + + public static final HttpJsonAssistantServiceStub create(AssistantServiceStubSettings settings) + throws IOException { + return new HttpJsonAssistantServiceStub(settings, ClientContext.create(settings)); + } + + public static final HttpJsonAssistantServiceStub create(ClientContext clientContext) + throws IOException { + return new HttpJsonAssistantServiceStub( + AssistantServiceStubSettings.newHttpJsonBuilder().build(), clientContext); + } + + public static final HttpJsonAssistantServiceStub create( + ClientContext clientContext, HttpJsonStubCallableFactory callableFactory) throws IOException { + return new HttpJsonAssistantServiceStub( + AssistantServiceStubSettings.newHttpJsonBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of HttpJsonAssistantServiceStub, 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 HttpJsonAssistantServiceStub( + AssistantServiceStubSettings settings, ClientContext clientContext) throws IOException { + this(settings, clientContext, new HttpJsonAssistantServiceCallableFactory()); + } + + /** + * Constructs an instance of HttpJsonAssistantServiceStub, 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 HttpJsonAssistantServiceStub( + AssistantServiceStubSettings settings, + ClientContext clientContext, + HttpJsonStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + + HttpJsonCallSettings streamAssistTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(streamAssistMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getName()) + .build(); + HttpJsonCallSettings createAssistantTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(createAssistantMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .build(); + HttpJsonCallSettings deleteAssistantTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(deleteAssistantMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getName()) + .build(); + HttpJsonCallSettings updateAssistantTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(updateAssistantMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("assistant.name", String.valueOf(request.getAssistant().getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings getAssistantTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getAssistantMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getName()) + .build(); + HttpJsonCallSettings + listAssistantsTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(listAssistantsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .build(); + + this.streamAssistCallable = + callableFactory.createServerStreamingCallable( + streamAssistTransportSettings, settings.streamAssistSettings(), clientContext); + this.createAssistantCallable = + callableFactory.createUnaryCallable( + createAssistantTransportSettings, settings.createAssistantSettings(), clientContext); + this.deleteAssistantCallable = + callableFactory.createUnaryCallable( + deleteAssistantTransportSettings, settings.deleteAssistantSettings(), clientContext); + this.updateAssistantCallable = + callableFactory.createUnaryCallable( + updateAssistantTransportSettings, settings.updateAssistantSettings(), clientContext); + this.getAssistantCallable = + callableFactory.createUnaryCallable( + getAssistantTransportSettings, settings.getAssistantSettings(), clientContext); + this.listAssistantsCallable = + callableFactory.createUnaryCallable( + listAssistantsTransportSettings, settings.listAssistantsSettings(), clientContext); + this.listAssistantsPagedCallable = + callableFactory.createPagedCallable( + listAssistantsTransportSettings, settings.listAssistantsSettings(), clientContext); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + @InternalApi + public static List getMethodDescriptors() { + List methodDescriptors = new ArrayList<>(); + methodDescriptors.add(streamAssistMethodDescriptor); + methodDescriptors.add(createAssistantMethodDescriptor); + methodDescriptors.add(deleteAssistantMethodDescriptor); + methodDescriptors.add(updateAssistantMethodDescriptor); + methodDescriptors.add(getAssistantMethodDescriptor); + methodDescriptors.add(listAssistantsMethodDescriptor); + return methodDescriptors; + } + + @Override + public ServerStreamingCallable streamAssistCallable() { + return streamAssistCallable; + } + + @Override + public UnaryCallable createAssistantCallable() { + return createAssistantCallable; + } + + @Override + public UnaryCallable deleteAssistantCallable() { + return deleteAssistantCallable; + } + + @Override + public UnaryCallable updateAssistantCallable() { + return updateAssistantCallable; + } + + @Override + public UnaryCallable getAssistantCallable() { + return getAssistantCallable; + } + + @Override + public UnaryCallable listAssistantsCallable() { + return listAssistantsCallable; + } + + @Override + public UnaryCallable + listAssistantsPagedCallable() { + return listAssistantsPagedCallable; + } + + @Override + public final void close() { + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } + } + + @Override + public void shutdown() { + backgroundResources.shutdown(); + } + + @Override + public boolean isShutdown() { + return backgroundResources.isShutdown(); + } + + @Override + public boolean isTerminated() { + return backgroundResources.isTerminated(); + } + + @Override + public void shutdownNow() { + backgroundResources.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return backgroundResources.awaitTermination(duration, unit); + } +} diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/HttpJsonCmekConfigServiceCallableFactory.java b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/HttpJsonCmekConfigServiceCallableFactory.java new file mode 100644 index 000000000000..878b5d3b206d --- /dev/null +++ b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/HttpJsonCmekConfigServiceCallableFactory.java @@ -0,0 +1,103 @@ +/* + * 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.discoveryengine.v1beta.stub; + +import com.google.api.core.BetaApi; +import com.google.api.gax.httpjson.HttpJsonCallSettings; +import com.google.api.gax.httpjson.HttpJsonCallableFactory; +import com.google.api.gax.httpjson.HttpJsonOperationSnapshotCallable; +import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; +import com.google.api.gax.httpjson.longrunning.stub.OperationsStub; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.Operation; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * REST callable factory implementation for the CmekConfigService service API. + * + *

            This class is for advanced usage. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class HttpJsonCmekConfigServiceCallableFactory + implements HttpJsonStubCallableFactory { + + @Override + public UnaryCallable createUnaryCallable( + HttpJsonCallSettings httpJsonCallSettings, + UnaryCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createUnaryCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @Override + public + UnaryCallable createPagedCallable( + HttpJsonCallSettings httpJsonCallSettings, + PagedCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createPagedCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @Override + public UnaryCallable createBatchingCallable( + HttpJsonCallSettings httpJsonCallSettings, + BatchingCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createBatchingCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @Override + public + OperationCallable createOperationCallable( + HttpJsonCallSettings httpJsonCallSettings, + OperationCallSettings callSettings, + ClientContext clientContext, + OperationsStub operationsStub) { + UnaryCallable innerCallable = + HttpJsonCallableFactory.createBaseUnaryCallable( + httpJsonCallSettings, callSettings.getInitialCallSettings(), clientContext); + HttpJsonOperationSnapshotCallable initialCallable = + new HttpJsonOperationSnapshotCallable( + innerCallable, + httpJsonCallSettings.getMethodDescriptor().getOperationSnapshotFactory()); + return HttpJsonCallableFactory.createOperationCallable( + callSettings, clientContext, operationsStub.longRunningClient(), initialCallable); + } + + @Override + public + ServerStreamingCallable createServerStreamingCallable( + HttpJsonCallSettings httpJsonCallSettings, + ServerStreamingCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createServerStreamingCallable( + httpJsonCallSettings, callSettings, clientContext); + } +} diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/HttpJsonCmekConfigServiceStub.java b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/HttpJsonCmekConfigServiceStub.java new file mode 100644 index 000000000000..a5e67e908386 --- /dev/null +++ b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/HttpJsonCmekConfigServiceStub.java @@ -0,0 +1,620 @@ +/* + * 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.discoveryengine.v1beta.stub; + +import com.google.api.HttpRule; +import com.google.api.core.BetaApi; +import com.google.api.core.InternalApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.httpjson.ApiMethodDescriptor; +import com.google.api.gax.httpjson.HttpJsonCallSettings; +import com.google.api.gax.httpjson.HttpJsonOperationSnapshot; +import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; +import com.google.api.gax.httpjson.ProtoMessageRequestFormatter; +import com.google.api.gax.httpjson.ProtoMessageResponseParser; +import com.google.api.gax.httpjson.ProtoRestSerializer; +import com.google.api.gax.httpjson.longrunning.stub.HttpJsonOperationsStub; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.RequestParamsBuilder; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.discoveryengine.v1beta.CmekConfig; +import com.google.cloud.discoveryengine.v1beta.DeleteCmekConfigMetadata; +import com.google.cloud.discoveryengine.v1beta.DeleteCmekConfigRequest; +import com.google.cloud.discoveryengine.v1beta.GetCmekConfigRequest; +import com.google.cloud.discoveryengine.v1beta.ListCmekConfigsRequest; +import com.google.cloud.discoveryengine.v1beta.ListCmekConfigsResponse; +import com.google.cloud.discoveryengine.v1beta.UpdateCmekConfigMetadata; +import com.google.cloud.discoveryengine.v1beta.UpdateCmekConfigRequest; +import com.google.common.collect.ImmutableMap; +import com.google.longrunning.Operation; +import com.google.protobuf.Empty; +import com.google.protobuf.TypeRegistry; +import java.io.IOException; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * REST stub implementation for the CmekConfigService service API. + * + *

            This class is for advanced usage and reflects the underlying API directly. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class HttpJsonCmekConfigServiceStub extends CmekConfigServiceStub { + private static final TypeRegistry typeRegistry = + TypeRegistry.newBuilder() + .add(Empty.getDescriptor()) + .add(UpdateCmekConfigMetadata.getDescriptor()) + .add(DeleteCmekConfigMetadata.getDescriptor()) + .add(CmekConfig.getDescriptor()) + .build(); + + private static final ApiMethodDescriptor + updateCmekConfigMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.discoveryengine.v1beta.CmekConfigService/UpdateCmekConfig") + .setHttpMethod("PATCH") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1beta/{config.name=projects/*/locations/*/cmekConfig}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam( + fields, "config.name", request.getConfig().getName()); + return fields; + }) + .setAdditionalPaths( + "/v1beta/{config.name=projects/*/locations/*/cmekConfigs/*}") + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "setDefault", request.getSetDefault()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("config", request.getConfig(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (UpdateCmekConfigRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + getCmekConfigMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.discoveryengine.v1beta.CmekConfigService/GetCmekConfig") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1beta/{name=projects/*/locations/*/cmekConfig}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setAdditionalPaths("/v1beta/{name=projects/*/locations/*/cmekConfigs/*}") + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(CmekConfig.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + listCmekConfigsMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.discoveryengine.v1beta.CmekConfigService/ListCmekConfigs") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1beta/{parent=projects/*/locations/*}/cmekConfigs", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListCmekConfigsResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + deleteCmekConfigMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.discoveryengine.v1beta.CmekConfigService/DeleteCmekConfig") + .setHttpMethod("DELETE") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1beta/{name=projects/*/locations/*/cmekConfigs/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (DeleteCmekConfigRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private final UnaryCallable updateCmekConfigCallable; + private final OperationCallable + updateCmekConfigOperationCallable; + private final UnaryCallable getCmekConfigCallable; + private final UnaryCallable + listCmekConfigsCallable; + private final UnaryCallable deleteCmekConfigCallable; + private final OperationCallable + deleteCmekConfigOperationCallable; + + private final BackgroundResource backgroundResources; + private final HttpJsonOperationsStub httpJsonOperationsStub; + private final HttpJsonStubCallableFactory callableFactory; + + public static final HttpJsonCmekConfigServiceStub create(CmekConfigServiceStubSettings settings) + throws IOException { + return new HttpJsonCmekConfigServiceStub(settings, ClientContext.create(settings)); + } + + public static final HttpJsonCmekConfigServiceStub create(ClientContext clientContext) + throws IOException { + return new HttpJsonCmekConfigServiceStub( + CmekConfigServiceStubSettings.newHttpJsonBuilder().build(), clientContext); + } + + public static final HttpJsonCmekConfigServiceStub create( + ClientContext clientContext, HttpJsonStubCallableFactory callableFactory) throws IOException { + return new HttpJsonCmekConfigServiceStub( + CmekConfigServiceStubSettings.newHttpJsonBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of HttpJsonCmekConfigServiceStub, 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 HttpJsonCmekConfigServiceStub( + CmekConfigServiceStubSettings settings, ClientContext clientContext) throws IOException { + this(settings, clientContext, new HttpJsonCmekConfigServiceCallableFactory()); + } + + /** + * Constructs an instance of HttpJsonCmekConfigServiceStub, 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 HttpJsonCmekConfigServiceStub( + CmekConfigServiceStubSettings settings, + ClientContext clientContext, + HttpJsonStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.httpJsonOperationsStub = + HttpJsonOperationsStub.create( + clientContext, + callableFactory, + typeRegistry, + ImmutableMap.builder() + .put( + "google.longrunning.Operations.CancelOperation", + HttpRule.newBuilder() + .setPost( + "/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*/operations/*}:cancel") + .addAdditionalBindings( + HttpRule.newBuilder() + .setPost( + "/v1beta/{name=projects/*/locations/*/dataStores/*/branches/*/operations/*}:cancel") + .build()) + .build()) + .put( + "google.longrunning.Operations.GetOperation", + HttpRule.newBuilder() + .setGet( + "/v1beta/{name=projects/*/locations/*/collections/*/dataConnector/operations/*}") + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*/operations/*}") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/models/*/operations/*}") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/operations/*}") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/schemas/*/operations/*}") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/operations/*}") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/targetSites/operations/*}") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1beta/{name=projects/*/locations/*/collections/*/engines/*/assistants/*/agents/*/operations/*}") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1beta/{name=projects/*/locations/*/collections/*/engines/*/operations/*}") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1beta/{name=projects/*/locations/*/collections/*/operations/*}") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1beta/{name=projects/*/locations/*/dataStores/*/branches/*/operations/*}") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1beta/{name=projects/*/locations/*/dataStores/*/models/*/operations/*}") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1beta/{name=projects/*/locations/*/dataStores/*/operations/*}") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1beta/{name=projects/*/locations/*/evaluations/*/operations/*}") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1beta/{name=projects/*/locations/*/identityMappingStores/*/operations/*}") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet("/v1beta/{name=projects/*/locations/*/operations/*}") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1beta/{name=projects/*/locations/*/sampleQuerySets/*/operations/*}") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet("/v1beta/{name=projects/*/operations/*}") + .build()) + .build()) + .put( + "google.longrunning.Operations.ListOperations", + HttpRule.newBuilder() + .setGet( + "/v1beta/{name=projects/*/locations/*/collections/*/dataConnector}/operations") + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*}/operations") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/models/*}/operations") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/schemas/*}/operations") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/targetSites}/operations") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine}/operations") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*}/operations") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1beta/{name=projects/*/locations/*/collections/*/engines/*}/operations") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1beta/{name=projects/*/locations/*/collections/*}/operations") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1beta/{name=projects/*/locations/*/dataStores/*/branches/*}/operations") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1beta/{name=projects/*/locations/*/dataStores/*/models/*}/operations") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1beta/{name=projects/*/locations/*/dataStores/*}/operations") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1beta/{name=projects/*/locations/*/identityMappingStores/*}/operations") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet("/v1beta/{name=projects/*/locations/*}/operations") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet("/v1beta/{name=projects/*}/operations") + .build()) + .build()) + .build()); + + HttpJsonCallSettings updateCmekConfigTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(updateCmekConfigMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("config.name", String.valueOf(request.getConfig().getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings getCmekConfigTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getCmekConfigMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getName()) + .build(); + HttpJsonCallSettings + listCmekConfigsTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(listCmekConfigsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .build(); + HttpJsonCallSettings deleteCmekConfigTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(deleteCmekConfigMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getName()) + .build(); + + this.updateCmekConfigCallable = + callableFactory.createUnaryCallable( + updateCmekConfigTransportSettings, settings.updateCmekConfigSettings(), clientContext); + this.updateCmekConfigOperationCallable = + callableFactory.createOperationCallable( + updateCmekConfigTransportSettings, + settings.updateCmekConfigOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.getCmekConfigCallable = + callableFactory.createUnaryCallable( + getCmekConfigTransportSettings, settings.getCmekConfigSettings(), clientContext); + this.listCmekConfigsCallable = + callableFactory.createUnaryCallable( + listCmekConfigsTransportSettings, settings.listCmekConfigsSettings(), clientContext); + this.deleteCmekConfigCallable = + callableFactory.createUnaryCallable( + deleteCmekConfigTransportSettings, settings.deleteCmekConfigSettings(), clientContext); + this.deleteCmekConfigOperationCallable = + callableFactory.createOperationCallable( + deleteCmekConfigTransportSettings, + settings.deleteCmekConfigOperationSettings(), + clientContext, + httpJsonOperationsStub); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + @InternalApi + public static List getMethodDescriptors() { + List methodDescriptors = new ArrayList<>(); + methodDescriptors.add(updateCmekConfigMethodDescriptor); + methodDescriptors.add(getCmekConfigMethodDescriptor); + methodDescriptors.add(listCmekConfigsMethodDescriptor); + methodDescriptors.add(deleteCmekConfigMethodDescriptor); + return methodDescriptors; + } + + public HttpJsonOperationsStub getHttpJsonOperationsStub() { + return httpJsonOperationsStub; + } + + @Override + public UnaryCallable updateCmekConfigCallable() { + return updateCmekConfigCallable; + } + + @Override + public OperationCallable + updateCmekConfigOperationCallable() { + return updateCmekConfigOperationCallable; + } + + @Override + public UnaryCallable getCmekConfigCallable() { + return getCmekConfigCallable; + } + + @Override + public UnaryCallable listCmekConfigsCallable() { + return listCmekConfigsCallable; + } + + @Override + public UnaryCallable deleteCmekConfigCallable() { + return deleteCmekConfigCallable; + } + + @Override + public OperationCallable + deleteCmekConfigOperationCallable() { + return deleteCmekConfigOperationCallable; + } + + @Override + public final void close() { + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } + } + + @Override + public void shutdown() { + backgroundResources.shutdown(); + } + + @Override + public boolean isShutdown() { + return backgroundResources.isShutdown(); + } + + @Override + public boolean isTerminated() { + return backgroundResources.isTerminated(); + } + + @Override + public void shutdownNow() { + backgroundResources.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return backgroundResources.awaitTermination(duration, unit); + } +} diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/HttpJsonCompletionServiceStub.java b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/HttpJsonCompletionServiceStub.java index 5c1a93df66d4..aabf36f74283 100644 --- a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/HttpJsonCompletionServiceStub.java +++ b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/HttpJsonCompletionServiceStub.java @@ -49,6 +49,8 @@ import com.google.cloud.discoveryengine.v1beta.PurgeSuggestionDenyListEntriesMetadata; import com.google.cloud.discoveryengine.v1beta.PurgeSuggestionDenyListEntriesRequest; import com.google.cloud.discoveryengine.v1beta.PurgeSuggestionDenyListEntriesResponse; +import com.google.cloud.discoveryengine.v1beta.RemoveSuggestionRequest; +import com.google.cloud.discoveryengine.v1beta.RemoveSuggestionResponse; import com.google.common.collect.ImmutableMap; import com.google.longrunning.Operation; import com.google.protobuf.TypeRegistry; @@ -345,6 +347,48 @@ public class HttpJsonCompletionServiceStub extends CompletionServiceStub { HttpJsonOperationSnapshot.create(response)) .build(); + private static final ApiMethodDescriptor + removeSuggestionMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.discoveryengine.v1beta.CompletionService/RemoveSuggestion") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1beta/{completionConfig=projects/*/locations/*/collections/*/engines/*/completionConfig}:removeSuggestion", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam( + fields, "completionConfig", request.getCompletionConfig()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody( + "*", + request.toBuilder().clearCompletionConfig().build(), + true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(RemoveSuggestionResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + private final UnaryCallable completeQueryCallable; private final UnaryCallable advancedCompleteQueryCallable; @@ -376,6 +420,8 @@ public class HttpJsonCompletionServiceStub extends CompletionServiceStub { PurgeCompletionSuggestionsResponse, PurgeCompletionSuggestionsMetadata> purgeCompletionSuggestionsOperationCallable; + private final UnaryCallable + removeSuggestionCallable; private final BackgroundResource backgroundResources; private final HttpJsonOperationsStub httpJsonOperationsStub; @@ -471,6 +517,11 @@ protected HttpJsonCompletionServiceStub( .setGet( "/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/targetSites/operations/*}") .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1beta/{name=projects/*/locations/*/collections/*/engines/*/assistants/*/agents/*/operations/*}") + .build()) .addAdditionalBindings( HttpRule.newBuilder() .setGet( @@ -501,6 +552,11 @@ protected HttpJsonCompletionServiceStub( .setGet( "/v1beta/{name=projects/*/locations/*/evaluations/*/operations/*}") .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1beta/{name=projects/*/locations/*/identityMappingStores/*/operations/*}") + .build()) .addAdditionalBindings( HttpRule.newBuilder() .setGet("/v1beta/{name=projects/*/locations/*/operations/*}") @@ -575,6 +631,11 @@ protected HttpJsonCompletionServiceStub( .setGet( "/v1beta/{name=projects/*/locations/*/dataStores/*}/operations") .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1beta/{name=projects/*/locations/*/identityMappingStores/*}/operations") + .build()) .addAdditionalBindings( HttpRule.newBuilder() .setGet("/v1beta/{name=projects/*/locations/*}/operations") @@ -666,6 +727,20 @@ protected HttpJsonCompletionServiceStub( }) .setResourceNameExtractor(request -> request.getParent()) .build(); + HttpJsonCallSettings + removeSuggestionTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(removeSuggestionMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add( + "completion_config", String.valueOf(request.getCompletionConfig())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getCompletionConfig()) + .build(); this.completeQueryCallable = callableFactory.createUnaryCallable( @@ -719,6 +794,9 @@ protected HttpJsonCompletionServiceStub( settings.purgeCompletionSuggestionsOperationSettings(), clientContext, httpJsonOperationsStub); + this.removeSuggestionCallable = + callableFactory.createUnaryCallable( + removeSuggestionTransportSettings, settings.removeSuggestionSettings(), clientContext); this.backgroundResources = new BackgroundResourceAggregation(clientContext.getBackgroundResources()); @@ -733,6 +811,7 @@ public static List getMethodDescriptors() { methodDescriptors.add(purgeSuggestionDenyListEntriesMethodDescriptor); methodDescriptors.add(importCompletionSuggestionsMethodDescriptor); methodDescriptors.add(purgeCompletionSuggestionsMethodDescriptor); + methodDescriptors.add(removeSuggestionMethodDescriptor); return methodDescriptors; } @@ -811,6 +890,12 @@ public UnaryCallable completeQueryC return purgeCompletionSuggestionsOperationCallable; } + @Override + public UnaryCallable + removeSuggestionCallable() { + return removeSuggestionCallable; + } + @Override public final void close() { try { diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/HttpJsonConversationalSearchServiceStub.java b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/HttpJsonConversationalSearchServiceStub.java index 5de02a7a9de0..e2fda4dcebed 100644 --- a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/HttpJsonConversationalSearchServiceStub.java +++ b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/HttpJsonConversationalSearchServiceStub.java @@ -31,6 +31,7 @@ import com.google.api.gax.httpjson.ProtoRestSerializer; import com.google.api.gax.rpc.ClientContext; import com.google.api.gax.rpc.RequestParamsBuilder; +import com.google.api.gax.rpc.ServerStreamingCallable; import com.google.api.gax.rpc.UnaryCallable; import com.google.cloud.discoveryengine.v1beta.Answer; import com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest; @@ -361,6 +362,49 @@ public class HttpJsonConversationalSearchServiceStub extends ConversationalSearc .build()) .build(); + private static final ApiMethodDescriptor + streamAnswerQueryMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.discoveryengine.v1beta.ConversationalSearchService/StreamAnswerQuery") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.SERVER_STREAMING) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1beta/{servingConfig=projects/*/locations/*/dataStores/*/servingConfigs/*}:streamAnswer", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam( + fields, "servingConfig", request.getServingConfig()); + return fields; + }) + .setAdditionalPaths( + "/v1beta/{servingConfig=projects/*/locations/*/collections/*/dataStores/*/servingConfigs/*}:streamAnswer", + "/v1beta/{servingConfig=projects/*/locations/*/collections/*/engines/*/servingConfigs/*}:streamAnswer") + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody( + "*", request.toBuilder().clearServingConfig().build(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(AnswerQueryResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + private static final ApiMethodDescriptor getAnswerMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName( @@ -424,6 +468,7 @@ public class HttpJsonConversationalSearchServiceStub extends ConversationalSearc Map> fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "sessionId", request.getSessionId()); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) @@ -612,6 +657,8 @@ public class HttpJsonConversationalSearchServiceStub extends ConversationalSearc private final UnaryCallable listConversationsPagedCallable; private final UnaryCallable answerQueryCallable; + private final ServerStreamingCallable + streamAnswerQueryCallable; private final UnaryCallable getAnswerCallable; private final UnaryCallable createSessionCallable; private final UnaryCallable deleteSessionCallable; @@ -755,6 +802,19 @@ protected HttpJsonConversationalSearchServiceStub( }) .setResourceNameExtractor(request -> request.getServingConfig()) .build(); + HttpJsonCallSettings + streamAnswerQueryTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(streamAnswerQueryMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("serving_config", String.valueOf(request.getServingConfig())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getServingConfig()) + .build(); HttpJsonCallSettings getAnswerTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(getAnswerMethodDescriptor) @@ -863,6 +923,11 @@ protected HttpJsonConversationalSearchServiceStub( this.answerQueryCallable = callableFactory.createUnaryCallable( answerQueryTransportSettings, settings.answerQuerySettings(), clientContext); + this.streamAnswerQueryCallable = + callableFactory.createServerStreamingCallable( + streamAnswerQueryTransportSettings, + settings.streamAnswerQuerySettings(), + clientContext); this.getAnswerCallable = callableFactory.createUnaryCallable( getAnswerTransportSettings, settings.getAnswerSettings(), clientContext); @@ -899,6 +964,7 @@ public static List getMethodDescriptors() { methodDescriptors.add(getConversationMethodDescriptor); methodDescriptors.add(listConversationsMethodDescriptor); methodDescriptors.add(answerQueryMethodDescriptor); + methodDescriptors.add(streamAnswerQueryMethodDescriptor); methodDescriptors.add(getAnswerMethodDescriptor); methodDescriptors.add(createSessionMethodDescriptor); methodDescriptors.add(deleteSessionMethodDescriptor); @@ -951,6 +1017,12 @@ public UnaryCallable answerQueryCallabl return answerQueryCallable; } + @Override + public ServerStreamingCallable + streamAnswerQueryCallable() { + return streamAnswerQueryCallable; + } + @Override public UnaryCallable getAnswerCallable() { return getAnswerCallable; diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/HttpJsonDataStoreServiceStub.java b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/HttpJsonDataStoreServiceStub.java index c3b4cdb5a011..7a960d9b4216 100644 --- a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/HttpJsonDataStoreServiceStub.java +++ b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/HttpJsonDataStoreServiceStub.java @@ -98,12 +98,16 @@ public class HttpJsonDataStoreServiceStub extends DataStoreServiceStub { Map> fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); + serializer.putQueryParam( + fields, "cmekConfigName", request.getCmekConfigName()); serializer.putQueryParam( fields, "createAdvancedSiteSearch", request.getCreateAdvancedSiteSearch()); serializer.putQueryParam( fields, "dataStoreId", request.getDataStoreId()); + serializer.putQueryParam( + fields, "disableCmek", request.getDisableCmek()); serializer.putQueryParam( fields, "skipDefaultSchemaCreation", @@ -391,6 +395,11 @@ protected HttpJsonDataStoreServiceStub( .setGet( "/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/targetSites/operations/*}") .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1beta/{name=projects/*/locations/*/collections/*/engines/*/assistants/*/agents/*/operations/*}") + .build()) .addAdditionalBindings( HttpRule.newBuilder() .setGet( @@ -421,6 +430,11 @@ protected HttpJsonDataStoreServiceStub( .setGet( "/v1beta/{name=projects/*/locations/*/evaluations/*/operations/*}") .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1beta/{name=projects/*/locations/*/identityMappingStores/*/operations/*}") + .build()) .addAdditionalBindings( HttpRule.newBuilder() .setGet("/v1beta/{name=projects/*/locations/*/operations/*}") @@ -495,6 +509,11 @@ protected HttpJsonDataStoreServiceStub( .setGet( "/v1beta/{name=projects/*/locations/*/dataStores/*}/operations") .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1beta/{name=projects/*/locations/*/identityMappingStores/*}/operations") + .build()) .addAdditionalBindings( HttpRule.newBuilder() .setGet("/v1beta/{name=projects/*/locations/*}/operations") @@ -516,7 +535,7 @@ protected HttpJsonDataStoreServiceStub( builder.add("parent", String.valueOf(request.getParent())); return builder.build(); }) - .setResourceNameExtractor(request -> request.getParent()) + .setResourceNameExtractor(request -> request.getCmekConfigName()) .build(); HttpJsonCallSettings getDataStoreTransportSettings = HttpJsonCallSettings.newBuilder() diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/HttpJsonDocumentServiceStub.java b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/HttpJsonDocumentServiceStub.java index 7476c927818f..785041edab37 100644 --- a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/HttpJsonDocumentServiceStub.java +++ b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/HttpJsonDocumentServiceStub.java @@ -514,6 +514,11 @@ protected HttpJsonDocumentServiceStub( .setGet( "/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/targetSites/operations/*}") .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1beta/{name=projects/*/locations/*/collections/*/engines/*/assistants/*/agents/*/operations/*}") + .build()) .addAdditionalBindings( HttpRule.newBuilder() .setGet( @@ -544,6 +549,11 @@ protected HttpJsonDocumentServiceStub( .setGet( "/v1beta/{name=projects/*/locations/*/evaluations/*/operations/*}") .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1beta/{name=projects/*/locations/*/identityMappingStores/*/operations/*}") + .build()) .addAdditionalBindings( HttpRule.newBuilder() .setGet("/v1beta/{name=projects/*/locations/*/operations/*}") @@ -618,6 +628,11 @@ protected HttpJsonDocumentServiceStub( .setGet( "/v1beta/{name=projects/*/locations/*/dataStores/*}/operations") .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1beta/{name=projects/*/locations/*/identityMappingStores/*}/operations") + .build()) .addAdditionalBindings( HttpRule.newBuilder() .setGet("/v1beta/{name=projects/*/locations/*}/operations") diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/HttpJsonEngineServiceStub.java b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/HttpJsonEngineServiceStub.java index 8ab75bc86160..5b87ae1086e8 100644 --- a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/HttpJsonEngineServiceStub.java +++ b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/HttpJsonEngineServiceStub.java @@ -50,6 +50,9 @@ import com.google.cloud.discoveryengine.v1beta.TuneEngineResponse; import com.google.cloud.discoveryengine.v1beta.UpdateEngineRequest; import com.google.common.collect.ImmutableMap; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; import com.google.longrunning.Operation; import com.google.protobuf.Empty; import com.google.protobuf.TypeRegistry; @@ -380,6 +383,78 @@ public class HttpJsonEngineServiceStub extends EngineServiceStub { HttpJsonOperationSnapshot.create(response)) .build(); + private static final ApiMethodDescriptor + getIamPolicyMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.discoveryengine.v1beta.EngineService/GetIamPolicy") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1beta/{resource=projects/*/locations/*/collections/*/engines/*}:getIamPolicy", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "resource", request.getResource()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "options", request.getOptions()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Policy.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + setIamPolicyMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.discoveryengine.v1beta.EngineService/SetIamPolicy") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1beta/{resource=projects/*/locations/*/collections/*/engines/*}:setIamPolicy", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "resource", request.getResource()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearResource().build(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Policy.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + private final UnaryCallable createEngineCallable; private final OperationCallable createEngineOperationCallable; @@ -396,6 +471,8 @@ public class HttpJsonEngineServiceStub extends EngineServiceStub { private final UnaryCallable tuneEngineCallable; private final OperationCallable tuneEngineOperationCallable; + private final UnaryCallable getIamPolicyCallable; + private final UnaryCallable setIamPolicyCallable; private final BackgroundResource backgroundResources; private final HttpJsonOperationsStub httpJsonOperationsStub; @@ -491,6 +568,11 @@ protected HttpJsonEngineServiceStub( .setGet( "/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/targetSites/operations/*}") .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1beta/{name=projects/*/locations/*/collections/*/engines/*/assistants/*/agents/*/operations/*}") + .build()) .addAdditionalBindings( HttpRule.newBuilder() .setGet( @@ -521,6 +603,11 @@ protected HttpJsonEngineServiceStub( .setGet( "/v1beta/{name=projects/*/locations/*/evaluations/*/operations/*}") .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1beta/{name=projects/*/locations/*/identityMappingStores/*/operations/*}") + .build()) .addAdditionalBindings( HttpRule.newBuilder() .setGet("/v1beta/{name=projects/*/locations/*/operations/*}") @@ -595,6 +682,11 @@ protected HttpJsonEngineServiceStub( .setGet( "/v1beta/{name=projects/*/locations/*/dataStores/*}/operations") .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1beta/{name=projects/*/locations/*/identityMappingStores/*}/operations") + .build()) .addAdditionalBindings( HttpRule.newBuilder() .setGet("/v1beta/{name=projects/*/locations/*}/operations") @@ -701,6 +793,30 @@ protected HttpJsonEngineServiceStub( }) .setResourceNameExtractor(request -> request.getName()) .build(); + HttpJsonCallSettings getIamPolicyTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getIamPolicyMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("resource", String.valueOf(request.getResource())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getResource()) + .build(); + HttpJsonCallSettings setIamPolicyTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(setIamPolicyMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("resource", String.valueOf(request.getResource())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getResource()) + .build(); this.createEngineCallable = callableFactory.createUnaryCallable( @@ -747,6 +863,12 @@ protected HttpJsonEngineServiceStub( settings.tuneEngineOperationSettings(), clientContext, httpJsonOperationsStub); + this.getIamPolicyCallable = + callableFactory.createUnaryCallable( + getIamPolicyTransportSettings, settings.getIamPolicySettings(), clientContext); + this.setIamPolicyCallable = + callableFactory.createUnaryCallable( + setIamPolicyTransportSettings, settings.setIamPolicySettings(), clientContext); this.backgroundResources = new BackgroundResourceAggregation(clientContext.getBackgroundResources()); @@ -763,6 +885,8 @@ public static List getMethodDescriptors() { methodDescriptors.add(pauseEngineMethodDescriptor); methodDescriptors.add(resumeEngineMethodDescriptor); methodDescriptors.add(tuneEngineMethodDescriptor); + methodDescriptors.add(getIamPolicyMethodDescriptor); + methodDescriptors.add(setIamPolicyMethodDescriptor); return methodDescriptors; } @@ -833,6 +957,16 @@ public UnaryCallable tuneEngineCallable() { return tuneEngineOperationCallable; } + @Override + public UnaryCallable getIamPolicyCallable() { + return getIamPolicyCallable; + } + + @Override + public UnaryCallable setIamPolicyCallable() { + return setIamPolicyCallable; + } + @Override public final void close() { try { diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/HttpJsonEvaluationServiceStub.java b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/HttpJsonEvaluationServiceStub.java index 339216f7bb15..851a865ee5d2 100644 --- a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/HttpJsonEvaluationServiceStub.java +++ b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/HttpJsonEvaluationServiceStub.java @@ -329,6 +329,11 @@ protected HttpJsonEvaluationServiceStub( .setGet( "/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/targetSites/operations/*}") .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1beta/{name=projects/*/locations/*/collections/*/engines/*/assistants/*/agents/*/operations/*}") + .build()) .addAdditionalBindings( HttpRule.newBuilder() .setGet( @@ -359,6 +364,11 @@ protected HttpJsonEvaluationServiceStub( .setGet( "/v1beta/{name=projects/*/locations/*/evaluations/*/operations/*}") .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1beta/{name=projects/*/locations/*/identityMappingStores/*/operations/*}") + .build()) .addAdditionalBindings( HttpRule.newBuilder() .setGet("/v1beta/{name=projects/*/locations/*/operations/*}") @@ -433,6 +443,11 @@ protected HttpJsonEvaluationServiceStub( .setGet( "/v1beta/{name=projects/*/locations/*/dataStores/*}/operations") .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1beta/{name=projects/*/locations/*/identityMappingStores/*}/operations") + .build()) .addAdditionalBindings( HttpRule.newBuilder() .setGet("/v1beta/{name=projects/*/locations/*}/operations") diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/HttpJsonIdentityMappingStoreServiceCallableFactory.java b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/HttpJsonIdentityMappingStoreServiceCallableFactory.java new file mode 100644 index 000000000000..886acbc559cc --- /dev/null +++ b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/HttpJsonIdentityMappingStoreServiceCallableFactory.java @@ -0,0 +1,103 @@ +/* + * 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.discoveryengine.v1beta.stub; + +import com.google.api.core.BetaApi; +import com.google.api.gax.httpjson.HttpJsonCallSettings; +import com.google.api.gax.httpjson.HttpJsonCallableFactory; +import com.google.api.gax.httpjson.HttpJsonOperationSnapshotCallable; +import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; +import com.google.api.gax.httpjson.longrunning.stub.OperationsStub; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.Operation; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * REST callable factory implementation for the IdentityMappingStoreService service API. + * + *

            This class is for advanced usage. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class HttpJsonIdentityMappingStoreServiceCallableFactory + implements HttpJsonStubCallableFactory { + + @Override + public UnaryCallable createUnaryCallable( + HttpJsonCallSettings httpJsonCallSettings, + UnaryCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createUnaryCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @Override + public + UnaryCallable createPagedCallable( + HttpJsonCallSettings httpJsonCallSettings, + PagedCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createPagedCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @Override + public UnaryCallable createBatchingCallable( + HttpJsonCallSettings httpJsonCallSettings, + BatchingCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createBatchingCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @Override + public + OperationCallable createOperationCallable( + HttpJsonCallSettings httpJsonCallSettings, + OperationCallSettings callSettings, + ClientContext clientContext, + OperationsStub operationsStub) { + UnaryCallable innerCallable = + HttpJsonCallableFactory.createBaseUnaryCallable( + httpJsonCallSettings, callSettings.getInitialCallSettings(), clientContext); + HttpJsonOperationSnapshotCallable initialCallable = + new HttpJsonOperationSnapshotCallable( + innerCallable, + httpJsonCallSettings.getMethodDescriptor().getOperationSnapshotFactory()); + return HttpJsonCallableFactory.createOperationCallable( + callSettings, clientContext, operationsStub.longRunningClient(), initialCallable); + } + + @Override + public + ServerStreamingCallable createServerStreamingCallable( + HttpJsonCallSettings httpJsonCallSettings, + ServerStreamingCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createServerStreamingCallable( + httpJsonCallSettings, callSettings, clientContext); + } +} diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/HttpJsonIdentityMappingStoreServiceStub.java b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/HttpJsonIdentityMappingStoreServiceStub.java new file mode 100644 index 000000000000..960d75302bbf --- /dev/null +++ b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/HttpJsonIdentityMappingStoreServiceStub.java @@ -0,0 +1,926 @@ +/* + * 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.discoveryengine.v1beta.stub; + +import static com.google.cloud.discoveryengine.v1beta.IdentityMappingStoreServiceClient.ListIdentityMappingStoresPagedResponse; +import static com.google.cloud.discoveryengine.v1beta.IdentityMappingStoreServiceClient.ListIdentityMappingsPagedResponse; + +import com.google.api.HttpRule; +import com.google.api.core.BetaApi; +import com.google.api.core.InternalApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.httpjson.ApiMethodDescriptor; +import com.google.api.gax.httpjson.HttpJsonCallSettings; +import com.google.api.gax.httpjson.HttpJsonOperationSnapshot; +import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; +import com.google.api.gax.httpjson.ProtoMessageRequestFormatter; +import com.google.api.gax.httpjson.ProtoMessageResponseParser; +import com.google.api.gax.httpjson.ProtoRestSerializer; +import com.google.api.gax.httpjson.longrunning.stub.HttpJsonOperationsStub; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.RequestParamsBuilder; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.discoveryengine.v1beta.CreateIdentityMappingStoreRequest; +import com.google.cloud.discoveryengine.v1beta.DeleteIdentityMappingStoreMetadata; +import com.google.cloud.discoveryengine.v1beta.DeleteIdentityMappingStoreRequest; +import com.google.cloud.discoveryengine.v1beta.GetIdentityMappingStoreRequest; +import com.google.cloud.discoveryengine.v1beta.IdentityMappingEntryOperationMetadata; +import com.google.cloud.discoveryengine.v1beta.IdentityMappingStore; +import com.google.cloud.discoveryengine.v1beta.ImportIdentityMappingsRequest; +import com.google.cloud.discoveryengine.v1beta.ImportIdentityMappingsResponse; +import com.google.cloud.discoveryengine.v1beta.ListIdentityMappingStoresRequest; +import com.google.cloud.discoveryengine.v1beta.ListIdentityMappingStoresResponse; +import com.google.cloud.discoveryengine.v1beta.ListIdentityMappingsRequest; +import com.google.cloud.discoveryengine.v1beta.ListIdentityMappingsResponse; +import com.google.cloud.discoveryengine.v1beta.PurgeIdentityMappingsRequest; +import com.google.common.collect.ImmutableMap; +import com.google.longrunning.Operation; +import com.google.protobuf.Empty; +import com.google.protobuf.TypeRegistry; +import java.io.IOException; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * REST stub implementation for the IdentityMappingStoreService service API. + * + *

            This class is for advanced usage and reflects the underlying API directly. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class HttpJsonIdentityMappingStoreServiceStub extends IdentityMappingStoreServiceStub { + private static final TypeRegistry typeRegistry = + TypeRegistry.newBuilder() + .add(IdentityMappingEntryOperationMetadata.getDescriptor()) + .add(Empty.getDescriptor()) + .add(DeleteIdentityMappingStoreMetadata.getDescriptor()) + .add(ImportIdentityMappingsResponse.getDescriptor()) + .build(); + + private static final ApiMethodDescriptor + createIdentityMappingStoreMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.discoveryengine.v1beta.IdentityMappingStoreService/CreateIdentityMappingStore") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1beta/{parent=projects/*/locations/*}/identityMappingStores", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam( + fields, "cmekConfigName", request.getCmekConfigName()); + serializer.putQueryParam( + fields, "disableCmek", request.getDisableCmek()); + serializer.putQueryParam( + fields, + "identityMappingStoreId", + request.getIdentityMappingStoreId()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody( + "identityMappingStore", + request.getIdentityMappingStore(), + true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(IdentityMappingStore.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + getIdentityMappingStoreMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.discoveryengine.v1beta.IdentityMappingStoreService/GetIdentityMappingStore") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1beta/{name=projects/*/locations/*/identityMappingStores/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(IdentityMappingStore.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + deleteIdentityMappingStoreMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.discoveryengine.v1beta.IdentityMappingStoreService/DeleteIdentityMappingStore") + .setHttpMethod("DELETE") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1beta/{name=projects/*/locations/*/identityMappingStores/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (DeleteIdentityMappingStoreRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + importIdentityMappingsMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.discoveryengine.v1beta.IdentityMappingStoreService/ImportIdentityMappings") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1beta/{identityMappingStore=projects/*/locations/*/identityMappingStores/*}:importIdentityMappings", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam( + fields, "identityMappingStore", request.getIdentityMappingStore()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody( + "*", + request.toBuilder().clearIdentityMappingStore().build(), + true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (ImportIdentityMappingsRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + purgeIdentityMappingsMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.discoveryengine.v1beta.IdentityMappingStoreService/PurgeIdentityMappings") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1beta/{identityMappingStore=projects/*/locations/*/identityMappingStores/*}:purgeIdentityMappings", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam( + fields, "identityMappingStore", request.getIdentityMappingStore()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody( + "*", + request.toBuilder().clearIdentityMappingStore().build(), + true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (PurgeIdentityMappingsRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor< + ListIdentityMappingsRequest, ListIdentityMappingsResponse> + listIdentityMappingsMethodDescriptor = + ApiMethodDescriptor + .newBuilder() + .setFullMethodName( + "google.cloud.discoveryengine.v1beta.IdentityMappingStoreService/ListIdentityMappings") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1beta/{identityMappingStore=projects/*/locations/*/identityMappingStores/*}:listIdentityMappings", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam( + fields, "identityMappingStore", request.getIdentityMappingStore()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "pageSize", request.getPageSize()); + serializer.putQueryParam(fields, "pageToken", request.getPageToken()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListIdentityMappingsResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor< + ListIdentityMappingStoresRequest, ListIdentityMappingStoresResponse> + listIdentityMappingStoresMethodDescriptor = + ApiMethodDescriptor + .newBuilder() + .setFullMethodName( + "google.cloud.discoveryengine.v1beta.IdentityMappingStoreService/ListIdentityMappingStores") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1beta/{parent=projects/*/locations/*}/identityMappingStores", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "pageSize", request.getPageSize()); + serializer.putQueryParam(fields, "pageToken", request.getPageToken()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListIdentityMappingStoresResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private final UnaryCallable + createIdentityMappingStoreCallable; + private final UnaryCallable + getIdentityMappingStoreCallable; + private final UnaryCallable + deleteIdentityMappingStoreCallable; + private final OperationCallable< + DeleteIdentityMappingStoreRequest, Empty, DeleteIdentityMappingStoreMetadata> + deleteIdentityMappingStoreOperationCallable; + private final UnaryCallable + importIdentityMappingsCallable; + private final OperationCallable< + ImportIdentityMappingsRequest, + ImportIdentityMappingsResponse, + IdentityMappingEntryOperationMetadata> + importIdentityMappingsOperationCallable; + private final UnaryCallable + purgeIdentityMappingsCallable; + private final OperationCallable< + PurgeIdentityMappingsRequest, Empty, IdentityMappingEntryOperationMetadata> + purgeIdentityMappingsOperationCallable; + private final UnaryCallable + listIdentityMappingsCallable; + private final UnaryCallable + listIdentityMappingsPagedCallable; + private final UnaryCallable + listIdentityMappingStoresCallable; + private final UnaryCallable< + ListIdentityMappingStoresRequest, ListIdentityMappingStoresPagedResponse> + listIdentityMappingStoresPagedCallable; + + private final BackgroundResource backgroundResources; + private final HttpJsonOperationsStub httpJsonOperationsStub; + private final HttpJsonStubCallableFactory callableFactory; + + public static final HttpJsonIdentityMappingStoreServiceStub create( + IdentityMappingStoreServiceStubSettings settings) throws IOException { + return new HttpJsonIdentityMappingStoreServiceStub(settings, ClientContext.create(settings)); + } + + public static final HttpJsonIdentityMappingStoreServiceStub create(ClientContext clientContext) + throws IOException { + return new HttpJsonIdentityMappingStoreServiceStub( + IdentityMappingStoreServiceStubSettings.newHttpJsonBuilder().build(), clientContext); + } + + public static final HttpJsonIdentityMappingStoreServiceStub create( + ClientContext clientContext, HttpJsonStubCallableFactory callableFactory) throws IOException { + return new HttpJsonIdentityMappingStoreServiceStub( + IdentityMappingStoreServiceStubSettings.newHttpJsonBuilder().build(), + clientContext, + callableFactory); + } + + /** + * Constructs an instance of HttpJsonIdentityMappingStoreServiceStub, 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 HttpJsonIdentityMappingStoreServiceStub( + IdentityMappingStoreServiceStubSettings settings, ClientContext clientContext) + throws IOException { + this(settings, clientContext, new HttpJsonIdentityMappingStoreServiceCallableFactory()); + } + + /** + * Constructs an instance of HttpJsonIdentityMappingStoreServiceStub, 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 HttpJsonIdentityMappingStoreServiceStub( + IdentityMappingStoreServiceStubSettings settings, + ClientContext clientContext, + HttpJsonStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.httpJsonOperationsStub = + HttpJsonOperationsStub.create( + clientContext, + callableFactory, + typeRegistry, + ImmutableMap.builder() + .put( + "google.longrunning.Operations.CancelOperation", + HttpRule.newBuilder() + .setPost( + "/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*/operations/*}:cancel") + .addAdditionalBindings( + HttpRule.newBuilder() + .setPost( + "/v1beta/{name=projects/*/locations/*/dataStores/*/branches/*/operations/*}:cancel") + .build()) + .build()) + .put( + "google.longrunning.Operations.GetOperation", + HttpRule.newBuilder() + .setGet( + "/v1beta/{name=projects/*/locations/*/collections/*/dataConnector/operations/*}") + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*/operations/*}") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/models/*/operations/*}") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/operations/*}") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/schemas/*/operations/*}") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/operations/*}") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/targetSites/operations/*}") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1beta/{name=projects/*/locations/*/collections/*/engines/*/assistants/*/agents/*/operations/*}") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1beta/{name=projects/*/locations/*/collections/*/engines/*/operations/*}") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1beta/{name=projects/*/locations/*/collections/*/operations/*}") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1beta/{name=projects/*/locations/*/dataStores/*/branches/*/operations/*}") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1beta/{name=projects/*/locations/*/dataStores/*/models/*/operations/*}") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1beta/{name=projects/*/locations/*/dataStores/*/operations/*}") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1beta/{name=projects/*/locations/*/evaluations/*/operations/*}") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1beta/{name=projects/*/locations/*/identityMappingStores/*/operations/*}") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet("/v1beta/{name=projects/*/locations/*/operations/*}") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1beta/{name=projects/*/locations/*/sampleQuerySets/*/operations/*}") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet("/v1beta/{name=projects/*/operations/*}") + .build()) + .build()) + .put( + "google.longrunning.Operations.ListOperations", + HttpRule.newBuilder() + .setGet( + "/v1beta/{name=projects/*/locations/*/collections/*/dataConnector}/operations") + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*}/operations") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/models/*}/operations") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/schemas/*}/operations") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/targetSites}/operations") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine}/operations") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*}/operations") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1beta/{name=projects/*/locations/*/collections/*/engines/*}/operations") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1beta/{name=projects/*/locations/*/collections/*}/operations") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1beta/{name=projects/*/locations/*/dataStores/*/branches/*}/operations") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1beta/{name=projects/*/locations/*/dataStores/*/models/*}/operations") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1beta/{name=projects/*/locations/*/dataStores/*}/operations") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1beta/{name=projects/*/locations/*/identityMappingStores/*}/operations") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet("/v1beta/{name=projects/*/locations/*}/operations") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet("/v1beta/{name=projects/*}/operations") + .build()) + .build()) + .build()); + + HttpJsonCallSettings + createIdentityMappingStoreTransportSettings = + HttpJsonCallSettings + .newBuilder() + .setMethodDescriptor(createIdentityMappingStoreMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getCmekConfigName()) + .build(); + HttpJsonCallSettings + getIdentityMappingStoreTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getIdentityMappingStoreMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getName()) + .build(); + HttpJsonCallSettings + deleteIdentityMappingStoreTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(deleteIdentityMappingStoreMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getName()) + .build(); + HttpJsonCallSettings + importIdentityMappingsTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(importIdentityMappingsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add( + "identity_mapping_store", + String.valueOf(request.getIdentityMappingStore())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getIdentityMappingStore()) + .build(); + HttpJsonCallSettings + purgeIdentityMappingsTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(purgeIdentityMappingsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add( + "identity_mapping_store", + String.valueOf(request.getIdentityMappingStore())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getIdentityMappingStore()) + .build(); + HttpJsonCallSettings + listIdentityMappingsTransportSettings = + HttpJsonCallSettings + .newBuilder() + .setMethodDescriptor(listIdentityMappingsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add( + "identity_mapping_store", + String.valueOf(request.getIdentityMappingStore())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getIdentityMappingStore()) + .build(); + HttpJsonCallSettings + listIdentityMappingStoresTransportSettings = + HttpJsonCallSettings + .newBuilder() + .setMethodDescriptor(listIdentityMappingStoresMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .build(); + + this.createIdentityMappingStoreCallable = + callableFactory.createUnaryCallable( + createIdentityMappingStoreTransportSettings, + settings.createIdentityMappingStoreSettings(), + clientContext); + this.getIdentityMappingStoreCallable = + callableFactory.createUnaryCallable( + getIdentityMappingStoreTransportSettings, + settings.getIdentityMappingStoreSettings(), + clientContext); + this.deleteIdentityMappingStoreCallable = + callableFactory.createUnaryCallable( + deleteIdentityMappingStoreTransportSettings, + settings.deleteIdentityMappingStoreSettings(), + clientContext); + this.deleteIdentityMappingStoreOperationCallable = + callableFactory.createOperationCallable( + deleteIdentityMappingStoreTransportSettings, + settings.deleteIdentityMappingStoreOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.importIdentityMappingsCallable = + callableFactory.createUnaryCallable( + importIdentityMappingsTransportSettings, + settings.importIdentityMappingsSettings(), + clientContext); + this.importIdentityMappingsOperationCallable = + callableFactory.createOperationCallable( + importIdentityMappingsTransportSettings, + settings.importIdentityMappingsOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.purgeIdentityMappingsCallable = + callableFactory.createUnaryCallable( + purgeIdentityMappingsTransportSettings, + settings.purgeIdentityMappingsSettings(), + clientContext); + this.purgeIdentityMappingsOperationCallable = + callableFactory.createOperationCallable( + purgeIdentityMappingsTransportSettings, + settings.purgeIdentityMappingsOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.listIdentityMappingsCallable = + callableFactory.createUnaryCallable( + listIdentityMappingsTransportSettings, + settings.listIdentityMappingsSettings(), + clientContext); + this.listIdentityMappingsPagedCallable = + callableFactory.createPagedCallable( + listIdentityMappingsTransportSettings, + settings.listIdentityMappingsSettings(), + clientContext); + this.listIdentityMappingStoresCallable = + callableFactory.createUnaryCallable( + listIdentityMappingStoresTransportSettings, + settings.listIdentityMappingStoresSettings(), + clientContext); + this.listIdentityMappingStoresPagedCallable = + callableFactory.createPagedCallable( + listIdentityMappingStoresTransportSettings, + settings.listIdentityMappingStoresSettings(), + clientContext); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + @InternalApi + public static List getMethodDescriptors() { + List methodDescriptors = new ArrayList<>(); + methodDescriptors.add(createIdentityMappingStoreMethodDescriptor); + methodDescriptors.add(getIdentityMappingStoreMethodDescriptor); + methodDescriptors.add(deleteIdentityMappingStoreMethodDescriptor); + methodDescriptors.add(importIdentityMappingsMethodDescriptor); + methodDescriptors.add(purgeIdentityMappingsMethodDescriptor); + methodDescriptors.add(listIdentityMappingsMethodDescriptor); + methodDescriptors.add(listIdentityMappingStoresMethodDescriptor); + return methodDescriptors; + } + + public HttpJsonOperationsStub getHttpJsonOperationsStub() { + return httpJsonOperationsStub; + } + + @Override + public UnaryCallable + createIdentityMappingStoreCallable() { + return createIdentityMappingStoreCallable; + } + + @Override + public UnaryCallable + getIdentityMappingStoreCallable() { + return getIdentityMappingStoreCallable; + } + + @Override + public UnaryCallable + deleteIdentityMappingStoreCallable() { + return deleteIdentityMappingStoreCallable; + } + + @Override + public OperationCallable< + DeleteIdentityMappingStoreRequest, Empty, DeleteIdentityMappingStoreMetadata> + deleteIdentityMappingStoreOperationCallable() { + return deleteIdentityMappingStoreOperationCallable; + } + + @Override + public UnaryCallable importIdentityMappingsCallable() { + return importIdentityMappingsCallable; + } + + @Override + public OperationCallable< + ImportIdentityMappingsRequest, + ImportIdentityMappingsResponse, + IdentityMappingEntryOperationMetadata> + importIdentityMappingsOperationCallable() { + return importIdentityMappingsOperationCallable; + } + + @Override + public UnaryCallable purgeIdentityMappingsCallable() { + return purgeIdentityMappingsCallable; + } + + @Override + public OperationCallable< + PurgeIdentityMappingsRequest, Empty, IdentityMappingEntryOperationMetadata> + purgeIdentityMappingsOperationCallable() { + return purgeIdentityMappingsOperationCallable; + } + + @Override + public UnaryCallable + listIdentityMappingsCallable() { + return listIdentityMappingsCallable; + } + + @Override + public UnaryCallable + listIdentityMappingsPagedCallable() { + return listIdentityMappingsPagedCallable; + } + + @Override + public UnaryCallable + listIdentityMappingStoresCallable() { + return listIdentityMappingStoresCallable; + } + + @Override + public UnaryCallable + listIdentityMappingStoresPagedCallable() { + return listIdentityMappingStoresPagedCallable; + } + + @Override + public final void close() { + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } + } + + @Override + public void shutdown() { + backgroundResources.shutdown(); + } + + @Override + public boolean isShutdown() { + return backgroundResources.isShutdown(); + } + + @Override + public boolean isTerminated() { + return backgroundResources.isTerminated(); + } + + @Override + public void shutdownNow() { + backgroundResources.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return backgroundResources.awaitTermination(duration, unit); + } +} diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/HttpJsonLicenseConfigServiceCallableFactory.java b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/HttpJsonLicenseConfigServiceCallableFactory.java new file mode 100644 index 000000000000..682d9b52c95c --- /dev/null +++ b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/HttpJsonLicenseConfigServiceCallableFactory.java @@ -0,0 +1,103 @@ +/* + * 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.discoveryengine.v1beta.stub; + +import com.google.api.core.BetaApi; +import com.google.api.gax.httpjson.HttpJsonCallSettings; +import com.google.api.gax.httpjson.HttpJsonCallableFactory; +import com.google.api.gax.httpjson.HttpJsonOperationSnapshotCallable; +import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; +import com.google.api.gax.httpjson.longrunning.stub.OperationsStub; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.Operation; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * REST callable factory implementation for the LicenseConfigService service API. + * + *

            This class is for advanced usage. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class HttpJsonLicenseConfigServiceCallableFactory + implements HttpJsonStubCallableFactory { + + @Override + public UnaryCallable createUnaryCallable( + HttpJsonCallSettings httpJsonCallSettings, + UnaryCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createUnaryCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @Override + public + UnaryCallable createPagedCallable( + HttpJsonCallSettings httpJsonCallSettings, + PagedCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createPagedCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @Override + public UnaryCallable createBatchingCallable( + HttpJsonCallSettings httpJsonCallSettings, + BatchingCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createBatchingCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @Override + public + OperationCallable createOperationCallable( + HttpJsonCallSettings httpJsonCallSettings, + OperationCallSettings callSettings, + ClientContext clientContext, + OperationsStub operationsStub) { + UnaryCallable innerCallable = + HttpJsonCallableFactory.createBaseUnaryCallable( + httpJsonCallSettings, callSettings.getInitialCallSettings(), clientContext); + HttpJsonOperationSnapshotCallable initialCallable = + new HttpJsonOperationSnapshotCallable( + innerCallable, + httpJsonCallSettings.getMethodDescriptor().getOperationSnapshotFactory()); + return HttpJsonCallableFactory.createOperationCallable( + callSettings, clientContext, operationsStub.longRunningClient(), initialCallable); + } + + @Override + public + ServerStreamingCallable createServerStreamingCallable( + HttpJsonCallSettings httpJsonCallSettings, + ServerStreamingCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createServerStreamingCallable( + httpJsonCallSettings, callSettings, clientContext); + } +} diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/HttpJsonLicenseConfigServiceStub.java b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/HttpJsonLicenseConfigServiceStub.java new file mode 100644 index 000000000000..3968f1c7f691 --- /dev/null +++ b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/HttpJsonLicenseConfigServiceStub.java @@ -0,0 +1,580 @@ +/* + * 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.discoveryengine.v1beta.stub; + +import static com.google.cloud.discoveryengine.v1beta.LicenseConfigServiceClient.ListLicenseConfigsPagedResponse; + +import com.google.api.core.BetaApi; +import com.google.api.core.InternalApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.httpjson.ApiMethodDescriptor; +import com.google.api.gax.httpjson.HttpJsonCallSettings; +import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; +import com.google.api.gax.httpjson.ProtoMessageRequestFormatter; +import com.google.api.gax.httpjson.ProtoMessageResponseParser; +import com.google.api.gax.httpjson.ProtoRestSerializer; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.RequestParamsBuilder; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.discoveryengine.v1beta.CreateLicenseConfigRequest; +import com.google.cloud.discoveryengine.v1beta.DistributeLicenseConfigRequest; +import com.google.cloud.discoveryengine.v1beta.DistributeLicenseConfigResponse; +import com.google.cloud.discoveryengine.v1beta.GetLicenseConfigRequest; +import com.google.cloud.discoveryengine.v1beta.LicenseConfig; +import com.google.cloud.discoveryengine.v1beta.ListLicenseConfigsRequest; +import com.google.cloud.discoveryengine.v1beta.ListLicenseConfigsResponse; +import com.google.cloud.discoveryengine.v1beta.RetractLicenseConfigRequest; +import com.google.cloud.discoveryengine.v1beta.RetractLicenseConfigResponse; +import com.google.cloud.discoveryengine.v1beta.UpdateLicenseConfigRequest; +import com.google.protobuf.TypeRegistry; +import java.io.IOException; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * REST stub implementation for the LicenseConfigService service API. + * + *

            This class is for advanced usage and reflects the underlying API directly. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class HttpJsonLicenseConfigServiceStub extends LicenseConfigServiceStub { + private static final TypeRegistry typeRegistry = TypeRegistry.newBuilder().build(); + + private static final ApiMethodDescriptor + createLicenseConfigMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.discoveryengine.v1beta.LicenseConfigService/CreateLicenseConfig") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1beta/{parent=projects/*/locations/*}/licenseConfigs", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam( + fields, "licenseConfigId", request.getLicenseConfigId()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("licenseConfig", request.getLicenseConfig(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(LicenseConfig.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + updateLicenseConfigMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.discoveryengine.v1beta.LicenseConfigService/UpdateLicenseConfig") + .setHttpMethod("PATCH") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1beta/{licenseConfig.name=projects/*/locations/*/licenseConfigs/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam( + fields, "licenseConfig.name", request.getLicenseConfig().getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "updateMask", request.getUpdateMask()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("licenseConfig", request.getLicenseConfig(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(LicenseConfig.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + getLicenseConfigMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.discoveryengine.v1beta.LicenseConfigService/GetLicenseConfig") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1beta/{name=projects/*/locations/*/licenseConfigs/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(LicenseConfig.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + listLicenseConfigsMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.discoveryengine.v1beta.LicenseConfigService/ListLicenseConfigs") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1beta/{parent=projects/*/locations/*}/licenseConfigs", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "filter", request.getFilter()); + serializer.putQueryParam(fields, "pageSize", request.getPageSize()); + serializer.putQueryParam(fields, "pageToken", request.getPageToken()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListLicenseConfigsResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor< + DistributeLicenseConfigRequest, DistributeLicenseConfigResponse> + distributeLicenseConfigMethodDescriptor = + ApiMethodDescriptor + .newBuilder() + .setFullMethodName( + "google.cloud.discoveryengine.v1beta.LicenseConfigService/DistributeLicenseConfig") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1beta/{billingAccountLicenseConfig=billingAccounts/*/billingAccountLicenseConfigs/*}:distributeLicenseConfig", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam( + fields, + "billingAccountLicenseConfig", + request.getBillingAccountLicenseConfig()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody( + "*", + request.toBuilder() + .clearBillingAccountLicenseConfig() + .build(), + true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(DistributeLicenseConfigResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor< + RetractLicenseConfigRequest, RetractLicenseConfigResponse> + retractLicenseConfigMethodDescriptor = + ApiMethodDescriptor + .newBuilder() + .setFullMethodName( + "google.cloud.discoveryengine.v1beta.LicenseConfigService/RetractLicenseConfig") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1beta/{billingAccountLicenseConfig=billingAccounts/*/billingAccountLicenseConfigs/*}:retractLicenseConfig", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam( + fields, + "billingAccountLicenseConfig", + request.getBillingAccountLicenseConfig()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody( + "*", + request.toBuilder() + .clearBillingAccountLicenseConfig() + .build(), + true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(RetractLicenseConfigResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private final UnaryCallable + createLicenseConfigCallable; + private final UnaryCallable + updateLicenseConfigCallable; + private final UnaryCallable getLicenseConfigCallable; + private final UnaryCallable + listLicenseConfigsCallable; + private final UnaryCallable + listLicenseConfigsPagedCallable; + private final UnaryCallable + distributeLicenseConfigCallable; + private final UnaryCallable + retractLicenseConfigCallable; + + private final BackgroundResource backgroundResources; + private final HttpJsonStubCallableFactory callableFactory; + + public static final HttpJsonLicenseConfigServiceStub create( + LicenseConfigServiceStubSettings settings) throws IOException { + return new HttpJsonLicenseConfigServiceStub(settings, ClientContext.create(settings)); + } + + public static final HttpJsonLicenseConfigServiceStub create(ClientContext clientContext) + throws IOException { + return new HttpJsonLicenseConfigServiceStub( + LicenseConfigServiceStubSettings.newHttpJsonBuilder().build(), clientContext); + } + + public static final HttpJsonLicenseConfigServiceStub create( + ClientContext clientContext, HttpJsonStubCallableFactory callableFactory) throws IOException { + return new HttpJsonLicenseConfigServiceStub( + LicenseConfigServiceStubSettings.newHttpJsonBuilder().build(), + clientContext, + callableFactory); + } + + /** + * Constructs an instance of HttpJsonLicenseConfigServiceStub, 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 HttpJsonLicenseConfigServiceStub( + LicenseConfigServiceStubSettings settings, ClientContext clientContext) throws IOException { + this(settings, clientContext, new HttpJsonLicenseConfigServiceCallableFactory()); + } + + /** + * Constructs an instance of HttpJsonLicenseConfigServiceStub, 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 HttpJsonLicenseConfigServiceStub( + LicenseConfigServiceStubSettings settings, + ClientContext clientContext, + HttpJsonStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + + HttpJsonCallSettings + createLicenseConfigTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(createLicenseConfigMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .build(); + HttpJsonCallSettings + updateLicenseConfigTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(updateLicenseConfigMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add( + "license_config.name", + String.valueOf(request.getLicenseConfig().getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings getLicenseConfigTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getLicenseConfigMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getName()) + .build(); + HttpJsonCallSettings + listLicenseConfigsTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(listLicenseConfigsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .build(); + HttpJsonCallSettings + distributeLicenseConfigTransportSettings = + HttpJsonCallSettings + .newBuilder() + .setMethodDescriptor(distributeLicenseConfigMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add( + "billing_account_license_config", + String.valueOf(request.getBillingAccountLicenseConfig())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getBillingAccountLicenseConfig()) + .build(); + HttpJsonCallSettings + retractLicenseConfigTransportSettings = + HttpJsonCallSettings + .newBuilder() + .setMethodDescriptor(retractLicenseConfigMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add( + "billing_account_license_config", + String.valueOf(request.getBillingAccountLicenseConfig())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getBillingAccountLicenseConfig()) + .build(); + + this.createLicenseConfigCallable = + callableFactory.createUnaryCallable( + createLicenseConfigTransportSettings, + settings.createLicenseConfigSettings(), + clientContext); + this.updateLicenseConfigCallable = + callableFactory.createUnaryCallable( + updateLicenseConfigTransportSettings, + settings.updateLicenseConfigSettings(), + clientContext); + this.getLicenseConfigCallable = + callableFactory.createUnaryCallable( + getLicenseConfigTransportSettings, settings.getLicenseConfigSettings(), clientContext); + this.listLicenseConfigsCallable = + callableFactory.createUnaryCallable( + listLicenseConfigsTransportSettings, + settings.listLicenseConfigsSettings(), + clientContext); + this.listLicenseConfigsPagedCallable = + callableFactory.createPagedCallable( + listLicenseConfigsTransportSettings, + settings.listLicenseConfigsSettings(), + clientContext); + this.distributeLicenseConfigCallable = + callableFactory.createUnaryCallable( + distributeLicenseConfigTransportSettings, + settings.distributeLicenseConfigSettings(), + clientContext); + this.retractLicenseConfigCallable = + callableFactory.createUnaryCallable( + retractLicenseConfigTransportSettings, + settings.retractLicenseConfigSettings(), + clientContext); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + @InternalApi + public static List getMethodDescriptors() { + List methodDescriptors = new ArrayList<>(); + methodDescriptors.add(createLicenseConfigMethodDescriptor); + methodDescriptors.add(updateLicenseConfigMethodDescriptor); + methodDescriptors.add(getLicenseConfigMethodDescriptor); + methodDescriptors.add(listLicenseConfigsMethodDescriptor); + methodDescriptors.add(distributeLicenseConfigMethodDescriptor); + methodDescriptors.add(retractLicenseConfigMethodDescriptor); + return methodDescriptors; + } + + @Override + public UnaryCallable createLicenseConfigCallable() { + return createLicenseConfigCallable; + } + + @Override + public UnaryCallable updateLicenseConfigCallable() { + return updateLicenseConfigCallable; + } + + @Override + public UnaryCallable getLicenseConfigCallable() { + return getLicenseConfigCallable; + } + + @Override + public UnaryCallable + listLicenseConfigsCallable() { + return listLicenseConfigsCallable; + } + + @Override + public UnaryCallable + listLicenseConfigsPagedCallable() { + return listLicenseConfigsPagedCallable; + } + + @Override + public UnaryCallable + distributeLicenseConfigCallable() { + return distributeLicenseConfigCallable; + } + + @Override + public UnaryCallable + retractLicenseConfigCallable() { + return retractLicenseConfigCallable; + } + + @Override + public final void close() { + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } + } + + @Override + public void shutdown() { + backgroundResources.shutdown(); + } + + @Override + public boolean isShutdown() { + return backgroundResources.isShutdown(); + } + + @Override + public boolean isTerminated() { + return backgroundResources.isTerminated(); + } + + @Override + public void shutdownNow() { + backgroundResources.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return backgroundResources.awaitTermination(duration, unit); + } +} diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/HttpJsonProjectServiceStub.java b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/HttpJsonProjectServiceStub.java index e861171a3593..6b1440e77d30 100644 --- a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/HttpJsonProjectServiceStub.java +++ b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/HttpJsonProjectServiceStub.java @@ -201,6 +201,11 @@ protected HttpJsonProjectServiceStub( .setGet( "/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/targetSites/operations/*}") .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1beta/{name=projects/*/locations/*/collections/*/engines/*/assistants/*/agents/*/operations/*}") + .build()) .addAdditionalBindings( HttpRule.newBuilder() .setGet( @@ -231,6 +236,11 @@ protected HttpJsonProjectServiceStub( .setGet( "/v1beta/{name=projects/*/locations/*/evaluations/*/operations/*}") .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1beta/{name=projects/*/locations/*/identityMappingStores/*/operations/*}") + .build()) .addAdditionalBindings( HttpRule.newBuilder() .setGet("/v1beta/{name=projects/*/locations/*/operations/*}") @@ -305,6 +315,11 @@ protected HttpJsonProjectServiceStub( .setGet( "/v1beta/{name=projects/*/locations/*/dataStores/*}/operations") .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1beta/{name=projects/*/locations/*/identityMappingStores/*}/operations") + .build()) .addAdditionalBindings( HttpRule.newBuilder() .setGet("/v1beta/{name=projects/*/locations/*}/operations") diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/HttpJsonSampleQueryServiceStub.java b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/HttpJsonSampleQueryServiceStub.java index 02665bfa8461..f0edd903b8db 100644 --- a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/HttpJsonSampleQueryServiceStub.java +++ b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/HttpJsonSampleQueryServiceStub.java @@ -409,6 +409,11 @@ protected HttpJsonSampleQueryServiceStub( .setGet( "/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/targetSites/operations/*}") .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1beta/{name=projects/*/locations/*/collections/*/engines/*/assistants/*/agents/*/operations/*}") + .build()) .addAdditionalBindings( HttpRule.newBuilder() .setGet( @@ -439,6 +444,11 @@ protected HttpJsonSampleQueryServiceStub( .setGet( "/v1beta/{name=projects/*/locations/*/evaluations/*/operations/*}") .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1beta/{name=projects/*/locations/*/identityMappingStores/*/operations/*}") + .build()) .addAdditionalBindings( HttpRule.newBuilder() .setGet("/v1beta/{name=projects/*/locations/*/operations/*}") @@ -513,6 +523,11 @@ protected HttpJsonSampleQueryServiceStub( .setGet( "/v1beta/{name=projects/*/locations/*/dataStores/*}/operations") .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1beta/{name=projects/*/locations/*/identityMappingStores/*}/operations") + .build()) .addAdditionalBindings( HttpRule.newBuilder() .setGet("/v1beta/{name=projects/*/locations/*}/operations") diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/HttpJsonSchemaServiceStub.java b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/HttpJsonSchemaServiceStub.java index 136dafdc126c..a83160c32223 100644 --- a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/HttpJsonSchemaServiceStub.java +++ b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/HttpJsonSchemaServiceStub.java @@ -383,6 +383,11 @@ protected HttpJsonSchemaServiceStub( .setGet( "/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/targetSites/operations/*}") .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1beta/{name=projects/*/locations/*/collections/*/engines/*/assistants/*/agents/*/operations/*}") + .build()) .addAdditionalBindings( HttpRule.newBuilder() .setGet( @@ -413,6 +418,11 @@ protected HttpJsonSchemaServiceStub( .setGet( "/v1beta/{name=projects/*/locations/*/evaluations/*/operations/*}") .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1beta/{name=projects/*/locations/*/identityMappingStores/*/operations/*}") + .build()) .addAdditionalBindings( HttpRule.newBuilder() .setGet("/v1beta/{name=projects/*/locations/*/operations/*}") @@ -487,6 +497,11 @@ protected HttpJsonSchemaServiceStub( .setGet( "/v1beta/{name=projects/*/locations/*/dataStores/*}/operations") .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1beta/{name=projects/*/locations/*/identityMappingStores/*}/operations") + .build()) .addAdditionalBindings( HttpRule.newBuilder() .setGet("/v1beta/{name=projects/*/locations/*}/operations") diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/HttpJsonSearchTuningServiceStub.java b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/HttpJsonSearchTuningServiceStub.java index 302f1f330995..68153bc87303 100644 --- a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/HttpJsonSearchTuningServiceStub.java +++ b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/HttpJsonSearchTuningServiceStub.java @@ -243,6 +243,11 @@ protected HttpJsonSearchTuningServiceStub( .setGet( "/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/targetSites/operations/*}") .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1beta/{name=projects/*/locations/*/collections/*/engines/*/assistants/*/agents/*/operations/*}") + .build()) .addAdditionalBindings( HttpRule.newBuilder() .setGet( @@ -273,6 +278,11 @@ protected HttpJsonSearchTuningServiceStub( .setGet( "/v1beta/{name=projects/*/locations/*/evaluations/*/operations/*}") .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1beta/{name=projects/*/locations/*/identityMappingStores/*/operations/*}") + .build()) .addAdditionalBindings( HttpRule.newBuilder() .setGet("/v1beta/{name=projects/*/locations/*/operations/*}") @@ -347,6 +357,11 @@ protected HttpJsonSearchTuningServiceStub( .setGet( "/v1beta/{name=projects/*/locations/*/dataStores/*}/operations") .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1beta/{name=projects/*/locations/*/identityMappingStores/*}/operations") + .build()) .addAdditionalBindings( HttpRule.newBuilder() .setGet("/v1beta/{name=projects/*/locations/*}/operations") diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/HttpJsonServingConfigServiceStub.java b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/HttpJsonServingConfigServiceStub.java index 35e5813a1261..48f64d4efc89 100644 --- a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/HttpJsonServingConfigServiceStub.java +++ b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/HttpJsonServingConfigServiceStub.java @@ -31,11 +31,14 @@ import com.google.api.gax.rpc.ClientContext; import com.google.api.gax.rpc.RequestParamsBuilder; import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.discoveryengine.v1beta.CreateServingConfigRequest; +import com.google.cloud.discoveryengine.v1beta.DeleteServingConfigRequest; import com.google.cloud.discoveryengine.v1beta.GetServingConfigRequest; import com.google.cloud.discoveryengine.v1beta.ListServingConfigsRequest; import com.google.cloud.discoveryengine.v1beta.ListServingConfigsResponse; import com.google.cloud.discoveryengine.v1beta.ServingConfig; import com.google.cloud.discoveryengine.v1beta.UpdateServingConfigRequest; +import com.google.protobuf.Empty; import com.google.protobuf.TypeRegistry; import java.io.IOException; import java.util.ArrayList; @@ -56,6 +59,87 @@ public class HttpJsonServingConfigServiceStub extends ServingConfigServiceStub { private static final TypeRegistry typeRegistry = TypeRegistry.newBuilder().build(); + private static final ApiMethodDescriptor + createServingConfigMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.discoveryengine.v1beta.ServingConfigService/CreateServingConfig") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1beta/{parent=projects/*/locations/*/dataStores/*}/servingConfigs", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setAdditionalPaths( + "/v1beta/{parent=projects/*/locations/*/collections/*/dataStores/*}/servingConfigs", + "/v1beta/{parent=projects/*/locations/*/collections/*/engines/*}/servingConfigs") + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam( + fields, "servingConfigId", request.getServingConfigId()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("servingConfig", request.getServingConfig(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ServingConfig.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + deleteServingConfigMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.discoveryengine.v1beta.ServingConfigService/DeleteServingConfig") + .setHttpMethod("DELETE") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1beta/{name=projects/*/locations/*/dataStores/*/servingConfigs/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setAdditionalPaths( + "/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/servingConfigs/*}", + "/v1beta/{name=projects/*/locations/*/collections/*/engines/*/servingConfigs/*}") + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Empty.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + private static final ApiMethodDescriptor updateServingConfigMethodDescriptor = ApiMethodDescriptor.newBuilder() @@ -177,6 +261,9 @@ public class HttpJsonServingConfigServiceStub extends ServingConfigServiceStub { .build()) .build(); + private final UnaryCallable + createServingConfigCallable; + private final UnaryCallable deleteServingConfigCallable; private final UnaryCallable updateServingConfigCallable; private final UnaryCallable getServingConfigCallable; @@ -229,6 +316,31 @@ protected HttpJsonServingConfigServiceStub( throws IOException { this.callableFactory = callableFactory; + HttpJsonCallSettings + createServingConfigTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(createServingConfigMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .build(); + HttpJsonCallSettings deleteServingConfigTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(deleteServingConfigMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getName()) + .build(); HttpJsonCallSettings updateServingConfigTransportSettings = HttpJsonCallSettings.newBuilder() @@ -269,6 +381,16 @@ protected HttpJsonServingConfigServiceStub( .setResourceNameExtractor(request -> request.getParent()) .build(); + this.createServingConfigCallable = + callableFactory.createUnaryCallable( + createServingConfigTransportSettings, + settings.createServingConfigSettings(), + clientContext); + this.deleteServingConfigCallable = + callableFactory.createUnaryCallable( + deleteServingConfigTransportSettings, + settings.deleteServingConfigSettings(), + clientContext); this.updateServingConfigCallable = callableFactory.createUnaryCallable( updateServingConfigTransportSettings, @@ -295,12 +417,24 @@ protected HttpJsonServingConfigServiceStub( @InternalApi public static List getMethodDescriptors() { List methodDescriptors = new ArrayList<>(); + methodDescriptors.add(createServingConfigMethodDescriptor); + methodDescriptors.add(deleteServingConfigMethodDescriptor); methodDescriptors.add(updateServingConfigMethodDescriptor); methodDescriptors.add(getServingConfigMethodDescriptor); methodDescriptors.add(listServingConfigsMethodDescriptor); return methodDescriptors; } + @Override + public UnaryCallable createServingConfigCallable() { + return createServingConfigCallable; + } + + @Override + public UnaryCallable deleteServingConfigCallable() { + return deleteServingConfigCallable; + } + @Override public UnaryCallable updateServingConfigCallable() { return updateServingConfigCallable; diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/HttpJsonSessionServiceStub.java b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/HttpJsonSessionServiceStub.java index 9435c9850314..e717cc92915b 100644 --- a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/HttpJsonSessionServiceStub.java +++ b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/HttpJsonSessionServiceStub.java @@ -84,6 +84,7 @@ public class HttpJsonSessionServiceStub extends SessionServiceStub { Map> fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "sessionId", request.getSessionId()); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/HttpJsonSiteSearchEngineServiceStub.java b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/HttpJsonSiteSearchEngineServiceStub.java index 6517c9978a14..32ef3238e8db 100644 --- a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/HttpJsonSiteSearchEngineServiceStub.java +++ b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/HttpJsonSiteSearchEngineServiceStub.java @@ -499,6 +499,8 @@ public class HttpJsonSiteSearchEngineServiceStub extends SiteSearchEngineService serializer.putPathParam(fields, "parent", request.getParent()); return fields; }) + .setAdditionalPaths( + "/v1beta/{parent=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine}/sitemaps:fetch") .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); @@ -899,6 +901,11 @@ protected HttpJsonSiteSearchEngineServiceStub( .setGet( "/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/targetSites/operations/*}") .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1beta/{name=projects/*/locations/*/collections/*/engines/*/assistants/*/agents/*/operations/*}") + .build()) .addAdditionalBindings( HttpRule.newBuilder() .setGet( @@ -929,6 +936,11 @@ protected HttpJsonSiteSearchEngineServiceStub( .setGet( "/v1beta/{name=projects/*/locations/*/evaluations/*/operations/*}") .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1beta/{name=projects/*/locations/*/identityMappingStores/*/operations/*}") + .build()) .addAdditionalBindings( HttpRule.newBuilder() .setGet("/v1beta/{name=projects/*/locations/*/operations/*}") @@ -1003,6 +1015,11 @@ protected HttpJsonSiteSearchEngineServiceStub( .setGet( "/v1beta/{name=projects/*/locations/*/dataStores/*}/operations") .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1beta/{name=projects/*/locations/*/identityMappingStores/*}/operations") + .build()) .addAdditionalBindings( HttpRule.newBuilder() .setGet("/v1beta/{name=projects/*/locations/*}/operations") diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/HttpJsonUserEventServiceStub.java b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/HttpJsonUserEventServiceStub.java index 11b0f71f1ea6..486f1ca296cc 100644 --- a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/HttpJsonUserEventServiceStub.java +++ b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/HttpJsonUserEventServiceStub.java @@ -220,7 +220,8 @@ public class HttpJsonUserEventServiceStub extends UserEventServiceStub { return fields; }) .setAdditionalPaths( - "/v1beta/{parent=projects/*/locations/*/collections/*/dataStores/*}/userEvents:import") + "/v1beta/{parent=projects/*/locations/*/collections/*/dataStores/*}/userEvents:import", + "/v1beta/{parent=projects/*/locations/*}/userEvents:import") .setQueryParamsExtractor( request -> { Map> fields = new HashMap<>(); @@ -349,6 +350,11 @@ protected HttpJsonUserEventServiceStub( .setGet( "/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/targetSites/operations/*}") .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1beta/{name=projects/*/locations/*/collections/*/engines/*/assistants/*/agents/*/operations/*}") + .build()) .addAdditionalBindings( HttpRule.newBuilder() .setGet( @@ -379,6 +385,11 @@ protected HttpJsonUserEventServiceStub( .setGet( "/v1beta/{name=projects/*/locations/*/evaluations/*/operations/*}") .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1beta/{name=projects/*/locations/*/identityMappingStores/*/operations/*}") + .build()) .addAdditionalBindings( HttpRule.newBuilder() .setGet("/v1beta/{name=projects/*/locations/*/operations/*}") @@ -453,6 +464,11 @@ protected HttpJsonUserEventServiceStub( .setGet( "/v1beta/{name=projects/*/locations/*/dataStores/*}/operations") .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1beta/{name=projects/*/locations/*/identityMappingStores/*}/operations") + .build()) .addAdditionalBindings( HttpRule.newBuilder() .setGet("/v1beta/{name=projects/*/locations/*}/operations") diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/HttpJsonUserLicenseServiceCallableFactory.java b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/HttpJsonUserLicenseServiceCallableFactory.java new file mode 100644 index 000000000000..3252c80377c7 --- /dev/null +++ b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/HttpJsonUserLicenseServiceCallableFactory.java @@ -0,0 +1,103 @@ +/* + * 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.discoveryengine.v1beta.stub; + +import com.google.api.core.BetaApi; +import com.google.api.gax.httpjson.HttpJsonCallSettings; +import com.google.api.gax.httpjson.HttpJsonCallableFactory; +import com.google.api.gax.httpjson.HttpJsonOperationSnapshotCallable; +import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; +import com.google.api.gax.httpjson.longrunning.stub.OperationsStub; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.Operation; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * REST callable factory implementation for the UserLicenseService service API. + * + *

            This class is for advanced usage. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class HttpJsonUserLicenseServiceCallableFactory + implements HttpJsonStubCallableFactory { + + @Override + public UnaryCallable createUnaryCallable( + HttpJsonCallSettings httpJsonCallSettings, + UnaryCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createUnaryCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @Override + public + UnaryCallable createPagedCallable( + HttpJsonCallSettings httpJsonCallSettings, + PagedCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createPagedCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @Override + public UnaryCallable createBatchingCallable( + HttpJsonCallSettings httpJsonCallSettings, + BatchingCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createBatchingCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @Override + public + OperationCallable createOperationCallable( + HttpJsonCallSettings httpJsonCallSettings, + OperationCallSettings callSettings, + ClientContext clientContext, + OperationsStub operationsStub) { + UnaryCallable innerCallable = + HttpJsonCallableFactory.createBaseUnaryCallable( + httpJsonCallSettings, callSettings.getInitialCallSettings(), clientContext); + HttpJsonOperationSnapshotCallable initialCallable = + new HttpJsonOperationSnapshotCallable( + innerCallable, + httpJsonCallSettings.getMethodDescriptor().getOperationSnapshotFactory()); + return HttpJsonCallableFactory.createOperationCallable( + callSettings, clientContext, operationsStub.longRunningClient(), initialCallable); + } + + @Override + public + ServerStreamingCallable createServerStreamingCallable( + HttpJsonCallSettings httpJsonCallSettings, + ServerStreamingCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createServerStreamingCallable( + httpJsonCallSettings, callSettings, clientContext); + } +} diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/HttpJsonUserLicenseServiceStub.java b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/HttpJsonUserLicenseServiceStub.java new file mode 100644 index 000000000000..283fb6f94982 --- /dev/null +++ b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/HttpJsonUserLicenseServiceStub.java @@ -0,0 +1,580 @@ +/* + * 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.discoveryengine.v1beta.stub; + +import static com.google.cloud.discoveryengine.v1beta.UserLicenseServiceClient.ListUserLicensesPagedResponse; + +import com.google.api.HttpRule; +import com.google.api.core.BetaApi; +import com.google.api.core.InternalApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.httpjson.ApiMethodDescriptor; +import com.google.api.gax.httpjson.HttpJsonCallSettings; +import com.google.api.gax.httpjson.HttpJsonOperationSnapshot; +import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; +import com.google.api.gax.httpjson.ProtoMessageRequestFormatter; +import com.google.api.gax.httpjson.ProtoMessageResponseParser; +import com.google.api.gax.httpjson.ProtoRestSerializer; +import com.google.api.gax.httpjson.longrunning.stub.HttpJsonOperationsStub; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.RequestParamsBuilder; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesMetadata; +import com.google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesRequest; +import com.google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesResponse; +import com.google.cloud.discoveryengine.v1beta.ListLicenseConfigsUsageStatsRequest; +import com.google.cloud.discoveryengine.v1beta.ListLicenseConfigsUsageStatsResponse; +import com.google.cloud.discoveryengine.v1beta.ListUserLicensesRequest; +import com.google.cloud.discoveryengine.v1beta.ListUserLicensesResponse; +import com.google.common.collect.ImmutableMap; +import com.google.longrunning.Operation; +import com.google.protobuf.TypeRegistry; +import java.io.IOException; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * REST stub implementation for the UserLicenseService service API. + * + *

            This class is for advanced usage and reflects the underlying API directly. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class HttpJsonUserLicenseServiceStub extends UserLicenseServiceStub { + private static final TypeRegistry typeRegistry = + TypeRegistry.newBuilder() + .add(BatchUpdateUserLicensesResponse.getDescriptor()) + .add(BatchUpdateUserLicensesMetadata.getDescriptor()) + .build(); + + private static final ApiMethodDescriptor + listUserLicensesMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.discoveryengine.v1beta.UserLicenseService/ListUserLicenses") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1beta/{parent=projects/*/locations/*/userStores/*}/userLicenses", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "filter", request.getFilter()); + serializer.putQueryParam(fields, "orderBy", request.getOrderBy()); + serializer.putQueryParam(fields, "pageSize", request.getPageSize()); + serializer.putQueryParam(fields, "pageToken", request.getPageToken()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListUserLicensesResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor< + ListLicenseConfigsUsageStatsRequest, ListLicenseConfigsUsageStatsResponse> + listLicenseConfigsUsageStatsMethodDescriptor = + ApiMethodDescriptor + . + newBuilder() + .setFullMethodName( + "google.cloud.discoveryengine.v1beta.UserLicenseService/ListLicenseConfigsUsageStats") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1beta/{parent=projects/*/locations/*/userStores/*}/licenseConfigsUsageStats", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListLicenseConfigsUsageStatsResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + batchUpdateUserLicensesMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.discoveryengine.v1beta.UserLicenseService/BatchUpdateUserLicenses") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1beta/{parent=projects/*/locations/*/userStores/*}:batchUpdateUserLicenses", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearParent().build(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (BatchUpdateUserLicensesRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private final UnaryCallable + listUserLicensesCallable; + private final UnaryCallable + listUserLicensesPagedCallable; + private final UnaryCallable< + ListLicenseConfigsUsageStatsRequest, ListLicenseConfigsUsageStatsResponse> + listLicenseConfigsUsageStatsCallable; + private final UnaryCallable + batchUpdateUserLicensesCallable; + private final OperationCallable< + BatchUpdateUserLicensesRequest, + BatchUpdateUserLicensesResponse, + BatchUpdateUserLicensesMetadata> + batchUpdateUserLicensesOperationCallable; + + private final BackgroundResource backgroundResources; + private final HttpJsonOperationsStub httpJsonOperationsStub; + private final HttpJsonStubCallableFactory callableFactory; + + public static final HttpJsonUserLicenseServiceStub create(UserLicenseServiceStubSettings settings) + throws IOException { + return new HttpJsonUserLicenseServiceStub(settings, ClientContext.create(settings)); + } + + public static final HttpJsonUserLicenseServiceStub create(ClientContext clientContext) + throws IOException { + return new HttpJsonUserLicenseServiceStub( + UserLicenseServiceStubSettings.newHttpJsonBuilder().build(), clientContext); + } + + public static final HttpJsonUserLicenseServiceStub create( + ClientContext clientContext, HttpJsonStubCallableFactory callableFactory) throws IOException { + return new HttpJsonUserLicenseServiceStub( + UserLicenseServiceStubSettings.newHttpJsonBuilder().build(), + clientContext, + callableFactory); + } + + /** + * Constructs an instance of HttpJsonUserLicenseServiceStub, 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 HttpJsonUserLicenseServiceStub( + UserLicenseServiceStubSettings settings, ClientContext clientContext) throws IOException { + this(settings, clientContext, new HttpJsonUserLicenseServiceCallableFactory()); + } + + /** + * Constructs an instance of HttpJsonUserLicenseServiceStub, 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 HttpJsonUserLicenseServiceStub( + UserLicenseServiceStubSettings settings, + ClientContext clientContext, + HttpJsonStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.httpJsonOperationsStub = + HttpJsonOperationsStub.create( + clientContext, + callableFactory, + typeRegistry, + ImmutableMap.builder() + .put( + "google.longrunning.Operations.CancelOperation", + HttpRule.newBuilder() + .setPost( + "/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*/operations/*}:cancel") + .addAdditionalBindings( + HttpRule.newBuilder() + .setPost( + "/v1beta/{name=projects/*/locations/*/dataStores/*/branches/*/operations/*}:cancel") + .build()) + .build()) + .put( + "google.longrunning.Operations.GetOperation", + HttpRule.newBuilder() + .setGet( + "/v1beta/{name=projects/*/locations/*/collections/*/dataConnector/operations/*}") + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*/operations/*}") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/models/*/operations/*}") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/operations/*}") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/schemas/*/operations/*}") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/operations/*}") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/targetSites/operations/*}") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1beta/{name=projects/*/locations/*/collections/*/engines/*/assistants/*/agents/*/operations/*}") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1beta/{name=projects/*/locations/*/collections/*/engines/*/operations/*}") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1beta/{name=projects/*/locations/*/collections/*/operations/*}") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1beta/{name=projects/*/locations/*/dataStores/*/branches/*/operations/*}") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1beta/{name=projects/*/locations/*/dataStores/*/models/*/operations/*}") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1beta/{name=projects/*/locations/*/dataStores/*/operations/*}") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1beta/{name=projects/*/locations/*/evaluations/*/operations/*}") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1beta/{name=projects/*/locations/*/identityMappingStores/*/operations/*}") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet("/v1beta/{name=projects/*/locations/*/operations/*}") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1beta/{name=projects/*/locations/*/sampleQuerySets/*/operations/*}") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet("/v1beta/{name=projects/*/operations/*}") + .build()) + .build()) + .put( + "google.longrunning.Operations.ListOperations", + HttpRule.newBuilder() + .setGet( + "/v1beta/{name=projects/*/locations/*/collections/*/dataConnector}/operations") + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*}/operations") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/models/*}/operations") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/schemas/*}/operations") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/targetSites}/operations") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine}/operations") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*}/operations") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1beta/{name=projects/*/locations/*/collections/*/engines/*}/operations") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1beta/{name=projects/*/locations/*/collections/*}/operations") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1beta/{name=projects/*/locations/*/dataStores/*/branches/*}/operations") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1beta/{name=projects/*/locations/*/dataStores/*/models/*}/operations") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1beta/{name=projects/*/locations/*/dataStores/*}/operations") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1beta/{name=projects/*/locations/*/identityMappingStores/*}/operations") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet("/v1beta/{name=projects/*/locations/*}/operations") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet("/v1beta/{name=projects/*}/operations") + .build()) + .build()) + .build()); + + HttpJsonCallSettings + listUserLicensesTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(listUserLicensesMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .build(); + HttpJsonCallSettings + listLicenseConfigsUsageStatsTransportSettings = + HttpJsonCallSettings + . + newBuilder() + .setMethodDescriptor(listLicenseConfigsUsageStatsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .build(); + HttpJsonCallSettings + batchUpdateUserLicensesTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(batchUpdateUserLicensesMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .build(); + + this.listUserLicensesCallable = + callableFactory.createUnaryCallable( + listUserLicensesTransportSettings, settings.listUserLicensesSettings(), clientContext); + this.listUserLicensesPagedCallable = + callableFactory.createPagedCallable( + listUserLicensesTransportSettings, settings.listUserLicensesSettings(), clientContext); + this.listLicenseConfigsUsageStatsCallable = + callableFactory.createUnaryCallable( + listLicenseConfigsUsageStatsTransportSettings, + settings.listLicenseConfigsUsageStatsSettings(), + clientContext); + this.batchUpdateUserLicensesCallable = + callableFactory.createUnaryCallable( + batchUpdateUserLicensesTransportSettings, + settings.batchUpdateUserLicensesSettings(), + clientContext); + this.batchUpdateUserLicensesOperationCallable = + callableFactory.createOperationCallable( + batchUpdateUserLicensesTransportSettings, + settings.batchUpdateUserLicensesOperationSettings(), + clientContext, + httpJsonOperationsStub); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + @InternalApi + public static List getMethodDescriptors() { + List methodDescriptors = new ArrayList<>(); + methodDescriptors.add(listUserLicensesMethodDescriptor); + methodDescriptors.add(listLicenseConfigsUsageStatsMethodDescriptor); + methodDescriptors.add(batchUpdateUserLicensesMethodDescriptor); + return methodDescriptors; + } + + public HttpJsonOperationsStub getHttpJsonOperationsStub() { + return httpJsonOperationsStub; + } + + @Override + public UnaryCallable + listUserLicensesCallable() { + return listUserLicensesCallable; + } + + @Override + public UnaryCallable + listUserLicensesPagedCallable() { + return listUserLicensesPagedCallable; + } + + @Override + public UnaryCallable + listLicenseConfigsUsageStatsCallable() { + return listLicenseConfigsUsageStatsCallable; + } + + @Override + public UnaryCallable + batchUpdateUserLicensesCallable() { + return batchUpdateUserLicensesCallable; + } + + @Override + public OperationCallable< + BatchUpdateUserLicensesRequest, + BatchUpdateUserLicensesResponse, + BatchUpdateUserLicensesMetadata> + batchUpdateUserLicensesOperationCallable() { + return batchUpdateUserLicensesOperationCallable; + } + + @Override + public final void close() { + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } + } + + @Override + public void shutdown() { + backgroundResources.shutdown(); + } + + @Override + public boolean isShutdown() { + return backgroundResources.isShutdown(); + } + + @Override + public boolean isTerminated() { + return backgroundResources.isTerminated(); + } + + @Override + public void shutdownNow() { + backgroundResources.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return backgroundResources.awaitTermination(duration, unit); + } +} diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/HttpJsonUserStoreServiceCallableFactory.java b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/HttpJsonUserStoreServiceCallableFactory.java new file mode 100644 index 000000000000..39ba51767ae8 --- /dev/null +++ b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/HttpJsonUserStoreServiceCallableFactory.java @@ -0,0 +1,103 @@ +/* + * 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.discoveryengine.v1beta.stub; + +import com.google.api.core.BetaApi; +import com.google.api.gax.httpjson.HttpJsonCallSettings; +import com.google.api.gax.httpjson.HttpJsonCallableFactory; +import com.google.api.gax.httpjson.HttpJsonOperationSnapshotCallable; +import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; +import com.google.api.gax.httpjson.longrunning.stub.OperationsStub; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.Operation; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * REST callable factory implementation for the UserStoreService service API. + * + *

            This class is for advanced usage. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class HttpJsonUserStoreServiceCallableFactory + implements HttpJsonStubCallableFactory { + + @Override + public UnaryCallable createUnaryCallable( + HttpJsonCallSettings httpJsonCallSettings, + UnaryCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createUnaryCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @Override + public + UnaryCallable createPagedCallable( + HttpJsonCallSettings httpJsonCallSettings, + PagedCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createPagedCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @Override + public UnaryCallable createBatchingCallable( + HttpJsonCallSettings httpJsonCallSettings, + BatchingCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createBatchingCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @Override + public + OperationCallable createOperationCallable( + HttpJsonCallSettings httpJsonCallSettings, + OperationCallSettings callSettings, + ClientContext clientContext, + OperationsStub operationsStub) { + UnaryCallable innerCallable = + HttpJsonCallableFactory.createBaseUnaryCallable( + httpJsonCallSettings, callSettings.getInitialCallSettings(), clientContext); + HttpJsonOperationSnapshotCallable initialCallable = + new HttpJsonOperationSnapshotCallable( + innerCallable, + httpJsonCallSettings.getMethodDescriptor().getOperationSnapshotFactory()); + return HttpJsonCallableFactory.createOperationCallable( + callSettings, clientContext, operationsStub.longRunningClient(), initialCallable); + } + + @Override + public + ServerStreamingCallable createServerStreamingCallable( + HttpJsonCallSettings httpJsonCallSettings, + ServerStreamingCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createServerStreamingCallable( + httpJsonCallSettings, callSettings, clientContext); + } +} diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/HttpJsonUserStoreServiceStub.java b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/HttpJsonUserStoreServiceStub.java new file mode 100644 index 000000000000..420e79fc202e --- /dev/null +++ b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/HttpJsonUserStoreServiceStub.java @@ -0,0 +1,263 @@ +/* + * 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.discoveryengine.v1beta.stub; + +import com.google.api.core.BetaApi; +import com.google.api.core.InternalApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.httpjson.ApiMethodDescriptor; +import com.google.api.gax.httpjson.HttpJsonCallSettings; +import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; +import com.google.api.gax.httpjson.ProtoMessageRequestFormatter; +import com.google.api.gax.httpjson.ProtoMessageResponseParser; +import com.google.api.gax.httpjson.ProtoRestSerializer; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.RequestParamsBuilder; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.discoveryengine.v1beta.GetUserStoreRequest; +import com.google.cloud.discoveryengine.v1beta.UpdateUserStoreRequest; +import com.google.cloud.discoveryengine.v1beta.UserStore; +import com.google.protobuf.TypeRegistry; +import java.io.IOException; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * REST stub implementation for the UserStoreService service API. + * + *

            This class is for advanced usage and reflects the underlying API directly. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class HttpJsonUserStoreServiceStub extends UserStoreServiceStub { + private static final TypeRegistry typeRegistry = TypeRegistry.newBuilder().build(); + + private static final ApiMethodDescriptor + getUserStoreMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.discoveryengine.v1beta.UserStoreService/GetUserStore") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1beta/{name=projects/*/locations/*/userStores/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(UserStore.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + updateUserStoreMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.discoveryengine.v1beta.UserStoreService/UpdateUserStore") + .setHttpMethod("PATCH") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1beta/{userStore.name=projects/*/locations/*/userStores/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam( + fields, "userStore.name", request.getUserStore().getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "updateMask", request.getUpdateMask()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("userStore", request.getUserStore(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(UserStore.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private final UnaryCallable getUserStoreCallable; + private final UnaryCallable updateUserStoreCallable; + + private final BackgroundResource backgroundResources; + private final HttpJsonStubCallableFactory callableFactory; + + public static final HttpJsonUserStoreServiceStub create(UserStoreServiceStubSettings settings) + throws IOException { + return new HttpJsonUserStoreServiceStub(settings, ClientContext.create(settings)); + } + + public static final HttpJsonUserStoreServiceStub create(ClientContext clientContext) + throws IOException { + return new HttpJsonUserStoreServiceStub( + UserStoreServiceStubSettings.newHttpJsonBuilder().build(), clientContext); + } + + public static final HttpJsonUserStoreServiceStub create( + ClientContext clientContext, HttpJsonStubCallableFactory callableFactory) throws IOException { + return new HttpJsonUserStoreServiceStub( + UserStoreServiceStubSettings.newHttpJsonBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of HttpJsonUserStoreServiceStub, 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 HttpJsonUserStoreServiceStub( + UserStoreServiceStubSettings settings, ClientContext clientContext) throws IOException { + this(settings, clientContext, new HttpJsonUserStoreServiceCallableFactory()); + } + + /** + * Constructs an instance of HttpJsonUserStoreServiceStub, 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 HttpJsonUserStoreServiceStub( + UserStoreServiceStubSettings settings, + ClientContext clientContext, + HttpJsonStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + + HttpJsonCallSettings getUserStoreTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getUserStoreMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getName()) + .build(); + HttpJsonCallSettings updateUserStoreTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(updateUserStoreMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("user_store.name", String.valueOf(request.getUserStore().getName())); + return builder.build(); + }) + .build(); + + this.getUserStoreCallable = + callableFactory.createUnaryCallable( + getUserStoreTransportSettings, settings.getUserStoreSettings(), clientContext); + this.updateUserStoreCallable = + callableFactory.createUnaryCallable( + updateUserStoreTransportSettings, settings.updateUserStoreSettings(), clientContext); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + @InternalApi + public static List getMethodDescriptors() { + List methodDescriptors = new ArrayList<>(); + methodDescriptors.add(getUserStoreMethodDescriptor); + methodDescriptors.add(updateUserStoreMethodDescriptor); + return methodDescriptors; + } + + @Override + public UnaryCallable getUserStoreCallable() { + return getUserStoreCallable; + } + + @Override + public UnaryCallable updateUserStoreCallable() { + return updateUserStoreCallable; + } + + @Override + public final void close() { + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } + } + + @Override + public void shutdown() { + backgroundResources.shutdown(); + } + + @Override + public boolean isShutdown() { + return backgroundResources.isShutdown(); + } + + @Override + public boolean isTerminated() { + return backgroundResources.isTerminated(); + } + + @Override + public void shutdownNow() { + backgroundResources.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return backgroundResources.awaitTermination(duration, unit); + } +} diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/IdentityMappingStoreServiceStub.java b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/IdentityMappingStoreServiceStub.java new file mode 100644 index 000000000000..12891382a2c0 --- /dev/null +++ b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/IdentityMappingStoreServiceStub.java @@ -0,0 +1,133 @@ +/* + * 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.discoveryengine.v1beta.stub; + +import static com.google.cloud.discoveryengine.v1beta.IdentityMappingStoreServiceClient.ListIdentityMappingStoresPagedResponse; +import static com.google.cloud.discoveryengine.v1beta.IdentityMappingStoreServiceClient.ListIdentityMappingsPagedResponse; + +import com.google.api.core.BetaApi; +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.discoveryengine.v1beta.CreateIdentityMappingStoreRequest; +import com.google.cloud.discoveryengine.v1beta.DeleteIdentityMappingStoreMetadata; +import com.google.cloud.discoveryengine.v1beta.DeleteIdentityMappingStoreRequest; +import com.google.cloud.discoveryengine.v1beta.GetIdentityMappingStoreRequest; +import com.google.cloud.discoveryengine.v1beta.IdentityMappingEntryOperationMetadata; +import com.google.cloud.discoveryengine.v1beta.IdentityMappingStore; +import com.google.cloud.discoveryengine.v1beta.ImportIdentityMappingsRequest; +import com.google.cloud.discoveryengine.v1beta.ImportIdentityMappingsResponse; +import com.google.cloud.discoveryengine.v1beta.ListIdentityMappingStoresRequest; +import com.google.cloud.discoveryengine.v1beta.ListIdentityMappingStoresResponse; +import com.google.cloud.discoveryengine.v1beta.ListIdentityMappingsRequest; +import com.google.cloud.discoveryengine.v1beta.ListIdentityMappingsResponse; +import com.google.cloud.discoveryengine.v1beta.PurgeIdentityMappingsRequest; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.OperationsStub; +import com.google.protobuf.Empty; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Base stub class for the IdentityMappingStoreService service API. + * + *

            This class is for advanced usage and reflects the underlying API directly. + */ +@BetaApi +@Generated("by gapic-generator-java") +public abstract class IdentityMappingStoreServiceStub implements BackgroundResource { + + public OperationsStub getOperationsStub() { + return null; + } + + public com.google.api.gax.httpjson.longrunning.stub.OperationsStub getHttpJsonOperationsStub() { + return null; + } + + public UnaryCallable + createIdentityMappingStoreCallable() { + throw new UnsupportedOperationException( + "Not implemented: createIdentityMappingStoreCallable()"); + } + + public UnaryCallable + getIdentityMappingStoreCallable() { + throw new UnsupportedOperationException("Not implemented: getIdentityMappingStoreCallable()"); + } + + public OperationCallable< + DeleteIdentityMappingStoreRequest, Empty, DeleteIdentityMappingStoreMetadata> + deleteIdentityMappingStoreOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: deleteIdentityMappingStoreOperationCallable()"); + } + + public UnaryCallable + deleteIdentityMappingStoreCallable() { + throw new UnsupportedOperationException( + "Not implemented: deleteIdentityMappingStoreCallable()"); + } + + public OperationCallable< + ImportIdentityMappingsRequest, + ImportIdentityMappingsResponse, + IdentityMappingEntryOperationMetadata> + importIdentityMappingsOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: importIdentityMappingsOperationCallable()"); + } + + public UnaryCallable importIdentityMappingsCallable() { + throw new UnsupportedOperationException("Not implemented: importIdentityMappingsCallable()"); + } + + public OperationCallable< + PurgeIdentityMappingsRequest, Empty, IdentityMappingEntryOperationMetadata> + purgeIdentityMappingsOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: purgeIdentityMappingsOperationCallable()"); + } + + public UnaryCallable purgeIdentityMappingsCallable() { + throw new UnsupportedOperationException("Not implemented: purgeIdentityMappingsCallable()"); + } + + public UnaryCallable + listIdentityMappingsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listIdentityMappingsPagedCallable()"); + } + + public UnaryCallable + listIdentityMappingsCallable() { + throw new UnsupportedOperationException("Not implemented: listIdentityMappingsCallable()"); + } + + public UnaryCallable + listIdentityMappingStoresPagedCallable() { + throw new UnsupportedOperationException( + "Not implemented: listIdentityMappingStoresPagedCallable()"); + } + + public UnaryCallable + listIdentityMappingStoresCallable() { + throw new UnsupportedOperationException("Not implemented: listIdentityMappingStoresCallable()"); + } + + @Override + public abstract void close(); +} diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/IdentityMappingStoreServiceStubSettings.java b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/IdentityMappingStoreServiceStubSettings.java new file mode 100644 index 000000000000..5637e83bc1a4 --- /dev/null +++ b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/IdentityMappingStoreServiceStubSettings.java @@ -0,0 +1,893 @@ +/* + * 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.discoveryengine.v1beta.stub; + +import static com.google.cloud.discoveryengine.v1beta.IdentityMappingStoreServiceClient.ListIdentityMappingStoresPagedResponse; +import static com.google.cloud.discoveryengine.v1beta.IdentityMappingStoreServiceClient.ListIdentityMappingsPagedResponse; + +import com.google.api.core.ApiFunction; +import com.google.api.core.ApiFuture; +import com.google.api.core.BetaApi; +import com.google.api.core.ObsoleteApi; +import com.google.api.gax.core.GaxProperties; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.GrpcTransportChannel; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.grpc.ProtoOperationTransformers; +import com.google.api.gax.httpjson.GaxHttpJsonProperties; +import com.google.api.gax.httpjson.HttpJsonTransportChannel; +import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; +import com.google.api.gax.longrunning.OperationSnapshot; +import com.google.api.gax.longrunning.OperationTimedPollAlgorithm; +import com.google.api.gax.retrying.RetrySettings; +import com.google.api.gax.rpc.ApiCallContext; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.LibraryMetadata; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.PageContext; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.PagedListDescriptor; +import com.google.api.gax.rpc.PagedListResponseFactory; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.StubSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.discoveryengine.v1beta.CreateIdentityMappingStoreRequest; +import com.google.cloud.discoveryengine.v1beta.DeleteIdentityMappingStoreMetadata; +import com.google.cloud.discoveryengine.v1beta.DeleteIdentityMappingStoreRequest; +import com.google.cloud.discoveryengine.v1beta.GetIdentityMappingStoreRequest; +import com.google.cloud.discoveryengine.v1beta.IdentityMappingEntry; +import com.google.cloud.discoveryengine.v1beta.IdentityMappingEntryOperationMetadata; +import com.google.cloud.discoveryengine.v1beta.IdentityMappingStore; +import com.google.cloud.discoveryengine.v1beta.ImportIdentityMappingsRequest; +import com.google.cloud.discoveryengine.v1beta.ImportIdentityMappingsResponse; +import com.google.cloud.discoveryengine.v1beta.ListIdentityMappingStoresRequest; +import com.google.cloud.discoveryengine.v1beta.ListIdentityMappingStoresResponse; +import com.google.cloud.discoveryengine.v1beta.ListIdentityMappingsRequest; +import com.google.cloud.discoveryengine.v1beta.ListIdentityMappingsResponse; +import com.google.cloud.discoveryengine.v1beta.PurgeIdentityMappingsRequest; +import com.google.common.collect.ImmutableList; +import com.google.common.collect.ImmutableMap; +import com.google.common.collect.ImmutableSet; +import com.google.common.collect.Lists; +import com.google.longrunning.Operation; +import com.google.protobuf.Empty; +import java.io.IOException; +import java.time.Duration; +import java.util.List; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link IdentityMappingStoreServiceStub}. + * + *

            The default instance has everything set to sensible defaults: + * + *

              + *
            • The default service address (discoveryengine.googleapis.com) and default port (443) are + * used. + *
            • Credentials are acquired automatically through Application Default Credentials. + *
            • Retries are configured for idempotent methods but not for non-idempotent methods. + *
            + * + *

            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 createIdentityMappingStore: + * + *

            {@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
            + * IdentityMappingStoreServiceStubSettings.Builder identityMappingStoreServiceSettingsBuilder =
            + *     IdentityMappingStoreServiceStubSettings.newBuilder();
            + * identityMappingStoreServiceSettingsBuilder
            + *     .createIdentityMappingStoreSettings()
            + *     .setRetrySettings(
            + *         identityMappingStoreServiceSettingsBuilder
            + *             .createIdentityMappingStoreSettings()
            + *             .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());
            + * IdentityMappingStoreServiceStubSettings identityMappingStoreServiceSettings =
            + *     identityMappingStoreServiceSettingsBuilder.build();
            + * }
            + * + * Please refer to the [Client Side Retry + * Guide](https://docs.cloud.google.com/java/docs/client-retries) for additional support in setting + * retries. + * + *

            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 deleteIdentityMappingStore: + * + *

            {@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
            + * IdentityMappingStoreServiceStubSettings.Builder identityMappingStoreServiceSettingsBuilder =
            + *     IdentityMappingStoreServiceStubSettings.newBuilder();
            + * TimedRetryAlgorithm timedRetryAlgorithm =
            + *     OperationalTimedPollAlgorithm.create(
            + *         RetrySettings.newBuilder()
            + *             .setInitialRetryDelayDuration(Duration.ofMillis(500))
            + *             .setRetryDelayMultiplier(1.5)
            + *             .setMaxRetryDelayDuration(Duration.ofMillis(5000))
            + *             .setTotalTimeoutDuration(Duration.ofHours(24))
            + *             .build());
            + * identityMappingStoreServiceSettingsBuilder
            + *     .createClusterOperationSettings()
            + *     .setPollingAlgorithm(timedRetryAlgorithm)
            + *     .build();
            + * }
            + */ +@BetaApi +@Generated("by gapic-generator-java") +@SuppressWarnings("CanonicalDuration") +public class IdentityMappingStoreServiceStubSettings + extends StubSettings { + /** The default scopes of the service. */ + private static final ImmutableList DEFAULT_SERVICE_SCOPES = + ImmutableList.builder() + .add("https://www.googleapis.com/auth/cloud-platform") + .add("https://www.googleapis.com/auth/discoveryengine.readwrite") + .add("https://www.googleapis.com/auth/discoveryengine.serving.readwrite") + .build(); + + private final UnaryCallSettings + createIdentityMappingStoreSettings; + private final UnaryCallSettings + getIdentityMappingStoreSettings; + private final UnaryCallSettings + deleteIdentityMappingStoreSettings; + private final OperationCallSettings< + DeleteIdentityMappingStoreRequest, Empty, DeleteIdentityMappingStoreMetadata> + deleteIdentityMappingStoreOperationSettings; + private final UnaryCallSettings + importIdentityMappingsSettings; + private final OperationCallSettings< + ImportIdentityMappingsRequest, + ImportIdentityMappingsResponse, + IdentityMappingEntryOperationMetadata> + importIdentityMappingsOperationSettings; + private final UnaryCallSettings + purgeIdentityMappingsSettings; + private final OperationCallSettings< + PurgeIdentityMappingsRequest, Empty, IdentityMappingEntryOperationMetadata> + purgeIdentityMappingsOperationSettings; + private final PagedCallSettings< + ListIdentityMappingsRequest, + ListIdentityMappingsResponse, + ListIdentityMappingsPagedResponse> + listIdentityMappingsSettings; + private final PagedCallSettings< + ListIdentityMappingStoresRequest, + ListIdentityMappingStoresResponse, + ListIdentityMappingStoresPagedResponse> + listIdentityMappingStoresSettings; + + private static final PagedListDescriptor< + ListIdentityMappingsRequest, ListIdentityMappingsResponse, IdentityMappingEntry> + LIST_IDENTITY_MAPPINGS_PAGE_STR_DESC = + new PagedListDescriptor< + ListIdentityMappingsRequest, ListIdentityMappingsResponse, IdentityMappingEntry>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListIdentityMappingsRequest injectToken( + ListIdentityMappingsRequest payload, String token) { + return ListIdentityMappingsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListIdentityMappingsRequest injectPageSize( + ListIdentityMappingsRequest payload, int pageSize) { + return ListIdentityMappingsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListIdentityMappingsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListIdentityMappingsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources( + ListIdentityMappingsResponse payload) { + return payload.getIdentityMappingEntriesList(); + } + }; + + private static final PagedListDescriptor< + ListIdentityMappingStoresRequest, ListIdentityMappingStoresResponse, IdentityMappingStore> + LIST_IDENTITY_MAPPING_STORES_PAGE_STR_DESC = + new PagedListDescriptor< + ListIdentityMappingStoresRequest, + ListIdentityMappingStoresResponse, + IdentityMappingStore>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListIdentityMappingStoresRequest injectToken( + ListIdentityMappingStoresRequest payload, String token) { + return ListIdentityMappingStoresRequest.newBuilder(payload) + .setPageToken(token) + .build(); + } + + @Override + public ListIdentityMappingStoresRequest injectPageSize( + ListIdentityMappingStoresRequest payload, int pageSize) { + return ListIdentityMappingStoresRequest.newBuilder(payload) + .setPageSize(pageSize) + .build(); + } + + @Override + public Integer extractPageSize(ListIdentityMappingStoresRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListIdentityMappingStoresResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources( + ListIdentityMappingStoresResponse payload) { + return payload.getIdentityMappingStoresList(); + } + }; + + private static final PagedListResponseFactory< + ListIdentityMappingsRequest, + ListIdentityMappingsResponse, + ListIdentityMappingsPagedResponse> + LIST_IDENTITY_MAPPINGS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListIdentityMappingsRequest, + ListIdentityMappingsResponse, + ListIdentityMappingsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListIdentityMappingsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext< + ListIdentityMappingsRequest, + ListIdentityMappingsResponse, + IdentityMappingEntry> + pageContext = + PageContext.create( + callable, LIST_IDENTITY_MAPPINGS_PAGE_STR_DESC, request, context); + return ListIdentityMappingsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListIdentityMappingStoresRequest, + ListIdentityMappingStoresResponse, + ListIdentityMappingStoresPagedResponse> + LIST_IDENTITY_MAPPING_STORES_PAGE_STR_FACT = + new PagedListResponseFactory< + ListIdentityMappingStoresRequest, + ListIdentityMappingStoresResponse, + ListIdentityMappingStoresPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable + callable, + ListIdentityMappingStoresRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext< + ListIdentityMappingStoresRequest, + ListIdentityMappingStoresResponse, + IdentityMappingStore> + pageContext = + PageContext.create( + callable, LIST_IDENTITY_MAPPING_STORES_PAGE_STR_DESC, request, context); + return ListIdentityMappingStoresPagedResponse.createAsync( + pageContext, futureResponse); + } + }; + + /** Returns the object with the settings used for calls to createIdentityMappingStore. */ + public UnaryCallSettings + createIdentityMappingStoreSettings() { + return createIdentityMappingStoreSettings; + } + + /** Returns the object with the settings used for calls to getIdentityMappingStore. */ + public UnaryCallSettings + getIdentityMappingStoreSettings() { + return getIdentityMappingStoreSettings; + } + + /** Returns the object with the settings used for calls to deleteIdentityMappingStore. */ + public UnaryCallSettings + deleteIdentityMappingStoreSettings() { + return deleteIdentityMappingStoreSettings; + } + + /** Returns the object with the settings used for calls to deleteIdentityMappingStore. */ + public OperationCallSettings< + DeleteIdentityMappingStoreRequest, Empty, DeleteIdentityMappingStoreMetadata> + deleteIdentityMappingStoreOperationSettings() { + return deleteIdentityMappingStoreOperationSettings; + } + + /** Returns the object with the settings used for calls to importIdentityMappings. */ + public UnaryCallSettings + importIdentityMappingsSettings() { + return importIdentityMappingsSettings; + } + + /** Returns the object with the settings used for calls to importIdentityMappings. */ + public OperationCallSettings< + ImportIdentityMappingsRequest, + ImportIdentityMappingsResponse, + IdentityMappingEntryOperationMetadata> + importIdentityMappingsOperationSettings() { + return importIdentityMappingsOperationSettings; + } + + /** Returns the object with the settings used for calls to purgeIdentityMappings. */ + public UnaryCallSettings + purgeIdentityMappingsSettings() { + return purgeIdentityMappingsSettings; + } + + /** Returns the object with the settings used for calls to purgeIdentityMappings. */ + public OperationCallSettings< + PurgeIdentityMappingsRequest, Empty, IdentityMappingEntryOperationMetadata> + purgeIdentityMappingsOperationSettings() { + return purgeIdentityMappingsOperationSettings; + } + + /** Returns the object with the settings used for calls to listIdentityMappings. */ + public PagedCallSettings< + ListIdentityMappingsRequest, + ListIdentityMappingsResponse, + ListIdentityMappingsPagedResponse> + listIdentityMappingsSettings() { + return listIdentityMappingsSettings; + } + + /** Returns the object with the settings used for calls to listIdentityMappingStores. */ + public PagedCallSettings< + ListIdentityMappingStoresRequest, + ListIdentityMappingStoresResponse, + ListIdentityMappingStoresPagedResponse> + listIdentityMappingStoresSettings() { + return listIdentityMappingStoresSettings; + } + + public IdentityMappingStoreServiceStub createStub() throws IOException { + if (getTransportChannelProvider() + .getTransportName() + .equals(GrpcTransportChannel.getGrpcTransportName())) { + return GrpcIdentityMappingStoreServiceStub.create(this); + } + if (getTransportChannelProvider() + .getTransportName() + .equals(HttpJsonTransportChannel.getHttpJsonTransportName())) { + return HttpJsonIdentityMappingStoreServiceStub.create(this); + } + throw new UnsupportedOperationException( + String.format( + "Transport not supported: %s", getTransportChannelProvider().getTransportName())); + } + + /** Returns the default service name. */ + @Override + public String getServiceName() { + return "discoveryengine"; + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return InstantiatingExecutorProvider.newBuilder(); + } + + /** Returns the default service endpoint. */ + @ObsoleteApi("Use getEndpoint() instead") + public static String getDefaultEndpoint() { + return "discoveryengine.googleapis.com:443"; + } + + /** Returns the default mTLS service endpoint. */ + public static String getDefaultMtlsEndpoint() { + return "discoveryengine.mtls.googleapis.com:443"; + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return DEFAULT_SERVICE_SCOPES; + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return GoogleCredentialsProvider.newBuilder() + .setScopesToApply(DEFAULT_SERVICE_SCOPES) + .setUseJwtAccessWithScope(true); + } + + /** Returns a builder for the default gRPC ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return InstantiatingGrpcChannelProvider.newBuilder() + .setMaxInboundMessageSize(Integer.MAX_VALUE); + } + + /** Returns a builder for the default REST ChannelProvider for this service. */ + @BetaApi + public static InstantiatingHttpJsonChannelProvider.Builder + defaultHttpJsonTransportProviderBuilder() { + return InstantiatingHttpJsonChannelProvider.newBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return defaultGrpcTransportProviderBuilder().build(); + } + + public static ApiClientHeaderProvider.Builder defaultGrpcApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", GaxProperties.getLibraryVersion(IdentityMappingStoreServiceStubSettings.class)) + .setTransportToken( + GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion()); + } + + public static ApiClientHeaderProvider.Builder defaultHttpJsonApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", GaxProperties.getLibraryVersion(IdentityMappingStoreServiceStubSettings.class)) + .setTransportToken( + GaxHttpJsonProperties.getHttpJsonTokenName(), + GaxHttpJsonProperties.getHttpJsonVersion()); + } + + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return IdentityMappingStoreServiceStubSettings.defaultGrpcApiClientHeaderProviderBuilder(); + } + + /** Returns a new gRPC builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new REST builder for this class. */ + public static Builder newHttpJsonBuilder() { + return Builder.createHttpJsonDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected IdentityMappingStoreServiceStubSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + + createIdentityMappingStoreSettings = + settingsBuilder.createIdentityMappingStoreSettings().build(); + getIdentityMappingStoreSettings = settingsBuilder.getIdentityMappingStoreSettings().build(); + deleteIdentityMappingStoreSettings = + settingsBuilder.deleteIdentityMappingStoreSettings().build(); + deleteIdentityMappingStoreOperationSettings = + settingsBuilder.deleteIdentityMappingStoreOperationSettings().build(); + importIdentityMappingsSettings = settingsBuilder.importIdentityMappingsSettings().build(); + importIdentityMappingsOperationSettings = + settingsBuilder.importIdentityMappingsOperationSettings().build(); + purgeIdentityMappingsSettings = settingsBuilder.purgeIdentityMappingsSettings().build(); + purgeIdentityMappingsOperationSettings = + settingsBuilder.purgeIdentityMappingsOperationSettings().build(); + listIdentityMappingsSettings = settingsBuilder.listIdentityMappingsSettings().build(); + listIdentityMappingStoresSettings = settingsBuilder.listIdentityMappingStoresSettings().build(); + } + + @Override + protected LibraryMetadata getLibraryMetadata() { + return LibraryMetadata.newBuilder() + .setArtifactName("com.google.cloud:google-cloud-discoveryengine") + .setRepository("googleapis/google-cloud-java") + .setVersion(Version.VERSION) + .build(); + } + + /** Builder for IdentityMappingStoreServiceStubSettings. */ + public static class Builder + extends StubSettings.Builder { + private final ImmutableList> unaryMethodSettingsBuilders; + private final UnaryCallSettings.Builder + createIdentityMappingStoreSettings; + private final UnaryCallSettings.Builder + getIdentityMappingStoreSettings; + private final UnaryCallSettings.Builder + deleteIdentityMappingStoreSettings; + private final OperationCallSettings.Builder< + DeleteIdentityMappingStoreRequest, Empty, DeleteIdentityMappingStoreMetadata> + deleteIdentityMappingStoreOperationSettings; + private final UnaryCallSettings.Builder + importIdentityMappingsSettings; + private final OperationCallSettings.Builder< + ImportIdentityMappingsRequest, + ImportIdentityMappingsResponse, + IdentityMappingEntryOperationMetadata> + importIdentityMappingsOperationSettings; + private final UnaryCallSettings.Builder + purgeIdentityMappingsSettings; + private final OperationCallSettings.Builder< + PurgeIdentityMappingsRequest, Empty, IdentityMappingEntryOperationMetadata> + purgeIdentityMappingsOperationSettings; + private final PagedCallSettings.Builder< + ListIdentityMappingsRequest, + ListIdentityMappingsResponse, + ListIdentityMappingsPagedResponse> + listIdentityMappingsSettings; + private final PagedCallSettings.Builder< + ListIdentityMappingStoresRequest, + ListIdentityMappingStoresResponse, + ListIdentityMappingStoresPagedResponse> + listIdentityMappingStoresSettings; + private static final ImmutableMap> + RETRYABLE_CODE_DEFINITIONS; + + static { + ImmutableMap.Builder> definitions = + ImmutableMap.builder(); + definitions.put("no_retry_codes", ImmutableSet.copyOf(Lists.newArrayList())); + RETRYABLE_CODE_DEFINITIONS = definitions.build(); + } + + private static final ImmutableMap RETRY_PARAM_DEFINITIONS; + + static { + ImmutableMap.Builder definitions = ImmutableMap.builder(); + RetrySettings settings = null; + settings = RetrySettings.newBuilder().setRpcTimeoutMultiplier(1.0).build(); + definitions.put("no_retry_params", settings); + RETRY_PARAM_DEFINITIONS = definitions.build(); + } + + protected Builder() { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(clientContext); + + createIdentityMappingStoreSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + getIdentityMappingStoreSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deleteIdentityMappingStoreSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deleteIdentityMappingStoreOperationSettings = OperationCallSettings.newBuilder(); + importIdentityMappingsSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + importIdentityMappingsOperationSettings = OperationCallSettings.newBuilder(); + purgeIdentityMappingsSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + purgeIdentityMappingsOperationSettings = OperationCallSettings.newBuilder(); + listIdentityMappingsSettings = + PagedCallSettings.newBuilder(LIST_IDENTITY_MAPPINGS_PAGE_STR_FACT); + listIdentityMappingStoresSettings = + PagedCallSettings.newBuilder(LIST_IDENTITY_MAPPING_STORES_PAGE_STR_FACT); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + createIdentityMappingStoreSettings, + getIdentityMappingStoreSettings, + deleteIdentityMappingStoreSettings, + importIdentityMappingsSettings, + purgeIdentityMappingsSettings, + listIdentityMappingsSettings, + listIdentityMappingStoresSettings); + initDefaults(this); + } + + protected Builder(IdentityMappingStoreServiceStubSettings settings) { + super(settings); + + createIdentityMappingStoreSettings = settings.createIdentityMappingStoreSettings.toBuilder(); + getIdentityMappingStoreSettings = settings.getIdentityMappingStoreSettings.toBuilder(); + deleteIdentityMappingStoreSettings = settings.deleteIdentityMappingStoreSettings.toBuilder(); + deleteIdentityMappingStoreOperationSettings = + settings.deleteIdentityMappingStoreOperationSettings.toBuilder(); + importIdentityMappingsSettings = settings.importIdentityMappingsSettings.toBuilder(); + importIdentityMappingsOperationSettings = + settings.importIdentityMappingsOperationSettings.toBuilder(); + purgeIdentityMappingsSettings = settings.purgeIdentityMappingsSettings.toBuilder(); + purgeIdentityMappingsOperationSettings = + settings.purgeIdentityMappingsOperationSettings.toBuilder(); + listIdentityMappingsSettings = settings.listIdentityMappingsSettings.toBuilder(); + listIdentityMappingStoresSettings = settings.listIdentityMappingStoresSettings.toBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + createIdentityMappingStoreSettings, + getIdentityMappingStoreSettings, + deleteIdentityMappingStoreSettings, + importIdentityMappingsSettings, + purgeIdentityMappingsSettings, + listIdentityMappingsSettings, + listIdentityMappingStoresSettings); + } + + private static Builder createDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultTransportChannelProvider()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); + builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + + private static Builder createHttpJsonDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultHttpJsonTransportProviderBuilder().build()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultHttpJsonApiClientHeaderProviderBuilder().build()); + builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + + private static Builder initDefaults(Builder builder) { + builder + .createIdentityMappingStoreSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .getIdentityMappingStoreSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .deleteIdentityMappingStoreSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .importIdentityMappingsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .purgeIdentityMappingsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .listIdentityMappingsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .listIdentityMappingStoresSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .deleteIdentityMappingStoreOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + . + newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Empty.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create( + DeleteIdentityMappingStoreMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelayDuration(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelayDuration(Duration.ofMillis(45000L)) + .setInitialRpcTimeoutDuration(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeoutDuration(Duration.ZERO) + .setTotalTimeoutDuration(Duration.ofMillis(300000L)) + .build())); + + builder + .importIdentityMappingsOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create( + ImportIdentityMappingsResponse.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create( + IdentityMappingEntryOperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelayDuration(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelayDuration(Duration.ofMillis(45000L)) + .setInitialRpcTimeoutDuration(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeoutDuration(Duration.ZERO) + .setTotalTimeoutDuration(Duration.ofMillis(300000L)) + .build())); + + builder + .purgeIdentityMappingsOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Empty.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create( + IdentityMappingEntryOperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelayDuration(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelayDuration(Duration.ofMillis(45000L)) + .setInitialRpcTimeoutDuration(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeoutDuration(Duration.ZERO) + .setTotalTimeoutDuration(Duration.ofMillis(300000L)) + .build())); + + return builder; + } + + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

            Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) { + super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); + return this; + } + + public ImmutableList> unaryMethodSettingsBuilders() { + return unaryMethodSettingsBuilders; + } + + /** Returns the builder for the settings used for calls to createIdentityMappingStore. */ + public UnaryCallSettings.Builder + createIdentityMappingStoreSettings() { + return createIdentityMappingStoreSettings; + } + + /** Returns the builder for the settings used for calls to getIdentityMappingStore. */ + public UnaryCallSettings.Builder + getIdentityMappingStoreSettings() { + return getIdentityMappingStoreSettings; + } + + /** Returns the builder for the settings used for calls to deleteIdentityMappingStore. */ + public UnaryCallSettings.Builder + deleteIdentityMappingStoreSettings() { + return deleteIdentityMappingStoreSettings; + } + + /** Returns the builder for the settings used for calls to deleteIdentityMappingStore. */ + public OperationCallSettings.Builder< + DeleteIdentityMappingStoreRequest, Empty, DeleteIdentityMappingStoreMetadata> + deleteIdentityMappingStoreOperationSettings() { + return deleteIdentityMappingStoreOperationSettings; + } + + /** Returns the builder for the settings used for calls to importIdentityMappings. */ + public UnaryCallSettings.Builder + importIdentityMappingsSettings() { + return importIdentityMappingsSettings; + } + + /** Returns the builder for the settings used for calls to importIdentityMappings. */ + public OperationCallSettings.Builder< + ImportIdentityMappingsRequest, + ImportIdentityMappingsResponse, + IdentityMappingEntryOperationMetadata> + importIdentityMappingsOperationSettings() { + return importIdentityMappingsOperationSettings; + } + + /** Returns the builder for the settings used for calls to purgeIdentityMappings. */ + public UnaryCallSettings.Builder + purgeIdentityMappingsSettings() { + return purgeIdentityMappingsSettings; + } + + /** Returns the builder for the settings used for calls to purgeIdentityMappings. */ + public OperationCallSettings.Builder< + PurgeIdentityMappingsRequest, Empty, IdentityMappingEntryOperationMetadata> + purgeIdentityMappingsOperationSettings() { + return purgeIdentityMappingsOperationSettings; + } + + /** Returns the builder for the settings used for calls to listIdentityMappings. */ + public PagedCallSettings.Builder< + ListIdentityMappingsRequest, + ListIdentityMappingsResponse, + ListIdentityMappingsPagedResponse> + listIdentityMappingsSettings() { + return listIdentityMappingsSettings; + } + + /** Returns the builder for the settings used for calls to listIdentityMappingStores. */ + public PagedCallSettings.Builder< + ListIdentityMappingStoresRequest, + ListIdentityMappingStoresResponse, + ListIdentityMappingStoresPagedResponse> + listIdentityMappingStoresSettings() { + return listIdentityMappingStoresSettings; + } + + @Override + public IdentityMappingStoreServiceStubSettings build() throws IOException { + return new IdentityMappingStoreServiceStubSettings(this); + } + } +} diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/LicenseConfigServiceStub.java b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/LicenseConfigServiceStub.java new file mode 100644 index 000000000000..ed2a41a2fd9f --- /dev/null +++ b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/LicenseConfigServiceStub.java @@ -0,0 +1,80 @@ +/* + * 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.discoveryengine.v1beta.stub; + +import static com.google.cloud.discoveryengine.v1beta.LicenseConfigServiceClient.ListLicenseConfigsPagedResponse; + +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.discoveryengine.v1beta.CreateLicenseConfigRequest; +import com.google.cloud.discoveryengine.v1beta.DistributeLicenseConfigRequest; +import com.google.cloud.discoveryengine.v1beta.DistributeLicenseConfigResponse; +import com.google.cloud.discoveryengine.v1beta.GetLicenseConfigRequest; +import com.google.cloud.discoveryengine.v1beta.LicenseConfig; +import com.google.cloud.discoveryengine.v1beta.ListLicenseConfigsRequest; +import com.google.cloud.discoveryengine.v1beta.ListLicenseConfigsResponse; +import com.google.cloud.discoveryengine.v1beta.RetractLicenseConfigRequest; +import com.google.cloud.discoveryengine.v1beta.RetractLicenseConfigResponse; +import com.google.cloud.discoveryengine.v1beta.UpdateLicenseConfigRequest; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Base stub class for the LicenseConfigService service API. + * + *

            This class is for advanced usage and reflects the underlying API directly. + */ +@BetaApi +@Generated("by gapic-generator-java") +public abstract class LicenseConfigServiceStub implements BackgroundResource { + + public UnaryCallable createLicenseConfigCallable() { + throw new UnsupportedOperationException("Not implemented: createLicenseConfigCallable()"); + } + + public UnaryCallable updateLicenseConfigCallable() { + throw new UnsupportedOperationException("Not implemented: updateLicenseConfigCallable()"); + } + + public UnaryCallable getLicenseConfigCallable() { + throw new UnsupportedOperationException("Not implemented: getLicenseConfigCallable()"); + } + + public UnaryCallable + listLicenseConfigsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listLicenseConfigsPagedCallable()"); + } + + public UnaryCallable + listLicenseConfigsCallable() { + throw new UnsupportedOperationException("Not implemented: listLicenseConfigsCallable()"); + } + + public UnaryCallable + distributeLicenseConfigCallable() { + throw new UnsupportedOperationException("Not implemented: distributeLicenseConfigCallable()"); + } + + public UnaryCallable + retractLicenseConfigCallable() { + throw new UnsupportedOperationException("Not implemented: retractLicenseConfigCallable()"); + } + + @Override + public abstract void close(); +} diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/LicenseConfigServiceStubSettings.java b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/LicenseConfigServiceStubSettings.java new file mode 100644 index 000000000000..44dee5f338bd --- /dev/null +++ b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/LicenseConfigServiceStubSettings.java @@ -0,0 +1,567 @@ +/* + * 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.discoveryengine.v1beta.stub; + +import static com.google.cloud.discoveryengine.v1beta.LicenseConfigServiceClient.ListLicenseConfigsPagedResponse; + +import com.google.api.core.ApiFunction; +import com.google.api.core.ApiFuture; +import com.google.api.core.BetaApi; +import com.google.api.core.ObsoleteApi; +import com.google.api.gax.core.GaxProperties; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.GrpcTransportChannel; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.httpjson.GaxHttpJsonProperties; +import com.google.api.gax.httpjson.HttpJsonTransportChannel; +import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; +import com.google.api.gax.retrying.RetrySettings; +import com.google.api.gax.rpc.ApiCallContext; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.LibraryMetadata; +import com.google.api.gax.rpc.PageContext; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.PagedListDescriptor; +import com.google.api.gax.rpc.PagedListResponseFactory; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.StubSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.discoveryengine.v1beta.CreateLicenseConfigRequest; +import com.google.cloud.discoveryengine.v1beta.DistributeLicenseConfigRequest; +import com.google.cloud.discoveryengine.v1beta.DistributeLicenseConfigResponse; +import com.google.cloud.discoveryengine.v1beta.GetLicenseConfigRequest; +import com.google.cloud.discoveryengine.v1beta.LicenseConfig; +import com.google.cloud.discoveryengine.v1beta.ListLicenseConfigsRequest; +import com.google.cloud.discoveryengine.v1beta.ListLicenseConfigsResponse; +import com.google.cloud.discoveryengine.v1beta.RetractLicenseConfigRequest; +import com.google.cloud.discoveryengine.v1beta.RetractLicenseConfigResponse; +import com.google.cloud.discoveryengine.v1beta.UpdateLicenseConfigRequest; +import com.google.common.collect.ImmutableList; +import com.google.common.collect.ImmutableMap; +import com.google.common.collect.ImmutableSet; +import com.google.common.collect.Lists; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link LicenseConfigServiceStub}. + * + *

            The default instance has everything set to sensible defaults: + * + *

              + *
            • The default service address (discoveryengine.googleapis.com) and default port (443) are + * used. + *
            • Credentials are acquired automatically through Application Default Credentials. + *
            • Retries are configured for idempotent methods but not for non-idempotent methods. + *
            + * + *

            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 createLicenseConfig: + * + *

            {@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
            + * LicenseConfigServiceStubSettings.Builder licenseConfigServiceSettingsBuilder =
            + *     LicenseConfigServiceStubSettings.newBuilder();
            + * licenseConfigServiceSettingsBuilder
            + *     .createLicenseConfigSettings()
            + *     .setRetrySettings(
            + *         licenseConfigServiceSettingsBuilder
            + *             .createLicenseConfigSettings()
            + *             .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());
            + * LicenseConfigServiceStubSettings licenseConfigServiceSettings =
            + *     licenseConfigServiceSettingsBuilder.build();
            + * }
            + * + * Please refer to the [Client Side Retry + * Guide](https://docs.cloud.google.com/java/docs/client-retries) for additional support in setting + * retries. + */ +@BetaApi +@Generated("by gapic-generator-java") +@SuppressWarnings("CanonicalDuration") +public class LicenseConfigServiceStubSettings + extends StubSettings { + /** The default scopes of the service. */ + private static final ImmutableList DEFAULT_SERVICE_SCOPES = + ImmutableList.builder() + .add("https://www.googleapis.com/auth/cloud-platform") + .add("https://www.googleapis.com/auth/discoveryengine.readwrite") + .add("https://www.googleapis.com/auth/discoveryengine.serving.readwrite") + .build(); + + private final UnaryCallSettings + createLicenseConfigSettings; + private final UnaryCallSettings + updateLicenseConfigSettings; + private final UnaryCallSettings getLicenseConfigSettings; + private final PagedCallSettings< + ListLicenseConfigsRequest, ListLicenseConfigsResponse, ListLicenseConfigsPagedResponse> + listLicenseConfigsSettings; + private final UnaryCallSettings + distributeLicenseConfigSettings; + private final UnaryCallSettings + retractLicenseConfigSettings; + + private static final PagedListDescriptor< + ListLicenseConfigsRequest, ListLicenseConfigsResponse, LicenseConfig> + LIST_LICENSE_CONFIGS_PAGE_STR_DESC = + new PagedListDescriptor< + ListLicenseConfigsRequest, ListLicenseConfigsResponse, LicenseConfig>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListLicenseConfigsRequest injectToken( + ListLicenseConfigsRequest payload, String token) { + return ListLicenseConfigsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListLicenseConfigsRequest injectPageSize( + ListLicenseConfigsRequest payload, int pageSize) { + return ListLicenseConfigsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListLicenseConfigsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListLicenseConfigsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListLicenseConfigsResponse payload) { + return payload.getLicenseConfigsList(); + } + }; + + private static final PagedListResponseFactory< + ListLicenseConfigsRequest, ListLicenseConfigsResponse, ListLicenseConfigsPagedResponse> + LIST_LICENSE_CONFIGS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListLicenseConfigsRequest, + ListLicenseConfigsResponse, + ListLicenseConfigsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListLicenseConfigsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext + pageContext = + PageContext.create( + callable, LIST_LICENSE_CONFIGS_PAGE_STR_DESC, request, context); + return ListLicenseConfigsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + /** Returns the object with the settings used for calls to createLicenseConfig. */ + public UnaryCallSettings + createLicenseConfigSettings() { + return createLicenseConfigSettings; + } + + /** Returns the object with the settings used for calls to updateLicenseConfig. */ + public UnaryCallSettings + updateLicenseConfigSettings() { + return updateLicenseConfigSettings; + } + + /** Returns the object with the settings used for calls to getLicenseConfig. */ + public UnaryCallSettings getLicenseConfigSettings() { + return getLicenseConfigSettings; + } + + /** Returns the object with the settings used for calls to listLicenseConfigs. */ + public PagedCallSettings< + ListLicenseConfigsRequest, ListLicenseConfigsResponse, ListLicenseConfigsPagedResponse> + listLicenseConfigsSettings() { + return listLicenseConfigsSettings; + } + + /** Returns the object with the settings used for calls to distributeLicenseConfig. */ + public UnaryCallSettings + distributeLicenseConfigSettings() { + return distributeLicenseConfigSettings; + } + + /** Returns the object with the settings used for calls to retractLicenseConfig. */ + public UnaryCallSettings + retractLicenseConfigSettings() { + return retractLicenseConfigSettings; + } + + public LicenseConfigServiceStub createStub() throws IOException { + if (getTransportChannelProvider() + .getTransportName() + .equals(GrpcTransportChannel.getGrpcTransportName())) { + return GrpcLicenseConfigServiceStub.create(this); + } + if (getTransportChannelProvider() + .getTransportName() + .equals(HttpJsonTransportChannel.getHttpJsonTransportName())) { + return HttpJsonLicenseConfigServiceStub.create(this); + } + throw new UnsupportedOperationException( + String.format( + "Transport not supported: %s", getTransportChannelProvider().getTransportName())); + } + + /** Returns the default service name. */ + @Override + public String getServiceName() { + return "discoveryengine"; + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return InstantiatingExecutorProvider.newBuilder(); + } + + /** Returns the default service endpoint. */ + @ObsoleteApi("Use getEndpoint() instead") + public static String getDefaultEndpoint() { + return "discoveryengine.googleapis.com:443"; + } + + /** Returns the default mTLS service endpoint. */ + public static String getDefaultMtlsEndpoint() { + return "discoveryengine.mtls.googleapis.com:443"; + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return DEFAULT_SERVICE_SCOPES; + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return GoogleCredentialsProvider.newBuilder() + .setScopesToApply(DEFAULT_SERVICE_SCOPES) + .setUseJwtAccessWithScope(true); + } + + /** Returns a builder for the default gRPC ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return InstantiatingGrpcChannelProvider.newBuilder() + .setMaxInboundMessageSize(Integer.MAX_VALUE); + } + + /** Returns a builder for the default REST ChannelProvider for this service. */ + @BetaApi + public static InstantiatingHttpJsonChannelProvider.Builder + defaultHttpJsonTransportProviderBuilder() { + return InstantiatingHttpJsonChannelProvider.newBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return defaultGrpcTransportProviderBuilder().build(); + } + + public static ApiClientHeaderProvider.Builder defaultGrpcApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", GaxProperties.getLibraryVersion(LicenseConfigServiceStubSettings.class)) + .setTransportToken( + GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion()); + } + + public static ApiClientHeaderProvider.Builder defaultHttpJsonApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", GaxProperties.getLibraryVersion(LicenseConfigServiceStubSettings.class)) + .setTransportToken( + GaxHttpJsonProperties.getHttpJsonTokenName(), + GaxHttpJsonProperties.getHttpJsonVersion()); + } + + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return LicenseConfigServiceStubSettings.defaultGrpcApiClientHeaderProviderBuilder(); + } + + /** Returns a new gRPC builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new REST builder for this class. */ + public static Builder newHttpJsonBuilder() { + return Builder.createHttpJsonDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected LicenseConfigServiceStubSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + + createLicenseConfigSettings = settingsBuilder.createLicenseConfigSettings().build(); + updateLicenseConfigSettings = settingsBuilder.updateLicenseConfigSettings().build(); + getLicenseConfigSettings = settingsBuilder.getLicenseConfigSettings().build(); + listLicenseConfigsSettings = settingsBuilder.listLicenseConfigsSettings().build(); + distributeLicenseConfigSettings = settingsBuilder.distributeLicenseConfigSettings().build(); + retractLicenseConfigSettings = settingsBuilder.retractLicenseConfigSettings().build(); + } + + @Override + protected LibraryMetadata getLibraryMetadata() { + return LibraryMetadata.newBuilder() + .setArtifactName("com.google.cloud:google-cloud-discoveryengine") + .setRepository("googleapis/google-cloud-java") + .setVersion(Version.VERSION) + .build(); + } + + /** Builder for LicenseConfigServiceStubSettings. */ + public static class Builder + extends StubSettings.Builder { + private final ImmutableList> unaryMethodSettingsBuilders; + private final UnaryCallSettings.Builder + createLicenseConfigSettings; + private final UnaryCallSettings.Builder + updateLicenseConfigSettings; + private final UnaryCallSettings.Builder + getLicenseConfigSettings; + private final PagedCallSettings.Builder< + ListLicenseConfigsRequest, ListLicenseConfigsResponse, ListLicenseConfigsPagedResponse> + listLicenseConfigsSettings; + private final UnaryCallSettings.Builder< + DistributeLicenseConfigRequest, DistributeLicenseConfigResponse> + distributeLicenseConfigSettings; + private final UnaryCallSettings.Builder< + RetractLicenseConfigRequest, RetractLicenseConfigResponse> + retractLicenseConfigSettings; + private static final ImmutableMap> + RETRYABLE_CODE_DEFINITIONS; + + static { + ImmutableMap.Builder> definitions = + ImmutableMap.builder(); + definitions.put("no_retry_codes", ImmutableSet.copyOf(Lists.newArrayList())); + RETRYABLE_CODE_DEFINITIONS = definitions.build(); + } + + private static final ImmutableMap RETRY_PARAM_DEFINITIONS; + + static { + ImmutableMap.Builder definitions = ImmutableMap.builder(); + RetrySettings settings = null; + settings = RetrySettings.newBuilder().setRpcTimeoutMultiplier(1.0).build(); + definitions.put("no_retry_params", settings); + RETRY_PARAM_DEFINITIONS = definitions.build(); + } + + protected Builder() { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(clientContext); + + createLicenseConfigSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updateLicenseConfigSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + getLicenseConfigSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listLicenseConfigsSettings = PagedCallSettings.newBuilder(LIST_LICENSE_CONFIGS_PAGE_STR_FACT); + distributeLicenseConfigSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + retractLicenseConfigSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + createLicenseConfigSettings, + updateLicenseConfigSettings, + getLicenseConfigSettings, + listLicenseConfigsSettings, + distributeLicenseConfigSettings, + retractLicenseConfigSettings); + initDefaults(this); + } + + protected Builder(LicenseConfigServiceStubSettings settings) { + super(settings); + + createLicenseConfigSettings = settings.createLicenseConfigSettings.toBuilder(); + updateLicenseConfigSettings = settings.updateLicenseConfigSettings.toBuilder(); + getLicenseConfigSettings = settings.getLicenseConfigSettings.toBuilder(); + listLicenseConfigsSettings = settings.listLicenseConfigsSettings.toBuilder(); + distributeLicenseConfigSettings = settings.distributeLicenseConfigSettings.toBuilder(); + retractLicenseConfigSettings = settings.retractLicenseConfigSettings.toBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + createLicenseConfigSettings, + updateLicenseConfigSettings, + getLicenseConfigSettings, + listLicenseConfigsSettings, + distributeLicenseConfigSettings, + retractLicenseConfigSettings); + } + + private static Builder createDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultTransportChannelProvider()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); + builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + + private static Builder createHttpJsonDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultHttpJsonTransportProviderBuilder().build()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultHttpJsonApiClientHeaderProviderBuilder().build()); + builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + + private static Builder initDefaults(Builder builder) { + builder + .createLicenseConfigSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .updateLicenseConfigSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .getLicenseConfigSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .listLicenseConfigsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .distributeLicenseConfigSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .retractLicenseConfigSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + return builder; + } + + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

            Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) { + super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); + return this; + } + + public ImmutableList> unaryMethodSettingsBuilders() { + return unaryMethodSettingsBuilders; + } + + /** Returns the builder for the settings used for calls to createLicenseConfig. */ + public UnaryCallSettings.Builder + createLicenseConfigSettings() { + return createLicenseConfigSettings; + } + + /** Returns the builder for the settings used for calls to updateLicenseConfig. */ + public UnaryCallSettings.Builder + updateLicenseConfigSettings() { + return updateLicenseConfigSettings; + } + + /** Returns the builder for the settings used for calls to getLicenseConfig. */ + public UnaryCallSettings.Builder + getLicenseConfigSettings() { + return getLicenseConfigSettings; + } + + /** Returns the builder for the settings used for calls to listLicenseConfigs. */ + public PagedCallSettings.Builder< + ListLicenseConfigsRequest, ListLicenseConfigsResponse, ListLicenseConfigsPagedResponse> + listLicenseConfigsSettings() { + return listLicenseConfigsSettings; + } + + /** Returns the builder for the settings used for calls to distributeLicenseConfig. */ + public UnaryCallSettings.Builder< + DistributeLicenseConfigRequest, DistributeLicenseConfigResponse> + distributeLicenseConfigSettings() { + return distributeLicenseConfigSettings; + } + + /** Returns the builder for the settings used for calls to retractLicenseConfig. */ + public UnaryCallSettings.Builder + retractLicenseConfigSettings() { + return retractLicenseConfigSettings; + } + + @Override + public LicenseConfigServiceStubSettings build() throws IOException { + return new LicenseConfigServiceStubSettings(this); + } + } +} diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/ProjectServiceStubSettings.java b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/ProjectServiceStubSettings.java index 35b93187e637..7d3adc3b9ba8 100644 --- a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/ProjectServiceStubSettings.java +++ b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/ProjectServiceStubSettings.java @@ -136,7 +136,11 @@ public class ProjectServiceStubSettings extends StubSettings { /** The default scopes of the service. */ private static final ImmutableList DEFAULT_SERVICE_SCOPES = - ImmutableList.builder().add("https://www.googleapis.com/auth/cloud-platform").build(); + ImmutableList.builder() + .add("https://www.googleapis.com/auth/cloud-platform") + .add("https://www.googleapis.com/auth/discoveryengine.readwrite") + .add("https://www.googleapis.com/auth/discoveryengine.serving.readwrite") + .build(); private final UnaryCallSettings provisionProjectSettings; private final OperationCallSettings diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/RankServiceStubSettings.java b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/RankServiceStubSettings.java index 61c9637619a4..48c8c3c0da46 100644 --- a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/RankServiceStubSettings.java +++ b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/RankServiceStubSettings.java @@ -104,7 +104,11 @@ public class RankServiceStubSettings extends StubSettings { /** The default scopes of the service. */ private static final ImmutableList DEFAULT_SERVICE_SCOPES = - ImmutableList.builder().add("https://www.googleapis.com/auth/cloud-platform").build(); + ImmutableList.builder() + .add("https://www.googleapis.com/auth/cloud-platform") + .add("https://www.googleapis.com/auth/discoveryengine.readwrite") + .add("https://www.googleapis.com/auth/discoveryengine.serving.readwrite") + .build(); private final UnaryCallSettings rankSettings; diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/RecommendationServiceStubSettings.java b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/RecommendationServiceStubSettings.java index 31c589e53f1a..225289590bd1 100644 --- a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/RecommendationServiceStubSettings.java +++ b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/RecommendationServiceStubSettings.java @@ -106,7 +106,11 @@ public class RecommendationServiceStubSettings extends StubSettings { /** The default scopes of the service. */ private static final ImmutableList DEFAULT_SERVICE_SCOPES = - ImmutableList.builder().add("https://www.googleapis.com/auth/cloud-platform").build(); + ImmutableList.builder() + .add("https://www.googleapis.com/auth/cloud-platform") + .add("https://www.googleapis.com/auth/discoveryengine.readwrite") + .add("https://www.googleapis.com/auth/discoveryengine.serving.readwrite") + .build(); private final UnaryCallSettings recommendSettings; diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/SampleQueryServiceStubSettings.java b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/SampleQueryServiceStubSettings.java index 084281d2d4c0..c2620be46aeb 100644 --- a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/SampleQueryServiceStubSettings.java +++ b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/SampleQueryServiceStubSettings.java @@ -154,7 +154,11 @@ public class SampleQueryServiceStubSettings extends StubSettings { /** The default scopes of the service. */ private static final ImmutableList DEFAULT_SERVICE_SCOPES = - ImmutableList.builder().add("https://www.googleapis.com/auth/cloud-platform").build(); + ImmutableList.builder() + .add("https://www.googleapis.com/auth/cloud-platform") + .add("https://www.googleapis.com/auth/discoveryengine.readwrite") + .add("https://www.googleapis.com/auth/discoveryengine.serving.readwrite") + .build(); private final UnaryCallSettings getSampleQuerySettings; private final PagedCallSettings< diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/SampleQuerySetServiceStubSettings.java b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/SampleQuerySetServiceStubSettings.java index 144f5d15a13b..2acef9e999d6 100644 --- a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/SampleQuerySetServiceStubSettings.java +++ b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/SampleQuerySetServiceStubSettings.java @@ -121,7 +121,11 @@ public class SampleQuerySetServiceStubSettings extends StubSettings { /** The default scopes of the service. */ private static final ImmutableList DEFAULT_SERVICE_SCOPES = - ImmutableList.builder().add("https://www.googleapis.com/auth/cloud-platform").build(); + ImmutableList.builder() + .add("https://www.googleapis.com/auth/cloud-platform") + .add("https://www.googleapis.com/auth/discoveryengine.readwrite") + .add("https://www.googleapis.com/auth/discoveryengine.serving.readwrite") + .build(); private final UnaryCallSettings getSampleQuerySetSettings; diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/SchemaServiceStubSettings.java b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/SchemaServiceStubSettings.java index b82a024ce985..99957320dc07 100644 --- a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/SchemaServiceStubSettings.java +++ b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/SchemaServiceStubSettings.java @@ -153,7 +153,11 @@ public class SchemaServiceStubSettings extends StubSettings { /** The default scopes of the service. */ private static final ImmutableList DEFAULT_SERVICE_SCOPES = - ImmutableList.builder().add("https://www.googleapis.com/auth/cloud-platform").build(); + ImmutableList.builder() + .add("https://www.googleapis.com/auth/cloud-platform") + .add("https://www.googleapis.com/auth/discoveryengine.readwrite") + .add("https://www.googleapis.com/auth/discoveryengine.serving.readwrite") + .build(); private final UnaryCallSettings getSchemaSettings; private final PagedCallSettings diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/SearchServiceStubSettings.java b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/SearchServiceStubSettings.java index 9558ffbfce84..0e5832ddc8a3 100644 --- a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/SearchServiceStubSettings.java +++ b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/SearchServiceStubSettings.java @@ -114,7 +114,12 @@ public class SearchServiceStubSettings extends StubSettings { /** The default scopes of the service. */ private static final ImmutableList DEFAULT_SERVICE_SCOPES = - ImmutableList.builder().add("https://www.googleapis.com/auth/cloud-platform").build(); + ImmutableList.builder() + .add("https://www.googleapis.com/auth/cloud-platform") + .add("https://www.googleapis.com/auth/discoveryengine.assist.readwrite") + .add("https://www.googleapis.com/auth/discoveryengine.readwrite") + .add("https://www.googleapis.com/auth/discoveryengine.serving.readwrite") + .build(); private final PagedCallSettings searchSettings; diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/SearchTuningServiceStubSettings.java b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/SearchTuningServiceStubSettings.java index 17cae3476354..e3cdb3eef010 100644 --- a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/SearchTuningServiceStubSettings.java +++ b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/SearchTuningServiceStubSettings.java @@ -139,7 +139,11 @@ public class SearchTuningServiceStubSettings extends StubSettings { /** The default scopes of the service. */ private static final ImmutableList DEFAULT_SERVICE_SCOPES = - ImmutableList.builder().add("https://www.googleapis.com/auth/cloud-platform").build(); + ImmutableList.builder() + .add("https://www.googleapis.com/auth/cloud-platform") + .add("https://www.googleapis.com/auth/discoveryengine.readwrite") + .add("https://www.googleapis.com/auth/discoveryengine.serving.readwrite") + .build(); private final UnaryCallSettings trainCustomModelSettings; private final OperationCallSettings< diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/ServingConfigServiceStub.java b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/ServingConfigServiceStub.java index 8ad8b379948c..88ca1ad8cba9 100644 --- a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/ServingConfigServiceStub.java +++ b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/ServingConfigServiceStub.java @@ -21,11 +21,14 @@ import com.google.api.core.BetaApi; import com.google.api.gax.core.BackgroundResource; import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.discoveryengine.v1beta.CreateServingConfigRequest; +import com.google.cloud.discoveryengine.v1beta.DeleteServingConfigRequest; import com.google.cloud.discoveryengine.v1beta.GetServingConfigRequest; import com.google.cloud.discoveryengine.v1beta.ListServingConfigsRequest; import com.google.cloud.discoveryengine.v1beta.ListServingConfigsResponse; import com.google.cloud.discoveryengine.v1beta.ServingConfig; import com.google.cloud.discoveryengine.v1beta.UpdateServingConfigRequest; +import com.google.protobuf.Empty; import javax.annotation.Generated; // AUTO-GENERATED DOCUMENTATION AND CLASS. @@ -38,6 +41,14 @@ @Generated("by gapic-generator-java") public abstract class ServingConfigServiceStub implements BackgroundResource { + public UnaryCallable createServingConfigCallable() { + throw new UnsupportedOperationException("Not implemented: createServingConfigCallable()"); + } + + public UnaryCallable deleteServingConfigCallable() { + throw new UnsupportedOperationException("Not implemented: deleteServingConfigCallable()"); + } + public UnaryCallable updateServingConfigCallable() { throw new UnsupportedOperationException("Not implemented: updateServingConfigCallable()"); } diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/ServingConfigServiceStubSettings.java b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/ServingConfigServiceStubSettings.java index e14a8946a375..1fd86ef77a21 100644 --- a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/ServingConfigServiceStubSettings.java +++ b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/ServingConfigServiceStubSettings.java @@ -45,6 +45,8 @@ import com.google.api.gax.rpc.TransportChannelProvider; import com.google.api.gax.rpc.UnaryCallSettings; import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.discoveryengine.v1beta.CreateServingConfigRequest; +import com.google.cloud.discoveryengine.v1beta.DeleteServingConfigRequest; import com.google.cloud.discoveryengine.v1beta.GetServingConfigRequest; import com.google.cloud.discoveryengine.v1beta.ListServingConfigsRequest; import com.google.cloud.discoveryengine.v1beta.ListServingConfigsResponse; @@ -54,6 +56,7 @@ import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; import com.google.common.collect.Lists; +import com.google.protobuf.Empty; import java.io.IOException; import java.util.List; import javax.annotation.Generated; @@ -76,7 +79,7 @@ * *

            For example, to set the * [RetrySettings](https://cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.retrying.RetrySettings) - * of updateServingConfig: + * of createServingConfig: * *

            {@code
              * // This snippet has been automatically generated and should be regarded as a code template only.
            @@ -87,10 +90,10 @@
              * ServingConfigServiceStubSettings.Builder servingConfigServiceSettingsBuilder =
              *     ServingConfigServiceStubSettings.newBuilder();
              * servingConfigServiceSettingsBuilder
            - *     .updateServingConfigSettings()
            + *     .createServingConfigSettings()
              *     .setRetrySettings(
              *         servingConfigServiceSettingsBuilder
            - *             .updateServingConfigSettings()
            + *             .createServingConfigSettings()
              *             .getRetrySettings()
              *             .toBuilder()
              *             .setInitialRetryDelayDuration(Duration.ofSeconds(1))
            @@ -117,8 +120,15 @@ public class ServingConfigServiceStubSettings
                 extends StubSettings {
               /** The default scopes of the service. */
               private static final ImmutableList DEFAULT_SERVICE_SCOPES =
            -      ImmutableList.builder().add("https://www.googleapis.com/auth/cloud-platform").build();
            -
            +      ImmutableList.builder()
            +          .add("https://www.googleapis.com/auth/cloud-platform")
            +          .add("https://www.googleapis.com/auth/discoveryengine.readwrite")
            +          .add("https://www.googleapis.com/auth/discoveryengine.serving.readwrite")
            +          .build();
            +
            +  private final UnaryCallSettings
            +      createServingConfigSettings;
            +  private final UnaryCallSettings deleteServingConfigSettings;
               private final UnaryCallSettings
                   updateServingConfigSettings;
               private final UnaryCallSettings getServingConfigSettings;
            @@ -185,6 +195,17 @@ public ApiFuture getFuturePagedResponse(
                         }
                       };
             
            +  /** Returns the object with the settings used for calls to createServingConfig. */
            +  public UnaryCallSettings
            +      createServingConfigSettings() {
            +    return createServingConfigSettings;
            +  }
            +
            +  /** Returns the object with the settings used for calls to deleteServingConfig. */
            +  public UnaryCallSettings deleteServingConfigSettings() {
            +    return deleteServingConfigSettings;
            +  }
            +
               /** Returns the object with the settings used for calls to updateServingConfig. */
               public UnaryCallSettings
                   updateServingConfigSettings() {
            @@ -314,6 +335,8 @@ public Builder toBuilder() {
               protected ServingConfigServiceStubSettings(Builder settingsBuilder) throws IOException {
                 super(settingsBuilder);
             
            +    createServingConfigSettings = settingsBuilder.createServingConfigSettings().build();
            +    deleteServingConfigSettings = settingsBuilder.deleteServingConfigSettings().build();
                 updateServingConfigSettings = settingsBuilder.updateServingConfigSettings().build();
                 getServingConfigSettings = settingsBuilder.getServingConfigSettings().build();
                 listServingConfigsSettings = settingsBuilder.listServingConfigsSettings().build();
            @@ -332,6 +355,10 @@ protected LibraryMetadata getLibraryMetadata() {
               public static class Builder
                   extends StubSettings.Builder {
                 private final ImmutableList> unaryMethodSettingsBuilders;
            +    private final UnaryCallSettings.Builder
            +        createServingConfigSettings;
            +    private final UnaryCallSettings.Builder
            +        deleteServingConfigSettings;
                 private final UnaryCallSettings.Builder
                     updateServingConfigSettings;
                 private final UnaryCallSettings.Builder
            @@ -366,26 +393,38 @@ protected Builder() {
                 protected Builder(ClientContext clientContext) {
                   super(clientContext);
             
            +      createServingConfigSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
            +      deleteServingConfigSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
                   updateServingConfigSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
                   getServingConfigSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
                   listServingConfigsSettings = PagedCallSettings.newBuilder(LIST_SERVING_CONFIGS_PAGE_STR_FACT);
             
                   unaryMethodSettingsBuilders =
                       ImmutableList.>of(
            -              updateServingConfigSettings, getServingConfigSettings, listServingConfigsSettings);
            +              createServingConfigSettings,
            +              deleteServingConfigSettings,
            +              updateServingConfigSettings,
            +              getServingConfigSettings,
            +              listServingConfigsSettings);
                   initDefaults(this);
                 }
             
                 protected Builder(ServingConfigServiceStubSettings settings) {
                   super(settings);
             
            +      createServingConfigSettings = settings.createServingConfigSettings.toBuilder();
            +      deleteServingConfigSettings = settings.deleteServingConfigSettings.toBuilder();
                   updateServingConfigSettings = settings.updateServingConfigSettings.toBuilder();
                   getServingConfigSettings = settings.getServingConfigSettings.toBuilder();
                   listServingConfigsSettings = settings.listServingConfigsSettings.toBuilder();
             
                   unaryMethodSettingsBuilders =
                       ImmutableList.>of(
            -              updateServingConfigSettings, getServingConfigSettings, listServingConfigsSettings);
            +              createServingConfigSettings,
            +              deleteServingConfigSettings,
            +              updateServingConfigSettings,
            +              getServingConfigSettings,
            +              listServingConfigsSettings);
                 }
             
                 private static Builder createDefault() {
            @@ -413,6 +452,16 @@ private static Builder createHttpJsonDefault() {
                 }
             
                 private static Builder initDefaults(Builder builder) {
            +      builder
            +          .createServingConfigSettings()
            +          .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes"))
            +          .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params"));
            +
            +      builder
            +          .deleteServingConfigSettings()
            +          .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes"))
            +          .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params"));
            +
                   builder
                       .updateServingConfigSettings()
                       .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes"))
            @@ -446,6 +495,18 @@ public Builder applyToAllUnaryMethods(
                   return unaryMethodSettingsBuilders;
                 }
             
            +    /** Returns the builder for the settings used for calls to createServingConfig. */
            +    public UnaryCallSettings.Builder
            +        createServingConfigSettings() {
            +      return createServingConfigSettings;
            +    }
            +
            +    /** Returns the builder for the settings used for calls to deleteServingConfig. */
            +    public UnaryCallSettings.Builder
            +        deleteServingConfigSettings() {
            +      return deleteServingConfigSettings;
            +    }
            +
                 /** Returns the builder for the settings used for calls to updateServingConfig. */
                 public UnaryCallSettings.Builder
                     updateServingConfigSettings() {
            diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/SessionServiceStubSettings.java b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/SessionServiceStubSettings.java
            index c7681f83d067..e76305359e30 100644
            --- a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/SessionServiceStubSettings.java
            +++ b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/SessionServiceStubSettings.java
            @@ -119,7 +119,12 @@
             public class SessionServiceStubSettings extends StubSettings {
               /** The default scopes of the service. */
               private static final ImmutableList DEFAULT_SERVICE_SCOPES =
            -      ImmutableList.builder().add("https://www.googleapis.com/auth/cloud-platform").build();
            +      ImmutableList.builder()
            +          .add("https://www.googleapis.com/auth/cloud-platform")
            +          .add("https://www.googleapis.com/auth/discoveryengine.assist.readwrite")
            +          .add("https://www.googleapis.com/auth/discoveryengine.readwrite")
            +          .add("https://www.googleapis.com/auth/discoveryengine.serving.readwrite")
            +          .build();
             
               private final UnaryCallSettings createSessionSettings;
               private final UnaryCallSettings deleteSessionSettings;
            diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/SiteSearchEngineServiceStubSettings.java b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/SiteSearchEngineServiceStubSettings.java
            index fb5b71e51e0f..993804b74a68 100644
            --- a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/SiteSearchEngineServiceStubSettings.java
            +++ b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/SiteSearchEngineServiceStubSettings.java
            @@ -182,7 +182,11 @@ public class SiteSearchEngineServiceStubSettings
                 extends StubSettings {
               /** The default scopes of the service. */
               private static final ImmutableList DEFAULT_SERVICE_SCOPES =
            -      ImmutableList.builder().add("https://www.googleapis.com/auth/cloud-platform").build();
            +      ImmutableList.builder()
            +          .add("https://www.googleapis.com/auth/cloud-platform")
            +          .add("https://www.googleapis.com/auth/discoveryengine.readwrite")
            +          .add("https://www.googleapis.com/auth/discoveryengine.serving.readwrite")
            +          .build();
             
               private final UnaryCallSettings
                   getSiteSearchEngineSettings;
            diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/UserEventServiceStubSettings.java b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/UserEventServiceStubSettings.java
            index 1b5048b2aaa0..939a93c3b5f8 100644
            --- a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/UserEventServiceStubSettings.java
            +++ b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/UserEventServiceStubSettings.java
            @@ -143,7 +143,12 @@
             public class UserEventServiceStubSettings extends StubSettings {
               /** The default scopes of the service. */
               private static final ImmutableList DEFAULT_SERVICE_SCOPES =
            -      ImmutableList.builder().add("https://www.googleapis.com/auth/cloud-platform").build();
            +      ImmutableList.builder()
            +          .add("https://www.googleapis.com/auth/cloud-platform")
            +          .add("https://www.googleapis.com/auth/discoveryengine.assist.readwrite")
            +          .add("https://www.googleapis.com/auth/discoveryengine.readwrite")
            +          .add("https://www.googleapis.com/auth/discoveryengine.serving.readwrite")
            +          .build();
             
               private final UnaryCallSettings writeUserEventSettings;
               private final UnaryCallSettings collectUserEventSettings;
            @@ -345,7 +350,7 @@ public static class Builder extends StubSettings.BuildernewArrayList(StatusCode.Code.UNAVAILABLE)));
                   definitions.put(
            -          "retry_policy_2_codes",
            +          "retry_policy_4_codes",
                       ImmutableSet.copyOf(Lists.newArrayList(StatusCode.Code.UNAVAILABLE)));
                   RETRYABLE_CODE_DEFINITIONS = definitions.build();
                 }
            @@ -376,7 +381,7 @@ public static class Builder extends StubSettings.BuildernewUnaryCallSettingsBuilder()
            -                  .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_2_codes"))
            -                  .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_2_params"))
            +                  .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_4_codes"))
            +                  .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_4_params"))
                               .build())
                       .setResponseTransformer(
                           ProtoOperationTransformers.ResponseTransformer.create(ImportUserEventsResponse.class))
            diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/UserLicenseServiceStub.java b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/UserLicenseServiceStub.java
            new file mode 100644
            index 000000000000..44add97a3e62
            --- /dev/null
            +++ b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/UserLicenseServiceStub.java
            @@ -0,0 +1,86 @@
            +/*
            + * 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.discoveryengine.v1beta.stub;
            +
            +import static com.google.cloud.discoveryengine.v1beta.UserLicenseServiceClient.ListUserLicensesPagedResponse;
            +
            +import com.google.api.core.BetaApi;
            +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.discoveryengine.v1beta.BatchUpdateUserLicensesMetadata;
            +import com.google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesRequest;
            +import com.google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesResponse;
            +import com.google.cloud.discoveryengine.v1beta.ListLicenseConfigsUsageStatsRequest;
            +import com.google.cloud.discoveryengine.v1beta.ListLicenseConfigsUsageStatsResponse;
            +import com.google.cloud.discoveryengine.v1beta.ListUserLicensesRequest;
            +import com.google.cloud.discoveryengine.v1beta.ListUserLicensesResponse;
            +import com.google.longrunning.Operation;
            +import com.google.longrunning.stub.OperationsStub;
            +import javax.annotation.Generated;
            +
            +// AUTO-GENERATED DOCUMENTATION AND CLASS.
            +/**
            + * Base stub class for the UserLicenseService service API.
            + *
            + * 

            This class is for advanced usage and reflects the underlying API directly. + */ +@BetaApi +@Generated("by gapic-generator-java") +public abstract class UserLicenseServiceStub implements BackgroundResource { + + public OperationsStub getOperationsStub() { + return null; + } + + public com.google.api.gax.httpjson.longrunning.stub.OperationsStub getHttpJsonOperationsStub() { + return null; + } + + public UnaryCallable + listUserLicensesPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listUserLicensesPagedCallable()"); + } + + public UnaryCallable + listUserLicensesCallable() { + throw new UnsupportedOperationException("Not implemented: listUserLicensesCallable()"); + } + + public UnaryCallable + listLicenseConfigsUsageStatsCallable() { + throw new UnsupportedOperationException( + "Not implemented: listLicenseConfigsUsageStatsCallable()"); + } + + public OperationCallable< + BatchUpdateUserLicensesRequest, + BatchUpdateUserLicensesResponse, + BatchUpdateUserLicensesMetadata> + batchUpdateUserLicensesOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: batchUpdateUserLicensesOperationCallable()"); + } + + public UnaryCallable + batchUpdateUserLicensesCallable() { + throw new UnsupportedOperationException("Not implemented: batchUpdateUserLicensesCallable()"); + } + + @Override + public abstract void close(); +} diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/UserLicenseServiceStubSettings.java b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/UserLicenseServiceStubSettings.java new file mode 100644 index 000000000000..dca29e3095f8 --- /dev/null +++ b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/UserLicenseServiceStubSettings.java @@ -0,0 +1,580 @@ +/* + * 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.discoveryengine.v1beta.stub; + +import static com.google.cloud.discoveryengine.v1beta.UserLicenseServiceClient.ListUserLicensesPagedResponse; + +import com.google.api.core.ApiFunction; +import com.google.api.core.ApiFuture; +import com.google.api.core.BetaApi; +import com.google.api.core.ObsoleteApi; +import com.google.api.gax.core.GaxProperties; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.GrpcTransportChannel; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.grpc.ProtoOperationTransformers; +import com.google.api.gax.httpjson.GaxHttpJsonProperties; +import com.google.api.gax.httpjson.HttpJsonTransportChannel; +import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; +import com.google.api.gax.longrunning.OperationSnapshot; +import com.google.api.gax.longrunning.OperationTimedPollAlgorithm; +import com.google.api.gax.retrying.RetrySettings; +import com.google.api.gax.rpc.ApiCallContext; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.LibraryMetadata; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.PageContext; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.PagedListDescriptor; +import com.google.api.gax.rpc.PagedListResponseFactory; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.StubSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesMetadata; +import com.google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesRequest; +import com.google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesResponse; +import com.google.cloud.discoveryengine.v1beta.ListLicenseConfigsUsageStatsRequest; +import com.google.cloud.discoveryengine.v1beta.ListLicenseConfigsUsageStatsResponse; +import com.google.cloud.discoveryengine.v1beta.ListUserLicensesRequest; +import com.google.cloud.discoveryengine.v1beta.ListUserLicensesResponse; +import com.google.cloud.discoveryengine.v1beta.UserLicense; +import com.google.common.collect.ImmutableList; +import com.google.common.collect.ImmutableMap; +import com.google.common.collect.ImmutableSet; +import com.google.common.collect.Lists; +import com.google.longrunning.Operation; +import java.io.IOException; +import java.time.Duration; +import java.util.List; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link UserLicenseServiceStub}. + * + *

            The default instance has everything set to sensible defaults: + * + *

              + *
            • The default service address (discoveryengine.googleapis.com) and default port (443) are + * used. + *
            • Credentials are acquired automatically through Application Default Credentials. + *
            • Retries are configured for idempotent methods but not for non-idempotent methods. + *
            + * + *

            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 listLicenseConfigsUsageStats: + * + *

            {@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
            + * UserLicenseServiceStubSettings.Builder userLicenseServiceSettingsBuilder =
            + *     UserLicenseServiceStubSettings.newBuilder();
            + * userLicenseServiceSettingsBuilder
            + *     .listLicenseConfigsUsageStatsSettings()
            + *     .setRetrySettings(
            + *         userLicenseServiceSettingsBuilder
            + *             .listLicenseConfigsUsageStatsSettings()
            + *             .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());
            + * UserLicenseServiceStubSettings userLicenseServiceSettings =
            + *     userLicenseServiceSettingsBuilder.build();
            + * }
            + * + * Please refer to the [Client Side Retry + * Guide](https://docs.cloud.google.com/java/docs/client-retries) for additional support in setting + * retries. + * + *

            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 batchUpdateUserLicenses: + * + *

            {@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
            + * UserLicenseServiceStubSettings.Builder userLicenseServiceSettingsBuilder =
            + *     UserLicenseServiceStubSettings.newBuilder();
            + * TimedRetryAlgorithm timedRetryAlgorithm =
            + *     OperationalTimedPollAlgorithm.create(
            + *         RetrySettings.newBuilder()
            + *             .setInitialRetryDelayDuration(Duration.ofMillis(500))
            + *             .setRetryDelayMultiplier(1.5)
            + *             .setMaxRetryDelayDuration(Duration.ofMillis(5000))
            + *             .setTotalTimeoutDuration(Duration.ofHours(24))
            + *             .build());
            + * userLicenseServiceSettingsBuilder
            + *     .createClusterOperationSettings()
            + *     .setPollingAlgorithm(timedRetryAlgorithm)
            + *     .build();
            + * }
            + */ +@BetaApi +@Generated("by gapic-generator-java") +@SuppressWarnings("CanonicalDuration") +public class UserLicenseServiceStubSettings extends StubSettings { + /** The default scopes of the service. */ + private static final ImmutableList DEFAULT_SERVICE_SCOPES = + ImmutableList.builder() + .add("https://www.googleapis.com/auth/cloud-platform") + .add("https://www.googleapis.com/auth/discoveryengine.readwrite") + .add("https://www.googleapis.com/auth/discoveryengine.serving.readwrite") + .build(); + + private final PagedCallSettings< + ListUserLicensesRequest, ListUserLicensesResponse, ListUserLicensesPagedResponse> + listUserLicensesSettings; + private final UnaryCallSettings< + ListLicenseConfigsUsageStatsRequest, ListLicenseConfigsUsageStatsResponse> + listLicenseConfigsUsageStatsSettings; + private final UnaryCallSettings + batchUpdateUserLicensesSettings; + private final OperationCallSettings< + BatchUpdateUserLicensesRequest, + BatchUpdateUserLicensesResponse, + BatchUpdateUserLicensesMetadata> + batchUpdateUserLicensesOperationSettings; + + private static final PagedListDescriptor< + ListUserLicensesRequest, ListUserLicensesResponse, UserLicense> + LIST_USER_LICENSES_PAGE_STR_DESC = + new PagedListDescriptor< + ListUserLicensesRequest, ListUserLicensesResponse, UserLicense>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListUserLicensesRequest injectToken( + ListUserLicensesRequest payload, String token) { + return ListUserLicensesRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListUserLicensesRequest injectPageSize( + ListUserLicensesRequest payload, int pageSize) { + return ListUserLicensesRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListUserLicensesRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListUserLicensesResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListUserLicensesResponse payload) { + return payload.getUserLicensesList(); + } + }; + + private static final PagedListResponseFactory< + ListUserLicensesRequest, ListUserLicensesResponse, ListUserLicensesPagedResponse> + LIST_USER_LICENSES_PAGE_STR_FACT = + new PagedListResponseFactory< + ListUserLicensesRequest, ListUserLicensesResponse, ListUserLicensesPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListUserLicensesRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext + pageContext = + PageContext.create( + callable, LIST_USER_LICENSES_PAGE_STR_DESC, request, context); + return ListUserLicensesPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + /** Returns the object with the settings used for calls to listUserLicenses. */ + public PagedCallSettings< + ListUserLicensesRequest, ListUserLicensesResponse, ListUserLicensesPagedResponse> + listUserLicensesSettings() { + return listUserLicensesSettings; + } + + /** Returns the object with the settings used for calls to listLicenseConfigsUsageStats. */ + public UnaryCallSettings< + ListLicenseConfigsUsageStatsRequest, ListLicenseConfigsUsageStatsResponse> + listLicenseConfigsUsageStatsSettings() { + return listLicenseConfigsUsageStatsSettings; + } + + /** Returns the object with the settings used for calls to batchUpdateUserLicenses. */ + public UnaryCallSettings + batchUpdateUserLicensesSettings() { + return batchUpdateUserLicensesSettings; + } + + /** Returns the object with the settings used for calls to batchUpdateUserLicenses. */ + public OperationCallSettings< + BatchUpdateUserLicensesRequest, + BatchUpdateUserLicensesResponse, + BatchUpdateUserLicensesMetadata> + batchUpdateUserLicensesOperationSettings() { + return batchUpdateUserLicensesOperationSettings; + } + + public UserLicenseServiceStub createStub() throws IOException { + if (getTransportChannelProvider() + .getTransportName() + .equals(GrpcTransportChannel.getGrpcTransportName())) { + return GrpcUserLicenseServiceStub.create(this); + } + if (getTransportChannelProvider() + .getTransportName() + .equals(HttpJsonTransportChannel.getHttpJsonTransportName())) { + return HttpJsonUserLicenseServiceStub.create(this); + } + throw new UnsupportedOperationException( + String.format( + "Transport not supported: %s", getTransportChannelProvider().getTransportName())); + } + + /** Returns the default service name. */ + @Override + public String getServiceName() { + return "discoveryengine"; + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return InstantiatingExecutorProvider.newBuilder(); + } + + /** Returns the default service endpoint. */ + @ObsoleteApi("Use getEndpoint() instead") + public static String getDefaultEndpoint() { + return "discoveryengine.googleapis.com:443"; + } + + /** Returns the default mTLS service endpoint. */ + public static String getDefaultMtlsEndpoint() { + return "discoveryengine.mtls.googleapis.com:443"; + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return DEFAULT_SERVICE_SCOPES; + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return GoogleCredentialsProvider.newBuilder() + .setScopesToApply(DEFAULT_SERVICE_SCOPES) + .setUseJwtAccessWithScope(true); + } + + /** Returns a builder for the default gRPC ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return InstantiatingGrpcChannelProvider.newBuilder() + .setMaxInboundMessageSize(Integer.MAX_VALUE); + } + + /** Returns a builder for the default REST ChannelProvider for this service. */ + @BetaApi + public static InstantiatingHttpJsonChannelProvider.Builder + defaultHttpJsonTransportProviderBuilder() { + return InstantiatingHttpJsonChannelProvider.newBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return defaultGrpcTransportProviderBuilder().build(); + } + + public static ApiClientHeaderProvider.Builder defaultGrpcApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", GaxProperties.getLibraryVersion(UserLicenseServiceStubSettings.class)) + .setTransportToken( + GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion()); + } + + public static ApiClientHeaderProvider.Builder defaultHttpJsonApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", GaxProperties.getLibraryVersion(UserLicenseServiceStubSettings.class)) + .setTransportToken( + GaxHttpJsonProperties.getHttpJsonTokenName(), + GaxHttpJsonProperties.getHttpJsonVersion()); + } + + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return UserLicenseServiceStubSettings.defaultGrpcApiClientHeaderProviderBuilder(); + } + + /** Returns a new gRPC builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new REST builder for this class. */ + public static Builder newHttpJsonBuilder() { + return Builder.createHttpJsonDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected UserLicenseServiceStubSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + + listUserLicensesSettings = settingsBuilder.listUserLicensesSettings().build(); + listLicenseConfigsUsageStatsSettings = + settingsBuilder.listLicenseConfigsUsageStatsSettings().build(); + batchUpdateUserLicensesSettings = settingsBuilder.batchUpdateUserLicensesSettings().build(); + batchUpdateUserLicensesOperationSettings = + settingsBuilder.batchUpdateUserLicensesOperationSettings().build(); + } + + @Override + protected LibraryMetadata getLibraryMetadata() { + return LibraryMetadata.newBuilder() + .setArtifactName("com.google.cloud:google-cloud-discoveryengine") + .setRepository("googleapis/google-cloud-java") + .setVersion(Version.VERSION) + .build(); + } + + /** Builder for UserLicenseServiceStubSettings. */ + public static class Builder + extends StubSettings.Builder { + private final ImmutableList> unaryMethodSettingsBuilders; + private final PagedCallSettings.Builder< + ListUserLicensesRequest, ListUserLicensesResponse, ListUserLicensesPagedResponse> + listUserLicensesSettings; + private final UnaryCallSettings.Builder< + ListLicenseConfigsUsageStatsRequest, ListLicenseConfigsUsageStatsResponse> + listLicenseConfigsUsageStatsSettings; + private final UnaryCallSettings.Builder + batchUpdateUserLicensesSettings; + private final OperationCallSettings.Builder< + BatchUpdateUserLicensesRequest, + BatchUpdateUserLicensesResponse, + BatchUpdateUserLicensesMetadata> + batchUpdateUserLicensesOperationSettings; + private static final ImmutableMap> + RETRYABLE_CODE_DEFINITIONS; + + static { + ImmutableMap.Builder> definitions = + ImmutableMap.builder(); + definitions.put("no_retry_codes", ImmutableSet.copyOf(Lists.newArrayList())); + RETRYABLE_CODE_DEFINITIONS = definitions.build(); + } + + private static final ImmutableMap RETRY_PARAM_DEFINITIONS; + + static { + ImmutableMap.Builder definitions = ImmutableMap.builder(); + RetrySettings settings = null; + settings = RetrySettings.newBuilder().setRpcTimeoutMultiplier(1.0).build(); + definitions.put("no_retry_params", settings); + RETRY_PARAM_DEFINITIONS = definitions.build(); + } + + protected Builder() { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(clientContext); + + listUserLicensesSettings = PagedCallSettings.newBuilder(LIST_USER_LICENSES_PAGE_STR_FACT); + listLicenseConfigsUsageStatsSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + batchUpdateUserLicensesSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + batchUpdateUserLicensesOperationSettings = OperationCallSettings.newBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + listUserLicensesSettings, + listLicenseConfigsUsageStatsSettings, + batchUpdateUserLicensesSettings); + initDefaults(this); + } + + protected Builder(UserLicenseServiceStubSettings settings) { + super(settings); + + listUserLicensesSettings = settings.listUserLicensesSettings.toBuilder(); + listLicenseConfigsUsageStatsSettings = + settings.listLicenseConfigsUsageStatsSettings.toBuilder(); + batchUpdateUserLicensesSettings = settings.batchUpdateUserLicensesSettings.toBuilder(); + batchUpdateUserLicensesOperationSettings = + settings.batchUpdateUserLicensesOperationSettings.toBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + listUserLicensesSettings, + listLicenseConfigsUsageStatsSettings, + batchUpdateUserLicensesSettings); + } + + private static Builder createDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultTransportChannelProvider()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); + builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + + private static Builder createHttpJsonDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultHttpJsonTransportProviderBuilder().build()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultHttpJsonApiClientHeaderProviderBuilder().build()); + builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + + private static Builder initDefaults(Builder builder) { + builder + .listUserLicensesSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .listLicenseConfigsUsageStatsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .batchUpdateUserLicensesSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .batchUpdateUserLicensesOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create( + BatchUpdateUserLicensesResponse.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create( + BatchUpdateUserLicensesMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelayDuration(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelayDuration(Duration.ofMillis(45000L)) + .setInitialRpcTimeoutDuration(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeoutDuration(Duration.ZERO) + .setTotalTimeoutDuration(Duration.ofMillis(300000L)) + .build())); + + return builder; + } + + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

            Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) { + super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); + return this; + } + + public ImmutableList> unaryMethodSettingsBuilders() { + return unaryMethodSettingsBuilders; + } + + /** Returns the builder for the settings used for calls to listUserLicenses. */ + public PagedCallSettings.Builder< + ListUserLicensesRequest, ListUserLicensesResponse, ListUserLicensesPagedResponse> + listUserLicensesSettings() { + return listUserLicensesSettings; + } + + /** Returns the builder for the settings used for calls to listLicenseConfigsUsageStats. */ + public UnaryCallSettings.Builder< + ListLicenseConfigsUsageStatsRequest, ListLicenseConfigsUsageStatsResponse> + listLicenseConfigsUsageStatsSettings() { + return listLicenseConfigsUsageStatsSettings; + } + + /** Returns the builder for the settings used for calls to batchUpdateUserLicenses. */ + public UnaryCallSettings.Builder + batchUpdateUserLicensesSettings() { + return batchUpdateUserLicensesSettings; + } + + /** Returns the builder for the settings used for calls to batchUpdateUserLicenses. */ + public OperationCallSettings.Builder< + BatchUpdateUserLicensesRequest, + BatchUpdateUserLicensesResponse, + BatchUpdateUserLicensesMetadata> + batchUpdateUserLicensesOperationSettings() { + return batchUpdateUserLicensesOperationSettings; + } + + @Override + public UserLicenseServiceStubSettings build() throws IOException { + return new UserLicenseServiceStubSettings(this); + } + } +} diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/UserStoreServiceStub.java b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/UserStoreServiceStub.java new file mode 100644 index 000000000000..295fef965dca --- /dev/null +++ b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/UserStoreServiceStub.java @@ -0,0 +1,47 @@ +/* + * 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.discoveryengine.v1beta.stub; + +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.discoveryengine.v1beta.GetUserStoreRequest; +import com.google.cloud.discoveryengine.v1beta.UpdateUserStoreRequest; +import com.google.cloud.discoveryengine.v1beta.UserStore; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Base stub class for the UserStoreService service API. + * + *

            This class is for advanced usage and reflects the underlying API directly. + */ +@BetaApi +@Generated("by gapic-generator-java") +public abstract class UserStoreServiceStub implements BackgroundResource { + + public UnaryCallable getUserStoreCallable() { + throw new UnsupportedOperationException("Not implemented: getUserStoreCallable()"); + } + + public UnaryCallable updateUserStoreCallable() { + throw new UnsupportedOperationException("Not implemented: updateUserStoreCallable()"); + } + + @Override + public abstract void close(); +} diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/UserStoreServiceStubSettings.java b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/UserStoreServiceStubSettings.java new file mode 100644 index 000000000000..42c24b950fbd --- /dev/null +++ b/java-discoveryengine/google-cloud-discoveryengine/src/main/java/com/google/cloud/discoveryengine/v1beta/stub/UserStoreServiceStubSettings.java @@ -0,0 +1,371 @@ +/* + * 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.discoveryengine.v1beta.stub; + +import com.google.api.core.ApiFunction; +import com.google.api.core.BetaApi; +import com.google.api.core.ObsoleteApi; +import com.google.api.gax.core.GaxProperties; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.GrpcTransportChannel; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.httpjson.GaxHttpJsonProperties; +import com.google.api.gax.httpjson.HttpJsonTransportChannel; +import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; +import com.google.api.gax.retrying.RetrySettings; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.LibraryMetadata; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.StubSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.cloud.discoveryengine.v1beta.GetUserStoreRequest; +import com.google.cloud.discoveryengine.v1beta.UpdateUserStoreRequest; +import com.google.cloud.discoveryengine.v1beta.UserStore; +import com.google.common.collect.ImmutableList; +import com.google.common.collect.ImmutableMap; +import com.google.common.collect.ImmutableSet; +import com.google.common.collect.Lists; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link UserStoreServiceStub}. + * + *

            The default instance has everything set to sensible defaults: + * + *

              + *
            • The default service address (discoveryengine.googleapis.com) and default port (443) are + * used. + *
            • Credentials are acquired automatically through Application Default Credentials. + *
            • Retries are configured for idempotent methods but not for non-idempotent methods. + *
            + * + *

            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 getUserStore: + * + *

            {@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
            + * UserStoreServiceStubSettings.Builder userStoreServiceSettingsBuilder =
            + *     UserStoreServiceStubSettings.newBuilder();
            + * userStoreServiceSettingsBuilder
            + *     .getUserStoreSettings()
            + *     .setRetrySettings(
            + *         userStoreServiceSettingsBuilder
            + *             .getUserStoreSettings()
            + *             .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());
            + * UserStoreServiceStubSettings userStoreServiceSettings = userStoreServiceSettingsBuilder.build();
            + * }
            + * + * Please refer to the [Client Side Retry + * Guide](https://docs.cloud.google.com/java/docs/client-retries) for additional support in setting + * retries. + */ +@BetaApi +@Generated("by gapic-generator-java") +@SuppressWarnings("CanonicalDuration") +public class UserStoreServiceStubSettings extends StubSettings { + /** The default scopes of the service. */ + private static final ImmutableList DEFAULT_SERVICE_SCOPES = + ImmutableList.builder() + .add("https://www.googleapis.com/auth/cloud-platform") + .add("https://www.googleapis.com/auth/discoveryengine.readwrite") + .add("https://www.googleapis.com/auth/discoveryengine.serving.readwrite") + .build(); + + private final UnaryCallSettings getUserStoreSettings; + private final UnaryCallSettings updateUserStoreSettings; + + /** Returns the object with the settings used for calls to getUserStore. */ + public UnaryCallSettings getUserStoreSettings() { + return getUserStoreSettings; + } + + /** Returns the object with the settings used for calls to updateUserStore. */ + public UnaryCallSettings updateUserStoreSettings() { + return updateUserStoreSettings; + } + + public UserStoreServiceStub createStub() throws IOException { + if (getTransportChannelProvider() + .getTransportName() + .equals(GrpcTransportChannel.getGrpcTransportName())) { + return GrpcUserStoreServiceStub.create(this); + } + if (getTransportChannelProvider() + .getTransportName() + .equals(HttpJsonTransportChannel.getHttpJsonTransportName())) { + return HttpJsonUserStoreServiceStub.create(this); + } + throw new UnsupportedOperationException( + String.format( + "Transport not supported: %s", getTransportChannelProvider().getTransportName())); + } + + /** Returns the default service name. */ + @Override + public String getServiceName() { + return "discoveryengine"; + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return InstantiatingExecutorProvider.newBuilder(); + } + + /** Returns the default service endpoint. */ + @ObsoleteApi("Use getEndpoint() instead") + public static String getDefaultEndpoint() { + return "discoveryengine.googleapis.com:443"; + } + + /** Returns the default mTLS service endpoint. */ + public static String getDefaultMtlsEndpoint() { + return "discoveryengine.mtls.googleapis.com:443"; + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return DEFAULT_SERVICE_SCOPES; + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return GoogleCredentialsProvider.newBuilder() + .setScopesToApply(DEFAULT_SERVICE_SCOPES) + .setUseJwtAccessWithScope(true); + } + + /** Returns a builder for the default gRPC ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return InstantiatingGrpcChannelProvider.newBuilder() + .setMaxInboundMessageSize(Integer.MAX_VALUE); + } + + /** Returns a builder for the default REST ChannelProvider for this service. */ + @BetaApi + public static InstantiatingHttpJsonChannelProvider.Builder + defaultHttpJsonTransportProviderBuilder() { + return InstantiatingHttpJsonChannelProvider.newBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return defaultGrpcTransportProviderBuilder().build(); + } + + public static ApiClientHeaderProvider.Builder defaultGrpcApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", GaxProperties.getLibraryVersion(UserStoreServiceStubSettings.class)) + .setTransportToken( + GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion()); + } + + public static ApiClientHeaderProvider.Builder defaultHttpJsonApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", GaxProperties.getLibraryVersion(UserStoreServiceStubSettings.class)) + .setTransportToken( + GaxHttpJsonProperties.getHttpJsonTokenName(), + GaxHttpJsonProperties.getHttpJsonVersion()); + } + + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return UserStoreServiceStubSettings.defaultGrpcApiClientHeaderProviderBuilder(); + } + + /** Returns a new gRPC builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new REST builder for this class. */ + public static Builder newHttpJsonBuilder() { + return Builder.createHttpJsonDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected UserStoreServiceStubSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + + getUserStoreSettings = settingsBuilder.getUserStoreSettings().build(); + updateUserStoreSettings = settingsBuilder.updateUserStoreSettings().build(); + } + + @Override + protected LibraryMetadata getLibraryMetadata() { + return LibraryMetadata.newBuilder() + .setArtifactName("com.google.cloud:google-cloud-discoveryengine") + .setRepository("googleapis/google-cloud-java") + .setVersion(Version.VERSION) + .build(); + } + + /** Builder for UserStoreServiceStubSettings. */ + public static class Builder extends StubSettings.Builder { + private final ImmutableList> unaryMethodSettingsBuilders; + private final UnaryCallSettings.Builder getUserStoreSettings; + private final UnaryCallSettings.Builder + updateUserStoreSettings; + private static final ImmutableMap> + RETRYABLE_CODE_DEFINITIONS; + + static { + ImmutableMap.Builder> definitions = + ImmutableMap.builder(); + definitions.put("no_retry_codes", ImmutableSet.copyOf(Lists.newArrayList())); + RETRYABLE_CODE_DEFINITIONS = definitions.build(); + } + + private static final ImmutableMap RETRY_PARAM_DEFINITIONS; + + static { + ImmutableMap.Builder definitions = ImmutableMap.builder(); + RetrySettings settings = null; + settings = RetrySettings.newBuilder().setRpcTimeoutMultiplier(1.0).build(); + definitions.put("no_retry_params", settings); + RETRY_PARAM_DEFINITIONS = definitions.build(); + } + + protected Builder() { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(clientContext); + + getUserStoreSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updateUserStoreSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + getUserStoreSettings, updateUserStoreSettings); + initDefaults(this); + } + + protected Builder(UserStoreServiceStubSettings settings) { + super(settings); + + getUserStoreSettings = settings.getUserStoreSettings.toBuilder(); + updateUserStoreSettings = settings.updateUserStoreSettings.toBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + getUserStoreSettings, updateUserStoreSettings); + } + + private static Builder createDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultTransportChannelProvider()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); + builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + + private static Builder createHttpJsonDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultHttpJsonTransportProviderBuilder().build()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultHttpJsonApiClientHeaderProviderBuilder().build()); + builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + + private static Builder initDefaults(Builder builder) { + builder + .getUserStoreSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .updateUserStoreSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + return builder; + } + + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

            Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) { + super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); + return this; + } + + public ImmutableList> unaryMethodSettingsBuilders() { + return unaryMethodSettingsBuilders; + } + + /** Returns the builder for the settings used for calls to getUserStore. */ + public UnaryCallSettings.Builder getUserStoreSettings() { + return getUserStoreSettings; + } + + /** Returns the builder for the settings used for calls to updateUserStore. */ + public UnaryCallSettings.Builder updateUserStoreSettings() { + return updateUserStoreSettings; + } + + @Override + public UserStoreServiceStubSettings build() throws IOException { + return new UserStoreServiceStubSettings(this); + } + } +} diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/main/resources/META-INF/native-image/com.google.cloud.discoveryengine.v1beta/reflect-config.json b/java-discoveryengine/google-cloud-discoveryengine/src/main/resources/META-INF/native-image/com.google.cloud.discoveryengine.v1beta/reflect-config.json index dea7a16d5153..e615baaf0953 100644 --- a/java-discoveryengine/google-cloud-discoveryengine/src/main/resources/META-INF/native-image/com.google.cloud.discoveryengine.v1beta/reflect-config.json +++ b/java-discoveryengine/google-cloud-discoveryengine/src/main/resources/META-INF/native-image/com.google.cloud.discoveryengine.v1beta/reflect-config.json @@ -494,6 +494,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.discoveryengine.v1beta.AclConfig", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.AclConfig$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest", "queryAllDeclaredConstructors": true, @@ -557,6 +575,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest$SuggestionTypeSpec", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest$SuggestionTypeSpec$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryResponse", "queryAllDeclaredConstructors": true, @@ -666,7 +702,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.AlloyDbSource", + "name": "com.google.cloud.discoveryengine.v1beta.AdvancedSiteSearchConfig", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -675,7 +711,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.AlloyDbSource$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.AdvancedSiteSearchConfig$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -684,7 +720,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.Answer", + "name": "com.google.cloud.discoveryengine.v1beta.AgentGatewaySetting", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -693,7 +729,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.Answer$AnswerSkippedReason", + "name": "com.google.cloud.discoveryengine.v1beta.AgentGatewaySetting$AgentGatewayReference", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -702,7 +738,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.Answer$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.AgentGatewaySetting$AgentGatewayReference$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -711,7 +747,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.Answer$Citation", + "name": "com.google.cloud.discoveryengine.v1beta.AgentGatewaySetting$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -720,7 +756,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.Answer$Citation$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.AlloyDbSource", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -729,7 +765,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.Answer$CitationSource", + "name": "com.google.cloud.discoveryengine.v1beta.AlloyDbSource$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -738,7 +774,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.Answer$CitationSource$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.Answer", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -747,7 +783,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.Answer$QueryUnderstandingInfo", + "name": "com.google.cloud.discoveryengine.v1beta.Answer$AnswerSkippedReason", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -756,7 +792,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.Answer$QueryUnderstandingInfo$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.Answer$BlobAttachment", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -765,7 +801,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.Answer$QueryUnderstandingInfo$QueryClassificationInfo", + "name": "com.google.cloud.discoveryengine.v1beta.Answer$BlobAttachment$AttributionType", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -774,7 +810,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.Answer$QueryUnderstandingInfo$QueryClassificationInfo$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.Answer$BlobAttachment$Blob", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -783,7 +819,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.Answer$QueryUnderstandingInfo$QueryClassificationInfo$Type", + "name": "com.google.cloud.discoveryengine.v1beta.Answer$BlobAttachment$Blob$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -792,7 +828,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.Answer$Reference", + "name": "com.google.cloud.discoveryengine.v1beta.Answer$BlobAttachment$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -801,7 +837,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.Answer$Reference$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.Answer$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -810,7 +846,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.Answer$Reference$ChunkInfo", + "name": "com.google.cloud.discoveryengine.v1beta.Answer$Citation", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -819,7 +855,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.Answer$Reference$ChunkInfo$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.Answer$Citation$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -828,7 +864,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.Answer$Reference$ChunkInfo$DocumentMetadata", + "name": "com.google.cloud.discoveryengine.v1beta.Answer$CitationSource", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -837,7 +873,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.Answer$Reference$ChunkInfo$DocumentMetadata$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.Answer$CitationSource$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -846,7 +882,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.Answer$Reference$StructuredDocumentInfo", + "name": "com.google.cloud.discoveryengine.v1beta.Answer$GroundingSupport", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -855,7 +891,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.Answer$Reference$StructuredDocumentInfo$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.Answer$GroundingSupport$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -864,7 +900,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.Answer$Reference$UnstructuredDocumentInfo", + "name": "com.google.cloud.discoveryengine.v1beta.Answer$QueryUnderstandingInfo", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -873,7 +909,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.Answer$Reference$UnstructuredDocumentInfo$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.Answer$QueryUnderstandingInfo$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -882,7 +918,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.Answer$Reference$UnstructuredDocumentInfo$ChunkContent", + "name": "com.google.cloud.discoveryengine.v1beta.Answer$QueryUnderstandingInfo$QueryClassificationInfo", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -891,7 +927,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.Answer$Reference$UnstructuredDocumentInfo$ChunkContent$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.Answer$QueryUnderstandingInfo$QueryClassificationInfo$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -900,7 +936,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.Answer$State", + "name": "com.google.cloud.discoveryengine.v1beta.Answer$QueryUnderstandingInfo$QueryClassificationInfo$Type", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -909,7 +945,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.Answer$Step", + "name": "com.google.cloud.discoveryengine.v1beta.Answer$Reference", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -918,7 +954,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.Answer$Step$Action", + "name": "com.google.cloud.discoveryengine.v1beta.Answer$Reference$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -927,7 +963,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.Answer$Step$Action$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.Answer$Reference$ChunkInfo", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -936,7 +972,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.Answer$Step$Action$Observation", + "name": "com.google.cloud.discoveryengine.v1beta.Answer$Reference$ChunkInfo$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -945,7 +981,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.Answer$Step$Action$Observation$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.Answer$Reference$ChunkInfo$DocumentMetadata", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -954,7 +990,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.Answer$Step$Action$Observation$SearchResult", + "name": "com.google.cloud.discoveryengine.v1beta.Answer$Reference$ChunkInfo$DocumentMetadata$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -963,7 +999,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.Answer$Step$Action$Observation$SearchResult$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.Answer$Reference$StructuredDocumentInfo", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -972,7 +1008,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.Answer$Step$Action$Observation$SearchResult$ChunkInfo", + "name": "com.google.cloud.discoveryengine.v1beta.Answer$Reference$StructuredDocumentInfo$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -981,7 +1017,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.Answer$Step$Action$Observation$SearchResult$ChunkInfo$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.Answer$Reference$UnstructuredDocumentInfo", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -990,7 +1026,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.Answer$Step$Action$Observation$SearchResult$SnippetInfo", + "name": "com.google.cloud.discoveryengine.v1beta.Answer$Reference$UnstructuredDocumentInfo$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -999,7 +1035,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.Answer$Step$Action$Observation$SearchResult$SnippetInfo$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.Answer$Reference$UnstructuredDocumentInfo$ChunkContent", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1008,7 +1044,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.Answer$Step$Action$SearchAction", + "name": "com.google.cloud.discoveryengine.v1beta.Answer$Reference$UnstructuredDocumentInfo$ChunkContent$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1017,7 +1053,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.Answer$Step$Action$SearchAction$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.Answer$State", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1026,7 +1062,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.Answer$Step$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.Answer$Step", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1035,7 +1071,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.Answer$Step$State", + "name": "com.google.cloud.discoveryengine.v1beta.Answer$Step$Action", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1044,7 +1080,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest", + "name": "com.google.cloud.discoveryengine.v1beta.Answer$Step$Action$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1053,7 +1089,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest$AnswerGenerationSpec", + "name": "com.google.cloud.discoveryengine.v1beta.Answer$Step$Action$Observation", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1062,7 +1098,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest$AnswerGenerationSpec$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.Answer$Step$Action$Observation$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1071,7 +1107,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest$AnswerGenerationSpec$ModelSpec", + "name": "com.google.cloud.discoveryengine.v1beta.Answer$Step$Action$Observation$SearchResult", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1080,7 +1116,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest$AnswerGenerationSpec$ModelSpec$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.Answer$Step$Action$Observation$SearchResult$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1089,7 +1125,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest$AnswerGenerationSpec$PromptSpec", + "name": "com.google.cloud.discoveryengine.v1beta.Answer$Step$Action$Observation$SearchResult$ChunkInfo", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1098,7 +1134,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest$AnswerGenerationSpec$PromptSpec$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.Answer$Step$Action$Observation$SearchResult$ChunkInfo$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1107,7 +1143,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.Answer$Step$Action$Observation$SearchResult$SnippetInfo", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1116,7 +1152,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest$GroundingSpec", + "name": "com.google.cloud.discoveryengine.v1beta.Answer$Step$Action$Observation$SearchResult$SnippetInfo$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1125,7 +1161,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest$GroundingSpec$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.Answer$Step$Action$SearchAction", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1134,7 +1170,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest$GroundingSpec$FilteringLevel", + "name": "com.google.cloud.discoveryengine.v1beta.Answer$Step$Action$SearchAction$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1143,7 +1179,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest$QueryUnderstandingSpec", + "name": "com.google.cloud.discoveryengine.v1beta.Answer$Step$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1152,7 +1188,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest$QueryUnderstandingSpec$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.Answer$Step$State", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1161,7 +1197,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest$QueryUnderstandingSpec$QueryClassificationSpec", + "name": "com.google.cloud.discoveryengine.v1beta.AnswerGenerationSpec", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1170,7 +1206,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest$QueryUnderstandingSpec$QueryClassificationSpec$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.AnswerGenerationSpec$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1179,7 +1215,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest$QueryUnderstandingSpec$QueryClassificationSpec$Type", + "name": "com.google.cloud.discoveryengine.v1beta.AnswerGenerationSpec$UserDefinedClassifierSpec", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1188,7 +1224,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest$QueryUnderstandingSpec$QueryRephraserSpec", + "name": "com.google.cloud.discoveryengine.v1beta.AnswerGenerationSpec$UserDefinedClassifierSpec$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1197,7 +1233,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest$QueryUnderstandingSpec$QueryRephraserSpec$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1206,7 +1242,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest$RelatedQuestionsSpec", + "name": "com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest$AnswerGenerationSpec", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1215,7 +1251,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest$RelatedQuestionsSpec$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest$AnswerGenerationSpec$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1224,7 +1260,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest$SafetySpec", + "name": "com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest$AnswerGenerationSpec$ModelSpec", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1233,7 +1269,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest$SafetySpec$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest$AnswerGenerationSpec$ModelSpec$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1242,7 +1278,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest$SearchSpec", + "name": "com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest$AnswerGenerationSpec$MultimodalSpec", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1251,7 +1287,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest$SearchSpec$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest$AnswerGenerationSpec$MultimodalSpec$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1260,7 +1296,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest$SearchSpec$SearchParams", + "name": "com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest$AnswerGenerationSpec$MultimodalSpec$ImageSource", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1269,7 +1305,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest$SearchSpec$SearchParams$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest$AnswerGenerationSpec$PromptSpec", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1278,7 +1314,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest$SearchSpec$SearchResultList", + "name": "com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest$AnswerGenerationSpec$PromptSpec$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1287,7 +1323,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest$SearchSpec$SearchResultList$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1296,7 +1332,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest$SearchSpec$SearchResultList$SearchResult", + "name": "com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest$EndUserSpec", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1305,7 +1341,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest$SearchSpec$SearchResultList$SearchResult$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest$EndUserSpec$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1314,7 +1350,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest$SearchSpec$SearchResultList$SearchResult$ChunkInfo", + "name": "com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest$EndUserSpec$EndUserMetaData", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1323,7 +1359,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest$SearchSpec$SearchResultList$SearchResult$ChunkInfo$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest$EndUserSpec$EndUserMetaData$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1332,7 +1368,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest$SearchSpec$SearchResultList$SearchResult$ChunkInfo$DocumentMetadata", + "name": "com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest$EndUserSpec$EndUserMetaData$ChunkInfo", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1341,7 +1377,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest$SearchSpec$SearchResultList$SearchResult$ChunkInfo$DocumentMetadata$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest$EndUserSpec$EndUserMetaData$ChunkInfo$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1350,7 +1386,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest$SearchSpec$SearchResultList$SearchResult$UnstructuredDocumentInfo", + "name": "com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest$EndUserSpec$EndUserMetaData$ChunkInfo$DocumentMetadata", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1359,7 +1395,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest$SearchSpec$SearchResultList$SearchResult$UnstructuredDocumentInfo$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest$EndUserSpec$EndUserMetaData$ChunkInfo$DocumentMetadata$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1368,7 +1404,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest$SearchSpec$SearchResultList$SearchResult$UnstructuredDocumentInfo$DocumentContext", + "name": "com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest$GroundingSpec", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1377,7 +1413,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest$SearchSpec$SearchResultList$SearchResult$UnstructuredDocumentInfo$DocumentContext$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest$GroundingSpec$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1386,7 +1422,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest$SearchSpec$SearchResultList$SearchResult$UnstructuredDocumentInfo$ExtractiveAnswer", + "name": "com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest$GroundingSpec$FilteringLevel", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1395,7 +1431,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest$SearchSpec$SearchResultList$SearchResult$UnstructuredDocumentInfo$ExtractiveAnswer$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest$QueryUnderstandingSpec", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1404,7 +1440,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest$SearchSpec$SearchResultList$SearchResult$UnstructuredDocumentInfo$ExtractiveSegment", + "name": "com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest$QueryUnderstandingSpec$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1413,7 +1449,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest$SearchSpec$SearchResultList$SearchResult$UnstructuredDocumentInfo$ExtractiveSegment$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest$QueryUnderstandingSpec$QueryClassificationSpec", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1422,7 +1458,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.AnswerQueryResponse", + "name": "com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest$QueryUnderstandingSpec$QueryClassificationSpec$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1431,7 +1467,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.AnswerQueryResponse$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest$QueryUnderstandingSpec$QueryClassificationSpec$Type", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1440,7 +1476,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.BatchCreateTargetSiteMetadata", + "name": "com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest$QueryUnderstandingSpec$QueryRephraserSpec", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1449,7 +1485,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.BatchCreateTargetSiteMetadata$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest$QueryUnderstandingSpec$QueryRephraserSpec$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1458,7 +1494,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.BatchCreateTargetSitesRequest", + "name": "com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest$QueryUnderstandingSpec$QueryRephraserSpec$ModelSpec", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1467,7 +1503,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.BatchCreateTargetSitesRequest$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest$QueryUnderstandingSpec$QueryRephraserSpec$ModelSpec$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1476,7 +1512,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.BatchCreateTargetSitesResponse", + "name": "com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest$QueryUnderstandingSpec$QueryRephraserSpec$ModelSpec$ModelType", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1485,7 +1521,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.BatchCreateTargetSitesResponse$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest$RelatedQuestionsSpec", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1494,7 +1530,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.BatchGetDocumentsMetadataRequest", + "name": "com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest$RelatedQuestionsSpec$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1503,7 +1539,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.BatchGetDocumentsMetadataRequest$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest$SafetySpec", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1512,7 +1548,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.BatchGetDocumentsMetadataRequest$FhirMatcher", + "name": "com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest$SafetySpec$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1521,7 +1557,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.BatchGetDocumentsMetadataRequest$FhirMatcher$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest$SafetySpec$SafetySetting", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1530,7 +1566,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.BatchGetDocumentsMetadataRequest$Matcher", + "name": "com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest$SafetySpec$SafetySetting$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1539,7 +1575,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.BatchGetDocumentsMetadataRequest$Matcher$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest$SafetySpec$SafetySetting$HarmBlockThreshold", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1548,7 +1584,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.BatchGetDocumentsMetadataRequest$UrisMatcher", + "name": "com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest$SearchSpec", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1557,7 +1593,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.BatchGetDocumentsMetadataRequest$UrisMatcher$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest$SearchSpec$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1566,7 +1602,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.BatchGetDocumentsMetadataResponse", + "name": "com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest$SearchSpec$SearchParams", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1575,7 +1611,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.BatchGetDocumentsMetadataResponse$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest$SearchSpec$SearchParams$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1584,7 +1620,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.BatchGetDocumentsMetadataResponse$DocumentMetadata", + "name": "com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest$SearchSpec$SearchResultList", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1593,7 +1629,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.BatchGetDocumentsMetadataResponse$DocumentMetadata$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest$SearchSpec$SearchResultList$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1602,7 +1638,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.BatchGetDocumentsMetadataResponse$DocumentMetadata$MatcherValue", + "name": "com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest$SearchSpec$SearchResultList$SearchResult", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1611,7 +1647,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.BatchGetDocumentsMetadataResponse$DocumentMetadata$MatcherValue$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest$SearchSpec$SearchResultList$SearchResult$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1620,7 +1656,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.BatchGetDocumentsMetadataResponse$State", + "name": "com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest$SearchSpec$SearchResultList$SearchResult$ChunkInfo", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1629,7 +1665,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.BatchVerifyTargetSitesMetadata", + "name": "com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest$SearchSpec$SearchResultList$SearchResult$ChunkInfo$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1638,7 +1674,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.BatchVerifyTargetSitesMetadata$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest$SearchSpec$SearchResultList$SearchResult$ChunkInfo$DocumentMetadata", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1647,7 +1683,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.BatchVerifyTargetSitesRequest", + "name": "com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest$SearchSpec$SearchResultList$SearchResult$ChunkInfo$DocumentMetadata$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1656,7 +1692,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.BatchVerifyTargetSitesRequest$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest$SearchSpec$SearchResultList$SearchResult$UnstructuredDocumentInfo", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1665,7 +1701,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.BatchVerifyTargetSitesResponse", + "name": "com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest$SearchSpec$SearchResultList$SearchResult$UnstructuredDocumentInfo$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1674,7 +1710,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.BatchVerifyTargetSitesResponse$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest$SearchSpec$SearchResultList$SearchResult$UnstructuredDocumentInfo$DocumentContext", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1683,7 +1719,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.BigQuerySource", + "name": "com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest$SearchSpec$SearchResultList$SearchResult$UnstructuredDocumentInfo$DocumentContext$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1692,7 +1728,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.BigQuerySource$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest$SearchSpec$SearchResultList$SearchResult$UnstructuredDocumentInfo$ExtractiveAnswer", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1701,7 +1737,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.BigtableOptions", + "name": "com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest$SearchSpec$SearchResultList$SearchResult$UnstructuredDocumentInfo$ExtractiveAnswer$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1710,7 +1746,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.BigtableOptions$BigtableColumn", + "name": "com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest$SearchSpec$SearchResultList$SearchResult$UnstructuredDocumentInfo$ExtractiveSegment", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1719,7 +1755,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.BigtableOptions$BigtableColumn$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest$SearchSpec$SearchResultList$SearchResult$UnstructuredDocumentInfo$ExtractiveSegment$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1728,7 +1764,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.BigtableOptions$BigtableColumnFamily", + "name": "com.google.cloud.discoveryengine.v1beta.AnswerQueryResponse", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1737,7 +1773,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.BigtableOptions$BigtableColumnFamily$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.AnswerQueryResponse$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1746,7 +1782,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.BigtableOptions$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.AssistAnswer", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1755,7 +1791,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.BigtableOptions$Encoding", + "name": "com.google.cloud.discoveryengine.v1beta.AssistAnswer$AssistSkippedReason", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1764,7 +1800,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.BigtableOptions$Type", + "name": "com.google.cloud.discoveryengine.v1beta.AssistAnswer$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1773,7 +1809,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.BigtableSource", + "name": "com.google.cloud.discoveryengine.v1beta.AssistAnswer$CustomerPolicyEnforcementResult", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1782,7 +1818,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.BigtableSource$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.AssistAnswer$CustomerPolicyEnforcementResult$BannedPhraseEnforcementResult", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1791,7 +1827,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.CheckGroundingRequest", + "name": "com.google.cloud.discoveryengine.v1beta.AssistAnswer$CustomerPolicyEnforcementResult$BannedPhraseEnforcementResult$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1800,7 +1836,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.CheckGroundingRequest$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.AssistAnswer$CustomerPolicyEnforcementResult$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1809,7 +1845,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.CheckGroundingResponse", + "name": "com.google.cloud.discoveryengine.v1beta.AssistAnswer$CustomerPolicyEnforcementResult$ModelArmorEnforcementResult", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1818,7 +1854,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.CheckGroundingResponse$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.AssistAnswer$CustomerPolicyEnforcementResult$ModelArmorEnforcementResult$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1827,7 +1863,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.CheckGroundingResponse$CheckGroundingFactChunk", + "name": "com.google.cloud.discoveryengine.v1beta.AssistAnswer$CustomerPolicyEnforcementResult$PolicyEnforcementResult", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1836,7 +1872,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.CheckGroundingResponse$CheckGroundingFactChunk$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.AssistAnswer$CustomerPolicyEnforcementResult$PolicyEnforcementResult$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1845,7 +1881,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.CheckGroundingResponse$Claim", + "name": "com.google.cloud.discoveryengine.v1beta.AssistAnswer$CustomerPolicyEnforcementResult$Verdict", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1854,7 +1890,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.CheckGroundingResponse$Claim$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.AssistAnswer$Reply", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1863,7 +1899,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.CheckGroundingSpec", + "name": "com.google.cloud.discoveryengine.v1beta.AssistAnswer$Reply$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1872,7 +1908,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.CheckGroundingSpec$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.AssistAnswer$State", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1881,7 +1917,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.Chunk", + "name": "com.google.cloud.discoveryengine.v1beta.AssistUserMetadata", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1890,7 +1926,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.Chunk$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.AssistUserMetadata$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1899,7 +1935,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.Chunk$ChunkMetadata", + "name": "com.google.cloud.discoveryengine.v1beta.Assistant", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1908,7 +1944,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.Chunk$ChunkMetadata$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.Assistant$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1917,7 +1953,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.Chunk$DocumentMetadata", + "name": "com.google.cloud.discoveryengine.v1beta.Assistant$CustomerPolicy", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1926,7 +1962,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.Chunk$DocumentMetadata$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.Assistant$CustomerPolicy$BannedPhrase", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1935,7 +1971,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.Chunk$PageSpan", + "name": "com.google.cloud.discoveryengine.v1beta.Assistant$CustomerPolicy$BannedPhrase$BannedPhraseMatchType", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1944,7 +1980,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.Chunk$PageSpan$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.Assistant$CustomerPolicy$BannedPhrase$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1953,7 +1989,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.CloudSqlSource", + "name": "com.google.cloud.discoveryengine.v1beta.Assistant$CustomerPolicy$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1962,7 +1998,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.CloudSqlSource$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.Assistant$CustomerPolicy$ModelArmorConfig", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1971,7 +2007,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.CollectUserEventRequest", + "name": "com.google.cloud.discoveryengine.v1beta.Assistant$CustomerPolicy$ModelArmorConfig$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1980,7 +2016,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.CollectUserEventRequest$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.Assistant$CustomerPolicy$ModelArmorConfig$FailureMode", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1989,7 +2025,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.CompleteQueryRequest", + "name": "com.google.cloud.discoveryengine.v1beta.Assistant$GenerationConfig", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1998,7 +2034,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.CompleteQueryRequest$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.Assistant$GenerationConfig$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2007,7 +2043,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.CompleteQueryResponse", + "name": "com.google.cloud.discoveryengine.v1beta.Assistant$GenerationConfig$SystemInstruction", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2016,7 +2052,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.CompleteQueryResponse$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.Assistant$GenerationConfig$SystemInstruction$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2025,7 +2061,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.CompleteQueryResponse$QuerySuggestion", + "name": "com.google.cloud.discoveryengine.v1beta.Assistant$ToolInfo", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2034,7 +2070,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.CompleteQueryResponse$QuerySuggestion$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.Assistant$ToolInfo$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2043,7 +2079,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.CompletionInfo", + "name": "com.google.cloud.discoveryengine.v1beta.Assistant$ToolList", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2052,7 +2088,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.CompletionInfo$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.Assistant$ToolList$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2061,7 +2097,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.CompletionSuggestion", + "name": "com.google.cloud.discoveryengine.v1beta.Assistant$WebGroundingType", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2070,7 +2106,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.CompletionSuggestion$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.AssistantContent", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2079,7 +2115,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.Condition", + "name": "com.google.cloud.discoveryengine.v1beta.AssistantContent$Blob", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2088,7 +2124,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.Condition$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.AssistantContent$Blob$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2097,7 +2133,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.Condition$QueryTerm", + "name": "com.google.cloud.discoveryengine.v1beta.AssistantContent$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2106,7 +2142,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.Condition$QueryTerm$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.AssistantContent$CodeExecutionResult", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2115,7 +2151,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.Condition$TimeRange", + "name": "com.google.cloud.discoveryengine.v1beta.AssistantContent$CodeExecutionResult$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2124,7 +2160,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.Condition$TimeRange$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.AssistantContent$CodeExecutionResult$Outcome", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2133,7 +2169,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.Control", + "name": "com.google.cloud.discoveryengine.v1beta.AssistantContent$ExecutableCode", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2142,7 +2178,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.Control$BoostAction", + "name": "com.google.cloud.discoveryengine.v1beta.AssistantContent$ExecutableCode$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2151,7 +2187,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.Control$BoostAction$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.AssistantContent$File", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2160,7 +2196,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.Control$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.AssistantContent$File$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2169,7 +2205,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.Control$FilterAction", + "name": "com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2178,7 +2214,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.Control$FilterAction$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2187,7 +2223,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.Control$RedirectAction", + "name": "com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent$TextGroundingMetadata", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2196,7 +2232,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.Control$RedirectAction$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent$TextGroundingMetadata$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2205,7 +2241,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.Control$SynonymsAction", + "name": "com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent$TextGroundingMetadata$Reference", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2214,7 +2250,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.Control$SynonymsAction$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent$TextGroundingMetadata$Reference$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2223,7 +2259,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.Conversation", + "name": "com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent$TextGroundingMetadata$Reference$DocumentMetadata", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2232,7 +2268,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.Conversation$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent$TextGroundingMetadata$Reference$DocumentMetadata$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2241,7 +2277,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.Conversation$State", + "name": "com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent$TextGroundingMetadata$Reference$DocumentMetadata$Language", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2250,7 +2286,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.ConversationContext", + "name": "com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent$TextGroundingMetadata$Segment", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2259,7 +2295,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.ConversationContext$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent$TextGroundingMetadata$Segment$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2268,7 +2304,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.ConversationMessage", + "name": "com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent$TextGroundingMetadata$VisualSegment", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2277,7 +2313,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.ConversationMessage$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent$TextGroundingMetadata$VisualSegment$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2286,7 +2322,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.ConverseConversationRequest", + "name": "com.google.cloud.discoveryengine.v1beta.BatchCreateTargetSiteMetadata", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2295,7 +2331,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.ConverseConversationRequest$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.BatchCreateTargetSiteMetadata$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2304,7 +2340,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.ConverseConversationResponse", + "name": "com.google.cloud.discoveryengine.v1beta.BatchCreateTargetSitesRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2313,7 +2349,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.ConverseConversationResponse$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.BatchCreateTargetSitesRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2322,7 +2358,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.CreateControlRequest", + "name": "com.google.cloud.discoveryengine.v1beta.BatchCreateTargetSitesResponse", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2331,7 +2367,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.CreateControlRequest$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.BatchCreateTargetSitesResponse$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2340,7 +2376,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.CreateConversationRequest", + "name": "com.google.cloud.discoveryengine.v1beta.BatchGetDocumentsMetadataRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2349,7 +2385,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.CreateConversationRequest$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.BatchGetDocumentsMetadataRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2358,7 +2394,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.CreateDataStoreMetadata", + "name": "com.google.cloud.discoveryengine.v1beta.BatchGetDocumentsMetadataRequest$FhirMatcher", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2367,7 +2403,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.CreateDataStoreMetadata$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.BatchGetDocumentsMetadataRequest$FhirMatcher$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2376,7 +2412,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.CreateDataStoreRequest", + "name": "com.google.cloud.discoveryengine.v1beta.BatchGetDocumentsMetadataRequest$Matcher", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2385,7 +2421,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.CreateDataStoreRequest$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.BatchGetDocumentsMetadataRequest$Matcher$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2394,7 +2430,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.CreateDocumentRequest", + "name": "com.google.cloud.discoveryengine.v1beta.BatchGetDocumentsMetadataRequest$UrisMatcher", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2403,7 +2439,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.CreateDocumentRequest$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.BatchGetDocumentsMetadataRequest$UrisMatcher$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2412,7 +2448,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.CreateEngineMetadata", + "name": "com.google.cloud.discoveryengine.v1beta.BatchGetDocumentsMetadataResponse", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2421,7 +2457,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.CreateEngineMetadata$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.BatchGetDocumentsMetadataResponse$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2430,7 +2466,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.CreateEngineRequest", + "name": "com.google.cloud.discoveryengine.v1beta.BatchGetDocumentsMetadataResponse$DocumentMetadata", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2439,7 +2475,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.CreateEngineRequest$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.BatchGetDocumentsMetadataResponse$DocumentMetadata$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2448,7 +2484,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.CreateEvaluationMetadata", + "name": "com.google.cloud.discoveryengine.v1beta.BatchGetDocumentsMetadataResponse$DocumentMetadata$MatcherValue", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2457,7 +2493,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.CreateEvaluationMetadata$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.BatchGetDocumentsMetadataResponse$DocumentMetadata$MatcherValue$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2466,7 +2502,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.CreateEvaluationRequest", + "name": "com.google.cloud.discoveryengine.v1beta.BatchGetDocumentsMetadataResponse$State", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2475,7 +2511,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.CreateEvaluationRequest$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesMetadata", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2484,7 +2520,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.CreateSampleQueryRequest", + "name": "com.google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesMetadata$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2493,7 +2529,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.CreateSampleQueryRequest$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2502,7 +2538,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.CreateSampleQuerySetRequest", + "name": "com.google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2511,7 +2547,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.CreateSampleQuerySetRequest$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesRequest$InlineSource", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2520,7 +2556,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.CreateSchemaMetadata", + "name": "com.google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesRequest$InlineSource$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2529,7 +2565,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.CreateSchemaMetadata$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesResponse", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2538,7 +2574,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.CreateSchemaRequest", + "name": "com.google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesResponse$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2547,7 +2583,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.CreateSchemaRequest$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.BatchVerifyTargetSitesMetadata", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2556,7 +2592,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.CreateSessionRequest", + "name": "com.google.cloud.discoveryengine.v1beta.BatchVerifyTargetSitesMetadata$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2565,7 +2601,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.CreateSessionRequest$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.BatchVerifyTargetSitesRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2574,7 +2610,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.CreateSitemapMetadata", + "name": "com.google.cloud.discoveryengine.v1beta.BatchVerifyTargetSitesRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2583,7 +2619,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.CreateSitemapMetadata$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.BatchVerifyTargetSitesResponse", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2592,7 +2628,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.CreateSitemapRequest", + "name": "com.google.cloud.discoveryengine.v1beta.BatchVerifyTargetSitesResponse$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2601,7 +2637,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.CreateSitemapRequest$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.BigQuerySource", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2610,7 +2646,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.CreateTargetSiteMetadata", + "name": "com.google.cloud.discoveryengine.v1beta.BigQuerySource$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2619,7 +2655,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.CreateTargetSiteMetadata$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.BigtableOptions", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2628,7 +2664,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.CreateTargetSiteRequest", + "name": "com.google.cloud.discoveryengine.v1beta.BigtableOptions$BigtableColumn", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2637,7 +2673,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.CreateTargetSiteRequest$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.BigtableOptions$BigtableColumn$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2646,7 +2682,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.CustomAttribute", + "name": "com.google.cloud.discoveryengine.v1beta.BigtableOptions$BigtableColumnFamily", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2655,7 +2691,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.CustomAttribute$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.BigtableOptions$BigtableColumnFamily$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2664,7 +2700,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.CustomTuningModel", + "name": "com.google.cloud.discoveryengine.v1beta.BigtableOptions$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2673,7 +2709,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.CustomTuningModel$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.BigtableOptions$Encoding", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2682,7 +2718,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.CustomTuningModel$ModelState", + "name": "com.google.cloud.discoveryengine.v1beta.BigtableOptions$Type", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2691,7 +2727,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.DataStore", + "name": "com.google.cloud.discoveryengine.v1beta.BigtableSource", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2700,7 +2736,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.DataStore$BillingEstimation", + "name": "com.google.cloud.discoveryengine.v1beta.BigtableSource$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2709,7 +2745,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.DataStore$BillingEstimation$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.CheckGroundingRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2718,7 +2754,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.DataStore$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.CheckGroundingRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2727,7 +2763,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.DataStore$ContentConfig", + "name": "com.google.cloud.discoveryengine.v1beta.CheckGroundingResponse", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2736,7 +2772,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.DataStore$ServingConfigDataStore", + "name": "com.google.cloud.discoveryengine.v1beta.CheckGroundingResponse$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2745,7 +2781,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.DataStore$ServingConfigDataStore$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.CheckGroundingResponse$CheckGroundingFactChunk", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2754,7 +2790,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.DeleteControlRequest", + "name": "com.google.cloud.discoveryengine.v1beta.CheckGroundingResponse$CheckGroundingFactChunk$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2763,7 +2799,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.DeleteControlRequest$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.CheckGroundingResponse$Claim", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2772,7 +2808,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.DeleteConversationRequest", + "name": "com.google.cloud.discoveryengine.v1beta.CheckGroundingResponse$Claim$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2781,7 +2817,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.DeleteConversationRequest$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.CheckGroundingSpec", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2790,7 +2826,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.DeleteDataStoreMetadata", + "name": "com.google.cloud.discoveryengine.v1beta.CheckGroundingSpec$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2799,7 +2835,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.DeleteDataStoreMetadata$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.Chunk", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2808,7 +2844,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.DeleteDataStoreRequest", + "name": "com.google.cloud.discoveryengine.v1beta.Chunk$AnnotationMetadata", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2817,7 +2853,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.DeleteDataStoreRequest$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.Chunk$AnnotationMetadata$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2826,7 +2862,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.DeleteDocumentRequest", + "name": "com.google.cloud.discoveryengine.v1beta.Chunk$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2835,7 +2871,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.DeleteDocumentRequest$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.Chunk$ChunkMetadata", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2844,7 +2880,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.DeleteEngineMetadata", + "name": "com.google.cloud.discoveryengine.v1beta.Chunk$ChunkMetadata$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2853,7 +2889,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.DeleteEngineMetadata$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.Chunk$DocumentMetadata", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2862,7 +2898,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.DeleteEngineRequest", + "name": "com.google.cloud.discoveryengine.v1beta.Chunk$DocumentMetadata$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2871,7 +2907,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.DeleteEngineRequest$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.Chunk$PageSpan", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2880,7 +2916,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.DeleteSampleQueryRequest", + "name": "com.google.cloud.discoveryengine.v1beta.Chunk$PageSpan$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2889,7 +2925,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.DeleteSampleQueryRequest$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.Chunk$StructureType", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2898,7 +2934,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.DeleteSampleQuerySetRequest", + "name": "com.google.cloud.discoveryengine.v1beta.Chunk$StructuredContent", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2907,7 +2943,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.DeleteSampleQuerySetRequest$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.Chunk$StructuredContent$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2916,7 +2952,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.DeleteSchemaMetadata", + "name": "com.google.cloud.discoveryengine.v1beta.Citation", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2925,7 +2961,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.DeleteSchemaMetadata$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.Citation$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2934,7 +2970,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.DeleteSchemaRequest", + "name": "com.google.cloud.discoveryengine.v1beta.Citation$PhishBlockThreshold", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2943,7 +2979,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.DeleteSchemaRequest$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.CitationMetadata", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2952,7 +2988,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.DeleteSessionRequest", + "name": "com.google.cloud.discoveryengine.v1beta.CitationMetadata$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2961,7 +2997,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.DeleteSessionRequest$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.CloudSqlSource", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2970,7 +3006,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.DeleteSitemapMetadata", + "name": "com.google.cloud.discoveryengine.v1beta.CloudSqlSource$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2979,7 +3015,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.DeleteSitemapMetadata$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.CmekConfig", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2988,7 +3024,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.DeleteSitemapRequest", + "name": "com.google.cloud.discoveryengine.v1beta.CmekConfig$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2997,7 +3033,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.DeleteSitemapRequest$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.CmekConfig$NotebookLMState", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3006,7 +3042,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.DeleteTargetSiteMetadata", + "name": "com.google.cloud.discoveryengine.v1beta.CmekConfig$State", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3015,7 +3051,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.DeleteTargetSiteMetadata$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.CollectUserEventRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3024,7 +3060,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.DeleteTargetSiteRequest", + "name": "com.google.cloud.discoveryengine.v1beta.CollectUserEventRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3033,7 +3069,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.DeleteTargetSiteRequest$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.CompleteQueryRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3042,7 +3078,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.DisableAdvancedSiteSearchMetadata", + "name": "com.google.cloud.discoveryengine.v1beta.CompleteQueryRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3051,7 +3087,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.DisableAdvancedSiteSearchMetadata$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.CompleteQueryResponse", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3060,7 +3096,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.DisableAdvancedSiteSearchRequest", + "name": "com.google.cloud.discoveryengine.v1beta.CompleteQueryResponse$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3069,7 +3105,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.DisableAdvancedSiteSearchRequest$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.CompleteQueryResponse$QuerySuggestion", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3078,7 +3114,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.DisableAdvancedSiteSearchResponse", + "name": "com.google.cloud.discoveryengine.v1beta.CompleteQueryResponse$QuerySuggestion$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3087,7 +3123,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.DisableAdvancedSiteSearchResponse$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.CompletionInfo", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3096,7 +3132,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.Document", + "name": "com.google.cloud.discoveryengine.v1beta.CompletionInfo$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3105,7 +3141,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.Document$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.CompletionSuggestion", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3114,7 +3150,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.Document$Content", + "name": "com.google.cloud.discoveryengine.v1beta.CompletionSuggestion$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3123,7 +3159,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.Document$Content$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.Condition", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3132,7 +3168,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.Document$IndexStatus", + "name": "com.google.cloud.discoveryengine.v1beta.Condition$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3141,7 +3177,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.Document$IndexStatus$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.Condition$QueryTerm", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3150,7 +3186,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.DocumentInfo", + "name": "com.google.cloud.discoveryengine.v1beta.Condition$QueryTerm$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3159,7 +3195,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.DocumentInfo$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.Condition$TimeRange", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3168,7 +3204,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.DocumentProcessingConfig", + "name": "com.google.cloud.discoveryengine.v1beta.Condition$TimeRange$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3177,7 +3213,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.DocumentProcessingConfig$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.Control", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3186,7 +3222,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.DocumentProcessingConfig$ChunkingConfig", + "name": "com.google.cloud.discoveryengine.v1beta.Control$BoostAction", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3195,7 +3231,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.DocumentProcessingConfig$ChunkingConfig$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.Control$BoostAction$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3204,7 +3240,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.DocumentProcessingConfig$ChunkingConfig$LayoutBasedChunkingConfig", + "name": "com.google.cloud.discoveryengine.v1beta.Control$BoostAction$InterpolationBoostSpec", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3213,7 +3249,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.DocumentProcessingConfig$ChunkingConfig$LayoutBasedChunkingConfig$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.Control$BoostAction$InterpolationBoostSpec$AttributeType", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3222,7 +3258,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.DocumentProcessingConfig$ParsingConfig", + "name": "com.google.cloud.discoveryengine.v1beta.Control$BoostAction$InterpolationBoostSpec$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3231,7 +3267,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.DocumentProcessingConfig$ParsingConfig$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.Control$BoostAction$InterpolationBoostSpec$ControlPoint", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3240,7 +3276,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.DocumentProcessingConfig$ParsingConfig$DigitalParsingConfig", + "name": "com.google.cloud.discoveryengine.v1beta.Control$BoostAction$InterpolationBoostSpec$ControlPoint$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3249,7 +3285,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.DocumentProcessingConfig$ParsingConfig$DigitalParsingConfig$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.Control$BoostAction$InterpolationBoostSpec$InterpolationType", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3258,7 +3294,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.DocumentProcessingConfig$ParsingConfig$LayoutParsingConfig", + "name": "com.google.cloud.discoveryengine.v1beta.Control$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3267,7 +3303,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.DocumentProcessingConfig$ParsingConfig$LayoutParsingConfig$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.Control$FilterAction", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3276,7 +3312,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.DocumentProcessingConfig$ParsingConfig$OcrParsingConfig", + "name": "com.google.cloud.discoveryengine.v1beta.Control$FilterAction$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3285,7 +3321,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.DocumentProcessingConfig$ParsingConfig$OcrParsingConfig$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.Control$PromoteAction", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3294,7 +3330,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.DoubleList", + "name": "com.google.cloud.discoveryengine.v1beta.Control$PromoteAction$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3303,7 +3339,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.DoubleList$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.Control$RedirectAction", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3312,7 +3348,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.EmbeddingConfig", + "name": "com.google.cloud.discoveryengine.v1beta.Control$RedirectAction$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3321,7 +3357,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.EmbeddingConfig$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.Control$SynonymsAction", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3330,7 +3366,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.EnableAdvancedSiteSearchMetadata", + "name": "com.google.cloud.discoveryengine.v1beta.Control$SynonymsAction$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3339,7 +3375,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.EnableAdvancedSiteSearchMetadata$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.Conversation", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3348,7 +3384,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.EnableAdvancedSiteSearchRequest", + "name": "com.google.cloud.discoveryengine.v1beta.Conversation$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3357,7 +3393,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.EnableAdvancedSiteSearchRequest$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.Conversation$State", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3366,7 +3402,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.EnableAdvancedSiteSearchResponse", + "name": "com.google.cloud.discoveryengine.v1beta.ConversationContext", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3375,7 +3411,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.EnableAdvancedSiteSearchResponse$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.ConversationContext$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3384,7 +3420,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.Engine", + "name": "com.google.cloud.discoveryengine.v1beta.ConversationMessage", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3393,7 +3429,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.Engine$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.ConversationMessage$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3402,7 +3438,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.Engine$ChatEngineConfig", + "name": "com.google.cloud.discoveryengine.v1beta.ConverseConversationRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3411,7 +3447,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.Engine$ChatEngineConfig$AgentCreationConfig", + "name": "com.google.cloud.discoveryengine.v1beta.ConverseConversationRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3420,7 +3456,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.Engine$ChatEngineConfig$AgentCreationConfig$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.ConverseConversationResponse", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3429,7 +3465,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.Engine$ChatEngineConfig$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.ConverseConversationResponse$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3438,7 +3474,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.Engine$ChatEngineMetadata", + "name": "com.google.cloud.discoveryengine.v1beta.CreateAssistantRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3447,7 +3483,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.Engine$ChatEngineMetadata$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.CreateAssistantRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3456,7 +3492,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.Engine$CommonConfig", + "name": "com.google.cloud.discoveryengine.v1beta.CreateControlRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3465,7 +3501,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.Engine$CommonConfig$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.CreateControlRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3474,7 +3510,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.Engine$SearchEngineConfig", + "name": "com.google.cloud.discoveryengine.v1beta.CreateConversationRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3483,7 +3519,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.Engine$SearchEngineConfig$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.CreateConversationRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3492,7 +3528,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.Evaluation", + "name": "com.google.cloud.discoveryengine.v1beta.CreateDataStoreMetadata", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3501,7 +3537,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.Evaluation$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.CreateDataStoreMetadata$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3510,7 +3546,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.Evaluation$EvaluationSpec", + "name": "com.google.cloud.discoveryengine.v1beta.CreateDataStoreRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3519,7 +3555,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.Evaluation$EvaluationSpec$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.CreateDataStoreRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3528,7 +3564,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.Evaluation$EvaluationSpec$QuerySetSpec", + "name": "com.google.cloud.discoveryengine.v1beta.CreateDocumentRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3537,7 +3573,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.Evaluation$EvaluationSpec$QuerySetSpec$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.CreateDocumentRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3546,7 +3582,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.Evaluation$State", + "name": "com.google.cloud.discoveryengine.v1beta.CreateEngineMetadata", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3555,7 +3591,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.FactChunk", + "name": "com.google.cloud.discoveryengine.v1beta.CreateEngineMetadata$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3564,7 +3600,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.FactChunk$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.CreateEngineRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3573,7 +3609,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.FetchDomainVerificationStatusRequest", + "name": "com.google.cloud.discoveryengine.v1beta.CreateEngineRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3582,7 +3618,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.FetchDomainVerificationStatusRequest$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.CreateEvaluationMetadata", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3591,7 +3627,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.FetchDomainVerificationStatusResponse", + "name": "com.google.cloud.discoveryengine.v1beta.CreateEvaluationMetadata$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3600,7 +3636,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.FetchDomainVerificationStatusResponse$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.CreateEvaluationRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3609,7 +3645,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.FetchSitemapsRequest", + "name": "com.google.cloud.discoveryengine.v1beta.CreateEvaluationRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3618,7 +3654,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.FetchSitemapsRequest$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.CreateIdentityMappingStoreRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3627,7 +3663,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.FetchSitemapsRequest$Matcher", + "name": "com.google.cloud.discoveryengine.v1beta.CreateIdentityMappingStoreRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3636,7 +3672,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.FetchSitemapsRequest$Matcher$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.CreateLicenseConfigRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3645,7 +3681,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.FetchSitemapsRequest$UrisMatcher", + "name": "com.google.cloud.discoveryengine.v1beta.CreateLicenseConfigRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3654,7 +3690,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.FetchSitemapsRequest$UrisMatcher$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.CreateSampleQueryRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3663,7 +3699,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.FetchSitemapsResponse", + "name": "com.google.cloud.discoveryengine.v1beta.CreateSampleQueryRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3672,7 +3708,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.FetchSitemapsResponse$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.CreateSampleQuerySetRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3681,7 +3717,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.FetchSitemapsResponse$SitemapMetadata", + "name": "com.google.cloud.discoveryengine.v1beta.CreateSampleQuerySetRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3690,7 +3726,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.FetchSitemapsResponse$SitemapMetadata$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.CreateSchemaMetadata", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3699,7 +3735,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.FhirStoreSource", + "name": "com.google.cloud.discoveryengine.v1beta.CreateSchemaMetadata$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3708,7 +3744,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.FhirStoreSource$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.CreateSchemaRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3717,7 +3753,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.FirestoreSource", + "name": "com.google.cloud.discoveryengine.v1beta.CreateSchemaRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3726,7 +3762,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.FirestoreSource$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.CreateServingConfigRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3735,7 +3771,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.GcsSource", + "name": "com.google.cloud.discoveryengine.v1beta.CreateServingConfigRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3744,7 +3780,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.GcsSource$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.CreateSessionRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3753,7 +3789,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentRequest", + "name": "com.google.cloud.discoveryengine.v1beta.CreateSessionRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3762,7 +3798,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentRequest$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.CreateSitemapMetadata", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3771,7 +3807,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentRequest$DynamicRetrievalConfiguration", + "name": "com.google.cloud.discoveryengine.v1beta.CreateSitemapMetadata$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3780,7 +3816,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentRequest$DynamicRetrievalConfiguration$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.CreateSitemapRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3789,7 +3825,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentRequest$DynamicRetrievalConfiguration$DynamicRetrievalPredictor", + "name": "com.google.cloud.discoveryengine.v1beta.CreateSitemapRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3798,7 +3834,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentRequest$DynamicRetrievalConfiguration$DynamicRetrievalPredictor$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.CreateTargetSiteMetadata", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3807,7 +3843,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentRequest$DynamicRetrievalConfiguration$DynamicRetrievalPredictor$Version", + "name": "com.google.cloud.discoveryengine.v1beta.CreateTargetSiteMetadata$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3816,7 +3852,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentRequest$GenerationSpec", + "name": "com.google.cloud.discoveryengine.v1beta.CreateTargetSiteRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3825,7 +3861,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentRequest$GenerationSpec$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.CreateTargetSiteRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3834,7 +3870,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentRequest$GroundingSource", + "name": "com.google.cloud.discoveryengine.v1beta.CustomAttribute", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3843,7 +3879,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentRequest$GroundingSource$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.CustomAttribute$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3852,7 +3888,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentRequest$GroundingSource$GoogleSearchSource", + "name": "com.google.cloud.discoveryengine.v1beta.CustomTuningModel", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3861,7 +3897,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentRequest$GroundingSource$GoogleSearchSource$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.CustomTuningModel$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3870,7 +3906,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentRequest$GroundingSource$InlineSource", + "name": "com.google.cloud.discoveryengine.v1beta.CustomTuningModel$ModelState", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3879,7 +3915,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentRequest$GroundingSource$InlineSource$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.DataStore", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3888,7 +3924,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentRequest$GroundingSource$SearchSource", + "name": "com.google.cloud.discoveryengine.v1beta.DataStore$BillingEstimation", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3897,7 +3933,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentRequest$GroundingSource$SearchSource$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.DataStore$BillingEstimation$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3906,7 +3942,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentRequest$GroundingSpec", + "name": "com.google.cloud.discoveryengine.v1beta.DataStore$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3915,7 +3951,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentRequest$GroundingSpec$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.DataStore$ConfigurableBillingApproach", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3924,7 +3960,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse", + "name": "com.google.cloud.discoveryengine.v1beta.DataStore$ContentConfig", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3933,7 +3969,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.DataStore$FederatedSearchConfig", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3942,7 +3978,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse$Candidate", + "name": "com.google.cloud.discoveryengine.v1beta.DataStore$FederatedSearchConfig$AlloyDbConfig", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3951,7 +3987,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse$Candidate$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.DataStore$FederatedSearchConfig$AlloyDbConfig$AlloyDbAiNaturalLanguageConfig", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3960,7 +3996,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse$Candidate$GroundingMetadata", + "name": "com.google.cloud.discoveryengine.v1beta.DataStore$FederatedSearchConfig$AlloyDbConfig$AlloyDbAiNaturalLanguageConfig$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3969,7 +4005,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse$Candidate$GroundingMetadata$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.DataStore$FederatedSearchConfig$AlloyDbConfig$AlloyDbConnectionConfig", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3978,7 +4014,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse$Candidate$GroundingMetadata$DynamicRetrievalMetadata", + "name": "com.google.cloud.discoveryengine.v1beta.DataStore$FederatedSearchConfig$AlloyDbConfig$AlloyDbConnectionConfig$AuthMode", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3987,7 +4023,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse$Candidate$GroundingMetadata$DynamicRetrievalMetadata$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.DataStore$FederatedSearchConfig$AlloyDbConfig$AlloyDbConnectionConfig$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3996,7 +4032,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse$Candidate$GroundingMetadata$DynamicRetrievalPredictorMetadata", + "name": "com.google.cloud.discoveryengine.v1beta.DataStore$FederatedSearchConfig$AlloyDbConfig$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4005,7 +4041,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse$Candidate$GroundingMetadata$DynamicRetrievalPredictorMetadata$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.DataStore$FederatedSearchConfig$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4014,7 +4050,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse$Candidate$GroundingMetadata$DynamicRetrievalPredictorMetadata$Version", + "name": "com.google.cloud.discoveryengine.v1beta.DataStore$FederatedSearchConfig$NotebooklmConfig", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4023,7 +4059,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse$Candidate$GroundingMetadata$GroundingSupport", + "name": "com.google.cloud.discoveryengine.v1beta.DataStore$FederatedSearchConfig$NotebooklmConfig$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4032,7 +4068,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse$Candidate$GroundingMetadata$GroundingSupport$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.DataStore$FederatedSearchConfig$ThirdPartyOauthConfig", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4041,7 +4077,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse$Candidate$GroundingMetadata$RetrievalMetadata", + "name": "com.google.cloud.discoveryengine.v1beta.DataStore$FederatedSearchConfig$ThirdPartyOauthConfig$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4050,7 +4086,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse$Candidate$GroundingMetadata$RetrievalMetadata$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.DataStore$ServingConfigDataStore", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4059,7 +4095,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse$Candidate$GroundingMetadata$RetrievalMetadata$Source", + "name": "com.google.cloud.discoveryengine.v1beta.DataStore$ServingConfigDataStore$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4068,7 +4104,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse$Candidate$GroundingMetadata$SearchEntryPoint", + "name": "com.google.cloud.discoveryengine.v1beta.DeleteAssistantRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4077,7 +4113,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse$Candidate$GroundingMetadata$SearchEntryPoint$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.DeleteAssistantRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4086,7 +4122,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.GetAnswerRequest", + "name": "com.google.cloud.discoveryengine.v1beta.DeleteCmekConfigMetadata", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4095,7 +4131,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.GetAnswerRequest$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.DeleteCmekConfigMetadata$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4104,7 +4140,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.GetControlRequest", + "name": "com.google.cloud.discoveryengine.v1beta.DeleteCmekConfigRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4113,7 +4149,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.GetControlRequest$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.DeleteCmekConfigRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4122,7 +4158,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.GetConversationRequest", + "name": "com.google.cloud.discoveryengine.v1beta.DeleteControlRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4131,7 +4167,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.GetConversationRequest$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.DeleteControlRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4140,7 +4176,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.GetDataStoreRequest", + "name": "com.google.cloud.discoveryengine.v1beta.DeleteConversationRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4149,7 +4185,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.GetDataStoreRequest$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.DeleteConversationRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4158,7 +4194,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.GetDocumentRequest", + "name": "com.google.cloud.discoveryengine.v1beta.DeleteDataStoreMetadata", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4167,7 +4203,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.GetDocumentRequest$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.DeleteDataStoreMetadata$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4176,7 +4212,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.GetEngineRequest", + "name": "com.google.cloud.discoveryengine.v1beta.DeleteDataStoreRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4185,7 +4221,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.GetEngineRequest$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.DeleteDataStoreRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4194,7 +4230,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.GetEvaluationRequest", + "name": "com.google.cloud.discoveryengine.v1beta.DeleteDocumentRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4203,7 +4239,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.GetEvaluationRequest$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.DeleteDocumentRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4212,7 +4248,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.GetSampleQueryRequest", + "name": "com.google.cloud.discoveryengine.v1beta.DeleteEngineMetadata", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4221,7 +4257,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.GetSampleQueryRequest$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.DeleteEngineMetadata$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4230,7 +4266,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.GetSampleQuerySetRequest", + "name": "com.google.cloud.discoveryengine.v1beta.DeleteEngineRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4239,7 +4275,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.GetSampleQuerySetRequest$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.DeleteEngineRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4248,7 +4284,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.GetSchemaRequest", + "name": "com.google.cloud.discoveryengine.v1beta.DeleteIdentityMappingStoreMetadata", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4257,7 +4293,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.GetSchemaRequest$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.DeleteIdentityMappingStoreMetadata$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4266,7 +4302,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.GetServingConfigRequest", + "name": "com.google.cloud.discoveryengine.v1beta.DeleteIdentityMappingStoreRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4275,7 +4311,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.GetServingConfigRequest$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.DeleteIdentityMappingStoreRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4284,7 +4320,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.GetSessionRequest", + "name": "com.google.cloud.discoveryengine.v1beta.DeleteSampleQueryRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4293,7 +4329,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.GetSessionRequest$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.DeleteSampleQueryRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4302,7 +4338,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.GetSiteSearchEngineRequest", + "name": "com.google.cloud.discoveryengine.v1beta.DeleteSampleQuerySetRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4311,7 +4347,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.GetSiteSearchEngineRequest$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.DeleteSampleQuerySetRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4320,7 +4356,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.GetTargetSiteRequest", + "name": "com.google.cloud.discoveryengine.v1beta.DeleteSchemaMetadata", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4329,7 +4365,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.GetTargetSiteRequest$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.DeleteSchemaMetadata$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4338,7 +4374,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.GroundedGenerationContent", + "name": "com.google.cloud.discoveryengine.v1beta.DeleteSchemaRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4347,7 +4383,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.GroundedGenerationContent$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.DeleteSchemaRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4356,7 +4392,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.GroundedGenerationContent$Part", + "name": "com.google.cloud.discoveryengine.v1beta.DeleteServingConfigRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4365,7 +4401,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.GroundedGenerationContent$Part$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.DeleteServingConfigRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4374,7 +4410,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.GroundingConfig", + "name": "com.google.cloud.discoveryengine.v1beta.DeleteSessionRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4383,7 +4419,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.GroundingConfig$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.DeleteSessionRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4392,7 +4428,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.GroundingFact", + "name": "com.google.cloud.discoveryengine.v1beta.DeleteSitemapMetadata", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4401,7 +4437,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.GroundingFact$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.DeleteSitemapMetadata$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4410,7 +4446,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.ImportCompletionSuggestionsMetadata", + "name": "com.google.cloud.discoveryengine.v1beta.DeleteSitemapRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4419,7 +4455,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.ImportCompletionSuggestionsMetadata$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.DeleteSitemapRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4428,7 +4464,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.ImportCompletionSuggestionsRequest", + "name": "com.google.cloud.discoveryengine.v1beta.DeleteTargetSiteMetadata", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4437,7 +4473,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.ImportCompletionSuggestionsRequest$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.DeleteTargetSiteMetadata$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4446,7 +4482,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.ImportCompletionSuggestionsRequest$InlineSource", + "name": "com.google.cloud.discoveryengine.v1beta.DeleteTargetSiteRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4455,7 +4491,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.ImportCompletionSuggestionsRequest$InlineSource$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.DeleteTargetSiteRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4464,7 +4500,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.ImportCompletionSuggestionsResponse", + "name": "com.google.cloud.discoveryengine.v1beta.DisableAdvancedSiteSearchMetadata", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4473,7 +4509,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.ImportCompletionSuggestionsResponse$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.DisableAdvancedSiteSearchMetadata$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4482,7 +4518,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.ImportDocumentsMetadata", + "name": "com.google.cloud.discoveryengine.v1beta.DisableAdvancedSiteSearchRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4491,7 +4527,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.ImportDocumentsMetadata$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.DisableAdvancedSiteSearchRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4500,7 +4536,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.ImportDocumentsRequest", + "name": "com.google.cloud.discoveryengine.v1beta.DisableAdvancedSiteSearchResponse", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4509,7 +4545,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.ImportDocumentsRequest$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.DisableAdvancedSiteSearchResponse$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4518,7 +4554,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.ImportDocumentsRequest$InlineSource", + "name": "com.google.cloud.discoveryengine.v1beta.DistributeLicenseConfigRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4527,7 +4563,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.ImportDocumentsRequest$InlineSource$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.DistributeLicenseConfigRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4536,7 +4572,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.ImportDocumentsRequest$ReconciliationMode", + "name": "com.google.cloud.discoveryengine.v1beta.DistributeLicenseConfigResponse", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4545,7 +4581,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.ImportDocumentsResponse", + "name": "com.google.cloud.discoveryengine.v1beta.DistributeLicenseConfigResponse$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4554,7 +4590,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.ImportDocumentsResponse$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.Document", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4563,7 +4599,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.ImportErrorConfig", + "name": "com.google.cloud.discoveryengine.v1beta.Document$AclInfo", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4572,7 +4608,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.ImportErrorConfig$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.Document$AclInfo$AccessRestriction", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4581,7 +4617,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.ImportSampleQueriesMetadata", + "name": "com.google.cloud.discoveryengine.v1beta.Document$AclInfo$AccessRestriction$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4590,7 +4626,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.ImportSampleQueriesMetadata$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.Document$AclInfo$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4599,7 +4635,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.ImportSampleQueriesRequest", + "name": "com.google.cloud.discoveryengine.v1beta.Document$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4608,7 +4644,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.ImportSampleQueriesRequest$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.Document$Content", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4617,7 +4653,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.ImportSampleQueriesRequest$InlineSource", + "name": "com.google.cloud.discoveryengine.v1beta.Document$Content$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4626,7 +4662,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.ImportSampleQueriesRequest$InlineSource$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.Document$IndexStatus", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4635,7 +4671,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.ImportSampleQueriesResponse", + "name": "com.google.cloud.discoveryengine.v1beta.Document$IndexStatus$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4644,7 +4680,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.ImportSampleQueriesResponse$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.DocumentInfo", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4653,7 +4689,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.ImportSuggestionDenyListEntriesMetadata", + "name": "com.google.cloud.discoveryengine.v1beta.DocumentInfo$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4662,7 +4698,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.ImportSuggestionDenyListEntriesMetadata$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.DocumentProcessingConfig", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4671,7 +4707,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.ImportSuggestionDenyListEntriesRequest", + "name": "com.google.cloud.discoveryengine.v1beta.DocumentProcessingConfig$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4680,7 +4716,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.ImportSuggestionDenyListEntriesRequest$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.DocumentProcessingConfig$ChunkingConfig", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4689,7 +4725,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.ImportSuggestionDenyListEntriesRequest$InlineSource", + "name": "com.google.cloud.discoveryengine.v1beta.DocumentProcessingConfig$ChunkingConfig$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4698,7 +4734,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.ImportSuggestionDenyListEntriesRequest$InlineSource$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.DocumentProcessingConfig$ChunkingConfig$LayoutBasedChunkingConfig", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4707,7 +4743,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.ImportSuggestionDenyListEntriesResponse", + "name": "com.google.cloud.discoveryengine.v1beta.DocumentProcessingConfig$ChunkingConfig$LayoutBasedChunkingConfig$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4716,7 +4752,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.ImportSuggestionDenyListEntriesResponse$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.DocumentProcessingConfig$ParsingConfig", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4725,7 +4761,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.ImportUserEventsMetadata", + "name": "com.google.cloud.discoveryengine.v1beta.DocumentProcessingConfig$ParsingConfig$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4734,7 +4770,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.ImportUserEventsMetadata$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.DocumentProcessingConfig$ParsingConfig$DigitalParsingConfig", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4743,7 +4779,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.ImportUserEventsRequest", + "name": "com.google.cloud.discoveryengine.v1beta.DocumentProcessingConfig$ParsingConfig$DigitalParsingConfig$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4752,7 +4788,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.ImportUserEventsRequest$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.DocumentProcessingConfig$ParsingConfig$LayoutParsingConfig", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4761,7 +4797,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.ImportUserEventsRequest$InlineSource", + "name": "com.google.cloud.discoveryengine.v1beta.DocumentProcessingConfig$ParsingConfig$LayoutParsingConfig$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4770,7 +4806,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.ImportUserEventsRequest$InlineSource$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.DocumentProcessingConfig$ParsingConfig$OcrParsingConfig", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4779,7 +4815,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.ImportUserEventsResponse", + "name": "com.google.cloud.discoveryengine.v1beta.DocumentProcessingConfig$ParsingConfig$OcrParsingConfig$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4788,7 +4824,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.ImportUserEventsResponse$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.DoubleList", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4797,7 +4833,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.IndustryVertical", + "name": "com.google.cloud.discoveryengine.v1beta.DoubleList$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4806,7 +4842,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.Interval", + "name": "com.google.cloud.discoveryengine.v1beta.EmbeddingConfig", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4815,7 +4851,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.Interval$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.EmbeddingConfig$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4824,7 +4860,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.LanguageInfo", + "name": "com.google.cloud.discoveryengine.v1beta.EnableAdvancedSiteSearchMetadata", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4833,7 +4869,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.LanguageInfo$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.EnableAdvancedSiteSearchMetadata$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4842,7 +4878,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.ListControlsRequest", + "name": "com.google.cloud.discoveryengine.v1beta.EnableAdvancedSiteSearchRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4851,7 +4887,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.ListControlsRequest$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.EnableAdvancedSiteSearchRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4860,7 +4896,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.ListControlsResponse", + "name": "com.google.cloud.discoveryengine.v1beta.EnableAdvancedSiteSearchResponse", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4869,7 +4905,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.ListControlsResponse$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.EnableAdvancedSiteSearchResponse$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4878,7 +4914,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.ListConversationsRequest", + "name": "com.google.cloud.discoveryengine.v1beta.Engine", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4887,7 +4923,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.ListConversationsRequest$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.Engine$AppType", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4896,7 +4932,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.ListConversationsResponse", + "name": "com.google.cloud.discoveryengine.v1beta.Engine$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4905,7 +4941,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.ListConversationsResponse$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.Engine$ChatEngineConfig", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4914,7 +4950,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.ListCustomModelsRequest", + "name": "com.google.cloud.discoveryengine.v1beta.Engine$ChatEngineConfig$AgentCreationConfig", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4923,7 +4959,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.ListCustomModelsRequest$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.Engine$ChatEngineConfig$AgentCreationConfig$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4932,7 +4968,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.ListCustomModelsResponse", + "name": "com.google.cloud.discoveryengine.v1beta.Engine$ChatEngineConfig$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4941,7 +4977,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.ListCustomModelsResponse$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.Engine$ChatEngineMetadata", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4950,7 +4986,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.ListDataStoresRequest", + "name": "com.google.cloud.discoveryengine.v1beta.Engine$ChatEngineMetadata$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4959,7 +4995,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.ListDataStoresRequest$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.Engine$CommonConfig", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4968,7 +5004,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.ListDataStoresResponse", + "name": "com.google.cloud.discoveryengine.v1beta.Engine$CommonConfig$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4977,7 +5013,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.ListDataStoresResponse$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.Engine$ConfigurableBillingApproach", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4986,7 +5022,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.ListDocumentsRequest", + "name": "com.google.cloud.discoveryengine.v1beta.Engine$FeatureState", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4995,7 +5031,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.ListDocumentsRequest$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.Engine$KnowledgeGraphConfig", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5004,7 +5040,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.ListDocumentsResponse", + "name": "com.google.cloud.discoveryengine.v1beta.Engine$KnowledgeGraphConfig$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5013,7 +5049,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.ListDocumentsResponse$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.Engine$KnowledgeGraphConfig$FeatureConfig", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5022,7 +5058,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.ListEnginesRequest", + "name": "com.google.cloud.discoveryengine.v1beta.Engine$KnowledgeGraphConfig$FeatureConfig$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5031,7 +5067,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.ListEnginesRequest$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.Engine$MarketplaceAgentVisibility", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5040,7 +5076,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.ListEnginesResponse", + "name": "com.google.cloud.discoveryengine.v1beta.Engine$MediaRecommendationEngineConfig", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5049,7 +5085,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.ListEnginesResponse$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.Engine$MediaRecommendationEngineConfig$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5058,7 +5094,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.ListEvaluationResultsRequest", + "name": "com.google.cloud.discoveryengine.v1beta.Engine$MediaRecommendationEngineConfig$EngineFeaturesConfig", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5067,7 +5103,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.ListEvaluationResultsRequest$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.Engine$MediaRecommendationEngineConfig$EngineFeaturesConfig$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5076,7 +5112,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.ListEvaluationResultsResponse", + "name": "com.google.cloud.discoveryengine.v1beta.Engine$MediaRecommendationEngineConfig$MostPopularFeatureConfig", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5085,7 +5121,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.ListEvaluationResultsResponse$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.Engine$MediaRecommendationEngineConfig$MostPopularFeatureConfig$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5094,7 +5130,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.ListEvaluationResultsResponse$EvaluationResult", + "name": "com.google.cloud.discoveryengine.v1beta.Engine$MediaRecommendationEngineConfig$OptimizationObjectiveConfig", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5103,7 +5139,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.ListEvaluationResultsResponse$EvaluationResult$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.Engine$MediaRecommendationEngineConfig$OptimizationObjectiveConfig$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5112,7 +5148,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.ListEvaluationsRequest", + "name": "com.google.cloud.discoveryengine.v1beta.Engine$MediaRecommendationEngineConfig$RecommendedForYouFeatureConfig", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5121,7 +5157,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.ListEvaluationsRequest$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.Engine$MediaRecommendationEngineConfig$RecommendedForYouFeatureConfig$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5130,7 +5166,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.ListEvaluationsResponse", + "name": "com.google.cloud.discoveryengine.v1beta.Engine$MediaRecommendationEngineConfig$TrainingState", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5139,7 +5175,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.ListEvaluationsResponse$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.Engine$ModelState", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5148,7 +5184,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.ListSampleQueriesRequest", + "name": "com.google.cloud.discoveryengine.v1beta.Engine$SearchEngineConfig", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5157,7 +5193,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.ListSampleQueriesRequest$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.Engine$SearchEngineConfig$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5166,7 +5202,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.ListSampleQueriesResponse", + "name": "com.google.cloud.discoveryengine.v1beta.Evaluation", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5175,7 +5211,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.ListSampleQueriesResponse$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.Evaluation$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5184,7 +5220,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.ListSampleQuerySetsRequest", + "name": "com.google.cloud.discoveryengine.v1beta.Evaluation$EvaluationSpec", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5193,7 +5229,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.ListSampleQuerySetsRequest$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.Evaluation$EvaluationSpec$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5202,7 +5238,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.ListSampleQuerySetsResponse", + "name": "com.google.cloud.discoveryengine.v1beta.Evaluation$EvaluationSpec$QuerySetSpec", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5211,7 +5247,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.ListSampleQuerySetsResponse$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.Evaluation$EvaluationSpec$QuerySetSpec$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5220,7 +5256,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.ListSchemasRequest", + "name": "com.google.cloud.discoveryengine.v1beta.Evaluation$State", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5229,7 +5265,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.ListSchemasRequest$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.FactChunk", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5238,7 +5274,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.ListSchemasResponse", + "name": "com.google.cloud.discoveryengine.v1beta.FactChunk$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5247,7 +5283,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.ListSchemasResponse$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.Feedback", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5256,7 +5292,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.ListServingConfigsRequest", + "name": "com.google.cloud.discoveryengine.v1beta.Feedback$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5265,7 +5301,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.ListServingConfigsRequest$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.Feedback$ConversationInfo", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5274,7 +5310,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.ListServingConfigsResponse", + "name": "com.google.cloud.discoveryengine.v1beta.Feedback$ConversationInfo$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5283,7 +5319,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.ListServingConfigsResponse$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.Feedback$FeedbackSource", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5292,7 +5328,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.ListSessionsRequest", + "name": "com.google.cloud.discoveryengine.v1beta.Feedback$FeedbackType", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5301,7 +5337,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.ListSessionsRequest$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.Feedback$Reason", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5310,7 +5346,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.ListSessionsResponse", + "name": "com.google.cloud.discoveryengine.v1beta.FetchDomainVerificationStatusRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5319,7 +5355,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.ListSessionsResponse$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.FetchDomainVerificationStatusRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5328,7 +5364,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.ListTargetSitesRequest", + "name": "com.google.cloud.discoveryengine.v1beta.FetchDomainVerificationStatusResponse", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5337,7 +5373,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.ListTargetSitesRequest$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.FetchDomainVerificationStatusResponse$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5346,7 +5382,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.ListTargetSitesResponse", + "name": "com.google.cloud.discoveryengine.v1beta.FetchSitemapsRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5355,7 +5391,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.ListTargetSitesResponse$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.FetchSitemapsRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5364,7 +5400,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.MediaInfo", + "name": "com.google.cloud.discoveryengine.v1beta.FetchSitemapsRequest$Matcher", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5373,7 +5409,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.MediaInfo$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.FetchSitemapsRequest$Matcher$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5382,7 +5418,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.NaturalLanguageQueryUnderstandingConfig", + "name": "com.google.cloud.discoveryengine.v1beta.FetchSitemapsRequest$UrisMatcher", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5391,7 +5427,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.NaturalLanguageQueryUnderstandingConfig$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.FetchSitemapsRequest$UrisMatcher$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5400,7 +5436,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.NaturalLanguageQueryUnderstandingConfig$Mode", + "name": "com.google.cloud.discoveryengine.v1beta.FetchSitemapsResponse", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5409,7 +5445,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.PageInfo", + "name": "com.google.cloud.discoveryengine.v1beta.FetchSitemapsResponse$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5418,7 +5454,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.PageInfo$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.FetchSitemapsResponse$SitemapMetadata", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5427,7 +5463,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.PanelInfo", + "name": "com.google.cloud.discoveryengine.v1beta.FetchSitemapsResponse$SitemapMetadata$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5436,7 +5472,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.PanelInfo$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.FhirStoreSource", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5445,7 +5481,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.PauseEngineRequest", + "name": "com.google.cloud.discoveryengine.v1beta.FhirStoreSource$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5454,7 +5490,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.PauseEngineRequest$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.FirestoreSource", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5463,7 +5499,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.Project", + "name": "com.google.cloud.discoveryengine.v1beta.FirestoreSource$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5472,7 +5508,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.Project$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.GcsSource", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5481,7 +5517,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.Project$ServiceTerms", + "name": "com.google.cloud.discoveryengine.v1beta.GcsSource$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5490,7 +5526,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.Project$ServiceTerms$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5499,7 +5535,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.Project$ServiceTerms$State", + "name": "com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5508,7 +5544,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.ProvisionProjectMetadata", + "name": "com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentRequest$DynamicRetrievalConfiguration", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5517,7 +5553,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.ProvisionProjectMetadata$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentRequest$DynamicRetrievalConfiguration$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5526,7 +5562,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.ProvisionProjectRequest", + "name": "com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentRequest$DynamicRetrievalConfiguration$DynamicRetrievalPredictor", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5535,7 +5571,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.ProvisionProjectRequest$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentRequest$DynamicRetrievalConfiguration$DynamicRetrievalPredictor$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5544,7 +5580,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.PurgeCompletionSuggestionsMetadata", + "name": "com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentRequest$DynamicRetrievalConfiguration$DynamicRetrievalPredictor$Version", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5553,7 +5589,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.PurgeCompletionSuggestionsMetadata$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentRequest$GenerationSpec", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5562,7 +5598,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.PurgeCompletionSuggestionsRequest", + "name": "com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentRequest$GenerationSpec$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5571,7 +5607,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.PurgeCompletionSuggestionsRequest$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentRequest$GenerationSpec$ProvisionedThroughputSetting", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5580,7 +5616,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.PurgeCompletionSuggestionsResponse", + "name": "com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentRequest$GroundingSource", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5589,7 +5625,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.PurgeCompletionSuggestionsResponse$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentRequest$GroundingSource$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5598,7 +5634,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.PurgeDocumentsMetadata", + "name": "com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentRequest$GroundingSource$EnterpriseWebRetrievalSource", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5607,7 +5643,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.PurgeDocumentsMetadata$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentRequest$GroundingSource$EnterpriseWebRetrievalSource$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5616,7 +5652,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.PurgeDocumentsRequest", + "name": "com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentRequest$GroundingSource$GoogleSearchSource", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5625,7 +5661,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.PurgeDocumentsRequest$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentRequest$GroundingSource$GoogleSearchSource$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5634,7 +5670,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.PurgeDocumentsRequest$InlineSource", + "name": "com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentRequest$GroundingSource$InlineSource", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5643,7 +5679,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.PurgeDocumentsRequest$InlineSource$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentRequest$GroundingSource$InlineSource$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5652,7 +5688,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.PurgeDocumentsResponse", + "name": "com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentRequest$GroundingSource$SearchSource", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5661,7 +5697,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.PurgeDocumentsResponse$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentRequest$GroundingSource$SearchSource$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5670,7 +5706,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.PurgeErrorConfig", + "name": "com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentRequest$GroundingSpec", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5679,7 +5715,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.PurgeErrorConfig$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentRequest$GroundingSpec$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5688,7 +5724,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.PurgeSuggestionDenyListEntriesMetadata", + "name": "com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5697,7 +5733,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.PurgeSuggestionDenyListEntriesMetadata$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5706,7 +5742,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.PurgeSuggestionDenyListEntriesRequest", + "name": "com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse$Candidate", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5715,7 +5751,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.PurgeSuggestionDenyListEntriesRequest$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse$Candidate$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5724,7 +5760,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.PurgeSuggestionDenyListEntriesResponse", + "name": "com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse$Candidate$GroundingMetadata", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5733,7 +5769,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.PurgeSuggestionDenyListEntriesResponse$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse$Candidate$GroundingMetadata$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5742,7 +5778,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.PurgeUserEventsMetadata", + "name": "com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse$Candidate$GroundingMetadata$DynamicRetrievalMetadata", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5751,7 +5787,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.PurgeUserEventsMetadata$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse$Candidate$GroundingMetadata$DynamicRetrievalMetadata$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5760,7 +5796,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.PurgeUserEventsRequest", + "name": "com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse$Candidate$GroundingMetadata$DynamicRetrievalPredictorMetadata", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5769,7 +5805,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.PurgeUserEventsRequest$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse$Candidate$GroundingMetadata$DynamicRetrievalPredictorMetadata$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5778,7 +5814,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.PurgeUserEventsResponse", + "name": "com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse$Candidate$GroundingMetadata$DynamicRetrievalPredictorMetadata$Version", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5787,7 +5823,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.PurgeUserEventsResponse$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse$Candidate$GroundingMetadata$GroundingSupport", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5796,7 +5832,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.QualityMetrics", + "name": "com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse$Candidate$GroundingMetadata$GroundingSupport$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5805,7 +5841,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.QualityMetrics$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse$Candidate$GroundingMetadata$ImageMetadata", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5814,7 +5850,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.QualityMetrics$TopkMetrics", + "name": "com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse$Candidate$GroundingMetadata$ImageMetadata$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5823,7 +5859,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.QualityMetrics$TopkMetrics$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse$Candidate$GroundingMetadata$ImageMetadata$Image", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5832,7 +5868,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.Query", + "name": "com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse$Candidate$GroundingMetadata$ImageMetadata$Image$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5841,7 +5877,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.Query$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse$Candidate$GroundingMetadata$ImageMetadata$WebsiteInfo", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5850,7 +5886,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.RankRequest", + "name": "com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse$Candidate$GroundingMetadata$ImageMetadata$WebsiteInfo$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5859,7 +5895,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.RankRequest$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse$Candidate$GroundingMetadata$RetrievalMetadata", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5868,7 +5904,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.RankResponse", + "name": "com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse$Candidate$GroundingMetadata$RetrievalMetadata$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5877,7 +5913,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.RankResponse$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse$Candidate$GroundingMetadata$RetrievalMetadata$Source", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5886,7 +5922,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.RankingRecord", + "name": "com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse$Candidate$GroundingMetadata$SearchEntryPoint", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5895,7 +5931,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.RankingRecord$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse$Candidate$GroundingMetadata$SearchEntryPoint$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5904,7 +5940,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.RecommendRequest", + "name": "com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse$Candidate$GroundingMetadata$VideoMetadata", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5913,7 +5949,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.RecommendRequest$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse$Candidate$GroundingMetadata$VideoMetadata$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5922,7 +5958,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.RecommendResponse", + "name": "com.google.cloud.discoveryengine.v1beta.GetAclConfigRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5931,7 +5967,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.RecommendResponse$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.GetAclConfigRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5940,7 +5976,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.RecommendResponse$RecommendationResult", + "name": "com.google.cloud.discoveryengine.v1beta.GetAnswerRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5949,7 +5985,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.RecommendResponse$RecommendationResult$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.GetAnswerRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5958,7 +5994,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.RecrawlUrisMetadata", + "name": "com.google.cloud.discoveryengine.v1beta.GetAssistantRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5967,7 +6003,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.RecrawlUrisMetadata$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.GetAssistantRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5976,7 +6012,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.RecrawlUrisRequest", + "name": "com.google.cloud.discoveryengine.v1beta.GetCmekConfigRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5985,7 +6021,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.RecrawlUrisRequest$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.GetCmekConfigRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5994,7 +6030,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.RecrawlUrisResponse", + "name": "com.google.cloud.discoveryengine.v1beta.GetControlRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -6003,7 +6039,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.RecrawlUrisResponse$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.GetControlRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -6012,7 +6048,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.RecrawlUrisResponse$FailureInfo", + "name": "com.google.cloud.discoveryengine.v1beta.GetConversationRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -6021,7 +6057,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.RecrawlUrisResponse$FailureInfo$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.GetConversationRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -6030,7 +6066,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.RecrawlUrisResponse$FailureInfo$FailureReason", + "name": "com.google.cloud.discoveryengine.v1beta.GetDataStoreRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -6039,7 +6075,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.RecrawlUrisResponse$FailureInfo$FailureReason$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.GetDataStoreRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -6048,7 +6084,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.RecrawlUrisResponse$FailureInfo$FailureReason$CorpusType", + "name": "com.google.cloud.discoveryengine.v1beta.GetDocumentRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -6057,7 +6093,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.Reply", + "name": "com.google.cloud.discoveryengine.v1beta.GetDocumentRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -6066,7 +6102,2689 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.Reply$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.GetEngineRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.GetEngineRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.GetEvaluationRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.GetEvaluationRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.GetIdentityMappingStoreRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.GetIdentityMappingStoreRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.GetLicenseConfigRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.GetLicenseConfigRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.GetSampleQueryRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.GetSampleQueryRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.GetSampleQuerySetRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.GetSampleQuerySetRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.GetSchemaRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.GetSchemaRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.GetServingConfigRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.GetServingConfigRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.GetSessionRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.GetSessionRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.GetSiteSearchEngineRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.GetSiteSearchEngineRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.GetTargetSiteRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.GetTargetSiteRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.GetUserStoreRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.GetUserStoreRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.GroundedGenerationContent", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.GroundedGenerationContent$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.GroundedGenerationContent$Part", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.GroundedGenerationContent$Part$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.GroundingConfig", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.GroundingConfig$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.GroundingFact", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.GroundingFact$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.HarmCategory", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.HealthcareFhirConfig", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.HealthcareFhirConfig$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.IdentityMappingEntry", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.IdentityMappingEntry$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.IdentityMappingEntryOperationMetadata", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.IdentityMappingEntryOperationMetadata$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.IdentityMappingStore", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.IdentityMappingStore$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.IdpConfig", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.IdpConfig$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.IdpConfig$ExternalIdpConfig", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.IdpConfig$ExternalIdpConfig$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.IdpConfig$IdpType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.ImportCompletionSuggestionsMetadata", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.ImportCompletionSuggestionsMetadata$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.ImportCompletionSuggestionsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.ImportCompletionSuggestionsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.ImportCompletionSuggestionsRequest$InlineSource", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.ImportCompletionSuggestionsRequest$InlineSource$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.ImportCompletionSuggestionsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.ImportCompletionSuggestionsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.ImportDocumentsMetadata", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.ImportDocumentsMetadata$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.ImportDocumentsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.ImportDocumentsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.ImportDocumentsRequest$InlineSource", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.ImportDocumentsRequest$InlineSource$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.ImportDocumentsRequest$ReconciliationMode", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.ImportDocumentsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.ImportDocumentsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.ImportErrorConfig", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.ImportErrorConfig$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.ImportIdentityMappingsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.ImportIdentityMappingsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.ImportIdentityMappingsRequest$InlineSource", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.ImportIdentityMappingsRequest$InlineSource$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.ImportIdentityMappingsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.ImportIdentityMappingsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.ImportSampleQueriesMetadata", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.ImportSampleQueriesMetadata$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.ImportSampleQueriesRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.ImportSampleQueriesRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.ImportSampleQueriesRequest$InlineSource", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.ImportSampleQueriesRequest$InlineSource$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.ImportSampleQueriesResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.ImportSampleQueriesResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.ImportSuggestionDenyListEntriesMetadata", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.ImportSuggestionDenyListEntriesMetadata$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.ImportSuggestionDenyListEntriesRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.ImportSuggestionDenyListEntriesRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.ImportSuggestionDenyListEntriesRequest$InlineSource", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.ImportSuggestionDenyListEntriesRequest$InlineSource$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.ImportSuggestionDenyListEntriesResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.ImportSuggestionDenyListEntriesResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.ImportUserEventsMetadata", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.ImportUserEventsMetadata$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.ImportUserEventsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.ImportUserEventsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.ImportUserEventsRequest$InlineSource", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.ImportUserEventsRequest$InlineSource$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.ImportUserEventsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.ImportUserEventsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.IndustryVertical", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.Interval", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.Interval$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.LanguageInfo", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.LanguageInfo$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.LicenseConfig", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.LicenseConfig$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.LicenseConfig$State", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.LicenseConfigUsageStats", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.LicenseConfigUsageStats$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.ListAssistantsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.ListAssistantsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.ListAssistantsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.ListAssistantsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.ListCmekConfigsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.ListCmekConfigsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.ListCmekConfigsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.ListCmekConfigsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.ListControlsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.ListControlsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.ListControlsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.ListControlsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.ListConversationsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.ListConversationsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.ListConversationsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.ListConversationsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.ListCustomModelsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.ListCustomModelsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.ListCustomModelsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.ListCustomModelsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.ListDataStoresRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.ListDataStoresRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.ListDataStoresResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.ListDataStoresResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.ListDocumentsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.ListDocumentsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.ListDocumentsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.ListDocumentsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.ListEnginesRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.ListEnginesRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.ListEnginesResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.ListEnginesResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.ListEvaluationResultsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.ListEvaluationResultsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.ListEvaluationResultsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.ListEvaluationResultsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.ListEvaluationResultsResponse$EvaluationResult", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.ListEvaluationResultsResponse$EvaluationResult$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.ListEvaluationsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.ListEvaluationsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.ListEvaluationsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.ListEvaluationsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.ListIdentityMappingStoresRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.ListIdentityMappingStoresRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.ListIdentityMappingStoresResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.ListIdentityMappingStoresResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.ListIdentityMappingsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.ListIdentityMappingsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.ListIdentityMappingsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.ListIdentityMappingsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.ListLicenseConfigsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.ListLicenseConfigsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.ListLicenseConfigsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.ListLicenseConfigsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.ListLicenseConfigsUsageStatsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.ListLicenseConfigsUsageStatsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.ListLicenseConfigsUsageStatsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.ListLicenseConfigsUsageStatsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.ListSampleQueriesRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.ListSampleQueriesRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.ListSampleQueriesResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.ListSampleQueriesResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.ListSampleQuerySetsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.ListSampleQuerySetsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.ListSampleQuerySetsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.ListSampleQuerySetsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.ListSchemasRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.ListSchemasRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.ListSchemasResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.ListSchemasResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.ListServingConfigsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.ListServingConfigsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.ListServingConfigsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.ListServingConfigsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.ListSessionsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.ListSessionsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.ListSessionsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.ListSessionsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.ListTargetSitesRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.ListTargetSitesRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.ListTargetSitesResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.ListTargetSitesResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.ListUserLicensesRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.ListUserLicensesRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.ListUserLicensesResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.ListUserLicensesResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.MediaInfo", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.MediaInfo$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.NaturalLanguageQueryUnderstandingConfig", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.NaturalLanguageQueryUnderstandingConfig$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.NaturalLanguageQueryUnderstandingConfig$Mode", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.ObservabilityConfig", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.ObservabilityConfig$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.PageInfo", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.PageInfo$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.PanelInfo", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.PanelInfo$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.PauseEngineRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.PauseEngineRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.Principal", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.Principal$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.Project", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.Project$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.Project$ConfigurableBillingStatus", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.Project$ConfigurableBillingStatus$AgentSearchTokenSubscriptionStatus", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.Project$ConfigurableBillingStatus$AgentSearchTokenSubscriptionStatus$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.Project$ConfigurableBillingStatus$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.Project$ConfigurableBillingStatus$UpdateType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.Project$CustomerProvidedConfig", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.Project$CustomerProvidedConfig$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.Project$CustomerProvidedConfig$NotebooklmConfig", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.Project$CustomerProvidedConfig$NotebooklmConfig$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.Project$CustomerProvidedConfig$NotebooklmConfig$DataProtectionPolicy", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.Project$CustomerProvidedConfig$NotebooklmConfig$DataProtectionPolicy$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.Project$CustomerProvidedConfig$NotebooklmConfig$DataProtectionPolicy$SensitiveDataProtectionPolicy", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.Project$CustomerProvidedConfig$NotebooklmConfig$DataProtectionPolicy$SensitiveDataProtectionPolicy$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.Project$CustomerProvidedConfig$NotebooklmConfig$ModelArmorConfig", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.Project$CustomerProvidedConfig$NotebooklmConfig$ModelArmorConfig$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.Project$ServiceTerms", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.Project$ServiceTerms$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.Project$ServiceTerms$State", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.ProvisionProjectMetadata", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.ProvisionProjectMetadata$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.ProvisionProjectRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.ProvisionProjectRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.ProvisionProjectRequest$SaasParams", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.ProvisionProjectRequest$SaasParams$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.PurgeCompletionSuggestionsMetadata", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.PurgeCompletionSuggestionsMetadata$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.PurgeCompletionSuggestionsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.PurgeCompletionSuggestionsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.PurgeCompletionSuggestionsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.PurgeCompletionSuggestionsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.PurgeDocumentsMetadata", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.PurgeDocumentsMetadata$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.PurgeDocumentsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.PurgeDocumentsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.PurgeDocumentsRequest$InlineSource", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.PurgeDocumentsRequest$InlineSource$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.PurgeDocumentsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.PurgeDocumentsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.PurgeErrorConfig", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.PurgeErrorConfig$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.PurgeIdentityMappingsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.PurgeIdentityMappingsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.PurgeIdentityMappingsRequest$InlineSource", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.PurgeIdentityMappingsRequest$InlineSource$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.PurgeSuggestionDenyListEntriesMetadata", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.PurgeSuggestionDenyListEntriesMetadata$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.PurgeSuggestionDenyListEntriesRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.PurgeSuggestionDenyListEntriesRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.PurgeSuggestionDenyListEntriesResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.PurgeSuggestionDenyListEntriesResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.PurgeUserEventsMetadata", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.PurgeUserEventsMetadata$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.PurgeUserEventsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.PurgeUserEventsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.PurgeUserEventsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.PurgeUserEventsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.QualityMetrics", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.QualityMetrics$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.QualityMetrics$TopkMetrics", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.QualityMetrics$TopkMetrics$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.Query", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.Query$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.RankRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.RankRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.RankResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.RankResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.RankingRecord", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.RankingRecord$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.RecommendRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.RecommendRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.RecommendResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.RecommendResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.RecommendResponse$RecommendationResult", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.RecommendResponse$RecommendationResult$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.RecrawlUrisMetadata", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.RecrawlUrisMetadata$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.RecrawlUrisRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.RecrawlUrisRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.RecrawlUrisResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.RecrawlUrisResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.RecrawlUrisResponse$FailureInfo", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.RecrawlUrisResponse$FailureInfo$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.RecrawlUrisResponse$FailureInfo$FailureReason", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.RecrawlUrisResponse$FailureInfo$FailureReason$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.RecrawlUrisResponse$FailureInfo$FailureReason$CorpusType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.RemoveSuggestionRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.RemoveSuggestionRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.RemoveSuggestionResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.RemoveSuggestionResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.Reply", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.Reply$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -6084,7 +8802,862 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.Reply$Reference$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.Reply$Reference$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.ResumeEngineRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.ResumeEngineRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.RetractLicenseConfigRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.RetractLicenseConfigRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.RetractLicenseConfigResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.RetractLicenseConfigResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.SafetyRating", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.SafetyRating$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.SafetyRating$HarmProbability", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.SafetyRating$HarmSeverity", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.SampleQuery", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.SampleQuery$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.SampleQuery$QueryEntry", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.SampleQuery$QueryEntry$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.SampleQuery$QueryEntry$Target", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.SampleQuery$QueryEntry$Target$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.SampleQuerySet", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.SampleQuerySet$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.Schema", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.Schema$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.SearchAddOn", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.SearchInfo", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.SearchInfo$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.SearchLinkPromotion", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.SearchLinkPromotion$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.SearchRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.SearchRequest$BoostSpec", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.SearchRequest$BoostSpec$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.SearchRequest$BoostSpec$ConditionBoostSpec", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.SearchRequest$BoostSpec$ConditionBoostSpec$BoostControlSpec", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.SearchRequest$BoostSpec$ConditionBoostSpec$BoostControlSpec$AttributeType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.SearchRequest$BoostSpec$ConditionBoostSpec$BoostControlSpec$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.SearchRequest$BoostSpec$ConditionBoostSpec$BoostControlSpec$ControlPoint", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.SearchRequest$BoostSpec$ConditionBoostSpec$BoostControlSpec$ControlPoint$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.SearchRequest$BoostSpec$ConditionBoostSpec$BoostControlSpec$InterpolationType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.SearchRequest$BoostSpec$ConditionBoostSpec$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.SearchRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.SearchRequest$ContentSearchSpec", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.SearchRequest$ContentSearchSpec$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.SearchRequest$ContentSearchSpec$ChunkSpec", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.SearchRequest$ContentSearchSpec$ChunkSpec$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.SearchRequest$ContentSearchSpec$ExtractiveContentSpec", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.SearchRequest$ContentSearchSpec$ExtractiveContentSpec$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.SearchRequest$ContentSearchSpec$SearchResultMode", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.SearchRequest$ContentSearchSpec$SnippetSpec", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.SearchRequest$ContentSearchSpec$SnippetSpec$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.SearchRequest$ContentSearchSpec$SummarySpec", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.SearchRequest$ContentSearchSpec$SummarySpec$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.SearchRequest$ContentSearchSpec$SummarySpec$ModelPromptSpec", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.SearchRequest$ContentSearchSpec$SummarySpec$ModelPromptSpec$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.SearchRequest$ContentSearchSpec$SummarySpec$ModelSpec", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.SearchRequest$ContentSearchSpec$SummarySpec$ModelSpec$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.SearchRequest$ContentSearchSpec$SummarySpec$MultiModalSpec", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.SearchRequest$ContentSearchSpec$SummarySpec$MultiModalSpec$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.SearchRequest$ContentSearchSpec$SummarySpec$MultiModalSpec$ImageSource", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.SearchRequest$CrowdingSpec", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.SearchRequest$CrowdingSpec$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.SearchRequest$CrowdingSpec$Mode", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.SearchRequest$CustomRankingParams", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.SearchRequest$CustomRankingParams$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.SearchRequest$DataStoreSpec", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.SearchRequest$DataStoreSpec$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.SearchRequest$DisplaySpec", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.SearchRequest$DisplaySpec$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.SearchRequest$DisplaySpec$MatchHighlightingCondition", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.SearchRequest$EmbeddingSpec", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.SearchRequest$EmbeddingSpec$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.SearchRequest$EmbeddingSpec$EmbeddingVector", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.SearchRequest$EmbeddingSpec$EmbeddingVector$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.SearchRequest$FacetSpec", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.SearchRequest$FacetSpec$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.SearchRequest$FacetSpec$FacetKey", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.SearchRequest$FacetSpec$FacetKey$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.SearchRequest$ImageQuery", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.SearchRequest$ImageQuery$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.SearchRequest$NaturalLanguageQueryUnderstandingSpec", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.SearchRequest$NaturalLanguageQueryUnderstandingSpec$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.SearchRequest$NaturalLanguageQueryUnderstandingSpec$ExtractedFilterBehavior", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.SearchRequest$NaturalLanguageQueryUnderstandingSpec$FilterExtractionCondition", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.SearchRequest$PersonalizationSpec", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.SearchRequest$PersonalizationSpec$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.SearchRequest$PersonalizationSpec$Mode", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.SearchRequest$QueryExpansionSpec", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.SearchRequest$QueryExpansionSpec$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.SearchRequest$QueryExpansionSpec$Condition", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.SearchRequest$RankingExpressionBackend", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.SearchRequest$RelevanceFilterSpec", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.SearchRequest$RelevanceFilterSpec$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.SearchRequest$RelevanceFilterSpec$RelevanceThresholdSpec", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.SearchRequest$RelevanceFilterSpec$RelevanceThresholdSpec$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.SearchRequest$RelevanceScoreSpec", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.SearchRequest$RelevanceScoreSpec$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.SearchRequest$RelevanceThreshold", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.SearchRequest$SearchAddonSpec", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.SearchRequest$SearchAddonSpec$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -6093,7 +9666,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.ResumeEngineRequest", + "name": "com.google.cloud.discoveryengine.v1beta.SearchRequest$SearchAsYouTypeSpec", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -6102,7 +9675,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.ResumeEngineRequest$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.SearchRequest$SearchAsYouTypeSpec$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -6111,7 +9684,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.SampleQuery", + "name": "com.google.cloud.discoveryengine.v1beta.SearchRequest$SearchAsYouTypeSpec$Condition", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -6120,7 +9693,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.SampleQuery$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.SearchRequest$SessionSpec", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -6129,7 +9702,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.SampleQuery$QueryEntry", + "name": "com.google.cloud.discoveryengine.v1beta.SearchRequest$SessionSpec$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -6138,7 +9711,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.SampleQuery$QueryEntry$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.SearchRequest$SpellCorrectionSpec", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -6147,7 +9720,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.SampleQuery$QueryEntry$Target", + "name": "com.google.cloud.discoveryengine.v1beta.SearchRequest$SpellCorrectionSpec$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -6156,7 +9729,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.SampleQuery$QueryEntry$Target$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.SearchRequest$SpellCorrectionSpec$Mode", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -6165,7 +9738,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.SampleQuerySet", + "name": "com.google.cloud.discoveryengine.v1beta.SearchResponse", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -6174,7 +9747,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.SampleQuerySet$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.SearchResponse$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -6183,7 +9756,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.Schema", + "name": "com.google.cloud.discoveryengine.v1beta.SearchResponse$Facet", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -6192,7 +9765,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.Schema$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.SearchResponse$Facet$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -6201,7 +9774,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.SearchAddOn", + "name": "com.google.cloud.discoveryengine.v1beta.SearchResponse$Facet$FacetValue", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -6210,7 +9783,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.SearchInfo", + "name": "com.google.cloud.discoveryengine.v1beta.SearchResponse$Facet$FacetValue$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -6219,7 +9792,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.SearchInfo$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.SearchResponse$GeoSearchDebugInfo", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -6228,7 +9801,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.SearchRequest", + "name": "com.google.cloud.discoveryengine.v1beta.SearchResponse$GeoSearchDebugInfo$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -6237,7 +9810,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.SearchRequest$BoostSpec", + "name": "com.google.cloud.discoveryengine.v1beta.SearchResponse$GuidedSearchResult", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -6246,7 +9819,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.SearchRequest$BoostSpec$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.SearchResponse$GuidedSearchResult$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -6255,7 +9828,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.SearchRequest$BoostSpec$ConditionBoostSpec", + "name": "com.google.cloud.discoveryengine.v1beta.SearchResponse$GuidedSearchResult$RefinementAttribute", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -6264,7 +9837,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.SearchRequest$BoostSpec$ConditionBoostSpec$BoostControlSpec", + "name": "com.google.cloud.discoveryengine.v1beta.SearchResponse$GuidedSearchResult$RefinementAttribute$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -6273,7 +9846,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.SearchRequest$BoostSpec$ConditionBoostSpec$BoostControlSpec$AttributeType", + "name": "com.google.cloud.discoveryengine.v1beta.SearchResponse$NaturalLanguageQueryUnderstandingInfo", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -6282,7 +9855,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.SearchRequest$BoostSpec$ConditionBoostSpec$BoostControlSpec$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.SearchResponse$NaturalLanguageQueryUnderstandingInfo$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -6291,7 +9864,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.SearchRequest$BoostSpec$ConditionBoostSpec$BoostControlSpec$ControlPoint", + "name": "com.google.cloud.discoveryengine.v1beta.SearchResponse$NaturalLanguageQueryUnderstandingInfo$StructuredExtractedFilter", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -6300,7 +9873,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.SearchRequest$BoostSpec$ConditionBoostSpec$BoostControlSpec$ControlPoint$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.SearchResponse$NaturalLanguageQueryUnderstandingInfo$StructuredExtractedFilter$AndExpression", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -6309,7 +9882,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.SearchRequest$BoostSpec$ConditionBoostSpec$BoostControlSpec$InterpolationType", + "name": "com.google.cloud.discoveryengine.v1beta.SearchResponse$NaturalLanguageQueryUnderstandingInfo$StructuredExtractedFilter$AndExpression$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -6318,7 +9891,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.SearchRequest$BoostSpec$ConditionBoostSpec$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.SearchResponse$NaturalLanguageQueryUnderstandingInfo$StructuredExtractedFilter$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -6327,7 +9900,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.SearchRequest$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.SearchResponse$NaturalLanguageQueryUnderstandingInfo$StructuredExtractedFilter$Expression", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -6336,7 +9909,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.SearchRequest$ContentSearchSpec", + "name": "com.google.cloud.discoveryengine.v1beta.SearchResponse$NaturalLanguageQueryUnderstandingInfo$StructuredExtractedFilter$Expression$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -6345,7 +9918,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.SearchRequest$ContentSearchSpec$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.SearchResponse$NaturalLanguageQueryUnderstandingInfo$StructuredExtractedFilter$GeolocationConstraint", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -6354,7 +9927,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.SearchRequest$ContentSearchSpec$ChunkSpec", + "name": "com.google.cloud.discoveryengine.v1beta.SearchResponse$NaturalLanguageQueryUnderstandingInfo$StructuredExtractedFilter$GeolocationConstraint$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -6363,7 +9936,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.SearchRequest$ContentSearchSpec$ChunkSpec$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.SearchResponse$NaturalLanguageQueryUnderstandingInfo$StructuredExtractedFilter$NumberConstraint", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -6372,7 +9945,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.SearchRequest$ContentSearchSpec$ExtractiveContentSpec", + "name": "com.google.cloud.discoveryengine.v1beta.SearchResponse$NaturalLanguageQueryUnderstandingInfo$StructuredExtractedFilter$NumberConstraint$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -6381,7 +9954,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.SearchRequest$ContentSearchSpec$ExtractiveContentSpec$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.SearchResponse$NaturalLanguageQueryUnderstandingInfo$StructuredExtractedFilter$NumberConstraint$Comparison", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -6390,7 +9963,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.SearchRequest$ContentSearchSpec$SearchResultMode", + "name": "com.google.cloud.discoveryengine.v1beta.SearchResponse$NaturalLanguageQueryUnderstandingInfo$StructuredExtractedFilter$OrExpression", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -6399,7 +9972,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.SearchRequest$ContentSearchSpec$SnippetSpec", + "name": "com.google.cloud.discoveryengine.v1beta.SearchResponse$NaturalLanguageQueryUnderstandingInfo$StructuredExtractedFilter$OrExpression$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -6408,7 +9981,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.SearchRequest$ContentSearchSpec$SnippetSpec$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.SearchResponse$NaturalLanguageQueryUnderstandingInfo$StructuredExtractedFilter$StringConstraint", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -6417,7 +9990,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.SearchRequest$ContentSearchSpec$SummarySpec", + "name": "com.google.cloud.discoveryengine.v1beta.SearchResponse$NaturalLanguageQueryUnderstandingInfo$StructuredExtractedFilter$StringConstraint$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -6426,7 +9999,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.SearchRequest$ContentSearchSpec$SummarySpec$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.SearchResponse$OneBoxResult", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -6435,7 +10008,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.SearchRequest$ContentSearchSpec$SummarySpec$ModelPromptSpec", + "name": "com.google.cloud.discoveryengine.v1beta.SearchResponse$OneBoxResult$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -6444,7 +10017,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.SearchRequest$ContentSearchSpec$SummarySpec$ModelPromptSpec$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.SearchResponse$OneBoxResult$OneBoxType", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -6453,7 +10026,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.SearchRequest$ContentSearchSpec$SummarySpec$ModelSpec", + "name": "com.google.cloud.discoveryengine.v1beta.SearchResponse$QueryExpansionInfo", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -6462,7 +10035,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.SearchRequest$ContentSearchSpec$SummarySpec$ModelSpec$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.SearchResponse$QueryExpansionInfo$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -6471,7 +10044,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.SearchRequest$DataStoreSpec", + "name": "com.google.cloud.discoveryengine.v1beta.SearchResponse$SearchResult", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -6480,7 +10053,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.SearchRequest$DataStoreSpec$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.SearchResponse$SearchResult$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -6489,7 +10062,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.SearchRequest$EmbeddingSpec", + "name": "com.google.cloud.discoveryengine.v1beta.SearchResponse$SearchResult$RankSignals", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -6498,7 +10071,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.SearchRequest$EmbeddingSpec$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.SearchResponse$SearchResult$RankSignals$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -6507,7 +10080,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.SearchRequest$EmbeddingSpec$EmbeddingVector", + "name": "com.google.cloud.discoveryengine.v1beta.SearchResponse$SearchResult$RankSignals$CustomSignal", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -6516,7 +10089,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.SearchRequest$EmbeddingSpec$EmbeddingVector$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.SearchResponse$SearchResult$RankSignals$CustomSignal$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -6525,7 +10098,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.SearchRequest$FacetSpec", + "name": "com.google.cloud.discoveryengine.v1beta.SearchResponse$SemanticState", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -6534,7 +10107,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.SearchRequest$FacetSpec$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.SearchResponse$SessionInfo", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -6543,7 +10116,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.SearchRequest$FacetSpec$FacetKey", + "name": "com.google.cloud.discoveryengine.v1beta.SearchResponse$SessionInfo$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -6552,7 +10125,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.SearchRequest$FacetSpec$FacetKey$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.SearchResponse$Summary", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -6561,7 +10134,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.SearchRequest$ImageQuery", + "name": "com.google.cloud.discoveryengine.v1beta.SearchResponse$Summary$BlobAttachment", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -6570,7 +10143,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.SearchRequest$ImageQuery$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.SearchResponse$Summary$BlobAttachment$AttributionType", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -6579,7 +10152,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.SearchRequest$NaturalLanguageQueryUnderstandingSpec", + "name": "com.google.cloud.discoveryengine.v1beta.SearchResponse$Summary$BlobAttachment$Blob", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -6588,7 +10161,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.SearchRequest$NaturalLanguageQueryUnderstandingSpec$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.SearchResponse$Summary$BlobAttachment$Blob$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -6597,7 +10170,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.SearchRequest$NaturalLanguageQueryUnderstandingSpec$FilterExtractionCondition", + "name": "com.google.cloud.discoveryengine.v1beta.SearchResponse$Summary$BlobAttachment$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -6606,7 +10179,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.SearchRequest$PersonalizationSpec", + "name": "com.google.cloud.discoveryengine.v1beta.SearchResponse$Summary$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -6615,7 +10188,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.SearchRequest$PersonalizationSpec$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.SearchResponse$Summary$Citation", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -6624,7 +10197,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.SearchRequest$PersonalizationSpec$Mode", + "name": "com.google.cloud.discoveryengine.v1beta.SearchResponse$Summary$Citation$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -6633,7 +10206,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.SearchRequest$QueryExpansionSpec", + "name": "com.google.cloud.discoveryengine.v1beta.SearchResponse$Summary$CitationMetadata", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -6642,7 +10215,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.SearchRequest$QueryExpansionSpec$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.SearchResponse$Summary$CitationMetadata$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -6651,7 +10224,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.SearchRequest$QueryExpansionSpec$Condition", + "name": "com.google.cloud.discoveryengine.v1beta.SearchResponse$Summary$CitationSource", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -6660,7 +10233,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.SearchRequest$RankingExpressionBackend", + "name": "com.google.cloud.discoveryengine.v1beta.SearchResponse$Summary$CitationSource$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -6669,7 +10242,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.SearchRequest$RelevanceThreshold", + "name": "com.google.cloud.discoveryengine.v1beta.SearchResponse$Summary$Reference", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -6678,7 +10251,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.SearchRequest$SearchAsYouTypeSpec", + "name": "com.google.cloud.discoveryengine.v1beta.SearchResponse$Summary$Reference$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -6687,7 +10260,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.SearchRequest$SearchAsYouTypeSpec$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.SearchResponse$Summary$Reference$ChunkContent", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -6696,7 +10269,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.SearchRequest$SearchAsYouTypeSpec$Condition", + "name": "com.google.cloud.discoveryengine.v1beta.SearchResponse$Summary$Reference$ChunkContent$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -6705,7 +10278,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.SearchRequest$SessionSpec", + "name": "com.google.cloud.discoveryengine.v1beta.SearchResponse$Summary$SafetyAttributes", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -6714,7 +10287,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.SearchRequest$SessionSpec$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.SearchResponse$Summary$SafetyAttributes$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -6723,7 +10296,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.SearchRequest$SpellCorrectionSpec", + "name": "com.google.cloud.discoveryengine.v1beta.SearchResponse$Summary$SummarySkippedReason", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -6732,7 +10305,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.SearchRequest$SpellCorrectionSpec$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.SearchResponse$Summary$SummaryWithMetadata", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -6741,7 +10314,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.SearchRequest$SpellCorrectionSpec$Mode", + "name": "com.google.cloud.discoveryengine.v1beta.SearchResponse$Summary$SummaryWithMetadata$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -6750,7 +10323,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.SearchResponse", + "name": "com.google.cloud.discoveryengine.v1beta.SearchTier", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -6759,7 +10332,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.SearchResponse$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.SearchUseCase", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -6768,7 +10341,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.SearchResponse$Facet", + "name": "com.google.cloud.discoveryengine.v1beta.ServingConfig", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -6777,7 +10350,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.SearchResponse$Facet$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.ServingConfig$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -6786,7 +10359,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.SearchResponse$Facet$FacetValue", + "name": "com.google.cloud.discoveryengine.v1beta.ServingConfig$GenericConfig", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -6795,7 +10368,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.SearchResponse$Facet$FacetValue$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.ServingConfig$GenericConfig$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -6804,7 +10377,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.SearchResponse$GeoSearchDebugInfo", + "name": "com.google.cloud.discoveryengine.v1beta.ServingConfig$MediaConfig", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -6813,7 +10386,106 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.SearchResponse$GeoSearchDebugInfo$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.ServingConfig$MediaConfig$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.Session", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.Session$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.Session$State", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.Session$Turn", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.Session$Turn$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.SingleRegionKey", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.SingleRegionKey$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.SiteSearchEngine", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.SiteSearchEngine$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.SiteVerificationInfo", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.discoveryengine.v1beta.SiteVerificationInfo$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -6822,7 +10494,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.SearchResponse$GuidedSearchResult", + "name": "com.google.cloud.discoveryengine.v1beta.SiteVerificationInfo$SiteVerificationState", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -6831,7 +10503,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.SearchResponse$GuidedSearchResult$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.Sitemap", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -6840,7 +10512,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.SearchResponse$GuidedSearchResult$RefinementAttribute", + "name": "com.google.cloud.discoveryengine.v1beta.Sitemap$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -6849,7 +10521,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.SearchResponse$GuidedSearchResult$RefinementAttribute$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.SolutionType", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -6858,7 +10530,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.SearchResponse$NaturalLanguageQueryUnderstandingInfo", + "name": "com.google.cloud.discoveryengine.v1beta.SpannerSource", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -6867,7 +10539,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.SearchResponse$NaturalLanguageQueryUnderstandingInfo$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.SpannerSource$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -6876,7 +10548,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.SearchResponse$NaturalLanguageQueryUnderstandingInfo$StructuredExtractedFilter", + "name": "com.google.cloud.discoveryengine.v1beta.StreamAssistRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -6885,7 +10557,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.SearchResponse$NaturalLanguageQueryUnderstandingInfo$StructuredExtractedFilter$AndExpression", + "name": "com.google.cloud.discoveryengine.v1beta.StreamAssistRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -6894,7 +10566,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.SearchResponse$NaturalLanguageQueryUnderstandingInfo$StructuredExtractedFilter$AndExpression$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.StreamAssistRequest$GenerationSpec", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -6903,7 +10575,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.SearchResponse$NaturalLanguageQueryUnderstandingInfo$StructuredExtractedFilter$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.StreamAssistRequest$GenerationSpec$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -6912,7 +10584,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.SearchResponse$NaturalLanguageQueryUnderstandingInfo$StructuredExtractedFilter$Expression", + "name": "com.google.cloud.discoveryengine.v1beta.StreamAssistRequest$ToolsSpec", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -6921,7 +10593,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.SearchResponse$NaturalLanguageQueryUnderstandingInfo$StructuredExtractedFilter$Expression$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.StreamAssistRequest$ToolsSpec$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -6930,7 +10602,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.SearchResponse$NaturalLanguageQueryUnderstandingInfo$StructuredExtractedFilter$GeolocationConstraint", + "name": "com.google.cloud.discoveryengine.v1beta.StreamAssistRequest$ToolsSpec$ImageGenerationSpec", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -6939,7 +10611,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.SearchResponse$NaturalLanguageQueryUnderstandingInfo$StructuredExtractedFilter$GeolocationConstraint$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.StreamAssistRequest$ToolsSpec$ImageGenerationSpec$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -6948,7 +10620,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.SearchResponse$NaturalLanguageQueryUnderstandingInfo$StructuredExtractedFilter$NumberConstraint", + "name": "com.google.cloud.discoveryengine.v1beta.StreamAssistRequest$ToolsSpec$VertexAiSearchSpec", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -6957,7 +10629,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.SearchResponse$NaturalLanguageQueryUnderstandingInfo$StructuredExtractedFilter$NumberConstraint$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.StreamAssistRequest$ToolsSpec$VertexAiSearchSpec$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -6966,7 +10638,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.SearchResponse$NaturalLanguageQueryUnderstandingInfo$StructuredExtractedFilter$NumberConstraint$Comparison", + "name": "com.google.cloud.discoveryengine.v1beta.StreamAssistRequest$ToolsSpec$VideoGenerationSpec", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -6975,7 +10647,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.SearchResponse$NaturalLanguageQueryUnderstandingInfo$StructuredExtractedFilter$OrExpression", + "name": "com.google.cloud.discoveryengine.v1beta.StreamAssistRequest$ToolsSpec$VideoGenerationSpec$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -6984,7 +10656,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.SearchResponse$NaturalLanguageQueryUnderstandingInfo$StructuredExtractedFilter$OrExpression$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.StreamAssistRequest$ToolsSpec$WebGroundingSpec", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -6993,7 +10665,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.SearchResponse$NaturalLanguageQueryUnderstandingInfo$StructuredExtractedFilter$StringConstraint", + "name": "com.google.cloud.discoveryengine.v1beta.StreamAssistRequest$ToolsSpec$WebGroundingSpec$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -7002,7 +10674,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.SearchResponse$NaturalLanguageQueryUnderstandingInfo$StructuredExtractedFilter$StringConstraint$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.StreamAssistResponse", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -7011,7 +10683,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.SearchResponse$OneBoxResult", + "name": "com.google.cloud.discoveryengine.v1beta.StreamAssistResponse$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -7020,7 +10692,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.SearchResponse$OneBoxResult$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.StreamAssistResponse$InvokedSkill", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -7029,7 +10701,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.SearchResponse$OneBoxResult$OneBoxType", + "name": "com.google.cloud.discoveryengine.v1beta.StreamAssistResponse$InvokedSkill$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -7038,7 +10710,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.SearchResponse$QueryExpansionInfo", + "name": "com.google.cloud.discoveryengine.v1beta.StreamAssistResponse$SessionInfo", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -7047,7 +10719,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.SearchResponse$QueryExpansionInfo$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.StreamAssistResponse$SessionInfo$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -7056,7 +10728,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.SearchResponse$SearchResult", + "name": "com.google.cloud.discoveryengine.v1beta.SubscriptionTerm", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -7065,7 +10737,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.SearchResponse$SearchResult$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.SubscriptionTier", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -7074,7 +10746,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.SearchResponse$SearchResult$RankSignals", + "name": "com.google.cloud.discoveryengine.v1beta.SuggestionDenyListEntry", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -7083,7 +10755,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.SearchResponse$SearchResult$RankSignals$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.SuggestionDenyListEntry$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -7092,7 +10764,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.SearchResponse$SearchResult$RankSignals$CustomSignal", + "name": "com.google.cloud.discoveryengine.v1beta.SuggestionDenyListEntry$MatchOperator", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -7101,7 +10773,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.SearchResponse$SearchResult$RankSignals$CustomSignal$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.TargetSite", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -7110,7 +10782,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.SearchResponse$SessionInfo", + "name": "com.google.cloud.discoveryengine.v1beta.TargetSite$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -7119,7 +10791,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.SearchResponse$SessionInfo$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.TargetSite$FailureReason", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -7128,7 +10800,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.SearchResponse$Summary", + "name": "com.google.cloud.discoveryengine.v1beta.TargetSite$FailureReason$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -7137,7 +10809,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.SearchResponse$Summary$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.TargetSite$FailureReason$QuotaFailure", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -7146,7 +10818,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.SearchResponse$Summary$Citation", + "name": "com.google.cloud.discoveryengine.v1beta.TargetSite$FailureReason$QuotaFailure$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -7155,7 +10827,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.SearchResponse$Summary$Citation$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.TargetSite$IndexingStatus", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -7164,7 +10836,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.SearchResponse$Summary$CitationMetadata", + "name": "com.google.cloud.discoveryengine.v1beta.TargetSite$Type", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -7173,7 +10845,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.SearchResponse$Summary$CitationMetadata$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.TextInput", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -7182,7 +10854,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.SearchResponse$Summary$CitationSource", + "name": "com.google.cloud.discoveryengine.v1beta.TextInput$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -7191,7 +10863,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.SearchResponse$Summary$CitationSource$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.TrainCustomModelMetadata", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -7200,7 +10872,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.SearchResponse$Summary$Reference", + "name": "com.google.cloud.discoveryengine.v1beta.TrainCustomModelMetadata$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -7209,7 +10881,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.SearchResponse$Summary$Reference$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.TrainCustomModelRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -7218,7 +10890,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.SearchResponse$Summary$Reference$ChunkContent", + "name": "com.google.cloud.discoveryengine.v1beta.TrainCustomModelRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -7227,7 +10899,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.SearchResponse$Summary$Reference$ChunkContent$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.TrainCustomModelRequest$GcsTrainingInput", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -7236,7 +10908,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.SearchResponse$Summary$SafetyAttributes", + "name": "com.google.cloud.discoveryengine.v1beta.TrainCustomModelRequest$GcsTrainingInput$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -7245,7 +10917,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.SearchResponse$Summary$SafetyAttributes$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.TrainCustomModelResponse", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -7254,7 +10926,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.SearchResponse$Summary$SummarySkippedReason", + "name": "com.google.cloud.discoveryengine.v1beta.TrainCustomModelResponse$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -7263,7 +10935,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.SearchResponse$Summary$SummaryWithMetadata", + "name": "com.google.cloud.discoveryengine.v1beta.TransactionInfo", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -7272,7 +10944,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.SearchResponse$Summary$SummaryWithMetadata$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.TransactionInfo$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -7281,7 +10953,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.SearchTier", + "name": "com.google.cloud.discoveryengine.v1beta.TuneEngineMetadata", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -7290,7 +10962,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.SearchUseCase", + "name": "com.google.cloud.discoveryengine.v1beta.TuneEngineMetadata$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -7299,7 +10971,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.ServingConfig", + "name": "com.google.cloud.discoveryengine.v1beta.TuneEngineRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -7308,7 +10980,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.ServingConfig$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.TuneEngineRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -7317,7 +10989,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.ServingConfig$GenericConfig", + "name": "com.google.cloud.discoveryengine.v1beta.TuneEngineResponse", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -7326,7 +10998,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.ServingConfig$GenericConfig$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.TuneEngineResponse$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -7335,7 +11007,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.ServingConfig$MediaConfig", + "name": "com.google.cloud.discoveryengine.v1beta.UpdateAclConfigRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -7344,7 +11016,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.ServingConfig$MediaConfig$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.UpdateAclConfigRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -7353,7 +11025,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.Session", + "name": "com.google.cloud.discoveryengine.v1beta.UpdateAssistantRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -7362,7 +11034,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.Session$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.UpdateAssistantRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -7371,7 +11043,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.Session$State", + "name": "com.google.cloud.discoveryengine.v1beta.UpdateCmekConfigMetadata", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -7380,7 +11052,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.Session$Turn", + "name": "com.google.cloud.discoveryengine.v1beta.UpdateCmekConfigMetadata$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -7389,7 +11061,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.Session$Turn$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.UpdateCmekConfigRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -7398,7 +11070,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.SiteSearchEngine", + "name": "com.google.cloud.discoveryengine.v1beta.UpdateCmekConfigRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -7407,7 +11079,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.SiteSearchEngine$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.UpdateControlRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -7416,7 +11088,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.SiteVerificationInfo", + "name": "com.google.cloud.discoveryengine.v1beta.UpdateControlRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -7425,7 +11097,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.SiteVerificationInfo$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.UpdateConversationRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -7434,7 +11106,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.SiteVerificationInfo$SiteVerificationState", + "name": "com.google.cloud.discoveryengine.v1beta.UpdateConversationRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -7443,7 +11115,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.Sitemap", + "name": "com.google.cloud.discoveryengine.v1beta.UpdateDataStoreRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -7452,7 +11124,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.Sitemap$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.UpdateDataStoreRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -7461,7 +11133,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.SolutionType", + "name": "com.google.cloud.discoveryengine.v1beta.UpdateDocumentRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -7470,7 +11142,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.SpannerSource", + "name": "com.google.cloud.discoveryengine.v1beta.UpdateDocumentRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -7479,7 +11151,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.SpannerSource$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.UpdateEngineRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -7488,7 +11160,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.SuggestionDenyListEntry", + "name": "com.google.cloud.discoveryengine.v1beta.UpdateEngineRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -7497,7 +11169,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.SuggestionDenyListEntry$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.UpdateLicenseConfigRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -7506,7 +11178,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.SuggestionDenyListEntry$MatchOperator", + "name": "com.google.cloud.discoveryengine.v1beta.UpdateLicenseConfigRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -7515,7 +11187,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.TargetSite", + "name": "com.google.cloud.discoveryengine.v1beta.UpdateSampleQueryRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -7524,7 +11196,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.TargetSite$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.UpdateSampleQueryRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -7533,7 +11205,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.TargetSite$FailureReason", + "name": "com.google.cloud.discoveryengine.v1beta.UpdateSampleQuerySetRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -7542,7 +11214,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.TargetSite$FailureReason$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.UpdateSampleQuerySetRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -7551,7 +11223,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.TargetSite$FailureReason$QuotaFailure", + "name": "com.google.cloud.discoveryengine.v1beta.UpdateSchemaMetadata", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -7560,7 +11232,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.TargetSite$FailureReason$QuotaFailure$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.UpdateSchemaMetadata$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -7569,7 +11241,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.TargetSite$IndexingStatus", + "name": "com.google.cloud.discoveryengine.v1beta.UpdateSchemaRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -7578,7 +11250,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.TargetSite$Type", + "name": "com.google.cloud.discoveryengine.v1beta.UpdateSchemaRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -7587,7 +11259,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.TextInput", + "name": "com.google.cloud.discoveryengine.v1beta.UpdateServingConfigRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -7596,7 +11268,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.TextInput$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.UpdateServingConfigRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -7605,7 +11277,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.TrainCustomModelMetadata", + "name": "com.google.cloud.discoveryengine.v1beta.UpdateSessionRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -7614,7 +11286,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.TrainCustomModelMetadata$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.UpdateSessionRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -7623,7 +11295,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.TrainCustomModelRequest", + "name": "com.google.cloud.discoveryengine.v1beta.UpdateTargetSiteMetadata", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -7632,7 +11304,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.TrainCustomModelRequest$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.UpdateTargetSiteMetadata$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -7641,7 +11313,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.TrainCustomModelRequest$GcsTrainingInput", + "name": "com.google.cloud.discoveryengine.v1beta.UpdateTargetSiteRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -7650,7 +11322,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.TrainCustomModelRequest$GcsTrainingInput$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.UpdateTargetSiteRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -7659,7 +11331,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.TrainCustomModelResponse", + "name": "com.google.cloud.discoveryengine.v1beta.UpdateUserStoreRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -7668,7 +11340,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.TrainCustomModelResponse$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.UpdateUserStoreRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -7677,7 +11349,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.TransactionInfo", + "name": "com.google.cloud.discoveryengine.v1beta.UserEvent", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -7686,7 +11358,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.TransactionInfo$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.UserEvent$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -7695,7 +11367,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.TuneEngineMetadata", + "name": "com.google.cloud.discoveryengine.v1beta.UserInfo", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -7704,7 +11376,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.TuneEngineMetadata$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.UserInfo$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -7713,7 +11385,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.TuneEngineRequest", + "name": "com.google.cloud.discoveryengine.v1beta.UserInfo$PreciseLocation", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -7722,7 +11394,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.TuneEngineRequest$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.UserInfo$PreciseLocation$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -7731,7 +11403,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.TuneEngineResponse", + "name": "com.google.cloud.discoveryengine.v1beta.UserLicense", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -7740,7 +11412,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.TuneEngineResponse$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.UserLicense$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -7749,7 +11421,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.UpdateControlRequest", + "name": "com.google.cloud.discoveryengine.v1beta.UserLicense$LicenseAssignmentState", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -7758,7 +11430,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.UpdateControlRequest$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.UserStore", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -7767,7 +11439,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.UpdateConversationRequest", + "name": "com.google.cloud.discoveryengine.v1beta.UserStore$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -7776,7 +11448,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.UpdateConversationRequest$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.WorkspaceConfig", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -7785,7 +11457,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.UpdateDataStoreRequest", + "name": "com.google.cloud.discoveryengine.v1beta.WorkspaceConfig$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -7794,7 +11466,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.UpdateDataStoreRequest$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.WorkspaceConfig$Type", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -7803,7 +11475,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.UpdateDocumentRequest", + "name": "com.google.cloud.discoveryengine.v1beta.WriteUserEventRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -7812,7 +11484,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.UpdateDocumentRequest$Builder", + "name": "com.google.cloud.discoveryengine.v1beta.WriteUserEventRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -7821,7 +11493,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.UpdateEngineRequest", + "name": "com.google.cloud.location.GetLocationRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -7830,7 +11502,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.UpdateEngineRequest$Builder", + "name": "com.google.cloud.location.GetLocationRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -7839,7 +11511,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.UpdateSampleQueryRequest", + "name": "com.google.cloud.location.ListLocationsRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -7848,7 +11520,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.UpdateSampleQueryRequest$Builder", + "name": "com.google.cloud.location.ListLocationsRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -7857,7 +11529,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.UpdateSampleQuerySetRequest", + "name": "com.google.cloud.location.ListLocationsResponse", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -7866,7 +11538,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.UpdateSampleQuerySetRequest$Builder", + "name": "com.google.cloud.location.ListLocationsResponse$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -7875,7 +11547,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.UpdateSchemaMetadata", + "name": "com.google.cloud.location.Location", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -7884,7 +11556,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.UpdateSchemaMetadata$Builder", + "name": "com.google.cloud.location.Location$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -7893,7 +11565,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.UpdateSchemaRequest", + "name": "com.google.iam.v1.AuditConfig", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -7902,7 +11574,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.UpdateSchemaRequest$Builder", + "name": "com.google.iam.v1.AuditConfig$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -7911,7 +11583,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.UpdateServingConfigRequest", + "name": "com.google.iam.v1.AuditConfigDelta", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -7920,7 +11592,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.UpdateServingConfigRequest$Builder", + "name": "com.google.iam.v1.AuditConfigDelta$Action", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -7929,7 +11601,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.UpdateSessionRequest", + "name": "com.google.iam.v1.AuditConfigDelta$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -7938,7 +11610,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.UpdateSessionRequest$Builder", + "name": "com.google.iam.v1.AuditLogConfig", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -7947,7 +11619,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.UpdateTargetSiteMetadata", + "name": "com.google.iam.v1.AuditLogConfig$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -7956,7 +11628,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.UpdateTargetSiteMetadata$Builder", + "name": "com.google.iam.v1.AuditLogConfig$LogType", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -7965,7 +11637,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.UpdateTargetSiteRequest", + "name": "com.google.iam.v1.Binding", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -7974,7 +11646,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.UpdateTargetSiteRequest$Builder", + "name": "com.google.iam.v1.Binding$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -7983,7 +11655,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.UserEvent", + "name": "com.google.iam.v1.BindingDelta", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -7992,7 +11664,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.UserEvent$Builder", + "name": "com.google.iam.v1.BindingDelta$Action", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -8001,7 +11673,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.UserInfo", + "name": "com.google.iam.v1.BindingDelta$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -8010,7 +11682,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.UserInfo$Builder", + "name": "com.google.iam.v1.GetIamPolicyRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -8019,7 +11691,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.WorkspaceConfig", + "name": "com.google.iam.v1.GetIamPolicyRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -8028,7 +11700,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.WorkspaceConfig$Builder", + "name": "com.google.iam.v1.GetPolicyOptions", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -8037,7 +11709,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.WorkspaceConfig$Type", + "name": "com.google.iam.v1.GetPolicyOptions$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -8046,7 +11718,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.WriteUserEventRequest", + "name": "com.google.iam.v1.Policy", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -8055,7 +11727,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.discoveryengine.v1beta.WriteUserEventRequest$Builder", + "name": "com.google.iam.v1.Policy$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -8064,7 +11736,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.location.GetLocationRequest", + "name": "com.google.iam.v1.PolicyDelta", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -8073,7 +11745,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.location.GetLocationRequest$Builder", + "name": "com.google.iam.v1.PolicyDelta$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -8082,7 +11754,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.location.ListLocationsRequest", + "name": "com.google.iam.v1.SetIamPolicyRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -8091,7 +11763,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.location.ListLocationsRequest$Builder", + "name": "com.google.iam.v1.SetIamPolicyRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -8100,7 +11772,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.location.ListLocationsResponse", + "name": "com.google.iam.v1.TestIamPermissionsRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -8109,7 +11781,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.location.ListLocationsResponse$Builder", + "name": "com.google.iam.v1.TestIamPermissionsRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -8118,7 +11790,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.location.Location", + "name": "com.google.iam.v1.TestIamPermissionsResponse", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -8127,7 +11799,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.location.Location$Builder", + "name": "com.google.iam.v1.TestIamPermissionsResponse$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -9259,5 +12931,41 @@ "allPublicMethods": true, "allDeclaredClasses": true, "allPublicClasses": true + }, + { + "name": "com.google.type.Expr", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.type.Expr$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.type.LatLng", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.type.LatLng$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true } ] \ No newline at end of file diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1beta/AclConfigServiceClientHttpJsonTest.java b/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1beta/AclConfigServiceClientHttpJsonTest.java new file mode 100644 index 000000000000..8f0deac9b8d3 --- /dev/null +++ b/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1beta/AclConfigServiceClientHttpJsonTest.java @@ -0,0 +1,222 @@ +/* + * 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.discoveryengine.v1beta; + +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.httpjson.GaxHttpJsonProperties; +import com.google.api.gax.httpjson.testing.MockHttpService; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ApiException; +import com.google.api.gax.rpc.ApiExceptionFactory; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.testing.FakeStatusCode; +import com.google.cloud.discoveryengine.v1beta.stub.HttpJsonAclConfigServiceStub; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@Generated("by gapic-generator-java") +public class AclConfigServiceClientHttpJsonTest { + private static MockHttpService mockService; + private static AclConfigServiceClient client; + + @BeforeClass + public static void startStaticServer() throws IOException { + mockService = + new MockHttpService( + HttpJsonAclConfigServiceStub.getMethodDescriptors(), + AclConfigServiceSettings.getDefaultEndpoint()); + AclConfigServiceSettings settings = + AclConfigServiceSettings.newHttpJsonBuilder() + .setTransportChannelProvider( + AclConfigServiceSettings.defaultHttpJsonTransportProviderBuilder() + .setHttpTransport(mockService) + .build()) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = AclConfigServiceClient.create(settings); + } + + @AfterClass + public static void stopServer() { + client.close(); + } + + @Before + public void setUp() {} + + @After + public void tearDown() throws Exception { + mockService.reset(); + } + + @Test + public void updateAclConfigTest() throws Exception { + AclConfig expectedResponse = + AclConfig.newBuilder() + .setName(AclConfigName.of("[PROJECT]", "[LOCATION]").toString()) + .setIdpConfig(IdpConfig.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + UpdateAclConfigRequest request = + UpdateAclConfigRequest.newBuilder() + .setAclConfig( + AclConfig.newBuilder() + .setName(AclConfigName.of("[PROJECT]", "[LOCATION]").toString()) + .setIdpConfig(IdpConfig.newBuilder().build()) + .build()) + .build(); + + AclConfig actualResponse = client.updateAclConfig(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void updateAclConfigExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + UpdateAclConfigRequest request = + UpdateAclConfigRequest.newBuilder() + .setAclConfig( + AclConfig.newBuilder() + .setName(AclConfigName.of("[PROJECT]", "[LOCATION]").toString()) + .setIdpConfig(IdpConfig.newBuilder().build()) + .build()) + .build(); + client.updateAclConfig(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getAclConfigTest() throws Exception { + AclConfig expectedResponse = + AclConfig.newBuilder() + .setName(AclConfigName.of("[PROJECT]", "[LOCATION]").toString()) + .setIdpConfig(IdpConfig.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + AclConfigName name = AclConfigName.of("[PROJECT]", "[LOCATION]"); + + AclConfig actualResponse = client.getAclConfig(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getAclConfigExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + AclConfigName name = AclConfigName.of("[PROJECT]", "[LOCATION]"); + client.getAclConfig(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getAclConfigTest2() throws Exception { + AclConfig expectedResponse = + AclConfig.newBuilder() + .setName(AclConfigName.of("[PROJECT]", "[LOCATION]").toString()) + .setIdpConfig(IdpConfig.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + String name = "projects/project-599/locations/location-599/aclConfig"; + + AclConfig actualResponse = client.getAclConfig(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getAclConfigExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "projects/project-599/locations/location-599/aclConfig"; + client.getAclConfig(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } +} diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1beta/AclConfigServiceClientTest.java b/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1beta/AclConfigServiceClientTest.java new file mode 100644 index 000000000000..706ed36f4a1f --- /dev/null +++ b/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1beta/AclConfigServiceClientTest.java @@ -0,0 +1,199 @@ +/* + * 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.discoveryengine.v1beta; + +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.testing.LocalChannelProvider; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.api.gax.grpc.testing.MockServiceHelper; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.protobuf.AbstractMessage; +import io.grpc.StatusRuntimeException; +import java.io.IOException; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import javax.annotation.Generated; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@Generated("by gapic-generator-java") +public class AclConfigServiceClientTest { + private static MockAclConfigService mockAclConfigService; + private static MockLocations mockLocations; + private static MockServiceHelper mockServiceHelper; + private LocalChannelProvider channelProvider; + private AclConfigServiceClient client; + + @BeforeClass + public static void startStaticServer() { + mockAclConfigService = new MockAclConfigService(); + mockLocations = new MockLocations(); + mockServiceHelper = + new MockServiceHelper( + UUID.randomUUID().toString(), + Arrays.asList(mockAclConfigService, mockLocations)); + mockServiceHelper.start(); + } + + @AfterClass + public static void stopServer() { + mockServiceHelper.stop(); + } + + @Before + public void setUp() throws IOException { + mockServiceHelper.reset(); + channelProvider = mockServiceHelper.createChannelProvider(); + AclConfigServiceSettings settings = + AclConfigServiceSettings.newBuilder() + .setTransportChannelProvider(channelProvider) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = AclConfigServiceClient.create(settings); + } + + @After + public void tearDown() throws Exception { + client.close(); + } + + @Test + public void updateAclConfigTest() throws Exception { + AclConfig expectedResponse = + AclConfig.newBuilder() + .setName(AclConfigName.of("[PROJECT]", "[LOCATION]").toString()) + .setIdpConfig(IdpConfig.newBuilder().build()) + .build(); + mockAclConfigService.addResponse(expectedResponse); + + UpdateAclConfigRequest request = + UpdateAclConfigRequest.newBuilder().setAclConfig(AclConfig.newBuilder().build()).build(); + + AclConfig actualResponse = client.updateAclConfig(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAclConfigService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateAclConfigRequest actualRequest = ((UpdateAclConfigRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getAclConfig(), actualRequest.getAclConfig()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updateAclConfigExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAclConfigService.addException(exception); + + try { + UpdateAclConfigRequest request = + UpdateAclConfigRequest.newBuilder().setAclConfig(AclConfig.newBuilder().build()).build(); + client.updateAclConfig(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getAclConfigTest() throws Exception { + AclConfig expectedResponse = + AclConfig.newBuilder() + .setName(AclConfigName.of("[PROJECT]", "[LOCATION]").toString()) + .setIdpConfig(IdpConfig.newBuilder().build()) + .build(); + mockAclConfigService.addResponse(expectedResponse); + + AclConfigName name = AclConfigName.of("[PROJECT]", "[LOCATION]"); + + AclConfig actualResponse = client.getAclConfig(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAclConfigService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetAclConfigRequest actualRequest = ((GetAclConfigRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getAclConfigExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAclConfigService.addException(exception); + + try { + AclConfigName name = AclConfigName.of("[PROJECT]", "[LOCATION]"); + client.getAclConfig(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getAclConfigTest2() throws Exception { + AclConfig expectedResponse = + AclConfig.newBuilder() + .setName(AclConfigName.of("[PROJECT]", "[LOCATION]").toString()) + .setIdpConfig(IdpConfig.newBuilder().build()) + .build(); + mockAclConfigService.addResponse(expectedResponse); + + String name = "name3373707"; + + AclConfig actualResponse = client.getAclConfig(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAclConfigService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetAclConfigRequest actualRequest = ((GetAclConfigRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getAclConfigExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAclConfigService.addException(exception); + + try { + String name = "name3373707"; + client.getAclConfig(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } +} diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1beta/AssistantServiceClientHttpJsonTest.java b/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1beta/AssistantServiceClientHttpJsonTest.java new file mode 100644 index 000000000000..ee067bcc0136 --- /dev/null +++ b/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1beta/AssistantServiceClientHttpJsonTest.java @@ -0,0 +1,544 @@ +/* + * 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.discoveryengine.v1beta; + +import static com.google.cloud.discoveryengine.v1beta.AssistantServiceClient.ListAssistantsPagedResponse; + +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.httpjson.GaxHttpJsonProperties; +import com.google.api.gax.httpjson.testing.MockHttpService; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ApiException; +import com.google.api.gax.rpc.ApiExceptionFactory; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.testing.FakeStatusCode; +import com.google.cloud.discoveryengine.v1beta.stub.HttpJsonAssistantServiceStub; +import com.google.common.collect.Lists; +import com.google.protobuf.Empty; +import com.google.protobuf.FieldMask; +import com.google.protobuf.Timestamp; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import javax.annotation.Generated; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@Generated("by gapic-generator-java") +public class AssistantServiceClientHttpJsonTest { + private static MockHttpService mockService; + private static AssistantServiceClient client; + + @BeforeClass + public static void startStaticServer() throws IOException { + mockService = + new MockHttpService( + HttpJsonAssistantServiceStub.getMethodDescriptors(), + AssistantServiceSettings.getDefaultEndpoint()); + AssistantServiceSettings settings = + AssistantServiceSettings.newHttpJsonBuilder() + .setTransportChannelProvider( + AssistantServiceSettings.defaultHttpJsonTransportProviderBuilder() + .setHttpTransport(mockService) + .build()) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = AssistantServiceClient.create(settings); + } + + @AfterClass + public static void stopServer() { + client.close(); + } + + @Before + public void setUp() {} + + @After + public void tearDown() throws Exception { + mockService.reset(); + } + + @Test + public void streamAssistTest() throws Exception {} + + @Test + public void streamAssistExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + } + + @Test + public void createAssistantTest() throws Exception { + Assistant expectedResponse = + Assistant.newBuilder() + .setName( + AssistantName.of( + "[PROJECT]", "[LOCATION]", "[COLLECTION]", "[ENGINE]", "[ASSISTANT]") + .toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setGenerationConfig(Assistant.GenerationConfig.newBuilder().build()) + .setDefaultWebGroundingToggleOff(true) + .putAllEnabledTools(new HashMap()) + .setCustomerPolicy(Assistant.CustomerPolicy.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + CreateAssistantRequest request = + CreateAssistantRequest.newBuilder() + .setParent( + EngineName.of("[PROJECT]", "[LOCATION]", "[COLLECTION]", "[ENGINE]").toString()) + .setAssistant(Assistant.newBuilder().build()) + .setAssistantId("assistantId-324518759") + .build(); + + Assistant actualResponse = client.createAssistant(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createAssistantExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + CreateAssistantRequest request = + CreateAssistantRequest.newBuilder() + .setParent( + EngineName.of("[PROJECT]", "[LOCATION]", "[COLLECTION]", "[ENGINE]").toString()) + .setAssistant(Assistant.newBuilder().build()) + .setAssistantId("assistantId-324518759") + .build(); + client.createAssistant(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteAssistantTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockService.addResponse(expectedResponse); + + AssistantName name = + AssistantName.of("[PROJECT]", "[LOCATION]", "[COLLECTION]", "[ENGINE]", "[ASSISTANT]"); + + client.deleteAssistant(name); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deleteAssistantExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + AssistantName name = + AssistantName.of("[PROJECT]", "[LOCATION]", "[COLLECTION]", "[ENGINE]", "[ASSISTANT]"); + client.deleteAssistant(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteAssistantTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockService.addResponse(expectedResponse); + + String name = + "projects/project-3577/locations/location-3577/collections/collection-3577/engines/engine-3577/assistants/assistant-3577"; + + client.deleteAssistant(name); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deleteAssistantExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "projects/project-3577/locations/location-3577/collections/collection-3577/engines/engine-3577/assistants/assistant-3577"; + client.deleteAssistant(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updateAssistantTest() throws Exception { + Assistant expectedResponse = + Assistant.newBuilder() + .setName( + AssistantName.of( + "[PROJECT]", "[LOCATION]", "[COLLECTION]", "[ENGINE]", "[ASSISTANT]") + .toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setGenerationConfig(Assistant.GenerationConfig.newBuilder().build()) + .setDefaultWebGroundingToggleOff(true) + .putAllEnabledTools(new HashMap()) + .setCustomerPolicy(Assistant.CustomerPolicy.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + Assistant assistant = + Assistant.newBuilder() + .setName( + AssistantName.of( + "[PROJECT]", "[LOCATION]", "[COLLECTION]", "[ENGINE]", "[ASSISTANT]") + .toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setGenerationConfig(Assistant.GenerationConfig.newBuilder().build()) + .setDefaultWebGroundingToggleOff(true) + .putAllEnabledTools(new HashMap()) + .setCustomerPolicy(Assistant.CustomerPolicy.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + Assistant actualResponse = client.updateAssistant(assistant, updateMask); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void updateAssistantExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + Assistant assistant = + Assistant.newBuilder() + .setName( + AssistantName.of( + "[PROJECT]", "[LOCATION]", "[COLLECTION]", "[ENGINE]", "[ASSISTANT]") + .toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setGenerationConfig(Assistant.GenerationConfig.newBuilder().build()) + .setDefaultWebGroundingToggleOff(true) + .putAllEnabledTools(new HashMap()) + .setCustomerPolicy(Assistant.CustomerPolicy.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateAssistant(assistant, updateMask); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getAssistantTest() throws Exception { + Assistant expectedResponse = + Assistant.newBuilder() + .setName( + AssistantName.of( + "[PROJECT]", "[LOCATION]", "[COLLECTION]", "[ENGINE]", "[ASSISTANT]") + .toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setGenerationConfig(Assistant.GenerationConfig.newBuilder().build()) + .setDefaultWebGroundingToggleOff(true) + .putAllEnabledTools(new HashMap()) + .setCustomerPolicy(Assistant.CustomerPolicy.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + AssistantName name = + AssistantName.of("[PROJECT]", "[LOCATION]", "[COLLECTION]", "[ENGINE]", "[ASSISTANT]"); + + Assistant actualResponse = client.getAssistant(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getAssistantExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + AssistantName name = + AssistantName.of("[PROJECT]", "[LOCATION]", "[COLLECTION]", "[ENGINE]", "[ASSISTANT]"); + client.getAssistant(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getAssistantTest2() throws Exception { + Assistant expectedResponse = + Assistant.newBuilder() + .setName( + AssistantName.of( + "[PROJECT]", "[LOCATION]", "[COLLECTION]", "[ENGINE]", "[ASSISTANT]") + .toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setGenerationConfig(Assistant.GenerationConfig.newBuilder().build()) + .setDefaultWebGroundingToggleOff(true) + .putAllEnabledTools(new HashMap()) + .setCustomerPolicy(Assistant.CustomerPolicy.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + String name = + "projects/project-3577/locations/location-3577/collections/collection-3577/engines/engine-3577/assistants/assistant-3577"; + + Assistant actualResponse = client.getAssistant(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getAssistantExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "projects/project-3577/locations/location-3577/collections/collection-3577/engines/engine-3577/assistants/assistant-3577"; + client.getAssistant(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listAssistantsTest() throws Exception { + Assistant responsesElement = Assistant.newBuilder().build(); + ListAssistantsResponse expectedResponse = + ListAssistantsResponse.newBuilder() + .setNextPageToken("") + .addAllAssistants(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + EngineName parent = EngineName.of("[PROJECT]", "[LOCATION]", "[COLLECTION]", "[ENGINE]"); + + ListAssistantsPagedResponse pagedListResponse = client.listAssistants(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getAssistantsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listAssistantsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + EngineName parent = EngineName.of("[PROJECT]", "[LOCATION]", "[COLLECTION]", "[ENGINE]"); + client.listAssistants(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listAssistantsTest2() throws Exception { + Assistant responsesElement = Assistant.newBuilder().build(); + ListAssistantsResponse expectedResponse = + ListAssistantsResponse.newBuilder() + .setNextPageToken("") + .addAllAssistants(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = + "projects/project-6937/locations/location-6937/collections/collection-6937/engines/engine-6937"; + + ListAssistantsPagedResponse pagedListResponse = client.listAssistants(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getAssistantsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listAssistantsExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = + "projects/project-6937/locations/location-6937/collections/collection-6937/engines/engine-6937"; + client.listAssistants(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } +} diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1beta/AssistantServiceClientTest.java b/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1beta/AssistantServiceClientTest.java new file mode 100644 index 000000000000..45eca56dc9c8 --- /dev/null +++ b/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1beta/AssistantServiceClientTest.java @@ -0,0 +1,539 @@ +/* + * 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.discoveryengine.v1beta; + +import static com.google.cloud.discoveryengine.v1beta.AssistantServiceClient.ListAssistantsPagedResponse; + +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.testing.LocalChannelProvider; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.api.gax.grpc.testing.MockServiceHelper; +import com.google.api.gax.grpc.testing.MockStreamObserver; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.StatusCode; +import com.google.common.collect.Lists; +import com.google.protobuf.AbstractMessage; +import com.google.protobuf.Empty; +import com.google.protobuf.FieldMask; +import com.google.protobuf.Timestamp; +import io.grpc.StatusRuntimeException; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.UUID; +import java.util.concurrent.ExecutionException; +import javax.annotation.Generated; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@Generated("by gapic-generator-java") +public class AssistantServiceClientTest { + private static MockAssistantService mockAssistantService; + private static MockLocations mockLocations; + private static MockServiceHelper mockServiceHelper; + private LocalChannelProvider channelProvider; + private AssistantServiceClient client; + + @BeforeClass + public static void startStaticServer() { + mockAssistantService = new MockAssistantService(); + mockLocations = new MockLocations(); + mockServiceHelper = + new MockServiceHelper( + UUID.randomUUID().toString(), + Arrays.asList(mockAssistantService, mockLocations)); + mockServiceHelper.start(); + } + + @AfterClass + public static void stopServer() { + mockServiceHelper.stop(); + } + + @Before + public void setUp() throws IOException { + mockServiceHelper.reset(); + channelProvider = mockServiceHelper.createChannelProvider(); + AssistantServiceSettings settings = + AssistantServiceSettings.newBuilder() + .setTransportChannelProvider(channelProvider) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = AssistantServiceClient.create(settings); + } + + @After + public void tearDown() throws Exception { + client.close(); + } + + @Test + public void streamAssistTest() throws Exception { + StreamAssistResponse expectedResponse = + StreamAssistResponse.newBuilder() + .setAnswer(AssistAnswer.newBuilder().build()) + .setSessionInfo(StreamAssistResponse.SessionInfo.newBuilder().build()) + .setAssistToken("assistToken-336502512") + .addAllInvocationTools(new ArrayList()) + .addAllInvokedSkills(new ArrayList()) + .build(); + mockAssistantService.addResponse(expectedResponse); + StreamAssistRequest request = + StreamAssistRequest.newBuilder() + .setName( + AssistantName.of( + "[PROJECT]", "[LOCATION]", "[COLLECTION]", "[ENGINE]", "[ASSISTANT]") + .toString()) + .setQuery(Query.newBuilder().build()) + .setSession( + SessionName.ofProjectLocationDataStoreSessionName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[SESSION]") + .toString()) + .setUserMetadata(AssistUserMetadata.newBuilder().build()) + .setToolsSpec(StreamAssistRequest.ToolsSpec.newBuilder().build()) + .setGenerationSpec(StreamAssistRequest.GenerationSpec.newBuilder().build()) + .build(); + + MockStreamObserver responseObserver = new MockStreamObserver<>(); + + ServerStreamingCallable callable = + client.streamAssistCallable(); + callable.serverStreamingCall(request, responseObserver); + + List actualResponses = responseObserver.future().get(); + Assert.assertEquals(1, actualResponses.size()); + Assert.assertEquals(expectedResponse, actualResponses.get(0)); + } + + @Test + public void streamAssistExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAssistantService.addException(exception); + StreamAssistRequest request = + StreamAssistRequest.newBuilder() + .setName( + AssistantName.of( + "[PROJECT]", "[LOCATION]", "[COLLECTION]", "[ENGINE]", "[ASSISTANT]") + .toString()) + .setQuery(Query.newBuilder().build()) + .setSession( + SessionName.ofProjectLocationDataStoreSessionName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[SESSION]") + .toString()) + .setUserMetadata(AssistUserMetadata.newBuilder().build()) + .setToolsSpec(StreamAssistRequest.ToolsSpec.newBuilder().build()) + .setGenerationSpec(StreamAssistRequest.GenerationSpec.newBuilder().build()) + .build(); + + MockStreamObserver responseObserver = new MockStreamObserver<>(); + + ServerStreamingCallable callable = + client.streamAssistCallable(); + callable.serverStreamingCall(request, responseObserver); + + try { + List actualResponses = responseObserver.future().get(); + Assert.fail("No exception thrown"); + } catch (ExecutionException e) { + Assert.assertTrue(e.getCause() instanceof InvalidArgumentException); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void createAssistantTest() throws Exception { + Assistant expectedResponse = + Assistant.newBuilder() + .setName( + AssistantName.of( + "[PROJECT]", "[LOCATION]", "[COLLECTION]", "[ENGINE]", "[ASSISTANT]") + .toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setGenerationConfig(Assistant.GenerationConfig.newBuilder().build()) + .setDefaultWebGroundingToggleOff(true) + .putAllEnabledTools(new HashMap()) + .setCustomerPolicy(Assistant.CustomerPolicy.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + mockAssistantService.addResponse(expectedResponse); + + CreateAssistantRequest request = + CreateAssistantRequest.newBuilder() + .setParent( + EngineName.of("[PROJECT]", "[LOCATION]", "[COLLECTION]", "[ENGINE]").toString()) + .setAssistant(Assistant.newBuilder().build()) + .setAssistantId("assistantId-324518759") + .build(); + + Assistant actualResponse = client.createAssistant(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAssistantService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateAssistantRequest actualRequest = ((CreateAssistantRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getParent(), actualRequest.getParent()); + Assert.assertEquals(request.getAssistant(), actualRequest.getAssistant()); + Assert.assertEquals(request.getAssistantId(), actualRequest.getAssistantId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createAssistantExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAssistantService.addException(exception); + + try { + CreateAssistantRequest request = + CreateAssistantRequest.newBuilder() + .setParent( + EngineName.of("[PROJECT]", "[LOCATION]", "[COLLECTION]", "[ENGINE]").toString()) + .setAssistant(Assistant.newBuilder().build()) + .setAssistantId("assistantId-324518759") + .build(); + client.createAssistant(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteAssistantTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockAssistantService.addResponse(expectedResponse); + + AssistantName name = + AssistantName.of("[PROJECT]", "[LOCATION]", "[COLLECTION]", "[ENGINE]", "[ASSISTANT]"); + + client.deleteAssistant(name); + + List actualRequests = mockAssistantService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteAssistantRequest actualRequest = ((DeleteAssistantRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteAssistantExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAssistantService.addException(exception); + + try { + AssistantName name = + AssistantName.of("[PROJECT]", "[LOCATION]", "[COLLECTION]", "[ENGINE]", "[ASSISTANT]"); + client.deleteAssistant(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteAssistantTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockAssistantService.addResponse(expectedResponse); + + String name = "name3373707"; + + client.deleteAssistant(name); + + List actualRequests = mockAssistantService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteAssistantRequest actualRequest = ((DeleteAssistantRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteAssistantExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAssistantService.addException(exception); + + try { + String name = "name3373707"; + client.deleteAssistant(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updateAssistantTest() throws Exception { + Assistant expectedResponse = + Assistant.newBuilder() + .setName( + AssistantName.of( + "[PROJECT]", "[LOCATION]", "[COLLECTION]", "[ENGINE]", "[ASSISTANT]") + .toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setGenerationConfig(Assistant.GenerationConfig.newBuilder().build()) + .setDefaultWebGroundingToggleOff(true) + .putAllEnabledTools(new HashMap()) + .setCustomerPolicy(Assistant.CustomerPolicy.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + mockAssistantService.addResponse(expectedResponse); + + Assistant assistant = Assistant.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + Assistant actualResponse = client.updateAssistant(assistant, updateMask); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAssistantService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateAssistantRequest actualRequest = ((UpdateAssistantRequest) actualRequests.get(0)); + + Assert.assertEquals(assistant, actualRequest.getAssistant()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updateAssistantExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAssistantService.addException(exception); + + try { + Assistant assistant = Assistant.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateAssistant(assistant, updateMask); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getAssistantTest() throws Exception { + Assistant expectedResponse = + Assistant.newBuilder() + .setName( + AssistantName.of( + "[PROJECT]", "[LOCATION]", "[COLLECTION]", "[ENGINE]", "[ASSISTANT]") + .toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setGenerationConfig(Assistant.GenerationConfig.newBuilder().build()) + .setDefaultWebGroundingToggleOff(true) + .putAllEnabledTools(new HashMap()) + .setCustomerPolicy(Assistant.CustomerPolicy.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + mockAssistantService.addResponse(expectedResponse); + + AssistantName name = + AssistantName.of("[PROJECT]", "[LOCATION]", "[COLLECTION]", "[ENGINE]", "[ASSISTANT]"); + + Assistant actualResponse = client.getAssistant(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAssistantService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetAssistantRequest actualRequest = ((GetAssistantRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getAssistantExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAssistantService.addException(exception); + + try { + AssistantName name = + AssistantName.of("[PROJECT]", "[LOCATION]", "[COLLECTION]", "[ENGINE]", "[ASSISTANT]"); + client.getAssistant(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getAssistantTest2() throws Exception { + Assistant expectedResponse = + Assistant.newBuilder() + .setName( + AssistantName.of( + "[PROJECT]", "[LOCATION]", "[COLLECTION]", "[ENGINE]", "[ASSISTANT]") + .toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setGenerationConfig(Assistant.GenerationConfig.newBuilder().build()) + .setDefaultWebGroundingToggleOff(true) + .putAllEnabledTools(new HashMap()) + .setCustomerPolicy(Assistant.CustomerPolicy.newBuilder().build()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + mockAssistantService.addResponse(expectedResponse); + + String name = "name3373707"; + + Assistant actualResponse = client.getAssistant(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAssistantService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetAssistantRequest actualRequest = ((GetAssistantRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getAssistantExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAssistantService.addException(exception); + + try { + String name = "name3373707"; + client.getAssistant(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listAssistantsTest() throws Exception { + Assistant responsesElement = Assistant.newBuilder().build(); + ListAssistantsResponse expectedResponse = + ListAssistantsResponse.newBuilder() + .setNextPageToken("") + .addAllAssistants(Arrays.asList(responsesElement)) + .build(); + mockAssistantService.addResponse(expectedResponse); + + EngineName parent = EngineName.of("[PROJECT]", "[LOCATION]", "[COLLECTION]", "[ENGINE]"); + + ListAssistantsPagedResponse pagedListResponse = client.listAssistants(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getAssistantsList().get(0), resources.get(0)); + + List actualRequests = mockAssistantService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListAssistantsRequest actualRequest = ((ListAssistantsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listAssistantsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAssistantService.addException(exception); + + try { + EngineName parent = EngineName.of("[PROJECT]", "[LOCATION]", "[COLLECTION]", "[ENGINE]"); + client.listAssistants(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listAssistantsTest2() throws Exception { + Assistant responsesElement = Assistant.newBuilder().build(); + ListAssistantsResponse expectedResponse = + ListAssistantsResponse.newBuilder() + .setNextPageToken("") + .addAllAssistants(Arrays.asList(responsesElement)) + .build(); + mockAssistantService.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListAssistantsPagedResponse pagedListResponse = client.listAssistants(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getAssistantsList().get(0), resources.get(0)); + + List actualRequests = mockAssistantService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListAssistantsRequest actualRequest = ((ListAssistantsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listAssistantsExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAssistantService.addException(exception); + + try { + String parent = "parent-995424086"; + client.listAssistants(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } +} diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1beta/CmekConfigServiceClientHttpJsonTest.java b/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1beta/CmekConfigServiceClientHttpJsonTest.java new file mode 100644 index 000000000000..25eca6f07c79 --- /dev/null +++ b/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1beta/CmekConfigServiceClientHttpJsonTest.java @@ -0,0 +1,423 @@ +/* + * 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.discoveryengine.v1beta; + +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.httpjson.GaxHttpJsonProperties; +import com.google.api.gax.httpjson.testing.MockHttpService; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ApiException; +import com.google.api.gax.rpc.ApiExceptionFactory; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.testing.FakeStatusCode; +import com.google.cloud.discoveryengine.v1beta.stub.HttpJsonCmekConfigServiceStub; +import com.google.longrunning.Operation; +import com.google.protobuf.Any; +import com.google.protobuf.Empty; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; +import java.util.concurrent.ExecutionException; +import javax.annotation.Generated; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@Generated("by gapic-generator-java") +public class CmekConfigServiceClientHttpJsonTest { + private static MockHttpService mockService; + private static CmekConfigServiceClient client; + + @BeforeClass + public static void startStaticServer() throws IOException { + mockService = + new MockHttpService( + HttpJsonCmekConfigServiceStub.getMethodDescriptors(), + CmekConfigServiceSettings.getDefaultEndpoint()); + CmekConfigServiceSettings settings = + CmekConfigServiceSettings.newHttpJsonBuilder() + .setTransportChannelProvider( + CmekConfigServiceSettings.defaultHttpJsonTransportProviderBuilder() + .setHttpTransport(mockService) + .build()) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = CmekConfigServiceClient.create(settings); + } + + @AfterClass + public static void stopServer() { + client.close(); + } + + @Before + public void setUp() {} + + @After + public void tearDown() throws Exception { + mockService.reset(); + } + + @Test + public void updateCmekConfigTest() throws Exception { + CmekConfig expectedResponse = + CmekConfig.newBuilder() + .setName(CmekConfigName.ofProjectLocationName("[PROJECT]", "[LOCATION]").toString()) + .setKmsKey("kmsKey-1127483058") + .setKmsKeyVersion("kmsKeyVersion2084784042") + .setIsDefault(true) + .setLastRotationTimestampMicros(-1869978704) + .addAllSingleRegionKeys(new ArrayList()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("updateCmekConfigTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + CmekConfig config = + CmekConfig.newBuilder() + .setName(CmekConfigName.ofProjectLocationName("[PROJECT]", "[LOCATION]").toString()) + .setKmsKey("kmsKey-1127483058") + .setKmsKeyVersion("kmsKeyVersion2084784042") + .setIsDefault(true) + .setLastRotationTimestampMicros(-1869978704) + .addAllSingleRegionKeys(new ArrayList()) + .build(); + + CmekConfig actualResponse = client.updateCmekConfigAsync(config).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void updateCmekConfigExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + CmekConfig config = + CmekConfig.newBuilder() + .setName(CmekConfigName.ofProjectLocationName("[PROJECT]", "[LOCATION]").toString()) + .setKmsKey("kmsKey-1127483058") + .setKmsKeyVersion("kmsKeyVersion2084784042") + .setIsDefault(true) + .setLastRotationTimestampMicros(-1869978704) + .addAllSingleRegionKeys(new ArrayList()) + .build(); + client.updateCmekConfigAsync(config).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void getCmekConfigTest() throws Exception { + CmekConfig expectedResponse = + CmekConfig.newBuilder() + .setName(CmekConfigName.ofProjectLocationName("[PROJECT]", "[LOCATION]").toString()) + .setKmsKey("kmsKey-1127483058") + .setKmsKeyVersion("kmsKeyVersion2084784042") + .setIsDefault(true) + .setLastRotationTimestampMicros(-1869978704) + .addAllSingleRegionKeys(new ArrayList()) + .build(); + mockService.addResponse(expectedResponse); + + CmekConfigName name = CmekConfigName.ofProjectLocationName("[PROJECT]", "[LOCATION]"); + + CmekConfig actualResponse = client.getCmekConfig(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getCmekConfigExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + CmekConfigName name = CmekConfigName.ofProjectLocationName("[PROJECT]", "[LOCATION]"); + client.getCmekConfig(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getCmekConfigTest2() throws Exception { + CmekConfig expectedResponse = + CmekConfig.newBuilder() + .setName(CmekConfigName.ofProjectLocationName("[PROJECT]", "[LOCATION]").toString()) + .setKmsKey("kmsKey-1127483058") + .setKmsKeyVersion("kmsKeyVersion2084784042") + .setIsDefault(true) + .setLastRotationTimestampMicros(-1869978704) + .addAllSingleRegionKeys(new ArrayList()) + .build(); + mockService.addResponse(expectedResponse); + + String name = "projects/project-9943/locations/location-9943/cmekConfig"; + + CmekConfig actualResponse = client.getCmekConfig(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getCmekConfigExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "projects/project-9943/locations/location-9943/cmekConfig"; + client.getCmekConfig(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listCmekConfigsTest() throws Exception { + ListCmekConfigsResponse expectedResponse = + ListCmekConfigsResponse.newBuilder().addAllCmekConfigs(new ArrayList()).build(); + mockService.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListCmekConfigsResponse actualResponse = client.listCmekConfigs(parent); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listCmekConfigsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.listCmekConfigs(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listCmekConfigsTest2() throws Exception { + ListCmekConfigsResponse expectedResponse = + ListCmekConfigsResponse.newBuilder().addAllCmekConfigs(new ArrayList()).build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-5833/locations/location-5833"; + + ListCmekConfigsResponse actualResponse = client.listCmekConfigs(parent); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listCmekConfigsExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-5833/locations/location-5833"; + client.listCmekConfigs(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteCmekConfigTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteCmekConfigTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + CmekConfigName name = + CmekConfigName.ofProjectLocationCmekConfigName("[PROJECT]", "[LOCATION]", "[CMEK_CONFIG]"); + + client.deleteCmekConfigAsync(name).get(); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deleteCmekConfigExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + CmekConfigName name = + CmekConfigName.ofProjectLocationCmekConfigName( + "[PROJECT]", "[LOCATION]", "[CMEK_CONFIG]"); + client.deleteCmekConfigAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void deleteCmekConfigTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteCmekConfigTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String name = "projects/project-1207/locations/location-1207/cmekConfigs/cmekConfig-1207"; + + client.deleteCmekConfigAsync(name).get(); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deleteCmekConfigExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "projects/project-1207/locations/location-1207/cmekConfigs/cmekConfig-1207"; + client.deleteCmekConfigAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } +} diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1beta/CmekConfigServiceClientTest.java b/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1beta/CmekConfigServiceClientTest.java new file mode 100644 index 000000000000..ffa091a9aa31 --- /dev/null +++ b/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1beta/CmekConfigServiceClientTest.java @@ -0,0 +1,382 @@ +/* + * 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.discoveryengine.v1beta; + +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.testing.LocalChannelProvider; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.api.gax.grpc.testing.MockServiceHelper; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.api.gax.rpc.StatusCode; +import com.google.longrunning.Operation; +import com.google.protobuf.AbstractMessage; +import com.google.protobuf.Any; +import com.google.protobuf.Empty; +import io.grpc.StatusRuntimeException; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import java.util.concurrent.ExecutionException; +import javax.annotation.Generated; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@Generated("by gapic-generator-java") +public class CmekConfigServiceClientTest { + private static MockCmekConfigService mockCmekConfigService; + private static MockLocations mockLocations; + private static MockServiceHelper mockServiceHelper; + private LocalChannelProvider channelProvider; + private CmekConfigServiceClient client; + + @BeforeClass + public static void startStaticServer() { + mockCmekConfigService = new MockCmekConfigService(); + mockLocations = new MockLocations(); + mockServiceHelper = + new MockServiceHelper( + UUID.randomUUID().toString(), + Arrays.asList(mockCmekConfigService, mockLocations)); + mockServiceHelper.start(); + } + + @AfterClass + public static void stopServer() { + mockServiceHelper.stop(); + } + + @Before + public void setUp() throws IOException { + mockServiceHelper.reset(); + channelProvider = mockServiceHelper.createChannelProvider(); + CmekConfigServiceSettings settings = + CmekConfigServiceSettings.newBuilder() + .setTransportChannelProvider(channelProvider) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = CmekConfigServiceClient.create(settings); + } + + @After + public void tearDown() throws Exception { + client.close(); + } + + @Test + public void updateCmekConfigTest() throws Exception { + CmekConfig expectedResponse = + CmekConfig.newBuilder() + .setName(CmekConfigName.ofProjectLocationName("[PROJECT]", "[LOCATION]").toString()) + .setKmsKey("kmsKey-1127483058") + .setKmsKeyVersion("kmsKeyVersion2084784042") + .setIsDefault(true) + .setLastRotationTimestampMicros(-1869978704) + .addAllSingleRegionKeys(new ArrayList()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("updateCmekConfigTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockCmekConfigService.addResponse(resultOperation); + + CmekConfig config = CmekConfig.newBuilder().build(); + + CmekConfig actualResponse = client.updateCmekConfigAsync(config).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockCmekConfigService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateCmekConfigRequest actualRequest = ((UpdateCmekConfigRequest) actualRequests.get(0)); + + Assert.assertEquals(config, actualRequest.getConfig()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updateCmekConfigExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCmekConfigService.addException(exception); + + try { + CmekConfig config = CmekConfig.newBuilder().build(); + client.updateCmekConfigAsync(config).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void getCmekConfigTest() throws Exception { + CmekConfig expectedResponse = + CmekConfig.newBuilder() + .setName(CmekConfigName.ofProjectLocationName("[PROJECT]", "[LOCATION]").toString()) + .setKmsKey("kmsKey-1127483058") + .setKmsKeyVersion("kmsKeyVersion2084784042") + .setIsDefault(true) + .setLastRotationTimestampMicros(-1869978704) + .addAllSingleRegionKeys(new ArrayList()) + .build(); + mockCmekConfigService.addResponse(expectedResponse); + + CmekConfigName name = CmekConfigName.ofProjectLocationName("[PROJECT]", "[LOCATION]"); + + CmekConfig actualResponse = client.getCmekConfig(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockCmekConfigService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetCmekConfigRequest actualRequest = ((GetCmekConfigRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getCmekConfigExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCmekConfigService.addException(exception); + + try { + CmekConfigName name = CmekConfigName.ofProjectLocationName("[PROJECT]", "[LOCATION]"); + client.getCmekConfig(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getCmekConfigTest2() throws Exception { + CmekConfig expectedResponse = + CmekConfig.newBuilder() + .setName(CmekConfigName.ofProjectLocationName("[PROJECT]", "[LOCATION]").toString()) + .setKmsKey("kmsKey-1127483058") + .setKmsKeyVersion("kmsKeyVersion2084784042") + .setIsDefault(true) + .setLastRotationTimestampMicros(-1869978704) + .addAllSingleRegionKeys(new ArrayList()) + .build(); + mockCmekConfigService.addResponse(expectedResponse); + + String name = "name3373707"; + + CmekConfig actualResponse = client.getCmekConfig(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockCmekConfigService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetCmekConfigRequest actualRequest = ((GetCmekConfigRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getCmekConfigExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCmekConfigService.addException(exception); + + try { + String name = "name3373707"; + client.getCmekConfig(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listCmekConfigsTest() throws Exception { + ListCmekConfigsResponse expectedResponse = + ListCmekConfigsResponse.newBuilder().addAllCmekConfigs(new ArrayList()).build(); + mockCmekConfigService.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListCmekConfigsResponse actualResponse = client.listCmekConfigs(parent); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockCmekConfigService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListCmekConfigsRequest actualRequest = ((ListCmekConfigsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listCmekConfigsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCmekConfigService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.listCmekConfigs(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listCmekConfigsTest2() throws Exception { + ListCmekConfigsResponse expectedResponse = + ListCmekConfigsResponse.newBuilder().addAllCmekConfigs(new ArrayList()).build(); + mockCmekConfigService.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListCmekConfigsResponse actualResponse = client.listCmekConfigs(parent); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockCmekConfigService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListCmekConfigsRequest actualRequest = ((ListCmekConfigsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listCmekConfigsExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCmekConfigService.addException(exception); + + try { + String parent = "parent-995424086"; + client.listCmekConfigs(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteCmekConfigTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteCmekConfigTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockCmekConfigService.addResponse(resultOperation); + + CmekConfigName name = + CmekConfigName.ofProjectLocationCmekConfigName("[PROJECT]", "[LOCATION]", "[CMEK_CONFIG]"); + + client.deleteCmekConfigAsync(name).get(); + + List actualRequests = mockCmekConfigService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteCmekConfigRequest actualRequest = ((DeleteCmekConfigRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteCmekConfigExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCmekConfigService.addException(exception); + + try { + CmekConfigName name = + CmekConfigName.ofProjectLocationCmekConfigName( + "[PROJECT]", "[LOCATION]", "[CMEK_CONFIG]"); + client.deleteCmekConfigAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void deleteCmekConfigTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteCmekConfigTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockCmekConfigService.addResponse(resultOperation); + + String name = "name3373707"; + + client.deleteCmekConfigAsync(name).get(); + + List actualRequests = mockCmekConfigService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteCmekConfigRequest actualRequest = ((DeleteCmekConfigRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteCmekConfigExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCmekConfigService.addException(exception); + + try { + String name = "name3373707"; + client.deleteCmekConfigAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } +} diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1beta/CompletionServiceClientHttpJsonTest.java b/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1beta/CompletionServiceClientHttpJsonTest.java index a004a282d7ff..d7fbebab3f20 100644 --- a/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1beta/CompletionServiceClientHttpJsonTest.java +++ b/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1beta/CompletionServiceClientHttpJsonTest.java @@ -28,6 +28,7 @@ import com.google.cloud.discoveryengine.v1beta.stub.HttpJsonCompletionServiceStub; import com.google.longrunning.Operation; import com.google.protobuf.Any; +import com.google.protobuf.Timestamp; import com.google.rpc.Status; import java.io.IOException; import java.util.ArrayList; @@ -169,6 +170,9 @@ public void advancedCompleteQueryTest() throws Exception { .setIncludeTailSuggestions(true) .setBoostSpec(AdvancedCompleteQueryRequest.BoostSpec.newBuilder().build()) .addAllSuggestionTypes(new ArrayList()) + .addAllSuggestionTypeSpecs( + new ArrayList()) + .addAllExperimentIds(new ArrayList()) .build(); AdvancedCompleteQueryResponse actualResponse = client.advancedCompleteQuery(request); @@ -210,6 +214,9 @@ public void advancedCompleteQueryExceptionTest() throws Exception { .setIncludeTailSuggestions(true) .setBoostSpec(AdvancedCompleteQueryRequest.BoostSpec.newBuilder().build()) .addAllSuggestionTypes(new ArrayList()) + .addAllSuggestionTypeSpecs( + new ArrayList()) + .addAllExperimentIds(new ArrayList()) .build(); client.advancedCompleteQuery(request); Assert.fail("No exception raised"); @@ -472,4 +479,63 @@ public void purgeCompletionSuggestionsExceptionTest() throws Exception { } catch (ExecutionException e) { } } + + @Test + public void removeSuggestionTest() throws Exception { + RemoveSuggestionResponse expectedResponse = RemoveSuggestionResponse.newBuilder().build(); + mockService.addResponse(expectedResponse); + + RemoveSuggestionRequest request = + RemoveSuggestionRequest.newBuilder() + .setCompletionConfig( + CompletionConfigName.ofProjectLocationCollectionEngineName( + "[PROJECT]", "[LOCATION]", "[COLLECTION]", "[ENGINE]") + .toString()) + .setUserPseudoId("userPseudoId-1155274652") + .setUserInfo(UserInfo.newBuilder().build()) + .setRemoveTime(Timestamp.newBuilder().build()) + .build(); + + RemoveSuggestionResponse actualResponse = client.removeSuggestion(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void removeSuggestionExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + RemoveSuggestionRequest request = + RemoveSuggestionRequest.newBuilder() + .setCompletionConfig( + CompletionConfigName.ofProjectLocationCollectionEngineName( + "[PROJECT]", "[LOCATION]", "[COLLECTION]", "[ENGINE]") + .toString()) + .setUserPseudoId("userPseudoId-1155274652") + .setUserInfo(UserInfo.newBuilder().build()) + .setRemoveTime(Timestamp.newBuilder().build()) + .build(); + client.removeSuggestion(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } } diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1beta/CompletionServiceClientTest.java b/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1beta/CompletionServiceClientTest.java index 122dfb9d0a19..8ada5ea613ea 100644 --- a/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1beta/CompletionServiceClientTest.java +++ b/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1beta/CompletionServiceClientTest.java @@ -27,6 +27,7 @@ import com.google.longrunning.Operation; import com.google.protobuf.AbstractMessage; import com.google.protobuf.Any; +import com.google.protobuf.Timestamp; import com.google.rpc.Status; import io.grpc.StatusRuntimeException; import java.io.IOException; @@ -176,6 +177,9 @@ public void advancedCompleteQueryTest() throws Exception { .setIncludeTailSuggestions(true) .setBoostSpec(AdvancedCompleteQueryRequest.BoostSpec.newBuilder().build()) .addAllSuggestionTypes(new ArrayList()) + .addAllSuggestionTypeSpecs( + new ArrayList()) + .addAllExperimentIds(new ArrayList()) .build(); AdvancedCompleteQueryResponse actualResponse = client.advancedCompleteQuery(request); @@ -195,6 +199,9 @@ public void advancedCompleteQueryTest() throws Exception { request.getIncludeTailSuggestions(), actualRequest.getIncludeTailSuggestions()); Assert.assertEquals(request.getBoostSpec(), actualRequest.getBoostSpec()); Assert.assertEquals(request.getSuggestionTypesList(), actualRequest.getSuggestionTypesList()); + Assert.assertEquals( + request.getSuggestionTypeSpecsList(), actualRequest.getSuggestionTypeSpecsList()); + Assert.assertEquals(request.getExperimentIdsList(), actualRequest.getExperimentIdsList()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -220,6 +227,9 @@ public void advancedCompleteQueryExceptionTest() throws Exception { .setIncludeTailSuggestions(true) .setBoostSpec(AdvancedCompleteQueryRequest.BoostSpec.newBuilder().build()) .addAllSuggestionTypes(new ArrayList()) + .addAllSuggestionTypeSpecs( + new ArrayList()) + .addAllExperimentIds(new ArrayList()) .build(); client.advancedCompleteQuery(request); Assert.fail("No exception raised"); @@ -480,4 +490,65 @@ public void purgeCompletionSuggestionsExceptionTest() throws Exception { Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); } } + + @Test + public void removeSuggestionTest() throws Exception { + RemoveSuggestionResponse expectedResponse = RemoveSuggestionResponse.newBuilder().build(); + mockCompletionService.addResponse(expectedResponse); + + RemoveSuggestionRequest request = + RemoveSuggestionRequest.newBuilder() + .setCompletionConfig( + CompletionConfigName.ofProjectLocationCollectionEngineName( + "[PROJECT]", "[LOCATION]", "[COLLECTION]", "[ENGINE]") + .toString()) + .setUserPseudoId("userPseudoId-1155274652") + .setUserInfo(UserInfo.newBuilder().build()) + .setRemoveTime(Timestamp.newBuilder().build()) + .build(); + + RemoveSuggestionResponse actualResponse = client.removeSuggestion(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockCompletionService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + RemoveSuggestionRequest actualRequest = ((RemoveSuggestionRequest) actualRequests.get(0)); + + Assert.assertEquals( + request.getSearchHistorySuggestion(), actualRequest.getSearchHistorySuggestion()); + Assert.assertEquals( + request.getRemoveAllSearchHistorySuggestions(), + actualRequest.getRemoveAllSearchHistorySuggestions()); + Assert.assertEquals(request.getCompletionConfig(), actualRequest.getCompletionConfig()); + Assert.assertEquals(request.getUserPseudoId(), actualRequest.getUserPseudoId()); + Assert.assertEquals(request.getUserInfo(), actualRequest.getUserInfo()); + Assert.assertEquals(request.getRemoveTime(), actualRequest.getRemoveTime()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void removeSuggestionExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCompletionService.addException(exception); + + try { + RemoveSuggestionRequest request = + RemoveSuggestionRequest.newBuilder() + .setCompletionConfig( + CompletionConfigName.ofProjectLocationCollectionEngineName( + "[PROJECT]", "[LOCATION]", "[COLLECTION]", "[ENGINE]") + .toString()) + .setUserPseudoId("userPseudoId-1155274652") + .setUserInfo(UserInfo.newBuilder().build()) + .setRemoveTime(Timestamp.newBuilder().build()) + .build(); + client.removeSuggestion(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } } diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1beta/ConversationalSearchServiceClientHttpJsonTest.java b/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1beta/ConversationalSearchServiceClientHttpJsonTest.java index 91638d5da191..71d298947a03 100644 --- a/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1beta/ConversationalSearchServiceClientHttpJsonTest.java +++ b/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1beta/ConversationalSearchServiceClientHttpJsonTest.java @@ -693,6 +693,7 @@ public void answerQueryTest() throws Exception { .setAsynchronousMode(true) .setUserPseudoId("userPseudoId-1155274652") .putAllUserLabels(new HashMap()) + .setEndUserSpec(AnswerQueryRequest.EndUserSpec.newBuilder().build()) .build(); AnswerQueryResponse actualResponse = client.answerQuery(request); @@ -742,6 +743,7 @@ public void answerQueryExceptionTest() throws Exception { .setAsynchronousMode(true) .setUserPseudoId("userPseudoId-1155274652") .putAllUserLabels(new HashMap()) + .setEndUserSpec(AnswerQueryRequest.EndUserSpec.newBuilder().build()) .build(); client.answerQuery(request); Assert.fail("No exception raised"); @@ -750,6 +752,17 @@ public void answerQueryExceptionTest() throws Exception { } } + @Test + public void streamAnswerQueryTest() throws Exception {} + + @Test + public void streamAnswerQueryExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + } + @Test public void getAnswerTest() throws Exception { Answer expectedResponse = @@ -759,14 +772,18 @@ public void getAnswerTest() throws Exception { "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[SESSION]", "[ANSWER]") .toString()) .setAnswerText("answerText959441419") + .setGroundingScore(1981101646) .addAllCitations(new ArrayList()) + .addAllGroundingSupports(new ArrayList()) .addAllReferences(new ArrayList()) + .addAllBlobAttachments(new ArrayList()) .addAllRelatedQuestions(new ArrayList()) .addAllSteps(new ArrayList()) .setQueryUnderstandingInfo(Answer.QueryUnderstandingInfo.newBuilder().build()) .addAllAnswerSkippedReasons(new ArrayList()) .setCreateTime(Timestamp.newBuilder().build()) .setCompleteTime(Timestamp.newBuilder().build()) + .addAllSafetyRatings(new ArrayList()) .build(); mockService.addResponse(expectedResponse); @@ -819,14 +836,18 @@ public void getAnswerTest2() throws Exception { "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[SESSION]", "[ANSWER]") .toString()) .setAnswerText("answerText959441419") + .setGroundingScore(1981101646) .addAllCitations(new ArrayList()) + .addAllGroundingSupports(new ArrayList()) .addAllReferences(new ArrayList()) + .addAllBlobAttachments(new ArrayList()) .addAllRelatedQuestions(new ArrayList()) .addAllSteps(new ArrayList()) .setQueryUnderstandingInfo(Answer.QueryUnderstandingInfo.newBuilder().build()) .addAllAnswerSkippedReasons(new ArrayList()) .setCreateTime(Timestamp.newBuilder().build()) .setCompleteTime(Timestamp.newBuilder().build()) + .addAllSafetyRatings(new ArrayList()) .build(); mockService.addResponse(expectedResponse); @@ -879,9 +900,11 @@ public void createSessionTest() throws Exception { .setDisplayName("displayName1714148973") .setUserPseudoId("userPseudoId-1155274652") .addAllTurns(new ArrayList()) + .addAllLabels(new ArrayList()) .setStartTime(Timestamp.newBuilder().build()) .setEndTime(Timestamp.newBuilder().build()) .setIsPinned(true) + .setPendingAsyncAssistOperationId("pendingAsyncAssistOperationId1460582932") .build(); mockService.addResponse(expectedResponse); @@ -936,9 +959,11 @@ public void createSessionTest2() throws Exception { .setDisplayName("displayName1714148973") .setUserPseudoId("userPseudoId-1155274652") .addAllTurns(new ArrayList()) + .addAllLabels(new ArrayList()) .setStartTime(Timestamp.newBuilder().build()) .setEndTime(Timestamp.newBuilder().build()) .setIsPinned(true) + .setPendingAsyncAssistOperationId("pendingAsyncAssistOperationId1460582932") .build(); mockService.addResponse(expectedResponse); @@ -1077,9 +1102,11 @@ public void updateSessionTest() throws Exception { .setDisplayName("displayName1714148973") .setUserPseudoId("userPseudoId-1155274652") .addAllTurns(new ArrayList()) + .addAllLabels(new ArrayList()) .setStartTime(Timestamp.newBuilder().build()) .setEndTime(Timestamp.newBuilder().build()) .setIsPinned(true) + .setPendingAsyncAssistOperationId("pendingAsyncAssistOperationId1460582932") .build(); mockService.addResponse(expectedResponse); @@ -1092,9 +1119,11 @@ public void updateSessionTest() throws Exception { .setDisplayName("displayName1714148973") .setUserPseudoId("userPseudoId-1155274652") .addAllTurns(new ArrayList()) + .addAllLabels(new ArrayList()) .setStartTime(Timestamp.newBuilder().build()) .setEndTime(Timestamp.newBuilder().build()) .setIsPinned(true) + .setPendingAsyncAssistOperationId("pendingAsyncAssistOperationId1460582932") .build(); FieldMask updateMask = FieldMask.newBuilder().build(); @@ -1133,9 +1162,11 @@ public void updateSessionExceptionTest() throws Exception { .setDisplayName("displayName1714148973") .setUserPseudoId("userPseudoId-1155274652") .addAllTurns(new ArrayList()) + .addAllLabels(new ArrayList()) .setStartTime(Timestamp.newBuilder().build()) .setEndTime(Timestamp.newBuilder().build()) .setIsPinned(true) + .setPendingAsyncAssistOperationId("pendingAsyncAssistOperationId1460582932") .build(); FieldMask updateMask = FieldMask.newBuilder().build(); client.updateSession(session, updateMask); @@ -1156,9 +1187,11 @@ public void getSessionTest() throws Exception { .setDisplayName("displayName1714148973") .setUserPseudoId("userPseudoId-1155274652") .addAllTurns(new ArrayList()) + .addAllLabels(new ArrayList()) .setStartTime(Timestamp.newBuilder().build()) .setEndTime(Timestamp.newBuilder().build()) .setIsPinned(true) + .setPendingAsyncAssistOperationId("pendingAsyncAssistOperationId1460582932") .build(); mockService.addResponse(expectedResponse); @@ -1213,9 +1246,11 @@ public void getSessionTest2() throws Exception { .setDisplayName("displayName1714148973") .setUserPseudoId("userPseudoId-1155274652") .addAllTurns(new ArrayList()) + .addAllLabels(new ArrayList()) .setStartTime(Timestamp.newBuilder().build()) .setEndTime(Timestamp.newBuilder().build()) .setIsPinned(true) + .setPendingAsyncAssistOperationId("pendingAsyncAssistOperationId1460582932") .build(); mockService.addResponse(expectedResponse); diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1beta/ConversationalSearchServiceClientTest.java b/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1beta/ConversationalSearchServiceClientTest.java index 840b5d967353..87fe4018dabb 100644 --- a/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1beta/ConversationalSearchServiceClientTest.java +++ b/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1beta/ConversationalSearchServiceClientTest.java @@ -24,8 +24,11 @@ import com.google.api.gax.grpc.testing.LocalChannelProvider; import com.google.api.gax.grpc.testing.MockGrpcService; import com.google.api.gax.grpc.testing.MockServiceHelper; +import com.google.api.gax.grpc.testing.MockStreamObserver; import com.google.api.gax.rpc.ApiClientHeaderProvider; import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.StatusCode; import com.google.common.collect.Lists; import com.google.protobuf.AbstractMessage; import com.google.protobuf.Empty; @@ -38,6 +41,7 @@ import java.util.HashMap; import java.util.List; import java.util.UUID; +import java.util.concurrent.ExecutionException; import javax.annotation.Generated; import org.junit.After; import org.junit.AfterClass; @@ -614,6 +618,7 @@ public void answerQueryTest() throws Exception { .setAsynchronousMode(true) .setUserPseudoId("userPseudoId-1155274652") .putAllUserLabels(new HashMap()) + .setEndUserSpec(AnswerQueryRequest.EndUserSpec.newBuilder().build()) .build(); AnswerQueryResponse actualResponse = client.answerQuery(request); @@ -636,6 +641,7 @@ public void answerQueryTest() throws Exception { Assert.assertEquals(request.getAsynchronousMode(), actualRequest.getAsynchronousMode()); Assert.assertEquals(request.getUserPseudoId(), actualRequest.getUserPseudoId()); Assert.assertEquals(request.getUserLabelsMap(), actualRequest.getUserLabelsMap()); + Assert.assertEquals(request.getEndUserSpec(), actualRequest.getEndUserSpec()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -669,6 +675,7 @@ public void answerQueryExceptionTest() throws Exception { .setAsynchronousMode(true) .setUserPseudoId("userPseudoId-1155274652") .putAllUserLabels(new HashMap()) + .setEndUserSpec(AnswerQueryRequest.EndUserSpec.newBuilder().build()) .build(); client.answerQuery(request); Assert.fail("No exception raised"); @@ -677,6 +684,94 @@ public void answerQueryExceptionTest() throws Exception { } } + @Test + public void streamAnswerQueryTest() throws Exception { + AnswerQueryResponse expectedResponse = + AnswerQueryResponse.newBuilder() + .setAnswer(Answer.newBuilder().build()) + .setSession(Session.newBuilder().build()) + .setAnswerQueryToken("answerQueryToken758314095") + .build(); + mockConversationalSearchService.addResponse(expectedResponse); + AnswerQueryRequest request = + AnswerQueryRequest.newBuilder() + .setServingConfig( + ServingConfigName.ofProjectLocationDataStoreServingConfigName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[SERVING_CONFIG]") + .toString()) + .setQuery(Query.newBuilder().build()) + .setSession( + SessionName.ofProjectLocationDataStoreSessionName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[SESSION]") + .toString()) + .setSafetySpec(AnswerQueryRequest.SafetySpec.newBuilder().build()) + .setRelatedQuestionsSpec(AnswerQueryRequest.RelatedQuestionsSpec.newBuilder().build()) + .setGroundingSpec(AnswerQueryRequest.GroundingSpec.newBuilder().build()) + .setAnswerGenerationSpec(AnswerQueryRequest.AnswerGenerationSpec.newBuilder().build()) + .setSearchSpec(AnswerQueryRequest.SearchSpec.newBuilder().build()) + .setQueryUnderstandingSpec( + AnswerQueryRequest.QueryUnderstandingSpec.newBuilder().build()) + .setAsynchronousMode(true) + .setUserPseudoId("userPseudoId-1155274652") + .putAllUserLabels(new HashMap()) + .setEndUserSpec(AnswerQueryRequest.EndUserSpec.newBuilder().build()) + .build(); + + MockStreamObserver responseObserver = new MockStreamObserver<>(); + + ServerStreamingCallable callable = + client.streamAnswerQueryCallable(); + callable.serverStreamingCall(request, responseObserver); + + List actualResponses = responseObserver.future().get(); + Assert.assertEquals(1, actualResponses.size()); + Assert.assertEquals(expectedResponse, actualResponses.get(0)); + } + + @Test + public void streamAnswerQueryExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockConversationalSearchService.addException(exception); + AnswerQueryRequest request = + AnswerQueryRequest.newBuilder() + .setServingConfig( + ServingConfigName.ofProjectLocationDataStoreServingConfigName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[SERVING_CONFIG]") + .toString()) + .setQuery(Query.newBuilder().build()) + .setSession( + SessionName.ofProjectLocationDataStoreSessionName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[SESSION]") + .toString()) + .setSafetySpec(AnswerQueryRequest.SafetySpec.newBuilder().build()) + .setRelatedQuestionsSpec(AnswerQueryRequest.RelatedQuestionsSpec.newBuilder().build()) + .setGroundingSpec(AnswerQueryRequest.GroundingSpec.newBuilder().build()) + .setAnswerGenerationSpec(AnswerQueryRequest.AnswerGenerationSpec.newBuilder().build()) + .setSearchSpec(AnswerQueryRequest.SearchSpec.newBuilder().build()) + .setQueryUnderstandingSpec( + AnswerQueryRequest.QueryUnderstandingSpec.newBuilder().build()) + .setAsynchronousMode(true) + .setUserPseudoId("userPseudoId-1155274652") + .putAllUserLabels(new HashMap()) + .setEndUserSpec(AnswerQueryRequest.EndUserSpec.newBuilder().build()) + .build(); + + MockStreamObserver responseObserver = new MockStreamObserver<>(); + + ServerStreamingCallable callable = + client.streamAnswerQueryCallable(); + callable.serverStreamingCall(request, responseObserver); + + try { + List actualResponses = responseObserver.future().get(); + Assert.fail("No exception thrown"); + } catch (ExecutionException e) { + Assert.assertTrue(e.getCause() instanceof InvalidArgumentException); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + @Test public void getAnswerTest() throws Exception { Answer expectedResponse = @@ -686,14 +781,18 @@ public void getAnswerTest() throws Exception { "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[SESSION]", "[ANSWER]") .toString()) .setAnswerText("answerText959441419") + .setGroundingScore(1981101646) .addAllCitations(new ArrayList()) + .addAllGroundingSupports(new ArrayList()) .addAllReferences(new ArrayList()) + .addAllBlobAttachments(new ArrayList()) .addAllRelatedQuestions(new ArrayList()) .addAllSteps(new ArrayList()) .setQueryUnderstandingInfo(Answer.QueryUnderstandingInfo.newBuilder().build()) .addAllAnswerSkippedReasons(new ArrayList()) .setCreateTime(Timestamp.newBuilder().build()) .setCompleteTime(Timestamp.newBuilder().build()) + .addAllSafetyRatings(new ArrayList()) .build(); mockConversationalSearchService.addResponse(expectedResponse); @@ -740,14 +839,18 @@ public void getAnswerTest2() throws Exception { "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[SESSION]", "[ANSWER]") .toString()) .setAnswerText("answerText959441419") + .setGroundingScore(1981101646) .addAllCitations(new ArrayList()) + .addAllGroundingSupports(new ArrayList()) .addAllReferences(new ArrayList()) + .addAllBlobAttachments(new ArrayList()) .addAllRelatedQuestions(new ArrayList()) .addAllSteps(new ArrayList()) .setQueryUnderstandingInfo(Answer.QueryUnderstandingInfo.newBuilder().build()) .addAllAnswerSkippedReasons(new ArrayList()) .setCreateTime(Timestamp.newBuilder().build()) .setCompleteTime(Timestamp.newBuilder().build()) + .addAllSafetyRatings(new ArrayList()) .build(); mockConversationalSearchService.addResponse(expectedResponse); @@ -792,9 +895,11 @@ public void createSessionTest() throws Exception { .setDisplayName("displayName1714148973") .setUserPseudoId("userPseudoId-1155274652") .addAllTurns(new ArrayList()) + .addAllLabels(new ArrayList()) .setStartTime(Timestamp.newBuilder().build()) .setEndTime(Timestamp.newBuilder().build()) .setIsPinned(true) + .setPendingAsyncAssistOperationId("pendingAsyncAssistOperationId1460582932") .build(); mockConversationalSearchService.addResponse(expectedResponse); @@ -844,9 +949,11 @@ public void createSessionTest2() throws Exception { .setDisplayName("displayName1714148973") .setUserPseudoId("userPseudoId-1155274652") .addAllTurns(new ArrayList()) + .addAllLabels(new ArrayList()) .setStartTime(Timestamp.newBuilder().build()) .setEndTime(Timestamp.newBuilder().build()) .setIsPinned(true) + .setPendingAsyncAssistOperationId("pendingAsyncAssistOperationId1460582932") .build(); mockConversationalSearchService.addResponse(expectedResponse); @@ -966,9 +1073,11 @@ public void updateSessionTest() throws Exception { .setDisplayName("displayName1714148973") .setUserPseudoId("userPseudoId-1155274652") .addAllTurns(new ArrayList()) + .addAllLabels(new ArrayList()) .setStartTime(Timestamp.newBuilder().build()) .setEndTime(Timestamp.newBuilder().build()) .setIsPinned(true) + .setPendingAsyncAssistOperationId("pendingAsyncAssistOperationId1460582932") .build(); mockConversationalSearchService.addResponse(expectedResponse); @@ -1016,9 +1125,11 @@ public void getSessionTest() throws Exception { .setDisplayName("displayName1714148973") .setUserPseudoId("userPseudoId-1155274652") .addAllTurns(new ArrayList()) + .addAllLabels(new ArrayList()) .setStartTime(Timestamp.newBuilder().build()) .setEndTime(Timestamp.newBuilder().build()) .setIsPinned(true) + .setPendingAsyncAssistOperationId("pendingAsyncAssistOperationId1460582932") .build(); mockConversationalSearchService.addResponse(expectedResponse); @@ -1067,9 +1178,11 @@ public void getSessionTest2() throws Exception { .setDisplayName("displayName1714148973") .setUserPseudoId("userPseudoId-1155274652") .addAllTurns(new ArrayList()) + .addAllLabels(new ArrayList()) .setStartTime(Timestamp.newBuilder().build()) .setEndTime(Timestamp.newBuilder().build()) .setIsPinned(true) + .setPendingAsyncAssistOperationId("pendingAsyncAssistOperationId1460582932") .build(); mockConversationalSearchService.addResponse(expectedResponse); diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1beta/DataStoreServiceClientHttpJsonTest.java b/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1beta/DataStoreServiceClientHttpJsonTest.java index 98146f7c2eb8..e9f9a0030ae5 100644 --- a/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1beta/DataStoreServiceClientHttpJsonTest.java +++ b/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1beta/DataStoreServiceClientHttpJsonTest.java @@ -95,14 +95,25 @@ public void createDataStoreTest() throws Exception { .addAllSolutionTypes(new ArrayList()) .setDefaultSchemaId("defaultSchemaId1300415485") .setCreateTime(Timestamp.newBuilder().build()) + .setAdvancedSiteSearchConfig(AdvancedSiteSearchConfig.newBuilder().build()) .setLanguageInfo(LanguageInfo.newBuilder().build()) .setNaturalLanguageQueryUnderstandingConfig( NaturalLanguageQueryUnderstandingConfig.newBuilder().build()) + .setKmsKeyName("kmsKeyName412586233") + .setCmekConfig(CmekConfig.newBuilder().build()) .setBillingEstimation(DataStore.BillingEstimation.newBuilder().build()) + .setAclEnabled(true) .setWorkspaceConfig(WorkspaceConfig.newBuilder().build()) .setDocumentProcessingConfig(DocumentProcessingConfig.newBuilder().build()) .setStartingSchema(Schema.newBuilder().build()) + .setHealthcareFhirConfig(HealthcareFhirConfig.newBuilder().build()) .setServingConfigDataStore(DataStore.ServingConfigDataStore.newBuilder().build()) + .setIdentityMappingStore( + IdentityMappingStoreName.of("[PROJECT]", "[LOCATION]", "[IDENTITY_MAPPING_STORE]") + .toString()) + .setIsInfobotFaqDataStore(true) + .setFederatedSearchConfig(DataStore.FederatedSearchConfig.newBuilder().build()) + .setConfigurableBillingApproachUpdateTime(Timestamp.newBuilder().build()) .build(); Operation resultOperation = Operation.newBuilder() @@ -164,14 +175,25 @@ public void createDataStoreTest2() throws Exception { .addAllSolutionTypes(new ArrayList()) .setDefaultSchemaId("defaultSchemaId1300415485") .setCreateTime(Timestamp.newBuilder().build()) + .setAdvancedSiteSearchConfig(AdvancedSiteSearchConfig.newBuilder().build()) .setLanguageInfo(LanguageInfo.newBuilder().build()) .setNaturalLanguageQueryUnderstandingConfig( NaturalLanguageQueryUnderstandingConfig.newBuilder().build()) + .setKmsKeyName("kmsKeyName412586233") + .setCmekConfig(CmekConfig.newBuilder().build()) .setBillingEstimation(DataStore.BillingEstimation.newBuilder().build()) + .setAclEnabled(true) .setWorkspaceConfig(WorkspaceConfig.newBuilder().build()) .setDocumentProcessingConfig(DocumentProcessingConfig.newBuilder().build()) .setStartingSchema(Schema.newBuilder().build()) + .setHealthcareFhirConfig(HealthcareFhirConfig.newBuilder().build()) .setServingConfigDataStore(DataStore.ServingConfigDataStore.newBuilder().build()) + .setIdentityMappingStore( + IdentityMappingStoreName.of("[PROJECT]", "[LOCATION]", "[IDENTITY_MAPPING_STORE]") + .toString()) + .setIsInfobotFaqDataStore(true) + .setFederatedSearchConfig(DataStore.FederatedSearchConfig.newBuilder().build()) + .setConfigurableBillingApproachUpdateTime(Timestamp.newBuilder().build()) .build(); Operation resultOperation = Operation.newBuilder() @@ -233,14 +255,25 @@ public void getDataStoreTest() throws Exception { .addAllSolutionTypes(new ArrayList()) .setDefaultSchemaId("defaultSchemaId1300415485") .setCreateTime(Timestamp.newBuilder().build()) + .setAdvancedSiteSearchConfig(AdvancedSiteSearchConfig.newBuilder().build()) .setLanguageInfo(LanguageInfo.newBuilder().build()) .setNaturalLanguageQueryUnderstandingConfig( NaturalLanguageQueryUnderstandingConfig.newBuilder().build()) + .setKmsKeyName("kmsKeyName412586233") + .setCmekConfig(CmekConfig.newBuilder().build()) .setBillingEstimation(DataStore.BillingEstimation.newBuilder().build()) + .setAclEnabled(true) .setWorkspaceConfig(WorkspaceConfig.newBuilder().build()) .setDocumentProcessingConfig(DocumentProcessingConfig.newBuilder().build()) .setStartingSchema(Schema.newBuilder().build()) + .setHealthcareFhirConfig(HealthcareFhirConfig.newBuilder().build()) .setServingConfigDataStore(DataStore.ServingConfigDataStore.newBuilder().build()) + .setIdentityMappingStore( + IdentityMappingStoreName.of("[PROJECT]", "[LOCATION]", "[IDENTITY_MAPPING_STORE]") + .toString()) + .setIsInfobotFaqDataStore(true) + .setFederatedSearchConfig(DataStore.FederatedSearchConfig.newBuilder().build()) + .setConfigurableBillingApproachUpdateTime(Timestamp.newBuilder().build()) .build(); mockService.addResponse(expectedResponse); @@ -295,14 +328,25 @@ public void getDataStoreTest2() throws Exception { .addAllSolutionTypes(new ArrayList()) .setDefaultSchemaId("defaultSchemaId1300415485") .setCreateTime(Timestamp.newBuilder().build()) + .setAdvancedSiteSearchConfig(AdvancedSiteSearchConfig.newBuilder().build()) .setLanguageInfo(LanguageInfo.newBuilder().build()) .setNaturalLanguageQueryUnderstandingConfig( NaturalLanguageQueryUnderstandingConfig.newBuilder().build()) + .setKmsKeyName("kmsKeyName412586233") + .setCmekConfig(CmekConfig.newBuilder().build()) .setBillingEstimation(DataStore.BillingEstimation.newBuilder().build()) + .setAclEnabled(true) .setWorkspaceConfig(WorkspaceConfig.newBuilder().build()) .setDocumentProcessingConfig(DocumentProcessingConfig.newBuilder().build()) .setStartingSchema(Schema.newBuilder().build()) + .setHealthcareFhirConfig(HealthcareFhirConfig.newBuilder().build()) .setServingConfigDataStore(DataStore.ServingConfigDataStore.newBuilder().build()) + .setIdentityMappingStore( + IdentityMappingStoreName.of("[PROJECT]", "[LOCATION]", "[IDENTITY_MAPPING_STORE]") + .toString()) + .setIsInfobotFaqDataStore(true) + .setFederatedSearchConfig(DataStore.FederatedSearchConfig.newBuilder().build()) + .setConfigurableBillingApproachUpdateTime(Timestamp.newBuilder().build()) .build(); mockService.addResponse(expectedResponse); @@ -547,14 +591,25 @@ public void updateDataStoreTest() throws Exception { .addAllSolutionTypes(new ArrayList()) .setDefaultSchemaId("defaultSchemaId1300415485") .setCreateTime(Timestamp.newBuilder().build()) + .setAdvancedSiteSearchConfig(AdvancedSiteSearchConfig.newBuilder().build()) .setLanguageInfo(LanguageInfo.newBuilder().build()) .setNaturalLanguageQueryUnderstandingConfig( NaturalLanguageQueryUnderstandingConfig.newBuilder().build()) + .setKmsKeyName("kmsKeyName412586233") + .setCmekConfig(CmekConfig.newBuilder().build()) .setBillingEstimation(DataStore.BillingEstimation.newBuilder().build()) + .setAclEnabled(true) .setWorkspaceConfig(WorkspaceConfig.newBuilder().build()) .setDocumentProcessingConfig(DocumentProcessingConfig.newBuilder().build()) .setStartingSchema(Schema.newBuilder().build()) + .setHealthcareFhirConfig(HealthcareFhirConfig.newBuilder().build()) .setServingConfigDataStore(DataStore.ServingConfigDataStore.newBuilder().build()) + .setIdentityMappingStore( + IdentityMappingStoreName.of("[PROJECT]", "[LOCATION]", "[IDENTITY_MAPPING_STORE]") + .toString()) + .setIsInfobotFaqDataStore(true) + .setFederatedSearchConfig(DataStore.FederatedSearchConfig.newBuilder().build()) + .setConfigurableBillingApproachUpdateTime(Timestamp.newBuilder().build()) .build(); mockService.addResponse(expectedResponse); @@ -569,14 +624,25 @@ public void updateDataStoreTest() throws Exception { .addAllSolutionTypes(new ArrayList()) .setDefaultSchemaId("defaultSchemaId1300415485") .setCreateTime(Timestamp.newBuilder().build()) + .setAdvancedSiteSearchConfig(AdvancedSiteSearchConfig.newBuilder().build()) .setLanguageInfo(LanguageInfo.newBuilder().build()) .setNaturalLanguageQueryUnderstandingConfig( NaturalLanguageQueryUnderstandingConfig.newBuilder().build()) + .setKmsKeyName("kmsKeyName412586233") + .setCmekConfig(CmekConfig.newBuilder().build()) .setBillingEstimation(DataStore.BillingEstimation.newBuilder().build()) + .setAclEnabled(true) .setWorkspaceConfig(WorkspaceConfig.newBuilder().build()) .setDocumentProcessingConfig(DocumentProcessingConfig.newBuilder().build()) .setStartingSchema(Schema.newBuilder().build()) + .setHealthcareFhirConfig(HealthcareFhirConfig.newBuilder().build()) .setServingConfigDataStore(DataStore.ServingConfigDataStore.newBuilder().build()) + .setIdentityMappingStore( + IdentityMappingStoreName.of("[PROJECT]", "[LOCATION]", "[IDENTITY_MAPPING_STORE]") + .toString()) + .setIsInfobotFaqDataStore(true) + .setFederatedSearchConfig(DataStore.FederatedSearchConfig.newBuilder().build()) + .setConfigurableBillingApproachUpdateTime(Timestamp.newBuilder().build()) .build(); FieldMask updateMask = FieldMask.newBuilder().build(); @@ -617,14 +683,25 @@ public void updateDataStoreExceptionTest() throws Exception { .addAllSolutionTypes(new ArrayList()) .setDefaultSchemaId("defaultSchemaId1300415485") .setCreateTime(Timestamp.newBuilder().build()) + .setAdvancedSiteSearchConfig(AdvancedSiteSearchConfig.newBuilder().build()) .setLanguageInfo(LanguageInfo.newBuilder().build()) .setNaturalLanguageQueryUnderstandingConfig( NaturalLanguageQueryUnderstandingConfig.newBuilder().build()) + .setKmsKeyName("kmsKeyName412586233") + .setCmekConfig(CmekConfig.newBuilder().build()) .setBillingEstimation(DataStore.BillingEstimation.newBuilder().build()) + .setAclEnabled(true) .setWorkspaceConfig(WorkspaceConfig.newBuilder().build()) .setDocumentProcessingConfig(DocumentProcessingConfig.newBuilder().build()) .setStartingSchema(Schema.newBuilder().build()) + .setHealthcareFhirConfig(HealthcareFhirConfig.newBuilder().build()) .setServingConfigDataStore(DataStore.ServingConfigDataStore.newBuilder().build()) + .setIdentityMappingStore( + IdentityMappingStoreName.of("[PROJECT]", "[LOCATION]", "[IDENTITY_MAPPING_STORE]") + .toString()) + .setIsInfobotFaqDataStore(true) + .setFederatedSearchConfig(DataStore.FederatedSearchConfig.newBuilder().build()) + .setConfigurableBillingApproachUpdateTime(Timestamp.newBuilder().build()) .build(); FieldMask updateMask = FieldMask.newBuilder().build(); client.updateDataStore(dataStore, updateMask); diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1beta/DataStoreServiceClientTest.java b/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1beta/DataStoreServiceClientTest.java index 7edf6e761945..ddf7d4f66e0e 100644 --- a/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1beta/DataStoreServiceClientTest.java +++ b/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1beta/DataStoreServiceClientTest.java @@ -102,14 +102,25 @@ public void createDataStoreTest() throws Exception { .addAllSolutionTypes(new ArrayList()) .setDefaultSchemaId("defaultSchemaId1300415485") .setCreateTime(Timestamp.newBuilder().build()) + .setAdvancedSiteSearchConfig(AdvancedSiteSearchConfig.newBuilder().build()) .setLanguageInfo(LanguageInfo.newBuilder().build()) .setNaturalLanguageQueryUnderstandingConfig( NaturalLanguageQueryUnderstandingConfig.newBuilder().build()) + .setKmsKeyName("kmsKeyName412586233") + .setCmekConfig(CmekConfig.newBuilder().build()) .setBillingEstimation(DataStore.BillingEstimation.newBuilder().build()) + .setAclEnabled(true) .setWorkspaceConfig(WorkspaceConfig.newBuilder().build()) .setDocumentProcessingConfig(DocumentProcessingConfig.newBuilder().build()) .setStartingSchema(Schema.newBuilder().build()) + .setHealthcareFhirConfig(HealthcareFhirConfig.newBuilder().build()) .setServingConfigDataStore(DataStore.ServingConfigDataStore.newBuilder().build()) + .setIdentityMappingStore( + IdentityMappingStoreName.of("[PROJECT]", "[LOCATION]", "[IDENTITY_MAPPING_STORE]") + .toString()) + .setIsInfobotFaqDataStore(true) + .setFederatedSearchConfig(DataStore.FederatedSearchConfig.newBuilder().build()) + .setConfigurableBillingApproachUpdateTime(Timestamp.newBuilder().build()) .build(); Operation resultOperation = Operation.newBuilder() @@ -170,14 +181,25 @@ public void createDataStoreTest2() throws Exception { .addAllSolutionTypes(new ArrayList()) .setDefaultSchemaId("defaultSchemaId1300415485") .setCreateTime(Timestamp.newBuilder().build()) + .setAdvancedSiteSearchConfig(AdvancedSiteSearchConfig.newBuilder().build()) .setLanguageInfo(LanguageInfo.newBuilder().build()) .setNaturalLanguageQueryUnderstandingConfig( NaturalLanguageQueryUnderstandingConfig.newBuilder().build()) + .setKmsKeyName("kmsKeyName412586233") + .setCmekConfig(CmekConfig.newBuilder().build()) .setBillingEstimation(DataStore.BillingEstimation.newBuilder().build()) + .setAclEnabled(true) .setWorkspaceConfig(WorkspaceConfig.newBuilder().build()) .setDocumentProcessingConfig(DocumentProcessingConfig.newBuilder().build()) .setStartingSchema(Schema.newBuilder().build()) + .setHealthcareFhirConfig(HealthcareFhirConfig.newBuilder().build()) .setServingConfigDataStore(DataStore.ServingConfigDataStore.newBuilder().build()) + .setIdentityMappingStore( + IdentityMappingStoreName.of("[PROJECT]", "[LOCATION]", "[IDENTITY_MAPPING_STORE]") + .toString()) + .setIsInfobotFaqDataStore(true) + .setFederatedSearchConfig(DataStore.FederatedSearchConfig.newBuilder().build()) + .setConfigurableBillingApproachUpdateTime(Timestamp.newBuilder().build()) .build(); Operation resultOperation = Operation.newBuilder() @@ -238,14 +260,25 @@ public void getDataStoreTest() throws Exception { .addAllSolutionTypes(new ArrayList()) .setDefaultSchemaId("defaultSchemaId1300415485") .setCreateTime(Timestamp.newBuilder().build()) + .setAdvancedSiteSearchConfig(AdvancedSiteSearchConfig.newBuilder().build()) .setLanguageInfo(LanguageInfo.newBuilder().build()) .setNaturalLanguageQueryUnderstandingConfig( NaturalLanguageQueryUnderstandingConfig.newBuilder().build()) + .setKmsKeyName("kmsKeyName412586233") + .setCmekConfig(CmekConfig.newBuilder().build()) .setBillingEstimation(DataStore.BillingEstimation.newBuilder().build()) + .setAclEnabled(true) .setWorkspaceConfig(WorkspaceConfig.newBuilder().build()) .setDocumentProcessingConfig(DocumentProcessingConfig.newBuilder().build()) .setStartingSchema(Schema.newBuilder().build()) + .setHealthcareFhirConfig(HealthcareFhirConfig.newBuilder().build()) .setServingConfigDataStore(DataStore.ServingConfigDataStore.newBuilder().build()) + .setIdentityMappingStore( + IdentityMappingStoreName.of("[PROJECT]", "[LOCATION]", "[IDENTITY_MAPPING_STORE]") + .toString()) + .setIsInfobotFaqDataStore(true) + .setFederatedSearchConfig(DataStore.FederatedSearchConfig.newBuilder().build()) + .setConfigurableBillingApproachUpdateTime(Timestamp.newBuilder().build()) .build(); mockDataStoreService.addResponse(expectedResponse); @@ -294,14 +327,25 @@ public void getDataStoreTest2() throws Exception { .addAllSolutionTypes(new ArrayList()) .setDefaultSchemaId("defaultSchemaId1300415485") .setCreateTime(Timestamp.newBuilder().build()) + .setAdvancedSiteSearchConfig(AdvancedSiteSearchConfig.newBuilder().build()) .setLanguageInfo(LanguageInfo.newBuilder().build()) .setNaturalLanguageQueryUnderstandingConfig( NaturalLanguageQueryUnderstandingConfig.newBuilder().build()) + .setKmsKeyName("kmsKeyName412586233") + .setCmekConfig(CmekConfig.newBuilder().build()) .setBillingEstimation(DataStore.BillingEstimation.newBuilder().build()) + .setAclEnabled(true) .setWorkspaceConfig(WorkspaceConfig.newBuilder().build()) .setDocumentProcessingConfig(DocumentProcessingConfig.newBuilder().build()) .setStartingSchema(Schema.newBuilder().build()) + .setHealthcareFhirConfig(HealthcareFhirConfig.newBuilder().build()) .setServingConfigDataStore(DataStore.ServingConfigDataStore.newBuilder().build()) + .setIdentityMappingStore( + IdentityMappingStoreName.of("[PROJECT]", "[LOCATION]", "[IDENTITY_MAPPING_STORE]") + .toString()) + .setIsInfobotFaqDataStore(true) + .setFederatedSearchConfig(DataStore.FederatedSearchConfig.newBuilder().build()) + .setConfigurableBillingApproachUpdateTime(Timestamp.newBuilder().build()) .build(); mockDataStoreService.addResponse(expectedResponse); @@ -522,14 +566,25 @@ public void updateDataStoreTest() throws Exception { .addAllSolutionTypes(new ArrayList()) .setDefaultSchemaId("defaultSchemaId1300415485") .setCreateTime(Timestamp.newBuilder().build()) + .setAdvancedSiteSearchConfig(AdvancedSiteSearchConfig.newBuilder().build()) .setLanguageInfo(LanguageInfo.newBuilder().build()) .setNaturalLanguageQueryUnderstandingConfig( NaturalLanguageQueryUnderstandingConfig.newBuilder().build()) + .setKmsKeyName("kmsKeyName412586233") + .setCmekConfig(CmekConfig.newBuilder().build()) .setBillingEstimation(DataStore.BillingEstimation.newBuilder().build()) + .setAclEnabled(true) .setWorkspaceConfig(WorkspaceConfig.newBuilder().build()) .setDocumentProcessingConfig(DocumentProcessingConfig.newBuilder().build()) .setStartingSchema(Schema.newBuilder().build()) + .setHealthcareFhirConfig(HealthcareFhirConfig.newBuilder().build()) .setServingConfigDataStore(DataStore.ServingConfigDataStore.newBuilder().build()) + .setIdentityMappingStore( + IdentityMappingStoreName.of("[PROJECT]", "[LOCATION]", "[IDENTITY_MAPPING_STORE]") + .toString()) + .setIsInfobotFaqDataStore(true) + .setFederatedSearchConfig(DataStore.FederatedSearchConfig.newBuilder().build()) + .setConfigurableBillingApproachUpdateTime(Timestamp.newBuilder().build()) .build(); mockDataStoreService.addResponse(expectedResponse); diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1beta/DocumentServiceClientHttpJsonTest.java b/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1beta/DocumentServiceClientHttpJsonTest.java index 636d2fefaf8c..009db76f4918 100644 --- a/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1beta/DocumentServiceClientHttpJsonTest.java +++ b/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1beta/DocumentServiceClientHttpJsonTest.java @@ -97,6 +97,7 @@ public void getDocumentTest() throws Exception { .setContent(Document.Content.newBuilder().build()) .setParentDocumentId("parentDocumentId1990105056") .setDerivedStructData(Struct.newBuilder().build()) + .setAclInfo(Document.AclInfo.newBuilder().build()) .setIndexTime(Timestamp.newBuilder().build()) .setIndexStatus(Document.IndexStatus.newBuilder().build()) .build(); @@ -155,6 +156,7 @@ public void getDocumentTest2() throws Exception { .setContent(Document.Content.newBuilder().build()) .setParentDocumentId("parentDocumentId1990105056") .setDerivedStructData(Struct.newBuilder().build()) + .setAclInfo(Document.AclInfo.newBuilder().build()) .setIndexTime(Timestamp.newBuilder().build()) .setIndexStatus(Document.IndexStatus.newBuilder().build()) .build(); @@ -317,6 +319,7 @@ public void createDocumentTest() throws Exception { .setContent(Document.Content.newBuilder().build()) .setParentDocumentId("parentDocumentId1990105056") .setDerivedStructData(Struct.newBuilder().build()) + .setAclInfo(Document.AclInfo.newBuilder().build()) .setIndexTime(Timestamp.newBuilder().build()) .setIndexStatus(Document.IndexStatus.newBuilder().build()) .build(); @@ -379,6 +382,7 @@ public void createDocumentTest2() throws Exception { .setContent(Document.Content.newBuilder().build()) .setParentDocumentId("parentDocumentId1990105056") .setDerivedStructData(Struct.newBuilder().build()) + .setAclInfo(Document.AclInfo.newBuilder().build()) .setIndexTime(Timestamp.newBuilder().build()) .setIndexStatus(Document.IndexStatus.newBuilder().build()) .build(); @@ -439,6 +443,7 @@ public void updateDocumentTest() throws Exception { .setContent(Document.Content.newBuilder().build()) .setParentDocumentId("parentDocumentId1990105056") .setDerivedStructData(Struct.newBuilder().build()) + .setAclInfo(Document.AclInfo.newBuilder().build()) .setIndexTime(Timestamp.newBuilder().build()) .setIndexStatus(Document.IndexStatus.newBuilder().build()) .build(); @@ -455,6 +460,7 @@ public void updateDocumentTest() throws Exception { .setContent(Document.Content.newBuilder().build()) .setParentDocumentId("parentDocumentId1990105056") .setDerivedStructData(Struct.newBuilder().build()) + .setAclInfo(Document.AclInfo.newBuilder().build()) .setIndexTime(Timestamp.newBuilder().build()) .setIndexStatus(Document.IndexStatus.newBuilder().build()) .build(); @@ -497,6 +503,7 @@ public void updateDocumentExceptionTest() throws Exception { .setContent(Document.Content.newBuilder().build()) .setParentDocumentId("parentDocumentId1990105056") .setDerivedStructData(Struct.newBuilder().build()) + .setAclInfo(Document.AclInfo.newBuilder().build()) .setIndexTime(Timestamp.newBuilder().build()) .setIndexStatus(Document.IndexStatus.newBuilder().build()) .build(); @@ -619,6 +626,7 @@ public void importDocumentsTest() throws Exception { .setUpdateMask(FieldMask.newBuilder().build()) .setAutoGenerateIds(true) .setIdField("idField1629396127") + .setForceRefreshContent(true) .build(); ImportDocumentsResponse actualResponse = client.importDocumentsAsync(request).get(); @@ -657,6 +665,7 @@ public void importDocumentsExceptionTest() throws Exception { .setUpdateMask(FieldMask.newBuilder().build()) .setAutoGenerateIds(true) .setIdField("idField1629396127") + .setForceRefreshContent(true) .build(); client.importDocumentsAsync(request).get(); Assert.fail("No exception raised"); diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1beta/DocumentServiceClientTest.java b/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1beta/DocumentServiceClientTest.java index d013eeb7170d..20c71800a521 100644 --- a/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1beta/DocumentServiceClientTest.java +++ b/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1beta/DocumentServiceClientTest.java @@ -104,6 +104,7 @@ public void getDocumentTest() throws Exception { .setContent(Document.Content.newBuilder().build()) .setParentDocumentId("parentDocumentId1990105056") .setDerivedStructData(Struct.newBuilder().build()) + .setAclInfo(Document.AclInfo.newBuilder().build()) .setIndexTime(Timestamp.newBuilder().build()) .setIndexStatus(Document.IndexStatus.newBuilder().build()) .build(); @@ -156,6 +157,7 @@ public void getDocumentTest2() throws Exception { .setContent(Document.Content.newBuilder().build()) .setParentDocumentId("parentDocumentId1990105056") .setDerivedStructData(Struct.newBuilder().build()) + .setAclInfo(Document.AclInfo.newBuilder().build()) .setIndexTime(Timestamp.newBuilder().build()) .setIndexStatus(Document.IndexStatus.newBuilder().build()) .build(); @@ -296,6 +298,7 @@ public void createDocumentTest() throws Exception { .setContent(Document.Content.newBuilder().build()) .setParentDocumentId("parentDocumentId1990105056") .setDerivedStructData(Struct.newBuilder().build()) + .setAclInfo(Document.AclInfo.newBuilder().build()) .setIndexTime(Timestamp.newBuilder().build()) .setIndexStatus(Document.IndexStatus.newBuilder().build()) .build(); @@ -354,6 +357,7 @@ public void createDocumentTest2() throws Exception { .setContent(Document.Content.newBuilder().build()) .setParentDocumentId("parentDocumentId1990105056") .setDerivedStructData(Struct.newBuilder().build()) + .setAclInfo(Document.AclInfo.newBuilder().build()) .setIndexTime(Timestamp.newBuilder().build()) .setIndexStatus(Document.IndexStatus.newBuilder().build()) .build(); @@ -408,6 +412,7 @@ public void updateDocumentTest() throws Exception { .setContent(Document.Content.newBuilder().build()) .setParentDocumentId("parentDocumentId1990105056") .setDerivedStructData(Struct.newBuilder().build()) + .setAclInfo(Document.AclInfo.newBuilder().build()) .setIndexTime(Timestamp.newBuilder().build()) .setIndexStatus(Document.IndexStatus.newBuilder().build()) .build(); @@ -543,6 +548,7 @@ public void importDocumentsTest() throws Exception { .setUpdateMask(FieldMask.newBuilder().build()) .setAutoGenerateIds(true) .setIdField("idField1629396127") + .setForceRefreshContent(true) .build(); ImportDocumentsResponse actualResponse = client.importDocumentsAsync(request).get(); @@ -567,6 +573,7 @@ public void importDocumentsTest() throws Exception { Assert.assertEquals(request.getUpdateMask(), actualRequest.getUpdateMask()); Assert.assertEquals(request.getAutoGenerateIds(), actualRequest.getAutoGenerateIds()); Assert.assertEquals(request.getIdField(), actualRequest.getIdField()); + Assert.assertEquals(request.getForceRefreshContent(), actualRequest.getForceRefreshContent()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -589,6 +596,7 @@ public void importDocumentsExceptionTest() throws Exception { .setUpdateMask(FieldMask.newBuilder().build()) .setAutoGenerateIds(true) .setIdField("idField1629396127") + .setForceRefreshContent(true) .build(); client.importDocumentsAsync(request).get(); Assert.fail("No exception raised"); diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1beta/EngineServiceClientHttpJsonTest.java b/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1beta/EngineServiceClientHttpJsonTest.java index 22f5e5082459..87b4cbfd2de5 100644 --- a/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1beta/EngineServiceClientHttpJsonTest.java +++ b/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1beta/EngineServiceClientHttpJsonTest.java @@ -27,16 +27,22 @@ import com.google.api.gax.rpc.InvalidArgumentException; import com.google.api.gax.rpc.StatusCode; import com.google.api.gax.rpc.testing.FakeStatusCode; +import com.google.api.resourcenames.ResourceName; import com.google.cloud.discoveryengine.v1beta.stub.HttpJsonEngineServiceStub; import com.google.common.collect.Lists; +import com.google.iam.v1.AuditConfig; +import com.google.iam.v1.Binding; +import com.google.iam.v1.Policy; import com.google.longrunning.Operation; import com.google.protobuf.Any; +import com.google.protobuf.ByteString; import com.google.protobuf.Empty; import com.google.protobuf.FieldMask; import com.google.protobuf.Timestamp; import java.io.IOException; import java.util.ArrayList; import java.util.Arrays; +import java.util.HashMap; import java.util.List; import java.util.concurrent.ExecutionException; import javax.annotation.Generated; @@ -95,7 +101,15 @@ public void createEngineTest() throws Exception { .setSolutionType(SolutionType.forNumber(0)) .setIndustryVertical(IndustryVertical.forNumber(0)) .setCommonConfig(Engine.CommonConfig.newBuilder().build()) + .setKnowledgeGraphConfig(Engine.KnowledgeGraphConfig.newBuilder().build()) .setDisableAnalytics(true) + .putAllFeatures(new HashMap()) + .setCmekConfig(CmekConfig.newBuilder().build()) + .putAllModelConfigs(new HashMap()) + .setObservabilityConfig(ObservabilityConfig.newBuilder().build()) + .putAllConnectorTenantInfo(new HashMap()) + .setAgentGatewaySetting(AgentGatewaySetting.newBuilder().build()) + .addAllProcurementContactEmails(new ArrayList()) .build(); Operation resultOperation = Operation.newBuilder() @@ -157,7 +171,15 @@ public void createEngineTest2() throws Exception { .setSolutionType(SolutionType.forNumber(0)) .setIndustryVertical(IndustryVertical.forNumber(0)) .setCommonConfig(Engine.CommonConfig.newBuilder().build()) + .setKnowledgeGraphConfig(Engine.KnowledgeGraphConfig.newBuilder().build()) .setDisableAnalytics(true) + .putAllFeatures(new HashMap()) + .setCmekConfig(CmekConfig.newBuilder().build()) + .putAllModelConfigs(new HashMap()) + .setObservabilityConfig(ObservabilityConfig.newBuilder().build()) + .putAllConnectorTenantInfo(new HashMap()) + .setAgentGatewaySetting(AgentGatewaySetting.newBuilder().build()) + .addAllProcurementContactEmails(new ArrayList()) .build(); Operation resultOperation = Operation.newBuilder() @@ -311,7 +333,15 @@ public void updateEngineTest() throws Exception { .setSolutionType(SolutionType.forNumber(0)) .setIndustryVertical(IndustryVertical.forNumber(0)) .setCommonConfig(Engine.CommonConfig.newBuilder().build()) + .setKnowledgeGraphConfig(Engine.KnowledgeGraphConfig.newBuilder().build()) .setDisableAnalytics(true) + .putAllFeatures(new HashMap()) + .setCmekConfig(CmekConfig.newBuilder().build()) + .putAllModelConfigs(new HashMap()) + .setObservabilityConfig(ObservabilityConfig.newBuilder().build()) + .putAllConnectorTenantInfo(new HashMap()) + .setAgentGatewaySetting(AgentGatewaySetting.newBuilder().build()) + .addAllProcurementContactEmails(new ArrayList()) .build(); mockService.addResponse(expectedResponse); @@ -326,7 +356,15 @@ public void updateEngineTest() throws Exception { .setSolutionType(SolutionType.forNumber(0)) .setIndustryVertical(IndustryVertical.forNumber(0)) .setCommonConfig(Engine.CommonConfig.newBuilder().build()) + .setKnowledgeGraphConfig(Engine.KnowledgeGraphConfig.newBuilder().build()) .setDisableAnalytics(true) + .putAllFeatures(new HashMap()) + .setCmekConfig(CmekConfig.newBuilder().build()) + .putAllModelConfigs(new HashMap()) + .setObservabilityConfig(ObservabilityConfig.newBuilder().build()) + .putAllConnectorTenantInfo(new HashMap()) + .setAgentGatewaySetting(AgentGatewaySetting.newBuilder().build()) + .addAllProcurementContactEmails(new ArrayList()) .build(); FieldMask updateMask = FieldMask.newBuilder().build(); @@ -367,7 +405,15 @@ public void updateEngineExceptionTest() throws Exception { .setSolutionType(SolutionType.forNumber(0)) .setIndustryVertical(IndustryVertical.forNumber(0)) .setCommonConfig(Engine.CommonConfig.newBuilder().build()) + .setKnowledgeGraphConfig(Engine.KnowledgeGraphConfig.newBuilder().build()) .setDisableAnalytics(true) + .putAllFeatures(new HashMap()) + .setCmekConfig(CmekConfig.newBuilder().build()) + .putAllModelConfigs(new HashMap()) + .setObservabilityConfig(ObservabilityConfig.newBuilder().build()) + .putAllConnectorTenantInfo(new HashMap()) + .setAgentGatewaySetting(AgentGatewaySetting.newBuilder().build()) + .addAllProcurementContactEmails(new ArrayList()) .build(); FieldMask updateMask = FieldMask.newBuilder().build(); client.updateEngine(engine, updateMask); @@ -390,7 +436,15 @@ public void getEngineTest() throws Exception { .setSolutionType(SolutionType.forNumber(0)) .setIndustryVertical(IndustryVertical.forNumber(0)) .setCommonConfig(Engine.CommonConfig.newBuilder().build()) + .setKnowledgeGraphConfig(Engine.KnowledgeGraphConfig.newBuilder().build()) .setDisableAnalytics(true) + .putAllFeatures(new HashMap()) + .setCmekConfig(CmekConfig.newBuilder().build()) + .putAllModelConfigs(new HashMap()) + .setObservabilityConfig(ObservabilityConfig.newBuilder().build()) + .putAllConnectorTenantInfo(new HashMap()) + .setAgentGatewaySetting(AgentGatewaySetting.newBuilder().build()) + .addAllProcurementContactEmails(new ArrayList()) .build(); mockService.addResponse(expectedResponse); @@ -443,7 +497,15 @@ public void getEngineTest2() throws Exception { .setSolutionType(SolutionType.forNumber(0)) .setIndustryVertical(IndustryVertical.forNumber(0)) .setCommonConfig(Engine.CommonConfig.newBuilder().build()) + .setKnowledgeGraphConfig(Engine.KnowledgeGraphConfig.newBuilder().build()) .setDisableAnalytics(true) + .putAllFeatures(new HashMap()) + .setCmekConfig(CmekConfig.newBuilder().build()) + .putAllModelConfigs(new HashMap()) + .setObservabilityConfig(ObservabilityConfig.newBuilder().build()) + .putAllConnectorTenantInfo(new HashMap()) + .setAgentGatewaySetting(AgentGatewaySetting.newBuilder().build()) + .addAllProcurementContactEmails(new ArrayList()) .build(); mockService.addResponse(expectedResponse); @@ -598,7 +660,15 @@ public void pauseEngineTest() throws Exception { .setSolutionType(SolutionType.forNumber(0)) .setIndustryVertical(IndustryVertical.forNumber(0)) .setCommonConfig(Engine.CommonConfig.newBuilder().build()) + .setKnowledgeGraphConfig(Engine.KnowledgeGraphConfig.newBuilder().build()) .setDisableAnalytics(true) + .putAllFeatures(new HashMap()) + .setCmekConfig(CmekConfig.newBuilder().build()) + .putAllModelConfigs(new HashMap()) + .setObservabilityConfig(ObservabilityConfig.newBuilder().build()) + .putAllConnectorTenantInfo(new HashMap()) + .setAgentGatewaySetting(AgentGatewaySetting.newBuilder().build()) + .addAllProcurementContactEmails(new ArrayList()) .build(); mockService.addResponse(expectedResponse); @@ -651,7 +721,15 @@ public void pauseEngineTest2() throws Exception { .setSolutionType(SolutionType.forNumber(0)) .setIndustryVertical(IndustryVertical.forNumber(0)) .setCommonConfig(Engine.CommonConfig.newBuilder().build()) + .setKnowledgeGraphConfig(Engine.KnowledgeGraphConfig.newBuilder().build()) .setDisableAnalytics(true) + .putAllFeatures(new HashMap()) + .setCmekConfig(CmekConfig.newBuilder().build()) + .putAllModelConfigs(new HashMap()) + .setObservabilityConfig(ObservabilityConfig.newBuilder().build()) + .putAllConnectorTenantInfo(new HashMap()) + .setAgentGatewaySetting(AgentGatewaySetting.newBuilder().build()) + .addAllProcurementContactEmails(new ArrayList()) .build(); mockService.addResponse(expectedResponse); @@ -706,7 +784,15 @@ public void resumeEngineTest() throws Exception { .setSolutionType(SolutionType.forNumber(0)) .setIndustryVertical(IndustryVertical.forNumber(0)) .setCommonConfig(Engine.CommonConfig.newBuilder().build()) + .setKnowledgeGraphConfig(Engine.KnowledgeGraphConfig.newBuilder().build()) .setDisableAnalytics(true) + .putAllFeatures(new HashMap()) + .setCmekConfig(CmekConfig.newBuilder().build()) + .putAllModelConfigs(new HashMap()) + .setObservabilityConfig(ObservabilityConfig.newBuilder().build()) + .putAllConnectorTenantInfo(new HashMap()) + .setAgentGatewaySetting(AgentGatewaySetting.newBuilder().build()) + .addAllProcurementContactEmails(new ArrayList()) .build(); mockService.addResponse(expectedResponse); @@ -759,7 +845,15 @@ public void resumeEngineTest2() throws Exception { .setSolutionType(SolutionType.forNumber(0)) .setIndustryVertical(IndustryVertical.forNumber(0)) .setCommonConfig(Engine.CommonConfig.newBuilder().build()) + .setKnowledgeGraphConfig(Engine.KnowledgeGraphConfig.newBuilder().build()) .setDisableAnalytics(true) + .putAllFeatures(new HashMap()) + .setCmekConfig(CmekConfig.newBuilder().build()) + .putAllModelConfigs(new HashMap()) + .setObservabilityConfig(ObservabilityConfig.newBuilder().build()) + .putAllConnectorTenantInfo(new HashMap()) + .setAgentGatewaySetting(AgentGatewaySetting.newBuilder().build()) + .addAllProcurementContactEmails(new ArrayList()) .build(); mockService.addResponse(expectedResponse); @@ -894,4 +988,200 @@ public void tuneEngineExceptionTest2() throws Exception { } catch (ExecutionException e) { } } + + @Test + public void getIamPolicyTest() throws Exception { + Policy expectedResponse = + Policy.newBuilder() + .setVersion(351608024) + .addAllBindings(new ArrayList()) + .addAllAuditConfigs(new ArrayList()) + .setEtag(ByteString.EMPTY) + .build(); + mockService.addResponse(expectedResponse); + + ResourceName resource = EngineName.of("[PROJECT]", "[LOCATION]", "[COLLECTION]", "[ENGINE]"); + + Policy actualResponse = client.getIamPolicy(resource); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getIamPolicyExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ResourceName resource = EngineName.of("[PROJECT]", "[LOCATION]", "[COLLECTION]", "[ENGINE]"); + client.getIamPolicy(resource); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getIamPolicyTest2() throws Exception { + Policy expectedResponse = + Policy.newBuilder() + .setVersion(351608024) + .addAllBindings(new ArrayList()) + .addAllAuditConfigs(new ArrayList()) + .setEtag(ByteString.EMPTY) + .build(); + mockService.addResponse(expectedResponse); + + String resource = + "projects/project-277/locations/location-277/collections/collection-277/engines/engine-277"; + + Policy actualResponse = client.getIamPolicy(resource); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getIamPolicyExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String resource = + "projects/project-277/locations/location-277/collections/collection-277/engines/engine-277"; + client.getIamPolicy(resource); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void setIamPolicyTest() throws Exception { + Policy expectedResponse = + Policy.newBuilder() + .setVersion(351608024) + .addAllBindings(new ArrayList()) + .addAllAuditConfigs(new ArrayList()) + .setEtag(ByteString.EMPTY) + .build(); + mockService.addResponse(expectedResponse); + + ResourceName resource = EngineName.of("[PROJECT]", "[LOCATION]", "[COLLECTION]", "[ENGINE]"); + Policy policy = Policy.newBuilder().build(); + + Policy actualResponse = client.setIamPolicy(resource, policy); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void setIamPolicyExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ResourceName resource = EngineName.of("[PROJECT]", "[LOCATION]", "[COLLECTION]", "[ENGINE]"); + Policy policy = Policy.newBuilder().build(); + client.setIamPolicy(resource, policy); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void setIamPolicyTest2() throws Exception { + Policy expectedResponse = + Policy.newBuilder() + .setVersion(351608024) + .addAllBindings(new ArrayList()) + .addAllAuditConfigs(new ArrayList()) + .setEtag(ByteString.EMPTY) + .build(); + mockService.addResponse(expectedResponse); + + String resource = + "projects/project-277/locations/location-277/collections/collection-277/engines/engine-277"; + Policy policy = Policy.newBuilder().build(); + + Policy actualResponse = client.setIamPolicy(resource, policy); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void setIamPolicyExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String resource = + "projects/project-277/locations/location-277/collections/collection-277/engines/engine-277"; + Policy policy = Policy.newBuilder().build(); + client.setIamPolicy(resource, policy); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } } diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1beta/EngineServiceClientTest.java b/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1beta/EngineServiceClientTest.java index 2502b2ed0c75..13819d8a0410 100644 --- a/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1beta/EngineServiceClientTest.java +++ b/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1beta/EngineServiceClientTest.java @@ -26,10 +26,17 @@ import com.google.api.gax.rpc.ApiClientHeaderProvider; import com.google.api.gax.rpc.InvalidArgumentException; import com.google.api.gax.rpc.StatusCode; +import com.google.api.resourcenames.ResourceName; import com.google.common.collect.Lists; +import com.google.iam.v1.AuditConfig; +import com.google.iam.v1.Binding; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; import com.google.longrunning.Operation; import com.google.protobuf.AbstractMessage; import com.google.protobuf.Any; +import com.google.protobuf.ByteString; import com.google.protobuf.Empty; import com.google.protobuf.FieldMask; import com.google.protobuf.Timestamp; @@ -37,6 +44,7 @@ import java.io.IOException; import java.util.ArrayList; import java.util.Arrays; +import java.util.HashMap; import java.util.List; import java.util.UUID; import java.util.concurrent.ExecutionException; @@ -102,7 +110,15 @@ public void createEngineTest() throws Exception { .setSolutionType(SolutionType.forNumber(0)) .setIndustryVertical(IndustryVertical.forNumber(0)) .setCommonConfig(Engine.CommonConfig.newBuilder().build()) + .setKnowledgeGraphConfig(Engine.KnowledgeGraphConfig.newBuilder().build()) .setDisableAnalytics(true) + .putAllFeatures(new HashMap()) + .setCmekConfig(CmekConfig.newBuilder().build()) + .putAllModelConfigs(new HashMap()) + .setObservabilityConfig(ObservabilityConfig.newBuilder().build()) + .putAllConnectorTenantInfo(new HashMap()) + .setAgentGatewaySetting(AgentGatewaySetting.newBuilder().build()) + .addAllProcurementContactEmails(new ArrayList()) .build(); Operation resultOperation = Operation.newBuilder() @@ -163,7 +179,15 @@ public void createEngineTest2() throws Exception { .setSolutionType(SolutionType.forNumber(0)) .setIndustryVertical(IndustryVertical.forNumber(0)) .setCommonConfig(Engine.CommonConfig.newBuilder().build()) + .setKnowledgeGraphConfig(Engine.KnowledgeGraphConfig.newBuilder().build()) .setDisableAnalytics(true) + .putAllFeatures(new HashMap()) + .setCmekConfig(CmekConfig.newBuilder().build()) + .putAllModelConfigs(new HashMap()) + .setObservabilityConfig(ObservabilityConfig.newBuilder().build()) + .putAllConnectorTenantInfo(new HashMap()) + .setAgentGatewaySetting(AgentGatewaySetting.newBuilder().build()) + .addAllProcurementContactEmails(new ArrayList()) .build(); Operation resultOperation = Operation.newBuilder() @@ -308,7 +332,15 @@ public void updateEngineTest() throws Exception { .setSolutionType(SolutionType.forNumber(0)) .setIndustryVertical(IndustryVertical.forNumber(0)) .setCommonConfig(Engine.CommonConfig.newBuilder().build()) + .setKnowledgeGraphConfig(Engine.KnowledgeGraphConfig.newBuilder().build()) .setDisableAnalytics(true) + .putAllFeatures(new HashMap()) + .setCmekConfig(CmekConfig.newBuilder().build()) + .putAllModelConfigs(new HashMap()) + .setObservabilityConfig(ObservabilityConfig.newBuilder().build()) + .putAllConnectorTenantInfo(new HashMap()) + .setAgentGatewaySetting(AgentGatewaySetting.newBuilder().build()) + .addAllProcurementContactEmails(new ArrayList()) .build(); mockEngineService.addResponse(expectedResponse); @@ -358,7 +390,15 @@ public void getEngineTest() throws Exception { .setSolutionType(SolutionType.forNumber(0)) .setIndustryVertical(IndustryVertical.forNumber(0)) .setCommonConfig(Engine.CommonConfig.newBuilder().build()) + .setKnowledgeGraphConfig(Engine.KnowledgeGraphConfig.newBuilder().build()) .setDisableAnalytics(true) + .putAllFeatures(new HashMap()) + .setCmekConfig(CmekConfig.newBuilder().build()) + .putAllModelConfigs(new HashMap()) + .setObservabilityConfig(ObservabilityConfig.newBuilder().build()) + .putAllConnectorTenantInfo(new HashMap()) + .setAgentGatewaySetting(AgentGatewaySetting.newBuilder().build()) + .addAllProcurementContactEmails(new ArrayList()) .build(); mockEngineService.addResponse(expectedResponse); @@ -405,7 +445,15 @@ public void getEngineTest2() throws Exception { .setSolutionType(SolutionType.forNumber(0)) .setIndustryVertical(IndustryVertical.forNumber(0)) .setCommonConfig(Engine.CommonConfig.newBuilder().build()) + .setKnowledgeGraphConfig(Engine.KnowledgeGraphConfig.newBuilder().build()) .setDisableAnalytics(true) + .putAllFeatures(new HashMap()) + .setCmekConfig(CmekConfig.newBuilder().build()) + .putAllModelConfigs(new HashMap()) + .setObservabilityConfig(ObservabilityConfig.newBuilder().build()) + .putAllConnectorTenantInfo(new HashMap()) + .setAgentGatewaySetting(AgentGatewaySetting.newBuilder().build()) + .addAllProcurementContactEmails(new ArrayList()) .build(); mockEngineService.addResponse(expectedResponse); @@ -540,7 +588,15 @@ public void pauseEngineTest() throws Exception { .setSolutionType(SolutionType.forNumber(0)) .setIndustryVertical(IndustryVertical.forNumber(0)) .setCommonConfig(Engine.CommonConfig.newBuilder().build()) + .setKnowledgeGraphConfig(Engine.KnowledgeGraphConfig.newBuilder().build()) .setDisableAnalytics(true) + .putAllFeatures(new HashMap()) + .setCmekConfig(CmekConfig.newBuilder().build()) + .putAllModelConfigs(new HashMap()) + .setObservabilityConfig(ObservabilityConfig.newBuilder().build()) + .putAllConnectorTenantInfo(new HashMap()) + .setAgentGatewaySetting(AgentGatewaySetting.newBuilder().build()) + .addAllProcurementContactEmails(new ArrayList()) .build(); mockEngineService.addResponse(expectedResponse); @@ -587,7 +643,15 @@ public void pauseEngineTest2() throws Exception { .setSolutionType(SolutionType.forNumber(0)) .setIndustryVertical(IndustryVertical.forNumber(0)) .setCommonConfig(Engine.CommonConfig.newBuilder().build()) + .setKnowledgeGraphConfig(Engine.KnowledgeGraphConfig.newBuilder().build()) .setDisableAnalytics(true) + .putAllFeatures(new HashMap()) + .setCmekConfig(CmekConfig.newBuilder().build()) + .putAllModelConfigs(new HashMap()) + .setObservabilityConfig(ObservabilityConfig.newBuilder().build()) + .putAllConnectorTenantInfo(new HashMap()) + .setAgentGatewaySetting(AgentGatewaySetting.newBuilder().build()) + .addAllProcurementContactEmails(new ArrayList()) .build(); mockEngineService.addResponse(expectedResponse); @@ -634,7 +698,15 @@ public void resumeEngineTest() throws Exception { .setSolutionType(SolutionType.forNumber(0)) .setIndustryVertical(IndustryVertical.forNumber(0)) .setCommonConfig(Engine.CommonConfig.newBuilder().build()) + .setKnowledgeGraphConfig(Engine.KnowledgeGraphConfig.newBuilder().build()) .setDisableAnalytics(true) + .putAllFeatures(new HashMap()) + .setCmekConfig(CmekConfig.newBuilder().build()) + .putAllModelConfigs(new HashMap()) + .setObservabilityConfig(ObservabilityConfig.newBuilder().build()) + .putAllConnectorTenantInfo(new HashMap()) + .setAgentGatewaySetting(AgentGatewaySetting.newBuilder().build()) + .addAllProcurementContactEmails(new ArrayList()) .build(); mockEngineService.addResponse(expectedResponse); @@ -681,7 +753,15 @@ public void resumeEngineTest2() throws Exception { .setSolutionType(SolutionType.forNumber(0)) .setIndustryVertical(IndustryVertical.forNumber(0)) .setCommonConfig(Engine.CommonConfig.newBuilder().build()) + .setKnowledgeGraphConfig(Engine.KnowledgeGraphConfig.newBuilder().build()) .setDisableAnalytics(true) + .putAllFeatures(new HashMap()) + .setCmekConfig(CmekConfig.newBuilder().build()) + .putAllModelConfigs(new HashMap()) + .setObservabilityConfig(ObservabilityConfig.newBuilder().build()) + .putAllConnectorTenantInfo(new HashMap()) + .setAgentGatewaySetting(AgentGatewaySetting.newBuilder().build()) + .addAllProcurementContactEmails(new ArrayList()) .build(); mockEngineService.addResponse(expectedResponse); @@ -800,4 +880,174 @@ public void tuneEngineExceptionTest2() throws Exception { Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); } } + + @Test + public void getIamPolicyTest() throws Exception { + Policy expectedResponse = + Policy.newBuilder() + .setVersion(351608024) + .addAllBindings(new ArrayList()) + .addAllAuditConfigs(new ArrayList()) + .setEtag(ByteString.EMPTY) + .build(); + mockEngineService.addResponse(expectedResponse); + + ResourceName resource = EngineName.of("[PROJECT]", "[LOCATION]", "[COLLECTION]", "[ENGINE]"); + + Policy actualResponse = client.getIamPolicy(resource); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockEngineService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetIamPolicyRequest actualRequest = ((GetIamPolicyRequest) actualRequests.get(0)); + + Assert.assertEquals(resource.toString(), actualRequest.getResource()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getIamPolicyExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockEngineService.addException(exception); + + try { + ResourceName resource = EngineName.of("[PROJECT]", "[LOCATION]", "[COLLECTION]", "[ENGINE]"); + client.getIamPolicy(resource); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getIamPolicyTest2() throws Exception { + Policy expectedResponse = + Policy.newBuilder() + .setVersion(351608024) + .addAllBindings(new ArrayList()) + .addAllAuditConfigs(new ArrayList()) + .setEtag(ByteString.EMPTY) + .build(); + mockEngineService.addResponse(expectedResponse); + + String resource = "resource-341064690"; + + Policy actualResponse = client.getIamPolicy(resource); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockEngineService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetIamPolicyRequest actualRequest = ((GetIamPolicyRequest) actualRequests.get(0)); + + Assert.assertEquals(resource, actualRequest.getResource()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getIamPolicyExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockEngineService.addException(exception); + + try { + String resource = "resource-341064690"; + client.getIamPolicy(resource); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void setIamPolicyTest() throws Exception { + Policy expectedResponse = + Policy.newBuilder() + .setVersion(351608024) + .addAllBindings(new ArrayList()) + .addAllAuditConfigs(new ArrayList()) + .setEtag(ByteString.EMPTY) + .build(); + mockEngineService.addResponse(expectedResponse); + + ResourceName resource = EngineName.of("[PROJECT]", "[LOCATION]", "[COLLECTION]", "[ENGINE]"); + Policy policy = Policy.newBuilder().build(); + + Policy actualResponse = client.setIamPolicy(resource, policy); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockEngineService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + SetIamPolicyRequest actualRequest = ((SetIamPolicyRequest) actualRequests.get(0)); + + Assert.assertEquals(resource.toString(), actualRequest.getResource()); + Assert.assertEquals(policy, actualRequest.getPolicy()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void setIamPolicyExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockEngineService.addException(exception); + + try { + ResourceName resource = EngineName.of("[PROJECT]", "[LOCATION]", "[COLLECTION]", "[ENGINE]"); + Policy policy = Policy.newBuilder().build(); + client.setIamPolicy(resource, policy); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void setIamPolicyTest2() throws Exception { + Policy expectedResponse = + Policy.newBuilder() + .setVersion(351608024) + .addAllBindings(new ArrayList()) + .addAllAuditConfigs(new ArrayList()) + .setEtag(ByteString.EMPTY) + .build(); + mockEngineService.addResponse(expectedResponse); + + String resource = "resource-341064690"; + Policy policy = Policy.newBuilder().build(); + + Policy actualResponse = client.setIamPolicy(resource, policy); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockEngineService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + SetIamPolicyRequest actualRequest = ((SetIamPolicyRequest) actualRequests.get(0)); + + Assert.assertEquals(resource, actualRequest.getResource()); + Assert.assertEquals(policy, actualRequest.getPolicy()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void setIamPolicyExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockEngineService.addException(exception); + + try { + String resource = "resource-341064690"; + Policy policy = Policy.newBuilder().build(); + client.setIamPolicy(resource, policy); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } } diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1beta/IdentityMappingStoreServiceClientHttpJsonTest.java b/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1beta/IdentityMappingStoreServiceClientHttpJsonTest.java new file mode 100644 index 000000000000..b13e33e8de94 --- /dev/null +++ b/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1beta/IdentityMappingStoreServiceClientHttpJsonTest.java @@ -0,0 +1,669 @@ +/* + * 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.discoveryengine.v1beta; + +import static com.google.cloud.discoveryengine.v1beta.IdentityMappingStoreServiceClient.ListIdentityMappingStoresPagedResponse; +import static com.google.cloud.discoveryengine.v1beta.IdentityMappingStoreServiceClient.ListIdentityMappingsPagedResponse; + +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.httpjson.GaxHttpJsonProperties; +import com.google.api.gax.httpjson.testing.MockHttpService; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ApiException; +import com.google.api.gax.rpc.ApiExceptionFactory; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.testing.FakeStatusCode; +import com.google.cloud.discoveryengine.v1beta.stub.HttpJsonIdentityMappingStoreServiceStub; +import com.google.common.collect.Lists; +import com.google.longrunning.Operation; +import com.google.protobuf.Any; +import com.google.protobuf.Empty; +import com.google.rpc.Status; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.concurrent.ExecutionException; +import javax.annotation.Generated; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@Generated("by gapic-generator-java") +public class IdentityMappingStoreServiceClientHttpJsonTest { + private static MockHttpService mockService; + private static IdentityMappingStoreServiceClient client; + + @BeforeClass + public static void startStaticServer() throws IOException { + mockService = + new MockHttpService( + HttpJsonIdentityMappingStoreServiceStub.getMethodDescriptors(), + IdentityMappingStoreServiceSettings.getDefaultEndpoint()); + IdentityMappingStoreServiceSettings settings = + IdentityMappingStoreServiceSettings.newHttpJsonBuilder() + .setTransportChannelProvider( + IdentityMappingStoreServiceSettings.defaultHttpJsonTransportProviderBuilder() + .setHttpTransport(mockService) + .build()) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = IdentityMappingStoreServiceClient.create(settings); + } + + @AfterClass + public static void stopServer() { + client.close(); + } + + @Before + public void setUp() {} + + @After + public void tearDown() throws Exception { + mockService.reset(); + } + + @Test + public void createIdentityMappingStoreTest() throws Exception { + IdentityMappingStore expectedResponse = + IdentityMappingStore.newBuilder() + .setName( + IdentityMappingStoreName.of("[PROJECT]", "[LOCATION]", "[IDENTITY_MAPPING_STORE]") + .toString()) + .setKmsKeyName("kmsKeyName412586233") + .setCmekConfig(CmekConfig.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + IdentityMappingStore identityMappingStore = IdentityMappingStore.newBuilder().build(); + String identityMappingStoreId = "identityMappingStoreId677904780"; + + IdentityMappingStore actualResponse = + client.createIdentityMappingStore(parent, identityMappingStore, identityMappingStoreId); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createIdentityMappingStoreExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + IdentityMappingStore identityMappingStore = IdentityMappingStore.newBuilder().build(); + String identityMappingStoreId = "identityMappingStoreId677904780"; + client.createIdentityMappingStore(parent, identityMappingStore, identityMappingStoreId); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createIdentityMappingStoreTest2() throws Exception { + IdentityMappingStore expectedResponse = + IdentityMappingStore.newBuilder() + .setName( + IdentityMappingStoreName.of("[PROJECT]", "[LOCATION]", "[IDENTITY_MAPPING_STORE]") + .toString()) + .setKmsKeyName("kmsKeyName412586233") + .setCmekConfig(CmekConfig.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-5833/locations/location-5833"; + IdentityMappingStore identityMappingStore = IdentityMappingStore.newBuilder().build(); + String identityMappingStoreId = "identityMappingStoreId677904780"; + + IdentityMappingStore actualResponse = + client.createIdentityMappingStore(parent, identityMappingStore, identityMappingStoreId); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createIdentityMappingStoreExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-5833/locations/location-5833"; + IdentityMappingStore identityMappingStore = IdentityMappingStore.newBuilder().build(); + String identityMappingStoreId = "identityMappingStoreId677904780"; + client.createIdentityMappingStore(parent, identityMappingStore, identityMappingStoreId); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getIdentityMappingStoreTest() throws Exception { + IdentityMappingStore expectedResponse = + IdentityMappingStore.newBuilder() + .setName( + IdentityMappingStoreName.of("[PROJECT]", "[LOCATION]", "[IDENTITY_MAPPING_STORE]") + .toString()) + .setKmsKeyName("kmsKeyName412586233") + .setCmekConfig(CmekConfig.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + IdentityMappingStoreName name = + IdentityMappingStoreName.of("[PROJECT]", "[LOCATION]", "[IDENTITY_MAPPING_STORE]"); + + IdentityMappingStore actualResponse = client.getIdentityMappingStore(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getIdentityMappingStoreExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + IdentityMappingStoreName name = + IdentityMappingStoreName.of("[PROJECT]", "[LOCATION]", "[IDENTITY_MAPPING_STORE]"); + client.getIdentityMappingStore(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getIdentityMappingStoreTest2() throws Exception { + IdentityMappingStore expectedResponse = + IdentityMappingStore.newBuilder() + .setName( + IdentityMappingStoreName.of("[PROJECT]", "[LOCATION]", "[IDENTITY_MAPPING_STORE]") + .toString()) + .setKmsKeyName("kmsKeyName412586233") + .setCmekConfig(CmekConfig.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + String name = + "projects/project-7736/locations/location-7736/identityMappingStores/identityMappingStore-7736"; + + IdentityMappingStore actualResponse = client.getIdentityMappingStore(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getIdentityMappingStoreExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "projects/project-7736/locations/location-7736/identityMappingStores/identityMappingStore-7736"; + client.getIdentityMappingStore(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteIdentityMappingStoreTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteIdentityMappingStoreTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + IdentityMappingStoreName name = + IdentityMappingStoreName.of("[PROJECT]", "[LOCATION]", "[IDENTITY_MAPPING_STORE]"); + + client.deleteIdentityMappingStoreAsync(name).get(); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deleteIdentityMappingStoreExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + IdentityMappingStoreName name = + IdentityMappingStoreName.of("[PROJECT]", "[LOCATION]", "[IDENTITY_MAPPING_STORE]"); + client.deleteIdentityMappingStoreAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void deleteIdentityMappingStoreTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteIdentityMappingStoreTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String name = + "projects/project-7736/locations/location-7736/identityMappingStores/identityMappingStore-7736"; + + client.deleteIdentityMappingStoreAsync(name).get(); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deleteIdentityMappingStoreExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "projects/project-7736/locations/location-7736/identityMappingStores/identityMappingStore-7736"; + client.deleteIdentityMappingStoreAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void importIdentityMappingsTest() throws Exception { + ImportIdentityMappingsResponse expectedResponse = + ImportIdentityMappingsResponse.newBuilder() + .addAllErrorSamples(new ArrayList()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("importIdentityMappingsTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + ImportIdentityMappingsRequest request = + ImportIdentityMappingsRequest.newBuilder() + .setIdentityMappingStore( + IdentityMappingStoreName.of("[PROJECT]", "[LOCATION]", "[IDENTITY_MAPPING_STORE]") + .toString()) + .build(); + + ImportIdentityMappingsResponse actualResponse = + client.importIdentityMappingsAsync(request).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void importIdentityMappingsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ImportIdentityMappingsRequest request = + ImportIdentityMappingsRequest.newBuilder() + .setIdentityMappingStore( + IdentityMappingStoreName.of("[PROJECT]", "[LOCATION]", "[IDENTITY_MAPPING_STORE]") + .toString()) + .build(); + client.importIdentityMappingsAsync(request).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void purgeIdentityMappingsTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("purgeIdentityMappingsTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + PurgeIdentityMappingsRequest request = + PurgeIdentityMappingsRequest.newBuilder() + .setIdentityMappingStore( + IdentityMappingStoreName.of("[PROJECT]", "[LOCATION]", "[IDENTITY_MAPPING_STORE]") + .toString()) + .setFilter("filter-1274492040") + .setForce(true) + .build(); + + client.purgeIdentityMappingsAsync(request).get(); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void purgeIdentityMappingsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + PurgeIdentityMappingsRequest request = + PurgeIdentityMappingsRequest.newBuilder() + .setIdentityMappingStore( + IdentityMappingStoreName.of("[PROJECT]", "[LOCATION]", "[IDENTITY_MAPPING_STORE]") + .toString()) + .setFilter("filter-1274492040") + .setForce(true) + .build(); + client.purgeIdentityMappingsAsync(request).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void listIdentityMappingsTest() throws Exception { + IdentityMappingEntry responsesElement = IdentityMappingEntry.newBuilder().build(); + ListIdentityMappingsResponse expectedResponse = + ListIdentityMappingsResponse.newBuilder() + .setNextPageToken("") + .addAllIdentityMappingEntries(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + ListIdentityMappingsRequest request = + ListIdentityMappingsRequest.newBuilder() + .setIdentityMappingStore( + IdentityMappingStoreName.of("[PROJECT]", "[LOCATION]", "[IDENTITY_MAPPING_STORE]") + .toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + + ListIdentityMappingsPagedResponse pagedListResponse = client.listIdentityMappings(request); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getIdentityMappingEntriesList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listIdentityMappingsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ListIdentityMappingsRequest request = + ListIdentityMappingsRequest.newBuilder() + .setIdentityMappingStore( + IdentityMappingStoreName.of("[PROJECT]", "[LOCATION]", "[IDENTITY_MAPPING_STORE]") + .toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + client.listIdentityMappings(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listIdentityMappingStoresTest() throws Exception { + IdentityMappingStore responsesElement = IdentityMappingStore.newBuilder().build(); + ListIdentityMappingStoresResponse expectedResponse = + ListIdentityMappingStoresResponse.newBuilder() + .setNextPageToken("") + .addAllIdentityMappingStores(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListIdentityMappingStoresPagedResponse pagedListResponse = + client.listIdentityMappingStores(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getIdentityMappingStoresList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listIdentityMappingStoresExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.listIdentityMappingStores(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listIdentityMappingStoresTest2() throws Exception { + IdentityMappingStore responsesElement = IdentityMappingStore.newBuilder().build(); + ListIdentityMappingStoresResponse expectedResponse = + ListIdentityMappingStoresResponse.newBuilder() + .setNextPageToken("") + .addAllIdentityMappingStores(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-5833/locations/location-5833"; + + ListIdentityMappingStoresPagedResponse pagedListResponse = + client.listIdentityMappingStores(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getIdentityMappingStoresList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listIdentityMappingStoresExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-5833/locations/location-5833"; + client.listIdentityMappingStores(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } +} diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1beta/IdentityMappingStoreServiceClientTest.java b/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1beta/IdentityMappingStoreServiceClientTest.java new file mode 100644 index 000000000000..cb2f4b4f6736 --- /dev/null +++ b/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1beta/IdentityMappingStoreServiceClientTest.java @@ -0,0 +1,639 @@ +/* + * 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.discoveryengine.v1beta; + +import static com.google.cloud.discoveryengine.v1beta.IdentityMappingStoreServiceClient.ListIdentityMappingStoresPagedResponse; +import static com.google.cloud.discoveryengine.v1beta.IdentityMappingStoreServiceClient.ListIdentityMappingsPagedResponse; + +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.testing.LocalChannelProvider; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.api.gax.grpc.testing.MockServiceHelper; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.api.gax.rpc.StatusCode; +import com.google.common.collect.Lists; +import com.google.longrunning.Operation; +import com.google.protobuf.AbstractMessage; +import com.google.protobuf.Any; +import com.google.protobuf.Empty; +import com.google.rpc.Status; +import io.grpc.StatusRuntimeException; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import java.util.concurrent.ExecutionException; +import javax.annotation.Generated; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@Generated("by gapic-generator-java") +public class IdentityMappingStoreServiceClientTest { + private static MockIdentityMappingStoreService mockIdentityMappingStoreService; + private static MockLocations mockLocations; + private static MockServiceHelper mockServiceHelper; + private LocalChannelProvider channelProvider; + private IdentityMappingStoreServiceClient client; + + @BeforeClass + public static void startStaticServer() { + mockIdentityMappingStoreService = new MockIdentityMappingStoreService(); + mockLocations = new MockLocations(); + mockServiceHelper = + new MockServiceHelper( + UUID.randomUUID().toString(), + Arrays.asList(mockIdentityMappingStoreService, mockLocations)); + mockServiceHelper.start(); + } + + @AfterClass + public static void stopServer() { + mockServiceHelper.stop(); + } + + @Before + public void setUp() throws IOException { + mockServiceHelper.reset(); + channelProvider = mockServiceHelper.createChannelProvider(); + IdentityMappingStoreServiceSettings settings = + IdentityMappingStoreServiceSettings.newBuilder() + .setTransportChannelProvider(channelProvider) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = IdentityMappingStoreServiceClient.create(settings); + } + + @After + public void tearDown() throws Exception { + client.close(); + } + + @Test + public void createIdentityMappingStoreTest() throws Exception { + IdentityMappingStore expectedResponse = + IdentityMappingStore.newBuilder() + .setName( + IdentityMappingStoreName.of("[PROJECT]", "[LOCATION]", "[IDENTITY_MAPPING_STORE]") + .toString()) + .setKmsKeyName("kmsKeyName412586233") + .setCmekConfig(CmekConfig.newBuilder().build()) + .build(); + mockIdentityMappingStoreService.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + IdentityMappingStore identityMappingStore = IdentityMappingStore.newBuilder().build(); + String identityMappingStoreId = "identityMappingStoreId677904780"; + + IdentityMappingStore actualResponse = + client.createIdentityMappingStore(parent, identityMappingStore, identityMappingStoreId); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockIdentityMappingStoreService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateIdentityMappingStoreRequest actualRequest = + ((CreateIdentityMappingStoreRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(identityMappingStore, actualRequest.getIdentityMappingStore()); + Assert.assertEquals(identityMappingStoreId, actualRequest.getIdentityMappingStoreId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createIdentityMappingStoreExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockIdentityMappingStoreService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + IdentityMappingStore identityMappingStore = IdentityMappingStore.newBuilder().build(); + String identityMappingStoreId = "identityMappingStoreId677904780"; + client.createIdentityMappingStore(parent, identityMappingStore, identityMappingStoreId); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createIdentityMappingStoreTest2() throws Exception { + IdentityMappingStore expectedResponse = + IdentityMappingStore.newBuilder() + .setName( + IdentityMappingStoreName.of("[PROJECT]", "[LOCATION]", "[IDENTITY_MAPPING_STORE]") + .toString()) + .setKmsKeyName("kmsKeyName412586233") + .setCmekConfig(CmekConfig.newBuilder().build()) + .build(); + mockIdentityMappingStoreService.addResponse(expectedResponse); + + String parent = "parent-995424086"; + IdentityMappingStore identityMappingStore = IdentityMappingStore.newBuilder().build(); + String identityMappingStoreId = "identityMappingStoreId677904780"; + + IdentityMappingStore actualResponse = + client.createIdentityMappingStore(parent, identityMappingStore, identityMappingStoreId); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockIdentityMappingStoreService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateIdentityMappingStoreRequest actualRequest = + ((CreateIdentityMappingStoreRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(identityMappingStore, actualRequest.getIdentityMappingStore()); + Assert.assertEquals(identityMappingStoreId, actualRequest.getIdentityMappingStoreId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createIdentityMappingStoreExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockIdentityMappingStoreService.addException(exception); + + try { + String parent = "parent-995424086"; + IdentityMappingStore identityMappingStore = IdentityMappingStore.newBuilder().build(); + String identityMappingStoreId = "identityMappingStoreId677904780"; + client.createIdentityMappingStore(parent, identityMappingStore, identityMappingStoreId); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getIdentityMappingStoreTest() throws Exception { + IdentityMappingStore expectedResponse = + IdentityMappingStore.newBuilder() + .setName( + IdentityMappingStoreName.of("[PROJECT]", "[LOCATION]", "[IDENTITY_MAPPING_STORE]") + .toString()) + .setKmsKeyName("kmsKeyName412586233") + .setCmekConfig(CmekConfig.newBuilder().build()) + .build(); + mockIdentityMappingStoreService.addResponse(expectedResponse); + + IdentityMappingStoreName name = + IdentityMappingStoreName.of("[PROJECT]", "[LOCATION]", "[IDENTITY_MAPPING_STORE]"); + + IdentityMappingStore actualResponse = client.getIdentityMappingStore(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockIdentityMappingStoreService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetIdentityMappingStoreRequest actualRequest = + ((GetIdentityMappingStoreRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getIdentityMappingStoreExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockIdentityMappingStoreService.addException(exception); + + try { + IdentityMappingStoreName name = + IdentityMappingStoreName.of("[PROJECT]", "[LOCATION]", "[IDENTITY_MAPPING_STORE]"); + client.getIdentityMappingStore(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getIdentityMappingStoreTest2() throws Exception { + IdentityMappingStore expectedResponse = + IdentityMappingStore.newBuilder() + .setName( + IdentityMappingStoreName.of("[PROJECT]", "[LOCATION]", "[IDENTITY_MAPPING_STORE]") + .toString()) + .setKmsKeyName("kmsKeyName412586233") + .setCmekConfig(CmekConfig.newBuilder().build()) + .build(); + mockIdentityMappingStoreService.addResponse(expectedResponse); + + String name = "name3373707"; + + IdentityMappingStore actualResponse = client.getIdentityMappingStore(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockIdentityMappingStoreService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetIdentityMappingStoreRequest actualRequest = + ((GetIdentityMappingStoreRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getIdentityMappingStoreExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockIdentityMappingStoreService.addException(exception); + + try { + String name = "name3373707"; + client.getIdentityMappingStore(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteIdentityMappingStoreTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteIdentityMappingStoreTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockIdentityMappingStoreService.addResponse(resultOperation); + + IdentityMappingStoreName name = + IdentityMappingStoreName.of("[PROJECT]", "[LOCATION]", "[IDENTITY_MAPPING_STORE]"); + + client.deleteIdentityMappingStoreAsync(name).get(); + + List actualRequests = mockIdentityMappingStoreService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteIdentityMappingStoreRequest actualRequest = + ((DeleteIdentityMappingStoreRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteIdentityMappingStoreExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockIdentityMappingStoreService.addException(exception); + + try { + IdentityMappingStoreName name = + IdentityMappingStoreName.of("[PROJECT]", "[LOCATION]", "[IDENTITY_MAPPING_STORE]"); + client.deleteIdentityMappingStoreAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void deleteIdentityMappingStoreTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteIdentityMappingStoreTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockIdentityMappingStoreService.addResponse(resultOperation); + + String name = "name3373707"; + + client.deleteIdentityMappingStoreAsync(name).get(); + + List actualRequests = mockIdentityMappingStoreService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteIdentityMappingStoreRequest actualRequest = + ((DeleteIdentityMappingStoreRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteIdentityMappingStoreExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockIdentityMappingStoreService.addException(exception); + + try { + String name = "name3373707"; + client.deleteIdentityMappingStoreAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void importIdentityMappingsTest() throws Exception { + ImportIdentityMappingsResponse expectedResponse = + ImportIdentityMappingsResponse.newBuilder() + .addAllErrorSamples(new ArrayList()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("importIdentityMappingsTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockIdentityMappingStoreService.addResponse(resultOperation); + + ImportIdentityMappingsRequest request = + ImportIdentityMappingsRequest.newBuilder() + .setIdentityMappingStore( + IdentityMappingStoreName.of("[PROJECT]", "[LOCATION]", "[IDENTITY_MAPPING_STORE]") + .toString()) + .build(); + + ImportIdentityMappingsResponse actualResponse = + client.importIdentityMappingsAsync(request).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockIdentityMappingStoreService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ImportIdentityMappingsRequest actualRequest = + ((ImportIdentityMappingsRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getInlineSource(), actualRequest.getInlineSource()); + Assert.assertEquals(request.getIdentityMappingStore(), actualRequest.getIdentityMappingStore()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void importIdentityMappingsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockIdentityMappingStoreService.addException(exception); + + try { + ImportIdentityMappingsRequest request = + ImportIdentityMappingsRequest.newBuilder() + .setIdentityMappingStore( + IdentityMappingStoreName.of("[PROJECT]", "[LOCATION]", "[IDENTITY_MAPPING_STORE]") + .toString()) + .build(); + client.importIdentityMappingsAsync(request).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void purgeIdentityMappingsTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("purgeIdentityMappingsTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockIdentityMappingStoreService.addResponse(resultOperation); + + PurgeIdentityMappingsRequest request = + PurgeIdentityMappingsRequest.newBuilder() + .setIdentityMappingStore( + IdentityMappingStoreName.of("[PROJECT]", "[LOCATION]", "[IDENTITY_MAPPING_STORE]") + .toString()) + .setFilter("filter-1274492040") + .setForce(true) + .build(); + + client.purgeIdentityMappingsAsync(request).get(); + + List actualRequests = mockIdentityMappingStoreService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + PurgeIdentityMappingsRequest actualRequest = + ((PurgeIdentityMappingsRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getInlineSource(), actualRequest.getInlineSource()); + Assert.assertEquals(request.getIdentityMappingStore(), actualRequest.getIdentityMappingStore()); + Assert.assertEquals(request.getFilter(), actualRequest.getFilter()); + Assert.assertEquals(request.getForce(), actualRequest.getForce()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void purgeIdentityMappingsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockIdentityMappingStoreService.addException(exception); + + try { + PurgeIdentityMappingsRequest request = + PurgeIdentityMappingsRequest.newBuilder() + .setIdentityMappingStore( + IdentityMappingStoreName.of("[PROJECT]", "[LOCATION]", "[IDENTITY_MAPPING_STORE]") + .toString()) + .setFilter("filter-1274492040") + .setForce(true) + .build(); + client.purgeIdentityMappingsAsync(request).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void listIdentityMappingsTest() throws Exception { + IdentityMappingEntry responsesElement = IdentityMappingEntry.newBuilder().build(); + ListIdentityMappingsResponse expectedResponse = + ListIdentityMappingsResponse.newBuilder() + .setNextPageToken("") + .addAllIdentityMappingEntries(Arrays.asList(responsesElement)) + .build(); + mockIdentityMappingStoreService.addResponse(expectedResponse); + + ListIdentityMappingsRequest request = + ListIdentityMappingsRequest.newBuilder() + .setIdentityMappingStore( + IdentityMappingStoreName.of("[PROJECT]", "[LOCATION]", "[IDENTITY_MAPPING_STORE]") + .toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + + ListIdentityMappingsPagedResponse pagedListResponse = client.listIdentityMappings(request); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getIdentityMappingEntriesList().get(0), resources.get(0)); + + List actualRequests = mockIdentityMappingStoreService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListIdentityMappingsRequest actualRequest = + ((ListIdentityMappingsRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getIdentityMappingStore(), actualRequest.getIdentityMappingStore()); + Assert.assertEquals(request.getPageSize(), actualRequest.getPageSize()); + Assert.assertEquals(request.getPageToken(), actualRequest.getPageToken()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listIdentityMappingsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockIdentityMappingStoreService.addException(exception); + + try { + ListIdentityMappingsRequest request = + ListIdentityMappingsRequest.newBuilder() + .setIdentityMappingStore( + IdentityMappingStoreName.of("[PROJECT]", "[LOCATION]", "[IDENTITY_MAPPING_STORE]") + .toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + client.listIdentityMappings(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listIdentityMappingStoresTest() throws Exception { + IdentityMappingStore responsesElement = IdentityMappingStore.newBuilder().build(); + ListIdentityMappingStoresResponse expectedResponse = + ListIdentityMappingStoresResponse.newBuilder() + .setNextPageToken("") + .addAllIdentityMappingStores(Arrays.asList(responsesElement)) + .build(); + mockIdentityMappingStoreService.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListIdentityMappingStoresPagedResponse pagedListResponse = + client.listIdentityMappingStores(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getIdentityMappingStoresList().get(0), resources.get(0)); + + List actualRequests = mockIdentityMappingStoreService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListIdentityMappingStoresRequest actualRequest = + ((ListIdentityMappingStoresRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listIdentityMappingStoresExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockIdentityMappingStoreService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.listIdentityMappingStores(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listIdentityMappingStoresTest2() throws Exception { + IdentityMappingStore responsesElement = IdentityMappingStore.newBuilder().build(); + ListIdentityMappingStoresResponse expectedResponse = + ListIdentityMappingStoresResponse.newBuilder() + .setNextPageToken("") + .addAllIdentityMappingStores(Arrays.asList(responsesElement)) + .build(); + mockIdentityMappingStoreService.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListIdentityMappingStoresPagedResponse pagedListResponse = + client.listIdentityMappingStores(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getIdentityMappingStoresList().get(0), resources.get(0)); + + List actualRequests = mockIdentityMappingStoreService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListIdentityMappingStoresRequest actualRequest = + ((ListIdentityMappingStoresRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listIdentityMappingStoresExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockIdentityMappingStoreService.addException(exception); + + try { + String parent = "parent-995424086"; + client.listIdentityMappingStores(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } +} diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1beta/LicenseConfigServiceClientHttpJsonTest.java b/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1beta/LicenseConfigServiceClientHttpJsonTest.java new file mode 100644 index 000000000000..35c94ea57677 --- /dev/null +++ b/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1beta/LicenseConfigServiceClientHttpJsonTest.java @@ -0,0 +1,830 @@ +/* + * 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.discoveryengine.v1beta; + +import static com.google.cloud.discoveryengine.v1beta.LicenseConfigServiceClient.ListLicenseConfigsPagedResponse; + +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.httpjson.GaxHttpJsonProperties; +import com.google.api.gax.httpjson.testing.MockHttpService; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ApiException; +import com.google.api.gax.rpc.ApiExceptionFactory; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.testing.FakeStatusCode; +import com.google.cloud.discoveryengine.v1beta.stub.HttpJsonLicenseConfigServiceStub; +import com.google.common.collect.Lists; +import com.google.protobuf.FieldMask; +import com.google.type.Date; +import java.io.IOException; +import java.util.Arrays; +import java.util.List; +import javax.annotation.Generated; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@Generated("by gapic-generator-java") +public class LicenseConfigServiceClientHttpJsonTest { + private static MockHttpService mockService; + private static LicenseConfigServiceClient client; + + @BeforeClass + public static void startStaticServer() throws IOException { + mockService = + new MockHttpService( + HttpJsonLicenseConfigServiceStub.getMethodDescriptors(), + LicenseConfigServiceSettings.getDefaultEndpoint()); + LicenseConfigServiceSettings settings = + LicenseConfigServiceSettings.newHttpJsonBuilder() + .setTransportChannelProvider( + LicenseConfigServiceSettings.defaultHttpJsonTransportProviderBuilder() + .setHttpTransport(mockService) + .build()) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = LicenseConfigServiceClient.create(settings); + } + + @AfterClass + public static void stopServer() { + client.close(); + } + + @Before + public void setUp() {} + + @After + public void tearDown() throws Exception { + mockService.reset(); + } + + @Test + public void createLicenseConfigTest() throws Exception { + LicenseConfig expectedResponse = + LicenseConfig.newBuilder() + .setName(LicenseConfigName.of("[PROJECT]", "[LOCATION]", "[LICENSE_CONFIG]").toString()) + .setLicenseCount(-1565113455) + .setSubscriptionTier(SubscriptionTier.forNumber(0)) + .setAutoRenew(true) + .setStartDate(Date.newBuilder().build()) + .setEndDate(Date.newBuilder().build()) + .setSubscriptionTerm(SubscriptionTerm.forNumber(0)) + .setFreeTrial(true) + .setGeminiBundle(true) + .setEarlyTerminated(true) + .setEarlyTerminationDate(Date.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + LicenseConfig licenseConfig = LicenseConfig.newBuilder().build(); + String licenseConfigId = "licenseConfigId-372057250"; + + LicenseConfig actualResponse = + client.createLicenseConfig(parent, licenseConfig, licenseConfigId); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createLicenseConfigExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + LicenseConfig licenseConfig = LicenseConfig.newBuilder().build(); + String licenseConfigId = "licenseConfigId-372057250"; + client.createLicenseConfig(parent, licenseConfig, licenseConfigId); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createLicenseConfigTest2() throws Exception { + LicenseConfig expectedResponse = + LicenseConfig.newBuilder() + .setName(LicenseConfigName.of("[PROJECT]", "[LOCATION]", "[LICENSE_CONFIG]").toString()) + .setLicenseCount(-1565113455) + .setSubscriptionTier(SubscriptionTier.forNumber(0)) + .setAutoRenew(true) + .setStartDate(Date.newBuilder().build()) + .setEndDate(Date.newBuilder().build()) + .setSubscriptionTerm(SubscriptionTerm.forNumber(0)) + .setFreeTrial(true) + .setGeminiBundle(true) + .setEarlyTerminated(true) + .setEarlyTerminationDate(Date.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-5833/locations/location-5833"; + LicenseConfig licenseConfig = LicenseConfig.newBuilder().build(); + String licenseConfigId = "licenseConfigId-372057250"; + + LicenseConfig actualResponse = + client.createLicenseConfig(parent, licenseConfig, licenseConfigId); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createLicenseConfigExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-5833/locations/location-5833"; + LicenseConfig licenseConfig = LicenseConfig.newBuilder().build(); + String licenseConfigId = "licenseConfigId-372057250"; + client.createLicenseConfig(parent, licenseConfig, licenseConfigId); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updateLicenseConfigTest() throws Exception { + LicenseConfig expectedResponse = + LicenseConfig.newBuilder() + .setName(LicenseConfigName.of("[PROJECT]", "[LOCATION]", "[LICENSE_CONFIG]").toString()) + .setLicenseCount(-1565113455) + .setSubscriptionTier(SubscriptionTier.forNumber(0)) + .setAutoRenew(true) + .setStartDate(Date.newBuilder().build()) + .setEndDate(Date.newBuilder().build()) + .setSubscriptionTerm(SubscriptionTerm.forNumber(0)) + .setFreeTrial(true) + .setGeminiBundle(true) + .setEarlyTerminated(true) + .setEarlyTerminationDate(Date.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + LicenseConfig licenseConfig = + LicenseConfig.newBuilder() + .setName(LicenseConfigName.of("[PROJECT]", "[LOCATION]", "[LICENSE_CONFIG]").toString()) + .setLicenseCount(-1565113455) + .setSubscriptionTier(SubscriptionTier.forNumber(0)) + .setAutoRenew(true) + .setStartDate(Date.newBuilder().build()) + .setEndDate(Date.newBuilder().build()) + .setSubscriptionTerm(SubscriptionTerm.forNumber(0)) + .setFreeTrial(true) + .setGeminiBundle(true) + .setEarlyTerminated(true) + .setEarlyTerminationDate(Date.newBuilder().build()) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + LicenseConfig actualResponse = client.updateLicenseConfig(licenseConfig, updateMask); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void updateLicenseConfigExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + LicenseConfig licenseConfig = + LicenseConfig.newBuilder() + .setName( + LicenseConfigName.of("[PROJECT]", "[LOCATION]", "[LICENSE_CONFIG]").toString()) + .setLicenseCount(-1565113455) + .setSubscriptionTier(SubscriptionTier.forNumber(0)) + .setAutoRenew(true) + .setStartDate(Date.newBuilder().build()) + .setEndDate(Date.newBuilder().build()) + .setSubscriptionTerm(SubscriptionTerm.forNumber(0)) + .setFreeTrial(true) + .setGeminiBundle(true) + .setEarlyTerminated(true) + .setEarlyTerminationDate(Date.newBuilder().build()) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateLicenseConfig(licenseConfig, updateMask); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getLicenseConfigTest() throws Exception { + LicenseConfig expectedResponse = + LicenseConfig.newBuilder() + .setName(LicenseConfigName.of("[PROJECT]", "[LOCATION]", "[LICENSE_CONFIG]").toString()) + .setLicenseCount(-1565113455) + .setSubscriptionTier(SubscriptionTier.forNumber(0)) + .setAutoRenew(true) + .setStartDate(Date.newBuilder().build()) + .setEndDate(Date.newBuilder().build()) + .setSubscriptionTerm(SubscriptionTerm.forNumber(0)) + .setFreeTrial(true) + .setGeminiBundle(true) + .setEarlyTerminated(true) + .setEarlyTerminationDate(Date.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + LicenseConfigName name = LicenseConfigName.of("[PROJECT]", "[LOCATION]", "[LICENSE_CONFIG]"); + + LicenseConfig actualResponse = client.getLicenseConfig(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getLicenseConfigExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + LicenseConfigName name = LicenseConfigName.of("[PROJECT]", "[LOCATION]", "[LICENSE_CONFIG]"); + client.getLicenseConfig(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getLicenseConfigTest2() throws Exception { + LicenseConfig expectedResponse = + LicenseConfig.newBuilder() + .setName(LicenseConfigName.of("[PROJECT]", "[LOCATION]", "[LICENSE_CONFIG]").toString()) + .setLicenseCount(-1565113455) + .setSubscriptionTier(SubscriptionTier.forNumber(0)) + .setAutoRenew(true) + .setStartDate(Date.newBuilder().build()) + .setEndDate(Date.newBuilder().build()) + .setSubscriptionTerm(SubscriptionTerm.forNumber(0)) + .setFreeTrial(true) + .setGeminiBundle(true) + .setEarlyTerminated(true) + .setEarlyTerminationDate(Date.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + String name = "projects/project-9552/locations/location-9552/licenseConfigs/licenseConfig-9552"; + + LicenseConfig actualResponse = client.getLicenseConfig(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getLicenseConfigExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "projects/project-9552/locations/location-9552/licenseConfigs/licenseConfig-9552"; + client.getLicenseConfig(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listLicenseConfigsTest() throws Exception { + LicenseConfig responsesElement = LicenseConfig.newBuilder().build(); + ListLicenseConfigsResponse expectedResponse = + ListLicenseConfigsResponse.newBuilder() + .setNextPageToken("") + .addAllLicenseConfigs(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListLicenseConfigsPagedResponse pagedListResponse = client.listLicenseConfigs(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getLicenseConfigsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listLicenseConfigsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.listLicenseConfigs(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listLicenseConfigsTest2() throws Exception { + LicenseConfig responsesElement = LicenseConfig.newBuilder().build(); + ListLicenseConfigsResponse expectedResponse = + ListLicenseConfigsResponse.newBuilder() + .setNextPageToken("") + .addAllLicenseConfigs(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-5833/locations/location-5833"; + + ListLicenseConfigsPagedResponse pagedListResponse = client.listLicenseConfigs(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getLicenseConfigsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listLicenseConfigsExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-5833/locations/location-5833"; + client.listLicenseConfigs(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void distributeLicenseConfigTest() throws Exception { + DistributeLicenseConfigResponse expectedResponse = + DistributeLicenseConfigResponse.newBuilder() + .setLicenseConfig(LicenseConfig.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + BillingAccountLicenseConfigName billingAccountLicenseConfig = + BillingAccountLicenseConfigName.of("[BILLING_ACCOUNT]", "[BILLING_ACCOUNT_LICENSE_CONFIG]"); + long projectNumber = 828084015; + String location = "location1901043637"; + long licenseCount = -1565113455; + String licenseConfigId = "licenseConfigId-372057250"; + + DistributeLicenseConfigResponse actualResponse = + client.distributeLicenseConfig( + billingAccountLicenseConfig, projectNumber, location, licenseCount, licenseConfigId); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void distributeLicenseConfigExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + BillingAccountLicenseConfigName billingAccountLicenseConfig = + BillingAccountLicenseConfigName.of( + "[BILLING_ACCOUNT]", "[BILLING_ACCOUNT_LICENSE_CONFIG]"); + long projectNumber = 828084015; + String location = "location1901043637"; + long licenseCount = -1565113455; + String licenseConfigId = "licenseConfigId-372057250"; + client.distributeLicenseConfig( + billingAccountLicenseConfig, projectNumber, location, licenseCount, licenseConfigId); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void distributeLicenseConfigTest2() throws Exception { + DistributeLicenseConfigResponse expectedResponse = + DistributeLicenseConfigResponse.newBuilder() + .setLicenseConfig(LicenseConfig.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + String billingAccountLicenseConfig = + "billingAccounts/billingAccount-511/billingAccountLicenseConfigs/billingAccountLicenseConfig-511"; + long projectNumber = 828084015; + String location = "location1901043637"; + long licenseCount = -1565113455; + String licenseConfigId = "licenseConfigId-372057250"; + + DistributeLicenseConfigResponse actualResponse = + client.distributeLicenseConfig( + billingAccountLicenseConfig, projectNumber, location, licenseCount, licenseConfigId); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void distributeLicenseConfigExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String billingAccountLicenseConfig = + "billingAccounts/billingAccount-511/billingAccountLicenseConfigs/billingAccountLicenseConfig-511"; + long projectNumber = 828084015; + String location = "location1901043637"; + long licenseCount = -1565113455; + String licenseConfigId = "licenseConfigId-372057250"; + client.distributeLicenseConfig( + billingAccountLicenseConfig, projectNumber, location, licenseCount, licenseConfigId); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void retractLicenseConfigTest() throws Exception { + RetractLicenseConfigResponse expectedResponse = + RetractLicenseConfigResponse.newBuilder() + .setLicenseConfig(LicenseConfig.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + BillingAccountLicenseConfigName billingAccountLicenseConfig = + BillingAccountLicenseConfigName.of("[BILLING_ACCOUNT]", "[BILLING_ACCOUNT_LICENSE_CONFIG]"); + LicenseConfigName licenseConfig = + LicenseConfigName.of("[PROJECT]", "[LOCATION]", "[LICENSE_CONFIG]"); + boolean fullRetract = true; + long licenseCount = -1565113455; + + RetractLicenseConfigResponse actualResponse = + client.retractLicenseConfig( + billingAccountLicenseConfig, licenseConfig, fullRetract, licenseCount); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void retractLicenseConfigExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + BillingAccountLicenseConfigName billingAccountLicenseConfig = + BillingAccountLicenseConfigName.of( + "[BILLING_ACCOUNT]", "[BILLING_ACCOUNT_LICENSE_CONFIG]"); + LicenseConfigName licenseConfig = + LicenseConfigName.of("[PROJECT]", "[LOCATION]", "[LICENSE_CONFIG]"); + boolean fullRetract = true; + long licenseCount = -1565113455; + client.retractLicenseConfig( + billingAccountLicenseConfig, licenseConfig, fullRetract, licenseCount); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void retractLicenseConfigTest2() throws Exception { + RetractLicenseConfigResponse expectedResponse = + RetractLicenseConfigResponse.newBuilder() + .setLicenseConfig(LicenseConfig.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + BillingAccountLicenseConfigName billingAccountLicenseConfig = + BillingAccountLicenseConfigName.of("[BILLING_ACCOUNT]", "[BILLING_ACCOUNT_LICENSE_CONFIG]"); + String licenseConfig = "licenseConfig1939275491"; + boolean fullRetract = true; + long licenseCount = -1565113455; + + RetractLicenseConfigResponse actualResponse = + client.retractLicenseConfig( + billingAccountLicenseConfig, licenseConfig, fullRetract, licenseCount); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void retractLicenseConfigExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + BillingAccountLicenseConfigName billingAccountLicenseConfig = + BillingAccountLicenseConfigName.of( + "[BILLING_ACCOUNT]", "[BILLING_ACCOUNT_LICENSE_CONFIG]"); + String licenseConfig = "licenseConfig1939275491"; + boolean fullRetract = true; + long licenseCount = -1565113455; + client.retractLicenseConfig( + billingAccountLicenseConfig, licenseConfig, fullRetract, licenseCount); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void retractLicenseConfigTest3() throws Exception { + RetractLicenseConfigResponse expectedResponse = + RetractLicenseConfigResponse.newBuilder() + .setLicenseConfig(LicenseConfig.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + String billingAccountLicenseConfig = + "billingAccounts/billingAccount-511/billingAccountLicenseConfigs/billingAccountLicenseConfig-511"; + LicenseConfigName licenseConfig = + LicenseConfigName.of("[PROJECT]", "[LOCATION]", "[LICENSE_CONFIG]"); + boolean fullRetract = true; + long licenseCount = -1565113455; + + RetractLicenseConfigResponse actualResponse = + client.retractLicenseConfig( + billingAccountLicenseConfig, licenseConfig, fullRetract, licenseCount); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void retractLicenseConfigExceptionTest3() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String billingAccountLicenseConfig = + "billingAccounts/billingAccount-511/billingAccountLicenseConfigs/billingAccountLicenseConfig-511"; + LicenseConfigName licenseConfig = + LicenseConfigName.of("[PROJECT]", "[LOCATION]", "[LICENSE_CONFIG]"); + boolean fullRetract = true; + long licenseCount = -1565113455; + client.retractLicenseConfig( + billingAccountLicenseConfig, licenseConfig, fullRetract, licenseCount); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void retractLicenseConfigTest4() throws Exception { + RetractLicenseConfigResponse expectedResponse = + RetractLicenseConfigResponse.newBuilder() + .setLicenseConfig(LicenseConfig.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + String billingAccountLicenseConfig = + "billingAccounts/billingAccount-511/billingAccountLicenseConfigs/billingAccountLicenseConfig-511"; + String licenseConfig = "licenseConfig1939275491"; + boolean fullRetract = true; + long licenseCount = -1565113455; + + RetractLicenseConfigResponse actualResponse = + client.retractLicenseConfig( + billingAccountLicenseConfig, licenseConfig, fullRetract, licenseCount); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void retractLicenseConfigExceptionTest4() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String billingAccountLicenseConfig = + "billingAccounts/billingAccount-511/billingAccountLicenseConfigs/billingAccountLicenseConfig-511"; + String licenseConfig = "licenseConfig1939275491"; + boolean fullRetract = true; + long licenseCount = -1565113455; + client.retractLicenseConfig( + billingAccountLicenseConfig, licenseConfig, fullRetract, licenseCount); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } +} diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1beta/LicenseConfigServiceClientTest.java b/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1beta/LicenseConfigServiceClientTest.java new file mode 100644 index 000000000000..1f6c950fb206 --- /dev/null +++ b/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1beta/LicenseConfigServiceClientTest.java @@ -0,0 +1,761 @@ +/* + * 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.discoveryengine.v1beta; + +import static com.google.cloud.discoveryengine.v1beta.LicenseConfigServiceClient.ListLicenseConfigsPagedResponse; + +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.testing.LocalChannelProvider; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.api.gax.grpc.testing.MockServiceHelper; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.common.collect.Lists; +import com.google.protobuf.AbstractMessage; +import com.google.protobuf.FieldMask; +import com.google.type.Date; +import io.grpc.StatusRuntimeException; +import java.io.IOException; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import javax.annotation.Generated; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@Generated("by gapic-generator-java") +public class LicenseConfigServiceClientTest { + private static MockLicenseConfigService mockLicenseConfigService; + private static MockLocations mockLocations; + private static MockServiceHelper mockServiceHelper; + private LocalChannelProvider channelProvider; + private LicenseConfigServiceClient client; + + @BeforeClass + public static void startStaticServer() { + mockLicenseConfigService = new MockLicenseConfigService(); + mockLocations = new MockLocations(); + mockServiceHelper = + new MockServiceHelper( + UUID.randomUUID().toString(), + Arrays.asList(mockLicenseConfigService, mockLocations)); + mockServiceHelper.start(); + } + + @AfterClass + public static void stopServer() { + mockServiceHelper.stop(); + } + + @Before + public void setUp() throws IOException { + mockServiceHelper.reset(); + channelProvider = mockServiceHelper.createChannelProvider(); + LicenseConfigServiceSettings settings = + LicenseConfigServiceSettings.newBuilder() + .setTransportChannelProvider(channelProvider) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = LicenseConfigServiceClient.create(settings); + } + + @After + public void tearDown() throws Exception { + client.close(); + } + + @Test + public void createLicenseConfigTest() throws Exception { + LicenseConfig expectedResponse = + LicenseConfig.newBuilder() + .setName(LicenseConfigName.of("[PROJECT]", "[LOCATION]", "[LICENSE_CONFIG]").toString()) + .setLicenseCount(-1565113455) + .setSubscriptionTier(SubscriptionTier.forNumber(0)) + .setAutoRenew(true) + .setStartDate(Date.newBuilder().build()) + .setEndDate(Date.newBuilder().build()) + .setSubscriptionTerm(SubscriptionTerm.forNumber(0)) + .setFreeTrial(true) + .setGeminiBundle(true) + .setEarlyTerminated(true) + .setEarlyTerminationDate(Date.newBuilder().build()) + .build(); + mockLicenseConfigService.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + LicenseConfig licenseConfig = LicenseConfig.newBuilder().build(); + String licenseConfigId = "licenseConfigId-372057250"; + + LicenseConfig actualResponse = + client.createLicenseConfig(parent, licenseConfig, licenseConfigId); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockLicenseConfigService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateLicenseConfigRequest actualRequest = ((CreateLicenseConfigRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(licenseConfig, actualRequest.getLicenseConfig()); + Assert.assertEquals(licenseConfigId, actualRequest.getLicenseConfigId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createLicenseConfigExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockLicenseConfigService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + LicenseConfig licenseConfig = LicenseConfig.newBuilder().build(); + String licenseConfigId = "licenseConfigId-372057250"; + client.createLicenseConfig(parent, licenseConfig, licenseConfigId); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createLicenseConfigTest2() throws Exception { + LicenseConfig expectedResponse = + LicenseConfig.newBuilder() + .setName(LicenseConfigName.of("[PROJECT]", "[LOCATION]", "[LICENSE_CONFIG]").toString()) + .setLicenseCount(-1565113455) + .setSubscriptionTier(SubscriptionTier.forNumber(0)) + .setAutoRenew(true) + .setStartDate(Date.newBuilder().build()) + .setEndDate(Date.newBuilder().build()) + .setSubscriptionTerm(SubscriptionTerm.forNumber(0)) + .setFreeTrial(true) + .setGeminiBundle(true) + .setEarlyTerminated(true) + .setEarlyTerminationDate(Date.newBuilder().build()) + .build(); + mockLicenseConfigService.addResponse(expectedResponse); + + String parent = "parent-995424086"; + LicenseConfig licenseConfig = LicenseConfig.newBuilder().build(); + String licenseConfigId = "licenseConfigId-372057250"; + + LicenseConfig actualResponse = + client.createLicenseConfig(parent, licenseConfig, licenseConfigId); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockLicenseConfigService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateLicenseConfigRequest actualRequest = ((CreateLicenseConfigRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(licenseConfig, actualRequest.getLicenseConfig()); + Assert.assertEquals(licenseConfigId, actualRequest.getLicenseConfigId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createLicenseConfigExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockLicenseConfigService.addException(exception); + + try { + String parent = "parent-995424086"; + LicenseConfig licenseConfig = LicenseConfig.newBuilder().build(); + String licenseConfigId = "licenseConfigId-372057250"; + client.createLicenseConfig(parent, licenseConfig, licenseConfigId); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updateLicenseConfigTest() throws Exception { + LicenseConfig expectedResponse = + LicenseConfig.newBuilder() + .setName(LicenseConfigName.of("[PROJECT]", "[LOCATION]", "[LICENSE_CONFIG]").toString()) + .setLicenseCount(-1565113455) + .setSubscriptionTier(SubscriptionTier.forNumber(0)) + .setAutoRenew(true) + .setStartDate(Date.newBuilder().build()) + .setEndDate(Date.newBuilder().build()) + .setSubscriptionTerm(SubscriptionTerm.forNumber(0)) + .setFreeTrial(true) + .setGeminiBundle(true) + .setEarlyTerminated(true) + .setEarlyTerminationDate(Date.newBuilder().build()) + .build(); + mockLicenseConfigService.addResponse(expectedResponse); + + LicenseConfig licenseConfig = LicenseConfig.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + LicenseConfig actualResponse = client.updateLicenseConfig(licenseConfig, updateMask); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockLicenseConfigService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateLicenseConfigRequest actualRequest = ((UpdateLicenseConfigRequest) actualRequests.get(0)); + + Assert.assertEquals(licenseConfig, actualRequest.getLicenseConfig()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updateLicenseConfigExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockLicenseConfigService.addException(exception); + + try { + LicenseConfig licenseConfig = LicenseConfig.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateLicenseConfig(licenseConfig, updateMask); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getLicenseConfigTest() throws Exception { + LicenseConfig expectedResponse = + LicenseConfig.newBuilder() + .setName(LicenseConfigName.of("[PROJECT]", "[LOCATION]", "[LICENSE_CONFIG]").toString()) + .setLicenseCount(-1565113455) + .setSubscriptionTier(SubscriptionTier.forNumber(0)) + .setAutoRenew(true) + .setStartDate(Date.newBuilder().build()) + .setEndDate(Date.newBuilder().build()) + .setSubscriptionTerm(SubscriptionTerm.forNumber(0)) + .setFreeTrial(true) + .setGeminiBundle(true) + .setEarlyTerminated(true) + .setEarlyTerminationDate(Date.newBuilder().build()) + .build(); + mockLicenseConfigService.addResponse(expectedResponse); + + LicenseConfigName name = LicenseConfigName.of("[PROJECT]", "[LOCATION]", "[LICENSE_CONFIG]"); + + LicenseConfig actualResponse = client.getLicenseConfig(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockLicenseConfigService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetLicenseConfigRequest actualRequest = ((GetLicenseConfigRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getLicenseConfigExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockLicenseConfigService.addException(exception); + + try { + LicenseConfigName name = LicenseConfigName.of("[PROJECT]", "[LOCATION]", "[LICENSE_CONFIG]"); + client.getLicenseConfig(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getLicenseConfigTest2() throws Exception { + LicenseConfig expectedResponse = + LicenseConfig.newBuilder() + .setName(LicenseConfigName.of("[PROJECT]", "[LOCATION]", "[LICENSE_CONFIG]").toString()) + .setLicenseCount(-1565113455) + .setSubscriptionTier(SubscriptionTier.forNumber(0)) + .setAutoRenew(true) + .setStartDate(Date.newBuilder().build()) + .setEndDate(Date.newBuilder().build()) + .setSubscriptionTerm(SubscriptionTerm.forNumber(0)) + .setFreeTrial(true) + .setGeminiBundle(true) + .setEarlyTerminated(true) + .setEarlyTerminationDate(Date.newBuilder().build()) + .build(); + mockLicenseConfigService.addResponse(expectedResponse); + + String name = "name3373707"; + + LicenseConfig actualResponse = client.getLicenseConfig(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockLicenseConfigService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetLicenseConfigRequest actualRequest = ((GetLicenseConfigRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getLicenseConfigExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockLicenseConfigService.addException(exception); + + try { + String name = "name3373707"; + client.getLicenseConfig(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listLicenseConfigsTest() throws Exception { + LicenseConfig responsesElement = LicenseConfig.newBuilder().build(); + ListLicenseConfigsResponse expectedResponse = + ListLicenseConfigsResponse.newBuilder() + .setNextPageToken("") + .addAllLicenseConfigs(Arrays.asList(responsesElement)) + .build(); + mockLicenseConfigService.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListLicenseConfigsPagedResponse pagedListResponse = client.listLicenseConfigs(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getLicenseConfigsList().get(0), resources.get(0)); + + List actualRequests = mockLicenseConfigService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListLicenseConfigsRequest actualRequest = ((ListLicenseConfigsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listLicenseConfigsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockLicenseConfigService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.listLicenseConfigs(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listLicenseConfigsTest2() throws Exception { + LicenseConfig responsesElement = LicenseConfig.newBuilder().build(); + ListLicenseConfigsResponse expectedResponse = + ListLicenseConfigsResponse.newBuilder() + .setNextPageToken("") + .addAllLicenseConfigs(Arrays.asList(responsesElement)) + .build(); + mockLicenseConfigService.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListLicenseConfigsPagedResponse pagedListResponse = client.listLicenseConfigs(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getLicenseConfigsList().get(0), resources.get(0)); + + List actualRequests = mockLicenseConfigService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListLicenseConfigsRequest actualRequest = ((ListLicenseConfigsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listLicenseConfigsExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockLicenseConfigService.addException(exception); + + try { + String parent = "parent-995424086"; + client.listLicenseConfigs(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void distributeLicenseConfigTest() throws Exception { + DistributeLicenseConfigResponse expectedResponse = + DistributeLicenseConfigResponse.newBuilder() + .setLicenseConfig(LicenseConfig.newBuilder().build()) + .build(); + mockLicenseConfigService.addResponse(expectedResponse); + + BillingAccountLicenseConfigName billingAccountLicenseConfig = + BillingAccountLicenseConfigName.of("[BILLING_ACCOUNT]", "[BILLING_ACCOUNT_LICENSE_CONFIG]"); + long projectNumber = 828084015; + String location = "location1901043637"; + long licenseCount = -1565113455; + String licenseConfigId = "licenseConfigId-372057250"; + + DistributeLicenseConfigResponse actualResponse = + client.distributeLicenseConfig( + billingAccountLicenseConfig, projectNumber, location, licenseCount, licenseConfigId); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockLicenseConfigService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DistributeLicenseConfigRequest actualRequest = + ((DistributeLicenseConfigRequest) actualRequests.get(0)); + + Assert.assertEquals( + billingAccountLicenseConfig.toString(), actualRequest.getBillingAccountLicenseConfig()); + Assert.assertEquals(projectNumber, actualRequest.getProjectNumber()); + Assert.assertEquals(location, actualRequest.getLocation()); + Assert.assertEquals(licenseCount, actualRequest.getLicenseCount()); + Assert.assertEquals(licenseConfigId, actualRequest.getLicenseConfigId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void distributeLicenseConfigExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockLicenseConfigService.addException(exception); + + try { + BillingAccountLicenseConfigName billingAccountLicenseConfig = + BillingAccountLicenseConfigName.of( + "[BILLING_ACCOUNT]", "[BILLING_ACCOUNT_LICENSE_CONFIG]"); + long projectNumber = 828084015; + String location = "location1901043637"; + long licenseCount = -1565113455; + String licenseConfigId = "licenseConfigId-372057250"; + client.distributeLicenseConfig( + billingAccountLicenseConfig, projectNumber, location, licenseCount, licenseConfigId); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void distributeLicenseConfigTest2() throws Exception { + DistributeLicenseConfigResponse expectedResponse = + DistributeLicenseConfigResponse.newBuilder() + .setLicenseConfig(LicenseConfig.newBuilder().build()) + .build(); + mockLicenseConfigService.addResponse(expectedResponse); + + String billingAccountLicenseConfig = "billingAccountLicenseConfig474063057"; + long projectNumber = 828084015; + String location = "location1901043637"; + long licenseCount = -1565113455; + String licenseConfigId = "licenseConfigId-372057250"; + + DistributeLicenseConfigResponse actualResponse = + client.distributeLicenseConfig( + billingAccountLicenseConfig, projectNumber, location, licenseCount, licenseConfigId); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockLicenseConfigService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DistributeLicenseConfigRequest actualRequest = + ((DistributeLicenseConfigRequest) actualRequests.get(0)); + + Assert.assertEquals( + billingAccountLicenseConfig, actualRequest.getBillingAccountLicenseConfig()); + Assert.assertEquals(projectNumber, actualRequest.getProjectNumber()); + Assert.assertEquals(location, actualRequest.getLocation()); + Assert.assertEquals(licenseCount, actualRequest.getLicenseCount()); + Assert.assertEquals(licenseConfigId, actualRequest.getLicenseConfigId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void distributeLicenseConfigExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockLicenseConfigService.addException(exception); + + try { + String billingAccountLicenseConfig = "billingAccountLicenseConfig474063057"; + long projectNumber = 828084015; + String location = "location1901043637"; + long licenseCount = -1565113455; + String licenseConfigId = "licenseConfigId-372057250"; + client.distributeLicenseConfig( + billingAccountLicenseConfig, projectNumber, location, licenseCount, licenseConfigId); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void retractLicenseConfigTest() throws Exception { + RetractLicenseConfigResponse expectedResponse = + RetractLicenseConfigResponse.newBuilder() + .setLicenseConfig(LicenseConfig.newBuilder().build()) + .build(); + mockLicenseConfigService.addResponse(expectedResponse); + + BillingAccountLicenseConfigName billingAccountLicenseConfig = + BillingAccountLicenseConfigName.of("[BILLING_ACCOUNT]", "[BILLING_ACCOUNT_LICENSE_CONFIG]"); + LicenseConfigName licenseConfig = + LicenseConfigName.of("[PROJECT]", "[LOCATION]", "[LICENSE_CONFIG]"); + boolean fullRetract = true; + long licenseCount = -1565113455; + + RetractLicenseConfigResponse actualResponse = + client.retractLicenseConfig( + billingAccountLicenseConfig, licenseConfig, fullRetract, licenseCount); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockLicenseConfigService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + RetractLicenseConfigRequest actualRequest = + ((RetractLicenseConfigRequest) actualRequests.get(0)); + + Assert.assertEquals( + billingAccountLicenseConfig.toString(), actualRequest.getBillingAccountLicenseConfig()); + Assert.assertEquals(licenseConfig.toString(), actualRequest.getLicenseConfig()); + Assert.assertEquals(fullRetract, actualRequest.getFullRetract()); + Assert.assertEquals(licenseCount, actualRequest.getLicenseCount()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void retractLicenseConfigExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockLicenseConfigService.addException(exception); + + try { + BillingAccountLicenseConfigName billingAccountLicenseConfig = + BillingAccountLicenseConfigName.of( + "[BILLING_ACCOUNT]", "[BILLING_ACCOUNT_LICENSE_CONFIG]"); + LicenseConfigName licenseConfig = + LicenseConfigName.of("[PROJECT]", "[LOCATION]", "[LICENSE_CONFIG]"); + boolean fullRetract = true; + long licenseCount = -1565113455; + client.retractLicenseConfig( + billingAccountLicenseConfig, licenseConfig, fullRetract, licenseCount); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void retractLicenseConfigTest2() throws Exception { + RetractLicenseConfigResponse expectedResponse = + RetractLicenseConfigResponse.newBuilder() + .setLicenseConfig(LicenseConfig.newBuilder().build()) + .build(); + mockLicenseConfigService.addResponse(expectedResponse); + + BillingAccountLicenseConfigName billingAccountLicenseConfig = + BillingAccountLicenseConfigName.of("[BILLING_ACCOUNT]", "[BILLING_ACCOUNT_LICENSE_CONFIG]"); + String licenseConfig = "licenseConfig1939275491"; + boolean fullRetract = true; + long licenseCount = -1565113455; + + RetractLicenseConfigResponse actualResponse = + client.retractLicenseConfig( + billingAccountLicenseConfig, licenseConfig, fullRetract, licenseCount); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockLicenseConfigService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + RetractLicenseConfigRequest actualRequest = + ((RetractLicenseConfigRequest) actualRequests.get(0)); + + Assert.assertEquals( + billingAccountLicenseConfig.toString(), actualRequest.getBillingAccountLicenseConfig()); + Assert.assertEquals(licenseConfig, actualRequest.getLicenseConfig()); + Assert.assertEquals(fullRetract, actualRequest.getFullRetract()); + Assert.assertEquals(licenseCount, actualRequest.getLicenseCount()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void retractLicenseConfigExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockLicenseConfigService.addException(exception); + + try { + BillingAccountLicenseConfigName billingAccountLicenseConfig = + BillingAccountLicenseConfigName.of( + "[BILLING_ACCOUNT]", "[BILLING_ACCOUNT_LICENSE_CONFIG]"); + String licenseConfig = "licenseConfig1939275491"; + boolean fullRetract = true; + long licenseCount = -1565113455; + client.retractLicenseConfig( + billingAccountLicenseConfig, licenseConfig, fullRetract, licenseCount); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void retractLicenseConfigTest3() throws Exception { + RetractLicenseConfigResponse expectedResponse = + RetractLicenseConfigResponse.newBuilder() + .setLicenseConfig(LicenseConfig.newBuilder().build()) + .build(); + mockLicenseConfigService.addResponse(expectedResponse); + + String billingAccountLicenseConfig = "billingAccountLicenseConfig474063057"; + LicenseConfigName licenseConfig = + LicenseConfigName.of("[PROJECT]", "[LOCATION]", "[LICENSE_CONFIG]"); + boolean fullRetract = true; + long licenseCount = -1565113455; + + RetractLicenseConfigResponse actualResponse = + client.retractLicenseConfig( + billingAccountLicenseConfig, licenseConfig, fullRetract, licenseCount); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockLicenseConfigService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + RetractLicenseConfigRequest actualRequest = + ((RetractLicenseConfigRequest) actualRequests.get(0)); + + Assert.assertEquals( + billingAccountLicenseConfig, actualRequest.getBillingAccountLicenseConfig()); + Assert.assertEquals(licenseConfig.toString(), actualRequest.getLicenseConfig()); + Assert.assertEquals(fullRetract, actualRequest.getFullRetract()); + Assert.assertEquals(licenseCount, actualRequest.getLicenseCount()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void retractLicenseConfigExceptionTest3() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockLicenseConfigService.addException(exception); + + try { + String billingAccountLicenseConfig = "billingAccountLicenseConfig474063057"; + LicenseConfigName licenseConfig = + LicenseConfigName.of("[PROJECT]", "[LOCATION]", "[LICENSE_CONFIG]"); + boolean fullRetract = true; + long licenseCount = -1565113455; + client.retractLicenseConfig( + billingAccountLicenseConfig, licenseConfig, fullRetract, licenseCount); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void retractLicenseConfigTest4() throws Exception { + RetractLicenseConfigResponse expectedResponse = + RetractLicenseConfigResponse.newBuilder() + .setLicenseConfig(LicenseConfig.newBuilder().build()) + .build(); + mockLicenseConfigService.addResponse(expectedResponse); + + String billingAccountLicenseConfig = "billingAccountLicenseConfig474063057"; + String licenseConfig = "licenseConfig1939275491"; + boolean fullRetract = true; + long licenseCount = -1565113455; + + RetractLicenseConfigResponse actualResponse = + client.retractLicenseConfig( + billingAccountLicenseConfig, licenseConfig, fullRetract, licenseCount); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockLicenseConfigService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + RetractLicenseConfigRequest actualRequest = + ((RetractLicenseConfigRequest) actualRequests.get(0)); + + Assert.assertEquals( + billingAccountLicenseConfig, actualRequest.getBillingAccountLicenseConfig()); + Assert.assertEquals(licenseConfig, actualRequest.getLicenseConfig()); + Assert.assertEquals(fullRetract, actualRequest.getFullRetract()); + Assert.assertEquals(licenseCount, actualRequest.getLicenseCount()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void retractLicenseConfigExceptionTest4() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockLicenseConfigService.addException(exception); + + try { + String billingAccountLicenseConfig = "billingAccountLicenseConfig474063057"; + String licenseConfig = "licenseConfig1939275491"; + boolean fullRetract = true; + long licenseCount = -1565113455; + client.retractLicenseConfig( + billingAccountLicenseConfig, licenseConfig, fullRetract, licenseCount); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } +} diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1beta/MockAclConfigService.java b/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1beta/MockAclConfigService.java new file mode 100644 index 000000000000..c983f5bc1f46 --- /dev/null +++ b/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1beta/MockAclConfigService.java @@ -0,0 +1,59 @@ +/* + * 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.discoveryengine.v1beta; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.protobuf.AbstractMessage; +import io.grpc.ServerServiceDefinition; +import java.util.List; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockAclConfigService implements MockGrpcService { + private final MockAclConfigServiceImpl serviceImpl; + + public MockAclConfigService() { + serviceImpl = new MockAclConfigServiceImpl(); + } + + @Override + public List getRequests() { + return serviceImpl.getRequests(); + } + + @Override + public void addResponse(AbstractMessage response) { + serviceImpl.addResponse(response); + } + + @Override + public void addException(Exception exception) { + serviceImpl.addException(exception); + } + + @Override + public ServerServiceDefinition getServiceDefinition() { + return serviceImpl.bindService(); + } + + @Override + public void reset() { + serviceImpl.reset(); + } +} diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1beta/MockAclConfigServiceImpl.java b/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1beta/MockAclConfigServiceImpl.java new file mode 100644 index 000000000000..65d04cc072f5 --- /dev/null +++ b/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1beta/MockAclConfigServiceImpl.java @@ -0,0 +1,102 @@ +/* + * 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.discoveryengine.v1beta; + +import com.google.api.core.BetaApi; +import com.google.cloud.discoveryengine.v1beta.AclConfigServiceGrpc.AclConfigServiceImplBase; +import com.google.protobuf.AbstractMessage; +import io.grpc.stub.StreamObserver; +import java.util.ArrayList; +import java.util.LinkedList; +import java.util.List; +import java.util.Queue; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockAclConfigServiceImpl extends AclConfigServiceImplBase { + private List requests; + private Queue responses; + + public MockAclConfigServiceImpl() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + public List getRequests() { + return requests; + } + + public void addResponse(AbstractMessage response) { + responses.add(response); + } + + public void setResponses(List responses) { + this.responses = new LinkedList(responses); + } + + public void addException(Exception exception) { + responses.add(exception); + } + + public void reset() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + @Override + public void updateAclConfig( + UpdateAclConfigRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof AclConfig) { + requests.add(request); + responseObserver.onNext(((AclConfig) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method UpdateAclConfig, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + AclConfig.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getAclConfig( + GetAclConfigRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof AclConfig) { + requests.add(request); + responseObserver.onNext(((AclConfig) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetAclConfig, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + AclConfig.class.getName(), + Exception.class.getName()))); + } + } +} diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1beta/MockAssistantService.java b/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1beta/MockAssistantService.java new file mode 100644 index 000000000000..9c9942dd9b54 --- /dev/null +++ b/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1beta/MockAssistantService.java @@ -0,0 +1,59 @@ +/* + * 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.discoveryengine.v1beta; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.protobuf.AbstractMessage; +import io.grpc.ServerServiceDefinition; +import java.util.List; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockAssistantService implements MockGrpcService { + private final MockAssistantServiceImpl serviceImpl; + + public MockAssistantService() { + serviceImpl = new MockAssistantServiceImpl(); + } + + @Override + public List getRequests() { + return serviceImpl.getRequests(); + } + + @Override + public void addResponse(AbstractMessage response) { + serviceImpl.addResponse(response); + } + + @Override + public void addException(Exception exception) { + serviceImpl.addException(exception); + } + + @Override + public ServerServiceDefinition getServiceDefinition() { + return serviceImpl.bindService(); + } + + @Override + public void reset() { + serviceImpl.reset(); + } +} diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1beta/MockAssistantServiceImpl.java b/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1beta/MockAssistantServiceImpl.java new file mode 100644 index 000000000000..5a3e7663a590 --- /dev/null +++ b/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1beta/MockAssistantServiceImpl.java @@ -0,0 +1,187 @@ +/* + * 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.discoveryengine.v1beta; + +import com.google.api.core.BetaApi; +import com.google.cloud.discoveryengine.v1beta.AssistantServiceGrpc.AssistantServiceImplBase; +import com.google.protobuf.AbstractMessage; +import com.google.protobuf.Empty; +import io.grpc.stub.StreamObserver; +import java.util.ArrayList; +import java.util.LinkedList; +import java.util.List; +import java.util.Queue; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockAssistantServiceImpl extends AssistantServiceImplBase { + private List requests; + private Queue responses; + + public MockAssistantServiceImpl() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + public List getRequests() { + return requests; + } + + public void addResponse(AbstractMessage response) { + responses.add(response); + } + + public void setResponses(List responses) { + this.responses = new LinkedList(responses); + } + + public void addException(Exception exception) { + responses.add(exception); + } + + public void reset() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + @Override + public void streamAssist( + StreamAssistRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof StreamAssistResponse) { + requests.add(request); + responseObserver.onNext(((StreamAssistResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method StreamAssist, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + StreamAssistResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void createAssistant( + CreateAssistantRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Assistant) { + requests.add(request); + responseObserver.onNext(((Assistant) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method CreateAssistant, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Assistant.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void deleteAssistant( + DeleteAssistantRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Empty) { + requests.add(request); + responseObserver.onNext(((Empty) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method DeleteAssistant, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Empty.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void updateAssistant( + UpdateAssistantRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Assistant) { + requests.add(request); + responseObserver.onNext(((Assistant) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method UpdateAssistant, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Assistant.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getAssistant( + GetAssistantRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Assistant) { + requests.add(request); + responseObserver.onNext(((Assistant) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetAssistant, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Assistant.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listAssistants( + ListAssistantsRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListAssistantsResponse) { + requests.add(request); + responseObserver.onNext(((ListAssistantsResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListAssistants, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListAssistantsResponse.class.getName(), + Exception.class.getName()))); + } + } +} diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1beta/MockCmekConfigService.java b/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1beta/MockCmekConfigService.java new file mode 100644 index 000000000000..96fa80f02332 --- /dev/null +++ b/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1beta/MockCmekConfigService.java @@ -0,0 +1,59 @@ +/* + * 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.discoveryengine.v1beta; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.protobuf.AbstractMessage; +import io.grpc.ServerServiceDefinition; +import java.util.List; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockCmekConfigService implements MockGrpcService { + private final MockCmekConfigServiceImpl serviceImpl; + + public MockCmekConfigService() { + serviceImpl = new MockCmekConfigServiceImpl(); + } + + @Override + public List getRequests() { + return serviceImpl.getRequests(); + } + + @Override + public void addResponse(AbstractMessage response) { + serviceImpl.addResponse(response); + } + + @Override + public void addException(Exception exception) { + serviceImpl.addException(exception); + } + + @Override + public ServerServiceDefinition getServiceDefinition() { + return serviceImpl.bindService(); + } + + @Override + public void reset() { + serviceImpl.reset(); + } +} diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1beta/MockCmekConfigServiceImpl.java b/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1beta/MockCmekConfigServiceImpl.java new file mode 100644 index 000000000000..d3ef9088d6d7 --- /dev/null +++ b/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1beta/MockCmekConfigServiceImpl.java @@ -0,0 +1,145 @@ +/* + * 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.discoveryengine.v1beta; + +import com.google.api.core.BetaApi; +import com.google.cloud.discoveryengine.v1beta.CmekConfigServiceGrpc.CmekConfigServiceImplBase; +import com.google.longrunning.Operation; +import com.google.protobuf.AbstractMessage; +import io.grpc.stub.StreamObserver; +import java.util.ArrayList; +import java.util.LinkedList; +import java.util.List; +import java.util.Queue; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockCmekConfigServiceImpl extends CmekConfigServiceImplBase { + private List requests; + private Queue responses; + + public MockCmekConfigServiceImpl() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + public List getRequests() { + return requests; + } + + public void addResponse(AbstractMessage response) { + responses.add(response); + } + + public void setResponses(List responses) { + this.responses = new LinkedList(responses); + } + + public void addException(Exception exception) { + responses.add(exception); + } + + public void reset() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + @Override + public void updateCmekConfig( + UpdateCmekConfigRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method UpdateCmekConfig, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getCmekConfig( + GetCmekConfigRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof CmekConfig) { + requests.add(request); + responseObserver.onNext(((CmekConfig) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetCmekConfig, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + CmekConfig.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listCmekConfigs( + ListCmekConfigsRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListCmekConfigsResponse) { + requests.add(request); + responseObserver.onNext(((ListCmekConfigsResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListCmekConfigs, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListCmekConfigsResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void deleteCmekConfig( + DeleteCmekConfigRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method DeleteCmekConfig, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } +} diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1beta/MockCompletionServiceImpl.java b/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1beta/MockCompletionServiceImpl.java index 860e9d4bb9b6..44513226de14 100644 --- a/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1beta/MockCompletionServiceImpl.java +++ b/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1beta/MockCompletionServiceImpl.java @@ -190,4 +190,25 @@ public void purgeCompletionSuggestions( Exception.class.getName()))); } } + + @Override + public void removeSuggestion( + RemoveSuggestionRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof RemoveSuggestionResponse) { + requests.add(request); + responseObserver.onNext(((RemoveSuggestionResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method RemoveSuggestion, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + RemoveSuggestionResponse.class.getName(), + Exception.class.getName()))); + } + } } diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1beta/MockConversationalSearchServiceImpl.java b/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1beta/MockConversationalSearchServiceImpl.java index 8c1f156065e6..415562828411 100644 --- a/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1beta/MockConversationalSearchServiceImpl.java +++ b/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1beta/MockConversationalSearchServiceImpl.java @@ -209,6 +209,27 @@ public void answerQuery( } } + @Override + public void streamAnswerQuery( + AnswerQueryRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof AnswerQueryResponse) { + requests.add(request); + responseObserver.onNext(((AnswerQueryResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method StreamAnswerQuery, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + AnswerQueryResponse.class.getName(), + Exception.class.getName()))); + } + } + @Override public void getAnswer(GetAnswerRequest request, StreamObserver responseObserver) { Object response = responses.poll(); diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1beta/MockEngineServiceImpl.java b/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1beta/MockEngineServiceImpl.java index 799f96a519de..440466b8c42a 100644 --- a/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1beta/MockEngineServiceImpl.java +++ b/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1beta/MockEngineServiceImpl.java @@ -18,6 +18,9 @@ import com.google.api.core.BetaApi; import com.google.cloud.discoveryengine.v1beta.EngineServiceGrpc.EngineServiceImplBase; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; import com.google.longrunning.Operation; import com.google.protobuf.AbstractMessage; import io.grpc.stub.StreamObserver; @@ -221,4 +224,44 @@ public void tuneEngine(TuneEngineRequest request, StreamObserver resp Exception.class.getName()))); } } + + @Override + public void getIamPolicy(GetIamPolicyRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Policy) { + requests.add(request); + responseObserver.onNext(((Policy) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetIamPolicy, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Policy.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void setIamPolicy(SetIamPolicyRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Policy) { + requests.add(request); + responseObserver.onNext(((Policy) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method SetIamPolicy, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Policy.class.getName(), + Exception.class.getName()))); + } + } } diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1beta/MockIdentityMappingStoreService.java b/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1beta/MockIdentityMappingStoreService.java new file mode 100644 index 000000000000..99c368735049 --- /dev/null +++ b/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1beta/MockIdentityMappingStoreService.java @@ -0,0 +1,59 @@ +/* + * 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.discoveryengine.v1beta; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.protobuf.AbstractMessage; +import io.grpc.ServerServiceDefinition; +import java.util.List; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockIdentityMappingStoreService implements MockGrpcService { + private final MockIdentityMappingStoreServiceImpl serviceImpl; + + public MockIdentityMappingStoreService() { + serviceImpl = new MockIdentityMappingStoreServiceImpl(); + } + + @Override + public List getRequests() { + return serviceImpl.getRequests(); + } + + @Override + public void addResponse(AbstractMessage response) { + serviceImpl.addResponse(response); + } + + @Override + public void addException(Exception exception) { + serviceImpl.addException(exception); + } + + @Override + public ServerServiceDefinition getServiceDefinition() { + return serviceImpl.bindService(); + } + + @Override + public void reset() { + serviceImpl.reset(); + } +} diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1beta/MockIdentityMappingStoreServiceImpl.java b/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1beta/MockIdentityMappingStoreServiceImpl.java new file mode 100644 index 000000000000..84d16bb640fe --- /dev/null +++ b/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1beta/MockIdentityMappingStoreServiceImpl.java @@ -0,0 +1,219 @@ +/* + * 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.discoveryengine.v1beta; + +import com.google.api.core.BetaApi; +import com.google.cloud.discoveryengine.v1beta.IdentityMappingStoreServiceGrpc.IdentityMappingStoreServiceImplBase; +import com.google.longrunning.Operation; +import com.google.protobuf.AbstractMessage; +import io.grpc.stub.StreamObserver; +import java.util.ArrayList; +import java.util.LinkedList; +import java.util.List; +import java.util.Queue; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockIdentityMappingStoreServiceImpl extends IdentityMappingStoreServiceImplBase { + private List requests; + private Queue responses; + + public MockIdentityMappingStoreServiceImpl() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + public List getRequests() { + return requests; + } + + public void addResponse(AbstractMessage response) { + responses.add(response); + } + + public void setResponses(List responses) { + this.responses = new LinkedList(responses); + } + + public void addException(Exception exception) { + responses.add(exception); + } + + public void reset() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + @Override + public void createIdentityMappingStore( + CreateIdentityMappingStoreRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof IdentityMappingStore) { + requests.add(request); + responseObserver.onNext(((IdentityMappingStore) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method CreateIdentityMappingStore, expected %s" + + " or %s", + response == null ? "null" : response.getClass().getName(), + IdentityMappingStore.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getIdentityMappingStore( + GetIdentityMappingStoreRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof IdentityMappingStore) { + requests.add(request); + responseObserver.onNext(((IdentityMappingStore) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetIdentityMappingStore, expected %s or" + + " %s", + response == null ? "null" : response.getClass().getName(), + IdentityMappingStore.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void deleteIdentityMappingStore( + DeleteIdentityMappingStoreRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method DeleteIdentityMappingStore, expected %s" + + " or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void importIdentityMappings( + ImportIdentityMappingsRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ImportIdentityMappings, expected %s or" + + " %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void purgeIdentityMappings( + PurgeIdentityMappingsRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method PurgeIdentityMappings, expected %s or" + + " %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listIdentityMappings( + ListIdentityMappingsRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListIdentityMappingsResponse) { + requests.add(request); + responseObserver.onNext(((ListIdentityMappingsResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListIdentityMappings, expected %s or" + + " %s", + response == null ? "null" : response.getClass().getName(), + ListIdentityMappingsResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listIdentityMappingStores( + ListIdentityMappingStoresRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListIdentityMappingStoresResponse) { + requests.add(request); + responseObserver.onNext(((ListIdentityMappingStoresResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListIdentityMappingStores, expected %s" + + " or %s", + response == null ? "null" : response.getClass().getName(), + ListIdentityMappingStoresResponse.class.getName(), + Exception.class.getName()))); + } + } +} diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1beta/MockLicenseConfigService.java b/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1beta/MockLicenseConfigService.java new file mode 100644 index 000000000000..4fccf68e5c74 --- /dev/null +++ b/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1beta/MockLicenseConfigService.java @@ -0,0 +1,59 @@ +/* + * 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.discoveryengine.v1beta; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.protobuf.AbstractMessage; +import io.grpc.ServerServiceDefinition; +import java.util.List; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockLicenseConfigService implements MockGrpcService { + private final MockLicenseConfigServiceImpl serviceImpl; + + public MockLicenseConfigService() { + serviceImpl = new MockLicenseConfigServiceImpl(); + } + + @Override + public List getRequests() { + return serviceImpl.getRequests(); + } + + @Override + public void addResponse(AbstractMessage response) { + serviceImpl.addResponse(response); + } + + @Override + public void addException(Exception exception) { + serviceImpl.addException(exception); + } + + @Override + public ServerServiceDefinition getServiceDefinition() { + return serviceImpl.bindService(); + } + + @Override + public void reset() { + serviceImpl.reset(); + } +} diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1beta/MockLicenseConfigServiceImpl.java b/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1beta/MockLicenseConfigServiceImpl.java new file mode 100644 index 000000000000..464929c30945 --- /dev/null +++ b/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1beta/MockLicenseConfigServiceImpl.java @@ -0,0 +1,191 @@ +/* + * 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.discoveryengine.v1beta; + +import com.google.api.core.BetaApi; +import com.google.cloud.discoveryengine.v1beta.LicenseConfigServiceGrpc.LicenseConfigServiceImplBase; +import com.google.protobuf.AbstractMessage; +import io.grpc.stub.StreamObserver; +import java.util.ArrayList; +import java.util.LinkedList; +import java.util.List; +import java.util.Queue; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockLicenseConfigServiceImpl extends LicenseConfigServiceImplBase { + private List requests; + private Queue responses; + + public MockLicenseConfigServiceImpl() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + public List getRequests() { + return requests; + } + + public void addResponse(AbstractMessage response) { + responses.add(response); + } + + public void setResponses(List responses) { + this.responses = new LinkedList(responses); + } + + public void addException(Exception exception) { + responses.add(exception); + } + + public void reset() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + @Override + public void createLicenseConfig( + CreateLicenseConfigRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof LicenseConfig) { + requests.add(request); + responseObserver.onNext(((LicenseConfig) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method CreateLicenseConfig, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + LicenseConfig.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void updateLicenseConfig( + UpdateLicenseConfigRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof LicenseConfig) { + requests.add(request); + responseObserver.onNext(((LicenseConfig) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method UpdateLicenseConfig, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + LicenseConfig.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getLicenseConfig( + GetLicenseConfigRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof LicenseConfig) { + requests.add(request); + responseObserver.onNext(((LicenseConfig) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetLicenseConfig, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + LicenseConfig.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listLicenseConfigs( + ListLicenseConfigsRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListLicenseConfigsResponse) { + requests.add(request); + responseObserver.onNext(((ListLicenseConfigsResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListLicenseConfigs, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListLicenseConfigsResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void distributeLicenseConfig( + DistributeLicenseConfigRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof DistributeLicenseConfigResponse) { + requests.add(request); + responseObserver.onNext(((DistributeLicenseConfigResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method DistributeLicenseConfig, expected %s or" + + " %s", + response == null ? "null" : response.getClass().getName(), + DistributeLicenseConfigResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void retractLicenseConfig( + RetractLicenseConfigRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof RetractLicenseConfigResponse) { + requests.add(request); + responseObserver.onNext(((RetractLicenseConfigResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method RetractLicenseConfig, expected %s or" + + " %s", + response == null ? "null" : response.getClass().getName(), + RetractLicenseConfigResponse.class.getName(), + Exception.class.getName()))); + } + } +} diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1beta/MockServingConfigServiceImpl.java b/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1beta/MockServingConfigServiceImpl.java index f7e6a17c0b9d..bafb0206d3ef 100644 --- a/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1beta/MockServingConfigServiceImpl.java +++ b/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1beta/MockServingConfigServiceImpl.java @@ -19,6 +19,7 @@ import com.google.api.core.BetaApi; import com.google.cloud.discoveryengine.v1beta.ServingConfigServiceGrpc.ServingConfigServiceImplBase; import com.google.protobuf.AbstractMessage; +import com.google.protobuf.Empty; import io.grpc.stub.StreamObserver; import java.util.ArrayList; import java.util.LinkedList; @@ -58,6 +59,48 @@ public void reset() { responses = new LinkedList<>(); } + @Override + public void createServingConfig( + CreateServingConfigRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ServingConfig) { + requests.add(request); + responseObserver.onNext(((ServingConfig) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method CreateServingConfig, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ServingConfig.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void deleteServingConfig( + DeleteServingConfigRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Empty) { + requests.add(request); + responseObserver.onNext(((Empty) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method DeleteServingConfig, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Empty.class.getName(), + Exception.class.getName()))); + } + } + @Override public void updateServingConfig( UpdateServingConfigRequest request, StreamObserver responseObserver) { diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1beta/MockUserLicenseService.java b/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1beta/MockUserLicenseService.java new file mode 100644 index 000000000000..411a9d74b331 --- /dev/null +++ b/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1beta/MockUserLicenseService.java @@ -0,0 +1,59 @@ +/* + * 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.discoveryengine.v1beta; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.protobuf.AbstractMessage; +import io.grpc.ServerServiceDefinition; +import java.util.List; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockUserLicenseService implements MockGrpcService { + private final MockUserLicenseServiceImpl serviceImpl; + + public MockUserLicenseService() { + serviceImpl = new MockUserLicenseServiceImpl(); + } + + @Override + public List getRequests() { + return serviceImpl.getRequests(); + } + + @Override + public void addResponse(AbstractMessage response) { + serviceImpl.addResponse(response); + } + + @Override + public void addException(Exception exception) { + serviceImpl.addException(exception); + } + + @Override + public ServerServiceDefinition getServiceDefinition() { + return serviceImpl.bindService(); + } + + @Override + public void reset() { + serviceImpl.reset(); + } +} diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1beta/MockUserLicenseServiceImpl.java b/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1beta/MockUserLicenseServiceImpl.java new file mode 100644 index 000000000000..d9fa3803f80e --- /dev/null +++ b/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1beta/MockUserLicenseServiceImpl.java @@ -0,0 +1,127 @@ +/* + * 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.discoveryengine.v1beta; + +import com.google.api.core.BetaApi; +import com.google.cloud.discoveryengine.v1beta.UserLicenseServiceGrpc.UserLicenseServiceImplBase; +import com.google.longrunning.Operation; +import com.google.protobuf.AbstractMessage; +import io.grpc.stub.StreamObserver; +import java.util.ArrayList; +import java.util.LinkedList; +import java.util.List; +import java.util.Queue; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockUserLicenseServiceImpl extends UserLicenseServiceImplBase { + private List requests; + private Queue responses; + + public MockUserLicenseServiceImpl() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + public List getRequests() { + return requests; + } + + public void addResponse(AbstractMessage response) { + responses.add(response); + } + + public void setResponses(List responses) { + this.responses = new LinkedList(responses); + } + + public void addException(Exception exception) { + responses.add(exception); + } + + public void reset() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + @Override + public void listUserLicenses( + ListUserLicensesRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListUserLicensesResponse) { + requests.add(request); + responseObserver.onNext(((ListUserLicensesResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListUserLicenses, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListUserLicensesResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listLicenseConfigsUsageStats( + ListLicenseConfigsUsageStatsRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListLicenseConfigsUsageStatsResponse) { + requests.add(request); + responseObserver.onNext(((ListLicenseConfigsUsageStatsResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListLicenseConfigsUsageStats, expected" + + " %s or %s", + response == null ? "null" : response.getClass().getName(), + ListLicenseConfigsUsageStatsResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void batchUpdateUserLicenses( + BatchUpdateUserLicensesRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method BatchUpdateUserLicenses, expected %s or" + + " %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } +} diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1beta/MockUserStoreService.java b/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1beta/MockUserStoreService.java new file mode 100644 index 000000000000..7e7b694ff4de --- /dev/null +++ b/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1beta/MockUserStoreService.java @@ -0,0 +1,59 @@ +/* + * 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.discoveryengine.v1beta; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.protobuf.AbstractMessage; +import io.grpc.ServerServiceDefinition; +import java.util.List; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockUserStoreService implements MockGrpcService { + private final MockUserStoreServiceImpl serviceImpl; + + public MockUserStoreService() { + serviceImpl = new MockUserStoreServiceImpl(); + } + + @Override + public List getRequests() { + return serviceImpl.getRequests(); + } + + @Override + public void addResponse(AbstractMessage response) { + serviceImpl.addResponse(response); + } + + @Override + public void addException(Exception exception) { + serviceImpl.addException(exception); + } + + @Override + public ServerServiceDefinition getServiceDefinition() { + return serviceImpl.bindService(); + } + + @Override + public void reset() { + serviceImpl.reset(); + } +} diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1beta/MockUserStoreServiceImpl.java b/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1beta/MockUserStoreServiceImpl.java new file mode 100644 index 000000000000..73803907e7a2 --- /dev/null +++ b/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1beta/MockUserStoreServiceImpl.java @@ -0,0 +1,102 @@ +/* + * 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.discoveryengine.v1beta; + +import com.google.api.core.BetaApi; +import com.google.cloud.discoveryengine.v1beta.UserStoreServiceGrpc.UserStoreServiceImplBase; +import com.google.protobuf.AbstractMessage; +import io.grpc.stub.StreamObserver; +import java.util.ArrayList; +import java.util.LinkedList; +import java.util.List; +import java.util.Queue; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockUserStoreServiceImpl extends UserStoreServiceImplBase { + private List requests; + private Queue responses; + + public MockUserStoreServiceImpl() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + public List getRequests() { + return requests; + } + + public void addResponse(AbstractMessage response) { + responses.add(response); + } + + public void setResponses(List responses) { + this.responses = new LinkedList(responses); + } + + public void addException(Exception exception) { + responses.add(exception); + } + + public void reset() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + @Override + public void getUserStore( + GetUserStoreRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof UserStore) { + requests.add(request); + responseObserver.onNext(((UserStore) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetUserStore, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + UserStore.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void updateUserStore( + UpdateUserStoreRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof UserStore) { + requests.add(request); + responseObserver.onNext(((UserStore) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method UpdateUserStore, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + UserStore.class.getName(), + Exception.class.getName()))); + } + } +} diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1beta/ProjectServiceClientHttpJsonTest.java b/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1beta/ProjectServiceClientHttpJsonTest.java index 4600de1eb7ff..1206740b7917 100644 --- a/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1beta/ProjectServiceClientHttpJsonTest.java +++ b/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1beta/ProjectServiceClientHttpJsonTest.java @@ -83,6 +83,8 @@ public void provisionProjectTest() throws Exception { .setCreateTime(Timestamp.newBuilder().build()) .setProvisionCompletionTime(Timestamp.newBuilder().build()) .putAllServiceTermsMap(new HashMap()) + .setCustomerProvidedConfig(Project.CustomerProvidedConfig.newBuilder().build()) + .setConfigurableBillingStatus(Project.ConfigurableBillingStatus.newBuilder().build()) .build(); Operation resultOperation = Operation.newBuilder() @@ -135,6 +137,8 @@ public void provisionProjectTest2() throws Exception { .setCreateTime(Timestamp.newBuilder().build()) .setProvisionCompletionTime(Timestamp.newBuilder().build()) .putAllServiceTermsMap(new HashMap()) + .setCustomerProvidedConfig(Project.CustomerProvidedConfig.newBuilder().build()) + .setConfigurableBillingStatus(Project.ConfigurableBillingStatus.newBuilder().build()) .build(); Operation resultOperation = Operation.newBuilder() diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1beta/ProjectServiceClientTest.java b/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1beta/ProjectServiceClientTest.java index 4635a0f042bb..dee05e3f9c4d 100644 --- a/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1beta/ProjectServiceClientTest.java +++ b/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1beta/ProjectServiceClientTest.java @@ -92,6 +92,8 @@ public void provisionProjectTest() throws Exception { .setCreateTime(Timestamp.newBuilder().build()) .setProvisionCompletionTime(Timestamp.newBuilder().build()) .putAllServiceTermsMap(new HashMap()) + .setCustomerProvidedConfig(Project.CustomerProvidedConfig.newBuilder().build()) + .setConfigurableBillingStatus(Project.ConfigurableBillingStatus.newBuilder().build()) .build(); Operation resultOperation = Operation.newBuilder() @@ -141,6 +143,8 @@ public void provisionProjectTest2() throws Exception { .setCreateTime(Timestamp.newBuilder().build()) .setProvisionCompletionTime(Timestamp.newBuilder().build()) .putAllServiceTermsMap(new HashMap()) + .setCustomerProvidedConfig(Project.CustomerProvidedConfig.newBuilder().build()) + .setConfigurableBillingStatus(Project.ConfigurableBillingStatus.newBuilder().build()) .build(); Operation resultOperation = Operation.newBuilder() diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1beta/SearchServiceClientHttpJsonTest.java b/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1beta/SearchServiceClientHttpJsonTest.java index d9043388fe2e..55ef42e0a3bc 100644 --- a/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1beta/SearchServiceClientHttpJsonTest.java +++ b/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1beta/SearchServiceClientHttpJsonTest.java @@ -100,12 +100,14 @@ public void searchTest() throws Exception { "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[BRANCH]") .toString()) .setQuery("query107944136") + .addAllPageCategories(new ArrayList()) .setImageQuery(SearchRequest.ImageQuery.newBuilder().build()) .setPageSize(883849137) .setPageToken("pageToken873572522") .setOffset(-1019779949) .setOneBoxPageSize(1988477988) .addAllDataStoreSpecs(new ArrayList()) + .setNumResultsPerDataStore(397658288) .setFilter("filter-1274492040") .setCanonicalFilter("canonicalFilter-722283124") .setOrderBy("orderBy-1207110587") @@ -126,12 +128,19 @@ public void searchTest() throws Exception { .setNaturalLanguageQueryUnderstandingSpec( SearchRequest.NaturalLanguageQueryUnderstandingSpec.newBuilder().build()) .setSearchAsYouTypeSpec(SearchRequest.SearchAsYouTypeSpec.newBuilder().build()) + .setDisplaySpec(SearchRequest.DisplaySpec.newBuilder().build()) + .addAllCrowdingSpecs(new ArrayList()) .setSession( SessionName.ofProjectLocationDataStoreSessionName( "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[SESSION]") .toString()) .setSessionSpec(SearchRequest.SessionSpec.newBuilder().build()) + .setRelevanceFilterSpec(SearchRequest.RelevanceFilterSpec.newBuilder().build()) .setPersonalizationSpec(SearchRequest.PersonalizationSpec.newBuilder().build()) + .setRelevanceScoreSpec(SearchRequest.RelevanceScoreSpec.newBuilder().build()) + .setSearchAddonSpec(SearchRequest.SearchAddonSpec.newBuilder().build()) + .setCustomRankingParams(SearchRequest.CustomRankingParams.newBuilder().build()) + .setEntity("entity-1298275357") .build(); SearchPagedResponse pagedListResponse = client.search(request); @@ -176,12 +185,14 @@ public void searchExceptionTest() throws Exception { "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[BRANCH]") .toString()) .setQuery("query107944136") + .addAllPageCategories(new ArrayList()) .setImageQuery(SearchRequest.ImageQuery.newBuilder().build()) .setPageSize(883849137) .setPageToken("pageToken873572522") .setOffset(-1019779949) .setOneBoxPageSize(1988477988) .addAllDataStoreSpecs(new ArrayList()) + .setNumResultsPerDataStore(397658288) .setFilter("filter-1274492040") .setCanonicalFilter("canonicalFilter-722283124") .setOrderBy("orderBy-1207110587") @@ -202,12 +213,19 @@ public void searchExceptionTest() throws Exception { .setNaturalLanguageQueryUnderstandingSpec( SearchRequest.NaturalLanguageQueryUnderstandingSpec.newBuilder().build()) .setSearchAsYouTypeSpec(SearchRequest.SearchAsYouTypeSpec.newBuilder().build()) + .setDisplaySpec(SearchRequest.DisplaySpec.newBuilder().build()) + .addAllCrowdingSpecs(new ArrayList()) .setSession( SessionName.ofProjectLocationDataStoreSessionName( "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[SESSION]") .toString()) .setSessionSpec(SearchRequest.SessionSpec.newBuilder().build()) + .setRelevanceFilterSpec(SearchRequest.RelevanceFilterSpec.newBuilder().build()) .setPersonalizationSpec(SearchRequest.PersonalizationSpec.newBuilder().build()) + .setRelevanceScoreSpec(SearchRequest.RelevanceScoreSpec.newBuilder().build()) + .setSearchAddonSpec(SearchRequest.SearchAddonSpec.newBuilder().build()) + .setCustomRankingParams(SearchRequest.CustomRankingParams.newBuilder().build()) + .setEntity("entity-1298275357") .build(); client.search(request); Assert.fail("No exception raised"); @@ -237,12 +255,14 @@ public void searchLiteTest() throws Exception { "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[BRANCH]") .toString()) .setQuery("query107944136") + .addAllPageCategories(new ArrayList()) .setImageQuery(SearchRequest.ImageQuery.newBuilder().build()) .setPageSize(883849137) .setPageToken("pageToken873572522") .setOffset(-1019779949) .setOneBoxPageSize(1988477988) .addAllDataStoreSpecs(new ArrayList()) + .setNumResultsPerDataStore(397658288) .setFilter("filter-1274492040") .setCanonicalFilter("canonicalFilter-722283124") .setOrderBy("orderBy-1207110587") @@ -263,12 +283,19 @@ public void searchLiteTest() throws Exception { .setNaturalLanguageQueryUnderstandingSpec( SearchRequest.NaturalLanguageQueryUnderstandingSpec.newBuilder().build()) .setSearchAsYouTypeSpec(SearchRequest.SearchAsYouTypeSpec.newBuilder().build()) + .setDisplaySpec(SearchRequest.DisplaySpec.newBuilder().build()) + .addAllCrowdingSpecs(new ArrayList()) .setSession( SessionName.ofProjectLocationDataStoreSessionName( "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[SESSION]") .toString()) .setSessionSpec(SearchRequest.SessionSpec.newBuilder().build()) + .setRelevanceFilterSpec(SearchRequest.RelevanceFilterSpec.newBuilder().build()) .setPersonalizationSpec(SearchRequest.PersonalizationSpec.newBuilder().build()) + .setRelevanceScoreSpec(SearchRequest.RelevanceScoreSpec.newBuilder().build()) + .setSearchAddonSpec(SearchRequest.SearchAddonSpec.newBuilder().build()) + .setCustomRankingParams(SearchRequest.CustomRankingParams.newBuilder().build()) + .setEntity("entity-1298275357") .build(); SearchLitePagedResponse pagedListResponse = client.searchLite(request); @@ -313,12 +340,14 @@ public void searchLiteExceptionTest() throws Exception { "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[BRANCH]") .toString()) .setQuery("query107944136") + .addAllPageCategories(new ArrayList()) .setImageQuery(SearchRequest.ImageQuery.newBuilder().build()) .setPageSize(883849137) .setPageToken("pageToken873572522") .setOffset(-1019779949) .setOneBoxPageSize(1988477988) .addAllDataStoreSpecs(new ArrayList()) + .setNumResultsPerDataStore(397658288) .setFilter("filter-1274492040") .setCanonicalFilter("canonicalFilter-722283124") .setOrderBy("orderBy-1207110587") @@ -339,12 +368,19 @@ public void searchLiteExceptionTest() throws Exception { .setNaturalLanguageQueryUnderstandingSpec( SearchRequest.NaturalLanguageQueryUnderstandingSpec.newBuilder().build()) .setSearchAsYouTypeSpec(SearchRequest.SearchAsYouTypeSpec.newBuilder().build()) + .setDisplaySpec(SearchRequest.DisplaySpec.newBuilder().build()) + .addAllCrowdingSpecs(new ArrayList()) .setSession( SessionName.ofProjectLocationDataStoreSessionName( "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[SESSION]") .toString()) .setSessionSpec(SearchRequest.SessionSpec.newBuilder().build()) + .setRelevanceFilterSpec(SearchRequest.RelevanceFilterSpec.newBuilder().build()) .setPersonalizationSpec(SearchRequest.PersonalizationSpec.newBuilder().build()) + .setRelevanceScoreSpec(SearchRequest.RelevanceScoreSpec.newBuilder().build()) + .setSearchAddonSpec(SearchRequest.SearchAddonSpec.newBuilder().build()) + .setCustomRankingParams(SearchRequest.CustomRankingParams.newBuilder().build()) + .setEntity("entity-1298275357") .build(); client.searchLite(request); Assert.fail("No exception raised"); diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1beta/SearchServiceClientTest.java b/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1beta/SearchServiceClientTest.java index 0c20749e610b..d04cf16d5549 100644 --- a/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1beta/SearchServiceClientTest.java +++ b/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1beta/SearchServiceClientTest.java @@ -106,12 +106,14 @@ public void searchTest() throws Exception { "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[BRANCH]") .toString()) .setQuery("query107944136") + .addAllPageCategories(new ArrayList()) .setImageQuery(SearchRequest.ImageQuery.newBuilder().build()) .setPageSize(883849137) .setPageToken("pageToken873572522") .setOffset(-1019779949) .setOneBoxPageSize(1988477988) .addAllDataStoreSpecs(new ArrayList()) + .setNumResultsPerDataStore(397658288) .setFilter("filter-1274492040") .setCanonicalFilter("canonicalFilter-722283124") .setOrderBy("orderBy-1207110587") @@ -132,12 +134,19 @@ public void searchTest() throws Exception { .setNaturalLanguageQueryUnderstandingSpec( SearchRequest.NaturalLanguageQueryUnderstandingSpec.newBuilder().build()) .setSearchAsYouTypeSpec(SearchRequest.SearchAsYouTypeSpec.newBuilder().build()) + .setDisplaySpec(SearchRequest.DisplaySpec.newBuilder().build()) + .addAllCrowdingSpecs(new ArrayList()) .setSession( SessionName.ofProjectLocationDataStoreSessionName( "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[SESSION]") .toString()) .setSessionSpec(SearchRequest.SessionSpec.newBuilder().build()) + .setRelevanceFilterSpec(SearchRequest.RelevanceFilterSpec.newBuilder().build()) .setPersonalizationSpec(SearchRequest.PersonalizationSpec.newBuilder().build()) + .setRelevanceScoreSpec(SearchRequest.RelevanceScoreSpec.newBuilder().build()) + .setSearchAddonSpec(SearchRequest.SearchAddonSpec.newBuilder().build()) + .setCustomRankingParams(SearchRequest.CustomRankingParams.newBuilder().build()) + .setEntity("entity-1298275357") .build(); SearchPagedResponse pagedListResponse = client.search(request); @@ -155,12 +164,15 @@ public void searchTest() throws Exception { Assert.assertEquals(request.getServingConfig(), actualRequest.getServingConfig()); Assert.assertEquals(request.getBranch(), actualRequest.getBranch()); Assert.assertEquals(request.getQuery(), actualRequest.getQuery()); + Assert.assertEquals(request.getPageCategoriesList(), actualRequest.getPageCategoriesList()); Assert.assertEquals(request.getImageQuery(), actualRequest.getImageQuery()); Assert.assertEquals(request.getPageSize(), actualRequest.getPageSize()); Assert.assertEquals(request.getPageToken(), actualRequest.getPageToken()); Assert.assertEquals(request.getOffset(), actualRequest.getOffset()); Assert.assertEquals(request.getOneBoxPageSize(), actualRequest.getOneBoxPageSize()); Assert.assertEquals(request.getDataStoreSpecsList(), actualRequest.getDataStoreSpecsList()); + Assert.assertEquals( + request.getNumResultsPerDataStore(), actualRequest.getNumResultsPerDataStore()); Assert.assertEquals(request.getFilter(), actualRequest.getFilter()); Assert.assertEquals(request.getCanonicalFilter(), actualRequest.getCanonicalFilter()); Assert.assertEquals(request.getOrderBy(), actualRequest.getOrderBy()); @@ -184,10 +196,17 @@ public void searchTest() throws Exception { request.getNaturalLanguageQueryUnderstandingSpec(), actualRequest.getNaturalLanguageQueryUnderstandingSpec()); Assert.assertEquals(request.getSearchAsYouTypeSpec(), actualRequest.getSearchAsYouTypeSpec()); + Assert.assertEquals(request.getDisplaySpec(), actualRequest.getDisplaySpec()); + Assert.assertEquals(request.getCrowdingSpecsList(), actualRequest.getCrowdingSpecsList()); Assert.assertEquals(request.getSession(), actualRequest.getSession()); Assert.assertEquals(request.getSessionSpec(), actualRequest.getSessionSpec()); Assert.assertEquals(request.getRelevanceThreshold(), actualRequest.getRelevanceThreshold()); + Assert.assertEquals(request.getRelevanceFilterSpec(), actualRequest.getRelevanceFilterSpec()); Assert.assertEquals(request.getPersonalizationSpec(), actualRequest.getPersonalizationSpec()); + Assert.assertEquals(request.getRelevanceScoreSpec(), actualRequest.getRelevanceScoreSpec()); + Assert.assertEquals(request.getSearchAddonSpec(), actualRequest.getSearchAddonSpec()); + Assert.assertEquals(request.getCustomRankingParams(), actualRequest.getCustomRankingParams()); + Assert.assertEquals(request.getEntity(), actualRequest.getEntity()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -211,12 +230,14 @@ public void searchExceptionTest() throws Exception { "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[BRANCH]") .toString()) .setQuery("query107944136") + .addAllPageCategories(new ArrayList()) .setImageQuery(SearchRequest.ImageQuery.newBuilder().build()) .setPageSize(883849137) .setPageToken("pageToken873572522") .setOffset(-1019779949) .setOneBoxPageSize(1988477988) .addAllDataStoreSpecs(new ArrayList()) + .setNumResultsPerDataStore(397658288) .setFilter("filter-1274492040") .setCanonicalFilter("canonicalFilter-722283124") .setOrderBy("orderBy-1207110587") @@ -237,12 +258,19 @@ public void searchExceptionTest() throws Exception { .setNaturalLanguageQueryUnderstandingSpec( SearchRequest.NaturalLanguageQueryUnderstandingSpec.newBuilder().build()) .setSearchAsYouTypeSpec(SearchRequest.SearchAsYouTypeSpec.newBuilder().build()) + .setDisplaySpec(SearchRequest.DisplaySpec.newBuilder().build()) + .addAllCrowdingSpecs(new ArrayList()) .setSession( SessionName.ofProjectLocationDataStoreSessionName( "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[SESSION]") .toString()) .setSessionSpec(SearchRequest.SessionSpec.newBuilder().build()) + .setRelevanceFilterSpec(SearchRequest.RelevanceFilterSpec.newBuilder().build()) .setPersonalizationSpec(SearchRequest.PersonalizationSpec.newBuilder().build()) + .setRelevanceScoreSpec(SearchRequest.RelevanceScoreSpec.newBuilder().build()) + .setSearchAddonSpec(SearchRequest.SearchAddonSpec.newBuilder().build()) + .setCustomRankingParams(SearchRequest.CustomRankingParams.newBuilder().build()) + .setEntity("entity-1298275357") .build(); client.search(request); Assert.fail("No exception raised"); @@ -272,12 +300,14 @@ public void searchLiteTest() throws Exception { "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[BRANCH]") .toString()) .setQuery("query107944136") + .addAllPageCategories(new ArrayList()) .setImageQuery(SearchRequest.ImageQuery.newBuilder().build()) .setPageSize(883849137) .setPageToken("pageToken873572522") .setOffset(-1019779949) .setOneBoxPageSize(1988477988) .addAllDataStoreSpecs(new ArrayList()) + .setNumResultsPerDataStore(397658288) .setFilter("filter-1274492040") .setCanonicalFilter("canonicalFilter-722283124") .setOrderBy("orderBy-1207110587") @@ -298,12 +328,19 @@ public void searchLiteTest() throws Exception { .setNaturalLanguageQueryUnderstandingSpec( SearchRequest.NaturalLanguageQueryUnderstandingSpec.newBuilder().build()) .setSearchAsYouTypeSpec(SearchRequest.SearchAsYouTypeSpec.newBuilder().build()) + .setDisplaySpec(SearchRequest.DisplaySpec.newBuilder().build()) + .addAllCrowdingSpecs(new ArrayList()) .setSession( SessionName.ofProjectLocationDataStoreSessionName( "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[SESSION]") .toString()) .setSessionSpec(SearchRequest.SessionSpec.newBuilder().build()) + .setRelevanceFilterSpec(SearchRequest.RelevanceFilterSpec.newBuilder().build()) .setPersonalizationSpec(SearchRequest.PersonalizationSpec.newBuilder().build()) + .setRelevanceScoreSpec(SearchRequest.RelevanceScoreSpec.newBuilder().build()) + .setSearchAddonSpec(SearchRequest.SearchAddonSpec.newBuilder().build()) + .setCustomRankingParams(SearchRequest.CustomRankingParams.newBuilder().build()) + .setEntity("entity-1298275357") .build(); SearchLitePagedResponse pagedListResponse = client.searchLite(request); @@ -321,12 +358,15 @@ public void searchLiteTest() throws Exception { Assert.assertEquals(request.getServingConfig(), actualRequest.getServingConfig()); Assert.assertEquals(request.getBranch(), actualRequest.getBranch()); Assert.assertEquals(request.getQuery(), actualRequest.getQuery()); + Assert.assertEquals(request.getPageCategoriesList(), actualRequest.getPageCategoriesList()); Assert.assertEquals(request.getImageQuery(), actualRequest.getImageQuery()); Assert.assertEquals(request.getPageSize(), actualRequest.getPageSize()); Assert.assertEquals(request.getPageToken(), actualRequest.getPageToken()); Assert.assertEquals(request.getOffset(), actualRequest.getOffset()); Assert.assertEquals(request.getOneBoxPageSize(), actualRequest.getOneBoxPageSize()); Assert.assertEquals(request.getDataStoreSpecsList(), actualRequest.getDataStoreSpecsList()); + Assert.assertEquals( + request.getNumResultsPerDataStore(), actualRequest.getNumResultsPerDataStore()); Assert.assertEquals(request.getFilter(), actualRequest.getFilter()); Assert.assertEquals(request.getCanonicalFilter(), actualRequest.getCanonicalFilter()); Assert.assertEquals(request.getOrderBy(), actualRequest.getOrderBy()); @@ -350,10 +390,17 @@ public void searchLiteTest() throws Exception { request.getNaturalLanguageQueryUnderstandingSpec(), actualRequest.getNaturalLanguageQueryUnderstandingSpec()); Assert.assertEquals(request.getSearchAsYouTypeSpec(), actualRequest.getSearchAsYouTypeSpec()); + Assert.assertEquals(request.getDisplaySpec(), actualRequest.getDisplaySpec()); + Assert.assertEquals(request.getCrowdingSpecsList(), actualRequest.getCrowdingSpecsList()); Assert.assertEquals(request.getSession(), actualRequest.getSession()); Assert.assertEquals(request.getSessionSpec(), actualRequest.getSessionSpec()); Assert.assertEquals(request.getRelevanceThreshold(), actualRequest.getRelevanceThreshold()); + Assert.assertEquals(request.getRelevanceFilterSpec(), actualRequest.getRelevanceFilterSpec()); Assert.assertEquals(request.getPersonalizationSpec(), actualRequest.getPersonalizationSpec()); + Assert.assertEquals(request.getRelevanceScoreSpec(), actualRequest.getRelevanceScoreSpec()); + Assert.assertEquals(request.getSearchAddonSpec(), actualRequest.getSearchAddonSpec()); + Assert.assertEquals(request.getCustomRankingParams(), actualRequest.getCustomRankingParams()); + Assert.assertEquals(request.getEntity(), actualRequest.getEntity()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -377,12 +424,14 @@ public void searchLiteExceptionTest() throws Exception { "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[BRANCH]") .toString()) .setQuery("query107944136") + .addAllPageCategories(new ArrayList()) .setImageQuery(SearchRequest.ImageQuery.newBuilder().build()) .setPageSize(883849137) .setPageToken("pageToken873572522") .setOffset(-1019779949) .setOneBoxPageSize(1988477988) .addAllDataStoreSpecs(new ArrayList()) + .setNumResultsPerDataStore(397658288) .setFilter("filter-1274492040") .setCanonicalFilter("canonicalFilter-722283124") .setOrderBy("orderBy-1207110587") @@ -403,12 +452,19 @@ public void searchLiteExceptionTest() throws Exception { .setNaturalLanguageQueryUnderstandingSpec( SearchRequest.NaturalLanguageQueryUnderstandingSpec.newBuilder().build()) .setSearchAsYouTypeSpec(SearchRequest.SearchAsYouTypeSpec.newBuilder().build()) + .setDisplaySpec(SearchRequest.DisplaySpec.newBuilder().build()) + .addAllCrowdingSpecs(new ArrayList()) .setSession( SessionName.ofProjectLocationDataStoreSessionName( "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[SESSION]") .toString()) .setSessionSpec(SearchRequest.SessionSpec.newBuilder().build()) + .setRelevanceFilterSpec(SearchRequest.RelevanceFilterSpec.newBuilder().build()) .setPersonalizationSpec(SearchRequest.PersonalizationSpec.newBuilder().build()) + .setRelevanceScoreSpec(SearchRequest.RelevanceScoreSpec.newBuilder().build()) + .setSearchAddonSpec(SearchRequest.SearchAddonSpec.newBuilder().build()) + .setCustomRankingParams(SearchRequest.CustomRankingParams.newBuilder().build()) + .setEntity("entity-1298275357") .build(); client.searchLite(request); Assert.fail("No exception raised"); diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1beta/ServingConfigServiceClientHttpJsonTest.java b/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1beta/ServingConfigServiceClientHttpJsonTest.java index b43e06de3291..acd2a6008f04 100644 --- a/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1beta/ServingConfigServiceClientHttpJsonTest.java +++ b/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1beta/ServingConfigServiceClientHttpJsonTest.java @@ -29,6 +29,7 @@ import com.google.api.gax.rpc.testing.FakeStatusCode; import com.google.cloud.discoveryengine.v1beta.stub.HttpJsonServingConfigServiceStub; import com.google.common.collect.Lists; +import com.google.protobuf.Empty; import com.google.protobuf.FieldMask; import com.google.protobuf.Timestamp; import java.io.IOException; @@ -78,6 +79,307 @@ public void tearDown() throws Exception { mockService.reset(); } + @Test + public void createServingConfigTest() throws Exception { + ServingConfig expectedResponse = + ServingConfig.newBuilder() + .setName( + ServingConfigName.ofProjectLocationDataStoreServingConfigName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[SERVING_CONFIG]") + .toString()) + .setDisplayName("displayName1714148973") + .setSolutionType(SolutionType.forNumber(0)) + .setModelId("modelId1226956324") + .setDiversityLevel("diversityLevel578206123") + .setEmbeddingConfig(EmbeddingConfig.newBuilder().build()) + .setRankingExpression("rankingExpression2110320494") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .addAllFilterControlIds(new ArrayList()) + .addAllBoostControlIds(new ArrayList()) + .addAllRedirectControlIds(new ArrayList()) + .addAllSynonymsControlIds(new ArrayList()) + .addAllOnewaySynonymsControlIds(new ArrayList()) + .addAllDissociateControlIds(new ArrayList()) + .addAllReplacementControlIds(new ArrayList()) + .addAllIgnoreControlIds(new ArrayList()) + .addAllPromoteControlIds(new ArrayList()) + .setPersonalizationSpec(SearchRequest.PersonalizationSpec.newBuilder().build()) + .setAnswerGenerationSpec(AnswerGenerationSpec.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + DataStoreName parent = + DataStoreName.ofProjectLocationDataStoreName("[PROJECT]", "[LOCATION]", "[DATA_STORE]"); + ServingConfig servingConfig = ServingConfig.newBuilder().build(); + String servingConfigId = "servingConfigId-831052759"; + + ServingConfig actualResponse = + client.createServingConfig(parent, servingConfig, servingConfigId); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createServingConfigExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + DataStoreName parent = + DataStoreName.ofProjectLocationDataStoreName("[PROJECT]", "[LOCATION]", "[DATA_STORE]"); + ServingConfig servingConfig = ServingConfig.newBuilder().build(); + String servingConfigId = "servingConfigId-831052759"; + client.createServingConfig(parent, servingConfig, servingConfigId); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createServingConfigTest2() throws Exception { + ServingConfig expectedResponse = + ServingConfig.newBuilder() + .setName( + ServingConfigName.ofProjectLocationDataStoreServingConfigName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[SERVING_CONFIG]") + .toString()) + .setDisplayName("displayName1714148973") + .setSolutionType(SolutionType.forNumber(0)) + .setModelId("modelId1226956324") + .setDiversityLevel("diversityLevel578206123") + .setEmbeddingConfig(EmbeddingConfig.newBuilder().build()) + .setRankingExpression("rankingExpression2110320494") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .addAllFilterControlIds(new ArrayList()) + .addAllBoostControlIds(new ArrayList()) + .addAllRedirectControlIds(new ArrayList()) + .addAllSynonymsControlIds(new ArrayList()) + .addAllOnewaySynonymsControlIds(new ArrayList()) + .addAllDissociateControlIds(new ArrayList()) + .addAllReplacementControlIds(new ArrayList()) + .addAllIgnoreControlIds(new ArrayList()) + .addAllPromoteControlIds(new ArrayList()) + .setPersonalizationSpec(SearchRequest.PersonalizationSpec.newBuilder().build()) + .setAnswerGenerationSpec(AnswerGenerationSpec.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + EngineName parent = EngineName.of("[PROJECT]", "[LOCATION]", "[COLLECTION]", "[ENGINE]"); + ServingConfig servingConfig = ServingConfig.newBuilder().build(); + String servingConfigId = "servingConfigId-831052759"; + + ServingConfig actualResponse = + client.createServingConfig(parent, servingConfig, servingConfigId); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createServingConfigExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + EngineName parent = EngineName.of("[PROJECT]", "[LOCATION]", "[COLLECTION]", "[ENGINE]"); + ServingConfig servingConfig = ServingConfig.newBuilder().build(); + String servingConfigId = "servingConfigId-831052759"; + client.createServingConfig(parent, servingConfig, servingConfigId); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createServingConfigTest3() throws Exception { + ServingConfig expectedResponse = + ServingConfig.newBuilder() + .setName( + ServingConfigName.ofProjectLocationDataStoreServingConfigName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[SERVING_CONFIG]") + .toString()) + .setDisplayName("displayName1714148973") + .setSolutionType(SolutionType.forNumber(0)) + .setModelId("modelId1226956324") + .setDiversityLevel("diversityLevel578206123") + .setEmbeddingConfig(EmbeddingConfig.newBuilder().build()) + .setRankingExpression("rankingExpression2110320494") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .addAllFilterControlIds(new ArrayList()) + .addAllBoostControlIds(new ArrayList()) + .addAllRedirectControlIds(new ArrayList()) + .addAllSynonymsControlIds(new ArrayList()) + .addAllOnewaySynonymsControlIds(new ArrayList()) + .addAllDissociateControlIds(new ArrayList()) + .addAllReplacementControlIds(new ArrayList()) + .addAllIgnoreControlIds(new ArrayList()) + .addAllPromoteControlIds(new ArrayList()) + .setPersonalizationSpec(SearchRequest.PersonalizationSpec.newBuilder().build()) + .setAnswerGenerationSpec(AnswerGenerationSpec.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-3005/locations/location-3005/dataStores/dataStore-3005"; + ServingConfig servingConfig = ServingConfig.newBuilder().build(); + String servingConfigId = "servingConfigId-831052759"; + + ServingConfig actualResponse = + client.createServingConfig(parent, servingConfig, servingConfigId); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createServingConfigExceptionTest3() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-3005/locations/location-3005/dataStores/dataStore-3005"; + ServingConfig servingConfig = ServingConfig.newBuilder().build(); + String servingConfigId = "servingConfigId-831052759"; + client.createServingConfig(parent, servingConfig, servingConfigId); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteServingConfigTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockService.addResponse(expectedResponse); + + ServingConfigName name = + ServingConfigName.ofProjectLocationDataStoreServingConfigName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[SERVING_CONFIG]"); + + client.deleteServingConfig(name); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deleteServingConfigExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ServingConfigName name = + ServingConfigName.ofProjectLocationDataStoreServingConfigName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[SERVING_CONFIG]"); + client.deleteServingConfig(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteServingConfigTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockService.addResponse(expectedResponse); + + String name = + "projects/project-387/locations/location-387/dataStores/dataStore-387/servingConfigs/servingConfig-387"; + + client.deleteServingConfig(name); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deleteServingConfigExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "projects/project-387/locations/location-387/dataStores/dataStore-387/servingConfigs/servingConfig-387"; + client.deleteServingConfig(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + @Test public void updateServingConfigTest() throws Exception { ServingConfig expectedResponse = @@ -102,7 +404,9 @@ public void updateServingConfigTest() throws Exception { .addAllDissociateControlIds(new ArrayList()) .addAllReplacementControlIds(new ArrayList()) .addAllIgnoreControlIds(new ArrayList()) + .addAllPromoteControlIds(new ArrayList()) .setPersonalizationSpec(SearchRequest.PersonalizationSpec.newBuilder().build()) + .setAnswerGenerationSpec(AnswerGenerationSpec.newBuilder().build()) .build(); mockService.addResponse(expectedResponse); @@ -128,7 +432,9 @@ public void updateServingConfigTest() throws Exception { .addAllDissociateControlIds(new ArrayList()) .addAllReplacementControlIds(new ArrayList()) .addAllIgnoreControlIds(new ArrayList()) + .addAllPromoteControlIds(new ArrayList()) .setPersonalizationSpec(SearchRequest.PersonalizationSpec.newBuilder().build()) + .setAnswerGenerationSpec(AnswerGenerationSpec.newBuilder().build()) .build(); FieldMask updateMask = FieldMask.newBuilder().build(); @@ -180,7 +486,9 @@ public void updateServingConfigExceptionTest() throws Exception { .addAllDissociateControlIds(new ArrayList()) .addAllReplacementControlIds(new ArrayList()) .addAllIgnoreControlIds(new ArrayList()) + .addAllPromoteControlIds(new ArrayList()) .setPersonalizationSpec(SearchRequest.PersonalizationSpec.newBuilder().build()) + .setAnswerGenerationSpec(AnswerGenerationSpec.newBuilder().build()) .build(); FieldMask updateMask = FieldMask.newBuilder().build(); client.updateServingConfig(servingConfig, updateMask); @@ -214,7 +522,9 @@ public void getServingConfigTest() throws Exception { .addAllDissociateControlIds(new ArrayList()) .addAllReplacementControlIds(new ArrayList()) .addAllIgnoreControlIds(new ArrayList()) + .addAllPromoteControlIds(new ArrayList()) .setPersonalizationSpec(SearchRequest.PersonalizationSpec.newBuilder().build()) + .setAnswerGenerationSpec(AnswerGenerationSpec.newBuilder().build()) .build(); mockService.addResponse(expectedResponse); @@ -282,7 +592,9 @@ public void getServingConfigTest2() throws Exception { .addAllDissociateControlIds(new ArrayList()) .addAllReplacementControlIds(new ArrayList()) .addAllIgnoreControlIds(new ArrayList()) + .addAllPromoteControlIds(new ArrayList()) .setPersonalizationSpec(SearchRequest.PersonalizationSpec.newBuilder().build()) + .setAnswerGenerationSpec(AnswerGenerationSpec.newBuilder().build()) .build(); mockService.addResponse(expectedResponse); diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1beta/ServingConfigServiceClientTest.java b/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1beta/ServingConfigServiceClientTest.java index 361784fa7eb3..c8e5dc38524c 100644 --- a/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1beta/ServingConfigServiceClientTest.java +++ b/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1beta/ServingConfigServiceClientTest.java @@ -27,6 +27,7 @@ import com.google.api.gax.rpc.InvalidArgumentException; import com.google.common.collect.Lists; import com.google.protobuf.AbstractMessage; +import com.google.protobuf.Empty; import com.google.protobuf.FieldMask; import com.google.protobuf.Timestamp; import io.grpc.StatusRuntimeException; @@ -84,6 +85,281 @@ public void tearDown() throws Exception { client.close(); } + @Test + public void createServingConfigTest() throws Exception { + ServingConfig expectedResponse = + ServingConfig.newBuilder() + .setName( + ServingConfigName.ofProjectLocationDataStoreServingConfigName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[SERVING_CONFIG]") + .toString()) + .setDisplayName("displayName1714148973") + .setSolutionType(SolutionType.forNumber(0)) + .setModelId("modelId1226956324") + .setDiversityLevel("diversityLevel578206123") + .setEmbeddingConfig(EmbeddingConfig.newBuilder().build()) + .setRankingExpression("rankingExpression2110320494") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .addAllFilterControlIds(new ArrayList()) + .addAllBoostControlIds(new ArrayList()) + .addAllRedirectControlIds(new ArrayList()) + .addAllSynonymsControlIds(new ArrayList()) + .addAllOnewaySynonymsControlIds(new ArrayList()) + .addAllDissociateControlIds(new ArrayList()) + .addAllReplacementControlIds(new ArrayList()) + .addAllIgnoreControlIds(new ArrayList()) + .addAllPromoteControlIds(new ArrayList()) + .setPersonalizationSpec(SearchRequest.PersonalizationSpec.newBuilder().build()) + .setAnswerGenerationSpec(AnswerGenerationSpec.newBuilder().build()) + .build(); + mockServingConfigService.addResponse(expectedResponse); + + DataStoreName parent = + DataStoreName.ofProjectLocationDataStoreName("[PROJECT]", "[LOCATION]", "[DATA_STORE]"); + ServingConfig servingConfig = ServingConfig.newBuilder().build(); + String servingConfigId = "servingConfigId-831052759"; + + ServingConfig actualResponse = + client.createServingConfig(parent, servingConfig, servingConfigId); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockServingConfigService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateServingConfigRequest actualRequest = ((CreateServingConfigRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(servingConfig, actualRequest.getServingConfig()); + Assert.assertEquals(servingConfigId, actualRequest.getServingConfigId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createServingConfigExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockServingConfigService.addException(exception); + + try { + DataStoreName parent = + DataStoreName.ofProjectLocationDataStoreName("[PROJECT]", "[LOCATION]", "[DATA_STORE]"); + ServingConfig servingConfig = ServingConfig.newBuilder().build(); + String servingConfigId = "servingConfigId-831052759"; + client.createServingConfig(parent, servingConfig, servingConfigId); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createServingConfigTest2() throws Exception { + ServingConfig expectedResponse = + ServingConfig.newBuilder() + .setName( + ServingConfigName.ofProjectLocationDataStoreServingConfigName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[SERVING_CONFIG]") + .toString()) + .setDisplayName("displayName1714148973") + .setSolutionType(SolutionType.forNumber(0)) + .setModelId("modelId1226956324") + .setDiversityLevel("diversityLevel578206123") + .setEmbeddingConfig(EmbeddingConfig.newBuilder().build()) + .setRankingExpression("rankingExpression2110320494") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .addAllFilterControlIds(new ArrayList()) + .addAllBoostControlIds(new ArrayList()) + .addAllRedirectControlIds(new ArrayList()) + .addAllSynonymsControlIds(new ArrayList()) + .addAllOnewaySynonymsControlIds(new ArrayList()) + .addAllDissociateControlIds(new ArrayList()) + .addAllReplacementControlIds(new ArrayList()) + .addAllIgnoreControlIds(new ArrayList()) + .addAllPromoteControlIds(new ArrayList()) + .setPersonalizationSpec(SearchRequest.PersonalizationSpec.newBuilder().build()) + .setAnswerGenerationSpec(AnswerGenerationSpec.newBuilder().build()) + .build(); + mockServingConfigService.addResponse(expectedResponse); + + EngineName parent = EngineName.of("[PROJECT]", "[LOCATION]", "[COLLECTION]", "[ENGINE]"); + ServingConfig servingConfig = ServingConfig.newBuilder().build(); + String servingConfigId = "servingConfigId-831052759"; + + ServingConfig actualResponse = + client.createServingConfig(parent, servingConfig, servingConfigId); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockServingConfigService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateServingConfigRequest actualRequest = ((CreateServingConfigRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(servingConfig, actualRequest.getServingConfig()); + Assert.assertEquals(servingConfigId, actualRequest.getServingConfigId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createServingConfigExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockServingConfigService.addException(exception); + + try { + EngineName parent = EngineName.of("[PROJECT]", "[LOCATION]", "[COLLECTION]", "[ENGINE]"); + ServingConfig servingConfig = ServingConfig.newBuilder().build(); + String servingConfigId = "servingConfigId-831052759"; + client.createServingConfig(parent, servingConfig, servingConfigId); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createServingConfigTest3() throws Exception { + ServingConfig expectedResponse = + ServingConfig.newBuilder() + .setName( + ServingConfigName.ofProjectLocationDataStoreServingConfigName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[SERVING_CONFIG]") + .toString()) + .setDisplayName("displayName1714148973") + .setSolutionType(SolutionType.forNumber(0)) + .setModelId("modelId1226956324") + .setDiversityLevel("diversityLevel578206123") + .setEmbeddingConfig(EmbeddingConfig.newBuilder().build()) + .setRankingExpression("rankingExpression2110320494") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .addAllFilterControlIds(new ArrayList()) + .addAllBoostControlIds(new ArrayList()) + .addAllRedirectControlIds(new ArrayList()) + .addAllSynonymsControlIds(new ArrayList()) + .addAllOnewaySynonymsControlIds(new ArrayList()) + .addAllDissociateControlIds(new ArrayList()) + .addAllReplacementControlIds(new ArrayList()) + .addAllIgnoreControlIds(new ArrayList()) + .addAllPromoteControlIds(new ArrayList()) + .setPersonalizationSpec(SearchRequest.PersonalizationSpec.newBuilder().build()) + .setAnswerGenerationSpec(AnswerGenerationSpec.newBuilder().build()) + .build(); + mockServingConfigService.addResponse(expectedResponse); + + String parent = "parent-995424086"; + ServingConfig servingConfig = ServingConfig.newBuilder().build(); + String servingConfigId = "servingConfigId-831052759"; + + ServingConfig actualResponse = + client.createServingConfig(parent, servingConfig, servingConfigId); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockServingConfigService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateServingConfigRequest actualRequest = ((CreateServingConfigRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(servingConfig, actualRequest.getServingConfig()); + Assert.assertEquals(servingConfigId, actualRequest.getServingConfigId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createServingConfigExceptionTest3() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockServingConfigService.addException(exception); + + try { + String parent = "parent-995424086"; + ServingConfig servingConfig = ServingConfig.newBuilder().build(); + String servingConfigId = "servingConfigId-831052759"; + client.createServingConfig(parent, servingConfig, servingConfigId); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteServingConfigTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockServingConfigService.addResponse(expectedResponse); + + ServingConfigName name = + ServingConfigName.ofProjectLocationDataStoreServingConfigName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[SERVING_CONFIG]"); + + client.deleteServingConfig(name); + + List actualRequests = mockServingConfigService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteServingConfigRequest actualRequest = ((DeleteServingConfigRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteServingConfigExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockServingConfigService.addException(exception); + + try { + ServingConfigName name = + ServingConfigName.ofProjectLocationDataStoreServingConfigName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[SERVING_CONFIG]"); + client.deleteServingConfig(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteServingConfigTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockServingConfigService.addResponse(expectedResponse); + + String name = "name3373707"; + + client.deleteServingConfig(name); + + List actualRequests = mockServingConfigService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteServingConfigRequest actualRequest = ((DeleteServingConfigRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteServingConfigExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockServingConfigService.addException(exception); + + try { + String name = "name3373707"; + client.deleteServingConfig(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + @Test public void updateServingConfigTest() throws Exception { ServingConfig expectedResponse = @@ -108,7 +384,9 @@ public void updateServingConfigTest() throws Exception { .addAllDissociateControlIds(new ArrayList()) .addAllReplacementControlIds(new ArrayList()) .addAllIgnoreControlIds(new ArrayList()) + .addAllPromoteControlIds(new ArrayList()) .setPersonalizationSpec(SearchRequest.PersonalizationSpec.newBuilder().build()) + .setAnswerGenerationSpec(AnswerGenerationSpec.newBuilder().build()) .build(); mockServingConfigService.addResponse(expectedResponse); @@ -169,7 +447,9 @@ public void getServingConfigTest() throws Exception { .addAllDissociateControlIds(new ArrayList()) .addAllReplacementControlIds(new ArrayList()) .addAllIgnoreControlIds(new ArrayList()) + .addAllPromoteControlIds(new ArrayList()) .setPersonalizationSpec(SearchRequest.PersonalizationSpec.newBuilder().build()) + .setAnswerGenerationSpec(AnswerGenerationSpec.newBuilder().build()) .build(); mockServingConfigService.addResponse(expectedResponse); @@ -231,7 +511,9 @@ public void getServingConfigTest2() throws Exception { .addAllDissociateControlIds(new ArrayList()) .addAllReplacementControlIds(new ArrayList()) .addAllIgnoreControlIds(new ArrayList()) + .addAllPromoteControlIds(new ArrayList()) .setPersonalizationSpec(SearchRequest.PersonalizationSpec.newBuilder().build()) + .setAnswerGenerationSpec(AnswerGenerationSpec.newBuilder().build()) .build(); mockServingConfigService.addResponse(expectedResponse); diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1beta/SessionServiceClientHttpJsonTest.java b/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1beta/SessionServiceClientHttpJsonTest.java index b06d4a738555..f8cbd212ac84 100644 --- a/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1beta/SessionServiceClientHttpJsonTest.java +++ b/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1beta/SessionServiceClientHttpJsonTest.java @@ -90,9 +90,11 @@ public void createSessionTest() throws Exception { .setDisplayName("displayName1714148973") .setUserPseudoId("userPseudoId-1155274652") .addAllTurns(new ArrayList()) + .addAllLabels(new ArrayList()) .setStartTime(Timestamp.newBuilder().build()) .setEndTime(Timestamp.newBuilder().build()) .setIsPinned(true) + .setPendingAsyncAssistOperationId("pendingAsyncAssistOperationId1460582932") .build(); mockService.addResponse(expectedResponse); @@ -147,9 +149,11 @@ public void createSessionTest2() throws Exception { .setDisplayName("displayName1714148973") .setUserPseudoId("userPseudoId-1155274652") .addAllTurns(new ArrayList()) + .addAllLabels(new ArrayList()) .setStartTime(Timestamp.newBuilder().build()) .setEndTime(Timestamp.newBuilder().build()) .setIsPinned(true) + .setPendingAsyncAssistOperationId("pendingAsyncAssistOperationId1460582932") .build(); mockService.addResponse(expectedResponse); @@ -288,9 +292,11 @@ public void updateSessionTest() throws Exception { .setDisplayName("displayName1714148973") .setUserPseudoId("userPseudoId-1155274652") .addAllTurns(new ArrayList()) + .addAllLabels(new ArrayList()) .setStartTime(Timestamp.newBuilder().build()) .setEndTime(Timestamp.newBuilder().build()) .setIsPinned(true) + .setPendingAsyncAssistOperationId("pendingAsyncAssistOperationId1460582932") .build(); mockService.addResponse(expectedResponse); @@ -303,9 +309,11 @@ public void updateSessionTest() throws Exception { .setDisplayName("displayName1714148973") .setUserPseudoId("userPseudoId-1155274652") .addAllTurns(new ArrayList()) + .addAllLabels(new ArrayList()) .setStartTime(Timestamp.newBuilder().build()) .setEndTime(Timestamp.newBuilder().build()) .setIsPinned(true) + .setPendingAsyncAssistOperationId("pendingAsyncAssistOperationId1460582932") .build(); FieldMask updateMask = FieldMask.newBuilder().build(); @@ -344,9 +352,11 @@ public void updateSessionExceptionTest() throws Exception { .setDisplayName("displayName1714148973") .setUserPseudoId("userPseudoId-1155274652") .addAllTurns(new ArrayList()) + .addAllLabels(new ArrayList()) .setStartTime(Timestamp.newBuilder().build()) .setEndTime(Timestamp.newBuilder().build()) .setIsPinned(true) + .setPendingAsyncAssistOperationId("pendingAsyncAssistOperationId1460582932") .build(); FieldMask updateMask = FieldMask.newBuilder().build(); client.updateSession(session, updateMask); @@ -367,9 +377,11 @@ public void getSessionTest() throws Exception { .setDisplayName("displayName1714148973") .setUserPseudoId("userPseudoId-1155274652") .addAllTurns(new ArrayList()) + .addAllLabels(new ArrayList()) .setStartTime(Timestamp.newBuilder().build()) .setEndTime(Timestamp.newBuilder().build()) .setIsPinned(true) + .setPendingAsyncAssistOperationId("pendingAsyncAssistOperationId1460582932") .build(); mockService.addResponse(expectedResponse); @@ -424,9 +436,11 @@ public void getSessionTest2() throws Exception { .setDisplayName("displayName1714148973") .setUserPseudoId("userPseudoId-1155274652") .addAllTurns(new ArrayList()) + .addAllLabels(new ArrayList()) .setStartTime(Timestamp.newBuilder().build()) .setEndTime(Timestamp.newBuilder().build()) .setIsPinned(true) + .setPendingAsyncAssistOperationId("pendingAsyncAssistOperationId1460582932") .build(); mockService.addResponse(expectedResponse); diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1beta/SessionServiceClientTest.java b/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1beta/SessionServiceClientTest.java index 11b92b387b85..9aee70f6ed05 100644 --- a/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1beta/SessionServiceClientTest.java +++ b/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1beta/SessionServiceClientTest.java @@ -96,9 +96,11 @@ public void createSessionTest() throws Exception { .setDisplayName("displayName1714148973") .setUserPseudoId("userPseudoId-1155274652") .addAllTurns(new ArrayList()) + .addAllLabels(new ArrayList()) .setStartTime(Timestamp.newBuilder().build()) .setEndTime(Timestamp.newBuilder().build()) .setIsPinned(true) + .setPendingAsyncAssistOperationId("pendingAsyncAssistOperationId1460582932") .build(); mockSessionService.addResponse(expectedResponse); @@ -148,9 +150,11 @@ public void createSessionTest2() throws Exception { .setDisplayName("displayName1714148973") .setUserPseudoId("userPseudoId-1155274652") .addAllTurns(new ArrayList()) + .addAllLabels(new ArrayList()) .setStartTime(Timestamp.newBuilder().build()) .setEndTime(Timestamp.newBuilder().build()) .setIsPinned(true) + .setPendingAsyncAssistOperationId("pendingAsyncAssistOperationId1460582932") .build(); mockSessionService.addResponse(expectedResponse); @@ -270,9 +274,11 @@ public void updateSessionTest() throws Exception { .setDisplayName("displayName1714148973") .setUserPseudoId("userPseudoId-1155274652") .addAllTurns(new ArrayList()) + .addAllLabels(new ArrayList()) .setStartTime(Timestamp.newBuilder().build()) .setEndTime(Timestamp.newBuilder().build()) .setIsPinned(true) + .setPendingAsyncAssistOperationId("pendingAsyncAssistOperationId1460582932") .build(); mockSessionService.addResponse(expectedResponse); @@ -320,9 +326,11 @@ public void getSessionTest() throws Exception { .setDisplayName("displayName1714148973") .setUserPseudoId("userPseudoId-1155274652") .addAllTurns(new ArrayList()) + .addAllLabels(new ArrayList()) .setStartTime(Timestamp.newBuilder().build()) .setEndTime(Timestamp.newBuilder().build()) .setIsPinned(true) + .setPendingAsyncAssistOperationId("pendingAsyncAssistOperationId1460582932") .build(); mockSessionService.addResponse(expectedResponse); @@ -371,9 +379,11 @@ public void getSessionTest2() throws Exception { .setDisplayName("displayName1714148973") .setUserPseudoId("userPseudoId-1155274652") .addAllTurns(new ArrayList()) + .addAllLabels(new ArrayList()) .setStartTime(Timestamp.newBuilder().build()) .setEndTime(Timestamp.newBuilder().build()) .setIsPinned(true) + .setPendingAsyncAssistOperationId("pendingAsyncAssistOperationId1460582932") .build(); mockSessionService.addResponse(expectedResponse); diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1beta/UserEventServiceClientHttpJsonTest.java b/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1beta/UserEventServiceClientHttpJsonTest.java index 004c2108a006..5ca0ccae7448 100644 --- a/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1beta/UserEventServiceClientHttpJsonTest.java +++ b/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1beta/UserEventServiceClientHttpJsonTest.java @@ -85,6 +85,7 @@ public void writeUserEventTest() throws Exception { UserEvent expectedResponse = UserEvent.newBuilder() .setEventType("eventType31430900") + .setConversionType("conversionType989646192") .setUserPseudoId("userPseudoId-1155274652") .setEngine( EngineName.of("[PROJECT]", "[LOCATION]", "[COLLECTION]", "[ENGINE]").toString()) @@ -109,6 +110,8 @@ public void writeUserEventTest() throws Exception { .putAllAttributes(new HashMap()) .setMediaInfo(MediaInfo.newBuilder().build()) .addAllPanels(new ArrayList()) + .setFeedback(Feedback.newBuilder().build()) + .setEntity("entity-1298275357") .build(); mockService.addResponse(expectedResponse); diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1beta/UserEventServiceClientTest.java b/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1beta/UserEventServiceClientTest.java index 345ff1519c90..6c45101dbe1d 100644 --- a/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1beta/UserEventServiceClientTest.java +++ b/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1beta/UserEventServiceClientTest.java @@ -93,6 +93,7 @@ public void writeUserEventTest() throws Exception { UserEvent expectedResponse = UserEvent.newBuilder() .setEventType("eventType31430900") + .setConversionType("conversionType989646192") .setUserPseudoId("userPseudoId-1155274652") .setEngine( EngineName.of("[PROJECT]", "[LOCATION]", "[COLLECTION]", "[ENGINE]").toString()) @@ -117,6 +118,8 @@ public void writeUserEventTest() throws Exception { .putAllAttributes(new HashMap()) .setMediaInfo(MediaInfo.newBuilder().build()) .addAllPanels(new ArrayList()) + .setFeedback(Feedback.newBuilder().build()) + .setEntity("entity-1298275357") .build(); mockUserEventService.addResponse(expectedResponse); diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1beta/UserLicenseServiceClientHttpJsonTest.java b/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1beta/UserLicenseServiceClientHttpJsonTest.java new file mode 100644 index 000000000000..09d6f8604b38 --- /dev/null +++ b/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1beta/UserLicenseServiceClientHttpJsonTest.java @@ -0,0 +1,331 @@ +/* + * 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.discoveryengine.v1beta; + +import static com.google.cloud.discoveryengine.v1beta.UserLicenseServiceClient.ListUserLicensesPagedResponse; + +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.httpjson.GaxHttpJsonProperties; +import com.google.api.gax.httpjson.testing.MockHttpService; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ApiException; +import com.google.api.gax.rpc.ApiExceptionFactory; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.testing.FakeStatusCode; +import com.google.cloud.discoveryengine.v1beta.stub.HttpJsonUserLicenseServiceStub; +import com.google.common.collect.Lists; +import com.google.longrunning.Operation; +import com.google.protobuf.Any; +import com.google.rpc.Status; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.concurrent.ExecutionException; +import javax.annotation.Generated; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@Generated("by gapic-generator-java") +public class UserLicenseServiceClientHttpJsonTest { + private static MockHttpService mockService; + private static UserLicenseServiceClient client; + + @BeforeClass + public static void startStaticServer() throws IOException { + mockService = + new MockHttpService( + HttpJsonUserLicenseServiceStub.getMethodDescriptors(), + UserLicenseServiceSettings.getDefaultEndpoint()); + UserLicenseServiceSettings settings = + UserLicenseServiceSettings.newHttpJsonBuilder() + .setTransportChannelProvider( + UserLicenseServiceSettings.defaultHttpJsonTransportProviderBuilder() + .setHttpTransport(mockService) + .build()) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = UserLicenseServiceClient.create(settings); + } + + @AfterClass + public static void stopServer() { + client.close(); + } + + @Before + public void setUp() {} + + @After + public void tearDown() throws Exception { + mockService.reset(); + } + + @Test + public void listUserLicensesTest() throws Exception { + UserLicense responsesElement = UserLicense.newBuilder().build(); + ListUserLicensesResponse expectedResponse = + ListUserLicensesResponse.newBuilder() + .setNextPageToken("") + .addAllUserLicenses(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + UserStoreName parent = UserStoreName.of("[PROJECT]", "[LOCATION]", "[USER_STORE]"); + + ListUserLicensesPagedResponse pagedListResponse = client.listUserLicenses(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getUserLicensesList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listUserLicensesExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + UserStoreName parent = UserStoreName.of("[PROJECT]", "[LOCATION]", "[USER_STORE]"); + client.listUserLicenses(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listUserLicensesTest2() throws Exception { + UserLicense responsesElement = UserLicense.newBuilder().build(); + ListUserLicensesResponse expectedResponse = + ListUserLicensesResponse.newBuilder() + .setNextPageToken("") + .addAllUserLicenses(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-3682/locations/location-3682/userStores/userStore-3682"; + + ListUserLicensesPagedResponse pagedListResponse = client.listUserLicenses(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getUserLicensesList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listUserLicensesExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-3682/locations/location-3682/userStores/userStore-3682"; + client.listUserLicenses(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listLicenseConfigsUsageStatsTest() throws Exception { + ListLicenseConfigsUsageStatsResponse expectedResponse = + ListLicenseConfigsUsageStatsResponse.newBuilder() + .addAllLicenseConfigUsageStats(new ArrayList()) + .build(); + mockService.addResponse(expectedResponse); + + UserStoreName parent = UserStoreName.of("[PROJECT]", "[LOCATION]", "[USER_STORE]"); + + ListLicenseConfigsUsageStatsResponse actualResponse = + client.listLicenseConfigsUsageStats(parent); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listLicenseConfigsUsageStatsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + UserStoreName parent = UserStoreName.of("[PROJECT]", "[LOCATION]", "[USER_STORE]"); + client.listLicenseConfigsUsageStats(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listLicenseConfigsUsageStatsTest2() throws Exception { + ListLicenseConfigsUsageStatsResponse expectedResponse = + ListLicenseConfigsUsageStatsResponse.newBuilder() + .addAllLicenseConfigUsageStats(new ArrayList()) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-3682/locations/location-3682/userStores/userStore-3682"; + + ListLicenseConfigsUsageStatsResponse actualResponse = + client.listLicenseConfigsUsageStats(parent); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listLicenseConfigsUsageStatsExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-3682/locations/location-3682/userStores/userStore-3682"; + client.listLicenseConfigsUsageStats(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void batchUpdateUserLicensesTest() throws Exception { + BatchUpdateUserLicensesResponse expectedResponse = + BatchUpdateUserLicensesResponse.newBuilder() + .addAllUserLicenses(new ArrayList()) + .addAllErrorSamples(new ArrayList()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("batchUpdateUserLicensesTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + BatchUpdateUserLicensesRequest request = + BatchUpdateUserLicensesRequest.newBuilder() + .setParent(UserStoreName.of("[PROJECT]", "[LOCATION]", "[USER_STORE]").toString()) + .setDeleteUnassignedUserLicenses(true) + .build(); + + BatchUpdateUserLicensesResponse actualResponse = + client.batchUpdateUserLicensesAsync(request).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void batchUpdateUserLicensesExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + BatchUpdateUserLicensesRequest request = + BatchUpdateUserLicensesRequest.newBuilder() + .setParent(UserStoreName.of("[PROJECT]", "[LOCATION]", "[USER_STORE]").toString()) + .setDeleteUnassignedUserLicenses(true) + .build(); + client.batchUpdateUserLicensesAsync(request).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } +} diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1beta/UserLicenseServiceClientTest.java b/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1beta/UserLicenseServiceClientTest.java new file mode 100644 index 000000000000..32d37045c259 --- /dev/null +++ b/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1beta/UserLicenseServiceClientTest.java @@ -0,0 +1,317 @@ +/* + * 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.discoveryengine.v1beta; + +import static com.google.cloud.discoveryengine.v1beta.UserLicenseServiceClient.ListUserLicensesPagedResponse; + +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.testing.LocalChannelProvider; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.api.gax.grpc.testing.MockServiceHelper; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.api.gax.rpc.StatusCode; +import com.google.common.collect.Lists; +import com.google.longrunning.Operation; +import com.google.protobuf.AbstractMessage; +import com.google.protobuf.Any; +import com.google.rpc.Status; +import io.grpc.StatusRuntimeException; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import java.util.concurrent.ExecutionException; +import javax.annotation.Generated; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@Generated("by gapic-generator-java") +public class UserLicenseServiceClientTest { + private static MockLocations mockLocations; + private static MockServiceHelper mockServiceHelper; + private static MockUserLicenseService mockUserLicenseService; + private LocalChannelProvider channelProvider; + private UserLicenseServiceClient client; + + @BeforeClass + public static void startStaticServer() { + mockUserLicenseService = new MockUserLicenseService(); + mockLocations = new MockLocations(); + mockServiceHelper = + new MockServiceHelper( + UUID.randomUUID().toString(), + Arrays.asList(mockUserLicenseService, mockLocations)); + mockServiceHelper.start(); + } + + @AfterClass + public static void stopServer() { + mockServiceHelper.stop(); + } + + @Before + public void setUp() throws IOException { + mockServiceHelper.reset(); + channelProvider = mockServiceHelper.createChannelProvider(); + UserLicenseServiceSettings settings = + UserLicenseServiceSettings.newBuilder() + .setTransportChannelProvider(channelProvider) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = UserLicenseServiceClient.create(settings); + } + + @After + public void tearDown() throws Exception { + client.close(); + } + + @Test + public void listUserLicensesTest() throws Exception { + UserLicense responsesElement = UserLicense.newBuilder().build(); + ListUserLicensesResponse expectedResponse = + ListUserLicensesResponse.newBuilder() + .setNextPageToken("") + .addAllUserLicenses(Arrays.asList(responsesElement)) + .build(); + mockUserLicenseService.addResponse(expectedResponse); + + UserStoreName parent = UserStoreName.of("[PROJECT]", "[LOCATION]", "[USER_STORE]"); + + ListUserLicensesPagedResponse pagedListResponse = client.listUserLicenses(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getUserLicensesList().get(0), resources.get(0)); + + List actualRequests = mockUserLicenseService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListUserLicensesRequest actualRequest = ((ListUserLicensesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listUserLicensesExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockUserLicenseService.addException(exception); + + try { + UserStoreName parent = UserStoreName.of("[PROJECT]", "[LOCATION]", "[USER_STORE]"); + client.listUserLicenses(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listUserLicensesTest2() throws Exception { + UserLicense responsesElement = UserLicense.newBuilder().build(); + ListUserLicensesResponse expectedResponse = + ListUserLicensesResponse.newBuilder() + .setNextPageToken("") + .addAllUserLicenses(Arrays.asList(responsesElement)) + .build(); + mockUserLicenseService.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListUserLicensesPagedResponse pagedListResponse = client.listUserLicenses(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getUserLicensesList().get(0), resources.get(0)); + + List actualRequests = mockUserLicenseService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListUserLicensesRequest actualRequest = ((ListUserLicensesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listUserLicensesExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockUserLicenseService.addException(exception); + + try { + String parent = "parent-995424086"; + client.listUserLicenses(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listLicenseConfigsUsageStatsTest() throws Exception { + ListLicenseConfigsUsageStatsResponse expectedResponse = + ListLicenseConfigsUsageStatsResponse.newBuilder() + .addAllLicenseConfigUsageStats(new ArrayList()) + .build(); + mockUserLicenseService.addResponse(expectedResponse); + + UserStoreName parent = UserStoreName.of("[PROJECT]", "[LOCATION]", "[USER_STORE]"); + + ListLicenseConfigsUsageStatsResponse actualResponse = + client.listLicenseConfigsUsageStats(parent); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockUserLicenseService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListLicenseConfigsUsageStatsRequest actualRequest = + ((ListLicenseConfigsUsageStatsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listLicenseConfigsUsageStatsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockUserLicenseService.addException(exception); + + try { + UserStoreName parent = UserStoreName.of("[PROJECT]", "[LOCATION]", "[USER_STORE]"); + client.listLicenseConfigsUsageStats(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listLicenseConfigsUsageStatsTest2() throws Exception { + ListLicenseConfigsUsageStatsResponse expectedResponse = + ListLicenseConfigsUsageStatsResponse.newBuilder() + .addAllLicenseConfigUsageStats(new ArrayList()) + .build(); + mockUserLicenseService.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListLicenseConfigsUsageStatsResponse actualResponse = + client.listLicenseConfigsUsageStats(parent); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockUserLicenseService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListLicenseConfigsUsageStatsRequest actualRequest = + ((ListLicenseConfigsUsageStatsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listLicenseConfigsUsageStatsExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockUserLicenseService.addException(exception); + + try { + String parent = "parent-995424086"; + client.listLicenseConfigsUsageStats(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void batchUpdateUserLicensesTest() throws Exception { + BatchUpdateUserLicensesResponse expectedResponse = + BatchUpdateUserLicensesResponse.newBuilder() + .addAllUserLicenses(new ArrayList()) + .addAllErrorSamples(new ArrayList()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("batchUpdateUserLicensesTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockUserLicenseService.addResponse(resultOperation); + + BatchUpdateUserLicensesRequest request = + BatchUpdateUserLicensesRequest.newBuilder() + .setParent(UserStoreName.of("[PROJECT]", "[LOCATION]", "[USER_STORE]").toString()) + .setDeleteUnassignedUserLicenses(true) + .build(); + + BatchUpdateUserLicensesResponse actualResponse = + client.batchUpdateUserLicensesAsync(request).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockUserLicenseService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + BatchUpdateUserLicensesRequest actualRequest = + ((BatchUpdateUserLicensesRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getInlineSource(), actualRequest.getInlineSource()); + Assert.assertEquals(request.getParent(), actualRequest.getParent()); + Assert.assertEquals( + request.getDeleteUnassignedUserLicenses(), actualRequest.getDeleteUnassignedUserLicenses()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void batchUpdateUserLicensesExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockUserLicenseService.addException(exception); + + try { + BatchUpdateUserLicensesRequest request = + BatchUpdateUserLicensesRequest.newBuilder() + .setParent(UserStoreName.of("[PROJECT]", "[LOCATION]", "[USER_STORE]").toString()) + .setDeleteUnassignedUserLicenses(true) + .build(); + client.batchUpdateUserLicensesAsync(request).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } +} diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1beta/UserStoreServiceClientHttpJsonTest.java b/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1beta/UserStoreServiceClientHttpJsonTest.java new file mode 100644 index 000000000000..dc675ccdc323 --- /dev/null +++ b/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1beta/UserStoreServiceClientHttpJsonTest.java @@ -0,0 +1,239 @@ +/* + * 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.discoveryengine.v1beta; + +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.httpjson.GaxHttpJsonProperties; +import com.google.api.gax.httpjson.testing.MockHttpService; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ApiException; +import com.google.api.gax.rpc.ApiExceptionFactory; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.testing.FakeStatusCode; +import com.google.cloud.discoveryengine.v1beta.stub.HttpJsonUserStoreServiceStub; +import com.google.protobuf.FieldMask; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@Generated("by gapic-generator-java") +public class UserStoreServiceClientHttpJsonTest { + private static MockHttpService mockService; + private static UserStoreServiceClient client; + + @BeforeClass + public static void startStaticServer() throws IOException { + mockService = + new MockHttpService( + HttpJsonUserStoreServiceStub.getMethodDescriptors(), + UserStoreServiceSettings.getDefaultEndpoint()); + UserStoreServiceSettings settings = + UserStoreServiceSettings.newHttpJsonBuilder() + .setTransportChannelProvider( + UserStoreServiceSettings.defaultHttpJsonTransportProviderBuilder() + .setHttpTransport(mockService) + .build()) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = UserStoreServiceClient.create(settings); + } + + @AfterClass + public static void stopServer() { + client.close(); + } + + @Before + public void setUp() {} + + @After + public void tearDown() throws Exception { + mockService.reset(); + } + + @Test + public void getUserStoreTest() throws Exception { + UserStore expectedResponse = + UserStore.newBuilder() + .setName(UserStoreName.of("[PROJECT]", "[LOCATION]", "[USER_STORE]").toString()) + .setDisplayName("displayName1714148973") + .setDefaultLicenseConfig( + LicenseConfigName.of("[PROJECT]", "[LOCATION]", "[LICENSE_CONFIG]").toString()) + .setEnableLicenseAutoRegister(true) + .setEnableExpiredLicenseAutoUpdate(true) + .build(); + mockService.addResponse(expectedResponse); + + UserStoreName name = UserStoreName.of("[PROJECT]", "[LOCATION]", "[USER_STORE]"); + + UserStore actualResponse = client.getUserStore(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getUserStoreExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + UserStoreName name = UserStoreName.of("[PROJECT]", "[LOCATION]", "[USER_STORE]"); + client.getUserStore(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getUserStoreTest2() throws Exception { + UserStore expectedResponse = + UserStore.newBuilder() + .setName(UserStoreName.of("[PROJECT]", "[LOCATION]", "[USER_STORE]").toString()) + .setDisplayName("displayName1714148973") + .setDefaultLicenseConfig( + LicenseConfigName.of("[PROJECT]", "[LOCATION]", "[LICENSE_CONFIG]").toString()) + .setEnableLicenseAutoRegister(true) + .setEnableExpiredLicenseAutoUpdate(true) + .build(); + mockService.addResponse(expectedResponse); + + String name = "projects/project-5651/locations/location-5651/userStores/userStore-5651"; + + UserStore actualResponse = client.getUserStore(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getUserStoreExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "projects/project-5651/locations/location-5651/userStores/userStore-5651"; + client.getUserStore(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updateUserStoreTest() throws Exception { + UserStore expectedResponse = + UserStore.newBuilder() + .setName(UserStoreName.of("[PROJECT]", "[LOCATION]", "[USER_STORE]").toString()) + .setDisplayName("displayName1714148973") + .setDefaultLicenseConfig( + LicenseConfigName.of("[PROJECT]", "[LOCATION]", "[LICENSE_CONFIG]").toString()) + .setEnableLicenseAutoRegister(true) + .setEnableExpiredLicenseAutoUpdate(true) + .build(); + mockService.addResponse(expectedResponse); + + UserStore userStore = + UserStore.newBuilder() + .setName(UserStoreName.of("[PROJECT]", "[LOCATION]", "[USER_STORE]").toString()) + .setDisplayName("displayName1714148973") + .setDefaultLicenseConfig( + LicenseConfigName.of("[PROJECT]", "[LOCATION]", "[LICENSE_CONFIG]").toString()) + .setEnableLicenseAutoRegister(true) + .setEnableExpiredLicenseAutoUpdate(true) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + UserStore actualResponse = client.updateUserStore(userStore, updateMask); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void updateUserStoreExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + UserStore userStore = + UserStore.newBuilder() + .setName(UserStoreName.of("[PROJECT]", "[LOCATION]", "[USER_STORE]").toString()) + .setDisplayName("displayName1714148973") + .setDefaultLicenseConfig( + LicenseConfigName.of("[PROJECT]", "[LOCATION]", "[LICENSE_CONFIG]").toString()) + .setEnableLicenseAutoRegister(true) + .setEnableExpiredLicenseAutoUpdate(true) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateUserStore(userStore, updateMask); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } +} diff --git a/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1beta/UserStoreServiceClientTest.java b/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1beta/UserStoreServiceClientTest.java new file mode 100644 index 000000000000..5b273bcddfe5 --- /dev/null +++ b/java-discoveryengine/google-cloud-discoveryengine/src/test/java/com/google/cloud/discoveryengine/v1beta/UserStoreServiceClientTest.java @@ -0,0 +1,213 @@ +/* + * 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.discoveryengine.v1beta; + +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.testing.LocalChannelProvider; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.api.gax.grpc.testing.MockServiceHelper; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.protobuf.AbstractMessage; +import com.google.protobuf.FieldMask; +import io.grpc.StatusRuntimeException; +import java.io.IOException; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import javax.annotation.Generated; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@Generated("by gapic-generator-java") +public class UserStoreServiceClientTest { + private static MockLocations mockLocations; + private static MockServiceHelper mockServiceHelper; + private static MockUserStoreService mockUserStoreService; + private LocalChannelProvider channelProvider; + private UserStoreServiceClient client; + + @BeforeClass + public static void startStaticServer() { + mockUserStoreService = new MockUserStoreService(); + mockLocations = new MockLocations(); + mockServiceHelper = + new MockServiceHelper( + UUID.randomUUID().toString(), + Arrays.asList(mockUserStoreService, mockLocations)); + mockServiceHelper.start(); + } + + @AfterClass + public static void stopServer() { + mockServiceHelper.stop(); + } + + @Before + public void setUp() throws IOException { + mockServiceHelper.reset(); + channelProvider = mockServiceHelper.createChannelProvider(); + UserStoreServiceSettings settings = + UserStoreServiceSettings.newBuilder() + .setTransportChannelProvider(channelProvider) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = UserStoreServiceClient.create(settings); + } + + @After + public void tearDown() throws Exception { + client.close(); + } + + @Test + public void getUserStoreTest() throws Exception { + UserStore expectedResponse = + UserStore.newBuilder() + .setName(UserStoreName.of("[PROJECT]", "[LOCATION]", "[USER_STORE]").toString()) + .setDisplayName("displayName1714148973") + .setDefaultLicenseConfig( + LicenseConfigName.of("[PROJECT]", "[LOCATION]", "[LICENSE_CONFIG]").toString()) + .setEnableLicenseAutoRegister(true) + .setEnableExpiredLicenseAutoUpdate(true) + .build(); + mockUserStoreService.addResponse(expectedResponse); + + UserStoreName name = UserStoreName.of("[PROJECT]", "[LOCATION]", "[USER_STORE]"); + + UserStore actualResponse = client.getUserStore(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockUserStoreService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetUserStoreRequest actualRequest = ((GetUserStoreRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getUserStoreExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockUserStoreService.addException(exception); + + try { + UserStoreName name = UserStoreName.of("[PROJECT]", "[LOCATION]", "[USER_STORE]"); + client.getUserStore(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getUserStoreTest2() throws Exception { + UserStore expectedResponse = + UserStore.newBuilder() + .setName(UserStoreName.of("[PROJECT]", "[LOCATION]", "[USER_STORE]").toString()) + .setDisplayName("displayName1714148973") + .setDefaultLicenseConfig( + LicenseConfigName.of("[PROJECT]", "[LOCATION]", "[LICENSE_CONFIG]").toString()) + .setEnableLicenseAutoRegister(true) + .setEnableExpiredLicenseAutoUpdate(true) + .build(); + mockUserStoreService.addResponse(expectedResponse); + + String name = "name3373707"; + + UserStore actualResponse = client.getUserStore(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockUserStoreService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetUserStoreRequest actualRequest = ((GetUserStoreRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getUserStoreExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockUserStoreService.addException(exception); + + try { + String name = "name3373707"; + client.getUserStore(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updateUserStoreTest() throws Exception { + UserStore expectedResponse = + UserStore.newBuilder() + .setName(UserStoreName.of("[PROJECT]", "[LOCATION]", "[USER_STORE]").toString()) + .setDisplayName("displayName1714148973") + .setDefaultLicenseConfig( + LicenseConfigName.of("[PROJECT]", "[LOCATION]", "[LICENSE_CONFIG]").toString()) + .setEnableLicenseAutoRegister(true) + .setEnableExpiredLicenseAutoUpdate(true) + .build(); + mockUserStoreService.addResponse(expectedResponse); + + UserStore userStore = UserStore.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + UserStore actualResponse = client.updateUserStore(userStore, updateMask); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockUserStoreService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateUserStoreRequest actualRequest = ((UpdateUserStoreRequest) actualRequests.get(0)); + + Assert.assertEquals(userStore, actualRequest.getUserStore()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updateUserStoreExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockUserStoreService.addException(exception); + + try { + UserStore userStore = UserStore.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateUserStore(userStore, updateMask); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } +} diff --git a/java-discoveryengine/grpc-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/AclConfigServiceGrpc.java b/java-discoveryengine/grpc-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/AclConfigServiceGrpc.java new file mode 100644 index 000000000000..38f592619e30 --- /dev/null +++ b/java-discoveryengine/grpc-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/AclConfigServiceGrpc.java @@ -0,0 +1,569 @@ +/* + * 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.discoveryengine.v1beta; + +import static io.grpc.MethodDescriptor.generateFullMethodName; + +/** + * + * + *
            + * Service for managing Acl Configuration.
            + * 
            + */ +@io.grpc.stub.annotations.GrpcGenerated +public final class AclConfigServiceGrpc { + + private AclConfigServiceGrpc() {} + + public static final java.lang.String SERVICE_NAME = + "google.cloud.discoveryengine.v1beta.AclConfigService"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.discoveryengine.v1beta.UpdateAclConfigRequest, + com.google.cloud.discoveryengine.v1beta.AclConfig> + getUpdateAclConfigMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateAclConfig", + requestType = com.google.cloud.discoveryengine.v1beta.UpdateAclConfigRequest.class, + responseType = com.google.cloud.discoveryengine.v1beta.AclConfig.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.discoveryengine.v1beta.UpdateAclConfigRequest, + com.google.cloud.discoveryengine.v1beta.AclConfig> + getUpdateAclConfigMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.discoveryengine.v1beta.UpdateAclConfigRequest, + com.google.cloud.discoveryengine.v1beta.AclConfig> + getUpdateAclConfigMethod; + if ((getUpdateAclConfigMethod = AclConfigServiceGrpc.getUpdateAclConfigMethod) == null) { + synchronized (AclConfigServiceGrpc.class) { + if ((getUpdateAclConfigMethod = AclConfigServiceGrpc.getUpdateAclConfigMethod) == null) { + AclConfigServiceGrpc.getUpdateAclConfigMethod = + getUpdateAclConfigMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateAclConfig")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.discoveryengine.v1beta.UpdateAclConfigRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.discoveryengine.v1beta.AclConfig + .getDefaultInstance())) + .setSchemaDescriptor( + new AclConfigServiceMethodDescriptorSupplier("UpdateAclConfig")) + .build(); + } + } + } + return getUpdateAclConfigMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.discoveryengine.v1beta.GetAclConfigRequest, + com.google.cloud.discoveryengine.v1beta.AclConfig> + getGetAclConfigMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetAclConfig", + requestType = com.google.cloud.discoveryengine.v1beta.GetAclConfigRequest.class, + responseType = com.google.cloud.discoveryengine.v1beta.AclConfig.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.discoveryengine.v1beta.GetAclConfigRequest, + com.google.cloud.discoveryengine.v1beta.AclConfig> + getGetAclConfigMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.discoveryengine.v1beta.GetAclConfigRequest, + com.google.cloud.discoveryengine.v1beta.AclConfig> + getGetAclConfigMethod; + if ((getGetAclConfigMethod = AclConfigServiceGrpc.getGetAclConfigMethod) == null) { + synchronized (AclConfigServiceGrpc.class) { + if ((getGetAclConfigMethod = AclConfigServiceGrpc.getGetAclConfigMethod) == null) { + AclConfigServiceGrpc.getGetAclConfigMethod = + getGetAclConfigMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetAclConfig")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.discoveryengine.v1beta.GetAclConfigRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.discoveryengine.v1beta.AclConfig + .getDefaultInstance())) + .setSchemaDescriptor( + new AclConfigServiceMethodDescriptorSupplier("GetAclConfig")) + .build(); + } + } + } + return getGetAclConfigMethod; + } + + /** Creates a new async stub that supports all call types for the service */ + public static AclConfigServiceStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public AclConfigServiceStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new AclConfigServiceStub(channel, callOptions); + } + }; + return AclConfigServiceStub.newStub(factory, channel); + } + + /** Creates a new blocking-style stub that supports all types of calls on the service */ + public static AclConfigServiceBlockingV2Stub newBlockingV2Stub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public AclConfigServiceBlockingV2Stub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new AclConfigServiceBlockingV2Stub(channel, callOptions); + } + }; + return AclConfigServiceBlockingV2Stub.newStub(factory, channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static AclConfigServiceBlockingStub newBlockingStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public AclConfigServiceBlockingStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new AclConfigServiceBlockingStub(channel, callOptions); + } + }; + return AclConfigServiceBlockingStub.newStub(factory, channel); + } + + /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ + public static AclConfigServiceFutureStub newFutureStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public AclConfigServiceFutureStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new AclConfigServiceFutureStub(channel, callOptions); + } + }; + return AclConfigServiceFutureStub.newStub(factory, channel); + } + + /** + * + * + *
            +   * Service for managing Acl Configuration.
            +   * 
            + */ + public interface AsyncService { + + /** + * + * + *
            +     * Default ACL configuration for use in a location of a customer's project.
            +     * Updates will only reflect to new data stores. Existing data stores will
            +     * still use the old value.
            +     * 
            + */ + default void updateAclConfig( + com.google.cloud.discoveryengine.v1beta.UpdateAclConfigRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getUpdateAclConfigMethod(), responseObserver); + } + + /** + * + * + *
            +     * Gets the [AclConfig][google.cloud.discoveryengine.v1beta.AclConfig].
            +     * 
            + */ + default void getAclConfig( + com.google.cloud.discoveryengine.v1beta.GetAclConfigRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetAclConfigMethod(), responseObserver); + } + } + + /** + * Base class for the server implementation of the service AclConfigService. + * + *
            +   * Service for managing Acl Configuration.
            +   * 
            + */ + public abstract static class AclConfigServiceImplBase + implements io.grpc.BindableService, AsyncService { + + @java.lang.Override + public final io.grpc.ServerServiceDefinition bindService() { + return AclConfigServiceGrpc.bindService(this); + } + } + + /** + * A stub to allow clients to do asynchronous rpc calls to service AclConfigService. + * + *
            +   * Service for managing Acl Configuration.
            +   * 
            + */ + public static final class AclConfigServiceStub + extends io.grpc.stub.AbstractAsyncStub { + private AclConfigServiceStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected AclConfigServiceStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new AclConfigServiceStub(channel, callOptions); + } + + /** + * + * + *
            +     * Default ACL configuration for use in a location of a customer's project.
            +     * Updates will only reflect to new data stores. Existing data stores will
            +     * still use the old value.
            +     * 
            + */ + public void updateAclConfig( + com.google.cloud.discoveryengine.v1beta.UpdateAclConfigRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdateAclConfigMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
            +     * Gets the [AclConfig][google.cloud.discoveryengine.v1beta.AclConfig].
            +     * 
            + */ + public void getAclConfig( + com.google.cloud.discoveryengine.v1beta.GetAclConfigRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetAclConfigMethod(), getCallOptions()), + request, + responseObserver); + } + } + + /** + * A stub to allow clients to do synchronous rpc calls to service AclConfigService. + * + *
            +   * Service for managing Acl Configuration.
            +   * 
            + */ + public static final class AclConfigServiceBlockingV2Stub + extends io.grpc.stub.AbstractBlockingStub { + private AclConfigServiceBlockingV2Stub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected AclConfigServiceBlockingV2Stub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new AclConfigServiceBlockingV2Stub(channel, callOptions); + } + + /** + * + * + *
            +     * Default ACL configuration for use in a location of a customer's project.
            +     * Updates will only reflect to new data stores. Existing data stores will
            +     * still use the old value.
            +     * 
            + */ + public com.google.cloud.discoveryengine.v1beta.AclConfig updateAclConfig( + com.google.cloud.discoveryengine.v1beta.UpdateAclConfigRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getUpdateAclConfigMethod(), getCallOptions(), request); + } + + /** + * + * + *
            +     * Gets the [AclConfig][google.cloud.discoveryengine.v1beta.AclConfig].
            +     * 
            + */ + public com.google.cloud.discoveryengine.v1beta.AclConfig getAclConfig( + com.google.cloud.discoveryengine.v1beta.GetAclConfigRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getGetAclConfigMethod(), getCallOptions(), request); + } + } + + /** + * A stub to allow clients to do limited synchronous rpc calls to service AclConfigService. + * + *
            +   * Service for managing Acl Configuration.
            +   * 
            + */ + public static final class AclConfigServiceBlockingStub + extends io.grpc.stub.AbstractBlockingStub { + private AclConfigServiceBlockingStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected AclConfigServiceBlockingStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new AclConfigServiceBlockingStub(channel, callOptions); + } + + /** + * + * + *
            +     * Default ACL configuration for use in a location of a customer's project.
            +     * Updates will only reflect to new data stores. Existing data stores will
            +     * still use the old value.
            +     * 
            + */ + public com.google.cloud.discoveryengine.v1beta.AclConfig updateAclConfig( + com.google.cloud.discoveryengine.v1beta.UpdateAclConfigRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateAclConfigMethod(), getCallOptions(), request); + } + + /** + * + * + *
            +     * Gets the [AclConfig][google.cloud.discoveryengine.v1beta.AclConfig].
            +     * 
            + */ + public com.google.cloud.discoveryengine.v1beta.AclConfig getAclConfig( + com.google.cloud.discoveryengine.v1beta.GetAclConfigRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetAclConfigMethod(), getCallOptions(), request); + } + } + + /** + * A stub to allow clients to do ListenableFuture-style rpc calls to service AclConfigService. + * + *
            +   * Service for managing Acl Configuration.
            +   * 
            + */ + public static final class AclConfigServiceFutureStub + extends io.grpc.stub.AbstractFutureStub { + private AclConfigServiceFutureStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected AclConfigServiceFutureStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new AclConfigServiceFutureStub(channel, callOptions); + } + + /** + * + * + *
            +     * Default ACL configuration for use in a location of a customer's project.
            +     * Updates will only reflect to new data stores. Existing data stores will
            +     * still use the old value.
            +     * 
            + */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.discoveryengine.v1beta.AclConfig> + updateAclConfig(com.google.cloud.discoveryengine.v1beta.UpdateAclConfigRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdateAclConfigMethod(), getCallOptions()), request); + } + + /** + * + * + *
            +     * Gets the [AclConfig][google.cloud.discoveryengine.v1beta.AclConfig].
            +     * 
            + */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.discoveryengine.v1beta.AclConfig> + getAclConfig(com.google.cloud.discoveryengine.v1beta.GetAclConfigRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetAclConfigMethod(), getCallOptions()), request); + } + } + + private static final int METHODID_UPDATE_ACL_CONFIG = 0; + private static final int METHODID_GET_ACL_CONFIG = 1; + + private static final class MethodHandlers + implements io.grpc.stub.ServerCalls.UnaryMethod, + io.grpc.stub.ServerCalls.ServerStreamingMethod, + io.grpc.stub.ServerCalls.ClientStreamingMethod, + io.grpc.stub.ServerCalls.BidiStreamingMethod { + private final AsyncService serviceImpl; + private final int methodId; + + MethodHandlers(AsyncService serviceImpl, int methodId) { + this.serviceImpl = serviceImpl; + this.methodId = methodId; + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + case METHODID_UPDATE_ACL_CONFIG: + serviceImpl.updateAclConfig( + (com.google.cloud.discoveryengine.v1beta.UpdateAclConfigRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_GET_ACL_CONFIG: + serviceImpl.getAclConfig( + (com.google.cloud.discoveryengine.v1beta.GetAclConfigRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + default: + throw new AssertionError(); + } + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public io.grpc.stub.StreamObserver invoke( + io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + default: + throw new AssertionError(); + } + } + } + + public static final io.grpc.ServerServiceDefinition bindService(AsyncService service) { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getUpdateAclConfigMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.discoveryengine.v1beta.UpdateAclConfigRequest, + com.google.cloud.discoveryengine.v1beta.AclConfig>( + service, METHODID_UPDATE_ACL_CONFIG))) + .addMethod( + getGetAclConfigMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.discoveryengine.v1beta.GetAclConfigRequest, + com.google.cloud.discoveryengine.v1beta.AclConfig>( + service, METHODID_GET_ACL_CONFIG))) + .build(); + } + + private abstract static class AclConfigServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, + io.grpc.protobuf.ProtoServiceDescriptorSupplier { + AclConfigServiceBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return com.google.cloud.discoveryengine.v1beta.AclConfigServiceProto.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("AclConfigService"); + } + } + + private static final class AclConfigServiceFileDescriptorSupplier + extends AclConfigServiceBaseDescriptorSupplier { + AclConfigServiceFileDescriptorSupplier() {} + } + + private static final class AclConfigServiceMethodDescriptorSupplier + extends AclConfigServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final java.lang.String methodName; + + AclConfigServiceMethodDescriptorSupplier(java.lang.String methodName) { + this.methodName = methodName; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { + return getServiceDescriptor().findMethodByName(methodName); + } + } + + private static volatile io.grpc.ServiceDescriptor serviceDescriptor; + + public static io.grpc.ServiceDescriptor getServiceDescriptor() { + io.grpc.ServiceDescriptor result = serviceDescriptor; + if (result == null) { + synchronized (AclConfigServiceGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = + result = + io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new AclConfigServiceFileDescriptorSupplier()) + .addMethod(getUpdateAclConfigMethod()) + .addMethod(getGetAclConfigMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/java-discoveryengine/grpc-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/AssistantServiceGrpc.java b/java-discoveryengine/grpc-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/AssistantServiceGrpc.java new file mode 100644 index 000000000000..5ab41a1ba47f --- /dev/null +++ b/java-discoveryengine/grpc-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/AssistantServiceGrpc.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. + */ +package com.google.cloud.discoveryengine.v1beta; + +import static io.grpc.MethodDescriptor.generateFullMethodName; + +/** + * + * + *
            + * Service for managing Assistant configuration and assisting users.
            + * 
            + */ +@io.grpc.stub.annotations.GrpcGenerated +public final class AssistantServiceGrpc { + + private AssistantServiceGrpc() {} + + public static final java.lang.String SERVICE_NAME = + "google.cloud.discoveryengine.v1beta.AssistantService"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.discoveryengine.v1beta.StreamAssistRequest, + com.google.cloud.discoveryengine.v1beta.StreamAssistResponse> + getStreamAssistMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "StreamAssist", + requestType = com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.class, + responseType = com.google.cloud.discoveryengine.v1beta.StreamAssistResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING) + public static io.grpc.MethodDescriptor< + com.google.cloud.discoveryengine.v1beta.StreamAssistRequest, + com.google.cloud.discoveryengine.v1beta.StreamAssistResponse> + getStreamAssistMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.discoveryengine.v1beta.StreamAssistRequest, + com.google.cloud.discoveryengine.v1beta.StreamAssistResponse> + getStreamAssistMethod; + if ((getStreamAssistMethod = AssistantServiceGrpc.getStreamAssistMethod) == null) { + synchronized (AssistantServiceGrpc.class) { + if ((getStreamAssistMethod = AssistantServiceGrpc.getStreamAssistMethod) == null) { + AssistantServiceGrpc.getStreamAssistMethod = + getStreamAssistMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "StreamAssist")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.discoveryengine.v1beta.StreamAssistRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.discoveryengine.v1beta.StreamAssistResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new AssistantServiceMethodDescriptorSupplier("StreamAssist")) + .build(); + } + } + } + return getStreamAssistMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.discoveryengine.v1beta.CreateAssistantRequest, + com.google.cloud.discoveryengine.v1beta.Assistant> + getCreateAssistantMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateAssistant", + requestType = com.google.cloud.discoveryengine.v1beta.CreateAssistantRequest.class, + responseType = com.google.cloud.discoveryengine.v1beta.Assistant.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.discoveryengine.v1beta.CreateAssistantRequest, + com.google.cloud.discoveryengine.v1beta.Assistant> + getCreateAssistantMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.discoveryengine.v1beta.CreateAssistantRequest, + com.google.cloud.discoveryengine.v1beta.Assistant> + getCreateAssistantMethod; + if ((getCreateAssistantMethod = AssistantServiceGrpc.getCreateAssistantMethod) == null) { + synchronized (AssistantServiceGrpc.class) { + if ((getCreateAssistantMethod = AssistantServiceGrpc.getCreateAssistantMethod) == null) { + AssistantServiceGrpc.getCreateAssistantMethod = + getCreateAssistantMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateAssistant")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.discoveryengine.v1beta.CreateAssistantRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.discoveryengine.v1beta.Assistant + .getDefaultInstance())) + .setSchemaDescriptor( + new AssistantServiceMethodDescriptorSupplier("CreateAssistant")) + .build(); + } + } + } + return getCreateAssistantMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.discoveryengine.v1beta.DeleteAssistantRequest, com.google.protobuf.Empty> + getDeleteAssistantMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteAssistant", + requestType = com.google.cloud.discoveryengine.v1beta.DeleteAssistantRequest.class, + responseType = com.google.protobuf.Empty.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.discoveryengine.v1beta.DeleteAssistantRequest, com.google.protobuf.Empty> + getDeleteAssistantMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.discoveryengine.v1beta.DeleteAssistantRequest, + com.google.protobuf.Empty> + getDeleteAssistantMethod; + if ((getDeleteAssistantMethod = AssistantServiceGrpc.getDeleteAssistantMethod) == null) { + synchronized (AssistantServiceGrpc.class) { + if ((getDeleteAssistantMethod = AssistantServiceGrpc.getDeleteAssistantMethod) == null) { + AssistantServiceGrpc.getDeleteAssistantMethod = + getDeleteAssistantMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteAssistant")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.discoveryengine.v1beta.DeleteAssistantRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protobuf.Empty.getDefaultInstance())) + .setSchemaDescriptor( + new AssistantServiceMethodDescriptorSupplier("DeleteAssistant")) + .build(); + } + } + } + return getDeleteAssistantMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.discoveryengine.v1beta.UpdateAssistantRequest, + com.google.cloud.discoveryengine.v1beta.Assistant> + getUpdateAssistantMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateAssistant", + requestType = com.google.cloud.discoveryengine.v1beta.UpdateAssistantRequest.class, + responseType = com.google.cloud.discoveryengine.v1beta.Assistant.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.discoveryengine.v1beta.UpdateAssistantRequest, + com.google.cloud.discoveryengine.v1beta.Assistant> + getUpdateAssistantMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.discoveryengine.v1beta.UpdateAssistantRequest, + com.google.cloud.discoveryengine.v1beta.Assistant> + getUpdateAssistantMethod; + if ((getUpdateAssistantMethod = AssistantServiceGrpc.getUpdateAssistantMethod) == null) { + synchronized (AssistantServiceGrpc.class) { + if ((getUpdateAssistantMethod = AssistantServiceGrpc.getUpdateAssistantMethod) == null) { + AssistantServiceGrpc.getUpdateAssistantMethod = + getUpdateAssistantMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateAssistant")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.discoveryengine.v1beta.UpdateAssistantRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.discoveryengine.v1beta.Assistant + .getDefaultInstance())) + .setSchemaDescriptor( + new AssistantServiceMethodDescriptorSupplier("UpdateAssistant")) + .build(); + } + } + } + return getUpdateAssistantMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.discoveryengine.v1beta.GetAssistantRequest, + com.google.cloud.discoveryengine.v1beta.Assistant> + getGetAssistantMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetAssistant", + requestType = com.google.cloud.discoveryengine.v1beta.GetAssistantRequest.class, + responseType = com.google.cloud.discoveryengine.v1beta.Assistant.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.discoveryengine.v1beta.GetAssistantRequest, + com.google.cloud.discoveryengine.v1beta.Assistant> + getGetAssistantMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.discoveryengine.v1beta.GetAssistantRequest, + com.google.cloud.discoveryengine.v1beta.Assistant> + getGetAssistantMethod; + if ((getGetAssistantMethod = AssistantServiceGrpc.getGetAssistantMethod) == null) { + synchronized (AssistantServiceGrpc.class) { + if ((getGetAssistantMethod = AssistantServiceGrpc.getGetAssistantMethod) == null) { + AssistantServiceGrpc.getGetAssistantMethod = + getGetAssistantMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetAssistant")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.discoveryengine.v1beta.GetAssistantRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.discoveryengine.v1beta.Assistant + .getDefaultInstance())) + .setSchemaDescriptor( + new AssistantServiceMethodDescriptorSupplier("GetAssistant")) + .build(); + } + } + } + return getGetAssistantMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.discoveryengine.v1beta.ListAssistantsRequest, + com.google.cloud.discoveryengine.v1beta.ListAssistantsResponse> + getListAssistantsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListAssistants", + requestType = com.google.cloud.discoveryengine.v1beta.ListAssistantsRequest.class, + responseType = com.google.cloud.discoveryengine.v1beta.ListAssistantsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.discoveryengine.v1beta.ListAssistantsRequest, + com.google.cloud.discoveryengine.v1beta.ListAssistantsResponse> + getListAssistantsMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.discoveryengine.v1beta.ListAssistantsRequest, + com.google.cloud.discoveryengine.v1beta.ListAssistantsResponse> + getListAssistantsMethod; + if ((getListAssistantsMethod = AssistantServiceGrpc.getListAssistantsMethod) == null) { + synchronized (AssistantServiceGrpc.class) { + if ((getListAssistantsMethod = AssistantServiceGrpc.getListAssistantsMethod) == null) { + AssistantServiceGrpc.getListAssistantsMethod = + getListAssistantsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListAssistants")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.discoveryengine.v1beta.ListAssistantsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.discoveryengine.v1beta.ListAssistantsResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new AssistantServiceMethodDescriptorSupplier("ListAssistants")) + .build(); + } + } + } + return getListAssistantsMethod; + } + + /** Creates a new async stub that supports all call types for the service */ + public static AssistantServiceStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public AssistantServiceStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new AssistantServiceStub(channel, callOptions); + } + }; + return AssistantServiceStub.newStub(factory, channel); + } + + /** Creates a new blocking-style stub that supports all types of calls on the service */ + public static AssistantServiceBlockingV2Stub newBlockingV2Stub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public AssistantServiceBlockingV2Stub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new AssistantServiceBlockingV2Stub(channel, callOptions); + } + }; + return AssistantServiceBlockingV2Stub.newStub(factory, channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static AssistantServiceBlockingStub newBlockingStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public AssistantServiceBlockingStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new AssistantServiceBlockingStub(channel, callOptions); + } + }; + return AssistantServiceBlockingStub.newStub(factory, channel); + } + + /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ + public static AssistantServiceFutureStub newFutureStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public AssistantServiceFutureStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new AssistantServiceFutureStub(channel, callOptions); + } + }; + return AssistantServiceFutureStub.newStub(factory, channel); + } + + /** + * + * + *
            +   * Service for managing Assistant configuration and assisting users.
            +   * 
            + */ + public interface AsyncService { + + /** + * + * + *
            +     * Assists the user with a query in a streaming fashion.
            +     * 
            + */ + default void streamAssist( + com.google.cloud.discoveryengine.v1beta.StreamAssistRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getStreamAssistMethod(), responseObserver); + } + + /** + * + * + *
            +     * Creates an [Assistant][google.cloud.discoveryengine.v1beta.Assistant].
            +     * 
            + */ + default void createAssistant( + com.google.cloud.discoveryengine.v1beta.CreateAssistantRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getCreateAssistantMethod(), responseObserver); + } + + /** + * + * + *
            +     * Deletes an [Assistant][google.cloud.discoveryengine.v1beta.Assistant].
            +     * 
            + */ + default void deleteAssistant( + com.google.cloud.discoveryengine.v1beta.DeleteAssistantRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getDeleteAssistantMethod(), responseObserver); + } + + /** + * + * + *
            +     * Updates an [Assistant][google.cloud.discoveryengine.v1beta.Assistant]
            +     * 
            + */ + default void updateAssistant( + com.google.cloud.discoveryengine.v1beta.UpdateAssistantRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getUpdateAssistantMethod(), responseObserver); + } + + /** + * + * + *
            +     * Gets an [Assistant][google.cloud.discoveryengine.v1beta.Assistant].
            +     * 
            + */ + default void getAssistant( + com.google.cloud.discoveryengine.v1beta.GetAssistantRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetAssistantMethod(), responseObserver); + } + + /** + * + * + *
            +     * Lists all [Assistant][google.cloud.discoveryengine.v1beta.Assistant]s under
            +     * an [Engine][google.cloud.discoveryengine.v1beta.Engine].
            +     * 
            + */ + default void listAssistants( + com.google.cloud.discoveryengine.v1beta.ListAssistantsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListAssistantsMethod(), responseObserver); + } + } + + /** + * Base class for the server implementation of the service AssistantService. + * + *
            +   * Service for managing Assistant configuration and assisting users.
            +   * 
            + */ + public abstract static class AssistantServiceImplBase + implements io.grpc.BindableService, AsyncService { + + @java.lang.Override + public final io.grpc.ServerServiceDefinition bindService() { + return AssistantServiceGrpc.bindService(this); + } + } + + /** + * A stub to allow clients to do asynchronous rpc calls to service AssistantService. + * + *
            +   * Service for managing Assistant configuration and assisting users.
            +   * 
            + */ + public static final class AssistantServiceStub + extends io.grpc.stub.AbstractAsyncStub { + private AssistantServiceStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected AssistantServiceStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new AssistantServiceStub(channel, callOptions); + } + + /** + * + * + *
            +     * Assists the user with a query in a streaming fashion.
            +     * 
            + */ + public void streamAssist( + com.google.cloud.discoveryengine.v1beta.StreamAssistRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncServerStreamingCall( + getChannel().newCall(getStreamAssistMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
            +     * Creates an [Assistant][google.cloud.discoveryengine.v1beta.Assistant].
            +     * 
            + */ + public void createAssistant( + com.google.cloud.discoveryengine.v1beta.CreateAssistantRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateAssistantMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
            +     * Deletes an [Assistant][google.cloud.discoveryengine.v1beta.Assistant].
            +     * 
            + */ + public void deleteAssistant( + com.google.cloud.discoveryengine.v1beta.DeleteAssistantRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteAssistantMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
            +     * Updates an [Assistant][google.cloud.discoveryengine.v1beta.Assistant]
            +     * 
            + */ + public void updateAssistant( + com.google.cloud.discoveryengine.v1beta.UpdateAssistantRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdateAssistantMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
            +     * Gets an [Assistant][google.cloud.discoveryengine.v1beta.Assistant].
            +     * 
            + */ + public void getAssistant( + com.google.cloud.discoveryengine.v1beta.GetAssistantRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetAssistantMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
            +     * Lists all [Assistant][google.cloud.discoveryengine.v1beta.Assistant]s under
            +     * an [Engine][google.cloud.discoveryengine.v1beta.Engine].
            +     * 
            + */ + public void listAssistants( + com.google.cloud.discoveryengine.v1beta.ListAssistantsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListAssistantsMethod(), getCallOptions()), + request, + responseObserver); + } + } + + /** + * A stub to allow clients to do synchronous rpc calls to service AssistantService. + * + *
            +   * Service for managing Assistant configuration and assisting users.
            +   * 
            + */ + public static final class AssistantServiceBlockingV2Stub + extends io.grpc.stub.AbstractBlockingStub { + private AssistantServiceBlockingV2Stub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected AssistantServiceBlockingV2Stub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new AssistantServiceBlockingV2Stub(channel, callOptions); + } + + /** + * + * + *
            +     * Assists the user with a query in a streaming fashion.
            +     * 
            + */ + @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/10918") + public io.grpc.stub.BlockingClientCall< + ?, com.google.cloud.discoveryengine.v1beta.StreamAssistResponse> + streamAssist(com.google.cloud.discoveryengine.v1beta.StreamAssistRequest request) { + return io.grpc.stub.ClientCalls.blockingV2ServerStreamingCall( + getChannel(), getStreamAssistMethod(), getCallOptions(), request); + } + + /** + * + * + *
            +     * Creates an [Assistant][google.cloud.discoveryengine.v1beta.Assistant].
            +     * 
            + */ + public com.google.cloud.discoveryengine.v1beta.Assistant createAssistant( + com.google.cloud.discoveryengine.v1beta.CreateAssistantRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getCreateAssistantMethod(), getCallOptions(), request); + } + + /** + * + * + *
            +     * Deletes an [Assistant][google.cloud.discoveryengine.v1beta.Assistant].
            +     * 
            + */ + public com.google.protobuf.Empty deleteAssistant( + com.google.cloud.discoveryengine.v1beta.DeleteAssistantRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getDeleteAssistantMethod(), getCallOptions(), request); + } + + /** + * + * + *
            +     * Updates an [Assistant][google.cloud.discoveryengine.v1beta.Assistant]
            +     * 
            + */ + public com.google.cloud.discoveryengine.v1beta.Assistant updateAssistant( + com.google.cloud.discoveryengine.v1beta.UpdateAssistantRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getUpdateAssistantMethod(), getCallOptions(), request); + } + + /** + * + * + *
            +     * Gets an [Assistant][google.cloud.discoveryengine.v1beta.Assistant].
            +     * 
            + */ + public com.google.cloud.discoveryengine.v1beta.Assistant getAssistant( + com.google.cloud.discoveryengine.v1beta.GetAssistantRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getGetAssistantMethod(), getCallOptions(), request); + } + + /** + * + * + *
            +     * Lists all [Assistant][google.cloud.discoveryengine.v1beta.Assistant]s under
            +     * an [Engine][google.cloud.discoveryengine.v1beta.Engine].
            +     * 
            + */ + public com.google.cloud.discoveryengine.v1beta.ListAssistantsResponse listAssistants( + com.google.cloud.discoveryengine.v1beta.ListAssistantsRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getListAssistantsMethod(), getCallOptions(), request); + } + } + + /** + * A stub to allow clients to do limited synchronous rpc calls to service AssistantService. + * + *
            +   * Service for managing Assistant configuration and assisting users.
            +   * 
            + */ + public static final class AssistantServiceBlockingStub + extends io.grpc.stub.AbstractBlockingStub { + private AssistantServiceBlockingStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected AssistantServiceBlockingStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new AssistantServiceBlockingStub(channel, callOptions); + } + + /** + * + * + *
            +     * Assists the user with a query in a streaming fashion.
            +     * 
            + */ + public java.util.Iterator + streamAssist(com.google.cloud.discoveryengine.v1beta.StreamAssistRequest request) { + return io.grpc.stub.ClientCalls.blockingServerStreamingCall( + getChannel(), getStreamAssistMethod(), getCallOptions(), request); + } + + /** + * + * + *
            +     * Creates an [Assistant][google.cloud.discoveryengine.v1beta.Assistant].
            +     * 
            + */ + public com.google.cloud.discoveryengine.v1beta.Assistant createAssistant( + com.google.cloud.discoveryengine.v1beta.CreateAssistantRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateAssistantMethod(), getCallOptions(), request); + } + + /** + * + * + *
            +     * Deletes an [Assistant][google.cloud.discoveryengine.v1beta.Assistant].
            +     * 
            + */ + public com.google.protobuf.Empty deleteAssistant( + com.google.cloud.discoveryengine.v1beta.DeleteAssistantRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteAssistantMethod(), getCallOptions(), request); + } + + /** + * + * + *
            +     * Updates an [Assistant][google.cloud.discoveryengine.v1beta.Assistant]
            +     * 
            + */ + public com.google.cloud.discoveryengine.v1beta.Assistant updateAssistant( + com.google.cloud.discoveryengine.v1beta.UpdateAssistantRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateAssistantMethod(), getCallOptions(), request); + } + + /** + * + * + *
            +     * Gets an [Assistant][google.cloud.discoveryengine.v1beta.Assistant].
            +     * 
            + */ + public com.google.cloud.discoveryengine.v1beta.Assistant getAssistant( + com.google.cloud.discoveryengine.v1beta.GetAssistantRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetAssistantMethod(), getCallOptions(), request); + } + + /** + * + * + *
            +     * Lists all [Assistant][google.cloud.discoveryengine.v1beta.Assistant]s under
            +     * an [Engine][google.cloud.discoveryengine.v1beta.Engine].
            +     * 
            + */ + public com.google.cloud.discoveryengine.v1beta.ListAssistantsResponse listAssistants( + com.google.cloud.discoveryengine.v1beta.ListAssistantsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListAssistantsMethod(), getCallOptions(), request); + } + } + + /** + * A stub to allow clients to do ListenableFuture-style rpc calls to service AssistantService. + * + *
            +   * Service for managing Assistant configuration and assisting users.
            +   * 
            + */ + public static final class AssistantServiceFutureStub + extends io.grpc.stub.AbstractFutureStub { + private AssistantServiceFutureStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected AssistantServiceFutureStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new AssistantServiceFutureStub(channel, callOptions); + } + + /** + * + * + *
            +     * Creates an [Assistant][google.cloud.discoveryengine.v1beta.Assistant].
            +     * 
            + */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.discoveryengine.v1beta.Assistant> + createAssistant(com.google.cloud.discoveryengine.v1beta.CreateAssistantRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateAssistantMethod(), getCallOptions()), request); + } + + /** + * + * + *
            +     * Deletes an [Assistant][google.cloud.discoveryengine.v1beta.Assistant].
            +     * 
            + */ + public com.google.common.util.concurrent.ListenableFuture + deleteAssistant(com.google.cloud.discoveryengine.v1beta.DeleteAssistantRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteAssistantMethod(), getCallOptions()), request); + } + + /** + * + * + *
            +     * Updates an [Assistant][google.cloud.discoveryengine.v1beta.Assistant]
            +     * 
            + */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.discoveryengine.v1beta.Assistant> + updateAssistant(com.google.cloud.discoveryengine.v1beta.UpdateAssistantRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdateAssistantMethod(), getCallOptions()), request); + } + + /** + * + * + *
            +     * Gets an [Assistant][google.cloud.discoveryengine.v1beta.Assistant].
            +     * 
            + */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.discoveryengine.v1beta.Assistant> + getAssistant(com.google.cloud.discoveryengine.v1beta.GetAssistantRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetAssistantMethod(), getCallOptions()), request); + } + + /** + * + * + *
            +     * Lists all [Assistant][google.cloud.discoveryengine.v1beta.Assistant]s under
            +     * an [Engine][google.cloud.discoveryengine.v1beta.Engine].
            +     * 
            + */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.discoveryengine.v1beta.ListAssistantsResponse> + listAssistants(com.google.cloud.discoveryengine.v1beta.ListAssistantsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListAssistantsMethod(), getCallOptions()), request); + } + } + + private static final int METHODID_STREAM_ASSIST = 0; + private static final int METHODID_CREATE_ASSISTANT = 1; + private static final int METHODID_DELETE_ASSISTANT = 2; + private static final int METHODID_UPDATE_ASSISTANT = 3; + private static final int METHODID_GET_ASSISTANT = 4; + private static final int METHODID_LIST_ASSISTANTS = 5; + + private static final class MethodHandlers + implements io.grpc.stub.ServerCalls.UnaryMethod, + io.grpc.stub.ServerCalls.ServerStreamingMethod, + io.grpc.stub.ServerCalls.ClientStreamingMethod, + io.grpc.stub.ServerCalls.BidiStreamingMethod { + private final AsyncService serviceImpl; + private final int methodId; + + MethodHandlers(AsyncService serviceImpl, int methodId) { + this.serviceImpl = serviceImpl; + this.methodId = methodId; + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + case METHODID_STREAM_ASSIST: + serviceImpl.streamAssist( + (com.google.cloud.discoveryengine.v1beta.StreamAssistRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.discoveryengine.v1beta.StreamAssistResponse>) + responseObserver); + break; + case METHODID_CREATE_ASSISTANT: + serviceImpl.createAssistant( + (com.google.cloud.discoveryengine.v1beta.CreateAssistantRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_DELETE_ASSISTANT: + serviceImpl.deleteAssistant( + (com.google.cloud.discoveryengine.v1beta.DeleteAssistantRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_UPDATE_ASSISTANT: + serviceImpl.updateAssistant( + (com.google.cloud.discoveryengine.v1beta.UpdateAssistantRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_GET_ASSISTANT: + serviceImpl.getAssistant( + (com.google.cloud.discoveryengine.v1beta.GetAssistantRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_LIST_ASSISTANTS: + serviceImpl.listAssistants( + (com.google.cloud.discoveryengine.v1beta.ListAssistantsRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.discoveryengine.v1beta.ListAssistantsResponse>) + responseObserver); + break; + default: + throw new AssertionError(); + } + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public io.grpc.stub.StreamObserver invoke( + io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + default: + throw new AssertionError(); + } + } + } + + public static final io.grpc.ServerServiceDefinition bindService(AsyncService service) { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getStreamAssistMethod(), + io.grpc.stub.ServerCalls.asyncServerStreamingCall( + new MethodHandlers< + com.google.cloud.discoveryengine.v1beta.StreamAssistRequest, + com.google.cloud.discoveryengine.v1beta.StreamAssistResponse>( + service, METHODID_STREAM_ASSIST))) + .addMethod( + getCreateAssistantMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.discoveryengine.v1beta.CreateAssistantRequest, + com.google.cloud.discoveryengine.v1beta.Assistant>( + service, METHODID_CREATE_ASSISTANT))) + .addMethod( + getDeleteAssistantMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.discoveryengine.v1beta.DeleteAssistantRequest, + com.google.protobuf.Empty>(service, METHODID_DELETE_ASSISTANT))) + .addMethod( + getUpdateAssistantMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.discoveryengine.v1beta.UpdateAssistantRequest, + com.google.cloud.discoveryengine.v1beta.Assistant>( + service, METHODID_UPDATE_ASSISTANT))) + .addMethod( + getGetAssistantMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.discoveryengine.v1beta.GetAssistantRequest, + com.google.cloud.discoveryengine.v1beta.Assistant>( + service, METHODID_GET_ASSISTANT))) + .addMethod( + getListAssistantsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.discoveryengine.v1beta.ListAssistantsRequest, + com.google.cloud.discoveryengine.v1beta.ListAssistantsResponse>( + service, METHODID_LIST_ASSISTANTS))) + .build(); + } + + private abstract static class AssistantServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, + io.grpc.protobuf.ProtoServiceDescriptorSupplier { + AssistantServiceBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return com.google.cloud.discoveryengine.v1beta.AssistantServiceProto.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("AssistantService"); + } + } + + private static final class AssistantServiceFileDescriptorSupplier + extends AssistantServiceBaseDescriptorSupplier { + AssistantServiceFileDescriptorSupplier() {} + } + + private static final class AssistantServiceMethodDescriptorSupplier + extends AssistantServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final java.lang.String methodName; + + AssistantServiceMethodDescriptorSupplier(java.lang.String methodName) { + this.methodName = methodName; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { + return getServiceDescriptor().findMethodByName(methodName); + } + } + + private static volatile io.grpc.ServiceDescriptor serviceDescriptor; + + public static io.grpc.ServiceDescriptor getServiceDescriptor() { + io.grpc.ServiceDescriptor result = serviceDescriptor; + if (result == null) { + synchronized (AssistantServiceGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = + result = + io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new AssistantServiceFileDescriptorSupplier()) + .addMethod(getStreamAssistMethod()) + .addMethod(getCreateAssistantMethod()) + .addMethod(getDeleteAssistantMethod()) + .addMethod(getUpdateAssistantMethod()) + .addMethod(getGetAssistantMethod()) + .addMethod(getListAssistantsMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/java-discoveryengine/grpc-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/CmekConfigServiceGrpc.java b/java-discoveryengine/grpc-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/CmekConfigServiceGrpc.java new file mode 100644 index 000000000000..9a7df01bcff1 --- /dev/null +++ b/java-discoveryengine/grpc-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/CmekConfigServiceGrpc.java @@ -0,0 +1,840 @@ +/* + * 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.discoveryengine.v1beta; + +import static io.grpc.MethodDescriptor.generateFullMethodName; + +/** + * + * + *
            + * Service for managing CMEK related tasks
            + * 
            + */ +@io.grpc.stub.annotations.GrpcGenerated +public final class CmekConfigServiceGrpc { + + private CmekConfigServiceGrpc() {} + + public static final java.lang.String SERVICE_NAME = + "google.cloud.discoveryengine.v1beta.CmekConfigService"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.discoveryengine.v1beta.UpdateCmekConfigRequest, + com.google.longrunning.Operation> + getUpdateCmekConfigMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateCmekConfig", + requestType = com.google.cloud.discoveryengine.v1beta.UpdateCmekConfigRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.discoveryengine.v1beta.UpdateCmekConfigRequest, + com.google.longrunning.Operation> + getUpdateCmekConfigMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.discoveryengine.v1beta.UpdateCmekConfigRequest, + com.google.longrunning.Operation> + getUpdateCmekConfigMethod; + if ((getUpdateCmekConfigMethod = CmekConfigServiceGrpc.getUpdateCmekConfigMethod) == null) { + synchronized (CmekConfigServiceGrpc.class) { + if ((getUpdateCmekConfigMethod = CmekConfigServiceGrpc.getUpdateCmekConfigMethod) == null) { + CmekConfigServiceGrpc.getUpdateCmekConfigMethod = + getUpdateCmekConfigMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateCmekConfig")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.discoveryengine.v1beta.UpdateCmekConfigRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new CmekConfigServiceMethodDescriptorSupplier("UpdateCmekConfig")) + .build(); + } + } + } + return getUpdateCmekConfigMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.discoveryengine.v1beta.GetCmekConfigRequest, + com.google.cloud.discoveryengine.v1beta.CmekConfig> + getGetCmekConfigMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetCmekConfig", + requestType = com.google.cloud.discoveryengine.v1beta.GetCmekConfigRequest.class, + responseType = com.google.cloud.discoveryengine.v1beta.CmekConfig.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.discoveryengine.v1beta.GetCmekConfigRequest, + com.google.cloud.discoveryengine.v1beta.CmekConfig> + getGetCmekConfigMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.discoveryengine.v1beta.GetCmekConfigRequest, + com.google.cloud.discoveryengine.v1beta.CmekConfig> + getGetCmekConfigMethod; + if ((getGetCmekConfigMethod = CmekConfigServiceGrpc.getGetCmekConfigMethod) == null) { + synchronized (CmekConfigServiceGrpc.class) { + if ((getGetCmekConfigMethod = CmekConfigServiceGrpc.getGetCmekConfigMethod) == null) { + CmekConfigServiceGrpc.getGetCmekConfigMethod = + getGetCmekConfigMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetCmekConfig")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.discoveryengine.v1beta.GetCmekConfigRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.discoveryengine.v1beta.CmekConfig + .getDefaultInstance())) + .setSchemaDescriptor( + new CmekConfigServiceMethodDescriptorSupplier("GetCmekConfig")) + .build(); + } + } + } + return getGetCmekConfigMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.discoveryengine.v1beta.ListCmekConfigsRequest, + com.google.cloud.discoveryengine.v1beta.ListCmekConfigsResponse> + getListCmekConfigsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListCmekConfigs", + requestType = com.google.cloud.discoveryengine.v1beta.ListCmekConfigsRequest.class, + responseType = com.google.cloud.discoveryengine.v1beta.ListCmekConfigsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.discoveryengine.v1beta.ListCmekConfigsRequest, + com.google.cloud.discoveryengine.v1beta.ListCmekConfigsResponse> + getListCmekConfigsMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.discoveryengine.v1beta.ListCmekConfigsRequest, + com.google.cloud.discoveryengine.v1beta.ListCmekConfigsResponse> + getListCmekConfigsMethod; + if ((getListCmekConfigsMethod = CmekConfigServiceGrpc.getListCmekConfigsMethod) == null) { + synchronized (CmekConfigServiceGrpc.class) { + if ((getListCmekConfigsMethod = CmekConfigServiceGrpc.getListCmekConfigsMethod) == null) { + CmekConfigServiceGrpc.getListCmekConfigsMethod = + getListCmekConfigsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListCmekConfigs")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.discoveryengine.v1beta.ListCmekConfigsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.discoveryengine.v1beta.ListCmekConfigsResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new CmekConfigServiceMethodDescriptorSupplier("ListCmekConfigs")) + .build(); + } + } + } + return getListCmekConfigsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.discoveryengine.v1beta.DeleteCmekConfigRequest, + com.google.longrunning.Operation> + getDeleteCmekConfigMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteCmekConfig", + requestType = com.google.cloud.discoveryengine.v1beta.DeleteCmekConfigRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.discoveryengine.v1beta.DeleteCmekConfigRequest, + com.google.longrunning.Operation> + getDeleteCmekConfigMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.discoveryengine.v1beta.DeleteCmekConfigRequest, + com.google.longrunning.Operation> + getDeleteCmekConfigMethod; + if ((getDeleteCmekConfigMethod = CmekConfigServiceGrpc.getDeleteCmekConfigMethod) == null) { + synchronized (CmekConfigServiceGrpc.class) { + if ((getDeleteCmekConfigMethod = CmekConfigServiceGrpc.getDeleteCmekConfigMethod) == null) { + CmekConfigServiceGrpc.getDeleteCmekConfigMethod = + getDeleteCmekConfigMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteCmekConfig")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.discoveryengine.v1beta.DeleteCmekConfigRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new CmekConfigServiceMethodDescriptorSupplier("DeleteCmekConfig")) + .build(); + } + } + } + return getDeleteCmekConfigMethod; + } + + /** Creates a new async stub that supports all call types for the service */ + public static CmekConfigServiceStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public CmekConfigServiceStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new CmekConfigServiceStub(channel, callOptions); + } + }; + return CmekConfigServiceStub.newStub(factory, channel); + } + + /** Creates a new blocking-style stub that supports all types of calls on the service */ + public static CmekConfigServiceBlockingV2Stub newBlockingV2Stub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public CmekConfigServiceBlockingV2Stub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new CmekConfigServiceBlockingV2Stub(channel, callOptions); + } + }; + return CmekConfigServiceBlockingV2Stub.newStub(factory, channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static CmekConfigServiceBlockingStub newBlockingStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public CmekConfigServiceBlockingStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new CmekConfigServiceBlockingStub(channel, callOptions); + } + }; + return CmekConfigServiceBlockingStub.newStub(factory, channel); + } + + /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ + public static CmekConfigServiceFutureStub newFutureStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public CmekConfigServiceFutureStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new CmekConfigServiceFutureStub(channel, callOptions); + } + }; + return CmekConfigServiceFutureStub.newStub(factory, channel); + } + + /** + * + * + *
            +   * Service for managing CMEK related tasks
            +   * 
            + */ + public interface AsyncService { + + /** + * + * + *
            +     * Provisions a CMEK key for use in a location of a customer's project.
            +     * This method will also conduct location validation on the provided
            +     * cmekConfig to make sure the key is valid and can be used in the
            +     * selected location.
            +     * 
            + */ + default void updateCmekConfig( + com.google.cloud.discoveryengine.v1beta.UpdateCmekConfigRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getUpdateCmekConfigMethod(), responseObserver); + } + + /** + * + * + *
            +     * Gets the [CmekConfig][google.cloud.discoveryengine.v1beta.CmekConfig].
            +     * 
            + */ + default void getCmekConfig( + com.google.cloud.discoveryengine.v1beta.GetCmekConfigRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetCmekConfigMethod(), responseObserver); + } + + /** + * + * + *
            +     * Lists all the [CmekConfig][google.cloud.discoveryengine.v1beta.CmekConfig]s
            +     * with the project.
            +     * 
            + */ + default void listCmekConfigs( + com.google.cloud.discoveryengine.v1beta.ListCmekConfigsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListCmekConfigsMethod(), responseObserver); + } + + /** + * + * + *
            +     * De-provisions a CmekConfig.
            +     * 
            + */ + default void deleteCmekConfig( + com.google.cloud.discoveryengine.v1beta.DeleteCmekConfigRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getDeleteCmekConfigMethod(), responseObserver); + } + } + + /** + * Base class for the server implementation of the service CmekConfigService. + * + *
            +   * Service for managing CMEK related tasks
            +   * 
            + */ + public abstract static class CmekConfigServiceImplBase + implements io.grpc.BindableService, AsyncService { + + @java.lang.Override + public final io.grpc.ServerServiceDefinition bindService() { + return CmekConfigServiceGrpc.bindService(this); + } + } + + /** + * A stub to allow clients to do asynchronous rpc calls to service CmekConfigService. + * + *
            +   * Service for managing CMEK related tasks
            +   * 
            + */ + public static final class CmekConfigServiceStub + extends io.grpc.stub.AbstractAsyncStub { + private CmekConfigServiceStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected CmekConfigServiceStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new CmekConfigServiceStub(channel, callOptions); + } + + /** + * + * + *
            +     * Provisions a CMEK key for use in a location of a customer's project.
            +     * This method will also conduct location validation on the provided
            +     * cmekConfig to make sure the key is valid and can be used in the
            +     * selected location.
            +     * 
            + */ + public void updateCmekConfig( + com.google.cloud.discoveryengine.v1beta.UpdateCmekConfigRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdateCmekConfigMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
            +     * Gets the [CmekConfig][google.cloud.discoveryengine.v1beta.CmekConfig].
            +     * 
            + */ + public void getCmekConfig( + com.google.cloud.discoveryengine.v1beta.GetCmekConfigRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetCmekConfigMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
            +     * Lists all the [CmekConfig][google.cloud.discoveryengine.v1beta.CmekConfig]s
            +     * with the project.
            +     * 
            + */ + public void listCmekConfigs( + com.google.cloud.discoveryengine.v1beta.ListCmekConfigsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListCmekConfigsMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
            +     * De-provisions a CmekConfig.
            +     * 
            + */ + public void deleteCmekConfig( + com.google.cloud.discoveryengine.v1beta.DeleteCmekConfigRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteCmekConfigMethod(), getCallOptions()), + request, + responseObserver); + } + } + + /** + * A stub to allow clients to do synchronous rpc calls to service CmekConfigService. + * + *
            +   * Service for managing CMEK related tasks
            +   * 
            + */ + public static final class CmekConfigServiceBlockingV2Stub + extends io.grpc.stub.AbstractBlockingStub { + private CmekConfigServiceBlockingV2Stub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected CmekConfigServiceBlockingV2Stub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new CmekConfigServiceBlockingV2Stub(channel, callOptions); + } + + /** + * + * + *
            +     * Provisions a CMEK key for use in a location of a customer's project.
            +     * This method will also conduct location validation on the provided
            +     * cmekConfig to make sure the key is valid and can be used in the
            +     * selected location.
            +     * 
            + */ + public com.google.longrunning.Operation updateCmekConfig( + com.google.cloud.discoveryengine.v1beta.UpdateCmekConfigRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getUpdateCmekConfigMethod(), getCallOptions(), request); + } + + /** + * + * + *
            +     * Gets the [CmekConfig][google.cloud.discoveryengine.v1beta.CmekConfig].
            +     * 
            + */ + public com.google.cloud.discoveryengine.v1beta.CmekConfig getCmekConfig( + com.google.cloud.discoveryengine.v1beta.GetCmekConfigRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getGetCmekConfigMethod(), getCallOptions(), request); + } + + /** + * + * + *
            +     * Lists all the [CmekConfig][google.cloud.discoveryengine.v1beta.CmekConfig]s
            +     * with the project.
            +     * 
            + */ + public com.google.cloud.discoveryengine.v1beta.ListCmekConfigsResponse listCmekConfigs( + com.google.cloud.discoveryengine.v1beta.ListCmekConfigsRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getListCmekConfigsMethod(), getCallOptions(), request); + } + + /** + * + * + *
            +     * De-provisions a CmekConfig.
            +     * 
            + */ + public com.google.longrunning.Operation deleteCmekConfig( + com.google.cloud.discoveryengine.v1beta.DeleteCmekConfigRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getDeleteCmekConfigMethod(), getCallOptions(), request); + } + } + + /** + * A stub to allow clients to do limited synchronous rpc calls to service CmekConfigService. + * + *
            +   * Service for managing CMEK related tasks
            +   * 
            + */ + public static final class CmekConfigServiceBlockingStub + extends io.grpc.stub.AbstractBlockingStub { + private CmekConfigServiceBlockingStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected CmekConfigServiceBlockingStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new CmekConfigServiceBlockingStub(channel, callOptions); + } + + /** + * + * + *
            +     * Provisions a CMEK key for use in a location of a customer's project.
            +     * This method will also conduct location validation on the provided
            +     * cmekConfig to make sure the key is valid and can be used in the
            +     * selected location.
            +     * 
            + */ + public com.google.longrunning.Operation updateCmekConfig( + com.google.cloud.discoveryengine.v1beta.UpdateCmekConfigRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateCmekConfigMethod(), getCallOptions(), request); + } + + /** + * + * + *
            +     * Gets the [CmekConfig][google.cloud.discoveryengine.v1beta.CmekConfig].
            +     * 
            + */ + public com.google.cloud.discoveryengine.v1beta.CmekConfig getCmekConfig( + com.google.cloud.discoveryengine.v1beta.GetCmekConfigRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetCmekConfigMethod(), getCallOptions(), request); + } + + /** + * + * + *
            +     * Lists all the [CmekConfig][google.cloud.discoveryengine.v1beta.CmekConfig]s
            +     * with the project.
            +     * 
            + */ + public com.google.cloud.discoveryengine.v1beta.ListCmekConfigsResponse listCmekConfigs( + com.google.cloud.discoveryengine.v1beta.ListCmekConfigsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListCmekConfigsMethod(), getCallOptions(), request); + } + + /** + * + * + *
            +     * De-provisions a CmekConfig.
            +     * 
            + */ + public com.google.longrunning.Operation deleteCmekConfig( + com.google.cloud.discoveryengine.v1beta.DeleteCmekConfigRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteCmekConfigMethod(), getCallOptions(), request); + } + } + + /** + * A stub to allow clients to do ListenableFuture-style rpc calls to service CmekConfigService. + * + *
            +   * Service for managing CMEK related tasks
            +   * 
            + */ + public static final class CmekConfigServiceFutureStub + extends io.grpc.stub.AbstractFutureStub { + private CmekConfigServiceFutureStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected CmekConfigServiceFutureStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new CmekConfigServiceFutureStub(channel, callOptions); + } + + /** + * + * + *
            +     * Provisions a CMEK key for use in a location of a customer's project.
            +     * This method will also conduct location validation on the provided
            +     * cmekConfig to make sure the key is valid and can be used in the
            +     * selected location.
            +     * 
            + */ + public com.google.common.util.concurrent.ListenableFuture + updateCmekConfig(com.google.cloud.discoveryengine.v1beta.UpdateCmekConfigRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdateCmekConfigMethod(), getCallOptions()), request); + } + + /** + * + * + *
            +     * Gets the [CmekConfig][google.cloud.discoveryengine.v1beta.CmekConfig].
            +     * 
            + */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.discoveryengine.v1beta.CmekConfig> + getCmekConfig(com.google.cloud.discoveryengine.v1beta.GetCmekConfigRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetCmekConfigMethod(), getCallOptions()), request); + } + + /** + * + * + *
            +     * Lists all the [CmekConfig][google.cloud.discoveryengine.v1beta.CmekConfig]s
            +     * with the project.
            +     * 
            + */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.discoveryengine.v1beta.ListCmekConfigsResponse> + listCmekConfigs(com.google.cloud.discoveryengine.v1beta.ListCmekConfigsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListCmekConfigsMethod(), getCallOptions()), request); + } + + /** + * + * + *
            +     * De-provisions a CmekConfig.
            +     * 
            + */ + public com.google.common.util.concurrent.ListenableFuture + deleteCmekConfig(com.google.cloud.discoveryengine.v1beta.DeleteCmekConfigRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteCmekConfigMethod(), getCallOptions()), request); + } + } + + private static final int METHODID_UPDATE_CMEK_CONFIG = 0; + private static final int METHODID_GET_CMEK_CONFIG = 1; + private static final int METHODID_LIST_CMEK_CONFIGS = 2; + private static final int METHODID_DELETE_CMEK_CONFIG = 3; + + private static final class MethodHandlers + implements io.grpc.stub.ServerCalls.UnaryMethod, + io.grpc.stub.ServerCalls.ServerStreamingMethod, + io.grpc.stub.ServerCalls.ClientStreamingMethod, + io.grpc.stub.ServerCalls.BidiStreamingMethod { + private final AsyncService serviceImpl; + private final int methodId; + + MethodHandlers(AsyncService serviceImpl, int methodId) { + this.serviceImpl = serviceImpl; + this.methodId = methodId; + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + case METHODID_UPDATE_CMEK_CONFIG: + serviceImpl.updateCmekConfig( + (com.google.cloud.discoveryengine.v1beta.UpdateCmekConfigRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_CMEK_CONFIG: + serviceImpl.getCmekConfig( + (com.google.cloud.discoveryengine.v1beta.GetCmekConfigRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_LIST_CMEK_CONFIGS: + serviceImpl.listCmekConfigs( + (com.google.cloud.discoveryengine.v1beta.ListCmekConfigsRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.discoveryengine.v1beta.ListCmekConfigsResponse>) + responseObserver); + break; + case METHODID_DELETE_CMEK_CONFIG: + serviceImpl.deleteCmekConfig( + (com.google.cloud.discoveryengine.v1beta.DeleteCmekConfigRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + default: + throw new AssertionError(); + } + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public io.grpc.stub.StreamObserver invoke( + io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + default: + throw new AssertionError(); + } + } + } + + public static final io.grpc.ServerServiceDefinition bindService(AsyncService service) { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getUpdateCmekConfigMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.discoveryengine.v1beta.UpdateCmekConfigRequest, + com.google.longrunning.Operation>(service, METHODID_UPDATE_CMEK_CONFIG))) + .addMethod( + getGetCmekConfigMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.discoveryengine.v1beta.GetCmekConfigRequest, + com.google.cloud.discoveryengine.v1beta.CmekConfig>( + service, METHODID_GET_CMEK_CONFIG))) + .addMethod( + getListCmekConfigsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.discoveryengine.v1beta.ListCmekConfigsRequest, + com.google.cloud.discoveryengine.v1beta.ListCmekConfigsResponse>( + service, METHODID_LIST_CMEK_CONFIGS))) + .addMethod( + getDeleteCmekConfigMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.discoveryengine.v1beta.DeleteCmekConfigRequest, + com.google.longrunning.Operation>(service, METHODID_DELETE_CMEK_CONFIG))) + .build(); + } + + private abstract static class CmekConfigServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, + io.grpc.protobuf.ProtoServiceDescriptorSupplier { + CmekConfigServiceBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return com.google.cloud.discoveryengine.v1beta.CmekConfigServiceProto.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("CmekConfigService"); + } + } + + private static final class CmekConfigServiceFileDescriptorSupplier + extends CmekConfigServiceBaseDescriptorSupplier { + CmekConfigServiceFileDescriptorSupplier() {} + } + + private static final class CmekConfigServiceMethodDescriptorSupplier + extends CmekConfigServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final java.lang.String methodName; + + CmekConfigServiceMethodDescriptorSupplier(java.lang.String methodName) { + this.methodName = methodName; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { + return getServiceDescriptor().findMethodByName(methodName); + } + } + + private static volatile io.grpc.ServiceDescriptor serviceDescriptor; + + public static io.grpc.ServiceDescriptor getServiceDescriptor() { + io.grpc.ServiceDescriptor result = serviceDescriptor; + if (result == null) { + synchronized (CmekConfigServiceGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = + result = + io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new CmekConfigServiceFileDescriptorSupplier()) + .addMethod(getUpdateCmekConfigMethod()) + .addMethod(getGetCmekConfigMethod()) + .addMethod(getListCmekConfigsMethod()) + .addMethod(getDeleteCmekConfigMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/java-discoveryengine/grpc-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/CompletionServiceGrpc.java b/java-discoveryengine/grpc-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/CompletionServiceGrpc.java index 84969a0e9493..80927cd5769c 100644 --- a/java-discoveryengine/grpc-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/CompletionServiceGrpc.java +++ b/java-discoveryengine/grpc-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/CompletionServiceGrpc.java @@ -343,6 +343,53 @@ private CompletionServiceGrpc() {} return getPurgeCompletionSuggestionsMethod; } + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.discoveryengine.v1beta.RemoveSuggestionRequest, + com.google.cloud.discoveryengine.v1beta.RemoveSuggestionResponse> + getRemoveSuggestionMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "RemoveSuggestion", + requestType = com.google.cloud.discoveryengine.v1beta.RemoveSuggestionRequest.class, + responseType = com.google.cloud.discoveryengine.v1beta.RemoveSuggestionResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.discoveryengine.v1beta.RemoveSuggestionRequest, + com.google.cloud.discoveryengine.v1beta.RemoveSuggestionResponse> + getRemoveSuggestionMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.discoveryengine.v1beta.RemoveSuggestionRequest, + com.google.cloud.discoveryengine.v1beta.RemoveSuggestionResponse> + getRemoveSuggestionMethod; + if ((getRemoveSuggestionMethod = CompletionServiceGrpc.getRemoveSuggestionMethod) == null) { + synchronized (CompletionServiceGrpc.class) { + if ((getRemoveSuggestionMethod = CompletionServiceGrpc.getRemoveSuggestionMethod) == null) { + CompletionServiceGrpc.getRemoveSuggestionMethod = + getRemoveSuggestionMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "RemoveSuggestion")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.discoveryengine.v1beta.RemoveSuggestionRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.discoveryengine.v1beta.RemoveSuggestionResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new CompletionServiceMethodDescriptorSupplier("RemoveSuggestion")) + .build(); + } + } + } + return getRemoveSuggestionMethod; + } + /** Creates a new async stub that supports all call types for the service */ public static CompletionServiceStub newStub(io.grpc.Channel channel) { io.grpc.stub.AbstractStub.StubFactory factory = @@ -500,6 +547,26 @@ default void purgeCompletionSuggestions( io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( getPurgeCompletionSuggestionsMethod(), responseObserver); } + + /** + * + * + *
            +     * Removes the search history suggestion in an engine for a user. This will
            +     * remove the suggestion from being returned in the
            +     * [AdvancedCompleteQueryResponse.recent_search_suggestions][google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryResponse.recent_search_suggestions]
            +     * for this user. If the user searches the same suggestion again, the new
            +     * history will override and suggest this suggestion again.
            +     * 
            + */ + default void removeSuggestion( + com.google.cloud.discoveryengine.v1beta.RemoveSuggestionRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.discoveryengine.v1beta.RemoveSuggestionResponse> + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getRemoveSuggestionMethod(), responseObserver); + } } /** @@ -643,6 +710,28 @@ public void purgeCompletionSuggestions( request, responseObserver); } + + /** + * + * + *
            +     * Removes the search history suggestion in an engine for a user. This will
            +     * remove the suggestion from being returned in the
            +     * [AdvancedCompleteQueryResponse.recent_search_suggestions][google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryResponse.recent_search_suggestions]
            +     * for this user. If the user searches the same suggestion again, the new
            +     * history will override and suggest this suggestion again.
            +     * 
            + */ + public void removeSuggestion( + com.google.cloud.discoveryengine.v1beta.RemoveSuggestionRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.discoveryengine.v1beta.RemoveSuggestionResponse> + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getRemoveSuggestionMethod(), getCallOptions()), + request, + responseObserver); + } } /** @@ -757,6 +846,24 @@ public com.google.longrunning.Operation purgeCompletionSuggestions( return io.grpc.stub.ClientCalls.blockingV2UnaryCall( getChannel(), getPurgeCompletionSuggestionsMethod(), getCallOptions(), request); } + + /** + * + * + *
            +     * Removes the search history suggestion in an engine for a user. This will
            +     * remove the suggestion from being returned in the
            +     * [AdvancedCompleteQueryResponse.recent_search_suggestions][google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryResponse.recent_search_suggestions]
            +     * for this user. If the user searches the same suggestion again, the new
            +     * history will override and suggest this suggestion again.
            +     * 
            + */ + public com.google.cloud.discoveryengine.v1beta.RemoveSuggestionResponse removeSuggestion( + com.google.cloud.discoveryengine.v1beta.RemoveSuggestionRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getRemoveSuggestionMethod(), getCallOptions(), request); + } } /** @@ -865,6 +972,23 @@ public com.google.longrunning.Operation purgeCompletionSuggestions( return io.grpc.stub.ClientCalls.blockingUnaryCall( getChannel(), getPurgeCompletionSuggestionsMethod(), getCallOptions(), request); } + + /** + * + * + *
            +     * Removes the search history suggestion in an engine for a user. This will
            +     * remove the suggestion from being returned in the
            +     * [AdvancedCompleteQueryResponse.recent_search_suggestions][google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryResponse.recent_search_suggestions]
            +     * for this user. If the user searches the same suggestion again, the new
            +     * history will override and suggest this suggestion again.
            +     * 
            + */ + public com.google.cloud.discoveryengine.v1beta.RemoveSuggestionResponse removeSuggestion( + com.google.cloud.discoveryengine.v1beta.RemoveSuggestionRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getRemoveSuggestionMethod(), getCallOptions(), request); + } } /** @@ -981,6 +1105,24 @@ protected CompletionServiceFutureStub build( return io.grpc.stub.ClientCalls.futureUnaryCall( getChannel().newCall(getPurgeCompletionSuggestionsMethod(), getCallOptions()), request); } + + /** + * + * + *
            +     * Removes the search history suggestion in an engine for a user. This will
            +     * remove the suggestion from being returned in the
            +     * [AdvancedCompleteQueryResponse.recent_search_suggestions][google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryResponse.recent_search_suggestions]
            +     * for this user. If the user searches the same suggestion again, the new
            +     * history will override and suggest this suggestion again.
            +     * 
            + */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.discoveryengine.v1beta.RemoveSuggestionResponse> + removeSuggestion(com.google.cloud.discoveryengine.v1beta.RemoveSuggestionRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getRemoveSuggestionMethod(), getCallOptions()), request); + } } private static final int METHODID_COMPLETE_QUERY = 0; @@ -989,6 +1131,7 @@ protected CompletionServiceFutureStub build( private static final int METHODID_PURGE_SUGGESTION_DENY_LIST_ENTRIES = 3; private static final int METHODID_IMPORT_COMPLETION_SUGGESTIONS = 4; private static final int METHODID_PURGE_COMPLETION_SUGGESTIONS = 5; + private static final int METHODID_REMOVE_SUGGESTION = 6; private static final class MethodHandlers implements io.grpc.stub.ServerCalls.UnaryMethod, @@ -1043,6 +1186,13 @@ public void invoke(Req request, io.grpc.stub.StreamObserver responseObserv (com.google.cloud.discoveryengine.v1beta.PurgeCompletionSuggestionsRequest) request, (io.grpc.stub.StreamObserver) responseObserver); break; + case METHODID_REMOVE_SUGGESTION: + serviceImpl.removeSuggestion( + (com.google.cloud.discoveryengine.v1beta.RemoveSuggestionRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.discoveryengine.v1beta.RemoveSuggestionResponse>) + responseObserver); + break; default: throw new AssertionError(); } @@ -1103,6 +1253,13 @@ public static final io.grpc.ServerServiceDefinition bindService(AsyncService ser com.google.cloud.discoveryengine.v1beta.PurgeCompletionSuggestionsRequest, com.google.longrunning.Operation>( service, METHODID_PURGE_COMPLETION_SUGGESTIONS))) + .addMethod( + getRemoveSuggestionMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.discoveryengine.v1beta.RemoveSuggestionRequest, + com.google.cloud.discoveryengine.v1beta.RemoveSuggestionResponse>( + service, METHODID_REMOVE_SUGGESTION))) .build(); } @@ -1160,6 +1317,7 @@ public static io.grpc.ServiceDescriptor getServiceDescriptor() { .addMethod(getPurgeSuggestionDenyListEntriesMethod()) .addMethod(getImportCompletionSuggestionsMethod()) .addMethod(getPurgeCompletionSuggestionsMethod()) + .addMethod(getRemoveSuggestionMethod()) .build(); } } diff --git a/java-discoveryengine/grpc-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ConversationalSearchServiceGrpc.java b/java-discoveryengine/grpc-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ConversationalSearchServiceGrpc.java index fb5fd4077d94..f3d6ca260b06 100644 --- a/java-discoveryengine/grpc-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ConversationalSearchServiceGrpc.java +++ b/java-discoveryengine/grpc-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ConversationalSearchServiceGrpc.java @@ -386,6 +386,57 @@ private ConversationalSearchServiceGrpc() {} return getAnswerQueryMethod; } + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest, + com.google.cloud.discoveryengine.v1beta.AnswerQueryResponse> + getStreamAnswerQueryMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "StreamAnswerQuery", + requestType = com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.class, + responseType = com.google.cloud.discoveryengine.v1beta.AnswerQueryResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING) + public static io.grpc.MethodDescriptor< + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest, + com.google.cloud.discoveryengine.v1beta.AnswerQueryResponse> + getStreamAnswerQueryMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest, + com.google.cloud.discoveryengine.v1beta.AnswerQueryResponse> + getStreamAnswerQueryMethod; + if ((getStreamAnswerQueryMethod = ConversationalSearchServiceGrpc.getStreamAnswerQueryMethod) + == null) { + synchronized (ConversationalSearchServiceGrpc.class) { + if ((getStreamAnswerQueryMethod = + ConversationalSearchServiceGrpc.getStreamAnswerQueryMethod) + == null) { + ConversationalSearchServiceGrpc.getStreamAnswerQueryMethod = + getStreamAnswerQueryMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "StreamAnswerQuery")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.discoveryengine.v1beta.AnswerQueryResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new ConversationalSearchServiceMethodDescriptorSupplier( + "StreamAnswerQuery")) + .build(); + } + } + } + return getStreamAnswerQueryMethod; + } + private static volatile io.grpc.MethodDescriptor< com.google.cloud.discoveryengine.v1beta.GetAnswerRequest, com.google.cloud.discoveryengine.v1beta.Answer> @@ -843,6 +894,26 @@ default void answerQuery( getAnswerQueryMethod(), responseObserver); } + /** + * + * + *
            +     * Answer query method (streaming).
            +     * It takes one
            +     * [AnswerQueryRequest][google.cloud.discoveryengine.v1beta.AnswerQueryRequest]
            +     * and returns multiple
            +     * [AnswerQueryResponse][google.cloud.discoveryengine.v1beta.AnswerQueryResponse]
            +     * messages in a stream.
            +     * 
            + */ + default void streamAnswerQuery( + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getStreamAnswerQueryMethod(), responseObserver); + } + /** * * @@ -1104,6 +1175,28 @@ public void answerQuery( responseObserver); } + /** + * + * + *
            +     * Answer query method (streaming).
            +     * It takes one
            +     * [AnswerQueryRequest][google.cloud.discoveryengine.v1beta.AnswerQueryRequest]
            +     * and returns multiple
            +     * [AnswerQueryResponse][google.cloud.discoveryengine.v1beta.AnswerQueryResponse]
            +     * messages in a stream.
            +     * 
            + */ + public void streamAnswerQuery( + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncServerStreamingCall( + getChannel().newCall(getStreamAnswerQueryMethod(), getCallOptions()), + request, + responseObserver); + } + /** * * @@ -1338,6 +1431,26 @@ public com.google.cloud.discoveryengine.v1beta.AnswerQueryResponse answerQuery( getChannel(), getAnswerQueryMethod(), getCallOptions(), request); } + /** + * + * + *
            +     * Answer query method (streaming).
            +     * It takes one
            +     * [AnswerQueryRequest][google.cloud.discoveryengine.v1beta.AnswerQueryRequest]
            +     * and returns multiple
            +     * [AnswerQueryResponse][google.cloud.discoveryengine.v1beta.AnswerQueryResponse]
            +     * messages in a stream.
            +     * 
            + */ + @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/10918") + public io.grpc.stub.BlockingClientCall< + ?, com.google.cloud.discoveryengine.v1beta.AnswerQueryResponse> + streamAnswerQuery(com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest request) { + return io.grpc.stub.ClientCalls.blockingV2ServerStreamingCall( + getChannel(), getStreamAnswerQueryMethod(), getCallOptions(), request); + } + /** * * @@ -1553,6 +1666,24 @@ public com.google.cloud.discoveryengine.v1beta.AnswerQueryResponse answerQuery( getChannel(), getAnswerQueryMethod(), getCallOptions(), request); } + /** + * + * + *
            +     * Answer query method (streaming).
            +     * It takes one
            +     * [AnswerQueryRequest][google.cloud.discoveryengine.v1beta.AnswerQueryRequest]
            +     * and returns multiple
            +     * [AnswerQueryResponse][google.cloud.discoveryengine.v1beta.AnswerQueryResponse]
            +     * messages in a stream.
            +     * 
            + */ + public java.util.Iterator + streamAnswerQuery(com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest request) { + return io.grpc.stub.ClientCalls.blockingServerStreamingCall( + getChannel(), getStreamAnswerQueryMethod(), getCallOptions(), request); + } + /** * * @@ -1871,12 +2002,13 @@ protected ConversationalSearchServiceFutureStub build( private static final int METHODID_GET_CONVERSATION = 4; private static final int METHODID_LIST_CONVERSATIONS = 5; private static final int METHODID_ANSWER_QUERY = 6; - private static final int METHODID_GET_ANSWER = 7; - private static final int METHODID_CREATE_SESSION = 8; - private static final int METHODID_DELETE_SESSION = 9; - private static final int METHODID_UPDATE_SESSION = 10; - private static final int METHODID_GET_SESSION = 11; - private static final int METHODID_LIST_SESSIONS = 12; + private static final int METHODID_STREAM_ANSWER_QUERY = 7; + private static final int METHODID_GET_ANSWER = 8; + private static final int METHODID_CREATE_SESSION = 9; + private static final int METHODID_DELETE_SESSION = 10; + private static final int METHODID_UPDATE_SESSION = 11; + private static final int METHODID_GET_SESSION = 12; + private static final int METHODID_LIST_SESSIONS = 13; private static final class MethodHandlers implements io.grpc.stub.ServerCalls.UnaryMethod, @@ -1939,6 +2071,13 @@ public void invoke(Req request, io.grpc.stub.StreamObserver responseObserv com.google.cloud.discoveryengine.v1beta.AnswerQueryResponse>) responseObserver); break; + case METHODID_STREAM_ANSWER_QUERY: + serviceImpl.streamAnswerQuery( + (com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.discoveryengine.v1beta.AnswerQueryResponse>) + responseObserver); + break; case METHODID_GET_ANSWER: serviceImpl.getAnswer( (com.google.cloud.discoveryengine.v1beta.GetAnswerRequest) request, @@ -2041,6 +2180,13 @@ public static final io.grpc.ServerServiceDefinition bindService(AsyncService ser com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest, com.google.cloud.discoveryengine.v1beta.AnswerQueryResponse>( service, METHODID_ANSWER_QUERY))) + .addMethod( + getStreamAnswerQueryMethod(), + io.grpc.stub.ServerCalls.asyncServerStreamingCall( + new MethodHandlers< + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest, + com.google.cloud.discoveryengine.v1beta.AnswerQueryResponse>( + service, METHODID_STREAM_ANSWER_QUERY))) .addMethod( getGetAnswerMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall( @@ -2140,6 +2286,7 @@ public static io.grpc.ServiceDescriptor getServiceDescriptor() { .addMethod(getGetConversationMethod()) .addMethod(getListConversationsMethod()) .addMethod(getAnswerQueryMethod()) + .addMethod(getStreamAnswerQueryMethod()) .addMethod(getGetAnswerMethod()) .addMethod(getCreateSessionMethod()) .addMethod(getDeleteSessionMethod()) diff --git a/java-discoveryengine/grpc-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/EngineServiceGrpc.java b/java-discoveryengine/grpc-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/EngineServiceGrpc.java index 6cfeb102674e..cb10de297cfd 100644 --- a/java-discoveryengine/grpc-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/EngineServiceGrpc.java +++ b/java-discoveryengine/grpc-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/EngineServiceGrpc.java @@ -399,6 +399,84 @@ private EngineServiceGrpc() {} return getTuneEngineMethod; } + private static volatile io.grpc.MethodDescriptor< + com.google.iam.v1.GetIamPolicyRequest, com.google.iam.v1.Policy> + getGetIamPolicyMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetIamPolicy", + requestType = com.google.iam.v1.GetIamPolicyRequest.class, + responseType = com.google.iam.v1.Policy.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.iam.v1.GetIamPolicyRequest, com.google.iam.v1.Policy> + getGetIamPolicyMethod() { + io.grpc.MethodDescriptor + getGetIamPolicyMethod; + if ((getGetIamPolicyMethod = EngineServiceGrpc.getGetIamPolicyMethod) == null) { + synchronized (EngineServiceGrpc.class) { + if ((getGetIamPolicyMethod = EngineServiceGrpc.getGetIamPolicyMethod) == null) { + EngineServiceGrpc.getGetIamPolicyMethod = + getGetIamPolicyMethod = + io.grpc.MethodDescriptor + .newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetIamPolicy")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.iam.v1.GetIamPolicyRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.iam.v1.Policy.getDefaultInstance())) + .setSchemaDescriptor( + new EngineServiceMethodDescriptorSupplier("GetIamPolicy")) + .build(); + } + } + } + return getGetIamPolicyMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.iam.v1.SetIamPolicyRequest, com.google.iam.v1.Policy> + getSetIamPolicyMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "SetIamPolicy", + requestType = com.google.iam.v1.SetIamPolicyRequest.class, + responseType = com.google.iam.v1.Policy.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.iam.v1.SetIamPolicyRequest, com.google.iam.v1.Policy> + getSetIamPolicyMethod() { + io.grpc.MethodDescriptor + getSetIamPolicyMethod; + if ((getSetIamPolicyMethod = EngineServiceGrpc.getSetIamPolicyMethod) == null) { + synchronized (EngineServiceGrpc.class) { + if ((getSetIamPolicyMethod = EngineServiceGrpc.getSetIamPolicyMethod) == null) { + EngineServiceGrpc.getSetIamPolicyMethod = + getSetIamPolicyMethod = + io.grpc.MethodDescriptor + .newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "SetIamPolicy")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.iam.v1.SetIamPolicyRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.iam.v1.Policy.getDefaultInstance())) + .setSchemaDescriptor( + new EngineServiceMethodDescriptorSupplier("SetIamPolicy")) + .build(); + } + } + } + return getSetIamPolicyMethod; + } + /** Creates a new async stub that supports all call types for the service */ public static EngineServiceStub newStub(io.grpc.Channel channel) { io.grpc.stub.AbstractStub.StubFactory factory = @@ -467,7 +545,7 @@ public interface AsyncService { * * *
            -     * Creates a [Engine][google.cloud.discoveryengine.v1beta.Engine].
            +     * Creates an [Engine][google.cloud.discoveryengine.v1beta.Engine].
                  * 
            */ default void createEngine( @@ -481,7 +559,7 @@ default void createEngine( * * *
            -     * Deletes a [Engine][google.cloud.discoveryengine.v1beta.Engine].
            +     * Deletes an [Engine][google.cloud.discoveryengine.v1beta.Engine].
                  * 
            */ default void deleteEngine( @@ -510,7 +588,7 @@ default void updateEngine( * * *
            -     * Gets a [Engine][google.cloud.discoveryengine.v1beta.Engine].
            +     * Gets an [Engine][google.cloud.discoveryengine.v1beta.Engine].
                  * 
            */ default void getEngine( @@ -540,7 +618,8 @@ default void listEngines( * * *
            -     * Pauses the training of an existing engine. Only applicable if
            +     * Pauses the training of an existing
            +     * [Engine][google.cloud.discoveryengine.v1beta.Engine]. Only applicable if
                  * [SolutionType][google.cloud.discoveryengine.v1beta.SolutionType] is
                  * [SOLUTION_TYPE_RECOMMENDATION][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_RECOMMENDATION].
                  * 
            @@ -557,7 +636,8 @@ default void pauseEngine( * * *
            -     * Resumes the training of an existing engine. Only applicable if
            +     * Resumes the training of an existing
            +     * [Engine][google.cloud.discoveryengine.v1beta.Engine]. Only applicable if
                  * [SolutionType][google.cloud.discoveryengine.v1beta.SolutionType] is
                  * [SOLUTION_TYPE_RECOMMENDATION][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_RECOMMENDATION].
                  * 
            @@ -574,7 +654,8 @@ default void resumeEngine( * * *
            -     * Tunes an existing engine. Only applicable if
            +     * Tunes an existing [Engine][google.cloud.discoveryengine.v1beta.Engine].
            +     * Only applicable if
                  * [SolutionType][google.cloud.discoveryengine.v1beta.SolutionType] is
                  * [SOLUTION_TYPE_RECOMMENDATION][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_RECOMMENDATION].
                  * 
            @@ -584,6 +665,48 @@ default void tuneEngine( io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getTuneEngineMethod(), responseObserver); } + + /** + * + * + *
            +     * Gets the IAM access control policy for an
            +     * [Engine][google.cloud.discoveryengine.v1beta.Engine]. A `NOT_FOUND` error
            +     * is returned if the resource does not exist. An empty policy is returned if
            +     * the resource exists but does not have a policy set on it.
            +     * 
            + */ + default void getIamPolicy( + com.google.iam.v1.GetIamPolicyRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetIamPolicyMethod(), responseObserver); + } + + /** + * + * + *
            +     * Sets the IAM access control policy for an
            +     * [Engine][google.cloud.discoveryengine.v1beta.Engine]. A `NOT_FOUND` error
            +     * is returned if the resource does not exist.
            +     * **Important:** When setting a policy directly on an Engine resource,
            +     * the only recommended roles in the bindings are:
            +     * `roles/discoveryengine.admin`,
            +     * `roles/discoveryengine.agentspaceAdmin`,
            +     * `roles/discoveryengine.user`,
            +     * `roles/discoveryengine.agentspaceUser`,
            +     * `roles/discoveryengine.viewer`,
            +     * `roles/discoveryengine.agentspaceViewer`.
            +     * Attempting to grant any other role will result in a warning in logging.
            +     * 
            + */ + default void setIamPolicy( + com.google.iam.v1.SetIamPolicyRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getSetIamPolicyMethod(), responseObserver); + } } /** @@ -626,7 +749,7 @@ protected EngineServiceStub build(io.grpc.Channel channel, io.grpc.CallOptions c * * *
            -     * Creates a [Engine][google.cloud.discoveryengine.v1beta.Engine].
            +     * Creates an [Engine][google.cloud.discoveryengine.v1beta.Engine].
                  * 
            */ public void createEngine( @@ -642,7 +765,7 @@ public void createEngine( * * *
            -     * Deletes a [Engine][google.cloud.discoveryengine.v1beta.Engine].
            +     * Deletes an [Engine][google.cloud.discoveryengine.v1beta.Engine].
                  * 
            */ public void deleteEngine( @@ -675,7 +798,7 @@ public void updateEngine( * * *
            -     * Gets a [Engine][google.cloud.discoveryengine.v1beta.Engine].
            +     * Gets an [Engine][google.cloud.discoveryengine.v1beta.Engine].
                  * 
            */ public void getEngine( @@ -708,7 +831,8 @@ public void listEngines( * * *
            -     * Pauses the training of an existing engine. Only applicable if
            +     * Pauses the training of an existing
            +     * [Engine][google.cloud.discoveryengine.v1beta.Engine]. Only applicable if
                  * [SolutionType][google.cloud.discoveryengine.v1beta.SolutionType] is
                  * [SOLUTION_TYPE_RECOMMENDATION][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_RECOMMENDATION].
                  * 
            @@ -727,7 +851,8 @@ public void pauseEngine( * * *
            -     * Resumes the training of an existing engine. Only applicable if
            +     * Resumes the training of an existing
            +     * [Engine][google.cloud.discoveryengine.v1beta.Engine]. Only applicable if
                  * [SolutionType][google.cloud.discoveryengine.v1beta.SolutionType] is
                  * [SOLUTION_TYPE_RECOMMENDATION][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_RECOMMENDATION].
                  * 
            @@ -746,7 +871,8 @@ public void resumeEngine( * * *
            -     * Tunes an existing engine. Only applicable if
            +     * Tunes an existing [Engine][google.cloud.discoveryengine.v1beta.Engine].
            +     * Only applicable if
                  * [SolutionType][google.cloud.discoveryengine.v1beta.SolutionType] is
                  * [SOLUTION_TYPE_RECOMMENDATION][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_RECOMMENDATION].
                  * 
            @@ -757,6 +883,52 @@ public void tuneEngine( io.grpc.stub.ClientCalls.asyncUnaryCall( getChannel().newCall(getTuneEngineMethod(), getCallOptions()), request, responseObserver); } + + /** + * + * + *
            +     * Gets the IAM access control policy for an
            +     * [Engine][google.cloud.discoveryengine.v1beta.Engine]. A `NOT_FOUND` error
            +     * is returned if the resource does not exist. An empty policy is returned if
            +     * the resource exists but does not have a policy set on it.
            +     * 
            + */ + public void getIamPolicy( + com.google.iam.v1.GetIamPolicyRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetIamPolicyMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
            +     * Sets the IAM access control policy for an
            +     * [Engine][google.cloud.discoveryengine.v1beta.Engine]. A `NOT_FOUND` error
            +     * is returned if the resource does not exist.
            +     * **Important:** When setting a policy directly on an Engine resource,
            +     * the only recommended roles in the bindings are:
            +     * `roles/discoveryengine.admin`,
            +     * `roles/discoveryengine.agentspaceAdmin`,
            +     * `roles/discoveryengine.user`,
            +     * `roles/discoveryengine.agentspaceUser`,
            +     * `roles/discoveryengine.viewer`,
            +     * `roles/discoveryengine.agentspaceViewer`.
            +     * Attempting to grant any other role will result in a warning in logging.
            +     * 
            + */ + public void setIamPolicy( + com.google.iam.v1.SetIamPolicyRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getSetIamPolicyMethod(), getCallOptions()), + request, + responseObserver); + } } /** @@ -783,7 +955,7 @@ protected EngineServiceBlockingV2Stub build( * * *
            -     * Creates a [Engine][google.cloud.discoveryengine.v1beta.Engine].
            +     * Creates an [Engine][google.cloud.discoveryengine.v1beta.Engine].
                  * 
            */ public com.google.longrunning.Operation createEngine( @@ -797,7 +969,7 @@ public com.google.longrunning.Operation createEngine( * * *
            -     * Deletes a [Engine][google.cloud.discoveryengine.v1beta.Engine].
            +     * Deletes an [Engine][google.cloud.discoveryengine.v1beta.Engine].
                  * 
            */ public com.google.longrunning.Operation deleteEngine( @@ -825,7 +997,7 @@ public com.google.cloud.discoveryengine.v1beta.Engine updateEngine( * * *
            -     * Gets a [Engine][google.cloud.discoveryengine.v1beta.Engine].
            +     * Gets an [Engine][google.cloud.discoveryengine.v1beta.Engine].
                  * 
            */ public com.google.cloud.discoveryengine.v1beta.Engine getEngine( @@ -854,7 +1026,8 @@ public com.google.cloud.discoveryengine.v1beta.ListEnginesResponse listEngines( * * *
            -     * Pauses the training of an existing engine. Only applicable if
            +     * Pauses the training of an existing
            +     * [Engine][google.cloud.discoveryengine.v1beta.Engine]. Only applicable if
                  * [SolutionType][google.cloud.discoveryengine.v1beta.SolutionType] is
                  * [SOLUTION_TYPE_RECOMMENDATION][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_RECOMMENDATION].
                  * 
            @@ -870,7 +1043,8 @@ public com.google.cloud.discoveryengine.v1beta.Engine pauseEngine( * * *
            -     * Resumes the training of an existing engine. Only applicable if
            +     * Resumes the training of an existing
            +     * [Engine][google.cloud.discoveryengine.v1beta.Engine]. Only applicable if
                  * [SolutionType][google.cloud.discoveryengine.v1beta.SolutionType] is
                  * [SOLUTION_TYPE_RECOMMENDATION][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_RECOMMENDATION].
                  * 
            @@ -886,7 +1060,8 @@ public com.google.cloud.discoveryengine.v1beta.Engine resumeEngine( * * *
            -     * Tunes an existing engine. Only applicable if
            +     * Tunes an existing [Engine][google.cloud.discoveryengine.v1beta.Engine].
            +     * Only applicable if
                  * [SolutionType][google.cloud.discoveryengine.v1beta.SolutionType] is
                  * [SOLUTION_TYPE_RECOMMENDATION][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_RECOMMENDATION].
                  * 
            @@ -897,6 +1072,46 @@ public com.google.longrunning.Operation tuneEngine( return io.grpc.stub.ClientCalls.blockingV2UnaryCall( getChannel(), getTuneEngineMethod(), getCallOptions(), request); } + + /** + * + * + *
            +     * Gets the IAM access control policy for an
            +     * [Engine][google.cloud.discoveryengine.v1beta.Engine]. A `NOT_FOUND` error
            +     * is returned if the resource does not exist. An empty policy is returned if
            +     * the resource exists but does not have a policy set on it.
            +     * 
            + */ + public com.google.iam.v1.Policy getIamPolicy(com.google.iam.v1.GetIamPolicyRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getGetIamPolicyMethod(), getCallOptions(), request); + } + + /** + * + * + *
            +     * Sets the IAM access control policy for an
            +     * [Engine][google.cloud.discoveryengine.v1beta.Engine]. A `NOT_FOUND` error
            +     * is returned if the resource does not exist.
            +     * **Important:** When setting a policy directly on an Engine resource,
            +     * the only recommended roles in the bindings are:
            +     * `roles/discoveryengine.admin`,
            +     * `roles/discoveryengine.agentspaceAdmin`,
            +     * `roles/discoveryengine.user`,
            +     * `roles/discoveryengine.agentspaceUser`,
            +     * `roles/discoveryengine.viewer`,
            +     * `roles/discoveryengine.agentspaceViewer`.
            +     * Attempting to grant any other role will result in a warning in logging.
            +     * 
            + */ + public com.google.iam.v1.Policy setIamPolicy(com.google.iam.v1.SetIamPolicyRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getSetIamPolicyMethod(), getCallOptions(), request); + } } /** @@ -923,7 +1138,7 @@ protected EngineServiceBlockingStub build( * * *
            -     * Creates a [Engine][google.cloud.discoveryengine.v1beta.Engine].
            +     * Creates an [Engine][google.cloud.discoveryengine.v1beta.Engine].
                  * 
            */ public com.google.longrunning.Operation createEngine( @@ -936,7 +1151,7 @@ public com.google.longrunning.Operation createEngine( * * *
            -     * Deletes a [Engine][google.cloud.discoveryengine.v1beta.Engine].
            +     * Deletes an [Engine][google.cloud.discoveryengine.v1beta.Engine].
                  * 
            */ public com.google.longrunning.Operation deleteEngine( @@ -962,7 +1177,7 @@ public com.google.cloud.discoveryengine.v1beta.Engine updateEngine( * * *
            -     * Gets a [Engine][google.cloud.discoveryengine.v1beta.Engine].
            +     * Gets an [Engine][google.cloud.discoveryengine.v1beta.Engine].
                  * 
            */ public com.google.cloud.discoveryengine.v1beta.Engine getEngine( @@ -989,7 +1204,8 @@ public com.google.cloud.discoveryengine.v1beta.ListEnginesResponse listEngines( * * *
            -     * Pauses the training of an existing engine. Only applicable if
            +     * Pauses the training of an existing
            +     * [Engine][google.cloud.discoveryengine.v1beta.Engine]. Only applicable if
                  * [SolutionType][google.cloud.discoveryengine.v1beta.SolutionType] is
                  * [SOLUTION_TYPE_RECOMMENDATION][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_RECOMMENDATION].
                  * 
            @@ -1004,7 +1220,8 @@ public com.google.cloud.discoveryengine.v1beta.Engine pauseEngine( * * *
            -     * Resumes the training of an existing engine. Only applicable if
            +     * Resumes the training of an existing
            +     * [Engine][google.cloud.discoveryengine.v1beta.Engine]. Only applicable if
                  * [SolutionType][google.cloud.discoveryengine.v1beta.SolutionType] is
                  * [SOLUTION_TYPE_RECOMMENDATION][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_RECOMMENDATION].
                  * 
            @@ -1019,7 +1236,8 @@ public com.google.cloud.discoveryengine.v1beta.Engine resumeEngine( * * *
            -     * Tunes an existing engine. Only applicable if
            +     * Tunes an existing [Engine][google.cloud.discoveryengine.v1beta.Engine].
            +     * Only applicable if
                  * [SolutionType][google.cloud.discoveryengine.v1beta.SolutionType] is
                  * [SOLUTION_TYPE_RECOMMENDATION][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_RECOMMENDATION].
                  * 
            @@ -1029,6 +1247,44 @@ public com.google.longrunning.Operation tuneEngine( return io.grpc.stub.ClientCalls.blockingUnaryCall( getChannel(), getTuneEngineMethod(), getCallOptions(), request); } + + /** + * + * + *
            +     * Gets the IAM access control policy for an
            +     * [Engine][google.cloud.discoveryengine.v1beta.Engine]. A `NOT_FOUND` error
            +     * is returned if the resource does not exist. An empty policy is returned if
            +     * the resource exists but does not have a policy set on it.
            +     * 
            + */ + public com.google.iam.v1.Policy getIamPolicy(com.google.iam.v1.GetIamPolicyRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetIamPolicyMethod(), getCallOptions(), request); + } + + /** + * + * + *
            +     * Sets the IAM access control policy for an
            +     * [Engine][google.cloud.discoveryengine.v1beta.Engine]. A `NOT_FOUND` error
            +     * is returned if the resource does not exist.
            +     * **Important:** When setting a policy directly on an Engine resource,
            +     * the only recommended roles in the bindings are:
            +     * `roles/discoveryengine.admin`,
            +     * `roles/discoveryengine.agentspaceAdmin`,
            +     * `roles/discoveryengine.user`,
            +     * `roles/discoveryengine.agentspaceUser`,
            +     * `roles/discoveryengine.viewer`,
            +     * `roles/discoveryengine.agentspaceViewer`.
            +     * Attempting to grant any other role will result in a warning in logging.
            +     * 
            + */ + public com.google.iam.v1.Policy setIamPolicy(com.google.iam.v1.SetIamPolicyRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getSetIamPolicyMethod(), getCallOptions(), request); + } } /** @@ -1055,7 +1311,7 @@ protected EngineServiceFutureStub build( * * *
            -     * Creates a [Engine][google.cloud.discoveryengine.v1beta.Engine].
            +     * Creates an [Engine][google.cloud.discoveryengine.v1beta.Engine].
                  * 
            */ public com.google.common.util.concurrent.ListenableFuture @@ -1068,7 +1324,7 @@ protected EngineServiceFutureStub build( * * *
            -     * Deletes a [Engine][google.cloud.discoveryengine.v1beta.Engine].
            +     * Deletes an [Engine][google.cloud.discoveryengine.v1beta.Engine].
                  * 
            */ public com.google.common.util.concurrent.ListenableFuture @@ -1095,7 +1351,7 @@ protected EngineServiceFutureStub build( * * *
            -     * Gets a [Engine][google.cloud.discoveryengine.v1beta.Engine].
            +     * Gets an [Engine][google.cloud.discoveryengine.v1beta.Engine].
                  * 
            */ public com.google.common.util.concurrent.ListenableFuture< @@ -1124,7 +1380,8 @@ protected EngineServiceFutureStub build( * * *
            -     * Pauses the training of an existing engine. Only applicable if
            +     * Pauses the training of an existing
            +     * [Engine][google.cloud.discoveryengine.v1beta.Engine]. Only applicable if
                  * [SolutionType][google.cloud.discoveryengine.v1beta.SolutionType] is
                  * [SOLUTION_TYPE_RECOMMENDATION][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_RECOMMENDATION].
                  * 
            @@ -1140,7 +1397,8 @@ protected EngineServiceFutureStub build( * * *
            -     * Resumes the training of an existing engine. Only applicable if
            +     * Resumes the training of an existing
            +     * [Engine][google.cloud.discoveryengine.v1beta.Engine]. Only applicable if
                  * [SolutionType][google.cloud.discoveryengine.v1beta.SolutionType] is
                  * [SOLUTION_TYPE_RECOMMENDATION][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_RECOMMENDATION].
                  * 
            @@ -1156,7 +1414,8 @@ protected EngineServiceFutureStub build( * * *
            -     * Tunes an existing engine. Only applicable if
            +     * Tunes an existing [Engine][google.cloud.discoveryengine.v1beta.Engine].
            +     * Only applicable if
                  * [SolutionType][google.cloud.discoveryengine.v1beta.SolutionType] is
                  * [SOLUTION_TYPE_RECOMMENDATION][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_RECOMMENDATION].
                  * 
            @@ -1166,6 +1425,46 @@ protected EngineServiceFutureStub build( return io.grpc.stub.ClientCalls.futureUnaryCall( getChannel().newCall(getTuneEngineMethod(), getCallOptions()), request); } + + /** + * + * + *
            +     * Gets the IAM access control policy for an
            +     * [Engine][google.cloud.discoveryengine.v1beta.Engine]. A `NOT_FOUND` error
            +     * is returned if the resource does not exist. An empty policy is returned if
            +     * the resource exists but does not have a policy set on it.
            +     * 
            + */ + public com.google.common.util.concurrent.ListenableFuture + getIamPolicy(com.google.iam.v1.GetIamPolicyRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetIamPolicyMethod(), getCallOptions()), request); + } + + /** + * + * + *
            +     * Sets the IAM access control policy for an
            +     * [Engine][google.cloud.discoveryengine.v1beta.Engine]. A `NOT_FOUND` error
            +     * is returned if the resource does not exist.
            +     * **Important:** When setting a policy directly on an Engine resource,
            +     * the only recommended roles in the bindings are:
            +     * `roles/discoveryengine.admin`,
            +     * `roles/discoveryengine.agentspaceAdmin`,
            +     * `roles/discoveryengine.user`,
            +     * `roles/discoveryengine.agentspaceUser`,
            +     * `roles/discoveryengine.viewer`,
            +     * `roles/discoveryengine.agentspaceViewer`.
            +     * Attempting to grant any other role will result in a warning in logging.
            +     * 
            + */ + public com.google.common.util.concurrent.ListenableFuture + setIamPolicy(com.google.iam.v1.SetIamPolicyRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getSetIamPolicyMethod(), getCallOptions()), request); + } } private static final int METHODID_CREATE_ENGINE = 0; @@ -1176,6 +1475,8 @@ protected EngineServiceFutureStub build( private static final int METHODID_PAUSE_ENGINE = 5; private static final int METHODID_RESUME_ENGINE = 6; private static final int METHODID_TUNE_ENGINE = 7; + private static final int METHODID_GET_IAM_POLICY = 8; + private static final int METHODID_SET_IAM_POLICY = 9; private static final class MethodHandlers implements io.grpc.stub.ServerCalls.UnaryMethod, @@ -1240,6 +1541,16 @@ public void invoke(Req request, io.grpc.stub.StreamObserver responseObserv (com.google.cloud.discoveryengine.v1beta.TuneEngineRequest) request, (io.grpc.stub.StreamObserver) responseObserver); break; + case METHODID_GET_IAM_POLICY: + serviceImpl.getIamPolicy( + (com.google.iam.v1.GetIamPolicyRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_SET_IAM_POLICY: + serviceImpl.setIamPolicy( + (com.google.iam.v1.SetIamPolicyRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; default: throw new AssertionError(); } @@ -1310,6 +1621,16 @@ public static final io.grpc.ServerServiceDefinition bindService(AsyncService ser new MethodHandlers< com.google.cloud.discoveryengine.v1beta.TuneEngineRequest, com.google.longrunning.Operation>(service, METHODID_TUNE_ENGINE))) + .addMethod( + getGetIamPolicyMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers( + service, METHODID_GET_IAM_POLICY))) + .addMethod( + getSetIamPolicyMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers( + service, METHODID_SET_IAM_POLICY))) .build(); } @@ -1369,6 +1690,8 @@ public static io.grpc.ServiceDescriptor getServiceDescriptor() { .addMethod(getPauseEngineMethod()) .addMethod(getResumeEngineMethod()) .addMethod(getTuneEngineMethod()) + .addMethod(getGetIamPolicyMethod()) + .addMethod(getSetIamPolicyMethod()) .build(); } } diff --git a/java-discoveryengine/grpc-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/IdentityMappingStoreServiceGrpc.java b/java-discoveryengine/grpc-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/IdentityMappingStoreServiceGrpc.java new file mode 100644 index 000000000000..65392122dd27 --- /dev/null +++ b/java-discoveryengine/grpc-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/IdentityMappingStoreServiceGrpc.java @@ -0,0 +1,1292 @@ +/* + * 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.discoveryengine.v1beta; + +import static io.grpc.MethodDescriptor.generateFullMethodName; + +/** + * + * + *
            + * Service for managing Identity Mapping Stores.
            + * 
            + */ +@io.grpc.stub.annotations.GrpcGenerated +public final class IdentityMappingStoreServiceGrpc { + + private IdentityMappingStoreServiceGrpc() {} + + public static final java.lang.String SERVICE_NAME = + "google.cloud.discoveryengine.v1beta.IdentityMappingStoreService"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.discoveryengine.v1beta.CreateIdentityMappingStoreRequest, + com.google.cloud.discoveryengine.v1beta.IdentityMappingStore> + getCreateIdentityMappingStoreMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateIdentityMappingStore", + requestType = com.google.cloud.discoveryengine.v1beta.CreateIdentityMappingStoreRequest.class, + responseType = com.google.cloud.discoveryengine.v1beta.IdentityMappingStore.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.discoveryengine.v1beta.CreateIdentityMappingStoreRequest, + com.google.cloud.discoveryengine.v1beta.IdentityMappingStore> + getCreateIdentityMappingStoreMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.discoveryengine.v1beta.CreateIdentityMappingStoreRequest, + com.google.cloud.discoveryengine.v1beta.IdentityMappingStore> + getCreateIdentityMappingStoreMethod; + if ((getCreateIdentityMappingStoreMethod = + IdentityMappingStoreServiceGrpc.getCreateIdentityMappingStoreMethod) + == null) { + synchronized (IdentityMappingStoreServiceGrpc.class) { + if ((getCreateIdentityMappingStoreMethod = + IdentityMappingStoreServiceGrpc.getCreateIdentityMappingStoreMethod) + == null) { + IdentityMappingStoreServiceGrpc.getCreateIdentityMappingStoreMethod = + getCreateIdentityMappingStoreMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "CreateIdentityMappingStore")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.discoveryengine.v1beta + .CreateIdentityMappingStoreRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.discoveryengine.v1beta.IdentityMappingStore + .getDefaultInstance())) + .setSchemaDescriptor( + new IdentityMappingStoreServiceMethodDescriptorSupplier( + "CreateIdentityMappingStore")) + .build(); + } + } + } + return getCreateIdentityMappingStoreMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.discoveryengine.v1beta.GetIdentityMappingStoreRequest, + com.google.cloud.discoveryengine.v1beta.IdentityMappingStore> + getGetIdentityMappingStoreMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetIdentityMappingStore", + requestType = com.google.cloud.discoveryengine.v1beta.GetIdentityMappingStoreRequest.class, + responseType = com.google.cloud.discoveryengine.v1beta.IdentityMappingStore.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.discoveryengine.v1beta.GetIdentityMappingStoreRequest, + com.google.cloud.discoveryengine.v1beta.IdentityMappingStore> + getGetIdentityMappingStoreMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.discoveryengine.v1beta.GetIdentityMappingStoreRequest, + com.google.cloud.discoveryengine.v1beta.IdentityMappingStore> + getGetIdentityMappingStoreMethod; + if ((getGetIdentityMappingStoreMethod = + IdentityMappingStoreServiceGrpc.getGetIdentityMappingStoreMethod) + == null) { + synchronized (IdentityMappingStoreServiceGrpc.class) { + if ((getGetIdentityMappingStoreMethod = + IdentityMappingStoreServiceGrpc.getGetIdentityMappingStoreMethod) + == null) { + IdentityMappingStoreServiceGrpc.getGetIdentityMappingStoreMethod = + getGetIdentityMappingStoreMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "GetIdentityMappingStore")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.discoveryengine.v1beta.GetIdentityMappingStoreRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.discoveryengine.v1beta.IdentityMappingStore + .getDefaultInstance())) + .setSchemaDescriptor( + new IdentityMappingStoreServiceMethodDescriptorSupplier( + "GetIdentityMappingStore")) + .build(); + } + } + } + return getGetIdentityMappingStoreMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.discoveryengine.v1beta.DeleteIdentityMappingStoreRequest, + com.google.longrunning.Operation> + getDeleteIdentityMappingStoreMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteIdentityMappingStore", + requestType = com.google.cloud.discoveryengine.v1beta.DeleteIdentityMappingStoreRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.discoveryengine.v1beta.DeleteIdentityMappingStoreRequest, + com.google.longrunning.Operation> + getDeleteIdentityMappingStoreMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.discoveryengine.v1beta.DeleteIdentityMappingStoreRequest, + com.google.longrunning.Operation> + getDeleteIdentityMappingStoreMethod; + if ((getDeleteIdentityMappingStoreMethod = + IdentityMappingStoreServiceGrpc.getDeleteIdentityMappingStoreMethod) + == null) { + synchronized (IdentityMappingStoreServiceGrpc.class) { + if ((getDeleteIdentityMappingStoreMethod = + IdentityMappingStoreServiceGrpc.getDeleteIdentityMappingStoreMethod) + == null) { + IdentityMappingStoreServiceGrpc.getDeleteIdentityMappingStoreMethod = + getDeleteIdentityMappingStoreMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "DeleteIdentityMappingStore")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.discoveryengine.v1beta + .DeleteIdentityMappingStoreRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new IdentityMappingStoreServiceMethodDescriptorSupplier( + "DeleteIdentityMappingStore")) + .build(); + } + } + } + return getDeleteIdentityMappingStoreMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.discoveryengine.v1beta.ImportIdentityMappingsRequest, + com.google.longrunning.Operation> + getImportIdentityMappingsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ImportIdentityMappings", + requestType = com.google.cloud.discoveryengine.v1beta.ImportIdentityMappingsRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.discoveryengine.v1beta.ImportIdentityMappingsRequest, + com.google.longrunning.Operation> + getImportIdentityMappingsMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.discoveryengine.v1beta.ImportIdentityMappingsRequest, + com.google.longrunning.Operation> + getImportIdentityMappingsMethod; + if ((getImportIdentityMappingsMethod = + IdentityMappingStoreServiceGrpc.getImportIdentityMappingsMethod) + == null) { + synchronized (IdentityMappingStoreServiceGrpc.class) { + if ((getImportIdentityMappingsMethod = + IdentityMappingStoreServiceGrpc.getImportIdentityMappingsMethod) + == null) { + IdentityMappingStoreServiceGrpc.getImportIdentityMappingsMethod = + getImportIdentityMappingsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "ImportIdentityMappings")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.discoveryengine.v1beta.ImportIdentityMappingsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new IdentityMappingStoreServiceMethodDescriptorSupplier( + "ImportIdentityMappings")) + .build(); + } + } + } + return getImportIdentityMappingsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.discoveryengine.v1beta.PurgeIdentityMappingsRequest, + com.google.longrunning.Operation> + getPurgeIdentityMappingsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "PurgeIdentityMappings", + requestType = com.google.cloud.discoveryengine.v1beta.PurgeIdentityMappingsRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.discoveryengine.v1beta.PurgeIdentityMappingsRequest, + com.google.longrunning.Operation> + getPurgeIdentityMappingsMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.discoveryengine.v1beta.PurgeIdentityMappingsRequest, + com.google.longrunning.Operation> + getPurgeIdentityMappingsMethod; + if ((getPurgeIdentityMappingsMethod = + IdentityMappingStoreServiceGrpc.getPurgeIdentityMappingsMethod) + == null) { + synchronized (IdentityMappingStoreServiceGrpc.class) { + if ((getPurgeIdentityMappingsMethod = + IdentityMappingStoreServiceGrpc.getPurgeIdentityMappingsMethod) + == null) { + IdentityMappingStoreServiceGrpc.getPurgeIdentityMappingsMethod = + getPurgeIdentityMappingsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "PurgeIdentityMappings")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.discoveryengine.v1beta.PurgeIdentityMappingsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new IdentityMappingStoreServiceMethodDescriptorSupplier( + "PurgeIdentityMappings")) + .build(); + } + } + } + return getPurgeIdentityMappingsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.discoveryengine.v1beta.ListIdentityMappingsRequest, + com.google.cloud.discoveryengine.v1beta.ListIdentityMappingsResponse> + getListIdentityMappingsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListIdentityMappings", + requestType = com.google.cloud.discoveryengine.v1beta.ListIdentityMappingsRequest.class, + responseType = com.google.cloud.discoveryengine.v1beta.ListIdentityMappingsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.discoveryengine.v1beta.ListIdentityMappingsRequest, + com.google.cloud.discoveryengine.v1beta.ListIdentityMappingsResponse> + getListIdentityMappingsMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.discoveryengine.v1beta.ListIdentityMappingsRequest, + com.google.cloud.discoveryengine.v1beta.ListIdentityMappingsResponse> + getListIdentityMappingsMethod; + if ((getListIdentityMappingsMethod = + IdentityMappingStoreServiceGrpc.getListIdentityMappingsMethod) + == null) { + synchronized (IdentityMappingStoreServiceGrpc.class) { + if ((getListIdentityMappingsMethod = + IdentityMappingStoreServiceGrpc.getListIdentityMappingsMethod) + == null) { + IdentityMappingStoreServiceGrpc.getListIdentityMappingsMethod = + getListIdentityMappingsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "ListIdentityMappings")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.discoveryengine.v1beta.ListIdentityMappingsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.discoveryengine.v1beta.ListIdentityMappingsResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new IdentityMappingStoreServiceMethodDescriptorSupplier( + "ListIdentityMappings")) + .build(); + } + } + } + return getListIdentityMappingsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.discoveryengine.v1beta.ListIdentityMappingStoresRequest, + com.google.cloud.discoveryengine.v1beta.ListIdentityMappingStoresResponse> + getListIdentityMappingStoresMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListIdentityMappingStores", + requestType = com.google.cloud.discoveryengine.v1beta.ListIdentityMappingStoresRequest.class, + responseType = + com.google.cloud.discoveryengine.v1beta.ListIdentityMappingStoresResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.discoveryengine.v1beta.ListIdentityMappingStoresRequest, + com.google.cloud.discoveryengine.v1beta.ListIdentityMappingStoresResponse> + getListIdentityMappingStoresMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.discoveryengine.v1beta.ListIdentityMappingStoresRequest, + com.google.cloud.discoveryengine.v1beta.ListIdentityMappingStoresResponse> + getListIdentityMappingStoresMethod; + if ((getListIdentityMappingStoresMethod = + IdentityMappingStoreServiceGrpc.getListIdentityMappingStoresMethod) + == null) { + synchronized (IdentityMappingStoreServiceGrpc.class) { + if ((getListIdentityMappingStoresMethod = + IdentityMappingStoreServiceGrpc.getListIdentityMappingStoresMethod) + == null) { + IdentityMappingStoreServiceGrpc.getListIdentityMappingStoresMethod = + getListIdentityMappingStoresMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "ListIdentityMappingStores")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.discoveryengine.v1beta + .ListIdentityMappingStoresRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.discoveryengine.v1beta + .ListIdentityMappingStoresResponse.getDefaultInstance())) + .setSchemaDescriptor( + new IdentityMappingStoreServiceMethodDescriptorSupplier( + "ListIdentityMappingStores")) + .build(); + } + } + } + return getListIdentityMappingStoresMethod; + } + + /** Creates a new async stub that supports all call types for the service */ + public static IdentityMappingStoreServiceStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public IdentityMappingStoreServiceStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new IdentityMappingStoreServiceStub(channel, callOptions); + } + }; + return IdentityMappingStoreServiceStub.newStub(factory, channel); + } + + /** Creates a new blocking-style stub that supports all types of calls on the service */ + public static IdentityMappingStoreServiceBlockingV2Stub newBlockingV2Stub( + io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public IdentityMappingStoreServiceBlockingV2Stub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new IdentityMappingStoreServiceBlockingV2Stub(channel, callOptions); + } + }; + return IdentityMappingStoreServiceBlockingV2Stub.newStub(factory, channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static IdentityMappingStoreServiceBlockingStub newBlockingStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public IdentityMappingStoreServiceBlockingStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new IdentityMappingStoreServiceBlockingStub(channel, callOptions); + } + }; + return IdentityMappingStoreServiceBlockingStub.newStub(factory, channel); + } + + /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ + public static IdentityMappingStoreServiceFutureStub newFutureStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public IdentityMappingStoreServiceFutureStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new IdentityMappingStoreServiceFutureStub(channel, callOptions); + } + }; + return IdentityMappingStoreServiceFutureStub.newStub(factory, channel); + } + + /** + * + * + *
            +   * Service for managing Identity Mapping Stores.
            +   * 
            + */ + public interface AsyncService { + + /** + * + * + *
            +     * Creates a new Identity Mapping Store.
            +     * 
            + */ + default void createIdentityMappingStore( + com.google.cloud.discoveryengine.v1beta.CreateIdentityMappingStoreRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getCreateIdentityMappingStoreMethod(), responseObserver); + } + + /** + * + * + *
            +     * Gets the Identity Mapping Store.
            +     * 
            + */ + default void getIdentityMappingStore( + com.google.cloud.discoveryengine.v1beta.GetIdentityMappingStoreRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetIdentityMappingStoreMethod(), responseObserver); + } + + /** + * + * + *
            +     * Deletes the Identity Mapping Store.
            +     * 
            + */ + default void deleteIdentityMappingStore( + com.google.cloud.discoveryengine.v1beta.DeleteIdentityMappingStoreRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getDeleteIdentityMappingStoreMethod(), responseObserver); + } + + /** + * + * + *
            +     * Imports a list of Identity Mapping Entries to an Identity Mapping Store.
            +     * 
            + */ + default void importIdentityMappings( + com.google.cloud.discoveryengine.v1beta.ImportIdentityMappingsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getImportIdentityMappingsMethod(), responseObserver); + } + + /** + * + * + *
            +     * Purges specified or all Identity Mapping Entries from an Identity Mapping
            +     * Store.
            +     * 
            + */ + default void purgeIdentityMappings( + com.google.cloud.discoveryengine.v1beta.PurgeIdentityMappingsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getPurgeIdentityMappingsMethod(), responseObserver); + } + + /** + * + * + *
            +     * Lists Identity Mappings in an Identity Mapping Store.
            +     * 
            + */ + default void listIdentityMappings( + com.google.cloud.discoveryengine.v1beta.ListIdentityMappingsRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.discoveryengine.v1beta.ListIdentityMappingsResponse> + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListIdentityMappingsMethod(), responseObserver); + } + + /** + * + * + *
            +     * Lists all Identity Mapping Stores.
            +     * 
            + */ + default void listIdentityMappingStores( + com.google.cloud.discoveryengine.v1beta.ListIdentityMappingStoresRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.discoveryengine.v1beta.ListIdentityMappingStoresResponse> + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListIdentityMappingStoresMethod(), responseObserver); + } + } + + /** + * Base class for the server implementation of the service IdentityMappingStoreService. + * + *
            +   * Service for managing Identity Mapping Stores.
            +   * 
            + */ + public abstract static class IdentityMappingStoreServiceImplBase + implements io.grpc.BindableService, AsyncService { + + @java.lang.Override + public final io.grpc.ServerServiceDefinition bindService() { + return IdentityMappingStoreServiceGrpc.bindService(this); + } + } + + /** + * A stub to allow clients to do asynchronous rpc calls to service IdentityMappingStoreService. + * + *
            +   * Service for managing Identity Mapping Stores.
            +   * 
            + */ + public static final class IdentityMappingStoreServiceStub + extends io.grpc.stub.AbstractAsyncStub { + private IdentityMappingStoreServiceStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected IdentityMappingStoreServiceStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new IdentityMappingStoreServiceStub(channel, callOptions); + } + + /** + * + * + *
            +     * Creates a new Identity Mapping Store.
            +     * 
            + */ + public void createIdentityMappingStore( + com.google.cloud.discoveryengine.v1beta.CreateIdentityMappingStoreRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateIdentityMappingStoreMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
            +     * Gets the Identity Mapping Store.
            +     * 
            + */ + public void getIdentityMappingStore( + com.google.cloud.discoveryengine.v1beta.GetIdentityMappingStoreRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetIdentityMappingStoreMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
            +     * Deletes the Identity Mapping Store.
            +     * 
            + */ + public void deleteIdentityMappingStore( + com.google.cloud.discoveryengine.v1beta.DeleteIdentityMappingStoreRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteIdentityMappingStoreMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
            +     * Imports a list of Identity Mapping Entries to an Identity Mapping Store.
            +     * 
            + */ + public void importIdentityMappings( + com.google.cloud.discoveryengine.v1beta.ImportIdentityMappingsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getImportIdentityMappingsMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
            +     * Purges specified or all Identity Mapping Entries from an Identity Mapping
            +     * Store.
            +     * 
            + */ + public void purgeIdentityMappings( + com.google.cloud.discoveryengine.v1beta.PurgeIdentityMappingsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getPurgeIdentityMappingsMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
            +     * Lists Identity Mappings in an Identity Mapping Store.
            +     * 
            + */ + public void listIdentityMappings( + com.google.cloud.discoveryengine.v1beta.ListIdentityMappingsRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.discoveryengine.v1beta.ListIdentityMappingsResponse> + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListIdentityMappingsMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
            +     * Lists all Identity Mapping Stores.
            +     * 
            + */ + public void listIdentityMappingStores( + com.google.cloud.discoveryengine.v1beta.ListIdentityMappingStoresRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.discoveryengine.v1beta.ListIdentityMappingStoresResponse> + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListIdentityMappingStoresMethod(), getCallOptions()), + request, + responseObserver); + } + } + + /** + * A stub to allow clients to do synchronous rpc calls to service IdentityMappingStoreService. + * + *
            +   * Service for managing Identity Mapping Stores.
            +   * 
            + */ + public static final class IdentityMappingStoreServiceBlockingV2Stub + extends io.grpc.stub.AbstractBlockingStub { + private IdentityMappingStoreServiceBlockingV2Stub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected IdentityMappingStoreServiceBlockingV2Stub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new IdentityMappingStoreServiceBlockingV2Stub(channel, callOptions); + } + + /** + * + * + *
            +     * Creates a new Identity Mapping Store.
            +     * 
            + */ + public com.google.cloud.discoveryengine.v1beta.IdentityMappingStore createIdentityMappingStore( + com.google.cloud.discoveryengine.v1beta.CreateIdentityMappingStoreRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getCreateIdentityMappingStoreMethod(), getCallOptions(), request); + } + + /** + * + * + *
            +     * Gets the Identity Mapping Store.
            +     * 
            + */ + public com.google.cloud.discoveryengine.v1beta.IdentityMappingStore getIdentityMappingStore( + com.google.cloud.discoveryengine.v1beta.GetIdentityMappingStoreRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getGetIdentityMappingStoreMethod(), getCallOptions(), request); + } + + /** + * + * + *
            +     * Deletes the Identity Mapping Store.
            +     * 
            + */ + public com.google.longrunning.Operation deleteIdentityMappingStore( + com.google.cloud.discoveryengine.v1beta.DeleteIdentityMappingStoreRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getDeleteIdentityMappingStoreMethod(), getCallOptions(), request); + } + + /** + * + * + *
            +     * Imports a list of Identity Mapping Entries to an Identity Mapping Store.
            +     * 
            + */ + public com.google.longrunning.Operation importIdentityMappings( + com.google.cloud.discoveryengine.v1beta.ImportIdentityMappingsRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getImportIdentityMappingsMethod(), getCallOptions(), request); + } + + /** + * + * + *
            +     * Purges specified or all Identity Mapping Entries from an Identity Mapping
            +     * Store.
            +     * 
            + */ + public com.google.longrunning.Operation purgeIdentityMappings( + com.google.cloud.discoveryengine.v1beta.PurgeIdentityMappingsRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getPurgeIdentityMappingsMethod(), getCallOptions(), request); + } + + /** + * + * + *
            +     * Lists Identity Mappings in an Identity Mapping Store.
            +     * 
            + */ + public com.google.cloud.discoveryengine.v1beta.ListIdentityMappingsResponse + listIdentityMappings( + com.google.cloud.discoveryengine.v1beta.ListIdentityMappingsRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getListIdentityMappingsMethod(), getCallOptions(), request); + } + + /** + * + * + *
            +     * Lists all Identity Mapping Stores.
            +     * 
            + */ + public com.google.cloud.discoveryengine.v1beta.ListIdentityMappingStoresResponse + listIdentityMappingStores( + com.google.cloud.discoveryengine.v1beta.ListIdentityMappingStoresRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getListIdentityMappingStoresMethod(), getCallOptions(), request); + } + } + + /** + * A stub to allow clients to do limited synchronous rpc calls to service + * IdentityMappingStoreService. + * + *
            +   * Service for managing Identity Mapping Stores.
            +   * 
            + */ + public static final class IdentityMappingStoreServiceBlockingStub + extends io.grpc.stub.AbstractBlockingStub { + private IdentityMappingStoreServiceBlockingStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected IdentityMappingStoreServiceBlockingStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new IdentityMappingStoreServiceBlockingStub(channel, callOptions); + } + + /** + * + * + *
            +     * Creates a new Identity Mapping Store.
            +     * 
            + */ + public com.google.cloud.discoveryengine.v1beta.IdentityMappingStore createIdentityMappingStore( + com.google.cloud.discoveryengine.v1beta.CreateIdentityMappingStoreRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateIdentityMappingStoreMethod(), getCallOptions(), request); + } + + /** + * + * + *
            +     * Gets the Identity Mapping Store.
            +     * 
            + */ + public com.google.cloud.discoveryengine.v1beta.IdentityMappingStore getIdentityMappingStore( + com.google.cloud.discoveryengine.v1beta.GetIdentityMappingStoreRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetIdentityMappingStoreMethod(), getCallOptions(), request); + } + + /** + * + * + *
            +     * Deletes the Identity Mapping Store.
            +     * 
            + */ + public com.google.longrunning.Operation deleteIdentityMappingStore( + com.google.cloud.discoveryengine.v1beta.DeleteIdentityMappingStoreRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteIdentityMappingStoreMethod(), getCallOptions(), request); + } + + /** + * + * + *
            +     * Imports a list of Identity Mapping Entries to an Identity Mapping Store.
            +     * 
            + */ + public com.google.longrunning.Operation importIdentityMappings( + com.google.cloud.discoveryengine.v1beta.ImportIdentityMappingsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getImportIdentityMappingsMethod(), getCallOptions(), request); + } + + /** + * + * + *
            +     * Purges specified or all Identity Mapping Entries from an Identity Mapping
            +     * Store.
            +     * 
            + */ + public com.google.longrunning.Operation purgeIdentityMappings( + com.google.cloud.discoveryengine.v1beta.PurgeIdentityMappingsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getPurgeIdentityMappingsMethod(), getCallOptions(), request); + } + + /** + * + * + *
            +     * Lists Identity Mappings in an Identity Mapping Store.
            +     * 
            + */ + public com.google.cloud.discoveryengine.v1beta.ListIdentityMappingsResponse + listIdentityMappings( + com.google.cloud.discoveryengine.v1beta.ListIdentityMappingsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListIdentityMappingsMethod(), getCallOptions(), request); + } + + /** + * + * + *
            +     * Lists all Identity Mapping Stores.
            +     * 
            + */ + public com.google.cloud.discoveryengine.v1beta.ListIdentityMappingStoresResponse + listIdentityMappingStores( + com.google.cloud.discoveryengine.v1beta.ListIdentityMappingStoresRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListIdentityMappingStoresMethod(), getCallOptions(), request); + } + } + + /** + * A stub to allow clients to do ListenableFuture-style rpc calls to service + * IdentityMappingStoreService. + * + *
            +   * Service for managing Identity Mapping Stores.
            +   * 
            + */ + public static final class IdentityMappingStoreServiceFutureStub + extends io.grpc.stub.AbstractFutureStub { + private IdentityMappingStoreServiceFutureStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected IdentityMappingStoreServiceFutureStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new IdentityMappingStoreServiceFutureStub(channel, callOptions); + } + + /** + * + * + *
            +     * Creates a new Identity Mapping Store.
            +     * 
            + */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.discoveryengine.v1beta.IdentityMappingStore> + createIdentityMappingStore( + com.google.cloud.discoveryengine.v1beta.CreateIdentityMappingStoreRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateIdentityMappingStoreMethod(), getCallOptions()), request); + } + + /** + * + * + *
            +     * Gets the Identity Mapping Store.
            +     * 
            + */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.discoveryengine.v1beta.IdentityMappingStore> + getIdentityMappingStore( + com.google.cloud.discoveryengine.v1beta.GetIdentityMappingStoreRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetIdentityMappingStoreMethod(), getCallOptions()), request); + } + + /** + * + * + *
            +     * Deletes the Identity Mapping Store.
            +     * 
            + */ + public com.google.common.util.concurrent.ListenableFuture + deleteIdentityMappingStore( + com.google.cloud.discoveryengine.v1beta.DeleteIdentityMappingStoreRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteIdentityMappingStoreMethod(), getCallOptions()), request); + } + + /** + * + * + *
            +     * Imports a list of Identity Mapping Entries to an Identity Mapping Store.
            +     * 
            + */ + public com.google.common.util.concurrent.ListenableFuture + importIdentityMappings( + com.google.cloud.discoveryengine.v1beta.ImportIdentityMappingsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getImportIdentityMappingsMethod(), getCallOptions()), request); + } + + /** + * + * + *
            +     * Purges specified or all Identity Mapping Entries from an Identity Mapping
            +     * Store.
            +     * 
            + */ + public com.google.common.util.concurrent.ListenableFuture + purgeIdentityMappings( + com.google.cloud.discoveryengine.v1beta.PurgeIdentityMappingsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getPurgeIdentityMappingsMethod(), getCallOptions()), request); + } + + /** + * + * + *
            +     * Lists Identity Mappings in an Identity Mapping Store.
            +     * 
            + */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.discoveryengine.v1beta.ListIdentityMappingsResponse> + listIdentityMappings( + com.google.cloud.discoveryengine.v1beta.ListIdentityMappingsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListIdentityMappingsMethod(), getCallOptions()), request); + } + + /** + * + * + *
            +     * Lists all Identity Mapping Stores.
            +     * 
            + */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.discoveryengine.v1beta.ListIdentityMappingStoresResponse> + listIdentityMappingStores( + com.google.cloud.discoveryengine.v1beta.ListIdentityMappingStoresRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListIdentityMappingStoresMethod(), getCallOptions()), request); + } + } + + private static final int METHODID_CREATE_IDENTITY_MAPPING_STORE = 0; + private static final int METHODID_GET_IDENTITY_MAPPING_STORE = 1; + private static final int METHODID_DELETE_IDENTITY_MAPPING_STORE = 2; + private static final int METHODID_IMPORT_IDENTITY_MAPPINGS = 3; + private static final int METHODID_PURGE_IDENTITY_MAPPINGS = 4; + private static final int METHODID_LIST_IDENTITY_MAPPINGS = 5; + private static final int METHODID_LIST_IDENTITY_MAPPING_STORES = 6; + + private static final class MethodHandlers + implements io.grpc.stub.ServerCalls.UnaryMethod, + io.grpc.stub.ServerCalls.ServerStreamingMethod, + io.grpc.stub.ServerCalls.ClientStreamingMethod, + io.grpc.stub.ServerCalls.BidiStreamingMethod { + private final AsyncService serviceImpl; + private final int methodId; + + MethodHandlers(AsyncService serviceImpl, int methodId) { + this.serviceImpl = serviceImpl; + this.methodId = methodId; + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + case METHODID_CREATE_IDENTITY_MAPPING_STORE: + serviceImpl.createIdentityMappingStore( + (com.google.cloud.discoveryengine.v1beta.CreateIdentityMappingStoreRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.discoveryengine.v1beta.IdentityMappingStore>) + responseObserver); + break; + case METHODID_GET_IDENTITY_MAPPING_STORE: + serviceImpl.getIdentityMappingStore( + (com.google.cloud.discoveryengine.v1beta.GetIdentityMappingStoreRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.discoveryengine.v1beta.IdentityMappingStore>) + responseObserver); + break; + case METHODID_DELETE_IDENTITY_MAPPING_STORE: + serviceImpl.deleteIdentityMappingStore( + (com.google.cloud.discoveryengine.v1beta.DeleteIdentityMappingStoreRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_IMPORT_IDENTITY_MAPPINGS: + serviceImpl.importIdentityMappings( + (com.google.cloud.discoveryengine.v1beta.ImportIdentityMappingsRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_PURGE_IDENTITY_MAPPINGS: + serviceImpl.purgeIdentityMappings( + (com.google.cloud.discoveryengine.v1beta.PurgeIdentityMappingsRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LIST_IDENTITY_MAPPINGS: + serviceImpl.listIdentityMappings( + (com.google.cloud.discoveryengine.v1beta.ListIdentityMappingsRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.discoveryengine.v1beta.ListIdentityMappingsResponse>) + responseObserver); + break; + case METHODID_LIST_IDENTITY_MAPPING_STORES: + serviceImpl.listIdentityMappingStores( + (com.google.cloud.discoveryengine.v1beta.ListIdentityMappingStoresRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.discoveryengine.v1beta.ListIdentityMappingStoresResponse>) + responseObserver); + break; + default: + throw new AssertionError(); + } + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public io.grpc.stub.StreamObserver invoke( + io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + default: + throw new AssertionError(); + } + } + } + + public static final io.grpc.ServerServiceDefinition bindService(AsyncService service) { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getCreateIdentityMappingStoreMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.discoveryengine.v1beta.CreateIdentityMappingStoreRequest, + com.google.cloud.discoveryengine.v1beta.IdentityMappingStore>( + service, METHODID_CREATE_IDENTITY_MAPPING_STORE))) + .addMethod( + getGetIdentityMappingStoreMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.discoveryengine.v1beta.GetIdentityMappingStoreRequest, + com.google.cloud.discoveryengine.v1beta.IdentityMappingStore>( + service, METHODID_GET_IDENTITY_MAPPING_STORE))) + .addMethod( + getDeleteIdentityMappingStoreMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.discoveryengine.v1beta.DeleteIdentityMappingStoreRequest, + com.google.longrunning.Operation>( + service, METHODID_DELETE_IDENTITY_MAPPING_STORE))) + .addMethod( + getImportIdentityMappingsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.discoveryengine.v1beta.ImportIdentityMappingsRequest, + com.google.longrunning.Operation>(service, METHODID_IMPORT_IDENTITY_MAPPINGS))) + .addMethod( + getPurgeIdentityMappingsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.discoveryengine.v1beta.PurgeIdentityMappingsRequest, + com.google.longrunning.Operation>(service, METHODID_PURGE_IDENTITY_MAPPINGS))) + .addMethod( + getListIdentityMappingsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.discoveryengine.v1beta.ListIdentityMappingsRequest, + com.google.cloud.discoveryengine.v1beta.ListIdentityMappingsResponse>( + service, METHODID_LIST_IDENTITY_MAPPINGS))) + .addMethod( + getListIdentityMappingStoresMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.discoveryengine.v1beta.ListIdentityMappingStoresRequest, + com.google.cloud.discoveryengine.v1beta.ListIdentityMappingStoresResponse>( + service, METHODID_LIST_IDENTITY_MAPPING_STORES))) + .build(); + } + + private abstract static class IdentityMappingStoreServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, + io.grpc.protobuf.ProtoServiceDescriptorSupplier { + IdentityMappingStoreServiceBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return com.google.cloud.discoveryengine.v1beta.IdentityMappingStoreServiceProto + .getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("IdentityMappingStoreService"); + } + } + + private static final class IdentityMappingStoreServiceFileDescriptorSupplier + extends IdentityMappingStoreServiceBaseDescriptorSupplier { + IdentityMappingStoreServiceFileDescriptorSupplier() {} + } + + private static final class IdentityMappingStoreServiceMethodDescriptorSupplier + extends IdentityMappingStoreServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final java.lang.String methodName; + + IdentityMappingStoreServiceMethodDescriptorSupplier(java.lang.String methodName) { + this.methodName = methodName; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { + return getServiceDescriptor().findMethodByName(methodName); + } + } + + private static volatile io.grpc.ServiceDescriptor serviceDescriptor; + + public static io.grpc.ServiceDescriptor getServiceDescriptor() { + io.grpc.ServiceDescriptor result = serviceDescriptor; + if (result == null) { + synchronized (IdentityMappingStoreServiceGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = + result = + io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new IdentityMappingStoreServiceFileDescriptorSupplier()) + .addMethod(getCreateIdentityMappingStoreMethod()) + .addMethod(getGetIdentityMappingStoreMethod()) + .addMethod(getDeleteIdentityMappingStoreMethod()) + .addMethod(getImportIdentityMappingsMethod()) + .addMethod(getPurgeIdentityMappingsMethod()) + .addMethod(getListIdentityMappingsMethod()) + .addMethod(getListIdentityMappingStoresMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/java-discoveryengine/grpc-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/LicenseConfigServiceGrpc.java b/java-discoveryengine/grpc-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/LicenseConfigServiceGrpc.java new file mode 100644 index 000000000000..31f527a355e2 --- /dev/null +++ b/java-discoveryengine/grpc-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/LicenseConfigServiceGrpc.java @@ -0,0 +1,1188 @@ +/* + * 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.discoveryengine.v1beta; + +import static io.grpc.MethodDescriptor.generateFullMethodName; + +/** + * + * + *
            + * Service for managing license config related resources.
            + * 
            + */ +@io.grpc.stub.annotations.GrpcGenerated +public final class LicenseConfigServiceGrpc { + + private LicenseConfigServiceGrpc() {} + + public static final java.lang.String SERVICE_NAME = + "google.cloud.discoveryengine.v1beta.LicenseConfigService"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.discoveryengine.v1beta.CreateLicenseConfigRequest, + com.google.cloud.discoveryengine.v1beta.LicenseConfig> + getCreateLicenseConfigMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateLicenseConfig", + requestType = com.google.cloud.discoveryengine.v1beta.CreateLicenseConfigRequest.class, + responseType = com.google.cloud.discoveryengine.v1beta.LicenseConfig.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.discoveryengine.v1beta.CreateLicenseConfigRequest, + com.google.cloud.discoveryengine.v1beta.LicenseConfig> + getCreateLicenseConfigMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.discoveryengine.v1beta.CreateLicenseConfigRequest, + com.google.cloud.discoveryengine.v1beta.LicenseConfig> + getCreateLicenseConfigMethod; + if ((getCreateLicenseConfigMethod = LicenseConfigServiceGrpc.getCreateLicenseConfigMethod) + == null) { + synchronized (LicenseConfigServiceGrpc.class) { + if ((getCreateLicenseConfigMethod = LicenseConfigServiceGrpc.getCreateLicenseConfigMethod) + == null) { + LicenseConfigServiceGrpc.getCreateLicenseConfigMethod = + getCreateLicenseConfigMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "CreateLicenseConfig")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.discoveryengine.v1beta.CreateLicenseConfigRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.discoveryengine.v1beta.LicenseConfig + .getDefaultInstance())) + .setSchemaDescriptor( + new LicenseConfigServiceMethodDescriptorSupplier("CreateLicenseConfig")) + .build(); + } + } + } + return getCreateLicenseConfigMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.discoveryengine.v1beta.UpdateLicenseConfigRequest, + com.google.cloud.discoveryengine.v1beta.LicenseConfig> + getUpdateLicenseConfigMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateLicenseConfig", + requestType = com.google.cloud.discoveryengine.v1beta.UpdateLicenseConfigRequest.class, + responseType = com.google.cloud.discoveryengine.v1beta.LicenseConfig.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.discoveryengine.v1beta.UpdateLicenseConfigRequest, + com.google.cloud.discoveryengine.v1beta.LicenseConfig> + getUpdateLicenseConfigMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.discoveryengine.v1beta.UpdateLicenseConfigRequest, + com.google.cloud.discoveryengine.v1beta.LicenseConfig> + getUpdateLicenseConfigMethod; + if ((getUpdateLicenseConfigMethod = LicenseConfigServiceGrpc.getUpdateLicenseConfigMethod) + == null) { + synchronized (LicenseConfigServiceGrpc.class) { + if ((getUpdateLicenseConfigMethod = LicenseConfigServiceGrpc.getUpdateLicenseConfigMethod) + == null) { + LicenseConfigServiceGrpc.getUpdateLicenseConfigMethod = + getUpdateLicenseConfigMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "UpdateLicenseConfig")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.discoveryengine.v1beta.UpdateLicenseConfigRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.discoveryengine.v1beta.LicenseConfig + .getDefaultInstance())) + .setSchemaDescriptor( + new LicenseConfigServiceMethodDescriptorSupplier("UpdateLicenseConfig")) + .build(); + } + } + } + return getUpdateLicenseConfigMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.discoveryengine.v1beta.GetLicenseConfigRequest, + com.google.cloud.discoveryengine.v1beta.LicenseConfig> + getGetLicenseConfigMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetLicenseConfig", + requestType = com.google.cloud.discoveryengine.v1beta.GetLicenseConfigRequest.class, + responseType = com.google.cloud.discoveryengine.v1beta.LicenseConfig.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.discoveryengine.v1beta.GetLicenseConfigRequest, + com.google.cloud.discoveryengine.v1beta.LicenseConfig> + getGetLicenseConfigMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.discoveryengine.v1beta.GetLicenseConfigRequest, + com.google.cloud.discoveryengine.v1beta.LicenseConfig> + getGetLicenseConfigMethod; + if ((getGetLicenseConfigMethod = LicenseConfigServiceGrpc.getGetLicenseConfigMethod) == null) { + synchronized (LicenseConfigServiceGrpc.class) { + if ((getGetLicenseConfigMethod = LicenseConfigServiceGrpc.getGetLicenseConfigMethod) + == null) { + LicenseConfigServiceGrpc.getGetLicenseConfigMethod = + getGetLicenseConfigMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetLicenseConfig")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.discoveryengine.v1beta.GetLicenseConfigRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.discoveryengine.v1beta.LicenseConfig + .getDefaultInstance())) + .setSchemaDescriptor( + new LicenseConfigServiceMethodDescriptorSupplier("GetLicenseConfig")) + .build(); + } + } + } + return getGetLicenseConfigMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.discoveryengine.v1beta.ListLicenseConfigsRequest, + com.google.cloud.discoveryengine.v1beta.ListLicenseConfigsResponse> + getListLicenseConfigsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListLicenseConfigs", + requestType = com.google.cloud.discoveryengine.v1beta.ListLicenseConfigsRequest.class, + responseType = com.google.cloud.discoveryengine.v1beta.ListLicenseConfigsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.discoveryengine.v1beta.ListLicenseConfigsRequest, + com.google.cloud.discoveryengine.v1beta.ListLicenseConfigsResponse> + getListLicenseConfigsMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.discoveryengine.v1beta.ListLicenseConfigsRequest, + com.google.cloud.discoveryengine.v1beta.ListLicenseConfigsResponse> + getListLicenseConfigsMethod; + if ((getListLicenseConfigsMethod = LicenseConfigServiceGrpc.getListLicenseConfigsMethod) + == null) { + synchronized (LicenseConfigServiceGrpc.class) { + if ((getListLicenseConfigsMethod = LicenseConfigServiceGrpc.getListLicenseConfigsMethod) + == null) { + LicenseConfigServiceGrpc.getListLicenseConfigsMethod = + getListLicenseConfigsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListLicenseConfigs")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.discoveryengine.v1beta.ListLicenseConfigsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.discoveryengine.v1beta.ListLicenseConfigsResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new LicenseConfigServiceMethodDescriptorSupplier("ListLicenseConfigs")) + .build(); + } + } + } + return getListLicenseConfigsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.discoveryengine.v1beta.DistributeLicenseConfigRequest, + com.google.cloud.discoveryengine.v1beta.DistributeLicenseConfigResponse> + getDistributeLicenseConfigMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DistributeLicenseConfig", + requestType = com.google.cloud.discoveryengine.v1beta.DistributeLicenseConfigRequest.class, + responseType = com.google.cloud.discoveryengine.v1beta.DistributeLicenseConfigResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.discoveryengine.v1beta.DistributeLicenseConfigRequest, + com.google.cloud.discoveryengine.v1beta.DistributeLicenseConfigResponse> + getDistributeLicenseConfigMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.discoveryengine.v1beta.DistributeLicenseConfigRequest, + com.google.cloud.discoveryengine.v1beta.DistributeLicenseConfigResponse> + getDistributeLicenseConfigMethod; + if ((getDistributeLicenseConfigMethod = + LicenseConfigServiceGrpc.getDistributeLicenseConfigMethod) + == null) { + synchronized (LicenseConfigServiceGrpc.class) { + if ((getDistributeLicenseConfigMethod = + LicenseConfigServiceGrpc.getDistributeLicenseConfigMethod) + == null) { + LicenseConfigServiceGrpc.getDistributeLicenseConfigMethod = + getDistributeLicenseConfigMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "DistributeLicenseConfig")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.discoveryengine.v1beta.DistributeLicenseConfigRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.discoveryengine.v1beta + .DistributeLicenseConfigResponse.getDefaultInstance())) + .setSchemaDescriptor( + new LicenseConfigServiceMethodDescriptorSupplier( + "DistributeLicenseConfig")) + .build(); + } + } + } + return getDistributeLicenseConfigMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.discoveryengine.v1beta.RetractLicenseConfigRequest, + com.google.cloud.discoveryengine.v1beta.RetractLicenseConfigResponse> + getRetractLicenseConfigMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "RetractLicenseConfig", + requestType = com.google.cloud.discoveryengine.v1beta.RetractLicenseConfigRequest.class, + responseType = com.google.cloud.discoveryengine.v1beta.RetractLicenseConfigResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.discoveryengine.v1beta.RetractLicenseConfigRequest, + com.google.cloud.discoveryengine.v1beta.RetractLicenseConfigResponse> + getRetractLicenseConfigMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.discoveryengine.v1beta.RetractLicenseConfigRequest, + com.google.cloud.discoveryengine.v1beta.RetractLicenseConfigResponse> + getRetractLicenseConfigMethod; + if ((getRetractLicenseConfigMethod = LicenseConfigServiceGrpc.getRetractLicenseConfigMethod) + == null) { + synchronized (LicenseConfigServiceGrpc.class) { + if ((getRetractLicenseConfigMethod = LicenseConfigServiceGrpc.getRetractLicenseConfigMethod) + == null) { + LicenseConfigServiceGrpc.getRetractLicenseConfigMethod = + getRetractLicenseConfigMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "RetractLicenseConfig")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.discoveryengine.v1beta.RetractLicenseConfigRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.discoveryengine.v1beta.RetractLicenseConfigResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new LicenseConfigServiceMethodDescriptorSupplier("RetractLicenseConfig")) + .build(); + } + } + } + return getRetractLicenseConfigMethod; + } + + /** Creates a new async stub that supports all call types for the service */ + public static LicenseConfigServiceStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public LicenseConfigServiceStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new LicenseConfigServiceStub(channel, callOptions); + } + }; + return LicenseConfigServiceStub.newStub(factory, channel); + } + + /** Creates a new blocking-style stub that supports all types of calls on the service */ + public static LicenseConfigServiceBlockingV2Stub newBlockingV2Stub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public LicenseConfigServiceBlockingV2Stub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new LicenseConfigServiceBlockingV2Stub(channel, callOptions); + } + }; + return LicenseConfigServiceBlockingV2Stub.newStub(factory, channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static LicenseConfigServiceBlockingStub newBlockingStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public LicenseConfigServiceBlockingStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new LicenseConfigServiceBlockingStub(channel, callOptions); + } + }; + return LicenseConfigServiceBlockingStub.newStub(factory, channel); + } + + /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ + public static LicenseConfigServiceFutureStub newFutureStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public LicenseConfigServiceFutureStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new LicenseConfigServiceFutureStub(channel, callOptions); + } + }; + return LicenseConfigServiceFutureStub.newStub(factory, channel); + } + + /** + * + * + *
            +   * Service for managing license config related resources.
            +   * 
            + */ + public interface AsyncService { + + /** + * + * + *
            +     * Creates a
            +     * [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig] This
            +     * method should only be used for creating NotebookLm licenses or Gemini
            +     * Enterprise free trial licenses.
            +     * 
            + */ + default void createLicenseConfig( + com.google.cloud.discoveryengine.v1beta.CreateLicenseConfigRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getCreateLicenseConfigMethod(), responseObserver); + } + + /** + * + * + *
            +     * Updates the
            +     * [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig]
            +     * 
            + */ + default void updateLicenseConfig( + com.google.cloud.discoveryengine.v1beta.UpdateLicenseConfigRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getUpdateLicenseConfigMethod(), responseObserver); + } + + /** + * + * + *
            +     * Gets a [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig].
            +     * 
            + */ + default void getLicenseConfig( + com.google.cloud.discoveryengine.v1beta.GetLicenseConfigRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetLicenseConfigMethod(), responseObserver); + } + + /** + * + * + *
            +     * Lists all the
            +     * [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig]s
            +     * associated with the project.
            +     * 
            + */ + default void listLicenseConfigs( + com.google.cloud.discoveryengine.v1beta.ListLicenseConfigsRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.discoveryengine.v1beta.ListLicenseConfigsResponse> + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListLicenseConfigsMethod(), responseObserver); + } + + /** + * + * + *
            +     * Distributes a
            +     * [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig] from
            +     * billing account level to project level.
            +     * 
            + */ + default void distributeLicenseConfig( + com.google.cloud.discoveryengine.v1beta.DistributeLicenseConfigRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.discoveryengine.v1beta.DistributeLicenseConfigResponse> + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getDistributeLicenseConfigMethod(), responseObserver); + } + + /** + * + * + *
            +     * This method is called from the billing account side to retract the
            +     * [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig] from the
            +     * given project back to the billing account.
            +     * 
            + */ + default void retractLicenseConfig( + com.google.cloud.discoveryengine.v1beta.RetractLicenseConfigRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.discoveryengine.v1beta.RetractLicenseConfigResponse> + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getRetractLicenseConfigMethod(), responseObserver); + } + } + + /** + * Base class for the server implementation of the service LicenseConfigService. + * + *
            +   * Service for managing license config related resources.
            +   * 
            + */ + public abstract static class LicenseConfigServiceImplBase + implements io.grpc.BindableService, AsyncService { + + @java.lang.Override + public final io.grpc.ServerServiceDefinition bindService() { + return LicenseConfigServiceGrpc.bindService(this); + } + } + + /** + * A stub to allow clients to do asynchronous rpc calls to service LicenseConfigService. + * + *
            +   * Service for managing license config related resources.
            +   * 
            + */ + public static final class LicenseConfigServiceStub + extends io.grpc.stub.AbstractAsyncStub { + private LicenseConfigServiceStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected LicenseConfigServiceStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new LicenseConfigServiceStub(channel, callOptions); + } + + /** + * + * + *
            +     * Creates a
            +     * [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig] This
            +     * method should only be used for creating NotebookLm licenses or Gemini
            +     * Enterprise free trial licenses.
            +     * 
            + */ + public void createLicenseConfig( + com.google.cloud.discoveryengine.v1beta.CreateLicenseConfigRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateLicenseConfigMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
            +     * Updates the
            +     * [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig]
            +     * 
            + */ + public void updateLicenseConfig( + com.google.cloud.discoveryengine.v1beta.UpdateLicenseConfigRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdateLicenseConfigMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
            +     * Gets a [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig].
            +     * 
            + */ + public void getLicenseConfig( + com.google.cloud.discoveryengine.v1beta.GetLicenseConfigRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetLicenseConfigMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
            +     * Lists all the
            +     * [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig]s
            +     * associated with the project.
            +     * 
            + */ + public void listLicenseConfigs( + com.google.cloud.discoveryengine.v1beta.ListLicenseConfigsRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.discoveryengine.v1beta.ListLicenseConfigsResponse> + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListLicenseConfigsMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
            +     * Distributes a
            +     * [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig] from
            +     * billing account level to project level.
            +     * 
            + */ + public void distributeLicenseConfig( + com.google.cloud.discoveryengine.v1beta.DistributeLicenseConfigRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.discoveryengine.v1beta.DistributeLicenseConfigResponse> + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDistributeLicenseConfigMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
            +     * This method is called from the billing account side to retract the
            +     * [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig] from the
            +     * given project back to the billing account.
            +     * 
            + */ + public void retractLicenseConfig( + com.google.cloud.discoveryengine.v1beta.RetractLicenseConfigRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.discoveryengine.v1beta.RetractLicenseConfigResponse> + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getRetractLicenseConfigMethod(), getCallOptions()), + request, + responseObserver); + } + } + + /** + * A stub to allow clients to do synchronous rpc calls to service LicenseConfigService. + * + *
            +   * Service for managing license config related resources.
            +   * 
            + */ + public static final class LicenseConfigServiceBlockingV2Stub + extends io.grpc.stub.AbstractBlockingStub { + private LicenseConfigServiceBlockingV2Stub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected LicenseConfigServiceBlockingV2Stub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new LicenseConfigServiceBlockingV2Stub(channel, callOptions); + } + + /** + * + * + *
            +     * Creates a
            +     * [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig] This
            +     * method should only be used for creating NotebookLm licenses or Gemini
            +     * Enterprise free trial licenses.
            +     * 
            + */ + public com.google.cloud.discoveryengine.v1beta.LicenseConfig createLicenseConfig( + com.google.cloud.discoveryengine.v1beta.CreateLicenseConfigRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getCreateLicenseConfigMethod(), getCallOptions(), request); + } + + /** + * + * + *
            +     * Updates the
            +     * [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig]
            +     * 
            + */ + public com.google.cloud.discoveryengine.v1beta.LicenseConfig updateLicenseConfig( + com.google.cloud.discoveryengine.v1beta.UpdateLicenseConfigRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getUpdateLicenseConfigMethod(), getCallOptions(), request); + } + + /** + * + * + *
            +     * Gets a [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig].
            +     * 
            + */ + public com.google.cloud.discoveryengine.v1beta.LicenseConfig getLicenseConfig( + com.google.cloud.discoveryengine.v1beta.GetLicenseConfigRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getGetLicenseConfigMethod(), getCallOptions(), request); + } + + /** + * + * + *
            +     * Lists all the
            +     * [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig]s
            +     * associated with the project.
            +     * 
            + */ + public com.google.cloud.discoveryengine.v1beta.ListLicenseConfigsResponse listLicenseConfigs( + com.google.cloud.discoveryengine.v1beta.ListLicenseConfigsRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getListLicenseConfigsMethod(), getCallOptions(), request); + } + + /** + * + * + *
            +     * Distributes a
            +     * [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig] from
            +     * billing account level to project level.
            +     * 
            + */ + public com.google.cloud.discoveryengine.v1beta.DistributeLicenseConfigResponse + distributeLicenseConfig( + com.google.cloud.discoveryengine.v1beta.DistributeLicenseConfigRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getDistributeLicenseConfigMethod(), getCallOptions(), request); + } + + /** + * + * + *
            +     * This method is called from the billing account side to retract the
            +     * [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig] from the
            +     * given project back to the billing account.
            +     * 
            + */ + public com.google.cloud.discoveryengine.v1beta.RetractLicenseConfigResponse + retractLicenseConfig( + com.google.cloud.discoveryengine.v1beta.RetractLicenseConfigRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getRetractLicenseConfigMethod(), getCallOptions(), request); + } + } + + /** + * A stub to allow clients to do limited synchronous rpc calls to service LicenseConfigService. + * + *
            +   * Service for managing license config related resources.
            +   * 
            + */ + public static final class LicenseConfigServiceBlockingStub + extends io.grpc.stub.AbstractBlockingStub { + private LicenseConfigServiceBlockingStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected LicenseConfigServiceBlockingStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new LicenseConfigServiceBlockingStub(channel, callOptions); + } + + /** + * + * + *
            +     * Creates a
            +     * [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig] This
            +     * method should only be used for creating NotebookLm licenses or Gemini
            +     * Enterprise free trial licenses.
            +     * 
            + */ + public com.google.cloud.discoveryengine.v1beta.LicenseConfig createLicenseConfig( + com.google.cloud.discoveryengine.v1beta.CreateLicenseConfigRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateLicenseConfigMethod(), getCallOptions(), request); + } + + /** + * + * + *
            +     * Updates the
            +     * [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig]
            +     * 
            + */ + public com.google.cloud.discoveryengine.v1beta.LicenseConfig updateLicenseConfig( + com.google.cloud.discoveryengine.v1beta.UpdateLicenseConfigRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateLicenseConfigMethod(), getCallOptions(), request); + } + + /** + * + * + *
            +     * Gets a [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig].
            +     * 
            + */ + public com.google.cloud.discoveryengine.v1beta.LicenseConfig getLicenseConfig( + com.google.cloud.discoveryengine.v1beta.GetLicenseConfigRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetLicenseConfigMethod(), getCallOptions(), request); + } + + /** + * + * + *
            +     * Lists all the
            +     * [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig]s
            +     * associated with the project.
            +     * 
            + */ + public com.google.cloud.discoveryengine.v1beta.ListLicenseConfigsResponse listLicenseConfigs( + com.google.cloud.discoveryengine.v1beta.ListLicenseConfigsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListLicenseConfigsMethod(), getCallOptions(), request); + } + + /** + * + * + *
            +     * Distributes a
            +     * [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig] from
            +     * billing account level to project level.
            +     * 
            + */ + public com.google.cloud.discoveryengine.v1beta.DistributeLicenseConfigResponse + distributeLicenseConfig( + com.google.cloud.discoveryengine.v1beta.DistributeLicenseConfigRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDistributeLicenseConfigMethod(), getCallOptions(), request); + } + + /** + * + * + *
            +     * This method is called from the billing account side to retract the
            +     * [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig] from the
            +     * given project back to the billing account.
            +     * 
            + */ + public com.google.cloud.discoveryengine.v1beta.RetractLicenseConfigResponse + retractLicenseConfig( + com.google.cloud.discoveryengine.v1beta.RetractLicenseConfigRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getRetractLicenseConfigMethod(), getCallOptions(), request); + } + } + + /** + * A stub to allow clients to do ListenableFuture-style rpc calls to service LicenseConfigService. + * + *
            +   * Service for managing license config related resources.
            +   * 
            + */ + public static final class LicenseConfigServiceFutureStub + extends io.grpc.stub.AbstractFutureStub { + private LicenseConfigServiceFutureStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected LicenseConfigServiceFutureStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new LicenseConfigServiceFutureStub(channel, callOptions); + } + + /** + * + * + *
            +     * Creates a
            +     * [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig] This
            +     * method should only be used for creating NotebookLm licenses or Gemini
            +     * Enterprise free trial licenses.
            +     * 
            + */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.discoveryengine.v1beta.LicenseConfig> + createLicenseConfig( + com.google.cloud.discoveryengine.v1beta.CreateLicenseConfigRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateLicenseConfigMethod(), getCallOptions()), request); + } + + /** + * + * + *
            +     * Updates the
            +     * [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig]
            +     * 
            + */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.discoveryengine.v1beta.LicenseConfig> + updateLicenseConfig( + com.google.cloud.discoveryengine.v1beta.UpdateLicenseConfigRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdateLicenseConfigMethod(), getCallOptions()), request); + } + + /** + * + * + *
            +     * Gets a [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig].
            +     * 
            + */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.discoveryengine.v1beta.LicenseConfig> + getLicenseConfig(com.google.cloud.discoveryengine.v1beta.GetLicenseConfigRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetLicenseConfigMethod(), getCallOptions()), request); + } + + /** + * + * + *
            +     * Lists all the
            +     * [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig]s
            +     * associated with the project.
            +     * 
            + */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.discoveryengine.v1beta.ListLicenseConfigsResponse> + listLicenseConfigs( + com.google.cloud.discoveryengine.v1beta.ListLicenseConfigsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListLicenseConfigsMethod(), getCallOptions()), request); + } + + /** + * + * + *
            +     * Distributes a
            +     * [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig] from
            +     * billing account level to project level.
            +     * 
            + */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.discoveryengine.v1beta.DistributeLicenseConfigResponse> + distributeLicenseConfig( + com.google.cloud.discoveryengine.v1beta.DistributeLicenseConfigRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDistributeLicenseConfigMethod(), getCallOptions()), request); + } + + /** + * + * + *
            +     * This method is called from the billing account side to retract the
            +     * [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig] from the
            +     * given project back to the billing account.
            +     * 
            + */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.discoveryengine.v1beta.RetractLicenseConfigResponse> + retractLicenseConfig( + com.google.cloud.discoveryengine.v1beta.RetractLicenseConfigRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getRetractLicenseConfigMethod(), getCallOptions()), request); + } + } + + private static final int METHODID_CREATE_LICENSE_CONFIG = 0; + private static final int METHODID_UPDATE_LICENSE_CONFIG = 1; + private static final int METHODID_GET_LICENSE_CONFIG = 2; + private static final int METHODID_LIST_LICENSE_CONFIGS = 3; + private static final int METHODID_DISTRIBUTE_LICENSE_CONFIG = 4; + private static final int METHODID_RETRACT_LICENSE_CONFIG = 5; + + private static final class MethodHandlers + implements io.grpc.stub.ServerCalls.UnaryMethod, + io.grpc.stub.ServerCalls.ServerStreamingMethod, + io.grpc.stub.ServerCalls.ClientStreamingMethod, + io.grpc.stub.ServerCalls.BidiStreamingMethod { + private final AsyncService serviceImpl; + private final int methodId; + + MethodHandlers(AsyncService serviceImpl, int methodId) { + this.serviceImpl = serviceImpl; + this.methodId = methodId; + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + case METHODID_CREATE_LICENSE_CONFIG: + serviceImpl.createLicenseConfig( + (com.google.cloud.discoveryengine.v1beta.CreateLicenseConfigRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_UPDATE_LICENSE_CONFIG: + serviceImpl.updateLicenseConfig( + (com.google.cloud.discoveryengine.v1beta.UpdateLicenseConfigRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_GET_LICENSE_CONFIG: + serviceImpl.getLicenseConfig( + (com.google.cloud.discoveryengine.v1beta.GetLicenseConfigRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_LIST_LICENSE_CONFIGS: + serviceImpl.listLicenseConfigs( + (com.google.cloud.discoveryengine.v1beta.ListLicenseConfigsRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.discoveryengine.v1beta.ListLicenseConfigsResponse>) + responseObserver); + break; + case METHODID_DISTRIBUTE_LICENSE_CONFIG: + serviceImpl.distributeLicenseConfig( + (com.google.cloud.discoveryengine.v1beta.DistributeLicenseConfigRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.discoveryengine.v1beta.DistributeLicenseConfigResponse>) + responseObserver); + break; + case METHODID_RETRACT_LICENSE_CONFIG: + serviceImpl.retractLicenseConfig( + (com.google.cloud.discoveryengine.v1beta.RetractLicenseConfigRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.discoveryengine.v1beta.RetractLicenseConfigResponse>) + responseObserver); + break; + default: + throw new AssertionError(); + } + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public io.grpc.stub.StreamObserver invoke( + io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + default: + throw new AssertionError(); + } + } + } + + public static final io.grpc.ServerServiceDefinition bindService(AsyncService service) { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getCreateLicenseConfigMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.discoveryengine.v1beta.CreateLicenseConfigRequest, + com.google.cloud.discoveryengine.v1beta.LicenseConfig>( + service, METHODID_CREATE_LICENSE_CONFIG))) + .addMethod( + getUpdateLicenseConfigMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.discoveryengine.v1beta.UpdateLicenseConfigRequest, + com.google.cloud.discoveryengine.v1beta.LicenseConfig>( + service, METHODID_UPDATE_LICENSE_CONFIG))) + .addMethod( + getGetLicenseConfigMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.discoveryengine.v1beta.GetLicenseConfigRequest, + com.google.cloud.discoveryengine.v1beta.LicenseConfig>( + service, METHODID_GET_LICENSE_CONFIG))) + .addMethod( + getListLicenseConfigsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.discoveryengine.v1beta.ListLicenseConfigsRequest, + com.google.cloud.discoveryengine.v1beta.ListLicenseConfigsResponse>( + service, METHODID_LIST_LICENSE_CONFIGS))) + .addMethod( + getDistributeLicenseConfigMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.discoveryengine.v1beta.DistributeLicenseConfigRequest, + com.google.cloud.discoveryengine.v1beta.DistributeLicenseConfigResponse>( + service, METHODID_DISTRIBUTE_LICENSE_CONFIG))) + .addMethod( + getRetractLicenseConfigMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.discoveryengine.v1beta.RetractLicenseConfigRequest, + com.google.cloud.discoveryengine.v1beta.RetractLicenseConfigResponse>( + service, METHODID_RETRACT_LICENSE_CONFIG))) + .build(); + } + + private abstract static class LicenseConfigServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, + io.grpc.protobuf.ProtoServiceDescriptorSupplier { + LicenseConfigServiceBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return com.google.cloud.discoveryengine.v1beta.LicenseConfigServiceProto.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("LicenseConfigService"); + } + } + + private static final class LicenseConfigServiceFileDescriptorSupplier + extends LicenseConfigServiceBaseDescriptorSupplier { + LicenseConfigServiceFileDescriptorSupplier() {} + } + + private static final class LicenseConfigServiceMethodDescriptorSupplier + extends LicenseConfigServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final java.lang.String methodName; + + LicenseConfigServiceMethodDescriptorSupplier(java.lang.String methodName) { + this.methodName = methodName; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { + return getServiceDescriptor().findMethodByName(methodName); + } + } + + private static volatile io.grpc.ServiceDescriptor serviceDescriptor; + + public static io.grpc.ServiceDescriptor getServiceDescriptor() { + io.grpc.ServiceDescriptor result = serviceDescriptor; + if (result == null) { + synchronized (LicenseConfigServiceGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = + result = + io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new LicenseConfigServiceFileDescriptorSupplier()) + .addMethod(getCreateLicenseConfigMethod()) + .addMethod(getUpdateLicenseConfigMethod()) + .addMethod(getGetLicenseConfigMethod()) + .addMethod(getListLicenseConfigsMethod()) + .addMethod(getDistributeLicenseConfigMethod()) + .addMethod(getRetractLicenseConfigMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/java-discoveryengine/grpc-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ServingConfigServiceGrpc.java b/java-discoveryengine/grpc-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ServingConfigServiceGrpc.java index 2607652430c7..7a16216e5dbc 100644 --- a/java-discoveryengine/grpc-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ServingConfigServiceGrpc.java +++ b/java-discoveryengine/grpc-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ServingConfigServiceGrpc.java @@ -34,6 +34,105 @@ private ServingConfigServiceGrpc() {} "google.cloud.discoveryengine.v1beta.ServingConfigService"; // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.discoveryengine.v1beta.CreateServingConfigRequest, + com.google.cloud.discoveryengine.v1beta.ServingConfig> + getCreateServingConfigMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateServingConfig", + requestType = com.google.cloud.discoveryengine.v1beta.CreateServingConfigRequest.class, + responseType = com.google.cloud.discoveryengine.v1beta.ServingConfig.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.discoveryengine.v1beta.CreateServingConfigRequest, + com.google.cloud.discoveryengine.v1beta.ServingConfig> + getCreateServingConfigMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.discoveryengine.v1beta.CreateServingConfigRequest, + com.google.cloud.discoveryengine.v1beta.ServingConfig> + getCreateServingConfigMethod; + if ((getCreateServingConfigMethod = ServingConfigServiceGrpc.getCreateServingConfigMethod) + == null) { + synchronized (ServingConfigServiceGrpc.class) { + if ((getCreateServingConfigMethod = ServingConfigServiceGrpc.getCreateServingConfigMethod) + == null) { + ServingConfigServiceGrpc.getCreateServingConfigMethod = + getCreateServingConfigMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "CreateServingConfig")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.discoveryengine.v1beta.CreateServingConfigRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.discoveryengine.v1beta.ServingConfig + .getDefaultInstance())) + .setSchemaDescriptor( + new ServingConfigServiceMethodDescriptorSupplier("CreateServingConfig")) + .build(); + } + } + } + return getCreateServingConfigMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.discoveryengine.v1beta.DeleteServingConfigRequest, + com.google.protobuf.Empty> + getDeleteServingConfigMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteServingConfig", + requestType = com.google.cloud.discoveryengine.v1beta.DeleteServingConfigRequest.class, + responseType = com.google.protobuf.Empty.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.discoveryengine.v1beta.DeleteServingConfigRequest, + com.google.protobuf.Empty> + getDeleteServingConfigMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.discoveryengine.v1beta.DeleteServingConfigRequest, + com.google.protobuf.Empty> + getDeleteServingConfigMethod; + if ((getDeleteServingConfigMethod = ServingConfigServiceGrpc.getDeleteServingConfigMethod) + == null) { + synchronized (ServingConfigServiceGrpc.class) { + if ((getDeleteServingConfigMethod = ServingConfigServiceGrpc.getDeleteServingConfigMethod) + == null) { + ServingConfigServiceGrpc.getDeleteServingConfigMethod = + getDeleteServingConfigMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "DeleteServingConfig")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.discoveryengine.v1beta.DeleteServingConfigRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protobuf.Empty.getDefaultInstance())) + .setSchemaDescriptor( + new ServingConfigServiceMethodDescriptorSupplier("DeleteServingConfig")) + .build(); + } + } + } + return getDeleteServingConfigMethod; + } + private static volatile io.grpc.MethodDescriptor< com.google.cloud.discoveryengine.v1beta.UpdateServingConfigRequest, com.google.cloud.discoveryengine.v1beta.ServingConfig> @@ -245,6 +344,42 @@ public ServingConfigServiceFutureStub newStub( */ public interface AsyncService { + /** + * + * + *
            +     * Creates a ServingConfig.
            +     * Note: The Google Cloud console works only with the default serving config.
            +     * Additional ServingConfigs can be created and managed only via the API.
            +     * A maximum of 100
            +     * [ServingConfig][google.cloud.discoveryengine.v1beta.ServingConfig]s are
            +     * allowed in an [Engine][google.cloud.discoveryengine.v1beta.Engine],
            +     * otherwise a RESOURCE_EXHAUSTED error is returned.
            +     * 
            + */ + default void createServingConfig( + com.google.cloud.discoveryengine.v1beta.CreateServingConfigRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getCreateServingConfigMethod(), responseObserver); + } + + /** + * + * + *
            +     * Deletes a ServingConfig.
            +     * Returns a NOT_FOUND error if the ServingConfig does not exist.
            +     * 
            + */ + default void deleteServingConfig( + com.google.cloud.discoveryengine.v1beta.DeleteServingConfigRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getDeleteServingConfigMethod(), responseObserver); + } + /** * * @@ -331,6 +466,46 @@ protected ServingConfigServiceStub build( return new ServingConfigServiceStub(channel, callOptions); } + /** + * + * + *
            +     * Creates a ServingConfig.
            +     * Note: The Google Cloud console works only with the default serving config.
            +     * Additional ServingConfigs can be created and managed only via the API.
            +     * A maximum of 100
            +     * [ServingConfig][google.cloud.discoveryengine.v1beta.ServingConfig]s are
            +     * allowed in an [Engine][google.cloud.discoveryengine.v1beta.Engine],
            +     * otherwise a RESOURCE_EXHAUSTED error is returned.
            +     * 
            + */ + public void createServingConfig( + com.google.cloud.discoveryengine.v1beta.CreateServingConfigRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateServingConfigMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
            +     * Deletes a ServingConfig.
            +     * Returns a NOT_FOUND error if the ServingConfig does not exist.
            +     * 
            + */ + public void deleteServingConfig( + com.google.cloud.discoveryengine.v1beta.DeleteServingConfigRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteServingConfigMethod(), getCallOptions()), + request, + responseObserver); + } + /** * * @@ -407,6 +582,41 @@ protected ServingConfigServiceBlockingV2Stub build( return new ServingConfigServiceBlockingV2Stub(channel, callOptions); } + /** + * + * + *
            +     * Creates a ServingConfig.
            +     * Note: The Google Cloud console works only with the default serving config.
            +     * Additional ServingConfigs can be created and managed only via the API.
            +     * A maximum of 100
            +     * [ServingConfig][google.cloud.discoveryengine.v1beta.ServingConfig]s are
            +     * allowed in an [Engine][google.cloud.discoveryengine.v1beta.Engine],
            +     * otherwise a RESOURCE_EXHAUSTED error is returned.
            +     * 
            + */ + public com.google.cloud.discoveryengine.v1beta.ServingConfig createServingConfig( + com.google.cloud.discoveryengine.v1beta.CreateServingConfigRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getCreateServingConfigMethod(), getCallOptions(), request); + } + + /** + * + * + *
            +     * Deletes a ServingConfig.
            +     * Returns a NOT_FOUND error if the ServingConfig does not exist.
            +     * 
            + */ + public com.google.protobuf.Empty deleteServingConfig( + com.google.cloud.discoveryengine.v1beta.DeleteServingConfigRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getDeleteServingConfigMethod(), getCallOptions(), request); + } + /** * * @@ -473,6 +683,39 @@ protected ServingConfigServiceBlockingStub build( return new ServingConfigServiceBlockingStub(channel, callOptions); } + /** + * + * + *
            +     * Creates a ServingConfig.
            +     * Note: The Google Cloud console works only with the default serving config.
            +     * Additional ServingConfigs can be created and managed only via the API.
            +     * A maximum of 100
            +     * [ServingConfig][google.cloud.discoveryengine.v1beta.ServingConfig]s are
            +     * allowed in an [Engine][google.cloud.discoveryengine.v1beta.Engine],
            +     * otherwise a RESOURCE_EXHAUSTED error is returned.
            +     * 
            + */ + public com.google.cloud.discoveryengine.v1beta.ServingConfig createServingConfig( + com.google.cloud.discoveryengine.v1beta.CreateServingConfigRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateServingConfigMethod(), getCallOptions(), request); + } + + /** + * + * + *
            +     * Deletes a ServingConfig.
            +     * Returns a NOT_FOUND error if the ServingConfig does not exist.
            +     * 
            + */ + public com.google.protobuf.Empty deleteServingConfig( + com.google.cloud.discoveryengine.v1beta.DeleteServingConfigRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteServingConfigMethod(), getCallOptions(), request); + } + /** * * @@ -536,6 +779,42 @@ protected ServingConfigServiceFutureStub build( return new ServingConfigServiceFutureStub(channel, callOptions); } + /** + * + * + *
            +     * Creates a ServingConfig.
            +     * Note: The Google Cloud console works only with the default serving config.
            +     * Additional ServingConfigs can be created and managed only via the API.
            +     * A maximum of 100
            +     * [ServingConfig][google.cloud.discoveryengine.v1beta.ServingConfig]s are
            +     * allowed in an [Engine][google.cloud.discoveryengine.v1beta.Engine],
            +     * otherwise a RESOURCE_EXHAUSTED error is returned.
            +     * 
            + */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.discoveryengine.v1beta.ServingConfig> + createServingConfig( + com.google.cloud.discoveryengine.v1beta.CreateServingConfigRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateServingConfigMethod(), getCallOptions()), request); + } + + /** + * + * + *
            +     * Deletes a ServingConfig.
            +     * Returns a NOT_FOUND error if the ServingConfig does not exist.
            +     * 
            + */ + public com.google.common.util.concurrent.ListenableFuture + deleteServingConfig( + com.google.cloud.discoveryengine.v1beta.DeleteServingConfigRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteServingConfigMethod(), getCallOptions()), request); + } + /** * * @@ -583,9 +862,11 @@ protected ServingConfigServiceFutureStub build( } } - private static final int METHODID_UPDATE_SERVING_CONFIG = 0; - private static final int METHODID_GET_SERVING_CONFIG = 1; - private static final int METHODID_LIST_SERVING_CONFIGS = 2; + private static final int METHODID_CREATE_SERVING_CONFIG = 0; + private static final int METHODID_DELETE_SERVING_CONFIG = 1; + private static final int METHODID_UPDATE_SERVING_CONFIG = 2; + private static final int METHODID_GET_SERVING_CONFIG = 3; + private static final int METHODID_LIST_SERVING_CONFIGS = 4; private static final class MethodHandlers implements io.grpc.stub.ServerCalls.UnaryMethod, @@ -604,6 +885,17 @@ private static final class MethodHandlers @java.lang.SuppressWarnings("unchecked") public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { switch (methodId) { + case METHODID_CREATE_SERVING_CONFIG: + serviceImpl.createServingConfig( + (com.google.cloud.discoveryengine.v1beta.CreateServingConfigRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_DELETE_SERVING_CONFIG: + serviceImpl.deleteServingConfig( + (com.google.cloud.discoveryengine.v1beta.DeleteServingConfigRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; case METHODID_UPDATE_SERVING_CONFIG: serviceImpl.updateServingConfig( (com.google.cloud.discoveryengine.v1beta.UpdateServingConfigRequest) request, @@ -641,6 +933,19 @@ public io.grpc.stub.StreamObserver invoke( public static final io.grpc.ServerServiceDefinition bindService(AsyncService service) { return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getCreateServingConfigMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.discoveryengine.v1beta.CreateServingConfigRequest, + com.google.cloud.discoveryengine.v1beta.ServingConfig>( + service, METHODID_CREATE_SERVING_CONFIG))) + .addMethod( + getDeleteServingConfigMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.discoveryengine.v1beta.DeleteServingConfigRequest, + com.google.protobuf.Empty>(service, METHODID_DELETE_SERVING_CONFIG))) .addMethod( getUpdateServingConfigMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall( @@ -713,6 +1018,8 @@ public static io.grpc.ServiceDescriptor getServiceDescriptor() { result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) .setSchemaDescriptor(new ServingConfigServiceFileDescriptorSupplier()) + .addMethod(getCreateServingConfigMethod()) + .addMethod(getDeleteServingConfigMethod()) .addMethod(getUpdateServingConfigMethod()) .addMethod(getGetServingConfigMethod()) .addMethod(getListServingConfigsMethod()) diff --git a/java-discoveryengine/grpc-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/UserLicenseServiceGrpc.java b/java-discoveryengine/grpc-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/UserLicenseServiceGrpc.java new file mode 100644 index 000000000000..1e29763193a0 --- /dev/null +++ b/java-discoveryengine/grpc-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/UserLicenseServiceGrpc.java @@ -0,0 +1,730 @@ +/* + * 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.discoveryengine.v1beta; + +import static io.grpc.MethodDescriptor.generateFullMethodName; + +/** + * + * + *
            + * Service for managing User Licenses.
            + * 
            + */ +@io.grpc.stub.annotations.GrpcGenerated +public final class UserLicenseServiceGrpc { + + private UserLicenseServiceGrpc() {} + + public static final java.lang.String SERVICE_NAME = + "google.cloud.discoveryengine.v1beta.UserLicenseService"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.discoveryengine.v1beta.ListUserLicensesRequest, + com.google.cloud.discoveryengine.v1beta.ListUserLicensesResponse> + getListUserLicensesMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListUserLicenses", + requestType = com.google.cloud.discoveryengine.v1beta.ListUserLicensesRequest.class, + responseType = com.google.cloud.discoveryengine.v1beta.ListUserLicensesResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.discoveryengine.v1beta.ListUserLicensesRequest, + com.google.cloud.discoveryengine.v1beta.ListUserLicensesResponse> + getListUserLicensesMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.discoveryengine.v1beta.ListUserLicensesRequest, + com.google.cloud.discoveryengine.v1beta.ListUserLicensesResponse> + getListUserLicensesMethod; + if ((getListUserLicensesMethod = UserLicenseServiceGrpc.getListUserLicensesMethod) == null) { + synchronized (UserLicenseServiceGrpc.class) { + if ((getListUserLicensesMethod = UserLicenseServiceGrpc.getListUserLicensesMethod) + == null) { + UserLicenseServiceGrpc.getListUserLicensesMethod = + getListUserLicensesMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListUserLicenses")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.discoveryengine.v1beta.ListUserLicensesRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.discoveryengine.v1beta.ListUserLicensesResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new UserLicenseServiceMethodDescriptorSupplier("ListUserLicenses")) + .build(); + } + } + } + return getListUserLicensesMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.discoveryengine.v1beta.ListLicenseConfigsUsageStatsRequest, + com.google.cloud.discoveryengine.v1beta.ListLicenseConfigsUsageStatsResponse> + getListLicenseConfigsUsageStatsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListLicenseConfigsUsageStats", + requestType = + com.google.cloud.discoveryengine.v1beta.ListLicenseConfigsUsageStatsRequest.class, + responseType = + com.google.cloud.discoveryengine.v1beta.ListLicenseConfigsUsageStatsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.discoveryengine.v1beta.ListLicenseConfigsUsageStatsRequest, + com.google.cloud.discoveryengine.v1beta.ListLicenseConfigsUsageStatsResponse> + getListLicenseConfigsUsageStatsMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.discoveryengine.v1beta.ListLicenseConfigsUsageStatsRequest, + com.google.cloud.discoveryengine.v1beta.ListLicenseConfigsUsageStatsResponse> + getListLicenseConfigsUsageStatsMethod; + if ((getListLicenseConfigsUsageStatsMethod = + UserLicenseServiceGrpc.getListLicenseConfigsUsageStatsMethod) + == null) { + synchronized (UserLicenseServiceGrpc.class) { + if ((getListLicenseConfigsUsageStatsMethod = + UserLicenseServiceGrpc.getListLicenseConfigsUsageStatsMethod) + == null) { + UserLicenseServiceGrpc.getListLicenseConfigsUsageStatsMethod = + getListLicenseConfigsUsageStatsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "ListLicenseConfigsUsageStats")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.discoveryengine.v1beta + .ListLicenseConfigsUsageStatsRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.discoveryengine.v1beta + .ListLicenseConfigsUsageStatsResponse.getDefaultInstance())) + .setSchemaDescriptor( + new UserLicenseServiceMethodDescriptorSupplier( + "ListLicenseConfigsUsageStats")) + .build(); + } + } + } + return getListLicenseConfigsUsageStatsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesRequest, + com.google.longrunning.Operation> + getBatchUpdateUserLicensesMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "BatchUpdateUserLicenses", + requestType = com.google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesRequest, + com.google.longrunning.Operation> + getBatchUpdateUserLicensesMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesRequest, + com.google.longrunning.Operation> + getBatchUpdateUserLicensesMethod; + if ((getBatchUpdateUserLicensesMethod = UserLicenseServiceGrpc.getBatchUpdateUserLicensesMethod) + == null) { + synchronized (UserLicenseServiceGrpc.class) { + if ((getBatchUpdateUserLicensesMethod = + UserLicenseServiceGrpc.getBatchUpdateUserLicensesMethod) + == null) { + UserLicenseServiceGrpc.getBatchUpdateUserLicensesMethod = + getBatchUpdateUserLicensesMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "BatchUpdateUserLicenses")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new UserLicenseServiceMethodDescriptorSupplier("BatchUpdateUserLicenses")) + .build(); + } + } + } + return getBatchUpdateUserLicensesMethod; + } + + /** Creates a new async stub that supports all call types for the service */ + public static UserLicenseServiceStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public UserLicenseServiceStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new UserLicenseServiceStub(channel, callOptions); + } + }; + return UserLicenseServiceStub.newStub(factory, channel); + } + + /** Creates a new blocking-style stub that supports all types of calls on the service */ + public static UserLicenseServiceBlockingV2Stub newBlockingV2Stub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public UserLicenseServiceBlockingV2Stub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new UserLicenseServiceBlockingV2Stub(channel, callOptions); + } + }; + return UserLicenseServiceBlockingV2Stub.newStub(factory, channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static UserLicenseServiceBlockingStub newBlockingStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public UserLicenseServiceBlockingStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new UserLicenseServiceBlockingStub(channel, callOptions); + } + }; + return UserLicenseServiceBlockingStub.newStub(factory, channel); + } + + /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ + public static UserLicenseServiceFutureStub newFutureStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public UserLicenseServiceFutureStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new UserLicenseServiceFutureStub(channel, callOptions); + } + }; + return UserLicenseServiceFutureStub.newStub(factory, channel); + } + + /** + * + * + *
            +   * Service for managing User Licenses.
            +   * 
            + */ + public interface AsyncService { + + /** + * + * + *
            +     * Lists the User Licenses.
            +     * 
            + */ + default void listUserLicenses( + com.google.cloud.discoveryengine.v1beta.ListUserLicensesRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.discoveryengine.v1beta.ListUserLicensesResponse> + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListUserLicensesMethod(), responseObserver); + } + + /** + * + * + *
            +     * Lists all the
            +     * [LicenseConfigUsageStats][google.cloud.discoveryengine.v1beta.LicenseConfigUsageStats]s
            +     * associated with the project.
            +     * 
            + */ + default void listLicenseConfigsUsageStats( + com.google.cloud.discoveryengine.v1beta.ListLicenseConfigsUsageStatsRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.discoveryengine.v1beta.ListLicenseConfigsUsageStatsResponse> + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListLicenseConfigsUsageStatsMethod(), responseObserver); + } + + /** + * + * + *
            +     * Updates the User License.
            +     * This method is used for batch assign/unassign licenses to users.
            +     * 
            + */ + default void batchUpdateUserLicenses( + com.google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getBatchUpdateUserLicensesMethod(), responseObserver); + } + } + + /** + * Base class for the server implementation of the service UserLicenseService. + * + *
            +   * Service for managing User Licenses.
            +   * 
            + */ + public abstract static class UserLicenseServiceImplBase + implements io.grpc.BindableService, AsyncService { + + @java.lang.Override + public final io.grpc.ServerServiceDefinition bindService() { + return UserLicenseServiceGrpc.bindService(this); + } + } + + /** + * A stub to allow clients to do asynchronous rpc calls to service UserLicenseService. + * + *
            +   * Service for managing User Licenses.
            +   * 
            + */ + public static final class UserLicenseServiceStub + extends io.grpc.stub.AbstractAsyncStub { + private UserLicenseServiceStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected UserLicenseServiceStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new UserLicenseServiceStub(channel, callOptions); + } + + /** + * + * + *
            +     * Lists the User Licenses.
            +     * 
            + */ + public void listUserLicenses( + com.google.cloud.discoveryengine.v1beta.ListUserLicensesRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.discoveryengine.v1beta.ListUserLicensesResponse> + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListUserLicensesMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
            +     * Lists all the
            +     * [LicenseConfigUsageStats][google.cloud.discoveryengine.v1beta.LicenseConfigUsageStats]s
            +     * associated with the project.
            +     * 
            + */ + public void listLicenseConfigsUsageStats( + com.google.cloud.discoveryengine.v1beta.ListLicenseConfigsUsageStatsRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.discoveryengine.v1beta.ListLicenseConfigsUsageStatsResponse> + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListLicenseConfigsUsageStatsMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
            +     * Updates the User License.
            +     * This method is used for batch assign/unassign licenses to users.
            +     * 
            + */ + public void batchUpdateUserLicenses( + com.google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getBatchUpdateUserLicensesMethod(), getCallOptions()), + request, + responseObserver); + } + } + + /** + * A stub to allow clients to do synchronous rpc calls to service UserLicenseService. + * + *
            +   * Service for managing User Licenses.
            +   * 
            + */ + public static final class UserLicenseServiceBlockingV2Stub + extends io.grpc.stub.AbstractBlockingStub { + private UserLicenseServiceBlockingV2Stub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected UserLicenseServiceBlockingV2Stub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new UserLicenseServiceBlockingV2Stub(channel, callOptions); + } + + /** + * + * + *
            +     * Lists the User Licenses.
            +     * 
            + */ + public com.google.cloud.discoveryengine.v1beta.ListUserLicensesResponse listUserLicenses( + com.google.cloud.discoveryengine.v1beta.ListUserLicensesRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getListUserLicensesMethod(), getCallOptions(), request); + } + + /** + * + * + *
            +     * Lists all the
            +     * [LicenseConfigUsageStats][google.cloud.discoveryengine.v1beta.LicenseConfigUsageStats]s
            +     * associated with the project.
            +     * 
            + */ + public com.google.cloud.discoveryengine.v1beta.ListLicenseConfigsUsageStatsResponse + listLicenseConfigsUsageStats( + com.google.cloud.discoveryengine.v1beta.ListLicenseConfigsUsageStatsRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getListLicenseConfigsUsageStatsMethod(), getCallOptions(), request); + } + + /** + * + * + *
            +     * Updates the User License.
            +     * This method is used for batch assign/unassign licenses to users.
            +     * 
            + */ + public com.google.longrunning.Operation batchUpdateUserLicenses( + com.google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getBatchUpdateUserLicensesMethod(), getCallOptions(), request); + } + } + + /** + * A stub to allow clients to do limited synchronous rpc calls to service UserLicenseService. + * + *
            +   * Service for managing User Licenses.
            +   * 
            + */ + public static final class UserLicenseServiceBlockingStub + extends io.grpc.stub.AbstractBlockingStub { + private UserLicenseServiceBlockingStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected UserLicenseServiceBlockingStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new UserLicenseServiceBlockingStub(channel, callOptions); + } + + /** + * + * + *
            +     * Lists the User Licenses.
            +     * 
            + */ + public com.google.cloud.discoveryengine.v1beta.ListUserLicensesResponse listUserLicenses( + com.google.cloud.discoveryengine.v1beta.ListUserLicensesRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListUserLicensesMethod(), getCallOptions(), request); + } + + /** + * + * + *
            +     * Lists all the
            +     * [LicenseConfigUsageStats][google.cloud.discoveryengine.v1beta.LicenseConfigUsageStats]s
            +     * associated with the project.
            +     * 
            + */ + public com.google.cloud.discoveryengine.v1beta.ListLicenseConfigsUsageStatsResponse + listLicenseConfigsUsageStats( + com.google.cloud.discoveryengine.v1beta.ListLicenseConfigsUsageStatsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListLicenseConfigsUsageStatsMethod(), getCallOptions(), request); + } + + /** + * + * + *
            +     * Updates the User License.
            +     * This method is used for batch assign/unassign licenses to users.
            +     * 
            + */ + public com.google.longrunning.Operation batchUpdateUserLicenses( + com.google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getBatchUpdateUserLicensesMethod(), getCallOptions(), request); + } + } + + /** + * A stub to allow clients to do ListenableFuture-style rpc calls to service UserLicenseService. + * + *
            +   * Service for managing User Licenses.
            +   * 
            + */ + public static final class UserLicenseServiceFutureStub + extends io.grpc.stub.AbstractFutureStub { + private UserLicenseServiceFutureStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected UserLicenseServiceFutureStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new UserLicenseServiceFutureStub(channel, callOptions); + } + + /** + * + * + *
            +     * Lists the User Licenses.
            +     * 
            + */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.discoveryengine.v1beta.ListUserLicensesResponse> + listUserLicenses(com.google.cloud.discoveryengine.v1beta.ListUserLicensesRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListUserLicensesMethod(), getCallOptions()), request); + } + + /** + * + * + *
            +     * Lists all the
            +     * [LicenseConfigUsageStats][google.cloud.discoveryengine.v1beta.LicenseConfigUsageStats]s
            +     * associated with the project.
            +     * 
            + */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.discoveryengine.v1beta.ListLicenseConfigsUsageStatsResponse> + listLicenseConfigsUsageStats( + com.google.cloud.discoveryengine.v1beta.ListLicenseConfigsUsageStatsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListLicenseConfigsUsageStatsMethod(), getCallOptions()), request); + } + + /** + * + * + *
            +     * Updates the User License.
            +     * This method is used for batch assign/unassign licenses to users.
            +     * 
            + */ + public com.google.common.util.concurrent.ListenableFuture + batchUpdateUserLicenses( + com.google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getBatchUpdateUserLicensesMethod(), getCallOptions()), request); + } + } + + private static final int METHODID_LIST_USER_LICENSES = 0; + private static final int METHODID_LIST_LICENSE_CONFIGS_USAGE_STATS = 1; + private static final int METHODID_BATCH_UPDATE_USER_LICENSES = 2; + + private static final class MethodHandlers + implements io.grpc.stub.ServerCalls.UnaryMethod, + io.grpc.stub.ServerCalls.ServerStreamingMethod, + io.grpc.stub.ServerCalls.ClientStreamingMethod, + io.grpc.stub.ServerCalls.BidiStreamingMethod { + private final AsyncService serviceImpl; + private final int methodId; + + MethodHandlers(AsyncService serviceImpl, int methodId) { + this.serviceImpl = serviceImpl; + this.methodId = methodId; + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + case METHODID_LIST_USER_LICENSES: + serviceImpl.listUserLicenses( + (com.google.cloud.discoveryengine.v1beta.ListUserLicensesRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.discoveryengine.v1beta.ListUserLicensesResponse>) + responseObserver); + break; + case METHODID_LIST_LICENSE_CONFIGS_USAGE_STATS: + serviceImpl.listLicenseConfigsUsageStats( + (com.google.cloud.discoveryengine.v1beta.ListLicenseConfigsUsageStatsRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.discoveryengine.v1beta.ListLicenseConfigsUsageStatsResponse>) + responseObserver); + break; + case METHODID_BATCH_UPDATE_USER_LICENSES: + serviceImpl.batchUpdateUserLicenses( + (com.google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + default: + throw new AssertionError(); + } + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public io.grpc.stub.StreamObserver invoke( + io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + default: + throw new AssertionError(); + } + } + } + + public static final io.grpc.ServerServiceDefinition bindService(AsyncService service) { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getListUserLicensesMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.discoveryengine.v1beta.ListUserLicensesRequest, + com.google.cloud.discoveryengine.v1beta.ListUserLicensesResponse>( + service, METHODID_LIST_USER_LICENSES))) + .addMethod( + getListLicenseConfigsUsageStatsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.discoveryengine.v1beta.ListLicenseConfigsUsageStatsRequest, + com.google.cloud.discoveryengine.v1beta.ListLicenseConfigsUsageStatsResponse>( + service, METHODID_LIST_LICENSE_CONFIGS_USAGE_STATS))) + .addMethod( + getBatchUpdateUserLicensesMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesRequest, + com.google.longrunning.Operation>( + service, METHODID_BATCH_UPDATE_USER_LICENSES))) + .build(); + } + + private abstract static class UserLicenseServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, + io.grpc.protobuf.ProtoServiceDescriptorSupplier { + UserLicenseServiceBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return com.google.cloud.discoveryengine.v1beta.UserLicenseServiceProto.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("UserLicenseService"); + } + } + + private static final class UserLicenseServiceFileDescriptorSupplier + extends UserLicenseServiceBaseDescriptorSupplier { + UserLicenseServiceFileDescriptorSupplier() {} + } + + private static final class UserLicenseServiceMethodDescriptorSupplier + extends UserLicenseServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final java.lang.String methodName; + + UserLicenseServiceMethodDescriptorSupplier(java.lang.String methodName) { + this.methodName = methodName; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { + return getServiceDescriptor().findMethodByName(methodName); + } + } + + private static volatile io.grpc.ServiceDescriptor serviceDescriptor; + + public static io.grpc.ServiceDescriptor getServiceDescriptor() { + io.grpc.ServiceDescriptor result = serviceDescriptor; + if (result == null) { + synchronized (UserLicenseServiceGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = + result = + io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new UserLicenseServiceFileDescriptorSupplier()) + .addMethod(getListUserLicensesMethod()) + .addMethod(getListLicenseConfigsUsageStatsMethod()) + .addMethod(getBatchUpdateUserLicensesMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/java-discoveryengine/grpc-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/UserStoreServiceGrpc.java b/java-discoveryengine/grpc-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/UserStoreServiceGrpc.java new file mode 100644 index 000000000000..61e46685dedf --- /dev/null +++ b/java-discoveryengine/grpc-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/UserStoreServiceGrpc.java @@ -0,0 +1,559 @@ +/* + * 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.discoveryengine.v1beta; + +import static io.grpc.MethodDescriptor.generateFullMethodName; + +/** + * + * + *
            + * Service for managing User Stores.
            + * 
            + */ +@io.grpc.stub.annotations.GrpcGenerated +public final class UserStoreServiceGrpc { + + private UserStoreServiceGrpc() {} + + public static final java.lang.String SERVICE_NAME = + "google.cloud.discoveryengine.v1beta.UserStoreService"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.discoveryengine.v1beta.GetUserStoreRequest, + com.google.cloud.discoveryengine.v1beta.UserStore> + getGetUserStoreMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetUserStore", + requestType = com.google.cloud.discoveryengine.v1beta.GetUserStoreRequest.class, + responseType = com.google.cloud.discoveryengine.v1beta.UserStore.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.discoveryengine.v1beta.GetUserStoreRequest, + com.google.cloud.discoveryengine.v1beta.UserStore> + getGetUserStoreMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.discoveryengine.v1beta.GetUserStoreRequest, + com.google.cloud.discoveryengine.v1beta.UserStore> + getGetUserStoreMethod; + if ((getGetUserStoreMethod = UserStoreServiceGrpc.getGetUserStoreMethod) == null) { + synchronized (UserStoreServiceGrpc.class) { + if ((getGetUserStoreMethod = UserStoreServiceGrpc.getGetUserStoreMethod) == null) { + UserStoreServiceGrpc.getGetUserStoreMethod = + getGetUserStoreMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetUserStore")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.discoveryengine.v1beta.GetUserStoreRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.discoveryengine.v1beta.UserStore + .getDefaultInstance())) + .setSchemaDescriptor( + new UserStoreServiceMethodDescriptorSupplier("GetUserStore")) + .build(); + } + } + } + return getGetUserStoreMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.discoveryengine.v1beta.UpdateUserStoreRequest, + com.google.cloud.discoveryengine.v1beta.UserStore> + getUpdateUserStoreMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateUserStore", + requestType = com.google.cloud.discoveryengine.v1beta.UpdateUserStoreRequest.class, + responseType = com.google.cloud.discoveryengine.v1beta.UserStore.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.discoveryengine.v1beta.UpdateUserStoreRequest, + com.google.cloud.discoveryengine.v1beta.UserStore> + getUpdateUserStoreMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.discoveryengine.v1beta.UpdateUserStoreRequest, + com.google.cloud.discoveryengine.v1beta.UserStore> + getUpdateUserStoreMethod; + if ((getUpdateUserStoreMethod = UserStoreServiceGrpc.getUpdateUserStoreMethod) == null) { + synchronized (UserStoreServiceGrpc.class) { + if ((getUpdateUserStoreMethod = UserStoreServiceGrpc.getUpdateUserStoreMethod) == null) { + UserStoreServiceGrpc.getUpdateUserStoreMethod = + getUpdateUserStoreMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateUserStore")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.discoveryengine.v1beta.UpdateUserStoreRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.discoveryengine.v1beta.UserStore + .getDefaultInstance())) + .setSchemaDescriptor( + new UserStoreServiceMethodDescriptorSupplier("UpdateUserStore")) + .build(); + } + } + } + return getUpdateUserStoreMethod; + } + + /** Creates a new async stub that supports all call types for the service */ + public static UserStoreServiceStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public UserStoreServiceStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new UserStoreServiceStub(channel, callOptions); + } + }; + return UserStoreServiceStub.newStub(factory, channel); + } + + /** Creates a new blocking-style stub that supports all types of calls on the service */ + public static UserStoreServiceBlockingV2Stub newBlockingV2Stub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public UserStoreServiceBlockingV2Stub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new UserStoreServiceBlockingV2Stub(channel, callOptions); + } + }; + return UserStoreServiceBlockingV2Stub.newStub(factory, channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static UserStoreServiceBlockingStub newBlockingStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public UserStoreServiceBlockingStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new UserStoreServiceBlockingStub(channel, callOptions); + } + }; + return UserStoreServiceBlockingStub.newStub(factory, channel); + } + + /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ + public static UserStoreServiceFutureStub newFutureStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public UserStoreServiceFutureStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new UserStoreServiceFutureStub(channel, callOptions); + } + }; + return UserStoreServiceFutureStub.newStub(factory, channel); + } + + /** + * + * + *
            +   * Service for managing User Stores.
            +   * 
            + */ + public interface AsyncService { + + /** + * + * + *
            +     * Gets the User Store.
            +     * 
            + */ + default void getUserStore( + com.google.cloud.discoveryengine.v1beta.GetUserStoreRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetUserStoreMethod(), responseObserver); + } + + /** + * + * + *
            +     * Updates the User Store.
            +     * 
            + */ + default void updateUserStore( + com.google.cloud.discoveryengine.v1beta.UpdateUserStoreRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getUpdateUserStoreMethod(), responseObserver); + } + } + + /** + * Base class for the server implementation of the service UserStoreService. + * + *
            +   * Service for managing User Stores.
            +   * 
            + */ + public abstract static class UserStoreServiceImplBase + implements io.grpc.BindableService, AsyncService { + + @java.lang.Override + public final io.grpc.ServerServiceDefinition bindService() { + return UserStoreServiceGrpc.bindService(this); + } + } + + /** + * A stub to allow clients to do asynchronous rpc calls to service UserStoreService. + * + *
            +   * Service for managing User Stores.
            +   * 
            + */ + public static final class UserStoreServiceStub + extends io.grpc.stub.AbstractAsyncStub { + private UserStoreServiceStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected UserStoreServiceStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new UserStoreServiceStub(channel, callOptions); + } + + /** + * + * + *
            +     * Gets the User Store.
            +     * 
            + */ + public void getUserStore( + com.google.cloud.discoveryengine.v1beta.GetUserStoreRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetUserStoreMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
            +     * Updates the User Store.
            +     * 
            + */ + public void updateUserStore( + com.google.cloud.discoveryengine.v1beta.UpdateUserStoreRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdateUserStoreMethod(), getCallOptions()), + request, + responseObserver); + } + } + + /** + * A stub to allow clients to do synchronous rpc calls to service UserStoreService. + * + *
            +   * Service for managing User Stores.
            +   * 
            + */ + public static final class UserStoreServiceBlockingV2Stub + extends io.grpc.stub.AbstractBlockingStub { + private UserStoreServiceBlockingV2Stub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected UserStoreServiceBlockingV2Stub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new UserStoreServiceBlockingV2Stub(channel, callOptions); + } + + /** + * + * + *
            +     * Gets the User Store.
            +     * 
            + */ + public com.google.cloud.discoveryengine.v1beta.UserStore getUserStore( + com.google.cloud.discoveryengine.v1beta.GetUserStoreRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getGetUserStoreMethod(), getCallOptions(), request); + } + + /** + * + * + *
            +     * Updates the User Store.
            +     * 
            + */ + public com.google.cloud.discoveryengine.v1beta.UserStore updateUserStore( + com.google.cloud.discoveryengine.v1beta.UpdateUserStoreRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getUpdateUserStoreMethod(), getCallOptions(), request); + } + } + + /** + * A stub to allow clients to do limited synchronous rpc calls to service UserStoreService. + * + *
            +   * Service for managing User Stores.
            +   * 
            + */ + public static final class UserStoreServiceBlockingStub + extends io.grpc.stub.AbstractBlockingStub { + private UserStoreServiceBlockingStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected UserStoreServiceBlockingStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new UserStoreServiceBlockingStub(channel, callOptions); + } + + /** + * + * + *
            +     * Gets the User Store.
            +     * 
            + */ + public com.google.cloud.discoveryengine.v1beta.UserStore getUserStore( + com.google.cloud.discoveryengine.v1beta.GetUserStoreRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetUserStoreMethod(), getCallOptions(), request); + } + + /** + * + * + *
            +     * Updates the User Store.
            +     * 
            + */ + public com.google.cloud.discoveryengine.v1beta.UserStore updateUserStore( + com.google.cloud.discoveryengine.v1beta.UpdateUserStoreRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateUserStoreMethod(), getCallOptions(), request); + } + } + + /** + * A stub to allow clients to do ListenableFuture-style rpc calls to service UserStoreService. + * + *
            +   * Service for managing User Stores.
            +   * 
            + */ + public static final class UserStoreServiceFutureStub + extends io.grpc.stub.AbstractFutureStub { + private UserStoreServiceFutureStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected UserStoreServiceFutureStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new UserStoreServiceFutureStub(channel, callOptions); + } + + /** + * + * + *
            +     * Gets the User Store.
            +     * 
            + */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.discoveryengine.v1beta.UserStore> + getUserStore(com.google.cloud.discoveryengine.v1beta.GetUserStoreRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetUserStoreMethod(), getCallOptions()), request); + } + + /** + * + * + *
            +     * Updates the User Store.
            +     * 
            + */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.discoveryengine.v1beta.UserStore> + updateUserStore(com.google.cloud.discoveryengine.v1beta.UpdateUserStoreRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdateUserStoreMethod(), getCallOptions()), request); + } + } + + private static final int METHODID_GET_USER_STORE = 0; + private static final int METHODID_UPDATE_USER_STORE = 1; + + private static final class MethodHandlers + implements io.grpc.stub.ServerCalls.UnaryMethod, + io.grpc.stub.ServerCalls.ServerStreamingMethod, + io.grpc.stub.ServerCalls.ClientStreamingMethod, + io.grpc.stub.ServerCalls.BidiStreamingMethod { + private final AsyncService serviceImpl; + private final int methodId; + + MethodHandlers(AsyncService serviceImpl, int methodId) { + this.serviceImpl = serviceImpl; + this.methodId = methodId; + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + case METHODID_GET_USER_STORE: + serviceImpl.getUserStore( + (com.google.cloud.discoveryengine.v1beta.GetUserStoreRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_UPDATE_USER_STORE: + serviceImpl.updateUserStore( + (com.google.cloud.discoveryengine.v1beta.UpdateUserStoreRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + default: + throw new AssertionError(); + } + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public io.grpc.stub.StreamObserver invoke( + io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + default: + throw new AssertionError(); + } + } + } + + public static final io.grpc.ServerServiceDefinition bindService(AsyncService service) { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getGetUserStoreMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.discoveryengine.v1beta.GetUserStoreRequest, + com.google.cloud.discoveryengine.v1beta.UserStore>( + service, METHODID_GET_USER_STORE))) + .addMethod( + getUpdateUserStoreMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.discoveryengine.v1beta.UpdateUserStoreRequest, + com.google.cloud.discoveryengine.v1beta.UserStore>( + service, METHODID_UPDATE_USER_STORE))) + .build(); + } + + private abstract static class UserStoreServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, + io.grpc.protobuf.ProtoServiceDescriptorSupplier { + UserStoreServiceBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return com.google.cloud.discoveryengine.v1beta.UserStoreServiceProto.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("UserStoreService"); + } + } + + private static final class UserStoreServiceFileDescriptorSupplier + extends UserStoreServiceBaseDescriptorSupplier { + UserStoreServiceFileDescriptorSupplier() {} + } + + private static final class UserStoreServiceMethodDescriptorSupplier + extends UserStoreServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final java.lang.String methodName; + + UserStoreServiceMethodDescriptorSupplier(java.lang.String methodName) { + this.methodName = methodName; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { + return getServiceDescriptor().findMethodByName(methodName); + } + } + + private static volatile io.grpc.ServiceDescriptor serviceDescriptor; + + public static io.grpc.ServiceDescriptor getServiceDescriptor() { + io.grpc.ServiceDescriptor result = serviceDescriptor; + if (result == null) { + synchronized (UserStoreServiceGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = + result = + io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new UserStoreServiceFileDescriptorSupplier()) + .addMethod(getGetUserStoreMethod()) + .addMethod(getUpdateUserStoreMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/AclConfig.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/AclConfig.java new file mode 100644 index 000000000000..eda2225460f4 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/AclConfig.java @@ -0,0 +1,925 @@ +/* + * 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/cloud/discoveryengine/v1beta/acl_config.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.discoveryengine.v1beta; + +/** + * + * + *
            + * Access Control Configuration.
            + * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.AclConfig} + */ +@com.google.protobuf.Generated +public final class AclConfig extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.AclConfig) + AclConfigOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "AclConfig"); + } + + // Use AclConfig.newBuilder() to construct. + private AclConfig(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private AclConfig() { + name_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.AclConfigProto + .internal_static_google_cloud_discoveryengine_v1beta_AclConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.AclConfigProto + .internal_static_google_cloud_discoveryengine_v1beta_AclConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.AclConfig.class, + com.google.cloud.discoveryengine.v1beta.AclConfig.Builder.class); + } + + private int bitField0_; + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
            +   * Immutable. The full resource name of the acl configuration.
            +   * Format:
            +   * `projects/{project}/locations/{location}/aclConfig`.
            +   *
            +   * This field must be a UTF-8 encoded string with a length limit of 1024
            +   * characters.
            +   * 
            + * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + 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(); + name_ = s; + return s; + } + } + + /** + * + * + *
            +   * Immutable. The full resource name of the acl configuration.
            +   * Format:
            +   * `projects/{project}/locations/{location}/aclConfig`.
            +   *
            +   * This field must be a UTF-8 encoded string with a length limit of 1024
            +   * characters.
            +   * 
            + * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int IDP_CONFIG_FIELD_NUMBER = 2; + private com.google.cloud.discoveryengine.v1beta.IdpConfig idpConfig_; + + /** + * + * + *
            +   * Identity provider config.
            +   * 
            + * + * .google.cloud.discoveryengine.v1beta.IdpConfig idp_config = 2; + * + * @return Whether the idpConfig field is set. + */ + @java.lang.Override + public boolean hasIdpConfig() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
            +   * Identity provider config.
            +   * 
            + * + * .google.cloud.discoveryengine.v1beta.IdpConfig idp_config = 2; + * + * @return The idpConfig. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.IdpConfig getIdpConfig() { + return idpConfig_ == null + ? com.google.cloud.discoveryengine.v1beta.IdpConfig.getDefaultInstance() + : idpConfig_; + } + + /** + * + * + *
            +   * Identity provider config.
            +   * 
            + * + * .google.cloud.discoveryengine.v1beta.IdpConfig idp_config = 2; + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.IdpConfigOrBuilder getIdpConfigOrBuilder() { + return idpConfig_ == null + ? com.google.cloud.discoveryengine.v1beta.IdpConfig.getDefaultInstance() + : idpConfig_; + } + + 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(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getIdpConfig()); + } + 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(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getIdpConfig()); + } + 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.discoveryengine.v1beta.AclConfig)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1beta.AclConfig other = + (com.google.cloud.discoveryengine.v1beta.AclConfig) obj; + + if (!getName().equals(other.getName())) return false; + if (hasIdpConfig() != other.hasIdpConfig()) return false; + if (hasIdpConfig()) { + if (!getIdpConfig().equals(other.getIdpConfig())) 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) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (hasIdpConfig()) { + hash = (37 * hash) + IDP_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getIdpConfig().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1beta.AclConfig parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.AclConfig 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.discoveryengine.v1beta.AclConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.AclConfig 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.discoveryengine.v1beta.AclConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.AclConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1beta.AclConfig parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.AclConfig 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.discoveryengine.v1beta.AclConfig parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.AclConfig 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.discoveryengine.v1beta.AclConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.AclConfig 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.discoveryengine.v1beta.AclConfig 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; + } + + /** + * + * + *
            +   * Access Control Configuration.
            +   * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.AclConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.AclConfig) + com.google.cloud.discoveryengine.v1beta.AclConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.AclConfigProto + .internal_static_google_cloud_discoveryengine_v1beta_AclConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.AclConfigProto + .internal_static_google_cloud_discoveryengine_v1beta_AclConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.AclConfig.class, + com.google.cloud.discoveryengine.v1beta.AclConfig.Builder.class); + } + + // Construct using com.google.cloud.discoveryengine.v1beta.AclConfig.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetIdpConfigFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + idpConfig_ = null; + if (idpConfigBuilder_ != null) { + idpConfigBuilder_.dispose(); + idpConfigBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1beta.AclConfigProto + .internal_static_google_cloud_discoveryengine_v1beta_AclConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AclConfig getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1beta.AclConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AclConfig build() { + com.google.cloud.discoveryengine.v1beta.AclConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AclConfig buildPartial() { + com.google.cloud.discoveryengine.v1beta.AclConfig result = + new com.google.cloud.discoveryengine.v1beta.AclConfig(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.discoveryengine.v1beta.AclConfig result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.idpConfig_ = idpConfigBuilder_ == null ? idpConfig_ : idpConfigBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.discoveryengine.v1beta.AclConfig) { + return mergeFrom((com.google.cloud.discoveryengine.v1beta.AclConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.discoveryengine.v1beta.AclConfig other) { + if (other == com.google.cloud.discoveryengine.v1beta.AclConfig.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasIdpConfig()) { + mergeIdpConfig(other.getIdpConfig()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage( + internalGetIdpConfigFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + + /** + * + * + *
            +     * Immutable. The full resource name of the acl configuration.
            +     * Format:
            +     * `projects/{project}/locations/{location}/aclConfig`.
            +     *
            +     * This field must be a UTF-8 encoded string with a length limit of 1024
            +     * characters.
            +     * 
            + * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
            +     * Immutable. The full resource name of the acl configuration.
            +     * Format:
            +     * `projects/{project}/locations/{location}/aclConfig`.
            +     *
            +     * This field must be a UTF-8 encoded string with a length limit of 1024
            +     * characters.
            +     * 
            + * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
            +     * Immutable. The full resource name of the acl configuration.
            +     * Format:
            +     * `projects/{project}/locations/{location}/aclConfig`.
            +     *
            +     * This field must be a UTF-8 encoded string with a length limit of 1024
            +     * characters.
            +     * 
            + * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Immutable. The full resource name of the acl configuration.
            +     * Format:
            +     * `projects/{project}/locations/{location}/aclConfig`.
            +     *
            +     * This field must be a UTF-8 encoded string with a length limit of 1024
            +     * characters.
            +     * 
            + * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
            +     * Immutable. The full resource name of the acl configuration.
            +     * Format:
            +     * `projects/{project}/locations/{location}/aclConfig`.
            +     *
            +     * This field must be a UTF-8 encoded string with a length limit of 1024
            +     * characters.
            +     * 
            + * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.cloud.discoveryengine.v1beta.IdpConfig idpConfig_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.IdpConfig, + com.google.cloud.discoveryengine.v1beta.IdpConfig.Builder, + com.google.cloud.discoveryengine.v1beta.IdpConfigOrBuilder> + idpConfigBuilder_; + + /** + * + * + *
            +     * Identity provider config.
            +     * 
            + * + * .google.cloud.discoveryengine.v1beta.IdpConfig idp_config = 2; + * + * @return Whether the idpConfig field is set. + */ + public boolean hasIdpConfig() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
            +     * Identity provider config.
            +     * 
            + * + * .google.cloud.discoveryengine.v1beta.IdpConfig idp_config = 2; + * + * @return The idpConfig. + */ + public com.google.cloud.discoveryengine.v1beta.IdpConfig getIdpConfig() { + if (idpConfigBuilder_ == null) { + return idpConfig_ == null + ? com.google.cloud.discoveryengine.v1beta.IdpConfig.getDefaultInstance() + : idpConfig_; + } else { + return idpConfigBuilder_.getMessage(); + } + } + + /** + * + * + *
            +     * Identity provider config.
            +     * 
            + * + * .google.cloud.discoveryengine.v1beta.IdpConfig idp_config = 2; + */ + public Builder setIdpConfig(com.google.cloud.discoveryengine.v1beta.IdpConfig value) { + if (idpConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + idpConfig_ = value; + } else { + idpConfigBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Identity provider config.
            +     * 
            + * + * .google.cloud.discoveryengine.v1beta.IdpConfig idp_config = 2; + */ + public Builder setIdpConfig( + com.google.cloud.discoveryengine.v1beta.IdpConfig.Builder builderForValue) { + if (idpConfigBuilder_ == null) { + idpConfig_ = builderForValue.build(); + } else { + idpConfigBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Identity provider config.
            +     * 
            + * + * .google.cloud.discoveryengine.v1beta.IdpConfig idp_config = 2; + */ + public Builder mergeIdpConfig(com.google.cloud.discoveryengine.v1beta.IdpConfig value) { + if (idpConfigBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && idpConfig_ != null + && idpConfig_ + != com.google.cloud.discoveryengine.v1beta.IdpConfig.getDefaultInstance()) { + getIdpConfigBuilder().mergeFrom(value); + } else { + idpConfig_ = value; + } + } else { + idpConfigBuilder_.mergeFrom(value); + } + if (idpConfig_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** + * + * + *
            +     * Identity provider config.
            +     * 
            + * + * .google.cloud.discoveryengine.v1beta.IdpConfig idp_config = 2; + */ + public Builder clearIdpConfig() { + bitField0_ = (bitField0_ & ~0x00000002); + idpConfig_ = null; + if (idpConfigBuilder_ != null) { + idpConfigBuilder_.dispose(); + idpConfigBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
            +     * Identity provider config.
            +     * 
            + * + * .google.cloud.discoveryengine.v1beta.IdpConfig idp_config = 2; + */ + public com.google.cloud.discoveryengine.v1beta.IdpConfig.Builder getIdpConfigBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return internalGetIdpConfigFieldBuilder().getBuilder(); + } + + /** + * + * + *
            +     * Identity provider config.
            +     * 
            + * + * .google.cloud.discoveryengine.v1beta.IdpConfig idp_config = 2; + */ + public com.google.cloud.discoveryengine.v1beta.IdpConfigOrBuilder getIdpConfigOrBuilder() { + if (idpConfigBuilder_ != null) { + return idpConfigBuilder_.getMessageOrBuilder(); + } else { + return idpConfig_ == null + ? com.google.cloud.discoveryengine.v1beta.IdpConfig.getDefaultInstance() + : idpConfig_; + } + } + + /** + * + * + *
            +     * Identity provider config.
            +     * 
            + * + * .google.cloud.discoveryengine.v1beta.IdpConfig idp_config = 2; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.IdpConfig, + com.google.cloud.discoveryengine.v1beta.IdpConfig.Builder, + com.google.cloud.discoveryengine.v1beta.IdpConfigOrBuilder> + internalGetIdpConfigFieldBuilder() { + if (idpConfigBuilder_ == null) { + idpConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.IdpConfig, + com.google.cloud.discoveryengine.v1beta.IdpConfig.Builder, + com.google.cloud.discoveryengine.v1beta.IdpConfigOrBuilder>( + getIdpConfig(), getParentForChildren(), isClean()); + idpConfig_ = null; + } + return idpConfigBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.AclConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.AclConfig) + private static final com.google.cloud.discoveryengine.v1beta.AclConfig DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.discoveryengine.v1beta.AclConfig(); + } + + public static com.google.cloud.discoveryengine.v1beta.AclConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AclConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AclConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/AclConfigName.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/AclConfigName.java new file mode 100644 index 000000000000..21a94fe81ec4 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/AclConfigName.java @@ -0,0 +1,192 @@ +/* + * 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.discoveryengine.v1beta; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class AclConfigName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION = + PathTemplate.createWithoutUrlEncoding("projects/{project}/locations/{location}/aclConfig"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + + @Deprecated + protected AclConfigName() { + project = null; + location = null; + } + + private AclConfigName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static AclConfigName of(String project, String location) { + return newBuilder().setProject(project).setLocation(location).build(); + } + + public static String format(String project, String location) { + return newBuilder().setProject(project).setLocation(location).build().toString(); + } + + public static AclConfigName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION.validatedMatch( + formattedString, "AclConfigName.parse: formattedString not in valid format"); + return of(matchMap.get("project"), matchMap.get("location")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (AclConfigName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (project != null) { + fieldMapBuilder.put("project", project); + } + if (location != null) { + fieldMapBuilder.put("location", location); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION.instantiate("project", project, "location", location); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null && getClass() == o.getClass()) { + AclConfigName that = ((AclConfigName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(location); + return h; + } + + /** Builder for projects/{project}/locations/{location}/aclConfig. */ + public static class Builder { + private String project; + private String location; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + private Builder(AclConfigName aclConfigName) { + this.project = aclConfigName.project; + this.location = aclConfigName.location; + } + + public AclConfigName build() { + return new AclConfigName(this); + } + } +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/AclConfigOrBuilder.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/AclConfigOrBuilder.java new file mode 100644 index 000000000000..39e91b815a20 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/AclConfigOrBuilder.java @@ -0,0 +1,101 @@ +/* + * 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/cloud/discoveryengine/v1beta/acl_config.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.discoveryengine.v1beta; + +@com.google.protobuf.Generated +public interface AclConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.AclConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
            +   * Immutable. The full resource name of the acl configuration.
            +   * Format:
            +   * `projects/{project}/locations/{location}/aclConfig`.
            +   *
            +   * This field must be a UTF-8 encoded string with a length limit of 1024
            +   * characters.
            +   * 
            + * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
            +   * Immutable. The full resource name of the acl configuration.
            +   * Format:
            +   * `projects/{project}/locations/{location}/aclConfig`.
            +   *
            +   * This field must be a UTF-8 encoded string with a length limit of 1024
            +   * characters.
            +   * 
            + * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
            +   * Identity provider config.
            +   * 
            + * + * .google.cloud.discoveryengine.v1beta.IdpConfig idp_config = 2; + * + * @return Whether the idpConfig field is set. + */ + boolean hasIdpConfig(); + + /** + * + * + *
            +   * Identity provider config.
            +   * 
            + * + * .google.cloud.discoveryengine.v1beta.IdpConfig idp_config = 2; + * + * @return The idpConfig. + */ + com.google.cloud.discoveryengine.v1beta.IdpConfig getIdpConfig(); + + /** + * + * + *
            +   * Identity provider config.
            +   * 
            + * + * .google.cloud.discoveryengine.v1beta.IdpConfig idp_config = 2; + */ + com.google.cloud.discoveryengine.v1beta.IdpConfigOrBuilder getIdpConfigOrBuilder(); +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/AclConfigProto.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/AclConfigProto.java new file mode 100644 index 000000000000..a116c50e6c5e --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/AclConfigProto.java @@ -0,0 +1,104 @@ +/* + * 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/cloud/discoveryengine/v1beta/acl_config.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.discoveryengine.v1beta; + +@com.google.protobuf.Generated +public final class AclConfigProto extends com.google.protobuf.GeneratedFile { + private AclConfigProto() {} + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "AclConfigProto"); + } + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1beta_AclConfig_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1beta_AclConfig_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n4google/cloud/discoveryengine/v1beta/ac" + + "l_config.proto\022#google.cloud.discoveryen" + + "gine.v1beta\032\037google/api/field_behavior.p" + + "roto\032\031google/api/resource.proto\0320google/" + + "cloud/discoveryengine/v1beta/common.prot" + + "o\"\304\001\n\tAclConfig\022\021\n\004name\030\001 \001(\tB\003\340A\005\022B\n\nid" + + "p_config\030\002 \001(\0132..google.cloud.discoverye" + + "ngine.v1beta.IdpConfig:`\352A]\n(discoveryen" + + "gine.googleapis.com/AclConfig\0221projects/" + + "{project}/locations/{location}/aclConfig" + + "B\225\002\n\'com.google.cloud.discoveryengine.v1" + + "betaB\016AclConfigProtoP\001ZQcloud.google.com" + + "/go/discoveryengine/apiv1beta/discoverye" + + "nginepb;discoveryenginepb\242\002\017DISCOVERYENG" + + "INE\252\002#Google.Cloud.DiscoveryEngine.V1Bet" + + "a\312\002#Google\\Cloud\\DiscoveryEngine\\V1beta\352" + + "\002&Google::Cloud::DiscoveryEngine::V1beta" + + "b\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.ResourceProto.getDescriptor(), + com.google.cloud.discoveryengine.v1beta.CommonProto.getDescriptor(), + }); + internal_static_google_cloud_discoveryengine_v1beta_AclConfig_descriptor = + getDescriptor().getMessageType(0); + internal_static_google_cloud_discoveryengine_v1beta_AclConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1beta_AclConfig_descriptor, + new java.lang.String[] { + "Name", "IdpConfig", + }); + descriptor.resolveAllFeaturesImmutable(); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + com.google.cloud.discoveryengine.v1beta.CommonProto.getDescriptor(); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.ResourceProto.resource); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/AclConfigServiceProto.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/AclConfigServiceProto.java new file mode 100644 index 000000000000..d65bf6d7c402 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/AclConfigServiceProto.java @@ -0,0 +1,141 @@ +/* + * 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/cloud/discoveryengine/v1beta/acl_config_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.discoveryengine.v1beta; + +@com.google.protobuf.Generated +public final class AclConfigServiceProto extends com.google.protobuf.GeneratedFile { + private AclConfigServiceProto() {} + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "AclConfigServiceProto"); + } + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1beta_GetAclConfigRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1beta_GetAclConfigRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1beta_UpdateAclConfigRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1beta_UpdateAclConfigRequest_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n\n\004name\030\001 \001(\tB0\340A\002\372A*\n(disco" + + "veryengine.googleapis.com/AclConfig\"a\n\026U" + + "pdateAclConfigRequest\022G\n\nacl_config\030\001 \001(" + + "\0132..google.cloud.discoveryengine.v1beta." + + "AclConfigB\003\340A\0022\360\004\n\020AclConfigService\022\316\001\n\017" + + "UpdateAclConfig\022;.google.cloud.discovery" + + "engine.v1beta.UpdateAclConfigRequest\032..g" + + "oogle.cloud.discoveryengine.v1beta.AclCo" + + "nfig\"N\202\323\344\223\002H2:/v1beta/{acl_config.name=p" + + "rojects/*/locations/*/aclConfig}:\nacl_co" + + "nfig\022\270\001\n\014GetAclConfig\0228.google.cloud.dis" + + "coveryengine.v1beta.GetAclConfigRequest\032" + + "..google.cloud.discoveryengine.v1beta.Ac" + + "lConfig\">\332A\004name\202\323\344\223\0021\022//v1beta/{name=pr" + + "ojects/*/locations/*/aclConfig}\032\317\001\312A\036dis" + + "coveryengine.googleapis.com\322A\252\001https://w" + + "ww.googleapis.com/auth/cloud-platform,ht" + + "tps://www.googleapis.com/auth/discoverye" + + "ngine.readwrite,https://www.googleapis.c" + + "om/auth/discoveryengine.serving.readwrit" + + "eB\234\002\n\'com.google.cloud.discoveryengine.v" + + "1betaB\025AclConfigServiceProtoP\001ZQcloud.go" + + "ogle.com/go/discoveryengine/apiv1beta/di" + + "scoveryenginepb;discoveryenginepb\242\002\017DISC" + + "OVERYENGINE\252\002#Google.Cloud.DiscoveryEngi" + + "ne.V1Beta\312\002#Google\\Cloud\\DiscoveryEngine" + + "\\V1beta\352\002&Google::Cloud::DiscoveryEngine" + + "::V1betab\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.AnnotationsProto.getDescriptor(), + com.google.api.ClientProto.getDescriptor(), + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.ResourceProto.getDescriptor(), + com.google.cloud.discoveryengine.v1beta.AclConfigProto.getDescriptor(), + }); + internal_static_google_cloud_discoveryengine_v1beta_GetAclConfigRequest_descriptor = + getDescriptor().getMessageType(0); + internal_static_google_cloud_discoveryengine_v1beta_GetAclConfigRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1beta_GetAclConfigRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_discoveryengine_v1beta_UpdateAclConfigRequest_descriptor = + getDescriptor().getMessageType(1); + internal_static_google_cloud_discoveryengine_v1beta_UpdateAclConfigRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1beta_UpdateAclConfigRequest_descriptor, + new java.lang.String[] { + "AclConfig", + }); + descriptor.resolveAllFeaturesImmutable(); + com.google.api.AnnotationsProto.getDescriptor(); + com.google.api.ClientProto.getDescriptor(); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + com.google.cloud.discoveryengine.v1beta.AclConfigProto.getDescriptor(); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.ClientProto.defaultHost); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.AnnotationsProto.http); + registry.add(com.google.api.ClientProto.methodSignature); + registry.add(com.google.api.ClientProto.oauthScopes); + registry.add(com.google.api.ResourceProto.resourceReference); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/AdvancedCompleteQueryRequest.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/AdvancedCompleteQueryRequest.java index 93c5e923225e..e9ead1cfd5d9 100644 --- a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/AdvancedCompleteQueryRequest.java +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/AdvancedCompleteQueryRequest.java @@ -60,6 +60,8 @@ private AdvancedCompleteQueryRequest() { queryModel_ = ""; userPseudoId_ = ""; suggestionTypes_ = emptyIntList(); + suggestionTypeSpecs_ = java.util.Collections.emptyList(); + experimentIds_ = com.google.protobuf.LazyStringArrayList.emptyList(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @@ -328,7 +330,7 @@ public interface BoostSpecOrBuilder * *
                  * Condition boost specifications. If a suggestion matches multiple
            -     * conditions in the specifictions, boost values from these specifications
            +     * conditions in the specifications, boost values from these specifications
                  * are all applied and combined in a non-linear way. Maximum number of
                  * specifications is 20.
                  *
            @@ -349,7 +351,7 @@ public interface BoostSpecOrBuilder
                  *
                  * 
                  * Condition boost specifications. If a suggestion matches multiple
            -     * conditions in the specifictions, boost values from these specifications
            +     * conditions in the specifications, boost values from these specifications
                  * are all applied and combined in a non-linear way. Maximum number of
                  * specifications is 20.
                  *
            @@ -369,7 +371,7 @@ public interface BoostSpecOrBuilder
                  *
                  * 
                  * Condition boost specifications. If a suggestion matches multiple
            -     * conditions in the specifictions, boost values from these specifications
            +     * conditions in the specifications, boost values from these specifications
                  * are all applied and combined in a non-linear way. Maximum number of
                  * specifications is 20.
                  *
            @@ -387,7 +389,7 @@ public interface BoostSpecOrBuilder
                  *
                  * 
                  * Condition boost specifications. If a suggestion matches multiple
            -     * conditions in the specifictions, boost values from these specifications
            +     * conditions in the specifications, boost values from these specifications
                  * are all applied and combined in a non-linear way. Maximum number of
                  * specifications is 20.
                  *
            @@ -409,7 +411,7 @@ public interface BoostSpecOrBuilder
                  *
                  * 
                  * Condition boost specifications. If a suggestion matches multiple
            -     * conditions in the specifictions, boost values from these specifications
            +     * conditions in the specifications, boost values from these specifications
                  * are all applied and combined in a non-linear way. Maximum number of
                  * specifications is 20.
                  *
            @@ -429,7 +431,8 @@ public interface BoostSpecOrBuilder
                *
                *
                * 
            -   * Specification to boost suggestions based on the condtion of the suggestion.
            +   * Specification to boost suggestions based on the condition of the
            +   * suggestion.
                * 
            * * Protobuf type {@code @@ -1402,7 +1405,7 @@ public com.google.protobuf.Parser getParserForType() { * *
                  * Condition boost specifications. If a suggestion matches multiple
            -     * conditions in the specifictions, boost values from these specifications
            +     * conditions in the specifications, boost values from these specifications
                  * are all applied and combined in a non-linear way. Maximum number of
                  * specifications is 20.
                  *
            @@ -1426,7 +1429,7 @@ public com.google.protobuf.Parser getParserForType() {
                  *
                  * 
                  * Condition boost specifications. If a suggestion matches multiple
            -     * conditions in the specifictions, boost values from these specifications
            +     * conditions in the specifications, boost values from these specifications
                  * are all applied and combined in a non-linear way. Maximum number of
                  * specifications is 20.
                  *
            @@ -1451,7 +1454,7 @@ public com.google.protobuf.Parser getParserForType() {
                  *
                  * 
                  * Condition boost specifications. If a suggestion matches multiple
            -     * conditions in the specifictions, boost values from these specifications
            +     * conditions in the specifications, boost values from these specifications
                  * are all applied and combined in a non-linear way. Maximum number of
                  * specifications is 20.
                  *
            @@ -1472,7 +1475,7 @@ public int getConditionBoostSpecsCount() {
                  *
                  * 
                  * Condition boost specifications. If a suggestion matches multiple
            -     * conditions in the specifictions, boost values from these specifications
            +     * conditions in the specifications, boost values from these specifications
                  * are all applied and combined in a non-linear way. Maximum number of
                  * specifications is 20.
                  *
            @@ -1495,7 +1498,7 @@ public int getConditionBoostSpecsCount() {
                  *
                  * 
                  * Condition boost specifications. If a suggestion matches multiple
            -     * conditions in the specifictions, boost values from these specifications
            +     * conditions in the specifications, boost values from these specifications
                  * are all applied and combined in a non-linear way. Maximum number of
                  * specifications is 20.
                  *
            @@ -1690,7 +1693,8 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.Builder
                  *
                  *
                  * 
            -     * Specification to boost suggestions based on the condtion of the suggestion.
            +     * Specification to boost suggestions based on the condition of the
            +     * suggestion.
                  * 
            * * Protobuf type {@code @@ -1932,7 +1936,7 @@ private void ensureConditionBoostSpecsIsMutable() { * *
                    * Condition boost specifications. If a suggestion matches multiple
            -       * conditions in the specifictions, boost values from these specifications
            +       * conditions in the specifications, boost values from these specifications
                    * are all applied and combined in a non-linear way. Maximum number of
                    * specifications is 20.
                    *
            @@ -1959,7 +1963,7 @@ private void ensureConditionBoostSpecsIsMutable() {
                    *
                    * 
                    * Condition boost specifications. If a suggestion matches multiple
            -       * conditions in the specifictions, boost values from these specifications
            +       * conditions in the specifications, boost values from these specifications
                    * are all applied and combined in a non-linear way. Maximum number of
                    * specifications is 20.
                    *
            @@ -1983,7 +1987,7 @@ public int getConditionBoostSpecsCount() {
                    *
                    * 
                    * Condition boost specifications. If a suggestion matches multiple
            -       * conditions in the specifictions, boost values from these specifications
            +       * conditions in the specifications, boost values from these specifications
                    * are all applied and combined in a non-linear way. Maximum number of
                    * specifications is 20.
                    *
            @@ -2009,7 +2013,7 @@ public int getConditionBoostSpecsCount() {
                    *
                    * 
                    * Condition boost specifications. If a suggestion matches multiple
            -       * conditions in the specifictions, boost values from these specifications
            +       * conditions in the specifications, boost values from these specifications
                    * are all applied and combined in a non-linear way. Maximum number of
                    * specifications is 20.
                    *
            @@ -2043,7 +2047,7 @@ public Builder setConditionBoostSpecs(
                    *
                    * 
                    * Condition boost specifications. If a suggestion matches multiple
            -       * conditions in the specifictions, boost values from these specifications
            +       * conditions in the specifications, boost values from these specifications
                    * are all applied and combined in a non-linear way. Maximum number of
                    * specifications is 20.
                    *
            @@ -2074,7 +2078,7 @@ public Builder setConditionBoostSpecs(
                    *
                    * 
                    * Condition boost specifications. If a suggestion matches multiple
            -       * conditions in the specifictions, boost values from these specifications
            +       * conditions in the specifications, boost values from these specifications
                    * are all applied and combined in a non-linear way. Maximum number of
                    * specifications is 20.
                    *
            @@ -2107,7 +2111,7 @@ public Builder addConditionBoostSpecs(
                    *
                    * 
                    * Condition boost specifications. If a suggestion matches multiple
            -       * conditions in the specifictions, boost values from these specifications
            +       * conditions in the specifications, boost values from these specifications
                    * are all applied and combined in a non-linear way. Maximum number of
                    * specifications is 20.
                    *
            @@ -2141,7 +2145,7 @@ public Builder addConditionBoostSpecs(
                    *
                    * 
                    * Condition boost specifications. If a suggestion matches multiple
            -       * conditions in the specifictions, boost values from these specifications
            +       * conditions in the specifications, boost values from these specifications
                    * are all applied and combined in a non-linear way. Maximum number of
                    * specifications is 20.
                    *
            @@ -2171,7 +2175,7 @@ public Builder addConditionBoostSpecs(
                    *
                    * 
                    * Condition boost specifications. If a suggestion matches multiple
            -       * conditions in the specifictions, boost values from these specifications
            +       * conditions in the specifications, boost values from these specifications
                    * are all applied and combined in a non-linear way. Maximum number of
                    * specifications is 20.
                    *
            @@ -2202,7 +2206,7 @@ public Builder addConditionBoostSpecs(
                    *
                    * 
                    * Condition boost specifications. If a suggestion matches multiple
            -       * conditions in the specifictions, boost values from these specifications
            +       * conditions in the specifications, boost values from these specifications
                    * are all applied and combined in a non-linear way. Maximum number of
                    * specifications is 20.
                    *
            @@ -2234,7 +2238,7 @@ public Builder addAllConditionBoostSpecs(
                    *
                    * 
                    * Condition boost specifications. If a suggestion matches multiple
            -       * conditions in the specifictions, boost values from these specifications
            +       * conditions in the specifications, boost values from these specifications
                    * are all applied and combined in a non-linear way. Maximum number of
                    * specifications is 20.
                    *
            @@ -2261,7 +2265,7 @@ public Builder clearConditionBoostSpecs() {
                    *
                    * 
                    * Condition boost specifications. If a suggestion matches multiple
            -       * conditions in the specifictions, boost values from these specifications
            +       * conditions in the specifications, boost values from these specifications
                    * are all applied and combined in a non-linear way. Maximum number of
                    * specifications is 20.
                    *
            @@ -2288,7 +2292,7 @@ public Builder removeConditionBoostSpecs(int index) {
                    *
                    * 
                    * Condition boost specifications. If a suggestion matches multiple
            -       * conditions in the specifictions, boost values from these specifications
            +       * conditions in the specifications, boost values from these specifications
                    * are all applied and combined in a non-linear way. Maximum number of
                    * specifications is 20.
                    *
            @@ -2310,7 +2314,7 @@ public Builder removeConditionBoostSpecs(int index) {
                    *
                    * 
                    * Condition boost specifications. If a suggestion matches multiple
            -       * conditions in the specifictions, boost values from these specifications
            +       * conditions in the specifications, boost values from these specifications
                    * are all applied and combined in a non-linear way. Maximum number of
                    * specifications is 20.
                    *
            @@ -2336,7 +2340,7 @@ public Builder removeConditionBoostSpecs(int index) {
                    *
                    * 
                    * Condition boost specifications. If a suggestion matches multiple
            -       * conditions in the specifictions, boost values from these specifications
            +       * conditions in the specifications, boost values from these specifications
                    * are all applied and combined in a non-linear way. Maximum number of
                    * specifications is 20.
                    *
            @@ -2364,7 +2368,7 @@ public Builder removeConditionBoostSpecs(int index) {
                    *
                    * 
                    * Condition boost specifications. If a suggestion matches multiple
            -       * conditions in the specifictions, boost values from these specifications
            +       * conditions in the specifications, boost values from these specifications
                    * are all applied and combined in a non-linear way. Maximum number of
                    * specifications is 20.
                    *
            @@ -2389,7 +2393,7 @@ public Builder removeConditionBoostSpecs(int index) {
                    *
                    * 
                    * Condition boost specifications. If a suggestion matches multiple
            -       * conditions in the specifictions, boost values from these specifications
            +       * conditions in the specifications, boost values from these specifications
                    * are all applied and combined in a non-linear way. Maximum number of
                    * specifications is 20.
                    *
            @@ -2415,7 +2419,7 @@ public Builder removeConditionBoostSpecs(int index) {
                    *
                    * 
                    * Condition boost specifications. If a suggestion matches multiple
            -       * conditions in the specifictions, boost values from these specifications
            +       * conditions in the specifications, boost values from these specifications
                    * are all applied and combined in a non-linear way. Maximum number of
                    * specifications is 20.
                    *
            @@ -2516,1227 +2520,3027 @@ public com.google.protobuf.Parser getParserForType() {
                 }
               }
             
            -  private int bitField0_;
            -  public static final int COMPLETION_CONFIG_FIELD_NUMBER = 1;
            +  public interface SuggestionTypeSpecOrBuilder
            +      extends
            +      // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.SuggestionTypeSpec)
            +      com.google.protobuf.MessageOrBuilder {
             
            -  @SuppressWarnings("serial")
            -  private volatile java.lang.Object completionConfig_ = "";
            +    /**
            +     *
            +     *
            +     * 
            +     * Optional. Suggestion type.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.SuggestionType suggestion_type = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for suggestionType. + */ + int getSuggestionTypeValue(); - /** - * - * - *
            -   * Required. The completion_config of the parent dataStore or engine resource
            -   * name for which the completion is performed, such as
            -   * `projects/*/locations/global/collections/default_collection/dataStores/*/completionConfig`
            -   * `projects/*/locations/global/collections/default_collection/engines/*/completionConfig`.
            -   * 
            - * - * - * string completion_config = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The completionConfig. - */ - @java.lang.Override - public java.lang.String getCompletionConfig() { - java.lang.Object ref = completionConfig_; - 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(); - completionConfig_ = s; - return s; - } - } + /** + * + * + *
            +     * Optional. Suggestion type.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.SuggestionType suggestion_type = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The suggestionType. + */ + com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.SuggestionType + getSuggestionType(); - /** - * - * - *
            -   * Required. The completion_config of the parent dataStore or engine resource
            -   * name for which the completion is performed, such as
            -   * `projects/*/locations/global/collections/default_collection/dataStores/*/completionConfig`
            -   * `projects/*/locations/global/collections/default_collection/engines/*/completionConfig`.
            -   * 
            - * - * - * string completion_config = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for completionConfig. - */ - @java.lang.Override - public com.google.protobuf.ByteString getCompletionConfigBytes() { - java.lang.Object ref = completionConfig_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - completionConfig_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } + /** + * + * + *
            +     * Optional. Maximum number of suggestions to return for each suggestion
            +     * type.
            +     * 
            + * + * int32 max_suggestions = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The maxSuggestions. + */ + int getMaxSuggestions(); } - public static final int QUERY_FIELD_NUMBER = 2; - - @SuppressWarnings("serial") - private volatile java.lang.Object query_ = ""; - /** * * *
            -   * Required. The typeahead input used to fetch suggestions. Maximum length is
            -   * 128 characters.
            -   *
            -   * The query can not be empty for most of the suggestion types. If it is
            -   * empty, an `INVALID_ARGUMENT` error is returned. The exception is when the
            -   * suggestion_types contains only the type `RECENT_SEARCH`, the query can
            -   * be an empty string. The is called "zero prefix" feature, which returns
            -   * user's recently searched queries given the empty query.
            +   * Specification of each suggestion type.
                * 
            * - * string query = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The query. + * Protobuf type {@code + * google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.SuggestionTypeSpec} */ - @java.lang.Override - public java.lang.String getQuery() { - java.lang.Object ref = query_; - 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(); - query_ = s; - return s; - } - } + public static final class SuggestionTypeSpec extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.SuggestionTypeSpec) + SuggestionTypeSpecOrBuilder { + private static final long serialVersionUID = 0L; - /** - * - * - *
            -   * Required. The typeahead input used to fetch suggestions. Maximum length is
            -   * 128 characters.
            -   *
            -   * The query can not be empty for most of the suggestion types. If it is
            -   * empty, an `INVALID_ARGUMENT` error is returned. The exception is when the
            -   * suggestion_types contains only the type `RECENT_SEARCH`, the query can
            -   * be an empty string. The is called "zero prefix" feature, which returns
            -   * user's recently searched queries given the empty query.
            -   * 
            - * - * string query = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for query. - */ - @java.lang.Override - public com.google.protobuf.ByteString getQueryBytes() { - java.lang.Object ref = query_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - query_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "SuggestionTypeSpec"); } - } - public static final int QUERY_MODEL_FIELD_NUMBER = 3; + // Use SuggestionTypeSpec.newBuilder() to construct. + private SuggestionTypeSpec(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } - @SuppressWarnings("serial") - private volatile java.lang.Object queryModel_ = ""; + private SuggestionTypeSpec() { + suggestionType_ = 0; + } - /** - * - * - *
            -   * Specifies the autocomplete data model. This overrides any model specified
            -   * in the Configuration > Autocomplete section of the Cloud console. Currently
            -   * supported values:
            -   *
            -   * * `document` - Using suggestions generated from user-imported documents.
            -   * * `search-history` - Using suggestions generated from the past history of
            -   * [SearchService.Search][google.cloud.discoveryengine.v1beta.SearchService.Search]
            -   * API calls. Do not use it when there is no traffic for Search API.
            -   * * `user-event` - Using suggestions generated from user-imported search
            -   * events.
            -   * * `document-completable` - Using suggestions taken directly from
            -   * user-imported document fields marked as completable.
            -   *
            -   * Default values:
            -   *
            -   * * `document` is the default model for regular dataStores.
            -   * * `search-history` is the default model for site search dataStores.
            -   * 
            - * - * string query_model = 3; - * - * @return The queryModel. - */ - @java.lang.Override - public java.lang.String getQueryModel() { - java.lang.Object ref = queryModel_; - 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(); - queryModel_ = s; - return s; + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.CompletionServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_AdvancedCompleteQueryRequest_SuggestionTypeSpec_descriptor; } - } - /** - * - * - *
            -   * Specifies the autocomplete data model. This overrides any model specified
            -   * in the Configuration > Autocomplete section of the Cloud console. Currently
            -   * supported values:
            -   *
            -   * * `document` - Using suggestions generated from user-imported documents.
            -   * * `search-history` - Using suggestions generated from the past history of
            -   * [SearchService.Search][google.cloud.discoveryengine.v1beta.SearchService.Search]
            -   * API calls. Do not use it when there is no traffic for Search API.
            -   * * `user-event` - Using suggestions generated from user-imported search
            -   * events.
            -   * * `document-completable` - Using suggestions taken directly from
            -   * user-imported document fields marked as completable.
            -   *
            -   * Default values:
            -   *
            -   * * `document` is the default model for regular dataStores.
            -   * * `search-history` is the default model for site search dataStores.
            -   * 
            - * - * string query_model = 3; - * - * @return The bytes for queryModel. - */ - @java.lang.Override - public com.google.protobuf.ByteString getQueryModelBytes() { - java.lang.Object ref = queryModel_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - queryModel_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.CompletionServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_AdvancedCompleteQueryRequest_SuggestionTypeSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest + .SuggestionTypeSpec.class, + com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest + .SuggestionTypeSpec.Builder.class); } - } - public static final int USER_PSEUDO_ID_FIELD_NUMBER = 4; + public static final int SUGGESTION_TYPE_FIELD_NUMBER = 1; + private int suggestionType_ = 0; - @SuppressWarnings("serial") - private volatile java.lang.Object userPseudoId_ = ""; + /** + * + * + *
            +     * Optional. Suggestion type.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.SuggestionType suggestion_type = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for suggestionType. + */ + @java.lang.Override + public int getSuggestionTypeValue() { + return suggestionType_; + } - /** - * - * - *
            -   * A unique identifier for tracking visitors. For example, this could be
            -   * implemented with an HTTP cookie, which should be able to uniquely identify
            -   * a visitor on a single device. This unique identifier should not change if
            -   * the visitor logs in or out of the website.
            -   *
            -   * This field should NOT have a fixed value such as `unknown_visitor`.
            -   *
            -   * This should be the same identifier as
            -   * [UserEvent.user_pseudo_id][google.cloud.discoveryengine.v1beta.UserEvent.user_pseudo_id]
            -   * and
            -   * [SearchRequest.user_pseudo_id][google.cloud.discoveryengine.v1beta.SearchRequest.user_pseudo_id].
            -   *
            -   * The field must be a UTF-8 encoded string with a length limit of 128
            -   * 
            - * - * string user_pseudo_id = 4; - * - * @return The userPseudoId. - */ - @java.lang.Override - public java.lang.String getUserPseudoId() { - java.lang.Object ref = userPseudoId_; - 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(); - userPseudoId_ = s; - return s; + /** + * + * + *
            +     * Optional. Suggestion type.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.SuggestionType suggestion_type = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The suggestionType. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.SuggestionType + getSuggestionType() { + com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.SuggestionType result = + com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.SuggestionType + .forNumber(suggestionType_); + return result == null + ? com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.SuggestionType + .UNRECOGNIZED + : result; } - } - /** - * - * - *
            -   * A unique identifier for tracking visitors. For example, this could be
            -   * implemented with an HTTP cookie, which should be able to uniquely identify
            -   * a visitor on a single device. This unique identifier should not change if
            -   * the visitor logs in or out of the website.
            -   *
            -   * This field should NOT have a fixed value such as `unknown_visitor`.
            -   *
            -   * This should be the same identifier as
            -   * [UserEvent.user_pseudo_id][google.cloud.discoveryengine.v1beta.UserEvent.user_pseudo_id]
            -   * and
            -   * [SearchRequest.user_pseudo_id][google.cloud.discoveryengine.v1beta.SearchRequest.user_pseudo_id].
            -   *
            -   * The field must be a UTF-8 encoded string with a length limit of 128
            -   * 
            - * - * string user_pseudo_id = 4; - * - * @return The bytes for userPseudoId. - */ - @java.lang.Override - public com.google.protobuf.ByteString getUserPseudoIdBytes() { - java.lang.Object ref = userPseudoId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - userPseudoId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } + public static final int MAX_SUGGESTIONS_FIELD_NUMBER = 2; + private int maxSuggestions_ = 0; - public static final int USER_INFO_FIELD_NUMBER = 9; - private com.google.cloud.discoveryengine.v1beta.UserInfo userInfo_; + /** + * + * + *
            +     * Optional. Maximum number of suggestions to return for each suggestion
            +     * type.
            +     * 
            + * + * int32 max_suggestions = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The maxSuggestions. + */ + @java.lang.Override + public int getMaxSuggestions() { + return maxSuggestions_; + } - /** - * - * - *
            -   * Optional. Information about the end user.
            -   *
            -   * This should be the same identifier information as
            -   * [UserEvent.user_info][google.cloud.discoveryengine.v1beta.UserEvent.user_info]
            -   * and
            -   * [SearchRequest.user_info][google.cloud.discoveryengine.v1beta.SearchRequest.user_info].
            -   * 
            - * - * - * .google.cloud.discoveryengine.v1beta.UserInfo user_info = 9 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the userInfo field is set. - */ - @java.lang.Override - public boolean hasUserInfo() { - return ((bitField0_ & 0x00000001) != 0); - } + private byte memoizedIsInitialized = -1; - /** - * - * - *
            -   * Optional. Information about the end user.
            -   *
            -   * This should be the same identifier information as
            -   * [UserEvent.user_info][google.cloud.discoveryengine.v1beta.UserEvent.user_info]
            -   * and
            -   * [SearchRequest.user_info][google.cloud.discoveryengine.v1beta.SearchRequest.user_info].
            -   * 
            - * - * - * .google.cloud.discoveryengine.v1beta.UserInfo user_info = 9 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The userInfo. - */ - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.UserInfo getUserInfo() { - return userInfo_ == null - ? com.google.cloud.discoveryengine.v1beta.UserInfo.getDefaultInstance() - : userInfo_; - } + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; - /** - * - * - *
            -   * Optional. Information about the end user.
            -   *
            -   * This should be the same identifier information as
            -   * [UserEvent.user_info][google.cloud.discoveryengine.v1beta.UserEvent.user_info]
            -   * and
            -   * [SearchRequest.user_info][google.cloud.discoveryengine.v1beta.SearchRequest.user_info].
            -   * 
            - * - * - * .google.cloud.discoveryengine.v1beta.UserInfo user_info = 9 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.UserInfoOrBuilder getUserInfoOrBuilder() { - return userInfo_ == null - ? com.google.cloud.discoveryengine.v1beta.UserInfo.getDefaultInstance() - : userInfo_; - } + memoizedIsInitialized = 1; + return true; + } - public static final int INCLUDE_TAIL_SUGGESTIONS_FIELD_NUMBER = 5; - private boolean includeTailSuggestions_ = false; + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (suggestionType_ + != com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.SuggestionType + .SUGGESTION_TYPE_UNSPECIFIED + .getNumber()) { + output.writeEnum(1, suggestionType_); + } + if (maxSuggestions_ != 0) { + output.writeInt32(2, maxSuggestions_); + } + getUnknownFields().writeTo(output); + } - /** - * - * - *
            -   * Indicates if tail suggestions should be returned if there are no
            -   * suggestions that match the full query. Even if set to true, if there are
            -   * suggestions that match the full query, those are returned and no
            -   * tail suggestions are returned.
            -   * 
            - * - * bool include_tail_suggestions = 5; - * - * @return The includeTailSuggestions. - */ - @java.lang.Override - public boolean getIncludeTailSuggestions() { - return includeTailSuggestions_; - } + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; - public static final int BOOST_SPEC_FIELD_NUMBER = 6; - private com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.BoostSpec boostSpec_; + size = 0; + if (suggestionType_ + != com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.SuggestionType + .SUGGESTION_TYPE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, suggestionType_); + } + if (maxSuggestions_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, maxSuggestions_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } - /** - * - * - *
            -   * Optional. Specification to boost suggestions matching the condition.
            -   * 
            - * - * - * .google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.BoostSpec boost_spec = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the boostSpec field is set. - */ - @java.lang.Override - public boolean hasBoostSpec() { - return ((bitField0_ & 0x00000002) != 0); - } + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof + com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest + .SuggestionTypeSpec)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.SuggestionTypeSpec + other = + (com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest + .SuggestionTypeSpec) + obj; - /** - * - * - *
            -   * Optional. Specification to boost suggestions matching the condition.
            -   * 
            - * - * - * .google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.BoostSpec boost_spec = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The boostSpec. - */ - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.BoostSpec - getBoostSpec() { - return boostSpec_ == null - ? com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.BoostSpec - .getDefaultInstance() - : boostSpec_; - } + if (suggestionType_ != other.suggestionType_) return false; + if (getMaxSuggestions() != other.getMaxSuggestions()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } - /** - * - * - *
            -   * Optional. Specification to boost suggestions matching the condition.
            -   * 
            - * - * - * .google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.BoostSpec boost_spec = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.BoostSpecOrBuilder - getBoostSpecOrBuilder() { - return boostSpec_ == null - ? com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.BoostSpec - .getDefaultInstance() - : boostSpec_; - } - - public static final int SUGGESTION_TYPES_FIELD_NUMBER = 7; - - @SuppressWarnings("serial") - private com.google.protobuf.Internal.IntList suggestionTypes_ = emptyIntList(); - - private static final com.google.protobuf.Internal.IntListAdapter.IntConverter< - com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.SuggestionType> - suggestionTypes_converter_ = - new com.google.protobuf.Internal.IntListAdapter.IntConverter< - com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest - .SuggestionType>() { - public com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest - .SuggestionType - convert(int from) { - com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.SuggestionType - result = - com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest - .SuggestionType.forNumber(from); - return result == null - ? com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest - .SuggestionType.UNRECOGNIZED - : result; - } - }; - - /** - * - * - *
            -   * Optional. Suggestion types to return. If empty or unspecified, query
            -   * suggestions are returned. Only one suggestion type is supported at the
            -   * moment.
            -   * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.SuggestionType suggestion_types = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return A list containing the suggestionTypes. - */ - @java.lang.Override - public java.util.List< - com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.SuggestionType> - getSuggestionTypesList() { - return new com.google.protobuf.Internal.IntListAdapter< - com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.SuggestionType>( - suggestionTypes_, suggestionTypes_converter_); - } - - /** - * - * - *
            -   * Optional. Suggestion types to return. If empty or unspecified, query
            -   * suggestions are returned. Only one suggestion type is supported at the
            -   * moment.
            -   * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.SuggestionType suggestion_types = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The count of suggestionTypes. - */ - @java.lang.Override - public int getSuggestionTypesCount() { - return suggestionTypes_.size(); - } + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + SUGGESTION_TYPE_FIELD_NUMBER; + hash = (53 * hash) + suggestionType_; + hash = (37 * hash) + MAX_SUGGESTIONS_FIELD_NUMBER; + hash = (53 * hash) + getMaxSuggestions(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } - /** - * - * - *
            -   * Optional. Suggestion types to return. If empty or unspecified, query
            -   * suggestions are returned. Only one suggestion type is supported at the
            -   * moment.
            -   * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.SuggestionType suggestion_types = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @param index The index of the element to return. - * @return The suggestionTypes at the given index. - */ - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.SuggestionType - getSuggestionTypes(int index) { - return suggestionTypes_converter_.convert(suggestionTypes_.getInt(index)); - } + public static com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest + .SuggestionTypeSpec + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - /** - * - * - *
            -   * Optional. Suggestion types to return. If empty or unspecified, query
            -   * suggestions are returned. Only one suggestion type is supported at the
            -   * moment.
            -   * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.SuggestionType suggestion_types = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return A list containing the enum numeric values on the wire for suggestionTypes. - */ - @java.lang.Override - public java.util.List getSuggestionTypesValueList() { - return suggestionTypes_; - } + public static com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest + .SuggestionTypeSpec + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - /** - * - * - *
            -   * Optional. Suggestion types to return. If empty or unspecified, query
            -   * suggestions are returned. Only one suggestion type is supported at the
            -   * moment.
            -   * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.SuggestionType suggestion_types = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @param index The index of the value to return. - * @return The enum numeric value on the wire of suggestionTypes at the given index. - */ - @java.lang.Override - public int getSuggestionTypesValue(int index) { - return suggestionTypes_.getInt(index); - } + public static com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest + .SuggestionTypeSpec + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - private int suggestionTypesMemoizedSerializedSize; + public static com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest + .SuggestionTypeSpec + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - private byte memoizedIsInitialized = -1; + public static com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest + .SuggestionTypeSpec + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + public static com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest + .SuggestionTypeSpec + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - memoizedIsInitialized = 1; - return true; - } + public static com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest + .SuggestionTypeSpec + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - getSerializedSize(); - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(completionConfig_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, completionConfig_); + public static com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest + .SuggestionTypeSpec + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(query_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 2, query_); + + public static com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest + .SuggestionTypeSpec + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(queryModel_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 3, queryModel_); + + public static com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest + .SuggestionTypeSpec + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(userPseudoId_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 4, userPseudoId_); + + public static com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest + .SuggestionTypeSpec + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } - if (includeTailSuggestions_ != false) { - output.writeBool(5, includeTailSuggestions_); + + public static com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest + .SuggestionTypeSpec + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); } - if (((bitField0_ & 0x00000002) != 0)) { - output.writeMessage(6, getBoostSpec()); + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); } - if (getSuggestionTypesList().size() > 0) { - output.writeUInt32NoTag(58); - output.writeUInt32NoTag(suggestionTypesMemoizedSerializedSize); + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); } - for (int i = 0; i < suggestionTypes_.size(); i++) { - output.writeEnumNoTag(suggestionTypes_.getInt(i)); + + public static Builder newBuilder( + com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.SuggestionTypeSpec + prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } - if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(9, getUserInfo()); + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); } - 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(completionConfig_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, completionConfig_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(query_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(2, query_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(queryModel_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(3, queryModel_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(userPseudoId_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(4, userPseudoId_); - } - if (includeTailSuggestions_ != false) { - size += com.google.protobuf.CodedOutputStream.computeBoolSize(5, includeTailSuggestions_); - } - if (((bitField0_ & 0x00000002) != 0)) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getBoostSpec()); + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; } - { - int dataSize = 0; - for (int i = 0; i < suggestionTypes_.size(); i++) { - dataSize += - com.google.protobuf.CodedOutputStream.computeEnumSizeNoTag(suggestionTypes_.getInt(i)); - } - size += dataSize; - if (!getSuggestionTypesList().isEmpty()) { - size += 1; - size += com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(dataSize); + + /** + * + * + *
            +     * Specification of each suggestion type.
            +     * 
            + * + * Protobuf type {@code + * google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.SuggestionTypeSpec} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.SuggestionTypeSpec) + com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest + .SuggestionTypeSpecOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.CompletionServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_AdvancedCompleteQueryRequest_SuggestionTypeSpec_descriptor; } - suggestionTypesMemoizedSerializedSize = dataSize; - } - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(9, getUserInfo()); - } - 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.discoveryengine.v1beta.AdvancedCompleteQueryRequest)) { - return super.equals(obj); - } - com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest other = - (com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest) obj; + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.CompletionServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_AdvancedCompleteQueryRequest_SuggestionTypeSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest + .SuggestionTypeSpec.class, + com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest + .SuggestionTypeSpec.Builder.class); + } - if (!getCompletionConfig().equals(other.getCompletionConfig())) return false; - if (!getQuery().equals(other.getQuery())) return false; - if (!getQueryModel().equals(other.getQueryModel())) return false; - if (!getUserPseudoId().equals(other.getUserPseudoId())) return false; - if (hasUserInfo() != other.hasUserInfo()) return false; - if (hasUserInfo()) { - if (!getUserInfo().equals(other.getUserInfo())) return false; - } - if (getIncludeTailSuggestions() != other.getIncludeTailSuggestions()) return false; - if (hasBoostSpec() != other.hasBoostSpec()) return false; - if (hasBoostSpec()) { - if (!getBoostSpec().equals(other.getBoostSpec())) return false; - } - if (!suggestionTypes_.equals(other.suggestionTypes_)) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } + // Construct using + // com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.SuggestionTypeSpec.newBuilder() + private Builder() {} - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + COMPLETION_CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getCompletionConfig().hashCode(); - hash = (37 * hash) + QUERY_FIELD_NUMBER; - hash = (53 * hash) + getQuery().hashCode(); - hash = (37 * hash) + QUERY_MODEL_FIELD_NUMBER; - hash = (53 * hash) + getQueryModel().hashCode(); - hash = (37 * hash) + USER_PSEUDO_ID_FIELD_NUMBER; - hash = (53 * hash) + getUserPseudoId().hashCode(); - if (hasUserInfo()) { - hash = (37 * hash) + USER_INFO_FIELD_NUMBER; - hash = (53 * hash) + getUserInfo().hashCode(); - } - hash = (37 * hash) + INCLUDE_TAIL_SUGGESTIONS_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getIncludeTailSuggestions()); - if (hasBoostSpec()) { - hash = (37 * hash) + BOOST_SPEC_FIELD_NUMBER; - hash = (53 * hash) + getBoostSpec().hashCode(); - } - if (getSuggestionTypesCount() > 0) { - hash = (37 * hash) + SUGGESTION_TYPES_FIELD_NUMBER; - hash = (53 * hash) + suggestionTypes_.hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } - public static com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + suggestionType_ = 0; + maxSuggestions_ = 0; + return this; + } - public static com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1beta.CompletionServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_AdvancedCompleteQueryRequest_SuggestionTypeSpec_descriptor; + } - public static com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.SuggestionTypeSpec + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest + .SuggestionTypeSpec.getDefaultInstance(); + } - public static com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.SuggestionTypeSpec + build() { + com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.SuggestionTypeSpec + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } - public static com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest parseFrom( - byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.SuggestionTypeSpec + buildPartial() { + com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.SuggestionTypeSpec + result = + new com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest + .SuggestionTypeSpec(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } - public static com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } + private void buildPartial0( + com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.SuggestionTypeSpec + result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.suggestionType_ = suggestionType_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.maxSuggestions_ = maxSuggestions_; + } + } - public static com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest + .SuggestionTypeSpec) { + return mergeFrom( + (com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest + .SuggestionTypeSpec) + other); + } else { + super.mergeFrom(other); + return this; + } + } - public static com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.SuggestionTypeSpec + other) { + if (other + == com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest + .SuggestionTypeSpec.getDefaultInstance()) return this; + if (other.suggestionType_ != 0) { + setSuggestionTypeValue(other.getSuggestionTypeValue()); + } + if (other.getMaxSuggestions() != 0) { + setMaxSuggestions(other.getMaxSuggestions()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } - public static com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest - parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } + @java.lang.Override + public final boolean isInitialized() { + return true; + } - public static com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest - parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest 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(); - } + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + suggestionType_ = input.readEnum(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 16: + { + maxSuggestions_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } + private int bitField0_; - public static Builder newBuilder( - com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } + private int suggestionType_ = 0; - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + /** + * + * + *
            +       * Optional. Suggestion type.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.SuggestionType suggestion_type = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for suggestionType. + */ + @java.lang.Override + public int getSuggestionTypeValue() { + return suggestionType_; + } + + /** + * + * + *
            +       * Optional. Suggestion type.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.SuggestionType suggestion_type = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The enum numeric value on the wire for suggestionType to set. + * @return This builder for chaining. + */ + public Builder setSuggestionTypeValue(int value) { + suggestionType_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
            +       * Optional. Suggestion type.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.SuggestionType suggestion_type = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The suggestionType. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.SuggestionType + getSuggestionType() { + com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.SuggestionType result = + com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.SuggestionType + .forNumber(suggestionType_); + return result == null + ? com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.SuggestionType + .UNRECOGNIZED + : result; + } + + /** + * + * + *
            +       * Optional. Suggestion type.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.SuggestionType suggestion_type = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The suggestionType to set. + * @return This builder for chaining. + */ + public Builder setSuggestionType( + com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.SuggestionType + value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + suggestionType_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
            +       * Optional. Suggestion type.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.SuggestionType suggestion_type = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearSuggestionType() { + bitField0_ = (bitField0_ & ~0x00000001); + suggestionType_ = 0; + onChanged(); + return this; + } + + private int maxSuggestions_; + + /** + * + * + *
            +       * Optional. Maximum number of suggestions to return for each suggestion
            +       * type.
            +       * 
            + * + * int32 max_suggestions = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The maxSuggestions. + */ + @java.lang.Override + public int getMaxSuggestions() { + return maxSuggestions_; + } + + /** + * + * + *
            +       * Optional. Maximum number of suggestions to return for each suggestion
            +       * type.
            +       * 
            + * + * int32 max_suggestions = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The maxSuggestions to set. + * @return This builder for chaining. + */ + public Builder setMaxSuggestions(int value) { + + maxSuggestions_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
            +       * Optional. Maximum number of suggestions to return for each suggestion
            +       * type.
            +       * 
            + * + * int32 max_suggestions = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearMaxSuggestions() { + bitField0_ = (bitField0_ & ~0x00000002); + maxSuggestions_ = 0; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.SuggestionTypeSpec) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.SuggestionTypeSpec) + private static final com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest + .SuggestionTypeSpec + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest + .SuggestionTypeSpec(); + } + + public static com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest + .SuggestionTypeSpec + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SuggestionTypeSpec parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.SuggestionTypeSpec + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } } + private int bitField0_; + public static final int COMPLETION_CONFIG_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object completionConfig_ = ""; + + /** + * + * + *
            +   * Required. The completion_config of the parent dataStore or engine resource
            +   * name for which the completion is performed, such as
            +   * `projects/*/locations/global/collections/default_collection/dataStores/*/completionConfig`
            +   * `projects/*/locations/global/collections/default_collection/engines/*/completionConfig`.
            +   * 
            + * + * + * string completion_config = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The completionConfig. + */ @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; + public java.lang.String getCompletionConfig() { + java.lang.Object ref = completionConfig_; + 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(); + completionConfig_ = s; + return s; + } } /** * * *
            -   * Request message for
            -   * [CompletionService.AdvancedCompleteQuery][google.cloud.discoveryengine.v1beta.CompletionService.AdvancedCompleteQuery]
            -   * method.
            -   * .
            +   * Required. The completion_config of the parent dataStore or engine resource
            +   * name for which the completion is performed, such as
            +   * `projects/*/locations/global/collections/default_collection/dataStores/*/completionConfig`
            +   * `projects/*/locations/global/collections/default_collection/engines/*/completionConfig`.
                * 
            * - * Protobuf type {@code google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest} + * + * string completion_config = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for completionConfig. */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest) - com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.discoveryengine.v1beta.CompletionServiceProto - .internal_static_google_cloud_discoveryengine_v1beta_AdvancedCompleteQueryRequest_descriptor; + @java.lang.Override + public com.google.protobuf.ByteString getCompletionConfigBytes() { + java.lang.Object ref = completionConfig_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + completionConfig_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int QUERY_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object query_ = ""; + + /** + * + * + *
            +   * Required. The typeahead input used to fetch suggestions. Maximum length is
            +   * 128 characters.
            +   *
            +   * The query can not be empty for most of the suggestion types. If it is
            +   * empty, an `INVALID_ARGUMENT` error is returned. The exception is when the
            +   * suggestion_types contains only the type `RECENT_SEARCH`, the query can
            +   * be an empty string. The is called "zero prefix" feature, which returns
            +   * user's recently searched queries given the empty query.
            +   * 
            + * + * string query = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The query. + */ + @java.lang.Override + public java.lang.String getQuery() { + java.lang.Object ref = query_; + 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(); + query_ = s; + return s; + } + } + + /** + * + * + *
            +   * Required. The typeahead input used to fetch suggestions. Maximum length is
            +   * 128 characters.
            +   *
            +   * The query can not be empty for most of the suggestion types. If it is
            +   * empty, an `INVALID_ARGUMENT` error is returned. The exception is when the
            +   * suggestion_types contains only the type `RECENT_SEARCH`, the query can
            +   * be an empty string. The is called "zero prefix" feature, which returns
            +   * user's recently searched queries given the empty query.
            +   * 
            + * + * string query = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for query. + */ + @java.lang.Override + public com.google.protobuf.ByteString getQueryBytes() { + java.lang.Object ref = query_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + query_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int QUERY_MODEL_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object queryModel_ = ""; + + /** + * + * + *
            +   * Specifies the autocomplete query model, which only applies to the QUERY
            +   * SuggestionType. This overrides any model specified in the Configuration >
            +   * Autocomplete section of the Cloud console. Currently supported values:
            +   *
            +   * * `document` - Using suggestions generated from user-imported documents.
            +   * * `search-history` - Using suggestions generated from the past history of
            +   * [SearchService.Search][google.cloud.discoveryengine.v1beta.SearchService.Search]
            +   * API calls. Do not use it when there is no traffic for Search API.
            +   * * `user-event` - Using suggestions generated from user-imported search
            +   * events.
            +   * * `document-completable` - Using suggestions taken directly from
            +   * user-imported document fields marked as completable.
            +   *
            +   * Default values:
            +   *
            +   * * `document` is the default model for regular dataStores.
            +   * * `search-history` is the default model for site search dataStores.
            +   * 
            + * + * string query_model = 3; + * + * @return The queryModel. + */ + @java.lang.Override + public java.lang.String getQueryModel() { + java.lang.Object ref = queryModel_; + 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(); + queryModel_ = s; + return s; + } + } + + /** + * + * + *
            +   * Specifies the autocomplete query model, which only applies to the QUERY
            +   * SuggestionType. This overrides any model specified in the Configuration >
            +   * Autocomplete section of the Cloud console. Currently supported values:
            +   *
            +   * * `document` - Using suggestions generated from user-imported documents.
            +   * * `search-history` - Using suggestions generated from the past history of
            +   * [SearchService.Search][google.cloud.discoveryengine.v1beta.SearchService.Search]
            +   * API calls. Do not use it when there is no traffic for Search API.
            +   * * `user-event` - Using suggestions generated from user-imported search
            +   * events.
            +   * * `document-completable` - Using suggestions taken directly from
            +   * user-imported document fields marked as completable.
            +   *
            +   * Default values:
            +   *
            +   * * `document` is the default model for regular dataStores.
            +   * * `search-history` is the default model for site search dataStores.
            +   * 
            + * + * string query_model = 3; + * + * @return The bytes for queryModel. + */ + @java.lang.Override + public com.google.protobuf.ByteString getQueryModelBytes() { + java.lang.Object ref = queryModel_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + queryModel_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int USER_PSEUDO_ID_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object userPseudoId_ = ""; + + /** + * + * + *
            +   * Optional. A unique identifier for tracking visitors. For example, this
            +   * could be implemented with an HTTP cookie, which should be able to uniquely
            +   * identify a visitor on a single device. This unique identifier should not
            +   * change if the visitor logs in or out of the website.
            +   *
            +   * This field should NOT have a fixed value such as `unknown_visitor`.
            +   *
            +   * This should be the same identifier as
            +   * [UserEvent.user_pseudo_id][google.cloud.discoveryengine.v1beta.UserEvent.user_pseudo_id]
            +   * and
            +   * [SearchRequest.user_pseudo_id][google.cloud.discoveryengine.v1beta.SearchRequest.user_pseudo_id].
            +   *
            +   * The field must be a UTF-8 encoded string with a length limit of 128
            +   * 
            + * + * string user_pseudo_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The userPseudoId. + */ + @java.lang.Override + public java.lang.String getUserPseudoId() { + java.lang.Object ref = userPseudoId_; + 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(); + userPseudoId_ = s; + return s; + } + } + + /** + * + * + *
            +   * Optional. A unique identifier for tracking visitors. For example, this
            +   * could be implemented with an HTTP cookie, which should be able to uniquely
            +   * identify a visitor on a single device. This unique identifier should not
            +   * change if the visitor logs in or out of the website.
            +   *
            +   * This field should NOT have a fixed value such as `unknown_visitor`.
            +   *
            +   * This should be the same identifier as
            +   * [UserEvent.user_pseudo_id][google.cloud.discoveryengine.v1beta.UserEvent.user_pseudo_id]
            +   * and
            +   * [SearchRequest.user_pseudo_id][google.cloud.discoveryengine.v1beta.SearchRequest.user_pseudo_id].
            +   *
            +   * The field must be a UTF-8 encoded string with a length limit of 128
            +   * 
            + * + * string user_pseudo_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for userPseudoId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getUserPseudoIdBytes() { + java.lang.Object ref = userPseudoId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + userPseudoId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int USER_INFO_FIELD_NUMBER = 9; + private com.google.cloud.discoveryengine.v1beta.UserInfo userInfo_; + + /** + * + * + *
            +   * Optional. Information about the end user.
            +   *
            +   * This should be the same identifier information as
            +   * [UserEvent.user_info][google.cloud.discoveryengine.v1beta.UserEvent.user_info]
            +   * and
            +   * [SearchRequest.user_info][google.cloud.discoveryengine.v1beta.SearchRequest.user_info].
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.UserInfo user_info = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the userInfo field is set. + */ + @java.lang.Override + public boolean hasUserInfo() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
            +   * Optional. Information about the end user.
            +   *
            +   * This should be the same identifier information as
            +   * [UserEvent.user_info][google.cloud.discoveryengine.v1beta.UserEvent.user_info]
            +   * and
            +   * [SearchRequest.user_info][google.cloud.discoveryengine.v1beta.SearchRequest.user_info].
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.UserInfo user_info = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The userInfo. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.UserInfo getUserInfo() { + return userInfo_ == null + ? com.google.cloud.discoveryengine.v1beta.UserInfo.getDefaultInstance() + : userInfo_; + } + + /** + * + * + *
            +   * Optional. Information about the end user.
            +   *
            +   * This should be the same identifier information as
            +   * [UserEvent.user_info][google.cloud.discoveryengine.v1beta.UserEvent.user_info]
            +   * and
            +   * [SearchRequest.user_info][google.cloud.discoveryengine.v1beta.SearchRequest.user_info].
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.UserInfo user_info = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.UserInfoOrBuilder getUserInfoOrBuilder() { + return userInfo_ == null + ? com.google.cloud.discoveryengine.v1beta.UserInfo.getDefaultInstance() + : userInfo_; + } + + public static final int INCLUDE_TAIL_SUGGESTIONS_FIELD_NUMBER = 5; + private boolean includeTailSuggestions_ = false; + + /** + * + * + *
            +   * Indicates if tail suggestions should be returned if there are no
            +   * suggestions that match the full query. Even if set to true, if there are
            +   * suggestions that match the full query, those are returned and no
            +   * tail suggestions are returned.
            +   * 
            + * + * bool include_tail_suggestions = 5; + * + * @return The includeTailSuggestions. + */ + @java.lang.Override + public boolean getIncludeTailSuggestions() { + return includeTailSuggestions_; + } + + public static final int BOOST_SPEC_FIELD_NUMBER = 6; + private com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.BoostSpec boostSpec_; + + /** + * + * + *
            +   * Optional. Specification to boost suggestions matching the condition.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.BoostSpec boost_spec = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the boostSpec field is set. + */ + @java.lang.Override + public boolean hasBoostSpec() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
            +   * Optional. Specification to boost suggestions matching the condition.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.BoostSpec boost_spec = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The boostSpec. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.BoostSpec + getBoostSpec() { + return boostSpec_ == null + ? com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.BoostSpec + .getDefaultInstance() + : boostSpec_; + } + + /** + * + * + *
            +   * Optional. Specification to boost suggestions matching the condition.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.BoostSpec boost_spec = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.BoostSpecOrBuilder + getBoostSpecOrBuilder() { + return boostSpec_ == null + ? com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.BoostSpec + .getDefaultInstance() + : boostSpec_; + } + + public static final int SUGGESTION_TYPES_FIELD_NUMBER = 7; + + @SuppressWarnings("serial") + private com.google.protobuf.Internal.IntList suggestionTypes_ = emptyIntList(); + + private static final com.google.protobuf.Internal.IntListAdapter.IntConverter< + com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.SuggestionType> + suggestionTypes_converter_ = + new com.google.protobuf.Internal.IntListAdapter.IntConverter< + com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest + .SuggestionType>() { + public com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest + .SuggestionType + convert(int from) { + com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.SuggestionType + result = + com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest + .SuggestionType.forNumber(from); + return result == null + ? com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest + .SuggestionType.UNRECOGNIZED + : result; + } + }; + + /** + * + * + *
            +   * Optional. Suggestion types to return. If empty or unspecified, query
            +   * suggestions are returned. Only one suggestion type is supported at the
            +   * moment.
            +   * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.SuggestionType suggestion_types = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the suggestionTypes. + */ + @java.lang.Override + public java.util.List< + com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.SuggestionType> + getSuggestionTypesList() { + return new com.google.protobuf.Internal.IntListAdapter< + com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.SuggestionType>( + suggestionTypes_, suggestionTypes_converter_); + } + + /** + * + * + *
            +   * Optional. Suggestion types to return. If empty or unspecified, query
            +   * suggestions are returned. Only one suggestion type is supported at the
            +   * moment.
            +   * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.SuggestionType suggestion_types = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The count of suggestionTypes. + */ + @java.lang.Override + public int getSuggestionTypesCount() { + return suggestionTypes_.size(); + } + + /** + * + * + *
            +   * Optional. Suggestion types to return. If empty or unspecified, query
            +   * suggestions are returned. Only one suggestion type is supported at the
            +   * moment.
            +   * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.SuggestionType suggestion_types = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the element to return. + * @return The suggestionTypes at the given index. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.SuggestionType + getSuggestionTypes(int index) { + return suggestionTypes_converter_.convert(suggestionTypes_.getInt(index)); + } + + /** + * + * + *
            +   * Optional. Suggestion types to return. If empty or unspecified, query
            +   * suggestions are returned. Only one suggestion type is supported at the
            +   * moment.
            +   * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.SuggestionType suggestion_types = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the enum numeric values on the wire for suggestionTypes. + */ + @java.lang.Override + public java.util.List getSuggestionTypesValueList() { + return suggestionTypes_; + } + + /** + * + * + *
            +   * Optional. Suggestion types to return. If empty or unspecified, query
            +   * suggestions are returned. Only one suggestion type is supported at the
            +   * moment.
            +   * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.SuggestionType suggestion_types = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of suggestionTypes at the given index. + */ + @java.lang.Override + public int getSuggestionTypesValue(int index) { + return suggestionTypes_.getInt(index); + } + + private int suggestionTypesMemoizedSerializedSize; + + public static final int SUGGESTION_TYPE_SPECS_FIELD_NUMBER = 10; + + @SuppressWarnings("serial") + private java.util.List< + com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.SuggestionTypeSpec> + suggestionTypeSpecs_; + + /** + * + * + *
            +   * Optional. Specification of each suggestion type.
            +   * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.SuggestionTypeSpec suggestion_type_specs = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List< + com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.SuggestionTypeSpec> + getSuggestionTypeSpecsList() { + return suggestionTypeSpecs_; + } + + /** + * + * + *
            +   * Optional. Specification of each suggestion type.
            +   * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.SuggestionTypeSpec suggestion_type_specs = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List< + ? extends + com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest + .SuggestionTypeSpecOrBuilder> + getSuggestionTypeSpecsOrBuilderList() { + return suggestionTypeSpecs_; + } + + /** + * + * + *
            +   * Optional. Specification of each suggestion type.
            +   * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.SuggestionTypeSpec suggestion_type_specs = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public int getSuggestionTypeSpecsCount() { + return suggestionTypeSpecs_.size(); + } + + /** + * + * + *
            +   * Optional. Specification of each suggestion type.
            +   * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.SuggestionTypeSpec suggestion_type_specs = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.SuggestionTypeSpec + getSuggestionTypeSpecs(int index) { + return suggestionTypeSpecs_.get(index); + } + + /** + * + * + *
            +   * Optional. Specification of each suggestion type.
            +   * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.SuggestionTypeSpec suggestion_type_specs = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest + .SuggestionTypeSpecOrBuilder + getSuggestionTypeSpecsOrBuilder(int index) { + return suggestionTypeSpecs_.get(index); + } + + public static final int EXPERIMENT_IDS_FIELD_NUMBER = 14; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList experimentIds_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + /** + * + * + *
            +   * Optional. Experiment ids for this request.
            +   * 
            + * + * repeated string experiment_ids = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the experimentIds. + */ + public com.google.protobuf.ProtocolStringList getExperimentIdsList() { + return experimentIds_; + } + + /** + * + * + *
            +   * Optional. Experiment ids for this request.
            +   * 
            + * + * repeated string experiment_ids = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of experimentIds. + */ + public int getExperimentIdsCount() { + return experimentIds_.size(); + } + + /** + * + * + *
            +   * Optional. Experiment ids for this request.
            +   * 
            + * + * repeated string experiment_ids = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The experimentIds at the given index. + */ + public java.lang.String getExperimentIds(int index) { + return experimentIds_.get(index); + } + + /** + * + * + *
            +   * Optional. Experiment ids for this request.
            +   * 
            + * + * repeated string experiment_ids = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the experimentIds at the given index. + */ + public com.google.protobuf.ByteString getExperimentIdsBytes(int index) { + return experimentIds_.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 { + getSerializedSize(); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(completionConfig_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, completionConfig_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(query_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, query_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(queryModel_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, queryModel_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(userPseudoId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, userPseudoId_); + } + if (includeTailSuggestions_ != false) { + output.writeBool(5, includeTailSuggestions_); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(6, getBoostSpec()); + } + if (getSuggestionTypesList().size() > 0) { + output.writeUInt32NoTag(58); + output.writeUInt32NoTag(suggestionTypesMemoizedSerializedSize); + } + for (int i = 0; i < suggestionTypes_.size(); i++) { + output.writeEnumNoTag(suggestionTypes_.getInt(i)); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(9, getUserInfo()); + } + for (int i = 0; i < suggestionTypeSpecs_.size(); i++) { + output.writeMessage(10, suggestionTypeSpecs_.get(i)); + } + for (int i = 0; i < experimentIds_.size(); i++) { + com.google.protobuf.GeneratedMessage.writeString(output, 14, experimentIds_.getRaw(i)); + } + 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(completionConfig_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, completionConfig_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(query_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, query_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(queryModel_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, queryModel_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(userPseudoId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, userPseudoId_); + } + if (includeTailSuggestions_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(5, includeTailSuggestions_); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getBoostSpec()); + } + { + int dataSize = 0; + for (int i = 0; i < suggestionTypes_.size(); i++) { + dataSize += + com.google.protobuf.CodedOutputStream.computeEnumSizeNoTag(suggestionTypes_.getInt(i)); + } + size += dataSize; + if (!getSuggestionTypesList().isEmpty()) { + size += 1; + size += com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(dataSize); + } + suggestionTypesMemoizedSerializedSize = dataSize; + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(9, getUserInfo()); + } + for (int i = 0; i < suggestionTypeSpecs_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(10, suggestionTypeSpecs_.get(i)); + } + { + int dataSize = 0; + for (int i = 0; i < experimentIds_.size(); i++) { + dataSize += computeStringSizeNoTag(experimentIds_.getRaw(i)); + } + size += dataSize; + size += 1 * getExperimentIdsList().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.discoveryengine.v1beta.AdvancedCompleteQueryRequest)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest other = + (com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest) obj; + + if (!getCompletionConfig().equals(other.getCompletionConfig())) return false; + if (!getQuery().equals(other.getQuery())) return false; + if (!getQueryModel().equals(other.getQueryModel())) return false; + if (!getUserPseudoId().equals(other.getUserPseudoId())) return false; + if (hasUserInfo() != other.hasUserInfo()) return false; + if (hasUserInfo()) { + if (!getUserInfo().equals(other.getUserInfo())) return false; + } + if (getIncludeTailSuggestions() != other.getIncludeTailSuggestions()) return false; + if (hasBoostSpec() != other.hasBoostSpec()) return false; + if (hasBoostSpec()) { + if (!getBoostSpec().equals(other.getBoostSpec())) return false; + } + if (!suggestionTypes_.equals(other.suggestionTypes_)) return false; + if (!getSuggestionTypeSpecsList().equals(other.getSuggestionTypeSpecsList())) return false; + if (!getExperimentIdsList().equals(other.getExperimentIdsList())) 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) + COMPLETION_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getCompletionConfig().hashCode(); + hash = (37 * hash) + QUERY_FIELD_NUMBER; + hash = (53 * hash) + getQuery().hashCode(); + hash = (37 * hash) + QUERY_MODEL_FIELD_NUMBER; + hash = (53 * hash) + getQueryModel().hashCode(); + hash = (37 * hash) + USER_PSEUDO_ID_FIELD_NUMBER; + hash = (53 * hash) + getUserPseudoId().hashCode(); + if (hasUserInfo()) { + hash = (37 * hash) + USER_INFO_FIELD_NUMBER; + hash = (53 * hash) + getUserInfo().hashCode(); + } + hash = (37 * hash) + INCLUDE_TAIL_SUGGESTIONS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getIncludeTailSuggestions()); + if (hasBoostSpec()) { + hash = (37 * hash) + BOOST_SPEC_FIELD_NUMBER; + hash = (53 * hash) + getBoostSpec().hashCode(); + } + if (getSuggestionTypesCount() > 0) { + hash = (37 * hash) + SUGGESTION_TYPES_FIELD_NUMBER; + hash = (53 * hash) + suggestionTypes_.hashCode(); + } + if (getSuggestionTypeSpecsCount() > 0) { + hash = (37 * hash) + SUGGESTION_TYPE_SPECS_FIELD_NUMBER; + hash = (53 * hash) + getSuggestionTypeSpecsList().hashCode(); + } + if (getExperimentIdsCount() > 0) { + hash = (37 * hash) + EXPERIMENT_IDS_FIELD_NUMBER; + hash = (53 * hash) + getExperimentIdsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest 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.discoveryengine.v1beta.AdvancedCompleteQueryRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest 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.discoveryengine.v1beta.AdvancedCompleteQueryRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest 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.discoveryengine.v1beta.AdvancedCompleteQueryRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest + 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.discoveryengine.v1beta.AdvancedCompleteQueryRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest 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.discoveryengine.v1beta.AdvancedCompleteQueryRequest 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
            +   * [CompletionService.AdvancedCompleteQuery][google.cloud.discoveryengine.v1beta.CompletionService.AdvancedCompleteQuery]
            +   * method.
            +   * .
            +   * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest) + com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.CompletionServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_AdvancedCompleteQueryRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.CompletionServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_AdvancedCompleteQueryRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.class, + com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.Builder.class); + } + + // Construct using + // com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetUserInfoFieldBuilder(); + internalGetBoostSpecFieldBuilder(); + internalGetSuggestionTypeSpecsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + completionConfig_ = ""; + query_ = ""; + queryModel_ = ""; + userPseudoId_ = ""; + userInfo_ = null; + if (userInfoBuilder_ != null) { + userInfoBuilder_.dispose(); + userInfoBuilder_ = null; + } + includeTailSuggestions_ = false; + boostSpec_ = null; + if (boostSpecBuilder_ != null) { + boostSpecBuilder_.dispose(); + boostSpecBuilder_ = null; + } + suggestionTypes_ = emptyIntList(); + if (suggestionTypeSpecsBuilder_ == null) { + suggestionTypeSpecs_ = java.util.Collections.emptyList(); + } else { + suggestionTypeSpecs_ = null; + suggestionTypeSpecsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000100); + experimentIds_ = com.google.protobuf.LazyStringArrayList.emptyList(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1beta.CompletionServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_AdvancedCompleteQueryRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest build() { + com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest buildPartial() { + com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest result = + new com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest result) { + if (suggestionTypeSpecsBuilder_ == null) { + if (((bitField0_ & 0x00000100) != 0)) { + suggestionTypeSpecs_ = java.util.Collections.unmodifiableList(suggestionTypeSpecs_); + bitField0_ = (bitField0_ & ~0x00000100); + } + result.suggestionTypeSpecs_ = suggestionTypeSpecs_; + } else { + result.suggestionTypeSpecs_ = suggestionTypeSpecsBuilder_.build(); + } + } + + private void buildPartial0( + com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.completionConfig_ = completionConfig_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.query_ = query_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.queryModel_ = queryModel_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.userPseudoId_ = userPseudoId_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000010) != 0)) { + result.userInfo_ = userInfoBuilder_ == null ? userInfo_ : userInfoBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.includeTailSuggestions_ = includeTailSuggestions_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.boostSpec_ = boostSpecBuilder_ == null ? boostSpec_ : boostSpecBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + suggestionTypes_.makeImmutable(); + result.suggestionTypes_ = suggestionTypes_; + } + if (((from_bitField0_ & 0x00000200) != 0)) { + experimentIds_.makeImmutable(); + result.experimentIds_ = experimentIds_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest) { + return mergeFrom( + (com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest other) { + if (other + == com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest + .getDefaultInstance()) return this; + if (!other.getCompletionConfig().isEmpty()) { + completionConfig_ = other.completionConfig_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getQuery().isEmpty()) { + query_ = other.query_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getQueryModel().isEmpty()) { + queryModel_ = other.queryModel_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getUserPseudoId().isEmpty()) { + userPseudoId_ = other.userPseudoId_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (other.hasUserInfo()) { + mergeUserInfo(other.getUserInfo()); + } + if (other.getIncludeTailSuggestions() != false) { + setIncludeTailSuggestions(other.getIncludeTailSuggestions()); + } + if (other.hasBoostSpec()) { + mergeBoostSpec(other.getBoostSpec()); + } + if (!other.suggestionTypes_.isEmpty()) { + if (suggestionTypes_.isEmpty()) { + suggestionTypes_ = other.suggestionTypes_; + suggestionTypes_.makeImmutable(); + bitField0_ |= 0x00000080; + } else { + ensureSuggestionTypesIsMutable(); + suggestionTypes_.addAll(other.suggestionTypes_); + } + onChanged(); + } + if (suggestionTypeSpecsBuilder_ == null) { + if (!other.suggestionTypeSpecs_.isEmpty()) { + if (suggestionTypeSpecs_.isEmpty()) { + suggestionTypeSpecs_ = other.suggestionTypeSpecs_; + bitField0_ = (bitField0_ & ~0x00000100); + } else { + ensureSuggestionTypeSpecsIsMutable(); + suggestionTypeSpecs_.addAll(other.suggestionTypeSpecs_); + } + onChanged(); + } + } else { + if (!other.suggestionTypeSpecs_.isEmpty()) { + if (suggestionTypeSpecsBuilder_.isEmpty()) { + suggestionTypeSpecsBuilder_.dispose(); + suggestionTypeSpecsBuilder_ = null; + suggestionTypeSpecs_ = other.suggestionTypeSpecs_; + bitField0_ = (bitField0_ & ~0x00000100); + suggestionTypeSpecsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetSuggestionTypeSpecsFieldBuilder() + : null; + } else { + suggestionTypeSpecsBuilder_.addAllMessages(other.suggestionTypeSpecs_); + } + } + } + if (!other.experimentIds_.isEmpty()) { + if (experimentIds_.isEmpty()) { + experimentIds_ = other.experimentIds_; + bitField0_ |= 0x00000200; + } else { + ensureExperimentIdsIsMutable(); + experimentIds_.addAll(other.experimentIds_); + } + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + completionConfig_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + query_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + queryModel_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + userPseudoId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 40: + { + includeTailSuggestions_ = input.readBool(); + bitField0_ |= 0x00000020; + break; + } // case 40 + case 50: + { + input.readMessage( + internalGetBoostSpecFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000040; + break; + } // case 50 + case 56: + { + int tmpRaw = input.readEnum(); + ensureSuggestionTypesIsMutable(); + suggestionTypes_.addInt(tmpRaw); + break; + } // case 56 + case 58: + { + int length = input.readRawVarint32(); + int limit = input.pushLimit(length); + ensureSuggestionTypesIsMutable(); + while (input.getBytesUntilLimit() > 0) { + suggestionTypes_.addInt(input.readEnum()); + } + input.popLimit(limit); + break; + } // case 58 + case 74: + { + input.readMessage( + internalGetUserInfoFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 74 + case 82: + { + com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest + .SuggestionTypeSpec + m = + input.readMessage( + com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest + .SuggestionTypeSpec.parser(), + extensionRegistry); + if (suggestionTypeSpecsBuilder_ == null) { + ensureSuggestionTypeSpecsIsMutable(); + suggestionTypeSpecs_.add(m); + } else { + suggestionTypeSpecsBuilder_.addMessage(m); + } + break; + } // case 82 + case 114: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureExperimentIdsIsMutable(); + experimentIds_.add(s); + break; + } // case 114 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object completionConfig_ = ""; + + /** + * + * + *
            +     * Required. The completion_config of the parent dataStore or engine resource
            +     * name for which the completion is performed, such as
            +     * `projects/*/locations/global/collections/default_collection/dataStores/*/completionConfig`
            +     * `projects/*/locations/global/collections/default_collection/engines/*/completionConfig`.
            +     * 
            + * + * + * string completion_config = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The completionConfig. + */ + public java.lang.String getCompletionConfig() { + java.lang.Object ref = completionConfig_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + completionConfig_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
            +     * Required. The completion_config of the parent dataStore or engine resource
            +     * name for which the completion is performed, such as
            +     * `projects/*/locations/global/collections/default_collection/dataStores/*/completionConfig`
            +     * `projects/*/locations/global/collections/default_collection/engines/*/completionConfig`.
            +     * 
            + * + * + * string completion_config = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for completionConfig. + */ + public com.google.protobuf.ByteString getCompletionConfigBytes() { + java.lang.Object ref = completionConfig_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + completionConfig_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
            +     * Required. The completion_config of the parent dataStore or engine resource
            +     * name for which the completion is performed, such as
            +     * `projects/*/locations/global/collections/default_collection/dataStores/*/completionConfig`
            +     * `projects/*/locations/global/collections/default_collection/engines/*/completionConfig`.
            +     * 
            + * + * + * string completion_config = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The completionConfig to set. + * @return This builder for chaining. + */ + public Builder setCompletionConfig(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + completionConfig_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Required. The completion_config of the parent dataStore or engine resource
            +     * name for which the completion is performed, such as
            +     * `projects/*/locations/global/collections/default_collection/dataStores/*/completionConfig`
            +     * `projects/*/locations/global/collections/default_collection/engines/*/completionConfig`.
            +     * 
            + * + * + * string completion_config = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearCompletionConfig() { + completionConfig_ = getDefaultInstance().getCompletionConfig(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
            +     * Required. The completion_config of the parent dataStore or engine resource
            +     * name for which the completion is performed, such as
            +     * `projects/*/locations/global/collections/default_collection/dataStores/*/completionConfig`
            +     * `projects/*/locations/global/collections/default_collection/engines/*/completionConfig`.
            +     * 
            + * + * + * string completion_config = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for completionConfig to set. + * @return This builder for chaining. + */ + public Builder setCompletionConfigBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + completionConfig_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object query_ = ""; + + /** + * + * + *
            +     * Required. The typeahead input used to fetch suggestions. Maximum length is
            +     * 128 characters.
            +     *
            +     * The query can not be empty for most of the suggestion types. If it is
            +     * empty, an `INVALID_ARGUMENT` error is returned. The exception is when the
            +     * suggestion_types contains only the type `RECENT_SEARCH`, the query can
            +     * be an empty string. The is called "zero prefix" feature, which returns
            +     * user's recently searched queries given the empty query.
            +     * 
            + * + * string query = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The query. + */ + public java.lang.String getQuery() { + java.lang.Object ref = query_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + query_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
            +     * Required. The typeahead input used to fetch suggestions. Maximum length is
            +     * 128 characters.
            +     *
            +     * The query can not be empty for most of the suggestion types. If it is
            +     * empty, an `INVALID_ARGUMENT` error is returned. The exception is when the
            +     * suggestion_types contains only the type `RECENT_SEARCH`, the query can
            +     * be an empty string. The is called "zero prefix" feature, which returns
            +     * user's recently searched queries given the empty query.
            +     * 
            + * + * string query = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for query. + */ + public com.google.protobuf.ByteString getQueryBytes() { + java.lang.Object ref = query_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + query_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } } - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.discoveryengine.v1beta.CompletionServiceProto - .internal_static_google_cloud_discoveryengine_v1beta_AdvancedCompleteQueryRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.class, - com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.Builder.class); + /** + * + * + *
            +     * Required. The typeahead input used to fetch suggestions. Maximum length is
            +     * 128 characters.
            +     *
            +     * The query can not be empty for most of the suggestion types. If it is
            +     * empty, an `INVALID_ARGUMENT` error is returned. The exception is when the
            +     * suggestion_types contains only the type `RECENT_SEARCH`, the query can
            +     * be an empty string. The is called "zero prefix" feature, which returns
            +     * user's recently searched queries given the empty query.
            +     * 
            + * + * string query = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The query to set. + * @return This builder for chaining. + */ + public Builder setQuery(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + query_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; } - // Construct using - // com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); + /** + * + * + *
            +     * Required. The typeahead input used to fetch suggestions. Maximum length is
            +     * 128 characters.
            +     *
            +     * The query can not be empty for most of the suggestion types. If it is
            +     * empty, an `INVALID_ARGUMENT` error is returned. The exception is when the
            +     * suggestion_types contains only the type `RECENT_SEARCH`, the query can
            +     * be an empty string. The is called "zero prefix" feature, which returns
            +     * user's recently searched queries given the empty query.
            +     * 
            + * + * string query = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearQuery() { + query_ = getDefaultInstance().getQuery(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; } - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); + /** + * + * + *
            +     * Required. The typeahead input used to fetch suggestions. Maximum length is
            +     * 128 characters.
            +     *
            +     * The query can not be empty for most of the suggestion types. If it is
            +     * empty, an `INVALID_ARGUMENT` error is returned. The exception is when the
            +     * suggestion_types contains only the type `RECENT_SEARCH`, the query can
            +     * be an empty string. The is called "zero prefix" feature, which returns
            +     * user's recently searched queries given the empty query.
            +     * 
            + * + * string query = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for query to set. + * @return This builder for chaining. + */ + public Builder setQueryBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + query_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - internalGetUserInfoFieldBuilder(); - internalGetBoostSpecFieldBuilder(); + private java.lang.Object queryModel_ = ""; + + /** + * + * + *
            +     * Specifies the autocomplete query model, which only applies to the QUERY
            +     * SuggestionType. This overrides any model specified in the Configuration >
            +     * Autocomplete section of the Cloud console. Currently supported values:
            +     *
            +     * * `document` - Using suggestions generated from user-imported documents.
            +     * * `search-history` - Using suggestions generated from the past history of
            +     * [SearchService.Search][google.cloud.discoveryengine.v1beta.SearchService.Search]
            +     * API calls. Do not use it when there is no traffic for Search API.
            +     * * `user-event` - Using suggestions generated from user-imported search
            +     * events.
            +     * * `document-completable` - Using suggestions taken directly from
            +     * user-imported document fields marked as completable.
            +     *
            +     * Default values:
            +     *
            +     * * `document` is the default model for regular dataStores.
            +     * * `search-history` is the default model for site search dataStores.
            +     * 
            + * + * string query_model = 3; + * + * @return The queryModel. + */ + public java.lang.String getQueryModel() { + java.lang.Object ref = queryModel_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + queryModel_ = s; + return s; + } else { + return (java.lang.String) ref; } } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - completionConfig_ = ""; - query_ = ""; - queryModel_ = ""; - userPseudoId_ = ""; - userInfo_ = null; - if (userInfoBuilder_ != null) { - userInfoBuilder_.dispose(); - userInfoBuilder_ = null; + /** + * + * + *
            +     * Specifies the autocomplete query model, which only applies to the QUERY
            +     * SuggestionType. This overrides any model specified in the Configuration >
            +     * Autocomplete section of the Cloud console. Currently supported values:
            +     *
            +     * * `document` - Using suggestions generated from user-imported documents.
            +     * * `search-history` - Using suggestions generated from the past history of
            +     * [SearchService.Search][google.cloud.discoveryengine.v1beta.SearchService.Search]
            +     * API calls. Do not use it when there is no traffic for Search API.
            +     * * `user-event` - Using suggestions generated from user-imported search
            +     * events.
            +     * * `document-completable` - Using suggestions taken directly from
            +     * user-imported document fields marked as completable.
            +     *
            +     * Default values:
            +     *
            +     * * `document` is the default model for regular dataStores.
            +     * * `search-history` is the default model for site search dataStores.
            +     * 
            + * + * string query_model = 3; + * + * @return The bytes for queryModel. + */ + public com.google.protobuf.ByteString getQueryModelBytes() { + java.lang.Object ref = queryModel_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + queryModel_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; } - includeTailSuggestions_ = false; - boostSpec_ = null; - if (boostSpecBuilder_ != null) { - boostSpecBuilder_.dispose(); - boostSpecBuilder_ = null; + } + + /** + * + * + *
            +     * Specifies the autocomplete query model, which only applies to the QUERY
            +     * SuggestionType. This overrides any model specified in the Configuration >
            +     * Autocomplete section of the Cloud console. Currently supported values:
            +     *
            +     * * `document` - Using suggestions generated from user-imported documents.
            +     * * `search-history` - Using suggestions generated from the past history of
            +     * [SearchService.Search][google.cloud.discoveryengine.v1beta.SearchService.Search]
            +     * API calls. Do not use it when there is no traffic for Search API.
            +     * * `user-event` - Using suggestions generated from user-imported search
            +     * events.
            +     * * `document-completable` - Using suggestions taken directly from
            +     * user-imported document fields marked as completable.
            +     *
            +     * Default values:
            +     *
            +     * * `document` is the default model for regular dataStores.
            +     * * `search-history` is the default model for site search dataStores.
            +     * 
            + * + * string query_model = 3; + * + * @param value The queryModel to set. + * @return This builder for chaining. + */ + public Builder setQueryModel(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); } - suggestionTypes_ = emptyIntList(); + queryModel_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Specifies the autocomplete query model, which only applies to the QUERY
            +     * SuggestionType. This overrides any model specified in the Configuration >
            +     * Autocomplete section of the Cloud console. Currently supported values:
            +     *
            +     * * `document` - Using suggestions generated from user-imported documents.
            +     * * `search-history` - Using suggestions generated from the past history of
            +     * [SearchService.Search][google.cloud.discoveryengine.v1beta.SearchService.Search]
            +     * API calls. Do not use it when there is no traffic for Search API.
            +     * * `user-event` - Using suggestions generated from user-imported search
            +     * events.
            +     * * `document-completable` - Using suggestions taken directly from
            +     * user-imported document fields marked as completable.
            +     *
            +     * Default values:
            +     *
            +     * * `document` is the default model for regular dataStores.
            +     * * `search-history` is the default model for site search dataStores.
            +     * 
            + * + * string query_model = 3; + * + * @return This builder for chaining. + */ + public Builder clearQueryModel() { + queryModel_ = getDefaultInstance().getQueryModel(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); return this; } - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.discoveryengine.v1beta.CompletionServiceProto - .internal_static_google_cloud_discoveryengine_v1beta_AdvancedCompleteQueryRequest_descriptor; + /** + * + * + *
            +     * Specifies the autocomplete query model, which only applies to the QUERY
            +     * SuggestionType. This overrides any model specified in the Configuration >
            +     * Autocomplete section of the Cloud console. Currently supported values:
            +     *
            +     * * `document` - Using suggestions generated from user-imported documents.
            +     * * `search-history` - Using suggestions generated from the past history of
            +     * [SearchService.Search][google.cloud.discoveryengine.v1beta.SearchService.Search]
            +     * API calls. Do not use it when there is no traffic for Search API.
            +     * * `user-event` - Using suggestions generated from user-imported search
            +     * events.
            +     * * `document-completable` - Using suggestions taken directly from
            +     * user-imported document fields marked as completable.
            +     *
            +     * Default values:
            +     *
            +     * * `document` is the default model for regular dataStores.
            +     * * `search-history` is the default model for site search dataStores.
            +     * 
            + * + * string query_model = 3; + * + * @param value The bytes for queryModel to set. + * @return This builder for chaining. + */ + public Builder setQueryModelBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + queryModel_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; } - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest - getDefaultInstanceForType() { - return com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest - .getDefaultInstance(); - } + private java.lang.Object userPseudoId_ = ""; - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest build() { - com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); + /** + * + * + *
            +     * Optional. A unique identifier for tracking visitors. For example, this
            +     * could be implemented with an HTTP cookie, which should be able to uniquely
            +     * identify a visitor on a single device. This unique identifier should not
            +     * change if the visitor logs in or out of the website.
            +     *
            +     * This field should NOT have a fixed value such as `unknown_visitor`.
            +     *
            +     * This should be the same identifier as
            +     * [UserEvent.user_pseudo_id][google.cloud.discoveryengine.v1beta.UserEvent.user_pseudo_id]
            +     * and
            +     * [SearchRequest.user_pseudo_id][google.cloud.discoveryengine.v1beta.SearchRequest.user_pseudo_id].
            +     *
            +     * The field must be a UTF-8 encoded string with a length limit of 128
            +     * 
            + * + * string user_pseudo_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The userPseudoId. + */ + public java.lang.String getUserPseudoId() { + java.lang.Object ref = userPseudoId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + userPseudoId_ = s; + return s; + } else { + return (java.lang.String) ref; } - return result; } - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest buildPartial() { - com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest result = - new com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest(this); - if (bitField0_ != 0) { - buildPartial0(result); + /** + * + * + *
            +     * Optional. A unique identifier for tracking visitors. For example, this
            +     * could be implemented with an HTTP cookie, which should be able to uniquely
            +     * identify a visitor on a single device. This unique identifier should not
            +     * change if the visitor logs in or out of the website.
            +     *
            +     * This field should NOT have a fixed value such as `unknown_visitor`.
            +     *
            +     * This should be the same identifier as
            +     * [UserEvent.user_pseudo_id][google.cloud.discoveryengine.v1beta.UserEvent.user_pseudo_id]
            +     * and
            +     * [SearchRequest.user_pseudo_id][google.cloud.discoveryengine.v1beta.SearchRequest.user_pseudo_id].
            +     *
            +     * The field must be a UTF-8 encoded string with a length limit of 128
            +     * 
            + * + * string user_pseudo_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for userPseudoId. + */ + public com.google.protobuf.ByteString getUserPseudoIdBytes() { + java.lang.Object ref = userPseudoId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + userPseudoId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; } - onBuilt(); - return result; } - private void buildPartial0( - com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.completionConfig_ = completionConfig_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.query_ = query_; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.queryModel_ = queryModel_; - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.userPseudoId_ = userPseudoId_; - } - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000010) != 0)) { - result.userInfo_ = userInfoBuilder_ == null ? userInfo_ : userInfoBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - if (((from_bitField0_ & 0x00000020) != 0)) { - result.includeTailSuggestions_ = includeTailSuggestions_; - } - if (((from_bitField0_ & 0x00000040) != 0)) { - result.boostSpec_ = boostSpecBuilder_ == null ? boostSpec_ : boostSpecBuilder_.build(); - to_bitField0_ |= 0x00000002; - } - if (((from_bitField0_ & 0x00000080) != 0)) { - suggestionTypes_.makeImmutable(); - result.suggestionTypes_ = suggestionTypes_; + /** + * + * + *
            +     * Optional. A unique identifier for tracking visitors. For example, this
            +     * could be implemented with an HTTP cookie, which should be able to uniquely
            +     * identify a visitor on a single device. This unique identifier should not
            +     * change if the visitor logs in or out of the website.
            +     *
            +     * This field should NOT have a fixed value such as `unknown_visitor`.
            +     *
            +     * This should be the same identifier as
            +     * [UserEvent.user_pseudo_id][google.cloud.discoveryengine.v1beta.UserEvent.user_pseudo_id]
            +     * and
            +     * [SearchRequest.user_pseudo_id][google.cloud.discoveryengine.v1beta.SearchRequest.user_pseudo_id].
            +     *
            +     * The field must be a UTF-8 encoded string with a length limit of 128
            +     * 
            + * + * string user_pseudo_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The userPseudoId to set. + * @return This builder for chaining. + */ + public Builder setUserPseudoId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); } - result.bitField0_ |= to_bitField0_; + userPseudoId_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest) { - return mergeFrom( - (com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest) other); - } else { - super.mergeFrom(other); - return this; - } + /** + * + * + *
            +     * Optional. A unique identifier for tracking visitors. For example, this
            +     * could be implemented with an HTTP cookie, which should be able to uniquely
            +     * identify a visitor on a single device. This unique identifier should not
            +     * change if the visitor logs in or out of the website.
            +     *
            +     * This field should NOT have a fixed value such as `unknown_visitor`.
            +     *
            +     * This should be the same identifier as
            +     * [UserEvent.user_pseudo_id][google.cloud.discoveryengine.v1beta.UserEvent.user_pseudo_id]
            +     * and
            +     * [SearchRequest.user_pseudo_id][google.cloud.discoveryengine.v1beta.SearchRequest.user_pseudo_id].
            +     *
            +     * The field must be a UTF-8 encoded string with a length limit of 128
            +     * 
            + * + * string user_pseudo_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearUserPseudoId() { + userPseudoId_ = getDefaultInstance().getUserPseudoId(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; } - public Builder mergeFrom( - com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest other) { - if (other - == com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest - .getDefaultInstance()) return this; - if (!other.getCompletionConfig().isEmpty()) { - completionConfig_ = other.completionConfig_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (!other.getQuery().isEmpty()) { - query_ = other.query_; - bitField0_ |= 0x00000002; - onChanged(); - } - if (!other.getQueryModel().isEmpty()) { - queryModel_ = other.queryModel_; - bitField0_ |= 0x00000004; - onChanged(); - } - if (!other.getUserPseudoId().isEmpty()) { - userPseudoId_ = other.userPseudoId_; - bitField0_ |= 0x00000008; - onChanged(); - } - if (other.hasUserInfo()) { - mergeUserInfo(other.getUserInfo()); - } - if (other.getIncludeTailSuggestions() != false) { - setIncludeTailSuggestions(other.getIncludeTailSuggestions()); - } - if (other.hasBoostSpec()) { - mergeBoostSpec(other.getBoostSpec()); - } - if (!other.suggestionTypes_.isEmpty()) { - if (suggestionTypes_.isEmpty()) { - suggestionTypes_ = other.suggestionTypes_; - suggestionTypes_.makeImmutable(); - bitField0_ |= 0x00000080; - } else { - ensureSuggestionTypesIsMutable(); - suggestionTypes_.addAll(other.suggestionTypes_); - } - onChanged(); + /** + * + * + *
            +     * Optional. A unique identifier for tracking visitors. For example, this
            +     * could be implemented with an HTTP cookie, which should be able to uniquely
            +     * identify a visitor on a single device. This unique identifier should not
            +     * change if the visitor logs in or out of the website.
            +     *
            +     * This field should NOT have a fixed value such as `unknown_visitor`.
            +     *
            +     * This should be the same identifier as
            +     * [UserEvent.user_pseudo_id][google.cloud.discoveryengine.v1beta.UserEvent.user_pseudo_id]
            +     * and
            +     * [SearchRequest.user_pseudo_id][google.cloud.discoveryengine.v1beta.SearchRequest.user_pseudo_id].
            +     *
            +     * The field must be a UTF-8 encoded string with a length limit of 128
            +     * 
            + * + * string user_pseudo_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for userPseudoId to set. + * @return This builder for chaining. + */ + public Builder setUserPseudoIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); } - this.mergeUnknownFields(other.getUnknownFields()); + checkByteStringIsUtf8(value); + userPseudoId_ = value; + bitField0_ |= 0x00000008; onChanged(); return this; } - @java.lang.Override - public final boolean isInitialized() { - return true; + private com.google.cloud.discoveryengine.v1beta.UserInfo userInfo_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.UserInfo, + com.google.cloud.discoveryengine.v1beta.UserInfo.Builder, + com.google.cloud.discoveryengine.v1beta.UserInfoOrBuilder> + userInfoBuilder_; + + /** + * + * + *
            +     * Optional. Information about the end user.
            +     *
            +     * This should be the same identifier information as
            +     * [UserEvent.user_info][google.cloud.discoveryengine.v1beta.UserEvent.user_info]
            +     * and
            +     * [SearchRequest.user_info][google.cloud.discoveryengine.v1beta.SearchRequest.user_info].
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.UserInfo user_info = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the userInfo field is set. + */ + public boolean hasUserInfo() { + return ((bitField0_ & 0x00000010) != 0); } - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); + /** + * + * + *
            +     * Optional. Information about the end user.
            +     *
            +     * This should be the same identifier information as
            +     * [UserEvent.user_info][google.cloud.discoveryengine.v1beta.UserEvent.user_info]
            +     * and
            +     * [SearchRequest.user_info][google.cloud.discoveryengine.v1beta.SearchRequest.user_info].
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.UserInfo user_info = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The userInfo. + */ + public com.google.cloud.discoveryengine.v1beta.UserInfo getUserInfo() { + if (userInfoBuilder_ == null) { + return userInfo_ == null + ? com.google.cloud.discoveryengine.v1beta.UserInfo.getDefaultInstance() + : userInfo_; + } else { + return userInfoBuilder_.getMessage(); } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - completionConfig_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: - { - query_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 26: - { - queryModel_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - break; - } // case 26 - case 34: - { - userPseudoId_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - break; - } // case 34 - case 40: - { - includeTailSuggestions_ = input.readBool(); - bitField0_ |= 0x00000020; - break; - } // case 40 - case 50: - { - input.readMessage( - internalGetBoostSpecFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000040; - break; - } // case 50 - case 56: - { - int tmpRaw = input.readEnum(); - ensureSuggestionTypesIsMutable(); - suggestionTypes_.addInt(tmpRaw); - break; - } // case 56 - case 58: - { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - ensureSuggestionTypesIsMutable(); - while (input.getBytesUntilLimit() > 0) { - suggestionTypes_.addInt(input.readEnum()); - } - input.popLimit(limit); - break; - } // case 58 - case 74: - { - input.readMessage( - internalGetUserInfoFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000010; - break; - } // case 74 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; } - private int bitField0_; - - private java.lang.Object completionConfig_ = ""; - /** * * *
            -     * Required. The completion_config of the parent dataStore or engine resource
            -     * name for which the completion is performed, such as
            -     * `projects/*/locations/global/collections/default_collection/dataStores/*/completionConfig`
            -     * `projects/*/locations/global/collections/default_collection/engines/*/completionConfig`.
            +     * Optional. Information about the end user.
            +     *
            +     * This should be the same identifier information as
            +     * [UserEvent.user_info][google.cloud.discoveryengine.v1beta.UserEvent.user_info]
            +     * and
            +     * [SearchRequest.user_info][google.cloud.discoveryengine.v1beta.SearchRequest.user_info].
                  * 
            * * - * string completion_config = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * .google.cloud.discoveryengine.v1beta.UserInfo user_info = 9 [(.google.api.field_behavior) = OPTIONAL]; * - * - * @return The completionConfig. */ - public java.lang.String getCompletionConfig() { - java.lang.Object ref = completionConfig_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - completionConfig_ = s; - return s; + public Builder setUserInfo(com.google.cloud.discoveryengine.v1beta.UserInfo value) { + if (userInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + userInfo_ = value; } else { - return (java.lang.String) ref; + userInfoBuilder_.setMessage(value); } + bitField0_ |= 0x00000010; + onChanged(); + return this; } /** * * *
            -     * Required. The completion_config of the parent dataStore or engine resource
            -     * name for which the completion is performed, such as
            -     * `projects/*/locations/global/collections/default_collection/dataStores/*/completionConfig`
            -     * `projects/*/locations/global/collections/default_collection/engines/*/completionConfig`.
            +     * Optional. Information about the end user.
            +     *
            +     * This should be the same identifier information as
            +     * [UserEvent.user_info][google.cloud.discoveryengine.v1beta.UserEvent.user_info]
            +     * and
            +     * [SearchRequest.user_info][google.cloud.discoveryengine.v1beta.SearchRequest.user_info].
                  * 
            * * - * string completion_config = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * .google.cloud.discoveryengine.v1beta.UserInfo user_info = 9 [(.google.api.field_behavior) = OPTIONAL]; * + */ + public Builder setUserInfo( + com.google.cloud.discoveryengine.v1beta.UserInfo.Builder builderForValue) { + if (userInfoBuilder_ == null) { + userInfo_ = builderForValue.build(); + } else { + userInfoBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** * - * @return The bytes for completionConfig. + * + *
            +     * Optional. Information about the end user.
            +     *
            +     * This should be the same identifier information as
            +     * [UserEvent.user_info][google.cloud.discoveryengine.v1beta.UserEvent.user_info]
            +     * and
            +     * [SearchRequest.user_info][google.cloud.discoveryengine.v1beta.SearchRequest.user_info].
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.UserInfo user_info = 9 [(.google.api.field_behavior) = OPTIONAL]; + * */ - public com.google.protobuf.ByteString getCompletionConfigBytes() { - java.lang.Object ref = completionConfig_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - completionConfig_ = b; - return b; + public Builder mergeUserInfo(com.google.cloud.discoveryengine.v1beta.UserInfo value) { + if (userInfoBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) + && userInfo_ != null + && userInfo_ != com.google.cloud.discoveryengine.v1beta.UserInfo.getDefaultInstance()) { + getUserInfoBuilder().mergeFrom(value); + } else { + userInfo_ = value; + } } else { - return (com.google.protobuf.ByteString) ref; + userInfoBuilder_.mergeFrom(value); } + if (userInfo_ != null) { + bitField0_ |= 0x00000010; + onChanged(); + } + return this; } /** * * *
            -     * Required. The completion_config of the parent dataStore or engine resource
            -     * name for which the completion is performed, such as
            -     * `projects/*/locations/global/collections/default_collection/dataStores/*/completionConfig`
            -     * `projects/*/locations/global/collections/default_collection/engines/*/completionConfig`.
            +     * Optional. Information about the end user.
            +     *
            +     * This should be the same identifier information as
            +     * [UserEvent.user_info][google.cloud.discoveryengine.v1beta.UserEvent.user_info]
            +     * and
            +     * [SearchRequest.user_info][google.cloud.discoveryengine.v1beta.SearchRequest.user_info].
                  * 
            * * - * string completion_config = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * .google.cloud.discoveryengine.v1beta.UserInfo user_info = 9 [(.google.api.field_behavior) = OPTIONAL]; * - * - * @param value The completionConfig to set. - * @return This builder for chaining. */ - public Builder setCompletionConfig(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); + public Builder clearUserInfo() { + bitField0_ = (bitField0_ & ~0x00000010); + userInfo_ = null; + if (userInfoBuilder_ != null) { + userInfoBuilder_.dispose(); + userInfoBuilder_ = null; } - completionConfig_ = value; - bitField0_ |= 0x00000001; onChanged(); return this; } @@ -3745,140 +5549,123 @@ public Builder setCompletionConfig(java.lang.String value) { * * *
            -     * Required. The completion_config of the parent dataStore or engine resource
            -     * name for which the completion is performed, such as
            -     * `projects/*/locations/global/collections/default_collection/dataStores/*/completionConfig`
            -     * `projects/*/locations/global/collections/default_collection/engines/*/completionConfig`.
            +     * Optional. Information about the end user.
            +     *
            +     * This should be the same identifier information as
            +     * [UserEvent.user_info][google.cloud.discoveryengine.v1beta.UserEvent.user_info]
            +     * and
            +     * [SearchRequest.user_info][google.cloud.discoveryengine.v1beta.SearchRequest.user_info].
                  * 
            * * - * string completion_config = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * .google.cloud.discoveryengine.v1beta.UserInfo user_info = 9 [(.google.api.field_behavior) = OPTIONAL]; * - * - * @return This builder for chaining. */ - public Builder clearCompletionConfig() { - completionConfig_ = getDefaultInstance().getCompletionConfig(); - bitField0_ = (bitField0_ & ~0x00000001); + public com.google.cloud.discoveryengine.v1beta.UserInfo.Builder getUserInfoBuilder() { + bitField0_ |= 0x00000010; onChanged(); - return this; + return internalGetUserInfoFieldBuilder().getBuilder(); } /** * * *
            -     * Required. The completion_config of the parent dataStore or engine resource
            -     * name for which the completion is performed, such as
            -     * `projects/*/locations/global/collections/default_collection/dataStores/*/completionConfig`
            -     * `projects/*/locations/global/collections/default_collection/engines/*/completionConfig`.
            +     * Optional. Information about the end user.
            +     *
            +     * This should be the same identifier information as
            +     * [UserEvent.user_info][google.cloud.discoveryengine.v1beta.UserEvent.user_info]
            +     * and
            +     * [SearchRequest.user_info][google.cloud.discoveryengine.v1beta.SearchRequest.user_info].
                  * 
            * * - * string completion_config = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * .google.cloud.discoveryengine.v1beta.UserInfo user_info = 9 [(.google.api.field_behavior) = OPTIONAL]; * - * - * @param value The bytes for completionConfig to set. - * @return This builder for chaining. */ - public Builder setCompletionConfigBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); + public com.google.cloud.discoveryengine.v1beta.UserInfoOrBuilder getUserInfoOrBuilder() { + if (userInfoBuilder_ != null) { + return userInfoBuilder_.getMessageOrBuilder(); + } else { + return userInfo_ == null + ? com.google.cloud.discoveryengine.v1beta.UserInfo.getDefaultInstance() + : userInfo_; } - checkByteStringIsUtf8(value); - completionConfig_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; } - private java.lang.Object query_ = ""; - /** * * *
            -     * Required. The typeahead input used to fetch suggestions. Maximum length is
            -     * 128 characters.
            +     * Optional. Information about the end user.
                  *
            -     * The query can not be empty for most of the suggestion types. If it is
            -     * empty, an `INVALID_ARGUMENT` error is returned. The exception is when the
            -     * suggestion_types contains only the type `RECENT_SEARCH`, the query can
            -     * be an empty string. The is called "zero prefix" feature, which returns
            -     * user's recently searched queries given the empty query.
            +     * This should be the same identifier information as
            +     * [UserEvent.user_info][google.cloud.discoveryengine.v1beta.UserEvent.user_info]
            +     * and
            +     * [SearchRequest.user_info][google.cloud.discoveryengine.v1beta.SearchRequest.user_info].
                  * 
            * - * string query = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The query. + * + * .google.cloud.discoveryengine.v1beta.UserInfo user_info = 9 [(.google.api.field_behavior) = OPTIONAL]; + * */ - public java.lang.String getQuery() { - java.lang.Object ref = query_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - query_ = s; - return s; - } else { - return (java.lang.String) ref; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.UserInfo, + com.google.cloud.discoveryengine.v1beta.UserInfo.Builder, + com.google.cloud.discoveryengine.v1beta.UserInfoOrBuilder> + internalGetUserInfoFieldBuilder() { + if (userInfoBuilder_ == null) { + userInfoBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.UserInfo, + com.google.cloud.discoveryengine.v1beta.UserInfo.Builder, + com.google.cloud.discoveryengine.v1beta.UserInfoOrBuilder>( + getUserInfo(), getParentForChildren(), isClean()); + userInfo_ = null; } + return userInfoBuilder_; } + private boolean includeTailSuggestions_; + /** * * *
            -     * Required. The typeahead input used to fetch suggestions. Maximum length is
            -     * 128 characters.
            -     *
            -     * The query can not be empty for most of the suggestion types. If it is
            -     * empty, an `INVALID_ARGUMENT` error is returned. The exception is when the
            -     * suggestion_types contains only the type `RECENT_SEARCH`, the query can
            -     * be an empty string. The is called "zero prefix" feature, which returns
            -     * user's recently searched queries given the empty query.
            +     * Indicates if tail suggestions should be returned if there are no
            +     * suggestions that match the full query. Even if set to true, if there are
            +     * suggestions that match the full query, those are returned and no
            +     * tail suggestions are returned.
                  * 
            * - * string query = 2 [(.google.api.field_behavior) = REQUIRED]; + * bool include_tail_suggestions = 5; * - * @return The bytes for query. + * @return The includeTailSuggestions. */ - public com.google.protobuf.ByteString getQueryBytes() { - java.lang.Object ref = query_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - query_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } + @java.lang.Override + public boolean getIncludeTailSuggestions() { + return includeTailSuggestions_; } /** * * *
            -     * Required. The typeahead input used to fetch suggestions. Maximum length is
            -     * 128 characters.
            -     *
            -     * The query can not be empty for most of the suggestion types. If it is
            -     * empty, an `INVALID_ARGUMENT` error is returned. The exception is when the
            -     * suggestion_types contains only the type `RECENT_SEARCH`, the query can
            -     * be an empty string. The is called "zero prefix" feature, which returns
            -     * user's recently searched queries given the empty query.
            +     * Indicates if tail suggestions should be returned if there are no
            +     * suggestions that match the full query. Even if set to true, if there are
            +     * suggestions that match the full query, those are returned and no
            +     * tail suggestions are returned.
                  * 
            * - * string query = 2 [(.google.api.field_behavior) = REQUIRED]; + * bool include_tail_suggestions = 5; * - * @param value The query to set. + * @param value The includeTailSuggestions to set. * @return This builder for chaining. */ - public Builder setQuery(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - query_ = value; - bitField0_ |= 0x00000002; + public Builder setIncludeTailSuggestions(boolean value) { + + includeTailSuggestions_ = value; + bitField0_ |= 0x00000020; onChanged(); return this; } @@ -3887,171 +5674,174 @@ public Builder setQuery(java.lang.String value) { * * *
            -     * Required. The typeahead input used to fetch suggestions. Maximum length is
            -     * 128 characters.
            -     *
            -     * The query can not be empty for most of the suggestion types. If it is
            -     * empty, an `INVALID_ARGUMENT` error is returned. The exception is when the
            -     * suggestion_types contains only the type `RECENT_SEARCH`, the query can
            -     * be an empty string. The is called "zero prefix" feature, which returns
            -     * user's recently searched queries given the empty query.
            +     * Indicates if tail suggestions should be returned if there are no
            +     * suggestions that match the full query. Even if set to true, if there are
            +     * suggestions that match the full query, those are returned and no
            +     * tail suggestions are returned.
                  * 
            * - * string query = 2 [(.google.api.field_behavior) = REQUIRED]; + * bool include_tail_suggestions = 5; * * @return This builder for chaining. */ - public Builder clearQuery() { - query_ = getDefaultInstance().getQuery(); - bitField0_ = (bitField0_ & ~0x00000002); + public Builder clearIncludeTailSuggestions() { + bitField0_ = (bitField0_ & ~0x00000020); + includeTailSuggestions_ = false; onChanged(); return this; } + private com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.BoostSpec + boostSpec_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.BoostSpec, + com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.BoostSpec.Builder, + com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.BoostSpecOrBuilder> + boostSpecBuilder_; + + /** + * + * + *
            +     * Optional. Specification to boost suggestions matching the condition.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.BoostSpec boost_spec = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the boostSpec field is set. + */ + public boolean hasBoostSpec() { + return ((bitField0_ & 0x00000040) != 0); + } + + /** + * + * + *
            +     * Optional. Specification to boost suggestions matching the condition.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.BoostSpec boost_spec = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The boostSpec. + */ + public com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.BoostSpec + getBoostSpec() { + if (boostSpecBuilder_ == null) { + return boostSpec_ == null + ? com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.BoostSpec + .getDefaultInstance() + : boostSpec_; + } else { + return boostSpecBuilder_.getMessage(); + } + } + /** * * *
            -     * Required. The typeahead input used to fetch suggestions. Maximum length is
            -     * 128 characters.
            -     *
            -     * The query can not be empty for most of the suggestion types. If it is
            -     * empty, an `INVALID_ARGUMENT` error is returned. The exception is when the
            -     * suggestion_types contains only the type `RECENT_SEARCH`, the query can
            -     * be an empty string. The is called "zero prefix" feature, which returns
            -     * user's recently searched queries given the empty query.
            +     * Optional. Specification to boost suggestions matching the condition.
                  * 
            * - * string query = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The bytes for query to set. - * @return This builder for chaining. + * + * .google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.BoostSpec boost_spec = 6 [(.google.api.field_behavior) = OPTIONAL]; + * */ - public Builder setQueryBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); + public Builder setBoostSpec( + com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.BoostSpec value) { + if (boostSpecBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + boostSpec_ = value; + } else { + boostSpecBuilder_.setMessage(value); } - checkByteStringIsUtf8(value); - query_ = value; - bitField0_ |= 0x00000002; + bitField0_ |= 0x00000040; onChanged(); return this; } - private java.lang.Object queryModel_ = ""; - /** * * *
            -     * Specifies the autocomplete data model. This overrides any model specified
            -     * in the Configuration > Autocomplete section of the Cloud console. Currently
            -     * supported values:
            -     *
            -     * * `document` - Using suggestions generated from user-imported documents.
            -     * * `search-history` - Using suggestions generated from the past history of
            -     * [SearchService.Search][google.cloud.discoveryengine.v1beta.SearchService.Search]
            -     * API calls. Do not use it when there is no traffic for Search API.
            -     * * `user-event` - Using suggestions generated from user-imported search
            -     * events.
            -     * * `document-completable` - Using suggestions taken directly from
            -     * user-imported document fields marked as completable.
            -     *
            -     * Default values:
            -     *
            -     * * `document` is the default model for regular dataStores.
            -     * * `search-history` is the default model for site search dataStores.
            +     * Optional. Specification to boost suggestions matching the condition.
                  * 
            * - * string query_model = 3; - * - * @return The queryModel. + * + * .google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.BoostSpec boost_spec = 6 [(.google.api.field_behavior) = OPTIONAL]; + * */ - public java.lang.String getQueryModel() { - java.lang.Object ref = queryModel_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - queryModel_ = s; - return s; + public Builder setBoostSpec( + com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.BoostSpec.Builder + builderForValue) { + if (boostSpecBuilder_ == null) { + boostSpec_ = builderForValue.build(); } else { - return (java.lang.String) ref; + boostSpecBuilder_.setMessage(builderForValue.build()); } + bitField0_ |= 0x00000040; + onChanged(); + return this; } /** * * *
            -     * Specifies the autocomplete data model. This overrides any model specified
            -     * in the Configuration > Autocomplete section of the Cloud console. Currently
            -     * supported values:
            -     *
            -     * * `document` - Using suggestions generated from user-imported documents.
            -     * * `search-history` - Using suggestions generated from the past history of
            -     * [SearchService.Search][google.cloud.discoveryengine.v1beta.SearchService.Search]
            -     * API calls. Do not use it when there is no traffic for Search API.
            -     * * `user-event` - Using suggestions generated from user-imported search
            -     * events.
            -     * * `document-completable` - Using suggestions taken directly from
            -     * user-imported document fields marked as completable.
            -     *
            -     * Default values:
            -     *
            -     * * `document` is the default model for regular dataStores.
            -     * * `search-history` is the default model for site search dataStores.
            +     * Optional. Specification to boost suggestions matching the condition.
                  * 
            * - * string query_model = 3; - * - * @return The bytes for queryModel. + * + * .google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.BoostSpec boost_spec = 6 [(.google.api.field_behavior) = OPTIONAL]; + * */ - public com.google.protobuf.ByteString getQueryModelBytes() { - java.lang.Object ref = queryModel_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - queryModel_ = b; - return b; + public Builder mergeBoostSpec( + com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.BoostSpec value) { + if (boostSpecBuilder_ == null) { + if (((bitField0_ & 0x00000040) != 0) + && boostSpec_ != null + && boostSpec_ + != com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.BoostSpec + .getDefaultInstance()) { + getBoostSpecBuilder().mergeFrom(value); + } else { + boostSpec_ = value; + } } else { - return (com.google.protobuf.ByteString) ref; + boostSpecBuilder_.mergeFrom(value); + } + if (boostSpec_ != null) { + bitField0_ |= 0x00000040; + onChanged(); } + return this; } /** * * *
            -     * Specifies the autocomplete data model. This overrides any model specified
            -     * in the Configuration > Autocomplete section of the Cloud console. Currently
            -     * supported values:
            -     *
            -     * * `document` - Using suggestions generated from user-imported documents.
            -     * * `search-history` - Using suggestions generated from the past history of
            -     * [SearchService.Search][google.cloud.discoveryengine.v1beta.SearchService.Search]
            -     * API calls. Do not use it when there is no traffic for Search API.
            -     * * `user-event` - Using suggestions generated from user-imported search
            -     * events.
            -     * * `document-completable` - Using suggestions taken directly from
            -     * user-imported document fields marked as completable.
            -     *
            -     * Default values:
            -     *
            -     * * `document` is the default model for regular dataStores.
            -     * * `search-history` is the default model for site search dataStores.
            +     * Optional. Specification to boost suggestions matching the condition.
                  * 
            * - * string query_model = 3; - * - * @param value The queryModel to set. - * @return This builder for chaining. + * + * .google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.BoostSpec boost_spec = 6 [(.google.api.field_behavior) = OPTIONAL]; + * */ - public Builder setQueryModel(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); + public Builder clearBoostSpec() { + bitField0_ = (bitField0_ & ~0x00000040); + boostSpec_ = null; + if (boostSpecBuilder_ != null) { + boostSpecBuilder_.dispose(); + boostSpecBuilder_ = null; } - queryModel_ = value; - bitField0_ |= 0x00000004; onChanged(); return this; } @@ -4060,177 +5850,169 @@ public Builder setQueryModel(java.lang.String value) { * * *
            -     * Specifies the autocomplete data model. This overrides any model specified
            -     * in the Configuration > Autocomplete section of the Cloud console. Currently
            -     * supported values:
            -     *
            -     * * `document` - Using suggestions generated from user-imported documents.
            -     * * `search-history` - Using suggestions generated from the past history of
            -     * [SearchService.Search][google.cloud.discoveryengine.v1beta.SearchService.Search]
            -     * API calls. Do not use it when there is no traffic for Search API.
            -     * * `user-event` - Using suggestions generated from user-imported search
            -     * events.
            -     * * `document-completable` - Using suggestions taken directly from
            -     * user-imported document fields marked as completable.
            -     *
            -     * Default values:
            -     *
            -     * * `document` is the default model for regular dataStores.
            -     * * `search-history` is the default model for site search dataStores.
            +     * Optional. Specification to boost suggestions matching the condition.
                  * 
            * - * string query_model = 3; - * - * @return This builder for chaining. + * + * .google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.BoostSpec boost_spec = 6 [(.google.api.field_behavior) = OPTIONAL]; + * */ - public Builder clearQueryModel() { - queryModel_ = getDefaultInstance().getQueryModel(); - bitField0_ = (bitField0_ & ~0x00000004); + public com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.BoostSpec.Builder + getBoostSpecBuilder() { + bitField0_ |= 0x00000040; onChanged(); - return this; + return internalGetBoostSpecFieldBuilder().getBuilder(); } /** * * *
            -     * Specifies the autocomplete data model. This overrides any model specified
            -     * in the Configuration > Autocomplete section of the Cloud console. Currently
            -     * supported values:
            +     * Optional. Specification to boost suggestions matching the condition.
            +     * 
            * - * * `document` - Using suggestions generated from user-imported documents. - * * `search-history` - Using suggestions generated from the past history of - * [SearchService.Search][google.cloud.discoveryengine.v1beta.SearchService.Search] - * API calls. Do not use it when there is no traffic for Search API. - * * `user-event` - Using suggestions generated from user-imported search - * events. - * * `document-completable` - Using suggestions taken directly from - * user-imported document fields marked as completable. + * + * .google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.BoostSpec boost_spec = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.BoostSpecOrBuilder + getBoostSpecOrBuilder() { + if (boostSpecBuilder_ != null) { + return boostSpecBuilder_.getMessageOrBuilder(); + } else { + return boostSpec_ == null + ? com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.BoostSpec + .getDefaultInstance() + : boostSpec_; + } + } + + /** * - * Default values: * - * * `document` is the default model for regular dataStores. - * * `search-history` is the default model for site search dataStores. + *
            +     * Optional. Specification to boost suggestions matching the condition.
                  * 
            * - * string query_model = 3; - * - * @param value The bytes for queryModel to set. - * @return This builder for chaining. + * + * .google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.BoostSpec boost_spec = 6 [(.google.api.field_behavior) = OPTIONAL]; + * */ - public Builder setQueryModelBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.BoostSpec, + com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.BoostSpec.Builder, + com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.BoostSpecOrBuilder> + internalGetBoostSpecFieldBuilder() { + if (boostSpecBuilder_ == null) { + boostSpecBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.BoostSpec, + com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.BoostSpec + .Builder, + com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest + .BoostSpecOrBuilder>(getBoostSpec(), getParentForChildren(), isClean()); + boostSpec_ = null; } - checkByteStringIsUtf8(value); - queryModel_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; + return boostSpecBuilder_; + } + + private com.google.protobuf.Internal.IntList suggestionTypes_ = emptyIntList(); + + private void ensureSuggestionTypesIsMutable() { + if (!suggestionTypes_.isModifiable()) { + suggestionTypes_ = makeMutableCopy(suggestionTypes_); + } + bitField0_ |= 0x00000080; } - private java.lang.Object userPseudoId_ = ""; - /** * * *
            -     * A unique identifier for tracking visitors. For example, this could be
            -     * implemented with an HTTP cookie, which should be able to uniquely identify
            -     * a visitor on a single device. This unique identifier should not change if
            -     * the visitor logs in or out of the website.
            -     *
            -     * This field should NOT have a fixed value such as `unknown_visitor`.
            -     *
            -     * This should be the same identifier as
            -     * [UserEvent.user_pseudo_id][google.cloud.discoveryengine.v1beta.UserEvent.user_pseudo_id]
            -     * and
            -     * [SearchRequest.user_pseudo_id][google.cloud.discoveryengine.v1beta.SearchRequest.user_pseudo_id].
            -     *
            -     * The field must be a UTF-8 encoded string with a length limit of 128
            +     * Optional. Suggestion types to return. If empty or unspecified, query
            +     * suggestions are returned. Only one suggestion type is supported at the
            +     * moment.
                  * 
            * - * string user_pseudo_id = 4; + * + * repeated .google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.SuggestionType suggestion_types = 7 [(.google.api.field_behavior) = OPTIONAL]; + * * - * @return The userPseudoId. + * @return A list containing the suggestionTypes. */ - public java.lang.String getUserPseudoId() { - java.lang.Object ref = userPseudoId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - userPseudoId_ = s; - return s; - } else { - return (java.lang.String) ref; - } + public java.util.List< + com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.SuggestionType> + getSuggestionTypesList() { + return new com.google.protobuf.Internal.IntListAdapter< + com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.SuggestionType>( + suggestionTypes_, suggestionTypes_converter_); } /** * * *
            -     * A unique identifier for tracking visitors. For example, this could be
            -     * implemented with an HTTP cookie, which should be able to uniquely identify
            -     * a visitor on a single device. This unique identifier should not change if
            -     * the visitor logs in or out of the website.
            -     *
            -     * This field should NOT have a fixed value such as `unknown_visitor`.
            -     *
            -     * This should be the same identifier as
            -     * [UserEvent.user_pseudo_id][google.cloud.discoveryengine.v1beta.UserEvent.user_pseudo_id]
            -     * and
            -     * [SearchRequest.user_pseudo_id][google.cloud.discoveryengine.v1beta.SearchRequest.user_pseudo_id].
            -     *
            -     * The field must be a UTF-8 encoded string with a length limit of 128
            +     * Optional. Suggestion types to return. If empty or unspecified, query
            +     * suggestions are returned. Only one suggestion type is supported at the
            +     * moment.
                  * 
            * - * string user_pseudo_id = 4; + * + * repeated .google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.SuggestionType suggestion_types = 7 [(.google.api.field_behavior) = OPTIONAL]; + * * - * @return The bytes for userPseudoId. + * @return The count of suggestionTypes. */ - public com.google.protobuf.ByteString getUserPseudoIdBytes() { - java.lang.Object ref = userPseudoId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - userPseudoId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } + public int getSuggestionTypesCount() { + return suggestionTypes_.size(); } /** * * *
            -     * A unique identifier for tracking visitors. For example, this could be
            -     * implemented with an HTTP cookie, which should be able to uniquely identify
            -     * a visitor on a single device. This unique identifier should not change if
            -     * the visitor logs in or out of the website.
            +     * Optional. Suggestion types to return. If empty or unspecified, query
            +     * suggestions are returned. Only one suggestion type is supported at the
            +     * moment.
            +     * 
            * - * This field should NOT have a fixed value such as `unknown_visitor`. + * + * repeated .google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.SuggestionType suggestion_types = 7 [(.google.api.field_behavior) = OPTIONAL]; + * * - * This should be the same identifier as - * [UserEvent.user_pseudo_id][google.cloud.discoveryengine.v1beta.UserEvent.user_pseudo_id] - * and - * [SearchRequest.user_pseudo_id][google.cloud.discoveryengine.v1beta.SearchRequest.user_pseudo_id]. + * @param index The index of the element to return. + * @return The suggestionTypes at the given index. + */ + public com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.SuggestionType + getSuggestionTypes(int index) { + return suggestionTypes_converter_.convert(suggestionTypes_.getInt(index)); + } + + /** * - * The field must be a UTF-8 encoded string with a length limit of 128 + * + *
            +     * Optional. Suggestion types to return. If empty or unspecified, query
            +     * suggestions are returned. Only one suggestion type is supported at the
            +     * moment.
                  * 
            * - * string user_pseudo_id = 4; + * + * repeated .google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.SuggestionType suggestion_types = 7 [(.google.api.field_behavior) = OPTIONAL]; + * * - * @param value The userPseudoId to set. + * @param index The index to set the value at. + * @param value The suggestionTypes to set. * @return This builder for chaining. */ - public Builder setUserPseudoId(java.lang.String value) { + public Builder setSuggestionTypes( + int index, + com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.SuggestionType value) { if (value == null) { throw new NullPointerException(); } - userPseudoId_ = value; - bitField0_ |= 0x00000008; + ensureSuggestionTypesIsMutable(); + suggestionTypes_.setInt(index, value.getNumber()); onChanged(); return this; } @@ -4239,28 +6021,25 @@ public Builder setUserPseudoId(java.lang.String value) { * * *
            -     * A unique identifier for tracking visitors. For example, this could be
            -     * implemented with an HTTP cookie, which should be able to uniquely identify
            -     * a visitor on a single device. This unique identifier should not change if
            -     * the visitor logs in or out of the website.
            -     *
            -     * This field should NOT have a fixed value such as `unknown_visitor`.
            -     *
            -     * This should be the same identifier as
            -     * [UserEvent.user_pseudo_id][google.cloud.discoveryengine.v1beta.UserEvent.user_pseudo_id]
            -     * and
            -     * [SearchRequest.user_pseudo_id][google.cloud.discoveryengine.v1beta.SearchRequest.user_pseudo_id].
            -     *
            -     * The field must be a UTF-8 encoded string with a length limit of 128
            +     * Optional. Suggestion types to return. If empty or unspecified, query
            +     * suggestions are returned. Only one suggestion type is supported at the
            +     * moment.
                  * 
            * - * string user_pseudo_id = 4; + * + * repeated .google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.SuggestionType suggestion_types = 7 [(.google.api.field_behavior) = OPTIONAL]; + * * + * @param value The suggestionTypes to add. * @return This builder for chaining. */ - public Builder clearUserPseudoId() { - userPseudoId_ = getDefaultInstance().getUserPseudoId(); - bitField0_ = (bitField0_ & ~0x00000008); + public Builder addSuggestionTypes( + com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.SuggestionType value) { + if (value == null) { + throw new NullPointerException(); + } + ensureSuggestionTypesIsMutable(); + suggestionTypes_.addInt(value.getNumber()); onChanged(); return this; } @@ -4269,148 +6048,115 @@ public Builder clearUserPseudoId() { * * *
            -     * A unique identifier for tracking visitors. For example, this could be
            -     * implemented with an HTTP cookie, which should be able to uniquely identify
            -     * a visitor on a single device. This unique identifier should not change if
            -     * the visitor logs in or out of the website.
            -     *
            -     * This field should NOT have a fixed value such as `unknown_visitor`.
            -     *
            -     * This should be the same identifier as
            -     * [UserEvent.user_pseudo_id][google.cloud.discoveryengine.v1beta.UserEvent.user_pseudo_id]
            -     * and
            -     * [SearchRequest.user_pseudo_id][google.cloud.discoveryengine.v1beta.SearchRequest.user_pseudo_id].
            -     *
            -     * The field must be a UTF-8 encoded string with a length limit of 128
            +     * Optional. Suggestion types to return. If empty or unspecified, query
            +     * suggestions are returned. Only one suggestion type is supported at the
            +     * moment.
                  * 
            * - * string user_pseudo_id = 4; + * + * repeated .google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.SuggestionType suggestion_types = 7 [(.google.api.field_behavior) = OPTIONAL]; + * * - * @param value The bytes for userPseudoId to set. + * @param values The suggestionTypes to add. * @return This builder for chaining. */ - public Builder setUserPseudoIdBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); + public Builder addAllSuggestionTypes( + java.lang.Iterable< + ? extends + com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest + .SuggestionType> + values) { + ensureSuggestionTypesIsMutable(); + for (com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.SuggestionType + value : values) { + suggestionTypes_.addInt(value.getNumber()); } - checkByteStringIsUtf8(value); - userPseudoId_ = value; - bitField0_ |= 0x00000008; onChanged(); return this; } - private com.google.cloud.discoveryengine.v1beta.UserInfo userInfo_; - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.discoveryengine.v1beta.UserInfo, - com.google.cloud.discoveryengine.v1beta.UserInfo.Builder, - com.google.cloud.discoveryengine.v1beta.UserInfoOrBuilder> - userInfoBuilder_; - /** * * *
            -     * Optional. Information about the end user.
            -     *
            -     * This should be the same identifier information as
            -     * [UserEvent.user_info][google.cloud.discoveryengine.v1beta.UserEvent.user_info]
            -     * and
            -     * [SearchRequest.user_info][google.cloud.discoveryengine.v1beta.SearchRequest.user_info].
            +     * Optional. Suggestion types to return. If empty or unspecified, query
            +     * suggestions are returned. Only one suggestion type is supported at the
            +     * moment.
                  * 
            * * - * .google.cloud.discoveryengine.v1beta.UserInfo user_info = 9 [(.google.api.field_behavior) = OPTIONAL]; + * repeated .google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.SuggestionType suggestion_types = 7 [(.google.api.field_behavior) = OPTIONAL]; * * - * @return Whether the userInfo field is set. + * @return This builder for chaining. */ - public boolean hasUserInfo() { - return ((bitField0_ & 0x00000010) != 0); + public Builder clearSuggestionTypes() { + suggestionTypes_ = emptyIntList(); + bitField0_ = (bitField0_ & ~0x00000080); + onChanged(); + return this; } /** * * *
            -     * Optional. Information about the end user.
            -     *
            -     * This should be the same identifier information as
            -     * [UserEvent.user_info][google.cloud.discoveryengine.v1beta.UserEvent.user_info]
            -     * and
            -     * [SearchRequest.user_info][google.cloud.discoveryengine.v1beta.SearchRequest.user_info].
            +     * Optional. Suggestion types to return. If empty or unspecified, query
            +     * suggestions are returned. Only one suggestion type is supported at the
            +     * moment.
                  * 
            * * - * .google.cloud.discoveryengine.v1beta.UserInfo user_info = 9 [(.google.api.field_behavior) = OPTIONAL]; + * repeated .google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.SuggestionType suggestion_types = 7 [(.google.api.field_behavior) = OPTIONAL]; * * - * @return The userInfo. + * @return A list containing the enum numeric values on the wire for suggestionTypes. */ - public com.google.cloud.discoveryengine.v1beta.UserInfo getUserInfo() { - if (userInfoBuilder_ == null) { - return userInfo_ == null - ? com.google.cloud.discoveryengine.v1beta.UserInfo.getDefaultInstance() - : userInfo_; - } else { - return userInfoBuilder_.getMessage(); - } + public java.util.List getSuggestionTypesValueList() { + suggestionTypes_.makeImmutable(); + return suggestionTypes_; } /** * * *
            -     * Optional. Information about the end user.
            -     *
            -     * This should be the same identifier information as
            -     * [UserEvent.user_info][google.cloud.discoveryengine.v1beta.UserEvent.user_info]
            -     * and
            -     * [SearchRequest.user_info][google.cloud.discoveryengine.v1beta.SearchRequest.user_info].
            +     * Optional. Suggestion types to return. If empty or unspecified, query
            +     * suggestions are returned. Only one suggestion type is supported at the
            +     * moment.
                  * 
            * * - * .google.cloud.discoveryengine.v1beta.UserInfo user_info = 9 [(.google.api.field_behavior) = OPTIONAL]; + * repeated .google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.SuggestionType suggestion_types = 7 [(.google.api.field_behavior) = OPTIONAL]; * + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of suggestionTypes at the given index. */ - public Builder setUserInfo(com.google.cloud.discoveryengine.v1beta.UserInfo value) { - if (userInfoBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - userInfo_ = value; - } else { - userInfoBuilder_.setMessage(value); - } - bitField0_ |= 0x00000010; - onChanged(); - return this; + public int getSuggestionTypesValue(int index) { + return suggestionTypes_.getInt(index); } /** * * *
            -     * Optional. Information about the end user.
            -     *
            -     * This should be the same identifier information as
            -     * [UserEvent.user_info][google.cloud.discoveryengine.v1beta.UserEvent.user_info]
            -     * and
            -     * [SearchRequest.user_info][google.cloud.discoveryengine.v1beta.SearchRequest.user_info].
            +     * Optional. Suggestion types to return. If empty or unspecified, query
            +     * suggestions are returned. Only one suggestion type is supported at the
            +     * moment.
                  * 
            * * - * .google.cloud.discoveryengine.v1beta.UserInfo user_info = 9 [(.google.api.field_behavior) = OPTIONAL]; + * repeated .google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.SuggestionType suggestion_types = 7 [(.google.api.field_behavior) = OPTIONAL]; * + * + * @param index The index to set the value at. + * @param value The enum numeric value on the wire for suggestionTypes to set. + * @return This builder for chaining. */ - public Builder setUserInfo( - com.google.cloud.discoveryengine.v1beta.UserInfo.Builder builderForValue) { - if (userInfoBuilder_ == null) { - userInfo_ = builderForValue.build(); - } else { - userInfoBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000010; + public Builder setSuggestionTypesValue(int index, int value) { + ensureSuggestionTypesIsMutable(); + suggestionTypes_.setInt(index, value); onChanged(); return this; } @@ -4419,34 +6165,22 @@ public Builder setUserInfo( * * *
            -     * Optional. Information about the end user.
            -     *
            -     * This should be the same identifier information as
            -     * [UserEvent.user_info][google.cloud.discoveryengine.v1beta.UserEvent.user_info]
            -     * and
            -     * [SearchRequest.user_info][google.cloud.discoveryengine.v1beta.SearchRequest.user_info].
            +     * Optional. Suggestion types to return. If empty or unspecified, query
            +     * suggestions are returned. Only one suggestion type is supported at the
            +     * moment.
                  * 
            * * - * .google.cloud.discoveryengine.v1beta.UserInfo user_info = 9 [(.google.api.field_behavior) = OPTIONAL]; + * repeated .google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.SuggestionType suggestion_types = 7 [(.google.api.field_behavior) = OPTIONAL]; * + * + * @param value The enum numeric value on the wire for suggestionTypes to add. + * @return This builder for chaining. */ - public Builder mergeUserInfo(com.google.cloud.discoveryengine.v1beta.UserInfo value) { - if (userInfoBuilder_ == null) { - if (((bitField0_ & 0x00000010) != 0) - && userInfo_ != null - && userInfo_ != com.google.cloud.discoveryengine.v1beta.UserInfo.getDefaultInstance()) { - getUserInfoBuilder().mergeFrom(value); - } else { - userInfo_ = value; - } - } else { - userInfoBuilder_.mergeFrom(value); - } - if (userInfo_ != null) { - bitField0_ |= 0x00000010; - onChanged(); - } + public Builder addSuggestionTypesValue(int value) { + ensureSuggestionTypesIsMutable(); + suggestionTypes_.addInt(value); + onChanged(); return this; } @@ -4454,74 +6188,86 @@ public Builder mergeUserInfo(com.google.cloud.discoveryengine.v1beta.UserInfo va * * *
            -     * Optional. Information about the end user.
            -     *
            -     * This should be the same identifier information as
            -     * [UserEvent.user_info][google.cloud.discoveryengine.v1beta.UserEvent.user_info]
            -     * and
            -     * [SearchRequest.user_info][google.cloud.discoveryengine.v1beta.SearchRequest.user_info].
            +     * Optional. Suggestion types to return. If empty or unspecified, query
            +     * suggestions are returned. Only one suggestion type is supported at the
            +     * moment.
                  * 
            * * - * .google.cloud.discoveryengine.v1beta.UserInfo user_info = 9 [(.google.api.field_behavior) = OPTIONAL]; + * repeated .google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.SuggestionType suggestion_types = 7 [(.google.api.field_behavior) = OPTIONAL]; * + * + * @param values The enum numeric values on the wire for suggestionTypes to add. + * @return This builder for chaining. */ - public Builder clearUserInfo() { - bitField0_ = (bitField0_ & ~0x00000010); - userInfo_ = null; - if (userInfoBuilder_ != null) { - userInfoBuilder_.dispose(); - userInfoBuilder_ = null; + public Builder addAllSuggestionTypesValue(java.lang.Iterable values) { + ensureSuggestionTypesIsMutable(); + for (int value : values) { + suggestionTypes_.addInt(value); } onChanged(); return this; } + private java.util.List< + com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.SuggestionTypeSpec> + suggestionTypeSpecs_ = java.util.Collections.emptyList(); + + private void ensureSuggestionTypeSpecsIsMutable() { + if (!((bitField0_ & 0x00000100) != 0)) { + suggestionTypeSpecs_ = + new java.util.ArrayList< + com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest + .SuggestionTypeSpec>(suggestionTypeSpecs_); + bitField0_ |= 0x00000100; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.SuggestionTypeSpec, + com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.SuggestionTypeSpec + .Builder, + com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest + .SuggestionTypeSpecOrBuilder> + suggestionTypeSpecsBuilder_; + /** * * *
            -     * Optional. Information about the end user.
            -     *
            -     * This should be the same identifier information as
            -     * [UserEvent.user_info][google.cloud.discoveryengine.v1beta.UserEvent.user_info]
            -     * and
            -     * [SearchRequest.user_info][google.cloud.discoveryengine.v1beta.SearchRequest.user_info].
            +     * Optional. Specification of each suggestion type.
                  * 
            * * - * .google.cloud.discoveryengine.v1beta.UserInfo user_info = 9 [(.google.api.field_behavior) = OPTIONAL]; + * repeated .google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.SuggestionTypeSpec suggestion_type_specs = 10 [(.google.api.field_behavior) = OPTIONAL]; * */ - public com.google.cloud.discoveryengine.v1beta.UserInfo.Builder getUserInfoBuilder() { - bitField0_ |= 0x00000010; - onChanged(); - return internalGetUserInfoFieldBuilder().getBuilder(); + public java.util.List< + com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.SuggestionTypeSpec> + getSuggestionTypeSpecsList() { + if (suggestionTypeSpecsBuilder_ == null) { + return java.util.Collections.unmodifiableList(suggestionTypeSpecs_); + } else { + return suggestionTypeSpecsBuilder_.getMessageList(); + } } /** * * *
            -     * Optional. Information about the end user.
            -     *
            -     * This should be the same identifier information as
            -     * [UserEvent.user_info][google.cloud.discoveryengine.v1beta.UserEvent.user_info]
            -     * and
            -     * [SearchRequest.user_info][google.cloud.discoveryengine.v1beta.SearchRequest.user_info].
            +     * Optional. Specification of each suggestion type.
                  * 
            * * - * .google.cloud.discoveryengine.v1beta.UserInfo user_info = 9 [(.google.api.field_behavior) = OPTIONAL]; + * repeated .google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.SuggestionTypeSpec suggestion_type_specs = 10 [(.google.api.field_behavior) = OPTIONAL]; * */ - public com.google.cloud.discoveryengine.v1beta.UserInfoOrBuilder getUserInfoOrBuilder() { - if (userInfoBuilder_ != null) { - return userInfoBuilder_.getMessageOrBuilder(); + public int getSuggestionTypeSpecsCount() { + if (suggestionTypeSpecsBuilder_ == null) { + return suggestionTypeSpecs_.size(); } else { - return userInfo_ == null - ? com.google.cloud.discoveryengine.v1beta.UserInfo.getDefaultInstance() - : userInfo_; + return suggestionTypeSpecsBuilder_.getCount(); } } @@ -4529,76 +6275,73 @@ public com.google.cloud.discoveryengine.v1beta.UserInfoOrBuilder getUserInfoOrBu * * *
            -     * Optional. Information about the end user.
            -     *
            -     * This should be the same identifier information as
            -     * [UserEvent.user_info][google.cloud.discoveryengine.v1beta.UserEvent.user_info]
            -     * and
            -     * [SearchRequest.user_info][google.cloud.discoveryengine.v1beta.SearchRequest.user_info].
            +     * Optional. Specification of each suggestion type.
                  * 
            * * - * .google.cloud.discoveryengine.v1beta.UserInfo user_info = 9 [(.google.api.field_behavior) = OPTIONAL]; + * repeated .google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.SuggestionTypeSpec suggestion_type_specs = 10 [(.google.api.field_behavior) = OPTIONAL]; * */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.discoveryengine.v1beta.UserInfo, - com.google.cloud.discoveryengine.v1beta.UserInfo.Builder, - com.google.cloud.discoveryengine.v1beta.UserInfoOrBuilder> - internalGetUserInfoFieldBuilder() { - if (userInfoBuilder_ == null) { - userInfoBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.discoveryengine.v1beta.UserInfo, - com.google.cloud.discoveryengine.v1beta.UserInfo.Builder, - com.google.cloud.discoveryengine.v1beta.UserInfoOrBuilder>( - getUserInfo(), getParentForChildren(), isClean()); - userInfo_ = null; + public com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.SuggestionTypeSpec + getSuggestionTypeSpecs(int index) { + if (suggestionTypeSpecsBuilder_ == null) { + return suggestionTypeSpecs_.get(index); + } else { + return suggestionTypeSpecsBuilder_.getMessage(index); } - return userInfoBuilder_; } - private boolean includeTailSuggestions_; - /** * * *
            -     * Indicates if tail suggestions should be returned if there are no
            -     * suggestions that match the full query. Even if set to true, if there are
            -     * suggestions that match the full query, those are returned and no
            -     * tail suggestions are returned.
            +     * Optional. Specification of each suggestion type.
                  * 
            * - * bool include_tail_suggestions = 5; - * - * @return The includeTailSuggestions. + * + * repeated .google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.SuggestionTypeSpec suggestion_type_specs = 10 [(.google.api.field_behavior) = OPTIONAL]; + * */ - @java.lang.Override - public boolean getIncludeTailSuggestions() { - return includeTailSuggestions_; + public Builder setSuggestionTypeSpecs( + int index, + com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.SuggestionTypeSpec + value) { + if (suggestionTypeSpecsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSuggestionTypeSpecsIsMutable(); + suggestionTypeSpecs_.set(index, value); + onChanged(); + } else { + suggestionTypeSpecsBuilder_.setMessage(index, value); + } + return this; } /** * * *
            -     * Indicates if tail suggestions should be returned if there are no
            -     * suggestions that match the full query. Even if set to true, if there are
            -     * suggestions that match the full query, those are returned and no
            -     * tail suggestions are returned.
            +     * Optional. Specification of each suggestion type.
                  * 
            * - * bool include_tail_suggestions = 5; - * - * @param value The includeTailSuggestions to set. - * @return This builder for chaining. + * + * repeated .google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.SuggestionTypeSpec suggestion_type_specs = 10 [(.google.api.field_behavior) = OPTIONAL]; + * */ - public Builder setIncludeTailSuggestions(boolean value) { - - includeTailSuggestions_ = value; - bitField0_ |= 0x00000020; - onChanged(); + public Builder setSuggestionTypeSpecs( + int index, + com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.SuggestionTypeSpec + .Builder + builderForValue) { + if (suggestionTypeSpecsBuilder_ == null) { + ensureSuggestionTypeSpecsIsMutable(); + suggestionTypeSpecs_.set(index, builderForValue.build()); + onChanged(); + } else { + suggestionTypeSpecsBuilder_.setMessage(index, builderForValue.build()); + } return this; } @@ -4606,96 +6349,105 @@ public Builder setIncludeTailSuggestions(boolean value) { * * *
            -     * Indicates if tail suggestions should be returned if there are no
            -     * suggestions that match the full query. Even if set to true, if there are
            -     * suggestions that match the full query, those are returned and no
            -     * tail suggestions are returned.
            +     * Optional. Specification of each suggestion type.
                  * 
            * - * bool include_tail_suggestions = 5; - * - * @return This builder for chaining. + * + * repeated .google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.SuggestionTypeSpec suggestion_type_specs = 10 [(.google.api.field_behavior) = OPTIONAL]; + * */ - public Builder clearIncludeTailSuggestions() { - bitField0_ = (bitField0_ & ~0x00000020); - includeTailSuggestions_ = false; - onChanged(); + public Builder addSuggestionTypeSpecs( + com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.SuggestionTypeSpec + value) { + if (suggestionTypeSpecsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSuggestionTypeSpecsIsMutable(); + suggestionTypeSpecs_.add(value); + onChanged(); + } else { + suggestionTypeSpecsBuilder_.addMessage(value); + } return this; } - private com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.BoostSpec - boostSpec_; - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.BoostSpec, - com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.BoostSpec.Builder, - com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.BoostSpecOrBuilder> - boostSpecBuilder_; - /** * * *
            -     * Optional. Specification to boost suggestions matching the condition.
            +     * Optional. Specification of each suggestion type.
                  * 
            * * - * .google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.BoostSpec boost_spec = 6 [(.google.api.field_behavior) = OPTIONAL]; + * repeated .google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.SuggestionTypeSpec suggestion_type_specs = 10 [(.google.api.field_behavior) = OPTIONAL]; * - * - * @return Whether the boostSpec field is set. */ - public boolean hasBoostSpec() { - return ((bitField0_ & 0x00000040) != 0); + public Builder addSuggestionTypeSpecs( + int index, + com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.SuggestionTypeSpec + value) { + if (suggestionTypeSpecsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSuggestionTypeSpecsIsMutable(); + suggestionTypeSpecs_.add(index, value); + onChanged(); + } else { + suggestionTypeSpecsBuilder_.addMessage(index, value); + } + return this; } /** * * *
            -     * Optional. Specification to boost suggestions matching the condition.
            +     * Optional. Specification of each suggestion type.
                  * 
            * * - * .google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.BoostSpec boost_spec = 6 [(.google.api.field_behavior) = OPTIONAL]; + * repeated .google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.SuggestionTypeSpec suggestion_type_specs = 10 [(.google.api.field_behavior) = OPTIONAL]; * - * - * @return The boostSpec. */ - public com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.BoostSpec - getBoostSpec() { - if (boostSpecBuilder_ == null) { - return boostSpec_ == null - ? com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.BoostSpec - .getDefaultInstance() - : boostSpec_; + public Builder addSuggestionTypeSpecs( + com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.SuggestionTypeSpec + .Builder + builderForValue) { + if (suggestionTypeSpecsBuilder_ == null) { + ensureSuggestionTypeSpecsIsMutable(); + suggestionTypeSpecs_.add(builderForValue.build()); + onChanged(); } else { - return boostSpecBuilder_.getMessage(); + suggestionTypeSpecsBuilder_.addMessage(builderForValue.build()); } + return this; } /** * * *
            -     * Optional. Specification to boost suggestions matching the condition.
            +     * Optional. Specification of each suggestion type.
                  * 
            * * - * .google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.BoostSpec boost_spec = 6 [(.google.api.field_behavior) = OPTIONAL]; + * repeated .google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.SuggestionTypeSpec suggestion_type_specs = 10 [(.google.api.field_behavior) = OPTIONAL]; * */ - public Builder setBoostSpec( - com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.BoostSpec value) { - if (boostSpecBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - boostSpec_ = value; + public Builder addSuggestionTypeSpecs( + int index, + com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.SuggestionTypeSpec + .Builder + builderForValue) { + if (suggestionTypeSpecsBuilder_ == null) { + ensureSuggestionTypeSpecsIsMutable(); + suggestionTypeSpecs_.add(index, builderForValue.build()); + onChanged(); } else { - boostSpecBuilder_.setMessage(value); + suggestionTypeSpecsBuilder_.addMessage(index, builderForValue.build()); } - bitField0_ |= 0x00000040; - onChanged(); return this; } @@ -4703,23 +6455,26 @@ public Builder setBoostSpec( * * *
            -     * Optional. Specification to boost suggestions matching the condition.
            +     * Optional. Specification of each suggestion type.
                  * 
            * * - * .google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.BoostSpec boost_spec = 6 [(.google.api.field_behavior) = OPTIONAL]; + * repeated .google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.SuggestionTypeSpec suggestion_type_specs = 10 [(.google.api.field_behavior) = OPTIONAL]; * */ - public Builder setBoostSpec( - com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.BoostSpec.Builder - builderForValue) { - if (boostSpecBuilder_ == null) { - boostSpec_ = builderForValue.build(); + public Builder addAllSuggestionTypeSpecs( + java.lang.Iterable< + ? extends + com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest + .SuggestionTypeSpec> + values) { + if (suggestionTypeSpecsBuilder_ == null) { + ensureSuggestionTypeSpecsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, suggestionTypeSpecs_); + onChanged(); } else { - boostSpecBuilder_.setMessage(builderForValue.build()); + suggestionTypeSpecsBuilder_.addAllMessages(values); } - bitField0_ |= 0x00000040; - onChanged(); return this; } @@ -4727,31 +6482,20 @@ public Builder setBoostSpec( * * *
            -     * Optional. Specification to boost suggestions matching the condition.
            +     * Optional. Specification of each suggestion type.
                  * 
            * * - * .google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.BoostSpec boost_spec = 6 [(.google.api.field_behavior) = OPTIONAL]; + * repeated .google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.SuggestionTypeSpec suggestion_type_specs = 10 [(.google.api.field_behavior) = OPTIONAL]; * */ - public Builder mergeBoostSpec( - com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.BoostSpec value) { - if (boostSpecBuilder_ == null) { - if (((bitField0_ & 0x00000040) != 0) - && boostSpec_ != null - && boostSpec_ - != com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.BoostSpec - .getDefaultInstance()) { - getBoostSpecBuilder().mergeFrom(value); - } else { - boostSpec_ = value; - } - } else { - boostSpecBuilder_.mergeFrom(value); - } - if (boostSpec_ != null) { - bitField0_ |= 0x00000040; + public Builder clearSuggestionTypeSpecs() { + if (suggestionTypeSpecsBuilder_ == null) { + suggestionTypeSpecs_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000100); onChanged(); + } else { + suggestionTypeSpecsBuilder_.clear(); } return this; } @@ -4760,21 +6504,21 @@ public Builder mergeBoostSpec( * * *
            -     * Optional. Specification to boost suggestions matching the condition.
            +     * Optional. Specification of each suggestion type.
                  * 
            * * - * .google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.BoostSpec boost_spec = 6 [(.google.api.field_behavior) = OPTIONAL]; + * repeated .google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.SuggestionTypeSpec suggestion_type_specs = 10 [(.google.api.field_behavior) = OPTIONAL]; * */ - public Builder clearBoostSpec() { - bitField0_ = (bitField0_ & ~0x00000040); - boostSpec_ = null; - if (boostSpecBuilder_ != null) { - boostSpecBuilder_.dispose(); - boostSpecBuilder_ = null; + public Builder removeSuggestionTypeSpecs(int index) { + if (suggestionTypeSpecsBuilder_ == null) { + ensureSuggestionTypeSpecsIsMutable(); + suggestionTypeSpecs_.remove(index); + onChanged(); + } else { + suggestionTypeSpecsBuilder_.remove(index); } - onChanged(); return this; } @@ -4782,40 +6526,37 @@ public Builder clearBoostSpec() { * * *
            -     * Optional. Specification to boost suggestions matching the condition.
            +     * Optional. Specification of each suggestion type.
                  * 
            * * - * .google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.BoostSpec boost_spec = 6 [(.google.api.field_behavior) = OPTIONAL]; + * repeated .google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.SuggestionTypeSpec suggestion_type_specs = 10 [(.google.api.field_behavior) = OPTIONAL]; * */ - public com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.BoostSpec.Builder - getBoostSpecBuilder() { - bitField0_ |= 0x00000040; - onChanged(); - return internalGetBoostSpecFieldBuilder().getBuilder(); + public com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.SuggestionTypeSpec + .Builder + getSuggestionTypeSpecsBuilder(int index) { + return internalGetSuggestionTypeSpecsFieldBuilder().getBuilder(index); } /** * * *
            -     * Optional. Specification to boost suggestions matching the condition.
            +     * Optional. Specification of each suggestion type.
                  * 
            * * - * .google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.BoostSpec boost_spec = 6 [(.google.api.field_behavior) = OPTIONAL]; + * repeated .google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.SuggestionTypeSpec suggestion_type_specs = 10 [(.google.api.field_behavior) = OPTIONAL]; * */ - public com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.BoostSpecOrBuilder - getBoostSpecOrBuilder() { - if (boostSpecBuilder_ != null) { - return boostSpecBuilder_.getMessageOrBuilder(); + public com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest + .SuggestionTypeSpecOrBuilder + getSuggestionTypeSpecsOrBuilder(int index) { + if (suggestionTypeSpecsBuilder_ == null) { + return suggestionTypeSpecs_.get(index); } else { - return boostSpec_ == null - ? com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.BoostSpec - .getDefaultInstance() - : boostSpec_; + return suggestionTypeSpecsBuilder_.getMessageOrBuilder(index); } } @@ -4823,272 +6564,245 @@ public Builder clearBoostSpec() { * * *
            -     * Optional. Specification to boost suggestions matching the condition.
            +     * Optional. Specification of each suggestion type.
                  * 
            * * - * .google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.BoostSpec boost_spec = 6 [(.google.api.field_behavior) = OPTIONAL]; + * repeated .google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.SuggestionTypeSpec suggestion_type_specs = 10 [(.google.api.field_behavior) = OPTIONAL]; * */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.BoostSpec, - com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.BoostSpec.Builder, - com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.BoostSpecOrBuilder> - internalGetBoostSpecFieldBuilder() { - if (boostSpecBuilder_ == null) { - boostSpecBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.BoostSpec, - com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.BoostSpec - .Builder, + public java.util.List< + ? extends com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest - .BoostSpecOrBuilder>(getBoostSpec(), getParentForChildren(), isClean()); - boostSpec_ = null; - } - return boostSpecBuilder_; - } - - private com.google.protobuf.Internal.IntList suggestionTypes_ = emptyIntList(); - - private void ensureSuggestionTypesIsMutable() { - if (!suggestionTypes_.isModifiable()) { - suggestionTypes_ = makeMutableCopy(suggestionTypes_); + .SuggestionTypeSpecOrBuilder> + getSuggestionTypeSpecsOrBuilderList() { + if (suggestionTypeSpecsBuilder_ != null) { + return suggestionTypeSpecsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(suggestionTypeSpecs_); } - bitField0_ |= 0x00000080; } /** * * *
            -     * Optional. Suggestion types to return. If empty or unspecified, query
            -     * suggestions are returned. Only one suggestion type is supported at the
            -     * moment.
            +     * Optional. Specification of each suggestion type.
                  * 
            * * - * repeated .google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.SuggestionType suggestion_types = 7 [(.google.api.field_behavior) = OPTIONAL]; + * repeated .google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.SuggestionTypeSpec suggestion_type_specs = 10 [(.google.api.field_behavior) = OPTIONAL]; * - * - * @return A list containing the suggestionTypes. */ - public java.util.List< - com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.SuggestionType> - getSuggestionTypesList() { - return new com.google.protobuf.Internal.IntListAdapter< - com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.SuggestionType>( - suggestionTypes_, suggestionTypes_converter_); + public com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.SuggestionTypeSpec + .Builder + addSuggestionTypeSpecsBuilder() { + return internalGetSuggestionTypeSpecsFieldBuilder() + .addBuilder( + com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest + .SuggestionTypeSpec.getDefaultInstance()); } /** * * *
            -     * Optional. Suggestion types to return. If empty or unspecified, query
            -     * suggestions are returned. Only one suggestion type is supported at the
            -     * moment.
            +     * Optional. Specification of each suggestion type.
                  * 
            * * - * repeated .google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.SuggestionType suggestion_types = 7 [(.google.api.field_behavior) = OPTIONAL]; + * repeated .google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.SuggestionTypeSpec suggestion_type_specs = 10 [(.google.api.field_behavior) = OPTIONAL]; * - * - * @return The count of suggestionTypes. */ - public int getSuggestionTypesCount() { - return suggestionTypes_.size(); + public com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.SuggestionTypeSpec + .Builder + addSuggestionTypeSpecsBuilder(int index) { + return internalGetSuggestionTypeSpecsFieldBuilder() + .addBuilder( + index, + com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest + .SuggestionTypeSpec.getDefaultInstance()); } /** * * *
            -     * Optional. Suggestion types to return. If empty or unspecified, query
            -     * suggestions are returned. Only one suggestion type is supported at the
            -     * moment.
            +     * Optional. Specification of each suggestion type.
                  * 
            * * - * repeated .google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.SuggestionType suggestion_types = 7 [(.google.api.field_behavior) = OPTIONAL]; + * repeated .google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.SuggestionTypeSpec suggestion_type_specs = 10 [(.google.api.field_behavior) = OPTIONAL]; * - * - * @param index The index of the element to return. - * @return The suggestionTypes at the given index. */ - public com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.SuggestionType - getSuggestionTypes(int index) { - return suggestionTypes_converter_.convert(suggestionTypes_.getInt(index)); + public java.util.List< + com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.SuggestionTypeSpec + .Builder> + getSuggestionTypeSpecsBuilderList() { + return internalGetSuggestionTypeSpecsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.SuggestionTypeSpec, + com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.SuggestionTypeSpec + .Builder, + com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest + .SuggestionTypeSpecOrBuilder> + internalGetSuggestionTypeSpecsFieldBuilder() { + if (suggestionTypeSpecsBuilder_ == null) { + suggestionTypeSpecsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest + .SuggestionTypeSpec, + com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest + .SuggestionTypeSpec.Builder, + com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest + .SuggestionTypeSpecOrBuilder>( + suggestionTypeSpecs_, + ((bitField0_ & 0x00000100) != 0), + getParentForChildren(), + isClean()); + suggestionTypeSpecs_ = null; + } + return suggestionTypeSpecsBuilder_; + } + + private com.google.protobuf.LazyStringArrayList experimentIds_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureExperimentIdsIsMutable() { + if (!experimentIds_.isModifiable()) { + experimentIds_ = new com.google.protobuf.LazyStringArrayList(experimentIds_); + } + bitField0_ |= 0x00000200; } /** * * *
            -     * Optional. Suggestion types to return. If empty or unspecified, query
            -     * suggestions are returned. Only one suggestion type is supported at the
            -     * moment.
            +     * Optional. Experiment ids for this request.
                  * 
            * - * - * repeated .google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.SuggestionType suggestion_types = 7 [(.google.api.field_behavior) = OPTIONAL]; - * + * repeated string experiment_ids = 14 [(.google.api.field_behavior) = OPTIONAL]; * - * @param index The index to set the value at. - * @param value The suggestionTypes to set. - * @return This builder for chaining. + * @return A list containing the experimentIds. */ - public Builder setSuggestionTypes( - int index, - com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.SuggestionType value) { - if (value == null) { - throw new NullPointerException(); - } - ensureSuggestionTypesIsMutable(); - suggestionTypes_.setInt(index, value.getNumber()); - onChanged(); - return this; + public com.google.protobuf.ProtocolStringList getExperimentIdsList() { + experimentIds_.makeImmutable(); + return experimentIds_; } /** * * *
            -     * Optional. Suggestion types to return. If empty or unspecified, query
            -     * suggestions are returned. Only one suggestion type is supported at the
            -     * moment.
            +     * Optional. Experiment ids for this request.
                  * 
            * - * - * repeated .google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.SuggestionType suggestion_types = 7 [(.google.api.field_behavior) = OPTIONAL]; - * + * repeated string experiment_ids = 14 [(.google.api.field_behavior) = OPTIONAL]; * - * @param value The suggestionTypes to add. - * @return This builder for chaining. + * @return The count of experimentIds. */ - public Builder addSuggestionTypes( - com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.SuggestionType value) { - if (value == null) { - throw new NullPointerException(); - } - ensureSuggestionTypesIsMutable(); - suggestionTypes_.addInt(value.getNumber()); - onChanged(); - return this; + public int getExperimentIdsCount() { + return experimentIds_.size(); } /** * * *
            -     * Optional. Suggestion types to return. If empty or unspecified, query
            -     * suggestions are returned. Only one suggestion type is supported at the
            -     * moment.
            +     * Optional. Experiment ids for this request.
                  * 
            * - * - * repeated .google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.SuggestionType suggestion_types = 7 [(.google.api.field_behavior) = OPTIONAL]; - * + * repeated string experiment_ids = 14 [(.google.api.field_behavior) = OPTIONAL]; * - * @param values The suggestionTypes to add. - * @return This builder for chaining. + * @param index The index of the element to return. + * @return The experimentIds at the given index. */ - public Builder addAllSuggestionTypes( - java.lang.Iterable< - ? extends - com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest - .SuggestionType> - values) { - ensureSuggestionTypesIsMutable(); - for (com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.SuggestionType - value : values) { - suggestionTypes_.addInt(value.getNumber()); - } - onChanged(); - return this; + public java.lang.String getExperimentIds(int index) { + return experimentIds_.get(index); } /** * * *
            -     * Optional. Suggestion types to return. If empty or unspecified, query
            -     * suggestions are returned. Only one suggestion type is supported at the
            -     * moment.
            +     * Optional. Experiment ids for this request.
                  * 
            * - * - * repeated .google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.SuggestionType suggestion_types = 7 [(.google.api.field_behavior) = OPTIONAL]; - * + * repeated string experiment_ids = 14 [(.google.api.field_behavior) = OPTIONAL]; * - * @return This builder for chaining. + * @param index The index of the value to return. + * @return The bytes of the experimentIds at the given index. */ - public Builder clearSuggestionTypes() { - suggestionTypes_ = emptyIntList(); - bitField0_ = (bitField0_ & ~0x00000080); - onChanged(); - return this; + public com.google.protobuf.ByteString getExperimentIdsBytes(int index) { + return experimentIds_.getByteString(index); } /** * * *
            -     * Optional. Suggestion types to return. If empty or unspecified, query
            -     * suggestions are returned. Only one suggestion type is supported at the
            -     * moment.
            +     * Optional. Experiment ids for this request.
                  * 
            * - * - * repeated .google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.SuggestionType suggestion_types = 7 [(.google.api.field_behavior) = OPTIONAL]; - * + * repeated string experiment_ids = 14 [(.google.api.field_behavior) = OPTIONAL]; * - * @return A list containing the enum numeric values on the wire for suggestionTypes. + * @param index The index to set the value at. + * @param value The experimentIds to set. + * @return This builder for chaining. */ - public java.util.List getSuggestionTypesValueList() { - suggestionTypes_.makeImmutable(); - return suggestionTypes_; + public Builder setExperimentIds(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureExperimentIdsIsMutable(); + experimentIds_.set(index, value); + bitField0_ |= 0x00000200; + onChanged(); + return this; } /** * * *
            -     * Optional. Suggestion types to return. If empty or unspecified, query
            -     * suggestions are returned. Only one suggestion type is supported at the
            -     * moment.
            +     * Optional. Experiment ids for this request.
                  * 
            * - * - * repeated .google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.SuggestionType suggestion_types = 7 [(.google.api.field_behavior) = OPTIONAL]; - * + * repeated string experiment_ids = 14 [(.google.api.field_behavior) = OPTIONAL]; * - * @param index The index of the value to return. - * @return The enum numeric value on the wire of suggestionTypes at the given index. + * @param value The experimentIds to add. + * @return This builder for chaining. */ - public int getSuggestionTypesValue(int index) { - return suggestionTypes_.getInt(index); + public Builder addExperimentIds(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureExperimentIdsIsMutable(); + experimentIds_.add(value); + bitField0_ |= 0x00000200; + onChanged(); + return this; } /** * * *
            -     * Optional. Suggestion types to return. If empty or unspecified, query
            -     * suggestions are returned. Only one suggestion type is supported at the
            -     * moment.
            +     * Optional. Experiment ids for this request.
                  * 
            * - * - * repeated .google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.SuggestionType suggestion_types = 7 [(.google.api.field_behavior) = OPTIONAL]; - * + * repeated string experiment_ids = 14 [(.google.api.field_behavior) = OPTIONAL]; * - * @param index The index to set the value at. - * @param value The enum numeric value on the wire for suggestionTypes to set. + * @param values The experimentIds to add. * @return This builder for chaining. */ - public Builder setSuggestionTypesValue(int index, int value) { - ensureSuggestionTypesIsMutable(); - suggestionTypes_.setInt(index, value); + public Builder addAllExperimentIds(java.lang.Iterable values) { + ensureExperimentIdsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, experimentIds_); + bitField0_ |= 0x00000200; onChanged(); return this; } @@ -5097,21 +6811,17 @@ public Builder setSuggestionTypesValue(int index, int value) { * * *
            -     * Optional. Suggestion types to return. If empty or unspecified, query
            -     * suggestions are returned. Only one suggestion type is supported at the
            -     * moment.
            +     * Optional. Experiment ids for this request.
                  * 
            * - * - * repeated .google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.SuggestionType suggestion_types = 7 [(.google.api.field_behavior) = OPTIONAL]; - * + * repeated string experiment_ids = 14 [(.google.api.field_behavior) = OPTIONAL]; * - * @param value The enum numeric value on the wire for suggestionTypes to add. * @return This builder for chaining. */ - public Builder addSuggestionTypesValue(int value) { - ensureSuggestionTypesIsMutable(); - suggestionTypes_.addInt(value); + public Builder clearExperimentIds() { + experimentIds_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000200); + ; onChanged(); return this; } @@ -5120,23 +6830,22 @@ public Builder addSuggestionTypesValue(int value) { * * *
            -     * Optional. Suggestion types to return. If empty or unspecified, query
            -     * suggestions are returned. Only one suggestion type is supported at the
            -     * moment.
            +     * Optional. Experiment ids for this request.
                  * 
            * - * - * repeated .google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.SuggestionType suggestion_types = 7 [(.google.api.field_behavior) = OPTIONAL]; - * + * repeated string experiment_ids = 14 [(.google.api.field_behavior) = OPTIONAL]; * - * @param values The enum numeric values on the wire for suggestionTypes to add. + * @param value The bytes of the experimentIds to add. * @return This builder for chaining. */ - public Builder addAllSuggestionTypesValue(java.lang.Iterable values) { - ensureSuggestionTypesIsMutable(); - for (int value : values) { - suggestionTypes_.addInt(value); + public Builder addExperimentIdsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); } + checkByteStringIsUtf8(value); + ensureExperimentIdsIsMutable(); + experimentIds_.add(value); + bitField0_ |= 0x00000200; onChanged(); return this; } diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/AdvancedCompleteQueryRequestOrBuilder.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/AdvancedCompleteQueryRequestOrBuilder.java index 3c8850970b2e..2a08b991bf87 100644 --- a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/AdvancedCompleteQueryRequestOrBuilder.java +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/AdvancedCompleteQueryRequestOrBuilder.java @@ -106,9 +106,9 @@ public interface AdvancedCompleteQueryRequestOrBuilder * * *
            -   * Specifies the autocomplete data model. This overrides any model specified
            -   * in the Configuration > Autocomplete section of the Cloud console. Currently
            -   * supported values:
            +   * Specifies the autocomplete query model, which only applies to the QUERY
            +   * SuggestionType. This overrides any model specified in the Configuration >
            +   * Autocomplete section of the Cloud console. Currently supported values:
                *
                * * `document` - Using suggestions generated from user-imported documents.
                * * `search-history` - Using suggestions generated from the past history of
            @@ -135,9 +135,9 @@ public interface AdvancedCompleteQueryRequestOrBuilder
                *
                *
                * 
            -   * Specifies the autocomplete data model. This overrides any model specified
            -   * in the Configuration > Autocomplete section of the Cloud console. Currently
            -   * supported values:
            +   * Specifies the autocomplete query model, which only applies to the QUERY
            +   * SuggestionType. This overrides any model specified in the Configuration >
            +   * Autocomplete section of the Cloud console. Currently supported values:
                *
                * * `document` - Using suggestions generated from user-imported documents.
                * * `search-history` - Using suggestions generated from the past history of
            @@ -164,10 +164,10 @@ public interface AdvancedCompleteQueryRequestOrBuilder
                *
                *
                * 
            -   * A unique identifier for tracking visitors. For example, this could be
            -   * implemented with an HTTP cookie, which should be able to uniquely identify
            -   * a visitor on a single device. This unique identifier should not change if
            -   * the visitor logs in or out of the website.
            +   * Optional. A unique identifier for tracking visitors. For example, this
            +   * could be implemented with an HTTP cookie, which should be able to uniquely
            +   * identify a visitor on a single device. This unique identifier should not
            +   * change if the visitor logs in or out of the website.
                *
                * This field should NOT have a fixed value such as `unknown_visitor`.
                *
            @@ -179,7 +179,7 @@ public interface AdvancedCompleteQueryRequestOrBuilder
                * The field must be a UTF-8 encoded string with a length limit of 128
                * 
            * - * string user_pseudo_id = 4; + * string user_pseudo_id = 4 [(.google.api.field_behavior) = OPTIONAL]; * * @return The userPseudoId. */ @@ -189,10 +189,10 @@ public interface AdvancedCompleteQueryRequestOrBuilder * * *
            -   * A unique identifier for tracking visitors. For example, this could be
            -   * implemented with an HTTP cookie, which should be able to uniquely identify
            -   * a visitor on a single device. This unique identifier should not change if
            -   * the visitor logs in or out of the website.
            +   * Optional. A unique identifier for tracking visitors. For example, this
            +   * could be implemented with an HTTP cookie, which should be able to uniquely
            +   * identify a visitor on a single device. This unique identifier should not
            +   * change if the visitor logs in or out of the website.
                *
                * This field should NOT have a fixed value such as `unknown_visitor`.
                *
            @@ -204,7 +204,7 @@ public interface AdvancedCompleteQueryRequestOrBuilder
                * The field must be a UTF-8 encoded string with a length limit of 128
                * 
            * - * string user_pseudo_id = 4; + * string user_pseudo_id = 4 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for userPseudoId. */ @@ -417,4 +417,131 @@ public interface AdvancedCompleteQueryRequestOrBuilder * @return The enum numeric value on the wire of suggestionTypes at the given index. */ int getSuggestionTypesValue(int index); + + /** + * + * + *
            +   * Optional. Specification of each suggestion type.
            +   * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.SuggestionTypeSpec suggestion_type_specs = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List< + com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.SuggestionTypeSpec> + getSuggestionTypeSpecsList(); + + /** + * + * + *
            +   * Optional. Specification of each suggestion type.
            +   * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.SuggestionTypeSpec suggestion_type_specs = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.SuggestionTypeSpec + getSuggestionTypeSpecs(int index); + + /** + * + * + *
            +   * Optional. Specification of each suggestion type.
            +   * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.SuggestionTypeSpec suggestion_type_specs = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + int getSuggestionTypeSpecsCount(); + + /** + * + * + *
            +   * Optional. Specification of each suggestion type.
            +   * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.SuggestionTypeSpec suggestion_type_specs = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List< + ? extends + com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest + .SuggestionTypeSpecOrBuilder> + getSuggestionTypeSpecsOrBuilderList(); + + /** + * + * + *
            +   * Optional. Specification of each suggestion type.
            +   * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.SuggestionTypeSpec suggestion_type_specs = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.SuggestionTypeSpecOrBuilder + getSuggestionTypeSpecsOrBuilder(int index); + + /** + * + * + *
            +   * Optional. Experiment ids for this request.
            +   * 
            + * + * repeated string experiment_ids = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the experimentIds. + */ + java.util.List getExperimentIdsList(); + + /** + * + * + *
            +   * Optional. Experiment ids for this request.
            +   * 
            + * + * repeated string experiment_ids = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of experimentIds. + */ + int getExperimentIdsCount(); + + /** + * + * + *
            +   * Optional. Experiment ids for this request.
            +   * 
            + * + * repeated string experiment_ids = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The experimentIds at the given index. + */ + java.lang.String getExperimentIds(int index); + + /** + * + * + *
            +   * Optional. Experiment ids for this request.
            +   * 
            + * + * repeated string experiment_ids = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the experimentIds at the given index. + */ + com.google.protobuf.ByteString getExperimentIdsBytes(int index); } diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/AdvancedCompleteQueryResponse.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/AdvancedCompleteQueryResponse.java index 276f9aec51fe..fc2ba6e7ed90 100644 --- a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/AdvancedCompleteQueryResponse.java +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/AdvancedCompleteQueryResponse.java @@ -225,6 +225,19 @@ public interface QuerySuggestionOrBuilder * @return The bytes of the dataStore at the given index. */ com.google.protobuf.ByteString getDataStoreBytes(int index); + + /** + * + * + *
            +     * The score of each suggestion. The score is in the range of [0, 1].
            +     * 
            + * + * double score = 4; + * + * @return The score. + */ + double getScore(); } /** @@ -482,6 +495,25 @@ public com.google.protobuf.ByteString getDataStoreBytes(int index) { return dataStore_.getByteString(index); } + public static final int SCORE_FIELD_NUMBER = 4; + private double score_ = 0D; + + /** + * + * + *
            +     * The score of each suggestion. The score is in the range of [0, 1].
            +     * 
            + * + * double score = 4; + * + * @return The score. + */ + @java.lang.Override + public double getScore() { + return score_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -506,6 +538,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < dataStore_.size(); i++) { com.google.protobuf.GeneratedMessage.writeString(output, 3, dataStore_.getRaw(i)); } + if (java.lang.Double.doubleToRawLongBits(score_) != 0) { + output.writeDouble(4, score_); + } getUnknownFields().writeTo(output); } @@ -534,6 +569,9 @@ public int getSerializedSize() { size += dataSize; size += 1 * getDataStoreList().size(); } + if (java.lang.Double.doubleToRawLongBits(score_) != 0) { + size += com.google.protobuf.CodedOutputStream.computeDoubleSize(4, score_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -557,6 +595,8 @@ public boolean equals(final java.lang.Object obj) { if (!getCompletableFieldPathsList().equals(other.getCompletableFieldPathsList())) return false; if (!getDataStoreList().equals(other.getDataStoreList())) return false; + if (java.lang.Double.doubleToLongBits(getScore()) + != java.lang.Double.doubleToLongBits(other.getScore())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -578,6 +618,11 @@ public int hashCode() { hash = (37 * hash) + DATA_STORE_FIELD_NUMBER; hash = (53 * hash) + getDataStoreList().hashCode(); } + hash = (37 * hash) + SCORE_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getScore())); hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -746,6 +791,7 @@ public Builder clear() { suggestion_ = ""; completableFieldPaths_ = com.google.protobuf.LazyStringArrayList.emptyList(); dataStore_ = com.google.protobuf.LazyStringArrayList.emptyList(); + score_ = 0D; return this; } @@ -802,6 +848,9 @@ private void buildPartial0( dataStore_.makeImmutable(); result.dataStore_ = dataStore_; } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.score_ = score_; + } } @java.lang.Override @@ -850,6 +899,9 @@ public Builder mergeFrom( } onChanged(); } + if (java.lang.Double.doubleToRawLongBits(other.getScore()) != 0) { + setScore(other.getScore()); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -896,6 +948,12 @@ public Builder mergeFrom( dataStore_.add(s); break; } // case 26 + case 33: + { + score_ = input.readDouble(); + bitField0_ |= 0x00000008; + break; + } // case 33 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -1420,6 +1478,62 @@ public Builder addDataStoreBytes(com.google.protobuf.ByteString value) { return this; } + private double score_; + + /** + * + * + *
            +       * The score of each suggestion. The score is in the range of [0, 1].
            +       * 
            + * + * double score = 4; + * + * @return The score. + */ + @java.lang.Override + public double getScore() { + return score_; + } + + /** + * + * + *
            +       * The score of each suggestion. The score is in the range of [0, 1].
            +       * 
            + * + * double score = 4; + * + * @param value The score to set. + * @return This builder for chaining. + */ + public Builder setScore(double value) { + + score_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
            +       * The score of each suggestion. The score is in the range of [0, 1].
            +       * 
            + * + * double score = 4; + * + * @return This builder for chaining. + */ + public Builder clearScore() { + bitField0_ = (bitField0_ & ~0x00000008); + score_ = 0D; + onChanged(); + return this; + } + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryResponse.QuerySuggestion) } @@ -1607,6 +1721,71 @@ public interface PersonSuggestionOrBuilder * @return The bytes for dataStore. */ com.google.protobuf.ByteString getDataStoreBytes(); + + /** + * + * + *
            +     * The score of each suggestion. The score is in the range of [0, 1].
            +     * 
            + * + * double score = 6; + * + * @return The score. + */ + double getScore(); + + /** + * + * + *
            +     * The photo uri of the person suggestion.
            +     * 
            + * + * string display_photo_uri = 7; + * + * @return The displayPhotoUri. + */ + java.lang.String getDisplayPhotoUri(); + + /** + * + * + *
            +     * The photo uri of the person suggestion.
            +     * 
            + * + * string display_photo_uri = 7; + * + * @return The bytes for displayPhotoUri. + */ + com.google.protobuf.ByteString getDisplayPhotoUriBytes(); + + /** + * + * + *
            +     * The destination uri of the person suggestion.
            +     * 
            + * + * string destination_uri = 8; + * + * @return The destinationUri. + */ + java.lang.String getDestinationUri(); + + /** + * + * + *
            +     * The destination uri of the person suggestion.
            +     * 
            + * + * string destination_uri = 8; + * + * @return The bytes for destinationUri. + */ + com.google.protobuf.ByteString getDestinationUriBytes(); } /** @@ -1644,6 +1823,8 @@ private PersonSuggestion() { suggestion_ = ""; personType_ = 0; dataStore_ = ""; + displayPhotoUri_ = ""; + destinationUri_ = ""; } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @@ -2048,6 +2229,131 @@ public com.google.protobuf.ByteString getDataStoreBytes() { } } + public static final int SCORE_FIELD_NUMBER = 6; + private double score_ = 0D; + + /** + * + * + *
            +     * The score of each suggestion. The score is in the range of [0, 1].
            +     * 
            + * + * double score = 6; + * + * @return The score. + */ + @java.lang.Override + public double getScore() { + return score_; + } + + public static final int DISPLAY_PHOTO_URI_FIELD_NUMBER = 7; + + @SuppressWarnings("serial") + private volatile java.lang.Object displayPhotoUri_ = ""; + + /** + * + * + *
            +     * The photo uri of the person suggestion.
            +     * 
            + * + * string display_photo_uri = 7; + * + * @return The displayPhotoUri. + */ + @java.lang.Override + public java.lang.String getDisplayPhotoUri() { + java.lang.Object ref = displayPhotoUri_; + 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(); + displayPhotoUri_ = s; + return s; + } + } + + /** + * + * + *
            +     * The photo uri of the person suggestion.
            +     * 
            + * + * string display_photo_uri = 7; + * + * @return The bytes for displayPhotoUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDisplayPhotoUriBytes() { + java.lang.Object ref = displayPhotoUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayPhotoUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DESTINATION_URI_FIELD_NUMBER = 8; + + @SuppressWarnings("serial") + private volatile java.lang.Object destinationUri_ = ""; + + /** + * + * + *
            +     * The destination uri of the person suggestion.
            +     * 
            + * + * string destination_uri = 8; + * + * @return The destinationUri. + */ + @java.lang.Override + public java.lang.String getDestinationUri() { + java.lang.Object ref = destinationUri_; + 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(); + destinationUri_ = s; + return s; + } + } + + /** + * + * + *
            +     * The destination uri of the person suggestion.
            +     * 
            + * + * string destination_uri = 8; + * + * @return The bytes for destinationUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDestinationUriBytes() { + java.lang.Object ref = destinationUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + destinationUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -2077,6 +2383,15 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessage.isStringEmpty(dataStore_)) { com.google.protobuf.GeneratedMessage.writeString(output, 5, dataStore_); } + if (java.lang.Double.doubleToRawLongBits(score_) != 0) { + output.writeDouble(6, score_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(displayPhotoUri_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 7, displayPhotoUri_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(destinationUri_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 8, destinationUri_); + } getUnknownFields().writeTo(output); } @@ -2101,6 +2416,15 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessage.isStringEmpty(dataStore_)) { size += com.google.protobuf.GeneratedMessage.computeStringSize(5, dataStore_); } + if (java.lang.Double.doubleToRawLongBits(score_) != 0) { + size += com.google.protobuf.CodedOutputStream.computeDoubleSize(6, score_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(displayPhotoUri_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(7, displayPhotoUri_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(destinationUri_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(8, destinationUri_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -2127,6 +2451,10 @@ public boolean equals(final java.lang.Object obj) { if (!getDocument().equals(other.getDocument())) return false; } if (!getDataStore().equals(other.getDataStore())) return false; + if (java.lang.Double.doubleToLongBits(getScore()) + != java.lang.Double.doubleToLongBits(other.getScore())) return false; + if (!getDisplayPhotoUri().equals(other.getDisplayPhotoUri())) return false; + if (!getDestinationUri().equals(other.getDestinationUri())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -2148,6 +2476,15 @@ public int hashCode() { } hash = (37 * hash) + DATA_STORE_FIELD_NUMBER; hash = (53 * hash) + getDataStore().hashCode(); + hash = (37 * hash) + SCORE_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getScore())); + hash = (37 * hash) + DISPLAY_PHOTO_URI_FIELD_NUMBER; + hash = (53 * hash) + getDisplayPhotoUri().hashCode(); + hash = (37 * hash) + DESTINATION_URI_FIELD_NUMBER; + hash = (53 * hash) + getDestinationUri().hashCode(); hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -2330,6 +2667,9 @@ public Builder clear() { documentBuilder_ = null; } dataStore_ = ""; + score_ = 0D; + displayPhotoUri_ = ""; + destinationUri_ = ""; return this; } @@ -2389,6 +2729,15 @@ private void buildPartial0( if (((from_bitField0_ & 0x00000008) != 0)) { result.dataStore_ = dataStore_; } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.score_ = score_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.displayPhotoUri_ = displayPhotoUri_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.destinationUri_ = destinationUri_; + } result.bitField0_ |= to_bitField0_; } @@ -2430,6 +2779,19 @@ public Builder mergeFrom( bitField0_ |= 0x00000008; onChanged(); } + if (java.lang.Double.doubleToRawLongBits(other.getScore()) != 0) { + setScore(other.getScore()); + } + if (!other.getDisplayPhotoUri().isEmpty()) { + displayPhotoUri_ = other.displayPhotoUri_; + bitField0_ |= 0x00000020; + onChanged(); + } + if (!other.getDestinationUri().isEmpty()) { + destinationUri_ = other.destinationUri_; + bitField0_ |= 0x00000040; + onChanged(); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -2481,6 +2843,24 @@ public Builder mergeFrom( bitField0_ |= 0x00000008; break; } // case 42 + case 49: + { + score_ = input.readDouble(); + bitField0_ |= 0x00000010; + break; + } // case 49 + case 58: + { + displayPhotoUri_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 58 + case 66: + { + destinationUri_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000040; + break; + } // case 66 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -3043,21 +3423,299 @@ public Builder setDataStoreBytes(com.google.protobuf.ByteString value) { return this; } - // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryResponse.PersonSuggestion) - } + private double score_; - // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryResponse.PersonSuggestion) - private static final com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryResponse - .PersonSuggestion - DEFAULT_INSTANCE; + /** + * + * + *
            +       * The score of each suggestion. The score is in the range of [0, 1].
            +       * 
            + * + * double score = 6; + * + * @return The score. + */ + @java.lang.Override + public double getScore() { + return score_; + } - static { - DEFAULT_INSTANCE = - new com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryResponse - .PersonSuggestion(); - } + /** + * + * + *
            +       * The score of each suggestion. The score is in the range of [0, 1].
            +       * 
            + * + * double score = 6; + * + * @param value The score to set. + * @return This builder for chaining. + */ + public Builder setScore(double value) { - public static com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryResponse + score_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
            +       * The score of each suggestion. The score is in the range of [0, 1].
            +       * 
            + * + * double score = 6; + * + * @return This builder for chaining. + */ + public Builder clearScore() { + bitField0_ = (bitField0_ & ~0x00000010); + score_ = 0D; + onChanged(); + return this; + } + + private java.lang.Object displayPhotoUri_ = ""; + + /** + * + * + *
            +       * The photo uri of the person suggestion.
            +       * 
            + * + * string display_photo_uri = 7; + * + * @return The displayPhotoUri. + */ + public java.lang.String getDisplayPhotoUri() { + java.lang.Object ref = displayPhotoUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayPhotoUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
            +       * The photo uri of the person suggestion.
            +       * 
            + * + * string display_photo_uri = 7; + * + * @return The bytes for displayPhotoUri. + */ + public com.google.protobuf.ByteString getDisplayPhotoUriBytes() { + java.lang.Object ref = displayPhotoUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayPhotoUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
            +       * The photo uri of the person suggestion.
            +       * 
            + * + * string display_photo_uri = 7; + * + * @param value The displayPhotoUri to set. + * @return This builder for chaining. + */ + public Builder setDisplayPhotoUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + displayPhotoUri_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
            +       * The photo uri of the person suggestion.
            +       * 
            + * + * string display_photo_uri = 7; + * + * @return This builder for chaining. + */ + public Builder clearDisplayPhotoUri() { + displayPhotoUri_ = getDefaultInstance().getDisplayPhotoUri(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; + } + + /** + * + * + *
            +       * The photo uri of the person suggestion.
            +       * 
            + * + * string display_photo_uri = 7; + * + * @param value The bytes for displayPhotoUri to set. + * @return This builder for chaining. + */ + public Builder setDisplayPhotoUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + displayPhotoUri_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + private java.lang.Object destinationUri_ = ""; + + /** + * + * + *
            +       * The destination uri of the person suggestion.
            +       * 
            + * + * string destination_uri = 8; + * + * @return The destinationUri. + */ + public java.lang.String getDestinationUri() { + java.lang.Object ref = destinationUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + destinationUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
            +       * The destination uri of the person suggestion.
            +       * 
            + * + * string destination_uri = 8; + * + * @return The bytes for destinationUri. + */ + public com.google.protobuf.ByteString getDestinationUriBytes() { + java.lang.Object ref = destinationUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + destinationUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
            +       * The destination uri of the person suggestion.
            +       * 
            + * + * string destination_uri = 8; + * + * @param value The destinationUri to set. + * @return This builder for chaining. + */ + public Builder setDestinationUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + destinationUri_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + /** + * + * + *
            +       * The destination uri of the person suggestion.
            +       * 
            + * + * string destination_uri = 8; + * + * @return This builder for chaining. + */ + public Builder clearDestinationUri() { + destinationUri_ = getDefaultInstance().getDestinationUri(); + bitField0_ = (bitField0_ & ~0x00000040); + onChanged(); + return this; + } + + /** + * + * + *
            +       * The destination uri of the person suggestion.
            +       * 
            + * + * string destination_uri = 8; + * + * @param value The bytes for destinationUri to set. + * @return This builder for chaining. + */ + public Builder setDestinationUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + destinationUri_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryResponse.PersonSuggestion) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryResponse.PersonSuggestion) + private static final com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryResponse + .PersonSuggestion + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryResponse + .PersonSuggestion(); + } + + public static com.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryResponse .PersonSuggestion getDefaultInstance() { return DEFAULT_INSTANCE; @@ -3230,6 +3888,71 @@ public interface ContentSuggestionOrBuilder * @return The bytes for dataStore. */ com.google.protobuf.ByteString getDataStoreBytes(); + + /** + * + * + *
            +     * The score of each suggestion. The score is in the range of [0, 1].
            +     * 
            + * + * double score = 6; + * + * @return The score. + */ + double getScore(); + + /** + * + * + *
            +     * The icon uri of the content suggestion.
            +     * 
            + * + * string icon_uri = 7; + * + * @return The iconUri. + */ + java.lang.String getIconUri(); + + /** + * + * + *
            +     * The icon uri of the content suggestion.
            +     * 
            + * + * string icon_uri = 7; + * + * @return The bytes for iconUri. + */ + com.google.protobuf.ByteString getIconUriBytes(); + + /** + * + * + *
            +     * The destination uri of the content suggestion.
            +     * 
            + * + * string destination_uri = 8; + * + * @return The destinationUri. + */ + java.lang.String getDestinationUri(); + + /** + * + * + *
            +     * The destination uri of the content suggestion.
            +     * 
            + * + * string destination_uri = 8; + * + * @return The bytes for destinationUri. + */ + com.google.protobuf.ByteString getDestinationUriBytes(); } /** @@ -3267,6 +3990,8 @@ private ContentSuggestion() { suggestion_ = ""; contentType_ = 0; dataStore_ = ""; + iconUri_ = ""; + destinationUri_ = ""; } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @@ -3671,15 +4396,140 @@ public com.google.protobuf.ByteString getDataStoreBytes() { } } - private byte memoizedIsInitialized = -1; + public static final int SCORE_FIELD_NUMBER = 6; + private double score_ = 0D; + /** + * + * + *
            +     * The score of each suggestion. The score is in the range of [0, 1].
            +     * 
            + * + * double score = 6; + * + * @return The score. + */ @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + public double getScore() { + return score_; + } - memoizedIsInitialized = 1; + public static final int ICON_URI_FIELD_NUMBER = 7; + + @SuppressWarnings("serial") + private volatile java.lang.Object iconUri_ = ""; + + /** + * + * + *
            +     * The icon uri of the content suggestion.
            +     * 
            + * + * string icon_uri = 7; + * + * @return The iconUri. + */ + @java.lang.Override + public java.lang.String getIconUri() { + java.lang.Object ref = iconUri_; + 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(); + iconUri_ = s; + return s; + } + } + + /** + * + * + *
            +     * The icon uri of the content suggestion.
            +     * 
            + * + * string icon_uri = 7; + * + * @return The bytes for iconUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getIconUriBytes() { + java.lang.Object ref = iconUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + iconUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DESTINATION_URI_FIELD_NUMBER = 8; + + @SuppressWarnings("serial") + private volatile java.lang.Object destinationUri_ = ""; + + /** + * + * + *
            +     * The destination uri of the content suggestion.
            +     * 
            + * + * string destination_uri = 8; + * + * @return The destinationUri. + */ + @java.lang.Override + public java.lang.String getDestinationUri() { + java.lang.Object ref = destinationUri_; + 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(); + destinationUri_ = s; + return s; + } + } + + /** + * + * + *
            +     * The destination uri of the content suggestion.
            +     * 
            + * + * string destination_uri = 8; + * + * @return The bytes for destinationUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDestinationUriBytes() { + java.lang.Object ref = destinationUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + destinationUri_ = 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; } @@ -3700,6 +4550,15 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessage.isStringEmpty(dataStore_)) { com.google.protobuf.GeneratedMessage.writeString(output, 5, dataStore_); } + if (java.lang.Double.doubleToRawLongBits(score_) != 0) { + output.writeDouble(6, score_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(iconUri_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 7, iconUri_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(destinationUri_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 8, destinationUri_); + } getUnknownFields().writeTo(output); } @@ -3724,6 +4583,15 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessage.isStringEmpty(dataStore_)) { size += com.google.protobuf.GeneratedMessage.computeStringSize(5, dataStore_); } + if (java.lang.Double.doubleToRawLongBits(score_) != 0) { + size += com.google.protobuf.CodedOutputStream.computeDoubleSize(6, score_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(iconUri_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(7, iconUri_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(destinationUri_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(8, destinationUri_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -3753,6 +4621,10 @@ public boolean equals(final java.lang.Object obj) { if (!getDocument().equals(other.getDocument())) return false; } if (!getDataStore().equals(other.getDataStore())) return false; + if (java.lang.Double.doubleToLongBits(getScore()) + != java.lang.Double.doubleToLongBits(other.getScore())) return false; + if (!getIconUri().equals(other.getIconUri())) return false; + if (!getDestinationUri().equals(other.getDestinationUri())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -3774,6 +4646,15 @@ public int hashCode() { } hash = (37 * hash) + DATA_STORE_FIELD_NUMBER; hash = (53 * hash) + getDataStore().hashCode(); + hash = (37 * hash) + SCORE_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getScore())); + hash = (37 * hash) + ICON_URI_FIELD_NUMBER; + hash = (53 * hash) + getIconUri().hashCode(); + hash = (37 * hash) + DESTINATION_URI_FIELD_NUMBER; + hash = (53 * hash) + getDestinationUri().hashCode(); hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -3956,6 +4837,9 @@ public Builder clear() { documentBuilder_ = null; } dataStore_ = ""; + score_ = 0D; + iconUri_ = ""; + destinationUri_ = ""; return this; } @@ -4015,6 +4899,15 @@ private void buildPartial0( if (((from_bitField0_ & 0x00000008) != 0)) { result.dataStore_ = dataStore_; } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.score_ = score_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.iconUri_ = iconUri_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.destinationUri_ = destinationUri_; + } result.bitField0_ |= to_bitField0_; } @@ -4056,6 +4949,19 @@ public Builder mergeFrom( bitField0_ |= 0x00000008; onChanged(); } + if (java.lang.Double.doubleToRawLongBits(other.getScore()) != 0) { + setScore(other.getScore()); + } + if (!other.getIconUri().isEmpty()) { + iconUri_ = other.iconUri_; + bitField0_ |= 0x00000020; + onChanged(); + } + if (!other.getDestinationUri().isEmpty()) { + destinationUri_ = other.destinationUri_; + bitField0_ |= 0x00000040; + onChanged(); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -4107,6 +5013,24 @@ public Builder mergeFrom( bitField0_ |= 0x00000008; break; } // case 42 + case 49: + { + score_ = input.readDouble(); + bitField0_ |= 0x00000010; + break; + } // case 49 + case 58: + { + iconUri_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 58 + case 66: + { + destinationUri_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000040; + break; + } // case 66 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -4353,144 +5277,444 @@ public Builder clearContentType() { return this; } - private com.google.cloud.discoveryengine.v1beta.Document document_; - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.discoveryengine.v1beta.Document, - com.google.cloud.discoveryengine.v1beta.Document.Builder, - com.google.cloud.discoveryengine.v1beta.DocumentOrBuilder> - documentBuilder_; + private com.google.cloud.discoveryengine.v1beta.Document document_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.Document, + com.google.cloud.discoveryengine.v1beta.Document.Builder, + com.google.cloud.discoveryengine.v1beta.DocumentOrBuilder> + documentBuilder_; + + /** + * + * + *
            +       * The document data snippet in the suggestion. Only a subset of fields will
            +       * be populated.
            +       * 
            + * + * .google.cloud.discoveryengine.v1beta.Document document = 4; + * + * @return Whether the document field is set. + */ + public boolean hasDocument() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
            +       * The document data snippet in the suggestion. Only a subset of fields will
            +       * be populated.
            +       * 
            + * + * .google.cloud.discoveryengine.v1beta.Document document = 4; + * + * @return The document. + */ + public com.google.cloud.discoveryengine.v1beta.Document getDocument() { + if (documentBuilder_ == null) { + return document_ == null + ? com.google.cloud.discoveryengine.v1beta.Document.getDefaultInstance() + : document_; + } else { + return documentBuilder_.getMessage(); + } + } + + /** + * + * + *
            +       * The document data snippet in the suggestion. Only a subset of fields will
            +       * be populated.
            +       * 
            + * + * .google.cloud.discoveryengine.v1beta.Document document = 4; + */ + public Builder setDocument(com.google.cloud.discoveryengine.v1beta.Document value) { + if (documentBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + document_ = value; + } else { + documentBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
            +       * The document data snippet in the suggestion. Only a subset of fields will
            +       * be populated.
            +       * 
            + * + * .google.cloud.discoveryengine.v1beta.Document document = 4; + */ + public Builder setDocument( + com.google.cloud.discoveryengine.v1beta.Document.Builder builderForValue) { + if (documentBuilder_ == null) { + document_ = builderForValue.build(); + } else { + documentBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
            +       * The document data snippet in the suggestion. Only a subset of fields will
            +       * be populated.
            +       * 
            + * + * .google.cloud.discoveryengine.v1beta.Document document = 4; + */ + public Builder mergeDocument(com.google.cloud.discoveryengine.v1beta.Document value) { + if (documentBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && document_ != null + && document_ + != com.google.cloud.discoveryengine.v1beta.Document.getDefaultInstance()) { + getDocumentBuilder().mergeFrom(value); + } else { + document_ = value; + } + } else { + documentBuilder_.mergeFrom(value); + } + if (document_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + + /** + * + * + *
            +       * The document data snippet in the suggestion. Only a subset of fields will
            +       * be populated.
            +       * 
            + * + * .google.cloud.discoveryengine.v1beta.Document document = 4; + */ + public Builder clearDocument() { + bitField0_ = (bitField0_ & ~0x00000004); + document_ = null; + if (documentBuilder_ != null) { + documentBuilder_.dispose(); + documentBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
            +       * The document data snippet in the suggestion. Only a subset of fields will
            +       * be populated.
            +       * 
            + * + * .google.cloud.discoveryengine.v1beta.Document document = 4; + */ + public com.google.cloud.discoveryengine.v1beta.Document.Builder getDocumentBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return internalGetDocumentFieldBuilder().getBuilder(); + } + + /** + * + * + *
            +       * The document data snippet in the suggestion. Only a subset of fields will
            +       * be populated.
            +       * 
            + * + * .google.cloud.discoveryengine.v1beta.Document document = 4; + */ + public com.google.cloud.discoveryengine.v1beta.DocumentOrBuilder getDocumentOrBuilder() { + if (documentBuilder_ != null) { + return documentBuilder_.getMessageOrBuilder(); + } else { + return document_ == null + ? com.google.cloud.discoveryengine.v1beta.Document.getDefaultInstance() + : document_; + } + } + + /** + * + * + *
            +       * The document data snippet in the suggestion. Only a subset of fields will
            +       * be populated.
            +       * 
            + * + * .google.cloud.discoveryengine.v1beta.Document document = 4; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.Document, + com.google.cloud.discoveryengine.v1beta.Document.Builder, + com.google.cloud.discoveryengine.v1beta.DocumentOrBuilder> + internalGetDocumentFieldBuilder() { + if (documentBuilder_ == null) { + documentBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.Document, + com.google.cloud.discoveryengine.v1beta.Document.Builder, + com.google.cloud.discoveryengine.v1beta.DocumentOrBuilder>( + getDocument(), getParentForChildren(), isClean()); + document_ = null; + } + return documentBuilder_; + } + + private java.lang.Object dataStore_ = ""; + + /** + * + * + *
            +       * The name of the dataStore that this suggestion belongs to.
            +       * 
            + * + * string data_store = 5 [(.google.api.resource_reference) = { ... } + * + * @return The dataStore. + */ + public java.lang.String getDataStore() { + java.lang.Object ref = dataStore_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + dataStore_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
            +       * The name of the dataStore that this suggestion belongs to.
            +       * 
            + * + * string data_store = 5 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for dataStore. + */ + public com.google.protobuf.ByteString getDataStoreBytes() { + java.lang.Object ref = dataStore_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + dataStore_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
            +       * The name of the dataStore that this suggestion belongs to.
            +       * 
            + * + * string data_store = 5 [(.google.api.resource_reference) = { ... } + * + * @param value The dataStore to set. + * @return This builder for chaining. + */ + public Builder setDataStore(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + dataStore_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
            +       * The name of the dataStore that this suggestion belongs to.
            +       * 
            + * + * string data_store = 5 [(.google.api.resource_reference) = { ... } + * + * @return This builder for chaining. + */ + public Builder clearDataStore() { + dataStore_ = getDefaultInstance().getDataStore(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + + /** + * + * + *
            +       * The name of the dataStore that this suggestion belongs to.
            +       * 
            + * + * string data_store = 5 [(.google.api.resource_reference) = { ... } + * + * @param value The bytes for dataStore to set. + * @return This builder for chaining. + */ + public Builder setDataStoreBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + dataStore_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private double score_; /** * * *
            -       * The document data snippet in the suggestion. Only a subset of fields will
            -       * be populated.
            +       * The score of each suggestion. The score is in the range of [0, 1].
                    * 
            * - * .google.cloud.discoveryengine.v1beta.Document document = 4; + * double score = 6; * - * @return Whether the document field is set. + * @return The score. */ - public boolean hasDocument() { - return ((bitField0_ & 0x00000004) != 0); + @java.lang.Override + public double getScore() { + return score_; } /** * * *
            -       * The document data snippet in the suggestion. Only a subset of fields will
            -       * be populated.
            +       * The score of each suggestion. The score is in the range of [0, 1].
                    * 
            * - * .google.cloud.discoveryengine.v1beta.Document document = 4; + * double score = 6; * - * @return The document. + * @param value The score to set. + * @return This builder for chaining. */ - public com.google.cloud.discoveryengine.v1beta.Document getDocument() { - if (documentBuilder_ == null) { - return document_ == null - ? com.google.cloud.discoveryengine.v1beta.Document.getDefaultInstance() - : document_; - } else { - return documentBuilder_.getMessage(); - } + public Builder setScore(double value) { + + score_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; } /** * * *
            -       * The document data snippet in the suggestion. Only a subset of fields will
            -       * be populated.
            +       * The score of each suggestion. The score is in the range of [0, 1].
                    * 
            * - * .google.cloud.discoveryengine.v1beta.Document document = 4; + * double score = 6; + * + * @return This builder for chaining. */ - public Builder setDocument(com.google.cloud.discoveryengine.v1beta.Document value) { - if (documentBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - document_ = value; - } else { - documentBuilder_.setMessage(value); - } - bitField0_ |= 0x00000004; + public Builder clearScore() { + bitField0_ = (bitField0_ & ~0x00000010); + score_ = 0D; onChanged(); return this; } + private java.lang.Object iconUri_ = ""; + /** * * *
            -       * The document data snippet in the suggestion. Only a subset of fields will
            -       * be populated.
            +       * The icon uri of the content suggestion.
                    * 
            * - * .google.cloud.discoveryengine.v1beta.Document document = 4; + * string icon_uri = 7; + * + * @return The iconUri. */ - public Builder setDocument( - com.google.cloud.discoveryengine.v1beta.Document.Builder builderForValue) { - if (documentBuilder_ == null) { - document_ = builderForValue.build(); + public java.lang.String getIconUri() { + java.lang.Object ref = iconUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + iconUri_ = s; + return s; } else { - documentBuilder_.setMessage(builderForValue.build()); + return (java.lang.String) ref; } - bitField0_ |= 0x00000004; - onChanged(); - return this; } /** * * *
            -       * The document data snippet in the suggestion. Only a subset of fields will
            -       * be populated.
            +       * The icon uri of the content suggestion.
                    * 
            * - * .google.cloud.discoveryengine.v1beta.Document document = 4; + * string icon_uri = 7; + * + * @return The bytes for iconUri. */ - public Builder mergeDocument(com.google.cloud.discoveryengine.v1beta.Document value) { - if (documentBuilder_ == null) { - if (((bitField0_ & 0x00000004) != 0) - && document_ != null - && document_ - != com.google.cloud.discoveryengine.v1beta.Document.getDefaultInstance()) { - getDocumentBuilder().mergeFrom(value); - } else { - document_ = value; - } + public com.google.protobuf.ByteString getIconUriBytes() { + java.lang.Object ref = iconUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + iconUri_ = b; + return b; } else { - documentBuilder_.mergeFrom(value); - } - if (document_ != null) { - bitField0_ |= 0x00000004; - onChanged(); + return (com.google.protobuf.ByteString) ref; } - return this; } /** * * *
            -       * The document data snippet in the suggestion. Only a subset of fields will
            -       * be populated.
            +       * The icon uri of the content suggestion.
                    * 
            * - * .google.cloud.discoveryengine.v1beta.Document document = 4; + * string icon_uri = 7; + * + * @param value The iconUri to set. + * @return This builder for chaining. */ - public Builder clearDocument() { - bitField0_ = (bitField0_ & ~0x00000004); - document_ = null; - if (documentBuilder_ != null) { - documentBuilder_.dispose(); - documentBuilder_ = null; + public Builder setIconUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); } + iconUri_ = value; + bitField0_ |= 0x00000020; onChanged(); return this; } @@ -4499,84 +5723,62 @@ public Builder clearDocument() { * * *
            -       * The document data snippet in the suggestion. Only a subset of fields will
            -       * be populated.
            +       * The icon uri of the content suggestion.
                    * 
            * - * .google.cloud.discoveryengine.v1beta.Document document = 4; + * string icon_uri = 7; + * + * @return This builder for chaining. */ - public com.google.cloud.discoveryengine.v1beta.Document.Builder getDocumentBuilder() { - bitField0_ |= 0x00000004; + public Builder clearIconUri() { + iconUri_ = getDefaultInstance().getIconUri(); + bitField0_ = (bitField0_ & ~0x00000020); onChanged(); - return internalGetDocumentFieldBuilder().getBuilder(); + return this; } /** * * *
            -       * The document data snippet in the suggestion. Only a subset of fields will
            -       * be populated.
            +       * The icon uri of the content suggestion.
                    * 
            * - * .google.cloud.discoveryengine.v1beta.Document document = 4; - */ - public com.google.cloud.discoveryengine.v1beta.DocumentOrBuilder getDocumentOrBuilder() { - if (documentBuilder_ != null) { - return documentBuilder_.getMessageOrBuilder(); - } else { - return document_ == null - ? com.google.cloud.discoveryengine.v1beta.Document.getDefaultInstance() - : document_; - } - } - - /** - * - * - *
            -       * The document data snippet in the suggestion. Only a subset of fields will
            -       * be populated.
            -       * 
            + * string icon_uri = 7; * - * .google.cloud.discoveryengine.v1beta.Document document = 4; + * @param value The bytes for iconUri to set. + * @return This builder for chaining. */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.discoveryengine.v1beta.Document, - com.google.cloud.discoveryengine.v1beta.Document.Builder, - com.google.cloud.discoveryengine.v1beta.DocumentOrBuilder> - internalGetDocumentFieldBuilder() { - if (documentBuilder_ == null) { - documentBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.discoveryengine.v1beta.Document, - com.google.cloud.discoveryengine.v1beta.Document.Builder, - com.google.cloud.discoveryengine.v1beta.DocumentOrBuilder>( - getDocument(), getParentForChildren(), isClean()); - document_ = null; + public Builder setIconUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); } - return documentBuilder_; + checkByteStringIsUtf8(value); + iconUri_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; } - private java.lang.Object dataStore_ = ""; + private java.lang.Object destinationUri_ = ""; /** * * *
            -       * The name of the dataStore that this suggestion belongs to.
            +       * The destination uri of the content suggestion.
                    * 
            * - * string data_store = 5 [(.google.api.resource_reference) = { ... } + * string destination_uri = 8; * - * @return The dataStore. + * @return The destinationUri. */ - public java.lang.String getDataStore() { - java.lang.Object ref = dataStore_; + public java.lang.String getDestinationUri() { + java.lang.Object ref = destinationUri_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); - dataStore_ = s; + destinationUri_ = s; return s; } else { return (java.lang.String) ref; @@ -4587,19 +5789,19 @@ public java.lang.String getDataStore() { * * *
            -       * The name of the dataStore that this suggestion belongs to.
            +       * The destination uri of the content suggestion.
                    * 
            * - * string data_store = 5 [(.google.api.resource_reference) = { ... } + * string destination_uri = 8; * - * @return The bytes for dataStore. + * @return The bytes for destinationUri. */ - public com.google.protobuf.ByteString getDataStoreBytes() { - java.lang.Object ref = dataStore_; + public com.google.protobuf.ByteString getDestinationUriBytes() { + java.lang.Object ref = destinationUri_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - dataStore_ = b; + destinationUri_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; @@ -4610,20 +5812,20 @@ public com.google.protobuf.ByteString getDataStoreBytes() { * * *
            -       * The name of the dataStore that this suggestion belongs to.
            +       * The destination uri of the content suggestion.
                    * 
            * - * string data_store = 5 [(.google.api.resource_reference) = { ... } + * string destination_uri = 8; * - * @param value The dataStore to set. + * @param value The destinationUri to set. * @return This builder for chaining. */ - public Builder setDataStore(java.lang.String value) { + public Builder setDestinationUri(java.lang.String value) { if (value == null) { throw new NullPointerException(); } - dataStore_ = value; - bitField0_ |= 0x00000008; + destinationUri_ = value; + bitField0_ |= 0x00000040; onChanged(); return this; } @@ -4632,16 +5834,16 @@ public Builder setDataStore(java.lang.String value) { * * *
            -       * The name of the dataStore that this suggestion belongs to.
            +       * The destination uri of the content suggestion.
                    * 
            * - * string data_store = 5 [(.google.api.resource_reference) = { ... } + * string destination_uri = 8; * * @return This builder for chaining. */ - public Builder clearDataStore() { - dataStore_ = getDefaultInstance().getDataStore(); - bitField0_ = (bitField0_ & ~0x00000008); + public Builder clearDestinationUri() { + destinationUri_ = getDefaultInstance().getDestinationUri(); + bitField0_ = (bitField0_ & ~0x00000040); onChanged(); return this; } @@ -4650,21 +5852,21 @@ public Builder clearDataStore() { * * *
            -       * The name of the dataStore that this suggestion belongs to.
            +       * The destination uri of the content suggestion.
                    * 
            * - * string data_store = 5 [(.google.api.resource_reference) = { ... } + * string destination_uri = 8; * - * @param value The bytes for dataStore to set. + * @param value The bytes for destinationUri to set. * @return This builder for chaining. */ - public Builder setDataStoreBytes(com.google.protobuf.ByteString value) { + public Builder setDestinationUriBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); - dataStore_ = value; - bitField0_ |= 0x00000008; + destinationUri_ = value; + bitField0_ |= 0x00000040; onChanged(); return this; } @@ -4795,6 +5997,19 @@ public interface RecentSearchSuggestionOrBuilder * .google.protobuf.Timestamp recent_search_time = 2; */ com.google.protobuf.TimestampOrBuilder getRecentSearchTimeOrBuilder(); + + /** + * + * + *
            +     * The score of each suggestion. The score is in the range of [0, 1].
            +     * 
            + * + * double score = 3; + * + * @return The score. + */ + double getScore(); } /** @@ -4956,6 +6171,25 @@ public com.google.protobuf.TimestampOrBuilder getRecentSearchTimeOrBuilder() { : recentSearchTime_; } + public static final int SCORE_FIELD_NUMBER = 3; + private double score_ = 0D; + + /** + * + * + *
            +     * The score of each suggestion. The score is in the range of [0, 1].
            +     * 
            + * + * double score = 3; + * + * @return The score. + */ + @java.lang.Override + public double getScore() { + return score_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -4976,6 +6210,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(2, getRecentSearchTime()); } + if (java.lang.Double.doubleToRawLongBits(score_) != 0) { + output.writeDouble(3, score_); + } getUnknownFields().writeTo(output); } @@ -4991,6 +6228,9 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getRecentSearchTime()); } + if (java.lang.Double.doubleToRawLongBits(score_) != 0) { + size += com.google.protobuf.CodedOutputStream.computeDoubleSize(3, score_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -5018,6 +6258,8 @@ public boolean equals(final java.lang.Object obj) { if (hasRecentSearchTime()) { if (!getRecentSearchTime().equals(other.getRecentSearchTime())) return false; } + if (java.lang.Double.doubleToLongBits(getScore()) + != java.lang.Double.doubleToLongBits(other.getScore())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -5035,6 +6277,11 @@ public int hashCode() { hash = (37 * hash) + RECENT_SEARCH_TIME_FIELD_NUMBER; hash = (53 * hash) + getRecentSearchTime().hashCode(); } + hash = (37 * hash) + SCORE_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getScore())); hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -5215,6 +6462,7 @@ public Builder clear() { recentSearchTimeBuilder_.dispose(); recentSearchTimeBuilder_ = null; } + score_ = 0D; return this; } @@ -5275,6 +6523,9 @@ private void buildPartial0( : recentSearchTimeBuilder_.build(); to_bitField0_ |= 0x00000001; } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.score_ = score_; + } result.bitField0_ |= to_bitField0_; } @@ -5309,6 +6560,9 @@ public Builder mergeFrom( if (other.hasRecentSearchTime()) { mergeRecentSearchTime(other.getRecentSearchTime()); } + if (java.lang.Double.doubleToRawLongBits(other.getScore()) != 0) { + setScore(other.getScore()); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -5348,6 +6602,12 @@ public Builder mergeFrom( bitField0_ |= 0x00000002; break; } // case 18 + case 25: + { + score_ = input.readDouble(); + bitField0_ |= 0x00000004; + break; + } // case 25 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -5672,6 +6932,62 @@ public com.google.protobuf.TimestampOrBuilder getRecentSearchTimeOrBuilder() { return recentSearchTimeBuilder_; } + private double score_; + + /** + * + * + *
            +       * The score of each suggestion. The score is in the range of [0, 1].
            +       * 
            + * + * double score = 3; + * + * @return The score. + */ + @java.lang.Override + public double getScore() { + return score_; + } + + /** + * + * + *
            +       * The score of each suggestion. The score is in the range of [0, 1].
            +       * 
            + * + * double score = 3; + * + * @param value The score to set. + * @return This builder for chaining. + */ + public Builder setScore(double value) { + + score_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
            +       * The score of each suggestion. The score is in the range of [0, 1].
            +       * 
            + * + * double score = 3; + * + * @return This builder for chaining. + */ + public Builder clearScore() { + bitField0_ = (bitField0_ & ~0x00000004); + score_ = 0D; + onChanged(); + return this; + } + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryResponse.RecentSearchSuggestion) } diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/AdvancedSiteSearchConfig.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/AdvancedSiteSearchConfig.java new file mode 100644 index 000000000000..a8cc14da76c3 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/AdvancedSiteSearchConfig.java @@ -0,0 +1,687 @@ +/* + * 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/cloud/discoveryengine/v1beta/data_store.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.discoveryengine.v1beta; + +/** + * + * + *
            + * Configuration data for advance site search.
            + * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.AdvancedSiteSearchConfig} + */ +@com.google.protobuf.Generated +public final class AdvancedSiteSearchConfig extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.AdvancedSiteSearchConfig) + AdvancedSiteSearchConfigOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "AdvancedSiteSearchConfig"); + } + + // Use AdvancedSiteSearchConfig.newBuilder() to construct. + private AdvancedSiteSearchConfig(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private AdvancedSiteSearchConfig() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.DataStoreProto + .internal_static_google_cloud_discoveryengine_v1beta_AdvancedSiteSearchConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.DataStoreProto + .internal_static_google_cloud_discoveryengine_v1beta_AdvancedSiteSearchConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.AdvancedSiteSearchConfig.class, + com.google.cloud.discoveryengine.v1beta.AdvancedSiteSearchConfig.Builder.class); + } + + private int bitField0_; + public static final int DISABLE_INITIAL_INDEX_FIELD_NUMBER = 3; + private boolean disableInitialIndex_ = false; + + /** + * + * + *
            +   * If set true, initial indexing is disabled for the DataStore.
            +   * 
            + * + * optional bool disable_initial_index = 3; + * + * @return Whether the disableInitialIndex field is set. + */ + @java.lang.Override + public boolean hasDisableInitialIndex() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
            +   * If set true, initial indexing is disabled for the DataStore.
            +   * 
            + * + * optional bool disable_initial_index = 3; + * + * @return The disableInitialIndex. + */ + @java.lang.Override + public boolean getDisableInitialIndex() { + return disableInitialIndex_; + } + + public static final int DISABLE_AUTOMATIC_REFRESH_FIELD_NUMBER = 4; + private boolean disableAutomaticRefresh_ = false; + + /** + * + * + *
            +   * If set true, automatic refresh is disabled for the DataStore.
            +   * 
            + * + * optional bool disable_automatic_refresh = 4; + * + * @return Whether the disableAutomaticRefresh field is set. + */ + @java.lang.Override + public boolean hasDisableAutomaticRefresh() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
            +   * If set true, automatic refresh is disabled for the DataStore.
            +   * 
            + * + * optional bool disable_automatic_refresh = 4; + * + * @return The disableAutomaticRefresh. + */ + @java.lang.Override + public boolean getDisableAutomaticRefresh() { + return disableAutomaticRefresh_; + } + + 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.writeBool(3, disableInitialIndex_); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeBool(4, disableAutomaticRefresh_); + } + 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.computeBoolSize(3, disableInitialIndex_); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(4, disableAutomaticRefresh_); + } + 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.discoveryengine.v1beta.AdvancedSiteSearchConfig)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1beta.AdvancedSiteSearchConfig other = + (com.google.cloud.discoveryengine.v1beta.AdvancedSiteSearchConfig) obj; + + if (hasDisableInitialIndex() != other.hasDisableInitialIndex()) return false; + if (hasDisableInitialIndex()) { + if (getDisableInitialIndex() != other.getDisableInitialIndex()) return false; + } + if (hasDisableAutomaticRefresh() != other.hasDisableAutomaticRefresh()) return false; + if (hasDisableAutomaticRefresh()) { + if (getDisableAutomaticRefresh() != other.getDisableAutomaticRefresh()) 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 (hasDisableInitialIndex()) { + hash = (37 * hash) + DISABLE_INITIAL_INDEX_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getDisableInitialIndex()); + } + if (hasDisableAutomaticRefresh()) { + hash = (37 * hash) + DISABLE_AUTOMATIC_REFRESH_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getDisableAutomaticRefresh()); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1beta.AdvancedSiteSearchConfig parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.AdvancedSiteSearchConfig 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.discoveryengine.v1beta.AdvancedSiteSearchConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.AdvancedSiteSearchConfig 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.discoveryengine.v1beta.AdvancedSiteSearchConfig parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.AdvancedSiteSearchConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1beta.AdvancedSiteSearchConfig parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.AdvancedSiteSearchConfig 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.discoveryengine.v1beta.AdvancedSiteSearchConfig parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.AdvancedSiteSearchConfig 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.discoveryengine.v1beta.AdvancedSiteSearchConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.AdvancedSiteSearchConfig 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.discoveryengine.v1beta.AdvancedSiteSearchConfig 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; + } + + /** + * + * + *
            +   * Configuration data for advance site search.
            +   * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.AdvancedSiteSearchConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.AdvancedSiteSearchConfig) + com.google.cloud.discoveryengine.v1beta.AdvancedSiteSearchConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.DataStoreProto + .internal_static_google_cloud_discoveryengine_v1beta_AdvancedSiteSearchConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.DataStoreProto + .internal_static_google_cloud_discoveryengine_v1beta_AdvancedSiteSearchConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.AdvancedSiteSearchConfig.class, + com.google.cloud.discoveryengine.v1beta.AdvancedSiteSearchConfig.Builder.class); + } + + // Construct using com.google.cloud.discoveryengine.v1beta.AdvancedSiteSearchConfig.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + disableInitialIndex_ = false; + disableAutomaticRefresh_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1beta.DataStoreProto + .internal_static_google_cloud_discoveryengine_v1beta_AdvancedSiteSearchConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AdvancedSiteSearchConfig + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1beta.AdvancedSiteSearchConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AdvancedSiteSearchConfig build() { + com.google.cloud.discoveryengine.v1beta.AdvancedSiteSearchConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AdvancedSiteSearchConfig buildPartial() { + com.google.cloud.discoveryengine.v1beta.AdvancedSiteSearchConfig result = + new com.google.cloud.discoveryengine.v1beta.AdvancedSiteSearchConfig(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.discoveryengine.v1beta.AdvancedSiteSearchConfig result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.disableInitialIndex_ = disableInitialIndex_; + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.disableAutomaticRefresh_ = disableAutomaticRefresh_; + to_bitField0_ |= 0x00000002; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.discoveryengine.v1beta.AdvancedSiteSearchConfig) { + return mergeFrom((com.google.cloud.discoveryengine.v1beta.AdvancedSiteSearchConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1beta.AdvancedSiteSearchConfig other) { + if (other + == com.google.cloud.discoveryengine.v1beta.AdvancedSiteSearchConfig.getDefaultInstance()) + return this; + if (other.hasDisableInitialIndex()) { + setDisableInitialIndex(other.getDisableInitialIndex()); + } + if (other.hasDisableAutomaticRefresh()) { + setDisableAutomaticRefresh(other.getDisableAutomaticRefresh()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 24: + { + disableInitialIndex_ = input.readBool(); + bitField0_ |= 0x00000001; + break; + } // case 24 + case 32: + { + disableAutomaticRefresh_ = input.readBool(); + bitField0_ |= 0x00000002; + break; + } // case 32 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private boolean disableInitialIndex_; + + /** + * + * + *
            +     * If set true, initial indexing is disabled for the DataStore.
            +     * 
            + * + * optional bool disable_initial_index = 3; + * + * @return Whether the disableInitialIndex field is set. + */ + @java.lang.Override + public boolean hasDisableInitialIndex() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
            +     * If set true, initial indexing is disabled for the DataStore.
            +     * 
            + * + * optional bool disable_initial_index = 3; + * + * @return The disableInitialIndex. + */ + @java.lang.Override + public boolean getDisableInitialIndex() { + return disableInitialIndex_; + } + + /** + * + * + *
            +     * If set true, initial indexing is disabled for the DataStore.
            +     * 
            + * + * optional bool disable_initial_index = 3; + * + * @param value The disableInitialIndex to set. + * @return This builder for chaining. + */ + public Builder setDisableInitialIndex(boolean value) { + + disableInitialIndex_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
            +     * If set true, initial indexing is disabled for the DataStore.
            +     * 
            + * + * optional bool disable_initial_index = 3; + * + * @return This builder for chaining. + */ + public Builder clearDisableInitialIndex() { + bitField0_ = (bitField0_ & ~0x00000001); + disableInitialIndex_ = false; + onChanged(); + return this; + } + + private boolean disableAutomaticRefresh_; + + /** + * + * + *
            +     * If set true, automatic refresh is disabled for the DataStore.
            +     * 
            + * + * optional bool disable_automatic_refresh = 4; + * + * @return Whether the disableAutomaticRefresh field is set. + */ + @java.lang.Override + public boolean hasDisableAutomaticRefresh() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
            +     * If set true, automatic refresh is disabled for the DataStore.
            +     * 
            + * + * optional bool disable_automatic_refresh = 4; + * + * @return The disableAutomaticRefresh. + */ + @java.lang.Override + public boolean getDisableAutomaticRefresh() { + return disableAutomaticRefresh_; + } + + /** + * + * + *
            +     * If set true, automatic refresh is disabled for the DataStore.
            +     * 
            + * + * optional bool disable_automatic_refresh = 4; + * + * @param value The disableAutomaticRefresh to set. + * @return This builder for chaining. + */ + public Builder setDisableAutomaticRefresh(boolean value) { + + disableAutomaticRefresh_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
            +     * If set true, automatic refresh is disabled for the DataStore.
            +     * 
            + * + * optional bool disable_automatic_refresh = 4; + * + * @return This builder for chaining. + */ + public Builder clearDisableAutomaticRefresh() { + bitField0_ = (bitField0_ & ~0x00000002); + disableAutomaticRefresh_ = false; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.AdvancedSiteSearchConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.AdvancedSiteSearchConfig) + private static final com.google.cloud.discoveryengine.v1beta.AdvancedSiteSearchConfig + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.discoveryengine.v1beta.AdvancedSiteSearchConfig(); + } + + public static com.google.cloud.discoveryengine.v1beta.AdvancedSiteSearchConfig + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AdvancedSiteSearchConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AdvancedSiteSearchConfig + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/AdvancedSiteSearchConfigOrBuilder.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/AdvancedSiteSearchConfigOrBuilder.java new file mode 100644 index 000000000000..f8eb758b1f9a --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/AdvancedSiteSearchConfigOrBuilder.java @@ -0,0 +1,80 @@ +/* + * 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/cloud/discoveryengine/v1beta/data_store.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.discoveryengine.v1beta; + +@com.google.protobuf.Generated +public interface AdvancedSiteSearchConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.AdvancedSiteSearchConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
            +   * If set true, initial indexing is disabled for the DataStore.
            +   * 
            + * + * optional bool disable_initial_index = 3; + * + * @return Whether the disableInitialIndex field is set. + */ + boolean hasDisableInitialIndex(); + + /** + * + * + *
            +   * If set true, initial indexing is disabled for the DataStore.
            +   * 
            + * + * optional bool disable_initial_index = 3; + * + * @return The disableInitialIndex. + */ + boolean getDisableInitialIndex(); + + /** + * + * + *
            +   * If set true, automatic refresh is disabled for the DataStore.
            +   * 
            + * + * optional bool disable_automatic_refresh = 4; + * + * @return Whether the disableAutomaticRefresh field is set. + */ + boolean hasDisableAutomaticRefresh(); + + /** + * + * + *
            +   * If set true, automatic refresh is disabled for the DataStore.
            +   * 
            + * + * optional bool disable_automatic_refresh = 4; + * + * @return The disableAutomaticRefresh. + */ + boolean getDisableAutomaticRefresh(); +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/AgentGatewaySetting.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/AgentGatewaySetting.java new file mode 100644 index 000000000000..73a69c0d6c08 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/AgentGatewaySetting.java @@ -0,0 +1,1494 @@ +/* + * 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/cloud/discoveryengine/v1beta/agent_gateway_setting.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.discoveryengine.v1beta; + +/** + * + * + *
            + * Agent Gateway setting, which may be attached to Gemini Enterprise resources
            + * for egress control of Gemini Enterprise agents to agents and tools outside of
            + * Gemini Enterprise.
            + * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.AgentGatewaySetting} + */ +@com.google.protobuf.Generated +public final class AgentGatewaySetting extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.AgentGatewaySetting) + AgentGatewaySettingOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "AgentGatewaySetting"); + } + + // Use AgentGatewaySetting.newBuilder() to construct. + private AgentGatewaySetting(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private AgentGatewaySetting() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.AgentGatewaySettingProto + .internal_static_google_cloud_discoveryengine_v1beta_AgentGatewaySetting_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.AgentGatewaySettingProto + .internal_static_google_cloud_discoveryengine_v1beta_AgentGatewaySetting_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.AgentGatewaySetting.class, + com.google.cloud.discoveryengine.v1beta.AgentGatewaySetting.Builder.class); + } + + public interface AgentGatewayReferenceOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.AgentGatewaySetting.AgentGatewayReference) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
            +     * Required. Immutable. The resource name of the agent gateway.
            +     *
            +     * Expected format:
            +     * `projects/{project_number}/locations/{location}/agentGateways/{agent_gateway}`.
            +     * 
            + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
            +     * Required. Immutable. The resource name of the agent gateway.
            +     *
            +     * Expected format:
            +     * `projects/{project_number}/locations/{location}/agentGateways/{agent_gateway}`.
            +     * 
            + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + } + + /** + * + * + *
            +   * Reference to an Agent Gateway resource.
            +   * 
            + * + * Protobuf type {@code + * google.cloud.discoveryengine.v1beta.AgentGatewaySetting.AgentGatewayReference} + */ + public static final class AgentGatewayReference extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.AgentGatewaySetting.AgentGatewayReference) + AgentGatewayReferenceOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "AgentGatewayReference"); + } + + // Use AgentGatewayReference.newBuilder() to construct. + private AgentGatewayReference(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private AgentGatewayReference() { + name_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.AgentGatewaySettingProto + .internal_static_google_cloud_discoveryengine_v1beta_AgentGatewaySetting_AgentGatewayReference_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.AgentGatewaySettingProto + .internal_static_google_cloud_discoveryengine_v1beta_AgentGatewaySetting_AgentGatewayReference_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.AgentGatewaySetting.AgentGatewayReference + .class, + com.google.cloud.discoveryengine.v1beta.AgentGatewaySetting.AgentGatewayReference + .Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
            +     * Required. Immutable. The resource name of the agent gateway.
            +     *
            +     * Expected format:
            +     * `projects/{project_number}/locations/{location}/agentGateways/{agent_gateway}`.
            +     * 
            + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + 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(); + name_ = s; + return s; + } + } + + /** + * + * + *
            +     * Required. Immutable. The resource name of the agent gateway.
            +     *
            +     * Expected format:
            +     * `projects/{project_number}/locations/{location}/agentGateways/{agent_gateway}`.
            +     * 
            + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = 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 { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + 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(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + 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.discoveryengine.v1beta.AgentGatewaySetting.AgentGatewayReference)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1beta.AgentGatewaySetting.AgentGatewayReference other = + (com.google.cloud.discoveryengine.v1beta.AgentGatewaySetting.AgentGatewayReference) obj; + + if (!getName().equals(other.getName())) 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) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1beta.AgentGatewaySetting.AgentGatewayReference + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.AgentGatewaySetting.AgentGatewayReference + 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.discoveryengine.v1beta.AgentGatewaySetting.AgentGatewayReference + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.AgentGatewaySetting.AgentGatewayReference + 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.discoveryengine.v1beta.AgentGatewaySetting.AgentGatewayReference + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.AgentGatewaySetting.AgentGatewayReference + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1beta.AgentGatewaySetting.AgentGatewayReference + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.AgentGatewaySetting.AgentGatewayReference + 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.discoveryengine.v1beta.AgentGatewaySetting.AgentGatewayReference + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.AgentGatewaySetting.AgentGatewayReference + 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.discoveryengine.v1beta.AgentGatewaySetting.AgentGatewayReference + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.AgentGatewaySetting.AgentGatewayReference + 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.discoveryengine.v1beta.AgentGatewaySetting.AgentGatewayReference + 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; + } + + /** + * + * + *
            +     * Reference to an Agent Gateway resource.
            +     * 
            + * + * Protobuf type {@code + * google.cloud.discoveryengine.v1beta.AgentGatewaySetting.AgentGatewayReference} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.AgentGatewaySetting.AgentGatewayReference) + com.google.cloud.discoveryengine.v1beta.AgentGatewaySetting.AgentGatewayReferenceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.AgentGatewaySettingProto + .internal_static_google_cloud_discoveryengine_v1beta_AgentGatewaySetting_AgentGatewayReference_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.AgentGatewaySettingProto + .internal_static_google_cloud_discoveryengine_v1beta_AgentGatewaySetting_AgentGatewayReference_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.AgentGatewaySetting.AgentGatewayReference + .class, + com.google.cloud.discoveryengine.v1beta.AgentGatewaySetting.AgentGatewayReference + .Builder.class); + } + + // Construct using + // com.google.cloud.discoveryengine.v1beta.AgentGatewaySetting.AgentGatewayReference.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1beta.AgentGatewaySettingProto + .internal_static_google_cloud_discoveryengine_v1beta_AgentGatewaySetting_AgentGatewayReference_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AgentGatewaySetting.AgentGatewayReference + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1beta.AgentGatewaySetting.AgentGatewayReference + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AgentGatewaySetting.AgentGatewayReference + build() { + com.google.cloud.discoveryengine.v1beta.AgentGatewaySetting.AgentGatewayReference result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AgentGatewaySetting.AgentGatewayReference + buildPartial() { + com.google.cloud.discoveryengine.v1beta.AgentGatewaySetting.AgentGatewayReference result = + new com.google.cloud.discoveryengine.v1beta.AgentGatewaySetting.AgentGatewayReference( + this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.discoveryengine.v1beta.AgentGatewaySetting.AgentGatewayReference + result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.discoveryengine.v1beta.AgentGatewaySetting.AgentGatewayReference) { + return mergeFrom( + (com.google.cloud.discoveryengine.v1beta.AgentGatewaySetting.AgentGatewayReference) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1beta.AgentGatewaySetting.AgentGatewayReference other) { + if (other + == com.google.cloud.discoveryengine.v1beta.AgentGatewaySetting.AgentGatewayReference + .getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + + /** + * + * + *
            +       * Required. Immutable. The resource name of the agent gateway.
            +       *
            +       * Expected format:
            +       * `projects/{project_number}/locations/{location}/agentGateways/{agent_gateway}`.
            +       * 
            + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
            +       * Required. Immutable. The resource name of the agent gateway.
            +       *
            +       * Expected format:
            +       * `projects/{project_number}/locations/{location}/agentGateways/{agent_gateway}`.
            +       * 
            + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
            +       * Required. Immutable. The resource name of the agent gateway.
            +       *
            +       * Expected format:
            +       * `projects/{project_number}/locations/{location}/agentGateways/{agent_gateway}`.
            +       * 
            + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
            +       * Required. Immutable. The resource name of the agent gateway.
            +       *
            +       * Expected format:
            +       * `projects/{project_number}/locations/{location}/agentGateways/{agent_gateway}`.
            +       * 
            + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
            +       * Required. Immutable. The resource name of the agent gateway.
            +       *
            +       * Expected format:
            +       * `projects/{project_number}/locations/{location}/agentGateways/{agent_gateway}`.
            +       * 
            + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.AgentGatewaySetting.AgentGatewayReference) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.AgentGatewaySetting.AgentGatewayReference) + private static final com.google.cloud.discoveryengine.v1beta.AgentGatewaySetting + .AgentGatewayReference + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.discoveryengine.v1beta.AgentGatewaySetting.AgentGatewayReference(); + } + + public static com.google.cloud.discoveryengine.v1beta.AgentGatewaySetting.AgentGatewayReference + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AgentGatewayReference parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AgentGatewaySetting.AgentGatewayReference + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int bitField0_; + public static final int DEFAULT_EGRESS_AGENT_GATEWAY_FIELD_NUMBER = 1; + private com.google.cloud.discoveryengine.v1beta.AgentGatewaySetting.AgentGatewayReference + defaultEgressAgentGateway_; + + /** + * + * + *
            +   * Optional. The default egress agent gateway to use, when this setting is
            +   * applied to a Gemini Enterprise resource.
            +   *
            +   * The deployment mode must be GOOGLE_MANAGED, and the governed access path
            +   * must be AGENT_TO_ANYWHERE.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AgentGatewaySetting.AgentGatewayReference default_egress_agent_gateway = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the defaultEgressAgentGateway field is set. + */ + @java.lang.Override + public boolean hasDefaultEgressAgentGateway() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
            +   * Optional. The default egress agent gateway to use, when this setting is
            +   * applied to a Gemini Enterprise resource.
            +   *
            +   * The deployment mode must be GOOGLE_MANAGED, and the governed access path
            +   * must be AGENT_TO_ANYWHERE.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AgentGatewaySetting.AgentGatewayReference default_egress_agent_gateway = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The defaultEgressAgentGateway. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AgentGatewaySetting.AgentGatewayReference + getDefaultEgressAgentGateway() { + return defaultEgressAgentGateway_ == null + ? com.google.cloud.discoveryengine.v1beta.AgentGatewaySetting.AgentGatewayReference + .getDefaultInstance() + : defaultEgressAgentGateway_; + } + + /** + * + * + *
            +   * Optional. The default egress agent gateway to use, when this setting is
            +   * applied to a Gemini Enterprise resource.
            +   *
            +   * The deployment mode must be GOOGLE_MANAGED, and the governed access path
            +   * must be AGENT_TO_ANYWHERE.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AgentGatewaySetting.AgentGatewayReference default_egress_agent_gateway = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AgentGatewaySetting.AgentGatewayReferenceOrBuilder + getDefaultEgressAgentGatewayOrBuilder() { + return defaultEgressAgentGateway_ == null + ? com.google.cloud.discoveryengine.v1beta.AgentGatewaySetting.AgentGatewayReference + .getDefaultInstance() + : defaultEgressAgentGateway_; + } + + 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, getDefaultEgressAgentGateway()); + } + 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, getDefaultEgressAgentGateway()); + } + 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.discoveryengine.v1beta.AgentGatewaySetting)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1beta.AgentGatewaySetting other = + (com.google.cloud.discoveryengine.v1beta.AgentGatewaySetting) obj; + + if (hasDefaultEgressAgentGateway() != other.hasDefaultEgressAgentGateway()) return false; + if (hasDefaultEgressAgentGateway()) { + if (!getDefaultEgressAgentGateway().equals(other.getDefaultEgressAgentGateway())) + 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 (hasDefaultEgressAgentGateway()) { + hash = (37 * hash) + DEFAULT_EGRESS_AGENT_GATEWAY_FIELD_NUMBER; + hash = (53 * hash) + getDefaultEgressAgentGateway().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1beta.AgentGatewaySetting parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.AgentGatewaySetting 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.discoveryengine.v1beta.AgentGatewaySetting parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.AgentGatewaySetting 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.discoveryengine.v1beta.AgentGatewaySetting parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.AgentGatewaySetting parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1beta.AgentGatewaySetting parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.AgentGatewaySetting 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.discoveryengine.v1beta.AgentGatewaySetting parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.AgentGatewaySetting 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.discoveryengine.v1beta.AgentGatewaySetting parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.AgentGatewaySetting 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.discoveryengine.v1beta.AgentGatewaySetting 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; + } + + /** + * + * + *
            +   * Agent Gateway setting, which may be attached to Gemini Enterprise resources
            +   * for egress control of Gemini Enterprise agents to agents and tools outside of
            +   * Gemini Enterprise.
            +   * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.AgentGatewaySetting} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.AgentGatewaySetting) + com.google.cloud.discoveryengine.v1beta.AgentGatewaySettingOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.AgentGatewaySettingProto + .internal_static_google_cloud_discoveryengine_v1beta_AgentGatewaySetting_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.AgentGatewaySettingProto + .internal_static_google_cloud_discoveryengine_v1beta_AgentGatewaySetting_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.AgentGatewaySetting.class, + com.google.cloud.discoveryengine.v1beta.AgentGatewaySetting.Builder.class); + } + + // Construct using com.google.cloud.discoveryengine.v1beta.AgentGatewaySetting.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetDefaultEgressAgentGatewayFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + defaultEgressAgentGateway_ = null; + if (defaultEgressAgentGatewayBuilder_ != null) { + defaultEgressAgentGatewayBuilder_.dispose(); + defaultEgressAgentGatewayBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1beta.AgentGatewaySettingProto + .internal_static_google_cloud_discoveryengine_v1beta_AgentGatewaySetting_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AgentGatewaySetting getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1beta.AgentGatewaySetting.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AgentGatewaySetting build() { + com.google.cloud.discoveryengine.v1beta.AgentGatewaySetting result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AgentGatewaySetting buildPartial() { + com.google.cloud.discoveryengine.v1beta.AgentGatewaySetting result = + new com.google.cloud.discoveryengine.v1beta.AgentGatewaySetting(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.discoveryengine.v1beta.AgentGatewaySetting result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.defaultEgressAgentGateway_ = + defaultEgressAgentGatewayBuilder_ == null + ? defaultEgressAgentGateway_ + : defaultEgressAgentGatewayBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.discoveryengine.v1beta.AgentGatewaySetting) { + return mergeFrom((com.google.cloud.discoveryengine.v1beta.AgentGatewaySetting) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.discoveryengine.v1beta.AgentGatewaySetting other) { + if (other == com.google.cloud.discoveryengine.v1beta.AgentGatewaySetting.getDefaultInstance()) + return this; + if (other.hasDefaultEgressAgentGateway()) { + mergeDefaultEgressAgentGateway(other.getDefaultEgressAgentGateway()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage( + internalGetDefaultEgressAgentGatewayFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.cloud.discoveryengine.v1beta.AgentGatewaySetting.AgentGatewayReference + defaultEgressAgentGateway_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.AgentGatewaySetting.AgentGatewayReference, + com.google.cloud.discoveryengine.v1beta.AgentGatewaySetting.AgentGatewayReference + .Builder, + com.google.cloud.discoveryengine.v1beta.AgentGatewaySetting + .AgentGatewayReferenceOrBuilder> + defaultEgressAgentGatewayBuilder_; + + /** + * + * + *
            +     * Optional. The default egress agent gateway to use, when this setting is
            +     * applied to a Gemini Enterprise resource.
            +     *
            +     * The deployment mode must be GOOGLE_MANAGED, and the governed access path
            +     * must be AGENT_TO_ANYWHERE.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AgentGatewaySetting.AgentGatewayReference default_egress_agent_gateway = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the defaultEgressAgentGateway field is set. + */ + public boolean hasDefaultEgressAgentGateway() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
            +     * Optional. The default egress agent gateway to use, when this setting is
            +     * applied to a Gemini Enterprise resource.
            +     *
            +     * The deployment mode must be GOOGLE_MANAGED, and the governed access path
            +     * must be AGENT_TO_ANYWHERE.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AgentGatewaySetting.AgentGatewayReference default_egress_agent_gateway = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The defaultEgressAgentGateway. + */ + public com.google.cloud.discoveryengine.v1beta.AgentGatewaySetting.AgentGatewayReference + getDefaultEgressAgentGateway() { + if (defaultEgressAgentGatewayBuilder_ == null) { + return defaultEgressAgentGateway_ == null + ? com.google.cloud.discoveryengine.v1beta.AgentGatewaySetting.AgentGatewayReference + .getDefaultInstance() + : defaultEgressAgentGateway_; + } else { + return defaultEgressAgentGatewayBuilder_.getMessage(); + } + } + + /** + * + * + *
            +     * Optional. The default egress agent gateway to use, when this setting is
            +     * applied to a Gemini Enterprise resource.
            +     *
            +     * The deployment mode must be GOOGLE_MANAGED, and the governed access path
            +     * must be AGENT_TO_ANYWHERE.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AgentGatewaySetting.AgentGatewayReference default_egress_agent_gateway = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setDefaultEgressAgentGateway( + com.google.cloud.discoveryengine.v1beta.AgentGatewaySetting.AgentGatewayReference value) { + if (defaultEgressAgentGatewayBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + defaultEgressAgentGateway_ = value; + } else { + defaultEgressAgentGatewayBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Optional. The default egress agent gateway to use, when this setting is
            +     * applied to a Gemini Enterprise resource.
            +     *
            +     * The deployment mode must be GOOGLE_MANAGED, and the governed access path
            +     * must be AGENT_TO_ANYWHERE.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AgentGatewaySetting.AgentGatewayReference default_egress_agent_gateway = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setDefaultEgressAgentGateway( + com.google.cloud.discoveryengine.v1beta.AgentGatewaySetting.AgentGatewayReference.Builder + builderForValue) { + if (defaultEgressAgentGatewayBuilder_ == null) { + defaultEgressAgentGateway_ = builderForValue.build(); + } else { + defaultEgressAgentGatewayBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Optional. The default egress agent gateway to use, when this setting is
            +     * applied to a Gemini Enterprise resource.
            +     *
            +     * The deployment mode must be GOOGLE_MANAGED, and the governed access path
            +     * must be AGENT_TO_ANYWHERE.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AgentGatewaySetting.AgentGatewayReference default_egress_agent_gateway = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeDefaultEgressAgentGateway( + com.google.cloud.discoveryengine.v1beta.AgentGatewaySetting.AgentGatewayReference value) { + if (defaultEgressAgentGatewayBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && defaultEgressAgentGateway_ != null + && defaultEgressAgentGateway_ + != com.google.cloud.discoveryengine.v1beta.AgentGatewaySetting.AgentGatewayReference + .getDefaultInstance()) { + getDefaultEgressAgentGatewayBuilder().mergeFrom(value); + } else { + defaultEgressAgentGateway_ = value; + } + } else { + defaultEgressAgentGatewayBuilder_.mergeFrom(value); + } + if (defaultEgressAgentGateway_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + + /** + * + * + *
            +     * Optional. The default egress agent gateway to use, when this setting is
            +     * applied to a Gemini Enterprise resource.
            +     *
            +     * The deployment mode must be GOOGLE_MANAGED, and the governed access path
            +     * must be AGENT_TO_ANYWHERE.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AgentGatewaySetting.AgentGatewayReference default_egress_agent_gateway = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearDefaultEgressAgentGateway() { + bitField0_ = (bitField0_ & ~0x00000001); + defaultEgressAgentGateway_ = null; + if (defaultEgressAgentGatewayBuilder_ != null) { + defaultEgressAgentGatewayBuilder_.dispose(); + defaultEgressAgentGatewayBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
            +     * Optional. The default egress agent gateway to use, when this setting is
            +     * applied to a Gemini Enterprise resource.
            +     *
            +     * The deployment mode must be GOOGLE_MANAGED, and the governed access path
            +     * must be AGENT_TO_ANYWHERE.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AgentGatewaySetting.AgentGatewayReference default_egress_agent_gateway = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.discoveryengine.v1beta.AgentGatewaySetting.AgentGatewayReference.Builder + getDefaultEgressAgentGatewayBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return internalGetDefaultEgressAgentGatewayFieldBuilder().getBuilder(); + } + + /** + * + * + *
            +     * Optional. The default egress agent gateway to use, when this setting is
            +     * applied to a Gemini Enterprise resource.
            +     *
            +     * The deployment mode must be GOOGLE_MANAGED, and the governed access path
            +     * must be AGENT_TO_ANYWHERE.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AgentGatewaySetting.AgentGatewayReference default_egress_agent_gateway = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.discoveryengine.v1beta.AgentGatewaySetting + .AgentGatewayReferenceOrBuilder + getDefaultEgressAgentGatewayOrBuilder() { + if (defaultEgressAgentGatewayBuilder_ != null) { + return defaultEgressAgentGatewayBuilder_.getMessageOrBuilder(); + } else { + return defaultEgressAgentGateway_ == null + ? com.google.cloud.discoveryengine.v1beta.AgentGatewaySetting.AgentGatewayReference + .getDefaultInstance() + : defaultEgressAgentGateway_; + } + } + + /** + * + * + *
            +     * Optional. The default egress agent gateway to use, when this setting is
            +     * applied to a Gemini Enterprise resource.
            +     *
            +     * The deployment mode must be GOOGLE_MANAGED, and the governed access path
            +     * must be AGENT_TO_ANYWHERE.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AgentGatewaySetting.AgentGatewayReference default_egress_agent_gateway = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.AgentGatewaySetting.AgentGatewayReference, + com.google.cloud.discoveryengine.v1beta.AgentGatewaySetting.AgentGatewayReference + .Builder, + com.google.cloud.discoveryengine.v1beta.AgentGatewaySetting + .AgentGatewayReferenceOrBuilder> + internalGetDefaultEgressAgentGatewayFieldBuilder() { + if (defaultEgressAgentGatewayBuilder_ == null) { + defaultEgressAgentGatewayBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.AgentGatewaySetting.AgentGatewayReference, + com.google.cloud.discoveryengine.v1beta.AgentGatewaySetting.AgentGatewayReference + .Builder, + com.google.cloud.discoveryengine.v1beta.AgentGatewaySetting + .AgentGatewayReferenceOrBuilder>( + getDefaultEgressAgentGateway(), getParentForChildren(), isClean()); + defaultEgressAgentGateway_ = null; + } + return defaultEgressAgentGatewayBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.AgentGatewaySetting) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.AgentGatewaySetting) + private static final com.google.cloud.discoveryengine.v1beta.AgentGatewaySetting DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.discoveryengine.v1beta.AgentGatewaySetting(); + } + + public static com.google.cloud.discoveryengine.v1beta.AgentGatewaySetting getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AgentGatewaySetting parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AgentGatewaySetting getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/AgentGatewaySettingOrBuilder.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/AgentGatewaySettingOrBuilder.java new file mode 100644 index 000000000000..0340d817ef5e --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/AgentGatewaySettingOrBuilder.java @@ -0,0 +1,85 @@ +/* + * 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/cloud/discoveryengine/v1beta/agent_gateway_setting.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.discoveryengine.v1beta; + +@com.google.protobuf.Generated +public interface AgentGatewaySettingOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.AgentGatewaySetting) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
            +   * Optional. The default egress agent gateway to use, when this setting is
            +   * applied to a Gemini Enterprise resource.
            +   *
            +   * The deployment mode must be GOOGLE_MANAGED, and the governed access path
            +   * must be AGENT_TO_ANYWHERE.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AgentGatewaySetting.AgentGatewayReference default_egress_agent_gateway = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the defaultEgressAgentGateway field is set. + */ + boolean hasDefaultEgressAgentGateway(); + + /** + * + * + *
            +   * Optional. The default egress agent gateway to use, when this setting is
            +   * applied to a Gemini Enterprise resource.
            +   *
            +   * The deployment mode must be GOOGLE_MANAGED, and the governed access path
            +   * must be AGENT_TO_ANYWHERE.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AgentGatewaySetting.AgentGatewayReference default_egress_agent_gateway = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The defaultEgressAgentGateway. + */ + com.google.cloud.discoveryengine.v1beta.AgentGatewaySetting.AgentGatewayReference + getDefaultEgressAgentGateway(); + + /** + * + * + *
            +   * Optional. The default egress agent gateway to use, when this setting is
            +   * applied to a Gemini Enterprise resource.
            +   *
            +   * The deployment mode must be GOOGLE_MANAGED, and the governed access path
            +   * must be AGENT_TO_ANYWHERE.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AgentGatewaySetting.AgentGatewayReference default_egress_agent_gateway = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.discoveryengine.v1beta.AgentGatewaySetting.AgentGatewayReferenceOrBuilder + getDefaultEgressAgentGatewayOrBuilder(); +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/AgentGatewaySettingProto.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/AgentGatewaySettingProto.java new file mode 100644 index 000000000000..4fffb9e26b26 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/AgentGatewaySettingProto.java @@ -0,0 +1,115 @@ +/* + * 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/cloud/discoveryengine/v1beta/agent_gateway_setting.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.discoveryengine.v1beta; + +@com.google.protobuf.Generated +public final class AgentGatewaySettingProto extends com.google.protobuf.GeneratedFile { + private AgentGatewaySettingProto() {} + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "AgentGatewaySettingProto"); + } + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1beta_AgentGatewaySetting_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1beta_AgentGatewaySetting_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1beta_AgentGatewaySetting_AgentGatewayReference_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1beta_AgentGatewaySetting_AgentGatewayReference_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n?google/cloud/discoveryengine/v1beta/ag" + + "ent_gateway_setting.proto\022#google.cloud." + + "discoveryengine.v1beta\032\037google/api/field" + + "_behavior.proto\032\031google/api/resource.pro" + + "to\"\357\001\n\023AgentGatewaySetting\022y\n\034default_eg" + + "ress_agent_gateway\030\001 \001(\0132N.google.cloud." + + "discoveryengine.v1beta.AgentGatewaySetti" + + "ng.AgentGatewayReferenceB\003\340A\001\032]\n\025AgentGa" + + "tewayReference\022D\n\004name\030\001 \001(\tB6\340A\002\340A\005\372A-\n" + + "+networkservices.googleapis.com/AgentGat" + + "ewayB\237\002\n\'com.google.cloud.discoveryengin" + + "e.v1betaB\030AgentGatewaySettingProtoP\001ZQcl" + + "oud.google.com/go/discoveryengine/apiv1b" + + "eta/discoveryenginepb;discoveryenginepb\242" + + "\002\017DISCOVERYENGINE\252\002#Google.Cloud.Discove" + + "ryEngine.V1Beta\312\002#Google\\Cloud\\Discovery" + + "Engine\\V1beta\352\002&Google::Cloud::Discovery" + + "Engine::V1betab\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.ResourceProto.getDescriptor(), + }); + internal_static_google_cloud_discoveryengine_v1beta_AgentGatewaySetting_descriptor = + getDescriptor().getMessageType(0); + internal_static_google_cloud_discoveryengine_v1beta_AgentGatewaySetting_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1beta_AgentGatewaySetting_descriptor, + new java.lang.String[] { + "DefaultEgressAgentGateway", + }); + internal_static_google_cloud_discoveryengine_v1beta_AgentGatewaySetting_AgentGatewayReference_descriptor = + internal_static_google_cloud_discoveryengine_v1beta_AgentGatewaySetting_descriptor + .getNestedType(0); + internal_static_google_cloud_discoveryengine_v1beta_AgentGatewaySetting_AgentGatewayReference_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1beta_AgentGatewaySetting_AgentGatewayReference_descriptor, + new java.lang.String[] { + "Name", + }); + descriptor.resolveAllFeaturesImmutable(); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.ResourceProto.resourceReference); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/Answer.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/Answer.java index bb185cb14343..2aa0622ea5c2 100644 --- a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/Answer.java +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/Answer.java @@ -56,10 +56,13 @@ private Answer() { state_ = 0; answerText_ = ""; citations_ = java.util.Collections.emptyList(); + groundingSupports_ = java.util.Collections.emptyList(); references_ = java.util.Collections.emptyList(); + blobAttachments_ = java.util.Collections.emptyList(); relatedQuestions_ = com.google.protobuf.LazyStringArrayList.emptyList(); steps_ = java.util.Collections.emptyList(); answerSkippedReasons_ = emptyIntList(); + safetyRatings_ = java.util.Collections.emptyList(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @@ -127,6 +130,16 @@ public enum State implements com.google.protobuf.ProtocolMessageEnum { * SUCCEEDED = 3; */ SUCCEEDED(3), + /** + * + * + *
            +     * Answer generation is currently in progress.
            +     * 
            + * + * STREAMING = 4; + */ + STREAMING(4), UNRECOGNIZED(-1), ; @@ -184,6 +197,17 @@ public enum State implements com.google.protobuf.ProtocolMessageEnum { */ public static final int SUCCEEDED_VALUE = 3; + /** + * + * + *
            +     * Answer generation is currently in progress.
            +     * 
            + * + * STREAMING = 4; + */ + public static final int STREAMING_VALUE = 4; + public final int getNumber() { if (this == UNRECOGNIZED) { throw new java.lang.IllegalArgumentException( @@ -216,6 +240,8 @@ public static State forNumber(int value) { return FAILED; case 3: return SUCCEEDED; + case 4: + return STREAMING; default: return null; } @@ -401,6 +427,34 @@ public enum AnswerSkippedReason implements com.google.protobuf.ProtocolMessageEn * LOW_GROUNDED_ANSWER = 9; */ LOW_GROUNDED_ANSWER(9), + /** + * + * + *
            +     * The user defined query classification ignored case.
            +     *
            +     * Google skips the answer if the query is classified as a user defined
            +     * query classification.
            +     * 
            + * + * USER_DEFINED_CLASSIFICATION_QUERY_IGNORED = 10; + */ + USER_DEFINED_CLASSIFICATION_QUERY_IGNORED(10), + /** + * + * + *
            +     * The unhelpful answer case.
            +     *
            +     * Google skips the answer if the answer is not helpful. This can be due to
            +     * a variety of factors, including but not limited to: the query is not
            +     * answerable, the answer is not relevant to the query, or the answer is
            +     * not well-formatted.
            +     * 
            + * + * UNHELPFUL_ANSWER = 11; + */ + UNHELPFUL_ANSWER(11), UNRECOGNIZED(-1), ; @@ -546,6 +600,36 @@ public enum AnswerSkippedReason implements com.google.protobuf.ProtocolMessageEn */ public static final int LOW_GROUNDED_ANSWER_VALUE = 9; + /** + * + * + *
            +     * The user defined query classification ignored case.
            +     *
            +     * Google skips the answer if the query is classified as a user defined
            +     * query classification.
            +     * 
            + * + * USER_DEFINED_CLASSIFICATION_QUERY_IGNORED = 10; + */ + public static final int USER_DEFINED_CLASSIFICATION_QUERY_IGNORED_VALUE = 10; + + /** + * + * + *
            +     * The unhelpful answer case.
            +     *
            +     * Google skips the answer if the answer is not helpful. This can be due to
            +     * a variety of factors, including but not limited to: the query is not
            +     * answerable, the answer is not relevant to the query, or the answer is
            +     * not well-formatted.
            +     * 
            + * + * UNHELPFUL_ANSWER = 11; + */ + public static final int UNHELPFUL_ANSWER_VALUE = 11; + public final int getNumber() { if (this == UNRECOGNIZED) { throw new java.lang.IllegalArgumentException( @@ -590,6 +674,10 @@ public static AnswerSkippedReason forNumber(int value) { return NON_ANSWER_SEEKING_QUERY_IGNORED_V2; case 9: return LOW_GROUNDED_ANSWER; + case 10: + return USER_DEFINED_CLASSIFICATION_QUERY_IGNORED; + case 11: + return UNHELPFUL_ANSWER; default: return null; } @@ -656,7 +744,8 @@ public interface CitationOrBuilder * *
                  * Index indicates the start of the segment, measured in bytes (UTF-8
            -     * unicode).
            +     * unicode). If there are multi-byte characters,such as non-ASCII
            +     * characters, the index measurement is longer than the string length.
                  * 
            * * int64 start_index = 1; @@ -669,7 +758,9 @@ public interface CitationOrBuilder * * *
            -     * End of the attributed segment, exclusive.
            +     * End of the attributed segment, exclusive. Measured in bytes (UTF-8
            +     * unicode). If there are multi-byte characters,such as non-ASCII
            +     * characters, the index measurement is longer than the string length.
                  * 
            * * int64 end_index = 2; @@ -793,7 +884,8 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * *
                  * Index indicates the start of the segment, measured in bytes (UTF-8
            -     * unicode).
            +     * unicode). If there are multi-byte characters,such as non-ASCII
            +     * characters, the index measurement is longer than the string length.
                  * 
            * * int64 start_index = 1; @@ -812,7 +904,9 @@ public long getStartIndex() { * * *
            -     * End of the attributed segment, exclusive.
            +     * End of the attributed segment, exclusive. Measured in bytes (UTF-8
            +     * unicode). If there are multi-byte characters,such as non-ASCII
            +     * characters, the index measurement is longer than the string length.
                  * 
            * * int64 end_index = 2; @@ -1314,7 +1408,8 @@ public Builder mergeFrom( * *
                    * Index indicates the start of the segment, measured in bytes (UTF-8
            -       * unicode).
            +       * unicode). If there are multi-byte characters,such as non-ASCII
            +       * characters, the index measurement is longer than the string length.
                    * 
            * * int64 start_index = 1; @@ -1331,7 +1426,8 @@ public long getStartIndex() { * *
                    * Index indicates the start of the segment, measured in bytes (UTF-8
            -       * unicode).
            +       * unicode). If there are multi-byte characters,such as non-ASCII
            +       * characters, the index measurement is longer than the string length.
                    * 
            * * int64 start_index = 1; @@ -1352,7 +1448,8 @@ public Builder setStartIndex(long value) { * *
                    * Index indicates the start of the segment, measured in bytes (UTF-8
            -       * unicode).
            +       * unicode). If there are multi-byte characters,such as non-ASCII
            +       * characters, the index measurement is longer than the string length.
                    * 
            * * int64 start_index = 1; @@ -1372,7 +1469,9 @@ public Builder clearStartIndex() { * * *
            -       * End of the attributed segment, exclusive.
            +       * End of the attributed segment, exclusive. Measured in bytes (UTF-8
            +       * unicode). If there are multi-byte characters,such as non-ASCII
            +       * characters, the index measurement is longer than the string length.
                    * 
            * * int64 end_index = 2; @@ -1388,7 +1487,9 @@ public long getEndIndex() { * * *
            -       * End of the attributed segment, exclusive.
            +       * End of the attributed segment, exclusive. Measured in bytes (UTF-8
            +       * unicode). If there are multi-byte characters,such as non-ASCII
            +       * characters, the index measurement is longer than the string length.
                    * 
            * * int64 end_index = 2; @@ -1408,7 +1509,9 @@ public Builder setEndIndex(long value) { * * *
            -       * End of the attributed segment, exclusive.
            +       * End of the attributed segment, exclusive. Measured in bytes (UTF-8
            +       * unicode). If there are multi-byte characters,such as non-ASCII
            +       * characters, the index measurement is longer than the string length.
                    * 
            * * int64 end_index = 2; @@ -2492,155 +2595,185 @@ public com.google.protobuf.Parser getParserForType() { } } - public interface ReferenceOrBuilder + public interface GroundingSupportOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.Answer.Reference) + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.Answer.GroundingSupport) com.google.protobuf.MessageOrBuilder { /** * * *
            -     * Unstructured document information.
            +     * Required. Index indicates the start of the claim, measured in bytes
            +     * (UTF-8 unicode).
                  * 
            * - * - * .google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo unstructured_document_info = 1; - * + * int64 start_index = 1 [(.google.api.field_behavior) = REQUIRED]; * - * @return Whether the unstructuredDocumentInfo field is set. + * @return The startIndex. */ - boolean hasUnstructuredDocumentInfo(); + long getStartIndex(); /** * * *
            -     * Unstructured document information.
            +     * Required. End of the claim, exclusive.
                  * 
            * - * - * .google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo unstructured_document_info = 1; - * + * int64 end_index = 2 [(.google.api.field_behavior) = REQUIRED]; * - * @return The unstructuredDocumentInfo. + * @return The endIndex. */ - com.google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo - getUnstructuredDocumentInfo(); + long getEndIndex(); /** * * *
            -     * Unstructured document information.
            +     * A score in the range of [0, 1] describing how grounded is a specific
            +     * claim by the references.
            +     * Higher value means that the claim is better supported by the reference
            +     * chunks.
                  * 
            * - * - * .google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo unstructured_document_info = 1; - * + * optional double grounding_score = 3; + * + * @return Whether the groundingScore field is set. */ - com.google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfoOrBuilder - getUnstructuredDocumentInfoOrBuilder(); + boolean hasGroundingScore(); /** * * *
            -     * Chunk information.
            +     * A score in the range of [0, 1] describing how grounded is a specific
            +     * claim by the references.
            +     * Higher value means that the claim is better supported by the reference
            +     * chunks.
                  * 
            * - * .google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo chunk_info = 2; + * optional double grounding_score = 3; * - * @return Whether the chunkInfo field is set. + * @return The groundingScore. */ - boolean hasChunkInfo(); + double getGroundingScore(); /** * * *
            -     * Chunk information.
            +     * Indicates that this claim required grounding check. When the
            +     * system decided this claim didn't require attribution/grounding check,
            +     * this field is set to false. In that case, no grounding check was
            +     * done for the claim and therefore `grounding_score`, `sources` is not
            +     * returned.
                  * 
            * - * .google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo chunk_info = 2; + * optional bool grounding_check_required = 4; * - * @return The chunkInfo. + * @return Whether the groundingCheckRequired field is set. */ - com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo getChunkInfo(); + boolean hasGroundingCheckRequired(); /** * * *
            -     * Chunk information.
            +     * Indicates that this claim required grounding check. When the
            +     * system decided this claim didn't require attribution/grounding check,
            +     * this field is set to false. In that case, no grounding check was
            +     * done for the claim and therefore `grounding_score`, `sources` is not
            +     * returned.
                  * 
            * - * .google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo chunk_info = 2; + * optional bool grounding_check_required = 4; + * + * @return The groundingCheckRequired. */ - com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfoOrBuilder - getChunkInfoOrBuilder(); + boolean getGroundingCheckRequired(); /** * * *
            -     * Structured document information.
            +     * Optional. Citation sources for the claim.
                  * 
            * * - * .google.cloud.discoveryengine.v1beta.Answer.Reference.StructuredDocumentInfo structured_document_info = 3; + * repeated .google.cloud.discoveryengine.v1beta.Answer.CitationSource sources = 5 [(.google.api.field_behavior) = OPTIONAL]; * - * - * @return Whether the structuredDocumentInfo field is set. */ - boolean hasStructuredDocumentInfo(); + java.util.List getSourcesList(); /** * * *
            -     * Structured document information.
            +     * Optional. Citation sources for the claim.
                  * 
            * * - * .google.cloud.discoveryengine.v1beta.Answer.Reference.StructuredDocumentInfo structured_document_info = 3; + * repeated .google.cloud.discoveryengine.v1beta.Answer.CitationSource sources = 5 [(.google.api.field_behavior) = OPTIONAL]; * + */ + com.google.cloud.discoveryengine.v1beta.Answer.CitationSource getSources(int index); + + /** * - * @return The structuredDocumentInfo. + * + *
            +     * Optional. Citation sources for the claim.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.CitationSource sources = 5 [(.google.api.field_behavior) = OPTIONAL]; + * */ - com.google.cloud.discoveryengine.v1beta.Answer.Reference.StructuredDocumentInfo - getStructuredDocumentInfo(); + int getSourcesCount(); /** * * *
            -     * Structured document information.
            +     * Optional. Citation sources for the claim.
                  * 
            * * - * .google.cloud.discoveryengine.v1beta.Answer.Reference.StructuredDocumentInfo structured_document_info = 3; + * repeated .google.cloud.discoveryengine.v1beta.Answer.CitationSource sources = 5 [(.google.api.field_behavior) = OPTIONAL]; * */ - com.google.cloud.discoveryengine.v1beta.Answer.Reference.StructuredDocumentInfoOrBuilder - getStructuredDocumentInfoOrBuilder(); + java.util.List + getSourcesOrBuilderList(); - com.google.cloud.discoveryengine.v1beta.Answer.Reference.ContentCase getContentCase(); + /** + * + * + *
            +     * Optional. Citation sources for the claim.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.CitationSource sources = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.discoveryengine.v1beta.Answer.CitationSourceOrBuilder getSourcesOrBuilder( + int index); } /** * * *
            -   * Reference.
            +   * Grounding support for a claim in `answer_text`.
                * 
            * - * Protobuf type {@code google.cloud.discoveryengine.v1beta.Answer.Reference} + * Protobuf type {@code google.cloud.discoveryengine.v1beta.Answer.GroundingSupport} */ - public static final class Reference extends com.google.protobuf.GeneratedMessage + public static final class GroundingSupport extends com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.Answer.Reference) - ReferenceOrBuilder { + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.Answer.GroundingSupport) + GroundingSupportOrBuilder { private static final long serialVersionUID = 0L; static { @@ -2650,2462 +2783,2137 @@ public static final class Reference extends com.google.protobuf.GeneratedMessage /* minor= */ 33, /* patch= */ 2, /* suffix= */ "", - "Reference"); + "GroundingSupport"); } - // Use Reference.newBuilder() to construct. - private Reference(com.google.protobuf.GeneratedMessage.Builder builder) { + // Use GroundingSupport.newBuilder() to construct. + private GroundingSupport(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } - private Reference() {} + private GroundingSupport() { + sources_ = java.util.Collections.emptyList(); + } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.discoveryengine.v1beta.AnswerProto - .internal_static_google_cloud_discoveryengine_v1beta_Answer_Reference_descriptor; + .internal_static_google_cloud_discoveryengine_v1beta_Answer_GroundingSupport_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.discoveryengine.v1beta.AnswerProto - .internal_static_google_cloud_discoveryengine_v1beta_Answer_Reference_fieldAccessorTable + .internal_static_google_cloud_discoveryengine_v1beta_Answer_GroundingSupport_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.discoveryengine.v1beta.Answer.Reference.class, - com.google.cloud.discoveryengine.v1beta.Answer.Reference.Builder.class); + com.google.cloud.discoveryengine.v1beta.Answer.GroundingSupport.class, + com.google.cloud.discoveryengine.v1beta.Answer.GroundingSupport.Builder.class); } - public interface UnstructuredDocumentInfoOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo) - com.google.protobuf.MessageOrBuilder { + private int bitField0_; + public static final int START_INDEX_FIELD_NUMBER = 1; + private long startIndex_ = 0L; - /** - * - * - *
            -       * Document resource name.
            -       * 
            - * - * string document = 1 [(.google.api.resource_reference) = { ... } - * - * @return The document. - */ - java.lang.String getDocument(); + /** + * + * + *
            +     * Required. Index indicates the start of the claim, measured in bytes
            +     * (UTF-8 unicode).
            +     * 
            + * + * int64 start_index = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The startIndex. + */ + @java.lang.Override + public long getStartIndex() { + return startIndex_; + } - /** - * - * - *
            -       * Document resource name.
            -       * 
            - * - * string document = 1 [(.google.api.resource_reference) = { ... } - * - * @return The bytes for document. - */ - com.google.protobuf.ByteString getDocumentBytes(); + public static final int END_INDEX_FIELD_NUMBER = 2; + private long endIndex_ = 0L; - /** - * - * - *
            -       * URI for the document.
            -       * 
            - * - * string uri = 2; - * - * @return The uri. - */ - java.lang.String getUri(); + /** + * + * + *
            +     * Required. End of the claim, exclusive.
            +     * 
            + * + * int64 end_index = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The endIndex. + */ + @java.lang.Override + public long getEndIndex() { + return endIndex_; + } - /** - * - * - *
            -       * URI for the document.
            -       * 
            - * - * string uri = 2; - * - * @return The bytes for uri. - */ - com.google.protobuf.ByteString getUriBytes(); + public static final int GROUNDING_SCORE_FIELD_NUMBER = 3; + private double groundingScore_ = 0D; - /** - * - * - *
            -       * Title.
            -       * 
            - * - * string title = 3; - * - * @return The title. - */ - java.lang.String getTitle(); + /** + * + * + *
            +     * A score in the range of [0, 1] describing how grounded is a specific
            +     * claim by the references.
            +     * Higher value means that the claim is better supported by the reference
            +     * chunks.
            +     * 
            + * + * optional double grounding_score = 3; + * + * @return Whether the groundingScore field is set. + */ + @java.lang.Override + public boolean hasGroundingScore() { + return ((bitField0_ & 0x00000001) != 0); + } - /** - * - * - *
            -       * Title.
            -       * 
            - * - * string title = 3; - * - * @return The bytes for title. - */ - com.google.protobuf.ByteString getTitleBytes(); + /** + * + * + *
            +     * A score in the range of [0, 1] describing how grounded is a specific
            +     * claim by the references.
            +     * Higher value means that the claim is better supported by the reference
            +     * chunks.
            +     * 
            + * + * optional double grounding_score = 3; + * + * @return The groundingScore. + */ + @java.lang.Override + public double getGroundingScore() { + return groundingScore_; + } - /** - * - * - *
            -       * List of cited chunk contents derived from document content.
            -       * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo.ChunkContent chunk_contents = 4; - * - */ - java.util.List< - com.google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo - .ChunkContent> - getChunkContentsList(); + public static final int GROUNDING_CHECK_REQUIRED_FIELD_NUMBER = 4; + private boolean groundingCheckRequired_ = false; - /** - * - * - *
            -       * List of cited chunk contents derived from document content.
            -       * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo.ChunkContent chunk_contents = 4; - * - */ - com.google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo.ChunkContent - getChunkContents(int index); + /** + * + * + *
            +     * Indicates that this claim required grounding check. When the
            +     * system decided this claim didn't require attribution/grounding check,
            +     * this field is set to false. In that case, no grounding check was
            +     * done for the claim and therefore `grounding_score`, `sources` is not
            +     * returned.
            +     * 
            + * + * optional bool grounding_check_required = 4; + * + * @return Whether the groundingCheckRequired field is set. + */ + @java.lang.Override + public boolean hasGroundingCheckRequired() { + return ((bitField0_ & 0x00000002) != 0); + } - /** - * - * - *
            -       * List of cited chunk contents derived from document content.
            -       * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo.ChunkContent chunk_contents = 4; - * - */ - int getChunkContentsCount(); + /** + * + * + *
            +     * Indicates that this claim required grounding check. When the
            +     * system decided this claim didn't require attribution/grounding check,
            +     * this field is set to false. In that case, no grounding check was
            +     * done for the claim and therefore `grounding_score`, `sources` is not
            +     * returned.
            +     * 
            + * + * optional bool grounding_check_required = 4; + * + * @return The groundingCheckRequired. + */ + @java.lang.Override + public boolean getGroundingCheckRequired() { + return groundingCheckRequired_; + } - /** - * - * - *
            -       * List of cited chunk contents derived from document content.
            -       * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo.ChunkContent chunk_contents = 4; - * - */ - java.util.List< - ? extends - com.google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo - .ChunkContentOrBuilder> - getChunkContentsOrBuilderList(); + public static final int SOURCES_FIELD_NUMBER = 5; - /** - * - * - *
            -       * List of cited chunk contents derived from document content.
            -       * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo.ChunkContent chunk_contents = 4; - * - */ - com.google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo - .ChunkContentOrBuilder - getChunkContentsOrBuilder(int index); + @SuppressWarnings("serial") + private java.util.List sources_; - /** - * - * - *
            -       * The structured JSON metadata for the document.
            -       * It is populated from the struct data from the Chunk in search result.
            -       * 
            - * - * .google.protobuf.Struct struct_data = 5; - * - * @return Whether the structData field is set. - */ - boolean hasStructData(); + /** + * + * + *
            +     * Optional. Citation sources for the claim.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.CitationSource sources = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List + getSourcesList() { + return sources_; + } - /** - * - * - *
            -       * The structured JSON metadata for the document.
            -       * It is populated from the struct data from the Chunk in search result.
            -       * 
            - * - * .google.protobuf.Struct struct_data = 5; - * - * @return The structData. - */ - com.google.protobuf.Struct getStructData(); + /** + * + * + *
            +     * Optional. Citation sources for the claim.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.CitationSource sources = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List< + ? extends com.google.cloud.discoveryengine.v1beta.Answer.CitationSourceOrBuilder> + getSourcesOrBuilderList() { + return sources_; + } - /** - * - * - *
            -       * The structured JSON metadata for the document.
            -       * It is populated from the struct data from the Chunk in search result.
            -       * 
            - * - * .google.protobuf.Struct struct_data = 5; - */ - com.google.protobuf.StructOrBuilder getStructDataOrBuilder(); + /** + * + * + *
            +     * Optional. Citation sources for the claim.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.CitationSource sources = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public int getSourcesCount() { + return sources_.size(); } /** * * *
            -     * Unstructured document information.
            +     * Optional. Citation sources for the claim.
                  * 
            * - * Protobuf type {@code - * google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo} + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.CitationSource sources = 5 [(.google.api.field_behavior) = OPTIONAL]; + * */ - public static final class UnstructuredDocumentInfo extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo) - UnstructuredDocumentInfoOrBuilder { - private static final long serialVersionUID = 0L; + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Answer.CitationSource getSources(int index) { + return sources_.get(index); + } - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "UnstructuredDocumentInfo"); - } + /** + * + * + *
            +     * Optional. Citation sources for the claim.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.CitationSource sources = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Answer.CitationSourceOrBuilder + getSourcesOrBuilder(int index) { + return sources_.get(index); + } - // Use UnstructuredDocumentInfo.newBuilder() to construct. - private UnstructuredDocumentInfo(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } + private byte memoizedIsInitialized = -1; - private UnstructuredDocumentInfo() { - document_ = ""; - uri_ = ""; - title_ = ""; - chunkContents_ = java.util.Collections.emptyList(); - } + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.discoveryengine.v1beta.AnswerProto - .internal_static_google_cloud_discoveryengine_v1beta_Answer_Reference_UnstructuredDocumentInfo_descriptor; - } + memoizedIsInitialized = 1; + return true; + } - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.discoveryengine.v1beta.AnswerProto - .internal_static_google_cloud_discoveryengine_v1beta_Answer_Reference_UnstructuredDocumentInfo_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo - .class, - com.google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo - .Builder.class); + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (startIndex_ != 0L) { + output.writeInt64(1, startIndex_); + } + if (endIndex_ != 0L) { + output.writeInt64(2, endIndex_); } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeDouble(3, groundingScore_); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeBool(4, groundingCheckRequired_); + } + for (int i = 0; i < sources_.size(); i++) { + output.writeMessage(5, sources_.get(i)); + } + getUnknownFields().writeTo(output); + } - public interface ChunkContentOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo.ChunkContent) - com.google.protobuf.MessageOrBuilder { + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; - /** - * - * - *
            -         * Chunk textual content.
            -         * 
            - * - * string content = 1; - * - * @return The content. - */ - java.lang.String getContent(); + size = 0; + if (startIndex_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(1, startIndex_); + } + if (endIndex_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(2, endIndex_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeDoubleSize(3, groundingScore_); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(4, groundingCheckRequired_); + } + for (int i = 0; i < sources_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, sources_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } - /** - * - * - *
            -         * Chunk textual content.
            -         * 
            - * - * string content = 1; - * - * @return The bytes for content. - */ - com.google.protobuf.ByteString getContentBytes(); + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.discoveryengine.v1beta.Answer.GroundingSupport)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1beta.Answer.GroundingSupport other = + (com.google.cloud.discoveryengine.v1beta.Answer.GroundingSupport) obj; - /** - * - * - *
            -         * Page identifier.
            -         * 
            - * - * string page_identifier = 2; - * - * @return The pageIdentifier. - */ - java.lang.String getPageIdentifier(); + if (getStartIndex() != other.getStartIndex()) return false; + if (getEndIndex() != other.getEndIndex()) return false; + if (hasGroundingScore() != other.hasGroundingScore()) return false; + if (hasGroundingScore()) { + if (java.lang.Double.doubleToLongBits(getGroundingScore()) + != java.lang.Double.doubleToLongBits(other.getGroundingScore())) return false; + } + if (hasGroundingCheckRequired() != other.hasGroundingCheckRequired()) return false; + if (hasGroundingCheckRequired()) { + if (getGroundingCheckRequired() != other.getGroundingCheckRequired()) return false; + } + if (!getSourcesList().equals(other.getSourcesList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } - /** - * - * - *
            -         * Page identifier.
            -         * 
            - * - * string page_identifier = 2; - * - * @return The bytes for pageIdentifier. - */ - com.google.protobuf.ByteString getPageIdentifierBytes(); + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + START_INDEX_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getStartIndex()); + hash = (37 * hash) + END_INDEX_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getEndIndex()); + if (hasGroundingScore()) { + hash = (37 * hash) + GROUNDING_SCORE_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getGroundingScore())); + } + if (hasGroundingCheckRequired()) { + hash = (37 * hash) + GROUNDING_CHECK_REQUIRED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getGroundingCheckRequired()); + } + if (getSourcesCount() > 0) { + hash = (37 * hash) + SOURCES_FIELD_NUMBER; + hash = (53 * hash) + getSourcesList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } - /** - * - * - *
            -         * The relevance of the chunk for a given query. Values range from 0.0
            -         * (completely irrelevant) to 1.0 (completely relevant).
            -         * This value is for informational purpose only. It may change for
            -         * the same query and chunk at any time due to a model retraining or
            -         * change in implementation.
            -         * 
            - * - * optional float relevance_score = 3; - * - * @return Whether the relevanceScore field is set. - */ - boolean hasRelevanceScore(); + public static com.google.cloud.discoveryengine.v1beta.Answer.GroundingSupport parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - /** - * - * - *
            -         * The relevance of the chunk for a given query. Values range from 0.0
            -         * (completely irrelevant) to 1.0 (completely relevant).
            -         * This value is for informational purpose only. It may change for
            -         * the same query and chunk at any time due to a model retraining or
            -         * change in implementation.
            -         * 
            - * - * optional float relevance_score = 3; - * - * @return The relevanceScore. - */ - float getRelevanceScore(); - } + public static com.google.cloud.discoveryengine.v1beta.Answer.GroundingSupport parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - /** - * - * - *
            -       * Chunk content.
            -       * 
            - * - * Protobuf type {@code - * google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo.ChunkContent} - */ - public static final class ChunkContent extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo.ChunkContent) - ChunkContentOrBuilder { - private static final long serialVersionUID = 0L; + public static com.google.cloud.discoveryengine.v1beta.Answer.GroundingSupport parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "ChunkContent"); - } + public static com.google.cloud.discoveryengine.v1beta.Answer.GroundingSupport parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - // Use ChunkContent.newBuilder() to construct. - private ChunkContent(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } + public static com.google.cloud.discoveryengine.v1beta.Answer.GroundingSupport parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - private ChunkContent() { - content_ = ""; - pageIdentifier_ = ""; - } + public static com.google.cloud.discoveryengine.v1beta.Answer.GroundingSupport parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.discoveryengine.v1beta.AnswerProto - .internal_static_google_cloud_discoveryengine_v1beta_Answer_Reference_UnstructuredDocumentInfo_ChunkContent_descriptor; - } + public static com.google.cloud.discoveryengine.v1beta.Answer.GroundingSupport parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.discoveryengine.v1beta.AnswerProto - .internal_static_google_cloud_discoveryengine_v1beta_Answer_Reference_UnstructuredDocumentInfo_ChunkContent_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo - .ChunkContent.class, - com.google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo - .ChunkContent.Builder.class); - } + public static com.google.cloud.discoveryengine.v1beta.Answer.GroundingSupport parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } - private int bitField0_; - public static final int CONTENT_FIELD_NUMBER = 1; + public static com.google.cloud.discoveryengine.v1beta.Answer.GroundingSupport + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } - @SuppressWarnings("serial") - private volatile java.lang.Object content_ = ""; + public static com.google.cloud.discoveryengine.v1beta.Answer.GroundingSupport + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } - /** - * - * - *
            -         * Chunk textual content.
            -         * 
            - * - * string content = 1; - * - * @return The content. - */ - @java.lang.Override - public java.lang.String getContent() { - java.lang.Object ref = content_; - 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(); - content_ = s; - return s; - } - } + public static com.google.cloud.discoveryengine.v1beta.Answer.GroundingSupport parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } - /** - * - * - *
            -         * Chunk textual content.
            -         * 
            - * - * string content = 1; - * - * @return The bytes for content. - */ - @java.lang.Override - public com.google.protobuf.ByteString getContentBytes() { - java.lang.Object ref = content_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - content_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } + public static com.google.cloud.discoveryengine.v1beta.Answer.GroundingSupport parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } - public static final int PAGE_IDENTIFIER_FIELD_NUMBER = 2; + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } - @SuppressWarnings("serial") - private volatile java.lang.Object pageIdentifier_ = ""; + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } - /** - * - * - *
            -         * Page identifier.
            -         * 
            - * - * string page_identifier = 2; - * - * @return The pageIdentifier. - */ - @java.lang.Override - public java.lang.String getPageIdentifier() { - java.lang.Object ref = pageIdentifier_; - 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(); - pageIdentifier_ = s; - return s; - } - } + public static Builder newBuilder( + com.google.cloud.discoveryengine.v1beta.Answer.GroundingSupport prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } - /** - * - * - *
            -         * Page identifier.
            -         * 
            - * - * string page_identifier = 2; - * - * @return The bytes for pageIdentifier. - */ - @java.lang.Override - public com.google.protobuf.ByteString getPageIdentifierBytes() { - java.lang.Object ref = pageIdentifier_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - pageIdentifier_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } - public static final int RELEVANCE_SCORE_FIELD_NUMBER = 3; - private float relevanceScore_ = 0F; + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } - /** - * - * - *
            -         * The relevance of the chunk for a given query. Values range from 0.0
            -         * (completely irrelevant) to 1.0 (completely relevant).
            -         * This value is for informational purpose only. It may change for
            -         * the same query and chunk at any time due to a model retraining or
            -         * change in implementation.
            -         * 
            - * - * optional float relevance_score = 3; - * - * @return Whether the relevanceScore field is set. - */ - @java.lang.Override - public boolean hasRelevanceScore() { - return ((bitField0_ & 0x00000001) != 0); - } + /** + * + * + *
            +     * Grounding support for a claim in `answer_text`.
            +     * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.Answer.GroundingSupport} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.Answer.GroundingSupport) + com.google.cloud.discoveryengine.v1beta.Answer.GroundingSupportOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.AnswerProto + .internal_static_google_cloud_discoveryengine_v1beta_Answer_GroundingSupport_descriptor; + } - /** - * - * - *
            -         * The relevance of the chunk for a given query. Values range from 0.0
            -         * (completely irrelevant) to 1.0 (completely relevant).
            -         * This value is for informational purpose only. It may change for
            -         * the same query and chunk at any time due to a model retraining or
            -         * change in implementation.
            -         * 
            - * - * optional float relevance_score = 3; - * - * @return The relevanceScore. - */ - @java.lang.Override - public float getRelevanceScore() { - return relevanceScore_; - } + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.AnswerProto + .internal_static_google_cloud_discoveryengine_v1beta_Answer_GroundingSupport_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.Answer.GroundingSupport.class, + com.google.cloud.discoveryengine.v1beta.Answer.GroundingSupport.Builder.class); + } - private byte memoizedIsInitialized = -1; + // Construct using + // com.google.cloud.discoveryengine.v1beta.Answer.GroundingSupport.newBuilder() + private Builder() {} - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } - memoizedIsInitialized = 1; - return true; + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + startIndex_ = 0L; + endIndex_ = 0L; + groundingScore_ = 0D; + groundingCheckRequired_ = false; + if (sourcesBuilder_ == null) { + sources_ = java.util.Collections.emptyList(); + } else { + sources_ = null; + sourcesBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000010); + return this; + } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(content_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, content_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageIdentifier_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 2, pageIdentifier_); - } - if (((bitField0_ & 0x00000001) != 0)) { - output.writeFloat(3, relevanceScore_); - } - getUnknownFields().writeTo(output); + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1beta.AnswerProto + .internal_static_google_cloud_discoveryengine_v1beta_Answer_GroundingSupport_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Answer.GroundingSupport + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1beta.Answer.GroundingSupport.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Answer.GroundingSupport build() { + com.google.cloud.discoveryengine.v1beta.Answer.GroundingSupport result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); } + return result; + } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Answer.GroundingSupport buildPartial() { + com.google.cloud.discoveryengine.v1beta.Answer.GroundingSupport result = + new com.google.cloud.discoveryengine.v1beta.Answer.GroundingSupport(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } - size = 0; - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(content_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, content_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageIdentifier_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(2, pageIdentifier_); - } - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream.computeFloatSize(3, relevanceScore_); + private void buildPartialRepeatedFields( + com.google.cloud.discoveryengine.v1beta.Answer.GroundingSupport result) { + if (sourcesBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0)) { + sources_ = java.util.Collections.unmodifiableList(sources_); + bitField0_ = (bitField0_ & ~0x00000010); } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; + result.sources_ = sources_; + } else { + result.sources_ = sourcesBuilder_.build(); } + } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj - instanceof - com.google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo - .ChunkContent)) { - return super.equals(obj); - } - com.google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo - .ChunkContent - other = - (com.google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo - .ChunkContent) - obj; - - if (!getContent().equals(other.getContent())) return false; - if (!getPageIdentifier().equals(other.getPageIdentifier())) return false; - if (hasRelevanceScore() != other.hasRelevanceScore()) return false; - if (hasRelevanceScore()) { - if (java.lang.Float.floatToIntBits(getRelevanceScore()) - != java.lang.Float.floatToIntBits(other.getRelevanceScore())) 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) + CONTENT_FIELD_NUMBER; - hash = (53 * hash) + getContent().hashCode(); - hash = (37 * hash) + PAGE_IDENTIFIER_FIELD_NUMBER; - hash = (53 * hash) + getPageIdentifier().hashCode(); - if (hasRelevanceScore()) { - hash = (37 * hash) + RELEVANCE_SCORE_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits(getRelevanceScore()); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.discoveryengine.v1beta.Answer.Reference - .UnstructuredDocumentInfo.ChunkContent - parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); + private void buildPartial0( + com.google.cloud.discoveryengine.v1beta.Answer.GroundingSupport result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.startIndex_ = startIndex_; } - - public static com.google.cloud.discoveryengine.v1beta.Answer.Reference - .UnstructuredDocumentInfo.ChunkContent - parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); + if (((from_bitField0_ & 0x00000002) != 0)) { + result.endIndex_ = endIndex_; } - - public static com.google.cloud.discoveryengine.v1beta.Answer.Reference - .UnstructuredDocumentInfo.ChunkContent - parseFrom(com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.groundingScore_ = groundingScore_; + to_bitField0_ |= 0x00000001; } - - public static com.google.cloud.discoveryengine.v1beta.Answer.Reference - .UnstructuredDocumentInfo.ChunkContent - parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); + if (((from_bitField0_ & 0x00000008) != 0)) { + result.groundingCheckRequired_ = groundingCheckRequired_; + to_bitField0_ |= 0x00000002; } + result.bitField0_ |= to_bitField0_; + } - public static com.google.cloud.discoveryengine.v1beta.Answer.Reference - .UnstructuredDocumentInfo.ChunkContent - parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.discoveryengine.v1beta.Answer.GroundingSupport) { + return mergeFrom((com.google.cloud.discoveryengine.v1beta.Answer.GroundingSupport) other); + } else { + super.mergeFrom(other); + return this; } + } - public static com.google.cloud.discoveryengine.v1beta.Answer.Reference - .UnstructuredDocumentInfo.ChunkContent - parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1beta.Answer.GroundingSupport other) { + if (other + == com.google.cloud.discoveryengine.v1beta.Answer.GroundingSupport.getDefaultInstance()) + return this; + if (other.getStartIndex() != 0L) { + setStartIndex(other.getStartIndex()); } - - public static com.google.cloud.discoveryengine.v1beta.Answer.Reference - .UnstructuredDocumentInfo.ChunkContent - parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + if (other.getEndIndex() != 0L) { + setEndIndex(other.getEndIndex()); } - - public static com.google.cloud.discoveryengine.v1beta.Answer.Reference - .UnstructuredDocumentInfo.ChunkContent - parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); + if (other.hasGroundingScore()) { + setGroundingScore(other.getGroundingScore()); } - - public static com.google.cloud.discoveryengine.v1beta.Answer.Reference - .UnstructuredDocumentInfo.ChunkContent - parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + if (other.hasGroundingCheckRequired()) { + setGroundingCheckRequired(other.getGroundingCheckRequired()); } - - public static com.google.cloud.discoveryengine.v1beta.Answer.Reference - .UnstructuredDocumentInfo.ChunkContent - parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); + if (sourcesBuilder_ == null) { + if (!other.sources_.isEmpty()) { + if (sources_.isEmpty()) { + sources_ = other.sources_; + bitField0_ = (bitField0_ & ~0x00000010); + } else { + ensureSourcesIsMutable(); + sources_.addAll(other.sources_); + } + onChanged(); + } + } else { + if (!other.sources_.isEmpty()) { + if (sourcesBuilder_.isEmpty()) { + sourcesBuilder_.dispose(); + sourcesBuilder_ = null; + sources_ = other.sources_; + bitField0_ = (bitField0_ & ~0x00000010); + sourcesBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetSourcesFieldBuilder() + : null; + } else { + sourcesBuilder_.addAllMessages(other.sources_); + } + } } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } - public static com.google.cloud.discoveryengine.v1beta.Answer.Reference - .UnstructuredDocumentInfo.ChunkContent - parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } + @java.lang.Override + public final boolean isInitialized() { + return true; + } - public static com.google.cloud.discoveryengine.v1beta.Answer.Reference - .UnstructuredDocumentInfo.ChunkContent - 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 mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + startIndex_ = input.readInt64(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 16: + { + endIndex_ = input.readInt64(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 25: + { + groundingScore_ = input.readDouble(); + bitField0_ |= 0x00000004; + break; + } // case 25 + case 32: + { + groundingCheckRequired_ = input.readBool(); + bitField0_ |= 0x00000008; + break; + } // case 32 + case 42: + { + com.google.cloud.discoveryengine.v1beta.Answer.CitationSource m = + input.readMessage( + com.google.cloud.discoveryengine.v1beta.Answer.CitationSource.parser(), + extensionRegistry); + if (sourcesBuilder_ == null) { + ensureSourcesIsMutable(); + sources_.add(m); + } else { + sourcesBuilder_.addMessage(m); + } + break; + } // case 42 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } + private int bitField0_; - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } + private long startIndex_; - public static Builder newBuilder( - com.google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo - .ChunkContent - prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } + /** + * + * + *
            +       * Required. Index indicates the start of the claim, measured in bytes
            +       * (UTF-8 unicode).
            +       * 
            + * + * int64 start_index = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The startIndex. + */ + @java.lang.Override + public long getStartIndex() { + return startIndex_; + } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } + /** + * + * + *
            +       * Required. Index indicates the start of the claim, measured in bytes
            +       * (UTF-8 unicode).
            +       * 
            + * + * int64 start_index = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The startIndex to set. + * @return This builder for chaining. + */ + public Builder setStartIndex(long value) { - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } + startIndex_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } - /** - * - * - *
            -         * Chunk content.
            -         * 
            - * - * Protobuf type {@code - * google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo.ChunkContent} - */ - public static final class Builder - extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo.ChunkContent) - com.google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo - .ChunkContentOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.discoveryengine.v1beta.AnswerProto - .internal_static_google_cloud_discoveryengine_v1beta_Answer_Reference_UnstructuredDocumentInfo_ChunkContent_descriptor; - } + /** + * + * + *
            +       * Required. Index indicates the start of the claim, measured in bytes
            +       * (UTF-8 unicode).
            +       * 
            + * + * int64 start_index = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearStartIndex() { + bitField0_ = (bitField0_ & ~0x00000001); + startIndex_ = 0L; + onChanged(); + return this; + } - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.discoveryengine.v1beta.AnswerProto - .internal_static_google_cloud_discoveryengine_v1beta_Answer_Reference_UnstructuredDocumentInfo_ChunkContent_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.discoveryengine.v1beta.Answer.Reference - .UnstructuredDocumentInfo.ChunkContent.class, - com.google.cloud.discoveryengine.v1beta.Answer.Reference - .UnstructuredDocumentInfo.ChunkContent.Builder.class); - } + private long endIndex_; - // Construct using - // com.google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo.ChunkContent.newBuilder() - private Builder() {} + /** + * + * + *
            +       * Required. End of the claim, exclusive.
            +       * 
            + * + * int64 end_index = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The endIndex. + */ + @java.lang.Override + public long getEndIndex() { + return endIndex_; + } - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - } + /** + * + * + *
            +       * Required. End of the claim, exclusive.
            +       * 
            + * + * int64 end_index = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The endIndex to set. + * @return This builder for chaining. + */ + public Builder setEndIndex(long value) { - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - content_ = ""; - pageIdentifier_ = ""; - relevanceScore_ = 0F; - return this; - } + endIndex_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.discoveryengine.v1beta.AnswerProto - .internal_static_google_cloud_discoveryengine_v1beta_Answer_Reference_UnstructuredDocumentInfo_ChunkContent_descriptor; - } + /** + * + * + *
            +       * Required. End of the claim, exclusive.
            +       * 
            + * + * int64 end_index = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearEndIndex() { + bitField0_ = (bitField0_ & ~0x00000002); + endIndex_ = 0L; + onChanged(); + return this; + } - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo - .ChunkContent - getDefaultInstanceForType() { - return com.google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo - .ChunkContent.getDefaultInstance(); - } + private double groundingScore_; - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo - .ChunkContent - build() { - com.google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo - .ChunkContent - result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } + /** + * + * + *
            +       * A score in the range of [0, 1] describing how grounded is a specific
            +       * claim by the references.
            +       * Higher value means that the claim is better supported by the reference
            +       * chunks.
            +       * 
            + * + * optional double grounding_score = 3; + * + * @return Whether the groundingScore field is set. + */ + @java.lang.Override + public boolean hasGroundingScore() { + return ((bitField0_ & 0x00000004) != 0); + } - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo - .ChunkContent - buildPartial() { - com.google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo - .ChunkContent - result = - new com.google.cloud.discoveryengine.v1beta.Answer.Reference - .UnstructuredDocumentInfo.ChunkContent(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } + /** + * + * + *
            +       * A score in the range of [0, 1] describing how grounded is a specific
            +       * claim by the references.
            +       * Higher value means that the claim is better supported by the reference
            +       * chunks.
            +       * 
            + * + * optional double grounding_score = 3; + * + * @return The groundingScore. + */ + @java.lang.Override + public double getGroundingScore() { + return groundingScore_; + } - private void buildPartial0( - com.google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo - .ChunkContent - result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.content_ = content_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.pageIdentifier_ = pageIdentifier_; - } - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000004) != 0)) { - result.relevanceScore_ = relevanceScore_; - to_bitField0_ |= 0x00000001; - } - result.bitField0_ |= to_bitField0_; - } + /** + * + * + *
            +       * A score in the range of [0, 1] describing how grounded is a specific
            +       * claim by the references.
            +       * Higher value means that the claim is better supported by the reference
            +       * chunks.
            +       * 
            + * + * optional double grounding_score = 3; + * + * @param value The groundingScore to set. + * @return This builder for chaining. + */ + public Builder setGroundingScore(double value) { - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other - instanceof - com.google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo - .ChunkContent) { - return mergeFrom( - (com.google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo - .ChunkContent) - other); - } else { - super.mergeFrom(other); - return this; - } - } + groundingScore_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } - public Builder mergeFrom( - com.google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo - .ChunkContent - other) { - if (other - == com.google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo - .ChunkContent.getDefaultInstance()) return this; - if (!other.getContent().isEmpty()) { - content_ = other.content_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (!other.getPageIdentifier().isEmpty()) { - pageIdentifier_ = other.pageIdentifier_; - bitField0_ |= 0x00000002; - onChanged(); - } - if (other.hasRelevanceScore()) { - setRelevanceScore(other.getRelevanceScore()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } + /** + * + * + *
            +       * A score in the range of [0, 1] describing how grounded is a specific
            +       * claim by the references.
            +       * Higher value means that the claim is better supported by the reference
            +       * chunks.
            +       * 
            + * + * optional double grounding_score = 3; + * + * @return This builder for chaining. + */ + public Builder clearGroundingScore() { + bitField0_ = (bitField0_ & ~0x00000004); + groundingScore_ = 0D; + onChanged(); + return this; + } - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - content_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: - { - pageIdentifier_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 29: - { - relevanceScore_ = input.readFloat(); - bitField0_ |= 0x00000004; - break; - } // case 29 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } + private boolean groundingCheckRequired_; - private int bitField0_; + /** + * + * + *
            +       * Indicates that this claim required grounding check. When the
            +       * system decided this claim didn't require attribution/grounding check,
            +       * this field is set to false. In that case, no grounding check was
            +       * done for the claim and therefore `grounding_score`, `sources` is not
            +       * returned.
            +       * 
            + * + * optional bool grounding_check_required = 4; + * + * @return Whether the groundingCheckRequired field is set. + */ + @java.lang.Override + public boolean hasGroundingCheckRequired() { + return ((bitField0_ & 0x00000008) != 0); + } - private java.lang.Object content_ = ""; + /** + * + * + *
            +       * Indicates that this claim required grounding check. When the
            +       * system decided this claim didn't require attribution/grounding check,
            +       * this field is set to false. In that case, no grounding check was
            +       * done for the claim and therefore `grounding_score`, `sources` is not
            +       * returned.
            +       * 
            + * + * optional bool grounding_check_required = 4; + * + * @return The groundingCheckRequired. + */ + @java.lang.Override + public boolean getGroundingCheckRequired() { + return groundingCheckRequired_; + } - /** - * - * - *
            -           * Chunk textual content.
            -           * 
            - * - * string content = 1; - * - * @return The content. - */ - public java.lang.String getContent() { - java.lang.Object ref = content_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - content_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } + /** + * + * + *
            +       * Indicates that this claim required grounding check. When the
            +       * system decided this claim didn't require attribution/grounding check,
            +       * this field is set to false. In that case, no grounding check was
            +       * done for the claim and therefore `grounding_score`, `sources` is not
            +       * returned.
            +       * 
            + * + * optional bool grounding_check_required = 4; + * + * @param value The groundingCheckRequired to set. + * @return This builder for chaining. + */ + public Builder setGroundingCheckRequired(boolean value) { - /** - * - * - *
            -           * Chunk textual content.
            -           * 
            - * - * string content = 1; - * - * @return The bytes for content. - */ - public com.google.protobuf.ByteString getContentBytes() { - java.lang.Object ref = content_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - content_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } + groundingCheckRequired_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } - /** - * - * - *
            -           * Chunk textual content.
            -           * 
            - * - * string content = 1; - * - * @param value The content to set. - * @return This builder for chaining. - */ - public Builder setContent(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - content_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } + /** + * + * + *
            +       * Indicates that this claim required grounding check. When the
            +       * system decided this claim didn't require attribution/grounding check,
            +       * this field is set to false. In that case, no grounding check was
            +       * done for the claim and therefore `grounding_score`, `sources` is not
            +       * returned.
            +       * 
            + * + * optional bool grounding_check_required = 4; + * + * @return This builder for chaining. + */ + public Builder clearGroundingCheckRequired() { + bitField0_ = (bitField0_ & ~0x00000008); + groundingCheckRequired_ = false; + onChanged(); + return this; + } - /** - * - * - *
            -           * Chunk textual content.
            -           * 
            - * - * string content = 1; - * - * @return This builder for chaining. - */ - public Builder clearContent() { - content_ = getDefaultInstance().getContent(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } + private java.util.List + sources_ = java.util.Collections.emptyList(); - /** - * - * - *
            -           * Chunk textual content.
            -           * 
            - * - * string content = 1; - * - * @param value The bytes for content to set. - * @return This builder for chaining. - */ - public Builder setContentBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - content_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } + private void ensureSourcesIsMutable() { + if (!((bitField0_ & 0x00000010) != 0)) { + sources_ = + new java.util.ArrayList< + com.google.cloud.discoveryengine.v1beta.Answer.CitationSource>(sources_); + bitField0_ |= 0x00000010; + } + } - private java.lang.Object pageIdentifier_ = ""; + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.discoveryengine.v1beta.Answer.CitationSource, + com.google.cloud.discoveryengine.v1beta.Answer.CitationSource.Builder, + com.google.cloud.discoveryengine.v1beta.Answer.CitationSourceOrBuilder> + sourcesBuilder_; - /** - * - * - *
            -           * Page identifier.
            -           * 
            - * - * string page_identifier = 2; - * - * @return The pageIdentifier. - */ - public java.lang.String getPageIdentifier() { - java.lang.Object ref = pageIdentifier_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - pageIdentifier_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } + /** + * + * + *
            +       * Optional. Citation sources for the claim.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.CitationSource sources = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getSourcesList() { + if (sourcesBuilder_ == null) { + return java.util.Collections.unmodifiableList(sources_); + } else { + return sourcesBuilder_.getMessageList(); + } + } - /** - * - * - *
            -           * Page identifier.
            -           * 
            - * - * string page_identifier = 2; - * - * @return The bytes for pageIdentifier. - */ - public com.google.protobuf.ByteString getPageIdentifierBytes() { - java.lang.Object ref = pageIdentifier_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - pageIdentifier_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } + /** + * + * + *
            +       * Optional. Citation sources for the claim.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.CitationSource sources = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public int getSourcesCount() { + if (sourcesBuilder_ == null) { + return sources_.size(); + } else { + return sourcesBuilder_.getCount(); + } + } - /** - * - * - *
            -           * Page identifier.
            -           * 
            - * - * string page_identifier = 2; - * - * @param value The pageIdentifier to set. - * @return This builder for chaining. - */ - public Builder setPageIdentifier(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - pageIdentifier_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } + /** + * + * + *
            +       * Optional. Citation sources for the claim.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.CitationSource sources = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.discoveryengine.v1beta.Answer.CitationSource getSources(int index) { + if (sourcesBuilder_ == null) { + return sources_.get(index); + } else { + return sourcesBuilder_.getMessage(index); + } + } - /** - * - * - *
            -           * Page identifier.
            -           * 
            - * - * string page_identifier = 2; - * - * @return This builder for chaining. - */ - public Builder clearPageIdentifier() { - pageIdentifier_ = getDefaultInstance().getPageIdentifier(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; + /** + * + * + *
            +       * Optional. Citation sources for the claim.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.CitationSource sources = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setSources( + int index, com.google.cloud.discoveryengine.v1beta.Answer.CitationSource value) { + if (sourcesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); } + ensureSourcesIsMutable(); + sources_.set(index, value); + onChanged(); + } else { + sourcesBuilder_.setMessage(index, value); + } + return this; + } - /** - * - * - *
            -           * Page identifier.
            -           * 
            - * - * string page_identifier = 2; - * - * @param value The bytes for pageIdentifier to set. - * @return This builder for chaining. - */ - public Builder setPageIdentifierBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - pageIdentifier_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } + /** + * + * + *
            +       * Optional. Citation sources for the claim.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.CitationSource sources = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setSources( + int index, + com.google.cloud.discoveryengine.v1beta.Answer.CitationSource.Builder builderForValue) { + if (sourcesBuilder_ == null) { + ensureSourcesIsMutable(); + sources_.set(index, builderForValue.build()); + onChanged(); + } else { + sourcesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } - private float relevanceScore_; + /** + * + * + *
            +       * Optional. Citation sources for the claim.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.CitationSource sources = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addSources( + com.google.cloud.discoveryengine.v1beta.Answer.CitationSource value) { + if (sourcesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSourcesIsMutable(); + sources_.add(value); + onChanged(); + } else { + sourcesBuilder_.addMessage(value); + } + return this; + } - /** - * - * - *
            -           * The relevance of the chunk for a given query. Values range from 0.0
            -           * (completely irrelevant) to 1.0 (completely relevant).
            -           * This value is for informational purpose only. It may change for
            -           * the same query and chunk at any time due to a model retraining or
            -           * change in implementation.
            -           * 
            - * - * optional float relevance_score = 3; - * - * @return Whether the relevanceScore field is set. - */ - @java.lang.Override - public boolean hasRelevanceScore() { - return ((bitField0_ & 0x00000004) != 0); + /** + * + * + *
            +       * Optional. Citation sources for the claim.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.CitationSource sources = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addSources( + int index, com.google.cloud.discoveryengine.v1beta.Answer.CitationSource value) { + if (sourcesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); } + ensureSourcesIsMutable(); + sources_.add(index, value); + onChanged(); + } else { + sourcesBuilder_.addMessage(index, value); + } + return this; + } - /** - * - * - *
            -           * The relevance of the chunk for a given query. Values range from 0.0
            -           * (completely irrelevant) to 1.0 (completely relevant).
            -           * This value is for informational purpose only. It may change for
            -           * the same query and chunk at any time due to a model retraining or
            -           * change in implementation.
            -           * 
            - * - * optional float relevance_score = 3; - * - * @return The relevanceScore. - */ - @java.lang.Override - public float getRelevanceScore() { - return relevanceScore_; - } - - /** - * - * - *
            -           * The relevance of the chunk for a given query. Values range from 0.0
            -           * (completely irrelevant) to 1.0 (completely relevant).
            -           * This value is for informational purpose only. It may change for
            -           * the same query and chunk at any time due to a model retraining or
            -           * change in implementation.
            -           * 
            - * - * optional float relevance_score = 3; - * - * @param value The relevanceScore to set. - * @return This builder for chaining. - */ - public Builder setRelevanceScore(float value) { - - relevanceScore_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - - /** - * - * - *
            -           * The relevance of the chunk for a given query. Values range from 0.0
            -           * (completely irrelevant) to 1.0 (completely relevant).
            -           * This value is for informational purpose only. It may change for
            -           * the same query and chunk at any time due to a model retraining or
            -           * change in implementation.
            -           * 
            - * - * optional float relevance_score = 3; - * - * @return This builder for chaining. - */ - public Builder clearRelevanceScore() { - bitField0_ = (bitField0_ & ~0x00000004); - relevanceScore_ = 0F; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo.ChunkContent) - } - - // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo.ChunkContent) - private static final com.google.cloud.discoveryengine.v1beta.Answer.Reference - .UnstructuredDocumentInfo.ChunkContent - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = - new com.google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo - .ChunkContent(); - } - - public static com.google.cloud.discoveryengine.v1beta.Answer.Reference - .UnstructuredDocumentInfo.ChunkContent - getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ChunkContent parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException() - .setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo - .ChunkContent - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; + /** + * + * + *
            +       * Optional. Citation sources for the claim.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.CitationSource sources = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addSources( + com.google.cloud.discoveryengine.v1beta.Answer.CitationSource.Builder builderForValue) { + if (sourcesBuilder_ == null) { + ensureSourcesIsMutable(); + sources_.add(builderForValue.build()); + onChanged(); + } else { + sourcesBuilder_.addMessage(builderForValue.build()); } + return this; } - private int bitField0_; - public static final int DOCUMENT_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object document_ = ""; - /** * * *
            -       * Document resource name.
            +       * Optional. Citation sources for the claim.
                    * 
            * - * string document = 1 [(.google.api.resource_reference) = { ... } - * - * @return The document. + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.CitationSource sources = 5 [(.google.api.field_behavior) = OPTIONAL]; + * */ - @java.lang.Override - public java.lang.String getDocument() { - java.lang.Object ref = document_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; + public Builder addSources( + int index, + com.google.cloud.discoveryengine.v1beta.Answer.CitationSource.Builder builderForValue) { + if (sourcesBuilder_ == null) { + ensureSourcesIsMutable(); + sources_.add(index, builderForValue.build()); + onChanged(); } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - document_ = s; - return s; + sourcesBuilder_.addMessage(index, builderForValue.build()); } + return this; } /** * * *
            -       * Document resource name.
            +       * Optional. Citation sources for the claim.
                    * 
            * - * string document = 1 [(.google.api.resource_reference) = { ... } - * - * @return The bytes for document. + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.CitationSource sources = 5 [(.google.api.field_behavior) = OPTIONAL]; + * */ - @java.lang.Override - public com.google.protobuf.ByteString getDocumentBytes() { - java.lang.Object ref = document_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - document_ = b; - return b; + public Builder addAllSources( + java.lang.Iterable< + ? extends com.google.cloud.discoveryengine.v1beta.Answer.CitationSource> + values) { + if (sourcesBuilder_ == null) { + ensureSourcesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, sources_); + onChanged(); } else { - return (com.google.protobuf.ByteString) ref; + sourcesBuilder_.addAllMessages(values); } + return this; } - public static final int URI_FIELD_NUMBER = 2; - - @SuppressWarnings("serial") - private volatile java.lang.Object uri_ = ""; - /** * * *
            -       * URI for the document.
            +       * Optional. Citation sources for the claim.
                    * 
            * - * string uri = 2; - * - * @return The uri. + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.CitationSource sources = 5 [(.google.api.field_behavior) = OPTIONAL]; + * */ - @java.lang.Override - public java.lang.String getUri() { - java.lang.Object ref = uri_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; + public Builder clearSources() { + if (sourcesBuilder_ == null) { + sources_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - uri_ = s; - return s; + sourcesBuilder_.clear(); } + return this; } /** * * *
            -       * URI for the document.
            +       * Optional. Citation sources for the claim.
                    * 
            * - * string uri = 2; - * - * @return The bytes for uri. + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.CitationSource sources = 5 [(.google.api.field_behavior) = OPTIONAL]; + * */ - @java.lang.Override - public com.google.protobuf.ByteString getUriBytes() { - java.lang.Object ref = uri_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - uri_ = b; - return b; + public Builder removeSources(int index) { + if (sourcesBuilder_ == null) { + ensureSourcesIsMutable(); + sources_.remove(index); + onChanged(); } else { - return (com.google.protobuf.ByteString) ref; + sourcesBuilder_.remove(index); } + return this; } - public static final int TITLE_FIELD_NUMBER = 3; - - @SuppressWarnings("serial") - private volatile java.lang.Object title_ = ""; - /** * * *
            -       * Title.
            +       * Optional. Citation sources for the claim.
                    * 
            * - * string title = 3; - * - * @return The title. + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.CitationSource sources = 5 [(.google.api.field_behavior) = OPTIONAL]; + * */ - @java.lang.Override - public java.lang.String getTitle() { - java.lang.Object ref = title_; - 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(); - title_ = s; - return s; - } + public com.google.cloud.discoveryengine.v1beta.Answer.CitationSource.Builder + getSourcesBuilder(int index) { + return internalGetSourcesFieldBuilder().getBuilder(index); } /** * * *
            -       * Title.
            +       * Optional. Citation sources for the claim.
                    * 
            * - * string title = 3; - * - * @return The bytes for title. + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.CitationSource sources = 5 [(.google.api.field_behavior) = OPTIONAL]; + * */ - @java.lang.Override - public com.google.protobuf.ByteString getTitleBytes() { - java.lang.Object ref = title_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - title_ = b; - return b; + public com.google.cloud.discoveryengine.v1beta.Answer.CitationSourceOrBuilder + getSourcesOrBuilder(int index) { + if (sourcesBuilder_ == null) { + return sources_.get(index); } else { - return (com.google.protobuf.ByteString) ref; + return sourcesBuilder_.getMessageOrBuilder(index); } } - public static final int CHUNK_CONTENTS_FIELD_NUMBER = 4; - - @SuppressWarnings("serial") - private java.util.List< - com.google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo - .ChunkContent> - chunkContents_; - /** * * *
            -       * List of cited chunk contents derived from document content.
            +       * Optional. Citation sources for the claim.
                    * 
            * * - * repeated .google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo.ChunkContent chunk_contents = 4; + * repeated .google.cloud.discoveryengine.v1beta.Answer.CitationSource sources = 5 [(.google.api.field_behavior) = OPTIONAL]; * */ - @java.lang.Override public java.util.List< - com.google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo - .ChunkContent> - getChunkContentsList() { - return chunkContents_; + ? extends com.google.cloud.discoveryengine.v1beta.Answer.CitationSourceOrBuilder> + getSourcesOrBuilderList() { + if (sourcesBuilder_ != null) { + return sourcesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(sources_); + } } /** * * *
            -       * List of cited chunk contents derived from document content.
            +       * Optional. Citation sources for the claim.
                    * 
            * * - * repeated .google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo.ChunkContent chunk_contents = 4; + * repeated .google.cloud.discoveryengine.v1beta.Answer.CitationSource sources = 5 [(.google.api.field_behavior) = OPTIONAL]; * */ - @java.lang.Override - public java.util.List< - ? extends - com.google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo - .ChunkContentOrBuilder> - getChunkContentsOrBuilderList() { - return chunkContents_; + public com.google.cloud.discoveryengine.v1beta.Answer.CitationSource.Builder + addSourcesBuilder() { + return internalGetSourcesFieldBuilder() + .addBuilder( + com.google.cloud.discoveryengine.v1beta.Answer.CitationSource.getDefaultInstance()); } /** * * *
            -       * List of cited chunk contents derived from document content.
            +       * Optional. Citation sources for the claim.
                    * 
            * * - * repeated .google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo.ChunkContent chunk_contents = 4; + * repeated .google.cloud.discoveryengine.v1beta.Answer.CitationSource sources = 5 [(.google.api.field_behavior) = OPTIONAL]; * */ - @java.lang.Override - public int getChunkContentsCount() { - return chunkContents_.size(); + public com.google.cloud.discoveryengine.v1beta.Answer.CitationSource.Builder + addSourcesBuilder(int index) { + return internalGetSourcesFieldBuilder() + .addBuilder( + index, + com.google.cloud.discoveryengine.v1beta.Answer.CitationSource.getDefaultInstance()); } /** * * *
            -       * List of cited chunk contents derived from document content.
            +       * Optional. Citation sources for the claim.
                    * 
            * * - * repeated .google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo.ChunkContent chunk_contents = 4; + * repeated .google.cloud.discoveryengine.v1beta.Answer.CitationSource sources = 5 [(.google.api.field_behavior) = OPTIONAL]; * */ - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo - .ChunkContent - getChunkContents(int index) { - return chunkContents_.get(index); + public java.util.List + getSourcesBuilderList() { + return internalGetSourcesFieldBuilder().getBuilderList(); } - /** - * - * - *
            -       * List of cited chunk contents derived from document content.
            -       * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo.ChunkContent chunk_contents = 4; - * - */ - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo - .ChunkContentOrBuilder - getChunkContentsOrBuilder(int index) { - return chunkContents_.get(index); + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.discoveryengine.v1beta.Answer.CitationSource, + com.google.cloud.discoveryengine.v1beta.Answer.CitationSource.Builder, + com.google.cloud.discoveryengine.v1beta.Answer.CitationSourceOrBuilder> + internalGetSourcesFieldBuilder() { + if (sourcesBuilder_ == null) { + sourcesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.discoveryengine.v1beta.Answer.CitationSource, + com.google.cloud.discoveryengine.v1beta.Answer.CitationSource.Builder, + com.google.cloud.discoveryengine.v1beta.Answer.CitationSourceOrBuilder>( + sources_, ((bitField0_ & 0x00000010) != 0), getParentForChildren(), isClean()); + sources_ = null; + } + return sourcesBuilder_; } - public static final int STRUCT_DATA_FIELD_NUMBER = 5; - private com.google.protobuf.Struct structData_; + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.Answer.GroundingSupport) + } - /** - * - * - *
            -       * The structured JSON metadata for the document.
            -       * It is populated from the struct data from the Chunk in search result.
            -       * 
            - * - * .google.protobuf.Struct struct_data = 5; - * - * @return Whether the structData field is set. - */ - @java.lang.Override - public boolean hasStructData() { - return ((bitField0_ & 0x00000001) != 0); - } + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.Answer.GroundingSupport) + private static final com.google.cloud.discoveryengine.v1beta.Answer.GroundingSupport + DEFAULT_INSTANCE; - /** - * - * - *
            -       * The structured JSON metadata for the document.
            -       * It is populated from the struct data from the Chunk in search result.
            -       * 
            - * - * .google.protobuf.Struct struct_data = 5; - * - * @return The structData. - */ - @java.lang.Override - public com.google.protobuf.Struct getStructData() { - return structData_ == null ? com.google.protobuf.Struct.getDefaultInstance() : structData_; - } + static { + DEFAULT_INSTANCE = new com.google.cloud.discoveryengine.v1beta.Answer.GroundingSupport(); + } - /** - * - * - *
            -       * The structured JSON metadata for the document.
            -       * It is populated from the struct data from the Chunk in search result.
            -       * 
            - * - * .google.protobuf.Struct struct_data = 5; - */ - @java.lang.Override - public com.google.protobuf.StructOrBuilder getStructDataOrBuilder() { - return structData_ == null ? com.google.protobuf.Struct.getDefaultInstance() : structData_; - } + public static com.google.cloud.discoveryengine.v1beta.Answer.GroundingSupport + getDefaultInstance() { + return DEFAULT_INSTANCE; + } - private byte memoizedIsInitialized = -1; + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GroundingSupport parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + public static com.google.protobuf.Parser parser() { + return PARSER; + } - memoizedIsInitialized = 1; - return true; - } + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(document_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, document_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(uri_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 2, uri_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(title_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 3, title_); - } - for (int i = 0; i < chunkContents_.size(); i++) { - output.writeMessage(4, chunkContents_.get(i)); - } - if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(5, getStructData()); - } - getUnknownFields().writeTo(output); - } + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Answer.GroundingSupport + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; + public interface ReferenceOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.Answer.Reference) + com.google.protobuf.MessageOrBuilder { - size = 0; - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(document_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, document_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(uri_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(2, uri_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(title_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(3, title_); - } - for (int i = 0; i < chunkContents_.size(); i++) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize(4, chunkContents_.get(i)); - } - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getStructData()); - } - 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.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo)) { - return super.equals(obj); - } - com.google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo other = - (com.google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo) obj; + /** + * + * + *
            +     * Unstructured document information.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo unstructured_document_info = 1; + * + * + * @return Whether the unstructuredDocumentInfo field is set. + */ + boolean hasUnstructuredDocumentInfo(); - if (!getDocument().equals(other.getDocument())) return false; - if (!getUri().equals(other.getUri())) return false; - if (!getTitle().equals(other.getTitle())) return false; - if (!getChunkContentsList().equals(other.getChunkContentsList())) return false; - if (hasStructData() != other.hasStructData()) return false; - if (hasStructData()) { - if (!getStructData().equals(other.getStructData())) return false; - } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } + /** + * + * + *
            +     * Unstructured document information.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo unstructured_document_info = 1; + * + * + * @return The unstructuredDocumentInfo. + */ + com.google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo + getUnstructuredDocumentInfo(); - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + DOCUMENT_FIELD_NUMBER; - hash = (53 * hash) + getDocument().hashCode(); - hash = (37 * hash) + URI_FIELD_NUMBER; - hash = (53 * hash) + getUri().hashCode(); - hash = (37 * hash) + TITLE_FIELD_NUMBER; - hash = (53 * hash) + getTitle().hashCode(); - if (getChunkContentsCount() > 0) { - hash = (37 * hash) + CHUNK_CONTENTS_FIELD_NUMBER; - hash = (53 * hash) + getChunkContentsList().hashCode(); - } - if (hasStructData()) { - hash = (37 * hash) + STRUCT_DATA_FIELD_NUMBER; - hash = (53 * hash) + getStructData().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } + /** + * + * + *
            +     * Unstructured document information.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo unstructured_document_info = 1; + * + */ + com.google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfoOrBuilder + getUnstructuredDocumentInfoOrBuilder(); - public static com.google.cloud.discoveryengine.v1beta.Answer.Reference - .UnstructuredDocumentInfo - parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } + /** + * + * + *
            +     * Chunk information.
            +     * 
            + * + * .google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo chunk_info = 2; + * + * @return Whether the chunkInfo field is set. + */ + boolean hasChunkInfo(); - public static com.google.cloud.discoveryengine.v1beta.Answer.Reference - .UnstructuredDocumentInfo - parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } + /** + * + * + *
            +     * Chunk information.
            +     * 
            + * + * .google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo chunk_info = 2; + * + * @return The chunkInfo. + */ + com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo getChunkInfo(); - public static com.google.cloud.discoveryengine.v1beta.Answer.Reference - .UnstructuredDocumentInfo - parseFrom(com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } + /** + * + * + *
            +     * Chunk information.
            +     * 
            + * + * .google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo chunk_info = 2; + */ + com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfoOrBuilder + getChunkInfoOrBuilder(); - public static com.google.cloud.discoveryengine.v1beta.Answer.Reference - .UnstructuredDocumentInfo - parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } + /** + * + * + *
            +     * Structured document information.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Answer.Reference.StructuredDocumentInfo structured_document_info = 3; + * + * + * @return Whether the structuredDocumentInfo field is set. + */ + boolean hasStructuredDocumentInfo(); - public static com.google.cloud.discoveryengine.v1beta.Answer.Reference - .UnstructuredDocumentInfo - parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } + /** + * + * + *
            +     * Structured document information.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Answer.Reference.StructuredDocumentInfo structured_document_info = 3; + * + * + * @return The structuredDocumentInfo. + */ + com.google.cloud.discoveryengine.v1beta.Answer.Reference.StructuredDocumentInfo + getStructuredDocumentInfo(); - public static com.google.cloud.discoveryengine.v1beta.Answer.Reference - .UnstructuredDocumentInfo - parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } + /** + * + * + *
            +     * Structured document information.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Answer.Reference.StructuredDocumentInfo structured_document_info = 3; + * + */ + com.google.cloud.discoveryengine.v1beta.Answer.Reference.StructuredDocumentInfoOrBuilder + getStructuredDocumentInfoOrBuilder(); - public static com.google.cloud.discoveryengine.v1beta.Answer.Reference - .UnstructuredDocumentInfo - parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } + com.google.cloud.discoveryengine.v1beta.Answer.Reference.ContentCase getContentCase(); + } - public static com.google.cloud.discoveryengine.v1beta.Answer.Reference - .UnstructuredDocumentInfo - parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } + /** + * + * + *
            +   * Reference.
            +   * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.Answer.Reference} + */ + public static final class Reference extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.Answer.Reference) + ReferenceOrBuilder { + private static final long serialVersionUID = 0L; - public static com.google.cloud.discoveryengine.v1beta.Answer.Reference - .UnstructuredDocumentInfo - parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Reference"); + } - public static com.google.cloud.discoveryengine.v1beta.Answer.Reference - .UnstructuredDocumentInfo - parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } + // Use Reference.newBuilder() to construct. + private Reference(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } - public static com.google.cloud.discoveryengine.v1beta.Answer.Reference - .UnstructuredDocumentInfo - parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } + private Reference() {} - public static com.google.cloud.discoveryengine.v1beta.Answer.Reference - .UnstructuredDocumentInfo - parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.AnswerProto + .internal_static_google_cloud_discoveryengine_v1beta_Answer_Reference_descriptor; + } - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.AnswerProto + .internal_static_google_cloud_discoveryengine_v1beta_Answer_Reference_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.Answer.Reference.class, + com.google.cloud.discoveryengine.v1beta.Answer.Reference.Builder.class); + } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } + public interface UnstructuredDocumentInfoOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo) + com.google.protobuf.MessageOrBuilder { - public static Builder newBuilder( - com.google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo - prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } + /** + * + * + *
            +       * Document resource name.
            +       * 
            + * + * string document = 1 [(.google.api.resource_reference) = { ... } + * + * @return The document. + */ + java.lang.String getDocument(); - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } + /** + * + * + *
            +       * Document resource name.
            +       * 
            + * + * string document = 1 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for document. + */ + com.google.protobuf.ByteString getDocumentBytes(); - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } + /** + * + * + *
            +       * URI for the document.
            +       * 
            + * + * string uri = 2; + * + * @return The uri. + */ + java.lang.String getUri(); /** * * *
            -       * Unstructured document information.
            +       * URI for the document.
                    * 
            * - * Protobuf type {@code - * google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo} + * string uri = 2; + * + * @return The bytes for uri. */ - public static final class Builder - extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo) - com.google.cloud.discoveryengine.v1beta.Answer.Reference - .UnstructuredDocumentInfoOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.discoveryengine.v1beta.AnswerProto - .internal_static_google_cloud_discoveryengine_v1beta_Answer_Reference_UnstructuredDocumentInfo_descriptor; - } + com.google.protobuf.ByteString getUriBytes(); - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.discoveryengine.v1beta.AnswerProto - .internal_static_google_cloud_discoveryengine_v1beta_Answer_Reference_UnstructuredDocumentInfo_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo - .class, - com.google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo - .Builder.class); - } + /** + * + * + *
            +       * Title.
            +       * 
            + * + * string title = 3; + * + * @return The title. + */ + java.lang.String getTitle(); - // Construct using - // com.google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + /** + * + * + *
            +       * Title.
            +       * 
            + * + * string title = 3; + * + * @return The bytes for title. + */ + com.google.protobuf.ByteString getTitleBytes(); - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } + /** + * + * + *
            +       * List of cited chunk contents derived from document content.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo.ChunkContent chunk_contents = 4; + * + */ + java.util.List< + com.google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo + .ChunkContent> + getChunkContentsList(); - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - internalGetChunkContentsFieldBuilder(); - internalGetStructDataFieldBuilder(); - } - } + /** + * + * + *
            +       * List of cited chunk contents derived from document content.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo.ChunkContent chunk_contents = 4; + * + */ + com.google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo.ChunkContent + getChunkContents(int index); - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - document_ = ""; - uri_ = ""; - title_ = ""; - if (chunkContentsBuilder_ == null) { - chunkContents_ = java.util.Collections.emptyList(); - } else { - chunkContents_ = null; - chunkContentsBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000008); - structData_ = null; - if (structDataBuilder_ != null) { - structDataBuilder_.dispose(); - structDataBuilder_ = null; - } - return this; - } + /** + * + * + *
            +       * List of cited chunk contents derived from document content.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo.ChunkContent chunk_contents = 4; + * + */ + int getChunkContentsCount(); - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.discoveryengine.v1beta.AnswerProto - .internal_static_google_cloud_discoveryengine_v1beta_Answer_Reference_UnstructuredDocumentInfo_descriptor; - } + /** + * + * + *
            +       * List of cited chunk contents derived from document content.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo.ChunkContent chunk_contents = 4; + * + */ + java.util.List< + ? extends + com.google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo + .ChunkContentOrBuilder> + getChunkContentsOrBuilderList(); - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo - getDefaultInstanceForType() { - return com.google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo - .getDefaultInstance(); - } + /** + * + * + *
            +       * List of cited chunk contents derived from document content.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo.ChunkContent chunk_contents = 4; + * + */ + com.google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo + .ChunkContentOrBuilder + getChunkContentsOrBuilder(int index); - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo - build() { - com.google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo result = - buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } + /** + * + * + *
            +       * The structured JSON metadata for the document.
            +       * It is populated from the struct data from the Chunk in search result.
            +       * 
            + * + * .google.protobuf.Struct struct_data = 5; + * + * @return Whether the structData field is set. + */ + boolean hasStructData(); - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo - buildPartial() { - com.google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo result = - new com.google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo( - this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } + /** + * + * + *
            +       * The structured JSON metadata for the document.
            +       * It is populated from the struct data from the Chunk in search result.
            +       * 
            + * + * .google.protobuf.Struct struct_data = 5; + * + * @return The structData. + */ + com.google.protobuf.Struct getStructData(); - private void buildPartialRepeatedFields( - com.google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo - result) { - if (chunkContentsBuilder_ == null) { - if (((bitField0_ & 0x00000008) != 0)) { - chunkContents_ = java.util.Collections.unmodifiableList(chunkContents_); - bitField0_ = (bitField0_ & ~0x00000008); - } - result.chunkContents_ = chunkContents_; - } else { - result.chunkContents_ = chunkContentsBuilder_.build(); - } - } + /** + * + * + *
            +       * The structured JSON metadata for the document.
            +       * It is populated from the struct data from the Chunk in search result.
            +       * 
            + * + * .google.protobuf.Struct struct_data = 5; + */ + com.google.protobuf.StructOrBuilder getStructDataOrBuilder(); + } - private void buildPartial0( - com.google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo - result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.document_ = document_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.uri_ = uri_; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.title_ = title_; - } - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000010) != 0)) { - result.structData_ = - structDataBuilder_ == null ? structData_ : structDataBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - result.bitField0_ |= to_bitField0_; - } + /** + * + * + *
            +     * Unstructured document information.
            +     * 
            + * + * Protobuf type {@code + * google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo} + */ + public static final class UnstructuredDocumentInfo extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo) + UnstructuredDocumentInfoOrBuilder { + private static final long serialVersionUID = 0L; - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other - instanceof - com.google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo) { - return mergeFrom( - (com.google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo) - other); - } else { - super.mergeFrom(other); - return this; - } - } + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "UnstructuredDocumentInfo"); + } - public Builder mergeFrom( - com.google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo - other) { - if (other - == com.google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo - .getDefaultInstance()) return this; - if (!other.getDocument().isEmpty()) { - document_ = other.document_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (!other.getUri().isEmpty()) { - uri_ = other.uri_; - bitField0_ |= 0x00000002; - onChanged(); - } - if (!other.getTitle().isEmpty()) { - title_ = other.title_; - bitField0_ |= 0x00000004; - onChanged(); - } - if (chunkContentsBuilder_ == null) { - if (!other.chunkContents_.isEmpty()) { - if (chunkContents_.isEmpty()) { - chunkContents_ = other.chunkContents_; - bitField0_ = (bitField0_ & ~0x00000008); - } else { - ensureChunkContentsIsMutable(); - chunkContents_.addAll(other.chunkContents_); - } - onChanged(); - } - } else { - if (!other.chunkContents_.isEmpty()) { - if (chunkContentsBuilder_.isEmpty()) { - chunkContentsBuilder_.dispose(); - chunkContentsBuilder_ = null; - chunkContents_ = other.chunkContents_; - bitField0_ = (bitField0_ & ~0x00000008); - chunkContentsBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders - ? internalGetChunkContentsFieldBuilder() - : null; - } else { - chunkContentsBuilder_.addAllMessages(other.chunkContents_); - } - } - } - if (other.hasStructData()) { - mergeStructData(other.getStructData()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } + // Use UnstructuredDocumentInfo.newBuilder() to construct. + private UnstructuredDocumentInfo(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } - @java.lang.Override - public final boolean isInitialized() { - return true; - } + private UnstructuredDocumentInfo() { + document_ = ""; + uri_ = ""; + title_ = ""; + chunkContents_ = java.util.Collections.emptyList(); + } - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - document_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: - { - uri_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 26: - { - title_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - break; - } // case 26 - case 34: - { - com.google.cloud.discoveryengine.v1beta.Answer.Reference - .UnstructuredDocumentInfo.ChunkContent - m = - input.readMessage( - com.google.cloud.discoveryengine.v1beta.Answer.Reference - .UnstructuredDocumentInfo.ChunkContent.parser(), - extensionRegistry); - if (chunkContentsBuilder_ == null) { - ensureChunkContentsIsMutable(); - chunkContents_.add(m); - } else { - chunkContentsBuilder_.addMessage(m); - } - break; - } // case 34 - case 42: - { - input.readMessage( - internalGetStructDataFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000010; - break; - } // case 42 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.AnswerProto + .internal_static_google_cloud_discoveryengine_v1beta_Answer_Reference_UnstructuredDocumentInfo_descriptor; + } - private java.lang.Object document_ = ""; + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.AnswerProto + .internal_static_google_cloud_discoveryengine_v1beta_Answer_Reference_UnstructuredDocumentInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo + .class, + com.google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo + .Builder.class); + } - /** - * - * - *
            -         * Document resource name.
            -         * 
            - * - * string document = 1 [(.google.api.resource_reference) = { ... } - * - * @return The document. - */ - public java.lang.String getDocument() { - java.lang.Object ref = document_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - document_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } + public interface ChunkContentOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo.ChunkContent) + com.google.protobuf.MessageOrBuilder { /** * * *
            -         * Document resource name.
            +         * Chunk textual content.
                      * 
            * - * string document = 1 [(.google.api.resource_reference) = { ... } + * string content = 1; * - * @return The bytes for document. + * @return The content. */ - public com.google.protobuf.ByteString getDocumentBytes() { - java.lang.Object ref = document_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - document_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } + java.lang.String getContent(); /** * * *
            -         * Document resource name.
            +         * Chunk textual content.
                      * 
            * - * string document = 1 [(.google.api.resource_reference) = { ... } + * string content = 1; * - * @param value The document to set. - * @return This builder for chaining. + * @return The bytes for content. */ - public Builder setDocument(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - document_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } + com.google.protobuf.ByteString getContentBytes(); /** * * *
            -         * Document resource name.
            +         * Page identifier.
                      * 
            * - * string document = 1 [(.google.api.resource_reference) = { ... } + * string page_identifier = 2; * - * @return This builder for chaining. + * @return The pageIdentifier. */ - public Builder clearDocument() { - document_ = getDefaultInstance().getDocument(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } + java.lang.String getPageIdentifier(); /** * * *
            -         * Document resource name.
            +         * Page identifier.
                      * 
            * - * string document = 1 [(.google.api.resource_reference) = { ... } + * string page_identifier = 2; * - * @param value The bytes for document to set. - * @return This builder for chaining. + * @return The bytes for pageIdentifier. */ - public Builder setDocumentBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - document_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private java.lang.Object uri_ = ""; + com.google.protobuf.ByteString getPageIdentifierBytes(); /** * * *
            -         * URI for the document.
            +         * The relevance of the chunk for a given query. Values range from 0.0
            +         * (completely irrelevant) to 1.0 (completely relevant).
            +         * This value is for informational purpose only. It may change for
            +         * the same query and chunk at any time due to a model retraining or
            +         * change in implementation.
                      * 
            * - * string uri = 2; + * optional float relevance_score = 3; * - * @return The uri. + * @return Whether the relevanceScore field is set. */ - public java.lang.String getUri() { - java.lang.Object ref = uri_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - uri_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } + boolean hasRelevanceScore(); /** * * *
            -         * URI for the document.
            +         * The relevance of the chunk for a given query. Values range from 0.0
            +         * (completely irrelevant) to 1.0 (completely relevant).
            +         * This value is for informational purpose only. It may change for
            +         * the same query and chunk at any time due to a model retraining or
            +         * change in implementation.
                      * 
            * - * string uri = 2; + * optional float relevance_score = 3; * - * @return The bytes for uri. + * @return The relevanceScore. */ - public com.google.protobuf.ByteString getUriBytes() { - java.lang.Object ref = uri_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - uri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } + float getRelevanceScore(); /** * * *
            -         * URI for the document.
            +         * Output only. Stores indexes of blobattachments linked to this chunk.
                      * 
            * - * string uri = 2; + * + * repeated int64 blob_attachment_indexes = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * * - * @param value The uri to set. - * @return This builder for chaining. + * @return A list containing the blobAttachmentIndexes. */ - public Builder setUri(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - uri_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } + java.util.List getBlobAttachmentIndexesList(); /** * * *
            -         * URI for the document.
            +         * Output only. Stores indexes of blobattachments linked to this chunk.
                      * 
            * - * string uri = 2; + * + * repeated int64 blob_attachment_indexes = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * * - * @return This builder for chaining. + * @return The count of blobAttachmentIndexes. */ - public Builder clearUri() { - uri_ = getDefaultInstance().getUri(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } + int getBlobAttachmentIndexesCount(); /** * * *
            -         * URI for the document.
            +         * Output only. Stores indexes of blobattachments linked to this chunk.
                      * 
            * - * string uri = 2; + * + * repeated int64 blob_attachment_indexes = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * * - * @param value The bytes for uri to set. - * @return This builder for chaining. + * @param index The index of the element to return. + * @return The blobAttachmentIndexes at the given index. */ - public Builder setUriBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - uri_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } + long getBlobAttachmentIndexes(int index); + } - private java.lang.Object title_ = ""; + /** + * + * + *
            +       * Chunk content.
            +       * 
            + * + * Protobuf type {@code + * google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo.ChunkContent} + */ + public static final class ChunkContent extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo.ChunkContent) + ChunkContentOrBuilder { + private static final long serialVersionUID = 0L; - /** - * - * - *
            -         * Title.
            +        static {
            +          com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
            +              com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
            +              /* major= */ 4,
            +              /* minor= */ 33,
            +              /* patch= */ 2,
            +              /* suffix= */ "",
            +              "ChunkContent");
            +        }
            +
            +        // Use ChunkContent.newBuilder() to construct.
            +        private ChunkContent(com.google.protobuf.GeneratedMessage.Builder builder) {
            +          super(builder);
            +        }
            +
            +        private ChunkContent() {
            +          content_ = "";
            +          pageIdentifier_ = "";
            +          blobAttachmentIndexes_ = emptyLongList();
            +        }
            +
            +        public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
            +          return com.google.cloud.discoveryengine.v1beta.AnswerProto
            +              .internal_static_google_cloud_discoveryengine_v1beta_Answer_Reference_UnstructuredDocumentInfo_ChunkContent_descriptor;
            +        }
            +
            +        @java.lang.Override
            +        protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
            +            internalGetFieldAccessorTable() {
            +          return com.google.cloud.discoveryengine.v1beta.AnswerProto
            +              .internal_static_google_cloud_discoveryengine_v1beta_Answer_Reference_UnstructuredDocumentInfo_ChunkContent_fieldAccessorTable
            +              .ensureFieldAccessorsInitialized(
            +                  com.google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo
            +                      .ChunkContent.class,
            +                  com.google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo
            +                      .ChunkContent.Builder.class);
            +        }
            +
            +        private int bitField0_;
            +        public static final int CONTENT_FIELD_NUMBER = 1;
            +
            +        @SuppressWarnings("serial")
            +        private volatile java.lang.Object content_ = "";
            +
            +        /**
            +         *
            +         *
            +         * 
            +         * Chunk textual content.
                      * 
            * - * string title = 3; + * string content = 1; * - * @return The title. + * @return The content. */ - public java.lang.String getTitle() { - java.lang.Object ref = title_; - if (!(ref instanceof java.lang.String)) { + @java.lang.Override + public java.lang.String getContent() { + java.lang.Object ref = content_; + 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(); - title_ = s; + content_ = s; return s; - } else { - return (java.lang.String) ref; } } @@ -5113,3325 +4921,2722 @@ public java.lang.String getTitle() { * * *
            -         * Title.
            +         * Chunk textual content.
                      * 
            * - * string title = 3; + * string content = 1; * - * @return The bytes for title. + * @return The bytes for content. */ - public com.google.protobuf.ByteString getTitleBytes() { - java.lang.Object ref = title_; - if (ref instanceof String) { + @java.lang.Override + public com.google.protobuf.ByteString getContentBytes() { + java.lang.Object ref = content_; + if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - title_ = b; + content_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } + public static final int PAGE_IDENTIFIER_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object pageIdentifier_ = ""; + /** * * *
            -         * Title.
            +         * Page identifier.
                      * 
            * - * string title = 3; + * string page_identifier = 2; * - * @param value The title to set. - * @return This builder for chaining. + * @return The pageIdentifier. */ - public Builder setTitle(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); + @java.lang.Override + public java.lang.String getPageIdentifier() { + java.lang.Object ref = pageIdentifier_; + 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(); + pageIdentifier_ = s; + return s; } - title_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; } /** * * *
            -         * Title.
            +         * Page identifier.
                      * 
            * - * string title = 3; + * string page_identifier = 2; * - * @return This builder for chaining. + * @return The bytes for pageIdentifier. */ - public Builder clearTitle() { - title_ = getDefaultInstance().getTitle(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - return this; + @java.lang.Override + public com.google.protobuf.ByteString getPageIdentifierBytes() { + java.lang.Object ref = pageIdentifier_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageIdentifier_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } } + public static final int RELEVANCE_SCORE_FIELD_NUMBER = 3; + private float relevanceScore_ = 0F; + /** * * *
            -         * Title.
            +         * The relevance of the chunk for a given query. Values range from 0.0
            +         * (completely irrelevant) to 1.0 (completely relevant).
            +         * This value is for informational purpose only. It may change for
            +         * the same query and chunk at any time due to a model retraining or
            +         * change in implementation.
                      * 
            * - * string title = 3; + * optional float relevance_score = 3; * - * @param value The bytes for title to set. - * @return This builder for chaining. + * @return Whether the relevanceScore field is set. */ - public Builder setTitleBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - title_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - - private java.util.List< - com.google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo - .ChunkContent> - chunkContents_ = java.util.Collections.emptyList(); - - private void ensureChunkContentsIsMutable() { - if (!((bitField0_ & 0x00000008) != 0)) { - chunkContents_ = - new java.util.ArrayList< - com.google.cloud.discoveryengine.v1beta.Answer.Reference - .UnstructuredDocumentInfo.ChunkContent>(chunkContents_); - bitField0_ |= 0x00000008; - } + @java.lang.Override + public boolean hasRelevanceScore() { + return ((bitField0_ & 0x00000001) != 0); } - private com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo - .ChunkContent, - com.google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo - .ChunkContent.Builder, - com.google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo - .ChunkContentOrBuilder> - chunkContentsBuilder_; - /** * * *
            -         * List of cited chunk contents derived from document content.
            +         * The relevance of the chunk for a given query. Values range from 0.0
            +         * (completely irrelevant) to 1.0 (completely relevant).
            +         * This value is for informational purpose only. It may change for
            +         * the same query and chunk at any time due to a model retraining or
            +         * change in implementation.
                      * 
            * - * - * repeated .google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo.ChunkContent chunk_contents = 4; - * + * optional float relevance_score = 3; + * + * @return The relevanceScore. */ - public java.util.List< - com.google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo - .ChunkContent> - getChunkContentsList() { - if (chunkContentsBuilder_ == null) { - return java.util.Collections.unmodifiableList(chunkContents_); - } else { - return chunkContentsBuilder_.getMessageList(); - } + @java.lang.Override + public float getRelevanceScore() { + return relevanceScore_; } + public static final int BLOB_ATTACHMENT_INDEXES_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private com.google.protobuf.Internal.LongList blobAttachmentIndexes_ = emptyLongList(); + /** * * *
            -         * List of cited chunk contents derived from document content.
            +         * Output only. Stores indexes of blobattachments linked to this chunk.
                      * 
            * * - * repeated .google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo.ChunkContent chunk_contents = 4; + * repeated int64 blob_attachment_indexes = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; * + * + * @return A list containing the blobAttachmentIndexes. */ - public int getChunkContentsCount() { - if (chunkContentsBuilder_ == null) { - return chunkContents_.size(); - } else { - return chunkContentsBuilder_.getCount(); - } + @java.lang.Override + public java.util.List getBlobAttachmentIndexesList() { + return blobAttachmentIndexes_; } /** * * *
            -         * List of cited chunk contents derived from document content.
            +         * Output only. Stores indexes of blobattachments linked to this chunk.
                      * 
            * * - * repeated .google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo.ChunkContent chunk_contents = 4; + * repeated int64 blob_attachment_indexes = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; * + * + * @return The count of blobAttachmentIndexes. */ - public com.google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo - .ChunkContent - getChunkContents(int index) { - if (chunkContentsBuilder_ == null) { - return chunkContents_.get(index); - } else { - return chunkContentsBuilder_.getMessage(index); - } + public int getBlobAttachmentIndexesCount() { + return blobAttachmentIndexes_.size(); } /** * * *
            -         * List of cited chunk contents derived from document content.
            +         * Output only. Stores indexes of blobattachments linked to this chunk.
                      * 
            * * - * repeated .google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo.ChunkContent chunk_contents = 4; + * repeated int64 blob_attachment_indexes = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; * + * + * @param index The index of the element to return. + * @return The blobAttachmentIndexes at the given index. */ - public Builder setChunkContents( - int index, - com.google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo - .ChunkContent - value) { - if (chunkContentsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureChunkContentsIsMutable(); - chunkContents_.set(index, value); - onChanged(); - } else { - chunkContentsBuilder_.setMessage(index, value); - } - return this; + public long getBlobAttachmentIndexes(int index) { + return blobAttachmentIndexes_.getLong(index); } - /** - * - * - *
            -         * List of cited chunk contents derived from document content.
            -         * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo.ChunkContent chunk_contents = 4; - * - */ - public Builder setChunkContents( - int index, - com.google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo - .ChunkContent.Builder - builderForValue) { - if (chunkContentsBuilder_ == null) { - ensureChunkContentsIsMutable(); - chunkContents_.set(index, builderForValue.build()); - onChanged(); - } else { - chunkContentsBuilder_.setMessage(index, builderForValue.build()); - } - return this; + private int blobAttachmentIndexesMemoizedSerializedSize = -1; + + 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; } - /** - * - * - *
            -         * List of cited chunk contents derived from document content.
            -         * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo.ChunkContent chunk_contents = 4; - * - */ - public Builder addChunkContents( - com.google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo - .ChunkContent - value) { - if (chunkContentsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureChunkContentsIsMutable(); - chunkContents_.add(value); - onChanged(); - } else { - chunkContentsBuilder_.addMessage(value); + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(content_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, content_); } - return this; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageIdentifier_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, pageIdentifier_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeFloat(3, relevanceScore_); + } + if (getBlobAttachmentIndexesList().size() > 0) { + output.writeUInt32NoTag(34); + output.writeUInt32NoTag(blobAttachmentIndexesMemoizedSerializedSize); + } + for (int i = 0; i < blobAttachmentIndexes_.size(); i++) { + output.writeInt64NoTag(blobAttachmentIndexes_.getLong(i)); + } + getUnknownFields().writeTo(output); } - /** - * - * - *
            -         * List of cited chunk contents derived from document content.
            -         * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo.ChunkContent chunk_contents = 4; - * - */ - public Builder addChunkContents( - int index, - com.google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo - .ChunkContent - value) { - if (chunkContentsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(content_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, content_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageIdentifier_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, pageIdentifier_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeFloatSize(3, relevanceScore_); + } + { + int dataSize = 0; + for (int i = 0; i < blobAttachmentIndexes_.size(); i++) { + dataSize += + com.google.protobuf.CodedOutputStream.computeInt64SizeNoTag( + blobAttachmentIndexes_.getLong(i)); } - ensureChunkContentsIsMutable(); - chunkContents_.add(index, value); - onChanged(); - } else { - chunkContentsBuilder_.addMessage(index, value); + size += dataSize; + if (!getBlobAttachmentIndexesList().isEmpty()) { + size += 1; + size += com.google.protobuf.CodedOutputStream.computeInt32SizeNoTag(dataSize); + } + blobAttachmentIndexesMemoizedSerializedSize = dataSize; } - return this; + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; } - /** - * - * - *
            -         * List of cited chunk contents derived from document content.
            -         * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo.ChunkContent chunk_contents = 4; - * - */ - public Builder addChunkContents( - com.google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo - .ChunkContent.Builder - builderForValue) { - if (chunkContentsBuilder_ == null) { - ensureChunkContentsIsMutable(); - chunkContents_.add(builderForValue.build()); - onChanged(); - } else { - chunkContentsBuilder_.addMessage(builderForValue.build()); + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; } - return this; - } + if (!(obj + instanceof + com.google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo + .ChunkContent)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo + .ChunkContent + other = + (com.google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo + .ChunkContent) + obj; - /** - * - * - *
            -         * List of cited chunk contents derived from document content.
            -         * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo.ChunkContent chunk_contents = 4; - * - */ - public Builder addChunkContents( - int index, - com.google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo - .ChunkContent.Builder - builderForValue) { - if (chunkContentsBuilder_ == null) { - ensureChunkContentsIsMutable(); - chunkContents_.add(index, builderForValue.build()); - onChanged(); - } else { - chunkContentsBuilder_.addMessage(index, builderForValue.build()); + if (!getContent().equals(other.getContent())) return false; + if (!getPageIdentifier().equals(other.getPageIdentifier())) return false; + if (hasRelevanceScore() != other.hasRelevanceScore()) return false; + if (hasRelevanceScore()) { + if (java.lang.Float.floatToIntBits(getRelevanceScore()) + != java.lang.Float.floatToIntBits(other.getRelevanceScore())) return false; } - return this; + if (!getBlobAttachmentIndexesList().equals(other.getBlobAttachmentIndexesList())) + return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; } - /** - * - * - *
            -         * List of cited chunk contents derived from document content.
            -         * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo.ChunkContent chunk_contents = 4; - * - */ - public Builder addAllChunkContents( - java.lang.Iterable< - ? extends - com.google.cloud.discoveryengine.v1beta.Answer.Reference - .UnstructuredDocumentInfo.ChunkContent> - values) { - if (chunkContentsBuilder_ == null) { - ensureChunkContentsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, chunkContents_); - onChanged(); - } else { - chunkContentsBuilder_.addAllMessages(values); + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; } - return this; + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + CONTENT_FIELD_NUMBER; + hash = (53 * hash) + getContent().hashCode(); + hash = (37 * hash) + PAGE_IDENTIFIER_FIELD_NUMBER; + hash = (53 * hash) + getPageIdentifier().hashCode(); + if (hasRelevanceScore()) { + hash = (37 * hash) + RELEVANCE_SCORE_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits(getRelevanceScore()); + } + if (getBlobAttachmentIndexesCount() > 0) { + hash = (37 * hash) + BLOB_ATTACHMENT_INDEXES_FIELD_NUMBER; + hash = (53 * hash) + getBlobAttachmentIndexesList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; } - /** - * - * - *
            -         * List of cited chunk contents derived from document content.
            -         * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo.ChunkContent chunk_contents = 4; - * - */ - public Builder clearChunkContents() { - if (chunkContentsBuilder_ == null) { - chunkContents_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000008); - onChanged(); - } else { - chunkContentsBuilder_.clear(); - } - return this; + public static com.google.cloud.discoveryengine.v1beta.Answer.Reference + .UnstructuredDocumentInfo.ChunkContent + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); } - /** - * - * - *
            -         * List of cited chunk contents derived from document content.
            -         * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo.ChunkContent chunk_contents = 4; - * - */ - public Builder removeChunkContents(int index) { - if (chunkContentsBuilder_ == null) { - ensureChunkContentsIsMutable(); - chunkContents_.remove(index); - onChanged(); - } else { - chunkContentsBuilder_.remove(index); - } - return this; + public static com.google.cloud.discoveryengine.v1beta.Answer.Reference + .UnstructuredDocumentInfo.ChunkContent + parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); } - /** - * - * - *
            -         * List of cited chunk contents derived from document content.
            -         * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo.ChunkContent chunk_contents = 4; - * - */ - public com.google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo - .ChunkContent.Builder - getChunkContentsBuilder(int index) { - return internalGetChunkContentsFieldBuilder().getBuilder(index); + public static com.google.cloud.discoveryengine.v1beta.Answer.Reference + .UnstructuredDocumentInfo.ChunkContent + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); } - /** - * - * - *
            -         * List of cited chunk contents derived from document content.
            -         * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo.ChunkContent chunk_contents = 4; - * - */ - public com.google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo - .ChunkContentOrBuilder - getChunkContentsOrBuilder(int index) { - if (chunkContentsBuilder_ == null) { - return chunkContents_.get(index); - } else { - return chunkContentsBuilder_.getMessageOrBuilder(index); - } + public static com.google.cloud.discoveryengine.v1beta.Answer.Reference + .UnstructuredDocumentInfo.ChunkContent + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); } - /** - * - * - *
            -         * List of cited chunk contents derived from document content.
            -         * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo.ChunkContent chunk_contents = 4; - * - */ - public java.util.List< - ? extends - com.google.cloud.discoveryengine.v1beta.Answer.Reference - .UnstructuredDocumentInfo.ChunkContentOrBuilder> - getChunkContentsOrBuilderList() { - if (chunkContentsBuilder_ != null) { - return chunkContentsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(chunkContents_); - } + public static com.google.cloud.discoveryengine.v1beta.Answer.Reference + .UnstructuredDocumentInfo.ChunkContent + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); } - /** - * - * - *
            -         * List of cited chunk contents derived from document content.
            -         * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo.ChunkContent chunk_contents = 4; - * - */ - public com.google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo - .ChunkContent.Builder - addChunkContentsBuilder() { - return internalGetChunkContentsFieldBuilder() - .addBuilder( - com.google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo - .ChunkContent.getDefaultInstance()); + public static com.google.cloud.discoveryengine.v1beta.Answer.Reference + .UnstructuredDocumentInfo.ChunkContent + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); } - /** - * - * - *
            -         * List of cited chunk contents derived from document content.
            -         * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo.ChunkContent chunk_contents = 4; - * - */ - public com.google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo - .ChunkContent.Builder - addChunkContentsBuilder(int index) { - return internalGetChunkContentsFieldBuilder() - .addBuilder( - index, - com.google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo - .ChunkContent.getDefaultInstance()); + public static com.google.cloud.discoveryengine.v1beta.Answer.Reference + .UnstructuredDocumentInfo.ChunkContent + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } - /** - * - * - *
            -         * List of cited chunk contents derived from document content.
            -         * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo.ChunkContent chunk_contents = 4; - * - */ - public java.util.List< - com.google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo - .ChunkContent.Builder> - getChunkContentsBuilderList() { - return internalGetChunkContentsFieldBuilder().getBuilderList(); + public static com.google.cloud.discoveryengine.v1beta.Answer.Reference + .UnstructuredDocumentInfo.ChunkContent + parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); } - private com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo - .ChunkContent, - com.google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo - .ChunkContent.Builder, - com.google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo - .ChunkContentOrBuilder> - internalGetChunkContentsFieldBuilder() { - if (chunkContentsBuilder_ == null) { - chunkContentsBuilder_ = - new com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.discoveryengine.v1beta.Answer.Reference - .UnstructuredDocumentInfo.ChunkContent, - com.google.cloud.discoveryengine.v1beta.Answer.Reference - .UnstructuredDocumentInfo.ChunkContent.Builder, - com.google.cloud.discoveryengine.v1beta.Answer.Reference - .UnstructuredDocumentInfo.ChunkContentOrBuilder>( - chunkContents_, - ((bitField0_ & 0x00000008) != 0), - getParentForChildren(), - isClean()); - chunkContents_ = null; - } - return chunkContentsBuilder_; + public static com.google.cloud.discoveryengine.v1beta.Answer.Reference + .UnstructuredDocumentInfo.ChunkContent + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } - private com.google.protobuf.Struct structData_; - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Struct, - com.google.protobuf.Struct.Builder, - com.google.protobuf.StructOrBuilder> - structDataBuilder_; + public static com.google.cloud.discoveryengine.v1beta.Answer.Reference + .UnstructuredDocumentInfo.ChunkContent + 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.discoveryengine.v1beta.Answer.Reference + .UnstructuredDocumentInfo.ChunkContent + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.Answer.Reference + .UnstructuredDocumentInfo.ChunkContent + 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.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo + .ChunkContent + 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; + } /** * * *
            -         * The structured JSON metadata for the document.
            -         * It is populated from the struct data from the Chunk in search result.
            +         * Chunk content.
                      * 
            * - * .google.protobuf.Struct struct_data = 5; - * - * @return Whether the structData field is set. + * Protobuf type {@code + * google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo.ChunkContent} */ - public boolean hasStructData() { - return ((bitField0_ & 0x00000010) != 0); - } - - /** - * - * - *
            -         * The structured JSON metadata for the document.
            -         * It is populated from the struct data from the Chunk in search result.
            -         * 
            - * - * .google.protobuf.Struct struct_data = 5; - * - * @return The structData. - */ - public com.google.protobuf.Struct getStructData() { - if (structDataBuilder_ == null) { - return structData_ == null - ? com.google.protobuf.Struct.getDefaultInstance() - : structData_; - } else { - return structDataBuilder_.getMessage(); + public static final class Builder + extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo.ChunkContent) + com.google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo + .ChunkContentOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.AnswerProto + .internal_static_google_cloud_discoveryengine_v1beta_Answer_Reference_UnstructuredDocumentInfo_ChunkContent_descriptor; } - } - /** - * - * - *
            -         * The structured JSON metadata for the document.
            -         * It is populated from the struct data from the Chunk in search result.
            -         * 
            - * - * .google.protobuf.Struct struct_data = 5; - */ - public Builder setStructData(com.google.protobuf.Struct value) { - if (structDataBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - structData_ = value; - } else { - structDataBuilder_.setMessage(value); + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.AnswerProto + .internal_static_google_cloud_discoveryengine_v1beta_Answer_Reference_UnstructuredDocumentInfo_ChunkContent_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.Answer.Reference + .UnstructuredDocumentInfo.ChunkContent.class, + com.google.cloud.discoveryengine.v1beta.Answer.Reference + .UnstructuredDocumentInfo.ChunkContent.Builder.class); } - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - /** - * - * - *
            -         * The structured JSON metadata for the document.
            -         * It is populated from the struct data from the Chunk in search result.
            -         * 
            - * - * .google.protobuf.Struct struct_data = 5; - */ - public Builder setStructData(com.google.protobuf.Struct.Builder builderForValue) { - if (structDataBuilder_ == null) { - structData_ = builderForValue.build(); - } else { - structDataBuilder_.setMessage(builderForValue.build()); + // Construct using + // com.google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo.ChunkContent.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); } - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - /** - * - * - *
            -         * The structured JSON metadata for the document.
            -         * It is populated from the struct data from the Chunk in search result.
            -         * 
            - * - * .google.protobuf.Struct struct_data = 5; - */ - public Builder mergeStructData(com.google.protobuf.Struct value) { - if (structDataBuilder_ == null) { - if (((bitField0_ & 0x00000010) != 0) - && structData_ != null - && structData_ != com.google.protobuf.Struct.getDefaultInstance()) { - getStructDataBuilder().mergeFrom(value); - } else { - structData_ = value; - } - } else { - structDataBuilder_.mergeFrom(value); + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + content_ = ""; + pageIdentifier_ = ""; + relevanceScore_ = 0F; + blobAttachmentIndexes_ = emptyLongList(); + return this; } - if (structData_ != null) { - bitField0_ |= 0x00000010; - onChanged(); + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1beta.AnswerProto + .internal_static_google_cloud_discoveryengine_v1beta_Answer_Reference_UnstructuredDocumentInfo_ChunkContent_descriptor; } - return this; - } - /** - * - * - *
            -         * The structured JSON metadata for the document.
            -         * It is populated from the struct data from the Chunk in search result.
            -         * 
            - * - * .google.protobuf.Struct struct_data = 5; - */ - public Builder clearStructData() { - bitField0_ = (bitField0_ & ~0x00000010); - structData_ = null; - if (structDataBuilder_ != null) { - structDataBuilder_.dispose(); - structDataBuilder_ = null; + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo + .ChunkContent + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo + .ChunkContent.getDefaultInstance(); } - onChanged(); - return this; - } - /** - * - * - *
            -         * The structured JSON metadata for the document.
            -         * It is populated from the struct data from the Chunk in search result.
            -         * 
            - * - * .google.protobuf.Struct struct_data = 5; - */ - public com.google.protobuf.Struct.Builder getStructDataBuilder() { - bitField0_ |= 0x00000010; - onChanged(); - return internalGetStructDataFieldBuilder().getBuilder(); - } + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo + .ChunkContent + build() { + com.google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo + .ChunkContent + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } - /** - * - * - *
            -         * The structured JSON metadata for the document.
            -         * It is populated from the struct data from the Chunk in search result.
            -         * 
            - * - * .google.protobuf.Struct struct_data = 5; - */ - public com.google.protobuf.StructOrBuilder getStructDataOrBuilder() { - if (structDataBuilder_ != null) { - return structDataBuilder_.getMessageOrBuilder(); - } else { - return structData_ == null - ? com.google.protobuf.Struct.getDefaultInstance() - : structData_; + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo + .ChunkContent + buildPartial() { + com.google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo + .ChunkContent + result = + new com.google.cloud.discoveryengine.v1beta.Answer.Reference + .UnstructuredDocumentInfo.ChunkContent(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; } - } - /** - * - * - *
            -         * The structured JSON metadata for the document.
            -         * It is populated from the struct data from the Chunk in search result.
            -         * 
            - * - * .google.protobuf.Struct struct_data = 5; - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Struct, - com.google.protobuf.Struct.Builder, - com.google.protobuf.StructOrBuilder> - internalGetStructDataFieldBuilder() { - if (structDataBuilder_ == null) { - structDataBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Struct, - com.google.protobuf.Struct.Builder, - com.google.protobuf.StructOrBuilder>( - getStructData(), getParentForChildren(), isClean()); - structData_ = null; + private void buildPartial0( + com.google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo + .ChunkContent + result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.content_ = content_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.pageIdentifier_ = pageIdentifier_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.relevanceScore_ = relevanceScore_; + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + blobAttachmentIndexes_.makeImmutable(); + result.blobAttachmentIndexes_ = blobAttachmentIndexes_; + } + result.bitField0_ |= to_bitField0_; } - return structDataBuilder_; - } - // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo) - } - - // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo) - private static final com.google.cloud.discoveryengine.v1beta.Answer.Reference - .UnstructuredDocumentInfo - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = - new com.google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo(); - } - - public static com.google.cloud.discoveryengine.v1beta.Answer.Reference - .UnstructuredDocumentInfo - getDefaultInstance() { - return DEFAULT_INSTANCE; - } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo + .ChunkContent) { + return mergeFrom( + (com.google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo + .ChunkContent) + other); + } else { + super.mergeFrom(other); + return this; + } + } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public UnstructuredDocumentInfo parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException() - .setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo + .ChunkContent + other) { + if (other + == com.google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo + .ChunkContent.getDefaultInstance()) return this; + if (!other.getContent().isEmpty()) { + content_ = other.content_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getPageIdentifier().isEmpty()) { + pageIdentifier_ = other.pageIdentifier_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasRelevanceScore()) { + setRelevanceScore(other.getRelevanceScore()); + } + if (!other.blobAttachmentIndexes_.isEmpty()) { + if (blobAttachmentIndexes_.isEmpty()) { + blobAttachmentIndexes_ = other.blobAttachmentIndexes_; + blobAttachmentIndexes_.makeImmutable(); + bitField0_ |= 0x00000008; + } else { + ensureBlobAttachmentIndexesIsMutable(); + blobAttachmentIndexes_.addAll(other.blobAttachmentIndexes_); } - return builder.buildPartial(); + onChanged(); } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - } + @java.lang.Override + public final boolean isInitialized() { + return true; + } - public interface ChunkInfoOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo) - com.google.protobuf.MessageOrBuilder { + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + content_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + pageIdentifier_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 29: + { + relevanceScore_ = input.readFloat(); + bitField0_ |= 0x00000004; + break; + } // case 29 + case 32: + { + long v = input.readInt64(); + ensureBlobAttachmentIndexesIsMutable(); + blobAttachmentIndexes_.addLong(v); + break; + } // case 32 + case 34: + { + int length = input.readRawVarint32(); + int limit = input.pushLimit(length); + ensureBlobAttachmentIndexesIsMutable(); + while (input.getBytesUntilLimit() > 0) { + blobAttachmentIndexes_.addLong(input.readInt64()); + } + input.popLimit(limit); + break; + } // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } - /** - * - * - *
            -       * Chunk resource name.
            -       * 
            - * - * string chunk = 1 [(.google.api.resource_reference) = { ... } - * - * @return The chunk. - */ - java.lang.String getChunk(); + private int bitField0_; - /** - * - * - *
            -       * Chunk resource name.
            -       * 
            - * - * string chunk = 1 [(.google.api.resource_reference) = { ... } - * - * @return The bytes for chunk. - */ - com.google.protobuf.ByteString getChunkBytes(); + private java.lang.Object content_ = ""; - /** - * - * - *
            -       * Chunk textual content.
            -       * 
            - * - * string content = 2; - * - * @return The content. - */ - java.lang.String getContent(); + /** + * + * + *
            +           * Chunk textual content.
            +           * 
            + * + * string content = 1; + * + * @return The content. + */ + public java.lang.String getContent() { + java.lang.Object ref = content_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + content_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } - /** - * - * - *
            -       * Chunk textual content.
            -       * 
            - * - * string content = 2; - * - * @return The bytes for content. - */ - com.google.protobuf.ByteString getContentBytes(); + /** + * + * + *
            +           * Chunk textual content.
            +           * 
            + * + * string content = 1; + * + * @return The bytes for content. + */ + public com.google.protobuf.ByteString getContentBytes() { + java.lang.Object ref = content_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + content_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } - /** - * - * - *
            -       * The relevance of the chunk for a given query. Values range from 0.0
            -       * (completely irrelevant) to 1.0 (completely relevant).
            -       * This value is for informational purpose only. It may change for
            -       * the same query and chunk at any time due to a model retraining or
            -       * change in implementation.
            -       * 
            - * - * optional float relevance_score = 3; - * - * @return Whether the relevanceScore field is set. - */ - boolean hasRelevanceScore(); - - /** - * - * - *
            -       * The relevance of the chunk for a given query. Values range from 0.0
            -       * (completely irrelevant) to 1.0 (completely relevant).
            -       * This value is for informational purpose only. It may change for
            -       * the same query and chunk at any time due to a model retraining or
            -       * change in implementation.
            -       * 
            - * - * optional float relevance_score = 3; - * - * @return The relevanceScore. - */ - float getRelevanceScore(); - - /** - * - * - *
            -       * Document metadata.
            -       * 
            - * - * - * .google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo.DocumentMetadata document_metadata = 4; - * - * - * @return Whether the documentMetadata field is set. - */ - boolean hasDocumentMetadata(); + /** + * + * + *
            +           * Chunk textual content.
            +           * 
            + * + * string content = 1; + * + * @param value The content to set. + * @return This builder for chaining. + */ + public Builder setContent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + content_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } - /** - * - * - *
            -       * Document metadata.
            -       * 
            - * - * - * .google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo.DocumentMetadata document_metadata = 4; - * - * - * @return The documentMetadata. - */ - com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo.DocumentMetadata - getDocumentMetadata(); + /** + * + * + *
            +           * Chunk textual content.
            +           * 
            + * + * string content = 1; + * + * @return This builder for chaining. + */ + public Builder clearContent() { + content_ = getDefaultInstance().getContent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } - /** - * - * - *
            -       * Document metadata.
            -       * 
            - * - * - * .google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo.DocumentMetadata document_metadata = 4; - * - */ - com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo.DocumentMetadataOrBuilder - getDocumentMetadataOrBuilder(); - } + /** + * + * + *
            +           * Chunk textual content.
            +           * 
            + * + * string content = 1; + * + * @param value The bytes for content to set. + * @return This builder for chaining. + */ + public Builder setContentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + content_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } - /** - * - * - *
            -     * Chunk information.
            -     * 
            - * - * Protobuf type {@code google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo} - */ - public static final class ChunkInfo extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo) - ChunkInfoOrBuilder { - private static final long serialVersionUID = 0L; + private java.lang.Object pageIdentifier_ = ""; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "ChunkInfo"); - } + /** + * + * + *
            +           * Page identifier.
            +           * 
            + * + * string page_identifier = 2; + * + * @return The pageIdentifier. + */ + public java.lang.String getPageIdentifier() { + java.lang.Object ref = pageIdentifier_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageIdentifier_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } - // Use ChunkInfo.newBuilder() to construct. - private ChunkInfo(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } + /** + * + * + *
            +           * Page identifier.
            +           * 
            + * + * string page_identifier = 2; + * + * @return The bytes for pageIdentifier. + */ + public com.google.protobuf.ByteString getPageIdentifierBytes() { + java.lang.Object ref = pageIdentifier_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageIdentifier_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } - private ChunkInfo() { - chunk_ = ""; - content_ = ""; - } + /** + * + * + *
            +           * Page identifier.
            +           * 
            + * + * string page_identifier = 2; + * + * @param value The pageIdentifier to set. + * @return This builder for chaining. + */ + public Builder setPageIdentifier(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + pageIdentifier_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.discoveryengine.v1beta.AnswerProto - .internal_static_google_cloud_discoveryengine_v1beta_Answer_Reference_ChunkInfo_descriptor; - } + /** + * + * + *
            +           * Page identifier.
            +           * 
            + * + * string page_identifier = 2; + * + * @return This builder for chaining. + */ + public Builder clearPageIdentifier() { + pageIdentifier_ = getDefaultInstance().getPageIdentifier(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.discoveryengine.v1beta.AnswerProto - .internal_static_google_cloud_discoveryengine_v1beta_Answer_Reference_ChunkInfo_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo.class, - com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo.Builder.class); - } + /** + * + * + *
            +           * Page identifier.
            +           * 
            + * + * string page_identifier = 2; + * + * @param value The bytes for pageIdentifier to set. + * @return This builder for chaining. + */ + public Builder setPageIdentifierBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + pageIdentifier_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } - public interface DocumentMetadataOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo.DocumentMetadata) - com.google.protobuf.MessageOrBuilder { + private float relevanceScore_; - /** - * - * - *
            -         * Document resource name.
            -         * 
            - * - * string document = 1 [(.google.api.resource_reference) = { ... } - * - * @return The document. - */ - java.lang.String getDocument(); + /** + * + * + *
            +           * The relevance of the chunk for a given query. Values range from 0.0
            +           * (completely irrelevant) to 1.0 (completely relevant).
            +           * This value is for informational purpose only. It may change for
            +           * the same query and chunk at any time due to a model retraining or
            +           * change in implementation.
            +           * 
            + * + * optional float relevance_score = 3; + * + * @return Whether the relevanceScore field is set. + */ + @java.lang.Override + public boolean hasRelevanceScore() { + return ((bitField0_ & 0x00000004) != 0); + } - /** - * - * - *
            -         * Document resource name.
            -         * 
            - * - * string document = 1 [(.google.api.resource_reference) = { ... } - * - * @return The bytes for document. - */ - com.google.protobuf.ByteString getDocumentBytes(); + /** + * + * + *
            +           * The relevance of the chunk for a given query. Values range from 0.0
            +           * (completely irrelevant) to 1.0 (completely relevant).
            +           * This value is for informational purpose only. It may change for
            +           * the same query and chunk at any time due to a model retraining or
            +           * change in implementation.
            +           * 
            + * + * optional float relevance_score = 3; + * + * @return The relevanceScore. + */ + @java.lang.Override + public float getRelevanceScore() { + return relevanceScore_; + } - /** - * - * - *
            -         * URI for the document.
            -         * 
            - * - * string uri = 2; - * - * @return The uri. - */ - java.lang.String getUri(); + /** + * + * + *
            +           * The relevance of the chunk for a given query. Values range from 0.0
            +           * (completely irrelevant) to 1.0 (completely relevant).
            +           * This value is for informational purpose only. It may change for
            +           * the same query and chunk at any time due to a model retraining or
            +           * change in implementation.
            +           * 
            + * + * optional float relevance_score = 3; + * + * @param value The relevanceScore to set. + * @return This builder for chaining. + */ + public Builder setRelevanceScore(float value) { - /** - * - * - *
            -         * URI for the document.
            -         * 
            - * - * string uri = 2; - * - * @return The bytes for uri. - */ - com.google.protobuf.ByteString getUriBytes(); + relevanceScore_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } - /** - * - * - *
            -         * Title.
            -         * 
            - * - * string title = 3; - * - * @return The title. - */ - java.lang.String getTitle(); + /** + * + * + *
            +           * The relevance of the chunk for a given query. Values range from 0.0
            +           * (completely irrelevant) to 1.0 (completely relevant).
            +           * This value is for informational purpose only. It may change for
            +           * the same query and chunk at any time due to a model retraining or
            +           * change in implementation.
            +           * 
            + * + * optional float relevance_score = 3; + * + * @return This builder for chaining. + */ + public Builder clearRelevanceScore() { + bitField0_ = (bitField0_ & ~0x00000004); + relevanceScore_ = 0F; + onChanged(); + return this; + } - /** - * - * - *
            -         * Title.
            -         * 
            - * - * string title = 3; - * - * @return The bytes for title. - */ - com.google.protobuf.ByteString getTitleBytes(); + private com.google.protobuf.Internal.LongList blobAttachmentIndexes_ = emptyLongList(); - /** - * - * - *
            -         * Page identifier.
            -         * 
            - * - * string page_identifier = 4; - * - * @return The pageIdentifier. - */ - java.lang.String getPageIdentifier(); + private void ensureBlobAttachmentIndexesIsMutable() { + if (!blobAttachmentIndexes_.isModifiable()) { + blobAttachmentIndexes_ = makeMutableCopy(blobAttachmentIndexes_); + } + bitField0_ |= 0x00000008; + } - /** - * - * - *
            -         * Page identifier.
            -         * 
            - * - * string page_identifier = 4; - * - * @return The bytes for pageIdentifier. - */ - com.google.protobuf.ByteString getPageIdentifierBytes(); + /** + * + * + *
            +           * Output only. Stores indexes of blobattachments linked to this chunk.
            +           * 
            + * + * + * repeated int64 blob_attachment_indexes = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return A list containing the blobAttachmentIndexes. + */ + public java.util.List getBlobAttachmentIndexesList() { + blobAttachmentIndexes_.makeImmutable(); + return blobAttachmentIndexes_; + } - /** - * - * - *
            -         * The structured JSON metadata for the document.
            -         * It is populated from the struct data from the Chunk in search result.
            -         * 
            - * - * .google.protobuf.Struct struct_data = 5; - * - * @return Whether the structData field is set. - */ - boolean hasStructData(); + /** + * + * + *
            +           * Output only. Stores indexes of blobattachments linked to this chunk.
            +           * 
            + * + * + * repeated int64 blob_attachment_indexes = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The count of blobAttachmentIndexes. + */ + public int getBlobAttachmentIndexesCount() { + return blobAttachmentIndexes_.size(); + } - /** - * - * - *
            -         * The structured JSON metadata for the document.
            -         * It is populated from the struct data from the Chunk in search result.
            -         * 
            - * - * .google.protobuf.Struct struct_data = 5; - * - * @return The structData. - */ - com.google.protobuf.Struct getStructData(); + /** + * + * + *
            +           * Output only. Stores indexes of blobattachments linked to this chunk.
            +           * 
            + * + * + * repeated int64 blob_attachment_indexes = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index of the element to return. + * @return The blobAttachmentIndexes at the given index. + */ + public long getBlobAttachmentIndexes(int index) { + return blobAttachmentIndexes_.getLong(index); + } - /** - * - * - *
            -         * The structured JSON metadata for the document.
            -         * It is populated from the struct data from the Chunk in search result.
            -         * 
            - * - * .google.protobuf.Struct struct_data = 5; - */ - com.google.protobuf.StructOrBuilder getStructDataOrBuilder(); - } + /** + * + * + *
            +           * Output only. Stores indexes of blobattachments linked to this chunk.
            +           * 
            + * + * + * repeated int64 blob_attachment_indexes = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index to set the value at. + * @param value The blobAttachmentIndexes to set. + * @return This builder for chaining. + */ + public Builder setBlobAttachmentIndexes(int index, long value) { - /** - * - * - *
            -       * Document metadata.
            -       * 
            - * - * Protobuf type {@code - * google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo.DocumentMetadata} - */ - public static final class DocumentMetadata extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo.DocumentMetadata) - DocumentMetadataOrBuilder { - private static final long serialVersionUID = 0L; + ensureBlobAttachmentIndexesIsMutable(); + blobAttachmentIndexes_.setLong(index, value); + bitField0_ |= 0x00000008; + onChanged(); + return this; + } - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "DocumentMetadata"); - } + /** + * + * + *
            +           * Output only. Stores indexes of blobattachments linked to this chunk.
            +           * 
            + * + * + * repeated int64 blob_attachment_indexes = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The blobAttachmentIndexes to add. + * @return This builder for chaining. + */ + public Builder addBlobAttachmentIndexes(long value) { - // Use DocumentMetadata.newBuilder() to construct. - private DocumentMetadata(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } + ensureBlobAttachmentIndexesIsMutable(); + blobAttachmentIndexes_.addLong(value); + bitField0_ |= 0x00000008; + onChanged(); + return this; + } - private DocumentMetadata() { - document_ = ""; - uri_ = ""; - title_ = ""; - pageIdentifier_ = ""; + /** + * + * + *
            +           * Output only. Stores indexes of blobattachments linked to this chunk.
            +           * 
            + * + * + * repeated int64 blob_attachment_indexes = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param values The blobAttachmentIndexes to add. + * @return This builder for chaining. + */ + public Builder addAllBlobAttachmentIndexes( + java.lang.Iterable values) { + ensureBlobAttachmentIndexesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, blobAttachmentIndexes_); + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
            +           * Output only. Stores indexes of blobattachments linked to this chunk.
            +           * 
            + * + * + * repeated int64 blob_attachment_indexes = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearBlobAttachmentIndexes() { + blobAttachmentIndexes_ = emptyLongList(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo.ChunkContent) } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.discoveryengine.v1beta.AnswerProto - .internal_static_google_cloud_discoveryengine_v1beta_Answer_Reference_ChunkInfo_DocumentMetadata_descriptor; + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo.ChunkContent) + private static final com.google.cloud.discoveryengine.v1beta.Answer.Reference + .UnstructuredDocumentInfo.ChunkContent + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo + .ChunkContent(); } - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.discoveryengine.v1beta.AnswerProto - .internal_static_google_cloud_discoveryengine_v1beta_Answer_Reference_ChunkInfo_DocumentMetadata_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo - .DocumentMetadata.class, - com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo - .DocumentMetadata.Builder.class); + public static com.google.cloud.discoveryengine.v1beta.Answer.Reference + .UnstructuredDocumentInfo.ChunkContent + getDefaultInstance() { + return DEFAULT_INSTANCE; } - private int bitField0_; - public static final int DOCUMENT_FIELD_NUMBER = 1; + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ChunkContent parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; - @SuppressWarnings("serial") - private volatile java.lang.Object document_ = ""; + public static com.google.protobuf.Parser parser() { + return PARSER; + } - /** - * - * - *
            -         * Document resource name.
            -         * 
            - * - * string document = 1 [(.google.api.resource_reference) = { ... } - * - * @return The document. - */ @java.lang.Override - public java.lang.String getDocument() { - java.lang.Object ref = document_; - 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(); - document_ = s; - return s; - } + public com.google.protobuf.Parser getParserForType() { + return PARSER; } - /** - * - * - *
            -         * Document resource name.
            -         * 
            - * - * string document = 1 [(.google.api.resource_reference) = { ... } - * - * @return The bytes for document. - */ @java.lang.Override - public com.google.protobuf.ByteString getDocumentBytes() { - java.lang.Object ref = document_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - document_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } + public com.google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo + .ChunkContent + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; } + } - public static final int URI_FIELD_NUMBER = 2; + private int bitField0_; + public static final int DOCUMENT_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object uri_ = ""; + @SuppressWarnings("serial") + private volatile java.lang.Object document_ = ""; - /** - * - * - *
            -         * URI for the document.
            -         * 
            - * - * string uri = 2; - * - * @return The uri. - */ - @java.lang.Override - public java.lang.String getUri() { - java.lang.Object ref = uri_; - 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(); - uri_ = s; - return s; - } + /** + * + * + *
            +       * Document resource name.
            +       * 
            + * + * string document = 1 [(.google.api.resource_reference) = { ... } + * + * @return The document. + */ + @java.lang.Override + public java.lang.String getDocument() { + java.lang.Object ref = document_; + 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(); + document_ = s; + return s; } + } - /** - * - * - *
            -         * URI for the document.
            -         * 
            - * - * string uri = 2; - * - * @return The bytes for uri. - */ - @java.lang.Override - public com.google.protobuf.ByteString getUriBytes() { - java.lang.Object ref = uri_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - uri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } + /** + * + * + *
            +       * Document resource name.
            +       * 
            + * + * string document = 1 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for document. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDocumentBytes() { + java.lang.Object ref = document_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + document_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; } + } - public static final int TITLE_FIELD_NUMBER = 3; + public static final int URI_FIELD_NUMBER = 2; - @SuppressWarnings("serial") - private volatile java.lang.Object title_ = ""; + @SuppressWarnings("serial") + private volatile java.lang.Object uri_ = ""; - /** - * - * - *
            -         * Title.
            -         * 
            - * - * string title = 3; - * - * @return The title. - */ - @java.lang.Override - public java.lang.String getTitle() { - java.lang.Object ref = title_; - 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(); - title_ = s; - return s; - } + /** + * + * + *
            +       * URI for the document.
            +       * 
            + * + * string uri = 2; + * + * @return The uri. + */ + @java.lang.Override + public java.lang.String getUri() { + java.lang.Object ref = uri_; + 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(); + uri_ = s; + return s; } + } - /** - * - * - *
            -         * Title.
            -         * 
            - * - * string title = 3; - * - * @return The bytes for title. - */ - @java.lang.Override - public com.google.protobuf.ByteString getTitleBytes() { - java.lang.Object ref = title_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - title_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } + /** + * + * + *
            +       * URI for the document.
            +       * 
            + * + * string uri = 2; + * + * @return The bytes for uri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getUriBytes() { + java.lang.Object ref = uri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; } + } - public static final int PAGE_IDENTIFIER_FIELD_NUMBER = 4; + public static final int TITLE_FIELD_NUMBER = 3; - @SuppressWarnings("serial") - private volatile java.lang.Object pageIdentifier_ = ""; + @SuppressWarnings("serial") + private volatile java.lang.Object title_ = ""; - /** - * - * - *
            -         * Page identifier.
            -         * 
            - * - * string page_identifier = 4; - * - * @return The pageIdentifier. - */ - @java.lang.Override - public java.lang.String getPageIdentifier() { - java.lang.Object ref = pageIdentifier_; - 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(); - pageIdentifier_ = s; - return s; - } + /** + * + * + *
            +       * Title.
            +       * 
            + * + * string title = 3; + * + * @return The title. + */ + @java.lang.Override + public java.lang.String getTitle() { + java.lang.Object ref = title_; + 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(); + title_ = s; + return s; } + } - /** - * - * - *
            -         * Page identifier.
            -         * 
            - * - * string page_identifier = 4; - * - * @return The bytes for pageIdentifier. - */ - @java.lang.Override - public com.google.protobuf.ByteString getPageIdentifierBytes() { - java.lang.Object ref = pageIdentifier_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - pageIdentifier_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } + /** + * + * + *
            +       * Title.
            +       * 
            + * + * string title = 3; + * + * @return The bytes for title. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTitleBytes() { + java.lang.Object ref = title_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + title_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; } + } - public static final int STRUCT_DATA_FIELD_NUMBER = 5; - private com.google.protobuf.Struct structData_; - - /** - * - * - *
            -         * The structured JSON metadata for the document.
            -         * It is populated from the struct data from the Chunk in search result.
            -         * 
            - * - * .google.protobuf.Struct struct_data = 5; - * - * @return Whether the structData field is set. - */ - @java.lang.Override - public boolean hasStructData() { - return ((bitField0_ & 0x00000001) != 0); - } + public static final int CHUNK_CONTENTS_FIELD_NUMBER = 4; - /** - * - * - *
            -         * The structured JSON metadata for the document.
            -         * It is populated from the struct data from the Chunk in search result.
            -         * 
            - * - * .google.protobuf.Struct struct_data = 5; - * - * @return The structData. - */ - @java.lang.Override - public com.google.protobuf.Struct getStructData() { - return structData_ == null - ? com.google.protobuf.Struct.getDefaultInstance() - : structData_; - } + @SuppressWarnings("serial") + private java.util.List< + com.google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo + .ChunkContent> + chunkContents_; - /** - * - * - *
            -         * The structured JSON metadata for the document.
            -         * It is populated from the struct data from the Chunk in search result.
            -         * 
            - * - * .google.protobuf.Struct struct_data = 5; - */ - @java.lang.Override - public com.google.protobuf.StructOrBuilder getStructDataOrBuilder() { - return structData_ == null - ? com.google.protobuf.Struct.getDefaultInstance() - : structData_; - } + /** + * + * + *
            +       * List of cited chunk contents derived from document content.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo.ChunkContent chunk_contents = 4; + * + */ + @java.lang.Override + public java.util.List< + com.google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo + .ChunkContent> + getChunkContentsList() { + return chunkContents_; + } - private byte memoizedIsInitialized = -1; + /** + * + * + *
            +       * List of cited chunk contents derived from document content.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo.ChunkContent chunk_contents = 4; + * + */ + @java.lang.Override + public java.util.List< + ? extends + com.google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo + .ChunkContentOrBuilder> + getChunkContentsOrBuilderList() { + return chunkContents_; + } - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + /** + * + * + *
            +       * List of cited chunk contents derived from document content.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo.ChunkContent chunk_contents = 4; + * + */ + @java.lang.Override + public int getChunkContentsCount() { + return chunkContents_.size(); + } - memoizedIsInitialized = 1; - return true; - } + /** + * + * + *
            +       * List of cited chunk contents derived from document content.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo.ChunkContent chunk_contents = 4; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo + .ChunkContent + getChunkContents(int index) { + return chunkContents_.get(index); + } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(document_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, document_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(uri_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 2, uri_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(title_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 3, title_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageIdentifier_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 4, pageIdentifier_); - } - if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(5, getStructData()); - } - getUnknownFields().writeTo(output); - } + /** + * + * + *
            +       * List of cited chunk contents derived from document content.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo.ChunkContent chunk_contents = 4; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo + .ChunkContentOrBuilder + getChunkContentsOrBuilder(int index) { + return chunkContents_.get(index); + } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; + public static final int STRUCT_DATA_FIELD_NUMBER = 5; + private com.google.protobuf.Struct structData_; - size = 0; - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(document_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, document_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(uri_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(2, uri_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(title_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(3, title_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageIdentifier_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(4, pageIdentifier_); - } - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getStructData()); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } + /** + * + * + *
            +       * The structured JSON metadata for the document.
            +       * It is populated from the struct data from the Chunk in search result.
            +       * 
            + * + * .google.protobuf.Struct struct_data = 5; + * + * @return Whether the structData field is set. + */ + @java.lang.Override + public boolean hasStructData() { + return ((bitField0_ & 0x00000001) != 0); + } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj - instanceof - com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo - .DocumentMetadata)) { - return super.equals(obj); - } - com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo.DocumentMetadata - other = - (com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo - .DocumentMetadata) - obj; + /** + * + * + *
            +       * The structured JSON metadata for the document.
            +       * It is populated from the struct data from the Chunk in search result.
            +       * 
            + * + * .google.protobuf.Struct struct_data = 5; + * + * @return The structData. + */ + @java.lang.Override + public com.google.protobuf.Struct getStructData() { + return structData_ == null ? com.google.protobuf.Struct.getDefaultInstance() : structData_; + } - if (!getDocument().equals(other.getDocument())) return false; - if (!getUri().equals(other.getUri())) return false; - if (!getTitle().equals(other.getTitle())) return false; - if (!getPageIdentifier().equals(other.getPageIdentifier())) return false; - if (hasStructData() != other.hasStructData()) return false; - if (hasStructData()) { - if (!getStructData().equals(other.getStructData())) return false; - } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } + /** + * + * + *
            +       * The structured JSON metadata for the document.
            +       * It is populated from the struct data from the Chunk in search result.
            +       * 
            + * + * .google.protobuf.Struct struct_data = 5; + */ + @java.lang.Override + public com.google.protobuf.StructOrBuilder getStructDataOrBuilder() { + return structData_ == null ? com.google.protobuf.Struct.getDefaultInstance() : structData_; + } - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + DOCUMENT_FIELD_NUMBER; - hash = (53 * hash) + getDocument().hashCode(); - hash = (37 * hash) + URI_FIELD_NUMBER; - hash = (53 * hash) + getUri().hashCode(); - hash = (37 * hash) + TITLE_FIELD_NUMBER; - hash = (53 * hash) + getTitle().hashCode(); - hash = (37 * hash) + PAGE_IDENTIFIER_FIELD_NUMBER; - hash = (53 * hash) + getPageIdentifier().hashCode(); - if (hasStructData()) { - hash = (37 * hash) + STRUCT_DATA_FIELD_NUMBER; - hash = (53 * hash) + getStructData().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } + private byte memoizedIsInitialized = -1; - public static com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo - .DocumentMetadata - parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; - public static com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo - .DocumentMetadata - parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } + memoizedIsInitialized = 1; + return true; + } - public static com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo - .DocumentMetadata - parseFrom(com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(document_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, document_); } - - public static com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo - .DocumentMetadata - parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(uri_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, uri_); } - - public static com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo - .DocumentMetadata - parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(title_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, title_); } - - public static com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo - .DocumentMetadata - parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); + for (int i = 0; i < chunkContents_.size(); i++) { + output.writeMessage(4, chunkContents_.get(i)); } - - public static com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo - .DocumentMetadata - parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(5, getStructData()); } + getUnknownFields().writeTo(output); + } - public static com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo - .DocumentMetadata - parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; - public static com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo - .DocumentMetadata - parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(document_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, document_); } - - public static com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo - .DocumentMetadata - parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(uri_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, uri_); } - - public static com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo - .DocumentMetadata - parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(title_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, title_); } - - public static com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo - .DocumentMetadata - parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); + for (int i = 0; i < chunkContents_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(4, chunkContents_.get(i)); } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getStructData()); } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; } - - public static Builder newBuilder( - com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo.DocumentMetadata - prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + if (!(obj + instanceof + com.google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo)) { + return super.equals(obj); } + com.google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo other = + (com.google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo) obj; - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + if (!getDocument().equals(other.getDocument())) return false; + if (!getUri().equals(other.getUri())) return false; + if (!getTitle().equals(other.getTitle())) return false; + if (!getChunkContentsList().equals(other.getChunkContentsList())) return false; + if (hasStructData() != other.hasStructData()) return false; + if (hasStructData()) { + if (!getStructData().equals(other.getStructData())) return false; } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + DOCUMENT_FIELD_NUMBER; + hash = (53 * hash) + getDocument().hashCode(); + hash = (37 * hash) + URI_FIELD_NUMBER; + hash = (53 * hash) + getUri().hashCode(); + hash = (37 * hash) + TITLE_FIELD_NUMBER; + hash = (53 * hash) + getTitle().hashCode(); + if (getChunkContentsCount() > 0) { + hash = (37 * hash) + CHUNK_CONTENTS_FIELD_NUMBER; + hash = (53 * hash) + getChunkContentsList().hashCode(); } + if (hasStructData()) { + hash = (37 * hash) + STRUCT_DATA_FIELD_NUMBER; + hash = (53 * hash) + getStructData().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } - /** - * - * - *
            -         * Document metadata.
            -         * 
            - * - * Protobuf type {@code - * google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo.DocumentMetadata} - */ - public static final class Builder - extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo.DocumentMetadata) - com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo - .DocumentMetadataOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.discoveryengine.v1beta.AnswerProto - .internal_static_google_cloud_discoveryengine_v1beta_Answer_Reference_ChunkInfo_DocumentMetadata_descriptor; - } + public static com.google.cloud.discoveryengine.v1beta.Answer.Reference + .UnstructuredDocumentInfo + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.discoveryengine.v1beta.AnswerProto - .internal_static_google_cloud_discoveryengine_v1beta_Answer_Reference_ChunkInfo_DocumentMetadata_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo - .DocumentMetadata.class, - com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo - .DocumentMetadata.Builder.class); - } - - // Construct using - // com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo.DocumentMetadata.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - internalGetStructDataFieldBuilder(); - } - } + public static com.google.cloud.discoveryengine.v1beta.Answer.Reference + .UnstructuredDocumentInfo + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - document_ = ""; - uri_ = ""; - title_ = ""; - pageIdentifier_ = ""; - structData_ = null; - if (structDataBuilder_ != null) { - structDataBuilder_.dispose(); - structDataBuilder_ = null; - } - return this; - } + public static com.google.cloud.discoveryengine.v1beta.Answer.Reference + .UnstructuredDocumentInfo + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.discoveryengine.v1beta.AnswerProto - .internal_static_google_cloud_discoveryengine_v1beta_Answer_Reference_ChunkInfo_DocumentMetadata_descriptor; - } + public static com.google.cloud.discoveryengine.v1beta.Answer.Reference + .UnstructuredDocumentInfo + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo.DocumentMetadata - getDefaultInstanceForType() { - return com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo - .DocumentMetadata.getDefaultInstance(); - } + public static com.google.cloud.discoveryengine.v1beta.Answer.Reference + .UnstructuredDocumentInfo + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo.DocumentMetadata - build() { - com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo.DocumentMetadata - result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } + public static com.google.cloud.discoveryengine.v1beta.Answer.Reference + .UnstructuredDocumentInfo + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo.DocumentMetadata - buildPartial() { - com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo.DocumentMetadata - result = - new com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo - .DocumentMetadata(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } + public static com.google.cloud.discoveryengine.v1beta.Answer.Reference + .UnstructuredDocumentInfo + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } - private void buildPartial0( - com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo.DocumentMetadata - result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.document_ = document_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.uri_ = uri_; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.title_ = title_; - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.pageIdentifier_ = pageIdentifier_; - } - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000010) != 0)) { - result.structData_ = - structDataBuilder_ == null ? structData_ : structDataBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - result.bitField0_ |= to_bitField0_; - } + public static com.google.cloud.discoveryengine.v1beta.Answer.Reference + .UnstructuredDocumentInfo + parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other - instanceof - com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo - .DocumentMetadata) { - return mergeFrom( - (com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo - .DocumentMetadata) - other); - } else { - super.mergeFrom(other); - return this; - } - } + public static com.google.cloud.discoveryengine.v1beta.Answer.Reference + .UnstructuredDocumentInfo + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } - public Builder mergeFrom( - com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo.DocumentMetadata - other) { - if (other - == com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo - .DocumentMetadata.getDefaultInstance()) return this; - if (!other.getDocument().isEmpty()) { - document_ = other.document_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (!other.getUri().isEmpty()) { - uri_ = other.uri_; - bitField0_ |= 0x00000002; - onChanged(); - } - if (!other.getTitle().isEmpty()) { - title_ = other.title_; - bitField0_ |= 0x00000004; - onChanged(); - } - if (!other.getPageIdentifier().isEmpty()) { - pageIdentifier_ = other.pageIdentifier_; - bitField0_ |= 0x00000008; - onChanged(); - } - if (other.hasStructData()) { - mergeStructData(other.getStructData()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } + public static com.google.cloud.discoveryengine.v1beta.Answer.Reference + .UnstructuredDocumentInfo + parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } - @java.lang.Override - public final boolean isInitialized() { - return true; - } + public static com.google.cloud.discoveryengine.v1beta.Answer.Reference + .UnstructuredDocumentInfo + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } - @java.lang.Override - public Builder mergeFrom( + public static com.google.cloud.discoveryengine.v1beta.Answer.Reference + .UnstructuredDocumentInfo + parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - document_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: - { - uri_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 26: - { - title_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - break; - } // case 26 - case 34: - { - pageIdentifier_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - break; - } // case 34 - case 42: - { - input.readMessage( - internalGetStructDataFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000010; - break; - } // case 42 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } - private int bitField0_; + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } - private java.lang.Object document_ = ""; + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } - /** - * - * - *
            -           * Document resource name.
            -           * 
            - * - * string document = 1 [(.google.api.resource_reference) = { ... } - * - * @return The document. - */ - public java.lang.String getDocument() { - java.lang.Object ref = document_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - document_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } + public static Builder newBuilder( + com.google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo + prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } - /** - * - * - *
            -           * Document resource name.
            -           * 
            - * - * string document = 1 [(.google.api.resource_reference) = { ... } - * - * @return The bytes for document. - */ - public com.google.protobuf.ByteString getDocumentBytes() { - java.lang.Object ref = document_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - document_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } - /** - * - * - *
            -           * Document resource name.
            -           * 
            - * - * string document = 1 [(.google.api.resource_reference) = { ... } - * - * @param value The document to set. - * @return This builder for chaining. - */ - public Builder setDocument(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - document_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } - /** - * - * - *
            -           * Document resource name.
            -           * 
            - * - * string document = 1 [(.google.api.resource_reference) = { ... } - * - * @return This builder for chaining. - */ - public Builder clearDocument() { - document_ = getDefaultInstance().getDocument(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } + /** + * + * + *
            +       * Unstructured document information.
            +       * 
            + * + * Protobuf type {@code + * google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo) + com.google.cloud.discoveryengine.v1beta.Answer.Reference + .UnstructuredDocumentInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.AnswerProto + .internal_static_google_cloud_discoveryengine_v1beta_Answer_Reference_UnstructuredDocumentInfo_descriptor; + } - /** - * - * - *
            -           * Document resource name.
            -           * 
            - * - * string document = 1 [(.google.api.resource_reference) = { ... } - * - * @param value The bytes for document to set. - * @return This builder for chaining. - */ - public Builder setDocumentBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - document_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.AnswerProto + .internal_static_google_cloud_discoveryengine_v1beta_Answer_Reference_UnstructuredDocumentInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo + .class, + com.google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo + .Builder.class); + } - private java.lang.Object uri_ = ""; + // Construct using + // com.google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } - /** - * - * - *
            -           * URI for the document.
            -           * 
            - * - * string uri = 2; - * - * @return The uri. - */ - public java.lang.String getUri() { - java.lang.Object ref = uri_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - uri_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } - /** - * - * - *
            -           * URI for the document.
            -           * 
            - * - * string uri = 2; - * - * @return The bytes for uri. - */ - public com.google.protobuf.ByteString getUriBytes() { - java.lang.Object ref = uri_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - uri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetChunkContentsFieldBuilder(); + internalGetStructDataFieldBuilder(); } + } - /** - * - * - *
            -           * URI for the document.
            -           * 
            - * - * string uri = 2; - * - * @param value The uri to set. - * @return This builder for chaining. - */ - public Builder setUri(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - uri_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + document_ = ""; + uri_ = ""; + title_ = ""; + if (chunkContentsBuilder_ == null) { + chunkContents_ = java.util.Collections.emptyList(); + } else { + chunkContents_ = null; + chunkContentsBuilder_.clear(); } - - /** - * - * - *
            -           * URI for the document.
            -           * 
            - * - * string uri = 2; - * - * @return This builder for chaining. - */ - public Builder clearUri() { - uri_ = getDefaultInstance().getUri(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; + bitField0_ = (bitField0_ & ~0x00000008); + structData_ = null; + if (structDataBuilder_ != null) { + structDataBuilder_.dispose(); + structDataBuilder_ = null; } + return this; + } - /** - * - * - *
            -           * URI for the document.
            -           * 
            - * - * string uri = 2; - * - * @param value The bytes for uri to set. - * @return This builder for chaining. - */ - public Builder setUriBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - uri_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1beta.AnswerProto + .internal_static_google_cloud_discoveryengine_v1beta_Answer_Reference_UnstructuredDocumentInfo_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo + build() { + com.google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); } + return result; + } - private java.lang.Object title_ = ""; + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo + buildPartial() { + com.google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo result = + new com.google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo( + this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } - /** - * - * - *
            -           * Title.
            -           * 
            - * - * string title = 3; - * - * @return The title. - */ - public java.lang.String getTitle() { - java.lang.Object ref = title_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - title_ = s; - return s; - } else { - return (java.lang.String) ref; + private void buildPartialRepeatedFields( + com.google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo + result) { + if (chunkContentsBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0)) { + chunkContents_ = java.util.Collections.unmodifiableList(chunkContents_); + bitField0_ = (bitField0_ & ~0x00000008); } + result.chunkContents_ = chunkContents_; + } else { + result.chunkContents_ = chunkContentsBuilder_.build(); } + } - /** - * - * - *
            -           * Title.
            -           * 
            - * - * string title = 3; - * - * @return The bytes for title. - */ - public com.google.protobuf.ByteString getTitleBytes() { - java.lang.Object ref = title_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - title_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } + private void buildPartial0( + com.google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo + result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.document_ = document_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.uri_ = uri_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.title_ = title_; } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000010) != 0)) { + result.structData_ = + structDataBuilder_ == null ? structData_ : structDataBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } - /** - * - * - *
            -           * Title.
            -           * 
            - * - * string title = 3; - * - * @param value The title to set. - * @return This builder for chaining. - */ - public Builder setTitle(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - title_ = value; - bitField0_ |= 0x00000004; - onChanged(); + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo) { + return mergeFrom( + (com.google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo) + other); + } else { + super.mergeFrom(other); return this; } + } - /** - * - * - *
            -           * Title.
            -           * 
            - * - * string title = 3; - * - * @return This builder for chaining. - */ - public Builder clearTitle() { - title_ = getDefaultInstance().getTitle(); - bitField0_ = (bitField0_ & ~0x00000004); + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo + other) { + if (other + == com.google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo + .getDefaultInstance()) return this; + if (!other.getDocument().isEmpty()) { + document_ = other.document_; + bitField0_ |= 0x00000001; onChanged(); - return this; } - - /** - * - * - *
            -           * Title.
            -           * 
            - * - * string title = 3; - * - * @param value The bytes for title to set. - * @return This builder for chaining. - */ - public Builder setTitleBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - title_ = value; + if (!other.getUri().isEmpty()) { + uri_ = other.uri_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getTitle().isEmpty()) { + title_ = other.title_; bitField0_ |= 0x00000004; onChanged(); - return this; } - - private java.lang.Object pageIdentifier_ = ""; - - /** - * - * - *
            -           * Page identifier.
            -           * 
            - * - * string page_identifier = 4; - * - * @return The pageIdentifier. - */ - public java.lang.String getPageIdentifier() { - java.lang.Object ref = pageIdentifier_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - pageIdentifier_ = s; - return s; - } else { - return (java.lang.String) ref; + if (chunkContentsBuilder_ == null) { + if (!other.chunkContents_.isEmpty()) { + if (chunkContents_.isEmpty()) { + chunkContents_ = other.chunkContents_; + bitField0_ = (bitField0_ & ~0x00000008); + } else { + ensureChunkContentsIsMutable(); + chunkContents_.addAll(other.chunkContents_); + } + onChanged(); } - } - - /** - * - * - *
            -           * Page identifier.
            -           * 
            - * - * string page_identifier = 4; - * - * @return The bytes for pageIdentifier. - */ - public com.google.protobuf.ByteString getPageIdentifierBytes() { - java.lang.Object ref = pageIdentifier_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - pageIdentifier_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; + } else { + if (!other.chunkContents_.isEmpty()) { + if (chunkContentsBuilder_.isEmpty()) { + chunkContentsBuilder_.dispose(); + chunkContentsBuilder_ = null; + chunkContents_ = other.chunkContents_; + bitField0_ = (bitField0_ & ~0x00000008); + chunkContentsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetChunkContentsFieldBuilder() + : null; + } else { + chunkContentsBuilder_.addAllMessages(other.chunkContents_); + } } } - - /** - * - * - *
            -           * Page identifier.
            -           * 
            - * - * string page_identifier = 4; - * - * @param value The pageIdentifier to set. - * @return This builder for chaining. - */ - public Builder setPageIdentifier(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - pageIdentifier_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; + if (other.hasStructData()) { + mergeStructData(other.getStructData()); } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } - /** - * - * - *
            -           * Page identifier.
            -           * 
            - * - * string page_identifier = 4; - * - * @return This builder for chaining. - */ - public Builder clearPageIdentifier() { - pageIdentifier_ = getDefaultInstance().getPageIdentifier(); - bitField0_ = (bitField0_ & ~0x00000008); - onChanged(); - return this; - } + @java.lang.Override + public final boolean isInitialized() { + return true; + } - /** - * - * - *
            -           * Page identifier.
            -           * 
            - * - * string page_identifier = 4; - * - * @param value The bytes for pageIdentifier to set. - * @return This builder for chaining. - */ - public Builder setPageIdentifierBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - pageIdentifier_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + document_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + uri_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + title_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + com.google.cloud.discoveryengine.v1beta.Answer.Reference + .UnstructuredDocumentInfo.ChunkContent + m = + input.readMessage( + com.google.cloud.discoveryengine.v1beta.Answer.Reference + .UnstructuredDocumentInfo.ChunkContent.parser(), + extensionRegistry); + if (chunkContentsBuilder_ == null) { + ensureChunkContentsIsMutable(); + chunkContents_.add(m); + } else { + chunkContentsBuilder_.addMessage(m); + } + break; + } // case 34 + case 42: + { + input.readMessage( + internalGetStructDataFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 42 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } - private com.google.protobuf.Struct structData_; - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Struct, - com.google.protobuf.Struct.Builder, - com.google.protobuf.StructOrBuilder> - structDataBuilder_; + private int bitField0_; - /** - * - * - *
            -           * The structured JSON metadata for the document.
            -           * It is populated from the struct data from the Chunk in search result.
            -           * 
            - * - * .google.protobuf.Struct struct_data = 5; - * - * @return Whether the structData field is set. - */ - public boolean hasStructData() { - return ((bitField0_ & 0x00000010) != 0); + private java.lang.Object document_ = ""; + + /** + * + * + *
            +         * Document resource name.
            +         * 
            + * + * string document = 1 [(.google.api.resource_reference) = { ... } + * + * @return The document. + */ + public java.lang.String getDocument() { + java.lang.Object ref = document_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + document_ = s; + return s; + } else { + return (java.lang.String) ref; } + } - /** - * - * - *
            -           * The structured JSON metadata for the document.
            -           * It is populated from the struct data from the Chunk in search result.
            -           * 
            - * - * .google.protobuf.Struct struct_data = 5; - * - * @return The structData. - */ - public com.google.protobuf.Struct getStructData() { - if (structDataBuilder_ == null) { - return structData_ == null - ? com.google.protobuf.Struct.getDefaultInstance() - : structData_; - } else { - return structDataBuilder_.getMessage(); - } + /** + * + * + *
            +         * Document resource name.
            +         * 
            + * + * string document = 1 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for document. + */ + public com.google.protobuf.ByteString getDocumentBytes() { + java.lang.Object ref = document_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + document_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; } + } - /** - * - * - *
            -           * The structured JSON metadata for the document.
            -           * It is populated from the struct data from the Chunk in search result.
            -           * 
            - * - * .google.protobuf.Struct struct_data = 5; - */ - public Builder setStructData(com.google.protobuf.Struct value) { - if (structDataBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - structData_ = value; - } else { - structDataBuilder_.setMessage(value); - } - bitField0_ |= 0x00000010; - onChanged(); - return this; + /** + * + * + *
            +         * Document resource name.
            +         * 
            + * + * string document = 1 [(.google.api.resource_reference) = { ... } + * + * @param value The document to set. + * @return This builder for chaining. + */ + public Builder setDocument(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); } + document_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } - /** - * - * - *
            -           * The structured JSON metadata for the document.
            -           * It is populated from the struct data from the Chunk in search result.
            -           * 
            - * - * .google.protobuf.Struct struct_data = 5; - */ - public Builder setStructData(com.google.protobuf.Struct.Builder builderForValue) { - if (structDataBuilder_ == null) { - structData_ = builderForValue.build(); - } else { - structDataBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000010; - onChanged(); - return this; - } + /** + * + * + *
            +         * Document resource name.
            +         * 
            + * + * string document = 1 [(.google.api.resource_reference) = { ... } + * + * @return This builder for chaining. + */ + public Builder clearDocument() { + document_ = getDefaultInstance().getDocument(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } - /** - * - * - *
            -           * The structured JSON metadata for the document.
            -           * It is populated from the struct data from the Chunk in search result.
            -           * 
            - * - * .google.protobuf.Struct struct_data = 5; - */ - public Builder mergeStructData(com.google.protobuf.Struct value) { - if (structDataBuilder_ == null) { - if (((bitField0_ & 0x00000010) != 0) - && structData_ != null - && structData_ != com.google.protobuf.Struct.getDefaultInstance()) { - getStructDataBuilder().mergeFrom(value); - } else { - structData_ = value; - } - } else { - structDataBuilder_.mergeFrom(value); - } - if (structData_ != null) { - bitField0_ |= 0x00000010; - onChanged(); - } - return this; + /** + * + * + *
            +         * Document resource name.
            +         * 
            + * + * string document = 1 [(.google.api.resource_reference) = { ... } + * + * @param value The bytes for document to set. + * @return This builder for chaining. + */ + public Builder setDocumentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); } + checkByteStringIsUtf8(value); + document_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } - /** - * - * - *
            -           * The structured JSON metadata for the document.
            -           * It is populated from the struct data from the Chunk in search result.
            -           * 
            - * - * .google.protobuf.Struct struct_data = 5; - */ - public Builder clearStructData() { - bitField0_ = (bitField0_ & ~0x00000010); - structData_ = null; - if (structDataBuilder_ != null) { - structDataBuilder_.dispose(); - structDataBuilder_ = null; - } - onChanged(); - return this; - } + private java.lang.Object uri_ = ""; - /** - * - * - *
            -           * The structured JSON metadata for the document.
            -           * It is populated from the struct data from the Chunk in search result.
            -           * 
            - * - * .google.protobuf.Struct struct_data = 5; - */ - public com.google.protobuf.Struct.Builder getStructDataBuilder() { - bitField0_ |= 0x00000010; - onChanged(); - return internalGetStructDataFieldBuilder().getBuilder(); + /** + * + * + *
            +         * URI for the document.
            +         * 
            + * + * string uri = 2; + * + * @return The uri. + */ + public java.lang.String getUri() { + java.lang.Object ref = uri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uri_ = s; + return s; + } else { + return (java.lang.String) ref; } + } - /** - * - * - *
            -           * The structured JSON metadata for the document.
            -           * It is populated from the struct data from the Chunk in search result.
            -           * 
            - * - * .google.protobuf.Struct struct_data = 5; - */ - public com.google.protobuf.StructOrBuilder getStructDataOrBuilder() { - if (structDataBuilder_ != null) { - return structDataBuilder_.getMessageOrBuilder(); - } else { - return structData_ == null - ? com.google.protobuf.Struct.getDefaultInstance() - : structData_; - } + /** + * + * + *
            +         * URI for the document.
            +         * 
            + * + * string uri = 2; + * + * @return The bytes for uri. + */ + public com.google.protobuf.ByteString getUriBytes() { + java.lang.Object ref = uri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; } + } - /** - * - * - *
            -           * The structured JSON metadata for the document.
            -           * It is populated from the struct data from the Chunk in search result.
            -           * 
            - * - * .google.protobuf.Struct struct_data = 5; - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Struct, - com.google.protobuf.Struct.Builder, - com.google.protobuf.StructOrBuilder> - internalGetStructDataFieldBuilder() { - if (structDataBuilder_ == null) { - structDataBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Struct, - com.google.protobuf.Struct.Builder, - com.google.protobuf.StructOrBuilder>( - getStructData(), getParentForChildren(), isClean()); - structData_ = null; - } - return structDataBuilder_; + /** + * + * + *
            +         * URI for the document.
            +         * 
            + * + * string uri = 2; + * + * @param value The uri to set. + * @return This builder for chaining. + */ + public Builder setUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); } - - // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo.DocumentMetadata) + uri_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; } - // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo.DocumentMetadata) - private static final com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo - .DocumentMetadata - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = - new com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo - .DocumentMetadata(); + /** + * + * + *
            +         * URI for the document.
            +         * 
            + * + * string uri = 2; + * + * @return This builder for chaining. + */ + public Builder clearUri() { + uri_ = getDefaultInstance().getUri(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; } - public static com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo - .DocumentMetadata - getDefaultInstance() { - return DEFAULT_INSTANCE; + /** + * + * + *
            +         * URI for the document.
            +         * 
            + * + * string uri = 2; + * + * @param value The bytes for uri to set. + * @return This builder for chaining. + */ + public Builder setUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + uri_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DocumentMetadata parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException() - .setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; + private java.lang.Object title_ = ""; - public static com.google.protobuf.Parser parser() { - return PARSER; + /** + * + * + *
            +         * Title.
            +         * 
            + * + * string title = 3; + * + * @return The title. + */ + public java.lang.String getTitle() { + java.lang.Object ref = title_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + title_ = s; + return s; + } else { + return (java.lang.String) ref; + } } - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; + /** + * + * + *
            +         * Title.
            +         * 
            + * + * string title = 3; + * + * @return The bytes for title. + */ + public com.google.protobuf.ByteString getTitleBytes() { + java.lang.Object ref = title_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + title_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } } - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo.DocumentMetadata - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; + /** + * + * + *
            +         * Title.
            +         * 
            + * + * string title = 3; + * + * @param value The title to set. + * @return This builder for chaining. + */ + public Builder setTitle(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + title_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; } - } - - private int bitField0_; - public static final int CHUNK_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object chunk_ = ""; + /** + * + * + *
            +         * Title.
            +         * 
            + * + * string title = 3; + * + * @return This builder for chaining. + */ + public Builder clearTitle() { + title_ = getDefaultInstance().getTitle(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } - /** - * - * - *
            -       * Chunk resource name.
            -       * 
            - * - * string chunk = 1 [(.google.api.resource_reference) = { ... } - * - * @return The chunk. - */ - @java.lang.Override - public java.lang.String getChunk() { - java.lang.Object ref = chunk_; - 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(); - chunk_ = s; - return s; + /** + * + * + *
            +         * Title.
            +         * 
            + * + * string title = 3; + * + * @param value The bytes for title to set. + * @return This builder for chaining. + */ + public Builder setTitleBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + title_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; } - } - /** - * - * - *
            -       * Chunk resource name.
            -       * 
            - * - * string chunk = 1 [(.google.api.resource_reference) = { ... } - * - * @return The bytes for chunk. - */ - @java.lang.Override - public com.google.protobuf.ByteString getChunkBytes() { - java.lang.Object ref = chunk_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - chunk_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } + private java.util.List< + com.google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo + .ChunkContent> + chunkContents_ = java.util.Collections.emptyList(); - public static final int CONTENT_FIELD_NUMBER = 2; + private void ensureChunkContentsIsMutable() { + if (!((bitField0_ & 0x00000008) != 0)) { + chunkContents_ = + new java.util.ArrayList< + com.google.cloud.discoveryengine.v1beta.Answer.Reference + .UnstructuredDocumentInfo.ChunkContent>(chunkContents_); + bitField0_ |= 0x00000008; + } + } - @SuppressWarnings("serial") - private volatile java.lang.Object content_ = ""; + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo + .ChunkContent, + com.google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo + .ChunkContent.Builder, + com.google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo + .ChunkContentOrBuilder> + chunkContentsBuilder_; - /** - * - * - *
            -       * Chunk textual content.
            -       * 
            - * - * string content = 2; - * - * @return The content. - */ - @java.lang.Override - public java.lang.String getContent() { - java.lang.Object ref = content_; - 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(); - content_ = s; - return s; + /** + * + * + *
            +         * List of cited chunk contents derived from document content.
            +         * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo.ChunkContent chunk_contents = 4; + * + */ + public java.util.List< + com.google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo + .ChunkContent> + getChunkContentsList() { + if (chunkContentsBuilder_ == null) { + return java.util.Collections.unmodifiableList(chunkContents_); + } else { + return chunkContentsBuilder_.getMessageList(); + } } - } - /** - * - * - *
            -       * Chunk textual content.
            -       * 
            - * - * string content = 2; - * - * @return The bytes for content. - */ - @java.lang.Override - public com.google.protobuf.ByteString getContentBytes() { - java.lang.Object ref = content_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - content_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; + /** + * + * + *
            +         * List of cited chunk contents derived from document content.
            +         * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo.ChunkContent chunk_contents = 4; + * + */ + public int getChunkContentsCount() { + if (chunkContentsBuilder_ == null) { + return chunkContents_.size(); + } else { + return chunkContentsBuilder_.getCount(); + } } - } - - public static final int RELEVANCE_SCORE_FIELD_NUMBER = 3; - private float relevanceScore_ = 0F; - /** - * - * - *
            -       * The relevance of the chunk for a given query. Values range from 0.0
            -       * (completely irrelevant) to 1.0 (completely relevant).
            -       * This value is for informational purpose only. It may change for
            -       * the same query and chunk at any time due to a model retraining or
            -       * change in implementation.
            -       * 
            - * - * optional float relevance_score = 3; - * - * @return Whether the relevanceScore field is set. - */ - @java.lang.Override - public boolean hasRelevanceScore() { - return ((bitField0_ & 0x00000001) != 0); - } + /** + * + * + *
            +         * List of cited chunk contents derived from document content.
            +         * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo.ChunkContent chunk_contents = 4; + * + */ + public com.google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo + .ChunkContent + getChunkContents(int index) { + if (chunkContentsBuilder_ == null) { + return chunkContents_.get(index); + } else { + return chunkContentsBuilder_.getMessage(index); + } + } - /** - * - * - *
            -       * The relevance of the chunk for a given query. Values range from 0.0
            -       * (completely irrelevant) to 1.0 (completely relevant).
            -       * This value is for informational purpose only. It may change for
            -       * the same query and chunk at any time due to a model retraining or
            -       * change in implementation.
            -       * 
            - * - * optional float relevance_score = 3; - * - * @return The relevanceScore. - */ - @java.lang.Override - public float getRelevanceScore() { - return relevanceScore_; - } + /** + * + * + *
            +         * List of cited chunk contents derived from document content.
            +         * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo.ChunkContent chunk_contents = 4; + * + */ + public Builder setChunkContents( + int index, + com.google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo + .ChunkContent + value) { + if (chunkContentsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureChunkContentsIsMutable(); + chunkContents_.set(index, value); + onChanged(); + } else { + chunkContentsBuilder_.setMessage(index, value); + } + return this; + } - public static final int DOCUMENT_METADATA_FIELD_NUMBER = 4; - private com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo.DocumentMetadata - documentMetadata_; + /** + * + * + *
            +         * List of cited chunk contents derived from document content.
            +         * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo.ChunkContent chunk_contents = 4; + * + */ + public Builder setChunkContents( + int index, + com.google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo + .ChunkContent.Builder + builderForValue) { + if (chunkContentsBuilder_ == null) { + ensureChunkContentsIsMutable(); + chunkContents_.set(index, builderForValue.build()); + onChanged(); + } else { + chunkContentsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } - /** - * - * - *
            -       * Document metadata.
            -       * 
            - * - * - * .google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo.DocumentMetadata document_metadata = 4; - * - * - * @return Whether the documentMetadata field is set. - */ - @java.lang.Override - public boolean hasDocumentMetadata() { - return ((bitField0_ & 0x00000002) != 0); - } - - /** - * - * - *
            -       * Document metadata.
            -       * 
            - * - * - * .google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo.DocumentMetadata document_metadata = 4; - * - * - * @return The documentMetadata. - */ - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo.DocumentMetadata - getDocumentMetadata() { - return documentMetadata_ == null - ? com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo.DocumentMetadata - .getDefaultInstance() - : documentMetadata_; - } - - /** - * - * - *
            -       * Document metadata.
            -       * 
            - * - * - * .google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo.DocumentMetadata document_metadata = 4; - * - */ - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo - .DocumentMetadataOrBuilder - getDocumentMetadataOrBuilder() { - return documentMetadata_ == null - ? com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo.DocumentMetadata - .getDefaultInstance() - : documentMetadata_; - } - - 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(chunk_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, chunk_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(content_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 2, content_); - } - if (((bitField0_ & 0x00000001) != 0)) { - output.writeFloat(3, relevanceScore_); - } - if (((bitField0_ & 0x00000002) != 0)) { - output.writeMessage(4, getDocumentMetadata()); + /** + * + * + *
            +         * List of cited chunk contents derived from document content.
            +         * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo.ChunkContent chunk_contents = 4; + * + */ + public Builder addChunkContents( + com.google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo + .ChunkContent + value) { + if (chunkContentsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureChunkContentsIsMutable(); + chunkContents_.add(value); + onChanged(); + } else { + chunkContentsBuilder_.addMessage(value); + } + return this; } - 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(chunk_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, chunk_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(content_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(2, content_); - } - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream.computeFloatSize(3, relevanceScore_); - } - if (((bitField0_ & 0x00000002) != 0)) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize(4, getDocumentMetadata()); + /** + * + * + *
            +         * List of cited chunk contents derived from document content.
            +         * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo.ChunkContent chunk_contents = 4; + * + */ + public Builder addChunkContents( + int index, + com.google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo + .ChunkContent + value) { + if (chunkContentsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureChunkContentsIsMutable(); + chunkContents_.add(index, value); + onChanged(); + } else { + chunkContentsBuilder_.addMessage(index, value); + } + return this; } - 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.discoveryengine.v1beta.Answer.Reference.ChunkInfo)) { - return super.equals(obj); + /** + * + * + *
            +         * List of cited chunk contents derived from document content.
            +         * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo.ChunkContent chunk_contents = 4; + * + */ + public Builder addChunkContents( + com.google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo + .ChunkContent.Builder + builderForValue) { + if (chunkContentsBuilder_ == null) { + ensureChunkContentsIsMutable(); + chunkContents_.add(builderForValue.build()); + onChanged(); + } else { + chunkContentsBuilder_.addMessage(builderForValue.build()); + } + return this; } - com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo other = - (com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo) obj; - if (!getChunk().equals(other.getChunk())) return false; - if (!getContent().equals(other.getContent())) return false; - if (hasRelevanceScore() != other.hasRelevanceScore()) return false; - if (hasRelevanceScore()) { - if (java.lang.Float.floatToIntBits(getRelevanceScore()) - != java.lang.Float.floatToIntBits(other.getRelevanceScore())) return false; - } - if (hasDocumentMetadata() != other.hasDocumentMetadata()) return false; - if (hasDocumentMetadata()) { - if (!getDocumentMetadata().equals(other.getDocumentMetadata())) return false; + /** + * + * + *
            +         * List of cited chunk contents derived from document content.
            +         * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo.ChunkContent chunk_contents = 4; + * + */ + public Builder addChunkContents( + int index, + com.google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo + .ChunkContent.Builder + builderForValue) { + if (chunkContentsBuilder_ == null) { + ensureChunkContentsIsMutable(); + chunkContents_.add(index, builderForValue.build()); + onChanged(); + } else { + chunkContentsBuilder_.addMessage(index, builderForValue.build()); + } + return this; } - 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) + CHUNK_FIELD_NUMBER; - hash = (53 * hash) + getChunk().hashCode(); - hash = (37 * hash) + CONTENT_FIELD_NUMBER; - hash = (53 * hash) + getContent().hashCode(); - if (hasRelevanceScore()) { - hash = (37 * hash) + RELEVANCE_SCORE_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits(getRelevanceScore()); - } - if (hasDocumentMetadata()) { - hash = (37 * hash) + DOCUMENT_METADATA_FIELD_NUMBER; - hash = (53 * hash) + getDocumentMetadata().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo 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.discoveryengine.v1beta.Answer.Reference.ChunkInfo parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo 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.discoveryengine.v1beta.Answer.Reference.ChunkInfo parseFrom( - byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo 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.discoveryengine.v1beta.Answer.Reference.ChunkInfo - parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo - 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.discoveryengine.v1beta.Answer.Reference.ChunkInfo parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo 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.discoveryengine.v1beta.Answer.Reference.ChunkInfo 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; - } - - /** - * - * - *
            -       * Chunk information.
            -       * 
            - * - * Protobuf type {@code google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo} - */ - public static final class Builder - extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo) - com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfoOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.discoveryengine.v1beta.AnswerProto - .internal_static_google_cloud_discoveryengine_v1beta_Answer_Reference_ChunkInfo_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.discoveryengine.v1beta.AnswerProto - .internal_static_google_cloud_discoveryengine_v1beta_Answer_Reference_ChunkInfo_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo.class, - com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo.Builder.class); - } - - // Construct using - // com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); + /** + * + * + *
            +         * List of cited chunk contents derived from document content.
            +         * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo.ChunkContent chunk_contents = 4; + * + */ + public Builder addAllChunkContents( + java.lang.Iterable< + ? extends + com.google.cloud.discoveryengine.v1beta.Answer.Reference + .UnstructuredDocumentInfo.ChunkContent> + values) { + if (chunkContentsBuilder_ == null) { + ensureChunkContentsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, chunkContents_); + onChanged(); + } else { + chunkContentsBuilder_.addAllMessages(values); + } + return this; } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - internalGetDocumentMetadataFieldBuilder(); + /** + * + * + *
            +         * List of cited chunk contents derived from document content.
            +         * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo.ChunkContent chunk_contents = 4; + * + */ + public Builder clearChunkContents() { + if (chunkContentsBuilder_ == null) { + chunkContents_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + } else { + chunkContentsBuilder_.clear(); } + return this; } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - chunk_ = ""; - content_ = ""; - relevanceScore_ = 0F; - documentMetadata_ = null; - if (documentMetadataBuilder_ != null) { - documentMetadataBuilder_.dispose(); - documentMetadataBuilder_ = null; + /** + * + * + *
            +         * List of cited chunk contents derived from document content.
            +         * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo.ChunkContent chunk_contents = 4; + * + */ + public Builder removeChunkContents(int index) { + if (chunkContentsBuilder_ == null) { + ensureChunkContentsIsMutable(); + chunkContents_.remove(index); + onChanged(); + } else { + chunkContentsBuilder_.remove(index); } return this; } - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.discoveryengine.v1beta.AnswerProto - .internal_static_google_cloud_discoveryengine_v1beta_Answer_Reference_ChunkInfo_descriptor; - } - - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo - getDefaultInstanceForType() { - return com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo - .getDefaultInstance(); + /** + * + * + *
            +         * List of cited chunk contents derived from document content.
            +         * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo.ChunkContent chunk_contents = 4; + * + */ + public com.google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo + .ChunkContent.Builder + getChunkContentsBuilder(int index) { + return internalGetChunkContentsFieldBuilder().getBuilder(index); } - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo build() { - com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo result = - buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo buildPartial() { - com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo result = - new com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0( - com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.chunk_ = chunk_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.content_ = content_; - } - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000004) != 0)) { - result.relevanceScore_ = relevanceScore_; - to_bitField0_ |= 0x00000001; - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.documentMetadata_ = - documentMetadataBuilder_ == null - ? documentMetadata_ - : documentMetadataBuilder_.build(); - to_bitField0_ |= 0x00000002; - } - result.bitField0_ |= to_bitField0_; - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo) { - return mergeFrom( - (com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom( - com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo other) { - if (other - == com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo - .getDefaultInstance()) return this; - if (!other.getChunk().isEmpty()) { - chunk_ = other.chunk_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (!other.getContent().isEmpty()) { - content_ = other.content_; - bitField0_ |= 0x00000002; - onChanged(); - } - if (other.hasRelevanceScore()) { - setRelevanceScore(other.getRelevanceScore()); - } - if (other.hasDocumentMetadata()) { - mergeDocumentMetadata(other.getDocumentMetadata()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - chunk_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: - { - content_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 29: - { - relevanceScore_ = input.readFloat(); - bitField0_ |= 0x00000004; - break; - } // case 29 - case 34: - { - input.readMessage( - internalGetDocumentMetadataFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000008; - break; - } // case 34 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; - - private java.lang.Object chunk_ = ""; - - /** - * - * - *
            -         * Chunk resource name.
            -         * 
            - * - * string chunk = 1 [(.google.api.resource_reference) = { ... } - * - * @return The chunk. - */ - public java.lang.String getChunk() { - java.lang.Object ref = chunk_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - chunk_ = s; - return s; - } else { - return (java.lang.String) ref; + /** + * + * + *
            +         * List of cited chunk contents derived from document content.
            +         * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo.ChunkContent chunk_contents = 4; + * + */ + public com.google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo + .ChunkContentOrBuilder + getChunkContentsOrBuilder(int index) { + if (chunkContentsBuilder_ == null) { + return chunkContents_.get(index); + } else { + return chunkContentsBuilder_.getMessageOrBuilder(index); } } @@ -8439,22 +7644,22 @@ public java.lang.String getChunk() { * * *
            -         * Chunk resource name.
            +         * List of cited chunk contents derived from document content.
                      * 
            * - * string chunk = 1 [(.google.api.resource_reference) = { ... } - * - * @return The bytes for chunk. + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo.ChunkContent chunk_contents = 4; + * */ - public com.google.protobuf.ByteString getChunkBytes() { - java.lang.Object ref = chunk_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - chunk_ = b; - return b; + public java.util.List< + ? extends + com.google.cloud.discoveryengine.v1beta.Answer.Reference + .UnstructuredDocumentInfo.ChunkContentOrBuilder> + getChunkContentsOrBuilderList() { + if (chunkContentsBuilder_ != null) { + return chunkContentsBuilder_.getMessageOrBuilderList(); } else { - return (com.google.protobuf.ByteString) ref; + return java.util.Collections.unmodifiableList(chunkContents_); } } @@ -8462,149 +7667,152 @@ public com.google.protobuf.ByteString getChunkBytes() { * * *
            -         * Chunk resource name.
            +         * List of cited chunk contents derived from document content.
                      * 
            * - * string chunk = 1 [(.google.api.resource_reference) = { ... } - * - * @param value The chunk to set. - * @return This builder for chaining. + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo.ChunkContent chunk_contents = 4; + * */ - public Builder setChunk(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - chunk_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; + public com.google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo + .ChunkContent.Builder + addChunkContentsBuilder() { + return internalGetChunkContentsFieldBuilder() + .addBuilder( + com.google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo + .ChunkContent.getDefaultInstance()); } /** * * *
            -         * Chunk resource name.
            +         * List of cited chunk contents derived from document content.
                      * 
            * - * string chunk = 1 [(.google.api.resource_reference) = { ... } - * - * @return This builder for chaining. + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo.ChunkContent chunk_contents = 4; + * */ - public Builder clearChunk() { - chunk_ = getDefaultInstance().getChunk(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; + public com.google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo + .ChunkContent.Builder + addChunkContentsBuilder(int index) { + return internalGetChunkContentsFieldBuilder() + .addBuilder( + index, + com.google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo + .ChunkContent.getDefaultInstance()); } /** * * *
            -         * Chunk resource name.
            +         * List of cited chunk contents derived from document content.
                      * 
            * - * string chunk = 1 [(.google.api.resource_reference) = { ... } - * - * @param value The bytes for chunk to set. - * @return This builder for chaining. + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo.ChunkContent chunk_contents = 4; + * */ - public Builder setChunkBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - chunk_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; + public java.util.List< + com.google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo + .ChunkContent.Builder> + getChunkContentsBuilderList() { + return internalGetChunkContentsFieldBuilder().getBuilderList(); } - private java.lang.Object content_ = ""; - - /** - * - * - *
            -         * Chunk textual content.
            -         * 
            - * - * string content = 2; - * - * @return The content. - */ - public java.lang.String getContent() { - java.lang.Object ref = content_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - content_ = s; - return s; - } else { - return (java.lang.String) ref; + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo + .ChunkContent, + com.google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo + .ChunkContent.Builder, + com.google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo + .ChunkContentOrBuilder> + internalGetChunkContentsFieldBuilder() { + if (chunkContentsBuilder_ == null) { + chunkContentsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.discoveryengine.v1beta.Answer.Reference + .UnstructuredDocumentInfo.ChunkContent, + com.google.cloud.discoveryengine.v1beta.Answer.Reference + .UnstructuredDocumentInfo.ChunkContent.Builder, + com.google.cloud.discoveryengine.v1beta.Answer.Reference + .UnstructuredDocumentInfo.ChunkContentOrBuilder>( + chunkContents_, + ((bitField0_ & 0x00000008) != 0), + getParentForChildren(), + isClean()); + chunkContents_ = null; } + return chunkContentsBuilder_; } + private com.google.protobuf.Struct structData_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Struct, + com.google.protobuf.Struct.Builder, + com.google.protobuf.StructOrBuilder> + structDataBuilder_; + /** * * *
            -         * Chunk textual content.
            +         * The structured JSON metadata for the document.
            +         * It is populated from the struct data from the Chunk in search result.
                      * 
            * - * string content = 2; + * .google.protobuf.Struct struct_data = 5; * - * @return The bytes for content. + * @return Whether the structData field is set. */ - public com.google.protobuf.ByteString getContentBytes() { - java.lang.Object ref = content_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - content_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } + public boolean hasStructData() { + return ((bitField0_ & 0x00000010) != 0); } /** * * *
            -         * Chunk textual content.
            +         * The structured JSON metadata for the document.
            +         * It is populated from the struct data from the Chunk in search result.
                      * 
            * - * string content = 2; + * .google.protobuf.Struct struct_data = 5; * - * @param value The content to set. - * @return This builder for chaining. + * @return The structData. */ - public Builder setContent(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); + public com.google.protobuf.Struct getStructData() { + if (structDataBuilder_ == null) { + return structData_ == null + ? com.google.protobuf.Struct.getDefaultInstance() + : structData_; + } else { + return structDataBuilder_.getMessage(); } - content_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; } /** * * *
            -         * Chunk textual content.
            +         * The structured JSON metadata for the document.
            +         * It is populated from the struct data from the Chunk in search result.
                      * 
            * - * string content = 2; - * - * @return This builder for chaining. + * .google.protobuf.Struct struct_data = 5; */ - public Builder clearContent() { - content_ = getDefaultInstance().getContent(); - bitField0_ = (bitField0_ & ~0x00000002); + public Builder setStructData(com.google.protobuf.Struct value) { + if (structDataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + structData_ = value; + } else { + structDataBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; onChanged(); return this; } @@ -8613,87 +7821,69 @@ public Builder clearContent() { * * *
            -         * Chunk textual content.
            +         * The structured JSON metadata for the document.
            +         * It is populated from the struct data from the Chunk in search result.
                      * 
            * - * string content = 2; - * - * @param value The bytes for content to set. - * @return This builder for chaining. + * .google.protobuf.Struct struct_data = 5; */ - public Builder setContentBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); + public Builder setStructData(com.google.protobuf.Struct.Builder builderForValue) { + if (structDataBuilder_ == null) { + structData_ = builderForValue.build(); + } else { + structDataBuilder_.setMessage(builderForValue.build()); } - checkByteStringIsUtf8(value); - content_ = value; - bitField0_ |= 0x00000002; + bitField0_ |= 0x00000010; onChanged(); return this; } - private float relevanceScore_; - - /** - * - * - *
            -         * The relevance of the chunk for a given query. Values range from 0.0
            -         * (completely irrelevant) to 1.0 (completely relevant).
            -         * This value is for informational purpose only. It may change for
            -         * the same query and chunk at any time due to a model retraining or
            -         * change in implementation.
            -         * 
            - * - * optional float relevance_score = 3; - * - * @return Whether the relevanceScore field is set. - */ - @java.lang.Override - public boolean hasRelevanceScore() { - return ((bitField0_ & 0x00000004) != 0); - } - /** * * *
            -         * The relevance of the chunk for a given query. Values range from 0.0
            -         * (completely irrelevant) to 1.0 (completely relevant).
            -         * This value is for informational purpose only. It may change for
            -         * the same query and chunk at any time due to a model retraining or
            -         * change in implementation.
            +         * The structured JSON metadata for the document.
            +         * It is populated from the struct data from the Chunk in search result.
                      * 
            * - * optional float relevance_score = 3; - * - * @return The relevanceScore. + * .google.protobuf.Struct struct_data = 5; */ - @java.lang.Override - public float getRelevanceScore() { - return relevanceScore_; + public Builder mergeStructData(com.google.protobuf.Struct value) { + if (structDataBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) + && structData_ != null + && structData_ != com.google.protobuf.Struct.getDefaultInstance()) { + getStructDataBuilder().mergeFrom(value); + } else { + structData_ = value; + } + } else { + structDataBuilder_.mergeFrom(value); + } + if (structData_ != null) { + bitField0_ |= 0x00000010; + onChanged(); + } + return this; } /** * * *
            -         * The relevance of the chunk for a given query. Values range from 0.0
            -         * (completely irrelevant) to 1.0 (completely relevant).
            -         * This value is for informational purpose only. It may change for
            -         * the same query and chunk at any time due to a model retraining or
            -         * change in implementation.
            +         * The structured JSON metadata for the document.
            +         * It is populated from the struct data from the Chunk in search result.
                      * 
            * - * optional float relevance_score = 3; - * - * @param value The relevanceScore to set. - * @return This builder for chaining. + * .google.protobuf.Struct struct_data = 5; */ - public Builder setRelevanceScore(float value) { - - relevanceScore_ = value; - bitField0_ |= 0x00000004; + public Builder clearStructData() { + bitField0_ = (bitField0_ & ~0x00000010); + structData_ = null; + if (structDataBuilder_ != null) { + structDataBuilder_.dispose(); + structDataBuilder_ = null; + } onChanged(); return this; } @@ -8702,280 +7892,88 @@ public Builder setRelevanceScore(float value) { * * *
            -         * The relevance of the chunk for a given query. Values range from 0.0
            -         * (completely irrelevant) to 1.0 (completely relevant).
            -         * This value is for informational purpose only. It may change for
            -         * the same query and chunk at any time due to a model retraining or
            -         * change in implementation.
            +         * The structured JSON metadata for the document.
            +         * It is populated from the struct data from the Chunk in search result.
                      * 
            * - * optional float relevance_score = 3; - * - * @return This builder for chaining. + * .google.protobuf.Struct struct_data = 5; */ - public Builder clearRelevanceScore() { - bitField0_ = (bitField0_ & ~0x00000004); - relevanceScore_ = 0F; + public com.google.protobuf.Struct.Builder getStructDataBuilder() { + bitField0_ |= 0x00000010; onChanged(); - return this; + return internalGetStructDataFieldBuilder().getBuilder(); } - private com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo.DocumentMetadata - documentMetadata_; - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo.DocumentMetadata, - com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo.DocumentMetadata - .Builder, - com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo - .DocumentMetadataOrBuilder> - documentMetadataBuilder_; - /** * * *
            -         * Document metadata.
            +         * The structured JSON metadata for the document.
            +         * It is populated from the struct data from the Chunk in search result.
                      * 
            * - * - * .google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo.DocumentMetadata document_metadata = 4; - * - * - * @return Whether the documentMetadata field is set. + * .google.protobuf.Struct struct_data = 5; */ - public boolean hasDocumentMetadata() { - return ((bitField0_ & 0x00000008) != 0); + public com.google.protobuf.StructOrBuilder getStructDataOrBuilder() { + if (structDataBuilder_ != null) { + return structDataBuilder_.getMessageOrBuilder(); + } else { + return structData_ == null + ? com.google.protobuf.Struct.getDefaultInstance() + : structData_; + } } /** * * *
            -         * Document metadata.
            +         * The structured JSON metadata for the document.
            +         * It is populated from the struct data from the Chunk in search result.
                      * 
            * - * - * .google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo.DocumentMetadata document_metadata = 4; - * - * - * @return The documentMetadata. - */ - public com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo.DocumentMetadata - getDocumentMetadata() { - if (documentMetadataBuilder_ == null) { - return documentMetadata_ == null - ? com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo - .DocumentMetadata.getDefaultInstance() - : documentMetadata_; - } else { - return documentMetadataBuilder_.getMessage(); - } - } - - /** - * - * - *
            -         * Document metadata.
            -         * 
            - * - * - * .google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo.DocumentMetadata document_metadata = 4; - * - */ - public Builder setDocumentMetadata( - com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo.DocumentMetadata - value) { - if (documentMetadataBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - documentMetadata_ = value; - } else { - documentMetadataBuilder_.setMessage(value); - } - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - - /** - * - * - *
            -         * Document metadata.
            -         * 
            - * - * - * .google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo.DocumentMetadata document_metadata = 4; - * - */ - public Builder setDocumentMetadata( - com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo.DocumentMetadata - .Builder - builderForValue) { - if (documentMetadataBuilder_ == null) { - documentMetadata_ = builderForValue.build(); - } else { - documentMetadataBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - - /** - * - * - *
            -         * Document metadata.
            -         * 
            - * - * - * .google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo.DocumentMetadata document_metadata = 4; - * - */ - public Builder mergeDocumentMetadata( - com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo.DocumentMetadata - value) { - if (documentMetadataBuilder_ == null) { - if (((bitField0_ & 0x00000008) != 0) - && documentMetadata_ != null - && documentMetadata_ - != com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo - .DocumentMetadata.getDefaultInstance()) { - getDocumentMetadataBuilder().mergeFrom(value); - } else { - documentMetadata_ = value; - } - } else { - documentMetadataBuilder_.mergeFrom(value); - } - if (documentMetadata_ != null) { - bitField0_ |= 0x00000008; - onChanged(); - } - return this; - } - - /** - * - * - *
            -         * Document metadata.
            -         * 
            - * - * - * .google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo.DocumentMetadata document_metadata = 4; - * - */ - public Builder clearDocumentMetadata() { - bitField0_ = (bitField0_ & ~0x00000008); - documentMetadata_ = null; - if (documentMetadataBuilder_ != null) { - documentMetadataBuilder_.dispose(); - documentMetadataBuilder_ = null; - } - onChanged(); - return this; - } - - /** - * - * - *
            -         * Document metadata.
            -         * 
            - * - * - * .google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo.DocumentMetadata document_metadata = 4; - * - */ - public com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo.DocumentMetadata - .Builder - getDocumentMetadataBuilder() { - bitField0_ |= 0x00000008; - onChanged(); - return internalGetDocumentMetadataFieldBuilder().getBuilder(); - } - - /** - * - * - *
            -         * Document metadata.
            -         * 
            - * - * - * .google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo.DocumentMetadata document_metadata = 4; - * - */ - public com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo - .DocumentMetadataOrBuilder - getDocumentMetadataOrBuilder() { - if (documentMetadataBuilder_ != null) { - return documentMetadataBuilder_.getMessageOrBuilder(); - } else { - return documentMetadata_ == null - ? com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo - .DocumentMetadata.getDefaultInstance() - : documentMetadata_; - } - } - - /** - * - * - *
            -         * Document metadata.
            -         * 
            - * - * - * .google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo.DocumentMetadata document_metadata = 4; - * + * .google.protobuf.Struct struct_data = 5; */ private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo.DocumentMetadata, - com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo.DocumentMetadata - .Builder, - com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo - .DocumentMetadataOrBuilder> - internalGetDocumentMetadataFieldBuilder() { - if (documentMetadataBuilder_ == null) { - documentMetadataBuilder_ = + com.google.protobuf.Struct, + com.google.protobuf.Struct.Builder, + com.google.protobuf.StructOrBuilder> + internalGetStructDataFieldBuilder() { + if (structDataBuilder_ == null) { + structDataBuilder_ = new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo - .DocumentMetadata, - com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo - .DocumentMetadata.Builder, - com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo - .DocumentMetadataOrBuilder>( - getDocumentMetadata(), getParentForChildren(), isClean()); - documentMetadata_ = null; + com.google.protobuf.Struct, + com.google.protobuf.Struct.Builder, + com.google.protobuf.StructOrBuilder>( + getStructData(), getParentForChildren(), isClean()); + structData_ = null; } - return documentMetadataBuilder_; + return structDataBuilder_; } - // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo) + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo) } - // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo) - private static final com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo) + private static final com.google.cloud.discoveryengine.v1beta.Answer.Reference + .UnstructuredDocumentInfo DEFAULT_INSTANCE; static { - DEFAULT_INSTANCE = new com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo(); + DEFAULT_INSTANCE = + new com.google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo(); } - public static com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo + public static com.google.cloud.discoveryengine.v1beta.Answer.Reference + .UnstructuredDocumentInfo getDefaultInstance() { return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { @java.lang.Override - public ChunkInfo parsePartialFrom( + public UnstructuredDocumentInfo parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { @@ -8995,634 +7993,466 @@ public ChunkInfo parsePartialFrom( } }; - public static com.google.protobuf.Parser parser() { + public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override - public com.google.protobuf.Parser getParserForType() { + public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo + public com.google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } - public interface StructuredDocumentInfoOrBuilder + public interface ChunkInfoOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.Answer.Reference.StructuredDocumentInfo) + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo) com.google.protobuf.MessageOrBuilder { /** * * *
            -       * Document resource name.
            +       * Chunk resource name.
                    * 
            * - * string document = 1 [(.google.api.resource_reference) = { ... } + * string chunk = 1 [(.google.api.resource_reference) = { ... } * - * @return The document. + * @return The chunk. */ - java.lang.String getDocument(); + java.lang.String getChunk(); /** * * *
            -       * Document resource name.
            +       * Chunk resource name.
                    * 
            * - * string document = 1 [(.google.api.resource_reference) = { ... } + * string chunk = 1 [(.google.api.resource_reference) = { ... } * - * @return The bytes for document. + * @return The bytes for chunk. */ - com.google.protobuf.ByteString getDocumentBytes(); + com.google.protobuf.ByteString getChunkBytes(); /** * * *
            -       * Structured search data.
            +       * Chunk textual content.
                    * 
            * - * .google.protobuf.Struct struct_data = 2; + * string content = 2; * - * @return Whether the structData field is set. + * @return The content. */ - boolean hasStructData(); + java.lang.String getContent(); /** * * *
            -       * Structured search data.
            +       * Chunk textual content.
                    * 
            * - * .google.protobuf.Struct struct_data = 2; + * string content = 2; * - * @return The structData. + * @return The bytes for content. */ - com.google.protobuf.Struct getStructData(); + com.google.protobuf.ByteString getContentBytes(); /** * * *
            -       * Structured search data.
            +       * The relevance of the chunk for a given query. Values range from 0.0
            +       * (completely irrelevant) to 1.0 (completely relevant).
            +       * This value is for informational purpose only. It may change for
            +       * the same query and chunk at any time due to a model retraining or
            +       * change in implementation.
                    * 
            * - * .google.protobuf.Struct struct_data = 2; + * optional float relevance_score = 3; + * + * @return Whether the relevanceScore field is set. */ - com.google.protobuf.StructOrBuilder getStructDataOrBuilder(); - } - - /** - * - * - *
            -     * Structured search information.
            -     * 
            - * - * Protobuf type {@code - * google.cloud.discoveryengine.v1beta.Answer.Reference.StructuredDocumentInfo} - */ - public static final class StructuredDocumentInfo extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.Answer.Reference.StructuredDocumentInfo) - StructuredDocumentInfoOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "StructuredDocumentInfo"); - } - - // Use StructuredDocumentInfo.newBuilder() to construct. - private StructuredDocumentInfo(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private StructuredDocumentInfo() { - document_ = ""; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.discoveryengine.v1beta.AnswerProto - .internal_static_google_cloud_discoveryengine_v1beta_Answer_Reference_StructuredDocumentInfo_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.discoveryengine.v1beta.AnswerProto - .internal_static_google_cloud_discoveryengine_v1beta_Answer_Reference_StructuredDocumentInfo_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.discoveryengine.v1beta.Answer.Reference.StructuredDocumentInfo - .class, - com.google.cloud.discoveryengine.v1beta.Answer.Reference.StructuredDocumentInfo - .Builder.class); - } - - private int bitField0_; - public static final int DOCUMENT_FIELD_NUMBER = 1; + boolean hasRelevanceScore(); - @SuppressWarnings("serial") - private volatile java.lang.Object document_ = ""; + /** + * + * + *
            +       * The relevance of the chunk for a given query. Values range from 0.0
            +       * (completely irrelevant) to 1.0 (completely relevant).
            +       * This value is for informational purpose only. It may change for
            +       * the same query and chunk at any time due to a model retraining or
            +       * change in implementation.
            +       * 
            + * + * optional float relevance_score = 3; + * + * @return The relevanceScore. + */ + float getRelevanceScore(); /** * * *
            -       * Document resource name.
            +       * Document metadata.
                    * 
            * - * string document = 1 [(.google.api.resource_reference) = { ... } + * + * .google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo.DocumentMetadata document_metadata = 4; + * * - * @return The document. + * @return Whether the documentMetadata field is set. */ - @java.lang.Override - public java.lang.String getDocument() { - java.lang.Object ref = document_; - 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(); - document_ = s; - return s; - } - } + boolean hasDocumentMetadata(); /** * * *
            -       * Document resource name.
            +       * Document metadata.
                    * 
            * - * string document = 1 [(.google.api.resource_reference) = { ... } + * + * .google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo.DocumentMetadata document_metadata = 4; + * * - * @return The bytes for document. + * @return The documentMetadata. */ - @java.lang.Override - public com.google.protobuf.ByteString getDocumentBytes() { - java.lang.Object ref = document_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - document_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } + com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo.DocumentMetadata + getDocumentMetadata(); - public static final int STRUCT_DATA_FIELD_NUMBER = 2; - private com.google.protobuf.Struct structData_; + /** + * + * + *
            +       * Document metadata.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo.DocumentMetadata document_metadata = 4; + * + */ + com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo.DocumentMetadataOrBuilder + getDocumentMetadataOrBuilder(); /** * * *
            -       * Structured search data.
            +       * Output only. Stores indexes of blobattachments linked to this chunk.
                    * 
            * - * .google.protobuf.Struct struct_data = 2; + * + * repeated int64 blob_attachment_indexes = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * * - * @return Whether the structData field is set. + * @return A list containing the blobAttachmentIndexes. */ - @java.lang.Override - public boolean hasStructData() { - return ((bitField0_ & 0x00000001) != 0); - } + java.util.List getBlobAttachmentIndexesList(); /** * * *
            -       * Structured search data.
            +       * Output only. Stores indexes of blobattachments linked to this chunk.
                    * 
            * - * .google.protobuf.Struct struct_data = 2; + * + * repeated int64 blob_attachment_indexes = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * * - * @return The structData. + * @return The count of blobAttachmentIndexes. */ - @java.lang.Override - public com.google.protobuf.Struct getStructData() { - return structData_ == null ? com.google.protobuf.Struct.getDefaultInstance() : structData_; - } + int getBlobAttachmentIndexesCount(); /** * * *
            -       * Structured search data.
            +       * Output only. Stores indexes of blobattachments linked to this chunk.
                    * 
            * - * .google.protobuf.Struct struct_data = 2; + * + * repeated int64 blob_attachment_indexes = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index of the element to return. + * @return The blobAttachmentIndexes at the given index. */ - @java.lang.Override - public com.google.protobuf.StructOrBuilder getStructDataOrBuilder() { - return structData_ == null ? com.google.protobuf.Struct.getDefaultInstance() : structData_; - } - - private byte memoizedIsInitialized = -1; + long getBlobAttachmentIndexes(int index); + } - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + /** + * + * + *
            +     * Chunk information.
            +     * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo} + */ + public static final class ChunkInfo extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo) + ChunkInfoOrBuilder { + private static final long serialVersionUID = 0L; - memoizedIsInitialized = 1; - return true; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ChunkInfo"); } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(document_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, document_); - } - if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(2, getStructData()); - } - getUnknownFields().writeTo(output); + // Use ChunkInfo.newBuilder() to construct. + private ChunkInfo(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; + private ChunkInfo() { + chunk_ = ""; + content_ = ""; + blobAttachmentIndexes_ = emptyLongList(); + } - size = 0; - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(document_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, document_); - } - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getStructData()); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.AnswerProto + .internal_static_google_cloud_discoveryengine_v1beta_Answer_Reference_ChunkInfo_descriptor; } @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj - instanceof - com.google.cloud.discoveryengine.v1beta.Answer.Reference.StructuredDocumentInfo)) { - return super.equals(obj); - } - com.google.cloud.discoveryengine.v1beta.Answer.Reference.StructuredDocumentInfo other = - (com.google.cloud.discoveryengine.v1beta.Answer.Reference.StructuredDocumentInfo) obj; - - if (!getDocument().equals(other.getDocument())) return false; - if (hasStructData() != other.hasStructData()) return false; - if (hasStructData()) { - if (!getStructData().equals(other.getStructData())) return false; - } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.AnswerProto + .internal_static_google_cloud_discoveryengine_v1beta_Answer_Reference_ChunkInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo.class, + com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo.Builder.class); } - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + DOCUMENT_FIELD_NUMBER; - hash = (53 * hash) + getDocument().hashCode(); - if (hasStructData()) { - hash = (37 * hash) + STRUCT_DATA_FIELD_NUMBER; - hash = (53 * hash) + getStructData().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } + public interface DocumentMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo.DocumentMetadata) + com.google.protobuf.MessageOrBuilder { - public static com.google.cloud.discoveryengine.v1beta.Answer.Reference.StructuredDocumentInfo - parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } + /** + * + * + *
            +         * Document resource name.
            +         * 
            + * + * string document = 1 [(.google.api.resource_reference) = { ... } + * + * @return The document. + */ + java.lang.String getDocument(); - public static com.google.cloud.discoveryengine.v1beta.Answer.Reference.StructuredDocumentInfo - parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } + /** + * + * + *
            +         * Document resource name.
            +         * 
            + * + * string document = 1 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for document. + */ + com.google.protobuf.ByteString getDocumentBytes(); - public static com.google.cloud.discoveryengine.v1beta.Answer.Reference.StructuredDocumentInfo - parseFrom(com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } + /** + * + * + *
            +         * URI for the document.
            +         * 
            + * + * string uri = 2; + * + * @return The uri. + */ + java.lang.String getUri(); - public static com.google.cloud.discoveryengine.v1beta.Answer.Reference.StructuredDocumentInfo - parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } + /** + * + * + *
            +         * URI for the document.
            +         * 
            + * + * string uri = 2; + * + * @return The bytes for uri. + */ + com.google.protobuf.ByteString getUriBytes(); - public static com.google.cloud.discoveryengine.v1beta.Answer.Reference.StructuredDocumentInfo - parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } + /** + * + * + *
            +         * Title.
            +         * 
            + * + * string title = 3; + * + * @return The title. + */ + java.lang.String getTitle(); - public static com.google.cloud.discoveryengine.v1beta.Answer.Reference.StructuredDocumentInfo - parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } + /** + * + * + *
            +         * Title.
            +         * 
            + * + * string title = 3; + * + * @return The bytes for title. + */ + com.google.protobuf.ByteString getTitleBytes(); - public static com.google.cloud.discoveryengine.v1beta.Answer.Reference.StructuredDocumentInfo - parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } + /** + * + * + *
            +         * Page identifier.
            +         * 
            + * + * string page_identifier = 4; + * + * @return The pageIdentifier. + */ + java.lang.String getPageIdentifier(); - public static com.google.cloud.discoveryengine.v1beta.Answer.Reference.StructuredDocumentInfo - parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } + /** + * + * + *
            +         * Page identifier.
            +         * 
            + * + * string page_identifier = 4; + * + * @return The bytes for pageIdentifier. + */ + com.google.protobuf.ByteString getPageIdentifierBytes(); - public static com.google.cloud.discoveryengine.v1beta.Answer.Reference.StructuredDocumentInfo - parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } + /** + * + * + *
            +         * The structured JSON metadata for the document.
            +         * It is populated from the struct data from the Chunk in search result.
            +         * 
            + * + * .google.protobuf.Struct struct_data = 5; + * + * @return Whether the structData field is set. + */ + boolean hasStructData(); - public static com.google.cloud.discoveryengine.v1beta.Answer.Reference.StructuredDocumentInfo - parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } + /** + * + * + *
            +         * The structured JSON metadata for the document.
            +         * It is populated from the struct data from the Chunk in search result.
            +         * 
            + * + * .google.protobuf.Struct struct_data = 5; + * + * @return The structData. + */ + com.google.protobuf.Struct getStructData(); - public static com.google.cloud.discoveryengine.v1beta.Answer.Reference.StructuredDocumentInfo - parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + /** + * + * + *
            +         * The structured JSON metadata for the document.
            +         * It is populated from the struct data from the Chunk in search result.
            +         * 
            + * + * .google.protobuf.Struct struct_data = 5; + */ + com.google.protobuf.StructOrBuilder getStructDataOrBuilder(); } - public static com.google.cloud.discoveryengine.v1beta.Answer.Reference.StructuredDocumentInfo - parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } + /** + * + * + *
            +       * Document metadata.
            +       * 
            + * + * Protobuf type {@code + * google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo.DocumentMetadata} + */ + public static final class DocumentMetadata extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo.DocumentMetadata) + DocumentMetadataOrBuilder { + private static final long serialVersionUID = 0L; - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.discoveryengine.v1beta.Answer.Reference.StructuredDocumentInfo - prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "DocumentMetadata"); + } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } + // Use DocumentMetadata.newBuilder() to construct. + private DocumentMetadata(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } + private DocumentMetadata() { + document_ = ""; + uri_ = ""; + title_ = ""; + pageIdentifier_ = ""; + } - /** - * - * - *
            -       * Structured search information.
            -       * 
            - * - * Protobuf type {@code - * google.cloud.discoveryengine.v1beta.Answer.Reference.StructuredDocumentInfo} - */ - public static final class Builder - extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.Answer.Reference.StructuredDocumentInfo) - com.google.cloud.discoveryengine.v1beta.Answer.Reference.StructuredDocumentInfoOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.discoveryengine.v1beta.AnswerProto - .internal_static_google_cloud_discoveryengine_v1beta_Answer_Reference_StructuredDocumentInfo_descriptor; + .internal_static_google_cloud_discoveryengine_v1beta_Answer_Reference_ChunkInfo_DocumentMetadata_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.discoveryengine.v1beta.AnswerProto - .internal_static_google_cloud_discoveryengine_v1beta_Answer_Reference_StructuredDocumentInfo_fieldAccessorTable + .internal_static_google_cloud_discoveryengine_v1beta_Answer_Reference_ChunkInfo_DocumentMetadata_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.discoveryengine.v1beta.Answer.Reference.StructuredDocumentInfo - .class, - com.google.cloud.discoveryengine.v1beta.Answer.Reference.StructuredDocumentInfo - .Builder.class); - } - - // Construct using - // com.google.cloud.discoveryengine.v1beta.Answer.Reference.StructuredDocumentInfo.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - internalGetStructDataFieldBuilder(); - } - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - document_ = ""; - structData_ = null; - if (structDataBuilder_ != null) { - structDataBuilder_.dispose(); - structDataBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.discoveryengine.v1beta.AnswerProto - .internal_static_google_cloud_discoveryengine_v1beta_Answer_Reference_StructuredDocumentInfo_descriptor; - } - - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.Answer.Reference.StructuredDocumentInfo - getDefaultInstanceForType() { - return com.google.cloud.discoveryengine.v1beta.Answer.Reference.StructuredDocumentInfo - .getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.Answer.Reference.StructuredDocumentInfo - build() { - com.google.cloud.discoveryengine.v1beta.Answer.Reference.StructuredDocumentInfo result = - buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.Answer.Reference.StructuredDocumentInfo - buildPartial() { - com.google.cloud.discoveryengine.v1beta.Answer.Reference.StructuredDocumentInfo result = - new com.google.cloud.discoveryengine.v1beta.Answer.Reference.StructuredDocumentInfo( - this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0( - com.google.cloud.discoveryengine.v1beta.Answer.Reference.StructuredDocumentInfo - result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.document_ = document_; - } - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000002) != 0)) { - result.structData_ = - structDataBuilder_ == null ? structData_ : structDataBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - result.bitField0_ |= to_bitField0_; - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other - instanceof - com.google.cloud.discoveryengine.v1beta.Answer.Reference.StructuredDocumentInfo) { - return mergeFrom( - (com.google.cloud.discoveryengine.v1beta.Answer.Reference.StructuredDocumentInfo) - other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom( - com.google.cloud.discoveryengine.v1beta.Answer.Reference.StructuredDocumentInfo other) { - if (other - == com.google.cloud.discoveryengine.v1beta.Answer.Reference.StructuredDocumentInfo - .getDefaultInstance()) return this; - if (!other.getDocument().isEmpty()) { - document_ = other.document_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (other.hasStructData()) { - mergeStructData(other.getStructData()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - document_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: - { - input.readMessage( - internalGetStructDataFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000002; - break; - } // case 18 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; + com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo + .DocumentMetadata.class, + com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo + .DocumentMetadata.Builder.class); } private int bitField0_; + public static final int DOCUMENT_FIELD_NUMBER = 1; - private java.lang.Object document_ = ""; + @SuppressWarnings("serial") + private volatile java.lang.Object document_ = ""; /** * @@ -9635,15 +8465,16 @@ public Builder mergeFrom( * * @return The document. */ + @java.lang.Override public java.lang.String getDocument() { java.lang.Object ref = document_; - if (!(ref instanceof java.lang.String)) { + 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(); document_ = s; return s; - } else { - return (java.lang.String) ref; } } @@ -9658,9 +8489,10 @@ public java.lang.String getDocument() { * * @return The bytes for document. */ + @java.lang.Override public com.google.protobuf.ByteString getDocumentBytes() { java.lang.Object ref = document_; - if (ref instanceof String) { + if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); document_ = b; @@ -9670,109 +8502,85 @@ public com.google.protobuf.ByteString getDocumentBytes() { } } + public static final int URI_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object uri_ = ""; + /** * * *
            -         * Document resource name.
            +         * URI for the document.
                      * 
            * - * string document = 1 [(.google.api.resource_reference) = { ... } + * string uri = 2; * - * @param value The document to set. - * @return This builder for chaining. + * @return The uri. */ - public Builder setDocument(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); + @java.lang.Override + public java.lang.String getUri() { + java.lang.Object ref = uri_; + 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(); + uri_ = s; + return s; } - document_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - /** - * - * - *
            -         * Document resource name.
            -         * 
            - * - * string document = 1 [(.google.api.resource_reference) = { ... } - * - * @return This builder for chaining. - */ - public Builder clearDocument() { - document_ = getDefaultInstance().getDocument(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; } /** * * *
            -         * Document resource name.
            +         * URI for the document.
                      * 
            * - * string document = 1 [(.google.api.resource_reference) = { ... } + * string uri = 2; * - * @param value The bytes for document to set. - * @return This builder for chaining. + * @return The bytes for uri. */ - public Builder setDocumentBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); + @java.lang.Override + public com.google.protobuf.ByteString getUriBytes() { + java.lang.Object ref = uri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; } - checkByteStringIsUtf8(value); - document_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; } - private com.google.protobuf.Struct structData_; - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Struct, - com.google.protobuf.Struct.Builder, - com.google.protobuf.StructOrBuilder> - structDataBuilder_; + public static final int TITLE_FIELD_NUMBER = 3; - /** - * - * - *
            -         * Structured search data.
            -         * 
            - * - * .google.protobuf.Struct struct_data = 2; - * - * @return Whether the structData field is set. - */ - public boolean hasStructData() { - return ((bitField0_ & 0x00000002) != 0); - } + @SuppressWarnings("serial") + private volatile java.lang.Object title_ = ""; /** * * *
            -         * Structured search data.
            +         * Title.
                      * 
            * - * .google.protobuf.Struct struct_data = 2; + * string title = 3; * - * @return The structData. + * @return The title. */ - public com.google.protobuf.Struct getStructData() { - if (structDataBuilder_ == null) { - return structData_ == null - ? com.google.protobuf.Struct.getDefaultInstance() - : structData_; + @java.lang.Override + public java.lang.String getTitle() { + java.lang.Object ref = title_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; } else { - return structDataBuilder_.getMessage(); + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + title_ = s; + return s; } } @@ -9780,2346 +8588,2443 @@ public com.google.protobuf.Struct getStructData() { * * *
            -         * Structured search data.
            +         * Title.
                      * 
            * - * .google.protobuf.Struct struct_data = 2; + * string title = 3; + * + * @return The bytes for title. */ - public Builder setStructData(com.google.protobuf.Struct value) { - if (structDataBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - structData_ = value; + @java.lang.Override + public com.google.protobuf.ByteString getTitleBytes() { + java.lang.Object ref = title_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + title_ = b; + return b; } else { - structDataBuilder_.setMessage(value); + return (com.google.protobuf.ByteString) ref; } - bitField0_ |= 0x00000002; - onChanged(); - return this; } + public static final int PAGE_IDENTIFIER_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object pageIdentifier_ = ""; + /** * * *
            -         * Structured search data.
            +         * Page identifier.
                      * 
            * - * .google.protobuf.Struct struct_data = 2; + * string page_identifier = 4; + * + * @return The pageIdentifier. */ - public Builder setStructData(com.google.protobuf.Struct.Builder builderForValue) { - if (structDataBuilder_ == null) { - structData_ = builderForValue.build(); + @java.lang.Override + public java.lang.String getPageIdentifier() { + java.lang.Object ref = pageIdentifier_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; } else { - structDataBuilder_.setMessage(builderForValue.build()); + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageIdentifier_ = s; + return s; } - bitField0_ |= 0x00000002; - onChanged(); - return this; } /** * * *
            -         * Structured search data.
            +         * Page identifier.
                      * 
            * - * .google.protobuf.Struct struct_data = 2; + * string page_identifier = 4; + * + * @return The bytes for pageIdentifier. */ - public Builder mergeStructData(com.google.protobuf.Struct value) { - if (structDataBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0) - && structData_ != null - && structData_ != com.google.protobuf.Struct.getDefaultInstance()) { - getStructDataBuilder().mergeFrom(value); - } else { - structData_ = value; - } + @java.lang.Override + public com.google.protobuf.ByteString getPageIdentifierBytes() { + java.lang.Object ref = pageIdentifier_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageIdentifier_ = b; + return b; } else { - structDataBuilder_.mergeFrom(value); - } - if (structData_ != null) { - bitField0_ |= 0x00000002; - onChanged(); + return (com.google.protobuf.ByteString) ref; } - return this; } + public static final int STRUCT_DATA_FIELD_NUMBER = 5; + private com.google.protobuf.Struct structData_; + /** * * *
            -         * Structured search data.
            +         * The structured JSON metadata for the document.
            +         * It is populated from the struct data from the Chunk in search result.
                      * 
            * - * .google.protobuf.Struct struct_data = 2; + * .google.protobuf.Struct struct_data = 5; + * + * @return Whether the structData field is set. */ - public Builder clearStructData() { - bitField0_ = (bitField0_ & ~0x00000002); - structData_ = null; - if (structDataBuilder_ != null) { - structDataBuilder_.dispose(); - structDataBuilder_ = null; - } - onChanged(); - return this; + @java.lang.Override + public boolean hasStructData() { + return ((bitField0_ & 0x00000001) != 0); } /** * * *
            -         * Structured search data.
            +         * The structured JSON metadata for the document.
            +         * It is populated from the struct data from the Chunk in search result.
                      * 
            * - * .google.protobuf.Struct struct_data = 2; + * .google.protobuf.Struct struct_data = 5; + * + * @return The structData. */ - public com.google.protobuf.Struct.Builder getStructDataBuilder() { - bitField0_ |= 0x00000002; - onChanged(); - return internalGetStructDataFieldBuilder().getBuilder(); + @java.lang.Override + public com.google.protobuf.Struct getStructData() { + return structData_ == null + ? com.google.protobuf.Struct.getDefaultInstance() + : structData_; } /** * * *
            -         * Structured search data.
            +         * The structured JSON metadata for the document.
            +         * It is populated from the struct data from the Chunk in search result.
                      * 
            * - * .google.protobuf.Struct struct_data = 2; + * .google.protobuf.Struct struct_data = 5; */ + @java.lang.Override public com.google.protobuf.StructOrBuilder getStructDataOrBuilder() { - if (structDataBuilder_ != null) { - return structDataBuilder_.getMessageOrBuilder(); - } else { - return structData_ == null - ? com.google.protobuf.Struct.getDefaultInstance() - : structData_; - } + return structData_ == null + ? com.google.protobuf.Struct.getDefaultInstance() + : structData_; } - /** - * - * - *
            -         * Structured search data.
            -         * 
            - * - * .google.protobuf.Struct struct_data = 2; - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Struct, - com.google.protobuf.Struct.Builder, - com.google.protobuf.StructOrBuilder> - internalGetStructDataFieldBuilder() { - if (structDataBuilder_ == null) { - structDataBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Struct, - com.google.protobuf.Struct.Builder, - com.google.protobuf.StructOrBuilder>( - getStructData(), getParentForChildren(), isClean()); - structData_ = null; + 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(document_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, document_); } - return structDataBuilder_; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(uri_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, uri_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(title_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, title_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageIdentifier_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, pageIdentifier_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(5, getStructData()); + } + getUnknownFields().writeTo(output); } - // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.Answer.Reference.StructuredDocumentInfo) - } + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; - // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.Answer.Reference.StructuredDocumentInfo) - private static final com.google.cloud.discoveryengine.v1beta.Answer.Reference - .StructuredDocumentInfo - DEFAULT_INSTANCE; + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(document_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, document_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(uri_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, uri_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(title_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, title_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageIdentifier_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, pageIdentifier_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getStructData()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } - static { - DEFAULT_INSTANCE = - new com.google.cloud.discoveryengine.v1beta.Answer.Reference.StructuredDocumentInfo(); - } + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof + com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo + .DocumentMetadata)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo.DocumentMetadata + other = + (com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo + .DocumentMetadata) + obj; - public static com.google.cloud.discoveryengine.v1beta.Answer.Reference.StructuredDocumentInfo - getDefaultInstance() { - return DEFAULT_INSTANCE; - } + if (!getDocument().equals(other.getDocument())) return false; + if (!getUri().equals(other.getUri())) return false; + if (!getTitle().equals(other.getTitle())) return false; + if (!getPageIdentifier().equals(other.getPageIdentifier())) return false; + if (hasStructData() != other.hasStructData()) return false; + if (hasStructData()) { + if (!getStructData().equals(other.getStructData())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public StructuredDocumentInfo parsePartialFrom( - com.google.protobuf.CodedInputStream input, + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + DOCUMENT_FIELD_NUMBER; + hash = (53 * hash) + getDocument().hashCode(); + hash = (37 * hash) + URI_FIELD_NUMBER; + hash = (53 * hash) + getUri().hashCode(); + hash = (37 * hash) + TITLE_FIELD_NUMBER; + hash = (53 * hash) + getTitle().hashCode(); + hash = (37 * hash) + PAGE_IDENTIFIER_FIELD_NUMBER; + hash = (53 * hash) + getPageIdentifier().hashCode(); + if (hasStructData()) { + hash = (37 * hash) + STRUCT_DATA_FIELD_NUMBER; + hash = (53 * hash) + getStructData().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo + .DocumentMetadata + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo + .DocumentMetadata + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException() - .setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; + return PARSER.parseFrom(data, extensionRegistry); + } - public static com.google.protobuf.Parser parser() { - return PARSER; - } + public static com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo + .DocumentMetadata + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + public static com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo + .DocumentMetadata + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.Answer.Reference.StructuredDocumentInfo - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - } + public static com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo + .DocumentMetadata + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - private int contentCase_ = 0; + public static com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo + .DocumentMetadata + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - @SuppressWarnings("serial") - private java.lang.Object content_; + public static com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo + .DocumentMetadata + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } - public enum ContentCase - implements - com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - UNSTRUCTURED_DOCUMENT_INFO(1), - CHUNK_INFO(2), - STRUCTURED_DOCUMENT_INFO(3), - CONTENT_NOT_SET(0); - private final int value; + public static com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo + .DocumentMetadata + parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } - private ContentCase(int value) { - this.value = value; - } + public static com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo + .DocumentMetadata + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } - /** - * @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 ContentCase valueOf(int value) { - return forNumber(value); - } + public static com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo + .DocumentMetadata + 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 ContentCase forNumber(int value) { - switch (value) { - case 1: - return UNSTRUCTURED_DOCUMENT_INFO; - case 2: - return CHUNK_INFO; - case 3: - return STRUCTURED_DOCUMENT_INFO; - case 0: - return CONTENT_NOT_SET; - default: - return null; + public static com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo + .DocumentMetadata + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } - } - public int getNumber() { - return this.value; - } - }; + public static com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo + .DocumentMetadata + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } - public ContentCase getContentCase() { - return ContentCase.forNumber(contentCase_); - } + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } - public static final int UNSTRUCTURED_DOCUMENT_INFO_FIELD_NUMBER = 1; + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } - /** - * - * - *
            -     * Unstructured document information.
            -     * 
            - * - * - * .google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo unstructured_document_info = 1; - * - * - * @return Whether the unstructuredDocumentInfo field is set. - */ - @java.lang.Override - public boolean hasUnstructuredDocumentInfo() { - return contentCase_ == 1; - } + public static Builder newBuilder( + com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo.DocumentMetadata + prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } - /** - * - * - *
            -     * Unstructured document information.
            -     * 
            - * - * - * .google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo unstructured_document_info = 1; - * - * - * @return The unstructuredDocumentInfo. - */ - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo - getUnstructuredDocumentInfo() { - if (contentCase_ == 1) { - return (com.google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo) - content_; - } - return com.google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo - .getDefaultInstance(); - } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } - /** - * - * - *
            -     * Unstructured document information.
            -     * 
            - * - * - * .google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo unstructured_document_info = 1; - * - */ - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.Answer.Reference - .UnstructuredDocumentInfoOrBuilder - getUnstructuredDocumentInfoOrBuilder() { - if (contentCase_ == 1) { - return (com.google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo) - content_; - } - return com.google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo - .getDefaultInstance(); - } + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } - public static final int CHUNK_INFO_FIELD_NUMBER = 2; + /** + * + * + *
            +         * Document metadata.
            +         * 
            + * + * Protobuf type {@code + * google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo.DocumentMetadata} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo.DocumentMetadata) + com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo + .DocumentMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.AnswerProto + .internal_static_google_cloud_discoveryengine_v1beta_Answer_Reference_ChunkInfo_DocumentMetadata_descriptor; + } - /** - * - * - *
            -     * Chunk information.
            -     * 
            - * - * .google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo chunk_info = 2; - * - * @return Whether the chunkInfo field is set. - */ - @java.lang.Override - public boolean hasChunkInfo() { - return contentCase_ == 2; - } + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.AnswerProto + .internal_static_google_cloud_discoveryengine_v1beta_Answer_Reference_ChunkInfo_DocumentMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo + .DocumentMetadata.class, + com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo + .DocumentMetadata.Builder.class); + } - /** - * - * - *
            -     * Chunk information.
            -     * 
            - * - * .google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo chunk_info = 2; - * - * @return The chunkInfo. - */ - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo getChunkInfo() { - if (contentCase_ == 2) { - return (com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo) content_; - } - return com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo - .getDefaultInstance(); - } + // Construct using + // com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo.DocumentMetadata.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } - /** - * - * - *
            -     * Chunk information.
            -     * 
            - * - * .google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo chunk_info = 2; - */ - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfoOrBuilder - getChunkInfoOrBuilder() { - if (contentCase_ == 2) { - return (com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo) content_; - } - return com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo - .getDefaultInstance(); - } + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } - public static final int STRUCTURED_DOCUMENT_INFO_FIELD_NUMBER = 3; + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetStructDataFieldBuilder(); + } + } - /** - * - * - *
            -     * Structured document information.
            -     * 
            - * - * - * .google.cloud.discoveryengine.v1beta.Answer.Reference.StructuredDocumentInfo structured_document_info = 3; - * - * - * @return Whether the structuredDocumentInfo field is set. - */ - @java.lang.Override - public boolean hasStructuredDocumentInfo() { - return contentCase_ == 3; - } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + document_ = ""; + uri_ = ""; + title_ = ""; + pageIdentifier_ = ""; + structData_ = null; + if (structDataBuilder_ != null) { + structDataBuilder_.dispose(); + structDataBuilder_ = null; + } + return this; + } - /** - * - * - *
            -     * Structured document information.
            -     * 
            - * - * - * .google.cloud.discoveryengine.v1beta.Answer.Reference.StructuredDocumentInfo structured_document_info = 3; - * - * - * @return The structuredDocumentInfo. - */ - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.Answer.Reference.StructuredDocumentInfo - getStructuredDocumentInfo() { - if (contentCase_ == 3) { - return (com.google.cloud.discoveryengine.v1beta.Answer.Reference.StructuredDocumentInfo) - content_; - } - return com.google.cloud.discoveryengine.v1beta.Answer.Reference.StructuredDocumentInfo - .getDefaultInstance(); - } - - /** - * - * - *
            -     * Structured document information.
            -     * 
            - * - * - * .google.cloud.discoveryengine.v1beta.Answer.Reference.StructuredDocumentInfo structured_document_info = 3; - * - */ - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.Answer.Reference.StructuredDocumentInfoOrBuilder - getStructuredDocumentInfoOrBuilder() { - if (contentCase_ == 3) { - return (com.google.cloud.discoveryengine.v1beta.Answer.Reference.StructuredDocumentInfo) - content_; - } - return com.google.cloud.discoveryengine.v1beta.Answer.Reference.StructuredDocumentInfo - .getDefaultInstance(); - } - - private byte memoizedIsInitialized = -1; + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1beta.AnswerProto + .internal_static_google_cloud_discoveryengine_v1beta_Answer_Reference_ChunkInfo_DocumentMetadata_descriptor; + } - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo.DocumentMetadata + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo + .DocumentMetadata.getDefaultInstance(); + } - memoizedIsInitialized = 1; - return true; - } + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo.DocumentMetadata + build() { + com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo.DocumentMetadata + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (contentCase_ == 1) { - output.writeMessage( - 1, - (com.google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo) - content_); - } - if (contentCase_ == 2) { - output.writeMessage( - 2, (com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo) content_); - } - if (contentCase_ == 3) { - output.writeMessage( - 3, - (com.google.cloud.discoveryengine.v1beta.Answer.Reference.StructuredDocumentInfo) - content_); - } - getUnknownFields().writeTo(output); - } + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo.DocumentMetadata + buildPartial() { + com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo.DocumentMetadata + result = + new com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo + .DocumentMetadata(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; + private void buildPartial0( + com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo.DocumentMetadata + result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.document_ = document_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.uri_ = uri_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.title_ = title_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.pageIdentifier_ = pageIdentifier_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000010) != 0)) { + result.structData_ = + structDataBuilder_ == null ? structData_ : structDataBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } - size = 0; - if (contentCase_ == 1) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 1, - (com.google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo) - content_); - } - if (contentCase_ == 2) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 2, (com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo) content_); - } - if (contentCase_ == 3) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 3, - (com.google.cloud.discoveryengine.v1beta.Answer.Reference.StructuredDocumentInfo) - content_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo + .DocumentMetadata) { + return mergeFrom( + (com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo + .DocumentMetadata) + other); + } else { + super.mergeFrom(other); + return this; + } + } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.discoveryengine.v1beta.Answer.Reference)) { - return super.equals(obj); - } - com.google.cloud.discoveryengine.v1beta.Answer.Reference other = - (com.google.cloud.discoveryengine.v1beta.Answer.Reference) obj; + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo.DocumentMetadata + other) { + if (other + == com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo + .DocumentMetadata.getDefaultInstance()) return this; + if (!other.getDocument().isEmpty()) { + document_ = other.document_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getUri().isEmpty()) { + uri_ = other.uri_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getTitle().isEmpty()) { + title_ = other.title_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getPageIdentifier().isEmpty()) { + pageIdentifier_ = other.pageIdentifier_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (other.hasStructData()) { + mergeStructData(other.getStructData()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } - if (!getContentCase().equals(other.getContentCase())) return false; - switch (contentCase_) { - case 1: - if (!getUnstructuredDocumentInfo().equals(other.getUnstructuredDocumentInfo())) - return false; - break; - case 2: - if (!getChunkInfo().equals(other.getChunkInfo())) return false; - break; - case 3: - if (!getStructuredDocumentInfo().equals(other.getStructuredDocumentInfo())) return false; - break; - case 0: - default: - } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } + @java.lang.Override + public final boolean isInitialized() { + return true; + } - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - switch (contentCase_) { - case 1: - hash = (37 * hash) + UNSTRUCTURED_DOCUMENT_INFO_FIELD_NUMBER; - hash = (53 * hash) + getUnstructuredDocumentInfo().hashCode(); - break; - case 2: - hash = (37 * hash) + CHUNK_INFO_FIELD_NUMBER; - hash = (53 * hash) + getChunkInfo().hashCode(); - break; - case 3: - hash = (37 * hash) + STRUCTURED_DOCUMENT_INFO_FIELD_NUMBER; - hash = (53 * hash) + getStructuredDocumentInfo().hashCode(); - break; - case 0: - default: - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.discoveryengine.v1beta.Answer.Reference parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.discoveryengine.v1beta.Answer.Reference parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + document_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + uri_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + title_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + pageIdentifier_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + input.readMessage( + internalGetStructDataFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 42 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } - public static com.google.cloud.discoveryengine.v1beta.Answer.Reference parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } + private int bitField0_; - public static com.google.cloud.discoveryengine.v1beta.Answer.Reference parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } + private java.lang.Object document_ = ""; - public static com.google.cloud.discoveryengine.v1beta.Answer.Reference parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } + /** + * + * + *
            +           * Document resource name.
            +           * 
            + * + * string document = 1 [(.google.api.resource_reference) = { ... } + * + * @return The document. + */ + public java.lang.String getDocument() { + java.lang.Object ref = document_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + document_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } - public static com.google.cloud.discoveryengine.v1beta.Answer.Reference parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } + /** + * + * + *
            +           * Document resource name.
            +           * 
            + * + * string document = 1 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for document. + */ + public com.google.protobuf.ByteString getDocumentBytes() { + java.lang.Object ref = document_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + document_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } - public static com.google.cloud.discoveryengine.v1beta.Answer.Reference parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } + /** + * + * + *
            +           * Document resource name.
            +           * 
            + * + * string document = 1 [(.google.api.resource_reference) = { ... } + * + * @param value The document to set. + * @return This builder for chaining. + */ + public Builder setDocument(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + document_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } - public static com.google.cloud.discoveryengine.v1beta.Answer.Reference parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } + /** + * + * + *
            +           * Document resource name.
            +           * 
            + * + * string document = 1 [(.google.api.resource_reference) = { ... } + * + * @return This builder for chaining. + */ + public Builder clearDocument() { + document_ = getDefaultInstance().getDocument(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } - public static com.google.cloud.discoveryengine.v1beta.Answer.Reference parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } + /** + * + * + *
            +           * Document resource name.
            +           * 
            + * + * string document = 1 [(.google.api.resource_reference) = { ... } + * + * @param value The bytes for document to set. + * @return This builder for chaining. + */ + public Builder setDocumentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + document_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } - public static com.google.cloud.discoveryengine.v1beta.Answer.Reference parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } + private java.lang.Object uri_ = ""; - public static com.google.cloud.discoveryengine.v1beta.Answer.Reference parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } + /** + * + * + *
            +           * URI for the document.
            +           * 
            + * + * string uri = 2; + * + * @return The uri. + */ + public java.lang.String getUri() { + java.lang.Object ref = uri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } - public static com.google.cloud.discoveryengine.v1beta.Answer.Reference parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } + /** + * + * + *
            +           * URI for the document.
            +           * 
            + * + * string uri = 2; + * + * @return The bytes for uri. + */ + public com.google.protobuf.ByteString getUriBytes() { + java.lang.Object ref = uri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } + /** + * + * + *
            +           * URI for the document.
            +           * 
            + * + * string uri = 2; + * + * @param value The uri to set. + * @return This builder for chaining. + */ + public Builder setUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + uri_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } + /** + * + * + *
            +           * URI for the document.
            +           * 
            + * + * string uri = 2; + * + * @return This builder for chaining. + */ + public Builder clearUri() { + uri_ = getDefaultInstance().getUri(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } - public static Builder newBuilder( - com.google.cloud.discoveryengine.v1beta.Answer.Reference prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } + /** + * + * + *
            +           * URI for the document.
            +           * 
            + * + * string uri = 2; + * + * @param value The bytes for uri to set. + * @return This builder for chaining. + */ + public Builder setUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + uri_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } + private java.lang.Object title_ = ""; - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } + /** + * + * + *
            +           * Title.
            +           * 
            + * + * string title = 3; + * + * @return The title. + */ + public java.lang.String getTitle() { + java.lang.Object ref = title_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + title_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } - /** - * - * - *
            -     * Reference.
            -     * 
            - * - * Protobuf type {@code google.cloud.discoveryengine.v1beta.Answer.Reference} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.Answer.Reference) - com.google.cloud.discoveryengine.v1beta.Answer.ReferenceOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.discoveryengine.v1beta.AnswerProto - .internal_static_google_cloud_discoveryengine_v1beta_Answer_Reference_descriptor; - } + /** + * + * + *
            +           * Title.
            +           * 
            + * + * string title = 3; + * + * @return The bytes for title. + */ + public com.google.protobuf.ByteString getTitleBytes() { + java.lang.Object ref = title_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + title_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.discoveryengine.v1beta.AnswerProto - .internal_static_google_cloud_discoveryengine_v1beta_Answer_Reference_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.discoveryengine.v1beta.Answer.Reference.class, - com.google.cloud.discoveryengine.v1beta.Answer.Reference.Builder.class); - } + /** + * + * + *
            +           * Title.
            +           * 
            + * + * string title = 3; + * + * @param value The title to set. + * @return This builder for chaining. + */ + public Builder setTitle(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + title_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } - // Construct using com.google.cloud.discoveryengine.v1beta.Answer.Reference.newBuilder() - private Builder() {} + /** + * + * + *
            +           * Title.
            +           * 
            + * + * string title = 3; + * + * @return This builder for chaining. + */ + public Builder clearTitle() { + title_ = getDefaultInstance().getTitle(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - } + /** + * + * + *
            +           * Title.
            +           * 
            + * + * string title = 3; + * + * @param value The bytes for title to set. + * @return This builder for chaining. + */ + public Builder setTitleBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + title_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - if (unstructuredDocumentInfoBuilder_ != null) { - unstructuredDocumentInfoBuilder_.clear(); - } - if (chunkInfoBuilder_ != null) { - chunkInfoBuilder_.clear(); - } - if (structuredDocumentInfoBuilder_ != null) { - structuredDocumentInfoBuilder_.clear(); - } - contentCase_ = 0; - content_ = null; - return this; - } + private java.lang.Object pageIdentifier_ = ""; - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.discoveryengine.v1beta.AnswerProto - .internal_static_google_cloud_discoveryengine_v1beta_Answer_Reference_descriptor; - } + /** + * + * + *
            +           * Page identifier.
            +           * 
            + * + * string page_identifier = 4; + * + * @return The pageIdentifier. + */ + public java.lang.String getPageIdentifier() { + java.lang.Object ref = pageIdentifier_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageIdentifier_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.Answer.Reference getDefaultInstanceForType() { - return com.google.cloud.discoveryengine.v1beta.Answer.Reference.getDefaultInstance(); - } + /** + * + * + *
            +           * Page identifier.
            +           * 
            + * + * string page_identifier = 4; + * + * @return The bytes for pageIdentifier. + */ + public com.google.protobuf.ByteString getPageIdentifierBytes() { + java.lang.Object ref = pageIdentifier_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageIdentifier_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.Answer.Reference build() { - com.google.cloud.discoveryengine.v1beta.Answer.Reference result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } + /** + * + * + *
            +           * Page identifier.
            +           * 
            + * + * string page_identifier = 4; + * + * @param value The pageIdentifier to set. + * @return This builder for chaining. + */ + public Builder setPageIdentifier(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + pageIdentifier_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.Answer.Reference buildPartial() { - com.google.cloud.discoveryengine.v1beta.Answer.Reference result = - new com.google.cloud.discoveryengine.v1beta.Answer.Reference(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - buildPartialOneofs(result); - onBuilt(); - return result; - } + /** + * + * + *
            +           * Page identifier.
            +           * 
            + * + * string page_identifier = 4; + * + * @return This builder for chaining. + */ + public Builder clearPageIdentifier() { + pageIdentifier_ = getDefaultInstance().getPageIdentifier(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } - private void buildPartial0(com.google.cloud.discoveryengine.v1beta.Answer.Reference result) { - int from_bitField0_ = bitField0_; - } + /** + * + * + *
            +           * Page identifier.
            +           * 
            + * + * string page_identifier = 4; + * + * @param value The bytes for pageIdentifier to set. + * @return This builder for chaining. + */ + public Builder setPageIdentifierBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + pageIdentifier_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } - private void buildPartialOneofs( - com.google.cloud.discoveryengine.v1beta.Answer.Reference result) { - result.contentCase_ = contentCase_; - result.content_ = this.content_; - if (contentCase_ == 1 && unstructuredDocumentInfoBuilder_ != null) { - result.content_ = unstructuredDocumentInfoBuilder_.build(); - } - if (contentCase_ == 2 && chunkInfoBuilder_ != null) { - result.content_ = chunkInfoBuilder_.build(); - } - if (contentCase_ == 3 && structuredDocumentInfoBuilder_ != null) { - result.content_ = structuredDocumentInfoBuilder_.build(); - } - } + private com.google.protobuf.Struct structData_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Struct, + com.google.protobuf.Struct.Builder, + com.google.protobuf.StructOrBuilder> + structDataBuilder_; - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.discoveryengine.v1beta.Answer.Reference) { - return mergeFrom((com.google.cloud.discoveryengine.v1beta.Answer.Reference) other); - } else { - super.mergeFrom(other); - return this; - } - } + /** + * + * + *
            +           * The structured JSON metadata for the document.
            +           * It is populated from the struct data from the Chunk in search result.
            +           * 
            + * + * .google.protobuf.Struct struct_data = 5; + * + * @return Whether the structData field is set. + */ + public boolean hasStructData() { + return ((bitField0_ & 0x00000010) != 0); + } - public Builder mergeFrom(com.google.cloud.discoveryengine.v1beta.Answer.Reference other) { - if (other == com.google.cloud.discoveryengine.v1beta.Answer.Reference.getDefaultInstance()) - return this; - switch (other.getContentCase()) { - case UNSTRUCTURED_DOCUMENT_INFO: - { - mergeUnstructuredDocumentInfo(other.getUnstructuredDocumentInfo()); - break; - } - case CHUNK_INFO: - { - mergeChunkInfo(other.getChunkInfo()); - break; - } - case STRUCTURED_DOCUMENT_INFO: - { - mergeStructuredDocumentInfo(other.getStructuredDocumentInfo()); - break; - } - case CONTENT_NOT_SET: - { - break; + /** + * + * + *
            +           * The structured JSON metadata for the document.
            +           * It is populated from the struct data from the Chunk in search result.
            +           * 
            + * + * .google.protobuf.Struct struct_data = 5; + * + * @return The structData. + */ + public com.google.protobuf.Struct getStructData() { + if (structDataBuilder_ == null) { + return structData_ == null + ? com.google.protobuf.Struct.getDefaultInstance() + : structData_; + } else { + return structDataBuilder_.getMessage(); } - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } + } - @java.lang.Override - public final boolean isInitialized() { - return true; - } + /** + * + * + *
            +           * The structured JSON metadata for the document.
            +           * It is populated from the struct data from the Chunk in search result.
            +           * 
            + * + * .google.protobuf.Struct struct_data = 5; + */ + public Builder setStructData(com.google.protobuf.Struct value) { + if (structDataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + structData_ = value; + } else { + structDataBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - input.readMessage( - internalGetUnstructuredDocumentInfoFieldBuilder().getBuilder(), - extensionRegistry); - contentCase_ = 1; - break; - } // case 10 - case 18: - { - input.readMessage( - internalGetChunkInfoFieldBuilder().getBuilder(), extensionRegistry); - contentCase_ = 2; - break; - } // case 18 - case 26: - { - input.readMessage( - internalGetStructuredDocumentInfoFieldBuilder().getBuilder(), - extensionRegistry); - contentCase_ = 3; - break; - } // case 26 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int contentCase_ = 0; - private java.lang.Object content_; - - public ContentCase getContentCase() { - return ContentCase.forNumber(contentCase_); - } - - public Builder clearContent() { - contentCase_ = 0; - content_ = null; - onChanged(); - return this; - } + /** + * + * + *
            +           * The structured JSON metadata for the document.
            +           * It is populated from the struct data from the Chunk in search result.
            +           * 
            + * + * .google.protobuf.Struct struct_data = 5; + */ + public Builder setStructData(com.google.protobuf.Struct.Builder builderForValue) { + if (structDataBuilder_ == null) { + structData_ = builderForValue.build(); + } else { + structDataBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } - private int bitField0_; + /** + * + * + *
            +           * The structured JSON metadata for the document.
            +           * It is populated from the struct data from the Chunk in search result.
            +           * 
            + * + * .google.protobuf.Struct struct_data = 5; + */ + public Builder mergeStructData(com.google.protobuf.Struct value) { + if (structDataBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) + && structData_ != null + && structData_ != com.google.protobuf.Struct.getDefaultInstance()) { + getStructDataBuilder().mergeFrom(value); + } else { + structData_ = value; + } + } else { + structDataBuilder_.mergeFrom(value); + } + if (structData_ != null) { + bitField0_ |= 0x00000010; + onChanged(); + } + return this; + } - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo, - com.google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo - .Builder, - com.google.cloud.discoveryengine.v1beta.Answer.Reference - .UnstructuredDocumentInfoOrBuilder> - unstructuredDocumentInfoBuilder_; + /** + * + * + *
            +           * The structured JSON metadata for the document.
            +           * It is populated from the struct data from the Chunk in search result.
            +           * 
            + * + * .google.protobuf.Struct struct_data = 5; + */ + public Builder clearStructData() { + bitField0_ = (bitField0_ & ~0x00000010); + structData_ = null; + if (structDataBuilder_ != null) { + structDataBuilder_.dispose(); + structDataBuilder_ = null; + } + onChanged(); + return this; + } - /** - * - * - *
            -       * Unstructured document information.
            -       * 
            - * - * - * .google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo unstructured_document_info = 1; - * - * - * @return Whether the unstructuredDocumentInfo field is set. - */ - @java.lang.Override - public boolean hasUnstructuredDocumentInfo() { - return contentCase_ == 1; - } + /** + * + * + *
            +           * The structured JSON metadata for the document.
            +           * It is populated from the struct data from the Chunk in search result.
            +           * 
            + * + * .google.protobuf.Struct struct_data = 5; + */ + public com.google.protobuf.Struct.Builder getStructDataBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return internalGetStructDataFieldBuilder().getBuilder(); + } - /** - * - * - *
            -       * Unstructured document information.
            -       * 
            - * - * - * .google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo unstructured_document_info = 1; - * - * - * @return The unstructuredDocumentInfo. - */ - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo - getUnstructuredDocumentInfo() { - if (unstructuredDocumentInfoBuilder_ == null) { - if (contentCase_ == 1) { - return (com.google.cloud.discoveryengine.v1beta.Answer.Reference - .UnstructuredDocumentInfo) - content_; + /** + * + * + *
            +           * The structured JSON metadata for the document.
            +           * It is populated from the struct data from the Chunk in search result.
            +           * 
            + * + * .google.protobuf.Struct struct_data = 5; + */ + public com.google.protobuf.StructOrBuilder getStructDataOrBuilder() { + if (structDataBuilder_ != null) { + return structDataBuilder_.getMessageOrBuilder(); + } else { + return structData_ == null + ? com.google.protobuf.Struct.getDefaultInstance() + : structData_; + } } - return com.google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo - .getDefaultInstance(); - } else { - if (contentCase_ == 1) { - return unstructuredDocumentInfoBuilder_.getMessage(); + + /** + * + * + *
            +           * The structured JSON metadata for the document.
            +           * It is populated from the struct data from the Chunk in search result.
            +           * 
            + * + * .google.protobuf.Struct struct_data = 5; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Struct, + com.google.protobuf.Struct.Builder, + com.google.protobuf.StructOrBuilder> + internalGetStructDataFieldBuilder() { + if (structDataBuilder_ == null) { + structDataBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Struct, + com.google.protobuf.Struct.Builder, + com.google.protobuf.StructOrBuilder>( + getStructData(), getParentForChildren(), isClean()); + structData_ = null; + } + return structDataBuilder_; } - return com.google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo - .getDefaultInstance(); + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo.DocumentMetadata) } - } - /** - * - * - *
            -       * Unstructured document information.
            -       * 
            - * - * - * .google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo unstructured_document_info = 1; - * + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo.DocumentMetadata) + private static final com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo + .DocumentMetadata + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo + .DocumentMetadata(); + } + + public static com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo + .DocumentMetadata + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DocumentMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo.DocumentMetadata + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int bitField0_; + public static final int CHUNK_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object chunk_ = ""; + + /** + * + * + *
            +       * Chunk resource name.
            +       * 
            + * + * string chunk = 1 [(.google.api.resource_reference) = { ... } + * + * @return The chunk. */ - public Builder setUnstructuredDocumentInfo( - com.google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo value) { - if (unstructuredDocumentInfoBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - content_ = value; - onChanged(); + @java.lang.Override + public java.lang.String getChunk() { + java.lang.Object ref = chunk_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; } else { - unstructuredDocumentInfoBuilder_.setMessage(value); + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + chunk_ = s; + return s; } - contentCase_ = 1; - return this; } /** * * *
            -       * Unstructured document information.
            +       * Chunk resource name.
                    * 
            * - * - * .google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo unstructured_document_info = 1; - * + * string chunk = 1 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for chunk. */ - public Builder setUnstructuredDocumentInfo( - com.google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo.Builder - builderForValue) { - if (unstructuredDocumentInfoBuilder_ == null) { - content_ = builderForValue.build(); - onChanged(); + @java.lang.Override + public com.google.protobuf.ByteString getChunkBytes() { + java.lang.Object ref = chunk_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + chunk_ = b; + return b; } else { - unstructuredDocumentInfoBuilder_.setMessage(builderForValue.build()); + return (com.google.protobuf.ByteString) ref; } - contentCase_ = 1; - return this; } + public static final int CONTENT_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object content_ = ""; + /** * * *
            -       * Unstructured document information.
            +       * Chunk textual content.
                    * 
            * - * - * .google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo unstructured_document_info = 1; - * + * string content = 2; + * + * @return The content. */ - public Builder mergeUnstructuredDocumentInfo( - com.google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo value) { - if (unstructuredDocumentInfoBuilder_ == null) { - if (contentCase_ == 1 - && content_ - != com.google.cloud.discoveryengine.v1beta.Answer.Reference - .UnstructuredDocumentInfo.getDefaultInstance()) { - content_ = - com.google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo - .newBuilder( - (com.google.cloud.discoveryengine.v1beta.Answer.Reference - .UnstructuredDocumentInfo) - content_) - .mergeFrom(value) - .buildPartial(); - } else { - content_ = value; - } - onChanged(); + @java.lang.Override + public java.lang.String getContent() { + java.lang.Object ref = content_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; } else { - if (contentCase_ == 1) { - unstructuredDocumentInfoBuilder_.mergeFrom(value); - } else { - unstructuredDocumentInfoBuilder_.setMessage(value); - } + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + content_ = s; + return s; } - contentCase_ = 1; - return this; } /** * * *
            -       * Unstructured document information.
            +       * Chunk textual content.
                    * 
            * - * - * .google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo unstructured_document_info = 1; - * + * string content = 2; + * + * @return The bytes for content. */ - public Builder clearUnstructuredDocumentInfo() { - if (unstructuredDocumentInfoBuilder_ == null) { - if (contentCase_ == 1) { - contentCase_ = 0; - content_ = null; - onChanged(); - } + @java.lang.Override + public com.google.protobuf.ByteString getContentBytes() { + java.lang.Object ref = content_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + content_ = b; + return b; } else { - if (contentCase_ == 1) { - contentCase_ = 0; - content_ = null; - } - unstructuredDocumentInfoBuilder_.clear(); + return (com.google.protobuf.ByteString) ref; } - return this; } + public static final int RELEVANCE_SCORE_FIELD_NUMBER = 3; + private float relevanceScore_ = 0F; + /** * * *
            -       * Unstructured document information.
            +       * The relevance of the chunk for a given query. Values range from 0.0
            +       * (completely irrelevant) to 1.0 (completely relevant).
            +       * This value is for informational purpose only. It may change for
            +       * the same query and chunk at any time due to a model retraining or
            +       * change in implementation.
                    * 
            * - * - * .google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo unstructured_document_info = 1; - * + * optional float relevance_score = 3; + * + * @return Whether the relevanceScore field is set. */ - public com.google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo - .Builder - getUnstructuredDocumentInfoBuilder() { - return internalGetUnstructuredDocumentInfoFieldBuilder().getBuilder(); + @java.lang.Override + public boolean hasRelevanceScore() { + return ((bitField0_ & 0x00000001) != 0); } /** * * *
            -       * Unstructured document information.
            +       * The relevance of the chunk for a given query. Values range from 0.0
            +       * (completely irrelevant) to 1.0 (completely relevant).
            +       * This value is for informational purpose only. It may change for
            +       * the same query and chunk at any time due to a model retraining or
            +       * change in implementation.
                    * 
            * - * - * .google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo unstructured_document_info = 1; - * + * optional float relevance_score = 3; + * + * @return The relevanceScore. */ @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.Answer.Reference - .UnstructuredDocumentInfoOrBuilder - getUnstructuredDocumentInfoOrBuilder() { - if ((contentCase_ == 1) && (unstructuredDocumentInfoBuilder_ != null)) { - return unstructuredDocumentInfoBuilder_.getMessageOrBuilder(); - } else { - if (contentCase_ == 1) { - return (com.google.cloud.discoveryengine.v1beta.Answer.Reference - .UnstructuredDocumentInfo) - content_; - } - return com.google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo - .getDefaultInstance(); - } + public float getRelevanceScore() { + return relevanceScore_; } + public static final int DOCUMENT_METADATA_FIELD_NUMBER = 4; + private com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo.DocumentMetadata + documentMetadata_; + /** * * *
            -       * Unstructured document information.
            +       * Document metadata.
                    * 
            * * - * .google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo unstructured_document_info = 1; - * - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo, - com.google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo - .Builder, - com.google.cloud.discoveryengine.v1beta.Answer.Reference - .UnstructuredDocumentInfoOrBuilder> - internalGetUnstructuredDocumentInfoFieldBuilder() { - if (unstructuredDocumentInfoBuilder_ == null) { - if (!(contentCase_ == 1)) { - content_ = - com.google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo - .getDefaultInstance(); - } - unstructuredDocumentInfoBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo, - com.google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo - .Builder, - com.google.cloud.discoveryengine.v1beta.Answer.Reference - .UnstructuredDocumentInfoOrBuilder>( - (com.google.cloud.discoveryengine.v1beta.Answer.Reference - .UnstructuredDocumentInfo) - content_, - getParentForChildren(), - isClean()); - content_ = null; - } - contentCase_ = 1; - onChanged(); - return unstructuredDocumentInfoBuilder_; - } - - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo, - com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo.Builder, - com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfoOrBuilder> - chunkInfoBuilder_; - - /** - * - * - *
            -       * Chunk information.
            -       * 
            - * - * .google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo chunk_info = 2; + * .google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo.DocumentMetadata document_metadata = 4; * * - * @return Whether the chunkInfo field is set. + * @return Whether the documentMetadata field is set. */ @java.lang.Override - public boolean hasChunkInfo() { - return contentCase_ == 2; + public boolean hasDocumentMetadata() { + return ((bitField0_ & 0x00000002) != 0); } /** * * *
            -       * Chunk information.
            +       * Document metadata.
                    * 
            * - * .google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo chunk_info = 2; + * + * .google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo.DocumentMetadata document_metadata = 4; * * - * @return The chunkInfo. + * @return The documentMetadata. */ @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo getChunkInfo() { - if (chunkInfoBuilder_ == null) { - if (contentCase_ == 2) { - return (com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo) content_; - } - return com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo - .getDefaultInstance(); - } else { - if (contentCase_ == 2) { - return chunkInfoBuilder_.getMessage(); - } - return com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo - .getDefaultInstance(); - } + public com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo.DocumentMetadata + getDocumentMetadata() { + return documentMetadata_ == null + ? com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo.DocumentMetadata + .getDefaultInstance() + : documentMetadata_; } /** * * *
            -       * Chunk information.
            +       * Document metadata.
                    * 
            * - * .google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo chunk_info = 2; + * + * .google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo.DocumentMetadata document_metadata = 4; * */ - public Builder setChunkInfo( - com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo value) { - if (chunkInfoBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - content_ = value; - onChanged(); - } else { - chunkInfoBuilder_.setMessage(value); - } - contentCase_ = 2; - return this; + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo + .DocumentMetadataOrBuilder + getDocumentMetadataOrBuilder() { + return documentMetadata_ == null + ? com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo.DocumentMetadata + .getDefaultInstance() + : documentMetadata_; } + public static final int BLOB_ATTACHMENT_INDEXES_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private com.google.protobuf.Internal.LongList blobAttachmentIndexes_ = emptyLongList(); + /** * * *
            -       * Chunk information.
            +       * Output only. Stores indexes of blobattachments linked to this chunk.
                    * 
            * - * .google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo chunk_info = 2; + * + * repeated int64 blob_attachment_indexes = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; * + * + * @return A list containing the blobAttachmentIndexes. */ - public Builder setChunkInfo( - com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo.Builder - builderForValue) { - if (chunkInfoBuilder_ == null) { - content_ = builderForValue.build(); - onChanged(); - } else { - chunkInfoBuilder_.setMessage(builderForValue.build()); - } - contentCase_ = 2; - return this; + @java.lang.Override + public java.util.List getBlobAttachmentIndexesList() { + return blobAttachmentIndexes_; } /** * * *
            -       * Chunk information.
            +       * Output only. Stores indexes of blobattachments linked to this chunk.
                    * 
            * - * .google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo chunk_info = 2; + * + * repeated int64 blob_attachment_indexes = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; * + * + * @return The count of blobAttachmentIndexes. */ - public Builder mergeChunkInfo( - com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo value) { - if (chunkInfoBuilder_ == null) { - if (contentCase_ == 2 - && content_ - != com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo - .getDefaultInstance()) { - content_ = - com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo.newBuilder( - (com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo) - content_) - .mergeFrom(value) - .buildPartial(); - } else { - content_ = value; - } - onChanged(); - } else { - if (contentCase_ == 2) { - chunkInfoBuilder_.mergeFrom(value); - } else { - chunkInfoBuilder_.setMessage(value); - } - } - contentCase_ = 2; - return this; + public int getBlobAttachmentIndexesCount() { + return blobAttachmentIndexes_.size(); } /** * * *
            -       * Chunk information.
            +       * Output only. Stores indexes of blobattachments linked to this chunk.
                    * 
            * - * .google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo chunk_info = 2; + * + * repeated int64 blob_attachment_indexes = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; * + * + * @param index The index of the element to return. + * @return The blobAttachmentIndexes at the given index. */ - public Builder clearChunkInfo() { - if (chunkInfoBuilder_ == null) { - if (contentCase_ == 2) { - contentCase_ = 0; - content_ = null; - onChanged(); - } - } else { - if (contentCase_ == 2) { - contentCase_ = 0; - content_ = null; - } - chunkInfoBuilder_.clear(); - } - return this; + public long getBlobAttachmentIndexes(int index) { + return blobAttachmentIndexes_.getLong(index); } - /** - * - * - *
            -       * Chunk information.
            -       * 
            - * - * .google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo chunk_info = 2; - * - */ - public com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo.Builder - getChunkInfoBuilder() { - return internalGetChunkInfoFieldBuilder().getBuilder(); + private int blobAttachmentIndexesMemoizedSerializedSize = -1; + + 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; } - /** - * - * - *
            -       * Chunk information.
            -       * 
            - * - * .google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo chunk_info = 2; - * - */ @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfoOrBuilder - getChunkInfoOrBuilder() { - if ((contentCase_ == 2) && (chunkInfoBuilder_ != null)) { - return chunkInfoBuilder_.getMessageOrBuilder(); - } else { - if (contentCase_ == 2) { - return (com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo) content_; - } - return com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo - .getDefaultInstance(); + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + getSerializedSize(); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(chunk_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, chunk_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(content_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, content_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeFloat(3, relevanceScore_); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(4, getDocumentMetadata()); } + if (getBlobAttachmentIndexesList().size() > 0) { + output.writeUInt32NoTag(42); + output.writeUInt32NoTag(blobAttachmentIndexesMemoizedSerializedSize); + } + for (int i = 0; i < blobAttachmentIndexes_.size(); i++) { + output.writeInt64NoTag(blobAttachmentIndexes_.getLong(i)); + } + getUnknownFields().writeTo(output); } - /** - * - * - *
            -       * Chunk information.
            -       * 
            - * - * .google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo chunk_info = 2; - * - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo, - com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo.Builder, - com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfoOrBuilder> - internalGetChunkInfoFieldBuilder() { - if (chunkInfoBuilder_ == null) { - if (!(contentCase_ == 2)) { - content_ = - com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo - .getDefaultInstance(); - } - chunkInfoBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo, - com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo.Builder, - com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfoOrBuilder>( - (com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo) content_, - getParentForChildren(), - isClean()); - content_ = null; - } - contentCase_ = 2; - onChanged(); - return chunkInfoBuilder_; - } - - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.discoveryengine.v1beta.Answer.Reference.StructuredDocumentInfo, - com.google.cloud.discoveryengine.v1beta.Answer.Reference.StructuredDocumentInfo - .Builder, - com.google.cloud.discoveryengine.v1beta.Answer.Reference - .StructuredDocumentInfoOrBuilder> - structuredDocumentInfoBuilder_; - - /** - * - * - *
            -       * Structured document information.
            -       * 
            - * - * - * .google.cloud.discoveryengine.v1beta.Answer.Reference.StructuredDocumentInfo structured_document_info = 3; - * - * - * @return Whether the structuredDocumentInfo field is set. - */ @java.lang.Override - public boolean hasStructuredDocumentInfo() { - return contentCase_ == 3; - } + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; - /** - * - * - *
            -       * Structured document information.
            -       * 
            - * - * - * .google.cloud.discoveryengine.v1beta.Answer.Reference.StructuredDocumentInfo structured_document_info = 3; - * - * - * @return The structuredDocumentInfo. - */ - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.Answer.Reference.StructuredDocumentInfo - getStructuredDocumentInfo() { - if (structuredDocumentInfoBuilder_ == null) { - if (contentCase_ == 3) { - return (com.google.cloud.discoveryengine.v1beta.Answer.Reference.StructuredDocumentInfo) - content_; + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(chunk_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, chunk_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(content_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, content_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeFloatSize(3, relevanceScore_); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(4, getDocumentMetadata()); + } + { + int dataSize = 0; + for (int i = 0; i < blobAttachmentIndexes_.size(); i++) { + dataSize += + com.google.protobuf.CodedOutputStream.computeInt64SizeNoTag( + blobAttachmentIndexes_.getLong(i)); } - return com.google.cloud.discoveryengine.v1beta.Answer.Reference.StructuredDocumentInfo - .getDefaultInstance(); - } else { - if (contentCase_ == 3) { - return structuredDocumentInfoBuilder_.getMessage(); + size += dataSize; + if (!getBlobAttachmentIndexesList().isEmpty()) { + size += 1; + size += com.google.protobuf.CodedOutputStream.computeInt32SizeNoTag(dataSize); } - return com.google.cloud.discoveryengine.v1beta.Answer.Reference.StructuredDocumentInfo - .getDefaultInstance(); + blobAttachmentIndexesMemoizedSerializedSize = dataSize; } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; } - /** - * - * - *
            -       * Structured document information.
            -       * 
            - * - * - * .google.cloud.discoveryengine.v1beta.Answer.Reference.StructuredDocumentInfo structured_document_info = 3; - * - */ - public Builder setStructuredDocumentInfo( - com.google.cloud.discoveryengine.v1beta.Answer.Reference.StructuredDocumentInfo value) { - if (structuredDocumentInfoBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - content_ = value; - onChanged(); - } else { - structuredDocumentInfoBuilder_.setMessage(value); + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; } - contentCase_ = 3; - return this; - } - - /** - * - * - *
            -       * Structured document information.
            -       * 
            - * - * - * .google.cloud.discoveryengine.v1beta.Answer.Reference.StructuredDocumentInfo structured_document_info = 3; - * - */ - public Builder setStructuredDocumentInfo( - com.google.cloud.discoveryengine.v1beta.Answer.Reference.StructuredDocumentInfo.Builder - builderForValue) { - if (structuredDocumentInfoBuilder_ == null) { - content_ = builderForValue.build(); - onChanged(); - } else { - structuredDocumentInfoBuilder_.setMessage(builderForValue.build()); + if (!(obj instanceof com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo)) { + return super.equals(obj); } - contentCase_ = 3; - return this; - } + com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo other = + (com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo) obj; - /** - * - * - *
            -       * Structured document information.
            -       * 
            - * - * - * .google.cloud.discoveryengine.v1beta.Answer.Reference.StructuredDocumentInfo structured_document_info = 3; - * - */ - public Builder mergeStructuredDocumentInfo( - com.google.cloud.discoveryengine.v1beta.Answer.Reference.StructuredDocumentInfo value) { - if (structuredDocumentInfoBuilder_ == null) { - if (contentCase_ == 3 - && content_ - != com.google.cloud.discoveryengine.v1beta.Answer.Reference.StructuredDocumentInfo - .getDefaultInstance()) { - content_ = - com.google.cloud.discoveryengine.v1beta.Answer.Reference.StructuredDocumentInfo - .newBuilder( - (com.google.cloud.discoveryengine.v1beta.Answer.Reference - .StructuredDocumentInfo) - content_) - .mergeFrom(value) - .buildPartial(); - } else { - content_ = value; - } - onChanged(); - } else { - if (contentCase_ == 3) { - structuredDocumentInfoBuilder_.mergeFrom(value); - } else { - structuredDocumentInfoBuilder_.setMessage(value); - } + if (!getChunk().equals(other.getChunk())) return false; + if (!getContent().equals(other.getContent())) return false; + if (hasRelevanceScore() != other.hasRelevanceScore()) return false; + if (hasRelevanceScore()) { + if (java.lang.Float.floatToIntBits(getRelevanceScore()) + != java.lang.Float.floatToIntBits(other.getRelevanceScore())) return false; } - contentCase_ = 3; - return this; + if (hasDocumentMetadata() != other.hasDocumentMetadata()) return false; + if (hasDocumentMetadata()) { + if (!getDocumentMetadata().equals(other.getDocumentMetadata())) return false; + } + if (!getBlobAttachmentIndexesList().equals(other.getBlobAttachmentIndexesList())) + return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; } - /** - * - * - *
            -       * Structured document information.
            -       * 
            - * - * - * .google.cloud.discoveryengine.v1beta.Answer.Reference.StructuredDocumentInfo structured_document_info = 3; - * - */ - public Builder clearStructuredDocumentInfo() { - if (structuredDocumentInfoBuilder_ == null) { - if (contentCase_ == 3) { - contentCase_ = 0; - content_ = null; - onChanged(); - } - } else { - if (contentCase_ == 3) { - contentCase_ = 0; - content_ = null; - } - structuredDocumentInfoBuilder_.clear(); + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; } - return this; + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + CHUNK_FIELD_NUMBER; + hash = (53 * hash) + getChunk().hashCode(); + hash = (37 * hash) + CONTENT_FIELD_NUMBER; + hash = (53 * hash) + getContent().hashCode(); + if (hasRelevanceScore()) { + hash = (37 * hash) + RELEVANCE_SCORE_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits(getRelevanceScore()); + } + if (hasDocumentMetadata()) { + hash = (37 * hash) + DOCUMENT_METADATA_FIELD_NUMBER; + hash = (53 * hash) + getDocumentMetadata().hashCode(); + } + if (getBlobAttachmentIndexesCount() > 0) { + hash = (37 * hash) + BLOB_ATTACHMENT_INDEXES_FIELD_NUMBER; + hash = (53 * hash) + getBlobAttachmentIndexesList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; } - /** - * - * - *
            -       * Structured document information.
            -       * 
            - * - * - * .google.cloud.discoveryengine.v1beta.Answer.Reference.StructuredDocumentInfo structured_document_info = 3; - * - */ - public com.google.cloud.discoveryengine.v1beta.Answer.Reference.StructuredDocumentInfo.Builder - getStructuredDocumentInfoBuilder() { - return internalGetStructuredDocumentInfoFieldBuilder().getBuilder(); + public static com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo 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.discoveryengine.v1beta.Answer.Reference.ChunkInfo parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo 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.discoveryengine.v1beta.Answer.Reference.ChunkInfo parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo 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.discoveryengine.v1beta.Answer.Reference.ChunkInfo + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo + 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.discoveryengine.v1beta.Answer.Reference.ChunkInfo parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); } - /** - * - * - *
            -       * Structured document information.
            -       * 
            - * - * - * .google.cloud.discoveryengine.v1beta.Answer.Reference.StructuredDocumentInfo structured_document_info = 3; - * - */ @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.Answer.Reference - .StructuredDocumentInfoOrBuilder - getStructuredDocumentInfoOrBuilder() { - if ((contentCase_ == 3) && (structuredDocumentInfoBuilder_ != null)) { - return structuredDocumentInfoBuilder_.getMessageOrBuilder(); - } else { - if (contentCase_ == 3) { - return (com.google.cloud.discoveryengine.v1beta.Answer.Reference.StructuredDocumentInfo) - content_; - } - return com.google.cloud.discoveryengine.v1beta.Answer.Reference.StructuredDocumentInfo - .getDefaultInstance(); - } + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo 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; } /** * * *
            -       * Structured document information.
            +       * Chunk information.
                    * 
            * - * - * .google.cloud.discoveryengine.v1beta.Answer.Reference.StructuredDocumentInfo structured_document_info = 3; - * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo} */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.discoveryengine.v1beta.Answer.Reference.StructuredDocumentInfo, - com.google.cloud.discoveryengine.v1beta.Answer.Reference.StructuredDocumentInfo - .Builder, - com.google.cloud.discoveryengine.v1beta.Answer.Reference - .StructuredDocumentInfoOrBuilder> - internalGetStructuredDocumentInfoFieldBuilder() { - if (structuredDocumentInfoBuilder_ == null) { - if (!(contentCase_ == 3)) { - content_ = - com.google.cloud.discoveryengine.v1beta.Answer.Reference.StructuredDocumentInfo - .getDefaultInstance(); - } - structuredDocumentInfoBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.discoveryengine.v1beta.Answer.Reference.StructuredDocumentInfo, - com.google.cloud.discoveryengine.v1beta.Answer.Reference.StructuredDocumentInfo - .Builder, - com.google.cloud.discoveryengine.v1beta.Answer.Reference - .StructuredDocumentInfoOrBuilder>( - (com.google.cloud.discoveryengine.v1beta.Answer.Reference.StructuredDocumentInfo) - content_, - getParentForChildren(), - isClean()); - content_ = null; + public static final class Builder + extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo) + com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.AnswerProto + .internal_static_google_cloud_discoveryengine_v1beta_Answer_Reference_ChunkInfo_descriptor; } - contentCase_ = 3; - onChanged(); - return structuredDocumentInfoBuilder_; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.Answer.Reference) - } - // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.Answer.Reference) - private static final com.google.cloud.discoveryengine.v1beta.Answer.Reference DEFAULT_INSTANCE; + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.AnswerProto + .internal_static_google_cloud_discoveryengine_v1beta_Answer_Reference_ChunkInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo.class, + com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo.Builder.class); + } - static { - DEFAULT_INSTANCE = new com.google.cloud.discoveryengine.v1beta.Answer.Reference(); - } + // Construct using + // com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } - public static com.google.cloud.discoveryengine.v1beta.Answer.Reference getDefaultInstance() { - return DEFAULT_INSTANCE; - } + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Reference parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException() - .setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetDocumentMetadataFieldBuilder(); } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + } - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + chunk_ = ""; + content_ = ""; + relevanceScore_ = 0F; + documentMetadata_ = null; + if (documentMetadataBuilder_ != null) { + documentMetadataBuilder_.dispose(); + documentMetadataBuilder_ = null; + } + blobAttachmentIndexes_ = emptyLongList(); + return this; + } - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.Answer.Reference getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - } + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1beta.AnswerProto + .internal_static_google_cloud_discoveryengine_v1beta_Answer_Reference_ChunkInfo_descriptor; + } - public interface StepOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.Answer.Step) - com.google.protobuf.MessageOrBuilder { + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo + .getDefaultInstance(); + } - /** - * - * - *
            -     * The state of the step.
            -     * 
            - * - * .google.cloud.discoveryengine.v1beta.Answer.Step.State state = 1; - * - * @return The enum numeric value on the wire for state. - */ - int getStateValue(); + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo build() { + com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } - /** - * - * - *
            -     * The state of the step.
            -     * 
            - * - * .google.cloud.discoveryengine.v1beta.Answer.Step.State state = 1; - * - * @return The state. - */ - com.google.cloud.discoveryengine.v1beta.Answer.Step.State getState(); + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo buildPartial() { + com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo result = + new com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } - /** - * - * - *
            -     * The description of the step.
            -     * 
            - * - * string description = 2; - * - * @return The description. - */ - java.lang.String getDescription(); + private void buildPartial0( + com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.chunk_ = chunk_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.content_ = content_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.relevanceScore_ = relevanceScore_; + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.documentMetadata_ = + documentMetadataBuilder_ == null + ? documentMetadata_ + : documentMetadataBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + blobAttachmentIndexes_.makeImmutable(); + result.blobAttachmentIndexes_ = blobAttachmentIndexes_; + } + result.bitField0_ |= to_bitField0_; + } - /** - * - * - *
            -     * The description of the step.
            -     * 
            - * - * string description = 2; - * - * @return The bytes for description. - */ - com.google.protobuf.ByteString getDescriptionBytes(); + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo) { + return mergeFrom( + (com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo) other); + } else { + super.mergeFrom(other); + return this; + } + } - /** - * - * - *
            -     * The thought of the step.
            -     * 
            - * - * string thought = 3; - * - * @return The thought. - */ - java.lang.String getThought(); + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo other) { + if (other + == com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo + .getDefaultInstance()) return this; + if (!other.getChunk().isEmpty()) { + chunk_ = other.chunk_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getContent().isEmpty()) { + content_ = other.content_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasRelevanceScore()) { + setRelevanceScore(other.getRelevanceScore()); + } + if (other.hasDocumentMetadata()) { + mergeDocumentMetadata(other.getDocumentMetadata()); + } + if (!other.blobAttachmentIndexes_.isEmpty()) { + if (blobAttachmentIndexes_.isEmpty()) { + blobAttachmentIndexes_ = other.blobAttachmentIndexes_; + blobAttachmentIndexes_.makeImmutable(); + bitField0_ |= 0x00000010; + } else { + ensureBlobAttachmentIndexesIsMutable(); + blobAttachmentIndexes_.addAll(other.blobAttachmentIndexes_); + } + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } - /** - * - * - *
            -     * The thought of the step.
            -     * 
            - * - * string thought = 3; - * - * @return The bytes for thought. - */ - com.google.protobuf.ByteString getThoughtBytes(); + @java.lang.Override + public final boolean isInitialized() { + return true; + } - /** - * - * - *
            -     * Actions.
            -     * 
            - * - * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action actions = 4; - */ - java.util.List getActionsList(); + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + chunk_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + content_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 29: + { + relevanceScore_ = input.readFloat(); + bitField0_ |= 0x00000004; + break; + } // case 29 + case 34: + { + input.readMessage( + internalGetDocumentMetadataFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 40: + { + long v = input.readInt64(); + ensureBlobAttachmentIndexesIsMutable(); + blobAttachmentIndexes_.addLong(v); + break; + } // case 40 + case 42: + { + int length = input.readRawVarint32(); + int limit = input.pushLimit(length); + ensureBlobAttachmentIndexesIsMutable(); + while (input.getBytesUntilLimit() > 0) { + blobAttachmentIndexes_.addLong(input.readInt64()); + } + input.popLimit(limit); + break; + } // case 42 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } - /** - * - * - *
            -     * Actions.
            -     * 
            - * - * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action actions = 4; - */ - com.google.cloud.discoveryengine.v1beta.Answer.Step.Action getActions(int index); + private int bitField0_; - /** - * - * - *
            -     * Actions.
            -     * 
            - * - * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action actions = 4; - */ - int getActionsCount(); + private java.lang.Object chunk_ = ""; - /** - * - * - *
            -     * Actions.
            -     * 
            - * - * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action actions = 4; - */ - java.util.List - getActionsOrBuilderList(); + /** + * + * + *
            +         * Chunk resource name.
            +         * 
            + * + * string chunk = 1 [(.google.api.resource_reference) = { ... } + * + * @return The chunk. + */ + public java.lang.String getChunk() { + java.lang.Object ref = chunk_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + chunk_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } - /** - * - * - *
            -     * Actions.
            -     * 
            - * - * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action actions = 4; - */ - com.google.cloud.discoveryengine.v1beta.Answer.Step.ActionOrBuilder getActionsOrBuilder( - int index); - } + /** + * + * + *
            +         * Chunk resource name.
            +         * 
            + * + * string chunk = 1 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for chunk. + */ + public com.google.protobuf.ByteString getChunkBytes() { + java.lang.Object ref = chunk_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + chunk_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } - /** - * - * - *
            -   * Step information.
            -   * 
            - * - * Protobuf type {@code google.cloud.discoveryengine.v1beta.Answer.Step} - */ - public static final class Step extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.Answer.Step) - StepOrBuilder { - private static final long serialVersionUID = 0L; + /** + * + * + *
            +         * Chunk resource name.
            +         * 
            + * + * string chunk = 1 [(.google.api.resource_reference) = { ... } + * + * @param value The chunk to set. + * @return This builder for chaining. + */ + public Builder setChunk(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + chunk_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "Step"); - } + /** + * + * + *
            +         * Chunk resource name.
            +         * 
            + * + * string chunk = 1 [(.google.api.resource_reference) = { ... } + * + * @return This builder for chaining. + */ + public Builder clearChunk() { + chunk_ = getDefaultInstance().getChunk(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } - // Use Step.newBuilder() to construct. - private Step(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } + /** + * + * + *
            +         * Chunk resource name.
            +         * 
            + * + * string chunk = 1 [(.google.api.resource_reference) = { ... } + * + * @param value The bytes for chunk to set. + * @return This builder for chaining. + */ + public Builder setChunkBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + chunk_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } - private Step() { - state_ = 0; - description_ = ""; - thought_ = ""; - actions_ = java.util.Collections.emptyList(); - } + private java.lang.Object content_ = ""; - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.discoveryengine.v1beta.AnswerProto - .internal_static_google_cloud_discoveryengine_v1beta_Answer_Step_descriptor; - } + /** + * + * + *
            +         * Chunk textual content.
            +         * 
            + * + * string content = 2; + * + * @return The content. + */ + public java.lang.String getContent() { + java.lang.Object ref = content_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + content_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.discoveryengine.v1beta.AnswerProto - .internal_static_google_cloud_discoveryengine_v1beta_Answer_Step_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.discoveryengine.v1beta.Answer.Step.class, - com.google.cloud.discoveryengine.v1beta.Answer.Step.Builder.class); - } + /** + * + * + *
            +         * Chunk textual content.
            +         * 
            + * + * string content = 2; + * + * @return The bytes for content. + */ + public com.google.protobuf.ByteString getContentBytes() { + java.lang.Object ref = content_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + content_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } - /** - * - * - *
            -     * Enumeration of the state of the step.
            -     * 
            - * - * Protobuf enum {@code google.cloud.discoveryengine.v1beta.Answer.Step.State} - */ - public enum State implements com.google.protobuf.ProtocolMessageEnum { - /** - * - * - *
            -       * Unknown.
            -       * 
            - * - * STATE_UNSPECIFIED = 0; - */ - STATE_UNSPECIFIED(0), - /** - * - * - *
            -       * Step is currently in progress.
            -       * 
            - * - * IN_PROGRESS = 1; - */ - IN_PROGRESS(1), - /** - * - * - *
            -       * Step currently failed.
            -       * 
            - * - * FAILED = 2; - */ - FAILED(2), - /** - * - * - *
            -       * Step has succeeded.
            -       * 
            - * - * SUCCEEDED = 3; - */ - SUCCEEDED(3), - UNRECOGNIZED(-1), - ; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "State"); - } - - /** - * - * - *
            -       * Unknown.
            -       * 
            - * - * STATE_UNSPECIFIED = 0; - */ - public static final int STATE_UNSPECIFIED_VALUE = 0; - - /** - * - * - *
            -       * Step is currently in progress.
            -       * 
            - * - * IN_PROGRESS = 1; - */ - public static final int IN_PROGRESS_VALUE = 1; - - /** - * - * - *
            -       * Step currently failed.
            -       * 
            - * - * FAILED = 2; - */ - public static final int FAILED_VALUE = 2; - - /** - * - * - *
            -       * Step has succeeded.
            -       * 
            - * - * SUCCEEDED = 3; - */ - public static final int SUCCEEDED_VALUE = 3; - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); + /** + * + * + *
            +         * Chunk textual content.
            +         * 
            + * + * string content = 2; + * + * @param value The content to set. + * @return This builder for chaining. + */ + public Builder setContent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + content_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; } - 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 State 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 State forNumber(int value) { - switch (value) { - case 0: - return STATE_UNSPECIFIED; - case 1: - return IN_PROGRESS; - case 2: - return FAILED; - case 3: - return SUCCEEDED; - default: - return null; + /** + * + * + *
            +         * Chunk textual content.
            +         * 
            + * + * string content = 2; + * + * @return This builder for chaining. + */ + public Builder clearContent() { + content_ = getDefaultInstance().getContent(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; } - } - - public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { - return internalValueMap; - } - - private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public State findValueByNumber(int number) { - return State.forNumber(number); - } - }; - public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); + /** + * + * + *
            +         * Chunk textual content.
            +         * 
            + * + * string content = 2; + * + * @param value The bytes for content to set. + * @return This builder for chaining. + */ + public Builder setContentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + content_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; } - return getDescriptor().getValues().get(ordinal()); - } - - public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { - return getDescriptor(); - } - - public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { - return com.google.cloud.discoveryengine.v1beta.Answer.Step.getDescriptor() - .getEnumTypes() - .get(0); - } - private static final State[] VALUES = values(); + private float relevanceScore_; - public static State valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + /** + * + * + *
            +         * The relevance of the chunk for a given query. Values range from 0.0
            +         * (completely irrelevant) to 1.0 (completely relevant).
            +         * This value is for informational purpose only. It may change for
            +         * the same query and chunk at any time due to a model retraining or
            +         * change in implementation.
            +         * 
            + * + * optional float relevance_score = 3; + * + * @return Whether the relevanceScore field is set. + */ + @java.lang.Override + public boolean hasRelevanceScore() { + return ((bitField0_ & 0x00000004) != 0); } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; + + /** + * + * + *
            +         * The relevance of the chunk for a given query. Values range from 0.0
            +         * (completely irrelevant) to 1.0 (completely relevant).
            +         * This value is for informational purpose only. It may change for
            +         * the same query and chunk at any time due to a model retraining or
            +         * change in implementation.
            +         * 
            + * + * optional float relevance_score = 3; + * + * @return The relevanceScore. + */ + @java.lang.Override + public float getRelevanceScore() { + return relevanceScore_; } - return VALUES[desc.getIndex()]; - } - private final int value; + /** + * + * + *
            +         * The relevance of the chunk for a given query. Values range from 0.0
            +         * (completely irrelevant) to 1.0 (completely relevant).
            +         * This value is for informational purpose only. It may change for
            +         * the same query and chunk at any time due to a model retraining or
            +         * change in implementation.
            +         * 
            + * + * optional float relevance_score = 3; + * + * @param value The relevanceScore to set. + * @return This builder for chaining. + */ + public Builder setRelevanceScore(float value) { - private State(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.cloud.discoveryengine.v1beta.Answer.Step.State) - } - - public interface ActionOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.Answer.Step.Action) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
            -       * Search action.
            -       * 
            - * - * - * .google.cloud.discoveryengine.v1beta.Answer.Step.Action.SearchAction search_action = 2; - * - * - * @return Whether the searchAction field is set. - */ - boolean hasSearchAction(); - - /** - * - * - *
            -       * Search action.
            -       * 
            - * - * - * .google.cloud.discoveryengine.v1beta.Answer.Step.Action.SearchAction search_action = 2; - * - * - * @return The searchAction. - */ - com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.SearchAction getSearchAction(); - - /** - * - * - *
            -       * Search action.
            -       * 
            - * - * - * .google.cloud.discoveryengine.v1beta.Answer.Step.Action.SearchAction search_action = 2; - * - */ - com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.SearchActionOrBuilder - getSearchActionOrBuilder(); - - /** - * - * - *
            -       * Observation.
            -       * 
            - * - * .google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation observation = 3; - * - * - * @return Whether the observation field is set. - */ - boolean hasObservation(); - - /** - * - * - *
            -       * Observation.
            -       * 
            - * - * .google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation observation = 3; - * - * - * @return The observation. - */ - com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation getObservation(); - - /** - * - * - *
            -       * Observation.
            -       * 
            - * - * .google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation observation = 3; - * - */ - com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.ObservationOrBuilder - getObservationOrBuilder(); - - com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.ActionCase getActionCase(); - } - - /** - * - * - *
            -     * Action.
            -     * 
            - * - * Protobuf type {@code google.cloud.discoveryengine.v1beta.Answer.Step.Action} - */ - public static final class Action extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.Answer.Step.Action) - ActionOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "Action"); - } - - // Use Action.newBuilder() to construct. - private Action(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private Action() {} - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.discoveryengine.v1beta.AnswerProto - .internal_static_google_cloud_discoveryengine_v1beta_Answer_Step_Action_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.discoveryengine.v1beta.AnswerProto - .internal_static_google_cloud_discoveryengine_v1beta_Answer_Step_Action_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.class, - com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Builder.class); - } - - public interface SearchActionOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.Answer.Step.Action.SearchAction) - com.google.protobuf.MessageOrBuilder { + relevanceScore_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } /** * * *
            -         * The query to search.
            +         * The relevance of the chunk for a given query. Values range from 0.0
            +         * (completely irrelevant) to 1.0 (completely relevant).
            +         * This value is for informational purpose only. It may change for
            +         * the same query and chunk at any time due to a model retraining or
            +         * change in implementation.
                      * 
            * - * string query = 1; + * optional float relevance_score = 3; * - * @return The query. + * @return This builder for chaining. */ - java.lang.String getQuery(); + public Builder clearRelevanceScore() { + bitField0_ = (bitField0_ & ~0x00000004); + relevanceScore_ = 0F; + onChanged(); + return this; + } + + private com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo.DocumentMetadata + documentMetadata_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo.DocumentMetadata, + com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo.DocumentMetadata + .Builder, + com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo + .DocumentMetadataOrBuilder> + documentMetadataBuilder_; /** * * *
            -         * The query to search.
            +         * Document metadata.
                      * 
            * - * string query = 1; + * + * .google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo.DocumentMetadata document_metadata = 4; + * * - * @return The bytes for query. + * @return Whether the documentMetadata field is set. */ - com.google.protobuf.ByteString getQueryBytes(); - } - - /** - * - * - *
            -       * Search action.
            -       * 
            - * - * Protobuf type {@code google.cloud.discoveryengine.v1beta.Answer.Step.Action.SearchAction} - */ - public static final class SearchAction extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.Answer.Step.Action.SearchAction) - SearchActionOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "SearchAction"); - } - - // Use SearchAction.newBuilder() to construct. - private SearchAction(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private SearchAction() { - query_ = ""; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.discoveryengine.v1beta.AnswerProto - .internal_static_google_cloud_discoveryengine_v1beta_Answer_Step_Action_SearchAction_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.discoveryengine.v1beta.AnswerProto - .internal_static_google_cloud_discoveryengine_v1beta_Answer_Step_Action_SearchAction_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.SearchAction.class, - com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.SearchAction.Builder - .class); + public boolean hasDocumentMetadata() { + return ((bitField0_ & 0x00000008) != 0); } - public static final int QUERY_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object query_ = ""; - /** * * *
            -         * The query to search.
            +         * Document metadata.
                      * 
            * - * string query = 1; + * + * .google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo.DocumentMetadata document_metadata = 4; + * * - * @return The query. + * @return The documentMetadata. */ - @java.lang.Override - public java.lang.String getQuery() { - java.lang.Object ref = query_; - 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(); - query_ = s; - return s; + public com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo.DocumentMetadata + getDocumentMetadata() { + if (documentMetadataBuilder_ == null) { + return documentMetadata_ == null + ? com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo + .DocumentMetadata.getDefaultInstance() + : documentMetadata_; + } else { + return documentMetadataBuilder_.getMessage(); } } @@ -12127,6691 +11032,5596 @@ public java.lang.String getQuery() { * * *
            -         * The query to search.
            +         * Document metadata.
                      * 
            * - * string query = 1; - * - * @return The bytes for query. + * + * .google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo.DocumentMetadata document_metadata = 4; + * */ - @java.lang.Override - public com.google.protobuf.ByteString getQueryBytes() { - java.lang.Object ref = query_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - query_ = b; - return b; + public Builder setDocumentMetadata( + com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo.DocumentMetadata + value) { + if (documentMetadataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + documentMetadata_ = value; } else { - return (com.google.protobuf.ByteString) ref; + documentMetadataBuilder_.setMessage(value); } + bitField0_ |= 0x00000008; + onChanged(); + return this; } - 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(query_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, query_); + /** + * + * + *
            +         * Document metadata.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo.DocumentMetadata document_metadata = 4; + * + */ + public Builder setDocumentMetadata( + com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo.DocumentMetadata + .Builder + builderForValue) { + if (documentMetadataBuilder_ == null) { + documentMetadata_ = builderForValue.build(); + } else { + documentMetadataBuilder_.setMessage(builderForValue.build()); } - getUnknownFields().writeTo(output); + bitField0_ |= 0x00000008; + onChanged(); + return this; } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(query_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, query_); + /** + * + * + *
            +         * Document metadata.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo.DocumentMetadata document_metadata = 4; + * + */ + public Builder mergeDocumentMetadata( + com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo.DocumentMetadata + value) { + if (documentMetadataBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) + && documentMetadata_ != null + && documentMetadata_ + != com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo + .DocumentMetadata.getDefaultInstance()) { + getDocumentMetadataBuilder().mergeFrom(value); + } else { + documentMetadata_ = value; + } + } else { + documentMetadataBuilder_.mergeFrom(value); } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; + if (documentMetadata_ != null) { + bitField0_ |= 0x00000008; + onChanged(); + } + return this; } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj - instanceof com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.SearchAction)) { - return super.equals(obj); + /** + * + * + *
            +         * Document metadata.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo.DocumentMetadata document_metadata = 4; + * + */ + public Builder clearDocumentMetadata() { + bitField0_ = (bitField0_ & ~0x00000008); + documentMetadata_ = null; + if (documentMetadataBuilder_ != null) { + documentMetadataBuilder_.dispose(); + documentMetadataBuilder_ = null; } - com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.SearchAction other = - (com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.SearchAction) obj; + onChanged(); + return this; + } - if (!getQuery().equals(other.getQuery())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; + /** + * + * + *
            +         * Document metadata.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo.DocumentMetadata document_metadata = 4; + * + */ + public com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo.DocumentMetadata + .Builder + getDocumentMetadataBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return internalGetDocumentMetadataFieldBuilder().getBuilder(); } - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; + /** + * + * + *
            +         * Document metadata.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo.DocumentMetadata document_metadata = 4; + * + */ + public com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo + .DocumentMetadataOrBuilder + getDocumentMetadataOrBuilder() { + if (documentMetadataBuilder_ != null) { + return documentMetadataBuilder_.getMessageOrBuilder(); + } else { + return documentMetadata_ == null + ? com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo + .DocumentMetadata.getDefaultInstance() + : documentMetadata_; } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + QUERY_FIELD_NUMBER; - hash = (53 * hash) + getQuery().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; } - public static com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.SearchAction - parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); + /** + * + * + *
            +         * Document metadata.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo.DocumentMetadata document_metadata = 4; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo.DocumentMetadata, + com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo.DocumentMetadata + .Builder, + com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo + .DocumentMetadataOrBuilder> + internalGetDocumentMetadataFieldBuilder() { + if (documentMetadataBuilder_ == null) { + documentMetadataBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo + .DocumentMetadata, + com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo + .DocumentMetadata.Builder, + com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo + .DocumentMetadataOrBuilder>( + getDocumentMetadata(), getParentForChildren(), isClean()); + documentMetadata_ = null; + } + return documentMetadataBuilder_; } - public static com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.SearchAction - parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } + private com.google.protobuf.Internal.LongList blobAttachmentIndexes_ = emptyLongList(); - public static com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.SearchAction - parseFrom(com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); + private void ensureBlobAttachmentIndexesIsMutable() { + if (!blobAttachmentIndexes_.isModifiable()) { + blobAttachmentIndexes_ = makeMutableCopy(blobAttachmentIndexes_); + } + bitField0_ |= 0x00000010; } - public static com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.SearchAction - 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.discoveryengine.v1beta.Answer.Step.Action.SearchAction - parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.SearchAction - parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.SearchAction - parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.SearchAction - 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.discoveryengine.v1beta.Answer.Step.Action.SearchAction - parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.SearchAction - parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); + /** + * + * + *
            +         * Output only. Stores indexes of blobattachments linked to this chunk.
            +         * 
            + * + * + * repeated int64 blob_attachment_indexes = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return A list containing the blobAttachmentIndexes. + */ + public java.util.List getBlobAttachmentIndexesList() { + blobAttachmentIndexes_.makeImmutable(); + return blobAttachmentIndexes_; } - public static com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.SearchAction - parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + /** + * + * + *
            +         * Output only. Stores indexes of blobattachments linked to this chunk.
            +         * 
            + * + * + * repeated int64 blob_attachment_indexes = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The count of blobAttachmentIndexes. + */ + public int getBlobAttachmentIndexesCount() { + return blobAttachmentIndexes_.size(); } - public static com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.SearchAction - parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); + /** + * + * + *
            +         * Output only. Stores indexes of blobattachments linked to this chunk.
            +         * 
            + * + * + * repeated int64 blob_attachment_indexes = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index of the element to return. + * @return The blobAttachmentIndexes at the given index. + */ + public long getBlobAttachmentIndexes(int index) { + return blobAttachmentIndexes_.getLong(index); } - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } + /** + * + * + *
            +         * Output only. Stores indexes of blobattachments linked to this chunk.
            +         * 
            + * + * + * repeated int64 blob_attachment_indexes = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index to set the value at. + * @param value The blobAttachmentIndexes to set. + * @return This builder for chaining. + */ + public Builder setBlobAttachmentIndexes(int index, long value) { - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); + ensureBlobAttachmentIndexesIsMutable(); + blobAttachmentIndexes_.setLong(index, value); + bitField0_ |= 0x00000010; + onChanged(); + return this; } - public static Builder newBuilder( - com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.SearchAction prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } + /** + * + * + *
            +         * Output only. Stores indexes of blobattachments linked to this chunk.
            +         * 
            + * + * + * repeated int64 blob_attachment_indexes = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The blobAttachmentIndexes to add. + * @return This builder for chaining. + */ + public Builder addBlobAttachmentIndexes(long value) { - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + ensureBlobAttachmentIndexesIsMutable(); + blobAttachmentIndexes_.addLong(value); + bitField0_ |= 0x00000010; + onChanged(); + return this; } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; + /** + * + * + *
            +         * Output only. Stores indexes of blobattachments linked to this chunk.
            +         * 
            + * + * + * repeated int64 blob_attachment_indexes = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param values The blobAttachmentIndexes to add. + * @return This builder for chaining. + */ + public Builder addAllBlobAttachmentIndexes( + java.lang.Iterable values) { + ensureBlobAttachmentIndexesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, blobAttachmentIndexes_); + bitField0_ |= 0x00000010; + onChanged(); + return this; } /** * * *
            -         * Search action.
            +         * Output only. Stores indexes of blobattachments linked to this chunk.
                      * 
            * - * Protobuf type {@code google.cloud.discoveryengine.v1beta.Answer.Step.Action.SearchAction} + * + * repeated int64 blob_attachment_indexes = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. */ - public static final class Builder - extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.Answer.Step.Action.SearchAction) - com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.SearchActionOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.discoveryengine.v1beta.AnswerProto - .internal_static_google_cloud_discoveryengine_v1beta_Answer_Step_Action_SearchAction_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.discoveryengine.v1beta.AnswerProto - .internal_static_google_cloud_discoveryengine_v1beta_Answer_Step_Action_SearchAction_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.SearchAction.class, - com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.SearchAction.Builder - .class); - } - - // Construct using - // com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.SearchAction.newBuilder() - private Builder() {} + public Builder clearBlobAttachmentIndexes() { + blobAttachmentIndexes_ = emptyLongList(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - } + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo) + } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - query_ = ""; - return this; - } + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo) + private static final com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo + DEFAULT_INSTANCE; - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.discoveryengine.v1beta.AnswerProto - .internal_static_google_cloud_discoveryengine_v1beta_Answer_Step_Action_SearchAction_descriptor; - } + static { + DEFAULT_INSTANCE = new com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo(); + } - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.SearchAction - getDefaultInstanceForType() { - return com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.SearchAction - .getDefaultInstance(); - } + public static com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo + getDefaultInstance() { + return DEFAULT_INSTANCE; + } - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.SearchAction build() { - com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.SearchAction result = - buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ChunkInfo parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } - return result; - } + }; - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.SearchAction - buildPartial() { - com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.SearchAction result = - new com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.SearchAction(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } + public static com.google.protobuf.Parser parser() { + return PARSER; + } - private void buildPartial0( - com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.SearchAction result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.query_ = query_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other - instanceof - com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.SearchAction) { - return mergeFrom( - (com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.SearchAction) other); - } else { - super.mergeFrom(other); - return this; - } - } + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } - public Builder mergeFrom( - com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.SearchAction other) { - if (other - == com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.SearchAction - .getDefaultInstance()) return this; - if (!other.getQuery().isEmpty()) { - query_ = other.query_; - bitField0_ |= 0x00000001; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } - @java.lang.Override - public final boolean isInitialized() { - return true; - } + public interface StructuredDocumentInfoOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.Answer.Reference.StructuredDocumentInfo) + com.google.protobuf.MessageOrBuilder { - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - query_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } + /** + * + * + *
            +       * Document resource name.
            +       * 
            + * + * string document = 1 [(.google.api.resource_reference) = { ... } + * + * @return The document. + */ + java.lang.String getDocument(); - private int bitField0_; + /** + * + * + *
            +       * Document resource name.
            +       * 
            + * + * string document = 1 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for document. + */ + com.google.protobuf.ByteString getDocumentBytes(); - private java.lang.Object query_ = ""; + /** + * + * + *
            +       * Structured search data.
            +       * 
            + * + * .google.protobuf.Struct struct_data = 2; + * + * @return Whether the structData field is set. + */ + boolean hasStructData(); - /** - * - * - *
            -           * The query to search.
            -           * 
            - * - * string query = 1; - * - * @return The query. - */ - public java.lang.String getQuery() { - java.lang.Object ref = query_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - query_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } + /** + * + * + *
            +       * Structured search data.
            +       * 
            + * + * .google.protobuf.Struct struct_data = 2; + * + * @return The structData. + */ + com.google.protobuf.Struct getStructData(); - /** - * - * - *
            -           * The query to search.
            -           * 
            - * - * string query = 1; - * - * @return The bytes for query. - */ - public com.google.protobuf.ByteString getQueryBytes() { - java.lang.Object ref = query_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - query_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } + /** + * + * + *
            +       * Structured search data.
            +       * 
            + * + * .google.protobuf.Struct struct_data = 2; + */ + com.google.protobuf.StructOrBuilder getStructDataOrBuilder(); - /** - * - * - *
            -           * The query to search.
            -           * 
            - * - * string query = 1; - * - * @param value The query to set. - * @return This builder for chaining. - */ - public Builder setQuery(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - query_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } + /** + * + * + *
            +       * Output only. The title of the document.
            +       * 
            + * + * string title = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The title. + */ + java.lang.String getTitle(); - /** - * - * - *
            -           * The query to search.
            -           * 
            - * - * string query = 1; - * - * @return This builder for chaining. - */ - public Builder clearQuery() { - query_ = getDefaultInstance().getQuery(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } + /** + * + * + *
            +       * Output only. The title of the document.
            +       * 
            + * + * string title = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for title. + */ + com.google.protobuf.ByteString getTitleBytes(); - /** - * - * - *
            -           * The query to search.
            -           * 
            - * - * string query = 1; - * - * @param value The bytes for query to set. - * @return This builder for chaining. - */ - public Builder setQueryBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - query_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.Answer.Step.Action.SearchAction) - } - - // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.Answer.Step.Action.SearchAction) - private static final com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.SearchAction - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = - new com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.SearchAction(); - } - - public static com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.SearchAction - getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public SearchAction parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException() - .setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; + /** + * + * + *
            +       * Output only. The URI of the document.
            +       * 
            + * + * string uri = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The uri. + */ + java.lang.String getUri(); - public static com.google.protobuf.Parser parser() { - return PARSER; - } + /** + * + * + *
            +       * Output only. The URI of the document.
            +       * 
            + * + * string uri = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for uri. + */ + com.google.protobuf.ByteString getUriBytes(); + } - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + /** + * + * + *
            +     * Structured search information.
            +     * 
            + * + * Protobuf type {@code + * google.cloud.discoveryengine.v1beta.Answer.Reference.StructuredDocumentInfo} + */ + public static final class StructuredDocumentInfo extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.Answer.Reference.StructuredDocumentInfo) + StructuredDocumentInfoOrBuilder { + private static final long serialVersionUID = 0L; - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.SearchAction - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "StructuredDocumentInfo"); } - public interface ObservationOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation) - com.google.protobuf.MessageOrBuilder { + // Use StructuredDocumentInfo.newBuilder() to construct. + private StructuredDocumentInfo(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } - /** - * - * - *
            -         * Search results observed by the search action, it can be snippets info
            -         * or chunk info, depending on the citation type set by the user.
            -         * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult search_results = 2; - * - */ - java.util.List< - com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult> - getSearchResultsList(); + private StructuredDocumentInfo() { + document_ = ""; + title_ = ""; + uri_ = ""; + } - /** - * - * - *
            -         * Search results observed by the search action, it can be snippets info
            -         * or chunk info, depending on the citation type set by the user.
            -         * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult search_results = 2; - * - */ - com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult - getSearchResults(int index); + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.AnswerProto + .internal_static_google_cloud_discoveryengine_v1beta_Answer_Reference_StructuredDocumentInfo_descriptor; + } - /** - * - * - *
            -         * Search results observed by the search action, it can be snippets info
            -         * or chunk info, depending on the citation type set by the user.
            -         * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult search_results = 2; - * - */ - int getSearchResultsCount(); + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.AnswerProto + .internal_static_google_cloud_discoveryengine_v1beta_Answer_Reference_StructuredDocumentInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.Answer.Reference.StructuredDocumentInfo + .class, + com.google.cloud.discoveryengine.v1beta.Answer.Reference.StructuredDocumentInfo + .Builder.class); + } - /** - * - * - *
            -         * Search results observed by the search action, it can be snippets info
            -         * or chunk info, depending on the citation type set by the user.
            -         * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult search_results = 2; - * - */ - java.util.List< - ? extends - com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation - .SearchResultOrBuilder> - getSearchResultsOrBuilderList(); + private int bitField0_; + public static final int DOCUMENT_FIELD_NUMBER = 1; - /** - * - * - *
            -         * Search results observed by the search action, it can be snippets info
            -         * or chunk info, depending on the citation type set by the user.
            -         * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult search_results = 2; - * - */ - com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResultOrBuilder - getSearchResultsOrBuilder(int index); - } + @SuppressWarnings("serial") + private volatile java.lang.Object document_ = ""; /** * * *
            -       * Observation.
            +       * Document resource name.
                    * 
            * - * Protobuf type {@code google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation} + * string document = 1 [(.google.api.resource_reference) = { ... } + * + * @return The document. */ - public static final class Observation extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation) - ObservationOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "Observation"); - } - - // Use Observation.newBuilder() to construct. - private Observation(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private Observation() { - searchResults_ = java.util.Collections.emptyList(); + @java.lang.Override + public java.lang.String getDocument() { + java.lang.Object ref = document_; + 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(); + document_ = s; + return s; } + } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.discoveryengine.v1beta.AnswerProto - .internal_static_google_cloud_discoveryengine_v1beta_Answer_Step_Action_Observation_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.discoveryengine.v1beta.AnswerProto - .internal_static_google_cloud_discoveryengine_v1beta_Answer_Step_Action_Observation_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.class, - com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.Builder - .class); + /** + * + * + *
            +       * Document resource name.
            +       * 
            + * + * string document = 1 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for document. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDocumentBytes() { + java.lang.Object ref = document_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + document_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; } + } - public interface SearchResultOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult) - com.google.protobuf.MessageOrBuilder { + public static final int STRUCT_DATA_FIELD_NUMBER = 2; + private com.google.protobuf.Struct structData_; - /** - * - * - *
            -           * Document resource name.
            -           * 
            - * - * string document = 1; - * - * @return The document. - */ - java.lang.String getDocument(); + /** + * + * + *
            +       * Structured search data.
            +       * 
            + * + * .google.protobuf.Struct struct_data = 2; + * + * @return Whether the structData field is set. + */ + @java.lang.Override + public boolean hasStructData() { + return ((bitField0_ & 0x00000001) != 0); + } - /** - * - * - *
            -           * Document resource name.
            -           * 
            - * - * string document = 1; - * - * @return The bytes for document. - */ - com.google.protobuf.ByteString getDocumentBytes(); + /** + * + * + *
            +       * Structured search data.
            +       * 
            + * + * .google.protobuf.Struct struct_data = 2; + * + * @return The structData. + */ + @java.lang.Override + public com.google.protobuf.Struct getStructData() { + return structData_ == null ? com.google.protobuf.Struct.getDefaultInstance() : structData_; + } - /** - * - * - *
            -           * URI for the document.
            -           * 
            - * - * string uri = 2; - * - * @return The uri. - */ - java.lang.String getUri(); + /** + * + * + *
            +       * Structured search data.
            +       * 
            + * + * .google.protobuf.Struct struct_data = 2; + */ + @java.lang.Override + public com.google.protobuf.StructOrBuilder getStructDataOrBuilder() { + return structData_ == null ? com.google.protobuf.Struct.getDefaultInstance() : structData_; + } - /** - * - * - *
            -           * URI for the document.
            -           * 
            - * - * string uri = 2; - * - * @return The bytes for uri. - */ - com.google.protobuf.ByteString getUriBytes(); + public static final int TITLE_FIELD_NUMBER = 3; - /** - * - * - *
            -           * Title.
            -           * 
            - * - * string title = 3; - * - * @return The title. - */ - java.lang.String getTitle(); + @SuppressWarnings("serial") + private volatile java.lang.Object title_ = ""; - /** - * - * - *
            -           * Title.
            -           * 
            - * - * string title = 3; - * - * @return The bytes for title. - */ - com.google.protobuf.ByteString getTitleBytes(); + /** + * + * + *
            +       * Output only. The title of the document.
            +       * 
            + * + * string title = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The title. + */ + @java.lang.Override + public java.lang.String getTitle() { + java.lang.Object ref = title_; + 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(); + title_ = s; + return s; + } + } - /** - * - * - *
            -           * If citation_type is DOCUMENT_LEVEL_CITATION, populate document
            -           * level snippets.
            -           * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult.SnippetInfo snippet_info = 4; - * - */ - java.util.List< - com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation - .SearchResult.SnippetInfo> - getSnippetInfoList(); + /** + * + * + *
            +       * Output only. The title of the document.
            +       * 
            + * + * string title = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for title. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTitleBytes() { + java.lang.Object ref = title_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + title_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } - /** - * - * - *
            -           * If citation_type is DOCUMENT_LEVEL_CITATION, populate document
            -           * level snippets.
            -           * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult.SnippetInfo snippet_info = 4; - * - */ - com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult - .SnippetInfo - getSnippetInfo(int index); + public static final int URI_FIELD_NUMBER = 4; - /** - * - * - *
            -           * If citation_type is DOCUMENT_LEVEL_CITATION, populate document
            -           * level snippets.
            -           * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult.SnippetInfo snippet_info = 4; - * - */ - int getSnippetInfoCount(); + @SuppressWarnings("serial") + private volatile java.lang.Object uri_ = ""; - /** - * - * - *
            -           * If citation_type is DOCUMENT_LEVEL_CITATION, populate document
            -           * level snippets.
            -           * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult.SnippetInfo snippet_info = 4; - * - */ - java.util.List< - ? extends - com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation - .SearchResult.SnippetInfoOrBuilder> - getSnippetInfoOrBuilderList(); + /** + * + * + *
            +       * Output only. The URI of the document.
            +       * 
            + * + * string uri = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The uri. + */ + @java.lang.Override + public java.lang.String getUri() { + java.lang.Object ref = uri_; + 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(); + uri_ = s; + return s; + } + } - /** - * - * - *
            -           * If citation_type is DOCUMENT_LEVEL_CITATION, populate document
            -           * level snippets.
            -           * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult.SnippetInfo snippet_info = 4; - * - */ - com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult - .SnippetInfoOrBuilder - getSnippetInfoOrBuilder(int index); + /** + * + * + *
            +       * Output only. The URI of the document.
            +       * 
            + * + * string uri = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for uri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getUriBytes() { + java.lang.Object ref = uri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } - /** - * - * - *
            -           * If citation_type is CHUNK_LEVEL_CITATION and chunk mode is on,
            -           * populate chunk info.
            -           * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult.ChunkInfo chunk_info = 5; - * - */ - java.util.List< - com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation - .SearchResult.ChunkInfo> - getChunkInfoList(); + private byte memoizedIsInitialized = -1; - /** - * - * - *
            -           * If citation_type is CHUNK_LEVEL_CITATION and chunk mode is on,
            -           * populate chunk info.
            -           * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult.ChunkInfo chunk_info = 5; - * - */ - com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult - .ChunkInfo - getChunkInfo(int index); + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; - /** - * - * - *
            -           * If citation_type is CHUNK_LEVEL_CITATION and chunk mode is on,
            -           * populate chunk info.
            -           * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult.ChunkInfo chunk_info = 5; - * - */ - int getChunkInfoCount(); + memoizedIsInitialized = 1; + return true; + } - /** - * - * - *
            -           * If citation_type is CHUNK_LEVEL_CITATION and chunk mode is on,
            -           * populate chunk info.
            -           * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult.ChunkInfo chunk_info = 5; - * - */ - java.util.List< - ? extends - com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation - .SearchResult.ChunkInfoOrBuilder> - getChunkInfoOrBuilderList(); + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(document_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, document_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getStructData()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(title_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, title_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(uri_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, uri_); + } + getUnknownFields().writeTo(output); + } - /** - * - * - *
            -           * If citation_type is CHUNK_LEVEL_CITATION and chunk mode is on,
            -           * populate chunk info.
            -           * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult.ChunkInfo chunk_info = 5; - * - */ - com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult - .ChunkInfoOrBuilder - getChunkInfoOrBuilder(int index); + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; - /** - * - * - *
            -           * Data representation.
            -           * The structured JSON data for the document.
            -           * It's populated from the struct data from the Document, or the
            -           * Chunk in search result.
            -           * 
            - * - * .google.protobuf.Struct struct_data = 6; - * - * @return Whether the structData field is set. - */ - boolean hasStructData(); + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(document_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, document_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getStructData()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(title_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, title_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(uri_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, uri_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } - /** - * - * - *
            -           * Data representation.
            -           * The structured JSON data for the document.
            -           * It's populated from the struct data from the Document, or the
            -           * Chunk in search result.
            -           * 
            - * - * .google.protobuf.Struct struct_data = 6; - * - * @return The structData. - */ - com.google.protobuf.Struct getStructData(); + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof + com.google.cloud.discoveryengine.v1beta.Answer.Reference.StructuredDocumentInfo)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1beta.Answer.Reference.StructuredDocumentInfo other = + (com.google.cloud.discoveryengine.v1beta.Answer.Reference.StructuredDocumentInfo) obj; - /** - * - * - *
            -           * Data representation.
            -           * The structured JSON data for the document.
            -           * It's populated from the struct data from the Document, or the
            -           * Chunk in search result.
            -           * 
            - * - * .google.protobuf.Struct struct_data = 6; - */ - com.google.protobuf.StructOrBuilder getStructDataOrBuilder(); + if (!getDocument().equals(other.getDocument())) return false; + if (hasStructData() != other.hasStructData()) return false; + if (hasStructData()) { + if (!getStructData().equals(other.getStructData())) return false; } + if (!getTitle().equals(other.getTitle())) return false; + if (!getUri().equals(other.getUri())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } - /** - * Protobuf type {@code - * google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult} - */ - public static final class SearchResult extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult) - SearchResultOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "SearchResult"); - } + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + DOCUMENT_FIELD_NUMBER; + hash = (53 * hash) + getDocument().hashCode(); + if (hasStructData()) { + hash = (37 * hash) + STRUCT_DATA_FIELD_NUMBER; + hash = (53 * hash) + getStructData().hashCode(); + } + hash = (37 * hash) + TITLE_FIELD_NUMBER; + hash = (53 * hash) + getTitle().hashCode(); + hash = (37 * hash) + URI_FIELD_NUMBER; + hash = (53 * hash) + getUri().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } - // Use SearchResult.newBuilder() to construct. - private SearchResult(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } + public static com.google.cloud.discoveryengine.v1beta.Answer.Reference.StructuredDocumentInfo + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - private SearchResult() { - document_ = ""; - uri_ = ""; - title_ = ""; - snippetInfo_ = java.util.Collections.emptyList(); - chunkInfo_ = java.util.Collections.emptyList(); - } + public static com.google.cloud.discoveryengine.v1beta.Answer.Reference.StructuredDocumentInfo + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.discoveryengine.v1beta.AnswerProto - .internal_static_google_cloud_discoveryengine_v1beta_Answer_Step_Action_Observation_SearchResult_descriptor; - } + public static com.google.cloud.discoveryengine.v1beta.Answer.Reference.StructuredDocumentInfo + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.discoveryengine.v1beta.AnswerProto - .internal_static_google_cloud_discoveryengine_v1beta_Answer_Step_Action_Observation_SearchResult_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation - .SearchResult.class, - com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation - .SearchResult.Builder.class); - } + public static com.google.cloud.discoveryengine.v1beta.Answer.Reference.StructuredDocumentInfo + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - public interface SnippetInfoOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult.SnippetInfo) - com.google.protobuf.MessageOrBuilder { + public static com.google.cloud.discoveryengine.v1beta.Answer.Reference.StructuredDocumentInfo + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - /** - * - * - *
            -             * Snippet content.
            -             * 
            - * - * string snippet = 1; - * - * @return The snippet. - */ - java.lang.String getSnippet(); + public static com.google.cloud.discoveryengine.v1beta.Answer.Reference.StructuredDocumentInfo + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - /** - * - * - *
            -             * Snippet content.
            -             * 
            - * - * string snippet = 1; - * - * @return The bytes for snippet. - */ - com.google.protobuf.ByteString getSnippetBytes(); + public static com.google.cloud.discoveryengine.v1beta.Answer.Reference.StructuredDocumentInfo + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } - /** - * - * - *
            -             * Status of the snippet defined by the search team.
            -             * 
            - * - * string snippet_status = 2; - * - * @return The snippetStatus. - */ - java.lang.String getSnippetStatus(); + public static com.google.cloud.discoveryengine.v1beta.Answer.Reference.StructuredDocumentInfo + parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } - /** - * - * - *
            -             * Status of the snippet defined by the search team.
            -             * 
            - * - * string snippet_status = 2; - * - * @return The bytes for snippetStatus. - */ - com.google.protobuf.ByteString getSnippetStatusBytes(); - } + public static com.google.cloud.discoveryengine.v1beta.Answer.Reference.StructuredDocumentInfo + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } - /** - * - * - *
            -           * Snippet information.
            -           * 
            - * - * Protobuf type {@code - * google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult.SnippetInfo} - */ - public static final class SnippetInfo extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult.SnippetInfo) - SnippetInfoOrBuilder { - private static final long serialVersionUID = 0L; + public static com.google.cloud.discoveryengine.v1beta.Answer.Reference.StructuredDocumentInfo + parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "SnippetInfo"); - } + public static com.google.cloud.discoveryengine.v1beta.Answer.Reference.StructuredDocumentInfo + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } - // Use SnippetInfo.newBuilder() to construct. - private SnippetInfo(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } + public static com.google.cloud.discoveryengine.v1beta.Answer.Reference.StructuredDocumentInfo + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } - private SnippetInfo() { - snippet_ = ""; - snippetStatus_ = ""; - } + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.discoveryengine.v1beta.AnswerProto - .internal_static_google_cloud_discoveryengine_v1beta_Answer_Step_Action_Observation_SearchResult_SnippetInfo_descriptor; - } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.discoveryengine.v1beta.AnswerProto - .internal_static_google_cloud_discoveryengine_v1beta_Answer_Step_Action_Observation_SearchResult_SnippetInfo_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation - .SearchResult.SnippetInfo.class, - com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation - .SearchResult.SnippetInfo.Builder.class); - } + public static Builder newBuilder( + com.google.cloud.discoveryengine.v1beta.Answer.Reference.StructuredDocumentInfo + prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } - public static final int SNIPPET_FIELD_NUMBER = 1; + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } - @SuppressWarnings("serial") - private volatile java.lang.Object snippet_ = ""; + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } - /** - * - * - *
            -             * Snippet content.
            -             * 
            - * - * string snippet = 1; - * - * @return The snippet. - */ - @java.lang.Override - public java.lang.String getSnippet() { - java.lang.Object ref = snippet_; - 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(); - snippet_ = s; - return s; - } - } + /** + * + * + *
            +       * Structured search information.
            +       * 
            + * + * Protobuf type {@code + * google.cloud.discoveryengine.v1beta.Answer.Reference.StructuredDocumentInfo} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.Answer.Reference.StructuredDocumentInfo) + com.google.cloud.discoveryengine.v1beta.Answer.Reference.StructuredDocumentInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.AnswerProto + .internal_static_google_cloud_discoveryengine_v1beta_Answer_Reference_StructuredDocumentInfo_descriptor; + } - /** - * - * - *
            -             * Snippet content.
            -             * 
            - * - * string snippet = 1; - * - * @return The bytes for snippet. - */ - @java.lang.Override - public com.google.protobuf.ByteString getSnippetBytes() { - java.lang.Object ref = snippet_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - snippet_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.AnswerProto + .internal_static_google_cloud_discoveryengine_v1beta_Answer_Reference_StructuredDocumentInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.Answer.Reference.StructuredDocumentInfo + .class, + com.google.cloud.discoveryengine.v1beta.Answer.Reference.StructuredDocumentInfo + .Builder.class); + } - public static final int SNIPPET_STATUS_FIELD_NUMBER = 2; + // Construct using + // com.google.cloud.discoveryengine.v1beta.Answer.Reference.StructuredDocumentInfo.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } - @SuppressWarnings("serial") - private volatile java.lang.Object snippetStatus_ = ""; + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } - /** - * - * - *
            -             * Status of the snippet defined by the search team.
            -             * 
            - * - * string snippet_status = 2; - * - * @return The snippetStatus. - */ - @java.lang.Override - public java.lang.String getSnippetStatus() { - java.lang.Object ref = snippetStatus_; - 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(); - snippetStatus_ = s; - return s; - } - } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetStructDataFieldBuilder(); + } + } - /** - * - * - *
            -             * Status of the snippet defined by the search team.
            -             * 
            - * - * string snippet_status = 2; - * - * @return The bytes for snippetStatus. - */ - @java.lang.Override - public com.google.protobuf.ByteString getSnippetStatusBytes() { - java.lang.Object ref = snippetStatus_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - snippetStatus_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + document_ = ""; + structData_ = null; + if (structDataBuilder_ != null) { + structDataBuilder_.dispose(); + structDataBuilder_ = null; + } + title_ = ""; + uri_ = ""; + return this; + } - private byte memoizedIsInitialized = -1; + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1beta.AnswerProto + .internal_static_google_cloud_discoveryengine_v1beta_Answer_Reference_StructuredDocumentInfo_descriptor; + } - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Answer.Reference.StructuredDocumentInfo + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1beta.Answer.Reference.StructuredDocumentInfo + .getDefaultInstance(); + } - memoizedIsInitialized = 1; - return true; - } + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Answer.Reference.StructuredDocumentInfo + build() { + com.google.cloud.discoveryengine.v1beta.Answer.Reference.StructuredDocumentInfo result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(snippet_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, snippet_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(snippetStatus_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 2, snippetStatus_); - } - getUnknownFields().writeTo(output); - } + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Answer.Reference.StructuredDocumentInfo + buildPartial() { + com.google.cloud.discoveryengine.v1beta.Answer.Reference.StructuredDocumentInfo result = + new com.google.cloud.discoveryengine.v1beta.Answer.Reference.StructuredDocumentInfo( + this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; + private void buildPartial0( + com.google.cloud.discoveryengine.v1beta.Answer.Reference.StructuredDocumentInfo + result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.document_ = document_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.structData_ = + structDataBuilder_ == null ? structData_ : structDataBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.title_ = title_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.uri_ = uri_; + } + result.bitField0_ |= to_bitField0_; + } - size = 0; - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(snippet_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, snippet_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(snippetStatus_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(2, snippetStatus_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.discoveryengine.v1beta.Answer.Reference.StructuredDocumentInfo) { + return mergeFrom( + (com.google.cloud.discoveryengine.v1beta.Answer.Reference.StructuredDocumentInfo) + other); + } else { + super.mergeFrom(other); + return this; + } + } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj - instanceof - com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation - .SearchResult.SnippetInfo)) { - return super.equals(obj); - } - com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult - .SnippetInfo - other = - (com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation - .SearchResult.SnippetInfo) - obj; - - if (!getSnippet().equals(other.getSnippet())) return false; - if (!getSnippetStatus().equals(other.getSnippetStatus())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1beta.Answer.Reference.StructuredDocumentInfo other) { + if (other + == com.google.cloud.discoveryengine.v1beta.Answer.Reference.StructuredDocumentInfo + .getDefaultInstance()) return this; + if (!other.getDocument().isEmpty()) { + document_ = other.document_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasStructData()) { + mergeStructData(other.getStructData()); + } + if (!other.getTitle().isEmpty()) { + title_ = other.title_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getUri().isEmpty()) { + uri_ = other.uri_; + bitField0_ |= 0x00000008; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + SNIPPET_FIELD_NUMBER; - hash = (53 * hash) + getSnippet().hashCode(); - hash = (37 * hash) + SNIPPET_STATUS_FIELD_NUMBER; - hash = (53 * hash) + getSnippetStatus().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } + @java.lang.Override + public final boolean isInitialized() { + return true; + } - public static com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation - .SearchResult.SnippetInfo - parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + document_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage( + internalGetStructDataFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + title_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + uri_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } - public static com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation - .SearchResult.SnippetInfo - parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } + private int bitField0_; - public static com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation - .SearchResult.SnippetInfo - parseFrom(com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } + private java.lang.Object document_ = ""; - public static com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation - .SearchResult.SnippetInfo - parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } + /** + * + * + *
            +         * Document resource name.
            +         * 
            + * + * string document = 1 [(.google.api.resource_reference) = { ... } + * + * @return The document. + */ + public java.lang.String getDocument() { + java.lang.Object ref = document_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + document_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } - public static com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation - .SearchResult.SnippetInfo - parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } + /** + * + * + *
            +         * Document resource name.
            +         * 
            + * + * string document = 1 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for document. + */ + public com.google.protobuf.ByteString getDocumentBytes() { + java.lang.Object ref = document_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + document_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } - public static com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation - .SearchResult.SnippetInfo - parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } + /** + * + * + *
            +         * Document resource name.
            +         * 
            + * + * string document = 1 [(.google.api.resource_reference) = { ... } + * + * @param value The document to set. + * @return This builder for chaining. + */ + public Builder setDocument(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + document_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } - public static com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation - .SearchResult.SnippetInfo - parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } + /** + * + * + *
            +         * Document resource name.
            +         * 
            + * + * string document = 1 [(.google.api.resource_reference) = { ... } + * + * @return This builder for chaining. + */ + public Builder clearDocument() { + document_ = getDefaultInstance().getDocument(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } - public static com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation - .SearchResult.SnippetInfo - 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.discoveryengine.v1beta.Answer.Step.Action.Observation - .SearchResult.SnippetInfo - parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input); - } + /** + * + * + *
            +         * Document resource name.
            +         * 
            + * + * string document = 1 [(.google.api.resource_reference) = { ... } + * + * @param value The bytes for document to set. + * @return This builder for chaining. + */ + public Builder setDocumentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + document_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } - public static com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation - .SearchResult.SnippetInfo - parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } + private com.google.protobuf.Struct structData_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Struct, + com.google.protobuf.Struct.Builder, + com.google.protobuf.StructOrBuilder> + structDataBuilder_; - public static com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation - .SearchResult.SnippetInfo - parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } + /** + * + * + *
            +         * Structured search data.
            +         * 
            + * + * .google.protobuf.Struct struct_data = 2; + * + * @return Whether the structData field is set. + */ + public boolean hasStructData() { + return ((bitField0_ & 0x00000002) != 0); + } - public static com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation - .SearchResult.SnippetInfo - parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } + /** + * + * + *
            +         * Structured search data.
            +         * 
            + * + * .google.protobuf.Struct struct_data = 2; + * + * @return The structData. + */ + public com.google.protobuf.Struct getStructData() { + if (structDataBuilder_ == null) { + return structData_ == null + ? com.google.protobuf.Struct.getDefaultInstance() + : structData_; + } else { + return structDataBuilder_.getMessage(); + } + } - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); + /** + * + * + *
            +         * Structured search data.
            +         * 
            + * + * .google.protobuf.Struct struct_data = 2; + */ + public Builder setStructData(com.google.protobuf.Struct value) { + if (structDataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); } + structData_ = value; + } else { + structDataBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } + /** + * + * + *
            +         * Structured search data.
            +         * 
            + * + * .google.protobuf.Struct struct_data = 2; + */ + public Builder setStructData(com.google.protobuf.Struct.Builder builderForValue) { + if (structDataBuilder_ == null) { + structData_ = builderForValue.build(); + } else { + structDataBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } - public static Builder newBuilder( - com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult - .SnippetInfo - prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + /** + * + * + *
            +         * Structured search data.
            +         * 
            + * + * .google.protobuf.Struct struct_data = 2; + */ + public Builder mergeStructData(com.google.protobuf.Struct value) { + if (structDataBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && structData_ != null + && structData_ != com.google.protobuf.Struct.getDefaultInstance()) { + getStructDataBuilder().mergeFrom(value); + } else { + structData_ = value; } + } else { + structDataBuilder_.mergeFrom(value); + } + if (structData_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } + /** + * + * + *
            +         * Structured search data.
            +         * 
            + * + * .google.protobuf.Struct struct_data = 2; + */ + public Builder clearStructData() { + bitField0_ = (bitField0_ & ~0x00000002); + structData_ = null; + if (structDataBuilder_ != null) { + structDataBuilder_.dispose(); + structDataBuilder_ = null; + } + onChanged(); + return this; + } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } + /** + * + * + *
            +         * Structured search data.
            +         * 
            + * + * .google.protobuf.Struct struct_data = 2; + */ + public com.google.protobuf.Struct.Builder getStructDataBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return internalGetStructDataFieldBuilder().getBuilder(); + } - /** - * - * - *
            -             * Snippet information.
            -             * 
            - * - * Protobuf type {@code - * google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult.SnippetInfo} - */ - public static final class Builder - extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult.SnippetInfo) - com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult - .SnippetInfoOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.discoveryengine.v1beta.AnswerProto - .internal_static_google_cloud_discoveryengine_v1beta_Answer_Step_Action_Observation_SearchResult_SnippetInfo_descriptor; - } + /** + * + * + *
            +         * Structured search data.
            +         * 
            + * + * .google.protobuf.Struct struct_data = 2; + */ + public com.google.protobuf.StructOrBuilder getStructDataOrBuilder() { + if (structDataBuilder_ != null) { + return structDataBuilder_.getMessageOrBuilder(); + } else { + return structData_ == null + ? com.google.protobuf.Struct.getDefaultInstance() + : structData_; + } + } - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.discoveryengine.v1beta.AnswerProto - .internal_static_google_cloud_discoveryengine_v1beta_Answer_Step_Action_Observation_SearchResult_SnippetInfo_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation - .SearchResult.SnippetInfo.class, - com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation - .SearchResult.SnippetInfo.Builder.class); - } + /** + * + * + *
            +         * Structured search data.
            +         * 
            + * + * .google.protobuf.Struct struct_data = 2; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Struct, + com.google.protobuf.Struct.Builder, + com.google.protobuf.StructOrBuilder> + internalGetStructDataFieldBuilder() { + if (structDataBuilder_ == null) { + structDataBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Struct, + com.google.protobuf.Struct.Builder, + com.google.protobuf.StructOrBuilder>( + getStructData(), getParentForChildren(), isClean()); + structData_ = null; + } + return structDataBuilder_; + } - // Construct using - // com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult.SnippetInfo.newBuilder() - private Builder() {} + private java.lang.Object title_ = ""; - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - } + /** + * + * + *
            +         * Output only. The title of the document.
            +         * 
            + * + * string title = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The title. + */ + public java.lang.String getTitle() { + java.lang.Object ref = title_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + title_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - snippet_ = ""; - snippetStatus_ = ""; - return this; - } + /** + * + * + *
            +         * Output only. The title of the document.
            +         * 
            + * + * string title = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for title. + */ + public com.google.protobuf.ByteString getTitleBytes() { + java.lang.Object ref = title_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + title_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.discoveryengine.v1beta.AnswerProto - .internal_static_google_cloud_discoveryengine_v1beta_Answer_Step_Action_Observation_SearchResult_SnippetInfo_descriptor; - } + /** + * + * + *
            +         * Output only. The title of the document.
            +         * 
            + * + * string title = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The title to set. + * @return This builder for chaining. + */ + public Builder setTitle(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + title_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation - .SearchResult.SnippetInfo - getDefaultInstanceForType() { - return com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation - .SearchResult.SnippetInfo.getDefaultInstance(); - } + /** + * + * + *
            +         * Output only. The title of the document.
            +         * 
            + * + * string title = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearTitle() { + title_ = getDefaultInstance().getTitle(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation - .SearchResult.SnippetInfo - build() { - com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult - .SnippetInfo - result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } + /** + * + * + *
            +         * Output only. The title of the document.
            +         * 
            + * + * string title = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for title to set. + * @return This builder for chaining. + */ + public Builder setTitleBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + title_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation - .SearchResult.SnippetInfo - buildPartial() { - com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult - .SnippetInfo - result = - new com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation - .SearchResult.SnippetInfo(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } + private java.lang.Object uri_ = ""; - private void buildPartial0( - com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation - .SearchResult.SnippetInfo - result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.snippet_ = snippet_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.snippetStatus_ = snippetStatus_; - } - } + /** + * + * + *
            +         * Output only. The URI of the document.
            +         * 
            + * + * string uri = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The uri. + */ + public java.lang.String getUri() { + java.lang.Object ref = uri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other - instanceof - com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation - .SearchResult.SnippetInfo) { - return mergeFrom( - (com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation - .SearchResult.SnippetInfo) - other); - } else { - super.mergeFrom(other); - return this; - } - } + /** + * + * + *
            +         * Output only. The URI of the document.
            +         * 
            + * + * string uri = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for uri. + */ + public com.google.protobuf.ByteString getUriBytes() { + java.lang.Object ref = uri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } - public Builder mergeFrom( - com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation - .SearchResult.SnippetInfo - other) { - if (other - == com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation - .SearchResult.SnippetInfo.getDefaultInstance()) return this; - if (!other.getSnippet().isEmpty()) { - snippet_ = other.snippet_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (!other.getSnippetStatus().isEmpty()) { - snippetStatus_ = other.snippetStatus_; - bitField0_ |= 0x00000002; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } + /** + * + * + *
            +         * Output only. The URI of the document.
            +         * 
            + * + * string uri = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The uri to set. + * @return This builder for chaining. + */ + public Builder setUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + uri_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } - @java.lang.Override - public final boolean isInitialized() { - return true; - } + /** + * + * + *
            +         * Output only. The URI of the document.
            +         * 
            + * + * string uri = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearUri() { + uri_ = getDefaultInstance().getUri(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - snippet_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: - { - snippetStatus_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 18 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } + /** + * + * + *
            +         * Output only. The URI of the document.
            +         * 
            + * + * string uri = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for uri to set. + * @return This builder for chaining. + */ + public Builder setUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + uri_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } - private int bitField0_; + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.Answer.Reference.StructuredDocumentInfo) + } - private java.lang.Object snippet_ = ""; + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.Answer.Reference.StructuredDocumentInfo) + private static final com.google.cloud.discoveryengine.v1beta.Answer.Reference + .StructuredDocumentInfo + DEFAULT_INSTANCE; - /** - * - * - *
            -               * Snippet content.
            -               * 
            - * - * string snippet = 1; - * - * @return The snippet. - */ - public java.lang.String getSnippet() { - java.lang.Object ref = snippet_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - snippet_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } + static { + DEFAULT_INSTANCE = + new com.google.cloud.discoveryengine.v1beta.Answer.Reference.StructuredDocumentInfo(); + } - /** - * - * - *
            -               * Snippet content.
            -               * 
            - * - * string snippet = 1; - * - * @return The bytes for snippet. - */ - public com.google.protobuf.ByteString getSnippetBytes() { - java.lang.Object ref = snippet_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - snippet_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } + public static com.google.cloud.discoveryengine.v1beta.Answer.Reference.StructuredDocumentInfo + getDefaultInstance() { + return DEFAULT_INSTANCE; + } - /** - * - * - *
            -               * Snippet content.
            -               * 
            - * - * string snippet = 1; - * - * @param value The snippet to set. - * @return This builder for chaining. - */ - public Builder setSnippet(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - snippet_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public StructuredDocumentInfo parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); } + return builder.buildPartial(); + } + }; - /** - * - * - *
            -               * Snippet content.
            -               * 
            - * - * string snippet = 1; - * - * @return This builder for chaining. - */ - public Builder clearSnippet() { - snippet_ = getDefaultInstance().getSnippet(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } + public static com.google.protobuf.Parser parser() { + return PARSER; + } - /** - * - * - *
            -               * Snippet content.
            -               * 
            - * - * string snippet = 1; - * - * @param value The bytes for snippet to set. - * @return This builder for chaining. - */ - public Builder setSnippetBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - snippet_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private java.lang.Object snippetStatus_ = ""; + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } - /** - * - * - *
            -               * Status of the snippet defined by the search team.
            -               * 
            - * - * string snippet_status = 2; - * - * @return The snippetStatus. - */ - public java.lang.String getSnippetStatus() { - java.lang.Object ref = snippetStatus_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - snippetStatus_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Answer.Reference.StructuredDocumentInfo + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } - /** - * - * - *
            -               * Status of the snippet defined by the search team.
            -               * 
            - * - * string snippet_status = 2; - * - * @return The bytes for snippetStatus. - */ - public com.google.protobuf.ByteString getSnippetStatusBytes() { - java.lang.Object ref = snippetStatus_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - snippetStatus_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } + private int contentCase_ = 0; - /** - * - * - *
            -               * Status of the snippet defined by the search team.
            -               * 
            - * - * string snippet_status = 2; - * - * @param value The snippetStatus to set. - * @return This builder for chaining. - */ - public Builder setSnippetStatus(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - snippetStatus_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } + @SuppressWarnings("serial") + private java.lang.Object content_; - /** - * - * - *
            -               * Status of the snippet defined by the search team.
            -               * 
            - * - * string snippet_status = 2; - * - * @return This builder for chaining. - */ - public Builder clearSnippetStatus() { - snippetStatus_ = getDefaultInstance().getSnippetStatus(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } + public enum ContentCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + UNSTRUCTURED_DOCUMENT_INFO(1), + CHUNK_INFO(2), + STRUCTURED_DOCUMENT_INFO(3), + CONTENT_NOT_SET(0); + private final int value; - /** - * - * - *
            -               * Status of the snippet defined by the search team.
            -               * 
            - * - * string snippet_status = 2; - * - * @param value The bytes for snippetStatus to set. - * @return This builder for chaining. - */ - public Builder setSnippetStatusBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - snippetStatus_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } + private ContentCase(int value) { + this.value = value; + } - // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult.SnippetInfo) - } + /** + * @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 ContentCase valueOf(int value) { + return forNumber(value); + } - // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult.SnippetInfo) - private static final com.google.cloud.discoveryengine.v1beta.Answer.Step.Action - .Observation.SearchResult.SnippetInfo - DEFAULT_INSTANCE; + public static ContentCase forNumber(int value) { + switch (value) { + case 1: + return UNSTRUCTURED_DOCUMENT_INFO; + case 2: + return CHUNK_INFO; + case 3: + return STRUCTURED_DOCUMENT_INFO; + case 0: + return CONTENT_NOT_SET; + default: + return null; + } + } - static { - DEFAULT_INSTANCE = - new com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation - .SearchResult.SnippetInfo(); - } + public int getNumber() { + return this.value; + } + }; - public static com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation - .SearchResult.SnippetInfo - getDefaultInstance() { - return DEFAULT_INSTANCE; - } + public ContentCase getContentCase() { + return ContentCase.forNumber(contentCase_); + } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public SnippetInfo parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException() - .setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; + public static final int UNSTRUCTURED_DOCUMENT_INFO_FIELD_NUMBER = 1; - public static com.google.protobuf.Parser parser() { - return PARSER; - } + /** + * + * + *
            +     * Unstructured document information.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo unstructured_document_info = 1; + * + * + * @return Whether the unstructuredDocumentInfo field is set. + */ + @java.lang.Override + public boolean hasUnstructuredDocumentInfo() { + return contentCase_ == 1; + } - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + /** + * + * + *
            +     * Unstructured document information.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo unstructured_document_info = 1; + * + * + * @return The unstructuredDocumentInfo. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo + getUnstructuredDocumentInfo() { + if (contentCase_ == 1) { + return (com.google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo) + content_; + } + return com.google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo + .getDefaultInstance(); + } - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation - .SearchResult.SnippetInfo - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - } - - public interface ChunkInfoOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult.ChunkInfo) - com.google.protobuf.MessageOrBuilder { + /** + * + * + *
            +     * Unstructured document information.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo unstructured_document_info = 1; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Answer.Reference + .UnstructuredDocumentInfoOrBuilder + getUnstructuredDocumentInfoOrBuilder() { + if (contentCase_ == 1) { + return (com.google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo) + content_; + } + return com.google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo + .getDefaultInstance(); + } - /** - * - * - *
            -             * Chunk resource name.
            -             * 
            - * - * string chunk = 1; - * - * @return The chunk. - */ - java.lang.String getChunk(); + public static final int CHUNK_INFO_FIELD_NUMBER = 2; - /** - * - * - *
            -             * Chunk resource name.
            -             * 
            - * - * string chunk = 1; - * - * @return The bytes for chunk. - */ - com.google.protobuf.ByteString getChunkBytes(); + /** + * + * + *
            +     * Chunk information.
            +     * 
            + * + * .google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo chunk_info = 2; + * + * @return Whether the chunkInfo field is set. + */ + @java.lang.Override + public boolean hasChunkInfo() { + return contentCase_ == 2; + } - /** - * - * - *
            -             * Chunk textual content.
            -             * 
            - * - * string content = 2; - * - * @return The content. - */ - java.lang.String getContent(); + /** + * + * + *
            +     * Chunk information.
            +     * 
            + * + * .google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo chunk_info = 2; + * + * @return The chunkInfo. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo getChunkInfo() { + if (contentCase_ == 2) { + return (com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo) content_; + } + return com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo + .getDefaultInstance(); + } - /** - * - * - *
            -             * Chunk textual content.
            -             * 
            - * - * string content = 2; - * - * @return The bytes for content. - */ - com.google.protobuf.ByteString getContentBytes(); + /** + * + * + *
            +     * Chunk information.
            +     * 
            + * + * .google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo chunk_info = 2; + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfoOrBuilder + getChunkInfoOrBuilder() { + if (contentCase_ == 2) { + return (com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo) content_; + } + return com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo + .getDefaultInstance(); + } - /** - * - * - *
            -             * The relevance of the chunk for a given query. Values range from
            -             * 0.0 (completely irrelevant) to 1.0 (completely relevant).
            -             * This value is for informational purpose only. It may change for
            -             * the same query and chunk at any time due to a model retraining or
            -             * change in implementation.
            -             * 
            - * - * optional float relevance_score = 3; - * - * @return Whether the relevanceScore field is set. - */ - boolean hasRelevanceScore(); + public static final int STRUCTURED_DOCUMENT_INFO_FIELD_NUMBER = 3; - /** - * - * - *
            -             * The relevance of the chunk for a given query. Values range from
            -             * 0.0 (completely irrelevant) to 1.0 (completely relevant).
            -             * This value is for informational purpose only. It may change for
            -             * the same query and chunk at any time due to a model retraining or
            -             * change in implementation.
            -             * 
            - * - * optional float relevance_score = 3; - * - * @return The relevanceScore. - */ - float getRelevanceScore(); - } + /** + * + * + *
            +     * Structured document information.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Answer.Reference.StructuredDocumentInfo structured_document_info = 3; + * + * + * @return Whether the structuredDocumentInfo field is set. + */ + @java.lang.Override + public boolean hasStructuredDocumentInfo() { + return contentCase_ == 3; + } - /** - * - * - *
            -           * Chunk information.
            -           * 
            - * - * Protobuf type {@code - * google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult.ChunkInfo} - */ - public static final class ChunkInfo extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult.ChunkInfo) - ChunkInfoOrBuilder { - private static final long serialVersionUID = 0L; + /** + * + * + *
            +     * Structured document information.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Answer.Reference.StructuredDocumentInfo structured_document_info = 3; + * + * + * @return The structuredDocumentInfo. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Answer.Reference.StructuredDocumentInfo + getStructuredDocumentInfo() { + if (contentCase_ == 3) { + return (com.google.cloud.discoveryengine.v1beta.Answer.Reference.StructuredDocumentInfo) + content_; + } + return com.google.cloud.discoveryengine.v1beta.Answer.Reference.StructuredDocumentInfo + .getDefaultInstance(); + } - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "ChunkInfo"); - } + /** + * + * + *
            +     * Structured document information.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Answer.Reference.StructuredDocumentInfo structured_document_info = 3; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Answer.Reference.StructuredDocumentInfoOrBuilder + getStructuredDocumentInfoOrBuilder() { + if (contentCase_ == 3) { + return (com.google.cloud.discoveryengine.v1beta.Answer.Reference.StructuredDocumentInfo) + content_; + } + return com.google.cloud.discoveryengine.v1beta.Answer.Reference.StructuredDocumentInfo + .getDefaultInstance(); + } - // Use ChunkInfo.newBuilder() to construct. - private ChunkInfo(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } + private byte memoizedIsInitialized = -1; - private ChunkInfo() { - chunk_ = ""; - content_ = ""; - } + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.discoveryengine.v1beta.AnswerProto - .internal_static_google_cloud_discoveryengine_v1beta_Answer_Step_Action_Observation_SearchResult_ChunkInfo_descriptor; - } + memoizedIsInitialized = 1; + return true; + } - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.discoveryengine.v1beta.AnswerProto - .internal_static_google_cloud_discoveryengine_v1beta_Answer_Step_Action_Observation_SearchResult_ChunkInfo_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation - .SearchResult.ChunkInfo.class, - com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation - .SearchResult.ChunkInfo.Builder.class); - } + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (contentCase_ == 1) { + output.writeMessage( + 1, + (com.google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo) + content_); + } + if (contentCase_ == 2) { + output.writeMessage( + 2, (com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo) content_); + } + if (contentCase_ == 3) { + output.writeMessage( + 3, + (com.google.cloud.discoveryengine.v1beta.Answer.Reference.StructuredDocumentInfo) + content_); + } + getUnknownFields().writeTo(output); + } - private int bitField0_; - public static final int CHUNK_FIELD_NUMBER = 1; + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; - @SuppressWarnings("serial") - private volatile java.lang.Object chunk_ = ""; + size = 0; + if (contentCase_ == 1) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 1, + (com.google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo) + content_); + } + if (contentCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, (com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo) content_); + } + if (contentCase_ == 3) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 3, + (com.google.cloud.discoveryengine.v1beta.Answer.Reference.StructuredDocumentInfo) + content_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } - /** - * - * - *
            -             * Chunk resource name.
            -             * 
            - * - * string chunk = 1; - * - * @return The chunk. - */ - @java.lang.Override - public java.lang.String getChunk() { - java.lang.Object ref = chunk_; - 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(); - chunk_ = s; - return s; - } - } + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.discoveryengine.v1beta.Answer.Reference)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1beta.Answer.Reference other = + (com.google.cloud.discoveryengine.v1beta.Answer.Reference) obj; - /** - * - * - *
            -             * Chunk resource name.
            -             * 
            - * - * string chunk = 1; - * - * @return The bytes for chunk. - */ - @java.lang.Override - public com.google.protobuf.ByteString getChunkBytes() { - java.lang.Object ref = chunk_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - chunk_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } + if (!getContentCase().equals(other.getContentCase())) return false; + switch (contentCase_) { + case 1: + if (!getUnstructuredDocumentInfo().equals(other.getUnstructuredDocumentInfo())) + return false; + break; + case 2: + if (!getChunkInfo().equals(other.getChunkInfo())) return false; + break; + case 3: + if (!getStructuredDocumentInfo().equals(other.getStructuredDocumentInfo())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } - public static final int CONTENT_FIELD_NUMBER = 2; + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + switch (contentCase_) { + case 1: + hash = (37 * hash) + UNSTRUCTURED_DOCUMENT_INFO_FIELD_NUMBER; + hash = (53 * hash) + getUnstructuredDocumentInfo().hashCode(); + break; + case 2: + hash = (37 * hash) + CHUNK_INFO_FIELD_NUMBER; + hash = (53 * hash) + getChunkInfo().hashCode(); + break; + case 3: + hash = (37 * hash) + STRUCTURED_DOCUMENT_INFO_FIELD_NUMBER; + hash = (53 * hash) + getStructuredDocumentInfo().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } - @SuppressWarnings("serial") - private volatile java.lang.Object content_ = ""; + public static com.google.cloud.discoveryengine.v1beta.Answer.Reference parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - /** - * - * - *
            -             * Chunk textual content.
            -             * 
            - * - * string content = 2; - * - * @return The content. - */ - @java.lang.Override - public java.lang.String getContent() { - java.lang.Object ref = content_; - 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(); - content_ = s; - return s; - } - } + public static com.google.cloud.discoveryengine.v1beta.Answer.Reference parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - /** - * - * - *
            -             * Chunk textual content.
            -             * 
            - * - * string content = 2; - * - * @return The bytes for content. - */ - @java.lang.Override - public com.google.protobuf.ByteString getContentBytes() { - java.lang.Object ref = content_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - content_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } + public static com.google.cloud.discoveryengine.v1beta.Answer.Reference parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - public static final int RELEVANCE_SCORE_FIELD_NUMBER = 3; - private float relevanceScore_ = 0F; + public static com.google.cloud.discoveryengine.v1beta.Answer.Reference parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - /** - * - * - *
            -             * The relevance of the chunk for a given query. Values range from
            -             * 0.0 (completely irrelevant) to 1.0 (completely relevant).
            -             * This value is for informational purpose only. It may change for
            -             * the same query and chunk at any time due to a model retraining or
            -             * change in implementation.
            -             * 
            - * - * optional float relevance_score = 3; - * - * @return Whether the relevanceScore field is set. - */ - @java.lang.Override - public boolean hasRelevanceScore() { - return ((bitField0_ & 0x00000001) != 0); - } - - /** - * - * - *
            -             * The relevance of the chunk for a given query. Values range from
            -             * 0.0 (completely irrelevant) to 1.0 (completely relevant).
            -             * This value is for informational purpose only. It may change for
            -             * the same query and chunk at any time due to a model retraining or
            -             * change in implementation.
            -             * 
            - * - * optional float relevance_score = 3; - * - * @return The relevanceScore. - */ - @java.lang.Override - public float getRelevanceScore() { - return relevanceScore_; - } + public static com.google.cloud.discoveryengine.v1beta.Answer.Reference parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - private byte memoizedIsInitialized = -1; + public static com.google.cloud.discoveryengine.v1beta.Answer.Reference parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + public static com.google.cloud.discoveryengine.v1beta.Answer.Reference parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } - memoizedIsInitialized = 1; - return true; - } + public static com.google.cloud.discoveryengine.v1beta.Answer.Reference parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(chunk_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, chunk_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(content_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 2, content_); - } - if (((bitField0_ & 0x00000001) != 0)) { - output.writeFloat(3, relevanceScore_); - } - getUnknownFields().writeTo(output); - } + public static com.google.cloud.discoveryengine.v1beta.Answer.Reference parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; + public static com.google.cloud.discoveryengine.v1beta.Answer.Reference parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } - size = 0; - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(chunk_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, chunk_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(content_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(2, content_); - } - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream.computeFloatSize(3, relevanceScore_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } + public static com.google.cloud.discoveryengine.v1beta.Answer.Reference parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj - instanceof - com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation - .SearchResult.ChunkInfo)) { - return super.equals(obj); - } - com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult - .ChunkInfo - other = - (com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation - .SearchResult.ChunkInfo) - obj; + public static com.google.cloud.discoveryengine.v1beta.Answer.Reference parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } - if (!getChunk().equals(other.getChunk())) return false; - if (!getContent().equals(other.getContent())) return false; - if (hasRelevanceScore() != other.hasRelevanceScore()) return false; - if (hasRelevanceScore()) { - if (java.lang.Float.floatToIntBits(getRelevanceScore()) - != java.lang.Float.floatToIntBits(other.getRelevanceScore())) return false; - } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + CHUNK_FIELD_NUMBER; - hash = (53 * hash) + getChunk().hashCode(); - hash = (37 * hash) + CONTENT_FIELD_NUMBER; - hash = (53 * hash) + getContent().hashCode(); - if (hasRelevanceScore()) { - hash = (37 * hash) + RELEVANCE_SCORE_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits(getRelevanceScore()); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } - public static com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation - .SearchResult.ChunkInfo - parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } + public static Builder newBuilder( + com.google.cloud.discoveryengine.v1beta.Answer.Reference prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } - public static com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation - .SearchResult.ChunkInfo - parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } - public static com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation - .SearchResult.ChunkInfo - parseFrom(com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } - public static com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation - .SearchResult.ChunkInfo - parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } + /** + * + * + *
            +     * Reference.
            +     * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.Answer.Reference} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.Answer.Reference) + com.google.cloud.discoveryengine.v1beta.Answer.ReferenceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.AnswerProto + .internal_static_google_cloud_discoveryengine_v1beta_Answer_Reference_descriptor; + } - public static com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation - .SearchResult.ChunkInfo - parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.AnswerProto + .internal_static_google_cloud_discoveryengine_v1beta_Answer_Reference_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.Answer.Reference.class, + com.google.cloud.discoveryengine.v1beta.Answer.Reference.Builder.class); + } - public static com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation - .SearchResult.ChunkInfo - parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } + // Construct using com.google.cloud.discoveryengine.v1beta.Answer.Reference.newBuilder() + private Builder() {} - public static com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation - .SearchResult.ChunkInfo - parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } - public static com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation - .SearchResult.ChunkInfo - parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (unstructuredDocumentInfoBuilder_ != null) { + unstructuredDocumentInfoBuilder_.clear(); + } + if (chunkInfoBuilder_ != null) { + chunkInfoBuilder_.clear(); + } + if (structuredDocumentInfoBuilder_ != null) { + structuredDocumentInfoBuilder_.clear(); + } + contentCase_ = 0; + content_ = null; + return this; + } - public static com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation - .SearchResult.ChunkInfo - parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input); - } + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1beta.AnswerProto + .internal_static_google_cloud_discoveryengine_v1beta_Answer_Reference_descriptor; + } - public static com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation - .SearchResult.ChunkInfo - parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Answer.Reference getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1beta.Answer.Reference.getDefaultInstance(); + } - public static com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation - .SearchResult.ChunkInfo - parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Answer.Reference build() { + com.google.cloud.discoveryengine.v1beta.Answer.Reference result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } - public static com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation - .SearchResult.ChunkInfo - 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 com.google.cloud.discoveryengine.v1beta.Answer.Reference buildPartial() { + com.google.cloud.discoveryengine.v1beta.Answer.Reference result = + new com.google.cloud.discoveryengine.v1beta.Answer.Reference(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } + private void buildPartial0(com.google.cloud.discoveryengine.v1beta.Answer.Reference result) { + int from_bitField0_ = bitField0_; + } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } + private void buildPartialOneofs( + com.google.cloud.discoveryengine.v1beta.Answer.Reference result) { + result.contentCase_ = contentCase_; + result.content_ = this.content_; + if (contentCase_ == 1 && unstructuredDocumentInfoBuilder_ != null) { + result.content_ = unstructuredDocumentInfoBuilder_.build(); + } + if (contentCase_ == 2 && chunkInfoBuilder_ != null) { + result.content_ = chunkInfoBuilder_.build(); + } + if (contentCase_ == 3 && structuredDocumentInfoBuilder_ != null) { + result.content_ = structuredDocumentInfoBuilder_.build(); + } + } - public static Builder newBuilder( - com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult - .ChunkInfo - prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.discoveryengine.v1beta.Answer.Reference) { + return mergeFrom((com.google.cloud.discoveryengine.v1beta.Answer.Reference) other); + } else { + super.mergeFrom(other); + return this; + } + } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + public Builder mergeFrom(com.google.cloud.discoveryengine.v1beta.Answer.Reference other) { + if (other == com.google.cloud.discoveryengine.v1beta.Answer.Reference.getDefaultInstance()) + return this; + switch (other.getContentCase()) { + case UNSTRUCTURED_DOCUMENT_INFO: + { + mergeUnstructuredDocumentInfo(other.getUnstructuredDocumentInfo()); + break; } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; + case CHUNK_INFO: + { + mergeChunkInfo(other.getChunkInfo()); + break; + } + case STRUCTURED_DOCUMENT_INFO: + { + mergeStructuredDocumentInfo(other.getStructuredDocumentInfo()); + break; + } + case CONTENT_NOT_SET: + { + break; } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } - /** - * - * - *
            -             * Chunk information.
            -             * 
            - * - * Protobuf type {@code - * google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult.ChunkInfo} - */ - public static final class Builder - extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult.ChunkInfo) - com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult - .ChunkInfoOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.discoveryengine.v1beta.AnswerProto - .internal_static_google_cloud_discoveryengine_v1beta_Answer_Step_Action_Observation_SearchResult_ChunkInfo_descriptor; - } + @java.lang.Override + public final boolean isInitialized() { + return true; + } - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.discoveryengine.v1beta.AnswerProto - .internal_static_google_cloud_discoveryengine_v1beta_Answer_Step_Action_Observation_SearchResult_ChunkInfo_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation - .SearchResult.ChunkInfo.class, - com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation - .SearchResult.ChunkInfo.Builder.class); - } + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage( + internalGetUnstructuredDocumentInfoFieldBuilder().getBuilder(), + extensionRegistry); + contentCase_ = 1; + break; + } // case 10 + case 18: + { + input.readMessage( + internalGetChunkInfoFieldBuilder().getBuilder(), extensionRegistry); + contentCase_ = 2; + break; + } // case 18 + case 26: + { + input.readMessage( + internalGetStructuredDocumentInfoFieldBuilder().getBuilder(), + extensionRegistry); + contentCase_ = 3; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } - // Construct using - // com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult.ChunkInfo.newBuilder() - private Builder() {} + private int contentCase_ = 0; + private java.lang.Object content_; - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - } + public ContentCase getContentCase() { + return ContentCase.forNumber(contentCase_); + } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - chunk_ = ""; - content_ = ""; - relevanceScore_ = 0F; - return this; - } + public Builder clearContent() { + contentCase_ = 0; + content_ = null; + onChanged(); + return this; + } - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.discoveryengine.v1beta.AnswerProto - .internal_static_google_cloud_discoveryengine_v1beta_Answer_Step_Action_Observation_SearchResult_ChunkInfo_descriptor; - } + private int bitField0_; - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation - .SearchResult.ChunkInfo - getDefaultInstanceForType() { - return com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation - .SearchResult.ChunkInfo.getDefaultInstance(); - } + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo, + com.google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo + .Builder, + com.google.cloud.discoveryengine.v1beta.Answer.Reference + .UnstructuredDocumentInfoOrBuilder> + unstructuredDocumentInfoBuilder_; - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation - .SearchResult.ChunkInfo - build() { - com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult - .ChunkInfo - result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } + /** + * + * + *
            +       * Unstructured document information.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo unstructured_document_info = 1; + * + * + * @return Whether the unstructuredDocumentInfo field is set. + */ + @java.lang.Override + public boolean hasUnstructuredDocumentInfo() { + return contentCase_ == 1; + } - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation - .SearchResult.ChunkInfo - buildPartial() { - com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult - .ChunkInfo - result = - new com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation - .SearchResult.ChunkInfo(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } + /** + * + * + *
            +       * Unstructured document information.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo unstructured_document_info = 1; + * + * + * @return The unstructuredDocumentInfo. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo + getUnstructuredDocumentInfo() { + if (unstructuredDocumentInfoBuilder_ == null) { + if (contentCase_ == 1) { + return (com.google.cloud.discoveryengine.v1beta.Answer.Reference + .UnstructuredDocumentInfo) + content_; + } + return com.google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo + .getDefaultInstance(); + } else { + if (contentCase_ == 1) { + return unstructuredDocumentInfoBuilder_.getMessage(); + } + return com.google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo + .getDefaultInstance(); + } + } - private void buildPartial0( - com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation - .SearchResult.ChunkInfo - result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.chunk_ = chunk_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.content_ = content_; - } - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000004) != 0)) { - result.relevanceScore_ = relevanceScore_; - to_bitField0_ |= 0x00000001; - } - result.bitField0_ |= to_bitField0_; - } + /** + * + * + *
            +       * Unstructured document information.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo unstructured_document_info = 1; + * + */ + public Builder setUnstructuredDocumentInfo( + com.google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo value) { + if (unstructuredDocumentInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + content_ = value; + onChanged(); + } else { + unstructuredDocumentInfoBuilder_.setMessage(value); + } + contentCase_ = 1; + return this; + } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other - instanceof - com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation - .SearchResult.ChunkInfo) { - return mergeFrom( - (com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation - .SearchResult.ChunkInfo) - other); - } else { - super.mergeFrom(other); - return this; - } - } + /** + * + * + *
            +       * Unstructured document information.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo unstructured_document_info = 1; + * + */ + public Builder setUnstructuredDocumentInfo( + com.google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo.Builder + builderForValue) { + if (unstructuredDocumentInfoBuilder_ == null) { + content_ = builderForValue.build(); + onChanged(); + } else { + unstructuredDocumentInfoBuilder_.setMessage(builderForValue.build()); + } + contentCase_ = 1; + return this; + } - public Builder mergeFrom( - com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation - .SearchResult.ChunkInfo - other) { - if (other - == com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation - .SearchResult.ChunkInfo.getDefaultInstance()) return this; - if (!other.getChunk().isEmpty()) { - chunk_ = other.chunk_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (!other.getContent().isEmpty()) { - content_ = other.content_; - bitField0_ |= 0x00000002; - onChanged(); - } - if (other.hasRelevanceScore()) { - setRelevanceScore(other.getRelevanceScore()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } + /** + * + * + *
            +       * Unstructured document information.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo unstructured_document_info = 1; + * + */ + public Builder mergeUnstructuredDocumentInfo( + com.google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo value) { + if (unstructuredDocumentInfoBuilder_ == null) { + if (contentCase_ == 1 + && content_ + != com.google.cloud.discoveryengine.v1beta.Answer.Reference + .UnstructuredDocumentInfo.getDefaultInstance()) { + content_ = + com.google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo + .newBuilder( + (com.google.cloud.discoveryengine.v1beta.Answer.Reference + .UnstructuredDocumentInfo) + content_) + .mergeFrom(value) + .buildPartial(); + } else { + content_ = value; + } + onChanged(); + } else { + if (contentCase_ == 1) { + unstructuredDocumentInfoBuilder_.mergeFrom(value); + } else { + unstructuredDocumentInfoBuilder_.setMessage(value); + } + } + contentCase_ = 1; + return this; + } - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - chunk_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: - { - content_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 29: - { - relevanceScore_ = input.readFloat(); - bitField0_ |= 0x00000004; - break; - } // case 29 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } + /** + * + * + *
            +       * Unstructured document information.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo unstructured_document_info = 1; + * + */ + public Builder clearUnstructuredDocumentInfo() { + if (unstructuredDocumentInfoBuilder_ == null) { + if (contentCase_ == 1) { + contentCase_ = 0; + content_ = null; + onChanged(); + } + } else { + if (contentCase_ == 1) { + contentCase_ = 0; + content_ = null; + } + unstructuredDocumentInfoBuilder_.clear(); + } + return this; + } - private int bitField0_; + /** + * + * + *
            +       * Unstructured document information.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo unstructured_document_info = 1; + * + */ + public com.google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo + .Builder + getUnstructuredDocumentInfoBuilder() { + return internalGetUnstructuredDocumentInfoFieldBuilder().getBuilder(); + } - private java.lang.Object chunk_ = ""; + /** + * + * + *
            +       * Unstructured document information.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo unstructured_document_info = 1; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Answer.Reference + .UnstructuredDocumentInfoOrBuilder + getUnstructuredDocumentInfoOrBuilder() { + if ((contentCase_ == 1) && (unstructuredDocumentInfoBuilder_ != null)) { + return unstructuredDocumentInfoBuilder_.getMessageOrBuilder(); + } else { + if (contentCase_ == 1) { + return (com.google.cloud.discoveryengine.v1beta.Answer.Reference + .UnstructuredDocumentInfo) + content_; + } + return com.google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo + .getDefaultInstance(); + } + } - /** - * - * - *
            -               * Chunk resource name.
            -               * 
            - * - * string chunk = 1; - * - * @return The chunk. - */ - public java.lang.String getChunk() { - java.lang.Object ref = chunk_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - chunk_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } + /** + * + * + *
            +       * Unstructured document information.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo unstructured_document_info = 1; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo, + com.google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo + .Builder, + com.google.cloud.discoveryengine.v1beta.Answer.Reference + .UnstructuredDocumentInfoOrBuilder> + internalGetUnstructuredDocumentInfoFieldBuilder() { + if (unstructuredDocumentInfoBuilder_ == null) { + if (!(contentCase_ == 1)) { + content_ = + com.google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo + .getDefaultInstance(); + } + unstructuredDocumentInfoBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo, + com.google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo + .Builder, + com.google.cloud.discoveryengine.v1beta.Answer.Reference + .UnstructuredDocumentInfoOrBuilder>( + (com.google.cloud.discoveryengine.v1beta.Answer.Reference + .UnstructuredDocumentInfo) + content_, + getParentForChildren(), + isClean()); + content_ = null; + } + contentCase_ = 1; + onChanged(); + return unstructuredDocumentInfoBuilder_; + } - /** - * - * - *
            -               * Chunk resource name.
            -               * 
            - * - * string chunk = 1; - * - * @return The bytes for chunk. - */ - public com.google.protobuf.ByteString getChunkBytes() { - java.lang.Object ref = chunk_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - chunk_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo, + com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo.Builder, + com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfoOrBuilder> + chunkInfoBuilder_; - /** - * - * - *
            -               * Chunk resource name.
            -               * 
            - * - * string chunk = 1; - * - * @param value The chunk to set. - * @return This builder for chaining. - */ - public Builder setChunk(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - chunk_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } + /** + * + * + *
            +       * Chunk information.
            +       * 
            + * + * .google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo chunk_info = 2; + * + * + * @return Whether the chunkInfo field is set. + */ + @java.lang.Override + public boolean hasChunkInfo() { + return contentCase_ == 2; + } - /** - * - * - *
            -               * Chunk resource name.
            -               * 
            - * - * string chunk = 1; - * - * @return This builder for chaining. - */ - public Builder clearChunk() { - chunk_ = getDefaultInstance().getChunk(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } + /** + * + * + *
            +       * Chunk information.
            +       * 
            + * + * .google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo chunk_info = 2; + * + * + * @return The chunkInfo. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo getChunkInfo() { + if (chunkInfoBuilder_ == null) { + if (contentCase_ == 2) { + return (com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo) content_; + } + return com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo + .getDefaultInstance(); + } else { + if (contentCase_ == 2) { + return chunkInfoBuilder_.getMessage(); + } + return com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo + .getDefaultInstance(); + } + } - /** - * - * - *
            -               * Chunk resource name.
            -               * 
            - * - * string chunk = 1; - * - * @param value The bytes for chunk to set. - * @return This builder for chaining. - */ - public Builder setChunkBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - chunk_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } + /** + * + * + *
            +       * Chunk information.
            +       * 
            + * + * .google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo chunk_info = 2; + * + */ + public Builder setChunkInfo( + com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo value) { + if (chunkInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + content_ = value; + onChanged(); + } else { + chunkInfoBuilder_.setMessage(value); + } + contentCase_ = 2; + return this; + } - private java.lang.Object content_ = ""; + /** + * + * + *
            +       * Chunk information.
            +       * 
            + * + * .google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo chunk_info = 2; + * + */ + public Builder setChunkInfo( + com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo.Builder + builderForValue) { + if (chunkInfoBuilder_ == null) { + content_ = builderForValue.build(); + onChanged(); + } else { + chunkInfoBuilder_.setMessage(builderForValue.build()); + } + contentCase_ = 2; + return this; + } - /** - * - * - *
            -               * Chunk textual content.
            -               * 
            - * - * string content = 2; - * - * @return The content. - */ - public java.lang.String getContent() { - java.lang.Object ref = content_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - content_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } + /** + * + * + *
            +       * Chunk information.
            +       * 
            + * + * .google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo chunk_info = 2; + * + */ + public Builder mergeChunkInfo( + com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo value) { + if (chunkInfoBuilder_ == null) { + if (contentCase_ == 2 + && content_ + != com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo + .getDefaultInstance()) { + content_ = + com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo.newBuilder( + (com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo) + content_) + .mergeFrom(value) + .buildPartial(); + } else { + content_ = value; + } + onChanged(); + } else { + if (contentCase_ == 2) { + chunkInfoBuilder_.mergeFrom(value); + } else { + chunkInfoBuilder_.setMessage(value); + } + } + contentCase_ = 2; + return this; + } - /** - * - * - *
            -               * Chunk textual content.
            -               * 
            - * - * string content = 2; - * - * @return The bytes for content. - */ - public com.google.protobuf.ByteString getContentBytes() { - java.lang.Object ref = content_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - content_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } + /** + * + * + *
            +       * Chunk information.
            +       * 
            + * + * .google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo chunk_info = 2; + * + */ + public Builder clearChunkInfo() { + if (chunkInfoBuilder_ == null) { + if (contentCase_ == 2) { + contentCase_ = 0; + content_ = null; + onChanged(); + } + } else { + if (contentCase_ == 2) { + contentCase_ = 0; + content_ = null; + } + chunkInfoBuilder_.clear(); + } + return this; + } - /** - * - * - *
            -               * Chunk textual content.
            -               * 
            - * - * string content = 2; - * - * @param value The content to set. - * @return This builder for chaining. - */ - public Builder setContent(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - content_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } + /** + * + * + *
            +       * Chunk information.
            +       * 
            + * + * .google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo chunk_info = 2; + * + */ + public com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo.Builder + getChunkInfoBuilder() { + return internalGetChunkInfoFieldBuilder().getBuilder(); + } - /** - * - * - *
            -               * Chunk textual content.
            -               * 
            - * - * string content = 2; - * - * @return This builder for chaining. - */ - public Builder clearContent() { - content_ = getDefaultInstance().getContent(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - - /** - * - * - *
            -               * Chunk textual content.
            -               * 
            - * - * string content = 2; - * - * @param value The bytes for content to set. - * @return This builder for chaining. - */ - public Builder setContentBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - content_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } + /** + * + * + *
            +       * Chunk information.
            +       * 
            + * + * .google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo chunk_info = 2; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfoOrBuilder + getChunkInfoOrBuilder() { + if ((contentCase_ == 2) && (chunkInfoBuilder_ != null)) { + return chunkInfoBuilder_.getMessageOrBuilder(); + } else { + if (contentCase_ == 2) { + return (com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo) content_; + } + return com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo + .getDefaultInstance(); + } + } - private float relevanceScore_; + /** + * + * + *
            +       * Chunk information.
            +       * 
            + * + * .google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo chunk_info = 2; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo, + com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo.Builder, + com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfoOrBuilder> + internalGetChunkInfoFieldBuilder() { + if (chunkInfoBuilder_ == null) { + if (!(contentCase_ == 2)) { + content_ = + com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo + .getDefaultInstance(); + } + chunkInfoBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo, + com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo.Builder, + com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfoOrBuilder>( + (com.google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo) content_, + getParentForChildren(), + isClean()); + content_ = null; + } + contentCase_ = 2; + onChanged(); + return chunkInfoBuilder_; + } - /** - * - * - *
            -               * The relevance of the chunk for a given query. Values range from
            -               * 0.0 (completely irrelevant) to 1.0 (completely relevant).
            -               * This value is for informational purpose only. It may change for
            -               * the same query and chunk at any time due to a model retraining or
            -               * change in implementation.
            -               * 
            - * - * optional float relevance_score = 3; - * - * @return Whether the relevanceScore field is set. - */ - @java.lang.Override - public boolean hasRelevanceScore() { - return ((bitField0_ & 0x00000004) != 0); - } + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.Answer.Reference.StructuredDocumentInfo, + com.google.cloud.discoveryengine.v1beta.Answer.Reference.StructuredDocumentInfo + .Builder, + com.google.cloud.discoveryengine.v1beta.Answer.Reference + .StructuredDocumentInfoOrBuilder> + structuredDocumentInfoBuilder_; - /** - * - * - *
            -               * The relevance of the chunk for a given query. Values range from
            -               * 0.0 (completely irrelevant) to 1.0 (completely relevant).
            -               * This value is for informational purpose only. It may change for
            -               * the same query and chunk at any time due to a model retraining or
            -               * change in implementation.
            -               * 
            - * - * optional float relevance_score = 3; - * - * @return The relevanceScore. - */ - @java.lang.Override - public float getRelevanceScore() { - return relevanceScore_; - } + /** + * + * + *
            +       * Structured document information.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Answer.Reference.StructuredDocumentInfo structured_document_info = 3; + * + * + * @return Whether the structuredDocumentInfo field is set. + */ + @java.lang.Override + public boolean hasStructuredDocumentInfo() { + return contentCase_ == 3; + } - /** - * - * - *
            -               * The relevance of the chunk for a given query. Values range from
            -               * 0.0 (completely irrelevant) to 1.0 (completely relevant).
            -               * This value is for informational purpose only. It may change for
            -               * the same query and chunk at any time due to a model retraining or
            -               * change in implementation.
            -               * 
            - * - * optional float relevance_score = 3; - * - * @param value The relevanceScore to set. - * @return This builder for chaining. - */ - public Builder setRelevanceScore(float value) { + /** + * + * + *
            +       * Structured document information.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Answer.Reference.StructuredDocumentInfo structured_document_info = 3; + * + * + * @return The structuredDocumentInfo. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Answer.Reference.StructuredDocumentInfo + getStructuredDocumentInfo() { + if (structuredDocumentInfoBuilder_ == null) { + if (contentCase_ == 3) { + return (com.google.cloud.discoveryengine.v1beta.Answer.Reference.StructuredDocumentInfo) + content_; + } + return com.google.cloud.discoveryengine.v1beta.Answer.Reference.StructuredDocumentInfo + .getDefaultInstance(); + } else { + if (contentCase_ == 3) { + return structuredDocumentInfoBuilder_.getMessage(); + } + return com.google.cloud.discoveryengine.v1beta.Answer.Reference.StructuredDocumentInfo + .getDefaultInstance(); + } + } - relevanceScore_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } + /** + * + * + *
            +       * Structured document information.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Answer.Reference.StructuredDocumentInfo structured_document_info = 3; + * + */ + public Builder setStructuredDocumentInfo( + com.google.cloud.discoveryengine.v1beta.Answer.Reference.StructuredDocumentInfo value) { + if (structuredDocumentInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + content_ = value; + onChanged(); + } else { + structuredDocumentInfoBuilder_.setMessage(value); + } + contentCase_ = 3; + return this; + } - /** - * - * - *
            -               * The relevance of the chunk for a given query. Values range from
            -               * 0.0 (completely irrelevant) to 1.0 (completely relevant).
            -               * This value is for informational purpose only. It may change for
            -               * the same query and chunk at any time due to a model retraining or
            -               * change in implementation.
            -               * 
            - * - * optional float relevance_score = 3; - * - * @return This builder for chaining. - */ - public Builder clearRelevanceScore() { - bitField0_ = (bitField0_ & ~0x00000004); - relevanceScore_ = 0F; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult.ChunkInfo) - } + /** + * + * + *
            +       * Structured document information.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Answer.Reference.StructuredDocumentInfo structured_document_info = 3; + * + */ + public Builder setStructuredDocumentInfo( + com.google.cloud.discoveryengine.v1beta.Answer.Reference.StructuredDocumentInfo.Builder + builderForValue) { + if (structuredDocumentInfoBuilder_ == null) { + content_ = builderForValue.build(); + onChanged(); + } else { + structuredDocumentInfoBuilder_.setMessage(builderForValue.build()); + } + contentCase_ = 3; + return this; + } - // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult.ChunkInfo) - private static final com.google.cloud.discoveryengine.v1beta.Answer.Step.Action - .Observation.SearchResult.ChunkInfo - DEFAULT_INSTANCE; + /** + * + * + *
            +       * Structured document information.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Answer.Reference.StructuredDocumentInfo structured_document_info = 3; + * + */ + public Builder mergeStructuredDocumentInfo( + com.google.cloud.discoveryengine.v1beta.Answer.Reference.StructuredDocumentInfo value) { + if (structuredDocumentInfoBuilder_ == null) { + if (contentCase_ == 3 + && content_ + != com.google.cloud.discoveryengine.v1beta.Answer.Reference.StructuredDocumentInfo + .getDefaultInstance()) { + content_ = + com.google.cloud.discoveryengine.v1beta.Answer.Reference.StructuredDocumentInfo + .newBuilder( + (com.google.cloud.discoveryengine.v1beta.Answer.Reference + .StructuredDocumentInfo) + content_) + .mergeFrom(value) + .buildPartial(); + } else { + content_ = value; + } + onChanged(); + } else { + if (contentCase_ == 3) { + structuredDocumentInfoBuilder_.mergeFrom(value); + } else { + structuredDocumentInfoBuilder_.setMessage(value); + } + } + contentCase_ = 3; + return this; + } - static { - DEFAULT_INSTANCE = - new com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation - .SearchResult.ChunkInfo(); - } + /** + * + * + *
            +       * Structured document information.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Answer.Reference.StructuredDocumentInfo structured_document_info = 3; + * + */ + public Builder clearStructuredDocumentInfo() { + if (structuredDocumentInfoBuilder_ == null) { + if (contentCase_ == 3) { + contentCase_ = 0; + content_ = null; + onChanged(); + } + } else { + if (contentCase_ == 3) { + contentCase_ = 0; + content_ = null; + } + structuredDocumentInfoBuilder_.clear(); + } + return this; + } - public static com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation - .SearchResult.ChunkInfo - getDefaultInstance() { - return DEFAULT_INSTANCE; - } + /** + * + * + *
            +       * Structured document information.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Answer.Reference.StructuredDocumentInfo structured_document_info = 3; + * + */ + public com.google.cloud.discoveryengine.v1beta.Answer.Reference.StructuredDocumentInfo.Builder + getStructuredDocumentInfoBuilder() { + return internalGetStructuredDocumentInfoFieldBuilder().getBuilder(); + } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ChunkInfo parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException() - .setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; + /** + * + * + *
            +       * Structured document information.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Answer.Reference.StructuredDocumentInfo structured_document_info = 3; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Answer.Reference + .StructuredDocumentInfoOrBuilder + getStructuredDocumentInfoOrBuilder() { + if ((contentCase_ == 3) && (structuredDocumentInfoBuilder_ != null)) { + return structuredDocumentInfoBuilder_.getMessageOrBuilder(); + } else { + if (contentCase_ == 3) { + return (com.google.cloud.discoveryengine.v1beta.Answer.Reference.StructuredDocumentInfo) + content_; + } + return com.google.cloud.discoveryengine.v1beta.Answer.Reference.StructuredDocumentInfo + .getDefaultInstance(); + } + } - public static com.google.protobuf.Parser parser() { - return PARSER; - } + /** + * + * + *
            +       * Structured document information.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Answer.Reference.StructuredDocumentInfo structured_document_info = 3; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.Answer.Reference.StructuredDocumentInfo, + com.google.cloud.discoveryengine.v1beta.Answer.Reference.StructuredDocumentInfo + .Builder, + com.google.cloud.discoveryengine.v1beta.Answer.Reference + .StructuredDocumentInfoOrBuilder> + internalGetStructuredDocumentInfoFieldBuilder() { + if (structuredDocumentInfoBuilder_ == null) { + if (!(contentCase_ == 3)) { + content_ = + com.google.cloud.discoveryengine.v1beta.Answer.Reference.StructuredDocumentInfo + .getDefaultInstance(); + } + structuredDocumentInfoBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.Answer.Reference.StructuredDocumentInfo, + com.google.cloud.discoveryengine.v1beta.Answer.Reference.StructuredDocumentInfo + .Builder, + com.google.cloud.discoveryengine.v1beta.Answer.Reference + .StructuredDocumentInfoOrBuilder>( + (com.google.cloud.discoveryengine.v1beta.Answer.Reference.StructuredDocumentInfo) + content_, + getParentForChildren(), + isClean()); + content_ = null; + } + contentCase_ = 3; + onChanged(); + return structuredDocumentInfoBuilder_; + } - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.Answer.Reference) + } - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation - .SearchResult.ChunkInfo - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - } + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.Answer.Reference) + private static final com.google.cloud.discoveryengine.v1beta.Answer.Reference DEFAULT_INSTANCE; - private int bitField0_; - public static final int DOCUMENT_FIELD_NUMBER = 1; + static { + DEFAULT_INSTANCE = new com.google.cloud.discoveryengine.v1beta.Answer.Reference(); + } - @SuppressWarnings("serial") - private volatile java.lang.Object document_ = ""; + public static com.google.cloud.discoveryengine.v1beta.Answer.Reference getDefaultInstance() { + return DEFAULT_INSTANCE; + } - /** - * - * - *
            -           * Document resource name.
            -           * 
            - * - * string document = 1; - * - * @return The document. - */ + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { @java.lang.Override - public java.lang.String getDocument() { - java.lang.Object ref = document_; - 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(); - document_ = s; - return s; + public Reference parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); } + return builder.buildPartial(); } + }; - /** - * - * - *
            -           * Document resource name.
            -           * 
            - * - * string document = 1; - * - * @return The bytes for document. - */ - @java.lang.Override - public com.google.protobuf.ByteString getDocumentBytes() { - java.lang.Object ref = document_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - document_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } + public static com.google.protobuf.Parser parser() { + return PARSER; + } - public static final int URI_FIELD_NUMBER = 2; + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } - @SuppressWarnings("serial") - private volatile java.lang.Object uri_ = ""; + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Answer.Reference getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } - /** - * - * - *
            -           * URI for the document.
            -           * 
            - * - * string uri = 2; - * - * @return The uri. - */ - @java.lang.Override - public java.lang.String getUri() { - java.lang.Object ref = uri_; - 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(); - uri_ = s; - return s; - } - } + public interface BlobAttachmentOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.Answer.BlobAttachment) + com.google.protobuf.MessageOrBuilder { - /** - * - * - *
            -           * URI for the document.
            -           * 
            - * - * string uri = 2; - * - * @return The bytes for uri. - */ - @java.lang.Override - public com.google.protobuf.ByteString getUriBytes() { - java.lang.Object ref = uri_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - uri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } + /** + * + * + *
            +     * Output only. The mime type and data of the blob.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Answer.BlobAttachment.Blob data = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the data field is set. + */ + boolean hasData(); - public static final int TITLE_FIELD_NUMBER = 3; + /** + * + * + *
            +     * Output only. The mime type and data of the blob.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Answer.BlobAttachment.Blob data = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The data. + */ + com.google.cloud.discoveryengine.v1beta.Answer.BlobAttachment.Blob getData(); - @SuppressWarnings("serial") - private volatile java.lang.Object title_ = ""; + /** + * + * + *
            +     * Output only. The mime type and data of the blob.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Answer.BlobAttachment.Blob data = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.discoveryengine.v1beta.Answer.BlobAttachment.BlobOrBuilder getDataOrBuilder(); - /** - * - * - *
            -           * Title.
            -           * 
            - * - * string title = 3; - * - * @return The title. - */ - @java.lang.Override - public java.lang.String getTitle() { - java.lang.Object ref = title_; - 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(); - title_ = s; - return s; - } - } + /** + * + * + *
            +     * Output only. The attribution type of the blob.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Answer.BlobAttachment.AttributionType attribution_type = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for attributionType. + */ + int getAttributionTypeValue(); - /** - * - * - *
            -           * Title.
            -           * 
            - * - * string title = 3; - * - * @return The bytes for title. - */ - @java.lang.Override - public com.google.protobuf.ByteString getTitleBytes() { - java.lang.Object ref = title_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - title_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } + /** + * + * + *
            +     * Output only. The attribution type of the blob.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Answer.BlobAttachment.AttributionType attribution_type = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The attributionType. + */ + com.google.cloud.discoveryengine.v1beta.Answer.BlobAttachment.AttributionType + getAttributionType(); + } - public static final int SNIPPET_INFO_FIELD_NUMBER = 4; + /** + * + * + *
            +   * Stores binarydata attached to text answer, e.g. image, video, audio, etc.
            +   * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.Answer.BlobAttachment} + */ + public static final class BlobAttachment extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.Answer.BlobAttachment) + BlobAttachmentOrBuilder { + private static final long serialVersionUID = 0L; - @SuppressWarnings("serial") - private java.util.List< - com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation - .SearchResult.SnippetInfo> - snippetInfo_; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "BlobAttachment"); + } - /** - * - * - *
            -           * If citation_type is DOCUMENT_LEVEL_CITATION, populate document
            -           * level snippets.
            -           * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult.SnippetInfo snippet_info = 4; - * - */ - @java.lang.Override - public java.util.List< - com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation - .SearchResult.SnippetInfo> - getSnippetInfoList() { - return snippetInfo_; - } + // Use BlobAttachment.newBuilder() to construct. + private BlobAttachment(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } - /** - * - * - *
            -           * If citation_type is DOCUMENT_LEVEL_CITATION, populate document
            -           * level snippets.
            -           * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult.SnippetInfo snippet_info = 4; - * - */ - @java.lang.Override - public java.util.List< - ? extends - com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation - .SearchResult.SnippetInfoOrBuilder> - getSnippetInfoOrBuilderList() { - return snippetInfo_; - } - - /** - * - * - *
            -           * If citation_type is DOCUMENT_LEVEL_CITATION, populate document
            -           * level snippets.
            -           * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult.SnippetInfo snippet_info = 4; - * - */ - @java.lang.Override - public int getSnippetInfoCount() { - return snippetInfo_.size(); - } - - /** - * - * - *
            -           * If citation_type is DOCUMENT_LEVEL_CITATION, populate document
            -           * level snippets.
            -           * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult.SnippetInfo snippet_info = 4; - * - */ - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult - .SnippetInfo - getSnippetInfo(int index) { - return snippetInfo_.get(index); - } + private BlobAttachment() { + attributionType_ = 0; + } - /** - * - * - *
            -           * If citation_type is DOCUMENT_LEVEL_CITATION, populate document
            -           * level snippets.
            -           * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult.SnippetInfo snippet_info = 4; - * - */ - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult - .SnippetInfoOrBuilder - getSnippetInfoOrBuilder(int index) { - return snippetInfo_.get(index); - } + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.AnswerProto + .internal_static_google_cloud_discoveryengine_v1beta_Answer_BlobAttachment_descriptor; + } - public static final int CHUNK_INFO_FIELD_NUMBER = 5; + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.AnswerProto + .internal_static_google_cloud_discoveryengine_v1beta_Answer_BlobAttachment_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.Answer.BlobAttachment.class, + com.google.cloud.discoveryengine.v1beta.Answer.BlobAttachment.Builder.class); + } - @SuppressWarnings("serial") - private java.util.List< - com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation - .SearchResult.ChunkInfo> - chunkInfo_; + /** + * + * + *
            +     * The source of the blob.
            +     * 
            + * + * Protobuf enum {@code + * google.cloud.discoveryengine.v1beta.Answer.BlobAttachment.AttributionType} + */ + public enum AttributionType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
            +       * Unspecified attribution type.
            +       * 
            + * + * ATTRIBUTION_TYPE_UNSPECIFIED = 0; + */ + ATTRIBUTION_TYPE_UNSPECIFIED(0), + /** + * + * + *
            +       * The attachment data is from the corpus.
            +       * 
            + * + * CORPUS = 1; + */ + CORPUS(1), + /** + * + * + *
            +       * The attachment data is generated by the model through code
            +       * generation.
            +       * 
            + * + * GENERATED = 2; + */ + GENERATED(2), + UNRECOGNIZED(-1), + ; - /** - * - * - *
            -           * If citation_type is CHUNK_LEVEL_CITATION and chunk mode is on,
            -           * populate chunk info.
            -           * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult.ChunkInfo chunk_info = 5; - * - */ - @java.lang.Override - public java.util.List< - com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation - .SearchResult.ChunkInfo> - getChunkInfoList() { - return chunkInfo_; - } + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "AttributionType"); + } - /** - * - * - *
            -           * If citation_type is CHUNK_LEVEL_CITATION and chunk mode is on,
            -           * populate chunk info.
            -           * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult.ChunkInfo chunk_info = 5; - * - */ - @java.lang.Override - public java.util.List< - ? extends - com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation - .SearchResult.ChunkInfoOrBuilder> - getChunkInfoOrBuilderList() { - return chunkInfo_; - } + /** + * + * + *
            +       * Unspecified attribution type.
            +       * 
            + * + * ATTRIBUTION_TYPE_UNSPECIFIED = 0; + */ + public static final int ATTRIBUTION_TYPE_UNSPECIFIED_VALUE = 0; - /** - * - * - *
            -           * If citation_type is CHUNK_LEVEL_CITATION and chunk mode is on,
            -           * populate chunk info.
            -           * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult.ChunkInfo chunk_info = 5; - * - */ - @java.lang.Override - public int getChunkInfoCount() { - return chunkInfo_.size(); - } + /** + * + * + *
            +       * The attachment data is from the corpus.
            +       * 
            + * + * CORPUS = 1; + */ + public static final int CORPUS_VALUE = 1; - /** - * - * - *
            -           * If citation_type is CHUNK_LEVEL_CITATION and chunk mode is on,
            -           * populate chunk info.
            -           * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult.ChunkInfo chunk_info = 5; - * - */ - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult - .ChunkInfo - getChunkInfo(int index) { - return chunkInfo_.get(index); - } + /** + * + * + *
            +       * The attachment data is generated by the model through code
            +       * generation.
            +       * 
            + * + * GENERATED = 2; + */ + public static final int GENERATED_VALUE = 2; - /** - * - * - *
            -           * If citation_type is CHUNK_LEVEL_CITATION and chunk mode is on,
            -           * populate chunk info.
            -           * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult.ChunkInfo chunk_info = 5; - * - */ - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult - .ChunkInfoOrBuilder - getChunkInfoOrBuilder(int index) { - return chunkInfo_.get(index); - } + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } - public static final int STRUCT_DATA_FIELD_NUMBER = 6; - private com.google.protobuf.Struct structData_; + /** + * @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 AttributionType valueOf(int value) { + return forNumber(value); + } - /** - * - * - *
            -           * Data representation.
            -           * The structured JSON data for the document.
            -           * It's populated from the struct data from the Document, or the
            -           * Chunk in search result.
            -           * 
            - * - * .google.protobuf.Struct struct_data = 6; - * - * @return Whether the structData field is set. - */ - @java.lang.Override - public boolean hasStructData() { - return ((bitField0_ & 0x00000001) != 0); - } - - /** - * - * - *
            -           * Data representation.
            -           * The structured JSON data for the document.
            -           * It's populated from the struct data from the Document, or the
            -           * Chunk in search result.
            -           * 
            - * - * .google.protobuf.Struct struct_data = 6; - * - * @return The structData. - */ - @java.lang.Override - public com.google.protobuf.Struct getStructData() { - return structData_ == null - ? com.google.protobuf.Struct.getDefaultInstance() - : structData_; - } + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static AttributionType forNumber(int value) { + switch (value) { + case 0: + return ATTRIBUTION_TYPE_UNSPECIFIED; + case 1: + return CORPUS; + case 2: + return GENERATED; + default: + return null; + } + } - /** - * - * - *
            -           * Data representation.
            -           * The structured JSON data for the document.
            -           * It's populated from the struct data from the Document, or the
            -           * Chunk in search result.
            -           * 
            - * - * .google.protobuf.Struct struct_data = 6; - */ - @java.lang.Override - public com.google.protobuf.StructOrBuilder getStructDataOrBuilder() { - return structData_ == null - ? com.google.protobuf.Struct.getDefaultInstance() - : structData_; - } + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } - private byte memoizedIsInitialized = -1; + private static final com.google.protobuf.Internal.EnumLiteMap + internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public AttributionType findValueByNumber(int number) { + return AttributionType.forNumber(number); + } + }; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } - memoizedIsInitialized = 1; - return true; - } + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(document_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, document_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(uri_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 2, uri_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(title_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 3, title_); - } - for (int i = 0; i < snippetInfo_.size(); i++) { - output.writeMessage(4, snippetInfo_.get(i)); - } - for (int i = 0; i < chunkInfo_.size(); i++) { - output.writeMessage(5, chunkInfo_.get(i)); - } - if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(6, getStructData()); - } - getUnknownFields().writeTo(output); - } + public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.Answer.BlobAttachment.getDescriptor() + .getEnumTypes() + .get(0); + } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; + private static final AttributionType[] VALUES = values(); - size = 0; - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(document_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, document_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(uri_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(2, uri_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(title_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(3, title_); - } - for (int i = 0; i < snippetInfo_.size(); i++) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize(4, snippetInfo_.get(i)); - } - for (int i = 0; i < chunkInfo_.size(); i++) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize(5, chunkInfo_.get(i)); - } - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getStructData()); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } + public static AttributionType valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj - instanceof - com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation - .SearchResult)) { - return super.equals(obj); - } - com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult - other = - (com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation - .SearchResult) - obj; + private final int value; - if (!getDocument().equals(other.getDocument())) return false; - if (!getUri().equals(other.getUri())) return false; - if (!getTitle().equals(other.getTitle())) return false; - if (!getSnippetInfoList().equals(other.getSnippetInfoList())) return false; - if (!getChunkInfoList().equals(other.getChunkInfoList())) return false; - if (hasStructData() != other.hasStructData()) return false; - if (hasStructData()) { - if (!getStructData().equals(other.getStructData())) return false; - } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } + private AttributionType(int value) { + this.value = value; + } - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + DOCUMENT_FIELD_NUMBER; - hash = (53 * hash) + getDocument().hashCode(); - hash = (37 * hash) + URI_FIELD_NUMBER; - hash = (53 * hash) + getUri().hashCode(); - hash = (37 * hash) + TITLE_FIELD_NUMBER; - hash = (53 * hash) + getTitle().hashCode(); - if (getSnippetInfoCount() > 0) { - hash = (37 * hash) + SNIPPET_INFO_FIELD_NUMBER; - hash = (53 * hash) + getSnippetInfoList().hashCode(); - } - if (getChunkInfoCount() > 0) { - hash = (37 * hash) + CHUNK_INFO_FIELD_NUMBER; - hash = (53 * hash) + getChunkInfoList().hashCode(); - } - if (hasStructData()) { - hash = (37 * hash) + STRUCT_DATA_FIELD_NUMBER; - hash = (53 * hash) + getStructData().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } + // @@protoc_insertion_point(enum_scope:google.cloud.discoveryengine.v1beta.Answer.BlobAttachment.AttributionType) + } - public static com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation - .SearchResult - parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } + public interface BlobOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.Answer.BlobAttachment.Blob) + com.google.protobuf.MessageOrBuilder { - public static com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation - .SearchResult - parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } + /** + * + * + *
            +       * Output only. The media type (MIME type) of the generated or retrieved
            +       * data.
            +       * 
            + * + * string mime_type = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The mimeType. + */ + java.lang.String getMimeType(); - public static com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation - .SearchResult - parseFrom(com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } + /** + * + * + *
            +       * Output only. The media type (MIME type) of the generated or retrieved
            +       * data.
            +       * 
            + * + * string mime_type = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for mimeType. + */ + com.google.protobuf.ByteString getMimeTypeBytes(); - public static com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation - .SearchResult - parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } + /** + * + * + *
            +       * Output only. Raw bytes.
            +       * 
            + * + * bytes data = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The data. + */ + com.google.protobuf.ByteString getData(); + } - public static com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation - .SearchResult - parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } + /** + * + * + *
            +     * The media type and data of the blob.
            +     * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.Answer.BlobAttachment.Blob} + */ + public static final class Blob extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.Answer.BlobAttachment.Blob) + BlobOrBuilder { + private static final long serialVersionUID = 0L; - public static com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation - .SearchResult - parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Blob"); + } - public static com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation - .SearchResult - parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } + // Use Blob.newBuilder() to construct. + private Blob(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } - public static com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation - .SearchResult - parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } + private Blob() { + mimeType_ = ""; + data_ = com.google.protobuf.ByteString.EMPTY; + } - public static com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation - .SearchResult - parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input); - } + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.AnswerProto + .internal_static_google_cloud_discoveryengine_v1beta_Answer_BlobAttachment_Blob_descriptor; + } - public static com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation - .SearchResult - parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.AnswerProto + .internal_static_google_cloud_discoveryengine_v1beta_Answer_BlobAttachment_Blob_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.Answer.BlobAttachment.Blob.class, + com.google.cloud.discoveryengine.v1beta.Answer.BlobAttachment.Blob.Builder.class); + } - public static com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation - .SearchResult - parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } + public static final int MIME_TYPE_FIELD_NUMBER = 1; - public static com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation - .SearchResult - parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } + @SuppressWarnings("serial") + private volatile java.lang.Object mimeType_ = ""; - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } + /** + * + * + *
            +       * Output only. The media type (MIME type) of the generated or retrieved
            +       * data.
            +       * 
            + * + * string mime_type = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The mimeType. + */ + @java.lang.Override + public java.lang.String getMimeType() { + java.lang.Object ref = mimeType_; + 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(); + mimeType_ = s; + return s; + } + } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } + /** + * + * + *
            +       * Output only. The media type (MIME type) of the generated or retrieved
            +       * data.
            +       * 
            + * + * string mime_type = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for mimeType. + */ + @java.lang.Override + public com.google.protobuf.ByteString getMimeTypeBytes() { + java.lang.Object ref = mimeType_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + mimeType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } - public static Builder newBuilder( - com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult - prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } + public static final int DATA_FIELD_NUMBER = 2; + private com.google.protobuf.ByteString data_ = com.google.protobuf.ByteString.EMPTY; - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } + /** + * + * + *
            +       * Output only. Raw bytes.
            +       * 
            + * + * bytes data = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The data. + */ + @java.lang.Override + public com.google.protobuf.ByteString getData() { + return data_; + } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } + private byte memoizedIsInitialized = -1; - /** - * Protobuf type {@code - * google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult} - */ - public static final class Builder - extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult) - com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation - .SearchResultOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.discoveryengine.v1beta.AnswerProto - .internal_static_google_cloud_discoveryengine_v1beta_Answer_Step_Action_Observation_SearchResult_descriptor; - } + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.discoveryengine.v1beta.AnswerProto - .internal_static_google_cloud_discoveryengine_v1beta_Answer_Step_Action_Observation_SearchResult_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation - .SearchResult.class, - com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation - .SearchResult.Builder.class); - } + memoizedIsInitialized = 1; + return true; + } - // Construct using - // com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(mimeType_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, mimeType_); + } + if (!data_.isEmpty()) { + output.writeBytes(2, data_); + } + getUnknownFields().writeTo(output); + } - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - internalGetSnippetInfoFieldBuilder(); - internalGetChunkInfoFieldBuilder(); - internalGetStructDataFieldBuilder(); - } - } + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(mimeType_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, mimeType_); + } + if (!data_.isEmpty()) { + size += com.google.protobuf.CodedOutputStream.computeBytesSize(2, data_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - document_ = ""; - uri_ = ""; - title_ = ""; - if (snippetInfoBuilder_ == null) { - snippetInfo_ = java.util.Collections.emptyList(); - } else { - snippetInfo_ = null; - snippetInfoBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000008); - if (chunkInfoBuilder_ == null) { - chunkInfo_ = java.util.Collections.emptyList(); - } else { - chunkInfo_ = null; - chunkInfoBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000010); - structData_ = null; - if (structDataBuilder_ != null) { - structDataBuilder_.dispose(); - structDataBuilder_ = null; - } - return this; - } + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.discoveryengine.v1beta.Answer.BlobAttachment.Blob)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1beta.Answer.BlobAttachment.Blob other = + (com.google.cloud.discoveryengine.v1beta.Answer.BlobAttachment.Blob) obj; - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.discoveryengine.v1beta.AnswerProto - .internal_static_google_cloud_discoveryengine_v1beta_Answer_Step_Action_Observation_SearchResult_descriptor; - } + if (!getMimeType().equals(other.getMimeType())) return false; + if (!getData().equals(other.getData())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation - .SearchResult - getDefaultInstanceForType() { - return com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation - .SearchResult.getDefaultInstance(); - } + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + MIME_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getMimeType().hashCode(); + hash = (37 * hash) + DATA_FIELD_NUMBER; + hash = (53 * hash) + getData().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation - .SearchResult - build() { - com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult - result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } + public static com.google.cloud.discoveryengine.v1beta.Answer.BlobAttachment.Blob parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation - .SearchResult - buildPartial() { - com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult - result = - new com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation - .SearchResult(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } + public static com.google.cloud.discoveryengine.v1beta.Answer.BlobAttachment.Blob parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - private void buildPartialRepeatedFields( - com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult - result) { - if (snippetInfoBuilder_ == null) { - if (((bitField0_ & 0x00000008) != 0)) { - snippetInfo_ = java.util.Collections.unmodifiableList(snippetInfo_); - bitField0_ = (bitField0_ & ~0x00000008); - } - result.snippetInfo_ = snippetInfo_; - } else { - result.snippetInfo_ = snippetInfoBuilder_.build(); - } - if (chunkInfoBuilder_ == null) { - if (((bitField0_ & 0x00000010) != 0)) { - chunkInfo_ = java.util.Collections.unmodifiableList(chunkInfo_); - bitField0_ = (bitField0_ & ~0x00000010); - } - result.chunkInfo_ = chunkInfo_; - } else { - result.chunkInfo_ = chunkInfoBuilder_.build(); - } - } + public static com.google.cloud.discoveryengine.v1beta.Answer.BlobAttachment.Blob parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - private void buildPartial0( - com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult - result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.document_ = document_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.uri_ = uri_; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.title_ = title_; - } - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000020) != 0)) { - result.structData_ = - structDataBuilder_ == null ? structData_ : structDataBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - result.bitField0_ |= to_bitField0_; - } + public static com.google.cloud.discoveryengine.v1beta.Answer.BlobAttachment.Blob parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other - instanceof - com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation - .SearchResult) { - return mergeFrom( - (com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation - .SearchResult) - other); - } else { - super.mergeFrom(other); - return this; - } - } + public static com.google.cloud.discoveryengine.v1beta.Answer.BlobAttachment.Blob parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - public Builder mergeFrom( - com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult - other) { - if (other - == com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation - .SearchResult.getDefaultInstance()) return this; - if (!other.getDocument().isEmpty()) { - document_ = other.document_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (!other.getUri().isEmpty()) { - uri_ = other.uri_; - bitField0_ |= 0x00000002; - onChanged(); - } - if (!other.getTitle().isEmpty()) { - title_ = other.title_; - bitField0_ |= 0x00000004; - onChanged(); - } - if (snippetInfoBuilder_ == null) { - if (!other.snippetInfo_.isEmpty()) { - if (snippetInfo_.isEmpty()) { - snippetInfo_ = other.snippetInfo_; - bitField0_ = (bitField0_ & ~0x00000008); - } else { - ensureSnippetInfoIsMutable(); - snippetInfo_.addAll(other.snippetInfo_); - } - onChanged(); - } - } else { - if (!other.snippetInfo_.isEmpty()) { - if (snippetInfoBuilder_.isEmpty()) { - snippetInfoBuilder_.dispose(); - snippetInfoBuilder_ = null; - snippetInfo_ = other.snippetInfo_; - bitField0_ = (bitField0_ & ~0x00000008); - snippetInfoBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders - ? internalGetSnippetInfoFieldBuilder() - : null; - } else { - snippetInfoBuilder_.addAllMessages(other.snippetInfo_); - } - } - } - if (chunkInfoBuilder_ == null) { - if (!other.chunkInfo_.isEmpty()) { - if (chunkInfo_.isEmpty()) { - chunkInfo_ = other.chunkInfo_; - bitField0_ = (bitField0_ & ~0x00000010); - } else { - ensureChunkInfoIsMutable(); - chunkInfo_.addAll(other.chunkInfo_); - } - onChanged(); - } - } else { - if (!other.chunkInfo_.isEmpty()) { - if (chunkInfoBuilder_.isEmpty()) { - chunkInfoBuilder_.dispose(); - chunkInfoBuilder_ = null; - chunkInfo_ = other.chunkInfo_; - bitField0_ = (bitField0_ & ~0x00000010); - chunkInfoBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders - ? internalGetChunkInfoFieldBuilder() - : null; - } else { - chunkInfoBuilder_.addAllMessages(other.chunkInfo_); - } - } - } - if (other.hasStructData()) { - mergeStructData(other.getStructData()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } + public static com.google.cloud.discoveryengine.v1beta.Answer.BlobAttachment.Blob parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - @java.lang.Override - public final boolean isInitialized() { - return true; - } + public static com.google.cloud.discoveryengine.v1beta.Answer.BlobAttachment.Blob parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - document_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: - { - uri_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 26: - { - title_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - break; - } // case 26 - case 34: - { - com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation - .SearchResult.SnippetInfo - m = - input.readMessage( - com.google.cloud.discoveryengine.v1beta.Answer.Step.Action - .Observation.SearchResult.SnippetInfo.parser(), - extensionRegistry); - if (snippetInfoBuilder_ == null) { - ensureSnippetInfoIsMutable(); - snippetInfo_.add(m); - } else { - snippetInfoBuilder_.addMessage(m); - } - break; - } // case 34 - case 42: - { - com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation - .SearchResult.ChunkInfo - m = - input.readMessage( - com.google.cloud.discoveryengine.v1beta.Answer.Step.Action - .Observation.SearchResult.ChunkInfo.parser(), - extensionRegistry); - if (chunkInfoBuilder_ == null) { - ensureChunkInfoIsMutable(); - chunkInfo_.add(m); - } else { - chunkInfoBuilder_.addMessage(m); - } - break; - } // case 42 - case 50: - { - input.readMessage( - internalGetStructDataFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000020; - break; - } // case 50 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } + public static com.google.cloud.discoveryengine.v1beta.Answer.BlobAttachment.Blob parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } - private int bitField0_; + public static com.google.cloud.discoveryengine.v1beta.Answer.BlobAttachment.Blob + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } - private java.lang.Object document_ = ""; + public static com.google.cloud.discoveryengine.v1beta.Answer.BlobAttachment.Blob + parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } - /** - * - * - *
            -             * Document resource name.
            -             * 
            - * - * string document = 1; - * - * @return The document. - */ - public java.lang.String getDocument() { - java.lang.Object ref = document_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - document_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } + public static com.google.cloud.discoveryengine.v1beta.Answer.BlobAttachment.Blob parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } - /** - * - * - *
            -             * Document resource name.
            -             * 
            - * - * string document = 1; - * - * @return The bytes for document. - */ - public com.google.protobuf.ByteString getDocumentBytes() { - java.lang.Object ref = document_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - document_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } + public static com.google.cloud.discoveryengine.v1beta.Answer.BlobAttachment.Blob parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } - /** - * - * - *
            -             * Document resource name.
            -             * 
            - * - * string document = 1; - * - * @param value The document to set. - * @return This builder for chaining. - */ - public Builder setDocument(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - document_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } - /** - * - * - *
            -             * Document resource name.
            -             * 
            - * - * string document = 1; - * - * @return This builder for chaining. - */ - public Builder clearDocument() { - document_ = getDefaultInstance().getDocument(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } - /** - * - * - *
            -             * Document resource name.
            -             * 
            - * - * string document = 1; - * - * @param value The bytes for document to set. - * @return This builder for chaining. - */ - public Builder setDocumentBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - document_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } + public static Builder newBuilder( + com.google.cloud.discoveryengine.v1beta.Answer.BlobAttachment.Blob prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } - private java.lang.Object uri_ = ""; + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } - /** - * - * - *
            -             * URI for the document.
            -             * 
            - * - * string uri = 2; - * - * @return The uri. - */ - public java.lang.String getUri() { - java.lang.Object ref = uri_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - uri_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } - /** - * - * - *
            -             * URI for the document.
            -             * 
            - * - * string uri = 2; - * - * @return The bytes for uri. - */ - public com.google.protobuf.ByteString getUriBytes() { - java.lang.Object ref = uri_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - uri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - /** - * - * - *
            -             * URI for the document.
            -             * 
            - * - * string uri = 2; - * - * @param value The uri to set. - * @return This builder for chaining. - */ - public Builder setUri(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - uri_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } + /** + * + * + *
            +       * The media type and data of the blob.
            +       * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.Answer.BlobAttachment.Blob} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.Answer.BlobAttachment.Blob) + com.google.cloud.discoveryengine.v1beta.Answer.BlobAttachment.BlobOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.AnswerProto + .internal_static_google_cloud_discoveryengine_v1beta_Answer_BlobAttachment_Blob_descriptor; + } - /** - * - * - *
            -             * URI for the document.
            -             * 
            - * - * string uri = 2; - * - * @return This builder for chaining. - */ - public Builder clearUri() { - uri_ = getDefaultInstance().getUri(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.AnswerProto + .internal_static_google_cloud_discoveryengine_v1beta_Answer_BlobAttachment_Blob_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.Answer.BlobAttachment.Blob.class, + com.google.cloud.discoveryengine.v1beta.Answer.BlobAttachment.Blob.Builder.class); + } - /** - * - * - *
            -             * URI for the document.
            -             * 
            - * - * string uri = 2; - * - * @param value The bytes for uri to set. - * @return This builder for chaining. - */ - public Builder setUriBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - uri_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } + // Construct using + // com.google.cloud.discoveryengine.v1beta.Answer.BlobAttachment.Blob.newBuilder() + private Builder() {} - private java.lang.Object title_ = ""; + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } - /** - * - * - *
            -             * Title.
            -             * 
            - * - * string title = 3; - * - * @return The title. - */ - public java.lang.String getTitle() { - java.lang.Object ref = title_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - title_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + mimeType_ = ""; + data_ = com.google.protobuf.ByteString.EMPTY; + return this; + } - /** - * - * - *
            -             * Title.
            -             * 
            - * - * string title = 3; - * - * @return The bytes for title. - */ - public com.google.protobuf.ByteString getTitleBytes() { - java.lang.Object ref = title_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - title_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1beta.AnswerProto + .internal_static_google_cloud_discoveryengine_v1beta_Answer_BlobAttachment_Blob_descriptor; + } - /** - * - * - *
            -             * Title.
            -             * 
            - * - * string title = 3; - * - * @param value The title to set. - * @return This builder for chaining. - */ - public Builder setTitle(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - title_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Answer.BlobAttachment.Blob + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1beta.Answer.BlobAttachment.Blob + .getDefaultInstance(); + } - /** - * - * - *
            -             * Title.
            -             * 
            - * - * string title = 3; - * - * @return This builder for chaining. - */ - public Builder clearTitle() { - title_ = getDefaultInstance().getTitle(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - return this; - } + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Answer.BlobAttachment.Blob build() { + com.google.cloud.discoveryengine.v1beta.Answer.BlobAttachment.Blob result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } - /** - * - * - *
            -             * Title.
            -             * 
            - * - * string title = 3; - * - * @param value The bytes for title to set. - * @return This builder for chaining. - */ - public Builder setTitleBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - title_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Answer.BlobAttachment.Blob buildPartial() { + com.google.cloud.discoveryengine.v1beta.Answer.BlobAttachment.Blob result = + new com.google.cloud.discoveryengine.v1beta.Answer.BlobAttachment.Blob(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } - private java.util.List< - com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation - .SearchResult.SnippetInfo> - snippetInfo_ = java.util.Collections.emptyList(); + private void buildPartial0( + com.google.cloud.discoveryengine.v1beta.Answer.BlobAttachment.Blob result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.mimeType_ = mimeType_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.data_ = data_; + } + } - private void ensureSnippetInfoIsMutable() { - if (!((bitField0_ & 0x00000008) != 0)) { - snippetInfo_ = - new java.util.ArrayList< - com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation - .SearchResult.SnippetInfo>(snippetInfo_); - bitField0_ |= 0x00000008; - } - } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.discoveryengine.v1beta.Answer.BlobAttachment.Blob) { + return mergeFrom( + (com.google.cloud.discoveryengine.v1beta.Answer.BlobAttachment.Blob) other); + } else { + super.mergeFrom(other); + return this; + } + } - private com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation - .SearchResult.SnippetInfo, - com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation - .SearchResult.SnippetInfo.Builder, - com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation - .SearchResult.SnippetInfoOrBuilder> - snippetInfoBuilder_; + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1beta.Answer.BlobAttachment.Blob other) { + if (other + == com.google.cloud.discoveryengine.v1beta.Answer.BlobAttachment.Blob + .getDefaultInstance()) return this; + if (!other.getMimeType().isEmpty()) { + mimeType_ = other.mimeType_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getData().isEmpty()) { + setData(other.getData()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } - /** - * - * - *
            -             * If citation_type is DOCUMENT_LEVEL_CITATION, populate document
            -             * level snippets.
            -             * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult.SnippetInfo snippet_info = 4; - * - */ - public java.util.List< - com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation - .SearchResult.SnippetInfo> - getSnippetInfoList() { - if (snippetInfoBuilder_ == null) { - return java.util.Collections.unmodifiableList(snippetInfo_); - } else { - return snippetInfoBuilder_.getMessageList(); - } - } + @java.lang.Override + public final boolean isInitialized() { + return true; + } - /** - * - * - *
            -             * If citation_type is DOCUMENT_LEVEL_CITATION, populate document
            -             * level snippets.
            -             * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult.SnippetInfo snippet_info = 4; - * - */ - public int getSnippetInfoCount() { - if (snippetInfoBuilder_ == null) { - return snippetInfo_.size(); - } else { - return snippetInfoBuilder_.getCount(); - } - } + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + mimeType_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + data_ = input.readBytes(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } - /** - * - * - *
            -             * If citation_type is DOCUMENT_LEVEL_CITATION, populate document
            -             * level snippets.
            -             * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult.SnippetInfo snippet_info = 4; - * - */ - public com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation - .SearchResult.SnippetInfo - getSnippetInfo(int index) { - if (snippetInfoBuilder_ == null) { - return snippetInfo_.get(index); - } else { - return snippetInfoBuilder_.getMessage(index); - } - } + private int bitField0_; - /** - * - * - *
            -             * If citation_type is DOCUMENT_LEVEL_CITATION, populate document
            -             * level snippets.
            -             * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult.SnippetInfo snippet_info = 4; - * - */ - public Builder setSnippetInfo( - int index, - com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult - .SnippetInfo - value) { - if (snippetInfoBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureSnippetInfoIsMutable(); - snippetInfo_.set(index, value); - onChanged(); - } else { - snippetInfoBuilder_.setMessage(index, value); - } - return this; - } + private java.lang.Object mimeType_ = ""; - /** - * - * - *
            -             * If citation_type is DOCUMENT_LEVEL_CITATION, populate document
            -             * level snippets.
            -             * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult.SnippetInfo snippet_info = 4; - * - */ - public Builder setSnippetInfo( - int index, - com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult - .SnippetInfo.Builder - builderForValue) { - if (snippetInfoBuilder_ == null) { - ensureSnippetInfoIsMutable(); - snippetInfo_.set(index, builderForValue.build()); - onChanged(); - } else { - snippetInfoBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } + /** + * + * + *
            +         * Output only. The media type (MIME type) of the generated or retrieved
            +         * data.
            +         * 
            + * + * string mime_type = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The mimeType. + */ + public java.lang.String getMimeType() { + java.lang.Object ref = mimeType_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + mimeType_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } - /** - * - * - *
            -             * If citation_type is DOCUMENT_LEVEL_CITATION, populate document
            -             * level snippets.
            -             * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult.SnippetInfo snippet_info = 4; - * - */ - public Builder addSnippetInfo( - com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult - .SnippetInfo - value) { - if (snippetInfoBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureSnippetInfoIsMutable(); - snippetInfo_.add(value); - onChanged(); - } else { - snippetInfoBuilder_.addMessage(value); - } - return this; - } + /** + * + * + *
            +         * Output only. The media type (MIME type) of the generated or retrieved
            +         * data.
            +         * 
            + * + * string mime_type = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for mimeType. + */ + public com.google.protobuf.ByteString getMimeTypeBytes() { + java.lang.Object ref = mimeType_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + mimeType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } - /** - * - * - *
            -             * If citation_type is DOCUMENT_LEVEL_CITATION, populate document
            -             * level snippets.
            -             * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult.SnippetInfo snippet_info = 4; - * - */ - public Builder addSnippetInfo( - int index, - com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult - .SnippetInfo - value) { - if (snippetInfoBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureSnippetInfoIsMutable(); - snippetInfo_.add(index, value); - onChanged(); - } else { - snippetInfoBuilder_.addMessage(index, value); - } - return this; - } + /** + * + * + *
            +         * Output only. The media type (MIME type) of the generated or retrieved
            +         * data.
            +         * 
            + * + * string mime_type = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The mimeType to set. + * @return This builder for chaining. + */ + public Builder setMimeType(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + mimeType_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } - /** - * - * - *
            -             * If citation_type is DOCUMENT_LEVEL_CITATION, populate document
            -             * level snippets.
            -             * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult.SnippetInfo snippet_info = 4; - * - */ - public Builder addSnippetInfo( - com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult - .SnippetInfo.Builder - builderForValue) { - if (snippetInfoBuilder_ == null) { - ensureSnippetInfoIsMutable(); - snippetInfo_.add(builderForValue.build()); - onChanged(); - } else { - snippetInfoBuilder_.addMessage(builderForValue.build()); - } - return this; - } + /** + * + * + *
            +         * Output only. The media type (MIME type) of the generated or retrieved
            +         * data.
            +         * 
            + * + * string mime_type = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearMimeType() { + mimeType_ = getDefaultInstance().getMimeType(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } - /** - * - * - *
            -             * If citation_type is DOCUMENT_LEVEL_CITATION, populate document
            -             * level snippets.
            -             * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult.SnippetInfo snippet_info = 4; - * - */ - public Builder addSnippetInfo( - int index, - com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult - .SnippetInfo.Builder - builderForValue) { - if (snippetInfoBuilder_ == null) { - ensureSnippetInfoIsMutable(); - snippetInfo_.add(index, builderForValue.build()); - onChanged(); - } else { - snippetInfoBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } + /** + * + * + *
            +         * Output only. The media type (MIME type) of the generated or retrieved
            +         * data.
            +         * 
            + * + * string mime_type = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for mimeType to set. + * @return This builder for chaining. + */ + public Builder setMimeTypeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + mimeType_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } - /** - * - * - *
            -             * If citation_type is DOCUMENT_LEVEL_CITATION, populate document
            -             * level snippets.
            -             * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult.SnippetInfo snippet_info = 4; - * - */ - public Builder addAllSnippetInfo( - java.lang.Iterable< - ? extends - com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation - .SearchResult.SnippetInfo> - values) { - if (snippetInfoBuilder_ == null) { - ensureSnippetInfoIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, snippetInfo_); - onChanged(); - } else { - snippetInfoBuilder_.addAllMessages(values); - } - return this; - } + private com.google.protobuf.ByteString data_ = com.google.protobuf.ByteString.EMPTY; - /** - * - * - *
            -             * If citation_type is DOCUMENT_LEVEL_CITATION, populate document
            -             * level snippets.
            -             * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult.SnippetInfo snippet_info = 4; - * - */ - public Builder clearSnippetInfo() { - if (snippetInfoBuilder_ == null) { - snippetInfo_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000008); - onChanged(); - } else { - snippetInfoBuilder_.clear(); - } - return this; - } + /** + * + * + *
            +         * Output only. Raw bytes.
            +         * 
            + * + * bytes data = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The data. + */ + @java.lang.Override + public com.google.protobuf.ByteString getData() { + return data_; + } - /** - * - * - *
            -             * If citation_type is DOCUMENT_LEVEL_CITATION, populate document
            -             * level snippets.
            -             * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult.SnippetInfo snippet_info = 4; - * - */ - public Builder removeSnippetInfo(int index) { - if (snippetInfoBuilder_ == null) { - ensureSnippetInfoIsMutable(); - snippetInfo_.remove(index); - onChanged(); - } else { - snippetInfoBuilder_.remove(index); + /** + * + * + *
            +         * Output only. Raw bytes.
            +         * 
            + * + * bytes data = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The data to set. + * @return This builder for chaining. + */ + public Builder setData(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + data_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
            +         * Output only. Raw bytes.
            +         * 
            + * + * bytes data = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearData() { + bitField0_ = (bitField0_ & ~0x00000002); + data_ = getDefaultInstance().getData(); + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.Answer.BlobAttachment.Blob) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.Answer.BlobAttachment.Blob) + private static final com.google.cloud.discoveryengine.v1beta.Answer.BlobAttachment.Blob + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.discoveryengine.v1beta.Answer.BlobAttachment.Blob(); + } + + public static com.google.cloud.discoveryengine.v1beta.Answer.BlobAttachment.Blob + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Blob parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); } - return this; + return builder.buildPartial(); } + }; - /** - * - * - *
            -             * If citation_type is DOCUMENT_LEVEL_CITATION, populate document
            -             * level snippets.
            -             * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult.SnippetInfo snippet_info = 4; - * - */ - public com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation - .SearchResult.SnippetInfo.Builder - getSnippetInfoBuilder(int index) { - return internalGetSnippetInfoFieldBuilder().getBuilder(index); - } + public static com.google.protobuf.Parser parser() { + return PARSER; + } - /** - * - * - *
            -             * If citation_type is DOCUMENT_LEVEL_CITATION, populate document
            -             * level snippets.
            -             * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult.SnippetInfo snippet_info = 4; - * - */ - public com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation - .SearchResult.SnippetInfoOrBuilder - getSnippetInfoOrBuilder(int index) { - if (snippetInfoBuilder_ == null) { - return snippetInfo_.get(index); - } else { - return snippetInfoBuilder_.getMessageOrBuilder(index); - } - } + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } - /** - * - * - *
            -             * If citation_type is DOCUMENT_LEVEL_CITATION, populate document
            -             * level snippets.
            -             * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult.SnippetInfo snippet_info = 4; - * - */ - public java.util.List< - ? extends - com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation - .SearchResult.SnippetInfoOrBuilder> - getSnippetInfoOrBuilderList() { - if (snippetInfoBuilder_ != null) { - return snippetInfoBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(snippetInfo_); - } - } + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Answer.BlobAttachment.Blob + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } - /** - * - * - *
            -             * If citation_type is DOCUMENT_LEVEL_CITATION, populate document
            -             * level snippets.
            -             * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult.SnippetInfo snippet_info = 4; - * - */ - public com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation - .SearchResult.SnippetInfo.Builder - addSnippetInfoBuilder() { - return internalGetSnippetInfoFieldBuilder() - .addBuilder( - com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation - .SearchResult.SnippetInfo.getDefaultInstance()); - } + private int bitField0_; + public static final int DATA_FIELD_NUMBER = 1; + private com.google.cloud.discoveryengine.v1beta.Answer.BlobAttachment.Blob data_; - /** - * - * - *
            -             * If citation_type is DOCUMENT_LEVEL_CITATION, populate document
            -             * level snippets.
            -             * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult.SnippetInfo snippet_info = 4; - * - */ - public com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation - .SearchResult.SnippetInfo.Builder - addSnippetInfoBuilder(int index) { - return internalGetSnippetInfoFieldBuilder() - .addBuilder( - index, - com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation - .SearchResult.SnippetInfo.getDefaultInstance()); - } + /** + * + * + *
            +     * Output only. The mime type and data of the blob.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Answer.BlobAttachment.Blob data = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the data field is set. + */ + @java.lang.Override + public boolean hasData() { + return ((bitField0_ & 0x00000001) != 0); + } - /** - * - * - *
            -             * If citation_type is DOCUMENT_LEVEL_CITATION, populate document
            -             * level snippets.
            -             * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult.SnippetInfo snippet_info = 4; - * - */ - public java.util.List< - com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation - .SearchResult.SnippetInfo.Builder> - getSnippetInfoBuilderList() { - return internalGetSnippetInfoFieldBuilder().getBuilderList(); - } + /** + * + * + *
            +     * Output only. The mime type and data of the blob.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Answer.BlobAttachment.Blob data = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The data. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Answer.BlobAttachment.Blob getData() { + return data_ == null + ? com.google.cloud.discoveryengine.v1beta.Answer.BlobAttachment.Blob.getDefaultInstance() + : data_; + } - private com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation - .SearchResult.SnippetInfo, - com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation - .SearchResult.SnippetInfo.Builder, - com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation - .SearchResult.SnippetInfoOrBuilder> - internalGetSnippetInfoFieldBuilder() { - if (snippetInfoBuilder_ == null) { - snippetInfoBuilder_ = - new com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation - .SearchResult.SnippetInfo, - com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation - .SearchResult.SnippetInfo.Builder, - com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation - .SearchResult.SnippetInfoOrBuilder>( - snippetInfo_, - ((bitField0_ & 0x00000008) != 0), - getParentForChildren(), - isClean()); - snippetInfo_ = null; - } - return snippetInfoBuilder_; - } + /** + * + * + *
            +     * Output only. The mime type and data of the blob.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Answer.BlobAttachment.Blob data = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Answer.BlobAttachment.BlobOrBuilder + getDataOrBuilder() { + return data_ == null + ? com.google.cloud.discoveryengine.v1beta.Answer.BlobAttachment.Blob.getDefaultInstance() + : data_; + } - private java.util.List< - com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation - .SearchResult.ChunkInfo> - chunkInfo_ = java.util.Collections.emptyList(); + public static final int ATTRIBUTION_TYPE_FIELD_NUMBER = 2; + private int attributionType_ = 0; - private void ensureChunkInfoIsMutable() { - if (!((bitField0_ & 0x00000010) != 0)) { - chunkInfo_ = - new java.util.ArrayList< - com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation - .SearchResult.ChunkInfo>(chunkInfo_); - bitField0_ |= 0x00000010; - } - } + /** + * + * + *
            +     * Output only. The attribution type of the blob.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Answer.BlobAttachment.AttributionType attribution_type = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for attributionType. + */ + @java.lang.Override + public int getAttributionTypeValue() { + return attributionType_; + } - private com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation - .SearchResult.ChunkInfo, - com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation - .SearchResult.ChunkInfo.Builder, - com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation - .SearchResult.ChunkInfoOrBuilder> - chunkInfoBuilder_; + /** + * + * + *
            +     * Output only. The attribution type of the blob.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Answer.BlobAttachment.AttributionType attribution_type = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The attributionType. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Answer.BlobAttachment.AttributionType + getAttributionType() { + com.google.cloud.discoveryengine.v1beta.Answer.BlobAttachment.AttributionType result = + com.google.cloud.discoveryengine.v1beta.Answer.BlobAttachment.AttributionType.forNumber( + attributionType_); + return result == null + ? com.google.cloud.discoveryengine.v1beta.Answer.BlobAttachment.AttributionType + .UNRECOGNIZED + : result; + } - /** - * - * - *
            -             * If citation_type is CHUNK_LEVEL_CITATION and chunk mode is on,
            -             * populate chunk info.
            -             * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult.ChunkInfo chunk_info = 5; - * - */ - public java.util.List< - com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation - .SearchResult.ChunkInfo> - getChunkInfoList() { - if (chunkInfoBuilder_ == null) { - return java.util.Collections.unmodifiableList(chunkInfo_); - } else { - return chunkInfoBuilder_.getMessageList(); - } - } + private byte memoizedIsInitialized = -1; - /** - * - * - *
            -             * If citation_type is CHUNK_LEVEL_CITATION and chunk mode is on,
            -             * populate chunk info.
            -             * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult.ChunkInfo chunk_info = 5; - * - */ - public int getChunkInfoCount() { - if (chunkInfoBuilder_ == null) { - return chunkInfo_.size(); - } else { - return chunkInfoBuilder_.getCount(); - } - } + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; - /** - * - * - *
            -             * If citation_type is CHUNK_LEVEL_CITATION and chunk mode is on,
            -             * populate chunk info.
            -             * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult.ChunkInfo chunk_info = 5; - * - */ - public com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation - .SearchResult.ChunkInfo - getChunkInfo(int index) { - if (chunkInfoBuilder_ == null) { - return chunkInfo_.get(index); - } else { - return chunkInfoBuilder_.getMessage(index); - } - } + memoizedIsInitialized = 1; + return true; + } - /** - * - * - *
            -             * If citation_type is CHUNK_LEVEL_CITATION and chunk mode is on,
            -             * populate chunk info.
            -             * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult.ChunkInfo chunk_info = 5; - * - */ - public Builder setChunkInfo( - int index, - com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult - .ChunkInfo - value) { - if (chunkInfoBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureChunkInfoIsMutable(); - chunkInfo_.set(index, value); - onChanged(); - } else { - chunkInfoBuilder_.setMessage(index, value); - } - return this; - } + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getData()); + } + if (attributionType_ + != com.google.cloud.discoveryengine.v1beta.Answer.BlobAttachment.AttributionType + .ATTRIBUTION_TYPE_UNSPECIFIED + .getNumber()) { + output.writeEnum(2, attributionType_); + } + getUnknownFields().writeTo(output); + } - /** - * - * - *
            -             * If citation_type is CHUNK_LEVEL_CITATION and chunk mode is on,
            -             * populate chunk info.
            -             * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult.ChunkInfo chunk_info = 5; - * - */ - public Builder setChunkInfo( - int index, - com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult - .ChunkInfo.Builder - builderForValue) { - if (chunkInfoBuilder_ == null) { - ensureChunkInfoIsMutable(); - chunkInfo_.set(index, builderForValue.build()); - onChanged(); - } else { - chunkInfoBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; - /** - * - * - *
            -             * If citation_type is CHUNK_LEVEL_CITATION and chunk mode is on,
            -             * populate chunk info.
            -             * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult.ChunkInfo chunk_info = 5; - * - */ - public Builder addChunkInfo( - com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult - .ChunkInfo - value) { - if (chunkInfoBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureChunkInfoIsMutable(); - chunkInfo_.add(value); - onChanged(); - } else { - chunkInfoBuilder_.addMessage(value); - } - return this; - } + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getData()); + } + if (attributionType_ + != com.google.cloud.discoveryengine.v1beta.Answer.BlobAttachment.AttributionType + .ATTRIBUTION_TYPE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, attributionType_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } - /** - * - * - *
            -             * If citation_type is CHUNK_LEVEL_CITATION and chunk mode is on,
            -             * populate chunk info.
            -             * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult.ChunkInfo chunk_info = 5; - * - */ - public Builder addChunkInfo( - int index, - com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult - .ChunkInfo - value) { - if (chunkInfoBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureChunkInfoIsMutable(); - chunkInfo_.add(index, value); - onChanged(); - } else { - chunkInfoBuilder_.addMessage(index, value); - } - return this; - } + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.discoveryengine.v1beta.Answer.BlobAttachment)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1beta.Answer.BlobAttachment other = + (com.google.cloud.discoveryengine.v1beta.Answer.BlobAttachment) obj; - /** - * - * - *
            -             * If citation_type is CHUNK_LEVEL_CITATION and chunk mode is on,
            -             * populate chunk info.
            -             * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult.ChunkInfo chunk_info = 5; - * - */ - public Builder addChunkInfo( - com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult - .ChunkInfo.Builder - builderForValue) { - if (chunkInfoBuilder_ == null) { - ensureChunkInfoIsMutable(); - chunkInfo_.add(builderForValue.build()); - onChanged(); - } else { - chunkInfoBuilder_.addMessage(builderForValue.build()); - } - return this; - } + if (hasData() != other.hasData()) return false; + if (hasData()) { + if (!getData().equals(other.getData())) return false; + } + if (attributionType_ != other.attributionType_) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } - /** - * - * - *
            -             * If citation_type is CHUNK_LEVEL_CITATION and chunk mode is on,
            -             * populate chunk info.
            -             * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult.ChunkInfo chunk_info = 5; - * - */ - public Builder addChunkInfo( - int index, - com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult - .ChunkInfo.Builder - builderForValue) { - if (chunkInfoBuilder_ == null) { - ensureChunkInfoIsMutable(); - chunkInfo_.add(index, builderForValue.build()); - onChanged(); - } else { - chunkInfoBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasData()) { + hash = (37 * hash) + DATA_FIELD_NUMBER; + hash = (53 * hash) + getData().hashCode(); + } + hash = (37 * hash) + ATTRIBUTION_TYPE_FIELD_NUMBER; + hash = (53 * hash) + attributionType_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } - /** - * - * - *
            -             * If citation_type is CHUNK_LEVEL_CITATION and chunk mode is on,
            -             * populate chunk info.
            -             * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult.ChunkInfo chunk_info = 5; - * - */ - public Builder addAllChunkInfo( - java.lang.Iterable< - ? extends - com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation - .SearchResult.ChunkInfo> - values) { - if (chunkInfoBuilder_ == null) { - ensureChunkInfoIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, chunkInfo_); - onChanged(); - } else { - chunkInfoBuilder_.addAllMessages(values); - } - return this; - } - - /** - * - * - *
            -             * If citation_type is CHUNK_LEVEL_CITATION and chunk mode is on,
            -             * populate chunk info.
            -             * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult.ChunkInfo chunk_info = 5; - * - */ - public Builder clearChunkInfo() { - if (chunkInfoBuilder_ == null) { - chunkInfo_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000010); - onChanged(); - } else { - chunkInfoBuilder_.clear(); - } - return this; - } + public static com.google.cloud.discoveryengine.v1beta.Answer.BlobAttachment parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - /** - * - * - *
            -             * If citation_type is CHUNK_LEVEL_CITATION and chunk mode is on,
            -             * populate chunk info.
            -             * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult.ChunkInfo chunk_info = 5; - * - */ - public Builder removeChunkInfo(int index) { - if (chunkInfoBuilder_ == null) { - ensureChunkInfoIsMutable(); - chunkInfo_.remove(index); - onChanged(); - } else { - chunkInfoBuilder_.remove(index); - } - return this; - } + public static com.google.cloud.discoveryengine.v1beta.Answer.BlobAttachment parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - /** - * - * - *
            -             * If citation_type is CHUNK_LEVEL_CITATION and chunk mode is on,
            -             * populate chunk info.
            -             * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult.ChunkInfo chunk_info = 5; - * - */ - public com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation - .SearchResult.ChunkInfo.Builder - getChunkInfoBuilder(int index) { - return internalGetChunkInfoFieldBuilder().getBuilder(index); - } + public static com.google.cloud.discoveryengine.v1beta.Answer.BlobAttachment parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - /** - * - * - *
            -             * If citation_type is CHUNK_LEVEL_CITATION and chunk mode is on,
            -             * populate chunk info.
            -             * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult.ChunkInfo chunk_info = 5; - * - */ - public com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation - .SearchResult.ChunkInfoOrBuilder - getChunkInfoOrBuilder(int index) { - if (chunkInfoBuilder_ == null) { - return chunkInfo_.get(index); - } else { - return chunkInfoBuilder_.getMessageOrBuilder(index); - } - } + public static com.google.cloud.discoveryengine.v1beta.Answer.BlobAttachment parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - /** - * - * - *
            -             * If citation_type is CHUNK_LEVEL_CITATION and chunk mode is on,
            -             * populate chunk info.
            -             * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult.ChunkInfo chunk_info = 5; - * - */ - public java.util.List< - ? extends - com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation - .SearchResult.ChunkInfoOrBuilder> - getChunkInfoOrBuilderList() { - if (chunkInfoBuilder_ != null) { - return chunkInfoBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(chunkInfo_); - } - } + public static com.google.cloud.discoveryengine.v1beta.Answer.BlobAttachment parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - /** - * - * - *
            -             * If citation_type is CHUNK_LEVEL_CITATION and chunk mode is on,
            -             * populate chunk info.
            -             * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult.ChunkInfo chunk_info = 5; - * - */ - public com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation - .SearchResult.ChunkInfo.Builder - addChunkInfoBuilder() { - return internalGetChunkInfoFieldBuilder() - .addBuilder( - com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation - .SearchResult.ChunkInfo.getDefaultInstance()); - } + public static com.google.cloud.discoveryengine.v1beta.Answer.BlobAttachment parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - /** - * - * - *
            -             * If citation_type is CHUNK_LEVEL_CITATION and chunk mode is on,
            -             * populate chunk info.
            -             * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult.ChunkInfo chunk_info = 5; - * - */ - public com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation - .SearchResult.ChunkInfo.Builder - addChunkInfoBuilder(int index) { - return internalGetChunkInfoFieldBuilder() - .addBuilder( - index, - com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation - .SearchResult.ChunkInfo.getDefaultInstance()); - } + public static com.google.cloud.discoveryengine.v1beta.Answer.BlobAttachment parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } - /** - * - * - *
            -             * If citation_type is CHUNK_LEVEL_CITATION and chunk mode is on,
            -             * populate chunk info.
            -             * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult.ChunkInfo chunk_info = 5; - * - */ - public java.util.List< - com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation - .SearchResult.ChunkInfo.Builder> - getChunkInfoBuilderList() { - return internalGetChunkInfoFieldBuilder().getBuilderList(); - } + public static com.google.cloud.discoveryengine.v1beta.Answer.BlobAttachment parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } - private com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation - .SearchResult.ChunkInfo, - com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation - .SearchResult.ChunkInfo.Builder, - com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation - .SearchResult.ChunkInfoOrBuilder> - internalGetChunkInfoFieldBuilder() { - if (chunkInfoBuilder_ == null) { - chunkInfoBuilder_ = - new com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation - .SearchResult.ChunkInfo, - com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation - .SearchResult.ChunkInfo.Builder, - com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation - .SearchResult.ChunkInfoOrBuilder>( - chunkInfo_, - ((bitField0_ & 0x00000010) != 0), - getParentForChildren(), - isClean()); - chunkInfo_ = null; - } - return chunkInfoBuilder_; - } + public static com.google.cloud.discoveryengine.v1beta.Answer.BlobAttachment parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } - private com.google.protobuf.Struct structData_; - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Struct, - com.google.protobuf.Struct.Builder, - com.google.protobuf.StructOrBuilder> - structDataBuilder_; + public static com.google.cloud.discoveryengine.v1beta.Answer.BlobAttachment parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } - /** - * - * - *
            -             * Data representation.
            -             * The structured JSON data for the document.
            -             * It's populated from the struct data from the Document, or the
            -             * Chunk in search result.
            -             * 
            - * - * .google.protobuf.Struct struct_data = 6; - * - * @return Whether the structData field is set. - */ - public boolean hasStructData() { - return ((bitField0_ & 0x00000020) != 0); - } + public static com.google.cloud.discoveryengine.v1beta.Answer.BlobAttachment parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } - /** - * - * - *
            -             * Data representation.
            -             * The structured JSON data for the document.
            -             * It's populated from the struct data from the Document, or the
            -             * Chunk in search result.
            -             * 
            - * - * .google.protobuf.Struct struct_data = 6; - * - * @return The structData. - */ - public com.google.protobuf.Struct getStructData() { - if (structDataBuilder_ == null) { - return structData_ == null - ? com.google.protobuf.Struct.getDefaultInstance() - : structData_; - } else { - return structDataBuilder_.getMessage(); - } - } + public static com.google.cloud.discoveryengine.v1beta.Answer.BlobAttachment parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } - /** - * - * - *
            -             * Data representation.
            -             * The structured JSON data for the document.
            -             * It's populated from the struct data from the Document, or the
            -             * Chunk in search result.
            -             * 
            - * - * .google.protobuf.Struct struct_data = 6; - */ - public Builder setStructData(com.google.protobuf.Struct value) { - if (structDataBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - structData_ = value; - } else { - structDataBuilder_.setMessage(value); - } - bitField0_ |= 0x00000020; - onChanged(); - return this; - } + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } - /** - * - * - *
            -             * Data representation.
            -             * The structured JSON data for the document.
            -             * It's populated from the struct data from the Document, or the
            -             * Chunk in search result.
            -             * 
            - * - * .google.protobuf.Struct struct_data = 6; - */ - public Builder setStructData(com.google.protobuf.Struct.Builder builderForValue) { - if (structDataBuilder_ == null) { - structData_ = builderForValue.build(); - } else { - structDataBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000020; - onChanged(); - return this; - } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } - /** - * - * - *
            -             * Data representation.
            -             * The structured JSON data for the document.
            -             * It's populated from the struct data from the Document, or the
            -             * Chunk in search result.
            -             * 
            - * - * .google.protobuf.Struct struct_data = 6; - */ - public Builder mergeStructData(com.google.protobuf.Struct value) { - if (structDataBuilder_ == null) { - if (((bitField0_ & 0x00000020) != 0) - && structData_ != null - && structData_ != com.google.protobuf.Struct.getDefaultInstance()) { - getStructDataBuilder().mergeFrom(value); - } else { - structData_ = value; - } - } else { - structDataBuilder_.mergeFrom(value); - } - if (structData_ != null) { - bitField0_ |= 0x00000020; - onChanged(); - } - return this; - } + public static Builder newBuilder( + com.google.cloud.discoveryengine.v1beta.Answer.BlobAttachment prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } - /** - * - * - *
            -             * Data representation.
            -             * The structured JSON data for the document.
            -             * It's populated from the struct data from the Document, or the
            -             * Chunk in search result.
            -             * 
            - * - * .google.protobuf.Struct struct_data = 6; - */ - public Builder clearStructData() { - bitField0_ = (bitField0_ & ~0x00000020); - structData_ = null; - if (structDataBuilder_ != null) { - structDataBuilder_.dispose(); - structDataBuilder_ = null; - } - onChanged(); - return this; - } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } - /** - * - * - *
            -             * Data representation.
            -             * The structured JSON data for the document.
            -             * It's populated from the struct data from the Document, or the
            -             * Chunk in search result.
            -             * 
            - * - * .google.protobuf.Struct struct_data = 6; - */ - public com.google.protobuf.Struct.Builder getStructDataBuilder() { - bitField0_ |= 0x00000020; - onChanged(); - return internalGetStructDataFieldBuilder().getBuilder(); - } + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } - /** - * - * - *
            -             * Data representation.
            -             * The structured JSON data for the document.
            -             * It's populated from the struct data from the Document, or the
            -             * Chunk in search result.
            -             * 
            - * - * .google.protobuf.Struct struct_data = 6; - */ - public com.google.protobuf.StructOrBuilder getStructDataOrBuilder() { - if (structDataBuilder_ != null) { - return structDataBuilder_.getMessageOrBuilder(); - } else { - return structData_ == null - ? com.google.protobuf.Struct.getDefaultInstance() - : structData_; - } - } + /** + * + * + *
            +     * Stores binarydata attached to text answer, e.g. image, video, audio, etc.
            +     * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.Answer.BlobAttachment} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.Answer.BlobAttachment) + com.google.cloud.discoveryengine.v1beta.Answer.BlobAttachmentOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.AnswerProto + .internal_static_google_cloud_discoveryengine_v1beta_Answer_BlobAttachment_descriptor; + } - /** - * - * - *
            -             * Data representation.
            -             * The structured JSON data for the document.
            -             * It's populated from the struct data from the Document, or the
            -             * Chunk in search result.
            -             * 
            - * - * .google.protobuf.Struct struct_data = 6; - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Struct, - com.google.protobuf.Struct.Builder, - com.google.protobuf.StructOrBuilder> - internalGetStructDataFieldBuilder() { - if (structDataBuilder_ == null) { - structDataBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Struct, - com.google.protobuf.Struct.Builder, - com.google.protobuf.StructOrBuilder>( - getStructData(), getParentForChildren(), isClean()); - structData_ = null; - } - return structDataBuilder_; - } + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.AnswerProto + .internal_static_google_cloud_discoveryengine_v1beta_Answer_BlobAttachment_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.Answer.BlobAttachment.class, + com.google.cloud.discoveryengine.v1beta.Answer.BlobAttachment.Builder.class); + } - // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult) - } + // Construct using com.google.cloud.discoveryengine.v1beta.Answer.BlobAttachment.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } - // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult) - private static final com.google.cloud.discoveryengine.v1beta.Answer.Step.Action - .Observation.SearchResult - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = - new com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation - .SearchResult(); - } - - public static com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation - .SearchResult - getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public SearchResult parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException() - .setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetDataFieldBuilder(); + } + } - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + data_ = null; + if (dataBuilder_ != null) { + dataBuilder_.dispose(); + dataBuilder_ = null; } + attributionType_ = 0; + return this; + } - public static final int SEARCH_RESULTS_FIELD_NUMBER = 2; + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1beta.AnswerProto + .internal_static_google_cloud_discoveryengine_v1beta_Answer_BlobAttachment_descriptor; + } - @SuppressWarnings("serial") - private java.util.List< - com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult> - searchResults_; + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Answer.BlobAttachment + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1beta.Answer.BlobAttachment.getDefaultInstance(); + } - /** - * - * - *
            -         * Search results observed by the search action, it can be snippets info
            -         * or chunk info, depending on the citation type set by the user.
            -         * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult search_results = 2; - * - */ - @java.lang.Override - public java.util.List< - com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult> - getSearchResultsList() { - return searchResults_; + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Answer.BlobAttachment build() { + com.google.cloud.discoveryengine.v1beta.Answer.BlobAttachment result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); } + return result; + } - /** - * - * - *
            -         * Search results observed by the search action, it can be snippets info
            -         * or chunk info, depending on the citation type set by the user.
            -         * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult search_results = 2; - * - */ - @java.lang.Override - public java.util.List< - ? extends - com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation - .SearchResultOrBuilder> - getSearchResultsOrBuilderList() { - return searchResults_; + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Answer.BlobAttachment buildPartial() { + com.google.cloud.discoveryengine.v1beta.Answer.BlobAttachment result = + new com.google.cloud.discoveryengine.v1beta.Answer.BlobAttachment(this); + if (bitField0_ != 0) { + buildPartial0(result); } + onBuilt(); + return result; + } - /** - * - * - *
            -         * Search results observed by the search action, it can be snippets info
            -         * or chunk info, depending on the citation type set by the user.
            -         * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult search_results = 2; - * - */ - @java.lang.Override - public int getSearchResultsCount() { - return searchResults_.size(); + private void buildPartial0( + com.google.cloud.discoveryengine.v1beta.Answer.BlobAttachment result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.data_ = dataBuilder_ == null ? data_ : dataBuilder_.build(); + to_bitField0_ |= 0x00000001; } - - /** - * - * - *
            -         * Search results observed by the search action, it can be snippets info
            -         * or chunk info, depending on the citation type set by the user.
            -         * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult search_results = 2; - * - */ - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult - getSearchResults(int index) { - return searchResults_.get(index); + if (((from_bitField0_ & 0x00000002) != 0)) { + result.attributionType_ = attributionType_; } + result.bitField0_ |= to_bitField0_; + } - /** - * - * - *
            -         * Search results observed by the search action, it can be snippets info
            -         * or chunk info, depending on the citation type set by the user.
            -         * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult search_results = 2; - * - */ - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation - .SearchResultOrBuilder - getSearchResultsOrBuilder(int index) { - return searchResults_.get(index); + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.discoveryengine.v1beta.Answer.BlobAttachment) { + return mergeFrom((com.google.cloud.discoveryengine.v1beta.Answer.BlobAttachment) other); + } else { + super.mergeFrom(other); + return this; } + } - private byte memoizedIsInitialized = -1; + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1beta.Answer.BlobAttachment other) { + if (other + == com.google.cloud.discoveryengine.v1beta.Answer.BlobAttachment.getDefaultInstance()) + return this; + if (other.hasData()) { + mergeData(other.getData()); + } + if (other.attributionType_ != 0) { + setAttributionTypeValue(other.getAttributionTypeValue()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + @java.lang.Override + public final boolean isInitialized() { + return true; + } - memoizedIsInitialized = 1; - return true; + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(internalGetDataFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + attributionType_ = input.readEnum(); + bitField0_ |= 0x00000002; + break; + } // case 16 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < searchResults_.size(); i++) { - output.writeMessage(2, searchResults_.get(i)); - } - getUnknownFields().writeTo(output); - } + private int bitField0_; - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; + private com.google.cloud.discoveryengine.v1beta.Answer.BlobAttachment.Blob data_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.Answer.BlobAttachment.Blob, + com.google.cloud.discoveryengine.v1beta.Answer.BlobAttachment.Blob.Builder, + com.google.cloud.discoveryengine.v1beta.Answer.BlobAttachment.BlobOrBuilder> + dataBuilder_; - size = 0; - for (int i = 0; i < searchResults_.size(); i++) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize(2, searchResults_.get(i)); - } - 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.discoveryengine.v1beta.Answer.Step.Action.Observation)) { - return super.equals(obj); - } - com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation other = - (com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation) obj; + /** + * + * + *
            +       * Output only. The mime type and data of the blob.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Answer.BlobAttachment.Blob data = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the data field is set. + */ + public boolean hasData() { + return ((bitField0_ & 0x00000001) != 0); + } - if (!getSearchResultsList().equals(other.getSearchResultsList())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; + /** + * + * + *
            +       * Output only. The mime type and data of the blob.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Answer.BlobAttachment.Blob data = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The data. + */ + public com.google.cloud.discoveryengine.v1beta.Answer.BlobAttachment.Blob getData() { + if (dataBuilder_ == null) { + return data_ == null + ? com.google.cloud.discoveryengine.v1beta.Answer.BlobAttachment.Blob + .getDefaultInstance() + : data_; + } else { + return dataBuilder_.getMessage(); } + } - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getSearchResultsCount() > 0) { - hash = (37 * hash) + SEARCH_RESULTS_FIELD_NUMBER; - hash = (53 * hash) + getSearchResultsList().hashCode(); + /** + * + * + *
            +       * Output only. The mime type and data of the blob.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Answer.BlobAttachment.Blob data = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setData( + com.google.cloud.discoveryengine.v1beta.Answer.BlobAttachment.Blob value) { + if (dataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; + data_ = value; + } else { + dataBuilder_.setMessage(value); } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } - public static com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation - parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); + /** + * + * + *
            +       * Output only. The mime type and data of the blob.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Answer.BlobAttachment.Blob data = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setData( + com.google.cloud.discoveryengine.v1beta.Answer.BlobAttachment.Blob.Builder + builderForValue) { + if (dataBuilder_ == null) { + data_ = builderForValue.build(); + } else { + dataBuilder_.setMessage(builderForValue.build()); } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } - public static com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation - parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); + /** + * + * + *
            +       * Output only. The mime type and data of the blob.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Answer.BlobAttachment.Blob data = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeData( + com.google.cloud.discoveryengine.v1beta.Answer.BlobAttachment.Blob value) { + if (dataBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && data_ != null + && data_ + != com.google.cloud.discoveryengine.v1beta.Answer.BlobAttachment.Blob + .getDefaultInstance()) { + getDataBuilder().mergeFrom(value); + } else { + data_ = value; + } + } else { + dataBuilder_.mergeFrom(value); } - - public static com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation - parseFrom(com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); + if (data_ != null) { + bitField0_ |= 0x00000001; + onChanged(); } + return this; + } - public static com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation - parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); + /** + * + * + *
            +       * Output only. The mime type and data of the blob.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Answer.BlobAttachment.Blob data = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearData() { + bitField0_ = (bitField0_ & ~0x00000001); + data_ = null; + if (dataBuilder_ != null) { + dataBuilder_.dispose(); + dataBuilder_ = null; } + onChanged(); + return this; + } - public static com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation - parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } + /** + * + * + *
            +       * Output only. The mime type and data of the blob.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Answer.BlobAttachment.Blob data = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.discoveryengine.v1beta.Answer.BlobAttachment.Blob.Builder + getDataBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return internalGetDataFieldBuilder().getBuilder(); + } - public static com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation - parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); + /** + * + * + *
            +       * Output only. The mime type and data of the blob.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Answer.BlobAttachment.Blob data = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.discoveryengine.v1beta.Answer.BlobAttachment.BlobOrBuilder + getDataOrBuilder() { + if (dataBuilder_ != null) { + return dataBuilder_.getMessageOrBuilder(); + } else { + return data_ == null + ? com.google.cloud.discoveryengine.v1beta.Answer.BlobAttachment.Blob + .getDefaultInstance() + : data_; } + } - public static com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation - parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + /** + * + * + *
            +       * Output only. The mime type and data of the blob.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Answer.BlobAttachment.Blob data = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.Answer.BlobAttachment.Blob, + com.google.cloud.discoveryengine.v1beta.Answer.BlobAttachment.Blob.Builder, + com.google.cloud.discoveryengine.v1beta.Answer.BlobAttachment.BlobOrBuilder> + internalGetDataFieldBuilder() { + if (dataBuilder_ == null) { + dataBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.Answer.BlobAttachment.Blob, + com.google.cloud.discoveryengine.v1beta.Answer.BlobAttachment.Blob.Builder, + com.google.cloud.discoveryengine.v1beta.Answer.BlobAttachment.BlobOrBuilder>( + getData(), getParentForChildren(), isClean()); + data_ = null; } + return dataBuilder_; + } - public static com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation - parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } + private int attributionType_ = 0; - public static com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation - parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } + /** + * + * + *
            +       * Output only. The attribution type of the blob.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Answer.BlobAttachment.AttributionType attribution_type = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for attributionType. + */ + @java.lang.Override + public int getAttributionTypeValue() { + return attributionType_; + } - public static com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation - parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } + /** + * + * + *
            +       * Output only. The attribution type of the blob.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Answer.BlobAttachment.AttributionType attribution_type = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The enum numeric value on the wire for attributionType to set. + * @return This builder for chaining. + */ + public Builder setAttributionTypeValue(int value) { + attributionType_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } - public static com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation - parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } + /** + * + * + *
            +       * Output only. The attribution type of the blob.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Answer.BlobAttachment.AttributionType attribution_type = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The attributionType. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Answer.BlobAttachment.AttributionType + getAttributionType() { + com.google.cloud.discoveryengine.v1beta.Answer.BlobAttachment.AttributionType result = + com.google.cloud.discoveryengine.v1beta.Answer.BlobAttachment.AttributionType.forNumber( + attributionType_); + return result == null + ? com.google.cloud.discoveryengine.v1beta.Answer.BlobAttachment.AttributionType + .UNRECOGNIZED + : result; + } - public static com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation - 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(); + /** + * + * + *
            +       * Output only. The attribution type of the blob.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Answer.BlobAttachment.AttributionType attribution_type = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The attributionType to set. + * @return This builder for chaining. + */ + public Builder setAttributionType( + com.google.cloud.discoveryengine.v1beta.Answer.BlobAttachment.AttributionType value) { + if (value == null) { + throw new NullPointerException(); } + bitField0_ |= 0x00000002; + attributionType_ = value.getNumber(); + onChanged(); + return this; + } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } + /** + * + * + *
            +       * Output only. The attribution type of the blob.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Answer.BlobAttachment.AttributionType attribution_type = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearAttributionType() { + bitField0_ = (bitField0_ & ~0x00000002); + attributionType_ = 0; + onChanged(); + return this; + } - public static Builder newBuilder( - com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.Answer.BlobAttachment) + } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.Answer.BlobAttachment) + private static final com.google.cloud.discoveryengine.v1beta.Answer.BlobAttachment + DEFAULT_INSTANCE; - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } + static { + DEFAULT_INSTANCE = new com.google.cloud.discoveryengine.v1beta.Answer.BlobAttachment(); + } - /** - * - * - *
            -         * Observation.
            -         * 
            - * - * Protobuf type {@code google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation} - */ - public static final class Builder - extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation) - com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.ObservationOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.discoveryengine.v1beta.AnswerProto - .internal_static_google_cloud_discoveryengine_v1beta_Answer_Step_Action_Observation_descriptor; - } + public static com.google.cloud.discoveryengine.v1beta.Answer.BlobAttachment + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.discoveryengine.v1beta.AnswerProto - .internal_static_google_cloud_discoveryengine_v1beta_Answer_Step_Action_Observation_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.class, - com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.Builder - .class); + public BlobAttachment parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } + }; - // Construct using - // com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.newBuilder() - private Builder() {} + public static com.google.protobuf.Parser parser() { + return PARSER; + } - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - } + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - if (searchResultsBuilder_ == null) { - searchResults_ = java.util.Collections.emptyList(); - } else { - searchResults_ = null; - searchResultsBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000001); - return this; - } + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Answer.BlobAttachment + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.discoveryengine.v1beta.AnswerProto - .internal_static_google_cloud_discoveryengine_v1beta_Answer_Step_Action_Observation_descriptor; - } + public interface StepOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.Answer.Step) + com.google.protobuf.MessageOrBuilder { - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation - getDefaultInstanceForType() { - return com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation - .getDefaultInstance(); - } + /** + * + * + *
            +     * The state of the step.
            +     * 
            + * + * .google.cloud.discoveryengine.v1beta.Answer.Step.State state = 1; + * + * @return The enum numeric value on the wire for state. + */ + int getStateValue(); - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation build() { - com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation result = - buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } + /** + * + * + *
            +     * The state of the step.
            +     * 
            + * + * .google.cloud.discoveryengine.v1beta.Answer.Step.State state = 1; + * + * @return The state. + */ + com.google.cloud.discoveryengine.v1beta.Answer.Step.State getState(); - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation - buildPartial() { - com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation result = - new com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } + /** + * + * + *
            +     * The description of the step.
            +     * 
            + * + * string description = 2; + * + * @return The description. + */ + java.lang.String getDescription(); - private void buildPartialRepeatedFields( - com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation result) { - if (searchResultsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - searchResults_ = java.util.Collections.unmodifiableList(searchResults_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.searchResults_ = searchResults_; - } else { - result.searchResults_ = searchResultsBuilder_.build(); - } - } + /** + * + * + *
            +     * The description of the step.
            +     * 
            + * + * string description = 2; + * + * @return The bytes for description. + */ + com.google.protobuf.ByteString getDescriptionBytes(); - private void buildPartial0( - com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation result) { - int from_bitField0_ = bitField0_; - } + /** + * + * + *
            +     * The thought of the step.
            +     * 
            + * + * string thought = 3; + * + * @return The thought. + */ + java.lang.String getThought(); - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other - instanceof com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation) { - return mergeFrom( - (com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation) other); - } else { - super.mergeFrom(other); - return this; - } - } + /** + * + * + *
            +     * The thought of the step.
            +     * 
            + * + * string thought = 3; + * + * @return The bytes for thought. + */ + com.google.protobuf.ByteString getThoughtBytes(); - public Builder mergeFrom( - com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation other) { - if (other - == com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation - .getDefaultInstance()) return this; - if (searchResultsBuilder_ == null) { - if (!other.searchResults_.isEmpty()) { - if (searchResults_.isEmpty()) { - searchResults_ = other.searchResults_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureSearchResultsIsMutable(); - searchResults_.addAll(other.searchResults_); - } - onChanged(); - } - } else { - if (!other.searchResults_.isEmpty()) { - if (searchResultsBuilder_.isEmpty()) { - searchResultsBuilder_.dispose(); - searchResultsBuilder_ = null; - searchResults_ = other.searchResults_; - bitField0_ = (bitField0_ & ~0x00000001); - searchResultsBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders - ? internalGetSearchResultsFieldBuilder() - : null; - } else { - searchResultsBuilder_.addAllMessages(other.searchResults_); - } - } - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } + /** + * + * + *
            +     * Actions.
            +     * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action actions = 4; + */ + java.util.List getActionsList(); - @java.lang.Override - public final boolean isInitialized() { - return true; - } + /** + * + * + *
            +     * Actions.
            +     * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action actions = 4; + */ + com.google.cloud.discoveryengine.v1beta.Answer.Step.Action getActions(int index); - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 18: - { - com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation - .SearchResult - m = - input.readMessage( - com.google.cloud.discoveryengine.v1beta.Answer.Step.Action - .Observation.SearchResult.parser(), - extensionRegistry); - if (searchResultsBuilder_ == null) { - ensureSearchResultsIsMutable(); - searchResults_.add(m); - } else { - searchResultsBuilder_.addMessage(m); - } - break; - } // case 18 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } + /** + * + * + *
            +     * Actions.
            +     * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action actions = 4; + */ + int getActionsCount(); - private int bitField0_; + /** + * + * + *
            +     * Actions.
            +     * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action actions = 4; + */ + java.util.List + getActionsOrBuilderList(); - private java.util.List< - com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation - .SearchResult> - searchResults_ = java.util.Collections.emptyList(); + /** + * + * + *
            +     * Actions.
            +     * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action actions = 4; + */ + com.google.cloud.discoveryengine.v1beta.Answer.Step.ActionOrBuilder getActionsOrBuilder( + int index); + } - private void ensureSearchResultsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - searchResults_ = - new java.util.ArrayList< - com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation - .SearchResult>(searchResults_); - bitField0_ |= 0x00000001; - } - } + /** + * + * + *
            +   * Step information.
            +   * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.Answer.Step} + */ + public static final class Step extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.Answer.Step) + StepOrBuilder { + private static final long serialVersionUID = 0L; - private com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation - .SearchResult, - com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation - .SearchResult.Builder, - com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation - .SearchResultOrBuilder> - searchResultsBuilder_; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Step"); + } - /** - * - * - *
            -           * Search results observed by the search action, it can be snippets info
            -           * or chunk info, depending on the citation type set by the user.
            -           * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult search_results = 2; - * - */ - public java.util.List< - com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation - .SearchResult> - getSearchResultsList() { - if (searchResultsBuilder_ == null) { - return java.util.Collections.unmodifiableList(searchResults_); - } else { - return searchResultsBuilder_.getMessageList(); - } - } + // Use Step.newBuilder() to construct. + private Step(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } - /** - * - * - *
            -           * Search results observed by the search action, it can be snippets info
            -           * or chunk info, depending on the citation type set by the user.
            -           * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult search_results = 2; - * - */ - public int getSearchResultsCount() { - if (searchResultsBuilder_ == null) { - return searchResults_.size(); - } else { - return searchResultsBuilder_.getCount(); - } - } + private Step() { + state_ = 0; + description_ = ""; + thought_ = ""; + actions_ = java.util.Collections.emptyList(); + } - /** - * - * - *
            -           * Search results observed by the search action, it can be snippets info
            -           * or chunk info, depending on the citation type set by the user.
            -           * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult search_results = 2; - * - */ - public com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult - getSearchResults(int index) { - if (searchResultsBuilder_ == null) { - return searchResults_.get(index); - } else { - return searchResultsBuilder_.getMessage(index); - } - } + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.AnswerProto + .internal_static_google_cloud_discoveryengine_v1beta_Answer_Step_descriptor; + } - /** - * - * - *
            -           * Search results observed by the search action, it can be snippets info
            -           * or chunk info, depending on the citation type set by the user.
            -           * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult search_results = 2; - * - */ - public Builder setSearchResults( - int index, - com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult - value) { - if (searchResultsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureSearchResultsIsMutable(); - searchResults_.set(index, value); - onChanged(); - } else { - searchResultsBuilder_.setMessage(index, value); - } - return this; - } + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.AnswerProto + .internal_static_google_cloud_discoveryengine_v1beta_Answer_Step_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.Answer.Step.class, + com.google.cloud.discoveryengine.v1beta.Answer.Step.Builder.class); + } - /** - * - * - *
            -           * Search results observed by the search action, it can be snippets info
            -           * or chunk info, depending on the citation type set by the user.
            -           * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult search_results = 2; - * - */ - public Builder setSearchResults( - int index, - com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult - .Builder - builderForValue) { - if (searchResultsBuilder_ == null) { - ensureSearchResultsIsMutable(); - searchResults_.set(index, builderForValue.build()); - onChanged(); - } else { - searchResultsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } + /** + * + * + *
            +     * Enumeration of the state of the step.
            +     * 
            + * + * Protobuf enum {@code google.cloud.discoveryengine.v1beta.Answer.Step.State} + */ + public enum State implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
            +       * Unknown.
            +       * 
            + * + * STATE_UNSPECIFIED = 0; + */ + STATE_UNSPECIFIED(0), + /** + * + * + *
            +       * Step is currently in progress.
            +       * 
            + * + * IN_PROGRESS = 1; + */ + IN_PROGRESS(1), + /** + * + * + *
            +       * Step currently failed.
            +       * 
            + * + * FAILED = 2; + */ + FAILED(2), + /** + * + * + *
            +       * Step has succeeded.
            +       * 
            + * + * SUCCEEDED = 3; + */ + SUCCEEDED(3), + UNRECOGNIZED(-1), + ; - /** - * - * - *
            -           * Search results observed by the search action, it can be snippets info
            -           * or chunk info, depending on the citation type set by the user.
            -           * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult search_results = 2; - * - */ - public Builder addSearchResults( - com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult - value) { - if (searchResultsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureSearchResultsIsMutable(); - searchResults_.add(value); - onChanged(); - } else { - searchResultsBuilder_.addMessage(value); - } - return this; - } + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "State"); + } - /** - * - * - *
            -           * Search results observed by the search action, it can be snippets info
            -           * or chunk info, depending on the citation type set by the user.
            -           * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult search_results = 2; - * - */ - public Builder addSearchResults( - int index, - com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult - value) { - if (searchResultsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureSearchResultsIsMutable(); - searchResults_.add(index, value); - onChanged(); - } else { - searchResultsBuilder_.addMessage(index, value); - } - return this; - } + /** + * + * + *
            +       * Unknown.
            +       * 
            + * + * STATE_UNSPECIFIED = 0; + */ + public static final int STATE_UNSPECIFIED_VALUE = 0; - /** - * - * - *
            -           * Search results observed by the search action, it can be snippets info
            -           * or chunk info, depending on the citation type set by the user.
            -           * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult search_results = 2; - * - */ - public Builder addSearchResults( - com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult - .Builder - builderForValue) { - if (searchResultsBuilder_ == null) { - ensureSearchResultsIsMutable(); - searchResults_.add(builderForValue.build()); - onChanged(); - } else { - searchResultsBuilder_.addMessage(builderForValue.build()); - } - return this; - } + /** + * + * + *
            +       * Step is currently in progress.
            +       * 
            + * + * IN_PROGRESS = 1; + */ + public static final int IN_PROGRESS_VALUE = 1; - /** - * - * - *
            -           * Search results observed by the search action, it can be snippets info
            -           * or chunk info, depending on the citation type set by the user.
            -           * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult search_results = 2; - * - */ - public Builder addSearchResults( - int index, - com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult - .Builder - builderForValue) { - if (searchResultsBuilder_ == null) { - ensureSearchResultsIsMutable(); - searchResults_.add(index, builderForValue.build()); - onChanged(); - } else { - searchResultsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } + /** + * + * + *
            +       * Step currently failed.
            +       * 
            + * + * FAILED = 2; + */ + public static final int FAILED_VALUE = 2; - /** - * - * - *
            -           * Search results observed by the search action, it can be snippets info
            -           * or chunk info, depending on the citation type set by the user.
            -           * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult search_results = 2; - * - */ - public Builder addAllSearchResults( - java.lang.Iterable< - ? extends - com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation - .SearchResult> - values) { - if (searchResultsBuilder_ == null) { - ensureSearchResultsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, searchResults_); - onChanged(); - } else { - searchResultsBuilder_.addAllMessages(values); - } - return this; - } + /** + * + * + *
            +       * Step has succeeded.
            +       * 
            + * + * SUCCEEDED = 3; + */ + public static final int SUCCEEDED_VALUE = 3; - /** - * - * - *
            -           * Search results observed by the search action, it can be snippets info
            -           * or chunk info, depending on the citation type set by the user.
            -           * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult search_results = 2; - * - */ - public Builder clearSearchResults() { - if (searchResultsBuilder_ == null) { - searchResults_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - searchResultsBuilder_.clear(); - } - return this; - } + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } - /** - * - * - *
            -           * Search results observed by the search action, it can be snippets info
            -           * or chunk info, depending on the citation type set by the user.
            -           * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult search_results = 2; - * - */ - public Builder removeSearchResults(int index) { - if (searchResultsBuilder_ == null) { - ensureSearchResultsIsMutable(); - searchResults_.remove(index); - onChanged(); - } else { - searchResultsBuilder_.remove(index); - } - return this; - } + /** + * @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 State valueOf(int value) { + return forNumber(value); + } - /** - * - * - *
            -           * Search results observed by the search action, it can be snippets info
            -           * or chunk info, depending on the citation type set by the user.
            -           * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult search_results = 2; - * - */ - public com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult - .Builder - getSearchResultsBuilder(int index) { - return internalGetSearchResultsFieldBuilder().getBuilder(index); - } + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static State forNumber(int value) { + switch (value) { + case 0: + return STATE_UNSPECIFIED; + case 1: + return IN_PROGRESS; + case 2: + return FAILED; + case 3: + return SUCCEEDED; + default: + return null; + } + } - /** - * - * - *
            -           * Search results observed by the search action, it can be snippets info
            -           * or chunk info, depending on the citation type set by the user.
            -           * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult search_results = 2; - * - */ - public com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation - .SearchResultOrBuilder - getSearchResultsOrBuilder(int index) { - if (searchResultsBuilder_ == null) { - return searchResults_.get(index); - } else { - return searchResultsBuilder_.getMessageOrBuilder(index); - } - } + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } - /** - * - * - *
            -           * Search results observed by the search action, it can be snippets info
            -           * or chunk info, depending on the citation type set by the user.
            -           * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult search_results = 2; - * - */ - public java.util.List< - ? extends - com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation - .SearchResultOrBuilder> - getSearchResultsOrBuilderList() { - if (searchResultsBuilder_ != null) { - return searchResultsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(searchResults_); + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public State findValueByNumber(int number) { + return State.forNumber(number); } - } + }; - /** - * - * - *
            -           * Search results observed by the search action, it can be snippets info
            -           * or chunk info, depending on the citation type set by the user.
            -           * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult search_results = 2; - * - */ - public com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult - .Builder - addSearchResultsBuilder() { - return internalGetSearchResultsFieldBuilder() - .addBuilder( - com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation - .SearchResult.getDefaultInstance()); - } + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } - /** - * - * - *
            -           * Search results observed by the search action, it can be snippets info
            -           * or chunk info, depending on the citation type set by the user.
            -           * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult search_results = 2; - * - */ - public com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult - .Builder - addSearchResultsBuilder(int index) { - return internalGetSearchResultsFieldBuilder() - .addBuilder( - index, - com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation - .SearchResult.getDefaultInstance()); - } - - /** - * - * - *
            -           * Search results observed by the search action, it can be snippets info
            -           * or chunk info, depending on the citation type set by the user.
            -           * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult search_results = 2; - * - */ - public java.util.List< - com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation - .SearchResult.Builder> - getSearchResultsBuilderList() { - return internalGetSearchResultsFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation - .SearchResult, - com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation - .SearchResult.Builder, - com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation - .SearchResultOrBuilder> - internalGetSearchResultsFieldBuilder() { - if (searchResultsBuilder_ == null) { - searchResultsBuilder_ = - new com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation - .SearchResult, - com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation - .SearchResult.Builder, - com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation - .SearchResultOrBuilder>( - searchResults_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - searchResults_ = null; - } - return searchResultsBuilder_; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation) - } - - // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation) - private static final com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = - new com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation(); - } - - public static com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation - getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Observation parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException() - .setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); } - private int bitField0_; - private int actionCase_ = 0; - - @SuppressWarnings("serial") - private java.lang.Object action_; - - public enum ActionCase - implements - com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - SEARCH_ACTION(2), - ACTION_NOT_SET(0); - private final int value; + public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.Answer.Step.getDescriptor() + .getEnumTypes() + .get(0); + } - private ActionCase(int value) { - this.value = value; - } + private static final State[] VALUES = values(); - /** - * @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 ActionCase valueOf(int value) { - return forNumber(value); + public static State valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); } - - public static ActionCase forNumber(int value) { - switch (value) { - case 2: - return SEARCH_ACTION; - case 0: - return ACTION_NOT_SET; - default: - return null; - } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; } + return VALUES[desc.getIndex()]; + } - public int getNumber() { - return this.value; - } - }; + private final int value; - public ActionCase getActionCase() { - return ActionCase.forNumber(actionCase_); + private State(int value) { + this.value = value; } - public static final int SEARCH_ACTION_FIELD_NUMBER = 2; + // @@protoc_insertion_point(enum_scope:google.cloud.discoveryengine.v1beta.Answer.Step.State) + } + + public interface ActionOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.Answer.Step.Action) + com.google.protobuf.MessageOrBuilder { /** * @@ -18826,10 +16636,7 @@ public ActionCase getActionCase() { * * @return Whether the searchAction field is set. */ - @java.lang.Override - public boolean hasSearchAction() { - return actionCase_ == 2; - } + boolean hasSearchAction(); /** * @@ -18844,15 +16651,7 @@ public boolean hasSearchAction() { * * @return The searchAction. */ - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.SearchAction - getSearchAction() { - if (actionCase_ == 2) { - return (com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.SearchAction) action_; - } - return com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.SearchAction - .getDefaultInstance(); - } + com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.SearchAction getSearchAction(); /** * @@ -18865,18 +16664,8 @@ public boolean hasSearchAction() { * .google.cloud.discoveryengine.v1beta.Answer.Step.Action.SearchAction search_action = 2; *
            */ - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.SearchActionOrBuilder - getSearchActionOrBuilder() { - if (actionCase_ == 2) { - return (com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.SearchAction) action_; - } - return com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.SearchAction - .getDefaultInstance(); - } - - public static final int OBSERVATION_FIELD_NUMBER = 3; - private com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation observation_; + com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.SearchActionOrBuilder + getSearchActionOrBuilder(); /** * @@ -18890,10 +16679,7 @@ public boolean hasSearchAction() { * * @return Whether the observation field is set. */ - @java.lang.Override - public boolean hasObservation() { - return ((bitField0_ & 0x00000001) != 0); - } + boolean hasObservation(); /** * @@ -18907,14 +16693,7 @@ public boolean hasObservation() { * * @return The observation. */ - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation - getObservation() { - return observation_ == null - ? com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation - .getDefaultInstance() - : observation_; - } + com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation getObservation(); /** * @@ -18926,640 +16705,365 @@ public boolean hasObservation() { * .google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation observation = 3; * */ - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.ObservationOrBuilder - getObservationOrBuilder() { - return observation_ == null - ? com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation - .getDefaultInstance() - : observation_; - } + com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.ObservationOrBuilder + getObservationOrBuilder(); - private byte memoizedIsInitialized = -1; + com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.ActionCase getActionCase(); + } - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + /** + * + * + *
            +     * Action.
            +     * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.Answer.Step.Action} + */ + public static final class Action extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.Answer.Step.Action) + ActionOrBuilder { + private static final long serialVersionUID = 0L; - memoizedIsInitialized = 1; - return true; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Action"); } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (actionCase_ == 2) { - output.writeMessage( - 2, (com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.SearchAction) action_); - } - if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(3, getObservation()); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (actionCase_ == 2) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 2, - (com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.SearchAction) - action_); - } - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getObservation()); - } - 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.discoveryengine.v1beta.Answer.Step.Action)) { - return super.equals(obj); - } - com.google.cloud.discoveryengine.v1beta.Answer.Step.Action other = - (com.google.cloud.discoveryengine.v1beta.Answer.Step.Action) obj; - - if (hasObservation() != other.hasObservation()) return false; - if (hasObservation()) { - if (!getObservation().equals(other.getObservation())) return false; - } - if (!getActionCase().equals(other.getActionCase())) return false; - switch (actionCase_) { - case 2: - if (!getSearchAction().equals(other.getSearchAction())) return false; - break; - case 0: - default: - } - 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 (hasObservation()) { - hash = (37 * hash) + OBSERVATION_FIELD_NUMBER; - hash = (53 * hash) + getObservation().hashCode(); - } - switch (actionCase_) { - case 2: - hash = (37 * hash) + SEARCH_ACTION_FIELD_NUMBER; - hash = (53 * hash) + getSearchAction().hashCode(); - break; - case 0: - default: - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.discoveryengine.v1beta.Answer.Step.Action parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.discoveryengine.v1beta.Answer.Step.Action 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.discoveryengine.v1beta.Answer.Step.Action parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.discoveryengine.v1beta.Answer.Step.Action 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.discoveryengine.v1beta.Answer.Step.Action parseFrom( - byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.discoveryengine.v1beta.Answer.Step.Action parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.discoveryengine.v1beta.Answer.Step.Action parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.discoveryengine.v1beta.Answer.Step.Action 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.discoveryengine.v1beta.Answer.Step.Action parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.discoveryengine.v1beta.Answer.Step.Action parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); + // Use Action.newBuilder() to construct. + private Action(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); } - public static com.google.cloud.discoveryengine.v1beta.Answer.Step.Action parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } + private Action() {} - public static com.google.cloud.discoveryengine.v1beta.Answer.Step.Action parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.AnswerProto + .internal_static_google_cloud_discoveryengine_v1beta_Answer_Step_Action_descriptor; } @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.AnswerProto + .internal_static_google_cloud_discoveryengine_v1beta_Answer_Step_Action_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.class, + com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Builder.class); } - public static Builder newBuilder( - com.google.cloud.discoveryengine.v1beta.Answer.Step.Action prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } + public interface SearchActionOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.Answer.Step.Action.SearchAction) + com.google.protobuf.MessageOrBuilder { - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } + /** + * + * + *
            +         * The query to search.
            +         * 
            + * + * string query = 1; + * + * @return The query. + */ + java.lang.String getQuery(); - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; + /** + * + * + *
            +         * The query to search.
            +         * 
            + * + * string query = 1; + * + * @return The bytes for query. + */ + com.google.protobuf.ByteString getQueryBytes(); } /** * * *
            -       * Action.
            +       * Search action.
                    * 
            * - * Protobuf type {@code google.cloud.discoveryengine.v1beta.Answer.Step.Action} + * Protobuf type {@code google.cloud.discoveryengine.v1beta.Answer.Step.Action.SearchAction} */ - public static final class Builder - extends com.google.protobuf.GeneratedMessage.Builder + public static final class SearchAction extends com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.Answer.Step.Action) - com.google.cloud.discoveryengine.v1beta.Answer.Step.ActionOrBuilder { + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.Answer.Step.Action.SearchAction) + SearchActionOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "SearchAction"); + } + + // Use SearchAction.newBuilder() to construct. + private SearchAction(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private SearchAction() { + query_ = ""; + } + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.discoveryengine.v1beta.AnswerProto - .internal_static_google_cloud_discoveryengine_v1beta_Answer_Step_Action_descriptor; + .internal_static_google_cloud_discoveryengine_v1beta_Answer_Step_Action_SearchAction_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.discoveryengine.v1beta.AnswerProto - .internal_static_google_cloud_discoveryengine_v1beta_Answer_Step_Action_fieldAccessorTable + .internal_static_google_cloud_discoveryengine_v1beta_Answer_Step_Action_SearchAction_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.class, - com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Builder.class); + com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.SearchAction.class, + com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.SearchAction.Builder + .class); } - // Construct using com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + public static final int QUERY_FIELD_NUMBER = 1; - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } + @SuppressWarnings("serial") + private volatile java.lang.Object query_ = ""; - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - internalGetObservationFieldBuilder(); + /** + * + * + *
            +         * The query to search.
            +         * 
            + * + * string query = 1; + * + * @return The query. + */ + @java.lang.Override + public java.lang.String getQuery() { + java.lang.Object ref = query_; + 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(); + query_ = s; + return s; } } + /** + * + * + *
            +         * The query to search.
            +         * 
            + * + * string query = 1; + * + * @return The bytes for query. + */ @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - if (searchActionBuilder_ != null) { - searchActionBuilder_.clear(); - } - observation_ = null; - if (observationBuilder_ != null) { - observationBuilder_.dispose(); - observationBuilder_ = null; + public com.google.protobuf.ByteString getQueryBytes() { + java.lang.Object ref = query_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + query_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; } - actionCase_ = 0; - action_ = null; - return this; } - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.discoveryengine.v1beta.AnswerProto - .internal_static_google_cloud_discoveryengine_v1beta_Answer_Step_Action_descriptor; - } + private byte memoizedIsInitialized = -1; @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.Answer.Step.Action - getDefaultInstanceForType() { - return com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.getDefaultInstance(); - } + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.Answer.Step.Action build() { - com.google.cloud.discoveryengine.v1beta.Answer.Step.Action result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; + memoizedIsInitialized = 1; + return true; } @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.Answer.Step.Action buildPartial() { - com.google.cloud.discoveryengine.v1beta.Answer.Step.Action result = - new com.google.cloud.discoveryengine.v1beta.Answer.Step.Action(this); - if (bitField0_ != 0) { - buildPartial0(result); + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(query_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, query_); } - buildPartialOneofs(result); - onBuilt(); - return result; + getUnknownFields().writeTo(output); } - private void buildPartial0( - com.google.cloud.discoveryengine.v1beta.Answer.Step.Action result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000002) != 0)) { - result.observation_ = - observationBuilder_ == null ? observation_ : observationBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - result.bitField0_ |= to_bitField0_; - } + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; - private void buildPartialOneofs( - com.google.cloud.discoveryengine.v1beta.Answer.Step.Action result) { - result.actionCase_ = actionCase_; - result.action_ = this.action_; - if (actionCase_ == 2 && searchActionBuilder_ != null) { - result.action_ = searchActionBuilder_.build(); + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(query_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, query_); } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; } @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.discoveryengine.v1beta.Answer.Step.Action) { - return mergeFrom((com.google.cloud.discoveryengine.v1beta.Answer.Step.Action) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.discoveryengine.v1beta.Answer.Step.Action other) { - if (other - == com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.getDefaultInstance()) - return this; - if (other.hasObservation()) { - mergeObservation(other.getObservation()); + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; } - switch (other.getActionCase()) { - case SEARCH_ACTION: - { - mergeSearchAction(other.getSearchAction()); - break; - } - case ACTION_NOT_SET: - { - break; - } + if (!(obj + instanceof com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.SearchAction)) { + return super.equals(obj); } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } + com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.SearchAction other = + (com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.SearchAction) obj; - @java.lang.Override - public final boolean isInitialized() { + if (!getQuery().equals(other.getQuery())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 18: - { - input.readMessage( - internalGetSearchActionFieldBuilder().getBuilder(), extensionRegistry); - actionCase_ = 2; - break; - } // case 18 - case 26: - { - input.readMessage( - internalGetObservationFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000002; - break; - } // case 26 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + QUERY_FIELD_NUMBER; + hash = (53 * hash) + getQuery().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; } - private int actionCase_ = 0; - private java.lang.Object action_; - - public ActionCase getActionCase() { - return ActionCase.forNumber(actionCase_); + public static com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.SearchAction + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); } - public Builder clearAction() { - actionCase_ = 0; - action_ = null; - onChanged(); - return this; + public static com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.SearchAction + parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); } - private int bitField0_; + public static com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.SearchAction + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.SearchAction, - com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.SearchAction.Builder, - com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.SearchActionOrBuilder> - searchActionBuilder_; + public static com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.SearchAction + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - /** - * - * - *
            -         * Search action.
            -         * 
            - * - * - * .google.cloud.discoveryengine.v1beta.Answer.Step.Action.SearchAction search_action = 2; - * - * - * @return Whether the searchAction field is set. - */ - @java.lang.Override - public boolean hasSearchAction() { - return actionCase_ == 2; + public static com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.SearchAction + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); } - /** - * - * - *
            -         * Search action.
            -         * 
            - * - * - * .google.cloud.discoveryengine.v1beta.Answer.Step.Action.SearchAction search_action = 2; - * - * - * @return The searchAction. - */ - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.SearchAction - getSearchAction() { - if (searchActionBuilder_ == null) { - if (actionCase_ == 2) { - return (com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.SearchAction) - action_; - } - return com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.SearchAction - .getDefaultInstance(); - } else { - if (actionCase_ == 2) { - return searchActionBuilder_.getMessage(); - } - return com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.SearchAction - .getDefaultInstance(); - } + public static com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.SearchAction + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); } - /** - * - * - *
            -         * Search action.
            -         * 
            - * - * - * .google.cloud.discoveryengine.v1beta.Answer.Step.Action.SearchAction search_action = 2; - * - */ - public Builder setSearchAction( - com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.SearchAction value) { - if (searchActionBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - action_ = value; - onChanged(); - } else { - searchActionBuilder_.setMessage(value); - } - actionCase_ = 2; - return this; + public static com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.SearchAction + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } - /** - * - * - *
            -         * Search action.
            -         * 
            - * - * - * .google.cloud.discoveryengine.v1beta.Answer.Step.Action.SearchAction search_action = 2; - * - */ - public Builder setSearchAction( - com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.SearchAction.Builder - builderForValue) { - if (searchActionBuilder_ == null) { - action_ = builderForValue.build(); - onChanged(); - } else { - searchActionBuilder_.setMessage(builderForValue.build()); - } - actionCase_ = 2; - return this; + public static com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.SearchAction + parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); } - /** - * - * - *
            -         * Search action.
            -         * 
            - * - * - * .google.cloud.discoveryengine.v1beta.Answer.Step.Action.SearchAction search_action = 2; - * - */ - public Builder mergeSearchAction( - com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.SearchAction value) { - if (searchActionBuilder_ == null) { - if (actionCase_ == 2 - && action_ - != com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.SearchAction - .getDefaultInstance()) { - action_ = - com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.SearchAction - .newBuilder( - (com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.SearchAction) - action_) - .mergeFrom(value) - .buildPartial(); - } else { - action_ = value; - } - onChanged(); - } else { - if (actionCase_ == 2) { - searchActionBuilder_.mergeFrom(value); - } else { - searchActionBuilder_.setMessage(value); - } - } - actionCase_ = 2; - return this; + public static com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.SearchAction + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } - /** - * - * - *
            -         * Search action.
            -         * 
            - * - * - * .google.cloud.discoveryengine.v1beta.Answer.Step.Action.SearchAction search_action = 2; - * - */ - public Builder clearSearchAction() { - if (searchActionBuilder_ == null) { - if (actionCase_ == 2) { - actionCase_ = 0; - action_ = null; - onChanged(); - } - } else { - if (actionCase_ == 2) { - actionCase_ = 0; - action_ = null; - } - searchActionBuilder_.clear(); - } - return this; + public static com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.SearchAction + parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); } - /** - * - * - *
            -         * Search action.
            -         * 
            - * - * - * .google.cloud.discoveryengine.v1beta.Answer.Step.Action.SearchAction search_action = 2; - * - */ - public com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.SearchAction.Builder - getSearchActionBuilder() { - return internalGetSearchActionFieldBuilder().getBuilder(); + public static com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.SearchAction + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.SearchAction + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); } - /** - * - * - *
            -         * Search action.
            -         * 
            - * - * - * .google.cloud.discoveryengine.v1beta.Answer.Step.Action.SearchAction search_action = 2; - * - */ @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.SearchActionOrBuilder - getSearchActionOrBuilder() { - if ((actionCase_ == 2) && (searchActionBuilder_ != null)) { - return searchActionBuilder_.getMessageOrBuilder(); - } else { - if (actionCase_ == 2) { - return (com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.SearchAction) - action_; - } - return com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.SearchAction - .getDefaultInstance(); - } + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.SearchAction 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; } /** @@ -19569,5431 +17073,14459 @@ public Builder clearSearchAction() { * Search action. *
            * - * - * .google.cloud.discoveryengine.v1beta.Answer.Step.Action.SearchAction search_action = 2; - * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.Answer.Step.Action.SearchAction} */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.SearchAction, - com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.SearchAction.Builder, - com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.SearchActionOrBuilder> - internalGetSearchActionFieldBuilder() { - if (searchActionBuilder_ == null) { - if (!(actionCase_ == 2)) { - action_ = - com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.SearchAction - .getDefaultInstance(); - } - searchActionBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.SearchAction, - com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.SearchAction.Builder, - com.google.cloud.discoveryengine.v1beta.Answer.Step.Action - .SearchActionOrBuilder>( - (com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.SearchAction) - action_, - getParentForChildren(), - isClean()); - action_ = null; + public static final class Builder + extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.Answer.Step.Action.SearchAction) + com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.SearchActionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.AnswerProto + .internal_static_google_cloud_discoveryengine_v1beta_Answer_Step_Action_SearchAction_descriptor; } - actionCase_ = 2; - onChanged(); - return searchActionBuilder_; - } - private com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation observation_; - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation, - com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.Builder, - com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.ObservationOrBuilder> - observationBuilder_; + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.AnswerProto + .internal_static_google_cloud_discoveryengine_v1beta_Answer_Step_Action_SearchAction_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.SearchAction.class, + com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.SearchAction.Builder + .class); + } - /** - * - * - *
            -         * Observation.
            -         * 
            - * - * - * .google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation observation = 3; - * - * - * @return Whether the observation field is set. - */ - public boolean hasObservation() { - return ((bitField0_ & 0x00000002) != 0); - } + // Construct using + // com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.SearchAction.newBuilder() + private Builder() {} - /** - * - * - *
            -         * Observation.
            -         * 
            - * - * - * .google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation observation = 3; - * - * - * @return The observation. - */ - public com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation - getObservation() { - if (observationBuilder_ == null) { - return observation_ == null - ? com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation - .getDefaultInstance() - : observation_; - } else { - return observationBuilder_.getMessage(); + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); } - } - /** - * - * - *
            -         * Observation.
            -         * 
            - * - * - * .google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation observation = 3; - * - */ - public Builder setObservation( - com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation value) { - if (observationBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + query_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1beta.AnswerProto + .internal_static_google_cloud_discoveryengine_v1beta_Answer_Step_Action_SearchAction_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.SearchAction + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.SearchAction + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.SearchAction build() { + com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.SearchAction result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); } - observation_ = value; - } else { - observationBuilder_.setMessage(value); + return result; } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
            -         * Observation.
            -         * 
            - * - * - * .google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation observation = 3; - * - */ - public Builder setObservation( - com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.Builder - builderForValue) { - if (observationBuilder_ == null) { - observation_ = builderForValue.build(); - } else { - observationBuilder_.setMessage(builderForValue.build()); + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.SearchAction + buildPartial() { + com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.SearchAction result = + new com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.SearchAction(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
            -         * Observation.
            -         * 
            - * - * - * .google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation observation = 3; - * - */ - public Builder mergeObservation( - com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation value) { - if (observationBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0) - && observation_ != null - && observation_ - != com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation - .getDefaultInstance()) { - getObservationBuilder().mergeFrom(value); + private void buildPartial0( + com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.SearchAction result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.query_ = query_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.SearchAction) { + return mergeFrom( + (com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.SearchAction) other); } else { - observation_ = value; + super.mergeFrom(other); + return this; } - } else { - observationBuilder_.mergeFrom(value); } - if (observation_ != null) { - bitField0_ |= 0x00000002; + + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.SearchAction other) { + if (other + == com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.SearchAction + .getDefaultInstance()) return this; + if (!other.getQuery().isEmpty()) { + query_ = other.query_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); + return this; } - return this; - } - /** - * - * - *
            -         * Observation.
            -         * 
            - * - * - * .google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation observation = 3; - * - */ - public Builder clearObservation() { - bitField0_ = (bitField0_ & ~0x00000002); - observation_ = null; - if (observationBuilder_ != null) { - observationBuilder_.dispose(); - observationBuilder_ = null; - } - onChanged(); - return this; + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + query_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object query_ = ""; + + /** + * + * + *
            +           * The query to search.
            +           * 
            + * + * string query = 1; + * + * @return The query. + */ + public java.lang.String getQuery() { + java.lang.Object ref = query_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + query_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
            +           * The query to search.
            +           * 
            + * + * string query = 1; + * + * @return The bytes for query. + */ + public com.google.protobuf.ByteString getQueryBytes() { + java.lang.Object ref = query_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + query_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
            +           * The query to search.
            +           * 
            + * + * string query = 1; + * + * @param value The query to set. + * @return This builder for chaining. + */ + public Builder setQuery(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + query_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
            +           * The query to search.
            +           * 
            + * + * string query = 1; + * + * @return This builder for chaining. + */ + public Builder clearQuery() { + query_ = getDefaultInstance().getQuery(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
            +           * The query to search.
            +           * 
            + * + * string query = 1; + * + * @param value The bytes for query to set. + * @return This builder for chaining. + */ + public Builder setQueryBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + query_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.Answer.Step.Action.SearchAction) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.Answer.Step.Action.SearchAction) + private static final com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.SearchAction + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.SearchAction(); + } + + public static com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.SearchAction + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SearchAction parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.SearchAction + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; } + } + + public interface ObservationOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation) + com.google.protobuf.MessageOrBuilder { /** * * *
            -         * Observation.
            +         * Search results observed by the search action, it can be snippets info
            +         * or chunk info, depending on the citation type set by the user.
                      * 
            * * - * .google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation observation = 3; + * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult search_results = 2; * */ - public com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.Builder - getObservationBuilder() { - bitField0_ |= 0x00000002; - onChanged(); - return internalGetObservationFieldBuilder().getBuilder(); - } + java.util.List< + com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult> + getSearchResultsList(); /** * * *
            -         * Observation.
            +         * Search results observed by the search action, it can be snippets info
            +         * or chunk info, depending on the citation type set by the user.
                      * 
            * * - * .google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation observation = 3; + * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult search_results = 2; * */ - public com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.ObservationOrBuilder - getObservationOrBuilder() { - if (observationBuilder_ != null) { - return observationBuilder_.getMessageOrBuilder(); - } else { - return observation_ == null - ? com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation - .getDefaultInstance() - : observation_; - } - } + com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult + getSearchResults(int index); /** * * *
            -         * Observation.
            +         * Search results observed by the search action, it can be snippets info
            +         * or chunk info, depending on the citation type set by the user.
                      * 
            * * - * .google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation observation = 3; + * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult search_results = 2; * */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation, - com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.Builder, - com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.ObservationOrBuilder> - internalGetObservationFieldBuilder() { - if (observationBuilder_ == null) { - observationBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation, - com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.Builder, - com.google.cloud.discoveryengine.v1beta.Answer.Step.Action - .ObservationOrBuilder>(getObservation(), getParentForChildren(), isClean()); - observation_ = null; - } - return observationBuilder_; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.Answer.Step.Action) - } + int getSearchResultsCount(); - // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.Answer.Step.Action) - private static final com.google.cloud.discoveryengine.v1beta.Answer.Step.Action - DEFAULT_INSTANCE; + /** + * + * + *
            +         * Search results observed by the search action, it can be snippets info
            +         * or chunk info, depending on the citation type set by the user.
            +         * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult search_results = 2; + * + */ + java.util.List< + ? extends + com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation + .SearchResultOrBuilder> + getSearchResultsOrBuilderList(); - static { - DEFAULT_INSTANCE = new com.google.cloud.discoveryengine.v1beta.Answer.Step.Action(); + /** + * + * + *
            +         * Search results observed by the search action, it can be snippets info
            +         * or chunk info, depending on the citation type set by the user.
            +         * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult search_results = 2; + * + */ + com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResultOrBuilder + getSearchResultsOrBuilder(int index); } - public static com.google.cloud.discoveryengine.v1beta.Answer.Step.Action - getDefaultInstance() { - return DEFAULT_INSTANCE; - } + /** + * + * + *
            +       * Observation.
            +       * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation} + */ + public static final class Observation extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation) + ObservationOrBuilder { + private static final long serialVersionUID = 0L; - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Action parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException() - .setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Observation"); + } - public static com.google.protobuf.Parser parser() { - return PARSER; - } + // Use Observation.newBuilder() to construct. + private Observation(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + private Observation() { + searchResults_ = java.util.Collections.emptyList(); + } - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.Answer.Step.Action - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - } + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.AnswerProto + .internal_static_google_cloud_discoveryengine_v1beta_Answer_Step_Action_Observation_descriptor; + } - public static final int STATE_FIELD_NUMBER = 1; - private int state_ = 0; + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.AnswerProto + .internal_static_google_cloud_discoveryengine_v1beta_Answer_Step_Action_Observation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.class, + com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.Builder + .class); + } - /** - * - * - *
            -     * The state of the step.
            -     * 
            - * - * .google.cloud.discoveryengine.v1beta.Answer.Step.State state = 1; - * - * @return The enum numeric value on the wire for state. - */ - @java.lang.Override - public int getStateValue() { - return state_; - } + public interface SearchResultOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult) + com.google.protobuf.MessageOrBuilder { - /** - * - * - *
            -     * The state of the step.
            -     * 
            - * - * .google.cloud.discoveryengine.v1beta.Answer.Step.State state = 1; - * - * @return The state. - */ - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.Answer.Step.State getState() { - com.google.cloud.discoveryengine.v1beta.Answer.Step.State result = - com.google.cloud.discoveryengine.v1beta.Answer.Step.State.forNumber(state_); - return result == null - ? com.google.cloud.discoveryengine.v1beta.Answer.Step.State.UNRECOGNIZED - : result; - } + /** + * + * + *
            +           * Document resource name.
            +           * 
            + * + * string document = 1; + * + * @return The document. + */ + java.lang.String getDocument(); - public static final int DESCRIPTION_FIELD_NUMBER = 2; + /** + * + * + *
            +           * Document resource name.
            +           * 
            + * + * string document = 1; + * + * @return The bytes for document. + */ + com.google.protobuf.ByteString getDocumentBytes(); - @SuppressWarnings("serial") - private volatile java.lang.Object description_ = ""; + /** + * + * + *
            +           * URI for the document.
            +           * 
            + * + * string uri = 2; + * + * @return The uri. + */ + java.lang.String getUri(); - /** - * - * - *
            -     * The description of the step.
            -     * 
            - * - * string description = 2; - * - * @return The description. - */ - @java.lang.Override - public java.lang.String getDescription() { - java.lang.Object ref = description_; - 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(); - description_ = s; - return s; - } - } + /** + * + * + *
            +           * URI for the document.
            +           * 
            + * + * string uri = 2; + * + * @return The bytes for uri. + */ + com.google.protobuf.ByteString getUriBytes(); - /** - * - * - *
            -     * The description of the step.
            -     * 
            - * - * string description = 2; - * - * @return The bytes for description. - */ - @java.lang.Override - public com.google.protobuf.ByteString getDescriptionBytes() { - java.lang.Object ref = description_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - description_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } + /** + * + * + *
            +           * Title.
            +           * 
            + * + * string title = 3; + * + * @return The title. + */ + java.lang.String getTitle(); - public static final int THOUGHT_FIELD_NUMBER = 3; + /** + * + * + *
            +           * Title.
            +           * 
            + * + * string title = 3; + * + * @return The bytes for title. + */ + com.google.protobuf.ByteString getTitleBytes(); - @SuppressWarnings("serial") - private volatile java.lang.Object thought_ = ""; + /** + * + * + *
            +           * If citation_type is DOCUMENT_LEVEL_CITATION, populate document
            +           * level snippets.
            +           * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult.SnippetInfo snippet_info = 4; + * + */ + java.util.List< + com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation + .SearchResult.SnippetInfo> + getSnippetInfoList(); - /** - * - * - *
            -     * The thought of the step.
            -     * 
            - * - * string thought = 3; - * - * @return The thought. - */ - @java.lang.Override - public java.lang.String getThought() { - java.lang.Object ref = thought_; - 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(); - thought_ = s; - return s; - } - } + /** + * + * + *
            +           * If citation_type is DOCUMENT_LEVEL_CITATION, populate document
            +           * level snippets.
            +           * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult.SnippetInfo snippet_info = 4; + * + */ + com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult + .SnippetInfo + getSnippetInfo(int index); - /** - * - * - *
            -     * The thought of the step.
            -     * 
            - * - * string thought = 3; - * - * @return The bytes for thought. - */ - @java.lang.Override - public com.google.protobuf.ByteString getThoughtBytes() { - java.lang.Object ref = thought_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - thought_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } + /** + * + * + *
            +           * If citation_type is DOCUMENT_LEVEL_CITATION, populate document
            +           * level snippets.
            +           * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult.SnippetInfo snippet_info = 4; + * + */ + int getSnippetInfoCount(); - public static final int ACTIONS_FIELD_NUMBER = 4; + /** + * + * + *
            +           * If citation_type is DOCUMENT_LEVEL_CITATION, populate document
            +           * level snippets.
            +           * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult.SnippetInfo snippet_info = 4; + * + */ + java.util.List< + ? extends + com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation + .SearchResult.SnippetInfoOrBuilder> + getSnippetInfoOrBuilderList(); - @SuppressWarnings("serial") - private java.util.List actions_; + /** + * + * + *
            +           * If citation_type is DOCUMENT_LEVEL_CITATION, populate document
            +           * level snippets.
            +           * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult.SnippetInfo snippet_info = 4; + * + */ + com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult + .SnippetInfoOrBuilder + getSnippetInfoOrBuilder(int index); - /** - * - * - *
            -     * Actions.
            -     * 
            - * - * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action actions = 4; - */ - @java.lang.Override - public java.util.List - getActionsList() { - return actions_; - } + /** + * + * + *
            +           * If citation_type is CHUNK_LEVEL_CITATION and chunk mode is on,
            +           * populate chunk info.
            +           * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult.ChunkInfo chunk_info = 5; + * + */ + java.util.List< + com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation + .SearchResult.ChunkInfo> + getChunkInfoList(); - /** - * - * - *
            -     * Actions.
            -     * 
            - * - * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action actions = 4; - */ - @java.lang.Override - public java.util.List< - ? extends com.google.cloud.discoveryengine.v1beta.Answer.Step.ActionOrBuilder> - getActionsOrBuilderList() { - return actions_; - } + /** + * + * + *
            +           * If citation_type is CHUNK_LEVEL_CITATION and chunk mode is on,
            +           * populate chunk info.
            +           * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult.ChunkInfo chunk_info = 5; + * + */ + com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult + .ChunkInfo + getChunkInfo(int index); - /** - * - * - *
            -     * Actions.
            -     * 
            - * - * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action actions = 4; - */ - @java.lang.Override - public int getActionsCount() { - return actions_.size(); - } + /** + * + * + *
            +           * If citation_type is CHUNK_LEVEL_CITATION and chunk mode is on,
            +           * populate chunk info.
            +           * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult.ChunkInfo chunk_info = 5; + * + */ + int getChunkInfoCount(); - /** - * - * - *
            -     * Actions.
            -     * 
            - * - * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action actions = 4; - */ - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.Answer.Step.Action getActions(int index) { - return actions_.get(index); - } - - /** - * - * - *
            -     * Actions.
            -     * 
            - * - * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action actions = 4; - */ - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.Answer.Step.ActionOrBuilder getActionsOrBuilder( - int index) { - return actions_.get(index); - } - - private byte memoizedIsInitialized = -1; + /** + * + * + *
            +           * If citation_type is CHUNK_LEVEL_CITATION and chunk mode is on,
            +           * populate chunk info.
            +           * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult.ChunkInfo chunk_info = 5; + * + */ + java.util.List< + ? extends + com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation + .SearchResult.ChunkInfoOrBuilder> + getChunkInfoOrBuilderList(); - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + /** + * + * + *
            +           * If citation_type is CHUNK_LEVEL_CITATION and chunk mode is on,
            +           * populate chunk info.
            +           * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult.ChunkInfo chunk_info = 5; + * + */ + com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult + .ChunkInfoOrBuilder + getChunkInfoOrBuilder(int index); - memoizedIsInitialized = 1; - return true; - } + /** + * + * + *
            +           * Data representation.
            +           * The structured JSON data for the document.
            +           * It's populated from the struct data from the Document, or the
            +           * Chunk in search result.
            +           * 
            + * + * .google.protobuf.Struct struct_data = 6; + * + * @return Whether the structData field is set. + */ + boolean hasStructData(); - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (state_ - != com.google.cloud.discoveryengine.v1beta.Answer.Step.State.STATE_UNSPECIFIED - .getNumber()) { - output.writeEnum(1, state_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(description_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 2, description_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(thought_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 3, thought_); - } - for (int i = 0; i < actions_.size(); i++) { - output.writeMessage(4, actions_.get(i)); - } - getUnknownFields().writeTo(output); - } + /** + * + * + *
            +           * Data representation.
            +           * The structured JSON data for the document.
            +           * It's populated from the struct data from the Document, or the
            +           * Chunk in search result.
            +           * 
            + * + * .google.protobuf.Struct struct_data = 6; + * + * @return The structData. + */ + com.google.protobuf.Struct getStructData(); - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; + /** + * + * + *
            +           * Data representation.
            +           * The structured JSON data for the document.
            +           * It's populated from the struct data from the Document, or the
            +           * Chunk in search result.
            +           * 
            + * + * .google.protobuf.Struct struct_data = 6; + */ + com.google.protobuf.StructOrBuilder getStructDataOrBuilder(); + } - size = 0; - if (state_ - != com.google.cloud.discoveryengine.v1beta.Answer.Step.State.STATE_UNSPECIFIED - .getNumber()) { - size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, state_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(description_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(2, description_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(thought_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(3, thought_); - } - for (int i = 0; i < actions_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, actions_.get(i)); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } + /** + * Protobuf type {@code + * google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult} + */ + public static final class SearchResult extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult) + SearchResultOrBuilder { + private static final long serialVersionUID = 0L; - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.discoveryengine.v1beta.Answer.Step)) { - return super.equals(obj); - } - com.google.cloud.discoveryengine.v1beta.Answer.Step other = - (com.google.cloud.discoveryengine.v1beta.Answer.Step) obj; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "SearchResult"); + } - if (state_ != other.state_) return false; - if (!getDescription().equals(other.getDescription())) return false; - if (!getThought().equals(other.getThought())) return false; - if (!getActionsList().equals(other.getActionsList())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } + // Use SearchResult.newBuilder() to construct. + private SearchResult(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + STATE_FIELD_NUMBER; - hash = (53 * hash) + state_; - hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; - hash = (53 * hash) + getDescription().hashCode(); - hash = (37 * hash) + THOUGHT_FIELD_NUMBER; - hash = (53 * hash) + getThought().hashCode(); - if (getActionsCount() > 0) { - hash = (37 * hash) + ACTIONS_FIELD_NUMBER; - hash = (53 * hash) + getActionsList().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } + private SearchResult() { + document_ = ""; + uri_ = ""; + title_ = ""; + snippetInfo_ = java.util.Collections.emptyList(); + chunkInfo_ = java.util.Collections.emptyList(); + } - public static com.google.cloud.discoveryengine.v1beta.Answer.Step parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.AnswerProto + .internal_static_google_cloud_discoveryengine_v1beta_Answer_Step_Action_Observation_SearchResult_descriptor; + } - public static com.google.cloud.discoveryengine.v1beta.Answer.Step parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.AnswerProto + .internal_static_google_cloud_discoveryengine_v1beta_Answer_Step_Action_Observation_SearchResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation + .SearchResult.class, + com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation + .SearchResult.Builder.class); + } - public static com.google.cloud.discoveryengine.v1beta.Answer.Step parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } + public interface SnippetInfoOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult.SnippetInfo) + com.google.protobuf.MessageOrBuilder { - public static com.google.cloud.discoveryengine.v1beta.Answer.Step 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.discoveryengine.v1beta.Answer.Step parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.discoveryengine.v1beta.Answer.Step parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } + /** + * + * + *
            +             * Snippet content.
            +             * 
            + * + * string snippet = 1; + * + * @return The snippet. + */ + java.lang.String getSnippet(); - public static com.google.cloud.discoveryengine.v1beta.Answer.Step parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } + /** + * + * + *
            +             * Snippet content.
            +             * 
            + * + * string snippet = 1; + * + * @return The bytes for snippet. + */ + com.google.protobuf.ByteString getSnippetBytes(); - public static com.google.cloud.discoveryengine.v1beta.Answer.Step parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } + /** + * + * + *
            +             * Status of the snippet defined by the search team.
            +             * 
            + * + * string snippet_status = 2; + * + * @return The snippetStatus. + */ + java.lang.String getSnippetStatus(); - public static com.google.cloud.discoveryengine.v1beta.Answer.Step parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } + /** + * + * + *
            +             * Status of the snippet defined by the search team.
            +             * 
            + * + * string snippet_status = 2; + * + * @return The bytes for snippetStatus. + */ + com.google.protobuf.ByteString getSnippetStatusBytes(); + } - public static com.google.cloud.discoveryengine.v1beta.Answer.Step parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } + /** + * + * + *
            +           * Snippet information.
            +           * 
            + * + * Protobuf type {@code + * google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult.SnippetInfo} + */ + public static final class SnippetInfo extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult.SnippetInfo) + SnippetInfoOrBuilder { + private static final long serialVersionUID = 0L; - public static com.google.cloud.discoveryengine.v1beta.Answer.Step parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "SnippetInfo"); + } - public static com.google.cloud.discoveryengine.v1beta.Answer.Step parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } + // Use SnippetInfo.newBuilder() to construct. + private SnippetInfo(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } + private SnippetInfo() { + snippet_ = ""; + snippetStatus_ = ""; + } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.AnswerProto + .internal_static_google_cloud_discoveryengine_v1beta_Answer_Step_Action_Observation_SearchResult_SnippetInfo_descriptor; + } - public static Builder newBuilder( - com.google.cloud.discoveryengine.v1beta.Answer.Step prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.AnswerProto + .internal_static_google_cloud_discoveryengine_v1beta_Answer_Step_Action_Observation_SearchResult_SnippetInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation + .SearchResult.SnippetInfo.class, + com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation + .SearchResult.SnippetInfo.Builder.class); + } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } + public static final int SNIPPET_FIELD_NUMBER = 1; - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } + @SuppressWarnings("serial") + private volatile java.lang.Object snippet_ = ""; - /** - * - * - *
            -     * Step information.
            -     * 
            - * - * Protobuf type {@code google.cloud.discoveryengine.v1beta.Answer.Step} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.Answer.Step) - com.google.cloud.discoveryengine.v1beta.Answer.StepOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.discoveryengine.v1beta.AnswerProto - .internal_static_google_cloud_discoveryengine_v1beta_Answer_Step_descriptor; - } + /** + * + * + *
            +             * Snippet content.
            +             * 
            + * + * string snippet = 1; + * + * @return The snippet. + */ + @java.lang.Override + public java.lang.String getSnippet() { + java.lang.Object ref = snippet_; + 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(); + snippet_ = s; + return s; + } + } - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.discoveryengine.v1beta.AnswerProto - .internal_static_google_cloud_discoveryengine_v1beta_Answer_Step_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.discoveryengine.v1beta.Answer.Step.class, - com.google.cloud.discoveryengine.v1beta.Answer.Step.Builder.class); - } + /** + * + * + *
            +             * Snippet content.
            +             * 
            + * + * string snippet = 1; + * + * @return The bytes for snippet. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSnippetBytes() { + java.lang.Object ref = snippet_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + snippet_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } - // Construct using com.google.cloud.discoveryengine.v1beta.Answer.Step.newBuilder() - private Builder() {} + public static final int SNIPPET_STATUS_FIELD_NUMBER = 2; - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - } + @SuppressWarnings("serial") + private volatile java.lang.Object snippetStatus_ = ""; - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - state_ = 0; - description_ = ""; - thought_ = ""; - if (actionsBuilder_ == null) { - actions_ = java.util.Collections.emptyList(); - } else { - actions_ = null; - actionsBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000008); - return this; - } + /** + * + * + *
            +             * Status of the snippet defined by the search team.
            +             * 
            + * + * string snippet_status = 2; + * + * @return The snippetStatus. + */ + @java.lang.Override + public java.lang.String getSnippetStatus() { + java.lang.Object ref = snippetStatus_; + 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(); + snippetStatus_ = s; + return s; + } + } - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.discoveryengine.v1beta.AnswerProto - .internal_static_google_cloud_discoveryengine_v1beta_Answer_Step_descriptor; - } + /** + * + * + *
            +             * Status of the snippet defined by the search team.
            +             * 
            + * + * string snippet_status = 2; + * + * @return The bytes for snippetStatus. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSnippetStatusBytes() { + java.lang.Object ref = snippetStatus_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + snippetStatus_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.Answer.Step getDefaultInstanceForType() { - return com.google.cloud.discoveryengine.v1beta.Answer.Step.getDefaultInstance(); - } + private byte memoizedIsInitialized = -1; - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.Answer.Step build() { - com.google.cloud.discoveryengine.v1beta.Answer.Step result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.Answer.Step buildPartial() { - com.google.cloud.discoveryengine.v1beta.Answer.Step result = - new com.google.cloud.discoveryengine.v1beta.Answer.Step(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } + memoizedIsInitialized = 1; + return true; + } - private void buildPartialRepeatedFields( - com.google.cloud.discoveryengine.v1beta.Answer.Step result) { - if (actionsBuilder_ == null) { - if (((bitField0_ & 0x00000008) != 0)) { - actions_ = java.util.Collections.unmodifiableList(actions_); - bitField0_ = (bitField0_ & ~0x00000008); - } - result.actions_ = actions_; - } else { - result.actions_ = actionsBuilder_.build(); - } - } + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(snippet_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, snippet_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(snippetStatus_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, snippetStatus_); + } + getUnknownFields().writeTo(output); + } - private void buildPartial0(com.google.cloud.discoveryengine.v1beta.Answer.Step result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.state_ = state_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.description_ = description_; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.thought_ = thought_; - } - } + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.discoveryengine.v1beta.Answer.Step) { - return mergeFrom((com.google.cloud.discoveryengine.v1beta.Answer.Step) other); - } else { - super.mergeFrom(other); - return this; - } - } + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(snippet_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, snippet_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(snippetStatus_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, snippetStatus_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } - public Builder mergeFrom(com.google.cloud.discoveryengine.v1beta.Answer.Step other) { - if (other == com.google.cloud.discoveryengine.v1beta.Answer.Step.getDefaultInstance()) - return this; - if (other.state_ != 0) { - setStateValue(other.getStateValue()); - } - if (!other.getDescription().isEmpty()) { - description_ = other.description_; - bitField0_ |= 0x00000002; - onChanged(); - } - if (!other.getThought().isEmpty()) { - thought_ = other.thought_; - bitField0_ |= 0x00000004; - onChanged(); - } - if (actionsBuilder_ == null) { - if (!other.actions_.isEmpty()) { - if (actions_.isEmpty()) { - actions_ = other.actions_; - bitField0_ = (bitField0_ & ~0x00000008); - } else { - ensureActionsIsMutable(); - actions_.addAll(other.actions_); + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof + com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation + .SearchResult.SnippetInfo)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult + .SnippetInfo + other = + (com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation + .SearchResult.SnippetInfo) + obj; + + if (!getSnippet().equals(other.getSnippet())) return false; + if (!getSnippetStatus().equals(other.getSnippetStatus())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; } - onChanged(); - } - } else { - if (!other.actions_.isEmpty()) { - if (actionsBuilder_.isEmpty()) { - actionsBuilder_.dispose(); - actionsBuilder_ = null; - actions_ = other.actions_; - bitField0_ = (bitField0_ & ~0x00000008); - actionsBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders - ? internalGetActionsFieldBuilder() - : null; - } else { - actionsBuilder_.addAllMessages(other.actions_); + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + SNIPPET_FIELD_NUMBER; + hash = (53 * hash) + getSnippet().hashCode(); + hash = (37 * hash) + SNIPPET_STATUS_FIELD_NUMBER; + hash = (53 * hash) + getSnippetStatus().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; } - } - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - @java.lang.Override - public final boolean isInitialized() { - return true; - } + public static com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation + .SearchResult.SnippetInfo + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: - { - state_ = input.readEnum(); - bitField0_ |= 0x00000001; - break; - } // case 8 - case 18: - { - description_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 26: - { - thought_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - break; - } // case 26 - case 34: - { - com.google.cloud.discoveryengine.v1beta.Answer.Step.Action m = - input.readMessage( - com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.parser(), - extensionRegistry); - if (actionsBuilder_ == null) { - ensureActionsIsMutable(); - actions_.add(m); - } else { - actionsBuilder_.addMessage(m); - } - break; - } // case 34 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; + public static com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation + .SearchResult.SnippetInfo + parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - private int state_ = 0; + public static com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation + .SearchResult.SnippetInfo + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - /** - * - * - *
            -       * The state of the step.
            -       * 
            - * - * .google.cloud.discoveryengine.v1beta.Answer.Step.State state = 1; - * - * @return The enum numeric value on the wire for state. - */ - @java.lang.Override - public int getStateValue() { - return state_; - } + public static com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation + .SearchResult.SnippetInfo + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - /** - * - * - *
            -       * The state of the step.
            -       * 
            - * - * .google.cloud.discoveryengine.v1beta.Answer.Step.State state = 1; - * - * @param value The enum numeric value on the wire for state to set. - * @return This builder for chaining. - */ - public Builder setStateValue(int value) { - state_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } + public static com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation + .SearchResult.SnippetInfo + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - /** - * - * - *
            -       * The state of the step.
            -       * 
            - * - * .google.cloud.discoveryengine.v1beta.Answer.Step.State state = 1; - * - * @return The state. - */ - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.Answer.Step.State getState() { - com.google.cloud.discoveryengine.v1beta.Answer.Step.State result = - com.google.cloud.discoveryengine.v1beta.Answer.Step.State.forNumber(state_); - return result == null - ? com.google.cloud.discoveryengine.v1beta.Answer.Step.State.UNRECOGNIZED - : result; - } + public static com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation + .SearchResult.SnippetInfo + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - /** - * - * - *
            -       * The state of the step.
            -       * 
            - * - * .google.cloud.discoveryengine.v1beta.Answer.Step.State state = 1; - * - * @param value The state to set. - * @return This builder for chaining. - */ - public Builder setState(com.google.cloud.discoveryengine.v1beta.Answer.Step.State value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000001; - state_ = value.getNumber(); - onChanged(); - return this; - } + public static com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation + .SearchResult.SnippetInfo + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } - /** - * - * - *
            -       * The state of the step.
            -       * 
            - * - * .google.cloud.discoveryengine.v1beta.Answer.Step.State state = 1; - * - * @return This builder for chaining. - */ - public Builder clearState() { - bitField0_ = (bitField0_ & ~0x00000001); - state_ = 0; - onChanged(); - return this; - } + public static com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation + .SearchResult.SnippetInfo + parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } - private java.lang.Object description_ = ""; + public static com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation + .SearchResult.SnippetInfo + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input); + } - /** - * - * - *
            -       * The description of the step.
            -       * 
            - * - * string description = 2; - * - * @return The description. - */ - public java.lang.String getDescription() { - java.lang.Object ref = description_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - description_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } + public static com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation + .SearchResult.SnippetInfo + parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } - /** - * - * - *
            -       * The description of the step.
            -       * 
            - * - * string description = 2; - * - * @return The bytes for description. - */ - public com.google.protobuf.ByteString getDescriptionBytes() { - java.lang.Object ref = description_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - description_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } + public static com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation + .SearchResult.SnippetInfo + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } - /** - * - * - *
            -       * The description of the step.
            -       * 
            - * - * string description = 2; - * - * @param value The description to set. - * @return This builder for chaining. - */ - public Builder setDescription(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - description_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - /** - * - * - *
            -       * The description of the step.
            -       * 
            - * - * string description = 2; - * - * @return This builder for chaining. - */ - public Builder clearDescription() { - description_ = getDefaultInstance().getDescription(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } + public static com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation + .SearchResult.SnippetInfo + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } - /** - * - * - *
            -       * The description of the step.
            -       * 
            - * - * string description = 2; - * - * @param value The bytes for description to set. - * @return This builder for chaining. - */ - public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - description_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } - private java.lang.Object thought_ = ""; + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } - /** - * - * - *
            -       * The thought of the step.
            -       * 
            - * - * string thought = 3; - * - * @return The thought. - */ - public java.lang.String getThought() { - java.lang.Object ref = thought_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - thought_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } + public static Builder newBuilder( + com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult + .SnippetInfo + prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } - /** - * - * - *
            -       * The thought of the step.
            -       * 
            - * - * string thought = 3; - * - * @return The bytes for thought. - */ - public com.google.protobuf.ByteString getThoughtBytes() { - java.lang.Object ref = thought_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - thought_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } - /** - * - * - *
            -       * The thought of the step.
            -       * 
            - * - * string thought = 3; - * - * @param value The thought to set. - * @return This builder for chaining. - */ - public Builder setThought(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - thought_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } - /** - * - * - *
            -       * The thought of the step.
            -       * 
            - * - * string thought = 3; - * - * @return This builder for chaining. - */ - public Builder clearThought() { - thought_ = getDefaultInstance().getThought(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - return this; - } + /** + * + * + *
            +             * Snippet information.
            +             * 
            + * + * Protobuf type {@code + * google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult.SnippetInfo} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult.SnippetInfo) + com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult + .SnippetInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.AnswerProto + .internal_static_google_cloud_discoveryengine_v1beta_Answer_Step_Action_Observation_SearchResult_SnippetInfo_descriptor; + } - /** - * - * - *
            -       * The thought of the step.
            -       * 
            - * - * string thought = 3; - * - * @param value The bytes for thought to set. - * @return This builder for chaining. - */ - public Builder setThoughtBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - thought_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.AnswerProto + .internal_static_google_cloud_discoveryengine_v1beta_Answer_Step_Action_Observation_SearchResult_SnippetInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation + .SearchResult.SnippetInfo.class, + com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation + .SearchResult.SnippetInfo.Builder.class); + } - private java.util.List actions_ = - java.util.Collections.emptyList(); + // Construct using + // com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult.SnippetInfo.newBuilder() + private Builder() {} - private void ensureActionsIsMutable() { - if (!((bitField0_ & 0x00000008) != 0)) { - actions_ = - new java.util.ArrayList( - actions_); - bitField0_ |= 0x00000008; - } - } + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } - private com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.discoveryengine.v1beta.Answer.Step.Action, - com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Builder, - com.google.cloud.discoveryengine.v1beta.Answer.Step.ActionOrBuilder> - actionsBuilder_; + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + snippet_ = ""; + snippetStatus_ = ""; + return this; + } - /** - * - * - *
            -       * Actions.
            -       * 
            - * - * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action actions = 4; - */ - public java.util.List - getActionsList() { - if (actionsBuilder_ == null) { - return java.util.Collections.unmodifiableList(actions_); - } else { - return actionsBuilder_.getMessageList(); - } - } + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1beta.AnswerProto + .internal_static_google_cloud_discoveryengine_v1beta_Answer_Step_Action_Observation_SearchResult_SnippetInfo_descriptor; + } - /** - * - * - *
            -       * Actions.
            -       * 
            - * - * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action actions = 4; - */ - public int getActionsCount() { - if (actionsBuilder_ == null) { - return actions_.size(); - } else { - return actionsBuilder_.getCount(); - } - } + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation + .SearchResult.SnippetInfo + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation + .SearchResult.SnippetInfo.getDefaultInstance(); + } - /** - * - * - *
            -       * Actions.
            -       * 
            - * - * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action actions = 4; - */ - public com.google.cloud.discoveryengine.v1beta.Answer.Step.Action getActions(int index) { - if (actionsBuilder_ == null) { - return actions_.get(index); - } else { - return actionsBuilder_.getMessage(index); - } - } + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation + .SearchResult.SnippetInfo + build() { + com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult + .SnippetInfo + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } - /** - * - * - *
            -       * Actions.
            -       * 
            - * - * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action actions = 4; - */ - public Builder setActions( - int index, com.google.cloud.discoveryengine.v1beta.Answer.Step.Action value) { - if (actionsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureActionsIsMutable(); - actions_.set(index, value); - onChanged(); - } else { - actionsBuilder_.setMessage(index, value); - } - return this; - } + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation + .SearchResult.SnippetInfo + buildPartial() { + com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult + .SnippetInfo + result = + new com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation + .SearchResult.SnippetInfo(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } - /** - * - * - *
            -       * Actions.
            -       * 
            - * - * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action actions = 4; - */ - public Builder setActions( - int index, - com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Builder builderForValue) { - if (actionsBuilder_ == null) { - ensureActionsIsMutable(); - actions_.set(index, builderForValue.build()); - onChanged(); - } else { - actionsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } + private void buildPartial0( + com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation + .SearchResult.SnippetInfo + result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.snippet_ = snippet_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.snippetStatus_ = snippetStatus_; + } + } - /** - * - * - *
            -       * Actions.
            -       * 
            - * - * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action actions = 4; - */ - public Builder addActions(com.google.cloud.discoveryengine.v1beta.Answer.Step.Action value) { - if (actionsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureActionsIsMutable(); - actions_.add(value); - onChanged(); - } else { - actionsBuilder_.addMessage(value); - } - return this; - } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation + .SearchResult.SnippetInfo) { + return mergeFrom( + (com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation + .SearchResult.SnippetInfo) + other); + } else { + super.mergeFrom(other); + return this; + } + } - /** - * - * - *
            -       * Actions.
            -       * 
            - * - * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action actions = 4; - */ - public Builder addActions( - int index, com.google.cloud.discoveryengine.v1beta.Answer.Step.Action value) { - if (actionsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureActionsIsMutable(); - actions_.add(index, value); - onChanged(); - } else { - actionsBuilder_.addMessage(index, value); - } - return this; - } + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation + .SearchResult.SnippetInfo + other) { + if (other + == com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation + .SearchResult.SnippetInfo.getDefaultInstance()) return this; + if (!other.getSnippet().isEmpty()) { + snippet_ = other.snippet_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getSnippetStatus().isEmpty()) { + snippetStatus_ = other.snippetStatus_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } - /** - * - * - *
            -       * Actions.
            -       * 
            - * - * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action actions = 4; - */ - public Builder addActions( - com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Builder builderForValue) { - if (actionsBuilder_ == null) { - ensureActionsIsMutable(); - actions_.add(builderForValue.build()); - onChanged(); - } else { - actionsBuilder_.addMessage(builderForValue.build()); - } - return this; - } + @java.lang.Override + public final boolean isInitialized() { + return true; + } - /** - * - * - *
            -       * Actions.
            -       * 
            - * - * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action actions = 4; - */ - public Builder addActions( - int index, - com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Builder builderForValue) { - if (actionsBuilder_ == null) { - ensureActionsIsMutable(); - actions_.add(index, builderForValue.build()); - onChanged(); - } else { - actionsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + snippet_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + snippetStatus_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } - /** - * - * - *
            -       * Actions.
            -       * 
            - * - * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action actions = 4; - */ - public Builder addAllActions( - java.lang.Iterable - values) { - if (actionsBuilder_ == null) { - ensureActionsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, actions_); - onChanged(); - } else { - actionsBuilder_.addAllMessages(values); - } - return this; - } + private int bitField0_; - /** - * - * - *
            -       * Actions.
            -       * 
            - * - * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action actions = 4; - */ - public Builder clearActions() { - if (actionsBuilder_ == null) { - actions_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000008); - onChanged(); - } else { - actionsBuilder_.clear(); - } - return this; - } + private java.lang.Object snippet_ = ""; - /** - * - * - *
            -       * Actions.
            -       * 
            - * - * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action actions = 4; - */ - public Builder removeActions(int index) { - if (actionsBuilder_ == null) { - ensureActionsIsMutable(); - actions_.remove(index); - onChanged(); - } else { - actionsBuilder_.remove(index); - } - return this; - } + /** + * + * + *
            +               * Snippet content.
            +               * 
            + * + * string snippet = 1; + * + * @return The snippet. + */ + public java.lang.String getSnippet() { + java.lang.Object ref = snippet_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + snippet_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } - /** - * - * - *
            -       * Actions.
            -       * 
            - * - * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action actions = 4; - */ - public com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Builder getActionsBuilder( - int index) { - return internalGetActionsFieldBuilder().getBuilder(index); - } + /** + * + * + *
            +               * Snippet content.
            +               * 
            + * + * string snippet = 1; + * + * @return The bytes for snippet. + */ + public com.google.protobuf.ByteString getSnippetBytes() { + java.lang.Object ref = snippet_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + snippet_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } - /** - * - * - *
            -       * Actions.
            -       * 
            - * - * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action actions = 4; - */ - public com.google.cloud.discoveryengine.v1beta.Answer.Step.ActionOrBuilder - getActionsOrBuilder(int index) { - if (actionsBuilder_ == null) { - return actions_.get(index); - } else { - return actionsBuilder_.getMessageOrBuilder(index); - } - } + /** + * + * + *
            +               * Snippet content.
            +               * 
            + * + * string snippet = 1; + * + * @param value The snippet to set. + * @return This builder for chaining. + */ + public Builder setSnippet(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + snippet_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } - /** - * - * - *
            -       * Actions.
            -       * 
            - * - * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action actions = 4; - */ - public java.util.List< - ? extends com.google.cloud.discoveryengine.v1beta.Answer.Step.ActionOrBuilder> - getActionsOrBuilderList() { - if (actionsBuilder_ != null) { - return actionsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(actions_); - } - } + /** + * + * + *
            +               * Snippet content.
            +               * 
            + * + * string snippet = 1; + * + * @return This builder for chaining. + */ + public Builder clearSnippet() { + snippet_ = getDefaultInstance().getSnippet(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } - /** - * - * - *
            -       * Actions.
            -       * 
            - * - * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action actions = 4; - */ - public com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Builder - addActionsBuilder() { - return internalGetActionsFieldBuilder() - .addBuilder( - com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.getDefaultInstance()); - } - - /** - * - * - *
            -       * Actions.
            -       * 
            - * - * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action actions = 4; - */ - public com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Builder addActionsBuilder( - int index) { - return internalGetActionsFieldBuilder() - .addBuilder( - index, - com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.getDefaultInstance()); - } + /** + * + * + *
            +               * Snippet content.
            +               * 
            + * + * string snippet = 1; + * + * @param value The bytes for snippet to set. + * @return This builder for chaining. + */ + public Builder setSnippetBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + snippet_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } - /** - * - * - *
            -       * Actions.
            -       * 
            - * - * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action actions = 4; - */ - public java.util.List - getActionsBuilderList() { - return internalGetActionsFieldBuilder().getBuilderList(); - } + private java.lang.Object snippetStatus_ = ""; - private com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.discoveryengine.v1beta.Answer.Step.Action, - com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Builder, - com.google.cloud.discoveryengine.v1beta.Answer.Step.ActionOrBuilder> - internalGetActionsFieldBuilder() { - if (actionsBuilder_ == null) { - actionsBuilder_ = - new com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.discoveryengine.v1beta.Answer.Step.Action, - com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Builder, - com.google.cloud.discoveryengine.v1beta.Answer.Step.ActionOrBuilder>( - actions_, ((bitField0_ & 0x00000008) != 0), getParentForChildren(), isClean()); - actions_ = null; - } - return actionsBuilder_; - } + /** + * + * + *
            +               * Status of the snippet defined by the search team.
            +               * 
            + * + * string snippet_status = 2; + * + * @return The snippetStatus. + */ + public java.lang.String getSnippetStatus() { + java.lang.Object ref = snippetStatus_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + snippetStatus_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } - // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.Answer.Step) - } + /** + * + * + *
            +               * Status of the snippet defined by the search team.
            +               * 
            + * + * string snippet_status = 2; + * + * @return The bytes for snippetStatus. + */ + public com.google.protobuf.ByteString getSnippetStatusBytes() { + java.lang.Object ref = snippetStatus_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + snippetStatus_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } - // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.Answer.Step) - private static final com.google.cloud.discoveryengine.v1beta.Answer.Step DEFAULT_INSTANCE; + /** + * + * + *
            +               * Status of the snippet defined by the search team.
            +               * 
            + * + * string snippet_status = 2; + * + * @param value The snippetStatus to set. + * @return This builder for chaining. + */ + public Builder setSnippetStatus(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + snippetStatus_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } - static { - DEFAULT_INSTANCE = new com.google.cloud.discoveryengine.v1beta.Answer.Step(); - } + /** + * + * + *
            +               * Status of the snippet defined by the search team.
            +               * 
            + * + * string snippet_status = 2; + * + * @return This builder for chaining. + */ + public Builder clearSnippetStatus() { + snippetStatus_ = getDefaultInstance().getSnippetStatus(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } - public static com.google.cloud.discoveryengine.v1beta.Answer.Step getDefaultInstance() { - return DEFAULT_INSTANCE; - } + /** + * + * + *
            +               * Status of the snippet defined by the search team.
            +               * 
            + * + * string snippet_status = 2; + * + * @param value The bytes for snippetStatus to set. + * @return This builder for chaining. + */ + public Builder setSnippetStatusBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + snippetStatus_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Step parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException() - .setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult.SnippetInfo) } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult.SnippetInfo) + private static final com.google.cloud.discoveryengine.v1beta.Answer.Step.Action + .Observation.SearchResult.SnippetInfo + DEFAULT_INSTANCE; - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.Answer.Step getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - } + static { + DEFAULT_INSTANCE = + new com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation + .SearchResult.SnippetInfo(); + } - public interface QueryUnderstandingInfoOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo) - com.google.protobuf.MessageOrBuilder { + public static com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation + .SearchResult.SnippetInfo + getDefaultInstance() { + return DEFAULT_INSTANCE; + } - /** - * - * - *
            -     * Query classification information.
            -     * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo.QueryClassificationInfo query_classification_info = 1; - * - */ - java.util.List< - com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo - .QueryClassificationInfo> - getQueryClassificationInfoList(); - - /** - * - * - *
            -     * Query classification information.
            -     * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo.QueryClassificationInfo query_classification_info = 1; - * - */ - com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo.QueryClassificationInfo - getQueryClassificationInfo(int index); + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SnippetInfo parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; - /** - * - * - *
            -     * Query classification information.
            -     * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo.QueryClassificationInfo query_classification_info = 1; - * - */ - int getQueryClassificationInfoCount(); + public static com.google.protobuf.Parser parser() { + return PARSER; + } - /** - * - * - *
            -     * Query classification information.
            -     * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo.QueryClassificationInfo query_classification_info = 1; - * - */ - java.util.List< - ? extends - com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo - .QueryClassificationInfoOrBuilder> - getQueryClassificationInfoOrBuilderList(); + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } - /** - * - * - *
            -     * Query classification information.
            -     * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo.QueryClassificationInfo query_classification_info = 1; - * - */ - com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo - .QueryClassificationInfoOrBuilder - getQueryClassificationInfoOrBuilder(int index); - } + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation + .SearchResult.SnippetInfo + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } - /** - * - * - *
            -   * Query understanding information.
            -   * 
            - * - * Protobuf type {@code google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo} - */ - public static final class QueryUnderstandingInfo extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo) - QueryUnderstandingInfoOrBuilder { - private static final long serialVersionUID = 0L; + public interface ChunkInfoOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult.ChunkInfo) + com.google.protobuf.MessageOrBuilder { - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "QueryUnderstandingInfo"); - } + /** + * + * + *
            +             * Chunk resource name.
            +             * 
            + * + * string chunk = 1; + * + * @return The chunk. + */ + java.lang.String getChunk(); - // Use QueryUnderstandingInfo.newBuilder() to construct. - private QueryUnderstandingInfo(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } + /** + * + * + *
            +             * Chunk resource name.
            +             * 
            + * + * string chunk = 1; + * + * @return The bytes for chunk. + */ + com.google.protobuf.ByteString getChunkBytes(); - private QueryUnderstandingInfo() { - queryClassificationInfo_ = java.util.Collections.emptyList(); - } + /** + * + * + *
            +             * Chunk textual content.
            +             * 
            + * + * string content = 2; + * + * @return The content. + */ + java.lang.String getContent(); - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.discoveryengine.v1beta.AnswerProto - .internal_static_google_cloud_discoveryengine_v1beta_Answer_QueryUnderstandingInfo_descriptor; - } + /** + * + * + *
            +             * Chunk textual content.
            +             * 
            + * + * string content = 2; + * + * @return The bytes for content. + */ + com.google.protobuf.ByteString getContentBytes(); - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.discoveryengine.v1beta.AnswerProto - .internal_static_google_cloud_discoveryengine_v1beta_Answer_QueryUnderstandingInfo_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo.class, - com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo.Builder.class); - } + /** + * + * + *
            +             * The relevance of the chunk for a given query. Values range from
            +             * 0.0 (completely irrelevant) to 1.0 (completely relevant).
            +             * This value is for informational purpose only. It may change for
            +             * the same query and chunk at any time due to a model retraining or
            +             * change in implementation.
            +             * 
            + * + * optional float relevance_score = 3; + * + * @return Whether the relevanceScore field is set. + */ + boolean hasRelevanceScore(); - public interface QueryClassificationInfoOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo.QueryClassificationInfo) - com.google.protobuf.MessageOrBuilder { + /** + * + * + *
            +             * The relevance of the chunk for a given query. Values range from
            +             * 0.0 (completely irrelevant) to 1.0 (completely relevant).
            +             * This value is for informational purpose only. It may change for
            +             * the same query and chunk at any time due to a model retraining or
            +             * change in implementation.
            +             * 
            + * + * optional float relevance_score = 3; + * + * @return The relevanceScore. + */ + float getRelevanceScore(); + } - /** - * - * - *
            -       * Query classification type.
            -       * 
            - * - * - * .google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo.QueryClassificationInfo.Type type = 1; - * - * - * @return The enum numeric value on the wire for type. - */ - int getTypeValue(); + /** + * + * + *
            +           * Chunk information.
            +           * 
            + * + * Protobuf type {@code + * google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult.ChunkInfo} + */ + public static final class ChunkInfo extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult.ChunkInfo) + ChunkInfoOrBuilder { + private static final long serialVersionUID = 0L; - /** - * - * - *
            -       * Query classification type.
            -       * 
            - * - * - * .google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo.QueryClassificationInfo.Type type = 1; - * - * - * @return The type. - */ - com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo.QueryClassificationInfo - .Type - getType(); - - /** - * - * - *
            -       * Classification output.
            -       * 
            - * - * bool positive = 2; - * - * @return The positive. - */ - boolean getPositive(); - } + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ChunkInfo"); + } - /** - * - * - *
            -     * Query classification information.
            -     * 
            - * - * Protobuf type {@code - * google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo.QueryClassificationInfo} - */ - public static final class QueryClassificationInfo extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo.QueryClassificationInfo) - QueryClassificationInfoOrBuilder { - private static final long serialVersionUID = 0L; + // Use ChunkInfo.newBuilder() to construct. + private ChunkInfo(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "QueryClassificationInfo"); - } + private ChunkInfo() { + chunk_ = ""; + content_ = ""; + } - // Use QueryClassificationInfo.newBuilder() to construct. - private QueryClassificationInfo(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.AnswerProto + .internal_static_google_cloud_discoveryengine_v1beta_Answer_Step_Action_Observation_SearchResult_ChunkInfo_descriptor; + } - private QueryClassificationInfo() { - type_ = 0; - } + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.AnswerProto + .internal_static_google_cloud_discoveryengine_v1beta_Answer_Step_Action_Observation_SearchResult_ChunkInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation + .SearchResult.ChunkInfo.class, + com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation + .SearchResult.ChunkInfo.Builder.class); + } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.discoveryengine.v1beta.AnswerProto - .internal_static_google_cloud_discoveryengine_v1beta_Answer_QueryUnderstandingInfo_QueryClassificationInfo_descriptor; - } + private int bitField0_; + public static final int CHUNK_FIELD_NUMBER = 1; - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.discoveryengine.v1beta.AnswerProto - .internal_static_google_cloud_discoveryengine_v1beta_Answer_QueryUnderstandingInfo_QueryClassificationInfo_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo - .QueryClassificationInfo.class, - com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo - .QueryClassificationInfo.Builder.class); - } + @SuppressWarnings("serial") + private volatile java.lang.Object chunk_ = ""; - /** - * - * - *
            -       * Query classification types.
            -       * 
            - * - * Protobuf enum {@code - * google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo.QueryClassificationInfo.Type} - */ - public enum Type implements com.google.protobuf.ProtocolMessageEnum { - /** - * - * - *
            -         * Unspecified query classification type.
            -         * 
            - * - * TYPE_UNSPECIFIED = 0; - */ - TYPE_UNSPECIFIED(0), - /** - * - * - *
            -         * Adversarial query classification type.
            -         * 
            - * - * ADVERSARIAL_QUERY = 1; - */ - ADVERSARIAL_QUERY(1), - /** - * - * - *
            -         * Non-answer-seeking query classification type, for chit chat.
            -         * 
            - * - * NON_ANSWER_SEEKING_QUERY = 2; - */ - NON_ANSWER_SEEKING_QUERY(2), - /** - * - * - *
            -         * Jail-breaking query classification type.
            -         * 
            - * - * JAIL_BREAKING_QUERY = 3; - */ - JAIL_BREAKING_QUERY(3), - /** - * - * - *
            -         * Non-answer-seeking query classification type, for no clear intent.
            -         * 
            - * - * NON_ANSWER_SEEKING_QUERY_V2 = 4; - */ - NON_ANSWER_SEEKING_QUERY_V2(4), - UNRECOGNIZED(-1), - ; + /** + * + * + *
            +             * Chunk resource name.
            +             * 
            + * + * string chunk = 1; + * + * @return The chunk. + */ + @java.lang.Override + public java.lang.String getChunk() { + java.lang.Object ref = chunk_; + 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(); + chunk_ = s; + return s; + } + } - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "Type"); - } + /** + * + * + *
            +             * Chunk resource name.
            +             * 
            + * + * string chunk = 1; + * + * @return The bytes for chunk. + */ + @java.lang.Override + public com.google.protobuf.ByteString getChunkBytes() { + java.lang.Object ref = chunk_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + chunk_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } - /** - * - * - *
            -         * Unspecified query classification type.
            -         * 
            - * - * TYPE_UNSPECIFIED = 0; - */ - public static final int TYPE_UNSPECIFIED_VALUE = 0; + public static final int CONTENT_FIELD_NUMBER = 2; - /** - * - * - *
            -         * Adversarial query classification type.
            -         * 
            - * - * ADVERSARIAL_QUERY = 1; - */ - public static final int ADVERSARIAL_QUERY_VALUE = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object content_ = ""; - /** - * - * - *
            -         * Non-answer-seeking query classification type, for chit chat.
            -         * 
            - * - * NON_ANSWER_SEEKING_QUERY = 2; - */ - public static final int NON_ANSWER_SEEKING_QUERY_VALUE = 2; - - /** - * - * - *
            -         * Jail-breaking query classification type.
            -         * 
            - * - * JAIL_BREAKING_QUERY = 3; - */ - public static final int JAIL_BREAKING_QUERY_VALUE = 3; + /** + * + * + *
            +             * Chunk textual content.
            +             * 
            + * + * string content = 2; + * + * @return The content. + */ + @java.lang.Override + public java.lang.String getContent() { + java.lang.Object ref = content_; + 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(); + content_ = s; + return s; + } + } - /** - * - * - *
            -         * Non-answer-seeking query classification type, for no clear intent.
            -         * 
            - * - * NON_ANSWER_SEEKING_QUERY_V2 = 4; - */ - public static final int NON_ANSWER_SEEKING_QUERY_V2_VALUE = 4; + /** + * + * + *
            +             * Chunk textual content.
            +             * 
            + * + * string content = 2; + * + * @return The bytes for content. + */ + @java.lang.Override + public com.google.protobuf.ByteString getContentBytes() { + java.lang.Object ref = content_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + content_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } + public static final int RELEVANCE_SCORE_FIELD_NUMBER = 3; + private float relevanceScore_ = 0F; - /** - * @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 Type valueOf(int value) { - return forNumber(value); - } + /** + * + * + *
            +             * The relevance of the chunk for a given query. Values range from
            +             * 0.0 (completely irrelevant) to 1.0 (completely relevant).
            +             * This value is for informational purpose only. It may change for
            +             * the same query and chunk at any time due to a model retraining or
            +             * change in implementation.
            +             * 
            + * + * optional float relevance_score = 3; + * + * @return Whether the relevanceScore field is set. + */ + @java.lang.Override + public boolean hasRelevanceScore() { + return ((bitField0_ & 0x00000001) != 0); + } - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static Type forNumber(int value) { - switch (value) { - case 0: - return TYPE_UNSPECIFIED; - case 1: - return ADVERSARIAL_QUERY; - case 2: - return NON_ANSWER_SEEKING_QUERY; - case 3: - return JAIL_BREAKING_QUERY; - case 4: - return NON_ANSWER_SEEKING_QUERY_V2; - default: - return null; - } - } + /** + * + * + *
            +             * The relevance of the chunk for a given query. Values range from
            +             * 0.0 (completely irrelevant) to 1.0 (completely relevant).
            +             * This value is for informational purpose only. It may change for
            +             * the same query and chunk at any time due to a model retraining or
            +             * change in implementation.
            +             * 
            + * + * optional float relevance_score = 3; + * + * @return The relevanceScore. + */ + @java.lang.Override + public float getRelevanceScore() { + return relevanceScore_; + } - public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { - return internalValueMap; - } + private byte memoizedIsInitialized = -1; - private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public Type findValueByNumber(int number) { - return Type.forNumber(number); - } - }; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; - public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } + memoizedIsInitialized = 1; + return true; + } - public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { - return getDescriptor(); - } + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(chunk_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, chunk_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(content_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, content_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeFloat(3, relevanceScore_); + } + getUnknownFields().writeTo(output); + } - public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { - return com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo - .QueryClassificationInfo.getDescriptor() - .getEnumTypes() - .get(0); - } + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; - private static final Type[] VALUES = values(); + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(chunk_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, chunk_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(content_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, content_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeFloatSize(3, relevanceScore_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } - public static Type valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof + com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation + .SearchResult.ChunkInfo)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult + .ChunkInfo + other = + (com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation + .SearchResult.ChunkInfo) + obj; - private final int value; + if (!getChunk().equals(other.getChunk())) return false; + if (!getContent().equals(other.getContent())) return false; + if (hasRelevanceScore() != other.hasRelevanceScore()) return false; + if (hasRelevanceScore()) { + if (java.lang.Float.floatToIntBits(getRelevanceScore()) + != java.lang.Float.floatToIntBits(other.getRelevanceScore())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } - private Type(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo.QueryClassificationInfo.Type) - } + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + CHUNK_FIELD_NUMBER; + hash = (53 * hash) + getChunk().hashCode(); + hash = (37 * hash) + CONTENT_FIELD_NUMBER; + hash = (53 * hash) + getContent().hashCode(); + if (hasRelevanceScore()) { + hash = (37 * hash) + RELEVANCE_SCORE_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits(getRelevanceScore()); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } - public static final int TYPE_FIELD_NUMBER = 1; - private int type_ = 0; + public static com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation + .SearchResult.ChunkInfo + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - /** - * - * - *
            -       * Query classification type.
            -       * 
            - * - * - * .google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo.QueryClassificationInfo.Type type = 1; - * - * - * @return The enum numeric value on the wire for type. - */ - @java.lang.Override - public int getTypeValue() { - return type_; - } + public static com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation + .SearchResult.ChunkInfo + parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - /** - * - * - *
            -       * Query classification type.
            -       * 
            - * - * - * .google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo.QueryClassificationInfo.Type type = 1; - * - * - * @return The type. - */ - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo - .QueryClassificationInfo.Type - getType() { - com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo - .QueryClassificationInfo.Type - result = - com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo - .QueryClassificationInfo.Type.forNumber(type_); - return result == null - ? com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo - .QueryClassificationInfo.Type.UNRECOGNIZED - : result; - } + public static com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation + .SearchResult.ChunkInfo + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - public static final int POSITIVE_FIELD_NUMBER = 2; - private boolean positive_ = false; + public static com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation + .SearchResult.ChunkInfo + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - /** - * - * - *
            -       * Classification output.
            -       * 
            - * - * bool positive = 2; - * - * @return The positive. - */ - @java.lang.Override - public boolean getPositive() { - return positive_; - } + public static com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation + .SearchResult.ChunkInfo + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - private byte memoizedIsInitialized = -1; + public static com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation + .SearchResult.ChunkInfo + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + public static com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation + .SearchResult.ChunkInfo + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } - memoizedIsInitialized = 1; - return true; - } + public static com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation + .SearchResult.ChunkInfo + parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (type_ - != com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo - .QueryClassificationInfo.Type.TYPE_UNSPECIFIED - .getNumber()) { - output.writeEnum(1, type_); - } - if (positive_ != false) { - output.writeBool(2, positive_); - } - getUnknownFields().writeTo(output); - } + public static com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation + .SearchResult.ChunkInfo + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input); + } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; + public static com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation + .SearchResult.ChunkInfo + parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } - size = 0; - if (type_ - != com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo - .QueryClassificationInfo.Type.TYPE_UNSPECIFIED - .getNumber()) { - size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, type_); - } - if (positive_ != false) { - size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, positive_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } + public static com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation + .SearchResult.ChunkInfo + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj - instanceof - com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo - .QueryClassificationInfo)) { - return super.equals(obj); - } - com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo - .QueryClassificationInfo - other = - (com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo - .QueryClassificationInfo) - obj; + public static com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation + .SearchResult.ChunkInfo + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } - if (type_ != other.type_) return false; - if (getPositive() != other.getPositive()) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + TYPE_FIELD_NUMBER; - hash = (53 * hash) + type_; - hash = (37 * hash) + POSITIVE_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getPositive()); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } - public static com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo - .QueryClassificationInfo - parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } + public static Builder newBuilder( + com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult + .ChunkInfo + prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } - public static com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo - .QueryClassificationInfo - parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } - public static com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo - .QueryClassificationInfo - parseFrom(com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } - public static com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo - .QueryClassificationInfo - parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } + /** + * + * + *
            +             * Chunk information.
            +             * 
            + * + * Protobuf type {@code + * google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult.ChunkInfo} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult.ChunkInfo) + com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult + .ChunkInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.AnswerProto + .internal_static_google_cloud_discoveryengine_v1beta_Answer_Step_Action_Observation_SearchResult_ChunkInfo_descriptor; + } - public static com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo - .QueryClassificationInfo - parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.AnswerProto + .internal_static_google_cloud_discoveryengine_v1beta_Answer_Step_Action_Observation_SearchResult_ChunkInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation + .SearchResult.ChunkInfo.class, + com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation + .SearchResult.ChunkInfo.Builder.class); + } - public static com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo - .QueryClassificationInfo - parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } + // Construct using + // com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult.ChunkInfo.newBuilder() + private Builder() {} - public static com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo - .QueryClassificationInfo - parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } - public static com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo - .QueryClassificationInfo - parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + chunk_ = ""; + content_ = ""; + relevanceScore_ = 0F; + return this; + } - public static com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo - .QueryClassificationInfo - parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1beta.AnswerProto + .internal_static_google_cloud_discoveryengine_v1beta_Answer_Step_Action_Observation_SearchResult_ChunkInfo_descriptor; + } - public static com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo - .QueryClassificationInfo - parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation + .SearchResult.ChunkInfo + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation + .SearchResult.ChunkInfo.getDefaultInstance(); + } - public static com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo - .QueryClassificationInfo - parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation + .SearchResult.ChunkInfo + build() { + com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult + .ChunkInfo + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } - public static com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo - .QueryClassificationInfo - 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 com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation + .SearchResult.ChunkInfo + buildPartial() { + com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult + .ChunkInfo + result = + new com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation + .SearchResult.ChunkInfo(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } + private void buildPartial0( + com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation + .SearchResult.ChunkInfo + result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.chunk_ = chunk_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.content_ = content_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.relevanceScore_ = relevanceScore_; + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation + .SearchResult.ChunkInfo) { + return mergeFrom( + (com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation + .SearchResult.ChunkInfo) + other); + } else { + super.mergeFrom(other); + return this; + } + } - public static Builder newBuilder( - com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo - .QueryClassificationInfo - prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation + .SearchResult.ChunkInfo + other) { + if (other + == com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation + .SearchResult.ChunkInfo.getDefaultInstance()) return this; + if (!other.getChunk().isEmpty()) { + chunk_ = other.chunk_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getContent().isEmpty()) { + content_ = other.content_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasRelevanceScore()) { + setRelevanceScore(other.getRelevanceScore()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } + @java.lang.Override + public final boolean isInitialized() { + return true; + } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - - /** - * - * - *
            -       * Query classification information.
            -       * 
            - * - * Protobuf type {@code - * google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo.QueryClassificationInfo} - */ - public static final class Builder - extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo.QueryClassificationInfo) - com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo - .QueryClassificationInfoOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.discoveryengine.v1beta.AnswerProto - .internal_static_google_cloud_discoveryengine_v1beta_Answer_QueryUnderstandingInfo_QueryClassificationInfo_descriptor; - } + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + chunk_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + content_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 29: + { + relevanceScore_ = input.readFloat(); + bitField0_ |= 0x00000004; + break; + } // case 29 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.discoveryengine.v1beta.AnswerProto - .internal_static_google_cloud_discoveryengine_v1beta_Answer_QueryUnderstandingInfo_QueryClassificationInfo_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo - .QueryClassificationInfo.class, - com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo - .QueryClassificationInfo.Builder.class); - } + private int bitField0_; - // Construct using - // com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo.QueryClassificationInfo.newBuilder() - private Builder() {} + private java.lang.Object chunk_ = ""; - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - } + /** + * + * + *
            +               * Chunk resource name.
            +               * 
            + * + * string chunk = 1; + * + * @return The chunk. + */ + public java.lang.String getChunk() { + java.lang.Object ref = chunk_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + chunk_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - type_ = 0; - positive_ = false; - return this; - } + /** + * + * + *
            +               * Chunk resource name.
            +               * 
            + * + * string chunk = 1; + * + * @return The bytes for chunk. + */ + public com.google.protobuf.ByteString getChunkBytes() { + java.lang.Object ref = chunk_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + chunk_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.discoveryengine.v1beta.AnswerProto - .internal_static_google_cloud_discoveryengine_v1beta_Answer_QueryUnderstandingInfo_QueryClassificationInfo_descriptor; - } + /** + * + * + *
            +               * Chunk resource name.
            +               * 
            + * + * string chunk = 1; + * + * @param value The chunk to set. + * @return This builder for chaining. + */ + public Builder setChunk(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + chunk_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo - .QueryClassificationInfo - getDefaultInstanceForType() { - return com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo - .QueryClassificationInfo.getDefaultInstance(); - } + /** + * + * + *
            +               * Chunk resource name.
            +               * 
            + * + * string chunk = 1; + * + * @return This builder for chaining. + */ + public Builder clearChunk() { + chunk_ = getDefaultInstance().getChunk(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo - .QueryClassificationInfo - build() { - com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo - .QueryClassificationInfo - result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } + /** + * + * + *
            +               * Chunk resource name.
            +               * 
            + * + * string chunk = 1; + * + * @param value The bytes for chunk to set. + * @return This builder for chaining. + */ + public Builder setChunkBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + chunk_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo - .QueryClassificationInfo - buildPartial() { - com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo - .QueryClassificationInfo - result = - new com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo - .QueryClassificationInfo(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } + private java.lang.Object content_ = ""; - private void buildPartial0( - com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo - .QueryClassificationInfo - result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.type_ = type_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.positive_ = positive_; - } - } + /** + * + * + *
            +               * Chunk textual content.
            +               * 
            + * + * string content = 2; + * + * @return The content. + */ + public java.lang.String getContent() { + java.lang.Object ref = content_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + content_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other - instanceof - com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo - .QueryClassificationInfo) { - return mergeFrom( - (com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo - .QueryClassificationInfo) - other); - } else { - super.mergeFrom(other); - return this; - } - } + /** + * + * + *
            +               * Chunk textual content.
            +               * 
            + * + * string content = 2; + * + * @return The bytes for content. + */ + public com.google.protobuf.ByteString getContentBytes() { + java.lang.Object ref = content_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + content_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } - public Builder mergeFrom( - com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo - .QueryClassificationInfo - other) { - if (other - == com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo - .QueryClassificationInfo.getDefaultInstance()) return this; - if (other.type_ != 0) { - setTypeValue(other.getTypeValue()); - } - if (other.getPositive() != false) { - setPositive(other.getPositive()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } + /** + * + * + *
            +               * Chunk textual content.
            +               * 
            + * + * string content = 2; + * + * @param value The content to set. + * @return This builder for chaining. + */ + public Builder setContent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + content_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } - @java.lang.Override - public final boolean isInitialized() { - return true; - } + /** + * + * + *
            +               * Chunk textual content.
            +               * 
            + * + * string content = 2; + * + * @return This builder for chaining. + */ + public Builder clearContent() { + content_ = getDefaultInstance().getContent(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: - { - type_ = input.readEnum(); - bitField0_ |= 0x00000001; - break; - } // case 8 - case 16: - { - positive_ = input.readBool(); - bitField0_ |= 0x00000002; - break; - } // case 16 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } + /** + * + * + *
            +               * Chunk textual content.
            +               * 
            + * + * string content = 2; + * + * @param value The bytes for content to set. + * @return This builder for chaining. + */ + public Builder setContentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + content_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } - private int bitField0_; + private float relevanceScore_; - private int type_ = 0; + /** + * + * + *
            +               * The relevance of the chunk for a given query. Values range from
            +               * 0.0 (completely irrelevant) to 1.0 (completely relevant).
            +               * This value is for informational purpose only. It may change for
            +               * the same query and chunk at any time due to a model retraining or
            +               * change in implementation.
            +               * 
            + * + * optional float relevance_score = 3; + * + * @return Whether the relevanceScore field is set. + */ + @java.lang.Override + public boolean hasRelevanceScore() { + return ((bitField0_ & 0x00000004) != 0); + } - /** - * - * - *
            -         * Query classification type.
            -         * 
            - * - * - * .google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo.QueryClassificationInfo.Type type = 1; - * - * - * @return The enum numeric value on the wire for type. - */ - @java.lang.Override - public int getTypeValue() { - return type_; - } + /** + * + * + *
            +               * The relevance of the chunk for a given query. Values range from
            +               * 0.0 (completely irrelevant) to 1.0 (completely relevant).
            +               * This value is for informational purpose only. It may change for
            +               * the same query and chunk at any time due to a model retraining or
            +               * change in implementation.
            +               * 
            + * + * optional float relevance_score = 3; + * + * @return The relevanceScore. + */ + @java.lang.Override + public float getRelevanceScore() { + return relevanceScore_; + } - /** - * - * - *
            -         * Query classification type.
            -         * 
            - * - * - * .google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo.QueryClassificationInfo.Type type = 1; - * - * - * @param value The enum numeric value on the wire for type to set. - * @return This builder for chaining. - */ - public Builder setTypeValue(int value) { - type_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } + /** + * + * + *
            +               * The relevance of the chunk for a given query. Values range from
            +               * 0.0 (completely irrelevant) to 1.0 (completely relevant).
            +               * This value is for informational purpose only. It may change for
            +               * the same query and chunk at any time due to a model retraining or
            +               * change in implementation.
            +               * 
            + * + * optional float relevance_score = 3; + * + * @param value The relevanceScore to set. + * @return This builder for chaining. + */ + public Builder setRelevanceScore(float value) { - /** - * - * - *
            -         * Query classification type.
            -         * 
            - * - * - * .google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo.QueryClassificationInfo.Type type = 1; - * - * - * @return The type. - */ - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo - .QueryClassificationInfo.Type - getType() { - com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo - .QueryClassificationInfo.Type - result = - com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo - .QueryClassificationInfo.Type.forNumber(type_); - return result == null - ? com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo - .QueryClassificationInfo.Type.UNRECOGNIZED - : result; - } + relevanceScore_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } - /** - * - * - *
            -         * Query classification type.
            -         * 
            - * - * - * .google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo.QueryClassificationInfo.Type type = 1; - * - * - * @param value The type to set. - * @return This builder for chaining. - */ - public Builder setType( - com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo - .QueryClassificationInfo.Type - value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000001; - type_ = value.getNumber(); - onChanged(); - return this; - } + /** + * + * + *
            +               * The relevance of the chunk for a given query. Values range from
            +               * 0.0 (completely irrelevant) to 1.0 (completely relevant).
            +               * This value is for informational purpose only. It may change for
            +               * the same query and chunk at any time due to a model retraining or
            +               * change in implementation.
            +               * 
            + * + * optional float relevance_score = 3; + * + * @return This builder for chaining. + */ + public Builder clearRelevanceScore() { + bitField0_ = (bitField0_ & ~0x00000004); + relevanceScore_ = 0F; + onChanged(); + return this; + } - /** - * - * - *
            -         * Query classification type.
            -         * 
            - * - * - * .google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo.QueryClassificationInfo.Type type = 1; - * - * - * @return This builder for chaining. - */ - public Builder clearType() { - bitField0_ = (bitField0_ & ~0x00000001); - type_ = 0; - onChanged(); - return this; - } + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult.ChunkInfo) + } - private boolean positive_; + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult.ChunkInfo) + private static final com.google.cloud.discoveryengine.v1beta.Answer.Step.Action + .Observation.SearchResult.ChunkInfo + DEFAULT_INSTANCE; - /** - * - * - *
            -         * Classification output.
            -         * 
            - * - * bool positive = 2; - * - * @return The positive. - */ - @java.lang.Override - public boolean getPositive() { - return positive_; - } + static { + DEFAULT_INSTANCE = + new com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation + .SearchResult.ChunkInfo(); + } - /** - * - * - *
            -         * Classification output.
            -         * 
            - * - * bool positive = 2; - * - * @param value The positive to set. - * @return This builder for chaining. - */ - public Builder setPositive(boolean value) { + public static com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation + .SearchResult.ChunkInfo + getDefaultInstance() { + return DEFAULT_INSTANCE; + } - positive_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ChunkInfo parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; - /** - * - * - *
            -         * Classification output.
            -         * 
            - * - * bool positive = 2; - * - * @return This builder for chaining. - */ - public Builder clearPositive() { - bitField0_ = (bitField0_ & ~0x00000002); - positive_ = false; - onChanged(); - return this; - } + public static com.google.protobuf.Parser parser() { + return PARSER; + } - // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo.QueryClassificationInfo) - } + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } - // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo.QueryClassificationInfo) - private static final com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo - .QueryClassificationInfo - DEFAULT_INSTANCE; + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation + .SearchResult.ChunkInfo + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } - static { - DEFAULT_INSTANCE = - new com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo - .QueryClassificationInfo(); - } + private int bitField0_; + public static final int DOCUMENT_FIELD_NUMBER = 1; - public static com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo - .QueryClassificationInfo - getDefaultInstance() { - return DEFAULT_INSTANCE; - } + @SuppressWarnings("serial") + private volatile java.lang.Object document_ = ""; - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public QueryClassificationInfo parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException() - .setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); + /** + * + * + *
            +           * Document resource name.
            +           * 
            + * + * string document = 1; + * + * @return The document. + */ + @java.lang.Override + public java.lang.String getDocument() { + java.lang.Object ref = document_; + 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(); + document_ = s; + return s; } - }; + } - public static com.google.protobuf.Parser parser() { - return PARSER; - } + /** + * + * + *
            +           * Document resource name.
            +           * 
            + * + * string document = 1; + * + * @return The bytes for document. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDocumentBytes() { + java.lang.Object ref = document_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + document_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + public static final int URI_FIELD_NUMBER = 2; - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo - .QueryClassificationInfo - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - } + @SuppressWarnings("serial") + private volatile java.lang.Object uri_ = ""; - public static final int QUERY_CLASSIFICATION_INFO_FIELD_NUMBER = 1; + /** + * + * + *
            +           * URI for the document.
            +           * 
            + * + * string uri = 2; + * + * @return The uri. + */ + @java.lang.Override + public java.lang.String getUri() { + java.lang.Object ref = uri_; + 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(); + uri_ = s; + return s; + } + } - @SuppressWarnings("serial") - private java.util.List< - com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo - .QueryClassificationInfo> - queryClassificationInfo_; + /** + * + * + *
            +           * URI for the document.
            +           * 
            + * + * string uri = 2; + * + * @return The bytes for uri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getUriBytes() { + java.lang.Object ref = uri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } - /** - * - * - *
            -     * Query classification information.
            -     * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo.QueryClassificationInfo query_classification_info = 1; - * - */ - @java.lang.Override - public java.util.List< - com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo - .QueryClassificationInfo> - getQueryClassificationInfoList() { - return queryClassificationInfo_; - } + public static final int TITLE_FIELD_NUMBER = 3; - /** - * - * - *
            -     * Query classification information.
            -     * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo.QueryClassificationInfo query_classification_info = 1; - * - */ - @java.lang.Override - public java.util.List< - ? extends - com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo - .QueryClassificationInfoOrBuilder> - getQueryClassificationInfoOrBuilderList() { - return queryClassificationInfo_; - } + @SuppressWarnings("serial") + private volatile java.lang.Object title_ = ""; - /** - * - * - *
            -     * Query classification information.
            -     * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo.QueryClassificationInfo query_classification_info = 1; - * - */ - @java.lang.Override - public int getQueryClassificationInfoCount() { - return queryClassificationInfo_.size(); - } + /** + * + * + *
            +           * Title.
            +           * 
            + * + * string title = 3; + * + * @return The title. + */ + @java.lang.Override + public java.lang.String getTitle() { + java.lang.Object ref = title_; + 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(); + title_ = s; + return s; + } + } - /** - * - * - *
            -     * Query classification information.
            -     * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo.QueryClassificationInfo query_classification_info = 1; - * - */ - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo - .QueryClassificationInfo - getQueryClassificationInfo(int index) { - return queryClassificationInfo_.get(index); - } + /** + * + * + *
            +           * Title.
            +           * 
            + * + * string title = 3; + * + * @return The bytes for title. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTitleBytes() { + java.lang.Object ref = title_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + title_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } - /** - * - * - *
            -     * Query classification information.
            -     * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo.QueryClassificationInfo query_classification_info = 1; - * - */ - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo - .QueryClassificationInfoOrBuilder - getQueryClassificationInfoOrBuilder(int index) { - return queryClassificationInfo_.get(index); - } + public static final int SNIPPET_INFO_FIELD_NUMBER = 4; - private byte memoizedIsInitialized = -1; + @SuppressWarnings("serial") + private java.util.List< + com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation + .SearchResult.SnippetInfo> + snippetInfo_; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + /** + * + * + *
            +           * If citation_type is DOCUMENT_LEVEL_CITATION, populate document
            +           * level snippets.
            +           * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult.SnippetInfo snippet_info = 4; + * + */ + @java.lang.Override + public java.util.List< + com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation + .SearchResult.SnippetInfo> + getSnippetInfoList() { + return snippetInfo_; + } - memoizedIsInitialized = 1; - return true; - } + /** + * + * + *
            +           * If citation_type is DOCUMENT_LEVEL_CITATION, populate document
            +           * level snippets.
            +           * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult.SnippetInfo snippet_info = 4; + * + */ + @java.lang.Override + public java.util.List< + ? extends + com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation + .SearchResult.SnippetInfoOrBuilder> + getSnippetInfoOrBuilderList() { + return snippetInfo_; + } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - for (int i = 0; i < queryClassificationInfo_.size(); i++) { - output.writeMessage(1, queryClassificationInfo_.get(i)); - } - getUnknownFields().writeTo(output); - } + /** + * + * + *
            +           * If citation_type is DOCUMENT_LEVEL_CITATION, populate document
            +           * level snippets.
            +           * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult.SnippetInfo snippet_info = 4; + * + */ + @java.lang.Override + public int getSnippetInfoCount() { + return snippetInfo_.size(); + } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; + /** + * + * + *
            +           * If citation_type is DOCUMENT_LEVEL_CITATION, populate document
            +           * level snippets.
            +           * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult.SnippetInfo snippet_info = 4; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult + .SnippetInfo + getSnippetInfo(int index) { + return snippetInfo_.get(index); + } - size = 0; - for (int i = 0; i < queryClassificationInfo_.size(); i++) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 1, queryClassificationInfo_.get(i)); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } + /** + * + * + *
            +           * If citation_type is DOCUMENT_LEVEL_CITATION, populate document
            +           * level snippets.
            +           * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult.SnippetInfo snippet_info = 4; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult + .SnippetInfoOrBuilder + getSnippetInfoOrBuilder(int index) { + return snippetInfo_.get(index); + } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo)) { - return super.equals(obj); - } - com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo other = - (com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo) obj; + public static final int CHUNK_INFO_FIELD_NUMBER = 5; - if (!getQueryClassificationInfoList().equals(other.getQueryClassificationInfoList())) - return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } + @SuppressWarnings("serial") + private java.util.List< + com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation + .SearchResult.ChunkInfo> + chunkInfo_; - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getQueryClassificationInfoCount() > 0) { - hash = (37 * hash) + QUERY_CLASSIFICATION_INFO_FIELD_NUMBER; - hash = (53 * hash) + getQueryClassificationInfoList().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } + /** + * + * + *
            +           * If citation_type is CHUNK_LEVEL_CITATION and chunk mode is on,
            +           * populate chunk info.
            +           * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult.ChunkInfo chunk_info = 5; + * + */ + @java.lang.Override + public java.util.List< + com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation + .SearchResult.ChunkInfo> + getChunkInfoList() { + return chunkInfo_; + } - public static com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } + /** + * + * + *
            +           * If citation_type is CHUNK_LEVEL_CITATION and chunk mode is on,
            +           * populate chunk info.
            +           * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult.ChunkInfo chunk_info = 5; + * + */ + @java.lang.Override + public java.util.List< + ? extends + com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation + .SearchResult.ChunkInfoOrBuilder> + getChunkInfoOrBuilderList() { + return chunkInfo_; + } - public static com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } + /** + * + * + *
            +           * If citation_type is CHUNK_LEVEL_CITATION and chunk mode is on,
            +           * populate chunk info.
            +           * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult.ChunkInfo chunk_info = 5; + * + */ + @java.lang.Override + public int getChunkInfoCount() { + return chunkInfo_.size(); + } - public static com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } + /** + * + * + *
            +           * If citation_type is CHUNK_LEVEL_CITATION and chunk mode is on,
            +           * populate chunk info.
            +           * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult.ChunkInfo chunk_info = 5; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult + .ChunkInfo + getChunkInfo(int index) { + return chunkInfo_.get(index); + } - public static com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo 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.discoveryengine.v1beta.Answer.QueryUnderstandingInfo parseFrom( - byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } + /** + * + * + *
            +           * If citation_type is CHUNK_LEVEL_CITATION and chunk mode is on,
            +           * populate chunk info.
            +           * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult.ChunkInfo chunk_info = 5; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult + .ChunkInfoOrBuilder + getChunkInfoOrBuilder(int index) { + return chunkInfo_.get(index); + } - public static com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } + public static final int STRUCT_DATA_FIELD_NUMBER = 6; + private com.google.protobuf.Struct structData_; - public static com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } + /** + * + * + *
            +           * Data representation.
            +           * The structured JSON data for the document.
            +           * It's populated from the struct data from the Document, or the
            +           * Chunk in search result.
            +           * 
            + * + * .google.protobuf.Struct struct_data = 6; + * + * @return Whether the structData field is set. + */ + @java.lang.Override + public boolean hasStructData() { + return ((bitField0_ & 0x00000001) != 0); + } - public static com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo - parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } + /** + * + * + *
            +           * Data representation.
            +           * The structured JSON data for the document.
            +           * It's populated from the struct data from the Document, or the
            +           * Chunk in search result.
            +           * 
            + * + * .google.protobuf.Struct struct_data = 6; + * + * @return The structData. + */ + @java.lang.Override + public com.google.protobuf.Struct getStructData() { + return structData_ == null + ? com.google.protobuf.Struct.getDefaultInstance() + : structData_; + } - public static com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo - parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } + /** + * + * + *
            +           * Data representation.
            +           * The structured JSON data for the document.
            +           * It's populated from the struct data from the Document, or the
            +           * Chunk in search result.
            +           * 
            + * + * .google.protobuf.Struct struct_data = 6; + */ + @java.lang.Override + public com.google.protobuf.StructOrBuilder getStructDataOrBuilder() { + return structData_ == null + ? com.google.protobuf.Struct.getDefaultInstance() + : structData_; + } - public static com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } + private byte memoizedIsInitialized = -1; - public static com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo 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 final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } + memoizedIsInitialized = 1; + return true; + } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(document_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, document_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(uri_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, uri_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(title_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, title_); + } + for (int i = 0; i < snippetInfo_.size(); i++) { + output.writeMessage(4, snippetInfo_.get(i)); + } + for (int i = 0; i < chunkInfo_.size(); i++) { + output.writeMessage(5, chunkInfo_.get(i)); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(6, getStructData()); + } + getUnknownFields().writeTo(output); + } - public static Builder newBuilder( - com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(document_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, document_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(uri_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, uri_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(title_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, title_); + } + for (int i = 0; i < snippetInfo_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(4, snippetInfo_.get(i)); + } + for (int i = 0; i < chunkInfo_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(5, chunkInfo_.get(i)); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getStructData()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof + com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation + .SearchResult)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult + other = + (com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation + .SearchResult) + obj; - /** - * - * - *
            -     * Query understanding information.
            -     * 
            - * - * Protobuf type {@code google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo) - com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfoOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.discoveryengine.v1beta.AnswerProto - .internal_static_google_cloud_discoveryengine_v1beta_Answer_QueryUnderstandingInfo_descriptor; - } + if (!getDocument().equals(other.getDocument())) return false; + if (!getUri().equals(other.getUri())) return false; + if (!getTitle().equals(other.getTitle())) return false; + if (!getSnippetInfoList().equals(other.getSnippetInfoList())) return false; + if (!getChunkInfoList().equals(other.getChunkInfoList())) return false; + if (hasStructData() != other.hasStructData()) return false; + if (hasStructData()) { + if (!getStructData().equals(other.getStructData())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.discoveryengine.v1beta.AnswerProto - .internal_static_google_cloud_discoveryengine_v1beta_Answer_QueryUnderstandingInfo_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo.class, - com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo.Builder - .class); - } + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + DOCUMENT_FIELD_NUMBER; + hash = (53 * hash) + getDocument().hashCode(); + hash = (37 * hash) + URI_FIELD_NUMBER; + hash = (53 * hash) + getUri().hashCode(); + hash = (37 * hash) + TITLE_FIELD_NUMBER; + hash = (53 * hash) + getTitle().hashCode(); + if (getSnippetInfoCount() > 0) { + hash = (37 * hash) + SNIPPET_INFO_FIELD_NUMBER; + hash = (53 * hash) + getSnippetInfoList().hashCode(); + } + if (getChunkInfoCount() > 0) { + hash = (37 * hash) + CHUNK_INFO_FIELD_NUMBER; + hash = (53 * hash) + getChunkInfoList().hashCode(); + } + if (hasStructData()) { + hash = (37 * hash) + STRUCT_DATA_FIELD_NUMBER; + hash = (53 * hash) + getStructData().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } - // Construct using - // com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo.newBuilder() - private Builder() {} + public static com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation + .SearchResult + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - } + public static com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation + .SearchResult + parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - if (queryClassificationInfoBuilder_ == null) { - queryClassificationInfo_ = java.util.Collections.emptyList(); - } else { - queryClassificationInfo_ = null; - queryClassificationInfoBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000001); - return this; - } + public static com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation + .SearchResult + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.discoveryengine.v1beta.AnswerProto - .internal_static_google_cloud_discoveryengine_v1beta_Answer_QueryUnderstandingInfo_descriptor; - } + public static com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation + .SearchResult + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo - getDefaultInstanceForType() { - return com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo - .getDefaultInstance(); - } + public static com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation + .SearchResult + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo build() { - com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo result = - buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } + public static com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation + .SearchResult + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo buildPartial() { - com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo result = - new com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } + public static com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation + .SearchResult + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } - private void buildPartialRepeatedFields( - com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo result) { - if (queryClassificationInfoBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - queryClassificationInfo_ = - java.util.Collections.unmodifiableList(queryClassificationInfo_); - bitField0_ = (bitField0_ & ~0x00000001); + public static com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation + .SearchResult + parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); } - result.queryClassificationInfo_ = queryClassificationInfo_; - } else { - result.queryClassificationInfo_ = queryClassificationInfoBuilder_.build(); - } - } - private void buildPartial0( - com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo result) { - int from_bitField0_ = bitField0_; - } + public static com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation + .SearchResult + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input); + } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other - instanceof com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo) { - return mergeFrom( - (com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo) other); - } else { - super.mergeFrom(other); - return this; - } - } + public static com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation + .SearchResult + parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } - public Builder mergeFrom( - com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo other) { - if (other - == com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo - .getDefaultInstance()) return this; - if (queryClassificationInfoBuilder_ == null) { - if (!other.queryClassificationInfo_.isEmpty()) { - if (queryClassificationInfo_.isEmpty()) { - queryClassificationInfo_ = other.queryClassificationInfo_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureQueryClassificationInfoIsMutable(); - queryClassificationInfo_.addAll(other.queryClassificationInfo_); - } - onChanged(); + public static com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation + .SearchResult + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } - } else { - if (!other.queryClassificationInfo_.isEmpty()) { - if (queryClassificationInfoBuilder_.isEmpty()) { - queryClassificationInfoBuilder_.dispose(); - queryClassificationInfoBuilder_ = null; - queryClassificationInfo_ = other.queryClassificationInfo_; - bitField0_ = (bitField0_ & ~0x00000001); - queryClassificationInfoBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders - ? internalGetQueryClassificationInfoFieldBuilder() - : null; - } else { - queryClassificationInfoBuilder_.addAllMessages(other.queryClassificationInfo_); - } + + public static com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation + .SearchResult + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); } - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - @java.lang.Override - public final boolean isInitialized() { - return true; - } + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo - .QueryClassificationInfo - m = - input.readMessage( - com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo - .QueryClassificationInfo.parser(), - extensionRegistry); - if (queryClassificationInfoBuilder_ == null) { - ensureQueryClassificationInfoIsMutable(); - queryClassificationInfo_.add(m); - } else { - queryClassificationInfoBuilder_.addMessage(m); - } - break; - } // case 10 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } - private int bitField0_; + public static Builder newBuilder( + com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult + prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } - private java.util.List< - com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo - .QueryClassificationInfo> - queryClassificationInfo_ = java.util.Collections.emptyList(); + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } - private void ensureQueryClassificationInfoIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - queryClassificationInfo_ = - new java.util.ArrayList< - com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo - .QueryClassificationInfo>(queryClassificationInfo_); - bitField0_ |= 0x00000001; - } - } + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } - private com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo - .QueryClassificationInfo, - com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo - .QueryClassificationInfo.Builder, - com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo - .QueryClassificationInfoOrBuilder> - queryClassificationInfoBuilder_; + /** + * Protobuf type {@code + * google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult) + com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation + .SearchResultOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.AnswerProto + .internal_static_google_cloud_discoveryengine_v1beta_Answer_Step_Action_Observation_SearchResult_descriptor; + } - /** - * - * - *
            -       * Query classification information.
            -       * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo.QueryClassificationInfo query_classification_info = 1; - * - */ - public java.util.List< - com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo - .QueryClassificationInfo> - getQueryClassificationInfoList() { - if (queryClassificationInfoBuilder_ == null) { - return java.util.Collections.unmodifiableList(queryClassificationInfo_); - } else { - return queryClassificationInfoBuilder_.getMessageList(); - } - } + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.AnswerProto + .internal_static_google_cloud_discoveryengine_v1beta_Answer_Step_Action_Observation_SearchResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation + .SearchResult.class, + com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation + .SearchResult.Builder.class); + } - /** - * - * - *
            -       * Query classification information.
            -       * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo.QueryClassificationInfo query_classification_info = 1; - * - */ - public int getQueryClassificationInfoCount() { - if (queryClassificationInfoBuilder_ == null) { - return queryClassificationInfo_.size(); - } else { - return queryClassificationInfoBuilder_.getCount(); - } - } + // Construct using + // com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } - /** - * - * - *
            -       * Query classification information.
            -       * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo.QueryClassificationInfo query_classification_info = 1; - * - */ - public com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo - .QueryClassificationInfo - getQueryClassificationInfo(int index) { - if (queryClassificationInfoBuilder_ == null) { - return queryClassificationInfo_.get(index); - } else { - return queryClassificationInfoBuilder_.getMessage(index); - } - } + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } - /** - * - * - *
            -       * Query classification information.
            -       * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo.QueryClassificationInfo query_classification_info = 1; - * - */ - public Builder setQueryClassificationInfo( - int index, - com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo - .QueryClassificationInfo - value) { - if (queryClassificationInfoBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureQueryClassificationInfoIsMutable(); - queryClassificationInfo_.set(index, value); - onChanged(); - } else { - queryClassificationInfoBuilder_.setMessage(index, value); - } - return this; - } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetSnippetInfoFieldBuilder(); + internalGetChunkInfoFieldBuilder(); + internalGetStructDataFieldBuilder(); + } + } - /** - * - * - *
            -       * Query classification information.
            -       * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo.QueryClassificationInfo query_classification_info = 1; - * - */ - public Builder setQueryClassificationInfo( - int index, - com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo - .QueryClassificationInfo.Builder - builderForValue) { - if (queryClassificationInfoBuilder_ == null) { - ensureQueryClassificationInfoIsMutable(); - queryClassificationInfo_.set(index, builderForValue.build()); - onChanged(); - } else { - queryClassificationInfoBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + document_ = ""; + uri_ = ""; + title_ = ""; + if (snippetInfoBuilder_ == null) { + snippetInfo_ = java.util.Collections.emptyList(); + } else { + snippetInfo_ = null; + snippetInfoBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000008); + if (chunkInfoBuilder_ == null) { + chunkInfo_ = java.util.Collections.emptyList(); + } else { + chunkInfo_ = null; + chunkInfoBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000010); + structData_ = null; + if (structDataBuilder_ != null) { + structDataBuilder_.dispose(); + structDataBuilder_ = null; + } + return this; + } - /** - * - * - *
            -       * Query classification information.
            -       * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo.QueryClassificationInfo query_classification_info = 1; - * - */ - public Builder addQueryClassificationInfo( - com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo - .QueryClassificationInfo - value) { - if (queryClassificationInfoBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureQueryClassificationInfoIsMutable(); - queryClassificationInfo_.add(value); - onChanged(); - } else { - queryClassificationInfoBuilder_.addMessage(value); - } - return this; - } - - /** - * - * - *
            -       * Query classification information.
            -       * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo.QueryClassificationInfo query_classification_info = 1; - * - */ - public Builder addQueryClassificationInfo( - int index, - com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo - .QueryClassificationInfo - value) { - if (queryClassificationInfoBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureQueryClassificationInfoIsMutable(); - queryClassificationInfo_.add(index, value); - onChanged(); - } else { - queryClassificationInfoBuilder_.addMessage(index, value); - } - return this; - } + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1beta.AnswerProto + .internal_static_google_cloud_discoveryengine_v1beta_Answer_Step_Action_Observation_SearchResult_descriptor; + } - /** - * - * - *
            -       * Query classification information.
            -       * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo.QueryClassificationInfo query_classification_info = 1; - * - */ - public Builder addQueryClassificationInfo( - com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo - .QueryClassificationInfo.Builder - builderForValue) { - if (queryClassificationInfoBuilder_ == null) { - ensureQueryClassificationInfoIsMutable(); - queryClassificationInfo_.add(builderForValue.build()); - onChanged(); - } else { - queryClassificationInfoBuilder_.addMessage(builderForValue.build()); - } - return this; - } + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation + .SearchResult + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation + .SearchResult.getDefaultInstance(); + } - /** - * - * - *
            -       * Query classification information.
            -       * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo.QueryClassificationInfo query_classification_info = 1; - * - */ - public Builder addQueryClassificationInfo( - int index, - com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo - .QueryClassificationInfo.Builder - builderForValue) { - if (queryClassificationInfoBuilder_ == null) { - ensureQueryClassificationInfoIsMutable(); - queryClassificationInfo_.add(index, builderForValue.build()); - onChanged(); - } else { - queryClassificationInfoBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation + .SearchResult + build() { + com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } - /** - * - * - *
            -       * Query classification information.
            -       * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo.QueryClassificationInfo query_classification_info = 1; - * - */ - public Builder addAllQueryClassificationInfo( - java.lang.Iterable< - ? extends - com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo - .QueryClassificationInfo> - values) { - if (queryClassificationInfoBuilder_ == null) { - ensureQueryClassificationInfoIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, queryClassificationInfo_); - onChanged(); - } else { - queryClassificationInfoBuilder_.addAllMessages(values); - } - return this; - } + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation + .SearchResult + buildPartial() { + com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult + result = + new com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation + .SearchResult(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } - /** - * - * - *
            -       * Query classification information.
            -       * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo.QueryClassificationInfo query_classification_info = 1; - * - */ - public Builder clearQueryClassificationInfo() { - if (queryClassificationInfoBuilder_ == null) { - queryClassificationInfo_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - queryClassificationInfoBuilder_.clear(); - } - return this; - } + private void buildPartialRepeatedFields( + com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult + result) { + if (snippetInfoBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0)) { + snippetInfo_ = java.util.Collections.unmodifiableList(snippetInfo_); + bitField0_ = (bitField0_ & ~0x00000008); + } + result.snippetInfo_ = snippetInfo_; + } else { + result.snippetInfo_ = snippetInfoBuilder_.build(); + } + if (chunkInfoBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0)) { + chunkInfo_ = java.util.Collections.unmodifiableList(chunkInfo_); + bitField0_ = (bitField0_ & ~0x00000010); + } + result.chunkInfo_ = chunkInfo_; + } else { + result.chunkInfo_ = chunkInfoBuilder_.build(); + } + } - /** - * - * - *
            -       * Query classification information.
            -       * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo.QueryClassificationInfo query_classification_info = 1; - * - */ - public Builder removeQueryClassificationInfo(int index) { - if (queryClassificationInfoBuilder_ == null) { - ensureQueryClassificationInfoIsMutable(); - queryClassificationInfo_.remove(index); - onChanged(); - } else { - queryClassificationInfoBuilder_.remove(index); - } - return this; - } + private void buildPartial0( + com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult + result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.document_ = document_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.uri_ = uri_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.title_ = title_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000020) != 0)) { + result.structData_ = + structDataBuilder_ == null ? structData_ : structDataBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } - /** - * - * - *
            -       * Query classification information.
            -       * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo.QueryClassificationInfo query_classification_info = 1; - * - */ + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation + .SearchResult) { + return mergeFrom( + (com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation + .SearchResult) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult + other) { + if (other + == com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation + .SearchResult.getDefaultInstance()) return this; + if (!other.getDocument().isEmpty()) { + document_ = other.document_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getUri().isEmpty()) { + uri_ = other.uri_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getTitle().isEmpty()) { + title_ = other.title_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (snippetInfoBuilder_ == null) { + if (!other.snippetInfo_.isEmpty()) { + if (snippetInfo_.isEmpty()) { + snippetInfo_ = other.snippetInfo_; + bitField0_ = (bitField0_ & ~0x00000008); + } else { + ensureSnippetInfoIsMutable(); + snippetInfo_.addAll(other.snippetInfo_); + } + onChanged(); + } + } else { + if (!other.snippetInfo_.isEmpty()) { + if (snippetInfoBuilder_.isEmpty()) { + snippetInfoBuilder_.dispose(); + snippetInfoBuilder_ = null; + snippetInfo_ = other.snippetInfo_; + bitField0_ = (bitField0_ & ~0x00000008); + snippetInfoBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetSnippetInfoFieldBuilder() + : null; + } else { + snippetInfoBuilder_.addAllMessages(other.snippetInfo_); + } + } + } + if (chunkInfoBuilder_ == null) { + if (!other.chunkInfo_.isEmpty()) { + if (chunkInfo_.isEmpty()) { + chunkInfo_ = other.chunkInfo_; + bitField0_ = (bitField0_ & ~0x00000010); + } else { + ensureChunkInfoIsMutable(); + chunkInfo_.addAll(other.chunkInfo_); + } + onChanged(); + } + } else { + if (!other.chunkInfo_.isEmpty()) { + if (chunkInfoBuilder_.isEmpty()) { + chunkInfoBuilder_.dispose(); + chunkInfoBuilder_ = null; + chunkInfo_ = other.chunkInfo_; + bitField0_ = (bitField0_ & ~0x00000010); + chunkInfoBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetChunkInfoFieldBuilder() + : null; + } else { + chunkInfoBuilder_.addAllMessages(other.chunkInfo_); + } + } + } + if (other.hasStructData()) { + mergeStructData(other.getStructData()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + document_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + uri_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + title_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation + .SearchResult.SnippetInfo + m = + input.readMessage( + com.google.cloud.discoveryengine.v1beta.Answer.Step.Action + .Observation.SearchResult.SnippetInfo.parser(), + extensionRegistry); + if (snippetInfoBuilder_ == null) { + ensureSnippetInfoIsMutable(); + snippetInfo_.add(m); + } else { + snippetInfoBuilder_.addMessage(m); + } + break; + } // case 34 + case 42: + { + com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation + .SearchResult.ChunkInfo + m = + input.readMessage( + com.google.cloud.discoveryengine.v1beta.Answer.Step.Action + .Observation.SearchResult.ChunkInfo.parser(), + extensionRegistry); + if (chunkInfoBuilder_ == null) { + ensureChunkInfoIsMutable(); + chunkInfo_.add(m); + } else { + chunkInfoBuilder_.addMessage(m); + } + break; + } // case 42 + case 50: + { + input.readMessage( + internalGetStructDataFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 50 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object document_ = ""; + + /** + * + * + *
            +             * Document resource name.
            +             * 
            + * + * string document = 1; + * + * @return The document. + */ + public java.lang.String getDocument() { + java.lang.Object ref = document_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + document_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
            +             * Document resource name.
            +             * 
            + * + * string document = 1; + * + * @return The bytes for document. + */ + public com.google.protobuf.ByteString getDocumentBytes() { + java.lang.Object ref = document_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + document_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
            +             * Document resource name.
            +             * 
            + * + * string document = 1; + * + * @param value The document to set. + * @return This builder for chaining. + */ + public Builder setDocument(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + document_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
            +             * Document resource name.
            +             * 
            + * + * string document = 1; + * + * @return This builder for chaining. + */ + public Builder clearDocument() { + document_ = getDefaultInstance().getDocument(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
            +             * Document resource name.
            +             * 
            + * + * string document = 1; + * + * @param value The bytes for document to set. + * @return This builder for chaining. + */ + public Builder setDocumentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + document_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object uri_ = ""; + + /** + * + * + *
            +             * URI for the document.
            +             * 
            + * + * string uri = 2; + * + * @return The uri. + */ + public java.lang.String getUri() { + java.lang.Object ref = uri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
            +             * URI for the document.
            +             * 
            + * + * string uri = 2; + * + * @return The bytes for uri. + */ + public com.google.protobuf.ByteString getUriBytes() { + java.lang.Object ref = uri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
            +             * URI for the document.
            +             * 
            + * + * string uri = 2; + * + * @param value The uri to set. + * @return This builder for chaining. + */ + public Builder setUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + uri_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
            +             * URI for the document.
            +             * 
            + * + * string uri = 2; + * + * @return This builder for chaining. + */ + public Builder clearUri() { + uri_ = getDefaultInstance().getUri(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
            +             * URI for the document.
            +             * 
            + * + * string uri = 2; + * + * @param value The bytes for uri to set. + * @return This builder for chaining. + */ + public Builder setUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + uri_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object title_ = ""; + + /** + * + * + *
            +             * Title.
            +             * 
            + * + * string title = 3; + * + * @return The title. + */ + public java.lang.String getTitle() { + java.lang.Object ref = title_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + title_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
            +             * Title.
            +             * 
            + * + * string title = 3; + * + * @return The bytes for title. + */ + public com.google.protobuf.ByteString getTitleBytes() { + java.lang.Object ref = title_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + title_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
            +             * Title.
            +             * 
            + * + * string title = 3; + * + * @param value The title to set. + * @return This builder for chaining. + */ + public Builder setTitle(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + title_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
            +             * Title.
            +             * 
            + * + * string title = 3; + * + * @return This builder for chaining. + */ + public Builder clearTitle() { + title_ = getDefaultInstance().getTitle(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
            +             * Title.
            +             * 
            + * + * string title = 3; + * + * @param value The bytes for title to set. + * @return This builder for chaining. + */ + public Builder setTitleBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + title_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.util.List< + com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation + .SearchResult.SnippetInfo> + snippetInfo_ = java.util.Collections.emptyList(); + + private void ensureSnippetInfoIsMutable() { + if (!((bitField0_ & 0x00000008) != 0)) { + snippetInfo_ = + new java.util.ArrayList< + com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation + .SearchResult.SnippetInfo>(snippetInfo_); + bitField0_ |= 0x00000008; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation + .SearchResult.SnippetInfo, + com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation + .SearchResult.SnippetInfo.Builder, + com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation + .SearchResult.SnippetInfoOrBuilder> + snippetInfoBuilder_; + + /** + * + * + *
            +             * If citation_type is DOCUMENT_LEVEL_CITATION, populate document
            +             * level snippets.
            +             * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult.SnippetInfo snippet_info = 4; + * + */ + public java.util.List< + com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation + .SearchResult.SnippetInfo> + getSnippetInfoList() { + if (snippetInfoBuilder_ == null) { + return java.util.Collections.unmodifiableList(snippetInfo_); + } else { + return snippetInfoBuilder_.getMessageList(); + } + } + + /** + * + * + *
            +             * If citation_type is DOCUMENT_LEVEL_CITATION, populate document
            +             * level snippets.
            +             * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult.SnippetInfo snippet_info = 4; + * + */ + public int getSnippetInfoCount() { + if (snippetInfoBuilder_ == null) { + return snippetInfo_.size(); + } else { + return snippetInfoBuilder_.getCount(); + } + } + + /** + * + * + *
            +             * If citation_type is DOCUMENT_LEVEL_CITATION, populate document
            +             * level snippets.
            +             * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult.SnippetInfo snippet_info = 4; + * + */ + public com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation + .SearchResult.SnippetInfo + getSnippetInfo(int index) { + if (snippetInfoBuilder_ == null) { + return snippetInfo_.get(index); + } else { + return snippetInfoBuilder_.getMessage(index); + } + } + + /** + * + * + *
            +             * If citation_type is DOCUMENT_LEVEL_CITATION, populate document
            +             * level snippets.
            +             * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult.SnippetInfo snippet_info = 4; + * + */ + public Builder setSnippetInfo( + int index, + com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult + .SnippetInfo + value) { + if (snippetInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSnippetInfoIsMutable(); + snippetInfo_.set(index, value); + onChanged(); + } else { + snippetInfoBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
            +             * If citation_type is DOCUMENT_LEVEL_CITATION, populate document
            +             * level snippets.
            +             * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult.SnippetInfo snippet_info = 4; + * + */ + public Builder setSnippetInfo( + int index, + com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult + .SnippetInfo.Builder + builderForValue) { + if (snippetInfoBuilder_ == null) { + ensureSnippetInfoIsMutable(); + snippetInfo_.set(index, builderForValue.build()); + onChanged(); + } else { + snippetInfoBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
            +             * If citation_type is DOCUMENT_LEVEL_CITATION, populate document
            +             * level snippets.
            +             * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult.SnippetInfo snippet_info = 4; + * + */ + public Builder addSnippetInfo( + com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult + .SnippetInfo + value) { + if (snippetInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSnippetInfoIsMutable(); + snippetInfo_.add(value); + onChanged(); + } else { + snippetInfoBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
            +             * If citation_type is DOCUMENT_LEVEL_CITATION, populate document
            +             * level snippets.
            +             * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult.SnippetInfo snippet_info = 4; + * + */ + public Builder addSnippetInfo( + int index, + com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult + .SnippetInfo + value) { + if (snippetInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSnippetInfoIsMutable(); + snippetInfo_.add(index, value); + onChanged(); + } else { + snippetInfoBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
            +             * If citation_type is DOCUMENT_LEVEL_CITATION, populate document
            +             * level snippets.
            +             * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult.SnippetInfo snippet_info = 4; + * + */ + public Builder addSnippetInfo( + com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult + .SnippetInfo.Builder + builderForValue) { + if (snippetInfoBuilder_ == null) { + ensureSnippetInfoIsMutable(); + snippetInfo_.add(builderForValue.build()); + onChanged(); + } else { + snippetInfoBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
            +             * If citation_type is DOCUMENT_LEVEL_CITATION, populate document
            +             * level snippets.
            +             * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult.SnippetInfo snippet_info = 4; + * + */ + public Builder addSnippetInfo( + int index, + com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult + .SnippetInfo.Builder + builderForValue) { + if (snippetInfoBuilder_ == null) { + ensureSnippetInfoIsMutable(); + snippetInfo_.add(index, builderForValue.build()); + onChanged(); + } else { + snippetInfoBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
            +             * If citation_type is DOCUMENT_LEVEL_CITATION, populate document
            +             * level snippets.
            +             * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult.SnippetInfo snippet_info = 4; + * + */ + public Builder addAllSnippetInfo( + java.lang.Iterable< + ? extends + com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation + .SearchResult.SnippetInfo> + values) { + if (snippetInfoBuilder_ == null) { + ensureSnippetInfoIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, snippetInfo_); + onChanged(); + } else { + snippetInfoBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
            +             * If citation_type is DOCUMENT_LEVEL_CITATION, populate document
            +             * level snippets.
            +             * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult.SnippetInfo snippet_info = 4; + * + */ + public Builder clearSnippetInfo() { + if (snippetInfoBuilder_ == null) { + snippetInfo_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + } else { + snippetInfoBuilder_.clear(); + } + return this; + } + + /** + * + * + *
            +             * If citation_type is DOCUMENT_LEVEL_CITATION, populate document
            +             * level snippets.
            +             * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult.SnippetInfo snippet_info = 4; + * + */ + public Builder removeSnippetInfo(int index) { + if (snippetInfoBuilder_ == null) { + ensureSnippetInfoIsMutable(); + snippetInfo_.remove(index); + onChanged(); + } else { + snippetInfoBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
            +             * If citation_type is DOCUMENT_LEVEL_CITATION, populate document
            +             * level snippets.
            +             * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult.SnippetInfo snippet_info = 4; + * + */ + public com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation + .SearchResult.SnippetInfo.Builder + getSnippetInfoBuilder(int index) { + return internalGetSnippetInfoFieldBuilder().getBuilder(index); + } + + /** + * + * + *
            +             * If citation_type is DOCUMENT_LEVEL_CITATION, populate document
            +             * level snippets.
            +             * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult.SnippetInfo snippet_info = 4; + * + */ + public com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation + .SearchResult.SnippetInfoOrBuilder + getSnippetInfoOrBuilder(int index) { + if (snippetInfoBuilder_ == null) { + return snippetInfo_.get(index); + } else { + return snippetInfoBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
            +             * If citation_type is DOCUMENT_LEVEL_CITATION, populate document
            +             * level snippets.
            +             * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult.SnippetInfo snippet_info = 4; + * + */ + public java.util.List< + ? extends + com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation + .SearchResult.SnippetInfoOrBuilder> + getSnippetInfoOrBuilderList() { + if (snippetInfoBuilder_ != null) { + return snippetInfoBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(snippetInfo_); + } + } + + /** + * + * + *
            +             * If citation_type is DOCUMENT_LEVEL_CITATION, populate document
            +             * level snippets.
            +             * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult.SnippetInfo snippet_info = 4; + * + */ + public com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation + .SearchResult.SnippetInfo.Builder + addSnippetInfoBuilder() { + return internalGetSnippetInfoFieldBuilder() + .addBuilder( + com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation + .SearchResult.SnippetInfo.getDefaultInstance()); + } + + /** + * + * + *
            +             * If citation_type is DOCUMENT_LEVEL_CITATION, populate document
            +             * level snippets.
            +             * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult.SnippetInfo snippet_info = 4; + * + */ + public com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation + .SearchResult.SnippetInfo.Builder + addSnippetInfoBuilder(int index) { + return internalGetSnippetInfoFieldBuilder() + .addBuilder( + index, + com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation + .SearchResult.SnippetInfo.getDefaultInstance()); + } + + /** + * + * + *
            +             * If citation_type is DOCUMENT_LEVEL_CITATION, populate document
            +             * level snippets.
            +             * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult.SnippetInfo snippet_info = 4; + * + */ + public java.util.List< + com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation + .SearchResult.SnippetInfo.Builder> + getSnippetInfoBuilderList() { + return internalGetSnippetInfoFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation + .SearchResult.SnippetInfo, + com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation + .SearchResult.SnippetInfo.Builder, + com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation + .SearchResult.SnippetInfoOrBuilder> + internalGetSnippetInfoFieldBuilder() { + if (snippetInfoBuilder_ == null) { + snippetInfoBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation + .SearchResult.SnippetInfo, + com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation + .SearchResult.SnippetInfo.Builder, + com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation + .SearchResult.SnippetInfoOrBuilder>( + snippetInfo_, + ((bitField0_ & 0x00000008) != 0), + getParentForChildren(), + isClean()); + snippetInfo_ = null; + } + return snippetInfoBuilder_; + } + + private java.util.List< + com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation + .SearchResult.ChunkInfo> + chunkInfo_ = java.util.Collections.emptyList(); + + private void ensureChunkInfoIsMutable() { + if (!((bitField0_ & 0x00000010) != 0)) { + chunkInfo_ = + new java.util.ArrayList< + com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation + .SearchResult.ChunkInfo>(chunkInfo_); + bitField0_ |= 0x00000010; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation + .SearchResult.ChunkInfo, + com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation + .SearchResult.ChunkInfo.Builder, + com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation + .SearchResult.ChunkInfoOrBuilder> + chunkInfoBuilder_; + + /** + * + * + *
            +             * If citation_type is CHUNK_LEVEL_CITATION and chunk mode is on,
            +             * populate chunk info.
            +             * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult.ChunkInfo chunk_info = 5; + * + */ + public java.util.List< + com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation + .SearchResult.ChunkInfo> + getChunkInfoList() { + if (chunkInfoBuilder_ == null) { + return java.util.Collections.unmodifiableList(chunkInfo_); + } else { + return chunkInfoBuilder_.getMessageList(); + } + } + + /** + * + * + *
            +             * If citation_type is CHUNK_LEVEL_CITATION and chunk mode is on,
            +             * populate chunk info.
            +             * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult.ChunkInfo chunk_info = 5; + * + */ + public int getChunkInfoCount() { + if (chunkInfoBuilder_ == null) { + return chunkInfo_.size(); + } else { + return chunkInfoBuilder_.getCount(); + } + } + + /** + * + * + *
            +             * If citation_type is CHUNK_LEVEL_CITATION and chunk mode is on,
            +             * populate chunk info.
            +             * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult.ChunkInfo chunk_info = 5; + * + */ + public com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation + .SearchResult.ChunkInfo + getChunkInfo(int index) { + if (chunkInfoBuilder_ == null) { + return chunkInfo_.get(index); + } else { + return chunkInfoBuilder_.getMessage(index); + } + } + + /** + * + * + *
            +             * If citation_type is CHUNK_LEVEL_CITATION and chunk mode is on,
            +             * populate chunk info.
            +             * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult.ChunkInfo chunk_info = 5; + * + */ + public Builder setChunkInfo( + int index, + com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult + .ChunkInfo + value) { + if (chunkInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureChunkInfoIsMutable(); + chunkInfo_.set(index, value); + onChanged(); + } else { + chunkInfoBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
            +             * If citation_type is CHUNK_LEVEL_CITATION and chunk mode is on,
            +             * populate chunk info.
            +             * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult.ChunkInfo chunk_info = 5; + * + */ + public Builder setChunkInfo( + int index, + com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult + .ChunkInfo.Builder + builderForValue) { + if (chunkInfoBuilder_ == null) { + ensureChunkInfoIsMutable(); + chunkInfo_.set(index, builderForValue.build()); + onChanged(); + } else { + chunkInfoBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
            +             * If citation_type is CHUNK_LEVEL_CITATION and chunk mode is on,
            +             * populate chunk info.
            +             * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult.ChunkInfo chunk_info = 5; + * + */ + public Builder addChunkInfo( + com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult + .ChunkInfo + value) { + if (chunkInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureChunkInfoIsMutable(); + chunkInfo_.add(value); + onChanged(); + } else { + chunkInfoBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
            +             * If citation_type is CHUNK_LEVEL_CITATION and chunk mode is on,
            +             * populate chunk info.
            +             * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult.ChunkInfo chunk_info = 5; + * + */ + public Builder addChunkInfo( + int index, + com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult + .ChunkInfo + value) { + if (chunkInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureChunkInfoIsMutable(); + chunkInfo_.add(index, value); + onChanged(); + } else { + chunkInfoBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
            +             * If citation_type is CHUNK_LEVEL_CITATION and chunk mode is on,
            +             * populate chunk info.
            +             * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult.ChunkInfo chunk_info = 5; + * + */ + public Builder addChunkInfo( + com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult + .ChunkInfo.Builder + builderForValue) { + if (chunkInfoBuilder_ == null) { + ensureChunkInfoIsMutable(); + chunkInfo_.add(builderForValue.build()); + onChanged(); + } else { + chunkInfoBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
            +             * If citation_type is CHUNK_LEVEL_CITATION and chunk mode is on,
            +             * populate chunk info.
            +             * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult.ChunkInfo chunk_info = 5; + * + */ + public Builder addChunkInfo( + int index, + com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult + .ChunkInfo.Builder + builderForValue) { + if (chunkInfoBuilder_ == null) { + ensureChunkInfoIsMutable(); + chunkInfo_.add(index, builderForValue.build()); + onChanged(); + } else { + chunkInfoBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
            +             * If citation_type is CHUNK_LEVEL_CITATION and chunk mode is on,
            +             * populate chunk info.
            +             * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult.ChunkInfo chunk_info = 5; + * + */ + public Builder addAllChunkInfo( + java.lang.Iterable< + ? extends + com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation + .SearchResult.ChunkInfo> + values) { + if (chunkInfoBuilder_ == null) { + ensureChunkInfoIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, chunkInfo_); + onChanged(); + } else { + chunkInfoBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
            +             * If citation_type is CHUNK_LEVEL_CITATION and chunk mode is on,
            +             * populate chunk info.
            +             * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult.ChunkInfo chunk_info = 5; + * + */ + public Builder clearChunkInfo() { + if (chunkInfoBuilder_ == null) { + chunkInfo_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + } else { + chunkInfoBuilder_.clear(); + } + return this; + } + + /** + * + * + *
            +             * If citation_type is CHUNK_LEVEL_CITATION and chunk mode is on,
            +             * populate chunk info.
            +             * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult.ChunkInfo chunk_info = 5; + * + */ + public Builder removeChunkInfo(int index) { + if (chunkInfoBuilder_ == null) { + ensureChunkInfoIsMutable(); + chunkInfo_.remove(index); + onChanged(); + } else { + chunkInfoBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
            +             * If citation_type is CHUNK_LEVEL_CITATION and chunk mode is on,
            +             * populate chunk info.
            +             * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult.ChunkInfo chunk_info = 5; + * + */ + public com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation + .SearchResult.ChunkInfo.Builder + getChunkInfoBuilder(int index) { + return internalGetChunkInfoFieldBuilder().getBuilder(index); + } + + /** + * + * + *
            +             * If citation_type is CHUNK_LEVEL_CITATION and chunk mode is on,
            +             * populate chunk info.
            +             * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult.ChunkInfo chunk_info = 5; + * + */ + public com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation + .SearchResult.ChunkInfoOrBuilder + getChunkInfoOrBuilder(int index) { + if (chunkInfoBuilder_ == null) { + return chunkInfo_.get(index); + } else { + return chunkInfoBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
            +             * If citation_type is CHUNK_LEVEL_CITATION and chunk mode is on,
            +             * populate chunk info.
            +             * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult.ChunkInfo chunk_info = 5; + * + */ + public java.util.List< + ? extends + com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation + .SearchResult.ChunkInfoOrBuilder> + getChunkInfoOrBuilderList() { + if (chunkInfoBuilder_ != null) { + return chunkInfoBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(chunkInfo_); + } + } + + /** + * + * + *
            +             * If citation_type is CHUNK_LEVEL_CITATION and chunk mode is on,
            +             * populate chunk info.
            +             * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult.ChunkInfo chunk_info = 5; + * + */ + public com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation + .SearchResult.ChunkInfo.Builder + addChunkInfoBuilder() { + return internalGetChunkInfoFieldBuilder() + .addBuilder( + com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation + .SearchResult.ChunkInfo.getDefaultInstance()); + } + + /** + * + * + *
            +             * If citation_type is CHUNK_LEVEL_CITATION and chunk mode is on,
            +             * populate chunk info.
            +             * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult.ChunkInfo chunk_info = 5; + * + */ + public com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation + .SearchResult.ChunkInfo.Builder + addChunkInfoBuilder(int index) { + return internalGetChunkInfoFieldBuilder() + .addBuilder( + index, + com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation + .SearchResult.ChunkInfo.getDefaultInstance()); + } + + /** + * + * + *
            +             * If citation_type is CHUNK_LEVEL_CITATION and chunk mode is on,
            +             * populate chunk info.
            +             * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult.ChunkInfo chunk_info = 5; + * + */ + public java.util.List< + com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation + .SearchResult.ChunkInfo.Builder> + getChunkInfoBuilderList() { + return internalGetChunkInfoFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation + .SearchResult.ChunkInfo, + com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation + .SearchResult.ChunkInfo.Builder, + com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation + .SearchResult.ChunkInfoOrBuilder> + internalGetChunkInfoFieldBuilder() { + if (chunkInfoBuilder_ == null) { + chunkInfoBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation + .SearchResult.ChunkInfo, + com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation + .SearchResult.ChunkInfo.Builder, + com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation + .SearchResult.ChunkInfoOrBuilder>( + chunkInfo_, + ((bitField0_ & 0x00000010) != 0), + getParentForChildren(), + isClean()); + chunkInfo_ = null; + } + return chunkInfoBuilder_; + } + + private com.google.protobuf.Struct structData_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Struct, + com.google.protobuf.Struct.Builder, + com.google.protobuf.StructOrBuilder> + structDataBuilder_; + + /** + * + * + *
            +             * Data representation.
            +             * The structured JSON data for the document.
            +             * It's populated from the struct data from the Document, or the
            +             * Chunk in search result.
            +             * 
            + * + * .google.protobuf.Struct struct_data = 6; + * + * @return Whether the structData field is set. + */ + public boolean hasStructData() { + return ((bitField0_ & 0x00000020) != 0); + } + + /** + * + * + *
            +             * Data representation.
            +             * The structured JSON data for the document.
            +             * It's populated from the struct data from the Document, or the
            +             * Chunk in search result.
            +             * 
            + * + * .google.protobuf.Struct struct_data = 6; + * + * @return The structData. + */ + public com.google.protobuf.Struct getStructData() { + if (structDataBuilder_ == null) { + return structData_ == null + ? com.google.protobuf.Struct.getDefaultInstance() + : structData_; + } else { + return structDataBuilder_.getMessage(); + } + } + + /** + * + * + *
            +             * Data representation.
            +             * The structured JSON data for the document.
            +             * It's populated from the struct data from the Document, or the
            +             * Chunk in search result.
            +             * 
            + * + * .google.protobuf.Struct struct_data = 6; + */ + public Builder setStructData(com.google.protobuf.Struct value) { + if (structDataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + structData_ = value; + } else { + structDataBuilder_.setMessage(value); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
            +             * Data representation.
            +             * The structured JSON data for the document.
            +             * It's populated from the struct data from the Document, or the
            +             * Chunk in search result.
            +             * 
            + * + * .google.protobuf.Struct struct_data = 6; + */ + public Builder setStructData(com.google.protobuf.Struct.Builder builderForValue) { + if (structDataBuilder_ == null) { + structData_ = builderForValue.build(); + } else { + structDataBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
            +             * Data representation.
            +             * The structured JSON data for the document.
            +             * It's populated from the struct data from the Document, or the
            +             * Chunk in search result.
            +             * 
            + * + * .google.protobuf.Struct struct_data = 6; + */ + public Builder mergeStructData(com.google.protobuf.Struct value) { + if (structDataBuilder_ == null) { + if (((bitField0_ & 0x00000020) != 0) + && structData_ != null + && structData_ != com.google.protobuf.Struct.getDefaultInstance()) { + getStructDataBuilder().mergeFrom(value); + } else { + structData_ = value; + } + } else { + structDataBuilder_.mergeFrom(value); + } + if (structData_ != null) { + bitField0_ |= 0x00000020; + onChanged(); + } + return this; + } + + /** + * + * + *
            +             * Data representation.
            +             * The structured JSON data for the document.
            +             * It's populated from the struct data from the Document, or the
            +             * Chunk in search result.
            +             * 
            + * + * .google.protobuf.Struct struct_data = 6; + */ + public Builder clearStructData() { + bitField0_ = (bitField0_ & ~0x00000020); + structData_ = null; + if (structDataBuilder_ != null) { + structDataBuilder_.dispose(); + structDataBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
            +             * Data representation.
            +             * The structured JSON data for the document.
            +             * It's populated from the struct data from the Document, or the
            +             * Chunk in search result.
            +             * 
            + * + * .google.protobuf.Struct struct_data = 6; + */ + public com.google.protobuf.Struct.Builder getStructDataBuilder() { + bitField0_ |= 0x00000020; + onChanged(); + return internalGetStructDataFieldBuilder().getBuilder(); + } + + /** + * + * + *
            +             * Data representation.
            +             * The structured JSON data for the document.
            +             * It's populated from the struct data from the Document, or the
            +             * Chunk in search result.
            +             * 
            + * + * .google.protobuf.Struct struct_data = 6; + */ + public com.google.protobuf.StructOrBuilder getStructDataOrBuilder() { + if (structDataBuilder_ != null) { + return structDataBuilder_.getMessageOrBuilder(); + } else { + return structData_ == null + ? com.google.protobuf.Struct.getDefaultInstance() + : structData_; + } + } + + /** + * + * + *
            +             * Data representation.
            +             * The structured JSON data for the document.
            +             * It's populated from the struct data from the Document, or the
            +             * Chunk in search result.
            +             * 
            + * + * .google.protobuf.Struct struct_data = 6; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Struct, + com.google.protobuf.Struct.Builder, + com.google.protobuf.StructOrBuilder> + internalGetStructDataFieldBuilder() { + if (structDataBuilder_ == null) { + structDataBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Struct, + com.google.protobuf.Struct.Builder, + com.google.protobuf.StructOrBuilder>( + getStructData(), getParentForChildren(), isClean()); + structData_ = null; + } + return structDataBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult) + private static final com.google.cloud.discoveryengine.v1beta.Answer.Step.Action + .Observation.SearchResult + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation + .SearchResult(); + } + + public static com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation + .SearchResult + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SearchResult parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int SEARCH_RESULTS_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private java.util.List< + com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult> + searchResults_; + + /** + * + * + *
            +         * Search results observed by the search action, it can be snippets info
            +         * or chunk info, depending on the citation type set by the user.
            +         * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult search_results = 2; + * + */ + @java.lang.Override + public java.util.List< + com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult> + getSearchResultsList() { + return searchResults_; + } + + /** + * + * + *
            +         * Search results observed by the search action, it can be snippets info
            +         * or chunk info, depending on the citation type set by the user.
            +         * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult search_results = 2; + * + */ + @java.lang.Override + public java.util.List< + ? extends + com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation + .SearchResultOrBuilder> + getSearchResultsOrBuilderList() { + return searchResults_; + } + + /** + * + * + *
            +         * Search results observed by the search action, it can be snippets info
            +         * or chunk info, depending on the citation type set by the user.
            +         * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult search_results = 2; + * + */ + @java.lang.Override + public int getSearchResultsCount() { + return searchResults_.size(); + } + + /** + * + * + *
            +         * Search results observed by the search action, it can be snippets info
            +         * or chunk info, depending on the citation type set by the user.
            +         * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult search_results = 2; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult + getSearchResults(int index) { + return searchResults_.get(index); + } + + /** + * + * + *
            +         * Search results observed by the search action, it can be snippets info
            +         * or chunk info, depending on the citation type set by the user.
            +         * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult search_results = 2; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation + .SearchResultOrBuilder + getSearchResultsOrBuilder(int index) { + return searchResults_.get(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 { + for (int i = 0; i < searchResults_.size(); i++) { + output.writeMessage(2, searchResults_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < searchResults_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(2, searchResults_.get(i)); + } + 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.discoveryengine.v1beta.Answer.Step.Action.Observation)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation other = + (com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation) obj; + + if (!getSearchResultsList().equals(other.getSearchResultsList())) 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 (getSearchResultsCount() > 0) { + hash = (37 * hash) + SEARCH_RESULTS_FIELD_NUMBER; + hash = (53 * hash) + getSearchResultsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation + 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.discoveryengine.v1beta.Answer.Step.Action.Observation + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation + 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.discoveryengine.v1beta.Answer.Step.Action.Observation + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation + 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.discoveryengine.v1beta.Answer.Step.Action.Observation + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation + 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.discoveryengine.v1beta.Answer.Step.Action.Observation + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation + 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.discoveryengine.v1beta.Answer.Step.Action.Observation 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; + } + + /** + * + * + *
            +         * Observation.
            +         * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation) + com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.ObservationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.AnswerProto + .internal_static_google_cloud_discoveryengine_v1beta_Answer_Step_Action_Observation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.AnswerProto + .internal_static_google_cloud_discoveryengine_v1beta_Answer_Step_Action_Observation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.class, + com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.Builder + .class); + } + + // Construct using + // com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (searchResultsBuilder_ == null) { + searchResults_ = java.util.Collections.emptyList(); + } else { + searchResults_ = null; + searchResultsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1beta.AnswerProto + .internal_static_google_cloud_discoveryengine_v1beta_Answer_Step_Action_Observation_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation build() { + com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation + buildPartial() { + com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation result = + new com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation result) { + if (searchResultsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + searchResults_ = java.util.Collections.unmodifiableList(searchResults_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.searchResults_ = searchResults_; + } else { + result.searchResults_ = searchResultsBuilder_.build(); + } + } + + private void buildPartial0( + com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation result) { + int from_bitField0_ = bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation) { + return mergeFrom( + (com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation other) { + if (other + == com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation + .getDefaultInstance()) return this; + if (searchResultsBuilder_ == null) { + if (!other.searchResults_.isEmpty()) { + if (searchResults_.isEmpty()) { + searchResults_ = other.searchResults_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureSearchResultsIsMutable(); + searchResults_.addAll(other.searchResults_); + } + onChanged(); + } + } else { + if (!other.searchResults_.isEmpty()) { + if (searchResultsBuilder_.isEmpty()) { + searchResultsBuilder_.dispose(); + searchResultsBuilder_ = null; + searchResults_ = other.searchResults_; + bitField0_ = (bitField0_ & ~0x00000001); + searchResultsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetSearchResultsFieldBuilder() + : null; + } else { + searchResultsBuilder_.addAllMessages(other.searchResults_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 18: + { + com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation + .SearchResult + m = + input.readMessage( + com.google.cloud.discoveryengine.v1beta.Answer.Step.Action + .Observation.SearchResult.parser(), + extensionRegistry); + if (searchResultsBuilder_ == null) { + ensureSearchResultsIsMutable(); + searchResults_.add(m); + } else { + searchResultsBuilder_.addMessage(m); + } + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List< + com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation + .SearchResult> + searchResults_ = java.util.Collections.emptyList(); + + private void ensureSearchResultsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + searchResults_ = + new java.util.ArrayList< + com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation + .SearchResult>(searchResults_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation + .SearchResult, + com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation + .SearchResult.Builder, + com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation + .SearchResultOrBuilder> + searchResultsBuilder_; + + /** + * + * + *
            +           * Search results observed by the search action, it can be snippets info
            +           * or chunk info, depending on the citation type set by the user.
            +           * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult search_results = 2; + * + */ + public java.util.List< + com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation + .SearchResult> + getSearchResultsList() { + if (searchResultsBuilder_ == null) { + return java.util.Collections.unmodifiableList(searchResults_); + } else { + return searchResultsBuilder_.getMessageList(); + } + } + + /** + * + * + *
            +           * Search results observed by the search action, it can be snippets info
            +           * or chunk info, depending on the citation type set by the user.
            +           * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult search_results = 2; + * + */ + public int getSearchResultsCount() { + if (searchResultsBuilder_ == null) { + return searchResults_.size(); + } else { + return searchResultsBuilder_.getCount(); + } + } + + /** + * + * + *
            +           * Search results observed by the search action, it can be snippets info
            +           * or chunk info, depending on the citation type set by the user.
            +           * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult search_results = 2; + * + */ + public com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult + getSearchResults(int index) { + if (searchResultsBuilder_ == null) { + return searchResults_.get(index); + } else { + return searchResultsBuilder_.getMessage(index); + } + } + + /** + * + * + *
            +           * Search results observed by the search action, it can be snippets info
            +           * or chunk info, depending on the citation type set by the user.
            +           * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult search_results = 2; + * + */ + public Builder setSearchResults( + int index, + com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult + value) { + if (searchResultsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSearchResultsIsMutable(); + searchResults_.set(index, value); + onChanged(); + } else { + searchResultsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
            +           * Search results observed by the search action, it can be snippets info
            +           * or chunk info, depending on the citation type set by the user.
            +           * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult search_results = 2; + * + */ + public Builder setSearchResults( + int index, + com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult + .Builder + builderForValue) { + if (searchResultsBuilder_ == null) { + ensureSearchResultsIsMutable(); + searchResults_.set(index, builderForValue.build()); + onChanged(); + } else { + searchResultsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
            +           * Search results observed by the search action, it can be snippets info
            +           * or chunk info, depending on the citation type set by the user.
            +           * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult search_results = 2; + * + */ + public Builder addSearchResults( + com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult + value) { + if (searchResultsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSearchResultsIsMutable(); + searchResults_.add(value); + onChanged(); + } else { + searchResultsBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
            +           * Search results observed by the search action, it can be snippets info
            +           * or chunk info, depending on the citation type set by the user.
            +           * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult search_results = 2; + * + */ + public Builder addSearchResults( + int index, + com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult + value) { + if (searchResultsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSearchResultsIsMutable(); + searchResults_.add(index, value); + onChanged(); + } else { + searchResultsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
            +           * Search results observed by the search action, it can be snippets info
            +           * or chunk info, depending on the citation type set by the user.
            +           * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult search_results = 2; + * + */ + public Builder addSearchResults( + com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult + .Builder + builderForValue) { + if (searchResultsBuilder_ == null) { + ensureSearchResultsIsMutable(); + searchResults_.add(builderForValue.build()); + onChanged(); + } else { + searchResultsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
            +           * Search results observed by the search action, it can be snippets info
            +           * or chunk info, depending on the citation type set by the user.
            +           * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult search_results = 2; + * + */ + public Builder addSearchResults( + int index, + com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult + .Builder + builderForValue) { + if (searchResultsBuilder_ == null) { + ensureSearchResultsIsMutable(); + searchResults_.add(index, builderForValue.build()); + onChanged(); + } else { + searchResultsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
            +           * Search results observed by the search action, it can be snippets info
            +           * or chunk info, depending on the citation type set by the user.
            +           * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult search_results = 2; + * + */ + public Builder addAllSearchResults( + java.lang.Iterable< + ? extends + com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation + .SearchResult> + values) { + if (searchResultsBuilder_ == null) { + ensureSearchResultsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, searchResults_); + onChanged(); + } else { + searchResultsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
            +           * Search results observed by the search action, it can be snippets info
            +           * or chunk info, depending on the citation type set by the user.
            +           * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult search_results = 2; + * + */ + public Builder clearSearchResults() { + if (searchResultsBuilder_ == null) { + searchResults_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + searchResultsBuilder_.clear(); + } + return this; + } + + /** + * + * + *
            +           * Search results observed by the search action, it can be snippets info
            +           * or chunk info, depending on the citation type set by the user.
            +           * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult search_results = 2; + * + */ + public Builder removeSearchResults(int index) { + if (searchResultsBuilder_ == null) { + ensureSearchResultsIsMutable(); + searchResults_.remove(index); + onChanged(); + } else { + searchResultsBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
            +           * Search results observed by the search action, it can be snippets info
            +           * or chunk info, depending on the citation type set by the user.
            +           * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult search_results = 2; + * + */ + public com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult + .Builder + getSearchResultsBuilder(int index) { + return internalGetSearchResultsFieldBuilder().getBuilder(index); + } + + /** + * + * + *
            +           * Search results observed by the search action, it can be snippets info
            +           * or chunk info, depending on the citation type set by the user.
            +           * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult search_results = 2; + * + */ + public com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation + .SearchResultOrBuilder + getSearchResultsOrBuilder(int index) { + if (searchResultsBuilder_ == null) { + return searchResults_.get(index); + } else { + return searchResultsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
            +           * Search results observed by the search action, it can be snippets info
            +           * or chunk info, depending on the citation type set by the user.
            +           * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult search_results = 2; + * + */ + public java.util.List< + ? extends + com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation + .SearchResultOrBuilder> + getSearchResultsOrBuilderList() { + if (searchResultsBuilder_ != null) { + return searchResultsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(searchResults_); + } + } + + /** + * + * + *
            +           * Search results observed by the search action, it can be snippets info
            +           * or chunk info, depending on the citation type set by the user.
            +           * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult search_results = 2; + * + */ + public com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult + .Builder + addSearchResultsBuilder() { + return internalGetSearchResultsFieldBuilder() + .addBuilder( + com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation + .SearchResult.getDefaultInstance()); + } + + /** + * + * + *
            +           * Search results observed by the search action, it can be snippets info
            +           * or chunk info, depending on the citation type set by the user.
            +           * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult search_results = 2; + * + */ + public com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult + .Builder + addSearchResultsBuilder(int index) { + return internalGetSearchResultsFieldBuilder() + .addBuilder( + index, + com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation + .SearchResult.getDefaultInstance()); + } + + /** + * + * + *
            +           * Search results observed by the search action, it can be snippets info
            +           * or chunk info, depending on the citation type set by the user.
            +           * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult search_results = 2; + * + */ + public java.util.List< + com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation + .SearchResult.Builder> + getSearchResultsBuilderList() { + return internalGetSearchResultsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation + .SearchResult, + com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation + .SearchResult.Builder, + com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation + .SearchResultOrBuilder> + internalGetSearchResultsFieldBuilder() { + if (searchResultsBuilder_ == null) { + searchResultsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation + .SearchResult, + com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation + .SearchResult.Builder, + com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation + .SearchResultOrBuilder>( + searchResults_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + searchResults_ = null; + } + return searchResultsBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation) + private static final com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation(); + } + + public static com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Observation parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int bitField0_; + private int actionCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object action_; + + public enum ActionCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + SEARCH_ACTION(2), + ACTION_NOT_SET(0); + private final int value; + + private ActionCase(int value) { + this.value = value; + } + + /** + * @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 ActionCase valueOf(int value) { + return forNumber(value); + } + + public static ActionCase forNumber(int value) { + switch (value) { + case 2: + return SEARCH_ACTION; + case 0: + return ACTION_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public ActionCase getActionCase() { + return ActionCase.forNumber(actionCase_); + } + + public static final int SEARCH_ACTION_FIELD_NUMBER = 2; + + /** + * + * + *
            +       * Search action.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Answer.Step.Action.SearchAction search_action = 2; + * + * + * @return Whether the searchAction field is set. + */ + @java.lang.Override + public boolean hasSearchAction() { + return actionCase_ == 2; + } + + /** + * + * + *
            +       * Search action.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Answer.Step.Action.SearchAction search_action = 2; + * + * + * @return The searchAction. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.SearchAction + getSearchAction() { + if (actionCase_ == 2) { + return (com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.SearchAction) action_; + } + return com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.SearchAction + .getDefaultInstance(); + } + + /** + * + * + *
            +       * Search action.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Answer.Step.Action.SearchAction search_action = 2; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.SearchActionOrBuilder + getSearchActionOrBuilder() { + if (actionCase_ == 2) { + return (com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.SearchAction) action_; + } + return com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.SearchAction + .getDefaultInstance(); + } + + public static final int OBSERVATION_FIELD_NUMBER = 3; + private com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation observation_; + + /** + * + * + *
            +       * Observation.
            +       * 
            + * + * .google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation observation = 3; + * + * + * @return Whether the observation field is set. + */ + @java.lang.Override + public boolean hasObservation() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
            +       * Observation.
            +       * 
            + * + * .google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation observation = 3; + * + * + * @return The observation. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation + getObservation() { + return observation_ == null + ? com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation + .getDefaultInstance() + : observation_; + } + + /** + * + * + *
            +       * Observation.
            +       * 
            + * + * .google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation observation = 3; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.ObservationOrBuilder + getObservationOrBuilder() { + return observation_ == null + ? com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation + .getDefaultInstance() + : observation_; + } + + 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 (actionCase_ == 2) { + output.writeMessage( + 2, (com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.SearchAction) action_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(3, getObservation()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (actionCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, + (com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.SearchAction) + action_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getObservation()); + } + 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.discoveryengine.v1beta.Answer.Step.Action)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1beta.Answer.Step.Action other = + (com.google.cloud.discoveryengine.v1beta.Answer.Step.Action) obj; + + if (hasObservation() != other.hasObservation()) return false; + if (hasObservation()) { + if (!getObservation().equals(other.getObservation())) return false; + } + if (!getActionCase().equals(other.getActionCase())) return false; + switch (actionCase_) { + case 2: + if (!getSearchAction().equals(other.getSearchAction())) return false; + break; + case 0: + default: + } + 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 (hasObservation()) { + hash = (37 * hash) + OBSERVATION_FIELD_NUMBER; + hash = (53 * hash) + getObservation().hashCode(); + } + switch (actionCase_) { + case 2: + hash = (37 * hash) + SEARCH_ACTION_FIELD_NUMBER; + hash = (53 * hash) + getSearchAction().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1beta.Answer.Step.Action parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.Answer.Step.Action 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.discoveryengine.v1beta.Answer.Step.Action parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.Answer.Step.Action 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.discoveryengine.v1beta.Answer.Step.Action parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.Answer.Step.Action parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1beta.Answer.Step.Action parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.Answer.Step.Action 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.discoveryengine.v1beta.Answer.Step.Action parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.Answer.Step.Action 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.discoveryengine.v1beta.Answer.Step.Action parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.Answer.Step.Action 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.discoveryengine.v1beta.Answer.Step.Action 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; + } + + /** + * + * + *
            +       * Action.
            +       * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.Answer.Step.Action} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.Answer.Step.Action) + com.google.cloud.discoveryengine.v1beta.Answer.Step.ActionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.AnswerProto + .internal_static_google_cloud_discoveryengine_v1beta_Answer_Step_Action_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.AnswerProto + .internal_static_google_cloud_discoveryengine_v1beta_Answer_Step_Action_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.class, + com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Builder.class); + } + + // Construct using com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetObservationFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (searchActionBuilder_ != null) { + searchActionBuilder_.clear(); + } + observation_ = null; + if (observationBuilder_ != null) { + observationBuilder_.dispose(); + observationBuilder_ = null; + } + actionCase_ = 0; + action_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1beta.AnswerProto + .internal_static_google_cloud_discoveryengine_v1beta_Answer_Step_Action_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Answer.Step.Action + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Answer.Step.Action build() { + com.google.cloud.discoveryengine.v1beta.Answer.Step.Action result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Answer.Step.Action buildPartial() { + com.google.cloud.discoveryengine.v1beta.Answer.Step.Action result = + new com.google.cloud.discoveryengine.v1beta.Answer.Step.Action(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.discoveryengine.v1beta.Answer.Step.Action result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.observation_ = + observationBuilder_ == null ? observation_ : observationBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + private void buildPartialOneofs( + com.google.cloud.discoveryengine.v1beta.Answer.Step.Action result) { + result.actionCase_ = actionCase_; + result.action_ = this.action_; + if (actionCase_ == 2 && searchActionBuilder_ != null) { + result.action_ = searchActionBuilder_.build(); + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.discoveryengine.v1beta.Answer.Step.Action) { + return mergeFrom((com.google.cloud.discoveryengine.v1beta.Answer.Step.Action) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.discoveryengine.v1beta.Answer.Step.Action other) { + if (other + == com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.getDefaultInstance()) + return this; + if (other.hasObservation()) { + mergeObservation(other.getObservation()); + } + switch (other.getActionCase()) { + case SEARCH_ACTION: + { + mergeSearchAction(other.getSearchAction()); + break; + } + case ACTION_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 18: + { + input.readMessage( + internalGetSearchActionFieldBuilder().getBuilder(), extensionRegistry); + actionCase_ = 2; + break; + } // case 18 + case 26: + { + input.readMessage( + internalGetObservationFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int actionCase_ = 0; + private java.lang.Object action_; + + public ActionCase getActionCase() { + return ActionCase.forNumber(actionCase_); + } + + public Builder clearAction() { + actionCase_ = 0; + action_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.SearchAction, + com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.SearchAction.Builder, + com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.SearchActionOrBuilder> + searchActionBuilder_; + + /** + * + * + *
            +         * Search action.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Answer.Step.Action.SearchAction search_action = 2; + * + * + * @return Whether the searchAction field is set. + */ + @java.lang.Override + public boolean hasSearchAction() { + return actionCase_ == 2; + } + + /** + * + * + *
            +         * Search action.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Answer.Step.Action.SearchAction search_action = 2; + * + * + * @return The searchAction. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.SearchAction + getSearchAction() { + if (searchActionBuilder_ == null) { + if (actionCase_ == 2) { + return (com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.SearchAction) + action_; + } + return com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.SearchAction + .getDefaultInstance(); + } else { + if (actionCase_ == 2) { + return searchActionBuilder_.getMessage(); + } + return com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.SearchAction + .getDefaultInstance(); + } + } + + /** + * + * + *
            +         * Search action.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Answer.Step.Action.SearchAction search_action = 2; + * + */ + public Builder setSearchAction( + com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.SearchAction value) { + if (searchActionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + action_ = value; + onChanged(); + } else { + searchActionBuilder_.setMessage(value); + } + actionCase_ = 2; + return this; + } + + /** + * + * + *
            +         * Search action.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Answer.Step.Action.SearchAction search_action = 2; + * + */ + public Builder setSearchAction( + com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.SearchAction.Builder + builderForValue) { + if (searchActionBuilder_ == null) { + action_ = builderForValue.build(); + onChanged(); + } else { + searchActionBuilder_.setMessage(builderForValue.build()); + } + actionCase_ = 2; + return this; + } + + /** + * + * + *
            +         * Search action.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Answer.Step.Action.SearchAction search_action = 2; + * + */ + public Builder mergeSearchAction( + com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.SearchAction value) { + if (searchActionBuilder_ == null) { + if (actionCase_ == 2 + && action_ + != com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.SearchAction + .getDefaultInstance()) { + action_ = + com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.SearchAction + .newBuilder( + (com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.SearchAction) + action_) + .mergeFrom(value) + .buildPartial(); + } else { + action_ = value; + } + onChanged(); + } else { + if (actionCase_ == 2) { + searchActionBuilder_.mergeFrom(value); + } else { + searchActionBuilder_.setMessage(value); + } + } + actionCase_ = 2; + return this; + } + + /** + * + * + *
            +         * Search action.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Answer.Step.Action.SearchAction search_action = 2; + * + */ + public Builder clearSearchAction() { + if (searchActionBuilder_ == null) { + if (actionCase_ == 2) { + actionCase_ = 0; + action_ = null; + onChanged(); + } + } else { + if (actionCase_ == 2) { + actionCase_ = 0; + action_ = null; + } + searchActionBuilder_.clear(); + } + return this; + } + + /** + * + * + *
            +         * Search action.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Answer.Step.Action.SearchAction search_action = 2; + * + */ + public com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.SearchAction.Builder + getSearchActionBuilder() { + return internalGetSearchActionFieldBuilder().getBuilder(); + } + + /** + * + * + *
            +         * Search action.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Answer.Step.Action.SearchAction search_action = 2; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.SearchActionOrBuilder + getSearchActionOrBuilder() { + if ((actionCase_ == 2) && (searchActionBuilder_ != null)) { + return searchActionBuilder_.getMessageOrBuilder(); + } else { + if (actionCase_ == 2) { + return (com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.SearchAction) + action_; + } + return com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.SearchAction + .getDefaultInstance(); + } + } + + /** + * + * + *
            +         * Search action.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Answer.Step.Action.SearchAction search_action = 2; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.SearchAction, + com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.SearchAction.Builder, + com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.SearchActionOrBuilder> + internalGetSearchActionFieldBuilder() { + if (searchActionBuilder_ == null) { + if (!(actionCase_ == 2)) { + action_ = + com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.SearchAction + .getDefaultInstance(); + } + searchActionBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.SearchAction, + com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.SearchAction.Builder, + com.google.cloud.discoveryengine.v1beta.Answer.Step.Action + .SearchActionOrBuilder>( + (com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.SearchAction) + action_, + getParentForChildren(), + isClean()); + action_ = null; + } + actionCase_ = 2; + onChanged(); + return searchActionBuilder_; + } + + private com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation observation_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation, + com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.Builder, + com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.ObservationOrBuilder> + observationBuilder_; + + /** + * + * + *
            +         * Observation.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation observation = 3; + * + * + * @return Whether the observation field is set. + */ + public boolean hasObservation() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
            +         * Observation.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation observation = 3; + * + * + * @return The observation. + */ + public com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation + getObservation() { + if (observationBuilder_ == null) { + return observation_ == null + ? com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation + .getDefaultInstance() + : observation_; + } else { + return observationBuilder_.getMessage(); + } + } + + /** + * + * + *
            +         * Observation.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation observation = 3; + * + */ + public Builder setObservation( + com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation value) { + if (observationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + observation_ = value; + } else { + observationBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
            +         * Observation.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation observation = 3; + * + */ + public Builder setObservation( + com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.Builder + builderForValue) { + if (observationBuilder_ == null) { + observation_ = builderForValue.build(); + } else { + observationBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
            +         * Observation.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation observation = 3; + * + */ + public Builder mergeObservation( + com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation value) { + if (observationBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && observation_ != null + && observation_ + != com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation + .getDefaultInstance()) { + getObservationBuilder().mergeFrom(value); + } else { + observation_ = value; + } + } else { + observationBuilder_.mergeFrom(value); + } + if (observation_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** + * + * + *
            +         * Observation.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation observation = 3; + * + */ + public Builder clearObservation() { + bitField0_ = (bitField0_ & ~0x00000002); + observation_ = null; + if (observationBuilder_ != null) { + observationBuilder_.dispose(); + observationBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
            +         * Observation.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation observation = 3; + * + */ + public com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.Builder + getObservationBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return internalGetObservationFieldBuilder().getBuilder(); + } + + /** + * + * + *
            +         * Observation.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation observation = 3; + * + */ + public com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.ObservationOrBuilder + getObservationOrBuilder() { + if (observationBuilder_ != null) { + return observationBuilder_.getMessageOrBuilder(); + } else { + return observation_ == null + ? com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation + .getDefaultInstance() + : observation_; + } + } + + /** + * + * + *
            +         * Observation.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation observation = 3; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation, + com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.Builder, + com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.ObservationOrBuilder> + internalGetObservationFieldBuilder() { + if (observationBuilder_ == null) { + observationBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation, + com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.Builder, + com.google.cloud.discoveryengine.v1beta.Answer.Step.Action + .ObservationOrBuilder>(getObservation(), getParentForChildren(), isClean()); + observation_ = null; + } + return observationBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.Answer.Step.Action) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.Answer.Step.Action) + private static final com.google.cloud.discoveryengine.v1beta.Answer.Step.Action + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.discoveryengine.v1beta.Answer.Step.Action(); + } + + public static com.google.cloud.discoveryengine.v1beta.Answer.Step.Action + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Action parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Answer.Step.Action + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int STATE_FIELD_NUMBER = 1; + private int state_ = 0; + + /** + * + * + *
            +     * The state of the step.
            +     * 
            + * + * .google.cloud.discoveryengine.v1beta.Answer.Step.State state = 1; + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + + /** + * + * + *
            +     * The state of the step.
            +     * 
            + * + * .google.cloud.discoveryengine.v1beta.Answer.Step.State state = 1; + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Answer.Step.State getState() { + com.google.cloud.discoveryengine.v1beta.Answer.Step.State result = + com.google.cloud.discoveryengine.v1beta.Answer.Step.State.forNumber(state_); + return result == null + ? com.google.cloud.discoveryengine.v1beta.Answer.Step.State.UNRECOGNIZED + : result; + } + + public static final int DESCRIPTION_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object description_ = ""; + + /** + * + * + *
            +     * The description of the step.
            +     * 
            + * + * string description = 2; + * + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + java.lang.Object ref = description_; + 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(); + description_ = s; + return s; + } + } + + /** + * + * + *
            +     * The description of the step.
            +     * 
            + * + * string description = 2; + * + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int THOUGHT_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object thought_ = ""; + + /** + * + * + *
            +     * The thought of the step.
            +     * 
            + * + * string thought = 3; + * + * @return The thought. + */ + @java.lang.Override + public java.lang.String getThought() { + java.lang.Object ref = thought_; + 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(); + thought_ = s; + return s; + } + } + + /** + * + * + *
            +     * The thought of the step.
            +     * 
            + * + * string thought = 3; + * + * @return The bytes for thought. + */ + @java.lang.Override + public com.google.protobuf.ByteString getThoughtBytes() { + java.lang.Object ref = thought_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + thought_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ACTIONS_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private java.util.List actions_; + + /** + * + * + *
            +     * Actions.
            +     * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action actions = 4; + */ + @java.lang.Override + public java.util.List + getActionsList() { + return actions_; + } + + /** + * + * + *
            +     * Actions.
            +     * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action actions = 4; + */ + @java.lang.Override + public java.util.List< + ? extends com.google.cloud.discoveryengine.v1beta.Answer.Step.ActionOrBuilder> + getActionsOrBuilderList() { + return actions_; + } + + /** + * + * + *
            +     * Actions.
            +     * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action actions = 4; + */ + @java.lang.Override + public int getActionsCount() { + return actions_.size(); + } + + /** + * + * + *
            +     * Actions.
            +     * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action actions = 4; + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Answer.Step.Action getActions(int index) { + return actions_.get(index); + } + + /** + * + * + *
            +     * Actions.
            +     * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action actions = 4; + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Answer.Step.ActionOrBuilder getActionsOrBuilder( + int index) { + return actions_.get(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 (state_ + != com.google.cloud.discoveryengine.v1beta.Answer.Step.State.STATE_UNSPECIFIED + .getNumber()) { + output.writeEnum(1, state_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(description_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, description_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(thought_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, thought_); + } + for (int i = 0; i < actions_.size(); i++) { + output.writeMessage(4, actions_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (state_ + != com.google.cloud.discoveryengine.v1beta.Answer.Step.State.STATE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, state_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(description_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, description_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(thought_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, thought_); + } + for (int i = 0; i < actions_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, actions_.get(i)); + } + 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.discoveryengine.v1beta.Answer.Step)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1beta.Answer.Step other = + (com.google.cloud.discoveryengine.v1beta.Answer.Step) obj; + + if (state_ != other.state_) return false; + if (!getDescription().equals(other.getDescription())) return false; + if (!getThought().equals(other.getThought())) return false; + if (!getActionsList().equals(other.getActionsList())) 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) + STATE_FIELD_NUMBER; + hash = (53 * hash) + state_; + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + hash = (37 * hash) + THOUGHT_FIELD_NUMBER; + hash = (53 * hash) + getThought().hashCode(); + if (getActionsCount() > 0) { + hash = (37 * hash) + ACTIONS_FIELD_NUMBER; + hash = (53 * hash) + getActionsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1beta.Answer.Step parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.Answer.Step 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.discoveryengine.v1beta.Answer.Step parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.Answer.Step 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.discoveryengine.v1beta.Answer.Step parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.Answer.Step parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1beta.Answer.Step parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.Answer.Step 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.discoveryengine.v1beta.Answer.Step parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.Answer.Step 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.discoveryengine.v1beta.Answer.Step parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.Answer.Step 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.discoveryengine.v1beta.Answer.Step 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; + } + + /** + * + * + *
            +     * Step information.
            +     * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.Answer.Step} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.Answer.Step) + com.google.cloud.discoveryengine.v1beta.Answer.StepOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.AnswerProto + .internal_static_google_cloud_discoveryengine_v1beta_Answer_Step_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.AnswerProto + .internal_static_google_cloud_discoveryengine_v1beta_Answer_Step_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.Answer.Step.class, + com.google.cloud.discoveryengine.v1beta.Answer.Step.Builder.class); + } + + // Construct using com.google.cloud.discoveryengine.v1beta.Answer.Step.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + state_ = 0; + description_ = ""; + thought_ = ""; + if (actionsBuilder_ == null) { + actions_ = java.util.Collections.emptyList(); + } else { + actions_ = null; + actionsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000008); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1beta.AnswerProto + .internal_static_google_cloud_discoveryengine_v1beta_Answer_Step_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Answer.Step getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1beta.Answer.Step.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Answer.Step build() { + com.google.cloud.discoveryengine.v1beta.Answer.Step result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Answer.Step buildPartial() { + com.google.cloud.discoveryengine.v1beta.Answer.Step result = + new com.google.cloud.discoveryengine.v1beta.Answer.Step(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.discoveryengine.v1beta.Answer.Step result) { + if (actionsBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0)) { + actions_ = java.util.Collections.unmodifiableList(actions_); + bitField0_ = (bitField0_ & ~0x00000008); + } + result.actions_ = actions_; + } else { + result.actions_ = actionsBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.discoveryengine.v1beta.Answer.Step result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.state_ = state_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.description_ = description_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.thought_ = thought_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.discoveryengine.v1beta.Answer.Step) { + return mergeFrom((com.google.cloud.discoveryengine.v1beta.Answer.Step) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.discoveryengine.v1beta.Answer.Step other) { + if (other == com.google.cloud.discoveryengine.v1beta.Answer.Step.getDefaultInstance()) + return this; + if (other.state_ != 0) { + setStateValue(other.getStateValue()); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getThought().isEmpty()) { + thought_ = other.thought_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (actionsBuilder_ == null) { + if (!other.actions_.isEmpty()) { + if (actions_.isEmpty()) { + actions_ = other.actions_; + bitField0_ = (bitField0_ & ~0x00000008); + } else { + ensureActionsIsMutable(); + actions_.addAll(other.actions_); + } + onChanged(); + } + } else { + if (!other.actions_.isEmpty()) { + if (actionsBuilder_.isEmpty()) { + actionsBuilder_.dispose(); + actionsBuilder_ = null; + actions_ = other.actions_; + bitField0_ = (bitField0_ & ~0x00000008); + actionsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetActionsFieldBuilder() + : null; + } else { + actionsBuilder_.addAllMessages(other.actions_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + state_ = input.readEnum(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 18: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + thought_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + com.google.cloud.discoveryengine.v1beta.Answer.Step.Action m = + input.readMessage( + com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.parser(), + extensionRegistry); + if (actionsBuilder_ == null) { + ensureActionsIsMutable(); + actions_.add(m); + } else { + actionsBuilder_.addMessage(m); + } + break; + } // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private int state_ = 0; + + /** + * + * + *
            +       * The state of the step.
            +       * 
            + * + * .google.cloud.discoveryengine.v1beta.Answer.Step.State state = 1; + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + + /** + * + * + *
            +       * The state of the step.
            +       * 
            + * + * .google.cloud.discoveryengine.v1beta.Answer.Step.State state = 1; + * + * @param value The enum numeric value on the wire for state to set. + * @return This builder for chaining. + */ + public Builder setStateValue(int value) { + state_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
            +       * The state of the step.
            +       * 
            + * + * .google.cloud.discoveryengine.v1beta.Answer.Step.State state = 1; + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Answer.Step.State getState() { + com.google.cloud.discoveryengine.v1beta.Answer.Step.State result = + com.google.cloud.discoveryengine.v1beta.Answer.Step.State.forNumber(state_); + return result == null + ? com.google.cloud.discoveryengine.v1beta.Answer.Step.State.UNRECOGNIZED + : result; + } + + /** + * + * + *
            +       * The state of the step.
            +       * 
            + * + * .google.cloud.discoveryengine.v1beta.Answer.Step.State state = 1; + * + * @param value The state to set. + * @return This builder for chaining. + */ + public Builder setState(com.google.cloud.discoveryengine.v1beta.Answer.Step.State value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + state_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
            +       * The state of the step.
            +       * 
            + * + * .google.cloud.discoveryengine.v1beta.Answer.Step.State state = 1; + * + * @return This builder for chaining. + */ + public Builder clearState() { + bitField0_ = (bitField0_ & ~0x00000001); + state_ = 0; + onChanged(); + return this; + } + + private java.lang.Object description_ = ""; + + /** + * + * + *
            +       * The description of the step.
            +       * 
            + * + * string description = 2; + * + * @return The description. + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
            +       * The description of the step.
            +       * 
            + * + * string description = 2; + * + * @return The bytes for description. + */ + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
            +       * The description of the step.
            +       * 
            + * + * string description = 2; + * + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + description_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
            +       * The description of the step.
            +       * 
            + * + * string description = 2; + * + * @return This builder for chaining. + */ + public Builder clearDescription() { + description_ = getDefaultInstance().getDescription(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
            +       * The description of the step.
            +       * 
            + * + * string description = 2; + * + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + description_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object thought_ = ""; + + /** + * + * + *
            +       * The thought of the step.
            +       * 
            + * + * string thought = 3; + * + * @return The thought. + */ + public java.lang.String getThought() { + java.lang.Object ref = thought_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + thought_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
            +       * The thought of the step.
            +       * 
            + * + * string thought = 3; + * + * @return The bytes for thought. + */ + public com.google.protobuf.ByteString getThoughtBytes() { + java.lang.Object ref = thought_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + thought_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
            +       * The thought of the step.
            +       * 
            + * + * string thought = 3; + * + * @param value The thought to set. + * @return This builder for chaining. + */ + public Builder setThought(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + thought_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
            +       * The thought of the step.
            +       * 
            + * + * string thought = 3; + * + * @return This builder for chaining. + */ + public Builder clearThought() { + thought_ = getDefaultInstance().getThought(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
            +       * The thought of the step.
            +       * 
            + * + * string thought = 3; + * + * @param value The bytes for thought to set. + * @return This builder for chaining. + */ + public Builder setThoughtBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + thought_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.util.List actions_ = + java.util.Collections.emptyList(); + + private void ensureActionsIsMutable() { + if (!((bitField0_ & 0x00000008) != 0)) { + actions_ = + new java.util.ArrayList( + actions_); + bitField0_ |= 0x00000008; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.discoveryengine.v1beta.Answer.Step.Action, + com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Builder, + com.google.cloud.discoveryengine.v1beta.Answer.Step.ActionOrBuilder> + actionsBuilder_; + + /** + * + * + *
            +       * Actions.
            +       * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action actions = 4; + */ + public java.util.List + getActionsList() { + if (actionsBuilder_ == null) { + return java.util.Collections.unmodifiableList(actions_); + } else { + return actionsBuilder_.getMessageList(); + } + } + + /** + * + * + *
            +       * Actions.
            +       * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action actions = 4; + */ + public int getActionsCount() { + if (actionsBuilder_ == null) { + return actions_.size(); + } else { + return actionsBuilder_.getCount(); + } + } + + /** + * + * + *
            +       * Actions.
            +       * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action actions = 4; + */ + public com.google.cloud.discoveryengine.v1beta.Answer.Step.Action getActions(int index) { + if (actionsBuilder_ == null) { + return actions_.get(index); + } else { + return actionsBuilder_.getMessage(index); + } + } + + /** + * + * + *
            +       * Actions.
            +       * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action actions = 4; + */ + public Builder setActions( + int index, com.google.cloud.discoveryengine.v1beta.Answer.Step.Action value) { + if (actionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureActionsIsMutable(); + actions_.set(index, value); + onChanged(); + } else { + actionsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
            +       * Actions.
            +       * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action actions = 4; + */ + public Builder setActions( + int index, + com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Builder builderForValue) { + if (actionsBuilder_ == null) { + ensureActionsIsMutable(); + actions_.set(index, builderForValue.build()); + onChanged(); + } else { + actionsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
            +       * Actions.
            +       * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action actions = 4; + */ + public Builder addActions(com.google.cloud.discoveryengine.v1beta.Answer.Step.Action value) { + if (actionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureActionsIsMutable(); + actions_.add(value); + onChanged(); + } else { + actionsBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
            +       * Actions.
            +       * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action actions = 4; + */ + public Builder addActions( + int index, com.google.cloud.discoveryengine.v1beta.Answer.Step.Action value) { + if (actionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureActionsIsMutable(); + actions_.add(index, value); + onChanged(); + } else { + actionsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
            +       * Actions.
            +       * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action actions = 4; + */ + public Builder addActions( + com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Builder builderForValue) { + if (actionsBuilder_ == null) { + ensureActionsIsMutable(); + actions_.add(builderForValue.build()); + onChanged(); + } else { + actionsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
            +       * Actions.
            +       * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action actions = 4; + */ + public Builder addActions( + int index, + com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Builder builderForValue) { + if (actionsBuilder_ == null) { + ensureActionsIsMutable(); + actions_.add(index, builderForValue.build()); + onChanged(); + } else { + actionsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
            +       * Actions.
            +       * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action actions = 4; + */ + public Builder addAllActions( + java.lang.Iterable + values) { + if (actionsBuilder_ == null) { + ensureActionsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, actions_); + onChanged(); + } else { + actionsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
            +       * Actions.
            +       * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action actions = 4; + */ + public Builder clearActions() { + if (actionsBuilder_ == null) { + actions_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + } else { + actionsBuilder_.clear(); + } + return this; + } + + /** + * + * + *
            +       * Actions.
            +       * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action actions = 4; + */ + public Builder removeActions(int index) { + if (actionsBuilder_ == null) { + ensureActionsIsMutable(); + actions_.remove(index); + onChanged(); + } else { + actionsBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
            +       * Actions.
            +       * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action actions = 4; + */ + public com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Builder getActionsBuilder( + int index) { + return internalGetActionsFieldBuilder().getBuilder(index); + } + + /** + * + * + *
            +       * Actions.
            +       * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action actions = 4; + */ + public com.google.cloud.discoveryengine.v1beta.Answer.Step.ActionOrBuilder + getActionsOrBuilder(int index) { + if (actionsBuilder_ == null) { + return actions_.get(index); + } else { + return actionsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
            +       * Actions.
            +       * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action actions = 4; + */ + public java.util.List< + ? extends com.google.cloud.discoveryengine.v1beta.Answer.Step.ActionOrBuilder> + getActionsOrBuilderList() { + if (actionsBuilder_ != null) { + return actionsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(actions_); + } + } + + /** + * + * + *
            +       * Actions.
            +       * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action actions = 4; + */ + public com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Builder + addActionsBuilder() { + return internalGetActionsFieldBuilder() + .addBuilder( + com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.getDefaultInstance()); + } + + /** + * + * + *
            +       * Actions.
            +       * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action actions = 4; + */ + public com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Builder addActionsBuilder( + int index) { + return internalGetActionsFieldBuilder() + .addBuilder( + index, + com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.getDefaultInstance()); + } + + /** + * + * + *
            +       * Actions.
            +       * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action actions = 4; + */ + public java.util.List + getActionsBuilderList() { + return internalGetActionsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.discoveryengine.v1beta.Answer.Step.Action, + com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Builder, + com.google.cloud.discoveryengine.v1beta.Answer.Step.ActionOrBuilder> + internalGetActionsFieldBuilder() { + if (actionsBuilder_ == null) { + actionsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.discoveryengine.v1beta.Answer.Step.Action, + com.google.cloud.discoveryengine.v1beta.Answer.Step.Action.Builder, + com.google.cloud.discoveryengine.v1beta.Answer.Step.ActionOrBuilder>( + actions_, ((bitField0_ & 0x00000008) != 0), getParentForChildren(), isClean()); + actions_ = null; + } + return actionsBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.Answer.Step) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.Answer.Step) + private static final com.google.cloud.discoveryengine.v1beta.Answer.Step DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.discoveryengine.v1beta.Answer.Step(); + } + + public static com.google.cloud.discoveryengine.v1beta.Answer.Step getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Step parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Answer.Step getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface QueryUnderstandingInfoOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
            +     * Query classification information.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo.QueryClassificationInfo query_classification_info = 1; + * + */ + java.util.List< + com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo + .QueryClassificationInfo> + getQueryClassificationInfoList(); + + /** + * + * + *
            +     * Query classification information.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo.QueryClassificationInfo query_classification_info = 1; + * + */ + com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo.QueryClassificationInfo + getQueryClassificationInfo(int index); + + /** + * + * + *
            +     * Query classification information.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo.QueryClassificationInfo query_classification_info = 1; + * + */ + int getQueryClassificationInfoCount(); + + /** + * + * + *
            +     * Query classification information.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo.QueryClassificationInfo query_classification_info = 1; + * + */ + java.util.List< + ? extends + com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo + .QueryClassificationInfoOrBuilder> + getQueryClassificationInfoOrBuilderList(); + + /** + * + * + *
            +     * Query classification information.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo.QueryClassificationInfo query_classification_info = 1; + * + */ + com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo + .QueryClassificationInfoOrBuilder + getQueryClassificationInfoOrBuilder(int index); + } + + /** + * + * + *
            +   * Query understanding information.
            +   * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo} + */ + public static final class QueryUnderstandingInfo extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo) + QueryUnderstandingInfoOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "QueryUnderstandingInfo"); + } + + // Use QueryUnderstandingInfo.newBuilder() to construct. + private QueryUnderstandingInfo(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private QueryUnderstandingInfo() { + queryClassificationInfo_ = java.util.Collections.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.AnswerProto + .internal_static_google_cloud_discoveryengine_v1beta_Answer_QueryUnderstandingInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.AnswerProto + .internal_static_google_cloud_discoveryengine_v1beta_Answer_QueryUnderstandingInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo.class, + com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo.Builder.class); + } + + public interface QueryClassificationInfoOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo.QueryClassificationInfo) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
            +       * Query classification type.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo.QueryClassificationInfo.Type type = 1; + * + * + * @return The enum numeric value on the wire for type. + */ + int getTypeValue(); + + /** + * + * + *
            +       * Query classification type.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo.QueryClassificationInfo.Type type = 1; + * + * + * @return The type. + */ + com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo.QueryClassificationInfo + .Type + getType(); + + /** + * + * + *
            +       * Classification output.
            +       * 
            + * + * bool positive = 2; + * + * @return The positive. + */ + boolean getPositive(); + } + + /** + * + * + *
            +     * Query classification information.
            +     * 
            + * + * Protobuf type {@code + * google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo.QueryClassificationInfo} + */ + public static final class QueryClassificationInfo extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo.QueryClassificationInfo) + QueryClassificationInfoOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "QueryClassificationInfo"); + } + + // Use QueryClassificationInfo.newBuilder() to construct. + private QueryClassificationInfo(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private QueryClassificationInfo() { + type_ = 0; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.AnswerProto + .internal_static_google_cloud_discoveryengine_v1beta_Answer_QueryUnderstandingInfo_QueryClassificationInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.AnswerProto + .internal_static_google_cloud_discoveryengine_v1beta_Answer_QueryUnderstandingInfo_QueryClassificationInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo + .QueryClassificationInfo.class, + com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo + .QueryClassificationInfo.Builder.class); + } + + /** + * + * + *
            +       * Query classification types.
            +       * 
            + * + * Protobuf enum {@code + * google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo.QueryClassificationInfo.Type} + */ + public enum Type implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
            +         * Unspecified query classification type.
            +         * 
            + * + * TYPE_UNSPECIFIED = 0; + */ + TYPE_UNSPECIFIED(0), + /** + * + * + *
            +         * Adversarial query classification type.
            +         * 
            + * + * ADVERSARIAL_QUERY = 1; + */ + ADVERSARIAL_QUERY(1), + /** + * + * + *
            +         * Non-answer-seeking query classification type, for chit chat.
            +         * 
            + * + * NON_ANSWER_SEEKING_QUERY = 2; + */ + NON_ANSWER_SEEKING_QUERY(2), + /** + * + * + *
            +         * Jail-breaking query classification type.
            +         * 
            + * + * JAIL_BREAKING_QUERY = 3; + */ + JAIL_BREAKING_QUERY(3), + /** + * + * + *
            +         * Non-answer-seeking query classification type, for no clear intent.
            +         * 
            + * + * NON_ANSWER_SEEKING_QUERY_V2 = 4; + */ + NON_ANSWER_SEEKING_QUERY_V2(4), + /** + * + * + *
            +         * User defined query classification type.
            +         * 
            + * + * USER_DEFINED_CLASSIFICATION_QUERY = 5; + */ + USER_DEFINED_CLASSIFICATION_QUERY(5), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Type"); + } + + /** + * + * + *
            +         * Unspecified query classification type.
            +         * 
            + * + * TYPE_UNSPECIFIED = 0; + */ + public static final int TYPE_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
            +         * Adversarial query classification type.
            +         * 
            + * + * ADVERSARIAL_QUERY = 1; + */ + public static final int ADVERSARIAL_QUERY_VALUE = 1; + + /** + * + * + *
            +         * Non-answer-seeking query classification type, for chit chat.
            +         * 
            + * + * NON_ANSWER_SEEKING_QUERY = 2; + */ + public static final int NON_ANSWER_SEEKING_QUERY_VALUE = 2; + + /** + * + * + *
            +         * Jail-breaking query classification type.
            +         * 
            + * + * JAIL_BREAKING_QUERY = 3; + */ + public static final int JAIL_BREAKING_QUERY_VALUE = 3; + + /** + * + * + *
            +         * Non-answer-seeking query classification type, for no clear intent.
            +         * 
            + * + * NON_ANSWER_SEEKING_QUERY_V2 = 4; + */ + public static final int NON_ANSWER_SEEKING_QUERY_V2_VALUE = 4; + + /** + * + * + *
            +         * User defined query classification type.
            +         * 
            + * + * USER_DEFINED_CLASSIFICATION_QUERY = 5; + */ + public static final int USER_DEFINED_CLASSIFICATION_QUERY_VALUE = 5; + + 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 Type 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 Type forNumber(int value) { + switch (value) { + case 0: + return TYPE_UNSPECIFIED; + case 1: + return ADVERSARIAL_QUERY; + case 2: + return NON_ANSWER_SEEKING_QUERY; + case 3: + return JAIL_BREAKING_QUERY; + case 4: + return NON_ANSWER_SEEKING_QUERY_V2; + case 5: + return USER_DEFINED_CLASSIFICATION_QUERY; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public Type findValueByNumber(int number) { + return Type.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo + .QueryClassificationInfo.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final Type[] VALUES = values(); + + public static Type valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private Type(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo.QueryClassificationInfo.Type) + } + + public static final int TYPE_FIELD_NUMBER = 1; + private int type_ = 0; + + /** + * + * + *
            +       * Query classification type.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo.QueryClassificationInfo.Type type = 1; + * + * + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override + public int getTypeValue() { + return type_; + } + + /** + * + * + *
            +       * Query classification type.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo.QueryClassificationInfo.Type type = 1; + * + * + * @return The type. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo + .QueryClassificationInfo.Type + getType() { + com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo + .QueryClassificationInfo.Type + result = + com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo + .QueryClassificationInfo.Type.forNumber(type_); + return result == null + ? com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo + .QueryClassificationInfo.Type.UNRECOGNIZED + : result; + } + + public static final int POSITIVE_FIELD_NUMBER = 2; + private boolean positive_ = false; + + /** + * + * + *
            +       * Classification output.
            +       * 
            + * + * bool positive = 2; + * + * @return The positive. + */ + @java.lang.Override + public boolean getPositive() { + return positive_; + } + + 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 (type_ + != com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo + .QueryClassificationInfo.Type.TYPE_UNSPECIFIED + .getNumber()) { + output.writeEnum(1, type_); + } + if (positive_ != false) { + output.writeBool(2, positive_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (type_ + != com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo + .QueryClassificationInfo.Type.TYPE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, type_); + } + if (positive_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, positive_); + } + 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.discoveryengine.v1beta.Answer.QueryUnderstandingInfo + .QueryClassificationInfo)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo + .QueryClassificationInfo + other = + (com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo + .QueryClassificationInfo) + obj; + + if (type_ != other.type_) return false; + if (getPositive() != other.getPositive()) 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) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + type_; + hash = (37 * hash) + POSITIVE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getPositive()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo + .QueryClassificationInfo + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo + .QueryClassificationInfo + 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.discoveryengine.v1beta.Answer.QueryUnderstandingInfo + .QueryClassificationInfo + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo + .QueryClassificationInfo + 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.discoveryengine.v1beta.Answer.QueryUnderstandingInfo + .QueryClassificationInfo + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo + .QueryClassificationInfo + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo + .QueryClassificationInfo + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo + .QueryClassificationInfo + 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.discoveryengine.v1beta.Answer.QueryUnderstandingInfo + .QueryClassificationInfo + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo + .QueryClassificationInfo + 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.discoveryengine.v1beta.Answer.QueryUnderstandingInfo + .QueryClassificationInfo + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo + .QueryClassificationInfo + 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.discoveryengine.v1beta.Answer.QueryUnderstandingInfo + .QueryClassificationInfo + 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; + } + + /** + * + * + *
            +       * Query classification information.
            +       * 
            + * + * Protobuf type {@code + * google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo.QueryClassificationInfo} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo.QueryClassificationInfo) + com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo + .QueryClassificationInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.AnswerProto + .internal_static_google_cloud_discoveryengine_v1beta_Answer_QueryUnderstandingInfo_QueryClassificationInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.AnswerProto + .internal_static_google_cloud_discoveryengine_v1beta_Answer_QueryUnderstandingInfo_QueryClassificationInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo + .QueryClassificationInfo.class, + com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo + .QueryClassificationInfo.Builder.class); + } + + // Construct using + // com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo.QueryClassificationInfo.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + type_ = 0; + positive_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1beta.AnswerProto + .internal_static_google_cloud_discoveryengine_v1beta_Answer_QueryUnderstandingInfo_QueryClassificationInfo_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo + .QueryClassificationInfo + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo + .QueryClassificationInfo.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo + .QueryClassificationInfo + build() { + com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo + .QueryClassificationInfo + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo + .QueryClassificationInfo + buildPartial() { + com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo + .QueryClassificationInfo + result = + new com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo + .QueryClassificationInfo(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo + .QueryClassificationInfo + result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.type_ = type_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.positive_ = positive_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo + .QueryClassificationInfo) { + return mergeFrom( + (com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo + .QueryClassificationInfo) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo + .QueryClassificationInfo + other) { + if (other + == com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo + .QueryClassificationInfo.getDefaultInstance()) return this; + if (other.type_ != 0) { + setTypeValue(other.getTypeValue()); + } + if (other.getPositive() != false) { + setPositive(other.getPositive()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + type_ = input.readEnum(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 16: + { + positive_ = input.readBool(); + bitField0_ |= 0x00000002; + break; + } // case 16 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private int type_ = 0; + + /** + * + * + *
            +         * Query classification type.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo.QueryClassificationInfo.Type type = 1; + * + * + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override + public int getTypeValue() { + return type_; + } + + /** + * + * + *
            +         * Query classification type.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo.QueryClassificationInfo.Type type = 1; + * + * + * @param value The enum numeric value on the wire for type to set. + * @return This builder for chaining. + */ + public Builder setTypeValue(int value) { + type_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
            +         * Query classification type.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo.QueryClassificationInfo.Type type = 1; + * + * + * @return The type. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo + .QueryClassificationInfo.Type + getType() { + com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo + .QueryClassificationInfo.Type + result = + com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo + .QueryClassificationInfo.Type.forNumber(type_); + return result == null + ? com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo + .QueryClassificationInfo.Type.UNRECOGNIZED + : result; + } + + /** + * + * + *
            +         * Query classification type.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo.QueryClassificationInfo.Type type = 1; + * + * + * @param value The type to set. + * @return This builder for chaining. + */ + public Builder setType( + com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo + .QueryClassificationInfo.Type + value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + type_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
            +         * Query classification type.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo.QueryClassificationInfo.Type type = 1; + * + * + * @return This builder for chaining. + */ + public Builder clearType() { + bitField0_ = (bitField0_ & ~0x00000001); + type_ = 0; + onChanged(); + return this; + } + + private boolean positive_; + + /** + * + * + *
            +         * Classification output.
            +         * 
            + * + * bool positive = 2; + * + * @return The positive. + */ + @java.lang.Override + public boolean getPositive() { + return positive_; + } + + /** + * + * + *
            +         * Classification output.
            +         * 
            + * + * bool positive = 2; + * + * @param value The positive to set. + * @return This builder for chaining. + */ + public Builder setPositive(boolean value) { + + positive_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
            +         * Classification output.
            +         * 
            + * + * bool positive = 2; + * + * @return This builder for chaining. + */ + public Builder clearPositive() { + bitField0_ = (bitField0_ & ~0x00000002); + positive_ = false; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo.QueryClassificationInfo) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo.QueryClassificationInfo) + private static final com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo + .QueryClassificationInfo + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo + .QueryClassificationInfo(); + } + + public static com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo + .QueryClassificationInfo + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public QueryClassificationInfo parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo + .QueryClassificationInfo + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int QUERY_CLASSIFICATION_INFO_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List< + com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo + .QueryClassificationInfo> + queryClassificationInfo_; + + /** + * + * + *
            +     * Query classification information.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo.QueryClassificationInfo query_classification_info = 1; + * + */ + @java.lang.Override + public java.util.List< + com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo + .QueryClassificationInfo> + getQueryClassificationInfoList() { + return queryClassificationInfo_; + } + + /** + * + * + *
            +     * Query classification information.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo.QueryClassificationInfo query_classification_info = 1; + * + */ + @java.lang.Override + public java.util.List< + ? extends + com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo + .QueryClassificationInfoOrBuilder> + getQueryClassificationInfoOrBuilderList() { + return queryClassificationInfo_; + } + + /** + * + * + *
            +     * Query classification information.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo.QueryClassificationInfo query_classification_info = 1; + * + */ + @java.lang.Override + public int getQueryClassificationInfoCount() { + return queryClassificationInfo_.size(); + } + + /** + * + * + *
            +     * Query classification information.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo.QueryClassificationInfo query_classification_info = 1; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo + .QueryClassificationInfo + getQueryClassificationInfo(int index) { + return queryClassificationInfo_.get(index); + } + + /** + * + * + *
            +     * Query classification information.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo.QueryClassificationInfo query_classification_info = 1; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo + .QueryClassificationInfoOrBuilder + getQueryClassificationInfoOrBuilder(int index) { + return queryClassificationInfo_.get(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 { + for (int i = 0; i < queryClassificationInfo_.size(); i++) { + output.writeMessage(1, queryClassificationInfo_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < queryClassificationInfo_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 1, queryClassificationInfo_.get(i)); + } + 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.discoveryengine.v1beta.Answer.QueryUnderstandingInfo)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo other = + (com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo) obj; + + if (!getQueryClassificationInfoList().equals(other.getQueryClassificationInfoList())) + 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 (getQueryClassificationInfoCount() > 0) { + hash = (37 * hash) + QUERY_CLASSIFICATION_INFO_FIELD_NUMBER; + hash = (53 * hash) + getQueryClassificationInfoList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo 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.discoveryengine.v1beta.Answer.QueryUnderstandingInfo parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo 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.discoveryengine.v1beta.Answer.QueryUnderstandingInfo parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo 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.discoveryengine.v1beta.Answer.QueryUnderstandingInfo + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo + 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.discoveryengine.v1beta.Answer.QueryUnderstandingInfo parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo 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.discoveryengine.v1beta.Answer.QueryUnderstandingInfo 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; + } + + /** + * + * + *
            +     * Query understanding information.
            +     * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo) + com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.AnswerProto + .internal_static_google_cloud_discoveryengine_v1beta_Answer_QueryUnderstandingInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.AnswerProto + .internal_static_google_cloud_discoveryengine_v1beta_Answer_QueryUnderstandingInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo.class, + com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo.Builder + .class); + } + + // Construct using + // com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (queryClassificationInfoBuilder_ == null) { + queryClassificationInfo_ = java.util.Collections.emptyList(); + } else { + queryClassificationInfo_ = null; + queryClassificationInfoBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1beta.AnswerProto + .internal_static_google_cloud_discoveryengine_v1beta_Answer_QueryUnderstandingInfo_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo build() { + com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo buildPartial() { + com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo result = + new com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo result) { + if (queryClassificationInfoBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + queryClassificationInfo_ = + java.util.Collections.unmodifiableList(queryClassificationInfo_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.queryClassificationInfo_ = queryClassificationInfo_; + } else { + result.queryClassificationInfo_ = queryClassificationInfoBuilder_.build(); + } + } + + private void buildPartial0( + com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo result) { + int from_bitField0_ = bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo) { + return mergeFrom( + (com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo other) { + if (other + == com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo + .getDefaultInstance()) return this; + if (queryClassificationInfoBuilder_ == null) { + if (!other.queryClassificationInfo_.isEmpty()) { + if (queryClassificationInfo_.isEmpty()) { + queryClassificationInfo_ = other.queryClassificationInfo_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureQueryClassificationInfoIsMutable(); + queryClassificationInfo_.addAll(other.queryClassificationInfo_); + } + onChanged(); + } + } else { + if (!other.queryClassificationInfo_.isEmpty()) { + if (queryClassificationInfoBuilder_.isEmpty()) { + queryClassificationInfoBuilder_.dispose(); + queryClassificationInfoBuilder_ = null; + queryClassificationInfo_ = other.queryClassificationInfo_; + bitField0_ = (bitField0_ & ~0x00000001); + queryClassificationInfoBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetQueryClassificationInfoFieldBuilder() + : null; + } else { + queryClassificationInfoBuilder_.addAllMessages(other.queryClassificationInfo_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo + .QueryClassificationInfo + m = + input.readMessage( + com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo + .QueryClassificationInfo.parser(), + extensionRegistry); + if (queryClassificationInfoBuilder_ == null) { + ensureQueryClassificationInfoIsMutable(); + queryClassificationInfo_.add(m); + } else { + queryClassificationInfoBuilder_.addMessage(m); + } + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List< + com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo + .QueryClassificationInfo> + queryClassificationInfo_ = java.util.Collections.emptyList(); + + private void ensureQueryClassificationInfoIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + queryClassificationInfo_ = + new java.util.ArrayList< + com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo + .QueryClassificationInfo>(queryClassificationInfo_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo + .QueryClassificationInfo, + com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo + .QueryClassificationInfo.Builder, + com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo + .QueryClassificationInfoOrBuilder> + queryClassificationInfoBuilder_; + + /** + * + * + *
            +       * Query classification information.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo.QueryClassificationInfo query_classification_info = 1; + * + */ + public java.util.List< + com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo + .QueryClassificationInfo> + getQueryClassificationInfoList() { + if (queryClassificationInfoBuilder_ == null) { + return java.util.Collections.unmodifiableList(queryClassificationInfo_); + } else { + return queryClassificationInfoBuilder_.getMessageList(); + } + } + + /** + * + * + *
            +       * Query classification information.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo.QueryClassificationInfo query_classification_info = 1; + * + */ + public int getQueryClassificationInfoCount() { + if (queryClassificationInfoBuilder_ == null) { + return queryClassificationInfo_.size(); + } else { + return queryClassificationInfoBuilder_.getCount(); + } + } + + /** + * + * + *
            +       * Query classification information.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo.QueryClassificationInfo query_classification_info = 1; + * + */ + public com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo + .QueryClassificationInfo + getQueryClassificationInfo(int index) { + if (queryClassificationInfoBuilder_ == null) { + return queryClassificationInfo_.get(index); + } else { + return queryClassificationInfoBuilder_.getMessage(index); + } + } + + /** + * + * + *
            +       * Query classification information.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo.QueryClassificationInfo query_classification_info = 1; + * + */ + public Builder setQueryClassificationInfo( + int index, + com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo + .QueryClassificationInfo + value) { + if (queryClassificationInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureQueryClassificationInfoIsMutable(); + queryClassificationInfo_.set(index, value); + onChanged(); + } else { + queryClassificationInfoBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
            +       * Query classification information.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo.QueryClassificationInfo query_classification_info = 1; + * + */ + public Builder setQueryClassificationInfo( + int index, + com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo + .QueryClassificationInfo.Builder + builderForValue) { + if (queryClassificationInfoBuilder_ == null) { + ensureQueryClassificationInfoIsMutable(); + queryClassificationInfo_.set(index, builderForValue.build()); + onChanged(); + } else { + queryClassificationInfoBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
            +       * Query classification information.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo.QueryClassificationInfo query_classification_info = 1; + * + */ + public Builder addQueryClassificationInfo( + com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo + .QueryClassificationInfo + value) { + if (queryClassificationInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureQueryClassificationInfoIsMutable(); + queryClassificationInfo_.add(value); + onChanged(); + } else { + queryClassificationInfoBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
            +       * Query classification information.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo.QueryClassificationInfo query_classification_info = 1; + * + */ + public Builder addQueryClassificationInfo( + int index, + com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo + .QueryClassificationInfo + value) { + if (queryClassificationInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureQueryClassificationInfoIsMutable(); + queryClassificationInfo_.add(index, value); + onChanged(); + } else { + queryClassificationInfoBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
            +       * Query classification information.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo.QueryClassificationInfo query_classification_info = 1; + * + */ + public Builder addQueryClassificationInfo( + com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo + .QueryClassificationInfo.Builder + builderForValue) { + if (queryClassificationInfoBuilder_ == null) { + ensureQueryClassificationInfoIsMutable(); + queryClassificationInfo_.add(builderForValue.build()); + onChanged(); + } else { + queryClassificationInfoBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
            +       * Query classification information.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo.QueryClassificationInfo query_classification_info = 1; + * + */ + public Builder addQueryClassificationInfo( + int index, + com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo + .QueryClassificationInfo.Builder + builderForValue) { + if (queryClassificationInfoBuilder_ == null) { + ensureQueryClassificationInfoIsMutable(); + queryClassificationInfo_.add(index, builderForValue.build()); + onChanged(); + } else { + queryClassificationInfoBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
            +       * Query classification information.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo.QueryClassificationInfo query_classification_info = 1; + * + */ + public Builder addAllQueryClassificationInfo( + java.lang.Iterable< + ? extends + com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo + .QueryClassificationInfo> + values) { + if (queryClassificationInfoBuilder_ == null) { + ensureQueryClassificationInfoIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, queryClassificationInfo_); + onChanged(); + } else { + queryClassificationInfoBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
            +       * Query classification information.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo.QueryClassificationInfo query_classification_info = 1; + * + */ + public Builder clearQueryClassificationInfo() { + if (queryClassificationInfoBuilder_ == null) { + queryClassificationInfo_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + queryClassificationInfoBuilder_.clear(); + } + return this; + } + + /** + * + * + *
            +       * Query classification information.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo.QueryClassificationInfo query_classification_info = 1; + * + */ + public Builder removeQueryClassificationInfo(int index) { + if (queryClassificationInfoBuilder_ == null) { + ensureQueryClassificationInfoIsMutable(); + queryClassificationInfo_.remove(index); + onChanged(); + } else { + queryClassificationInfoBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
            +       * Query classification information.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo.QueryClassificationInfo query_classification_info = 1; + * + */ public com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo .QueryClassificationInfo.Builder getQueryClassificationInfoBuilder(int index) { return internalGetQueryClassificationInfoFieldBuilder().getBuilder(index); } - /** - * - * - *
            -       * Query classification information.
            -       * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo.QueryClassificationInfo query_classification_info = 1; - * - */ - public com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo - .QueryClassificationInfoOrBuilder - getQueryClassificationInfoOrBuilder(int index) { - if (queryClassificationInfoBuilder_ == null) { - return queryClassificationInfo_.get(index); - } else { - return queryClassificationInfoBuilder_.getMessageOrBuilder(index); - } - } + /** + * + * + *
            +       * Query classification information.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo.QueryClassificationInfo query_classification_info = 1; + * + */ + public com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo + .QueryClassificationInfoOrBuilder + getQueryClassificationInfoOrBuilder(int index) { + if (queryClassificationInfoBuilder_ == null) { + return queryClassificationInfo_.get(index); + } else { + return queryClassificationInfoBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
            +       * Query classification information.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo.QueryClassificationInfo query_classification_info = 1; + * + */ + public java.util.List< + ? extends + com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo + .QueryClassificationInfoOrBuilder> + getQueryClassificationInfoOrBuilderList() { + if (queryClassificationInfoBuilder_ != null) { + return queryClassificationInfoBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(queryClassificationInfo_); + } + } + + /** + * + * + *
            +       * Query classification information.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo.QueryClassificationInfo query_classification_info = 1; + * + */ + public com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo + .QueryClassificationInfo.Builder + addQueryClassificationInfoBuilder() { + return internalGetQueryClassificationInfoFieldBuilder() + .addBuilder( + com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo + .QueryClassificationInfo.getDefaultInstance()); + } + + /** + * + * + *
            +       * Query classification information.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo.QueryClassificationInfo query_classification_info = 1; + * + */ + public com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo + .QueryClassificationInfo.Builder + addQueryClassificationInfoBuilder(int index) { + return internalGetQueryClassificationInfoFieldBuilder() + .addBuilder( + index, + com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo + .QueryClassificationInfo.getDefaultInstance()); + } + + /** + * + * + *
            +       * Query classification information.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo.QueryClassificationInfo query_classification_info = 1; + * + */ + public java.util.List< + com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo + .QueryClassificationInfo.Builder> + getQueryClassificationInfoBuilderList() { + return internalGetQueryClassificationInfoFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo + .QueryClassificationInfo, + com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo + .QueryClassificationInfo.Builder, + com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo + .QueryClassificationInfoOrBuilder> + internalGetQueryClassificationInfoFieldBuilder() { + if (queryClassificationInfoBuilder_ == null) { + queryClassificationInfoBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo + .QueryClassificationInfo, + com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo + .QueryClassificationInfo.Builder, + com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo + .QueryClassificationInfoOrBuilder>( + queryClassificationInfo_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + queryClassificationInfo_ = null; + } + return queryClassificationInfoBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo) + private static final com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo(); + } + + public static com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public QueryUnderstandingInfo parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int bitField0_; + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
            +   * Immutable. Fully qualified name
            +   * `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*/answers/*`
            +   * 
            + * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + 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(); + name_ = s; + return s; + } + } + + /** + * + * + *
            +   * Immutable. Fully qualified name
            +   * `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*/answers/*`
            +   * 
            + * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int STATE_FIELD_NUMBER = 2; + private int state_ = 0; + + /** + * + * + *
            +   * The state of the answer generation.
            +   * 
            + * + * .google.cloud.discoveryengine.v1beta.Answer.State state = 2; + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + + /** + * + * + *
            +   * The state of the answer generation.
            +   * 
            + * + * .google.cloud.discoveryengine.v1beta.Answer.State state = 2; + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Answer.State getState() { + com.google.cloud.discoveryengine.v1beta.Answer.State result = + com.google.cloud.discoveryengine.v1beta.Answer.State.forNumber(state_); + return result == null + ? com.google.cloud.discoveryengine.v1beta.Answer.State.UNRECOGNIZED + : result; + } + + public static final int ANSWER_TEXT_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object answerText_ = ""; + + /** + * + * + *
            +   * The textual answer.
            +   * 
            + * + * string answer_text = 3; + * + * @return The answerText. + */ + @java.lang.Override + public java.lang.String getAnswerText() { + java.lang.Object ref = answerText_; + 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(); + answerText_ = s; + return s; + } + } + + /** + * + * + *
            +   * The textual answer.
            +   * 
            + * + * string answer_text = 3; + * + * @return The bytes for answerText. + */ + @java.lang.Override + public com.google.protobuf.ByteString getAnswerTextBytes() { + java.lang.Object ref = answerText_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + answerText_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int GROUNDING_SCORE_FIELD_NUMBER = 12; + private double groundingScore_ = 0D; + + /** + * + * + *
            +   * A score in the range of [0, 1] describing how grounded the answer is by the
            +   * reference chunks.
            +   * 
            + * + * optional double grounding_score = 12; + * + * @return Whether the groundingScore field is set. + */ + @java.lang.Override + public boolean hasGroundingScore() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
            +   * A score in the range of [0, 1] describing how grounded the answer is by the
            +   * reference chunks.
            +   * 
            + * + * optional double grounding_score = 12; + * + * @return The groundingScore. + */ + @java.lang.Override + public double getGroundingScore() { + return groundingScore_; + } + + public static final int CITATIONS_FIELD_NUMBER = 4; - /** - * - * - *
            -       * Query classification information.
            -       * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo.QueryClassificationInfo query_classification_info = 1; - * - */ - public java.util.List< - ? extends - com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo - .QueryClassificationInfoOrBuilder> - getQueryClassificationInfoOrBuilderList() { - if (queryClassificationInfoBuilder_ != null) { - return queryClassificationInfoBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(queryClassificationInfo_); - } - } + @SuppressWarnings("serial") + private java.util.List citations_; + + /** + * + * + *
            +   * Citations.
            +   * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.Citation citations = 4; + */ + @java.lang.Override + public java.util.List + getCitationsList() { + return citations_; + } + + /** + * + * + *
            +   * Citations.
            +   * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.Citation citations = 4; + */ + @java.lang.Override + public java.util.List + getCitationsOrBuilderList() { + return citations_; + } + + /** + * + * + *
            +   * Citations.
            +   * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.Citation citations = 4; + */ + @java.lang.Override + public int getCitationsCount() { + return citations_.size(); + } + + /** + * + * + *
            +   * Citations.
            +   * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.Citation citations = 4; + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Answer.Citation getCitations(int index) { + return citations_.get(index); + } + + /** + * + * + *
            +   * Citations.
            +   * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.Citation citations = 4; + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Answer.CitationOrBuilder getCitationsOrBuilder( + int index) { + return citations_.get(index); + } + + public static final int GROUNDING_SUPPORTS_FIELD_NUMBER = 13; + + @SuppressWarnings("serial") + private java.util.List + groundingSupports_; + + /** + * + * + *
            +   * Optional. Grounding supports.
            +   * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.GroundingSupport grounding_supports = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List + getGroundingSupportsList() { + return groundingSupports_; + } + + /** + * + * + *
            +   * Optional. Grounding supports.
            +   * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.GroundingSupport grounding_supports = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List< + ? extends com.google.cloud.discoveryengine.v1beta.Answer.GroundingSupportOrBuilder> + getGroundingSupportsOrBuilderList() { + return groundingSupports_; + } + + /** + * + * + *
            +   * Optional. Grounding supports.
            +   * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.GroundingSupport grounding_supports = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public int getGroundingSupportsCount() { + return groundingSupports_.size(); + } + + /** + * + * + *
            +   * Optional. Grounding supports.
            +   * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.GroundingSupport grounding_supports = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Answer.GroundingSupport getGroundingSupports( + int index) { + return groundingSupports_.get(index); + } + + /** + * + * + *
            +   * Optional. Grounding supports.
            +   * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.GroundingSupport grounding_supports = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Answer.GroundingSupportOrBuilder + getGroundingSupportsOrBuilder(int index) { + return groundingSupports_.get(index); + } + + public static final int REFERENCES_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private java.util.List references_; + + /** + * + * + *
            +   * References.
            +   * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.Reference references = 5; + */ + @java.lang.Override + public java.util.List + getReferencesList() { + return references_; + } + + /** + * + * + *
            +   * References.
            +   * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.Reference references = 5; + */ + @java.lang.Override + public java.util.List + getReferencesOrBuilderList() { + return references_; + } + + /** + * + * + *
            +   * References.
            +   * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.Reference references = 5; + */ + @java.lang.Override + public int getReferencesCount() { + return references_.size(); + } + + /** + * + * + *
            +   * References.
            +   * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.Reference references = 5; + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Answer.Reference getReferences(int index) { + return references_.get(index); + } + + /** + * + * + *
            +   * References.
            +   * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.Reference references = 5; + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Answer.ReferenceOrBuilder getReferencesOrBuilder( + int index) { + return references_.get(index); + } - /** - * - * - *
            -       * Query classification information.
            -       * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo.QueryClassificationInfo query_classification_info = 1; - * - */ - public com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo - .QueryClassificationInfo.Builder - addQueryClassificationInfoBuilder() { - return internalGetQueryClassificationInfoFieldBuilder() - .addBuilder( - com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo - .QueryClassificationInfo.getDefaultInstance()); - } + public static final int BLOB_ATTACHMENTS_FIELD_NUMBER = 15; - /** - * - * - *
            -       * Query classification information.
            -       * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo.QueryClassificationInfo query_classification_info = 1; - * - */ - public com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo - .QueryClassificationInfo.Builder - addQueryClassificationInfoBuilder(int index) { - return internalGetQueryClassificationInfoFieldBuilder() - .addBuilder( - index, - com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo - .QueryClassificationInfo.getDefaultInstance()); - } + @SuppressWarnings("serial") + private java.util.List + blobAttachments_; - /** - * - * - *
            -       * Query classification information.
            -       * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo.QueryClassificationInfo query_classification_info = 1; - * - */ - public java.util.List< - com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo - .QueryClassificationInfo.Builder> - getQueryClassificationInfoBuilderList() { - return internalGetQueryClassificationInfoFieldBuilder().getBuilderList(); - } + /** + * + * + *
            +   * Output only. List of blob attachments in the answer.
            +   * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.BlobAttachment blob_attachments = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.List + getBlobAttachmentsList() { + return blobAttachments_; + } - private com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo - .QueryClassificationInfo, - com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo - .QueryClassificationInfo.Builder, - com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo - .QueryClassificationInfoOrBuilder> - internalGetQueryClassificationInfoFieldBuilder() { - if (queryClassificationInfoBuilder_ == null) { - queryClassificationInfoBuilder_ = - new com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo - .QueryClassificationInfo, - com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo - .QueryClassificationInfo.Builder, - com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo - .QueryClassificationInfoOrBuilder>( - queryClassificationInfo_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - queryClassificationInfo_ = null; - } - return queryClassificationInfoBuilder_; - } + /** + * + * + *
            +   * Output only. List of blob attachments in the answer.
            +   * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.BlobAttachment blob_attachments = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.List< + ? extends com.google.cloud.discoveryengine.v1beta.Answer.BlobAttachmentOrBuilder> + getBlobAttachmentsOrBuilderList() { + return blobAttachments_; + } - // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo) - } + /** + * + * + *
            +   * Output only. List of blob attachments in the answer.
            +   * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.BlobAttachment blob_attachments = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public int getBlobAttachmentsCount() { + return blobAttachments_.size(); + } - // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo) - private static final com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo - DEFAULT_INSTANCE; + /** + * + * + *
            +   * Output only. List of blob attachments in the answer.
            +   * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.BlobAttachment blob_attachments = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Answer.BlobAttachment getBlobAttachments( + int index) { + return blobAttachments_.get(index); + } - static { - DEFAULT_INSTANCE = - new com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo(); - } + /** + * + * + *
            +   * Output only. List of blob attachments in the answer.
            +   * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.BlobAttachment blob_attachments = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Answer.BlobAttachmentOrBuilder + getBlobAttachmentsOrBuilder(int index) { + return blobAttachments_.get(index); + } - public static com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo - getDefaultInstance() { - return DEFAULT_INSTANCE; - } + public static final int RELATED_QUESTIONS_FIELD_NUMBER = 6; - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public QueryUnderstandingInfo parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException() - .setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList relatedQuestions_ = + com.google.protobuf.LazyStringArrayList.emptyList(); - public static com.google.protobuf.Parser parser() { - return PARSER; - } + /** + * + * + *
            +   * Suggested related questions.
            +   * 
            + * + * repeated string related_questions = 6; + * + * @return A list containing the relatedQuestions. + */ + public com.google.protobuf.ProtocolStringList getRelatedQuestionsList() { + return relatedQuestions_; + } - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + /** + * + * + *
            +   * Suggested related questions.
            +   * 
            + * + * repeated string related_questions = 6; + * + * @return The count of relatedQuestions. + */ + public int getRelatedQuestionsCount() { + return relatedQuestions_.size(); + } - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + /** + * + * + *
            +   * Suggested related questions.
            +   * 
            + * + * repeated string related_questions = 6; + * + * @param index The index of the element to return. + * @return The relatedQuestions at the given index. + */ + public java.lang.String getRelatedQuestions(int index) { + return relatedQuestions_.get(index); + } + + /** + * + * + *
            +   * Suggested related questions.
            +   * 
            + * + * repeated string related_questions = 6; + * + * @param index The index of the value to return. + * @return The bytes of the relatedQuestions at the given index. + */ + public com.google.protobuf.ByteString getRelatedQuestionsBytes(int index) { + return relatedQuestions_.getByteString(index); } - private int bitField0_; - public static final int NAME_FIELD_NUMBER = 1; + public static final int STEPS_FIELD_NUMBER = 7; @SuppressWarnings("serial") - private volatile java.lang.Object name_ = ""; + private java.util.List steps_; /** * * *
            -   * Immutable. Fully qualified name
            -   * `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*/answers/*`
            +   * Answer generation steps.
                * 
            * - * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The name. + * repeated .google.cloud.discoveryengine.v1beta.Answer.Step steps = 7; */ @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - 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(); - name_ = s; - return s; - } + public java.util.List getStepsList() { + return steps_; } /** * * *
            -   * Immutable. Fully qualified name
            -   * `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*/answers/*`
            +   * Answer generation steps.
                * 
            * - * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The bytes for name. + * repeated .google.cloud.discoveryengine.v1beta.Answer.Step steps = 7; */ @java.lang.Override - public com.google.protobuf.ByteString getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } + public java.util.List + getStepsOrBuilderList() { + return steps_; } - public static final int STATE_FIELD_NUMBER = 2; - private int state_ = 0; - /** * * *
            -   * The state of the answer generation.
            +   * Answer generation steps.
                * 
            * - * .google.cloud.discoveryengine.v1beta.Answer.State state = 2; - * - * @return The enum numeric value on the wire for state. + * repeated .google.cloud.discoveryengine.v1beta.Answer.Step steps = 7; */ @java.lang.Override - public int getStateValue() { - return state_; + public int getStepsCount() { + return steps_.size(); } /** * * *
            -   * The state of the answer generation.
            +   * Answer generation steps.
                * 
            * - * .google.cloud.discoveryengine.v1beta.Answer.State state = 2; - * - * @return The state. + * repeated .google.cloud.discoveryengine.v1beta.Answer.Step steps = 7; */ @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.Answer.State getState() { - com.google.cloud.discoveryengine.v1beta.Answer.State result = - com.google.cloud.discoveryengine.v1beta.Answer.State.forNumber(state_); - return result == null - ? com.google.cloud.discoveryengine.v1beta.Answer.State.UNRECOGNIZED - : result; + public com.google.cloud.discoveryengine.v1beta.Answer.Step getSteps(int index) { + return steps_.get(index); } - public static final int ANSWER_TEXT_FIELD_NUMBER = 3; + /** + * + * + *
            +   * Answer generation steps.
            +   * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.Step steps = 7; + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Answer.StepOrBuilder getStepsOrBuilder(int index) { + return steps_.get(index); + } - @SuppressWarnings("serial") - private volatile java.lang.Object answerText_ = ""; + public static final int QUERY_UNDERSTANDING_INFO_FIELD_NUMBER = 10; + private com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo + queryUnderstandingInfo_; /** * * *
            -   * The textual answer.
            +   * Query understanding information.
                * 
            * - * string answer_text = 3; + * + * .google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo query_understanding_info = 10; + * * - * @return The answerText. + * @return Whether the queryUnderstandingInfo field is set. */ @java.lang.Override - public java.lang.String getAnswerText() { - java.lang.Object ref = answerText_; - 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(); - answerText_ = s; - return s; - } + public boolean hasQueryUnderstandingInfo() { + return ((bitField0_ & 0x00000002) != 0); } /** * * *
            -   * The textual answer.
            +   * Query understanding information.
                * 
            * - * string answer_text = 3; + * + * .google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo query_understanding_info = 10; + * * - * @return The bytes for answerText. + * @return The queryUnderstandingInfo. */ @java.lang.Override - public com.google.protobuf.ByteString getAnswerTextBytes() { - java.lang.Object ref = answerText_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - answerText_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } + public com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo + getQueryUnderstandingInfo() { + return queryUnderstandingInfo_ == null + ? com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo.getDefaultInstance() + : queryUnderstandingInfo_; } - public static final int CITATIONS_FIELD_NUMBER = 4; + /** + * + * + *
            +   * Query understanding information.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo query_understanding_info = 10; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfoOrBuilder + getQueryUnderstandingInfoOrBuilder() { + return queryUnderstandingInfo_ == null + ? com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo.getDefaultInstance() + : queryUnderstandingInfo_; + } + + public static final int ANSWER_SKIPPED_REASONS_FIELD_NUMBER = 11; @SuppressWarnings("serial") - private java.util.List citations_; + private com.google.protobuf.Internal.IntList answerSkippedReasons_ = emptyIntList(); + + private static final com.google.protobuf.Internal.IntListAdapter.IntConverter< + com.google.cloud.discoveryengine.v1beta.Answer.AnswerSkippedReason> + answerSkippedReasons_converter_ = + new com.google.protobuf.Internal.IntListAdapter.IntConverter< + com.google.cloud.discoveryengine.v1beta.Answer.AnswerSkippedReason>() { + public com.google.cloud.discoveryengine.v1beta.Answer.AnswerSkippedReason convert( + int from) { + com.google.cloud.discoveryengine.v1beta.Answer.AnswerSkippedReason result = + com.google.cloud.discoveryengine.v1beta.Answer.AnswerSkippedReason.forNumber( + from); + return result == null + ? com.google.cloud.discoveryengine.v1beta.Answer.AnswerSkippedReason.UNRECOGNIZED + : result; + } + }; /** * * *
            -   * Citations.
            +   * Additional answer-skipped reasons. This provides the reason for ignored
            +   * cases. If nothing is skipped, this field is not set.
                * 
            * - * repeated .google.cloud.discoveryengine.v1beta.Answer.Citation citations = 4; + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.AnswerSkippedReason answer_skipped_reasons = 11; + * + * + * @return A list containing the answerSkippedReasons. */ @java.lang.Override - public java.util.List - getCitationsList() { - return citations_; + public java.util.List + getAnswerSkippedReasonsList() { + return new com.google.protobuf.Internal.IntListAdapter< + com.google.cloud.discoveryengine.v1beta.Answer.AnswerSkippedReason>( + answerSkippedReasons_, answerSkippedReasons_converter_); } /** * * *
            -   * Citations.
            +   * Additional answer-skipped reasons. This provides the reason for ignored
            +   * cases. If nothing is skipped, this field is not set.
                * 
            * - * repeated .google.cloud.discoveryengine.v1beta.Answer.Citation citations = 4; + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.AnswerSkippedReason answer_skipped_reasons = 11; + * + * + * @return The count of answerSkippedReasons. */ @java.lang.Override - public java.util.List - getCitationsOrBuilderList() { - return citations_; + public int getAnswerSkippedReasonsCount() { + return answerSkippedReasons_.size(); } /** * * *
            -   * Citations.
            +   * Additional answer-skipped reasons. This provides the reason for ignored
            +   * cases. If nothing is skipped, this field is not set.
                * 
            * - * repeated .google.cloud.discoveryengine.v1beta.Answer.Citation citations = 4; + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.AnswerSkippedReason answer_skipped_reasons = 11; + * + * + * @param index The index of the element to return. + * @return The answerSkippedReasons at the given index. */ @java.lang.Override - public int getCitationsCount() { - return citations_.size(); + public com.google.cloud.discoveryengine.v1beta.Answer.AnswerSkippedReason getAnswerSkippedReasons( + int index) { + return answerSkippedReasons_converter_.convert(answerSkippedReasons_.getInt(index)); } /** * * *
            -   * Citations.
            +   * Additional answer-skipped reasons. This provides the reason for ignored
            +   * cases. If nothing is skipped, this field is not set.
                * 
            * - * repeated .google.cloud.discoveryengine.v1beta.Answer.Citation citations = 4; + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.AnswerSkippedReason answer_skipped_reasons = 11; + * + * + * @return A list containing the enum numeric values on the wire for answerSkippedReasons. */ @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.Answer.Citation getCitations(int index) { - return citations_.get(index); + public java.util.List getAnswerSkippedReasonsValueList() { + return answerSkippedReasons_; } /** * * *
            -   * Citations.
            +   * Additional answer-skipped reasons. This provides the reason for ignored
            +   * cases. If nothing is skipped, this field is not set.
                * 
            * - * repeated .google.cloud.discoveryengine.v1beta.Answer.Citation citations = 4; + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.AnswerSkippedReason answer_skipped_reasons = 11; + * + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of answerSkippedReasons at the given index. */ @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.Answer.CitationOrBuilder getCitationsOrBuilder( - int index) { - return citations_.get(index); + public int getAnswerSkippedReasonsValue(int index) { + return answerSkippedReasons_.getInt(index); } - public static final int REFERENCES_FIELD_NUMBER = 5; + private int answerSkippedReasonsMemoizedSerializedSize; - @SuppressWarnings("serial") - private java.util.List references_; + public static final int CREATE_TIME_FIELD_NUMBER = 8; + private com.google.protobuf.Timestamp createTime_; /** * * *
            -   * References.
            +   * Output only. Answer creation timestamp.
                * 
            * - * repeated .google.cloud.discoveryengine.v1beta.Answer.Reference references = 5; + * .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. */ @java.lang.Override - public java.util.List - getReferencesList() { - return references_; + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000004) != 0); } /** * * *
            -   * References.
            +   * Output only. Answer creation timestamp.
                * 
            * - * repeated .google.cloud.discoveryengine.v1beta.Answer.Reference references = 5; + * .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. */ @java.lang.Override - public java.util.List - getReferencesOrBuilderList() { - return references_; + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; } /** * * *
            -   * References.
            +   * Output only. Answer creation timestamp.
                * 
            * - * repeated .google.cloud.discoveryengine.v1beta.Answer.Reference references = 5; + * .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ @java.lang.Override - public int getReferencesCount() { - return references_.size(); + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; } + public static final int COMPLETE_TIME_FIELD_NUMBER = 9; + private com.google.protobuf.Timestamp completeTime_; + /** * * *
            -   * References.
            +   * Output only. Answer completed timestamp.
                * 
            * - * repeated .google.cloud.discoveryengine.v1beta.Answer.Reference references = 5; + * + * .google.protobuf.Timestamp complete_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the completeTime field is set. */ @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.Answer.Reference getReferences(int index) { - return references_.get(index); + public boolean hasCompleteTime() { + return ((bitField0_ & 0x00000008) != 0); } /** * * *
            -   * References.
            +   * Output only. Answer completed timestamp.
                * 
            * - * repeated .google.cloud.discoveryengine.v1beta.Answer.Reference references = 5; + * + * .google.protobuf.Timestamp complete_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The completeTime. */ @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.Answer.ReferenceOrBuilder getReferencesOrBuilder( - int index) { - return references_.get(index); + public com.google.protobuf.Timestamp getCompleteTime() { + return completeTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : completeTime_; } - public static final int RELATED_QUESTIONS_FIELD_NUMBER = 6; - - @SuppressWarnings("serial") - private com.google.protobuf.LazyStringArrayList relatedQuestions_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - /** * * *
            -   * Suggested related questions.
            +   * Output only. Answer completed timestamp.
                * 
            * - * repeated string related_questions = 6; - * - * @return A list containing the relatedQuestions. + * + * .google.protobuf.Timestamp complete_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ - public com.google.protobuf.ProtocolStringList getRelatedQuestionsList() { - return relatedQuestions_; + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCompleteTimeOrBuilder() { + return completeTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : completeTime_; } + public static final int SAFETY_RATINGS_FIELD_NUMBER = 14; + + @SuppressWarnings("serial") + private java.util.List safetyRatings_; + /** * * *
            -   * Suggested related questions.
            +   * Optional. Safety ratings.
                * 
            * - * repeated string related_questions = 6; - * - * @return The count of relatedQuestions. + * + * repeated .google.cloud.discoveryengine.v1beta.SafetyRating safety_ratings = 14 [(.google.api.field_behavior) = OPTIONAL]; + * */ - public int getRelatedQuestionsCount() { - return relatedQuestions_.size(); + @java.lang.Override + public java.util.List + getSafetyRatingsList() { + return safetyRatings_; } /** * * *
            -   * Suggested related questions.
            +   * Optional. Safety ratings.
                * 
            * - * repeated string related_questions = 6; - * - * @param index The index of the element to return. - * @return The relatedQuestions at the given index. + * + * repeated .google.cloud.discoveryengine.v1beta.SafetyRating safety_ratings = 14 [(.google.api.field_behavior) = OPTIONAL]; + * */ - public java.lang.String getRelatedQuestions(int index) { - return relatedQuestions_.get(index); + @java.lang.Override + public java.util.List + getSafetyRatingsOrBuilderList() { + return safetyRatings_; } /** * * *
            -   * Suggested related questions.
            +   * Optional. Safety ratings.
                * 
            * - * repeated string related_questions = 6; - * - * @param index The index of the value to return. - * @return The bytes of the relatedQuestions at the given index. + * + * repeated .google.cloud.discoveryengine.v1beta.SafetyRating safety_ratings = 14 [(.google.api.field_behavior) = OPTIONAL]; + * */ - public com.google.protobuf.ByteString getRelatedQuestionsBytes(int index) { - return relatedQuestions_.getByteString(index); + @java.lang.Override + public int getSafetyRatingsCount() { + return safetyRatings_.size(); } - public static final int STEPS_FIELD_NUMBER = 7; - - @SuppressWarnings("serial") - private java.util.List steps_; - /** * * *
            -   * Answer generation steps.
            +   * Optional. Safety ratings.
                * 
            * - * repeated .google.cloud.discoveryengine.v1beta.Answer.Step steps = 7; + * + * repeated .google.cloud.discoveryengine.v1beta.SafetyRating safety_ratings = 14 [(.google.api.field_behavior) = OPTIONAL]; + * */ @java.lang.Override - public java.util.List getStepsList() { - return steps_; + public com.google.cloud.discoveryengine.v1beta.SafetyRating getSafetyRatings(int index) { + return safetyRatings_.get(index); } /** * * *
            -   * Answer generation steps.
            +   * Optional. Safety ratings.
                * 
            * - * repeated .google.cloud.discoveryengine.v1beta.Answer.Step steps = 7; + * + * repeated .google.cloud.discoveryengine.v1beta.SafetyRating safety_ratings = 14 [(.google.api.field_behavior) = OPTIONAL]; + * */ @java.lang.Override - public java.util.List - getStepsOrBuilderList() { - return steps_; + public com.google.cloud.discoveryengine.v1beta.SafetyRatingOrBuilder getSafetyRatingsOrBuilder( + int index) { + return safetyRatings_.get(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 { + getSerializedSize(); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + if (state_ + != com.google.cloud.discoveryengine.v1beta.Answer.State.STATE_UNSPECIFIED.getNumber()) { + output.writeEnum(2, state_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(answerText_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, answerText_); + } + for (int i = 0; i < citations_.size(); i++) { + output.writeMessage(4, citations_.get(i)); + } + for (int i = 0; i < references_.size(); i++) { + output.writeMessage(5, references_.get(i)); + } + for (int i = 0; i < relatedQuestions_.size(); i++) { + com.google.protobuf.GeneratedMessage.writeString(output, 6, relatedQuestions_.getRaw(i)); + } + for (int i = 0; i < steps_.size(); i++) { + output.writeMessage(7, steps_.get(i)); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeMessage(8, getCreateTime()); + } + if (((bitField0_ & 0x00000008) != 0)) { + output.writeMessage(9, getCompleteTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(10, getQueryUnderstandingInfo()); + } + if (getAnswerSkippedReasonsList().size() > 0) { + output.writeUInt32NoTag(90); + output.writeUInt32NoTag(answerSkippedReasonsMemoizedSerializedSize); + } + for (int i = 0; i < answerSkippedReasons_.size(); i++) { + output.writeEnumNoTag(answerSkippedReasons_.getInt(i)); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeDouble(12, groundingScore_); + } + for (int i = 0; i < groundingSupports_.size(); i++) { + output.writeMessage(13, groundingSupports_.get(i)); + } + for (int i = 0; i < safetyRatings_.size(); i++) { + output.writeMessage(14, safetyRatings_.get(i)); + } + for (int i = 0; i < blobAttachments_.size(); i++) { + output.writeMessage(15, blobAttachments_.get(i)); + } + 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(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + if (state_ + != com.google.cloud.discoveryengine.v1beta.Answer.State.STATE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, state_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(answerText_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, answerText_); + } + for (int i = 0; i < citations_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, citations_.get(i)); + } + for (int i = 0; i < references_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, references_.get(i)); + } + { + int dataSize = 0; + for (int i = 0; i < relatedQuestions_.size(); i++) { + dataSize += computeStringSizeNoTag(relatedQuestions_.getRaw(i)); + } + size += dataSize; + size += 1 * getRelatedQuestionsList().size(); + } + for (int i = 0; i < steps_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, steps_.get(i)); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, getCreateTime()); + } + if (((bitField0_ & 0x00000008) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(9, getCompleteTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(10, getQueryUnderstandingInfo()); + } + { + int dataSize = 0; + for (int i = 0; i < answerSkippedReasons_.size(); i++) { + dataSize += + com.google.protobuf.CodedOutputStream.computeEnumSizeNoTag( + answerSkippedReasons_.getInt(i)); + } + size += dataSize; + if (!getAnswerSkippedReasonsList().isEmpty()) { + size += 1; + size += com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(dataSize); + } + answerSkippedReasonsMemoizedSerializedSize = dataSize; + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeDoubleSize(12, groundingScore_); + } + for (int i = 0; i < groundingSupports_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(13, groundingSupports_.get(i)); + } + for (int i = 0; i < safetyRatings_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(14, safetyRatings_.get(i)); + } + for (int i = 0; i < blobAttachments_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(15, blobAttachments_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; } - /** - * - * - *
            -   * Answer generation steps.
            -   * 
            - * - * repeated .google.cloud.discoveryengine.v1beta.Answer.Step steps = 7; - */ @java.lang.Override - public int getStepsCount() { - return steps_.size(); - } + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.discoveryengine.v1beta.Answer)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1beta.Answer other = + (com.google.cloud.discoveryengine.v1beta.Answer) obj; - /** - * - * - *
            -   * Answer generation steps.
            -   * 
            - * - * repeated .google.cloud.discoveryengine.v1beta.Answer.Step steps = 7; - */ - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.Answer.Step getSteps(int index) { - return steps_.get(index); + if (!getName().equals(other.getName())) return false; + if (state_ != other.state_) return false; + if (!getAnswerText().equals(other.getAnswerText())) return false; + if (hasGroundingScore() != other.hasGroundingScore()) return false; + if (hasGroundingScore()) { + if (java.lang.Double.doubleToLongBits(getGroundingScore()) + != java.lang.Double.doubleToLongBits(other.getGroundingScore())) return false; + } + if (!getCitationsList().equals(other.getCitationsList())) return false; + if (!getGroundingSupportsList().equals(other.getGroundingSupportsList())) return false; + if (!getReferencesList().equals(other.getReferencesList())) return false; + if (!getBlobAttachmentsList().equals(other.getBlobAttachmentsList())) return false; + if (!getRelatedQuestionsList().equals(other.getRelatedQuestionsList())) return false; + if (!getStepsList().equals(other.getStepsList())) return false; + if (hasQueryUnderstandingInfo() != other.hasQueryUnderstandingInfo()) return false; + if (hasQueryUnderstandingInfo()) { + if (!getQueryUnderstandingInfo().equals(other.getQueryUnderstandingInfo())) return false; + } + if (!answerSkippedReasons_.equals(other.answerSkippedReasons_)) return false; + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (hasCompleteTime() != other.hasCompleteTime()) return false; + if (hasCompleteTime()) { + if (!getCompleteTime().equals(other.getCompleteTime())) return false; + } + if (!getSafetyRatingsList().equals(other.getSafetyRatingsList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; } - /** - * - * - *
            -   * Answer generation steps.
            -   * 
            - * - * repeated .google.cloud.discoveryengine.v1beta.Answer.Step steps = 7; - */ @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.Answer.StepOrBuilder getStepsOrBuilder(int index) { - return steps_.get(index); + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + STATE_FIELD_NUMBER; + hash = (53 * hash) + state_; + hash = (37 * hash) + ANSWER_TEXT_FIELD_NUMBER; + hash = (53 * hash) + getAnswerText().hashCode(); + if (hasGroundingScore()) { + hash = (37 * hash) + GROUNDING_SCORE_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getGroundingScore())); + } + if (getCitationsCount() > 0) { + hash = (37 * hash) + CITATIONS_FIELD_NUMBER; + hash = (53 * hash) + getCitationsList().hashCode(); + } + if (getGroundingSupportsCount() > 0) { + hash = (37 * hash) + GROUNDING_SUPPORTS_FIELD_NUMBER; + hash = (53 * hash) + getGroundingSupportsList().hashCode(); + } + if (getReferencesCount() > 0) { + hash = (37 * hash) + REFERENCES_FIELD_NUMBER; + hash = (53 * hash) + getReferencesList().hashCode(); + } + if (getBlobAttachmentsCount() > 0) { + hash = (37 * hash) + BLOB_ATTACHMENTS_FIELD_NUMBER; + hash = (53 * hash) + getBlobAttachmentsList().hashCode(); + } + if (getRelatedQuestionsCount() > 0) { + hash = (37 * hash) + RELATED_QUESTIONS_FIELD_NUMBER; + hash = (53 * hash) + getRelatedQuestionsList().hashCode(); + } + if (getStepsCount() > 0) { + hash = (37 * hash) + STEPS_FIELD_NUMBER; + hash = (53 * hash) + getStepsList().hashCode(); + } + if (hasQueryUnderstandingInfo()) { + hash = (37 * hash) + QUERY_UNDERSTANDING_INFO_FIELD_NUMBER; + hash = (53 * hash) + getQueryUnderstandingInfo().hashCode(); + } + if (getAnswerSkippedReasonsCount() > 0) { + hash = (37 * hash) + ANSWER_SKIPPED_REASONS_FIELD_NUMBER; + hash = (53 * hash) + answerSkippedReasons_.hashCode(); + } + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasCompleteTime()) { + hash = (37 * hash) + COMPLETE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCompleteTime().hashCode(); + } + if (getSafetyRatingsCount() > 0) { + hash = (37 * hash) + SAFETY_RATINGS_FIELD_NUMBER; + hash = (53 * hash) + getSafetyRatingsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; } - public static final int QUERY_UNDERSTANDING_INFO_FIELD_NUMBER = 10; - private com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo - queryUnderstandingInfo_; - - /** - * - * - *
            -   * Query understanding information.
            -   * 
            - * - * - * .google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo query_understanding_info = 10; - * - * - * @return Whether the queryUnderstandingInfo field is set. - */ - @java.lang.Override - public boolean hasQueryUnderstandingInfo() { - return ((bitField0_ & 0x00000001) != 0); + public static com.google.cloud.discoveryengine.v1beta.Answer parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); } - /** - * - * - *
            -   * Query understanding information.
            -   * 
            - * - * - * .google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo query_understanding_info = 10; - * - * - * @return The queryUnderstandingInfo. - */ - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo - getQueryUnderstandingInfo() { - return queryUnderstandingInfo_ == null - ? com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo.getDefaultInstance() - : queryUnderstandingInfo_; + public static com.google.cloud.discoveryengine.v1beta.Answer parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); } - /** - * - * - *
            -   * Query understanding information.
            -   * 
            - * - * - * .google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo query_understanding_info = 10; - * - */ - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfoOrBuilder - getQueryUnderstandingInfoOrBuilder() { - return queryUnderstandingInfo_ == null - ? com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo.getDefaultInstance() - : queryUnderstandingInfo_; + public static com.google.cloud.discoveryengine.v1beta.Answer parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); } - public static final int ANSWER_SKIPPED_REASONS_FIELD_NUMBER = 11; - - @SuppressWarnings("serial") - private com.google.protobuf.Internal.IntList answerSkippedReasons_ = emptyIntList(); - - private static final com.google.protobuf.Internal.IntListAdapter.IntConverter< - com.google.cloud.discoveryengine.v1beta.Answer.AnswerSkippedReason> - answerSkippedReasons_converter_ = - new com.google.protobuf.Internal.IntListAdapter.IntConverter< - com.google.cloud.discoveryengine.v1beta.Answer.AnswerSkippedReason>() { - public com.google.cloud.discoveryengine.v1beta.Answer.AnswerSkippedReason convert( - int from) { - com.google.cloud.discoveryengine.v1beta.Answer.AnswerSkippedReason result = - com.google.cloud.discoveryengine.v1beta.Answer.AnswerSkippedReason.forNumber( - from); - return result == null - ? com.google.cloud.discoveryengine.v1beta.Answer.AnswerSkippedReason.UNRECOGNIZED - : result; - } - }; - - /** - * - * - *
            -   * Additional answer-skipped reasons. This provides the reason for ignored
            -   * cases. If nothing is skipped, this field is not set.
            -   * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.Answer.AnswerSkippedReason answer_skipped_reasons = 11; - * - * - * @return A list containing the answerSkippedReasons. - */ - @java.lang.Override - public java.util.List - getAnswerSkippedReasonsList() { - return new com.google.protobuf.Internal.IntListAdapter< - com.google.cloud.discoveryengine.v1beta.Answer.AnswerSkippedReason>( - answerSkippedReasons_, answerSkippedReasons_converter_); + public static com.google.cloud.discoveryengine.v1beta.Answer parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); } - /** - * - * - *
            -   * Additional answer-skipped reasons. This provides the reason for ignored
            -   * cases. If nothing is skipped, this field is not set.
            -   * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.Answer.AnswerSkippedReason answer_skipped_reasons = 11; - * - * - * @return The count of answerSkippedReasons. - */ - @java.lang.Override - public int getAnswerSkippedReasonsCount() { - return answerSkippedReasons_.size(); + public static com.google.cloud.discoveryengine.v1beta.Answer parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); } - /** - * - * - *
            -   * Additional answer-skipped reasons. This provides the reason for ignored
            -   * cases. If nothing is skipped, this field is not set.
            -   * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.Answer.AnswerSkippedReason answer_skipped_reasons = 11; - * - * - * @param index The index of the element to return. - * @return The answerSkippedReasons at the given index. - */ - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.Answer.AnswerSkippedReason getAnswerSkippedReasons( - int index) { - return answerSkippedReasons_converter_.convert(answerSkippedReasons_.getInt(index)); + public static com.google.cloud.discoveryengine.v1beta.Answer parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); } - /** - * - * - *
            -   * Additional answer-skipped reasons. This provides the reason for ignored
            -   * cases. If nothing is skipped, this field is not set.
            -   * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.Answer.AnswerSkippedReason answer_skipped_reasons = 11; - * - * - * @return A list containing the enum numeric values on the wire for answerSkippedReasons. - */ - @java.lang.Override - public java.util.List getAnswerSkippedReasonsValueList() { - return answerSkippedReasons_; + public static com.google.cloud.discoveryengine.v1beta.Answer parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } - /** - * - * - *
            -   * Additional answer-skipped reasons. This provides the reason for ignored
            -   * cases. If nothing is skipped, this field is not set.
            -   * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.Answer.AnswerSkippedReason answer_skipped_reasons = 11; - * - * - * @param index The index of the value to return. - * @return The enum numeric value on the wire of answerSkippedReasons at the given index. - */ - @java.lang.Override - public int getAnswerSkippedReasonsValue(int index) { - return answerSkippedReasons_.getInt(index); + public static com.google.cloud.discoveryengine.v1beta.Answer parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); } - private int answerSkippedReasonsMemoizedSerializedSize; + public static com.google.cloud.discoveryengine.v1beta.Answer parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } - public static final int CREATE_TIME_FIELD_NUMBER = 8; - private com.google.protobuf.Timestamp createTime_; + public static com.google.cloud.discoveryengine.v1beta.Answer parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } - /** - * - * - *
            -   * Output only. Answer creation timestamp.
            -   * 
            - * - * .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the createTime field is set. - */ - @java.lang.Override - public boolean hasCreateTime() { - return ((bitField0_ & 0x00000002) != 0); + public static com.google.cloud.discoveryengine.v1beta.Answer parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } - /** - * - * - *
            -   * Output only. Answer creation timestamp.
            -   * 
            - * - * .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The createTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getCreateTime() { - return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + public static com.google.cloud.discoveryengine.v1beta.Answer parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); } - /** - * - * - *
            -   * Output only. Answer creation timestamp.
            -   * 
            - * - * .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { - return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + public Builder newBuilderForType() { + return newBuilder(); } - public static final int COMPLETE_TIME_FIELD_NUMBER = 9; - private com.google.protobuf.Timestamp completeTime_; + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.discoveryengine.v1beta.Answer prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } - /** - * - * - *
            -   * Output only. Answer completed timestamp.
            -   * 
            - * - * - * .google.protobuf.Timestamp complete_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the completeTime field is set. - */ @java.lang.Override - public boolean hasCompleteTime() { - return ((bitField0_ & 0x00000004) != 0); + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); } - /** - * - * - *
            -   * Output only. Answer completed timestamp.
            -   * 
            - * - * - * .google.protobuf.Timestamp complete_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The completeTime. - */ @java.lang.Override - public com.google.protobuf.Timestamp getCompleteTime() { - return completeTime_ == null - ? com.google.protobuf.Timestamp.getDefaultInstance() - : completeTime_; + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; } /** * * *
            -   * Output only. Answer completed timestamp.
            +   * Defines an answer.
                * 
            * - * - * .google.protobuf.Timestamp complete_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.Answer} */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getCompleteTimeOrBuilder() { - return completeTime_ == null - ? com.google.protobuf.Timestamp.getDefaultInstance() - : completeTime_; - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.Answer) + com.google.cloud.discoveryengine.v1beta.AnswerOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.AnswerProto + .internal_static_google_cloud_discoveryengine_v1beta_Answer_descriptor; + } - memoizedIsInitialized = 1; - return true; - } + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.AnswerProto + .internal_static_google_cloud_discoveryengine_v1beta_Answer_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.Answer.class, + com.google.cloud.discoveryengine.v1beta.Answer.Builder.class); + } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - getSerializedSize(); - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + // Construct using com.google.cloud.discoveryengine.v1beta.Answer.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); } - if (state_ - != com.google.cloud.discoveryengine.v1beta.Answer.State.STATE_UNSPECIFIED.getNumber()) { - output.writeEnum(2, state_); + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(answerText_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 3, answerText_); + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetCitationsFieldBuilder(); + internalGetGroundingSupportsFieldBuilder(); + internalGetReferencesFieldBuilder(); + internalGetBlobAttachmentsFieldBuilder(); + internalGetStepsFieldBuilder(); + internalGetQueryUnderstandingInfoFieldBuilder(); + internalGetCreateTimeFieldBuilder(); + internalGetCompleteTimeFieldBuilder(); + internalGetSafetyRatingsFieldBuilder(); + } } - for (int i = 0; i < citations_.size(); i++) { - output.writeMessage(4, citations_.get(i)); + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + state_ = 0; + answerText_ = ""; + groundingScore_ = 0D; + if (citationsBuilder_ == null) { + citations_ = java.util.Collections.emptyList(); + } else { + citations_ = null; + citationsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000010); + if (groundingSupportsBuilder_ == null) { + groundingSupports_ = java.util.Collections.emptyList(); + } else { + groundingSupports_ = null; + groundingSupportsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000020); + if (referencesBuilder_ == null) { + references_ = java.util.Collections.emptyList(); + } else { + references_ = null; + referencesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000040); + if (blobAttachmentsBuilder_ == null) { + blobAttachments_ = java.util.Collections.emptyList(); + } else { + blobAttachments_ = null; + blobAttachmentsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000080); + relatedQuestions_ = com.google.protobuf.LazyStringArrayList.emptyList(); + if (stepsBuilder_ == null) { + steps_ = java.util.Collections.emptyList(); + } else { + steps_ = null; + stepsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000200); + queryUnderstandingInfo_ = null; + if (queryUnderstandingInfoBuilder_ != null) { + queryUnderstandingInfoBuilder_.dispose(); + queryUnderstandingInfoBuilder_ = null; + } + answerSkippedReasons_ = emptyIntList(); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + completeTime_ = null; + if (completeTimeBuilder_ != null) { + completeTimeBuilder_.dispose(); + completeTimeBuilder_ = null; + } + if (safetyRatingsBuilder_ == null) { + safetyRatings_ = java.util.Collections.emptyList(); + } else { + safetyRatings_ = null; + safetyRatingsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00004000); + return this; } - for (int i = 0; i < references_.size(); i++) { - output.writeMessage(5, references_.get(i)); + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1beta.AnswerProto + .internal_static_google_cloud_discoveryengine_v1beta_Answer_descriptor; } - for (int i = 0; i < relatedQuestions_.size(); i++) { - com.google.protobuf.GeneratedMessage.writeString(output, 6, relatedQuestions_.getRaw(i)); + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Answer getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1beta.Answer.getDefaultInstance(); } - for (int i = 0; i < steps_.size(); i++) { - output.writeMessage(7, steps_.get(i)); + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Answer build() { + com.google.cloud.discoveryengine.v1beta.Answer result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; } - if (((bitField0_ & 0x00000002) != 0)) { - output.writeMessage(8, getCreateTime()); + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Answer buildPartial() { + com.google.cloud.discoveryengine.v1beta.Answer result = + new com.google.cloud.discoveryengine.v1beta.Answer(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; } - if (((bitField0_ & 0x00000004) != 0)) { - output.writeMessage(9, getCompleteTime()); + + private void buildPartialRepeatedFields(com.google.cloud.discoveryengine.v1beta.Answer result) { + if (citationsBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0)) { + citations_ = java.util.Collections.unmodifiableList(citations_); + bitField0_ = (bitField0_ & ~0x00000010); + } + result.citations_ = citations_; + } else { + result.citations_ = citationsBuilder_.build(); + } + if (groundingSupportsBuilder_ == null) { + if (((bitField0_ & 0x00000020) != 0)) { + groundingSupports_ = java.util.Collections.unmodifiableList(groundingSupports_); + bitField0_ = (bitField0_ & ~0x00000020); + } + result.groundingSupports_ = groundingSupports_; + } else { + result.groundingSupports_ = groundingSupportsBuilder_.build(); + } + if (referencesBuilder_ == null) { + if (((bitField0_ & 0x00000040) != 0)) { + references_ = java.util.Collections.unmodifiableList(references_); + bitField0_ = (bitField0_ & ~0x00000040); + } + result.references_ = references_; + } else { + result.references_ = referencesBuilder_.build(); + } + if (blobAttachmentsBuilder_ == null) { + if (((bitField0_ & 0x00000080) != 0)) { + blobAttachments_ = java.util.Collections.unmodifiableList(blobAttachments_); + bitField0_ = (bitField0_ & ~0x00000080); + } + result.blobAttachments_ = blobAttachments_; + } else { + result.blobAttachments_ = blobAttachmentsBuilder_.build(); + } + if (stepsBuilder_ == null) { + if (((bitField0_ & 0x00000200) != 0)) { + steps_ = java.util.Collections.unmodifiableList(steps_); + bitField0_ = (bitField0_ & ~0x00000200); + } + result.steps_ = steps_; + } else { + result.steps_ = stepsBuilder_.build(); + } + if (safetyRatingsBuilder_ == null) { + if (((bitField0_ & 0x00004000) != 0)) { + safetyRatings_ = java.util.Collections.unmodifiableList(safetyRatings_); + bitField0_ = (bitField0_ & ~0x00004000); + } + result.safetyRatings_ = safetyRatings_; + } else { + result.safetyRatings_ = safetyRatingsBuilder_.build(); + } } - if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(10, getQueryUnderstandingInfo()); + + private void buildPartial0(com.google.cloud.discoveryengine.v1beta.Answer result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.state_ = state_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.answerText_ = answerText_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000008) != 0)) { + result.groundingScore_ = groundingScore_; + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + relatedQuestions_.makeImmutable(); + result.relatedQuestions_ = relatedQuestions_; + } + if (((from_bitField0_ & 0x00000400) != 0)) { + result.queryUnderstandingInfo_ = + queryUnderstandingInfoBuilder_ == null + ? queryUnderstandingInfo_ + : queryUnderstandingInfoBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000800) != 0)) { + answerSkippedReasons_.makeImmutable(); + result.answerSkippedReasons_ = answerSkippedReasons_; + } + if (((from_bitField0_ & 0x00001000) != 0)) { + result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); + to_bitField0_ |= 0x00000004; + } + if (((from_bitField0_ & 0x00002000) != 0)) { + result.completeTime_ = + completeTimeBuilder_ == null ? completeTime_ : completeTimeBuilder_.build(); + to_bitField0_ |= 0x00000008; + } + result.bitField0_ |= to_bitField0_; } - if (getAnswerSkippedReasonsList().size() > 0) { - output.writeUInt32NoTag(90); - output.writeUInt32NoTag(answerSkippedReasonsMemoizedSerializedSize); + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.discoveryengine.v1beta.Answer) { + return mergeFrom((com.google.cloud.discoveryengine.v1beta.Answer) other); + } else { + super.mergeFrom(other); + return this; + } } - for (int i = 0; i < answerSkippedReasons_.size(); i++) { - output.writeEnumNoTag(answerSkippedReasons_.getInt(i)); + + public Builder mergeFrom(com.google.cloud.discoveryengine.v1beta.Answer other) { + if (other == com.google.cloud.discoveryengine.v1beta.Answer.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.state_ != 0) { + setStateValue(other.getStateValue()); + } + if (!other.getAnswerText().isEmpty()) { + answerText_ = other.answerText_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (other.hasGroundingScore()) { + setGroundingScore(other.getGroundingScore()); + } + if (citationsBuilder_ == null) { + if (!other.citations_.isEmpty()) { + if (citations_.isEmpty()) { + citations_ = other.citations_; + bitField0_ = (bitField0_ & ~0x00000010); + } else { + ensureCitationsIsMutable(); + citations_.addAll(other.citations_); + } + onChanged(); + } + } else { + if (!other.citations_.isEmpty()) { + if (citationsBuilder_.isEmpty()) { + citationsBuilder_.dispose(); + citationsBuilder_ = null; + citations_ = other.citations_; + bitField0_ = (bitField0_ & ~0x00000010); + citationsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetCitationsFieldBuilder() + : null; + } else { + citationsBuilder_.addAllMessages(other.citations_); + } + } + } + if (groundingSupportsBuilder_ == null) { + if (!other.groundingSupports_.isEmpty()) { + if (groundingSupports_.isEmpty()) { + groundingSupports_ = other.groundingSupports_; + bitField0_ = (bitField0_ & ~0x00000020); + } else { + ensureGroundingSupportsIsMutable(); + groundingSupports_.addAll(other.groundingSupports_); + } + onChanged(); + } + } else { + if (!other.groundingSupports_.isEmpty()) { + if (groundingSupportsBuilder_.isEmpty()) { + groundingSupportsBuilder_.dispose(); + groundingSupportsBuilder_ = null; + groundingSupports_ = other.groundingSupports_; + bitField0_ = (bitField0_ & ~0x00000020); + groundingSupportsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetGroundingSupportsFieldBuilder() + : null; + } else { + groundingSupportsBuilder_.addAllMessages(other.groundingSupports_); + } + } + } + if (referencesBuilder_ == null) { + if (!other.references_.isEmpty()) { + if (references_.isEmpty()) { + references_ = other.references_; + bitField0_ = (bitField0_ & ~0x00000040); + } else { + ensureReferencesIsMutable(); + references_.addAll(other.references_); + } + onChanged(); + } + } else { + if (!other.references_.isEmpty()) { + if (referencesBuilder_.isEmpty()) { + referencesBuilder_.dispose(); + referencesBuilder_ = null; + references_ = other.references_; + bitField0_ = (bitField0_ & ~0x00000040); + referencesBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetReferencesFieldBuilder() + : null; + } else { + referencesBuilder_.addAllMessages(other.references_); + } + } + } + if (blobAttachmentsBuilder_ == null) { + if (!other.blobAttachments_.isEmpty()) { + if (blobAttachments_.isEmpty()) { + blobAttachments_ = other.blobAttachments_; + bitField0_ = (bitField0_ & ~0x00000080); + } else { + ensureBlobAttachmentsIsMutable(); + blobAttachments_.addAll(other.blobAttachments_); + } + onChanged(); + } + } else { + if (!other.blobAttachments_.isEmpty()) { + if (blobAttachmentsBuilder_.isEmpty()) { + blobAttachmentsBuilder_.dispose(); + blobAttachmentsBuilder_ = null; + blobAttachments_ = other.blobAttachments_; + bitField0_ = (bitField0_ & ~0x00000080); + blobAttachmentsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetBlobAttachmentsFieldBuilder() + : null; + } else { + blobAttachmentsBuilder_.addAllMessages(other.blobAttachments_); + } + } + } + if (!other.relatedQuestions_.isEmpty()) { + if (relatedQuestions_.isEmpty()) { + relatedQuestions_ = other.relatedQuestions_; + bitField0_ |= 0x00000100; + } else { + ensureRelatedQuestionsIsMutable(); + relatedQuestions_.addAll(other.relatedQuestions_); + } + onChanged(); + } + if (stepsBuilder_ == null) { + if (!other.steps_.isEmpty()) { + if (steps_.isEmpty()) { + steps_ = other.steps_; + bitField0_ = (bitField0_ & ~0x00000200); + } else { + ensureStepsIsMutable(); + steps_.addAll(other.steps_); + } + onChanged(); + } + } else { + if (!other.steps_.isEmpty()) { + if (stepsBuilder_.isEmpty()) { + stepsBuilder_.dispose(); + stepsBuilder_ = null; + steps_ = other.steps_; + bitField0_ = (bitField0_ & ~0x00000200); + stepsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetStepsFieldBuilder() + : null; + } else { + stepsBuilder_.addAllMessages(other.steps_); + } + } + } + if (other.hasQueryUnderstandingInfo()) { + mergeQueryUnderstandingInfo(other.getQueryUnderstandingInfo()); + } + if (!other.answerSkippedReasons_.isEmpty()) { + if (answerSkippedReasons_.isEmpty()) { + answerSkippedReasons_ = other.answerSkippedReasons_; + answerSkippedReasons_.makeImmutable(); + bitField0_ |= 0x00000800; + } else { + ensureAnswerSkippedReasonsIsMutable(); + answerSkippedReasons_.addAll(other.answerSkippedReasons_); + } + onChanged(); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasCompleteTime()) { + mergeCompleteTime(other.getCompleteTime()); + } + if (safetyRatingsBuilder_ == null) { + if (!other.safetyRatings_.isEmpty()) { + if (safetyRatings_.isEmpty()) { + safetyRatings_ = other.safetyRatings_; + bitField0_ = (bitField0_ & ~0x00004000); + } else { + ensureSafetyRatingsIsMutable(); + safetyRatings_.addAll(other.safetyRatings_); + } + onChanged(); + } + } else { + if (!other.safetyRatings_.isEmpty()) { + if (safetyRatingsBuilder_.isEmpty()) { + safetyRatingsBuilder_.dispose(); + safetyRatingsBuilder_ = null; + safetyRatings_ = other.safetyRatings_; + bitField0_ = (bitField0_ & ~0x00004000); + safetyRatingsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetSafetyRatingsFieldBuilder() + : null; + } else { + safetyRatingsBuilder_.addAllMessages(other.safetyRatings_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; } - 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(name_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); - } - if (state_ - != com.google.cloud.discoveryengine.v1beta.Answer.State.STATE_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, state_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(answerText_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(3, answerText_); - } - for (int i = 0; i < citations_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, citations_.get(i)); + @java.lang.Override + public final boolean isInitialized() { + return true; } - for (int i = 0; i < references_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, references_.get(i)); + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + state_ = input.readEnum(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: + { + answerText_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + com.google.cloud.discoveryengine.v1beta.Answer.Citation m = + input.readMessage( + com.google.cloud.discoveryengine.v1beta.Answer.Citation.parser(), + extensionRegistry); + if (citationsBuilder_ == null) { + ensureCitationsIsMutable(); + citations_.add(m); + } else { + citationsBuilder_.addMessage(m); + } + break; + } // case 34 + case 42: + { + com.google.cloud.discoveryengine.v1beta.Answer.Reference m = + input.readMessage( + com.google.cloud.discoveryengine.v1beta.Answer.Reference.parser(), + extensionRegistry); + if (referencesBuilder_ == null) { + ensureReferencesIsMutable(); + references_.add(m); + } else { + referencesBuilder_.addMessage(m); + } + break; + } // case 42 + case 50: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureRelatedQuestionsIsMutable(); + relatedQuestions_.add(s); + break; + } // case 50 + case 58: + { + com.google.cloud.discoveryengine.v1beta.Answer.Step m = + input.readMessage( + com.google.cloud.discoveryengine.v1beta.Answer.Step.parser(), + extensionRegistry); + if (stepsBuilder_ == null) { + ensureStepsIsMutable(); + steps_.add(m); + } else { + stepsBuilder_.addMessage(m); + } + break; + } // case 58 + case 66: + { + input.readMessage( + internalGetCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00001000; + break; + } // case 66 + case 74: + { + input.readMessage( + internalGetCompleteTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00002000; + break; + } // case 74 + case 82: + { + input.readMessage( + internalGetQueryUnderstandingInfoFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000400; + break; + } // case 82 + case 88: + { + int tmpRaw = input.readEnum(); + ensureAnswerSkippedReasonsIsMutable(); + answerSkippedReasons_.addInt(tmpRaw); + break; + } // case 88 + case 90: + { + int length = input.readRawVarint32(); + int limit = input.pushLimit(length); + ensureAnswerSkippedReasonsIsMutable(); + while (input.getBytesUntilLimit() > 0) { + answerSkippedReasons_.addInt(input.readEnum()); + } + input.popLimit(limit); + break; + } // case 90 + case 97: + { + groundingScore_ = input.readDouble(); + bitField0_ |= 0x00000008; + break; + } // case 97 + case 106: + { + com.google.cloud.discoveryengine.v1beta.Answer.GroundingSupport m = + input.readMessage( + com.google.cloud.discoveryengine.v1beta.Answer.GroundingSupport.parser(), + extensionRegistry); + if (groundingSupportsBuilder_ == null) { + ensureGroundingSupportsIsMutable(); + groundingSupports_.add(m); + } else { + groundingSupportsBuilder_.addMessage(m); + } + break; + } // case 106 + case 114: + { + com.google.cloud.discoveryengine.v1beta.SafetyRating m = + input.readMessage( + com.google.cloud.discoveryengine.v1beta.SafetyRating.parser(), + extensionRegistry); + if (safetyRatingsBuilder_ == null) { + ensureSafetyRatingsIsMutable(); + safetyRatings_.add(m); + } else { + safetyRatingsBuilder_.addMessage(m); + } + break; + } // case 114 + case 122: + { + com.google.cloud.discoveryengine.v1beta.Answer.BlobAttachment m = + input.readMessage( + com.google.cloud.discoveryengine.v1beta.Answer.BlobAttachment.parser(), + extensionRegistry); + if (blobAttachmentsBuilder_ == null) { + ensureBlobAttachmentsIsMutable(); + blobAttachments_.add(m); + } else { + blobAttachmentsBuilder_.addMessage(m); + } + break; + } // case 122 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; } - { - int dataSize = 0; - for (int i = 0; i < relatedQuestions_.size(); i++) { - dataSize += computeStringSizeNoTag(relatedQuestions_.getRaw(i)); + + private int bitField0_; + + private java.lang.Object name_ = ""; + + /** + * + * + *
            +     * Immutable. Fully qualified name
            +     * `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*/answers/*`
            +     * 
            + * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; } - size += dataSize; - size += 1 * getRelatedQuestionsList().size(); - } - for (int i = 0; i < steps_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, steps_.get(i)); - } - if (((bitField0_ & 0x00000002) != 0)) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, getCreateTime()); - } - if (((bitField0_ & 0x00000004) != 0)) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(9, getCompleteTime()); - } - if (((bitField0_ & 0x00000001) != 0)) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize(10, getQueryUnderstandingInfo()); } - { - int dataSize = 0; - for (int i = 0; i < answerSkippedReasons_.size(); i++) { - dataSize += - com.google.protobuf.CodedOutputStream.computeEnumSizeNoTag( - answerSkippedReasons_.getInt(i)); - } - size += dataSize; - if (!getAnswerSkippedReasonsList().isEmpty()) { - size += 1; - size += com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(dataSize); + + /** + * + * + *
            +     * Immutable. Fully qualified name
            +     * `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*/answers/*`
            +     * 
            + * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; } - answerSkippedReasonsMemoizedSerializedSize = dataSize; } - 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.discoveryengine.v1beta.Answer)) { - return super.equals(obj); + /** + * + * + *
            +     * Immutable. Fully qualified name
            +     * `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*/answers/*`
            +     * 
            + * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; } - com.google.cloud.discoveryengine.v1beta.Answer other = - (com.google.cloud.discoveryengine.v1beta.Answer) obj; - if (!getName().equals(other.getName())) return false; - if (state_ != other.state_) return false; - if (!getAnswerText().equals(other.getAnswerText())) return false; - if (!getCitationsList().equals(other.getCitationsList())) return false; - if (!getReferencesList().equals(other.getReferencesList())) return false; - if (!getRelatedQuestionsList().equals(other.getRelatedQuestionsList())) return false; - if (!getStepsList().equals(other.getStepsList())) return false; - if (hasQueryUnderstandingInfo() != other.hasQueryUnderstandingInfo()) return false; - if (hasQueryUnderstandingInfo()) { - if (!getQueryUnderstandingInfo().equals(other.getQueryUnderstandingInfo())) return false; - } - if (!answerSkippedReasons_.equals(other.answerSkippedReasons_)) return false; - if (hasCreateTime() != other.hasCreateTime()) return false; - if (hasCreateTime()) { - if (!getCreateTime().equals(other.getCreateTime())) return false; - } - if (hasCompleteTime() != other.hasCompleteTime()) return false; - if (hasCompleteTime()) { - if (!getCompleteTime().equals(other.getCompleteTime())) return false; + /** + * + * + *
            +     * Immutable. Fully qualified name
            +     * `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*/answers/*`
            +     * 
            + * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; } - 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) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (37 * hash) + STATE_FIELD_NUMBER; - hash = (53 * hash) + state_; - hash = (37 * hash) + ANSWER_TEXT_FIELD_NUMBER; - hash = (53 * hash) + getAnswerText().hashCode(); - if (getCitationsCount() > 0) { - hash = (37 * hash) + CITATIONS_FIELD_NUMBER; - hash = (53 * hash) + getCitationsList().hashCode(); - } - if (getReferencesCount() > 0) { - hash = (37 * hash) + REFERENCES_FIELD_NUMBER; - hash = (53 * hash) + getReferencesList().hashCode(); + /** + * + * + *
            +     * Immutable. Fully qualified name
            +     * `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*/answers/*`
            +     * 
            + * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; } - if (getRelatedQuestionsCount() > 0) { - hash = (37 * hash) + RELATED_QUESTIONS_FIELD_NUMBER; - hash = (53 * hash) + getRelatedQuestionsList().hashCode(); + + private int state_ = 0; + + /** + * + * + *
            +     * The state of the answer generation.
            +     * 
            + * + * .google.cloud.discoveryengine.v1beta.Answer.State state = 2; + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; } - if (getStepsCount() > 0) { - hash = (37 * hash) + STEPS_FIELD_NUMBER; - hash = (53 * hash) + getStepsList().hashCode(); + + /** + * + * + *
            +     * The state of the answer generation.
            +     * 
            + * + * .google.cloud.discoveryengine.v1beta.Answer.State state = 2; + * + * @param value The enum numeric value on the wire for state to set. + * @return This builder for chaining. + */ + public Builder setStateValue(int value) { + state_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; } - if (hasQueryUnderstandingInfo()) { - hash = (37 * hash) + QUERY_UNDERSTANDING_INFO_FIELD_NUMBER; - hash = (53 * hash) + getQueryUnderstandingInfo().hashCode(); + + /** + * + * + *
            +     * The state of the answer generation.
            +     * 
            + * + * .google.cloud.discoveryengine.v1beta.Answer.State state = 2; + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Answer.State getState() { + com.google.cloud.discoveryengine.v1beta.Answer.State result = + com.google.cloud.discoveryengine.v1beta.Answer.State.forNumber(state_); + return result == null + ? com.google.cloud.discoveryengine.v1beta.Answer.State.UNRECOGNIZED + : result; } - if (getAnswerSkippedReasonsCount() > 0) { - hash = (37 * hash) + ANSWER_SKIPPED_REASONS_FIELD_NUMBER; - hash = (53 * hash) + answerSkippedReasons_.hashCode(); + + /** + * + * + *
            +     * The state of the answer generation.
            +     * 
            + * + * .google.cloud.discoveryengine.v1beta.Answer.State state = 2; + * + * @param value The state to set. + * @return This builder for chaining. + */ + public Builder setState(com.google.cloud.discoveryengine.v1beta.Answer.State value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + state_ = value.getNumber(); + onChanged(); + return this; } - if (hasCreateTime()) { - hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; - hash = (53 * hash) + getCreateTime().hashCode(); + + /** + * + * + *
            +     * The state of the answer generation.
            +     * 
            + * + * .google.cloud.discoveryengine.v1beta.Answer.State state = 2; + * + * @return This builder for chaining. + */ + public Builder clearState() { + bitField0_ = (bitField0_ & ~0x00000002); + state_ = 0; + onChanged(); + return this; } - if (hasCompleteTime()) { - hash = (37 * hash) + COMPLETE_TIME_FIELD_NUMBER; - hash = (53 * hash) + getCompleteTime().hashCode(); + + private java.lang.Object answerText_ = ""; + + /** + * + * + *
            +     * The textual answer.
            +     * 
            + * + * string answer_text = 3; + * + * @return The answerText. + */ + public java.lang.String getAnswerText() { + java.lang.Object ref = answerText_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + answerText_ = s; + return s; + } else { + return (java.lang.String) ref; + } } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - public static com.google.cloud.discoveryengine.v1beta.Answer parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } + /** + * + * + *
            +     * The textual answer.
            +     * 
            + * + * string answer_text = 3; + * + * @return The bytes for answerText. + */ + public com.google.protobuf.ByteString getAnswerTextBytes() { + java.lang.Object ref = answerText_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + answerText_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } - public static com.google.cloud.discoveryengine.v1beta.Answer parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } + /** + * + * + *
            +     * The textual answer.
            +     * 
            + * + * string answer_text = 3; + * + * @param value The answerText to set. + * @return This builder for chaining. + */ + public Builder setAnswerText(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + answerText_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } - public static com.google.cloud.discoveryengine.v1beta.Answer parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } + /** + * + * + *
            +     * The textual answer.
            +     * 
            + * + * string answer_text = 3; + * + * @return This builder for chaining. + */ + public Builder clearAnswerText() { + answerText_ = getDefaultInstance().getAnswerText(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } - public static com.google.cloud.discoveryengine.v1beta.Answer parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } + /** + * + * + *
            +     * The textual answer.
            +     * 
            + * + * string answer_text = 3; + * + * @param value The bytes for answerText to set. + * @return This builder for chaining. + */ + public Builder setAnswerTextBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + answerText_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } - public static com.google.cloud.discoveryengine.v1beta.Answer parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } + private double groundingScore_; - public static com.google.cloud.discoveryengine.v1beta.Answer parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } + /** + * + * + *
            +     * A score in the range of [0, 1] describing how grounded the answer is by the
            +     * reference chunks.
            +     * 
            + * + * optional double grounding_score = 12; + * + * @return Whether the groundingScore field is set. + */ + @java.lang.Override + public boolean hasGroundingScore() { + return ((bitField0_ & 0x00000008) != 0); + } - public static com.google.cloud.discoveryengine.v1beta.Answer parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } + /** + * + * + *
            +     * A score in the range of [0, 1] describing how grounded the answer is by the
            +     * reference chunks.
            +     * 
            + * + * optional double grounding_score = 12; + * + * @return The groundingScore. + */ + @java.lang.Override + public double getGroundingScore() { + return groundingScore_; + } - public static com.google.cloud.discoveryengine.v1beta.Answer parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } + /** + * + * + *
            +     * A score in the range of [0, 1] describing how grounded the answer is by the
            +     * reference chunks.
            +     * 
            + * + * optional double grounding_score = 12; + * + * @param value The groundingScore to set. + * @return This builder for chaining. + */ + public Builder setGroundingScore(double value) { - public static com.google.cloud.discoveryengine.v1beta.Answer parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } + groundingScore_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } - public static com.google.cloud.discoveryengine.v1beta.Answer parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } + /** + * + * + *
            +     * A score in the range of [0, 1] describing how grounded the answer is by the
            +     * reference chunks.
            +     * 
            + * + * optional double grounding_score = 12; + * + * @return This builder for chaining. + */ + public Builder clearGroundingScore() { + bitField0_ = (bitField0_ & ~0x00000008); + groundingScore_ = 0D; + onChanged(); + return this; + } - public static com.google.cloud.discoveryengine.v1beta.Answer parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } + private java.util.List citations_ = + java.util.Collections.emptyList(); - public static com.google.cloud.discoveryengine.v1beta.Answer parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } + private void ensureCitationsIsMutable() { + if (!((bitField0_ & 0x00000010) != 0)) { + citations_ = + new java.util.ArrayList( + citations_); + bitField0_ |= 0x00000010; + } + } - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.discoveryengine.v1beta.Answer.Citation, + com.google.cloud.discoveryengine.v1beta.Answer.Citation.Builder, + com.google.cloud.discoveryengine.v1beta.Answer.CitationOrBuilder> + citationsBuilder_; - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } + /** + * + * + *
            +     * Citations.
            +     * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.Citation citations = 4; + */ + public java.util.List + getCitationsList() { + if (citationsBuilder_ == null) { + return java.util.Collections.unmodifiableList(citations_); + } else { + return citationsBuilder_.getMessageList(); + } + } - public static Builder newBuilder(com.google.cloud.discoveryengine.v1beta.Answer prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } + /** + * + * + *
            +     * Citations.
            +     * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.Citation citations = 4; + */ + public int getCitationsCount() { + if (citationsBuilder_ == null) { + return citations_.size(); + } else { + return citationsBuilder_.getCount(); + } + } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } + /** + * + * + *
            +     * Citations.
            +     * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.Citation citations = 4; + */ + public com.google.cloud.discoveryengine.v1beta.Answer.Citation getCitations(int index) { + if (citationsBuilder_ == null) { + return citations_.get(index); + } else { + return citationsBuilder_.getMessage(index); + } + } - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } + /** + * + * + *
            +     * Citations.
            +     * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.Citation citations = 4; + */ + public Builder setCitations( + int index, com.google.cloud.discoveryengine.v1beta.Answer.Citation value) { + if (citationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCitationsIsMutable(); + citations_.set(index, value); + onChanged(); + } else { + citationsBuilder_.setMessage(index, value); + } + return this; + } - /** - * - * - *
            -   * Defines an answer.
            -   * 
            - * - * Protobuf type {@code google.cloud.discoveryengine.v1beta.Answer} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.Answer) - com.google.cloud.discoveryengine.v1beta.AnswerOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.discoveryengine.v1beta.AnswerProto - .internal_static_google_cloud_discoveryengine_v1beta_Answer_descriptor; + /** + * + * + *
            +     * Citations.
            +     * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.Citation citations = 4; + */ + public Builder setCitations( + int index, + com.google.cloud.discoveryengine.v1beta.Answer.Citation.Builder builderForValue) { + if (citationsBuilder_ == null) { + ensureCitationsIsMutable(); + citations_.set(index, builderForValue.build()); + onChanged(); + } else { + citationsBuilder_.setMessage(index, builderForValue.build()); + } + return this; } - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.discoveryengine.v1beta.AnswerProto - .internal_static_google_cloud_discoveryengine_v1beta_Answer_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.discoveryengine.v1beta.Answer.class, - com.google.cloud.discoveryengine.v1beta.Answer.Builder.class); + /** + * + * + *
            +     * Citations.
            +     * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.Citation citations = 4; + */ + public Builder addCitations(com.google.cloud.discoveryengine.v1beta.Answer.Citation value) { + if (citationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCitationsIsMutable(); + citations_.add(value); + onChanged(); + } else { + citationsBuilder_.addMessage(value); + } + return this; } - // Construct using com.google.cloud.discoveryengine.v1beta.Answer.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); + /** + * + * + *
            +     * Citations.
            +     * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.Citation citations = 4; + */ + public Builder addCitations( + int index, com.google.cloud.discoveryengine.v1beta.Answer.Citation value) { + if (citationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCitationsIsMutable(); + citations_.add(index, value); + onChanged(); + } else { + citationsBuilder_.addMessage(index, value); + } + return this; } - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); + /** + * + * + *
            +     * Citations.
            +     * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.Citation citations = 4; + */ + public Builder addCitations( + com.google.cloud.discoveryengine.v1beta.Answer.Citation.Builder builderForValue) { + if (citationsBuilder_ == null) { + ensureCitationsIsMutable(); + citations_.add(builderForValue.build()); + onChanged(); + } else { + citationsBuilder_.addMessage(builderForValue.build()); + } + return this; } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - internalGetCitationsFieldBuilder(); - internalGetReferencesFieldBuilder(); - internalGetStepsFieldBuilder(); - internalGetQueryUnderstandingInfoFieldBuilder(); - internalGetCreateTimeFieldBuilder(); - internalGetCompleteTimeFieldBuilder(); + /** + * + * + *
            +     * Citations.
            +     * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.Citation citations = 4; + */ + public Builder addCitations( + int index, + com.google.cloud.discoveryengine.v1beta.Answer.Citation.Builder builderForValue) { + if (citationsBuilder_ == null) { + ensureCitationsIsMutable(); + citations_.add(index, builderForValue.build()); + onChanged(); + } else { + citationsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
            +     * Citations.
            +     * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.Citation citations = 4; + */ + public Builder addAllCitations( + java.lang.Iterable + values) { + if (citationsBuilder_ == null) { + ensureCitationsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, citations_); + onChanged(); + } else { + citationsBuilder_.addAllMessages(values); } + return this; } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - name_ = ""; - state_ = 0; - answerText_ = ""; + /** + * + * + *
            +     * Citations.
            +     * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.Citation citations = 4; + */ + public Builder clearCitations() { if (citationsBuilder_ == null) { citations_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); } else { - citations_ = null; citationsBuilder_.clear(); } - bitField0_ = (bitField0_ & ~0x00000008); - if (referencesBuilder_ == null) { - references_ = java.util.Collections.emptyList(); + return this; + } + + /** + * + * + *
            +     * Citations.
            +     * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.Citation citations = 4; + */ + public Builder removeCitations(int index) { + if (citationsBuilder_ == null) { + ensureCitationsIsMutable(); + citations_.remove(index); + onChanged(); } else { - references_ = null; - referencesBuilder_.clear(); + citationsBuilder_.remove(index); } - bitField0_ = (bitField0_ & ~0x00000010); - relatedQuestions_ = com.google.protobuf.LazyStringArrayList.emptyList(); - if (stepsBuilder_ == null) { - steps_ = java.util.Collections.emptyList(); + return this; + } + + /** + * + * + *
            +     * Citations.
            +     * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.Citation citations = 4; + */ + public com.google.cloud.discoveryengine.v1beta.Answer.Citation.Builder getCitationsBuilder( + int index) { + return internalGetCitationsFieldBuilder().getBuilder(index); + } + + /** + * + * + *
            +     * Citations.
            +     * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.Citation citations = 4; + */ + public com.google.cloud.discoveryengine.v1beta.Answer.CitationOrBuilder getCitationsOrBuilder( + int index) { + if (citationsBuilder_ == null) { + return citations_.get(index); } else { - steps_ = null; - stepsBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000040); - queryUnderstandingInfo_ = null; - if (queryUnderstandingInfoBuilder_ != null) { - queryUnderstandingInfoBuilder_.dispose(); - queryUnderstandingInfoBuilder_ = null; - } - answerSkippedReasons_ = emptyIntList(); - createTime_ = null; - if (createTimeBuilder_ != null) { - createTimeBuilder_.dispose(); - createTimeBuilder_ = null; + return citationsBuilder_.getMessageOrBuilder(index); } - completeTime_ = null; - if (completeTimeBuilder_ != null) { - completeTimeBuilder_.dispose(); - completeTimeBuilder_ = null; + } + + /** + * + * + *
            +     * Citations.
            +     * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.Citation citations = 4; + */ + public java.util.List< + ? extends com.google.cloud.discoveryengine.v1beta.Answer.CitationOrBuilder> + getCitationsOrBuilderList() { + if (citationsBuilder_ != null) { + return citationsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(citations_); } - return this; } - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.discoveryengine.v1beta.AnswerProto - .internal_static_google_cloud_discoveryengine_v1beta_Answer_descriptor; + /** + * + * + *
            +     * Citations.
            +     * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.Citation citations = 4; + */ + public com.google.cloud.discoveryengine.v1beta.Answer.Citation.Builder addCitationsBuilder() { + return internalGetCitationsFieldBuilder() + .addBuilder(com.google.cloud.discoveryengine.v1beta.Answer.Citation.getDefaultInstance()); } - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.Answer getDefaultInstanceForType() { - return com.google.cloud.discoveryengine.v1beta.Answer.getDefaultInstance(); + /** + * + * + *
            +     * Citations.
            +     * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.Citation citations = 4; + */ + public com.google.cloud.discoveryengine.v1beta.Answer.Citation.Builder addCitationsBuilder( + int index) { + return internalGetCitationsFieldBuilder() + .addBuilder( + index, com.google.cloud.discoveryengine.v1beta.Answer.Citation.getDefaultInstance()); } - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.Answer build() { - com.google.cloud.discoveryengine.v1beta.Answer result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; + /** + * + * + *
            +     * Citations.
            +     * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.Citation citations = 4; + */ + public java.util.List + getCitationsBuilderList() { + return internalGetCitationsFieldBuilder().getBuilderList(); } - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.Answer buildPartial() { - com.google.cloud.discoveryengine.v1beta.Answer result = - new com.google.cloud.discoveryengine.v1beta.Answer(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { - buildPartial0(result); + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.discoveryengine.v1beta.Answer.Citation, + com.google.cloud.discoveryengine.v1beta.Answer.Citation.Builder, + com.google.cloud.discoveryengine.v1beta.Answer.CitationOrBuilder> + internalGetCitationsFieldBuilder() { + if (citationsBuilder_ == null) { + citationsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.discoveryengine.v1beta.Answer.Citation, + com.google.cloud.discoveryengine.v1beta.Answer.Citation.Builder, + com.google.cloud.discoveryengine.v1beta.Answer.CitationOrBuilder>( + citations_, ((bitField0_ & 0x00000010) != 0), getParentForChildren(), isClean()); + citations_ = null; } - onBuilt(); - return result; + return citationsBuilder_; } - private void buildPartialRepeatedFields(com.google.cloud.discoveryengine.v1beta.Answer result) { - if (citationsBuilder_ == null) { - if (((bitField0_ & 0x00000008) != 0)) { - citations_ = java.util.Collections.unmodifiableList(citations_); - bitField0_ = (bitField0_ & ~0x00000008); - } - result.citations_ = citations_; - } else { - result.citations_ = citationsBuilder_.build(); + private java.util.List + groundingSupports_ = java.util.Collections.emptyList(); + + private void ensureGroundingSupportsIsMutable() { + if (!((bitField0_ & 0x00000020) != 0)) { + groundingSupports_ = + new java.util.ArrayList< + com.google.cloud.discoveryengine.v1beta.Answer.GroundingSupport>( + groundingSupports_); + bitField0_ |= 0x00000020; } - if (referencesBuilder_ == null) { - if (((bitField0_ & 0x00000010) != 0)) { - references_ = java.util.Collections.unmodifiableList(references_); - bitField0_ = (bitField0_ & ~0x00000010); - } - result.references_ = references_; + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.discoveryengine.v1beta.Answer.GroundingSupport, + com.google.cloud.discoveryengine.v1beta.Answer.GroundingSupport.Builder, + com.google.cloud.discoveryengine.v1beta.Answer.GroundingSupportOrBuilder> + groundingSupportsBuilder_; + + /** + * + * + *
            +     * Optional. Grounding supports.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.GroundingSupport grounding_supports = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getGroundingSupportsList() { + if (groundingSupportsBuilder_ == null) { + return java.util.Collections.unmodifiableList(groundingSupports_); } else { - result.references_ = referencesBuilder_.build(); + return groundingSupportsBuilder_.getMessageList(); } - if (stepsBuilder_ == null) { - if (((bitField0_ & 0x00000040) != 0)) { - steps_ = java.util.Collections.unmodifiableList(steps_); - bitField0_ = (bitField0_ & ~0x00000040); - } - result.steps_ = steps_; + } + + /** + * + * + *
            +     * Optional. Grounding supports.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.GroundingSupport grounding_supports = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public int getGroundingSupportsCount() { + if (groundingSupportsBuilder_ == null) { + return groundingSupports_.size(); } else { - result.steps_ = stepsBuilder_.build(); + return groundingSupportsBuilder_.getCount(); } } - private void buildPartial0(com.google.cloud.discoveryengine.v1beta.Answer result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.name_ = name_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.state_ = state_; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.answerText_ = answerText_; - } - if (((from_bitField0_ & 0x00000020) != 0)) { - relatedQuestions_.makeImmutable(); - result.relatedQuestions_ = relatedQuestions_; - } - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000080) != 0)) { - result.queryUnderstandingInfo_ = - queryUnderstandingInfoBuilder_ == null - ? queryUnderstandingInfo_ - : queryUnderstandingInfoBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - if (((from_bitField0_ & 0x00000100) != 0)) { - answerSkippedReasons_.makeImmutable(); - result.answerSkippedReasons_ = answerSkippedReasons_; - } - if (((from_bitField0_ & 0x00000200) != 0)) { - result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); - to_bitField0_ |= 0x00000002; - } - if (((from_bitField0_ & 0x00000400) != 0)) { - result.completeTime_ = - completeTimeBuilder_ == null ? completeTime_ : completeTimeBuilder_.build(); - to_bitField0_ |= 0x00000004; + /** + * + * + *
            +     * Optional. Grounding supports.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.GroundingSupport grounding_supports = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.discoveryengine.v1beta.Answer.GroundingSupport getGroundingSupports( + int index) { + if (groundingSupportsBuilder_ == null) { + return groundingSupports_.get(index); + } else { + return groundingSupportsBuilder_.getMessage(index); } - result.bitField0_ |= to_bitField0_; } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.discoveryengine.v1beta.Answer) { - return mergeFrom((com.google.cloud.discoveryengine.v1beta.Answer) other); + /** + * + * + *
            +     * Optional. Grounding supports.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.GroundingSupport grounding_supports = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setGroundingSupports( + int index, com.google.cloud.discoveryengine.v1beta.Answer.GroundingSupport value) { + if (groundingSupportsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureGroundingSupportsIsMutable(); + groundingSupports_.set(index, value); + onChanged(); } else { - super.mergeFrom(other); - return this; + groundingSupportsBuilder_.setMessage(index, value); } + return this; } - public Builder mergeFrom(com.google.cloud.discoveryengine.v1beta.Answer other) { - if (other == com.google.cloud.discoveryengine.v1beta.Answer.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - bitField0_ |= 0x00000001; + /** + * + * + *
            +     * Optional. Grounding supports.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.GroundingSupport grounding_supports = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setGroundingSupports( + int index, + com.google.cloud.discoveryengine.v1beta.Answer.GroundingSupport.Builder builderForValue) { + if (groundingSupportsBuilder_ == null) { + ensureGroundingSupportsIsMutable(); + groundingSupports_.set(index, builderForValue.build()); onChanged(); + } else { + groundingSupportsBuilder_.setMessage(index, builderForValue.build()); } - if (other.state_ != 0) { - setStateValue(other.getStateValue()); - } - if (!other.getAnswerText().isEmpty()) { - answerText_ = other.answerText_; - bitField0_ |= 0x00000004; + return this; + } + + /** + * + * + *
            +     * Optional. Grounding supports.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.GroundingSupport grounding_supports = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addGroundingSupports( + com.google.cloud.discoveryengine.v1beta.Answer.GroundingSupport value) { + if (groundingSupportsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureGroundingSupportsIsMutable(); + groundingSupports_.add(value); onChanged(); + } else { + groundingSupportsBuilder_.addMessage(value); } - if (citationsBuilder_ == null) { - if (!other.citations_.isEmpty()) { - if (citations_.isEmpty()) { - citations_ = other.citations_; - bitField0_ = (bitField0_ & ~0x00000008); - } else { - ensureCitationsIsMutable(); - citations_.addAll(other.citations_); - } - onChanged(); + return this; + } + + /** + * + * + *
            +     * Optional. Grounding supports.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.GroundingSupport grounding_supports = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addGroundingSupports( + int index, com.google.cloud.discoveryengine.v1beta.Answer.GroundingSupport value) { + if (groundingSupportsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); } + ensureGroundingSupportsIsMutable(); + groundingSupports_.add(index, value); + onChanged(); } else { - if (!other.citations_.isEmpty()) { - if (citationsBuilder_.isEmpty()) { - citationsBuilder_.dispose(); - citationsBuilder_ = null; - citations_ = other.citations_; - bitField0_ = (bitField0_ & ~0x00000008); - citationsBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders - ? internalGetCitationsFieldBuilder() - : null; - } else { - citationsBuilder_.addAllMessages(other.citations_); - } - } + groundingSupportsBuilder_.addMessage(index, value); } - if (referencesBuilder_ == null) { - if (!other.references_.isEmpty()) { - if (references_.isEmpty()) { - references_ = other.references_; - bitField0_ = (bitField0_ & ~0x00000010); - } else { - ensureReferencesIsMutable(); - references_.addAll(other.references_); - } - onChanged(); - } + return this; + } + + /** + * + * + *
            +     * Optional. Grounding supports.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.GroundingSupport grounding_supports = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addGroundingSupports( + com.google.cloud.discoveryengine.v1beta.Answer.GroundingSupport.Builder builderForValue) { + if (groundingSupportsBuilder_ == null) { + ensureGroundingSupportsIsMutable(); + groundingSupports_.add(builderForValue.build()); + onChanged(); } else { - if (!other.references_.isEmpty()) { - if (referencesBuilder_.isEmpty()) { - referencesBuilder_.dispose(); - referencesBuilder_ = null; - references_ = other.references_; - bitField0_ = (bitField0_ & ~0x00000010); - referencesBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders - ? internalGetReferencesFieldBuilder() - : null; - } else { - referencesBuilder_.addAllMessages(other.references_); - } - } + groundingSupportsBuilder_.addMessage(builderForValue.build()); } - if (!other.relatedQuestions_.isEmpty()) { - if (relatedQuestions_.isEmpty()) { - relatedQuestions_ = other.relatedQuestions_; - bitField0_ |= 0x00000020; - } else { - ensureRelatedQuestionsIsMutable(); - relatedQuestions_.addAll(other.relatedQuestions_); - } + return this; + } + + /** + * + * + *
            +     * Optional. Grounding supports.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.GroundingSupport grounding_supports = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addGroundingSupports( + int index, + com.google.cloud.discoveryengine.v1beta.Answer.GroundingSupport.Builder builderForValue) { + if (groundingSupportsBuilder_ == null) { + ensureGroundingSupportsIsMutable(); + groundingSupports_.add(index, builderForValue.build()); onChanged(); + } else { + groundingSupportsBuilder_.addMessage(index, builderForValue.build()); } - if (stepsBuilder_ == null) { - if (!other.steps_.isEmpty()) { - if (steps_.isEmpty()) { - steps_ = other.steps_; - bitField0_ = (bitField0_ & ~0x00000040); - } else { - ensureStepsIsMutable(); - steps_.addAll(other.steps_); - } - onChanged(); - } + return this; + } + + /** + * + * + *
            +     * Optional. Grounding supports.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.GroundingSupport grounding_supports = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addAllGroundingSupports( + java.lang.Iterable< + ? extends com.google.cloud.discoveryengine.v1beta.Answer.GroundingSupport> + values) { + if (groundingSupportsBuilder_ == null) { + ensureGroundingSupportsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, groundingSupports_); + onChanged(); } else { - if (!other.steps_.isEmpty()) { - if (stepsBuilder_.isEmpty()) { - stepsBuilder_.dispose(); - stepsBuilder_ = null; - steps_ = other.steps_; - bitField0_ = (bitField0_ & ~0x00000040); - stepsBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders - ? internalGetStepsFieldBuilder() - : null; - } else { - stepsBuilder_.addAllMessages(other.steps_); - } - } + groundingSupportsBuilder_.addAllMessages(values); } - if (other.hasQueryUnderstandingInfo()) { - mergeQueryUnderstandingInfo(other.getQueryUnderstandingInfo()); + return this; + } + + /** + * + * + *
            +     * Optional. Grounding supports.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.GroundingSupport grounding_supports = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearGroundingSupports() { + if (groundingSupportsBuilder_ == null) { + groundingSupports_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + } else { + groundingSupportsBuilder_.clear(); } - if (!other.answerSkippedReasons_.isEmpty()) { - if (answerSkippedReasons_.isEmpty()) { - answerSkippedReasons_ = other.answerSkippedReasons_; - answerSkippedReasons_.makeImmutable(); - bitField0_ |= 0x00000100; - } else { - ensureAnswerSkippedReasonsIsMutable(); - answerSkippedReasons_.addAll(other.answerSkippedReasons_); - } + return this; + } + + /** + * + * + *
            +     * Optional. Grounding supports.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.GroundingSupport grounding_supports = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder removeGroundingSupports(int index) { + if (groundingSupportsBuilder_ == null) { + ensureGroundingSupportsIsMutable(); + groundingSupports_.remove(index); onChanged(); + } else { + groundingSupportsBuilder_.remove(index); } - if (other.hasCreateTime()) { - mergeCreateTime(other.getCreateTime()); + return this; + } + + /** + * + * + *
            +     * Optional. Grounding supports.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.GroundingSupport grounding_supports = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.discoveryengine.v1beta.Answer.GroundingSupport.Builder + getGroundingSupportsBuilder(int index) { + return internalGetGroundingSupportsFieldBuilder().getBuilder(index); + } + + /** + * + * + *
            +     * Optional. Grounding supports.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.GroundingSupport grounding_supports = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.discoveryengine.v1beta.Answer.GroundingSupportOrBuilder + getGroundingSupportsOrBuilder(int index) { + if (groundingSupportsBuilder_ == null) { + return groundingSupports_.get(index); + } else { + return groundingSupportsBuilder_.getMessageOrBuilder(index); } - if (other.hasCompleteTime()) { - mergeCompleteTime(other.getCompleteTime()); + } + + /** + * + * + *
            +     * Optional. Grounding supports.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.GroundingSupport grounding_supports = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List< + ? extends com.google.cloud.discoveryengine.v1beta.Answer.GroundingSupportOrBuilder> + getGroundingSupportsOrBuilderList() { + if (groundingSupportsBuilder_ != null) { + return groundingSupportsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(groundingSupports_); } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; } - @java.lang.Override - public final boolean isInitialized() { - return true; + /** + * + * + *
            +     * Optional. Grounding supports.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.GroundingSupport grounding_supports = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.discoveryengine.v1beta.Answer.GroundingSupport.Builder + addGroundingSupportsBuilder() { + return internalGetGroundingSupportsFieldBuilder() + .addBuilder( + com.google.cloud.discoveryengine.v1beta.Answer.GroundingSupport.getDefaultInstance()); } - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); + /** + * + * + *
            +     * Optional. Grounding supports.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.GroundingSupport grounding_supports = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.discoveryengine.v1beta.Answer.GroundingSupport.Builder + addGroundingSupportsBuilder(int index) { + return internalGetGroundingSupportsFieldBuilder() + .addBuilder( + index, + com.google.cloud.discoveryengine.v1beta.Answer.GroundingSupport.getDefaultInstance()); + } + + /** + * + * + *
            +     * Optional. Grounding supports.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.GroundingSupport grounding_supports = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getGroundingSupportsBuilderList() { + return internalGetGroundingSupportsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.discoveryengine.v1beta.Answer.GroundingSupport, + com.google.cloud.discoveryengine.v1beta.Answer.GroundingSupport.Builder, + com.google.cloud.discoveryengine.v1beta.Answer.GroundingSupportOrBuilder> + internalGetGroundingSupportsFieldBuilder() { + if (groundingSupportsBuilder_ == null) { + groundingSupportsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.discoveryengine.v1beta.Answer.GroundingSupport, + com.google.cloud.discoveryengine.v1beta.Answer.GroundingSupport.Builder, + com.google.cloud.discoveryengine.v1beta.Answer.GroundingSupportOrBuilder>( + groundingSupports_, + ((bitField0_ & 0x00000020) != 0), + getParentForChildren(), + isClean()); + groundingSupports_ = null; } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - name_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 16: - { - state_ = input.readEnum(); - bitField0_ |= 0x00000002; - break; - } // case 16 - case 26: - { - answerText_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - break; - } // case 26 - case 34: - { - com.google.cloud.discoveryengine.v1beta.Answer.Citation m = - input.readMessage( - com.google.cloud.discoveryengine.v1beta.Answer.Citation.parser(), - extensionRegistry); - if (citationsBuilder_ == null) { - ensureCitationsIsMutable(); - citations_.add(m); - } else { - citationsBuilder_.addMessage(m); - } - break; - } // case 34 - case 42: - { - com.google.cloud.discoveryengine.v1beta.Answer.Reference m = - input.readMessage( - com.google.cloud.discoveryengine.v1beta.Answer.Reference.parser(), - extensionRegistry); - if (referencesBuilder_ == null) { - ensureReferencesIsMutable(); - references_.add(m); - } else { - referencesBuilder_.addMessage(m); - } - break; - } // case 42 - case 50: - { - java.lang.String s = input.readStringRequireUtf8(); - ensureRelatedQuestionsIsMutable(); - relatedQuestions_.add(s); - break; - } // case 50 - case 58: - { - com.google.cloud.discoveryengine.v1beta.Answer.Step m = - input.readMessage( - com.google.cloud.discoveryengine.v1beta.Answer.Step.parser(), - extensionRegistry); - if (stepsBuilder_ == null) { - ensureStepsIsMutable(); - steps_.add(m); - } else { - stepsBuilder_.addMessage(m); - } - break; - } // case 58 - case 66: - { - input.readMessage( - internalGetCreateTimeFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000200; - break; - } // case 66 - case 74: - { - input.readMessage( - internalGetCompleteTimeFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000400; - break; - } // case 74 - case 82: - { - input.readMessage( - internalGetQueryUnderstandingInfoFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000080; - break; - } // case 82 - case 88: - { - int tmpRaw = input.readEnum(); - ensureAnswerSkippedReasonsIsMutable(); - answerSkippedReasons_.addInt(tmpRaw); - break; - } // case 88 - case 90: - { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - ensureAnswerSkippedReasonsIsMutable(); - while (input.getBytesUntilLimit() > 0) { - answerSkippedReasons_.addInt(input.readEnum()); - } - input.popLimit(limit); - break; - } // case 90 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; + return groundingSupportsBuilder_; } - private int bitField0_; + private java.util.List references_ = + java.util.Collections.emptyList(); - private java.lang.Object name_ = ""; + private void ensureReferencesIsMutable() { + if (!((bitField0_ & 0x00000040) != 0)) { + references_ = + new java.util.ArrayList( + references_); + bitField0_ |= 0x00000040; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.discoveryengine.v1beta.Answer.Reference, + com.google.cloud.discoveryengine.v1beta.Answer.Reference.Builder, + com.google.cloud.discoveryengine.v1beta.Answer.ReferenceOrBuilder> + referencesBuilder_; /** * * *
            -     * Immutable. Fully qualified name
            -     * `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*/answers/*`
            +     * References.
                  * 
            * - * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The name. + * repeated .google.cloud.discoveryengine.v1beta.Answer.Reference references = 5; */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; + public java.util.List + getReferencesList() { + if (referencesBuilder_ == null) { + return java.util.Collections.unmodifiableList(references_); } else { - return (java.lang.String) ref; + return referencesBuilder_.getMessageList(); } } @@ -25001,23 +31533,16 @@ public java.lang.String getName() { * * *
            -     * Immutable. Fully qualified name
            -     * `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*/answers/*`
            +     * References.
                  * 
            * - * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The bytes for name. + * repeated .google.cloud.discoveryengine.v1beta.Answer.Reference references = 5; */ - public com.google.protobuf.ByteString getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - name_ = b; - return b; + public int getReferencesCount() { + if (referencesBuilder_ == null) { + return references_.size(); } else { - return (com.google.protobuf.ByteString) ref; + return referencesBuilder_.getCount(); } } @@ -25025,22 +31550,40 @@ public com.google.protobuf.ByteString getNameBytes() { * * *
            -     * Immutable. Fully qualified name
            -     * `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*/answers/*`
            +     * References.
                  * 
            * - * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * repeated .google.cloud.discoveryengine.v1beta.Answer.Reference references = 5; + */ + public com.google.cloud.discoveryengine.v1beta.Answer.Reference getReferences(int index) { + if (referencesBuilder_ == null) { + return references_.get(index); + } else { + return referencesBuilder_.getMessage(index); + } + } + + /** * - * @param value The name to set. - * @return This builder for chaining. + * + *
            +     * References.
            +     * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.Reference references = 5; */ - public Builder setName(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); + public Builder setReferences( + int index, com.google.cloud.discoveryengine.v1beta.Answer.Reference value) { + if (referencesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureReferencesIsMutable(); + references_.set(index, value); + onChanged(); + } else { + referencesBuilder_.setMessage(index, value); } - name_ = value; - bitField0_ |= 0x00000001; - onChanged(); return this; } @@ -25048,18 +31591,21 @@ public Builder setName(java.lang.String value) { * * *
            -     * Immutable. Fully qualified name
            -     * `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*/answers/*`
            +     * References.
                  * 
            * - * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return This builder for chaining. + * repeated .google.cloud.discoveryengine.v1beta.Answer.Reference references = 5; */ - public Builder clearName() { - name_ = getDefaultInstance().getName(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); + public Builder setReferences( + int index, + com.google.cloud.discoveryengine.v1beta.Answer.Reference.Builder builderForValue) { + if (referencesBuilder_ == null) { + ensureReferencesIsMutable(); + references_.set(index, builderForValue.build()); + onChanged(); + } else { + referencesBuilder_.setMessage(index, builderForValue.build()); + } return this; } @@ -25067,60 +31613,67 @@ public Builder clearName() { * * *
            -     * Immutable. Fully qualified name
            -     * `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*/answers/*`
            +     * References.
                  * 
            * - * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @param value The bytes for name to set. - * @return This builder for chaining. + * repeated .google.cloud.discoveryengine.v1beta.Answer.Reference references = 5; */ - public Builder setNameBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); + public Builder addReferences(com.google.cloud.discoveryengine.v1beta.Answer.Reference value) { + if (referencesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureReferencesIsMutable(); + references_.add(value); + onChanged(); + } else { + referencesBuilder_.addMessage(value); } - checkByteStringIsUtf8(value); - name_ = value; - bitField0_ |= 0x00000001; - onChanged(); return this; } - private int state_ = 0; - /** * * *
            -     * The state of the answer generation.
            +     * References.
                  * 
            * - * .google.cloud.discoveryengine.v1beta.Answer.State state = 2; - * - * @return The enum numeric value on the wire for state. + * repeated .google.cloud.discoveryengine.v1beta.Answer.Reference references = 5; */ - @java.lang.Override - public int getStateValue() { - return state_; + public Builder addReferences( + int index, com.google.cloud.discoveryengine.v1beta.Answer.Reference value) { + if (referencesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureReferencesIsMutable(); + references_.add(index, value); + onChanged(); + } else { + referencesBuilder_.addMessage(index, value); + } + return this; } /** * * *
            -     * The state of the answer generation.
            +     * References.
                  * 
            * - * .google.cloud.discoveryengine.v1beta.Answer.State state = 2; - * - * @param value The enum numeric value on the wire for state to set. - * @return This builder for chaining. + * repeated .google.cloud.discoveryengine.v1beta.Answer.Reference references = 5; */ - public Builder setStateValue(int value) { - state_ = value; - bitField0_ |= 0x00000002; - onChanged(); + public Builder addReferences( + com.google.cloud.discoveryengine.v1beta.Answer.Reference.Builder builderForValue) { + if (referencesBuilder_ == null) { + ensureReferencesIsMutable(); + references_.add(builderForValue.build()); + onChanged(); + } else { + referencesBuilder_.addMessage(builderForValue.build()); + } return this; } @@ -25128,41 +31681,83 @@ public Builder setStateValue(int value) { * * *
            -     * The state of the answer generation.
            +     * References.
                  * 
            * - * .google.cloud.discoveryengine.v1beta.Answer.State state = 2; + * repeated .google.cloud.discoveryengine.v1beta.Answer.Reference references = 5; + */ + public Builder addReferences( + int index, + com.google.cloud.discoveryengine.v1beta.Answer.Reference.Builder builderForValue) { + if (referencesBuilder_ == null) { + ensureReferencesIsMutable(); + references_.add(index, builderForValue.build()); + onChanged(); + } else { + referencesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** * - * @return The state. + * + *
            +     * References.
            +     * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.Reference references = 5; */ - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.Answer.State getState() { - com.google.cloud.discoveryengine.v1beta.Answer.State result = - com.google.cloud.discoveryengine.v1beta.Answer.State.forNumber(state_); - return result == null - ? com.google.cloud.discoveryengine.v1beta.Answer.State.UNRECOGNIZED - : result; + public Builder addAllReferences( + java.lang.Iterable + values) { + if (referencesBuilder_ == null) { + ensureReferencesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, references_); + onChanged(); + } else { + referencesBuilder_.addAllMessages(values); + } + return this; } /** * * *
            -     * The state of the answer generation.
            +     * References.
                  * 
            * - * .google.cloud.discoveryengine.v1beta.Answer.State state = 2; + * repeated .google.cloud.discoveryengine.v1beta.Answer.Reference references = 5; + */ + public Builder clearReferences() { + if (referencesBuilder_ == null) { + references_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000040); + onChanged(); + } else { + referencesBuilder_.clear(); + } + return this; + } + + /** * - * @param value The state to set. - * @return This builder for chaining. + * + *
            +     * References.
            +     * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.Reference references = 5; */ - public Builder setState(com.google.cloud.discoveryengine.v1beta.Answer.State value) { - if (value == null) { - throw new NullPointerException(); + public Builder removeReferences(int index) { + if (referencesBuilder_ == null) { + ensureReferencesIsMutable(); + references_.remove(index); + onChanged(); + } else { + referencesBuilder_.remove(index); } - bitField0_ |= 0x00000002; - state_ = value.getNumber(); - onChanged(); return this; } @@ -25170,42 +31765,31 @@ public Builder setState(com.google.cloud.discoveryengine.v1beta.Answer.State val * * *
            -     * The state of the answer generation.
            +     * References.
                  * 
            * - * .google.cloud.discoveryengine.v1beta.Answer.State state = 2; - * - * @return This builder for chaining. + * repeated .google.cloud.discoveryengine.v1beta.Answer.Reference references = 5; */ - public Builder clearState() { - bitField0_ = (bitField0_ & ~0x00000002); - state_ = 0; - onChanged(); - return this; + public com.google.cloud.discoveryengine.v1beta.Answer.Reference.Builder getReferencesBuilder( + int index) { + return internalGetReferencesFieldBuilder().getBuilder(index); } - private java.lang.Object answerText_ = ""; - /** * * *
            -     * The textual answer.
            +     * References.
                  * 
            * - * string answer_text = 3; - * - * @return The answerText. + * repeated .google.cloud.discoveryengine.v1beta.Answer.Reference references = 5; */ - public java.lang.String getAnswerText() { - java.lang.Object ref = answerText_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - answerText_ = s; - return s; + public com.google.cloud.discoveryengine.v1beta.Answer.ReferenceOrBuilder getReferencesOrBuilder( + int index) { + if (referencesBuilder_ == null) { + return references_.get(index); } else { - return (java.lang.String) ref; + return referencesBuilder_.getMessageOrBuilder(index); } } @@ -25213,22 +31797,18 @@ public java.lang.String getAnswerText() { * * *
            -     * The textual answer.
            +     * References.
                  * 
            * - * string answer_text = 3; - * - * @return The bytes for answerText. + * repeated .google.cloud.discoveryengine.v1beta.Answer.Reference references = 5; */ - public com.google.protobuf.ByteString getAnswerTextBytes() { - java.lang.Object ref = answerText_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - answerText_ = b; - return b; + public java.util.List< + ? extends com.google.cloud.discoveryengine.v1beta.Answer.ReferenceOrBuilder> + getReferencesOrBuilderList() { + if (referencesBuilder_ != null) { + return referencesBuilder_.getMessageOrBuilderList(); } else { - return (com.google.protobuf.ByteString) ref; + return java.util.Collections.unmodifiableList(references_); } } @@ -25236,98 +31816,99 @@ public com.google.protobuf.ByteString getAnswerTextBytes() { * * *
            -     * The textual answer.
            +     * References.
                  * 
            * - * string answer_text = 3; - * - * @param value The answerText to set. - * @return This builder for chaining. + * repeated .google.cloud.discoveryengine.v1beta.Answer.Reference references = 5; */ - public Builder setAnswerText(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - answerText_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; + public com.google.cloud.discoveryengine.v1beta.Answer.Reference.Builder addReferencesBuilder() { + return internalGetReferencesFieldBuilder() + .addBuilder( + com.google.cloud.discoveryengine.v1beta.Answer.Reference.getDefaultInstance()); } /** * * *
            -     * The textual answer.
            +     * References.
                  * 
            * - * string answer_text = 3; - * - * @return This builder for chaining. + * repeated .google.cloud.discoveryengine.v1beta.Answer.Reference references = 5; */ - public Builder clearAnswerText() { - answerText_ = getDefaultInstance().getAnswerText(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - return this; + public com.google.cloud.discoveryengine.v1beta.Answer.Reference.Builder addReferencesBuilder( + int index) { + return internalGetReferencesFieldBuilder() + .addBuilder( + index, com.google.cloud.discoveryengine.v1beta.Answer.Reference.getDefaultInstance()); } /** * * *
            -     * The textual answer.
            +     * References.
                  * 
            * - * string answer_text = 3; - * - * @param value The bytes for answerText to set. - * @return This builder for chaining. + * repeated .google.cloud.discoveryengine.v1beta.Answer.Reference references = 5; */ - public Builder setAnswerTextBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); + public java.util.List + getReferencesBuilderList() { + return internalGetReferencesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.discoveryengine.v1beta.Answer.Reference, + com.google.cloud.discoveryengine.v1beta.Answer.Reference.Builder, + com.google.cloud.discoveryengine.v1beta.Answer.ReferenceOrBuilder> + internalGetReferencesFieldBuilder() { + if (referencesBuilder_ == null) { + referencesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.discoveryengine.v1beta.Answer.Reference, + com.google.cloud.discoveryengine.v1beta.Answer.Reference.Builder, + com.google.cloud.discoveryengine.v1beta.Answer.ReferenceOrBuilder>( + references_, ((bitField0_ & 0x00000040) != 0), getParentForChildren(), isClean()); + references_ = null; } - checkByteStringIsUtf8(value); - answerText_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; + return referencesBuilder_; } - private java.util.List citations_ = - java.util.Collections.emptyList(); + private java.util.List + blobAttachments_ = java.util.Collections.emptyList(); - private void ensureCitationsIsMutable() { - if (!((bitField0_ & 0x00000008) != 0)) { - citations_ = - new java.util.ArrayList( - citations_); - bitField0_ |= 0x00000008; + private void ensureBlobAttachmentsIsMutable() { + if (!((bitField0_ & 0x00000080) != 0)) { + blobAttachments_ = + new java.util.ArrayList( + blobAttachments_); + bitField0_ |= 0x00000080; } } private com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.discoveryengine.v1beta.Answer.Citation, - com.google.cloud.discoveryengine.v1beta.Answer.Citation.Builder, - com.google.cloud.discoveryengine.v1beta.Answer.CitationOrBuilder> - citationsBuilder_; + com.google.cloud.discoveryengine.v1beta.Answer.BlobAttachment, + com.google.cloud.discoveryengine.v1beta.Answer.BlobAttachment.Builder, + com.google.cloud.discoveryengine.v1beta.Answer.BlobAttachmentOrBuilder> + blobAttachmentsBuilder_; /** * * *
            -     * Citations.
            +     * Output only. List of blob attachments in the answer.
                  * 
            * - * repeated .google.cloud.discoveryengine.v1beta.Answer.Citation citations = 4; + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.BlobAttachment blob_attachments = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ - public java.util.List - getCitationsList() { - if (citationsBuilder_ == null) { - return java.util.Collections.unmodifiableList(citations_); + public java.util.List + getBlobAttachmentsList() { + if (blobAttachmentsBuilder_ == null) { + return java.util.Collections.unmodifiableList(blobAttachments_); } else { - return citationsBuilder_.getMessageList(); + return blobAttachmentsBuilder_.getMessageList(); } } @@ -25335,16 +31916,18 @@ private void ensureCitationsIsMutable() { * * *
            -     * Citations.
            +     * Output only. List of blob attachments in the answer.
                  * 
            * - * repeated .google.cloud.discoveryengine.v1beta.Answer.Citation citations = 4; + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.BlobAttachment blob_attachments = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ - public int getCitationsCount() { - if (citationsBuilder_ == null) { - return citations_.size(); + public int getBlobAttachmentsCount() { + if (blobAttachmentsBuilder_ == null) { + return blobAttachments_.size(); } else { - return citationsBuilder_.getCount(); + return blobAttachmentsBuilder_.getCount(); } } @@ -25352,16 +31935,19 @@ public int getCitationsCount() { * * *
            -     * Citations.
            +     * Output only. List of blob attachments in the answer.
                  * 
            * - * repeated .google.cloud.discoveryengine.v1beta.Answer.Citation citations = 4; + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.BlobAttachment blob_attachments = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ - public com.google.cloud.discoveryengine.v1beta.Answer.Citation getCitations(int index) { - if (citationsBuilder_ == null) { - return citations_.get(index); + public com.google.cloud.discoveryengine.v1beta.Answer.BlobAttachment getBlobAttachments( + int index) { + if (blobAttachmentsBuilder_ == null) { + return blobAttachments_.get(index); } else { - return citationsBuilder_.getMessage(index); + return blobAttachmentsBuilder_.getMessage(index); } } @@ -25369,22 +31955,24 @@ public com.google.cloud.discoveryengine.v1beta.Answer.Citation getCitations(int * * *
            -     * Citations.
            +     * Output only. List of blob attachments in the answer.
                  * 
            * - * repeated .google.cloud.discoveryengine.v1beta.Answer.Citation citations = 4; + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.BlobAttachment blob_attachments = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ - public Builder setCitations( - int index, com.google.cloud.discoveryengine.v1beta.Answer.Citation value) { - if (citationsBuilder_ == null) { + public Builder setBlobAttachments( + int index, com.google.cloud.discoveryengine.v1beta.Answer.BlobAttachment value) { + if (blobAttachmentsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - ensureCitationsIsMutable(); - citations_.set(index, value); + ensureBlobAttachmentsIsMutable(); + blobAttachments_.set(index, value); onChanged(); } else { - citationsBuilder_.setMessage(index, value); + blobAttachmentsBuilder_.setMessage(index, value); } return this; } @@ -25393,20 +31981,22 @@ public Builder setCitations( * * *
            -     * Citations.
            +     * Output only. List of blob attachments in the answer.
                  * 
            * - * repeated .google.cloud.discoveryengine.v1beta.Answer.Citation citations = 4; + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.BlobAttachment blob_attachments = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ - public Builder setCitations( + public Builder setBlobAttachments( int index, - com.google.cloud.discoveryengine.v1beta.Answer.Citation.Builder builderForValue) { - if (citationsBuilder_ == null) { - ensureCitationsIsMutable(); - citations_.set(index, builderForValue.build()); + com.google.cloud.discoveryengine.v1beta.Answer.BlobAttachment.Builder builderForValue) { + if (blobAttachmentsBuilder_ == null) { + ensureBlobAttachmentsIsMutable(); + blobAttachments_.set(index, builderForValue.build()); onChanged(); } else { - citationsBuilder_.setMessage(index, builderForValue.build()); + blobAttachmentsBuilder_.setMessage(index, builderForValue.build()); } return this; } @@ -25415,21 +32005,24 @@ public Builder setCitations( * * *
            -     * Citations.
            +     * Output only. List of blob attachments in the answer.
                  * 
            * - * repeated .google.cloud.discoveryengine.v1beta.Answer.Citation citations = 4; + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.BlobAttachment blob_attachments = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ - public Builder addCitations(com.google.cloud.discoveryengine.v1beta.Answer.Citation value) { - if (citationsBuilder_ == null) { + public Builder addBlobAttachments( + com.google.cloud.discoveryengine.v1beta.Answer.BlobAttachment value) { + if (blobAttachmentsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - ensureCitationsIsMutable(); - citations_.add(value); + ensureBlobAttachmentsIsMutable(); + blobAttachments_.add(value); onChanged(); } else { - citationsBuilder_.addMessage(value); + blobAttachmentsBuilder_.addMessage(value); } return this; } @@ -25438,22 +32031,24 @@ public Builder addCitations(com.google.cloud.discoveryengine.v1beta.Answer.Citat * * *
            -     * Citations.
            +     * Output only. List of blob attachments in the answer.
                  * 
            * - * repeated .google.cloud.discoveryengine.v1beta.Answer.Citation citations = 4; + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.BlobAttachment blob_attachments = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ - public Builder addCitations( - int index, com.google.cloud.discoveryengine.v1beta.Answer.Citation value) { - if (citationsBuilder_ == null) { + public Builder addBlobAttachments( + int index, com.google.cloud.discoveryengine.v1beta.Answer.BlobAttachment value) { + if (blobAttachmentsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - ensureCitationsIsMutable(); - citations_.add(index, value); + ensureBlobAttachmentsIsMutable(); + blobAttachments_.add(index, value); onChanged(); } else { - citationsBuilder_.addMessage(index, value); + blobAttachmentsBuilder_.addMessage(index, value); } return this; } @@ -25462,19 +32057,21 @@ public Builder addCitations( * * *
            -     * Citations.
            +     * Output only. List of blob attachments in the answer.
                  * 
            * - * repeated .google.cloud.discoveryengine.v1beta.Answer.Citation citations = 4; + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.BlobAttachment blob_attachments = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ - public Builder addCitations( - com.google.cloud.discoveryengine.v1beta.Answer.Citation.Builder builderForValue) { - if (citationsBuilder_ == null) { - ensureCitationsIsMutable(); - citations_.add(builderForValue.build()); + public Builder addBlobAttachments( + com.google.cloud.discoveryengine.v1beta.Answer.BlobAttachment.Builder builderForValue) { + if (blobAttachmentsBuilder_ == null) { + ensureBlobAttachmentsIsMutable(); + blobAttachments_.add(builderForValue.build()); onChanged(); } else { - citationsBuilder_.addMessage(builderForValue.build()); + blobAttachmentsBuilder_.addMessage(builderForValue.build()); } return this; } @@ -25483,20 +32080,22 @@ public Builder addCitations( * * *
            -     * Citations.
            +     * Output only. List of blob attachments in the answer.
                  * 
            * - * repeated .google.cloud.discoveryengine.v1beta.Answer.Citation citations = 4; + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.BlobAttachment blob_attachments = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ - public Builder addCitations( + public Builder addBlobAttachments( int index, - com.google.cloud.discoveryengine.v1beta.Answer.Citation.Builder builderForValue) { - if (citationsBuilder_ == null) { - ensureCitationsIsMutable(); - citations_.add(index, builderForValue.build()); + com.google.cloud.discoveryengine.v1beta.Answer.BlobAttachment.Builder builderForValue) { + if (blobAttachmentsBuilder_ == null) { + ensureBlobAttachmentsIsMutable(); + blobAttachments_.add(index, builderForValue.build()); onChanged(); } else { - citationsBuilder_.addMessage(index, builderForValue.build()); + blobAttachmentsBuilder_.addMessage(index, builderForValue.build()); } return this; } @@ -25505,20 +32104,22 @@ public Builder addCitations( * * *
            -     * Citations.
            +     * Output only. List of blob attachments in the answer.
                  * 
            * - * repeated .google.cloud.discoveryengine.v1beta.Answer.Citation citations = 4; + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.BlobAttachment blob_attachments = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ - public Builder addAllCitations( - java.lang.Iterable + public Builder addAllBlobAttachments( + java.lang.Iterable values) { - if (citationsBuilder_ == null) { - ensureCitationsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, citations_); + if (blobAttachmentsBuilder_ == null) { + ensureBlobAttachmentsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, blobAttachments_); onChanged(); } else { - citationsBuilder_.addAllMessages(values); + blobAttachmentsBuilder_.addAllMessages(values); } return this; } @@ -25527,18 +32128,20 @@ public Builder addAllCitations( * * *
            -     * Citations.
            +     * Output only. List of blob attachments in the answer.
                  * 
            * - * repeated .google.cloud.discoveryengine.v1beta.Answer.Citation citations = 4; + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.BlobAttachment blob_attachments = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ - public Builder clearCitations() { - if (citationsBuilder_ == null) { - citations_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000008); + public Builder clearBlobAttachments() { + if (blobAttachmentsBuilder_ == null) { + blobAttachments_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000080); onChanged(); } else { - citationsBuilder_.clear(); + blobAttachmentsBuilder_.clear(); } return this; } @@ -25547,18 +32150,20 @@ public Builder clearCitations() { * * *
            -     * Citations.
            +     * Output only. List of blob attachments in the answer.
                  * 
            * - * repeated .google.cloud.discoveryengine.v1beta.Answer.Citation citations = 4; + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.BlobAttachment blob_attachments = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ - public Builder removeCitations(int index) { - if (citationsBuilder_ == null) { - ensureCitationsIsMutable(); - citations_.remove(index); + public Builder removeBlobAttachments(int index) { + if (blobAttachmentsBuilder_ == null) { + ensureBlobAttachmentsIsMutable(); + blobAttachments_.remove(index); onChanged(); } else { - citationsBuilder_.remove(index); + blobAttachmentsBuilder_.remove(index); } return this; } @@ -25567,31 +32172,35 @@ public Builder removeCitations(int index) { * * *
            -     * Citations.
            +     * Output only. List of blob attachments in the answer.
                  * 
            * - * repeated .google.cloud.discoveryengine.v1beta.Answer.Citation citations = 4; + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.BlobAttachment blob_attachments = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ - public com.google.cloud.discoveryengine.v1beta.Answer.Citation.Builder getCitationsBuilder( - int index) { - return internalGetCitationsFieldBuilder().getBuilder(index); + public com.google.cloud.discoveryengine.v1beta.Answer.BlobAttachment.Builder + getBlobAttachmentsBuilder(int index) { + return internalGetBlobAttachmentsFieldBuilder().getBuilder(index); } /** * * *
            -     * Citations.
            +     * Output only. List of blob attachments in the answer.
                  * 
            * - * repeated .google.cloud.discoveryengine.v1beta.Answer.Citation citations = 4; + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.BlobAttachment blob_attachments = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ - public com.google.cloud.discoveryengine.v1beta.Answer.CitationOrBuilder getCitationsOrBuilder( - int index) { - if (citationsBuilder_ == null) { - return citations_.get(index); + public com.google.cloud.discoveryengine.v1beta.Answer.BlobAttachmentOrBuilder + getBlobAttachmentsOrBuilder(int index) { + if (blobAttachmentsBuilder_ == null) { + return blobAttachments_.get(index); } else { - return citationsBuilder_.getMessageOrBuilder(index); + return blobAttachmentsBuilder_.getMessageOrBuilder(index); } } @@ -25599,18 +32208,20 @@ public com.google.cloud.discoveryengine.v1beta.Answer.CitationOrBuilder getCitat * * *
            -     * Citations.
            +     * Output only. List of blob attachments in the answer.
                  * 
            * - * repeated .google.cloud.discoveryengine.v1beta.Answer.Citation citations = 4; + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.BlobAttachment blob_attachments = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ public java.util.List< - ? extends com.google.cloud.discoveryengine.v1beta.Answer.CitationOrBuilder> - getCitationsOrBuilderList() { - if (citationsBuilder_ != null) { - return citationsBuilder_.getMessageOrBuilderList(); + ? extends com.google.cloud.discoveryengine.v1beta.Answer.BlobAttachmentOrBuilder> + getBlobAttachmentsOrBuilderList() { + if (blobAttachmentsBuilder_ != null) { + return blobAttachmentsBuilder_.getMessageOrBuilderList(); } else { - return java.util.Collections.unmodifiableList(citations_); + return java.util.Collections.unmodifiableList(blobAttachments_); } } @@ -25618,154 +32229,169 @@ public com.google.cloud.discoveryengine.v1beta.Answer.CitationOrBuilder getCitat * * *
            -     * Citations.
            +     * Output only. List of blob attachments in the answer.
                  * 
            * - * repeated .google.cloud.discoveryengine.v1beta.Answer.Citation citations = 4; + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.BlobAttachment blob_attachments = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ - public com.google.cloud.discoveryengine.v1beta.Answer.Citation.Builder addCitationsBuilder() { - return internalGetCitationsFieldBuilder() - .addBuilder(com.google.cloud.discoveryengine.v1beta.Answer.Citation.getDefaultInstance()); + public com.google.cloud.discoveryengine.v1beta.Answer.BlobAttachment.Builder + addBlobAttachmentsBuilder() { + return internalGetBlobAttachmentsFieldBuilder() + .addBuilder( + com.google.cloud.discoveryengine.v1beta.Answer.BlobAttachment.getDefaultInstance()); } /** * * *
            -     * Citations.
            +     * Output only. List of blob attachments in the answer.
                  * 
            * - * repeated .google.cloud.discoveryengine.v1beta.Answer.Citation citations = 4; + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.BlobAttachment blob_attachments = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ - public com.google.cloud.discoveryengine.v1beta.Answer.Citation.Builder addCitationsBuilder( - int index) { - return internalGetCitationsFieldBuilder() + public com.google.cloud.discoveryengine.v1beta.Answer.BlobAttachment.Builder + addBlobAttachmentsBuilder(int index) { + return internalGetBlobAttachmentsFieldBuilder() .addBuilder( - index, com.google.cloud.discoveryengine.v1beta.Answer.Citation.getDefaultInstance()); + index, + com.google.cloud.discoveryengine.v1beta.Answer.BlobAttachment.getDefaultInstance()); } /** * * *
            -     * Citations.
            +     * Output only. List of blob attachments in the answer.
                  * 
            * - * repeated .google.cloud.discoveryengine.v1beta.Answer.Citation citations = 4; + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.BlobAttachment blob_attachments = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ - public java.util.List - getCitationsBuilderList() { - return internalGetCitationsFieldBuilder().getBuilderList(); + public java.util.List + getBlobAttachmentsBuilderList() { + return internalGetBlobAttachmentsFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.discoveryengine.v1beta.Answer.Citation, - com.google.cloud.discoveryengine.v1beta.Answer.Citation.Builder, - com.google.cloud.discoveryengine.v1beta.Answer.CitationOrBuilder> - internalGetCitationsFieldBuilder() { - if (citationsBuilder_ == null) { - citationsBuilder_ = + com.google.cloud.discoveryengine.v1beta.Answer.BlobAttachment, + com.google.cloud.discoveryengine.v1beta.Answer.BlobAttachment.Builder, + com.google.cloud.discoveryengine.v1beta.Answer.BlobAttachmentOrBuilder> + internalGetBlobAttachmentsFieldBuilder() { + if (blobAttachmentsBuilder_ == null) { + blobAttachmentsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.discoveryengine.v1beta.Answer.Citation, - com.google.cloud.discoveryengine.v1beta.Answer.Citation.Builder, - com.google.cloud.discoveryengine.v1beta.Answer.CitationOrBuilder>( - citations_, ((bitField0_ & 0x00000008) != 0), getParentForChildren(), isClean()); - citations_ = null; + com.google.cloud.discoveryengine.v1beta.Answer.BlobAttachment, + com.google.cloud.discoveryengine.v1beta.Answer.BlobAttachment.Builder, + com.google.cloud.discoveryengine.v1beta.Answer.BlobAttachmentOrBuilder>( + blobAttachments_, + ((bitField0_ & 0x00000080) != 0), + getParentForChildren(), + isClean()); + blobAttachments_ = null; } - return citationsBuilder_; + return blobAttachmentsBuilder_; } - private java.util.List references_ = - java.util.Collections.emptyList(); + private com.google.protobuf.LazyStringArrayList relatedQuestions_ = + com.google.protobuf.LazyStringArrayList.emptyList(); - private void ensureReferencesIsMutable() { - if (!((bitField0_ & 0x00000010) != 0)) { - references_ = - new java.util.ArrayList( - references_); - bitField0_ |= 0x00000010; + private void ensureRelatedQuestionsIsMutable() { + if (!relatedQuestions_.isModifiable()) { + relatedQuestions_ = new com.google.protobuf.LazyStringArrayList(relatedQuestions_); } + bitField0_ |= 0x00000100; } - private com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.discoveryengine.v1beta.Answer.Reference, - com.google.cloud.discoveryengine.v1beta.Answer.Reference.Builder, - com.google.cloud.discoveryengine.v1beta.Answer.ReferenceOrBuilder> - referencesBuilder_; + /** + * + * + *
            +     * Suggested related questions.
            +     * 
            + * + * repeated string related_questions = 6; + * + * @return A list containing the relatedQuestions. + */ + public com.google.protobuf.ProtocolStringList getRelatedQuestionsList() { + relatedQuestions_.makeImmutable(); + return relatedQuestions_; + } /** * * *
            -     * References.
            +     * Suggested related questions.
                  * 
            * - * repeated .google.cloud.discoveryengine.v1beta.Answer.Reference references = 5; + * repeated string related_questions = 6; + * + * @return The count of relatedQuestions. */ - public java.util.List - getReferencesList() { - if (referencesBuilder_ == null) { - return java.util.Collections.unmodifiableList(references_); - } else { - return referencesBuilder_.getMessageList(); - } + public int getRelatedQuestionsCount() { + return relatedQuestions_.size(); } /** * * *
            -     * References.
            +     * Suggested related questions.
                  * 
            * - * repeated .google.cloud.discoveryengine.v1beta.Answer.Reference references = 5; + * repeated string related_questions = 6; + * + * @param index The index of the element to return. + * @return The relatedQuestions at the given index. */ - public int getReferencesCount() { - if (referencesBuilder_ == null) { - return references_.size(); - } else { - return referencesBuilder_.getCount(); - } + public java.lang.String getRelatedQuestions(int index) { + return relatedQuestions_.get(index); } /** * * *
            -     * References.
            +     * Suggested related questions.
                  * 
            * - * repeated .google.cloud.discoveryengine.v1beta.Answer.Reference references = 5; + * repeated string related_questions = 6; + * + * @param index The index of the value to return. + * @return The bytes of the relatedQuestions at the given index. */ - public com.google.cloud.discoveryengine.v1beta.Answer.Reference getReferences(int index) { - if (referencesBuilder_ == null) { - return references_.get(index); - } else { - return referencesBuilder_.getMessage(index); - } + public com.google.protobuf.ByteString getRelatedQuestionsBytes(int index) { + return relatedQuestions_.getByteString(index); } /** * * *
            -     * References.
            +     * Suggested related questions.
                  * 
            * - * repeated .google.cloud.discoveryengine.v1beta.Answer.Reference references = 5; + * repeated string related_questions = 6; + * + * @param index The index to set the value at. + * @param value The relatedQuestions to set. + * @return This builder for chaining. */ - public Builder setReferences( - int index, com.google.cloud.discoveryengine.v1beta.Answer.Reference value) { - if (referencesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureReferencesIsMutable(); - references_.set(index, value); - onChanged(); - } else { - referencesBuilder_.setMessage(index, value); + public Builder setRelatedQuestions(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); } + ensureRelatedQuestionsIsMutable(); + relatedQuestions_.set(index, value); + bitField0_ |= 0x00000100; + onChanged(); return this; } @@ -25773,21 +32399,22 @@ public Builder setReferences( * * *
            -     * References.
            +     * Suggested related questions.
                  * 
            * - * repeated .google.cloud.discoveryengine.v1beta.Answer.Reference references = 5; + * repeated string related_questions = 6; + * + * @param value The relatedQuestions to add. + * @return This builder for chaining. */ - public Builder setReferences( - int index, - com.google.cloud.discoveryengine.v1beta.Answer.Reference.Builder builderForValue) { - if (referencesBuilder_ == null) { - ensureReferencesIsMutable(); - references_.set(index, builderForValue.build()); - onChanged(); - } else { - referencesBuilder_.setMessage(index, builderForValue.build()); + public Builder addRelatedQuestions(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); } + ensureRelatedQuestionsIsMutable(); + relatedQuestions_.add(value); + bitField0_ |= 0x00000100; + onChanged(); return this; } @@ -25795,22 +32422,19 @@ public Builder setReferences( * * *
            -     * References.
            +     * Suggested related questions.
                  * 
            * - * repeated .google.cloud.discoveryengine.v1beta.Answer.Reference references = 5; + * repeated string related_questions = 6; + * + * @param values The relatedQuestions to add. + * @return This builder for chaining. */ - public Builder addReferences(com.google.cloud.discoveryengine.v1beta.Answer.Reference value) { - if (referencesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureReferencesIsMutable(); - references_.add(value); - onChanged(); - } else { - referencesBuilder_.addMessage(value); - } + public Builder addAllRelatedQuestions(java.lang.Iterable values) { + ensureRelatedQuestionsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, relatedQuestions_); + bitField0_ |= 0x00000100; + onChanged(); return this; } @@ -25818,107 +32442,132 @@ public Builder addReferences(com.google.cloud.discoveryengine.v1beta.Answer.Refe * * *
            -     * References.
            +     * Suggested related questions.
                  * 
            * - * repeated .google.cloud.discoveryengine.v1beta.Answer.Reference references = 5; + * repeated string related_questions = 6; + * + * @return This builder for chaining. */ - public Builder addReferences( - int index, com.google.cloud.discoveryengine.v1beta.Answer.Reference value) { - if (referencesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureReferencesIsMutable(); - references_.add(index, value); - onChanged(); - } else { - referencesBuilder_.addMessage(index, value); + public Builder clearRelatedQuestions() { + relatedQuestions_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000100); + ; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Suggested related questions.
            +     * 
            + * + * repeated string related_questions = 6; + * + * @param value The bytes of the relatedQuestions to add. + * @return This builder for chaining. + */ + public Builder addRelatedQuestionsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureRelatedQuestionsIsMutable(); + relatedQuestions_.add(value); + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + + private java.util.List steps_ = + java.util.Collections.emptyList(); + + private void ensureStepsIsMutable() { + if (!((bitField0_ & 0x00000200) != 0)) { + steps_ = + new java.util.ArrayList(steps_); + bitField0_ |= 0x00000200; } - return this; } + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.discoveryengine.v1beta.Answer.Step, + com.google.cloud.discoveryengine.v1beta.Answer.Step.Builder, + com.google.cloud.discoveryengine.v1beta.Answer.StepOrBuilder> + stepsBuilder_; + /** * * *
            -     * References.
            +     * Answer generation steps.
                  * 
            * - * repeated .google.cloud.discoveryengine.v1beta.Answer.Reference references = 5; + * repeated .google.cloud.discoveryengine.v1beta.Answer.Step steps = 7; */ - public Builder addReferences( - com.google.cloud.discoveryengine.v1beta.Answer.Reference.Builder builderForValue) { - if (referencesBuilder_ == null) { - ensureReferencesIsMutable(); - references_.add(builderForValue.build()); - onChanged(); + public java.util.List getStepsList() { + if (stepsBuilder_ == null) { + return java.util.Collections.unmodifiableList(steps_); } else { - referencesBuilder_.addMessage(builderForValue.build()); + return stepsBuilder_.getMessageList(); } - return this; } /** * * *
            -     * References.
            +     * Answer generation steps.
                  * 
            * - * repeated .google.cloud.discoveryengine.v1beta.Answer.Reference references = 5; + * repeated .google.cloud.discoveryengine.v1beta.Answer.Step steps = 7; */ - public Builder addReferences( - int index, - com.google.cloud.discoveryengine.v1beta.Answer.Reference.Builder builderForValue) { - if (referencesBuilder_ == null) { - ensureReferencesIsMutable(); - references_.add(index, builderForValue.build()); - onChanged(); + public int getStepsCount() { + if (stepsBuilder_ == null) { + return steps_.size(); } else { - referencesBuilder_.addMessage(index, builderForValue.build()); + return stepsBuilder_.getCount(); } - return this; } /** * * *
            -     * References.
            +     * Answer generation steps.
                  * 
            * - * repeated .google.cloud.discoveryengine.v1beta.Answer.Reference references = 5; + * repeated .google.cloud.discoveryengine.v1beta.Answer.Step steps = 7; */ - public Builder addAllReferences( - java.lang.Iterable - values) { - if (referencesBuilder_ == null) { - ensureReferencesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, references_); - onChanged(); + public com.google.cloud.discoveryengine.v1beta.Answer.Step getSteps(int index) { + if (stepsBuilder_ == null) { + return steps_.get(index); } else { - referencesBuilder_.addAllMessages(values); + return stepsBuilder_.getMessage(index); } - return this; } /** * * *
            -     * References.
            +     * Answer generation steps.
                  * 
            * - * repeated .google.cloud.discoveryengine.v1beta.Answer.Reference references = 5; + * repeated .google.cloud.discoveryengine.v1beta.Answer.Step steps = 7; */ - public Builder clearReferences() { - if (referencesBuilder_ == null) { - references_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000010); + public Builder setSteps(int index, com.google.cloud.discoveryengine.v1beta.Answer.Step value) { + if (stepsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureStepsIsMutable(); + steps_.set(index, value); onChanged(); } else { - referencesBuilder_.clear(); + stepsBuilder_.setMessage(index, value); } return this; } @@ -25927,18 +32576,19 @@ public Builder clearReferences() { * * *
            -     * References.
            +     * Answer generation steps.
                  * 
            * - * repeated .google.cloud.discoveryengine.v1beta.Answer.Reference references = 5; + * repeated .google.cloud.discoveryengine.v1beta.Answer.Step steps = 7; */ - public Builder removeReferences(int index) { - if (referencesBuilder_ == null) { - ensureReferencesIsMutable(); - references_.remove(index); + public Builder setSteps( + int index, com.google.cloud.discoveryengine.v1beta.Answer.Step.Builder builderForValue) { + if (stepsBuilder_ == null) { + ensureStepsIsMutable(); + steps_.set(index, builderForValue.build()); onChanged(); } else { - referencesBuilder_.remove(index); + stepsBuilder_.setMessage(index, builderForValue.build()); } return this; } @@ -25947,346 +32597,307 @@ public Builder removeReferences(int index) { * * *
            -     * References.
            -     * 
            - * - * repeated .google.cloud.discoveryengine.v1beta.Answer.Reference references = 5; - */ - public com.google.cloud.discoveryengine.v1beta.Answer.Reference.Builder getReferencesBuilder( - int index) { - return internalGetReferencesFieldBuilder().getBuilder(index); - } - - /** - * - * - *
            -     * References.
            +     * Answer generation steps.
                  * 
            * - * repeated .google.cloud.discoveryengine.v1beta.Answer.Reference references = 5; + * repeated .google.cloud.discoveryengine.v1beta.Answer.Step steps = 7; */ - public com.google.cloud.discoveryengine.v1beta.Answer.ReferenceOrBuilder getReferencesOrBuilder( - int index) { - if (referencesBuilder_ == null) { - return references_.get(index); + public Builder addSteps(com.google.cloud.discoveryengine.v1beta.Answer.Step value) { + if (stepsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureStepsIsMutable(); + steps_.add(value); + onChanged(); } else { - return referencesBuilder_.getMessageOrBuilder(index); + stepsBuilder_.addMessage(value); } + return this; } /** * * *
            -     * References.
            +     * Answer generation steps.
                  * 
            * - * repeated .google.cloud.discoveryengine.v1beta.Answer.Reference references = 5; + * repeated .google.cloud.discoveryengine.v1beta.Answer.Step steps = 7; */ - public java.util.List< - ? extends com.google.cloud.discoveryengine.v1beta.Answer.ReferenceOrBuilder> - getReferencesOrBuilderList() { - if (referencesBuilder_ != null) { - return referencesBuilder_.getMessageOrBuilderList(); + public Builder addSteps(int index, com.google.cloud.discoveryengine.v1beta.Answer.Step value) { + if (stepsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureStepsIsMutable(); + steps_.add(index, value); + onChanged(); } else { - return java.util.Collections.unmodifiableList(references_); + stepsBuilder_.addMessage(index, value); } + return this; } /** * * *
            -     * References.
            -     * 
            - * - * repeated .google.cloud.discoveryengine.v1beta.Answer.Reference references = 5; - */ - public com.google.cloud.discoveryengine.v1beta.Answer.Reference.Builder addReferencesBuilder() { - return internalGetReferencesFieldBuilder() - .addBuilder( - com.google.cloud.discoveryengine.v1beta.Answer.Reference.getDefaultInstance()); - } - - /** - * - * - *
            -     * References.
            +     * Answer generation steps.
                  * 
            * - * repeated .google.cloud.discoveryengine.v1beta.Answer.Reference references = 5; + * repeated .google.cloud.discoveryengine.v1beta.Answer.Step steps = 7; */ - public com.google.cloud.discoveryengine.v1beta.Answer.Reference.Builder addReferencesBuilder( - int index) { - return internalGetReferencesFieldBuilder() - .addBuilder( - index, com.google.cloud.discoveryengine.v1beta.Answer.Reference.getDefaultInstance()); + public Builder addSteps( + com.google.cloud.discoveryengine.v1beta.Answer.Step.Builder builderForValue) { + if (stepsBuilder_ == null) { + ensureStepsIsMutable(); + steps_.add(builderForValue.build()); + onChanged(); + } else { + stepsBuilder_.addMessage(builderForValue.build()); + } + return this; } /** * * *
            -     * References.
            +     * Answer generation steps.
                  * 
            * - * repeated .google.cloud.discoveryengine.v1beta.Answer.Reference references = 5; + * repeated .google.cloud.discoveryengine.v1beta.Answer.Step steps = 7; */ - public java.util.List - getReferencesBuilderList() { - return internalGetReferencesFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.discoveryengine.v1beta.Answer.Reference, - com.google.cloud.discoveryengine.v1beta.Answer.Reference.Builder, - com.google.cloud.discoveryengine.v1beta.Answer.ReferenceOrBuilder> - internalGetReferencesFieldBuilder() { - if (referencesBuilder_ == null) { - referencesBuilder_ = - new com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.discoveryengine.v1beta.Answer.Reference, - com.google.cloud.discoveryengine.v1beta.Answer.Reference.Builder, - com.google.cloud.discoveryengine.v1beta.Answer.ReferenceOrBuilder>( - references_, ((bitField0_ & 0x00000010) != 0), getParentForChildren(), isClean()); - references_ = null; - } - return referencesBuilder_; - } - - private com.google.protobuf.LazyStringArrayList relatedQuestions_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - - private void ensureRelatedQuestionsIsMutable() { - if (!relatedQuestions_.isModifiable()) { - relatedQuestions_ = new com.google.protobuf.LazyStringArrayList(relatedQuestions_); + public Builder addSteps( + int index, com.google.cloud.discoveryengine.v1beta.Answer.Step.Builder builderForValue) { + if (stepsBuilder_ == null) { + ensureStepsIsMutable(); + steps_.add(index, builderForValue.build()); + onChanged(); + } else { + stepsBuilder_.addMessage(index, builderForValue.build()); } - bitField0_ |= 0x00000020; + return this; } /** * * *
            -     * Suggested related questions.
            +     * Answer generation steps.
                  * 
            * - * repeated string related_questions = 6; - * - * @return A list containing the relatedQuestions. + * repeated .google.cloud.discoveryengine.v1beta.Answer.Step steps = 7; */ - public com.google.protobuf.ProtocolStringList getRelatedQuestionsList() { - relatedQuestions_.makeImmutable(); - return relatedQuestions_; + public Builder addAllSteps( + java.lang.Iterable values) { + if (stepsBuilder_ == null) { + ensureStepsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, steps_); + onChanged(); + } else { + stepsBuilder_.addAllMessages(values); + } + return this; } /** * * *
            -     * Suggested related questions.
            +     * Answer generation steps.
                  * 
            * - * repeated string related_questions = 6; - * - * @return The count of relatedQuestions. + * repeated .google.cloud.discoveryengine.v1beta.Answer.Step steps = 7; */ - public int getRelatedQuestionsCount() { - return relatedQuestions_.size(); + public Builder clearSteps() { + if (stepsBuilder_ == null) { + steps_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000200); + onChanged(); + } else { + stepsBuilder_.clear(); + } + return this; } /** * * *
            -     * Suggested related questions.
            -     * 
            - * - * repeated string related_questions = 6; + * Answer generation steps. + *
            * - * @param index The index of the element to return. - * @return The relatedQuestions at the given index. + * repeated .google.cloud.discoveryengine.v1beta.Answer.Step steps = 7; */ - public java.lang.String getRelatedQuestions(int index) { - return relatedQuestions_.get(index); + public Builder removeSteps(int index) { + if (stepsBuilder_ == null) { + ensureStepsIsMutable(); + steps_.remove(index); + onChanged(); + } else { + stepsBuilder_.remove(index); + } + return this; } /** * * *
            -     * Suggested related questions.
            +     * Answer generation steps.
                  * 
            * - * repeated string related_questions = 6; - * - * @param index The index of the value to return. - * @return The bytes of the relatedQuestions at the given index. + * repeated .google.cloud.discoveryengine.v1beta.Answer.Step steps = 7; */ - public com.google.protobuf.ByteString getRelatedQuestionsBytes(int index) { - return relatedQuestions_.getByteString(index); + public com.google.cloud.discoveryengine.v1beta.Answer.Step.Builder getStepsBuilder(int index) { + return internalGetStepsFieldBuilder().getBuilder(index); } /** * * *
            -     * Suggested related questions.
            +     * Answer generation steps.
                  * 
            * - * repeated string related_questions = 6; - * - * @param index The index to set the value at. - * @param value The relatedQuestions to set. - * @return This builder for chaining. + * repeated .google.cloud.discoveryengine.v1beta.Answer.Step steps = 7; */ - public Builder setRelatedQuestions(int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); + public com.google.cloud.discoveryengine.v1beta.Answer.StepOrBuilder getStepsOrBuilder( + int index) { + if (stepsBuilder_ == null) { + return steps_.get(index); + } else { + return stepsBuilder_.getMessageOrBuilder(index); } - ensureRelatedQuestionsIsMutable(); - relatedQuestions_.set(index, value); - bitField0_ |= 0x00000020; - onChanged(); - return this; } /** * * *
            -     * Suggested related questions.
            +     * Answer generation steps.
                  * 
            * - * repeated string related_questions = 6; - * - * @param value The relatedQuestions to add. - * @return This builder for chaining. + * repeated .google.cloud.discoveryengine.v1beta.Answer.Step steps = 7; */ - public Builder addRelatedQuestions(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); + public java.util.List + getStepsOrBuilderList() { + if (stepsBuilder_ != null) { + return stepsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(steps_); } - ensureRelatedQuestionsIsMutable(); - relatedQuestions_.add(value); - bitField0_ |= 0x00000020; - onChanged(); - return this; } /** * * *
            -     * Suggested related questions.
            +     * Answer generation steps.
                  * 
            * - * repeated string related_questions = 6; - * - * @param values The relatedQuestions to add. - * @return This builder for chaining. + * repeated .google.cloud.discoveryengine.v1beta.Answer.Step steps = 7; */ - public Builder addAllRelatedQuestions(java.lang.Iterable values) { - ensureRelatedQuestionsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, relatedQuestions_); - bitField0_ |= 0x00000020; - onChanged(); - return this; + public com.google.cloud.discoveryengine.v1beta.Answer.Step.Builder addStepsBuilder() { + return internalGetStepsFieldBuilder() + .addBuilder(com.google.cloud.discoveryengine.v1beta.Answer.Step.getDefaultInstance()); } /** * * *
            -     * Suggested related questions.
            +     * Answer generation steps.
                  * 
            * - * repeated string related_questions = 6; - * - * @return This builder for chaining. + * repeated .google.cloud.discoveryengine.v1beta.Answer.Step steps = 7; */ - public Builder clearRelatedQuestions() { - relatedQuestions_ = com.google.protobuf.LazyStringArrayList.emptyList(); - bitField0_ = (bitField0_ & ~0x00000020); - ; - onChanged(); - return this; + public com.google.cloud.discoveryengine.v1beta.Answer.Step.Builder addStepsBuilder(int index) { + return internalGetStepsFieldBuilder() + .addBuilder( + index, com.google.cloud.discoveryengine.v1beta.Answer.Step.getDefaultInstance()); } /** * * *
            -     * Suggested related questions.
            +     * Answer generation steps.
                  * 
            * - * repeated string related_questions = 6; - * - * @param value The bytes of the relatedQuestions to add. - * @return This builder for chaining. + * repeated .google.cloud.discoveryengine.v1beta.Answer.Step steps = 7; */ - public Builder addRelatedQuestionsBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensureRelatedQuestionsIsMutable(); - relatedQuestions_.add(value); - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - - private java.util.List steps_ = - java.util.Collections.emptyList(); - - private void ensureStepsIsMutable() { - if (!((bitField0_ & 0x00000040) != 0)) { - steps_ = - new java.util.ArrayList(steps_); - bitField0_ |= 0x00000040; - } + public java.util.List + getStepsBuilderList() { + return internalGetStepsFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilder< com.google.cloud.discoveryengine.v1beta.Answer.Step, com.google.cloud.discoveryengine.v1beta.Answer.Step.Builder, com.google.cloud.discoveryengine.v1beta.Answer.StepOrBuilder> - stepsBuilder_; + internalGetStepsFieldBuilder() { + if (stepsBuilder_ == null) { + stepsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.discoveryengine.v1beta.Answer.Step, + com.google.cloud.discoveryengine.v1beta.Answer.Step.Builder, + com.google.cloud.discoveryengine.v1beta.Answer.StepOrBuilder>( + steps_, ((bitField0_ & 0x00000200) != 0), getParentForChildren(), isClean()); + steps_ = null; + } + return stepsBuilder_; + } + + private com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo + queryUnderstandingInfo_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo, + com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo.Builder, + com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfoOrBuilder> + queryUnderstandingInfoBuilder_; /** * * *
            -     * Answer generation steps.
            +     * Query understanding information.
                  * 
            * - * repeated .google.cloud.discoveryengine.v1beta.Answer.Step steps = 7; + * + * .google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo query_understanding_info = 10; + * + * + * @return Whether the queryUnderstandingInfo field is set. */ - public java.util.List getStepsList() { - if (stepsBuilder_ == null) { - return java.util.Collections.unmodifiableList(steps_); - } else { - return stepsBuilder_.getMessageList(); - } + public boolean hasQueryUnderstandingInfo() { + return ((bitField0_ & 0x00000400) != 0); } /** * * *
            -     * Answer generation steps.
            +     * Query understanding information.
                  * 
            * - * repeated .google.cloud.discoveryengine.v1beta.Answer.Step steps = 7; + * + * .google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo query_understanding_info = 10; + * + * + * @return The queryUnderstandingInfo. */ - public int getStepsCount() { - if (stepsBuilder_ == null) { - return steps_.size(); + public com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo + getQueryUnderstandingInfo() { + if (queryUnderstandingInfoBuilder_ == null) { + return queryUnderstandingInfo_ == null + ? com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo + .getDefaultInstance() + : queryUnderstandingInfo_; } else { - return stepsBuilder_.getCount(); + return queryUnderstandingInfoBuilder_.getMessage(); } } @@ -26294,39 +32905,49 @@ public int getStepsCount() { * * *
            -     * Answer generation steps.
            +     * Query understanding information.
                  * 
            * - * repeated .google.cloud.discoveryengine.v1beta.Answer.Step steps = 7; + * + * .google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo query_understanding_info = 10; + * */ - public com.google.cloud.discoveryengine.v1beta.Answer.Step getSteps(int index) { - if (stepsBuilder_ == null) { - return steps_.get(index); + public Builder setQueryUnderstandingInfo( + com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo value) { + if (queryUnderstandingInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + queryUnderstandingInfo_ = value; } else { - return stepsBuilder_.getMessage(index); + queryUnderstandingInfoBuilder_.setMessage(value); } + bitField0_ |= 0x00000400; + onChanged(); + return this; } /** * * *
            -     * Answer generation steps.
            +     * Query understanding information.
                  * 
            * - * repeated .google.cloud.discoveryengine.v1beta.Answer.Step steps = 7; + * + * .google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo query_understanding_info = 10; + * */ - public Builder setSteps(int index, com.google.cloud.discoveryengine.v1beta.Answer.Step value) { - if (stepsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureStepsIsMutable(); - steps_.set(index, value); - onChanged(); + public Builder setQueryUnderstandingInfo( + com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo.Builder + builderForValue) { + if (queryUnderstandingInfoBuilder_ == null) { + queryUnderstandingInfo_ = builderForValue.build(); } else { - stepsBuilder_.setMessage(index, value); + queryUnderstandingInfoBuilder_.setMessage(builderForValue.build()); } + bitField0_ |= 0x00000400; + onChanged(); return this; } @@ -26334,19 +32955,31 @@ public Builder setSteps(int index, com.google.cloud.discoveryengine.v1beta.Answe * * *
            -     * Answer generation steps.
            +     * Query understanding information.
                  * 
            * - * repeated .google.cloud.discoveryengine.v1beta.Answer.Step steps = 7; + * + * .google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo query_understanding_info = 10; + * */ - public Builder setSteps( - int index, com.google.cloud.discoveryengine.v1beta.Answer.Step.Builder builderForValue) { - if (stepsBuilder_ == null) { - ensureStepsIsMutable(); - steps_.set(index, builderForValue.build()); + public Builder mergeQueryUnderstandingInfo( + com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo value) { + if (queryUnderstandingInfoBuilder_ == null) { + if (((bitField0_ & 0x00000400) != 0) + && queryUnderstandingInfo_ != null + && queryUnderstandingInfo_ + != com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo + .getDefaultInstance()) { + getQueryUnderstandingInfoBuilder().mergeFrom(value); + } else { + queryUnderstandingInfo_ = value; + } + } else { + queryUnderstandingInfoBuilder_.mergeFrom(value); + } + if (queryUnderstandingInfo_ != null) { + bitField0_ |= 0x00000400; onChanged(); - } else { - stepsBuilder_.setMessage(index, builderForValue.build()); } return this; } @@ -26355,22 +32988,21 @@ public Builder setSteps( * * *
            -     * Answer generation steps.
            +     * Query understanding information.
                  * 
            * - * repeated .google.cloud.discoveryengine.v1beta.Answer.Step steps = 7; + * + * .google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo query_understanding_info = 10; + * */ - public Builder addSteps(com.google.cloud.discoveryengine.v1beta.Answer.Step value) { - if (stepsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureStepsIsMutable(); - steps_.add(value); - onChanged(); - } else { - stepsBuilder_.addMessage(value); + public Builder clearQueryUnderstandingInfo() { + bitField0_ = (bitField0_ & ~0x00000400); + queryUnderstandingInfo_ = null; + if (queryUnderstandingInfoBuilder_ != null) { + queryUnderstandingInfoBuilder_.dispose(); + queryUnderstandingInfoBuilder_ = null; } + onChanged(); return this; } @@ -26378,388 +33010,415 @@ public Builder addSteps(com.google.cloud.discoveryengine.v1beta.Answer.Step valu * * *
            -     * Answer generation steps.
            +     * Query understanding information.
                  * 
            * - * repeated .google.cloud.discoveryengine.v1beta.Answer.Step steps = 7; + * + * .google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo query_understanding_info = 10; + * */ - public Builder addSteps(int index, com.google.cloud.discoveryengine.v1beta.Answer.Step value) { - if (stepsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureStepsIsMutable(); - steps_.add(index, value); - onChanged(); - } else { - stepsBuilder_.addMessage(index, value); - } - return this; + public com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo.Builder + getQueryUnderstandingInfoBuilder() { + bitField0_ |= 0x00000400; + onChanged(); + return internalGetQueryUnderstandingInfoFieldBuilder().getBuilder(); } /** * * *
            -     * Answer generation steps.
            +     * Query understanding information.
                  * 
            * - * repeated .google.cloud.discoveryengine.v1beta.Answer.Step steps = 7; + * + * .google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo query_understanding_info = 10; + * */ - public Builder addSteps( - com.google.cloud.discoveryengine.v1beta.Answer.Step.Builder builderForValue) { - if (stepsBuilder_ == null) { - ensureStepsIsMutable(); - steps_.add(builderForValue.build()); - onChanged(); + public com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfoOrBuilder + getQueryUnderstandingInfoOrBuilder() { + if (queryUnderstandingInfoBuilder_ != null) { + return queryUnderstandingInfoBuilder_.getMessageOrBuilder(); } else { - stepsBuilder_.addMessage(builderForValue.build()); + return queryUnderstandingInfo_ == null + ? com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo + .getDefaultInstance() + : queryUnderstandingInfo_; } - return this; } /** * * *
            -     * Answer generation steps.
            +     * Query understanding information.
                  * 
            * - * repeated .google.cloud.discoveryengine.v1beta.Answer.Step steps = 7; + * + * .google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo query_understanding_info = 10; + * */ - public Builder addSteps( - int index, com.google.cloud.discoveryengine.v1beta.Answer.Step.Builder builderForValue) { - if (stepsBuilder_ == null) { - ensureStepsIsMutable(); - steps_.add(index, builderForValue.build()); - onChanged(); - } else { - stepsBuilder_.addMessage(index, builderForValue.build()); + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo, + com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo.Builder, + com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfoOrBuilder> + internalGetQueryUnderstandingInfoFieldBuilder() { + if (queryUnderstandingInfoBuilder_ == null) { + queryUnderstandingInfoBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo, + com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo.Builder, + com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfoOrBuilder>( + getQueryUnderstandingInfo(), getParentForChildren(), isClean()); + queryUnderstandingInfo_ = null; } - return this; + return queryUnderstandingInfoBuilder_; + } + + private com.google.protobuf.Internal.IntList answerSkippedReasons_ = emptyIntList(); + + private void ensureAnswerSkippedReasonsIsMutable() { + if (!answerSkippedReasons_.isModifiable()) { + answerSkippedReasons_ = makeMutableCopy(answerSkippedReasons_); + } + bitField0_ |= 0x00000800; } /** * * *
            -     * Answer generation steps.
            +     * Additional answer-skipped reasons. This provides the reason for ignored
            +     * cases. If nothing is skipped, this field is not set.
                  * 
            * - * repeated .google.cloud.discoveryengine.v1beta.Answer.Step steps = 7; + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.AnswerSkippedReason answer_skipped_reasons = 11; + * + * + * @return A list containing the answerSkippedReasons. */ - public Builder addAllSteps( - java.lang.Iterable values) { - if (stepsBuilder_ == null) { - ensureStepsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, steps_); - onChanged(); - } else { - stepsBuilder_.addAllMessages(values); - } - return this; + public java.util.List + getAnswerSkippedReasonsList() { + return new com.google.protobuf.Internal.IntListAdapter< + com.google.cloud.discoveryengine.v1beta.Answer.AnswerSkippedReason>( + answerSkippedReasons_, answerSkippedReasons_converter_); } /** * * *
            -     * Answer generation steps.
            +     * Additional answer-skipped reasons. This provides the reason for ignored
            +     * cases. If nothing is skipped, this field is not set.
                  * 
            * - * repeated .google.cloud.discoveryengine.v1beta.Answer.Step steps = 7; + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.AnswerSkippedReason answer_skipped_reasons = 11; + * + * + * @return The count of answerSkippedReasons. */ - public Builder clearSteps() { - if (stepsBuilder_ == null) { - steps_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000040); - onChanged(); - } else { - stepsBuilder_.clear(); - } - return this; + public int getAnswerSkippedReasonsCount() { + return answerSkippedReasons_.size(); } /** * * *
            -     * Answer generation steps.
            +     * Additional answer-skipped reasons. This provides the reason for ignored
            +     * cases. If nothing is skipped, this field is not set.
                  * 
            * - * repeated .google.cloud.discoveryengine.v1beta.Answer.Step steps = 7; + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.AnswerSkippedReason answer_skipped_reasons = 11; + * + * + * @param index The index of the element to return. + * @return The answerSkippedReasons at the given index. */ - public Builder removeSteps(int index) { - if (stepsBuilder_ == null) { - ensureStepsIsMutable(); - steps_.remove(index); - onChanged(); - } else { - stepsBuilder_.remove(index); - } - return this; + public com.google.cloud.discoveryengine.v1beta.Answer.AnswerSkippedReason + getAnswerSkippedReasons(int index) { + return answerSkippedReasons_converter_.convert(answerSkippedReasons_.getInt(index)); } /** * * *
            -     * Answer generation steps.
            +     * Additional answer-skipped reasons. This provides the reason for ignored
            +     * cases. If nothing is skipped, this field is not set.
                  * 
            * - * repeated .google.cloud.discoveryengine.v1beta.Answer.Step steps = 7; + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.AnswerSkippedReason answer_skipped_reasons = 11; + * + * + * @param index The index to set the value at. + * @param value The answerSkippedReasons to set. + * @return This builder for chaining. */ - public com.google.cloud.discoveryengine.v1beta.Answer.Step.Builder getStepsBuilder(int index) { - return internalGetStepsFieldBuilder().getBuilder(index); + public Builder setAnswerSkippedReasons( + int index, com.google.cloud.discoveryengine.v1beta.Answer.AnswerSkippedReason value) { + if (value == null) { + throw new NullPointerException(); + } + ensureAnswerSkippedReasonsIsMutable(); + answerSkippedReasons_.setInt(index, value.getNumber()); + onChanged(); + return this; } /** * * *
            -     * Answer generation steps.
            +     * Additional answer-skipped reasons. This provides the reason for ignored
            +     * cases. If nothing is skipped, this field is not set.
                  * 
            * - * repeated .google.cloud.discoveryengine.v1beta.Answer.Step steps = 7; + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.AnswerSkippedReason answer_skipped_reasons = 11; + * + * + * @param value The answerSkippedReasons to add. + * @return This builder for chaining. */ - public com.google.cloud.discoveryengine.v1beta.Answer.StepOrBuilder getStepsOrBuilder( - int index) { - if (stepsBuilder_ == null) { - return steps_.get(index); - } else { - return stepsBuilder_.getMessageOrBuilder(index); + public Builder addAnswerSkippedReasons( + com.google.cloud.discoveryengine.v1beta.Answer.AnswerSkippedReason value) { + if (value == null) { + throw new NullPointerException(); } + ensureAnswerSkippedReasonsIsMutable(); + answerSkippedReasons_.addInt(value.getNumber()); + onChanged(); + return this; } /** * * *
            -     * Answer generation steps.
            +     * Additional answer-skipped reasons. This provides the reason for ignored
            +     * cases. If nothing is skipped, this field is not set.
                  * 
            * - * repeated .google.cloud.discoveryengine.v1beta.Answer.Step steps = 7; + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.AnswerSkippedReason answer_skipped_reasons = 11; + * + * + * @param values The answerSkippedReasons to add. + * @return This builder for chaining. */ - public java.util.List - getStepsOrBuilderList() { - if (stepsBuilder_ != null) { - return stepsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(steps_); + public Builder addAllAnswerSkippedReasons( + java.lang.Iterable< + ? extends com.google.cloud.discoveryengine.v1beta.Answer.AnswerSkippedReason> + values) { + ensureAnswerSkippedReasonsIsMutable(); + for (com.google.cloud.discoveryengine.v1beta.Answer.AnswerSkippedReason value : values) { + answerSkippedReasons_.addInt(value.getNumber()); } + onChanged(); + return this; } /** * * *
            -     * Answer generation steps.
            +     * Additional answer-skipped reasons. This provides the reason for ignored
            +     * cases. If nothing is skipped, this field is not set.
                  * 
            * - * repeated .google.cloud.discoveryengine.v1beta.Answer.Step steps = 7; + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.AnswerSkippedReason answer_skipped_reasons = 11; + * + * + * @return This builder for chaining. */ - public com.google.cloud.discoveryengine.v1beta.Answer.Step.Builder addStepsBuilder() { - return internalGetStepsFieldBuilder() - .addBuilder(com.google.cloud.discoveryengine.v1beta.Answer.Step.getDefaultInstance()); + public Builder clearAnswerSkippedReasons() { + answerSkippedReasons_ = emptyIntList(); + bitField0_ = (bitField0_ & ~0x00000800); + onChanged(); + return this; } /** * * *
            -     * Answer generation steps.
            +     * Additional answer-skipped reasons. This provides the reason for ignored
            +     * cases. If nothing is skipped, this field is not set.
                  * 
            * - * repeated .google.cloud.discoveryengine.v1beta.Answer.Step steps = 7; + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.AnswerSkippedReason answer_skipped_reasons = 11; + * + * + * @return A list containing the enum numeric values on the wire for answerSkippedReasons. */ - public com.google.cloud.discoveryengine.v1beta.Answer.Step.Builder addStepsBuilder(int index) { - return internalGetStepsFieldBuilder() - .addBuilder( - index, com.google.cloud.discoveryengine.v1beta.Answer.Step.getDefaultInstance()); + public java.util.List getAnswerSkippedReasonsValueList() { + answerSkippedReasons_.makeImmutable(); + return answerSkippedReasons_; } /** * * *
            -     * Answer generation steps.
            +     * Additional answer-skipped reasons. This provides the reason for ignored
            +     * cases. If nothing is skipped, this field is not set.
                  * 
            * - * repeated .google.cloud.discoveryengine.v1beta.Answer.Step steps = 7; + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.AnswerSkippedReason answer_skipped_reasons = 11; + * + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of answerSkippedReasons at the given index. */ - public java.util.List - getStepsBuilderList() { - return internalGetStepsFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.discoveryengine.v1beta.Answer.Step, - com.google.cloud.discoveryengine.v1beta.Answer.Step.Builder, - com.google.cloud.discoveryengine.v1beta.Answer.StepOrBuilder> - internalGetStepsFieldBuilder() { - if (stepsBuilder_ == null) { - stepsBuilder_ = - new com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.discoveryengine.v1beta.Answer.Step, - com.google.cloud.discoveryengine.v1beta.Answer.Step.Builder, - com.google.cloud.discoveryengine.v1beta.Answer.StepOrBuilder>( - steps_, ((bitField0_ & 0x00000040) != 0), getParentForChildren(), isClean()); - steps_ = null; - } - return stepsBuilder_; + public int getAnswerSkippedReasonsValue(int index) { + return answerSkippedReasons_.getInt(index); } - private com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo - queryUnderstandingInfo_; - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo, - com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo.Builder, - com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfoOrBuilder> - queryUnderstandingInfoBuilder_; - /** * * *
            -     * Query understanding information.
            +     * Additional answer-skipped reasons. This provides the reason for ignored
            +     * cases. If nothing is skipped, this field is not set.
                  * 
            * * - * .google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo query_understanding_info = 10; + * repeated .google.cloud.discoveryengine.v1beta.Answer.AnswerSkippedReason answer_skipped_reasons = 11; * * - * @return Whether the queryUnderstandingInfo field is set. + * @param index The index to set the value at. + * @param value The enum numeric value on the wire for answerSkippedReasons to set. + * @return This builder for chaining. */ - public boolean hasQueryUnderstandingInfo() { - return ((bitField0_ & 0x00000080) != 0); + public Builder setAnswerSkippedReasonsValue(int index, int value) { + ensureAnswerSkippedReasonsIsMutable(); + answerSkippedReasons_.setInt(index, value); + onChanged(); + return this; } /** * * *
            -     * Query understanding information.
            +     * Additional answer-skipped reasons. This provides the reason for ignored
            +     * cases. If nothing is skipped, this field is not set.
                  * 
            * * - * .google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo query_understanding_info = 10; + * repeated .google.cloud.discoveryengine.v1beta.Answer.AnswerSkippedReason answer_skipped_reasons = 11; * * - * @return The queryUnderstandingInfo. + * @param value The enum numeric value on the wire for answerSkippedReasons to add. + * @return This builder for chaining. */ - public com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo - getQueryUnderstandingInfo() { - if (queryUnderstandingInfoBuilder_ == null) { - return queryUnderstandingInfo_ == null - ? com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo - .getDefaultInstance() - : queryUnderstandingInfo_; - } else { - return queryUnderstandingInfoBuilder_.getMessage(); - } + public Builder addAnswerSkippedReasonsValue(int value) { + ensureAnswerSkippedReasonsIsMutable(); + answerSkippedReasons_.addInt(value); + onChanged(); + return this; } /** * * *
            -     * Query understanding information.
            +     * Additional answer-skipped reasons. This provides the reason for ignored
            +     * cases. If nothing is skipped, this field is not set.
                  * 
            * * - * .google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo query_understanding_info = 10; + * repeated .google.cloud.discoveryengine.v1beta.Answer.AnswerSkippedReason answer_skipped_reasons = 11; * + * + * @param values The enum numeric values on the wire for answerSkippedReasons to add. + * @return This builder for chaining. */ - public Builder setQueryUnderstandingInfo( - com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo value) { - if (queryUnderstandingInfoBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - queryUnderstandingInfo_ = value; - } else { - queryUnderstandingInfoBuilder_.setMessage(value); + public Builder addAllAnswerSkippedReasonsValue(java.lang.Iterable values) { + ensureAnswerSkippedReasonsIsMutable(); + for (int value : values) { + answerSkippedReasons_.addInt(value); } - bitField0_ |= 0x00000080; onChanged(); return this; } + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + /** * * *
            -     * Query understanding information.
            +     * Output only. Answer creation timestamp.
                  * 
            * * - * .google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo query_understanding_info = 10; + * .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; * + * + * @return Whether the createTime field is set. */ - public Builder setQueryUnderstandingInfo( - com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo.Builder - builderForValue) { - if (queryUnderstandingInfoBuilder_ == null) { - queryUnderstandingInfo_ = builderForValue.build(); - } else { - queryUnderstandingInfoBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000080; - onChanged(); - return this; + public boolean hasCreateTime() { + return ((bitField0_ & 0x00001000) != 0); } /** * * *
            -     * Query understanding information.
            +     * Output only. Answer creation timestamp.
                  * 
            * * - * .google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo query_understanding_info = 10; + * .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; * + * + * @return The createTime. */ - public Builder mergeQueryUnderstandingInfo( - com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo value) { - if (queryUnderstandingInfoBuilder_ == null) { - if (((bitField0_ & 0x00000080) != 0) - && queryUnderstandingInfo_ != null - && queryUnderstandingInfo_ - != com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo - .getDefaultInstance()) { - getQueryUnderstandingInfoBuilder().mergeFrom(value); - } else { - queryUnderstandingInfo_ = value; - } + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; } else { - queryUnderstandingInfoBuilder_.mergeFrom(value); - } - if (queryUnderstandingInfo_ != null) { - bitField0_ |= 0x00000080; - onChanged(); + return createTimeBuilder_.getMessage(); } - return this; } /** * * *
            -     * Query understanding information.
            +     * Output only. Answer creation timestamp.
                  * 
            * * - * .google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo query_understanding_info = 10; + * .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ - public Builder clearQueryUnderstandingInfo() { - bitField0_ = (bitField0_ & ~0x00000080); - queryUnderstandingInfo_ = null; - if (queryUnderstandingInfoBuilder_ != null) { - queryUnderstandingInfoBuilder_.dispose(); - queryUnderstandingInfoBuilder_ = null; + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + } else { + createTimeBuilder_.setMessage(value); } + bitField0_ |= 0x00001000; onChanged(); return this; } @@ -26768,188 +33427,210 @@ public Builder clearQueryUnderstandingInfo() { * * *
            -     * Query understanding information.
            +     * Output only. Answer creation timestamp.
                  * 
            * * - * .google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo query_understanding_info = 10; + * .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ - public com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo.Builder - getQueryUnderstandingInfoBuilder() { - bitField0_ |= 0x00000080; + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00001000; onChanged(); - return internalGetQueryUnderstandingInfoFieldBuilder().getBuilder(); + return this; } /** * * *
            -     * Query understanding information.
            +     * Output only. Answer creation timestamp.
                  * 
            * * - * .google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo query_understanding_info = 10; + * .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ - public com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfoOrBuilder - getQueryUnderstandingInfoOrBuilder() { - if (queryUnderstandingInfoBuilder_ != null) { - return queryUnderstandingInfoBuilder_.getMessageOrBuilder(); + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 0x00001000) != 0) + && createTime_ != null + && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } } else { - return queryUnderstandingInfo_ == null - ? com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo - .getDefaultInstance() - : queryUnderstandingInfo_; + createTimeBuilder_.mergeFrom(value); } + if (createTime_ != null) { + bitField0_ |= 0x00001000; + onChanged(); + } + return this; } /** * * *
            -     * Query understanding information.
            +     * Output only. Answer creation timestamp.
                  * 
            * * - * .google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo query_understanding_info = 10; + * .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo, - com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo.Builder, - com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfoOrBuilder> - internalGetQueryUnderstandingInfoFieldBuilder() { - if (queryUnderstandingInfoBuilder_ == null) { - queryUnderstandingInfoBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo, - com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo.Builder, - com.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfoOrBuilder>( - getQueryUnderstandingInfo(), getParentForChildren(), isClean()); - queryUnderstandingInfo_ = null; - } - return queryUnderstandingInfoBuilder_; - } - - private com.google.protobuf.Internal.IntList answerSkippedReasons_ = emptyIntList(); - - private void ensureAnswerSkippedReasonsIsMutable() { - if (!answerSkippedReasons_.isModifiable()) { - answerSkippedReasons_ = makeMutableCopy(answerSkippedReasons_); + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00001000); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; } - bitField0_ |= 0x00000100; + onChanged(); + return this; } /** * * *
            -     * Additional answer-skipped reasons. This provides the reason for ignored
            -     * cases. If nothing is skipped, this field is not set.
            +     * Output only. Answer creation timestamp.
                  * 
            * * - * repeated .google.cloud.discoveryengine.v1beta.Answer.AnswerSkippedReason answer_skipped_reasons = 11; + * .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; * - * - * @return A list containing the answerSkippedReasons. */ - public java.util.List - getAnswerSkippedReasonsList() { - return new com.google.protobuf.Internal.IntListAdapter< - com.google.cloud.discoveryengine.v1beta.Answer.AnswerSkippedReason>( - answerSkippedReasons_, answerSkippedReasons_converter_); + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00001000; + onChanged(); + return internalGetCreateTimeFieldBuilder().getBuilder(); } /** * * *
            -     * Additional answer-skipped reasons. This provides the reason for ignored
            -     * cases. If nothing is skipped, this field is not set.
            +     * Output only. Answer creation timestamp.
                  * 
            * * - * repeated .google.cloud.discoveryengine.v1beta.Answer.AnswerSkippedReason answer_skipped_reasons = 11; + * .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; * + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } + + /** * - * @return The count of answerSkippedReasons. + * + *
            +     * Output only. Answer creation timestamp.
            +     * 
            + * + * + * .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ - public int getAnswerSkippedReasonsCount() { - return answerSkippedReasons_.size(); + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + internalGetCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; } + private com.google.protobuf.Timestamp completeTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + completeTimeBuilder_; + /** * * *
            -     * Additional answer-skipped reasons. This provides the reason for ignored
            -     * cases. If nothing is skipped, this field is not set.
            +     * Output only. Answer completed timestamp.
                  * 
            * * - * repeated .google.cloud.discoveryengine.v1beta.Answer.AnswerSkippedReason answer_skipped_reasons = 11; + * .google.protobuf.Timestamp complete_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * - * @param index The index of the element to return. - * @return The answerSkippedReasons at the given index. + * @return Whether the completeTime field is set. */ - public com.google.cloud.discoveryengine.v1beta.Answer.AnswerSkippedReason - getAnswerSkippedReasons(int index) { - return answerSkippedReasons_converter_.convert(answerSkippedReasons_.getInt(index)); + public boolean hasCompleteTime() { + return ((bitField0_ & 0x00002000) != 0); } /** * * *
            -     * Additional answer-skipped reasons. This provides the reason for ignored
            -     * cases. If nothing is skipped, this field is not set.
            +     * Output only. Answer completed timestamp.
                  * 
            * * - * repeated .google.cloud.discoveryengine.v1beta.Answer.AnswerSkippedReason answer_skipped_reasons = 11; + * .google.protobuf.Timestamp complete_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * - * @param index The index to set the value at. - * @param value The answerSkippedReasons to set. - * @return This builder for chaining. + * @return The completeTime. */ - public Builder setAnswerSkippedReasons( - int index, com.google.cloud.discoveryengine.v1beta.Answer.AnswerSkippedReason value) { - if (value == null) { - throw new NullPointerException(); + public com.google.protobuf.Timestamp getCompleteTime() { + if (completeTimeBuilder_ == null) { + return completeTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : completeTime_; + } else { + return completeTimeBuilder_.getMessage(); } - ensureAnswerSkippedReasonsIsMutable(); - answerSkippedReasons_.setInt(index, value.getNumber()); - onChanged(); - return this; } /** * * *
            -     * Additional answer-skipped reasons. This provides the reason for ignored
            -     * cases. If nothing is skipped, this field is not set.
            +     * Output only. Answer completed timestamp.
                  * 
            * * - * repeated .google.cloud.discoveryengine.v1beta.Answer.AnswerSkippedReason answer_skipped_reasons = 11; + * .google.protobuf.Timestamp complete_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; * - * - * @param value The answerSkippedReasons to add. - * @return This builder for chaining. */ - public Builder addAnswerSkippedReasons( - com.google.cloud.discoveryengine.v1beta.Answer.AnswerSkippedReason value) { - if (value == null) { - throw new NullPointerException(); + public Builder setCompleteTime(com.google.protobuf.Timestamp value) { + if (completeTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + completeTime_ = value; + } else { + completeTimeBuilder_.setMessage(value); } - ensureAnswerSkippedReasonsIsMutable(); - answerSkippedReasons_.addInt(value.getNumber()); + bitField0_ |= 0x00002000; onChanged(); return this; } @@ -26958,25 +33639,20 @@ public Builder addAnswerSkippedReasons( * * *
            -     * Additional answer-skipped reasons. This provides the reason for ignored
            -     * cases. If nothing is skipped, this field is not set.
            +     * Output only. Answer completed timestamp.
                  * 
            * * - * repeated .google.cloud.discoveryengine.v1beta.Answer.AnswerSkippedReason answer_skipped_reasons = 11; + * .google.protobuf.Timestamp complete_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; * - * - * @param values The answerSkippedReasons to add. - * @return This builder for chaining. */ - public Builder addAllAnswerSkippedReasons( - java.lang.Iterable< - ? extends com.google.cloud.discoveryengine.v1beta.Answer.AnswerSkippedReason> - values) { - ensureAnswerSkippedReasonsIsMutable(); - for (com.google.cloud.discoveryengine.v1beta.Answer.AnswerSkippedReason value : values) { - answerSkippedReasons_.addInt(value.getNumber()); + public Builder setCompleteTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (completeTimeBuilder_ == null) { + completeTime_ = builderForValue.build(); + } else { + completeTimeBuilder_.setMessage(builderForValue.build()); } + bitField0_ |= 0x00002000; onChanged(); return this; } @@ -26985,20 +33661,29 @@ public Builder addAllAnswerSkippedReasons( * * *
            -     * Additional answer-skipped reasons. This provides the reason for ignored
            -     * cases. If nothing is skipped, this field is not set.
            +     * Output only. Answer completed timestamp.
                  * 
            * * - * repeated .google.cloud.discoveryengine.v1beta.Answer.AnswerSkippedReason answer_skipped_reasons = 11; + * .google.protobuf.Timestamp complete_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; * - * - * @return This builder for chaining. */ - public Builder clearAnswerSkippedReasons() { - answerSkippedReasons_ = emptyIntList(); - bitField0_ = (bitField0_ & ~0x00000100); - onChanged(); + public Builder mergeCompleteTime(com.google.protobuf.Timestamp value) { + if (completeTimeBuilder_ == null) { + if (((bitField0_ & 0x00002000) != 0) + && completeTime_ != null + && completeTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCompleteTimeBuilder().mergeFrom(value); + } else { + completeTime_ = value; + } + } else { + completeTimeBuilder_.mergeFrom(value); + } + if (completeTime_ != null) { + bitField0_ |= 0x00002000; + onChanged(); + } return this; } @@ -27006,153 +33691,163 @@ public Builder clearAnswerSkippedReasons() { * * *
            -     * Additional answer-skipped reasons. This provides the reason for ignored
            -     * cases. If nothing is skipped, this field is not set.
            +     * Output only. Answer completed timestamp.
                  * 
            * * - * repeated .google.cloud.discoveryengine.v1beta.Answer.AnswerSkippedReason answer_skipped_reasons = 11; + * .google.protobuf.Timestamp complete_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; * - * - * @return A list containing the enum numeric values on the wire for answerSkippedReasons. */ - public java.util.List getAnswerSkippedReasonsValueList() { - answerSkippedReasons_.makeImmutable(); - return answerSkippedReasons_; + public Builder clearCompleteTime() { + bitField0_ = (bitField0_ & ~0x00002000); + completeTime_ = null; + if (completeTimeBuilder_ != null) { + completeTimeBuilder_.dispose(); + completeTimeBuilder_ = null; + } + onChanged(); + return this; } /** * * *
            -     * Additional answer-skipped reasons. This provides the reason for ignored
            -     * cases. If nothing is skipped, this field is not set.
            +     * Output only. Answer completed timestamp.
                  * 
            * * - * repeated .google.cloud.discoveryengine.v1beta.Answer.AnswerSkippedReason answer_skipped_reasons = 11; + * .google.protobuf.Timestamp complete_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; * - * - * @param index The index of the value to return. - * @return The enum numeric value on the wire of answerSkippedReasons at the given index. */ - public int getAnswerSkippedReasonsValue(int index) { - return answerSkippedReasons_.getInt(index); + public com.google.protobuf.Timestamp.Builder getCompleteTimeBuilder() { + bitField0_ |= 0x00002000; + onChanged(); + return internalGetCompleteTimeFieldBuilder().getBuilder(); } /** * * *
            -     * Additional answer-skipped reasons. This provides the reason for ignored
            -     * cases. If nothing is skipped, this field is not set.
            +     * Output only. Answer completed timestamp.
                  * 
            * * - * repeated .google.cloud.discoveryengine.v1beta.Answer.AnswerSkippedReason answer_skipped_reasons = 11; + * .google.protobuf.Timestamp complete_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; * - * - * @param index The index to set the value at. - * @param value The enum numeric value on the wire for answerSkippedReasons to set. - * @return This builder for chaining. */ - public Builder setAnswerSkippedReasonsValue(int index, int value) { - ensureAnswerSkippedReasonsIsMutable(); - answerSkippedReasons_.setInt(index, value); - onChanged(); - return this; + public com.google.protobuf.TimestampOrBuilder getCompleteTimeOrBuilder() { + if (completeTimeBuilder_ != null) { + return completeTimeBuilder_.getMessageOrBuilder(); + } else { + return completeTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : completeTime_; + } } /** * * *
            -     * Additional answer-skipped reasons. This provides the reason for ignored
            -     * cases. If nothing is skipped, this field is not set.
            +     * Output only. Answer completed timestamp.
                  * 
            * * - * repeated .google.cloud.discoveryengine.v1beta.Answer.AnswerSkippedReason answer_skipped_reasons = 11; + * .google.protobuf.Timestamp complete_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; * - * - * @param value The enum numeric value on the wire for answerSkippedReasons to add. - * @return This builder for chaining. */ - public Builder addAnswerSkippedReasonsValue(int value) { - ensureAnswerSkippedReasonsIsMutable(); - answerSkippedReasons_.addInt(value); - onChanged(); - return this; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + internalGetCompleteTimeFieldBuilder() { + if (completeTimeBuilder_ == null) { + completeTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCompleteTime(), getParentForChildren(), isClean()); + completeTime_ = null; + } + return completeTimeBuilder_; + } + + private java.util.List safetyRatings_ = + java.util.Collections.emptyList(); + + private void ensureSafetyRatingsIsMutable() { + if (!((bitField0_ & 0x00004000) != 0)) { + safetyRatings_ = + new java.util.ArrayList( + safetyRatings_); + bitField0_ |= 0x00004000; + } } + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.discoveryengine.v1beta.SafetyRating, + com.google.cloud.discoveryengine.v1beta.SafetyRating.Builder, + com.google.cloud.discoveryengine.v1beta.SafetyRatingOrBuilder> + safetyRatingsBuilder_; + /** * * *
            -     * Additional answer-skipped reasons. This provides the reason for ignored
            -     * cases. If nothing is skipped, this field is not set.
            +     * Optional. Safety ratings.
                  * 
            * * - * repeated .google.cloud.discoveryengine.v1beta.Answer.AnswerSkippedReason answer_skipped_reasons = 11; + * repeated .google.cloud.discoveryengine.v1beta.SafetyRating safety_ratings = 14 [(.google.api.field_behavior) = OPTIONAL]; * - * - * @param values The enum numeric values on the wire for answerSkippedReasons to add. - * @return This builder for chaining. */ - public Builder addAllAnswerSkippedReasonsValue(java.lang.Iterable values) { - ensureAnswerSkippedReasonsIsMutable(); - for (int value : values) { - answerSkippedReasons_.addInt(value); + public java.util.List + getSafetyRatingsList() { + if (safetyRatingsBuilder_ == null) { + return java.util.Collections.unmodifiableList(safetyRatings_); + } else { + return safetyRatingsBuilder_.getMessageList(); } - onChanged(); - return this; } - private com.google.protobuf.Timestamp createTime_; - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - createTimeBuilder_; - /** * * *
            -     * Output only. Answer creation timestamp.
            +     * Optional. Safety ratings.
                  * 
            * * - * .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * repeated .google.cloud.discoveryengine.v1beta.SafetyRating safety_ratings = 14 [(.google.api.field_behavior) = OPTIONAL]; * - * - * @return Whether the createTime field is set. */ - public boolean hasCreateTime() { - return ((bitField0_ & 0x00000200) != 0); + public int getSafetyRatingsCount() { + if (safetyRatingsBuilder_ == null) { + return safetyRatings_.size(); + } else { + return safetyRatingsBuilder_.getCount(); + } } /** * * *
            -     * Output only. Answer creation timestamp.
            +     * Optional. Safety ratings.
                  * 
            * * - * .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * repeated .google.cloud.discoveryengine.v1beta.SafetyRating safety_ratings = 14 [(.google.api.field_behavior) = OPTIONAL]; * - * - * @return The createTime. */ - public com.google.protobuf.Timestamp getCreateTime() { - if (createTimeBuilder_ == null) { - return createTime_ == null - ? com.google.protobuf.Timestamp.getDefaultInstance() - : createTime_; + public com.google.cloud.discoveryengine.v1beta.SafetyRating getSafetyRatings(int index) { + if (safetyRatingsBuilder_ == null) { + return safetyRatings_.get(index); } else { - return createTimeBuilder_.getMessage(); + return safetyRatingsBuilder_.getMessage(index); } } @@ -27160,24 +33855,25 @@ public com.google.protobuf.Timestamp getCreateTime() { * * *
            -     * Output only. Answer creation timestamp.
            +     * Optional. Safety ratings.
                  * 
            * * - * .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * repeated .google.cloud.discoveryengine.v1beta.SafetyRating safety_ratings = 14 [(.google.api.field_behavior) = OPTIONAL]; * */ - public Builder setCreateTime(com.google.protobuf.Timestamp value) { - if (createTimeBuilder_ == null) { + public Builder setSafetyRatings( + int index, com.google.cloud.discoveryengine.v1beta.SafetyRating value) { + if (safetyRatingsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - createTime_ = value; + ensureSafetyRatingsIsMutable(); + safetyRatings_.set(index, value); + onChanged(); } else { - createTimeBuilder_.setMessage(value); + safetyRatingsBuilder_.setMessage(index, value); } - bitField0_ |= 0x00000200; - onChanged(); return this; } @@ -27185,21 +33881,22 @@ public Builder setCreateTime(com.google.protobuf.Timestamp value) { * * *
            -     * Output only. Answer creation timestamp.
            +     * Optional. Safety ratings.
                  * 
            * * - * .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * repeated .google.cloud.discoveryengine.v1beta.SafetyRating safety_ratings = 14 [(.google.api.field_behavior) = OPTIONAL]; * */ - public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { - if (createTimeBuilder_ == null) { - createTime_ = builderForValue.build(); + public Builder setSafetyRatings( + int index, com.google.cloud.discoveryengine.v1beta.SafetyRating.Builder builderForValue) { + if (safetyRatingsBuilder_ == null) { + ensureSafetyRatingsIsMutable(); + safetyRatings_.set(index, builderForValue.build()); + onChanged(); } else { - createTimeBuilder_.setMessage(builderForValue.build()); + safetyRatingsBuilder_.setMessage(index, builderForValue.build()); } - bitField0_ |= 0x00000200; - onChanged(); return this; } @@ -27207,28 +33904,23 @@ public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForVal * * *
            -     * Output only. Answer creation timestamp.
            +     * Optional. Safety ratings.
                  * 
            * * - * .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * repeated .google.cloud.discoveryengine.v1beta.SafetyRating safety_ratings = 14 [(.google.api.field_behavior) = OPTIONAL]; * */ - public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { - if (createTimeBuilder_ == null) { - if (((bitField0_ & 0x00000200) != 0) - && createTime_ != null - && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { - getCreateTimeBuilder().mergeFrom(value); - } else { - createTime_ = value; + public Builder addSafetyRatings(com.google.cloud.discoveryengine.v1beta.SafetyRating value) { + if (safetyRatingsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); } - } else { - createTimeBuilder_.mergeFrom(value); - } - if (createTime_ != null) { - bitField0_ |= 0x00000200; + ensureSafetyRatingsIsMutable(); + safetyRatings_.add(value); onChanged(); + } else { + safetyRatingsBuilder_.addMessage(value); } return this; } @@ -27237,21 +33929,25 @@ public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { * * *
            -     * Output only. Answer creation timestamp.
            +     * Optional. Safety ratings.
                  * 
            * * - * .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * repeated .google.cloud.discoveryengine.v1beta.SafetyRating safety_ratings = 14 [(.google.api.field_behavior) = OPTIONAL]; * */ - public Builder clearCreateTime() { - bitField0_ = (bitField0_ & ~0x00000200); - createTime_ = null; - if (createTimeBuilder_ != null) { - createTimeBuilder_.dispose(); - createTimeBuilder_ = null; + public Builder addSafetyRatings( + int index, com.google.cloud.discoveryengine.v1beta.SafetyRating value) { + if (safetyRatingsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSafetyRatingsIsMutable(); + safetyRatings_.add(index, value); + onChanged(); + } else { + safetyRatingsBuilder_.addMessage(index, value); } - onChanged(); return this; } @@ -27259,137 +33955,112 @@ public Builder clearCreateTime() { * * *
            -     * Output only. Answer creation timestamp.
            -     * 
            - * - * - * .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { - bitField0_ |= 0x00000200; - onChanged(); - return internalGetCreateTimeFieldBuilder().getBuilder(); - } - - /** - * - * - *
            -     * Output only. Answer creation timestamp.
            +     * Optional. Safety ratings.
                  * 
            * * - * .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * repeated .google.cloud.discoveryengine.v1beta.SafetyRating safety_ratings = 14 [(.google.api.field_behavior) = OPTIONAL]; * */ - public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { - if (createTimeBuilder_ != null) { - return createTimeBuilder_.getMessageOrBuilder(); + public Builder addSafetyRatings( + com.google.cloud.discoveryengine.v1beta.SafetyRating.Builder builderForValue) { + if (safetyRatingsBuilder_ == null) { + ensureSafetyRatingsIsMutable(); + safetyRatings_.add(builderForValue.build()); + onChanged(); } else { - return createTime_ == null - ? com.google.protobuf.Timestamp.getDefaultInstance() - : createTime_; + safetyRatingsBuilder_.addMessage(builderForValue.build()); } + return this; } /** * * *
            -     * Output only. Answer creation timestamp.
            +     * Optional. Safety ratings.
                  * 
            * * - * .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * repeated .google.cloud.discoveryengine.v1beta.SafetyRating safety_ratings = 14 [(.google.api.field_behavior) = OPTIONAL]; * */ - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - internalGetCreateTimeFieldBuilder() { - if (createTimeBuilder_ == null) { - createTimeBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder>( - getCreateTime(), getParentForChildren(), isClean()); - createTime_ = null; + public Builder addSafetyRatings( + int index, com.google.cloud.discoveryengine.v1beta.SafetyRating.Builder builderForValue) { + if (safetyRatingsBuilder_ == null) { + ensureSafetyRatingsIsMutable(); + safetyRatings_.add(index, builderForValue.build()); + onChanged(); + } else { + safetyRatingsBuilder_.addMessage(index, builderForValue.build()); } - return createTimeBuilder_; + return this; } - private com.google.protobuf.Timestamp completeTime_; - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - completeTimeBuilder_; - /** * * *
            -     * Output only. Answer completed timestamp.
            +     * Optional. Safety ratings.
                  * 
            * * - * .google.protobuf.Timestamp complete_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * repeated .google.cloud.discoveryengine.v1beta.SafetyRating safety_ratings = 14 [(.google.api.field_behavior) = OPTIONAL]; * - * - * @return Whether the completeTime field is set. */ - public boolean hasCompleteTime() { - return ((bitField0_ & 0x00000400) != 0); + public Builder addAllSafetyRatings( + java.lang.Iterable values) { + if (safetyRatingsBuilder_ == null) { + ensureSafetyRatingsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, safetyRatings_); + onChanged(); + } else { + safetyRatingsBuilder_.addAllMessages(values); + } + return this; } /** * * *
            -     * Output only. Answer completed timestamp.
            +     * Optional. Safety ratings.
                  * 
            * * - * .google.protobuf.Timestamp complete_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * repeated .google.cloud.discoveryengine.v1beta.SafetyRating safety_ratings = 14 [(.google.api.field_behavior) = OPTIONAL]; * - * - * @return The completeTime. */ - public com.google.protobuf.Timestamp getCompleteTime() { - if (completeTimeBuilder_ == null) { - return completeTime_ == null - ? com.google.protobuf.Timestamp.getDefaultInstance() - : completeTime_; + public Builder clearSafetyRatings() { + if (safetyRatingsBuilder_ == null) { + safetyRatings_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00004000); + onChanged(); } else { - return completeTimeBuilder_.getMessage(); + safetyRatingsBuilder_.clear(); } + return this; } /** * * *
            -     * Output only. Answer completed timestamp.
            +     * Optional. Safety ratings.
                  * 
            * * - * .google.protobuf.Timestamp complete_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * repeated .google.cloud.discoveryengine.v1beta.SafetyRating safety_ratings = 14 [(.google.api.field_behavior) = OPTIONAL]; * */ - public Builder setCompleteTime(com.google.protobuf.Timestamp value) { - if (completeTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - completeTime_ = value; + public Builder removeSafetyRatings(int index) { + if (safetyRatingsBuilder_ == null) { + ensureSafetyRatingsIsMutable(); + safetyRatings_.remove(index); + onChanged(); } else { - completeTimeBuilder_.setMessage(value); + safetyRatingsBuilder_.remove(index); } - bitField0_ |= 0x00000400; - onChanged(); return this; } @@ -27397,140 +34068,126 @@ public Builder setCompleteTime(com.google.protobuf.Timestamp value) { * * *
            -     * Output only. Answer completed timestamp.
            +     * Optional. Safety ratings.
                  * 
            * * - * .google.protobuf.Timestamp complete_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * repeated .google.cloud.discoveryengine.v1beta.SafetyRating safety_ratings = 14 [(.google.api.field_behavior) = OPTIONAL]; * */ - public Builder setCompleteTime(com.google.protobuf.Timestamp.Builder builderForValue) { - if (completeTimeBuilder_ == null) { - completeTime_ = builderForValue.build(); - } else { - completeTimeBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000400; - onChanged(); - return this; + public com.google.cloud.discoveryengine.v1beta.SafetyRating.Builder getSafetyRatingsBuilder( + int index) { + return internalGetSafetyRatingsFieldBuilder().getBuilder(index); } /** * * *
            -     * Output only. Answer completed timestamp.
            +     * Optional. Safety ratings.
                  * 
            * * - * .google.protobuf.Timestamp complete_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * repeated .google.cloud.discoveryengine.v1beta.SafetyRating safety_ratings = 14 [(.google.api.field_behavior) = OPTIONAL]; * */ - public Builder mergeCompleteTime(com.google.protobuf.Timestamp value) { - if (completeTimeBuilder_ == null) { - if (((bitField0_ & 0x00000400) != 0) - && completeTime_ != null - && completeTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { - getCompleteTimeBuilder().mergeFrom(value); - } else { - completeTime_ = value; - } + public com.google.cloud.discoveryengine.v1beta.SafetyRatingOrBuilder getSafetyRatingsOrBuilder( + int index) { + if (safetyRatingsBuilder_ == null) { + return safetyRatings_.get(index); } else { - completeTimeBuilder_.mergeFrom(value); - } - if (completeTime_ != null) { - bitField0_ |= 0x00000400; - onChanged(); + return safetyRatingsBuilder_.getMessageOrBuilder(index); } - return this; } /** * * *
            -     * Output only. Answer completed timestamp.
            +     * Optional. Safety ratings.
                  * 
            * * - * .google.protobuf.Timestamp complete_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * repeated .google.cloud.discoveryengine.v1beta.SafetyRating safety_ratings = 14 [(.google.api.field_behavior) = OPTIONAL]; * */ - public Builder clearCompleteTime() { - bitField0_ = (bitField0_ & ~0x00000400); - completeTime_ = null; - if (completeTimeBuilder_ != null) { - completeTimeBuilder_.dispose(); - completeTimeBuilder_ = null; + public java.util.List + getSafetyRatingsOrBuilderList() { + if (safetyRatingsBuilder_ != null) { + return safetyRatingsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(safetyRatings_); } - onChanged(); - return this; } /** * * *
            -     * Output only. Answer completed timestamp.
            +     * Optional. Safety ratings.
                  * 
            * * - * .google.protobuf.Timestamp complete_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * repeated .google.cloud.discoveryengine.v1beta.SafetyRating safety_ratings = 14 [(.google.api.field_behavior) = OPTIONAL]; * */ - public com.google.protobuf.Timestamp.Builder getCompleteTimeBuilder() { - bitField0_ |= 0x00000400; - onChanged(); - return internalGetCompleteTimeFieldBuilder().getBuilder(); + public com.google.cloud.discoveryengine.v1beta.SafetyRating.Builder addSafetyRatingsBuilder() { + return internalGetSafetyRatingsFieldBuilder() + .addBuilder(com.google.cloud.discoveryengine.v1beta.SafetyRating.getDefaultInstance()); } /** * * *
            -     * Output only. Answer completed timestamp.
            +     * Optional. Safety ratings.
                  * 
            * * - * .google.protobuf.Timestamp complete_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * repeated .google.cloud.discoveryengine.v1beta.SafetyRating safety_ratings = 14 [(.google.api.field_behavior) = OPTIONAL]; * */ - public com.google.protobuf.TimestampOrBuilder getCompleteTimeOrBuilder() { - if (completeTimeBuilder_ != null) { - return completeTimeBuilder_.getMessageOrBuilder(); - } else { - return completeTime_ == null - ? com.google.protobuf.Timestamp.getDefaultInstance() - : completeTime_; - } + public com.google.cloud.discoveryengine.v1beta.SafetyRating.Builder addSafetyRatingsBuilder( + int index) { + return internalGetSafetyRatingsFieldBuilder() + .addBuilder( + index, com.google.cloud.discoveryengine.v1beta.SafetyRating.getDefaultInstance()); } /** * * *
            -     * Output only. Answer completed timestamp.
            +     * Optional. Safety ratings.
                  * 
            * * - * .google.protobuf.Timestamp complete_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * repeated .google.cloud.discoveryengine.v1beta.SafetyRating safety_ratings = 14 [(.google.api.field_behavior) = OPTIONAL]; * */ - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - internalGetCompleteTimeFieldBuilder() { - if (completeTimeBuilder_ == null) { - completeTimeBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder>( - getCompleteTime(), getParentForChildren(), isClean()); - completeTime_ = null; - } - return completeTimeBuilder_; + public java.util.List + getSafetyRatingsBuilderList() { + return internalGetSafetyRatingsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.discoveryengine.v1beta.SafetyRating, + com.google.cloud.discoveryengine.v1beta.SafetyRating.Builder, + com.google.cloud.discoveryengine.v1beta.SafetyRatingOrBuilder> + internalGetSafetyRatingsFieldBuilder() { + if (safetyRatingsBuilder_ == null) { + safetyRatingsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.discoveryengine.v1beta.SafetyRating, + com.google.cloud.discoveryengine.v1beta.SafetyRating.Builder, + com.google.cloud.discoveryengine.v1beta.SafetyRatingOrBuilder>( + safetyRatings_, + ((bitField0_ & 0x00004000) != 0), + getParentForChildren(), + isClean()); + safetyRatings_ = null; + } + return safetyRatingsBuilder_; } // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.Answer) diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/AnswerGenerationSpec.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/AnswerGenerationSpec.java new file mode 100644 index 000000000000..051d5b2b8b49 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/AnswerGenerationSpec.java @@ -0,0 +1,2426 @@ +/* + * 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/cloud/discoveryengine/v1beta/serving_config.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.discoveryengine.v1beta; + +/** + * + * + *
            + * The specification for answer generation.
            + * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.AnswerGenerationSpec} + */ +@com.google.protobuf.Generated +public final class AnswerGenerationSpec extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.AnswerGenerationSpec) + AnswerGenerationSpecOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "AnswerGenerationSpec"); + } + + // Use AnswerGenerationSpec.newBuilder() to construct. + private AnswerGenerationSpec(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private AnswerGenerationSpec() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.ServingConfigProto + .internal_static_google_cloud_discoveryengine_v1beta_AnswerGenerationSpec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.ServingConfigProto + .internal_static_google_cloud_discoveryengine_v1beta_AnswerGenerationSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.AnswerGenerationSpec.class, + com.google.cloud.discoveryengine.v1beta.AnswerGenerationSpec.Builder.class); + } + + public interface UserDefinedClassifierSpecOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.AnswerGenerationSpec.UserDefinedClassifierSpec) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
            +     * Optional. Whether or not to enable and include user defined classifier.
            +     * 
            + * + * bool enable_user_defined_classifier = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enableUserDefinedClassifier. + */ + boolean getEnableUserDefinedClassifier(); + + /** + * + * + *
            +     * Optional. The preamble to be used for the user defined classifier.
            +     * 
            + * + * string preamble = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The preamble. + */ + java.lang.String getPreamble(); + + /** + * + * + *
            +     * Optional. The preamble to be used for the user defined classifier.
            +     * 
            + * + * string preamble = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for preamble. + */ + com.google.protobuf.ByteString getPreambleBytes(); + + /** + * + * + *
            +     * Optional. The model id to be used for the user defined classifier.
            +     * 
            + * + * string model_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The modelId. + */ + java.lang.String getModelId(); + + /** + * + * + *
            +     * Optional. The model id to be used for the user defined classifier.
            +     * 
            + * + * string model_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for modelId. + */ + com.google.protobuf.ByteString getModelIdBytes(); + + /** + * + * + *
            +     * Optional. The task marker to be used for the user defined classifier.
            +     * 
            + * + * string task_marker = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The taskMarker. + */ + java.lang.String getTaskMarker(); + + /** + * + * + *
            +     * Optional. The task marker to be used for the user defined classifier.
            +     * 
            + * + * string task_marker = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for taskMarker. + */ + com.google.protobuf.ByteString getTaskMarkerBytes(); + + /** + * + * + *
            +     * Optional. The top-p value to be used for the user defined classifier.
            +     * 
            + * + * double top_p = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The topP. + */ + double getTopP(); + + /** + * + * + *
            +     * Optional. The top-k value to be used for the user defined classifier.
            +     * 
            + * + * int64 top_k = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The topK. + */ + long getTopK(); + + /** + * + * + *
            +     * Optional. The temperature value to be used for the user defined
            +     * classifier.
            +     * 
            + * + * double temperature = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The temperature. + */ + double getTemperature(); + + /** + * + * + *
            +     * Optional. The seed value to be used for the user defined classifier.
            +     * 
            + * + * int32 seed = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The seed. + */ + int getSeed(); + } + + /** + * + * + *
            +   * The specification for user defined classifier.
            +   * 
            + * + * Protobuf type {@code + * google.cloud.discoveryengine.v1beta.AnswerGenerationSpec.UserDefinedClassifierSpec} + */ + public static final class UserDefinedClassifierSpec extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.AnswerGenerationSpec.UserDefinedClassifierSpec) + UserDefinedClassifierSpecOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "UserDefinedClassifierSpec"); + } + + // Use UserDefinedClassifierSpec.newBuilder() to construct. + private UserDefinedClassifierSpec(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private UserDefinedClassifierSpec() { + preamble_ = ""; + modelId_ = ""; + taskMarker_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.ServingConfigProto + .internal_static_google_cloud_discoveryengine_v1beta_AnswerGenerationSpec_UserDefinedClassifierSpec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.ServingConfigProto + .internal_static_google_cloud_discoveryengine_v1beta_AnswerGenerationSpec_UserDefinedClassifierSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.AnswerGenerationSpec.UserDefinedClassifierSpec + .class, + com.google.cloud.discoveryengine.v1beta.AnswerGenerationSpec.UserDefinedClassifierSpec + .Builder.class); + } + + public static final int ENABLE_USER_DEFINED_CLASSIFIER_FIELD_NUMBER = 1; + private boolean enableUserDefinedClassifier_ = false; + + /** + * + * + *
            +     * Optional. Whether or not to enable and include user defined classifier.
            +     * 
            + * + * bool enable_user_defined_classifier = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enableUserDefinedClassifier. + */ + @java.lang.Override + public boolean getEnableUserDefinedClassifier() { + return enableUserDefinedClassifier_; + } + + public static final int PREAMBLE_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object preamble_ = ""; + + /** + * + * + *
            +     * Optional. The preamble to be used for the user defined classifier.
            +     * 
            + * + * string preamble = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The preamble. + */ + @java.lang.Override + public java.lang.String getPreamble() { + java.lang.Object ref = preamble_; + 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(); + preamble_ = s; + return s; + } + } + + /** + * + * + *
            +     * Optional. The preamble to be used for the user defined classifier.
            +     * 
            + * + * string preamble = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for preamble. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPreambleBytes() { + java.lang.Object ref = preamble_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + preamble_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int MODEL_ID_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object modelId_ = ""; + + /** + * + * + *
            +     * Optional. The model id to be used for the user defined classifier.
            +     * 
            + * + * string model_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The modelId. + */ + @java.lang.Override + public java.lang.String getModelId() { + java.lang.Object ref = modelId_; + 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(); + modelId_ = s; + return s; + } + } + + /** + * + * + *
            +     * Optional. The model id to be used for the user defined classifier.
            +     * 
            + * + * string model_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for modelId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getModelIdBytes() { + java.lang.Object ref = modelId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + modelId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TASK_MARKER_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object taskMarker_ = ""; + + /** + * + * + *
            +     * Optional. The task marker to be used for the user defined classifier.
            +     * 
            + * + * string task_marker = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The taskMarker. + */ + @java.lang.Override + public java.lang.String getTaskMarker() { + java.lang.Object ref = taskMarker_; + 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(); + taskMarker_ = s; + return s; + } + } + + /** + * + * + *
            +     * Optional. The task marker to be used for the user defined classifier.
            +     * 
            + * + * string task_marker = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for taskMarker. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTaskMarkerBytes() { + java.lang.Object ref = taskMarker_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + taskMarker_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TOP_P_FIELD_NUMBER = 5; + private double topP_ = 0D; + + /** + * + * + *
            +     * Optional. The top-p value to be used for the user defined classifier.
            +     * 
            + * + * double top_p = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The topP. + */ + @java.lang.Override + public double getTopP() { + return topP_; + } + + public static final int TOP_K_FIELD_NUMBER = 6; + private long topK_ = 0L; + + /** + * + * + *
            +     * Optional. The top-k value to be used for the user defined classifier.
            +     * 
            + * + * int64 top_k = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The topK. + */ + @java.lang.Override + public long getTopK() { + return topK_; + } + + public static final int TEMPERATURE_FIELD_NUMBER = 7; + private double temperature_ = 0D; + + /** + * + * + *
            +     * Optional. The temperature value to be used for the user defined
            +     * classifier.
            +     * 
            + * + * double temperature = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The temperature. + */ + @java.lang.Override + public double getTemperature() { + return temperature_; + } + + public static final int SEED_FIELD_NUMBER = 8; + private int seed_ = 0; + + /** + * + * + *
            +     * Optional. The seed value to be used for the user defined classifier.
            +     * 
            + * + * int32 seed = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The seed. + */ + @java.lang.Override + public int getSeed() { + return seed_; + } + + 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 (enableUserDefinedClassifier_ != false) { + output.writeBool(1, enableUserDefinedClassifier_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(preamble_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, preamble_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(modelId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, modelId_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(taskMarker_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, taskMarker_); + } + if (java.lang.Double.doubleToRawLongBits(topP_) != 0) { + output.writeDouble(5, topP_); + } + if (topK_ != 0L) { + output.writeInt64(6, topK_); + } + if (java.lang.Double.doubleToRawLongBits(temperature_) != 0) { + output.writeDouble(7, temperature_); + } + if (seed_ != 0) { + output.writeInt32(8, seed_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (enableUserDefinedClassifier_ != false) { + size += + com.google.protobuf.CodedOutputStream.computeBoolSize(1, enableUserDefinedClassifier_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(preamble_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, preamble_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(modelId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, modelId_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(taskMarker_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, taskMarker_); + } + if (java.lang.Double.doubleToRawLongBits(topP_) != 0) { + size += com.google.protobuf.CodedOutputStream.computeDoubleSize(5, topP_); + } + if (topK_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(6, topK_); + } + if (java.lang.Double.doubleToRawLongBits(temperature_) != 0) { + size += com.google.protobuf.CodedOutputStream.computeDoubleSize(7, temperature_); + } + if (seed_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(8, seed_); + } + 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.discoveryengine.v1beta.AnswerGenerationSpec.UserDefinedClassifierSpec)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1beta.AnswerGenerationSpec.UserDefinedClassifierSpec other = + (com.google.cloud.discoveryengine.v1beta.AnswerGenerationSpec.UserDefinedClassifierSpec) + obj; + + if (getEnableUserDefinedClassifier() != other.getEnableUserDefinedClassifier()) return false; + if (!getPreamble().equals(other.getPreamble())) return false; + if (!getModelId().equals(other.getModelId())) return false; + if (!getTaskMarker().equals(other.getTaskMarker())) return false; + if (java.lang.Double.doubleToLongBits(getTopP()) + != java.lang.Double.doubleToLongBits(other.getTopP())) return false; + if (getTopK() != other.getTopK()) return false; + if (java.lang.Double.doubleToLongBits(getTemperature()) + != java.lang.Double.doubleToLongBits(other.getTemperature())) return false; + if (getSeed() != other.getSeed()) 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) + ENABLE_USER_DEFINED_CLASSIFIER_FIELD_NUMBER; + hash = + (53 * hash) + com.google.protobuf.Internal.hashBoolean(getEnableUserDefinedClassifier()); + hash = (37 * hash) + PREAMBLE_FIELD_NUMBER; + hash = (53 * hash) + getPreamble().hashCode(); + hash = (37 * hash) + MODEL_ID_FIELD_NUMBER; + hash = (53 * hash) + getModelId().hashCode(); + hash = (37 * hash) + TASK_MARKER_FIELD_NUMBER; + hash = (53 * hash) + getTaskMarker().hashCode(); + hash = (37 * hash) + TOP_P_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashLong(java.lang.Double.doubleToLongBits(getTopP())); + hash = (37 * hash) + TOP_K_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getTopK()); + hash = (37 * hash) + TEMPERATURE_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getTemperature())); + hash = (37 * hash) + SEED_FIELD_NUMBER; + hash = (53 * hash) + getSeed(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1beta.AnswerGenerationSpec + .UserDefinedClassifierSpec + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.AnswerGenerationSpec + .UserDefinedClassifierSpec + 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.discoveryengine.v1beta.AnswerGenerationSpec + .UserDefinedClassifierSpec + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.AnswerGenerationSpec + .UserDefinedClassifierSpec + 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.discoveryengine.v1beta.AnswerGenerationSpec + .UserDefinedClassifierSpec + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.AnswerGenerationSpec + .UserDefinedClassifierSpec + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1beta.AnswerGenerationSpec + .UserDefinedClassifierSpec + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.AnswerGenerationSpec + .UserDefinedClassifierSpec + 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.discoveryengine.v1beta.AnswerGenerationSpec + .UserDefinedClassifierSpec + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.AnswerGenerationSpec + .UserDefinedClassifierSpec + 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.discoveryengine.v1beta.AnswerGenerationSpec + .UserDefinedClassifierSpec + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.AnswerGenerationSpec + .UserDefinedClassifierSpec + 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.discoveryengine.v1beta.AnswerGenerationSpec.UserDefinedClassifierSpec + 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; + } + + /** + * + * + *
            +     * The specification for user defined classifier.
            +     * 
            + * + * Protobuf type {@code + * google.cloud.discoveryengine.v1beta.AnswerGenerationSpec.UserDefinedClassifierSpec} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.AnswerGenerationSpec.UserDefinedClassifierSpec) + com.google.cloud.discoveryengine.v1beta.AnswerGenerationSpec + .UserDefinedClassifierSpecOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.ServingConfigProto + .internal_static_google_cloud_discoveryengine_v1beta_AnswerGenerationSpec_UserDefinedClassifierSpec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.ServingConfigProto + .internal_static_google_cloud_discoveryengine_v1beta_AnswerGenerationSpec_UserDefinedClassifierSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.AnswerGenerationSpec + .UserDefinedClassifierSpec.class, + com.google.cloud.discoveryengine.v1beta.AnswerGenerationSpec + .UserDefinedClassifierSpec.Builder.class); + } + + // Construct using + // com.google.cloud.discoveryengine.v1beta.AnswerGenerationSpec.UserDefinedClassifierSpec.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + enableUserDefinedClassifier_ = false; + preamble_ = ""; + modelId_ = ""; + taskMarker_ = ""; + topP_ = 0D; + topK_ = 0L; + temperature_ = 0D; + seed_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1beta.ServingConfigProto + .internal_static_google_cloud_discoveryengine_v1beta_AnswerGenerationSpec_UserDefinedClassifierSpec_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AnswerGenerationSpec.UserDefinedClassifierSpec + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1beta.AnswerGenerationSpec + .UserDefinedClassifierSpec.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AnswerGenerationSpec.UserDefinedClassifierSpec + build() { + com.google.cloud.discoveryengine.v1beta.AnswerGenerationSpec.UserDefinedClassifierSpec + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AnswerGenerationSpec.UserDefinedClassifierSpec + buildPartial() { + com.google.cloud.discoveryengine.v1beta.AnswerGenerationSpec.UserDefinedClassifierSpec + result = + new com.google.cloud.discoveryengine.v1beta.AnswerGenerationSpec + .UserDefinedClassifierSpec(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.discoveryengine.v1beta.AnswerGenerationSpec.UserDefinedClassifierSpec + result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.enableUserDefinedClassifier_ = enableUserDefinedClassifier_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.preamble_ = preamble_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.modelId_ = modelId_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.taskMarker_ = taskMarker_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.topP_ = topP_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.topK_ = topK_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.temperature_ = temperature_; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.seed_ = seed_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.discoveryengine.v1beta.AnswerGenerationSpec + .UserDefinedClassifierSpec) { + return mergeFrom( + (com.google.cloud.discoveryengine.v1beta.AnswerGenerationSpec + .UserDefinedClassifierSpec) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1beta.AnswerGenerationSpec.UserDefinedClassifierSpec + other) { + if (other + == com.google.cloud.discoveryengine.v1beta.AnswerGenerationSpec + .UserDefinedClassifierSpec.getDefaultInstance()) return this; + if (other.getEnableUserDefinedClassifier() != false) { + setEnableUserDefinedClassifier(other.getEnableUserDefinedClassifier()); + } + if (!other.getPreamble().isEmpty()) { + preamble_ = other.preamble_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getModelId().isEmpty()) { + modelId_ = other.modelId_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getTaskMarker().isEmpty()) { + taskMarker_ = other.taskMarker_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (java.lang.Double.doubleToRawLongBits(other.getTopP()) != 0) { + setTopP(other.getTopP()); + } + if (other.getTopK() != 0L) { + setTopK(other.getTopK()); + } + if (java.lang.Double.doubleToRawLongBits(other.getTemperature()) != 0) { + setTemperature(other.getTemperature()); + } + if (other.getSeed() != 0) { + setSeed(other.getSeed()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + enableUserDefinedClassifier_ = input.readBool(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 18: + { + preamble_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + modelId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + taskMarker_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 41: + { + topP_ = input.readDouble(); + bitField0_ |= 0x00000010; + break; + } // case 41 + case 48: + { + topK_ = input.readInt64(); + bitField0_ |= 0x00000020; + break; + } // case 48 + case 57: + { + temperature_ = input.readDouble(); + bitField0_ |= 0x00000040; + break; + } // case 57 + case 64: + { + seed_ = input.readInt32(); + bitField0_ |= 0x00000080; + break; + } // case 64 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private boolean enableUserDefinedClassifier_; + + /** + * + * + *
            +       * Optional. Whether or not to enable and include user defined classifier.
            +       * 
            + * + * bool enable_user_defined_classifier = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enableUserDefinedClassifier. + */ + @java.lang.Override + public boolean getEnableUserDefinedClassifier() { + return enableUserDefinedClassifier_; + } + + /** + * + * + *
            +       * Optional. Whether or not to enable and include user defined classifier.
            +       * 
            + * + * bool enable_user_defined_classifier = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The enableUserDefinedClassifier to set. + * @return This builder for chaining. + */ + public Builder setEnableUserDefinedClassifier(boolean value) { + + enableUserDefinedClassifier_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
            +       * Optional. Whether or not to enable and include user defined classifier.
            +       * 
            + * + * bool enable_user_defined_classifier = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearEnableUserDefinedClassifier() { + bitField0_ = (bitField0_ & ~0x00000001); + enableUserDefinedClassifier_ = false; + onChanged(); + return this; + } + + private java.lang.Object preamble_ = ""; + + /** + * + * + *
            +       * Optional. The preamble to be used for the user defined classifier.
            +       * 
            + * + * string preamble = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The preamble. + */ + public java.lang.String getPreamble() { + java.lang.Object ref = preamble_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + preamble_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
            +       * Optional. The preamble to be used for the user defined classifier.
            +       * 
            + * + * string preamble = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for preamble. + */ + public com.google.protobuf.ByteString getPreambleBytes() { + java.lang.Object ref = preamble_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + preamble_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
            +       * Optional. The preamble to be used for the user defined classifier.
            +       * 
            + * + * string preamble = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The preamble to set. + * @return This builder for chaining. + */ + public Builder setPreamble(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + preamble_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
            +       * Optional. The preamble to be used for the user defined classifier.
            +       * 
            + * + * string preamble = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPreamble() { + preamble_ = getDefaultInstance().getPreamble(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
            +       * Optional. The preamble to be used for the user defined classifier.
            +       * 
            + * + * string preamble = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for preamble to set. + * @return This builder for chaining. + */ + public Builder setPreambleBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + preamble_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object modelId_ = ""; + + /** + * + * + *
            +       * Optional. The model id to be used for the user defined classifier.
            +       * 
            + * + * string model_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The modelId. + */ + public java.lang.String getModelId() { + java.lang.Object ref = modelId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + modelId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
            +       * Optional. The model id to be used for the user defined classifier.
            +       * 
            + * + * string model_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for modelId. + */ + public com.google.protobuf.ByteString getModelIdBytes() { + java.lang.Object ref = modelId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + modelId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
            +       * Optional. The model id to be used for the user defined classifier.
            +       * 
            + * + * string model_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The modelId to set. + * @return This builder for chaining. + */ + public Builder setModelId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + modelId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
            +       * Optional. The model id to be used for the user defined classifier.
            +       * 
            + * + * string model_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearModelId() { + modelId_ = getDefaultInstance().getModelId(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
            +       * Optional. The model id to be used for the user defined classifier.
            +       * 
            + * + * string model_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for modelId to set. + * @return This builder for chaining. + */ + public Builder setModelIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + modelId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object taskMarker_ = ""; + + /** + * + * + *
            +       * Optional. The task marker to be used for the user defined classifier.
            +       * 
            + * + * string task_marker = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The taskMarker. + */ + public java.lang.String getTaskMarker() { + java.lang.Object ref = taskMarker_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + taskMarker_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
            +       * Optional. The task marker to be used for the user defined classifier.
            +       * 
            + * + * string task_marker = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for taskMarker. + */ + public com.google.protobuf.ByteString getTaskMarkerBytes() { + java.lang.Object ref = taskMarker_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + taskMarker_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
            +       * Optional. The task marker to be used for the user defined classifier.
            +       * 
            + * + * string task_marker = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The taskMarker to set. + * @return This builder for chaining. + */ + public Builder setTaskMarker(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + taskMarker_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
            +       * Optional. The task marker to be used for the user defined classifier.
            +       * 
            + * + * string task_marker = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearTaskMarker() { + taskMarker_ = getDefaultInstance().getTaskMarker(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + + /** + * + * + *
            +       * Optional. The task marker to be used for the user defined classifier.
            +       * 
            + * + * string task_marker = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for taskMarker to set. + * @return This builder for chaining. + */ + public Builder setTaskMarkerBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + taskMarker_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private double topP_; + + /** + * + * + *
            +       * Optional. The top-p value to be used for the user defined classifier.
            +       * 
            + * + * double top_p = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The topP. + */ + @java.lang.Override + public double getTopP() { + return topP_; + } + + /** + * + * + *
            +       * Optional. The top-p value to be used for the user defined classifier.
            +       * 
            + * + * double top_p = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The topP to set. + * @return This builder for chaining. + */ + public Builder setTopP(double value) { + + topP_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
            +       * Optional. The top-p value to be used for the user defined classifier.
            +       * 
            + * + * double top_p = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearTopP() { + bitField0_ = (bitField0_ & ~0x00000010); + topP_ = 0D; + onChanged(); + return this; + } + + private long topK_; + + /** + * + * + *
            +       * Optional. The top-k value to be used for the user defined classifier.
            +       * 
            + * + * int64 top_k = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The topK. + */ + @java.lang.Override + public long getTopK() { + return topK_; + } + + /** + * + * + *
            +       * Optional. The top-k value to be used for the user defined classifier.
            +       * 
            + * + * int64 top_k = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The topK to set. + * @return This builder for chaining. + */ + public Builder setTopK(long value) { + + topK_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
            +       * Optional. The top-k value to be used for the user defined classifier.
            +       * 
            + * + * int64 top_k = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearTopK() { + bitField0_ = (bitField0_ & ~0x00000020); + topK_ = 0L; + onChanged(); + return this; + } + + private double temperature_; + + /** + * + * + *
            +       * Optional. The temperature value to be used for the user defined
            +       * classifier.
            +       * 
            + * + * double temperature = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The temperature. + */ + @java.lang.Override + public double getTemperature() { + return temperature_; + } + + /** + * + * + *
            +       * Optional. The temperature value to be used for the user defined
            +       * classifier.
            +       * 
            + * + * double temperature = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The temperature to set. + * @return This builder for chaining. + */ + public Builder setTemperature(double value) { + + temperature_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + /** + * + * + *
            +       * Optional. The temperature value to be used for the user defined
            +       * classifier.
            +       * 
            + * + * double temperature = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearTemperature() { + bitField0_ = (bitField0_ & ~0x00000040); + temperature_ = 0D; + onChanged(); + return this; + } + + private int seed_; + + /** + * + * + *
            +       * Optional. The seed value to be used for the user defined classifier.
            +       * 
            + * + * int32 seed = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The seed. + */ + @java.lang.Override + public int getSeed() { + return seed_; + } + + /** + * + * + *
            +       * Optional. The seed value to be used for the user defined classifier.
            +       * 
            + * + * int32 seed = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The seed to set. + * @return This builder for chaining. + */ + public Builder setSeed(int value) { + + seed_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + + /** + * + * + *
            +       * Optional. The seed value to be used for the user defined classifier.
            +       * 
            + * + * int32 seed = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearSeed() { + bitField0_ = (bitField0_ & ~0x00000080); + seed_ = 0; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.AnswerGenerationSpec.UserDefinedClassifierSpec) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.AnswerGenerationSpec.UserDefinedClassifierSpec) + private static final com.google.cloud.discoveryengine.v1beta.AnswerGenerationSpec + .UserDefinedClassifierSpec + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.discoveryengine.v1beta.AnswerGenerationSpec + .UserDefinedClassifierSpec(); + } + + public static com.google.cloud.discoveryengine.v1beta.AnswerGenerationSpec + .UserDefinedClassifierSpec + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UserDefinedClassifierSpec parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AnswerGenerationSpec.UserDefinedClassifierSpec + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int bitField0_; + public static final int USER_DEFINED_CLASSIFIER_SPEC_FIELD_NUMBER = 1; + private com.google.cloud.discoveryengine.v1beta.AnswerGenerationSpec.UserDefinedClassifierSpec + userDefinedClassifierSpec_; + + /** + * + * + *
            +   * Optional. The specification for user specified classifier spec.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AnswerGenerationSpec.UserDefinedClassifierSpec user_defined_classifier_spec = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the userDefinedClassifierSpec field is set. + */ + @java.lang.Override + public boolean hasUserDefinedClassifierSpec() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
            +   * Optional. The specification for user specified classifier spec.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AnswerGenerationSpec.UserDefinedClassifierSpec user_defined_classifier_spec = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The userDefinedClassifierSpec. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AnswerGenerationSpec.UserDefinedClassifierSpec + getUserDefinedClassifierSpec() { + return userDefinedClassifierSpec_ == null + ? com.google.cloud.discoveryengine.v1beta.AnswerGenerationSpec.UserDefinedClassifierSpec + .getDefaultInstance() + : userDefinedClassifierSpec_; + } + + /** + * + * + *
            +   * Optional. The specification for user specified classifier spec.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AnswerGenerationSpec.UserDefinedClassifierSpec user_defined_classifier_spec = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AnswerGenerationSpec + .UserDefinedClassifierSpecOrBuilder + getUserDefinedClassifierSpecOrBuilder() { + return userDefinedClassifierSpec_ == null + ? com.google.cloud.discoveryengine.v1beta.AnswerGenerationSpec.UserDefinedClassifierSpec + .getDefaultInstance() + : userDefinedClassifierSpec_; + } + + 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, getUserDefinedClassifierSpec()); + } + 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, getUserDefinedClassifierSpec()); + } + 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.discoveryengine.v1beta.AnswerGenerationSpec)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1beta.AnswerGenerationSpec other = + (com.google.cloud.discoveryengine.v1beta.AnswerGenerationSpec) obj; + + if (hasUserDefinedClassifierSpec() != other.hasUserDefinedClassifierSpec()) return false; + if (hasUserDefinedClassifierSpec()) { + if (!getUserDefinedClassifierSpec().equals(other.getUserDefinedClassifierSpec())) + 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 (hasUserDefinedClassifierSpec()) { + hash = (37 * hash) + USER_DEFINED_CLASSIFIER_SPEC_FIELD_NUMBER; + hash = (53 * hash) + getUserDefinedClassifierSpec().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1beta.AnswerGenerationSpec parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.AnswerGenerationSpec 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.discoveryengine.v1beta.AnswerGenerationSpec parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.AnswerGenerationSpec 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.discoveryengine.v1beta.AnswerGenerationSpec parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.AnswerGenerationSpec parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1beta.AnswerGenerationSpec parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.AnswerGenerationSpec 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.discoveryengine.v1beta.AnswerGenerationSpec parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.AnswerGenerationSpec 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.discoveryengine.v1beta.AnswerGenerationSpec parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.AnswerGenerationSpec 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.discoveryengine.v1beta.AnswerGenerationSpec 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; + } + + /** + * + * + *
            +   * The specification for answer generation.
            +   * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.AnswerGenerationSpec} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.AnswerGenerationSpec) + com.google.cloud.discoveryengine.v1beta.AnswerGenerationSpecOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.ServingConfigProto + .internal_static_google_cloud_discoveryengine_v1beta_AnswerGenerationSpec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.ServingConfigProto + .internal_static_google_cloud_discoveryengine_v1beta_AnswerGenerationSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.AnswerGenerationSpec.class, + com.google.cloud.discoveryengine.v1beta.AnswerGenerationSpec.Builder.class); + } + + // Construct using com.google.cloud.discoveryengine.v1beta.AnswerGenerationSpec.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetUserDefinedClassifierSpecFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + userDefinedClassifierSpec_ = null; + if (userDefinedClassifierSpecBuilder_ != null) { + userDefinedClassifierSpecBuilder_.dispose(); + userDefinedClassifierSpecBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1beta.ServingConfigProto + .internal_static_google_cloud_discoveryengine_v1beta_AnswerGenerationSpec_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AnswerGenerationSpec + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1beta.AnswerGenerationSpec.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AnswerGenerationSpec build() { + com.google.cloud.discoveryengine.v1beta.AnswerGenerationSpec result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AnswerGenerationSpec buildPartial() { + com.google.cloud.discoveryengine.v1beta.AnswerGenerationSpec result = + new com.google.cloud.discoveryengine.v1beta.AnswerGenerationSpec(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.discoveryengine.v1beta.AnswerGenerationSpec result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.userDefinedClassifierSpec_ = + userDefinedClassifierSpecBuilder_ == null + ? userDefinedClassifierSpec_ + : userDefinedClassifierSpecBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.discoveryengine.v1beta.AnswerGenerationSpec) { + return mergeFrom((com.google.cloud.discoveryengine.v1beta.AnswerGenerationSpec) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.discoveryengine.v1beta.AnswerGenerationSpec other) { + if (other + == com.google.cloud.discoveryengine.v1beta.AnswerGenerationSpec.getDefaultInstance()) + return this; + if (other.hasUserDefinedClassifierSpec()) { + mergeUserDefinedClassifierSpec(other.getUserDefinedClassifierSpec()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage( + internalGetUserDefinedClassifierSpecFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.cloud.discoveryengine.v1beta.AnswerGenerationSpec.UserDefinedClassifierSpec + userDefinedClassifierSpec_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.AnswerGenerationSpec.UserDefinedClassifierSpec, + com.google.cloud.discoveryengine.v1beta.AnswerGenerationSpec.UserDefinedClassifierSpec + .Builder, + com.google.cloud.discoveryengine.v1beta.AnswerGenerationSpec + .UserDefinedClassifierSpecOrBuilder> + userDefinedClassifierSpecBuilder_; + + /** + * + * + *
            +     * Optional. The specification for user specified classifier spec.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AnswerGenerationSpec.UserDefinedClassifierSpec user_defined_classifier_spec = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the userDefinedClassifierSpec field is set. + */ + public boolean hasUserDefinedClassifierSpec() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
            +     * Optional. The specification for user specified classifier spec.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AnswerGenerationSpec.UserDefinedClassifierSpec user_defined_classifier_spec = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The userDefinedClassifierSpec. + */ + public com.google.cloud.discoveryengine.v1beta.AnswerGenerationSpec.UserDefinedClassifierSpec + getUserDefinedClassifierSpec() { + if (userDefinedClassifierSpecBuilder_ == null) { + return userDefinedClassifierSpec_ == null + ? com.google.cloud.discoveryengine.v1beta.AnswerGenerationSpec.UserDefinedClassifierSpec + .getDefaultInstance() + : userDefinedClassifierSpec_; + } else { + return userDefinedClassifierSpecBuilder_.getMessage(); + } + } + + /** + * + * + *
            +     * Optional. The specification for user specified classifier spec.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AnswerGenerationSpec.UserDefinedClassifierSpec user_defined_classifier_spec = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setUserDefinedClassifierSpec( + com.google.cloud.discoveryengine.v1beta.AnswerGenerationSpec.UserDefinedClassifierSpec + value) { + if (userDefinedClassifierSpecBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + userDefinedClassifierSpec_ = value; + } else { + userDefinedClassifierSpecBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Optional. The specification for user specified classifier spec.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AnswerGenerationSpec.UserDefinedClassifierSpec user_defined_classifier_spec = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setUserDefinedClassifierSpec( + com.google.cloud.discoveryengine.v1beta.AnswerGenerationSpec.UserDefinedClassifierSpec + .Builder + builderForValue) { + if (userDefinedClassifierSpecBuilder_ == null) { + userDefinedClassifierSpec_ = builderForValue.build(); + } else { + userDefinedClassifierSpecBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Optional. The specification for user specified classifier spec.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AnswerGenerationSpec.UserDefinedClassifierSpec user_defined_classifier_spec = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeUserDefinedClassifierSpec( + com.google.cloud.discoveryengine.v1beta.AnswerGenerationSpec.UserDefinedClassifierSpec + value) { + if (userDefinedClassifierSpecBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && userDefinedClassifierSpec_ != null + && userDefinedClassifierSpec_ + != com.google.cloud.discoveryengine.v1beta.AnswerGenerationSpec + .UserDefinedClassifierSpec.getDefaultInstance()) { + getUserDefinedClassifierSpecBuilder().mergeFrom(value); + } else { + userDefinedClassifierSpec_ = value; + } + } else { + userDefinedClassifierSpecBuilder_.mergeFrom(value); + } + if (userDefinedClassifierSpec_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + + /** + * + * + *
            +     * Optional. The specification for user specified classifier spec.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AnswerGenerationSpec.UserDefinedClassifierSpec user_defined_classifier_spec = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearUserDefinedClassifierSpec() { + bitField0_ = (bitField0_ & ~0x00000001); + userDefinedClassifierSpec_ = null; + if (userDefinedClassifierSpecBuilder_ != null) { + userDefinedClassifierSpecBuilder_.dispose(); + userDefinedClassifierSpecBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
            +     * Optional. The specification for user specified classifier spec.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AnswerGenerationSpec.UserDefinedClassifierSpec user_defined_classifier_spec = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.discoveryengine.v1beta.AnswerGenerationSpec.UserDefinedClassifierSpec + .Builder + getUserDefinedClassifierSpecBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return internalGetUserDefinedClassifierSpecFieldBuilder().getBuilder(); + } + + /** + * + * + *
            +     * Optional. The specification for user specified classifier spec.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AnswerGenerationSpec.UserDefinedClassifierSpec user_defined_classifier_spec = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.discoveryengine.v1beta.AnswerGenerationSpec + .UserDefinedClassifierSpecOrBuilder + getUserDefinedClassifierSpecOrBuilder() { + if (userDefinedClassifierSpecBuilder_ != null) { + return userDefinedClassifierSpecBuilder_.getMessageOrBuilder(); + } else { + return userDefinedClassifierSpec_ == null + ? com.google.cloud.discoveryengine.v1beta.AnswerGenerationSpec.UserDefinedClassifierSpec + .getDefaultInstance() + : userDefinedClassifierSpec_; + } + } + + /** + * + * + *
            +     * Optional. The specification for user specified classifier spec.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AnswerGenerationSpec.UserDefinedClassifierSpec user_defined_classifier_spec = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.AnswerGenerationSpec.UserDefinedClassifierSpec, + com.google.cloud.discoveryengine.v1beta.AnswerGenerationSpec.UserDefinedClassifierSpec + .Builder, + com.google.cloud.discoveryengine.v1beta.AnswerGenerationSpec + .UserDefinedClassifierSpecOrBuilder> + internalGetUserDefinedClassifierSpecFieldBuilder() { + if (userDefinedClassifierSpecBuilder_ == null) { + userDefinedClassifierSpecBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.AnswerGenerationSpec + .UserDefinedClassifierSpec, + com.google.cloud.discoveryengine.v1beta.AnswerGenerationSpec + .UserDefinedClassifierSpec.Builder, + com.google.cloud.discoveryengine.v1beta.AnswerGenerationSpec + .UserDefinedClassifierSpecOrBuilder>( + getUserDefinedClassifierSpec(), getParentForChildren(), isClean()); + userDefinedClassifierSpec_ = null; + } + return userDefinedClassifierSpecBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.AnswerGenerationSpec) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.AnswerGenerationSpec) + private static final com.google.cloud.discoveryengine.v1beta.AnswerGenerationSpec + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.discoveryengine.v1beta.AnswerGenerationSpec(); + } + + public static com.google.cloud.discoveryengine.v1beta.AnswerGenerationSpec getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AnswerGenerationSpec parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AnswerGenerationSpec getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/AnswerGenerationSpecOrBuilder.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/AnswerGenerationSpecOrBuilder.java new file mode 100644 index 000000000000..fe3b83b45eb2 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/AnswerGenerationSpecOrBuilder.java @@ -0,0 +1,73 @@ +/* + * 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/cloud/discoveryengine/v1beta/serving_config.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.discoveryengine.v1beta; + +@com.google.protobuf.Generated +public interface AnswerGenerationSpecOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.AnswerGenerationSpec) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
            +   * Optional. The specification for user specified classifier spec.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AnswerGenerationSpec.UserDefinedClassifierSpec user_defined_classifier_spec = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the userDefinedClassifierSpec field is set. + */ + boolean hasUserDefinedClassifierSpec(); + + /** + * + * + *
            +   * Optional. The specification for user specified classifier spec.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AnswerGenerationSpec.UserDefinedClassifierSpec user_defined_classifier_spec = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The userDefinedClassifierSpec. + */ + com.google.cloud.discoveryengine.v1beta.AnswerGenerationSpec.UserDefinedClassifierSpec + getUserDefinedClassifierSpec(); + + /** + * + * + *
            +   * Optional. The specification for user specified classifier spec.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AnswerGenerationSpec.UserDefinedClassifierSpec user_defined_classifier_spec = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.discoveryengine.v1beta.AnswerGenerationSpec.UserDefinedClassifierSpecOrBuilder + getUserDefinedClassifierSpecOrBuilder(); +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/AnswerOrBuilder.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/AnswerOrBuilder.java index 32f94e0c6c08..bc816619d5f5 100644 --- a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/AnswerOrBuilder.java +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/AnswerOrBuilder.java @@ -106,6 +106,34 @@ public interface AnswerOrBuilder */ com.google.protobuf.ByteString getAnswerTextBytes(); + /** + * + * + *
            +   * A score in the range of [0, 1] describing how grounded the answer is by the
            +   * reference chunks.
            +   * 
            + * + * optional double grounding_score = 12; + * + * @return Whether the groundingScore field is set. + */ + boolean hasGroundingScore(); + + /** + * + * + *
            +   * A score in the range of [0, 1] describing how grounded the answer is by the
            +   * reference chunks.
            +   * 
            + * + * optional double grounding_score = 12; + * + * @return The groundingScore. + */ + double getGroundingScore(); + /** * * @@ -162,6 +190,74 @@ public interface AnswerOrBuilder */ com.google.cloud.discoveryengine.v1beta.Answer.CitationOrBuilder getCitationsOrBuilder(int index); + /** + * + * + *
            +   * Optional. Grounding supports.
            +   * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.GroundingSupport grounding_supports = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List + getGroundingSupportsList(); + + /** + * + * + *
            +   * Optional. Grounding supports.
            +   * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.GroundingSupport grounding_supports = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.discoveryengine.v1beta.Answer.GroundingSupport getGroundingSupports(int index); + + /** + * + * + *
            +   * Optional. Grounding supports.
            +   * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.GroundingSupport grounding_supports = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + int getGroundingSupportsCount(); + + /** + * + * + *
            +   * Optional. Grounding supports.
            +   * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.GroundingSupport grounding_supports = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List + getGroundingSupportsOrBuilderList(); + + /** + * + * + *
            +   * Optional. Grounding supports.
            +   * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.GroundingSupport grounding_supports = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.discoveryengine.v1beta.Answer.GroundingSupportOrBuilder + getGroundingSupportsOrBuilder(int index); + /** * * @@ -219,6 +315,74 @@ public interface AnswerOrBuilder com.google.cloud.discoveryengine.v1beta.Answer.ReferenceOrBuilder getReferencesOrBuilder( int index); + /** + * + * + *
            +   * Output only. List of blob attachments in the answer.
            +   * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.BlobAttachment blob_attachments = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.List + getBlobAttachmentsList(); + + /** + * + * + *
            +   * Output only. List of blob attachments in the answer.
            +   * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.BlobAttachment blob_attachments = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.discoveryengine.v1beta.Answer.BlobAttachment getBlobAttachments(int index); + + /** + * + * + *
            +   * Output only. List of blob attachments in the answer.
            +   * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.BlobAttachment blob_attachments = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + int getBlobAttachmentsCount(); + + /** + * + * + *
            +   * Output only. List of blob attachments in the answer.
            +   * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.BlobAttachment blob_attachments = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.List + getBlobAttachmentsOrBuilderList(); + + /** + * + * + *
            +   * Output only. List of blob attachments in the answer.
            +   * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Answer.BlobAttachment blob_attachments = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.discoveryengine.v1beta.Answer.BlobAttachmentOrBuilder + getBlobAttachmentsOrBuilder(int index); + /** * * @@ -539,4 +703,71 @@ com.google.cloud.discoveryengine.v1beta.Answer.AnswerSkippedReason getAnswerSkip *
            */ com.google.protobuf.TimestampOrBuilder getCompleteTimeOrBuilder(); + + /** + * + * + *
            +   * Optional. Safety ratings.
            +   * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.SafetyRating safety_ratings = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List getSafetyRatingsList(); + + /** + * + * + *
            +   * Optional. Safety ratings.
            +   * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.SafetyRating safety_ratings = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.discoveryengine.v1beta.SafetyRating getSafetyRatings(int index); + + /** + * + * + *
            +   * Optional. Safety ratings.
            +   * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.SafetyRating safety_ratings = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + int getSafetyRatingsCount(); + + /** + * + * + *
            +   * Optional. Safety ratings.
            +   * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.SafetyRating safety_ratings = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List + getSafetyRatingsOrBuilderList(); + + /** + * + * + *
            +   * Optional. Safety ratings.
            +   * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.SafetyRating safety_ratings = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.discoveryengine.v1beta.SafetyRatingOrBuilder getSafetyRatingsOrBuilder( + int index); } diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/AnswerProto.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/AnswerProto.java index f9782fa342f6..4f28e9d107ea 100644 --- a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/AnswerProto.java +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/AnswerProto.java @@ -52,6 +52,10 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_discoveryengine_v1beta_Answer_CitationSource_descriptor; static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_cloud_discoveryengine_v1beta_Answer_CitationSource_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1beta_Answer_GroundingSupport_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1beta_Answer_GroundingSupport_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_discoveryengine_v1beta_Answer_Reference_descriptor; static final com.google.protobuf.GeneratedMessage.FieldAccessorTable @@ -76,6 +80,14 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_discoveryengine_v1beta_Answer_Reference_StructuredDocumentInfo_descriptor; static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_cloud_discoveryengine_v1beta_Answer_Reference_StructuredDocumentInfo_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1beta_Answer_BlobAttachment_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1beta_Answer_BlobAttachment_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1beta_Answer_BlobAttachment_Blob_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1beta_Answer_BlobAttachment_Blob_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_discoveryengine_v1beta_Answer_Step_descriptor; static final com.google.protobuf.GeneratedMessage.FieldAccessorTable @@ -124,60 +136,80 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "\n" + "0google/cloud/discoveryengine/v1beta/answer.proto\022#google.cloud.discoveryengine" + ".v1beta\032\037google/api/field_behavior.proto" - + "\032\031google/api/resource.proto\032\034google/prot" - + "obuf/struct.proto\032\037google/protobuf/timestamp.proto\"\255#\n" + + "\032\031google/api/resource.proto\0320google/clou" + + "d/discoveryengine/v1beta/safety.proto\032\034g" + + "oogle/protobuf/struct.proto\032\037google/protobuf/timestamp.proto\"\273,\n" + "\006Answer\022\021\n" + "\004name\030\001 \001(\tB\003\340A\005\022@\n" + "\005state\030\002" + " \001(\01621.google.cloud.discoveryengine.v1beta.Answer.State\022\023\n" - + "\013answer_text\030\003 \001(\t\022G\n" + + "\013answer_text\030\003 \001(\t\022\034\n" + + "\017grounding_score\030\014 \001(\001H\000\210\001\001\022G\n" + "\tcitations\030\004 \003(\01324.google.clou" - + "d.discoveryengine.v1beta.Answer.Citation\022I\n\n" - + "references\030\005" - + " \003(\01325.google.cloud.discoveryengine.v1beta.Answer.Reference\022\031\n" + + "d.discoveryengine.v1beta.Answer.Citation\022]\n" + + "\022grounding_supports\030\r" + + " \003(\0132<.google.cl" + + "oud.discoveryengine.v1beta.Answer.GroundingSupportB\003\340A\001\022I\n\n" + + "references\030\005 \003(\01325.go" + + "ogle.cloud.discoveryengine.v1beta.Answer.Reference\022Y\n" + + "\020blob_attachments\030\017 \003(\0132:.g" + + "oogle.cloud.discoveryengine.v1beta.Answer.BlobAttachmentB\003\340A\003\022\031\n" + "\021related_questions\030\006 \003(\t\022?\n" + "\005steps\030\007 \003(\01320.google.cloud.discoveryengine.v1beta.Answer.Step\022d\n" + "\030query_understanding_info\030\n" + " \001(\0132B.google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo\022_\n" - + "\026answer_skipped_reasons\030\013 \003(\0162?.google.cloud.dis" - + "coveryengine.v1beta.Answer.AnswerSkippedReason\0224\n" + + "\026answer_skipped_reasons\030\013" + + " \003(\0162?.google.cloud.discoveryengine.v1beta.Answer.AnswerSkippedReason\0224\n" + "\013create_time\030\010" + " \001(\0132\032.google.protobuf.TimestampB\003\340A\003\0226\n\r" - + "complete_time\030\t \001(\0132\032.google.protobuf.TimestampB\003\340A\003\032\177\n" + + "complete_time\030\t \001(\0132\032.google.protobuf.TimestampB\003\340A\003\022N\n" + + "\016safety_ratings\030\016" + + " \003(\01321.google.cloud.discoveryengine.v1beta.SafetyRatingB\003\340A\001\032\177\n" + "\010Citation\022\023\n" + "\013start_index\030\001 \001(\003\022\021\n" + "\tend_index\030\002 \001(\003\022K\n" - + "\007sources\030\003 \003(\0132:.google.cloud" - + ".discoveryengine.v1beta.Answer.CitationSource\032&\n" + + "\007sources\030\003" + + " \003(\0132:.google.cloud.discoveryengine.v1beta.Answer.CitationSource\032&\n" + "\016CitationSource\022\024\n" - + "\014reference_id\030\001 \001(\t\032\226\n\n" + + "\014reference_id\030\001 \001(\t\032\214\002\n" + + "\020GroundingSupport\022\030\n" + + "\013start_index\030\001 \001(\003B\003\340A\002\022\026\n" + + "\tend_index\030\002 \001(\003B\003\340A\002\022\034\n" + + "\017grounding_score\030\003 \001(\001H\000\210\001\001\022%\n" + + "\030grounding_check_required\030\004 \001(\010H\001\210\001\001\022P\n" + + "\007sources\030\005 \003(\0132:.google.cl" + + "oud.discoveryengine.v1beta.Answer.CitationSourceB\003\340A\001B\022\n" + + "\020_grounding_scoreB\033\n" + + "\031_grounding_check_required\032\211\013\n" + "\tReference\022t\n" - + "\032unstructured_document_info\030\001 \001(\0132N.google.cloud.discovery" - + "engine.v1beta.Answer.Reference.UnstructuredDocumentInfoH\000\022U\n\n" - + "chunk_info\030\002 \001(\0132?." - + "google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfoH\000\022p\n" - + "\030structured_document_info\030\003 \001(\0132L.google.cloud.discov" - + "eryengine.v1beta.Answer.Reference.StructuredDocumentInfoH\000\032\205\003\n" + + "\032unstructured_document_info\030\001 \001(\0132N.googl" + + "e.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfoH\000\022U\n\n" + + "chunk_info\030\002 \001(\0132?.google.cloud.discoverye" + + "ngine.v1beta.Answer.Reference.ChunkInfoH\000\022p\n" + + "\030structured_document_info\030\003 \001(\0132L.go" + + "ogle.cloud.discoveryengine.v1beta.Answer.Reference.StructuredDocumentInfoH\000\032\254\003\n" + "\030UnstructuredDocumentInfo\022>\n" + "\010document\030\001 \001(\tB,\372A)\n" + "\'discoveryengine.googleapis.com/Document\022\013\n" + "\003uri\030\002 \001(\t\022\r\n" + "\005title\030\003 \001(\t\022s\n" - + "\016chunk_contents\030\004 \003(\0132[.google.cloud.discoveryengine.v1bet" - + "a.Answer.Reference.UnstructuredDocumentInfo.ChunkContent\022,\n" - + "\013struct_data\030\005 \001(\0132\027.google.protobuf.Struct\032j\n" + + "\016chunk_contents\030\004 \003(\0132[.google.cloud.disc" + + "overyengine.v1beta.Answer.Reference.UnstructuredDocumentInfo.ChunkContent\022,\n" + + "\013struct_data\030\005 \001(\0132\027.google.protobuf.Struct\032\220\001\n" + "\014ChunkContent\022\017\n" + "\007content\030\001 \001(\t\022\027\n" + "\017page_identifier\030\002 \001(\t\022\034\n" - + "\017relevance_score\030\003 \001(\002H\000\210\001\001B\022\n" - + "\020_relevance_score\032\255\003\n" + + "\017relevance_score\030\003 \001(\002H\000\210\001\001\022$\n" + + "\027blob_attachment_indexes\030\004 \003(\003B\003\340A\003B\022\n" + + "\020_relevance_score\032\323\003\n" + "\tChunkInfo\0228\n" + "\005chunk\030\001 \001(\tB)\372A&\n" + "$discoveryengine.googleapis.com/Chunk\022\017\n" + "\007content\030\002 \001(\t\022\034\n" + "\017relevance_score\030\003 \001(\002H\000\210\001\001\022k\n" - + "\021document_metadata\030\004 \001(\0132P.google.cloud.discoveryengine.v1beta.Answe" - + "r.Reference.ChunkInfo.DocumentMetadata\032\265\001\n" + + "\021document_metadata\030\004 \001(\0132P.google.cloud.discoveryeng" + + "ine.v1beta.Answer.Reference.ChunkInfo.DocumentMetadata\022$\n" + + "\027blob_attachment_indexes\030\005 \003(\003B\003\340A\003\032\265\001\n" + "\020DocumentMetadata\022>\n" + "\010document\030\001 \001(\tB,\372A)\n" + "\'discoveryengine.googleapis.com/Document\022\013\n" @@ -185,37 +217,51 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\005title\030\003 \001(\t\022\027\n" + "\017page_identifier\030\004 \001(\t\022,\n" + "\013struct_data\030\005 \001(\0132\027.google.protobuf.StructB\022\n" - + "\020_relevance_score\032\206\001\n" + + "\020_relevance_score\032\254\001\n" + "\026StructuredDocumentInfo\022>\n" + "\010document\030\001 \001(\tB,\372A)\n" + "\'discoveryengine.googleapis.com/Document\022,\n" - + "\013struct_data\030\002 \001(\0132\027.google.protobuf.StructB\t\n" - + "\007content\032\330\010\n" + + "\013struct_data\030\002 \001(\0132\027.google.protobuf.Struct\022\022\n" + + "\005title\030\003 \001(\tB\003\340A\003\022\020\n" + + "\003uri\030\004 \001(\tB\003\340A\003B\t\n" + + "\007content\032\322\002\n" + + "\016BlobAttachment\022R\n" + + "\004data\030\001 \001(\0132?.go" + + "ogle.cloud.discoveryengine.v1beta.Answer.BlobAttachment.BlobB\003\340A\003\022i\n" + + "\020attribution_type\030\002 \001(\0162J.google.cloud.discoveryengi" + + "ne.v1beta.Answer.BlobAttachment.AttributionTypeB\003\340A\003\0321\n" + + "\004Blob\022\026\n" + + "\tmime_type\030\001 \001(\tB\003\340A\003\022\021\n" + + "\004data\030\002 \001(\014B\003\340A\003\"N\n" + + "\017AttributionType\022 \n" + + "\034ATTRIBUTION_TYPE_UNSPECIFIED\020\000\022\n\n" + + "\006CORPUS\020\001\022\r\n" + + "\tGENERATED\020\002\032\330\010\n" + "\004Step\022E\n" + "\005state\030\001" + " \001(\01626.google.cloud.discoveryengine.v1beta.Answer.Step.State\022\023\n" + "\013description\030\002 \001(\t\022\017\n" + "\007thought\030\003 \001(\t\022H\n" - + "\007actions\030\004" - + " \003(\01327.google.cloud.discoveryengine.v1beta.Answer.Step.Action\032\314\006\n" + + "\007actions\030\004 \003(\01327" + + ".google.cloud.discoveryengine.v1beta.Answer.Step.Action\032\314\006\n" + "\006Action\022]\n\r" - + "search_action\030\002 \001(\0132D.google.cloud.discover" - + "yengine.v1beta.Answer.Step.Action.SearchActionH\000\022X\n" - + "\013observation\030\003 \001(\0132C.google.c" - + "loud.discoveryengine.v1beta.Answer.Step.Action.Observation\032\035\n" + + "search_action\030\002 \001(\0132D.google.cloud.discoveryengine" + + ".v1beta.Answer.Step.Action.SearchActionH\000\022X\n" + + "\013observation\030\003 \001(\0132C.google.cloud.di" + + "scoveryengine.v1beta.Answer.Step.Action.Observation\032\035\n" + "\014SearchAction\022\r\n" + "\005query\030\001 \001(\t\032\337\004\n" + "\013Observation\022h\n" - + "\016search_results\030\002 \003(\0132P.google.cloud.discoveryengine" - + ".v1beta.Answer.Step.Action.Observation.SearchResult\032\345\003\n" + + "\016search_results\030\002 \003(\0132P.google.cloud.discoveryengine.v1beta" + + ".Answer.Step.Action.Observation.SearchResult\032\345\003\n" + "\014SearchResult\022\020\n" + "\010document\030\001 \001(\t\022\013\n" + "\003uri\030\002 \001(\t\022\r\n" + "\005title\030\003 \001(\t\022r\n" - + "\014snippet_info\030\004 \003(\0132\\.google.cloud.discover" - + "yengine.v1beta.Answer.Step.Action.Observation.SearchResult.SnippetInfo\022n\n\n" - + "chunk_info\030\005 \003(\0132Z.google.cloud.discoveryengin" - + "e.v1beta.Answer.Step.Action.Observation.SearchResult.ChunkInfo\022,\n" + + "\014snippet_info\030\004 \003(\0132\\.google.cloud.discoveryengine" + + ".v1beta.Answer.Step.Action.Observation.SearchResult.SnippetInfo\022n\n\n" + + "chunk_info\030\005 \003(\0132Z.google.cloud.discoveryengine.v1bet" + + "a.Answer.Step.Action.Observation.SearchResult.ChunkInfo\022,\n" + "\013struct_data\030\006 \001(\0132\027.google.protobuf.Struct\0326\n" + "\013SnippetInfo\022\017\n" + "\007snippet\030\001 \001(\t\022\026\n" @@ -228,28 +274,30 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\006action\"J\n" + "\005State\022\025\n" + "\021STATE_UNSPECIFIED\020\000\022\017\n" - + "\013IN_PROGRESS\020\001\022\n" - + "\n" + + "\013IN_PROGRESS\020\001\022\n\n" + "\006FAILED\020\002\022\r\n" - + "\tSUCCEEDED\020\003\032\302\003\n" + + "\tSUCCEEDED\020\003\032\351\003\n" + "\026QueryUnderstandingInfo\022}\n" - + "\031query_classification_info\030\001 \003(\0132Z.google.cloud.discoveryengine.v" - + "1beta.Answer.QueryUnderstandingInfo.QueryClassificationInfo\032\250\002\n" + + "\031query_classification_info\030\001 \003(\013" + + "2Z.google.cloud.discoveryengine.v1beta.A" + + "nswer.QueryUnderstandingInfo.QueryClassificationInfo\032\317\002\n" + "\027QueryClassificationInfo\022m\n" - + "\004type\030\001 \001(\0162_.google.cloud.discoveryengine.v1beta.Answer.QueryUndersta" - + "ndingInfo.QueryClassificationInfo.Type\022\020\n" - + "\010positive\030\002 \001(\010\"\213\001\n" + + "\004type\030\001 \001(\0162_.google.cloud.discoverye" + + "ngine.v1beta.Answer.QueryUnderstandingInfo.QueryClassificationInfo.Type\022\020\n" + + "\010positive\030\002 \001(\010\"\262\001\n" + "\004Type\022\024\n" + "\020TYPE_UNSPECIFIED\020\000\022\025\n" + "\021ADVERSARIAL_QUERY\020\001\022\034\n" + "\030NON_ANSWER_SEEKING_QUERY\020\002\022\027\n" + "\023JAIL_BREAKING_QUERY\020\003\022\037\n" - + "\033NON_ANSWER_SEEKING_QUERY_V2\020\004\"J\n" + + "\033NON_ANSWER_SEEKING_QUERY_V2\020\004\022%\n" + + "!USER_DEFINED_CLASSIFICATION_QUERY\020\005\"Y\n" + "\005State\022\025\n" + "\021STATE_UNSPECIFIED\020\000\022\017\n" + "\013IN_PROGRESS\020\001\022\n\n" + "\006FAILED\020\002\022\r\n" - + "\tSUCCEEDED\020\003\"\335\002\n" + + "\tSUCCEEDED\020\003\022\r\n" + + "\tSTREAMING\020\004\"\242\003\n" + "\023AnswerSkippedReason\022%\n" + "!ANSWER_SKIPPED_REASON_UNSPECIFIED\020\000\022\035\n" + "\031ADVERSARIAL_QUERY_IGNORED\020\001\022$\n" @@ -260,18 +308,23 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\033JAIL_BREAKING_QUERY_IGNORED\020\006\022\035\n" + "\031CUSTOMER_POLICY_VIOLATION\020\007\022\'\n" + "#NON_ANSWER_SEEKING_QUERY_IGNORED_V2\020\010\022\027\n" - + "\023LOW_GROUNDED_ANSWER\020\t:\205\003\352A\201\003\n" - + "%discoveryengine.googleapis.com/Answer\022cprojec" - + "ts/{project}/locations/{location}/dataStores/{data_store}/sessions/{session}/ans" - + "wers/{answer}\022|projects/{project}/locations/{location}/collections/{collection}/" - + "dataStores/{data_store}/sessions/{session}/answers/{answer}\022uprojects/{project}/" - + "locations/{location}/collections/{collec" - + "tion}/engines/{engine}/sessions/{session}/answers/{answer}B\222\002\n" - + "\'com.google.cloud.discoveryengine.v1betaB\013AnswerProtoP\001ZQc" - + "loud.google.com/go/discoveryengine/apiv1beta/discoveryenginepb;discoveryenginepb" - + "\242\002\017DISCOVERYENGINE\252\002#Google.Cloud.Discov" - + "eryEngine.V1Beta\312\002#Google\\Cloud\\Discover" - + "yEngine\\V1beta\352\002&Google::Cloud::DiscoveryEngine::V1betab\006proto3" + + "\023LOW_GROUNDED_ANSWER\020\t\022-\n" + + ")USER_DEFINED_CLASSIFICATION_QUERY_IGNORED\020\n" + + "\022\024\n" + + "\020UNHELPFUL_ANSWER\020\013:\205\003\352A\201\003\n" + + "%discoveryengine.googleapis.com/Answer\022cprojects/{" + + "project}/locations/{location}/dataStores/{data_store}/sessions/{session}/answers" + + "/{answer}\022|projects/{project}/locations/{location}/collections/{collection}/data" + + "Stores/{data_store}/sessions/{session}/answers/{answer}\022uprojects/{project}/loca" + + "tions/{location}/collections/{collection" + + "}/engines/{engine}/sessions/{session}/answers/{answer}B\022\n" + + "\020_grounding_scoreB\222\002\n" + + "\'com.google.cloud.discoveryengine.v1betaB\013" + + "AnswerProtoP\001ZQcloud.google.com/go/discoveryengine/apiv1beta/discoveryenginepb;d" + + "iscoveryenginepb\242\002\017DISCOVERYENGINE\252\002#Goo" + + "gle.Cloud.DiscoveryEngine.V1Beta\312\002#Googl" + + "e\\Cloud\\DiscoveryEngine\\V1beta\352\002&Google:" + + ":Cloud::DiscoveryEngine::V1betab\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -279,6 +332,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.Descriptors.FileDescriptor[] { com.google.api.FieldBehaviorProto.getDescriptor(), com.google.api.ResourceProto.getDescriptor(), + com.google.cloud.discoveryengine.v1beta.SafetyProto.getDescriptor(), com.google.protobuf.StructProto.getDescriptor(), com.google.protobuf.TimestampProto.getDescriptor(), }); @@ -291,14 +345,18 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", "State", "AnswerText", + "GroundingScore", "Citations", + "GroundingSupports", "References", + "BlobAttachments", "RelatedQuestions", "Steps", "QueryUnderstandingInfo", "AnswerSkippedReasons", "CreateTime", "CompleteTime", + "SafetyRatings", }); internal_static_google_cloud_discoveryengine_v1beta_Answer_Citation_descriptor = internal_static_google_cloud_discoveryengine_v1beta_Answer_descriptor.getNestedType(0); @@ -316,8 +374,16 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "ReferenceId", }); - internal_static_google_cloud_discoveryengine_v1beta_Answer_Reference_descriptor = + internal_static_google_cloud_discoveryengine_v1beta_Answer_GroundingSupport_descriptor = internal_static_google_cloud_discoveryengine_v1beta_Answer_descriptor.getNestedType(2); + internal_static_google_cloud_discoveryengine_v1beta_Answer_GroundingSupport_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1beta_Answer_GroundingSupport_descriptor, + new java.lang.String[] { + "StartIndex", "EndIndex", "GroundingScore", "GroundingCheckRequired", "Sources", + }); + internal_static_google_cloud_discoveryengine_v1beta_Answer_Reference_descriptor = + internal_static_google_cloud_discoveryengine_v1beta_Answer_descriptor.getNestedType(3); internal_static_google_cloud_discoveryengine_v1beta_Answer_Reference_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_cloud_discoveryengine_v1beta_Answer_Reference_descriptor, @@ -340,7 +406,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_cloud_discoveryengine_v1beta_Answer_Reference_UnstructuredDocumentInfo_ChunkContent_descriptor, new java.lang.String[] { - "Content", "PageIdentifier", "RelevanceScore", + "Content", "PageIdentifier", "RelevanceScore", "BlobAttachmentIndexes", }); internal_static_google_cloud_discoveryengine_v1beta_Answer_Reference_ChunkInfo_descriptor = internal_static_google_cloud_discoveryengine_v1beta_Answer_Reference_descriptor @@ -349,7 +415,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_cloud_discoveryengine_v1beta_Answer_Reference_ChunkInfo_descriptor, new java.lang.String[] { - "Chunk", "Content", "RelevanceScore", "DocumentMetadata", + "Chunk", "Content", "RelevanceScore", "DocumentMetadata", "BlobAttachmentIndexes", }); internal_static_google_cloud_discoveryengine_v1beta_Answer_Reference_ChunkInfo_DocumentMetadata_descriptor = internal_static_google_cloud_discoveryengine_v1beta_Answer_Reference_ChunkInfo_descriptor @@ -367,10 +433,27 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_cloud_discoveryengine_v1beta_Answer_Reference_StructuredDocumentInfo_descriptor, new java.lang.String[] { - "Document", "StructData", + "Document", "StructData", "Title", "Uri", + }); + internal_static_google_cloud_discoveryengine_v1beta_Answer_BlobAttachment_descriptor = + internal_static_google_cloud_discoveryengine_v1beta_Answer_descriptor.getNestedType(4); + internal_static_google_cloud_discoveryengine_v1beta_Answer_BlobAttachment_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1beta_Answer_BlobAttachment_descriptor, + new java.lang.String[] { + "Data", "AttributionType", + }); + internal_static_google_cloud_discoveryengine_v1beta_Answer_BlobAttachment_Blob_descriptor = + internal_static_google_cloud_discoveryengine_v1beta_Answer_BlobAttachment_descriptor + .getNestedType(0); + internal_static_google_cloud_discoveryengine_v1beta_Answer_BlobAttachment_Blob_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1beta_Answer_BlobAttachment_Blob_descriptor, + new java.lang.String[] { + "MimeType", "Data", }); internal_static_google_cloud_discoveryengine_v1beta_Answer_Step_descriptor = - internal_static_google_cloud_discoveryengine_v1beta_Answer_descriptor.getNestedType(3); + internal_static_google_cloud_discoveryengine_v1beta_Answer_descriptor.getNestedType(5); internal_static_google_cloud_discoveryengine_v1beta_Answer_Step_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_cloud_discoveryengine_v1beta_Answer_Step_descriptor, @@ -431,7 +514,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Chunk", "Content", "RelevanceScore", }); internal_static_google_cloud_discoveryengine_v1beta_Answer_QueryUnderstandingInfo_descriptor = - internal_static_google_cloud_discoveryengine_v1beta_Answer_descriptor.getNestedType(4); + internal_static_google_cloud_discoveryengine_v1beta_Answer_descriptor.getNestedType(6); internal_static_google_cloud_discoveryengine_v1beta_Answer_QueryUnderstandingInfo_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_cloud_discoveryengine_v1beta_Answer_QueryUnderstandingInfo_descriptor, @@ -450,6 +533,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { descriptor.resolveAllFeaturesImmutable(); com.google.api.FieldBehaviorProto.getDescriptor(); com.google.api.ResourceProto.getDescriptor(); + com.google.cloud.discoveryengine.v1beta.SafetyProto.getDescriptor(); com.google.protobuf.StructProto.getDescriptor(); com.google.protobuf.TimestampProto.getDescriptor(); com.google.protobuf.ExtensionRegistry registry = diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/AnswerQueryRequest.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/AnswerQueryRequest.java index eda1086306cf..3170c59efdd5 100644 --- a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/AnswerQueryRequest.java +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/AnswerQueryRequest.java @@ -104,6 +104,84 @@ public interface SafetySpecOrBuilder * @return The enable. */ boolean getEnable(); + + /** + * + * + *
            +     * Optional. Safety settings.
            +     * This settings are effective only when the safety_spec.enable is true.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec.SafetySetting safety_settings = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List< + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec.SafetySetting> + getSafetySettingsList(); + + /** + * + * + *
            +     * Optional. Safety settings.
            +     * This settings are effective only when the safety_spec.enable is true.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec.SafetySetting safety_settings = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec.SafetySetting + getSafetySettings(int index); + + /** + * + * + *
            +     * Optional. Safety settings.
            +     * This settings are effective only when the safety_spec.enable is true.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec.SafetySetting safety_settings = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + int getSafetySettingsCount(); + + /** + * + * + *
            +     * Optional. Safety settings.
            +     * This settings are effective only when the safety_spec.enable is true.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec.SafetySetting safety_settings = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List< + ? extends + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec + .SafetySettingOrBuilder> + getSafetySettingsOrBuilderList(); + + /** + * + * + *
            +     * Optional. Safety settings.
            +     * This settings are effective only when the safety_spec.enable is true.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec.SafetySetting safety_settings = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec.SafetySettingOrBuilder + getSafetySettingsOrBuilder(int index); } /** @@ -111,6 +189,11 @@ public interface SafetySpecOrBuilder * *
                * Safety specification.
            +   * There are two use cases:
            +   * 1. when only safety_spec.enable is set, the BLOCK_LOW_AND_ABOVE threshold
            +   * will be applied for all categories.
            +   * 2. when safety_spec.enable is set and some safety_settings are set, only
            +   * specified safety_settings are applied.
                * 
            * * Protobuf type {@code google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec} @@ -136,7 +219,9 @@ private SafetySpec(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } - private SafetySpec() {} + private SafetySpec() { + safetySettings_ = java.util.Collections.emptyList(); + } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.discoveryengine.v1beta.ConversationalSearchServiceProto @@ -153,1562 +238,1466 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec.Builder.class); } - public static final int ENABLE_FIELD_NUMBER = 1; - private boolean enable_ = false; + public interface SafetySettingOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec.SafetySetting) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
            +       * Required. Harm category.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.HarmCategory category = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for category. + */ + int getCategoryValue(); + + /** + * + * + *
            +       * Required. Harm category.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.HarmCategory category = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The category. + */ + com.google.cloud.discoveryengine.v1beta.HarmCategory getCategory(); + + /** + * + * + *
            +       * Required. The harm block threshold.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec.SafetySetting.HarmBlockThreshold threshold = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for threshold. + */ + int getThresholdValue(); + + /** + * + * + *
            +       * Required. The harm block threshold.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec.SafetySetting.HarmBlockThreshold threshold = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The threshold. + */ + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec.SafetySetting + .HarmBlockThreshold + getThreshold(); + } /** * * *
            -     * Enable the safety filtering on the answer response. It is false by
            -     * default.
            +     * Safety settings.
                  * 
            * - * bool enable = 1; - * - * @return The enable. + * Protobuf type {@code + * google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec.SafetySetting} */ - @java.lang.Override - public boolean getEnable() { - return enable_; - } - - 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; - } + public static final class SafetySetting extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec.SafetySetting) + SafetySettingOrBuilder { + private static final long serialVersionUID = 0L; - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (enable_ != false) { - output.writeBool(1, enable_); + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "SafetySetting"); } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - size = 0; - if (enable_ != false) { - size += com.google.protobuf.CodedOutputStream.computeBoolSize(1, enable_); + // Use SafetySetting.newBuilder() to construct. + private SafetySetting(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); } - 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.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec)) { - return super.equals(obj); + private SafetySetting() { + category_ = 0; + threshold_ = 0; } - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec other = - (com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec) obj; - if (getEnable() != other.getEnable()) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.ConversationalSearchServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_SafetySpec_SafetySetting_descriptor; + } - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.ConversationalSearchServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_SafetySpec_SafetySetting_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec.SafetySetting + .class, + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec.SafetySetting + .Builder.class); } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + ENABLE_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getEnable()); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } + /** + * + * + *
            +       * Probability based thresholds levels for blocking.
            +       * 
            + * + * Protobuf enum {@code + * google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec.SafetySetting.HarmBlockThreshold} + */ + public enum HarmBlockThreshold implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
            +         * Unspecified harm block threshold.
            +         * 
            + * + * HARM_BLOCK_THRESHOLD_UNSPECIFIED = 0; + */ + HARM_BLOCK_THRESHOLD_UNSPECIFIED(0), + /** + * + * + *
            +         * Block low threshold and above (i.e. block more).
            +         * 
            + * + * BLOCK_LOW_AND_ABOVE = 1; + */ + BLOCK_LOW_AND_ABOVE(1), + /** + * + * + *
            +         * Block medium threshold and above.
            +         * 
            + * + * BLOCK_MEDIUM_AND_ABOVE = 2; + */ + BLOCK_MEDIUM_AND_ABOVE(2), + /** + * + * + *
            +         * Block only high threshold (i.e. block less).
            +         * 
            + * + * BLOCK_ONLY_HIGH = 3; + */ + BLOCK_ONLY_HIGH(3), + /** + * + * + *
            +         * Block none.
            +         * 
            + * + * BLOCK_NONE = 4; + */ + BLOCK_NONE(4), + /** + * + * + *
            +         * Turn off the safety filter.
            +         * 
            + * + * OFF = 5; + */ + OFF(5), + UNRECOGNIZED(-1), + ; - public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "HarmBlockThreshold"); + } - public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } + /** + * + * + *
            +         * Unspecified harm block threshold.
            +         * 
            + * + * HARM_BLOCK_THRESHOLD_UNSPECIFIED = 0; + */ + public static final int HARM_BLOCK_THRESHOLD_UNSPECIFIED_VALUE = 0; - public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } + /** + * + * + *
            +         * Block low threshold and above (i.e. block more).
            +         * 
            + * + * BLOCK_LOW_AND_ABOVE = 1; + */ + public static final int BLOCK_LOW_AND_ABOVE_VALUE = 1; - public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec parseFrom( - byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } + /** + * + * + *
            +         * Block medium threshold and above.
            +         * 
            + * + * BLOCK_MEDIUM_AND_ABOVE = 2; + */ + public static final int BLOCK_MEDIUM_AND_ABOVE_VALUE = 2; - public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } + /** + * + * + *
            +         * Block only high threshold (i.e. block less).
            +         * 
            + * + * BLOCK_ONLY_HIGH = 3; + */ + public static final int BLOCK_ONLY_HIGH_VALUE = 3; - public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } + /** + * + * + *
            +         * Block none.
            +         * 
            + * + * BLOCK_NONE = 4; + */ + public static final int BLOCK_NONE_VALUE = 4; - public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } + /** + * + * + *
            +         * Turn off the safety filter.
            +         * 
            + * + * OFF = 5; + */ + public static final int OFF_VALUE = 5; - public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec - parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } - public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec - parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } + /** + * @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 HarmBlockThreshold valueOf(int value) { + return forNumber(value); + } - public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static HarmBlockThreshold forNumber(int value) { + switch (value) { + case 0: + return HARM_BLOCK_THRESHOLD_UNSPECIFIED; + case 1: + return BLOCK_LOW_AND_ABOVE; + case 2: + return BLOCK_MEDIUM_AND_ABOVE; + case 3: + return BLOCK_ONLY_HIGH; + case 4: + return BLOCK_NONE; + case 5: + return OFF; + default: + return null; + } + } - public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } + private static final com.google.protobuf.Internal.EnumLiteMap + internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public HarmBlockThreshold findValueByNumber(int number) { + return HarmBlockThreshold.forNumber(number); + } + }; - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } - public static Builder newBuilder( - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } + public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec.SafetySetting + .getDescriptor() + .getEnumTypes() + .get(0); + } - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } + private static final HarmBlockThreshold[] VALUES = values(); - /** - * - * - *
            -     * Safety specification.
            -     * 
            - * - * Protobuf type {@code google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec) - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpecOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.discoveryengine.v1beta.ConversationalSearchServiceProto - .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_SafetySpec_descriptor; - } + public static HarmBlockThreshold valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.discoveryengine.v1beta.ConversationalSearchServiceProto - .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_SafetySpec_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec.class, - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec.Builder - .class); - } + private final int value; - // Construct using - // com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec.newBuilder() - private Builder() {} + private HarmBlockThreshold(int value) { + this.value = value; + } - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); + // @@protoc_insertion_point(enum_scope:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec.SafetySetting.HarmBlockThreshold) } + public static final int CATEGORY_FIELD_NUMBER = 1; + private int category_ = 0; + + /** + * + * + *
            +       * Required. Harm category.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.HarmCategory category = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for category. + */ @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - enable_ = false; - return this; + public int getCategoryValue() { + return category_; } + /** + * + * + *
            +       * Required. Harm category.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.HarmCategory category = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The category. + */ @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.discoveryengine.v1beta.ConversationalSearchServiceProto - .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_SafetySpec_descriptor; + public com.google.cloud.discoveryengine.v1beta.HarmCategory getCategory() { + com.google.cloud.discoveryengine.v1beta.HarmCategory result = + com.google.cloud.discoveryengine.v1beta.HarmCategory.forNumber(category_); + return result == null + ? com.google.cloud.discoveryengine.v1beta.HarmCategory.UNRECOGNIZED + : result; } + public static final int THRESHOLD_FIELD_NUMBER = 2; + private int threshold_ = 0; + + /** + * + * + *
            +       * Required. The harm block threshold.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec.SafetySetting.HarmBlockThreshold threshold = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for threshold. + */ @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec - getDefaultInstanceForType() { - return com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec - .getDefaultInstance(); + public int getThresholdValue() { + return threshold_; } - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec build() { - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec result = - buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; + /** + * + * + *
            +       * Required. The harm block threshold.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec.SafetySetting.HarmBlockThreshold threshold = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The threshold. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec.SafetySetting + .HarmBlockThreshold + getThreshold() { + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec.SafetySetting + .HarmBlockThreshold + result = + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec.SafetySetting + .HarmBlockThreshold.forNumber(threshold_); + return result == null + ? com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec.SafetySetting + .HarmBlockThreshold.UNRECOGNIZED + : result; } + private byte memoizedIsInitialized = -1; + @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec buildPartial() { - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec result = - new com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; - private void buildPartial0( - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.enable_ = enable_; - } + memoizedIsInitialized = 1; + return true; } @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other - instanceof com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec) { - return mergeFrom( - (com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec) other); - } else { - super.mergeFrom(other); - return this; + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (category_ + != com.google.cloud.discoveryengine.v1beta.HarmCategory.HARM_CATEGORY_UNSPECIFIED + .getNumber()) { + output.writeEnum(1, category_); } + if (threshold_ + != com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec.SafetySetting + .HarmBlockThreshold.HARM_BLOCK_THRESHOLD_UNSPECIFIED + .getNumber()) { + output.writeEnum(2, threshold_); + } + getUnknownFields().writeTo(output); } - public Builder mergeFrom( - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec other) { - if (other - == com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec - .getDefaultInstance()) return this; - if (other.getEnable() != false) { - setEnable(other.getEnable()); + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (category_ + != com.google.cloud.discoveryengine.v1beta.HarmCategory.HARM_CATEGORY_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, category_); } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; + if (threshold_ + != com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec.SafetySetting + .HarmBlockThreshold.HARM_BLOCK_THRESHOLD_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, threshold_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; } @java.lang.Override - public final boolean isInitialized() { + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec.SafetySetting)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec.SafetySetting other = + (com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec.SafetySetting) + obj; + + if (category_ != other.category_) return false; + if (threshold_ != other.threshold_) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: - { - enable_ = input.readBool(); - bitField0_ |= 0x00000001; - break; - } // case 8 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + CATEGORY_FIELD_NUMBER; + hash = (53 * hash) + category_; + hash = (37 * hash) + THRESHOLD_FIELD_NUMBER; + hash = (53 * hash) + threshold_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; } - private int bitField0_; + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec + .SafetySetting + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - private boolean enable_; + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec + .SafetySetting + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - /** - * - * - *
            -       * Enable the safety filtering on the answer response. It is false by
            -       * default.
            -       * 
            - * - * bool enable = 1; - * - * @return The enable. - */ - @java.lang.Override - public boolean getEnable() { - return enable_; + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec + .SafetySetting + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); } - /** - * - * - *
            -       * Enable the safety filtering on the answer response. It is false by
            -       * default.
            -       * 
            - * - * bool enable = 1; - * - * @param value The enable to set. - * @return This builder for chaining. - */ - public Builder setEnable(boolean value) { + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec + .SafetySetting + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - enable_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec + .SafetySetting + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); } - /** - * - * - *
            -       * Enable the safety filtering on the answer response. It is false by
            -       * default.
            -       * 
            - * - * bool enable = 1; - * - * @return This builder for chaining. - */ - public Builder clearEnable() { - bitField0_ = (bitField0_ & ~0x00000001); - enable_ = false; - onChanged(); - return this; + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec + .SafetySetting + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); } - // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec) - } + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec + .SafetySetting + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } - // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec) - private static final com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec - DEFAULT_INSTANCE; + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec + .SafetySetting + parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } - static { - DEFAULT_INSTANCE = - new com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec(); - } + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec + .SafetySetting + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } - public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec - getDefaultInstance() { - return DEFAULT_INSTANCE; - } + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec + .SafetySetting + parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public SafetySpec parsePartialFrom( + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec + .SafetySetting + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec + .SafetySetting + parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException() - .setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - } + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } - public interface RelatedQuestionsSpecOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.RelatedQuestionsSpec) - com.google.protobuf.MessageOrBuilder { + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } - /** - * - * - *
            -     * Enable related questions feature if true.
            -     * 
            - * - * bool enable = 1; - * - * @return The enable. - */ - boolean getEnable(); - } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } - /** - * - * - *
            -   * Related questions specification.
            -   * 
            - * - * Protobuf type {@code - * google.cloud.discoveryengine.v1beta.AnswerQueryRequest.RelatedQuestionsSpec} - */ - public static final class RelatedQuestionsSpec extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.RelatedQuestionsSpec) - RelatedQuestionsSpecOrBuilder { - private static final long serialVersionUID = 0L; + public static Builder newBuilder( + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec.SafetySetting + prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "RelatedQuestionsSpec"); - } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } - // Use RelatedQuestionsSpec.newBuilder() to construct. - private RelatedQuestionsSpec(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } - private RelatedQuestionsSpec() {} + /** + * + * + *
            +       * Safety settings.
            +       * 
            + * + * Protobuf type {@code + * google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec.SafetySetting} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec.SafetySetting) + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec + .SafetySettingOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.ConversationalSearchServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_SafetySpec_SafetySetting_descriptor; + } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.discoveryengine.v1beta.ConversationalSearchServiceProto - .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_RelatedQuestionsSpec_descriptor; - } + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.ConversationalSearchServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_SafetySpec_SafetySetting_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec + .SafetySetting.class, + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec + .SafetySetting.Builder.class); + } - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.discoveryengine.v1beta.ConversationalSearchServiceProto - .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_RelatedQuestionsSpec_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.RelatedQuestionsSpec.class, - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.RelatedQuestionsSpec - .Builder.class); - } + // Construct using + // com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec.SafetySetting.newBuilder() + private Builder() {} - public static final int ENABLE_FIELD_NUMBER = 1; - private boolean enable_ = false; + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } - /** - * - * - *
            -     * Enable related questions feature if true.
            -     * 
            - * - * bool enable = 1; - * - * @return The enable. - */ - @java.lang.Override - public boolean getEnable() { - return enable_; - } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + category_ = 0; + threshold_ = 0; + return this; + } - private byte memoizedIsInitialized = -1; + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1beta.ConversationalSearchServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_SafetySpec_SafetySetting_descriptor; + } - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec.SafetySetting + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec.SafetySetting + .getDefaultInstance(); + } - memoizedIsInitialized = 1; - return true; - } + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec.SafetySetting + build() { + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec.SafetySetting + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (enable_ != false) { - output.writeBool(1, enable_); - } - getUnknownFields().writeTo(output); - } + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec.SafetySetting + buildPartial() { + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec.SafetySetting + result = + new com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec + .SafetySetting(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; + private void buildPartial0( + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec.SafetySetting + result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.category_ = category_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.threshold_ = threshold_; + } + } - size = 0; - if (enable_ != false) { - size += com.google.protobuf.CodedOutputStream.computeBoolSize(1, enable_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec.SafetySetting) { + return mergeFrom( + (com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec + .SafetySetting) + other); + } else { + super.mergeFrom(other); + return this; + } + } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj - instanceof - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.RelatedQuestionsSpec)) { - return super.equals(obj); - } - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.RelatedQuestionsSpec other = - (com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.RelatedQuestionsSpec) obj; + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec.SafetySetting + other) { + if (other + == com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec.SafetySetting + .getDefaultInstance()) return this; + if (other.category_ != 0) { + setCategoryValue(other.getCategoryValue()); + } + if (other.threshold_ != 0) { + setThresholdValue(other.getThresholdValue()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } - if (getEnable() != other.getEnable()) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } + @java.lang.Override + public final boolean isInitialized() { + return true; + } - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + ENABLE_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getEnable()); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.RelatedQuestionsSpec - parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.RelatedQuestionsSpec - 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.discoveryengine.v1beta.AnswerQueryRequest.RelatedQuestionsSpec - parseFrom(com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.RelatedQuestionsSpec - parseFrom( - com.google.protobuf.ByteString data, + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.RelatedQuestionsSpec - parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + category_ = input.readEnum(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 16: + { + threshold_ = input.readEnum(); + bitField0_ |= 0x00000002; + break; + } // case 16 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } - public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.RelatedQuestionsSpec - parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } + private int bitField0_; - public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.RelatedQuestionsSpec - parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } + private int category_ = 0; - public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.RelatedQuestionsSpec - parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } + /** + * + * + *
            +         * Required. Harm category.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.HarmCategory category = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for category. + */ + @java.lang.Override + public int getCategoryValue() { + return category_; + } - public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.RelatedQuestionsSpec - parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } + /** + * + * + *
            +         * Required. Harm category.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.HarmCategory category = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The enum numeric value on the wire for category to set. + * @return This builder for chaining. + */ + public Builder setCategoryValue(int value) { + category_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } - public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.RelatedQuestionsSpec - parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } + /** + * + * + *
            +         * Required. Harm category.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.HarmCategory category = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The category. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.HarmCategory getCategory() { + com.google.cloud.discoveryengine.v1beta.HarmCategory result = + com.google.cloud.discoveryengine.v1beta.HarmCategory.forNumber(category_); + return result == null + ? com.google.cloud.discoveryengine.v1beta.HarmCategory.UNRECOGNIZED + : result; + } - public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.RelatedQuestionsSpec - parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } + /** + * + * + *
            +         * Required. Harm category.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.HarmCategory category = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The category to set. + * @return This builder for chaining. + */ + public Builder setCategory(com.google.cloud.discoveryengine.v1beta.HarmCategory value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + category_ = value.getNumber(); + onChanged(); + return this; + } - public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.RelatedQuestionsSpec - parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } + /** + * + * + *
            +         * Required. Harm category.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.HarmCategory category = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return This builder for chaining. + */ + public Builder clearCategory() { + bitField0_ = (bitField0_ & ~0x00000001); + category_ = 0; + onChanged(); + return this; + } - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } + private int threshold_ = 0; - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } + /** + * + * + *
            +         * Required. The harm block threshold.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec.SafetySetting.HarmBlockThreshold threshold = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for threshold. + */ + @java.lang.Override + public int getThresholdValue() { + return threshold_; + } - public static Builder newBuilder( - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.RelatedQuestionsSpec prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } + /** + * + * + *
            +         * Required. The harm block threshold.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec.SafetySetting.HarmBlockThreshold threshold = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The enum numeric value on the wire for threshold to set. + * @return This builder for chaining. + */ + public Builder setThresholdValue(int value) { + threshold_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } + /** + * + * + *
            +         * Required. The harm block threshold.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec.SafetySetting.HarmBlockThreshold threshold = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The threshold. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec.SafetySetting + .HarmBlockThreshold + getThreshold() { + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec.SafetySetting + .HarmBlockThreshold + result = + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec + .SafetySetting.HarmBlockThreshold.forNumber(threshold_); + return result == null + ? com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec.SafetySetting + .HarmBlockThreshold.UNRECOGNIZED + : result; + } - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } + /** + * + * + *
            +         * Required. The harm block threshold.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec.SafetySetting.HarmBlockThreshold threshold = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The threshold to set. + * @return This builder for chaining. + */ + public Builder setThreshold( + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec.SafetySetting + .HarmBlockThreshold + value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + threshold_ = value.getNumber(); + onChanged(); + return this; + } - /** - * - * - *
            -     * Related questions specification.
            -     * 
            - * - * Protobuf type {@code - * google.cloud.discoveryengine.v1beta.AnswerQueryRequest.RelatedQuestionsSpec} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.RelatedQuestionsSpec) - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.RelatedQuestionsSpecOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.discoveryengine.v1beta.ConversationalSearchServiceProto - .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_RelatedQuestionsSpec_descriptor; - } + /** + * + * + *
            +         * Required. The harm block threshold.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec.SafetySetting.HarmBlockThreshold threshold = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return This builder for chaining. + */ + public Builder clearThreshold() { + bitField0_ = (bitField0_ & ~0x00000002); + threshold_ = 0; + onChanged(); + return this; + } - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.discoveryengine.v1beta.ConversationalSearchServiceProto - .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_RelatedQuestionsSpec_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.RelatedQuestionsSpec - .class, - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.RelatedQuestionsSpec - .Builder.class); + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec.SafetySetting) } - // Construct using - // com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.RelatedQuestionsSpec.newBuilder() - private Builder() {} + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec.SafetySetting) + private static final com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec + .SafetySetting + DEFAULT_INSTANCE; - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); + static { + DEFAULT_INSTANCE = + new com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec + .SafetySetting(); } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - enable_ = false; - return this; + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec + .SafetySetting + getDefaultInstance() { + return DEFAULT_INSTANCE; } - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.discoveryengine.v1beta.ConversationalSearchServiceProto - .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_RelatedQuestionsSpec_descriptor; - } + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SafetySetting parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.RelatedQuestionsSpec - getDefaultInstanceForType() { - return com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.RelatedQuestionsSpec - .getDefaultInstance(); + public static com.google.protobuf.Parser parser() { + return PARSER; } @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.RelatedQuestionsSpec - build() { - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.RelatedQuestionsSpec result = - buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; + public com.google.protobuf.Parser getParserForType() { + return PARSER; } @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.RelatedQuestionsSpec - buildPartial() { - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.RelatedQuestionsSpec result = - new com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.RelatedQuestionsSpec( - this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0( - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.RelatedQuestionsSpec result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.enable_ = enable_; - } + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec.SafetySetting + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; } + } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other - instanceof - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.RelatedQuestionsSpec) { - return mergeFrom( - (com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.RelatedQuestionsSpec) - other); - } else { - super.mergeFrom(other); - return this; - } - } + public static final int ENABLE_FIELD_NUMBER = 1; + private boolean enable_ = false; - public Builder mergeFrom( - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.RelatedQuestionsSpec other) { - if (other - == com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.RelatedQuestionsSpec - .getDefaultInstance()) return this; - if (other.getEnable() != false) { - setEnable(other.getEnable()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } + /** + * + * + *
            +     * Enable the safety filtering on the answer response. It is false by
            +     * default.
            +     * 
            + * + * bool enable = 1; + * + * @return The enable. + */ + @java.lang.Override + public boolean getEnable() { + return enable_; + } - @java.lang.Override - public final boolean isInitialized() { - return true; - } + public static final int SAFETY_SETTINGS_FIELD_NUMBER = 2; - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: - { - enable_ = input.readBool(); - bitField0_ |= 0x00000001; - break; - } // case 8 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } + @SuppressWarnings("serial") + private java.util.List< + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec.SafetySetting> + safetySettings_; - private int bitField0_; + /** + * + * + *
            +     * Optional. Safety settings.
            +     * This settings are effective only when the safety_spec.enable is true.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec.SafetySetting safety_settings = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List< + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec.SafetySetting> + getSafetySettingsList() { + return safetySettings_; + } - private boolean enable_; - - /** - * - * - *
            -       * Enable related questions feature if true.
            -       * 
            - * - * bool enable = 1; - * - * @return The enable. - */ - @java.lang.Override - public boolean getEnable() { - return enable_; - } - - /** - * - * - *
            -       * Enable related questions feature if true.
            -       * 
            - * - * bool enable = 1; - * - * @param value The enable to set. - * @return This builder for chaining. - */ - public Builder setEnable(boolean value) { - - enable_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - /** - * - * - *
            -       * Enable related questions feature if true.
            -       * 
            - * - * bool enable = 1; - * - * @return This builder for chaining. - */ - public Builder clearEnable() { - bitField0_ = (bitField0_ & ~0x00000001); - enable_ = false; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.RelatedQuestionsSpec) - } - - // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.RelatedQuestionsSpec) - private static final com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest - .RelatedQuestionsSpec - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = - new com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.RelatedQuestionsSpec(); - } - - public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.RelatedQuestionsSpec - getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public RelatedQuestionsSpec parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException() - .setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.RelatedQuestionsSpec - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - } - - public interface GroundingSpecOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.GroundingSpec) - com.google.protobuf.MessageOrBuilder { + /** + * + * + *
            +     * Optional. Safety settings.
            +     * This settings are effective only when the safety_spec.enable is true.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec.SafetySetting safety_settings = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List< + ? extends + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec + .SafetySettingOrBuilder> + getSafetySettingsOrBuilderList() { + return safetySettings_; + } /** * * *
            -     * Optional. Specifies whether to include grounding_supports in the answer.
            -     * The default value is `false`.
            -     *
            -     * When this field is set to `true`, returned answer will have
            -     * `grounding_score` and will contain GroundingSupports for each claim.
            +     * Optional. Safety settings.
            +     * This settings are effective only when the safety_spec.enable is true.
                  * 
            * - * bool include_grounding_supports = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The includeGroundingSupports. + * + * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec.SafetySetting safety_settings = 2 [(.google.api.field_behavior) = OPTIONAL]; + * */ - boolean getIncludeGroundingSupports(); + @java.lang.Override + public int getSafetySettingsCount() { + return safetySettings_.size(); + } /** * * *
            -     * Optional. Specifies whether to enable the filtering based on grounding
            -     * score and at what level.
            +     * Optional. Safety settings.
            +     * This settings are effective only when the safety_spec.enable is true.
                  * 
            * * - * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.GroundingSpec.FilteringLevel filtering_level = 3 [(.google.api.field_behavior) = OPTIONAL]; + * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec.SafetySetting safety_settings = 2 [(.google.api.field_behavior) = OPTIONAL]; * - * - * @return The enum numeric value on the wire for filteringLevel. */ - int getFilteringLevelValue(); + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec.SafetySetting + getSafetySettings(int index) { + return safetySettings_.get(index); + } /** * * *
            -     * Optional. Specifies whether to enable the filtering based on grounding
            -     * score and at what level.
            +     * Optional. Safety settings.
            +     * This settings are effective only when the safety_spec.enable is true.
                  * 
            * * - * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.GroundingSpec.FilteringLevel filtering_level = 3 [(.google.api.field_behavior) = OPTIONAL]; + * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec.SafetySetting safety_settings = 2 [(.google.api.field_behavior) = OPTIONAL]; * - * - * @return The filteringLevel. */ - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.GroundingSpec.FilteringLevel - getFilteringLevel(); - } + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec + .SafetySettingOrBuilder + getSafetySettingsOrBuilder(int index) { + return safetySettings_.get(index); + } - /** - * - * - *
            -   * Grounding specification.
            -   * 
            - * - * Protobuf type {@code google.cloud.discoveryengine.v1beta.AnswerQueryRequest.GroundingSpec} - */ - public static final class GroundingSpec extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.GroundingSpec) - GroundingSpecOrBuilder { - private static final long serialVersionUID = 0L; + private byte memoizedIsInitialized = -1; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "GroundingSpec"); + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; } - // Use GroundingSpec.newBuilder() to construct. - private GroundingSpec(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (enable_ != false) { + output.writeBool(1, enable_); + } + for (int i = 0; i < safetySettings_.size(); i++) { + output.writeMessage(2, safetySettings_.get(i)); + } + getUnknownFields().writeTo(output); } - private GroundingSpec() { - filteringLevel_ = 0; + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (enable_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(1, enable_); + } + for (int i = 0; i < safetySettings_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, safetySettings_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.discoveryengine.v1beta.ConversationalSearchServiceProto - .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_GroundingSpec_descriptor; + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec other = + (com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec) obj; + + if (getEnable() != other.getEnable()) return false; + if (!getSafetySettingsList().equals(other.getSafetySettingsList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; } @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.discoveryengine.v1beta.ConversationalSearchServiceProto - .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_GroundingSpec_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.GroundingSpec.class, - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.GroundingSpec.Builder - .class); + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ENABLE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getEnable()); + if (getSafetySettingsCount() > 0) { + hash = (37 * hash) + SAFETY_SETTINGS_FIELD_NUMBER; + hash = (53 * hash) + getSafetySettingsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; } - /** - * - * - *
            -     * Level to filter based on answer grounding.
            -     * 
            - * - * Protobuf enum {@code - * google.cloud.discoveryengine.v1beta.AnswerQueryRequest.GroundingSpec.FilteringLevel} - */ - public enum FilteringLevel implements com.google.protobuf.ProtocolMessageEnum { - /** - * - * - *
            -       * Default is no filter
            -       * 
            - * - * FILTERING_LEVEL_UNSPECIFIED = 0; - */ - FILTERING_LEVEL_UNSPECIFIED(0), - /** - * - * - *
            -       * Filter answers based on a low threshold.
            -       * 
            - * - * FILTERING_LEVEL_LOW = 1; - */ - FILTERING_LEVEL_LOW(1), - /** - * - * - *
            -       * Filter answers based on a high threshold.
            -       * 
            - * - * FILTERING_LEVEL_HIGH = 2; - */ - FILTERING_LEVEL_HIGH(2), - UNRECOGNIZED(-1), - ; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "FilteringLevel"); - } - - /** - * - * - *
            -       * Default is no filter
            -       * 
            - * - * FILTERING_LEVEL_UNSPECIFIED = 0; - */ - public static final int FILTERING_LEVEL_UNSPECIFIED_VALUE = 0; - - /** - * - * - *
            -       * Filter answers based on a low threshold.
            -       * 
            - * - * FILTERING_LEVEL_LOW = 1; - */ - public static final int FILTERING_LEVEL_LOW_VALUE = 1; - - /** - * - * - *
            -       * Filter answers based on a high threshold.
            -       * 
            - * - * FILTERING_LEVEL_HIGH = 2; - */ - public static final int FILTERING_LEVEL_HIGH_VALUE = 2; + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - /** - * @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 FilteringLevel valueOf(int value) { - return forNumber(value); - } + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static FilteringLevel forNumber(int value) { - switch (value) { - case 0: - return FILTERING_LEVEL_UNSPECIFIED; - case 1: - return FILTERING_LEVEL_LOW; - case 2: - return FILTERING_LEVEL_HIGH; - default: - return null; - } - } + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec 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.protobuf.Internal.EnumLiteMap internalGetValueMap() { - return internalValueMap; - } + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - private static final com.google.protobuf.Internal.EnumLiteMap - internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public FilteringLevel findValueByNumber(int number) { - return FilteringLevel.forNumber(number); - } - }; + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } - public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { - return getDescriptor(); - } + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec 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.protobuf.Descriptors.EnumDescriptor getDescriptor() { - return com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.GroundingSpec - .getDescriptor() - .getEnumTypes() - .get(0); - } + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } - private static final FilteringLevel[] VALUES = values(); + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec + 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 FilteringLevel valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } - private final int value; + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } - private FilteringLevel(int value) { - this.value = value; - } + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } - // @@protoc_insertion_point(enum_scope:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.GroundingSpec.FilteringLevel) + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); } - public static final int INCLUDE_GROUNDING_SUPPORTS_FIELD_NUMBER = 2; - private boolean includeGroundingSupports_ = false; + public static Builder newBuilder( + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } - /** - * - * - *
            -     * Optional. Specifies whether to include grounding_supports in the answer.
            -     * The default value is `false`.
            -     *
            -     * When this field is set to `true`, returned answer will have
            -     * `grounding_score` and will contain GroundingSupports for each claim.
            -     * 
            - * - * bool include_grounding_supports = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The includeGroundingSupports. - */ @java.lang.Override - public boolean getIncludeGroundingSupports() { - return includeGroundingSupports_; + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); } - public static final int FILTERING_LEVEL_FIELD_NUMBER = 3; - private int filteringLevel_ = 0; + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } /** * * *
            -     * Optional. Specifies whether to enable the filtering based on grounding
            -     * score and at what level.
            +     * Safety specification.
            +     * There are two use cases:
            +     * 1. when only safety_spec.enable is set, the BLOCK_LOW_AND_ABOVE threshold
            +     * will be applied for all categories.
            +     * 2. when safety_spec.enable is set and some safety_settings are set, only
            +     * specified safety_settings are applied.
                  * 
            * - * - * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.GroundingSpec.FilteringLevel filtering_level = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The enum numeric value on the wire for filteringLevel. - */ - @java.lang.Override - public int getFilteringLevelValue() { - return filteringLevel_; - } - - /** - * - * - *
            -     * Optional. Specifies whether to enable the filtering based on grounding
            -     * score and at what level.
            -     * 
            - * - * - * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.GroundingSpec.FilteringLevel filtering_level = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The filteringLevel. - */ - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.GroundingSpec.FilteringLevel - getFilteringLevel() { - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.GroundingSpec.FilteringLevel - result = - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.GroundingSpec - .FilteringLevel.forNumber(filteringLevel_); - return result == null - ? com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.GroundingSpec.FilteringLevel - .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 (includeGroundingSupports_ != false) { - output.writeBool(2, includeGroundingSupports_); - } - if (filteringLevel_ - != com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.GroundingSpec.FilteringLevel - .FILTERING_LEVEL_UNSPECIFIED - .getNumber()) { - output.writeEnum(3, filteringLevel_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (includeGroundingSupports_ != false) { - size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, includeGroundingSupports_); - } - if (filteringLevel_ - != com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.GroundingSpec.FilteringLevel - .FILTERING_LEVEL_UNSPECIFIED - .getNumber()) { - size += com.google.protobuf.CodedOutputStream.computeEnumSize(3, filteringLevel_); - } - 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.discoveryengine.v1beta.AnswerQueryRequest.GroundingSpec)) { - return super.equals(obj); - } - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.GroundingSpec other = - (com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.GroundingSpec) obj; - - if (getIncludeGroundingSupports() != other.getIncludeGroundingSupports()) return false; - if (filteringLevel_ != other.filteringLevel_) 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) + INCLUDE_GROUNDING_SUPPORTS_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getIncludeGroundingSupports()); - hash = (37 * hash) + FILTERING_LEVEL_FIELD_NUMBER; - hash = (53 * hash) + filteringLevel_; - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.GroundingSpec - parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.GroundingSpec - 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.discoveryengine.v1beta.AnswerQueryRequest.GroundingSpec - parseFrom(com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.GroundingSpec - 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.discoveryengine.v1beta.AnswerQueryRequest.GroundingSpec - parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.GroundingSpec - parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.GroundingSpec - parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.GroundingSpec - 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.discoveryengine.v1beta.AnswerQueryRequest.GroundingSpec - parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.GroundingSpec - 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.discoveryengine.v1beta.AnswerQueryRequest.GroundingSpec - parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.GroundingSpec - 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.discoveryengine.v1beta.AnswerQueryRequest.GroundingSpec 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; - } - - /** - * - * - *
            -     * Grounding specification.
            -     * 
            - * - * Protobuf type {@code google.cloud.discoveryengine.v1beta.AnswerQueryRequest.GroundingSpec} + * Protobuf type {@code google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec} */ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.GroundingSpec) - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.GroundingSpecOrBuilder { + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec) + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpecOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.discoveryengine.v1beta.ConversationalSearchServiceProto - .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_GroundingSpec_descriptor; + .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_SafetySpec_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.discoveryengine.v1beta.ConversationalSearchServiceProto - .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_GroundingSpec_fieldAccessorTable + .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_SafetySpec_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.GroundingSpec.class, - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.GroundingSpec.Builder + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec.class, + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec.Builder .class); } // Construct using - // com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.GroundingSpec.newBuilder() + // com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec.newBuilder() private Builder() {} private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { @@ -1719,27 +1708,33 @@ private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { public Builder clear() { super.clear(); bitField0_ = 0; - includeGroundingSupports_ = false; - filteringLevel_ = 0; + enable_ = false; + if (safetySettingsBuilder_ == null) { + safetySettings_ = java.util.Collections.emptyList(); + } else { + safetySettings_ = null; + safetySettingsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.cloud.discoveryengine.v1beta.ConversationalSearchServiceProto - .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_GroundingSpec_descriptor; + .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_SafetySpec_descriptor; } @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.GroundingSpec + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec getDefaultInstanceForType() { - return com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.GroundingSpec + return com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec .getDefaultInstance(); } @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.GroundingSpec build() { - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.GroundingSpec result = + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec build() { + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); @@ -1748,10 +1743,10 @@ public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.GroundingSpec } @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.GroundingSpec - buildPartial() { - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.GroundingSpec result = - new com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.GroundingSpec(this); + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec buildPartial() { + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec result = + new com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec(this); + buildPartialRepeatedFields(result); if (bitField0_ != 0) { buildPartial0(result); } @@ -1759,23 +1754,33 @@ public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.GroundingSpec return result; } - private void buildPartial0( - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.GroundingSpec result) { + private void buildPartialRepeatedFields( + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec result) { + if (safetySettingsBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + safetySettings_ = java.util.Collections.unmodifiableList(safetySettings_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.safetySettings_ = safetySettings_; + } else { + result.safetySettings_ = safetySettingsBuilder_.build(); + } + } + + private void buildPartial0( + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec result) { int from_bitField0_ = bitField0_; if (((from_bitField0_ & 0x00000001) != 0)) { - result.includeGroundingSupports_ = includeGroundingSupports_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.filteringLevel_ = filteringLevel_; + result.enable_ = enable_; } } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other - instanceof com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.GroundingSpec) { + instanceof com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec) { return mergeFrom( - (com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.GroundingSpec) other); + (com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec) other); } else { super.mergeFrom(other); return this; @@ -1783,15 +1788,39 @@ public Builder mergeFrom(com.google.protobuf.Message other) { } public Builder mergeFrom( - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.GroundingSpec other) { + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec other) { if (other - == com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.GroundingSpec + == com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec .getDefaultInstance()) return this; - if (other.getIncludeGroundingSupports() != false) { - setIncludeGroundingSupports(other.getIncludeGroundingSupports()); + if (other.getEnable() != false) { + setEnable(other.getEnable()); } - if (other.filteringLevel_ != 0) { - setFilteringLevelValue(other.getFilteringLevelValue()); + if (safetySettingsBuilder_ == null) { + if (!other.safetySettings_.isEmpty()) { + if (safetySettings_.isEmpty()) { + safetySettings_ = other.safetySettings_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureSafetySettingsIsMutable(); + safetySettings_.addAll(other.safetySettings_); + } + onChanged(); + } + } else { + if (!other.safetySettings_.isEmpty()) { + if (safetySettingsBuilder_.isEmpty()) { + safetySettingsBuilder_.dispose(); + safetySettingsBuilder_ = null; + safetySettings_ = other.safetySettings_; + bitField0_ = (bitField0_ & ~0x00000002); + safetySettingsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetSafetySettingsFieldBuilder() + : null; + } else { + safetySettingsBuilder_.addAllMessages(other.safetySettings_); + } + } } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); @@ -1819,18 +1848,29 @@ public Builder mergeFrom( case 0: done = true; break; - case 16: + case 8: { - includeGroundingSupports_ = input.readBool(); + enable_ = input.readBool(); bitField0_ |= 0x00000001; break; - } // case 16 - case 24: + } // case 8 + case 18: { - filteringLevel_ = input.readEnum(); - bitField0_ |= 0x00000002; + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec + .SafetySetting + m = + input.readMessage( + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec + .SafetySetting.parser(), + extensionRegistry); + if (safetySettingsBuilder_ == null) { + ensureSafetySettingsIsMutable(); + safetySettings_.add(m); + } else { + safetySettingsBuilder_.addMessage(m); + } break; - } // case 24 + } // case 18 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -1850,47 +1890,41 @@ public Builder mergeFrom( private int bitField0_; - private boolean includeGroundingSupports_; + private boolean enable_; /** * * *
            -       * Optional. Specifies whether to include grounding_supports in the answer.
            -       * The default value is `false`.
            -       *
            -       * When this field is set to `true`, returned answer will have
            -       * `grounding_score` and will contain GroundingSupports for each claim.
            +       * Enable the safety filtering on the answer response. It is false by
            +       * default.
                    * 
            * - * bool include_grounding_supports = 2 [(.google.api.field_behavior) = OPTIONAL]; + * bool enable = 1; * - * @return The includeGroundingSupports. + * @return The enable. */ @java.lang.Override - public boolean getIncludeGroundingSupports() { - return includeGroundingSupports_; + public boolean getEnable() { + return enable_; } /** * * *
            -       * Optional. Specifies whether to include grounding_supports in the answer.
            -       * The default value is `false`.
            -       *
            -       * When this field is set to `true`, returned answer will have
            -       * `grounding_score` and will contain GroundingSupports for each claim.
            +       * Enable the safety filtering on the answer response. It is false by
            +       * default.
                    * 
            * - * bool include_grounding_supports = 2 [(.google.api.field_behavior) = OPTIONAL]; + * bool enable = 1; * - * @param value The includeGroundingSupports to set. + * @param value The enable to set. * @return This builder for chaining. */ - public Builder setIncludeGroundingSupports(boolean value) { + public Builder setEnable(boolean value) { - includeGroundingSupports_ = value; + enable_ = value; bitField0_ |= 0x00000001; onChanged(); return this; @@ -1900,64 +1934,132 @@ public Builder setIncludeGroundingSupports(boolean value) { * * *
            -       * Optional. Specifies whether to include grounding_supports in the answer.
            -       * The default value is `false`.
            -       *
            -       * When this field is set to `true`, returned answer will have
            -       * `grounding_score` and will contain GroundingSupports for each claim.
            +       * Enable the safety filtering on the answer response. It is false by
            +       * default.
                    * 
            * - * bool include_grounding_supports = 2 [(.google.api.field_behavior) = OPTIONAL]; + * bool enable = 1; * * @return This builder for chaining. */ - public Builder clearIncludeGroundingSupports() { + public Builder clearEnable() { bitField0_ = (bitField0_ & ~0x00000001); - includeGroundingSupports_ = false; + enable_ = false; onChanged(); return this; } - private int filteringLevel_ = 0; + private java.util.List< + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec.SafetySetting> + safetySettings_ = java.util.Collections.emptyList(); + + private void ensureSafetySettingsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + safetySettings_ = + new java.util.ArrayList< + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec + .SafetySetting>(safetySettings_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec.SafetySetting, + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec.SafetySetting + .Builder, + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec + .SafetySettingOrBuilder> + safetySettingsBuilder_; /** * * *
            -       * Optional. Specifies whether to enable the filtering based on grounding
            -       * score and at what level.
            +       * Optional. Safety settings.
            +       * This settings are effective only when the safety_spec.enable is true.
                    * 
            * * - * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.GroundingSpec.FilteringLevel filtering_level = 3 [(.google.api.field_behavior) = OPTIONAL]; + * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec.SafetySetting safety_settings = 2 [(.google.api.field_behavior) = OPTIONAL]; * + */ + public java.util.List< + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec.SafetySetting> + getSafetySettingsList() { + if (safetySettingsBuilder_ == null) { + return java.util.Collections.unmodifiableList(safetySettings_); + } else { + return safetySettingsBuilder_.getMessageList(); + } + } + + /** * - * @return The enum numeric value on the wire for filteringLevel. + * + *
            +       * Optional. Safety settings.
            +       * This settings are effective only when the safety_spec.enable is true.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec.SafetySetting safety_settings = 2 [(.google.api.field_behavior) = OPTIONAL]; + * */ - @java.lang.Override - public int getFilteringLevelValue() { - return filteringLevel_; + public int getSafetySettingsCount() { + if (safetySettingsBuilder_ == null) { + return safetySettings_.size(); + } else { + return safetySettingsBuilder_.getCount(); + } } /** * * *
            -       * Optional. Specifies whether to enable the filtering based on grounding
            -       * score and at what level.
            +       * Optional. Safety settings.
            +       * This settings are effective only when the safety_spec.enable is true.
                    * 
            * * - * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.GroundingSpec.FilteringLevel filtering_level = 3 [(.google.api.field_behavior) = OPTIONAL]; + * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec.SafetySetting safety_settings = 2 [(.google.api.field_behavior) = OPTIONAL]; * + */ + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec.SafetySetting + getSafetySettings(int index) { + if (safetySettingsBuilder_ == null) { + return safetySettings_.get(index); + } else { + return safetySettingsBuilder_.getMessage(index); + } + } + + /** * - * @param value The enum numeric value on the wire for filteringLevel to set. - * @return This builder for chaining. + * + *
            +       * Optional. Safety settings.
            +       * This settings are effective only when the safety_spec.enable is true.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec.SafetySetting safety_settings = 2 [(.google.api.field_behavior) = OPTIONAL]; + * */ - public Builder setFilteringLevelValue(int value) { - filteringLevel_ = value; - bitField0_ |= 0x00000002; - onChanged(); + public Builder setSafetySettings( + int index, + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec.SafetySetting + value) { + if (safetySettingsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSafetySettingsIsMutable(); + safetySettings_.set(index, value); + onChanged(); + } else { + safetySettingsBuilder_.setMessage(index, value); + } return this; } @@ -1965,53 +2067,54 @@ public Builder setFilteringLevelValue(int value) { * * *
            -       * Optional. Specifies whether to enable the filtering based on grounding
            -       * score and at what level.
            +       * Optional. Safety settings.
            +       * This settings are effective only when the safety_spec.enable is true.
                    * 
            * * - * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.GroundingSpec.FilteringLevel filtering_level = 3 [(.google.api.field_behavior) = OPTIONAL]; + * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec.SafetySetting safety_settings = 2 [(.google.api.field_behavior) = OPTIONAL]; * - * - * @return The filteringLevel. */ - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.GroundingSpec.FilteringLevel - getFilteringLevel() { - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.GroundingSpec.FilteringLevel - result = - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.GroundingSpec - .FilteringLevel.forNumber(filteringLevel_); - return result == null - ? com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.GroundingSpec - .FilteringLevel.UNRECOGNIZED - : result; + public Builder setSafetySettings( + int index, + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec.SafetySetting + .Builder + builderForValue) { + if (safetySettingsBuilder_ == null) { + ensureSafetySettingsIsMutable(); + safetySettings_.set(index, builderForValue.build()); + onChanged(); + } else { + safetySettingsBuilder_.setMessage(index, builderForValue.build()); + } + return this; } /** * * *
            -       * Optional. Specifies whether to enable the filtering based on grounding
            -       * score and at what level.
            +       * Optional. Safety settings.
            +       * This settings are effective only when the safety_spec.enable is true.
                    * 
            * * - * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.GroundingSpec.FilteringLevel filtering_level = 3 [(.google.api.field_behavior) = OPTIONAL]; + * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec.SafetySetting safety_settings = 2 [(.google.api.field_behavior) = OPTIONAL]; * - * - * @param value The filteringLevel to set. - * @return This builder for chaining. */ - public Builder setFilteringLevel( - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.GroundingSpec.FilteringLevel + public Builder addSafetySettings( + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec.SafetySetting value) { - if (value == null) { - throw new NullPointerException(); + if (safetySettingsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSafetySettingsIsMutable(); + safetySettings_.add(value); + onChanged(); + } else { + safetySettingsBuilder_.addMessage(value); } - bitField0_ |= 0x00000002; - filteringLevel_ = value.getNumber(); - onChanged(); return this; } @@ -2019,44 +2122,330 @@ public Builder setFilteringLevel( * * *
            -       * Optional. Specifies whether to enable the filtering based on grounding
            -       * score and at what level.
            +       * Optional. Safety settings.
            +       * This settings are effective only when the safety_spec.enable is true.
                    * 
            * * - * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.GroundingSpec.FilteringLevel filtering_level = 3 [(.google.api.field_behavior) = OPTIONAL]; + * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec.SafetySetting safety_settings = 2 [(.google.api.field_behavior) = OPTIONAL]; * - * - * @return This builder for chaining. */ - public Builder clearFilteringLevel() { - bitField0_ = (bitField0_ & ~0x00000002); - filteringLevel_ = 0; - onChanged(); + public Builder addSafetySettings( + int index, + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec.SafetySetting + value) { + if (safetySettingsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSafetySettingsIsMutable(); + safetySettings_.add(index, value); + onChanged(); + } else { + safetySettingsBuilder_.addMessage(index, value); + } return this; } - // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.GroundingSpec) - } - - // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.GroundingSpec) - private static final com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.GroundingSpec - DEFAULT_INSTANCE; + /** + * + * + *
            +       * Optional. Safety settings.
            +       * This settings are effective only when the safety_spec.enable is true.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec.SafetySetting safety_settings = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addSafetySettings( + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec.SafetySetting + .Builder + builderForValue) { + if (safetySettingsBuilder_ == null) { + ensureSafetySettingsIsMutable(); + safetySettings_.add(builderForValue.build()); + onChanged(); + } else { + safetySettingsBuilder_.addMessage(builderForValue.build()); + } + return this; + } - static { - DEFAULT_INSTANCE = - new com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.GroundingSpec(); - } + /** + * + * + *
            +       * Optional. Safety settings.
            +       * This settings are effective only when the safety_spec.enable is true.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec.SafetySetting safety_settings = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addSafetySettings( + int index, + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec.SafetySetting + .Builder + builderForValue) { + if (safetySettingsBuilder_ == null) { + ensureSafetySettingsIsMutable(); + safetySettings_.add(index, builderForValue.build()); + onChanged(); + } else { + safetySettingsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } - public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.GroundingSpec - getDefaultInstance() { - return DEFAULT_INSTANCE; - } + /** + * + * + *
            +       * Optional. Safety settings.
            +       * This settings are effective only when the safety_spec.enable is true.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec.SafetySetting safety_settings = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addAllSafetySettings( + java.lang.Iterable< + ? extends + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec + .SafetySetting> + values) { + if (safetySettingsBuilder_ == null) { + ensureSafetySettingsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, safetySettings_); + onChanged(); + } else { + safetySettingsBuilder_.addAllMessages(values); + } + return this; + } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { + /** + * + * + *
            +       * Optional. Safety settings.
            +       * This settings are effective only when the safety_spec.enable is true.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec.SafetySetting safety_settings = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearSafetySettings() { + if (safetySettingsBuilder_ == null) { + safetySettings_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + safetySettingsBuilder_.clear(); + } + return this; + } + + /** + * + * + *
            +       * Optional. Safety settings.
            +       * This settings are effective only when the safety_spec.enable is true.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec.SafetySetting safety_settings = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder removeSafetySettings(int index) { + if (safetySettingsBuilder_ == null) { + ensureSafetySettingsIsMutable(); + safetySettings_.remove(index); + onChanged(); + } else { + safetySettingsBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
            +       * Optional. Safety settings.
            +       * This settings are effective only when the safety_spec.enable is true.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec.SafetySetting safety_settings = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec.SafetySetting + .Builder + getSafetySettingsBuilder(int index) { + return internalGetSafetySettingsFieldBuilder().getBuilder(index); + } + + /** + * + * + *
            +       * Optional. Safety settings.
            +       * This settings are effective only when the safety_spec.enable is true.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec.SafetySetting safety_settings = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec + .SafetySettingOrBuilder + getSafetySettingsOrBuilder(int index) { + if (safetySettingsBuilder_ == null) { + return safetySettings_.get(index); + } else { + return safetySettingsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
            +       * Optional. Safety settings.
            +       * This settings are effective only when the safety_spec.enable is true.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec.SafetySetting safety_settings = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List< + ? extends + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec + .SafetySettingOrBuilder> + getSafetySettingsOrBuilderList() { + if (safetySettingsBuilder_ != null) { + return safetySettingsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(safetySettings_); + } + } + + /** + * + * + *
            +       * Optional. Safety settings.
            +       * This settings are effective only when the safety_spec.enable is true.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec.SafetySetting safety_settings = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec.SafetySetting + .Builder + addSafetySettingsBuilder() { + return internalGetSafetySettingsFieldBuilder() + .addBuilder( + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec.SafetySetting + .getDefaultInstance()); + } + + /** + * + * + *
            +       * Optional. Safety settings.
            +       * This settings are effective only when the safety_spec.enable is true.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec.SafetySetting safety_settings = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec.SafetySetting + .Builder + addSafetySettingsBuilder(int index) { + return internalGetSafetySettingsFieldBuilder() + .addBuilder( + index, + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec.SafetySetting + .getDefaultInstance()); + } + + /** + * + * + *
            +       * Optional. Safety settings.
            +       * This settings are effective only when the safety_spec.enable is true.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec.SafetySetting safety_settings = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List< + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec.SafetySetting + .Builder> + getSafetySettingsBuilderList() { + return internalGetSafetySettingsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec.SafetySetting, + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec.SafetySetting + .Builder, + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec + .SafetySettingOrBuilder> + internalGetSafetySettingsFieldBuilder() { + if (safetySettingsBuilder_ == null) { + safetySettingsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec + .SafetySetting, + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec + .SafetySetting.Builder, + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec + .SafetySettingOrBuilder>( + safetySettings_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + safetySettings_ = null; + } + return safetySettingsBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec) + private static final com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec(); + } + + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { @java.lang.Override - public GroundingSpec parsePartialFrom( + public SafetySpec parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { @@ -2076,1680 +2465,1510 @@ public GroundingSpec parsePartialFrom( } }; - public static com.google.protobuf.Parser parser() { + public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override - public com.google.protobuf.Parser getParserForType() { + public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.GroundingSpec + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } - public interface AnswerGenerationSpecOrBuilder + public interface RelatedQuestionsSpecOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec) + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.RelatedQuestionsSpec) com.google.protobuf.MessageOrBuilder { /** * * *
            -     * Answer generation model specification.
            +     * Enable related questions feature if true.
                  * 
            * - * - * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec.ModelSpec model_spec = 1; - * + * bool enable = 1; * - * @return Whether the modelSpec field is set. + * @return The enable. */ - boolean hasModelSpec(); + boolean getEnable(); + } + + /** + * + * + *
            +   * Related questions specification.
            +   * 
            + * + * Protobuf type {@code + * google.cloud.discoveryengine.v1beta.AnswerQueryRequest.RelatedQuestionsSpec} + */ + public static final class RelatedQuestionsSpec extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.RelatedQuestionsSpec) + RelatedQuestionsSpecOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "RelatedQuestionsSpec"); + } + + // Use RelatedQuestionsSpec.newBuilder() to construct. + private RelatedQuestionsSpec(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private RelatedQuestionsSpec() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.ConversationalSearchServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_RelatedQuestionsSpec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.ConversationalSearchServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_RelatedQuestionsSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.RelatedQuestionsSpec.class, + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.RelatedQuestionsSpec + .Builder.class); + } + + public static final int ENABLE_FIELD_NUMBER = 1; + private boolean enable_ = false; /** * * *
            -     * Answer generation model specification.
            +     * Enable related questions feature if true.
                  * 
            * - * - * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec.ModelSpec model_spec = 1; - * + * bool enable = 1; * - * @return The modelSpec. + * @return The enable. */ - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec.ModelSpec - getModelSpec(); + @java.lang.Override + public boolean getEnable() { + return enable_; + } - /** - * - * - *
            -     * Answer generation model specification.
            -     * 
            - * - * - * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec.ModelSpec model_spec = 1; - * - */ - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec - .ModelSpecOrBuilder - getModelSpecOrBuilder(); + private byte memoizedIsInitialized = -1; - /** - * - * - *
            -     * Answer generation prompt specification.
            -     * 
            - * - * - * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec.PromptSpec prompt_spec = 2; - * - * - * @return Whether the promptSpec field is set. - */ - boolean hasPromptSpec(); + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; - /** - * - * - *
            -     * Answer generation prompt specification.
            -     * 
            - * - * - * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec.PromptSpec prompt_spec = 2; - * - * - * @return The promptSpec. - */ - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec.PromptSpec - getPromptSpec(); + memoizedIsInitialized = 1; + return true; + } - /** - * - * - *
            -     * Answer generation prompt specification.
            -     * 
            - * - * - * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec.PromptSpec prompt_spec = 2; - * - */ - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec - .PromptSpecOrBuilder - getPromptSpecOrBuilder(); + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (enable_ != false) { + output.writeBool(1, enable_); + } + getUnknownFields().writeTo(output); + } - /** - * - * - *
            -     * Specifies whether to include citation metadata in the answer. The default
            -     * value is `false`.
            -     * 
            - * - * bool include_citations = 3; - * - * @return The includeCitations. - */ - boolean getIncludeCitations(); + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; - /** - * - * - *
            -     * Language code for Answer. Use language tags defined by
            -     * [BCP47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt).
            -     * Note: This is an experimental feature.
            -     * 
            - * - * string answer_language_code = 4; - * - * @return The answerLanguageCode. - */ - java.lang.String getAnswerLanguageCode(); + size = 0; + if (enable_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(1, enable_); + } + 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.discoveryengine.v1beta.AnswerQueryRequest.RelatedQuestionsSpec)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.RelatedQuestionsSpec other = + (com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.RelatedQuestionsSpec) obj; + + if (getEnable() != other.getEnable()) 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) + ENABLE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getEnable()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.RelatedQuestionsSpec + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.RelatedQuestionsSpec + 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.discoveryengine.v1beta.AnswerQueryRequest.RelatedQuestionsSpec + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.RelatedQuestionsSpec + 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.discoveryengine.v1beta.AnswerQueryRequest.RelatedQuestionsSpec + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.RelatedQuestionsSpec + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.RelatedQuestionsSpec + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.RelatedQuestionsSpec + 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.discoveryengine.v1beta.AnswerQueryRequest.RelatedQuestionsSpec + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.RelatedQuestionsSpec + 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.discoveryengine.v1beta.AnswerQueryRequest.RelatedQuestionsSpec + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.RelatedQuestionsSpec + 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.discoveryengine.v1beta.AnswerQueryRequest.RelatedQuestionsSpec 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; + } /** * * *
            -     * Language code for Answer. Use language tags defined by
            -     * [BCP47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt).
            -     * Note: This is an experimental feature.
            +     * Related questions specification.
                  * 
            * - * string answer_language_code = 4; - * - * @return The bytes for answerLanguageCode. + * Protobuf type {@code + * google.cloud.discoveryengine.v1beta.AnswerQueryRequest.RelatedQuestionsSpec} */ - com.google.protobuf.ByteString getAnswerLanguageCodeBytes(); + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.RelatedQuestionsSpec) + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.RelatedQuestionsSpecOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.ConversationalSearchServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_RelatedQuestionsSpec_descriptor; + } - /** - * - * - *
            -     * Specifies whether to filter out adversarial queries. The default value
            -     * is `false`.
            -     *
            -     * Google employs search-query classification to detect adversarial
            -     * queries. No answer is returned if the search query is classified as an
            -     * adversarial query. For example, a user might ask a question regarding
            -     * negative comments about the company or submit a query designed to
            -     * generate unsafe, policy-violating output. If this field is set to
            -     * `true`, we skip generating answers for adversarial queries and return
            -     * fallback messages instead.
            -     * 
            - * - * bool ignore_adversarial_query = 5; - * - * @return The ignoreAdversarialQuery. - */ - boolean getIgnoreAdversarialQuery(); - - /** - * - * - *
            -     * Specifies whether to filter out queries that are not answer-seeking.
            -     * The default value is `false`.
            -     *
            -     * Google employs search-query classification to detect answer-seeking
            -     * queries. No answer is returned if the search query is classified as a
            -     * non-answer seeking query. If this field is set to `true`, we skip
            -     * generating answers for non-answer seeking queries and return
            -     * fallback messages instead.
            -     * 
            - * - * bool ignore_non_answer_seeking_query = 6; - * - * @return The ignoreNonAnswerSeekingQuery. - */ - boolean getIgnoreNonAnswerSeekingQuery(); - - /** - * - * - *
            -     * Specifies whether to filter out queries that have low relevance.
            -     *
            -     * If this field is set to `false`, all search results are used regardless
            -     * of relevance to generate answers. If set to `true` or unset, the behavior
            -     * will be determined automatically by the service.
            -     * 
            - * - * optional bool ignore_low_relevant_content = 7; - * - * @return Whether the ignoreLowRelevantContent field is set. - */ - boolean hasIgnoreLowRelevantContent(); - - /** - * - * - *
            -     * Specifies whether to filter out queries that have low relevance.
            -     *
            -     * If this field is set to `false`, all search results are used regardless
            -     * of relevance to generate answers. If set to `true` or unset, the behavior
            -     * will be determined automatically by the service.
            -     * 
            - * - * optional bool ignore_low_relevant_content = 7; - * - * @return The ignoreLowRelevantContent. - */ - boolean getIgnoreLowRelevantContent(); - - /** - * - * - *
            -     * Optional. Specifies whether to filter out jail-breaking queries. The
            -     * default value is `false`.
            -     *
            -     * Google employs search-query classification to detect jail-breaking
            -     * queries. No summary is returned if the search query is classified as a
            -     * jail-breaking query. A user might add instructions to the query to
            -     * change the tone, style, language, content of the answer, or ask the
            -     * model to act as a different entity, e.g. "Reply in the tone of a
            -     * competing company's CEO". If this field is set to `true`, we skip
            -     * generating summaries for jail-breaking queries and return fallback
            -     * messages instead.
            -     * 
            - * - * bool ignore_jail_breaking_query = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The ignoreJailBreakingQuery. - */ - boolean getIgnoreJailBreakingQuery(); - } - - /** - * - * - *
            -   * Answer generation specification.
            -   * 
            - * - * Protobuf type {@code - * google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec} - */ - public static final class AnswerGenerationSpec extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec) - AnswerGenerationSpecOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "AnswerGenerationSpec"); - } - - // Use AnswerGenerationSpec.newBuilder() to construct. - private AnswerGenerationSpec(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private AnswerGenerationSpec() { - answerLanguageCode_ = ""; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.discoveryengine.v1beta.ConversationalSearchServiceProto - .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_AnswerGenerationSpec_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.discoveryengine.v1beta.ConversationalSearchServiceProto - .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_AnswerGenerationSpec_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec.class, - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec - .Builder.class); - } - - public interface ModelSpecOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec.ModelSpec) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
            -       * Model version. If not set, it will use the default stable model.
            -       * Allowed values are: stable, preview.
            -       * 
            - * - * string model_version = 1; - * - * @return The modelVersion. - */ - java.lang.String getModelVersion(); - - /** - * - * - *
            -       * Model version. If not set, it will use the default stable model.
            -       * Allowed values are: stable, preview.
            -       * 
            - * - * string model_version = 1; - * - * @return The bytes for modelVersion. - */ - com.google.protobuf.ByteString getModelVersionBytes(); - } + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.ConversationalSearchServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_RelatedQuestionsSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.RelatedQuestionsSpec + .class, + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.RelatedQuestionsSpec + .Builder.class); + } - /** - * - * - *
            -     * Answer Generation Model specification.
            -     * 
            - * - * Protobuf type {@code - * google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec.ModelSpec} - */ - public static final class ModelSpec extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec.ModelSpec) - ModelSpecOrBuilder { - private static final long serialVersionUID = 0L; + // Construct using + // com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.RelatedQuestionsSpec.newBuilder() + private Builder() {} - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "ModelSpec"); + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); } - // Use ModelSpec.newBuilder() to construct. - private ModelSpec(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + enable_ = false; + return this; } - private ModelSpec() { - modelVersion_ = ""; + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1beta.ConversationalSearchServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_RelatedQuestionsSpec_descriptor; } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.discoveryengine.v1beta.ConversationalSearchServiceProto - .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_AnswerGenerationSpec_ModelSpec_descriptor; + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.RelatedQuestionsSpec + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.RelatedQuestionsSpec + .getDefaultInstance(); } @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.discoveryengine.v1beta.ConversationalSearchServiceProto - .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_AnswerGenerationSpec_ModelSpec_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec - .ModelSpec.class, - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec - .ModelSpec.Builder.class); + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.RelatedQuestionsSpec + build() { + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.RelatedQuestionsSpec result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; } - public static final int MODEL_VERSION_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object modelVersion_ = ""; - - /** - * - * - *
            -       * Model version. If not set, it will use the default stable model.
            -       * Allowed values are: stable, preview.
            -       * 
            - * - * string model_version = 1; - * - * @return The modelVersion. - */ @java.lang.Override - public java.lang.String getModelVersion() { - java.lang.Object ref = modelVersion_; - 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(); - modelVersion_ = s; - return s; + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.RelatedQuestionsSpec + buildPartial() { + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.RelatedQuestionsSpec result = + new com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.RelatedQuestionsSpec( + this); + if (bitField0_ != 0) { + buildPartial0(result); } + onBuilt(); + return result; } - /** - * - * - *
            -       * Model version. If not set, it will use the default stable model.
            -       * Allowed values are: stable, preview.
            -       * 
            - * - * string model_version = 1; - * - * @return The bytes for modelVersion. - */ - @java.lang.Override - public com.google.protobuf.ByteString getModelVersionBytes() { - java.lang.Object ref = modelVersion_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - modelVersion_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; + private void buildPartial0( + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.RelatedQuestionsSpec result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.enable_ = enable_; } } - 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(modelVersion_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, modelVersion_); + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.RelatedQuestionsSpec) { + return mergeFrom( + (com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.RelatedQuestionsSpec) + other); + } else { + super.mergeFrom(other); + return this; } - 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(modelVersion_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, modelVersion_); + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.RelatedQuestionsSpec other) { + if (other + == com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.RelatedQuestionsSpec + .getDefaultInstance()) return this; + if (other.getEnable() != false) { + setEnable(other.getEnable()); } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; } @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj - instanceof - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec - .ModelSpec)) { - return super.equals(obj); - } - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec.ModelSpec - other = - (com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec - .ModelSpec) - obj; - - if (!getModelVersion().equals(other.getModelVersion())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; + public final boolean isInitialized() { return true; } @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + MODEL_VERSION_FIELD_NUMBER; - hash = (53 * hash) + getModelVersion().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + enable_ = input.readBool(); + bitField0_ |= 0x00000001; + break; + } // case 8 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; } - public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec - .ModelSpec - parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } + private int bitField0_; - public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec - .ModelSpec - parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } + private boolean enable_; - public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec - .ModelSpec - parseFrom(com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); + /** + * + * + *
            +       * Enable related questions feature if true.
            +       * 
            + * + * bool enable = 1; + * + * @return The enable. + */ + @java.lang.Override + public boolean getEnable() { + return enable_; } - public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec - .ModelSpec - parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } + /** + * + * + *
            +       * Enable related questions feature if true.
            +       * 
            + * + * bool enable = 1; + * + * @param value The enable to set. + * @return This builder for chaining. + */ + public Builder setEnable(boolean value) { - public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec - .ModelSpec - parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); + enable_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; } - public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec - .ModelSpec - parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); + /** + * + * + *
            +       * Enable related questions feature if true.
            +       * 
            + * + * bool enable = 1; + * + * @return This builder for chaining. + */ + public Builder clearEnable() { + bitField0_ = (bitField0_ & ~0x00000001); + enable_ = false; + onChanged(); + return this; } - public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec - .ModelSpec - parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec - .ModelSpec - parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.RelatedQuestionsSpec) + } - public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec - .ModelSpec - parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.RelatedQuestionsSpec) + private static final com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest + .RelatedQuestionsSpec + DEFAULT_INSTANCE; - public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec - .ModelSpec - parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } + static { + DEFAULT_INSTANCE = + new com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.RelatedQuestionsSpec(); + } - public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec - .ModelSpec - parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.RelatedQuestionsSpec + getDefaultInstance() { + return DEFAULT_INSTANCE; + } - public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec - .ModelSpec - parseFrom( + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RelatedQuestionsSpec parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } + public static com.google.protobuf.Parser parser() { + return PARSER; + } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } - public static Builder newBuilder( - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec.ModelSpec - prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.RelatedQuestionsSpec + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } + public interface GroundingSpecOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.GroundingSpec) + com.google.protobuf.MessageOrBuilder { - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } + /** + * + * + *
            +     * Optional. Specifies whether to include grounding_supports in the answer.
            +     * The default value is `false`.
            +     *
            +     * When this field is set to `true`, returned answer will have
            +     * `grounding_score` and will contain GroundingSupports for each claim.
            +     * 
            + * + * bool include_grounding_supports = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The includeGroundingSupports. + */ + boolean getIncludeGroundingSupports(); - /** - * - * - *
            -       * Answer Generation Model specification.
            -       * 
            - * - * Protobuf type {@code - * google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec.ModelSpec} - */ - public static final class Builder - extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec.ModelSpec) - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec - .ModelSpecOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.discoveryengine.v1beta.ConversationalSearchServiceProto - .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_AnswerGenerationSpec_ModelSpec_descriptor; - } + /** + * + * + *
            +     * Optional. Specifies whether to enable the filtering based on grounding
            +     * score and at what level.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.GroundingSpec.FilteringLevel filtering_level = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for filteringLevel. + */ + int getFilteringLevelValue(); - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.discoveryengine.v1beta.ConversationalSearchServiceProto - .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_AnswerGenerationSpec_ModelSpec_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec - .ModelSpec.class, - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec - .ModelSpec.Builder.class); - } + /** + * + * + *
            +     * Optional. Specifies whether to enable the filtering based on grounding
            +     * score and at what level.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.GroundingSpec.FilteringLevel filtering_level = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The filteringLevel. + */ + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.GroundingSpec.FilteringLevel + getFilteringLevel(); + } - // Construct using - // com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec.ModelSpec.newBuilder() - private Builder() {} + /** + * + * + *
            +   * Grounding specification.
            +   * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.AnswerQueryRequest.GroundingSpec} + */ + public static final class GroundingSpec extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.GroundingSpec) + GroundingSpecOrBuilder { + private static final long serialVersionUID = 0L; - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - } + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "GroundingSpec"); + } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - modelVersion_ = ""; - return this; - } + // Use GroundingSpec.newBuilder() to construct. + private GroundingSpec(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.discoveryengine.v1beta.ConversationalSearchServiceProto - .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_AnswerGenerationSpec_ModelSpec_descriptor; - } + private GroundingSpec() { + filteringLevel_ = 0; + } - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec - .ModelSpec - getDefaultInstanceForType() { - return com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec - .ModelSpec.getDefaultInstance(); - } + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.ConversationalSearchServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_GroundingSpec_descriptor; + } - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec - .ModelSpec - build() { - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec.ModelSpec - result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.ConversationalSearchServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_GroundingSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.GroundingSpec.class, + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.GroundingSpec.Builder + .class); + } - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec - .ModelSpec - buildPartial() { - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec.ModelSpec - result = - new com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest - .AnswerGenerationSpec.ModelSpec(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } + /** + * + * + *
            +     * Level to filter based on answer grounding.
            +     * 
            + * + * Protobuf enum {@code + * google.cloud.discoveryengine.v1beta.AnswerQueryRequest.GroundingSpec.FilteringLevel} + */ + public enum FilteringLevel implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
            +       * Default is no filter
            +       * 
            + * + * FILTERING_LEVEL_UNSPECIFIED = 0; + */ + FILTERING_LEVEL_UNSPECIFIED(0), + /** + * + * + *
            +       * Filter answers based on a low threshold.
            +       * 
            + * + * FILTERING_LEVEL_LOW = 1; + */ + FILTERING_LEVEL_LOW(1), + /** + * + * + *
            +       * Filter answers based on a high threshold.
            +       * 
            + * + * FILTERING_LEVEL_HIGH = 2; + */ + FILTERING_LEVEL_HIGH(2), + UNRECOGNIZED(-1), + ; - private void buildPartial0( - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec - .ModelSpec - result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.modelVersion_ = modelVersion_; - } - } + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "FilteringLevel"); + } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other - instanceof - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec - .ModelSpec) { - return mergeFrom( - (com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec - .ModelSpec) - other); - } else { - super.mergeFrom(other); - return this; - } - } + /** + * + * + *
            +       * Default is no filter
            +       * 
            + * + * FILTERING_LEVEL_UNSPECIFIED = 0; + */ + public static final int FILTERING_LEVEL_UNSPECIFIED_VALUE = 0; - public Builder mergeFrom( - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec - .ModelSpec - other) { - if (other - == com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec - .ModelSpec.getDefaultInstance()) return this; - if (!other.getModelVersion().isEmpty()) { - modelVersion_ = other.modelVersion_; - bitField0_ |= 0x00000001; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; + /** + * + * + *
            +       * Filter answers based on a low threshold.
            +       * 
            + * + * FILTERING_LEVEL_LOW = 1; + */ + public static final int FILTERING_LEVEL_LOW_VALUE = 1; + + /** + * + * + *
            +       * Filter answers based on a high threshold.
            +       * 
            + * + * FILTERING_LEVEL_HIGH = 2; + */ + public static final int FILTERING_LEVEL_HIGH_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; + } - @java.lang.Override - public final boolean isInitialized() { - return true; + /** + * @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 FilteringLevel 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 FilteringLevel forNumber(int value) { + switch (value) { + case 0: + return FILTERING_LEVEL_UNSPECIFIED; + case 1: + return FILTERING_LEVEL_LOW; + case 2: + return FILTERING_LEVEL_HIGH; + default: + return null; } + } - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - modelVersion_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap + internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public FilteringLevel findValueByNumber(int number) { + return FilteringLevel.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); } + return getDescriptor().getValues().get(ordinal()); + } - private int bitField0_; + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } - private java.lang.Object modelVersion_ = ""; + public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.GroundingSpec + .getDescriptor() + .getEnumTypes() + .get(0); + } - /** - * - * - *
            -         * Model version. If not set, it will use the default stable model.
            -         * Allowed values are: stable, preview.
            -         * 
            - * - * string model_version = 1; - * - * @return The modelVersion. - */ - public java.lang.String getModelVersion() { - java.lang.Object ref = modelVersion_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - modelVersion_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - - /** - * - * - *
            -         * Model version. If not set, it will use the default stable model.
            -         * Allowed values are: stable, preview.
            -         * 
            - * - * string model_version = 1; - * - * @return The bytes for modelVersion. - */ - public com.google.protobuf.ByteString getModelVersionBytes() { - java.lang.Object ref = modelVersion_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - modelVersion_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - /** - * - * - *
            -         * Model version. If not set, it will use the default stable model.
            -         * Allowed values are: stable, preview.
            -         * 
            - * - * string model_version = 1; - * - * @param value The modelVersion to set. - * @return This builder for chaining. - */ - public Builder setModelVersion(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - modelVersion_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } + private static final FilteringLevel[] VALUES = values(); - /** - * - * - *
            -         * Model version. If not set, it will use the default stable model.
            -         * Allowed values are: stable, preview.
            -         * 
            - * - * string model_version = 1; - * - * @return This builder for chaining. - */ - public Builder clearModelVersion() { - modelVersion_ = getDefaultInstance().getModelVersion(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; + public static FilteringLevel valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); } - - /** - * - * - *
            -         * Model version. If not set, it will use the default stable model.
            -         * Allowed values are: stable, preview.
            -         * 
            - * - * string model_version = 1; - * - * @param value The bytes for modelVersion to set. - * @return This builder for chaining. - */ - public Builder setModelVersionBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - modelVersion_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; + if (desc.getIndex() == -1) { + return UNRECOGNIZED; } - - // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec.ModelSpec) + return VALUES[desc.getIndex()]; } - // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec.ModelSpec) - private static final com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest - .AnswerGenerationSpec.ModelSpec - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = - new com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec - .ModelSpec(); - } + private final int value; - public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec - .ModelSpec - getDefaultInstance() { - return DEFAULT_INSTANCE; + private FilteringLevel(int value) { + this.value = value; } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ModelSpec parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException() - .setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } + // @@protoc_insertion_point(enum_scope:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.GroundingSpec.FilteringLevel) + } - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + public static final int INCLUDE_GROUNDING_SUPPORTS_FIELD_NUMBER = 2; + private boolean includeGroundingSupports_ = false; - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec - .ModelSpec - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + /** + * + * + *
            +     * Optional. Specifies whether to include grounding_supports in the answer.
            +     * The default value is `false`.
            +     *
            +     * When this field is set to `true`, returned answer will have
            +     * `grounding_score` and will contain GroundingSupports for each claim.
            +     * 
            + * + * bool include_grounding_supports = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The includeGroundingSupports. + */ + @java.lang.Override + public boolean getIncludeGroundingSupports() { + return includeGroundingSupports_; } - public interface PromptSpecOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec.PromptSpec) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
            -       * Customized preamble.
            -       * 
            - * - * string preamble = 1; - * - * @return The preamble. - */ - java.lang.String getPreamble(); + public static final int FILTERING_LEVEL_FIELD_NUMBER = 3; + private int filteringLevel_ = 0; - /** - * - * - *
            -       * Customized preamble.
            -       * 
            - * - * string preamble = 1; - * - * @return The bytes for preamble. - */ - com.google.protobuf.ByteString getPreambleBytes(); + /** + * + * + *
            +     * Optional. Specifies whether to enable the filtering based on grounding
            +     * score and at what level.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.GroundingSpec.FilteringLevel filtering_level = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for filteringLevel. + */ + @java.lang.Override + public int getFilteringLevelValue() { + return filteringLevel_; } /** * * *
            -     * Answer generation prompt specification.
            +     * Optional. Specifies whether to enable the filtering based on grounding
            +     * score and at what level.
                  * 
            * - * Protobuf type {@code - * google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec.PromptSpec} + * + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.GroundingSpec.FilteringLevel filtering_level = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The filteringLevel. */ - public static final class PromptSpec extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec.PromptSpec) - PromptSpecOrBuilder { - private static final long serialVersionUID = 0L; + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.GroundingSpec.FilteringLevel + getFilteringLevel() { + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.GroundingSpec.FilteringLevel + result = + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.GroundingSpec + .FilteringLevel.forNumber(filteringLevel_); + return result == null + ? com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.GroundingSpec.FilteringLevel + .UNRECOGNIZED + : result; + } - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "PromptSpec"); - } + private byte memoizedIsInitialized = -1; - // Use PromptSpec.newBuilder() to construct. - private PromptSpec(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; - private PromptSpec() { - preamble_ = ""; - } + memoizedIsInitialized = 1; + return true; + } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.discoveryengine.v1beta.ConversationalSearchServiceProto - .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_AnswerGenerationSpec_PromptSpec_descriptor; + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (includeGroundingSupports_ != false) { + output.writeBool(2, includeGroundingSupports_); } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.discoveryengine.v1beta.ConversationalSearchServiceProto - .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_AnswerGenerationSpec_PromptSpec_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec - .PromptSpec.class, - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec - .PromptSpec.Builder.class); + if (filteringLevel_ + != com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.GroundingSpec.FilteringLevel + .FILTERING_LEVEL_UNSPECIFIED + .getNumber()) { + output.writeEnum(3, filteringLevel_); } + getUnknownFields().writeTo(output); + } - public static final int PREAMBLE_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object preamble_ = ""; + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; - /** - * - * - *
            -       * Customized preamble.
            -       * 
            - * - * string preamble = 1; - * - * @return The preamble. - */ - @java.lang.Override - public java.lang.String getPreamble() { - java.lang.Object ref = preamble_; - 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(); - preamble_ = s; - return s; - } + size = 0; + if (includeGroundingSupports_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, includeGroundingSupports_); } - - /** - * - * - *
            -       * Customized preamble.
            -       * 
            - * - * string preamble = 1; - * - * @return The bytes for preamble. - */ - @java.lang.Override - public com.google.protobuf.ByteString getPreambleBytes() { - java.lang.Object ref = preamble_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - preamble_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } + if (filteringLevel_ + != com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.GroundingSpec.FilteringLevel + .FILTERING_LEVEL_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(3, filteringLevel_); } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } - 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; + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { return true; } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(preamble_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, preamble_); - } - getUnknownFields().writeTo(output); + if (!(obj + instanceof com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.GroundingSpec)) { + return super.equals(obj); } + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.GroundingSpec other = + (com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.GroundingSpec) obj; - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; + if (getIncludeGroundingSupports() != other.getIncludeGroundingSupports()) return false; + if (filteringLevel_ != other.filteringLevel_) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } - size = 0; - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(preamble_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, preamble_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + INCLUDE_GROUNDING_SUPPORTS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getIncludeGroundingSupports()); + hash = (37 * hash) + FILTERING_LEVEL_FIELD_NUMBER; + hash = (53 * hash) + filteringLevel_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj - instanceof - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec - .PromptSpec)) { - return super.equals(obj); - } - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec.PromptSpec - other = - (com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec - .PromptSpec) - obj; + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.GroundingSpec + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - if (!getPreamble().equals(other.getPreamble())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.GroundingSpec + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + PREAMBLE_FIELD_NUMBER; - hash = (53 * hash) + getPreamble().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.GroundingSpec + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec - .PromptSpec - parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.GroundingSpec + 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.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec - .PromptSpec - 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.discoveryengine.v1beta.AnswerQueryRequest.GroundingSpec + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec - .PromptSpec - parseFrom(com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.GroundingSpec + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec - .PromptSpec - 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.discoveryengine.v1beta.AnswerQueryRequest.GroundingSpec + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } - public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec - .PromptSpec - parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.GroundingSpec + 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.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec - .PromptSpec - parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.GroundingSpec + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } - public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec - .PromptSpec - parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.GroundingSpec + 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.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec - .PromptSpec - 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.discoveryengine.v1beta.AnswerQueryRequest.GroundingSpec + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } - public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec - .PromptSpec - parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.GroundingSpec + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } - public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec - .PromptSpec - parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } - public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec - .PromptSpec - parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } - public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec - .PromptSpec - parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); + public static Builder newBuilder( + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.GroundingSpec 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; + } + + /** + * + * + *
            +     * Grounding specification.
            +     * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.AnswerQueryRequest.GroundingSpec} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.GroundingSpec) + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.GroundingSpecOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.ConversationalSearchServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_GroundingSpec_descriptor; } @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.ConversationalSearchServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_GroundingSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.GroundingSpec.class, + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.GroundingSpec.Builder + .class); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); + // Construct using + // com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.GroundingSpec.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); } - public static Builder newBuilder( - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec.PromptSpec - prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + includeGroundingSupports_ = false; + filteringLevel_ = 0; + return this; } @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1beta.ConversationalSearchServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_GroundingSpec_descriptor; } @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.GroundingSpec + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.GroundingSpec + .getDefaultInstance(); } - /** - * - * - *
            -       * Answer generation prompt specification.
            -       * 
            - * - * Protobuf type {@code - * google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec.PromptSpec} - */ - public static final class Builder - extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec.PromptSpec) - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec - .PromptSpecOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.discoveryengine.v1beta.ConversationalSearchServiceProto - .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_AnswerGenerationSpec_PromptSpec_descriptor; + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.GroundingSpec build() { + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.GroundingSpec result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); } + return result; + } - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.discoveryengine.v1beta.ConversationalSearchServiceProto - .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_AnswerGenerationSpec_PromptSpec_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec - .PromptSpec.class, - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec - .PromptSpec.Builder.class); + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.GroundingSpec + buildPartial() { + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.GroundingSpec result = + new com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.GroundingSpec(this); + if (bitField0_ != 0) { + buildPartial0(result); } + onBuilt(); + return result; + } - // Construct using - // com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec.PromptSpec.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); + private void buildPartial0( + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.GroundingSpec result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.includeGroundingSupports_ = includeGroundingSupports_; } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - preamble_ = ""; - return this; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.filteringLevel_ = filteringLevel_; } + } - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.discoveryengine.v1beta.ConversationalSearchServiceProto - .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_AnswerGenerationSpec_PromptSpec_descriptor; - } - - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec - .PromptSpec - getDefaultInstanceForType() { - return com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec - .PromptSpec.getDefaultInstance(); + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.GroundingSpec) { + return mergeFrom( + (com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.GroundingSpec) other); + } else { + super.mergeFrom(other); + return this; } + } - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec - .PromptSpec - build() { - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec.PromptSpec - result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.GroundingSpec other) { + if (other + == com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.GroundingSpec + .getDefaultInstance()) return this; + if (other.getIncludeGroundingSupports() != false) { + setIncludeGroundingSupports(other.getIncludeGroundingSupports()); } - - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec - .PromptSpec - buildPartial() { - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec.PromptSpec - result = - new com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest - .AnswerGenerationSpec.PromptSpec(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; + if (other.filteringLevel_ != 0) { + setFilteringLevelValue(other.getFilteringLevelValue()); } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } - private void buildPartial0( - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec - .PromptSpec - result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.preamble_ = preamble_; - } - } + @java.lang.Override + public final boolean isInitialized() { + return true; + } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other - instanceof - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec - .PromptSpec) { - return mergeFrom( - (com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec - .PromptSpec) - other); - } else { - super.mergeFrom(other); - return this; - } + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); } - - public Builder mergeFrom( - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec - .PromptSpec - other) { - if (other - == com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec - .PromptSpec.getDefaultInstance()) return this; - if (!other.getPreamble().isEmpty()) { - preamble_ = other.preamble_; - bitField0_ |= 0x00000001; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 16: + { + includeGroundingSupports_ = input.readBool(); + bitField0_ |= 0x00000001; + break; + } // case 16 + case 24: + { + filteringLevel_ = input.readEnum(); + bitField0_ |= 0x00000002; + break; + } // case 24 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { onChanged(); - return this; - } + } // finally + return this; + } - @java.lang.Override - public final boolean isInitialized() { - return true; - } + private int bitField0_; - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - preamble_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } + private boolean includeGroundingSupports_; - private int bitField0_; + /** + * + * + *
            +       * Optional. Specifies whether to include grounding_supports in the answer.
            +       * The default value is `false`.
            +       *
            +       * When this field is set to `true`, returned answer will have
            +       * `grounding_score` and will contain GroundingSupports for each claim.
            +       * 
            + * + * bool include_grounding_supports = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The includeGroundingSupports. + */ + @java.lang.Override + public boolean getIncludeGroundingSupports() { + return includeGroundingSupports_; + } - private java.lang.Object preamble_ = ""; + /** + * + * + *
            +       * Optional. Specifies whether to include grounding_supports in the answer.
            +       * The default value is `false`.
            +       *
            +       * When this field is set to `true`, returned answer will have
            +       * `grounding_score` and will contain GroundingSupports for each claim.
            +       * 
            + * + * bool include_grounding_supports = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The includeGroundingSupports to set. + * @return This builder for chaining. + */ + public Builder setIncludeGroundingSupports(boolean value) { - /** - * - * - *
            -         * Customized preamble.
            -         * 
            - * - * string preamble = 1; - * - * @return The preamble. - */ - public java.lang.String getPreamble() { - java.lang.Object ref = preamble_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - preamble_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } + includeGroundingSupports_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } - /** - * - * - *
            -         * Customized preamble.
            -         * 
            - * - * string preamble = 1; - * - * @return The bytes for preamble. - */ - public com.google.protobuf.ByteString getPreambleBytes() { - java.lang.Object ref = preamble_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - preamble_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - /** - * - * - *
            -         * Customized preamble.
            -         * 
            - * - * string preamble = 1; - * - * @param value The preamble to set. - * @return This builder for chaining. - */ - public Builder setPreamble(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - preamble_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - /** - * - * - *
            -         * Customized preamble.
            -         * 
            - * - * string preamble = 1; - * - * @return This builder for chaining. - */ - public Builder clearPreamble() { - preamble_ = getDefaultInstance().getPreamble(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - - /** - * - * - *
            -         * Customized preamble.
            -         * 
            - * - * string preamble = 1; - * - * @param value The bytes for preamble to set. - * @return This builder for chaining. - */ - public Builder setPreambleBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - preamble_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec.PromptSpec) + /** + * + * + *
            +       * Optional. Specifies whether to include grounding_supports in the answer.
            +       * The default value is `false`.
            +       *
            +       * When this field is set to `true`, returned answer will have
            +       * `grounding_score` and will contain GroundingSupports for each claim.
            +       * 
            + * + * bool include_grounding_supports = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearIncludeGroundingSupports() { + bitField0_ = (bitField0_ & ~0x00000001); + includeGroundingSupports_ = false; + onChanged(); + return this; } - // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec.PromptSpec) - private static final com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest - .AnswerGenerationSpec.PromptSpec - DEFAULT_INSTANCE; + private int filteringLevel_ = 0; - static { - DEFAULT_INSTANCE = - new com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec - .PromptSpec(); + /** + * + * + *
            +       * Optional. Specifies whether to enable the filtering based on grounding
            +       * score and at what level.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.GroundingSpec.FilteringLevel filtering_level = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for filteringLevel. + */ + @java.lang.Override + public int getFilteringLevelValue() { + return filteringLevel_; } - public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec - .PromptSpec - getDefaultInstance() { - return DEFAULT_INSTANCE; + /** + * + * + *
            +       * Optional. Specifies whether to enable the filtering based on grounding
            +       * score and at what level.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.GroundingSpec.FilteringLevel filtering_level = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The enum numeric value on the wire for filteringLevel to set. + * @return This builder for chaining. + */ + public Builder setFilteringLevelValue(int value) { + filteringLevel_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public PromptSpec parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException() - .setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; + /** + * + * + *
            +       * Optional. Specifies whether to enable the filtering based on grounding
            +       * score and at what level.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.GroundingSpec.FilteringLevel filtering_level = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The filteringLevel. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.GroundingSpec.FilteringLevel + getFilteringLevel() { + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.GroundingSpec.FilteringLevel + result = + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.GroundingSpec + .FilteringLevel.forNumber(filteringLevel_); + return result == null + ? com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.GroundingSpec + .FilteringLevel.UNRECOGNIZED + : result; } - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; + /** + * + * + *
            +       * Optional. Specifies whether to enable the filtering based on grounding
            +       * score and at what level.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.GroundingSpec.FilteringLevel filtering_level = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The filteringLevel to set. + * @return This builder for chaining. + */ + public Builder setFilteringLevel( + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.GroundingSpec.FilteringLevel + value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + filteringLevel_ = value.getNumber(); + onChanged(); + return this; } - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec - .PromptSpec - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; + /** + * + * + *
            +       * Optional. Specifies whether to enable the filtering based on grounding
            +       * score and at what level.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.GroundingSpec.FilteringLevel filtering_level = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearFilteringLevel() { + bitField0_ = (bitField0_ & ~0x00000002); + filteringLevel_ = 0; + onChanged(); + return this; } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.GroundingSpec) } - private int bitField0_; - public static final int MODEL_SPEC_FIELD_NUMBER = 1; - private com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec - .ModelSpec - modelSpec_; + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.GroundingSpec) + private static final com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.GroundingSpec + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.GroundingSpec(); + } + + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.GroundingSpec + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GroundingSpec parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.GroundingSpec + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface AnswerGenerationSpecOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec) + com.google.protobuf.MessageOrBuilder { /** * @@ -3764,10 +3983,7 @@ public com.google.protobuf.Parser getParserForType() { * * @return Whether the modelSpec field is set. */ - @java.lang.Override - public boolean hasModelSpec() { - return ((bitField0_ & 0x00000001) != 0); - } + boolean hasModelSpec(); /** * @@ -3782,14 +3998,8 @@ public boolean hasModelSpec() { * * @return The modelSpec. */ - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec.ModelSpec - getModelSpec() { - return modelSpec_ == null - ? com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec - .ModelSpec.getDefaultInstance() - : modelSpec_; - } + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec.ModelSpec + getModelSpec(); /** * @@ -3802,20 +4012,9 @@ public boolean hasModelSpec() { * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec.ModelSpec model_spec = 1; * */ - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec .ModelSpecOrBuilder - getModelSpecOrBuilder() { - return modelSpec_ == null - ? com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec - .ModelSpec.getDefaultInstance() - : modelSpec_; - } - - public static final int PROMPT_SPEC_FIELD_NUMBER = 2; - private com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec - .PromptSpec - promptSpec_; + getModelSpecOrBuilder(); /** * @@ -3830,10 +4029,7 @@ public boolean hasModelSpec() { * * @return Whether the promptSpec field is set. */ - @java.lang.Override - public boolean hasPromptSpec() { - return ((bitField0_ & 0x00000002) != 0); - } + boolean hasPromptSpec(); /** * @@ -3848,15 +4044,8 @@ public boolean hasPromptSpec() { * * @return The promptSpec. */ - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec - .PromptSpec - getPromptSpec() { - return promptSpec_ == null - ? com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec - .PromptSpec.getDefaultInstance() - : promptSpec_; - } + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec.PromptSpec + getPromptSpec(); /** * @@ -3869,18 +4058,9 @@ public boolean hasPromptSpec() { * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec.PromptSpec prompt_spec = 2; * */ - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec .PromptSpecOrBuilder - getPromptSpecOrBuilder() { - return promptSpec_ == null - ? com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec - .PromptSpec.getDefaultInstance() - : promptSpec_; - } - - public static final int INCLUDE_CITATIONS_FIELD_NUMBER = 3; - private boolean includeCitations_ = false; + getPromptSpecOrBuilder(); /** * @@ -3894,15 +4074,7 @@ public boolean hasPromptSpec() { * * @return The includeCitations. */ - @java.lang.Override - public boolean getIncludeCitations() { - return includeCitations_; - } - - public static final int ANSWER_LANGUAGE_CODE_FIELD_NUMBER = 4; - - @SuppressWarnings("serial") - private volatile java.lang.Object answerLanguageCode_ = ""; + boolean getIncludeCitations(); /** * @@ -3917,18 +4089,7 @@ public boolean getIncludeCitations() { * * @return The answerLanguageCode. */ - @java.lang.Override - public java.lang.String getAnswerLanguageCode() { - java.lang.Object ref = answerLanguageCode_; - 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(); - answerLanguageCode_ = s; - return s; - } - } + java.lang.String getAnswerLanguageCode(); /** * @@ -3943,21 +4104,7 @@ public java.lang.String getAnswerLanguageCode() { * * @return The bytes for answerLanguageCode. */ - @java.lang.Override - public com.google.protobuf.ByteString getAnswerLanguageCodeBytes() { - java.lang.Object ref = answerLanguageCode_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - answerLanguageCode_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int IGNORE_ADVERSARIAL_QUERY_FIELD_NUMBER = 5; - private boolean ignoreAdversarialQuery_ = false; + com.google.protobuf.ByteString getAnswerLanguageCodeBytes(); /** * @@ -3979,13 +4126,7 @@ public com.google.protobuf.ByteString getAnswerLanguageCodeBytes() { * * @return The ignoreAdversarialQuery. */ - @java.lang.Override - public boolean getIgnoreAdversarialQuery() { - return ignoreAdversarialQuery_; - } - - public static final int IGNORE_NON_ANSWER_SEEKING_QUERY_FIELD_NUMBER = 6; - private boolean ignoreNonAnswerSeekingQuery_ = false; + boolean getIgnoreAdversarialQuery(); /** * @@ -4005,13 +4146,7 @@ public boolean getIgnoreAdversarialQuery() { * * @return The ignoreNonAnswerSeekingQuery. */ - @java.lang.Override - public boolean getIgnoreNonAnswerSeekingQuery() { - return ignoreNonAnswerSeekingQuery_; - } - - public static final int IGNORE_LOW_RELEVANT_CONTENT_FIELD_NUMBER = 7; - private boolean ignoreLowRelevantContent_ = false; + boolean getIgnoreNonAnswerSeekingQuery(); /** * @@ -4028,10 +4163,7 @@ public boolean getIgnoreNonAnswerSeekingQuery() { * * @return Whether the ignoreLowRelevantContent field is set. */ - @java.lang.Override - public boolean hasIgnoreLowRelevantContent() { - return ((bitField0_ & 0x00000004) != 0); - } + boolean hasIgnoreLowRelevantContent(); /** * @@ -4048,13 +4180,7 @@ public boolean hasIgnoreLowRelevantContent() { * * @return The ignoreLowRelevantContent. */ - @java.lang.Override - public boolean getIgnoreLowRelevantContent() { - return ignoreLowRelevantContent_; - } - - public static final int IGNORE_JAIL_BREAKING_QUERY_FIELD_NUMBER = 8; - private boolean ignoreJailBreakingQuery_ = false; + boolean getIgnoreLowRelevantContent(); /** * @@ -4077,6408 +4203,14516 @@ public boolean getIgnoreLowRelevantContent() { * * @return The ignoreJailBreakingQuery. */ - @java.lang.Override - public boolean getIgnoreJailBreakingQuery() { - return ignoreJailBreakingQuery_; - } + boolean getIgnoreJailBreakingQuery(); - private byte memoizedIsInitialized = -1; + /** + * + * + *
            +     * Optional. Multimodal specification.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec.MultimodalSpec multimodal_spec = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the multimodalSpec field is set. + */ + boolean hasMultimodalSpec(); - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + /** + * + * + *
            +     * Optional. Multimodal specification.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec.MultimodalSpec multimodal_spec = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The multimodalSpec. + */ + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec.MultimodalSpec + getMultimodalSpec(); - memoizedIsInitialized = 1; - return true; + /** + * + * + *
            +     * Optional. Multimodal specification.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec.MultimodalSpec multimodal_spec = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec + .MultimodalSpecOrBuilder + getMultimodalSpecOrBuilder(); + } + + /** + * + * + *
            +   * Answer generation specification.
            +   * 
            + * + * Protobuf type {@code + * google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec} + */ + public static final class AnswerGenerationSpec extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec) + AnswerGenerationSpecOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "AnswerGenerationSpec"); } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(1, getModelSpec()); - } - if (((bitField0_ & 0x00000002) != 0)) { - output.writeMessage(2, getPromptSpec()); - } - if (includeCitations_ != false) { - output.writeBool(3, includeCitations_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(answerLanguageCode_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 4, answerLanguageCode_); - } - if (ignoreAdversarialQuery_ != false) { - output.writeBool(5, ignoreAdversarialQuery_); - } - if (ignoreNonAnswerSeekingQuery_ != false) { - output.writeBool(6, ignoreNonAnswerSeekingQuery_); - } - if (((bitField0_ & 0x00000004) != 0)) { - output.writeBool(7, ignoreLowRelevantContent_); - } - if (ignoreJailBreakingQuery_ != false) { - output.writeBool(8, ignoreJailBreakingQuery_); - } - getUnknownFields().writeTo(output); + // Use AnswerGenerationSpec.newBuilder() to construct. + private AnswerGenerationSpec(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); } - @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, getModelSpec()); - } - if (((bitField0_ & 0x00000002) != 0)) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getPromptSpec()); - } - if (includeCitations_ != false) { - size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, includeCitations_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(answerLanguageCode_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(4, answerLanguageCode_); - } - if (ignoreAdversarialQuery_ != false) { - size += com.google.protobuf.CodedOutputStream.computeBoolSize(5, ignoreAdversarialQuery_); - } - if (ignoreNonAnswerSeekingQuery_ != false) { - size += - com.google.protobuf.CodedOutputStream.computeBoolSize(6, ignoreNonAnswerSeekingQuery_); - } - if (((bitField0_ & 0x00000004) != 0)) { - size += com.google.protobuf.CodedOutputStream.computeBoolSize(7, ignoreLowRelevantContent_); - } - if (ignoreJailBreakingQuery_ != false) { - size += com.google.protobuf.CodedOutputStream.computeBoolSize(8, ignoreJailBreakingQuery_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; + private AnswerGenerationSpec() { + answerLanguageCode_ = ""; } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj - instanceof - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec)) { - return super.equals(obj); - } - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec other = - (com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec) obj; - - if (hasModelSpec() != other.hasModelSpec()) return false; - if (hasModelSpec()) { - if (!getModelSpec().equals(other.getModelSpec())) return false; - } - if (hasPromptSpec() != other.hasPromptSpec()) return false; - if (hasPromptSpec()) { - if (!getPromptSpec().equals(other.getPromptSpec())) return false; - } - if (getIncludeCitations() != other.getIncludeCitations()) return false; - if (!getAnswerLanguageCode().equals(other.getAnswerLanguageCode())) return false; - if (getIgnoreAdversarialQuery() != other.getIgnoreAdversarialQuery()) return false; - if (getIgnoreNonAnswerSeekingQuery() != other.getIgnoreNonAnswerSeekingQuery()) return false; - if (hasIgnoreLowRelevantContent() != other.hasIgnoreLowRelevantContent()) return false; - if (hasIgnoreLowRelevantContent()) { - if (getIgnoreLowRelevantContent() != other.getIgnoreLowRelevantContent()) return false; - } - if (getIgnoreJailBreakingQuery() != other.getIgnoreJailBreakingQuery()) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.ConversationalSearchServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_AnswerGenerationSpec_descriptor; } @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasModelSpec()) { - hash = (37 * hash) + MODEL_SPEC_FIELD_NUMBER; - hash = (53 * hash) + getModelSpec().hashCode(); - } - if (hasPromptSpec()) { - hash = (37 * hash) + PROMPT_SPEC_FIELD_NUMBER; - hash = (53 * hash) + getPromptSpec().hashCode(); - } - hash = (37 * hash) + INCLUDE_CITATIONS_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getIncludeCitations()); - hash = (37 * hash) + ANSWER_LANGUAGE_CODE_FIELD_NUMBER; - hash = (53 * hash) + getAnswerLanguageCode().hashCode(); - hash = (37 * hash) + IGNORE_ADVERSARIAL_QUERY_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getIgnoreAdversarialQuery()); - hash = (37 * hash) + IGNORE_NON_ANSWER_SEEKING_QUERY_FIELD_NUMBER; - hash = - (53 * hash) + com.google.protobuf.Internal.hashBoolean(getIgnoreNonAnswerSeekingQuery()); - if (hasIgnoreLowRelevantContent()) { - hash = (37 * hash) + IGNORE_LOW_RELEVANT_CONTENT_FIELD_NUMBER; - hash = - (53 * hash) + com.google.protobuf.Internal.hashBoolean(getIgnoreLowRelevantContent()); - } - hash = (37 * hash) + IGNORE_JAIL_BREAKING_QUERY_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getIgnoreJailBreakingQuery()); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec - parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.ConversationalSearchServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_AnswerGenerationSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec.class, + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec + .Builder.class); } - public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec - parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } + public interface ModelSpecOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec.ModelSpec) + com.google.protobuf.MessageOrBuilder { - public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec - parseFrom(com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } + /** + * + * + *
            +       * Model version. If not set, it will use the default stable model.
            +       * Allowed values are: stable, preview.
            +       * 
            + * + * string model_version = 1; + * + * @return The modelVersion. + */ + java.lang.String getModelVersion(); - public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec - parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); + /** + * + * + *
            +       * Model version. If not set, it will use the default stable model.
            +       * Allowed values are: stable, preview.
            +       * 
            + * + * string model_version = 1; + * + * @return The bytes for modelVersion. + */ + com.google.protobuf.ByteString getModelVersionBytes(); } - public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec - parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } + /** + * + * + *
            +     * Answer Generation Model specification.
            +     * 
            + * + * Protobuf type {@code + * google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec.ModelSpec} + */ + public static final class ModelSpec extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec.ModelSpec) + ModelSpecOrBuilder { + private static final long serialVersionUID = 0L; - public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec - parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ModelSpec"); + } - public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec - parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } + // Use ModelSpec.newBuilder() to construct. + private ModelSpec(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } - public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec - parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } + private ModelSpec() { + modelVersion_ = ""; + } - public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec - parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec - 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.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec - parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec - 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.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec 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; - } - - /** - * - * - *
            -     * Answer generation specification.
            -     * 
            - * - * Protobuf type {@code - * google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec) - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpecOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.discoveryengine.v1beta.ConversationalSearchServiceProto - .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_AnswerGenerationSpec_descriptor; - } + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.ConversationalSearchServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_AnswerGenerationSpec_ModelSpec_descriptor; + } @java.lang.Override protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.discoveryengine.v1beta.ConversationalSearchServiceProto - .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_AnswerGenerationSpec_fieldAccessorTable + .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_AnswerGenerationSpec_ModelSpec_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec - .class, + .ModelSpec.class, com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec - .Builder.class); + .ModelSpec.Builder.class); } - // Construct using - // com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + public static final int MODEL_VERSION_FIELD_NUMBER = 1; - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } + @SuppressWarnings("serial") + private volatile java.lang.Object modelVersion_ = ""; - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - internalGetModelSpecFieldBuilder(); - internalGetPromptSpecFieldBuilder(); + /** + * + * + *
            +       * Model version. If not set, it will use the default stable model.
            +       * Allowed values are: stable, preview.
            +       * 
            + * + * string model_version = 1; + * + * @return The modelVersion. + */ + @java.lang.Override + public java.lang.String getModelVersion() { + java.lang.Object ref = modelVersion_; + 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(); + modelVersion_ = s; + return s; } } + /** + * + * + *
            +       * Model version. If not set, it will use the default stable model.
            +       * Allowed values are: stable, preview.
            +       * 
            + * + * string model_version = 1; + * + * @return The bytes for modelVersion. + */ @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - modelSpec_ = null; - if (modelSpecBuilder_ != null) { - modelSpecBuilder_.dispose(); - modelSpecBuilder_ = null; - } - promptSpec_ = null; - if (promptSpecBuilder_ != null) { - promptSpecBuilder_.dispose(); - promptSpecBuilder_ = null; + public com.google.protobuf.ByteString getModelVersionBytes() { + java.lang.Object ref = modelVersion_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + modelVersion_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; } - includeCitations_ = false; - answerLanguageCode_ = ""; - ignoreAdversarialQuery_ = false; - ignoreNonAnswerSeekingQuery_ = false; - ignoreLowRelevantContent_ = false; - ignoreJailBreakingQuery_ = false; - return this; } - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.discoveryengine.v1beta.ConversationalSearchServiceProto - .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_AnswerGenerationSpec_descriptor; - } + private byte memoizedIsInitialized = -1; @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec - getDefaultInstanceForType() { - return com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec - .getDefaultInstance(); + 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 com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec - build() { - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec result = - buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(modelVersion_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, modelVersion_); } - return result; + getUnknownFields().writeTo(output); } @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec - buildPartial() { - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec result = - new com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec( - this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; - private void buildPartial0( - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.modelSpec_ = modelSpecBuilder_ == null ? modelSpec_ : modelSpecBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.promptSpec_ = - promptSpecBuilder_ == null ? promptSpec_ : promptSpecBuilder_.build(); - to_bitField0_ |= 0x00000002; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.includeCitations_ = includeCitations_; - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.answerLanguageCode_ = answerLanguageCode_; - } - if (((from_bitField0_ & 0x00000010) != 0)) { - result.ignoreAdversarialQuery_ = ignoreAdversarialQuery_; - } - if (((from_bitField0_ & 0x00000020) != 0)) { - result.ignoreNonAnswerSeekingQuery_ = ignoreNonAnswerSeekingQuery_; - } - if (((from_bitField0_ & 0x00000040) != 0)) { - result.ignoreLowRelevantContent_ = ignoreLowRelevantContent_; - to_bitField0_ |= 0x00000004; - } - if (((from_bitField0_ & 0x00000080) != 0)) { - result.ignoreJailBreakingQuery_ = ignoreJailBreakingQuery_; + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(modelVersion_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, modelVersion_); } - result.bitField0_ |= to_bitField0_; + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; } @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec) { - return mergeFrom( - (com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec) - other); - } else { - super.mergeFrom(other); - return this; + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec + .ModelSpec)) { + return super.equals(obj); } + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec.ModelSpec + other = + (com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec + .ModelSpec) + obj; + + if (!getModelVersion().equals(other.getModelVersion())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; } - public Builder mergeFrom( - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec other) { - if (other - == com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec - .getDefaultInstance()) return this; - if (other.hasModelSpec()) { - mergeModelSpec(other.getModelSpec()); - } - if (other.hasPromptSpec()) { - mergePromptSpec(other.getPromptSpec()); - } - if (other.getIncludeCitations() != false) { - setIncludeCitations(other.getIncludeCitations()); - } - if (!other.getAnswerLanguageCode().isEmpty()) { - answerLanguageCode_ = other.answerLanguageCode_; - bitField0_ |= 0x00000008; - onChanged(); - } - if (other.getIgnoreAdversarialQuery() != false) { - setIgnoreAdversarialQuery(other.getIgnoreAdversarialQuery()); - } - if (other.getIgnoreNonAnswerSeekingQuery() != false) { - setIgnoreNonAnswerSeekingQuery(other.getIgnoreNonAnswerSeekingQuery()); - } - if (other.hasIgnoreLowRelevantContent()) { - setIgnoreLowRelevantContent(other.getIgnoreLowRelevantContent()); - } - if (other.getIgnoreJailBreakingQuery() != false) { - setIgnoreJailBreakingQuery(other.getIgnoreJailBreakingQuery()); + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + MODEL_VERSION_FIELD_NUMBER; + hash = (53 * hash) + getModelVersion().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; } - @java.lang.Override - public final boolean isInitialized() { - return true; + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec + .ModelSpec + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); } - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - input.readMessage( - internalGetModelSpecFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: - { - input.readMessage( - internalGetPromptSpecFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 24: - { - includeCitations_ = input.readBool(); - bitField0_ |= 0x00000004; - break; - } // case 24 - case 34: - { - answerLanguageCode_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - break; - } // case 34 - case 40: - { - ignoreAdversarialQuery_ = input.readBool(); - bitField0_ |= 0x00000010; - break; - } // case 40 - case 48: - { - ignoreNonAnswerSeekingQuery_ = input.readBool(); - bitField0_ |= 0x00000020; - break; - } // case 48 - case 56: - { - ignoreLowRelevantContent_ = input.readBool(); - bitField0_ |= 0x00000040; - break; - } // case 56 - case 64: - { - ignoreJailBreakingQuery_ = input.readBool(); - bitField0_ |= 0x00000080; - break; - } // case 64 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec + .ModelSpec + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); } - private int bitField0_; - - private com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec .ModelSpec - modelSpec_; - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec - .ModelSpec, - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec - .ModelSpec.Builder, - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec - .ModelSpecOrBuilder> - modelSpecBuilder_; - - /** - * - * - *
            -       * Answer generation model specification.
            -       * 
            - * - * - * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec.ModelSpec model_spec = 1; - * - * - * @return Whether the modelSpec field is set. - */ - public boolean hasModelSpec() { - return ((bitField0_ & 0x00000001) != 0); + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); } - /** - * - * - *
            -       * Answer generation model specification.
            -       * 
            - * - * - * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec.ModelSpec model_spec = 1; - * - * - * @return The modelSpec. - */ - public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec .ModelSpec - getModelSpec() { - if (modelSpecBuilder_ == null) { - return modelSpec_ == null - ? com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec - .ModelSpec.getDefaultInstance() - : modelSpec_; - } else { - return modelSpecBuilder_.getMessage(); - } + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); } - /** - * - * - *
            -       * Answer generation model specification.
            -       * 
            - * - * - * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec.ModelSpec model_spec = 1; - * - */ - public Builder setModelSpec( - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec.ModelSpec - value) { - if (modelSpecBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - modelSpec_ = value; - } else { - modelSpecBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec + .ModelSpec + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); } - /** - * - * - *
            -       * Answer generation model specification.
            -       * 
            - * - * - * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec.ModelSpec model_spec = 1; - * - */ - public Builder setModelSpec( - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec.ModelSpec - .Builder - builderForValue) { - if (modelSpecBuilder_ == null) { - modelSpec_ = builderForValue.build(); - } else { - modelSpecBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec + .ModelSpec + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); } - /** - * - * - *
            -       * Answer generation model specification.
            -       * 
            - * - * - * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec.ModelSpec model_spec = 1; - * - */ - public Builder mergeModelSpec( - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec.ModelSpec - value) { - if (modelSpecBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) - && modelSpec_ != null - && modelSpec_ - != com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec - .ModelSpec.getDefaultInstance()) { - getModelSpecBuilder().mergeFrom(value); - } else { - modelSpec_ = value; - } - } else { - modelSpecBuilder_.mergeFrom(value); - } - if (modelSpec_ != null) { - bitField0_ |= 0x00000001; - onChanged(); - } - return this; + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec + .ModelSpec + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } - /** - * - * - *
            -       * Answer generation model specification.
            -       * 
            - * - * - * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec.ModelSpec model_spec = 1; - * - */ - public Builder clearModelSpec() { - bitField0_ = (bitField0_ & ~0x00000001); - modelSpec_ = null; - if (modelSpecBuilder_ != null) { - modelSpecBuilder_.dispose(); - modelSpecBuilder_ = null; - } - onChanged(); - return this; + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec + .ModelSpec + parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); } - /** - * - * - *
            -       * Answer generation model specification.
            -       * 
            - * - * - * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec.ModelSpec model_spec = 1; - * - */ - public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec - .ModelSpec.Builder - getModelSpecBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return internalGetModelSpecFieldBuilder().getBuilder(); + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec + .ModelSpec + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } - /** - * - * - *
            -       * Answer generation model specification.
            -       * 
            - * - * - * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec.ModelSpec model_spec = 1; - * - */ - public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec - .ModelSpecOrBuilder - getModelSpecOrBuilder() { - if (modelSpecBuilder_ != null) { - return modelSpecBuilder_.getMessageOrBuilder(); - } else { - return modelSpec_ == null - ? com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec - .ModelSpec.getDefaultInstance() - : modelSpec_; - } + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec + .ModelSpec + parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); } - /** - * - * - *
            -       * Answer generation model specification.
            -       * 
            - * - * - * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec.ModelSpec model_spec = 1; - * - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec - .ModelSpec, - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec - .ModelSpec.Builder, - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec - .ModelSpecOrBuilder> - internalGetModelSpecFieldBuilder() { - if (modelSpecBuilder_ == null) { - modelSpecBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec - .ModelSpec, - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec - .ModelSpec.Builder, - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec - .ModelSpecOrBuilder>(getModelSpec(), getParentForChildren(), isClean()); - modelSpec_ = null; - } - return modelSpecBuilder_; + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec + .ModelSpec + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } - private com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec - .PromptSpec - promptSpec_; - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec - .PromptSpec, - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec - .PromptSpec.Builder, - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec - .PromptSpecOrBuilder> - promptSpecBuilder_; + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec + .ModelSpec + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } - /** - * - * - *
            -       * Answer generation prompt specification.
            -       * 
            - * - * - * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec.PromptSpec prompt_spec = 2; - * - * - * @return Whether the promptSpec field is set. - */ - public boolean hasPromptSpec() { - return ((bitField0_ & 0x00000002) != 0); + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); } - /** - * - * - *
            -       * Answer generation prompt specification.
            -       * 
            - * - * - * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec.PromptSpec prompt_spec = 2; - * - * - * @return The promptSpec. - */ - public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec - .PromptSpec - getPromptSpec() { - if (promptSpecBuilder_ == null) { - return promptSpec_ == null - ? com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec - .PromptSpec.getDefaultInstance() - : promptSpec_; - } else { - return promptSpecBuilder_.getMessage(); - } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); } - /** - * - * - *
            -       * Answer generation prompt specification.
            -       * 
            - * - * - * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec.PromptSpec prompt_spec = 2; - * - */ - public Builder setPromptSpec( - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec.PromptSpec - value) { - if (promptSpecBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - promptSpec_ = value; - } else { - promptSpecBuilder_.setMessage(value); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; + public static Builder newBuilder( + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec.ModelSpec + 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; } /** * * *
            -       * Answer generation prompt specification.
            +       * Answer Generation Model specification.
                    * 
            * - * - * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec.PromptSpec prompt_spec = 2; - * + * Protobuf type {@code + * google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec.ModelSpec} */ - public Builder setPromptSpec( - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec.PromptSpec - .Builder - builderForValue) { - if (promptSpecBuilder_ == null) { - promptSpec_ = builderForValue.build(); - } else { - promptSpecBuilder_.setMessage(builderForValue.build()); + public static final class Builder + extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec.ModelSpec) + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec + .ModelSpecOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.ConversationalSearchServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_AnswerGenerationSpec_ModelSpec_descriptor; } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
            -       * Answer generation prompt specification.
            -       * 
            - * - * - * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec.PromptSpec prompt_spec = 2; - * - */ - public Builder mergePromptSpec( - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec.PromptSpec - value) { - if (promptSpecBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0) - && promptSpec_ != null - && promptSpec_ - != com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec - .PromptSpec.getDefaultInstance()) { - getPromptSpecBuilder().mergeFrom(value); - } else { - promptSpec_ = value; - } - } else { - promptSpecBuilder_.mergeFrom(value); - } - if (promptSpec_ != null) { - bitField0_ |= 0x00000002; - onChanged(); + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.ConversationalSearchServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_AnswerGenerationSpec_ModelSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec + .ModelSpec.class, + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec + .ModelSpec.Builder.class); } - return this; - } - /** - * - * - *
            -       * Answer generation prompt specification.
            -       * 
            - * - * - * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec.PromptSpec prompt_spec = 2; - * - */ - public Builder clearPromptSpec() { - bitField0_ = (bitField0_ & ~0x00000002); - promptSpec_ = null; - if (promptSpecBuilder_ != null) { - promptSpecBuilder_.dispose(); - promptSpecBuilder_ = null; - } - onChanged(); - return this; - } + // Construct using + // com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec.ModelSpec.newBuilder() + private Builder() {} - /** - * - * - *
            -       * Answer generation prompt specification.
            -       * 
            - * - * - * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec.PromptSpec prompt_spec = 2; - * - */ - public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec - .PromptSpec.Builder - getPromptSpecBuilder() { - bitField0_ |= 0x00000002; - onChanged(); - return internalGetPromptSpecFieldBuilder().getBuilder(); - } + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } - /** - * - * - *
            -       * Answer generation prompt specification.
            -       * 
            - * - * - * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec.PromptSpec prompt_spec = 2; - * - */ - public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec - .PromptSpecOrBuilder - getPromptSpecOrBuilder() { - if (promptSpecBuilder_ != null) { - return promptSpecBuilder_.getMessageOrBuilder(); - } else { - return promptSpec_ == null - ? com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec - .PromptSpec.getDefaultInstance() - : promptSpec_; + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + modelVersion_ = ""; + return this; } - } - /** - * - * - *
            -       * Answer generation prompt specification.
            -       * 
            - * - * - * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec.PromptSpec prompt_spec = 2; - * - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec - .PromptSpec, - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec - .PromptSpec.Builder, - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec - .PromptSpecOrBuilder> - internalGetPromptSpecFieldBuilder() { - if (promptSpecBuilder_ == null) { - promptSpecBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec - .PromptSpec, - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec - .PromptSpec.Builder, - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec - .PromptSpecOrBuilder>(getPromptSpec(), getParentForChildren(), isClean()); - promptSpec_ = null; + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1beta.ConversationalSearchServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_AnswerGenerationSpec_ModelSpec_descriptor; } - return promptSpecBuilder_; - } - private boolean includeCitations_; + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec + .ModelSpec + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec + .ModelSpec.getDefaultInstance(); + } - /** - * - * - *
            -       * Specifies whether to include citation metadata in the answer. The default
            -       * value is `false`.
            -       * 
            - * - * bool include_citations = 3; - * - * @return The includeCitations. - */ - @java.lang.Override - public boolean getIncludeCitations() { - return includeCitations_; - } + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec + .ModelSpec + build() { + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec.ModelSpec + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } - /** - * - * - *
            -       * Specifies whether to include citation metadata in the answer. The default
            -       * value is `false`.
            -       * 
            - * - * bool include_citations = 3; - * - * @param value The includeCitations to set. - * @return This builder for chaining. - */ - public Builder setIncludeCitations(boolean value) { + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec + .ModelSpec + buildPartial() { + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec.ModelSpec + result = + new com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest + .AnswerGenerationSpec.ModelSpec(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } - includeCitations_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } + private void buildPartial0( + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec + .ModelSpec + result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.modelVersion_ = modelVersion_; + } + } - /** - * - * - *
            -       * Specifies whether to include citation metadata in the answer. The default
            -       * value is `false`.
            -       * 
            - * - * bool include_citations = 3; - * - * @return This builder for chaining. - */ - public Builder clearIncludeCitations() { - bitField0_ = (bitField0_ & ~0x00000004); - includeCitations_ = false; - onChanged(); - return this; - } - - private java.lang.Object answerLanguageCode_ = ""; + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec + .ModelSpec) { + return mergeFrom( + (com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec + .ModelSpec) + other); + } else { + super.mergeFrom(other); + return this; + } + } - /** - * - * - *
            -       * Language code for Answer. Use language tags defined by
            -       * [BCP47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt).
            -       * Note: This is an experimental feature.
            -       * 
            - * - * string answer_language_code = 4; - * - * @return The answerLanguageCode. - */ - public java.lang.String getAnswerLanguageCode() { - java.lang.Object ref = answerLanguageCode_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - answerLanguageCode_ = s; - return s; - } else { - return (java.lang.String) ref; + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec + .ModelSpec + other) { + if (other + == com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec + .ModelSpec.getDefaultInstance()) return this; + if (!other.getModelVersion().isEmpty()) { + modelVersion_ = other.modelVersion_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; } - } - /** - * - * - *
            -       * Language code for Answer. Use language tags defined by
            -       * [BCP47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt).
            -       * Note: This is an experimental feature.
            -       * 
            - * - * string answer_language_code = 4; - * - * @return The bytes for answerLanguageCode. - */ - public com.google.protobuf.ByteString getAnswerLanguageCodeBytes() { - java.lang.Object ref = answerLanguageCode_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - answerLanguageCode_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; + @java.lang.Override + public final boolean isInitialized() { + return true; } - } - /** - * - * - *
            -       * Language code for Answer. Use language tags defined by
            -       * [BCP47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt).
            -       * Note: This is an experimental feature.
            -       * 
            - * - * string answer_language_code = 4; - * - * @param value The answerLanguageCode to set. - * @return This builder for chaining. - */ - public Builder setAnswerLanguageCode(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + modelVersion_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; } - answerLanguageCode_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - * - * - *
            -       * Language code for Answer. Use language tags defined by
            -       * [BCP47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt).
            -       * Note: This is an experimental feature.
            -       * 
            - * - * string answer_language_code = 4; - * - * @return This builder for chaining. - */ - public Builder clearAnswerLanguageCode() { - answerLanguageCode_ = getDefaultInstance().getAnswerLanguageCode(); - bitField0_ = (bitField0_ & ~0x00000008); - onChanged(); - return this; - } + private int bitField0_; - /** - * - * - *
            -       * Language code for Answer. Use language tags defined by
            -       * [BCP47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt).
            -       * Note: This is an experimental feature.
            -       * 
            - * - * string answer_language_code = 4; - * - * @param value The bytes for answerLanguageCode to set. - * @return This builder for chaining. - */ - public Builder setAnswerLanguageCodeBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); + private java.lang.Object modelVersion_ = ""; + + /** + * + * + *
            +         * Model version. If not set, it will use the default stable model.
            +         * Allowed values are: stable, preview.
            +         * 
            + * + * string model_version = 1; + * + * @return The modelVersion. + */ + public java.lang.String getModelVersion() { + java.lang.Object ref = modelVersion_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + modelVersion_ = s; + return s; + } else { + return (java.lang.String) ref; + } } - checkByteStringIsUtf8(value); - answerLanguageCode_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - private boolean ignoreAdversarialQuery_; + /** + * + * + *
            +         * Model version. If not set, it will use the default stable model.
            +         * Allowed values are: stable, preview.
            +         * 
            + * + * string model_version = 1; + * + * @return The bytes for modelVersion. + */ + public com.google.protobuf.ByteString getModelVersionBytes() { + java.lang.Object ref = modelVersion_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + modelVersion_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
            +         * Model version. If not set, it will use the default stable model.
            +         * Allowed values are: stable, preview.
            +         * 
            + * + * string model_version = 1; + * + * @param value The modelVersion to set. + * @return This builder for chaining. + */ + public Builder setModelVersion(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + modelVersion_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
            +         * Model version. If not set, it will use the default stable model.
            +         * Allowed values are: stable, preview.
            +         * 
            + * + * string model_version = 1; + * + * @return This builder for chaining. + */ + public Builder clearModelVersion() { + modelVersion_ = getDefaultInstance().getModelVersion(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
            +         * Model version. If not set, it will use the default stable model.
            +         * Allowed values are: stable, preview.
            +         * 
            + * + * string model_version = 1; + * + * @param value The bytes for modelVersion to set. + * @return This builder for chaining. + */ + public Builder setModelVersionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + modelVersion_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec.ModelSpec) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec.ModelSpec) + private static final com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest + .AnswerGenerationSpec.ModelSpec + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec + .ModelSpec(); + } + + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec + .ModelSpec + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ModelSpec parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } - /** - * - * - *
            -       * Specifies whether to filter out adversarial queries. The default value
            -       * is `false`.
            -       *
            -       * Google employs search-query classification to detect adversarial
            -       * queries. No answer is returned if the search query is classified as an
            -       * adversarial query. For example, a user might ask a question regarding
            -       * negative comments about the company or submit a query designed to
            -       * generate unsafe, policy-violating output. If this field is set to
            -       * `true`, we skip generating answers for adversarial queries and return
            -       * fallback messages instead.
            -       * 
            - * - * bool ignore_adversarial_query = 5; - * - * @return The ignoreAdversarialQuery. - */ @java.lang.Override - public boolean getIgnoreAdversarialQuery() { - return ignoreAdversarialQuery_; + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec + .ModelSpec + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; } + } + + public interface PromptSpecOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec.PromptSpec) + com.google.protobuf.MessageOrBuilder { /** * * *
            -       * Specifies whether to filter out adversarial queries. The default value
            -       * is `false`.
            -       *
            -       * Google employs search-query classification to detect adversarial
            -       * queries. No answer is returned if the search query is classified as an
            -       * adversarial query. For example, a user might ask a question regarding
            -       * negative comments about the company or submit a query designed to
            -       * generate unsafe, policy-violating output. If this field is set to
            -       * `true`, we skip generating answers for adversarial queries and return
            -       * fallback messages instead.
            +       * Customized preamble.
                    * 
            * - * bool ignore_adversarial_query = 5; + * string preamble = 1; * - * @param value The ignoreAdversarialQuery to set. - * @return This builder for chaining. + * @return The preamble. */ - public Builder setIgnoreAdversarialQuery(boolean value) { - - ignoreAdversarialQuery_ = value; - bitField0_ |= 0x00000010; - onChanged(); - return this; - } + java.lang.String getPreamble(); /** * * *
            -       * Specifies whether to filter out adversarial queries. The default value
            -       * is `false`.
            -       *
            -       * Google employs search-query classification to detect adversarial
            -       * queries. No answer is returned if the search query is classified as an
            -       * adversarial query. For example, a user might ask a question regarding
            -       * negative comments about the company or submit a query designed to
            -       * generate unsafe, policy-violating output. If this field is set to
            -       * `true`, we skip generating answers for adversarial queries and return
            -       * fallback messages instead.
            +       * Customized preamble.
                    * 
            * - * bool ignore_adversarial_query = 5; + * string preamble = 1; * - * @return This builder for chaining. + * @return The bytes for preamble. */ - public Builder clearIgnoreAdversarialQuery() { - bitField0_ = (bitField0_ & ~0x00000010); - ignoreAdversarialQuery_ = false; - onChanged(); - return this; + com.google.protobuf.ByteString getPreambleBytes(); + } + + /** + * + * + *
            +     * Answer generation prompt specification.
            +     * 
            + * + * Protobuf type {@code + * google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec.PromptSpec} + */ + public static final class PromptSpec extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec.PromptSpec) + PromptSpecOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "PromptSpec"); } - private boolean ignoreNonAnswerSeekingQuery_; + // Use PromptSpec.newBuilder() to construct. + private PromptSpec(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private PromptSpec() { + preamble_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.ConversationalSearchServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_AnswerGenerationSpec_PromptSpec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.ConversationalSearchServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_AnswerGenerationSpec_PromptSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec + .PromptSpec.class, + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec + .PromptSpec.Builder.class); + } + + public static final int PREAMBLE_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object preamble_ = ""; /** * * *
            -       * Specifies whether to filter out queries that are not answer-seeking.
            -       * The default value is `false`.
            -       *
            -       * Google employs search-query classification to detect answer-seeking
            -       * queries. No answer is returned if the search query is classified as a
            -       * non-answer seeking query. If this field is set to `true`, we skip
            -       * generating answers for non-answer seeking queries and return
            -       * fallback messages instead.
            +       * Customized preamble.
                    * 
            * - * bool ignore_non_answer_seeking_query = 6; + * string preamble = 1; * - * @return The ignoreNonAnswerSeekingQuery. + * @return The preamble. */ @java.lang.Override - public boolean getIgnoreNonAnswerSeekingQuery() { - return ignoreNonAnswerSeekingQuery_; + public java.lang.String getPreamble() { + java.lang.Object ref = preamble_; + 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(); + preamble_ = s; + return s; + } } /** * * *
            -       * Specifies whether to filter out queries that are not answer-seeking.
            -       * The default value is `false`.
            -       *
            -       * Google employs search-query classification to detect answer-seeking
            -       * queries. No answer is returned if the search query is classified as a
            -       * non-answer seeking query. If this field is set to `true`, we skip
            -       * generating answers for non-answer seeking queries and return
            -       * fallback messages instead.
            +       * Customized preamble.
                    * 
            * - * bool ignore_non_answer_seeking_query = 6; + * string preamble = 1; * - * @param value The ignoreNonAnswerSeekingQuery to set. - * @return This builder for chaining. + * @return The bytes for preamble. */ - public Builder setIgnoreNonAnswerSeekingQuery(boolean value) { + @java.lang.Override + public com.google.protobuf.ByteString getPreambleBytes() { + java.lang.Object ref = preamble_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + preamble_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } - ignoreNonAnswerSeekingQuery_ = value; - bitField0_ |= 0x00000020; - onChanged(); - return this; + 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; } - /** - * - * - *
            -       * Specifies whether to filter out queries that are not answer-seeking.
            -       * The default value is `false`.
            -       *
            -       * Google employs search-query classification to detect answer-seeking
            -       * queries. No answer is returned if the search query is classified as a
            -       * non-answer seeking query. If this field is set to `true`, we skip
            -       * generating answers for non-answer seeking queries and return
            -       * fallback messages instead.
            -       * 
            - * - * bool ignore_non_answer_seeking_query = 6; - * - * @return This builder for chaining. - */ - public Builder clearIgnoreNonAnswerSeekingQuery() { - bitField0_ = (bitField0_ & ~0x00000020); - ignoreNonAnswerSeekingQuery_ = false; - onChanged(); - return this; + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(preamble_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, preamble_); + } + getUnknownFields().writeTo(output); } - private boolean ignoreLowRelevantContent_; + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(preamble_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, preamble_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } - /** - * - * - *
            -       * Specifies whether to filter out queries that have low relevance.
            -       *
            -       * If this field is set to `false`, all search results are used regardless
            -       * of relevance to generate answers. If set to `true` or unset, the behavior
            -       * will be determined automatically by the service.
            -       * 
            - * - * optional bool ignore_low_relevant_content = 7; - * - * @return Whether the ignoreLowRelevantContent field is set. - */ @java.lang.Override - public boolean hasIgnoreLowRelevantContent() { - return ((bitField0_ & 0x00000040) != 0); + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec + .PromptSpec)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec.PromptSpec + other = + (com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec + .PromptSpec) + obj; + + if (!getPreamble().equals(other.getPreamble())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; } - /** - * - * - *
            -       * Specifies whether to filter out queries that have low relevance.
            -       *
            -       * If this field is set to `false`, all search results are used regardless
            -       * of relevance to generate answers. If set to `true` or unset, the behavior
            -       * will be determined automatically by the service.
            -       * 
            - * - * optional bool ignore_low_relevant_content = 7; - * - * @return The ignoreLowRelevantContent. - */ @java.lang.Override - public boolean getIgnoreLowRelevantContent() { - return ignoreLowRelevantContent_; + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PREAMBLE_FIELD_NUMBER; + hash = (53 * hash) + getPreamble().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; } - /** - * - * - *
            -       * Specifies whether to filter out queries that have low relevance.
            -       *
            -       * If this field is set to `false`, all search results are used regardless
            -       * of relevance to generate answers. If set to `true` or unset, the behavior
            -       * will be determined automatically by the service.
            -       * 
            - * - * optional bool ignore_low_relevant_content = 7; - * - * @param value The ignoreLowRelevantContent to set. - * @return This builder for chaining. - */ - public Builder setIgnoreLowRelevantContent(boolean value) { + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec + .PromptSpec + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - ignoreLowRelevantContent_ = value; - bitField0_ |= 0x00000040; - onChanged(); - return this; + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec + .PromptSpec + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); } - /** - * - * - *
            -       * Specifies whether to filter out queries that have low relevance.
            -       *
            -       * If this field is set to `false`, all search results are used regardless
            -       * of relevance to generate answers. If set to `true` or unset, the behavior
            -       * will be determined automatically by the service.
            -       * 
            - * - * optional bool ignore_low_relevant_content = 7; - * - * @return This builder for chaining. - */ - public Builder clearIgnoreLowRelevantContent() { - bitField0_ = (bitField0_ & ~0x00000040); - ignoreLowRelevantContent_ = false; - onChanged(); - return this; + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec + .PromptSpec + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); } - private boolean ignoreJailBreakingQuery_; + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec + .PromptSpec + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - /** - * - * - *
            -       * Optional. Specifies whether to filter out jail-breaking queries. The
            -       * default value is `false`.
            -       *
            -       * Google employs search-query classification to detect jail-breaking
            -       * queries. No summary is returned if the search query is classified as a
            -       * jail-breaking query. A user might add instructions to the query to
            -       * change the tone, style, language, content of the answer, or ask the
            -       * model to act as a different entity, e.g. "Reply in the tone of a
            -       * competing company's CEO". If this field is set to `true`, we skip
            -       * generating summaries for jail-breaking queries and return fallback
            -       * messages instead.
            -       * 
            - * - * bool ignore_jail_breaking_query = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The ignoreJailBreakingQuery. - */ - @java.lang.Override - public boolean getIgnoreJailBreakingQuery() { - return ignoreJailBreakingQuery_; + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec + .PromptSpec + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); } - /** - * - * - *
            -       * Optional. Specifies whether to filter out jail-breaking queries. The
            -       * default value is `false`.
            -       *
            -       * Google employs search-query classification to detect jail-breaking
            -       * queries. No summary is returned if the search query is classified as a
            -       * jail-breaking query. A user might add instructions to the query to
            -       * change the tone, style, language, content of the answer, or ask the
            -       * model to act as a different entity, e.g. "Reply in the tone of a
            -       * competing company's CEO". If this field is set to `true`, we skip
            -       * generating summaries for jail-breaking queries and return fallback
            -       * messages instead.
            -       * 
            - * - * bool ignore_jail_breaking_query = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The ignoreJailBreakingQuery to set. - * @return This builder for chaining. - */ - public Builder setIgnoreJailBreakingQuery(boolean value) { + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec + .PromptSpec + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - ignoreJailBreakingQuery_ = value; - bitField0_ |= 0x00000080; - onChanged(); - return this; + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec + .PromptSpec + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec + .PromptSpec + 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.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec + .PromptSpec + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec + .PromptSpec + 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.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec + .PromptSpec + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec + .PromptSpec + 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.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec.PromptSpec + 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; } /** * * *
            -       * Optional. Specifies whether to filter out jail-breaking queries. The
            -       * default value is `false`.
            -       *
            -       * Google employs search-query classification to detect jail-breaking
            -       * queries. No summary is returned if the search query is classified as a
            -       * jail-breaking query. A user might add instructions to the query to
            -       * change the tone, style, language, content of the answer, or ask the
            -       * model to act as a different entity, e.g. "Reply in the tone of a
            -       * competing company's CEO". If this field is set to `true`, we skip
            -       * generating summaries for jail-breaking queries and return fallback
            -       * messages instead.
            +       * Answer generation prompt specification.
                    * 
            * - * bool ignore_jail_breaking_query = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. + * Protobuf type {@code + * google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec.PromptSpec} */ - public Builder clearIgnoreJailBreakingQuery() { - bitField0_ = (bitField0_ & ~0x00000080); - ignoreJailBreakingQuery_ = false; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec) - } + public static final class Builder + extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec.PromptSpec) + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec + .PromptSpecOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.ConversationalSearchServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_AnswerGenerationSpec_PromptSpec_descriptor; + } - // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec) - private static final com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest - .AnswerGenerationSpec - DEFAULT_INSTANCE; + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.ConversationalSearchServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_AnswerGenerationSpec_PromptSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec + .PromptSpec.class, + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec + .PromptSpec.Builder.class); + } - static { - DEFAULT_INSTANCE = - new com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec(); - } + // Construct using + // com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec.PromptSpec.newBuilder() + private Builder() {} - public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec - getDefaultInstance() { - return DEFAULT_INSTANCE; - } + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public AnswerGenerationSpec parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException() - .setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + preamble_ = ""; + return this; + } - public static com.google.protobuf.Parser parser() { - return PARSER; - } + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1beta.ConversationalSearchServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_AnswerGenerationSpec_PromptSpec_descriptor; + } - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec + .PromptSpec + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec + .PromptSpec.getDefaultInstance(); + } - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - } + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec + .PromptSpec + build() { + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec.PromptSpec + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } - public interface SearchSpecOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec) - com.google.protobuf.MessageOrBuilder { + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec + .PromptSpec + buildPartial() { + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec.PromptSpec + result = + new com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest + .AnswerGenerationSpec.PromptSpec(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } - /** - * - * - *
            -     * Search parameters.
            -     * 
            - * - * - * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchParams search_params = 1; - * - * - * @return Whether the searchParams field is set. - */ - boolean hasSearchParams(); - - /** - * - * - *
            -     * Search parameters.
            -     * 
            - * - * - * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchParams search_params = 1; - * - * - * @return The searchParams. - */ - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchParams - getSearchParams(); - - /** - * - * - *
            -     * Search parameters.
            -     * 
            - * - * - * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchParams search_params = 1; - * - */ - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchParamsOrBuilder - getSearchParamsOrBuilder(); - - /** - * - * - *
            -     * Search result list.
            -     * 
            - * - * - * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList search_result_list = 2; - * - * - * @return Whether the searchResultList field is set. - */ - boolean hasSearchResultList(); - - /** - * - * - *
            -     * Search result list.
            -     * 
            - * - * - * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList search_result_list = 2; - * - * - * @return The searchResultList. - */ - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList - getSearchResultList(); + private void buildPartial0( + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec + .PromptSpec + result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.preamble_ = preamble_; + } + } - /** - * - * - *
            -     * Search result list.
            -     * 
            - * - * - * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList search_result_list = 2; - * - */ - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultListOrBuilder - getSearchResultListOrBuilder(); + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec + .PromptSpec) { + return mergeFrom( + (com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec + .PromptSpec) + other); + } else { + super.mergeFrom(other); + return this; + } + } - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.InputCase getInputCase(); - } + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec + .PromptSpec + other) { + if (other + == com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec + .PromptSpec.getDefaultInstance()) return this; + if (!other.getPreamble().isEmpty()) { + preamble_ = other.preamble_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } - /** - * - * - *
            -   * Search specification.
            -   * 
            - * - * Protobuf type {@code google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec} - */ - public static final class SearchSpec extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec) - SearchSpecOrBuilder { - private static final long serialVersionUID = 0L; + @java.lang.Override + public final boolean isInitialized() { + return true; + } - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "SearchSpec"); - } + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + preamble_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } - // Use SearchSpec.newBuilder() to construct. - private SearchSpec(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } + private int bitField0_; - private SearchSpec() {} + private java.lang.Object preamble_ = ""; - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.discoveryengine.v1beta.ConversationalSearchServiceProto - .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_SearchSpec_descriptor; - } + /** + * + * + *
            +         * Customized preamble.
            +         * 
            + * + * string preamble = 1; + * + * @return The preamble. + */ + public java.lang.String getPreamble() { + java.lang.Object ref = preamble_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + preamble_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.discoveryengine.v1beta.ConversationalSearchServiceProto - .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_SearchSpec_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.class, - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.Builder.class); - } + /** + * + * + *
            +         * Customized preamble.
            +         * 
            + * + * string preamble = 1; + * + * @return The bytes for preamble. + */ + public com.google.protobuf.ByteString getPreambleBytes() { + java.lang.Object ref = preamble_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + preamble_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } - public interface SearchParamsOrBuilder + /** + * + * + *
            +         * Customized preamble.
            +         * 
            + * + * string preamble = 1; + * + * @param value The preamble to set. + * @return This builder for chaining. + */ + public Builder setPreamble(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + preamble_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
            +         * Customized preamble.
            +         * 
            + * + * string preamble = 1; + * + * @return This builder for chaining. + */ + public Builder clearPreamble() { + preamble_ = getDefaultInstance().getPreamble(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
            +         * Customized preamble.
            +         * 
            + * + * string preamble = 1; + * + * @param value The bytes for preamble to set. + * @return This builder for chaining. + */ + public Builder setPreambleBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + preamble_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec.PromptSpec) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec.PromptSpec) + private static final com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest + .AnswerGenerationSpec.PromptSpec + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec + .PromptSpec(); + } + + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec + .PromptSpec + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PromptSpec parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec + .PromptSpec + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface MultimodalSpecOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchParams) + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec.MultimodalSpec) com.google.protobuf.MessageOrBuilder { /** * * *
            -       * Number of search results to return.
            -       * The default value is 10.
            +       * Optional. Source of image returned in the answer.
                    * 
            * - * int32 max_return_results = 1; + * + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec.MultimodalSpec.ImageSource image_source = 3 [(.google.api.field_behavior) = OPTIONAL]; + * * - * @return The maxReturnResults. + * @return The enum numeric value on the wire for imageSource. */ - int getMaxReturnResults(); + int getImageSourceValue(); /** * * *
            -       * The filter syntax consists of an expression language for constructing
            -       * a predicate from one or more fields of the documents being filtered.
            -       * Filter expression is case-sensitive. This will be used to filter
            -       * search results which may affect the Answer response.
            -       *
            -       * If this field is unrecognizable, an  `INVALID_ARGUMENT`  is returned.
            -       *
            -       * Filtering in Vertex AI Search is done by mapping the LHS filter key
            -       * to a key property defined in the Vertex AI Search backend -- this
            -       * mapping is defined by the customer in their schema. For example a
            -       * media customers might have a field 'name' in their schema. In this
            -       * case the filter would look like this: filter --> name:'ANY("king
            -       * kong")'
            -       *
            -       * For more information about filtering including syntax and filter
            -       * operators, see
            -       * [Filter](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata)
            +       * Optional. Source of image returned in the answer.
                    * 
            * - * string filter = 2; + * + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec.MultimodalSpec.ImageSource image_source = 3 [(.google.api.field_behavior) = OPTIONAL]; + * * - * @return The filter. + * @return The imageSource. */ - java.lang.String getFilter(); + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec.MultimodalSpec + .ImageSource + getImageSource(); + } - /** - * - * - *
            -       * The filter syntax consists of an expression language for constructing
            -       * a predicate from one or more fields of the documents being filtered.
            -       * Filter expression is case-sensitive. This will be used to filter
            -       * search results which may affect the Answer response.
            -       *
            -       * If this field is unrecognizable, an  `INVALID_ARGUMENT`  is returned.
            -       *
            -       * Filtering in Vertex AI Search is done by mapping the LHS filter key
            -       * to a key property defined in the Vertex AI Search backend -- this
            -       * mapping is defined by the customer in their schema. For example a
            -       * media customers might have a field 'name' in their schema. In this
            -       * case the filter would look like this: filter --> name:'ANY("king
            -       * kong")'
            -       *
            -       * For more information about filtering including syntax and filter
            -       * operators, see
            -       * [Filter](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata)
            -       * 
            - * - * string filter = 2; - * - * @return The bytes for filter. - */ - com.google.protobuf.ByteString getFilterBytes(); + /** + * + * + *
            +     * Multimodal specification: Will return an image from specified source.
            +     * If multiple sources are specified, the pick is a quality based decision.
            +     * 
            + * + * Protobuf type {@code + * google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec.MultimodalSpec} + */ + public static final class MultimodalSpec extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec.MultimodalSpec) + MultimodalSpecOrBuilder { + private static final long serialVersionUID = 0L; - /** - * - * - *
            -       * Boost specification to boost certain documents in search results which
            -       * may affect the answer query response. For more information on boosting,
            -       * see [Boosting](https://cloud.google.com/retail/docs/boosting#boost)
            -       * 
            - * - * .google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec boost_spec = 3; - * - * @return Whether the boostSpec field is set. - */ - boolean hasBoostSpec(); + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "MultimodalSpec"); + } - /** - * - * - *
            -       * Boost specification to boost certain documents in search results which
            -       * may affect the answer query response. For more information on boosting,
            -       * see [Boosting](https://cloud.google.com/retail/docs/boosting#boost)
            -       * 
            - * - * .google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec boost_spec = 3; - * - * @return The boostSpec. - */ - com.google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec getBoostSpec(); + // Use MultimodalSpec.newBuilder() to construct. + private MultimodalSpec(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private MultimodalSpec() { + imageSource_ = 0; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.ConversationalSearchServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_AnswerGenerationSpec_MultimodalSpec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.ConversationalSearchServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_AnswerGenerationSpec_MultimodalSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec + .MultimodalSpec.class, + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec + .MultimodalSpec.Builder.class); + } /** * * *
            -       * Boost specification to boost certain documents in search results which
            -       * may affect the answer query response. For more information on boosting,
            -       * see [Boosting](https://cloud.google.com/retail/docs/boosting#boost)
            +       * Specifies the image source.
                    * 
            * - * .google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec boost_spec = 3; + * Protobuf enum {@code + * google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec.MultimodalSpec.ImageSource} */ - com.google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpecOrBuilder - getBoostSpecOrBuilder(); - - /** - * - * - *
            -       * The order in which documents are returned. Documents can be ordered
            -       * by a field in an
            -       * [Document][google.cloud.discoveryengine.v1beta.Document] object. Leave
            -       * it unset if ordered by relevance. `order_by` expression is
            -       * case-sensitive. For more information on ordering, see
            -       * [Ordering](https://cloud.google.com/retail/docs/filter-and-order#order)
            -       *
            -       * If this field is unrecognizable, an `INVALID_ARGUMENT` is returned.
            -       * 
            - * - * string order_by = 4; - * - * @return The orderBy. - */ - java.lang.String getOrderBy(); + public enum ImageSource implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
            +         * Unspecified image source (multimodal feature is disabled by default).
            +         * 
            + * + * IMAGE_SOURCE_UNSPECIFIED = 0; + */ + IMAGE_SOURCE_UNSPECIFIED(0), + /** + * + * + *
            +         * Behavior when service determines the pick from all available sources.
            +         * 
            + * + * ALL_AVAILABLE_SOURCES = 1; + */ + ALL_AVAILABLE_SOURCES(1), + /** + * + * + *
            +         * Includes image from corpus in the answer.
            +         * 
            + * + * CORPUS_IMAGE_ONLY = 2; + */ + CORPUS_IMAGE_ONLY(2), + /** + * + * + *
            +         * Triggers figure generation in the answer.
            +         * 
            + * + * FIGURE_GENERATION_ONLY = 3; + */ + FIGURE_GENERATION_ONLY(3), + UNRECOGNIZED(-1), + ; - /** - * - * - *
            -       * The order in which documents are returned. Documents can be ordered
            -       * by a field in an
            -       * [Document][google.cloud.discoveryengine.v1beta.Document] object. Leave
            -       * it unset if ordered by relevance. `order_by` expression is
            -       * case-sensitive. For more information on ordering, see
            -       * [Ordering](https://cloud.google.com/retail/docs/filter-and-order#order)
            -       *
            -       * If this field is unrecognizable, an `INVALID_ARGUMENT` is returned.
            -       * 
            - * - * string order_by = 4; - * - * @return The bytes for orderBy. - */ - com.google.protobuf.ByteString getOrderByBytes(); + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ImageSource"); + } - /** - * - * - *
            -       * Specifies the search result mode. If unspecified, the
            -       * search result mode defaults to `DOCUMENTS`.
            -       * See [parse and chunk
            -       * documents](https://cloud.google.com/generative-ai-app-builder/docs/parse-chunk-documents)
            -       * 
            - * - * - * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SearchResultMode search_result_mode = 5; - * - * - * @return The enum numeric value on the wire for searchResultMode. - */ - int getSearchResultModeValue(); + /** + * + * + *
            +         * Unspecified image source (multimodal feature is disabled by default).
            +         * 
            + * + * IMAGE_SOURCE_UNSPECIFIED = 0; + */ + public static final int IMAGE_SOURCE_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
            +         * Behavior when service determines the pick from all available sources.
            +         * 
            + * + * ALL_AVAILABLE_SOURCES = 1; + */ + public static final int ALL_AVAILABLE_SOURCES_VALUE = 1; + + /** + * + * + *
            +         * Includes image from corpus in the answer.
            +         * 
            + * + * CORPUS_IMAGE_ONLY = 2; + */ + public static final int CORPUS_IMAGE_ONLY_VALUE = 2; + + /** + * + * + *
            +         * Triggers figure generation in the answer.
            +         * 
            + * + * FIGURE_GENERATION_ONLY = 3; + */ + public static final int FIGURE_GENERATION_ONLY_VALUE = 3; + + 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 ImageSource 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 ImageSource forNumber(int value) { + switch (value) { + case 0: + return IMAGE_SOURCE_UNSPECIFIED; + case 1: + return ALL_AVAILABLE_SOURCES; + case 2: + return CORPUS_IMAGE_ONLY; + case 3: + return FIGURE_GENERATION_ONLY; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap + internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public ImageSource findValueByNumber(int number) { + return ImageSource.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec + .MultimodalSpec.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final ImageSource[] VALUES = values(); + + public static ImageSource valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private ImageSource(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec.MultimodalSpec.ImageSource) + } + + public static final int IMAGE_SOURCE_FIELD_NUMBER = 3; + private int imageSource_ = 0; /** * * *
            -       * Specifies the search result mode. If unspecified, the
            -       * search result mode defaults to `DOCUMENTS`.
            -       * See [parse and chunk
            -       * documents](https://cloud.google.com/generative-ai-app-builder/docs/parse-chunk-documents)
            +       * Optional. Source of image returned in the answer.
                    * 
            * * - * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SearchResultMode search_result_mode = 5; + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec.MultimodalSpec.ImageSource image_source = 3 [(.google.api.field_behavior) = OPTIONAL]; * * - * @return The searchResultMode. + * @return The enum numeric value on the wire for imageSource. */ - com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SearchResultMode - getSearchResultMode(); + @java.lang.Override + public int getImageSourceValue() { + return imageSource_; + } /** * * *
            -       * Specs defining dataStores to filter on in a search call and
            -       * configurations for those dataStores. This is only considered for
            -       * engines with multiple dataStores use case. For single dataStore within
            -       * an engine, they should use the specs at the top level.
            +       * Optional. Source of image returned in the answer.
                    * 
            * * - * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec data_store_specs = 7; + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec.MultimodalSpec.ImageSource image_source = 3 [(.google.api.field_behavior) = OPTIONAL]; * - */ - java.util.List - getDataStoreSpecsList(); - - /** - * * - *
            -       * Specs defining dataStores to filter on in a search call and
            -       * configurations for those dataStores. This is only considered for
            -       * engines with multiple dataStores use case. For single dataStore within
            -       * an engine, they should use the specs at the top level.
            -       * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec data_store_specs = 7; - * + * @return The imageSource. */ - com.google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec getDataStoreSpecs( - int index); + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec + .MultimodalSpec.ImageSource + getImageSource() { + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec + .MultimodalSpec.ImageSource + result = + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec + .MultimodalSpec.ImageSource.forNumber(imageSource_); + return result == null + ? com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec + .MultimodalSpec.ImageSource.UNRECOGNIZED + : result; + } - /** - * - * - *
            -       * Specs defining dataStores to filter on in a search call and
            -       * configurations for those dataStores. This is only considered for
            -       * engines with multiple dataStores use case. For single dataStore within
            -       * an engine, they should use the specs at the top level.
            -       * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec data_store_specs = 7; - * - */ - int getDataStoreSpecsCount(); + private byte memoizedIsInitialized = -1; - /** - * - * - *
            -       * Specs defining dataStores to filter on in a search call and
            -       * configurations for those dataStores. This is only considered for
            -       * engines with multiple dataStores use case. For single dataStore within
            -       * an engine, they should use the specs at the top level.
            -       * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec data_store_specs = 7; - * - */ - java.util.List< - ? extends - com.google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpecOrBuilder> - getDataStoreSpecsOrBuilderList(); + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; - /** - * - * - *
            -       * Specs defining dataStores to filter on in a search call and
            -       * configurations for those dataStores. This is only considered for
            -       * engines with multiple dataStores use case. For single dataStore within
            -       * an engine, they should use the specs at the top level.
            -       * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec data_store_specs = 7; - * - */ - com.google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpecOrBuilder - getDataStoreSpecsOrBuilder(int index); + memoizedIsInitialized = 1; + return true; + } - /** - * - * - *
            -       * Optional. Specification to enable natural language understanding
            -       * capabilities for search requests.
            -       * 
            - * - * - * .google.cloud.discoveryengine.v1beta.SearchRequest.NaturalLanguageQueryUnderstandingSpec natural_language_query_understanding_spec = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the naturalLanguageQueryUnderstandingSpec field is set. - */ - boolean hasNaturalLanguageQueryUnderstandingSpec(); + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (imageSource_ + != com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec + .MultimodalSpec.ImageSource.IMAGE_SOURCE_UNSPECIFIED + .getNumber()) { + output.writeEnum(3, imageSource_); + } + getUnknownFields().writeTo(output); + } - /** - * - * - *
            -       * Optional. Specification to enable natural language understanding
            -       * capabilities for search requests.
            -       * 
            - * - * - * .google.cloud.discoveryengine.v1beta.SearchRequest.NaturalLanguageQueryUnderstandingSpec natural_language_query_understanding_spec = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The naturalLanguageQueryUnderstandingSpec. - */ - com.google.cloud.discoveryengine.v1beta.SearchRequest.NaturalLanguageQueryUnderstandingSpec - getNaturalLanguageQueryUnderstandingSpec(); + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; - /** - * - * - *
            -       * Optional. Specification to enable natural language understanding
            -       * capabilities for search requests.
            -       * 
            - * - * - * .google.cloud.discoveryengine.v1beta.SearchRequest.NaturalLanguageQueryUnderstandingSpec natural_language_query_understanding_spec = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.cloud.discoveryengine.v1beta.SearchRequest - .NaturalLanguageQueryUnderstandingSpecOrBuilder - getNaturalLanguageQueryUnderstandingSpecOrBuilder(); - } + size = 0; + if (imageSource_ + != com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec + .MultimodalSpec.ImageSource.IMAGE_SOURCE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(3, imageSource_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } - /** - * - * - *
            -     * Search parameters.
            -     * 
            - * - * Protobuf type {@code - * google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchParams} - */ - public static final class SearchParams extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchParams) - SearchParamsOrBuilder { - private static final long serialVersionUID = 0L; + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec + .MultimodalSpec)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec + .MultimodalSpec + other = + (com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec + .MultimodalSpec) + obj; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "SearchParams"); + if (imageSource_ != other.imageSource_) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; } - // Use SearchParams.newBuilder() to construct. - private SearchParams(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + IMAGE_SOURCE_FIELD_NUMBER; + hash = (53 * hash) + imageSource_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; } - private SearchParams() { - filter_ = ""; - orderBy_ = ""; - searchResultMode_ = 0; - dataStoreSpecs_ = java.util.Collections.emptyList(); + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec + .MultimodalSpec + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.discoveryengine.v1beta.ConversationalSearchServiceProto - .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_SearchSpec_SearchParams_descriptor; + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec + .MultimodalSpec + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); } - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.discoveryengine.v1beta.ConversationalSearchServiceProto - .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_SearchSpec_SearchParams_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchParams - .class, - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchParams - .Builder.class); + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec + .MultimodalSpec + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); } - private int bitField0_; - public static final int MAX_RETURN_RESULTS_FIELD_NUMBER = 1; - private int maxReturnResults_ = 0; + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec + .MultimodalSpec + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - /** - * - * - *
            -       * Number of search results to return.
            -       * The default value is 10.
            -       * 
            - * - * int32 max_return_results = 1; - * - * @return The maxReturnResults. - */ - @java.lang.Override - public int getMaxReturnResults() { - return maxReturnResults_; + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec + .MultimodalSpec + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); } - public static final int FILTER_FIELD_NUMBER = 2; + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec + .MultimodalSpec + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - @SuppressWarnings("serial") - private volatile java.lang.Object filter_ = ""; + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec + .MultimodalSpec + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } - /** - * - * - *
            -       * The filter syntax consists of an expression language for constructing
            -       * a predicate from one or more fields of the documents being filtered.
            -       * Filter expression is case-sensitive. This will be used to filter
            -       * search results which may affect the Answer response.
            -       *
            -       * If this field is unrecognizable, an  `INVALID_ARGUMENT`  is returned.
            -       *
            -       * Filtering in Vertex AI Search is done by mapping the LHS filter key
            -       * to a key property defined in the Vertex AI Search backend -- this
            -       * mapping is defined by the customer in their schema. For example a
            -       * media customers might have a field 'name' in their schema. In this
            -       * case the filter would look like this: filter --> name:'ANY("king
            -       * kong")'
            -       *
            -       * For more information about filtering including syntax and filter
            -       * operators, see
            -       * [Filter](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata)
            -       * 
            - * - * string filter = 2; - * - * @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; - } + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec + .MultimodalSpec + parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); } - /** - * - * - *
            -       * The filter syntax consists of an expression language for constructing
            -       * a predicate from one or more fields of the documents being filtered.
            -       * Filter expression is case-sensitive. This will be used to filter
            -       * search results which may affect the Answer response.
            -       *
            -       * If this field is unrecognizable, an  `INVALID_ARGUMENT`  is returned.
            -       *
            -       * Filtering in Vertex AI Search is done by mapping the LHS filter key
            -       * to a key property defined in the Vertex AI Search backend -- this
            -       * mapping is defined by the customer in their schema. For example a
            -       * media customers might have a field 'name' in their schema. In this
            -       * case the filter would look like this: filter --> name:'ANY("king
            -       * kong")'
            -       *
            -       * For more information about filtering including syntax and filter
            -       * operators, see
            -       * [Filter](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata)
            -       * 
            - * - * string filter = 2; - * - * @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 com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec + .MultimodalSpec + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } - public static final int BOOST_SPEC_FIELD_NUMBER = 3; - private com.google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec boostSpec_; + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec + .MultimodalSpec + parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } - /** - * - * - *
            -       * Boost specification to boost certain documents in search results which
            -       * may affect the answer query response. For more information on boosting,
            -       * see [Boosting](https://cloud.google.com/retail/docs/boosting#boost)
            -       * 
            - * - * .google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec boost_spec = 3; - * - * @return Whether the boostSpec field is set. - */ - @java.lang.Override - public boolean hasBoostSpec() { - return ((bitField0_ & 0x00000001) != 0); + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec + .MultimodalSpec + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } - /** - * - * - *
            -       * Boost specification to boost certain documents in search results which
            -       * may affect the answer query response. For more information on boosting,
            -       * see [Boosting](https://cloud.google.com/retail/docs/boosting#boost)
            -       * 
            - * - * .google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec boost_spec = 3; - * - * @return The boostSpec. - */ - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec getBoostSpec() { - return boostSpec_ == null - ? com.google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec.getDefaultInstance() - : boostSpec_; + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec + .MultimodalSpec + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); } - /** - * - * - *
            -       * Boost specification to boost certain documents in search results which
            -       * may affect the answer query response. For more information on boosting,
            -       * see [Boosting](https://cloud.google.com/retail/docs/boosting#boost)
            -       * 
            - * - * .google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec boost_spec = 3; - */ @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpecOrBuilder - getBoostSpecOrBuilder() { - return boostSpec_ == null - ? com.google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec.getDefaultInstance() - : boostSpec_; + public Builder newBuilderForType() { + return newBuilder(); } - public static final int ORDER_BY_FIELD_NUMBER = 4; - - @SuppressWarnings("serial") - private volatile java.lang.Object orderBy_ = ""; + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } - /** - * - * - *
            -       * The order in which documents are returned. Documents can be ordered
            -       * by a field in an
            -       * [Document][google.cloud.discoveryengine.v1beta.Document] object. Leave
            -       * it unset if ordered by relevance. `order_by` expression is
            -       * case-sensitive. For more information on ordering, see
            -       * [Ordering](https://cloud.google.com/retail/docs/filter-and-order#order)
            -       *
            -       * If this field is unrecognizable, an `INVALID_ARGUMENT` is returned.
            -       * 
            - * - * string order_by = 4; - * - * @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; - } + public static Builder newBuilder( + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec + .MultimodalSpec + prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } - /** - * - * - *
            -       * The order in which documents are returned. Documents can be ordered
            -       * by a field in an
            -       * [Document][google.cloud.discoveryengine.v1beta.Document] object. Leave
            -       * it unset if ordered by relevance. `order_by` expression is
            -       * case-sensitive. For more information on ordering, see
            -       * [Ordering](https://cloud.google.com/retail/docs/filter-and-order#order)
            -       *
            -       * If this field is unrecognizable, an `INVALID_ARGUMENT` is returned.
            -       * 
            - * - * string order_by = 4; - * - * @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 Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); } - public static final int SEARCH_RESULT_MODE_FIELD_NUMBER = 5; - private int searchResultMode_ = 0; - - /** - * - * - *
            -       * Specifies the search result mode. If unspecified, the
            -       * search result mode defaults to `DOCUMENTS`.
            -       * See [parse and chunk
            -       * documents](https://cloud.google.com/generative-ai-app-builder/docs/parse-chunk-documents)
            -       * 
            - * - * - * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SearchResultMode search_result_mode = 5; - * - * - * @return The enum numeric value on the wire for searchResultMode. - */ @java.lang.Override - public int getSearchResultModeValue() { - return searchResultMode_; + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; } /** * * *
            -       * Specifies the search result mode. If unspecified, the
            -       * search result mode defaults to `DOCUMENTS`.
            -       * See [parse and chunk
            -       * documents](https://cloud.google.com/generative-ai-app-builder/docs/parse-chunk-documents)
            +       * Multimodal specification: Will return an image from specified source.
            +       * If multiple sources are specified, the pick is a quality based decision.
                    * 
            * - * - * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SearchResultMode search_result_mode = 5; - * - * - * @return The searchResultMode. + * Protobuf type {@code + * google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec.MultimodalSpec} */ - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec - .SearchResultMode - getSearchResultMode() { - com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SearchResultMode - result = - com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec - .SearchResultMode.forNumber(searchResultMode_); - return result == null - ? com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec - .SearchResultMode.UNRECOGNIZED - : result; - } - - public static final int DATA_STORE_SPECS_FIELD_NUMBER = 7; + public static final class Builder + extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec.MultimodalSpec) + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec + .MultimodalSpecOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.ConversationalSearchServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_AnswerGenerationSpec_MultimodalSpec_descriptor; + } - @SuppressWarnings("serial") - private java.util.List - dataStoreSpecs_; - - /** - * - * - *
            -       * Specs defining dataStores to filter on in a search call and
            -       * configurations for those dataStores. This is only considered for
            -       * engines with multiple dataStores use case. For single dataStore within
            -       * an engine, they should use the specs at the top level.
            -       * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec data_store_specs = 7; - * - */ - @java.lang.Override - public java.util.List - getDataStoreSpecsList() { - return dataStoreSpecs_; - } + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.ConversationalSearchServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_AnswerGenerationSpec_MultimodalSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec + .MultimodalSpec.class, + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec + .MultimodalSpec.Builder.class); + } - /** - * - * - *
            -       * Specs defining dataStores to filter on in a search call and
            -       * configurations for those dataStores. This is only considered for
            -       * engines with multiple dataStores use case. For single dataStore within
            -       * an engine, they should use the specs at the top level.
            -       * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec data_store_specs = 7; - * - */ - @java.lang.Override - public java.util.List< - ? extends - com.google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpecOrBuilder> - getDataStoreSpecsOrBuilderList() { - return dataStoreSpecs_; - } + // Construct using + // com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec.MultimodalSpec.newBuilder() + private Builder() {} - /** - * - * - *
            -       * Specs defining dataStores to filter on in a search call and
            -       * configurations for those dataStores. This is only considered for
            -       * engines with multiple dataStores use case. For single dataStore within
            -       * an engine, they should use the specs at the top level.
            -       * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec data_store_specs = 7; - * - */ - @java.lang.Override - public int getDataStoreSpecsCount() { - return dataStoreSpecs_.size(); - } + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } - /** - * - * - *
            -       * Specs defining dataStores to filter on in a search call and
            -       * configurations for those dataStores. This is only considered for
            -       * engines with multiple dataStores use case. For single dataStore within
            -       * an engine, they should use the specs at the top level.
            -       * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec data_store_specs = 7; - * - */ - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec getDataStoreSpecs( - int index) { - return dataStoreSpecs_.get(index); - } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + imageSource_ = 0; + return this; + } - /** - * - * - *
            -       * Specs defining dataStores to filter on in a search call and
            -       * configurations for those dataStores. This is only considered for
            -       * engines with multiple dataStores use case. For single dataStore within
            -       * an engine, they should use the specs at the top level.
            -       * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec data_store_specs = 7; - * - */ - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpecOrBuilder - getDataStoreSpecsOrBuilder(int index) { - return dataStoreSpecs_.get(index); - } + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1beta.ConversationalSearchServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_AnswerGenerationSpec_MultimodalSpec_descriptor; + } - public static final int NATURAL_LANGUAGE_QUERY_UNDERSTANDING_SPEC_FIELD_NUMBER = 8; - private com.google.cloud.discoveryengine.v1beta.SearchRequest - .NaturalLanguageQueryUnderstandingSpec - naturalLanguageQueryUnderstandingSpec_; + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec + .MultimodalSpec + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec + .MultimodalSpec.getDefaultInstance(); + } - /** - * - * - *
            -       * Optional. Specification to enable natural language understanding
            -       * capabilities for search requests.
            -       * 
            - * - * - * .google.cloud.discoveryengine.v1beta.SearchRequest.NaturalLanguageQueryUnderstandingSpec natural_language_query_understanding_spec = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the naturalLanguageQueryUnderstandingSpec field is set. - */ - @java.lang.Override - public boolean hasNaturalLanguageQueryUnderstandingSpec() { - return ((bitField0_ & 0x00000002) != 0); - } + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec + .MultimodalSpec + build() { + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec + .MultimodalSpec + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } - /** - * - * - *
            -       * Optional. Specification to enable natural language understanding
            -       * capabilities for search requests.
            -       * 
            - * - * - * .google.cloud.discoveryengine.v1beta.SearchRequest.NaturalLanguageQueryUnderstandingSpec natural_language_query_understanding_spec = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The naturalLanguageQueryUnderstandingSpec. - */ - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.SearchRequest - .NaturalLanguageQueryUnderstandingSpec - getNaturalLanguageQueryUnderstandingSpec() { - return naturalLanguageQueryUnderstandingSpec_ == null - ? com.google.cloud.discoveryengine.v1beta.SearchRequest - .NaturalLanguageQueryUnderstandingSpec.getDefaultInstance() - : naturalLanguageQueryUnderstandingSpec_; - } + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec + .MultimodalSpec + buildPartial() { + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec + .MultimodalSpec + result = + new com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest + .AnswerGenerationSpec.MultimodalSpec(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } - /** - * - * - *
            -       * Optional. Specification to enable natural language understanding
            -       * capabilities for search requests.
            -       * 
            - * - * - * .google.cloud.discoveryengine.v1beta.SearchRequest.NaturalLanguageQueryUnderstandingSpec natural_language_query_understanding_spec = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.SearchRequest - .NaturalLanguageQueryUnderstandingSpecOrBuilder - getNaturalLanguageQueryUnderstandingSpecOrBuilder() { - return naturalLanguageQueryUnderstandingSpec_ == null - ? com.google.cloud.discoveryengine.v1beta.SearchRequest - .NaturalLanguageQueryUnderstandingSpec.getDefaultInstance() - : naturalLanguageQueryUnderstandingSpec_; - } + private void buildPartial0( + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec + .MultimodalSpec + result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.imageSource_ = imageSource_; + } + } - private byte memoizedIsInitialized = -1; + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec + .MultimodalSpec) { + return mergeFrom( + (com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec + .MultimodalSpec) + other); + } else { + super.mergeFrom(other); + return this; + } + } - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec + .MultimodalSpec + other) { + if (other + == com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec + .MultimodalSpec.getDefaultInstance()) return this; + if (other.imageSource_ != 0) { + setImageSourceValue(other.getImageSourceValue()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } - memoizedIsInitialized = 1; - return true; - } + @java.lang.Override + public final boolean isInitialized() { + return true; + } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (maxReturnResults_ != 0) { - output.writeInt32(1, maxReturnResults_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(filter_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 2, filter_); - } - if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(3, getBoostSpec()); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(orderBy_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 4, orderBy_); - } - if (searchResultMode_ - != com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec - .SearchResultMode.SEARCH_RESULT_MODE_UNSPECIFIED - .getNumber()) { - output.writeEnum(5, searchResultMode_); - } - for (int i = 0; i < dataStoreSpecs_.size(); i++) { - output.writeMessage(7, dataStoreSpecs_.get(i)); - } - if (((bitField0_ & 0x00000002) != 0)) { - output.writeMessage(8, getNaturalLanguageQueryUnderstandingSpec()); + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 24: + { + imageSource_ = input.readEnum(); + bitField0_ |= 0x00000001; + break; + } // case 24 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; } - getUnknownFields().writeTo(output); - } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; + private int bitField0_; - size = 0; - if (maxReturnResults_ != 0) { - size += com.google.protobuf.CodedOutputStream.computeInt32Size(1, maxReturnResults_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(filter_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(2, filter_); - } - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getBoostSpec()); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(orderBy_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(4, orderBy_); - } - if (searchResultMode_ - != com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec - .SearchResultMode.SEARCH_RESULT_MODE_UNSPECIFIED - .getNumber()) { - size += com.google.protobuf.CodedOutputStream.computeEnumSize(5, searchResultMode_); - } - for (int i = 0; i < dataStoreSpecs_.size(); i++) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize(7, dataStoreSpecs_.get(i)); - } - if (((bitField0_ & 0x00000002) != 0)) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 8, getNaturalLanguageQueryUnderstandingSpec()); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } + private int imageSource_ = 0; - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj - instanceof - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchParams)) { - return super.equals(obj); + /** + * + * + *
            +         * Optional. Source of image returned in the answer.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec.MultimodalSpec.ImageSource image_source = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for imageSource. + */ + @java.lang.Override + public int getImageSourceValue() { + return imageSource_; } - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchParams other = - (com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchParams) - obj; - if (getMaxReturnResults() != other.getMaxReturnResults()) return false; - if (!getFilter().equals(other.getFilter())) return false; - if (hasBoostSpec() != other.hasBoostSpec()) return false; - if (hasBoostSpec()) { - if (!getBoostSpec().equals(other.getBoostSpec())) return false; - } - if (!getOrderBy().equals(other.getOrderBy())) return false; - if (searchResultMode_ != other.searchResultMode_) return false; - if (!getDataStoreSpecsList().equals(other.getDataStoreSpecsList())) return false; - if (hasNaturalLanguageQueryUnderstandingSpec() - != other.hasNaturalLanguageQueryUnderstandingSpec()) return false; - if (hasNaturalLanguageQueryUnderstandingSpec()) { - if (!getNaturalLanguageQueryUnderstandingSpec() - .equals(other.getNaturalLanguageQueryUnderstandingSpec())) return false; + /** + * + * + *
            +         * Optional. Source of image returned in the answer.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec.MultimodalSpec.ImageSource image_source = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The enum numeric value on the wire for imageSource to set. + * @return This builder for chaining. + */ + public Builder setImageSourceValue(int value) { + imageSource_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; } - 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) + MAX_RETURN_RESULTS_FIELD_NUMBER; - hash = (53 * hash) + getMaxReturnResults(); - hash = (37 * hash) + FILTER_FIELD_NUMBER; - hash = (53 * hash) + getFilter().hashCode(); - if (hasBoostSpec()) { - hash = (37 * hash) + BOOST_SPEC_FIELD_NUMBER; - hash = (53 * hash) + getBoostSpec().hashCode(); + /** + * + * + *
            +         * Optional. Source of image returned in the answer.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec.MultimodalSpec.ImageSource image_source = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The imageSource. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec + .MultimodalSpec.ImageSource + getImageSource() { + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec + .MultimodalSpec.ImageSource + result = + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec + .MultimodalSpec.ImageSource.forNumber(imageSource_); + return result == null + ? com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec + .MultimodalSpec.ImageSource.UNRECOGNIZED + : result; } - hash = (37 * hash) + ORDER_BY_FIELD_NUMBER; - hash = (53 * hash) + getOrderBy().hashCode(); - hash = (37 * hash) + SEARCH_RESULT_MODE_FIELD_NUMBER; - hash = (53 * hash) + searchResultMode_; - if (getDataStoreSpecsCount() > 0) { - hash = (37 * hash) + DATA_STORE_SPECS_FIELD_NUMBER; - hash = (53 * hash) + getDataStoreSpecsList().hashCode(); + + /** + * + * + *
            +         * Optional. Source of image returned in the answer.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec.MultimodalSpec.ImageSource image_source = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The imageSource to set. + * @return This builder for chaining. + */ + public Builder setImageSource( + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec + .MultimodalSpec.ImageSource + value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + imageSource_ = value.getNumber(); + onChanged(); + return this; } - if (hasNaturalLanguageQueryUnderstandingSpec()) { - hash = (37 * hash) + NATURAL_LANGUAGE_QUERY_UNDERSTANDING_SPEC_FIELD_NUMBER; - hash = (53 * hash) + getNaturalLanguageQueryUnderstandingSpec().hashCode(); + + /** + * + * + *
            +         * Optional. Source of image returned in the answer.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec.MultimodalSpec.ImageSource image_source = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearImageSource() { + bitField0_ = (bitField0_ & ~0x00000001); + imageSource_ = 0; + onChanged(); + return this; } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchParams - parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec.MultimodalSpec) } - public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchParams - parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec.MultimodalSpec) + private static final com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest + .AnswerGenerationSpec.MultimodalSpec + DEFAULT_INSTANCE; - public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchParams - parseFrom(com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); + static { + DEFAULT_INSTANCE = + new com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec + .MultimodalSpec(); } - public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchParams - 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.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec + .MultimodalSpec + getDefaultInstance() { + return DEFAULT_INSTANCE; } - public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchParams - parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public MultimodalSpec parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; - public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchParams - parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); + public static com.google.protobuf.Parser parser() { + return PARSER; } - public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchParams - parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; } - public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchParams - parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec + .MultimodalSpec + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; } + } - public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchParams - parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } + private int bitField0_; + public static final int MODEL_SPEC_FIELD_NUMBER = 1; + private com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec + .ModelSpec + modelSpec_; - public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchParams - parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } + /** + * + * + *
            +     * Answer generation model specification.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec.ModelSpec model_spec = 1; + * + * + * @return Whether the modelSpec field is set. + */ + @java.lang.Override + public boolean hasModelSpec() { + return ((bitField0_ & 0x00000001) != 0); + } - public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchParams - parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } + /** + * + * + *
            +     * Answer generation model specification.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec.ModelSpec model_spec = 1; + * + * + * @return The modelSpec. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec.ModelSpec + getModelSpec() { + return modelSpec_ == null + ? com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec + .ModelSpec.getDefaultInstance() + : modelSpec_; + } - public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchParams - parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } + /** + * + * + *
            +     * Answer generation model specification.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec.ModelSpec model_spec = 1; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec + .ModelSpecOrBuilder + getModelSpecOrBuilder() { + return modelSpec_ == null + ? com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec + .ModelSpec.getDefaultInstance() + : modelSpec_; + } - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } + public static final int PROMPT_SPEC_FIELD_NUMBER = 2; + private com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec + .PromptSpec + promptSpec_; - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } + /** + * + * + *
            +     * Answer generation prompt specification.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec.PromptSpec prompt_spec = 2; + * + * + * @return Whether the promptSpec field is set. + */ + @java.lang.Override + public boolean hasPromptSpec() { + return ((bitField0_ & 0x00000002) != 0); + } - public static Builder newBuilder( - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchParams - prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } + /** + * + * + *
            +     * Answer generation prompt specification.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec.PromptSpec prompt_spec = 2; + * + * + * @return The promptSpec. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec + .PromptSpec + getPromptSpec() { + return promptSpec_ == null + ? com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec + .PromptSpec.getDefaultInstance() + : promptSpec_; + } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } + /** + * + * + *
            +     * Answer generation prompt specification.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec.PromptSpec prompt_spec = 2; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec + .PromptSpecOrBuilder + getPromptSpecOrBuilder() { + return promptSpec_ == null + ? com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec + .PromptSpec.getDefaultInstance() + : promptSpec_; + } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } + public static final int INCLUDE_CITATIONS_FIELD_NUMBER = 3; + private boolean includeCitations_ = false; - /** - * - * - *
            -       * Search parameters.
            -       * 
            - * - * Protobuf type {@code - * google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchParams} - */ - public static final class Builder - extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchParams) - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchParamsOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.discoveryengine.v1beta.ConversationalSearchServiceProto - .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_SearchSpec_SearchParams_descriptor; - } + /** + * + * + *
            +     * Specifies whether to include citation metadata in the answer. The default
            +     * value is `false`.
            +     * 
            + * + * bool include_citations = 3; + * + * @return The includeCitations. + */ + @java.lang.Override + public boolean getIncludeCitations() { + return includeCitations_; + } - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.discoveryengine.v1beta.ConversationalSearchServiceProto - .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_SearchSpec_SearchParams_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchParams - .class, - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchParams - .Builder.class); - } + public static final int ANSWER_LANGUAGE_CODE_FIELD_NUMBER = 4; - // Construct using - // com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchParams.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + @SuppressWarnings("serial") + private volatile java.lang.Object answerLanguageCode_ = ""; - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } + /** + * + * + *
            +     * Language code for Answer. Use language tags defined by
            +     * [BCP47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt).
            +     * Note: This is an experimental feature.
            +     * 
            + * + * string answer_language_code = 4; + * + * @return The answerLanguageCode. + */ + @java.lang.Override + public java.lang.String getAnswerLanguageCode() { + java.lang.Object ref = answerLanguageCode_; + 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(); + answerLanguageCode_ = s; + return s; + } + } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - internalGetBoostSpecFieldBuilder(); - internalGetDataStoreSpecsFieldBuilder(); - internalGetNaturalLanguageQueryUnderstandingSpecFieldBuilder(); - } - } + /** + * + * + *
            +     * Language code for Answer. Use language tags defined by
            +     * [BCP47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt).
            +     * Note: This is an experimental feature.
            +     * 
            + * + * string answer_language_code = 4; + * + * @return The bytes for answerLanguageCode. + */ + @java.lang.Override + public com.google.protobuf.ByteString getAnswerLanguageCodeBytes() { + java.lang.Object ref = answerLanguageCode_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + answerLanguageCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - maxReturnResults_ = 0; - filter_ = ""; - boostSpec_ = null; - if (boostSpecBuilder_ != null) { - boostSpecBuilder_.dispose(); - boostSpecBuilder_ = null; - } - orderBy_ = ""; - searchResultMode_ = 0; - if (dataStoreSpecsBuilder_ == null) { - dataStoreSpecs_ = java.util.Collections.emptyList(); - } else { - dataStoreSpecs_ = null; - dataStoreSpecsBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000020); - naturalLanguageQueryUnderstandingSpec_ = null; - if (naturalLanguageQueryUnderstandingSpecBuilder_ != null) { - naturalLanguageQueryUnderstandingSpecBuilder_.dispose(); - naturalLanguageQueryUnderstandingSpecBuilder_ = null; - } - return this; - } + public static final int IGNORE_ADVERSARIAL_QUERY_FIELD_NUMBER = 5; + private boolean ignoreAdversarialQuery_ = false; - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.discoveryengine.v1beta.ConversationalSearchServiceProto - .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_SearchSpec_SearchParams_descriptor; - } + /** + * + * + *
            +     * Specifies whether to filter out adversarial queries. The default value
            +     * is `false`.
            +     *
            +     * Google employs search-query classification to detect adversarial
            +     * queries. No answer is returned if the search query is classified as an
            +     * adversarial query. For example, a user might ask a question regarding
            +     * negative comments about the company or submit a query designed to
            +     * generate unsafe, policy-violating output. If this field is set to
            +     * `true`, we skip generating answers for adversarial queries and return
            +     * fallback messages instead.
            +     * 
            + * + * bool ignore_adversarial_query = 5; + * + * @return The ignoreAdversarialQuery. + */ + @java.lang.Override + public boolean getIgnoreAdversarialQuery() { + return ignoreAdversarialQuery_; + } - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchParams - getDefaultInstanceForType() { - return com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchParams - .getDefaultInstance(); - } + public static final int IGNORE_NON_ANSWER_SEEKING_QUERY_FIELD_NUMBER = 6; + private boolean ignoreNonAnswerSeekingQuery_ = false; - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchParams - build() { - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchParams - result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } + /** + * + * + *
            +     * Specifies whether to filter out queries that are not answer-seeking.
            +     * The default value is `false`.
            +     *
            +     * Google employs search-query classification to detect answer-seeking
            +     * queries. No answer is returned if the search query is classified as a
            +     * non-answer seeking query. If this field is set to `true`, we skip
            +     * generating answers for non-answer seeking queries and return
            +     * fallback messages instead.
            +     * 
            + * + * bool ignore_non_answer_seeking_query = 6; + * + * @return The ignoreNonAnswerSeekingQuery. + */ + @java.lang.Override + public boolean getIgnoreNonAnswerSeekingQuery() { + return ignoreNonAnswerSeekingQuery_; + } - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchParams - buildPartial() { - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchParams - result = - new com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchParams(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } + public static final int IGNORE_LOW_RELEVANT_CONTENT_FIELD_NUMBER = 7; + private boolean ignoreLowRelevantContent_ = false; - private void buildPartialRepeatedFields( - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchParams - result) { - if (dataStoreSpecsBuilder_ == null) { - if (((bitField0_ & 0x00000020) != 0)) { - dataStoreSpecs_ = java.util.Collections.unmodifiableList(dataStoreSpecs_); - bitField0_ = (bitField0_ & ~0x00000020); - } - result.dataStoreSpecs_ = dataStoreSpecs_; - } else { - result.dataStoreSpecs_ = dataStoreSpecsBuilder_.build(); - } - } + /** + * + * + *
            +     * Specifies whether to filter out queries that have low relevance.
            +     *
            +     * If this field is set to `false`, all search results are used regardless
            +     * of relevance to generate answers. If set to `true` or unset, the behavior
            +     * will be determined automatically by the service.
            +     * 
            + * + * optional bool ignore_low_relevant_content = 7; + * + * @return Whether the ignoreLowRelevantContent field is set. + */ + @java.lang.Override + public boolean hasIgnoreLowRelevantContent() { + return ((bitField0_ & 0x00000004) != 0); + } - private void buildPartial0( - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchParams - result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.maxReturnResults_ = maxReturnResults_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.filter_ = filter_; - } - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000004) != 0)) { - result.boostSpec_ = boostSpecBuilder_ == null ? boostSpec_ : boostSpecBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.orderBy_ = orderBy_; - } - if (((from_bitField0_ & 0x00000010) != 0)) { - result.searchResultMode_ = searchResultMode_; - } - if (((from_bitField0_ & 0x00000040) != 0)) { - result.naturalLanguageQueryUnderstandingSpec_ = - naturalLanguageQueryUnderstandingSpecBuilder_ == null - ? naturalLanguageQueryUnderstandingSpec_ - : naturalLanguageQueryUnderstandingSpecBuilder_.build(); - to_bitField0_ |= 0x00000002; - } - result.bitField0_ |= to_bitField0_; - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other - instanceof - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchParams) { - return mergeFrom( - (com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchParams) - other); - } else { - super.mergeFrom(other); - return this; - } - } + /** + * + * + *
            +     * Specifies whether to filter out queries that have low relevance.
            +     *
            +     * If this field is set to `false`, all search results are used regardless
            +     * of relevance to generate answers. If set to `true` or unset, the behavior
            +     * will be determined automatically by the service.
            +     * 
            + * + * optional bool ignore_low_relevant_content = 7; + * + * @return The ignoreLowRelevantContent. + */ + @java.lang.Override + public boolean getIgnoreLowRelevantContent() { + return ignoreLowRelevantContent_; + } - public Builder mergeFrom( - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchParams - other) { - if (other - == com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchParams - .getDefaultInstance()) return this; - if (other.getMaxReturnResults() != 0) { - setMaxReturnResults(other.getMaxReturnResults()); - } - if (!other.getFilter().isEmpty()) { - filter_ = other.filter_; - bitField0_ |= 0x00000002; - onChanged(); - } - if (other.hasBoostSpec()) { - mergeBoostSpec(other.getBoostSpec()); - } - if (!other.getOrderBy().isEmpty()) { - orderBy_ = other.orderBy_; - bitField0_ |= 0x00000008; - onChanged(); - } - if (other.searchResultMode_ != 0) { - setSearchResultModeValue(other.getSearchResultModeValue()); - } - if (dataStoreSpecsBuilder_ == null) { - if (!other.dataStoreSpecs_.isEmpty()) { - if (dataStoreSpecs_.isEmpty()) { - dataStoreSpecs_ = other.dataStoreSpecs_; - bitField0_ = (bitField0_ & ~0x00000020); - } else { - ensureDataStoreSpecsIsMutable(); - dataStoreSpecs_.addAll(other.dataStoreSpecs_); - } - onChanged(); - } - } else { - if (!other.dataStoreSpecs_.isEmpty()) { - if (dataStoreSpecsBuilder_.isEmpty()) { - dataStoreSpecsBuilder_.dispose(); - dataStoreSpecsBuilder_ = null; - dataStoreSpecs_ = other.dataStoreSpecs_; - bitField0_ = (bitField0_ & ~0x00000020); - dataStoreSpecsBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders - ? internalGetDataStoreSpecsFieldBuilder() - : null; - } else { - dataStoreSpecsBuilder_.addAllMessages(other.dataStoreSpecs_); - } - } - } - if (other.hasNaturalLanguageQueryUnderstandingSpec()) { - mergeNaturalLanguageQueryUnderstandingSpec( - other.getNaturalLanguageQueryUnderstandingSpec()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } + public static final int IGNORE_JAIL_BREAKING_QUERY_FIELD_NUMBER = 8; + private boolean ignoreJailBreakingQuery_ = false; - @java.lang.Override - public final boolean isInitialized() { - return true; - } + /** + * + * + *
            +     * Optional. Specifies whether to filter out jail-breaking queries. The
            +     * default value is `false`.
            +     *
            +     * Google employs search-query classification to detect jail-breaking
            +     * queries. No summary is returned if the search query is classified as a
            +     * jail-breaking query. A user might add instructions to the query to
            +     * change the tone, style, language, content of the answer, or ask the
            +     * model to act as a different entity, e.g. "Reply in the tone of a
            +     * competing company's CEO". If this field is set to `true`, we skip
            +     * generating summaries for jail-breaking queries and return fallback
            +     * messages instead.
            +     * 
            + * + * bool ignore_jail_breaking_query = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The ignoreJailBreakingQuery. + */ + @java.lang.Override + public boolean getIgnoreJailBreakingQuery() { + return ignoreJailBreakingQuery_; + } - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: - { - maxReturnResults_ = input.readInt32(); - bitField0_ |= 0x00000001; - break; - } // case 8 - case 18: - { - filter_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 26: - { - input.readMessage( - internalGetBoostSpecFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000004; - break; - } // case 26 - case 34: - { - orderBy_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - break; - } // case 34 - case 40: - { - searchResultMode_ = input.readEnum(); - bitField0_ |= 0x00000010; - break; - } // case 40 - case 58: - { - com.google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec m = - input.readMessage( - com.google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec - .parser(), - extensionRegistry); - if (dataStoreSpecsBuilder_ == null) { - ensureDataStoreSpecsIsMutable(); - dataStoreSpecs_.add(m); - } else { - dataStoreSpecsBuilder_.addMessage(m); - } - break; - } // case 58 - case 66: - { - input.readMessage( - internalGetNaturalLanguageQueryUnderstandingSpecFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000040; - break; - } // case 66 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } + public static final int MULTIMODAL_SPEC_FIELD_NUMBER = 9; + private com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec + .MultimodalSpec + multimodalSpec_; - private int bitField0_; + /** + * + * + *
            +     * Optional. Multimodal specification.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec.MultimodalSpec multimodal_spec = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the multimodalSpec field is set. + */ + @java.lang.Override + public boolean hasMultimodalSpec() { + return ((bitField0_ & 0x00000008) != 0); + } - private int maxReturnResults_; + /** + * + * + *
            +     * Optional. Multimodal specification.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec.MultimodalSpec multimodal_spec = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The multimodalSpec. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec + .MultimodalSpec + getMultimodalSpec() { + return multimodalSpec_ == null + ? com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec + .MultimodalSpec.getDefaultInstance() + : multimodalSpec_; + } - /** - * - * - *
            -         * Number of search results to return.
            -         * The default value is 10.
            -         * 
            - * - * int32 max_return_results = 1; - * - * @return The maxReturnResults. - */ - @java.lang.Override - public int getMaxReturnResults() { - return maxReturnResults_; - } - - /** - * - * - *
            -         * Number of search results to return.
            -         * The default value is 10.
            -         * 
            - * - * int32 max_return_results = 1; - * - * @param value The maxReturnResults to set. - * @return This builder for chaining. - */ - public Builder setMaxReturnResults(int value) { + /** + * + * + *
            +     * Optional. Multimodal specification.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec.MultimodalSpec multimodal_spec = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec + .MultimodalSpecOrBuilder + getMultimodalSpecOrBuilder() { + return multimodalSpec_ == null + ? com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec + .MultimodalSpec.getDefaultInstance() + : multimodalSpec_; + } - maxReturnResults_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } + private byte memoizedIsInitialized = -1; - /** - * - * - *
            -         * Number of search results to return.
            -         * The default value is 10.
            -         * 
            - * - * int32 max_return_results = 1; - * - * @return This builder for chaining. - */ - public Builder clearMaxReturnResults() { - bitField0_ = (bitField0_ & ~0x00000001); - maxReturnResults_ = 0; - onChanged(); - return this; - } + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; - private java.lang.Object filter_ = ""; + memoizedIsInitialized = 1; + return true; + } - /** - * - * - *
            -         * The filter syntax consists of an expression language for constructing
            -         * a predicate from one or more fields of the documents being filtered.
            -         * Filter expression is case-sensitive. This will be used to filter
            -         * search results which may affect the Answer response.
            -         *
            -         * If this field is unrecognizable, an  `INVALID_ARGUMENT`  is returned.
            -         *
            -         * Filtering in Vertex AI Search is done by mapping the LHS filter key
            -         * to a key property defined in the Vertex AI Search backend -- this
            -         * mapping is defined by the customer in their schema. For example a
            -         * media customers might have a field 'name' in their schema. In this
            -         * case the filter would look like this: filter --> name:'ANY("king
            -         * kong")'
            -         *
            -         * For more information about filtering including syntax and filter
            -         * operators, see
            -         * [Filter](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata)
            -         * 
            - * - * string filter = 2; - * - * @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; - } - } + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getModelSpec()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(2, getPromptSpec()); + } + if (includeCitations_ != false) { + output.writeBool(3, includeCitations_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(answerLanguageCode_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, answerLanguageCode_); + } + if (ignoreAdversarialQuery_ != false) { + output.writeBool(5, ignoreAdversarialQuery_); + } + if (ignoreNonAnswerSeekingQuery_ != false) { + output.writeBool(6, ignoreNonAnswerSeekingQuery_); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeBool(7, ignoreLowRelevantContent_); + } + if (ignoreJailBreakingQuery_ != false) { + output.writeBool(8, ignoreJailBreakingQuery_); + } + if (((bitField0_ & 0x00000008) != 0)) { + output.writeMessage(9, getMultimodalSpec()); + } + getUnknownFields().writeTo(output); + } - /** - * - * - *
            -         * The filter syntax consists of an expression language for constructing
            -         * a predicate from one or more fields of the documents being filtered.
            -         * Filter expression is case-sensitive. This will be used to filter
            -         * search results which may affect the Answer response.
            -         *
            -         * If this field is unrecognizable, an  `INVALID_ARGUMENT`  is returned.
            -         *
            -         * Filtering in Vertex AI Search is done by mapping the LHS filter key
            -         * to a key property defined in the Vertex AI Search backend -- this
            -         * mapping is defined by the customer in their schema. For example a
            -         * media customers might have a field 'name' in their schema. In this
            -         * case the filter would look like this: filter --> name:'ANY("king
            -         * kong")'
            -         *
            -         * For more information about filtering including syntax and filter
            -         * operators, see
            -         * [Filter](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata)
            -         * 
            - * - * string filter = 2; - * - * @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; - } - } + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; - /** - * - * - *
            -         * The filter syntax consists of an expression language for constructing
            -         * a predicate from one or more fields of the documents being filtered.
            -         * Filter expression is case-sensitive. This will be used to filter
            -         * search results which may affect the Answer response.
            -         *
            -         * If this field is unrecognizable, an  `INVALID_ARGUMENT`  is returned.
            -         *
            -         * Filtering in Vertex AI Search is done by mapping the LHS filter key
            -         * to a key property defined in the Vertex AI Search backend -- this
            -         * mapping is defined by the customer in their schema. For example a
            -         * media customers might have a field 'name' in their schema. In this
            -         * case the filter would look like this: filter --> name:'ANY("king
            -         * kong")'
            -         *
            -         * For more information about filtering including syntax and filter
            -         * operators, see
            -         * [Filter](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata)
            -         * 
            - * - * string filter = 2; - * - * @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; - } + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getModelSpec()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getPromptSpec()); + } + if (includeCitations_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, includeCitations_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(answerLanguageCode_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, answerLanguageCode_); + } + if (ignoreAdversarialQuery_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(5, ignoreAdversarialQuery_); + } + if (ignoreNonAnswerSeekingQuery_ != false) { + size += + com.google.protobuf.CodedOutputStream.computeBoolSize(6, ignoreNonAnswerSeekingQuery_); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(7, ignoreLowRelevantContent_); + } + if (ignoreJailBreakingQuery_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(8, ignoreJailBreakingQuery_); + } + if (((bitField0_ & 0x00000008) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(9, getMultimodalSpec()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } - /** - * - * - *
            -         * The filter syntax consists of an expression language for constructing
            -         * a predicate from one or more fields of the documents being filtered.
            -         * Filter expression is case-sensitive. This will be used to filter
            -         * search results which may affect the Answer response.
            -         *
            -         * If this field is unrecognizable, an  `INVALID_ARGUMENT`  is returned.
            -         *
            -         * Filtering in Vertex AI Search is done by mapping the LHS filter key
            -         * to a key property defined in the Vertex AI Search backend -- this
            -         * mapping is defined by the customer in their schema. For example a
            -         * media customers might have a field 'name' in their schema. In this
            -         * case the filter would look like this: filter --> name:'ANY("king
            -         * kong")'
            -         *
            -         * For more information about filtering including syntax and filter
            -         * operators, see
            -         * [Filter](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata)
            -         * 
            - * - * string filter = 2; - * - * @return This builder for chaining. - */ - public Builder clearFilter() { - filter_ = getDefaultInstance().getFilter(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec other = + (com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec) obj; - /** - * - * - *
            -         * The filter syntax consists of an expression language for constructing
            -         * a predicate from one or more fields of the documents being filtered.
            -         * Filter expression is case-sensitive. This will be used to filter
            -         * search results which may affect the Answer response.
            -         *
            -         * If this field is unrecognizable, an  `INVALID_ARGUMENT`  is returned.
            -         *
            -         * Filtering in Vertex AI Search is done by mapping the LHS filter key
            -         * to a key property defined in the Vertex AI Search backend -- this
            -         * mapping is defined by the customer in their schema. For example a
            -         * media customers might have a field 'name' in their schema. In this
            -         * case the filter would look like this: filter --> name:'ANY("king
            -         * kong")'
            -         *
            -         * For more information about filtering including syntax and filter
            -         * operators, see
            -         * [Filter](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata)
            -         * 
            - * - * string filter = 2; - * - * @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; - } + if (hasModelSpec() != other.hasModelSpec()) return false; + if (hasModelSpec()) { + if (!getModelSpec().equals(other.getModelSpec())) return false; + } + if (hasPromptSpec() != other.hasPromptSpec()) return false; + if (hasPromptSpec()) { + if (!getPromptSpec().equals(other.getPromptSpec())) return false; + } + if (getIncludeCitations() != other.getIncludeCitations()) return false; + if (!getAnswerLanguageCode().equals(other.getAnswerLanguageCode())) return false; + if (getIgnoreAdversarialQuery() != other.getIgnoreAdversarialQuery()) return false; + if (getIgnoreNonAnswerSeekingQuery() != other.getIgnoreNonAnswerSeekingQuery()) return false; + if (hasIgnoreLowRelevantContent() != other.hasIgnoreLowRelevantContent()) return false; + if (hasIgnoreLowRelevantContent()) { + if (getIgnoreLowRelevantContent() != other.getIgnoreLowRelevantContent()) return false; + } + if (getIgnoreJailBreakingQuery() != other.getIgnoreJailBreakingQuery()) return false; + if (hasMultimodalSpec() != other.hasMultimodalSpec()) return false; + if (hasMultimodalSpec()) { + if (!getMultimodalSpec().equals(other.getMultimodalSpec())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } - private com.google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec boostSpec_; - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec, - com.google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec.Builder, - com.google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpecOrBuilder> - boostSpecBuilder_; + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasModelSpec()) { + hash = (37 * hash) + MODEL_SPEC_FIELD_NUMBER; + hash = (53 * hash) + getModelSpec().hashCode(); + } + if (hasPromptSpec()) { + hash = (37 * hash) + PROMPT_SPEC_FIELD_NUMBER; + hash = (53 * hash) + getPromptSpec().hashCode(); + } + hash = (37 * hash) + INCLUDE_CITATIONS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getIncludeCitations()); + hash = (37 * hash) + ANSWER_LANGUAGE_CODE_FIELD_NUMBER; + hash = (53 * hash) + getAnswerLanguageCode().hashCode(); + hash = (37 * hash) + IGNORE_ADVERSARIAL_QUERY_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getIgnoreAdversarialQuery()); + hash = (37 * hash) + IGNORE_NON_ANSWER_SEEKING_QUERY_FIELD_NUMBER; + hash = + (53 * hash) + com.google.protobuf.Internal.hashBoolean(getIgnoreNonAnswerSeekingQuery()); + if (hasIgnoreLowRelevantContent()) { + hash = (37 * hash) + IGNORE_LOW_RELEVANT_CONTENT_FIELD_NUMBER; + hash = + (53 * hash) + com.google.protobuf.Internal.hashBoolean(getIgnoreLowRelevantContent()); + } + hash = (37 * hash) + IGNORE_JAIL_BREAKING_QUERY_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getIgnoreJailBreakingQuery()); + if (hasMultimodalSpec()) { + hash = (37 * hash) + MULTIMODAL_SPEC_FIELD_NUMBER; + hash = (53 * hash) + getMultimodalSpec().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } - /** - * - * - *
            -         * Boost specification to boost certain documents in search results which
            -         * may affect the answer query response. For more information on boosting,
            -         * see [Boosting](https://cloud.google.com/retail/docs/boosting#boost)
            -         * 
            - * - * .google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec boost_spec = 3; - * - * @return Whether the boostSpec field is set. - */ - public boolean hasBoostSpec() { - return ((bitField0_ & 0x00000004) != 0); - } + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - /** - * - * - *
            -         * Boost specification to boost certain documents in search results which
            -         * may affect the answer query response. For more information on boosting,
            -         * see [Boosting](https://cloud.google.com/retail/docs/boosting#boost)
            -         * 
            - * - * .google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec boost_spec = 3; - * - * @return The boostSpec. - */ - public com.google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec getBoostSpec() { - if (boostSpecBuilder_ == null) { - return boostSpec_ == null - ? com.google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec - .getDefaultInstance() - : boostSpec_; - } else { - return boostSpecBuilder_.getMessage(); - } - } + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - /** - * - * - *
            -         * Boost specification to boost certain documents in search results which
            -         * may affect the answer query response. For more information on boosting,
            -         * see [Boosting](https://cloud.google.com/retail/docs/boosting#boost)
            -         * 
            - * - * .google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec boost_spec = 3; - */ - public Builder setBoostSpec( - com.google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec value) { - if (boostSpecBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - boostSpec_ = value; - } else { - boostSpecBuilder_.setMessage(value); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - /** - * - * - *
            -         * Boost specification to boost certain documents in search results which
            -         * may affect the answer query response. For more information on boosting,
            -         * see [Boosting](https://cloud.google.com/retail/docs/boosting#boost)
            -         * 
            - * - * .google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec boost_spec = 3; - */ - public Builder setBoostSpec( - com.google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec.Builder - builderForValue) { - if (boostSpecBuilder_ == null) { - boostSpec_ = builderForValue.build(); - } else { - boostSpecBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - /** - * - * - *
            -         * Boost specification to boost certain documents in search results which
            -         * may affect the answer query response. For more information on boosting,
            -         * see [Boosting](https://cloud.google.com/retail/docs/boosting#boost)
            -         * 
            - * - * .google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec boost_spec = 3; - */ - public Builder mergeBoostSpec( - com.google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec value) { - if (boostSpecBuilder_ == null) { - if (((bitField0_ & 0x00000004) != 0) - && boostSpec_ != null - && boostSpec_ - != com.google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec - .getDefaultInstance()) { - getBoostSpecBuilder().mergeFrom(value); - } else { - boostSpec_ = value; - } - } else { - boostSpecBuilder_.mergeFrom(value); - } - if (boostSpec_ != null) { - bitField0_ |= 0x00000004; - onChanged(); - } - return this; - } + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - /** - * - * - *
            -         * Boost specification to boost certain documents in search results which
            -         * may affect the answer query response. For more information on boosting,
            -         * see [Boosting](https://cloud.google.com/retail/docs/boosting#boost)
            -         * 
            - * - * .google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec boost_spec = 3; - */ - public Builder clearBoostSpec() { - bitField0_ = (bitField0_ & ~0x00000004); - boostSpec_ = null; - if (boostSpecBuilder_ != null) { - boostSpecBuilder_.dispose(); - boostSpecBuilder_ = null; - } - onChanged(); - return this; - } + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - /** - * - * - *
            -         * Boost specification to boost certain documents in search results which
            -         * may affect the answer query response. For more information on boosting,
            -         * see [Boosting](https://cloud.google.com/retail/docs/boosting#boost)
            -         * 
            - * - * .google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec boost_spec = 3; - */ - public com.google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec.Builder - getBoostSpecBuilder() { - bitField0_ |= 0x00000004; - onChanged(); - return internalGetBoostSpecFieldBuilder().getBuilder(); - } + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } - /** - * - * - *
            -         * Boost specification to boost certain documents in search results which
            -         * may affect the answer query response. For more information on boosting,
            -         * see [Boosting](https://cloud.google.com/retail/docs/boosting#boost)
            -         * 
            - * - * .google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec boost_spec = 3; - */ - public com.google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpecOrBuilder - getBoostSpecOrBuilder() { - if (boostSpecBuilder_ != null) { - return boostSpecBuilder_.getMessageOrBuilder(); - } else { - return boostSpec_ == null - ? com.google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec - .getDefaultInstance() - : boostSpec_; - } - } + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } - /** - * - * - *
            -         * Boost specification to boost certain documents in search results which
            -         * may affect the answer query response. For more information on boosting,
            -         * see [Boosting](https://cloud.google.com/retail/docs/boosting#boost)
            -         * 
            - * - * .google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec boost_spec = 3; - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec, - com.google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec.Builder, - com.google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpecOrBuilder> - internalGetBoostSpecFieldBuilder() { - if (boostSpecBuilder_ == null) { - boostSpecBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec, - com.google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec.Builder, - com.google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpecOrBuilder>( - getBoostSpec(), getParentForChildren(), isClean()); - boostSpec_ = null; - } - return boostSpecBuilder_; - } + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } - private java.lang.Object orderBy_ = ""; + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } - /** - * - * - *
            -         * The order in which documents are returned. Documents can be ordered
            -         * by a field in an
            -         * [Document][google.cloud.discoveryengine.v1beta.Document] object. Leave
            -         * it unset if ordered by relevance. `order_by` expression is
            -         * case-sensitive. For more information on ordering, see
            -         * [Ordering](https://cloud.google.com/retail/docs/filter-and-order#order)
            -         *
            -         * If this field is unrecognizable, an `INVALID_ARGUMENT` is returned.
            -         * 
            - * - * string order_by = 4; - * - * @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; - } - } + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } - /** - * - * - *
            -         * The order in which documents are returned. Documents can be ordered
            -         * by a field in an
            -         * [Document][google.cloud.discoveryengine.v1beta.Document] object. Leave
            -         * it unset if ordered by relevance. `order_by` expression is
            -         * case-sensitive. For more information on ordering, see
            -         * [Ordering](https://cloud.google.com/retail/docs/filter-and-order#order)
            -         *
            -         * If this field is unrecognizable, an `INVALID_ARGUMENT` is returned.
            -         * 
            - * - * string order_by = 4; - * - * @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; - } - } + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } - /** - * - * - *
            -         * The order in which documents are returned. Documents can be ordered
            -         * by a field in an
            -         * [Document][google.cloud.discoveryengine.v1beta.Document] object. Leave
            -         * it unset if ordered by relevance. `order_by` expression is
            -         * case-sensitive. For more information on ordering, see
            -         * [Ordering](https://cloud.google.com/retail/docs/filter-and-order#order)
            -         *
            -         * If this field is unrecognizable, an `INVALID_ARGUMENT` is returned.
            -         * 
            - * - * string order_by = 4; - * - * @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_ |= 0x00000008; - onChanged(); - return this; - } + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } - /** - * - * - *
            -         * The order in which documents are returned. Documents can be ordered
            -         * by a field in an
            -         * [Document][google.cloud.discoveryengine.v1beta.Document] object. Leave
            -         * it unset if ordered by relevance. `order_by` expression is
            -         * case-sensitive. For more information on ordering, see
            -         * [Ordering](https://cloud.google.com/retail/docs/filter-and-order#order)
            -         *
            -         * If this field is unrecognizable, an `INVALID_ARGUMENT` is returned.
            -         * 
            - * - * string order_by = 4; - * - * @return This builder for chaining. - */ - public Builder clearOrderBy() { - orderBy_ = getDefaultInstance().getOrderBy(); - bitField0_ = (bitField0_ & ~0x00000008); - onChanged(); - return this; - } - - /** - * - * - *
            -         * The order in which documents are returned. Documents can be ordered
            -         * by a field in an
            -         * [Document][google.cloud.discoveryengine.v1beta.Document] object. Leave
            -         * it unset if ordered by relevance. `order_by` expression is
            -         * case-sensitive. For more information on ordering, see
            -         * [Ordering](https://cloud.google.com/retail/docs/filter-and-order#order)
            -         *
            -         * If this field is unrecognizable, an `INVALID_ARGUMENT` is returned.
            -         * 
            - * - * string order_by = 4; - * - * @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_ |= 0x00000008; - onChanged(); - return this; - } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } - private int searchResultMode_ = 0; + public static Builder newBuilder( + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } - /** - * - * - *
            -         * Specifies the search result mode. If unspecified, the
            -         * search result mode defaults to `DOCUMENTS`.
            -         * See [parse and chunk
            -         * documents](https://cloud.google.com/generative-ai-app-builder/docs/parse-chunk-documents)
            -         * 
            - * - * - * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SearchResultMode search_result_mode = 5; - * - * - * @return The enum numeric value on the wire for searchResultMode. - */ - @java.lang.Override - public int getSearchResultModeValue() { - return searchResultMode_; - } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } - /** - * - * - *
            -         * Specifies the search result mode. If unspecified, the
            -         * search result mode defaults to `DOCUMENTS`.
            -         * See [parse and chunk
            -         * documents](https://cloud.google.com/generative-ai-app-builder/docs/parse-chunk-documents)
            -         * 
            - * - * - * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SearchResultMode search_result_mode = 5; - * - * - * @param value The enum numeric value on the wire for searchResultMode to set. - * @return This builder for chaining. - */ - public Builder setSearchResultModeValue(int value) { - searchResultMode_ = value; - bitField0_ |= 0x00000010; - onChanged(); - return this; - } + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } - /** - * - * - *
            -         * Specifies the search result mode. If unspecified, the
            -         * search result mode defaults to `DOCUMENTS`.
            -         * See [parse and chunk
            -         * documents](https://cloud.google.com/generative-ai-app-builder/docs/parse-chunk-documents)
            -         * 
            - * - * - * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SearchResultMode search_result_mode = 5; - * - * - * @return The searchResultMode. - */ - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec - .SearchResultMode - getSearchResultMode() { - com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SearchResultMode - result = - com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec - .SearchResultMode.forNumber(searchResultMode_); - return result == null - ? com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec - .SearchResultMode.UNRECOGNIZED - : result; - } + /** + * + * + *
            +     * Answer generation specification.
            +     * 
            + * + * Protobuf type {@code + * google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec) + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpecOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.ConversationalSearchServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_AnswerGenerationSpec_descriptor; + } - /** - * - * - *
            -         * Specifies the search result mode. If unspecified, the
            -         * search result mode defaults to `DOCUMENTS`.
            -         * See [parse and chunk
            -         * documents](https://cloud.google.com/generative-ai-app-builder/docs/parse-chunk-documents)
            -         * 
            - * - * - * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SearchResultMode search_result_mode = 5; - * - * - * @param value The searchResultMode to set. - * @return This builder for chaining. - */ - public Builder setSearchResultMode( - com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SearchResultMode - value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000010; - searchResultMode_ = value.getNumber(); - onChanged(); - return this; - } + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.ConversationalSearchServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_AnswerGenerationSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec + .class, + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec + .Builder.class); + } - /** - * - * - *
            -         * Specifies the search result mode. If unspecified, the
            -         * search result mode defaults to `DOCUMENTS`.
            -         * See [parse and chunk
            -         * documents](https://cloud.google.com/generative-ai-app-builder/docs/parse-chunk-documents)
            -         * 
            - * - * - * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SearchResultMode search_result_mode = 5; - * - * - * @return This builder for chaining. - */ - public Builder clearSearchResultMode() { - bitField0_ = (bitField0_ & ~0x00000010); - searchResultMode_ = 0; - onChanged(); - return this; - } + // Construct using + // com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } - private java.util.List - dataStoreSpecs_ = java.util.Collections.emptyList(); + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } - private void ensureDataStoreSpecsIsMutable() { - if (!((bitField0_ & 0x00000020) != 0)) { - dataStoreSpecs_ = - new java.util.ArrayList< - com.google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec>( - dataStoreSpecs_); - bitField0_ |= 0x00000020; - } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetModelSpecFieldBuilder(); + internalGetPromptSpecFieldBuilder(); + internalGetMultimodalSpecFieldBuilder(); } + } - private com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec, - com.google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec.Builder, - com.google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpecOrBuilder> - dataStoreSpecsBuilder_; - - /** - * - * - *
            -         * Specs defining dataStores to filter on in a search call and
            -         * configurations for those dataStores. This is only considered for
            -         * engines with multiple dataStores use case. For single dataStore within
            -         * an engine, they should use the specs at the top level.
            -         * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec data_store_specs = 7; - * - */ - public java.util.List - getDataStoreSpecsList() { - if (dataStoreSpecsBuilder_ == null) { - return java.util.Collections.unmodifiableList(dataStoreSpecs_); - } else { - return dataStoreSpecsBuilder_.getMessageList(); - } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + modelSpec_ = null; + if (modelSpecBuilder_ != null) { + modelSpecBuilder_.dispose(); + modelSpecBuilder_ = null; } - - /** - * - * - *
            -         * Specs defining dataStores to filter on in a search call and
            -         * configurations for those dataStores. This is only considered for
            -         * engines with multiple dataStores use case. For single dataStore within
            -         * an engine, they should use the specs at the top level.
            -         * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec data_store_specs = 7; - * - */ - public int getDataStoreSpecsCount() { - if (dataStoreSpecsBuilder_ == null) { - return dataStoreSpecs_.size(); - } else { - return dataStoreSpecsBuilder_.getCount(); - } + promptSpec_ = null; + if (promptSpecBuilder_ != null) { + promptSpecBuilder_.dispose(); + promptSpecBuilder_ = null; + } + includeCitations_ = false; + answerLanguageCode_ = ""; + ignoreAdversarialQuery_ = false; + ignoreNonAnswerSeekingQuery_ = false; + ignoreLowRelevantContent_ = false; + ignoreJailBreakingQuery_ = false; + multimodalSpec_ = null; + if (multimodalSpecBuilder_ != null) { + multimodalSpecBuilder_.dispose(); + multimodalSpecBuilder_ = null; } + return this; + } - /** - * - * - *
            -         * Specs defining dataStores to filter on in a search call and
            -         * configurations for those dataStores. This is only considered for
            -         * engines with multiple dataStores use case. For single dataStore within
            -         * an engine, they should use the specs at the top level.
            -         * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec data_store_specs = 7; - * - */ - public com.google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec - getDataStoreSpecs(int index) { - if (dataStoreSpecsBuilder_ == null) { - return dataStoreSpecs_.get(index); - } else { - return dataStoreSpecsBuilder_.getMessage(index); - } + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1beta.ConversationalSearchServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_AnswerGenerationSpec_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec + build() { + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); } + return result; + } - /** - * - * - *
            -         * Specs defining dataStores to filter on in a search call and
            -         * configurations for those dataStores. This is only considered for
            -         * engines with multiple dataStores use case. For single dataStore within
            -         * an engine, they should use the specs at the top level.
            -         * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec data_store_specs = 7; - * - */ - public Builder setDataStoreSpecs( - int index, com.google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec value) { - if (dataStoreSpecsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureDataStoreSpecsIsMutable(); - dataStoreSpecs_.set(index, value); - onChanged(); - } else { - dataStoreSpecsBuilder_.setMessage(index, value); - } - return this; + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec + buildPartial() { + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec result = + new com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec( + this); + if (bitField0_ != 0) { + buildPartial0(result); } + onBuilt(); + return result; + } - /** - * - * - *
            -         * Specs defining dataStores to filter on in a search call and
            -         * configurations for those dataStores. This is only considered for
            -         * engines with multiple dataStores use case. For single dataStore within
            -         * an engine, they should use the specs at the top level.
            -         * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec data_store_specs = 7; - * - */ - public Builder setDataStoreSpecs( - int index, - com.google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec.Builder - builderForValue) { - if (dataStoreSpecsBuilder_ == null) { - ensureDataStoreSpecsIsMutable(); - dataStoreSpecs_.set(index, builderForValue.build()); - onChanged(); - } else { - dataStoreSpecsBuilder_.setMessage(index, builderForValue.build()); - } - return this; + private void buildPartial0( + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.modelSpec_ = modelSpecBuilder_ == null ? modelSpec_ : modelSpecBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.promptSpec_ = + promptSpecBuilder_ == null ? promptSpec_ : promptSpecBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.includeCitations_ = includeCitations_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.answerLanguageCode_ = answerLanguageCode_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.ignoreAdversarialQuery_ = ignoreAdversarialQuery_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.ignoreNonAnswerSeekingQuery_ = ignoreNonAnswerSeekingQuery_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.ignoreLowRelevantContent_ = ignoreLowRelevantContent_; + to_bitField0_ |= 0x00000004; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.ignoreJailBreakingQuery_ = ignoreJailBreakingQuery_; } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.multimodalSpec_ = + multimodalSpecBuilder_ == null ? multimodalSpec_ : multimodalSpecBuilder_.build(); + to_bitField0_ |= 0x00000008; + } + result.bitField0_ |= to_bitField0_; + } - /** - * - * - *
            -         * Specs defining dataStores to filter on in a search call and
            -         * configurations for those dataStores. This is only considered for
            -         * engines with multiple dataStores use case. For single dataStore within
            -         * an engine, they should use the specs at the top level.
            -         * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec data_store_specs = 7; - * - */ - public Builder addDataStoreSpecs( - com.google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec value) { - if (dataStoreSpecsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureDataStoreSpecsIsMutable(); - dataStoreSpecs_.add(value); - onChanged(); - } else { - dataStoreSpecsBuilder_.addMessage(value); - } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec) { + return mergeFrom( + (com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec) + other); + } else { + super.mergeFrom(other); return this; } + } - /** - * - * - *
            -         * Specs defining dataStores to filter on in a search call and
            -         * configurations for those dataStores. This is only considered for
            -         * engines with multiple dataStores use case. For single dataStore within
            -         * an engine, they should use the specs at the top level.
            -         * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec data_store_specs = 7; - * - */ - public Builder addDataStoreSpecs( - int index, com.google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec value) { - if (dataStoreSpecsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureDataStoreSpecsIsMutable(); - dataStoreSpecs_.add(index, value); - onChanged(); - } else { - dataStoreSpecsBuilder_.addMessage(index, value); - } - return this; + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec other) { + if (other + == com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec + .getDefaultInstance()) return this; + if (other.hasModelSpec()) { + mergeModelSpec(other.getModelSpec()); } - - /** - * - * - *
            -         * Specs defining dataStores to filter on in a search call and
            -         * configurations for those dataStores. This is only considered for
            -         * engines with multiple dataStores use case. For single dataStore within
            -         * an engine, they should use the specs at the top level.
            -         * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec data_store_specs = 7; - * - */ - public Builder addDataStoreSpecs( - com.google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec.Builder - builderForValue) { - if (dataStoreSpecsBuilder_ == null) { - ensureDataStoreSpecsIsMutable(); - dataStoreSpecs_.add(builderForValue.build()); - onChanged(); - } else { - dataStoreSpecsBuilder_.addMessage(builderForValue.build()); - } - return this; + if (other.hasPromptSpec()) { + mergePromptSpec(other.getPromptSpec()); } - - /** - * - * - *
            -         * Specs defining dataStores to filter on in a search call and
            -         * configurations for those dataStores. This is only considered for
            -         * engines with multiple dataStores use case. For single dataStore within
            -         * an engine, they should use the specs at the top level.
            -         * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec data_store_specs = 7; - * - */ - public Builder addDataStoreSpecs( - int index, - com.google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec.Builder - builderForValue) { - if (dataStoreSpecsBuilder_ == null) { - ensureDataStoreSpecsIsMutable(); - dataStoreSpecs_.add(index, builderForValue.build()); - onChanged(); - } else { - dataStoreSpecsBuilder_.addMessage(index, builderForValue.build()); - } - return this; + if (other.getIncludeCitations() != false) { + setIncludeCitations(other.getIncludeCitations()); } - - /** - * - * - *
            -         * Specs defining dataStores to filter on in a search call and
            -         * configurations for those dataStores. This is only considered for
            -         * engines with multiple dataStores use case. For single dataStore within
            -         * an engine, they should use the specs at the top level.
            -         * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec data_store_specs = 7; - * - */ - public Builder addAllDataStoreSpecs( - java.lang.Iterable< - ? extends com.google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec> - values) { - if (dataStoreSpecsBuilder_ == null) { - ensureDataStoreSpecsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, dataStoreSpecs_); - onChanged(); - } else { - dataStoreSpecsBuilder_.addAllMessages(values); - } - return this; + if (!other.getAnswerLanguageCode().isEmpty()) { + answerLanguageCode_ = other.answerLanguageCode_; + bitField0_ |= 0x00000008; + onChanged(); } - - /** - * - * - *
            -         * Specs defining dataStores to filter on in a search call and
            -         * configurations for those dataStores. This is only considered for
            -         * engines with multiple dataStores use case. For single dataStore within
            -         * an engine, they should use the specs at the top level.
            -         * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec data_store_specs = 7; - * - */ - public Builder clearDataStoreSpecs() { - if (dataStoreSpecsBuilder_ == null) { - dataStoreSpecs_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000020); - onChanged(); - } else { - dataStoreSpecsBuilder_.clear(); - } - return this; + if (other.getIgnoreAdversarialQuery() != false) { + setIgnoreAdversarialQuery(other.getIgnoreAdversarialQuery()); } - - /** - * - * - *
            -         * Specs defining dataStores to filter on in a search call and
            -         * configurations for those dataStores. This is only considered for
            -         * engines with multiple dataStores use case. For single dataStore within
            -         * an engine, they should use the specs at the top level.
            -         * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec data_store_specs = 7; - * - */ - public Builder removeDataStoreSpecs(int index) { - if (dataStoreSpecsBuilder_ == null) { - ensureDataStoreSpecsIsMutable(); - dataStoreSpecs_.remove(index); - onChanged(); - } else { - dataStoreSpecsBuilder_.remove(index); - } - return this; + if (other.getIgnoreNonAnswerSeekingQuery() != false) { + setIgnoreNonAnswerSeekingQuery(other.getIgnoreNonAnswerSeekingQuery()); } - - /** - * - * - *
            -         * Specs defining dataStores to filter on in a search call and
            -         * configurations for those dataStores. This is only considered for
            -         * engines with multiple dataStores use case. For single dataStore within
            -         * an engine, they should use the specs at the top level.
            -         * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec data_store_specs = 7; - * - */ - public com.google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec.Builder - getDataStoreSpecsBuilder(int index) { - return internalGetDataStoreSpecsFieldBuilder().getBuilder(index); + if (other.hasIgnoreLowRelevantContent()) { + setIgnoreLowRelevantContent(other.getIgnoreLowRelevantContent()); } - - /** - * - * - *
            -         * Specs defining dataStores to filter on in a search call and
            -         * configurations for those dataStores. This is only considered for
            -         * engines with multiple dataStores use case. For single dataStore within
            -         * an engine, they should use the specs at the top level.
            -         * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec data_store_specs = 7; - * - */ - public com.google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpecOrBuilder - getDataStoreSpecsOrBuilder(int index) { - if (dataStoreSpecsBuilder_ == null) { - return dataStoreSpecs_.get(index); - } else { - return dataStoreSpecsBuilder_.getMessageOrBuilder(index); - } + if (other.getIgnoreJailBreakingQuery() != false) { + setIgnoreJailBreakingQuery(other.getIgnoreJailBreakingQuery()); } - - /** - * - * - *
            -         * Specs defining dataStores to filter on in a search call and
            -         * configurations for those dataStores. This is only considered for
            -         * engines with multiple dataStores use case. For single dataStore within
            -         * an engine, they should use the specs at the top level.
            -         * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec data_store_specs = 7; - * - */ - public java.util.List< - ? extends - com.google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpecOrBuilder> - getDataStoreSpecsOrBuilderList() { - if (dataStoreSpecsBuilder_ != null) { - return dataStoreSpecsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(dataStoreSpecs_); - } + if (other.hasMultimodalSpec()) { + mergeMultimodalSpec(other.getMultimodalSpec()); } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } - /** - * - * - *
            -         * Specs defining dataStores to filter on in a search call and
            -         * configurations for those dataStores. This is only considered for
            -         * engines with multiple dataStores use case. For single dataStore within
            -         * an engine, they should use the specs at the top level.
            -         * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec data_store_specs = 7; - * - */ - public com.google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec.Builder - addDataStoreSpecsBuilder() { - return internalGetDataStoreSpecsFieldBuilder() - .addBuilder( - com.google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec - .getDefaultInstance()); - } + @java.lang.Override + public final boolean isInitialized() { + return true; + } - /** - * - * - *
            -         * Specs defining dataStores to filter on in a search call and
            -         * configurations for those dataStores. This is only considered for
            -         * engines with multiple dataStores use case. For single dataStore within
            -         * an engine, they should use the specs at the top level.
            -         * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec data_store_specs = 7; - * - */ - public com.google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec.Builder - addDataStoreSpecsBuilder(int index) { - return internalGetDataStoreSpecsFieldBuilder() - .addBuilder( - index, - com.google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec - .getDefaultInstance()); + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage( + internalGetModelSpecFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage( + internalGetPromptSpecFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: + { + includeCitations_ = input.readBool(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 34: + { + answerLanguageCode_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 40: + { + ignoreAdversarialQuery_ = input.readBool(); + bitField0_ |= 0x00000010; + break; + } // case 40 + case 48: + { + ignoreNonAnswerSeekingQuery_ = input.readBool(); + bitField0_ |= 0x00000020; + break; + } // case 48 + case 56: + { + ignoreLowRelevantContent_ = input.readBool(); + bitField0_ |= 0x00000040; + break; + } // case 56 + case 64: + { + ignoreJailBreakingQuery_ = input.readBool(); + bitField0_ |= 0x00000080; + break; + } // case 64 + case 74: + { + input.readMessage( + internalGetMultimodalSpecFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000100; + break; + } // case 74 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } - /** - * - * - *
            -         * Specs defining dataStores to filter on in a search call and
            -         * configurations for those dataStores. This is only considered for
            -         * engines with multiple dataStores use case. For single dataStore within
            -         * an engine, they should use the specs at the top level.
            -         * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec data_store_specs = 7; - * - */ - public java.util.List< - com.google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec.Builder> - getDataStoreSpecsBuilderList() { - return internalGetDataStoreSpecsFieldBuilder().getBuilderList(); - } + private int bitField0_; - private com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec, - com.google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec.Builder, - com.google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpecOrBuilder> - internalGetDataStoreSpecsFieldBuilder() { - if (dataStoreSpecsBuilder_ == null) { - dataStoreSpecsBuilder_ = - new com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec, - com.google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec.Builder, - com.google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpecOrBuilder>( - dataStoreSpecs_, - ((bitField0_ & 0x00000020) != 0), - getParentForChildren(), - isClean()); - dataStoreSpecs_ = null; - } - return dataStoreSpecsBuilder_; - } + private com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec + .ModelSpec + modelSpec_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec + .ModelSpec, + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec + .ModelSpec.Builder, + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec + .ModelSpecOrBuilder> + modelSpecBuilder_; - private com.google.cloud.discoveryengine.v1beta.SearchRequest - .NaturalLanguageQueryUnderstandingSpec - naturalLanguageQueryUnderstandingSpec_; - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.discoveryengine.v1beta.SearchRequest - .NaturalLanguageQueryUnderstandingSpec, - com.google.cloud.discoveryengine.v1beta.SearchRequest - .NaturalLanguageQueryUnderstandingSpec.Builder, - com.google.cloud.discoveryengine.v1beta.SearchRequest - .NaturalLanguageQueryUnderstandingSpecOrBuilder> - naturalLanguageQueryUnderstandingSpecBuilder_; + /** + * + * + *
            +       * Answer generation model specification.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec.ModelSpec model_spec = 1; + * + * + * @return Whether the modelSpec field is set. + */ + public boolean hasModelSpec() { + return ((bitField0_ & 0x00000001) != 0); + } - /** - * - * - *
            -         * Optional. Specification to enable natural language understanding
            -         * capabilities for search requests.
            -         * 
            - * - * - * .google.cloud.discoveryengine.v1beta.SearchRequest.NaturalLanguageQueryUnderstandingSpec natural_language_query_understanding_spec = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the naturalLanguageQueryUnderstandingSpec field is set. - */ - public boolean hasNaturalLanguageQueryUnderstandingSpec() { - return ((bitField0_ & 0x00000040) != 0); + /** + * + * + *
            +       * Answer generation model specification.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec.ModelSpec model_spec = 1; + * + * + * @return The modelSpec. + */ + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec + .ModelSpec + getModelSpec() { + if (modelSpecBuilder_ == null) { + return modelSpec_ == null + ? com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec + .ModelSpec.getDefaultInstance() + : modelSpec_; + } else { + return modelSpecBuilder_.getMessage(); } + } - /** - * - * - *
            -         * Optional. Specification to enable natural language understanding
            -         * capabilities for search requests.
            -         * 
            - * - * - * .google.cloud.discoveryengine.v1beta.SearchRequest.NaturalLanguageQueryUnderstandingSpec natural_language_query_understanding_spec = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The naturalLanguageQueryUnderstandingSpec. - */ - public com.google.cloud.discoveryengine.v1beta.SearchRequest - .NaturalLanguageQueryUnderstandingSpec - getNaturalLanguageQueryUnderstandingSpec() { - if (naturalLanguageQueryUnderstandingSpecBuilder_ == null) { - return naturalLanguageQueryUnderstandingSpec_ == null - ? com.google.cloud.discoveryengine.v1beta.SearchRequest - .NaturalLanguageQueryUnderstandingSpec.getDefaultInstance() - : naturalLanguageQueryUnderstandingSpec_; - } else { - return naturalLanguageQueryUnderstandingSpecBuilder_.getMessage(); + /** + * + * + *
            +       * Answer generation model specification.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec.ModelSpec model_spec = 1; + * + */ + public Builder setModelSpec( + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec.ModelSpec + value) { + if (modelSpecBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); } + modelSpec_ = value; + } else { + modelSpecBuilder_.setMessage(value); } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } - /** - * - * - *
            -         * Optional. Specification to enable natural language understanding
            -         * capabilities for search requests.
            -         * 
            - * - * - * .google.cloud.discoveryengine.v1beta.SearchRequest.NaturalLanguageQueryUnderstandingSpec natural_language_query_understanding_spec = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setNaturalLanguageQueryUnderstandingSpec( - com.google.cloud.discoveryengine.v1beta.SearchRequest - .NaturalLanguageQueryUnderstandingSpec - value) { - if (naturalLanguageQueryUnderstandingSpecBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - naturalLanguageQueryUnderstandingSpec_ = value; - } else { - naturalLanguageQueryUnderstandingSpecBuilder_.setMessage(value); - } - bitField0_ |= 0x00000040; - onChanged(); - return this; - } - - /** - * - * - *
            -         * Optional. Specification to enable natural language understanding
            -         * capabilities for search requests.
            -         * 
            - * - * - * .google.cloud.discoveryengine.v1beta.SearchRequest.NaturalLanguageQueryUnderstandingSpec natural_language_query_understanding_spec = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setNaturalLanguageQueryUnderstandingSpec( - com.google.cloud.discoveryengine.v1beta.SearchRequest - .NaturalLanguageQueryUnderstandingSpec.Builder - builderForValue) { - if (naturalLanguageQueryUnderstandingSpecBuilder_ == null) { - naturalLanguageQueryUnderstandingSpec_ = builderForValue.build(); + /** + * + * + *
            +       * Answer generation model specification.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec.ModelSpec model_spec = 1; + * + */ + public Builder setModelSpec( + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec.ModelSpec + .Builder + builderForValue) { + if (modelSpecBuilder_ == null) { + modelSpec_ = builderForValue.build(); + } else { + modelSpecBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
            +       * Answer generation model specification.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec.ModelSpec model_spec = 1; + * + */ + public Builder mergeModelSpec( + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec.ModelSpec + value) { + if (modelSpecBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && modelSpec_ != null + && modelSpec_ + != com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec + .ModelSpec.getDefaultInstance()) { + getModelSpecBuilder().mergeFrom(value); } else { - naturalLanguageQueryUnderstandingSpecBuilder_.setMessage(builderForValue.build()); + modelSpec_ = value; } - bitField0_ |= 0x00000040; + } else { + modelSpecBuilder_.mergeFrom(value); + } + if (modelSpec_ != null) { + bitField0_ |= 0x00000001; onChanged(); - return this; } + return this; + } - /** - * - * - *
            -         * Optional. Specification to enable natural language understanding
            -         * capabilities for search requests.
            -         * 
            - * - * - * .google.cloud.discoveryengine.v1beta.SearchRequest.NaturalLanguageQueryUnderstandingSpec natural_language_query_understanding_spec = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder mergeNaturalLanguageQueryUnderstandingSpec( - com.google.cloud.discoveryengine.v1beta.SearchRequest - .NaturalLanguageQueryUnderstandingSpec - value) { - if (naturalLanguageQueryUnderstandingSpecBuilder_ == null) { - if (((bitField0_ & 0x00000040) != 0) - && naturalLanguageQueryUnderstandingSpec_ != null - && naturalLanguageQueryUnderstandingSpec_ - != com.google.cloud.discoveryengine.v1beta.SearchRequest - .NaturalLanguageQueryUnderstandingSpec.getDefaultInstance()) { - getNaturalLanguageQueryUnderstandingSpecBuilder().mergeFrom(value); - } else { - naturalLanguageQueryUnderstandingSpec_ = value; + /** + * + * + *
            +       * Answer generation model specification.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec.ModelSpec model_spec = 1; + * + */ + public Builder clearModelSpec() { + bitField0_ = (bitField0_ & ~0x00000001); + modelSpec_ = null; + if (modelSpecBuilder_ != null) { + modelSpecBuilder_.dispose(); + modelSpecBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
            +       * Answer generation model specification.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec.ModelSpec model_spec = 1; + * + */ + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec + .ModelSpec.Builder + getModelSpecBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return internalGetModelSpecFieldBuilder().getBuilder(); + } + + /** + * + * + *
            +       * Answer generation model specification.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec.ModelSpec model_spec = 1; + * + */ + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec + .ModelSpecOrBuilder + getModelSpecOrBuilder() { + if (modelSpecBuilder_ != null) { + return modelSpecBuilder_.getMessageOrBuilder(); + } else { + return modelSpec_ == null + ? com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec + .ModelSpec.getDefaultInstance() + : modelSpec_; + } + } + + /** + * + * + *
            +       * Answer generation model specification.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec.ModelSpec model_spec = 1; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec + .ModelSpec, + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec + .ModelSpec.Builder, + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec + .ModelSpecOrBuilder> + internalGetModelSpecFieldBuilder() { + if (modelSpecBuilder_ == null) { + modelSpecBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec + .ModelSpec, + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec + .ModelSpec.Builder, + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec + .ModelSpecOrBuilder>(getModelSpec(), getParentForChildren(), isClean()); + modelSpec_ = null; + } + return modelSpecBuilder_; + } + + private com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec + .PromptSpec + promptSpec_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec + .PromptSpec, + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec + .PromptSpec.Builder, + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec + .PromptSpecOrBuilder> + promptSpecBuilder_; + + /** + * + * + *
            +       * Answer generation prompt specification.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec.PromptSpec prompt_spec = 2; + * + * + * @return Whether the promptSpec field is set. + */ + public boolean hasPromptSpec() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
            +       * Answer generation prompt specification.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec.PromptSpec prompt_spec = 2; + * + * + * @return The promptSpec. + */ + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec + .PromptSpec + getPromptSpec() { + if (promptSpecBuilder_ == null) { + return promptSpec_ == null + ? com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec + .PromptSpec.getDefaultInstance() + : promptSpec_; + } else { + return promptSpecBuilder_.getMessage(); + } + } + + /** + * + * + *
            +       * Answer generation prompt specification.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec.PromptSpec prompt_spec = 2; + * + */ + public Builder setPromptSpec( + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec.PromptSpec + value) { + if (promptSpecBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + promptSpec_ = value; + } else { + promptSpecBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
            +       * Answer generation prompt specification.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec.PromptSpec prompt_spec = 2; + * + */ + public Builder setPromptSpec( + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec.PromptSpec + .Builder + builderForValue) { + if (promptSpecBuilder_ == null) { + promptSpec_ = builderForValue.build(); + } else { + promptSpecBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
            +       * Answer generation prompt specification.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec.PromptSpec prompt_spec = 2; + * + */ + public Builder mergePromptSpec( + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec.PromptSpec + value) { + if (promptSpecBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && promptSpec_ != null + && promptSpec_ + != com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec + .PromptSpec.getDefaultInstance()) { + getPromptSpecBuilder().mergeFrom(value); + } else { + promptSpec_ = value; + } + } else { + promptSpecBuilder_.mergeFrom(value); + } + if (promptSpec_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** + * + * + *
            +       * Answer generation prompt specification.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec.PromptSpec prompt_spec = 2; + * + */ + public Builder clearPromptSpec() { + bitField0_ = (bitField0_ & ~0x00000002); + promptSpec_ = null; + if (promptSpecBuilder_ != null) { + promptSpecBuilder_.dispose(); + promptSpecBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
            +       * Answer generation prompt specification.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec.PromptSpec prompt_spec = 2; + * + */ + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec + .PromptSpec.Builder + getPromptSpecBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return internalGetPromptSpecFieldBuilder().getBuilder(); + } + + /** + * + * + *
            +       * Answer generation prompt specification.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec.PromptSpec prompt_spec = 2; + * + */ + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec + .PromptSpecOrBuilder + getPromptSpecOrBuilder() { + if (promptSpecBuilder_ != null) { + return promptSpecBuilder_.getMessageOrBuilder(); + } else { + return promptSpec_ == null + ? com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec + .PromptSpec.getDefaultInstance() + : promptSpec_; + } + } + + /** + * + * + *
            +       * Answer generation prompt specification.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec.PromptSpec prompt_spec = 2; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec + .PromptSpec, + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec + .PromptSpec.Builder, + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec + .PromptSpecOrBuilder> + internalGetPromptSpecFieldBuilder() { + if (promptSpecBuilder_ == null) { + promptSpecBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec + .PromptSpec, + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec + .PromptSpec.Builder, + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec + .PromptSpecOrBuilder>(getPromptSpec(), getParentForChildren(), isClean()); + promptSpec_ = null; + } + return promptSpecBuilder_; + } + + private boolean includeCitations_; + + /** + * + * + *
            +       * Specifies whether to include citation metadata in the answer. The default
            +       * value is `false`.
            +       * 
            + * + * bool include_citations = 3; + * + * @return The includeCitations. + */ + @java.lang.Override + public boolean getIncludeCitations() { + return includeCitations_; + } + + /** + * + * + *
            +       * Specifies whether to include citation metadata in the answer. The default
            +       * value is `false`.
            +       * 
            + * + * bool include_citations = 3; + * + * @param value The includeCitations to set. + * @return This builder for chaining. + */ + public Builder setIncludeCitations(boolean value) { + + includeCitations_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
            +       * Specifies whether to include citation metadata in the answer. The default
            +       * value is `false`.
            +       * 
            + * + * bool include_citations = 3; + * + * @return This builder for chaining. + */ + public Builder clearIncludeCitations() { + bitField0_ = (bitField0_ & ~0x00000004); + includeCitations_ = false; + onChanged(); + return this; + } + + private java.lang.Object answerLanguageCode_ = ""; + + /** + * + * + *
            +       * Language code for Answer. Use language tags defined by
            +       * [BCP47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt).
            +       * Note: This is an experimental feature.
            +       * 
            + * + * string answer_language_code = 4; + * + * @return The answerLanguageCode. + */ + public java.lang.String getAnswerLanguageCode() { + java.lang.Object ref = answerLanguageCode_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + answerLanguageCode_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
            +       * Language code for Answer. Use language tags defined by
            +       * [BCP47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt).
            +       * Note: This is an experimental feature.
            +       * 
            + * + * string answer_language_code = 4; + * + * @return The bytes for answerLanguageCode. + */ + public com.google.protobuf.ByteString getAnswerLanguageCodeBytes() { + java.lang.Object ref = answerLanguageCode_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + answerLanguageCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
            +       * Language code for Answer. Use language tags defined by
            +       * [BCP47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt).
            +       * Note: This is an experimental feature.
            +       * 
            + * + * string answer_language_code = 4; + * + * @param value The answerLanguageCode to set. + * @return This builder for chaining. + */ + public Builder setAnswerLanguageCode(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + answerLanguageCode_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
            +       * Language code for Answer. Use language tags defined by
            +       * [BCP47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt).
            +       * Note: This is an experimental feature.
            +       * 
            + * + * string answer_language_code = 4; + * + * @return This builder for chaining. + */ + public Builder clearAnswerLanguageCode() { + answerLanguageCode_ = getDefaultInstance().getAnswerLanguageCode(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + + /** + * + * + *
            +       * Language code for Answer. Use language tags defined by
            +       * [BCP47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt).
            +       * Note: This is an experimental feature.
            +       * 
            + * + * string answer_language_code = 4; + * + * @param value The bytes for answerLanguageCode to set. + * @return This builder for chaining. + */ + public Builder setAnswerLanguageCodeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + answerLanguageCode_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private boolean ignoreAdversarialQuery_; + + /** + * + * + *
            +       * Specifies whether to filter out adversarial queries. The default value
            +       * is `false`.
            +       *
            +       * Google employs search-query classification to detect adversarial
            +       * queries. No answer is returned if the search query is classified as an
            +       * adversarial query. For example, a user might ask a question regarding
            +       * negative comments about the company or submit a query designed to
            +       * generate unsafe, policy-violating output. If this field is set to
            +       * `true`, we skip generating answers for adversarial queries and return
            +       * fallback messages instead.
            +       * 
            + * + * bool ignore_adversarial_query = 5; + * + * @return The ignoreAdversarialQuery. + */ + @java.lang.Override + public boolean getIgnoreAdversarialQuery() { + return ignoreAdversarialQuery_; + } + + /** + * + * + *
            +       * Specifies whether to filter out adversarial queries. The default value
            +       * is `false`.
            +       *
            +       * Google employs search-query classification to detect adversarial
            +       * queries. No answer is returned if the search query is classified as an
            +       * adversarial query. For example, a user might ask a question regarding
            +       * negative comments about the company or submit a query designed to
            +       * generate unsafe, policy-violating output. If this field is set to
            +       * `true`, we skip generating answers for adversarial queries and return
            +       * fallback messages instead.
            +       * 
            + * + * bool ignore_adversarial_query = 5; + * + * @param value The ignoreAdversarialQuery to set. + * @return This builder for chaining. + */ + public Builder setIgnoreAdversarialQuery(boolean value) { + + ignoreAdversarialQuery_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
            +       * Specifies whether to filter out adversarial queries. The default value
            +       * is `false`.
            +       *
            +       * Google employs search-query classification to detect adversarial
            +       * queries. No answer is returned if the search query is classified as an
            +       * adversarial query. For example, a user might ask a question regarding
            +       * negative comments about the company or submit a query designed to
            +       * generate unsafe, policy-violating output. If this field is set to
            +       * `true`, we skip generating answers for adversarial queries and return
            +       * fallback messages instead.
            +       * 
            + * + * bool ignore_adversarial_query = 5; + * + * @return This builder for chaining. + */ + public Builder clearIgnoreAdversarialQuery() { + bitField0_ = (bitField0_ & ~0x00000010); + ignoreAdversarialQuery_ = false; + onChanged(); + return this; + } + + private boolean ignoreNonAnswerSeekingQuery_; + + /** + * + * + *
            +       * Specifies whether to filter out queries that are not answer-seeking.
            +       * The default value is `false`.
            +       *
            +       * Google employs search-query classification to detect answer-seeking
            +       * queries. No answer is returned if the search query is classified as a
            +       * non-answer seeking query. If this field is set to `true`, we skip
            +       * generating answers for non-answer seeking queries and return
            +       * fallback messages instead.
            +       * 
            + * + * bool ignore_non_answer_seeking_query = 6; + * + * @return The ignoreNonAnswerSeekingQuery. + */ + @java.lang.Override + public boolean getIgnoreNonAnswerSeekingQuery() { + return ignoreNonAnswerSeekingQuery_; + } + + /** + * + * + *
            +       * Specifies whether to filter out queries that are not answer-seeking.
            +       * The default value is `false`.
            +       *
            +       * Google employs search-query classification to detect answer-seeking
            +       * queries. No answer is returned if the search query is classified as a
            +       * non-answer seeking query. If this field is set to `true`, we skip
            +       * generating answers for non-answer seeking queries and return
            +       * fallback messages instead.
            +       * 
            + * + * bool ignore_non_answer_seeking_query = 6; + * + * @param value The ignoreNonAnswerSeekingQuery to set. + * @return This builder for chaining. + */ + public Builder setIgnoreNonAnswerSeekingQuery(boolean value) { + + ignoreNonAnswerSeekingQuery_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
            +       * Specifies whether to filter out queries that are not answer-seeking.
            +       * The default value is `false`.
            +       *
            +       * Google employs search-query classification to detect answer-seeking
            +       * queries. No answer is returned if the search query is classified as a
            +       * non-answer seeking query. If this field is set to `true`, we skip
            +       * generating answers for non-answer seeking queries and return
            +       * fallback messages instead.
            +       * 
            + * + * bool ignore_non_answer_seeking_query = 6; + * + * @return This builder for chaining. + */ + public Builder clearIgnoreNonAnswerSeekingQuery() { + bitField0_ = (bitField0_ & ~0x00000020); + ignoreNonAnswerSeekingQuery_ = false; + onChanged(); + return this; + } + + private boolean ignoreLowRelevantContent_; + + /** + * + * + *
            +       * Specifies whether to filter out queries that have low relevance.
            +       *
            +       * If this field is set to `false`, all search results are used regardless
            +       * of relevance to generate answers. If set to `true` or unset, the behavior
            +       * will be determined automatically by the service.
            +       * 
            + * + * optional bool ignore_low_relevant_content = 7; + * + * @return Whether the ignoreLowRelevantContent field is set. + */ + @java.lang.Override + public boolean hasIgnoreLowRelevantContent() { + return ((bitField0_ & 0x00000040) != 0); + } + + /** + * + * + *
            +       * Specifies whether to filter out queries that have low relevance.
            +       *
            +       * If this field is set to `false`, all search results are used regardless
            +       * of relevance to generate answers. If set to `true` or unset, the behavior
            +       * will be determined automatically by the service.
            +       * 
            + * + * optional bool ignore_low_relevant_content = 7; + * + * @return The ignoreLowRelevantContent. + */ + @java.lang.Override + public boolean getIgnoreLowRelevantContent() { + return ignoreLowRelevantContent_; + } + + /** + * + * + *
            +       * Specifies whether to filter out queries that have low relevance.
            +       *
            +       * If this field is set to `false`, all search results are used regardless
            +       * of relevance to generate answers. If set to `true` or unset, the behavior
            +       * will be determined automatically by the service.
            +       * 
            + * + * optional bool ignore_low_relevant_content = 7; + * + * @param value The ignoreLowRelevantContent to set. + * @return This builder for chaining. + */ + public Builder setIgnoreLowRelevantContent(boolean value) { + + ignoreLowRelevantContent_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + /** + * + * + *
            +       * Specifies whether to filter out queries that have low relevance.
            +       *
            +       * If this field is set to `false`, all search results are used regardless
            +       * of relevance to generate answers. If set to `true` or unset, the behavior
            +       * will be determined automatically by the service.
            +       * 
            + * + * optional bool ignore_low_relevant_content = 7; + * + * @return This builder for chaining. + */ + public Builder clearIgnoreLowRelevantContent() { + bitField0_ = (bitField0_ & ~0x00000040); + ignoreLowRelevantContent_ = false; + onChanged(); + return this; + } + + private boolean ignoreJailBreakingQuery_; + + /** + * + * + *
            +       * Optional. Specifies whether to filter out jail-breaking queries. The
            +       * default value is `false`.
            +       *
            +       * Google employs search-query classification to detect jail-breaking
            +       * queries. No summary is returned if the search query is classified as a
            +       * jail-breaking query. A user might add instructions to the query to
            +       * change the tone, style, language, content of the answer, or ask the
            +       * model to act as a different entity, e.g. "Reply in the tone of a
            +       * competing company's CEO". If this field is set to `true`, we skip
            +       * generating summaries for jail-breaking queries and return fallback
            +       * messages instead.
            +       * 
            + * + * bool ignore_jail_breaking_query = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The ignoreJailBreakingQuery. + */ + @java.lang.Override + public boolean getIgnoreJailBreakingQuery() { + return ignoreJailBreakingQuery_; + } + + /** + * + * + *
            +       * Optional. Specifies whether to filter out jail-breaking queries. The
            +       * default value is `false`.
            +       *
            +       * Google employs search-query classification to detect jail-breaking
            +       * queries. No summary is returned if the search query is classified as a
            +       * jail-breaking query. A user might add instructions to the query to
            +       * change the tone, style, language, content of the answer, or ask the
            +       * model to act as a different entity, e.g. "Reply in the tone of a
            +       * competing company's CEO". If this field is set to `true`, we skip
            +       * generating summaries for jail-breaking queries and return fallback
            +       * messages instead.
            +       * 
            + * + * bool ignore_jail_breaking_query = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The ignoreJailBreakingQuery to set. + * @return This builder for chaining. + */ + public Builder setIgnoreJailBreakingQuery(boolean value) { + + ignoreJailBreakingQuery_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + + /** + * + * + *
            +       * Optional. Specifies whether to filter out jail-breaking queries. The
            +       * default value is `false`.
            +       *
            +       * Google employs search-query classification to detect jail-breaking
            +       * queries. No summary is returned if the search query is classified as a
            +       * jail-breaking query. A user might add instructions to the query to
            +       * change the tone, style, language, content of the answer, or ask the
            +       * model to act as a different entity, e.g. "Reply in the tone of a
            +       * competing company's CEO". If this field is set to `true`, we skip
            +       * generating summaries for jail-breaking queries and return fallback
            +       * messages instead.
            +       * 
            + * + * bool ignore_jail_breaking_query = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearIgnoreJailBreakingQuery() { + bitField0_ = (bitField0_ & ~0x00000080); + ignoreJailBreakingQuery_ = false; + onChanged(); + return this; + } + + private com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec + .MultimodalSpec + multimodalSpec_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec + .MultimodalSpec, + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec + .MultimodalSpec.Builder, + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec + .MultimodalSpecOrBuilder> + multimodalSpecBuilder_; + + /** + * + * + *
            +       * Optional. Multimodal specification.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec.MultimodalSpec multimodal_spec = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the multimodalSpec field is set. + */ + public boolean hasMultimodalSpec() { + return ((bitField0_ & 0x00000100) != 0); + } + + /** + * + * + *
            +       * Optional. Multimodal specification.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec.MultimodalSpec multimodal_spec = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The multimodalSpec. + */ + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec + .MultimodalSpec + getMultimodalSpec() { + if (multimodalSpecBuilder_ == null) { + return multimodalSpec_ == null + ? com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec + .MultimodalSpec.getDefaultInstance() + : multimodalSpec_; + } else { + return multimodalSpecBuilder_.getMessage(); + } + } + + /** + * + * + *
            +       * Optional. Multimodal specification.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec.MultimodalSpec multimodal_spec = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setMultimodalSpec( + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec + .MultimodalSpec + value) { + if (multimodalSpecBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + multimodalSpec_ = value; + } else { + multimodalSpecBuilder_.setMessage(value); + } + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + + /** + * + * + *
            +       * Optional. Multimodal specification.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec.MultimodalSpec multimodal_spec = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setMultimodalSpec( + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec + .MultimodalSpec.Builder + builderForValue) { + if (multimodalSpecBuilder_ == null) { + multimodalSpec_ = builderForValue.build(); + } else { + multimodalSpecBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + + /** + * + * + *
            +       * Optional. Multimodal specification.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec.MultimodalSpec multimodal_spec = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeMultimodalSpec( + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec + .MultimodalSpec + value) { + if (multimodalSpecBuilder_ == null) { + if (((bitField0_ & 0x00000100) != 0) + && multimodalSpec_ != null + && multimodalSpec_ + != com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec + .MultimodalSpec.getDefaultInstance()) { + getMultimodalSpecBuilder().mergeFrom(value); + } else { + multimodalSpec_ = value; + } + } else { + multimodalSpecBuilder_.mergeFrom(value); + } + if (multimodalSpec_ != null) { + bitField0_ |= 0x00000100; + onChanged(); + } + return this; + } + + /** + * + * + *
            +       * Optional. Multimodal specification.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec.MultimodalSpec multimodal_spec = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearMultimodalSpec() { + bitField0_ = (bitField0_ & ~0x00000100); + multimodalSpec_ = null; + if (multimodalSpecBuilder_ != null) { + multimodalSpecBuilder_.dispose(); + multimodalSpecBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
            +       * Optional. Multimodal specification.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec.MultimodalSpec multimodal_spec = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec + .MultimodalSpec.Builder + getMultimodalSpecBuilder() { + bitField0_ |= 0x00000100; + onChanged(); + return internalGetMultimodalSpecFieldBuilder().getBuilder(); + } + + /** + * + * + *
            +       * Optional. Multimodal specification.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec.MultimodalSpec multimodal_spec = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec + .MultimodalSpecOrBuilder + getMultimodalSpecOrBuilder() { + if (multimodalSpecBuilder_ != null) { + return multimodalSpecBuilder_.getMessageOrBuilder(); + } else { + return multimodalSpec_ == null + ? com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec + .MultimodalSpec.getDefaultInstance() + : multimodalSpec_; + } + } + + /** + * + * + *
            +       * Optional. Multimodal specification.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec.MultimodalSpec multimodal_spec = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec + .MultimodalSpec, + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec + .MultimodalSpec.Builder, + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec + .MultimodalSpecOrBuilder> + internalGetMultimodalSpecFieldBuilder() { + if (multimodalSpecBuilder_ == null) { + multimodalSpecBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec + .MultimodalSpec, + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec + .MultimodalSpec.Builder, + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec + .MultimodalSpecOrBuilder>( + getMultimodalSpec(), getParentForChildren(), isClean()); + multimodalSpec_ = null; + } + return multimodalSpecBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec) + private static final com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest + .AnswerGenerationSpec + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec(); + } + + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AnswerGenerationSpec parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface SearchSpecOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
            +     * Search parameters.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchParams search_params = 1; + * + * + * @return Whether the searchParams field is set. + */ + boolean hasSearchParams(); + + /** + * + * + *
            +     * Search parameters.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchParams search_params = 1; + * + * + * @return The searchParams. + */ + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchParams + getSearchParams(); + + /** + * + * + *
            +     * Search parameters.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchParams search_params = 1; + * + */ + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchParamsOrBuilder + getSearchParamsOrBuilder(); + + /** + * + * + *
            +     * Search result list.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList search_result_list = 2; + * + * + * @return Whether the searchResultList field is set. + */ + boolean hasSearchResultList(); + + /** + * + * + *
            +     * Search result list.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList search_result_list = 2; + * + * + * @return The searchResultList. + */ + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList + getSearchResultList(); + + /** + * + * + *
            +     * Search result list.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList search_result_list = 2; + * + */ + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultListOrBuilder + getSearchResultListOrBuilder(); + + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.InputCase getInputCase(); + } + + /** + * + * + *
            +   * Search specification.
            +   * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec} + */ + public static final class SearchSpec extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec) + SearchSpecOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "SearchSpec"); + } + + // Use SearchSpec.newBuilder() to construct. + private SearchSpec(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private SearchSpec() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.ConversationalSearchServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_SearchSpec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.ConversationalSearchServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_SearchSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.class, + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.Builder.class); + } + + public interface SearchParamsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchParams) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
            +       * Number of search results to return.
            +       * The default value is 10.
            +       * 
            + * + * int32 max_return_results = 1; + * + * @return The maxReturnResults. + */ + int getMaxReturnResults(); + + /** + * + * + *
            +       * The filter syntax consists of an expression language for constructing
            +       * a predicate from one or more fields of the documents being filtered.
            +       * Filter expression is case-sensitive. This will be used to filter
            +       * search results which may affect the Answer response.
            +       *
            +       * If this field is unrecognizable, an  `INVALID_ARGUMENT`  is returned.
            +       *
            +       * Filtering in Vertex AI Search is done by mapping the LHS filter key
            +       * to a key property defined in the Vertex AI Search backend -- this
            +       * mapping is defined by the customer in their schema. For example a
            +       * media customers might have a field 'name' in their schema. In this
            +       * case the filter would look like this: filter --> name:'ANY("king
            +       * kong")'
            +       *
            +       * For more information about filtering including syntax and filter
            +       * operators, see
            +       * [Filter](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata)
            +       * 
            + * + * string filter = 2; + * + * @return The filter. + */ + java.lang.String getFilter(); + + /** + * + * + *
            +       * The filter syntax consists of an expression language for constructing
            +       * a predicate from one or more fields of the documents being filtered.
            +       * Filter expression is case-sensitive. This will be used to filter
            +       * search results which may affect the Answer response.
            +       *
            +       * If this field is unrecognizable, an  `INVALID_ARGUMENT`  is returned.
            +       *
            +       * Filtering in Vertex AI Search is done by mapping the LHS filter key
            +       * to a key property defined in the Vertex AI Search backend -- this
            +       * mapping is defined by the customer in their schema. For example a
            +       * media customers might have a field 'name' in their schema. In this
            +       * case the filter would look like this: filter --> name:'ANY("king
            +       * kong")'
            +       *
            +       * For more information about filtering including syntax and filter
            +       * operators, see
            +       * [Filter](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata)
            +       * 
            + * + * string filter = 2; + * + * @return The bytes for filter. + */ + com.google.protobuf.ByteString getFilterBytes(); + + /** + * + * + *
            +       * Boost specification to boost certain documents in search results which
            +       * may affect the answer query response. For more information on boosting,
            +       * see [Boosting](https://cloud.google.com/retail/docs/boosting#boost)
            +       * 
            + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec boost_spec = 3; + * + * @return Whether the boostSpec field is set. + */ + boolean hasBoostSpec(); + + /** + * + * + *
            +       * Boost specification to boost certain documents in search results which
            +       * may affect the answer query response. For more information on boosting,
            +       * see [Boosting](https://cloud.google.com/retail/docs/boosting#boost)
            +       * 
            + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec boost_spec = 3; + * + * @return The boostSpec. + */ + com.google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec getBoostSpec(); + + /** + * + * + *
            +       * Boost specification to boost certain documents in search results which
            +       * may affect the answer query response. For more information on boosting,
            +       * see [Boosting](https://cloud.google.com/retail/docs/boosting#boost)
            +       * 
            + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec boost_spec = 3; + */ + com.google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpecOrBuilder + getBoostSpecOrBuilder(); + + /** + * + * + *
            +       * The order in which documents are returned. Documents can be ordered
            +       * by a field in an
            +       * [Document][google.cloud.discoveryengine.v1beta.Document] object. Leave
            +       * it unset if ordered by relevance. `order_by` expression is
            +       * case-sensitive. For more information on ordering, see
            +       * [Ordering](https://cloud.google.com/retail/docs/filter-and-order#order)
            +       *
            +       * If this field is unrecognizable, an `INVALID_ARGUMENT` is returned.
            +       * 
            + * + * string order_by = 4; + * + * @return The orderBy. + */ + java.lang.String getOrderBy(); + + /** + * + * + *
            +       * The order in which documents are returned. Documents can be ordered
            +       * by a field in an
            +       * [Document][google.cloud.discoveryengine.v1beta.Document] object. Leave
            +       * it unset if ordered by relevance. `order_by` expression is
            +       * case-sensitive. For more information on ordering, see
            +       * [Ordering](https://cloud.google.com/retail/docs/filter-and-order#order)
            +       *
            +       * If this field is unrecognizable, an `INVALID_ARGUMENT` is returned.
            +       * 
            + * + * string order_by = 4; + * + * @return The bytes for orderBy. + */ + com.google.protobuf.ByteString getOrderByBytes(); + + /** + * + * + *
            +       * Specifies the search result mode. If unspecified, the
            +       * search result mode defaults to `DOCUMENTS`.
            +       * See [parse and chunk
            +       * documents](https://cloud.google.com/generative-ai-app-builder/docs/parse-chunk-documents)
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SearchResultMode search_result_mode = 5; + * + * + * @return The enum numeric value on the wire for searchResultMode. + */ + int getSearchResultModeValue(); + + /** + * + * + *
            +       * Specifies the search result mode. If unspecified, the
            +       * search result mode defaults to `DOCUMENTS`.
            +       * See [parse and chunk
            +       * documents](https://cloud.google.com/generative-ai-app-builder/docs/parse-chunk-documents)
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SearchResultMode search_result_mode = 5; + * + * + * @return The searchResultMode. + */ + com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SearchResultMode + getSearchResultMode(); + + /** + * + * + *
            +       * Specs defining dataStores to filter on in a search call and
            +       * configurations for those dataStores. This is only considered for
            +       * engines with multiple dataStores use case. For single dataStore within
            +       * an engine, they should use the specs at the top level.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec data_store_specs = 7; + * + */ + java.util.List + getDataStoreSpecsList(); + + /** + * + * + *
            +       * Specs defining dataStores to filter on in a search call and
            +       * configurations for those dataStores. This is only considered for
            +       * engines with multiple dataStores use case. For single dataStore within
            +       * an engine, they should use the specs at the top level.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec data_store_specs = 7; + * + */ + com.google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec getDataStoreSpecs( + int index); + + /** + * + * + *
            +       * Specs defining dataStores to filter on in a search call and
            +       * configurations for those dataStores. This is only considered for
            +       * engines with multiple dataStores use case. For single dataStore within
            +       * an engine, they should use the specs at the top level.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec data_store_specs = 7; + * + */ + int getDataStoreSpecsCount(); + + /** + * + * + *
            +       * Specs defining dataStores to filter on in a search call and
            +       * configurations for those dataStores. This is only considered for
            +       * engines with multiple dataStores use case. For single dataStore within
            +       * an engine, they should use the specs at the top level.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec data_store_specs = 7; + * + */ + java.util.List< + ? extends + com.google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpecOrBuilder> + getDataStoreSpecsOrBuilderList(); + + /** + * + * + *
            +       * Specs defining dataStores to filter on in a search call and
            +       * configurations for those dataStores. This is only considered for
            +       * engines with multiple dataStores use case. For single dataStore within
            +       * an engine, they should use the specs at the top level.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec data_store_specs = 7; + * + */ + com.google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpecOrBuilder + getDataStoreSpecsOrBuilder(int index); + + /** + * + * + *
            +       * Optional. Specification to enable natural language understanding
            +       * capabilities for search requests.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.NaturalLanguageQueryUnderstandingSpec natural_language_query_understanding_spec = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the naturalLanguageQueryUnderstandingSpec field is set. + */ + boolean hasNaturalLanguageQueryUnderstandingSpec(); + + /** + * + * + *
            +       * Optional. Specification to enable natural language understanding
            +       * capabilities for search requests.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.NaturalLanguageQueryUnderstandingSpec natural_language_query_understanding_spec = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The naturalLanguageQueryUnderstandingSpec. + */ + com.google.cloud.discoveryengine.v1beta.SearchRequest.NaturalLanguageQueryUnderstandingSpec + getNaturalLanguageQueryUnderstandingSpec(); + + /** + * + * + *
            +       * Optional. Specification to enable natural language understanding
            +       * capabilities for search requests.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.NaturalLanguageQueryUnderstandingSpec natural_language_query_understanding_spec = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.discoveryengine.v1beta.SearchRequest + .NaturalLanguageQueryUnderstandingSpecOrBuilder + getNaturalLanguageQueryUnderstandingSpecOrBuilder(); + } + + /** + * + * + *
            +     * Search parameters.
            +     * 
            + * + * Protobuf type {@code + * google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchParams} + */ + public static final class SearchParams extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchParams) + SearchParamsOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "SearchParams"); + } + + // Use SearchParams.newBuilder() to construct. + private SearchParams(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private SearchParams() { + filter_ = ""; + orderBy_ = ""; + searchResultMode_ = 0; + dataStoreSpecs_ = java.util.Collections.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.ConversationalSearchServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_SearchSpec_SearchParams_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.ConversationalSearchServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_SearchSpec_SearchParams_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchParams + .class, + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchParams + .Builder.class); + } + + private int bitField0_; + public static final int MAX_RETURN_RESULTS_FIELD_NUMBER = 1; + private int maxReturnResults_ = 0; + + /** + * + * + *
            +       * Number of search results to return.
            +       * The default value is 10.
            +       * 
            + * + * int32 max_return_results = 1; + * + * @return The maxReturnResults. + */ + @java.lang.Override + public int getMaxReturnResults() { + return maxReturnResults_; + } + + public static final int FILTER_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object filter_ = ""; + + /** + * + * + *
            +       * The filter syntax consists of an expression language for constructing
            +       * a predicate from one or more fields of the documents being filtered.
            +       * Filter expression is case-sensitive. This will be used to filter
            +       * search results which may affect the Answer response.
            +       *
            +       * If this field is unrecognizable, an  `INVALID_ARGUMENT`  is returned.
            +       *
            +       * Filtering in Vertex AI Search is done by mapping the LHS filter key
            +       * to a key property defined in the Vertex AI Search backend -- this
            +       * mapping is defined by the customer in their schema. For example a
            +       * media customers might have a field 'name' in their schema. In this
            +       * case the filter would look like this: filter --> name:'ANY("king
            +       * kong")'
            +       *
            +       * For more information about filtering including syntax and filter
            +       * operators, see
            +       * [Filter](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata)
            +       * 
            + * + * string filter = 2; + * + * @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; + } + } + + /** + * + * + *
            +       * The filter syntax consists of an expression language for constructing
            +       * a predicate from one or more fields of the documents being filtered.
            +       * Filter expression is case-sensitive. This will be used to filter
            +       * search results which may affect the Answer response.
            +       *
            +       * If this field is unrecognizable, an  `INVALID_ARGUMENT`  is returned.
            +       *
            +       * Filtering in Vertex AI Search is done by mapping the LHS filter key
            +       * to a key property defined in the Vertex AI Search backend -- this
            +       * mapping is defined by the customer in their schema. For example a
            +       * media customers might have a field 'name' in their schema. In this
            +       * case the filter would look like this: filter --> name:'ANY("king
            +       * kong")'
            +       *
            +       * For more information about filtering including syntax and filter
            +       * operators, see
            +       * [Filter](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata)
            +       * 
            + * + * string filter = 2; + * + * @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 BOOST_SPEC_FIELD_NUMBER = 3; + private com.google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec boostSpec_; + + /** + * + * + *
            +       * Boost specification to boost certain documents in search results which
            +       * may affect the answer query response. For more information on boosting,
            +       * see [Boosting](https://cloud.google.com/retail/docs/boosting#boost)
            +       * 
            + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec boost_spec = 3; + * + * @return Whether the boostSpec field is set. + */ + @java.lang.Override + public boolean hasBoostSpec() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
            +       * Boost specification to boost certain documents in search results which
            +       * may affect the answer query response. For more information on boosting,
            +       * see [Boosting](https://cloud.google.com/retail/docs/boosting#boost)
            +       * 
            + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec boost_spec = 3; + * + * @return The boostSpec. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec getBoostSpec() { + return boostSpec_ == null + ? com.google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec.getDefaultInstance() + : boostSpec_; + } + + /** + * + * + *
            +       * Boost specification to boost certain documents in search results which
            +       * may affect the answer query response. For more information on boosting,
            +       * see [Boosting](https://cloud.google.com/retail/docs/boosting#boost)
            +       * 
            + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec boost_spec = 3; + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpecOrBuilder + getBoostSpecOrBuilder() { + return boostSpec_ == null + ? com.google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec.getDefaultInstance() + : boostSpec_; + } + + public static final int ORDER_BY_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object orderBy_ = ""; + + /** + * + * + *
            +       * The order in which documents are returned. Documents can be ordered
            +       * by a field in an
            +       * [Document][google.cloud.discoveryengine.v1beta.Document] object. Leave
            +       * it unset if ordered by relevance. `order_by` expression is
            +       * case-sensitive. For more information on ordering, see
            +       * [Ordering](https://cloud.google.com/retail/docs/filter-and-order#order)
            +       *
            +       * If this field is unrecognizable, an `INVALID_ARGUMENT` is returned.
            +       * 
            + * + * string order_by = 4; + * + * @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; + } + } + + /** + * + * + *
            +       * The order in which documents are returned. Documents can be ordered
            +       * by a field in an
            +       * [Document][google.cloud.discoveryengine.v1beta.Document] object. Leave
            +       * it unset if ordered by relevance. `order_by` expression is
            +       * case-sensitive. For more information on ordering, see
            +       * [Ordering](https://cloud.google.com/retail/docs/filter-and-order#order)
            +       *
            +       * If this field is unrecognizable, an `INVALID_ARGUMENT` is returned.
            +       * 
            + * + * string order_by = 4; + * + * @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 SEARCH_RESULT_MODE_FIELD_NUMBER = 5; + private int searchResultMode_ = 0; + + /** + * + * + *
            +       * Specifies the search result mode. If unspecified, the
            +       * search result mode defaults to `DOCUMENTS`.
            +       * See [parse and chunk
            +       * documents](https://cloud.google.com/generative-ai-app-builder/docs/parse-chunk-documents)
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SearchResultMode search_result_mode = 5; + * + * + * @return The enum numeric value on the wire for searchResultMode. + */ + @java.lang.Override + public int getSearchResultModeValue() { + return searchResultMode_; + } + + /** + * + * + *
            +       * Specifies the search result mode. If unspecified, the
            +       * search result mode defaults to `DOCUMENTS`.
            +       * See [parse and chunk
            +       * documents](https://cloud.google.com/generative-ai-app-builder/docs/parse-chunk-documents)
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SearchResultMode search_result_mode = 5; + * + * + * @return The searchResultMode. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec + .SearchResultMode + getSearchResultMode() { + com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SearchResultMode + result = + com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec + .SearchResultMode.forNumber(searchResultMode_); + return result == null + ? com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec + .SearchResultMode.UNRECOGNIZED + : result; + } + + public static final int DATA_STORE_SPECS_FIELD_NUMBER = 7; + + @SuppressWarnings("serial") + private java.util.List + dataStoreSpecs_; + + /** + * + * + *
            +       * Specs defining dataStores to filter on in a search call and
            +       * configurations for those dataStores. This is only considered for
            +       * engines with multiple dataStores use case. For single dataStore within
            +       * an engine, they should use the specs at the top level.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec data_store_specs = 7; + * + */ + @java.lang.Override + public java.util.List + getDataStoreSpecsList() { + return dataStoreSpecs_; + } + + /** + * + * + *
            +       * Specs defining dataStores to filter on in a search call and
            +       * configurations for those dataStores. This is only considered for
            +       * engines with multiple dataStores use case. For single dataStore within
            +       * an engine, they should use the specs at the top level.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec data_store_specs = 7; + * + */ + @java.lang.Override + public java.util.List< + ? extends + com.google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpecOrBuilder> + getDataStoreSpecsOrBuilderList() { + return dataStoreSpecs_; + } + + /** + * + * + *
            +       * Specs defining dataStores to filter on in a search call and
            +       * configurations for those dataStores. This is only considered for
            +       * engines with multiple dataStores use case. For single dataStore within
            +       * an engine, they should use the specs at the top level.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec data_store_specs = 7; + * + */ + @java.lang.Override + public int getDataStoreSpecsCount() { + return dataStoreSpecs_.size(); + } + + /** + * + * + *
            +       * Specs defining dataStores to filter on in a search call and
            +       * configurations for those dataStores. This is only considered for
            +       * engines with multiple dataStores use case. For single dataStore within
            +       * an engine, they should use the specs at the top level.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec data_store_specs = 7; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec getDataStoreSpecs( + int index) { + return dataStoreSpecs_.get(index); + } + + /** + * + * + *
            +       * Specs defining dataStores to filter on in a search call and
            +       * configurations for those dataStores. This is only considered for
            +       * engines with multiple dataStores use case. For single dataStore within
            +       * an engine, they should use the specs at the top level.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec data_store_specs = 7; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpecOrBuilder + getDataStoreSpecsOrBuilder(int index) { + return dataStoreSpecs_.get(index); + } + + public static final int NATURAL_LANGUAGE_QUERY_UNDERSTANDING_SPEC_FIELD_NUMBER = 8; + private com.google.cloud.discoveryengine.v1beta.SearchRequest + .NaturalLanguageQueryUnderstandingSpec + naturalLanguageQueryUnderstandingSpec_; + + /** + * + * + *
            +       * Optional. Specification to enable natural language understanding
            +       * capabilities for search requests.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.NaturalLanguageQueryUnderstandingSpec natural_language_query_understanding_spec = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the naturalLanguageQueryUnderstandingSpec field is set. + */ + @java.lang.Override + public boolean hasNaturalLanguageQueryUnderstandingSpec() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
            +       * Optional. Specification to enable natural language understanding
            +       * capabilities for search requests.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.NaturalLanguageQueryUnderstandingSpec natural_language_query_understanding_spec = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The naturalLanguageQueryUnderstandingSpec. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.SearchRequest + .NaturalLanguageQueryUnderstandingSpec + getNaturalLanguageQueryUnderstandingSpec() { + return naturalLanguageQueryUnderstandingSpec_ == null + ? com.google.cloud.discoveryengine.v1beta.SearchRequest + .NaturalLanguageQueryUnderstandingSpec.getDefaultInstance() + : naturalLanguageQueryUnderstandingSpec_; + } + + /** + * + * + *
            +       * Optional. Specification to enable natural language understanding
            +       * capabilities for search requests.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.NaturalLanguageQueryUnderstandingSpec natural_language_query_understanding_spec = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.SearchRequest + .NaturalLanguageQueryUnderstandingSpecOrBuilder + getNaturalLanguageQueryUnderstandingSpecOrBuilder() { + return naturalLanguageQueryUnderstandingSpec_ == null + ? com.google.cloud.discoveryengine.v1beta.SearchRequest + .NaturalLanguageQueryUnderstandingSpec.getDefaultInstance() + : naturalLanguageQueryUnderstandingSpec_; + } + + 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 (maxReturnResults_ != 0) { + output.writeInt32(1, maxReturnResults_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(filter_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, filter_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(3, getBoostSpec()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(orderBy_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, orderBy_); + } + if (searchResultMode_ + != com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec + .SearchResultMode.SEARCH_RESULT_MODE_UNSPECIFIED + .getNumber()) { + output.writeEnum(5, searchResultMode_); + } + for (int i = 0; i < dataStoreSpecs_.size(); i++) { + output.writeMessage(7, dataStoreSpecs_.get(i)); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(8, getNaturalLanguageQueryUnderstandingSpec()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (maxReturnResults_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(1, maxReturnResults_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(filter_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, filter_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getBoostSpec()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(orderBy_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, orderBy_); + } + if (searchResultMode_ + != com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec + .SearchResultMode.SEARCH_RESULT_MODE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(5, searchResultMode_); + } + for (int i = 0; i < dataStoreSpecs_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(7, dataStoreSpecs_.get(i)); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 8, getNaturalLanguageQueryUnderstandingSpec()); + } + 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.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchParams)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchParams other = + (com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchParams) + obj; + + if (getMaxReturnResults() != other.getMaxReturnResults()) return false; + if (!getFilter().equals(other.getFilter())) return false; + if (hasBoostSpec() != other.hasBoostSpec()) return false; + if (hasBoostSpec()) { + if (!getBoostSpec().equals(other.getBoostSpec())) return false; + } + if (!getOrderBy().equals(other.getOrderBy())) return false; + if (searchResultMode_ != other.searchResultMode_) return false; + if (!getDataStoreSpecsList().equals(other.getDataStoreSpecsList())) return false; + if (hasNaturalLanguageQueryUnderstandingSpec() + != other.hasNaturalLanguageQueryUnderstandingSpec()) return false; + if (hasNaturalLanguageQueryUnderstandingSpec()) { + if (!getNaturalLanguageQueryUnderstandingSpec() + .equals(other.getNaturalLanguageQueryUnderstandingSpec())) 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) + MAX_RETURN_RESULTS_FIELD_NUMBER; + hash = (53 * hash) + getMaxReturnResults(); + hash = (37 * hash) + FILTER_FIELD_NUMBER; + hash = (53 * hash) + getFilter().hashCode(); + if (hasBoostSpec()) { + hash = (37 * hash) + BOOST_SPEC_FIELD_NUMBER; + hash = (53 * hash) + getBoostSpec().hashCode(); + } + hash = (37 * hash) + ORDER_BY_FIELD_NUMBER; + hash = (53 * hash) + getOrderBy().hashCode(); + hash = (37 * hash) + SEARCH_RESULT_MODE_FIELD_NUMBER; + hash = (53 * hash) + searchResultMode_; + if (getDataStoreSpecsCount() > 0) { + hash = (37 * hash) + DATA_STORE_SPECS_FIELD_NUMBER; + hash = (53 * hash) + getDataStoreSpecsList().hashCode(); + } + if (hasNaturalLanguageQueryUnderstandingSpec()) { + hash = (37 * hash) + NATURAL_LANGUAGE_QUERY_UNDERSTANDING_SPEC_FIELD_NUMBER; + hash = (53 * hash) + getNaturalLanguageQueryUnderstandingSpec().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchParams + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchParams + 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.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchParams + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchParams + 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.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchParams + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchParams + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchParams + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchParams + 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.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchParams + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchParams + 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.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchParams + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchParams + 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.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchParams + 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; + } + + /** + * + * + *
            +       * Search parameters.
            +       * 
            + * + * Protobuf type {@code + * google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchParams} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchParams) + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchParamsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.ConversationalSearchServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_SearchSpec_SearchParams_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.ConversationalSearchServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_SearchSpec_SearchParams_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchParams + .class, + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchParams + .Builder.class); + } + + // Construct using + // com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchParams.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetBoostSpecFieldBuilder(); + internalGetDataStoreSpecsFieldBuilder(); + internalGetNaturalLanguageQueryUnderstandingSpecFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + maxReturnResults_ = 0; + filter_ = ""; + boostSpec_ = null; + if (boostSpecBuilder_ != null) { + boostSpecBuilder_.dispose(); + boostSpecBuilder_ = null; + } + orderBy_ = ""; + searchResultMode_ = 0; + if (dataStoreSpecsBuilder_ == null) { + dataStoreSpecs_ = java.util.Collections.emptyList(); + } else { + dataStoreSpecs_ = null; + dataStoreSpecsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000020); + naturalLanguageQueryUnderstandingSpec_ = null; + if (naturalLanguageQueryUnderstandingSpecBuilder_ != null) { + naturalLanguageQueryUnderstandingSpecBuilder_.dispose(); + naturalLanguageQueryUnderstandingSpecBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1beta.ConversationalSearchServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_SearchSpec_SearchParams_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchParams + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchParams + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchParams + build() { + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchParams + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchParams + buildPartial() { + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchParams + result = + new com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchParams(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchParams + result) { + if (dataStoreSpecsBuilder_ == null) { + if (((bitField0_ & 0x00000020) != 0)) { + dataStoreSpecs_ = java.util.Collections.unmodifiableList(dataStoreSpecs_); + bitField0_ = (bitField0_ & ~0x00000020); + } + result.dataStoreSpecs_ = dataStoreSpecs_; + } else { + result.dataStoreSpecs_ = dataStoreSpecsBuilder_.build(); + } + } + + private void buildPartial0( + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchParams + result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.maxReturnResults_ = maxReturnResults_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.filter_ = filter_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.boostSpec_ = boostSpecBuilder_ == null ? boostSpec_ : boostSpecBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.orderBy_ = orderBy_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.searchResultMode_ = searchResultMode_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.naturalLanguageQueryUnderstandingSpec_ = + naturalLanguageQueryUnderstandingSpecBuilder_ == null + ? naturalLanguageQueryUnderstandingSpec_ + : naturalLanguageQueryUnderstandingSpecBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchParams) { + return mergeFrom( + (com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchParams) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchParams + other) { + if (other + == com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchParams + .getDefaultInstance()) return this; + if (other.getMaxReturnResults() != 0) { + setMaxReturnResults(other.getMaxReturnResults()); + } + if (!other.getFilter().isEmpty()) { + filter_ = other.filter_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasBoostSpec()) { + mergeBoostSpec(other.getBoostSpec()); + } + if (!other.getOrderBy().isEmpty()) { + orderBy_ = other.orderBy_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (other.searchResultMode_ != 0) { + setSearchResultModeValue(other.getSearchResultModeValue()); + } + if (dataStoreSpecsBuilder_ == null) { + if (!other.dataStoreSpecs_.isEmpty()) { + if (dataStoreSpecs_.isEmpty()) { + dataStoreSpecs_ = other.dataStoreSpecs_; + bitField0_ = (bitField0_ & ~0x00000020); + } else { + ensureDataStoreSpecsIsMutable(); + dataStoreSpecs_.addAll(other.dataStoreSpecs_); + } + onChanged(); + } + } else { + if (!other.dataStoreSpecs_.isEmpty()) { + if (dataStoreSpecsBuilder_.isEmpty()) { + dataStoreSpecsBuilder_.dispose(); + dataStoreSpecsBuilder_ = null; + dataStoreSpecs_ = other.dataStoreSpecs_; + bitField0_ = (bitField0_ & ~0x00000020); + dataStoreSpecsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetDataStoreSpecsFieldBuilder() + : null; + } else { + dataStoreSpecsBuilder_.addAllMessages(other.dataStoreSpecs_); + } + } + } + if (other.hasNaturalLanguageQueryUnderstandingSpec()) { + mergeNaturalLanguageQueryUnderstandingSpec( + other.getNaturalLanguageQueryUnderstandingSpec()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + maxReturnResults_ = input.readInt32(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 18: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage( + internalGetBoostSpecFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 40: + { + searchResultMode_ = input.readEnum(); + bitField0_ |= 0x00000010; + break; + } // case 40 + case 58: + { + com.google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec m = + input.readMessage( + com.google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec + .parser(), + extensionRegistry); + if (dataStoreSpecsBuilder_ == null) { + ensureDataStoreSpecsIsMutable(); + dataStoreSpecs_.add(m); + } else { + dataStoreSpecsBuilder_.addMessage(m); + } + break; + } // case 58 + case 66: + { + input.readMessage( + internalGetNaturalLanguageQueryUnderstandingSpecFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000040; + break; + } // case 66 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private int maxReturnResults_; + + /** + * + * + *
            +         * Number of search results to return.
            +         * The default value is 10.
            +         * 
            + * + * int32 max_return_results = 1; + * + * @return The maxReturnResults. + */ + @java.lang.Override + public int getMaxReturnResults() { + return maxReturnResults_; + } + + /** + * + * + *
            +         * Number of search results to return.
            +         * The default value is 10.
            +         * 
            + * + * int32 max_return_results = 1; + * + * @param value The maxReturnResults to set. + * @return This builder for chaining. + */ + public Builder setMaxReturnResults(int value) { + + maxReturnResults_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
            +         * Number of search results to return.
            +         * The default value is 10.
            +         * 
            + * + * int32 max_return_results = 1; + * + * @return This builder for chaining. + */ + public Builder clearMaxReturnResults() { + bitField0_ = (bitField0_ & ~0x00000001); + maxReturnResults_ = 0; + onChanged(); + return this; + } + + private java.lang.Object filter_ = ""; + + /** + * + * + *
            +         * The filter syntax consists of an expression language for constructing
            +         * a predicate from one or more fields of the documents being filtered.
            +         * Filter expression is case-sensitive. This will be used to filter
            +         * search results which may affect the Answer response.
            +         *
            +         * If this field is unrecognizable, an  `INVALID_ARGUMENT`  is returned.
            +         *
            +         * Filtering in Vertex AI Search is done by mapping the LHS filter key
            +         * to a key property defined in the Vertex AI Search backend -- this
            +         * mapping is defined by the customer in their schema. For example a
            +         * media customers might have a field 'name' in their schema. In this
            +         * case the filter would look like this: filter --> name:'ANY("king
            +         * kong")'
            +         *
            +         * For more information about filtering including syntax and filter
            +         * operators, see
            +         * [Filter](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata)
            +         * 
            + * + * string filter = 2; + * + * @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; + } + } + + /** + * + * + *
            +         * The filter syntax consists of an expression language for constructing
            +         * a predicate from one or more fields of the documents being filtered.
            +         * Filter expression is case-sensitive. This will be used to filter
            +         * search results which may affect the Answer response.
            +         *
            +         * If this field is unrecognizable, an  `INVALID_ARGUMENT`  is returned.
            +         *
            +         * Filtering in Vertex AI Search is done by mapping the LHS filter key
            +         * to a key property defined in the Vertex AI Search backend -- this
            +         * mapping is defined by the customer in their schema. For example a
            +         * media customers might have a field 'name' in their schema. In this
            +         * case the filter would look like this: filter --> name:'ANY("king
            +         * kong")'
            +         *
            +         * For more information about filtering including syntax and filter
            +         * operators, see
            +         * [Filter](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata)
            +         * 
            + * + * string filter = 2; + * + * @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; + } + } + + /** + * + * + *
            +         * The filter syntax consists of an expression language for constructing
            +         * a predicate from one or more fields of the documents being filtered.
            +         * Filter expression is case-sensitive. This will be used to filter
            +         * search results which may affect the Answer response.
            +         *
            +         * If this field is unrecognizable, an  `INVALID_ARGUMENT`  is returned.
            +         *
            +         * Filtering in Vertex AI Search is done by mapping the LHS filter key
            +         * to a key property defined in the Vertex AI Search backend -- this
            +         * mapping is defined by the customer in their schema. For example a
            +         * media customers might have a field 'name' in their schema. In this
            +         * case the filter would look like this: filter --> name:'ANY("king
            +         * kong")'
            +         *
            +         * For more information about filtering including syntax and filter
            +         * operators, see
            +         * [Filter](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata)
            +         * 
            + * + * string filter = 2; + * + * @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; + } + + /** + * + * + *
            +         * The filter syntax consists of an expression language for constructing
            +         * a predicate from one or more fields of the documents being filtered.
            +         * Filter expression is case-sensitive. This will be used to filter
            +         * search results which may affect the Answer response.
            +         *
            +         * If this field is unrecognizable, an  `INVALID_ARGUMENT`  is returned.
            +         *
            +         * Filtering in Vertex AI Search is done by mapping the LHS filter key
            +         * to a key property defined in the Vertex AI Search backend -- this
            +         * mapping is defined by the customer in their schema. For example a
            +         * media customers might have a field 'name' in their schema. In this
            +         * case the filter would look like this: filter --> name:'ANY("king
            +         * kong")'
            +         *
            +         * For more information about filtering including syntax and filter
            +         * operators, see
            +         * [Filter](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata)
            +         * 
            + * + * string filter = 2; + * + * @return This builder for chaining. + */ + public Builder clearFilter() { + filter_ = getDefaultInstance().getFilter(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
            +         * The filter syntax consists of an expression language for constructing
            +         * a predicate from one or more fields of the documents being filtered.
            +         * Filter expression is case-sensitive. This will be used to filter
            +         * search results which may affect the Answer response.
            +         *
            +         * If this field is unrecognizable, an  `INVALID_ARGUMENT`  is returned.
            +         *
            +         * Filtering in Vertex AI Search is done by mapping the LHS filter key
            +         * to a key property defined in the Vertex AI Search backend -- this
            +         * mapping is defined by the customer in their schema. For example a
            +         * media customers might have a field 'name' in their schema. In this
            +         * case the filter would look like this: filter --> name:'ANY("king
            +         * kong")'
            +         *
            +         * For more information about filtering including syntax and filter
            +         * operators, see
            +         * [Filter](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata)
            +         * 
            + * + * string filter = 2; + * + * @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 com.google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec boostSpec_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec, + com.google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec.Builder, + com.google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpecOrBuilder> + boostSpecBuilder_; + + /** + * + * + *
            +         * Boost specification to boost certain documents in search results which
            +         * may affect the answer query response. For more information on boosting,
            +         * see [Boosting](https://cloud.google.com/retail/docs/boosting#boost)
            +         * 
            + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec boost_spec = 3; + * + * @return Whether the boostSpec field is set. + */ + public boolean hasBoostSpec() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
            +         * Boost specification to boost certain documents in search results which
            +         * may affect the answer query response. For more information on boosting,
            +         * see [Boosting](https://cloud.google.com/retail/docs/boosting#boost)
            +         * 
            + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec boost_spec = 3; + * + * @return The boostSpec. + */ + public com.google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec getBoostSpec() { + if (boostSpecBuilder_ == null) { + return boostSpec_ == null + ? com.google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec + .getDefaultInstance() + : boostSpec_; + } else { + return boostSpecBuilder_.getMessage(); + } + } + + /** + * + * + *
            +         * Boost specification to boost certain documents in search results which
            +         * may affect the answer query response. For more information on boosting,
            +         * see [Boosting](https://cloud.google.com/retail/docs/boosting#boost)
            +         * 
            + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec boost_spec = 3; + */ + public Builder setBoostSpec( + com.google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec value) { + if (boostSpecBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + boostSpec_ = value; + } else { + boostSpecBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
            +         * Boost specification to boost certain documents in search results which
            +         * may affect the answer query response. For more information on boosting,
            +         * see [Boosting](https://cloud.google.com/retail/docs/boosting#boost)
            +         * 
            + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec boost_spec = 3; + */ + public Builder setBoostSpec( + com.google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec.Builder + builderForValue) { + if (boostSpecBuilder_ == null) { + boostSpec_ = builderForValue.build(); + } else { + boostSpecBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
            +         * Boost specification to boost certain documents in search results which
            +         * may affect the answer query response. For more information on boosting,
            +         * see [Boosting](https://cloud.google.com/retail/docs/boosting#boost)
            +         * 
            + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec boost_spec = 3; + */ + public Builder mergeBoostSpec( + com.google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec value) { + if (boostSpecBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && boostSpec_ != null + && boostSpec_ + != com.google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec + .getDefaultInstance()) { + getBoostSpecBuilder().mergeFrom(value); + } else { + boostSpec_ = value; + } + } else { + boostSpecBuilder_.mergeFrom(value); + } + if (boostSpec_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + + /** + * + * + *
            +         * Boost specification to boost certain documents in search results which
            +         * may affect the answer query response. For more information on boosting,
            +         * see [Boosting](https://cloud.google.com/retail/docs/boosting#boost)
            +         * 
            + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec boost_spec = 3; + */ + public Builder clearBoostSpec() { + bitField0_ = (bitField0_ & ~0x00000004); + boostSpec_ = null; + if (boostSpecBuilder_ != null) { + boostSpecBuilder_.dispose(); + boostSpecBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
            +         * Boost specification to boost certain documents in search results which
            +         * may affect the answer query response. For more information on boosting,
            +         * see [Boosting](https://cloud.google.com/retail/docs/boosting#boost)
            +         * 
            + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec boost_spec = 3; + */ + public com.google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec.Builder + getBoostSpecBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return internalGetBoostSpecFieldBuilder().getBuilder(); + } + + /** + * + * + *
            +         * Boost specification to boost certain documents in search results which
            +         * may affect the answer query response. For more information on boosting,
            +         * see [Boosting](https://cloud.google.com/retail/docs/boosting#boost)
            +         * 
            + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec boost_spec = 3; + */ + public com.google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpecOrBuilder + getBoostSpecOrBuilder() { + if (boostSpecBuilder_ != null) { + return boostSpecBuilder_.getMessageOrBuilder(); + } else { + return boostSpec_ == null + ? com.google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec + .getDefaultInstance() + : boostSpec_; + } + } + + /** + * + * + *
            +         * Boost specification to boost certain documents in search results which
            +         * may affect the answer query response. For more information on boosting,
            +         * see [Boosting](https://cloud.google.com/retail/docs/boosting#boost)
            +         * 
            + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec boost_spec = 3; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec, + com.google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec.Builder, + com.google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpecOrBuilder> + internalGetBoostSpecFieldBuilder() { + if (boostSpecBuilder_ == null) { + boostSpecBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec, + com.google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec.Builder, + com.google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpecOrBuilder>( + getBoostSpec(), getParentForChildren(), isClean()); + boostSpec_ = null; + } + return boostSpecBuilder_; + } + + private java.lang.Object orderBy_ = ""; + + /** + * + * + *
            +         * The order in which documents are returned. Documents can be ordered
            +         * by a field in an
            +         * [Document][google.cloud.discoveryengine.v1beta.Document] object. Leave
            +         * it unset if ordered by relevance. `order_by` expression is
            +         * case-sensitive. For more information on ordering, see
            +         * [Ordering](https://cloud.google.com/retail/docs/filter-and-order#order)
            +         *
            +         * If this field is unrecognizable, an `INVALID_ARGUMENT` is returned.
            +         * 
            + * + * string order_by = 4; + * + * @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; + } + } + + /** + * + * + *
            +         * The order in which documents are returned. Documents can be ordered
            +         * by a field in an
            +         * [Document][google.cloud.discoveryengine.v1beta.Document] object. Leave
            +         * it unset if ordered by relevance. `order_by` expression is
            +         * case-sensitive. For more information on ordering, see
            +         * [Ordering](https://cloud.google.com/retail/docs/filter-and-order#order)
            +         *
            +         * If this field is unrecognizable, an `INVALID_ARGUMENT` is returned.
            +         * 
            + * + * string order_by = 4; + * + * @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; + } + } + + /** + * + * + *
            +         * The order in which documents are returned. Documents can be ordered
            +         * by a field in an
            +         * [Document][google.cloud.discoveryengine.v1beta.Document] object. Leave
            +         * it unset if ordered by relevance. `order_by` expression is
            +         * case-sensitive. For more information on ordering, see
            +         * [Ordering](https://cloud.google.com/retail/docs/filter-and-order#order)
            +         *
            +         * If this field is unrecognizable, an `INVALID_ARGUMENT` is returned.
            +         * 
            + * + * string order_by = 4; + * + * @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_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
            +         * The order in which documents are returned. Documents can be ordered
            +         * by a field in an
            +         * [Document][google.cloud.discoveryengine.v1beta.Document] object. Leave
            +         * it unset if ordered by relevance. `order_by` expression is
            +         * case-sensitive. For more information on ordering, see
            +         * [Ordering](https://cloud.google.com/retail/docs/filter-and-order#order)
            +         *
            +         * If this field is unrecognizable, an `INVALID_ARGUMENT` is returned.
            +         * 
            + * + * string order_by = 4; + * + * @return This builder for chaining. + */ + public Builder clearOrderBy() { + orderBy_ = getDefaultInstance().getOrderBy(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + + /** + * + * + *
            +         * The order in which documents are returned. Documents can be ordered
            +         * by a field in an
            +         * [Document][google.cloud.discoveryengine.v1beta.Document] object. Leave
            +         * it unset if ordered by relevance. `order_by` expression is
            +         * case-sensitive. For more information on ordering, see
            +         * [Ordering](https://cloud.google.com/retail/docs/filter-and-order#order)
            +         *
            +         * If this field is unrecognizable, an `INVALID_ARGUMENT` is returned.
            +         * 
            + * + * string order_by = 4; + * + * @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_ |= 0x00000008; + onChanged(); + return this; + } + + private int searchResultMode_ = 0; + + /** + * + * + *
            +         * Specifies the search result mode. If unspecified, the
            +         * search result mode defaults to `DOCUMENTS`.
            +         * See [parse and chunk
            +         * documents](https://cloud.google.com/generative-ai-app-builder/docs/parse-chunk-documents)
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SearchResultMode search_result_mode = 5; + * + * + * @return The enum numeric value on the wire for searchResultMode. + */ + @java.lang.Override + public int getSearchResultModeValue() { + return searchResultMode_; + } + + /** + * + * + *
            +         * Specifies the search result mode. If unspecified, the
            +         * search result mode defaults to `DOCUMENTS`.
            +         * See [parse and chunk
            +         * documents](https://cloud.google.com/generative-ai-app-builder/docs/parse-chunk-documents)
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SearchResultMode search_result_mode = 5; + * + * + * @param value The enum numeric value on the wire for searchResultMode to set. + * @return This builder for chaining. + */ + public Builder setSearchResultModeValue(int value) { + searchResultMode_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
            +         * Specifies the search result mode. If unspecified, the
            +         * search result mode defaults to `DOCUMENTS`.
            +         * See [parse and chunk
            +         * documents](https://cloud.google.com/generative-ai-app-builder/docs/parse-chunk-documents)
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SearchResultMode search_result_mode = 5; + * + * + * @return The searchResultMode. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec + .SearchResultMode + getSearchResultMode() { + com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SearchResultMode + result = + com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec + .SearchResultMode.forNumber(searchResultMode_); + return result == null + ? com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec + .SearchResultMode.UNRECOGNIZED + : result; + } + + /** + * + * + *
            +         * Specifies the search result mode. If unspecified, the
            +         * search result mode defaults to `DOCUMENTS`.
            +         * See [parse and chunk
            +         * documents](https://cloud.google.com/generative-ai-app-builder/docs/parse-chunk-documents)
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SearchResultMode search_result_mode = 5; + * + * + * @param value The searchResultMode to set. + * @return This builder for chaining. + */ + public Builder setSearchResultMode( + com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SearchResultMode + value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000010; + searchResultMode_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
            +         * Specifies the search result mode. If unspecified, the
            +         * search result mode defaults to `DOCUMENTS`.
            +         * See [parse and chunk
            +         * documents](https://cloud.google.com/generative-ai-app-builder/docs/parse-chunk-documents)
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SearchResultMode search_result_mode = 5; + * + * + * @return This builder for chaining. + */ + public Builder clearSearchResultMode() { + bitField0_ = (bitField0_ & ~0x00000010); + searchResultMode_ = 0; + onChanged(); + return this; + } + + private java.util.List + dataStoreSpecs_ = java.util.Collections.emptyList(); + + private void ensureDataStoreSpecsIsMutable() { + if (!((bitField0_ & 0x00000020) != 0)) { + dataStoreSpecs_ = + new java.util.ArrayList< + com.google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec>( + dataStoreSpecs_); + bitField0_ |= 0x00000020; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec, + com.google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec.Builder, + com.google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpecOrBuilder> + dataStoreSpecsBuilder_; + + /** + * + * + *
            +         * Specs defining dataStores to filter on in a search call and
            +         * configurations for those dataStores. This is only considered for
            +         * engines with multiple dataStores use case. For single dataStore within
            +         * an engine, they should use the specs at the top level.
            +         * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec data_store_specs = 7; + * + */ + public java.util.List + getDataStoreSpecsList() { + if (dataStoreSpecsBuilder_ == null) { + return java.util.Collections.unmodifiableList(dataStoreSpecs_); + } else { + return dataStoreSpecsBuilder_.getMessageList(); + } + } + + /** + * + * + *
            +         * Specs defining dataStores to filter on in a search call and
            +         * configurations for those dataStores. This is only considered for
            +         * engines with multiple dataStores use case. For single dataStore within
            +         * an engine, they should use the specs at the top level.
            +         * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec data_store_specs = 7; + * + */ + public int getDataStoreSpecsCount() { + if (dataStoreSpecsBuilder_ == null) { + return dataStoreSpecs_.size(); + } else { + return dataStoreSpecsBuilder_.getCount(); + } + } + + /** + * + * + *
            +         * Specs defining dataStores to filter on in a search call and
            +         * configurations for those dataStores. This is only considered for
            +         * engines with multiple dataStores use case. For single dataStore within
            +         * an engine, they should use the specs at the top level.
            +         * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec data_store_specs = 7; + * + */ + public com.google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec + getDataStoreSpecs(int index) { + if (dataStoreSpecsBuilder_ == null) { + return dataStoreSpecs_.get(index); + } else { + return dataStoreSpecsBuilder_.getMessage(index); + } + } + + /** + * + * + *
            +         * Specs defining dataStores to filter on in a search call and
            +         * configurations for those dataStores. This is only considered for
            +         * engines with multiple dataStores use case. For single dataStore within
            +         * an engine, they should use the specs at the top level.
            +         * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec data_store_specs = 7; + * + */ + public Builder setDataStoreSpecs( + int index, com.google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec value) { + if (dataStoreSpecsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDataStoreSpecsIsMutable(); + dataStoreSpecs_.set(index, value); + onChanged(); + } else { + dataStoreSpecsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
            +         * Specs defining dataStores to filter on in a search call and
            +         * configurations for those dataStores. This is only considered for
            +         * engines with multiple dataStores use case. For single dataStore within
            +         * an engine, they should use the specs at the top level.
            +         * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec data_store_specs = 7; + * + */ + public Builder setDataStoreSpecs( + int index, + com.google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec.Builder + builderForValue) { + if (dataStoreSpecsBuilder_ == null) { + ensureDataStoreSpecsIsMutable(); + dataStoreSpecs_.set(index, builderForValue.build()); + onChanged(); + } else { + dataStoreSpecsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
            +         * Specs defining dataStores to filter on in a search call and
            +         * configurations for those dataStores. This is only considered for
            +         * engines with multiple dataStores use case. For single dataStore within
            +         * an engine, they should use the specs at the top level.
            +         * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec data_store_specs = 7; + * + */ + public Builder addDataStoreSpecs( + com.google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec value) { + if (dataStoreSpecsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDataStoreSpecsIsMutable(); + dataStoreSpecs_.add(value); + onChanged(); + } else { + dataStoreSpecsBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
            +         * Specs defining dataStores to filter on in a search call and
            +         * configurations for those dataStores. This is only considered for
            +         * engines with multiple dataStores use case. For single dataStore within
            +         * an engine, they should use the specs at the top level.
            +         * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec data_store_specs = 7; + * + */ + public Builder addDataStoreSpecs( + int index, com.google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec value) { + if (dataStoreSpecsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDataStoreSpecsIsMutable(); + dataStoreSpecs_.add(index, value); + onChanged(); + } else { + dataStoreSpecsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
            +         * Specs defining dataStores to filter on in a search call and
            +         * configurations for those dataStores. This is only considered for
            +         * engines with multiple dataStores use case. For single dataStore within
            +         * an engine, they should use the specs at the top level.
            +         * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec data_store_specs = 7; + * + */ + public Builder addDataStoreSpecs( + com.google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec.Builder + builderForValue) { + if (dataStoreSpecsBuilder_ == null) { + ensureDataStoreSpecsIsMutable(); + dataStoreSpecs_.add(builderForValue.build()); + onChanged(); + } else { + dataStoreSpecsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
            +         * Specs defining dataStores to filter on in a search call and
            +         * configurations for those dataStores. This is only considered for
            +         * engines with multiple dataStores use case. For single dataStore within
            +         * an engine, they should use the specs at the top level.
            +         * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec data_store_specs = 7; + * + */ + public Builder addDataStoreSpecs( + int index, + com.google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec.Builder + builderForValue) { + if (dataStoreSpecsBuilder_ == null) { + ensureDataStoreSpecsIsMutable(); + dataStoreSpecs_.add(index, builderForValue.build()); + onChanged(); + } else { + dataStoreSpecsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
            +         * Specs defining dataStores to filter on in a search call and
            +         * configurations for those dataStores. This is only considered for
            +         * engines with multiple dataStores use case. For single dataStore within
            +         * an engine, they should use the specs at the top level.
            +         * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec data_store_specs = 7; + * + */ + public Builder addAllDataStoreSpecs( + java.lang.Iterable< + ? extends com.google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec> + values) { + if (dataStoreSpecsBuilder_ == null) { + ensureDataStoreSpecsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, dataStoreSpecs_); + onChanged(); + } else { + dataStoreSpecsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
            +         * Specs defining dataStores to filter on in a search call and
            +         * configurations for those dataStores. This is only considered for
            +         * engines with multiple dataStores use case. For single dataStore within
            +         * an engine, they should use the specs at the top level.
            +         * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec data_store_specs = 7; + * + */ + public Builder clearDataStoreSpecs() { + if (dataStoreSpecsBuilder_ == null) { + dataStoreSpecs_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + } else { + dataStoreSpecsBuilder_.clear(); + } + return this; + } + + /** + * + * + *
            +         * Specs defining dataStores to filter on in a search call and
            +         * configurations for those dataStores. This is only considered for
            +         * engines with multiple dataStores use case. For single dataStore within
            +         * an engine, they should use the specs at the top level.
            +         * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec data_store_specs = 7; + * + */ + public Builder removeDataStoreSpecs(int index) { + if (dataStoreSpecsBuilder_ == null) { + ensureDataStoreSpecsIsMutable(); + dataStoreSpecs_.remove(index); + onChanged(); + } else { + dataStoreSpecsBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
            +         * Specs defining dataStores to filter on in a search call and
            +         * configurations for those dataStores. This is only considered for
            +         * engines with multiple dataStores use case. For single dataStore within
            +         * an engine, they should use the specs at the top level.
            +         * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec data_store_specs = 7; + * + */ + public com.google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec.Builder + getDataStoreSpecsBuilder(int index) { + return internalGetDataStoreSpecsFieldBuilder().getBuilder(index); + } + + /** + * + * + *
            +         * Specs defining dataStores to filter on in a search call and
            +         * configurations for those dataStores. This is only considered for
            +         * engines with multiple dataStores use case. For single dataStore within
            +         * an engine, they should use the specs at the top level.
            +         * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec data_store_specs = 7; + * + */ + public com.google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpecOrBuilder + getDataStoreSpecsOrBuilder(int index) { + if (dataStoreSpecsBuilder_ == null) { + return dataStoreSpecs_.get(index); + } else { + return dataStoreSpecsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
            +         * Specs defining dataStores to filter on in a search call and
            +         * configurations for those dataStores. This is only considered for
            +         * engines with multiple dataStores use case. For single dataStore within
            +         * an engine, they should use the specs at the top level.
            +         * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec data_store_specs = 7; + * + */ + public java.util.List< + ? extends + com.google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpecOrBuilder> + getDataStoreSpecsOrBuilderList() { + if (dataStoreSpecsBuilder_ != null) { + return dataStoreSpecsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(dataStoreSpecs_); + } + } + + /** + * + * + *
            +         * Specs defining dataStores to filter on in a search call and
            +         * configurations for those dataStores. This is only considered for
            +         * engines with multiple dataStores use case. For single dataStore within
            +         * an engine, they should use the specs at the top level.
            +         * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec data_store_specs = 7; + * + */ + public com.google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec.Builder + addDataStoreSpecsBuilder() { + return internalGetDataStoreSpecsFieldBuilder() + .addBuilder( + com.google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec + .getDefaultInstance()); + } + + /** + * + * + *
            +         * Specs defining dataStores to filter on in a search call and
            +         * configurations for those dataStores. This is only considered for
            +         * engines with multiple dataStores use case. For single dataStore within
            +         * an engine, they should use the specs at the top level.
            +         * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec data_store_specs = 7; + * + */ + public com.google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec.Builder + addDataStoreSpecsBuilder(int index) { + return internalGetDataStoreSpecsFieldBuilder() + .addBuilder( + index, + com.google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec + .getDefaultInstance()); + } + + /** + * + * + *
            +         * Specs defining dataStores to filter on in a search call and
            +         * configurations for those dataStores. This is only considered for
            +         * engines with multiple dataStores use case. For single dataStore within
            +         * an engine, they should use the specs at the top level.
            +         * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec data_store_specs = 7; + * + */ + public java.util.List< + com.google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec.Builder> + getDataStoreSpecsBuilderList() { + return internalGetDataStoreSpecsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec, + com.google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec.Builder, + com.google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpecOrBuilder> + internalGetDataStoreSpecsFieldBuilder() { + if (dataStoreSpecsBuilder_ == null) { + dataStoreSpecsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec, + com.google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec.Builder, + com.google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpecOrBuilder>( + dataStoreSpecs_, + ((bitField0_ & 0x00000020) != 0), + getParentForChildren(), + isClean()); + dataStoreSpecs_ = null; + } + return dataStoreSpecsBuilder_; + } + + private com.google.cloud.discoveryengine.v1beta.SearchRequest + .NaturalLanguageQueryUnderstandingSpec + naturalLanguageQueryUnderstandingSpec_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.SearchRequest + .NaturalLanguageQueryUnderstandingSpec, + com.google.cloud.discoveryengine.v1beta.SearchRequest + .NaturalLanguageQueryUnderstandingSpec.Builder, + com.google.cloud.discoveryengine.v1beta.SearchRequest + .NaturalLanguageQueryUnderstandingSpecOrBuilder> + naturalLanguageQueryUnderstandingSpecBuilder_; + + /** + * + * + *
            +         * Optional. Specification to enable natural language understanding
            +         * capabilities for search requests.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.NaturalLanguageQueryUnderstandingSpec natural_language_query_understanding_spec = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the naturalLanguageQueryUnderstandingSpec field is set. + */ + public boolean hasNaturalLanguageQueryUnderstandingSpec() { + return ((bitField0_ & 0x00000040) != 0); + } + + /** + * + * + *
            +         * Optional. Specification to enable natural language understanding
            +         * capabilities for search requests.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.NaturalLanguageQueryUnderstandingSpec natural_language_query_understanding_spec = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The naturalLanguageQueryUnderstandingSpec. + */ + public com.google.cloud.discoveryengine.v1beta.SearchRequest + .NaturalLanguageQueryUnderstandingSpec + getNaturalLanguageQueryUnderstandingSpec() { + if (naturalLanguageQueryUnderstandingSpecBuilder_ == null) { + return naturalLanguageQueryUnderstandingSpec_ == null + ? com.google.cloud.discoveryengine.v1beta.SearchRequest + .NaturalLanguageQueryUnderstandingSpec.getDefaultInstance() + : naturalLanguageQueryUnderstandingSpec_; + } else { + return naturalLanguageQueryUnderstandingSpecBuilder_.getMessage(); + } + } + + /** + * + * + *
            +         * Optional. Specification to enable natural language understanding
            +         * capabilities for search requests.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.NaturalLanguageQueryUnderstandingSpec natural_language_query_understanding_spec = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setNaturalLanguageQueryUnderstandingSpec( + com.google.cloud.discoveryengine.v1beta.SearchRequest + .NaturalLanguageQueryUnderstandingSpec + value) { + if (naturalLanguageQueryUnderstandingSpecBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + naturalLanguageQueryUnderstandingSpec_ = value; + } else { + naturalLanguageQueryUnderstandingSpecBuilder_.setMessage(value); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + /** + * + * + *
            +         * Optional. Specification to enable natural language understanding
            +         * capabilities for search requests.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.NaturalLanguageQueryUnderstandingSpec natural_language_query_understanding_spec = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setNaturalLanguageQueryUnderstandingSpec( + com.google.cloud.discoveryengine.v1beta.SearchRequest + .NaturalLanguageQueryUnderstandingSpec.Builder + builderForValue) { + if (naturalLanguageQueryUnderstandingSpecBuilder_ == null) { + naturalLanguageQueryUnderstandingSpec_ = builderForValue.build(); + } else { + naturalLanguageQueryUnderstandingSpecBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + /** + * + * + *
            +         * Optional. Specification to enable natural language understanding
            +         * capabilities for search requests.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.NaturalLanguageQueryUnderstandingSpec natural_language_query_understanding_spec = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeNaturalLanguageQueryUnderstandingSpec( + com.google.cloud.discoveryengine.v1beta.SearchRequest + .NaturalLanguageQueryUnderstandingSpec + value) { + if (naturalLanguageQueryUnderstandingSpecBuilder_ == null) { + if (((bitField0_ & 0x00000040) != 0) + && naturalLanguageQueryUnderstandingSpec_ != null + && naturalLanguageQueryUnderstandingSpec_ + != com.google.cloud.discoveryengine.v1beta.SearchRequest + .NaturalLanguageQueryUnderstandingSpec.getDefaultInstance()) { + getNaturalLanguageQueryUnderstandingSpecBuilder().mergeFrom(value); + } else { + naturalLanguageQueryUnderstandingSpec_ = value; + } + } else { + naturalLanguageQueryUnderstandingSpecBuilder_.mergeFrom(value); + } + if (naturalLanguageQueryUnderstandingSpec_ != null) { + bitField0_ |= 0x00000040; + onChanged(); + } + return this; + } + + /** + * + * + *
            +         * Optional. Specification to enable natural language understanding
            +         * capabilities for search requests.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.NaturalLanguageQueryUnderstandingSpec natural_language_query_understanding_spec = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearNaturalLanguageQueryUnderstandingSpec() { + bitField0_ = (bitField0_ & ~0x00000040); + naturalLanguageQueryUnderstandingSpec_ = null; + if (naturalLanguageQueryUnderstandingSpecBuilder_ != null) { + naturalLanguageQueryUnderstandingSpecBuilder_.dispose(); + naturalLanguageQueryUnderstandingSpecBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
            +         * Optional. Specification to enable natural language understanding
            +         * capabilities for search requests.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.NaturalLanguageQueryUnderstandingSpec natural_language_query_understanding_spec = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.discoveryengine.v1beta.SearchRequest + .NaturalLanguageQueryUnderstandingSpec.Builder + getNaturalLanguageQueryUnderstandingSpecBuilder() { + bitField0_ |= 0x00000040; + onChanged(); + return internalGetNaturalLanguageQueryUnderstandingSpecFieldBuilder().getBuilder(); + } + + /** + * + * + *
            +         * Optional. Specification to enable natural language understanding
            +         * capabilities for search requests.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.NaturalLanguageQueryUnderstandingSpec natural_language_query_understanding_spec = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.discoveryengine.v1beta.SearchRequest + .NaturalLanguageQueryUnderstandingSpecOrBuilder + getNaturalLanguageQueryUnderstandingSpecOrBuilder() { + if (naturalLanguageQueryUnderstandingSpecBuilder_ != null) { + return naturalLanguageQueryUnderstandingSpecBuilder_.getMessageOrBuilder(); + } else { + return naturalLanguageQueryUnderstandingSpec_ == null + ? com.google.cloud.discoveryengine.v1beta.SearchRequest + .NaturalLanguageQueryUnderstandingSpec.getDefaultInstance() + : naturalLanguageQueryUnderstandingSpec_; + } + } + + /** + * + * + *
            +         * Optional. Specification to enable natural language understanding
            +         * capabilities for search requests.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.NaturalLanguageQueryUnderstandingSpec natural_language_query_understanding_spec = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.SearchRequest + .NaturalLanguageQueryUnderstandingSpec, + com.google.cloud.discoveryengine.v1beta.SearchRequest + .NaturalLanguageQueryUnderstandingSpec.Builder, + com.google.cloud.discoveryengine.v1beta.SearchRequest + .NaturalLanguageQueryUnderstandingSpecOrBuilder> + internalGetNaturalLanguageQueryUnderstandingSpecFieldBuilder() { + if (naturalLanguageQueryUnderstandingSpecBuilder_ == null) { + naturalLanguageQueryUnderstandingSpecBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.SearchRequest + .NaturalLanguageQueryUnderstandingSpec, + com.google.cloud.discoveryengine.v1beta.SearchRequest + .NaturalLanguageQueryUnderstandingSpec.Builder, + com.google.cloud.discoveryengine.v1beta.SearchRequest + .NaturalLanguageQueryUnderstandingSpecOrBuilder>( + getNaturalLanguageQueryUnderstandingSpec(), getParentForChildren(), isClean()); + naturalLanguageQueryUnderstandingSpec_ = null; + } + return naturalLanguageQueryUnderstandingSpecBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchParams) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchParams) + private static final com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchParams + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchParams(); + } + + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchParams + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SearchParams parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchParams + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface SearchResultListOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
            +       * Search results.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult search_results = 1; + * + */ + java.util.List< + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList + .SearchResult> + getSearchResultsList(); + + /** + * + * + *
            +       * Search results.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult search_results = 1; + * + */ + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList + .SearchResult + getSearchResults(int index); + + /** + * + * + *
            +       * Search results.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult search_results = 1; + * + */ + int getSearchResultsCount(); + + /** + * + * + *
            +       * Search results.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult search_results = 1; + * + */ + java.util.List< + ? extends + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResultOrBuilder> + getSearchResultsOrBuilderList(); + + /** + * + * + *
            +       * Search results.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult search_results = 1; + * + */ + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList + .SearchResultOrBuilder + getSearchResultsOrBuilder(int index); + } + + /** + * + * + *
            +     * Search result list.
            +     * 
            + * + * Protobuf type {@code + * google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList} + */ + public static final class SearchResultList extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList) + SearchResultListOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "SearchResultList"); + } + + // Use SearchResultList.newBuilder() to construct. + private SearchResultList(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private SearchResultList() { + searchResults_ = java.util.Collections.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.ConversationalSearchServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_SearchSpec_SearchResultList_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.ConversationalSearchServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_SearchSpec_SearchResultList_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.class, + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.Builder.class); + } + + public interface SearchResultOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
            +         * Unstructured document information.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo unstructured_document_info = 1; + * + * + * @return Whether the unstructuredDocumentInfo field is set. + */ + boolean hasUnstructuredDocumentInfo(); + + /** + * + * + *
            +         * Unstructured document information.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo unstructured_document_info = 1; + * + * + * @return The unstructuredDocumentInfo. + */ + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList + .SearchResult.UnstructuredDocumentInfo + getUnstructuredDocumentInfo(); + + /** + * + * + *
            +         * Unstructured document information.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo unstructured_document_info = 1; + * + */ + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList + .SearchResult.UnstructuredDocumentInfoOrBuilder + getUnstructuredDocumentInfoOrBuilder(); + + /** + * + * + *
            +         * Chunk information.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.ChunkInfo chunk_info = 2; + * + * + * @return Whether the chunkInfo field is set. + */ + boolean hasChunkInfo(); + + /** + * + * + *
            +         * Chunk information.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.ChunkInfo chunk_info = 2; + * + * + * @return The chunkInfo. + */ + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList + .SearchResult.ChunkInfo + getChunkInfo(); + + /** + * + * + *
            +         * Chunk information.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.ChunkInfo chunk_info = 2; + * + */ + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList + .SearchResult.ChunkInfoOrBuilder + getChunkInfoOrBuilder(); + + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList + .SearchResult.ContentCase + getContentCase(); + } + + /** + * + * + *
            +       * Search result.
            +       * 
            + * + * Protobuf type {@code + * google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult} + */ + public static final class SearchResult extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult) + SearchResultOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "SearchResult"); + } + + // Use SearchResult.newBuilder() to construct. + private SearchResult(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private SearchResult() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.ConversationalSearchServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_SearchSpec_SearchResultList_SearchResult_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.ConversationalSearchServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_SearchSpec_SearchResultList_SearchResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.class, + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.Builder.class); + } + + public interface UnstructuredDocumentInfoOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
            +           * Document resource name.
            +           * 
            + * + * string document = 1 [(.google.api.resource_reference) = { ... } + * + * @return The document. + */ + java.lang.String getDocument(); + + /** + * + * + *
            +           * Document resource name.
            +           * 
            + * + * string document = 1 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for document. + */ + com.google.protobuf.ByteString getDocumentBytes(); + + /** + * + * + *
            +           * URI for the document.
            +           * 
            + * + * string uri = 2; + * + * @return The uri. + */ + java.lang.String getUri(); + + /** + * + * + *
            +           * URI for the document.
            +           * 
            + * + * string uri = 2; + * + * @return The bytes for uri. + */ + com.google.protobuf.ByteString getUriBytes(); + + /** + * + * + *
            +           * Title.
            +           * 
            + * + * string title = 3; + * + * @return The title. + */ + java.lang.String getTitle(); + + /** + * + * + *
            +           * Title.
            +           * 
            + * + * string title = 3; + * + * @return The bytes for title. + */ + com.google.protobuf.ByteString getTitleBytes(); + + /** + * + * + *
            +           * List of document contexts. The content will be used for Answer
            +           * Generation. This is supposed to be the main content of the document
            +           * that can be long and comprehensive.
            +           * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.DocumentContext document_contexts = 4; + * + */ + java.util.List< + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo.DocumentContext> + getDocumentContextsList(); + + /** + * + * + *
            +           * List of document contexts. The content will be used for Answer
            +           * Generation. This is supposed to be the main content of the document
            +           * that can be long and comprehensive.
            +           * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.DocumentContext document_contexts = 4; + * + */ + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList + .SearchResult.UnstructuredDocumentInfo.DocumentContext + getDocumentContexts(int index); + + /** + * + * + *
            +           * List of document contexts. The content will be used for Answer
            +           * Generation. This is supposed to be the main content of the document
            +           * that can be long and comprehensive.
            +           * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.DocumentContext document_contexts = 4; + * + */ + int getDocumentContextsCount(); + + /** + * + * + *
            +           * List of document contexts. The content will be used for Answer
            +           * Generation. This is supposed to be the main content of the document
            +           * that can be long and comprehensive.
            +           * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.DocumentContext document_contexts = 4; + * + */ + java.util.List< + ? extends + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo + .DocumentContextOrBuilder> + getDocumentContextsOrBuilderList(); + + /** + * + * + *
            +           * List of document contexts. The content will be used for Answer
            +           * Generation. This is supposed to be the main content of the document
            +           * that can be long and comprehensive.
            +           * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.DocumentContext document_contexts = 4; + * + */ + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList + .SearchResult.UnstructuredDocumentInfo.DocumentContextOrBuilder + getDocumentContextsOrBuilder(int index); + + /** + * + * + *
            +           * List of extractive segments.
            +           * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveSegment extractive_segments = 5; + * + */ + java.util.List< + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveSegment> + getExtractiveSegmentsList(); + + /** + * + * + *
            +           * List of extractive segments.
            +           * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveSegment extractive_segments = 5; + * + */ + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList + .SearchResult.UnstructuredDocumentInfo.ExtractiveSegment + getExtractiveSegments(int index); + + /** + * + * + *
            +           * List of extractive segments.
            +           * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveSegment extractive_segments = 5; + * + */ + int getExtractiveSegmentsCount(); + + /** + * + * + *
            +           * List of extractive segments.
            +           * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveSegment extractive_segments = 5; + * + */ + java.util.List< + ? extends + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo + .ExtractiveSegmentOrBuilder> + getExtractiveSegmentsOrBuilderList(); + + /** + * + * + *
            +           * List of extractive segments.
            +           * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveSegment extractive_segments = 5; + * + */ + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList + .SearchResult.UnstructuredDocumentInfo.ExtractiveSegmentOrBuilder + getExtractiveSegmentsOrBuilder(int index); + + /** + * + * + *
            +           * Deprecated: This field is deprecated and will have no effect on
            +           * the Answer generation.
            +           * Please use document_contexts and extractive_segments fields.
            +           * List of extractive answers.
            +           * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveAnswer extractive_answers = 6 [deprecated = true]; + * + */ + @java.lang.Deprecated + java.util.List< + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveAnswer> + getExtractiveAnswersList(); + + /** + * + * + *
            +           * Deprecated: This field is deprecated and will have no effect on
            +           * the Answer generation.
            +           * Please use document_contexts and extractive_segments fields.
            +           * List of extractive answers.
            +           * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveAnswer extractive_answers = 6 [deprecated = true]; + * + */ + @java.lang.Deprecated + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList + .SearchResult.UnstructuredDocumentInfo.ExtractiveAnswer + getExtractiveAnswers(int index); + + /** + * + * + *
            +           * Deprecated: This field is deprecated and will have no effect on
            +           * the Answer generation.
            +           * Please use document_contexts and extractive_segments fields.
            +           * List of extractive answers.
            +           * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveAnswer extractive_answers = 6 [deprecated = true]; + * + */ + @java.lang.Deprecated + int getExtractiveAnswersCount(); + + /** + * + * + *
            +           * Deprecated: This field is deprecated and will have no effect on
            +           * the Answer generation.
            +           * Please use document_contexts and extractive_segments fields.
            +           * List of extractive answers.
            +           * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveAnswer extractive_answers = 6 [deprecated = true]; + * + */ + @java.lang.Deprecated + java.util.List< + ? extends + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo + .ExtractiveAnswerOrBuilder> + getExtractiveAnswersOrBuilderList(); + + /** + * + * + *
            +           * Deprecated: This field is deprecated and will have no effect on
            +           * the Answer generation.
            +           * Please use document_contexts and extractive_segments fields.
            +           * List of extractive answers.
            +           * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveAnswer extractive_answers = 6 [deprecated = true]; + * + */ + @java.lang.Deprecated + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList + .SearchResult.UnstructuredDocumentInfo.ExtractiveAnswerOrBuilder + getExtractiveAnswersOrBuilder(int index); + } + + /** + * + * + *
            +         * Unstructured document information.
            +         * 
            + * + * Protobuf type {@code + * google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo} + */ + public static final class UnstructuredDocumentInfo + extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo) + UnstructuredDocumentInfoOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "UnstructuredDocumentInfo"); + } + + // Use UnstructuredDocumentInfo.newBuilder() to construct. + private UnstructuredDocumentInfo( + com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private UnstructuredDocumentInfo() { + document_ = ""; + uri_ = ""; + title_ = ""; + documentContexts_ = java.util.Collections.emptyList(); + extractiveSegments_ = java.util.Collections.emptyList(); + extractiveAnswers_ = java.util.Collections.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.ConversationalSearchServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_SearchSpec_SearchResultList_SearchResult_UnstructuredDocumentInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.ConversationalSearchServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_SearchSpec_SearchResultList_SearchResult_UnstructuredDocumentInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo.class, + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo.Builder.class); + } + + public interface DocumentContextOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.DocumentContext) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
            +             * Page identifier.
            +             * 
            + * + * string page_identifier = 1; + * + * @return The pageIdentifier. + */ + java.lang.String getPageIdentifier(); + + /** + * + * + *
            +             * Page identifier.
            +             * 
            + * + * string page_identifier = 1; + * + * @return The bytes for pageIdentifier. + */ + com.google.protobuf.ByteString getPageIdentifierBytes(); + + /** + * + * + *
            +             * Document content to be used for answer generation.
            +             * 
            + * + * string content = 2; + * + * @return The content. + */ + java.lang.String getContent(); + + /** + * + * + *
            +             * Document content to be used for answer generation.
            +             * 
            + * + * string content = 2; + * + * @return The bytes for content. + */ + com.google.protobuf.ByteString getContentBytes(); + } + + /** + * + * + *
            +           * Document context.
            +           * 
            + * + * Protobuf type {@code + * google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.DocumentContext} + */ + public static final class DocumentContext extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.DocumentContext) + DocumentContextOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "DocumentContext"); + } + + // Use DocumentContext.newBuilder() to construct. + private DocumentContext(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private DocumentContext() { + pageIdentifier_ = ""; + content_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.ConversationalSearchServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_SearchSpec_SearchResultList_SearchResult_UnstructuredDocumentInfo_DocumentContext_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.ConversationalSearchServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_SearchSpec_SearchResultList_SearchResult_UnstructuredDocumentInfo_DocumentContext_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo.DocumentContext + .class, + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo.DocumentContext + .Builder.class); + } + + public static final int PAGE_IDENTIFIER_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object pageIdentifier_ = ""; + + /** + * + * + *
            +             * Page identifier.
            +             * 
            + * + * string page_identifier = 1; + * + * @return The pageIdentifier. + */ + @java.lang.Override + public java.lang.String getPageIdentifier() { + java.lang.Object ref = pageIdentifier_; + 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(); + pageIdentifier_ = s; + return s; + } + } + + /** + * + * + *
            +             * Page identifier.
            +             * 
            + * + * string page_identifier = 1; + * + * @return The bytes for pageIdentifier. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageIdentifierBytes() { + java.lang.Object ref = pageIdentifier_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageIdentifier_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CONTENT_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object content_ = ""; + + /** + * + * + *
            +             * Document content to be used for answer generation.
            +             * 
            + * + * string content = 2; + * + * @return The content. + */ + @java.lang.Override + public java.lang.String getContent() { + java.lang.Object ref = content_; + 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(); + content_ = s; + return s; + } + } + + /** + * + * + *
            +             * Document content to be used for answer generation.
            +             * 
            + * + * string content = 2; + * + * @return The bytes for content. + */ + @java.lang.Override + public com.google.protobuf.ByteString getContentBytes() { + java.lang.Object ref = content_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + content_ = 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 { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageIdentifier_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, pageIdentifier_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(content_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, content_); + } + 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(pageIdentifier_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, pageIdentifier_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(content_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, content_); + } + 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.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo.DocumentContext)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList + .SearchResult.UnstructuredDocumentInfo.DocumentContext + other = + (com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo + .DocumentContext) + obj; + + if (!getPageIdentifier().equals(other.getPageIdentifier())) return false; + if (!getContent().equals(other.getContent())) 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) + PAGE_IDENTIFIER_FIELD_NUMBER; + hash = (53 * hash) + getPageIdentifier().hashCode(); + hash = (37 * hash) + CONTENT_FIELD_NUMBER; + hash = (53 * hash) + getContent().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo.DocumentContext + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo.DocumentContext + 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.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo.DocumentContext + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo.DocumentContext + 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.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo.DocumentContext + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo.DocumentContext + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo.DocumentContext + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo.DocumentContext + 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.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo.DocumentContext + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo.DocumentContext + 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.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo.DocumentContext + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo.DocumentContext + 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.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo.DocumentContext + 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; + } + + /** + * + * + *
            +             * Document context.
            +             * 
            + * + * Protobuf type {@code + * google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.DocumentContext} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.DocumentContext) + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo + .DocumentContextOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.ConversationalSearchServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_SearchSpec_SearchResultList_SearchResult_UnstructuredDocumentInfo_DocumentContext_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.ConversationalSearchServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_SearchSpec_SearchResultList_SearchResult_UnstructuredDocumentInfo_DocumentContext_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo.DocumentContext + .class, + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo.DocumentContext + .Builder.class); + } + + // Construct using + // com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.DocumentContext.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + pageIdentifier_ = ""; + content_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1beta.ConversationalSearchServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_SearchSpec_SearchResultList_SearchResult_UnstructuredDocumentInfo_DocumentContext_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo.DocumentContext + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo.DocumentContext + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo.DocumentContext + build() { + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo.DocumentContext + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo.DocumentContext + buildPartial() { + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo.DocumentContext + result = + new com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo.DocumentContext( + this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo.DocumentContext + result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.pageIdentifier_ = pageIdentifier_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.content_ = content_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo.DocumentContext) { + return mergeFrom( + (com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo + .DocumentContext) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo.DocumentContext + other) { + if (other + == com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo.DocumentContext + .getDefaultInstance()) return this; + if (!other.getPageIdentifier().isEmpty()) { + pageIdentifier_ = other.pageIdentifier_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getContent().isEmpty()) { + content_ = other.content_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + pageIdentifier_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + content_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object pageIdentifier_ = ""; + + /** + * + * + *
            +               * Page identifier.
            +               * 
            + * + * string page_identifier = 1; + * + * @return The pageIdentifier. + */ + public java.lang.String getPageIdentifier() { + java.lang.Object ref = pageIdentifier_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageIdentifier_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
            +               * Page identifier.
            +               * 
            + * + * string page_identifier = 1; + * + * @return The bytes for pageIdentifier. + */ + public com.google.protobuf.ByteString getPageIdentifierBytes() { + java.lang.Object ref = pageIdentifier_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageIdentifier_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
            +               * Page identifier.
            +               * 
            + * + * string page_identifier = 1; + * + * @param value The pageIdentifier to set. + * @return This builder for chaining. + */ + public Builder setPageIdentifier(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + pageIdentifier_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
            +               * Page identifier.
            +               * 
            + * + * string page_identifier = 1; + * + * @return This builder for chaining. + */ + public Builder clearPageIdentifier() { + pageIdentifier_ = getDefaultInstance().getPageIdentifier(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
            +               * Page identifier.
            +               * 
            + * + * string page_identifier = 1; + * + * @param value The bytes for pageIdentifier to set. + * @return This builder for chaining. + */ + public Builder setPageIdentifierBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + pageIdentifier_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object content_ = ""; + + /** + * + * + *
            +               * Document content to be used for answer generation.
            +               * 
            + * + * string content = 2; + * + * @return The content. + */ + public java.lang.String getContent() { + java.lang.Object ref = content_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + content_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
            +               * Document content to be used for answer generation.
            +               * 
            + * + * string content = 2; + * + * @return The bytes for content. + */ + public com.google.protobuf.ByteString getContentBytes() { + java.lang.Object ref = content_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + content_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
            +               * Document content to be used for answer generation.
            +               * 
            + * + * string content = 2; + * + * @param value The content to set. + * @return This builder for chaining. + */ + public Builder setContent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + content_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
            +               * Document content to be used for answer generation.
            +               * 
            + * + * string content = 2; + * + * @return This builder for chaining. + */ + public Builder clearContent() { + content_ = getDefaultInstance().getContent(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
            +               * Document content to be used for answer generation.
            +               * 
            + * + * string content = 2; + * + * @param value The bytes for content to set. + * @return This builder for chaining. + */ + public Builder setContentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + content_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.DocumentContext) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.DocumentContext) + private static final com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest + .SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo + .DocumentContext + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo.DocumentContext(); + } + + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo.DocumentContext + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DocumentContext parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo.DocumentContext + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface ExtractiveSegmentOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveSegment) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
            +             * Page identifier.
            +             * 
            + * + * string page_identifier = 1; + * + * @return The pageIdentifier. + */ + java.lang.String getPageIdentifier(); + + /** + * + * + *
            +             * Page identifier.
            +             * 
            + * + * string page_identifier = 1; + * + * @return The bytes for pageIdentifier. + */ + com.google.protobuf.ByteString getPageIdentifierBytes(); + + /** + * + * + *
            +             * Extractive segment content.
            +             * 
            + * + * string content = 2; + * + * @return The content. + */ + java.lang.String getContent(); + + /** + * + * + *
            +             * Extractive segment content.
            +             * 
            + * + * string content = 2; + * + * @return The bytes for content. + */ + com.google.protobuf.ByteString getContentBytes(); + } + + /** + * + * + *
            +           * Extractive segment.
            +           * [Guide](https://cloud.google.com/generative-ai-app-builder/docs/snippets#extractive-segments)
            +           * Answer generation will only use it if document_contexts is empty.
            +           * This is supposed to be shorter snippets.
            +           * 
            + * + * Protobuf type {@code + * google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveSegment} + */ + public static final class ExtractiveSegment extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveSegment) + ExtractiveSegmentOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ExtractiveSegment"); + } + + // Use ExtractiveSegment.newBuilder() to construct. + private ExtractiveSegment(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ExtractiveSegment() { + pageIdentifier_ = ""; + content_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.ConversationalSearchServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_SearchSpec_SearchResultList_SearchResult_UnstructuredDocumentInfo_ExtractiveSegment_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.ConversationalSearchServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_SearchSpec_SearchResultList_SearchResult_UnstructuredDocumentInfo_ExtractiveSegment_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveSegment + .class, + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveSegment + .Builder.class); + } + + public static final int PAGE_IDENTIFIER_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object pageIdentifier_ = ""; + + /** + * + * + *
            +             * Page identifier.
            +             * 
            + * + * string page_identifier = 1; + * + * @return The pageIdentifier. + */ + @java.lang.Override + public java.lang.String getPageIdentifier() { + java.lang.Object ref = pageIdentifier_; + 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(); + pageIdentifier_ = s; + return s; + } + } + + /** + * + * + *
            +             * Page identifier.
            +             * 
            + * + * string page_identifier = 1; + * + * @return The bytes for pageIdentifier. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageIdentifierBytes() { + java.lang.Object ref = pageIdentifier_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageIdentifier_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CONTENT_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object content_ = ""; + + /** + * + * + *
            +             * Extractive segment content.
            +             * 
            + * + * string content = 2; + * + * @return The content. + */ + @java.lang.Override + public java.lang.String getContent() { + java.lang.Object ref = content_; + 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(); + content_ = s; + return s; + } + } + + /** + * + * + *
            +             * Extractive segment content.
            +             * 
            + * + * string content = 2; + * + * @return The bytes for content. + */ + @java.lang.Override + public com.google.protobuf.ByteString getContentBytes() { + java.lang.Object ref = content_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + content_ = 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 { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageIdentifier_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, pageIdentifier_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(content_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, content_); + } + 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(pageIdentifier_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, pageIdentifier_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(content_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, content_); + } + 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.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveSegment)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList + .SearchResult.UnstructuredDocumentInfo.ExtractiveSegment + other = + (com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo + .ExtractiveSegment) + obj; + + if (!getPageIdentifier().equals(other.getPageIdentifier())) return false; + if (!getContent().equals(other.getContent())) 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) + PAGE_IDENTIFIER_FIELD_NUMBER; + hash = (53 * hash) + getPageIdentifier().hashCode(); + hash = (37 * hash) + CONTENT_FIELD_NUMBER; + hash = (53 * hash) + getContent().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveSegment + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveSegment + 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.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveSegment + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveSegment + 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.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveSegment + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveSegment + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveSegment + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveSegment + 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.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveSegment + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveSegment + 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.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveSegment + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveSegment + 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.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveSegment + 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; + } + + /** + * + * + *
            +             * Extractive segment.
            +             * [Guide](https://cloud.google.com/generative-ai-app-builder/docs/snippets#extractive-segments)
            +             * Answer generation will only use it if document_contexts is empty.
            +             * This is supposed to be shorter snippets.
            +             * 
            + * + * Protobuf type {@code + * google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveSegment} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveSegment) + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo + .ExtractiveSegmentOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.ConversationalSearchServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_SearchSpec_SearchResultList_SearchResult_UnstructuredDocumentInfo_ExtractiveSegment_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.ConversationalSearchServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_SearchSpec_SearchResultList_SearchResult_UnstructuredDocumentInfo_ExtractiveSegment_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo + .ExtractiveSegment.class, + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo + .ExtractiveSegment.Builder.class); + } + + // Construct using + // com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveSegment.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + pageIdentifier_ = ""; + content_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1beta.ConversationalSearchServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_SearchSpec_SearchResultList_SearchResult_UnstructuredDocumentInfo_ExtractiveSegment_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveSegment + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveSegment + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveSegment + build() { + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveSegment + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveSegment + buildPartial() { + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveSegment + result = + new com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo + .ExtractiveSegment(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveSegment + result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.pageIdentifier_ = pageIdentifier_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.content_ = content_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveSegment) { + return mergeFrom( + (com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo + .ExtractiveSegment) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveSegment + other) { + if (other + == com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveSegment + .getDefaultInstance()) return this; + if (!other.getPageIdentifier().isEmpty()) { + pageIdentifier_ = other.pageIdentifier_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getContent().isEmpty()) { + content_ = other.content_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + pageIdentifier_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + content_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object pageIdentifier_ = ""; + + /** + * + * + *
            +               * Page identifier.
            +               * 
            + * + * string page_identifier = 1; + * + * @return The pageIdentifier. + */ + public java.lang.String getPageIdentifier() { + java.lang.Object ref = pageIdentifier_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageIdentifier_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
            +               * Page identifier.
            +               * 
            + * + * string page_identifier = 1; + * + * @return The bytes for pageIdentifier. + */ + public com.google.protobuf.ByteString getPageIdentifierBytes() { + java.lang.Object ref = pageIdentifier_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageIdentifier_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
            +               * Page identifier.
            +               * 
            + * + * string page_identifier = 1; + * + * @param value The pageIdentifier to set. + * @return This builder for chaining. + */ + public Builder setPageIdentifier(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + pageIdentifier_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
            +               * Page identifier.
            +               * 
            + * + * string page_identifier = 1; + * + * @return This builder for chaining. + */ + public Builder clearPageIdentifier() { + pageIdentifier_ = getDefaultInstance().getPageIdentifier(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
            +               * Page identifier.
            +               * 
            + * + * string page_identifier = 1; + * + * @param value The bytes for pageIdentifier to set. + * @return This builder for chaining. + */ + public Builder setPageIdentifierBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + pageIdentifier_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object content_ = ""; + + /** + * + * + *
            +               * Extractive segment content.
            +               * 
            + * + * string content = 2; + * + * @return The content. + */ + public java.lang.String getContent() { + java.lang.Object ref = content_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + content_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
            +               * Extractive segment content.
            +               * 
            + * + * string content = 2; + * + * @return The bytes for content. + */ + public com.google.protobuf.ByteString getContentBytes() { + java.lang.Object ref = content_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + content_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
            +               * Extractive segment content.
            +               * 
            + * + * string content = 2; + * + * @param value The content to set. + * @return This builder for chaining. + */ + public Builder setContent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + content_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
            +               * Extractive segment content.
            +               * 
            + * + * string content = 2; + * + * @return This builder for chaining. + */ + public Builder clearContent() { + content_ = getDefaultInstance().getContent(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
            +               * Extractive segment content.
            +               * 
            + * + * string content = 2; + * + * @param value The bytes for content to set. + * @return This builder for chaining. + */ + public Builder setContentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + content_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveSegment) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveSegment) + private static final com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest + .SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo + .ExtractiveSegment + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveSegment(); + } + + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveSegment + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ExtractiveSegment parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveSegment + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface ExtractiveAnswerOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveAnswer) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
            +             * Page identifier.
            +             * 
            + * + * string page_identifier = 1; + * + * @return The pageIdentifier. + */ + java.lang.String getPageIdentifier(); + + /** + * + * + *
            +             * Page identifier.
            +             * 
            + * + * string page_identifier = 1; + * + * @return The bytes for pageIdentifier. + */ + com.google.protobuf.ByteString getPageIdentifierBytes(); + + /** + * + * + *
            +             * Extractive answer content.
            +             * 
            + * + * string content = 2; + * + * @return The content. + */ + java.lang.String getContent(); + + /** + * + * + *
            +             * Extractive answer content.
            +             * 
            + * + * string content = 2; + * + * @return The bytes for content. + */ + com.google.protobuf.ByteString getContentBytes(); + } + + /** + * + * + *
            +           * Extractive answer.
            +           * [Guide](https://cloud.google.com/generative-ai-app-builder/docs/snippets#get-answers)
            +           * 
            + * + * Protobuf type {@code + * google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveAnswer} + */ + public static final class ExtractiveAnswer extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveAnswer) + ExtractiveAnswerOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ExtractiveAnswer"); + } + + // Use ExtractiveAnswer.newBuilder() to construct. + private ExtractiveAnswer(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ExtractiveAnswer() { + pageIdentifier_ = ""; + content_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.ConversationalSearchServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_SearchSpec_SearchResultList_SearchResult_UnstructuredDocumentInfo_ExtractiveAnswer_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.ConversationalSearchServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_SearchSpec_SearchResultList_SearchResult_UnstructuredDocumentInfo_ExtractiveAnswer_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveAnswer + .class, + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveAnswer + .Builder.class); + } + + public static final int PAGE_IDENTIFIER_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object pageIdentifier_ = ""; + + /** + * + * + *
            +             * Page identifier.
            +             * 
            + * + * string page_identifier = 1; + * + * @return The pageIdentifier. + */ + @java.lang.Override + public java.lang.String getPageIdentifier() { + java.lang.Object ref = pageIdentifier_; + 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(); + pageIdentifier_ = s; + return s; + } + } + + /** + * + * + *
            +             * Page identifier.
            +             * 
            + * + * string page_identifier = 1; + * + * @return The bytes for pageIdentifier. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageIdentifierBytes() { + java.lang.Object ref = pageIdentifier_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageIdentifier_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CONTENT_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object content_ = ""; + + /** + * + * + *
            +             * Extractive answer content.
            +             * 
            + * + * string content = 2; + * + * @return The content. + */ + @java.lang.Override + public java.lang.String getContent() { + java.lang.Object ref = content_; + 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(); + content_ = s; + return s; + } + } + + /** + * + * + *
            +             * Extractive answer content.
            +             * 
            + * + * string content = 2; + * + * @return The bytes for content. + */ + @java.lang.Override + public com.google.protobuf.ByteString getContentBytes() { + java.lang.Object ref = content_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + content_ = 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 { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageIdentifier_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, pageIdentifier_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(content_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, content_); + } + 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(pageIdentifier_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, pageIdentifier_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(content_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, content_); + } + 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.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveAnswer)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList + .SearchResult.UnstructuredDocumentInfo.ExtractiveAnswer + other = + (com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo + .ExtractiveAnswer) + obj; + + if (!getPageIdentifier().equals(other.getPageIdentifier())) return false; + if (!getContent().equals(other.getContent())) 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) + PAGE_IDENTIFIER_FIELD_NUMBER; + hash = (53 * hash) + getPageIdentifier().hashCode(); + hash = (37 * hash) + CONTENT_FIELD_NUMBER; + hash = (53 * hash) + getContent().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveAnswer + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveAnswer + 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.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveAnswer + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveAnswer + 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.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveAnswer + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveAnswer + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveAnswer + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveAnswer + 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.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveAnswer + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveAnswer + 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.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveAnswer + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveAnswer + 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.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveAnswer + 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; + } + + /** + * + * + *
            +             * Extractive answer.
            +             * [Guide](https://cloud.google.com/generative-ai-app-builder/docs/snippets#get-answers)
            +             * 
            + * + * Protobuf type {@code + * google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveAnswer} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveAnswer) + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo + .ExtractiveAnswerOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.ConversationalSearchServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_SearchSpec_SearchResultList_SearchResult_UnstructuredDocumentInfo_ExtractiveAnswer_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.ConversationalSearchServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_SearchSpec_SearchResultList_SearchResult_UnstructuredDocumentInfo_ExtractiveAnswer_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveAnswer + .class, + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveAnswer + .Builder.class); + } + + // Construct using + // com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveAnswer.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + pageIdentifier_ = ""; + content_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1beta.ConversationalSearchServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_SearchSpec_SearchResultList_SearchResult_UnstructuredDocumentInfo_ExtractiveAnswer_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveAnswer + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveAnswer + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveAnswer + build() { + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveAnswer + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveAnswer + buildPartial() { + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveAnswer + result = + new com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo + .ExtractiveAnswer(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveAnswer + result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.pageIdentifier_ = pageIdentifier_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.content_ = content_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveAnswer) { + return mergeFrom( + (com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo + .ExtractiveAnswer) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveAnswer + other) { + if (other + == com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveAnswer + .getDefaultInstance()) return this; + if (!other.getPageIdentifier().isEmpty()) { + pageIdentifier_ = other.pageIdentifier_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getContent().isEmpty()) { + content_ = other.content_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + pageIdentifier_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + content_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object pageIdentifier_ = ""; + + /** + * + * + *
            +               * Page identifier.
            +               * 
            + * + * string page_identifier = 1; + * + * @return The pageIdentifier. + */ + public java.lang.String getPageIdentifier() { + java.lang.Object ref = pageIdentifier_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageIdentifier_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
            +               * Page identifier.
            +               * 
            + * + * string page_identifier = 1; + * + * @return The bytes for pageIdentifier. + */ + public com.google.protobuf.ByteString getPageIdentifierBytes() { + java.lang.Object ref = pageIdentifier_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageIdentifier_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
            +               * Page identifier.
            +               * 
            + * + * string page_identifier = 1; + * + * @param value The pageIdentifier to set. + * @return This builder for chaining. + */ + public Builder setPageIdentifier(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + pageIdentifier_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
            +               * Page identifier.
            +               * 
            + * + * string page_identifier = 1; + * + * @return This builder for chaining. + */ + public Builder clearPageIdentifier() { + pageIdentifier_ = getDefaultInstance().getPageIdentifier(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
            +               * Page identifier.
            +               * 
            + * + * string page_identifier = 1; + * + * @param value The bytes for pageIdentifier to set. + * @return This builder for chaining. + */ + public Builder setPageIdentifierBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + pageIdentifier_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object content_ = ""; + + /** + * + * + *
            +               * Extractive answer content.
            +               * 
            + * + * string content = 2; + * + * @return The content. + */ + public java.lang.String getContent() { + java.lang.Object ref = content_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + content_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
            +               * Extractive answer content.
            +               * 
            + * + * string content = 2; + * + * @return The bytes for content. + */ + public com.google.protobuf.ByteString getContentBytes() { + java.lang.Object ref = content_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + content_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
            +               * Extractive answer content.
            +               * 
            + * + * string content = 2; + * + * @param value The content to set. + * @return This builder for chaining. + */ + public Builder setContent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + content_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
            +               * Extractive answer content.
            +               * 
            + * + * string content = 2; + * + * @return This builder for chaining. + */ + public Builder clearContent() { + content_ = getDefaultInstance().getContent(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
            +               * Extractive answer content.
            +               * 
            + * + * string content = 2; + * + * @param value The bytes for content to set. + * @return This builder for chaining. + */ + public Builder setContentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + content_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveAnswer) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveAnswer) + private static final com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest + .SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo + .ExtractiveAnswer + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveAnswer(); + } + + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveAnswer + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ExtractiveAnswer parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveAnswer + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int DOCUMENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object document_ = ""; + + /** + * + * + *
            +           * Document resource name.
            +           * 
            + * + * string document = 1 [(.google.api.resource_reference) = { ... } + * + * @return The document. + */ + @java.lang.Override + public java.lang.String getDocument() { + java.lang.Object ref = document_; + 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(); + document_ = s; + return s; + } + } + + /** + * + * + *
            +           * Document resource name.
            +           * 
            + * + * string document = 1 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for document. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDocumentBytes() { + java.lang.Object ref = document_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + document_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int URI_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object uri_ = ""; + + /** + * + * + *
            +           * URI for the document.
            +           * 
            + * + * string uri = 2; + * + * @return The uri. + */ + @java.lang.Override + public java.lang.String getUri() { + java.lang.Object ref = uri_; + 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(); + uri_ = s; + return s; + } + } + + /** + * + * + *
            +           * URI for the document.
            +           * 
            + * + * string uri = 2; + * + * @return The bytes for uri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getUriBytes() { + java.lang.Object ref = uri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TITLE_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object title_ = ""; + + /** + * + * + *
            +           * Title.
            +           * 
            + * + * string title = 3; + * + * @return The title. + */ + @java.lang.Override + public java.lang.String getTitle() { + java.lang.Object ref = title_; + 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(); + title_ = s; + return s; + } + } + + /** + * + * + *
            +           * Title.
            +           * 
            + * + * string title = 3; + * + * @return The bytes for title. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTitleBytes() { + java.lang.Object ref = title_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + title_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DOCUMENT_CONTEXTS_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private java.util.List< + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo.DocumentContext> + documentContexts_; + + /** + * + * + *
            +           * List of document contexts. The content will be used for Answer
            +           * Generation. This is supposed to be the main content of the document
            +           * that can be long and comprehensive.
            +           * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.DocumentContext document_contexts = 4; + * + */ + @java.lang.Override + public java.util.List< + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo.DocumentContext> + getDocumentContextsList() { + return documentContexts_; + } + + /** + * + * + *
            +           * List of document contexts. The content will be used for Answer
            +           * Generation. This is supposed to be the main content of the document
            +           * that can be long and comprehensive.
            +           * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.DocumentContext document_contexts = 4; + * + */ + @java.lang.Override + public java.util.List< + ? extends + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo + .DocumentContextOrBuilder> + getDocumentContextsOrBuilderList() { + return documentContexts_; + } + + /** + * + * + *
            +           * List of document contexts. The content will be used for Answer
            +           * Generation. This is supposed to be the main content of the document
            +           * that can be long and comprehensive.
            +           * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.DocumentContext document_contexts = 4; + * + */ + @java.lang.Override + public int getDocumentContextsCount() { + return documentContexts_.size(); + } + + /** + * + * + *
            +           * List of document contexts. The content will be used for Answer
            +           * Generation. This is supposed to be the main content of the document
            +           * that can be long and comprehensive.
            +           * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.DocumentContext document_contexts = 4; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo.DocumentContext + getDocumentContexts(int index) { + return documentContexts_.get(index); + } + + /** + * + * + *
            +           * List of document contexts. The content will be used for Answer
            +           * Generation. This is supposed to be the main content of the document
            +           * that can be long and comprehensive.
            +           * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.DocumentContext document_contexts = 4; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo.DocumentContextOrBuilder + getDocumentContextsOrBuilder(int index) { + return documentContexts_.get(index); + } + + public static final int EXTRACTIVE_SEGMENTS_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private java.util.List< + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveSegment> + extractiveSegments_; + + /** + * + * + *
            +           * List of extractive segments.
            +           * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveSegment extractive_segments = 5; + * + */ + @java.lang.Override + public java.util.List< + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveSegment> + getExtractiveSegmentsList() { + return extractiveSegments_; + } + + /** + * + * + *
            +           * List of extractive segments.
            +           * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveSegment extractive_segments = 5; + * + */ + @java.lang.Override + public java.util.List< + ? extends + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo + .ExtractiveSegmentOrBuilder> + getExtractiveSegmentsOrBuilderList() { + return extractiveSegments_; + } + + /** + * + * + *
            +           * List of extractive segments.
            +           * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveSegment extractive_segments = 5; + * + */ + @java.lang.Override + public int getExtractiveSegmentsCount() { + return extractiveSegments_.size(); + } + + /** + * + * + *
            +           * List of extractive segments.
            +           * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveSegment extractive_segments = 5; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveSegment + getExtractiveSegments(int index) { + return extractiveSegments_.get(index); + } + + /** + * + * + *
            +           * List of extractive segments.
            +           * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveSegment extractive_segments = 5; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveSegmentOrBuilder + getExtractiveSegmentsOrBuilder(int index) { + return extractiveSegments_.get(index); + } + + public static final int EXTRACTIVE_ANSWERS_FIELD_NUMBER = 6; + + @SuppressWarnings("serial") + private java.util.List< + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveAnswer> + extractiveAnswers_; + + /** + * + * + *
            +           * Deprecated: This field is deprecated and will have no effect on
            +           * the Answer generation.
            +           * Please use document_contexts and extractive_segments fields.
            +           * List of extractive answers.
            +           * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveAnswer extractive_answers = 6 [deprecated = true]; + * + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.List< + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveAnswer> + getExtractiveAnswersList() { + return extractiveAnswers_; + } + + /** + * + * + *
            +           * Deprecated: This field is deprecated and will have no effect on
            +           * the Answer generation.
            +           * Please use document_contexts and extractive_segments fields.
            +           * List of extractive answers.
            +           * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveAnswer extractive_answers = 6 [deprecated = true]; + * + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.List< + ? extends + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo + .ExtractiveAnswerOrBuilder> + getExtractiveAnswersOrBuilderList() { + return extractiveAnswers_; + } + + /** + * + * + *
            +           * Deprecated: This field is deprecated and will have no effect on
            +           * the Answer generation.
            +           * Please use document_contexts and extractive_segments fields.
            +           * List of extractive answers.
            +           * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveAnswer extractive_answers = 6 [deprecated = true]; + * + */ + @java.lang.Override + @java.lang.Deprecated + public int getExtractiveAnswersCount() { + return extractiveAnswers_.size(); + } + + /** + * + * + *
            +           * Deprecated: This field is deprecated and will have no effect on
            +           * the Answer generation.
            +           * Please use document_contexts and extractive_segments fields.
            +           * List of extractive answers.
            +           * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveAnswer extractive_answers = 6 [deprecated = true]; + * + */ + @java.lang.Override + @java.lang.Deprecated + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveAnswer + getExtractiveAnswers(int index) { + return extractiveAnswers_.get(index); + } + + /** + * + * + *
            +           * Deprecated: This field is deprecated and will have no effect on
            +           * the Answer generation.
            +           * Please use document_contexts and extractive_segments fields.
            +           * List of extractive answers.
            +           * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveAnswer extractive_answers = 6 [deprecated = true]; + * + */ + @java.lang.Override + @java.lang.Deprecated + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveAnswerOrBuilder + getExtractiveAnswersOrBuilder(int index) { + return extractiveAnswers_.get(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 (!com.google.protobuf.GeneratedMessage.isStringEmpty(document_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, document_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(uri_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, uri_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(title_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, title_); + } + for (int i = 0; i < documentContexts_.size(); i++) { + output.writeMessage(4, documentContexts_.get(i)); + } + for (int i = 0; i < extractiveSegments_.size(); i++) { + output.writeMessage(5, extractiveSegments_.get(i)); + } + for (int i = 0; i < extractiveAnswers_.size(); i++) { + output.writeMessage(6, extractiveAnswers_.get(i)); + } + 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(document_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, document_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(uri_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, uri_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(title_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, title_); + } + for (int i = 0; i < documentContexts_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 4, documentContexts_.get(i)); + } + for (int i = 0; i < extractiveSegments_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 5, extractiveSegments_.get(i)); + } + for (int i = 0; i < extractiveAnswers_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 6, extractiveAnswers_.get(i)); + } + 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.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList + .SearchResult.UnstructuredDocumentInfo + other = + (com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo) + obj; + + if (!getDocument().equals(other.getDocument())) return false; + if (!getUri().equals(other.getUri())) return false; + if (!getTitle().equals(other.getTitle())) return false; + if (!getDocumentContextsList().equals(other.getDocumentContextsList())) return false; + if (!getExtractiveSegmentsList().equals(other.getExtractiveSegmentsList())) + return false; + if (!getExtractiveAnswersList().equals(other.getExtractiveAnswersList())) 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) + DOCUMENT_FIELD_NUMBER; + hash = (53 * hash) + getDocument().hashCode(); + hash = (37 * hash) + URI_FIELD_NUMBER; + hash = (53 * hash) + getUri().hashCode(); + hash = (37 * hash) + TITLE_FIELD_NUMBER; + hash = (53 * hash) + getTitle().hashCode(); + if (getDocumentContextsCount() > 0) { + hash = (37 * hash) + DOCUMENT_CONTEXTS_FIELD_NUMBER; + hash = (53 * hash) + getDocumentContextsList().hashCode(); + } + if (getExtractiveSegmentsCount() > 0) { + hash = (37 * hash) + EXTRACTIVE_SEGMENTS_FIELD_NUMBER; + hash = (53 * hash) + getExtractiveSegmentsList().hashCode(); + } + if (getExtractiveAnswersCount() > 0) { + hash = (37 * hash) + EXTRACTIVE_ANSWERS_FIELD_NUMBER; + hash = (53 * hash) + getExtractiveAnswersList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo + 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.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo + 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.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo + 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.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo + 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.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo + 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.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList + .SearchResult.UnstructuredDocumentInfo + 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; + } + + /** + * + * + *
            +           * Unstructured document information.
            +           * 
            + * + * Protobuf type {@code + * google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo) + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList + .SearchResult.UnstructuredDocumentInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.ConversationalSearchServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_SearchSpec_SearchResultList_SearchResult_UnstructuredDocumentInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.ConversationalSearchServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_SearchSpec_SearchResultList_SearchResult_UnstructuredDocumentInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo.class, + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo.Builder.class); + } + + // Construct using + // com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + document_ = ""; + uri_ = ""; + title_ = ""; + if (documentContextsBuilder_ == null) { + documentContexts_ = java.util.Collections.emptyList(); + } else { + documentContexts_ = null; + documentContextsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000008); + if (extractiveSegmentsBuilder_ == null) { + extractiveSegments_ = java.util.Collections.emptyList(); + } else { + extractiveSegments_ = null; + extractiveSegmentsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000010); + if (extractiveAnswersBuilder_ == null) { + extractiveAnswers_ = java.util.Collections.emptyList(); + } else { + extractiveAnswers_ = null; + extractiveAnswersBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000020); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1beta.ConversationalSearchServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_SearchSpec_SearchResultList_SearchResult_UnstructuredDocumentInfo_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo + build() { + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList + .SearchResult.UnstructuredDocumentInfo + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo + buildPartial() { + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList + .SearchResult.UnstructuredDocumentInfo + result = + new com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo + result) { + if (documentContextsBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0)) { + documentContexts_ = java.util.Collections.unmodifiableList(documentContexts_); + bitField0_ = (bitField0_ & ~0x00000008); + } + result.documentContexts_ = documentContexts_; + } else { + result.documentContexts_ = documentContextsBuilder_.build(); + } + if (extractiveSegmentsBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0)) { + extractiveSegments_ = java.util.Collections.unmodifiableList(extractiveSegments_); + bitField0_ = (bitField0_ & ~0x00000010); + } + result.extractiveSegments_ = extractiveSegments_; + } else { + result.extractiveSegments_ = extractiveSegmentsBuilder_.build(); + } + if (extractiveAnswersBuilder_ == null) { + if (((bitField0_ & 0x00000020) != 0)) { + extractiveAnswers_ = java.util.Collections.unmodifiableList(extractiveAnswers_); + bitField0_ = (bitField0_ & ~0x00000020); + } + result.extractiveAnswers_ = extractiveAnswers_; + } else { + result.extractiveAnswers_ = extractiveAnswersBuilder_.build(); + } + } + + private void buildPartial0( + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo + result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.document_ = document_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.uri_ = uri_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.title_ = title_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo) { + return mergeFrom( + (com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo + other) { + if (other + == com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo.getDefaultInstance()) + return this; + if (!other.getDocument().isEmpty()) { + document_ = other.document_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getUri().isEmpty()) { + uri_ = other.uri_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getTitle().isEmpty()) { + title_ = other.title_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (documentContextsBuilder_ == null) { + if (!other.documentContexts_.isEmpty()) { + if (documentContexts_.isEmpty()) { + documentContexts_ = other.documentContexts_; + bitField0_ = (bitField0_ & ~0x00000008); + } else { + ensureDocumentContextsIsMutable(); + documentContexts_.addAll(other.documentContexts_); + } + onChanged(); + } + } else { + if (!other.documentContexts_.isEmpty()) { + if (documentContextsBuilder_.isEmpty()) { + documentContextsBuilder_.dispose(); + documentContextsBuilder_ = null; + documentContexts_ = other.documentContexts_; + bitField0_ = (bitField0_ & ~0x00000008); + documentContextsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetDocumentContextsFieldBuilder() + : null; + } else { + documentContextsBuilder_.addAllMessages(other.documentContexts_); + } + } + } + if (extractiveSegmentsBuilder_ == null) { + if (!other.extractiveSegments_.isEmpty()) { + if (extractiveSegments_.isEmpty()) { + extractiveSegments_ = other.extractiveSegments_; + bitField0_ = (bitField0_ & ~0x00000010); + } else { + ensureExtractiveSegmentsIsMutable(); + extractiveSegments_.addAll(other.extractiveSegments_); + } + onChanged(); + } + } else { + if (!other.extractiveSegments_.isEmpty()) { + if (extractiveSegmentsBuilder_.isEmpty()) { + extractiveSegmentsBuilder_.dispose(); + extractiveSegmentsBuilder_ = null; + extractiveSegments_ = other.extractiveSegments_; + bitField0_ = (bitField0_ & ~0x00000010); + extractiveSegmentsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetExtractiveSegmentsFieldBuilder() + : null; + } else { + extractiveSegmentsBuilder_.addAllMessages(other.extractiveSegments_); + } + } + } + if (extractiveAnswersBuilder_ == null) { + if (!other.extractiveAnswers_.isEmpty()) { + if (extractiveAnswers_.isEmpty()) { + extractiveAnswers_ = other.extractiveAnswers_; + bitField0_ = (bitField0_ & ~0x00000020); + } else { + ensureExtractiveAnswersIsMutable(); + extractiveAnswers_.addAll(other.extractiveAnswers_); + } + onChanged(); + } + } else { + if (!other.extractiveAnswers_.isEmpty()) { + if (extractiveAnswersBuilder_.isEmpty()) { + extractiveAnswersBuilder_.dispose(); + extractiveAnswersBuilder_ = null; + extractiveAnswers_ = other.extractiveAnswers_; + bitField0_ = (bitField0_ & ~0x00000020); + extractiveAnswersBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetExtractiveAnswersFieldBuilder() + : null; + } else { + extractiveAnswersBuilder_.addAllMessages(other.extractiveAnswers_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; } - } else { - naturalLanguageQueryUnderstandingSpecBuilder_.mergeFrom(value); - } - if (naturalLanguageQueryUnderstandingSpec_ != null) { - bitField0_ |= 0x00000040; - onChanged(); - } - return this; - } - /** - * - * - *
            -         * Optional. Specification to enable natural language understanding
            -         * capabilities for search requests.
            -         * 
            - * - * - * .google.cloud.discoveryengine.v1beta.SearchRequest.NaturalLanguageQueryUnderstandingSpec natural_language_query_understanding_spec = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder clearNaturalLanguageQueryUnderstandingSpec() { - bitField0_ = (bitField0_ & ~0x00000040); - naturalLanguageQueryUnderstandingSpec_ = null; - if (naturalLanguageQueryUnderstandingSpecBuilder_ != null) { - naturalLanguageQueryUnderstandingSpecBuilder_.dispose(); - naturalLanguageQueryUnderstandingSpecBuilder_ = null; - } - onChanged(); - return this; - } + @java.lang.Override + public final boolean isInitialized() { + return true; + } - /** - * - * - *
            -         * Optional. Specification to enable natural language understanding
            -         * capabilities for search requests.
            -         * 
            - * - * - * .google.cloud.discoveryengine.v1beta.SearchRequest.NaturalLanguageQueryUnderstandingSpec natural_language_query_understanding_spec = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.discoveryengine.v1beta.SearchRequest - .NaturalLanguageQueryUnderstandingSpec.Builder - getNaturalLanguageQueryUnderstandingSpecBuilder() { - bitField0_ |= 0x00000040; - onChanged(); - return internalGetNaturalLanguageQueryUnderstandingSpecFieldBuilder().getBuilder(); - } + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + document_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + uri_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + title_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo + .DocumentContext + m = + input.readMessage( + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest + .SearchSpec.SearchResultList.SearchResult + .UnstructuredDocumentInfo.DocumentContext.parser(), + extensionRegistry); + if (documentContextsBuilder_ == null) { + ensureDocumentContextsIsMutable(); + documentContexts_.add(m); + } else { + documentContextsBuilder_.addMessage(m); + } + break; + } // case 34 + case 42: + { + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo + .ExtractiveSegment + m = + input.readMessage( + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest + .SearchSpec.SearchResultList.SearchResult + .UnstructuredDocumentInfo.ExtractiveSegment.parser(), + extensionRegistry); + if (extractiveSegmentsBuilder_ == null) { + ensureExtractiveSegmentsIsMutable(); + extractiveSegments_.add(m); + } else { + extractiveSegmentsBuilder_.addMessage(m); + } + break; + } // case 42 + case 50: + { + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo + .ExtractiveAnswer + m = + input.readMessage( + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest + .SearchSpec.SearchResultList.SearchResult + .UnstructuredDocumentInfo.ExtractiveAnswer.parser(), + extensionRegistry); + if (extractiveAnswersBuilder_ == null) { + ensureExtractiveAnswersIsMutable(); + extractiveAnswers_.add(m); + } else { + extractiveAnswersBuilder_.addMessage(m); + } + break; + } // case 50 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } - /** - * - * - *
            -         * Optional. Specification to enable natural language understanding
            -         * capabilities for search requests.
            -         * 
            - * - * - * .google.cloud.discoveryengine.v1beta.SearchRequest.NaturalLanguageQueryUnderstandingSpec natural_language_query_understanding_spec = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.discoveryengine.v1beta.SearchRequest - .NaturalLanguageQueryUnderstandingSpecOrBuilder - getNaturalLanguageQueryUnderstandingSpecOrBuilder() { - if (naturalLanguageQueryUnderstandingSpecBuilder_ != null) { - return naturalLanguageQueryUnderstandingSpecBuilder_.getMessageOrBuilder(); - } else { - return naturalLanguageQueryUnderstandingSpec_ == null - ? com.google.cloud.discoveryengine.v1beta.SearchRequest - .NaturalLanguageQueryUnderstandingSpec.getDefaultInstance() - : naturalLanguageQueryUnderstandingSpec_; - } - } + private int bitField0_; - /** - * - * - *
            -         * Optional. Specification to enable natural language understanding
            -         * capabilities for search requests.
            -         * 
            - * - * - * .google.cloud.discoveryengine.v1beta.SearchRequest.NaturalLanguageQueryUnderstandingSpec natural_language_query_understanding_spec = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.discoveryengine.v1beta.SearchRequest - .NaturalLanguageQueryUnderstandingSpec, - com.google.cloud.discoveryengine.v1beta.SearchRequest - .NaturalLanguageQueryUnderstandingSpec.Builder, - com.google.cloud.discoveryengine.v1beta.SearchRequest - .NaturalLanguageQueryUnderstandingSpecOrBuilder> - internalGetNaturalLanguageQueryUnderstandingSpecFieldBuilder() { - if (naturalLanguageQueryUnderstandingSpecBuilder_ == null) { - naturalLanguageQueryUnderstandingSpecBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.discoveryengine.v1beta.SearchRequest - .NaturalLanguageQueryUnderstandingSpec, - com.google.cloud.discoveryengine.v1beta.SearchRequest - .NaturalLanguageQueryUnderstandingSpec.Builder, - com.google.cloud.discoveryengine.v1beta.SearchRequest - .NaturalLanguageQueryUnderstandingSpecOrBuilder>( - getNaturalLanguageQueryUnderstandingSpec(), getParentForChildren(), isClean()); - naturalLanguageQueryUnderstandingSpec_ = null; - } - return naturalLanguageQueryUnderstandingSpecBuilder_; - } + private java.lang.Object document_ = ""; - // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchParams) - } + /** + * + * + *
            +             * Document resource name.
            +             * 
            + * + * string document = 1 [(.google.api.resource_reference) = { ... } + * + * @return The document. + */ + public java.lang.String getDocument() { + java.lang.Object ref = document_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + document_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } - // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchParams) - private static final com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchParams - DEFAULT_INSTANCE; + /** + * + * + *
            +             * Document resource name.
            +             * 
            + * + * string document = 1 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for document. + */ + public com.google.protobuf.ByteString getDocumentBytes() { + java.lang.Object ref = document_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + document_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } - static { - DEFAULT_INSTANCE = - new com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchParams(); - } + /** + * + * + *
            +             * Document resource name.
            +             * 
            + * + * string document = 1 [(.google.api.resource_reference) = { ... } + * + * @param value The document to set. + * @return This builder for chaining. + */ + public Builder setDocument(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + document_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } - public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchParams - getDefaultInstance() { - return DEFAULT_INSTANCE; - } + /** + * + * + *
            +             * Document resource name.
            +             * 
            + * + * string document = 1 [(.google.api.resource_reference) = { ... } + * + * @return This builder for chaining. + */ + public Builder clearDocument() { + document_ = getDefaultInstance().getDocument(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public SearchParams parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException() - .setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); + /** + * + * + *
            +             * Document resource name.
            +             * 
            + * + * string document = 1 [(.google.api.resource_reference) = { ... } + * + * @param value The bytes for document to set. + * @return This builder for chaining. + */ + public Builder setDocumentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); } - return builder.buildPartial(); + checkByteStringIsUtf8(value); + document_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; } - }; - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + private java.lang.Object uri_ = ""; - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchParams - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - } + /** + * + * + *
            +             * URI for the document.
            +             * 
            + * + * string uri = 2; + * + * @return The uri. + */ + public java.lang.String getUri() { + java.lang.Object ref = uri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } - public interface SearchResultListOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList) - com.google.protobuf.MessageOrBuilder { + /** + * + * + *
            +             * URI for the document.
            +             * 
            + * + * string uri = 2; + * + * @return The bytes for uri. + */ + public com.google.protobuf.ByteString getUriBytes() { + java.lang.Object ref = uri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } - /** - * - * - *
            -       * Search results.
            -       * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult search_results = 1; - * - */ - java.util.List< - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList - .SearchResult> - getSearchResultsList(); + /** + * + * + *
            +             * URI for the document.
            +             * 
            + * + * string uri = 2; + * + * @param value The uri to set. + * @return This builder for chaining. + */ + public Builder setUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + uri_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } - /** - * - * - *
            -       * Search results.
            -       * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult search_results = 1; - * - */ - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList - .SearchResult - getSearchResults(int index); + /** + * + * + *
            +             * URI for the document.
            +             * 
            + * + * string uri = 2; + * + * @return This builder for chaining. + */ + public Builder clearUri() { + uri_ = getDefaultInstance().getUri(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } - /** - * - * - *
            -       * Search results.
            -       * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult search_results = 1; - * - */ - int getSearchResultsCount(); + /** + * + * + *
            +             * URI for the document.
            +             * 
            + * + * string uri = 2; + * + * @param value The bytes for uri to set. + * @return This builder for chaining. + */ + public Builder setUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + uri_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } - /** - * - * - *
            -       * Search results.
            -       * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult search_results = 1; - * - */ - java.util.List< - ? extends - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResultOrBuilder> - getSearchResultsOrBuilderList(); + private java.lang.Object title_ = ""; - /** - * - * - *
            -       * Search results.
            -       * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult search_results = 1; - * - */ - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList - .SearchResultOrBuilder - getSearchResultsOrBuilder(int index); - } + /** + * + * + *
            +             * Title.
            +             * 
            + * + * string title = 3; + * + * @return The title. + */ + public java.lang.String getTitle() { + java.lang.Object ref = title_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + title_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } - /** - * - * - *
            -     * Search result list.
            -     * 
            - * - * Protobuf type {@code - * google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList} - */ - public static final class SearchResultList extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList) - SearchResultListOrBuilder { - private static final long serialVersionUID = 0L; + /** + * + * + *
            +             * Title.
            +             * 
            + * + * string title = 3; + * + * @return The bytes for title. + */ + public com.google.protobuf.ByteString getTitleBytes() { + java.lang.Object ref = title_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + title_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "SearchResultList"); - } + /** + * + * + *
            +             * Title.
            +             * 
            + * + * string title = 3; + * + * @param value The title to set. + * @return This builder for chaining. + */ + public Builder setTitle(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + title_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } - // Use SearchResultList.newBuilder() to construct. - private SearchResultList(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } + /** + * + * + *
            +             * Title.
            +             * 
            + * + * string title = 3; + * + * @return This builder for chaining. + */ + public Builder clearTitle() { + title_ = getDefaultInstance().getTitle(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } - private SearchResultList() { - searchResults_ = java.util.Collections.emptyList(); - } + /** + * + * + *
            +             * Title.
            +             * 
            + * + * string title = 3; + * + * @param value The bytes for title to set. + * @return This builder for chaining. + */ + public Builder setTitleBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + title_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.discoveryengine.v1beta.ConversationalSearchServiceProto - .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_SearchSpec_SearchResultList_descriptor; - } + private java.util.List< + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo.DocumentContext> + documentContexts_ = java.util.Collections.emptyList(); - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.discoveryengine.v1beta.ConversationalSearchServiceProto - .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_SearchSpec_SearchResultList_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.class, - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.Builder.class); - } + private void ensureDocumentContextsIsMutable() { + if (!((bitField0_ & 0x00000008) != 0)) { + documentContexts_ = + new java.util.ArrayList< + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo + .DocumentContext>(documentContexts_); + bitField0_ |= 0x00000008; + } + } - public interface SearchResultOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult) - com.google.protobuf.MessageOrBuilder { + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo.DocumentContext, + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo.DocumentContext + .Builder, + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo + .DocumentContextOrBuilder> + documentContextsBuilder_; - /** - * - * - *
            -         * Unstructured document information.
            -         * 
            - * - * - * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo unstructured_document_info = 1; - * - * - * @return Whether the unstructuredDocumentInfo field is set. - */ - boolean hasUnstructuredDocumentInfo(); + /** + * + * + *
            +             * List of document contexts. The content will be used for Answer
            +             * Generation. This is supposed to be the main content of the document
            +             * that can be long and comprehensive.
            +             * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.DocumentContext document_contexts = 4; + * + */ + public java.util.List< + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo.DocumentContext> + getDocumentContextsList() { + if (documentContextsBuilder_ == null) { + return java.util.Collections.unmodifiableList(documentContexts_); + } else { + return documentContextsBuilder_.getMessageList(); + } + } - /** - * - * - *
            -         * Unstructured document information.
            -         * 
            - * - * - * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo unstructured_document_info = 1; - * - * - * @return The unstructuredDocumentInfo. - */ - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList - .SearchResult.UnstructuredDocumentInfo - getUnstructuredDocumentInfo(); + /** + * + * + *
            +             * List of document contexts. The content will be used for Answer
            +             * Generation. This is supposed to be the main content of the document
            +             * that can be long and comprehensive.
            +             * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.DocumentContext document_contexts = 4; + * + */ + public int getDocumentContextsCount() { + if (documentContextsBuilder_ == null) { + return documentContexts_.size(); + } else { + return documentContextsBuilder_.getCount(); + } + } - /** - * - * - *
            -         * Unstructured document information.
            -         * 
            - * - * - * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo unstructured_document_info = 1; - * - */ - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList - .SearchResult.UnstructuredDocumentInfoOrBuilder - getUnstructuredDocumentInfoOrBuilder(); + /** + * + * + *
            +             * List of document contexts. The content will be used for Answer
            +             * Generation. This is supposed to be the main content of the document
            +             * that can be long and comprehensive.
            +             * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.DocumentContext document_contexts = 4; + * + */ + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo.DocumentContext + getDocumentContexts(int index) { + if (documentContextsBuilder_ == null) { + return documentContexts_.get(index); + } else { + return documentContextsBuilder_.getMessage(index); + } + } - /** - * - * - *
            -         * Chunk information.
            -         * 
            - * - * - * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.ChunkInfo chunk_info = 2; - * - * - * @return Whether the chunkInfo field is set. - */ - boolean hasChunkInfo(); + /** + * + * + *
            +             * List of document contexts. The content will be used for Answer
            +             * Generation. This is supposed to be the main content of the document
            +             * that can be long and comprehensive.
            +             * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.DocumentContext document_contexts = 4; + * + */ + public Builder setDocumentContexts( + int index, + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo.DocumentContext + value) { + if (documentContextsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDocumentContextsIsMutable(); + documentContexts_.set(index, value); + onChanged(); + } else { + documentContextsBuilder_.setMessage(index, value); + } + return this; + } - /** - * - * - *
            -         * Chunk information.
            -         * 
            - * - * - * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.ChunkInfo chunk_info = 2; - * - * - * @return The chunkInfo. - */ - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList - .SearchResult.ChunkInfo - getChunkInfo(); + /** + * + * + *
            +             * List of document contexts. The content will be used for Answer
            +             * Generation. This is supposed to be the main content of the document
            +             * that can be long and comprehensive.
            +             * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.DocumentContext document_contexts = 4; + * + */ + public Builder setDocumentContexts( + int index, + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo.DocumentContext + .Builder + builderForValue) { + if (documentContextsBuilder_ == null) { + ensureDocumentContextsIsMutable(); + documentContexts_.set(index, builderForValue.build()); + onChanged(); + } else { + documentContextsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } - /** - * - * - *
            -         * Chunk information.
            -         * 
            - * - * - * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.ChunkInfo chunk_info = 2; - * - */ - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList - .SearchResult.ChunkInfoOrBuilder - getChunkInfoOrBuilder(); + /** + * + * + *
            +             * List of document contexts. The content will be used for Answer
            +             * Generation. This is supposed to be the main content of the document
            +             * that can be long and comprehensive.
            +             * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.DocumentContext document_contexts = 4; + * + */ + public Builder addDocumentContexts( + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo.DocumentContext + value) { + if (documentContextsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDocumentContextsIsMutable(); + documentContexts_.add(value); + onChanged(); + } else { + documentContextsBuilder_.addMessage(value); + } + return this; + } - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList - .SearchResult.ContentCase - getContentCase(); - } + /** + * + * + *
            +             * List of document contexts. The content will be used for Answer
            +             * Generation. This is supposed to be the main content of the document
            +             * that can be long and comprehensive.
            +             * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.DocumentContext document_contexts = 4; + * + */ + public Builder addDocumentContexts( + int index, + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo.DocumentContext + value) { + if (documentContextsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDocumentContextsIsMutable(); + documentContexts_.add(index, value); + onChanged(); + } else { + documentContextsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
            +             * List of document contexts. The content will be used for Answer
            +             * Generation. This is supposed to be the main content of the document
            +             * that can be long and comprehensive.
            +             * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.DocumentContext document_contexts = 4; + * + */ + public Builder addDocumentContexts( + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo.DocumentContext + .Builder + builderForValue) { + if (documentContextsBuilder_ == null) { + ensureDocumentContextsIsMutable(); + documentContexts_.add(builderForValue.build()); + onChanged(); + } else { + documentContextsBuilder_.addMessage(builderForValue.build()); + } + return this; + } - /** - * - * - *
            -       * Search result.
            -       * 
            - * - * Protobuf type {@code - * google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult} - */ - public static final class SearchResult extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult) - SearchResultOrBuilder { - private static final long serialVersionUID = 0L; + /** + * + * + *
            +             * List of document contexts. The content will be used for Answer
            +             * Generation. This is supposed to be the main content of the document
            +             * that can be long and comprehensive.
            +             * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.DocumentContext document_contexts = 4; + * + */ + public Builder addDocumentContexts( + int index, + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo.DocumentContext + .Builder + builderForValue) { + if (documentContextsBuilder_ == null) { + ensureDocumentContextsIsMutable(); + documentContexts_.add(index, builderForValue.build()); + onChanged(); + } else { + documentContextsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "SearchResult"); - } + /** + * + * + *
            +             * List of document contexts. The content will be used for Answer
            +             * Generation. This is supposed to be the main content of the document
            +             * that can be long and comprehensive.
            +             * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.DocumentContext document_contexts = 4; + * + */ + public Builder addAllDocumentContexts( + java.lang.Iterable< + ? extends + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo + .DocumentContext> + values) { + if (documentContextsBuilder_ == null) { + ensureDocumentContextsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, documentContexts_); + onChanged(); + } else { + documentContextsBuilder_.addAllMessages(values); + } + return this; + } - // Use SearchResult.newBuilder() to construct. - private SearchResult(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } + /** + * + * + *
            +             * List of document contexts. The content will be used for Answer
            +             * Generation. This is supposed to be the main content of the document
            +             * that can be long and comprehensive.
            +             * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.DocumentContext document_contexts = 4; + * + */ + public Builder clearDocumentContexts() { + if (documentContextsBuilder_ == null) { + documentContexts_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + } else { + documentContextsBuilder_.clear(); + } + return this; + } - private SearchResult() {} + /** + * + * + *
            +             * List of document contexts. The content will be used for Answer
            +             * Generation. This is supposed to be the main content of the document
            +             * that can be long and comprehensive.
            +             * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.DocumentContext document_contexts = 4; + * + */ + public Builder removeDocumentContexts(int index) { + if (documentContextsBuilder_ == null) { + ensureDocumentContextsIsMutable(); + documentContexts_.remove(index); + onChanged(); + } else { + documentContextsBuilder_.remove(index); + } + return this; + } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.discoveryengine.v1beta.ConversationalSearchServiceProto - .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_SearchSpec_SearchResultList_SearchResult_descriptor; - } + /** + * + * + *
            +             * List of document contexts. The content will be used for Answer
            +             * Generation. This is supposed to be the main content of the document
            +             * that can be long and comprehensive.
            +             * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.DocumentContext document_contexts = 4; + * + */ + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo.DocumentContext.Builder + getDocumentContextsBuilder(int index) { + return internalGetDocumentContextsFieldBuilder().getBuilder(index); + } - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.discoveryengine.v1beta.ConversationalSearchServiceProto - .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_SearchSpec_SearchResultList_SearchResult_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.class, - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.Builder.class); - } + /** + * + * + *
            +             * List of document contexts. The content will be used for Answer
            +             * Generation. This is supposed to be the main content of the document
            +             * that can be long and comprehensive.
            +             * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.DocumentContext document_contexts = 4; + * + */ + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo.DocumentContextOrBuilder + getDocumentContextsOrBuilder(int index) { + if (documentContextsBuilder_ == null) { + return documentContexts_.get(index); + } else { + return documentContextsBuilder_.getMessageOrBuilder(index); + } + } - public interface UnstructuredDocumentInfoOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo) - com.google.protobuf.MessageOrBuilder { + /** + * + * + *
            +             * List of document contexts. The content will be used for Answer
            +             * Generation. This is supposed to be the main content of the document
            +             * that can be long and comprehensive.
            +             * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.DocumentContext document_contexts = 4; + * + */ + public java.util.List< + ? extends + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo + .DocumentContextOrBuilder> + getDocumentContextsOrBuilderList() { + if (documentContextsBuilder_ != null) { + return documentContextsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(documentContexts_); + } + } - /** - * - * - *
            -           * Document resource name.
            -           * 
            - * - * string document = 1 [(.google.api.resource_reference) = { ... } - * - * @return The document. - */ - java.lang.String getDocument(); + /** + * + * + *
            +             * List of document contexts. The content will be used for Answer
            +             * Generation. This is supposed to be the main content of the document
            +             * that can be long and comprehensive.
            +             * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.DocumentContext document_contexts = 4; + * + */ + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo.DocumentContext.Builder + addDocumentContextsBuilder() { + return internalGetDocumentContextsFieldBuilder() + .addBuilder( + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo.DocumentContext + .getDefaultInstance()); + } - /** - * - * - *
            -           * Document resource name.
            -           * 
            - * - * string document = 1 [(.google.api.resource_reference) = { ... } - * - * @return The bytes for document. - */ - com.google.protobuf.ByteString getDocumentBytes(); + /** + * + * + *
            +             * List of document contexts. The content will be used for Answer
            +             * Generation. This is supposed to be the main content of the document
            +             * that can be long and comprehensive.
            +             * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.DocumentContext document_contexts = 4; + * + */ + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo.DocumentContext.Builder + addDocumentContextsBuilder(int index) { + return internalGetDocumentContextsFieldBuilder() + .addBuilder( + index, + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo.DocumentContext + .getDefaultInstance()); + } - /** - * - * - *
            -           * URI for the document.
            -           * 
            - * - * string uri = 2; - * - * @return The uri. - */ - java.lang.String getUri(); + /** + * + * + *
            +             * List of document contexts. The content will be used for Answer
            +             * Generation. This is supposed to be the main content of the document
            +             * that can be long and comprehensive.
            +             * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.DocumentContext document_contexts = 4; + * + */ + public java.util.List< + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo.DocumentContext + .Builder> + getDocumentContextsBuilderList() { + return internalGetDocumentContextsFieldBuilder().getBuilderList(); + } - /** - * - * - *
            -           * URI for the document.
            -           * 
            - * - * string uri = 2; - * - * @return The bytes for uri. - */ - com.google.protobuf.ByteString getUriBytes(); + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo.DocumentContext, + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo.DocumentContext + .Builder, + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo + .DocumentContextOrBuilder> + internalGetDocumentContextsFieldBuilder() { + if (documentContextsBuilder_ == null) { + documentContextsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo.DocumentContext, + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo.DocumentContext + .Builder, + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo + .DocumentContextOrBuilder>( + documentContexts_, + ((bitField0_ & 0x00000008) != 0), + getParentForChildren(), + isClean()); + documentContexts_ = null; + } + return documentContextsBuilder_; + } - /** - * - * - *
            -           * Title.
            -           * 
            - * - * string title = 3; - * - * @return The title. - */ - java.lang.String getTitle(); + private java.util.List< + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveSegment> + extractiveSegments_ = java.util.Collections.emptyList(); - /** - * - * - *
            -           * Title.
            -           * 
            - * - * string title = 3; - * - * @return The bytes for title. - */ - com.google.protobuf.ByteString getTitleBytes(); + private void ensureExtractiveSegmentsIsMutable() { + if (!((bitField0_ & 0x00000010) != 0)) { + extractiveSegments_ = + new java.util.ArrayList< + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo + .ExtractiveSegment>(extractiveSegments_); + bitField0_ |= 0x00000010; + } + } - /** - * - * - *
            -           * List of document contexts. The content will be used for Answer
            -           * Generation. This is supposed to be the main content of the document
            -           * that can be long and comprehensive.
            -           * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.DocumentContext document_contexts = 4; - * - */ - java.util.List< - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo.DocumentContext> - getDocumentContextsList(); + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveSegment, + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveSegment + .Builder, + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo + .ExtractiveSegmentOrBuilder> + extractiveSegmentsBuilder_; - /** - * - * - *
            -           * List of document contexts. The content will be used for Answer
            -           * Generation. This is supposed to be the main content of the document
            -           * that can be long and comprehensive.
            -           * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.DocumentContext document_contexts = 4; - * - */ - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList - .SearchResult.UnstructuredDocumentInfo.DocumentContext - getDocumentContexts(int index); + /** + * + * + *
            +             * List of extractive segments.
            +             * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveSegment extractive_segments = 5; + * + */ + public java.util.List< + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveSegment> + getExtractiveSegmentsList() { + if (extractiveSegmentsBuilder_ == null) { + return java.util.Collections.unmodifiableList(extractiveSegments_); + } else { + return extractiveSegmentsBuilder_.getMessageList(); + } + } - /** - * - * - *
            -           * List of document contexts. The content will be used for Answer
            -           * Generation. This is supposed to be the main content of the document
            -           * that can be long and comprehensive.
            -           * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.DocumentContext document_contexts = 4; - * - */ - int getDocumentContextsCount(); + /** + * + * + *
            +             * List of extractive segments.
            +             * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveSegment extractive_segments = 5; + * + */ + public int getExtractiveSegmentsCount() { + if (extractiveSegmentsBuilder_ == null) { + return extractiveSegments_.size(); + } else { + return extractiveSegmentsBuilder_.getCount(); + } + } + + /** + * + * + *
            +             * List of extractive segments.
            +             * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveSegment extractive_segments = 5; + * + */ + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveSegment + getExtractiveSegments(int index) { + if (extractiveSegmentsBuilder_ == null) { + return extractiveSegments_.get(index); + } else { + return extractiveSegmentsBuilder_.getMessage(index); + } + } - /** - * - * - *
            -           * List of document contexts. The content will be used for Answer
            -           * Generation. This is supposed to be the main content of the document
            -           * that can be long and comprehensive.
            -           * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.DocumentContext document_contexts = 4; - * - */ - java.util.List< - ? extends - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo - .DocumentContextOrBuilder> - getDocumentContextsOrBuilderList(); + /** + * + * + *
            +             * List of extractive segments.
            +             * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveSegment extractive_segments = 5; + * + */ + public Builder setExtractiveSegments( + int index, + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveSegment + value) { + if (extractiveSegmentsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureExtractiveSegmentsIsMutable(); + extractiveSegments_.set(index, value); + onChanged(); + } else { + extractiveSegmentsBuilder_.setMessage(index, value); + } + return this; + } - /** - * - * - *
            -           * List of document contexts. The content will be used for Answer
            -           * Generation. This is supposed to be the main content of the document
            -           * that can be long and comprehensive.
            -           * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.DocumentContext document_contexts = 4; - * - */ - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList - .SearchResult.UnstructuredDocumentInfo.DocumentContextOrBuilder - getDocumentContextsOrBuilder(int index); + /** + * + * + *
            +             * List of extractive segments.
            +             * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveSegment extractive_segments = 5; + * + */ + public Builder setExtractiveSegments( + int index, + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveSegment + .Builder + builderForValue) { + if (extractiveSegmentsBuilder_ == null) { + ensureExtractiveSegmentsIsMutable(); + extractiveSegments_.set(index, builderForValue.build()); + onChanged(); + } else { + extractiveSegmentsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } - /** - * - * - *
            -           * List of extractive segments.
            -           * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveSegment extractive_segments = 5; - * - */ - java.util.List< - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveSegment> - getExtractiveSegmentsList(); + /** + * + * + *
            +             * List of extractive segments.
            +             * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveSegment extractive_segments = 5; + * + */ + public Builder addExtractiveSegments( + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveSegment + value) { + if (extractiveSegmentsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureExtractiveSegmentsIsMutable(); + extractiveSegments_.add(value); + onChanged(); + } else { + extractiveSegmentsBuilder_.addMessage(value); + } + return this; + } - /** - * - * - *
            -           * List of extractive segments.
            -           * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveSegment extractive_segments = 5; - * - */ - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList - .SearchResult.UnstructuredDocumentInfo.ExtractiveSegment - getExtractiveSegments(int index); + /** + * + * + *
            +             * List of extractive segments.
            +             * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveSegment extractive_segments = 5; + * + */ + public Builder addExtractiveSegments( + int index, + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveSegment + value) { + if (extractiveSegmentsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureExtractiveSegmentsIsMutable(); + extractiveSegments_.add(index, value); + onChanged(); + } else { + extractiveSegmentsBuilder_.addMessage(index, value); + } + return this; + } - /** - * - * - *
            -           * List of extractive segments.
            -           * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveSegment extractive_segments = 5; - * - */ - int getExtractiveSegmentsCount(); + /** + * + * + *
            +             * List of extractive segments.
            +             * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveSegment extractive_segments = 5; + * + */ + public Builder addExtractiveSegments( + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveSegment + .Builder + builderForValue) { + if (extractiveSegmentsBuilder_ == null) { + ensureExtractiveSegmentsIsMutable(); + extractiveSegments_.add(builderForValue.build()); + onChanged(); + } else { + extractiveSegmentsBuilder_.addMessage(builderForValue.build()); + } + return this; + } - /** - * - * - *
            -           * List of extractive segments.
            -           * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveSegment extractive_segments = 5; - * - */ - java.util.List< - ? extends - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo - .ExtractiveSegmentOrBuilder> - getExtractiveSegmentsOrBuilderList(); + /** + * + * + *
            +             * List of extractive segments.
            +             * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveSegment extractive_segments = 5; + * + */ + public Builder addExtractiveSegments( + int index, + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveSegment + .Builder + builderForValue) { + if (extractiveSegmentsBuilder_ == null) { + ensureExtractiveSegmentsIsMutable(); + extractiveSegments_.add(index, builderForValue.build()); + onChanged(); + } else { + extractiveSegmentsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } - /** - * - * - *
            -           * List of extractive segments.
            -           * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveSegment extractive_segments = 5; - * - */ - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList - .SearchResult.UnstructuredDocumentInfo.ExtractiveSegmentOrBuilder - getExtractiveSegmentsOrBuilder(int index); + /** + * + * + *
            +             * List of extractive segments.
            +             * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveSegment extractive_segments = 5; + * + */ + public Builder addAllExtractiveSegments( + java.lang.Iterable< + ? extends + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo + .ExtractiveSegment> + values) { + if (extractiveSegmentsBuilder_ == null) { + ensureExtractiveSegmentsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, extractiveSegments_); + onChanged(); + } else { + extractiveSegmentsBuilder_.addAllMessages(values); + } + return this; + } - /** - * - * - *
            -           * Deprecated: This field is deprecated and will have no effect on
            -           * the Answer generation.
            -           * Please use document_contexts and extractive_segments fields.
            -           * List of extractive answers.
            -           * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveAnswer extractive_answers = 6 [deprecated = true]; - * - */ - @java.lang.Deprecated - java.util.List< - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveAnswer> - getExtractiveAnswersList(); + /** + * + * + *
            +             * List of extractive segments.
            +             * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveSegment extractive_segments = 5; + * + */ + public Builder clearExtractiveSegments() { + if (extractiveSegmentsBuilder_ == null) { + extractiveSegments_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + } else { + extractiveSegmentsBuilder_.clear(); + } + return this; + } - /** - * - * - *
            -           * Deprecated: This field is deprecated and will have no effect on
            -           * the Answer generation.
            -           * Please use document_contexts and extractive_segments fields.
            -           * List of extractive answers.
            -           * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveAnswer extractive_answers = 6 [deprecated = true]; - * - */ - @java.lang.Deprecated - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList - .SearchResult.UnstructuredDocumentInfo.ExtractiveAnswer - getExtractiveAnswers(int index); + /** + * + * + *
            +             * List of extractive segments.
            +             * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveSegment extractive_segments = 5; + * + */ + public Builder removeExtractiveSegments(int index) { + if (extractiveSegmentsBuilder_ == null) { + ensureExtractiveSegmentsIsMutable(); + extractiveSegments_.remove(index); + onChanged(); + } else { + extractiveSegmentsBuilder_.remove(index); + } + return this; + } - /** - * - * - *
            -           * Deprecated: This field is deprecated and will have no effect on
            -           * the Answer generation.
            -           * Please use document_contexts and extractive_segments fields.
            -           * List of extractive answers.
            -           * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveAnswer extractive_answers = 6 [deprecated = true]; - * - */ - @java.lang.Deprecated - int getExtractiveAnswersCount(); + /** + * + * + *
            +             * List of extractive segments.
            +             * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveSegment extractive_segments = 5; + * + */ + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveSegment + .Builder + getExtractiveSegmentsBuilder(int index) { + return internalGetExtractiveSegmentsFieldBuilder().getBuilder(index); + } - /** - * - * - *
            -           * Deprecated: This field is deprecated and will have no effect on
            -           * the Answer generation.
            -           * Please use document_contexts and extractive_segments fields.
            -           * List of extractive answers.
            -           * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveAnswer extractive_answers = 6 [deprecated = true]; - * - */ - @java.lang.Deprecated - java.util.List< - ? extends - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo - .ExtractiveAnswerOrBuilder> - getExtractiveAnswersOrBuilderList(); + /** + * + * + *
            +             * List of extractive segments.
            +             * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveSegment extractive_segments = 5; + * + */ + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo + .ExtractiveSegmentOrBuilder + getExtractiveSegmentsOrBuilder(int index) { + if (extractiveSegmentsBuilder_ == null) { + return extractiveSegments_.get(index); + } else { + return extractiveSegmentsBuilder_.getMessageOrBuilder(index); + } + } - /** - * - * - *
            -           * Deprecated: This field is deprecated and will have no effect on
            -           * the Answer generation.
            -           * Please use document_contexts and extractive_segments fields.
            -           * List of extractive answers.
            -           * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveAnswer extractive_answers = 6 [deprecated = true]; - * - */ - @java.lang.Deprecated - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList - .SearchResult.UnstructuredDocumentInfo.ExtractiveAnswerOrBuilder - getExtractiveAnswersOrBuilder(int index); - } + /** + * + * + *
            +             * List of extractive segments.
            +             * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveSegment extractive_segments = 5; + * + */ + public java.util.List< + ? extends + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo + .ExtractiveSegmentOrBuilder> + getExtractiveSegmentsOrBuilderList() { + if (extractiveSegmentsBuilder_ != null) { + return extractiveSegmentsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(extractiveSegments_); + } + } + + /** + * + * + *
            +             * List of extractive segments.
            +             * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveSegment extractive_segments = 5; + * + */ + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveSegment + .Builder + addExtractiveSegmentsBuilder() { + return internalGetExtractiveSegmentsFieldBuilder() + .addBuilder( + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveSegment + .getDefaultInstance()); + } - /** - * - * - *
            -         * Unstructured document information.
            -         * 
            - * - * Protobuf type {@code - * google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo} - */ - public static final class UnstructuredDocumentInfo - extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo) - UnstructuredDocumentInfoOrBuilder { - private static final long serialVersionUID = 0L; + /** + * + * + *
            +             * List of extractive segments.
            +             * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveSegment extractive_segments = 5; + * + */ + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveSegment + .Builder + addExtractiveSegmentsBuilder(int index) { + return internalGetExtractiveSegmentsFieldBuilder() + .addBuilder( + index, + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveSegment + .getDefaultInstance()); + } - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "UnstructuredDocumentInfo"); - } + /** + * + * + *
            +             * List of extractive segments.
            +             * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveSegment extractive_segments = 5; + * + */ + public java.util.List< + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveSegment + .Builder> + getExtractiveSegmentsBuilderList() { + return internalGetExtractiveSegmentsFieldBuilder().getBuilderList(); + } - // Use UnstructuredDocumentInfo.newBuilder() to construct. - private UnstructuredDocumentInfo( - com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveSegment, + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveSegment + .Builder, + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo + .ExtractiveSegmentOrBuilder> + internalGetExtractiveSegmentsFieldBuilder() { + if (extractiveSegmentsBuilder_ == null) { + extractiveSegmentsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo + .ExtractiveSegment, + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo + .ExtractiveSegment.Builder, + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo + .ExtractiveSegmentOrBuilder>( + extractiveSegments_, + ((bitField0_ & 0x00000010) != 0), + getParentForChildren(), + isClean()); + extractiveSegments_ = null; + } + return extractiveSegmentsBuilder_; + } - private UnstructuredDocumentInfo() { - document_ = ""; - uri_ = ""; - title_ = ""; - documentContexts_ = java.util.Collections.emptyList(); - extractiveSegments_ = java.util.Collections.emptyList(); - extractiveAnswers_ = java.util.Collections.emptyList(); - } + private java.util.List< + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveAnswer> + extractiveAnswers_ = java.util.Collections.emptyList(); - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.discoveryengine.v1beta.ConversationalSearchServiceProto - .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_SearchSpec_SearchResultList_SearchResult_UnstructuredDocumentInfo_descriptor; - } + private void ensureExtractiveAnswersIsMutable() { + if (!((bitField0_ & 0x00000020) != 0)) { + extractiveAnswers_ = + new java.util.ArrayList< + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo + .ExtractiveAnswer>(extractiveAnswers_); + bitField0_ |= 0x00000020; + } + } - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.discoveryengine.v1beta.ConversationalSearchServiceProto - .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_SearchSpec_SearchResultList_SearchResult_UnstructuredDocumentInfo_fieldAccessorTable - .ensureFieldAccessorsInitialized( + private com.google.protobuf.RepeatedFieldBuilder< com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo.class, + .SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveAnswer, com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo.Builder.class); - } + .SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveAnswer + .Builder, + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo + .ExtractiveAnswerOrBuilder> + extractiveAnswersBuilder_; - public interface DocumentContextOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.DocumentContext) - com.google.protobuf.MessageOrBuilder { + /** + * + * + *
            +             * Deprecated: This field is deprecated and will have no effect on
            +             * the Answer generation.
            +             * Please use document_contexts and extractive_segments fields.
            +             * List of extractive answers.
            +             * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveAnswer extractive_answers = 6 [deprecated = true]; + * + */ + @java.lang.Deprecated + public java.util.List< + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveAnswer> + getExtractiveAnswersList() { + if (extractiveAnswersBuilder_ == null) { + return java.util.Collections.unmodifiableList(extractiveAnswers_); + } else { + return extractiveAnswersBuilder_.getMessageList(); + } + } + + /** + * + * + *
            +             * Deprecated: This field is deprecated and will have no effect on
            +             * the Answer generation.
            +             * Please use document_contexts and extractive_segments fields.
            +             * List of extractive answers.
            +             * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveAnswer extractive_answers = 6 [deprecated = true]; + * + */ + @java.lang.Deprecated + public int getExtractiveAnswersCount() { + if (extractiveAnswersBuilder_ == null) { + return extractiveAnswers_.size(); + } else { + return extractiveAnswersBuilder_.getCount(); + } + } + + /** + * + * + *
            +             * Deprecated: This field is deprecated and will have no effect on
            +             * the Answer generation.
            +             * Please use document_contexts and extractive_segments fields.
            +             * List of extractive answers.
            +             * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveAnswer extractive_answers = 6 [deprecated = true]; + * + */ + @java.lang.Deprecated + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveAnswer + getExtractiveAnswers(int index) { + if (extractiveAnswersBuilder_ == null) { + return extractiveAnswers_.get(index); + } else { + return extractiveAnswersBuilder_.getMessage(index); + } + } + + /** + * + * + *
            +             * Deprecated: This field is deprecated and will have no effect on
            +             * the Answer generation.
            +             * Please use document_contexts and extractive_segments fields.
            +             * List of extractive answers.
            +             * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveAnswer extractive_answers = 6 [deprecated = true]; + * + */ + @java.lang.Deprecated + public Builder setExtractiveAnswers( + int index, + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveAnswer + value) { + if (extractiveAnswersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureExtractiveAnswersIsMutable(); + extractiveAnswers_.set(index, value); + onChanged(); + } else { + extractiveAnswersBuilder_.setMessage(index, value); + } + return this; + } /** * * *
            -             * Page identifier.
            +             * Deprecated: This field is deprecated and will have no effect on
            +             * the Answer generation.
            +             * Please use document_contexts and extractive_segments fields.
            +             * List of extractive answers.
                          * 
            * - * string page_identifier = 1; - * - * @return The pageIdentifier. + * + * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveAnswer extractive_answers = 6 [deprecated = true]; + * */ - java.lang.String getPageIdentifier(); + @java.lang.Deprecated + public Builder setExtractiveAnswers( + int index, + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveAnswer + .Builder + builderForValue) { + if (extractiveAnswersBuilder_ == null) { + ensureExtractiveAnswersIsMutable(); + extractiveAnswers_.set(index, builderForValue.build()); + onChanged(); + } else { + extractiveAnswersBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } /** * * *
            -             * Page identifier.
            +             * Deprecated: This field is deprecated and will have no effect on
            +             * the Answer generation.
            +             * Please use document_contexts and extractive_segments fields.
            +             * List of extractive answers.
                          * 
            * - * string page_identifier = 1; - * - * @return The bytes for pageIdentifier. + * + * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveAnswer extractive_answers = 6 [deprecated = true]; + * */ - com.google.protobuf.ByteString getPageIdentifierBytes(); + @java.lang.Deprecated + public Builder addExtractiveAnswers( + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveAnswer + value) { + if (extractiveAnswersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureExtractiveAnswersIsMutable(); + extractiveAnswers_.add(value); + onChanged(); + } else { + extractiveAnswersBuilder_.addMessage(value); + } + return this; + } /** * * *
            -             * Document content to be used for answer generation.
            +             * Deprecated: This field is deprecated and will have no effect on
            +             * the Answer generation.
            +             * Please use document_contexts and extractive_segments fields.
            +             * List of extractive answers.
                          * 
            * - * string content = 2; - * - * @return The content. + * + * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveAnswer extractive_answers = 6 [deprecated = true]; + * */ - java.lang.String getContent(); + @java.lang.Deprecated + public Builder addExtractiveAnswers( + int index, + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveAnswer + value) { + if (extractiveAnswersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureExtractiveAnswersIsMutable(); + extractiveAnswers_.add(index, value); + onChanged(); + } else { + extractiveAnswersBuilder_.addMessage(index, value); + } + return this; + } /** * * *
            -             * Document content to be used for answer generation.
            +             * Deprecated: This field is deprecated and will have no effect on
            +             * the Answer generation.
            +             * Please use document_contexts and extractive_segments fields.
            +             * List of extractive answers.
                          * 
            * - * string content = 2; - * - * @return The bytes for content. + * + * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveAnswer extractive_answers = 6 [deprecated = true]; + * */ - com.google.protobuf.ByteString getContentBytes(); - } - - /** - * - * - *
            -           * Document context.
            -           * 
            - * - * Protobuf type {@code - * google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.DocumentContext} - */ - public static final class DocumentContext extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.DocumentContext) - DocumentContextOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "DocumentContext"); - } - - // Use DocumentContext.newBuilder() to construct. - private DocumentContext(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private DocumentContext() { - pageIdentifier_ = ""; - content_ = ""; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.discoveryengine.v1beta.ConversationalSearchServiceProto - .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_SearchSpec_SearchResultList_SearchResult_UnstructuredDocumentInfo_DocumentContext_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.discoveryengine.v1beta.ConversationalSearchServiceProto - .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_SearchSpec_SearchResultList_SearchResult_UnstructuredDocumentInfo_DocumentContext_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo.DocumentContext - .class, - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo.DocumentContext - .Builder.class); + @java.lang.Deprecated + public Builder addExtractiveAnswers( + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveAnswer + .Builder + builderForValue) { + if (extractiveAnswersBuilder_ == null) { + ensureExtractiveAnswersIsMutable(); + extractiveAnswers_.add(builderForValue.build()); + onChanged(); + } else { + extractiveAnswersBuilder_.addMessage(builderForValue.build()); + } + return this; } - public static final int PAGE_IDENTIFIER_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object pageIdentifier_ = ""; - /** * * *
            -             * Page identifier.
            +             * Deprecated: This field is deprecated and will have no effect on
            +             * the Answer generation.
            +             * Please use document_contexts and extractive_segments fields.
            +             * List of extractive answers.
                          * 
            * - * string page_identifier = 1; - * - * @return The pageIdentifier. + * + * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveAnswer extractive_answers = 6 [deprecated = true]; + * */ - @java.lang.Override - public java.lang.String getPageIdentifier() { - java.lang.Object ref = pageIdentifier_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; + @java.lang.Deprecated + public Builder addExtractiveAnswers( + int index, + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveAnswer + .Builder + builderForValue) { + if (extractiveAnswersBuilder_ == null) { + ensureExtractiveAnswersIsMutable(); + extractiveAnswers_.add(index, builderForValue.build()); + onChanged(); } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - pageIdentifier_ = s; - return s; + extractiveAnswersBuilder_.addMessage(index, builderForValue.build()); } + return this; } /** * * *
            -             * Page identifier.
            +             * Deprecated: This field is deprecated and will have no effect on
            +             * the Answer generation.
            +             * Please use document_contexts and extractive_segments fields.
            +             * List of extractive answers.
                          * 
            * - * string page_identifier = 1; - * - * @return The bytes for pageIdentifier. + * + * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveAnswer extractive_answers = 6 [deprecated = true]; + * */ - @java.lang.Override - public com.google.protobuf.ByteString getPageIdentifierBytes() { - java.lang.Object ref = pageIdentifier_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - pageIdentifier_ = b; - return b; + @java.lang.Deprecated + public Builder addAllExtractiveAnswers( + java.lang.Iterable< + ? extends + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo + .ExtractiveAnswer> + values) { + if (extractiveAnswersBuilder_ == null) { + ensureExtractiveAnswersIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, extractiveAnswers_); + onChanged(); } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int CONTENT_FIELD_NUMBER = 2; - - @SuppressWarnings("serial") - private volatile java.lang.Object content_ = ""; + extractiveAnswersBuilder_.addAllMessages(values); + } + return this; + } /** * * *
            -             * Document content to be used for answer generation.
            +             * Deprecated: This field is deprecated and will have no effect on
            +             * the Answer generation.
            +             * Please use document_contexts and extractive_segments fields.
            +             * List of extractive answers.
                          * 
            * - * string content = 2; - * - * @return The content. + * + * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveAnswer extractive_answers = 6 [deprecated = true]; + * */ - @java.lang.Override - public java.lang.String getContent() { - java.lang.Object ref = content_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; + @java.lang.Deprecated + public Builder clearExtractiveAnswers() { + if (extractiveAnswersBuilder_ == null) { + extractiveAnswers_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - content_ = s; - return s; + extractiveAnswersBuilder_.clear(); } + return this; } /** * * *
            -             * Document content to be used for answer generation.
            +             * Deprecated: This field is deprecated and will have no effect on
            +             * the Answer generation.
            +             * Please use document_contexts and extractive_segments fields.
            +             * List of extractive answers.
                          * 
            * - * string content = 2; - * - * @return The bytes for content. + * + * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveAnswer extractive_answers = 6 [deprecated = true]; + * */ - @java.lang.Override - public com.google.protobuf.ByteString getContentBytes() { - java.lang.Object ref = content_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - content_ = b; - return b; + @java.lang.Deprecated + public Builder removeExtractiveAnswers(int index) { + if (extractiveAnswersBuilder_ == null) { + ensureExtractiveAnswersIsMutable(); + extractiveAnswers_.remove(index); + onChanged(); } 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 { - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageIdentifier_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, pageIdentifier_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(content_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 2, content_); - } - 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(pageIdentifier_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, pageIdentifier_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(content_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(2, content_); - } - 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.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo.DocumentContext)) { - return super.equals(obj); - } - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList - .SearchResult.UnstructuredDocumentInfo.DocumentContext - other = - (com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo - .DocumentContext) - obj; - - if (!getPageIdentifier().equals(other.getPageIdentifier())) return false; - if (!getContent().equals(other.getContent())) 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) + PAGE_IDENTIFIER_FIELD_NUMBER; - hash = (53 * hash) + getPageIdentifier().hashCode(); - hash = (37 * hash) + CONTENT_FIELD_NUMBER; - hash = (53 * hash) + getContent().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo.DocumentContext - parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo.DocumentContext - 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.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo.DocumentContext - parseFrom(com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo.DocumentContext - 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.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo.DocumentContext - parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo.DocumentContext - parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo.DocumentContext - parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo.DocumentContext - 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.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo.DocumentContext - parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input); - } - - public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo.DocumentContext - 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.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo.DocumentContext - parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo.DocumentContext - 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.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo.DocumentContext - prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + extractiveAnswersBuilder_.remove(index); + } + return this; } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; + /** + * + * + *
            +             * Deprecated: This field is deprecated and will have no effect on
            +             * the Answer generation.
            +             * Please use document_contexts and extractive_segments fields.
            +             * List of extractive answers.
            +             * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveAnswer extractive_answers = 6 [deprecated = true]; + * + */ + @java.lang.Deprecated + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveAnswer.Builder + getExtractiveAnswersBuilder(int index) { + return internalGetExtractiveAnswersFieldBuilder().getBuilder(index); } /** * * *
            -             * Document context.
            +             * Deprecated: This field is deprecated and will have no effect on
            +             * the Answer generation.
            +             * Please use document_contexts and extractive_segments fields.
            +             * List of extractive answers.
                          * 
            * - * Protobuf type {@code - * google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.DocumentContext} + * + * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveAnswer extractive_answers = 6 [deprecated = true]; + * */ - public static final class Builder - extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.DocumentContext) - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + @java.lang.Deprecated + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec .SearchResultList.SearchResult.UnstructuredDocumentInfo - .DocumentContextOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.discoveryengine.v1beta.ConversationalSearchServiceProto - .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_SearchSpec_SearchResultList_SearchResult_UnstructuredDocumentInfo_DocumentContext_descriptor; + .ExtractiveAnswerOrBuilder + getExtractiveAnswersOrBuilder(int index) { + if (extractiveAnswersBuilder_ == null) { + return extractiveAnswers_.get(index); + } else { + return extractiveAnswersBuilder_.getMessageOrBuilder(index); } + } - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.discoveryengine.v1beta.ConversationalSearchServiceProto - .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_SearchSpec_SearchResultList_SearchResult_UnstructuredDocumentInfo_DocumentContext_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo.DocumentContext - .class, + /** + * + * + *
            +             * Deprecated: This field is deprecated and will have no effect on
            +             * the Answer generation.
            +             * Please use document_contexts and extractive_segments fields.
            +             * List of extractive answers.
            +             * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveAnswer extractive_answers = 6 [deprecated = true]; + * + */ + @java.lang.Deprecated + public java.util.List< + ? extends com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo.DocumentContext - .Builder.class); - } - - // Construct using - // com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.DocumentContext.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - pageIdentifier_ = ""; - content_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.discoveryengine.v1beta.ConversationalSearchServiceProto - .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_SearchSpec_SearchResultList_SearchResult_UnstructuredDocumentInfo_DocumentContext_descriptor; - } - - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo.DocumentContext - getDefaultInstanceForType() { - return com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo.DocumentContext - .getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo.DocumentContext - build() { - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo.DocumentContext - result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo.DocumentContext - buildPartial() { - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo.DocumentContext - result = - new com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo.DocumentContext( - this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0( - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo.DocumentContext - result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.pageIdentifier_ = pageIdentifier_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.content_ = content_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other - instanceof - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo.DocumentContext) { - return mergeFrom( - (com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo - .DocumentContext) - other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom( - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo.DocumentContext - other) { - if (other - == com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo.DocumentContext - .getDefaultInstance()) return this; - if (!other.getPageIdentifier().isEmpty()) { - pageIdentifier_ = other.pageIdentifier_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (!other.getContent().isEmpty()) { - content_ = other.content_; - bitField0_ |= 0x00000002; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - pageIdentifier_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: - { - content_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 18 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; + .SearchResultList.SearchResult.UnstructuredDocumentInfo + .ExtractiveAnswerOrBuilder> + getExtractiveAnswersOrBuilderList() { + if (extractiveAnswersBuilder_ != null) { + return extractiveAnswersBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(extractiveAnswers_); } + } - private int bitField0_; + /** + * + * + *
            +             * Deprecated: This field is deprecated and will have no effect on
            +             * the Answer generation.
            +             * Please use document_contexts and extractive_segments fields.
            +             * List of extractive answers.
            +             * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveAnswer extractive_answers = 6 [deprecated = true]; + * + */ + @java.lang.Deprecated + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveAnswer.Builder + addExtractiveAnswersBuilder() { + return internalGetExtractiveAnswersFieldBuilder() + .addBuilder( + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveAnswer + .getDefaultInstance()); + } - private java.lang.Object pageIdentifier_ = ""; + /** + * + * + *
            +             * Deprecated: This field is deprecated and will have no effect on
            +             * the Answer generation.
            +             * Please use document_contexts and extractive_segments fields.
            +             * List of extractive answers.
            +             * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveAnswer extractive_answers = 6 [deprecated = true]; + * + */ + @java.lang.Deprecated + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveAnswer.Builder + addExtractiveAnswersBuilder(int index) { + return internalGetExtractiveAnswersFieldBuilder() + .addBuilder( + index, + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveAnswer + .getDefaultInstance()); + } - /** - * - * - *
            -               * Page identifier.
            -               * 
            - * - * string page_identifier = 1; - * - * @return The pageIdentifier. - */ - public java.lang.String getPageIdentifier() { - java.lang.Object ref = pageIdentifier_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - pageIdentifier_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } + /** + * + * + *
            +             * Deprecated: This field is deprecated and will have no effect on
            +             * the Answer generation.
            +             * Please use document_contexts and extractive_segments fields.
            +             * List of extractive answers.
            +             * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveAnswer extractive_answers = 6 [deprecated = true]; + * + */ + @java.lang.Deprecated + public java.util.List< + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveAnswer + .Builder> + getExtractiveAnswersBuilderList() { + return internalGetExtractiveAnswersFieldBuilder().getBuilderList(); + } - /** - * - * - *
            -               * Page identifier.
            -               * 
            - * - * string page_identifier = 1; - * - * @return The bytes for pageIdentifier. - */ - public com.google.protobuf.ByteString getPageIdentifierBytes() { - java.lang.Object ref = pageIdentifier_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - pageIdentifier_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveAnswer, + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveAnswer + .Builder, + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo + .ExtractiveAnswerOrBuilder> + internalGetExtractiveAnswersFieldBuilder() { + if (extractiveAnswersBuilder_ == null) { + extractiveAnswersBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo + .ExtractiveAnswer, + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveAnswer + .Builder, + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo + .ExtractiveAnswerOrBuilder>( + extractiveAnswers_, + ((bitField0_ & 0x00000020) != 0), + getParentForChildren(), + isClean()); + extractiveAnswers_ = null; } + return extractiveAnswersBuilder_; + } - /** - * - * - *
            -               * Page identifier.
            -               * 
            - * - * string page_identifier = 1; - * - * @param value The pageIdentifier to set. - * @return This builder for chaining. - */ - public Builder setPageIdentifier(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - pageIdentifier_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo) + } - /** - * - * - *
            -               * Page identifier.
            -               * 
            - * - * string page_identifier = 1; - * - * @return This builder for chaining. - */ - public Builder clearPageIdentifier() { - pageIdentifier_ = getDefaultInstance().getPageIdentifier(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo) + private static final com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo + DEFAULT_INSTANCE; - /** - * - * - *
            -               * Page identifier.
            -               * 
            - * - * string page_identifier = 1; - * - * @param value The bytes for pageIdentifier to set. - * @return This builder for chaining. - */ - public Builder setPageIdentifierBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - pageIdentifier_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } + static { + DEFAULT_INSTANCE = + new com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo(); + } - private java.lang.Object content_ = ""; + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo + getDefaultInstance() { + return DEFAULT_INSTANCE; + } - /** - * - * - *
            -               * Document content to be used for answer generation.
            -               * 
            - * - * string content = 2; - * - * @return The content. - */ - public java.lang.String getContent() { - java.lang.Object ref = content_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - content_ = s; - return s; - } else { - return (java.lang.String) ref; + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UnstructuredDocumentInfo parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } - } + }; - /** - * - * - *
            -               * Document content to be used for answer generation.
            -               * 
            - * - * string content = 2; - * - * @return The bytes for content. - */ - public com.google.protobuf.ByteString getContentBytes() { - java.lang.Object ref = content_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - content_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } + public static com.google.protobuf.Parser parser() { + return PARSER; + } - /** - * - * - *
            -               * Document content to be used for answer generation.
            -               * 
            - * - * string content = 2; - * - * @param value The content to set. - * @return This builder for chaining. - */ - public Builder setContent(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - content_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } - /** - * - * - *
            -               * Document content to be used for answer generation.
            -               * 
            - * - * string content = 2; - * - * @return This builder for chaining. - */ - public Builder clearContent() { - content_ = getDefaultInstance().getContent(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } - /** - * - * - *
            -               * Document content to be used for answer generation.
            -               * 
            - * - * string content = 2; - * - * @param value The bytes for content to set. - * @return This builder for chaining. - */ - public Builder setContentBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - content_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } + public interface ChunkInfoOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.ChunkInfo) + com.google.protobuf.MessageOrBuilder { - // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.DocumentContext) - } + /** + * + * + *
            +           * Chunk resource name.
            +           * 
            + * + * string chunk = 1 [(.google.api.resource_reference) = { ... } + * + * @return The chunk. + */ + java.lang.String getChunk(); - // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.DocumentContext) - private static final com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest - .SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo - .DocumentContext - DEFAULT_INSTANCE; + /** + * + * + *
            +           * Chunk resource name.
            +           * 
            + * + * string chunk = 1 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for chunk. + */ + com.google.protobuf.ByteString getChunkBytes(); - static { - DEFAULT_INSTANCE = - new com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo.DocumentContext(); - } + /** + * + * + *
            +           * Chunk textual content.
            +           * 
            + * + * string content = 2; + * + * @return The content. + */ + java.lang.String getContent(); - public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo.DocumentContext - getDefaultInstance() { - return DEFAULT_INSTANCE; - } + /** + * + * + *
            +           * Chunk textual content.
            +           * 
            + * + * string content = 2; + * + * @return The bytes for content. + */ + com.google.protobuf.ByteString getContentBytes(); - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DocumentContext parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException() - .setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; + /** + * + * + *
            +           * Metadata of the document from the current chunk.
            +           * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.ChunkInfo.DocumentMetadata document_metadata = 4; + * + * + * @return Whether the documentMetadata field is set. + */ + boolean hasDocumentMetadata(); + + /** + * + * + *
            +           * Metadata of the document from the current chunk.
            +           * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.ChunkInfo.DocumentMetadata document_metadata = 4; + * + * + * @return The documentMetadata. + */ + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList + .SearchResult.ChunkInfo.DocumentMetadata + getDocumentMetadata(); + + /** + * + * + *
            +           * Metadata of the document from the current chunk.
            +           * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.ChunkInfo.DocumentMetadata document_metadata = 4; + * + */ + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList + .SearchResult.ChunkInfo.DocumentMetadataOrBuilder + getDocumentMetadataOrBuilder(); + } + + /** + * + * + *
            +         * Chunk information.
            +         * 
            + * + * Protobuf type {@code + * google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.ChunkInfo} + */ + public static final class ChunkInfo extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.ChunkInfo) + ChunkInfoOrBuilder { + private static final long serialVersionUID = 0L; - public static com.google.protobuf.Parser parser() { - return PARSER; - } + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ChunkInfo"); + } - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + // Use ChunkInfo.newBuilder() to construct. + private ChunkInfo(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo.DocumentContext - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + private ChunkInfo() { + chunk_ = ""; + content_ = ""; } - public interface ExtractiveSegmentOrBuilder + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.ConversationalSearchServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_SearchSpec_SearchResultList_SearchResult_ChunkInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.ConversationalSearchServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_SearchSpec_SearchResultList_SearchResult_ChunkInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.ChunkInfo.class, + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.ChunkInfo.Builder.class); + } + + public interface DocumentMetadataOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveSegment) + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.ChunkInfo.DocumentMetadata) com.google.protobuf.MessageOrBuilder { /** * * *
            -             * Page identifier.
            +             * Uri of the document.
                          * 
            * - * string page_identifier = 1; + * string uri = 1; * - * @return The pageIdentifier. + * @return The uri. */ - java.lang.String getPageIdentifier(); + java.lang.String getUri(); /** * * *
            -             * Page identifier.
            +             * Uri of the document.
                          * 
            * - * string page_identifier = 1; + * string uri = 1; * - * @return The bytes for pageIdentifier. + * @return The bytes for uri. */ - com.google.protobuf.ByteString getPageIdentifierBytes(); + com.google.protobuf.ByteString getUriBytes(); /** * * *
            -             * Extractive segment content.
            +             * Title of the document.
                          * 
            * - * string content = 2; + * string title = 2; * - * @return The content. + * @return The title. */ - java.lang.String getContent(); + java.lang.String getTitle(); /** * * *
            -             * Extractive segment content.
            +             * Title of the document.
                          * 
            * - * string content = 2; + * string title = 2; * - * @return The bytes for content. + * @return The bytes for title. */ - com.google.protobuf.ByteString getContentBytes(); + com.google.protobuf.ByteString getTitleBytes(); } /** * * *
            -           * Extractive segment.
            -           * [Guide](https://cloud.google.com/generative-ai-app-builder/docs/snippets#extractive-segments)
            -           * Answer generation will only use it if document_contexts is empty.
            -           * This is supposed to be shorter snippets.
            +           * Document metadata contains the information of the document of the
            +           * current chunk.
                        * 
            * * Protobuf type {@code - * google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveSegment} + * google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.ChunkInfo.DocumentMetadata} */ - public static final class ExtractiveSegment extends com.google.protobuf.GeneratedMessage + public static final class DocumentMetadata extends com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveSegment) - ExtractiveSegmentOrBuilder { + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.ChunkInfo.DocumentMetadata) + DocumentMetadataOrBuilder { private static final long serialVersionUID = 0L; static { @@ -10488,63 +18722,61 @@ public static final class ExtractiveSegment extends com.google.protobuf.Generate /* minor= */ 33, /* patch= */ 2, /* suffix= */ "", - "ExtractiveSegment"); + "DocumentMetadata"); } - // Use ExtractiveSegment.newBuilder() to construct. - private ExtractiveSegment(com.google.protobuf.GeneratedMessage.Builder builder) { + // Use DocumentMetadata.newBuilder() to construct. + private DocumentMetadata(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } - private ExtractiveSegment() { - pageIdentifier_ = ""; - content_ = ""; + private DocumentMetadata() { + uri_ = ""; + title_ = ""; } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.discoveryengine.v1beta.ConversationalSearchServiceProto - .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_SearchSpec_SearchResultList_SearchResult_UnstructuredDocumentInfo_ExtractiveSegment_descriptor; + .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_SearchSpec_SearchResultList_SearchResult_ChunkInfo_DocumentMetadata_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.discoveryengine.v1beta.ConversationalSearchServiceProto - .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_SearchSpec_SearchResultList_SearchResult_UnstructuredDocumentInfo_ExtractiveSegment_fieldAccessorTable + .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_SearchSpec_SearchResultList_SearchResult_ChunkInfo_DocumentMetadata_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveSegment - .class, + .SearchResultList.SearchResult.ChunkInfo.DocumentMetadata.class, com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveSegment - .Builder.class); + .SearchResultList.SearchResult.ChunkInfo.DocumentMetadata.Builder.class); } - public static final int PAGE_IDENTIFIER_FIELD_NUMBER = 1; + public static final int URI_FIELD_NUMBER = 1; @SuppressWarnings("serial") - private volatile java.lang.Object pageIdentifier_ = ""; + private volatile java.lang.Object uri_ = ""; /** * * *
            -             * Page identifier.
            +             * Uri of the document.
                          * 
            * - * string page_identifier = 1; + * string uri = 1; * - * @return The pageIdentifier. + * @return The uri. */ @java.lang.Override - public java.lang.String getPageIdentifier() { - java.lang.Object ref = pageIdentifier_; + public java.lang.String getUri() { + java.lang.Object ref = uri_; 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(); - pageIdentifier_ = s; + uri_ = s; return s; } } @@ -10553,51 +18785,51 @@ public java.lang.String getPageIdentifier() { * * *
            -             * Page identifier.
            +             * Uri of the document.
                          * 
            * - * string page_identifier = 1; + * string uri = 1; * - * @return The bytes for pageIdentifier. + * @return The bytes for uri. */ @java.lang.Override - public com.google.protobuf.ByteString getPageIdentifierBytes() { - java.lang.Object ref = pageIdentifier_; + public com.google.protobuf.ByteString getUriBytes() { + java.lang.Object ref = uri_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - pageIdentifier_ = b; + uri_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } - public static final int CONTENT_FIELD_NUMBER = 2; + public static final int TITLE_FIELD_NUMBER = 2; @SuppressWarnings("serial") - private volatile java.lang.Object content_ = ""; + private volatile java.lang.Object title_ = ""; /** * * *
            -             * Extractive segment content.
            +             * Title of the document.
                          * 
            * - * string content = 2; + * string title = 2; * - * @return The content. + * @return The title. */ @java.lang.Override - public java.lang.String getContent() { - java.lang.Object ref = content_; + public java.lang.String getTitle() { + java.lang.Object ref = title_; 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(); - content_ = s; + title_ = s; return s; } } @@ -10606,20 +18838,20 @@ public java.lang.String getContent() { * * *
            -             * Extractive segment content.
            +             * Title of the document.
                          * 
            * - * string content = 2; + * string title = 2; * - * @return The bytes for content. + * @return The bytes for title. */ @java.lang.Override - public com.google.protobuf.ByteString getContentBytes() { - java.lang.Object ref = content_; + public com.google.protobuf.ByteString getTitleBytes() { + java.lang.Object ref = title_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - content_ = b; + title_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; @@ -10641,11 +18873,11 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageIdentifier_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, pageIdentifier_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(uri_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, uri_); } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(content_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 2, content_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(title_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, title_); } getUnknownFields().writeTo(output); } @@ -10656,11 +18888,11 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageIdentifier_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, pageIdentifier_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(uri_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, uri_); } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(content_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(2, content_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(title_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, title_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -10675,19 +18907,18 @@ public boolean equals(final java.lang.Object obj) { if (!(obj instanceof com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveSegment)) { + .SearchResultList.SearchResult.ChunkInfo.DocumentMetadata)) { return super.equals(obj); } com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList - .SearchResult.UnstructuredDocumentInfo.ExtractiveSegment + .SearchResult.ChunkInfo.DocumentMetadata other = (com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo - .ExtractiveSegment) + .SearchResultList.SearchResult.ChunkInfo.DocumentMetadata) obj; - if (!getPageIdentifier().equals(other.getPageIdentifier())) return false; - if (!getContent().equals(other.getContent())) return false; + if (!getUri().equals(other.getUri())) return false; + if (!getTitle().equals(other.getTitle())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -10699,24 +18930,24 @@ public int hashCode() { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + PAGE_IDENTIFIER_FIELD_NUMBER; - hash = (53 * hash) + getPageIdentifier().hashCode(); - hash = (37 * hash) + CONTENT_FIELD_NUMBER; - hash = (53 * hash) + getContent().hashCode(); + hash = (37 * hash) + URI_FIELD_NUMBER; + hash = (53 * hash) + getUri().hashCode(); + hash = (37 * hash) + TITLE_FIELD_NUMBER; + hash = (53 * hash) + getTitle().hashCode(); hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveSegment + .SearchResultList.SearchResult.ChunkInfo.DocumentMetadata parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveSegment + .SearchResultList.SearchResult.ChunkInfo.DocumentMetadata parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) @@ -10725,14 +18956,14 @@ public int hashCode() { } public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveSegment + .SearchResultList.SearchResult.ChunkInfo.DocumentMetadata parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveSegment + .SearchResultList.SearchResult.ChunkInfo.DocumentMetadata parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) @@ -10741,26 +18972,26 @@ public int hashCode() { } public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveSegment + .SearchResultList.SearchResult.ChunkInfo.DocumentMetadata parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveSegment + .SearchResultList.SearchResult.ChunkInfo.DocumentMetadata parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveSegment + .SearchResultList.SearchResult.ChunkInfo.DocumentMetadata parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveSegment + .SearchResultList.SearchResult.ChunkInfo.DocumentMetadata parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) @@ -10770,14 +19001,14 @@ public int hashCode() { } public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveSegment + .SearchResultList.SearchResult.ChunkInfo.DocumentMetadata parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( PARSER, input); } public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveSegment + .SearchResultList.SearchResult.ChunkInfo.DocumentMetadata parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) @@ -10787,13 +19018,13 @@ public int hashCode() { } public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveSegment + .SearchResultList.SearchResult.ChunkInfo.DocumentMetadata parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveSegment + .SearchResultList.SearchResult.ChunkInfo.DocumentMetadata parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) @@ -10813,7 +19044,7 @@ public static Builder newBuilder() { public static Builder newBuilder( com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveSegment + .SearchResultList.SearchResult.ChunkInfo.DocumentMetadata prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @@ -10834,43 +19065,39 @@ protected Builder newBuilderForType( * * *
            -             * Extractive segment.
            -             * [Guide](https://cloud.google.com/generative-ai-app-builder/docs/snippets#extractive-segments)
            -             * Answer generation will only use it if document_contexts is empty.
            -             * This is supposed to be shorter snippets.
            +             * Document metadata contains the information of the document of the
            +             * current chunk.
                          * 
            * * Protobuf type {@code - * google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveSegment} + * google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.ChunkInfo.DocumentMetadata} */ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveSegment) + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.ChunkInfo.DocumentMetadata) com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo - .ExtractiveSegmentOrBuilder { + .SearchResultList.SearchResult.ChunkInfo.DocumentMetadataOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.discoveryengine.v1beta.ConversationalSearchServiceProto - .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_SearchSpec_SearchResultList_SearchResult_UnstructuredDocumentInfo_ExtractiveSegment_descriptor; + .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_SearchSpec_SearchResultList_SearchResult_ChunkInfo_DocumentMetadata_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.discoveryengine.v1beta.ConversationalSearchServiceProto - .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_SearchSpec_SearchResultList_SearchResult_UnstructuredDocumentInfo_ExtractiveSegment_fieldAccessorTable + .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_SearchSpec_SearchResultList_SearchResult_ChunkInfo_DocumentMetadata_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo - .ExtractiveSegment.class, - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo - .ExtractiveSegment.Builder.class); + .SearchResultList.SearchResult.ChunkInfo.DocumentMetadata.class, + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.ChunkInfo.DocumentMetadata.Builder + .class); } // Construct using - // com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveSegment.newBuilder() + // com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.ChunkInfo.DocumentMetadata.newBuilder() private Builder() {} private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { @@ -10881,32 +19108,31 @@ private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { public Builder clear() { super.clear(); bitField0_ = 0; - pageIdentifier_ = ""; - content_ = ""; + uri_ = ""; + title_ = ""; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.cloud.discoveryengine.v1beta.ConversationalSearchServiceProto - .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_SearchSpec_SearchResultList_SearchResult_UnstructuredDocumentInfo_ExtractiveSegment_descriptor; + .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_SearchSpec_SearchResultList_SearchResult_ChunkInfo_DocumentMetadata_descriptor; } @java.lang.Override public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveSegment + .SearchResultList.SearchResult.ChunkInfo.DocumentMetadata getDefaultInstanceForType() { return com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveSegment - .getDefaultInstance(); + .SearchResultList.SearchResult.ChunkInfo.DocumentMetadata.getDefaultInstance(); } @java.lang.Override public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveSegment + .SearchResultList.SearchResult.ChunkInfo.DocumentMetadata build() { com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveSegment + .SearchResultList.SearchResult.ChunkInfo.DocumentMetadata result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); @@ -10916,14 +19142,13 @@ public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { @java.lang.Override public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveSegment + .SearchResultList.SearchResult.ChunkInfo.DocumentMetadata buildPartial() { com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveSegment + .SearchResultList.SearchResult.ChunkInfo.DocumentMetadata result = new com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo - .ExtractiveSegment(this); + .SearchResultList.SearchResult.ChunkInfo.DocumentMetadata(this); if (bitField0_ != 0) { buildPartial0(result); } @@ -10933,14 +19158,14 @@ public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { private void buildPartial0( com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveSegment + .SearchResultList.SearchResult.ChunkInfo.DocumentMetadata result) { int from_bitField0_ = bitField0_; if (((from_bitField0_ & 0x00000001) != 0)) { - result.pageIdentifier_ = pageIdentifier_; + result.uri_ = uri_; } if (((from_bitField0_ & 0x00000002) != 0)) { - result.content_ = content_; + result.title_ = title_; } } @@ -10949,11 +19174,10 @@ public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveSegment) { + .SearchResultList.SearchResult.ChunkInfo.DocumentMetadata) { return mergeFrom( (com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo - .ExtractiveSegment) + .SearchResultList.SearchResult.ChunkInfo.DocumentMetadata) other); } else { super.mergeFrom(other); @@ -10963,19 +19187,19 @@ public Builder mergeFrom(com.google.protobuf.Message other) { public Builder mergeFrom( com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveSegment + .SearchResultList.SearchResult.ChunkInfo.DocumentMetadata other) { if (other == com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveSegment + .SearchResultList.SearchResult.ChunkInfo.DocumentMetadata .getDefaultInstance()) return this; - if (!other.getPageIdentifier().isEmpty()) { - pageIdentifier_ = other.pageIdentifier_; + if (!other.getUri().isEmpty()) { + uri_ = other.uri_; bitField0_ |= 0x00000001; onChanged(); } - if (!other.getContent().isEmpty()) { - content_ = other.content_; + if (!other.getTitle().isEmpty()) { + title_ = other.title_; bitField0_ |= 0x00000002; onChanged(); } @@ -11007,13 +19231,13 @@ public Builder mergeFrom( break; case 10: { - pageIdentifier_ = input.readStringRequireUtf8(); + uri_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000001; break; } // case 10 case 18: { - content_ = input.readStringRequireUtf8(); + title_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000002; break; } // case 18 @@ -11036,25 +19260,25 @@ public Builder mergeFrom( private int bitField0_; - private java.lang.Object pageIdentifier_ = ""; + private java.lang.Object uri_ = ""; /** * * *
            -               * Page identifier.
            +               * Uri of the document.
                            * 
            * - * string page_identifier = 1; + * string uri = 1; * - * @return The pageIdentifier. + * @return The uri. */ - public java.lang.String getPageIdentifier() { - java.lang.Object ref = pageIdentifier_; + public java.lang.String getUri() { + java.lang.Object ref = uri_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); - pageIdentifier_ = s; + uri_ = s; return s; } else { return (java.lang.String) ref; @@ -11065,19 +19289,19 @@ public java.lang.String getPageIdentifier() { * * *
            -               * Page identifier.
            +               * Uri of the document.
                            * 
            * - * string page_identifier = 1; + * string uri = 1; * - * @return The bytes for pageIdentifier. + * @return The bytes for uri. */ - public com.google.protobuf.ByteString getPageIdentifierBytes() { - java.lang.Object ref = pageIdentifier_; + public com.google.protobuf.ByteString getUriBytes() { + java.lang.Object ref = uri_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - pageIdentifier_ = b; + uri_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; @@ -11088,19 +19312,19 @@ public com.google.protobuf.ByteString getPageIdentifierBytes() { * * *
            -               * Page identifier.
            +               * Uri of the document.
                            * 
            * - * string page_identifier = 1; + * string uri = 1; * - * @param value The pageIdentifier to set. + * @param value The uri to set. * @return This builder for chaining. */ - public Builder setPageIdentifier(java.lang.String value) { + public Builder setUri(java.lang.String value) { if (value == null) { throw new NullPointerException(); } - pageIdentifier_ = value; + uri_ = value; bitField0_ |= 0x00000001; onChanged(); return this; @@ -11110,15 +19334,15 @@ public Builder setPageIdentifier(java.lang.String value) { * * *
            -               * Page identifier.
            +               * Uri of the document.
                            * 
            * - * string page_identifier = 1; + * string uri = 1; * * @return This builder for chaining. */ - public Builder clearPageIdentifier() { - pageIdentifier_ = getDefaultInstance().getPageIdentifier(); + public Builder clearUri() { + uri_ = getDefaultInstance().getUri(); bitField0_ = (bitField0_ & ~0x00000001); onChanged(); return this; @@ -11128,44 +19352,44 @@ public Builder clearPageIdentifier() { * * *
            -               * Page identifier.
            +               * Uri of the document.
                            * 
            * - * string page_identifier = 1; + * string uri = 1; * - * @param value The bytes for pageIdentifier to set. + * @param value The bytes for uri to set. * @return This builder for chaining. */ - public Builder setPageIdentifierBytes(com.google.protobuf.ByteString value) { + public Builder setUriBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); - pageIdentifier_ = value; + uri_ = value; bitField0_ |= 0x00000001; onChanged(); return this; } - private java.lang.Object content_ = ""; + private java.lang.Object title_ = ""; /** * * *
            -               * Extractive segment content.
            +               * Title of the document.
                            * 
            * - * string content = 2; + * string title = 2; * - * @return The content. + * @return The title. */ - public java.lang.String getContent() { - java.lang.Object ref = content_; + public java.lang.String getTitle() { + java.lang.Object ref = title_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); - content_ = s; + title_ = s; return s; } else { return (java.lang.String) ref; @@ -11176,19 +19400,19 @@ public java.lang.String getContent() { * * *
            -               * Extractive segment content.
            +               * Title of the document.
                            * 
            * - * string content = 2; + * string title = 2; * - * @return The bytes for content. + * @return The bytes for title. */ - public com.google.protobuf.ByteString getContentBytes() { - java.lang.Object ref = content_; + public com.google.protobuf.ByteString getTitleBytes() { + java.lang.Object ref = title_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - content_ = b; + title_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; @@ -11199,19 +19423,19 @@ public com.google.protobuf.ByteString getContentBytes() { * * *
            -               * Extractive segment content.
            +               * Title of the document.
                            * 
            * - * string content = 2; + * string title = 2; * - * @param value The content to set. + * @param value The title to set. * @return This builder for chaining. */ - public Builder setContent(java.lang.String value) { + public Builder setTitle(java.lang.String value) { if (value == null) { throw new NullPointerException(); } - content_ = value; + title_ = value; bitField0_ |= 0x00000002; onChanged(); return this; @@ -11221,15 +19445,15 @@ public Builder setContent(java.lang.String value) { * * *
            -               * Extractive segment content.
            +               * Title of the document.
                            * 
            * - * string content = 2; + * string title = 2; * * @return This builder for chaining. */ - public Builder clearContent() { - content_ = getDefaultInstance().getContent(); + public Builder clearTitle() { + title_ = getDefaultInstance().getTitle(); bitField0_ = (bitField0_ & ~0x00000002); onChanged(); return this; @@ -11239,50 +19463,49 @@ public Builder clearContent() { * * *
            -               * Extractive segment content.
            +               * Title of the document.
                            * 
            * - * string content = 2; + * string title = 2; * - * @param value The bytes for content to set. + * @param value The bytes for title to set. * @return This builder for chaining. */ - public Builder setContentBytes(com.google.protobuf.ByteString value) { + public Builder setTitleBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); - content_ = value; + title_ = value; bitField0_ |= 0x00000002; onChanged(); return this; } - // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveSegment) + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.ChunkInfo.DocumentMetadata) } - // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveSegment) + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.ChunkInfo.DocumentMetadata) private static final com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest - .SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo - .ExtractiveSegment + .SearchSpec.SearchResultList.SearchResult.ChunkInfo.DocumentMetadata DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveSegment(); + .SearchResultList.SearchResult.ChunkInfo.DocumentMetadata(); } public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveSegment + .SearchResultList.SearchResult.ChunkInfo.DocumentMetadata getDefaultInstance() { return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { @java.lang.Override - public ExtractiveSegment parsePartialFrom( + public DocumentMetadata parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { @@ -11302,1673 +19525,1947 @@ public ExtractiveSegment parsePartialFrom( } }; - public static com.google.protobuf.Parser parser() { + public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override - public com.google.protobuf.Parser getParserForType() { + public com.google.protobuf.Parser getParserForType() { return PARSER; } - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveSegment - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.ChunkInfo.DocumentMetadata + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int bitField0_; + public static final int CHUNK_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object chunk_ = ""; + + /** + * + * + *
            +           * Chunk resource name.
            +           * 
            + * + * string chunk = 1 [(.google.api.resource_reference) = { ... } + * + * @return The chunk. + */ + @java.lang.Override + public java.lang.String getChunk() { + java.lang.Object ref = chunk_; + 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(); + chunk_ = s; + return s; + } + } + + /** + * + * + *
            +           * Chunk resource name.
            +           * 
            + * + * string chunk = 1 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for chunk. + */ + @java.lang.Override + public com.google.protobuf.ByteString getChunkBytes() { + java.lang.Object ref = chunk_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + chunk_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CONTENT_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object content_ = ""; + + /** + * + * + *
            +           * Chunk textual content.
            +           * 
            + * + * string content = 2; + * + * @return The content. + */ + @java.lang.Override + public java.lang.String getContent() { + java.lang.Object ref = content_; + 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(); + content_ = s; + return s; + } + } + + /** + * + * + *
            +           * Chunk textual content.
            +           * 
            + * + * string content = 2; + * + * @return The bytes for content. + */ + @java.lang.Override + public com.google.protobuf.ByteString getContentBytes() { + java.lang.Object ref = content_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + content_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; } } - public interface ExtractiveAnswerOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveAnswer) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
            -             * Page identifier.
            -             * 
            - * - * string page_identifier = 1; - * - * @return The pageIdentifier. - */ - java.lang.String getPageIdentifier(); - - /** - * - * - *
            -             * Page identifier.
            -             * 
            - * - * string page_identifier = 1; - * - * @return The bytes for pageIdentifier. - */ - com.google.protobuf.ByteString getPageIdentifierBytes(); + public static final int DOCUMENT_METADATA_FIELD_NUMBER = 4; + private com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.ChunkInfo.DocumentMetadata + documentMetadata_; - /** - * - * - *
            -             * Extractive answer content.
            -             * 
            - * - * string content = 2; - * - * @return The content. - */ - java.lang.String getContent(); + /** + * + * + *
            +           * Metadata of the document from the current chunk.
            +           * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.ChunkInfo.DocumentMetadata document_metadata = 4; + * + * + * @return Whether the documentMetadata field is set. + */ + @java.lang.Override + public boolean hasDocumentMetadata() { + return ((bitField0_ & 0x00000001) != 0); + } - /** - * - * - *
            -             * Extractive answer content.
            -             * 
            - * - * string content = 2; - * - * @return The bytes for content. - */ - com.google.protobuf.ByteString getContentBytes(); + /** + * + * + *
            +           * Metadata of the document from the current chunk.
            +           * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.ChunkInfo.DocumentMetadata document_metadata = 4; + * + * + * @return The documentMetadata. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.ChunkInfo.DocumentMetadata + getDocumentMetadata() { + return documentMetadata_ == null + ? com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.ChunkInfo.DocumentMetadata.getDefaultInstance() + : documentMetadata_; } /** * * *
            -           * Extractive answer.
            -           * [Guide](https://cloud.google.com/generative-ai-app-builder/docs/snippets#get-answers)
            +           * Metadata of the document from the current chunk.
                        * 
            * - * Protobuf type {@code - * google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveAnswer} + * + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.ChunkInfo.DocumentMetadata document_metadata = 4; + * */ - public static final class ExtractiveAnswer extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveAnswer) - ExtractiveAnswerOrBuilder { - private static final long serialVersionUID = 0L; + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.ChunkInfo.DocumentMetadataOrBuilder + getDocumentMetadataOrBuilder() { + return documentMetadata_ == null + ? com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.ChunkInfo.DocumentMetadata.getDefaultInstance() + : documentMetadata_; + } - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "ExtractiveAnswer"); - } + private byte memoizedIsInitialized = -1; - // Use ExtractiveAnswer.newBuilder() to construct. - private ExtractiveAnswer(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; - private ExtractiveAnswer() { - pageIdentifier_ = ""; - content_ = ""; - } + memoizedIsInitialized = 1; + return true; + } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.discoveryengine.v1beta.ConversationalSearchServiceProto - .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_SearchSpec_SearchResultList_SearchResult_UnstructuredDocumentInfo_ExtractiveAnswer_descriptor; + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(chunk_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, chunk_); } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.discoveryengine.v1beta.ConversationalSearchServiceProto - .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_SearchSpec_SearchResultList_SearchResult_UnstructuredDocumentInfo_ExtractiveAnswer_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveAnswer - .class, - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveAnswer - .Builder.class); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(content_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, content_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(4, getDocumentMetadata()); } + getUnknownFields().writeTo(output); + } - public static final int PAGE_IDENTIFIER_FIELD_NUMBER = 1; + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; - @SuppressWarnings("serial") - private volatile java.lang.Object pageIdentifier_ = ""; + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(chunk_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, chunk_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(content_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, content_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 4, getDocumentMetadata()); + } + 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.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.ChunkInfo)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList + .SearchResult.ChunkInfo + other = + (com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.ChunkInfo) + obj; - /** - * - * - *
            -             * Page identifier.
            -             * 
            - * - * string page_identifier = 1; - * - * @return The pageIdentifier. - */ - @java.lang.Override - public java.lang.String getPageIdentifier() { - java.lang.Object ref = pageIdentifier_; - 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(); - pageIdentifier_ = s; - return s; - } + if (!getChunk().equals(other.getChunk())) return false; + if (!getContent().equals(other.getContent())) return false; + if (hasDocumentMetadata() != other.hasDocumentMetadata()) return false; + if (hasDocumentMetadata()) { + if (!getDocumentMetadata().equals(other.getDocumentMetadata())) return false; } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } - /** - * - * - *
            -             * Page identifier.
            -             * 
            - * - * string page_identifier = 1; - * - * @return The bytes for pageIdentifier. - */ - @java.lang.Override - public com.google.protobuf.ByteString getPageIdentifierBytes() { - java.lang.Object ref = pageIdentifier_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - pageIdentifier_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + CHUNK_FIELD_NUMBER; + hash = (53 * hash) + getChunk().hashCode(); + hash = (37 * hash) + CONTENT_FIELD_NUMBER; + hash = (53 * hash) + getContent().hashCode(); + if (hasDocumentMetadata()) { + hash = (37 * hash) + DOCUMENT_METADATA_FIELD_NUMBER; + hash = (53 * hash) + getDocumentMetadata().hashCode(); } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } - public static final int CONTENT_FIELD_NUMBER = 2; + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.ChunkInfo + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - @SuppressWarnings("serial") - private volatile java.lang.Object content_ = ""; + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.ChunkInfo + parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - /** - * - * - *
            -             * Extractive answer content.
            -             * 
            - * - * string content = 2; - * - * @return The content. - */ - @java.lang.Override - public java.lang.String getContent() { - java.lang.Object ref = content_; - 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(); - content_ = s; - return s; - } - } + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.ChunkInfo + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - /** - * - * - *
            -             * Extractive answer content.
            -             * 
            - * - * string content = 2; - * - * @return The bytes for content. - */ - @java.lang.Override - public com.google.protobuf.ByteString getContentBytes() { - java.lang.Object ref = content_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - content_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.ChunkInfo + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - private byte memoizedIsInitialized = -1; + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.ChunkInfo + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.ChunkInfo + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - memoizedIsInitialized = 1; - return true; - } + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.ChunkInfo + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageIdentifier_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, pageIdentifier_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(content_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 2, content_); - } - getUnknownFields().writeTo(output); - } + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.ChunkInfo + parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.ChunkInfo + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input); + } - size = 0; - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageIdentifier_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, pageIdentifier_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(content_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(2, content_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.ChunkInfo + parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj - instanceof - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveAnswer)) { - return super.equals(obj); - } + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.ChunkInfo + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.ChunkInfo + 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.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList - .SearchResult.UnstructuredDocumentInfo.ExtractiveAnswer - other = - (com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo - .ExtractiveAnswer) - obj; + .SearchResult.ChunkInfo + prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } - if (!getPageIdentifier().equals(other.getPageIdentifier())) return false; - if (!getContent().equals(other.getContent())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + PAGE_IDENTIFIER_FIELD_NUMBER; - hash = (53 * hash) + getPageIdentifier().hashCode(); - hash = (37 * hash) + CONTENT_FIELD_NUMBER; - hash = (53 * hash) + getContent().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
            +           * Chunk information.
            +           * 
            + * + * Protobuf type {@code + * google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.ChunkInfo} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.ChunkInfo) + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList + .SearchResult.ChunkInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.ConversationalSearchServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_SearchSpec_SearchResultList_SearchResult_ChunkInfo_descriptor; } - public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveAnswer - parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.ConversationalSearchServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_SearchSpec_SearchResultList_SearchResult_ChunkInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.ChunkInfo.class, + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.ChunkInfo.Builder.class); } - public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveAnswer - parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); + // Construct using + // com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.ChunkInfo.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); } - public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveAnswer - parseFrom(com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); } - public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveAnswer - parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetDocumentMetadataFieldBuilder(); + } } - public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveAnswer - parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + chunk_ = ""; + content_ = ""; + documentMetadata_ = null; + if (documentMetadataBuilder_ != null) { + documentMetadataBuilder_.dispose(); + documentMetadataBuilder_ = null; + } + return this; } - public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveAnswer - parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1beta.ConversationalSearchServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_SearchSpec_SearchResultList_SearchResult_ChunkInfo_descriptor; } - public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveAnswer - parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.ChunkInfo + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.ChunkInfo.getDefaultInstance(); } - public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveAnswer - parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.ChunkInfo + build() { + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList + .SearchResult.ChunkInfo + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; } - public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveAnswer - parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input); + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.ChunkInfo + buildPartial() { + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList + .SearchResult.ChunkInfo + result = + new com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.ChunkInfo(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; } - public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveAnswer - parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); + private void buildPartial0( + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.ChunkInfo + result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.chunk_ = chunk_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.content_ = content_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.documentMetadata_ = + documentMetadataBuilder_ == null + ? documentMetadata_ + : documentMetadataBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; } - public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveAnswer - parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.ChunkInfo) { + return mergeFrom( + (com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.ChunkInfo) + other); + } else { + super.mergeFrom(other); + return this; + } } - public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveAnswer - parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.ChunkInfo + other) { + if (other + == com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.ChunkInfo.getDefaultInstance()) return this; + if (!other.getChunk().isEmpty()) { + chunk_ = other.chunk_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getContent().isEmpty()) { + content_ = other.content_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasDocumentMetadata()) { + mergeDocumentMetadata(other.getDocumentMetadata()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; } @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveAnswer - prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + public final boolean isInitialized() { + return true; } @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + chunk_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + content_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 34: + { + input.readMessage( + internalGetDocumentMetadataFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } + private int bitField0_; + + private java.lang.Object chunk_ = ""; /** * * *
            -             * Extractive answer.
            -             * [Guide](https://cloud.google.com/generative-ai-app-builder/docs/snippets#get-answers)
            +             * Chunk resource name.
                          * 
            * - * Protobuf type {@code - * google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveAnswer} + * string chunk = 1 [(.google.api.resource_reference) = { ... } + * + * @return The chunk. */ - public static final class Builder - extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveAnswer) - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo - .ExtractiveAnswerOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.discoveryengine.v1beta.ConversationalSearchServiceProto - .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_SearchSpec_SearchResultList_SearchResult_UnstructuredDocumentInfo_ExtractiveAnswer_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.discoveryengine.v1beta.ConversationalSearchServiceProto - .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_SearchSpec_SearchResultList_SearchResult_UnstructuredDocumentInfo_ExtractiveAnswer_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveAnswer - .class, - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveAnswer - .Builder.class); - } - - // Construct using - // com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveAnswer.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - pageIdentifier_ = ""; - content_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.discoveryengine.v1beta.ConversationalSearchServiceProto - .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_SearchSpec_SearchResultList_SearchResult_UnstructuredDocumentInfo_ExtractiveAnswer_descriptor; - } - - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveAnswer - getDefaultInstanceForType() { - return com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveAnswer - .getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveAnswer - build() { - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveAnswer - result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveAnswer - buildPartial() { - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveAnswer - result = - new com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo - .ExtractiveAnswer(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0( - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveAnswer - result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.pageIdentifier_ = pageIdentifier_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.content_ = content_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other - instanceof - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveAnswer) { - return mergeFrom( - (com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo - .ExtractiveAnswer) - other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom( - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveAnswer - other) { - if (other - == com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveAnswer - .getDefaultInstance()) return this; - if (!other.getPageIdentifier().isEmpty()) { - pageIdentifier_ = other.pageIdentifier_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (!other.getContent().isEmpty()) { - content_ = other.content_; - bitField0_ |= 0x00000002; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; + public java.lang.String getChunk() { + java.lang.Object ref = chunk_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + chunk_ = s; + return s; + } else { + return (java.lang.String) ref; } + } - @java.lang.Override - public final boolean isInitialized() { - return true; + /** + * + * + *
            +             * Chunk resource name.
            +             * 
            + * + * string chunk = 1 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for chunk. + */ + public com.google.protobuf.ByteString getChunkBytes() { + java.lang.Object ref = chunk_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + chunk_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; } + } - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - pageIdentifier_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: - { - content_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 18 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; + /** + * + * + *
            +             * Chunk resource name.
            +             * 
            + * + * string chunk = 1 [(.google.api.resource_reference) = { ... } + * + * @param value The chunk to set. + * @return This builder for chaining. + */ + public Builder setChunk(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); } + chunk_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } - private int bitField0_; - - private java.lang.Object pageIdentifier_ = ""; + /** + * + * + *
            +             * Chunk resource name.
            +             * 
            + * + * string chunk = 1 [(.google.api.resource_reference) = { ... } + * + * @return This builder for chaining. + */ + public Builder clearChunk() { + chunk_ = getDefaultInstance().getChunk(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } - /** - * - * - *
            -               * Page identifier.
            -               * 
            - * - * string page_identifier = 1; - * - * @return The pageIdentifier. - */ - public java.lang.String getPageIdentifier() { - java.lang.Object ref = pageIdentifier_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - pageIdentifier_ = s; - return s; - } else { - return (java.lang.String) ref; - } + /** + * + * + *
            +             * Chunk resource name.
            +             * 
            + * + * string chunk = 1 [(.google.api.resource_reference) = { ... } + * + * @param value The bytes for chunk to set. + * @return This builder for chaining. + */ + public Builder setChunkBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); } + checkByteStringIsUtf8(value); + chunk_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } - /** - * - * - *
            -               * Page identifier.
            -               * 
            - * - * string page_identifier = 1; - * - * @return The bytes for pageIdentifier. - */ - public com.google.protobuf.ByteString getPageIdentifierBytes() { - java.lang.Object ref = pageIdentifier_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - pageIdentifier_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } + private java.lang.Object content_ = ""; - /** - * - * - *
            -               * Page identifier.
            -               * 
            - * - * string page_identifier = 1; - * - * @param value The pageIdentifier to set. - * @return This builder for chaining. - */ - public Builder setPageIdentifier(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - pageIdentifier_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; + /** + * + * + *
            +             * Chunk textual content.
            +             * 
            + * + * string content = 2; + * + * @return The content. + */ + public java.lang.String getContent() { + java.lang.Object ref = content_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + content_ = s; + return s; + } else { + return (java.lang.String) ref; } + } - /** - * - * - *
            -               * Page identifier.
            -               * 
            - * - * string page_identifier = 1; - * - * @return This builder for chaining. - */ - public Builder clearPageIdentifier() { - pageIdentifier_ = getDefaultInstance().getPageIdentifier(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; + /** + * + * + *
            +             * Chunk textual content.
            +             * 
            + * + * string content = 2; + * + * @return The bytes for content. + */ + public com.google.protobuf.ByteString getContentBytes() { + java.lang.Object ref = content_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + content_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; } + } - /** - * - * - *
            -               * Page identifier.
            -               * 
            - * - * string page_identifier = 1; - * - * @param value The bytes for pageIdentifier to set. - * @return This builder for chaining. - */ - public Builder setPageIdentifierBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - pageIdentifier_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; + /** + * + * + *
            +             * Chunk textual content.
            +             * 
            + * + * string content = 2; + * + * @param value The content to set. + * @return This builder for chaining. + */ + public Builder setContent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); } + content_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } - private java.lang.Object content_ = ""; + /** + * + * + *
            +             * Chunk textual content.
            +             * 
            + * + * string content = 2; + * + * @return This builder for chaining. + */ + public Builder clearContent() { + content_ = getDefaultInstance().getContent(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } - /** - * - * - *
            -               * Extractive answer content.
            -               * 
            - * - * string content = 2; - * - * @return The content. - */ - public java.lang.String getContent() { - java.lang.Object ref = content_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - content_ = s; - return s; - } else { - return (java.lang.String) ref; - } + /** + * + * + *
            +             * Chunk textual content.
            +             * 
            + * + * string content = 2; + * + * @param value The bytes for content to set. + * @return This builder for chaining. + */ + public Builder setContentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); } + checkByteStringIsUtf8(value); + content_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } - /** - * - * - *
            -               * Extractive answer content.
            -               * 
            - * - * string content = 2; - * - * @return The bytes for content. - */ - public com.google.protobuf.ByteString getContentBytes() { - java.lang.Object ref = content_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - content_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } + private com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.ChunkInfo.DocumentMetadata + documentMetadata_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.ChunkInfo.DocumentMetadata, + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.ChunkInfo.DocumentMetadata.Builder, + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.ChunkInfo.DocumentMetadataOrBuilder> + documentMetadataBuilder_; + + /** + * + * + *
            +             * Metadata of the document from the current chunk.
            +             * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.ChunkInfo.DocumentMetadata document_metadata = 4; + * + * + * @return Whether the documentMetadata field is set. + */ + public boolean hasDocumentMetadata() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
            +             * Metadata of the document from the current chunk.
            +             * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.ChunkInfo.DocumentMetadata document_metadata = 4; + * + * + * @return The documentMetadata. + */ + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.ChunkInfo.DocumentMetadata + getDocumentMetadata() { + if (documentMetadataBuilder_ == null) { + return documentMetadata_ == null + ? com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.ChunkInfo.DocumentMetadata + .getDefaultInstance() + : documentMetadata_; + } else { + return documentMetadataBuilder_.getMessage(); } + } - /** - * - * - *
            -               * Extractive answer content.
            -               * 
            - * - * string content = 2; - * - * @param value The content to set. - * @return This builder for chaining. - */ - public Builder setContent(java.lang.String value) { + /** + * + * + *
            +             * Metadata of the document from the current chunk.
            +             * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.ChunkInfo.DocumentMetadata document_metadata = 4; + * + */ + public Builder setDocumentMetadata( + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.ChunkInfo.DocumentMetadata + value) { + if (documentMetadataBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - content_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; + documentMetadata_ = value; + } else { + documentMetadataBuilder_.setMessage(value); } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } - /** - * - * - *
            -               * Extractive answer content.
            -               * 
            - * - * string content = 2; - * - * @return This builder for chaining. - */ - public Builder clearContent() { - content_ = getDefaultInstance().getContent(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; + /** + * + * + *
            +             * Metadata of the document from the current chunk.
            +             * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.ChunkInfo.DocumentMetadata document_metadata = 4; + * + */ + public Builder setDocumentMetadata( + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.ChunkInfo.DocumentMetadata.Builder + builderForValue) { + if (documentMetadataBuilder_ == null) { + documentMetadata_ = builderForValue.build(); + } else { + documentMetadataBuilder_.setMessage(builderForValue.build()); } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } - /** - * - * - *
            -               * Extractive answer content.
            -               * 
            - * - * string content = 2; - * - * @param value The bytes for content to set. - * @return This builder for chaining. - */ - public Builder setContentBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); + /** + * + * + *
            +             * Metadata of the document from the current chunk.
            +             * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.ChunkInfo.DocumentMetadata document_metadata = 4; + * + */ + public Builder mergeDocumentMetadata( + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.ChunkInfo.DocumentMetadata + value) { + if (documentMetadataBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && documentMetadata_ != null + && documentMetadata_ + != com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.ChunkInfo.DocumentMetadata + .getDefaultInstance()) { + getDocumentMetadataBuilder().mergeFrom(value); + } else { + documentMetadata_ = value; } - checkByteStringIsUtf8(value); - content_ = value; - bitField0_ |= 0x00000002; + } else { + documentMetadataBuilder_.mergeFrom(value); + } + if (documentMetadata_ != null) { + bitField0_ |= 0x00000004; onChanged(); - return this; } + return this; + } - // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveAnswer) + /** + * + * + *
            +             * Metadata of the document from the current chunk.
            +             * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.ChunkInfo.DocumentMetadata document_metadata = 4; + * + */ + public Builder clearDocumentMetadata() { + bitField0_ = (bitField0_ & ~0x00000004); + documentMetadata_ = null; + if (documentMetadataBuilder_ != null) { + documentMetadataBuilder_.dispose(); + documentMetadataBuilder_ = null; + } + onChanged(); + return this; } - // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveAnswer) - private static final com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest - .SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo - .ExtractiveAnswer - DEFAULT_INSTANCE; + /** + * + * + *
            +             * Metadata of the document from the current chunk.
            +             * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.ChunkInfo.DocumentMetadata document_metadata = 4; + * + */ + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.ChunkInfo.DocumentMetadata.Builder + getDocumentMetadataBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return internalGetDocumentMetadataFieldBuilder().getBuilder(); + } - static { - DEFAULT_INSTANCE = - new com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveAnswer(); + /** + * + * + *
            +             * Metadata of the document from the current chunk.
            +             * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.ChunkInfo.DocumentMetadata document_metadata = 4; + * + */ + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.ChunkInfo.DocumentMetadataOrBuilder + getDocumentMetadataOrBuilder() { + if (documentMetadataBuilder_ != null) { + return documentMetadataBuilder_.getMessageOrBuilder(); + } else { + return documentMetadata_ == null + ? com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.ChunkInfo.DocumentMetadata + .getDefaultInstance() + : documentMetadata_; + } } - public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveAnswer - getDefaultInstance() { - return DEFAULT_INSTANCE; + /** + * + * + *
            +             * Metadata of the document from the current chunk.
            +             * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.ChunkInfo.DocumentMetadata document_metadata = 4; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.ChunkInfo.DocumentMetadata, + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.ChunkInfo.DocumentMetadata.Builder, + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.ChunkInfo.DocumentMetadataOrBuilder> + internalGetDocumentMetadataFieldBuilder() { + if (documentMetadataBuilder_ == null) { + documentMetadataBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.ChunkInfo.DocumentMetadata, + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.ChunkInfo.DocumentMetadata.Builder, + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.ChunkInfo.DocumentMetadataOrBuilder>( + getDocumentMetadata(), getParentForChildren(), isClean()); + documentMetadata_ = null; + } + return documentMetadataBuilder_; } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ExtractiveAnswer parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException() - .setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.ChunkInfo) + } - public static com.google.protobuf.Parser parser() { - return PARSER; - } + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.ChunkInfo) + private static final com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.ChunkInfo + DEFAULT_INSTANCE; - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + static { + DEFAULT_INSTANCE = + new com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.ChunkInfo(); + } - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveAnswer - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.ChunkInfo + getDefaultInstance() { + return DEFAULT_INSTANCE; } - public static final int DOCUMENT_FIELD_NUMBER = 1; + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ChunkInfo parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; - @SuppressWarnings("serial") - private volatile java.lang.Object document_ = ""; + public static com.google.protobuf.Parser parser() { + return PARSER; + } - /** - * - * - *
            -           * Document resource name.
            -           * 
            - * - * string document = 1 [(.google.api.resource_reference) = { ... } - * - * @return The document. - */ @java.lang.Override - public java.lang.String getDocument() { - java.lang.Object ref = document_; - 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(); - document_ = s; - return s; - } + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.ChunkInfo + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int contentCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object content_; + + public enum ContentCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + UNSTRUCTURED_DOCUMENT_INFO(1), + CHUNK_INFO(2), + CONTENT_NOT_SET(0); + private final int value; + + private ContentCase(int value) { + this.value = value; } /** - * - * - *
            -           * Document resource name.
            -           * 
            - * - * string document = 1 [(.google.api.resource_reference) = { ... } - * - * @return The bytes for document. + * @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.Override - public com.google.protobuf.ByteString getDocumentBytes() { - java.lang.Object ref = document_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - document_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; + @java.lang.Deprecated + public static ContentCase valueOf(int value) { + return forNumber(value); + } + + public static ContentCase forNumber(int value) { + switch (value) { + case 1: + return UNSTRUCTURED_DOCUMENT_INFO; + case 2: + return CHUNK_INFO; + case 0: + return CONTENT_NOT_SET; + default: + return null; } } - public static final int URI_FIELD_NUMBER = 2; + public int getNumber() { + return this.value; + } + }; - @SuppressWarnings("serial") - private volatile java.lang.Object uri_ = ""; + public ContentCase getContentCase() { + return ContentCase.forNumber(contentCase_); + } - /** - * - * - *
            -           * URI for the document.
            -           * 
            - * - * string uri = 2; - * - * @return The uri. - */ - @java.lang.Override - public java.lang.String getUri() { - java.lang.Object ref = uri_; - 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(); - uri_ = s; - return s; - } + public static final int UNSTRUCTURED_DOCUMENT_INFO_FIELD_NUMBER = 1; + + /** + * + * + *
            +         * Unstructured document information.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo unstructured_document_info = 1; + * + * + * @return Whether the unstructuredDocumentInfo field is set. + */ + @java.lang.Override + public boolean hasUnstructuredDocumentInfo() { + return contentCase_ == 1; + } + + /** + * + * + *
            +         * Unstructured document information.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo unstructured_document_info = 1; + * + * + * @return The unstructuredDocumentInfo. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo + getUnstructuredDocumentInfo() { + if (contentCase_ == 1) { + return (com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo) + content_; } + return com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo.getDefaultInstance(); + } - /** - * - * - *
            -           * URI for the document.
            -           * 
            - * - * string uri = 2; - * - * @return The bytes for uri. - */ - @java.lang.Override - public com.google.protobuf.ByteString getUriBytes() { - java.lang.Object ref = uri_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - uri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } + /** + * + * + *
            +         * Unstructured document information.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo unstructured_document_info = 1; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfoOrBuilder + getUnstructuredDocumentInfoOrBuilder() { + if (contentCase_ == 1) { + return (com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo) + content_; } + return com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo.getDefaultInstance(); + } - public static final int TITLE_FIELD_NUMBER = 3; + public static final int CHUNK_INFO_FIELD_NUMBER = 2; - @SuppressWarnings("serial") - private volatile java.lang.Object title_ = ""; + /** + * + * + *
            +         * Chunk information.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.ChunkInfo chunk_info = 2; + * + * + * @return Whether the chunkInfo field is set. + */ + @java.lang.Override + public boolean hasChunkInfo() { + return contentCase_ == 2; + } - /** - * - * - *
            -           * Title.
            -           * 
            - * - * string title = 3; - * - * @return The title. - */ - @java.lang.Override - public java.lang.String getTitle() { - java.lang.Object ref = title_; - 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(); - title_ = s; - return s; - } + /** + * + * + *
            +         * Chunk information.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.ChunkInfo chunk_info = 2; + * + * + * @return The chunkInfo. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.ChunkInfo + getChunkInfo() { + if (contentCase_ == 2) { + return (com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.ChunkInfo) + content_; } + return com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.ChunkInfo.getDefaultInstance(); + } - /** - * - * - *
            -           * Title.
            -           * 
            - * - * string title = 3; - * - * @return The bytes for title. - */ - @java.lang.Override - public com.google.protobuf.ByteString getTitleBytes() { - java.lang.Object ref = title_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - title_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } + /** + * + * + *
            +         * Chunk information.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.ChunkInfo chunk_info = 2; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.ChunkInfoOrBuilder + getChunkInfoOrBuilder() { + if (contentCase_ == 2) { + return (com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.ChunkInfo) + content_; } + return com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.ChunkInfo.getDefaultInstance(); + } - public static final int DOCUMENT_CONTEXTS_FIELD_NUMBER = 4; + private byte memoizedIsInitialized = -1; - @SuppressWarnings("serial") - private java.util.List< - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo.DocumentContext> - documentContexts_; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; - /** - * - * - *
            -           * List of document contexts. The content will be used for Answer
            -           * Generation. This is supposed to be the main content of the document
            -           * that can be long and comprehensive.
            -           * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.DocumentContext document_contexts = 4; - * - */ - @java.lang.Override - public java.util.List< - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo.DocumentContext> - getDocumentContextsList() { - return documentContexts_; + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (contentCase_ == 1) { + output.writeMessage( + 1, + (com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo) + content_); + } + if (contentCase_ == 2) { + output.writeMessage( + 2, + (com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.ChunkInfo) + content_); } + getUnknownFields().writeTo(output); + } - /** - * - * - *
            -           * List of document contexts. The content will be used for Answer
            -           * Generation. This is supposed to be the main content of the document
            -           * that can be long and comprehensive.
            -           * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.DocumentContext document_contexts = 4; - * - */ - @java.lang.Override - public java.util.List< - ? extends - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo - .DocumentContextOrBuilder> - getDocumentContextsOrBuilderList() { - return documentContexts_; + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (contentCase_ == 1) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 1, + (com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo) + content_); + } + if (contentCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, + (com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.ChunkInfo) + content_); } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } - /** - * - * - *
            -           * List of document contexts. The content will be used for Answer
            -           * Generation. This is supposed to be the main content of the document
            -           * that can be long and comprehensive.
            -           * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.DocumentContext document_contexts = 4; - * - */ - @java.lang.Override - public int getDocumentContextsCount() { - return documentContexts_.size(); + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList + .SearchResult)) { + return super.equals(obj); } + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList + .SearchResult + other = + (com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult) + obj; - /** - * - * - *
            -           * List of document contexts. The content will be used for Answer
            -           * Generation. This is supposed to be the main content of the document
            -           * that can be long and comprehensive.
            -           * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.DocumentContext document_contexts = 4; - * - */ - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo.DocumentContext - getDocumentContexts(int index) { - return documentContexts_.get(index); + if (!getContentCase().equals(other.getContentCase())) return false; + switch (contentCase_) { + case 1: + if (!getUnstructuredDocumentInfo().equals(other.getUnstructuredDocumentInfo())) + return false; + break; + case 2: + if (!getChunkInfo().equals(other.getChunkInfo())) return false; + break; + case 0: + default: } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } - /** - * - * - *
            -           * List of document contexts. The content will be used for Answer
            -           * Generation. This is supposed to be the main content of the document
            -           * that can be long and comprehensive.
            -           * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.DocumentContext document_contexts = 4; - * - */ - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo.DocumentContextOrBuilder - getDocumentContextsOrBuilder(int index) { - return documentContexts_.get(index); + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + switch (contentCase_) { + case 1: + hash = (37 * hash) + UNSTRUCTURED_DOCUMENT_INFO_FIELD_NUMBER; + hash = (53 * hash) + getUnstructuredDocumentInfo().hashCode(); + break; + case 2: + hash = (37 * hash) + CHUNK_INFO_FIELD_NUMBER; + hash = (53 * hash) + getChunkInfo().hashCode(); + break; + case 0: + default: } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult + 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.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult + 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.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - public static final int EXTRACTIVE_SEGMENTS_FIELD_NUMBER = 5; + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - @SuppressWarnings("serial") - private java.util.List< - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveSegment> - extractiveSegments_; + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } - /** - * - * - *
            -           * List of extractive segments.
            -           * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveSegment extractive_segments = 5; - * - */ - @java.lang.Override - public java.util.List< - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveSegment> - getExtractiveSegmentsList() { - return extractiveSegments_; - } + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult + parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } - /** - * - * - *
            -           * List of extractive segments.
            -           * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveSegment extractive_segments = 5; - * - */ - @java.lang.Override - public java.util.List< - ? extends - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo - .ExtractiveSegmentOrBuilder> - getExtractiveSegmentsOrBuilderList() { - return extractiveSegments_; - } + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } - /** - * - * - *
            -           * List of extractive segments.
            -           * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveSegment extractive_segments = 5; - * - */ - @java.lang.Override - public int getExtractiveSegmentsCount() { - return extractiveSegments_.size(); - } + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult + parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } - /** - * - * - *
            -           * List of extractive segments.
            -           * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveSegment extractive_segments = 5; - * - */ - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveSegment - getExtractiveSegments(int index) { - return extractiveSegments_.get(index); - } + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } - /** - * - * - *
            -           * List of extractive segments.
            -           * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveSegment extractive_segments = 5; - * - */ - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveSegmentOrBuilder - getExtractiveSegmentsOrBuilder(int index) { - return extractiveSegments_.get(index); - } + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } - public static final int EXTRACTIVE_ANSWERS_FIELD_NUMBER = 6; + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } - @SuppressWarnings("serial") - private java.util.List< - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveAnswer> - extractiveAnswers_; + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } - /** - * - * - *
            -           * Deprecated: This field is deprecated and will have no effect on
            -           * the Answer generation.
            -           * Please use document_contexts and extractive_segments fields.
            -           * List of extractive answers.
            -           * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveAnswer extractive_answers = 6 [deprecated = true]; - * - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.List< - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveAnswer> - getExtractiveAnswersList() { - return extractiveAnswers_; - } + public static Builder newBuilder( + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList + .SearchResult + prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } - /** - * - * - *
            -           * Deprecated: This field is deprecated and will have no effect on
            -           * the Answer generation.
            -           * Please use document_contexts and extractive_segments fields.
            -           * List of extractive answers.
            -           * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveAnswer extractive_answers = 6 [deprecated = true]; - * - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.List< - ? extends - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo - .ExtractiveAnswerOrBuilder> - getExtractiveAnswersOrBuilderList() { - return extractiveAnswers_; - } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } - /** - * - * - *
            -           * Deprecated: This field is deprecated and will have no effect on
            -           * the Answer generation.
            -           * Please use document_contexts and extractive_segments fields.
            -           * List of extractive answers.
            -           * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveAnswer extractive_answers = 6 [deprecated = true]; - * - */ - @java.lang.Override - @java.lang.Deprecated - public int getExtractiveAnswersCount() { - return extractiveAnswers_.size(); - } + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } - /** - * - * - *
            -           * Deprecated: This field is deprecated and will have no effect on
            -           * the Answer generation.
            -           * Please use document_contexts and extractive_segments fields.
            -           * List of extractive answers.
            -           * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveAnswer extractive_answers = 6 [deprecated = true]; - * - */ - @java.lang.Override - @java.lang.Deprecated - public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveAnswer - getExtractiveAnswers(int index) { - return extractiveAnswers_.get(index); + /** + * + * + *
            +         * Search result.
            +         * 
            + * + * Protobuf type {@code + * google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult) + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList + .SearchResultOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.ConversationalSearchServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_SearchSpec_SearchResultList_SearchResult_descriptor; } - /** - * - * - *
            -           * Deprecated: This field is deprecated and will have no effect on
            -           * the Answer generation.
            -           * Please use document_contexts and extractive_segments fields.
            -           * List of extractive answers.
            -           * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveAnswer extractive_answers = 6 [deprecated = true]; - * - */ @java.lang.Override - @java.lang.Deprecated - public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveAnswerOrBuilder - getExtractiveAnswersOrBuilder(int index) { - return extractiveAnswers_.get(index); + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.ConversationalSearchServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_SearchSpec_SearchResultList_SearchResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.class, + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.Builder.class); } - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + // Construct using + // com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.newBuilder() + private Builder() {} - memoizedIsInitialized = 1; - return true; + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); } @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(document_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, document_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(uri_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 2, uri_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(title_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 3, title_); - } - for (int i = 0; i < documentContexts_.size(); i++) { - output.writeMessage(4, documentContexts_.get(i)); - } - for (int i = 0; i < extractiveSegments_.size(); i++) { - output.writeMessage(5, extractiveSegments_.get(i)); + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (unstructuredDocumentInfoBuilder_ != null) { + unstructuredDocumentInfoBuilder_.clear(); } - for (int i = 0; i < extractiveAnswers_.size(); i++) { - output.writeMessage(6, extractiveAnswers_.get(i)); + if (chunkInfoBuilder_ != null) { + chunkInfoBuilder_.clear(); } - getUnknownFields().writeTo(output); + contentCase_ = 0; + content_ = null; + return this; } @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(document_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, document_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(uri_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(2, uri_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(title_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(3, title_); - } - for (int i = 0; i < documentContexts_.size(); i++) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 4, documentContexts_.get(i)); - } - for (int i = 0; i < extractiveSegments_.size(); i++) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 5, extractiveSegments_.get(i)); - } - for (int i = 0; i < extractiveAnswers_.size(); i++) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 6, extractiveAnswers_.get(i)); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1beta.ConversationalSearchServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_SearchSpec_SearchResultList_SearchResult_descriptor; } @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj - instanceof - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo)) { - return super.equals(obj); - } - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList - .SearchResult.UnstructuredDocumentInfo - other = - (com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo) - obj; - - if (!getDocument().equals(other.getDocument())) return false; - if (!getUri().equals(other.getUri())) return false; - if (!getTitle().equals(other.getTitle())) return false; - if (!getDocumentContextsList().equals(other.getDocumentContextsList())) return false; - if (!getExtractiveSegmentsList().equals(other.getExtractiveSegmentsList())) - return false; - if (!getExtractiveAnswersList().equals(other.getExtractiveAnswersList())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.getDefaultInstance(); } @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + DOCUMENT_FIELD_NUMBER; - hash = (53 * hash) + getDocument().hashCode(); - hash = (37 * hash) + URI_FIELD_NUMBER; - hash = (53 * hash) + getUri().hashCode(); - hash = (37 * hash) + TITLE_FIELD_NUMBER; - hash = (53 * hash) + getTitle().hashCode(); - if (getDocumentContextsCount() > 0) { - hash = (37 * hash) + DOCUMENT_CONTEXTS_FIELD_NUMBER; - hash = (53 * hash) + getDocumentContextsList().hashCode(); - } - if (getExtractiveSegmentsCount() > 0) { - hash = (37 * hash) + EXTRACTIVE_SEGMENTS_FIELD_NUMBER; - hash = (53 * hash) + getExtractiveSegmentsList().hashCode(); - } - if (getExtractiveAnswersCount() > 0) { - hash = (37 * hash) + EXTRACTIVE_ANSWERS_FIELD_NUMBER; - hash = (53 * hash) + getExtractiveAnswersList().hashCode(); + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult + build() { + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList + .SearchResult + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; + return result; } - public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo - parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult + buildPartial() { + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList + .SearchResult + result = + new com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; } - public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo - parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); + private void buildPartial0( + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList + .SearchResult + result) { + int from_bitField0_ = bitField0_; } - public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo - parseFrom(com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); + private void buildPartialOneofs( + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList + .SearchResult + result) { + result.contentCase_ = contentCase_; + result.content_ = this.content_; + if (contentCase_ == 1 && unstructuredDocumentInfoBuilder_ != null) { + result.content_ = unstructuredDocumentInfoBuilder_.build(); + } + if (contentCase_ == 2 && chunkInfoBuilder_ != null) { + result.content_ = chunkInfoBuilder_.build(); + } } - public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo - parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult) { + return mergeFrom( + (com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult) + other); + } else { + super.mergeFrom(other); + return this; + } } - public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo - parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList + .SearchResult + other) { + if (other + == com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.getDefaultInstance()) return this; + switch (other.getContentCase()) { + case UNSTRUCTURED_DOCUMENT_INFO: + { + mergeUnstructuredDocumentInfo(other.getUnstructuredDocumentInfo()); + break; + } + case CHUNK_INFO: + { + mergeChunkInfo(other.getChunkInfo()); + break; + } + case CONTENT_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; } - public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo - parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); + @java.lang.Override + public final boolean isInitialized() { + return true; } - public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo - parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage( + internalGetUnstructuredDocumentInfoFieldBuilder().getBuilder(), + extensionRegistry); + contentCase_ = 1; + break; + } // case 10 + case 18: + { + input.readMessage( + internalGetChunkInfoFieldBuilder().getBuilder(), extensionRegistry); + contentCase_ = 2; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; } - public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo - parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } + private int contentCase_ = 0; + private java.lang.Object content_; - public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo - parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input); + public ContentCase getContentCase() { + return ContentCase.forNumber(contentCase_); } - public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo - parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); + public Builder clearContent() { + contentCase_ = 0; + content_ = null; + onChanged(); + return this; } - public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo - parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } + private int bitField0_; - public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo - parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo, + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo.Builder, + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfoOrBuilder> + unstructuredDocumentInfoBuilder_; + /** + * + * + *
            +           * Unstructured document information.
            +           * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo unstructured_document_info = 1; + * + * + * @return Whether the unstructuredDocumentInfo field is set. + */ @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); + public boolean hasUnstructuredDocumentInfo() { + return contentCase_ == 1; } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); + /** + * + * + *
            +           * Unstructured document information.
            +           * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo unstructured_document_info = 1; + * + * + * @return The unstructuredDocumentInfo. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo + getUnstructuredDocumentInfo() { + if (unstructuredDocumentInfoBuilder_ == null) { + if (contentCase_ == 1) { + return (com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo) + content_; + } + return com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo.getDefaultInstance(); + } else { + if (contentCase_ == 1) { + return unstructuredDocumentInfoBuilder_.getMessage(); + } + return com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo.getDefaultInstance(); + } } - public static Builder newBuilder( + /** + * + * + *
            +           * Unstructured document information.
            +           * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo unstructured_document_info = 1; + * + */ + public Builder setUnstructuredDocumentInfo( com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList .SearchResult.UnstructuredDocumentInfo - prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + value) { + if (unstructuredDocumentInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + content_ = value; + onChanged(); + } else { + unstructuredDocumentInfoBuilder_.setMessage(value); + } + contentCase_ = 1; + return this; } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; + /** + * + * + *
            +           * Unstructured document information.
            +           * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo unstructured_document_info = 1; + * + */ + public Builder setUnstructuredDocumentInfo( + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList + .SearchResult.UnstructuredDocumentInfo.Builder + builderForValue) { + if (unstructuredDocumentInfoBuilder_ == null) { + content_ = builderForValue.build(); + onChanged(); + } else { + unstructuredDocumentInfoBuilder_.setMessage(builderForValue.build()); + } + contentCase_ = 1; + return this; } /** @@ -12978,4753 +21475,4606 @@ protected Builder newBuilderForType( * Unstructured document information. *
            * - * Protobuf type {@code - * google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo} + * + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo unstructured_document_info = 1; + * */ - public static final class Builder - extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo) + public Builder mergeUnstructuredDocumentInfo( com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList - .SearchResult.UnstructuredDocumentInfoOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.discoveryengine.v1beta.ConversationalSearchServiceProto - .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_SearchSpec_SearchResultList_SearchResult_UnstructuredDocumentInfo_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.discoveryengine.v1beta.ConversationalSearchServiceProto - .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_SearchSpec_SearchResultList_SearchResult_UnstructuredDocumentInfo_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo.class, - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo.Builder.class); - } - - // Construct using - // com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - document_ = ""; - uri_ = ""; - title_ = ""; - if (documentContextsBuilder_ == null) { - documentContexts_ = java.util.Collections.emptyList(); - } else { - documentContexts_ = null; - documentContextsBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000008); - if (extractiveSegmentsBuilder_ == null) { - extractiveSegments_ = java.util.Collections.emptyList(); + .SearchResult.UnstructuredDocumentInfo + value) { + if (unstructuredDocumentInfoBuilder_ == null) { + if (contentCase_ == 1 + && content_ + != com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo + .getDefaultInstance()) { + content_ = + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo.newBuilder( + (com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo) + content_) + .mergeFrom(value) + .buildPartial(); } else { - extractiveSegments_ = null; - extractiveSegmentsBuilder_.clear(); + content_ = value; } - bitField0_ = (bitField0_ & ~0x00000010); - if (extractiveAnswersBuilder_ == null) { - extractiveAnswers_ = java.util.Collections.emptyList(); + onChanged(); + } else { + if (contentCase_ == 1) { + unstructuredDocumentInfoBuilder_.mergeFrom(value); } else { - extractiveAnswers_ = null; - extractiveAnswersBuilder_.clear(); + unstructuredDocumentInfoBuilder_.setMessage(value); } - bitField0_ = (bitField0_ & ~0x00000020); - return this; } + contentCase_ = 1; + return this; + } - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.discoveryengine.v1beta.ConversationalSearchServiceProto - .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_SearchSpec_SearchResultList_SearchResult_UnstructuredDocumentInfo_descriptor; + /** + * + * + *
            +           * Unstructured document information.
            +           * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo unstructured_document_info = 1; + * + */ + public Builder clearUnstructuredDocumentInfo() { + if (unstructuredDocumentInfoBuilder_ == null) { + if (contentCase_ == 1) { + contentCase_ = 0; + content_ = null; + onChanged(); + } + } else { + if (contentCase_ == 1) { + contentCase_ = 0; + content_ = null; + } + unstructuredDocumentInfoBuilder_.clear(); } + return this; + } - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo - getDefaultInstanceForType() { + /** + * + * + *
            +           * Unstructured document information.
            +           * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo unstructured_document_info = 1; + * + */ + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo.Builder + getUnstructuredDocumentInfoBuilder() { + return internalGetUnstructuredDocumentInfoFieldBuilder().getBuilder(); + } + + /** + * + * + *
            +           * Unstructured document information.
            +           * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo unstructured_document_info = 1; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfoOrBuilder + getUnstructuredDocumentInfoOrBuilder() { + if ((contentCase_ == 1) && (unstructuredDocumentInfoBuilder_ != null)) { + return unstructuredDocumentInfoBuilder_.getMessageOrBuilder(); + } else { + if (contentCase_ == 1) { + return (com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo) + content_; + } return com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec .SearchResultList.SearchResult.UnstructuredDocumentInfo.getDefaultInstance(); } + } - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo - build() { - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList - .SearchResult.UnstructuredDocumentInfo - result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); + /** + * + * + *
            +           * Unstructured document information.
            +           * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo unstructured_document_info = 1; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo, + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo.Builder, + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfoOrBuilder> + internalGetUnstructuredDocumentInfoFieldBuilder() { + if (unstructuredDocumentInfoBuilder_ == null) { + if (!(contentCase_ == 1)) { + content_ = + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo + .getDefaultInstance(); } - return result; + unstructuredDocumentInfoBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo, + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo.Builder, + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfoOrBuilder>( + (com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.UnstructuredDocumentInfo) + content_, + getParentForChildren(), + isClean()); + content_ = null; } + contentCase_ = 1; + onChanged(); + return unstructuredDocumentInfoBuilder_; + } - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo - buildPartial() { - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList - .SearchResult.UnstructuredDocumentInfo - result = - new com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.ChunkInfo, + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.ChunkInfo.Builder, + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.ChunkInfoOrBuilder> + chunkInfoBuilder_; + + /** + * + * + *
            +           * Chunk information.
            +           * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.ChunkInfo chunk_info = 2; + * + * + * @return Whether the chunkInfo field is set. + */ + @java.lang.Override + public boolean hasChunkInfo() { + return contentCase_ == 2; + } - private void buildPartialRepeatedFields( - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo - result) { - if (documentContextsBuilder_ == null) { - if (((bitField0_ & 0x00000008) != 0)) { - documentContexts_ = java.util.Collections.unmodifiableList(documentContexts_); - bitField0_ = (bitField0_ & ~0x00000008); - } - result.documentContexts_ = documentContexts_; - } else { - result.documentContexts_ = documentContextsBuilder_.build(); - } - if (extractiveSegmentsBuilder_ == null) { - if (((bitField0_ & 0x00000010) != 0)) { - extractiveSegments_ = java.util.Collections.unmodifiableList(extractiveSegments_); - bitField0_ = (bitField0_ & ~0x00000010); - } - result.extractiveSegments_ = extractiveSegments_; - } else { - result.extractiveSegments_ = extractiveSegmentsBuilder_.build(); + /** + * + * + *
            +           * Chunk information.
            +           * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.ChunkInfo chunk_info = 2; + * + * + * @return The chunkInfo. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.ChunkInfo + getChunkInfo() { + if (chunkInfoBuilder_ == null) { + if (contentCase_ == 2) { + return (com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.ChunkInfo) + content_; } - if (extractiveAnswersBuilder_ == null) { - if (((bitField0_ & 0x00000020) != 0)) { - extractiveAnswers_ = java.util.Collections.unmodifiableList(extractiveAnswers_); - bitField0_ = (bitField0_ & ~0x00000020); - } - result.extractiveAnswers_ = extractiveAnswers_; - } else { - result.extractiveAnswers_ = extractiveAnswersBuilder_.build(); + return com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.ChunkInfo.getDefaultInstance(); + } else { + if (contentCase_ == 2) { + return chunkInfoBuilder_.getMessage(); } + return com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.ChunkInfo.getDefaultInstance(); } + } - private void buildPartial0( - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo - result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.document_ = document_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.uri_ = uri_; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.title_ = title_; + /** + * + * + *
            +           * Chunk information.
            +           * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.ChunkInfo chunk_info = 2; + * + */ + public Builder setChunkInfo( + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList + .SearchResult.ChunkInfo + value) { + if (chunkInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); } + content_ = value; + onChanged(); + } else { + chunkInfoBuilder_.setMessage(value); } + contentCase_ = 2; + return this; + } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other - instanceof - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo) { - return mergeFrom( - (com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo) - other); - } else { - super.mergeFrom(other); - return this; - } + /** + * + * + *
            +           * Chunk information.
            +           * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.ChunkInfo chunk_info = 2; + * + */ + public Builder setChunkInfo( + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList + .SearchResult.ChunkInfo.Builder + builderForValue) { + if (chunkInfoBuilder_ == null) { + content_ = builderForValue.build(); + onChanged(); + } else { + chunkInfoBuilder_.setMessage(builderForValue.build()); } + contentCase_ = 2; + return this; + } - public Builder mergeFrom( - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo - other) { - if (other - == com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo.getDefaultInstance()) - return this; - if (!other.getDocument().isEmpty()) { - document_ = other.document_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (!other.getUri().isEmpty()) { - uri_ = other.uri_; - bitField0_ |= 0x00000002; - onChanged(); - } - if (!other.getTitle().isEmpty()) { - title_ = other.title_; - bitField0_ |= 0x00000004; - onChanged(); - } - if (documentContextsBuilder_ == null) { - if (!other.documentContexts_.isEmpty()) { - if (documentContexts_.isEmpty()) { - documentContexts_ = other.documentContexts_; - bitField0_ = (bitField0_ & ~0x00000008); - } else { - ensureDocumentContextsIsMutable(); - documentContexts_.addAll(other.documentContexts_); - } - onChanged(); - } - } else { - if (!other.documentContexts_.isEmpty()) { - if (documentContextsBuilder_.isEmpty()) { - documentContextsBuilder_.dispose(); - documentContextsBuilder_ = null; - documentContexts_ = other.documentContexts_; - bitField0_ = (bitField0_ & ~0x00000008); - documentContextsBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders - ? internalGetDocumentContextsFieldBuilder() - : null; - } else { - documentContextsBuilder_.addAllMessages(other.documentContexts_); - } - } - } - if (extractiveSegmentsBuilder_ == null) { - if (!other.extractiveSegments_.isEmpty()) { - if (extractiveSegments_.isEmpty()) { - extractiveSegments_ = other.extractiveSegments_; - bitField0_ = (bitField0_ & ~0x00000010); - } else { - ensureExtractiveSegmentsIsMutable(); - extractiveSegments_.addAll(other.extractiveSegments_); - } - onChanged(); - } - } else { - if (!other.extractiveSegments_.isEmpty()) { - if (extractiveSegmentsBuilder_.isEmpty()) { - extractiveSegmentsBuilder_.dispose(); - extractiveSegmentsBuilder_ = null; - extractiveSegments_ = other.extractiveSegments_; - bitField0_ = (bitField0_ & ~0x00000010); - extractiveSegmentsBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders - ? internalGetExtractiveSegmentsFieldBuilder() - : null; - } else { - extractiveSegmentsBuilder_.addAllMessages(other.extractiveSegments_); - } - } - } - if (extractiveAnswersBuilder_ == null) { - if (!other.extractiveAnswers_.isEmpty()) { - if (extractiveAnswers_.isEmpty()) { - extractiveAnswers_ = other.extractiveAnswers_; - bitField0_ = (bitField0_ & ~0x00000020); - } else { - ensureExtractiveAnswersIsMutable(); - extractiveAnswers_.addAll(other.extractiveAnswers_); - } - onChanged(); - } - } else { - if (!other.extractiveAnswers_.isEmpty()) { - if (extractiveAnswersBuilder_.isEmpty()) { - extractiveAnswersBuilder_.dispose(); - extractiveAnswersBuilder_ = null; - extractiveAnswers_ = other.extractiveAnswers_; - bitField0_ = (bitField0_ & ~0x00000020); - extractiveAnswersBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders - ? internalGetExtractiveAnswersFieldBuilder() - : null; - } else { - extractiveAnswersBuilder_.addAllMessages(other.extractiveAnswers_); - } - } + /** + * + * + *
            +           * Chunk information.
            +           * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.ChunkInfo chunk_info = 2; + * + */ + public Builder mergeChunkInfo( + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList + .SearchResult.ChunkInfo + value) { + if (chunkInfoBuilder_ == null) { + if (contentCase_ == 2 + && content_ + != com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.ChunkInfo.getDefaultInstance()) { + content_ = + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.ChunkInfo.newBuilder( + (com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.ChunkInfo) + content_) + .mergeFrom(value) + .buildPartial(); + } else { + content_ = value; } - this.mergeUnknownFields(other.getUnknownFields()); onChanged(); - return this; + } else { + if (contentCase_ == 2) { + chunkInfoBuilder_.mergeFrom(value); + } else { + chunkInfoBuilder_.setMessage(value); + } } + contentCase_ = 2; + return this; + } - @java.lang.Override - public final boolean isInitialized() { - return true; + /** + * + * + *
            +           * Chunk information.
            +           * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.ChunkInfo chunk_info = 2; + * + */ + public Builder clearChunkInfo() { + if (chunkInfoBuilder_ == null) { + if (contentCase_ == 2) { + contentCase_ = 0; + content_ = null; + onChanged(); + } + } else { + if (contentCase_ == 2) { + contentCase_ = 0; + content_ = null; + } + chunkInfoBuilder_.clear(); } + return this; + } - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); + /** + * + * + *
            +           * Chunk information.
            +           * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.ChunkInfo chunk_info = 2; + * + */ + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.ChunkInfo.Builder + getChunkInfoBuilder() { + return internalGetChunkInfoFieldBuilder().getBuilder(); + } + + /** + * + * + *
            +           * Chunk information.
            +           * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.ChunkInfo chunk_info = 2; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.ChunkInfoOrBuilder + getChunkInfoOrBuilder() { + if ((contentCase_ == 2) && (chunkInfoBuilder_ != null)) { + return chunkInfoBuilder_.getMessageOrBuilder(); + } else { + if (contentCase_ == 2) { + return (com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.ChunkInfo) + content_; } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - document_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: - { - uri_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 26: - { - title_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - break; - } // case 26 - case 34: - { - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo - .DocumentContext - m = - input.readMessage( - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest - .SearchSpec.SearchResultList.SearchResult - .UnstructuredDocumentInfo.DocumentContext.parser(), - extensionRegistry); - if (documentContextsBuilder_ == null) { - ensureDocumentContextsIsMutable(); - documentContexts_.add(m); - } else { - documentContextsBuilder_.addMessage(m); - } - break; - } // case 34 - case 42: - { - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo - .ExtractiveSegment - m = - input.readMessage( - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest - .SearchSpec.SearchResultList.SearchResult - .UnstructuredDocumentInfo.ExtractiveSegment.parser(), - extensionRegistry); - if (extractiveSegmentsBuilder_ == null) { - ensureExtractiveSegmentsIsMutable(); - extractiveSegments_.add(m); - } else { - extractiveSegmentsBuilder_.addMessage(m); - } - break; - } // case 42 - case 50: - { - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo - .ExtractiveAnswer - m = - input.readMessage( - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest - .SearchSpec.SearchResultList.SearchResult - .UnstructuredDocumentInfo.ExtractiveAnswer.parser(), - extensionRegistry); - if (extractiveAnswersBuilder_ == null) { - ensureExtractiveAnswersIsMutable(); - extractiveAnswers_.add(m); - } else { - extractiveAnswersBuilder_.addMessage(m); - } - break; - } // case 50 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; + return com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.ChunkInfo.getDefaultInstance(); } + } - private int bitField0_; + /** + * + * + *
            +           * Chunk information.
            +           * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.ChunkInfo chunk_info = 2; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.ChunkInfo, + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.ChunkInfo.Builder, + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.ChunkInfoOrBuilder> + internalGetChunkInfoFieldBuilder() { + if (chunkInfoBuilder_ == null) { + if (!(contentCase_ == 2)) { + content_ = + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.ChunkInfo.getDefaultInstance(); + } + chunkInfoBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.ChunkInfo, + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.ChunkInfo.Builder, + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.ChunkInfoOrBuilder>( + (com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.ChunkInfo) + content_, + getParentForChildren(), + isClean()); + content_ = null; + } + contentCase_ = 2; + onChanged(); + return chunkInfoBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult) + private static final com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult(); + } - private java.lang.Object document_ = ""; + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult + getDefaultInstance() { + return DEFAULT_INSTANCE; + } - /** - * - * - *
            -             * Document resource name.
            -             * 
            - * - * string document = 1 [(.google.api.resource_reference) = { ... } - * - * @return The document. - */ - public java.lang.String getDocument() { - java.lang.Object ref = document_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - document_ = s; - return s; - } else { - return (java.lang.String) ref; + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SearchResult parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } - } + }; - /** - * - * - *
            -             * Document resource name.
            -             * 
            - * - * string document = 1 [(.google.api.resource_reference) = { ... } - * - * @return The bytes for document. - */ - public com.google.protobuf.ByteString getDocumentBytes() { - java.lang.Object ref = document_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - document_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } + public static com.google.protobuf.Parser parser() { + return PARSER; + } - /** - * - * - *
            -             * Document resource name.
            -             * 
            - * - * string document = 1 [(.google.api.resource_reference) = { ... } - * - * @param value The document to set. - * @return This builder for chaining. - */ - public Builder setDocument(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - document_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } - /** - * - * - *
            -             * Document resource name.
            -             * 
            - * - * string document = 1 [(.google.api.resource_reference) = { ... } - * - * @return This builder for chaining. - */ - public Builder clearDocument() { - document_ = getDefaultInstance().getDocument(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } - /** - * - * - *
            -             * Document resource name.
            -             * 
            - * - * string document = 1 [(.google.api.resource_reference) = { ... } - * - * @param value The bytes for document to set. - * @return This builder for chaining. - */ - public Builder setDocumentBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - document_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } + public static final int SEARCH_RESULTS_FIELD_NUMBER = 1; - private java.lang.Object uri_ = ""; + @SuppressWarnings("serial") + private java.util.List< + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList + .SearchResult> + searchResults_; - /** - * - * - *
            -             * URI for the document.
            -             * 
            - * - * string uri = 2; - * - * @return The uri. - */ - public java.lang.String getUri() { - java.lang.Object ref = uri_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - uri_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } + /** + * + * + *
            +       * Search results.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult search_results = 1; + * + */ + @java.lang.Override + public java.util.List< + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList + .SearchResult> + getSearchResultsList() { + return searchResults_; + } - /** - * - * - *
            -             * URI for the document.
            -             * 
            - * - * string uri = 2; - * - * @return The bytes for uri. - */ - public com.google.protobuf.ByteString getUriBytes() { - java.lang.Object ref = uri_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - uri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } + /** + * + * + *
            +       * Search results.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult search_results = 1; + * + */ + @java.lang.Override + public java.util.List< + ? extends + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResultOrBuilder> + getSearchResultsOrBuilderList() { + return searchResults_; + } - /** - * - * - *
            -             * URI for the document.
            -             * 
            - * - * string uri = 2; - * - * @param value The uri to set. - * @return This builder for chaining. - */ - public Builder setUri(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - uri_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } + /** + * + * + *
            +       * Search results.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult search_results = 1; + * + */ + @java.lang.Override + public int getSearchResultsCount() { + return searchResults_.size(); + } - /** - * - * - *
            -             * URI for the document.
            -             * 
            - * - * string uri = 2; - * - * @return This builder for chaining. - */ - public Builder clearUri() { - uri_ = getDefaultInstance().getUri(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } + /** + * + * + *
            +       * Search results.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult search_results = 1; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList + .SearchResult + getSearchResults(int index) { + return searchResults_.get(index); + } - /** - * - * - *
            -             * URI for the document.
            -             * 
            - * - * string uri = 2; - * - * @param value The bytes for uri to set. - * @return This builder for chaining. - */ - public Builder setUriBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - uri_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } + /** + * + * + *
            +       * Search results.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult search_results = 1; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList + .SearchResultOrBuilder + getSearchResultsOrBuilder(int index) { + return searchResults_.get(index); + } - private java.lang.Object title_ = ""; + private byte memoizedIsInitialized = -1; - /** - * - * - *
            -             * Title.
            -             * 
            - * - * string title = 3; - * - * @return The title. - */ - public java.lang.String getTitle() { - java.lang.Object ref = title_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - title_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; - /** - * - * - *
            -             * Title.
            -             * 
            - * - * string title = 3; - * - * @return The bytes for title. - */ - public com.google.protobuf.ByteString getTitleBytes() { - java.lang.Object ref = title_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - title_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } + memoizedIsInitialized = 1; + return true; + } - /** - * - * - *
            -             * Title.
            -             * 
            - * - * string title = 3; - * - * @param value The title to set. - * @return This builder for chaining. - */ - public Builder setTitle(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - title_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < searchResults_.size(); i++) { + output.writeMessage(1, searchResults_.get(i)); + } + getUnknownFields().writeTo(output); + } - /** - * - * - *
            -             * Title.
            -             * 
            - * - * string title = 3; - * - * @return This builder for chaining. - */ - public Builder clearTitle() { - title_ = getDefaultInstance().getTitle(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - return this; - } + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; - /** - * - * - *
            -             * Title.
            -             * 
            - * - * string title = 3; - * - * @param value The bytes for title to set. - * @return This builder for chaining. - */ - public Builder setTitleBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - title_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } + size = 0; + for (int i = 0; i < searchResults_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(1, searchResults_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } - private java.util.List< - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo.DocumentContext> - documentContexts_ = java.util.Collections.emptyList(); + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList + other = + (com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList) + obj; - private void ensureDocumentContextsIsMutable() { - if (!((bitField0_ & 0x00000008) != 0)) { - documentContexts_ = - new java.util.ArrayList< - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo - .DocumentContext>(documentContexts_); - bitField0_ |= 0x00000008; - } - } + if (!getSearchResultsList().equals(other.getSearchResultsList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } - private com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo.DocumentContext, - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo.DocumentContext - .Builder, - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo - .DocumentContextOrBuilder> - documentContextsBuilder_; + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getSearchResultsCount() > 0) { + hash = (37 * hash) + SEARCH_RESULTS_FIELD_NUMBER; + hash = (53 * hash) + getSearchResultsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } - /** - * - * - *
            -             * List of document contexts. The content will be used for Answer
            -             * Generation. This is supposed to be the main content of the document
            -             * that can be long and comprehensive.
            -             * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.DocumentContext document_contexts = 4; - * - */ - public java.util.List< - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo.DocumentContext> - getDocumentContextsList() { - if (documentContextsBuilder_ == null) { - return java.util.Collections.unmodifiableList(documentContexts_); - } else { - return documentContextsBuilder_.getMessageList(); - } - } + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - /** - * - * - *
            -             * List of document contexts. The content will be used for Answer
            -             * Generation. This is supposed to be the main content of the document
            -             * that can be long and comprehensive.
            -             * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.DocumentContext document_contexts = 4; - * - */ - public int getDocumentContextsCount() { - if (documentContextsBuilder_ == null) { - return documentContexts_.size(); - } else { - return documentContextsBuilder_.getCount(); - } - } + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - /** - * - * - *
            -             * List of document contexts. The content will be used for Answer
            -             * Generation. This is supposed to be the main content of the document
            -             * that can be long and comprehensive.
            -             * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.DocumentContext document_contexts = 4; - * - */ - public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo.DocumentContext - getDocumentContexts(int index) { - if (documentContextsBuilder_ == null) { - return documentContexts_.get(index); - } else { - return documentContextsBuilder_.getMessage(index); - } - } + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - /** - * - * - *
            -             * List of document contexts. The content will be used for Answer
            -             * Generation. This is supposed to be the main content of the document
            -             * that can be long and comprehensive.
            -             * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.DocumentContext document_contexts = 4; - * - */ - public Builder setDocumentContexts( - int index, - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo.DocumentContext - value) { - if (documentContextsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureDocumentContextsIsMutable(); - documentContexts_.set(index, value); - onChanged(); - } else { - documentContextsBuilder_.setMessage(index, value); - } - return this; - } + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - /** - * - * - *
            -             * List of document contexts. The content will be used for Answer
            -             * Generation. This is supposed to be the main content of the document
            -             * that can be long and comprehensive.
            -             * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.DocumentContext document_contexts = 4; - * - */ - public Builder setDocumentContexts( - int index, - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo.DocumentContext - .Builder - builderForValue) { - if (documentContextsBuilder_ == null) { - ensureDocumentContextsIsMutable(); - documentContexts_.set(index, builderForValue.build()); - onChanged(); - } else { - documentContextsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - /** - * - * - *
            -             * List of document contexts. The content will be used for Answer
            -             * Generation. This is supposed to be the main content of the document
            -             * that can be long and comprehensive.
            -             * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.DocumentContext document_contexts = 4; - * - */ - public Builder addDocumentContexts( - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo.DocumentContext - value) { - if (documentContextsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureDocumentContextsIsMutable(); - documentContexts_.add(value); - onChanged(); - } else { - documentContextsBuilder_.addMessage(value); - } - return this; - } + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - /** - * - * - *
            -             * List of document contexts. The content will be used for Answer
            -             * Generation. This is supposed to be the main content of the document
            -             * that can be long and comprehensive.
            -             * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.DocumentContext document_contexts = 4; - * - */ - public Builder addDocumentContexts( - int index, - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo.DocumentContext - value) { - if (documentContextsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureDocumentContextsIsMutable(); - documentContexts_.add(index, value); - onChanged(); - } else { - documentContextsBuilder_.addMessage(index, value); - } - return this; - } + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList + parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } - /** - * - * - *
            -             * List of document contexts. The content will be used for Answer
            -             * Generation. This is supposed to be the main content of the document
            -             * that can be long and comprehensive.
            -             * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.DocumentContext document_contexts = 4; - * - */ - public Builder addDocumentContexts( - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo.DocumentContext - .Builder - builderForValue) { - if (documentContextsBuilder_ == null) { - ensureDocumentContextsIsMutable(); - documentContexts_.add(builderForValue.build()); - onChanged(); - } else { - documentContextsBuilder_.addMessage(builderForValue.build()); - } - return this; - } + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } - /** - * - * - *
            -             * List of document contexts. The content will be used for Answer
            -             * Generation. This is supposed to be the main content of the document
            -             * that can be long and comprehensive.
            -             * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.DocumentContext document_contexts = 4; - * - */ - public Builder addDocumentContexts( - int index, - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo.DocumentContext - .Builder - builderForValue) { - if (documentContextsBuilder_ == null) { - ensureDocumentContextsIsMutable(); - documentContexts_.add(index, builderForValue.build()); - onChanged(); - } else { - documentContextsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList + parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } - /** - * - * - *
            -             * List of document contexts. The content will be used for Answer
            -             * Generation. This is supposed to be the main content of the document
            -             * that can be long and comprehensive.
            -             * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.DocumentContext document_contexts = 4; - * - */ - public Builder addAllDocumentContexts( - java.lang.Iterable< - ? extends - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo - .DocumentContext> - values) { - if (documentContextsBuilder_ == null) { - ensureDocumentContextsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, documentContexts_); - onChanged(); - } else { - documentContextsBuilder_.addAllMessages(values); - } - return this; - } + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } - /** - * - * - *
            -             * List of document contexts. The content will be used for Answer
            -             * Generation. This is supposed to be the main content of the document
            -             * that can be long and comprehensive.
            -             * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.DocumentContext document_contexts = 4; - * - */ - public Builder clearDocumentContexts() { - if (documentContextsBuilder_ == null) { - documentContexts_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000008); - onChanged(); - } else { - documentContextsBuilder_.clear(); - } - return this; - } + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } - /** - * - * - *
            -             * List of document contexts. The content will be used for Answer
            -             * Generation. This is supposed to be the main content of the document
            -             * that can be long and comprehensive.
            -             * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.DocumentContext document_contexts = 4; - * - */ - public Builder removeDocumentContexts(int index) { - if (documentContextsBuilder_ == null) { - ensureDocumentContextsIsMutable(); - documentContexts_.remove(index); - onChanged(); - } else { - documentContextsBuilder_.remove(index); - } - return this; - } + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } - /** - * - * - *
            -             * List of document contexts. The content will be used for Answer
            -             * Generation. This is supposed to be the main content of the document
            -             * that can be long and comprehensive.
            -             * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.DocumentContext document_contexts = 4; - * - */ - public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo.DocumentContext.Builder - getDocumentContextsBuilder(int index) { - return internalGetDocumentContextsFieldBuilder().getBuilder(index); - } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } - /** - * - * - *
            -             * List of document contexts. The content will be used for Answer
            -             * Generation. This is supposed to be the main content of the document
            -             * that can be long and comprehensive.
            -             * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.DocumentContext document_contexts = 4; - * - */ - public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo.DocumentContextOrBuilder - getDocumentContextsOrBuilder(int index) { - if (documentContextsBuilder_ == null) { - return documentContexts_.get(index); - } else { - return documentContextsBuilder_.getMessageOrBuilder(index); - } - } + public static Builder newBuilder( + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList + 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; + } + + /** + * + * + *
            +       * Search result list.
            +       * 
            + * + * Protobuf type {@code + * google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList) + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultListOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.ConversationalSearchServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_SearchSpec_SearchResultList_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.ConversationalSearchServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_SearchSpec_SearchResultList_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.class, + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.Builder.class); + } - /** - * - * - *
            -             * List of document contexts. The content will be used for Answer
            -             * Generation. This is supposed to be the main content of the document
            -             * that can be long and comprehensive.
            -             * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.DocumentContext document_contexts = 4; - * - */ - public java.util.List< - ? extends - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo - .DocumentContextOrBuilder> - getDocumentContextsOrBuilderList() { - if (documentContextsBuilder_ != null) { - return documentContextsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(documentContexts_); - } - } + // Construct using + // com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.newBuilder() + private Builder() {} - /** - * - * - *
            -             * List of document contexts. The content will be used for Answer
            -             * Generation. This is supposed to be the main content of the document
            -             * that can be long and comprehensive.
            -             * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.DocumentContext document_contexts = 4; - * - */ - public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo.DocumentContext.Builder - addDocumentContextsBuilder() { - return internalGetDocumentContextsFieldBuilder() - .addBuilder( - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo.DocumentContext - .getDefaultInstance()); - } + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } - /** - * - * - *
            -             * List of document contexts. The content will be used for Answer
            -             * Generation. This is supposed to be the main content of the document
            -             * that can be long and comprehensive.
            -             * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.DocumentContext document_contexts = 4; - * - */ - public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo.DocumentContext.Builder - addDocumentContextsBuilder(int index) { - return internalGetDocumentContextsFieldBuilder() - .addBuilder( - index, - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo.DocumentContext - .getDefaultInstance()); - } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (searchResultsBuilder_ == null) { + searchResults_ = java.util.Collections.emptyList(); + } else { + searchResults_ = null; + searchResultsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } - /** - * - * - *
            -             * List of document contexts. The content will be used for Answer
            -             * Generation. This is supposed to be the main content of the document
            -             * that can be long and comprehensive.
            -             * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.DocumentContext document_contexts = 4; - * - */ - public java.util.List< - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo.DocumentContext - .Builder> - getDocumentContextsBuilderList() { - return internalGetDocumentContextsFieldBuilder().getBuilderList(); - } + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1beta.ConversationalSearchServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_SearchSpec_SearchResultList_descriptor; + } - private com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo.DocumentContext, - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo.DocumentContext - .Builder, - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo - .DocumentContextOrBuilder> - internalGetDocumentContextsFieldBuilder() { - if (documentContextsBuilder_ == null) { - documentContextsBuilder_ = - new com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo.DocumentContext, - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo.DocumentContext - .Builder, - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo - .DocumentContextOrBuilder>( - documentContexts_, - ((bitField0_ & 0x00000008) != 0), - getParentForChildren(), - isClean()); - documentContexts_ = null; - } - return documentContextsBuilder_; - } + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.getDefaultInstance(); + } - private java.util.List< - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveSegment> - extractiveSegments_ = java.util.Collections.emptyList(); + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList + build() { + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } - private void ensureExtractiveSegmentsIsMutable() { - if (!((bitField0_ & 0x00000010) != 0)) { - extractiveSegments_ = - new java.util.ArrayList< - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo - .ExtractiveSegment>(extractiveSegments_); - bitField0_ |= 0x00000010; - } + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList + buildPartial() { + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList + result = + new com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList + result) { + if (searchResultsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + searchResults_ = java.util.Collections.unmodifiableList(searchResults_); + bitField0_ = (bitField0_ & ~0x00000001); } + result.searchResults_ = searchResults_; + } else { + result.searchResults_ = searchResultsBuilder_.build(); + } + } - private com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveSegment, - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveSegment - .Builder, - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo - .ExtractiveSegmentOrBuilder> - extractiveSegmentsBuilder_; + private void buildPartial0( + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList + result) { + int from_bitField0_ = bitField0_; + } - /** - * - * - *
            -             * List of extractive segments.
            -             * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveSegment extractive_segments = 5; - * - */ - public java.util.List< - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveSegment> - getExtractiveSegmentsList() { - if (extractiveSegmentsBuilder_ == null) { - return java.util.Collections.unmodifiableList(extractiveSegments_); - } else { - return extractiveSegmentsBuilder_.getMessageList(); - } - } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList) { + return mergeFrom( + (com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList) + other); + } else { + super.mergeFrom(other); + return this; + } + } - /** - * - * - *
            -             * List of extractive segments.
            -             * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveSegment extractive_segments = 5; - * - */ - public int getExtractiveSegmentsCount() { - if (extractiveSegmentsBuilder_ == null) { - return extractiveSegments_.size(); + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList + other) { + if (other + == com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.getDefaultInstance()) return this; + if (searchResultsBuilder_ == null) { + if (!other.searchResults_.isEmpty()) { + if (searchResults_.isEmpty()) { + searchResults_ = other.searchResults_; + bitField0_ = (bitField0_ & ~0x00000001); } else { - return extractiveSegmentsBuilder_.getCount(); + ensureSearchResultsIsMutable(); + searchResults_.addAll(other.searchResults_); } + onChanged(); } - - /** - * - * - *
            -             * List of extractive segments.
            -             * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveSegment extractive_segments = 5; - * - */ - public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveSegment - getExtractiveSegments(int index) { - if (extractiveSegmentsBuilder_ == null) { - return extractiveSegments_.get(index); + } else { + if (!other.searchResults_.isEmpty()) { + if (searchResultsBuilder_.isEmpty()) { + searchResultsBuilder_.dispose(); + searchResultsBuilder_ = null; + searchResults_ = other.searchResults_; + bitField0_ = (bitField0_ & ~0x00000001); + searchResultsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetSearchResultsFieldBuilder() + : null; } else { - return extractiveSegmentsBuilder_.getMessage(index); + searchResultsBuilder_.addAllMessages(other.searchResults_); } } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } - /** - * - * - *
            -             * List of extractive segments.
            -             * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveSegment extractive_segments = 5; - * - */ - public Builder setExtractiveSegments( - int index, - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveSegment - value) { - if (extractiveSegmentsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureExtractiveSegmentsIsMutable(); - extractiveSegments_.set(index, value); - onChanged(); - } else { - extractiveSegmentsBuilder_.setMessage(index, value); - } - return this; - } + @java.lang.Override + public final boolean isInitialized() { + return true; + } - /** - * - * - *
            -             * List of extractive segments.
            -             * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveSegment extractive_segments = 5; - * - */ - public Builder setExtractiveSegments( - int index, - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveSegment - .Builder - builderForValue) { - if (extractiveSegmentsBuilder_ == null) { - ensureExtractiveSegmentsIsMutable(); - extractiveSegments_.set(index, builderForValue.build()); - onChanged(); - } else { - extractiveSegmentsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult + m = + input.readMessage( + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest + .SearchSpec.SearchResultList.SearchResult.parser(), + extensionRegistry); + if (searchResultsBuilder_ == null) { + ensureSearchResultsIsMutable(); + searchResults_.add(m); + } else { + searchResultsBuilder_.addMessage(m); + } + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } - /** - * - * - *
            -             * List of extractive segments.
            -             * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveSegment extractive_segments = 5; - * - */ - public Builder addExtractiveSegments( - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveSegment - value) { - if (extractiveSegmentsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureExtractiveSegmentsIsMutable(); - extractiveSegments_.add(value); - onChanged(); - } else { - extractiveSegmentsBuilder_.addMessage(value); - } - return this; - } + private int bitField0_; - /** - * - * - *
            -             * List of extractive segments.
            -             * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveSegment extractive_segments = 5; - * - */ - public Builder addExtractiveSegments( - int index, + private java.util.List< com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveSegment - value) { - if (extractiveSegmentsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureExtractiveSegmentsIsMutable(); - extractiveSegments_.add(index, value); - onChanged(); - } else { - extractiveSegmentsBuilder_.addMessage(index, value); - } - return this; - } + .SearchResultList.SearchResult> + searchResults_ = java.util.Collections.emptyList(); - /** - * - * - *
            -             * List of extractive segments.
            -             * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveSegment extractive_segments = 5; - * - */ - public Builder addExtractiveSegments( - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveSegment - .Builder - builderForValue) { - if (extractiveSegmentsBuilder_ == null) { - ensureExtractiveSegmentsIsMutable(); - extractiveSegments_.add(builderForValue.build()); - onChanged(); - } else { - extractiveSegmentsBuilder_.addMessage(builderForValue.build()); - } - return this; - } + private void ensureSearchResultsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + searchResults_ = + new java.util.ArrayList< + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult>(searchResults_); + bitField0_ |= 0x00000001; + } + } - /** - * - * - *
            -             * List of extractive segments.
            -             * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveSegment extractive_segments = 5; - * - */ - public Builder addExtractiveSegments( - int index, + private com.google.protobuf.RepeatedFieldBuilder< com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveSegment - .Builder - builderForValue) { - if (extractiveSegmentsBuilder_ == null) { - ensureExtractiveSegmentsIsMutable(); - extractiveSegments_.add(index, builderForValue.build()); - onChanged(); - } else { - extractiveSegmentsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } + .SearchResultList.SearchResult, + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.Builder, + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResultOrBuilder> + searchResultsBuilder_; - /** - * - * - *
            -             * List of extractive segments.
            -             * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveSegment extractive_segments = 5; - * - */ - public Builder addAllExtractiveSegments( - java.lang.Iterable< - ? extends - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo - .ExtractiveSegment> - values) { - if (extractiveSegmentsBuilder_ == null) { - ensureExtractiveSegmentsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, extractiveSegments_); - onChanged(); - } else { - extractiveSegmentsBuilder_.addAllMessages(values); - } - return this; - } + /** + * + * + *
            +         * Search results.
            +         * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult search_results = 1; + * + */ + public java.util.List< + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult> + getSearchResultsList() { + if (searchResultsBuilder_ == null) { + return java.util.Collections.unmodifiableList(searchResults_); + } else { + return searchResultsBuilder_.getMessageList(); + } + } - /** - * - * - *
            -             * List of extractive segments.
            -             * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveSegment extractive_segments = 5; - * - */ - public Builder clearExtractiveSegments() { - if (extractiveSegmentsBuilder_ == null) { - extractiveSegments_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000010); - onChanged(); - } else { - extractiveSegmentsBuilder_.clear(); - } - return this; - } + /** + * + * + *
            +         * Search results.
            +         * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult search_results = 1; + * + */ + public int getSearchResultsCount() { + if (searchResultsBuilder_ == null) { + return searchResults_.size(); + } else { + return searchResultsBuilder_.getCount(); + } + } - /** - * - * - *
            -             * List of extractive segments.
            -             * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveSegment extractive_segments = 5; - * - */ - public Builder removeExtractiveSegments(int index) { - if (extractiveSegmentsBuilder_ == null) { - ensureExtractiveSegmentsIsMutable(); - extractiveSegments_.remove(index); - onChanged(); - } else { - extractiveSegmentsBuilder_.remove(index); - } - return this; - } + /** + * + * + *
            +         * Search results.
            +         * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult search_results = 1; + * + */ + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult + getSearchResults(int index) { + if (searchResultsBuilder_ == null) { + return searchResults_.get(index); + } else { + return searchResultsBuilder_.getMessage(index); + } + } - /** - * - * - *
            -             * List of extractive segments.
            -             * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveSegment extractive_segments = 5; - * - */ - public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveSegment - .Builder - getExtractiveSegmentsBuilder(int index) { - return internalGetExtractiveSegmentsFieldBuilder().getBuilder(index); + /** + * + * + *
            +         * Search results.
            +         * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult search_results = 1; + * + */ + public Builder setSearchResults( + int index, + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList + .SearchResult + value) { + if (searchResultsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); } + ensureSearchResultsIsMutable(); + searchResults_.set(index, value); + onChanged(); + } else { + searchResultsBuilder_.setMessage(index, value); + } + return this; + } - /** - * - * - *
            -             * List of extractive segments.
            -             * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveSegment extractive_segments = 5; - * - */ - public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo - .ExtractiveSegmentOrBuilder - getExtractiveSegmentsOrBuilder(int index) { - if (extractiveSegmentsBuilder_ == null) { - return extractiveSegments_.get(index); - } else { - return extractiveSegmentsBuilder_.getMessageOrBuilder(index); - } - } + /** + * + * + *
            +         * Search results.
            +         * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult search_results = 1; + * + */ + public Builder setSearchResults( + int index, + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList + .SearchResult.Builder + builderForValue) { + if (searchResultsBuilder_ == null) { + ensureSearchResultsIsMutable(); + searchResults_.set(index, builderForValue.build()); + onChanged(); + } else { + searchResultsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } - /** - * - * - *
            -             * List of extractive segments.
            -             * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveSegment extractive_segments = 5; - * - */ - public java.util.List< - ? extends - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo - .ExtractiveSegmentOrBuilder> - getExtractiveSegmentsOrBuilderList() { - if (extractiveSegmentsBuilder_ != null) { - return extractiveSegmentsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(extractiveSegments_); - } + /** + * + * + *
            +         * Search results.
            +         * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult search_results = 1; + * + */ + public Builder addSearchResults( + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList + .SearchResult + value) { + if (searchResultsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); } + ensureSearchResultsIsMutable(); + searchResults_.add(value); + onChanged(); + } else { + searchResultsBuilder_.addMessage(value); + } + return this; + } - /** - * - * - *
            -             * List of extractive segments.
            -             * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveSegment extractive_segments = 5; - * - */ - public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveSegment - .Builder - addExtractiveSegmentsBuilder() { - return internalGetExtractiveSegmentsFieldBuilder() - .addBuilder( - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveSegment - .getDefaultInstance()); + /** + * + * + *
            +         * Search results.
            +         * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult search_results = 1; + * + */ + public Builder addSearchResults( + int index, + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList + .SearchResult + value) { + if (searchResultsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); } + ensureSearchResultsIsMutable(); + searchResults_.add(index, value); + onChanged(); + } else { + searchResultsBuilder_.addMessage(index, value); + } + return this; + } - /** - * - * - *
            -             * List of extractive segments.
            -             * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveSegment extractive_segments = 5; - * - */ - public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveSegment - .Builder - addExtractiveSegmentsBuilder(int index) { - return internalGetExtractiveSegmentsFieldBuilder() - .addBuilder( - index, - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveSegment - .getDefaultInstance()); - } + /** + * + * + *
            +         * Search results.
            +         * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult search_results = 1; + * + */ + public Builder addSearchResults( + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList + .SearchResult.Builder + builderForValue) { + if (searchResultsBuilder_ == null) { + ensureSearchResultsIsMutable(); + searchResults_.add(builderForValue.build()); + onChanged(); + } else { + searchResultsBuilder_.addMessage(builderForValue.build()); + } + return this; + } - /** - * - * - *
            -             * List of extractive segments.
            -             * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveSegment extractive_segments = 5; - * - */ - public java.util.List< - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveSegment - .Builder> - getExtractiveSegmentsBuilderList() { - return internalGetExtractiveSegmentsFieldBuilder().getBuilderList(); - } + /** + * + * + *
            +         * Search results.
            +         * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult search_results = 1; + * + */ + public Builder addSearchResults( + int index, + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList + .SearchResult.Builder + builderForValue) { + if (searchResultsBuilder_ == null) { + ensureSearchResultsIsMutable(); + searchResults_.add(index, builderForValue.build()); + onChanged(); + } else { + searchResultsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } - private com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveSegment, - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveSegment - .Builder, - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo - .ExtractiveSegmentOrBuilder> - internalGetExtractiveSegmentsFieldBuilder() { - if (extractiveSegmentsBuilder_ == null) { - extractiveSegmentsBuilder_ = - new com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo - .ExtractiveSegment, - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo - .ExtractiveSegment.Builder, + /** + * + * + *
            +         * Search results.
            +         * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult search_results = 1; + * + */ + public Builder addAllSearchResults( + java.lang.Iterable< + ? extends com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo - .ExtractiveSegmentOrBuilder>( - extractiveSegments_, - ((bitField0_ & 0x00000010) != 0), - getParentForChildren(), - isClean()); - extractiveSegments_ = null; - } - return extractiveSegmentsBuilder_; - } + .SearchResultList.SearchResult> + values) { + if (searchResultsBuilder_ == null) { + ensureSearchResultsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, searchResults_); + onChanged(); + } else { + searchResultsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
            +         * Search results.
            +         * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult search_results = 1; + * + */ + public Builder clearSearchResults() { + if (searchResultsBuilder_ == null) { + searchResults_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + searchResultsBuilder_.clear(); + } + return this; + } - private java.util.List< - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveAnswer> - extractiveAnswers_ = java.util.Collections.emptyList(); + /** + * + * + *
            +         * Search results.
            +         * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult search_results = 1; + * + */ + public Builder removeSearchResults(int index) { + if (searchResultsBuilder_ == null) { + ensureSearchResultsIsMutable(); + searchResults_.remove(index); + onChanged(); + } else { + searchResultsBuilder_.remove(index); + } + return this; + } - private void ensureExtractiveAnswersIsMutable() { - if (!((bitField0_ & 0x00000020) != 0)) { - extractiveAnswers_ = - new java.util.ArrayList< - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo - .ExtractiveAnswer>(extractiveAnswers_); - bitField0_ |= 0x00000020; - } - } + /** + * + * + *
            +         * Search results.
            +         * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult search_results = 1; + * + */ + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.Builder + getSearchResultsBuilder(int index) { + return internalGetSearchResultsFieldBuilder().getBuilder(index); + } - private com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveAnswer, - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveAnswer - .Builder, - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo - .ExtractiveAnswerOrBuilder> - extractiveAnswersBuilder_; + /** + * + * + *
            +         * Search results.
            +         * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult search_results = 1; + * + */ + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResultOrBuilder + getSearchResultsOrBuilder(int index) { + if (searchResultsBuilder_ == null) { + return searchResults_.get(index); + } else { + return searchResultsBuilder_.getMessageOrBuilder(index); + } + } - /** - * - * - *
            -             * Deprecated: This field is deprecated and will have no effect on
            -             * the Answer generation.
            -             * Please use document_contexts and extractive_segments fields.
            -             * List of extractive answers.
            -             * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveAnswer extractive_answers = 6 [deprecated = true]; - * - */ - @java.lang.Deprecated - public java.util.List< + /** + * + * + *
            +         * Search results.
            +         * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult search_results = 1; + * + */ + public java.util.List< + ? extends com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveAnswer> - getExtractiveAnswersList() { - if (extractiveAnswersBuilder_ == null) { - return java.util.Collections.unmodifiableList(extractiveAnswers_); - } else { - return extractiveAnswersBuilder_.getMessageList(); - } - } - - /** - * - * - *
            -             * Deprecated: This field is deprecated and will have no effect on
            -             * the Answer generation.
            -             * Please use document_contexts and extractive_segments fields.
            -             * List of extractive answers.
            -             * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveAnswer extractive_answers = 6 [deprecated = true]; - * - */ - @java.lang.Deprecated - public int getExtractiveAnswersCount() { - if (extractiveAnswersBuilder_ == null) { - return extractiveAnswers_.size(); - } else { - return extractiveAnswersBuilder_.getCount(); - } - } - - /** - * - * - *
            -             * Deprecated: This field is deprecated and will have no effect on
            -             * the Answer generation.
            -             * Please use document_contexts and extractive_segments fields.
            -             * List of extractive answers.
            -             * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveAnswer extractive_answers = 6 [deprecated = true]; - * - */ - @java.lang.Deprecated - public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveAnswer - getExtractiveAnswers(int index) { - if (extractiveAnswersBuilder_ == null) { - return extractiveAnswers_.get(index); - } else { - return extractiveAnswersBuilder_.getMessage(index); - } - } - - /** - * - * - *
            -             * Deprecated: This field is deprecated and will have no effect on
            -             * the Answer generation.
            -             * Please use document_contexts and extractive_segments fields.
            -             * List of extractive answers.
            -             * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveAnswer extractive_answers = 6 [deprecated = true]; - * - */ - @java.lang.Deprecated - public Builder setExtractiveAnswers( - int index, - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveAnswer - value) { - if (extractiveAnswersBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureExtractiveAnswersIsMutable(); - extractiveAnswers_.set(index, value); - onChanged(); - } else { - extractiveAnswersBuilder_.setMessage(index, value); - } - return this; - } + .SearchResultList.SearchResultOrBuilder> + getSearchResultsOrBuilderList() { + if (searchResultsBuilder_ != null) { + return searchResultsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(searchResults_); + } + } - /** - * - * - *
            -             * Deprecated: This field is deprecated and will have no effect on
            -             * the Answer generation.
            -             * Please use document_contexts and extractive_segments fields.
            -             * List of extractive answers.
            -             * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveAnswer extractive_answers = 6 [deprecated = true]; - * - */ - @java.lang.Deprecated - public Builder setExtractiveAnswers( - int index, - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveAnswer - .Builder - builderForValue) { - if (extractiveAnswersBuilder_ == null) { - ensureExtractiveAnswersIsMutable(); - extractiveAnswers_.set(index, builderForValue.build()); - onChanged(); - } else { - extractiveAnswersBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } + /** + * + * + *
            +         * Search results.
            +         * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult search_results = 1; + * + */ + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.Builder + addSearchResultsBuilder() { + return internalGetSearchResultsFieldBuilder() + .addBuilder( + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.getDefaultInstance()); + } - /** - * - * - *
            -             * Deprecated: This field is deprecated and will have no effect on
            -             * the Answer generation.
            -             * Please use document_contexts and extractive_segments fields.
            -             * List of extractive answers.
            -             * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveAnswer extractive_answers = 6 [deprecated = true]; - * - */ - @java.lang.Deprecated - public Builder addExtractiveAnswers( - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveAnswer - value) { - if (extractiveAnswersBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureExtractiveAnswersIsMutable(); - extractiveAnswers_.add(value); - onChanged(); - } else { - extractiveAnswersBuilder_.addMessage(value); - } - return this; - } + /** + * + * + *
            +         * Search results.
            +         * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult search_results = 1; + * + */ + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.Builder + addSearchResultsBuilder(int index) { + return internalGetSearchResultsFieldBuilder() + .addBuilder( + index, + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.getDefaultInstance()); + } - /** - * - * - *
            -             * Deprecated: This field is deprecated and will have no effect on
            -             * the Answer generation.
            -             * Please use document_contexts and extractive_segments fields.
            -             * List of extractive answers.
            -             * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveAnswer extractive_answers = 6 [deprecated = true]; - * - */ - @java.lang.Deprecated - public Builder addExtractiveAnswers( - int index, + /** + * + * + *
            +         * Search results.
            +         * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult search_results = 1; + * + */ + public java.util.List< com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveAnswer - value) { - if (extractiveAnswersBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureExtractiveAnswersIsMutable(); - extractiveAnswers_.add(index, value); - onChanged(); - } else { - extractiveAnswersBuilder_.addMessage(index, value); - } - return this; - } + .SearchResultList.SearchResult.Builder> + getSearchResultsBuilderList() { + return internalGetSearchResultsFieldBuilder().getBuilderList(); + } - /** - * - * - *
            -             * Deprecated: This field is deprecated and will have no effect on
            -             * the Answer generation.
            -             * Please use document_contexts and extractive_segments fields.
            -             * List of extractive answers.
            -             * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveAnswer extractive_answers = 6 [deprecated = true]; - * - */ - @java.lang.Deprecated - public Builder addExtractiveAnswers( + private com.google.protobuf.RepeatedFieldBuilder< com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveAnswer - .Builder - builderForValue) { - if (extractiveAnswersBuilder_ == null) { - ensureExtractiveAnswersIsMutable(); - extractiveAnswers_.add(builderForValue.build()); - onChanged(); - } else { - extractiveAnswersBuilder_.addMessage(builderForValue.build()); - } - return this; - } - - /** - * - * - *
            -             * Deprecated: This field is deprecated and will have no effect on
            -             * the Answer generation.
            -             * Please use document_contexts and extractive_segments fields.
            -             * List of extractive answers.
            -             * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveAnswer extractive_answers = 6 [deprecated = true]; - * - */ - @java.lang.Deprecated - public Builder addExtractiveAnswers( - int index, + .SearchResultList.SearchResult, com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveAnswer - .Builder - builderForValue) { - if (extractiveAnswersBuilder_ == null) { - ensureExtractiveAnswersIsMutable(); - extractiveAnswers_.add(index, builderForValue.build()); - onChanged(); - } else { - extractiveAnswersBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } + .SearchResultList.SearchResult.Builder, + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResultOrBuilder> + internalGetSearchResultsFieldBuilder() { + if (searchResultsBuilder_ == null) { + searchResultsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult, + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResult.Builder, + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.SearchResultOrBuilder>( + searchResults_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + searchResults_ = null; + } + return searchResultsBuilder_; + } - /** - * - * - *
            -             * Deprecated: This field is deprecated and will have no effect on
            -             * the Answer generation.
            -             * Please use document_contexts and extractive_segments fields.
            -             * List of extractive answers.
            -             * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveAnswer extractive_answers = 6 [deprecated = true]; - * - */ - @java.lang.Deprecated - public Builder addAllExtractiveAnswers( - java.lang.Iterable< - ? extends - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo - .ExtractiveAnswer> - values) { - if (extractiveAnswersBuilder_ == null) { - ensureExtractiveAnswersIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, extractiveAnswers_); - onChanged(); - } else { - extractiveAnswersBuilder_.addAllMessages(values); - } - return this; - } + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList) + } - /** - * - * - *
            -             * Deprecated: This field is deprecated and will have no effect on
            -             * the Answer generation.
            -             * Please use document_contexts and extractive_segments fields.
            -             * List of extractive answers.
            -             * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveAnswer extractive_answers = 6 [deprecated = true]; - * - */ - @java.lang.Deprecated - public Builder clearExtractiveAnswers() { - if (extractiveAnswersBuilder_ == null) { - extractiveAnswers_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000020); - onChanged(); - } else { - extractiveAnswersBuilder_.clear(); - } - return this; - } + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList) + private static final com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList(); + } + + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList + getDefaultInstance() { + return DEFAULT_INSTANCE; + } - /** - * - * - *
            -             * Deprecated: This field is deprecated and will have no effect on
            -             * the Answer generation.
            -             * Please use document_contexts and extractive_segments fields.
            -             * List of extractive answers.
            -             * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveAnswer extractive_answers = 6 [deprecated = true]; - * - */ - @java.lang.Deprecated - public Builder removeExtractiveAnswers(int index) { - if (extractiveAnswersBuilder_ == null) { - ensureExtractiveAnswersIsMutable(); - extractiveAnswers_.remove(index); - onChanged(); - } else { - extractiveAnswersBuilder_.remove(index); + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SearchResultList parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); } - return this; + return builder.buildPartial(); } + }; - /** - * - * - *
            -             * Deprecated: This field is deprecated and will have no effect on
            -             * the Answer generation.
            -             * Please use document_contexts and extractive_segments fields.
            -             * List of extractive answers.
            -             * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveAnswer extractive_answers = 6 [deprecated = true]; - * - */ - @java.lang.Deprecated - public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveAnswer.Builder - getExtractiveAnswersBuilder(int index) { - return internalGetExtractiveAnswersFieldBuilder().getBuilder(index); - } + public static com.google.protobuf.Parser parser() { + return PARSER; + } - /** - * - * - *
            -             * Deprecated: This field is deprecated and will have no effect on
            -             * the Answer generation.
            -             * Please use document_contexts and extractive_segments fields.
            -             * List of extractive answers.
            -             * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveAnswer extractive_answers = 6 [deprecated = true]; - * - */ - @java.lang.Deprecated - public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo - .ExtractiveAnswerOrBuilder - getExtractiveAnswersOrBuilder(int index) { - if (extractiveAnswersBuilder_ == null) { - return extractiveAnswers_.get(index); - } else { - return extractiveAnswersBuilder_.getMessageOrBuilder(index); - } - } + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } - /** - * - * - *
            -             * Deprecated: This field is deprecated and will have no effect on
            -             * the Answer generation.
            -             * Please use document_contexts and extractive_segments fields.
            -             * List of extractive answers.
            -             * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveAnswer extractive_answers = 6 [deprecated = true]; - * - */ - @java.lang.Deprecated - public java.util.List< - ? extends - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo - .ExtractiveAnswerOrBuilder> - getExtractiveAnswersOrBuilderList() { - if (extractiveAnswersBuilder_ != null) { - return extractiveAnswersBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(extractiveAnswers_); - } - } + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } - /** - * - * - *
            -             * Deprecated: This field is deprecated and will have no effect on
            -             * the Answer generation.
            -             * Please use document_contexts and extractive_segments fields.
            -             * List of extractive answers.
            -             * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveAnswer extractive_answers = 6 [deprecated = true]; - * - */ - @java.lang.Deprecated - public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveAnswer.Builder - addExtractiveAnswersBuilder() { - return internalGetExtractiveAnswersFieldBuilder() - .addBuilder( - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveAnswer - .getDefaultInstance()); - } + private int inputCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object input_; + + public enum InputCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + SEARCH_PARAMS(1), + SEARCH_RESULT_LIST(2), + INPUT_NOT_SET(0); + private final int value; + + private InputCase(int value) { + this.value = value; + } + + /** + * @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 InputCase valueOf(int value) { + return forNumber(value); + } + + public static InputCase forNumber(int value) { + switch (value) { + case 1: + return SEARCH_PARAMS; + case 2: + return SEARCH_RESULT_LIST; + case 0: + return INPUT_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public InputCase getInputCase() { + return InputCase.forNumber(inputCase_); + } + + public static final int SEARCH_PARAMS_FIELD_NUMBER = 1; + + /** + * + * + *
            +     * Search parameters.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchParams search_params = 1; + * + * + * @return Whether the searchParams field is set. + */ + @java.lang.Override + public boolean hasSearchParams() { + return inputCase_ == 1; + } + + /** + * + * + *
            +     * Search parameters.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchParams search_params = 1; + * + * + * @return The searchParams. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchParams + getSearchParams() { + if (inputCase_ == 1) { + return (com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchParams) + input_; + } + return com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchParams + .getDefaultInstance(); + } + + /** + * + * + *
            +     * Search parameters.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchParams search_params = 1; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchParamsOrBuilder + getSearchParamsOrBuilder() { + if (inputCase_ == 1) { + return (com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchParams) + input_; + } + return com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchParams + .getDefaultInstance(); + } - /** - * - * - *
            -             * Deprecated: This field is deprecated and will have no effect on
            -             * the Answer generation.
            -             * Please use document_contexts and extractive_segments fields.
            -             * List of extractive answers.
            -             * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveAnswer extractive_answers = 6 [deprecated = true]; - * - */ - @java.lang.Deprecated - public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveAnswer.Builder - addExtractiveAnswersBuilder(int index) { - return internalGetExtractiveAnswersFieldBuilder() - .addBuilder( - index, - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveAnswer - .getDefaultInstance()); - } + public static final int SEARCH_RESULT_LIST_FIELD_NUMBER = 2; - /** - * - * - *
            -             * Deprecated: This field is deprecated and will have no effect on
            -             * the Answer generation.
            -             * Please use document_contexts and extractive_segments fields.
            -             * List of extractive answers.
            -             * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveAnswer extractive_answers = 6 [deprecated = true]; - * - */ - @java.lang.Deprecated - public java.util.List< - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveAnswer - .Builder> - getExtractiveAnswersBuilderList() { - return internalGetExtractiveAnswersFieldBuilder().getBuilderList(); - } + /** + * + * + *
            +     * Search result list.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList search_result_list = 2; + * + * + * @return Whether the searchResultList field is set. + */ + @java.lang.Override + public boolean hasSearchResultList() { + return inputCase_ == 2; + } - private com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveAnswer, - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveAnswer - .Builder, - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo - .ExtractiveAnswerOrBuilder> - internalGetExtractiveAnswersFieldBuilder() { - if (extractiveAnswersBuilder_ == null) { - extractiveAnswersBuilder_ = - new com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo - .ExtractiveAnswer, - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveAnswer - .Builder, - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo - .ExtractiveAnswerOrBuilder>( - extractiveAnswers_, - ((bitField0_ & 0x00000020) != 0), - getParentForChildren(), - isClean()); - extractiveAnswers_ = null; - } - return extractiveAnswersBuilder_; - } + /** + * + * + *
            +     * Search result list.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList search_result_list = 2; + * + * + * @return The searchResultList. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList + getSearchResultList() { + if (inputCase_ == 2) { + return (com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList) + input_; + } + return com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList + .getDefaultInstance(); + } - // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo) - } + /** + * + * + *
            +     * Search result list.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList search_result_list = 2; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultListOrBuilder + getSearchResultListOrBuilder() { + if (inputCase_ == 2) { + return (com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList) + input_; + } + return com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList + .getDefaultInstance(); + } - // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo) - private static final com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo - DEFAULT_INSTANCE; + private byte memoizedIsInitialized = -1; - static { - DEFAULT_INSTANCE = - new com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo(); - } + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; - public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo - getDefaultInstance() { - return DEFAULT_INSTANCE; - } + memoizedIsInitialized = 1; + return true; + } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public UnstructuredDocumentInfo parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException() - .setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (inputCase_ == 1) { + output.writeMessage( + 1, + (com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchParams) + input_); + } + if (inputCase_ == 2) { + output.writeMessage( + 2, + (com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList) + input_); + } + getUnknownFields().writeTo(output); + } - public static com.google.protobuf.Parser parser() { - return PARSER; - } + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + size = 0; + if (inputCase_ == 1) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 1, + (com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchParams) + input_); + } + if (inputCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, + (com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList) + input_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - } + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec other = + (com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec) obj; - public interface ChunkInfoOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.ChunkInfo) - com.google.protobuf.MessageOrBuilder { + if (!getInputCase().equals(other.getInputCase())) return false; + switch (inputCase_) { + case 1: + if (!getSearchParams().equals(other.getSearchParams())) return false; + break; + case 2: + if (!getSearchResultList().equals(other.getSearchResultList())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } - /** - * - * - *
            -           * Chunk resource name.
            -           * 
            - * - * string chunk = 1 [(.google.api.resource_reference) = { ... } - * - * @return The chunk. - */ - java.lang.String getChunk(); + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + switch (inputCase_) { + case 1: + hash = (37 * hash) + SEARCH_PARAMS_FIELD_NUMBER; + hash = (53 * hash) + getSearchParams().hashCode(); + break; + case 2: + hash = (37 * hash) + SEARCH_RESULT_LIST_FIELD_NUMBER; + hash = (53 * hash) + getSearchResultList().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } - /** - * - * - *
            -           * Chunk resource name.
            -           * 
            - * - * string chunk = 1 [(.google.api.resource_reference) = { ... } - * - * @return The bytes for chunk. - */ - com.google.protobuf.ByteString getChunkBytes(); + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - /** - * - * - *
            -           * Chunk textual content.
            -           * 
            - * - * string content = 2; - * - * @return The content. - */ - java.lang.String getContent(); + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - /** - * - * - *
            -           * Chunk textual content.
            -           * 
            - * - * string content = 2; - * - * @return The bytes for content. - */ - com.google.protobuf.ByteString getContentBytes(); + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - /** - * - * - *
            -           * Metadata of the document from the current chunk.
            -           * 
            - * - * - * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.ChunkInfo.DocumentMetadata document_metadata = 4; - * - * - * @return Whether the documentMetadata field is set. - */ - boolean hasDocumentMetadata(); + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - /** - * - * - *
            -           * Metadata of the document from the current chunk.
            -           * 
            - * - * - * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.ChunkInfo.DocumentMetadata document_metadata = 4; - * - * - * @return The documentMetadata. - */ - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList - .SearchResult.ChunkInfo.DocumentMetadata - getDocumentMetadata(); + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - /** - * - * - *
            -           * Metadata of the document from the current chunk.
            -           * 
            - * - * - * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.ChunkInfo.DocumentMetadata document_metadata = 4; - * - */ - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList - .SearchResult.ChunkInfo.DocumentMetadataOrBuilder - getDocumentMetadataOrBuilder(); - } + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - /** - * - * - *
            -         * Chunk information.
            -         * 
            - * - * Protobuf type {@code - * google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.ChunkInfo} - */ - public static final class ChunkInfo extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.ChunkInfo) - ChunkInfoOrBuilder { - private static final long serialVersionUID = 0L; + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "ChunkInfo"); - } + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } - // Use ChunkInfo.newBuilder() to construct. - private ChunkInfo(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } - private ChunkInfo() { - chunk_ = ""; - content_ = ""; - } + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + 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 final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.discoveryengine.v1beta.ConversationalSearchServiceProto - .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_SearchSpec_SearchResultList_SearchResult_ChunkInfo_descriptor; - } + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.discoveryengine.v1beta.ConversationalSearchServiceProto - .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_SearchSpec_SearchResultList_SearchResult_ChunkInfo_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.ChunkInfo.class, - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.ChunkInfo.Builder.class); - } + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } - public interface DocumentMetadataOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.ChunkInfo.DocumentMetadata) - com.google.protobuf.MessageOrBuilder { + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } - /** - * - * - *
            -             * Uri of the document.
            -             * 
            - * - * string uri = 1; - * - * @return The uri. - */ - java.lang.String getUri(); + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } - /** - * - * - *
            -             * Uri of the document.
            -             * 
            - * - * string uri = 1; - * - * @return The bytes for uri. - */ - com.google.protobuf.ByteString getUriBytes(); + public static Builder newBuilder( + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } - /** - * - * - *
            -             * Title of the document.
            -             * 
            - * - * string title = 2; - * - * @return The title. - */ - java.lang.String getTitle(); + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } - /** - * - * - *
            -             * Title of the document.
            -             * 
            - * - * string title = 2; - * - * @return The bytes for title. - */ - com.google.protobuf.ByteString getTitleBytes(); - } + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } - /** - * - * - *
            -           * Document metadata contains the information of the document of the
            -           * current chunk.
            -           * 
            - * - * Protobuf type {@code - * google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.ChunkInfo.DocumentMetadata} - */ - public static final class DocumentMetadata extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.ChunkInfo.DocumentMetadata) - DocumentMetadataOrBuilder { - private static final long serialVersionUID = 0L; + /** + * + * + *
            +     * Search specification.
            +     * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec) + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpecOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.ConversationalSearchServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_SearchSpec_descriptor; + } - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "DocumentMetadata"); - } + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.ConversationalSearchServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_SearchSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.class, + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.Builder + .class); + } - // Use DocumentMetadata.newBuilder() to construct. - private DocumentMetadata(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } + // Construct using + // com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.newBuilder() + private Builder() {} - private DocumentMetadata() { - uri_ = ""; - title_ = ""; - } + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.discoveryengine.v1beta.ConversationalSearchServiceProto - .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_SearchSpec_SearchResultList_SearchResult_ChunkInfo_DocumentMetadata_descriptor; - } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (searchParamsBuilder_ != null) { + searchParamsBuilder_.clear(); + } + if (searchResultListBuilder_ != null) { + searchResultListBuilder_.clear(); + } + inputCase_ = 0; + input_ = null; + return this; + } - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.discoveryengine.v1beta.ConversationalSearchServiceProto - .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_SearchSpec_SearchResultList_SearchResult_ChunkInfo_DocumentMetadata_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.ChunkInfo.DocumentMetadata.class, - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.ChunkInfo.DocumentMetadata.Builder.class); - } + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1beta.ConversationalSearchServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_SearchSpec_descriptor; + } - public static final int URI_FIELD_NUMBER = 1; + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .getDefaultInstance(); + } - @SuppressWarnings("serial") - private volatile java.lang.Object uri_ = ""; + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec build() { + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } - /** - * - * - *
            -             * Uri of the document.
            -             * 
            - * - * string uri = 1; - * - * @return The uri. - */ - @java.lang.Override - public java.lang.String getUri() { - java.lang.Object ref = uri_; - 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(); - uri_ = s; - return s; - } - } + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec buildPartial() { + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec result = + new com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } - /** - * - * - *
            -             * Uri of the document.
            -             * 
            - * - * string uri = 1; - * - * @return The bytes for uri. - */ - @java.lang.Override - public com.google.protobuf.ByteString getUriBytes() { - java.lang.Object ref = uri_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - uri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } + private void buildPartial0( + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec result) { + int from_bitField0_ = bitField0_; + } - public static final int TITLE_FIELD_NUMBER = 2; + private void buildPartialOneofs( + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec result) { + result.inputCase_ = inputCase_; + result.input_ = this.input_; + if (inputCase_ == 1 && searchParamsBuilder_ != null) { + result.input_ = searchParamsBuilder_.build(); + } + if (inputCase_ == 2 && searchResultListBuilder_ != null) { + result.input_ = searchResultListBuilder_.build(); + } + } - @SuppressWarnings("serial") - private volatile java.lang.Object title_ = ""; + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec) { + return mergeFrom( + (com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec) other); + } else { + super.mergeFrom(other); + return this; + } + } - /** - * - * - *
            -             * Title of the document.
            -             * 
            - * - * string title = 2; - * - * @return The title. - */ - @java.lang.Override - public java.lang.String getTitle() { - java.lang.Object ref = title_; - 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(); - title_ = s; - return s; - } + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec other) { + if (other + == com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .getDefaultInstance()) return this; + switch (other.getInputCase()) { + case SEARCH_PARAMS: + { + mergeSearchParams(other.getSearchParams()); + break; } - - /** - * - * - *
            -             * Title of the document.
            -             * 
            - * - * string title = 2; - * - * @return The bytes for title. - */ - @java.lang.Override - public com.google.protobuf.ByteString getTitleBytes() { - java.lang.Object ref = title_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - title_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } + case SEARCH_RESULT_LIST: + { + mergeSearchResultList(other.getSearchResultList()); + break; + } + case INPUT_NOT_SET: + { + break; } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } - private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + return true; + } - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage( + internalGetSearchParamsFieldBuilder().getBuilder(), extensionRegistry); + inputCase_ = 1; + break; + } // case 10 + case 18: + { + input.readMessage( + internalGetSearchResultListFieldBuilder().getBuilder(), extensionRegistry); + inputCase_ = 2; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } - memoizedIsInitialized = 1; - return true; - } + private int inputCase_ = 0; + private java.lang.Object input_; - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(uri_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, uri_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(title_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 2, title_); - } - getUnknownFields().writeTo(output); - } + public InputCase getInputCase() { + return InputCase.forNumber(inputCase_); + } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; + public Builder clearInput() { + inputCase_ = 0; + input_ = null; + onChanged(); + return this; + } - size = 0; - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(uri_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, uri_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(title_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(2, title_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } + private int bitField0_; - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj - instanceof - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.ChunkInfo.DocumentMetadata)) { - return super.equals(obj); - } - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList - .SearchResult.ChunkInfo.DocumentMetadata - other = - (com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.ChunkInfo.DocumentMetadata) - obj; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchParams, + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchParams + .Builder, + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchParamsOrBuilder> + searchParamsBuilder_; + + /** + * + * + *
            +       * Search parameters.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchParams search_params = 1; + * + * + * @return Whether the searchParams field is set. + */ + @java.lang.Override + public boolean hasSearchParams() { + return inputCase_ == 1; + } + + /** + * + * + *
            +       * Search parameters.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchParams search_params = 1; + * + * + * @return The searchParams. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchParams + getSearchParams() { + if (searchParamsBuilder_ == null) { + if (inputCase_ == 1) { + return (com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchParams) + input_; + } + return com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchParams + .getDefaultInstance(); + } else { + if (inputCase_ == 1) { + return searchParamsBuilder_.getMessage(); + } + return com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchParams + .getDefaultInstance(); + } + } - if (!getUri().equals(other.getUri())) return false; - if (!getTitle().equals(other.getTitle())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } + /** + * + * + *
            +       * Search parameters.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchParams search_params = 1; + * + */ + public Builder setSearchParams( + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchParams + value) { + if (searchParamsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + input_ = value; + onChanged(); + } else { + searchParamsBuilder_.setMessage(value); + } + inputCase_ = 1; + return this; + } - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + URI_FIELD_NUMBER; - hash = (53 * hash) + getUri().hashCode(); - hash = (37 * hash) + TITLE_FIELD_NUMBER; - hash = (53 * hash) + getTitle().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } + /** + * + * + *
            +       * Search parameters.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchParams search_params = 1; + * + */ + public Builder setSearchParams( + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchParams.Builder + builderForValue) { + if (searchParamsBuilder_ == null) { + input_ = builderForValue.build(); + onChanged(); + } else { + searchParamsBuilder_.setMessage(builderForValue.build()); + } + inputCase_ = 1; + return this; + } - public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.ChunkInfo.DocumentMetadata - parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } + /** + * + * + *
            +       * Search parameters.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchParams search_params = 1; + * + */ + public Builder mergeSearchParams( + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchParams + value) { + if (searchParamsBuilder_ == null) { + if (inputCase_ == 1 + && input_ + != com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchParams.getDefaultInstance()) { + input_ = + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchParams + .newBuilder( + (com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchParams) + input_) + .mergeFrom(value) + .buildPartial(); + } else { + input_ = value; + } + onChanged(); + } else { + if (inputCase_ == 1) { + searchParamsBuilder_.mergeFrom(value); + } else { + searchParamsBuilder_.setMessage(value); + } + } + inputCase_ = 1; + return this; + } - public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.ChunkInfo.DocumentMetadata - parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } + /** + * + * + *
            +       * Search parameters.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchParams search_params = 1; + * + */ + public Builder clearSearchParams() { + if (searchParamsBuilder_ == null) { + if (inputCase_ == 1) { + inputCase_ = 0; + input_ = null; + onChanged(); + } + } else { + if (inputCase_ == 1) { + inputCase_ = 0; + input_ = null; + } + searchParamsBuilder_.clear(); + } + return this; + } - public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.ChunkInfo.DocumentMetadata - parseFrom(com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } + /** + * + * + *
            +       * Search parameters.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchParams search_params = 1; + * + */ + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchParams + .Builder + getSearchParamsBuilder() { + return internalGetSearchParamsFieldBuilder().getBuilder(); + } - public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.ChunkInfo.DocumentMetadata - parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } + /** + * + * + *
            +       * Search parameters.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchParams search_params = 1; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchParamsOrBuilder + getSearchParamsOrBuilder() { + if ((inputCase_ == 1) && (searchParamsBuilder_ != null)) { + return searchParamsBuilder_.getMessageOrBuilder(); + } else { + if (inputCase_ == 1) { + return (com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchParams) + input_; + } + return com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchParams + .getDefaultInstance(); + } + } - public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.ChunkInfo.DocumentMetadata - parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } + /** + * + * + *
            +       * Search parameters.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchParams search_params = 1; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchParams, + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchParams + .Builder, + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchParamsOrBuilder> + internalGetSearchParamsFieldBuilder() { + if (searchParamsBuilder_ == null) { + if (!(inputCase_ == 1)) { + input_ = + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchParams + .getDefaultInstance(); + } + searchParamsBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchParams, + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchParams + .Builder, + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchParamsOrBuilder>( + (com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchParams) + input_, + getParentForChildren(), + isClean()); + input_ = null; + } + inputCase_ = 1; + onChanged(); + return searchParamsBuilder_; + } - public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.ChunkInfo.DocumentMetadata - parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList, + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList + .Builder, + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultListOrBuilder> + searchResultListBuilder_; - public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.ChunkInfo.DocumentMetadata - parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } + /** + * + * + *
            +       * Search result list.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList search_result_list = 2; + * + * + * @return Whether the searchResultList field is set. + */ + @java.lang.Override + public boolean hasSearchResultList() { + return inputCase_ == 2; + } - public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.ChunkInfo.DocumentMetadata - parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } + /** + * + * + *
            +       * Search result list.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList search_result_list = 2; + * + * + * @return The searchResultList. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList + getSearchResultList() { + if (searchResultListBuilder_ == null) { + if (inputCase_ == 2) { + return (com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList) + input_; + } + return com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.getDefaultInstance(); + } else { + if (inputCase_ == 2) { + return searchResultListBuilder_.getMessage(); + } + return com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.getDefaultInstance(); + } + } - public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.ChunkInfo.DocumentMetadata - parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input); - } + /** + * + * + *
            +       * Search result list.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList search_result_list = 2; + * + */ + public Builder setSearchResultList( + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList + value) { + if (searchResultListBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + input_ = value; + onChanged(); + } else { + searchResultListBuilder_.setMessage(value); + } + inputCase_ = 2; + return this; + } - public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.ChunkInfo.DocumentMetadata - parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } + /** + * + * + *
            +       * Search result list.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList search_result_list = 2; + * + */ + public Builder setSearchResultList( + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList + .Builder + builderForValue) { + if (searchResultListBuilder_ == null) { + input_ = builderForValue.build(); + onChanged(); + } else { + searchResultListBuilder_.setMessage(builderForValue.build()); + } + inputCase_ = 2; + return this; + } - public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.ChunkInfo.DocumentMetadata - parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } + /** + * + * + *
            +       * Search result list.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList search_result_list = 2; + * + */ + public Builder mergeSearchResultList( + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList + value) { + if (searchResultListBuilder_ == null) { + if (inputCase_ == 2 + && input_ + != com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.getDefaultInstance()) { + input_ = + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.newBuilder( + (com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList) + input_) + .mergeFrom(value) + .buildPartial(); + } else { + input_ = value; + } + onChanged(); + } else { + if (inputCase_ == 2) { + searchResultListBuilder_.mergeFrom(value); + } else { + searchResultListBuilder_.setMessage(value); + } + } + inputCase_ = 2; + return this; + } - public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.ChunkInfo.DocumentMetadata - parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } + /** + * + * + *
            +       * Search result list.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList search_result_list = 2; + * + */ + public Builder clearSearchResultList() { + if (searchResultListBuilder_ == null) { + if (inputCase_ == 2) { + inputCase_ = 0; + input_ = null; + onChanged(); + } + } else { + if (inputCase_ == 2) { + inputCase_ = 0; + input_ = null; + } + searchResultListBuilder_.clear(); + } + return this; + } - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } + /** + * + * + *
            +       * Search result list.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList search_result_list = 2; + * + */ + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList + .Builder + getSearchResultListBuilder() { + return internalGetSearchResultListFieldBuilder().getBuilder(); + } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } + /** + * + * + *
            +       * Search result list.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList search_result_list = 2; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultListOrBuilder + getSearchResultListOrBuilder() { + if ((inputCase_ == 2) && (searchResultListBuilder_ != null)) { + return searchResultListBuilder_.getMessageOrBuilder(); + } else { + if (inputCase_ == 2) { + return (com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList) + input_; + } + return com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.getDefaultInstance(); + } + } - public static Builder newBuilder( + /** + * + * + *
            +       * Search result list.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList search_result_list = 2; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList, + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList + .Builder, + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultListOrBuilder> + internalGetSearchResultListFieldBuilder() { + if (searchResultListBuilder_ == null) { + if (!(inputCase_ == 2)) { + input_ = com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.ChunkInfo.DocumentMetadata - prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } + .SearchResultList.getDefaultInstance(); + } + searchResultListBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList, + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList.Builder, + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultListOrBuilder>( + (com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + .SearchResultList) + input_, + getParentForChildren(), + isClean()); + input_ = null; + } + inputCase_ = 2; + onChanged(); + return searchResultListBuilder_; + } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec) + } - /** - * - * - *
            -             * Document metadata contains the information of the document of the
            -             * current chunk.
            -             * 
            - * - * Protobuf type {@code - * google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.ChunkInfo.DocumentMetadata} - */ - public static final class Builder - extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.ChunkInfo.DocumentMetadata) - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.ChunkInfo.DocumentMetadataOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.discoveryengine.v1beta.ConversationalSearchServiceProto - .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_SearchSpec_SearchResultList_SearchResult_ChunkInfo_DocumentMetadata_descriptor; - } + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec) + private static final com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + DEFAULT_INSTANCE; - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.discoveryengine.v1beta.ConversationalSearchServiceProto - .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_SearchSpec_SearchResultList_SearchResult_ChunkInfo_DocumentMetadata_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.ChunkInfo.DocumentMetadata.class, - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.ChunkInfo.DocumentMetadata.Builder - .class); - } + static { + DEFAULT_INSTANCE = + new com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec(); + } - // Construct using - // com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.ChunkInfo.DocumentMetadata.newBuilder() - private Builder() {} + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + getDefaultInstance() { + return DEFAULT_INSTANCE; + } - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - } + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SearchSpec parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - uri_ = ""; - title_ = ""; - return this; - } + public static com.google.protobuf.Parser parser() { + return PARSER; + } - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.discoveryengine.v1beta.ConversationalSearchServiceProto - .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_SearchSpec_SearchResultList_SearchResult_ChunkInfo_DocumentMetadata_descriptor; - } + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.ChunkInfo.DocumentMetadata - getDefaultInstanceForType() { - return com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.ChunkInfo.DocumentMetadata.getDefaultInstance(); - } + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.ChunkInfo.DocumentMetadata - build() { - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.ChunkInfo.DocumentMetadata - result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } + public interface QueryUnderstandingSpecOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec) + com.google.protobuf.MessageOrBuilder { - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.ChunkInfo.DocumentMetadata - buildPartial() { - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.ChunkInfo.DocumentMetadata - result = - new com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.ChunkInfo.DocumentMetadata(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } + /** + * + * + *
            +     * Query classification specification.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec.QueryClassificationSpec query_classification_spec = 1; + * + * + * @return Whether the queryClassificationSpec field is set. + */ + boolean hasQueryClassificationSpec(); - private void buildPartial0( - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.ChunkInfo.DocumentMetadata - result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.uri_ = uri_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.title_ = title_; - } - } + /** + * + * + *
            +     * Query classification specification.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec.QueryClassificationSpec query_classification_spec = 1; + * + * + * @return The queryClassificationSpec. + */ + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec + .QueryClassificationSpec + getQueryClassificationSpec(); - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other - instanceof - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.ChunkInfo.DocumentMetadata) { - return mergeFrom( - (com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.ChunkInfo.DocumentMetadata) - other); - } else { - super.mergeFrom(other); - return this; - } - } + /** + * + * + *
            +     * Query classification specification.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec.QueryClassificationSpec query_classification_spec = 1; + * + */ + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec + .QueryClassificationSpecOrBuilder + getQueryClassificationSpecOrBuilder(); - public Builder mergeFrom( - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.ChunkInfo.DocumentMetadata - other) { - if (other - == com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.ChunkInfo.DocumentMetadata - .getDefaultInstance()) return this; - if (!other.getUri().isEmpty()) { - uri_ = other.uri_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (!other.getTitle().isEmpty()) { - title_ = other.title_; - bitField0_ |= 0x00000002; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } + /** + * + * + *
            +     * Query rephraser specification.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec.QueryRephraserSpec query_rephraser_spec = 2; + * + * + * @return Whether the queryRephraserSpec field is set. + */ + boolean hasQueryRephraserSpec(); - @java.lang.Override - public final boolean isInitialized() { - return true; - } + /** + * + * + *
            +     * Query rephraser specification.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec.QueryRephraserSpec query_rephraser_spec = 2; + * + * + * @return The queryRephraserSpec. + */ + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec + .QueryRephraserSpec + getQueryRephraserSpec(); - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - uri_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: - { - title_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 18 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } + /** + * + * + *
            +     * Query rephraser specification.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec.QueryRephraserSpec query_rephraser_spec = 2; + * + */ + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec + .QueryRephraserSpecOrBuilder + getQueryRephraserSpecOrBuilder(); - private int bitField0_; + /** + * + * + *
            +     * Optional. Whether to disable spell correction.
            +     * The default value is `false`.
            +     * 
            + * + * bool disable_spell_correction = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The disableSpellCorrection. + */ + boolean getDisableSpellCorrection(); + } - private java.lang.Object uri_ = ""; + /** + * + * + *
            +   * Query understanding specification.
            +   * 
            + * + * Protobuf type {@code + * google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec} + */ + public static final class QueryUnderstandingSpec extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec) + QueryUnderstandingSpecOrBuilder { + private static final long serialVersionUID = 0L; - /** - * - * - *
            -               * Uri of the document.
            -               * 
            - * - * string uri = 1; - * - * @return The uri. - */ - public java.lang.String getUri() { - java.lang.Object ref = uri_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - uri_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "QueryUnderstandingSpec"); + } - /** - * - * - *
            -               * Uri of the document.
            -               * 
            - * - * string uri = 1; - * - * @return The bytes for uri. - */ - public com.google.protobuf.ByteString getUriBytes() { - java.lang.Object ref = uri_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - uri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } + // Use QueryUnderstandingSpec.newBuilder() to construct. + private QueryUnderstandingSpec(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } - /** - * - * - *
            -               * Uri of the document.
            -               * 
            - * - * string uri = 1; - * - * @param value The uri to set. - * @return This builder for chaining. - */ - public Builder setUri(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - uri_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } + private QueryUnderstandingSpec() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.ConversationalSearchServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_QueryUnderstandingSpec_descriptor; + } - /** - * - * - *
            -               * Uri of the document.
            -               * 
            - * - * string uri = 1; - * - * @return This builder for chaining. - */ - public Builder clearUri() { - uri_ = getDefaultInstance().getUri(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.ConversationalSearchServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_QueryUnderstandingSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec + .class, + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec + .Builder.class); + } - /** - * - * - *
            -               * Uri of the document.
            -               * 
            - * - * string uri = 1; - * - * @param value The bytes for uri to set. - * @return This builder for chaining. - */ - public Builder setUriBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - uri_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } + public interface QueryClassificationSpecOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec.QueryClassificationSpec) + com.google.protobuf.MessageOrBuilder { - private java.lang.Object title_ = ""; + /** + * + * + *
            +       * Enabled query classification types.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec.QueryClassificationSpec.Type types = 1; + * + * + * @return A list containing the types. + */ + java.util.List< + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec + .QueryClassificationSpec.Type> + getTypesList(); - /** - * - * - *
            -               * Title of the document.
            -               * 
            - * - * string title = 2; - * - * @return The title. - */ - public java.lang.String getTitle() { - java.lang.Object ref = title_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - title_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } + /** + * + * + *
            +       * Enabled query classification types.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec.QueryClassificationSpec.Type types = 1; + * + * + * @return The count of types. + */ + int getTypesCount(); - /** - * - * - *
            -               * Title of the document.
            -               * 
            - * - * string title = 2; - * - * @return The bytes for title. - */ - public com.google.protobuf.ByteString getTitleBytes() { - java.lang.Object ref = title_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - title_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } + /** + * + * + *
            +       * Enabled query classification types.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec.QueryClassificationSpec.Type types = 1; + * + * + * @param index The index of the element to return. + * @return The types at the given index. + */ + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec + .QueryClassificationSpec.Type + getTypes(int index); - /** - * - * - *
            -               * Title of the document.
            -               * 
            - * - * string title = 2; - * - * @param value The title to set. - * @return This builder for chaining. - */ - public Builder setTitle(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - title_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } + /** + * + * + *
            +       * Enabled query classification types.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec.QueryClassificationSpec.Type types = 1; + * + * + * @return A list containing the enum numeric values on the wire for types. + */ + java.util.List getTypesValueList(); - /** - * - * - *
            -               * Title of the document.
            -               * 
            - * - * string title = 2; - * - * @return This builder for chaining. - */ - public Builder clearTitle() { - title_ = getDefaultInstance().getTitle(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } + /** + * + * + *
            +       * Enabled query classification types.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec.QueryClassificationSpec.Type types = 1; + * + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of types at the given index. + */ + int getTypesValue(int index); + } - /** - * - * - *
            -               * Title of the document.
            -               * 
            - * - * string title = 2; - * - * @param value The bytes for title to set. - * @return This builder for chaining. - */ - public Builder setTitleBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - title_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } + /** + * + * + *
            +     * Query classification specification.
            +     * 
            + * + * Protobuf type {@code + * google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec.QueryClassificationSpec} + */ + public static final class QueryClassificationSpec extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec.QueryClassificationSpec) + QueryClassificationSpecOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "QueryClassificationSpec"); + } - // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.ChunkInfo.DocumentMetadata) - } + // Use QueryClassificationSpec.newBuilder() to construct. + private QueryClassificationSpec(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } - // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.ChunkInfo.DocumentMetadata) - private static final com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest - .SearchSpec.SearchResultList.SearchResult.ChunkInfo.DocumentMetadata - DEFAULT_INSTANCE; + private QueryClassificationSpec() { + types_ = emptyIntList(); + } - static { - DEFAULT_INSTANCE = - new com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.ChunkInfo.DocumentMetadata(); - } + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.ConversationalSearchServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_QueryUnderstandingSpec_QueryClassificationSpec_descriptor; + } - public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.ChunkInfo.DocumentMetadata - getDefaultInstance() { - return DEFAULT_INSTANCE; - } + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.ConversationalSearchServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_QueryUnderstandingSpec_QueryClassificationSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec + .QueryClassificationSpec.class, + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec + .QueryClassificationSpec.Builder.class); + } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DocumentMetadata parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException() - .setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; + /** + * + * + *
            +       * Query classification types.
            +       * 
            + * + * Protobuf enum {@code + * google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec.QueryClassificationSpec.Type} + */ + public enum Type implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
            +         * Unspecified query classification type.
            +         * 
            + * + * TYPE_UNSPECIFIED = 0; + */ + TYPE_UNSPECIFIED(0), + /** + * + * + *
            +         * Adversarial query classification type.
            +         * 
            + * + * ADVERSARIAL_QUERY = 1; + */ + ADVERSARIAL_QUERY(1), + /** + * + * + *
            +         * Non-answer-seeking query classification type, for chit chat.
            +         * 
            + * + * NON_ANSWER_SEEKING_QUERY = 2; + */ + NON_ANSWER_SEEKING_QUERY(2), + /** + * + * + *
            +         * Jail-breaking query classification type.
            +         * 
            + * + * JAIL_BREAKING_QUERY = 3; + */ + JAIL_BREAKING_QUERY(3), + /** + * + * + *
            +         * Non-answer-seeking query classification type, for no clear intent.
            +         * 
            + * + * NON_ANSWER_SEEKING_QUERY_V2 = 4; + */ + NON_ANSWER_SEEKING_QUERY_V2(4), + /** + * + * + *
            +         * User defined query classification type.
            +         * 
            + * + * USER_DEFINED_CLASSIFICATION_QUERY = 5; + */ + USER_DEFINED_CLASSIFICATION_QUERY(5), + UNRECOGNIZED(-1), + ; - public static com.google.protobuf.Parser parser() { - return PARSER; - } + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Type"); + } - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + /** + * + * + *
            +         * Unspecified query classification type.
            +         * 
            + * + * TYPE_UNSPECIFIED = 0; + */ + public static final int TYPE_UNSPECIFIED_VALUE = 0; - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.ChunkInfo.DocumentMetadata - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - } + /** + * + * + *
            +         * Adversarial query classification type.
            +         * 
            + * + * ADVERSARIAL_QUERY = 1; + */ + public static final int ADVERSARIAL_QUERY_VALUE = 1; - private int bitField0_; - public static final int CHUNK_FIELD_NUMBER = 1; + /** + * + * + *
            +         * Non-answer-seeking query classification type, for chit chat.
            +         * 
            + * + * NON_ANSWER_SEEKING_QUERY = 2; + */ + public static final int NON_ANSWER_SEEKING_QUERY_VALUE = 2; - @SuppressWarnings("serial") - private volatile java.lang.Object chunk_ = ""; + /** + * + * + *
            +         * Jail-breaking query classification type.
            +         * 
            + * + * JAIL_BREAKING_QUERY = 3; + */ + public static final int JAIL_BREAKING_QUERY_VALUE = 3; - /** - * - * - *
            -           * Chunk resource name.
            -           * 
            - * - * string chunk = 1 [(.google.api.resource_reference) = { ... } - * - * @return The chunk. - */ - @java.lang.Override - public java.lang.String getChunk() { - java.lang.Object ref = chunk_; - 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(); - chunk_ = s; - return s; - } + /** + * + * + *
            +         * Non-answer-seeking query classification type, for no clear intent.
            +         * 
            + * + * NON_ANSWER_SEEKING_QUERY_V2 = 4; + */ + public static final int NON_ANSWER_SEEKING_QUERY_V2_VALUE = 4; + + /** + * + * + *
            +         * User defined query classification type.
            +         * 
            + * + * USER_DEFINED_CLASSIFICATION_QUERY = 5; + */ + public static final int USER_DEFINED_CLASSIFICATION_QUERY_VALUE = 5; + + 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 Type valueOf(int value) { + return forNumber(value); + } - /** - * - * - *
            -           * Chunk resource name.
            -           * 
            - * - * string chunk = 1 [(.google.api.resource_reference) = { ... } - * - * @return The bytes for chunk. - */ - @java.lang.Override - public com.google.protobuf.ByteString getChunkBytes() { - java.lang.Object ref = chunk_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - chunk_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static Type forNumber(int value) { + switch (value) { + case 0: + return TYPE_UNSPECIFIED; + case 1: + return ADVERSARIAL_QUERY; + case 2: + return NON_ANSWER_SEEKING_QUERY; + case 3: + return JAIL_BREAKING_QUERY; + case 4: + return NON_ANSWER_SEEKING_QUERY_V2; + case 5: + return USER_DEFINED_CLASSIFICATION_QUERY; + default: + return null; } + } - public static final int CONTENT_FIELD_NUMBER = 2; + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } - @SuppressWarnings("serial") - private volatile java.lang.Object content_ = ""; + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public Type findValueByNumber(int number) { + return Type.forNumber(number); + } + }; - /** - * - * - *
            -           * Chunk textual content.
            -           * 
            - * - * string content = 2; - * - * @return The content. - */ - @java.lang.Override - public java.lang.String getContent() { - java.lang.Object ref = content_; - 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(); - content_ = s; - return s; - } + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); } + return getDescriptor().getValues().get(ordinal()); + } - /** - * - * - *
            -           * Chunk textual content.
            -           * 
            - * - * string content = 2; - * - * @return The bytes for content. - */ - @java.lang.Override - public com.google.protobuf.ByteString getContentBytes() { - java.lang.Object ref = content_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - content_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } - public static final int DOCUMENT_METADATA_FIELD_NUMBER = 4; - private com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.ChunkInfo.DocumentMetadata - documentMetadata_; + public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec + .QueryClassificationSpec.getDescriptor() + .getEnumTypes() + .get(0); + } - /** - * - * - *
            -           * Metadata of the document from the current chunk.
            -           * 
            - * - * - * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.ChunkInfo.DocumentMetadata document_metadata = 4; - * - * - * @return Whether the documentMetadata field is set. - */ - @java.lang.Override - public boolean hasDocumentMetadata() { - return ((bitField0_ & 0x00000001) != 0); - } + private static final Type[] VALUES = values(); - /** - * - * - *
            -           * Metadata of the document from the current chunk.
            -           * 
            - * - * - * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.ChunkInfo.DocumentMetadata document_metadata = 4; - * - * - * @return The documentMetadata. - */ - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.ChunkInfo.DocumentMetadata - getDocumentMetadata() { - return documentMetadata_ == null - ? com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.ChunkInfo.DocumentMetadata.getDefaultInstance() - : documentMetadata_; + public static Type valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); } - - /** - * - * - *
            -           * Metadata of the document from the current chunk.
            -           * 
            - * - * - * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.ChunkInfo.DocumentMetadata document_metadata = 4; - * - */ - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.ChunkInfo.DocumentMetadataOrBuilder - getDocumentMetadataOrBuilder() { - return documentMetadata_ == null - ? com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.ChunkInfo.DocumentMetadata.getDefaultInstance() - : documentMetadata_; + if (desc.getIndex() == -1) { + return UNRECOGNIZED; } + return VALUES[desc.getIndex()]; + } - private byte memoizedIsInitialized = -1; + private final int value; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + private Type(int value) { + this.value = value; + } - memoizedIsInitialized = 1; - return true; - } + // @@protoc_insertion_point(enum_scope:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec.QueryClassificationSpec.Type) + } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(chunk_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, chunk_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(content_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 2, content_); - } - if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(4, getDocumentMetadata()); - } - getUnknownFields().writeTo(output); - } + public static final int TYPES_FIELD_NUMBER = 1; - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; + @SuppressWarnings("serial") + private com.google.protobuf.Internal.IntList types_ = emptyIntList(); - size = 0; - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(chunk_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, chunk_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(content_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(2, content_); - } - if (((bitField0_ & 0x00000001) != 0)) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 4, getDocumentMetadata()); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } + private static final com.google.protobuf.Internal.IntListAdapter.IntConverter< + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec + .QueryClassificationSpec.Type> + types_converter_ = + new com.google.protobuf.Internal.IntListAdapter.IntConverter< + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec + .QueryClassificationSpec.Type>() { + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest + .QueryUnderstandingSpec.QueryClassificationSpec.Type + convert(int from) { + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec + .QueryClassificationSpec.Type + result = + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest + .QueryUnderstandingSpec.QueryClassificationSpec.Type.forNumber(from); + return result == null + ? com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest + .QueryUnderstandingSpec.QueryClassificationSpec.Type.UNRECOGNIZED + : result; + } + }; - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj - instanceof - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.ChunkInfo)) { - return super.equals(obj); - } - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList - .SearchResult.ChunkInfo - other = - (com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.ChunkInfo) - obj; + /** + * + * + *
            +       * Enabled query classification types.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec.QueryClassificationSpec.Type types = 1; + * + * + * @return A list containing the types. + */ + @java.lang.Override + public java.util.List< + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec + .QueryClassificationSpec.Type> + getTypesList() { + return new com.google.protobuf.Internal.IntListAdapter< + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec + .QueryClassificationSpec.Type>(types_, types_converter_); + } - if (!getChunk().equals(other.getChunk())) return false; - if (!getContent().equals(other.getContent())) return false; - if (hasDocumentMetadata() != other.hasDocumentMetadata()) return false; - if (hasDocumentMetadata()) { - if (!getDocumentMetadata().equals(other.getDocumentMetadata())) return false; - } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } + /** + * + * + *
            +       * Enabled query classification types.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec.QueryClassificationSpec.Type types = 1; + * + * + * @return The count of types. + */ + @java.lang.Override + public int getTypesCount() { + return types_.size(); + } - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + CHUNK_FIELD_NUMBER; - hash = (53 * hash) + getChunk().hashCode(); - hash = (37 * hash) + CONTENT_FIELD_NUMBER; - hash = (53 * hash) + getContent().hashCode(); - if (hasDocumentMetadata()) { - hash = (37 * hash) + DOCUMENT_METADATA_FIELD_NUMBER; - hash = (53 * hash) + getDocumentMetadata().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } + /** + * + * + *
            +       * Enabled query classification types.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec.QueryClassificationSpec.Type types = 1; + * + * + * @param index The index of the element to return. + * @return The types at the given index. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec + .QueryClassificationSpec.Type + getTypes(int index) { + return types_converter_.convert(types_.getInt(index)); + } - public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.ChunkInfo - parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } + /** + * + * + *
            +       * Enabled query classification types.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec.QueryClassificationSpec.Type types = 1; + * + * + * @return A list containing the enum numeric values on the wire for types. + */ + @java.lang.Override + public java.util.List getTypesValueList() { + return types_; + } - public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.ChunkInfo - parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } + /** + * + * + *
            +       * Enabled query classification types.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec.QueryClassificationSpec.Type types = 1; + * + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of types at the given index. + */ + @java.lang.Override + public int getTypesValue(int index) { + return types_.getInt(index); + } - public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.ChunkInfo - parseFrom(com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } + private int typesMemoizedSerializedSize; - public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.ChunkInfo - parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } + private byte memoizedIsInitialized = -1; - public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.ChunkInfo - parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; - public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.ChunkInfo - parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } + memoizedIsInitialized = 1; + return true; + } - public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.ChunkInfo - parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + getSerializedSize(); + if (getTypesList().size() > 0) { + output.writeUInt32NoTag(10); + output.writeUInt32NoTag(typesMemoizedSerializedSize); + } + for (int i = 0; i < types_.size(); i++) { + output.writeEnumNoTag(types_.getInt(i)); + } + getUnknownFields().writeTo(output); + } - public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.ChunkInfo - parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; - public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.ChunkInfo - parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input); + size = 0; + { + int dataSize = 0; + for (int i = 0; i < types_.size(); i++) { + dataSize += + com.google.protobuf.CodedOutputStream.computeEnumSizeNoTag(types_.getInt(i)); } - - public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.ChunkInfo - parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); + size += dataSize; + if (!getTypesList().isEmpty()) { + size += 1; + size += com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(dataSize); } + typesMemoizedSerializedSize = dataSize; + } + 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.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec + .QueryClassificationSpec)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec + .QueryClassificationSpec + other = + (com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec + .QueryClassificationSpec) + obj; - public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.ChunkInfo - parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } + if (!types_.equals(other.types_)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } - public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.ChunkInfo - 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 int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getTypesCount() > 0) { + hash = (37 * hash) + TYPES_FIELD_NUMBER; + hash = (53 * hash) + types_.hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest + .QueryUnderstandingSpec.QueryClassificationSpec + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest + .QueryUnderstandingSpec.QueryClassificationSpec + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - public static Builder newBuilder( - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList - .SearchResult.ChunkInfo - prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest + .QueryUnderstandingSpec.QueryClassificationSpec + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest + .QueryUnderstandingSpec.QueryClassificationSpec + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest + .QueryUnderstandingSpec.QueryClassificationSpec + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - /** - * - * - *
            -           * Chunk information.
            -           * 
            - * - * Protobuf type {@code - * google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.ChunkInfo} - */ - public static final class Builder - extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.ChunkInfo) - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList - .SearchResult.ChunkInfoOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.discoveryengine.v1beta.ConversationalSearchServiceProto - .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_SearchSpec_SearchResultList_SearchResult_ChunkInfo_descriptor; - } + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest + .QueryUnderstandingSpec.QueryClassificationSpec + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.discoveryengine.v1beta.ConversationalSearchServiceProto - .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_SearchSpec_SearchResultList_SearchResult_ChunkInfo_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.ChunkInfo.class, - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.ChunkInfo.Builder.class); - } + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest + .QueryUnderstandingSpec.QueryClassificationSpec + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } - // Construct using - // com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.ChunkInfo.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest + .QueryUnderstandingSpec.QueryClassificationSpec + parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest + .QueryUnderstandingSpec.QueryClassificationSpec + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - internalGetDocumentMetadataFieldBuilder(); - } - } + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest + .QueryUnderstandingSpec.QueryClassificationSpec + parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - chunk_ = ""; - content_ = ""; - documentMetadata_ = null; - if (documentMetadataBuilder_ != null) { - documentMetadataBuilder_.dispose(); - documentMetadataBuilder_ = null; - } - return this; - } + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest + .QueryUnderstandingSpec.QueryClassificationSpec + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.discoveryengine.v1beta.ConversationalSearchServiceProto - .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_SearchSpec_SearchResultList_SearchResult_ChunkInfo_descriptor; - } + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest + .QueryUnderstandingSpec.QueryClassificationSpec + 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 com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.ChunkInfo - getDefaultInstanceForType() { - return com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.ChunkInfo.getDefaultInstance(); - } + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.ChunkInfo - build() { - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList - .SearchResult.ChunkInfo - result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.ChunkInfo - buildPartial() { - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList - .SearchResult.ChunkInfo - result = - new com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.ChunkInfo(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } + public static Builder newBuilder( + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec + .QueryClassificationSpec + prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } - private void buildPartial0( - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.ChunkInfo - result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.chunk_ = chunk_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.content_ = content_; - } - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000004) != 0)) { - result.documentMetadata_ = - documentMetadataBuilder_ == null - ? documentMetadata_ - : documentMetadataBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - result.bitField0_ |= to_bitField0_; - } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other - instanceof - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.ChunkInfo) { - return mergeFrom( - (com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.ChunkInfo) - other); - } else { - super.mergeFrom(other); - return this; - } - } + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } - public Builder mergeFrom( - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.ChunkInfo - other) { - if (other - == com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.ChunkInfo.getDefaultInstance()) return this; - if (!other.getChunk().isEmpty()) { - chunk_ = other.chunk_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (!other.getContent().isEmpty()) { - content_ = other.content_; - bitField0_ |= 0x00000002; - onChanged(); - } - if (other.hasDocumentMetadata()) { - mergeDocumentMetadata(other.getDocumentMetadata()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } + /** + * + * + *
            +       * Query classification specification.
            +       * 
            + * + * Protobuf type {@code + * google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec.QueryClassificationSpec} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec.QueryClassificationSpec) + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec + .QueryClassificationSpecOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.ConversationalSearchServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_QueryUnderstandingSpec_QueryClassificationSpec_descriptor; + } - @java.lang.Override - public final boolean isInitialized() { - return true; - } + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.ConversationalSearchServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_QueryUnderstandingSpec_QueryClassificationSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec + .QueryClassificationSpec.class, + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec + .QueryClassificationSpec.Builder.class); + } - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - chunk_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: - { - content_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 34: - { - input.readMessage( - internalGetDocumentMetadataFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000004; - break; - } // case 34 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } + // Construct using + // com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec.QueryClassificationSpec.newBuilder() + private Builder() {} - private int bitField0_; + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } - private java.lang.Object chunk_ = ""; + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + types_ = emptyIntList(); + return this; + } - /** - * - * - *
            -             * Chunk resource name.
            -             * 
            - * - * string chunk = 1 [(.google.api.resource_reference) = { ... } - * - * @return The chunk. - */ - public java.lang.String getChunk() { - java.lang.Object ref = chunk_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - chunk_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1beta.ConversationalSearchServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_QueryUnderstandingSpec_QueryClassificationSpec_descriptor; + } - /** - * - * - *
            -             * Chunk resource name.
            -             * 
            - * - * string chunk = 1 [(.google.api.resource_reference) = { ... } - * - * @return The bytes for chunk. - */ - public com.google.protobuf.ByteString getChunkBytes() { - java.lang.Object ref = chunk_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - chunk_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec + .QueryClassificationSpec + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec + .QueryClassificationSpec.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec + .QueryClassificationSpec + build() { + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec + .QueryClassificationSpec + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec + .QueryClassificationSpec + buildPartial() { + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec + .QueryClassificationSpec + result = + new com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest + .QueryUnderstandingSpec.QueryClassificationSpec(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } - /** - * - * - *
            -             * Chunk resource name.
            -             * 
            - * - * string chunk = 1 [(.google.api.resource_reference) = { ... } - * - * @param value The chunk to set. - * @return This builder for chaining. - */ - public Builder setChunk(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - chunk_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } + private void buildPartial0( + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec + .QueryClassificationSpec + result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + types_.makeImmutable(); + result.types_ = types_; + } + } - /** - * - * - *
            -             * Chunk resource name.
            -             * 
            - * - * string chunk = 1 [(.google.api.resource_reference) = { ... } - * - * @return This builder for chaining. - */ - public Builder clearChunk() { - chunk_ = getDefaultInstance().getChunk(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec + .QueryClassificationSpec) { + return mergeFrom( + (com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec + .QueryClassificationSpec) + other); + } else { + super.mergeFrom(other); + return this; + } + } - /** - * - * - *
            -             * Chunk resource name.
            -             * 
            - * - * string chunk = 1 [(.google.api.resource_reference) = { ... } - * - * @param value The bytes for chunk to set. - * @return This builder for chaining. - */ - public Builder setChunkBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - chunk_ = value; + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec + .QueryClassificationSpec + other) { + if (other + == com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec + .QueryClassificationSpec.getDefaultInstance()) return this; + if (!other.types_.isEmpty()) { + if (types_.isEmpty()) { + types_ = other.types_; + types_.makeImmutable(); bitField0_ |= 0x00000001; - onChanged(); - return this; + } else { + ensureTypesIsMutable(); + types_.addAll(other.types_); } + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } - private java.lang.Object content_ = ""; + @java.lang.Override + public final boolean isInitialized() { + return true; + } - /** - * - * - *
            -             * Chunk textual content.
            -             * 
            - * - * string content = 2; - * - * @return The content. - */ - public java.lang.String getContent() { - java.lang.Object ref = content_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - content_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + int tmpRaw = input.readEnum(); + ensureTypesIsMutable(); + types_.addInt(tmpRaw); + break; + } // case 8 + case 10: + { + int length = input.readRawVarint32(); + int limit = input.pushLimit(length); + ensureTypesIsMutable(); + while (input.getBytesUntilLimit() > 0) { + types_.addInt(input.readEnum()); + } + input.popLimit(limit); + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } - /** - * - * - *
            -             * Chunk textual content.
            -             * 
            - * - * string content = 2; - * - * @return The bytes for content. - */ - public com.google.protobuf.ByteString getContentBytes() { - java.lang.Object ref = content_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - content_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } + private int bitField0_; - /** - * - * - *
            -             * Chunk textual content.
            -             * 
            - * - * string content = 2; - * - * @param value The content to set. - * @return This builder for chaining. - */ - public Builder setContent(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - content_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } + private com.google.protobuf.Internal.IntList types_ = emptyIntList(); + + private void ensureTypesIsMutable() { + if (!types_.isModifiable()) { + types_ = makeMutableCopy(types_); + } + bitField0_ |= 0x00000001; + } + + /** + * + * + *
            +         * Enabled query classification types.
            +         * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec.QueryClassificationSpec.Type types = 1; + * + * + * @return A list containing the types. + */ + public java.util.List< + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec + .QueryClassificationSpec.Type> + getTypesList() { + return new com.google.protobuf.Internal.IntListAdapter< + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec + .QueryClassificationSpec.Type>(types_, types_converter_); + } - /** - * - * - *
            -             * Chunk textual content.
            -             * 
            - * - * string content = 2; - * - * @return This builder for chaining. - */ - public Builder clearContent() { - content_ = getDefaultInstance().getContent(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } + /** + * + * + *
            +         * Enabled query classification types.
            +         * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec.QueryClassificationSpec.Type types = 1; + * + * + * @return The count of types. + */ + public int getTypesCount() { + return types_.size(); + } - /** - * - * - *
            -             * Chunk textual content.
            -             * 
            - * - * string content = 2; - * - * @param value The bytes for content to set. - * @return This builder for chaining. - */ - public Builder setContentBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - content_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } + /** + * + * + *
            +         * Enabled query classification types.
            +         * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec.QueryClassificationSpec.Type types = 1; + * + * + * @param index The index of the element to return. + * @return The types at the given index. + */ + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec + .QueryClassificationSpec.Type + getTypes(int index) { + return types_converter_.convert(types_.getInt(index)); + } - private com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.ChunkInfo.DocumentMetadata - documentMetadata_; - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.ChunkInfo.DocumentMetadata, - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.ChunkInfo.DocumentMetadata.Builder, - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.ChunkInfo.DocumentMetadataOrBuilder> - documentMetadataBuilder_; + /** + * + * + *
            +         * Enabled query classification types.
            +         * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec.QueryClassificationSpec.Type types = 1; + * + * + * @param index The index to set the value at. + * @param value The types to set. + * @return This builder for chaining. + */ + public Builder setTypes( + int index, + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec + .QueryClassificationSpec.Type + value) { + if (value == null) { + throw new NullPointerException(); + } + ensureTypesIsMutable(); + types_.setInt(index, value.getNumber()); + onChanged(); + return this; + } - /** - * - * - *
            -             * Metadata of the document from the current chunk.
            -             * 
            - * - * - * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.ChunkInfo.DocumentMetadata document_metadata = 4; - * - * - * @return Whether the documentMetadata field is set. - */ - public boolean hasDocumentMetadata() { - return ((bitField0_ & 0x00000004) != 0); - } + /** + * + * + *
            +         * Enabled query classification types.
            +         * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec.QueryClassificationSpec.Type types = 1; + * + * + * @param value The types to add. + * @return This builder for chaining. + */ + public Builder addTypes( + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec + .QueryClassificationSpec.Type + value) { + if (value == null) { + throw new NullPointerException(); + } + ensureTypesIsMutable(); + types_.addInt(value.getNumber()); + onChanged(); + return this; + } - /** - * - * - *
            -             * Metadata of the document from the current chunk.
            -             * 
            - * - * - * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.ChunkInfo.DocumentMetadata document_metadata = 4; - * - * - * @return The documentMetadata. - */ - public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.ChunkInfo.DocumentMetadata - getDocumentMetadata() { - if (documentMetadataBuilder_ == null) { - return documentMetadata_ == null - ? com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.ChunkInfo.DocumentMetadata - .getDefaultInstance() - : documentMetadata_; - } else { - return documentMetadataBuilder_.getMessage(); - } - } + /** + * + * + *
            +         * Enabled query classification types.
            +         * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec.QueryClassificationSpec.Type types = 1; + * + * + * @param values The types to add. + * @return This builder for chaining. + */ + public Builder addAllTypes( + java.lang.Iterable< + ? extends + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest + .QueryUnderstandingSpec.QueryClassificationSpec.Type> + values) { + ensureTypesIsMutable(); + for (com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec + .QueryClassificationSpec.Type + value : values) { + types_.addInt(value.getNumber()); + } + onChanged(); + return this; + } - /** - * - * - *
            -             * Metadata of the document from the current chunk.
            -             * 
            - * - * - * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.ChunkInfo.DocumentMetadata document_metadata = 4; - * - */ - public Builder setDocumentMetadata( - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.ChunkInfo.DocumentMetadata - value) { - if (documentMetadataBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - documentMetadata_ = value; - } else { - documentMetadataBuilder_.setMessage(value); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } + /** + * + * + *
            +         * Enabled query classification types.
            +         * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec.QueryClassificationSpec.Type types = 1; + * + * + * @return This builder for chaining. + */ + public Builder clearTypes() { + types_ = emptyIntList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } - /** - * - * - *
            -             * Metadata of the document from the current chunk.
            -             * 
            - * - * - * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.ChunkInfo.DocumentMetadata document_metadata = 4; - * - */ - public Builder setDocumentMetadata( - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.ChunkInfo.DocumentMetadata.Builder - builderForValue) { - if (documentMetadataBuilder_ == null) { - documentMetadata_ = builderForValue.build(); - } else { - documentMetadataBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; - } + /** + * + * + *
            +         * Enabled query classification types.
            +         * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec.QueryClassificationSpec.Type types = 1; + * + * + * @return A list containing the enum numeric values on the wire for types. + */ + public java.util.List getTypesValueList() { + types_.makeImmutable(); + return types_; + } - /** - * - * - *
            -             * Metadata of the document from the current chunk.
            -             * 
            - * - * - * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.ChunkInfo.DocumentMetadata document_metadata = 4; - * - */ - public Builder mergeDocumentMetadata( - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.ChunkInfo.DocumentMetadata - value) { - if (documentMetadataBuilder_ == null) { - if (((bitField0_ & 0x00000004) != 0) - && documentMetadata_ != null - && documentMetadata_ - != com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.ChunkInfo.DocumentMetadata - .getDefaultInstance()) { - getDocumentMetadataBuilder().mergeFrom(value); - } else { - documentMetadata_ = value; - } - } else { - documentMetadataBuilder_.mergeFrom(value); - } - if (documentMetadata_ != null) { - bitField0_ |= 0x00000004; - onChanged(); - } - return this; - } + /** + * + * + *
            +         * Enabled query classification types.
            +         * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec.QueryClassificationSpec.Type types = 1; + * + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of types at the given index. + */ + public int getTypesValue(int index) { + return types_.getInt(index); + } - /** - * - * - *
            -             * Metadata of the document from the current chunk.
            -             * 
            - * - * - * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.ChunkInfo.DocumentMetadata document_metadata = 4; - * - */ - public Builder clearDocumentMetadata() { - bitField0_ = (bitField0_ & ~0x00000004); - documentMetadata_ = null; - if (documentMetadataBuilder_ != null) { - documentMetadataBuilder_.dispose(); - documentMetadataBuilder_ = null; - } - onChanged(); - return this; - } + /** + * + * + *
            +         * Enabled query classification types.
            +         * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec.QueryClassificationSpec.Type types = 1; + * + * + * @param index The index to set the value at. + * @param value The enum numeric value on the wire for types to set. + * @return This builder for chaining. + */ + public Builder setTypesValue(int index, int value) { + ensureTypesIsMutable(); + types_.setInt(index, value); + onChanged(); + return this; + } - /** - * - * - *
            -             * Metadata of the document from the current chunk.
            -             * 
            - * - * - * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.ChunkInfo.DocumentMetadata document_metadata = 4; - * - */ - public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.ChunkInfo.DocumentMetadata.Builder - getDocumentMetadataBuilder() { - bitField0_ |= 0x00000004; - onChanged(); - return internalGetDocumentMetadataFieldBuilder().getBuilder(); - } + /** + * + * + *
            +         * Enabled query classification types.
            +         * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec.QueryClassificationSpec.Type types = 1; + * + * + * @param value The enum numeric value on the wire for types to add. + * @return This builder for chaining. + */ + public Builder addTypesValue(int value) { + ensureTypesIsMutable(); + types_.addInt(value); + onChanged(); + return this; + } - /** - * - * - *
            -             * Metadata of the document from the current chunk.
            -             * 
            - * - * - * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.ChunkInfo.DocumentMetadata document_metadata = 4; - * - */ - public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.ChunkInfo.DocumentMetadataOrBuilder - getDocumentMetadataOrBuilder() { - if (documentMetadataBuilder_ != null) { - return documentMetadataBuilder_.getMessageOrBuilder(); - } else { - return documentMetadata_ == null - ? com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.ChunkInfo.DocumentMetadata - .getDefaultInstance() - : documentMetadata_; - } - } + /** + * + * + *
            +         * Enabled query classification types.
            +         * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec.QueryClassificationSpec.Type types = 1; + * + * + * @param values The enum numeric values on the wire for types to add. + * @return This builder for chaining. + */ + public Builder addAllTypesValue(java.lang.Iterable values) { + ensureTypesIsMutable(); + for (int value : values) { + types_.addInt(value); + } + onChanged(); + return this; + } - /** - * - * - *
            -             * Metadata of the document from the current chunk.
            -             * 
            - * - * - * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.ChunkInfo.DocumentMetadata document_metadata = 4; - * - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.ChunkInfo.DocumentMetadata, - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.ChunkInfo.DocumentMetadata.Builder, - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.ChunkInfo.DocumentMetadataOrBuilder> - internalGetDocumentMetadataFieldBuilder() { - if (documentMetadataBuilder_ == null) { - documentMetadataBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.ChunkInfo.DocumentMetadata, - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.ChunkInfo.DocumentMetadata.Builder, - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.ChunkInfo.DocumentMetadataOrBuilder>( - getDocumentMetadata(), getParentForChildren(), isClean()); - documentMetadata_ = null; + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec.QueryClassificationSpec) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec.QueryClassificationSpec) + private static final com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest + .QueryUnderstandingSpec.QueryClassificationSpec + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec + .QueryClassificationSpec(); + } + + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest + .QueryUnderstandingSpec.QueryClassificationSpec + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public QueryClassificationSpec parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); } - return documentMetadataBuilder_; + return builder.buildPartial(); } + }; - // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.ChunkInfo) - } - - // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.ChunkInfo) - private static final com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.ChunkInfo - DEFAULT_INSTANCE; + public static com.google.protobuf.Parser parser() { + return PARSER; + } - static { - DEFAULT_INSTANCE = - new com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.ChunkInfo(); - } + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } - public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.ChunkInfo - getDefaultInstance() { - return DEFAULT_INSTANCE; - } + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec + .QueryClassificationSpec + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ChunkInfo parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException() - .setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; + public interface QueryRephraserSpecOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec.QueryRephraserSpec) + com.google.protobuf.MessageOrBuilder { - public static com.google.protobuf.Parser parser() { - return PARSER; - } + /** + * + * + *
            +       * Disable query rephraser.
            +       * 
            + * + * bool disable = 1; + * + * @return The disable. + */ + boolean getDisable(); - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + /** + * + * + *
            +       * Max rephrase steps.
            +       * The max number is 5 steps.
            +       * If not set or set to < 1, it will be set to 1 by default.
            +       * 
            + * + * int32 max_rephrase_steps = 2; + * + * @return The maxRephraseSteps. + */ + int getMaxRephraseSteps(); - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.ChunkInfo - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - } + /** + * + * + *
            +       * Optional. Query Rephraser Model specification.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec.QueryRephraserSpec.ModelSpec model_spec = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the modelSpec field is set. + */ + boolean hasModelSpec(); - private int contentCase_ = 0; + /** + * + * + *
            +       * Optional. Query Rephraser Model specification.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec.QueryRephraserSpec.ModelSpec model_spec = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The modelSpec. + */ + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec + .QueryRephraserSpec.ModelSpec + getModelSpec(); - @SuppressWarnings("serial") - private java.lang.Object content_; + /** + * + * + *
            +       * Optional. Query Rephraser Model specification.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec.QueryRephraserSpec.ModelSpec model_spec = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec + .QueryRephraserSpec.ModelSpecOrBuilder + getModelSpecOrBuilder(); + } - public enum ContentCase - implements - com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - UNSTRUCTURED_DOCUMENT_INFO(1), - CHUNK_INFO(2), - CONTENT_NOT_SET(0); - private final int value; + /** + * + * + *
            +     * Query rephraser specification.
            +     * 
            + * + * Protobuf type {@code + * google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec.QueryRephraserSpec} + */ + public static final class QueryRephraserSpec extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec.QueryRephraserSpec) + QueryRephraserSpecOrBuilder { + private static final long serialVersionUID = 0L; - private ContentCase(int value) { - this.value = value; - } + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "QueryRephraserSpec"); + } - /** - * @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 ContentCase valueOf(int value) { - return forNumber(value); - } + // Use QueryRephraserSpec.newBuilder() to construct. + private QueryRephraserSpec(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } - public static ContentCase forNumber(int value) { - switch (value) { - case 1: - return UNSTRUCTURED_DOCUMENT_INFO; - case 2: - return CHUNK_INFO; - case 0: - return CONTENT_NOT_SET; - default: - return null; - } - } + private QueryRephraserSpec() {} - public int getNumber() { - return this.value; - } - }; + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.ConversationalSearchServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_QueryUnderstandingSpec_QueryRephraserSpec_descriptor; + } - public ContentCase getContentCase() { - return ContentCase.forNumber(contentCase_); - } + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.ConversationalSearchServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_QueryUnderstandingSpec_QueryRephraserSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec + .QueryRephraserSpec.class, + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec + .QueryRephraserSpec.Builder.class); + } - public static final int UNSTRUCTURED_DOCUMENT_INFO_FIELD_NUMBER = 1; + public interface ModelSpecOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec.QueryRephraserSpec.ModelSpec) + com.google.protobuf.MessageOrBuilder { /** * * *
            -         * Unstructured document information.
            +         * Optional. Enabled query rephraser model type. If not set, it will use
            +         * LARGE by default.
                      * 
            * * - * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo unstructured_document_info = 1; + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec.QueryRephraserSpec.ModelSpec.ModelType model_type = 1 [(.google.api.field_behavior) = OPTIONAL]; * * - * @return Whether the unstructuredDocumentInfo field is set. + * @return The enum numeric value on the wire for modelType. */ - @java.lang.Override - public boolean hasUnstructuredDocumentInfo() { - return contentCase_ == 1; - } + int getModelTypeValue(); /** * * *
            -         * Unstructured document information.
            +         * Optional. Enabled query rephraser model type. If not set, it will use
            +         * LARGE by default.
                      * 
            * * - * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo unstructured_document_info = 1; + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec.QueryRephraserSpec.ModelSpec.ModelType model_type = 1 [(.google.api.field_behavior) = OPTIONAL]; * * - * @return The unstructuredDocumentInfo. + * @return The modelType. */ + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec + .QueryRephraserSpec.ModelSpec.ModelType + getModelType(); + } + + /** + * + * + *
            +       * Query Rephraser Model specification.
            +       * 
            + * + * Protobuf type {@code + * google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec.QueryRephraserSpec.ModelSpec} + */ + public static final class ModelSpec extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec.QueryRephraserSpec.ModelSpec) + ModelSpecOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ModelSpec"); + } + + // Use ModelSpec.newBuilder() to construct. + private ModelSpec(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ModelSpec() { + modelType_ = 0; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.ConversationalSearchServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_QueryUnderstandingSpec_QueryRephraserSpec_ModelSpec_descriptor; + } + @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo - getUnstructuredDocumentInfo() { - if (contentCase_ == 1) { - return (com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo) - content_; - } - return com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo.getDefaultInstance(); + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.ConversationalSearchServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_QueryUnderstandingSpec_QueryRephraserSpec_ModelSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec + .QueryRephraserSpec.ModelSpec.class, + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec + .QueryRephraserSpec.ModelSpec.Builder.class); } /** * * *
            -         * Unstructured document information.
            +         * Query rephraser types. Currently only supports single-hop
            +         * (max_rephrase_steps = 1) model selections. For multi-hop
            +         * (max_rephrase_steps > 1), there is only one default model.
                      * 
            * - * - * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo unstructured_document_info = 1; - * + * Protobuf enum {@code + * google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec.QueryRephraserSpec.ModelSpec.ModelType} */ - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfoOrBuilder - getUnstructuredDocumentInfoOrBuilder() { - if (contentCase_ == 1) { - return (com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo) - content_; + public enum ModelType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
            +           * Unspecified model type.
            +           * 
            + * + * MODEL_TYPE_UNSPECIFIED = 0; + */ + MODEL_TYPE_UNSPECIFIED(0), + /** + * + * + *
            +           * Small query rephraser model. Gemini 1.0 XS model.
            +           * 
            + * + * SMALL = 1; + */ + SMALL(1), + /** + * + * + *
            +           * Large query rephraser model. Gemini 1.0 Pro model.
            +           * 
            + * + * LARGE = 2; + */ + LARGE(2), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ModelType"); } - return com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo.getDefaultInstance(); - } - public static final int CHUNK_INFO_FIELD_NUMBER = 2; + /** + * + * + *
            +           * Unspecified model type.
            +           * 
            + * + * MODEL_TYPE_UNSPECIFIED = 0; + */ + public static final int MODEL_TYPE_UNSPECIFIED_VALUE = 0; - /** - * - * - *
            -         * Chunk information.
            -         * 
            - * - * - * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.ChunkInfo chunk_info = 2; - * - * - * @return Whether the chunkInfo field is set. - */ - @java.lang.Override - public boolean hasChunkInfo() { - return contentCase_ == 2; + /** + * + * + *
            +           * Small query rephraser model. Gemini 1.0 XS model.
            +           * 
            + * + * SMALL = 1; + */ + public static final int SMALL_VALUE = 1; + + /** + * + * + *
            +           * Large query rephraser model. Gemini 1.0 Pro model.
            +           * 
            + * + * LARGE = 2; + */ + public static final int LARGE_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 ModelType 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 ModelType forNumber(int value) { + switch (value) { + case 0: + return MODEL_TYPE_UNSPECIFIED; + case 1: + return SMALL; + case 2: + return LARGE; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap + internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public ModelType findValueByNumber(int number) { + return ModelType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec + .QueryRephraserSpec.ModelSpec.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final ModelType[] VALUES = values(); + + public static ModelType valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private ModelType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec.QueryRephraserSpec.ModelSpec.ModelType) } + public static final int MODEL_TYPE_FIELD_NUMBER = 1; + private int modelType_ = 0; + /** * * *
            -         * Chunk information.
            +         * Optional. Enabled query rephraser model type. If not set, it will use
            +         * LARGE by default.
                      * 
            * * - * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.ChunkInfo chunk_info = 2; + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec.QueryRephraserSpec.ModelSpec.ModelType model_type = 1 [(.google.api.field_behavior) = OPTIONAL]; * * - * @return The chunkInfo. + * @return The enum numeric value on the wire for modelType. */ @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.ChunkInfo - getChunkInfo() { - if (contentCase_ == 2) { - return (com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.ChunkInfo) - content_; - } - return com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.ChunkInfo.getDefaultInstance(); + public int getModelTypeValue() { + return modelType_; } /** * * *
            -         * Chunk information.
            +         * Optional. Enabled query rephraser model type. If not set, it will use
            +         * LARGE by default.
                      * 
            * * - * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.ChunkInfo chunk_info = 2; + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec.QueryRephraserSpec.ModelSpec.ModelType model_type = 1 [(.google.api.field_behavior) = OPTIONAL]; * + * + * @return The modelType. */ @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.ChunkInfoOrBuilder - getChunkInfoOrBuilder() { - if (contentCase_ == 2) { - return (com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.ChunkInfo) - content_; - } - return com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.ChunkInfo.getDefaultInstance(); + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec + .QueryRephraserSpec.ModelSpec.ModelType + getModelType() { + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec + .QueryRephraserSpec.ModelSpec.ModelType + result = + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec + .QueryRephraserSpec.ModelSpec.ModelType.forNumber(modelType_); + return result == null + ? com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec + .QueryRephraserSpec.ModelSpec.ModelType.UNRECOGNIZED + : result; } private byte memoizedIsInitialized = -1; @@ -17742,44 +26092,26 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (contentCase_ == 1) { - output.writeMessage( - 1, - (com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo) - content_); - } - if (contentCase_ == 2) { - output.writeMessage( - 2, - (com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.ChunkInfo) - content_); + if (modelType_ + != com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec + .QueryRephraserSpec.ModelSpec.ModelType.MODEL_TYPE_UNSPECIFIED + .getNumber()) { + output.writeEnum(1, modelType_); } getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (contentCase_ == 1) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 1, - (com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo) - content_); - } - if (contentCase_ == 2) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 2, - (com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.ChunkInfo) - content_); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (modelType_ + != com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec + .QueryRephraserSpec.ModelSpec.ModelType.MODEL_TYPE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, modelType_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -17793,29 +26125,18 @@ public boolean equals(final java.lang.Object obj) { } if (!(obj instanceof - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList - .SearchResult)) { + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec + .QueryRephraserSpec.ModelSpec)) { return super.equals(obj); } - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList - .SearchResult + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec + .QueryRephraserSpec.ModelSpec other = - (com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult) + (com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec + .QueryRephraserSpec.ModelSpec) obj; - if (!getContentCase().equals(other.getContentCase())) return false; - switch (contentCase_) { - case 1: - if (!getUnstructuredDocumentInfo().equals(other.getUnstructuredDocumentInfo())) - return false; - break; - case 2: - if (!getChunkInfo().equals(other.getChunkInfo())) return false; - break; - case 0: - default: - } + if (modelType_ != other.modelType_) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -17827,32 +26148,22 @@ public int hashCode() { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); - switch (contentCase_) { - case 1: - hash = (37 * hash) + UNSTRUCTURED_DOCUMENT_INFO_FIELD_NUMBER; - hash = (53 * hash) + getUnstructuredDocumentInfo().hashCode(); - break; - case 2: - hash = (37 * hash) + CHUNK_INFO_FIELD_NUMBER; - hash = (53 * hash) + getChunkInfo().hashCode(); - break; - case 0: - default: - } + hash = (37 * hash) + MODEL_TYPE_FIELD_NUMBER; + hash = (53 * hash) + modelType_; hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } - public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest + .QueryUnderstandingSpec.QueryRephraserSpec.ModelSpec parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest + .QueryUnderstandingSpec.QueryRephraserSpec.ModelSpec parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) @@ -17860,15 +26171,15 @@ public int hashCode() { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest + .QueryUnderstandingSpec.QueryRephraserSpec.ModelSpec parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest + .QueryUnderstandingSpec.QueryRephraserSpec.ModelSpec parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) @@ -17876,788 +26187,314 @@ public int hashCode() { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest + .QueryUnderstandingSpec.QueryRephraserSpec.ModelSpec parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult - parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult - parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult - 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.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult - parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult - 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.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult - parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult - 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.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList - .SearchResult - 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; - } - - /** - * - * - *
            -         * Search result.
            -         * 
            - * - * Protobuf type {@code - * google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult} - */ - public static final class Builder - extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult) - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList - .SearchResultOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.discoveryengine.v1beta.ConversationalSearchServiceProto - .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_SearchSpec_SearchResultList_SearchResult_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.discoveryengine.v1beta.ConversationalSearchServiceProto - .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_SearchSpec_SearchResultList_SearchResult_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.class, - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.Builder.class); - } - - // Construct using - // com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - if (unstructuredDocumentInfoBuilder_ != null) { - unstructuredDocumentInfoBuilder_.clear(); - } - if (chunkInfoBuilder_ != null) { - chunkInfoBuilder_.clear(); - } - contentCase_ = 0; - content_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.discoveryengine.v1beta.ConversationalSearchServiceProto - .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_SearchSpec_SearchResultList_SearchResult_descriptor; - } - - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult - getDefaultInstanceForType() { - return com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult - build() { - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList - .SearchResult - result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult - buildPartial() { - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList - .SearchResult - result = - new com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - buildPartialOneofs(result); - onBuilt(); - return result; - } - - private void buildPartial0( - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList - .SearchResult - result) { - int from_bitField0_ = bitField0_; - } - - private void buildPartialOneofs( - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList - .SearchResult - result) { - result.contentCase_ = contentCase_; - result.content_ = this.content_; - if (contentCase_ == 1 && unstructuredDocumentInfoBuilder_ != null) { - result.content_ = unstructuredDocumentInfoBuilder_.build(); - } - if (contentCase_ == 2 && chunkInfoBuilder_ != null) { - result.content_ = chunkInfoBuilder_.build(); - } - } + return PARSER.parseFrom(data); + } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other - instanceof - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult) { - return mergeFrom( - (com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult) - other); - } else { - super.mergeFrom(other); - return this; - } - } + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest + .QueryUnderstandingSpec.QueryRephraserSpec.ModelSpec + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - public Builder mergeFrom( - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList - .SearchResult - other) { - if (other - == com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.getDefaultInstance()) return this; - switch (other.getContentCase()) { - case UNSTRUCTURED_DOCUMENT_INFO: - { - mergeUnstructuredDocumentInfo(other.getUnstructuredDocumentInfo()); - break; - } - case CHUNK_INFO: - { - mergeChunkInfo(other.getChunkInfo()); - break; - } - case CONTENT_NOT_SET: - { - break; - } - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest + .QueryUnderstandingSpec.QueryRephraserSpec.ModelSpec + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } - @java.lang.Override - public final boolean isInitialized() { - return true; - } + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest + .QueryUnderstandingSpec.QueryRephraserSpec.ModelSpec + parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - input.readMessage( - internalGetUnstructuredDocumentInfoFieldBuilder().getBuilder(), - extensionRegistry); - contentCase_ = 1; - break; - } // case 10 - case 18: - { - input.readMessage( - internalGetChunkInfoFieldBuilder().getBuilder(), extensionRegistry); - contentCase_ = 2; - break; - } // case 18 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest + .QueryUnderstandingSpec.QueryRephraserSpec.ModelSpec + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } - private int contentCase_ = 0; - private java.lang.Object content_; + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest + .QueryUnderstandingSpec.QueryRephraserSpec.ModelSpec + parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } - public ContentCase getContentCase() { - return ContentCase.forNumber(contentCase_); - } + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest + .QueryUnderstandingSpec.QueryRephraserSpec.ModelSpec + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } - public Builder clearContent() { - contentCase_ = 0; - content_ = null; - onChanged(); - return this; - } + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest + .QueryUnderstandingSpec.QueryRephraserSpec.ModelSpec + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } - private int bitField0_; + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo, - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo.Builder, - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfoOrBuilder> - unstructuredDocumentInfoBuilder_; + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } - /** - * - * - *
            -           * Unstructured document information.
            -           * 
            - * - * - * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo unstructured_document_info = 1; - * - * - * @return Whether the unstructuredDocumentInfo field is set. - */ - @java.lang.Override - public boolean hasUnstructuredDocumentInfo() { - return contentCase_ == 1; - } + public static Builder newBuilder( + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec + .QueryRephraserSpec.ModelSpec + prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } - /** - * - * - *
            -           * Unstructured document information.
            -           * 
            - * - * - * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo unstructured_document_info = 1; - * - * - * @return The unstructuredDocumentInfo. - */ - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo - getUnstructuredDocumentInfo() { - if (unstructuredDocumentInfoBuilder_ == null) { - if (contentCase_ == 1) { - return (com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo) - content_; - } - return com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo.getDefaultInstance(); - } else { - if (contentCase_ == 1) { - return unstructuredDocumentInfoBuilder_.getMessage(); - } - return com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo.getDefaultInstance(); - } - } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } - /** - * - * - *
            -           * Unstructured document information.
            -           * 
            - * - * - * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo unstructured_document_info = 1; - * - */ - public Builder setUnstructuredDocumentInfo( - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList - .SearchResult.UnstructuredDocumentInfo - value) { - if (unstructuredDocumentInfoBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - content_ = value; - onChanged(); - } else { - unstructuredDocumentInfoBuilder_.setMessage(value); - } - contentCase_ = 1; - return this; + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
            +         * Query Rephraser Model specification.
            +         * 
            + * + * Protobuf type {@code + * google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec.QueryRephraserSpec.ModelSpec} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec.QueryRephraserSpec.ModelSpec) + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec + .QueryRephraserSpec.ModelSpecOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.ConversationalSearchServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_QueryUnderstandingSpec_QueryRephraserSpec_ModelSpec_descriptor; } - /** - * - * - *
            -           * Unstructured document information.
            -           * 
            - * - * - * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo unstructured_document_info = 1; - * - */ - public Builder setUnstructuredDocumentInfo( - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList - .SearchResult.UnstructuredDocumentInfo.Builder - builderForValue) { - if (unstructuredDocumentInfoBuilder_ == null) { - content_ = builderForValue.build(); - onChanged(); - } else { - unstructuredDocumentInfoBuilder_.setMessage(builderForValue.build()); - } - contentCase_ = 1; - return this; + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.ConversationalSearchServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_QueryUnderstandingSpec_QueryRephraserSpec_ModelSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest + .QueryUnderstandingSpec.QueryRephraserSpec.ModelSpec.class, + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest + .QueryUnderstandingSpec.QueryRephraserSpec.ModelSpec.Builder.class); } - /** - * - * - *
            -           * Unstructured document information.
            -           * 
            - * - * - * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo unstructured_document_info = 1; - * - */ - public Builder mergeUnstructuredDocumentInfo( - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList - .SearchResult.UnstructuredDocumentInfo - value) { - if (unstructuredDocumentInfoBuilder_ == null) { - if (contentCase_ == 1 - && content_ - != com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo - .getDefaultInstance()) { - content_ = - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo.newBuilder( - (com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo) - content_) - .mergeFrom(value) - .buildPartial(); - } else { - content_ = value; - } - onChanged(); - } else { - if (contentCase_ == 1) { - unstructuredDocumentInfoBuilder_.mergeFrom(value); - } else { - unstructuredDocumentInfoBuilder_.setMessage(value); - } - } - contentCase_ = 1; - return this; + // Construct using + // com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec.QueryRephraserSpec.ModelSpec.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); } - /** - * - * - *
            -           * Unstructured document information.
            -           * 
            - * - * - * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo unstructured_document_info = 1; - * - */ - public Builder clearUnstructuredDocumentInfo() { - if (unstructuredDocumentInfoBuilder_ == null) { - if (contentCase_ == 1) { - contentCase_ = 0; - content_ = null; - onChanged(); - } - } else { - if (contentCase_ == 1) { - contentCase_ = 0; - content_ = null; - } - unstructuredDocumentInfoBuilder_.clear(); - } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + modelType_ = 0; return this; } - /** - * - * - *
            -           * Unstructured document information.
            -           * 
            - * - * - * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo unstructured_document_info = 1; - * - */ - public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo.Builder - getUnstructuredDocumentInfoBuilder() { - return internalGetUnstructuredDocumentInfoFieldBuilder().getBuilder(); + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1beta.ConversationalSearchServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_QueryUnderstandingSpec_QueryRephraserSpec_ModelSpec_descriptor; } - /** - * - * - *
            -           * Unstructured document information.
            -           * 
            - * - * - * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo unstructured_document_info = 1; - * - */ @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfoOrBuilder - getUnstructuredDocumentInfoOrBuilder() { - if ((contentCase_ == 1) && (unstructuredDocumentInfoBuilder_ != null)) { - return unstructuredDocumentInfoBuilder_.getMessageOrBuilder(); - } else { - if (contentCase_ == 1) { - return (com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo) - content_; - } - return com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo.getDefaultInstance(); - } + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec + .QueryRephraserSpec.ModelSpec + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec + .QueryRephraserSpec.ModelSpec.getDefaultInstance(); } - /** - * - * - *
            -           * Unstructured document information.
            -           * 
            - * - * - * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo unstructured_document_info = 1; - * - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo, - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo.Builder, - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfoOrBuilder> - internalGetUnstructuredDocumentInfoFieldBuilder() { - if (unstructuredDocumentInfoBuilder_ == null) { - if (!(contentCase_ == 1)) { - content_ = - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo - .getDefaultInstance(); - } - unstructuredDocumentInfoBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo, - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo.Builder, - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfoOrBuilder>( - (com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.UnstructuredDocumentInfo) - content_, - getParentForChildren(), - isClean()); - content_ = null; + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec + .QueryRephraserSpec.ModelSpec + build() { + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec + .QueryRephraserSpec.ModelSpec + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); } - contentCase_ = 1; - onChanged(); - return unstructuredDocumentInfoBuilder_; + return result; } - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.ChunkInfo, - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.ChunkInfo.Builder, - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.ChunkInfoOrBuilder> - chunkInfoBuilder_; - - /** - * - * - *
            -           * Chunk information.
            -           * 
            - * - * - * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.ChunkInfo chunk_info = 2; - * - * - * @return Whether the chunkInfo field is set. - */ @java.lang.Override - public boolean hasChunkInfo() { - return contentCase_ == 2; + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec + .QueryRephraserSpec.ModelSpec + buildPartial() { + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec + .QueryRephraserSpec.ModelSpec + result = + new com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest + .QueryUnderstandingSpec.QueryRephraserSpec.ModelSpec(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec + .QueryRephraserSpec.ModelSpec + result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.modelType_ = modelType_; + } } - /** - * - * - *
            -           * Chunk information.
            -           * 
            - * - * - * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.ChunkInfo chunk_info = 2; - * - * - * @return The chunkInfo. - */ @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.ChunkInfo - getChunkInfo() { - if (chunkInfoBuilder_ == null) { - if (contentCase_ == 2) { - return (com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.ChunkInfo) - content_; - } - return com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.ChunkInfo.getDefaultInstance(); + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec + .QueryRephraserSpec.ModelSpec) { + return mergeFrom( + (com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec + .QueryRephraserSpec.ModelSpec) + other); } else { - if (contentCase_ == 2) { - return chunkInfoBuilder_.getMessage(); - } - return com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.ChunkInfo.getDefaultInstance(); + super.mergeFrom(other); + return this; } } - /** - * - * - *
            -           * Chunk information.
            -           * 
            - * - * - * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.ChunkInfo chunk_info = 2; - * - */ - public Builder setChunkInfo( - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList - .SearchResult.ChunkInfo - value) { - if (chunkInfoBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - content_ = value; - onChanged(); - } else { - chunkInfoBuilder_.setMessage(value); + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec + .QueryRephraserSpec.ModelSpec + other) { + if (other + == com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec + .QueryRephraserSpec.ModelSpec.getDefaultInstance()) return this; + if (other.modelType_ != 0) { + setModelTypeValue(other.getModelTypeValue()); } - contentCase_ = 2; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); return this; } - /** - * - * - *
            -           * Chunk information.
            -           * 
            - * - * - * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.ChunkInfo chunk_info = 2; - * - */ - public Builder setChunkInfo( - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList - .SearchResult.ChunkInfo.Builder - builderForValue) { - if (chunkInfoBuilder_ == null) { - content_ = builderForValue.build(); - onChanged(); - } else { - chunkInfoBuilder_.setMessage(builderForValue.build()); + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); } - contentCase_ = 2; + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + modelType_ = input.readEnum(); + bitField0_ |= 0x00000001; + break; + } // case 8 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally return this; } + private int bitField0_; + + private int modelType_ = 0; + /** * * *
            -           * Chunk information.
            +           * Optional. Enabled query rephraser model type. If not set, it will use
            +           * LARGE by default.
                        * 
            * * - * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.ChunkInfo chunk_info = 2; + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec.QueryRephraserSpec.ModelSpec.ModelType model_type = 1 [(.google.api.field_behavior) = OPTIONAL]; * + * + * @return The enum numeric value on the wire for modelType. */ - public Builder mergeChunkInfo( - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList - .SearchResult.ChunkInfo - value) { - if (chunkInfoBuilder_ == null) { - if (contentCase_ == 2 - && content_ - != com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.ChunkInfo.getDefaultInstance()) { - content_ = - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.ChunkInfo.newBuilder( - (com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.ChunkInfo) - content_) - .mergeFrom(value) - .buildPartial(); - } else { - content_ = value; - } - onChanged(); - } else { - if (contentCase_ == 2) { - chunkInfoBuilder_.mergeFrom(value); - } else { - chunkInfoBuilder_.setMessage(value); - } - } - contentCase_ = 2; - return this; + @java.lang.Override + public int getModelTypeValue() { + return modelType_; } /** * * *
            -           * Chunk information.
            +           * Optional. Enabled query rephraser model type. If not set, it will use
            +           * LARGE by default.
                        * 
            * * - * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.ChunkInfo chunk_info = 2; + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec.QueryRephraserSpec.ModelSpec.ModelType model_type = 1 [(.google.api.field_behavior) = OPTIONAL]; * + * + * @param value The enum numeric value on the wire for modelType to set. + * @return This builder for chaining. */ - public Builder clearChunkInfo() { - if (chunkInfoBuilder_ == null) { - if (contentCase_ == 2) { - contentCase_ = 0; - content_ = null; - onChanged(); - } - } else { - if (contentCase_ == 2) { - contentCase_ = 0; - content_ = null; - } - chunkInfoBuilder_.clear(); - } + public Builder setModelTypeValue(int value) { + modelType_ = value; + bitField0_ |= 0x00000001; + onChanged(); return this; } @@ -18665,116 +26502,105 @@ public Builder clearChunkInfo() { * * *
            -           * Chunk information.
            +           * Optional. Enabled query rephraser model type. If not set, it will use
            +           * LARGE by default.
                        * 
            * * - * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.ChunkInfo chunk_info = 2; + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec.QueryRephraserSpec.ModelSpec.ModelType model_type = 1 [(.google.api.field_behavior) = OPTIONAL]; * + * + * @return The modelType. */ - public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.ChunkInfo.Builder - getChunkInfoBuilder() { - return internalGetChunkInfoFieldBuilder().getBuilder(); + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec + .QueryRephraserSpec.ModelSpec.ModelType + getModelType() { + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec + .QueryRephraserSpec.ModelSpec.ModelType + result = + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest + .QueryUnderstandingSpec.QueryRephraserSpec.ModelSpec.ModelType.forNumber( + modelType_); + return result == null + ? com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec + .QueryRephraserSpec.ModelSpec.ModelType.UNRECOGNIZED + : result; } /** * * *
            -           * Chunk information.
            +           * Optional. Enabled query rephraser model type. If not set, it will use
            +           * LARGE by default.
                        * 
            * * - * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.ChunkInfo chunk_info = 2; + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec.QueryRephraserSpec.ModelSpec.ModelType model_type = 1 [(.google.api.field_behavior) = OPTIONAL]; * + * + * @param value The modelType to set. + * @return This builder for chaining. */ - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.ChunkInfoOrBuilder - getChunkInfoOrBuilder() { - if ((contentCase_ == 2) && (chunkInfoBuilder_ != null)) { - return chunkInfoBuilder_.getMessageOrBuilder(); - } else { - if (contentCase_ == 2) { - return (com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.ChunkInfo) - content_; - } - return com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.ChunkInfo.getDefaultInstance(); + public Builder setModelType( + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec + .QueryRephraserSpec.ModelSpec.ModelType + value) { + if (value == null) { + throw new NullPointerException(); } + bitField0_ |= 0x00000001; + modelType_ = value.getNumber(); + onChanged(); + return this; } /** * * *
            -           * Chunk information.
            +           * Optional. Enabled query rephraser model type. If not set, it will use
            +           * LARGE by default.
                        * 
            * * - * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.ChunkInfo chunk_info = 2; + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec.QueryRephraserSpec.ModelSpec.ModelType model_type = 1 [(.google.api.field_behavior) = OPTIONAL]; * + * + * @return This builder for chaining. */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.ChunkInfo, - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.ChunkInfo.Builder, - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.ChunkInfoOrBuilder> - internalGetChunkInfoFieldBuilder() { - if (chunkInfoBuilder_ == null) { - if (!(contentCase_ == 2)) { - content_ = - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.ChunkInfo.getDefaultInstance(); - } - chunkInfoBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.ChunkInfo, - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.ChunkInfo.Builder, - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.ChunkInfoOrBuilder>( - (com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.ChunkInfo) - content_, - getParentForChildren(), - isClean()); - content_ = null; - } - contentCase_ = 2; + public Builder clearModelType() { + bitField0_ = (bitField0_ & ~0x00000001); + modelType_ = 0; onChanged(); - return chunkInfoBuilder_; + return this; } - // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult) + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec.QueryRephraserSpec.ModelSpec) } - // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult) - private static final com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec.QueryRephraserSpec.ModelSpec) + private static final com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest + .QueryUnderstandingSpec.QueryRephraserSpec.ModelSpec DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = - new com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult(); + new com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec + .QueryRephraserSpec.ModelSpec(); } - public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest + .QueryUnderstandingSpec.QueryRephraserSpec.ModelSpec getDefaultInstance() { return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { @java.lang.Override - public SearchResult parsePartialFrom( + public ModelSpec parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { @@ -18794,120 +26620,129 @@ public SearchResult parsePartialFrom( } }; - public static com.google.protobuf.Parser parser() { + public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override - public com.google.protobuf.Parser getParserForType() { + public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec + .QueryRephraserSpec.ModelSpec getDefaultInstanceForType() { return DEFAULT_INSTANCE; } - } - - public static final int SEARCH_RESULTS_FIELD_NUMBER = 1; + } - @SuppressWarnings("serial") - private java.util.List< - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList - .SearchResult> - searchResults_; + private int bitField0_; + public static final int DISABLE_FIELD_NUMBER = 1; + private boolean disable_ = false; /** * * *
            -       * Search results.
            +       * Disable query rephraser.
                    * 
            * - * - * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult search_results = 1; - * + * bool disable = 1; + * + * @return The disable. */ @java.lang.Override - public java.util.List< - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList - .SearchResult> - getSearchResultsList() { - return searchResults_; + public boolean getDisable() { + return disable_; } + public static final int MAX_REPHRASE_STEPS_FIELD_NUMBER = 2; + private int maxRephraseSteps_ = 0; + /** * * *
            -       * Search results.
            +       * Max rephrase steps.
            +       * The max number is 5 steps.
            +       * If not set or set to < 1, it will be set to 1 by default.
                    * 
            * - * - * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult search_results = 1; - * + * int32 max_rephrase_steps = 2; + * + * @return The maxRephraseSteps. */ @java.lang.Override - public java.util.List< - ? extends - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResultOrBuilder> - getSearchResultsOrBuilderList() { - return searchResults_; + public int getMaxRephraseSteps() { + return maxRephraseSteps_; } + public static final int MODEL_SPEC_FIELD_NUMBER = 3; + private com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec + .QueryRephraserSpec.ModelSpec + modelSpec_; + /** * * *
            -       * Search results.
            +       * Optional. Query Rephraser Model specification.
                    * 
            * * - * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult search_results = 1; + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec.QueryRephraserSpec.ModelSpec model_spec = 3 [(.google.api.field_behavior) = OPTIONAL]; * + * + * @return Whether the modelSpec field is set. */ @java.lang.Override - public int getSearchResultsCount() { - return searchResults_.size(); + public boolean hasModelSpec() { + return ((bitField0_ & 0x00000001) != 0); } /** * * *
            -       * Search results.
            +       * Optional. Query Rephraser Model specification.
                    * 
            * * - * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult search_results = 1; + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec.QueryRephraserSpec.ModelSpec model_spec = 3 [(.google.api.field_behavior) = OPTIONAL]; * + * + * @return The modelSpec. */ @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList - .SearchResult - getSearchResults(int index) { - return searchResults_.get(index); + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec + .QueryRephraserSpec.ModelSpec + getModelSpec() { + return modelSpec_ == null + ? com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec + .QueryRephraserSpec.ModelSpec.getDefaultInstance() + : modelSpec_; } /** * * *
            -       * Search results.
            +       * Optional. Query Rephraser Model specification.
                    * 
            * * - * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult search_results = 1; + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec.QueryRephraserSpec.ModelSpec model_spec = 3 [(.google.api.field_behavior) = OPTIONAL]; * */ @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList - .SearchResultOrBuilder - getSearchResultsOrBuilder(int index) { - return searchResults_.get(index); + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec + .QueryRephraserSpec.ModelSpecOrBuilder + getModelSpecOrBuilder() { + return modelSpec_ == null + ? com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec + .QueryRephraserSpec.ModelSpec.getDefaultInstance() + : modelSpec_; } private byte memoizedIsInitialized = -1; @@ -18924,8 +26759,14 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - for (int i = 0; i < searchResults_.size(); i++) { - output.writeMessage(1, searchResults_.get(i)); + if (disable_ != false) { + output.writeBool(1, disable_); + } + if (maxRephraseSteps_ != 0) { + output.writeInt32(2, maxRephraseSteps_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(3, getModelSpec()); } getUnknownFields().writeTo(output); } @@ -18936,9 +26777,14 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - for (int i = 0; i < searchResults_.size(); i++) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize(1, searchResults_.get(i)); + if (disable_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(1, disable_); + } + if (maxRephraseSteps_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, maxRephraseSteps_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getModelSpec()); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -18952,17 +26798,23 @@ public boolean equals(final java.lang.Object obj) { } if (!(obj instanceof - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList)) { + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec + .QueryRephraserSpec)) { return super.equals(obj); } - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec + .QueryRephraserSpec other = - (com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList) + (com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec + .QueryRephraserSpec) obj; - if (!getSearchResultsList().equals(other.getSearchResultsList())) return false; + if (getDisable() != other.getDisable()) return false; + if (getMaxRephraseSteps() != other.getMaxRephraseSteps()) return false; + if (hasModelSpec() != other.hasModelSpec()) return false; + if (hasModelSpec()) { + if (!getModelSpec().equals(other.getModelSpec())) return false; + } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -18974,39 +26826,43 @@ public int hashCode() { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); - if (getSearchResultsCount() > 0) { - hash = (37 * hash) + SEARCH_RESULTS_FIELD_NUMBER; - hash = (53 * hash) + getSearchResultsList().hashCode(); + hash = (37 * hash) + DISABLE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getDisable()); + hash = (37 * hash) + MAX_REPHRASE_STEPS_FIELD_NUMBER; + hash = (53 * hash) + getMaxRephraseSteps(); + if (hasModelSpec()) { + hash = (37 * hash) + MODEL_SPEC_FIELD_NUMBER; + hash = (53 * hash) + getModelSpec().hashCode(); } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } - public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest + .QueryUnderstandingSpec.QueryRephraserSpec parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest + .QueryUnderstandingSpec.QueryRephraserSpec 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.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest + .QueryUnderstandingSpec.QueryRephraserSpec parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest + .QueryUnderstandingSpec.QueryRephraserSpec parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) @@ -19014,27 +26870,27 @@ public int hashCode() { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest + .QueryUnderstandingSpec.QueryRephraserSpec parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest + .QueryUnderstandingSpec.QueryRephraserSpec parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest + .QueryUnderstandingSpec.QueryRephraserSpec parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } - public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest + .QueryUnderstandingSpec.QueryRephraserSpec parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) @@ -19043,14 +26899,14 @@ public int hashCode() { PARSER, input, extensionRegistry); } - public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest + .QueryUnderstandingSpec.QueryRephraserSpec parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } - public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest + .QueryUnderstandingSpec.QueryRephraserSpec parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) @@ -19059,14 +26915,14 @@ public int hashCode() { PARSER, input, extensionRegistry); } - public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest + .QueryUnderstandingSpec.QueryRephraserSpec parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } - public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest + .QueryUnderstandingSpec.QueryRephraserSpec parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) @@ -19085,7 +26941,8 @@ public static Builder newBuilder() { } public static Builder newBuilder( - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec + .QueryRephraserSpec prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @@ -19106,76 +26963,86 @@ protected Builder newBuilderForType( * * *
            -       * Search result list.
            +       * Query rephraser specification.
                    * 
            * * Protobuf type {@code - * google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList} + * google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec.QueryRephraserSpec} */ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList) - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultListOrBuilder { + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec.QueryRephraserSpec) + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec + .QueryRephraserSpecOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.discoveryengine.v1beta.ConversationalSearchServiceProto - .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_SearchSpec_SearchResultList_descriptor; + .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_QueryUnderstandingSpec_QueryRephraserSpec_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.discoveryengine.v1beta.ConversationalSearchServiceProto - .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_SearchSpec_SearchResultList_fieldAccessorTable + .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_QueryUnderstandingSpec_QueryRephraserSpec_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.class, - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.Builder.class); + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec + .QueryRephraserSpec.class, + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec + .QueryRephraserSpec.Builder.class); } // Construct using - // com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.newBuilder() - private Builder() {} + // com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec.QueryRephraserSpec.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetModelSpecFieldBuilder(); + } } @java.lang.Override public Builder clear() { super.clear(); bitField0_ = 0; - if (searchResultsBuilder_ == null) { - searchResults_ = java.util.Collections.emptyList(); - } else { - searchResults_ = null; - searchResultsBuilder_.clear(); + disable_ = false; + maxRephraseSteps_ = 0; + modelSpec_ = null; + if (modelSpecBuilder_ != null) { + modelSpecBuilder_.dispose(); + modelSpecBuilder_ = null; } - bitField0_ = (bitField0_ & ~0x00000001); return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.cloud.discoveryengine.v1beta.ConversationalSearchServiceProto - .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_SearchSpec_SearchResultList_descriptor; + .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_QueryUnderstandingSpec_QueryRephraserSpec_descriptor; } @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec + .QueryRephraserSpec getDefaultInstanceForType() { - return com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.getDefaultInstance(); + return com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec + .QueryRephraserSpec.getDefaultInstance(); } @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec + .QueryRephraserSpec build() { - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec + .QueryRephraserSpec result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); @@ -19184,50 +27051,49 @@ public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { } @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec + .QueryRephraserSpec buildPartial() { - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList - result = - new com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields( - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList - result) { - if (searchResultsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - searchResults_ = java.util.Collections.unmodifiableList(searchResults_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.searchResults_ = searchResults_; - } else { - result.searchResults_ = searchResultsBuilder_.build(); + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec + .QueryRephraserSpec + result = + new com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest + .QueryUnderstandingSpec.QueryRephraserSpec(this); + if (bitField0_ != 0) { + buildPartial0(result); } + onBuilt(); + return result; } private void buildPartial0( - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec + .QueryRephraserSpec result) { int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.disable_ = disable_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.maxRephraseSteps_ = maxRephraseSteps_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.modelSpec_ = modelSpecBuilder_ == null ? modelSpec_ : modelSpecBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList) { + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec + .QueryRephraserSpec) { return mergeFrom( - (com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList) + (com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec + .QueryRephraserSpec) other); } else { super.mergeFrom(other); @@ -19236,37 +27102,20 @@ public Builder mergeFrom(com.google.protobuf.Message other) { } public Builder mergeFrom( - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec + .QueryRephraserSpec other) { if (other - == com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.getDefaultInstance()) return this; - if (searchResultsBuilder_ == null) { - if (!other.searchResults_.isEmpty()) { - if (searchResults_.isEmpty()) { - searchResults_ = other.searchResults_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureSearchResultsIsMutable(); - searchResults_.addAll(other.searchResults_); - } - onChanged(); - } - } else { - if (!other.searchResults_.isEmpty()) { - if (searchResultsBuilder_.isEmpty()) { - searchResultsBuilder_.dispose(); - searchResultsBuilder_ = null; - searchResults_ = other.searchResults_; - bitField0_ = (bitField0_ & ~0x00000001); - searchResultsBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders - ? internalGetSearchResultsFieldBuilder() - : null; - } else { - searchResultsBuilder_.addAllMessages(other.searchResults_); - } - } + == com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec + .QueryRephraserSpec.getDefaultInstance()) return this; + if (other.getDisable() != false) { + setDisable(other.getDisable()); + } + if (other.getMaxRephraseSteps() != 0) { + setMaxRephraseSteps(other.getMaxRephraseSteps()); + } + if (other.hasModelSpec()) { + mergeModelSpec(other.getModelSpec()); } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); @@ -19294,23 +27143,25 @@ public Builder mergeFrom( case 0: done = true; break; - case 10: + case 8: { - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult - m = - input.readMessage( - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest - .SearchSpec.SearchResultList.SearchResult.parser(), - extensionRegistry); - if (searchResultsBuilder_ == null) { - ensureSearchResultsIsMutable(); - searchResults_.add(m); - } else { - searchResultsBuilder_.addMessage(m); - } + disable_ = input.readBool(); + bitField0_ |= 0x00000001; break; - } // case 10 + } // case 8 + case 16: + { + maxRephraseSteps_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: + { + input.readMessage( + internalGetModelSpecFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -19330,226 +27181,101 @@ public Builder mergeFrom( private int bitField0_; - private java.util.List< - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult> - searchResults_ = java.util.Collections.emptyList(); - - private void ensureSearchResultsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - searchResults_ = - new java.util.ArrayList< - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult>(searchResults_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult, - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.Builder, - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResultOrBuilder> - searchResultsBuilder_; + private boolean disable_; /** * * *
            -         * Search results.
            +         * Disable query rephraser.
                      * 
            * - * - * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult search_results = 1; - * - */ - public java.util.List< - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult> - getSearchResultsList() { - if (searchResultsBuilder_ == null) { - return java.util.Collections.unmodifiableList(searchResults_); - } else { - return searchResultsBuilder_.getMessageList(); - } - } - - /** - * - * - *
            -         * Search results.
            -         * 
            + * bool disable = 1; * - * - * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult search_results = 1; - * + * @return The disable. */ - public int getSearchResultsCount() { - if (searchResultsBuilder_ == null) { - return searchResults_.size(); - } else { - return searchResultsBuilder_.getCount(); - } + @java.lang.Override + public boolean getDisable() { + return disable_; } /** * * *
            -         * Search results.
            +         * Disable query rephraser.
                      * 
            * - * - * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult search_results = 1; - * - */ - public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult - getSearchResults(int index) { - if (searchResultsBuilder_ == null) { - return searchResults_.get(index); - } else { - return searchResultsBuilder_.getMessage(index); - } - } - - /** - * - * - *
            -         * Search results.
            -         * 
            + * bool disable = 1; * - * - * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult search_results = 1; - * + * @param value The disable to set. + * @return This builder for chaining. */ - public Builder setSearchResults( - int index, - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList - .SearchResult - value) { - if (searchResultsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureSearchResultsIsMutable(); - searchResults_.set(index, value); - onChanged(); - } else { - searchResultsBuilder_.setMessage(index, value); - } - return this; - } + public Builder setDisable(boolean value) { - /** - * - * - *
            -         * Search results.
            -         * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult search_results = 1; - * - */ - public Builder setSearchResults( - int index, - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList - .SearchResult.Builder - builderForValue) { - if (searchResultsBuilder_ == null) { - ensureSearchResultsIsMutable(); - searchResults_.set(index, builderForValue.build()); - onChanged(); - } else { - searchResultsBuilder_.setMessage(index, builderForValue.build()); - } + disable_ = value; + bitField0_ |= 0x00000001; + onChanged(); return this; } /** * - * - *
            -         * Search results.
            -         * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult search_results = 1; - * - */ - public Builder addSearchResults( - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList - .SearchResult - value) { - if (searchResultsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureSearchResultsIsMutable(); - searchResults_.add(value); - onChanged(); - } else { - searchResultsBuilder_.addMessage(value); - } + * + *
            +         * Disable query rephraser.
            +         * 
            + * + * bool disable = 1; + * + * @return This builder for chaining. + */ + public Builder clearDisable() { + bitField0_ = (bitField0_ & ~0x00000001); + disable_ = false; + onChanged(); return this; } + private int maxRephraseSteps_; + /** * * *
            -         * Search results.
            +         * Max rephrase steps.
            +         * The max number is 5 steps.
            +         * If not set or set to < 1, it will be set to 1 by default.
                      * 
            * - * - * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult search_results = 1; - * + * int32 max_rephrase_steps = 2; + * + * @return The maxRephraseSteps. */ - public Builder addSearchResults( - int index, - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList - .SearchResult - value) { - if (searchResultsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureSearchResultsIsMutable(); - searchResults_.add(index, value); - onChanged(); - } else { - searchResultsBuilder_.addMessage(index, value); - } - return this; + @java.lang.Override + public int getMaxRephraseSteps() { + return maxRephraseSteps_; } /** * * *
            -         * Search results.
            +         * Max rephrase steps.
            +         * The max number is 5 steps.
            +         * If not set or set to < 1, it will be set to 1 by default.
                      * 
            * - * - * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult search_results = 1; - * + * int32 max_rephrase_steps = 2; + * + * @param value The maxRephraseSteps to set. + * @return This builder for chaining. */ - public Builder addSearchResults( - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList - .SearchResult.Builder - builderForValue) { - if (searchResultsBuilder_ == null) { - ensureSearchResultsIsMutable(); - searchResults_.add(builderForValue.build()); - onChanged(); - } else { - searchResultsBuilder_.addMessage(builderForValue.build()); - } + public Builder setMaxRephraseSteps(int value) { + + maxRephraseSteps_ = value; + bitField0_ |= 0x00000002; + onChanged(); return this; } @@ -19557,96 +27283,102 @@ public Builder addSearchResults( * * *
            -         * Search results.
            +         * Max rephrase steps.
            +         * The max number is 5 steps.
            +         * If not set or set to < 1, it will be set to 1 by default.
                      * 
            * - * - * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult search_results = 1; - * + * int32 max_rephrase_steps = 2; + * + * @return This builder for chaining. */ - public Builder addSearchResults( - int index, - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList - .SearchResult.Builder - builderForValue) { - if (searchResultsBuilder_ == null) { - ensureSearchResultsIsMutable(); - searchResults_.add(index, builderForValue.build()); - onChanged(); - } else { - searchResultsBuilder_.addMessage(index, builderForValue.build()); - } + public Builder clearMaxRephraseSteps() { + bitField0_ = (bitField0_ & ~0x00000002); + maxRephraseSteps_ = 0; + onChanged(); return this; } + private com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec + .QueryRephraserSpec.ModelSpec + modelSpec_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec + .QueryRephraserSpec.ModelSpec, + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec + .QueryRephraserSpec.ModelSpec.Builder, + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec + .QueryRephraserSpec.ModelSpecOrBuilder> + modelSpecBuilder_; + /** * * *
            -         * Search results.
            +         * Optional. Query Rephraser Model specification.
                      * 
            * * - * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult search_results = 1; + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec.QueryRephraserSpec.ModelSpec model_spec = 3 [(.google.api.field_behavior) = OPTIONAL]; * + * + * @return Whether the modelSpec field is set. */ - public Builder addAllSearchResults( - java.lang.Iterable< - ? extends - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult> - values) { - if (searchResultsBuilder_ == null) { - ensureSearchResultsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, searchResults_); - onChanged(); - } else { - searchResultsBuilder_.addAllMessages(values); - } - return this; + public boolean hasModelSpec() { + return ((bitField0_ & 0x00000004) != 0); } /** * * *
            -         * Search results.
            +         * Optional. Query Rephraser Model specification.
                      * 
            * * - * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult search_results = 1; + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec.QueryRephraserSpec.ModelSpec model_spec = 3 [(.google.api.field_behavior) = OPTIONAL]; * + * + * @return The modelSpec. */ - public Builder clearSearchResults() { - if (searchResultsBuilder_ == null) { - searchResults_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec + .QueryRephraserSpec.ModelSpec + getModelSpec() { + if (modelSpecBuilder_ == null) { + return modelSpec_ == null + ? com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec + .QueryRephraserSpec.ModelSpec.getDefaultInstance() + : modelSpec_; } else { - searchResultsBuilder_.clear(); + return modelSpecBuilder_.getMessage(); } - return this; } /** * * *
            -         * Search results.
            +         * Optional. Query Rephraser Model specification.
                      * 
            * * - * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult search_results = 1; + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec.QueryRephraserSpec.ModelSpec model_spec = 3 [(.google.api.field_behavior) = OPTIONAL]; * */ - public Builder removeSearchResults(int index) { - if (searchResultsBuilder_ == null) { - ensureSearchResultsIsMutable(); - searchResults_.remove(index); - onChanged(); + public Builder setModelSpec( + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec + .QueryRephraserSpec.ModelSpec + value) { + if (modelSpecBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + modelSpec_ = value; } else { - searchResultsBuilder_.remove(index); + modelSpecBuilder_.setMessage(value); } + bitField0_ |= 0x00000004; + onChanged(); return this; } @@ -19654,172 +27386,185 @@ public Builder removeSearchResults(int index) { * * *
            -         * Search results.
            +         * Optional. Query Rephraser Model specification.
                      * 
            * * - * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult search_results = 1; + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec.QueryRephraserSpec.ModelSpec model_spec = 3 [(.google.api.field_behavior) = OPTIONAL]; * */ - public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.Builder - getSearchResultsBuilder(int index) { - return internalGetSearchResultsFieldBuilder().getBuilder(index); + public Builder setModelSpec( + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec + .QueryRephraserSpec.ModelSpec.Builder + builderForValue) { + if (modelSpecBuilder_ == null) { + modelSpec_ = builderForValue.build(); + } else { + modelSpecBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; } /** * * *
            -         * Search results.
            +         * Optional. Query Rephraser Model specification.
                      * 
            * * - * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult search_results = 1; + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec.QueryRephraserSpec.ModelSpec model_spec = 3 [(.google.api.field_behavior) = OPTIONAL]; * */ - public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResultOrBuilder - getSearchResultsOrBuilder(int index) { - if (searchResultsBuilder_ == null) { - return searchResults_.get(index); + public Builder mergeModelSpec( + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec + .QueryRephraserSpec.ModelSpec + value) { + if (modelSpecBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && modelSpec_ != null + && modelSpec_ + != com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest + .QueryUnderstandingSpec.QueryRephraserSpec.ModelSpec.getDefaultInstance()) { + getModelSpecBuilder().mergeFrom(value); + } else { + modelSpec_ = value; + } } else { - return searchResultsBuilder_.getMessageOrBuilder(index); + modelSpecBuilder_.mergeFrom(value); + } + if (modelSpec_ != null) { + bitField0_ |= 0x00000004; + onChanged(); } + return this; } /** * * *
            -         * Search results.
            +         * Optional. Query Rephraser Model specification.
                      * 
            * * - * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult search_results = 1; + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec.QueryRephraserSpec.ModelSpec model_spec = 3 [(.google.api.field_behavior) = OPTIONAL]; * */ - public java.util.List< - ? extends - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResultOrBuilder> - getSearchResultsOrBuilderList() { - if (searchResultsBuilder_ != null) { - return searchResultsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(searchResults_); + public Builder clearModelSpec() { + bitField0_ = (bitField0_ & ~0x00000004); + modelSpec_ = null; + if (modelSpecBuilder_ != null) { + modelSpecBuilder_.dispose(); + modelSpecBuilder_ = null; } + onChanged(); + return this; } /** * * *
            -         * Search results.
            +         * Optional. Query Rephraser Model specification.
                      * 
            * * - * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult search_results = 1; + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec.QueryRephraserSpec.ModelSpec model_spec = 3 [(.google.api.field_behavior) = OPTIONAL]; * */ - public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.Builder - addSearchResultsBuilder() { - return internalGetSearchResultsFieldBuilder() - .addBuilder( - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.getDefaultInstance()); + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec + .QueryRephraserSpec.ModelSpec.Builder + getModelSpecBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return internalGetModelSpecFieldBuilder().getBuilder(); } /** * * *
            -         * Search results.
            +         * Optional. Query Rephraser Model specification.
                      * 
            * * - * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult search_results = 1; + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec.QueryRephraserSpec.ModelSpec model_spec = 3 [(.google.api.field_behavior) = OPTIONAL]; * */ - public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.Builder - addSearchResultsBuilder(int index) { - return internalGetSearchResultsFieldBuilder() - .addBuilder( - index, - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.getDefaultInstance()); + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec + .QueryRephraserSpec.ModelSpecOrBuilder + getModelSpecOrBuilder() { + if (modelSpecBuilder_ != null) { + return modelSpecBuilder_.getMessageOrBuilder(); + } else { + return modelSpec_ == null + ? com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec + .QueryRephraserSpec.ModelSpec.getDefaultInstance() + : modelSpec_; + } } /** * * *
            -         * Search results.
            +         * Optional. Query Rephraser Model specification.
                      * 
            * * - * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult search_results = 1; + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec.QueryRephraserSpec.ModelSpec model_spec = 3 [(.google.api.field_behavior) = OPTIONAL]; * */ - public java.util.List< - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.Builder> - getSearchResultsBuilderList() { - return internalGetSearchResultsFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult, - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.Builder, - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResultOrBuilder> - internalGetSearchResultsFieldBuilder() { - if (searchResultsBuilder_ == null) { - searchResultsBuilder_ = - new com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult, - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResult.Builder, - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.SearchResultOrBuilder>( - searchResults_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - searchResults_ = null; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec + .QueryRephraserSpec.ModelSpec, + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec + .QueryRephraserSpec.ModelSpec.Builder, + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec + .QueryRephraserSpec.ModelSpecOrBuilder> + internalGetModelSpecFieldBuilder() { + if (modelSpecBuilder_ == null) { + modelSpecBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest + .QueryUnderstandingSpec.QueryRephraserSpec.ModelSpec, + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest + .QueryUnderstandingSpec.QueryRephraserSpec.ModelSpec.Builder, + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest + .QueryUnderstandingSpec.QueryRephraserSpec.ModelSpecOrBuilder>( + getModelSpec(), getParentForChildren(), isClean()); + modelSpec_ = null; } - return searchResultsBuilder_; + return modelSpecBuilder_; } - // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList) + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec.QueryRephraserSpec) } - // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList) - private static final com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec.QueryRephraserSpec) + private static final com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest + .QueryUnderstandingSpec.QueryRephraserSpec DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = - new com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList(); + new com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec + .QueryRephraserSpec(); } - public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest + .QueryUnderstandingSpec.QueryRephraserSpec getDefaultInstance() { return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { @java.lang.Override - public SearchResultList parsePartialFrom( + public QueryRephraserSpec parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { @@ -19839,206 +27584,176 @@ public SearchResultList parsePartialFrom( } }; - public static com.google.protobuf.Parser parser() { + public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override - public com.google.protobuf.Parser getParserForType() { + public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec + .QueryRephraserSpec getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } - private int inputCase_ = 0; - - @SuppressWarnings("serial") - private java.lang.Object input_; - - public enum InputCase - implements - com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - SEARCH_PARAMS(1), - SEARCH_RESULT_LIST(2), - INPUT_NOT_SET(0); - private final int value; - - private InputCase(int value) { - this.value = value; - } - - /** - * @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 InputCase valueOf(int value) { - return forNumber(value); - } - - public static InputCase forNumber(int value) { - switch (value) { - case 1: - return SEARCH_PARAMS; - case 2: - return SEARCH_RESULT_LIST; - case 0: - return INPUT_NOT_SET; - default: - return null; - } - } - - public int getNumber() { - return this.value; - } - }; - - public InputCase getInputCase() { - return InputCase.forNumber(inputCase_); - } - - public static final int SEARCH_PARAMS_FIELD_NUMBER = 1; + private int bitField0_; + public static final int QUERY_CLASSIFICATION_SPEC_FIELD_NUMBER = 1; + private com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec + .QueryClassificationSpec + queryClassificationSpec_; /** * * *
            -     * Search parameters.
            +     * Query classification specification.
                  * 
            * * - * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchParams search_params = 1; + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec.QueryClassificationSpec query_classification_spec = 1; * * - * @return Whether the searchParams field is set. + * @return Whether the queryClassificationSpec field is set. */ @java.lang.Override - public boolean hasSearchParams() { - return inputCase_ == 1; + public boolean hasQueryClassificationSpec() { + return ((bitField0_ & 0x00000001) != 0); } /** * * *
            -     * Search parameters.
            +     * Query classification specification.
                  * 
            * * - * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchParams search_params = 1; + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec.QueryClassificationSpec query_classification_spec = 1; * * - * @return The searchParams. + * @return The queryClassificationSpec. */ @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchParams - getSearchParams() { - if (inputCase_ == 1) { - return (com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchParams) - input_; - } - return com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchParams - .getDefaultInstance(); + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec + .QueryClassificationSpec + getQueryClassificationSpec() { + return queryClassificationSpec_ == null + ? com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec + .QueryClassificationSpec.getDefaultInstance() + : queryClassificationSpec_; } /** * * *
            -     * Search parameters.
            +     * Query classification specification.
                  * 
            * * - * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchParams search_params = 1; + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec.QueryClassificationSpec query_classification_spec = 1; * */ @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchParamsOrBuilder - getSearchParamsOrBuilder() { - if (inputCase_ == 1) { - return (com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchParams) - input_; - } - return com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchParams - .getDefaultInstance(); + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec + .QueryClassificationSpecOrBuilder + getQueryClassificationSpecOrBuilder() { + return queryClassificationSpec_ == null + ? com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec + .QueryClassificationSpec.getDefaultInstance() + : queryClassificationSpec_; } - public static final int SEARCH_RESULT_LIST_FIELD_NUMBER = 2; + public static final int QUERY_REPHRASER_SPEC_FIELD_NUMBER = 2; + private com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec + .QueryRephraserSpec + queryRephraserSpec_; /** * * *
            -     * Search result list.
            +     * Query rephraser specification.
                  * 
            * * - * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList search_result_list = 2; + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec.QueryRephraserSpec query_rephraser_spec = 2; * * - * @return Whether the searchResultList field is set. + * @return Whether the queryRephraserSpec field is set. */ @java.lang.Override - public boolean hasSearchResultList() { - return inputCase_ == 2; + public boolean hasQueryRephraserSpec() { + return ((bitField0_ & 0x00000002) != 0); } /** * * *
            -     * Search result list.
            +     * Query rephraser specification.
                  * 
            * * - * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList search_result_list = 2; + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec.QueryRephraserSpec query_rephraser_spec = 2; * * - * @return The searchResultList. + * @return The queryRephraserSpec. */ @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList - getSearchResultList() { - if (inputCase_ == 2) { - return (com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList) - input_; - } - return com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList - .getDefaultInstance(); + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec + .QueryRephraserSpec + getQueryRephraserSpec() { + return queryRephraserSpec_ == null + ? com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec + .QueryRephraserSpec.getDefaultInstance() + : queryRephraserSpec_; } /** * * *
            -     * Search result list.
            +     * Query rephraser specification.
                  * 
            * * - * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList search_result_list = 2; + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec.QueryRephraserSpec query_rephraser_spec = 2; * */ @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultListOrBuilder - getSearchResultListOrBuilder() { - if (inputCase_ == 2) { - return (com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList) - input_; - } - return com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList - .getDefaultInstance(); + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec + .QueryRephraserSpecOrBuilder + getQueryRephraserSpecOrBuilder() { + return queryRephraserSpec_ == null + ? com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec + .QueryRephraserSpec.getDefaultInstance() + : queryRephraserSpec_; + } + + public static final int DISABLE_SPELL_CORRECTION_FIELD_NUMBER = 3; + private boolean disableSpellCorrection_ = false; + + /** + * + * + *
            +     * Optional. Whether to disable spell correction.
            +     * The default value is `false`.
            +     * 
            + * + * bool disable_spell_correction = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The disableSpellCorrection. + */ + @java.lang.Override + public boolean getDisableSpellCorrection() { + return disableSpellCorrection_; } private byte memoizedIsInitialized = -1; @@ -20055,17 +27770,14 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (inputCase_ == 1) { - output.writeMessage( - 1, - (com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchParams) - input_); + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getQueryClassificationSpec()); } - if (inputCase_ == 2) { - output.writeMessage( - 2, - (com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList) - input_); + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(2, getQueryRephraserSpec()); + } + if (disableSpellCorrection_ != false) { + output.writeBool(3, disableSpellCorrection_); } getUnknownFields().writeTo(output); } @@ -20076,20 +27788,17 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (inputCase_ == 1) { + if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize( - 1, - (com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchParams) - input_); + 1, getQueryClassificationSpec()); } - if (inputCase_ == 2) { + if (((bitField0_ & 0x00000002) != 0)) { size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 2, - (com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList) - input_); + com.google.protobuf.CodedOutputStream.computeMessageSize(2, getQueryRephraserSpec()); + } + if (disableSpellCorrection_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, disableSpellCorrection_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -20101,23 +27810,23 @@ public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } - if (!(obj instanceof com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec)) { + if (!(obj + instanceof + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec)) { return super.equals(obj); } - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec other = - (com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec) obj; + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec other = + (com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec) obj; - if (!getInputCase().equals(other.getInputCase())) return false; - switch (inputCase_) { - case 1: - if (!getSearchParams().equals(other.getSearchParams())) return false; - break; - case 2: - if (!getSearchResultList().equals(other.getSearchResultList())) return false; - break; - case 0: - default: + if (hasQueryClassificationSpec() != other.hasQueryClassificationSpec()) return false; + if (hasQueryClassificationSpec()) { + if (!getQueryClassificationSpec().equals(other.getQueryClassificationSpec())) return false; } + if (hasQueryRephraserSpec() != other.hasQueryRephraserSpec()) return false; + if (hasQueryRephraserSpec()) { + if (!getQueryRephraserSpec().equals(other.getQueryRephraserSpec())) return false; + } + if (getDisableSpellCorrection() != other.getDisableSpellCorrection()) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -20129,76 +27838,78 @@ public int hashCode() { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); - switch (inputCase_) { - case 1: - hash = (37 * hash) + SEARCH_PARAMS_FIELD_NUMBER; - hash = (53 * hash) + getSearchParams().hashCode(); - break; - case 2: - hash = (37 * hash) + SEARCH_RESULT_LIST_FIELD_NUMBER; - hash = (53 * hash) + getSearchResultList().hashCode(); - break; - case 0: - default: + if (hasQueryClassificationSpec()) { + hash = (37 * hash) + QUERY_CLASSIFICATION_SPEC_FIELD_NUMBER; + hash = (53 * hash) + getQueryClassificationSpec().hashCode(); + } + if (hasQueryRephraserSpec()) { + hash = (37 * hash) + QUERY_REPHRASER_SPEC_FIELD_NUMBER; + hash = (53 * hash) + getQueryRephraserSpec().hashCode(); } + hash = (37 * hash) + DISABLE_SPELL_CORRECTION_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getDisableSpellCorrection()); hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } - public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec + 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.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec + 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.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec parseFrom( - byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec parseFrom( - java.io.InputStream input) throws java.io.IOException { + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec + parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } - public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec + 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.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } - public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -20206,15 +27917,16 @@ public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchS PARSER, input, extensionRegistry); } - public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } - public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -20229,7 +27941,8 @@ public static Builder newBuilder() { } public static Builder newBuilder( - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec prototype) { + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec + prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @@ -20248,70 +27961,86 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.Builder * * *
            -     * Search specification.
            +     * Query understanding specification.
                  * 
            * - * Protobuf type {@code google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec} + * Protobuf type {@code + * google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec} */ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec) - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpecOrBuilder { + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec) + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpecOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.discoveryengine.v1beta.ConversationalSearchServiceProto - .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_SearchSpec_descriptor; + .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_QueryUnderstandingSpec_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.discoveryengine.v1beta.ConversationalSearchServiceProto - .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_SearchSpec_fieldAccessorTable + .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_QueryUnderstandingSpec_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.class, - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.Builder - .class); + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec + .class, + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec + .Builder.class); } // Construct using - // com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.newBuilder() - private Builder() {} + // com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetQueryClassificationSpecFieldBuilder(); + internalGetQueryRephraserSpecFieldBuilder(); + } } @java.lang.Override public Builder clear() { super.clear(); bitField0_ = 0; - if (searchParamsBuilder_ != null) { - searchParamsBuilder_.clear(); + queryClassificationSpec_ = null; + if (queryClassificationSpecBuilder_ != null) { + queryClassificationSpecBuilder_.dispose(); + queryClassificationSpecBuilder_ = null; } - if (searchResultListBuilder_ != null) { - searchResultListBuilder_.clear(); + queryRephraserSpec_ = null; + if (queryRephraserSpecBuilder_ != null) { + queryRephraserSpecBuilder_.dispose(); + queryRephraserSpecBuilder_ = null; } - inputCase_ = 0; - input_ = null; + disableSpellCorrection_ = false; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.cloud.discoveryengine.v1beta.ConversationalSearchServiceProto - .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_SearchSpec_descriptor; + .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_QueryUnderstandingSpec_descriptor; } @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec getDefaultInstanceForType() { - return com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + return com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec .getDefaultInstance(); } @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec build() { - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec result = + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec + build() { + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); @@ -20320,40 +28049,51 @@ public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec bui } @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec buildPartial() { - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec result = - new com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec(this); + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec + buildPartial() { + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec result = + new com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec( + this); if (bitField0_ != 0) { buildPartial0(result); } - buildPartialOneofs(result); onBuilt(); return result; } private void buildPartial0( - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec result) { + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec + result) { int from_bitField0_ = bitField0_; - } - - private void buildPartialOneofs( - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec result) { - result.inputCase_ = inputCase_; - result.input_ = this.input_; - if (inputCase_ == 1 && searchParamsBuilder_ != null) { - result.input_ = searchParamsBuilder_.build(); + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.queryClassificationSpec_ = + queryClassificationSpecBuilder_ == null + ? queryClassificationSpec_ + : queryClassificationSpecBuilder_.build(); + to_bitField0_ |= 0x00000001; } - if (inputCase_ == 2 && searchResultListBuilder_ != null) { - result.input_ = searchResultListBuilder_.build(); + if (((from_bitField0_ & 0x00000002) != 0)) { + result.queryRephraserSpec_ = + queryRephraserSpecBuilder_ == null + ? queryRephraserSpec_ + : queryRephraserSpecBuilder_.build(); + to_bitField0_ |= 0x00000002; } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.disableSpellCorrection_ = disableSpellCorrection_; + } + result.bitField0_ |= to_bitField0_; } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other - instanceof com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec) { + instanceof + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec) { return mergeFrom( - (com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec) other); + (com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec) + other); } else { super.mergeFrom(other); return this; @@ -20361,25 +28101,18 @@ public Builder mergeFrom(com.google.protobuf.Message other) { } public Builder mergeFrom( - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec other) { + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec other) { if (other - == com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + == com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec .getDefaultInstance()) return this; - switch (other.getInputCase()) { - case SEARCH_PARAMS: - { - mergeSearchParams(other.getSearchParams()); - break; - } - case SEARCH_RESULT_LIST: - { - mergeSearchResultList(other.getSearchResultList()); - break; - } - case INPUT_NOT_SET: - { - break; - } + if (other.hasQueryClassificationSpec()) { + mergeQueryClassificationSpec(other.getQueryClassificationSpec()); + } + if (other.hasQueryRephraserSpec()) { + mergeQueryRephraserSpec(other.getQueryRephraserSpec()); + } + if (other.getDisableSpellCorrection() != false) { + setDisableSpellCorrection(other.getDisableSpellCorrection()); } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); @@ -20410,17 +28143,24 @@ public Builder mergeFrom( case 10: { input.readMessage( - internalGetSearchParamsFieldBuilder().getBuilder(), extensionRegistry); - inputCase_ = 1; + internalGetQueryClassificationSpecFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; break; } // case 10 case 18: { input.readMessage( - internalGetSearchResultListFieldBuilder().getBuilder(), extensionRegistry); - inputCase_ = 2; + internalGetQueryRephraserSpecFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; break; } // case 18 + case 24: + { + disableSpellCorrection_ = input.readBool(); + bitField0_ |= 0x00000004; + break; + } // case 24 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -20438,78 +28178,60 @@ public Builder mergeFrom( return this; } - private int inputCase_ = 0; - private java.lang.Object input_; - - public InputCase getInputCase() { - return InputCase.forNumber(inputCase_); - } - - public Builder clearInput() { - inputCase_ = 0; - input_ = null; - onChanged(); - return this; - } - private int bitField0_; - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchParams, - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchParams - .Builder, - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchParamsOrBuilder> - searchParamsBuilder_; + private com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec + .QueryClassificationSpec + queryClassificationSpec_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec + .QueryClassificationSpec, + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec + .QueryClassificationSpec.Builder, + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec + .QueryClassificationSpecOrBuilder> + queryClassificationSpecBuilder_; /** * * *
            -       * Search parameters.
            +       * Query classification specification.
                    * 
            * * - * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchParams search_params = 1; + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec.QueryClassificationSpec query_classification_spec = 1; * * - * @return Whether the searchParams field is set. + * @return Whether the queryClassificationSpec field is set. */ - @java.lang.Override - public boolean hasSearchParams() { - return inputCase_ == 1; + public boolean hasQueryClassificationSpec() { + return ((bitField0_ & 0x00000001) != 0); } /** * * *
            -       * Search parameters.
            +       * Query classification specification.
                    * 
            * * - * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchParams search_params = 1; + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec.QueryClassificationSpec query_classification_spec = 1; * * - * @return The searchParams. + * @return The queryClassificationSpec. */ - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchParams - getSearchParams() { - if (searchParamsBuilder_ == null) { - if (inputCase_ == 1) { - return (com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchParams) - input_; - } - return com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchParams - .getDefaultInstance(); + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec + .QueryClassificationSpec + getQueryClassificationSpec() { + if (queryClassificationSpecBuilder_ == null) { + return queryClassificationSpec_ == null + ? com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec + .QueryClassificationSpec.getDefaultInstance() + : queryClassificationSpec_; } else { - if (inputCase_ == 1) { - return searchParamsBuilder_.getMessage(); - } - return com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchParams - .getDefaultInstance(); + return queryClassificationSpecBuilder_.getMessage(); } } @@ -20517,26 +28239,27 @@ public boolean hasSearchParams() { * * *
            -       * Search parameters.
            +       * Query classification specification.
                    * 
            * * - * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchParams search_params = 1; + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec.QueryClassificationSpec query_classification_spec = 1; * */ - public Builder setSearchParams( - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchParams + public Builder setQueryClassificationSpec( + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec + .QueryClassificationSpec value) { - if (searchParamsBuilder_ == null) { + if (queryClassificationSpecBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - input_ = value; - onChanged(); + queryClassificationSpec_ = value; } else { - searchParamsBuilder_.setMessage(value); + queryClassificationSpecBuilder_.setMessage(value); } - inputCase_ = 1; + bitField0_ |= 0x00000001; + onChanged(); return this; } @@ -20544,23 +28267,24 @@ public Builder setSearchParams( * * *
            -       * Search parameters.
            +       * Query classification specification.
                    * 
            * * - * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchParams search_params = 1; + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec.QueryClassificationSpec query_classification_spec = 1; * */ - public Builder setSearchParams( - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchParams.Builder + public Builder setQueryClassificationSpec( + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec + .QueryClassificationSpec.Builder builderForValue) { - if (searchParamsBuilder_ == null) { - input_ = builderForValue.build(); - onChanged(); + if (queryClassificationSpecBuilder_ == null) { + queryClassificationSpec_ = builderForValue.build(); } else { - searchParamsBuilder_.setMessage(builderForValue.build()); + queryClassificationSpecBuilder_.setMessage(builderForValue.build()); } - inputCase_ = 1; + bitField0_ |= 0x00000001; + onChanged(); return this; } @@ -20568,41 +28292,34 @@ public Builder setSearchParams( * * *
            -       * Search parameters.
            +       * Query classification specification.
                    * 
            * * - * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchParams search_params = 1; + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec.QueryClassificationSpec query_classification_spec = 1; * */ - public Builder mergeSearchParams( - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchParams + public Builder mergeQueryClassificationSpec( + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec + .QueryClassificationSpec value) { - if (searchParamsBuilder_ == null) { - if (inputCase_ == 1 - && input_ - != com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchParams.getDefaultInstance()) { - input_ = - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchParams - .newBuilder( - (com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchParams) - input_) - .mergeFrom(value) - .buildPartial(); + if (queryClassificationSpecBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && queryClassificationSpec_ != null + && queryClassificationSpec_ + != com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest + .QueryUnderstandingSpec.QueryClassificationSpec.getDefaultInstance()) { + getQueryClassificationSpecBuilder().mergeFrom(value); } else { - input_ = value; + queryClassificationSpec_ = value; } - onChanged(); } else { - if (inputCase_ == 1) { - searchParamsBuilder_.mergeFrom(value); - } else { - searchParamsBuilder_.setMessage(value); - } + queryClassificationSpecBuilder_.mergeFrom(value); + } + if (queryClassificationSpec_ != null) { + bitField0_ |= 0x00000001; + onChanged(); } - inputCase_ = 1; return this; } @@ -20610,27 +28327,21 @@ public Builder mergeSearchParams( * * *
            -       * Search parameters.
            +       * Query classification specification.
                    * 
            * * - * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchParams search_params = 1; + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec.QueryClassificationSpec query_classification_spec = 1; * */ - public Builder clearSearchParams() { - if (searchParamsBuilder_ == null) { - if (inputCase_ == 1) { - inputCase_ = 0; - input_ = null; - onChanged(); - } - } else { - if (inputCase_ == 1) { - inputCase_ = 0; - input_ = null; - } - searchParamsBuilder_.clear(); + public Builder clearQueryClassificationSpec() { + bitField0_ = (bitField0_ & ~0x00000001); + queryClassificationSpec_ = null; + if (queryClassificationSpecBuilder_ != null) { + queryClassificationSpecBuilder_.dispose(); + queryClassificationSpecBuilder_ = null; } + onChanged(); return this; } @@ -20638,44 +28349,131 @@ public Builder clearSearchParams() { * * *
            -       * Search parameters.
            +       * Query classification specification.
                    * 
            * * - * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchParams search_params = 1; + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec.QueryClassificationSpec query_classification_spec = 1; * */ - public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchParams - .Builder - getSearchParamsBuilder() { - return internalGetSearchParamsFieldBuilder().getBuilder(); + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec + .QueryClassificationSpec.Builder + getQueryClassificationSpecBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return internalGetQueryClassificationSpecFieldBuilder().getBuilder(); + } + + /** + * + * + *
            +       * Query classification specification.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec.QueryClassificationSpec query_classification_spec = 1; + * + */ + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec + .QueryClassificationSpecOrBuilder + getQueryClassificationSpecOrBuilder() { + if (queryClassificationSpecBuilder_ != null) { + return queryClassificationSpecBuilder_.getMessageOrBuilder(); + } else { + return queryClassificationSpec_ == null + ? com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec + .QueryClassificationSpec.getDefaultInstance() + : queryClassificationSpec_; + } + } + + /** + * + * + *
            +       * Query classification specification.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec.QueryClassificationSpec query_classification_spec = 1; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec + .QueryClassificationSpec, + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec + .QueryClassificationSpec.Builder, + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec + .QueryClassificationSpecOrBuilder> + internalGetQueryClassificationSpecFieldBuilder() { + if (queryClassificationSpecBuilder_ == null) { + queryClassificationSpecBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec + .QueryClassificationSpec, + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec + .QueryClassificationSpec.Builder, + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec + .QueryClassificationSpecOrBuilder>( + getQueryClassificationSpec(), getParentForChildren(), isClean()); + queryClassificationSpec_ = null; + } + return queryClassificationSpecBuilder_; + } + + private com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec + .QueryRephraserSpec + queryRephraserSpec_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec + .QueryRephraserSpec, + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec + .QueryRephraserSpec.Builder, + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec + .QueryRephraserSpecOrBuilder> + queryRephraserSpecBuilder_; + + /** + * + * + *
            +       * Query rephraser specification.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec.QueryRephraserSpec query_rephraser_spec = 2; + * + * + * @return Whether the queryRephraserSpec field is set. + */ + public boolean hasQueryRephraserSpec() { + return ((bitField0_ & 0x00000002) != 0); } /** * * *
            -       * Search parameters.
            +       * Query rephraser specification.
                    * 
            * * - * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchParams search_params = 1; + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec.QueryRephraserSpec query_rephraser_spec = 2; * + * + * @return The queryRephraserSpec. */ - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchParamsOrBuilder - getSearchParamsOrBuilder() { - if ((inputCase_ == 1) && (searchParamsBuilder_ != null)) { - return searchParamsBuilder_.getMessageOrBuilder(); + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec + .QueryRephraserSpec + getQueryRephraserSpec() { + if (queryRephraserSpecBuilder_ == null) { + return queryRephraserSpec_ == null + ? com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec + .QueryRephraserSpec.getDefaultInstance() + : queryRephraserSpec_; } else { - if (inputCase_ == 1) { - return (com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchParams) - input_; - } - return com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchParams - .getDefaultInstance(); + return queryRephraserSpecBuilder_.getMessage(); } } @@ -20683,130 +28481,109 @@ public Builder clearSearchParams() { * * *
            -       * Search parameters.
            +       * Query rephraser specification.
                    * 
            * * - * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchParams search_params = 1; + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec.QueryRephraserSpec query_rephraser_spec = 2; * */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchParams, - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchParams - .Builder, - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchParamsOrBuilder> - internalGetSearchParamsFieldBuilder() { - if (searchParamsBuilder_ == null) { - if (!(inputCase_ == 1)) { - input_ = - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchParams - .getDefaultInstance(); + public Builder setQueryRephraserSpec( + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec + .QueryRephraserSpec + value) { + if (queryRephraserSpecBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); } - searchParamsBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchParams, - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchParams - .Builder, - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchParamsOrBuilder>( - (com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchParams) - input_, - getParentForChildren(), - isClean()); - input_ = null; + queryRephraserSpec_ = value; + } else { + queryRephraserSpecBuilder_.setMessage(value); } - inputCase_ = 1; + bitField0_ |= 0x00000002; onChanged(); - return searchParamsBuilder_; + return this; } - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList, - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList - .Builder, - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultListOrBuilder> - searchResultListBuilder_; - /** * * *
            -       * Search result list.
            +       * Query rephraser specification.
                    * 
            * * - * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList search_result_list = 2; + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec.QueryRephraserSpec query_rephraser_spec = 2; * - * - * @return Whether the searchResultList field is set. */ - @java.lang.Override - public boolean hasSearchResultList() { - return inputCase_ == 2; + public Builder setQueryRephraserSpec( + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec + .QueryRephraserSpec.Builder + builderForValue) { + if (queryRephraserSpecBuilder_ == null) { + queryRephraserSpec_ = builderForValue.build(); + } else { + queryRephraserSpecBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; } /** * * *
            -       * Search result list.
            +       * Query rephraser specification.
                    * 
            * * - * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList search_result_list = 2; + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec.QueryRephraserSpec query_rephraser_spec = 2; * - * - * @return The searchResultList. */ - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList - getSearchResultList() { - if (searchResultListBuilder_ == null) { - if (inputCase_ == 2) { - return (com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList) - input_; + public Builder mergeQueryRephraserSpec( + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec + .QueryRephraserSpec + value) { + if (queryRephraserSpecBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && queryRephraserSpec_ != null + && queryRephraserSpec_ + != com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest + .QueryUnderstandingSpec.QueryRephraserSpec.getDefaultInstance()) { + getQueryRephraserSpecBuilder().mergeFrom(value); + } else { + queryRephraserSpec_ = value; } - return com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.getDefaultInstance(); } else { - if (inputCase_ == 2) { - return searchResultListBuilder_.getMessage(); - } - return com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.getDefaultInstance(); + queryRephraserSpecBuilder_.mergeFrom(value); + } + if (queryRephraserSpec_ != null) { + bitField0_ |= 0x00000002; + onChanged(); } + return this; } /** * * *
            -       * Search result list.
            +       * Query rephraser specification.
                    * 
            * * - * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList search_result_list = 2; + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec.QueryRephraserSpec query_rephraser_spec = 2; * */ - public Builder setSearchResultList( - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList - value) { - if (searchResultListBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - input_ = value; - onChanged(); - } else { - searchResultListBuilder_.setMessage(value); + public Builder clearQueryRephraserSpec() { + bitField0_ = (bitField0_ & ~0x00000002); + queryRephraserSpec_ = null; + if (queryRephraserSpecBuilder_ != null) { + queryRephraserSpecBuilder_.dispose(); + queryRephraserSpecBuilder_ = null; } - inputCase_ = 2; + onChanged(); return this; } @@ -20814,208 +28591,160 @@ public Builder setSearchResultList( * * *
            -       * Search result list.
            +       * Query rephraser specification.
                    * 
            * * - * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList search_result_list = 2; + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec.QueryRephraserSpec query_rephraser_spec = 2; * */ - public Builder setSearchResultList( - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList - .Builder - builderForValue) { - if (searchResultListBuilder_ == null) { - input_ = builderForValue.build(); - onChanged(); - } else { - searchResultListBuilder_.setMessage(builderForValue.build()); - } - inputCase_ = 2; - return this; + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec + .QueryRephraserSpec.Builder + getQueryRephraserSpecBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return internalGetQueryRephraserSpecFieldBuilder().getBuilder(); } /** * * *
            -       * Search result list.
            +       * Query rephraser specification.
                    * 
            * * - * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList search_result_list = 2; + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec.QueryRephraserSpec query_rephraser_spec = 2; * */ - public Builder mergeSearchResultList( - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList - value) { - if (searchResultListBuilder_ == null) { - if (inputCase_ == 2 - && input_ - != com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.getDefaultInstance()) { - input_ = - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.newBuilder( - (com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList) - input_) - .mergeFrom(value) - .buildPartial(); - } else { - input_ = value; - } - onChanged(); + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec + .QueryRephraserSpecOrBuilder + getQueryRephraserSpecOrBuilder() { + if (queryRephraserSpecBuilder_ != null) { + return queryRephraserSpecBuilder_.getMessageOrBuilder(); } else { - if (inputCase_ == 2) { - searchResultListBuilder_.mergeFrom(value); - } else { - searchResultListBuilder_.setMessage(value); - } + return queryRephraserSpec_ == null + ? com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec + .QueryRephraserSpec.getDefaultInstance() + : queryRephraserSpec_; } - inputCase_ = 2; - return this; } /** * * *
            -       * Search result list.
            +       * Query rephraser specification.
                    * 
            * * - * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList search_result_list = 2; + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec.QueryRephraserSpec query_rephraser_spec = 2; * */ - public Builder clearSearchResultList() { - if (searchResultListBuilder_ == null) { - if (inputCase_ == 2) { - inputCase_ = 0; - input_ = null; - onChanged(); - } - } else { - if (inputCase_ == 2) { - inputCase_ = 0; - input_ = null; - } - searchResultListBuilder_.clear(); + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec + .QueryRephraserSpec, + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec + .QueryRephraserSpec.Builder, + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec + .QueryRephraserSpecOrBuilder> + internalGetQueryRephraserSpecFieldBuilder() { + if (queryRephraserSpecBuilder_ == null) { + queryRephraserSpecBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec + .QueryRephraserSpec, + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec + .QueryRephraserSpec.Builder, + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec + .QueryRephraserSpecOrBuilder>( + getQueryRephraserSpec(), getParentForChildren(), isClean()); + queryRephraserSpec_ = null; } - return this; + return queryRephraserSpecBuilder_; } + private boolean disableSpellCorrection_; + /** * * *
            -       * Search result list.
            +       * Optional. Whether to disable spell correction.
            +       * The default value is `false`.
                    * 
            * - * - * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList search_result_list = 2; - * + * bool disable_spell_correction = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The disableSpellCorrection. */ - public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList - .Builder - getSearchResultListBuilder() { - return internalGetSearchResultListFieldBuilder().getBuilder(); + @java.lang.Override + public boolean getDisableSpellCorrection() { + return disableSpellCorrection_; } /** * * *
            -       * Search result list.
            +       * Optional. Whether to disable spell correction.
            +       * The default value is `false`.
                    * 
            * - * - * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList search_result_list = 2; - * + * bool disable_spell_correction = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The disableSpellCorrection to set. + * @return This builder for chaining. */ - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultListOrBuilder - getSearchResultListOrBuilder() { - if ((inputCase_ == 2) && (searchResultListBuilder_ != null)) { - return searchResultListBuilder_.getMessageOrBuilder(); - } else { - if (inputCase_ == 2) { - return (com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList) - input_; - } - return com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.getDefaultInstance(); - } + public Builder setDisableSpellCorrection(boolean value) { + + disableSpellCorrection_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; } /** * * *
            -       * Search result list.
            +       * Optional. Whether to disable spell correction.
            +       * The default value is `false`.
                    * 
            * - * - * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList search_result_list = 2; - * + * bool disable_spell_correction = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList, - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList - .Builder, - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultListOrBuilder> - internalGetSearchResultListFieldBuilder() { - if (searchResultListBuilder_ == null) { - if (!(inputCase_ == 2)) { - input_ = - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.getDefaultInstance(); - } - searchResultListBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList, - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList.Builder, - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultListOrBuilder>( - (com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec - .SearchResultList) - input_, - getParentForChildren(), - isClean()); - input_ = null; - } - inputCase_ = 2; + public Builder clearDisableSpellCorrection() { + bitField0_ = (bitField0_ & ~0x00000004); + disableSpellCorrection_ = false; onChanged(); - return searchResultListBuilder_; + return this; } - // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec) + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec) } - // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec) - private static final com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec) + private static final com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest + .QueryUnderstandingSpec DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = - new com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec(); + new com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec(); } - public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec getDefaultInstance() { return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { @java.lang.Override - public SearchSpec parsePartialFrom( + public QueryUnderstandingSpec parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { @@ -21035,136 +28764,114 @@ public SearchSpec parsePartialFrom( } }; - public static com.google.protobuf.Parser parser() { + public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override - public com.google.protobuf.Parser getParserForType() { + public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } - public interface QueryUnderstandingSpecOrBuilder + public interface EndUserSpecOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec) + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec) com.google.protobuf.MessageOrBuilder { /** * * *
            -     * Query classification specification.
            -     * 
            - * - * - * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec.QueryClassificationSpec query_classification_spec = 1; - * - * - * @return Whether the queryClassificationSpec field is set. - */ - boolean hasQueryClassificationSpec(); - - /** - * - * - *
            -     * Query classification specification.
            +     * Optional. End user metadata.
                  * 
            * * - * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec.QueryClassificationSpec query_classification_spec = 1; + * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec.EndUserMetaData end_user_metadata = 1 [(.google.api.field_behavior) = OPTIONAL]; * - * - * @return The queryClassificationSpec. */ - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec - .QueryClassificationSpec - getQueryClassificationSpec(); + java.util.List< + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec.EndUserMetaData> + getEndUserMetadataList(); /** * * *
            -     * Query classification specification.
            +     * Optional. End user metadata.
                  * 
            * * - * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec.QueryClassificationSpec query_classification_spec = 1; + * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec.EndUserMetaData end_user_metadata = 1 [(.google.api.field_behavior) = OPTIONAL]; * */ - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec - .QueryClassificationSpecOrBuilder - getQueryClassificationSpecOrBuilder(); + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec.EndUserMetaData + getEndUserMetadata(int index); /** * * *
            -     * Query rephraser specification.
            +     * Optional. End user metadata.
                  * 
            * * - * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec.QueryRephraserSpec query_rephraser_spec = 2; + * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec.EndUserMetaData end_user_metadata = 1 [(.google.api.field_behavior) = OPTIONAL]; * - * - * @return Whether the queryRephraserSpec field is set. */ - boolean hasQueryRephraserSpec(); + int getEndUserMetadataCount(); /** * * *
            -     * Query rephraser specification.
            +     * Optional. End user metadata.
                  * 
            * * - * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec.QueryRephraserSpec query_rephraser_spec = 2; + * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec.EndUserMetaData end_user_metadata = 1 [(.google.api.field_behavior) = OPTIONAL]; * - * - * @return The queryRephraserSpec. */ - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec - .QueryRephraserSpec - getQueryRephraserSpec(); + java.util.List< + ? extends + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec + .EndUserMetaDataOrBuilder> + getEndUserMetadataOrBuilderList(); /** * * *
            -     * Query rephraser specification.
            +     * Optional. End user metadata.
                  * 
            * * - * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec.QueryRephraserSpec query_rephraser_spec = 2; + * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec.EndUserMetaData end_user_metadata = 1 [(.google.api.field_behavior) = OPTIONAL]; * */ - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec - .QueryRephraserSpecOrBuilder - getQueryRephraserSpecOrBuilder(); + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec.EndUserMetaDataOrBuilder + getEndUserMetadataOrBuilder(int index); } /** * * *
            -   * Query understanding specification.
            +   * End user specification.
                * 
            * - * Protobuf type {@code - * google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec} + * Protobuf type {@code google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec} */ - public static final class QueryUnderstandingSpec extends com.google.protobuf.GeneratedMessage + public static final class EndUserSpec extends com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec) - QueryUnderstandingSpecOrBuilder { + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec) + EndUserSpecOrBuilder { private static final long serialVersionUID = 0L; static { @@ -21174,135 +28881,104 @@ public static final class QueryUnderstandingSpec extends com.google.protobuf.Gen /* minor= */ 33, /* patch= */ 2, /* suffix= */ "", - "QueryUnderstandingSpec"); + "EndUserSpec"); } - // Use QueryUnderstandingSpec.newBuilder() to construct. - private QueryUnderstandingSpec(com.google.protobuf.GeneratedMessage.Builder builder) { + // Use EndUserSpec.newBuilder() to construct. + private EndUserSpec(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } - private QueryUnderstandingSpec() {} + private EndUserSpec() { + endUserMetadata_ = java.util.Collections.emptyList(); + } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.discoveryengine.v1beta.ConversationalSearchServiceProto - .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_QueryUnderstandingSpec_descriptor; + .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_EndUserSpec_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.discoveryengine.v1beta.ConversationalSearchServiceProto - .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_QueryUnderstandingSpec_fieldAccessorTable + .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_EndUserSpec_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec - .class, - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec - .Builder.class); + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec.class, + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec.Builder.class); } - public interface QueryClassificationSpecOrBuilder + public interface EndUserMetaDataOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec.QueryClassificationSpec) + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec.EndUserMetaData) com.google.protobuf.MessageOrBuilder { /** * * *
            -       * Enabled query classification types.
            -       * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec.QueryClassificationSpec.Type types = 1; - * - * - * @return A list containing the types. - */ - java.util.List< - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec - .QueryClassificationSpec.Type> - getTypesList(); - - /** - * - * - *
            -       * Enabled query classification types.
            +       * Chunk information.
                    * 
            * * - * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec.QueryClassificationSpec.Type types = 1; + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec.EndUserMetaData.ChunkInfo chunk_info = 1; * * - * @return The count of types. + * @return Whether the chunkInfo field is set. */ - int getTypesCount(); + boolean hasChunkInfo(); /** * * *
            -       * Enabled query classification types.
            +       * Chunk information.
                    * 
            * * - * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec.QueryClassificationSpec.Type types = 1; + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec.EndUserMetaData.ChunkInfo chunk_info = 1; * * - * @param index The index of the element to return. - * @return The types at the given index. + * @return The chunkInfo. */ - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec - .QueryClassificationSpec.Type - getTypes(int index); + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec.EndUserMetaData + .ChunkInfo + getChunkInfo(); /** * * *
            -       * Enabled query classification types.
            +       * Chunk information.
                    * 
            * * - * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec.QueryClassificationSpec.Type types = 1; + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec.EndUserMetaData.ChunkInfo chunk_info = 1; * - * - * @return A list containing the enum numeric values on the wire for types. */ - java.util.List getTypesValueList(); + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec.EndUserMetaData + .ChunkInfoOrBuilder + getChunkInfoOrBuilder(); - /** - * - * - *
            -       * Enabled query classification types.
            -       * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec.QueryClassificationSpec.Type types = 1; - * - * - * @param index The index of the value to return. - * @return The enum numeric value on the wire of types at the given index. - */ - int getTypesValue(int index); + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec.EndUserMetaData + .ContentCase + getContentCase(); } /** * * *
            -     * Query classification specification.
            +     * End user metadata.
                  * 
            * * Protobuf type {@code - * google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec.QueryClassificationSpec} + * google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec.EndUserMetaData} */ - public static final class QueryClassificationSpec extends com.google.protobuf.GeneratedMessage + public static final class EndUserMetaData extends com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec.QueryClassificationSpec) - QueryClassificationSpecOrBuilder { + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec.EndUserMetaData) + EndUserMetaDataOrBuilder { private static final long serialVersionUID = 0L; static { @@ -21312,98 +28988,127 @@ public static final class QueryClassificationSpec extends com.google.protobuf.Ge /* minor= */ 33, /* patch= */ 2, /* suffix= */ "", - "QueryClassificationSpec"); + "EndUserMetaData"); } - // Use QueryClassificationSpec.newBuilder() to construct. - private QueryClassificationSpec(com.google.protobuf.GeneratedMessage.Builder builder) { + // Use EndUserMetaData.newBuilder() to construct. + private EndUserMetaData(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } - private QueryClassificationSpec() { - types_ = emptyIntList(); - } + private EndUserMetaData() {} public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.discoveryengine.v1beta.ConversationalSearchServiceProto - .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_QueryUnderstandingSpec_QueryClassificationSpec_descriptor; + .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_EndUserSpec_EndUserMetaData_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.discoveryengine.v1beta.ConversationalSearchServiceProto - .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_QueryUnderstandingSpec_QueryClassificationSpec_fieldAccessorTable + .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_EndUserSpec_EndUserMetaData_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec - .QueryClassificationSpec.class, - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec - .QueryClassificationSpec.Builder.class); + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec + .EndUserMetaData.class, + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec + .EndUserMetaData.Builder.class); } - /** - * - * - *
            -       * Query classification types.
            -       * 
            - * - * Protobuf enum {@code - * google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec.QueryClassificationSpec.Type} - */ - public enum Type implements com.google.protobuf.ProtocolMessageEnum { + public interface ChunkInfoOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec.EndUserMetaData.ChunkInfo) + com.google.protobuf.MessageOrBuilder { + /** * * *
            -         * Unspecified query classification type.
            +         * Chunk textual content. It is limited to 8000 characters.
                      * 
            * - * TYPE_UNSPECIFIED = 0; + * string content = 1; + * + * @return The content. */ - TYPE_UNSPECIFIED(0), + java.lang.String getContent(); + /** * * *
            -         * Adversarial query classification type.
            +         * Chunk textual content. It is limited to 8000 characters.
                      * 
            * - * ADVERSARIAL_QUERY = 1; + * string content = 1; + * + * @return The bytes for content. */ - ADVERSARIAL_QUERY(1), + com.google.protobuf.ByteString getContentBytes(); + /** * * *
            -         * Non-answer-seeking query classification type, for chit chat.
            +         * Metadata of the document from the current chunk.
                      * 
            * - * NON_ANSWER_SEEKING_QUERY = 2; + * + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec.EndUserMetaData.ChunkInfo.DocumentMetadata document_metadata = 2; + * + * + * @return Whether the documentMetadata field is set. */ - NON_ANSWER_SEEKING_QUERY(2), + boolean hasDocumentMetadata(); + /** * * *
            -         * Jail-breaking query classification type.
            +         * Metadata of the document from the current chunk.
                      * 
            * - * JAIL_BREAKING_QUERY = 3; + * + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec.EndUserMetaData.ChunkInfo.DocumentMetadata document_metadata = 2; + * + * + * @return The documentMetadata. */ - JAIL_BREAKING_QUERY(3), + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec.EndUserMetaData + .ChunkInfo.DocumentMetadata + getDocumentMetadata(); + /** * * *
            -         * Non-answer-seeking query classification type, for no clear intent.
            +         * Metadata of the document from the current chunk.
                      * 
            * - * NON_ANSWER_SEEKING_QUERY_V2 = 4; + * + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec.EndUserMetaData.ChunkInfo.DocumentMetadata document_metadata = 2; + * */ - NON_ANSWER_SEEKING_QUERY_V2(4), - UNRECOGNIZED(-1), - ; + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec.EndUserMetaData + .ChunkInfo.DocumentMetadataOrBuilder + getDocumentMetadataOrBuilder(); + } + + /** + * + * + *
            +       * Chunk information.
            +       * 
            + * + * Protobuf type {@code + * google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec.EndUserMetaData.ChunkInfo} + */ + public static final class ChunkInfo extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec.EndUserMetaData.ChunkInfo) + ChunkInfoOrBuilder { + private static final long serialVersionUID = 0L; static { com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( @@ -21412,1149 +29117,1792 @@ public enum Type implements com.google.protobuf.ProtocolMessageEnum { /* minor= */ 33, /* patch= */ 2, /* suffix= */ "", - "Type"); + "ChunkInfo"); } - /** - * - * - *
            -         * Unspecified query classification type.
            -         * 
            - * - * TYPE_UNSPECIFIED = 0; - */ - public static final int TYPE_UNSPECIFIED_VALUE = 0; + // Use ChunkInfo.newBuilder() to construct. + private ChunkInfo(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } - /** - * - * - *
            -         * Adversarial query classification type.
            -         * 
            - * - * ADVERSARIAL_QUERY = 1; - */ - public static final int ADVERSARIAL_QUERY_VALUE = 1; + private ChunkInfo() { + content_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.ConversationalSearchServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_EndUserSpec_EndUserMetaData_ChunkInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.ConversationalSearchServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_EndUserSpec_EndUserMetaData_ChunkInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec + .EndUserMetaData.ChunkInfo.class, + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec + .EndUserMetaData.ChunkInfo.Builder.class); + } + + public interface DocumentMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec.EndUserMetaData.ChunkInfo.DocumentMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
            +           * Title of the document.
            +           * 
            + * + * string title = 1; + * + * @return The title. + */ + java.lang.String getTitle(); + + /** + * + * + *
            +           * Title of the document.
            +           * 
            + * + * string title = 1; + * + * @return The bytes for title. + */ + com.google.protobuf.ByteString getTitleBytes(); + } /** * * *
            -         * Non-answer-seeking query classification type, for chit chat.
            +         * Document metadata contains the information of the document of
            +         * the current chunk.
                      * 
            * - * NON_ANSWER_SEEKING_QUERY = 2; + * Protobuf type {@code + * google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec.EndUserMetaData.ChunkInfo.DocumentMetadata} */ - public static final int NON_ANSWER_SEEKING_QUERY_VALUE = 2; + public static final class DocumentMetadata extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec.EndUserMetaData.ChunkInfo.DocumentMetadata) + DocumentMetadataOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "DocumentMetadata"); + } + + // Use DocumentMetadata.newBuilder() to construct. + private DocumentMetadata(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private DocumentMetadata() { + title_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.ConversationalSearchServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_EndUserSpec_EndUserMetaData_ChunkInfo_DocumentMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.ConversationalSearchServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_EndUserSpec_EndUserMetaData_ChunkInfo_DocumentMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec + .EndUserMetaData.ChunkInfo.DocumentMetadata.class, + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec + .EndUserMetaData.ChunkInfo.DocumentMetadata.Builder.class); + } + + public static final int TITLE_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object title_ = ""; + + /** + * + * + *
            +           * Title of the document.
            +           * 
            + * + * string title = 1; + * + * @return The title. + */ + @java.lang.Override + public java.lang.String getTitle() { + java.lang.Object ref = title_; + 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(); + title_ = s; + return s; + } + } + + /** + * + * + *
            +           * Title of the document.
            +           * 
            + * + * string title = 1; + * + * @return The bytes for title. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTitleBytes() { + java.lang.Object ref = title_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + title_ = 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 { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(title_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, title_); + } + 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(title_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, title_); + } + 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.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec + .EndUserMetaData.ChunkInfo.DocumentMetadata)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec.EndUserMetaData + .ChunkInfo.DocumentMetadata + other = + (com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec + .EndUserMetaData.ChunkInfo.DocumentMetadata) + obj; + + if (!getTitle().equals(other.getTitle())) 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) + TITLE_FIELD_NUMBER; + hash = (53 * hash) + getTitle().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec + .EndUserMetaData.ChunkInfo.DocumentMetadata + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec + .EndUserMetaData.ChunkInfo.DocumentMetadata + parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - /** - * - * - *
            -         * Jail-breaking query classification type.
            -         * 
            - * - * JAIL_BREAKING_QUERY = 3; - */ - public static final int JAIL_BREAKING_QUERY_VALUE = 3; + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec + .EndUserMetaData.ChunkInfo.DocumentMetadata + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - /** - * - * - *
            -         * Non-answer-seeking query classification type, for no clear intent.
            -         * 
            - * - * NON_ANSWER_SEEKING_QUERY_V2 = 4; - */ - public static final int NON_ANSWER_SEEKING_QUERY_V2_VALUE = 4; + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec + .EndUserMetaData.ChunkInfo.DocumentMetadata + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec + .EndUserMetaData.ChunkInfo.DocumentMetadata + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); } - 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 Type valueOf(int value) { - return forNumber(value); - } + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec + .EndUserMetaData.ChunkInfo.DocumentMetadata + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static Type forNumber(int value) { - switch (value) { - case 0: - return TYPE_UNSPECIFIED; - case 1: - return ADVERSARIAL_QUERY; - case 2: - return NON_ANSWER_SEEKING_QUERY; - case 3: - return JAIL_BREAKING_QUERY; - case 4: - return NON_ANSWER_SEEKING_QUERY_V2; - default: - return null; + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec + .EndUserMetaData.ChunkInfo.DocumentMetadata + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } - } - public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { - return internalValueMap; - } + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec + .EndUserMetaData.ChunkInfo.DocumentMetadata + parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } - private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public Type findValueByNumber(int number) { - return Type.forNumber(number); - } - }; + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec + .EndUserMetaData.ChunkInfo.DocumentMetadata + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input); + } - public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec + .EndUserMetaData.ChunkInfo.DocumentMetadata + parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); } - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { - return getDescriptor(); - } + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec + .EndUserMetaData.ChunkInfo.DocumentMetadata + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } - public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { - return com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec - .QueryClassificationSpec.getDescriptor() - .getEnumTypes() - .get(0); - } + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec + .EndUserMetaData.ChunkInfo.DocumentMetadata + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } - private static final Type[] VALUES = values(); + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } - public static Type valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; + + public static Builder newBuilder( + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec.EndUserMetaData + .ChunkInfo.DocumentMetadata + prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } - return VALUES[desc.getIndex()]; - } - private final int value; + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } - private Type(int value) { - this.value = value; - } + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
            +           * Document metadata contains the information of the document of
            +           * the current chunk.
            +           * 
            + * + * Protobuf type {@code + * google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec.EndUserMetaData.ChunkInfo.DocumentMetadata} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec.EndUserMetaData.ChunkInfo.DocumentMetadata) + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec.EndUserMetaData + .ChunkInfo.DocumentMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.ConversationalSearchServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_EndUserSpec_EndUserMetaData_ChunkInfo_DocumentMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.ConversationalSearchServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_EndUserSpec_EndUserMetaData_ChunkInfo_DocumentMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec + .EndUserMetaData.ChunkInfo.DocumentMetadata.class, + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec + .EndUserMetaData.ChunkInfo.DocumentMetadata.Builder.class); + } + + // Construct using + // com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec.EndUserMetaData.ChunkInfo.DocumentMetadata.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + title_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1beta.ConversationalSearchServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_EndUserSpec_EndUserMetaData_ChunkInfo_DocumentMetadata_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec + .EndUserMetaData.ChunkInfo.DocumentMetadata + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec + .EndUserMetaData.ChunkInfo.DocumentMetadata.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec + .EndUserMetaData.ChunkInfo.DocumentMetadata + build() { + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec.EndUserMetaData + .ChunkInfo.DocumentMetadata + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec + .EndUserMetaData.ChunkInfo.DocumentMetadata + buildPartial() { + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec.EndUserMetaData + .ChunkInfo.DocumentMetadata + result = + new com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec + .EndUserMetaData.ChunkInfo.DocumentMetadata(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec + .EndUserMetaData.ChunkInfo.DocumentMetadata + result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.title_ = title_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec + .EndUserMetaData.ChunkInfo.DocumentMetadata) { + return mergeFrom( + (com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec + .EndUserMetaData.ChunkInfo.DocumentMetadata) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec + .EndUserMetaData.ChunkInfo.DocumentMetadata + other) { + if (other + == com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec + .EndUserMetaData.ChunkInfo.DocumentMetadata.getDefaultInstance()) return this; + if (!other.getTitle().isEmpty()) { + title_ = other.title_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } - // @@protoc_insertion_point(enum_scope:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec.QueryClassificationSpec.Type) - } + @java.lang.Override + public final boolean isInitialized() { + return true; + } - public static final int TYPES_FIELD_NUMBER = 1; + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + title_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } - @SuppressWarnings("serial") - private com.google.protobuf.Internal.IntList types_ = emptyIntList(); + private int bitField0_; - private static final com.google.protobuf.Internal.IntListAdapter.IntConverter< - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec - .QueryClassificationSpec.Type> - types_converter_ = - new com.google.protobuf.Internal.IntListAdapter.IntConverter< - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec - .QueryClassificationSpec.Type>() { - public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest - .QueryUnderstandingSpec.QueryClassificationSpec.Type - convert(int from) { - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec - .QueryClassificationSpec.Type - result = - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest - .QueryUnderstandingSpec.QueryClassificationSpec.Type.forNumber(from); - return result == null - ? com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest - .QueryUnderstandingSpec.QueryClassificationSpec.Type.UNRECOGNIZED - : result; - } - }; + private java.lang.Object title_ = ""; - /** - * - * - *
            -       * Enabled query classification types.
            -       * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec.QueryClassificationSpec.Type types = 1; - * - * - * @return A list containing the types. - */ - @java.lang.Override - public java.util.List< - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec - .QueryClassificationSpec.Type> - getTypesList() { - return new com.google.protobuf.Internal.IntListAdapter< - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec - .QueryClassificationSpec.Type>(types_, types_converter_); - } + /** + * + * + *
            +             * Title of the document.
            +             * 
            + * + * string title = 1; + * + * @return The title. + */ + public java.lang.String getTitle() { + java.lang.Object ref = title_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + title_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } - /** - * - * - *
            -       * Enabled query classification types.
            -       * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec.QueryClassificationSpec.Type types = 1; - * - * - * @return The count of types. - */ - @java.lang.Override - public int getTypesCount() { - return types_.size(); - } + /** + * + * + *
            +             * Title of the document.
            +             * 
            + * + * string title = 1; + * + * @return The bytes for title. + */ + public com.google.protobuf.ByteString getTitleBytes() { + java.lang.Object ref = title_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + title_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } - /** - * - * - *
            -       * Enabled query classification types.
            -       * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec.QueryClassificationSpec.Type types = 1; - * - * - * @param index The index of the element to return. - * @return The types at the given index. - */ - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec - .QueryClassificationSpec.Type - getTypes(int index) { - return types_converter_.convert(types_.getInt(index)); - } + /** + * + * + *
            +             * Title of the document.
            +             * 
            + * + * string title = 1; + * + * @param value The title to set. + * @return This builder for chaining. + */ + public Builder setTitle(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + title_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } - /** - * - * - *
            -       * Enabled query classification types.
            -       * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec.QueryClassificationSpec.Type types = 1; - * - * - * @return A list containing the enum numeric values on the wire for types. - */ - @java.lang.Override - public java.util.List getTypesValueList() { - return types_; - } + /** + * + * + *
            +             * Title of the document.
            +             * 
            + * + * string title = 1; + * + * @return This builder for chaining. + */ + public Builder clearTitle() { + title_ = getDefaultInstance().getTitle(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } - /** - * - * - *
            -       * Enabled query classification types.
            -       * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec.QueryClassificationSpec.Type types = 1; - * - * - * @param index The index of the value to return. - * @return The enum numeric value on the wire of types at the given index. - */ - @java.lang.Override - public int getTypesValue(int index) { - return types_.getInt(index); - } + /** + * + * + *
            +             * Title of the document.
            +             * 
            + * + * string title = 1; + * + * @param value The bytes for title to set. + * @return This builder for chaining. + */ + public Builder setTitleBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + title_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } - private int typesMemoizedSerializedSize; + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec.EndUserMetaData.ChunkInfo.DocumentMetadata) + } - private byte memoizedIsInitialized = -1; + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec.EndUserMetaData.ChunkInfo.DocumentMetadata) + private static final com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest + .EndUserSpec.EndUserMetaData.ChunkInfo.DocumentMetadata + DEFAULT_INSTANCE; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + static { + DEFAULT_INSTANCE = + new com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec + .EndUserMetaData.ChunkInfo.DocumentMetadata(); + } - memoizedIsInitialized = 1; - return true; - } + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec + .EndUserMetaData.ChunkInfo.DocumentMetadata + getDefaultInstance() { + return DEFAULT_INSTANCE; + } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - getSerializedSize(); - if (getTypesList().size() > 0) { - output.writeUInt32NoTag(10); - output.writeUInt32NoTag(typesMemoizedSerializedSize); - } - for (int i = 0; i < types_.size(); i++) { - output.writeEnumNoTag(types_.getInt(i)); - } - getUnknownFields().writeTo(output); - } + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DocumentMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; + public static com.google.protobuf.Parser parser() { + return PARSER; + } - size = 0; - { - int dataSize = 0; - for (int i = 0; i < types_.size(); i++) { - dataSize += - com.google.protobuf.CodedOutputStream.computeEnumSizeNoTag(types_.getInt(i)); + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; } - size += dataSize; - if (!getTypesList().isEmpty()) { - size += 1; - size += com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(dataSize); + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec + .EndUserMetaData.ChunkInfo.DocumentMetadata + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; } - typesMemoizedSerializedSize = dataSize; } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; + private int bitField0_; + public static final int CONTENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object content_ = ""; + + /** + * + * + *
            +         * Chunk textual content. It is limited to 8000 characters.
            +         * 
            + * + * string content = 1; + * + * @return The content. + */ + @java.lang.Override + public java.lang.String getContent() { + java.lang.Object ref = content_; + 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(); + content_ = s; + return s; + } } - if (!(obj - instanceof - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec - .QueryClassificationSpec)) { - return super.equals(obj); + + /** + * + * + *
            +         * Chunk textual content. It is limited to 8000 characters.
            +         * 
            + * + * string content = 1; + * + * @return The bytes for content. + */ + @java.lang.Override + public com.google.protobuf.ByteString getContentBytes() { + java.lang.Object ref = content_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + content_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } } - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec - .QueryClassificationSpec - other = - (com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec - .QueryClassificationSpec) - obj; - if (!types_.equals(other.types_)) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } + public static final int DOCUMENT_METADATA_FIELD_NUMBER = 2; + private com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec + .EndUserMetaData.ChunkInfo.DocumentMetadata + documentMetadata_; - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; + /** + * + * + *
            +         * Metadata of the document from the current chunk.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec.EndUserMetaData.ChunkInfo.DocumentMetadata document_metadata = 2; + * + * + * @return Whether the documentMetadata field is set. + */ + @java.lang.Override + public boolean hasDocumentMetadata() { + return ((bitField0_ & 0x00000001) != 0); } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getTypesCount() > 0) { - hash = (37 * hash) + TYPES_FIELD_NUMBER; - hash = (53 * hash) + types_.hashCode(); + + /** + * + * + *
            +         * Metadata of the document from the current chunk.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec.EndUserMetaData.ChunkInfo.DocumentMetadata document_metadata = 2; + * + * + * @return The documentMetadata. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec + .EndUserMetaData.ChunkInfo.DocumentMetadata + getDocumentMetadata() { + return documentMetadata_ == null + ? com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec + .EndUserMetaData.ChunkInfo.DocumentMetadata.getDefaultInstance() + : documentMetadata_; } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest - .QueryUnderstandingSpec.QueryClassificationSpec - parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } + /** + * + * + *
            +         * Metadata of the document from the current chunk.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec.EndUserMetaData.ChunkInfo.DocumentMetadata document_metadata = 2; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec + .EndUserMetaData.ChunkInfo.DocumentMetadataOrBuilder + getDocumentMetadataOrBuilder() { + return documentMetadata_ == null + ? com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec + .EndUserMetaData.ChunkInfo.DocumentMetadata.getDefaultInstance() + : documentMetadata_; + } - public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest - .QueryUnderstandingSpec.QueryClassificationSpec - parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } + private byte memoizedIsInitialized = -1; - public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest - .QueryUnderstandingSpec.QueryClassificationSpec - parseFrom(com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; - public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest - .QueryUnderstandingSpec.QueryClassificationSpec - parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } + memoizedIsInitialized = 1; + return true; + } - public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest - .QueryUnderstandingSpec.QueryClassificationSpec - parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(content_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, content_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getDocumentMetadata()); + } + 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(content_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, content_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(2, getDocumentMetadata()); + } + 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.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec.EndUserMetaData + .ChunkInfo)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec.EndUserMetaData + .ChunkInfo + other = + (com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec + .EndUserMetaData.ChunkInfo) + obj; - public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest - .QueryUnderstandingSpec.QueryClassificationSpec - parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } + if (!getContent().equals(other.getContent())) return false; + if (hasDocumentMetadata() != other.hasDocumentMetadata()) return false; + if (hasDocumentMetadata()) { + if (!getDocumentMetadata().equals(other.getDocumentMetadata())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } - public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest - .QueryUnderstandingSpec.QueryClassificationSpec - parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + CONTENT_FIELD_NUMBER; + hash = (53 * hash) + getContent().hashCode(); + if (hasDocumentMetadata()) { + hash = (37 * hash) + DOCUMENT_METADATA_FIELD_NUMBER; + hash = (53 * hash) + getDocumentMetadata().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } - public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest - .QueryUnderstandingSpec.QueryClassificationSpec - 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.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec + .EndUserMetaData.ChunkInfo + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest - .QueryUnderstandingSpec.QueryClassificationSpec - parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec + .EndUserMetaData.ChunkInfo + 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.discoveryengine.v1beta.AnswerQueryRequest - .QueryUnderstandingSpec.QueryClassificationSpec - 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.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec + .EndUserMetaData.ChunkInfo + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest - .QueryUnderstandingSpec.QueryClassificationSpec - parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec + .EndUserMetaData.ChunkInfo + 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.discoveryengine.v1beta.AnswerQueryRequest - .QueryUnderstandingSpec.QueryClassificationSpec - parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec + .EndUserMetaData.ChunkInfo + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec + .EndUserMetaData.ChunkInfo + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec + .EndUserMetaData.ChunkInfo + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } - public static Builder newBuilder( - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec - .QueryClassificationSpec - prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec + .EndUserMetaData.ChunkInfo + parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec + .EndUserMetaData.ChunkInfo + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec + .EndUserMetaData.ChunkInfo + parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } - /** - * - * - *
            -       * Query classification specification.
            -       * 
            - * - * Protobuf type {@code - * google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec.QueryClassificationSpec} - */ - public static final class Builder - extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec.QueryClassificationSpec) - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec - .QueryClassificationSpecOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.discoveryengine.v1beta.ConversationalSearchServiceProto - .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_QueryUnderstandingSpec_QueryClassificationSpec_descriptor; + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec + .EndUserMetaData.ChunkInfo + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec + .EndUserMetaData.ChunkInfo + 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 - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.discoveryengine.v1beta.ConversationalSearchServiceProto - .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_QueryUnderstandingSpec_QueryClassificationSpec_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec - .QueryClassificationSpec.class, - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec - .QueryClassificationSpec.Builder.class); + public Builder newBuilderForType() { + return newBuilder(); } - // Construct using - // com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec.QueryClassificationSpec.newBuilder() - private Builder() {} + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); + public static Builder newBuilder( + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec.EndUserMetaData + .ChunkInfo + prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - types_ = emptyIntList(); - return this; + 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; } - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.discoveryengine.v1beta.ConversationalSearchServiceProto - .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_QueryUnderstandingSpec_QueryClassificationSpec_descriptor; - } + /** + * + * + *
            +         * Chunk information.
            +         * 
            + * + * Protobuf type {@code + * google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec.EndUserMetaData.ChunkInfo} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec.EndUserMetaData.ChunkInfo) + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec.EndUserMetaData + .ChunkInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.ConversationalSearchServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_EndUserSpec_EndUserMetaData_ChunkInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.ConversationalSearchServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_EndUserSpec_EndUserMetaData_ChunkInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec + .EndUserMetaData.ChunkInfo.class, + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec + .EndUserMetaData.ChunkInfo.Builder.class); + } + + // Construct using + // com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec.EndUserMetaData.ChunkInfo.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetDocumentMetadataFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + content_ = ""; + documentMetadata_ = null; + if (documentMetadataBuilder_ != null) { + documentMetadataBuilder_.dispose(); + documentMetadataBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1beta.ConversationalSearchServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_EndUserSpec_EndUserMetaData_ChunkInfo_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec + .EndUserMetaData.ChunkInfo + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec + .EndUserMetaData.ChunkInfo.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec + .EndUserMetaData.ChunkInfo + build() { + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec.EndUserMetaData + .ChunkInfo + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec + .EndUserMetaData.ChunkInfo + buildPartial() { + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec.EndUserMetaData + .ChunkInfo + result = + new com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec + .EndUserMetaData.ChunkInfo(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec - .QueryClassificationSpec - getDefaultInstanceForType() { - return com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec - .QueryClassificationSpec.getDefaultInstance(); - } + private void buildPartial0( + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec.EndUserMetaData + .ChunkInfo + result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.content_ = content_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.documentMetadata_ = + documentMetadataBuilder_ == null + ? documentMetadata_ + : documentMetadataBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec - .QueryClassificationSpec - build() { - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec - .QueryClassificationSpec - result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec + .EndUserMetaData.ChunkInfo) { + return mergeFrom( + (com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec + .EndUserMetaData.ChunkInfo) + other); + } else { + super.mergeFrom(other); + return this; + } } - return result; - } - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec - .QueryClassificationSpec - buildPartial() { - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec - .QueryClassificationSpec - result = - new com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest - .QueryUnderstandingSpec.QueryClassificationSpec(this); - if (bitField0_ != 0) { - buildPartial0(result); + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec.EndUserMetaData + .ChunkInfo + other) { + if (other + == com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec + .EndUserMetaData.ChunkInfo.getDefaultInstance()) return this; + if (!other.getContent().isEmpty()) { + content_ = other.content_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasDocumentMetadata()) { + mergeDocumentMetadata(other.getDocumentMetadata()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; } - onBuilt(); - return result; - } - private void buildPartial0( - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec - .QueryClassificationSpec - result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - types_.makeImmutable(); - result.types_ = types_; + @java.lang.Override + public final boolean isInitialized() { + return true; } - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other - instanceof - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec - .QueryClassificationSpec) { - return mergeFrom( - (com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec - .QueryClassificationSpec) - other); - } else { - super.mergeFrom(other); + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + content_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage( + internalGetDocumentMetadataFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally return this; } - } - public Builder mergeFrom( - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec - .QueryClassificationSpec - other) { - if (other - == com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec - .QueryClassificationSpec.getDefaultInstance()) return this; - if (!other.types_.isEmpty()) { - if (types_.isEmpty()) { - types_ = other.types_; - types_.makeImmutable(); - bitField0_ |= 0x00000001; + private int bitField0_; + + private java.lang.Object content_ = ""; + + /** + * + * + *
            +           * Chunk textual content. It is limited to 8000 characters.
            +           * 
            + * + * string content = 1; + * + * @return The content. + */ + public java.lang.String getContent() { + java.lang.Object ref = content_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + content_ = s; + return s; } else { - ensureTypesIsMutable(); - types_.addAll(other.types_); + return (java.lang.String) ref; } - onChanged(); } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); + /** + * + * + *
            +           * Chunk textual content. It is limited to 8000 characters.
            +           * 
            + * + * string content = 1; + * + * @return The bytes for content. + */ + public com.google.protobuf.ByteString getContentBytes() { + java.lang.Object ref = content_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + content_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: - { - int tmpRaw = input.readEnum(); - ensureTypesIsMutable(); - types_.addInt(tmpRaw); - break; - } // case 8 - case 10: - { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - ensureTypesIsMutable(); - while (input.getBytesUntilLimit() > 0) { - types_.addInt(input.readEnum()); - } - input.popLimit(limit); - break; - } // case 10 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { + + /** + * + * + *
            +           * Chunk textual content. It is limited to 8000 characters.
            +           * 
            + * + * string content = 1; + * + * @param value The content to set. + * @return This builder for chaining. + */ + public Builder setContent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + content_ = value; + bitField0_ |= 0x00000001; onChanged(); - } // finally - return this; - } - - private int bitField0_; + return this; + } - private com.google.protobuf.Internal.IntList types_ = emptyIntList(); + /** + * + * + *
            +           * Chunk textual content. It is limited to 8000 characters.
            +           * 
            + * + * string content = 1; + * + * @return This builder for chaining. + */ + public Builder clearContent() { + content_ = getDefaultInstance().getContent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } - private void ensureTypesIsMutable() { - if (!types_.isModifiable()) { - types_ = makeMutableCopy(types_); + /** + * + * + *
            +           * Chunk textual content. It is limited to 8000 characters.
            +           * 
            + * + * string content = 1; + * + * @param value The bytes for content to set. + * @return This builder for chaining. + */ + public Builder setContentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + content_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; } - bitField0_ |= 0x00000001; - } - /** - * - * - *
            -         * Enabled query classification types.
            -         * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec.QueryClassificationSpec.Type types = 1; - * - * - * @return A list containing the types. - */ - public java.util.List< - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec - .QueryClassificationSpec.Type> - getTypesList() { - return new com.google.protobuf.Internal.IntListAdapter< - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec - .QueryClassificationSpec.Type>(types_, types_converter_); - } + private com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec + .EndUserMetaData.ChunkInfo.DocumentMetadata + documentMetadata_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec + .EndUserMetaData.ChunkInfo.DocumentMetadata, + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec + .EndUserMetaData.ChunkInfo.DocumentMetadata.Builder, + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec + .EndUserMetaData.ChunkInfo.DocumentMetadataOrBuilder> + documentMetadataBuilder_; - /** - * - * - *
            -         * Enabled query classification types.
            -         * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec.QueryClassificationSpec.Type types = 1; - * - * - * @return The count of types. - */ - public int getTypesCount() { - return types_.size(); - } + /** + * + * + *
            +           * Metadata of the document from the current chunk.
            +           * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec.EndUserMetaData.ChunkInfo.DocumentMetadata document_metadata = 2; + * + * + * @return Whether the documentMetadata field is set. + */ + public boolean hasDocumentMetadata() { + return ((bitField0_ & 0x00000002) != 0); + } - /** - * - * - *
            -         * Enabled query classification types.
            -         * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec.QueryClassificationSpec.Type types = 1; - * - * - * @param index The index of the element to return. - * @return The types at the given index. - */ - public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec - .QueryClassificationSpec.Type - getTypes(int index) { - return types_converter_.convert(types_.getInt(index)); - } + /** + * + * + *
            +           * Metadata of the document from the current chunk.
            +           * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec.EndUserMetaData.ChunkInfo.DocumentMetadata document_metadata = 2; + * + * + * @return The documentMetadata. + */ + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec + .EndUserMetaData.ChunkInfo.DocumentMetadata + getDocumentMetadata() { + if (documentMetadataBuilder_ == null) { + return documentMetadata_ == null + ? com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec + .EndUserMetaData.ChunkInfo.DocumentMetadata.getDefaultInstance() + : documentMetadata_; + } else { + return documentMetadataBuilder_.getMessage(); + } + } - /** - * - * - *
            -         * Enabled query classification types.
            -         * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec.QueryClassificationSpec.Type types = 1; - * - * - * @param index The index to set the value at. - * @param value The types to set. - * @return This builder for chaining. - */ - public Builder setTypes( - int index, - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec - .QueryClassificationSpec.Type - value) { - if (value == null) { - throw new NullPointerException(); + /** + * + * + *
            +           * Metadata of the document from the current chunk.
            +           * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec.EndUserMetaData.ChunkInfo.DocumentMetadata document_metadata = 2; + * + */ + public Builder setDocumentMetadata( + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec.EndUserMetaData + .ChunkInfo.DocumentMetadata + value) { + if (documentMetadataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + documentMetadata_ = value; + } else { + documentMetadataBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; } - ensureTypesIsMutable(); - types_.setInt(index, value.getNumber()); - onChanged(); - return this; - } - /** - * - * - *
            -         * Enabled query classification types.
            -         * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec.QueryClassificationSpec.Type types = 1; - * - * - * @param value The types to add. - * @return This builder for chaining. - */ - public Builder addTypes( - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec - .QueryClassificationSpec.Type - value) { - if (value == null) { - throw new NullPointerException(); + /** + * + * + *
            +           * Metadata of the document from the current chunk.
            +           * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec.EndUserMetaData.ChunkInfo.DocumentMetadata document_metadata = 2; + * + */ + public Builder setDocumentMetadata( + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec.EndUserMetaData + .ChunkInfo.DocumentMetadata.Builder + builderForValue) { + if (documentMetadataBuilder_ == null) { + documentMetadata_ = builderForValue.build(); + } else { + documentMetadataBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
            +           * Metadata of the document from the current chunk.
            +           * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec.EndUserMetaData.ChunkInfo.DocumentMetadata document_metadata = 2; + * + */ + public Builder mergeDocumentMetadata( + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec.EndUserMetaData + .ChunkInfo.DocumentMetadata + value) { + if (documentMetadataBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && documentMetadata_ != null + && documentMetadata_ + != com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec + .EndUserMetaData.ChunkInfo.DocumentMetadata.getDefaultInstance()) { + getDocumentMetadataBuilder().mergeFrom(value); + } else { + documentMetadata_ = value; + } + } else { + documentMetadataBuilder_.mergeFrom(value); + } + if (documentMetadata_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** + * + * + *
            +           * Metadata of the document from the current chunk.
            +           * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec.EndUserMetaData.ChunkInfo.DocumentMetadata document_metadata = 2; + * + */ + public Builder clearDocumentMetadata() { + bitField0_ = (bitField0_ & ~0x00000002); + documentMetadata_ = null; + if (documentMetadataBuilder_ != null) { + documentMetadataBuilder_.dispose(); + documentMetadataBuilder_ = null; + } + onChanged(); + return this; } - ensureTypesIsMutable(); - types_.addInt(value.getNumber()); - onChanged(); - return this; - } - /** - * - * - *
            -         * Enabled query classification types.
            -         * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec.QueryClassificationSpec.Type types = 1; - * - * - * @param values The types to add. - * @return This builder for chaining. - */ - public Builder addAllTypes( - java.lang.Iterable< - ? extends - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest - .QueryUnderstandingSpec.QueryClassificationSpec.Type> - values) { - ensureTypesIsMutable(); - for (com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec - .QueryClassificationSpec.Type - value : values) { - types_.addInt(value.getNumber()); + /** + * + * + *
            +           * Metadata of the document from the current chunk.
            +           * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec.EndUserMetaData.ChunkInfo.DocumentMetadata document_metadata = 2; + * + */ + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec + .EndUserMetaData.ChunkInfo.DocumentMetadata.Builder + getDocumentMetadataBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return internalGetDocumentMetadataFieldBuilder().getBuilder(); } - onChanged(); - return this; - } - /** - * - * - *
            -         * Enabled query classification types.
            -         * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec.QueryClassificationSpec.Type types = 1; - * - * - * @return This builder for chaining. - */ - public Builder clearTypes() { - types_ = emptyIntList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } + /** + * + * + *
            +           * Metadata of the document from the current chunk.
            +           * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec.EndUserMetaData.ChunkInfo.DocumentMetadata document_metadata = 2; + * + */ + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec + .EndUserMetaData.ChunkInfo.DocumentMetadataOrBuilder + getDocumentMetadataOrBuilder() { + if (documentMetadataBuilder_ != null) { + return documentMetadataBuilder_.getMessageOrBuilder(); + } else { + return documentMetadata_ == null + ? com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec + .EndUserMetaData.ChunkInfo.DocumentMetadata.getDefaultInstance() + : documentMetadata_; + } + } - /** - * - * - *
            -         * Enabled query classification types.
            -         * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec.QueryClassificationSpec.Type types = 1; - * - * - * @return A list containing the enum numeric values on the wire for types. - */ - public java.util.List getTypesValueList() { - types_.makeImmutable(); - return types_; - } + /** + * + * + *
            +           * Metadata of the document from the current chunk.
            +           * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec.EndUserMetaData.ChunkInfo.DocumentMetadata document_metadata = 2; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec + .EndUserMetaData.ChunkInfo.DocumentMetadata, + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec + .EndUserMetaData.ChunkInfo.DocumentMetadata.Builder, + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec + .EndUserMetaData.ChunkInfo.DocumentMetadataOrBuilder> + internalGetDocumentMetadataFieldBuilder() { + if (documentMetadataBuilder_ == null) { + documentMetadataBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec + .EndUserMetaData.ChunkInfo.DocumentMetadata, + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec + .EndUserMetaData.ChunkInfo.DocumentMetadata.Builder, + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec + .EndUserMetaData.ChunkInfo.DocumentMetadataOrBuilder>( + getDocumentMetadata(), getParentForChildren(), isClean()); + documentMetadata_ = null; + } + return documentMetadataBuilder_; + } - /** - * - * - *
            -         * Enabled query classification types.
            -         * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec.QueryClassificationSpec.Type types = 1; - * - * - * @param index The index of the value to return. - * @return The enum numeric value on the wire of types at the given index. - */ - public int getTypesValue(int index) { - return types_.getInt(index); + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec.EndUserMetaData.ChunkInfo) } - /** - * - * - *
            -         * Enabled query classification types.
            -         * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec.QueryClassificationSpec.Type types = 1; - * - * - * @param index The index to set the value at. - * @param value The enum numeric value on the wire for types to set. - * @return This builder for chaining. - */ - public Builder setTypesValue(int index, int value) { - ensureTypesIsMutable(); - types_.setInt(index, value); - onChanged(); - return this; - } + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec.EndUserMetaData.ChunkInfo) + private static final com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec + .EndUserMetaData.ChunkInfo + DEFAULT_INSTANCE; - /** - * - * - *
            -         * Enabled query classification types.
            -         * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec.QueryClassificationSpec.Type types = 1; - * - * - * @param value The enum numeric value on the wire for types to add. - * @return This builder for chaining. - */ - public Builder addTypesValue(int value) { - ensureTypesIsMutable(); - types_.addInt(value); - onChanged(); - return this; + static { + DEFAULT_INSTANCE = + new com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec + .EndUserMetaData.ChunkInfo(); } - /** - * - * - *
            -         * Enabled query classification types.
            -         * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec.QueryClassificationSpec.Type types = 1; - * - * - * @param values The enum numeric values on the wire for types to add. - * @return This builder for chaining. - */ - public Builder addAllTypesValue(java.lang.Iterable values) { - ensureTypesIsMutable(); - for (int value : values) { - types_.addInt(value); - } - onChanged(); - return this; + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec + .EndUserMetaData.ChunkInfo + getDefaultInstance() { + return DEFAULT_INSTANCE; } - // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec.QueryClassificationSpec) - } - - // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec.QueryClassificationSpec) - private static final com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest - .QueryUnderstandingSpec.QueryClassificationSpec - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = - new com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec - .QueryClassificationSpec(); - } - - public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest - .QueryUnderstandingSpec.QueryClassificationSpec - getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public QueryClassificationSpec parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException() - .setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ChunkInfo parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } - return builder.buildPartial(); - } - }; + }; - public static com.google.protobuf.Parser parser() { - return PARSER; - } + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec + .EndUserMetaData.ChunkInfo + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } } - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec - .QueryClassificationSpec - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - } + private int contentCase_ = 0; - public interface QueryRephraserSpecOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec.QueryRephraserSpec) - com.google.protobuf.MessageOrBuilder { + @SuppressWarnings("serial") + private java.lang.Object content_; - /** - * - * - *
            -       * Disable query rephraser.
            -       * 
            - * - * bool disable = 1; - * - * @return The disable. - */ - boolean getDisable(); + public enum ContentCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + CHUNK_INFO(1), + CONTENT_NOT_SET(0); + private final int value; + + private ContentCase(int value) { + this.value = value; + } + + /** + * @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 ContentCase valueOf(int value) { + return forNumber(value); + } + + public static ContentCase forNumber(int value) { + switch (value) { + case 1: + return CHUNK_INFO; + case 0: + return CONTENT_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public ContentCase getContentCase() { + return ContentCase.forNumber(contentCase_); + } + + public static final int CHUNK_INFO_FIELD_NUMBER = 1; /** * * *
            -       * Max rephrase steps.
            -       * The max number is 5 steps.
            -       * If not set or set to < 1, it will be set to 1 by default.
            +       * Chunk information.
                    * 
            * - * int32 max_rephrase_steps = 2; + * + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec.EndUserMetaData.ChunkInfo chunk_info = 1; + * * - * @return The maxRephraseSteps. + * @return Whether the chunkInfo field is set. */ - int getMaxRephraseSteps(); - } - - /** - * - * - *
            -     * Query rephraser specification.
            -     * 
            - * - * Protobuf type {@code - * google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec.QueryRephraserSpec} - */ - public static final class QueryRephraserSpec extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec.QueryRephraserSpec) - QueryRephraserSpecOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "QueryRephraserSpec"); - } - - // Use QueryRephraserSpec.newBuilder() to construct. - private QueryRephraserSpec(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private QueryRephraserSpec() {} - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.discoveryengine.v1beta.ConversationalSearchServiceProto - .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_QueryUnderstandingSpec_QueryRephraserSpec_descriptor; - } - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.discoveryengine.v1beta.ConversationalSearchServiceProto - .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_QueryUnderstandingSpec_QueryRephraserSpec_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec - .QueryRephraserSpec.class, - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec - .QueryRephraserSpec.Builder.class); + public boolean hasChunkInfo() { + return contentCase_ == 1; } - public static final int DISABLE_FIELD_NUMBER = 1; - private boolean disable_ = false; - /** * * *
            -       * Disable query rephraser.
            +       * Chunk information.
                    * 
            * - * bool disable = 1; + * + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec.EndUserMetaData.ChunkInfo chunk_info = 1; + * * - * @return The disable. + * @return The chunkInfo. */ @java.lang.Override - public boolean getDisable() { - return disable_; + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec.EndUserMetaData + .ChunkInfo + getChunkInfo() { + if (contentCase_ == 1) { + return (com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec + .EndUserMetaData.ChunkInfo) + content_; + } + return com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec + .EndUserMetaData.ChunkInfo.getDefaultInstance(); } - public static final int MAX_REPHRASE_STEPS_FIELD_NUMBER = 2; - private int maxRephraseSteps_ = 0; - /** * * *
            -       * Max rephrase steps.
            -       * The max number is 5 steps.
            -       * If not set or set to < 1, it will be set to 1 by default.
            +       * Chunk information.
                    * 
            * - * int32 max_rephrase_steps = 2; - * - * @return The maxRephraseSteps. + * + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec.EndUserMetaData.ChunkInfo chunk_info = 1; + * */ @java.lang.Override - public int getMaxRephraseSteps() { - return maxRephraseSteps_; + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec.EndUserMetaData + .ChunkInfoOrBuilder + getChunkInfoOrBuilder() { + if (contentCase_ == 1) { + return (com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec + .EndUserMetaData.ChunkInfo) + content_; + } + return com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec + .EndUserMetaData.ChunkInfo.getDefaultInstance(); } private byte memoizedIsInitialized = -1; @@ -22571,11 +30919,12 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (disable_ != false) { - output.writeBool(1, disable_); - } - if (maxRephraseSteps_ != 0) { - output.writeInt32(2, maxRephraseSteps_); + if (contentCase_ == 1) { + output.writeMessage( + 1, + (com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec + .EndUserMetaData.ChunkInfo) + content_); } getUnknownFields().writeTo(output); } @@ -22586,11 +30935,13 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (disable_ != false) { - size += com.google.protobuf.CodedOutputStream.computeBoolSize(1, disable_); - } - if (maxRephraseSteps_ != 0) { - size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, maxRephraseSteps_); + if (contentCase_ == 1) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 1, + (com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec + .EndUserMetaData.ChunkInfo) + content_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -22604,19 +30955,24 @@ public boolean equals(final java.lang.Object obj) { } if (!(obj instanceof - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec - .QueryRephraserSpec)) { + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec + .EndUserMetaData)) { return super.equals(obj); } - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec - .QueryRephraserSpec + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec.EndUserMetaData other = - (com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec - .QueryRephraserSpec) + (com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec + .EndUserMetaData) obj; - if (getDisable() != other.getDisable()) return false; - if (getMaxRephraseSteps() != other.getMaxRephraseSteps()) return false; + if (!getContentCase().equals(other.getContentCase())) return false; + switch (contentCase_) { + case 1: + if (!getChunkInfo().equals(other.getChunkInfo())) return false; + break; + case 0: + default: + } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -22628,39 +30984,43 @@ public int hashCode() { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + DISABLE_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getDisable()); - hash = (37 * hash) + MAX_REPHRASE_STEPS_FIELD_NUMBER; - hash = (53 * hash) + getMaxRephraseSteps(); + switch (contentCase_) { + case 1: + hash = (37 * hash) + CHUNK_INFO_FIELD_NUMBER; + hash = (53 * hash) + getChunkInfo().hashCode(); + break; + case 0: + default: + } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } - public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest - .QueryUnderstandingSpec.QueryRephraserSpec + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec + .EndUserMetaData parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest - .QueryUnderstandingSpec.QueryRephraserSpec + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec + .EndUserMetaData 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.discoveryengine.v1beta.AnswerQueryRequest - .QueryUnderstandingSpec.QueryRephraserSpec + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec + .EndUserMetaData parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest - .QueryUnderstandingSpec.QueryRephraserSpec + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec + .EndUserMetaData parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) @@ -22668,27 +31028,27 @@ public int hashCode() { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest - .QueryUnderstandingSpec.QueryRephraserSpec + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec + .EndUserMetaData parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest - .QueryUnderstandingSpec.QueryRephraserSpec + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec + .EndUserMetaData parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest - .QueryUnderstandingSpec.QueryRephraserSpec + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec + .EndUserMetaData parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } - public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest - .QueryUnderstandingSpec.QueryRephraserSpec + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec + .EndUserMetaData parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) @@ -22697,14 +31057,14 @@ public int hashCode() { PARSER, input, extensionRegistry); } - public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest - .QueryUnderstandingSpec.QueryRephraserSpec + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec + .EndUserMetaData parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } - public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest - .QueryUnderstandingSpec.QueryRephraserSpec + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec + .EndUserMetaData parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) @@ -22713,14 +31073,14 @@ public int hashCode() { PARSER, input, extensionRegistry); } - public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest - .QueryUnderstandingSpec.QueryRephraserSpec + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec + .EndUserMetaData parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } - public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest - .QueryUnderstandingSpec.QueryRephraserSpec + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec + .EndUserMetaData parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) @@ -22739,8 +31099,7 @@ public static Builder newBuilder() { } public static Builder newBuilder( - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec - .QueryRephraserSpec + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec.EndUserMetaData prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @@ -22761,37 +31120,37 @@ protected Builder newBuilderForType( * * *
            -       * Query rephraser specification.
            +       * End user metadata.
                    * 
            * * Protobuf type {@code - * google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec.QueryRephraserSpec} + * google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec.EndUserMetaData} */ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec.QueryRephraserSpec) - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec - .QueryRephraserSpecOrBuilder { + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec.EndUserMetaData) + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec + .EndUserMetaDataOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.discoveryengine.v1beta.ConversationalSearchServiceProto - .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_QueryUnderstandingSpec_QueryRephraserSpec_descriptor; + .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_EndUserSpec_EndUserMetaData_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.discoveryengine.v1beta.ConversationalSearchServiceProto - .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_QueryUnderstandingSpec_QueryRephraserSpec_fieldAccessorTable + .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_EndUserSpec_EndUserMetaData_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec - .QueryRephraserSpec.class, - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec - .QueryRephraserSpec.Builder.class); + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec + .EndUserMetaData.class, + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec + .EndUserMetaData.Builder.class); } // Construct using - // com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec.QueryRephraserSpec.newBuilder() + // com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec.EndUserMetaData.newBuilder() private Builder() {} private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { @@ -22802,31 +31161,33 @@ private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { public Builder clear() { super.clear(); bitField0_ = 0; - disable_ = false; - maxRephraseSteps_ = 0; + if (chunkInfoBuilder_ != null) { + chunkInfoBuilder_.clear(); + } + contentCase_ = 0; + content_ = null; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.cloud.discoveryengine.v1beta.ConversationalSearchServiceProto - .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_QueryUnderstandingSpec_QueryRephraserSpec_descriptor; + .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_EndUserSpec_EndUserMetaData_descriptor; } @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec - .QueryRephraserSpec + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec + .EndUserMetaData getDefaultInstanceForType() { - return com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec - .QueryRephraserSpec.getDefaultInstance(); + return com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec + .EndUserMetaData.getDefaultInstance(); } @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec - .QueryRephraserSpec + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec + .EndUserMetaData build() { - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec - .QueryRephraserSpec + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec.EndUserMetaData result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); @@ -22835,31 +31196,34 @@ public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { } @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec - .QueryRephraserSpec + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec + .EndUserMetaData buildPartial() { - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec - .QueryRephraserSpec + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec.EndUserMetaData result = - new com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest - .QueryUnderstandingSpec.QueryRephraserSpec(this); + new com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec + .EndUserMetaData(this); if (bitField0_ != 0) { buildPartial0(result); } + buildPartialOneofs(result); onBuilt(); return result; } private void buildPartial0( - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec - .QueryRephraserSpec + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec.EndUserMetaData result) { int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.disable_ = disable_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.maxRephraseSteps_ = maxRephraseSteps_; + } + + private void buildPartialOneofs( + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec.EndUserMetaData + result) { + result.contentCase_ = contentCase_; + result.content_ = this.content_; + if (contentCase_ == 1 && chunkInfoBuilder_ != null) { + result.content_ = chunkInfoBuilder_.build(); } } @@ -22867,11 +31231,11 @@ private void buildPartial0( public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec - .QueryRephraserSpec) { + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec + .EndUserMetaData) { return mergeFrom( - (com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec - .QueryRephraserSpec) + (com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec + .EndUserMetaData) other); } else { super.mergeFrom(other); @@ -22880,17 +31244,21 @@ public Builder mergeFrom(com.google.protobuf.Message other) { } public Builder mergeFrom( - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec - .QueryRephraserSpec + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec.EndUserMetaData other) { if (other - == com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec - .QueryRephraserSpec.getDefaultInstance()) return this; - if (other.getDisable() != false) { - setDisable(other.getDisable()); - } - if (other.getMaxRephraseSteps() != 0) { - setMaxRephraseSteps(other.getMaxRephraseSteps()); + == com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec + .EndUserMetaData.getDefaultInstance()) return this; + switch (other.getContentCase()) { + case CHUNK_INFO: + { + mergeChunkInfo(other.getChunkInfo()); + break; + } + case CONTENT_NOT_SET: + { + break; + } } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); @@ -22918,18 +31286,13 @@ public Builder mergeFrom( case 0: done = true; break; - case 8: - { - disable_ = input.readBool(); - bitField0_ |= 0x00000001; - break; - } // case 8 - case 16: + case 10: { - maxRephraseSteps_ = input.readInt32(); - bitField0_ |= 0x00000002; + input.readMessage( + internalGetChunkInfoFieldBuilder().getBuilder(), extensionRegistry); + contentCase_ = 1; break; - } // case 16 + } // case 10 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -22947,43 +31310,108 @@ public Builder mergeFrom( return this; } + private int contentCase_ = 0; + private java.lang.Object content_; + + public ContentCase getContentCase() { + return ContentCase.forNumber(contentCase_); + } + + public Builder clearContent() { + contentCase_ = 0; + content_ = null; + onChanged(); + return this; + } + private int bitField0_; - private boolean disable_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec + .EndUserMetaData.ChunkInfo, + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec + .EndUserMetaData.ChunkInfo.Builder, + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec + .EndUserMetaData.ChunkInfoOrBuilder> + chunkInfoBuilder_; /** * * *
            -         * Disable query rephraser.
            +         * Chunk information.
                      * 
            * - * bool disable = 1; + * + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec.EndUserMetaData.ChunkInfo chunk_info = 1; + * * - * @return The disable. + * @return Whether the chunkInfo field is set. */ @java.lang.Override - public boolean getDisable() { - return disable_; + public boolean hasChunkInfo() { + return contentCase_ == 1; } /** * * *
            -         * Disable query rephraser.
            +         * Chunk information.
                      * 
            * - * bool disable = 1; + * + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec.EndUserMetaData.ChunkInfo chunk_info = 1; + * * - * @param value The disable to set. - * @return This builder for chaining. + * @return The chunkInfo. */ - public Builder setDisable(boolean value) { + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec + .EndUserMetaData.ChunkInfo + getChunkInfo() { + if (chunkInfoBuilder_ == null) { + if (contentCase_ == 1) { + return (com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec + .EndUserMetaData.ChunkInfo) + content_; + } + return com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec + .EndUserMetaData.ChunkInfo.getDefaultInstance(); + } else { + if (contentCase_ == 1) { + return chunkInfoBuilder_.getMessage(); + } + return com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec + .EndUserMetaData.ChunkInfo.getDefaultInstance(); + } + } - disable_ = value; - bitField0_ |= 0x00000001; - onChanged(); + /** + * + * + *
            +         * Chunk information.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec.EndUserMetaData.ChunkInfo chunk_info = 1; + * + */ + public Builder setChunkInfo( + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec.EndUserMetaData + .ChunkInfo + value) { + if (chunkInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + content_ = value; + onChanged(); + } else { + chunkInfoBuilder_.setMessage(value); + } + contentCase_ = 1; return this; } @@ -22991,59 +31419,95 @@ public Builder setDisable(boolean value) { * * *
            -         * Disable query rephraser.
            +         * Chunk information.
                      * 
            * - * bool disable = 1; - * - * @return This builder for chaining. + * + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec.EndUserMetaData.ChunkInfo chunk_info = 1; + * */ - public Builder clearDisable() { - bitField0_ = (bitField0_ & ~0x00000001); - disable_ = false; - onChanged(); + public Builder setChunkInfo( + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec.EndUserMetaData + .ChunkInfo.Builder + builderForValue) { + if (chunkInfoBuilder_ == null) { + content_ = builderForValue.build(); + onChanged(); + } else { + chunkInfoBuilder_.setMessage(builderForValue.build()); + } + contentCase_ = 1; return this; } - private int maxRephraseSteps_; - /** * * *
            -         * Max rephrase steps.
            -         * The max number is 5 steps.
            -         * If not set or set to < 1, it will be set to 1 by default.
            +         * Chunk information.
                      * 
            * - * int32 max_rephrase_steps = 2; - * - * @return The maxRephraseSteps. + * + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec.EndUserMetaData.ChunkInfo chunk_info = 1; + * */ - @java.lang.Override - public int getMaxRephraseSteps() { - return maxRephraseSteps_; + public Builder mergeChunkInfo( + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec.EndUserMetaData + .ChunkInfo + value) { + if (chunkInfoBuilder_ == null) { + if (contentCase_ == 1 + && content_ + != com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec + .EndUserMetaData.ChunkInfo.getDefaultInstance()) { + content_ = + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec + .EndUserMetaData.ChunkInfo.newBuilder( + (com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec + .EndUserMetaData.ChunkInfo) + content_) + .mergeFrom(value) + .buildPartial(); + } else { + content_ = value; + } + onChanged(); + } else { + if (contentCase_ == 1) { + chunkInfoBuilder_.mergeFrom(value); + } else { + chunkInfoBuilder_.setMessage(value); + } + } + contentCase_ = 1; + return this; } /** * * *
            -         * Max rephrase steps.
            -         * The max number is 5 steps.
            -         * If not set or set to < 1, it will be set to 1 by default.
            +         * Chunk information.
                      * 
            * - * int32 max_rephrase_steps = 2; - * - * @param value The maxRephraseSteps to set. - * @return This builder for chaining. + * + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec.EndUserMetaData.ChunkInfo chunk_info = 1; + * */ - public Builder setMaxRephraseSteps(int value) { - - maxRephraseSteps_ = value; - bitField0_ |= 0x00000002; - onChanged(); + public Builder clearChunkInfo() { + if (chunkInfoBuilder_ == null) { + if (contentCase_ == 1) { + contentCase_ = 0; + content_ = null; + onChanged(); + } + } else { + if (contentCase_ == 1) { + contentCase_ = 0; + content_ = null; + } + chunkInfoBuilder_.clear(); + } return this; } @@ -23051,46 +31515,116 @@ public Builder setMaxRephraseSteps(int value) { * * *
            -         * Max rephrase steps.
            -         * The max number is 5 steps.
            -         * If not set or set to < 1, it will be set to 1 by default.
            +         * Chunk information.
                      * 
            * - * int32 max_rephrase_steps = 2; + * + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec.EndUserMetaData.ChunkInfo chunk_info = 1; + * + */ + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec + .EndUserMetaData.ChunkInfo.Builder + getChunkInfoBuilder() { + return internalGetChunkInfoFieldBuilder().getBuilder(); + } + + /** * - * @return This builder for chaining. + * + *
            +         * Chunk information.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec.EndUserMetaData.ChunkInfo chunk_info = 1; + * */ - public Builder clearMaxRephraseSteps() { - bitField0_ = (bitField0_ & ~0x00000002); - maxRephraseSteps_ = 0; + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec + .EndUserMetaData.ChunkInfoOrBuilder + getChunkInfoOrBuilder() { + if ((contentCase_ == 1) && (chunkInfoBuilder_ != null)) { + return chunkInfoBuilder_.getMessageOrBuilder(); + } else { + if (contentCase_ == 1) { + return (com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec + .EndUserMetaData.ChunkInfo) + content_; + } + return com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec + .EndUserMetaData.ChunkInfo.getDefaultInstance(); + } + } + + /** + * + * + *
            +         * Chunk information.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec.EndUserMetaData.ChunkInfo chunk_info = 1; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec + .EndUserMetaData.ChunkInfo, + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec + .EndUserMetaData.ChunkInfo.Builder, + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec + .EndUserMetaData.ChunkInfoOrBuilder> + internalGetChunkInfoFieldBuilder() { + if (chunkInfoBuilder_ == null) { + if (!(contentCase_ == 1)) { + content_ = + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec + .EndUserMetaData.ChunkInfo.getDefaultInstance(); + } + chunkInfoBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec + .EndUserMetaData.ChunkInfo, + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec + .EndUserMetaData.ChunkInfo.Builder, + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec + .EndUserMetaData.ChunkInfoOrBuilder>( + (com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec + .EndUserMetaData.ChunkInfo) + content_, + getParentForChildren(), + isClean()); + content_ = null; + } + contentCase_ = 1; onChanged(); - return this; + return chunkInfoBuilder_; } - // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec.QueryRephraserSpec) + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec.EndUserMetaData) } - // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec.QueryRephraserSpec) - private static final com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest - .QueryUnderstandingSpec.QueryRephraserSpec + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec.EndUserMetaData) + private static final com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec + .EndUserMetaData DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = - new com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec - .QueryRephraserSpec(); + new com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec + .EndUserMetaData(); } - public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest - .QueryUnderstandingSpec.QueryRephraserSpec + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec + .EndUserMetaData getDefaultInstance() { return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { @java.lang.Override - public QueryRephraserSpec parsePartialFrom( + public EndUserMetaData parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { @@ -23110,156 +31644,116 @@ public QueryRephraserSpec parsePartialFrom( } }; - public static com.google.protobuf.Parser parser() { + public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override - public com.google.protobuf.Parser getParserForType() { + public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec - .QueryRephraserSpec + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec.EndUserMetaData getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } - private int bitField0_; - public static final int QUERY_CLASSIFICATION_SPEC_FIELD_NUMBER = 1; - private com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec - .QueryClassificationSpec - queryClassificationSpec_; - - /** - * - * - *
            -     * Query classification specification.
            -     * 
            - * - * - * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec.QueryClassificationSpec query_classification_spec = 1; - * - * - * @return Whether the queryClassificationSpec field is set. - */ - @java.lang.Override - public boolean hasQueryClassificationSpec() { - return ((bitField0_ & 0x00000001) != 0); - } + public static final int END_USER_METADATA_FIELD_NUMBER = 1; - /** - * - * - *
            -     * Query classification specification.
            -     * 
            - * - * - * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec.QueryClassificationSpec query_classification_spec = 1; - * - * - * @return The queryClassificationSpec. - */ - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec - .QueryClassificationSpec - getQueryClassificationSpec() { - return queryClassificationSpec_ == null - ? com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec - .QueryClassificationSpec.getDefaultInstance() - : queryClassificationSpec_; - } + @SuppressWarnings("serial") + private java.util.List< + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec.EndUserMetaData> + endUserMetadata_; /** * * *
            -     * Query classification specification.
            +     * Optional. End user metadata.
                  * 
            * * - * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec.QueryClassificationSpec query_classification_spec = 1; + * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec.EndUserMetaData end_user_metadata = 1 [(.google.api.field_behavior) = OPTIONAL]; * */ @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec - .QueryClassificationSpecOrBuilder - getQueryClassificationSpecOrBuilder() { - return queryClassificationSpec_ == null - ? com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec - .QueryClassificationSpec.getDefaultInstance() - : queryClassificationSpec_; + public java.util.List< + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec.EndUserMetaData> + getEndUserMetadataList() { + return endUserMetadata_; } - public static final int QUERY_REPHRASER_SPEC_FIELD_NUMBER = 2; - private com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec - .QueryRephraserSpec - queryRephraserSpec_; - /** * * *
            -     * Query rephraser specification.
            +     * Optional. End user metadata.
                  * 
            * * - * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec.QueryRephraserSpec query_rephraser_spec = 2; + * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec.EndUserMetaData end_user_metadata = 1 [(.google.api.field_behavior) = OPTIONAL]; * - * - * @return Whether the queryRephraserSpec field is set. */ @java.lang.Override - public boolean hasQueryRephraserSpec() { - return ((bitField0_ & 0x00000002) != 0); + public java.util.List< + ? extends + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec + .EndUserMetaDataOrBuilder> + getEndUserMetadataOrBuilderList() { + return endUserMetadata_; } /** * * *
            -     * Query rephraser specification.
            +     * Optional. End user metadata.
                  * 
            * * - * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec.QueryRephraserSpec query_rephraser_spec = 2; + * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec.EndUserMetaData end_user_metadata = 1 [(.google.api.field_behavior) = OPTIONAL]; * + */ + @java.lang.Override + public int getEndUserMetadataCount() { + return endUserMetadata_.size(); + } + + /** * - * @return The queryRephraserSpec. + * + *
            +     * Optional. End user metadata.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec.EndUserMetaData end_user_metadata = 1 [(.google.api.field_behavior) = OPTIONAL]; + * */ @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec - .QueryRephraserSpec - getQueryRephraserSpec() { - return queryRephraserSpec_ == null - ? com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec - .QueryRephraserSpec.getDefaultInstance() - : queryRephraserSpec_; + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec.EndUserMetaData + getEndUserMetadata(int index) { + return endUserMetadata_.get(index); } /** * * *
            -     * Query rephraser specification.
            +     * Optional. End user metadata.
                  * 
            * * - * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec.QueryRephraserSpec query_rephraser_spec = 2; + * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec.EndUserMetaData end_user_metadata = 1 [(.google.api.field_behavior) = OPTIONAL]; * */ @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec - .QueryRephraserSpecOrBuilder - getQueryRephraserSpecOrBuilder() { - return queryRephraserSpec_ == null - ? com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec - .QueryRephraserSpec.getDefaultInstance() - : queryRephraserSpec_; + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec + .EndUserMetaDataOrBuilder + getEndUserMetadataOrBuilder(int index) { + return endUserMetadata_.get(index); } private byte memoizedIsInitialized = -1; @@ -23276,11 +31770,8 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(1, getQueryClassificationSpec()); - } - if (((bitField0_ & 0x00000002) != 0)) { - output.writeMessage(2, getQueryRephraserSpec()); + for (int i = 0; i < endUserMetadata_.size(); i++) { + output.writeMessage(1, endUserMetadata_.get(i)); } getUnknownFields().writeTo(output); } @@ -23291,14 +31782,9 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (((bitField0_ & 0x00000001) != 0)) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 1, getQueryClassificationSpec()); - } - if (((bitField0_ & 0x00000002) != 0)) { + for (int i = 0; i < endUserMetadata_.size(); i++) { size += - com.google.protobuf.CodedOutputStream.computeMessageSize(2, getQueryRephraserSpec()); + com.google.protobuf.CodedOutputStream.computeMessageSize(1, endUserMetadata_.get(i)); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -23311,21 +31797,13 @@ public boolean equals(final java.lang.Object obj) { return true; } if (!(obj - instanceof - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec)) { + instanceof com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec)) { return super.equals(obj); } - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec other = - (com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec) obj; + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec other = + (com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec) obj; - if (hasQueryClassificationSpec() != other.hasQueryClassificationSpec()) return false; - if (hasQueryClassificationSpec()) { - if (!getQueryClassificationSpec().equals(other.getQueryClassificationSpec())) return false; - } - if (hasQueryRephraserSpec() != other.hasQueryRephraserSpec()) return false; - if (hasQueryRephraserSpec()) { - if (!getQueryRephraserSpec().equals(other.getQueryRephraserSpec())) return false; - } + if (!getEndUserMetadataList().equals(other.getEndUserMetadataList())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -23337,76 +31815,68 @@ public int hashCode() { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); - if (hasQueryClassificationSpec()) { - hash = (37 * hash) + QUERY_CLASSIFICATION_SPEC_FIELD_NUMBER; - hash = (53 * hash) + getQueryClassificationSpec().hashCode(); - } - if (hasQueryRephraserSpec()) { - hash = (37 * hash) + QUERY_REPHRASER_SPEC_FIELD_NUMBER; - hash = (53 * hash) + getQueryRephraserSpec().hashCode(); + if (getEndUserMetadataCount() > 0) { + hash = (37 * hash) + END_USER_METADATA_FIELD_NUMBER; + hash = (53 * hash) + getEndUserMetadataList().hashCode(); } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } - public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec - parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec - parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec 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.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec - parseFrom(com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec - parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec 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.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec - parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec - parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec - parseFrom(java.io.InputStream input) throws java.io.IOException { + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec parseFrom( + java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } - public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec - parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec 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.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } - public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -23414,16 +31884,15 @@ public int hashCode() { PARSER, input, extensionRegistry); } - public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec - parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } - public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec - parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -23438,8 +31907,7 @@ public static Builder newBuilder() { } public static Builder newBuilder( - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec - prototype) { + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @@ -23458,85 +31926,69 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.Builder * * *
            -     * Query understanding specification.
            +     * End user specification.
                  * 
            * - * Protobuf type {@code - * google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec} + * Protobuf type {@code google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec} */ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec) - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpecOrBuilder { + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec) + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpecOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.discoveryengine.v1beta.ConversationalSearchServiceProto - .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_QueryUnderstandingSpec_descriptor; + .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_EndUserSpec_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.discoveryengine.v1beta.ConversationalSearchServiceProto - .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_QueryUnderstandingSpec_fieldAccessorTable + .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_EndUserSpec_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec - .class, - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec - .Builder.class); + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec.class, + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec.Builder + .class); } // Construct using - // com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + // com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec.newBuilder() + private Builder() {} private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - internalGetQueryClassificationSpecFieldBuilder(); - internalGetQueryRephraserSpecFieldBuilder(); - } } @java.lang.Override public Builder clear() { super.clear(); bitField0_ = 0; - queryClassificationSpec_ = null; - if (queryClassificationSpecBuilder_ != null) { - queryClassificationSpecBuilder_.dispose(); - queryClassificationSpecBuilder_ = null; - } - queryRephraserSpec_ = null; - if (queryRephraserSpecBuilder_ != null) { - queryRephraserSpecBuilder_.dispose(); - queryRephraserSpecBuilder_ = null; + if (endUserMetadataBuilder_ == null) { + endUserMetadata_ = java.util.Collections.emptyList(); + } else { + endUserMetadata_ = null; + endUserMetadataBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.cloud.discoveryengine.v1beta.ConversationalSearchServiceProto - .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_QueryUnderstandingSpec_descriptor; + .internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_EndUserSpec_descriptor; } @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec getDefaultInstanceForType() { - return com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec + return com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec .getDefaultInstance(); } @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec - build() { - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec result = + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec build() { + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); @@ -23545,11 +31997,10 @@ public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { } @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec - buildPartial() { - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec result = - new com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec( - this); + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec buildPartial() { + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec result = + new com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec(this); + buildPartialRepeatedFields(result); if (bitField0_ != 0) { buildPartial0(result); } @@ -23557,36 +32008,30 @@ public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return result; } + private void buildPartialRepeatedFields( + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec result) { + if (endUserMetadataBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + endUserMetadata_ = java.util.Collections.unmodifiableList(endUserMetadata_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.endUserMetadata_ = endUserMetadata_; + } else { + result.endUserMetadata_ = endUserMetadataBuilder_.build(); + } + } + private void buildPartial0( - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec - result) { + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec result) { int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.queryClassificationSpec_ = - queryClassificationSpecBuilder_ == null - ? queryClassificationSpec_ - : queryClassificationSpecBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.queryRephraserSpec_ = - queryRephraserSpecBuilder_ == null - ? queryRephraserSpec_ - : queryRephraserSpecBuilder_.build(); - to_bitField0_ |= 0x00000002; - } - result.bitField0_ |= to_bitField0_; } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other - instanceof - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec) { + instanceof com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec) { return mergeFrom( - (com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec) - other); + (com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec) other); } else { super.mergeFrom(other); return this; @@ -23594,15 +32039,36 @@ public Builder mergeFrom(com.google.protobuf.Message other) { } public Builder mergeFrom( - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec other) { + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec other) { if (other - == com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec + == com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec .getDefaultInstance()) return this; - if (other.hasQueryClassificationSpec()) { - mergeQueryClassificationSpec(other.getQueryClassificationSpec()); - } - if (other.hasQueryRephraserSpec()) { - mergeQueryRephraserSpec(other.getQueryRephraserSpec()); + if (endUserMetadataBuilder_ == null) { + if (!other.endUserMetadata_.isEmpty()) { + if (endUserMetadata_.isEmpty()) { + endUserMetadata_ = other.endUserMetadata_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureEndUserMetadataIsMutable(); + endUserMetadata_.addAll(other.endUserMetadata_); + } + onChanged(); + } + } else { + if (!other.endUserMetadata_.isEmpty()) { + if (endUserMetadataBuilder_.isEmpty()) { + endUserMetadataBuilder_.dispose(); + endUserMetadataBuilder_ = null; + endUserMetadata_ = other.endUserMetadata_; + bitField0_ = (bitField0_ & ~0x00000001); + endUserMetadataBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetEndUserMetadataFieldBuilder() + : null; + } else { + endUserMetadataBuilder_.addAllMessages(other.endUserMetadata_); + } + } } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); @@ -23632,19 +32098,21 @@ public Builder mergeFrom( break; case 10: { - input.readMessage( - internalGetQueryClassificationSpecFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000001; + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec + .EndUserMetaData + m = + input.readMessage( + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec + .EndUserMetaData.parser(), + extensionRegistry); + if (endUserMetadataBuilder_ == null) { + ensureEndUserMetadataIsMutable(); + endUserMetadata_.add(m); + } else { + endUserMetadataBuilder_.addMessage(m); + } break; } // case 10 - case 18: - { - input.readMessage( - internalGetQueryRephraserSpecFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000002; - break; - } // case 18 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -23664,58 +32132,88 @@ public Builder mergeFrom( private int bitField0_; - private com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec - .QueryClassificationSpec - queryClassificationSpec_; - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec - .QueryClassificationSpec, - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec - .QueryClassificationSpec.Builder, - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec - .QueryClassificationSpecOrBuilder> - queryClassificationSpecBuilder_; + private java.util.List< + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec + .EndUserMetaData> + endUserMetadata_ = java.util.Collections.emptyList(); + + private void ensureEndUserMetadataIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + endUserMetadata_ = + new java.util.ArrayList< + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec + .EndUserMetaData>(endUserMetadata_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec + .EndUserMetaData, + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec.EndUserMetaData + .Builder, + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec + .EndUserMetaDataOrBuilder> + endUserMetadataBuilder_; + + /** + * + * + *
            +       * Optional. End user metadata.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec.EndUserMetaData end_user_metadata = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List< + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec + .EndUserMetaData> + getEndUserMetadataList() { + if (endUserMetadataBuilder_ == null) { + return java.util.Collections.unmodifiableList(endUserMetadata_); + } else { + return endUserMetadataBuilder_.getMessageList(); + } + } /** * * *
            -       * Query classification specification.
            +       * Optional. End user metadata.
                    * 
            * * - * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec.QueryClassificationSpec query_classification_spec = 1; + * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec.EndUserMetaData end_user_metadata = 1 [(.google.api.field_behavior) = OPTIONAL]; * - * - * @return Whether the queryClassificationSpec field is set. */ - public boolean hasQueryClassificationSpec() { - return ((bitField0_ & 0x00000001) != 0); + public int getEndUserMetadataCount() { + if (endUserMetadataBuilder_ == null) { + return endUserMetadata_.size(); + } else { + return endUserMetadataBuilder_.getCount(); + } } /** * * *
            -       * Query classification specification.
            +       * Optional. End user metadata.
                    * 
            * * - * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec.QueryClassificationSpec query_classification_spec = 1; + * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec.EndUserMetaData end_user_metadata = 1 [(.google.api.field_behavior) = OPTIONAL]; * - * - * @return The queryClassificationSpec. */ - public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec - .QueryClassificationSpec - getQueryClassificationSpec() { - if (queryClassificationSpecBuilder_ == null) { - return queryClassificationSpec_ == null - ? com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec - .QueryClassificationSpec.getDefaultInstance() - : queryClassificationSpec_; + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec.EndUserMetaData + getEndUserMetadata(int index) { + if (endUserMetadataBuilder_ == null) { + return endUserMetadata_.get(index); } else { - return queryClassificationSpecBuilder_.getMessage(); + return endUserMetadataBuilder_.getMessage(index); } } @@ -23723,27 +32221,27 @@ public boolean hasQueryClassificationSpec() { * * *
            -       * Query classification specification.
            +       * Optional. End user metadata.
                    * 
            * * - * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec.QueryClassificationSpec query_classification_spec = 1; + * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec.EndUserMetaData end_user_metadata = 1 [(.google.api.field_behavior) = OPTIONAL]; * */ - public Builder setQueryClassificationSpec( - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec - .QueryClassificationSpec + public Builder setEndUserMetadata( + int index, + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec.EndUserMetaData value) { - if (queryClassificationSpecBuilder_ == null) { + if (endUserMetadataBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - queryClassificationSpec_ = value; + ensureEndUserMetadataIsMutable(); + endUserMetadata_.set(index, value); + onChanged(); } else { - queryClassificationSpecBuilder_.setMessage(value); + endUserMetadataBuilder_.setMessage(index, value); } - bitField0_ |= 0x00000001; - onChanged(); return this; } @@ -23751,24 +32249,25 @@ public Builder setQueryClassificationSpec( * * *
            -       * Query classification specification.
            +       * Optional. End user metadata.
                    * 
            * * - * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec.QueryClassificationSpec query_classification_spec = 1; + * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec.EndUserMetaData end_user_metadata = 1 [(.google.api.field_behavior) = OPTIONAL]; * */ - public Builder setQueryClassificationSpec( - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec - .QueryClassificationSpec.Builder + public Builder setEndUserMetadata( + int index, + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec.EndUserMetaData + .Builder builderForValue) { - if (queryClassificationSpecBuilder_ == null) { - queryClassificationSpec_ = builderForValue.build(); + if (endUserMetadataBuilder_ == null) { + ensureEndUserMetadataIsMutable(); + endUserMetadata_.set(index, builderForValue.build()); + onChanged(); } else { - queryClassificationSpecBuilder_.setMessage(builderForValue.build()); + endUserMetadataBuilder_.setMessage(index, builderForValue.build()); } - bitField0_ |= 0x00000001; - onChanged(); return this; } @@ -23776,33 +32275,25 @@ public Builder setQueryClassificationSpec( * * *
            -       * Query classification specification.
            +       * Optional. End user metadata.
                    * 
            * * - * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec.QueryClassificationSpec query_classification_spec = 1; + * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec.EndUserMetaData end_user_metadata = 1 [(.google.api.field_behavior) = OPTIONAL]; * */ - public Builder mergeQueryClassificationSpec( - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec - .QueryClassificationSpec + public Builder addEndUserMetadata( + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec.EndUserMetaData value) { - if (queryClassificationSpecBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) - && queryClassificationSpec_ != null - && queryClassificationSpec_ - != com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest - .QueryUnderstandingSpec.QueryClassificationSpec.getDefaultInstance()) { - getQueryClassificationSpecBuilder().mergeFrom(value); - } else { - queryClassificationSpec_ = value; + if (endUserMetadataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); } - } else { - queryClassificationSpecBuilder_.mergeFrom(value); - } - if (queryClassificationSpec_ != null) { - bitField0_ |= 0x00000001; + ensureEndUserMetadataIsMutable(); + endUserMetadata_.add(value); onChanged(); + } else { + endUserMetadataBuilder_.addMessage(value); } return this; } @@ -23811,21 +32302,27 @@ public Builder mergeQueryClassificationSpec( * * *
            -       * Query classification specification.
            +       * Optional. End user metadata.
                    * 
            * * - * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec.QueryClassificationSpec query_classification_spec = 1; + * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec.EndUserMetaData end_user_metadata = 1 [(.google.api.field_behavior) = OPTIONAL]; * */ - public Builder clearQueryClassificationSpec() { - bitField0_ = (bitField0_ & ~0x00000001); - queryClassificationSpec_ = null; - if (queryClassificationSpecBuilder_ != null) { - queryClassificationSpecBuilder_.dispose(); - queryClassificationSpecBuilder_ = null; + public Builder addEndUserMetadata( + int index, + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec.EndUserMetaData + value) { + if (endUserMetadataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEndUserMetadataIsMutable(); + endUserMetadata_.add(index, value); + onChanged(); + } else { + endUserMetadataBuilder_.addMessage(index, value); } - onChanged(); return this; } @@ -23833,159 +32330,121 @@ public Builder clearQueryClassificationSpec() { * * *
            -       * Query classification specification.
            -       * 
            - * - * - * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec.QueryClassificationSpec query_classification_spec = 1; - * - */ - public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec - .QueryClassificationSpec.Builder - getQueryClassificationSpecBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return internalGetQueryClassificationSpecFieldBuilder().getBuilder(); - } - - /** - * - * - *
            -       * Query classification specification.
            +       * Optional. End user metadata.
                    * 
            * * - * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec.QueryClassificationSpec query_classification_spec = 1; + * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec.EndUserMetaData end_user_metadata = 1 [(.google.api.field_behavior) = OPTIONAL]; * */ - public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec - .QueryClassificationSpecOrBuilder - getQueryClassificationSpecOrBuilder() { - if (queryClassificationSpecBuilder_ != null) { - return queryClassificationSpecBuilder_.getMessageOrBuilder(); + public Builder addEndUserMetadata( + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec.EndUserMetaData + .Builder + builderForValue) { + if (endUserMetadataBuilder_ == null) { + ensureEndUserMetadataIsMutable(); + endUserMetadata_.add(builderForValue.build()); + onChanged(); } else { - return queryClassificationSpec_ == null - ? com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec - .QueryClassificationSpec.getDefaultInstance() - : queryClassificationSpec_; + endUserMetadataBuilder_.addMessage(builderForValue.build()); } + return this; } /** * * *
            -       * Query classification specification.
            +       * Optional. End user metadata.
                    * 
            * * - * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec.QueryClassificationSpec query_classification_spec = 1; + * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec.EndUserMetaData end_user_metadata = 1 [(.google.api.field_behavior) = OPTIONAL]; * */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec - .QueryClassificationSpec, - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec - .QueryClassificationSpec.Builder, - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec - .QueryClassificationSpecOrBuilder> - internalGetQueryClassificationSpecFieldBuilder() { - if (queryClassificationSpecBuilder_ == null) { - queryClassificationSpecBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec - .QueryClassificationSpec, - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec - .QueryClassificationSpec.Builder, - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec - .QueryClassificationSpecOrBuilder>( - getQueryClassificationSpec(), getParentForChildren(), isClean()); - queryClassificationSpec_ = null; + public Builder addEndUserMetadata( + int index, + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec.EndUserMetaData + .Builder + builderForValue) { + if (endUserMetadataBuilder_ == null) { + ensureEndUserMetadataIsMutable(); + endUserMetadata_.add(index, builderForValue.build()); + onChanged(); + } else { + endUserMetadataBuilder_.addMessage(index, builderForValue.build()); } - return queryClassificationSpecBuilder_; + return this; } - private com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec - .QueryRephraserSpec - queryRephraserSpec_; - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec - .QueryRephraserSpec, - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec - .QueryRephraserSpec.Builder, - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec - .QueryRephraserSpecOrBuilder> - queryRephraserSpecBuilder_; - /** * * *
            -       * Query rephraser specification.
            +       * Optional. End user metadata.
                    * 
            * * - * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec.QueryRephraserSpec query_rephraser_spec = 2; + * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec.EndUserMetaData end_user_metadata = 1 [(.google.api.field_behavior) = OPTIONAL]; * - * - * @return Whether the queryRephraserSpec field is set. */ - public boolean hasQueryRephraserSpec() { - return ((bitField0_ & 0x00000002) != 0); + public Builder addAllEndUserMetadata( + java.lang.Iterable< + ? extends + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec + .EndUserMetaData> + values) { + if (endUserMetadataBuilder_ == null) { + ensureEndUserMetadataIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, endUserMetadata_); + onChanged(); + } else { + endUserMetadataBuilder_.addAllMessages(values); + } + return this; } /** * * *
            -       * Query rephraser specification.
            +       * Optional. End user metadata.
                    * 
            * * - * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec.QueryRephraserSpec query_rephraser_spec = 2; + * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec.EndUserMetaData end_user_metadata = 1 [(.google.api.field_behavior) = OPTIONAL]; * - * - * @return The queryRephraserSpec. */ - public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec - .QueryRephraserSpec - getQueryRephraserSpec() { - if (queryRephraserSpecBuilder_ == null) { - return queryRephraserSpec_ == null - ? com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec - .QueryRephraserSpec.getDefaultInstance() - : queryRephraserSpec_; + public Builder clearEndUserMetadata() { + if (endUserMetadataBuilder_ == null) { + endUserMetadata_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); } else { - return queryRephraserSpecBuilder_.getMessage(); + endUserMetadataBuilder_.clear(); } + return this; } /** * * *
            -       * Query rephraser specification.
            +       * Optional. End user metadata.
                    * 
            * * - * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec.QueryRephraserSpec query_rephraser_spec = 2; + * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec.EndUserMetaData end_user_metadata = 1 [(.google.api.field_behavior) = OPTIONAL]; * */ - public Builder setQueryRephraserSpec( - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec - .QueryRephraserSpec - value) { - if (queryRephraserSpecBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - queryRephraserSpec_ = value; + public Builder removeEndUserMetadata(int index) { + if (endUserMetadataBuilder_ == null) { + ensureEndUserMetadataIsMutable(); + endUserMetadata_.remove(index); + onChanged(); } else { - queryRephraserSpecBuilder_.setMessage(value); + endUserMetadataBuilder_.remove(index); } - bitField0_ |= 0x00000002; - onChanged(); return this; } @@ -23993,183 +32452,169 @@ public Builder setQueryRephraserSpec( * * *
            -       * Query rephraser specification.
            +       * Optional. End user metadata.
                    * 
            * * - * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec.QueryRephraserSpec query_rephraser_spec = 2; + * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec.EndUserMetaData end_user_metadata = 1 [(.google.api.field_behavior) = OPTIONAL]; * */ - public Builder setQueryRephraserSpec( - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec - .QueryRephraserSpec.Builder - builderForValue) { - if (queryRephraserSpecBuilder_ == null) { - queryRephraserSpec_ = builderForValue.build(); - } else { - queryRephraserSpecBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec.EndUserMetaData + .Builder + getEndUserMetadataBuilder(int index) { + return internalGetEndUserMetadataFieldBuilder().getBuilder(index); } /** * * *
            -       * Query rephraser specification.
            +       * Optional. End user metadata.
                    * 
            * * - * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec.QueryRephraserSpec query_rephraser_spec = 2; + * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec.EndUserMetaData end_user_metadata = 1 [(.google.api.field_behavior) = OPTIONAL]; * */ - public Builder mergeQueryRephraserSpec( - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec - .QueryRephraserSpec - value) { - if (queryRephraserSpecBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0) - && queryRephraserSpec_ != null - && queryRephraserSpec_ - != com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest - .QueryUnderstandingSpec.QueryRephraserSpec.getDefaultInstance()) { - getQueryRephraserSpecBuilder().mergeFrom(value); - } else { - queryRephraserSpec_ = value; - } + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec + .EndUserMetaDataOrBuilder + getEndUserMetadataOrBuilder(int index) { + if (endUserMetadataBuilder_ == null) { + return endUserMetadata_.get(index); } else { - queryRephraserSpecBuilder_.mergeFrom(value); - } - if (queryRephraserSpec_ != null) { - bitField0_ |= 0x00000002; - onChanged(); + return endUserMetadataBuilder_.getMessageOrBuilder(index); } - return this; } /** * * *
            -       * Query rephraser specification.
            +       * Optional. End user metadata.
                    * 
            * * - * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec.QueryRephraserSpec query_rephraser_spec = 2; + * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec.EndUserMetaData end_user_metadata = 1 [(.google.api.field_behavior) = OPTIONAL]; * */ - public Builder clearQueryRephraserSpec() { - bitField0_ = (bitField0_ & ~0x00000002); - queryRephraserSpec_ = null; - if (queryRephraserSpecBuilder_ != null) { - queryRephraserSpecBuilder_.dispose(); - queryRephraserSpecBuilder_ = null; + public java.util.List< + ? extends + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec + .EndUserMetaDataOrBuilder> + getEndUserMetadataOrBuilderList() { + if (endUserMetadataBuilder_ != null) { + return endUserMetadataBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(endUserMetadata_); } - onChanged(); - return this; } /** * * *
            -       * Query rephraser specification.
            +       * Optional. End user metadata.
                    * 
            * * - * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec.QueryRephraserSpec query_rephraser_spec = 2; + * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec.EndUserMetaData end_user_metadata = 1 [(.google.api.field_behavior) = OPTIONAL]; * */ - public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec - .QueryRephraserSpec.Builder - getQueryRephraserSpecBuilder() { - bitField0_ |= 0x00000002; - onChanged(); - return internalGetQueryRephraserSpecFieldBuilder().getBuilder(); + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec.EndUserMetaData + .Builder + addEndUserMetadataBuilder() { + return internalGetEndUserMetadataFieldBuilder() + .addBuilder( + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec + .EndUserMetaData.getDefaultInstance()); } /** * * *
            -       * Query rephraser specification.
            +       * Optional. End user metadata.
                    * 
            * * - * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec.QueryRephraserSpec query_rephraser_spec = 2; + * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec.EndUserMetaData end_user_metadata = 1 [(.google.api.field_behavior) = OPTIONAL]; * */ - public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec - .QueryRephraserSpecOrBuilder - getQueryRephraserSpecOrBuilder() { - if (queryRephraserSpecBuilder_ != null) { - return queryRephraserSpecBuilder_.getMessageOrBuilder(); - } else { - return queryRephraserSpec_ == null - ? com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec - .QueryRephraserSpec.getDefaultInstance() - : queryRephraserSpec_; - } + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec.EndUserMetaData + .Builder + addEndUserMetadataBuilder(int index) { + return internalGetEndUserMetadataFieldBuilder() + .addBuilder( + index, + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec + .EndUserMetaData.getDefaultInstance()); } /** * * *
            -       * Query rephraser specification.
            +       * Optional. End user metadata.
                    * 
            * * - * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec.QueryRephraserSpec query_rephraser_spec = 2; + * repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec.EndUserMetaData end_user_metadata = 1 [(.google.api.field_behavior) = OPTIONAL]; * */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec - .QueryRephraserSpec, - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec - .QueryRephraserSpec.Builder, - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec - .QueryRephraserSpecOrBuilder> - internalGetQueryRephraserSpecFieldBuilder() { - if (queryRephraserSpecBuilder_ == null) { - queryRephraserSpecBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec - .QueryRephraserSpec, - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec - .QueryRephraserSpec.Builder, - com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec - .QueryRephraserSpecOrBuilder>( - getQueryRephraserSpec(), getParentForChildren(), isClean()); - queryRephraserSpec_ = null; + public java.util.List< + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec.EndUserMetaData + .Builder> + getEndUserMetadataBuilderList() { + return internalGetEndUserMetadataFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec + .EndUserMetaData, + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec.EndUserMetaData + .Builder, + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec + .EndUserMetaDataOrBuilder> + internalGetEndUserMetadataFieldBuilder() { + if (endUserMetadataBuilder_ == null) { + endUserMetadataBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec + .EndUserMetaData, + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec + .EndUserMetaData.Builder, + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec + .EndUserMetaDataOrBuilder>( + endUserMetadata_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + endUserMetadata_ = null; } - return queryRephraserSpecBuilder_; + return endUserMetadataBuilder_; } - // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec) + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec) } - // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec) - private static final com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest - .QueryUnderstandingSpec + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec) + private static final com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = - new com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec(); + new com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec(); } - public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec + public static com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec getDefaultInstance() { return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { @java.lang.Override - public QueryUnderstandingSpec parsePartialFrom( + public EndUserSpec parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { @@ -24189,17 +32634,17 @@ public QueryUnderstandingSpec parsePartialFrom( } }; - public static com.google.protobuf.Parser parser() { + public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override - public com.google.protobuf.Parser getParserForType() { + public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec getDefaultInstanceForType() { return DEFAULT_INSTANCE; } @@ -24219,6 +32664,12 @@ public com.google.protobuf.Parser getParserForType() { * `projects/*/locations/global/collections/default_collection/engines/*/servingConfigs/default_serving_config`, * or * `projects/*/locations/global/collections/default_collection/dataStores/*/servingConfigs/default_serving_config`. + * + * Or the resource name of the agent engine serving config, such as: + * `projects/*/locations/global/collections/default_collection/engines/*/servingConfigs/default_agent_answer`. + * (use when `enable_agent_invocation` set to true, and you have custom + * `AI_MODE` agent engine configured) + * * This field is used to identify the serving configuration name, set * of models used to make the search. *
            @@ -24250,6 +32701,12 @@ public java.lang.String getServingConfig() { * `projects/*/locations/global/collections/default_collection/engines/*/servingConfigs/default_serving_config`, * or * `projects/*/locations/global/collections/default_collection/dataStores/*/servingConfigs/default_serving_config`. + * + * Or the resource name of the agent engine serving config, such as: + * `projects/*/locations/global/collections/default_collection/engines/*/servingConfigs/default_agent_answer`. + * (use when `enable_agent_invocation` set to true, and you have custom + * `AI_MODE` agent engine configured) + * * This field is used to identify the serving configuration name, set * of models used to make the search. *
            @@ -24789,7 +33246,7 @@ public boolean hasQueryUnderstandingSpec() { * * @deprecated google.cloud.discoveryengine.v1beta.AnswerQueryRequest.asynchronous_mode is * deprecated. See - * google/cloud/discoveryengine/v1beta/conversational_search_service.proto;l=861 + * google/cloud/discoveryengine/v1beta/conversational_search_service.proto;l=1021 * @return The asynchronousMode. */ @java.lang.Override @@ -25038,6 +33495,68 @@ public java.lang.String getUserLabelsOrThrow(java.lang.String key) { return map.get(key); } + public static final int END_USER_SPEC_FIELD_NUMBER = 14; + private com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec endUserSpec_; + + /** + * + * + *
            +   * Optional. End user specification.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec end_user_spec = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the endUserSpec field is set. + */ + @java.lang.Override + public boolean hasEndUserSpec() { + return ((bitField0_ & 0x00000080) != 0); + } + + /** + * + * + *
            +   * Optional. End user specification.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec end_user_spec = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The endUserSpec. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec getEndUserSpec() { + return endUserSpec_ == null + ? com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec + .getDefaultInstance() + : endUserSpec_; + } + + /** + * + * + *
            +   * Optional. End user specification.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec end_user_spec = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpecOrBuilder + getEndUserSpecOrBuilder() { + return endUserSpec_ == null + ? com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec + .getDefaultInstance() + : endUserSpec_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -25087,6 +33606,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io } com.google.protobuf.GeneratedMessage.serializeStringMapTo( output, internalGetUserLabels(), UserLabelsDefaultEntryHolder.defaultEntry, 13); + if (((bitField0_ & 0x00000080) != 0)) { + output.writeMessage(14, getEndUserSpec()); + } getUnknownFields().writeTo(output); } @@ -25142,6 +33664,9 @@ public int getSerializedSize() { .build(); size += com.google.protobuf.CodedOutputStream.computeMessageSize(13, userLabels__); } + if (((bitField0_ & 0x00000080) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(14, getEndUserSpec()); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -25191,6 +33716,10 @@ public boolean equals(final java.lang.Object obj) { if (getAsynchronousMode() != other.getAsynchronousMode()) return false; if (!getUserPseudoId().equals(other.getUserPseudoId())) return false; if (!internalGetUserLabels().equals(other.internalGetUserLabels())) return false; + if (hasEndUserSpec() != other.hasEndUserSpec()) return false; + if (hasEndUserSpec()) { + if (!getEndUserSpec().equals(other.getEndUserSpec())) return false; + } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -25242,6 +33771,10 @@ public int hashCode() { hash = (37 * hash) + USER_LABELS_FIELD_NUMBER; hash = (53 * hash) + internalGetUserLabels().hashCode(); } + if (hasEndUserSpec()) { + hash = (37 * hash) + END_USER_SPEC_FIELD_NUMBER; + hash = (53 * hash) + getEndUserSpec().hashCode(); + } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -25415,6 +33948,7 @@ private void maybeForceBuilderInitialization() { internalGetAnswerGenerationSpecFieldBuilder(); internalGetSearchSpecFieldBuilder(); internalGetQueryUnderstandingSpecFieldBuilder(); + internalGetEndUserSpecFieldBuilder(); } } @@ -25462,6 +33996,11 @@ public Builder clear() { asynchronousMode_ = false; userPseudoId_ = ""; internalGetMutableUserLabels().clear(); + endUserSpec_ = null; + if (endUserSpecBuilder_ != null) { + endUserSpecBuilder_.dispose(); + endUserSpecBuilder_ = null; + } return this; } @@ -25553,6 +34092,11 @@ private void buildPartial0(com.google.cloud.discoveryengine.v1beta.AnswerQueryRe result.userLabels_ = internalGetUserLabels(); result.userLabels_.makeImmutable(); } + if (((from_bitField0_ & 0x00001000) != 0)) { + result.endUserSpec_ = + endUserSpecBuilder_ == null ? endUserSpec_ : endUserSpecBuilder_.build(); + to_bitField0_ |= 0x00000080; + } result.bitField0_ |= to_bitField0_; } @@ -25610,6 +34154,9 @@ public Builder mergeFrom(com.google.cloud.discoveryengine.v1beta.AnswerQueryRequ } internalGetMutableUserLabels().mergeFrom(other.internalGetUserLabels()); bitField0_ |= 0x00000800; + if (other.hasEndUserSpec()) { + mergeEndUserSpec(other.getEndUserSpec()); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -25721,6 +34268,13 @@ public Builder mergeFrom( bitField0_ |= 0x00000800; break; } // case 106 + case 114: + { + input.readMessage( + internalGetEndUserSpecFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00001000; + break; + } // case 114 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -25750,6 +34304,12 @@ public Builder mergeFrom( * `projects/*/locations/global/collections/default_collection/engines/*/servingConfigs/default_serving_config`, * or * `projects/*/locations/global/collections/default_collection/dataStores/*/servingConfigs/default_serving_config`. + * + * Or the resource name of the agent engine serving config, such as: + * `projects/*/locations/global/collections/default_collection/engines/*/servingConfigs/default_agent_answer`. + * (use when `enable_agent_invocation` set to true, and you have custom + * `AI_MODE` agent engine configured) + * * This field is used to identify the serving configuration name, set * of models used to make the search. *
            @@ -25780,6 +34340,12 @@ public java.lang.String getServingConfig() { * `projects/*/locations/global/collections/default_collection/engines/*/servingConfigs/default_serving_config`, * or * `projects/*/locations/global/collections/default_collection/dataStores/*/servingConfigs/default_serving_config`. + * + * Or the resource name of the agent engine serving config, such as: + * `projects/*/locations/global/collections/default_collection/engines/*/servingConfigs/default_agent_answer`. + * (use when `enable_agent_invocation` set to true, and you have custom + * `AI_MODE` agent engine configured) + * * This field is used to identify the serving configuration name, set * of models used to make the search. *
            @@ -25810,6 +34376,12 @@ public com.google.protobuf.ByteString getServingConfigBytes() { * `projects/*/locations/global/collections/default_collection/engines/*/servingConfigs/default_serving_config`, * or * `projects/*/locations/global/collections/default_collection/dataStores/*/servingConfigs/default_serving_config`. + * + * Or the resource name of the agent engine serving config, such as: + * `projects/*/locations/global/collections/default_collection/engines/*/servingConfigs/default_agent_answer`. + * (use when `enable_agent_invocation` set to true, and you have custom + * `AI_MODE` agent engine configured) + * * This field is used to identify the serving configuration name, set * of models used to make the search. *
            @@ -25839,6 +34411,12 @@ public Builder setServingConfig(java.lang.String value) { * `projects/*/locations/global/collections/default_collection/engines/*/servingConfigs/default_serving_config`, * or * `projects/*/locations/global/collections/default_collection/dataStores/*/servingConfigs/default_serving_config`. + * + * Or the resource name of the agent engine serving config, such as: + * `projects/*/locations/global/collections/default_collection/engines/*/servingConfigs/default_agent_answer`. + * (use when `enable_agent_invocation` set to true, and you have custom + * `AI_MODE` agent engine configured) + * * This field is used to identify the serving configuration name, set * of models used to make the search. *
            @@ -25864,6 +34442,12 @@ public Builder clearServingConfig() { * `projects/*/locations/global/collections/default_collection/engines/*/servingConfigs/default_serving_config`, * or * `projects/*/locations/global/collections/default_collection/dataStores/*/servingConfigs/default_serving_config`. + * + * Or the resource name of the agent engine serving config, such as: + * `projects/*/locations/global/collections/default_collection/engines/*/servingConfigs/default_agent_answer`. + * (use when `enable_agent_invocation` set to true, and you have custom + * `AI_MODE` agent engine configured) + * * This field is used to identify the serving configuration name, set * of models used to make the search. *
            @@ -27594,7 +36178,7 @@ public Builder clearQueryUnderstandingSpec() { * * @deprecated google.cloud.discoveryengine.v1beta.AnswerQueryRequest.asynchronous_mode is * deprecated. See - * google/cloud/discoveryengine/v1beta/conversational_search_service.proto;l=861 + * google/cloud/discoveryengine/v1beta/conversational_search_service.proto;l=1021 * @return The asynchronousMode. */ @java.lang.Override @@ -27625,7 +36209,7 @@ public boolean getAsynchronousMode() { * * @deprecated google.cloud.discoveryengine.v1beta.AnswerQueryRequest.asynchronous_mode is * deprecated. See - * google/cloud/discoveryengine/v1beta/conversational_search_service.proto;l=861 + * google/cloud/discoveryengine/v1beta/conversational_search_service.proto;l=1021 * @param value The asynchronousMode to set. * @return This builder for chaining. */ @@ -27660,7 +36244,7 @@ public Builder setAsynchronousMode(boolean value) { * * @deprecated google.cloud.discoveryengine.v1beta.AnswerQueryRequest.asynchronous_mode is * deprecated. See - * google/cloud/discoveryengine/v1beta/conversational_search_service.proto;l=861 + * google/cloud/discoveryengine/v1beta/conversational_search_service.proto;l=1021 * @return This builder for chaining. */ @java.lang.Deprecated @@ -28109,6 +36693,228 @@ public Builder putAllUserLabels(java.util.Map + endUserSpecBuilder_; + + /** + * + * + *
            +     * Optional. End user specification.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec end_user_spec = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the endUserSpec field is set. + */ + public boolean hasEndUserSpec() { + return ((bitField0_ & 0x00001000) != 0); + } + + /** + * + * + *
            +     * Optional. End user specification.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec end_user_spec = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The endUserSpec. + */ + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec getEndUserSpec() { + if (endUserSpecBuilder_ == null) { + return endUserSpec_ == null + ? com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec + .getDefaultInstance() + : endUserSpec_; + } else { + return endUserSpecBuilder_.getMessage(); + } + } + + /** + * + * + *
            +     * Optional. End user specification.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec end_user_spec = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setEndUserSpec( + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec value) { + if (endUserSpecBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + endUserSpec_ = value; + } else { + endUserSpecBuilder_.setMessage(value); + } + bitField0_ |= 0x00001000; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Optional. End user specification.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec end_user_spec = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setEndUserSpec( + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec.Builder + builderForValue) { + if (endUserSpecBuilder_ == null) { + endUserSpec_ = builderForValue.build(); + } else { + endUserSpecBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00001000; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Optional. End user specification.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec end_user_spec = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeEndUserSpec( + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec value) { + if (endUserSpecBuilder_ == null) { + if (((bitField0_ & 0x00001000) != 0) + && endUserSpec_ != null + && endUserSpec_ + != com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec + .getDefaultInstance()) { + getEndUserSpecBuilder().mergeFrom(value); + } else { + endUserSpec_ = value; + } + } else { + endUserSpecBuilder_.mergeFrom(value); + } + if (endUserSpec_ != null) { + bitField0_ |= 0x00001000; + onChanged(); + } + return this; + } + + /** + * + * + *
            +     * Optional. End user specification.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec end_user_spec = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearEndUserSpec() { + bitField0_ = (bitField0_ & ~0x00001000); + endUserSpec_ = null; + if (endUserSpecBuilder_ != null) { + endUserSpecBuilder_.dispose(); + endUserSpecBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
            +     * Optional. End user specification.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec end_user_spec = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec.Builder + getEndUserSpecBuilder() { + bitField0_ |= 0x00001000; + onChanged(); + return internalGetEndUserSpecFieldBuilder().getBuilder(); + } + + /** + * + * + *
            +     * Optional. End user specification.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec end_user_spec = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpecOrBuilder + getEndUserSpecOrBuilder() { + if (endUserSpecBuilder_ != null) { + return endUserSpecBuilder_.getMessageOrBuilder(); + } else { + return endUserSpec_ == null + ? com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec + .getDefaultInstance() + : endUserSpec_; + } + } + + /** + * + * + *
            +     * Optional. End user specification.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec end_user_spec = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec, + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec.Builder, + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpecOrBuilder> + internalGetEndUserSpecFieldBuilder() { + if (endUserSpecBuilder_ == null) { + endUserSpecBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec, + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec.Builder, + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpecOrBuilder>( + getEndUserSpec(), getParentForChildren(), isClean()); + endUserSpec_ = null; + } + return endUserSpecBuilder_; + } + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.AnswerQueryRequest) } diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/AnswerQueryRequestOrBuilder.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/AnswerQueryRequestOrBuilder.java index c2e5b5ec95f8..ea6689e21f4c 100644 --- a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/AnswerQueryRequestOrBuilder.java +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/AnswerQueryRequestOrBuilder.java @@ -34,6 +34,12 @@ public interface AnswerQueryRequestOrBuilder * `projects/*/locations/global/collections/default_collection/engines/*/servingConfigs/default_serving_config`, * or * `projects/*/locations/global/collections/default_collection/dataStores/*/servingConfigs/default_serving_config`. + * + * Or the resource name of the agent engine serving config, such as: + * `projects/*/locations/global/collections/default_collection/engines/*/servingConfigs/default_agent_answer`. + * (use when `enable_agent_invocation` set to true, and you have custom + * `AI_MODE` agent engine configured) + * * This field is used to identify the serving configuration name, set * of models used to make the search. *
            @@ -54,6 +60,12 @@ public interface AnswerQueryRequestOrBuilder * `projects/*/locations/global/collections/default_collection/engines/*/servingConfigs/default_serving_config`, * or * `projects/*/locations/global/collections/default_collection/dataStores/*/servingConfigs/default_serving_config`. + * + * Or the resource name of the agent engine serving config, such as: + * `projects/*/locations/global/collections/default_collection/engines/*/servingConfigs/default_agent_answer`. + * (use when `enable_agent_invocation` set to true, and you have custom + * `AI_MODE` agent engine configured) + * * This field is used to identify the serving configuration name, set * of models used to make the search. *
            @@ -428,7 +440,7 @@ public interface AnswerQueryRequestOrBuilder * * @deprecated google.cloud.discoveryengine.v1beta.AnswerQueryRequest.asynchronous_mode is * deprecated. See - * google/cloud/discoveryengine/v1beta/conversational_search_service.proto;l=861 + * google/cloud/discoveryengine/v1beta/conversational_search_service.proto;l=1021 * @return The asynchronousMode. */ @java.lang.Deprecated @@ -618,4 +630,48 @@ java.lang.String getUserLabelsOrDefault( * map<string, string> user_labels = 13; */ java.lang.String getUserLabelsOrThrow(java.lang.String key); + + /** + * + * + *
            +   * Optional. End user specification.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec end_user_spec = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the endUserSpec field is set. + */ + boolean hasEndUserSpec(); + + /** + * + * + *
            +   * Optional. End user specification.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec end_user_spec = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The endUserSpec. + */ + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec getEndUserSpec(); + + /** + * + * + *
            +   * Optional. End user specification.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpec end_user_spec = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpecOrBuilder + getEndUserSpecOrBuilder(); } diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/AssistAnswer.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/AssistAnswer.java new file mode 100644 index 000000000000..cf01919066a5 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/AssistAnswer.java @@ -0,0 +1,8864 @@ +/* + * 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/cloud/discoveryengine/v1beta/assist_answer.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.discoveryengine.v1beta; + +/** + * + * + *
            + * AssistAnswer resource, main part of
            + * [AssistResponse][google.cloud.discoveryengine.v1beta.AssistResponse].
            + * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.AssistAnswer} + */ +@com.google.protobuf.Generated +public final class AssistAnswer extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.AssistAnswer) + AssistAnswerOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "AssistAnswer"); + } + + // Use AssistAnswer.newBuilder() to construct. + private AssistAnswer(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private AssistAnswer() { + name_ = ""; + state_ = 0; + replies_ = java.util.Collections.emptyList(); + assistSkippedReasons_ = emptyIntList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.AssistAnswerProto + .internal_static_google_cloud_discoveryengine_v1beta_AssistAnswer_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.AssistAnswerProto + .internal_static_google_cloud_discoveryengine_v1beta_AssistAnswer_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.AssistAnswer.class, + com.google.cloud.discoveryengine.v1beta.AssistAnswer.Builder.class); + } + + /** + * + * + *
            +   * State of the answer generation.
            +   * 
            + * + * Protobuf enum {@code google.cloud.discoveryengine.v1beta.AssistAnswer.State} + */ + public enum State implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
            +     * Unknown.
            +     * 
            + * + * STATE_UNSPECIFIED = 0; + */ + STATE_UNSPECIFIED(0), + /** + * + * + *
            +     * Assist operation is currently in progress.
            +     * 
            + * + * IN_PROGRESS = 1; + */ + IN_PROGRESS(1), + /** + * + * + *
            +     * Assist operation has failed.
            +     * 
            + * + * FAILED = 2; + */ + FAILED(2), + /** + * + * + *
            +     * Assist operation has succeeded.
            +     * 
            + * + * SUCCEEDED = 3; + */ + SUCCEEDED(3), + /** + * + * + *
            +     * Assist operation has been skipped.
            +     * 
            + * + * SKIPPED = 4; + */ + SKIPPED(4), + /** + * + * + *
            +     * Assist operation has been cancelled (e.g. client closed the stream).
            +     * May contain a partial response.
            +     * 
            + * + * CANCELLED = 5; + */ + CANCELLED(5), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "State"); + } + + /** + * + * + *
            +     * Unknown.
            +     * 
            + * + * STATE_UNSPECIFIED = 0; + */ + public static final int STATE_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
            +     * Assist operation is currently in progress.
            +     * 
            + * + * IN_PROGRESS = 1; + */ + public static final int IN_PROGRESS_VALUE = 1; + + /** + * + * + *
            +     * Assist operation has failed.
            +     * 
            + * + * FAILED = 2; + */ + public static final int FAILED_VALUE = 2; + + /** + * + * + *
            +     * Assist operation has succeeded.
            +     * 
            + * + * SUCCEEDED = 3; + */ + public static final int SUCCEEDED_VALUE = 3; + + /** + * + * + *
            +     * Assist operation has been skipped.
            +     * 
            + * + * SKIPPED = 4; + */ + public static final int SKIPPED_VALUE = 4; + + /** + * + * + *
            +     * Assist operation has been cancelled (e.g. client closed the stream).
            +     * May contain a partial response.
            +     * 
            + * + * CANCELLED = 5; + */ + public static final int CANCELLED_VALUE = 5; + + 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 State 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 State forNumber(int value) { + switch (value) { + case 0: + return STATE_UNSPECIFIED; + case 1: + return IN_PROGRESS; + case 2: + return FAILED; + case 3: + return SUCCEEDED; + case 4: + return SKIPPED; + case 5: + return CANCELLED; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public State findValueByNumber(int number) { + return State.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.AssistAnswer.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final State[] VALUES = values(); + + public static State valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private State(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.discoveryengine.v1beta.AssistAnswer.State) + } + + /** + * + * + *
            +   * Possible reasons for not answering an assist call.
            +   * 
            + * + * Protobuf enum {@code google.cloud.discoveryengine.v1beta.AssistAnswer.AssistSkippedReason} + */ + public enum AssistSkippedReason implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
            +     * Default value. Skip reason is not specified.
            +     * 
            + * + * ASSIST_SKIPPED_REASON_UNSPECIFIED = 0; + */ + ASSIST_SKIPPED_REASON_UNSPECIFIED(0), + /** + * + * + *
            +     * The assistant ignored the query, because it did not appear to be
            +     * answer-seeking.
            +     * 
            + * + * NON_ASSIST_SEEKING_QUERY_IGNORED = 1; + */ + NON_ASSIST_SEEKING_QUERY_IGNORED(1), + /** + * + * + *
            +     * The assistant ignored the query or refused to answer because of a
            +     * customer policy violation (e.g., the query or the answer contained a
            +     * banned phrase).
            +     * 
            + * + * CUSTOMER_POLICY_VIOLATION = 2; + */ + CUSTOMER_POLICY_VIOLATION(2), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "AssistSkippedReason"); + } + + /** + * + * + *
            +     * Default value. Skip reason is not specified.
            +     * 
            + * + * ASSIST_SKIPPED_REASON_UNSPECIFIED = 0; + */ + public static final int ASSIST_SKIPPED_REASON_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
            +     * The assistant ignored the query, because it did not appear to be
            +     * answer-seeking.
            +     * 
            + * + * NON_ASSIST_SEEKING_QUERY_IGNORED = 1; + */ + public static final int NON_ASSIST_SEEKING_QUERY_IGNORED_VALUE = 1; + + /** + * + * + *
            +     * The assistant ignored the query or refused to answer because of a
            +     * customer policy violation (e.g., the query or the answer contained a
            +     * banned phrase).
            +     * 
            + * + * CUSTOMER_POLICY_VIOLATION = 2; + */ + public static final int CUSTOMER_POLICY_VIOLATION_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 AssistSkippedReason 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 AssistSkippedReason forNumber(int value) { + switch (value) { + case 0: + return ASSIST_SKIPPED_REASON_UNSPECIFIED; + case 1: + return NON_ASSIST_SEEKING_QUERY_IGNORED; + case 2: + return CUSTOMER_POLICY_VIOLATION; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap + internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public AssistSkippedReason findValueByNumber(int number) { + return AssistSkippedReason.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.AssistAnswer.getDescriptor() + .getEnumTypes() + .get(1); + } + + private static final AssistSkippedReason[] VALUES = values(); + + public static AssistSkippedReason valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private AssistSkippedReason(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.discoveryengine.v1beta.AssistAnswer.AssistSkippedReason) + } + + public interface ReplyOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.AssistAnswer.Reply) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
            +     * Possibly grounded response text or media from the assistant.
            +     * 
            + * + * .google.cloud.discoveryengine.v1beta.AssistantGroundedContent grounded_content = 1; + * + * + * @return Whether the groundedContent field is set. + */ + boolean hasGroundedContent(); + + /** + * + * + *
            +     * Possibly grounded response text or media from the assistant.
            +     * 
            + * + * .google.cloud.discoveryengine.v1beta.AssistantGroundedContent grounded_content = 1; + * + * + * @return The groundedContent. + */ + com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent getGroundedContent(); + + /** + * + * + *
            +     * Possibly grounded response text or media from the assistant.
            +     * 
            + * + * .google.cloud.discoveryengine.v1beta.AssistantGroundedContent grounded_content = 1; + * + */ + com.google.cloud.discoveryengine.v1beta.AssistantGroundedContentOrBuilder + getGroundedContentOrBuilder(); + + /** + * + * + *
            +     * The time when the reply was created.
            +     * 
            + * + * .google.protobuf.Timestamp create_time = 14; + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + + /** + * + * + *
            +     * The time when the reply was created.
            +     * 
            + * + * .google.protobuf.Timestamp create_time = 14; + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + + /** + * + * + *
            +     * The time when the reply was created.
            +     * 
            + * + * .google.protobuf.Timestamp create_time = 14; + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + com.google.cloud.discoveryengine.v1beta.AssistAnswer.Reply.ReplyCase getReplyCase(); + } + + /** + * + * + *
            +   * One part of the multi-part response of the assist call.
            +   * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.AssistAnswer.Reply} + */ + public static final class Reply extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.AssistAnswer.Reply) + ReplyOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Reply"); + } + + // Use Reply.newBuilder() to construct. + private Reply(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private Reply() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.AssistAnswerProto + .internal_static_google_cloud_discoveryengine_v1beta_AssistAnswer_Reply_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.AssistAnswerProto + .internal_static_google_cloud_discoveryengine_v1beta_AssistAnswer_Reply_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.AssistAnswer.Reply.class, + com.google.cloud.discoveryengine.v1beta.AssistAnswer.Reply.Builder.class); + } + + private int bitField0_; + private int replyCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object reply_; + + public enum ReplyCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + GROUNDED_CONTENT(1), + REPLY_NOT_SET(0); + private final int value; + + private ReplyCase(int value) { + this.value = value; + } + + /** + * @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 ReplyCase valueOf(int value) { + return forNumber(value); + } + + public static ReplyCase forNumber(int value) { + switch (value) { + case 1: + return GROUNDED_CONTENT; + case 0: + return REPLY_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public ReplyCase getReplyCase() { + return ReplyCase.forNumber(replyCase_); + } + + public static final int GROUNDED_CONTENT_FIELD_NUMBER = 1; + + /** + * + * + *
            +     * Possibly grounded response text or media from the assistant.
            +     * 
            + * + * .google.cloud.discoveryengine.v1beta.AssistantGroundedContent grounded_content = 1; + * + * + * @return Whether the groundedContent field is set. + */ + @java.lang.Override + public boolean hasGroundedContent() { + return replyCase_ == 1; + } + + /** + * + * + *
            +     * Possibly grounded response text or media from the assistant.
            +     * 
            + * + * .google.cloud.discoveryengine.v1beta.AssistantGroundedContent grounded_content = 1; + * + * + * @return The groundedContent. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent getGroundedContent() { + if (replyCase_ == 1) { + return (com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent) reply_; + } + return com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent.getDefaultInstance(); + } + + /** + * + * + *
            +     * Possibly grounded response text or media from the assistant.
            +     * 
            + * + * .google.cloud.discoveryengine.v1beta.AssistantGroundedContent grounded_content = 1; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AssistantGroundedContentOrBuilder + getGroundedContentOrBuilder() { + if (replyCase_ == 1) { + return (com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent) reply_; + } + return com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent.getDefaultInstance(); + } + + public static final int CREATE_TIME_FIELD_NUMBER = 14; + private com.google.protobuf.Timestamp createTime_; + + /** + * + * + *
            +     * The time when the reply was created.
            +     * 
            + * + * .google.protobuf.Timestamp create_time = 14; + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
            +     * The time when the reply was created.
            +     * 
            + * + * .google.protobuf.Timestamp create_time = 14; + * + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + /** + * + * + *
            +     * The time when the reply was created.
            +     * 
            + * + * .google.protobuf.Timestamp create_time = 14; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + 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 (replyCase_ == 1) { + output.writeMessage( + 1, (com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent) reply_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(14, getCreateTime()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (replyCase_ == 1) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 1, (com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent) reply_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(14, getCreateTime()); + } + 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.discoveryengine.v1beta.AssistAnswer.Reply)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1beta.AssistAnswer.Reply other = + (com.google.cloud.discoveryengine.v1beta.AssistAnswer.Reply) obj; + + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (!getReplyCase().equals(other.getReplyCase())) return false; + switch (replyCase_) { + case 1: + if (!getGroundedContent().equals(other.getGroundedContent())) return false; + break; + case 0: + default: + } + 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 (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + switch (replyCase_) { + case 1: + hash = (37 * hash) + GROUNDED_CONTENT_FIELD_NUMBER; + hash = (53 * hash) + getGroundedContent().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1beta.AssistAnswer.Reply parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.AssistAnswer.Reply 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.discoveryengine.v1beta.AssistAnswer.Reply parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.AssistAnswer.Reply 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.discoveryengine.v1beta.AssistAnswer.Reply parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.AssistAnswer.Reply parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1beta.AssistAnswer.Reply parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.AssistAnswer.Reply 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.discoveryengine.v1beta.AssistAnswer.Reply parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.AssistAnswer.Reply 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.discoveryengine.v1beta.AssistAnswer.Reply parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.AssistAnswer.Reply 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.discoveryengine.v1beta.AssistAnswer.Reply 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; + } + + /** + * + * + *
            +     * One part of the multi-part response of the assist call.
            +     * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.AssistAnswer.Reply} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.AssistAnswer.Reply) + com.google.cloud.discoveryengine.v1beta.AssistAnswer.ReplyOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.AssistAnswerProto + .internal_static_google_cloud_discoveryengine_v1beta_AssistAnswer_Reply_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.AssistAnswerProto + .internal_static_google_cloud_discoveryengine_v1beta_AssistAnswer_Reply_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.AssistAnswer.Reply.class, + com.google.cloud.discoveryengine.v1beta.AssistAnswer.Reply.Builder.class); + } + + // Construct using com.google.cloud.discoveryengine.v1beta.AssistAnswer.Reply.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetCreateTimeFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (groundedContentBuilder_ != null) { + groundedContentBuilder_.clear(); + } + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + replyCase_ = 0; + reply_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1beta.AssistAnswerProto + .internal_static_google_cloud_discoveryengine_v1beta_AssistAnswer_Reply_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AssistAnswer.Reply + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1beta.AssistAnswer.Reply.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AssistAnswer.Reply build() { + com.google.cloud.discoveryengine.v1beta.AssistAnswer.Reply result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AssistAnswer.Reply buildPartial() { + com.google.cloud.discoveryengine.v1beta.AssistAnswer.Reply result = + new com.google.cloud.discoveryengine.v1beta.AssistAnswer.Reply(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.discoveryengine.v1beta.AssistAnswer.Reply result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.createTime_ = + createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + private void buildPartialOneofs( + com.google.cloud.discoveryengine.v1beta.AssistAnswer.Reply result) { + result.replyCase_ = replyCase_; + result.reply_ = this.reply_; + if (replyCase_ == 1 && groundedContentBuilder_ != null) { + result.reply_ = groundedContentBuilder_.build(); + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.discoveryengine.v1beta.AssistAnswer.Reply) { + return mergeFrom((com.google.cloud.discoveryengine.v1beta.AssistAnswer.Reply) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.discoveryengine.v1beta.AssistAnswer.Reply other) { + if (other + == com.google.cloud.discoveryengine.v1beta.AssistAnswer.Reply.getDefaultInstance()) + return this; + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + switch (other.getReplyCase()) { + case GROUNDED_CONTENT: + { + mergeGroundedContent(other.getGroundedContent()); + break; + } + case REPLY_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage( + internalGetGroundedContentFieldBuilder().getBuilder(), extensionRegistry); + replyCase_ = 1; + break; + } // case 10 + case 114: + { + input.readMessage( + internalGetCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 114 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int replyCase_ = 0; + private java.lang.Object reply_; + + public ReplyCase getReplyCase() { + return ReplyCase.forNumber(replyCase_); + } + + public Builder clearReply() { + replyCase_ = 0; + reply_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent, + com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent.Builder, + com.google.cloud.discoveryengine.v1beta.AssistantGroundedContentOrBuilder> + groundedContentBuilder_; + + /** + * + * + *
            +       * Possibly grounded response text or media from the assistant.
            +       * 
            + * + * .google.cloud.discoveryengine.v1beta.AssistantGroundedContent grounded_content = 1; + * + * + * @return Whether the groundedContent field is set. + */ + @java.lang.Override + public boolean hasGroundedContent() { + return replyCase_ == 1; + } + + /** + * + * + *
            +       * Possibly grounded response text or media from the assistant.
            +       * 
            + * + * .google.cloud.discoveryengine.v1beta.AssistantGroundedContent grounded_content = 1; + * + * + * @return The groundedContent. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent getGroundedContent() { + if (groundedContentBuilder_ == null) { + if (replyCase_ == 1) { + return (com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent) reply_; + } + return com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent + .getDefaultInstance(); + } else { + if (replyCase_ == 1) { + return groundedContentBuilder_.getMessage(); + } + return com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent + .getDefaultInstance(); + } + } + + /** + * + * + *
            +       * Possibly grounded response text or media from the assistant.
            +       * 
            + * + * .google.cloud.discoveryengine.v1beta.AssistantGroundedContent grounded_content = 1; + * + */ + public Builder setGroundedContent( + com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent value) { + if (groundedContentBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + reply_ = value; + onChanged(); + } else { + groundedContentBuilder_.setMessage(value); + } + replyCase_ = 1; + return this; + } + + /** + * + * + *
            +       * Possibly grounded response text or media from the assistant.
            +       * 
            + * + * .google.cloud.discoveryengine.v1beta.AssistantGroundedContent grounded_content = 1; + * + */ + public Builder setGroundedContent( + com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent.Builder + builderForValue) { + if (groundedContentBuilder_ == null) { + reply_ = builderForValue.build(); + onChanged(); + } else { + groundedContentBuilder_.setMessage(builderForValue.build()); + } + replyCase_ = 1; + return this; + } + + /** + * + * + *
            +       * Possibly grounded response text or media from the assistant.
            +       * 
            + * + * .google.cloud.discoveryengine.v1beta.AssistantGroundedContent grounded_content = 1; + * + */ + public Builder mergeGroundedContent( + com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent value) { + if (groundedContentBuilder_ == null) { + if (replyCase_ == 1 + && reply_ + != com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent + .getDefaultInstance()) { + reply_ = + com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent.newBuilder( + (com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent) reply_) + .mergeFrom(value) + .buildPartial(); + } else { + reply_ = value; + } + onChanged(); + } else { + if (replyCase_ == 1) { + groundedContentBuilder_.mergeFrom(value); + } else { + groundedContentBuilder_.setMessage(value); + } + } + replyCase_ = 1; + return this; + } + + /** + * + * + *
            +       * Possibly grounded response text or media from the assistant.
            +       * 
            + * + * .google.cloud.discoveryengine.v1beta.AssistantGroundedContent grounded_content = 1; + * + */ + public Builder clearGroundedContent() { + if (groundedContentBuilder_ == null) { + if (replyCase_ == 1) { + replyCase_ = 0; + reply_ = null; + onChanged(); + } + } else { + if (replyCase_ == 1) { + replyCase_ = 0; + reply_ = null; + } + groundedContentBuilder_.clear(); + } + return this; + } + + /** + * + * + *
            +       * Possibly grounded response text or media from the assistant.
            +       * 
            + * + * .google.cloud.discoveryengine.v1beta.AssistantGroundedContent grounded_content = 1; + * + */ + public com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent.Builder + getGroundedContentBuilder() { + return internalGetGroundedContentFieldBuilder().getBuilder(); + } + + /** + * + * + *
            +       * Possibly grounded response text or media from the assistant.
            +       * 
            + * + * .google.cloud.discoveryengine.v1beta.AssistantGroundedContent grounded_content = 1; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AssistantGroundedContentOrBuilder + getGroundedContentOrBuilder() { + if ((replyCase_ == 1) && (groundedContentBuilder_ != null)) { + return groundedContentBuilder_.getMessageOrBuilder(); + } else { + if (replyCase_ == 1) { + return (com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent) reply_; + } + return com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent + .getDefaultInstance(); + } + } + + /** + * + * + *
            +       * Possibly grounded response text or media from the assistant.
            +       * 
            + * + * .google.cloud.discoveryengine.v1beta.AssistantGroundedContent grounded_content = 1; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent, + com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent.Builder, + com.google.cloud.discoveryengine.v1beta.AssistantGroundedContentOrBuilder> + internalGetGroundedContentFieldBuilder() { + if (groundedContentBuilder_ == null) { + if (!(replyCase_ == 1)) { + reply_ = + com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent + .getDefaultInstance(); + } + groundedContentBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent, + com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent.Builder, + com.google.cloud.discoveryengine.v1beta.AssistantGroundedContentOrBuilder>( + (com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent) reply_, + getParentForChildren(), + isClean()); + reply_ = null; + } + replyCase_ = 1; + onChanged(); + return groundedContentBuilder_; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + + /** + * + * + *
            +       * The time when the reply was created.
            +       * 
            + * + * .google.protobuf.Timestamp create_time = 14; + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
            +       * The time when the reply was created.
            +       * 
            + * + * .google.protobuf.Timestamp create_time = 14; + * + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
            +       * The time when the reply was created.
            +       * 
            + * + * .google.protobuf.Timestamp create_time = 14; + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + } else { + createTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
            +       * The time when the reply was created.
            +       * 
            + * + * .google.protobuf.Timestamp create_time = 14; + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
            +       * The time when the reply was created.
            +       * 
            + * + * .google.protobuf.Timestamp create_time = 14; + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && createTime_ != null + && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); + } + if (createTime_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** + * + * + *
            +       * The time when the reply was created.
            +       * 
            + * + * .google.protobuf.Timestamp create_time = 14; + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000002); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
            +       * The time when the reply was created.
            +       * 
            + * + * .google.protobuf.Timestamp create_time = 14; + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return internalGetCreateTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
            +       * The time when the reply was created.
            +       * 
            + * + * .google.protobuf.Timestamp create_time = 14; + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } + + /** + * + * + *
            +       * The time when the reply was created.
            +       * 
            + * + * .google.protobuf.Timestamp create_time = 14; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + internalGetCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.AssistAnswer.Reply) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.AssistAnswer.Reply) + private static final com.google.cloud.discoveryengine.v1beta.AssistAnswer.Reply + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.discoveryengine.v1beta.AssistAnswer.Reply(); + } + + public static com.google.cloud.discoveryengine.v1beta.AssistAnswer.Reply getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Reply parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AssistAnswer.Reply getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface CustomerPolicyEnforcementResultOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
            +     * Final verdict of the customer policy enforcement. If only one policy
            +     * blocked the processing, the verdict is BLOCK.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult.Verdict verdict = 1; + * + * + * @return The enum numeric value on the wire for verdict. + */ + int getVerdictValue(); + + /** + * + * + *
            +     * Final verdict of the customer policy enforcement. If only one policy
            +     * blocked the processing, the verdict is BLOCK.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult.Verdict verdict = 1; + * + * + * @return The verdict. + */ + com.google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult.Verdict + getVerdict(); + + /** + * + * + *
            +     * Customer policy enforcement results.
            +     * Populated only if the assist call was skipped due to a policy
            +     * violation. It contains results from those filters that blocked the
            +     * processing of the query.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult.PolicyEnforcementResult policy_results = 3; + * + */ + java.util.List< + com.google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult + .PolicyEnforcementResult> + getPolicyResultsList(); + + /** + * + * + *
            +     * Customer policy enforcement results.
            +     * Populated only if the assist call was skipped due to a policy
            +     * violation. It contains results from those filters that blocked the
            +     * processing of the query.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult.PolicyEnforcementResult policy_results = 3; + * + */ + com.google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult + .PolicyEnforcementResult + getPolicyResults(int index); + + /** + * + * + *
            +     * Customer policy enforcement results.
            +     * Populated only if the assist call was skipped due to a policy
            +     * violation. It contains results from those filters that blocked the
            +     * processing of the query.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult.PolicyEnforcementResult policy_results = 3; + * + */ + int getPolicyResultsCount(); + + /** + * + * + *
            +     * Customer policy enforcement results.
            +     * Populated only if the assist call was skipped due to a policy
            +     * violation. It contains results from those filters that blocked the
            +     * processing of the query.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult.PolicyEnforcementResult policy_results = 3; + * + */ + java.util.List< + ? extends + com.google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult + .PolicyEnforcementResultOrBuilder> + getPolicyResultsOrBuilderList(); + + /** + * + * + *
            +     * Customer policy enforcement results.
            +     * Populated only if the assist call was skipped due to a policy
            +     * violation. It contains results from those filters that blocked the
            +     * processing of the query.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult.PolicyEnforcementResult policy_results = 3; + * + */ + com.google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult + .PolicyEnforcementResultOrBuilder + getPolicyResultsOrBuilder(int index); + } + + /** + * + * + *
            +   * Customer policy enforcement results. Contains the results of the various
            +   * policy checks, like the banned phrases or the Model Armor checks.
            +   * 
            + * + * Protobuf type {@code + * google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult} + */ + public static final class CustomerPolicyEnforcementResult + extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult) + CustomerPolicyEnforcementResultOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "CustomerPolicyEnforcementResult"); + } + + // Use CustomerPolicyEnforcementResult.newBuilder() to construct. + private CustomerPolicyEnforcementResult( + com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private CustomerPolicyEnforcementResult() { + verdict_ = 0; + policyResults_ = java.util.Collections.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.AssistAnswerProto + .internal_static_google_cloud_discoveryengine_v1beta_AssistAnswer_CustomerPolicyEnforcementResult_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.AssistAnswerProto + .internal_static_google_cloud_discoveryengine_v1beta_AssistAnswer_CustomerPolicyEnforcementResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult + .class, + com.google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult + .Builder.class); + } + + /** + * + * + *
            +     * The verdict of the customer policy enforcement.
            +     * 
            + * + * Protobuf enum {@code + * google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult.Verdict} + */ + public enum Verdict implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
            +       * Unknown value.
            +       * 
            + * + * UNSPECIFIED = 0; + */ + UNSPECIFIED(0), + /** + * + * + *
            +       * There was no policy violation.
            +       * 
            + * + * ALLOW = 1; + */ + ALLOW(1), + /** + * + * + *
            +       * Processing was blocked by the customer policy.
            +       * 
            + * + * BLOCK = 2; + */ + BLOCK(2), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Verdict"); + } + + /** + * + * + *
            +       * Unknown value.
            +       * 
            + * + * UNSPECIFIED = 0; + */ + public static final int UNSPECIFIED_VALUE = 0; + + /** + * + * + *
            +       * There was no policy violation.
            +       * 
            + * + * ALLOW = 1; + */ + public static final int ALLOW_VALUE = 1; + + /** + * + * + *
            +       * Processing was blocked by the customer policy.
            +       * 
            + * + * BLOCK = 2; + */ + public static final int BLOCK_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 Verdict 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 Verdict forNumber(int value) { + switch (value) { + case 0: + return UNSPECIFIED; + case 1: + return ALLOW; + case 2: + return BLOCK; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public Verdict findValueByNumber(int number) { + return Verdict.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult + .getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final Verdict[] VALUES = values(); + + public static Verdict valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private Verdict(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult.Verdict) + } + + public interface BannedPhraseEnforcementResultOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult.BannedPhraseEnforcementResult) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
            +       * The banned phrases that were found in the query or the answer.
            +       * 
            + * + * repeated string banned_phrases = 1; + * + * @return A list containing the bannedPhrases. + */ + java.util.List getBannedPhrasesList(); + + /** + * + * + *
            +       * The banned phrases that were found in the query or the answer.
            +       * 
            + * + * repeated string banned_phrases = 1; + * + * @return The count of bannedPhrases. + */ + int getBannedPhrasesCount(); + + /** + * + * + *
            +       * The banned phrases that were found in the query or the answer.
            +       * 
            + * + * repeated string banned_phrases = 1; + * + * @param index The index of the element to return. + * @return The bannedPhrases at the given index. + */ + java.lang.String getBannedPhrases(int index); + + /** + * + * + *
            +       * The banned phrases that were found in the query or the answer.
            +       * 
            + * + * repeated string banned_phrases = 1; + * + * @param index The index of the value to return. + * @return The bytes of the bannedPhrases at the given index. + */ + com.google.protobuf.ByteString getBannedPhrasesBytes(int index); + } + + /** + * + * + *
            +     * Customer policy enforcement result for the banned phrase policy.
            +     * 
            + * + * Protobuf type {@code + * google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult.BannedPhraseEnforcementResult} + */ + public static final class BannedPhraseEnforcementResult + extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult.BannedPhraseEnforcementResult) + BannedPhraseEnforcementResultOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "BannedPhraseEnforcementResult"); + } + + // Use BannedPhraseEnforcementResult.newBuilder() to construct. + private BannedPhraseEnforcementResult( + com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private BannedPhraseEnforcementResult() { + bannedPhrases_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.AssistAnswerProto + .internal_static_google_cloud_discoveryengine_v1beta_AssistAnswer_CustomerPolicyEnforcementResult_BannedPhraseEnforcementResult_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.AssistAnswerProto + .internal_static_google_cloud_discoveryengine_v1beta_AssistAnswer_CustomerPolicyEnforcementResult_BannedPhraseEnforcementResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult + .BannedPhraseEnforcementResult.class, + com.google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult + .BannedPhraseEnforcementResult.Builder.class); + } + + public static final int BANNED_PHRASES_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList bannedPhrases_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + /** + * + * + *
            +       * The banned phrases that were found in the query or the answer.
            +       * 
            + * + * repeated string banned_phrases = 1; + * + * @return A list containing the bannedPhrases. + */ + public com.google.protobuf.ProtocolStringList getBannedPhrasesList() { + return bannedPhrases_; + } + + /** + * + * + *
            +       * The banned phrases that were found in the query or the answer.
            +       * 
            + * + * repeated string banned_phrases = 1; + * + * @return The count of bannedPhrases. + */ + public int getBannedPhrasesCount() { + return bannedPhrases_.size(); + } + + /** + * + * + *
            +       * The banned phrases that were found in the query or the answer.
            +       * 
            + * + * repeated string banned_phrases = 1; + * + * @param index The index of the element to return. + * @return The bannedPhrases at the given index. + */ + public java.lang.String getBannedPhrases(int index) { + return bannedPhrases_.get(index); + } + + /** + * + * + *
            +       * The banned phrases that were found in the query or the answer.
            +       * 
            + * + * repeated string banned_phrases = 1; + * + * @param index The index of the value to return. + * @return The bytes of the bannedPhrases at the given index. + */ + public com.google.protobuf.ByteString getBannedPhrasesBytes(int index) { + return bannedPhrases_.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 { + for (int i = 0; i < bannedPhrases_.size(); i++) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, bannedPhrases_.getRaw(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + { + int dataSize = 0; + for (int i = 0; i < bannedPhrases_.size(); i++) { + dataSize += computeStringSizeNoTag(bannedPhrases_.getRaw(i)); + } + size += dataSize; + size += 1 * getBannedPhrasesList().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.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult + .BannedPhraseEnforcementResult)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult + .BannedPhraseEnforcementResult + other = + (com.google.cloud.discoveryengine.v1beta.AssistAnswer + .CustomerPolicyEnforcementResult.BannedPhraseEnforcementResult) + obj; + + if (!getBannedPhrasesList().equals(other.getBannedPhrasesList())) 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 (getBannedPhrasesCount() > 0) { + hash = (37 * hash) + BANNED_PHRASES_FIELD_NUMBER; + hash = (53 * hash) + getBannedPhrasesList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1beta.AssistAnswer + .CustomerPolicyEnforcementResult.BannedPhraseEnforcementResult + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.AssistAnswer + .CustomerPolicyEnforcementResult.BannedPhraseEnforcementResult + 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.discoveryengine.v1beta.AssistAnswer + .CustomerPolicyEnforcementResult.BannedPhraseEnforcementResult + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.AssistAnswer + .CustomerPolicyEnforcementResult.BannedPhraseEnforcementResult + 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.discoveryengine.v1beta.AssistAnswer + .CustomerPolicyEnforcementResult.BannedPhraseEnforcementResult + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.AssistAnswer + .CustomerPolicyEnforcementResult.BannedPhraseEnforcementResult + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1beta.AssistAnswer + .CustomerPolicyEnforcementResult.BannedPhraseEnforcementResult + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.AssistAnswer + .CustomerPolicyEnforcementResult.BannedPhraseEnforcementResult + 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.discoveryengine.v1beta.AssistAnswer + .CustomerPolicyEnforcementResult.BannedPhraseEnforcementResult + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.AssistAnswer + .CustomerPolicyEnforcementResult.BannedPhraseEnforcementResult + 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.discoveryengine.v1beta.AssistAnswer + .CustomerPolicyEnforcementResult.BannedPhraseEnforcementResult + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.AssistAnswer + .CustomerPolicyEnforcementResult.BannedPhraseEnforcementResult + 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.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult + .BannedPhraseEnforcementResult + 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; + } + + /** + * + * + *
            +       * Customer policy enforcement result for the banned phrase policy.
            +       * 
            + * + * Protobuf type {@code + * google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult.BannedPhraseEnforcementResult} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult.BannedPhraseEnforcementResult) + com.google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult + .BannedPhraseEnforcementResultOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.AssistAnswerProto + .internal_static_google_cloud_discoveryengine_v1beta_AssistAnswer_CustomerPolicyEnforcementResult_BannedPhraseEnforcementResult_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.AssistAnswerProto + .internal_static_google_cloud_discoveryengine_v1beta_AssistAnswer_CustomerPolicyEnforcementResult_BannedPhraseEnforcementResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.AssistAnswer + .CustomerPolicyEnforcementResult.BannedPhraseEnforcementResult.class, + com.google.cloud.discoveryengine.v1beta.AssistAnswer + .CustomerPolicyEnforcementResult.BannedPhraseEnforcementResult.Builder.class); + } + + // Construct using + // com.google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult.BannedPhraseEnforcementResult.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + bannedPhrases_ = com.google.protobuf.LazyStringArrayList.emptyList(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1beta.AssistAnswerProto + .internal_static_google_cloud_discoveryengine_v1beta_AssistAnswer_CustomerPolicyEnforcementResult_BannedPhraseEnforcementResult_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult + .BannedPhraseEnforcementResult + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1beta.AssistAnswer + .CustomerPolicyEnforcementResult.BannedPhraseEnforcementResult.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult + .BannedPhraseEnforcementResult + build() { + com.google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult + .BannedPhraseEnforcementResult + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult + .BannedPhraseEnforcementResult + buildPartial() { + com.google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult + .BannedPhraseEnforcementResult + result = + new com.google.cloud.discoveryengine.v1beta.AssistAnswer + .CustomerPolicyEnforcementResult.BannedPhraseEnforcementResult(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult + .BannedPhraseEnforcementResult + result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + bannedPhrases_.makeImmutable(); + result.bannedPhrases_ = bannedPhrases_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult + .BannedPhraseEnforcementResult) { + return mergeFrom( + (com.google.cloud.discoveryengine.v1beta.AssistAnswer + .CustomerPolicyEnforcementResult.BannedPhraseEnforcementResult) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult + .BannedPhraseEnforcementResult + other) { + if (other + == com.google.cloud.discoveryengine.v1beta.AssistAnswer + .CustomerPolicyEnforcementResult.BannedPhraseEnforcementResult + .getDefaultInstance()) return this; + if (!other.bannedPhrases_.isEmpty()) { + if (bannedPhrases_.isEmpty()) { + bannedPhrases_ = other.bannedPhrases_; + bitField0_ |= 0x00000001; + } else { + ensureBannedPhrasesIsMutable(); + bannedPhrases_.addAll(other.bannedPhrases_); + } + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureBannedPhrasesIsMutable(); + bannedPhrases_.add(s); + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.protobuf.LazyStringArrayList bannedPhrases_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureBannedPhrasesIsMutable() { + if (!bannedPhrases_.isModifiable()) { + bannedPhrases_ = new com.google.protobuf.LazyStringArrayList(bannedPhrases_); + } + bitField0_ |= 0x00000001; + } + + /** + * + * + *
            +         * The banned phrases that were found in the query or the answer.
            +         * 
            + * + * repeated string banned_phrases = 1; + * + * @return A list containing the bannedPhrases. + */ + public com.google.protobuf.ProtocolStringList getBannedPhrasesList() { + bannedPhrases_.makeImmutable(); + return bannedPhrases_; + } + + /** + * + * + *
            +         * The banned phrases that were found in the query or the answer.
            +         * 
            + * + * repeated string banned_phrases = 1; + * + * @return The count of bannedPhrases. + */ + public int getBannedPhrasesCount() { + return bannedPhrases_.size(); + } + + /** + * + * + *
            +         * The banned phrases that were found in the query or the answer.
            +         * 
            + * + * repeated string banned_phrases = 1; + * + * @param index The index of the element to return. + * @return The bannedPhrases at the given index. + */ + public java.lang.String getBannedPhrases(int index) { + return bannedPhrases_.get(index); + } + + /** + * + * + *
            +         * The banned phrases that were found in the query or the answer.
            +         * 
            + * + * repeated string banned_phrases = 1; + * + * @param index The index of the value to return. + * @return The bytes of the bannedPhrases at the given index. + */ + public com.google.protobuf.ByteString getBannedPhrasesBytes(int index) { + return bannedPhrases_.getByteString(index); + } + + /** + * + * + *
            +         * The banned phrases that were found in the query or the answer.
            +         * 
            + * + * repeated string banned_phrases = 1; + * + * @param index The index to set the value at. + * @param value The bannedPhrases to set. + * @return This builder for chaining. + */ + public Builder setBannedPhrases(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureBannedPhrasesIsMutable(); + bannedPhrases_.set(index, value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
            +         * The banned phrases that were found in the query or the answer.
            +         * 
            + * + * repeated string banned_phrases = 1; + * + * @param value The bannedPhrases to add. + * @return This builder for chaining. + */ + public Builder addBannedPhrases(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureBannedPhrasesIsMutable(); + bannedPhrases_.add(value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
            +         * The banned phrases that were found in the query or the answer.
            +         * 
            + * + * repeated string banned_phrases = 1; + * + * @param values The bannedPhrases to add. + * @return This builder for chaining. + */ + public Builder addAllBannedPhrases(java.lang.Iterable values) { + ensureBannedPhrasesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, bannedPhrases_); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
            +         * The banned phrases that were found in the query or the answer.
            +         * 
            + * + * repeated string banned_phrases = 1; + * + * @return This builder for chaining. + */ + public Builder clearBannedPhrases() { + bannedPhrases_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + ; + onChanged(); + return this; + } + + /** + * + * + *
            +         * The banned phrases that were found in the query or the answer.
            +         * 
            + * + * repeated string banned_phrases = 1; + * + * @param value The bytes of the bannedPhrases to add. + * @return This builder for chaining. + */ + public Builder addBannedPhrasesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureBannedPhrasesIsMutable(); + bannedPhrases_.add(value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult.BannedPhraseEnforcementResult) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult.BannedPhraseEnforcementResult) + private static final com.google.cloud.discoveryengine.v1beta.AssistAnswer + .CustomerPolicyEnforcementResult.BannedPhraseEnforcementResult + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult + .BannedPhraseEnforcementResult(); + } + + public static com.google.cloud.discoveryengine.v1beta.AssistAnswer + .CustomerPolicyEnforcementResult.BannedPhraseEnforcementResult + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BannedPhraseEnforcementResult parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult + .BannedPhraseEnforcementResult + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface ModelArmorEnforcementResultOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult.ModelArmorEnforcementResult) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
            +       * The Model Armor violation that was found.
            +       * 
            + * + * string model_armor_violation = 1; + * + * @return Whether the modelArmorViolation field is set. + */ + boolean hasModelArmorViolation(); + + /** + * + * + *
            +       * The Model Armor violation that was found.
            +       * 
            + * + * string model_armor_violation = 1; + * + * @return The modelArmorViolation. + */ + java.lang.String getModelArmorViolation(); + + /** + * + * + *
            +       * The Model Armor violation that was found.
            +       * 
            + * + * string model_armor_violation = 1; + * + * @return The bytes for modelArmorViolation. + */ + com.google.protobuf.ByteString getModelArmorViolationBytes(); + + /** + * + * + *
            +       * The error returned by Model Armor if the policy enforcement failed
            +       * for some reason.
            +       * 
            + * + * .google.rpc.Status error = 2; + * + * @return Whether the error field is set. + */ + boolean hasError(); + + /** + * + * + *
            +       * The error returned by Model Armor if the policy enforcement failed
            +       * for some reason.
            +       * 
            + * + * .google.rpc.Status error = 2; + * + * @return The error. + */ + com.google.rpc.Status getError(); + + /** + * + * + *
            +       * The error returned by Model Armor if the policy enforcement failed
            +       * for some reason.
            +       * 
            + * + * .google.rpc.Status error = 2; + */ + com.google.rpc.StatusOrBuilder getErrorOrBuilder(); + + com.google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult + .ModelArmorEnforcementResult.ResultCase + getResultCase(); + } + + /** + * + * + *
            +     * Customer policy enforcement result for the Model Armor policy.
            +     * 
            + * + * Protobuf type {@code + * google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult.ModelArmorEnforcementResult} + */ + public static final class ModelArmorEnforcementResult + extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult.ModelArmorEnforcementResult) + ModelArmorEnforcementResultOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ModelArmorEnforcementResult"); + } + + // Use ModelArmorEnforcementResult.newBuilder() to construct. + private ModelArmorEnforcementResult(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ModelArmorEnforcementResult() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.AssistAnswerProto + .internal_static_google_cloud_discoveryengine_v1beta_AssistAnswer_CustomerPolicyEnforcementResult_ModelArmorEnforcementResult_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.AssistAnswerProto + .internal_static_google_cloud_discoveryengine_v1beta_AssistAnswer_CustomerPolicyEnforcementResult_ModelArmorEnforcementResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult + .ModelArmorEnforcementResult.class, + com.google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult + .ModelArmorEnforcementResult.Builder.class); + } + + private int resultCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object result_; + + public enum ResultCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + MODEL_ARMOR_VIOLATION(1), + ERROR(2), + RESULT_NOT_SET(0); + private final int value; + + private ResultCase(int value) { + this.value = value; + } + + /** + * @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 ResultCase valueOf(int value) { + return forNumber(value); + } + + public static ResultCase forNumber(int value) { + switch (value) { + case 1: + return MODEL_ARMOR_VIOLATION; + case 2: + return ERROR; + case 0: + return RESULT_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public ResultCase getResultCase() { + return ResultCase.forNumber(resultCase_); + } + + public static final int MODEL_ARMOR_VIOLATION_FIELD_NUMBER = 1; + + /** + * + * + *
            +       * The Model Armor violation that was found.
            +       * 
            + * + * string model_armor_violation = 1; + * + * @return Whether the modelArmorViolation field is set. + */ + public boolean hasModelArmorViolation() { + return resultCase_ == 1; + } + + /** + * + * + *
            +       * The Model Armor violation that was found.
            +       * 
            + * + * string model_armor_violation = 1; + * + * @return The modelArmorViolation. + */ + public java.lang.String getModelArmorViolation() { + java.lang.Object ref = ""; + if (resultCase_ == 1) { + ref = result_; + } + 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(); + if (resultCase_ == 1) { + result_ = s; + } + return s; + } + } + + /** + * + * + *
            +       * The Model Armor violation that was found.
            +       * 
            + * + * string model_armor_violation = 1; + * + * @return The bytes for modelArmorViolation. + */ + public com.google.protobuf.ByteString getModelArmorViolationBytes() { + java.lang.Object ref = ""; + if (resultCase_ == 1) { + ref = result_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (resultCase_ == 1) { + result_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ERROR_FIELD_NUMBER = 2; + + /** + * + * + *
            +       * The error returned by Model Armor if the policy enforcement failed
            +       * for some reason.
            +       * 
            + * + * .google.rpc.Status error = 2; + * + * @return Whether the error field is set. + */ + @java.lang.Override + public boolean hasError() { + return resultCase_ == 2; + } + + /** + * + * + *
            +       * The error returned by Model Armor if the policy enforcement failed
            +       * for some reason.
            +       * 
            + * + * .google.rpc.Status error = 2; + * + * @return The error. + */ + @java.lang.Override + public com.google.rpc.Status getError() { + if (resultCase_ == 2) { + return (com.google.rpc.Status) result_; + } + return com.google.rpc.Status.getDefaultInstance(); + } + + /** + * + * + *
            +       * The error returned by Model Armor if the policy enforcement failed
            +       * for some reason.
            +       * 
            + * + * .google.rpc.Status error = 2; + */ + @java.lang.Override + public com.google.rpc.StatusOrBuilder getErrorOrBuilder() { + if (resultCase_ == 2) { + return (com.google.rpc.Status) result_; + } + return com.google.rpc.Status.getDefaultInstance(); + } + + 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 (resultCase_ == 1) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, result_); + } + if (resultCase_ == 2) { + output.writeMessage(2, (com.google.rpc.Status) result_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (resultCase_ == 1) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, result_); + } + if (resultCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, (com.google.rpc.Status) result_); + } + 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.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult + .ModelArmorEnforcementResult)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult + .ModelArmorEnforcementResult + other = + (com.google.cloud.discoveryengine.v1beta.AssistAnswer + .CustomerPolicyEnforcementResult.ModelArmorEnforcementResult) + obj; + + if (!getResultCase().equals(other.getResultCase())) return false; + switch (resultCase_) { + case 1: + if (!getModelArmorViolation().equals(other.getModelArmorViolation())) return false; + break; + case 2: + if (!getError().equals(other.getError())) return false; + break; + case 0: + default: + } + 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(); + switch (resultCase_) { + case 1: + hash = (37 * hash) + MODEL_ARMOR_VIOLATION_FIELD_NUMBER; + hash = (53 * hash) + getModelArmorViolation().hashCode(); + break; + case 2: + hash = (37 * hash) + ERROR_FIELD_NUMBER; + hash = (53 * hash) + getError().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1beta.AssistAnswer + .CustomerPolicyEnforcementResult.ModelArmorEnforcementResult + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.AssistAnswer + .CustomerPolicyEnforcementResult.ModelArmorEnforcementResult + 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.discoveryengine.v1beta.AssistAnswer + .CustomerPolicyEnforcementResult.ModelArmorEnforcementResult + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.AssistAnswer + .CustomerPolicyEnforcementResult.ModelArmorEnforcementResult + 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.discoveryengine.v1beta.AssistAnswer + .CustomerPolicyEnforcementResult.ModelArmorEnforcementResult + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.AssistAnswer + .CustomerPolicyEnforcementResult.ModelArmorEnforcementResult + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1beta.AssistAnswer + .CustomerPolicyEnforcementResult.ModelArmorEnforcementResult + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.AssistAnswer + .CustomerPolicyEnforcementResult.ModelArmorEnforcementResult + 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.discoveryengine.v1beta.AssistAnswer + .CustomerPolicyEnforcementResult.ModelArmorEnforcementResult + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.AssistAnswer + .CustomerPolicyEnforcementResult.ModelArmorEnforcementResult + 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.discoveryengine.v1beta.AssistAnswer + .CustomerPolicyEnforcementResult.ModelArmorEnforcementResult + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.AssistAnswer + .CustomerPolicyEnforcementResult.ModelArmorEnforcementResult + 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.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult + .ModelArmorEnforcementResult + 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; + } + + /** + * + * + *
            +       * Customer policy enforcement result for the Model Armor policy.
            +       * 
            + * + * Protobuf type {@code + * google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult.ModelArmorEnforcementResult} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult.ModelArmorEnforcementResult) + com.google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult + .ModelArmorEnforcementResultOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.AssistAnswerProto + .internal_static_google_cloud_discoveryengine_v1beta_AssistAnswer_CustomerPolicyEnforcementResult_ModelArmorEnforcementResult_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.AssistAnswerProto + .internal_static_google_cloud_discoveryengine_v1beta_AssistAnswer_CustomerPolicyEnforcementResult_ModelArmorEnforcementResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.AssistAnswer + .CustomerPolicyEnforcementResult.ModelArmorEnforcementResult.class, + com.google.cloud.discoveryengine.v1beta.AssistAnswer + .CustomerPolicyEnforcementResult.ModelArmorEnforcementResult.Builder.class); + } + + // Construct using + // com.google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult.ModelArmorEnforcementResult.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (errorBuilder_ != null) { + errorBuilder_.clear(); + } + resultCase_ = 0; + result_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1beta.AssistAnswerProto + .internal_static_google_cloud_discoveryengine_v1beta_AssistAnswer_CustomerPolicyEnforcementResult_ModelArmorEnforcementResult_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult + .ModelArmorEnforcementResult + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1beta.AssistAnswer + .CustomerPolicyEnforcementResult.ModelArmorEnforcementResult.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult + .ModelArmorEnforcementResult + build() { + com.google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult + .ModelArmorEnforcementResult + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult + .ModelArmorEnforcementResult + buildPartial() { + com.google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult + .ModelArmorEnforcementResult + result = + new com.google.cloud.discoveryengine.v1beta.AssistAnswer + .CustomerPolicyEnforcementResult.ModelArmorEnforcementResult(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult + .ModelArmorEnforcementResult + result) { + int from_bitField0_ = bitField0_; + } + + private void buildPartialOneofs( + com.google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult + .ModelArmorEnforcementResult + result) { + result.resultCase_ = resultCase_; + result.result_ = this.result_; + if (resultCase_ == 2 && errorBuilder_ != null) { + result.result_ = errorBuilder_.build(); + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult + .ModelArmorEnforcementResult) { + return mergeFrom( + (com.google.cloud.discoveryengine.v1beta.AssistAnswer + .CustomerPolicyEnforcementResult.ModelArmorEnforcementResult) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult + .ModelArmorEnforcementResult + other) { + if (other + == com.google.cloud.discoveryengine.v1beta.AssistAnswer + .CustomerPolicyEnforcementResult.ModelArmorEnforcementResult.getDefaultInstance()) + return this; + switch (other.getResultCase()) { + case MODEL_ARMOR_VIOLATION: + { + resultCase_ = 1; + result_ = other.result_; + onChanged(); + break; + } + case ERROR: + { + mergeError(other.getError()); + break; + } + case RESULT_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + resultCase_ = 1; + result_ = s; + break; + } // case 10 + case 18: + { + input.readMessage( + internalGetErrorFieldBuilder().getBuilder(), extensionRegistry); + resultCase_ = 2; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int resultCase_ = 0; + private java.lang.Object result_; + + public ResultCase getResultCase() { + return ResultCase.forNumber(resultCase_); + } + + public Builder clearResult() { + resultCase_ = 0; + result_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + /** + * + * + *
            +         * The Model Armor violation that was found.
            +         * 
            + * + * string model_armor_violation = 1; + * + * @return Whether the modelArmorViolation field is set. + */ + @java.lang.Override + public boolean hasModelArmorViolation() { + return resultCase_ == 1; + } + + /** + * + * + *
            +         * The Model Armor violation that was found.
            +         * 
            + * + * string model_armor_violation = 1; + * + * @return The modelArmorViolation. + */ + @java.lang.Override + public java.lang.String getModelArmorViolation() { + java.lang.Object ref = ""; + if (resultCase_ == 1) { + ref = result_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (resultCase_ == 1) { + result_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
            +         * The Model Armor violation that was found.
            +         * 
            + * + * string model_armor_violation = 1; + * + * @return The bytes for modelArmorViolation. + */ + @java.lang.Override + public com.google.protobuf.ByteString getModelArmorViolationBytes() { + java.lang.Object ref = ""; + if (resultCase_ == 1) { + ref = result_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (resultCase_ == 1) { + result_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
            +         * The Model Armor violation that was found.
            +         * 
            + * + * string model_armor_violation = 1; + * + * @param value The modelArmorViolation to set. + * @return This builder for chaining. + */ + public Builder setModelArmorViolation(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + resultCase_ = 1; + result_ = value; + onChanged(); + return this; + } + + /** + * + * + *
            +         * The Model Armor violation that was found.
            +         * 
            + * + * string model_armor_violation = 1; + * + * @return This builder for chaining. + */ + public Builder clearModelArmorViolation() { + if (resultCase_ == 1) { + resultCase_ = 0; + result_ = null; + onChanged(); + } + return this; + } + + /** + * + * + *
            +         * The Model Armor violation that was found.
            +         * 
            + * + * string model_armor_violation = 1; + * + * @param value The bytes for modelArmorViolation to set. + * @return This builder for chaining. + */ + public Builder setModelArmorViolationBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + resultCase_ = 1; + result_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.rpc.Status, + com.google.rpc.Status.Builder, + com.google.rpc.StatusOrBuilder> + errorBuilder_; + + /** + * + * + *
            +         * The error returned by Model Armor if the policy enforcement failed
            +         * for some reason.
            +         * 
            + * + * .google.rpc.Status error = 2; + * + * @return Whether the error field is set. + */ + @java.lang.Override + public boolean hasError() { + return resultCase_ == 2; + } + + /** + * + * + *
            +         * The error returned by Model Armor if the policy enforcement failed
            +         * for some reason.
            +         * 
            + * + * .google.rpc.Status error = 2; + * + * @return The error. + */ + @java.lang.Override + public com.google.rpc.Status getError() { + if (errorBuilder_ == null) { + if (resultCase_ == 2) { + return (com.google.rpc.Status) result_; + } + return com.google.rpc.Status.getDefaultInstance(); + } else { + if (resultCase_ == 2) { + return errorBuilder_.getMessage(); + } + return com.google.rpc.Status.getDefaultInstance(); + } + } + + /** + * + * + *
            +         * The error returned by Model Armor if the policy enforcement failed
            +         * for some reason.
            +         * 
            + * + * .google.rpc.Status error = 2; + */ + public Builder setError(com.google.rpc.Status value) { + if (errorBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + result_ = value; + onChanged(); + } else { + errorBuilder_.setMessage(value); + } + resultCase_ = 2; + return this; + } + + /** + * + * + *
            +         * The error returned by Model Armor if the policy enforcement failed
            +         * for some reason.
            +         * 
            + * + * .google.rpc.Status error = 2; + */ + public Builder setError(com.google.rpc.Status.Builder builderForValue) { + if (errorBuilder_ == null) { + result_ = builderForValue.build(); + onChanged(); + } else { + errorBuilder_.setMessage(builderForValue.build()); + } + resultCase_ = 2; + return this; + } + + /** + * + * + *
            +         * The error returned by Model Armor if the policy enforcement failed
            +         * for some reason.
            +         * 
            + * + * .google.rpc.Status error = 2; + */ + public Builder mergeError(com.google.rpc.Status value) { + if (errorBuilder_ == null) { + if (resultCase_ == 2 && result_ != com.google.rpc.Status.getDefaultInstance()) { + result_ = + com.google.rpc.Status.newBuilder((com.google.rpc.Status) result_) + .mergeFrom(value) + .buildPartial(); + } else { + result_ = value; + } + onChanged(); + } else { + if (resultCase_ == 2) { + errorBuilder_.mergeFrom(value); + } else { + errorBuilder_.setMessage(value); + } + } + resultCase_ = 2; + return this; + } + + /** + * + * + *
            +         * The error returned by Model Armor if the policy enforcement failed
            +         * for some reason.
            +         * 
            + * + * .google.rpc.Status error = 2; + */ + public Builder clearError() { + if (errorBuilder_ == null) { + if (resultCase_ == 2) { + resultCase_ = 0; + result_ = null; + onChanged(); + } + } else { + if (resultCase_ == 2) { + resultCase_ = 0; + result_ = null; + } + errorBuilder_.clear(); + } + return this; + } + + /** + * + * + *
            +         * The error returned by Model Armor if the policy enforcement failed
            +         * for some reason.
            +         * 
            + * + * .google.rpc.Status error = 2; + */ + public com.google.rpc.Status.Builder getErrorBuilder() { + return internalGetErrorFieldBuilder().getBuilder(); + } + + /** + * + * + *
            +         * The error returned by Model Armor if the policy enforcement failed
            +         * for some reason.
            +         * 
            + * + * .google.rpc.Status error = 2; + */ + @java.lang.Override + public com.google.rpc.StatusOrBuilder getErrorOrBuilder() { + if ((resultCase_ == 2) && (errorBuilder_ != null)) { + return errorBuilder_.getMessageOrBuilder(); + } else { + if (resultCase_ == 2) { + return (com.google.rpc.Status) result_; + } + return com.google.rpc.Status.getDefaultInstance(); + } + } + + /** + * + * + *
            +         * The error returned by Model Armor if the policy enforcement failed
            +         * for some reason.
            +         * 
            + * + * .google.rpc.Status error = 2; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.rpc.Status, + com.google.rpc.Status.Builder, + com.google.rpc.StatusOrBuilder> + internalGetErrorFieldBuilder() { + if (errorBuilder_ == null) { + if (!(resultCase_ == 2)) { + result_ = com.google.rpc.Status.getDefaultInstance(); + } + errorBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.rpc.Status, + com.google.rpc.Status.Builder, + com.google.rpc.StatusOrBuilder>( + (com.google.rpc.Status) result_, getParentForChildren(), isClean()); + result_ = null; + } + resultCase_ = 2; + onChanged(); + return errorBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult.ModelArmorEnforcementResult) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult.ModelArmorEnforcementResult) + private static final com.google.cloud.discoveryengine.v1beta.AssistAnswer + .CustomerPolicyEnforcementResult.ModelArmorEnforcementResult + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult + .ModelArmorEnforcementResult(); + } + + public static com.google.cloud.discoveryengine.v1beta.AssistAnswer + .CustomerPolicyEnforcementResult.ModelArmorEnforcementResult + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ModelArmorEnforcementResult parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult + .ModelArmorEnforcementResult + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface PolicyEnforcementResultOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult.PolicyEnforcementResult) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
            +       * The policy enforcement result for the banned phrase policy.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult.BannedPhraseEnforcementResult banned_phrase_enforcement_result = 3; + * + * + * @return Whether the bannedPhraseEnforcementResult field is set. + */ + boolean hasBannedPhraseEnforcementResult(); + + /** + * + * + *
            +       * The policy enforcement result for the banned phrase policy.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult.BannedPhraseEnforcementResult banned_phrase_enforcement_result = 3; + * + * + * @return The bannedPhraseEnforcementResult. + */ + com.google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult + .BannedPhraseEnforcementResult + getBannedPhraseEnforcementResult(); + + /** + * + * + *
            +       * The policy enforcement result for the banned phrase policy.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult.BannedPhraseEnforcementResult banned_phrase_enforcement_result = 3; + * + */ + com.google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult + .BannedPhraseEnforcementResultOrBuilder + getBannedPhraseEnforcementResultOrBuilder(); + + /** + * + * + *
            +       * The policy enforcement result for the Model Armor policy.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult.ModelArmorEnforcementResult model_armor_enforcement_result = 4; + * + * + * @return Whether the modelArmorEnforcementResult field is set. + */ + boolean hasModelArmorEnforcementResult(); + + /** + * + * + *
            +       * The policy enforcement result for the Model Armor policy.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult.ModelArmorEnforcementResult model_armor_enforcement_result = 4; + * + * + * @return The modelArmorEnforcementResult. + */ + com.google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult + .ModelArmorEnforcementResult + getModelArmorEnforcementResult(); + + /** + * + * + *
            +       * The policy enforcement result for the Model Armor policy.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult.ModelArmorEnforcementResult model_armor_enforcement_result = 4; + * + */ + com.google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult + .ModelArmorEnforcementResultOrBuilder + getModelArmorEnforcementResultOrBuilder(); + + com.google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult + .PolicyEnforcementResult.EnforcementResultCase + getEnforcementResultCase(); + } + + /** + * + * + *
            +     * Customer policy enforcement result for a single policy type.
            +     * 
            + * + * Protobuf type {@code + * google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult.PolicyEnforcementResult} + */ + public static final class PolicyEnforcementResult extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult.PolicyEnforcementResult) + PolicyEnforcementResultOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "PolicyEnforcementResult"); + } + + // Use PolicyEnforcementResult.newBuilder() to construct. + private PolicyEnforcementResult(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private PolicyEnforcementResult() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.AssistAnswerProto + .internal_static_google_cloud_discoveryengine_v1beta_AssistAnswer_CustomerPolicyEnforcementResult_PolicyEnforcementResult_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.AssistAnswerProto + .internal_static_google_cloud_discoveryengine_v1beta_AssistAnswer_CustomerPolicyEnforcementResult_PolicyEnforcementResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult + .PolicyEnforcementResult.class, + com.google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult + .PolicyEnforcementResult.Builder.class); + } + + private int enforcementResultCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object enforcementResult_; + + public enum EnforcementResultCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + BANNED_PHRASE_ENFORCEMENT_RESULT(3), + MODEL_ARMOR_ENFORCEMENT_RESULT(4), + ENFORCEMENTRESULT_NOT_SET(0); + private final int value; + + private EnforcementResultCase(int value) { + this.value = value; + } + + /** + * @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 EnforcementResultCase valueOf(int value) { + return forNumber(value); + } + + public static EnforcementResultCase forNumber(int value) { + switch (value) { + case 3: + return BANNED_PHRASE_ENFORCEMENT_RESULT; + case 4: + return MODEL_ARMOR_ENFORCEMENT_RESULT; + case 0: + return ENFORCEMENTRESULT_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public EnforcementResultCase getEnforcementResultCase() { + return EnforcementResultCase.forNumber(enforcementResultCase_); + } + + public static final int BANNED_PHRASE_ENFORCEMENT_RESULT_FIELD_NUMBER = 3; + + /** + * + * + *
            +       * The policy enforcement result for the banned phrase policy.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult.BannedPhraseEnforcementResult banned_phrase_enforcement_result = 3; + * + * + * @return Whether the bannedPhraseEnforcementResult field is set. + */ + @java.lang.Override + public boolean hasBannedPhraseEnforcementResult() { + return enforcementResultCase_ == 3; + } + + /** + * + * + *
            +       * The policy enforcement result for the banned phrase policy.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult.BannedPhraseEnforcementResult banned_phrase_enforcement_result = 3; + * + * + * @return The bannedPhraseEnforcementResult. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult + .BannedPhraseEnforcementResult + getBannedPhraseEnforcementResult() { + if (enforcementResultCase_ == 3) { + return (com.google.cloud.discoveryengine.v1beta.AssistAnswer + .CustomerPolicyEnforcementResult.BannedPhraseEnforcementResult) + enforcementResult_; + } + return com.google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult + .BannedPhraseEnforcementResult.getDefaultInstance(); + } + + /** + * + * + *
            +       * The policy enforcement result for the banned phrase policy.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult.BannedPhraseEnforcementResult banned_phrase_enforcement_result = 3; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult + .BannedPhraseEnforcementResultOrBuilder + getBannedPhraseEnforcementResultOrBuilder() { + if (enforcementResultCase_ == 3) { + return (com.google.cloud.discoveryengine.v1beta.AssistAnswer + .CustomerPolicyEnforcementResult.BannedPhraseEnforcementResult) + enforcementResult_; + } + return com.google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult + .BannedPhraseEnforcementResult.getDefaultInstance(); + } + + public static final int MODEL_ARMOR_ENFORCEMENT_RESULT_FIELD_NUMBER = 4; + + /** + * + * + *
            +       * The policy enforcement result for the Model Armor policy.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult.ModelArmorEnforcementResult model_armor_enforcement_result = 4; + * + * + * @return Whether the modelArmorEnforcementResult field is set. + */ + @java.lang.Override + public boolean hasModelArmorEnforcementResult() { + return enforcementResultCase_ == 4; + } + + /** + * + * + *
            +       * The policy enforcement result for the Model Armor policy.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult.ModelArmorEnforcementResult model_armor_enforcement_result = 4; + * + * + * @return The modelArmorEnforcementResult. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult + .ModelArmorEnforcementResult + getModelArmorEnforcementResult() { + if (enforcementResultCase_ == 4) { + return (com.google.cloud.discoveryengine.v1beta.AssistAnswer + .CustomerPolicyEnforcementResult.ModelArmorEnforcementResult) + enforcementResult_; + } + return com.google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult + .ModelArmorEnforcementResult.getDefaultInstance(); + } + + /** + * + * + *
            +       * The policy enforcement result for the Model Armor policy.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult.ModelArmorEnforcementResult model_armor_enforcement_result = 4; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult + .ModelArmorEnforcementResultOrBuilder + getModelArmorEnforcementResultOrBuilder() { + if (enforcementResultCase_ == 4) { + return (com.google.cloud.discoveryengine.v1beta.AssistAnswer + .CustomerPolicyEnforcementResult.ModelArmorEnforcementResult) + enforcementResult_; + } + return com.google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult + .ModelArmorEnforcementResult.getDefaultInstance(); + } + + 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 (enforcementResultCase_ == 3) { + output.writeMessage( + 3, + (com.google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult + .BannedPhraseEnforcementResult) + enforcementResult_); + } + if (enforcementResultCase_ == 4) { + output.writeMessage( + 4, + (com.google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult + .ModelArmorEnforcementResult) + enforcementResult_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (enforcementResultCase_ == 3) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 3, + (com.google.cloud.discoveryengine.v1beta.AssistAnswer + .CustomerPolicyEnforcementResult.BannedPhraseEnforcementResult) + enforcementResult_); + } + if (enforcementResultCase_ == 4) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 4, + (com.google.cloud.discoveryengine.v1beta.AssistAnswer + .CustomerPolicyEnforcementResult.ModelArmorEnforcementResult) + enforcementResult_); + } + 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.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult + .PolicyEnforcementResult)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult + .PolicyEnforcementResult + other = + (com.google.cloud.discoveryengine.v1beta.AssistAnswer + .CustomerPolicyEnforcementResult.PolicyEnforcementResult) + obj; + + if (!getEnforcementResultCase().equals(other.getEnforcementResultCase())) return false; + switch (enforcementResultCase_) { + case 3: + if (!getBannedPhraseEnforcementResult() + .equals(other.getBannedPhraseEnforcementResult())) return false; + break; + case 4: + if (!getModelArmorEnforcementResult().equals(other.getModelArmorEnforcementResult())) + return false; + break; + case 0: + default: + } + 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(); + switch (enforcementResultCase_) { + case 3: + hash = (37 * hash) + BANNED_PHRASE_ENFORCEMENT_RESULT_FIELD_NUMBER; + hash = (53 * hash) + getBannedPhraseEnforcementResult().hashCode(); + break; + case 4: + hash = (37 * hash) + MODEL_ARMOR_ENFORCEMENT_RESULT_FIELD_NUMBER; + hash = (53 * hash) + getModelArmorEnforcementResult().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1beta.AssistAnswer + .CustomerPolicyEnforcementResult.PolicyEnforcementResult + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.AssistAnswer + .CustomerPolicyEnforcementResult.PolicyEnforcementResult + 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.discoveryengine.v1beta.AssistAnswer + .CustomerPolicyEnforcementResult.PolicyEnforcementResult + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.AssistAnswer + .CustomerPolicyEnforcementResult.PolicyEnforcementResult + 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.discoveryengine.v1beta.AssistAnswer + .CustomerPolicyEnforcementResult.PolicyEnforcementResult + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.AssistAnswer + .CustomerPolicyEnforcementResult.PolicyEnforcementResult + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1beta.AssistAnswer + .CustomerPolicyEnforcementResult.PolicyEnforcementResult + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.AssistAnswer + .CustomerPolicyEnforcementResult.PolicyEnforcementResult + 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.discoveryengine.v1beta.AssistAnswer + .CustomerPolicyEnforcementResult.PolicyEnforcementResult + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.AssistAnswer + .CustomerPolicyEnforcementResult.PolicyEnforcementResult + 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.discoveryengine.v1beta.AssistAnswer + .CustomerPolicyEnforcementResult.PolicyEnforcementResult + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.AssistAnswer + .CustomerPolicyEnforcementResult.PolicyEnforcementResult + 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.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult + .PolicyEnforcementResult + 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; + } + + /** + * + * + *
            +       * Customer policy enforcement result for a single policy type.
            +       * 
            + * + * Protobuf type {@code + * google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult.PolicyEnforcementResult} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult.PolicyEnforcementResult) + com.google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult + .PolicyEnforcementResultOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.AssistAnswerProto + .internal_static_google_cloud_discoveryengine_v1beta_AssistAnswer_CustomerPolicyEnforcementResult_PolicyEnforcementResult_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.AssistAnswerProto + .internal_static_google_cloud_discoveryengine_v1beta_AssistAnswer_CustomerPolicyEnforcementResult_PolicyEnforcementResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.AssistAnswer + .CustomerPolicyEnforcementResult.PolicyEnforcementResult.class, + com.google.cloud.discoveryengine.v1beta.AssistAnswer + .CustomerPolicyEnforcementResult.PolicyEnforcementResult.Builder.class); + } + + // Construct using + // com.google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult.PolicyEnforcementResult.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (bannedPhraseEnforcementResultBuilder_ != null) { + bannedPhraseEnforcementResultBuilder_.clear(); + } + if (modelArmorEnforcementResultBuilder_ != null) { + modelArmorEnforcementResultBuilder_.clear(); + } + enforcementResultCase_ = 0; + enforcementResult_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1beta.AssistAnswerProto + .internal_static_google_cloud_discoveryengine_v1beta_AssistAnswer_CustomerPolicyEnforcementResult_PolicyEnforcementResult_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult + .PolicyEnforcementResult + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1beta.AssistAnswer + .CustomerPolicyEnforcementResult.PolicyEnforcementResult.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult + .PolicyEnforcementResult + build() { + com.google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult + .PolicyEnforcementResult + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult + .PolicyEnforcementResult + buildPartial() { + com.google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult + .PolicyEnforcementResult + result = + new com.google.cloud.discoveryengine.v1beta.AssistAnswer + .CustomerPolicyEnforcementResult.PolicyEnforcementResult(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult + .PolicyEnforcementResult + result) { + int from_bitField0_ = bitField0_; + } + + private void buildPartialOneofs( + com.google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult + .PolicyEnforcementResult + result) { + result.enforcementResultCase_ = enforcementResultCase_; + result.enforcementResult_ = this.enforcementResult_; + if (enforcementResultCase_ == 3 && bannedPhraseEnforcementResultBuilder_ != null) { + result.enforcementResult_ = bannedPhraseEnforcementResultBuilder_.build(); + } + if (enforcementResultCase_ == 4 && modelArmorEnforcementResultBuilder_ != null) { + result.enforcementResult_ = modelArmorEnforcementResultBuilder_.build(); + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult + .PolicyEnforcementResult) { + return mergeFrom( + (com.google.cloud.discoveryengine.v1beta.AssistAnswer + .CustomerPolicyEnforcementResult.PolicyEnforcementResult) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult + .PolicyEnforcementResult + other) { + if (other + == com.google.cloud.discoveryengine.v1beta.AssistAnswer + .CustomerPolicyEnforcementResult.PolicyEnforcementResult.getDefaultInstance()) + return this; + switch (other.getEnforcementResultCase()) { + case BANNED_PHRASE_ENFORCEMENT_RESULT: + { + mergeBannedPhraseEnforcementResult(other.getBannedPhraseEnforcementResult()); + break; + } + case MODEL_ARMOR_ENFORCEMENT_RESULT: + { + mergeModelArmorEnforcementResult(other.getModelArmorEnforcementResult()); + break; + } + case ENFORCEMENTRESULT_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 26: + { + input.readMessage( + internalGetBannedPhraseEnforcementResultFieldBuilder().getBuilder(), + extensionRegistry); + enforcementResultCase_ = 3; + break; + } // case 26 + case 34: + { + input.readMessage( + internalGetModelArmorEnforcementResultFieldBuilder().getBuilder(), + extensionRegistry); + enforcementResultCase_ = 4; + break; + } // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int enforcementResultCase_ = 0; + private java.lang.Object enforcementResult_; + + public EnforcementResultCase getEnforcementResultCase() { + return EnforcementResultCase.forNumber(enforcementResultCase_); + } + + public Builder clearEnforcementResult() { + enforcementResultCase_ = 0; + enforcementResult_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult + .BannedPhraseEnforcementResult, + com.google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult + .BannedPhraseEnforcementResult.Builder, + com.google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult + .BannedPhraseEnforcementResultOrBuilder> + bannedPhraseEnforcementResultBuilder_; + + /** + * + * + *
            +         * The policy enforcement result for the banned phrase policy.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult.BannedPhraseEnforcementResult banned_phrase_enforcement_result = 3; + * + * + * @return Whether the bannedPhraseEnforcementResult field is set. + */ + @java.lang.Override + public boolean hasBannedPhraseEnforcementResult() { + return enforcementResultCase_ == 3; + } + + /** + * + * + *
            +         * The policy enforcement result for the banned phrase policy.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult.BannedPhraseEnforcementResult banned_phrase_enforcement_result = 3; + * + * + * @return The bannedPhraseEnforcementResult. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult + .BannedPhraseEnforcementResult + getBannedPhraseEnforcementResult() { + if (bannedPhraseEnforcementResultBuilder_ == null) { + if (enforcementResultCase_ == 3) { + return (com.google.cloud.discoveryengine.v1beta.AssistAnswer + .CustomerPolicyEnforcementResult.BannedPhraseEnforcementResult) + enforcementResult_; + } + return com.google.cloud.discoveryengine.v1beta.AssistAnswer + .CustomerPolicyEnforcementResult.BannedPhraseEnforcementResult.getDefaultInstance(); + } else { + if (enforcementResultCase_ == 3) { + return bannedPhraseEnforcementResultBuilder_.getMessage(); + } + return com.google.cloud.discoveryengine.v1beta.AssistAnswer + .CustomerPolicyEnforcementResult.BannedPhraseEnforcementResult.getDefaultInstance(); + } + } + + /** + * + * + *
            +         * The policy enforcement result for the banned phrase policy.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult.BannedPhraseEnforcementResult banned_phrase_enforcement_result = 3; + * + */ + public Builder setBannedPhraseEnforcementResult( + com.google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult + .BannedPhraseEnforcementResult + value) { + if (bannedPhraseEnforcementResultBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + enforcementResult_ = value; + onChanged(); + } else { + bannedPhraseEnforcementResultBuilder_.setMessage(value); + } + enforcementResultCase_ = 3; + return this; + } + + /** + * + * + *
            +         * The policy enforcement result for the banned phrase policy.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult.BannedPhraseEnforcementResult banned_phrase_enforcement_result = 3; + * + */ + public Builder setBannedPhraseEnforcementResult( + com.google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult + .BannedPhraseEnforcementResult.Builder + builderForValue) { + if (bannedPhraseEnforcementResultBuilder_ == null) { + enforcementResult_ = builderForValue.build(); + onChanged(); + } else { + bannedPhraseEnforcementResultBuilder_.setMessage(builderForValue.build()); + } + enforcementResultCase_ = 3; + return this; + } + + /** + * + * + *
            +         * The policy enforcement result for the banned phrase policy.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult.BannedPhraseEnforcementResult banned_phrase_enforcement_result = 3; + * + */ + public Builder mergeBannedPhraseEnforcementResult( + com.google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult + .BannedPhraseEnforcementResult + value) { + if (bannedPhraseEnforcementResultBuilder_ == null) { + if (enforcementResultCase_ == 3 + && enforcementResult_ + != com.google.cloud.discoveryengine.v1beta.AssistAnswer + .CustomerPolicyEnforcementResult.BannedPhraseEnforcementResult + .getDefaultInstance()) { + enforcementResult_ = + com.google.cloud.discoveryengine.v1beta.AssistAnswer + .CustomerPolicyEnforcementResult.BannedPhraseEnforcementResult.newBuilder( + (com.google.cloud.discoveryengine.v1beta.AssistAnswer + .CustomerPolicyEnforcementResult.BannedPhraseEnforcementResult) + enforcementResult_) + .mergeFrom(value) + .buildPartial(); + } else { + enforcementResult_ = value; + } + onChanged(); + } else { + if (enforcementResultCase_ == 3) { + bannedPhraseEnforcementResultBuilder_.mergeFrom(value); + } else { + bannedPhraseEnforcementResultBuilder_.setMessage(value); + } + } + enforcementResultCase_ = 3; + return this; + } + + /** + * + * + *
            +         * The policy enforcement result for the banned phrase policy.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult.BannedPhraseEnforcementResult banned_phrase_enforcement_result = 3; + * + */ + public Builder clearBannedPhraseEnforcementResult() { + if (bannedPhraseEnforcementResultBuilder_ == null) { + if (enforcementResultCase_ == 3) { + enforcementResultCase_ = 0; + enforcementResult_ = null; + onChanged(); + } + } else { + if (enforcementResultCase_ == 3) { + enforcementResultCase_ = 0; + enforcementResult_ = null; + } + bannedPhraseEnforcementResultBuilder_.clear(); + } + return this; + } + + /** + * + * + *
            +         * The policy enforcement result for the banned phrase policy.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult.BannedPhraseEnforcementResult banned_phrase_enforcement_result = 3; + * + */ + public com.google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult + .BannedPhraseEnforcementResult.Builder + getBannedPhraseEnforcementResultBuilder() { + return internalGetBannedPhraseEnforcementResultFieldBuilder().getBuilder(); + } + + /** + * + * + *
            +         * The policy enforcement result for the banned phrase policy.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult.BannedPhraseEnforcementResult banned_phrase_enforcement_result = 3; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult + .BannedPhraseEnforcementResultOrBuilder + getBannedPhraseEnforcementResultOrBuilder() { + if ((enforcementResultCase_ == 3) && (bannedPhraseEnforcementResultBuilder_ != null)) { + return bannedPhraseEnforcementResultBuilder_.getMessageOrBuilder(); + } else { + if (enforcementResultCase_ == 3) { + return (com.google.cloud.discoveryengine.v1beta.AssistAnswer + .CustomerPolicyEnforcementResult.BannedPhraseEnforcementResult) + enforcementResult_; + } + return com.google.cloud.discoveryengine.v1beta.AssistAnswer + .CustomerPolicyEnforcementResult.BannedPhraseEnforcementResult.getDefaultInstance(); + } + } + + /** + * + * + *
            +         * The policy enforcement result for the banned phrase policy.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult.BannedPhraseEnforcementResult banned_phrase_enforcement_result = 3; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult + .BannedPhraseEnforcementResult, + com.google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult + .BannedPhraseEnforcementResult.Builder, + com.google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult + .BannedPhraseEnforcementResultOrBuilder> + internalGetBannedPhraseEnforcementResultFieldBuilder() { + if (bannedPhraseEnforcementResultBuilder_ == null) { + if (!(enforcementResultCase_ == 3)) { + enforcementResult_ = + com.google.cloud.discoveryengine.v1beta.AssistAnswer + .CustomerPolicyEnforcementResult.BannedPhraseEnforcementResult + .getDefaultInstance(); + } + bannedPhraseEnforcementResultBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.AssistAnswer + .CustomerPolicyEnforcementResult.BannedPhraseEnforcementResult, + com.google.cloud.discoveryengine.v1beta.AssistAnswer + .CustomerPolicyEnforcementResult.BannedPhraseEnforcementResult.Builder, + com.google.cloud.discoveryengine.v1beta.AssistAnswer + .CustomerPolicyEnforcementResult.BannedPhraseEnforcementResultOrBuilder>( + (com.google.cloud.discoveryengine.v1beta.AssistAnswer + .CustomerPolicyEnforcementResult.BannedPhraseEnforcementResult) + enforcementResult_, + getParentForChildren(), + isClean()); + enforcementResult_ = null; + } + enforcementResultCase_ = 3; + onChanged(); + return bannedPhraseEnforcementResultBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult + .ModelArmorEnforcementResult, + com.google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult + .ModelArmorEnforcementResult.Builder, + com.google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult + .ModelArmorEnforcementResultOrBuilder> + modelArmorEnforcementResultBuilder_; + + /** + * + * + *
            +         * The policy enforcement result for the Model Armor policy.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult.ModelArmorEnforcementResult model_armor_enforcement_result = 4; + * + * + * @return Whether the modelArmorEnforcementResult field is set. + */ + @java.lang.Override + public boolean hasModelArmorEnforcementResult() { + return enforcementResultCase_ == 4; + } + + /** + * + * + *
            +         * The policy enforcement result for the Model Armor policy.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult.ModelArmorEnforcementResult model_armor_enforcement_result = 4; + * + * + * @return The modelArmorEnforcementResult. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult + .ModelArmorEnforcementResult + getModelArmorEnforcementResult() { + if (modelArmorEnforcementResultBuilder_ == null) { + if (enforcementResultCase_ == 4) { + return (com.google.cloud.discoveryengine.v1beta.AssistAnswer + .CustomerPolicyEnforcementResult.ModelArmorEnforcementResult) + enforcementResult_; + } + return com.google.cloud.discoveryengine.v1beta.AssistAnswer + .CustomerPolicyEnforcementResult.ModelArmorEnforcementResult.getDefaultInstance(); + } else { + if (enforcementResultCase_ == 4) { + return modelArmorEnforcementResultBuilder_.getMessage(); + } + return com.google.cloud.discoveryengine.v1beta.AssistAnswer + .CustomerPolicyEnforcementResult.ModelArmorEnforcementResult.getDefaultInstance(); + } + } + + /** + * + * + *
            +         * The policy enforcement result for the Model Armor policy.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult.ModelArmorEnforcementResult model_armor_enforcement_result = 4; + * + */ + public Builder setModelArmorEnforcementResult( + com.google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult + .ModelArmorEnforcementResult + value) { + if (modelArmorEnforcementResultBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + enforcementResult_ = value; + onChanged(); + } else { + modelArmorEnforcementResultBuilder_.setMessage(value); + } + enforcementResultCase_ = 4; + return this; + } + + /** + * + * + *
            +         * The policy enforcement result for the Model Armor policy.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult.ModelArmorEnforcementResult model_armor_enforcement_result = 4; + * + */ + public Builder setModelArmorEnforcementResult( + com.google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult + .ModelArmorEnforcementResult.Builder + builderForValue) { + if (modelArmorEnforcementResultBuilder_ == null) { + enforcementResult_ = builderForValue.build(); + onChanged(); + } else { + modelArmorEnforcementResultBuilder_.setMessage(builderForValue.build()); + } + enforcementResultCase_ = 4; + return this; + } + + /** + * + * + *
            +         * The policy enforcement result for the Model Armor policy.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult.ModelArmorEnforcementResult model_armor_enforcement_result = 4; + * + */ + public Builder mergeModelArmorEnforcementResult( + com.google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult + .ModelArmorEnforcementResult + value) { + if (modelArmorEnforcementResultBuilder_ == null) { + if (enforcementResultCase_ == 4 + && enforcementResult_ + != com.google.cloud.discoveryengine.v1beta.AssistAnswer + .CustomerPolicyEnforcementResult.ModelArmorEnforcementResult + .getDefaultInstance()) { + enforcementResult_ = + com.google.cloud.discoveryengine.v1beta.AssistAnswer + .CustomerPolicyEnforcementResult.ModelArmorEnforcementResult.newBuilder( + (com.google.cloud.discoveryengine.v1beta.AssistAnswer + .CustomerPolicyEnforcementResult.ModelArmorEnforcementResult) + enforcementResult_) + .mergeFrom(value) + .buildPartial(); + } else { + enforcementResult_ = value; + } + onChanged(); + } else { + if (enforcementResultCase_ == 4) { + modelArmorEnforcementResultBuilder_.mergeFrom(value); + } else { + modelArmorEnforcementResultBuilder_.setMessage(value); + } + } + enforcementResultCase_ = 4; + return this; + } + + /** + * + * + *
            +         * The policy enforcement result for the Model Armor policy.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult.ModelArmorEnforcementResult model_armor_enforcement_result = 4; + * + */ + public Builder clearModelArmorEnforcementResult() { + if (modelArmorEnforcementResultBuilder_ == null) { + if (enforcementResultCase_ == 4) { + enforcementResultCase_ = 0; + enforcementResult_ = null; + onChanged(); + } + } else { + if (enforcementResultCase_ == 4) { + enforcementResultCase_ = 0; + enforcementResult_ = null; + } + modelArmorEnforcementResultBuilder_.clear(); + } + return this; + } + + /** + * + * + *
            +         * The policy enforcement result for the Model Armor policy.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult.ModelArmorEnforcementResult model_armor_enforcement_result = 4; + * + */ + public com.google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult + .ModelArmorEnforcementResult.Builder + getModelArmorEnforcementResultBuilder() { + return internalGetModelArmorEnforcementResultFieldBuilder().getBuilder(); + } + + /** + * + * + *
            +         * The policy enforcement result for the Model Armor policy.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult.ModelArmorEnforcementResult model_armor_enforcement_result = 4; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult + .ModelArmorEnforcementResultOrBuilder + getModelArmorEnforcementResultOrBuilder() { + if ((enforcementResultCase_ == 4) && (modelArmorEnforcementResultBuilder_ != null)) { + return modelArmorEnforcementResultBuilder_.getMessageOrBuilder(); + } else { + if (enforcementResultCase_ == 4) { + return (com.google.cloud.discoveryengine.v1beta.AssistAnswer + .CustomerPolicyEnforcementResult.ModelArmorEnforcementResult) + enforcementResult_; + } + return com.google.cloud.discoveryengine.v1beta.AssistAnswer + .CustomerPolicyEnforcementResult.ModelArmorEnforcementResult.getDefaultInstance(); + } + } + + /** + * + * + *
            +         * The policy enforcement result for the Model Armor policy.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult.ModelArmorEnforcementResult model_armor_enforcement_result = 4; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult + .ModelArmorEnforcementResult, + com.google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult + .ModelArmorEnforcementResult.Builder, + com.google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult + .ModelArmorEnforcementResultOrBuilder> + internalGetModelArmorEnforcementResultFieldBuilder() { + if (modelArmorEnforcementResultBuilder_ == null) { + if (!(enforcementResultCase_ == 4)) { + enforcementResult_ = + com.google.cloud.discoveryengine.v1beta.AssistAnswer + .CustomerPolicyEnforcementResult.ModelArmorEnforcementResult + .getDefaultInstance(); + } + modelArmorEnforcementResultBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.AssistAnswer + .CustomerPolicyEnforcementResult.ModelArmorEnforcementResult, + com.google.cloud.discoveryengine.v1beta.AssistAnswer + .CustomerPolicyEnforcementResult.ModelArmorEnforcementResult.Builder, + com.google.cloud.discoveryengine.v1beta.AssistAnswer + .CustomerPolicyEnforcementResult.ModelArmorEnforcementResultOrBuilder>( + (com.google.cloud.discoveryengine.v1beta.AssistAnswer + .CustomerPolicyEnforcementResult.ModelArmorEnforcementResult) + enforcementResult_, + getParentForChildren(), + isClean()); + enforcementResult_ = null; + } + enforcementResultCase_ = 4; + onChanged(); + return modelArmorEnforcementResultBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult.PolicyEnforcementResult) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult.PolicyEnforcementResult) + private static final com.google.cloud.discoveryengine.v1beta.AssistAnswer + .CustomerPolicyEnforcementResult.PolicyEnforcementResult + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult + .PolicyEnforcementResult(); + } + + public static com.google.cloud.discoveryengine.v1beta.AssistAnswer + .CustomerPolicyEnforcementResult.PolicyEnforcementResult + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PolicyEnforcementResult parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult + .PolicyEnforcementResult + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int VERDICT_FIELD_NUMBER = 1; + private int verdict_ = 0; + + /** + * + * + *
            +     * Final verdict of the customer policy enforcement. If only one policy
            +     * blocked the processing, the verdict is BLOCK.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult.Verdict verdict = 1; + * + * + * @return The enum numeric value on the wire for verdict. + */ + @java.lang.Override + public int getVerdictValue() { + return verdict_; + } + + /** + * + * + *
            +     * Final verdict of the customer policy enforcement. If only one policy
            +     * blocked the processing, the verdict is BLOCK.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult.Verdict verdict = 1; + * + * + * @return The verdict. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult + .Verdict + getVerdict() { + com.google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult.Verdict + result = + com.google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult + .Verdict.forNumber(verdict_); + return result == null + ? com.google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult + .Verdict.UNRECOGNIZED + : result; + } + + public static final int POLICY_RESULTS_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private java.util.List< + com.google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult + .PolicyEnforcementResult> + policyResults_; + + /** + * + * + *
            +     * Customer policy enforcement results.
            +     * Populated only if the assist call was skipped due to a policy
            +     * violation. It contains results from those filters that blocked the
            +     * processing of the query.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult.PolicyEnforcementResult policy_results = 3; + * + */ + @java.lang.Override + public java.util.List< + com.google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult + .PolicyEnforcementResult> + getPolicyResultsList() { + return policyResults_; + } + + /** + * + * + *
            +     * Customer policy enforcement results.
            +     * Populated only if the assist call was skipped due to a policy
            +     * violation. It contains results from those filters that blocked the
            +     * processing of the query.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult.PolicyEnforcementResult policy_results = 3; + * + */ + @java.lang.Override + public java.util.List< + ? extends + com.google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult + .PolicyEnforcementResultOrBuilder> + getPolicyResultsOrBuilderList() { + return policyResults_; + } + + /** + * + * + *
            +     * Customer policy enforcement results.
            +     * Populated only if the assist call was skipped due to a policy
            +     * violation. It contains results from those filters that blocked the
            +     * processing of the query.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult.PolicyEnforcementResult policy_results = 3; + * + */ + @java.lang.Override + public int getPolicyResultsCount() { + return policyResults_.size(); + } + + /** + * + * + *
            +     * Customer policy enforcement results.
            +     * Populated only if the assist call was skipped due to a policy
            +     * violation. It contains results from those filters that blocked the
            +     * processing of the query.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult.PolicyEnforcementResult policy_results = 3; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult + .PolicyEnforcementResult + getPolicyResults(int index) { + return policyResults_.get(index); + } + + /** + * + * + *
            +     * Customer policy enforcement results.
            +     * Populated only if the assist call was skipped due to a policy
            +     * violation. It contains results from those filters that blocked the
            +     * processing of the query.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult.PolicyEnforcementResult policy_results = 3; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult + .PolicyEnforcementResultOrBuilder + getPolicyResultsOrBuilder(int index) { + return policyResults_.get(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 (verdict_ + != com.google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult + .Verdict.UNSPECIFIED + .getNumber()) { + output.writeEnum(1, verdict_); + } + for (int i = 0; i < policyResults_.size(); i++) { + output.writeMessage(3, policyResults_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (verdict_ + != com.google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult + .Verdict.UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, verdict_); + } + for (int i = 0; i < policyResults_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, policyResults_.get(i)); + } + 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.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult other = + (com.google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult) + obj; + + if (verdict_ != other.verdict_) return false; + if (!getPolicyResultsList().equals(other.getPolicyResultsList())) 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) + VERDICT_FIELD_NUMBER; + hash = (53 * hash) + verdict_; + if (getPolicyResultsCount() > 0) { + hash = (37 * hash) + POLICY_RESULTS_FIELD_NUMBER; + hash = (53 * hash) + getPolicyResultsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1beta.AssistAnswer + .CustomerPolicyEnforcementResult + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.AssistAnswer + .CustomerPolicyEnforcementResult + 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.discoveryengine.v1beta.AssistAnswer + .CustomerPolicyEnforcementResult + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.AssistAnswer + .CustomerPolicyEnforcementResult + 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.discoveryengine.v1beta.AssistAnswer + .CustomerPolicyEnforcementResult + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.AssistAnswer + .CustomerPolicyEnforcementResult + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1beta.AssistAnswer + .CustomerPolicyEnforcementResult + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.AssistAnswer + .CustomerPolicyEnforcementResult + 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.discoveryengine.v1beta.AssistAnswer + .CustomerPolicyEnforcementResult + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.AssistAnswer + .CustomerPolicyEnforcementResult + 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.discoveryengine.v1beta.AssistAnswer + .CustomerPolicyEnforcementResult + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.AssistAnswer + .CustomerPolicyEnforcementResult + 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.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult + 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; + } + + /** + * + * + *
            +     * Customer policy enforcement results. Contains the results of the various
            +     * policy checks, like the banned phrases or the Model Armor checks.
            +     * 
            + * + * Protobuf type {@code + * google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult) + com.google.cloud.discoveryengine.v1beta.AssistAnswer + .CustomerPolicyEnforcementResultOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.AssistAnswerProto + .internal_static_google_cloud_discoveryengine_v1beta_AssistAnswer_CustomerPolicyEnforcementResult_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.AssistAnswerProto + .internal_static_google_cloud_discoveryengine_v1beta_AssistAnswer_CustomerPolicyEnforcementResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult + .class, + com.google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult + .Builder.class); + } + + // Construct using + // com.google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + verdict_ = 0; + if (policyResultsBuilder_ == null) { + policyResults_ = java.util.Collections.emptyList(); + } else { + policyResults_ = null; + policyResultsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1beta.AssistAnswerProto + .internal_static_google_cloud_discoveryengine_v1beta_AssistAnswer_CustomerPolicyEnforcementResult_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult + build() { + com.google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult + buildPartial() { + com.google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult + result = + new com.google.cloud.discoveryengine.v1beta.AssistAnswer + .CustomerPolicyEnforcementResult(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult + result) { + if (policyResultsBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + policyResults_ = java.util.Collections.unmodifiableList(policyResults_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.policyResults_ = policyResults_; + } else { + result.policyResults_ = policyResultsBuilder_.build(); + } + } + + private void buildPartial0( + com.google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult + result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.verdict_ = verdict_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult) { + return mergeFrom( + (com.google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult + other) { + if (other + == com.google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult + .getDefaultInstance()) return this; + if (other.verdict_ != 0) { + setVerdictValue(other.getVerdictValue()); + } + if (policyResultsBuilder_ == null) { + if (!other.policyResults_.isEmpty()) { + if (policyResults_.isEmpty()) { + policyResults_ = other.policyResults_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensurePolicyResultsIsMutable(); + policyResults_.addAll(other.policyResults_); + } + onChanged(); + } + } else { + if (!other.policyResults_.isEmpty()) { + if (policyResultsBuilder_.isEmpty()) { + policyResultsBuilder_.dispose(); + policyResultsBuilder_ = null; + policyResults_ = other.policyResults_; + bitField0_ = (bitField0_ & ~0x00000002); + policyResultsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetPolicyResultsFieldBuilder() + : null; + } else { + policyResultsBuilder_.addAllMessages(other.policyResults_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + verdict_ = input.readEnum(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 26: + { + com.google.cloud.discoveryengine.v1beta.AssistAnswer + .CustomerPolicyEnforcementResult.PolicyEnforcementResult + m = + input.readMessage( + com.google.cloud.discoveryengine.v1beta.AssistAnswer + .CustomerPolicyEnforcementResult.PolicyEnforcementResult.parser(), + extensionRegistry); + if (policyResultsBuilder_ == null) { + ensurePolicyResultsIsMutable(); + policyResults_.add(m); + } else { + policyResultsBuilder_.addMessage(m); + } + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private int verdict_ = 0; + + /** + * + * + *
            +       * Final verdict of the customer policy enforcement. If only one policy
            +       * blocked the processing, the verdict is BLOCK.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult.Verdict verdict = 1; + * + * + * @return The enum numeric value on the wire for verdict. + */ + @java.lang.Override + public int getVerdictValue() { + return verdict_; + } + + /** + * + * + *
            +       * Final verdict of the customer policy enforcement. If only one policy
            +       * blocked the processing, the verdict is BLOCK.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult.Verdict verdict = 1; + * + * + * @param value The enum numeric value on the wire for verdict to set. + * @return This builder for chaining. + */ + public Builder setVerdictValue(int value) { + verdict_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
            +       * Final verdict of the customer policy enforcement. If only one policy
            +       * blocked the processing, the verdict is BLOCK.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult.Verdict verdict = 1; + * + * + * @return The verdict. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult + .Verdict + getVerdict() { + com.google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult.Verdict + result = + com.google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult + .Verdict.forNumber(verdict_); + return result == null + ? com.google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult + .Verdict.UNRECOGNIZED + : result; + } + + /** + * + * + *
            +       * Final verdict of the customer policy enforcement. If only one policy
            +       * blocked the processing, the verdict is BLOCK.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult.Verdict verdict = 1; + * + * + * @param value The verdict to set. + * @return This builder for chaining. + */ + public Builder setVerdict( + com.google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult + .Verdict + value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + verdict_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
            +       * Final verdict of the customer policy enforcement. If only one policy
            +       * blocked the processing, the verdict is BLOCK.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult.Verdict verdict = 1; + * + * + * @return This builder for chaining. + */ + public Builder clearVerdict() { + bitField0_ = (bitField0_ & ~0x00000001); + verdict_ = 0; + onChanged(); + return this; + } + + private java.util.List< + com.google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult + .PolicyEnforcementResult> + policyResults_ = java.util.Collections.emptyList(); + + private void ensurePolicyResultsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + policyResults_ = + new java.util.ArrayList< + com.google.cloud.discoveryengine.v1beta.AssistAnswer + .CustomerPolicyEnforcementResult.PolicyEnforcementResult>(policyResults_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult + .PolicyEnforcementResult, + com.google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult + .PolicyEnforcementResult.Builder, + com.google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult + .PolicyEnforcementResultOrBuilder> + policyResultsBuilder_; + + /** + * + * + *
            +       * Customer policy enforcement results.
            +       * Populated only if the assist call was skipped due to a policy
            +       * violation. It contains results from those filters that blocked the
            +       * processing of the query.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult.PolicyEnforcementResult policy_results = 3; + * + */ + public java.util.List< + com.google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult + .PolicyEnforcementResult> + getPolicyResultsList() { + if (policyResultsBuilder_ == null) { + return java.util.Collections.unmodifiableList(policyResults_); + } else { + return policyResultsBuilder_.getMessageList(); + } + } + + /** + * + * + *
            +       * Customer policy enforcement results.
            +       * Populated only if the assist call was skipped due to a policy
            +       * violation. It contains results from those filters that blocked the
            +       * processing of the query.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult.PolicyEnforcementResult policy_results = 3; + * + */ + public int getPolicyResultsCount() { + if (policyResultsBuilder_ == null) { + return policyResults_.size(); + } else { + return policyResultsBuilder_.getCount(); + } + } + + /** + * + * + *
            +       * Customer policy enforcement results.
            +       * Populated only if the assist call was skipped due to a policy
            +       * violation. It contains results from those filters that blocked the
            +       * processing of the query.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult.PolicyEnforcementResult policy_results = 3; + * + */ + public com.google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult + .PolicyEnforcementResult + getPolicyResults(int index) { + if (policyResultsBuilder_ == null) { + return policyResults_.get(index); + } else { + return policyResultsBuilder_.getMessage(index); + } + } + + /** + * + * + *
            +       * Customer policy enforcement results.
            +       * Populated only if the assist call was skipped due to a policy
            +       * violation. It contains results from those filters that blocked the
            +       * processing of the query.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult.PolicyEnforcementResult policy_results = 3; + * + */ + public Builder setPolicyResults( + int index, + com.google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult + .PolicyEnforcementResult + value) { + if (policyResultsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePolicyResultsIsMutable(); + policyResults_.set(index, value); + onChanged(); + } else { + policyResultsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
            +       * Customer policy enforcement results.
            +       * Populated only if the assist call was skipped due to a policy
            +       * violation. It contains results from those filters that blocked the
            +       * processing of the query.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult.PolicyEnforcementResult policy_results = 3; + * + */ + public Builder setPolicyResults( + int index, + com.google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult + .PolicyEnforcementResult.Builder + builderForValue) { + if (policyResultsBuilder_ == null) { + ensurePolicyResultsIsMutable(); + policyResults_.set(index, builderForValue.build()); + onChanged(); + } else { + policyResultsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
            +       * Customer policy enforcement results.
            +       * Populated only if the assist call was skipped due to a policy
            +       * violation. It contains results from those filters that blocked the
            +       * processing of the query.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult.PolicyEnforcementResult policy_results = 3; + * + */ + public Builder addPolicyResults( + com.google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult + .PolicyEnforcementResult + value) { + if (policyResultsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePolicyResultsIsMutable(); + policyResults_.add(value); + onChanged(); + } else { + policyResultsBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
            +       * Customer policy enforcement results.
            +       * Populated only if the assist call was skipped due to a policy
            +       * violation. It contains results from those filters that blocked the
            +       * processing of the query.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult.PolicyEnforcementResult policy_results = 3; + * + */ + public Builder addPolicyResults( + int index, + com.google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult + .PolicyEnforcementResult + value) { + if (policyResultsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePolicyResultsIsMutable(); + policyResults_.add(index, value); + onChanged(); + } else { + policyResultsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
            +       * Customer policy enforcement results.
            +       * Populated only if the assist call was skipped due to a policy
            +       * violation. It contains results from those filters that blocked the
            +       * processing of the query.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult.PolicyEnforcementResult policy_results = 3; + * + */ + public Builder addPolicyResults( + com.google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult + .PolicyEnforcementResult.Builder + builderForValue) { + if (policyResultsBuilder_ == null) { + ensurePolicyResultsIsMutable(); + policyResults_.add(builderForValue.build()); + onChanged(); + } else { + policyResultsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
            +       * Customer policy enforcement results.
            +       * Populated only if the assist call was skipped due to a policy
            +       * violation. It contains results from those filters that blocked the
            +       * processing of the query.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult.PolicyEnforcementResult policy_results = 3; + * + */ + public Builder addPolicyResults( + int index, + com.google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult + .PolicyEnforcementResult.Builder + builderForValue) { + if (policyResultsBuilder_ == null) { + ensurePolicyResultsIsMutable(); + policyResults_.add(index, builderForValue.build()); + onChanged(); + } else { + policyResultsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
            +       * Customer policy enforcement results.
            +       * Populated only if the assist call was skipped due to a policy
            +       * violation. It contains results from those filters that blocked the
            +       * processing of the query.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult.PolicyEnforcementResult policy_results = 3; + * + */ + public Builder addAllPolicyResults( + java.lang.Iterable< + ? extends + com.google.cloud.discoveryengine.v1beta.AssistAnswer + .CustomerPolicyEnforcementResult.PolicyEnforcementResult> + values) { + if (policyResultsBuilder_ == null) { + ensurePolicyResultsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, policyResults_); + onChanged(); + } else { + policyResultsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
            +       * Customer policy enforcement results.
            +       * Populated only if the assist call was skipped due to a policy
            +       * violation. It contains results from those filters that blocked the
            +       * processing of the query.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult.PolicyEnforcementResult policy_results = 3; + * + */ + public Builder clearPolicyResults() { + if (policyResultsBuilder_ == null) { + policyResults_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + policyResultsBuilder_.clear(); + } + return this; + } + + /** + * + * + *
            +       * Customer policy enforcement results.
            +       * Populated only if the assist call was skipped due to a policy
            +       * violation. It contains results from those filters that blocked the
            +       * processing of the query.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult.PolicyEnforcementResult policy_results = 3; + * + */ + public Builder removePolicyResults(int index) { + if (policyResultsBuilder_ == null) { + ensurePolicyResultsIsMutable(); + policyResults_.remove(index); + onChanged(); + } else { + policyResultsBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
            +       * Customer policy enforcement results.
            +       * Populated only if the assist call was skipped due to a policy
            +       * violation. It contains results from those filters that blocked the
            +       * processing of the query.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult.PolicyEnforcementResult policy_results = 3; + * + */ + public com.google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult + .PolicyEnforcementResult.Builder + getPolicyResultsBuilder(int index) { + return internalGetPolicyResultsFieldBuilder().getBuilder(index); + } + + /** + * + * + *
            +       * Customer policy enforcement results.
            +       * Populated only if the assist call was skipped due to a policy
            +       * violation. It contains results from those filters that blocked the
            +       * processing of the query.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult.PolicyEnforcementResult policy_results = 3; + * + */ + public com.google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult + .PolicyEnforcementResultOrBuilder + getPolicyResultsOrBuilder(int index) { + if (policyResultsBuilder_ == null) { + return policyResults_.get(index); + } else { + return policyResultsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
            +       * Customer policy enforcement results.
            +       * Populated only if the assist call was skipped due to a policy
            +       * violation. It contains results from those filters that blocked the
            +       * processing of the query.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult.PolicyEnforcementResult policy_results = 3; + * + */ + public java.util.List< + ? extends + com.google.cloud.discoveryengine.v1beta.AssistAnswer + .CustomerPolicyEnforcementResult.PolicyEnforcementResultOrBuilder> + getPolicyResultsOrBuilderList() { + if (policyResultsBuilder_ != null) { + return policyResultsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(policyResults_); + } + } + + /** + * + * + *
            +       * Customer policy enforcement results.
            +       * Populated only if the assist call was skipped due to a policy
            +       * violation. It contains results from those filters that blocked the
            +       * processing of the query.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult.PolicyEnforcementResult policy_results = 3; + * + */ + public com.google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult + .PolicyEnforcementResult.Builder + addPolicyResultsBuilder() { + return internalGetPolicyResultsFieldBuilder() + .addBuilder( + com.google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult + .PolicyEnforcementResult.getDefaultInstance()); + } + + /** + * + * + *
            +       * Customer policy enforcement results.
            +       * Populated only if the assist call was skipped due to a policy
            +       * violation. It contains results from those filters that blocked the
            +       * processing of the query.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult.PolicyEnforcementResult policy_results = 3; + * + */ + public com.google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult + .PolicyEnforcementResult.Builder + addPolicyResultsBuilder(int index) { + return internalGetPolicyResultsFieldBuilder() + .addBuilder( + index, + com.google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult + .PolicyEnforcementResult.getDefaultInstance()); + } + + /** + * + * + *
            +       * Customer policy enforcement results.
            +       * Populated only if the assist call was skipped due to a policy
            +       * violation. It contains results from those filters that blocked the
            +       * processing of the query.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult.PolicyEnforcementResult policy_results = 3; + * + */ + public java.util.List< + com.google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult + .PolicyEnforcementResult.Builder> + getPolicyResultsBuilderList() { + return internalGetPolicyResultsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult + .PolicyEnforcementResult, + com.google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult + .PolicyEnforcementResult.Builder, + com.google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult + .PolicyEnforcementResultOrBuilder> + internalGetPolicyResultsFieldBuilder() { + if (policyResultsBuilder_ == null) { + policyResultsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.discoveryengine.v1beta.AssistAnswer + .CustomerPolicyEnforcementResult.PolicyEnforcementResult, + com.google.cloud.discoveryengine.v1beta.AssistAnswer + .CustomerPolicyEnforcementResult.PolicyEnforcementResult.Builder, + com.google.cloud.discoveryengine.v1beta.AssistAnswer + .CustomerPolicyEnforcementResult.PolicyEnforcementResultOrBuilder>( + policyResults_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + policyResults_ = null; + } + return policyResultsBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult) + private static final com.google.cloud.discoveryengine.v1beta.AssistAnswer + .CustomerPolicyEnforcementResult + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.discoveryengine.v1beta.AssistAnswer + .CustomerPolicyEnforcementResult(); + } + + public static com.google.cloud.discoveryengine.v1beta.AssistAnswer + .CustomerPolicyEnforcementResult + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CustomerPolicyEnforcementResult parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int bitField0_; + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
            +   * Immutable. Identifier. Resource name of the `AssistAnswer`.
            +   * Format:
            +   * `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/sessions/{session}/assistAnswers/{assist_answer}`
            +   *
            +   * This field must be a UTF-8 encoded string with a length limit of 1024
            +   * characters.
            +   * 
            + * + * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = IDENTIFIER]; + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + 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(); + name_ = s; + return s; + } + } + + /** + * + * + *
            +   * Immutable. Identifier. Resource name of the `AssistAnswer`.
            +   * Format:
            +   * `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/sessions/{session}/assistAnswers/{assist_answer}`
            +   *
            +   * This field must be a UTF-8 encoded string with a length limit of 1024
            +   * characters.
            +   * 
            + * + * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = IDENTIFIER]; + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int STATE_FIELD_NUMBER = 2; + private int state_ = 0; + + /** + * + * + *
            +   * State of the answer generation.
            +   * 
            + * + * .google.cloud.discoveryengine.v1beta.AssistAnswer.State state = 2; + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + + /** + * + * + *
            +   * State of the answer generation.
            +   * 
            + * + * .google.cloud.discoveryengine.v1beta.AssistAnswer.State state = 2; + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AssistAnswer.State getState() { + com.google.cloud.discoveryengine.v1beta.AssistAnswer.State result = + com.google.cloud.discoveryengine.v1beta.AssistAnswer.State.forNumber(state_); + return result == null + ? com.google.cloud.discoveryengine.v1beta.AssistAnswer.State.UNRECOGNIZED + : result; + } + + public static final int REPLIES_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private java.util.List replies_; + + /** + * + * + *
            +   * Replies of the assistant.
            +   * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.AssistAnswer.Reply replies = 3; + */ + @java.lang.Override + public java.util.List + getRepliesList() { + return replies_; + } + + /** + * + * + *
            +   * Replies of the assistant.
            +   * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.AssistAnswer.Reply replies = 3; + */ + @java.lang.Override + public java.util.List< + ? extends com.google.cloud.discoveryengine.v1beta.AssistAnswer.ReplyOrBuilder> + getRepliesOrBuilderList() { + return replies_; + } + + /** + * + * + *
            +   * Replies of the assistant.
            +   * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.AssistAnswer.Reply replies = 3; + */ + @java.lang.Override + public int getRepliesCount() { + return replies_.size(); + } + + /** + * + * + *
            +   * Replies of the assistant.
            +   * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.AssistAnswer.Reply replies = 3; + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AssistAnswer.Reply getReplies(int index) { + return replies_.get(index); + } + + /** + * + * + *
            +   * Replies of the assistant.
            +   * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.AssistAnswer.Reply replies = 3; + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AssistAnswer.ReplyOrBuilder getRepliesOrBuilder( + int index) { + return replies_.get(index); + } + + public static final int ASSIST_SKIPPED_REASONS_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private com.google.protobuf.Internal.IntList assistSkippedReasons_ = emptyIntList(); + + private static final com.google.protobuf.Internal.IntListAdapter.IntConverter< + com.google.cloud.discoveryengine.v1beta.AssistAnswer.AssistSkippedReason> + assistSkippedReasons_converter_ = + new com.google.protobuf.Internal.IntListAdapter.IntConverter< + com.google.cloud.discoveryengine.v1beta.AssistAnswer.AssistSkippedReason>() { + public com.google.cloud.discoveryengine.v1beta.AssistAnswer.AssistSkippedReason convert( + int from) { + com.google.cloud.discoveryengine.v1beta.AssistAnswer.AssistSkippedReason result = + com.google.cloud.discoveryengine.v1beta.AssistAnswer.AssistSkippedReason + .forNumber(from); + return result == null + ? com.google.cloud.discoveryengine.v1beta.AssistAnswer.AssistSkippedReason + .UNRECOGNIZED + : result; + } + }; + + /** + * + * + *
            +   * Reasons for not answering the assist call.
            +   * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AssistAnswer.AssistSkippedReason assist_skipped_reasons = 5; + * + * + * @return A list containing the assistSkippedReasons. + */ + @java.lang.Override + public java.util.List + getAssistSkippedReasonsList() { + return new com.google.protobuf.Internal.IntListAdapter< + com.google.cloud.discoveryengine.v1beta.AssistAnswer.AssistSkippedReason>( + assistSkippedReasons_, assistSkippedReasons_converter_); + } + + /** + * + * + *
            +   * Reasons for not answering the assist call.
            +   * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AssistAnswer.AssistSkippedReason assist_skipped_reasons = 5; + * + * + * @return The count of assistSkippedReasons. + */ + @java.lang.Override + public int getAssistSkippedReasonsCount() { + return assistSkippedReasons_.size(); + } + + /** + * + * + *
            +   * Reasons for not answering the assist call.
            +   * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AssistAnswer.AssistSkippedReason assist_skipped_reasons = 5; + * + * + * @param index The index of the element to return. + * @return The assistSkippedReasons at the given index. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AssistAnswer.AssistSkippedReason + getAssistSkippedReasons(int index) { + return assistSkippedReasons_converter_.convert(assistSkippedReasons_.getInt(index)); + } + + /** + * + * + *
            +   * Reasons for not answering the assist call.
            +   * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AssistAnswer.AssistSkippedReason assist_skipped_reasons = 5; + * + * + * @return A list containing the enum numeric values on the wire for assistSkippedReasons. + */ + @java.lang.Override + public java.util.List getAssistSkippedReasonsValueList() { + return assistSkippedReasons_; + } + + /** + * + * + *
            +   * Reasons for not answering the assist call.
            +   * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AssistAnswer.AssistSkippedReason assist_skipped_reasons = 5; + * + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of assistSkippedReasons at the given index. + */ + @java.lang.Override + public int getAssistSkippedReasonsValue(int index) { + return assistSkippedReasons_.getInt(index); + } + + private int assistSkippedReasonsMemoizedSerializedSize; + + public static final int CUSTOMER_POLICY_ENFORCEMENT_RESULT_FIELD_NUMBER = 8; + private com.google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult + customerPolicyEnforcementResult_; + + /** + * + * + *
            +   * Optional. The field contains information about the various policy checks'
            +   * results like the banned phrases or the Model Armor checks. This field is
            +   * populated only if the assist call was skipped due to a policy violation.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult customer_policy_enforcement_result = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the customerPolicyEnforcementResult field is set. + */ + @java.lang.Override + public boolean hasCustomerPolicyEnforcementResult() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
            +   * Optional. The field contains information about the various policy checks'
            +   * results like the banned phrases or the Model Armor checks. This field is
            +   * populated only if the assist call was skipped due to a policy violation.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult customer_policy_enforcement_result = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The customerPolicyEnforcementResult. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult + getCustomerPolicyEnforcementResult() { + return customerPolicyEnforcementResult_ == null + ? com.google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult + .getDefaultInstance() + : customerPolicyEnforcementResult_; + } + + /** + * + * + *
            +   * Optional. The field contains information about the various policy checks'
            +   * results like the banned phrases or the Model Armor checks. This field is
            +   * populated only if the assist call was skipped due to a policy violation.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult customer_policy_enforcement_result = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AssistAnswer + .CustomerPolicyEnforcementResultOrBuilder + getCustomerPolicyEnforcementResultOrBuilder() { + return customerPolicyEnforcementResult_ == null + ? com.google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult + .getDefaultInstance() + : customerPolicyEnforcementResult_; + } + + 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 { + getSerializedSize(); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + if (state_ + != com.google.cloud.discoveryengine.v1beta.AssistAnswer.State.STATE_UNSPECIFIED + .getNumber()) { + output.writeEnum(2, state_); + } + for (int i = 0; i < replies_.size(); i++) { + output.writeMessage(3, replies_.get(i)); + } + if (getAssistSkippedReasonsList().size() > 0) { + output.writeUInt32NoTag(42); + output.writeUInt32NoTag(assistSkippedReasonsMemoizedSerializedSize); + } + for (int i = 0; i < assistSkippedReasons_.size(); i++) { + output.writeEnumNoTag(assistSkippedReasons_.getInt(i)); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(8, getCustomerPolicyEnforcementResult()); + } + 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(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + if (state_ + != com.google.cloud.discoveryengine.v1beta.AssistAnswer.State.STATE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, state_); + } + for (int i = 0; i < replies_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, replies_.get(i)); + } + { + int dataSize = 0; + for (int i = 0; i < assistSkippedReasons_.size(); i++) { + dataSize += + com.google.protobuf.CodedOutputStream.computeEnumSizeNoTag( + assistSkippedReasons_.getInt(i)); + } + size += dataSize; + if (!getAssistSkippedReasonsList().isEmpty()) { + size += 1; + size += com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(dataSize); + } + assistSkippedReasonsMemoizedSerializedSize = dataSize; + } + if (((bitField0_ & 0x00000001) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 8, getCustomerPolicyEnforcementResult()); + } + 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.discoveryengine.v1beta.AssistAnswer)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1beta.AssistAnswer other = + (com.google.cloud.discoveryengine.v1beta.AssistAnswer) obj; + + if (!getName().equals(other.getName())) return false; + if (state_ != other.state_) return false; + if (!getRepliesList().equals(other.getRepliesList())) return false; + if (!assistSkippedReasons_.equals(other.assistSkippedReasons_)) return false; + if (hasCustomerPolicyEnforcementResult() != other.hasCustomerPolicyEnforcementResult()) + return false; + if (hasCustomerPolicyEnforcementResult()) { + if (!getCustomerPolicyEnforcementResult().equals(other.getCustomerPolicyEnforcementResult())) + 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) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + STATE_FIELD_NUMBER; + hash = (53 * hash) + state_; + if (getRepliesCount() > 0) { + hash = (37 * hash) + REPLIES_FIELD_NUMBER; + hash = (53 * hash) + getRepliesList().hashCode(); + } + if (getAssistSkippedReasonsCount() > 0) { + hash = (37 * hash) + ASSIST_SKIPPED_REASONS_FIELD_NUMBER; + hash = (53 * hash) + assistSkippedReasons_.hashCode(); + } + if (hasCustomerPolicyEnforcementResult()) { + hash = (37 * hash) + CUSTOMER_POLICY_ENFORCEMENT_RESULT_FIELD_NUMBER; + hash = (53 * hash) + getCustomerPolicyEnforcementResult().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1beta.AssistAnswer parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.AssistAnswer 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.discoveryengine.v1beta.AssistAnswer parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.AssistAnswer 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.discoveryengine.v1beta.AssistAnswer parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.AssistAnswer parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1beta.AssistAnswer parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.AssistAnswer 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.discoveryengine.v1beta.AssistAnswer parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.AssistAnswer 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.discoveryengine.v1beta.AssistAnswer parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.AssistAnswer 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.discoveryengine.v1beta.AssistAnswer 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; + } + + /** + * + * + *
            +   * AssistAnswer resource, main part of
            +   * [AssistResponse][google.cloud.discoveryengine.v1beta.AssistResponse].
            +   * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.AssistAnswer} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.AssistAnswer) + com.google.cloud.discoveryengine.v1beta.AssistAnswerOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.AssistAnswerProto + .internal_static_google_cloud_discoveryengine_v1beta_AssistAnswer_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.AssistAnswerProto + .internal_static_google_cloud_discoveryengine_v1beta_AssistAnswer_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.AssistAnswer.class, + com.google.cloud.discoveryengine.v1beta.AssistAnswer.Builder.class); + } + + // Construct using com.google.cloud.discoveryengine.v1beta.AssistAnswer.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetRepliesFieldBuilder(); + internalGetCustomerPolicyEnforcementResultFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + state_ = 0; + if (repliesBuilder_ == null) { + replies_ = java.util.Collections.emptyList(); + } else { + replies_ = null; + repliesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000004); + assistSkippedReasons_ = emptyIntList(); + customerPolicyEnforcementResult_ = null; + if (customerPolicyEnforcementResultBuilder_ != null) { + customerPolicyEnforcementResultBuilder_.dispose(); + customerPolicyEnforcementResultBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1beta.AssistAnswerProto + .internal_static_google_cloud_discoveryengine_v1beta_AssistAnswer_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AssistAnswer getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1beta.AssistAnswer.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AssistAnswer build() { + com.google.cloud.discoveryengine.v1beta.AssistAnswer result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AssistAnswer buildPartial() { + com.google.cloud.discoveryengine.v1beta.AssistAnswer result = + new com.google.cloud.discoveryengine.v1beta.AssistAnswer(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.discoveryengine.v1beta.AssistAnswer result) { + if (repliesBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0)) { + replies_ = java.util.Collections.unmodifiableList(replies_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.replies_ = replies_; + } else { + result.replies_ = repliesBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.discoveryengine.v1beta.AssistAnswer result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.state_ = state_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + assistSkippedReasons_.makeImmutable(); + result.assistSkippedReasons_ = assistSkippedReasons_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000010) != 0)) { + result.customerPolicyEnforcementResult_ = + customerPolicyEnforcementResultBuilder_ == null + ? customerPolicyEnforcementResult_ + : customerPolicyEnforcementResultBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.discoveryengine.v1beta.AssistAnswer) { + return mergeFrom((com.google.cloud.discoveryengine.v1beta.AssistAnswer) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.discoveryengine.v1beta.AssistAnswer other) { + if (other == com.google.cloud.discoveryengine.v1beta.AssistAnswer.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.state_ != 0) { + setStateValue(other.getStateValue()); + } + if (repliesBuilder_ == null) { + if (!other.replies_.isEmpty()) { + if (replies_.isEmpty()) { + replies_ = other.replies_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureRepliesIsMutable(); + replies_.addAll(other.replies_); + } + onChanged(); + } + } else { + if (!other.replies_.isEmpty()) { + if (repliesBuilder_.isEmpty()) { + repliesBuilder_.dispose(); + repliesBuilder_ = null; + replies_ = other.replies_; + bitField0_ = (bitField0_ & ~0x00000004); + repliesBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetRepliesFieldBuilder() + : null; + } else { + repliesBuilder_.addAllMessages(other.replies_); + } + } + } + if (!other.assistSkippedReasons_.isEmpty()) { + if (assistSkippedReasons_.isEmpty()) { + assistSkippedReasons_ = other.assistSkippedReasons_; + assistSkippedReasons_.makeImmutable(); + bitField0_ |= 0x00000008; + } else { + ensureAssistSkippedReasonsIsMutable(); + assistSkippedReasons_.addAll(other.assistSkippedReasons_); + } + onChanged(); + } + if (other.hasCustomerPolicyEnforcementResult()) { + mergeCustomerPolicyEnforcementResult(other.getCustomerPolicyEnforcementResult()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + state_ = input.readEnum(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: + { + com.google.cloud.discoveryengine.v1beta.AssistAnswer.Reply m = + input.readMessage( + com.google.cloud.discoveryengine.v1beta.AssistAnswer.Reply.parser(), + extensionRegistry); + if (repliesBuilder_ == null) { + ensureRepliesIsMutable(); + replies_.add(m); + } else { + repliesBuilder_.addMessage(m); + } + break; + } // case 26 + case 40: + { + int tmpRaw = input.readEnum(); + ensureAssistSkippedReasonsIsMutable(); + assistSkippedReasons_.addInt(tmpRaw); + break; + } // case 40 + case 42: + { + int length = input.readRawVarint32(); + int limit = input.pushLimit(length); + ensureAssistSkippedReasonsIsMutable(); + while (input.getBytesUntilLimit() > 0) { + assistSkippedReasons_.addInt(input.readEnum()); + } + input.popLimit(limit); + break; + } // case 42 + case 66: + { + input.readMessage( + internalGetCustomerPolicyEnforcementResultFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 66 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + + /** + * + * + *
            +     * Immutable. Identifier. Resource name of the `AssistAnswer`.
            +     * Format:
            +     * `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/sessions/{session}/assistAnswers/{assist_answer}`
            +     *
            +     * This field must be a UTF-8 encoded string with a length limit of 1024
            +     * characters.
            +     * 
            + * + * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = IDENTIFIER]; + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
            +     * Immutable. Identifier. Resource name of the `AssistAnswer`.
            +     * Format:
            +     * `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/sessions/{session}/assistAnswers/{assist_answer}`
            +     *
            +     * This field must be a UTF-8 encoded string with a length limit of 1024
            +     * characters.
            +     * 
            + * + * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = IDENTIFIER]; + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
            +     * Immutable. Identifier. Resource name of the `AssistAnswer`.
            +     * Format:
            +     * `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/sessions/{session}/assistAnswers/{assist_answer}`
            +     *
            +     * This field must be a UTF-8 encoded string with a length limit of 1024
            +     * characters.
            +     * 
            + * + * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = IDENTIFIER]; + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Immutable. Identifier. Resource name of the `AssistAnswer`.
            +     * Format:
            +     * `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/sessions/{session}/assistAnswers/{assist_answer}`
            +     *
            +     * This field must be a UTF-8 encoded string with a length limit of 1024
            +     * characters.
            +     * 
            + * + * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = IDENTIFIER]; + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
            +     * Immutable. Identifier. Resource name of the `AssistAnswer`.
            +     * Format:
            +     * `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/sessions/{session}/assistAnswers/{assist_answer}`
            +     *
            +     * This field must be a UTF-8 encoded string with a length limit of 1024
            +     * characters.
            +     * 
            + * + * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = IDENTIFIER]; + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int state_ = 0; + + /** + * + * + *
            +     * State of the answer generation.
            +     * 
            + * + * .google.cloud.discoveryengine.v1beta.AssistAnswer.State state = 2; + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + + /** + * + * + *
            +     * State of the answer generation.
            +     * 
            + * + * .google.cloud.discoveryengine.v1beta.AssistAnswer.State state = 2; + * + * @param value The enum numeric value on the wire for state to set. + * @return This builder for chaining. + */ + public Builder setStateValue(int value) { + state_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
            +     * State of the answer generation.
            +     * 
            + * + * .google.cloud.discoveryengine.v1beta.AssistAnswer.State state = 2; + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AssistAnswer.State getState() { + com.google.cloud.discoveryengine.v1beta.AssistAnswer.State result = + com.google.cloud.discoveryengine.v1beta.AssistAnswer.State.forNumber(state_); + return result == null + ? com.google.cloud.discoveryengine.v1beta.AssistAnswer.State.UNRECOGNIZED + : result; + } + + /** + * + * + *
            +     * State of the answer generation.
            +     * 
            + * + * .google.cloud.discoveryengine.v1beta.AssistAnswer.State state = 2; + * + * @param value The state to set. + * @return This builder for chaining. + */ + public Builder setState(com.google.cloud.discoveryengine.v1beta.AssistAnswer.State value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + state_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
            +     * State of the answer generation.
            +     * 
            + * + * .google.cloud.discoveryengine.v1beta.AssistAnswer.State state = 2; + * + * @return This builder for chaining. + */ + public Builder clearState() { + bitField0_ = (bitField0_ & ~0x00000002); + state_ = 0; + onChanged(); + return this; + } + + private java.util.List replies_ = + java.util.Collections.emptyList(); + + private void ensureRepliesIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + replies_ = + new java.util.ArrayList( + replies_); + bitField0_ |= 0x00000004; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.discoveryengine.v1beta.AssistAnswer.Reply, + com.google.cloud.discoveryengine.v1beta.AssistAnswer.Reply.Builder, + com.google.cloud.discoveryengine.v1beta.AssistAnswer.ReplyOrBuilder> + repliesBuilder_; + + /** + * + * + *
            +     * Replies of the assistant.
            +     * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.AssistAnswer.Reply replies = 3; + */ + public java.util.List + getRepliesList() { + if (repliesBuilder_ == null) { + return java.util.Collections.unmodifiableList(replies_); + } else { + return repliesBuilder_.getMessageList(); + } + } + + /** + * + * + *
            +     * Replies of the assistant.
            +     * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.AssistAnswer.Reply replies = 3; + */ + public int getRepliesCount() { + if (repliesBuilder_ == null) { + return replies_.size(); + } else { + return repliesBuilder_.getCount(); + } + } + + /** + * + * + *
            +     * Replies of the assistant.
            +     * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.AssistAnswer.Reply replies = 3; + */ + public com.google.cloud.discoveryengine.v1beta.AssistAnswer.Reply getReplies(int index) { + if (repliesBuilder_ == null) { + return replies_.get(index); + } else { + return repliesBuilder_.getMessage(index); + } + } + + /** + * + * + *
            +     * Replies of the assistant.
            +     * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.AssistAnswer.Reply replies = 3; + */ + public Builder setReplies( + int index, com.google.cloud.discoveryengine.v1beta.AssistAnswer.Reply value) { + if (repliesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRepliesIsMutable(); + replies_.set(index, value); + onChanged(); + } else { + repliesBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
            +     * Replies of the assistant.
            +     * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.AssistAnswer.Reply replies = 3; + */ + public Builder setReplies( + int index, + com.google.cloud.discoveryengine.v1beta.AssistAnswer.Reply.Builder builderForValue) { + if (repliesBuilder_ == null) { + ensureRepliesIsMutable(); + replies_.set(index, builderForValue.build()); + onChanged(); + } else { + repliesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
            +     * Replies of the assistant.
            +     * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.AssistAnswer.Reply replies = 3; + */ + public Builder addReplies(com.google.cloud.discoveryengine.v1beta.AssistAnswer.Reply value) { + if (repliesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRepliesIsMutable(); + replies_.add(value); + onChanged(); + } else { + repliesBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
            +     * Replies of the assistant.
            +     * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.AssistAnswer.Reply replies = 3; + */ + public Builder addReplies( + int index, com.google.cloud.discoveryengine.v1beta.AssistAnswer.Reply value) { + if (repliesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRepliesIsMutable(); + replies_.add(index, value); + onChanged(); + } else { + repliesBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
            +     * Replies of the assistant.
            +     * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.AssistAnswer.Reply replies = 3; + */ + public Builder addReplies( + com.google.cloud.discoveryengine.v1beta.AssistAnswer.Reply.Builder builderForValue) { + if (repliesBuilder_ == null) { + ensureRepliesIsMutable(); + replies_.add(builderForValue.build()); + onChanged(); + } else { + repliesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
            +     * Replies of the assistant.
            +     * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.AssistAnswer.Reply replies = 3; + */ + public Builder addReplies( + int index, + com.google.cloud.discoveryengine.v1beta.AssistAnswer.Reply.Builder builderForValue) { + if (repliesBuilder_ == null) { + ensureRepliesIsMutable(); + replies_.add(index, builderForValue.build()); + onChanged(); + } else { + repliesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
            +     * Replies of the assistant.
            +     * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.AssistAnswer.Reply replies = 3; + */ + public Builder addAllReplies( + java.lang.Iterable + values) { + if (repliesBuilder_ == null) { + ensureRepliesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, replies_); + onChanged(); + } else { + repliesBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
            +     * Replies of the assistant.
            +     * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.AssistAnswer.Reply replies = 3; + */ + public Builder clearReplies() { + if (repliesBuilder_ == null) { + replies_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + } else { + repliesBuilder_.clear(); + } + return this; + } + + /** + * + * + *
            +     * Replies of the assistant.
            +     * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.AssistAnswer.Reply replies = 3; + */ + public Builder removeReplies(int index) { + if (repliesBuilder_ == null) { + ensureRepliesIsMutable(); + replies_.remove(index); + onChanged(); + } else { + repliesBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
            +     * Replies of the assistant.
            +     * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.AssistAnswer.Reply replies = 3; + */ + public com.google.cloud.discoveryengine.v1beta.AssistAnswer.Reply.Builder getRepliesBuilder( + int index) { + return internalGetRepliesFieldBuilder().getBuilder(index); + } + + /** + * + * + *
            +     * Replies of the assistant.
            +     * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.AssistAnswer.Reply replies = 3; + */ + public com.google.cloud.discoveryengine.v1beta.AssistAnswer.ReplyOrBuilder getRepliesOrBuilder( + int index) { + if (repliesBuilder_ == null) { + return replies_.get(index); + } else { + return repliesBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
            +     * Replies of the assistant.
            +     * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.AssistAnswer.Reply replies = 3; + */ + public java.util.List< + ? extends com.google.cloud.discoveryengine.v1beta.AssistAnswer.ReplyOrBuilder> + getRepliesOrBuilderList() { + if (repliesBuilder_ != null) { + return repliesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(replies_); + } + } + + /** + * + * + *
            +     * Replies of the assistant.
            +     * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.AssistAnswer.Reply replies = 3; + */ + public com.google.cloud.discoveryengine.v1beta.AssistAnswer.Reply.Builder addRepliesBuilder() { + return internalGetRepliesFieldBuilder() + .addBuilder( + com.google.cloud.discoveryengine.v1beta.AssistAnswer.Reply.getDefaultInstance()); + } + + /** + * + * + *
            +     * Replies of the assistant.
            +     * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.AssistAnswer.Reply replies = 3; + */ + public com.google.cloud.discoveryengine.v1beta.AssistAnswer.Reply.Builder addRepliesBuilder( + int index) { + return internalGetRepliesFieldBuilder() + .addBuilder( + index, + com.google.cloud.discoveryengine.v1beta.AssistAnswer.Reply.getDefaultInstance()); + } + + /** + * + * + *
            +     * Replies of the assistant.
            +     * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.AssistAnswer.Reply replies = 3; + */ + public java.util.List + getRepliesBuilderList() { + return internalGetRepliesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.discoveryengine.v1beta.AssistAnswer.Reply, + com.google.cloud.discoveryengine.v1beta.AssistAnswer.Reply.Builder, + com.google.cloud.discoveryengine.v1beta.AssistAnswer.ReplyOrBuilder> + internalGetRepliesFieldBuilder() { + if (repliesBuilder_ == null) { + repliesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.discoveryengine.v1beta.AssistAnswer.Reply, + com.google.cloud.discoveryengine.v1beta.AssistAnswer.Reply.Builder, + com.google.cloud.discoveryengine.v1beta.AssistAnswer.ReplyOrBuilder>( + replies_, ((bitField0_ & 0x00000004) != 0), getParentForChildren(), isClean()); + replies_ = null; + } + return repliesBuilder_; + } + + private com.google.protobuf.Internal.IntList assistSkippedReasons_ = emptyIntList(); + + private void ensureAssistSkippedReasonsIsMutable() { + if (!assistSkippedReasons_.isModifiable()) { + assistSkippedReasons_ = makeMutableCopy(assistSkippedReasons_); + } + bitField0_ |= 0x00000008; + } + + /** + * + * + *
            +     * Reasons for not answering the assist call.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AssistAnswer.AssistSkippedReason assist_skipped_reasons = 5; + * + * + * @return A list containing the assistSkippedReasons. + */ + public java.util.List + getAssistSkippedReasonsList() { + return new com.google.protobuf.Internal.IntListAdapter< + com.google.cloud.discoveryengine.v1beta.AssistAnswer.AssistSkippedReason>( + assistSkippedReasons_, assistSkippedReasons_converter_); + } + + /** + * + * + *
            +     * Reasons for not answering the assist call.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AssistAnswer.AssistSkippedReason assist_skipped_reasons = 5; + * + * + * @return The count of assistSkippedReasons. + */ + public int getAssistSkippedReasonsCount() { + return assistSkippedReasons_.size(); + } + + /** + * + * + *
            +     * Reasons for not answering the assist call.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AssistAnswer.AssistSkippedReason assist_skipped_reasons = 5; + * + * + * @param index The index of the element to return. + * @return The assistSkippedReasons at the given index. + */ + public com.google.cloud.discoveryengine.v1beta.AssistAnswer.AssistSkippedReason + getAssistSkippedReasons(int index) { + return assistSkippedReasons_converter_.convert(assistSkippedReasons_.getInt(index)); + } + + /** + * + * + *
            +     * Reasons for not answering the assist call.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AssistAnswer.AssistSkippedReason assist_skipped_reasons = 5; + * + * + * @param index The index to set the value at. + * @param value The assistSkippedReasons to set. + * @return This builder for chaining. + */ + public Builder setAssistSkippedReasons( + int index, com.google.cloud.discoveryengine.v1beta.AssistAnswer.AssistSkippedReason value) { + if (value == null) { + throw new NullPointerException(); + } + ensureAssistSkippedReasonsIsMutable(); + assistSkippedReasons_.setInt(index, value.getNumber()); + onChanged(); + return this; + } + + /** + * + * + *
            +     * Reasons for not answering the assist call.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AssistAnswer.AssistSkippedReason assist_skipped_reasons = 5; + * + * + * @param value The assistSkippedReasons to add. + * @return This builder for chaining. + */ + public Builder addAssistSkippedReasons( + com.google.cloud.discoveryengine.v1beta.AssistAnswer.AssistSkippedReason value) { + if (value == null) { + throw new NullPointerException(); + } + ensureAssistSkippedReasonsIsMutable(); + assistSkippedReasons_.addInt(value.getNumber()); + onChanged(); + return this; + } + + /** + * + * + *
            +     * Reasons for not answering the assist call.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AssistAnswer.AssistSkippedReason assist_skipped_reasons = 5; + * + * + * @param values The assistSkippedReasons to add. + * @return This builder for chaining. + */ + public Builder addAllAssistSkippedReasons( + java.lang.Iterable< + ? extends com.google.cloud.discoveryengine.v1beta.AssistAnswer.AssistSkippedReason> + values) { + ensureAssistSkippedReasonsIsMutable(); + for (com.google.cloud.discoveryengine.v1beta.AssistAnswer.AssistSkippedReason value : + values) { + assistSkippedReasons_.addInt(value.getNumber()); + } + onChanged(); + return this; + } + + /** + * + * + *
            +     * Reasons for not answering the assist call.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AssistAnswer.AssistSkippedReason assist_skipped_reasons = 5; + * + * + * @return This builder for chaining. + */ + public Builder clearAssistSkippedReasons() { + assistSkippedReasons_ = emptyIntList(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + + /** + * + * + *
            +     * Reasons for not answering the assist call.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AssistAnswer.AssistSkippedReason assist_skipped_reasons = 5; + * + * + * @return A list containing the enum numeric values on the wire for assistSkippedReasons. + */ + public java.util.List getAssistSkippedReasonsValueList() { + assistSkippedReasons_.makeImmutable(); + return assistSkippedReasons_; + } + + /** + * + * + *
            +     * Reasons for not answering the assist call.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AssistAnswer.AssistSkippedReason assist_skipped_reasons = 5; + * + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of assistSkippedReasons at the given index. + */ + public int getAssistSkippedReasonsValue(int index) { + return assistSkippedReasons_.getInt(index); + } + + /** + * + * + *
            +     * Reasons for not answering the assist call.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AssistAnswer.AssistSkippedReason assist_skipped_reasons = 5; + * + * + * @param index The index to set the value at. + * @param value The enum numeric value on the wire for assistSkippedReasons to set. + * @return This builder for chaining. + */ + public Builder setAssistSkippedReasonsValue(int index, int value) { + ensureAssistSkippedReasonsIsMutable(); + assistSkippedReasons_.setInt(index, value); + onChanged(); + return this; + } + + /** + * + * + *
            +     * Reasons for not answering the assist call.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AssistAnswer.AssistSkippedReason assist_skipped_reasons = 5; + * + * + * @param value The enum numeric value on the wire for assistSkippedReasons to add. + * @return This builder for chaining. + */ + public Builder addAssistSkippedReasonsValue(int value) { + ensureAssistSkippedReasonsIsMutable(); + assistSkippedReasons_.addInt(value); + onChanged(); + return this; + } + + /** + * + * + *
            +     * Reasons for not answering the assist call.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AssistAnswer.AssistSkippedReason assist_skipped_reasons = 5; + * + * + * @param values The enum numeric values on the wire for assistSkippedReasons to add. + * @return This builder for chaining. + */ + public Builder addAllAssistSkippedReasonsValue(java.lang.Iterable values) { + ensureAssistSkippedReasonsIsMutable(); + for (int value : values) { + assistSkippedReasons_.addInt(value); + } + onChanged(); + return this; + } + + private com.google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult + customerPolicyEnforcementResult_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult, + com.google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult + .Builder, + com.google.cloud.discoveryengine.v1beta.AssistAnswer + .CustomerPolicyEnforcementResultOrBuilder> + customerPolicyEnforcementResultBuilder_; + + /** + * + * + *
            +     * Optional. The field contains information about the various policy checks'
            +     * results like the banned phrases or the Model Armor checks. This field is
            +     * populated only if the assist call was skipped due to a policy violation.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult customer_policy_enforcement_result = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the customerPolicyEnforcementResult field is set. + */ + public boolean hasCustomerPolicyEnforcementResult() { + return ((bitField0_ & 0x00000010) != 0); + } + + /** + * + * + *
            +     * Optional. The field contains information about the various policy checks'
            +     * results like the banned phrases or the Model Armor checks. This field is
            +     * populated only if the assist call was skipped due to a policy violation.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult customer_policy_enforcement_result = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The customerPolicyEnforcementResult. + */ + public com.google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult + getCustomerPolicyEnforcementResult() { + if (customerPolicyEnforcementResultBuilder_ == null) { + return customerPolicyEnforcementResult_ == null + ? com.google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult + .getDefaultInstance() + : customerPolicyEnforcementResult_; + } else { + return customerPolicyEnforcementResultBuilder_.getMessage(); + } + } + + /** + * + * + *
            +     * Optional. The field contains information about the various policy checks'
            +     * results like the banned phrases or the Model Armor checks. This field is
            +     * populated only if the assist call was skipped due to a policy violation.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult customer_policy_enforcement_result = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setCustomerPolicyEnforcementResult( + com.google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult + value) { + if (customerPolicyEnforcementResultBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + customerPolicyEnforcementResult_ = value; + } else { + customerPolicyEnforcementResultBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Optional. The field contains information about the various policy checks'
            +     * results like the banned phrases or the Model Armor checks. This field is
            +     * populated only if the assist call was skipped due to a policy violation.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult customer_policy_enforcement_result = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setCustomerPolicyEnforcementResult( + com.google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult.Builder + builderForValue) { + if (customerPolicyEnforcementResultBuilder_ == null) { + customerPolicyEnforcementResult_ = builderForValue.build(); + } else { + customerPolicyEnforcementResultBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Optional. The field contains information about the various policy checks'
            +     * results like the banned phrases or the Model Armor checks. This field is
            +     * populated only if the assist call was skipped due to a policy violation.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult customer_policy_enforcement_result = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeCustomerPolicyEnforcementResult( + com.google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult + value) { + if (customerPolicyEnforcementResultBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) + && customerPolicyEnforcementResult_ != null + && customerPolicyEnforcementResult_ + != com.google.cloud.discoveryengine.v1beta.AssistAnswer + .CustomerPolicyEnforcementResult.getDefaultInstance()) { + getCustomerPolicyEnforcementResultBuilder().mergeFrom(value); + } else { + customerPolicyEnforcementResult_ = value; + } + } else { + customerPolicyEnforcementResultBuilder_.mergeFrom(value); + } + if (customerPolicyEnforcementResult_ != null) { + bitField0_ |= 0x00000010; + onChanged(); + } + return this; + } + + /** + * + * + *
            +     * Optional. The field contains information about the various policy checks'
            +     * results like the banned phrases or the Model Armor checks. This field is
            +     * populated only if the assist call was skipped due to a policy violation.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult customer_policy_enforcement_result = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearCustomerPolicyEnforcementResult() { + bitField0_ = (bitField0_ & ~0x00000010); + customerPolicyEnforcementResult_ = null; + if (customerPolicyEnforcementResultBuilder_ != null) { + customerPolicyEnforcementResultBuilder_.dispose(); + customerPolicyEnforcementResultBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
            +     * Optional. The field contains information about the various policy checks'
            +     * results like the banned phrases or the Model Armor checks. This field is
            +     * populated only if the assist call was skipped due to a policy violation.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult customer_policy_enforcement_result = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult + .Builder + getCustomerPolicyEnforcementResultBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return internalGetCustomerPolicyEnforcementResultFieldBuilder().getBuilder(); + } + + /** + * + * + *
            +     * Optional. The field contains information about the various policy checks'
            +     * results like the banned phrases or the Model Armor checks. This field is
            +     * populated only if the assist call was skipped due to a policy violation.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult customer_policy_enforcement_result = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.discoveryengine.v1beta.AssistAnswer + .CustomerPolicyEnforcementResultOrBuilder + getCustomerPolicyEnforcementResultOrBuilder() { + if (customerPolicyEnforcementResultBuilder_ != null) { + return customerPolicyEnforcementResultBuilder_.getMessageOrBuilder(); + } else { + return customerPolicyEnforcementResult_ == null + ? com.google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult + .getDefaultInstance() + : customerPolicyEnforcementResult_; + } + } + + /** + * + * + *
            +     * Optional. The field contains information about the various policy checks'
            +     * results like the banned phrases or the Model Armor checks. This field is
            +     * populated only if the assist call was skipped due to a policy violation.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult customer_policy_enforcement_result = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult, + com.google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult + .Builder, + com.google.cloud.discoveryengine.v1beta.AssistAnswer + .CustomerPolicyEnforcementResultOrBuilder> + internalGetCustomerPolicyEnforcementResultFieldBuilder() { + if (customerPolicyEnforcementResultBuilder_ == null) { + customerPolicyEnforcementResultBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.AssistAnswer + .CustomerPolicyEnforcementResult, + com.google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult + .Builder, + com.google.cloud.discoveryengine.v1beta.AssistAnswer + .CustomerPolicyEnforcementResultOrBuilder>( + getCustomerPolicyEnforcementResult(), getParentForChildren(), isClean()); + customerPolicyEnforcementResult_ = null; + } + return customerPolicyEnforcementResultBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.AssistAnswer) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.AssistAnswer) + private static final com.google.cloud.discoveryengine.v1beta.AssistAnswer DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.discoveryengine.v1beta.AssistAnswer(); + } + + public static com.google.cloud.discoveryengine.v1beta.AssistAnswer getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AssistAnswer parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AssistAnswer getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/AssistAnswerOrBuilder.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/AssistAnswerOrBuilder.java new file mode 100644 index 000000000000..897b72f2054b --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/AssistAnswerOrBuilder.java @@ -0,0 +1,281 @@ +/* + * 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/cloud/discoveryengine/v1beta/assist_answer.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.discoveryengine.v1beta; + +@com.google.protobuf.Generated +public interface AssistAnswerOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.AssistAnswer) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
            +   * Immutable. Identifier. Resource name of the `AssistAnswer`.
            +   * Format:
            +   * `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/sessions/{session}/assistAnswers/{assist_answer}`
            +   *
            +   * This field must be a UTF-8 encoded string with a length limit of 1024
            +   * characters.
            +   * 
            + * + * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = IDENTIFIER]; + * + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
            +   * Immutable. Identifier. Resource name of the `AssistAnswer`.
            +   * Format:
            +   * `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/sessions/{session}/assistAnswers/{assist_answer}`
            +   *
            +   * This field must be a UTF-8 encoded string with a length limit of 1024
            +   * characters.
            +   * 
            + * + * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = IDENTIFIER]; + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
            +   * State of the answer generation.
            +   * 
            + * + * .google.cloud.discoveryengine.v1beta.AssistAnswer.State state = 2; + * + * @return The enum numeric value on the wire for state. + */ + int getStateValue(); + + /** + * + * + *
            +   * State of the answer generation.
            +   * 
            + * + * .google.cloud.discoveryengine.v1beta.AssistAnswer.State state = 2; + * + * @return The state. + */ + com.google.cloud.discoveryengine.v1beta.AssistAnswer.State getState(); + + /** + * + * + *
            +   * Replies of the assistant.
            +   * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.AssistAnswer.Reply replies = 3; + */ + java.util.List getRepliesList(); + + /** + * + * + *
            +   * Replies of the assistant.
            +   * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.AssistAnswer.Reply replies = 3; + */ + com.google.cloud.discoveryengine.v1beta.AssistAnswer.Reply getReplies(int index); + + /** + * + * + *
            +   * Replies of the assistant.
            +   * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.AssistAnswer.Reply replies = 3; + */ + int getRepliesCount(); + + /** + * + * + *
            +   * Replies of the assistant.
            +   * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.AssistAnswer.Reply replies = 3; + */ + java.util.List + getRepliesOrBuilderList(); + + /** + * + * + *
            +   * Replies of the assistant.
            +   * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.AssistAnswer.Reply replies = 3; + */ + com.google.cloud.discoveryengine.v1beta.AssistAnswer.ReplyOrBuilder getRepliesOrBuilder( + int index); + + /** + * + * + *
            +   * Reasons for not answering the assist call.
            +   * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AssistAnswer.AssistSkippedReason assist_skipped_reasons = 5; + * + * + * @return A list containing the assistSkippedReasons. + */ + java.util.List + getAssistSkippedReasonsList(); + + /** + * + * + *
            +   * Reasons for not answering the assist call.
            +   * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AssistAnswer.AssistSkippedReason assist_skipped_reasons = 5; + * + * + * @return The count of assistSkippedReasons. + */ + int getAssistSkippedReasonsCount(); + + /** + * + * + *
            +   * Reasons for not answering the assist call.
            +   * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AssistAnswer.AssistSkippedReason assist_skipped_reasons = 5; + * + * + * @param index The index of the element to return. + * @return The assistSkippedReasons at the given index. + */ + com.google.cloud.discoveryengine.v1beta.AssistAnswer.AssistSkippedReason getAssistSkippedReasons( + int index); + + /** + * + * + *
            +   * Reasons for not answering the assist call.
            +   * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AssistAnswer.AssistSkippedReason assist_skipped_reasons = 5; + * + * + * @return A list containing the enum numeric values on the wire for assistSkippedReasons. + */ + java.util.List getAssistSkippedReasonsValueList(); + + /** + * + * + *
            +   * Reasons for not answering the assist call.
            +   * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AssistAnswer.AssistSkippedReason assist_skipped_reasons = 5; + * + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of assistSkippedReasons at the given index. + */ + int getAssistSkippedReasonsValue(int index); + + /** + * + * + *
            +   * Optional. The field contains information about the various policy checks'
            +   * results like the banned phrases or the Model Armor checks. This field is
            +   * populated only if the assist call was skipped due to a policy violation.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult customer_policy_enforcement_result = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the customerPolicyEnforcementResult field is set. + */ + boolean hasCustomerPolicyEnforcementResult(); + + /** + * + * + *
            +   * Optional. The field contains information about the various policy checks'
            +   * results like the banned phrases or the Model Armor checks. This field is
            +   * populated only if the assist call was skipped due to a policy violation.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult customer_policy_enforcement_result = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The customerPolicyEnforcementResult. + */ + com.google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult + getCustomerPolicyEnforcementResult(); + + /** + * + * + *
            +   * Optional. The field contains information about the various policy checks'
            +   * results like the banned phrases or the Model Armor checks. This field is
            +   * populated only if the assist call was skipped due to a policy violation.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResult customer_policy_enforcement_result = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.discoveryengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResultOrBuilder + getCustomerPolicyEnforcementResultOrBuilder(); +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/AssistAnswerProto.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/AssistAnswerProto.java new file mode 100644 index 000000000000..1708704ecaec --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/AssistAnswerProto.java @@ -0,0 +1,448 @@ +/* + * 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/cloud/discoveryengine/v1beta/assist_answer.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.discoveryengine.v1beta; + +@com.google.protobuf.Generated +public final class AssistAnswerProto extends com.google.protobuf.GeneratedFile { + private AssistAnswerProto() {} + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "AssistAnswerProto"); + } + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1beta_AssistAnswer_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1beta_AssistAnswer_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1beta_AssistAnswer_Reply_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1beta_AssistAnswer_Reply_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1beta_AssistAnswer_CustomerPolicyEnforcementResult_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1beta_AssistAnswer_CustomerPolicyEnforcementResult_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1beta_AssistAnswer_CustomerPolicyEnforcementResult_BannedPhraseEnforcementResult_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1beta_AssistAnswer_CustomerPolicyEnforcementResult_BannedPhraseEnforcementResult_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1beta_AssistAnswer_CustomerPolicyEnforcementResult_ModelArmorEnforcementResult_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1beta_AssistAnswer_CustomerPolicyEnforcementResult_ModelArmorEnforcementResult_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1beta_AssistAnswer_CustomerPolicyEnforcementResult_PolicyEnforcementResult_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1beta_AssistAnswer_CustomerPolicyEnforcementResult_PolicyEnforcementResult_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1beta_AssistantContent_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1beta_AssistantContent_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1beta_AssistantContent_Blob_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1beta_AssistantContent_Blob_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1beta_AssistantContent_File_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1beta_AssistantContent_File_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1beta_AssistantContent_ExecutableCode_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1beta_AssistantContent_ExecutableCode_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1beta_AssistantContent_CodeExecutionResult_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1beta_AssistantContent_CodeExecutionResult_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1beta_AssistantGroundedContent_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1beta_AssistantGroundedContent_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1beta_AssistantGroundedContent_TextGroundingMetadata_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1beta_AssistantGroundedContent_TextGroundingMetadata_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1beta_AssistantGroundedContent_TextGroundingMetadata_Segment_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1beta_AssistantGroundedContent_TextGroundingMetadata_Segment_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1beta_AssistantGroundedContent_TextGroundingMetadata_VisualSegment_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1beta_AssistantGroundedContent_TextGroundingMetadata_VisualSegment_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1beta_AssistantGroundedContent_TextGroundingMetadata_Reference_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1beta_AssistantGroundedContent_TextGroundingMetadata_Reference_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1beta_AssistantGroundedContent_TextGroundingMetadata_Reference_DocumentMetadata_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1beta_AssistantGroundedContent_TextGroundingMetadata_Reference_DocumentMetadata_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n" + + "7google/cloud/discoveryengine/v1beta/assist_answer.proto\022#google.cloud.discover" + + "yengine.v1beta\032\037google/api/field_behavio" + + "r.proto\032\031google/api/resource.proto\032Egoog" + + "le/cloud/discoveryengine/v1beta/grounded_generation_service.proto\032\037google/protob" + + "uf/timestamp.proto\032\027google/rpc/status.proto\"\276\016\n" + + "\014AssistAnswer\022\024\n" + + "\004name\030\001 \001(\tB\006\340A\005\340A\010\022F\n" + + "\005state\030\002" + + " \001(\01627.google.cloud.discoveryengine.v1beta.AssistAnswer.State\022H\n" + + "\007replies\030\003" + + " \003(\01327.google.cloud.discoveryengine.v1beta.AssistAnswer.Reply\022e\n" + + "\026assist_skipped_reasons\030\005 \003(\0162E.google.cloud.disc" + + "overyengine.v1beta.AssistAnswer.AssistSkippedReason\022\202\001\n" + + "\"customer_policy_enforcement_result\030\010 \001(\0132Q.google.cloud.discover" + + "yengine.v1beta.AssistAnswer.CustomerPolicyEnforcementResultB\003\340A\001\032\234\001\n" + + "\005Reply\022Y\n" + + "\020grounded_content\030\001 \001(\0132=.google.cloud.disc" + + "overyengine.v1beta.AssistantGroundedContentH\000\022/\n" + + "\013create_time\030\016 \001(\0132\032.google.protobuf.TimestampB\007\n" + + "\005reply\032\325\006\n" + + "\037CustomerPolicyEnforcementResult\022j\n" + + "\007verdict\030\001 \001(\0162Y.google.cloud.discoveryengine.v1beta.Assis" + + "tAnswer.CustomerPolicyEnforcementResult.Verdict\022\201\001\n" + + "\016policy_results\030\003 \003(\0132i.google.cloud.discoveryengine.v1beta.AssistAns" + + "wer.CustomerPolicyEnforcementResult.PolicyEnforcementResult\0327\n" + + "\035BannedPhraseEnforcementResult\022\026\n" + + "\016banned_phrases\030\001 \003(\t\032m\n" + + "\033ModelArmorEnforcementResult\022\037\n" + + "\025model_armor_violation\030\001 \001(\tH\000\022#\n" + + "\005error\030\002 \001(\0132\022.google.rpc.StatusH\000B\010\n" + + "\006result\032\347\002\n" + + "\027PolicyEnforcementResult\022\233\001\n" + + " banned_phrase_enforcement_result\030\003 \001(\0132o.google.cloud.discov" + + "eryengine.v1beta.AssistAnswer.CustomerPo" + + "licyEnforcementResult.BannedPhraseEnforcementResultH\000\022\227\001\n" + + "\036model_armor_enforcement_result\030\004 \001(\0132m.google.cloud.discoverye" + + "ngine.v1beta.AssistAnswer.CustomerPolicy" + + "EnforcementResult.ModelArmorEnforcementResultH\000B\024\n" + + "\022enforcement_result\"0\n" + + "\007Verdict\022\017\n" + + "\013UNSPECIFIED\020\000\022\t\n" + + "\005ALLOW\020\001\022\t\n" + + "\005BLOCK\020\002\"f\n" + + "\005State\022\025\n" + + "\021STATE_UNSPECIFIED\020\000\022\017\n" + + "\013IN_PROGRESS\020\001\022\n\n" + + "\006FAILED\020\002\022\r\n" + + "\tSUCCEEDED\020\003\022\013\n" + + "\007SKIPPED\020\004\022\r\n" + + "\tCANCELLED\020\005\"\201\001\n" + + "\023AssistSkippedReason\022%\n" + + "!ASSIST_SKIPPED_REASON_UNSPECIFIED\020\000\022$\n" + + " NON_ASSIST_SEEKING_QUERY_IGNORED\020\001\022\035\n" + + "\031CUSTOMER_POLICY_VIOLATION\020\002:\266\001\352A\262\001\n" + + "+discoveryengine.googleapis.com/AssistAnswer\022\202\001projects/{project}/locations/{" + + "location}/collections/{collection}/engin" + + "es/{engine}/sessions/{session}/assistAnswers/{assist_answer}\"\305\006\n" + + "\020AssistantContent\022\016\n" + + "\004text\030\002 \001(\tH\000\022Q\n" + + "\013inline_data\030\003 \001(\0132:" + + ".google.cloud.discoveryengine.v1beta.AssistantContent.BlobH\000\022J\n" + + "\004file\030\004 \001(\0132:.goo" + + "gle.cloud.discoveryengine.v1beta.AssistantContent.FileH\000\022_\n" + + "\017executable_code\030\007 \001(" + + "\0132D.google.cloud.discoveryengine.v1beta.AssistantContent.ExecutableCodeH\000\022j\n" + + "\025code_execution_result\030\010 \001(\0132I.google.cloud." + + "discoveryengine.v1beta.AssistantContent.CodeExecutionResultH\000\022\014\n" + + "\004role\030\001 \001(\t\022\024\n" + + "\007thought\030\006 \001(\010B\003\340A\001\0321\n" + + "\004Blob\022\026\n" + + "\tmime_type\030\001 \001(\tB\003\340A\002\022\021\n" + + "\004data\030\002 \001(\014B\003\340A\002\0324\n" + + "\004File\022\026\n" + + "\tmime_type\030\001 \001(\tB\003\340A\002\022\024\n" + + "\007file_id\030\002 \001(\tB\003\340A\002\032#\n" + + "\016ExecutableCode\022\021\n" + + "\004code\030\002 \001(\tB\003\340A\002\032\372\001\n" + + "\023CodeExecutionResult\022g\n" + + "\007outcome\030\001 \001(\0162Q.google.cloud.discoveryengine.v1beta.A" + + "ssistantContent.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" + + "OUTCOME_OK\020\001\022\022\n" + + "\016OUTCOME_FAILED\020\002\022\035\n" + + "\031OUTCOME_DEADLINE_EXCEEDED\020\003B\006\n" + + "\004data\"\204\014\n" + + "\030AssistantGroundedContent\022v\n" + + "\027text_grounding_metadata\030\003 \001(\0132S.google.cloud.discoveryengine.v1beta" + + ".AssistantGroundedContent.TextGroundingMetadataH\000\022F\n" + + "\007content\030\001 \001(\01325.google.clou" + + "d.discoveryengine.v1beta.AssistantContent\022P\n" + + "\021citation_metadata\030\005 \001(\01325.google.cl" + + "oud.discoveryengine.v1beta.CitationMetadata\032\311\t\n" + + "\025TextGroundingMetadata\022m\n" + + "\010segments\030\004 \003(\0132[.google.cloud.discoveryengine.v" + + "1beta.AssistantGroundedContent.TextGroundingMetadata.Segment\022z\n" + + "\017visual_segments\030\006 \003(\0132a.google.cloud.discoveryengine.v1b" + + "eta.AssistantGroundedContent.TextGroundingMetadata.VisualSegment\022q\n\n" + + "references\030\002 \003(\0132].google.cloud.discoveryengine.v1be" + + "ta.AssistantGroundedContent.TextGroundingMetadata.Reference\032s\n" + + "\007Segment\022\023\n" + + "\013start_index\030\001 \001(\003\022\021\n" + + "\tend_index\030\002 \001(\003\022\031\n" + + "\021reference_indices\030\004 \003(\005\022\027\n" + + "\017grounding_score\030\005 \001(\002\022\014\n" + + "\004text\030\006 \001(\t\032>\n\r" + + "VisualSegment\022\031\n" + + "\021reference_indices\030\001 \003(\005\022\022\n\n" + + "content_id\030\002 \001(\t\032\234\005\n" + + "\tReference\022\017\n" + + "\007content\030\001 \001(\t\022\024\n" + + "\014code_snippet\030\004 \001(\t\022\211\001\n" + + "\021document_metadata\030\002 \001(\0132n.google.cloud.discoveryengine.v1beta." + + "AssistantGroundedContent.TextGroundingMetadata.Reference.DocumentMetadata\032\333\003\n" + + "\020DocumentMetadata\022\211\001\n" + + "\010language\030\010 \001(\0162w.google.cloud.discoveryengine.v1beta.Assistan" + + "tGroundedContent.TextGroundingMetadata.Reference.DocumentMetadata.Language\022C\n" + + "\010document\030\001 \001(\tB,\372A)\n" + + "\'discoveryengine.googleapis.com/DocumentH\000\210\001\001\022\020\n" + + "\003uri\030\002 \001(\tH\001\210\001\001\022\022\n" + + "\005title\030\003 \001(\tH\002\210\001\001\022\034\n" + + "\017page_identifier\030\004 \001(\tH\003\210\001\001\022\023\n" + + "\006domain\030\005 \001(\tH\004\210\001\001\022\026\n" + + "\tmime_type\030\007 \001(\tH\005\210\001\001\"9\n" + + "\010Language\022\030\n" + + "\024LANGUAGE_UNSPECIFIED\020\000\022\n\n" + + "\006PYTHON\020\001\022\007\n" + + "\003SQL\020\002B\013\n" + + "\t_documentB\006\n" + + "\004_uriB\010\n" + + "\006_titleB\022\n" + + "\020_page_identifierB\t\n" + + "\007_domainB\014\n\n" + + "_mime_typeB\n\n" + + "\010metadataB\230\002\n" + + "\'com.google.cloud.discoveryengine.v1betaB\021AssistAnswerProtoP\001ZQcloud.goog" + + "le.com/go/discoveryengine/apiv1beta/disc" + + "overyenginepb;discoveryenginepb\242\002\017DISCOV" + + "ERYENGINE\252\002#Google.Cloud.DiscoveryEngine" + + ".V1Beta\312\002#Google\\Cloud\\DiscoveryEngine\\V" + + "1beta\352\002&Google::Cloud::DiscoveryEngine::V1betab\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.ResourceProto.getDescriptor(), + com.google.cloud.discoveryengine.v1beta.GroundedGenerationServiceProto + .getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), + com.google.rpc.StatusProto.getDescriptor(), + }); + internal_static_google_cloud_discoveryengine_v1beta_AssistAnswer_descriptor = + getDescriptor().getMessageType(0); + internal_static_google_cloud_discoveryengine_v1beta_AssistAnswer_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1beta_AssistAnswer_descriptor, + new java.lang.String[] { + "Name", "State", "Replies", "AssistSkippedReasons", "CustomerPolicyEnforcementResult", + }); + internal_static_google_cloud_discoveryengine_v1beta_AssistAnswer_Reply_descriptor = + internal_static_google_cloud_discoveryengine_v1beta_AssistAnswer_descriptor.getNestedType( + 0); + internal_static_google_cloud_discoveryengine_v1beta_AssistAnswer_Reply_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1beta_AssistAnswer_Reply_descriptor, + new java.lang.String[] { + "GroundedContent", "CreateTime", "Reply", + }); + internal_static_google_cloud_discoveryengine_v1beta_AssistAnswer_CustomerPolicyEnforcementResult_descriptor = + internal_static_google_cloud_discoveryengine_v1beta_AssistAnswer_descriptor.getNestedType( + 1); + internal_static_google_cloud_discoveryengine_v1beta_AssistAnswer_CustomerPolicyEnforcementResult_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1beta_AssistAnswer_CustomerPolicyEnforcementResult_descriptor, + new java.lang.String[] { + "Verdict", "PolicyResults", + }); + internal_static_google_cloud_discoveryengine_v1beta_AssistAnswer_CustomerPolicyEnforcementResult_BannedPhraseEnforcementResult_descriptor = + internal_static_google_cloud_discoveryengine_v1beta_AssistAnswer_CustomerPolicyEnforcementResult_descriptor + .getNestedType(0); + internal_static_google_cloud_discoveryengine_v1beta_AssistAnswer_CustomerPolicyEnforcementResult_BannedPhraseEnforcementResult_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1beta_AssistAnswer_CustomerPolicyEnforcementResult_BannedPhraseEnforcementResult_descriptor, + new java.lang.String[] { + "BannedPhrases", + }); + internal_static_google_cloud_discoveryengine_v1beta_AssistAnswer_CustomerPolicyEnforcementResult_ModelArmorEnforcementResult_descriptor = + internal_static_google_cloud_discoveryengine_v1beta_AssistAnswer_CustomerPolicyEnforcementResult_descriptor + .getNestedType(1); + internal_static_google_cloud_discoveryengine_v1beta_AssistAnswer_CustomerPolicyEnforcementResult_ModelArmorEnforcementResult_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1beta_AssistAnswer_CustomerPolicyEnforcementResult_ModelArmorEnforcementResult_descriptor, + new java.lang.String[] { + "ModelArmorViolation", "Error", "Result", + }); + internal_static_google_cloud_discoveryengine_v1beta_AssistAnswer_CustomerPolicyEnforcementResult_PolicyEnforcementResult_descriptor = + internal_static_google_cloud_discoveryengine_v1beta_AssistAnswer_CustomerPolicyEnforcementResult_descriptor + .getNestedType(2); + internal_static_google_cloud_discoveryengine_v1beta_AssistAnswer_CustomerPolicyEnforcementResult_PolicyEnforcementResult_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1beta_AssistAnswer_CustomerPolicyEnforcementResult_PolicyEnforcementResult_descriptor, + new java.lang.String[] { + "BannedPhraseEnforcementResult", "ModelArmorEnforcementResult", "EnforcementResult", + }); + internal_static_google_cloud_discoveryengine_v1beta_AssistantContent_descriptor = + getDescriptor().getMessageType(1); + internal_static_google_cloud_discoveryengine_v1beta_AssistantContent_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1beta_AssistantContent_descriptor, + new java.lang.String[] { + "Text", + "InlineData", + "File", + "ExecutableCode", + "CodeExecutionResult", + "Role", + "Thought", + "Data", + }); + internal_static_google_cloud_discoveryengine_v1beta_AssistantContent_Blob_descriptor = + internal_static_google_cloud_discoveryengine_v1beta_AssistantContent_descriptor + .getNestedType(0); + internal_static_google_cloud_discoveryengine_v1beta_AssistantContent_Blob_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1beta_AssistantContent_Blob_descriptor, + new java.lang.String[] { + "MimeType", "Data", + }); + internal_static_google_cloud_discoveryengine_v1beta_AssistantContent_File_descriptor = + internal_static_google_cloud_discoveryengine_v1beta_AssistantContent_descriptor + .getNestedType(1); + internal_static_google_cloud_discoveryengine_v1beta_AssistantContent_File_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1beta_AssistantContent_File_descriptor, + new java.lang.String[] { + "MimeType", "FileId", + }); + internal_static_google_cloud_discoveryengine_v1beta_AssistantContent_ExecutableCode_descriptor = + internal_static_google_cloud_discoveryengine_v1beta_AssistantContent_descriptor + .getNestedType(2); + internal_static_google_cloud_discoveryengine_v1beta_AssistantContent_ExecutableCode_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1beta_AssistantContent_ExecutableCode_descriptor, + new java.lang.String[] { + "Code", + }); + internal_static_google_cloud_discoveryengine_v1beta_AssistantContent_CodeExecutionResult_descriptor = + internal_static_google_cloud_discoveryengine_v1beta_AssistantContent_descriptor + .getNestedType(3); + internal_static_google_cloud_discoveryengine_v1beta_AssistantContent_CodeExecutionResult_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1beta_AssistantContent_CodeExecutionResult_descriptor, + new java.lang.String[] { + "Outcome", "Output", + }); + internal_static_google_cloud_discoveryengine_v1beta_AssistantGroundedContent_descriptor = + getDescriptor().getMessageType(2); + internal_static_google_cloud_discoveryengine_v1beta_AssistantGroundedContent_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1beta_AssistantGroundedContent_descriptor, + new java.lang.String[] { + "TextGroundingMetadata", "Content", "CitationMetadata", "Metadata", + }); + internal_static_google_cloud_discoveryengine_v1beta_AssistantGroundedContent_TextGroundingMetadata_descriptor = + internal_static_google_cloud_discoveryengine_v1beta_AssistantGroundedContent_descriptor + .getNestedType(0); + internal_static_google_cloud_discoveryengine_v1beta_AssistantGroundedContent_TextGroundingMetadata_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1beta_AssistantGroundedContent_TextGroundingMetadata_descriptor, + new java.lang.String[] { + "Segments", "VisualSegments", "References", + }); + internal_static_google_cloud_discoveryengine_v1beta_AssistantGroundedContent_TextGroundingMetadata_Segment_descriptor = + internal_static_google_cloud_discoveryengine_v1beta_AssistantGroundedContent_TextGroundingMetadata_descriptor + .getNestedType(0); + internal_static_google_cloud_discoveryengine_v1beta_AssistantGroundedContent_TextGroundingMetadata_Segment_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1beta_AssistantGroundedContent_TextGroundingMetadata_Segment_descriptor, + new java.lang.String[] { + "StartIndex", "EndIndex", "ReferenceIndices", "GroundingScore", "Text", + }); + internal_static_google_cloud_discoveryengine_v1beta_AssistantGroundedContent_TextGroundingMetadata_VisualSegment_descriptor = + internal_static_google_cloud_discoveryengine_v1beta_AssistantGroundedContent_TextGroundingMetadata_descriptor + .getNestedType(1); + internal_static_google_cloud_discoveryengine_v1beta_AssistantGroundedContent_TextGroundingMetadata_VisualSegment_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1beta_AssistantGroundedContent_TextGroundingMetadata_VisualSegment_descriptor, + new java.lang.String[] { + "ReferenceIndices", "ContentId", + }); + internal_static_google_cloud_discoveryengine_v1beta_AssistantGroundedContent_TextGroundingMetadata_Reference_descriptor = + internal_static_google_cloud_discoveryengine_v1beta_AssistantGroundedContent_TextGroundingMetadata_descriptor + .getNestedType(2); + internal_static_google_cloud_discoveryengine_v1beta_AssistantGroundedContent_TextGroundingMetadata_Reference_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1beta_AssistantGroundedContent_TextGroundingMetadata_Reference_descriptor, + new java.lang.String[] { + "Content", "CodeSnippet", "DocumentMetadata", + }); + internal_static_google_cloud_discoveryengine_v1beta_AssistantGroundedContent_TextGroundingMetadata_Reference_DocumentMetadata_descriptor = + internal_static_google_cloud_discoveryengine_v1beta_AssistantGroundedContent_TextGroundingMetadata_Reference_descriptor + .getNestedType(0); + internal_static_google_cloud_discoveryengine_v1beta_AssistantGroundedContent_TextGroundingMetadata_Reference_DocumentMetadata_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1beta_AssistantGroundedContent_TextGroundingMetadata_Reference_DocumentMetadata_descriptor, + new java.lang.String[] { + "Language", "Document", "Uri", "Title", "PageIdentifier", "Domain", "MimeType", + }); + descriptor.resolveAllFeaturesImmutable(); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + com.google.cloud.discoveryengine.v1beta.GroundedGenerationServiceProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); + com.google.rpc.StatusProto.getDescriptor(); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.ResourceProto.resource); + registry.add(com.google.api.ResourceProto.resourceReference); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/AssistUserMetadata.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/AssistUserMetadata.java new file mode 100644 index 000000000000..57bc5f21f766 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/AssistUserMetadata.java @@ -0,0 +1,800 @@ +/* + * 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/cloud/discoveryengine/v1beta/assistant_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.discoveryengine.v1beta; + +/** + * + * + *
            + * User metadata of the request.
            + * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.AssistUserMetadata} + */ +@com.google.protobuf.Generated +public final class AssistUserMetadata extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.AssistUserMetadata) + AssistUserMetadataOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "AssistUserMetadata"); + } + + // Use AssistUserMetadata.newBuilder() to construct. + private AssistUserMetadata(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private AssistUserMetadata() { + timeZone_ = ""; + preferredLanguageCode_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.AssistantServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_AssistUserMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.AssistantServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_AssistUserMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.AssistUserMetadata.class, + com.google.cloud.discoveryengine.v1beta.AssistUserMetadata.Builder.class); + } + + public static final int TIME_ZONE_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object timeZone_ = ""; + + /** + * + * + *
            +   * Optional. IANA time zone, e.g. Europe/Budapest.
            +   * 
            + * + * string time_zone = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The timeZone. + */ + @java.lang.Override + public java.lang.String getTimeZone() { + java.lang.Object ref = timeZone_; + 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(); + timeZone_ = s; + return s; + } + } + + /** + * + * + *
            +   * Optional. IANA time zone, e.g. Europe/Budapest.
            +   * 
            + * + * string time_zone = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for timeZone. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTimeZoneBytes() { + java.lang.Object ref = timeZone_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + timeZone_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PREFERRED_LANGUAGE_CODE_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object preferredLanguageCode_ = ""; + + /** + * + * + *
            +   * Optional. Preferred language to be used for answering if language detection
            +   * fails. Also used as the language of error messages created by actions,
            +   * regardless of language detection results.
            +   * 
            + * + * string preferred_language_code = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The preferredLanguageCode. + */ + @java.lang.Override + public java.lang.String getPreferredLanguageCode() { + java.lang.Object ref = preferredLanguageCode_; + 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(); + preferredLanguageCode_ = s; + return s; + } + } + + /** + * + * + *
            +   * Optional. Preferred language to be used for answering if language detection
            +   * fails. Also used as the language of error messages created by actions,
            +   * regardless of language detection results.
            +   * 
            + * + * string preferred_language_code = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for preferredLanguageCode. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPreferredLanguageCodeBytes() { + java.lang.Object ref = preferredLanguageCode_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + preferredLanguageCode_ = 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 { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(timeZone_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, timeZone_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(preferredLanguageCode_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, preferredLanguageCode_); + } + 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(timeZone_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, timeZone_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(preferredLanguageCode_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, preferredLanguageCode_); + } + 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.discoveryengine.v1beta.AssistUserMetadata)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1beta.AssistUserMetadata other = + (com.google.cloud.discoveryengine.v1beta.AssistUserMetadata) obj; + + if (!getTimeZone().equals(other.getTimeZone())) return false; + if (!getPreferredLanguageCode().equals(other.getPreferredLanguageCode())) 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) + TIME_ZONE_FIELD_NUMBER; + hash = (53 * hash) + getTimeZone().hashCode(); + hash = (37 * hash) + PREFERRED_LANGUAGE_CODE_FIELD_NUMBER; + hash = (53 * hash) + getPreferredLanguageCode().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1beta.AssistUserMetadata parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.AssistUserMetadata 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.discoveryengine.v1beta.AssistUserMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.AssistUserMetadata 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.discoveryengine.v1beta.AssistUserMetadata parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.AssistUserMetadata parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1beta.AssistUserMetadata parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.AssistUserMetadata 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.discoveryengine.v1beta.AssistUserMetadata parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.AssistUserMetadata 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.discoveryengine.v1beta.AssistUserMetadata parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.AssistUserMetadata 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.discoveryengine.v1beta.AssistUserMetadata 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; + } + + /** + * + * + *
            +   * User metadata of the request.
            +   * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.AssistUserMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.AssistUserMetadata) + com.google.cloud.discoveryengine.v1beta.AssistUserMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.AssistantServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_AssistUserMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.AssistantServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_AssistUserMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.AssistUserMetadata.class, + com.google.cloud.discoveryengine.v1beta.AssistUserMetadata.Builder.class); + } + + // Construct using com.google.cloud.discoveryengine.v1beta.AssistUserMetadata.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + timeZone_ = ""; + preferredLanguageCode_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1beta.AssistantServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_AssistUserMetadata_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AssistUserMetadata getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1beta.AssistUserMetadata.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AssistUserMetadata build() { + com.google.cloud.discoveryengine.v1beta.AssistUserMetadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AssistUserMetadata buildPartial() { + com.google.cloud.discoveryengine.v1beta.AssistUserMetadata result = + new com.google.cloud.discoveryengine.v1beta.AssistUserMetadata(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.discoveryengine.v1beta.AssistUserMetadata result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.timeZone_ = timeZone_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.preferredLanguageCode_ = preferredLanguageCode_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.discoveryengine.v1beta.AssistUserMetadata) { + return mergeFrom((com.google.cloud.discoveryengine.v1beta.AssistUserMetadata) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.discoveryengine.v1beta.AssistUserMetadata other) { + if (other == com.google.cloud.discoveryengine.v1beta.AssistUserMetadata.getDefaultInstance()) + return this; + if (!other.getTimeZone().isEmpty()) { + timeZone_ = other.timeZone_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getPreferredLanguageCode().isEmpty()) { + preferredLanguageCode_ = other.preferredLanguageCode_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + timeZone_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + preferredLanguageCode_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object timeZone_ = ""; + + /** + * + * + *
            +     * Optional. IANA time zone, e.g. Europe/Budapest.
            +     * 
            + * + * string time_zone = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The timeZone. + */ + public java.lang.String getTimeZone() { + java.lang.Object ref = timeZone_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + timeZone_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
            +     * Optional. IANA time zone, e.g. Europe/Budapest.
            +     * 
            + * + * string time_zone = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for timeZone. + */ + public com.google.protobuf.ByteString getTimeZoneBytes() { + java.lang.Object ref = timeZone_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + timeZone_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
            +     * Optional. IANA time zone, e.g. Europe/Budapest.
            +     * 
            + * + * string time_zone = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The timeZone to set. + * @return This builder for chaining. + */ + public Builder setTimeZone(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + timeZone_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Optional. IANA time zone, e.g. Europe/Budapest.
            +     * 
            + * + * string time_zone = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearTimeZone() { + timeZone_ = getDefaultInstance().getTimeZone(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
            +     * Optional. IANA time zone, e.g. Europe/Budapest.
            +     * 
            + * + * string time_zone = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for timeZone to set. + * @return This builder for chaining. + */ + public Builder setTimeZoneBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + timeZone_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object preferredLanguageCode_ = ""; + + /** + * + * + *
            +     * Optional. Preferred language to be used for answering if language detection
            +     * fails. Also used as the language of error messages created by actions,
            +     * regardless of language detection results.
            +     * 
            + * + * string preferred_language_code = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The preferredLanguageCode. + */ + public java.lang.String getPreferredLanguageCode() { + java.lang.Object ref = preferredLanguageCode_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + preferredLanguageCode_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
            +     * Optional. Preferred language to be used for answering if language detection
            +     * fails. Also used as the language of error messages created by actions,
            +     * regardless of language detection results.
            +     * 
            + * + * string preferred_language_code = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for preferredLanguageCode. + */ + public com.google.protobuf.ByteString getPreferredLanguageCodeBytes() { + java.lang.Object ref = preferredLanguageCode_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + preferredLanguageCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
            +     * Optional. Preferred language to be used for answering if language detection
            +     * fails. Also used as the language of error messages created by actions,
            +     * regardless of language detection results.
            +     * 
            + * + * string preferred_language_code = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The preferredLanguageCode to set. + * @return This builder for chaining. + */ + public Builder setPreferredLanguageCode(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + preferredLanguageCode_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Optional. Preferred language to be used for answering if language detection
            +     * fails. Also used as the language of error messages created by actions,
            +     * regardless of language detection results.
            +     * 
            + * + * string preferred_language_code = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPreferredLanguageCode() { + preferredLanguageCode_ = getDefaultInstance().getPreferredLanguageCode(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
            +     * Optional. Preferred language to be used for answering if language detection
            +     * fails. Also used as the language of error messages created by actions,
            +     * regardless of language detection results.
            +     * 
            + * + * string preferred_language_code = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for preferredLanguageCode to set. + * @return This builder for chaining. + */ + public Builder setPreferredLanguageCodeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + preferredLanguageCode_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.AssistUserMetadata) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.AssistUserMetadata) + private static final com.google.cloud.discoveryengine.v1beta.AssistUserMetadata DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.discoveryengine.v1beta.AssistUserMetadata(); + } + + public static com.google.cloud.discoveryengine.v1beta.AssistUserMetadata getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AssistUserMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AssistUserMetadata getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/AssistUserMetadataOrBuilder.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/AssistUserMetadataOrBuilder.java new file mode 100644 index 000000000000..1b4e0159da02 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/AssistUserMetadataOrBuilder.java @@ -0,0 +1,84 @@ +/* + * 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/cloud/discoveryengine/v1beta/assistant_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.discoveryengine.v1beta; + +@com.google.protobuf.Generated +public interface AssistUserMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.AssistUserMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
            +   * Optional. IANA time zone, e.g. Europe/Budapest.
            +   * 
            + * + * string time_zone = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The timeZone. + */ + java.lang.String getTimeZone(); + + /** + * + * + *
            +   * Optional. IANA time zone, e.g. Europe/Budapest.
            +   * 
            + * + * string time_zone = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for timeZone. + */ + com.google.protobuf.ByteString getTimeZoneBytes(); + + /** + * + * + *
            +   * Optional. Preferred language to be used for answering if language detection
            +   * fails. Also used as the language of error messages created by actions,
            +   * regardless of language detection results.
            +   * 
            + * + * string preferred_language_code = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The preferredLanguageCode. + */ + java.lang.String getPreferredLanguageCode(); + + /** + * + * + *
            +   * Optional. Preferred language to be used for answering if language detection
            +   * fails. Also used as the language of error messages created by actions,
            +   * regardless of language detection results.
            +   * 
            + * + * string preferred_language_code = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for preferredLanguageCode. + */ + com.google.protobuf.ByteString getPreferredLanguageCodeBytes(); +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/Assistant.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/Assistant.java new file mode 100644 index 000000000000..f64c1506def6 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/Assistant.java @@ -0,0 +1,11643 @@ +/* + * 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/cloud/discoveryengine/v1beta/assistant.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.discoveryengine.v1beta; + +/** + * + * + *
            + * Discovery Engine Assistant resource.
            + * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.Assistant} + */ +@com.google.protobuf.Generated +public final class Assistant extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.Assistant) + AssistantOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Assistant"); + } + + // Use Assistant.newBuilder() to construct. + private Assistant(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private Assistant() { + name_ = ""; + displayName_ = ""; + description_ = ""; + webGroundingType_ = 0; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.AssistantProto + .internal_static_google_cloud_discoveryengine_v1beta_Assistant_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 18: + return internalGetEnabledTools(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.AssistantProto + .internal_static_google_cloud_discoveryengine_v1beta_Assistant_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.Assistant.class, + com.google.cloud.discoveryengine.v1beta.Assistant.Builder.class); + } + + /** + * + * + *
            +   * The type of web grounding to use.
            +   * 
            + * + * Protobuf enum {@code google.cloud.discoveryengine.v1beta.Assistant.WebGroundingType} + */ + public enum WebGroundingType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
            +     * Default, unspecified setting. This is the same as disabled.
            +     * 
            + * + * WEB_GROUNDING_TYPE_UNSPECIFIED = 0; + */ + WEB_GROUNDING_TYPE_UNSPECIFIED(0), + /** + * + * + *
            +     * Web grounding is disabled.
            +     * 
            + * + * WEB_GROUNDING_TYPE_DISABLED = 1; + */ + WEB_GROUNDING_TYPE_DISABLED(1), + /** + * + * + *
            +     * Grounding with Google Search is enabled.
            +     * 
            + * + * WEB_GROUNDING_TYPE_GOOGLE_SEARCH = 2; + */ + WEB_GROUNDING_TYPE_GOOGLE_SEARCH(2), + /** + * + * + *
            +     * Grounding with Enterprise Web Search is enabled.
            +     * 
            + * + * WEB_GROUNDING_TYPE_ENTERPRISE_WEB_SEARCH = 3; + */ + WEB_GROUNDING_TYPE_ENTERPRISE_WEB_SEARCH(3), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "WebGroundingType"); + } + + /** + * + * + *
            +     * Default, unspecified setting. This is the same as disabled.
            +     * 
            + * + * WEB_GROUNDING_TYPE_UNSPECIFIED = 0; + */ + public static final int WEB_GROUNDING_TYPE_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
            +     * Web grounding is disabled.
            +     * 
            + * + * WEB_GROUNDING_TYPE_DISABLED = 1; + */ + public static final int WEB_GROUNDING_TYPE_DISABLED_VALUE = 1; + + /** + * + * + *
            +     * Grounding with Google Search is enabled.
            +     * 
            + * + * WEB_GROUNDING_TYPE_GOOGLE_SEARCH = 2; + */ + public static final int WEB_GROUNDING_TYPE_GOOGLE_SEARCH_VALUE = 2; + + /** + * + * + *
            +     * Grounding with Enterprise Web Search is enabled.
            +     * 
            + * + * WEB_GROUNDING_TYPE_ENTERPRISE_WEB_SEARCH = 3; + */ + public static final int WEB_GROUNDING_TYPE_ENTERPRISE_WEB_SEARCH_VALUE = 3; + + 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 WebGroundingType 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 WebGroundingType forNumber(int value) { + switch (value) { + case 0: + return WEB_GROUNDING_TYPE_UNSPECIFIED; + case 1: + return WEB_GROUNDING_TYPE_DISABLED; + case 2: + return WEB_GROUNDING_TYPE_GOOGLE_SEARCH; + case 3: + return WEB_GROUNDING_TYPE_ENTERPRISE_WEB_SEARCH; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap + internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public WebGroundingType findValueByNumber(int number) { + return WebGroundingType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.Assistant.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final WebGroundingType[] VALUES = values(); + + public static WebGroundingType valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private WebGroundingType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.discoveryengine.v1beta.Assistant.WebGroundingType) + } + + public interface GenerationConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.Assistant.GenerationConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
            +     * Optional. The default model to use for assistant.
            +     * 
            + * + * string default_model_id = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The defaultModelId. + */ + java.lang.String getDefaultModelId(); + + /** + * + * + *
            +     * Optional. The default model to use for assistant.
            +     * 
            + * + * string default_model_id = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for defaultModelId. + */ + com.google.protobuf.ByteString getDefaultModelIdBytes(); + + /** + * + * + *
            +     * Optional. The list of models that are allowed to be used for assistant.
            +     * 
            + * + * repeated string allowed_model_ids = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the allowedModelIds. + */ + java.util.List getAllowedModelIdsList(); + + /** + * + * + *
            +     * Optional. The list of models that are allowed to be used for assistant.
            +     * 
            + * + * repeated string allowed_model_ids = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of allowedModelIds. + */ + int getAllowedModelIdsCount(); + + /** + * + * + *
            +     * Optional. The list of models that are allowed to be used for assistant.
            +     * 
            + * + * repeated string allowed_model_ids = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The allowedModelIds at the given index. + */ + java.lang.String getAllowedModelIds(int index); + + /** + * + * + *
            +     * Optional. The list of models that are allowed to be used for assistant.
            +     * 
            + * + * repeated string allowed_model_ids = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the allowedModelIds at the given index. + */ + com.google.protobuf.ByteString getAllowedModelIdsBytes(int index); + + /** + * + * + *
            +     * System instruction, also known as the prompt preamble for LLM calls.
            +     * See also
            +     * https://cloud.google.com/vertex-ai/generative-ai/docs/learn/prompts/system-instructions
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Assistant.GenerationConfig.SystemInstruction system_instruction = 3; + * + * + * @return Whether the systemInstruction field is set. + */ + boolean hasSystemInstruction(); + + /** + * + * + *
            +     * System instruction, also known as the prompt preamble for LLM calls.
            +     * See also
            +     * https://cloud.google.com/vertex-ai/generative-ai/docs/learn/prompts/system-instructions
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Assistant.GenerationConfig.SystemInstruction system_instruction = 3; + * + * + * @return The systemInstruction. + */ + com.google.cloud.discoveryengine.v1beta.Assistant.GenerationConfig.SystemInstruction + getSystemInstruction(); + + /** + * + * + *
            +     * System instruction, also known as the prompt preamble for LLM calls.
            +     * See also
            +     * https://cloud.google.com/vertex-ai/generative-ai/docs/learn/prompts/system-instructions
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Assistant.GenerationConfig.SystemInstruction system_instruction = 3; + * + */ + com.google.cloud.discoveryengine.v1beta.Assistant.GenerationConfig.SystemInstructionOrBuilder + getSystemInstructionOrBuilder(); + + /** + * + * + *
            +     * The default language to use for the generation of the assistant
            +     * response.
            +     * Use an ISO 639-1 language code such as `en`.
            +     * If not specified, the language will be automatically detected.
            +     * 
            + * + * string default_language = 4; + * + * @return The defaultLanguage. + */ + java.lang.String getDefaultLanguage(); + + /** + * + * + *
            +     * The default language to use for the generation of the assistant
            +     * response.
            +     * Use an ISO 639-1 language code such as `en`.
            +     * If not specified, the language will be automatically detected.
            +     * 
            + * + * string default_language = 4; + * + * @return The bytes for defaultLanguage. + */ + com.google.protobuf.ByteString getDefaultLanguageBytes(); + } + + /** + * + * + *
            +   * Configuration for the generation of the assistant response.
            +   * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.Assistant.GenerationConfig} + */ + public static final class GenerationConfig extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.Assistant.GenerationConfig) + GenerationConfigOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "GenerationConfig"); + } + + // Use GenerationConfig.newBuilder() to construct. + private GenerationConfig(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private GenerationConfig() { + defaultModelId_ = ""; + allowedModelIds_ = com.google.protobuf.LazyStringArrayList.emptyList(); + defaultLanguage_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.AssistantProto + .internal_static_google_cloud_discoveryengine_v1beta_Assistant_GenerationConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.AssistantProto + .internal_static_google_cloud_discoveryengine_v1beta_Assistant_GenerationConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.Assistant.GenerationConfig.class, + com.google.cloud.discoveryengine.v1beta.Assistant.GenerationConfig.Builder.class); + } + + public interface SystemInstructionOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.Assistant.GenerationConfig.SystemInstruction) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
            +       * Optional. Additional system instruction that will be added to the
            +       * default system instruction.
            +       * 
            + * + * string additional_system_instruction = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The additionalSystemInstruction. + */ + java.lang.String getAdditionalSystemInstruction(); + + /** + * + * + *
            +       * Optional. Additional system instruction that will be added to the
            +       * default system instruction.
            +       * 
            + * + * string additional_system_instruction = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The bytes for additionalSystemInstruction. + */ + com.google.protobuf.ByteString getAdditionalSystemInstructionBytes(); + } + + /** + * + * + *
            +     * System instruction, also known as the prompt preamble for LLM calls.
            +     * 
            + * + * Protobuf type {@code + * google.cloud.discoveryengine.v1beta.Assistant.GenerationConfig.SystemInstruction} + */ + public static final class SystemInstruction extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.Assistant.GenerationConfig.SystemInstruction) + SystemInstructionOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "SystemInstruction"); + } + + // Use SystemInstruction.newBuilder() to construct. + private SystemInstruction(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private SystemInstruction() { + additionalSystemInstruction_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.AssistantProto + .internal_static_google_cloud_discoveryengine_v1beta_Assistant_GenerationConfig_SystemInstruction_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.AssistantProto + .internal_static_google_cloud_discoveryengine_v1beta_Assistant_GenerationConfig_SystemInstruction_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.Assistant.GenerationConfig.SystemInstruction + .class, + com.google.cloud.discoveryengine.v1beta.Assistant.GenerationConfig.SystemInstruction + .Builder.class); + } + + public static final int ADDITIONAL_SYSTEM_INSTRUCTION_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object additionalSystemInstruction_ = ""; + + /** + * + * + *
            +       * Optional. Additional system instruction that will be added to the
            +       * default system instruction.
            +       * 
            + * + * string additional_system_instruction = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The additionalSystemInstruction. + */ + @java.lang.Override + public java.lang.String getAdditionalSystemInstruction() { + java.lang.Object ref = additionalSystemInstruction_; + 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(); + additionalSystemInstruction_ = s; + return s; + } + } + + /** + * + * + *
            +       * Optional. Additional system instruction that will be added to the
            +       * default system instruction.
            +       * 
            + * + * string additional_system_instruction = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The bytes for additionalSystemInstruction. + */ + @java.lang.Override + public com.google.protobuf.ByteString getAdditionalSystemInstructionBytes() { + java.lang.Object ref = additionalSystemInstruction_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + additionalSystemInstruction_ = 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 { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(additionalSystemInstruction_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, additionalSystemInstruction_); + } + 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(additionalSystemInstruction_)) { + size += + com.google.protobuf.GeneratedMessage.computeStringSize( + 2, additionalSystemInstruction_); + } + 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.discoveryengine.v1beta.Assistant.GenerationConfig.SystemInstruction)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1beta.Assistant.GenerationConfig.SystemInstruction other = + (com.google.cloud.discoveryengine.v1beta.Assistant.GenerationConfig.SystemInstruction) + obj; + + if (!getAdditionalSystemInstruction().equals(other.getAdditionalSystemInstruction())) + 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) + ADDITIONAL_SYSTEM_INSTRUCTION_FIELD_NUMBER; + hash = (53 * hash) + getAdditionalSystemInstruction().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1beta.Assistant.GenerationConfig + .SystemInstruction + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.Assistant.GenerationConfig + .SystemInstruction + 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.discoveryengine.v1beta.Assistant.GenerationConfig + .SystemInstruction + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.Assistant.GenerationConfig + .SystemInstruction + 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.discoveryengine.v1beta.Assistant.GenerationConfig + .SystemInstruction + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.Assistant.GenerationConfig + .SystemInstruction + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1beta.Assistant.GenerationConfig + .SystemInstruction + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.Assistant.GenerationConfig + .SystemInstruction + 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.discoveryengine.v1beta.Assistant.GenerationConfig + .SystemInstruction + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.Assistant.GenerationConfig + .SystemInstruction + 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.discoveryengine.v1beta.Assistant.GenerationConfig + .SystemInstruction + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.Assistant.GenerationConfig + .SystemInstruction + 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.discoveryengine.v1beta.Assistant.GenerationConfig.SystemInstruction + 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; + } + + /** + * + * + *
            +       * System instruction, also known as the prompt preamble for LLM calls.
            +       * 
            + * + * Protobuf type {@code + * google.cloud.discoveryengine.v1beta.Assistant.GenerationConfig.SystemInstruction} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.Assistant.GenerationConfig.SystemInstruction) + com.google.cloud.discoveryengine.v1beta.Assistant.GenerationConfig + .SystemInstructionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.AssistantProto + .internal_static_google_cloud_discoveryengine_v1beta_Assistant_GenerationConfig_SystemInstruction_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.AssistantProto + .internal_static_google_cloud_discoveryengine_v1beta_Assistant_GenerationConfig_SystemInstruction_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.Assistant.GenerationConfig + .SystemInstruction.class, + com.google.cloud.discoveryengine.v1beta.Assistant.GenerationConfig + .SystemInstruction.Builder.class); + } + + // Construct using + // com.google.cloud.discoveryengine.v1beta.Assistant.GenerationConfig.SystemInstruction.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + additionalSystemInstruction_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1beta.AssistantProto + .internal_static_google_cloud_discoveryengine_v1beta_Assistant_GenerationConfig_SystemInstruction_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Assistant.GenerationConfig.SystemInstruction + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1beta.Assistant.GenerationConfig + .SystemInstruction.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Assistant.GenerationConfig.SystemInstruction + build() { + com.google.cloud.discoveryengine.v1beta.Assistant.GenerationConfig.SystemInstruction + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Assistant.GenerationConfig.SystemInstruction + buildPartial() { + com.google.cloud.discoveryengine.v1beta.Assistant.GenerationConfig.SystemInstruction + result = + new com.google.cloud.discoveryengine.v1beta.Assistant.GenerationConfig + .SystemInstruction(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.discoveryengine.v1beta.Assistant.GenerationConfig.SystemInstruction + result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.additionalSystemInstruction_ = additionalSystemInstruction_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.discoveryengine.v1beta.Assistant.GenerationConfig + .SystemInstruction) { + return mergeFrom( + (com.google.cloud.discoveryengine.v1beta.Assistant.GenerationConfig + .SystemInstruction) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1beta.Assistant.GenerationConfig.SystemInstruction + other) { + if (other + == com.google.cloud.discoveryengine.v1beta.Assistant.GenerationConfig + .SystemInstruction.getDefaultInstance()) return this; + if (!other.getAdditionalSystemInstruction().isEmpty()) { + additionalSystemInstruction_ = other.additionalSystemInstruction_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 18: + { + additionalSystemInstruction_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object additionalSystemInstruction_ = ""; + + /** + * + * + *
            +         * Optional. Additional system instruction that will be added to the
            +         * default system instruction.
            +         * 
            + * + * string additional_system_instruction = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The additionalSystemInstruction. + */ + public java.lang.String getAdditionalSystemInstruction() { + java.lang.Object ref = additionalSystemInstruction_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + additionalSystemInstruction_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
            +         * Optional. Additional system instruction that will be added to the
            +         * default system instruction.
            +         * 
            + * + * string additional_system_instruction = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The bytes for additionalSystemInstruction. + */ + public com.google.protobuf.ByteString getAdditionalSystemInstructionBytes() { + java.lang.Object ref = additionalSystemInstruction_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + additionalSystemInstruction_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
            +         * Optional. Additional system instruction that will be added to the
            +         * default system instruction.
            +         * 
            + * + * string additional_system_instruction = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The additionalSystemInstruction to set. + * @return This builder for chaining. + */ + public Builder setAdditionalSystemInstruction(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + additionalSystemInstruction_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
            +         * Optional. Additional system instruction that will be added to the
            +         * default system instruction.
            +         * 
            + * + * string additional_system_instruction = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearAdditionalSystemInstruction() { + additionalSystemInstruction_ = getDefaultInstance().getAdditionalSystemInstruction(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
            +         * Optional. Additional system instruction that will be added to the
            +         * default system instruction.
            +         * 
            + * + * string additional_system_instruction = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The bytes for additionalSystemInstruction to set. + * @return This builder for chaining. + */ + public Builder setAdditionalSystemInstructionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + additionalSystemInstruction_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.Assistant.GenerationConfig.SystemInstruction) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.Assistant.GenerationConfig.SystemInstruction) + private static final com.google.cloud.discoveryengine.v1beta.Assistant.GenerationConfig + .SystemInstruction + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.discoveryengine.v1beta.Assistant.GenerationConfig + .SystemInstruction(); + } + + public static com.google.cloud.discoveryengine.v1beta.Assistant.GenerationConfig + .SystemInstruction + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SystemInstruction parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Assistant.GenerationConfig.SystemInstruction + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int bitField0_; + public static final int DEFAULT_MODEL_ID_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object defaultModelId_ = ""; + + /** + * + * + *
            +     * Optional. The default model to use for assistant.
            +     * 
            + * + * string default_model_id = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The defaultModelId. + */ + @java.lang.Override + public java.lang.String getDefaultModelId() { + java.lang.Object ref = defaultModelId_; + 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(); + defaultModelId_ = s; + return s; + } + } + + /** + * + * + *
            +     * Optional. The default model to use for assistant.
            +     * 
            + * + * string default_model_id = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for defaultModelId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDefaultModelIdBytes() { + java.lang.Object ref = defaultModelId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + defaultModelId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ALLOWED_MODEL_IDS_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList allowedModelIds_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + /** + * + * + *
            +     * Optional. The list of models that are allowed to be used for assistant.
            +     * 
            + * + * repeated string allowed_model_ids = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the allowedModelIds. + */ + public com.google.protobuf.ProtocolStringList getAllowedModelIdsList() { + return allowedModelIds_; + } + + /** + * + * + *
            +     * Optional. The list of models that are allowed to be used for assistant.
            +     * 
            + * + * repeated string allowed_model_ids = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of allowedModelIds. + */ + public int getAllowedModelIdsCount() { + return allowedModelIds_.size(); + } + + /** + * + * + *
            +     * Optional. The list of models that are allowed to be used for assistant.
            +     * 
            + * + * repeated string allowed_model_ids = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The allowedModelIds at the given index. + */ + public java.lang.String getAllowedModelIds(int index) { + return allowedModelIds_.get(index); + } + + /** + * + * + *
            +     * Optional. The list of models that are allowed to be used for assistant.
            +     * 
            + * + * repeated string allowed_model_ids = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the allowedModelIds at the given index. + */ + public com.google.protobuf.ByteString getAllowedModelIdsBytes(int index) { + return allowedModelIds_.getByteString(index); + } + + public static final int SYSTEM_INSTRUCTION_FIELD_NUMBER = 3; + private com.google.cloud.discoveryengine.v1beta.Assistant.GenerationConfig.SystemInstruction + systemInstruction_; + + /** + * + * + *
            +     * System instruction, also known as the prompt preamble for LLM calls.
            +     * See also
            +     * https://cloud.google.com/vertex-ai/generative-ai/docs/learn/prompts/system-instructions
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Assistant.GenerationConfig.SystemInstruction system_instruction = 3; + * + * + * @return Whether the systemInstruction field is set. + */ + @java.lang.Override + public boolean hasSystemInstruction() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
            +     * System instruction, also known as the prompt preamble for LLM calls.
            +     * See also
            +     * https://cloud.google.com/vertex-ai/generative-ai/docs/learn/prompts/system-instructions
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Assistant.GenerationConfig.SystemInstruction system_instruction = 3; + * + * + * @return The systemInstruction. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Assistant.GenerationConfig.SystemInstruction + getSystemInstruction() { + return systemInstruction_ == null + ? com.google.cloud.discoveryengine.v1beta.Assistant.GenerationConfig.SystemInstruction + .getDefaultInstance() + : systemInstruction_; + } + + /** + * + * + *
            +     * System instruction, also known as the prompt preamble for LLM calls.
            +     * See also
            +     * https://cloud.google.com/vertex-ai/generative-ai/docs/learn/prompts/system-instructions
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Assistant.GenerationConfig.SystemInstruction system_instruction = 3; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Assistant.GenerationConfig + .SystemInstructionOrBuilder + getSystemInstructionOrBuilder() { + return systemInstruction_ == null + ? com.google.cloud.discoveryengine.v1beta.Assistant.GenerationConfig.SystemInstruction + .getDefaultInstance() + : systemInstruction_; + } + + public static final int DEFAULT_LANGUAGE_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object defaultLanguage_ = ""; + + /** + * + * + *
            +     * The default language to use for the generation of the assistant
            +     * response.
            +     * Use an ISO 639-1 language code such as `en`.
            +     * If not specified, the language will be automatically detected.
            +     * 
            + * + * string default_language = 4; + * + * @return The defaultLanguage. + */ + @java.lang.Override + public java.lang.String getDefaultLanguage() { + java.lang.Object ref = defaultLanguage_; + 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(); + defaultLanguage_ = s; + return s; + } + } + + /** + * + * + *
            +     * The default language to use for the generation of the assistant
            +     * response.
            +     * Use an ISO 639-1 language code such as `en`.
            +     * If not specified, the language will be automatically detected.
            +     * 
            + * + * string default_language = 4; + * + * @return The bytes for defaultLanguage. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDefaultLanguageBytes() { + java.lang.Object ref = defaultLanguage_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + defaultLanguage_ = 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 { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(defaultModelId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, defaultModelId_); + } + for (int i = 0; i < allowedModelIds_.size(); i++) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, allowedModelIds_.getRaw(i)); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(3, getSystemInstruction()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(defaultLanguage_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, defaultLanguage_); + } + 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(defaultModelId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, defaultModelId_); + } + { + int dataSize = 0; + for (int i = 0; i < allowedModelIds_.size(); i++) { + dataSize += computeStringSizeNoTag(allowedModelIds_.getRaw(i)); + } + size += dataSize; + size += 1 * getAllowedModelIdsList().size(); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getSystemInstruction()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(defaultLanguage_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, defaultLanguage_); + } + 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.discoveryengine.v1beta.Assistant.GenerationConfig)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1beta.Assistant.GenerationConfig other = + (com.google.cloud.discoveryengine.v1beta.Assistant.GenerationConfig) obj; + + if (!getDefaultModelId().equals(other.getDefaultModelId())) return false; + if (!getAllowedModelIdsList().equals(other.getAllowedModelIdsList())) return false; + if (hasSystemInstruction() != other.hasSystemInstruction()) return false; + if (hasSystemInstruction()) { + if (!getSystemInstruction().equals(other.getSystemInstruction())) return false; + } + if (!getDefaultLanguage().equals(other.getDefaultLanguage())) 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) + DEFAULT_MODEL_ID_FIELD_NUMBER; + hash = (53 * hash) + getDefaultModelId().hashCode(); + if (getAllowedModelIdsCount() > 0) { + hash = (37 * hash) + ALLOWED_MODEL_IDS_FIELD_NUMBER; + hash = (53 * hash) + getAllowedModelIdsList().hashCode(); + } + if (hasSystemInstruction()) { + hash = (37 * hash) + SYSTEM_INSTRUCTION_FIELD_NUMBER; + hash = (53 * hash) + getSystemInstruction().hashCode(); + } + hash = (37 * hash) + DEFAULT_LANGUAGE_FIELD_NUMBER; + hash = (53 * hash) + getDefaultLanguage().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1beta.Assistant.GenerationConfig parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.Assistant.GenerationConfig 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.discoveryengine.v1beta.Assistant.GenerationConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.Assistant.GenerationConfig 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.discoveryengine.v1beta.Assistant.GenerationConfig parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.Assistant.GenerationConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1beta.Assistant.GenerationConfig parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.Assistant.GenerationConfig 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.discoveryengine.v1beta.Assistant.GenerationConfig + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.Assistant.GenerationConfig + 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.discoveryengine.v1beta.Assistant.GenerationConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.Assistant.GenerationConfig 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.discoveryengine.v1beta.Assistant.GenerationConfig 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; + } + + /** + * + * + *
            +     * Configuration for the generation of the assistant response.
            +     * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.Assistant.GenerationConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.Assistant.GenerationConfig) + com.google.cloud.discoveryengine.v1beta.Assistant.GenerationConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.AssistantProto + .internal_static_google_cloud_discoveryengine_v1beta_Assistant_GenerationConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.AssistantProto + .internal_static_google_cloud_discoveryengine_v1beta_Assistant_GenerationConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.Assistant.GenerationConfig.class, + com.google.cloud.discoveryengine.v1beta.Assistant.GenerationConfig.Builder.class); + } + + // Construct using + // com.google.cloud.discoveryengine.v1beta.Assistant.GenerationConfig.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetSystemInstructionFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + defaultModelId_ = ""; + allowedModelIds_ = com.google.protobuf.LazyStringArrayList.emptyList(); + systemInstruction_ = null; + if (systemInstructionBuilder_ != null) { + systemInstructionBuilder_.dispose(); + systemInstructionBuilder_ = null; + } + defaultLanguage_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1beta.AssistantProto + .internal_static_google_cloud_discoveryengine_v1beta_Assistant_GenerationConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Assistant.GenerationConfig + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1beta.Assistant.GenerationConfig + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Assistant.GenerationConfig build() { + com.google.cloud.discoveryengine.v1beta.Assistant.GenerationConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Assistant.GenerationConfig buildPartial() { + com.google.cloud.discoveryengine.v1beta.Assistant.GenerationConfig result = + new com.google.cloud.discoveryengine.v1beta.Assistant.GenerationConfig(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.discoveryengine.v1beta.Assistant.GenerationConfig result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.defaultModelId_ = defaultModelId_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + allowedModelIds_.makeImmutable(); + result.allowedModelIds_ = allowedModelIds_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.systemInstruction_ = + systemInstructionBuilder_ == null + ? systemInstruction_ + : systemInstructionBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.defaultLanguage_ = defaultLanguage_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.discoveryengine.v1beta.Assistant.GenerationConfig) { + return mergeFrom( + (com.google.cloud.discoveryengine.v1beta.Assistant.GenerationConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1beta.Assistant.GenerationConfig other) { + if (other + == com.google.cloud.discoveryengine.v1beta.Assistant.GenerationConfig + .getDefaultInstance()) return this; + if (!other.getDefaultModelId().isEmpty()) { + defaultModelId_ = other.defaultModelId_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.allowedModelIds_.isEmpty()) { + if (allowedModelIds_.isEmpty()) { + allowedModelIds_ = other.allowedModelIds_; + bitField0_ |= 0x00000002; + } else { + ensureAllowedModelIdsIsMutable(); + allowedModelIds_.addAll(other.allowedModelIds_); + } + onChanged(); + } + if (other.hasSystemInstruction()) { + mergeSystemInstruction(other.getSystemInstruction()); + } + if (!other.getDefaultLanguage().isEmpty()) { + defaultLanguage_ = other.defaultLanguage_; + bitField0_ |= 0x00000008; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + defaultModelId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureAllowedModelIdsIsMutable(); + allowedModelIds_.add(s); + break; + } // case 18 + case 26: + { + input.readMessage( + internalGetSystemInstructionFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + defaultLanguage_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object defaultModelId_ = ""; + + /** + * + * + *
            +       * Optional. The default model to use for assistant.
            +       * 
            + * + * string default_model_id = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The defaultModelId. + */ + public java.lang.String getDefaultModelId() { + java.lang.Object ref = defaultModelId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + defaultModelId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
            +       * Optional. The default model to use for assistant.
            +       * 
            + * + * string default_model_id = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for defaultModelId. + */ + public com.google.protobuf.ByteString getDefaultModelIdBytes() { + java.lang.Object ref = defaultModelId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + defaultModelId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
            +       * Optional. The default model to use for assistant.
            +       * 
            + * + * string default_model_id = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The defaultModelId to set. + * @return This builder for chaining. + */ + public Builder setDefaultModelId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + defaultModelId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
            +       * Optional. The default model to use for assistant.
            +       * 
            + * + * string default_model_id = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearDefaultModelId() { + defaultModelId_ = getDefaultInstance().getDefaultModelId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
            +       * Optional. The default model to use for assistant.
            +       * 
            + * + * string default_model_id = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for defaultModelId to set. + * @return This builder for chaining. + */ + public Builder setDefaultModelIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + defaultModelId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList allowedModelIds_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureAllowedModelIdsIsMutable() { + if (!allowedModelIds_.isModifiable()) { + allowedModelIds_ = new com.google.protobuf.LazyStringArrayList(allowedModelIds_); + } + bitField0_ |= 0x00000002; + } + + /** + * + * + *
            +       * Optional. The list of models that are allowed to be used for assistant.
            +       * 
            + * + * repeated string allowed_model_ids = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the allowedModelIds. + */ + public com.google.protobuf.ProtocolStringList getAllowedModelIdsList() { + allowedModelIds_.makeImmutable(); + return allowedModelIds_; + } + + /** + * + * + *
            +       * Optional. The list of models that are allowed to be used for assistant.
            +       * 
            + * + * repeated string allowed_model_ids = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The count of allowedModelIds. + */ + public int getAllowedModelIdsCount() { + return allowedModelIds_.size(); + } + + /** + * + * + *
            +       * Optional. The list of models that are allowed to be used for assistant.
            +       * 
            + * + * repeated string allowed_model_ids = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the element to return. + * @return The allowedModelIds at the given index. + */ + public java.lang.String getAllowedModelIds(int index) { + return allowedModelIds_.get(index); + } + + /** + * + * + *
            +       * Optional. The list of models that are allowed to be used for assistant.
            +       * 
            + * + * repeated string allowed_model_ids = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the value to return. + * @return The bytes of the allowedModelIds at the given index. + */ + public com.google.protobuf.ByteString getAllowedModelIdsBytes(int index) { + return allowedModelIds_.getByteString(index); + } + + /** + * + * + *
            +       * Optional. The list of models that are allowed to be used for assistant.
            +       * 
            + * + * repeated string allowed_model_ids = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index to set the value at. + * @param value The allowedModelIds to set. + * @return This builder for chaining. + */ + public Builder setAllowedModelIds(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureAllowedModelIdsIsMutable(); + allowedModelIds_.set(index, value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
            +       * Optional. The list of models that are allowed to be used for assistant.
            +       * 
            + * + * repeated string allowed_model_ids = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The allowedModelIds to add. + * @return This builder for chaining. + */ + public Builder addAllowedModelIds(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureAllowedModelIdsIsMutable(); + allowedModelIds_.add(value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
            +       * Optional. The list of models that are allowed to be used for assistant.
            +       * 
            + * + * repeated string allowed_model_ids = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param values The allowedModelIds to add. + * @return This builder for chaining. + */ + public Builder addAllAllowedModelIds(java.lang.Iterable values) { + ensureAllowedModelIdsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, allowedModelIds_); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
            +       * Optional. The list of models that are allowed to be used for assistant.
            +       * 
            + * + * repeated string allowed_model_ids = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearAllowedModelIds() { + allowedModelIds_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + ; + onChanged(); + return this; + } + + /** + * + * + *
            +       * Optional. The list of models that are allowed to be used for assistant.
            +       * 
            + * + * repeated string allowed_model_ids = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The bytes of the allowedModelIds to add. + * @return This builder for chaining. + */ + public Builder addAllowedModelIdsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureAllowedModelIdsIsMutable(); + allowedModelIds_.add(value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.cloud.discoveryengine.v1beta.Assistant.GenerationConfig.SystemInstruction + systemInstruction_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.Assistant.GenerationConfig.SystemInstruction, + com.google.cloud.discoveryengine.v1beta.Assistant.GenerationConfig.SystemInstruction + .Builder, + com.google.cloud.discoveryengine.v1beta.Assistant.GenerationConfig + .SystemInstructionOrBuilder> + systemInstructionBuilder_; + + /** + * + * + *
            +       * System instruction, also known as the prompt preamble for LLM calls.
            +       * See also
            +       * https://cloud.google.com/vertex-ai/generative-ai/docs/learn/prompts/system-instructions
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Assistant.GenerationConfig.SystemInstruction system_instruction = 3; + * + * + * @return Whether the systemInstruction field is set. + */ + public boolean hasSystemInstruction() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
            +       * System instruction, also known as the prompt preamble for LLM calls.
            +       * See also
            +       * https://cloud.google.com/vertex-ai/generative-ai/docs/learn/prompts/system-instructions
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Assistant.GenerationConfig.SystemInstruction system_instruction = 3; + * + * + * @return The systemInstruction. + */ + public com.google.cloud.discoveryengine.v1beta.Assistant.GenerationConfig.SystemInstruction + getSystemInstruction() { + if (systemInstructionBuilder_ == null) { + return systemInstruction_ == null + ? com.google.cloud.discoveryengine.v1beta.Assistant.GenerationConfig.SystemInstruction + .getDefaultInstance() + : systemInstruction_; + } else { + return systemInstructionBuilder_.getMessage(); + } + } + + /** + * + * + *
            +       * System instruction, also known as the prompt preamble for LLM calls.
            +       * See also
            +       * https://cloud.google.com/vertex-ai/generative-ai/docs/learn/prompts/system-instructions
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Assistant.GenerationConfig.SystemInstruction system_instruction = 3; + * + */ + public Builder setSystemInstruction( + com.google.cloud.discoveryengine.v1beta.Assistant.GenerationConfig.SystemInstruction + value) { + if (systemInstructionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + systemInstruction_ = value; + } else { + systemInstructionBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
            +       * System instruction, also known as the prompt preamble for LLM calls.
            +       * See also
            +       * https://cloud.google.com/vertex-ai/generative-ai/docs/learn/prompts/system-instructions
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Assistant.GenerationConfig.SystemInstruction system_instruction = 3; + * + */ + public Builder setSystemInstruction( + com.google.cloud.discoveryengine.v1beta.Assistant.GenerationConfig.SystemInstruction + .Builder + builderForValue) { + if (systemInstructionBuilder_ == null) { + systemInstruction_ = builderForValue.build(); + } else { + systemInstructionBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
            +       * System instruction, also known as the prompt preamble for LLM calls.
            +       * See also
            +       * https://cloud.google.com/vertex-ai/generative-ai/docs/learn/prompts/system-instructions
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Assistant.GenerationConfig.SystemInstruction system_instruction = 3; + * + */ + public Builder mergeSystemInstruction( + com.google.cloud.discoveryengine.v1beta.Assistant.GenerationConfig.SystemInstruction + value) { + if (systemInstructionBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && systemInstruction_ != null + && systemInstruction_ + != com.google.cloud.discoveryengine.v1beta.Assistant.GenerationConfig + .SystemInstruction.getDefaultInstance()) { + getSystemInstructionBuilder().mergeFrom(value); + } else { + systemInstruction_ = value; + } + } else { + systemInstructionBuilder_.mergeFrom(value); + } + if (systemInstruction_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + + /** + * + * + *
            +       * System instruction, also known as the prompt preamble for LLM calls.
            +       * See also
            +       * https://cloud.google.com/vertex-ai/generative-ai/docs/learn/prompts/system-instructions
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Assistant.GenerationConfig.SystemInstruction system_instruction = 3; + * + */ + public Builder clearSystemInstruction() { + bitField0_ = (bitField0_ & ~0x00000004); + systemInstruction_ = null; + if (systemInstructionBuilder_ != null) { + systemInstructionBuilder_.dispose(); + systemInstructionBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
            +       * System instruction, also known as the prompt preamble for LLM calls.
            +       * See also
            +       * https://cloud.google.com/vertex-ai/generative-ai/docs/learn/prompts/system-instructions
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Assistant.GenerationConfig.SystemInstruction system_instruction = 3; + * + */ + public com.google.cloud.discoveryengine.v1beta.Assistant.GenerationConfig.SystemInstruction + .Builder + getSystemInstructionBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return internalGetSystemInstructionFieldBuilder().getBuilder(); + } + + /** + * + * + *
            +       * System instruction, also known as the prompt preamble for LLM calls.
            +       * See also
            +       * https://cloud.google.com/vertex-ai/generative-ai/docs/learn/prompts/system-instructions
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Assistant.GenerationConfig.SystemInstruction system_instruction = 3; + * + */ + public com.google.cloud.discoveryengine.v1beta.Assistant.GenerationConfig + .SystemInstructionOrBuilder + getSystemInstructionOrBuilder() { + if (systemInstructionBuilder_ != null) { + return systemInstructionBuilder_.getMessageOrBuilder(); + } else { + return systemInstruction_ == null + ? com.google.cloud.discoveryengine.v1beta.Assistant.GenerationConfig.SystemInstruction + .getDefaultInstance() + : systemInstruction_; + } + } + + /** + * + * + *
            +       * System instruction, also known as the prompt preamble for LLM calls.
            +       * See also
            +       * https://cloud.google.com/vertex-ai/generative-ai/docs/learn/prompts/system-instructions
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Assistant.GenerationConfig.SystemInstruction system_instruction = 3; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.Assistant.GenerationConfig.SystemInstruction, + com.google.cloud.discoveryengine.v1beta.Assistant.GenerationConfig.SystemInstruction + .Builder, + com.google.cloud.discoveryengine.v1beta.Assistant.GenerationConfig + .SystemInstructionOrBuilder> + internalGetSystemInstructionFieldBuilder() { + if (systemInstructionBuilder_ == null) { + systemInstructionBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.Assistant.GenerationConfig + .SystemInstruction, + com.google.cloud.discoveryengine.v1beta.Assistant.GenerationConfig + .SystemInstruction.Builder, + com.google.cloud.discoveryengine.v1beta.Assistant.GenerationConfig + .SystemInstructionOrBuilder>( + getSystemInstruction(), getParentForChildren(), isClean()); + systemInstruction_ = null; + } + return systemInstructionBuilder_; + } + + private java.lang.Object defaultLanguage_ = ""; + + /** + * + * + *
            +       * The default language to use for the generation of the assistant
            +       * response.
            +       * Use an ISO 639-1 language code such as `en`.
            +       * If not specified, the language will be automatically detected.
            +       * 
            + * + * string default_language = 4; + * + * @return The defaultLanguage. + */ + public java.lang.String getDefaultLanguage() { + java.lang.Object ref = defaultLanguage_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + defaultLanguage_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
            +       * The default language to use for the generation of the assistant
            +       * response.
            +       * Use an ISO 639-1 language code such as `en`.
            +       * If not specified, the language will be automatically detected.
            +       * 
            + * + * string default_language = 4; + * + * @return The bytes for defaultLanguage. + */ + public com.google.protobuf.ByteString getDefaultLanguageBytes() { + java.lang.Object ref = defaultLanguage_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + defaultLanguage_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
            +       * The default language to use for the generation of the assistant
            +       * response.
            +       * Use an ISO 639-1 language code such as `en`.
            +       * If not specified, the language will be automatically detected.
            +       * 
            + * + * string default_language = 4; + * + * @param value The defaultLanguage to set. + * @return This builder for chaining. + */ + public Builder setDefaultLanguage(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + defaultLanguage_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
            +       * The default language to use for the generation of the assistant
            +       * response.
            +       * Use an ISO 639-1 language code such as `en`.
            +       * If not specified, the language will be automatically detected.
            +       * 
            + * + * string default_language = 4; + * + * @return This builder for chaining. + */ + public Builder clearDefaultLanguage() { + defaultLanguage_ = getDefaultInstance().getDefaultLanguage(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + + /** + * + * + *
            +       * The default language to use for the generation of the assistant
            +       * response.
            +       * Use an ISO 639-1 language code such as `en`.
            +       * If not specified, the language will be automatically detected.
            +       * 
            + * + * string default_language = 4; + * + * @param value The bytes for defaultLanguage to set. + * @return This builder for chaining. + */ + public Builder setDefaultLanguageBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + defaultLanguage_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.Assistant.GenerationConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.Assistant.GenerationConfig) + private static final com.google.cloud.discoveryengine.v1beta.Assistant.GenerationConfig + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.discoveryengine.v1beta.Assistant.GenerationConfig(); + } + + public static com.google.cloud.discoveryengine.v1beta.Assistant.GenerationConfig + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GenerationConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Assistant.GenerationConfig + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface ToolInfoOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.Assistant.ToolInfo) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
            +     * The name of the tool as defined by
            +     * DataConnectorService.QueryAvailableActions.
            +     * Note: it's using `action` in the DataConnectorService apis, but they are
            +     * the same as the `tool` here.
            +     * 
            + * + * string tool_name = 1; + * + * @return The toolName. + */ + java.lang.String getToolName(); + + /** + * + * + *
            +     * The name of the tool as defined by
            +     * DataConnectorService.QueryAvailableActions.
            +     * Note: it's using `action` in the DataConnectorService apis, but they are
            +     * the same as the `tool` here.
            +     * 
            + * + * string tool_name = 1; + * + * @return The bytes for toolName. + */ + com.google.protobuf.ByteString getToolNameBytes(); + + /** + * + * + *
            +     * The display name of the tool.
            +     * 
            + * + * string tool_display_name = 2; + * + * @return The toolDisplayName. + */ + java.lang.String getToolDisplayName(); + + /** + * + * + *
            +     * The display name of the tool.
            +     * 
            + * + * string tool_display_name = 2; + * + * @return The bytes for toolDisplayName. + */ + com.google.protobuf.ByteString getToolDisplayNameBytes(); + } + + /** + * + * + *
            +   * Information to identify a tool.
            +   * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.Assistant.ToolInfo} + */ + public static final class ToolInfo extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.Assistant.ToolInfo) + ToolInfoOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ToolInfo"); + } + + // Use ToolInfo.newBuilder() to construct. + private ToolInfo(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ToolInfo() { + toolName_ = ""; + toolDisplayName_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.AssistantProto + .internal_static_google_cloud_discoveryengine_v1beta_Assistant_ToolInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.AssistantProto + .internal_static_google_cloud_discoveryengine_v1beta_Assistant_ToolInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.Assistant.ToolInfo.class, + com.google.cloud.discoveryengine.v1beta.Assistant.ToolInfo.Builder.class); + } + + public static final int TOOL_NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object toolName_ = ""; + + /** + * + * + *
            +     * The name of the tool as defined by
            +     * DataConnectorService.QueryAvailableActions.
            +     * Note: it's using `action` in the DataConnectorService apis, but they are
            +     * the same as the `tool` here.
            +     * 
            + * + * string tool_name = 1; + * + * @return The toolName. + */ + @java.lang.Override + public java.lang.String getToolName() { + java.lang.Object ref = toolName_; + 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(); + toolName_ = s; + return s; + } + } + + /** + * + * + *
            +     * The name of the tool as defined by
            +     * DataConnectorService.QueryAvailableActions.
            +     * Note: it's using `action` in the DataConnectorService apis, but they are
            +     * the same as the `tool` here.
            +     * 
            + * + * string tool_name = 1; + * + * @return The bytes for toolName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getToolNameBytes() { + java.lang.Object ref = toolName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + toolName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TOOL_DISPLAY_NAME_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object toolDisplayName_ = ""; + + /** + * + * + *
            +     * The display name of the tool.
            +     * 
            + * + * string tool_display_name = 2; + * + * @return The toolDisplayName. + */ + @java.lang.Override + public java.lang.String getToolDisplayName() { + java.lang.Object ref = toolDisplayName_; + 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(); + toolDisplayName_ = s; + return s; + } + } + + /** + * + * + *
            +     * The display name of the tool.
            +     * 
            + * + * string tool_display_name = 2; + * + * @return The bytes for toolDisplayName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getToolDisplayNameBytes() { + java.lang.Object ref = toolDisplayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + toolDisplayName_ = 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 { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(toolName_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, toolName_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(toolDisplayName_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, toolDisplayName_); + } + 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(toolName_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, toolName_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(toolDisplayName_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, toolDisplayName_); + } + 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.discoveryengine.v1beta.Assistant.ToolInfo)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1beta.Assistant.ToolInfo other = + (com.google.cloud.discoveryengine.v1beta.Assistant.ToolInfo) obj; + + if (!getToolName().equals(other.getToolName())) return false; + if (!getToolDisplayName().equals(other.getToolDisplayName())) 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) + TOOL_NAME_FIELD_NUMBER; + hash = (53 * hash) + getToolName().hashCode(); + hash = (37 * hash) + TOOL_DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getToolDisplayName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1beta.Assistant.ToolInfo parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.Assistant.ToolInfo 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.discoveryengine.v1beta.Assistant.ToolInfo parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.Assistant.ToolInfo 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.discoveryengine.v1beta.Assistant.ToolInfo parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.Assistant.ToolInfo parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1beta.Assistant.ToolInfo parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.Assistant.ToolInfo 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.discoveryengine.v1beta.Assistant.ToolInfo parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.Assistant.ToolInfo 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.discoveryengine.v1beta.Assistant.ToolInfo parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.Assistant.ToolInfo 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.discoveryengine.v1beta.Assistant.ToolInfo 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; + } + + /** + * + * + *
            +     * Information to identify a tool.
            +     * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.Assistant.ToolInfo} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.Assistant.ToolInfo) + com.google.cloud.discoveryengine.v1beta.Assistant.ToolInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.AssistantProto + .internal_static_google_cloud_discoveryengine_v1beta_Assistant_ToolInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.AssistantProto + .internal_static_google_cloud_discoveryengine_v1beta_Assistant_ToolInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.Assistant.ToolInfo.class, + com.google.cloud.discoveryengine.v1beta.Assistant.ToolInfo.Builder.class); + } + + // Construct using com.google.cloud.discoveryengine.v1beta.Assistant.ToolInfo.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + toolName_ = ""; + toolDisplayName_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1beta.AssistantProto + .internal_static_google_cloud_discoveryengine_v1beta_Assistant_ToolInfo_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Assistant.ToolInfo + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1beta.Assistant.ToolInfo.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Assistant.ToolInfo build() { + com.google.cloud.discoveryengine.v1beta.Assistant.ToolInfo result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Assistant.ToolInfo buildPartial() { + com.google.cloud.discoveryengine.v1beta.Assistant.ToolInfo result = + new com.google.cloud.discoveryengine.v1beta.Assistant.ToolInfo(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.discoveryengine.v1beta.Assistant.ToolInfo result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.toolName_ = toolName_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.toolDisplayName_ = toolDisplayName_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.discoveryengine.v1beta.Assistant.ToolInfo) { + return mergeFrom((com.google.cloud.discoveryengine.v1beta.Assistant.ToolInfo) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.discoveryengine.v1beta.Assistant.ToolInfo other) { + if (other + == com.google.cloud.discoveryengine.v1beta.Assistant.ToolInfo.getDefaultInstance()) + return this; + if (!other.getToolName().isEmpty()) { + toolName_ = other.toolName_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getToolDisplayName().isEmpty()) { + toolDisplayName_ = other.toolDisplayName_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + toolName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + toolDisplayName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object toolName_ = ""; + + /** + * + * + *
            +       * The name of the tool as defined by
            +       * DataConnectorService.QueryAvailableActions.
            +       * Note: it's using `action` in the DataConnectorService apis, but they are
            +       * the same as the `tool` here.
            +       * 
            + * + * string tool_name = 1; + * + * @return The toolName. + */ + public java.lang.String getToolName() { + java.lang.Object ref = toolName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + toolName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
            +       * The name of the tool as defined by
            +       * DataConnectorService.QueryAvailableActions.
            +       * Note: it's using `action` in the DataConnectorService apis, but they are
            +       * the same as the `tool` here.
            +       * 
            + * + * string tool_name = 1; + * + * @return The bytes for toolName. + */ + public com.google.protobuf.ByteString getToolNameBytes() { + java.lang.Object ref = toolName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + toolName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
            +       * The name of the tool as defined by
            +       * DataConnectorService.QueryAvailableActions.
            +       * Note: it's using `action` in the DataConnectorService apis, but they are
            +       * the same as the `tool` here.
            +       * 
            + * + * string tool_name = 1; + * + * @param value The toolName to set. + * @return This builder for chaining. + */ + public Builder setToolName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + toolName_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
            +       * The name of the tool as defined by
            +       * DataConnectorService.QueryAvailableActions.
            +       * Note: it's using `action` in the DataConnectorService apis, but they are
            +       * the same as the `tool` here.
            +       * 
            + * + * string tool_name = 1; + * + * @return This builder for chaining. + */ + public Builder clearToolName() { + toolName_ = getDefaultInstance().getToolName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
            +       * The name of the tool as defined by
            +       * DataConnectorService.QueryAvailableActions.
            +       * Note: it's using `action` in the DataConnectorService apis, but they are
            +       * the same as the `tool` here.
            +       * 
            + * + * string tool_name = 1; + * + * @param value The bytes for toolName to set. + * @return This builder for chaining. + */ + public Builder setToolNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + toolName_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object toolDisplayName_ = ""; + + /** + * + * + *
            +       * The display name of the tool.
            +       * 
            + * + * string tool_display_name = 2; + * + * @return The toolDisplayName. + */ + public java.lang.String getToolDisplayName() { + java.lang.Object ref = toolDisplayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + toolDisplayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
            +       * The display name of the tool.
            +       * 
            + * + * string tool_display_name = 2; + * + * @return The bytes for toolDisplayName. + */ + public com.google.protobuf.ByteString getToolDisplayNameBytes() { + java.lang.Object ref = toolDisplayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + toolDisplayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
            +       * The display name of the tool.
            +       * 
            + * + * string tool_display_name = 2; + * + * @param value The toolDisplayName to set. + * @return This builder for chaining. + */ + public Builder setToolDisplayName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + toolDisplayName_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
            +       * The display name of the tool.
            +       * 
            + * + * string tool_display_name = 2; + * + * @return This builder for chaining. + */ + public Builder clearToolDisplayName() { + toolDisplayName_ = getDefaultInstance().getToolDisplayName(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
            +       * The display name of the tool.
            +       * 
            + * + * string tool_display_name = 2; + * + * @param value The bytes for toolDisplayName to set. + * @return This builder for chaining. + */ + public Builder setToolDisplayNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + toolDisplayName_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.Assistant.ToolInfo) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.Assistant.ToolInfo) + private static final com.google.cloud.discoveryengine.v1beta.Assistant.ToolInfo + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.discoveryengine.v1beta.Assistant.ToolInfo(); + } + + public static com.google.cloud.discoveryengine.v1beta.Assistant.ToolInfo getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ToolInfo parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Assistant.ToolInfo getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface ToolListOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.Assistant.ToolList) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
            +     * The list of tools with corresponding tool information.
            +     * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.Assistant.ToolInfo tool_info = 1; + */ + java.util.List getToolInfoList(); + + /** + * + * + *
            +     * The list of tools with corresponding tool information.
            +     * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.Assistant.ToolInfo tool_info = 1; + */ + com.google.cloud.discoveryengine.v1beta.Assistant.ToolInfo getToolInfo(int index); + + /** + * + * + *
            +     * The list of tools with corresponding tool information.
            +     * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.Assistant.ToolInfo tool_info = 1; + */ + int getToolInfoCount(); + + /** + * + * + *
            +     * The list of tools with corresponding tool information.
            +     * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.Assistant.ToolInfo tool_info = 1; + */ + java.util.List + getToolInfoOrBuilderList(); + + /** + * + * + *
            +     * The list of tools with corresponding tool information.
            +     * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.Assistant.ToolInfo tool_info = 1; + */ + com.google.cloud.discoveryengine.v1beta.Assistant.ToolInfoOrBuilder getToolInfoOrBuilder( + int index); + } + + /** + * + * + *
            +   * The enabled tools on a connector
            +   * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.Assistant.ToolList} + */ + public static final class ToolList extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.Assistant.ToolList) + ToolListOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ToolList"); + } + + // Use ToolList.newBuilder() to construct. + private ToolList(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ToolList() { + toolInfo_ = java.util.Collections.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.AssistantProto + .internal_static_google_cloud_discoveryengine_v1beta_Assistant_ToolList_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.AssistantProto + .internal_static_google_cloud_discoveryengine_v1beta_Assistant_ToolList_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.Assistant.ToolList.class, + com.google.cloud.discoveryengine.v1beta.Assistant.ToolList.Builder.class); + } + + public static final int TOOL_INFO_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List toolInfo_; + + /** + * + * + *
            +     * The list of tools with corresponding tool information.
            +     * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.Assistant.ToolInfo tool_info = 1; + */ + @java.lang.Override + public java.util.List + getToolInfoList() { + return toolInfo_; + } + + /** + * + * + *
            +     * The list of tools with corresponding tool information.
            +     * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.Assistant.ToolInfo tool_info = 1; + */ + @java.lang.Override + public java.util.List< + ? extends com.google.cloud.discoveryengine.v1beta.Assistant.ToolInfoOrBuilder> + getToolInfoOrBuilderList() { + return toolInfo_; + } + + /** + * + * + *
            +     * The list of tools with corresponding tool information.
            +     * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.Assistant.ToolInfo tool_info = 1; + */ + @java.lang.Override + public int getToolInfoCount() { + return toolInfo_.size(); + } + + /** + * + * + *
            +     * The list of tools with corresponding tool information.
            +     * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.Assistant.ToolInfo tool_info = 1; + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Assistant.ToolInfo getToolInfo(int index) { + return toolInfo_.get(index); + } + + /** + * + * + *
            +     * The list of tools with corresponding tool information.
            +     * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.Assistant.ToolInfo tool_info = 1; + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Assistant.ToolInfoOrBuilder getToolInfoOrBuilder( + int index) { + return toolInfo_.get(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 { + for (int i = 0; i < toolInfo_.size(); i++) { + output.writeMessage(1, toolInfo_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < toolInfo_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, toolInfo_.get(i)); + } + 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.discoveryengine.v1beta.Assistant.ToolList)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1beta.Assistant.ToolList other = + (com.google.cloud.discoveryengine.v1beta.Assistant.ToolList) obj; + + if (!getToolInfoList().equals(other.getToolInfoList())) 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 (getToolInfoCount() > 0) { + hash = (37 * hash) + TOOL_INFO_FIELD_NUMBER; + hash = (53 * hash) + getToolInfoList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1beta.Assistant.ToolList parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.Assistant.ToolList 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.discoveryengine.v1beta.Assistant.ToolList parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.Assistant.ToolList 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.discoveryengine.v1beta.Assistant.ToolList parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.Assistant.ToolList parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1beta.Assistant.ToolList parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.Assistant.ToolList 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.discoveryengine.v1beta.Assistant.ToolList parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.Assistant.ToolList 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.discoveryengine.v1beta.Assistant.ToolList parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.Assistant.ToolList 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.discoveryengine.v1beta.Assistant.ToolList 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; + } + + /** + * + * + *
            +     * The enabled tools on a connector
            +     * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.Assistant.ToolList} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.Assistant.ToolList) + com.google.cloud.discoveryengine.v1beta.Assistant.ToolListOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.AssistantProto + .internal_static_google_cloud_discoveryengine_v1beta_Assistant_ToolList_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.AssistantProto + .internal_static_google_cloud_discoveryengine_v1beta_Assistant_ToolList_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.Assistant.ToolList.class, + com.google.cloud.discoveryengine.v1beta.Assistant.ToolList.Builder.class); + } + + // Construct using com.google.cloud.discoveryengine.v1beta.Assistant.ToolList.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (toolInfoBuilder_ == null) { + toolInfo_ = java.util.Collections.emptyList(); + } else { + toolInfo_ = null; + toolInfoBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1beta.AssistantProto + .internal_static_google_cloud_discoveryengine_v1beta_Assistant_ToolList_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Assistant.ToolList + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1beta.Assistant.ToolList.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Assistant.ToolList build() { + com.google.cloud.discoveryengine.v1beta.Assistant.ToolList result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Assistant.ToolList buildPartial() { + com.google.cloud.discoveryengine.v1beta.Assistant.ToolList result = + new com.google.cloud.discoveryengine.v1beta.Assistant.ToolList(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.discoveryengine.v1beta.Assistant.ToolList result) { + if (toolInfoBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + toolInfo_ = java.util.Collections.unmodifiableList(toolInfo_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.toolInfo_ = toolInfo_; + } else { + result.toolInfo_ = toolInfoBuilder_.build(); + } + } + + private void buildPartial0( + com.google.cloud.discoveryengine.v1beta.Assistant.ToolList result) { + int from_bitField0_ = bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.discoveryengine.v1beta.Assistant.ToolList) { + return mergeFrom((com.google.cloud.discoveryengine.v1beta.Assistant.ToolList) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.discoveryengine.v1beta.Assistant.ToolList other) { + if (other + == com.google.cloud.discoveryengine.v1beta.Assistant.ToolList.getDefaultInstance()) + return this; + if (toolInfoBuilder_ == null) { + if (!other.toolInfo_.isEmpty()) { + if (toolInfo_.isEmpty()) { + toolInfo_ = other.toolInfo_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureToolInfoIsMutable(); + toolInfo_.addAll(other.toolInfo_); + } + onChanged(); + } + } else { + if (!other.toolInfo_.isEmpty()) { + if (toolInfoBuilder_.isEmpty()) { + toolInfoBuilder_.dispose(); + toolInfoBuilder_ = null; + toolInfo_ = other.toolInfo_; + bitField0_ = (bitField0_ & ~0x00000001); + toolInfoBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetToolInfoFieldBuilder() + : null; + } else { + toolInfoBuilder_.addAllMessages(other.toolInfo_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.discoveryengine.v1beta.Assistant.ToolInfo m = + input.readMessage( + com.google.cloud.discoveryengine.v1beta.Assistant.ToolInfo.parser(), + extensionRegistry); + if (toolInfoBuilder_ == null) { + ensureToolInfoIsMutable(); + toolInfo_.add(m); + } else { + toolInfoBuilder_.addMessage(m); + } + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List toolInfo_ = + java.util.Collections.emptyList(); + + private void ensureToolInfoIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + toolInfo_ = + new java.util.ArrayList( + toolInfo_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.discoveryengine.v1beta.Assistant.ToolInfo, + com.google.cloud.discoveryengine.v1beta.Assistant.ToolInfo.Builder, + com.google.cloud.discoveryengine.v1beta.Assistant.ToolInfoOrBuilder> + toolInfoBuilder_; + + /** + * + * + *
            +       * The list of tools with corresponding tool information.
            +       * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.Assistant.ToolInfo tool_info = 1; + * + */ + public java.util.List + getToolInfoList() { + if (toolInfoBuilder_ == null) { + return java.util.Collections.unmodifiableList(toolInfo_); + } else { + return toolInfoBuilder_.getMessageList(); + } + } + + /** + * + * + *
            +       * The list of tools with corresponding tool information.
            +       * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.Assistant.ToolInfo tool_info = 1; + * + */ + public int getToolInfoCount() { + if (toolInfoBuilder_ == null) { + return toolInfo_.size(); + } else { + return toolInfoBuilder_.getCount(); + } + } + + /** + * + * + *
            +       * The list of tools with corresponding tool information.
            +       * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.Assistant.ToolInfo tool_info = 1; + * + */ + public com.google.cloud.discoveryengine.v1beta.Assistant.ToolInfo getToolInfo(int index) { + if (toolInfoBuilder_ == null) { + return toolInfo_.get(index); + } else { + return toolInfoBuilder_.getMessage(index); + } + } + + /** + * + * + *
            +       * The list of tools with corresponding tool information.
            +       * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.Assistant.ToolInfo tool_info = 1; + * + */ + public Builder setToolInfo( + int index, com.google.cloud.discoveryengine.v1beta.Assistant.ToolInfo value) { + if (toolInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureToolInfoIsMutable(); + toolInfo_.set(index, value); + onChanged(); + } else { + toolInfoBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
            +       * The list of tools with corresponding tool information.
            +       * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.Assistant.ToolInfo tool_info = 1; + * + */ + public Builder setToolInfo( + int index, + com.google.cloud.discoveryengine.v1beta.Assistant.ToolInfo.Builder builderForValue) { + if (toolInfoBuilder_ == null) { + ensureToolInfoIsMutable(); + toolInfo_.set(index, builderForValue.build()); + onChanged(); + } else { + toolInfoBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
            +       * The list of tools with corresponding tool information.
            +       * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.Assistant.ToolInfo tool_info = 1; + * + */ + public Builder addToolInfo(com.google.cloud.discoveryengine.v1beta.Assistant.ToolInfo value) { + if (toolInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureToolInfoIsMutable(); + toolInfo_.add(value); + onChanged(); + } else { + toolInfoBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
            +       * The list of tools with corresponding tool information.
            +       * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.Assistant.ToolInfo tool_info = 1; + * + */ + public Builder addToolInfo( + int index, com.google.cloud.discoveryengine.v1beta.Assistant.ToolInfo value) { + if (toolInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureToolInfoIsMutable(); + toolInfo_.add(index, value); + onChanged(); + } else { + toolInfoBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
            +       * The list of tools with corresponding tool information.
            +       * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.Assistant.ToolInfo tool_info = 1; + * + */ + public Builder addToolInfo( + com.google.cloud.discoveryengine.v1beta.Assistant.ToolInfo.Builder builderForValue) { + if (toolInfoBuilder_ == null) { + ensureToolInfoIsMutable(); + toolInfo_.add(builderForValue.build()); + onChanged(); + } else { + toolInfoBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
            +       * The list of tools with corresponding tool information.
            +       * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.Assistant.ToolInfo tool_info = 1; + * + */ + public Builder addToolInfo( + int index, + com.google.cloud.discoveryengine.v1beta.Assistant.ToolInfo.Builder builderForValue) { + if (toolInfoBuilder_ == null) { + ensureToolInfoIsMutable(); + toolInfo_.add(index, builderForValue.build()); + onChanged(); + } else { + toolInfoBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
            +       * The list of tools with corresponding tool information.
            +       * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.Assistant.ToolInfo tool_info = 1; + * + */ + public Builder addAllToolInfo( + java.lang.Iterable + values) { + if (toolInfoBuilder_ == null) { + ensureToolInfoIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, toolInfo_); + onChanged(); + } else { + toolInfoBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
            +       * The list of tools with corresponding tool information.
            +       * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.Assistant.ToolInfo tool_info = 1; + * + */ + public Builder clearToolInfo() { + if (toolInfoBuilder_ == null) { + toolInfo_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + toolInfoBuilder_.clear(); + } + return this; + } + + /** + * + * + *
            +       * The list of tools with corresponding tool information.
            +       * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.Assistant.ToolInfo tool_info = 1; + * + */ + public Builder removeToolInfo(int index) { + if (toolInfoBuilder_ == null) { + ensureToolInfoIsMutable(); + toolInfo_.remove(index); + onChanged(); + } else { + toolInfoBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
            +       * The list of tools with corresponding tool information.
            +       * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.Assistant.ToolInfo tool_info = 1; + * + */ + public com.google.cloud.discoveryengine.v1beta.Assistant.ToolInfo.Builder getToolInfoBuilder( + int index) { + return internalGetToolInfoFieldBuilder().getBuilder(index); + } + + /** + * + * + *
            +       * The list of tools with corresponding tool information.
            +       * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.Assistant.ToolInfo tool_info = 1; + * + */ + public com.google.cloud.discoveryengine.v1beta.Assistant.ToolInfoOrBuilder + getToolInfoOrBuilder(int index) { + if (toolInfoBuilder_ == null) { + return toolInfo_.get(index); + } else { + return toolInfoBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
            +       * The list of tools with corresponding tool information.
            +       * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.Assistant.ToolInfo tool_info = 1; + * + */ + public java.util.List< + ? extends com.google.cloud.discoveryengine.v1beta.Assistant.ToolInfoOrBuilder> + getToolInfoOrBuilderList() { + if (toolInfoBuilder_ != null) { + return toolInfoBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(toolInfo_); + } + } + + /** + * + * + *
            +       * The list of tools with corresponding tool information.
            +       * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.Assistant.ToolInfo tool_info = 1; + * + */ + public com.google.cloud.discoveryengine.v1beta.Assistant.ToolInfo.Builder + addToolInfoBuilder() { + return internalGetToolInfoFieldBuilder() + .addBuilder( + com.google.cloud.discoveryengine.v1beta.Assistant.ToolInfo.getDefaultInstance()); + } + + /** + * + * + *
            +       * The list of tools with corresponding tool information.
            +       * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.Assistant.ToolInfo tool_info = 1; + * + */ + public com.google.cloud.discoveryengine.v1beta.Assistant.ToolInfo.Builder addToolInfoBuilder( + int index) { + return internalGetToolInfoFieldBuilder() + .addBuilder( + index, + com.google.cloud.discoveryengine.v1beta.Assistant.ToolInfo.getDefaultInstance()); + } + + /** + * + * + *
            +       * The list of tools with corresponding tool information.
            +       * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.Assistant.ToolInfo tool_info = 1; + * + */ + public java.util.List + getToolInfoBuilderList() { + return internalGetToolInfoFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.discoveryengine.v1beta.Assistant.ToolInfo, + com.google.cloud.discoveryengine.v1beta.Assistant.ToolInfo.Builder, + com.google.cloud.discoveryengine.v1beta.Assistant.ToolInfoOrBuilder> + internalGetToolInfoFieldBuilder() { + if (toolInfoBuilder_ == null) { + toolInfoBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.discoveryengine.v1beta.Assistant.ToolInfo, + com.google.cloud.discoveryengine.v1beta.Assistant.ToolInfo.Builder, + com.google.cloud.discoveryengine.v1beta.Assistant.ToolInfoOrBuilder>( + toolInfo_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + toolInfo_ = null; + } + return toolInfoBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.Assistant.ToolList) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.Assistant.ToolList) + private static final com.google.cloud.discoveryengine.v1beta.Assistant.ToolList + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.discoveryengine.v1beta.Assistant.ToolList(); + } + + public static com.google.cloud.discoveryengine.v1beta.Assistant.ToolList getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ToolList parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Assistant.ToolList getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface CustomerPolicyOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
            +     * Optional. List of banned phrases.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.BannedPhrase banned_phrases = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List + getBannedPhrasesList(); + + /** + * + * + *
            +     * Optional. List of banned phrases.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.BannedPhrase banned_phrases = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.BannedPhrase getBannedPhrases( + int index); + + /** + * + * + *
            +     * Optional. List of banned phrases.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.BannedPhrase banned_phrases = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + int getBannedPhrasesCount(); + + /** + * + * + *
            +     * Optional. List of banned phrases.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.BannedPhrase banned_phrases = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List< + ? extends + com.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy + .BannedPhraseOrBuilder> + getBannedPhrasesOrBuilderList(); + + /** + * + * + *
            +     * Optional. List of banned phrases.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.BannedPhrase banned_phrases = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.BannedPhraseOrBuilder + getBannedPhrasesOrBuilder(int index); + + /** + * + * + *
            +     * Optional. Model Armor configuration to be used for sanitizing user
            +     * prompts and assistant responses.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.ModelArmorConfig model_armor_config = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the modelArmorConfig field is set. + */ + boolean hasModelArmorConfig(); + + /** + * + * + *
            +     * Optional. Model Armor configuration to be used for sanitizing user
            +     * prompts and assistant responses.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.ModelArmorConfig model_armor_config = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The modelArmorConfig. + */ + com.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.ModelArmorConfig + getModelArmorConfig(); + + /** + * + * + *
            +     * Optional. Model Armor configuration to be used for sanitizing user
            +     * prompts and assistant responses.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.ModelArmorConfig model_armor_config = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.ModelArmorConfigOrBuilder + getModelArmorConfigOrBuilder(); + } + + /** + * + * + *
            +   * Customer-defined policy for the assistant.
            +   * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy} + */ + public static final class CustomerPolicy extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy) + CustomerPolicyOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "CustomerPolicy"); + } + + // Use CustomerPolicy.newBuilder() to construct. + private CustomerPolicy(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private CustomerPolicy() { + bannedPhrases_ = java.util.Collections.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.AssistantProto + .internal_static_google_cloud_discoveryengine_v1beta_Assistant_CustomerPolicy_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.AssistantProto + .internal_static_google_cloud_discoveryengine_v1beta_Assistant_CustomerPolicy_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.class, + com.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.Builder.class); + } + + public interface BannedPhraseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.BannedPhrase) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
            +       * Required. The raw string content to be banned.
            +       * 
            + * + * string phrase = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The phrase. + */ + java.lang.String getPhrase(); + + /** + * + * + *
            +       * Required. The raw string content to be banned.
            +       * 
            + * + * string phrase = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for phrase. + */ + com.google.protobuf.ByteString getPhraseBytes(); + + /** + * + * + *
            +       * Optional. Match type for the banned phrase.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.BannedPhrase.BannedPhraseMatchType match_type = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for matchType. + */ + int getMatchTypeValue(); + + /** + * + * + *
            +       * Optional. Match type for the banned phrase.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.BannedPhrase.BannedPhraseMatchType match_type = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The matchType. + */ + com.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.BannedPhrase + .BannedPhraseMatchType + getMatchType(); + + /** + * + * + *
            +       * Optional. If true, diacritical marks (e.g., accents, umlauts) are
            +       * ignored when matching banned phrases. For example, "cafe" would match
            +       * "café".
            +       * 
            + * + * bool ignore_diacritics = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The ignoreDiacritics. + */ + boolean getIgnoreDiacritics(); + } + + /** + * + * + *
            +     * Definition of a customer-defined banned phrase. A banned phrase is not
            +     * allowed to appear in the user query or the LLM response, or else the
            +     * answer will be refused.
            +     * 
            + * + * Protobuf type {@code + * google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.BannedPhrase} + */ + public static final class BannedPhrase extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.BannedPhrase) + BannedPhraseOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "BannedPhrase"); + } + + // Use BannedPhrase.newBuilder() to construct. + private BannedPhrase(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private BannedPhrase() { + phrase_ = ""; + matchType_ = 0; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.AssistantProto + .internal_static_google_cloud_discoveryengine_v1beta_Assistant_CustomerPolicy_BannedPhrase_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.AssistantProto + .internal_static_google_cloud_discoveryengine_v1beta_Assistant_CustomerPolicy_BannedPhrase_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.BannedPhrase.class, + com.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.BannedPhrase + .Builder.class); + } + + /** + * + * + *
            +       * The matching method for the banned phrase.
            +       * 
            + * + * Protobuf enum {@code + * google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.BannedPhrase.BannedPhraseMatchType} + */ + public enum BannedPhraseMatchType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
            +         * Defaults to SIMPLE_STRING_MATCH.
            +         * 
            + * + * BANNED_PHRASE_MATCH_TYPE_UNSPECIFIED = 0; + */ + BANNED_PHRASE_MATCH_TYPE_UNSPECIFIED(0), + /** + * + * + *
            +         * The banned phrase matches if it is found anywhere in the text as an
            +         * exact substring.
            +         * 
            + * + * SIMPLE_STRING_MATCH = 1; + */ + SIMPLE_STRING_MATCH(1), + /** + * + * + *
            +         * Banned phrase only matches if the pattern found in the text is
            +         * surrounded by word delimiters. The phrase itself may still contain
            +         * word delimiters.
            +         * 
            + * + * WORD_BOUNDARY_STRING_MATCH = 2; + */ + WORD_BOUNDARY_STRING_MATCH(2), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "BannedPhraseMatchType"); + } + + /** + * + * + *
            +         * Defaults to SIMPLE_STRING_MATCH.
            +         * 
            + * + * BANNED_PHRASE_MATCH_TYPE_UNSPECIFIED = 0; + */ + public static final int BANNED_PHRASE_MATCH_TYPE_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
            +         * The banned phrase matches if it is found anywhere in the text as an
            +         * exact substring.
            +         * 
            + * + * SIMPLE_STRING_MATCH = 1; + */ + public static final int SIMPLE_STRING_MATCH_VALUE = 1; + + /** + * + * + *
            +         * Banned phrase only matches if the pattern found in the text is
            +         * surrounded by word delimiters. The phrase itself may still contain
            +         * word delimiters.
            +         * 
            + * + * WORD_BOUNDARY_STRING_MATCH = 2; + */ + public static final int WORD_BOUNDARY_STRING_MATCH_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 BannedPhraseMatchType 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 BannedPhraseMatchType forNumber(int value) { + switch (value) { + case 0: + return BANNED_PHRASE_MATCH_TYPE_UNSPECIFIED; + case 1: + return SIMPLE_STRING_MATCH; + case 2: + return WORD_BOUNDARY_STRING_MATCH; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap + internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public BannedPhraseMatchType findValueByNumber(int number) { + return BannedPhraseMatchType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.BannedPhrase + .getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final BannedPhraseMatchType[] VALUES = values(); + + public static BannedPhraseMatchType valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private BannedPhraseMatchType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.BannedPhrase.BannedPhraseMatchType) + } + + public static final int PHRASE_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object phrase_ = ""; + + /** + * + * + *
            +       * Required. The raw string content to be banned.
            +       * 
            + * + * string phrase = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The phrase. + */ + @java.lang.Override + public java.lang.String getPhrase() { + java.lang.Object ref = phrase_; + 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(); + phrase_ = s; + return s; + } + } + + /** + * + * + *
            +       * Required. The raw string content to be banned.
            +       * 
            + * + * string phrase = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for phrase. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPhraseBytes() { + java.lang.Object ref = phrase_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + phrase_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int MATCH_TYPE_FIELD_NUMBER = 2; + private int matchType_ = 0; + + /** + * + * + *
            +       * Optional. Match type for the banned phrase.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.BannedPhrase.BannedPhraseMatchType match_type = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for matchType. + */ + @java.lang.Override + public int getMatchTypeValue() { + return matchType_; + } + + /** + * + * + *
            +       * Optional. Match type for the banned phrase.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.BannedPhrase.BannedPhraseMatchType match_type = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The matchType. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.BannedPhrase + .BannedPhraseMatchType + getMatchType() { + com.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.BannedPhrase + .BannedPhraseMatchType + result = + com.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.BannedPhrase + .BannedPhraseMatchType.forNumber(matchType_); + return result == null + ? com.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.BannedPhrase + .BannedPhraseMatchType.UNRECOGNIZED + : result; + } + + public static final int IGNORE_DIACRITICS_FIELD_NUMBER = 3; + private boolean ignoreDiacritics_ = false; + + /** + * + * + *
            +       * Optional. If true, diacritical marks (e.g., accents, umlauts) are
            +       * ignored when matching banned phrases. For example, "cafe" would match
            +       * "café".
            +       * 
            + * + * bool ignore_diacritics = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The ignoreDiacritics. + */ + @java.lang.Override + public boolean getIgnoreDiacritics() { + return ignoreDiacritics_; + } + + 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(phrase_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, phrase_); + } + if (matchType_ + != com.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.BannedPhrase + .BannedPhraseMatchType.BANNED_PHRASE_MATCH_TYPE_UNSPECIFIED + .getNumber()) { + output.writeEnum(2, matchType_); + } + if (ignoreDiacritics_ != false) { + output.writeBool(3, ignoreDiacritics_); + } + 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(phrase_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, phrase_); + } + if (matchType_ + != com.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.BannedPhrase + .BannedPhraseMatchType.BANNED_PHRASE_MATCH_TYPE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, matchType_); + } + if (ignoreDiacritics_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, ignoreDiacritics_); + } + 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.discoveryengine.v1beta.Assistant.CustomerPolicy.BannedPhrase)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.BannedPhrase other = + (com.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.BannedPhrase) obj; + + if (!getPhrase().equals(other.getPhrase())) return false; + if (matchType_ != other.matchType_) return false; + if (getIgnoreDiacritics() != other.getIgnoreDiacritics()) 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) + PHRASE_FIELD_NUMBER; + hash = (53 * hash) + getPhrase().hashCode(); + hash = (37 * hash) + MATCH_TYPE_FIELD_NUMBER; + hash = (53 * hash) + matchType_; + hash = (37 * hash) + IGNORE_DIACRITICS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getIgnoreDiacritics()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.BannedPhrase + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.BannedPhrase + 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.discoveryengine.v1beta.Assistant.CustomerPolicy.BannedPhrase + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.BannedPhrase + 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.discoveryengine.v1beta.Assistant.CustomerPolicy.BannedPhrase + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.BannedPhrase + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.BannedPhrase + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.BannedPhrase + 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.discoveryengine.v1beta.Assistant.CustomerPolicy.BannedPhrase + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.BannedPhrase + 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.discoveryengine.v1beta.Assistant.CustomerPolicy.BannedPhrase + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.BannedPhrase + 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.discoveryengine.v1beta.Assistant.CustomerPolicy.BannedPhrase 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; + } + + /** + * + * + *
            +       * Definition of a customer-defined banned phrase. A banned phrase is not
            +       * allowed to appear in the user query or the LLM response, or else the
            +       * answer will be refused.
            +       * 
            + * + * Protobuf type {@code + * google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.BannedPhrase} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.BannedPhrase) + com.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.BannedPhraseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.AssistantProto + .internal_static_google_cloud_discoveryengine_v1beta_Assistant_CustomerPolicy_BannedPhrase_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.AssistantProto + .internal_static_google_cloud_discoveryengine_v1beta_Assistant_CustomerPolicy_BannedPhrase_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.BannedPhrase + .class, + com.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.BannedPhrase + .Builder.class); + } + + // Construct using + // com.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.BannedPhrase.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + phrase_ = ""; + matchType_ = 0; + ignoreDiacritics_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1beta.AssistantProto + .internal_static_google_cloud_discoveryengine_v1beta_Assistant_CustomerPolicy_BannedPhrase_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.BannedPhrase + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.BannedPhrase + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.BannedPhrase + build() { + com.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.BannedPhrase result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.BannedPhrase + buildPartial() { + com.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.BannedPhrase result = + new com.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.BannedPhrase( + this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.BannedPhrase result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.phrase_ = phrase_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.matchType_ = matchType_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.ignoreDiacritics_ = ignoreDiacritics_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.BannedPhrase) { + return mergeFrom( + (com.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.BannedPhrase) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.BannedPhrase other) { + if (other + == com.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.BannedPhrase + .getDefaultInstance()) return this; + if (!other.getPhrase().isEmpty()) { + phrase_ = other.phrase_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.matchType_ != 0) { + setMatchTypeValue(other.getMatchTypeValue()); + } + if (other.getIgnoreDiacritics() != false) { + setIgnoreDiacritics(other.getIgnoreDiacritics()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + phrase_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + matchType_ = input.readEnum(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 24: + { + ignoreDiacritics_ = input.readBool(); + bitField0_ |= 0x00000004; + break; + } // case 24 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object phrase_ = ""; + + /** + * + * + *
            +         * Required. The raw string content to be banned.
            +         * 
            + * + * string phrase = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The phrase. + */ + public java.lang.String getPhrase() { + java.lang.Object ref = phrase_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + phrase_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
            +         * Required. The raw string content to be banned.
            +         * 
            + * + * string phrase = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for phrase. + */ + public com.google.protobuf.ByteString getPhraseBytes() { + java.lang.Object ref = phrase_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + phrase_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
            +         * Required. The raw string content to be banned.
            +         * 
            + * + * string phrase = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The phrase to set. + * @return This builder for chaining. + */ + public Builder setPhrase(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + phrase_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
            +         * Required. The raw string content to be banned.
            +         * 
            + * + * string phrase = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearPhrase() { + phrase_ = getDefaultInstance().getPhrase(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
            +         * Required. The raw string content to be banned.
            +         * 
            + * + * string phrase = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for phrase to set. + * @return This builder for chaining. + */ + public Builder setPhraseBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + phrase_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int matchType_ = 0; + + /** + * + * + *
            +         * Optional. Match type for the banned phrase.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.BannedPhrase.BannedPhraseMatchType match_type = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for matchType. + */ + @java.lang.Override + public int getMatchTypeValue() { + return matchType_; + } + + /** + * + * + *
            +         * Optional. Match type for the banned phrase.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.BannedPhrase.BannedPhraseMatchType match_type = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The enum numeric value on the wire for matchType to set. + * @return This builder for chaining. + */ + public Builder setMatchTypeValue(int value) { + matchType_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
            +         * Optional. Match type for the banned phrase.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.BannedPhrase.BannedPhraseMatchType match_type = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The matchType. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.BannedPhrase + .BannedPhraseMatchType + getMatchType() { + com.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.BannedPhrase + .BannedPhraseMatchType + result = + com.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.BannedPhrase + .BannedPhraseMatchType.forNumber(matchType_); + return result == null + ? com.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.BannedPhrase + .BannedPhraseMatchType.UNRECOGNIZED + : result; + } + + /** + * + * + *
            +         * Optional. Match type for the banned phrase.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.BannedPhrase.BannedPhraseMatchType match_type = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The matchType to set. + * @return This builder for chaining. + */ + public Builder setMatchType( + com.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.BannedPhrase + .BannedPhraseMatchType + value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + matchType_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
            +         * Optional. Match type for the banned phrase.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.BannedPhrase.BannedPhraseMatchType match_type = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearMatchType() { + bitField0_ = (bitField0_ & ~0x00000002); + matchType_ = 0; + onChanged(); + return this; + } + + private boolean ignoreDiacritics_; + + /** + * + * + *
            +         * Optional. If true, diacritical marks (e.g., accents, umlauts) are
            +         * ignored when matching banned phrases. For example, "cafe" would match
            +         * "café".
            +         * 
            + * + * bool ignore_diacritics = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The ignoreDiacritics. + */ + @java.lang.Override + public boolean getIgnoreDiacritics() { + return ignoreDiacritics_; + } + + /** + * + * + *
            +         * Optional. If true, diacritical marks (e.g., accents, umlauts) are
            +         * ignored when matching banned phrases. For example, "cafe" would match
            +         * "café".
            +         * 
            + * + * bool ignore_diacritics = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The ignoreDiacritics to set. + * @return This builder for chaining. + */ + public Builder setIgnoreDiacritics(boolean value) { + + ignoreDiacritics_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
            +         * Optional. If true, diacritical marks (e.g., accents, umlauts) are
            +         * ignored when matching banned phrases. For example, "cafe" would match
            +         * "café".
            +         * 
            + * + * bool ignore_diacritics = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearIgnoreDiacritics() { + bitField0_ = (bitField0_ & ~0x00000004); + ignoreDiacritics_ = false; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.BannedPhrase) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.BannedPhrase) + private static final com.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy + .BannedPhrase + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.BannedPhrase(); + } + + public static com.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.BannedPhrase + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BannedPhrase parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.BannedPhrase + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface ModelArmorConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.ModelArmorConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
            +       * Optional. The resource name of the Model Armor template for sanitizing
            +       * user prompts. Format:
            +       * `projects/{project}/locations/{location}/templates/{template_id}`
            +       *
            +       * If not specified, no sanitization will be applied to the user prompt.
            +       * 
            + * + * + * string user_prompt_template = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The userPromptTemplate. + */ + java.lang.String getUserPromptTemplate(); + + /** + * + * + *
            +       * Optional. The resource name of the Model Armor template for sanitizing
            +       * user prompts. Format:
            +       * `projects/{project}/locations/{location}/templates/{template_id}`
            +       *
            +       * If not specified, no sanitization will be applied to the user prompt.
            +       * 
            + * + * + * string user_prompt_template = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for userPromptTemplate. + */ + com.google.protobuf.ByteString getUserPromptTemplateBytes(); + + /** + * + * + *
            +       * Optional. The resource name of the Model Armor template for sanitizing
            +       * assistant responses. Format:
            +       * `projects/{project}/locations/{location}/templates/{template_id}`
            +       *
            +       * If not specified, no sanitization will be applied to the assistant
            +       * response.
            +       * 
            + * + * + * string response_template = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The responseTemplate. + */ + java.lang.String getResponseTemplate(); + + /** + * + * + *
            +       * Optional. The resource name of the Model Armor template for sanitizing
            +       * assistant responses. Format:
            +       * `projects/{project}/locations/{location}/templates/{template_id}`
            +       *
            +       * If not specified, no sanitization will be applied to the assistant
            +       * response.
            +       * 
            + * + * + * string response_template = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for responseTemplate. + */ + com.google.protobuf.ByteString getResponseTemplateBytes(); + + /** + * + * + *
            +       * Optional. Defines the failure mode for Model Armor sanitization.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.ModelArmorConfig.FailureMode failure_mode = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for failureMode. + */ + int getFailureModeValue(); + + /** + * + * + *
            +       * Optional. Defines the failure mode for Model Armor sanitization.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.ModelArmorConfig.FailureMode failure_mode = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The failureMode. + */ + com.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.ModelArmorConfig.FailureMode + getFailureMode(); + } + + /** + * + * + *
            +     * Configuration for customer defined Model Armor templates to be used for
            +     * sanitizing user prompts and assistant responses.
            +     * 
            + * + * Protobuf type {@code + * google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.ModelArmorConfig} + */ + public static final class ModelArmorConfig extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.ModelArmorConfig) + ModelArmorConfigOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ModelArmorConfig"); + } + + // Use ModelArmorConfig.newBuilder() to construct. + private ModelArmorConfig(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ModelArmorConfig() { + userPromptTemplate_ = ""; + responseTemplate_ = ""; + failureMode_ = 0; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.AssistantProto + .internal_static_google_cloud_discoveryengine_v1beta_Assistant_CustomerPolicy_ModelArmorConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.AssistantProto + .internal_static_google_cloud_discoveryengine_v1beta_Assistant_CustomerPolicy_ModelArmorConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.ModelArmorConfig + .class, + com.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.ModelArmorConfig + .Builder.class); + } + + /** + * + * + *
            +       * Determines the behavior when Model Armor fails to process a request.
            +       * 
            + * + * Protobuf enum {@code + * google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.ModelArmorConfig.FailureMode} + */ + public enum FailureMode implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
            +         * Unspecified failure mode, default behavior is `FAIL_CLOSED`.
            +         * 
            + * + * FAILURE_MODE_UNSPECIFIED = 0; + */ + FAILURE_MODE_UNSPECIFIED(0), + /** + * + * + *
            +         * In case of a Model Armor processing failure, the request is allowed
            +         * to proceed without any changes.
            +         * 
            + * + * FAIL_OPEN = 1; + */ + FAIL_OPEN(1), + /** + * + * + *
            +         * In case of a Model Armor processing failure, the request is rejected.
            +         * 
            + * + * FAIL_CLOSED = 2; + */ + FAIL_CLOSED(2), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "FailureMode"); + } + + /** + * + * + *
            +         * Unspecified failure mode, default behavior is `FAIL_CLOSED`.
            +         * 
            + * + * FAILURE_MODE_UNSPECIFIED = 0; + */ + public static final int FAILURE_MODE_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
            +         * In case of a Model Armor processing failure, the request is allowed
            +         * to proceed without any changes.
            +         * 
            + * + * FAIL_OPEN = 1; + */ + public static final int FAIL_OPEN_VALUE = 1; + + /** + * + * + *
            +         * In case of a Model Armor processing failure, the request is rejected.
            +         * 
            + * + * FAIL_CLOSED = 2; + */ + public static final int FAIL_CLOSED_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 FailureMode 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 FailureMode forNumber(int value) { + switch (value) { + case 0: + return FAILURE_MODE_UNSPECIFIED; + case 1: + return FAIL_OPEN; + case 2: + return FAIL_CLOSED; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap + internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public FailureMode findValueByNumber(int number) { + return FailureMode.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.ModelArmorConfig + .getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final FailureMode[] VALUES = values(); + + public static FailureMode valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private FailureMode(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.ModelArmorConfig.FailureMode) + } + + public static final int USER_PROMPT_TEMPLATE_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object userPromptTemplate_ = ""; + + /** + * + * + *
            +       * Optional. The resource name of the Model Armor template for sanitizing
            +       * user prompts. Format:
            +       * `projects/{project}/locations/{location}/templates/{template_id}`
            +       *
            +       * If not specified, no sanitization will be applied to the user prompt.
            +       * 
            + * + * + * string user_prompt_template = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The userPromptTemplate. + */ + @java.lang.Override + public java.lang.String getUserPromptTemplate() { + java.lang.Object ref = userPromptTemplate_; + 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(); + userPromptTemplate_ = s; + return s; + } + } + + /** + * + * + *
            +       * Optional. The resource name of the Model Armor template for sanitizing
            +       * user prompts. Format:
            +       * `projects/{project}/locations/{location}/templates/{template_id}`
            +       *
            +       * If not specified, no sanitization will be applied to the user prompt.
            +       * 
            + * + * + * string user_prompt_template = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for userPromptTemplate. + */ + @java.lang.Override + public com.google.protobuf.ByteString getUserPromptTemplateBytes() { + java.lang.Object ref = userPromptTemplate_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + userPromptTemplate_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int RESPONSE_TEMPLATE_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object responseTemplate_ = ""; + + /** + * + * + *
            +       * Optional. The resource name of the Model Armor template for sanitizing
            +       * assistant responses. Format:
            +       * `projects/{project}/locations/{location}/templates/{template_id}`
            +       *
            +       * If not specified, no sanitization will be applied to the assistant
            +       * response.
            +       * 
            + * + * + * string response_template = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The responseTemplate. + */ + @java.lang.Override + public java.lang.String getResponseTemplate() { + java.lang.Object ref = responseTemplate_; + 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(); + responseTemplate_ = s; + return s; + } + } + + /** + * + * + *
            +       * Optional. The resource name of the Model Armor template for sanitizing
            +       * assistant responses. Format:
            +       * `projects/{project}/locations/{location}/templates/{template_id}`
            +       *
            +       * If not specified, no sanitization will be applied to the assistant
            +       * response.
            +       * 
            + * + * + * string response_template = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for responseTemplate. + */ + @java.lang.Override + public com.google.protobuf.ByteString getResponseTemplateBytes() { + java.lang.Object ref = responseTemplate_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + responseTemplate_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FAILURE_MODE_FIELD_NUMBER = 3; + private int failureMode_ = 0; + + /** + * + * + *
            +       * Optional. Defines the failure mode for Model Armor sanitization.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.ModelArmorConfig.FailureMode failure_mode = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for failureMode. + */ + @java.lang.Override + public int getFailureModeValue() { + return failureMode_; + } + + /** + * + * + *
            +       * Optional. Defines the failure mode for Model Armor sanitization.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.ModelArmorConfig.FailureMode failure_mode = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The failureMode. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.ModelArmorConfig + .FailureMode + getFailureMode() { + com.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.ModelArmorConfig + .FailureMode + result = + com.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.ModelArmorConfig + .FailureMode.forNumber(failureMode_); + return result == null + ? com.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.ModelArmorConfig + .FailureMode.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(userPromptTemplate_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, userPromptTemplate_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(responseTemplate_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, responseTemplate_); + } + if (failureMode_ + != com.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.ModelArmorConfig + .FailureMode.FAILURE_MODE_UNSPECIFIED + .getNumber()) { + output.writeEnum(3, failureMode_); + } + 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(userPromptTemplate_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, userPromptTemplate_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(responseTemplate_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, responseTemplate_); + } + if (failureMode_ + != com.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.ModelArmorConfig + .FailureMode.FAILURE_MODE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(3, failureMode_); + } + 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.discoveryengine.v1beta.Assistant.CustomerPolicy.ModelArmorConfig)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.ModelArmorConfig other = + (com.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.ModelArmorConfig) obj; + + if (!getUserPromptTemplate().equals(other.getUserPromptTemplate())) return false; + if (!getResponseTemplate().equals(other.getResponseTemplate())) return false; + if (failureMode_ != other.failureMode_) 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) + USER_PROMPT_TEMPLATE_FIELD_NUMBER; + hash = (53 * hash) + getUserPromptTemplate().hashCode(); + hash = (37 * hash) + RESPONSE_TEMPLATE_FIELD_NUMBER; + hash = (53 * hash) + getResponseTemplate().hashCode(); + hash = (37 * hash) + FAILURE_MODE_FIELD_NUMBER; + hash = (53 * hash) + failureMode_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy + .ModelArmorConfig + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy + .ModelArmorConfig + 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.discoveryengine.v1beta.Assistant.CustomerPolicy + .ModelArmorConfig + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy + .ModelArmorConfig + 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.discoveryengine.v1beta.Assistant.CustomerPolicy + .ModelArmorConfig + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy + .ModelArmorConfig + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy + .ModelArmorConfig + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy + .ModelArmorConfig + 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.discoveryengine.v1beta.Assistant.CustomerPolicy + .ModelArmorConfig + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy + .ModelArmorConfig + 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.discoveryengine.v1beta.Assistant.CustomerPolicy + .ModelArmorConfig + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy + .ModelArmorConfig + 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.discoveryengine.v1beta.Assistant.CustomerPolicy.ModelArmorConfig + 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; + } + + /** + * + * + *
            +       * Configuration for customer defined Model Armor templates to be used for
            +       * sanitizing user prompts and assistant responses.
            +       * 
            + * + * Protobuf type {@code + * google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.ModelArmorConfig} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.ModelArmorConfig) + com.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy + .ModelArmorConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.AssistantProto + .internal_static_google_cloud_discoveryengine_v1beta_Assistant_CustomerPolicy_ModelArmorConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.AssistantProto + .internal_static_google_cloud_discoveryengine_v1beta_Assistant_CustomerPolicy_ModelArmorConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.ModelArmorConfig + .class, + com.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.ModelArmorConfig + .Builder.class); + } + + // Construct using + // com.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.ModelArmorConfig.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + userPromptTemplate_ = ""; + responseTemplate_ = ""; + failureMode_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1beta.AssistantProto + .internal_static_google_cloud_discoveryengine_v1beta_Assistant_CustomerPolicy_ModelArmorConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.ModelArmorConfig + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.ModelArmorConfig + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.ModelArmorConfig + build() { + com.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.ModelArmorConfig result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.ModelArmorConfig + buildPartial() { + com.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.ModelArmorConfig result = + new com.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.ModelArmorConfig( + this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.ModelArmorConfig + result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.userPromptTemplate_ = userPromptTemplate_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.responseTemplate_ = responseTemplate_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.failureMode_ = failureMode_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.ModelArmorConfig) { + return mergeFrom( + (com.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.ModelArmorConfig) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.ModelArmorConfig + other) { + if (other + == com.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.ModelArmorConfig + .getDefaultInstance()) return this; + if (!other.getUserPromptTemplate().isEmpty()) { + userPromptTemplate_ = other.userPromptTemplate_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getResponseTemplate().isEmpty()) { + responseTemplate_ = other.responseTemplate_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.failureMode_ != 0) { + setFailureModeValue(other.getFailureModeValue()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + userPromptTemplate_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + responseTemplate_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: + { + failureMode_ = input.readEnum(); + bitField0_ |= 0x00000004; + break; + } // case 24 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object userPromptTemplate_ = ""; + + /** + * + * + *
            +         * Optional. The resource name of the Model Armor template for sanitizing
            +         * user prompts. Format:
            +         * `projects/{project}/locations/{location}/templates/{template_id}`
            +         *
            +         * If not specified, no sanitization will be applied to the user prompt.
            +         * 
            + * + * + * string user_prompt_template = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The userPromptTemplate. + */ + public java.lang.String getUserPromptTemplate() { + java.lang.Object ref = userPromptTemplate_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + userPromptTemplate_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
            +         * Optional. The resource name of the Model Armor template for sanitizing
            +         * user prompts. Format:
            +         * `projects/{project}/locations/{location}/templates/{template_id}`
            +         *
            +         * If not specified, no sanitization will be applied to the user prompt.
            +         * 
            + * + * + * string user_prompt_template = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for userPromptTemplate. + */ + public com.google.protobuf.ByteString getUserPromptTemplateBytes() { + java.lang.Object ref = userPromptTemplate_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + userPromptTemplate_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
            +         * Optional. The resource name of the Model Armor template for sanitizing
            +         * user prompts. Format:
            +         * `projects/{project}/locations/{location}/templates/{template_id}`
            +         *
            +         * If not specified, no sanitization will be applied to the user prompt.
            +         * 
            + * + * + * string user_prompt_template = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param value The userPromptTemplate to set. + * @return This builder for chaining. + */ + public Builder setUserPromptTemplate(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + userPromptTemplate_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
            +         * Optional. The resource name of the Model Armor template for sanitizing
            +         * user prompts. Format:
            +         * `projects/{project}/locations/{location}/templates/{template_id}`
            +         *
            +         * If not specified, no sanitization will be applied to the user prompt.
            +         * 
            + * + * + * string user_prompt_template = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearUserPromptTemplate() { + userPromptTemplate_ = getDefaultInstance().getUserPromptTemplate(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
            +         * Optional. The resource name of the Model Armor template for sanitizing
            +         * user prompts. Format:
            +         * `projects/{project}/locations/{location}/templates/{template_id}`
            +         *
            +         * If not specified, no sanitization will be applied to the user prompt.
            +         * 
            + * + * + * string user_prompt_template = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for userPromptTemplate to set. + * @return This builder for chaining. + */ + public Builder setUserPromptTemplateBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + userPromptTemplate_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object responseTemplate_ = ""; + + /** + * + * + *
            +         * Optional. The resource name of the Model Armor template for sanitizing
            +         * assistant responses. Format:
            +         * `projects/{project}/locations/{location}/templates/{template_id}`
            +         *
            +         * If not specified, no sanitization will be applied to the assistant
            +         * response.
            +         * 
            + * + * + * string response_template = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The responseTemplate. + */ + public java.lang.String getResponseTemplate() { + java.lang.Object ref = responseTemplate_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + responseTemplate_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
            +         * Optional. The resource name of the Model Armor template for sanitizing
            +         * assistant responses. Format:
            +         * `projects/{project}/locations/{location}/templates/{template_id}`
            +         *
            +         * If not specified, no sanitization will be applied to the assistant
            +         * response.
            +         * 
            + * + * + * string response_template = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for responseTemplate. + */ + public com.google.protobuf.ByteString getResponseTemplateBytes() { + java.lang.Object ref = responseTemplate_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + responseTemplate_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
            +         * Optional. The resource name of the Model Armor template for sanitizing
            +         * assistant responses. Format:
            +         * `projects/{project}/locations/{location}/templates/{template_id}`
            +         *
            +         * If not specified, no sanitization will be applied to the assistant
            +         * response.
            +         * 
            + * + * + * string response_template = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param value The responseTemplate to set. + * @return This builder for chaining. + */ + public Builder setResponseTemplate(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + responseTemplate_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
            +         * Optional. The resource name of the Model Armor template for sanitizing
            +         * assistant responses. Format:
            +         * `projects/{project}/locations/{location}/templates/{template_id}`
            +         *
            +         * If not specified, no sanitization will be applied to the assistant
            +         * response.
            +         * 
            + * + * + * string response_template = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearResponseTemplate() { + responseTemplate_ = getDefaultInstance().getResponseTemplate(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
            +         * Optional. The resource name of the Model Armor template for sanitizing
            +         * assistant responses. Format:
            +         * `projects/{project}/locations/{location}/templates/{template_id}`
            +         *
            +         * If not specified, no sanitization will be applied to the assistant
            +         * response.
            +         * 
            + * + * + * string response_template = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for responseTemplate to set. + * @return This builder for chaining. + */ + public Builder setResponseTemplateBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + responseTemplate_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private int failureMode_ = 0; + + /** + * + * + *
            +         * Optional. Defines the failure mode for Model Armor sanitization.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.ModelArmorConfig.FailureMode failure_mode = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for failureMode. + */ + @java.lang.Override + public int getFailureModeValue() { + return failureMode_; + } + + /** + * + * + *
            +         * Optional. Defines the failure mode for Model Armor sanitization.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.ModelArmorConfig.FailureMode failure_mode = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The enum numeric value on the wire for failureMode to set. + * @return This builder for chaining. + */ + public Builder setFailureModeValue(int value) { + failureMode_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
            +         * Optional. Defines the failure mode for Model Armor sanitization.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.ModelArmorConfig.FailureMode failure_mode = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The failureMode. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.ModelArmorConfig + .FailureMode + getFailureMode() { + com.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.ModelArmorConfig + .FailureMode + result = + com.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.ModelArmorConfig + .FailureMode.forNumber(failureMode_); + return result == null + ? com.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.ModelArmorConfig + .FailureMode.UNRECOGNIZED + : result; + } + + /** + * + * + *
            +         * Optional. Defines the failure mode for Model Armor sanitization.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.ModelArmorConfig.FailureMode failure_mode = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The failureMode to set. + * @return This builder for chaining. + */ + public Builder setFailureMode( + com.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.ModelArmorConfig + .FailureMode + value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000004; + failureMode_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
            +         * Optional. Defines the failure mode for Model Armor sanitization.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.ModelArmorConfig.FailureMode failure_mode = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearFailureMode() { + bitField0_ = (bitField0_ & ~0x00000004); + failureMode_ = 0; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.ModelArmorConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.ModelArmorConfig) + private static final com.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy + .ModelArmorConfig + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.ModelArmorConfig(); + } + + public static com.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy + .ModelArmorConfig + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ModelArmorConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.ModelArmorConfig + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int bitField0_; + public static final int BANNED_PHRASES_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List< + com.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.BannedPhrase> + bannedPhrases_; + + /** + * + * + *
            +     * Optional. List of banned phrases.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.BannedPhrase banned_phrases = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List< + com.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.BannedPhrase> + getBannedPhrasesList() { + return bannedPhrases_; + } + + /** + * + * + *
            +     * Optional. List of banned phrases.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.BannedPhrase banned_phrases = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List< + ? extends + com.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy + .BannedPhraseOrBuilder> + getBannedPhrasesOrBuilderList() { + return bannedPhrases_; + } + + /** + * + * + *
            +     * Optional. List of banned phrases.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.BannedPhrase banned_phrases = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public int getBannedPhrasesCount() { + return bannedPhrases_.size(); + } + + /** + * + * + *
            +     * Optional. List of banned phrases.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.BannedPhrase banned_phrases = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.BannedPhrase + getBannedPhrases(int index) { + return bannedPhrases_.get(index); + } + + /** + * + * + *
            +     * Optional. List of banned phrases.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.BannedPhrase banned_phrases = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.BannedPhraseOrBuilder + getBannedPhrasesOrBuilder(int index) { + return bannedPhrases_.get(index); + } + + public static final int MODEL_ARMOR_CONFIG_FIELD_NUMBER = 2; + private com.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.ModelArmorConfig + modelArmorConfig_; + + /** + * + * + *
            +     * Optional. Model Armor configuration to be used for sanitizing user
            +     * prompts and assistant responses.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.ModelArmorConfig model_armor_config = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the modelArmorConfig field is set. + */ + @java.lang.Override + public boolean hasModelArmorConfig() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
            +     * Optional. Model Armor configuration to be used for sanitizing user
            +     * prompts and assistant responses.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.ModelArmorConfig model_armor_config = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The modelArmorConfig. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.ModelArmorConfig + getModelArmorConfig() { + return modelArmorConfig_ == null + ? com.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.ModelArmorConfig + .getDefaultInstance() + : modelArmorConfig_; + } + + /** + * + * + *
            +     * Optional. Model Armor configuration to be used for sanitizing user
            +     * prompts and assistant responses.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.ModelArmorConfig model_armor_config = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy + .ModelArmorConfigOrBuilder + getModelArmorConfigOrBuilder() { + return modelArmorConfig_ == null + ? com.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.ModelArmorConfig + .getDefaultInstance() + : modelArmorConfig_; + } + + 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 < bannedPhrases_.size(); i++) { + output.writeMessage(1, bannedPhrases_.get(i)); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getModelArmorConfig()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < bannedPhrases_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, bannedPhrases_.get(i)); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getModelArmorConfig()); + } + 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.discoveryengine.v1beta.Assistant.CustomerPolicy)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy other = + (com.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy) obj; + + if (!getBannedPhrasesList().equals(other.getBannedPhrasesList())) return false; + if (hasModelArmorConfig() != other.hasModelArmorConfig()) return false; + if (hasModelArmorConfig()) { + if (!getModelArmorConfig().equals(other.getModelArmorConfig())) 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 (getBannedPhrasesCount() > 0) { + hash = (37 * hash) + BANNED_PHRASES_FIELD_NUMBER; + hash = (53 * hash) + getBannedPhrasesList().hashCode(); + } + if (hasModelArmorConfig()) { + hash = (37 * hash) + MODEL_ARMOR_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getModelArmorConfig().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy 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.discoveryengine.v1beta.Assistant.CustomerPolicy parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy 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.discoveryengine.v1beta.Assistant.CustomerPolicy parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy 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.discoveryengine.v1beta.Assistant.CustomerPolicy + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy + 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.discoveryengine.v1beta.Assistant.CustomerPolicy parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy 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.discoveryengine.v1beta.Assistant.CustomerPolicy 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; + } + + /** + * + * + *
            +     * Customer-defined policy for the assistant.
            +     * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy) + com.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicyOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.AssistantProto + .internal_static_google_cloud_discoveryengine_v1beta_Assistant_CustomerPolicy_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.AssistantProto + .internal_static_google_cloud_discoveryengine_v1beta_Assistant_CustomerPolicy_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.class, + com.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.Builder.class); + } + + // Construct using + // com.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetBannedPhrasesFieldBuilder(); + internalGetModelArmorConfigFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (bannedPhrasesBuilder_ == null) { + bannedPhrases_ = java.util.Collections.emptyList(); + } else { + bannedPhrases_ = null; + bannedPhrasesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + modelArmorConfig_ = null; + if (modelArmorConfigBuilder_ != null) { + modelArmorConfigBuilder_.dispose(); + modelArmorConfigBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1beta.AssistantProto + .internal_static_google_cloud_discoveryengine_v1beta_Assistant_CustomerPolicy_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy build() { + com.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy buildPartial() { + com.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy result = + new com.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy result) { + if (bannedPhrasesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + bannedPhrases_ = java.util.Collections.unmodifiableList(bannedPhrases_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.bannedPhrases_ = bannedPhrases_; + } else { + result.bannedPhrases_ = bannedPhrasesBuilder_.build(); + } + } + + private void buildPartial0( + com.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.modelArmorConfig_ = + modelArmorConfigBuilder_ == null + ? modelArmorConfig_ + : modelArmorConfigBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy) { + return mergeFrom( + (com.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy other) { + if (other + == com.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy + .getDefaultInstance()) return this; + if (bannedPhrasesBuilder_ == null) { + if (!other.bannedPhrases_.isEmpty()) { + if (bannedPhrases_.isEmpty()) { + bannedPhrases_ = other.bannedPhrases_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureBannedPhrasesIsMutable(); + bannedPhrases_.addAll(other.bannedPhrases_); + } + onChanged(); + } + } else { + if (!other.bannedPhrases_.isEmpty()) { + if (bannedPhrasesBuilder_.isEmpty()) { + bannedPhrasesBuilder_.dispose(); + bannedPhrasesBuilder_ = null; + bannedPhrases_ = other.bannedPhrases_; + bitField0_ = (bitField0_ & ~0x00000001); + bannedPhrasesBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetBannedPhrasesFieldBuilder() + : null; + } else { + bannedPhrasesBuilder_.addAllMessages(other.bannedPhrases_); + } + } + } + if (other.hasModelArmorConfig()) { + mergeModelArmorConfig(other.getModelArmorConfig()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.BannedPhrase m = + input.readMessage( + com.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy + .BannedPhrase.parser(), + extensionRegistry); + if (bannedPhrasesBuilder_ == null) { + ensureBannedPhrasesIsMutable(); + bannedPhrases_.add(m); + } else { + bannedPhrasesBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + input.readMessage( + internalGetModelArmorConfigFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List< + com.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.BannedPhrase> + bannedPhrases_ = java.util.Collections.emptyList(); + + private void ensureBannedPhrasesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + bannedPhrases_ = + new java.util.ArrayList< + com.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.BannedPhrase>( + bannedPhrases_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.BannedPhrase, + com.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.BannedPhrase.Builder, + com.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy + .BannedPhraseOrBuilder> + bannedPhrasesBuilder_; + + /** + * + * + *
            +       * Optional. List of banned phrases.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.BannedPhrase banned_phrases = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List< + com.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.BannedPhrase> + getBannedPhrasesList() { + if (bannedPhrasesBuilder_ == null) { + return java.util.Collections.unmodifiableList(bannedPhrases_); + } else { + return bannedPhrasesBuilder_.getMessageList(); + } + } + + /** + * + * + *
            +       * Optional. List of banned phrases.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.BannedPhrase banned_phrases = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public int getBannedPhrasesCount() { + if (bannedPhrasesBuilder_ == null) { + return bannedPhrases_.size(); + } else { + return bannedPhrasesBuilder_.getCount(); + } + } + + /** + * + * + *
            +       * Optional. List of banned phrases.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.BannedPhrase banned_phrases = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.BannedPhrase + getBannedPhrases(int index) { + if (bannedPhrasesBuilder_ == null) { + return bannedPhrases_.get(index); + } else { + return bannedPhrasesBuilder_.getMessage(index); + } + } + + /** + * + * + *
            +       * Optional. List of banned phrases.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.BannedPhrase banned_phrases = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setBannedPhrases( + int index, + com.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.BannedPhrase value) { + if (bannedPhrasesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBannedPhrasesIsMutable(); + bannedPhrases_.set(index, value); + onChanged(); + } else { + bannedPhrasesBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
            +       * Optional. List of banned phrases.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.BannedPhrase banned_phrases = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setBannedPhrases( + int index, + com.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.BannedPhrase.Builder + builderForValue) { + if (bannedPhrasesBuilder_ == null) { + ensureBannedPhrasesIsMutable(); + bannedPhrases_.set(index, builderForValue.build()); + onChanged(); + } else { + bannedPhrasesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
            +       * Optional. List of banned phrases.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.BannedPhrase banned_phrases = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addBannedPhrases( + com.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.BannedPhrase value) { + if (bannedPhrasesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBannedPhrasesIsMutable(); + bannedPhrases_.add(value); + onChanged(); + } else { + bannedPhrasesBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
            +       * Optional. List of banned phrases.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.BannedPhrase banned_phrases = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addBannedPhrases( + int index, + com.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.BannedPhrase value) { + if (bannedPhrasesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBannedPhrasesIsMutable(); + bannedPhrases_.add(index, value); + onChanged(); + } else { + bannedPhrasesBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
            +       * Optional. List of banned phrases.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.BannedPhrase banned_phrases = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addBannedPhrases( + com.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.BannedPhrase.Builder + builderForValue) { + if (bannedPhrasesBuilder_ == null) { + ensureBannedPhrasesIsMutable(); + bannedPhrases_.add(builderForValue.build()); + onChanged(); + } else { + bannedPhrasesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
            +       * Optional. List of banned phrases.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.BannedPhrase banned_phrases = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addBannedPhrases( + int index, + com.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.BannedPhrase.Builder + builderForValue) { + if (bannedPhrasesBuilder_ == null) { + ensureBannedPhrasesIsMutable(); + bannedPhrases_.add(index, builderForValue.build()); + onChanged(); + } else { + bannedPhrasesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
            +       * Optional. List of banned phrases.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.BannedPhrase banned_phrases = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addAllBannedPhrases( + java.lang.Iterable< + ? extends + com.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.BannedPhrase> + values) { + if (bannedPhrasesBuilder_ == null) { + ensureBannedPhrasesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, bannedPhrases_); + onChanged(); + } else { + bannedPhrasesBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
            +       * Optional. List of banned phrases.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.BannedPhrase banned_phrases = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearBannedPhrases() { + if (bannedPhrasesBuilder_ == null) { + bannedPhrases_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + bannedPhrasesBuilder_.clear(); + } + return this; + } + + /** + * + * + *
            +       * Optional. List of banned phrases.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.BannedPhrase banned_phrases = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder removeBannedPhrases(int index) { + if (bannedPhrasesBuilder_ == null) { + ensureBannedPhrasesIsMutable(); + bannedPhrases_.remove(index); + onChanged(); + } else { + bannedPhrasesBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
            +       * Optional. List of banned phrases.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.BannedPhrase banned_phrases = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.BannedPhrase.Builder + getBannedPhrasesBuilder(int index) { + return internalGetBannedPhrasesFieldBuilder().getBuilder(index); + } + + /** + * + * + *
            +       * Optional. List of banned phrases.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.BannedPhrase banned_phrases = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.BannedPhraseOrBuilder + getBannedPhrasesOrBuilder(int index) { + if (bannedPhrasesBuilder_ == null) { + return bannedPhrases_.get(index); + } else { + return bannedPhrasesBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
            +       * Optional. List of banned phrases.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.BannedPhrase banned_phrases = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List< + ? extends + com.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy + .BannedPhraseOrBuilder> + getBannedPhrasesOrBuilderList() { + if (bannedPhrasesBuilder_ != null) { + return bannedPhrasesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(bannedPhrases_); + } + } + + /** + * + * + *
            +       * Optional. List of banned phrases.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.BannedPhrase banned_phrases = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.BannedPhrase.Builder + addBannedPhrasesBuilder() { + return internalGetBannedPhrasesFieldBuilder() + .addBuilder( + com.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.BannedPhrase + .getDefaultInstance()); + } + + /** + * + * + *
            +       * Optional. List of banned phrases.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.BannedPhrase banned_phrases = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.BannedPhrase.Builder + addBannedPhrasesBuilder(int index) { + return internalGetBannedPhrasesFieldBuilder() + .addBuilder( + index, + com.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.BannedPhrase + .getDefaultInstance()); + } + + /** + * + * + *
            +       * Optional. List of banned phrases.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.BannedPhrase banned_phrases = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List< + com.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.BannedPhrase.Builder> + getBannedPhrasesBuilderList() { + return internalGetBannedPhrasesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.BannedPhrase, + com.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.BannedPhrase.Builder, + com.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy + .BannedPhraseOrBuilder> + internalGetBannedPhrasesFieldBuilder() { + if (bannedPhrasesBuilder_ == null) { + bannedPhrasesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.BannedPhrase, + com.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.BannedPhrase + .Builder, + com.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy + .BannedPhraseOrBuilder>( + bannedPhrases_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + bannedPhrases_ = null; + } + return bannedPhrasesBuilder_; + } + + private com.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.ModelArmorConfig + modelArmorConfig_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.ModelArmorConfig, + com.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.ModelArmorConfig + .Builder, + com.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy + .ModelArmorConfigOrBuilder> + modelArmorConfigBuilder_; + + /** + * + * + *
            +       * Optional. Model Armor configuration to be used for sanitizing user
            +       * prompts and assistant responses.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.ModelArmorConfig model_armor_config = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the modelArmorConfig field is set. + */ + public boolean hasModelArmorConfig() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
            +       * Optional. Model Armor configuration to be used for sanitizing user
            +       * prompts and assistant responses.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.ModelArmorConfig model_armor_config = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The modelArmorConfig. + */ + public com.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.ModelArmorConfig + getModelArmorConfig() { + if (modelArmorConfigBuilder_ == null) { + return modelArmorConfig_ == null + ? com.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.ModelArmorConfig + .getDefaultInstance() + : modelArmorConfig_; + } else { + return modelArmorConfigBuilder_.getMessage(); + } + } + + /** + * + * + *
            +       * Optional. Model Armor configuration to be used for sanitizing user
            +       * prompts and assistant responses.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.ModelArmorConfig model_armor_config = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setModelArmorConfig( + com.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.ModelArmorConfig value) { + if (modelArmorConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + modelArmorConfig_ = value; + } else { + modelArmorConfigBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
            +       * Optional. Model Armor configuration to be used for sanitizing user
            +       * prompts and assistant responses.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.ModelArmorConfig model_armor_config = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setModelArmorConfig( + com.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.ModelArmorConfig.Builder + builderForValue) { + if (modelArmorConfigBuilder_ == null) { + modelArmorConfig_ = builderForValue.build(); + } else { + modelArmorConfigBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
            +       * Optional. Model Armor configuration to be used for sanitizing user
            +       * prompts and assistant responses.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.ModelArmorConfig model_armor_config = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeModelArmorConfig( + com.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.ModelArmorConfig value) { + if (modelArmorConfigBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && modelArmorConfig_ != null + && modelArmorConfig_ + != com.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy + .ModelArmorConfig.getDefaultInstance()) { + getModelArmorConfigBuilder().mergeFrom(value); + } else { + modelArmorConfig_ = value; + } + } else { + modelArmorConfigBuilder_.mergeFrom(value); + } + if (modelArmorConfig_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** + * + * + *
            +       * Optional. Model Armor configuration to be used for sanitizing user
            +       * prompts and assistant responses.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.ModelArmorConfig model_armor_config = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearModelArmorConfig() { + bitField0_ = (bitField0_ & ~0x00000002); + modelArmorConfig_ = null; + if (modelArmorConfigBuilder_ != null) { + modelArmorConfigBuilder_.dispose(); + modelArmorConfigBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
            +       * Optional. Model Armor configuration to be used for sanitizing user
            +       * prompts and assistant responses.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.ModelArmorConfig model_armor_config = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.ModelArmorConfig + .Builder + getModelArmorConfigBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return internalGetModelArmorConfigFieldBuilder().getBuilder(); + } + + /** + * + * + *
            +       * Optional. Model Armor configuration to be used for sanitizing user
            +       * prompts and assistant responses.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.ModelArmorConfig model_armor_config = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy + .ModelArmorConfigOrBuilder + getModelArmorConfigOrBuilder() { + if (modelArmorConfigBuilder_ != null) { + return modelArmorConfigBuilder_.getMessageOrBuilder(); + } else { + return modelArmorConfig_ == null + ? com.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.ModelArmorConfig + .getDefaultInstance() + : modelArmorConfig_; + } + } + + /** + * + * + *
            +       * Optional. Model Armor configuration to be used for sanitizing user
            +       * prompts and assistant responses.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.ModelArmorConfig model_armor_config = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.ModelArmorConfig, + com.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.ModelArmorConfig + .Builder, + com.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy + .ModelArmorConfigOrBuilder> + internalGetModelArmorConfigFieldBuilder() { + if (modelArmorConfigBuilder_ == null) { + modelArmorConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.ModelArmorConfig, + com.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.ModelArmorConfig + .Builder, + com.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy + .ModelArmorConfigOrBuilder>( + getModelArmorConfig(), getParentForChildren(), isClean()); + modelArmorConfig_ = null; + } + return modelArmorConfigBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy) + private static final com.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy(); + } + + public static com.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CustomerPolicy parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int bitField0_; + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
            +   * Immutable. Resource name of the assistant.
            +   * Format:
            +   * `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/assistants/{assistant}`
            +   *
            +   * It must be a UTF-8 encoded string with a length limit of 1024 characters.
            +   * 
            + * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + 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(); + name_ = s; + return s; + } + } + + /** + * + * + *
            +   * Immutable. Resource name of the assistant.
            +   * Format:
            +   * `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/assistants/{assistant}`
            +   *
            +   * It must be a UTF-8 encoded string with a length limit of 1024 characters.
            +   * 
            + * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DISPLAY_NAME_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object displayName_ = ""; + + /** + * + * + *
            +   * Required. The assistant display name.
            +   *
            +   * It must be a UTF-8 encoded string with a length limit of 128 characters.
            +   * 
            + * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The displayName. + */ + @java.lang.Override + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + 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(); + displayName_ = s; + return s; + } + } + + /** + * + * + *
            +   * Required. The assistant display name.
            +   *
            +   * It must be a UTF-8 encoded string with a length limit of 128 characters.
            +   * 
            + * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for displayName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DESCRIPTION_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object description_ = ""; + + /** + * + * + *
            +   * Optional. Description for additional information. Expected to be shown on
            +   * the configuration UI, not to the users of the assistant.
            +   * 
            + * + * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + java.lang.Object ref = description_; + 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(); + description_ = s; + return s; + } + } + + /** + * + * + *
            +   * Optional. Description for additional information. Expected to be shown on
            +   * the configuration UI, not to the users of the assistant.
            +   * 
            + * + * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int GENERATION_CONFIG_FIELD_NUMBER = 19; + private com.google.cloud.discoveryengine.v1beta.Assistant.GenerationConfig generationConfig_; + + /** + * + * + *
            +   * Optional. Configuration for the generation of the assistant response.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Assistant.GenerationConfig generation_config = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the generationConfig field is set. + */ + @java.lang.Override + public boolean hasGenerationConfig() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
            +   * Optional. Configuration for the generation of the assistant response.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Assistant.GenerationConfig generation_config = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The generationConfig. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Assistant.GenerationConfig getGenerationConfig() { + return generationConfig_ == null + ? com.google.cloud.discoveryengine.v1beta.Assistant.GenerationConfig.getDefaultInstance() + : generationConfig_; + } + + /** + * + * + *
            +   * Optional. Configuration for the generation of the assistant response.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Assistant.GenerationConfig generation_config = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Assistant.GenerationConfigOrBuilder + getGenerationConfigOrBuilder() { + return generationConfig_ == null + ? com.google.cloud.discoveryengine.v1beta.Assistant.GenerationConfig.getDefaultInstance() + : generationConfig_; + } + + public static final int WEB_GROUNDING_TYPE_FIELD_NUMBER = 4; + private int webGroundingType_ = 0; + + /** + * + * + *
            +   * Optional. The type of web grounding to use.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Assistant.WebGroundingType web_grounding_type = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for webGroundingType. + */ + @java.lang.Override + public int getWebGroundingTypeValue() { + return webGroundingType_; + } + + /** + * + * + *
            +   * Optional. The type of web grounding to use.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Assistant.WebGroundingType web_grounding_type = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The webGroundingType. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Assistant.WebGroundingType getWebGroundingType() { + com.google.cloud.discoveryengine.v1beta.Assistant.WebGroundingType result = + com.google.cloud.discoveryengine.v1beta.Assistant.WebGroundingType.forNumber( + webGroundingType_); + return result == null + ? com.google.cloud.discoveryengine.v1beta.Assistant.WebGroundingType.UNRECOGNIZED + : result; + } + + public static final int DEFAULT_WEB_GROUNDING_TOGGLE_OFF_FIELD_NUMBER = 22; + private boolean defaultWebGroundingToggleOff_ = false; + + /** + * + * + *
            +   * Optional. This field controls the default web grounding toggle for end
            +   * users if `web_grounding_type` is set to `WEB_GROUNDING_TYPE_GOOGLE_SEARCH`
            +   * or `WEB_GROUNDING_TYPE_ENTERPRISE_WEB_SEARCH`. By default, this field is
            +   * set to false. If `web_grounding_type` is `WEB_GROUNDING_TYPE_GOOGLE_SEARCH`
            +   * or `WEB_GROUNDING_TYPE_ENTERPRISE_WEB_SEARCH`, end users will have web
            +   * grounding enabled by default on UI. If true, grounding toggle will be
            +   * disabled by default on UI. End users can still enable web grounding in
            +   * the UI if web grounding is enabled.
            +   * 
            + * + * bool default_web_grounding_toggle_off = 22 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The defaultWebGroundingToggleOff. + */ + @java.lang.Override + public boolean getDefaultWebGroundingToggleOff() { + return defaultWebGroundingToggleOff_; + } + + public static final int ENABLED_TOOLS_FIELD_NUMBER = 18; + + private static final class EnabledToolsDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, com.google.cloud.discoveryengine.v1beta.Assistant.ToolList> + defaultEntry = + com.google.protobuf.MapEntry + . + newDefaultInstance( + com.google.cloud.discoveryengine.v1beta.AssistantProto + .internal_static_google_cloud_discoveryengine_v1beta_Assistant_EnabledToolsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.MESSAGE, + com.google.cloud.discoveryengine.v1beta.Assistant.ToolList + .getDefaultInstance()); + } + + @SuppressWarnings("serial") + private com.google.protobuf.MapField< + java.lang.String, com.google.cloud.discoveryengine.v1beta.Assistant.ToolList> + enabledTools_; + + private com.google.protobuf.MapField< + java.lang.String, com.google.cloud.discoveryengine.v1beta.Assistant.ToolList> + internalGetEnabledTools() { + if (enabledTools_ == null) { + return com.google.protobuf.MapField.emptyMapField( + EnabledToolsDefaultEntryHolder.defaultEntry); + } + return enabledTools_; + } + + public int getEnabledToolsCount() { + return internalGetEnabledTools().getMap().size(); + } + + /** + * + * + *
            +   * Optional. Note: not implemented yet. Use
            +   * [enabled_actions][google.cloud.discoveryengine.v1beta.Assistant.enabled_actions]
            +   * instead. The enabled tools on this assistant. The keys are connector name,
            +   * for example
            +   * "projects/{projectId}/locations/{locationId}/collections/{collectionId}/dataconnector
            +   * The values consist of admin enabled tools towards the connector
            +   * instance. Admin can selectively enable multiple tools on any of the
            +   * connector instances that they created in the project. For example
            +   * {"jira1ConnectorName": [(toolId1, "createTicket"), (toolId2,
            +   * "transferTicket")],
            +   * "gmail1ConnectorName": [(toolId3, "sendEmail"),..] }
            +   * 
            + * + * + * map<string, .google.cloud.discoveryengine.v1beta.Assistant.ToolList> enabled_tools = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public boolean containsEnabledTools(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetEnabledTools().getMap().containsKey(key); + } + + /** Use {@link #getEnabledToolsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map + getEnabledTools() { + return getEnabledToolsMap(); + } + + /** + * + * + *
            +   * Optional. Note: not implemented yet. Use
            +   * [enabled_actions][google.cloud.discoveryengine.v1beta.Assistant.enabled_actions]
            +   * instead. The enabled tools on this assistant. The keys are connector name,
            +   * for example
            +   * "projects/{projectId}/locations/{locationId}/collections/{collectionId}/dataconnector
            +   * The values consist of admin enabled tools towards the connector
            +   * instance. Admin can selectively enable multiple tools on any of the
            +   * connector instances that they created in the project. For example
            +   * {"jira1ConnectorName": [(toolId1, "createTicket"), (toolId2,
            +   * "transferTicket")],
            +   * "gmail1ConnectorName": [(toolId3, "sendEmail"),..] }
            +   * 
            + * + * + * map<string, .google.cloud.discoveryengine.v1beta.Assistant.ToolList> enabled_tools = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.Map + getEnabledToolsMap() { + return internalGetEnabledTools().getMap(); + } + + /** + * + * + *
            +   * Optional. Note: not implemented yet. Use
            +   * [enabled_actions][google.cloud.discoveryengine.v1beta.Assistant.enabled_actions]
            +   * instead. The enabled tools on this assistant. The keys are connector name,
            +   * for example
            +   * "projects/{projectId}/locations/{locationId}/collections/{collectionId}/dataconnector
            +   * The values consist of admin enabled tools towards the connector
            +   * instance. Admin can selectively enable multiple tools on any of the
            +   * connector instances that they created in the project. For example
            +   * {"jira1ConnectorName": [(toolId1, "createTicket"), (toolId2,
            +   * "transferTicket")],
            +   * "gmail1ConnectorName": [(toolId3, "sendEmail"),..] }
            +   * 
            + * + * + * map<string, .google.cloud.discoveryengine.v1beta.Assistant.ToolList> enabled_tools = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public /* nullable */ com.google.cloud.discoveryengine.v1beta.Assistant.ToolList + getEnabledToolsOrDefault( + java.lang.String key, + /* nullable */ + com.google.cloud.discoveryengine.v1beta.Assistant.ToolList defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map + map = internalGetEnabledTools().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + + /** + * + * + *
            +   * Optional. Note: not implemented yet. Use
            +   * [enabled_actions][google.cloud.discoveryengine.v1beta.Assistant.enabled_actions]
            +   * instead. The enabled tools on this assistant. The keys are connector name,
            +   * for example
            +   * "projects/{projectId}/locations/{locationId}/collections/{collectionId}/dataconnector
            +   * The values consist of admin enabled tools towards the connector
            +   * instance. Admin can selectively enable multiple tools on any of the
            +   * connector instances that they created in the project. For example
            +   * {"jira1ConnectorName": [(toolId1, "createTicket"), (toolId2,
            +   * "transferTicket")],
            +   * "gmail1ConnectorName": [(toolId3, "sendEmail"),..] }
            +   * 
            + * + * + * map<string, .google.cloud.discoveryengine.v1beta.Assistant.ToolList> enabled_tools = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Assistant.ToolList getEnabledToolsOrThrow( + java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map + map = internalGetEnabledTools().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int CUSTOMER_POLICY_FIELD_NUMBER = 12; + private com.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy customerPolicy_; + + /** + * + * + *
            +   * Optional. Customer policy for the assistant.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy customer_policy = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the customerPolicy field is set. + */ + @java.lang.Override + public boolean hasCustomerPolicy() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
            +   * Optional. Customer policy for the assistant.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy customer_policy = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The customerPolicy. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy getCustomerPolicy() { + return customerPolicy_ == null + ? com.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.getDefaultInstance() + : customerPolicy_; + } + + /** + * + * + *
            +   * Optional. Customer policy for the assistant.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy customer_policy = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicyOrBuilder + getCustomerPolicyOrBuilder() { + return customerPolicy_ == null + ? com.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.getDefaultInstance() + : customerPolicy_; + } + + public static final int CREATE_TIME_FIELD_NUMBER = 24; + private com.google.protobuf.Timestamp createTime_; + + /** + * + * + *
            +   * Output only. Represents the time when this Assistant was created.
            +   * 
            + * + * .google.protobuf.Timestamp create_time = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
            +   * Output only. Represents the time when this Assistant was created.
            +   * 
            + * + * .google.protobuf.Timestamp create_time = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + /** + * + * + *
            +   * Output only. Represents the time when this Assistant was created.
            +   * 
            + * + * .google.protobuf.Timestamp create_time = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 25; + private com.google.protobuf.Timestamp updateTime_; + + /** + * + * + *
            +   * Output only. Represents the time when this Assistant was most recently
            +   * updated.
            +   * 
            + * + * .google.protobuf.Timestamp update_time = 25 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000008) != 0); + } + + /** + * + * + *
            +   * Output only. Represents the time when this Assistant was most recently
            +   * updated.
            +   * 
            + * + * .google.protobuf.Timestamp update_time = 25 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + /** + * + * + *
            +   * Output only. Represents the time when this Assistant was most recently
            +   * updated.
            +   * 
            + * + * .google.protobuf.Timestamp update_time = 25 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + 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(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(displayName_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, displayName_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(description_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, description_); + } + if (webGroundingType_ + != com.google.cloud.discoveryengine.v1beta.Assistant.WebGroundingType + .WEB_GROUNDING_TYPE_UNSPECIFIED + .getNumber()) { + output.writeEnum(4, webGroundingType_); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(12, getCustomerPolicy()); + } + com.google.protobuf.GeneratedMessage.serializeStringMapTo( + output, internalGetEnabledTools(), EnabledToolsDefaultEntryHolder.defaultEntry, 18); + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(19, getGenerationConfig()); + } + if (defaultWebGroundingToggleOff_ != false) { + output.writeBool(22, defaultWebGroundingToggleOff_); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeMessage(24, getCreateTime()); + } + if (((bitField0_ & 0x00000008) != 0)) { + output.writeMessage(25, getUpdateTime()); + } + 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(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(displayName_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, displayName_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(description_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, description_); + } + if (webGroundingType_ + != com.google.cloud.discoveryengine.v1beta.Assistant.WebGroundingType + .WEB_GROUNDING_TYPE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(4, webGroundingType_); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(12, getCustomerPolicy()); + } + for (java.util.Map.Entry< + java.lang.String, com.google.cloud.discoveryengine.v1beta.Assistant.ToolList> + entry : internalGetEnabledTools().getMap().entrySet()) { + com.google.protobuf.MapEntry< + java.lang.String, com.google.cloud.discoveryengine.v1beta.Assistant.ToolList> + enabledTools__ = + EnabledToolsDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(18, enabledTools__); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(19, getGenerationConfig()); + } + if (defaultWebGroundingToggleOff_ != false) { + size += + com.google.protobuf.CodedOutputStream.computeBoolSize(22, defaultWebGroundingToggleOff_); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(24, getCreateTime()); + } + if (((bitField0_ & 0x00000008) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(25, getUpdateTime()); + } + 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.discoveryengine.v1beta.Assistant)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1beta.Assistant other = + (com.google.cloud.discoveryengine.v1beta.Assistant) obj; + + if (!getName().equals(other.getName())) return false; + if (!getDisplayName().equals(other.getDisplayName())) return false; + if (!getDescription().equals(other.getDescription())) return false; + if (hasGenerationConfig() != other.hasGenerationConfig()) return false; + if (hasGenerationConfig()) { + if (!getGenerationConfig().equals(other.getGenerationConfig())) return false; + } + if (webGroundingType_ != other.webGroundingType_) return false; + if (getDefaultWebGroundingToggleOff() != other.getDefaultWebGroundingToggleOff()) return false; + if (!internalGetEnabledTools().equals(other.internalGetEnabledTools())) return false; + if (hasCustomerPolicy() != other.hasCustomerPolicy()) return false; + if (hasCustomerPolicy()) { + if (!getCustomerPolicy().equals(other.getCustomerPolicy())) return false; + } + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime().equals(other.getUpdateTime())) 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) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + if (hasGenerationConfig()) { + hash = (37 * hash) + GENERATION_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getGenerationConfig().hashCode(); + } + hash = (37 * hash) + WEB_GROUNDING_TYPE_FIELD_NUMBER; + hash = (53 * hash) + webGroundingType_; + hash = (37 * hash) + DEFAULT_WEB_GROUNDING_TOGGLE_OFF_FIELD_NUMBER; + hash = + (53 * hash) + com.google.protobuf.Internal.hashBoolean(getDefaultWebGroundingToggleOff()); + if (!internalGetEnabledTools().getMap().isEmpty()) { + hash = (37 * hash) + ENABLED_TOOLS_FIELD_NUMBER; + hash = (53 * hash) + internalGetEnabledTools().hashCode(); + } + if (hasCustomerPolicy()) { + hash = (37 * hash) + CUSTOMER_POLICY_FIELD_NUMBER; + hash = (53 * hash) + getCustomerPolicy().hashCode(); + } + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1beta.Assistant parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.Assistant 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.discoveryengine.v1beta.Assistant parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.Assistant 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.discoveryengine.v1beta.Assistant parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.Assistant parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1beta.Assistant parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.Assistant 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.discoveryengine.v1beta.Assistant parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.Assistant 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.discoveryengine.v1beta.Assistant parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.Assistant 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.discoveryengine.v1beta.Assistant 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; + } + + /** + * + * + *
            +   * Discovery Engine Assistant resource.
            +   * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.Assistant} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.Assistant) + com.google.cloud.discoveryengine.v1beta.AssistantOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.AssistantProto + .internal_static_google_cloud_discoveryengine_v1beta_Assistant_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 18: + return internalGetEnabledTools(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( + int number) { + switch (number) { + case 18: + return internalGetMutableEnabledTools(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.AssistantProto + .internal_static_google_cloud_discoveryengine_v1beta_Assistant_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.Assistant.class, + com.google.cloud.discoveryengine.v1beta.Assistant.Builder.class); + } + + // Construct using com.google.cloud.discoveryengine.v1beta.Assistant.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetGenerationConfigFieldBuilder(); + internalGetCustomerPolicyFieldBuilder(); + internalGetCreateTimeFieldBuilder(); + internalGetUpdateTimeFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + displayName_ = ""; + description_ = ""; + generationConfig_ = null; + if (generationConfigBuilder_ != null) { + generationConfigBuilder_.dispose(); + generationConfigBuilder_ = null; + } + webGroundingType_ = 0; + defaultWebGroundingToggleOff_ = false; + internalGetMutableEnabledTools().clear(); + customerPolicy_ = null; + if (customerPolicyBuilder_ != null) { + customerPolicyBuilder_.dispose(); + customerPolicyBuilder_ = null; + } + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1beta.AssistantProto + .internal_static_google_cloud_discoveryengine_v1beta_Assistant_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Assistant getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1beta.Assistant.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Assistant build() { + com.google.cloud.discoveryengine.v1beta.Assistant result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Assistant buildPartial() { + com.google.cloud.discoveryengine.v1beta.Assistant result = + new com.google.cloud.discoveryengine.v1beta.Assistant(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.discoveryengine.v1beta.Assistant result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.displayName_ = displayName_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.description_ = description_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000008) != 0)) { + result.generationConfig_ = + generationConfigBuilder_ == null ? generationConfig_ : generationConfigBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.webGroundingType_ = webGroundingType_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.defaultWebGroundingToggleOff_ = defaultWebGroundingToggleOff_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.enabledTools_ = + internalGetEnabledTools().build(EnabledToolsDefaultEntryHolder.defaultEntry); + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.customerPolicy_ = + customerPolicyBuilder_ == null ? customerPolicy_ : customerPolicyBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); + to_bitField0_ |= 0x00000004; + } + if (((from_bitField0_ & 0x00000200) != 0)) { + result.updateTime_ = updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build(); + to_bitField0_ |= 0x00000008; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.discoveryengine.v1beta.Assistant) { + return mergeFrom((com.google.cloud.discoveryengine.v1beta.Assistant) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.discoveryengine.v1beta.Assistant other) { + if (other == com.google.cloud.discoveryengine.v1beta.Assistant.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (other.hasGenerationConfig()) { + mergeGenerationConfig(other.getGenerationConfig()); + } + if (other.webGroundingType_ != 0) { + setWebGroundingTypeValue(other.getWebGroundingTypeValue()); + } + if (other.getDefaultWebGroundingToggleOff() != false) { + setDefaultWebGroundingToggleOff(other.getDefaultWebGroundingToggleOff()); + } + internalGetMutableEnabledTools().mergeFrom(other.internalGetEnabledTools()); + bitField0_ |= 0x00000040; + if (other.hasCustomerPolicy()) { + mergeCustomerPolicy(other.getCustomerPolicy()); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + displayName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 32: + { + webGroundingType_ = input.readEnum(); + bitField0_ |= 0x00000010; + break; + } // case 32 + case 98: + { + input.readMessage( + internalGetCustomerPolicyFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000080; + break; + } // case 98 + case 146: + { + com.google.protobuf.MapEntry< + java.lang.String, + com.google.cloud.discoveryengine.v1beta.Assistant.ToolList> + enabledTools__ = + input.readMessage( + EnabledToolsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableEnabledTools() + .ensureBuilderMap() + .put(enabledTools__.getKey(), enabledTools__.getValue()); + bitField0_ |= 0x00000040; + break; + } // case 146 + case 154: + { + input.readMessage( + internalGetGenerationConfigFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 154 + case 176: + { + defaultWebGroundingToggleOff_ = input.readBool(); + bitField0_ |= 0x00000020; + break; + } // case 176 + case 194: + { + input.readMessage( + internalGetCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000100; + break; + } // case 194 + case 202: + { + input.readMessage( + internalGetUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000200; + break; + } // case 202 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + + /** + * + * + *
            +     * Immutable. Resource name of the assistant.
            +     * Format:
            +     * `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/assistants/{assistant}`
            +     *
            +     * It must be a UTF-8 encoded string with a length limit of 1024 characters.
            +     * 
            + * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
            +     * Immutable. Resource name of the assistant.
            +     * Format:
            +     * `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/assistants/{assistant}`
            +     *
            +     * It must be a UTF-8 encoded string with a length limit of 1024 characters.
            +     * 
            + * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
            +     * Immutable. Resource name of the assistant.
            +     * Format:
            +     * `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/assistants/{assistant}`
            +     *
            +     * It must be a UTF-8 encoded string with a length limit of 1024 characters.
            +     * 
            + * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Immutable. Resource name of the assistant.
            +     * Format:
            +     * `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/assistants/{assistant}`
            +     *
            +     * It must be a UTF-8 encoded string with a length limit of 1024 characters.
            +     * 
            + * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
            +     * Immutable. Resource name of the assistant.
            +     * Format:
            +     * `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/assistants/{assistant}`
            +     *
            +     * It must be a UTF-8 encoded string with a length limit of 1024 characters.
            +     * 
            + * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object displayName_ = ""; + + /** + * + * + *
            +     * Required. The assistant display name.
            +     *
            +     * It must be a UTF-8 encoded string with a length limit of 128 characters.
            +     * 
            + * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The displayName. + */ + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
            +     * Required. The assistant display name.
            +     *
            +     * It must be a UTF-8 encoded string with a length limit of 128 characters.
            +     * 
            + * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for displayName. + */ + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
            +     * Required. The assistant display name.
            +     *
            +     * It must be a UTF-8 encoded string with a length limit of 128 characters.
            +     * 
            + * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + displayName_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Required. The assistant display name.
            +     *
            +     * It must be a UTF-8 encoded string with a length limit of 128 characters.
            +     * 
            + * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + displayName_ = getDefaultInstance().getDisplayName(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
            +     * Required. The assistant display name.
            +     *
            +     * It must be a UTF-8 encoded string with a length limit of 128 characters.
            +     * 
            + * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + displayName_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object description_ = ""; + + /** + * + * + *
            +     * Optional. Description for additional information. Expected to be shown on
            +     * the configuration UI, not to the users of the assistant.
            +     * 
            + * + * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The description. + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
            +     * Optional. Description for additional information. Expected to be shown on
            +     * the configuration UI, not to the users of the assistant.
            +     * 
            + * + * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for description. + */ + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
            +     * Optional. Description for additional information. Expected to be shown on
            +     * the configuration UI, not to the users of the assistant.
            +     * 
            + * + * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + description_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Optional. Description for additional information. Expected to be shown on
            +     * the configuration UI, not to the users of the assistant.
            +     * 
            + * + * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearDescription() { + description_ = getDefaultInstance().getDescription(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
            +     * Optional. Description for additional information. Expected to be shown on
            +     * the configuration UI, not to the users of the assistant.
            +     * 
            + * + * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + description_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private com.google.cloud.discoveryengine.v1beta.Assistant.GenerationConfig generationConfig_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.Assistant.GenerationConfig, + com.google.cloud.discoveryengine.v1beta.Assistant.GenerationConfig.Builder, + com.google.cloud.discoveryengine.v1beta.Assistant.GenerationConfigOrBuilder> + generationConfigBuilder_; + + /** + * + * + *
            +     * Optional. Configuration for the generation of the assistant response.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Assistant.GenerationConfig generation_config = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the generationConfig field is set. + */ + public boolean hasGenerationConfig() { + return ((bitField0_ & 0x00000008) != 0); + } + + /** + * + * + *
            +     * Optional. Configuration for the generation of the assistant response.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Assistant.GenerationConfig generation_config = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The generationConfig. + */ + public com.google.cloud.discoveryengine.v1beta.Assistant.GenerationConfig + getGenerationConfig() { + if (generationConfigBuilder_ == null) { + return generationConfig_ == null + ? com.google.cloud.discoveryengine.v1beta.Assistant.GenerationConfig + .getDefaultInstance() + : generationConfig_; + } else { + return generationConfigBuilder_.getMessage(); + } + } + + /** + * + * + *
            +     * Optional. Configuration for the generation of the assistant response.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Assistant.GenerationConfig generation_config = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setGenerationConfig( + com.google.cloud.discoveryengine.v1beta.Assistant.GenerationConfig value) { + if (generationConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + generationConfig_ = value; + } else { + generationConfigBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Optional. Configuration for the generation of the assistant response.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Assistant.GenerationConfig generation_config = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setGenerationConfig( + com.google.cloud.discoveryengine.v1beta.Assistant.GenerationConfig.Builder + builderForValue) { + if (generationConfigBuilder_ == null) { + generationConfig_ = builderForValue.build(); + } else { + generationConfigBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Optional. Configuration for the generation of the assistant response.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Assistant.GenerationConfig generation_config = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeGenerationConfig( + com.google.cloud.discoveryengine.v1beta.Assistant.GenerationConfig value) { + if (generationConfigBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) + && generationConfig_ != null + && generationConfig_ + != com.google.cloud.discoveryengine.v1beta.Assistant.GenerationConfig + .getDefaultInstance()) { + getGenerationConfigBuilder().mergeFrom(value); + } else { + generationConfig_ = value; + } + } else { + generationConfigBuilder_.mergeFrom(value); + } + if (generationConfig_ != null) { + bitField0_ |= 0x00000008; + onChanged(); + } + return this; + } + + /** + * + * + *
            +     * Optional. Configuration for the generation of the assistant response.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Assistant.GenerationConfig generation_config = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearGenerationConfig() { + bitField0_ = (bitField0_ & ~0x00000008); + generationConfig_ = null; + if (generationConfigBuilder_ != null) { + generationConfigBuilder_.dispose(); + generationConfigBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
            +     * Optional. Configuration for the generation of the assistant response.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Assistant.GenerationConfig generation_config = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.discoveryengine.v1beta.Assistant.GenerationConfig.Builder + getGenerationConfigBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return internalGetGenerationConfigFieldBuilder().getBuilder(); + } + + /** + * + * + *
            +     * Optional. Configuration for the generation of the assistant response.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Assistant.GenerationConfig generation_config = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.discoveryengine.v1beta.Assistant.GenerationConfigOrBuilder + getGenerationConfigOrBuilder() { + if (generationConfigBuilder_ != null) { + return generationConfigBuilder_.getMessageOrBuilder(); + } else { + return generationConfig_ == null + ? com.google.cloud.discoveryengine.v1beta.Assistant.GenerationConfig + .getDefaultInstance() + : generationConfig_; + } + } + + /** + * + * + *
            +     * Optional. Configuration for the generation of the assistant response.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Assistant.GenerationConfig generation_config = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.Assistant.GenerationConfig, + com.google.cloud.discoveryengine.v1beta.Assistant.GenerationConfig.Builder, + com.google.cloud.discoveryengine.v1beta.Assistant.GenerationConfigOrBuilder> + internalGetGenerationConfigFieldBuilder() { + if (generationConfigBuilder_ == null) { + generationConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.Assistant.GenerationConfig, + com.google.cloud.discoveryengine.v1beta.Assistant.GenerationConfig.Builder, + com.google.cloud.discoveryengine.v1beta.Assistant.GenerationConfigOrBuilder>( + getGenerationConfig(), getParentForChildren(), isClean()); + generationConfig_ = null; + } + return generationConfigBuilder_; + } + + private int webGroundingType_ = 0; + + /** + * + * + *
            +     * Optional. The type of web grounding to use.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Assistant.WebGroundingType web_grounding_type = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for webGroundingType. + */ + @java.lang.Override + public int getWebGroundingTypeValue() { + return webGroundingType_; + } + + /** + * + * + *
            +     * Optional. The type of web grounding to use.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Assistant.WebGroundingType web_grounding_type = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The enum numeric value on the wire for webGroundingType to set. + * @return This builder for chaining. + */ + public Builder setWebGroundingTypeValue(int value) { + webGroundingType_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Optional. The type of web grounding to use.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Assistant.WebGroundingType web_grounding_type = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The webGroundingType. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Assistant.WebGroundingType + getWebGroundingType() { + com.google.cloud.discoveryengine.v1beta.Assistant.WebGroundingType result = + com.google.cloud.discoveryengine.v1beta.Assistant.WebGroundingType.forNumber( + webGroundingType_); + return result == null + ? com.google.cloud.discoveryengine.v1beta.Assistant.WebGroundingType.UNRECOGNIZED + : result; + } + + /** + * + * + *
            +     * Optional. The type of web grounding to use.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Assistant.WebGroundingType web_grounding_type = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The webGroundingType to set. + * @return This builder for chaining. + */ + public Builder setWebGroundingType( + com.google.cloud.discoveryengine.v1beta.Assistant.WebGroundingType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000010; + webGroundingType_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
            +     * Optional. The type of web grounding to use.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Assistant.WebGroundingType web_grounding_type = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearWebGroundingType() { + bitField0_ = (bitField0_ & ~0x00000010); + webGroundingType_ = 0; + onChanged(); + return this; + } + + private boolean defaultWebGroundingToggleOff_; + + /** + * + * + *
            +     * Optional. This field controls the default web grounding toggle for end
            +     * users if `web_grounding_type` is set to `WEB_GROUNDING_TYPE_GOOGLE_SEARCH`
            +     * or `WEB_GROUNDING_TYPE_ENTERPRISE_WEB_SEARCH`. By default, this field is
            +     * set to false. If `web_grounding_type` is `WEB_GROUNDING_TYPE_GOOGLE_SEARCH`
            +     * or `WEB_GROUNDING_TYPE_ENTERPRISE_WEB_SEARCH`, end users will have web
            +     * grounding enabled by default on UI. If true, grounding toggle will be
            +     * disabled by default on UI. End users can still enable web grounding in
            +     * the UI if web grounding is enabled.
            +     * 
            + * + * bool default_web_grounding_toggle_off = 22 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The defaultWebGroundingToggleOff. + */ + @java.lang.Override + public boolean getDefaultWebGroundingToggleOff() { + return defaultWebGroundingToggleOff_; + } + + /** + * + * + *
            +     * Optional. This field controls the default web grounding toggle for end
            +     * users if `web_grounding_type` is set to `WEB_GROUNDING_TYPE_GOOGLE_SEARCH`
            +     * or `WEB_GROUNDING_TYPE_ENTERPRISE_WEB_SEARCH`. By default, this field is
            +     * set to false. If `web_grounding_type` is `WEB_GROUNDING_TYPE_GOOGLE_SEARCH`
            +     * or `WEB_GROUNDING_TYPE_ENTERPRISE_WEB_SEARCH`, end users will have web
            +     * grounding enabled by default on UI. If true, grounding toggle will be
            +     * disabled by default on UI. End users can still enable web grounding in
            +     * the UI if web grounding is enabled.
            +     * 
            + * + * bool default_web_grounding_toggle_off = 22 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The defaultWebGroundingToggleOff to set. + * @return This builder for chaining. + */ + public Builder setDefaultWebGroundingToggleOff(boolean value) { + + defaultWebGroundingToggleOff_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Optional. This field controls the default web grounding toggle for end
            +     * users if `web_grounding_type` is set to `WEB_GROUNDING_TYPE_GOOGLE_SEARCH`
            +     * or `WEB_GROUNDING_TYPE_ENTERPRISE_WEB_SEARCH`. By default, this field is
            +     * set to false. If `web_grounding_type` is `WEB_GROUNDING_TYPE_GOOGLE_SEARCH`
            +     * or `WEB_GROUNDING_TYPE_ENTERPRISE_WEB_SEARCH`, end users will have web
            +     * grounding enabled by default on UI. If true, grounding toggle will be
            +     * disabled by default on UI. End users can still enable web grounding in
            +     * the UI if web grounding is enabled.
            +     * 
            + * + * bool default_web_grounding_toggle_off = 22 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearDefaultWebGroundingToggleOff() { + bitField0_ = (bitField0_ & ~0x00000020); + defaultWebGroundingToggleOff_ = false; + onChanged(); + return this; + } + + private static final class EnabledToolsConverter + implements com.google.protobuf.MapFieldBuilder.Converter< + java.lang.String, + com.google.cloud.discoveryengine.v1beta.Assistant.ToolListOrBuilder, + com.google.cloud.discoveryengine.v1beta.Assistant.ToolList> { + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Assistant.ToolList build( + com.google.cloud.discoveryengine.v1beta.Assistant.ToolListOrBuilder val) { + if (val instanceof com.google.cloud.discoveryengine.v1beta.Assistant.ToolList) { + return (com.google.cloud.discoveryengine.v1beta.Assistant.ToolList) val; + } + return ((com.google.cloud.discoveryengine.v1beta.Assistant.ToolList.Builder) val).build(); + } + + @java.lang.Override + public com.google.protobuf.MapEntry< + java.lang.String, com.google.cloud.discoveryengine.v1beta.Assistant.ToolList> + defaultEntry() { + return EnabledToolsDefaultEntryHolder.defaultEntry; + } + } + ; + + private static final EnabledToolsConverter enabledToolsConverter = new EnabledToolsConverter(); + + private com.google.protobuf.MapFieldBuilder< + java.lang.String, + com.google.cloud.discoveryengine.v1beta.Assistant.ToolListOrBuilder, + com.google.cloud.discoveryengine.v1beta.Assistant.ToolList, + com.google.cloud.discoveryengine.v1beta.Assistant.ToolList.Builder> + enabledTools_; + + private com.google.protobuf.MapFieldBuilder< + java.lang.String, + com.google.cloud.discoveryengine.v1beta.Assistant.ToolListOrBuilder, + com.google.cloud.discoveryengine.v1beta.Assistant.ToolList, + com.google.cloud.discoveryengine.v1beta.Assistant.ToolList.Builder> + internalGetEnabledTools() { + if (enabledTools_ == null) { + return new com.google.protobuf.MapFieldBuilder<>(enabledToolsConverter); + } + return enabledTools_; + } + + private com.google.protobuf.MapFieldBuilder< + java.lang.String, + com.google.cloud.discoveryengine.v1beta.Assistant.ToolListOrBuilder, + com.google.cloud.discoveryengine.v1beta.Assistant.ToolList, + com.google.cloud.discoveryengine.v1beta.Assistant.ToolList.Builder> + internalGetMutableEnabledTools() { + if (enabledTools_ == null) { + enabledTools_ = new com.google.protobuf.MapFieldBuilder<>(enabledToolsConverter); + } + bitField0_ |= 0x00000040; + onChanged(); + return enabledTools_; + } + + public int getEnabledToolsCount() { + return internalGetEnabledTools().ensureBuilderMap().size(); + } + + /** + * + * + *
            +     * Optional. Note: not implemented yet. Use
            +     * [enabled_actions][google.cloud.discoveryengine.v1beta.Assistant.enabled_actions]
            +     * instead. The enabled tools on this assistant. The keys are connector name,
            +     * for example
            +     * "projects/{projectId}/locations/{locationId}/collections/{collectionId}/dataconnector
            +     * The values consist of admin enabled tools towards the connector
            +     * instance. Admin can selectively enable multiple tools on any of the
            +     * connector instances that they created in the project. For example
            +     * {"jira1ConnectorName": [(toolId1, "createTicket"), (toolId2,
            +     * "transferTicket")],
            +     * "gmail1ConnectorName": [(toolId3, "sendEmail"),..] }
            +     * 
            + * + * + * map<string, .google.cloud.discoveryengine.v1beta.Assistant.ToolList> enabled_tools = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public boolean containsEnabledTools(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetEnabledTools().ensureBuilderMap().containsKey(key); + } + + /** Use {@link #getEnabledToolsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map< + java.lang.String, com.google.cloud.discoveryengine.v1beta.Assistant.ToolList> + getEnabledTools() { + return getEnabledToolsMap(); + } + + /** + * + * + *
            +     * Optional. Note: not implemented yet. Use
            +     * [enabled_actions][google.cloud.discoveryengine.v1beta.Assistant.enabled_actions]
            +     * instead. The enabled tools on this assistant. The keys are connector name,
            +     * for example
            +     * "projects/{projectId}/locations/{locationId}/collections/{collectionId}/dataconnector
            +     * The values consist of admin enabled tools towards the connector
            +     * instance. Admin can selectively enable multiple tools on any of the
            +     * connector instances that they created in the project. For example
            +     * {"jira1ConnectorName": [(toolId1, "createTicket"), (toolId2,
            +     * "transferTicket")],
            +     * "gmail1ConnectorName": [(toolId3, "sendEmail"),..] }
            +     * 
            + * + * + * map<string, .google.cloud.discoveryengine.v1beta.Assistant.ToolList> enabled_tools = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.Map< + java.lang.String, com.google.cloud.discoveryengine.v1beta.Assistant.ToolList> + getEnabledToolsMap() { + return internalGetEnabledTools().getImmutableMap(); + } + + /** + * + * + *
            +     * Optional. Note: not implemented yet. Use
            +     * [enabled_actions][google.cloud.discoveryengine.v1beta.Assistant.enabled_actions]
            +     * instead. The enabled tools on this assistant. The keys are connector name,
            +     * for example
            +     * "projects/{projectId}/locations/{locationId}/collections/{collectionId}/dataconnector
            +     * The values consist of admin enabled tools towards the connector
            +     * instance. Admin can selectively enable multiple tools on any of the
            +     * connector instances that they created in the project. For example
            +     * {"jira1ConnectorName": [(toolId1, "createTicket"), (toolId2,
            +     * "transferTicket")],
            +     * "gmail1ConnectorName": [(toolId3, "sendEmail"),..] }
            +     * 
            + * + * + * map<string, .google.cloud.discoveryengine.v1beta.Assistant.ToolList> enabled_tools = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public /* nullable */ com.google.cloud.discoveryengine.v1beta.Assistant.ToolList + getEnabledToolsOrDefault( + java.lang.String key, + /* nullable */ + com.google.cloud.discoveryengine.v1beta.Assistant.ToolList defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map< + java.lang.String, com.google.cloud.discoveryengine.v1beta.Assistant.ToolListOrBuilder> + map = internalGetMutableEnabledTools().ensureBuilderMap(); + return map.containsKey(key) ? enabledToolsConverter.build(map.get(key)) : defaultValue; + } + + /** + * + * + *
            +     * Optional. Note: not implemented yet. Use
            +     * [enabled_actions][google.cloud.discoveryengine.v1beta.Assistant.enabled_actions]
            +     * instead. The enabled tools on this assistant. The keys are connector name,
            +     * for example
            +     * "projects/{projectId}/locations/{locationId}/collections/{collectionId}/dataconnector
            +     * The values consist of admin enabled tools towards the connector
            +     * instance. Admin can selectively enable multiple tools on any of the
            +     * connector instances that they created in the project. For example
            +     * {"jira1ConnectorName": [(toolId1, "createTicket"), (toolId2,
            +     * "transferTicket")],
            +     * "gmail1ConnectorName": [(toolId3, "sendEmail"),..] }
            +     * 
            + * + * + * map<string, .google.cloud.discoveryengine.v1beta.Assistant.ToolList> enabled_tools = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Assistant.ToolList getEnabledToolsOrThrow( + java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map< + java.lang.String, com.google.cloud.discoveryengine.v1beta.Assistant.ToolListOrBuilder> + map = internalGetMutableEnabledTools().ensureBuilderMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return enabledToolsConverter.build(map.get(key)); + } + + public Builder clearEnabledTools() { + bitField0_ = (bitField0_ & ~0x00000040); + internalGetMutableEnabledTools().clear(); + return this; + } + + /** + * + * + *
            +     * Optional. Note: not implemented yet. Use
            +     * [enabled_actions][google.cloud.discoveryengine.v1beta.Assistant.enabled_actions]
            +     * instead. The enabled tools on this assistant. The keys are connector name,
            +     * for example
            +     * "projects/{projectId}/locations/{locationId}/collections/{collectionId}/dataconnector
            +     * The values consist of admin enabled tools towards the connector
            +     * instance. Admin can selectively enable multiple tools on any of the
            +     * connector instances that they created in the project. For example
            +     * {"jira1ConnectorName": [(toolId1, "createTicket"), (toolId2,
            +     * "transferTicket")],
            +     * "gmail1ConnectorName": [(toolId3, "sendEmail"),..] }
            +     * 
            + * + * + * map<string, .google.cloud.discoveryengine.v1beta.Assistant.ToolList> enabled_tools = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder removeEnabledTools(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + internalGetMutableEnabledTools().ensureBuilderMap().remove(key); + return this; + } + + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map< + java.lang.String, com.google.cloud.discoveryengine.v1beta.Assistant.ToolList> + getMutableEnabledTools() { + bitField0_ |= 0x00000040; + return internalGetMutableEnabledTools().ensureMessageMap(); + } + + /** + * + * + *
            +     * Optional. Note: not implemented yet. Use
            +     * [enabled_actions][google.cloud.discoveryengine.v1beta.Assistant.enabled_actions]
            +     * instead. The enabled tools on this assistant. The keys are connector name,
            +     * for example
            +     * "projects/{projectId}/locations/{locationId}/collections/{collectionId}/dataconnector
            +     * The values consist of admin enabled tools towards the connector
            +     * instance. Admin can selectively enable multiple tools on any of the
            +     * connector instances that they created in the project. For example
            +     * {"jira1ConnectorName": [(toolId1, "createTicket"), (toolId2,
            +     * "transferTicket")],
            +     * "gmail1ConnectorName": [(toolId3, "sendEmail"),..] }
            +     * 
            + * + * + * map<string, .google.cloud.discoveryengine.v1beta.Assistant.ToolList> enabled_tools = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder putEnabledTools( + java.lang.String key, com.google.cloud.discoveryengine.v1beta.Assistant.ToolList value) { + if (key == null) { + throw new NullPointerException("map key"); + } + if (value == null) { + throw new NullPointerException("map value"); + } + internalGetMutableEnabledTools().ensureBuilderMap().put(key, value); + bitField0_ |= 0x00000040; + return this; + } + + /** + * + * + *
            +     * Optional. Note: not implemented yet. Use
            +     * [enabled_actions][google.cloud.discoveryengine.v1beta.Assistant.enabled_actions]
            +     * instead. The enabled tools on this assistant. The keys are connector name,
            +     * for example
            +     * "projects/{projectId}/locations/{locationId}/collections/{collectionId}/dataconnector
            +     * The values consist of admin enabled tools towards the connector
            +     * instance. Admin can selectively enable multiple tools on any of the
            +     * connector instances that they created in the project. For example
            +     * {"jira1ConnectorName": [(toolId1, "createTicket"), (toolId2,
            +     * "transferTicket")],
            +     * "gmail1ConnectorName": [(toolId3, "sendEmail"),..] }
            +     * 
            + * + * + * map<string, .google.cloud.discoveryengine.v1beta.Assistant.ToolList> enabled_tools = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder putAllEnabledTools( + java.util.Map + values) { + for (java.util.Map.Entry< + java.lang.String, com.google.cloud.discoveryengine.v1beta.Assistant.ToolList> + e : values.entrySet()) { + if (e.getKey() == null || e.getValue() == null) { + throw new NullPointerException(); + } + } + internalGetMutableEnabledTools().ensureBuilderMap().putAll(values); + bitField0_ |= 0x00000040; + return this; + } + + /** + * + * + *
            +     * Optional. Note: not implemented yet. Use
            +     * [enabled_actions][google.cloud.discoveryengine.v1beta.Assistant.enabled_actions]
            +     * instead. The enabled tools on this assistant. The keys are connector name,
            +     * for example
            +     * "projects/{projectId}/locations/{locationId}/collections/{collectionId}/dataconnector
            +     * The values consist of admin enabled tools towards the connector
            +     * instance. Admin can selectively enable multiple tools on any of the
            +     * connector instances that they created in the project. For example
            +     * {"jira1ConnectorName": [(toolId1, "createTicket"), (toolId2,
            +     * "transferTicket")],
            +     * "gmail1ConnectorName": [(toolId3, "sendEmail"),..] }
            +     * 
            + * + * + * map<string, .google.cloud.discoveryengine.v1beta.Assistant.ToolList> enabled_tools = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.discoveryengine.v1beta.Assistant.ToolList.Builder + putEnabledToolsBuilderIfAbsent(java.lang.String key) { + java.util.Map< + java.lang.String, com.google.cloud.discoveryengine.v1beta.Assistant.ToolListOrBuilder> + builderMap = internalGetMutableEnabledTools().ensureBuilderMap(); + com.google.cloud.discoveryengine.v1beta.Assistant.ToolListOrBuilder entry = + builderMap.get(key); + if (entry == null) { + entry = com.google.cloud.discoveryengine.v1beta.Assistant.ToolList.newBuilder(); + builderMap.put(key, entry); + } + if (entry instanceof com.google.cloud.discoveryengine.v1beta.Assistant.ToolList) { + entry = ((com.google.cloud.discoveryengine.v1beta.Assistant.ToolList) entry).toBuilder(); + builderMap.put(key, entry); + } + return (com.google.cloud.discoveryengine.v1beta.Assistant.ToolList.Builder) entry; + } + + private com.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy customerPolicy_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy, + com.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.Builder, + com.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicyOrBuilder> + customerPolicyBuilder_; + + /** + * + * + *
            +     * Optional. Customer policy for the assistant.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy customer_policy = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the customerPolicy field is set. + */ + public boolean hasCustomerPolicy() { + return ((bitField0_ & 0x00000080) != 0); + } + + /** + * + * + *
            +     * Optional. Customer policy for the assistant.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy customer_policy = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The customerPolicy. + */ + public com.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy getCustomerPolicy() { + if (customerPolicyBuilder_ == null) { + return customerPolicy_ == null + ? com.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.getDefaultInstance() + : customerPolicy_; + } else { + return customerPolicyBuilder_.getMessage(); + } + } + + /** + * + * + *
            +     * Optional. Customer policy for the assistant.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy customer_policy = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setCustomerPolicy( + com.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy value) { + if (customerPolicyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + customerPolicy_ = value; + } else { + customerPolicyBuilder_.setMessage(value); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Optional. Customer policy for the assistant.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy customer_policy = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setCustomerPolicy( + com.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.Builder builderForValue) { + if (customerPolicyBuilder_ == null) { + customerPolicy_ = builderForValue.build(); + } else { + customerPolicyBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Optional. Customer policy for the assistant.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy customer_policy = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeCustomerPolicy( + com.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy value) { + if (customerPolicyBuilder_ == null) { + if (((bitField0_ & 0x00000080) != 0) + && customerPolicy_ != null + && customerPolicy_ + != com.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy + .getDefaultInstance()) { + getCustomerPolicyBuilder().mergeFrom(value); + } else { + customerPolicy_ = value; + } + } else { + customerPolicyBuilder_.mergeFrom(value); + } + if (customerPolicy_ != null) { + bitField0_ |= 0x00000080; + onChanged(); + } + return this; + } + + /** + * + * + *
            +     * Optional. Customer policy for the assistant.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy customer_policy = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearCustomerPolicy() { + bitField0_ = (bitField0_ & ~0x00000080); + customerPolicy_ = null; + if (customerPolicyBuilder_ != null) { + customerPolicyBuilder_.dispose(); + customerPolicyBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
            +     * Optional. Customer policy for the assistant.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy customer_policy = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.Builder + getCustomerPolicyBuilder() { + bitField0_ |= 0x00000080; + onChanged(); + return internalGetCustomerPolicyFieldBuilder().getBuilder(); + } + + /** + * + * + *
            +     * Optional. Customer policy for the assistant.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy customer_policy = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicyOrBuilder + getCustomerPolicyOrBuilder() { + if (customerPolicyBuilder_ != null) { + return customerPolicyBuilder_.getMessageOrBuilder(); + } else { + return customerPolicy_ == null + ? com.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.getDefaultInstance() + : customerPolicy_; + } + } + + /** + * + * + *
            +     * Optional. Customer policy for the assistant.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy customer_policy = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy, + com.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.Builder, + com.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicyOrBuilder> + internalGetCustomerPolicyFieldBuilder() { + if (customerPolicyBuilder_ == null) { + customerPolicyBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy, + com.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy.Builder, + com.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicyOrBuilder>( + getCustomerPolicy(), getParentForChildren(), isClean()); + customerPolicy_ = null; + } + return customerPolicyBuilder_; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + + /** + * + * + *
            +     * Output only. Represents the time when this Assistant was created.
            +     * 
            + * + * + * .google.protobuf.Timestamp create_time = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000100) != 0); + } + + /** + * + * + *
            +     * Output only. Represents the time when this Assistant was created.
            +     * 
            + * + * + * .google.protobuf.Timestamp create_time = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
            +     * Output only. Represents the time when this Assistant was created.
            +     * 
            + * + * + * .google.protobuf.Timestamp create_time = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + } else { + createTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Output only. Represents the time when this Assistant was created.
            +     * 
            + * + * + * .google.protobuf.Timestamp create_time = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Output only. Represents the time when this Assistant was created.
            +     * 
            + * + * + * .google.protobuf.Timestamp create_time = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 0x00000100) != 0) + && createTime_ != null + && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); + } + if (createTime_ != null) { + bitField0_ |= 0x00000100; + onChanged(); + } + return this; + } + + /** + * + * + *
            +     * Output only. Represents the time when this Assistant was created.
            +     * 
            + * + * + * .google.protobuf.Timestamp create_time = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000100); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
            +     * Output only. Represents the time when this Assistant was created.
            +     * 
            + * + * + * .google.protobuf.Timestamp create_time = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000100; + onChanged(); + return internalGetCreateTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
            +     * Output only. Represents the time when this Assistant was created.
            +     * 
            + * + * + * .google.protobuf.Timestamp create_time = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } + + /** + * + * + *
            +     * Output only. Represents the time when this Assistant was created.
            +     * 
            + * + * + * .google.protobuf.Timestamp create_time = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + internalGetCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp updateTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + updateTimeBuilder_; + + /** + * + * + *
            +     * Output only. Represents the time when this Assistant was most recently
            +     * updated.
            +     * 
            + * + * + * .google.protobuf.Timestamp update_time = 25 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000200) != 0); + } + + /** + * + * + *
            +     * Output only. Represents the time when this Assistant was most recently
            +     * updated.
            +     * 
            + * + * + * .google.protobuf.Timestamp update_time = 25 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
            +     * Output only. Represents the time when this Assistant was most recently
            +     * updated.
            +     * 
            + * + * + * .google.protobuf.Timestamp update_time = 25 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + } else { + updateTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Output only. Represents the time when this Assistant was most recently
            +     * updated.
            +     * 
            + * + * + * .google.protobuf.Timestamp update_time = 25 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Output only. Represents the time when this Assistant was most recently
            +     * updated.
            +     * 
            + * + * + * .google.protobuf.Timestamp update_time = 25 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (((bitField0_ & 0x00000200) != 0) + && updateTime_ != null + && updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getUpdateTimeBuilder().mergeFrom(value); + } else { + updateTime_ = value; + } + } else { + updateTimeBuilder_.mergeFrom(value); + } + if (updateTime_ != null) { + bitField0_ |= 0x00000200; + onChanged(); + } + return this; + } + + /** + * + * + *
            +     * Output only. Represents the time when this Assistant was most recently
            +     * updated.
            +     * 
            + * + * + * .google.protobuf.Timestamp update_time = 25 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearUpdateTime() { + bitField0_ = (bitField0_ & ~0x00000200); + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
            +     * Output only. Represents the time when this Assistant was most recently
            +     * updated.
            +     * 
            + * + * + * .google.protobuf.Timestamp update_time = 25 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + bitField0_ |= 0x00000200; + onChanged(); + return internalGetUpdateTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
            +     * Output only. Represents the time when this Assistant was most recently
            +     * updated.
            +     * 
            + * + * + * .google.protobuf.Timestamp update_time = 25 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } + } + + /** + * + * + *
            +     * Output only. Represents the time when this Assistant was most recently
            +     * updated.
            +     * 
            + * + * + * .google.protobuf.Timestamp update_time = 25 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + internalGetUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getUpdateTime(), getParentForChildren(), isClean()); + updateTime_ = null; + } + return updateTimeBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.Assistant) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.Assistant) + private static final com.google.cloud.discoveryengine.v1beta.Assistant DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.discoveryengine.v1beta.Assistant(); + } + + public static com.google.cloud.discoveryengine.v1beta.Assistant getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Assistant parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Assistant getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/AssistantContent.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/AssistantContent.java new file mode 100644 index 000000000000..a9a6c2d3fc58 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/AssistantContent.java @@ -0,0 +1,5598 @@ +/* + * 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/cloud/discoveryengine/v1beta/assist_answer.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.discoveryengine.v1beta; + +/** + * + * + *
            + * Multi-modal content.
            + * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.AssistantContent} + */ +@com.google.protobuf.Generated +public final class AssistantContent extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.AssistantContent) + AssistantContentOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "AssistantContent"); + } + + // Use AssistantContent.newBuilder() to construct. + private AssistantContent(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private AssistantContent() { + role_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.AssistAnswerProto + .internal_static_google_cloud_discoveryengine_v1beta_AssistantContent_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.AssistAnswerProto + .internal_static_google_cloud_discoveryengine_v1beta_AssistantContent_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.AssistantContent.class, + com.google.cloud.discoveryengine.v1beta.AssistantContent.Builder.class); + } + + public interface BlobOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.AssistantContent.Blob) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
            +     * Required. The media type (MIME type) of the generated data.
            +     * 
            + * + * string mime_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The mimeType. + */ + java.lang.String getMimeType(); + + /** + * + * + *
            +     * Required. The media type (MIME type) of the generated data.
            +     * 
            + * + * string mime_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for mimeType. + */ + com.google.protobuf.ByteString getMimeTypeBytes(); + + /** + * + * + *
            +     * Required. Raw bytes.
            +     * 
            + * + * bytes data = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The data. + */ + com.google.protobuf.ByteString getData(); + } + + /** + * + * + *
            +   * Inline blob.
            +   * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.AssistantContent.Blob} + */ + public static final class Blob extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.AssistantContent.Blob) + BlobOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Blob"); + } + + // Use Blob.newBuilder() to construct. + private Blob(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private Blob() { + mimeType_ = ""; + data_ = com.google.protobuf.ByteString.EMPTY; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.AssistAnswerProto + .internal_static_google_cloud_discoveryengine_v1beta_AssistantContent_Blob_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.AssistAnswerProto + .internal_static_google_cloud_discoveryengine_v1beta_AssistantContent_Blob_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.AssistantContent.Blob.class, + com.google.cloud.discoveryengine.v1beta.AssistantContent.Blob.Builder.class); + } + + public static final int MIME_TYPE_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object mimeType_ = ""; + + /** + * + * + *
            +     * Required. The media type (MIME type) of the generated data.
            +     * 
            + * + * string mime_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The mimeType. + */ + @java.lang.Override + public java.lang.String getMimeType() { + java.lang.Object ref = mimeType_; + 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(); + mimeType_ = s; + return s; + } + } + + /** + * + * + *
            +     * Required. The media type (MIME type) of the generated data.
            +     * 
            + * + * string mime_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for mimeType. + */ + @java.lang.Override + public com.google.protobuf.ByteString getMimeTypeBytes() { + java.lang.Object ref = mimeType_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + mimeType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DATA_FIELD_NUMBER = 2; + private com.google.protobuf.ByteString data_ = com.google.protobuf.ByteString.EMPTY; + + /** + * + * + *
            +     * Required. Raw bytes.
            +     * 
            + * + * bytes data = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The data. + */ + @java.lang.Override + public com.google.protobuf.ByteString getData() { + return data_; + } + + 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(mimeType_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, mimeType_); + } + if (!data_.isEmpty()) { + output.writeBytes(2, data_); + } + 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(mimeType_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, mimeType_); + } + if (!data_.isEmpty()) { + size += com.google.protobuf.CodedOutputStream.computeBytesSize(2, data_); + } + 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.discoveryengine.v1beta.AssistantContent.Blob)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1beta.AssistantContent.Blob other = + (com.google.cloud.discoveryengine.v1beta.AssistantContent.Blob) obj; + + if (!getMimeType().equals(other.getMimeType())) return false; + if (!getData().equals(other.getData())) 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) + MIME_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getMimeType().hashCode(); + hash = (37 * hash) + DATA_FIELD_NUMBER; + hash = (53 * hash) + getData().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1beta.AssistantContent.Blob parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.AssistantContent.Blob 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.discoveryengine.v1beta.AssistantContent.Blob parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.AssistantContent.Blob 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.discoveryengine.v1beta.AssistantContent.Blob parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.AssistantContent.Blob parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1beta.AssistantContent.Blob parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.AssistantContent.Blob 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.discoveryengine.v1beta.AssistantContent.Blob parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.AssistantContent.Blob 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.discoveryengine.v1beta.AssistantContent.Blob parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.AssistantContent.Blob 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.discoveryengine.v1beta.AssistantContent.Blob 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; + } + + /** + * + * + *
            +     * Inline blob.
            +     * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.AssistantContent.Blob} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.AssistantContent.Blob) + com.google.cloud.discoveryengine.v1beta.AssistantContent.BlobOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.AssistAnswerProto + .internal_static_google_cloud_discoveryengine_v1beta_AssistantContent_Blob_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.AssistAnswerProto + .internal_static_google_cloud_discoveryengine_v1beta_AssistantContent_Blob_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.AssistantContent.Blob.class, + com.google.cloud.discoveryengine.v1beta.AssistantContent.Blob.Builder.class); + } + + // Construct using com.google.cloud.discoveryengine.v1beta.AssistantContent.Blob.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + mimeType_ = ""; + data_ = com.google.protobuf.ByteString.EMPTY; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1beta.AssistAnswerProto + .internal_static_google_cloud_discoveryengine_v1beta_AssistantContent_Blob_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AssistantContent.Blob + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1beta.AssistantContent.Blob.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AssistantContent.Blob build() { + com.google.cloud.discoveryengine.v1beta.AssistantContent.Blob result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AssistantContent.Blob buildPartial() { + com.google.cloud.discoveryengine.v1beta.AssistantContent.Blob result = + new com.google.cloud.discoveryengine.v1beta.AssistantContent.Blob(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.discoveryengine.v1beta.AssistantContent.Blob result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.mimeType_ = mimeType_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.data_ = data_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.discoveryengine.v1beta.AssistantContent.Blob) { + return mergeFrom((com.google.cloud.discoveryengine.v1beta.AssistantContent.Blob) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1beta.AssistantContent.Blob other) { + if (other + == com.google.cloud.discoveryengine.v1beta.AssistantContent.Blob.getDefaultInstance()) + return this; + if (!other.getMimeType().isEmpty()) { + mimeType_ = other.mimeType_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getData().isEmpty()) { + setData(other.getData()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + mimeType_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + data_ = input.readBytes(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object mimeType_ = ""; + + /** + * + * + *
            +       * Required. The media type (MIME type) of the generated data.
            +       * 
            + * + * string mime_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The mimeType. + */ + public java.lang.String getMimeType() { + java.lang.Object ref = mimeType_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + mimeType_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
            +       * Required. The media type (MIME type) of the generated data.
            +       * 
            + * + * string mime_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for mimeType. + */ + public com.google.protobuf.ByteString getMimeTypeBytes() { + java.lang.Object ref = mimeType_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + mimeType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
            +       * Required. The media type (MIME type) of the generated data.
            +       * 
            + * + * string mime_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The mimeType to set. + * @return This builder for chaining. + */ + public Builder setMimeType(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + mimeType_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
            +       * Required. The media type (MIME type) of the generated data.
            +       * 
            + * + * string mime_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearMimeType() { + mimeType_ = getDefaultInstance().getMimeType(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
            +       * Required. The media type (MIME type) of the generated data.
            +       * 
            + * + * string mime_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for mimeType to set. + * @return This builder for chaining. + */ + public Builder setMimeTypeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + mimeType_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.ByteString data_ = com.google.protobuf.ByteString.EMPTY; + + /** + * + * + *
            +       * Required. Raw bytes.
            +       * 
            + * + * bytes data = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The data. + */ + @java.lang.Override + public com.google.protobuf.ByteString getData() { + return data_; + } + + /** + * + * + *
            +       * Required. Raw bytes.
            +       * 
            + * + * bytes data = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The data to set. + * @return This builder for chaining. + */ + public Builder setData(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + data_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
            +       * Required. Raw bytes.
            +       * 
            + * + * bytes data = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearData() { + bitField0_ = (bitField0_ & ~0x00000002); + data_ = getDefaultInstance().getData(); + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.AssistantContent.Blob) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.AssistantContent.Blob) + private static final com.google.cloud.discoveryengine.v1beta.AssistantContent.Blob + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.discoveryengine.v1beta.AssistantContent.Blob(); + } + + public static com.google.cloud.discoveryengine.v1beta.AssistantContent.Blob + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Blob parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AssistantContent.Blob + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface FileOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.AssistantContent.File) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
            +     * Required. The media type (MIME type) of the file.
            +     * 
            + * + * string mime_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The mimeType. + */ + java.lang.String getMimeType(); + + /** + * + * + *
            +     * Required. The media type (MIME type) of the file.
            +     * 
            + * + * string mime_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for mimeType. + */ + com.google.protobuf.ByteString getMimeTypeBytes(); + + /** + * + * + *
            +     * Required. The file ID.
            +     * 
            + * + * string file_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The fileId. + */ + java.lang.String getFileId(); + + /** + * + * + *
            +     * Required. The file ID.
            +     * 
            + * + * string file_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for fileId. + */ + com.google.protobuf.ByteString getFileIdBytes(); + } + + /** + * + * + *
            +   * A file, e.g., an audio summary.
            +   * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.AssistantContent.File} + */ + public static final class File extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.AssistantContent.File) + FileOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "File"); + } + + // Use File.newBuilder() to construct. + private File(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private File() { + mimeType_ = ""; + fileId_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.AssistAnswerProto + .internal_static_google_cloud_discoveryengine_v1beta_AssistantContent_File_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.AssistAnswerProto + .internal_static_google_cloud_discoveryengine_v1beta_AssistantContent_File_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.AssistantContent.File.class, + com.google.cloud.discoveryengine.v1beta.AssistantContent.File.Builder.class); + } + + public static final int MIME_TYPE_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object mimeType_ = ""; + + /** + * + * + *
            +     * Required. The media type (MIME type) of the file.
            +     * 
            + * + * string mime_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The mimeType. + */ + @java.lang.Override + public java.lang.String getMimeType() { + java.lang.Object ref = mimeType_; + 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(); + mimeType_ = s; + return s; + } + } + + /** + * + * + *
            +     * Required. The media type (MIME type) of the file.
            +     * 
            + * + * string mime_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for mimeType. + */ + @java.lang.Override + public com.google.protobuf.ByteString getMimeTypeBytes() { + java.lang.Object ref = mimeType_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + mimeType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FILE_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object fileId_ = ""; + + /** + * + * + *
            +     * Required. The file ID.
            +     * 
            + * + * string file_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The fileId. + */ + @java.lang.Override + public java.lang.String getFileId() { + java.lang.Object ref = fileId_; + 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(); + fileId_ = s; + return s; + } + } + + /** + * + * + *
            +     * Required. The file ID.
            +     * 
            + * + * string file_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for fileId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFileIdBytes() { + java.lang.Object ref = fileId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + fileId_ = 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 { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(mimeType_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, mimeType_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(fileId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, fileId_); + } + 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(mimeType_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, mimeType_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(fileId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, fileId_); + } + 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.discoveryengine.v1beta.AssistantContent.File)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1beta.AssistantContent.File other = + (com.google.cloud.discoveryengine.v1beta.AssistantContent.File) obj; + + if (!getMimeType().equals(other.getMimeType())) return false; + if (!getFileId().equals(other.getFileId())) 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) + MIME_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getMimeType().hashCode(); + hash = (37 * hash) + FILE_ID_FIELD_NUMBER; + hash = (53 * hash) + getFileId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1beta.AssistantContent.File parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.AssistantContent.File 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.discoveryengine.v1beta.AssistantContent.File parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.AssistantContent.File 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.discoveryengine.v1beta.AssistantContent.File parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.AssistantContent.File parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1beta.AssistantContent.File parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.AssistantContent.File 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.discoveryengine.v1beta.AssistantContent.File parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.AssistantContent.File 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.discoveryengine.v1beta.AssistantContent.File parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.AssistantContent.File 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.discoveryengine.v1beta.AssistantContent.File 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 file, e.g., an audio summary.
            +     * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.AssistantContent.File} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.AssistantContent.File) + com.google.cloud.discoveryengine.v1beta.AssistantContent.FileOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.AssistAnswerProto + .internal_static_google_cloud_discoveryengine_v1beta_AssistantContent_File_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.AssistAnswerProto + .internal_static_google_cloud_discoveryengine_v1beta_AssistantContent_File_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.AssistantContent.File.class, + com.google.cloud.discoveryengine.v1beta.AssistantContent.File.Builder.class); + } + + // Construct using com.google.cloud.discoveryengine.v1beta.AssistantContent.File.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + mimeType_ = ""; + fileId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1beta.AssistAnswerProto + .internal_static_google_cloud_discoveryengine_v1beta_AssistantContent_File_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AssistantContent.File + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1beta.AssistantContent.File.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AssistantContent.File build() { + com.google.cloud.discoveryengine.v1beta.AssistantContent.File result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AssistantContent.File buildPartial() { + com.google.cloud.discoveryengine.v1beta.AssistantContent.File result = + new com.google.cloud.discoveryengine.v1beta.AssistantContent.File(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.discoveryengine.v1beta.AssistantContent.File result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.mimeType_ = mimeType_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.fileId_ = fileId_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.discoveryengine.v1beta.AssistantContent.File) { + return mergeFrom((com.google.cloud.discoveryengine.v1beta.AssistantContent.File) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1beta.AssistantContent.File other) { + if (other + == com.google.cloud.discoveryengine.v1beta.AssistantContent.File.getDefaultInstance()) + return this; + if (!other.getMimeType().isEmpty()) { + mimeType_ = other.mimeType_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getFileId().isEmpty()) { + fileId_ = other.fileId_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + mimeType_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + fileId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object mimeType_ = ""; + + /** + * + * + *
            +       * Required. The media type (MIME type) of the file.
            +       * 
            + * + * string mime_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The mimeType. + */ + public java.lang.String getMimeType() { + java.lang.Object ref = mimeType_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + mimeType_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
            +       * Required. The media type (MIME type) of the file.
            +       * 
            + * + * string mime_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for mimeType. + */ + public com.google.protobuf.ByteString getMimeTypeBytes() { + java.lang.Object ref = mimeType_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + mimeType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
            +       * Required. The media type (MIME type) of the file.
            +       * 
            + * + * string mime_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The mimeType to set. + * @return This builder for chaining. + */ + public Builder setMimeType(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + mimeType_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
            +       * Required. The media type (MIME type) of the file.
            +       * 
            + * + * string mime_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearMimeType() { + mimeType_ = getDefaultInstance().getMimeType(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
            +       * Required. The media type (MIME type) of the file.
            +       * 
            + * + * string mime_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for mimeType to set. + * @return This builder for chaining. + */ + public Builder setMimeTypeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + mimeType_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object fileId_ = ""; + + /** + * + * + *
            +       * Required. The file ID.
            +       * 
            + * + * string file_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The fileId. + */ + public java.lang.String getFileId() { + java.lang.Object ref = fileId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + fileId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
            +       * Required. The file ID.
            +       * 
            + * + * string file_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for fileId. + */ + public com.google.protobuf.ByteString getFileIdBytes() { + java.lang.Object ref = fileId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + fileId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
            +       * Required. The file ID.
            +       * 
            + * + * string file_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The fileId to set. + * @return This builder for chaining. + */ + public Builder setFileId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + fileId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
            +       * Required. The file ID.
            +       * 
            + * + * string file_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearFileId() { + fileId_ = getDefaultInstance().getFileId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
            +       * Required. The file ID.
            +       * 
            + * + * string file_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for fileId to set. + * @return This builder for chaining. + */ + public Builder setFileIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + fileId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.AssistantContent.File) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.AssistantContent.File) + private static final com.google.cloud.discoveryengine.v1beta.AssistantContent.File + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.discoveryengine.v1beta.AssistantContent.File(); + } + + public static com.google.cloud.discoveryengine.v1beta.AssistantContent.File + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public File parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AssistantContent.File + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface ExecutableCodeOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.AssistantContent.ExecutableCode) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
            +     * Required. The code content. Currently only supports Python.
            +     * 
            + * + * string code = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The code. + */ + java.lang.String getCode(); + + /** + * + * + *
            +     * Required. The code content. Currently only supports Python.
            +     * 
            + * + * string code = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for code. + */ + com.google.protobuf.ByteString getCodeBytes(); + } + + /** + * + * + *
            +   * Code generated by the model that is meant to be executed by the model.
            +   * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.AssistantContent.ExecutableCode} + */ + public static final class ExecutableCode extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.AssistantContent.ExecutableCode) + ExecutableCodeOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ExecutableCode"); + } + + // Use ExecutableCode.newBuilder() to construct. + private ExecutableCode(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ExecutableCode() { + code_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.AssistAnswerProto + .internal_static_google_cloud_discoveryengine_v1beta_AssistantContent_ExecutableCode_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.AssistAnswerProto + .internal_static_google_cloud_discoveryengine_v1beta_AssistantContent_ExecutableCode_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.AssistantContent.ExecutableCode.class, + com.google.cloud.discoveryengine.v1beta.AssistantContent.ExecutableCode.Builder + .class); + } + + public static final int CODE_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object code_ = ""; + + /** + * + * + *
            +     * Required. The code content. Currently only supports Python.
            +     * 
            + * + * string code = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The code. + */ + @java.lang.Override + public java.lang.String getCode() { + java.lang.Object ref = code_; + 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(); + code_ = s; + return s; + } + } + + /** + * + * + *
            +     * Required. The code content. Currently only supports Python.
            +     * 
            + * + * string code = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for code. + */ + @java.lang.Override + public com.google.protobuf.ByteString getCodeBytes() { + java.lang.Object ref = code_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + code_ = 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 { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(code_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, code_); + } + 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(code_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, code_); + } + 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.discoveryengine.v1beta.AssistantContent.ExecutableCode)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1beta.AssistantContent.ExecutableCode other = + (com.google.cloud.discoveryengine.v1beta.AssistantContent.ExecutableCode) obj; + + if (!getCode().equals(other.getCode())) 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) + CODE_FIELD_NUMBER; + hash = (53 * hash) + getCode().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1beta.AssistantContent.ExecutableCode parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.AssistantContent.ExecutableCode 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.discoveryengine.v1beta.AssistantContent.ExecutableCode parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.AssistantContent.ExecutableCode 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.discoveryengine.v1beta.AssistantContent.ExecutableCode parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.AssistantContent.ExecutableCode parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1beta.AssistantContent.ExecutableCode parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.AssistantContent.ExecutableCode 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.discoveryengine.v1beta.AssistantContent.ExecutableCode + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.AssistantContent.ExecutableCode + 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.discoveryengine.v1beta.AssistantContent.ExecutableCode parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.AssistantContent.ExecutableCode 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.discoveryengine.v1beta.AssistantContent.ExecutableCode 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; + } + + /** + * + * + *
            +     * Code generated by the model that is meant to be executed by the model.
            +     * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.AssistantContent.ExecutableCode} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.AssistantContent.ExecutableCode) + com.google.cloud.discoveryengine.v1beta.AssistantContent.ExecutableCodeOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.AssistAnswerProto + .internal_static_google_cloud_discoveryengine_v1beta_AssistantContent_ExecutableCode_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.AssistAnswerProto + .internal_static_google_cloud_discoveryengine_v1beta_AssistantContent_ExecutableCode_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.AssistantContent.ExecutableCode.class, + com.google.cloud.discoveryengine.v1beta.AssistantContent.ExecutableCode.Builder + .class); + } + + // Construct using + // com.google.cloud.discoveryengine.v1beta.AssistantContent.ExecutableCode.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + code_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1beta.AssistAnswerProto + .internal_static_google_cloud_discoveryengine_v1beta_AssistantContent_ExecutableCode_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AssistantContent.ExecutableCode + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1beta.AssistantContent.ExecutableCode + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AssistantContent.ExecutableCode build() { + com.google.cloud.discoveryengine.v1beta.AssistantContent.ExecutableCode result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AssistantContent.ExecutableCode + buildPartial() { + com.google.cloud.discoveryengine.v1beta.AssistantContent.ExecutableCode result = + new com.google.cloud.discoveryengine.v1beta.AssistantContent.ExecutableCode(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.discoveryengine.v1beta.AssistantContent.ExecutableCode result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.code_ = code_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.cloud.discoveryengine.v1beta.AssistantContent.ExecutableCode) { + return mergeFrom( + (com.google.cloud.discoveryengine.v1beta.AssistantContent.ExecutableCode) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1beta.AssistantContent.ExecutableCode other) { + if (other + == com.google.cloud.discoveryengine.v1beta.AssistantContent.ExecutableCode + .getDefaultInstance()) return this; + if (!other.getCode().isEmpty()) { + code_ = other.code_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 18: + { + code_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object code_ = ""; + + /** + * + * + *
            +       * Required. The code content. Currently only supports Python.
            +       * 
            + * + * string code = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The code. + */ + public java.lang.String getCode() { + java.lang.Object ref = code_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + code_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
            +       * Required. The code content. Currently only supports Python.
            +       * 
            + * + * string code = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for code. + */ + public com.google.protobuf.ByteString getCodeBytes() { + java.lang.Object ref = code_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + code_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
            +       * Required. The code content. Currently only supports Python.
            +       * 
            + * + * string code = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The code to set. + * @return This builder for chaining. + */ + public Builder setCode(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + code_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
            +       * Required. The code content. Currently only supports Python.
            +       * 
            + * + * string code = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearCode() { + code_ = getDefaultInstance().getCode(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
            +       * Required. The code content. Currently only supports Python.
            +       * 
            + * + * string code = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for code to set. + * @return This builder for chaining. + */ + public Builder setCodeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + code_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.AssistantContent.ExecutableCode) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.AssistantContent.ExecutableCode) + private static final com.google.cloud.discoveryengine.v1beta.AssistantContent.ExecutableCode + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.discoveryengine.v1beta.AssistantContent.ExecutableCode(); + } + + public static com.google.cloud.discoveryengine.v1beta.AssistantContent.ExecutableCode + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ExecutableCode parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AssistantContent.ExecutableCode + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface CodeExecutionResultOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.AssistantContent.CodeExecutionResult) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
            +     * Required. Outcome of the code execution.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AssistantContent.CodeExecutionResult.Outcome outcome = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for outcome. + */ + int getOutcomeValue(); + + /** + * + * + *
            +     * Required. Outcome of the code execution.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AssistantContent.CodeExecutionResult.Outcome outcome = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The outcome. + */ + com.google.cloud.discoveryengine.v1beta.AssistantContent.CodeExecutionResult.Outcome + getOutcome(); + + /** + * + * + *
            +     * Optional. Contains stdout when code execution is successful, stderr or
            +     * other description otherwise.
            +     * 
            + * + * string output = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The output. + */ + java.lang.String getOutput(); + + /** + * + * + *
            +     * Optional. Contains stdout when code execution is successful, stderr or
            +     * other description otherwise.
            +     * 
            + * + * string output = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for output. + */ + com.google.protobuf.ByteString getOutputBytes(); + } + + /** + * + * + *
            +   * Result of executing ExecutableCode.
            +   * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.AssistantContent.CodeExecutionResult} + */ + public static final class CodeExecutionResult extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.AssistantContent.CodeExecutionResult) + CodeExecutionResultOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "CodeExecutionResult"); + } + + // Use CodeExecutionResult.newBuilder() to construct. + private CodeExecutionResult(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private CodeExecutionResult() { + outcome_ = 0; + output_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.AssistAnswerProto + .internal_static_google_cloud_discoveryengine_v1beta_AssistantContent_CodeExecutionResult_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.AssistAnswerProto + .internal_static_google_cloud_discoveryengine_v1beta_AssistantContent_CodeExecutionResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.AssistantContent.CodeExecutionResult.class, + com.google.cloud.discoveryengine.v1beta.AssistantContent.CodeExecutionResult.Builder + .class); + } + + /** + * + * + *
            +     * Enumeration of possible outcomes of the code execution.
            +     * 
            + * + * Protobuf enum {@code + * google.cloud.discoveryengine.v1beta.AssistantContent.CodeExecutionResult.Outcome} + */ + public enum Outcome implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
            +       * Unspecified status. This value should not be used.
            +       * 
            + * + * OUTCOME_UNSPECIFIED = 0; + */ + OUTCOME_UNSPECIFIED(0), + /** + * + * + *
            +       * Code execution completed successfully.
            +       * 
            + * + * OUTCOME_OK = 1; + */ + OUTCOME_OK(1), + /** + * + * + *
            +       * Code execution finished but with a failure. `stderr` should contain the
            +       * reason.
            +       * 
            + * + * OUTCOME_FAILED = 2; + */ + OUTCOME_FAILED(2), + /** + * + * + *
            +       * Code execution ran for too long, and was cancelled. There may or may
            +       * not be a partial output present.
            +       * 
            + * + * OUTCOME_DEADLINE_EXCEEDED = 3; + */ + OUTCOME_DEADLINE_EXCEEDED(3), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Outcome"); + } + + /** + * + * + *
            +       * Unspecified status. This value should not be used.
            +       * 
            + * + * OUTCOME_UNSPECIFIED = 0; + */ + public static final int OUTCOME_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
            +       * Code execution completed successfully.
            +       * 
            + * + * OUTCOME_OK = 1; + */ + public static final int OUTCOME_OK_VALUE = 1; + + /** + * + * + *
            +       * Code execution finished but with a failure. `stderr` should contain the
            +       * reason.
            +       * 
            + * + * OUTCOME_FAILED = 2; + */ + public static final int OUTCOME_FAILED_VALUE = 2; + + /** + * + * + *
            +       * Code execution ran for too long, and was cancelled. There may or may
            +       * not be a partial output present.
            +       * 
            + * + * OUTCOME_DEADLINE_EXCEEDED = 3; + */ + public static final int OUTCOME_DEADLINE_EXCEEDED_VALUE = 3; + + 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 Outcome 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 Outcome forNumber(int value) { + switch (value) { + case 0: + return OUTCOME_UNSPECIFIED; + case 1: + return OUTCOME_OK; + case 2: + return OUTCOME_FAILED; + case 3: + return OUTCOME_DEADLINE_EXCEEDED; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public Outcome findValueByNumber(int number) { + return Outcome.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.AssistantContent.CodeExecutionResult + .getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final Outcome[] VALUES = values(); + + public static Outcome valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private Outcome(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.discoveryengine.v1beta.AssistantContent.CodeExecutionResult.Outcome) + } + + public static final int OUTCOME_FIELD_NUMBER = 1; + private int outcome_ = 0; + + /** + * + * + *
            +     * Required. Outcome of the code execution.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AssistantContent.CodeExecutionResult.Outcome outcome = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for outcome. + */ + @java.lang.Override + public int getOutcomeValue() { + return outcome_; + } + + /** + * + * + *
            +     * Required. Outcome of the code execution.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AssistantContent.CodeExecutionResult.Outcome outcome = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The outcome. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AssistantContent.CodeExecutionResult.Outcome + getOutcome() { + com.google.cloud.discoveryengine.v1beta.AssistantContent.CodeExecutionResult.Outcome result = + com.google.cloud.discoveryengine.v1beta.AssistantContent.CodeExecutionResult.Outcome + .forNumber(outcome_); + return result == null + ? com.google.cloud.discoveryengine.v1beta.AssistantContent.CodeExecutionResult.Outcome + .UNRECOGNIZED + : result; + } + + public static final int OUTPUT_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object output_ = ""; + + /** + * + * + *
            +     * Optional. Contains stdout when code execution is successful, stderr or
            +     * other description otherwise.
            +     * 
            + * + * string output = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The output. + */ + @java.lang.Override + public java.lang.String getOutput() { + java.lang.Object ref = output_; + 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(); + output_ = s; + return s; + } + } + + /** + * + * + *
            +     * Optional. Contains stdout when code execution is successful, stderr or
            +     * other description otherwise.
            +     * 
            + * + * string output = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for output. + */ + @java.lang.Override + public com.google.protobuf.ByteString getOutputBytes() { + java.lang.Object ref = output_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + output_ = 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 { + if (outcome_ + != com.google.cloud.discoveryengine.v1beta.AssistantContent.CodeExecutionResult.Outcome + .OUTCOME_UNSPECIFIED + .getNumber()) { + output.writeEnum(1, outcome_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(output_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, output_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (outcome_ + != com.google.cloud.discoveryengine.v1beta.AssistantContent.CodeExecutionResult.Outcome + .OUTCOME_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, outcome_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(output_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, output_); + } + 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.discoveryengine.v1beta.AssistantContent.CodeExecutionResult)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1beta.AssistantContent.CodeExecutionResult other = + (com.google.cloud.discoveryengine.v1beta.AssistantContent.CodeExecutionResult) obj; + + if (outcome_ != other.outcome_) return false; + if (!getOutput().equals(other.getOutput())) 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) + OUTCOME_FIELD_NUMBER; + hash = (53 * hash) + outcome_; + hash = (37 * hash) + OUTPUT_FIELD_NUMBER; + hash = (53 * hash) + getOutput().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1beta.AssistantContent.CodeExecutionResult + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.AssistantContent.CodeExecutionResult + 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.discoveryengine.v1beta.AssistantContent.CodeExecutionResult + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.AssistantContent.CodeExecutionResult + 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.discoveryengine.v1beta.AssistantContent.CodeExecutionResult + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.AssistantContent.CodeExecutionResult + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1beta.AssistantContent.CodeExecutionResult + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.AssistantContent.CodeExecutionResult + 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.discoveryengine.v1beta.AssistantContent.CodeExecutionResult + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.AssistantContent.CodeExecutionResult + 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.discoveryengine.v1beta.AssistantContent.CodeExecutionResult + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.AssistantContent.CodeExecutionResult + 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.discoveryengine.v1beta.AssistantContent.CodeExecutionResult 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; + } + + /** + * + * + *
            +     * Result of executing ExecutableCode.
            +     * 
            + * + * Protobuf type {@code + * google.cloud.discoveryengine.v1beta.AssistantContent.CodeExecutionResult} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.AssistantContent.CodeExecutionResult) + com.google.cloud.discoveryengine.v1beta.AssistantContent.CodeExecutionResultOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.AssistAnswerProto + .internal_static_google_cloud_discoveryengine_v1beta_AssistantContent_CodeExecutionResult_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.AssistAnswerProto + .internal_static_google_cloud_discoveryengine_v1beta_AssistantContent_CodeExecutionResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.AssistantContent.CodeExecutionResult.class, + com.google.cloud.discoveryengine.v1beta.AssistantContent.CodeExecutionResult.Builder + .class); + } + + // Construct using + // com.google.cloud.discoveryengine.v1beta.AssistantContent.CodeExecutionResult.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + outcome_ = 0; + output_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1beta.AssistAnswerProto + .internal_static_google_cloud_discoveryengine_v1beta_AssistantContent_CodeExecutionResult_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AssistantContent.CodeExecutionResult + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1beta.AssistantContent.CodeExecutionResult + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AssistantContent.CodeExecutionResult build() { + com.google.cloud.discoveryengine.v1beta.AssistantContent.CodeExecutionResult result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AssistantContent.CodeExecutionResult + buildPartial() { + com.google.cloud.discoveryengine.v1beta.AssistantContent.CodeExecutionResult result = + new com.google.cloud.discoveryengine.v1beta.AssistantContent.CodeExecutionResult(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.discoveryengine.v1beta.AssistantContent.CodeExecutionResult result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.outcome_ = outcome_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.output_ = output_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.discoveryengine.v1beta.AssistantContent.CodeExecutionResult) { + return mergeFrom( + (com.google.cloud.discoveryengine.v1beta.AssistantContent.CodeExecutionResult) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1beta.AssistantContent.CodeExecutionResult other) { + if (other + == com.google.cloud.discoveryengine.v1beta.AssistantContent.CodeExecutionResult + .getDefaultInstance()) return this; + if (other.outcome_ != 0) { + setOutcomeValue(other.getOutcomeValue()); + } + if (!other.getOutput().isEmpty()) { + output_ = other.output_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + outcome_ = input.readEnum(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 18: + { + output_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private int outcome_ = 0; + + /** + * + * + *
            +       * Required. Outcome of the code execution.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AssistantContent.CodeExecutionResult.Outcome outcome = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for outcome. + */ + @java.lang.Override + public int getOutcomeValue() { + return outcome_; + } + + /** + * + * + *
            +       * Required. Outcome of the code execution.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AssistantContent.CodeExecutionResult.Outcome outcome = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The enum numeric value on the wire for outcome to set. + * @return This builder for chaining. + */ + public Builder setOutcomeValue(int value) { + outcome_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
            +       * Required. Outcome of the code execution.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AssistantContent.CodeExecutionResult.Outcome outcome = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The outcome. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AssistantContent.CodeExecutionResult.Outcome + getOutcome() { + com.google.cloud.discoveryengine.v1beta.AssistantContent.CodeExecutionResult.Outcome + result = + com.google.cloud.discoveryengine.v1beta.AssistantContent.CodeExecutionResult.Outcome + .forNumber(outcome_); + return result == null + ? com.google.cloud.discoveryengine.v1beta.AssistantContent.CodeExecutionResult.Outcome + .UNRECOGNIZED + : result; + } + + /** + * + * + *
            +       * Required. Outcome of the code execution.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AssistantContent.CodeExecutionResult.Outcome outcome = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The outcome to set. + * @return This builder for chaining. + */ + public Builder setOutcome( + com.google.cloud.discoveryengine.v1beta.AssistantContent.CodeExecutionResult.Outcome + value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + outcome_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
            +       * Required. Outcome of the code execution.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AssistantContent.CodeExecutionResult.Outcome outcome = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return This builder for chaining. + */ + public Builder clearOutcome() { + bitField0_ = (bitField0_ & ~0x00000001); + outcome_ = 0; + onChanged(); + return this; + } + + private java.lang.Object output_ = ""; + + /** + * + * + *
            +       * Optional. Contains stdout when code execution is successful, stderr or
            +       * other description otherwise.
            +       * 
            + * + * string output = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The output. + */ + public java.lang.String getOutput() { + java.lang.Object ref = output_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + output_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
            +       * Optional. Contains stdout when code execution is successful, stderr or
            +       * other description otherwise.
            +       * 
            + * + * string output = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for output. + */ + public com.google.protobuf.ByteString getOutputBytes() { + java.lang.Object ref = output_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + output_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
            +       * Optional. Contains stdout when code execution is successful, stderr or
            +       * other description otherwise.
            +       * 
            + * + * string output = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The output to set. + * @return This builder for chaining. + */ + public Builder setOutput(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + output_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
            +       * Optional. Contains stdout when code execution is successful, stderr or
            +       * other description otherwise.
            +       * 
            + * + * string output = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearOutput() { + output_ = getDefaultInstance().getOutput(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
            +       * Optional. Contains stdout when code execution is successful, stderr or
            +       * other description otherwise.
            +       * 
            + * + * string output = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for output to set. + * @return This builder for chaining. + */ + public Builder setOutputBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + output_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.AssistantContent.CodeExecutionResult) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.AssistantContent.CodeExecutionResult) + private static final com.google.cloud.discoveryengine.v1beta.AssistantContent + .CodeExecutionResult + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.discoveryengine.v1beta.AssistantContent.CodeExecutionResult(); + } + + public static com.google.cloud.discoveryengine.v1beta.AssistantContent.CodeExecutionResult + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CodeExecutionResult parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AssistantContent.CodeExecutionResult + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int dataCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object data_; + + public enum DataCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + TEXT(2), + INLINE_DATA(3), + FILE(4), + EXECUTABLE_CODE(7), + CODE_EXECUTION_RESULT(8), + DATA_NOT_SET(0); + private final int value; + + private DataCase(int value) { + this.value = value; + } + + /** + * @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 DataCase valueOf(int value) { + return forNumber(value); + } + + public static DataCase forNumber(int value) { + switch (value) { + case 2: + return TEXT; + case 3: + return INLINE_DATA; + case 4: + return FILE; + case 7: + return EXECUTABLE_CODE; + case 8: + return CODE_EXECUTION_RESULT; + case 0: + return DATA_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public DataCase getDataCase() { + return DataCase.forNumber(dataCase_); + } + + public static final int TEXT_FIELD_NUMBER = 2; + + /** + * + * + *
            +   * Inline text.
            +   * 
            + * + * string text = 2; + * + * @return Whether the text field is set. + */ + public boolean hasText() { + return dataCase_ == 2; + } + + /** + * + * + *
            +   * Inline text.
            +   * 
            + * + * string text = 2; + * + * @return The text. + */ + public java.lang.String getText() { + java.lang.Object ref = ""; + if (dataCase_ == 2) { + ref = data_; + } + 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(); + if (dataCase_ == 2) { + data_ = s; + } + return s; + } + } + + /** + * + * + *
            +   * Inline text.
            +   * 
            + * + * string text = 2; + * + * @return The bytes for text. + */ + public com.google.protobuf.ByteString getTextBytes() { + java.lang.Object ref = ""; + if (dataCase_ == 2) { + ref = data_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (dataCase_ == 2) { + data_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int INLINE_DATA_FIELD_NUMBER = 3; + + /** + * + * + *
            +   * Inline binary data.
            +   * 
            + * + * .google.cloud.discoveryengine.v1beta.AssistantContent.Blob inline_data = 3; + * + * @return Whether the inlineData field is set. + */ + @java.lang.Override + public boolean hasInlineData() { + return dataCase_ == 3; + } + + /** + * + * + *
            +   * Inline binary data.
            +   * 
            + * + * .google.cloud.discoveryengine.v1beta.AssistantContent.Blob inline_data = 3; + * + * @return The inlineData. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AssistantContent.Blob getInlineData() { + if (dataCase_ == 3) { + return (com.google.cloud.discoveryengine.v1beta.AssistantContent.Blob) data_; + } + return com.google.cloud.discoveryengine.v1beta.AssistantContent.Blob.getDefaultInstance(); + } + + /** + * + * + *
            +   * Inline binary data.
            +   * 
            + * + * .google.cloud.discoveryengine.v1beta.AssistantContent.Blob inline_data = 3; + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AssistantContent.BlobOrBuilder + getInlineDataOrBuilder() { + if (dataCase_ == 3) { + return (com.google.cloud.discoveryengine.v1beta.AssistantContent.Blob) data_; + } + return com.google.cloud.discoveryengine.v1beta.AssistantContent.Blob.getDefaultInstance(); + } + + public static final int FILE_FIELD_NUMBER = 4; + + /** + * + * + *
            +   * A file, e.g., an audio summary.
            +   * 
            + * + * .google.cloud.discoveryengine.v1beta.AssistantContent.File file = 4; + * + * @return Whether the file field is set. + */ + @java.lang.Override + public boolean hasFile() { + return dataCase_ == 4; + } + + /** + * + * + *
            +   * A file, e.g., an audio summary.
            +   * 
            + * + * .google.cloud.discoveryengine.v1beta.AssistantContent.File file = 4; + * + * @return The file. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AssistantContent.File getFile() { + if (dataCase_ == 4) { + return (com.google.cloud.discoveryengine.v1beta.AssistantContent.File) data_; + } + return com.google.cloud.discoveryengine.v1beta.AssistantContent.File.getDefaultInstance(); + } + + /** + * + * + *
            +   * A file, e.g., an audio summary.
            +   * 
            + * + * .google.cloud.discoveryengine.v1beta.AssistantContent.File file = 4; + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AssistantContent.FileOrBuilder getFileOrBuilder() { + if (dataCase_ == 4) { + return (com.google.cloud.discoveryengine.v1beta.AssistantContent.File) data_; + } + return com.google.cloud.discoveryengine.v1beta.AssistantContent.File.getDefaultInstance(); + } + + public static final int EXECUTABLE_CODE_FIELD_NUMBER = 7; + + /** + * + * + *
            +   * Code generated by the model that is meant to be executed.
            +   * 
            + * + * .google.cloud.discoveryengine.v1beta.AssistantContent.ExecutableCode executable_code = 7; + * + * + * @return Whether the executableCode field is set. + */ + @java.lang.Override + public boolean hasExecutableCode() { + return dataCase_ == 7; + } + + /** + * + * + *
            +   * Code generated by the model that is meant to be executed.
            +   * 
            + * + * .google.cloud.discoveryengine.v1beta.AssistantContent.ExecutableCode executable_code = 7; + * + * + * @return The executableCode. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AssistantContent.ExecutableCode + getExecutableCode() { + if (dataCase_ == 7) { + return (com.google.cloud.discoveryengine.v1beta.AssistantContent.ExecutableCode) data_; + } + return com.google.cloud.discoveryengine.v1beta.AssistantContent.ExecutableCode + .getDefaultInstance(); + } + + /** + * + * + *
            +   * Code generated by the model that is meant to be executed.
            +   * 
            + * + * .google.cloud.discoveryengine.v1beta.AssistantContent.ExecutableCode executable_code = 7; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AssistantContent.ExecutableCodeOrBuilder + getExecutableCodeOrBuilder() { + if (dataCase_ == 7) { + return (com.google.cloud.discoveryengine.v1beta.AssistantContent.ExecutableCode) data_; + } + return com.google.cloud.discoveryengine.v1beta.AssistantContent.ExecutableCode + .getDefaultInstance(); + } + + public static final int CODE_EXECUTION_RESULT_FIELD_NUMBER = 8; + + /** + * + * + *
            +   * Result of executing an ExecutableCode.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AssistantContent.CodeExecutionResult code_execution_result = 8; + * + * + * @return Whether the codeExecutionResult field is set. + */ + @java.lang.Override + public boolean hasCodeExecutionResult() { + return dataCase_ == 8; + } + + /** + * + * + *
            +   * Result of executing an ExecutableCode.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AssistantContent.CodeExecutionResult code_execution_result = 8; + * + * + * @return The codeExecutionResult. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AssistantContent.CodeExecutionResult + getCodeExecutionResult() { + if (dataCase_ == 8) { + return (com.google.cloud.discoveryengine.v1beta.AssistantContent.CodeExecutionResult) data_; + } + return com.google.cloud.discoveryengine.v1beta.AssistantContent.CodeExecutionResult + .getDefaultInstance(); + } + + /** + * + * + *
            +   * Result of executing an ExecutableCode.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AssistantContent.CodeExecutionResult code_execution_result = 8; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AssistantContent.CodeExecutionResultOrBuilder + getCodeExecutionResultOrBuilder() { + if (dataCase_ == 8) { + return (com.google.cloud.discoveryengine.v1beta.AssistantContent.CodeExecutionResult) data_; + } + return com.google.cloud.discoveryengine.v1beta.AssistantContent.CodeExecutionResult + .getDefaultInstance(); + } + + public static final int ROLE_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object role_ = ""; + + /** + * + * + *
            +   * The producer of the content. Can be "model" or "user".
            +   * 
            + * + * string role = 1; + * + * @return The role. + */ + @java.lang.Override + public java.lang.String getRole() { + java.lang.Object ref = role_; + 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(); + role_ = s; + return s; + } + } + + /** + * + * + *
            +   * The producer of the content. Can be "model" or "user".
            +   * 
            + * + * string role = 1; + * + * @return The bytes for role. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRoleBytes() { + java.lang.Object ref = role_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + role_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int THOUGHT_FIELD_NUMBER = 6; + private boolean thought_ = false; + + /** + * + * + *
            +   * Optional. Indicates if the part is thought from the model.
            +   * 
            + * + * bool thought = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The thought. + */ + @java.lang.Override + public boolean getThought() { + return thought_; + } + + 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(role_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, role_); + } + if (dataCase_ == 2) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, data_); + } + if (dataCase_ == 3) { + output.writeMessage(3, (com.google.cloud.discoveryengine.v1beta.AssistantContent.Blob) data_); + } + if (dataCase_ == 4) { + output.writeMessage(4, (com.google.cloud.discoveryengine.v1beta.AssistantContent.File) data_); + } + if (thought_ != false) { + output.writeBool(6, thought_); + } + if (dataCase_ == 7) { + output.writeMessage( + 7, (com.google.cloud.discoveryengine.v1beta.AssistantContent.ExecutableCode) data_); + } + if (dataCase_ == 8) { + output.writeMessage( + 8, (com.google.cloud.discoveryengine.v1beta.AssistantContent.CodeExecutionResult) data_); + } + 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(role_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, role_); + } + if (dataCase_ == 2) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, data_); + } + if (dataCase_ == 3) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 3, (com.google.cloud.discoveryengine.v1beta.AssistantContent.Blob) data_); + } + if (dataCase_ == 4) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 4, (com.google.cloud.discoveryengine.v1beta.AssistantContent.File) data_); + } + if (thought_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(6, thought_); + } + if (dataCase_ == 7) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 7, (com.google.cloud.discoveryengine.v1beta.AssistantContent.ExecutableCode) data_); + } + if (dataCase_ == 8) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 8, + (com.google.cloud.discoveryengine.v1beta.AssistantContent.CodeExecutionResult) data_); + } + 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.discoveryengine.v1beta.AssistantContent)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1beta.AssistantContent other = + (com.google.cloud.discoveryengine.v1beta.AssistantContent) obj; + + if (!getRole().equals(other.getRole())) return false; + if (getThought() != other.getThought()) return false; + if (!getDataCase().equals(other.getDataCase())) return false; + switch (dataCase_) { + case 2: + if (!getText().equals(other.getText())) return false; + break; + case 3: + if (!getInlineData().equals(other.getInlineData())) return false; + break; + case 4: + if (!getFile().equals(other.getFile())) return false; + break; + case 7: + if (!getExecutableCode().equals(other.getExecutableCode())) return false; + break; + case 8: + if (!getCodeExecutionResult().equals(other.getCodeExecutionResult())) return false; + break; + case 0: + default: + } + 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) + ROLE_FIELD_NUMBER; + hash = (53 * hash) + getRole().hashCode(); + hash = (37 * hash) + THOUGHT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getThought()); + switch (dataCase_) { + case 2: + hash = (37 * hash) + TEXT_FIELD_NUMBER; + hash = (53 * hash) + getText().hashCode(); + break; + case 3: + hash = (37 * hash) + INLINE_DATA_FIELD_NUMBER; + hash = (53 * hash) + getInlineData().hashCode(); + break; + case 4: + hash = (37 * hash) + FILE_FIELD_NUMBER; + hash = (53 * hash) + getFile().hashCode(); + break; + case 7: + hash = (37 * hash) + EXECUTABLE_CODE_FIELD_NUMBER; + hash = (53 * hash) + getExecutableCode().hashCode(); + break; + case 8: + hash = (37 * hash) + CODE_EXECUTION_RESULT_FIELD_NUMBER; + hash = (53 * hash) + getCodeExecutionResult().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1beta.AssistantContent parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.AssistantContent 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.discoveryengine.v1beta.AssistantContent parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.AssistantContent 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.discoveryengine.v1beta.AssistantContent parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.AssistantContent parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1beta.AssistantContent parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.AssistantContent 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.discoveryengine.v1beta.AssistantContent parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.AssistantContent 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.discoveryengine.v1beta.AssistantContent parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.AssistantContent 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.discoveryengine.v1beta.AssistantContent 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; + } + + /** + * + * + *
            +   * Multi-modal content.
            +   * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.AssistantContent} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.AssistantContent) + com.google.cloud.discoveryengine.v1beta.AssistantContentOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.AssistAnswerProto + .internal_static_google_cloud_discoveryengine_v1beta_AssistantContent_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.AssistAnswerProto + .internal_static_google_cloud_discoveryengine_v1beta_AssistantContent_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.AssistantContent.class, + com.google.cloud.discoveryengine.v1beta.AssistantContent.Builder.class); + } + + // Construct using com.google.cloud.discoveryengine.v1beta.AssistantContent.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (inlineDataBuilder_ != null) { + inlineDataBuilder_.clear(); + } + if (fileBuilder_ != null) { + fileBuilder_.clear(); + } + if (executableCodeBuilder_ != null) { + executableCodeBuilder_.clear(); + } + if (codeExecutionResultBuilder_ != null) { + codeExecutionResultBuilder_.clear(); + } + role_ = ""; + thought_ = false; + dataCase_ = 0; + data_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1beta.AssistAnswerProto + .internal_static_google_cloud_discoveryengine_v1beta_AssistantContent_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AssistantContent getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1beta.AssistantContent.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AssistantContent build() { + com.google.cloud.discoveryengine.v1beta.AssistantContent result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AssistantContent buildPartial() { + com.google.cloud.discoveryengine.v1beta.AssistantContent result = + new com.google.cloud.discoveryengine.v1beta.AssistantContent(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.discoveryengine.v1beta.AssistantContent result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000020) != 0)) { + result.role_ = role_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.thought_ = thought_; + } + } + + private void buildPartialOneofs( + com.google.cloud.discoveryengine.v1beta.AssistantContent result) { + result.dataCase_ = dataCase_; + result.data_ = this.data_; + if (dataCase_ == 3 && inlineDataBuilder_ != null) { + result.data_ = inlineDataBuilder_.build(); + } + if (dataCase_ == 4 && fileBuilder_ != null) { + result.data_ = fileBuilder_.build(); + } + if (dataCase_ == 7 && executableCodeBuilder_ != null) { + result.data_ = executableCodeBuilder_.build(); + } + if (dataCase_ == 8 && codeExecutionResultBuilder_ != null) { + result.data_ = codeExecutionResultBuilder_.build(); + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.discoveryengine.v1beta.AssistantContent) { + return mergeFrom((com.google.cloud.discoveryengine.v1beta.AssistantContent) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.discoveryengine.v1beta.AssistantContent other) { + if (other == com.google.cloud.discoveryengine.v1beta.AssistantContent.getDefaultInstance()) + return this; + if (!other.getRole().isEmpty()) { + role_ = other.role_; + bitField0_ |= 0x00000020; + onChanged(); + } + if (other.getThought() != false) { + setThought(other.getThought()); + } + switch (other.getDataCase()) { + case TEXT: + { + dataCase_ = 2; + data_ = other.data_; + onChanged(); + break; + } + case INLINE_DATA: + { + mergeInlineData(other.getInlineData()); + break; + } + case FILE: + { + mergeFile(other.getFile()); + break; + } + case EXECUTABLE_CODE: + { + mergeExecutableCode(other.getExecutableCode()); + break; + } + case CODE_EXECUTION_RESULT: + { + mergeCodeExecutionResult(other.getCodeExecutionResult()); + break; + } + case DATA_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + role_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 10 + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + dataCase_ = 2; + data_ = s; + break; + } // case 18 + case 26: + { + input.readMessage( + internalGetInlineDataFieldBuilder().getBuilder(), extensionRegistry); + dataCase_ = 3; + break; + } // case 26 + case 34: + { + input.readMessage(internalGetFileFieldBuilder().getBuilder(), extensionRegistry); + dataCase_ = 4; + break; + } // case 34 + case 48: + { + thought_ = input.readBool(); + bitField0_ |= 0x00000040; + break; + } // case 48 + case 58: + { + input.readMessage( + internalGetExecutableCodeFieldBuilder().getBuilder(), extensionRegistry); + dataCase_ = 7; + break; + } // case 58 + case 66: + { + input.readMessage( + internalGetCodeExecutionResultFieldBuilder().getBuilder(), extensionRegistry); + dataCase_ = 8; + break; + } // case 66 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int dataCase_ = 0; + private java.lang.Object data_; + + public DataCase getDataCase() { + return DataCase.forNumber(dataCase_); + } + + public Builder clearData() { + dataCase_ = 0; + data_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + /** + * + * + *
            +     * Inline text.
            +     * 
            + * + * string text = 2; + * + * @return Whether the text field is set. + */ + @java.lang.Override + public boolean hasText() { + return dataCase_ == 2; + } + + /** + * + * + *
            +     * Inline text.
            +     * 
            + * + * string text = 2; + * + * @return The text. + */ + @java.lang.Override + public java.lang.String getText() { + java.lang.Object ref = ""; + if (dataCase_ == 2) { + ref = data_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (dataCase_ == 2) { + data_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
            +     * Inline text.
            +     * 
            + * + * string text = 2; + * + * @return The bytes for text. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTextBytes() { + java.lang.Object ref = ""; + if (dataCase_ == 2) { + ref = data_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (dataCase_ == 2) { + data_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
            +     * Inline text.
            +     * 
            + * + * string text = 2; + * + * @param value The text to set. + * @return This builder for chaining. + */ + public Builder setText(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + dataCase_ = 2; + data_ = value; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Inline text.
            +     * 
            + * + * string text = 2; + * + * @return This builder for chaining. + */ + public Builder clearText() { + if (dataCase_ == 2) { + dataCase_ = 0; + data_ = null; + onChanged(); + } + return this; + } + + /** + * + * + *
            +     * Inline text.
            +     * 
            + * + * string text = 2; + * + * @param value The bytes for text to set. + * @return This builder for chaining. + */ + public Builder setTextBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + dataCase_ = 2; + data_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.AssistantContent.Blob, + com.google.cloud.discoveryengine.v1beta.AssistantContent.Blob.Builder, + com.google.cloud.discoveryengine.v1beta.AssistantContent.BlobOrBuilder> + inlineDataBuilder_; + + /** + * + * + *
            +     * Inline binary data.
            +     * 
            + * + * .google.cloud.discoveryengine.v1beta.AssistantContent.Blob inline_data = 3; + * + * @return Whether the inlineData field is set. + */ + @java.lang.Override + public boolean hasInlineData() { + return dataCase_ == 3; + } + + /** + * + * + *
            +     * Inline binary data.
            +     * 
            + * + * .google.cloud.discoveryengine.v1beta.AssistantContent.Blob inline_data = 3; + * + * @return The inlineData. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AssistantContent.Blob getInlineData() { + if (inlineDataBuilder_ == null) { + if (dataCase_ == 3) { + return (com.google.cloud.discoveryengine.v1beta.AssistantContent.Blob) data_; + } + return com.google.cloud.discoveryengine.v1beta.AssistantContent.Blob.getDefaultInstance(); + } else { + if (dataCase_ == 3) { + return inlineDataBuilder_.getMessage(); + } + return com.google.cloud.discoveryengine.v1beta.AssistantContent.Blob.getDefaultInstance(); + } + } + + /** + * + * + *
            +     * Inline binary data.
            +     * 
            + * + * .google.cloud.discoveryengine.v1beta.AssistantContent.Blob inline_data = 3; + */ + public Builder setInlineData( + com.google.cloud.discoveryengine.v1beta.AssistantContent.Blob value) { + if (inlineDataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + data_ = value; + onChanged(); + } else { + inlineDataBuilder_.setMessage(value); + } + dataCase_ = 3; + return this; + } + + /** + * + * + *
            +     * Inline binary data.
            +     * 
            + * + * .google.cloud.discoveryengine.v1beta.AssistantContent.Blob inline_data = 3; + */ + public Builder setInlineData( + com.google.cloud.discoveryengine.v1beta.AssistantContent.Blob.Builder builderForValue) { + if (inlineDataBuilder_ == null) { + data_ = builderForValue.build(); + onChanged(); + } else { + inlineDataBuilder_.setMessage(builderForValue.build()); + } + dataCase_ = 3; + return this; + } + + /** + * + * + *
            +     * Inline binary data.
            +     * 
            + * + * .google.cloud.discoveryengine.v1beta.AssistantContent.Blob inline_data = 3; + */ + public Builder mergeInlineData( + com.google.cloud.discoveryengine.v1beta.AssistantContent.Blob value) { + if (inlineDataBuilder_ == null) { + if (dataCase_ == 3 + && data_ + != com.google.cloud.discoveryengine.v1beta.AssistantContent.Blob + .getDefaultInstance()) { + data_ = + com.google.cloud.discoveryengine.v1beta.AssistantContent.Blob.newBuilder( + (com.google.cloud.discoveryengine.v1beta.AssistantContent.Blob) data_) + .mergeFrom(value) + .buildPartial(); + } else { + data_ = value; + } + onChanged(); + } else { + if (dataCase_ == 3) { + inlineDataBuilder_.mergeFrom(value); + } else { + inlineDataBuilder_.setMessage(value); + } + } + dataCase_ = 3; + return this; + } + + /** + * + * + *
            +     * Inline binary data.
            +     * 
            + * + * .google.cloud.discoveryengine.v1beta.AssistantContent.Blob inline_data = 3; + */ + public Builder clearInlineData() { + if (inlineDataBuilder_ == null) { + if (dataCase_ == 3) { + dataCase_ = 0; + data_ = null; + onChanged(); + } + } else { + if (dataCase_ == 3) { + dataCase_ = 0; + data_ = null; + } + inlineDataBuilder_.clear(); + } + return this; + } + + /** + * + * + *
            +     * Inline binary data.
            +     * 
            + * + * .google.cloud.discoveryengine.v1beta.AssistantContent.Blob inline_data = 3; + */ + public com.google.cloud.discoveryengine.v1beta.AssistantContent.Blob.Builder + getInlineDataBuilder() { + return internalGetInlineDataFieldBuilder().getBuilder(); + } + + /** + * + * + *
            +     * Inline binary data.
            +     * 
            + * + * .google.cloud.discoveryengine.v1beta.AssistantContent.Blob inline_data = 3; + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AssistantContent.BlobOrBuilder + getInlineDataOrBuilder() { + if ((dataCase_ == 3) && (inlineDataBuilder_ != null)) { + return inlineDataBuilder_.getMessageOrBuilder(); + } else { + if (dataCase_ == 3) { + return (com.google.cloud.discoveryengine.v1beta.AssistantContent.Blob) data_; + } + return com.google.cloud.discoveryengine.v1beta.AssistantContent.Blob.getDefaultInstance(); + } + } + + /** + * + * + *
            +     * Inline binary data.
            +     * 
            + * + * .google.cloud.discoveryengine.v1beta.AssistantContent.Blob inline_data = 3; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.AssistantContent.Blob, + com.google.cloud.discoveryengine.v1beta.AssistantContent.Blob.Builder, + com.google.cloud.discoveryengine.v1beta.AssistantContent.BlobOrBuilder> + internalGetInlineDataFieldBuilder() { + if (inlineDataBuilder_ == null) { + if (!(dataCase_ == 3)) { + data_ = + com.google.cloud.discoveryengine.v1beta.AssistantContent.Blob.getDefaultInstance(); + } + inlineDataBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.AssistantContent.Blob, + com.google.cloud.discoveryengine.v1beta.AssistantContent.Blob.Builder, + com.google.cloud.discoveryengine.v1beta.AssistantContent.BlobOrBuilder>( + (com.google.cloud.discoveryengine.v1beta.AssistantContent.Blob) data_, + getParentForChildren(), + isClean()); + data_ = null; + } + dataCase_ = 3; + onChanged(); + return inlineDataBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.AssistantContent.File, + com.google.cloud.discoveryengine.v1beta.AssistantContent.File.Builder, + com.google.cloud.discoveryengine.v1beta.AssistantContent.FileOrBuilder> + fileBuilder_; + + /** + * + * + *
            +     * A file, e.g., an audio summary.
            +     * 
            + * + * .google.cloud.discoveryengine.v1beta.AssistantContent.File file = 4; + * + * @return Whether the file field is set. + */ + @java.lang.Override + public boolean hasFile() { + return dataCase_ == 4; + } + + /** + * + * + *
            +     * A file, e.g., an audio summary.
            +     * 
            + * + * .google.cloud.discoveryengine.v1beta.AssistantContent.File file = 4; + * + * @return The file. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AssistantContent.File getFile() { + if (fileBuilder_ == null) { + if (dataCase_ == 4) { + return (com.google.cloud.discoveryengine.v1beta.AssistantContent.File) data_; + } + return com.google.cloud.discoveryengine.v1beta.AssistantContent.File.getDefaultInstance(); + } else { + if (dataCase_ == 4) { + return fileBuilder_.getMessage(); + } + return com.google.cloud.discoveryengine.v1beta.AssistantContent.File.getDefaultInstance(); + } + } + + /** + * + * + *
            +     * A file, e.g., an audio summary.
            +     * 
            + * + * .google.cloud.discoveryengine.v1beta.AssistantContent.File file = 4; + */ + public Builder setFile(com.google.cloud.discoveryengine.v1beta.AssistantContent.File value) { + if (fileBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + data_ = value; + onChanged(); + } else { + fileBuilder_.setMessage(value); + } + dataCase_ = 4; + return this; + } + + /** + * + * + *
            +     * A file, e.g., an audio summary.
            +     * 
            + * + * .google.cloud.discoveryengine.v1beta.AssistantContent.File file = 4; + */ + public Builder setFile( + com.google.cloud.discoveryengine.v1beta.AssistantContent.File.Builder builderForValue) { + if (fileBuilder_ == null) { + data_ = builderForValue.build(); + onChanged(); + } else { + fileBuilder_.setMessage(builderForValue.build()); + } + dataCase_ = 4; + return this; + } + + /** + * + * + *
            +     * A file, e.g., an audio summary.
            +     * 
            + * + * .google.cloud.discoveryengine.v1beta.AssistantContent.File file = 4; + */ + public Builder mergeFile(com.google.cloud.discoveryengine.v1beta.AssistantContent.File value) { + if (fileBuilder_ == null) { + if (dataCase_ == 4 + && data_ + != com.google.cloud.discoveryengine.v1beta.AssistantContent.File + .getDefaultInstance()) { + data_ = + com.google.cloud.discoveryengine.v1beta.AssistantContent.File.newBuilder( + (com.google.cloud.discoveryengine.v1beta.AssistantContent.File) data_) + .mergeFrom(value) + .buildPartial(); + } else { + data_ = value; + } + onChanged(); + } else { + if (dataCase_ == 4) { + fileBuilder_.mergeFrom(value); + } else { + fileBuilder_.setMessage(value); + } + } + dataCase_ = 4; + return this; + } + + /** + * + * + *
            +     * A file, e.g., an audio summary.
            +     * 
            + * + * .google.cloud.discoveryengine.v1beta.AssistantContent.File file = 4; + */ + public Builder clearFile() { + if (fileBuilder_ == null) { + if (dataCase_ == 4) { + dataCase_ = 0; + data_ = null; + onChanged(); + } + } else { + if (dataCase_ == 4) { + dataCase_ = 0; + data_ = null; + } + fileBuilder_.clear(); + } + return this; + } + + /** + * + * + *
            +     * A file, e.g., an audio summary.
            +     * 
            + * + * .google.cloud.discoveryengine.v1beta.AssistantContent.File file = 4; + */ + public com.google.cloud.discoveryengine.v1beta.AssistantContent.File.Builder getFileBuilder() { + return internalGetFileFieldBuilder().getBuilder(); + } + + /** + * + * + *
            +     * A file, e.g., an audio summary.
            +     * 
            + * + * .google.cloud.discoveryengine.v1beta.AssistantContent.File file = 4; + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AssistantContent.FileOrBuilder + getFileOrBuilder() { + if ((dataCase_ == 4) && (fileBuilder_ != null)) { + return fileBuilder_.getMessageOrBuilder(); + } else { + if (dataCase_ == 4) { + return (com.google.cloud.discoveryengine.v1beta.AssistantContent.File) data_; + } + return com.google.cloud.discoveryengine.v1beta.AssistantContent.File.getDefaultInstance(); + } + } + + /** + * + * + *
            +     * A file, e.g., an audio summary.
            +     * 
            + * + * .google.cloud.discoveryengine.v1beta.AssistantContent.File file = 4; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.AssistantContent.File, + com.google.cloud.discoveryengine.v1beta.AssistantContent.File.Builder, + com.google.cloud.discoveryengine.v1beta.AssistantContent.FileOrBuilder> + internalGetFileFieldBuilder() { + if (fileBuilder_ == null) { + if (!(dataCase_ == 4)) { + data_ = + com.google.cloud.discoveryengine.v1beta.AssistantContent.File.getDefaultInstance(); + } + fileBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.AssistantContent.File, + com.google.cloud.discoveryengine.v1beta.AssistantContent.File.Builder, + com.google.cloud.discoveryengine.v1beta.AssistantContent.FileOrBuilder>( + (com.google.cloud.discoveryengine.v1beta.AssistantContent.File) data_, + getParentForChildren(), + isClean()); + data_ = null; + } + dataCase_ = 4; + onChanged(); + return fileBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.AssistantContent.ExecutableCode, + com.google.cloud.discoveryengine.v1beta.AssistantContent.ExecutableCode.Builder, + com.google.cloud.discoveryengine.v1beta.AssistantContent.ExecutableCodeOrBuilder> + executableCodeBuilder_; + + /** + * + * + *
            +     * Code generated by the model that is meant to be executed.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AssistantContent.ExecutableCode executable_code = 7; + * + * + * @return Whether the executableCode field is set. + */ + @java.lang.Override + public boolean hasExecutableCode() { + return dataCase_ == 7; + } + + /** + * + * + *
            +     * Code generated by the model that is meant to be executed.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AssistantContent.ExecutableCode executable_code = 7; + * + * + * @return The executableCode. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AssistantContent.ExecutableCode + getExecutableCode() { + if (executableCodeBuilder_ == null) { + if (dataCase_ == 7) { + return (com.google.cloud.discoveryengine.v1beta.AssistantContent.ExecutableCode) data_; + } + return com.google.cloud.discoveryengine.v1beta.AssistantContent.ExecutableCode + .getDefaultInstance(); + } else { + if (dataCase_ == 7) { + return executableCodeBuilder_.getMessage(); + } + return com.google.cloud.discoveryengine.v1beta.AssistantContent.ExecutableCode + .getDefaultInstance(); + } + } + + /** + * + * + *
            +     * Code generated by the model that is meant to be executed.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AssistantContent.ExecutableCode executable_code = 7; + * + */ + public Builder setExecutableCode( + com.google.cloud.discoveryengine.v1beta.AssistantContent.ExecutableCode value) { + if (executableCodeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + data_ = value; + onChanged(); + } else { + executableCodeBuilder_.setMessage(value); + } + dataCase_ = 7; + return this; + } + + /** + * + * + *
            +     * Code generated by the model that is meant to be executed.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AssistantContent.ExecutableCode executable_code = 7; + * + */ + public Builder setExecutableCode( + com.google.cloud.discoveryengine.v1beta.AssistantContent.ExecutableCode.Builder + builderForValue) { + if (executableCodeBuilder_ == null) { + data_ = builderForValue.build(); + onChanged(); + } else { + executableCodeBuilder_.setMessage(builderForValue.build()); + } + dataCase_ = 7; + return this; + } + + /** + * + * + *
            +     * Code generated by the model that is meant to be executed.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AssistantContent.ExecutableCode executable_code = 7; + * + */ + public Builder mergeExecutableCode( + com.google.cloud.discoveryengine.v1beta.AssistantContent.ExecutableCode value) { + if (executableCodeBuilder_ == null) { + if (dataCase_ == 7 + && data_ + != com.google.cloud.discoveryengine.v1beta.AssistantContent.ExecutableCode + .getDefaultInstance()) { + data_ = + com.google.cloud.discoveryengine.v1beta.AssistantContent.ExecutableCode.newBuilder( + (com.google.cloud.discoveryengine.v1beta.AssistantContent.ExecutableCode) + data_) + .mergeFrom(value) + .buildPartial(); + } else { + data_ = value; + } + onChanged(); + } else { + if (dataCase_ == 7) { + executableCodeBuilder_.mergeFrom(value); + } else { + executableCodeBuilder_.setMessage(value); + } + } + dataCase_ = 7; + return this; + } + + /** + * + * + *
            +     * Code generated by the model that is meant to be executed.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AssistantContent.ExecutableCode executable_code = 7; + * + */ + public Builder clearExecutableCode() { + if (executableCodeBuilder_ == null) { + if (dataCase_ == 7) { + dataCase_ = 0; + data_ = null; + onChanged(); + } + } else { + if (dataCase_ == 7) { + dataCase_ = 0; + data_ = null; + } + executableCodeBuilder_.clear(); + } + return this; + } + + /** + * + * + *
            +     * Code generated by the model that is meant to be executed.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AssistantContent.ExecutableCode executable_code = 7; + * + */ + public com.google.cloud.discoveryengine.v1beta.AssistantContent.ExecutableCode.Builder + getExecutableCodeBuilder() { + return internalGetExecutableCodeFieldBuilder().getBuilder(); + } + + /** + * + * + *
            +     * Code generated by the model that is meant to be executed.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AssistantContent.ExecutableCode executable_code = 7; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AssistantContent.ExecutableCodeOrBuilder + getExecutableCodeOrBuilder() { + if ((dataCase_ == 7) && (executableCodeBuilder_ != null)) { + return executableCodeBuilder_.getMessageOrBuilder(); + } else { + if (dataCase_ == 7) { + return (com.google.cloud.discoveryengine.v1beta.AssistantContent.ExecutableCode) data_; + } + return com.google.cloud.discoveryengine.v1beta.AssistantContent.ExecutableCode + .getDefaultInstance(); + } + } + + /** + * + * + *
            +     * Code generated by the model that is meant to be executed.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AssistantContent.ExecutableCode executable_code = 7; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.AssistantContent.ExecutableCode, + com.google.cloud.discoveryengine.v1beta.AssistantContent.ExecutableCode.Builder, + com.google.cloud.discoveryengine.v1beta.AssistantContent.ExecutableCodeOrBuilder> + internalGetExecutableCodeFieldBuilder() { + if (executableCodeBuilder_ == null) { + if (!(dataCase_ == 7)) { + data_ = + com.google.cloud.discoveryengine.v1beta.AssistantContent.ExecutableCode + .getDefaultInstance(); + } + executableCodeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.AssistantContent.ExecutableCode, + com.google.cloud.discoveryengine.v1beta.AssistantContent.ExecutableCode.Builder, + com.google.cloud.discoveryengine.v1beta.AssistantContent.ExecutableCodeOrBuilder>( + (com.google.cloud.discoveryengine.v1beta.AssistantContent.ExecutableCode) data_, + getParentForChildren(), + isClean()); + data_ = null; + } + dataCase_ = 7; + onChanged(); + return executableCodeBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.AssistantContent.CodeExecutionResult, + com.google.cloud.discoveryengine.v1beta.AssistantContent.CodeExecutionResult.Builder, + com.google.cloud.discoveryengine.v1beta.AssistantContent.CodeExecutionResultOrBuilder> + codeExecutionResultBuilder_; + + /** + * + * + *
            +     * Result of executing an ExecutableCode.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AssistantContent.CodeExecutionResult code_execution_result = 8; + * + * + * @return Whether the codeExecutionResult field is set. + */ + @java.lang.Override + public boolean hasCodeExecutionResult() { + return dataCase_ == 8; + } + + /** + * + * + *
            +     * Result of executing an ExecutableCode.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AssistantContent.CodeExecutionResult code_execution_result = 8; + * + * + * @return The codeExecutionResult. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AssistantContent.CodeExecutionResult + getCodeExecutionResult() { + if (codeExecutionResultBuilder_ == null) { + if (dataCase_ == 8) { + return (com.google.cloud.discoveryengine.v1beta.AssistantContent.CodeExecutionResult) + data_; + } + return com.google.cloud.discoveryengine.v1beta.AssistantContent.CodeExecutionResult + .getDefaultInstance(); + } else { + if (dataCase_ == 8) { + return codeExecutionResultBuilder_.getMessage(); + } + return com.google.cloud.discoveryengine.v1beta.AssistantContent.CodeExecutionResult + .getDefaultInstance(); + } + } + + /** + * + * + *
            +     * Result of executing an ExecutableCode.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AssistantContent.CodeExecutionResult code_execution_result = 8; + * + */ + public Builder setCodeExecutionResult( + com.google.cloud.discoveryengine.v1beta.AssistantContent.CodeExecutionResult value) { + if (codeExecutionResultBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + data_ = value; + onChanged(); + } else { + codeExecutionResultBuilder_.setMessage(value); + } + dataCase_ = 8; + return this; + } + + /** + * + * + *
            +     * Result of executing an ExecutableCode.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AssistantContent.CodeExecutionResult code_execution_result = 8; + * + */ + public Builder setCodeExecutionResult( + com.google.cloud.discoveryengine.v1beta.AssistantContent.CodeExecutionResult.Builder + builderForValue) { + if (codeExecutionResultBuilder_ == null) { + data_ = builderForValue.build(); + onChanged(); + } else { + codeExecutionResultBuilder_.setMessage(builderForValue.build()); + } + dataCase_ = 8; + return this; + } + + /** + * + * + *
            +     * Result of executing an ExecutableCode.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AssistantContent.CodeExecutionResult code_execution_result = 8; + * + */ + public Builder mergeCodeExecutionResult( + com.google.cloud.discoveryengine.v1beta.AssistantContent.CodeExecutionResult value) { + if (codeExecutionResultBuilder_ == null) { + if (dataCase_ == 8 + && data_ + != com.google.cloud.discoveryengine.v1beta.AssistantContent.CodeExecutionResult + .getDefaultInstance()) { + data_ = + com.google.cloud.discoveryengine.v1beta.AssistantContent.CodeExecutionResult + .newBuilder( + (com.google.cloud.discoveryengine.v1beta.AssistantContent.CodeExecutionResult) + data_) + .mergeFrom(value) + .buildPartial(); + } else { + data_ = value; + } + onChanged(); + } else { + if (dataCase_ == 8) { + codeExecutionResultBuilder_.mergeFrom(value); + } else { + codeExecutionResultBuilder_.setMessage(value); + } + } + dataCase_ = 8; + return this; + } + + /** + * + * + *
            +     * Result of executing an ExecutableCode.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AssistantContent.CodeExecutionResult code_execution_result = 8; + * + */ + public Builder clearCodeExecutionResult() { + if (codeExecutionResultBuilder_ == null) { + if (dataCase_ == 8) { + dataCase_ = 0; + data_ = null; + onChanged(); + } + } else { + if (dataCase_ == 8) { + dataCase_ = 0; + data_ = null; + } + codeExecutionResultBuilder_.clear(); + } + return this; + } + + /** + * + * + *
            +     * Result of executing an ExecutableCode.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AssistantContent.CodeExecutionResult code_execution_result = 8; + * + */ + public com.google.cloud.discoveryengine.v1beta.AssistantContent.CodeExecutionResult.Builder + getCodeExecutionResultBuilder() { + return internalGetCodeExecutionResultFieldBuilder().getBuilder(); + } + + /** + * + * + *
            +     * Result of executing an ExecutableCode.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AssistantContent.CodeExecutionResult code_execution_result = 8; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AssistantContent.CodeExecutionResultOrBuilder + getCodeExecutionResultOrBuilder() { + if ((dataCase_ == 8) && (codeExecutionResultBuilder_ != null)) { + return codeExecutionResultBuilder_.getMessageOrBuilder(); + } else { + if (dataCase_ == 8) { + return (com.google.cloud.discoveryengine.v1beta.AssistantContent.CodeExecutionResult) + data_; + } + return com.google.cloud.discoveryengine.v1beta.AssistantContent.CodeExecutionResult + .getDefaultInstance(); + } + } + + /** + * + * + *
            +     * Result of executing an ExecutableCode.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AssistantContent.CodeExecutionResult code_execution_result = 8; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.AssistantContent.CodeExecutionResult, + com.google.cloud.discoveryengine.v1beta.AssistantContent.CodeExecutionResult.Builder, + com.google.cloud.discoveryengine.v1beta.AssistantContent.CodeExecutionResultOrBuilder> + internalGetCodeExecutionResultFieldBuilder() { + if (codeExecutionResultBuilder_ == null) { + if (!(dataCase_ == 8)) { + data_ = + com.google.cloud.discoveryengine.v1beta.AssistantContent.CodeExecutionResult + .getDefaultInstance(); + } + codeExecutionResultBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.AssistantContent.CodeExecutionResult, + com.google.cloud.discoveryengine.v1beta.AssistantContent.CodeExecutionResult + .Builder, + com.google.cloud.discoveryengine.v1beta.AssistantContent + .CodeExecutionResultOrBuilder>( + (com.google.cloud.discoveryengine.v1beta.AssistantContent.CodeExecutionResult) + data_, + getParentForChildren(), + isClean()); + data_ = null; + } + dataCase_ = 8; + onChanged(); + return codeExecutionResultBuilder_; + } + + private java.lang.Object role_ = ""; + + /** + * + * + *
            +     * The producer of the content. Can be "model" or "user".
            +     * 
            + * + * string role = 1; + * + * @return The role. + */ + public java.lang.String getRole() { + java.lang.Object ref = role_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + role_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
            +     * The producer of the content. Can be "model" or "user".
            +     * 
            + * + * string role = 1; + * + * @return The bytes for role. + */ + public com.google.protobuf.ByteString getRoleBytes() { + java.lang.Object ref = role_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + role_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
            +     * The producer of the content. Can be "model" or "user".
            +     * 
            + * + * string role = 1; + * + * @param value The role to set. + * @return This builder for chaining. + */ + public Builder setRole(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + role_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
            +     * The producer of the content. Can be "model" or "user".
            +     * 
            + * + * string role = 1; + * + * @return This builder for chaining. + */ + public Builder clearRole() { + role_ = getDefaultInstance().getRole(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; + } + + /** + * + * + *
            +     * The producer of the content. Can be "model" or "user".
            +     * 
            + * + * string role = 1; + * + * @param value The bytes for role to set. + * @return This builder for chaining. + */ + public Builder setRoleBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + role_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + private boolean thought_; + + /** + * + * + *
            +     * Optional. Indicates if the part is thought from the model.
            +     * 
            + * + * bool thought = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The thought. + */ + @java.lang.Override + public boolean getThought() { + return thought_; + } + + /** + * + * + *
            +     * Optional. Indicates if the part is thought from the model.
            +     * 
            + * + * bool thought = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The thought to set. + * @return This builder for chaining. + */ + public Builder setThought(boolean value) { + + thought_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Optional. Indicates if the part is thought from the model.
            +     * 
            + * + * bool thought = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearThought() { + bitField0_ = (bitField0_ & ~0x00000040); + thought_ = false; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.AssistantContent) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.AssistantContent) + private static final com.google.cloud.discoveryengine.v1beta.AssistantContent DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.discoveryengine.v1beta.AssistantContent(); + } + + public static com.google.cloud.discoveryengine.v1beta.AssistantContent getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AssistantContent parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AssistantContent getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/AssistantContentOrBuilder.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/AssistantContentOrBuilder.java new file mode 100644 index 000000000000..c3c76f0600c8 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/AssistantContentOrBuilder.java @@ -0,0 +1,268 @@ +/* + * 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/cloud/discoveryengine/v1beta/assist_answer.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.discoveryengine.v1beta; + +@com.google.protobuf.Generated +public interface AssistantContentOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.AssistantContent) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
            +   * Inline text.
            +   * 
            + * + * string text = 2; + * + * @return Whether the text field is set. + */ + boolean hasText(); + + /** + * + * + *
            +   * Inline text.
            +   * 
            + * + * string text = 2; + * + * @return The text. + */ + java.lang.String getText(); + + /** + * + * + *
            +   * Inline text.
            +   * 
            + * + * string text = 2; + * + * @return The bytes for text. + */ + com.google.protobuf.ByteString getTextBytes(); + + /** + * + * + *
            +   * Inline binary data.
            +   * 
            + * + * .google.cloud.discoveryengine.v1beta.AssistantContent.Blob inline_data = 3; + * + * @return Whether the inlineData field is set. + */ + boolean hasInlineData(); + + /** + * + * + *
            +   * Inline binary data.
            +   * 
            + * + * .google.cloud.discoveryengine.v1beta.AssistantContent.Blob inline_data = 3; + * + * @return The inlineData. + */ + com.google.cloud.discoveryengine.v1beta.AssistantContent.Blob getInlineData(); + + /** + * + * + *
            +   * Inline binary data.
            +   * 
            + * + * .google.cloud.discoveryengine.v1beta.AssistantContent.Blob inline_data = 3; + */ + com.google.cloud.discoveryengine.v1beta.AssistantContent.BlobOrBuilder getInlineDataOrBuilder(); + + /** + * + * + *
            +   * A file, e.g., an audio summary.
            +   * 
            + * + * .google.cloud.discoveryengine.v1beta.AssistantContent.File file = 4; + * + * @return Whether the file field is set. + */ + boolean hasFile(); + + /** + * + * + *
            +   * A file, e.g., an audio summary.
            +   * 
            + * + * .google.cloud.discoveryengine.v1beta.AssistantContent.File file = 4; + * + * @return The file. + */ + com.google.cloud.discoveryengine.v1beta.AssistantContent.File getFile(); + + /** + * + * + *
            +   * A file, e.g., an audio summary.
            +   * 
            + * + * .google.cloud.discoveryengine.v1beta.AssistantContent.File file = 4; + */ + com.google.cloud.discoveryengine.v1beta.AssistantContent.FileOrBuilder getFileOrBuilder(); + + /** + * + * + *
            +   * Code generated by the model that is meant to be executed.
            +   * 
            + * + * .google.cloud.discoveryengine.v1beta.AssistantContent.ExecutableCode executable_code = 7; + * + * + * @return Whether the executableCode field is set. + */ + boolean hasExecutableCode(); + + /** + * + * + *
            +   * Code generated by the model that is meant to be executed.
            +   * 
            + * + * .google.cloud.discoveryengine.v1beta.AssistantContent.ExecutableCode executable_code = 7; + * + * + * @return The executableCode. + */ + com.google.cloud.discoveryengine.v1beta.AssistantContent.ExecutableCode getExecutableCode(); + + /** + * + * + *
            +   * Code generated by the model that is meant to be executed.
            +   * 
            + * + * .google.cloud.discoveryengine.v1beta.AssistantContent.ExecutableCode executable_code = 7; + * + */ + com.google.cloud.discoveryengine.v1beta.AssistantContent.ExecutableCodeOrBuilder + getExecutableCodeOrBuilder(); + + /** + * + * + *
            +   * Result of executing an ExecutableCode.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AssistantContent.CodeExecutionResult code_execution_result = 8; + * + * + * @return Whether the codeExecutionResult field is set. + */ + boolean hasCodeExecutionResult(); + + /** + * + * + *
            +   * Result of executing an ExecutableCode.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AssistantContent.CodeExecutionResult code_execution_result = 8; + * + * + * @return The codeExecutionResult. + */ + com.google.cloud.discoveryengine.v1beta.AssistantContent.CodeExecutionResult + getCodeExecutionResult(); + + /** + * + * + *
            +   * Result of executing an ExecutableCode.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AssistantContent.CodeExecutionResult code_execution_result = 8; + * + */ + com.google.cloud.discoveryengine.v1beta.AssistantContent.CodeExecutionResultOrBuilder + getCodeExecutionResultOrBuilder(); + + /** + * + * + *
            +   * The producer of the content. Can be "model" or "user".
            +   * 
            + * + * string role = 1; + * + * @return The role. + */ + java.lang.String getRole(); + + /** + * + * + *
            +   * The producer of the content. Can be "model" or "user".
            +   * 
            + * + * string role = 1; + * + * @return The bytes for role. + */ + com.google.protobuf.ByteString getRoleBytes(); + + /** + * + * + *
            +   * Optional. Indicates if the part is thought from the model.
            +   * 
            + * + * bool thought = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The thought. + */ + boolean getThought(); + + com.google.cloud.discoveryengine.v1beta.AssistantContent.DataCase getDataCase(); +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/AssistantGroundedContent.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/AssistantGroundedContent.java new file mode 100644 index 000000000000..2df035042496 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/AssistantGroundedContent.java @@ -0,0 +1,10079 @@ +/* + * 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/cloud/discoveryengine/v1beta/assist_answer.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.discoveryengine.v1beta; + +/** + * + * + *
            + * A piece of content and possibly its grounding information.
            + *
            + * Not all content needs grounding. Phrases like "Of course, I will gladly
            + * search it for you." do not need grounding.
            + * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.AssistantGroundedContent} + */ +@com.google.protobuf.Generated +public final class AssistantGroundedContent extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.AssistantGroundedContent) + AssistantGroundedContentOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "AssistantGroundedContent"); + } + + // Use AssistantGroundedContent.newBuilder() to construct. + private AssistantGroundedContent(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private AssistantGroundedContent() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.AssistAnswerProto + .internal_static_google_cloud_discoveryengine_v1beta_AssistantGroundedContent_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.AssistAnswerProto + .internal_static_google_cloud_discoveryengine_v1beta_AssistantGroundedContent_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent.class, + com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent.Builder.class); + } + + public interface TextGroundingMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
            +     * Grounding information for parts of the text.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata.Segment segments = 4; + * + */ + java.util.List< + com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata + .Segment> + getSegmentsList(); + + /** + * + * + *
            +     * Grounding information for parts of the text.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata.Segment segments = 4; + * + */ + com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata.Segment + getSegments(int index); + + /** + * + * + *
            +     * Grounding information for parts of the text.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata.Segment segments = 4; + * + */ + int getSegmentsCount(); + + /** + * + * + *
            +     * Grounding information for parts of the text.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata.Segment segments = 4; + * + */ + java.util.List< + ? extends + com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent + .TextGroundingMetadata.SegmentOrBuilder> + getSegmentsOrBuilderList(); + + /** + * + * + *
            +     * Grounding information for parts of the text.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata.Segment segments = 4; + * + */ + com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata + .SegmentOrBuilder + getSegmentsOrBuilder(int index); + + /** + * + * + *
            +     * Grounding information for parts of the visual content.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata.VisualSegment visual_segments = 6; + * + */ + java.util.List< + com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata + .VisualSegment> + getVisualSegmentsList(); + + /** + * + * + *
            +     * Grounding information for parts of the visual content.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata.VisualSegment visual_segments = 6; + * + */ + com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata + .VisualSegment + getVisualSegments(int index); + + /** + * + * + *
            +     * Grounding information for parts of the visual content.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata.VisualSegment visual_segments = 6; + * + */ + int getVisualSegmentsCount(); + + /** + * + * + *
            +     * Grounding information for parts of the visual content.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata.VisualSegment visual_segments = 6; + * + */ + java.util.List< + ? extends + com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent + .TextGroundingMetadata.VisualSegmentOrBuilder> + getVisualSegmentsOrBuilderList(); + + /** + * + * + *
            +     * Grounding information for parts of the visual content.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata.VisualSegment visual_segments = 6; + * + */ + com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata + .VisualSegmentOrBuilder + getVisualSegmentsOrBuilder(int index); + + /** + * + * + *
            +     * References for the grounded text.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata.Reference references = 2; + * + */ + java.util.List< + com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata + .Reference> + getReferencesList(); + + /** + * + * + *
            +     * References for the grounded text.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata.Reference references = 2; + * + */ + com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata.Reference + getReferences(int index); + + /** + * + * + *
            +     * References for the grounded text.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata.Reference references = 2; + * + */ + int getReferencesCount(); + + /** + * + * + *
            +     * References for the grounded text.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata.Reference references = 2; + * + */ + java.util.List< + ? extends + com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent + .TextGroundingMetadata.ReferenceOrBuilder> + getReferencesOrBuilderList(); + + /** + * + * + *
            +     * References for the grounded text.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata.Reference references = 2; + * + */ + com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata + .ReferenceOrBuilder + getReferencesOrBuilder(int index); + } + + /** + * + * + *
            +   * Grounding details for text sources.
            +   * 
            + * + * Protobuf type {@code + * google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata} + */ + public static final class TextGroundingMetadata extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata) + TextGroundingMetadataOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "TextGroundingMetadata"); + } + + // Use TextGroundingMetadata.newBuilder() to construct. + private TextGroundingMetadata(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private TextGroundingMetadata() { + segments_ = java.util.Collections.emptyList(); + visualSegments_ = java.util.Collections.emptyList(); + references_ = java.util.Collections.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.AssistAnswerProto + .internal_static_google_cloud_discoveryengine_v1beta_AssistantGroundedContent_TextGroundingMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.AssistAnswerProto + .internal_static_google_cloud_discoveryengine_v1beta_AssistantGroundedContent_TextGroundingMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata + .class, + com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata + .Builder.class); + } + + public interface SegmentOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata.Segment) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
            +       * Zero-based index indicating the start of the segment, measured in bytes
            +       * of a UTF-8 string (i.e. characters encoded on multiple bytes have a
            +       * length of more than one).
            +       * 
            + * + * int64 start_index = 1; + * + * @return The startIndex. + */ + long getStartIndex(); + + /** + * + * + *
            +       * End of the segment, exclusive.
            +       * 
            + * + * int64 end_index = 2; + * + * @return The endIndex. + */ + long getEndIndex(); + + /** + * + * + *
            +       * References for the segment.
            +       * 
            + * + * repeated int32 reference_indices = 4; + * + * @return A list containing the referenceIndices. + */ + java.util.List getReferenceIndicesList(); + + /** + * + * + *
            +       * References for the segment.
            +       * 
            + * + * repeated int32 reference_indices = 4; + * + * @return The count of referenceIndices. + */ + int getReferenceIndicesCount(); + + /** + * + * + *
            +       * References for the segment.
            +       * 
            + * + * repeated int32 reference_indices = 4; + * + * @param index The index of the element to return. + * @return The referenceIndices at the given index. + */ + int getReferenceIndices(int index); + + /** + * + * + *
            +       * Score for the segment.
            +       * 
            + * + * float grounding_score = 5; + * + * @return The groundingScore. + */ + float getGroundingScore(); + + /** + * + * + *
            +       * The text segment itself.
            +       * 
            + * + * string text = 6; + * + * @return The text. + */ + java.lang.String getText(); + + /** + * + * + *
            +       * The text segment itself.
            +       * 
            + * + * string text = 6; + * + * @return The bytes for text. + */ + com.google.protobuf.ByteString getTextBytes(); + } + + /** + * + * + *
            +     * Grounding information for a segment of the text.
            +     * 
            + * + * Protobuf type {@code + * google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata.Segment} + */ + public static final class Segment extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata.Segment) + SegmentOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Segment"); + } + + // Use Segment.newBuilder() to construct. + private Segment(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private Segment() { + referenceIndices_ = emptyIntList(); + text_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.AssistAnswerProto + .internal_static_google_cloud_discoveryengine_v1beta_AssistantGroundedContent_TextGroundingMetadata_Segment_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.AssistAnswerProto + .internal_static_google_cloud_discoveryengine_v1beta_AssistantGroundedContent_TextGroundingMetadata_Segment_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent + .TextGroundingMetadata.Segment.class, + com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent + .TextGroundingMetadata.Segment.Builder.class); + } + + public static final int START_INDEX_FIELD_NUMBER = 1; + private long startIndex_ = 0L; + + /** + * + * + *
            +       * Zero-based index indicating the start of the segment, measured in bytes
            +       * of a UTF-8 string (i.e. characters encoded on multiple bytes have a
            +       * length of more than one).
            +       * 
            + * + * int64 start_index = 1; + * + * @return The startIndex. + */ + @java.lang.Override + public long getStartIndex() { + return startIndex_; + } + + public static final int END_INDEX_FIELD_NUMBER = 2; + private long endIndex_ = 0L; + + /** + * + * + *
            +       * End of the segment, exclusive.
            +       * 
            + * + * int64 end_index = 2; + * + * @return The endIndex. + */ + @java.lang.Override + public long getEndIndex() { + return endIndex_; + } + + public static final int REFERENCE_INDICES_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private com.google.protobuf.Internal.IntList referenceIndices_ = emptyIntList(); + + /** + * + * + *
            +       * References for the segment.
            +       * 
            + * + * repeated int32 reference_indices = 4; + * + * @return A list containing the referenceIndices. + */ + @java.lang.Override + public java.util.List getReferenceIndicesList() { + return referenceIndices_; + } + + /** + * + * + *
            +       * References for the segment.
            +       * 
            + * + * repeated int32 reference_indices = 4; + * + * @return The count of referenceIndices. + */ + public int getReferenceIndicesCount() { + return referenceIndices_.size(); + } + + /** + * + * + *
            +       * References for the segment.
            +       * 
            + * + * repeated int32 reference_indices = 4; + * + * @param index The index of the element to return. + * @return The referenceIndices at the given index. + */ + public int getReferenceIndices(int index) { + return referenceIndices_.getInt(index); + } + + private int referenceIndicesMemoizedSerializedSize = -1; + + public static final int GROUNDING_SCORE_FIELD_NUMBER = 5; + private float groundingScore_ = 0F; + + /** + * + * + *
            +       * Score for the segment.
            +       * 
            + * + * float grounding_score = 5; + * + * @return The groundingScore. + */ + @java.lang.Override + public float getGroundingScore() { + return groundingScore_; + } + + public static final int TEXT_FIELD_NUMBER = 6; + + @SuppressWarnings("serial") + private volatile java.lang.Object text_ = ""; + + /** + * + * + *
            +       * The text segment itself.
            +       * 
            + * + * string text = 6; + * + * @return The text. + */ + @java.lang.Override + public java.lang.String getText() { + java.lang.Object ref = text_; + 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(); + text_ = s; + return s; + } + } + + /** + * + * + *
            +       * The text segment itself.
            +       * 
            + * + * string text = 6; + * + * @return The bytes for text. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTextBytes() { + java.lang.Object ref = text_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + text_ = 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 { + getSerializedSize(); + if (startIndex_ != 0L) { + output.writeInt64(1, startIndex_); + } + if (endIndex_ != 0L) { + output.writeInt64(2, endIndex_); + } + if (getReferenceIndicesList().size() > 0) { + output.writeUInt32NoTag(34); + output.writeUInt32NoTag(referenceIndicesMemoizedSerializedSize); + } + for (int i = 0; i < referenceIndices_.size(); i++) { + output.writeInt32NoTag(referenceIndices_.getInt(i)); + } + if (java.lang.Float.floatToRawIntBits(groundingScore_) != 0) { + output.writeFloat(5, groundingScore_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(text_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 6, text_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (startIndex_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(1, startIndex_); + } + if (endIndex_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(2, endIndex_); + } + { + int dataSize = 0; + for (int i = 0; i < referenceIndices_.size(); i++) { + dataSize += + com.google.protobuf.CodedOutputStream.computeInt32SizeNoTag( + referenceIndices_.getInt(i)); + } + size += dataSize; + if (!getReferenceIndicesList().isEmpty()) { + size += 1; + size += com.google.protobuf.CodedOutputStream.computeInt32SizeNoTag(dataSize); + } + referenceIndicesMemoizedSerializedSize = dataSize; + } + if (java.lang.Float.floatToRawIntBits(groundingScore_) != 0) { + size += com.google.protobuf.CodedOutputStream.computeFloatSize(5, groundingScore_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(text_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(6, text_); + } + 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.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata + .Segment)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata + .Segment + other = + (com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent + .TextGroundingMetadata.Segment) + obj; + + if (getStartIndex() != other.getStartIndex()) return false; + if (getEndIndex() != other.getEndIndex()) return false; + if (!getReferenceIndicesList().equals(other.getReferenceIndicesList())) return false; + if (java.lang.Float.floatToIntBits(getGroundingScore()) + != java.lang.Float.floatToIntBits(other.getGroundingScore())) return false; + if (!getText().equals(other.getText())) 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) + START_INDEX_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getStartIndex()); + hash = (37 * hash) + END_INDEX_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getEndIndex()); + if (getReferenceIndicesCount() > 0) { + hash = (37 * hash) + REFERENCE_INDICES_FIELD_NUMBER; + hash = (53 * hash) + getReferenceIndicesList().hashCode(); + } + hash = (37 * hash) + GROUNDING_SCORE_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits(getGroundingScore()); + hash = (37 * hash) + TEXT_FIELD_NUMBER; + hash = (53 * hash) + getText().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent + .TextGroundingMetadata.Segment + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent + .TextGroundingMetadata.Segment + 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.discoveryengine.v1beta.AssistantGroundedContent + .TextGroundingMetadata.Segment + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent + .TextGroundingMetadata.Segment + 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.discoveryengine.v1beta.AssistantGroundedContent + .TextGroundingMetadata.Segment + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent + .TextGroundingMetadata.Segment + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent + .TextGroundingMetadata.Segment + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent + .TextGroundingMetadata.Segment + 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.discoveryengine.v1beta.AssistantGroundedContent + .TextGroundingMetadata.Segment + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent + .TextGroundingMetadata.Segment + 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.discoveryengine.v1beta.AssistantGroundedContent + .TextGroundingMetadata.Segment + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent + .TextGroundingMetadata.Segment + 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.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata + .Segment + 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; + } + + /** + * + * + *
            +       * Grounding information for a segment of the text.
            +       * 
            + * + * Protobuf type {@code + * google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata.Segment} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata.Segment) + com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata + .SegmentOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.AssistAnswerProto + .internal_static_google_cloud_discoveryengine_v1beta_AssistantGroundedContent_TextGroundingMetadata_Segment_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.AssistAnswerProto + .internal_static_google_cloud_discoveryengine_v1beta_AssistantGroundedContent_TextGroundingMetadata_Segment_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent + .TextGroundingMetadata.Segment.class, + com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent + .TextGroundingMetadata.Segment.Builder.class); + } + + // Construct using + // com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata.Segment.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + startIndex_ = 0L; + endIndex_ = 0L; + referenceIndices_ = emptyIntList(); + groundingScore_ = 0F; + text_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1beta.AssistAnswerProto + .internal_static_google_cloud_discoveryengine_v1beta_AssistantGroundedContent_TextGroundingMetadata_Segment_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent + .TextGroundingMetadata.Segment + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent + .TextGroundingMetadata.Segment.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent + .TextGroundingMetadata.Segment + build() { + com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata + .Segment + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent + .TextGroundingMetadata.Segment + buildPartial() { + com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata + .Segment + result = + new com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent + .TextGroundingMetadata.Segment(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata + .Segment + result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.startIndex_ = startIndex_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.endIndex_ = endIndex_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + referenceIndices_.makeImmutable(); + result.referenceIndices_ = referenceIndices_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.groundingScore_ = groundingScore_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.text_ = text_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata + .Segment) { + return mergeFrom( + (com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent + .TextGroundingMetadata.Segment) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata + .Segment + other) { + if (other + == com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent + .TextGroundingMetadata.Segment.getDefaultInstance()) return this; + if (other.getStartIndex() != 0L) { + setStartIndex(other.getStartIndex()); + } + if (other.getEndIndex() != 0L) { + setEndIndex(other.getEndIndex()); + } + if (!other.referenceIndices_.isEmpty()) { + if (referenceIndices_.isEmpty()) { + referenceIndices_ = other.referenceIndices_; + referenceIndices_.makeImmutable(); + bitField0_ |= 0x00000004; + } else { + ensureReferenceIndicesIsMutable(); + referenceIndices_.addAll(other.referenceIndices_); + } + onChanged(); + } + if (java.lang.Float.floatToRawIntBits(other.getGroundingScore()) != 0) { + setGroundingScore(other.getGroundingScore()); + } + if (!other.getText().isEmpty()) { + text_ = other.text_; + bitField0_ |= 0x00000010; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + startIndex_ = input.readInt64(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 16: + { + endIndex_ = input.readInt64(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 32: + { + int v = input.readInt32(); + ensureReferenceIndicesIsMutable(); + referenceIndices_.addInt(v); + break; + } // case 32 + case 34: + { + int length = input.readRawVarint32(); + int limit = input.pushLimit(length); + ensureReferenceIndicesIsMutable(); + while (input.getBytesUntilLimit() > 0) { + referenceIndices_.addInt(input.readInt32()); + } + input.popLimit(limit); + break; + } // case 34 + case 45: + { + groundingScore_ = input.readFloat(); + bitField0_ |= 0x00000008; + break; + } // case 45 + case 50: + { + text_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 50 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private long startIndex_; + + /** + * + * + *
            +         * Zero-based index indicating the start of the segment, measured in bytes
            +         * of a UTF-8 string (i.e. characters encoded on multiple bytes have a
            +         * length of more than one).
            +         * 
            + * + * int64 start_index = 1; + * + * @return The startIndex. + */ + @java.lang.Override + public long getStartIndex() { + return startIndex_; + } + + /** + * + * + *
            +         * Zero-based index indicating the start of the segment, measured in bytes
            +         * of a UTF-8 string (i.e. characters encoded on multiple bytes have a
            +         * length of more than one).
            +         * 
            + * + * int64 start_index = 1; + * + * @param value The startIndex to set. + * @return This builder for chaining. + */ + public Builder setStartIndex(long value) { + + startIndex_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
            +         * Zero-based index indicating the start of the segment, measured in bytes
            +         * of a UTF-8 string (i.e. characters encoded on multiple bytes have a
            +         * length of more than one).
            +         * 
            + * + * int64 start_index = 1; + * + * @return This builder for chaining. + */ + public Builder clearStartIndex() { + bitField0_ = (bitField0_ & ~0x00000001); + startIndex_ = 0L; + onChanged(); + return this; + } + + private long endIndex_; + + /** + * + * + *
            +         * End of the segment, exclusive.
            +         * 
            + * + * int64 end_index = 2; + * + * @return The endIndex. + */ + @java.lang.Override + public long getEndIndex() { + return endIndex_; + } + + /** + * + * + *
            +         * End of the segment, exclusive.
            +         * 
            + * + * int64 end_index = 2; + * + * @param value The endIndex to set. + * @return This builder for chaining. + */ + public Builder setEndIndex(long value) { + + endIndex_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
            +         * End of the segment, exclusive.
            +         * 
            + * + * int64 end_index = 2; + * + * @return This builder for chaining. + */ + public Builder clearEndIndex() { + bitField0_ = (bitField0_ & ~0x00000002); + endIndex_ = 0L; + onChanged(); + return this; + } + + private com.google.protobuf.Internal.IntList referenceIndices_ = emptyIntList(); + + private void ensureReferenceIndicesIsMutable() { + if (!referenceIndices_.isModifiable()) { + referenceIndices_ = makeMutableCopy(referenceIndices_); + } + bitField0_ |= 0x00000004; + } + + /** + * + * + *
            +         * References for the segment.
            +         * 
            + * + * repeated int32 reference_indices = 4; + * + * @return A list containing the referenceIndices. + */ + public java.util.List getReferenceIndicesList() { + referenceIndices_.makeImmutable(); + return referenceIndices_; + } + + /** + * + * + *
            +         * References for the segment.
            +         * 
            + * + * repeated int32 reference_indices = 4; + * + * @return The count of referenceIndices. + */ + public int getReferenceIndicesCount() { + return referenceIndices_.size(); + } + + /** + * + * + *
            +         * References for the segment.
            +         * 
            + * + * repeated int32 reference_indices = 4; + * + * @param index The index of the element to return. + * @return The referenceIndices at the given index. + */ + public int getReferenceIndices(int index) { + return referenceIndices_.getInt(index); + } + + /** + * + * + *
            +         * References for the segment.
            +         * 
            + * + * repeated int32 reference_indices = 4; + * + * @param index The index to set the value at. + * @param value The referenceIndices to set. + * @return This builder for chaining. + */ + public Builder setReferenceIndices(int index, int value) { + + ensureReferenceIndicesIsMutable(); + referenceIndices_.setInt(index, value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
            +         * References for the segment.
            +         * 
            + * + * repeated int32 reference_indices = 4; + * + * @param value The referenceIndices to add. + * @return This builder for chaining. + */ + public Builder addReferenceIndices(int value) { + + ensureReferenceIndicesIsMutable(); + referenceIndices_.addInt(value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
            +         * References for the segment.
            +         * 
            + * + * repeated int32 reference_indices = 4; + * + * @param values The referenceIndices to add. + * @return This builder for chaining. + */ + public Builder addAllReferenceIndices( + java.lang.Iterable values) { + ensureReferenceIndicesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, referenceIndices_); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
            +         * References for the segment.
            +         * 
            + * + * repeated int32 reference_indices = 4; + * + * @return This builder for chaining. + */ + public Builder clearReferenceIndices() { + referenceIndices_ = emptyIntList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + private float groundingScore_; + + /** + * + * + *
            +         * Score for the segment.
            +         * 
            + * + * float grounding_score = 5; + * + * @return The groundingScore. + */ + @java.lang.Override + public float getGroundingScore() { + return groundingScore_; + } + + /** + * + * + *
            +         * Score for the segment.
            +         * 
            + * + * float grounding_score = 5; + * + * @param value The groundingScore to set. + * @return This builder for chaining. + */ + public Builder setGroundingScore(float value) { + + groundingScore_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
            +         * Score for the segment.
            +         * 
            + * + * float grounding_score = 5; + * + * @return This builder for chaining. + */ + public Builder clearGroundingScore() { + bitField0_ = (bitField0_ & ~0x00000008); + groundingScore_ = 0F; + onChanged(); + return this; + } + + private java.lang.Object text_ = ""; + + /** + * + * + *
            +         * The text segment itself.
            +         * 
            + * + * string text = 6; + * + * @return The text. + */ + public java.lang.String getText() { + java.lang.Object ref = text_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + text_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
            +         * The text segment itself.
            +         * 
            + * + * string text = 6; + * + * @return The bytes for text. + */ + public com.google.protobuf.ByteString getTextBytes() { + java.lang.Object ref = text_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + text_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
            +         * The text segment itself.
            +         * 
            + * + * string text = 6; + * + * @param value The text to set. + * @return This builder for chaining. + */ + public Builder setText(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + text_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
            +         * The text segment itself.
            +         * 
            + * + * string text = 6; + * + * @return This builder for chaining. + */ + public Builder clearText() { + text_ = getDefaultInstance().getText(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + + /** + * + * + *
            +         * The text segment itself.
            +         * 
            + * + * string text = 6; + * + * @param value The bytes for text to set. + * @return This builder for chaining. + */ + public Builder setTextBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + text_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata.Segment) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata.Segment) + private static final com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent + .TextGroundingMetadata.Segment + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent + .TextGroundingMetadata.Segment(); + } + + public static com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent + .TextGroundingMetadata.Segment + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Segment parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata + .Segment + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface VisualSegmentOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata.VisualSegment) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
            +       * References for the visual segment.
            +       * 
            + * + * repeated int32 reference_indices = 1; + * + * @return A list containing the referenceIndices. + */ + java.util.List getReferenceIndicesList(); + + /** + * + * + *
            +       * References for the visual segment.
            +       * 
            + * + * repeated int32 reference_indices = 1; + * + * @return The count of referenceIndices. + */ + int getReferenceIndicesCount(); + + /** + * + * + *
            +       * References for the visual segment.
            +       * 
            + * + * repeated int32 reference_indices = 1; + * + * @param index The index of the element to return. + * @return The referenceIndices at the given index. + */ + int getReferenceIndices(int index); + + /** + * + * + *
            +       * The content id of the visual segment. In order to display the citation
            +       * of the visual element, this content_id needs to match with the
            +       * `grounded_content.content_metadata.content_id` field.
            +       * 
            + * + * string content_id = 2; + * + * @return The contentId. + */ + java.lang.String getContentId(); + + /** + * + * + *
            +       * The content id of the visual segment. In order to display the citation
            +       * of the visual element, this content_id needs to match with the
            +       * `grounded_content.content_metadata.content_id` field.
            +       * 
            + * + * string content_id = 2; + * + * @return The bytes for contentId. + */ + com.google.protobuf.ByteString getContentIdBytes(); + } + + /** + * + * + *
            +     * Grounding information for a visual segment.
            +     * 
            + * + * Protobuf type {@code + * google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata.VisualSegment} + */ + public static final class VisualSegment extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata.VisualSegment) + VisualSegmentOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "VisualSegment"); + } + + // Use VisualSegment.newBuilder() to construct. + private VisualSegment(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private VisualSegment() { + referenceIndices_ = emptyIntList(); + contentId_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.AssistAnswerProto + .internal_static_google_cloud_discoveryengine_v1beta_AssistantGroundedContent_TextGroundingMetadata_VisualSegment_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.AssistAnswerProto + .internal_static_google_cloud_discoveryengine_v1beta_AssistantGroundedContent_TextGroundingMetadata_VisualSegment_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent + .TextGroundingMetadata.VisualSegment.class, + com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent + .TextGroundingMetadata.VisualSegment.Builder.class); + } + + public static final int REFERENCE_INDICES_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private com.google.protobuf.Internal.IntList referenceIndices_ = emptyIntList(); + + /** + * + * + *
            +       * References for the visual segment.
            +       * 
            + * + * repeated int32 reference_indices = 1; + * + * @return A list containing the referenceIndices. + */ + @java.lang.Override + public java.util.List getReferenceIndicesList() { + return referenceIndices_; + } + + /** + * + * + *
            +       * References for the visual segment.
            +       * 
            + * + * repeated int32 reference_indices = 1; + * + * @return The count of referenceIndices. + */ + public int getReferenceIndicesCount() { + return referenceIndices_.size(); + } + + /** + * + * + *
            +       * References for the visual segment.
            +       * 
            + * + * repeated int32 reference_indices = 1; + * + * @param index The index of the element to return. + * @return The referenceIndices at the given index. + */ + public int getReferenceIndices(int index) { + return referenceIndices_.getInt(index); + } + + private int referenceIndicesMemoizedSerializedSize = -1; + + public static final int CONTENT_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object contentId_ = ""; + + /** + * + * + *
            +       * The content id of the visual segment. In order to display the citation
            +       * of the visual element, this content_id needs to match with the
            +       * `grounded_content.content_metadata.content_id` field.
            +       * 
            + * + * string content_id = 2; + * + * @return The contentId. + */ + @java.lang.Override + public java.lang.String getContentId() { + java.lang.Object ref = contentId_; + 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(); + contentId_ = s; + return s; + } + } + + /** + * + * + *
            +       * The content id of the visual segment. In order to display the citation
            +       * of the visual element, this content_id needs to match with the
            +       * `grounded_content.content_metadata.content_id` field.
            +       * 
            + * + * string content_id = 2; + * + * @return The bytes for contentId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getContentIdBytes() { + java.lang.Object ref = contentId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + contentId_ = 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 { + getSerializedSize(); + if (getReferenceIndicesList().size() > 0) { + output.writeUInt32NoTag(10); + output.writeUInt32NoTag(referenceIndicesMemoizedSerializedSize); + } + for (int i = 0; i < referenceIndices_.size(); i++) { + output.writeInt32NoTag(referenceIndices_.getInt(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(contentId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, contentId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + { + int dataSize = 0; + for (int i = 0; i < referenceIndices_.size(); i++) { + dataSize += + com.google.protobuf.CodedOutputStream.computeInt32SizeNoTag( + referenceIndices_.getInt(i)); + } + size += dataSize; + if (!getReferenceIndicesList().isEmpty()) { + size += 1; + size += com.google.protobuf.CodedOutputStream.computeInt32SizeNoTag(dataSize); + } + referenceIndicesMemoizedSerializedSize = dataSize; + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(contentId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, contentId_); + } + 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.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata + .VisualSegment)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata + .VisualSegment + other = + (com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent + .TextGroundingMetadata.VisualSegment) + obj; + + if (!getReferenceIndicesList().equals(other.getReferenceIndicesList())) return false; + if (!getContentId().equals(other.getContentId())) 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 (getReferenceIndicesCount() > 0) { + hash = (37 * hash) + REFERENCE_INDICES_FIELD_NUMBER; + hash = (53 * hash) + getReferenceIndicesList().hashCode(); + } + hash = (37 * hash) + CONTENT_ID_FIELD_NUMBER; + hash = (53 * hash) + getContentId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent + .TextGroundingMetadata.VisualSegment + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent + .TextGroundingMetadata.VisualSegment + 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.discoveryengine.v1beta.AssistantGroundedContent + .TextGroundingMetadata.VisualSegment + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent + .TextGroundingMetadata.VisualSegment + 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.discoveryengine.v1beta.AssistantGroundedContent + .TextGroundingMetadata.VisualSegment + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent + .TextGroundingMetadata.VisualSegment + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent + .TextGroundingMetadata.VisualSegment + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent + .TextGroundingMetadata.VisualSegment + 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.discoveryengine.v1beta.AssistantGroundedContent + .TextGroundingMetadata.VisualSegment + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent + .TextGroundingMetadata.VisualSegment + 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.discoveryengine.v1beta.AssistantGroundedContent + .TextGroundingMetadata.VisualSegment + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent + .TextGroundingMetadata.VisualSegment + 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.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata + .VisualSegment + 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; + } + + /** + * + * + *
            +       * Grounding information for a visual segment.
            +       * 
            + * + * Protobuf type {@code + * google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata.VisualSegment} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata.VisualSegment) + com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata + .VisualSegmentOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.AssistAnswerProto + .internal_static_google_cloud_discoveryengine_v1beta_AssistantGroundedContent_TextGroundingMetadata_VisualSegment_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.AssistAnswerProto + .internal_static_google_cloud_discoveryengine_v1beta_AssistantGroundedContent_TextGroundingMetadata_VisualSegment_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent + .TextGroundingMetadata.VisualSegment.class, + com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent + .TextGroundingMetadata.VisualSegment.Builder.class); + } + + // Construct using + // com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata.VisualSegment.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + referenceIndices_ = emptyIntList(); + contentId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1beta.AssistAnswerProto + .internal_static_google_cloud_discoveryengine_v1beta_AssistantGroundedContent_TextGroundingMetadata_VisualSegment_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent + .TextGroundingMetadata.VisualSegment + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent + .TextGroundingMetadata.VisualSegment.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent + .TextGroundingMetadata.VisualSegment + build() { + com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata + .VisualSegment + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent + .TextGroundingMetadata.VisualSegment + buildPartial() { + com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata + .VisualSegment + result = + new com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent + .TextGroundingMetadata.VisualSegment(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata + .VisualSegment + result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + referenceIndices_.makeImmutable(); + result.referenceIndices_ = referenceIndices_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.contentId_ = contentId_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata + .VisualSegment) { + return mergeFrom( + (com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent + .TextGroundingMetadata.VisualSegment) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata + .VisualSegment + other) { + if (other + == com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent + .TextGroundingMetadata.VisualSegment.getDefaultInstance()) return this; + if (!other.referenceIndices_.isEmpty()) { + if (referenceIndices_.isEmpty()) { + referenceIndices_ = other.referenceIndices_; + referenceIndices_.makeImmutable(); + bitField0_ |= 0x00000001; + } else { + ensureReferenceIndicesIsMutable(); + referenceIndices_.addAll(other.referenceIndices_); + } + onChanged(); + } + if (!other.getContentId().isEmpty()) { + contentId_ = other.contentId_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + int v = input.readInt32(); + ensureReferenceIndicesIsMutable(); + referenceIndices_.addInt(v); + break; + } // case 8 + case 10: + { + int length = input.readRawVarint32(); + int limit = input.pushLimit(length); + ensureReferenceIndicesIsMutable(); + while (input.getBytesUntilLimit() > 0) { + referenceIndices_.addInt(input.readInt32()); + } + input.popLimit(limit); + break; + } // case 10 + case 18: + { + contentId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.protobuf.Internal.IntList referenceIndices_ = emptyIntList(); + + private void ensureReferenceIndicesIsMutable() { + if (!referenceIndices_.isModifiable()) { + referenceIndices_ = makeMutableCopy(referenceIndices_); + } + bitField0_ |= 0x00000001; + } + + /** + * + * + *
            +         * References for the visual segment.
            +         * 
            + * + * repeated int32 reference_indices = 1; + * + * @return A list containing the referenceIndices. + */ + public java.util.List getReferenceIndicesList() { + referenceIndices_.makeImmutable(); + return referenceIndices_; + } + + /** + * + * + *
            +         * References for the visual segment.
            +         * 
            + * + * repeated int32 reference_indices = 1; + * + * @return The count of referenceIndices. + */ + public int getReferenceIndicesCount() { + return referenceIndices_.size(); + } + + /** + * + * + *
            +         * References for the visual segment.
            +         * 
            + * + * repeated int32 reference_indices = 1; + * + * @param index The index of the element to return. + * @return The referenceIndices at the given index. + */ + public int getReferenceIndices(int index) { + return referenceIndices_.getInt(index); + } + + /** + * + * + *
            +         * References for the visual segment.
            +         * 
            + * + * repeated int32 reference_indices = 1; + * + * @param index The index to set the value at. + * @param value The referenceIndices to set. + * @return This builder for chaining. + */ + public Builder setReferenceIndices(int index, int value) { + + ensureReferenceIndicesIsMutable(); + referenceIndices_.setInt(index, value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
            +         * References for the visual segment.
            +         * 
            + * + * repeated int32 reference_indices = 1; + * + * @param value The referenceIndices to add. + * @return This builder for chaining. + */ + public Builder addReferenceIndices(int value) { + + ensureReferenceIndicesIsMutable(); + referenceIndices_.addInt(value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
            +         * References for the visual segment.
            +         * 
            + * + * repeated int32 reference_indices = 1; + * + * @param values The referenceIndices to add. + * @return This builder for chaining. + */ + public Builder addAllReferenceIndices( + java.lang.Iterable values) { + ensureReferenceIndicesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, referenceIndices_); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
            +         * References for the visual segment.
            +         * 
            + * + * repeated int32 reference_indices = 1; + * + * @return This builder for chaining. + */ + public Builder clearReferenceIndices() { + referenceIndices_ = emptyIntList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + private java.lang.Object contentId_ = ""; + + /** + * + * + *
            +         * The content id of the visual segment. In order to display the citation
            +         * of the visual element, this content_id needs to match with the
            +         * `grounded_content.content_metadata.content_id` field.
            +         * 
            + * + * string content_id = 2; + * + * @return The contentId. + */ + public java.lang.String getContentId() { + java.lang.Object ref = contentId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + contentId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
            +         * The content id of the visual segment. In order to display the citation
            +         * of the visual element, this content_id needs to match with the
            +         * `grounded_content.content_metadata.content_id` field.
            +         * 
            + * + * string content_id = 2; + * + * @return The bytes for contentId. + */ + public com.google.protobuf.ByteString getContentIdBytes() { + java.lang.Object ref = contentId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + contentId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
            +         * The content id of the visual segment. In order to display the citation
            +         * of the visual element, this content_id needs to match with the
            +         * `grounded_content.content_metadata.content_id` field.
            +         * 
            + * + * string content_id = 2; + * + * @param value The contentId to set. + * @return This builder for chaining. + */ + public Builder setContentId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + contentId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
            +         * The content id of the visual segment. In order to display the citation
            +         * of the visual element, this content_id needs to match with the
            +         * `grounded_content.content_metadata.content_id` field.
            +         * 
            + * + * string content_id = 2; + * + * @return This builder for chaining. + */ + public Builder clearContentId() { + contentId_ = getDefaultInstance().getContentId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
            +         * The content id of the visual segment. In order to display the citation
            +         * of the visual element, this content_id needs to match with the
            +         * `grounded_content.content_metadata.content_id` field.
            +         * 
            + * + * string content_id = 2; + * + * @param value The bytes for contentId to set. + * @return This builder for chaining. + */ + public Builder setContentIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + contentId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata.VisualSegment) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata.VisualSegment) + private static final com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent + .TextGroundingMetadata.VisualSegment + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent + .TextGroundingMetadata.VisualSegment(); + } + + public static com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent + .TextGroundingMetadata.VisualSegment + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public VisualSegment parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata + .VisualSegment + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface ReferenceOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata.Reference) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
            +       * Referenced text content.
            +       * 
            + * + * string content = 1; + * + * @return The content. + */ + java.lang.String getContent(); + + /** + * + * + *
            +       * Referenced text content.
            +       * 
            + * + * string content = 1; + * + * @return The bytes for content. + */ + com.google.protobuf.ByteString getContentBytes(); + + /** + * + * + *
            +       * Chunk of code snippet from the referenced document.
            +       * 
            + * + * string code_snippet = 4; + * + * @return The codeSnippet. + */ + java.lang.String getCodeSnippet(); + + /** + * + * + *
            +       * Chunk of code snippet from the referenced document.
            +       * 
            + * + * string code_snippet = 4; + * + * @return The bytes for codeSnippet. + */ + com.google.protobuf.ByteString getCodeSnippetBytes(); + + /** + * + * + *
            +       * Document metadata.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata.Reference.DocumentMetadata document_metadata = 2; + * + * + * @return Whether the documentMetadata field is set. + */ + boolean hasDocumentMetadata(); + + /** + * + * + *
            +       * Document metadata.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata.Reference.DocumentMetadata document_metadata = 2; + * + * + * @return The documentMetadata. + */ + com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata + .Reference.DocumentMetadata + getDocumentMetadata(); + + /** + * + * + *
            +       * Document metadata.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata.Reference.DocumentMetadata document_metadata = 2; + * + */ + com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata + .Reference.DocumentMetadataOrBuilder + getDocumentMetadataOrBuilder(); + } + + /** + * + * + *
            +     * Referenced content and related document metadata.
            +     * 
            + * + * Protobuf type {@code + * google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata.Reference} + */ + public static final class Reference extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata.Reference) + ReferenceOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Reference"); + } + + // Use Reference.newBuilder() to construct. + private Reference(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private Reference() { + content_ = ""; + codeSnippet_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.AssistAnswerProto + .internal_static_google_cloud_discoveryengine_v1beta_AssistantGroundedContent_TextGroundingMetadata_Reference_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.AssistAnswerProto + .internal_static_google_cloud_discoveryengine_v1beta_AssistantGroundedContent_TextGroundingMetadata_Reference_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent + .TextGroundingMetadata.Reference.class, + com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent + .TextGroundingMetadata.Reference.Builder.class); + } + + public interface DocumentMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata.Reference.DocumentMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + * + * .google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata.Reference.DocumentMetadata.Language language = 8; + * + * + * @return The enum numeric value on the wire for language. + */ + int getLanguageValue(); + + /** + * + * .google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata.Reference.DocumentMetadata.Language language = 8; + * + * + * @return The language. + */ + com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata + .Reference.DocumentMetadata.Language + getLanguage(); + + /** + * + * + *
            +         * Document resource name.
            +         * 
            + * + * optional string document = 1 [(.google.api.resource_reference) = { ... } + * + * @return Whether the document field is set. + */ + boolean hasDocument(); + + /** + * + * + *
            +         * Document resource name.
            +         * 
            + * + * optional string document = 1 [(.google.api.resource_reference) = { ... } + * + * @return The document. + */ + java.lang.String getDocument(); + + /** + * + * + *
            +         * Document resource name.
            +         * 
            + * + * optional string document = 1 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for document. + */ + com.google.protobuf.ByteString getDocumentBytes(); + + /** + * + * + *
            +         * URI for the document. It may contain a URL that redirects to the
            +         * actual website.
            +         * 
            + * + * optional string uri = 2; + * + * @return Whether the uri field is set. + */ + boolean hasUri(); + + /** + * + * + *
            +         * URI for the document. It may contain a URL that redirects to the
            +         * actual website.
            +         * 
            + * + * optional string uri = 2; + * + * @return The uri. + */ + java.lang.String getUri(); + + /** + * + * + *
            +         * URI for the document. It may contain a URL that redirects to the
            +         * actual website.
            +         * 
            + * + * optional string uri = 2; + * + * @return The bytes for uri. + */ + com.google.protobuf.ByteString getUriBytes(); + + /** + * + * + *
            +         * Title.
            +         * 
            + * + * optional string title = 3; + * + * @return Whether the title field is set. + */ + boolean hasTitle(); + + /** + * + * + *
            +         * Title.
            +         * 
            + * + * optional string title = 3; + * + * @return The title. + */ + java.lang.String getTitle(); + + /** + * + * + *
            +         * Title.
            +         * 
            + * + * optional string title = 3; + * + * @return The bytes for title. + */ + com.google.protobuf.ByteString getTitleBytes(); + + /** + * + * + *
            +         * Page identifier.
            +         * 
            + * + * optional string page_identifier = 4; + * + * @return Whether the pageIdentifier field is set. + */ + boolean hasPageIdentifier(); + + /** + * + * + *
            +         * Page identifier.
            +         * 
            + * + * optional string page_identifier = 4; + * + * @return The pageIdentifier. + */ + java.lang.String getPageIdentifier(); + + /** + * + * + *
            +         * Page identifier.
            +         * 
            + * + * optional string page_identifier = 4; + * + * @return The bytes for pageIdentifier. + */ + com.google.protobuf.ByteString getPageIdentifierBytes(); + + /** + * + * + *
            +         * Domain name from the document URI. Note that the `uri` field may
            +         * contain a URL that redirects to the actual website, in which case
            +         * this will contain the domain name of the target site.
            +         * 
            + * + * optional string domain = 5; + * + * @return Whether the domain field is set. + */ + boolean hasDomain(); + + /** + * + * + *
            +         * Domain name from the document URI. Note that the `uri` field may
            +         * contain a URL that redirects to the actual website, in which case
            +         * this will contain the domain name of the target site.
            +         * 
            + * + * optional string domain = 5; + * + * @return The domain. + */ + java.lang.String getDomain(); + + /** + * + * + *
            +         * Domain name from the document URI. Note that the `uri` field may
            +         * contain a URL that redirects to the actual website, in which case
            +         * this will contain the domain name of the target site.
            +         * 
            + * + * optional string domain = 5; + * + * @return The bytes for domain. + */ + com.google.protobuf.ByteString getDomainBytes(); + + /** + * + * + *
            +         * The mime type of the document.
            +         * https://www.iana.org/assignments/media-types/media-types.xhtml.
            +         * 
            + * + * optional string mime_type = 7; + * + * @return Whether the mimeType field is set. + */ + boolean hasMimeType(); + + /** + * + * + *
            +         * The mime type of the document.
            +         * https://www.iana.org/assignments/media-types/media-types.xhtml.
            +         * 
            + * + * optional string mime_type = 7; + * + * @return The mimeType. + */ + java.lang.String getMimeType(); + + /** + * + * + *
            +         * The mime type of the document.
            +         * https://www.iana.org/assignments/media-types/media-types.xhtml.
            +         * 
            + * + * optional string mime_type = 7; + * + * @return The bytes for mimeType. + */ + com.google.protobuf.ByteString getMimeTypeBytes(); + } + + /** + * + * + *
            +       * Document metadata.
            +       * 
            + * + * Protobuf type {@code + * google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata.Reference.DocumentMetadata} + */ + public static final class DocumentMetadata extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata.Reference.DocumentMetadata) + DocumentMetadataOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "DocumentMetadata"); + } + + // Use DocumentMetadata.newBuilder() to construct. + private DocumentMetadata(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private DocumentMetadata() { + language_ = 0; + document_ = ""; + uri_ = ""; + title_ = ""; + pageIdentifier_ = ""; + domain_ = ""; + mimeType_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.AssistAnswerProto + .internal_static_google_cloud_discoveryengine_v1beta_AssistantGroundedContent_TextGroundingMetadata_Reference_DocumentMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.AssistAnswerProto + .internal_static_google_cloud_discoveryengine_v1beta_AssistantGroundedContent_TextGroundingMetadata_Reference_DocumentMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent + .TextGroundingMetadata.Reference.DocumentMetadata.class, + com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent + .TextGroundingMetadata.Reference.DocumentMetadata.Builder.class); + } + + /** + * + * + *
            +         * Language of the referenced content. For now, it is only used for
            +         * code.
            +         * 
            + * + * Protobuf enum {@code + * google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata.Reference.DocumentMetadata.Language} + */ + public enum Language implements com.google.protobuf.ProtocolMessageEnum { + /** LANGUAGE_UNSPECIFIED = 0; */ + LANGUAGE_UNSPECIFIED(0), + /** PYTHON = 1; */ + PYTHON(1), + /** SQL = 2; */ + SQL(2), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Language"); + } + + /** LANGUAGE_UNSPECIFIED = 0; */ + public static final int LANGUAGE_UNSPECIFIED_VALUE = 0; + + /** PYTHON = 1; */ + public static final int PYTHON_VALUE = 1; + + /** SQL = 2; */ + public static final int SQL_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 Language 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 Language forNumber(int value) { + switch (value) { + case 0: + return LANGUAGE_UNSPECIFIED; + case 1: + return PYTHON; + case 2: + return SQL; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public Language findValueByNumber(int number) { + return Language.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent + .TextGroundingMetadata.Reference.DocumentMetadata.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final Language[] VALUES = values(); + + public static Language valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private Language(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata.Reference.DocumentMetadata.Language) + } + + private int bitField0_; + public static final int LANGUAGE_FIELD_NUMBER = 8; + private int language_ = 0; + + /** + * + * .google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata.Reference.DocumentMetadata.Language language = 8; + * + * + * @return The enum numeric value on the wire for language. + */ + @java.lang.Override + public int getLanguageValue() { + return language_; + } + + /** + * + * .google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata.Reference.DocumentMetadata.Language language = 8; + * + * + * @return The language. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent + .TextGroundingMetadata.Reference.DocumentMetadata.Language + getLanguage() { + com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata + .Reference.DocumentMetadata.Language + result = + com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent + .TextGroundingMetadata.Reference.DocumentMetadata.Language.forNumber( + language_); + return result == null + ? com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent + .TextGroundingMetadata.Reference.DocumentMetadata.Language.UNRECOGNIZED + : result; + } + + public static final int DOCUMENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object document_ = ""; + + /** + * + * + *
            +         * Document resource name.
            +         * 
            + * + * optional string document = 1 [(.google.api.resource_reference) = { ... } + * + * @return Whether the document field is set. + */ + @java.lang.Override + public boolean hasDocument() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
            +         * Document resource name.
            +         * 
            + * + * optional string document = 1 [(.google.api.resource_reference) = { ... } + * + * @return The document. + */ + @java.lang.Override + public java.lang.String getDocument() { + java.lang.Object ref = document_; + 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(); + document_ = s; + return s; + } + } + + /** + * + * + *
            +         * Document resource name.
            +         * 
            + * + * optional string document = 1 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for document. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDocumentBytes() { + java.lang.Object ref = document_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + document_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int URI_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object uri_ = ""; + + /** + * + * + *
            +         * URI for the document. It may contain a URL that redirects to the
            +         * actual website.
            +         * 
            + * + * optional string uri = 2; + * + * @return Whether the uri field is set. + */ + @java.lang.Override + public boolean hasUri() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
            +         * URI for the document. It may contain a URL that redirects to the
            +         * actual website.
            +         * 
            + * + * optional string uri = 2; + * + * @return The uri. + */ + @java.lang.Override + public java.lang.String getUri() { + java.lang.Object ref = uri_; + 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(); + uri_ = s; + return s; + } + } + + /** + * + * + *
            +         * URI for the document. It may contain a URL that redirects to the
            +         * actual website.
            +         * 
            + * + * optional string uri = 2; + * + * @return The bytes for uri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getUriBytes() { + java.lang.Object ref = uri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TITLE_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object title_ = ""; + + /** + * + * + *
            +         * Title.
            +         * 
            + * + * optional string title = 3; + * + * @return Whether the title field is set. + */ + @java.lang.Override + public boolean hasTitle() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
            +         * Title.
            +         * 
            + * + * optional string title = 3; + * + * @return The title. + */ + @java.lang.Override + public java.lang.String getTitle() { + java.lang.Object ref = title_; + 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(); + title_ = s; + return s; + } + } + + /** + * + * + *
            +         * Title.
            +         * 
            + * + * optional string title = 3; + * + * @return The bytes for title. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTitleBytes() { + java.lang.Object ref = title_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + title_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_IDENTIFIER_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object pageIdentifier_ = ""; + + /** + * + * + *
            +         * Page identifier.
            +         * 
            + * + * optional string page_identifier = 4; + * + * @return Whether the pageIdentifier field is set. + */ + @java.lang.Override + public boolean hasPageIdentifier() { + return ((bitField0_ & 0x00000008) != 0); + } + + /** + * + * + *
            +         * Page identifier.
            +         * 
            + * + * optional string page_identifier = 4; + * + * @return The pageIdentifier. + */ + @java.lang.Override + public java.lang.String getPageIdentifier() { + java.lang.Object ref = pageIdentifier_; + 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(); + pageIdentifier_ = s; + return s; + } + } + + /** + * + * + *
            +         * Page identifier.
            +         * 
            + * + * optional string page_identifier = 4; + * + * @return The bytes for pageIdentifier. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageIdentifierBytes() { + java.lang.Object ref = pageIdentifier_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageIdentifier_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DOMAIN_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object domain_ = ""; + + /** + * + * + *
            +         * Domain name from the document URI. Note that the `uri` field may
            +         * contain a URL that redirects to the actual website, in which case
            +         * this will contain the domain name of the target site.
            +         * 
            + * + * optional string domain = 5; + * + * @return Whether the domain field is set. + */ + @java.lang.Override + public boolean hasDomain() { + return ((bitField0_ & 0x00000010) != 0); + } + + /** + * + * + *
            +         * Domain name from the document URI. Note that the `uri` field may
            +         * contain a URL that redirects to the actual website, in which case
            +         * this will contain the domain name of the target site.
            +         * 
            + * + * optional string domain = 5; + * + * @return The domain. + */ + @java.lang.Override + public java.lang.String getDomain() { + java.lang.Object ref = domain_; + 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(); + domain_ = s; + return s; + } + } + + /** + * + * + *
            +         * Domain name from the document URI. Note that the `uri` field may
            +         * contain a URL that redirects to the actual website, in which case
            +         * this will contain the domain name of the target site.
            +         * 
            + * + * optional string domain = 5; + * + * @return The bytes for domain. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDomainBytes() { + java.lang.Object ref = domain_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + domain_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int MIME_TYPE_FIELD_NUMBER = 7; + + @SuppressWarnings("serial") + private volatile java.lang.Object mimeType_ = ""; + + /** + * + * + *
            +         * The mime type of the document.
            +         * https://www.iana.org/assignments/media-types/media-types.xhtml.
            +         * 
            + * + * optional string mime_type = 7; + * + * @return Whether the mimeType field is set. + */ + @java.lang.Override + public boolean hasMimeType() { + return ((bitField0_ & 0x00000020) != 0); + } + + /** + * + * + *
            +         * The mime type of the document.
            +         * https://www.iana.org/assignments/media-types/media-types.xhtml.
            +         * 
            + * + * optional string mime_type = 7; + * + * @return The mimeType. + */ + @java.lang.Override + public java.lang.String getMimeType() { + java.lang.Object ref = mimeType_; + 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(); + mimeType_ = s; + return s; + } + } + + /** + * + * + *
            +         * The mime type of the document.
            +         * https://www.iana.org/assignments/media-types/media-types.xhtml.
            +         * 
            + * + * optional string mime_type = 7; + * + * @return The bytes for mimeType. + */ + @java.lang.Override + public com.google.protobuf.ByteString getMimeTypeBytes() { + java.lang.Object ref = mimeType_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + mimeType_ = 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 { + if (((bitField0_ & 0x00000001) != 0)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, document_); + } + if (((bitField0_ & 0x00000002) != 0)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, uri_); + } + if (((bitField0_ & 0x00000004) != 0)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, title_); + } + if (((bitField0_ & 0x00000008) != 0)) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, pageIdentifier_); + } + if (((bitField0_ & 0x00000010) != 0)) { + com.google.protobuf.GeneratedMessage.writeString(output, 5, domain_); + } + if (((bitField0_ & 0x00000020) != 0)) { + com.google.protobuf.GeneratedMessage.writeString(output, 7, mimeType_); + } + if (language_ + != com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent + .TextGroundingMetadata.Reference.DocumentMetadata.Language.LANGUAGE_UNSPECIFIED + .getNumber()) { + output.writeEnum(8, language_); + } + 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.GeneratedMessage.computeStringSize(1, document_); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, uri_); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, title_); + } + if (((bitField0_ & 0x00000008) != 0)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, pageIdentifier_); + } + if (((bitField0_ & 0x00000010) != 0)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(5, domain_); + } + if (((bitField0_ & 0x00000020) != 0)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(7, mimeType_); + } + if (language_ + != com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent + .TextGroundingMetadata.Reference.DocumentMetadata.Language.LANGUAGE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(8, language_); + } + 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.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata + .Reference.DocumentMetadata)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata + .Reference.DocumentMetadata + other = + (com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent + .TextGroundingMetadata.Reference.DocumentMetadata) + obj; + + if (language_ != other.language_) return false; + if (hasDocument() != other.hasDocument()) return false; + if (hasDocument()) { + if (!getDocument().equals(other.getDocument())) return false; + } + if (hasUri() != other.hasUri()) return false; + if (hasUri()) { + if (!getUri().equals(other.getUri())) return false; + } + if (hasTitle() != other.hasTitle()) return false; + if (hasTitle()) { + if (!getTitle().equals(other.getTitle())) return false; + } + if (hasPageIdentifier() != other.hasPageIdentifier()) return false; + if (hasPageIdentifier()) { + if (!getPageIdentifier().equals(other.getPageIdentifier())) return false; + } + if (hasDomain() != other.hasDomain()) return false; + if (hasDomain()) { + if (!getDomain().equals(other.getDomain())) return false; + } + if (hasMimeType() != other.hasMimeType()) return false; + if (hasMimeType()) { + if (!getMimeType().equals(other.getMimeType())) 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) + LANGUAGE_FIELD_NUMBER; + hash = (53 * hash) + language_; + if (hasDocument()) { + hash = (37 * hash) + DOCUMENT_FIELD_NUMBER; + hash = (53 * hash) + getDocument().hashCode(); + } + if (hasUri()) { + hash = (37 * hash) + URI_FIELD_NUMBER; + hash = (53 * hash) + getUri().hashCode(); + } + if (hasTitle()) { + hash = (37 * hash) + TITLE_FIELD_NUMBER; + hash = (53 * hash) + getTitle().hashCode(); + } + if (hasPageIdentifier()) { + hash = (37 * hash) + PAGE_IDENTIFIER_FIELD_NUMBER; + hash = (53 * hash) + getPageIdentifier().hashCode(); + } + if (hasDomain()) { + hash = (37 * hash) + DOMAIN_FIELD_NUMBER; + hash = (53 * hash) + getDomain().hashCode(); + } + if (hasMimeType()) { + hash = (37 * hash) + MIME_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getMimeType().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent + .TextGroundingMetadata.Reference.DocumentMetadata + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent + .TextGroundingMetadata.Reference.DocumentMetadata + 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.discoveryengine.v1beta.AssistantGroundedContent + .TextGroundingMetadata.Reference.DocumentMetadata + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent + .TextGroundingMetadata.Reference.DocumentMetadata + 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.discoveryengine.v1beta.AssistantGroundedContent + .TextGroundingMetadata.Reference.DocumentMetadata + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent + .TextGroundingMetadata.Reference.DocumentMetadata + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent + .TextGroundingMetadata.Reference.DocumentMetadata + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent + .TextGroundingMetadata.Reference.DocumentMetadata + 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.discoveryengine.v1beta.AssistantGroundedContent + .TextGroundingMetadata.Reference.DocumentMetadata + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent + .TextGroundingMetadata.Reference.DocumentMetadata + 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.discoveryengine.v1beta.AssistantGroundedContent + .TextGroundingMetadata.Reference.DocumentMetadata + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent + .TextGroundingMetadata.Reference.DocumentMetadata + 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.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata + .Reference.DocumentMetadata + 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; + } + + /** + * + * + *
            +         * Document metadata.
            +         * 
            + * + * Protobuf type {@code + * google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata.Reference.DocumentMetadata} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata.Reference.DocumentMetadata) + com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata + .Reference.DocumentMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.AssistAnswerProto + .internal_static_google_cloud_discoveryengine_v1beta_AssistantGroundedContent_TextGroundingMetadata_Reference_DocumentMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.AssistAnswerProto + .internal_static_google_cloud_discoveryengine_v1beta_AssistantGroundedContent_TextGroundingMetadata_Reference_DocumentMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent + .TextGroundingMetadata.Reference.DocumentMetadata.class, + com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent + .TextGroundingMetadata.Reference.DocumentMetadata.Builder.class); + } + + // Construct using + // com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata.Reference.DocumentMetadata.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + language_ = 0; + document_ = ""; + uri_ = ""; + title_ = ""; + pageIdentifier_ = ""; + domain_ = ""; + mimeType_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1beta.AssistAnswerProto + .internal_static_google_cloud_discoveryengine_v1beta_AssistantGroundedContent_TextGroundingMetadata_Reference_DocumentMetadata_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent + .TextGroundingMetadata.Reference.DocumentMetadata + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent + .TextGroundingMetadata.Reference.DocumentMetadata.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent + .TextGroundingMetadata.Reference.DocumentMetadata + build() { + com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata + .Reference.DocumentMetadata + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent + .TextGroundingMetadata.Reference.DocumentMetadata + buildPartial() { + com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata + .Reference.DocumentMetadata + result = + new com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent + .TextGroundingMetadata.Reference.DocumentMetadata(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata + .Reference.DocumentMetadata + result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.language_ = language_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.document_ = document_; + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.uri_ = uri_; + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.title_ = title_; + to_bitField0_ |= 0x00000004; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.pageIdentifier_ = pageIdentifier_; + to_bitField0_ |= 0x00000008; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.domain_ = domain_; + to_bitField0_ |= 0x00000010; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.mimeType_ = mimeType_; + to_bitField0_ |= 0x00000020; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent + .TextGroundingMetadata.Reference.DocumentMetadata) { + return mergeFrom( + (com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent + .TextGroundingMetadata.Reference.DocumentMetadata) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata + .Reference.DocumentMetadata + other) { + if (other + == com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent + .TextGroundingMetadata.Reference.DocumentMetadata.getDefaultInstance()) + return this; + if (other.language_ != 0) { + setLanguageValue(other.getLanguageValue()); + } + if (other.hasDocument()) { + document_ = other.document_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasUri()) { + uri_ = other.uri_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (other.hasTitle()) { + title_ = other.title_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (other.hasPageIdentifier()) { + pageIdentifier_ = other.pageIdentifier_; + bitField0_ |= 0x00000010; + onChanged(); + } + if (other.hasDomain()) { + domain_ = other.domain_; + bitField0_ |= 0x00000020; + onChanged(); + } + if (other.hasMimeType()) { + mimeType_ = other.mimeType_; + bitField0_ |= 0x00000040; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + document_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 10 + case 18: + { + uri_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 18 + case 26: + { + title_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 26 + case 34: + { + pageIdentifier_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 34 + case 42: + { + domain_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 42 + case 58: + { + mimeType_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000040; + break; + } // case 58 + case 64: + { + language_ = input.readEnum(); + bitField0_ |= 0x00000001; + break; + } // case 64 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private int language_ = 0; + + /** + * + * .google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata.Reference.DocumentMetadata.Language language = 8; + * + * + * @return The enum numeric value on the wire for language. + */ + @java.lang.Override + public int getLanguageValue() { + return language_; + } + + /** + * + * .google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata.Reference.DocumentMetadata.Language language = 8; + * + * + * @param value The enum numeric value on the wire for language to set. + * @return This builder for chaining. + */ + public Builder setLanguageValue(int value) { + language_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * .google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata.Reference.DocumentMetadata.Language language = 8; + * + * + * @return The language. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent + .TextGroundingMetadata.Reference.DocumentMetadata.Language + getLanguage() { + com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata + .Reference.DocumentMetadata.Language + result = + com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent + .TextGroundingMetadata.Reference.DocumentMetadata.Language.forNumber( + language_); + return result == null + ? com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent + .TextGroundingMetadata.Reference.DocumentMetadata.Language.UNRECOGNIZED + : result; + } + + /** + * + * .google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata.Reference.DocumentMetadata.Language language = 8; + * + * + * @param value The language to set. + * @return This builder for chaining. + */ + public Builder setLanguage( + com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata + .Reference.DocumentMetadata.Language + value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + language_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * .google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata.Reference.DocumentMetadata.Language language = 8; + * + * + * @return This builder for chaining. + */ + public Builder clearLanguage() { + bitField0_ = (bitField0_ & ~0x00000001); + language_ = 0; + onChanged(); + return this; + } + + private java.lang.Object document_ = ""; + + /** + * + * + *
            +           * Document resource name.
            +           * 
            + * + * optional string document = 1 [(.google.api.resource_reference) = { ... } + * + * @return Whether the document field is set. + */ + public boolean hasDocument() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
            +           * Document resource name.
            +           * 
            + * + * optional string document = 1 [(.google.api.resource_reference) = { ... } + * + * @return The document. + */ + public java.lang.String getDocument() { + java.lang.Object ref = document_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + document_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
            +           * Document resource name.
            +           * 
            + * + * optional string document = 1 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for document. + */ + public com.google.protobuf.ByteString getDocumentBytes() { + java.lang.Object ref = document_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + document_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
            +           * Document resource name.
            +           * 
            + * + * optional string document = 1 [(.google.api.resource_reference) = { ... } + * + * @param value The document to set. + * @return This builder for chaining. + */ + public Builder setDocument(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + document_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
            +           * Document resource name.
            +           * 
            + * + * optional string document = 1 [(.google.api.resource_reference) = { ... } + * + * @return This builder for chaining. + */ + public Builder clearDocument() { + document_ = getDefaultInstance().getDocument(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
            +           * Document resource name.
            +           * 
            + * + * optional string document = 1 [(.google.api.resource_reference) = { ... } + * + * @param value The bytes for document to set. + * @return This builder for chaining. + */ + public Builder setDocumentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + document_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object uri_ = ""; + + /** + * + * + *
            +           * URI for the document. It may contain a URL that redirects to the
            +           * actual website.
            +           * 
            + * + * optional string uri = 2; + * + * @return Whether the uri field is set. + */ + public boolean hasUri() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
            +           * URI for the document. It may contain a URL that redirects to the
            +           * actual website.
            +           * 
            + * + * optional string uri = 2; + * + * @return The uri. + */ + public java.lang.String getUri() { + java.lang.Object ref = uri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
            +           * URI for the document. It may contain a URL that redirects to the
            +           * actual website.
            +           * 
            + * + * optional string uri = 2; + * + * @return The bytes for uri. + */ + public com.google.protobuf.ByteString getUriBytes() { + java.lang.Object ref = uri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
            +           * URI for the document. It may contain a URL that redirects to the
            +           * actual website.
            +           * 
            + * + * optional string uri = 2; + * + * @param value The uri to set. + * @return This builder for chaining. + */ + public Builder setUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + uri_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
            +           * URI for the document. It may contain a URL that redirects to the
            +           * actual website.
            +           * 
            + * + * optional string uri = 2; + * + * @return This builder for chaining. + */ + public Builder clearUri() { + uri_ = getDefaultInstance().getUri(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
            +           * URI for the document. It may contain a URL that redirects to the
            +           * actual website.
            +           * 
            + * + * optional string uri = 2; + * + * @param value The bytes for uri to set. + * @return This builder for chaining. + */ + public Builder setUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + uri_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object title_ = ""; + + /** + * + * + *
            +           * Title.
            +           * 
            + * + * optional string title = 3; + * + * @return Whether the title field is set. + */ + public boolean hasTitle() { + return ((bitField0_ & 0x00000008) != 0); + } + + /** + * + * + *
            +           * Title.
            +           * 
            + * + * optional string title = 3; + * + * @return The title. + */ + public java.lang.String getTitle() { + java.lang.Object ref = title_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + title_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
            +           * Title.
            +           * 
            + * + * optional string title = 3; + * + * @return The bytes for title. + */ + public com.google.protobuf.ByteString getTitleBytes() { + java.lang.Object ref = title_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + title_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
            +           * Title.
            +           * 
            + * + * optional string title = 3; + * + * @param value The title to set. + * @return This builder for chaining. + */ + public Builder setTitle(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + title_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
            +           * Title.
            +           * 
            + * + * optional string title = 3; + * + * @return This builder for chaining. + */ + public Builder clearTitle() { + title_ = getDefaultInstance().getTitle(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + + /** + * + * + *
            +           * Title.
            +           * 
            + * + * optional string title = 3; + * + * @param value The bytes for title to set. + * @return This builder for chaining. + */ + public Builder setTitleBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + title_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private java.lang.Object pageIdentifier_ = ""; + + /** + * + * + *
            +           * Page identifier.
            +           * 
            + * + * optional string page_identifier = 4; + * + * @return Whether the pageIdentifier field is set. + */ + public boolean hasPageIdentifier() { + return ((bitField0_ & 0x00000010) != 0); + } + + /** + * + * + *
            +           * Page identifier.
            +           * 
            + * + * optional string page_identifier = 4; + * + * @return The pageIdentifier. + */ + public java.lang.String getPageIdentifier() { + java.lang.Object ref = pageIdentifier_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageIdentifier_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
            +           * Page identifier.
            +           * 
            + * + * optional string page_identifier = 4; + * + * @return The bytes for pageIdentifier. + */ + public com.google.protobuf.ByteString getPageIdentifierBytes() { + java.lang.Object ref = pageIdentifier_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageIdentifier_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
            +           * Page identifier.
            +           * 
            + * + * optional string page_identifier = 4; + * + * @param value The pageIdentifier to set. + * @return This builder for chaining. + */ + public Builder setPageIdentifier(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + pageIdentifier_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
            +           * Page identifier.
            +           * 
            + * + * optional string page_identifier = 4; + * + * @return This builder for chaining. + */ + public Builder clearPageIdentifier() { + pageIdentifier_ = getDefaultInstance().getPageIdentifier(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + + /** + * + * + *
            +           * Page identifier.
            +           * 
            + * + * optional string page_identifier = 4; + * + * @param value The bytes for pageIdentifier to set. + * @return This builder for chaining. + */ + public Builder setPageIdentifierBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + pageIdentifier_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + private java.lang.Object domain_ = ""; + + /** + * + * + *
            +           * Domain name from the document URI. Note that the `uri` field may
            +           * contain a URL that redirects to the actual website, in which case
            +           * this will contain the domain name of the target site.
            +           * 
            + * + * optional string domain = 5; + * + * @return Whether the domain field is set. + */ + public boolean hasDomain() { + return ((bitField0_ & 0x00000020) != 0); + } + + /** + * + * + *
            +           * Domain name from the document URI. Note that the `uri` field may
            +           * contain a URL that redirects to the actual website, in which case
            +           * this will contain the domain name of the target site.
            +           * 
            + * + * optional string domain = 5; + * + * @return The domain. + */ + public java.lang.String getDomain() { + java.lang.Object ref = domain_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + domain_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
            +           * Domain name from the document URI. Note that the `uri` field may
            +           * contain a URL that redirects to the actual website, in which case
            +           * this will contain the domain name of the target site.
            +           * 
            + * + * optional string domain = 5; + * + * @return The bytes for domain. + */ + public com.google.protobuf.ByteString getDomainBytes() { + java.lang.Object ref = domain_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + domain_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
            +           * Domain name from the document URI. Note that the `uri` field may
            +           * contain a URL that redirects to the actual website, in which case
            +           * this will contain the domain name of the target site.
            +           * 
            + * + * optional string domain = 5; + * + * @param value The domain to set. + * @return This builder for chaining. + */ + public Builder setDomain(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + domain_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
            +           * Domain name from the document URI. Note that the `uri` field may
            +           * contain a URL that redirects to the actual website, in which case
            +           * this will contain the domain name of the target site.
            +           * 
            + * + * optional string domain = 5; + * + * @return This builder for chaining. + */ + public Builder clearDomain() { + domain_ = getDefaultInstance().getDomain(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; + } + + /** + * + * + *
            +           * Domain name from the document URI. Note that the `uri` field may
            +           * contain a URL that redirects to the actual website, in which case
            +           * this will contain the domain name of the target site.
            +           * 
            + * + * optional string domain = 5; + * + * @param value The bytes for domain to set. + * @return This builder for chaining. + */ + public Builder setDomainBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + domain_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + private java.lang.Object mimeType_ = ""; + + /** + * + * + *
            +           * The mime type of the document.
            +           * https://www.iana.org/assignments/media-types/media-types.xhtml.
            +           * 
            + * + * optional string mime_type = 7; + * + * @return Whether the mimeType field is set. + */ + public boolean hasMimeType() { + return ((bitField0_ & 0x00000040) != 0); + } + + /** + * + * + *
            +           * The mime type of the document.
            +           * https://www.iana.org/assignments/media-types/media-types.xhtml.
            +           * 
            + * + * optional string mime_type = 7; + * + * @return The mimeType. + */ + public java.lang.String getMimeType() { + java.lang.Object ref = mimeType_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + mimeType_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
            +           * The mime type of the document.
            +           * https://www.iana.org/assignments/media-types/media-types.xhtml.
            +           * 
            + * + * optional string mime_type = 7; + * + * @return The bytes for mimeType. + */ + public com.google.protobuf.ByteString getMimeTypeBytes() { + java.lang.Object ref = mimeType_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + mimeType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
            +           * The mime type of the document.
            +           * https://www.iana.org/assignments/media-types/media-types.xhtml.
            +           * 
            + * + * optional string mime_type = 7; + * + * @param value The mimeType to set. + * @return This builder for chaining. + */ + public Builder setMimeType(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + mimeType_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + /** + * + * + *
            +           * The mime type of the document.
            +           * https://www.iana.org/assignments/media-types/media-types.xhtml.
            +           * 
            + * + * optional string mime_type = 7; + * + * @return This builder for chaining. + */ + public Builder clearMimeType() { + mimeType_ = getDefaultInstance().getMimeType(); + bitField0_ = (bitField0_ & ~0x00000040); + onChanged(); + return this; + } + + /** + * + * + *
            +           * The mime type of the document.
            +           * https://www.iana.org/assignments/media-types/media-types.xhtml.
            +           * 
            + * + * optional string mime_type = 7; + * + * @param value The bytes for mimeType to set. + * @return This builder for chaining. + */ + public Builder setMimeTypeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + mimeType_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata.Reference.DocumentMetadata) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata.Reference.DocumentMetadata) + private static final com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent + .TextGroundingMetadata.Reference.DocumentMetadata + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent + .TextGroundingMetadata.Reference.DocumentMetadata(); + } + + public static com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent + .TextGroundingMetadata.Reference.DocumentMetadata + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DocumentMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent + .TextGroundingMetadata.Reference.DocumentMetadata + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int bitField0_; + public static final int CONTENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object content_ = ""; + + /** + * + * + *
            +       * Referenced text content.
            +       * 
            + * + * string content = 1; + * + * @return The content. + */ + @java.lang.Override + public java.lang.String getContent() { + java.lang.Object ref = content_; + 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(); + content_ = s; + return s; + } + } + + /** + * + * + *
            +       * Referenced text content.
            +       * 
            + * + * string content = 1; + * + * @return The bytes for content. + */ + @java.lang.Override + public com.google.protobuf.ByteString getContentBytes() { + java.lang.Object ref = content_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + content_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CODE_SNIPPET_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object codeSnippet_ = ""; + + /** + * + * + *
            +       * Chunk of code snippet from the referenced document.
            +       * 
            + * + * string code_snippet = 4; + * + * @return The codeSnippet. + */ + @java.lang.Override + public java.lang.String getCodeSnippet() { + java.lang.Object ref = codeSnippet_; + 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(); + codeSnippet_ = s; + return s; + } + } + + /** + * + * + *
            +       * Chunk of code snippet from the referenced document.
            +       * 
            + * + * string code_snippet = 4; + * + * @return The bytes for codeSnippet. + */ + @java.lang.Override + public com.google.protobuf.ByteString getCodeSnippetBytes() { + java.lang.Object ref = codeSnippet_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + codeSnippet_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DOCUMENT_METADATA_FIELD_NUMBER = 2; + private com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata + .Reference.DocumentMetadata + documentMetadata_; + + /** + * + * + *
            +       * Document metadata.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata.Reference.DocumentMetadata document_metadata = 2; + * + * + * @return Whether the documentMetadata field is set. + */ + @java.lang.Override + public boolean hasDocumentMetadata() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
            +       * Document metadata.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata.Reference.DocumentMetadata document_metadata = 2; + * + * + * @return The documentMetadata. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata + .Reference.DocumentMetadata + getDocumentMetadata() { + return documentMetadata_ == null + ? com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata + .Reference.DocumentMetadata.getDefaultInstance() + : documentMetadata_; + } + + /** + * + * + *
            +       * Document metadata.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata.Reference.DocumentMetadata document_metadata = 2; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata + .Reference.DocumentMetadataOrBuilder + getDocumentMetadataOrBuilder() { + return documentMetadata_ == null + ? com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata + .Reference.DocumentMetadata.getDefaultInstance() + : documentMetadata_; + } + + 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(content_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, content_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getDocumentMetadata()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(codeSnippet_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, codeSnippet_); + } + 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(content_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, content_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(2, getDocumentMetadata()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(codeSnippet_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, codeSnippet_); + } + 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.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata + .Reference)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata + .Reference + other = + (com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent + .TextGroundingMetadata.Reference) + obj; + + if (!getContent().equals(other.getContent())) return false; + if (!getCodeSnippet().equals(other.getCodeSnippet())) return false; + if (hasDocumentMetadata() != other.hasDocumentMetadata()) return false; + if (hasDocumentMetadata()) { + if (!getDocumentMetadata().equals(other.getDocumentMetadata())) 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) + CONTENT_FIELD_NUMBER; + hash = (53 * hash) + getContent().hashCode(); + hash = (37 * hash) + CODE_SNIPPET_FIELD_NUMBER; + hash = (53 * hash) + getCodeSnippet().hashCode(); + if (hasDocumentMetadata()) { + hash = (37 * hash) + DOCUMENT_METADATA_FIELD_NUMBER; + hash = (53 * hash) + getDocumentMetadata().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent + .TextGroundingMetadata.Reference + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent + .TextGroundingMetadata.Reference + 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.discoveryengine.v1beta.AssistantGroundedContent + .TextGroundingMetadata.Reference + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent + .TextGroundingMetadata.Reference + 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.discoveryengine.v1beta.AssistantGroundedContent + .TextGroundingMetadata.Reference + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent + .TextGroundingMetadata.Reference + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent + .TextGroundingMetadata.Reference + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent + .TextGroundingMetadata.Reference + 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.discoveryengine.v1beta.AssistantGroundedContent + .TextGroundingMetadata.Reference + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent + .TextGroundingMetadata.Reference + 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.discoveryengine.v1beta.AssistantGroundedContent + .TextGroundingMetadata.Reference + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent + .TextGroundingMetadata.Reference + 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.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata + .Reference + 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; + } + + /** + * + * + *
            +       * Referenced content and related document metadata.
            +       * 
            + * + * Protobuf type {@code + * google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata.Reference} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata.Reference) + com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata + .ReferenceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.AssistAnswerProto + .internal_static_google_cloud_discoveryengine_v1beta_AssistantGroundedContent_TextGroundingMetadata_Reference_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.AssistAnswerProto + .internal_static_google_cloud_discoveryengine_v1beta_AssistantGroundedContent_TextGroundingMetadata_Reference_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent + .TextGroundingMetadata.Reference.class, + com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent + .TextGroundingMetadata.Reference.Builder.class); + } + + // Construct using + // com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata.Reference.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetDocumentMetadataFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + content_ = ""; + codeSnippet_ = ""; + documentMetadata_ = null; + if (documentMetadataBuilder_ != null) { + documentMetadataBuilder_.dispose(); + documentMetadataBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1beta.AssistAnswerProto + .internal_static_google_cloud_discoveryengine_v1beta_AssistantGroundedContent_TextGroundingMetadata_Reference_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent + .TextGroundingMetadata.Reference + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent + .TextGroundingMetadata.Reference.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent + .TextGroundingMetadata.Reference + build() { + com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata + .Reference + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent + .TextGroundingMetadata.Reference + buildPartial() { + com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata + .Reference + result = + new com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent + .TextGroundingMetadata.Reference(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata + .Reference + result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.content_ = content_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.codeSnippet_ = codeSnippet_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.documentMetadata_ = + documentMetadataBuilder_ == null + ? documentMetadata_ + : documentMetadataBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata + .Reference) { + return mergeFrom( + (com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent + .TextGroundingMetadata.Reference) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata + .Reference + other) { + if (other + == com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent + .TextGroundingMetadata.Reference.getDefaultInstance()) return this; + if (!other.getContent().isEmpty()) { + content_ = other.content_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getCodeSnippet().isEmpty()) { + codeSnippet_ = other.codeSnippet_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasDocumentMetadata()) { + mergeDocumentMetadata(other.getDocumentMetadata()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + content_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage( + internalGetDocumentMetadataFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 18 + case 34: + { + codeSnippet_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object content_ = ""; + + /** + * + * + *
            +         * Referenced text content.
            +         * 
            + * + * string content = 1; + * + * @return The content. + */ + public java.lang.String getContent() { + java.lang.Object ref = content_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + content_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
            +         * Referenced text content.
            +         * 
            + * + * string content = 1; + * + * @return The bytes for content. + */ + public com.google.protobuf.ByteString getContentBytes() { + java.lang.Object ref = content_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + content_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
            +         * Referenced text content.
            +         * 
            + * + * string content = 1; + * + * @param value The content to set. + * @return This builder for chaining. + */ + public Builder setContent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + content_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
            +         * Referenced text content.
            +         * 
            + * + * string content = 1; + * + * @return This builder for chaining. + */ + public Builder clearContent() { + content_ = getDefaultInstance().getContent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
            +         * Referenced text content.
            +         * 
            + * + * string content = 1; + * + * @param value The bytes for content to set. + * @return This builder for chaining. + */ + public Builder setContentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + content_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object codeSnippet_ = ""; + + /** + * + * + *
            +         * Chunk of code snippet from the referenced document.
            +         * 
            + * + * string code_snippet = 4; + * + * @return The codeSnippet. + */ + public java.lang.String getCodeSnippet() { + java.lang.Object ref = codeSnippet_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + codeSnippet_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
            +         * Chunk of code snippet from the referenced document.
            +         * 
            + * + * string code_snippet = 4; + * + * @return The bytes for codeSnippet. + */ + public com.google.protobuf.ByteString getCodeSnippetBytes() { + java.lang.Object ref = codeSnippet_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + codeSnippet_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
            +         * Chunk of code snippet from the referenced document.
            +         * 
            + * + * string code_snippet = 4; + * + * @param value The codeSnippet to set. + * @return This builder for chaining. + */ + public Builder setCodeSnippet(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + codeSnippet_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
            +         * Chunk of code snippet from the referenced document.
            +         * 
            + * + * string code_snippet = 4; + * + * @return This builder for chaining. + */ + public Builder clearCodeSnippet() { + codeSnippet_ = getDefaultInstance().getCodeSnippet(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
            +         * Chunk of code snippet from the referenced document.
            +         * 
            + * + * string code_snippet = 4; + * + * @param value The bytes for codeSnippet to set. + * @return This builder for chaining. + */ + public Builder setCodeSnippetBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + codeSnippet_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent + .TextGroundingMetadata.Reference.DocumentMetadata + documentMetadata_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent + .TextGroundingMetadata.Reference.DocumentMetadata, + com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent + .TextGroundingMetadata.Reference.DocumentMetadata.Builder, + com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent + .TextGroundingMetadata.Reference.DocumentMetadataOrBuilder> + documentMetadataBuilder_; + + /** + * + * + *
            +         * Document metadata.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata.Reference.DocumentMetadata document_metadata = 2; + * + * + * @return Whether the documentMetadata field is set. + */ + public boolean hasDocumentMetadata() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
            +         * Document metadata.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata.Reference.DocumentMetadata document_metadata = 2; + * + * + * @return The documentMetadata. + */ + public com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent + .TextGroundingMetadata.Reference.DocumentMetadata + getDocumentMetadata() { + if (documentMetadataBuilder_ == null) { + return documentMetadata_ == null + ? com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent + .TextGroundingMetadata.Reference.DocumentMetadata.getDefaultInstance() + : documentMetadata_; + } else { + return documentMetadataBuilder_.getMessage(); + } + } + + /** + * + * + *
            +         * Document metadata.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata.Reference.DocumentMetadata document_metadata = 2; + * + */ + public Builder setDocumentMetadata( + com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata + .Reference.DocumentMetadata + value) { + if (documentMetadataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + documentMetadata_ = value; + } else { + documentMetadataBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
            +         * Document metadata.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata.Reference.DocumentMetadata document_metadata = 2; + * + */ + public Builder setDocumentMetadata( + com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata + .Reference.DocumentMetadata.Builder + builderForValue) { + if (documentMetadataBuilder_ == null) { + documentMetadata_ = builderForValue.build(); + } else { + documentMetadataBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
            +         * Document metadata.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata.Reference.DocumentMetadata document_metadata = 2; + * + */ + public Builder mergeDocumentMetadata( + com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata + .Reference.DocumentMetadata + value) { + if (documentMetadataBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && documentMetadata_ != null + && documentMetadata_ + != com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent + .TextGroundingMetadata.Reference.DocumentMetadata.getDefaultInstance()) { + getDocumentMetadataBuilder().mergeFrom(value); + } else { + documentMetadata_ = value; + } + } else { + documentMetadataBuilder_.mergeFrom(value); + } + if (documentMetadata_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + + /** + * + * + *
            +         * Document metadata.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata.Reference.DocumentMetadata document_metadata = 2; + * + */ + public Builder clearDocumentMetadata() { + bitField0_ = (bitField0_ & ~0x00000004); + documentMetadata_ = null; + if (documentMetadataBuilder_ != null) { + documentMetadataBuilder_.dispose(); + documentMetadataBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
            +         * Document metadata.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata.Reference.DocumentMetadata document_metadata = 2; + * + */ + public com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent + .TextGroundingMetadata.Reference.DocumentMetadata.Builder + getDocumentMetadataBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return internalGetDocumentMetadataFieldBuilder().getBuilder(); + } + + /** + * + * + *
            +         * Document metadata.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata.Reference.DocumentMetadata document_metadata = 2; + * + */ + public com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent + .TextGroundingMetadata.Reference.DocumentMetadataOrBuilder + getDocumentMetadataOrBuilder() { + if (documentMetadataBuilder_ != null) { + return documentMetadataBuilder_.getMessageOrBuilder(); + } else { + return documentMetadata_ == null + ? com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent + .TextGroundingMetadata.Reference.DocumentMetadata.getDefaultInstance() + : documentMetadata_; + } + } + + /** + * + * + *
            +         * Document metadata.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata.Reference.DocumentMetadata document_metadata = 2; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent + .TextGroundingMetadata.Reference.DocumentMetadata, + com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent + .TextGroundingMetadata.Reference.DocumentMetadata.Builder, + com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent + .TextGroundingMetadata.Reference.DocumentMetadataOrBuilder> + internalGetDocumentMetadataFieldBuilder() { + if (documentMetadataBuilder_ == null) { + documentMetadataBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent + .TextGroundingMetadata.Reference.DocumentMetadata, + com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent + .TextGroundingMetadata.Reference.DocumentMetadata.Builder, + com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent + .TextGroundingMetadata.Reference.DocumentMetadataOrBuilder>( + getDocumentMetadata(), getParentForChildren(), isClean()); + documentMetadata_ = null; + } + return documentMetadataBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata.Reference) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata.Reference) + private static final com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent + .TextGroundingMetadata.Reference + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent + .TextGroundingMetadata.Reference(); + } + + public static com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent + .TextGroundingMetadata.Reference + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Reference parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata + .Reference + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int SEGMENTS_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private java.util.List< + com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata + .Segment> + segments_; + + /** + * + * + *
            +     * Grounding information for parts of the text.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata.Segment segments = 4; + * + */ + @java.lang.Override + public java.util.List< + com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata + .Segment> + getSegmentsList() { + return segments_; + } + + /** + * + * + *
            +     * Grounding information for parts of the text.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata.Segment segments = 4; + * + */ + @java.lang.Override + public java.util.List< + ? extends + com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent + .TextGroundingMetadata.SegmentOrBuilder> + getSegmentsOrBuilderList() { + return segments_; + } + + /** + * + * + *
            +     * Grounding information for parts of the text.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata.Segment segments = 4; + * + */ + @java.lang.Override + public int getSegmentsCount() { + return segments_.size(); + } + + /** + * + * + *
            +     * Grounding information for parts of the text.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata.Segment segments = 4; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata + .Segment + getSegments(int index) { + return segments_.get(index); + } + + /** + * + * + *
            +     * Grounding information for parts of the text.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata.Segment segments = 4; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata + .SegmentOrBuilder + getSegmentsOrBuilder(int index) { + return segments_.get(index); + } + + public static final int VISUAL_SEGMENTS_FIELD_NUMBER = 6; + + @SuppressWarnings("serial") + private java.util.List< + com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata + .VisualSegment> + visualSegments_; + + /** + * + * + *
            +     * Grounding information for parts of the visual content.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata.VisualSegment visual_segments = 6; + * + */ + @java.lang.Override + public java.util.List< + com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata + .VisualSegment> + getVisualSegmentsList() { + return visualSegments_; + } + + /** + * + * + *
            +     * Grounding information for parts of the visual content.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata.VisualSegment visual_segments = 6; + * + */ + @java.lang.Override + public java.util.List< + ? extends + com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent + .TextGroundingMetadata.VisualSegmentOrBuilder> + getVisualSegmentsOrBuilderList() { + return visualSegments_; + } + + /** + * + * + *
            +     * Grounding information for parts of the visual content.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata.VisualSegment visual_segments = 6; + * + */ + @java.lang.Override + public int getVisualSegmentsCount() { + return visualSegments_.size(); + } + + /** + * + * + *
            +     * Grounding information for parts of the visual content.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata.VisualSegment visual_segments = 6; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata + .VisualSegment + getVisualSegments(int index) { + return visualSegments_.get(index); + } + + /** + * + * + *
            +     * Grounding information for parts of the visual content.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata.VisualSegment visual_segments = 6; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata + .VisualSegmentOrBuilder + getVisualSegmentsOrBuilder(int index) { + return visualSegments_.get(index); + } + + public static final int REFERENCES_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private java.util.List< + com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata + .Reference> + references_; + + /** + * + * + *
            +     * References for the grounded text.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata.Reference references = 2; + * + */ + @java.lang.Override + public java.util.List< + com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata + .Reference> + getReferencesList() { + return references_; + } + + /** + * + * + *
            +     * References for the grounded text.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata.Reference references = 2; + * + */ + @java.lang.Override + public java.util.List< + ? extends + com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent + .TextGroundingMetadata.ReferenceOrBuilder> + getReferencesOrBuilderList() { + return references_; + } + + /** + * + * + *
            +     * References for the grounded text.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata.Reference references = 2; + * + */ + @java.lang.Override + public int getReferencesCount() { + return references_.size(); + } + + /** + * + * + *
            +     * References for the grounded text.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata.Reference references = 2; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata + .Reference + getReferences(int index) { + return references_.get(index); + } + + /** + * + * + *
            +     * References for the grounded text.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata.Reference references = 2; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata + .ReferenceOrBuilder + getReferencesOrBuilder(int index) { + return references_.get(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 { + for (int i = 0; i < references_.size(); i++) { + output.writeMessage(2, references_.get(i)); + } + for (int i = 0; i < segments_.size(); i++) { + output.writeMessage(4, segments_.get(i)); + } + for (int i = 0; i < visualSegments_.size(); i++) { + output.writeMessage(6, visualSegments_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < references_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, references_.get(i)); + } + for (int i = 0; i < segments_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, segments_.get(i)); + } + for (int i = 0; i < visualSegments_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, visualSegments_.get(i)); + } + 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.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata other = + (com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata) + obj; + + if (!getSegmentsList().equals(other.getSegmentsList())) return false; + if (!getVisualSegmentsList().equals(other.getVisualSegmentsList())) return false; + if (!getReferencesList().equals(other.getReferencesList())) 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 (getSegmentsCount() > 0) { + hash = (37 * hash) + SEGMENTS_FIELD_NUMBER; + hash = (53 * hash) + getSegmentsList().hashCode(); + } + if (getVisualSegmentsCount() > 0) { + hash = (37 * hash) + VISUAL_SEGMENTS_FIELD_NUMBER; + hash = (53 * hash) + getVisualSegmentsList().hashCode(); + } + if (getReferencesCount() > 0) { + hash = (37 * hash) + REFERENCES_FIELD_NUMBER; + hash = (53 * hash) + getReferencesList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent + .TextGroundingMetadata + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent + .TextGroundingMetadata + 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.discoveryengine.v1beta.AssistantGroundedContent + .TextGroundingMetadata + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent + .TextGroundingMetadata + 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.discoveryengine.v1beta.AssistantGroundedContent + .TextGroundingMetadata + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent + .TextGroundingMetadata + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent + .TextGroundingMetadata + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent + .TextGroundingMetadata + 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.discoveryengine.v1beta.AssistantGroundedContent + .TextGroundingMetadata + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent + .TextGroundingMetadata + 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.discoveryengine.v1beta.AssistantGroundedContent + .TextGroundingMetadata + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent + .TextGroundingMetadata + 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.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata + 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; + } + + /** + * + * + *
            +     * Grounding details for text sources.
            +     * 
            + * + * Protobuf type {@code + * google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata) + com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent + .TextGroundingMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.AssistAnswerProto + .internal_static_google_cloud_discoveryengine_v1beta_AssistantGroundedContent_TextGroundingMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.AssistAnswerProto + .internal_static_google_cloud_discoveryengine_v1beta_AssistantGroundedContent_TextGroundingMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent + .TextGroundingMetadata.class, + com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent + .TextGroundingMetadata.Builder.class); + } + + // Construct using + // com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (segmentsBuilder_ == null) { + segments_ = java.util.Collections.emptyList(); + } else { + segments_ = null; + segmentsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + if (visualSegmentsBuilder_ == null) { + visualSegments_ = java.util.Collections.emptyList(); + } else { + visualSegments_ = null; + visualSegmentsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + if (referencesBuilder_ == null) { + references_ = java.util.Collections.emptyList(); + } else { + references_ = null; + referencesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000004); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1beta.AssistAnswerProto + .internal_static_google_cloud_discoveryengine_v1beta_AssistantGroundedContent_TextGroundingMetadata_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent + .TextGroundingMetadata.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata + build() { + com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata + buildPartial() { + com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata + result = + new com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent + .TextGroundingMetadata(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata + result) { + if (segmentsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + segments_ = java.util.Collections.unmodifiableList(segments_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.segments_ = segments_; + } else { + result.segments_ = segmentsBuilder_.build(); + } + if (visualSegmentsBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + visualSegments_ = java.util.Collections.unmodifiableList(visualSegments_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.visualSegments_ = visualSegments_; + } else { + result.visualSegments_ = visualSegmentsBuilder_.build(); + } + if (referencesBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0)) { + references_ = java.util.Collections.unmodifiableList(references_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.references_ = references_; + } else { + result.references_ = referencesBuilder_.build(); + } + } + + private void buildPartial0( + com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata + result) { + int from_bitField0_ = bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent + .TextGroundingMetadata) { + return mergeFrom( + (com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent + .TextGroundingMetadata) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata + other) { + if (other + == com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent + .TextGroundingMetadata.getDefaultInstance()) return this; + if (segmentsBuilder_ == null) { + if (!other.segments_.isEmpty()) { + if (segments_.isEmpty()) { + segments_ = other.segments_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureSegmentsIsMutable(); + segments_.addAll(other.segments_); + } + onChanged(); + } + } else { + if (!other.segments_.isEmpty()) { + if (segmentsBuilder_.isEmpty()) { + segmentsBuilder_.dispose(); + segmentsBuilder_ = null; + segments_ = other.segments_; + bitField0_ = (bitField0_ & ~0x00000001); + segmentsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetSegmentsFieldBuilder() + : null; + } else { + segmentsBuilder_.addAllMessages(other.segments_); + } + } + } + if (visualSegmentsBuilder_ == null) { + if (!other.visualSegments_.isEmpty()) { + if (visualSegments_.isEmpty()) { + visualSegments_ = other.visualSegments_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureVisualSegmentsIsMutable(); + visualSegments_.addAll(other.visualSegments_); + } + onChanged(); + } + } else { + if (!other.visualSegments_.isEmpty()) { + if (visualSegmentsBuilder_.isEmpty()) { + visualSegmentsBuilder_.dispose(); + visualSegmentsBuilder_ = null; + visualSegments_ = other.visualSegments_; + bitField0_ = (bitField0_ & ~0x00000002); + visualSegmentsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetVisualSegmentsFieldBuilder() + : null; + } else { + visualSegmentsBuilder_.addAllMessages(other.visualSegments_); + } + } + } + if (referencesBuilder_ == null) { + if (!other.references_.isEmpty()) { + if (references_.isEmpty()) { + references_ = other.references_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureReferencesIsMutable(); + references_.addAll(other.references_); + } + onChanged(); + } + } else { + if (!other.references_.isEmpty()) { + if (referencesBuilder_.isEmpty()) { + referencesBuilder_.dispose(); + referencesBuilder_ = null; + references_ = other.references_; + bitField0_ = (bitField0_ & ~0x00000004); + referencesBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetReferencesFieldBuilder() + : null; + } else { + referencesBuilder_.addAllMessages(other.references_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 18: + { + com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent + .TextGroundingMetadata.Reference + m = + input.readMessage( + com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent + .TextGroundingMetadata.Reference.parser(), + extensionRegistry); + if (referencesBuilder_ == null) { + ensureReferencesIsMutable(); + references_.add(m); + } else { + referencesBuilder_.addMessage(m); + } + break; + } // case 18 + case 34: + { + com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent + .TextGroundingMetadata.Segment + m = + input.readMessage( + com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent + .TextGroundingMetadata.Segment.parser(), + extensionRegistry); + if (segmentsBuilder_ == null) { + ensureSegmentsIsMutable(); + segments_.add(m); + } else { + segmentsBuilder_.addMessage(m); + } + break; + } // case 34 + case 50: + { + com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent + .TextGroundingMetadata.VisualSegment + m = + input.readMessage( + com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent + .TextGroundingMetadata.VisualSegment.parser(), + extensionRegistry); + if (visualSegmentsBuilder_ == null) { + ensureVisualSegmentsIsMutable(); + visualSegments_.add(m); + } else { + visualSegmentsBuilder_.addMessage(m); + } + break; + } // case 50 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List< + com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata + .Segment> + segments_ = java.util.Collections.emptyList(); + + private void ensureSegmentsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + segments_ = + new java.util.ArrayList< + com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent + .TextGroundingMetadata.Segment>(segments_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata + .Segment, + com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata + .Segment.Builder, + com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata + .SegmentOrBuilder> + segmentsBuilder_; + + /** + * + * + *
            +       * Grounding information for parts of the text.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata.Segment segments = 4; + * + */ + public java.util.List< + com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata + .Segment> + getSegmentsList() { + if (segmentsBuilder_ == null) { + return java.util.Collections.unmodifiableList(segments_); + } else { + return segmentsBuilder_.getMessageList(); + } + } + + /** + * + * + *
            +       * Grounding information for parts of the text.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata.Segment segments = 4; + * + */ + public int getSegmentsCount() { + if (segmentsBuilder_ == null) { + return segments_.size(); + } else { + return segmentsBuilder_.getCount(); + } + } + + /** + * + * + *
            +       * Grounding information for parts of the text.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata.Segment segments = 4; + * + */ + public com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata + .Segment + getSegments(int index) { + if (segmentsBuilder_ == null) { + return segments_.get(index); + } else { + return segmentsBuilder_.getMessage(index); + } + } + + /** + * + * + *
            +       * Grounding information for parts of the text.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata.Segment segments = 4; + * + */ + public Builder setSegments( + int index, + com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata + .Segment + value) { + if (segmentsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSegmentsIsMutable(); + segments_.set(index, value); + onChanged(); + } else { + segmentsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
            +       * Grounding information for parts of the text.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata.Segment segments = 4; + * + */ + public Builder setSegments( + int index, + com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata + .Segment.Builder + builderForValue) { + if (segmentsBuilder_ == null) { + ensureSegmentsIsMutable(); + segments_.set(index, builderForValue.build()); + onChanged(); + } else { + segmentsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
            +       * Grounding information for parts of the text.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata.Segment segments = 4; + * + */ + public Builder addSegments( + com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata + .Segment + value) { + if (segmentsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSegmentsIsMutable(); + segments_.add(value); + onChanged(); + } else { + segmentsBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
            +       * Grounding information for parts of the text.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata.Segment segments = 4; + * + */ + public Builder addSegments( + int index, + com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata + .Segment + value) { + if (segmentsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSegmentsIsMutable(); + segments_.add(index, value); + onChanged(); + } else { + segmentsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
            +       * Grounding information for parts of the text.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata.Segment segments = 4; + * + */ + public Builder addSegments( + com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata + .Segment.Builder + builderForValue) { + if (segmentsBuilder_ == null) { + ensureSegmentsIsMutable(); + segments_.add(builderForValue.build()); + onChanged(); + } else { + segmentsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
            +       * Grounding information for parts of the text.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata.Segment segments = 4; + * + */ + public Builder addSegments( + int index, + com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata + .Segment.Builder + builderForValue) { + if (segmentsBuilder_ == null) { + ensureSegmentsIsMutable(); + segments_.add(index, builderForValue.build()); + onChanged(); + } else { + segmentsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
            +       * Grounding information for parts of the text.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata.Segment segments = 4; + * + */ + public Builder addAllSegments( + java.lang.Iterable< + ? extends + com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent + .TextGroundingMetadata.Segment> + values) { + if (segmentsBuilder_ == null) { + ensureSegmentsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, segments_); + onChanged(); + } else { + segmentsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
            +       * Grounding information for parts of the text.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata.Segment segments = 4; + * + */ + public Builder clearSegments() { + if (segmentsBuilder_ == null) { + segments_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + segmentsBuilder_.clear(); + } + return this; + } + + /** + * + * + *
            +       * Grounding information for parts of the text.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata.Segment segments = 4; + * + */ + public Builder removeSegments(int index) { + if (segmentsBuilder_ == null) { + ensureSegmentsIsMutable(); + segments_.remove(index); + onChanged(); + } else { + segmentsBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
            +       * Grounding information for parts of the text.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata.Segment segments = 4; + * + */ + public com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata + .Segment.Builder + getSegmentsBuilder(int index) { + return internalGetSegmentsFieldBuilder().getBuilder(index); + } + + /** + * + * + *
            +       * Grounding information for parts of the text.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata.Segment segments = 4; + * + */ + public com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata + .SegmentOrBuilder + getSegmentsOrBuilder(int index) { + if (segmentsBuilder_ == null) { + return segments_.get(index); + } else { + return segmentsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
            +       * Grounding information for parts of the text.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata.Segment segments = 4; + * + */ + public java.util.List< + ? extends + com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent + .TextGroundingMetadata.SegmentOrBuilder> + getSegmentsOrBuilderList() { + if (segmentsBuilder_ != null) { + return segmentsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(segments_); + } + } + + /** + * + * + *
            +       * Grounding information for parts of the text.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata.Segment segments = 4; + * + */ + public com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata + .Segment.Builder + addSegmentsBuilder() { + return internalGetSegmentsFieldBuilder() + .addBuilder( + com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent + .TextGroundingMetadata.Segment.getDefaultInstance()); + } + + /** + * + * + *
            +       * Grounding information for parts of the text.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata.Segment segments = 4; + * + */ + public com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata + .Segment.Builder + addSegmentsBuilder(int index) { + return internalGetSegmentsFieldBuilder() + .addBuilder( + index, + com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent + .TextGroundingMetadata.Segment.getDefaultInstance()); + } + + /** + * + * + *
            +       * Grounding information for parts of the text.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata.Segment segments = 4; + * + */ + public java.util.List< + com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata + .Segment.Builder> + getSegmentsBuilderList() { + return internalGetSegmentsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata + .Segment, + com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata + .Segment.Builder, + com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata + .SegmentOrBuilder> + internalGetSegmentsFieldBuilder() { + if (segmentsBuilder_ == null) { + segmentsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent + .TextGroundingMetadata.Segment, + com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent + .TextGroundingMetadata.Segment.Builder, + com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent + .TextGroundingMetadata.SegmentOrBuilder>( + segments_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + segments_ = null; + } + return segmentsBuilder_; + } + + private java.util.List< + com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata + .VisualSegment> + visualSegments_ = java.util.Collections.emptyList(); + + private void ensureVisualSegmentsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + visualSegments_ = + new java.util.ArrayList< + com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent + .TextGroundingMetadata.VisualSegment>(visualSegments_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata + .VisualSegment, + com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata + .VisualSegment.Builder, + com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata + .VisualSegmentOrBuilder> + visualSegmentsBuilder_; + + /** + * + * + *
            +       * Grounding information for parts of the visual content.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata.VisualSegment visual_segments = 6; + * + */ + public java.util.List< + com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata + .VisualSegment> + getVisualSegmentsList() { + if (visualSegmentsBuilder_ == null) { + return java.util.Collections.unmodifiableList(visualSegments_); + } else { + return visualSegmentsBuilder_.getMessageList(); + } + } + + /** + * + * + *
            +       * Grounding information for parts of the visual content.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata.VisualSegment visual_segments = 6; + * + */ + public int getVisualSegmentsCount() { + if (visualSegmentsBuilder_ == null) { + return visualSegments_.size(); + } else { + return visualSegmentsBuilder_.getCount(); + } + } + + /** + * + * + *
            +       * Grounding information for parts of the visual content.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata.VisualSegment visual_segments = 6; + * + */ + public com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata + .VisualSegment + getVisualSegments(int index) { + if (visualSegmentsBuilder_ == null) { + return visualSegments_.get(index); + } else { + return visualSegmentsBuilder_.getMessage(index); + } + } + + /** + * + * + *
            +       * Grounding information for parts of the visual content.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata.VisualSegment visual_segments = 6; + * + */ + public Builder setVisualSegments( + int index, + com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata + .VisualSegment + value) { + if (visualSegmentsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureVisualSegmentsIsMutable(); + visualSegments_.set(index, value); + onChanged(); + } else { + visualSegmentsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
            +       * Grounding information for parts of the visual content.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata.VisualSegment visual_segments = 6; + * + */ + public Builder setVisualSegments( + int index, + com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata + .VisualSegment.Builder + builderForValue) { + if (visualSegmentsBuilder_ == null) { + ensureVisualSegmentsIsMutable(); + visualSegments_.set(index, builderForValue.build()); + onChanged(); + } else { + visualSegmentsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
            +       * Grounding information for parts of the visual content.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata.VisualSegment visual_segments = 6; + * + */ + public Builder addVisualSegments( + com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata + .VisualSegment + value) { + if (visualSegmentsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureVisualSegmentsIsMutable(); + visualSegments_.add(value); + onChanged(); + } else { + visualSegmentsBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
            +       * Grounding information for parts of the visual content.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata.VisualSegment visual_segments = 6; + * + */ + public Builder addVisualSegments( + int index, + com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata + .VisualSegment + value) { + if (visualSegmentsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureVisualSegmentsIsMutable(); + visualSegments_.add(index, value); + onChanged(); + } else { + visualSegmentsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
            +       * Grounding information for parts of the visual content.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata.VisualSegment visual_segments = 6; + * + */ + public Builder addVisualSegments( + com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata + .VisualSegment.Builder + builderForValue) { + if (visualSegmentsBuilder_ == null) { + ensureVisualSegmentsIsMutable(); + visualSegments_.add(builderForValue.build()); + onChanged(); + } else { + visualSegmentsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
            +       * Grounding information for parts of the visual content.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata.VisualSegment visual_segments = 6; + * + */ + public Builder addVisualSegments( + int index, + com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata + .VisualSegment.Builder + builderForValue) { + if (visualSegmentsBuilder_ == null) { + ensureVisualSegmentsIsMutable(); + visualSegments_.add(index, builderForValue.build()); + onChanged(); + } else { + visualSegmentsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
            +       * Grounding information for parts of the visual content.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata.VisualSegment visual_segments = 6; + * + */ + public Builder addAllVisualSegments( + java.lang.Iterable< + ? extends + com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent + .TextGroundingMetadata.VisualSegment> + values) { + if (visualSegmentsBuilder_ == null) { + ensureVisualSegmentsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, visualSegments_); + onChanged(); + } else { + visualSegmentsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
            +       * Grounding information for parts of the visual content.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata.VisualSegment visual_segments = 6; + * + */ + public Builder clearVisualSegments() { + if (visualSegmentsBuilder_ == null) { + visualSegments_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + visualSegmentsBuilder_.clear(); + } + return this; + } + + /** + * + * + *
            +       * Grounding information for parts of the visual content.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata.VisualSegment visual_segments = 6; + * + */ + public Builder removeVisualSegments(int index) { + if (visualSegmentsBuilder_ == null) { + ensureVisualSegmentsIsMutable(); + visualSegments_.remove(index); + onChanged(); + } else { + visualSegmentsBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
            +       * Grounding information for parts of the visual content.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata.VisualSegment visual_segments = 6; + * + */ + public com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata + .VisualSegment.Builder + getVisualSegmentsBuilder(int index) { + return internalGetVisualSegmentsFieldBuilder().getBuilder(index); + } + + /** + * + * + *
            +       * Grounding information for parts of the visual content.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata.VisualSegment visual_segments = 6; + * + */ + public com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata + .VisualSegmentOrBuilder + getVisualSegmentsOrBuilder(int index) { + if (visualSegmentsBuilder_ == null) { + return visualSegments_.get(index); + } else { + return visualSegmentsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
            +       * Grounding information for parts of the visual content.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata.VisualSegment visual_segments = 6; + * + */ + public java.util.List< + ? extends + com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent + .TextGroundingMetadata.VisualSegmentOrBuilder> + getVisualSegmentsOrBuilderList() { + if (visualSegmentsBuilder_ != null) { + return visualSegmentsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(visualSegments_); + } + } + + /** + * + * + *
            +       * Grounding information for parts of the visual content.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata.VisualSegment visual_segments = 6; + * + */ + public com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata + .VisualSegment.Builder + addVisualSegmentsBuilder() { + return internalGetVisualSegmentsFieldBuilder() + .addBuilder( + com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent + .TextGroundingMetadata.VisualSegment.getDefaultInstance()); + } + + /** + * + * + *
            +       * Grounding information for parts of the visual content.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata.VisualSegment visual_segments = 6; + * + */ + public com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata + .VisualSegment.Builder + addVisualSegmentsBuilder(int index) { + return internalGetVisualSegmentsFieldBuilder() + .addBuilder( + index, + com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent + .TextGroundingMetadata.VisualSegment.getDefaultInstance()); + } + + /** + * + * + *
            +       * Grounding information for parts of the visual content.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata.VisualSegment visual_segments = 6; + * + */ + public java.util.List< + com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata + .VisualSegment.Builder> + getVisualSegmentsBuilderList() { + return internalGetVisualSegmentsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata + .VisualSegment, + com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata + .VisualSegment.Builder, + com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata + .VisualSegmentOrBuilder> + internalGetVisualSegmentsFieldBuilder() { + if (visualSegmentsBuilder_ == null) { + visualSegmentsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent + .TextGroundingMetadata.VisualSegment, + com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent + .TextGroundingMetadata.VisualSegment.Builder, + com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent + .TextGroundingMetadata.VisualSegmentOrBuilder>( + visualSegments_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + visualSegments_ = null; + } + return visualSegmentsBuilder_; + } + + private java.util.List< + com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata + .Reference> + references_ = java.util.Collections.emptyList(); + + private void ensureReferencesIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + references_ = + new java.util.ArrayList< + com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent + .TextGroundingMetadata.Reference>(references_); + bitField0_ |= 0x00000004; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata + .Reference, + com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata + .Reference.Builder, + com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata + .ReferenceOrBuilder> + referencesBuilder_; + + /** + * + * + *
            +       * References for the grounded text.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata.Reference references = 2; + * + */ + public java.util.List< + com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata + .Reference> + getReferencesList() { + if (referencesBuilder_ == null) { + return java.util.Collections.unmodifiableList(references_); + } else { + return referencesBuilder_.getMessageList(); + } + } + + /** + * + * + *
            +       * References for the grounded text.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata.Reference references = 2; + * + */ + public int getReferencesCount() { + if (referencesBuilder_ == null) { + return references_.size(); + } else { + return referencesBuilder_.getCount(); + } + } + + /** + * + * + *
            +       * References for the grounded text.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata.Reference references = 2; + * + */ + public com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata + .Reference + getReferences(int index) { + if (referencesBuilder_ == null) { + return references_.get(index); + } else { + return referencesBuilder_.getMessage(index); + } + } + + /** + * + * + *
            +       * References for the grounded text.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata.Reference references = 2; + * + */ + public Builder setReferences( + int index, + com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata + .Reference + value) { + if (referencesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureReferencesIsMutable(); + references_.set(index, value); + onChanged(); + } else { + referencesBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
            +       * References for the grounded text.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata.Reference references = 2; + * + */ + public Builder setReferences( + int index, + com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata + .Reference.Builder + builderForValue) { + if (referencesBuilder_ == null) { + ensureReferencesIsMutable(); + references_.set(index, builderForValue.build()); + onChanged(); + } else { + referencesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
            +       * References for the grounded text.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata.Reference references = 2; + * + */ + public Builder addReferences( + com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata + .Reference + value) { + if (referencesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureReferencesIsMutable(); + references_.add(value); + onChanged(); + } else { + referencesBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
            +       * References for the grounded text.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata.Reference references = 2; + * + */ + public Builder addReferences( + int index, + com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata + .Reference + value) { + if (referencesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureReferencesIsMutable(); + references_.add(index, value); + onChanged(); + } else { + referencesBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
            +       * References for the grounded text.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata.Reference references = 2; + * + */ + public Builder addReferences( + com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata + .Reference.Builder + builderForValue) { + if (referencesBuilder_ == null) { + ensureReferencesIsMutable(); + references_.add(builderForValue.build()); + onChanged(); + } else { + referencesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
            +       * References for the grounded text.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata.Reference references = 2; + * + */ + public Builder addReferences( + int index, + com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata + .Reference.Builder + builderForValue) { + if (referencesBuilder_ == null) { + ensureReferencesIsMutable(); + references_.add(index, builderForValue.build()); + onChanged(); + } else { + referencesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
            +       * References for the grounded text.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata.Reference references = 2; + * + */ + public Builder addAllReferences( + java.lang.Iterable< + ? extends + com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent + .TextGroundingMetadata.Reference> + values) { + if (referencesBuilder_ == null) { + ensureReferencesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, references_); + onChanged(); + } else { + referencesBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
            +       * References for the grounded text.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata.Reference references = 2; + * + */ + public Builder clearReferences() { + if (referencesBuilder_ == null) { + references_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + } else { + referencesBuilder_.clear(); + } + return this; + } + + /** + * + * + *
            +       * References for the grounded text.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata.Reference references = 2; + * + */ + public Builder removeReferences(int index) { + if (referencesBuilder_ == null) { + ensureReferencesIsMutable(); + references_.remove(index); + onChanged(); + } else { + referencesBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
            +       * References for the grounded text.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata.Reference references = 2; + * + */ + public com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata + .Reference.Builder + getReferencesBuilder(int index) { + return internalGetReferencesFieldBuilder().getBuilder(index); + } + + /** + * + * + *
            +       * References for the grounded text.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata.Reference references = 2; + * + */ + public com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata + .ReferenceOrBuilder + getReferencesOrBuilder(int index) { + if (referencesBuilder_ == null) { + return references_.get(index); + } else { + return referencesBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
            +       * References for the grounded text.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata.Reference references = 2; + * + */ + public java.util.List< + ? extends + com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent + .TextGroundingMetadata.ReferenceOrBuilder> + getReferencesOrBuilderList() { + if (referencesBuilder_ != null) { + return referencesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(references_); + } + } + + /** + * + * + *
            +       * References for the grounded text.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata.Reference references = 2; + * + */ + public com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata + .Reference.Builder + addReferencesBuilder() { + return internalGetReferencesFieldBuilder() + .addBuilder( + com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent + .TextGroundingMetadata.Reference.getDefaultInstance()); + } + + /** + * + * + *
            +       * References for the grounded text.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata.Reference references = 2; + * + */ + public com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata + .Reference.Builder + addReferencesBuilder(int index) { + return internalGetReferencesFieldBuilder() + .addBuilder( + index, + com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent + .TextGroundingMetadata.Reference.getDefaultInstance()); + } + + /** + * + * + *
            +       * References for the grounded text.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata.Reference references = 2; + * + */ + public java.util.List< + com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata + .Reference.Builder> + getReferencesBuilderList() { + return internalGetReferencesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata + .Reference, + com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata + .Reference.Builder, + com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata + .ReferenceOrBuilder> + internalGetReferencesFieldBuilder() { + if (referencesBuilder_ == null) { + referencesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent + .TextGroundingMetadata.Reference, + com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent + .TextGroundingMetadata.Reference.Builder, + com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent + .TextGroundingMetadata.ReferenceOrBuilder>( + references_, ((bitField0_ & 0x00000004) != 0), getParentForChildren(), isClean()); + references_ = null; + } + return referencesBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata) + private static final com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent + .TextGroundingMetadata + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent + .TextGroundingMetadata(); + } + + public static com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent + .TextGroundingMetadata + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TextGroundingMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int bitField0_; + private int metadataCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object metadata_; + + public enum MetadataCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + TEXT_GROUNDING_METADATA(3), + METADATA_NOT_SET(0); + private final int value; + + private MetadataCase(int value) { + this.value = value; + } + + /** + * @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 MetadataCase valueOf(int value) { + return forNumber(value); + } + + public static MetadataCase forNumber(int value) { + switch (value) { + case 3: + return TEXT_GROUNDING_METADATA; + case 0: + return METADATA_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public MetadataCase getMetadataCase() { + return MetadataCase.forNumber(metadataCase_); + } + + public static final int TEXT_GROUNDING_METADATA_FIELD_NUMBER = 3; + + /** + * + * + *
            +   * Metadata for grounding based on text sources.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata text_grounding_metadata = 3; + * + * + * @return Whether the textGroundingMetadata field is set. + */ + @java.lang.Override + public boolean hasTextGroundingMetadata() { + return metadataCase_ == 3; + } + + /** + * + * + *
            +   * Metadata for grounding based on text sources.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata text_grounding_metadata = 3; + * + * + * @return The textGroundingMetadata. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata + getTextGroundingMetadata() { + if (metadataCase_ == 3) { + return (com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent + .TextGroundingMetadata) + metadata_; + } + return com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata + .getDefaultInstance(); + } + + /** + * + * + *
            +   * Metadata for grounding based on text sources.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata text_grounding_metadata = 3; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent + .TextGroundingMetadataOrBuilder + getTextGroundingMetadataOrBuilder() { + if (metadataCase_ == 3) { + return (com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent + .TextGroundingMetadata) + metadata_; + } + return com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata + .getDefaultInstance(); + } + + public static final int CONTENT_FIELD_NUMBER = 1; + private com.google.cloud.discoveryengine.v1beta.AssistantContent content_; + + /** + * + * + *
            +   * The content.
            +   * 
            + * + * .google.cloud.discoveryengine.v1beta.AssistantContent content = 1; + * + * @return Whether the content field is set. + */ + @java.lang.Override + public boolean hasContent() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
            +   * The content.
            +   * 
            + * + * .google.cloud.discoveryengine.v1beta.AssistantContent content = 1; + * + * @return The content. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AssistantContent getContent() { + return content_ == null + ? com.google.cloud.discoveryengine.v1beta.AssistantContent.getDefaultInstance() + : content_; + } + + /** + * + * + *
            +   * The content.
            +   * 
            + * + * .google.cloud.discoveryengine.v1beta.AssistantContent content = 1; + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AssistantContentOrBuilder getContentOrBuilder() { + return content_ == null + ? com.google.cloud.discoveryengine.v1beta.AssistantContent.getDefaultInstance() + : content_; + } + + public static final int CITATION_METADATA_FIELD_NUMBER = 5; + private com.google.cloud.discoveryengine.v1beta.CitationMetadata citationMetadata_; + + /** + * + * + *
            +   * Source attribution of the generated content. See also
            +   * https://cloud.google.com/vertex-ai/generative-ai/docs/learn/overview#citation_check
            +   * 
            + * + * .google.cloud.discoveryengine.v1beta.CitationMetadata citation_metadata = 5; + * + * @return Whether the citationMetadata field is set. + */ + @java.lang.Override + public boolean hasCitationMetadata() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
            +   * Source attribution of the generated content. See also
            +   * https://cloud.google.com/vertex-ai/generative-ai/docs/learn/overview#citation_check
            +   * 
            + * + * .google.cloud.discoveryengine.v1beta.CitationMetadata citation_metadata = 5; + * + * @return The citationMetadata. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.CitationMetadata getCitationMetadata() { + return citationMetadata_ == null + ? com.google.cloud.discoveryengine.v1beta.CitationMetadata.getDefaultInstance() + : citationMetadata_; + } + + /** + * + * + *
            +   * Source attribution of the generated content. See also
            +   * https://cloud.google.com/vertex-ai/generative-ai/docs/learn/overview#citation_check
            +   * 
            + * + * .google.cloud.discoveryengine.v1beta.CitationMetadata citation_metadata = 5; + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.CitationMetadataOrBuilder + getCitationMetadataOrBuilder() { + return citationMetadata_ == null + ? com.google.cloud.discoveryengine.v1beta.CitationMetadata.getDefaultInstance() + : citationMetadata_; + } + + 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, getContent()); + } + if (metadataCase_ == 3) { + output.writeMessage( + 3, + (com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata) + metadata_); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(5, getCitationMetadata()); + } + 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, getContent()); + } + if (metadataCase_ == 3) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 3, + (com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent + .TextGroundingMetadata) + metadata_); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getCitationMetadata()); + } + 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.discoveryengine.v1beta.AssistantGroundedContent)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent other = + (com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent) obj; + + if (hasContent() != other.hasContent()) return false; + if (hasContent()) { + if (!getContent().equals(other.getContent())) return false; + } + if (hasCitationMetadata() != other.hasCitationMetadata()) return false; + if (hasCitationMetadata()) { + if (!getCitationMetadata().equals(other.getCitationMetadata())) return false; + } + if (!getMetadataCase().equals(other.getMetadataCase())) return false; + switch (metadataCase_) { + case 3: + if (!getTextGroundingMetadata().equals(other.getTextGroundingMetadata())) return false; + break; + case 0: + default: + } + 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 (hasContent()) { + hash = (37 * hash) + CONTENT_FIELD_NUMBER; + hash = (53 * hash) + getContent().hashCode(); + } + if (hasCitationMetadata()) { + hash = (37 * hash) + CITATION_METADATA_FIELD_NUMBER; + hash = (53 * hash) + getCitationMetadata().hashCode(); + } + switch (metadataCase_) { + case 3: + hash = (37 * hash) + TEXT_GROUNDING_METADATA_FIELD_NUMBER; + hash = (53 * hash) + getTextGroundingMetadata().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent 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.discoveryengine.v1beta.AssistantGroundedContent parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent 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.discoveryengine.v1beta.AssistantGroundedContent parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent 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.discoveryengine.v1beta.AssistantGroundedContent parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent 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.discoveryengine.v1beta.AssistantGroundedContent parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent 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.discoveryengine.v1beta.AssistantGroundedContent 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 piece of content and possibly its grounding information.
            +   *
            +   * Not all content needs grounding. Phrases like "Of course, I will gladly
            +   * search it for you." do not need grounding.
            +   * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.AssistantGroundedContent} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.AssistantGroundedContent) + com.google.cloud.discoveryengine.v1beta.AssistantGroundedContentOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.AssistAnswerProto + .internal_static_google_cloud_discoveryengine_v1beta_AssistantGroundedContent_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.AssistAnswerProto + .internal_static_google_cloud_discoveryengine_v1beta_AssistantGroundedContent_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent.class, + com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent.Builder.class); + } + + // Construct using com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetContentFieldBuilder(); + internalGetCitationMetadataFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (textGroundingMetadataBuilder_ != null) { + textGroundingMetadataBuilder_.clear(); + } + content_ = null; + if (contentBuilder_ != null) { + contentBuilder_.dispose(); + contentBuilder_ = null; + } + citationMetadata_ = null; + if (citationMetadataBuilder_ != null) { + citationMetadataBuilder_.dispose(); + citationMetadataBuilder_ = null; + } + metadataCase_ = 0; + metadata_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1beta.AssistAnswerProto + .internal_static_google_cloud_discoveryengine_v1beta_AssistantGroundedContent_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent build() { + com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent buildPartial() { + com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent result = + new com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.content_ = contentBuilder_ == null ? content_ : contentBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.citationMetadata_ = + citationMetadataBuilder_ == null ? citationMetadata_ : citationMetadataBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + result.bitField0_ |= to_bitField0_; + } + + private void buildPartialOneofs( + com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent result) { + result.metadataCase_ = metadataCase_; + result.metadata_ = this.metadata_; + if (metadataCase_ == 3 && textGroundingMetadataBuilder_ != null) { + result.metadata_ = textGroundingMetadataBuilder_.build(); + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent) { + return mergeFrom((com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent other) { + if (other + == com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent.getDefaultInstance()) + return this; + if (other.hasContent()) { + mergeContent(other.getContent()); + } + if (other.hasCitationMetadata()) { + mergeCitationMetadata(other.getCitationMetadata()); + } + switch (other.getMetadataCase()) { + case TEXT_GROUNDING_METADATA: + { + mergeTextGroundingMetadata(other.getTextGroundingMetadata()); + break; + } + case METADATA_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(internalGetContentFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 10 + case 26: + { + input.readMessage( + internalGetTextGroundingMetadataFieldBuilder().getBuilder(), extensionRegistry); + metadataCase_ = 3; + break; + } // case 26 + case 42: + { + input.readMessage( + internalGetCitationMetadataFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 42 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int metadataCase_ = 0; + private java.lang.Object metadata_; + + public MetadataCase getMetadataCase() { + return MetadataCase.forNumber(metadataCase_); + } + + public Builder clearMetadata() { + metadataCase_ = 0; + metadata_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata, + com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata + .Builder, + com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent + .TextGroundingMetadataOrBuilder> + textGroundingMetadataBuilder_; + + /** + * + * + *
            +     * Metadata for grounding based on text sources.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata text_grounding_metadata = 3; + * + * + * @return Whether the textGroundingMetadata field is set. + */ + @java.lang.Override + public boolean hasTextGroundingMetadata() { + return metadataCase_ == 3; + } + + /** + * + * + *
            +     * Metadata for grounding based on text sources.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata text_grounding_metadata = 3; + * + * + * @return The textGroundingMetadata. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata + getTextGroundingMetadata() { + if (textGroundingMetadataBuilder_ == null) { + if (metadataCase_ == 3) { + return (com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent + .TextGroundingMetadata) + metadata_; + } + return com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent + .TextGroundingMetadata.getDefaultInstance(); + } else { + if (metadataCase_ == 3) { + return textGroundingMetadataBuilder_.getMessage(); + } + return com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent + .TextGroundingMetadata.getDefaultInstance(); + } + } + + /** + * + * + *
            +     * Metadata for grounding based on text sources.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata text_grounding_metadata = 3; + * + */ + public Builder setTextGroundingMetadata( + com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata + value) { + if (textGroundingMetadataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + metadata_ = value; + onChanged(); + } else { + textGroundingMetadataBuilder_.setMessage(value); + } + metadataCase_ = 3; + return this; + } + + /** + * + * + *
            +     * Metadata for grounding based on text sources.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata text_grounding_metadata = 3; + * + */ + public Builder setTextGroundingMetadata( + com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata + .Builder + builderForValue) { + if (textGroundingMetadataBuilder_ == null) { + metadata_ = builderForValue.build(); + onChanged(); + } else { + textGroundingMetadataBuilder_.setMessage(builderForValue.build()); + } + metadataCase_ = 3; + return this; + } + + /** + * + * + *
            +     * Metadata for grounding based on text sources.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata text_grounding_metadata = 3; + * + */ + public Builder mergeTextGroundingMetadata( + com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata + value) { + if (textGroundingMetadataBuilder_ == null) { + if (metadataCase_ == 3 + && metadata_ + != com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent + .TextGroundingMetadata.getDefaultInstance()) { + metadata_ = + com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata + .newBuilder( + (com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent + .TextGroundingMetadata) + metadata_) + .mergeFrom(value) + .buildPartial(); + } else { + metadata_ = value; + } + onChanged(); + } else { + if (metadataCase_ == 3) { + textGroundingMetadataBuilder_.mergeFrom(value); + } else { + textGroundingMetadataBuilder_.setMessage(value); + } + } + metadataCase_ = 3; + return this; + } + + /** + * + * + *
            +     * Metadata for grounding based on text sources.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata text_grounding_metadata = 3; + * + */ + public Builder clearTextGroundingMetadata() { + if (textGroundingMetadataBuilder_ == null) { + if (metadataCase_ == 3) { + metadataCase_ = 0; + metadata_ = null; + onChanged(); + } + } else { + if (metadataCase_ == 3) { + metadataCase_ = 0; + metadata_ = null; + } + textGroundingMetadataBuilder_.clear(); + } + return this; + } + + /** + * + * + *
            +     * Metadata for grounding based on text sources.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata text_grounding_metadata = 3; + * + */ + public com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata + .Builder + getTextGroundingMetadataBuilder() { + return internalGetTextGroundingMetadataFieldBuilder().getBuilder(); + } + + /** + * + * + *
            +     * Metadata for grounding based on text sources.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata text_grounding_metadata = 3; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent + .TextGroundingMetadataOrBuilder + getTextGroundingMetadataOrBuilder() { + if ((metadataCase_ == 3) && (textGroundingMetadataBuilder_ != null)) { + return textGroundingMetadataBuilder_.getMessageOrBuilder(); + } else { + if (metadataCase_ == 3) { + return (com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent + .TextGroundingMetadata) + metadata_; + } + return com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent + .TextGroundingMetadata.getDefaultInstance(); + } + } + + /** + * + * + *
            +     * Metadata for grounding based on text sources.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata text_grounding_metadata = 3; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata, + com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata + .Builder, + com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent + .TextGroundingMetadataOrBuilder> + internalGetTextGroundingMetadataFieldBuilder() { + if (textGroundingMetadataBuilder_ == null) { + if (!(metadataCase_ == 3)) { + metadata_ = + com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata + .getDefaultInstance(); + } + textGroundingMetadataBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent + .TextGroundingMetadata, + com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent + .TextGroundingMetadata.Builder, + com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent + .TextGroundingMetadataOrBuilder>( + (com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent + .TextGroundingMetadata) + metadata_, + getParentForChildren(), + isClean()); + metadata_ = null; + } + metadataCase_ = 3; + onChanged(); + return textGroundingMetadataBuilder_; + } + + private com.google.cloud.discoveryengine.v1beta.AssistantContent content_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.AssistantContent, + com.google.cloud.discoveryengine.v1beta.AssistantContent.Builder, + com.google.cloud.discoveryengine.v1beta.AssistantContentOrBuilder> + contentBuilder_; + + /** + * + * + *
            +     * The content.
            +     * 
            + * + * .google.cloud.discoveryengine.v1beta.AssistantContent content = 1; + * + * @return Whether the content field is set. + */ + public boolean hasContent() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
            +     * The content.
            +     * 
            + * + * .google.cloud.discoveryengine.v1beta.AssistantContent content = 1; + * + * @return The content. + */ + public com.google.cloud.discoveryengine.v1beta.AssistantContent getContent() { + if (contentBuilder_ == null) { + return content_ == null + ? com.google.cloud.discoveryengine.v1beta.AssistantContent.getDefaultInstance() + : content_; + } else { + return contentBuilder_.getMessage(); + } + } + + /** + * + * + *
            +     * The content.
            +     * 
            + * + * .google.cloud.discoveryengine.v1beta.AssistantContent content = 1; + */ + public Builder setContent(com.google.cloud.discoveryengine.v1beta.AssistantContent value) { + if (contentBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + content_ = value; + } else { + contentBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
            +     * The content.
            +     * 
            + * + * .google.cloud.discoveryengine.v1beta.AssistantContent content = 1; + */ + public Builder setContent( + com.google.cloud.discoveryengine.v1beta.AssistantContent.Builder builderForValue) { + if (contentBuilder_ == null) { + content_ = builderForValue.build(); + } else { + contentBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
            +     * The content.
            +     * 
            + * + * .google.cloud.discoveryengine.v1beta.AssistantContent content = 1; + */ + public Builder mergeContent(com.google.cloud.discoveryengine.v1beta.AssistantContent value) { + if (contentBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && content_ != null + && content_ + != com.google.cloud.discoveryengine.v1beta.AssistantContent.getDefaultInstance()) { + getContentBuilder().mergeFrom(value); + } else { + content_ = value; + } + } else { + contentBuilder_.mergeFrom(value); + } + if (content_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** + * + * + *
            +     * The content.
            +     * 
            + * + * .google.cloud.discoveryengine.v1beta.AssistantContent content = 1; + */ + public Builder clearContent() { + bitField0_ = (bitField0_ & ~0x00000002); + content_ = null; + if (contentBuilder_ != null) { + contentBuilder_.dispose(); + contentBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
            +     * The content.
            +     * 
            + * + * .google.cloud.discoveryengine.v1beta.AssistantContent content = 1; + */ + public com.google.cloud.discoveryengine.v1beta.AssistantContent.Builder getContentBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return internalGetContentFieldBuilder().getBuilder(); + } + + /** + * + * + *
            +     * The content.
            +     * 
            + * + * .google.cloud.discoveryengine.v1beta.AssistantContent content = 1; + */ + public com.google.cloud.discoveryengine.v1beta.AssistantContentOrBuilder getContentOrBuilder() { + if (contentBuilder_ != null) { + return contentBuilder_.getMessageOrBuilder(); + } else { + return content_ == null + ? com.google.cloud.discoveryengine.v1beta.AssistantContent.getDefaultInstance() + : content_; + } + } + + /** + * + * + *
            +     * The content.
            +     * 
            + * + * .google.cloud.discoveryengine.v1beta.AssistantContent content = 1; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.AssistantContent, + com.google.cloud.discoveryengine.v1beta.AssistantContent.Builder, + com.google.cloud.discoveryengine.v1beta.AssistantContentOrBuilder> + internalGetContentFieldBuilder() { + if (contentBuilder_ == null) { + contentBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.AssistantContent, + com.google.cloud.discoveryengine.v1beta.AssistantContent.Builder, + com.google.cloud.discoveryengine.v1beta.AssistantContentOrBuilder>( + getContent(), getParentForChildren(), isClean()); + content_ = null; + } + return contentBuilder_; + } + + private com.google.cloud.discoveryengine.v1beta.CitationMetadata citationMetadata_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.CitationMetadata, + com.google.cloud.discoveryengine.v1beta.CitationMetadata.Builder, + com.google.cloud.discoveryengine.v1beta.CitationMetadataOrBuilder> + citationMetadataBuilder_; + + /** + * + * + *
            +     * Source attribution of the generated content. See also
            +     * https://cloud.google.com/vertex-ai/generative-ai/docs/learn/overview#citation_check
            +     * 
            + * + * .google.cloud.discoveryengine.v1beta.CitationMetadata citation_metadata = 5; + * + * @return Whether the citationMetadata field is set. + */ + public boolean hasCitationMetadata() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
            +     * Source attribution of the generated content. See also
            +     * https://cloud.google.com/vertex-ai/generative-ai/docs/learn/overview#citation_check
            +     * 
            + * + * .google.cloud.discoveryengine.v1beta.CitationMetadata citation_metadata = 5; + * + * @return The citationMetadata. + */ + public com.google.cloud.discoveryengine.v1beta.CitationMetadata getCitationMetadata() { + if (citationMetadataBuilder_ == null) { + return citationMetadata_ == null + ? com.google.cloud.discoveryengine.v1beta.CitationMetadata.getDefaultInstance() + : citationMetadata_; + } else { + return citationMetadataBuilder_.getMessage(); + } + } + + /** + * + * + *
            +     * Source attribution of the generated content. See also
            +     * https://cloud.google.com/vertex-ai/generative-ai/docs/learn/overview#citation_check
            +     * 
            + * + * .google.cloud.discoveryengine.v1beta.CitationMetadata citation_metadata = 5; + */ + public Builder setCitationMetadata( + com.google.cloud.discoveryengine.v1beta.CitationMetadata value) { + if (citationMetadataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + citationMetadata_ = value; + } else { + citationMetadataBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Source attribution of the generated content. See also
            +     * https://cloud.google.com/vertex-ai/generative-ai/docs/learn/overview#citation_check
            +     * 
            + * + * .google.cloud.discoveryengine.v1beta.CitationMetadata citation_metadata = 5; + */ + public Builder setCitationMetadata( + com.google.cloud.discoveryengine.v1beta.CitationMetadata.Builder builderForValue) { + if (citationMetadataBuilder_ == null) { + citationMetadata_ = builderForValue.build(); + } else { + citationMetadataBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Source attribution of the generated content. See also
            +     * https://cloud.google.com/vertex-ai/generative-ai/docs/learn/overview#citation_check
            +     * 
            + * + * .google.cloud.discoveryengine.v1beta.CitationMetadata citation_metadata = 5; + */ + public Builder mergeCitationMetadata( + com.google.cloud.discoveryengine.v1beta.CitationMetadata value) { + if (citationMetadataBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && citationMetadata_ != null + && citationMetadata_ + != com.google.cloud.discoveryengine.v1beta.CitationMetadata.getDefaultInstance()) { + getCitationMetadataBuilder().mergeFrom(value); + } else { + citationMetadata_ = value; + } + } else { + citationMetadataBuilder_.mergeFrom(value); + } + if (citationMetadata_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + + /** + * + * + *
            +     * Source attribution of the generated content. See also
            +     * https://cloud.google.com/vertex-ai/generative-ai/docs/learn/overview#citation_check
            +     * 
            + * + * .google.cloud.discoveryengine.v1beta.CitationMetadata citation_metadata = 5; + */ + public Builder clearCitationMetadata() { + bitField0_ = (bitField0_ & ~0x00000004); + citationMetadata_ = null; + if (citationMetadataBuilder_ != null) { + citationMetadataBuilder_.dispose(); + citationMetadataBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
            +     * Source attribution of the generated content. See also
            +     * https://cloud.google.com/vertex-ai/generative-ai/docs/learn/overview#citation_check
            +     * 
            + * + * .google.cloud.discoveryengine.v1beta.CitationMetadata citation_metadata = 5; + */ + public com.google.cloud.discoveryengine.v1beta.CitationMetadata.Builder + getCitationMetadataBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return internalGetCitationMetadataFieldBuilder().getBuilder(); + } + + /** + * + * + *
            +     * Source attribution of the generated content. See also
            +     * https://cloud.google.com/vertex-ai/generative-ai/docs/learn/overview#citation_check
            +     * 
            + * + * .google.cloud.discoveryengine.v1beta.CitationMetadata citation_metadata = 5; + */ + public com.google.cloud.discoveryengine.v1beta.CitationMetadataOrBuilder + getCitationMetadataOrBuilder() { + if (citationMetadataBuilder_ != null) { + return citationMetadataBuilder_.getMessageOrBuilder(); + } else { + return citationMetadata_ == null + ? com.google.cloud.discoveryengine.v1beta.CitationMetadata.getDefaultInstance() + : citationMetadata_; + } + } + + /** + * + * + *
            +     * Source attribution of the generated content. See also
            +     * https://cloud.google.com/vertex-ai/generative-ai/docs/learn/overview#citation_check
            +     * 
            + * + * .google.cloud.discoveryengine.v1beta.CitationMetadata citation_metadata = 5; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.CitationMetadata, + com.google.cloud.discoveryengine.v1beta.CitationMetadata.Builder, + com.google.cloud.discoveryengine.v1beta.CitationMetadataOrBuilder> + internalGetCitationMetadataFieldBuilder() { + if (citationMetadataBuilder_ == null) { + citationMetadataBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.CitationMetadata, + com.google.cloud.discoveryengine.v1beta.CitationMetadata.Builder, + com.google.cloud.discoveryengine.v1beta.CitationMetadataOrBuilder>( + getCitationMetadata(), getParentForChildren(), isClean()); + citationMetadata_ = null; + } + return citationMetadataBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.AssistantGroundedContent) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.AssistantGroundedContent) + private static final com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent(); + } + + public static com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AssistantGroundedContent parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/AssistantGroundedContentOrBuilder.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/AssistantGroundedContentOrBuilder.java new file mode 100644 index 000000000000..54f2d0cd51e2 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/AssistantGroundedContentOrBuilder.java @@ -0,0 +1,152 @@ +/* + * 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/cloud/discoveryengine/v1beta/assist_answer.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.discoveryengine.v1beta; + +@com.google.protobuf.Generated +public interface AssistantGroundedContentOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.AssistantGroundedContent) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
            +   * Metadata for grounding based on text sources.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata text_grounding_metadata = 3; + * + * + * @return Whether the textGroundingMetadata field is set. + */ + boolean hasTextGroundingMetadata(); + + /** + * + * + *
            +   * Metadata for grounding based on text sources.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata text_grounding_metadata = 3; + * + * + * @return The textGroundingMetadata. + */ + com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata + getTextGroundingMetadata(); + + /** + * + * + *
            +   * Metadata for grounding based on text sources.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadata text_grounding_metadata = 3; + * + */ + com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent.TextGroundingMetadataOrBuilder + getTextGroundingMetadataOrBuilder(); + + /** + * + * + *
            +   * The content.
            +   * 
            + * + * .google.cloud.discoveryengine.v1beta.AssistantContent content = 1; + * + * @return Whether the content field is set. + */ + boolean hasContent(); + + /** + * + * + *
            +   * The content.
            +   * 
            + * + * .google.cloud.discoveryengine.v1beta.AssistantContent content = 1; + * + * @return The content. + */ + com.google.cloud.discoveryengine.v1beta.AssistantContent getContent(); + + /** + * + * + *
            +   * The content.
            +   * 
            + * + * .google.cloud.discoveryengine.v1beta.AssistantContent content = 1; + */ + com.google.cloud.discoveryengine.v1beta.AssistantContentOrBuilder getContentOrBuilder(); + + /** + * + * + *
            +   * Source attribution of the generated content. See also
            +   * https://cloud.google.com/vertex-ai/generative-ai/docs/learn/overview#citation_check
            +   * 
            + * + * .google.cloud.discoveryengine.v1beta.CitationMetadata citation_metadata = 5; + * + * @return Whether the citationMetadata field is set. + */ + boolean hasCitationMetadata(); + + /** + * + * + *
            +   * Source attribution of the generated content. See also
            +   * https://cloud.google.com/vertex-ai/generative-ai/docs/learn/overview#citation_check
            +   * 
            + * + * .google.cloud.discoveryengine.v1beta.CitationMetadata citation_metadata = 5; + * + * @return The citationMetadata. + */ + com.google.cloud.discoveryengine.v1beta.CitationMetadata getCitationMetadata(); + + /** + * + * + *
            +   * Source attribution of the generated content. See also
            +   * https://cloud.google.com/vertex-ai/generative-ai/docs/learn/overview#citation_check
            +   * 
            + * + * .google.cloud.discoveryengine.v1beta.CitationMetadata citation_metadata = 5; + */ + com.google.cloud.discoveryengine.v1beta.CitationMetadataOrBuilder getCitationMetadataOrBuilder(); + + com.google.cloud.discoveryengine.v1beta.AssistantGroundedContent.MetadataCase getMetadataCase(); +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/AssistantName.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/AssistantName.java new file mode 100644 index 000000000000..b44addd41341 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/AssistantName.java @@ -0,0 +1,298 @@ +/* + * 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.discoveryengine.v1beta; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class AssistantName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_COLLECTION_ENGINE_ASSISTANT = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/assistants/{assistant}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + private final String collection; + private final String engine; + private final String assistant; + + @Deprecated + protected AssistantName() { + project = null; + location = null; + collection = null; + engine = null; + assistant = null; + } + + private AssistantName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + collection = Preconditions.checkNotNull(builder.getCollection()); + engine = Preconditions.checkNotNull(builder.getEngine()); + assistant = Preconditions.checkNotNull(builder.getAssistant()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getCollection() { + return collection; + } + + public String getEngine() { + return engine; + } + + public String getAssistant() { + return assistant; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static AssistantName of( + String project, String location, String collection, String engine, String assistant) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setCollection(collection) + .setEngine(engine) + .setAssistant(assistant) + .build(); + } + + public static String format( + String project, String location, String collection, String engine, String assistant) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setCollection(collection) + .setEngine(engine) + .setAssistant(assistant) + .build() + .toString(); + } + + public static AssistantName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_COLLECTION_ENGINE_ASSISTANT.validatedMatch( + formattedString, "AssistantName.parse: formattedString not in valid format"); + return of( + matchMap.get("project"), + matchMap.get("location"), + matchMap.get("collection"), + matchMap.get("engine"), + matchMap.get("assistant")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (AssistantName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_COLLECTION_ENGINE_ASSISTANT.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (project != null) { + fieldMapBuilder.put("project", project); + } + if (location != null) { + fieldMapBuilder.put("location", location); + } + if (collection != null) { + fieldMapBuilder.put("collection", collection); + } + if (engine != null) { + fieldMapBuilder.put("engine", engine); + } + if (assistant != null) { + fieldMapBuilder.put("assistant", assistant); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_COLLECTION_ENGINE_ASSISTANT.instantiate( + "project", + project, + "location", + location, + "collection", + collection, + "engine", + engine, + "assistant", + assistant); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null && getClass() == o.getClass()) { + AssistantName that = ((AssistantName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.collection, that.collection) + && Objects.equals(this.engine, that.engine) + && Objects.equals(this.assistant, that.assistant); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(location); + h *= 1000003; + h ^= Objects.hashCode(collection); + h *= 1000003; + h ^= Objects.hashCode(engine); + h *= 1000003; + h ^= Objects.hashCode(assistant); + return h; + } + + /** + * Builder for + * projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/assistants/{assistant}. + */ + public static class Builder { + private String project; + private String location; + private String collection; + private String engine; + private String assistant; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getCollection() { + return collection; + } + + public String getEngine() { + return engine; + } + + public String getAssistant() { + return assistant; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setCollection(String collection) { + this.collection = collection; + return this; + } + + public Builder setEngine(String engine) { + this.engine = engine; + return this; + } + + public Builder setAssistant(String assistant) { + this.assistant = assistant; + return this; + } + + private Builder(AssistantName assistantName) { + this.project = assistantName.project; + this.location = assistantName.location; + this.collection = assistantName.collection; + this.engine = assistantName.engine; + this.assistant = assistantName.assistant; + } + + public AssistantName build() { + return new AssistantName(this); + } + } +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/AssistantOrBuilder.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/AssistantOrBuilder.java new file mode 100644 index 000000000000..075156a13347 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/AssistantOrBuilder.java @@ -0,0 +1,468 @@ +/* + * 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/cloud/discoveryengine/v1beta/assistant.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.discoveryengine.v1beta; + +@com.google.protobuf.Generated +public interface AssistantOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.Assistant) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
            +   * Immutable. Resource name of the assistant.
            +   * Format:
            +   * `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/assistants/{assistant}`
            +   *
            +   * It must be a UTF-8 encoded string with a length limit of 1024 characters.
            +   * 
            + * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
            +   * Immutable. Resource name of the assistant.
            +   * Format:
            +   * `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/assistants/{assistant}`
            +   *
            +   * It must be a UTF-8 encoded string with a length limit of 1024 characters.
            +   * 
            + * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
            +   * Required. The assistant display name.
            +   *
            +   * It must be a UTF-8 encoded string with a length limit of 128 characters.
            +   * 
            + * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The displayName. + */ + java.lang.String getDisplayName(); + + /** + * + * + *
            +   * Required. The assistant display name.
            +   *
            +   * It must be a UTF-8 encoded string with a length limit of 128 characters.
            +   * 
            + * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString getDisplayNameBytes(); + + /** + * + * + *
            +   * Optional. Description for additional information. Expected to be shown on
            +   * the configuration UI, not to the users of the assistant.
            +   * 
            + * + * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The description. + */ + java.lang.String getDescription(); + + /** + * + * + *
            +   * Optional. Description for additional information. Expected to be shown on
            +   * the configuration UI, not to the users of the assistant.
            +   * 
            + * + * string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for description. + */ + com.google.protobuf.ByteString getDescriptionBytes(); + + /** + * + * + *
            +   * Optional. Configuration for the generation of the assistant response.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Assistant.GenerationConfig generation_config = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the generationConfig field is set. + */ + boolean hasGenerationConfig(); + + /** + * + * + *
            +   * Optional. Configuration for the generation of the assistant response.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Assistant.GenerationConfig generation_config = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The generationConfig. + */ + com.google.cloud.discoveryengine.v1beta.Assistant.GenerationConfig getGenerationConfig(); + + /** + * + * + *
            +   * Optional. Configuration for the generation of the assistant response.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Assistant.GenerationConfig generation_config = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.discoveryengine.v1beta.Assistant.GenerationConfigOrBuilder + getGenerationConfigOrBuilder(); + + /** + * + * + *
            +   * Optional. The type of web grounding to use.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Assistant.WebGroundingType web_grounding_type = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for webGroundingType. + */ + int getWebGroundingTypeValue(); + + /** + * + * + *
            +   * Optional. The type of web grounding to use.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Assistant.WebGroundingType web_grounding_type = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The webGroundingType. + */ + com.google.cloud.discoveryengine.v1beta.Assistant.WebGroundingType getWebGroundingType(); + + /** + * + * + *
            +   * Optional. This field controls the default web grounding toggle for end
            +   * users if `web_grounding_type` is set to `WEB_GROUNDING_TYPE_GOOGLE_SEARCH`
            +   * or `WEB_GROUNDING_TYPE_ENTERPRISE_WEB_SEARCH`. By default, this field is
            +   * set to false. If `web_grounding_type` is `WEB_GROUNDING_TYPE_GOOGLE_SEARCH`
            +   * or `WEB_GROUNDING_TYPE_ENTERPRISE_WEB_SEARCH`, end users will have web
            +   * grounding enabled by default on UI. If true, grounding toggle will be
            +   * disabled by default on UI. End users can still enable web grounding in
            +   * the UI if web grounding is enabled.
            +   * 
            + * + * bool default_web_grounding_toggle_off = 22 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The defaultWebGroundingToggleOff. + */ + boolean getDefaultWebGroundingToggleOff(); + + /** + * + * + *
            +   * Optional. Note: not implemented yet. Use
            +   * [enabled_actions][google.cloud.discoveryengine.v1beta.Assistant.enabled_actions]
            +   * instead. The enabled tools on this assistant. The keys are connector name,
            +   * for example
            +   * "projects/{projectId}/locations/{locationId}/collections/{collectionId}/dataconnector
            +   * The values consist of admin enabled tools towards the connector
            +   * instance. Admin can selectively enable multiple tools on any of the
            +   * connector instances that they created in the project. For example
            +   * {"jira1ConnectorName": [(toolId1, "createTicket"), (toolId2,
            +   * "transferTicket")],
            +   * "gmail1ConnectorName": [(toolId3, "sendEmail"),..] }
            +   * 
            + * + * + * map<string, .google.cloud.discoveryengine.v1beta.Assistant.ToolList> enabled_tools = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + int getEnabledToolsCount(); + + /** + * + * + *
            +   * Optional. Note: not implemented yet. Use
            +   * [enabled_actions][google.cloud.discoveryengine.v1beta.Assistant.enabled_actions]
            +   * instead. The enabled tools on this assistant. The keys are connector name,
            +   * for example
            +   * "projects/{projectId}/locations/{locationId}/collections/{collectionId}/dataconnector
            +   * The values consist of admin enabled tools towards the connector
            +   * instance. Admin can selectively enable multiple tools on any of the
            +   * connector instances that they created in the project. For example
            +   * {"jira1ConnectorName": [(toolId1, "createTicket"), (toolId2,
            +   * "transferTicket")],
            +   * "gmail1ConnectorName": [(toolId3, "sendEmail"),..] }
            +   * 
            + * + * + * map<string, .google.cloud.discoveryengine.v1beta.Assistant.ToolList> enabled_tools = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + boolean containsEnabledTools(java.lang.String key); + + /** Use {@link #getEnabledToolsMap()} instead. */ + @java.lang.Deprecated + java.util.Map + getEnabledTools(); + + /** + * + * + *
            +   * Optional. Note: not implemented yet. Use
            +   * [enabled_actions][google.cloud.discoveryengine.v1beta.Assistant.enabled_actions]
            +   * instead. The enabled tools on this assistant. The keys are connector name,
            +   * for example
            +   * "projects/{projectId}/locations/{locationId}/collections/{collectionId}/dataconnector
            +   * The values consist of admin enabled tools towards the connector
            +   * instance. Admin can selectively enable multiple tools on any of the
            +   * connector instances that they created in the project. For example
            +   * {"jira1ConnectorName": [(toolId1, "createTicket"), (toolId2,
            +   * "transferTicket")],
            +   * "gmail1ConnectorName": [(toolId3, "sendEmail"),..] }
            +   * 
            + * + * + * map<string, .google.cloud.discoveryengine.v1beta.Assistant.ToolList> enabled_tools = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.Map + getEnabledToolsMap(); + + /** + * + * + *
            +   * Optional. Note: not implemented yet. Use
            +   * [enabled_actions][google.cloud.discoveryengine.v1beta.Assistant.enabled_actions]
            +   * instead. The enabled tools on this assistant. The keys are connector name,
            +   * for example
            +   * "projects/{projectId}/locations/{locationId}/collections/{collectionId}/dataconnector
            +   * The values consist of admin enabled tools towards the connector
            +   * instance. Admin can selectively enable multiple tools on any of the
            +   * connector instances that they created in the project. For example
            +   * {"jira1ConnectorName": [(toolId1, "createTicket"), (toolId2,
            +   * "transferTicket")],
            +   * "gmail1ConnectorName": [(toolId3, "sendEmail"),..] }
            +   * 
            + * + * + * map<string, .google.cloud.discoveryengine.v1beta.Assistant.ToolList> enabled_tools = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + /* nullable */ + com.google.cloud.discoveryengine.v1beta.Assistant.ToolList getEnabledToolsOrDefault( + java.lang.String key, + /* nullable */ + com.google.cloud.discoveryengine.v1beta.Assistant.ToolList defaultValue); + + /** + * + * + *
            +   * Optional. Note: not implemented yet. Use
            +   * [enabled_actions][google.cloud.discoveryengine.v1beta.Assistant.enabled_actions]
            +   * instead. The enabled tools on this assistant. The keys are connector name,
            +   * for example
            +   * "projects/{projectId}/locations/{locationId}/collections/{collectionId}/dataconnector
            +   * The values consist of admin enabled tools towards the connector
            +   * instance. Admin can selectively enable multiple tools on any of the
            +   * connector instances that they created in the project. For example
            +   * {"jira1ConnectorName": [(toolId1, "createTicket"), (toolId2,
            +   * "transferTicket")],
            +   * "gmail1ConnectorName": [(toolId3, "sendEmail"),..] }
            +   * 
            + * + * + * map<string, .google.cloud.discoveryengine.v1beta.Assistant.ToolList> enabled_tools = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.discoveryengine.v1beta.Assistant.ToolList getEnabledToolsOrThrow( + java.lang.String key); + + /** + * + * + *
            +   * Optional. Customer policy for the assistant.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy customer_policy = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the customerPolicy field is set. + */ + boolean hasCustomerPolicy(); + + /** + * + * + *
            +   * Optional. Customer policy for the assistant.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy customer_policy = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The customerPolicy. + */ + com.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy getCustomerPolicy(); + + /** + * + * + *
            +   * Optional. Customer policy for the assistant.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicy customer_policy = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.discoveryengine.v1beta.Assistant.CustomerPolicyOrBuilder + getCustomerPolicyOrBuilder(); + + /** + * + * + *
            +   * Output only. Represents the time when this Assistant was created.
            +   * 
            + * + * .google.protobuf.Timestamp create_time = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + + /** + * + * + *
            +   * Output only. Represents the time when this Assistant was created.
            +   * 
            + * + * .google.protobuf.Timestamp create_time = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + + /** + * + * + *
            +   * Output only. Represents the time when this Assistant was created.
            +   * 
            + * + * .google.protobuf.Timestamp create_time = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
            +   * Output only. Represents the time when this Assistant was most recently
            +   * updated.
            +   * 
            + * + * .google.protobuf.Timestamp update_time = 25 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + + /** + * + * + *
            +   * Output only. Represents the time when this Assistant was most recently
            +   * updated.
            +   * 
            + * + * .google.protobuf.Timestamp update_time = 25 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + + /** + * + * + *
            +   * Output only. Represents the time when this Assistant was most recently
            +   * updated.
            +   * 
            + * + * .google.protobuf.Timestamp update_time = 25 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/AssistantProto.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/AssistantProto.java new file mode 100644 index 000000000000..6cf6d5cc4e3e --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/AssistantProto.java @@ -0,0 +1,268 @@ +/* + * 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/cloud/discoveryengine/v1beta/assistant.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.discoveryengine.v1beta; + +@com.google.protobuf.Generated +public final class AssistantProto extends com.google.protobuf.GeneratedFile { + private AssistantProto() {} + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "AssistantProto"); + } + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1beta_Assistant_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1beta_Assistant_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1beta_Assistant_GenerationConfig_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1beta_Assistant_GenerationConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1beta_Assistant_GenerationConfig_SystemInstruction_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1beta_Assistant_GenerationConfig_SystemInstruction_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1beta_Assistant_ToolInfo_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1beta_Assistant_ToolInfo_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1beta_Assistant_ToolList_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1beta_Assistant_ToolList_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1beta_Assistant_CustomerPolicy_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1beta_Assistant_CustomerPolicy_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1beta_Assistant_CustomerPolicy_BannedPhrase_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1beta_Assistant_CustomerPolicy_BannedPhrase_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1beta_Assistant_CustomerPolicy_ModelArmorConfig_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1beta_Assistant_CustomerPolicy_ModelArmorConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1beta_Assistant_EnabledToolsEntry_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1beta_Assistant_EnabledToolsEntry_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n3google/cloud/discoveryengine/v1beta/as" + + "sistant.proto\022#google.cloud.discoveryeng" + + "ine.v1beta\032\037google/api/field_behavior.pr" + + "oto\032\031google/api/resource.proto\032\037google/p" + + "rotobuf/timestamp.proto\"\347\022\n\tAssistant\022\021\n" + + "\004name\030\001 \001(\tB\003\340A\005\022\031\n\014display_name\030\002 \001(\tB\003" + + "\340A\002\022\030\n\013description\030\003 \001(\tB\003\340A\001\022_\n\021generat" + + "ion_config\030\023 \001(\0132?.google.cloud.discover" + + "yengine.v1beta.Assistant.GenerationConfi" + + "gB\003\340A\001\022`\n\022web_grounding_type\030\004 \001(\0162?.goo" + + "gle.cloud.discoveryengine.v1beta.Assista" + + "nt.WebGroundingTypeB\003\340A\001\022-\n default_web_" + + "grounding_toggle_off\030\026 \001(\010B\003\340A\001\022\\\n\renabl" + + "ed_tools\030\022 \003(\0132@.google.cloud.discoverye" + + "ngine.v1beta.Assistant.EnabledToolsEntry" + + "B\003\340A\001\022[\n\017customer_policy\030\014 \001(\0132=.google." + + "cloud.discoveryengine.v1beta.Assistant.C" + + "ustomerPolicyB\003\340A\001\0224\n\013create_time\030\030 \001(\0132" + + "\032.google.protobuf.TimestampB\003\340A\003\0224\n\013upda" + + "te_time\030\031 \001(\0132\032.google.protobuf.Timestam" + + "pB\003\340A\003\032\233\002\n\020GenerationConfig\022\035\n\020default_m" + + "odel_id\030\001 \001(\tB\003\340A\001\022\036\n\021allowed_model_ids\030" + + "\002 \003(\tB\003\340A\001\022m\n\022system_instruction\030\003 \001(\0132Q" + + ".google.cloud.discoveryengine.v1beta.Ass" + + "istant.GenerationConfig.SystemInstructio" + + "n\022\030\n\020default_language\030\004 \001(\t\032?\n\021SystemIns" + + "truction\022*\n\035additional_system_instructio" + + "n\030\002 \001(\tB\003\340A\001\0328\n\010ToolInfo\022\021\n\ttool_name\030\001 " + + "\001(\t\022\031\n\021tool_display_name\030\002 \001(\t\032V\n\010ToolLi" + + "st\022J\n\ttool_info\030\001 \003(\01327.google.cloud.dis" + + "coveryengine.v1beta.Assistant.ToolInfo\032\221" + + "\007\n\016CustomerPolicy\022g\n\016banned_phrases\030\001 \003(" + + "\0132J.google.cloud.discoveryengine.v1beta." + + "Assistant.CustomerPolicy.BannedPhraseB\003\340" + + "A\001\022o\n\022model_armor_config\030\002 \001(\0132N.google." + + "cloud.discoveryengine.v1beta.Assistant.C" + + "ustomerPolicy.ModelArmorConfigB\003\340A\001\032\272\002\n\014" + + "BannedPhrase\022\023\n\006phrase\030\001 \001(\tB\003\340A\002\022y\n\nmat" + + "ch_type\030\002 \001(\0162`.google.cloud.discoveryen" + + "gine.v1beta.Assistant.CustomerPolicy.Ban" + + "nedPhrase.BannedPhraseMatchTypeB\003\340A\001\022\036\n\021" + + "ignore_diacritics\030\003 \001(\010B\003\340A\001\"z\n\025BannedPh" + + "raseMatchType\022(\n$BANNED_PHRASE_MATCH_TYP" + + "E_UNSPECIFIED\020\000\022\027\n\023SIMPLE_STRING_MATCH\020\001" + + "\022\036\n\032WORD_BOUNDARY_STRING_MATCH\020\002\032\347\002\n\020Mod" + + "elArmorConfig\022H\n\024user_prompt_template\030\001 " + + "\001(\tB*\340A\001\372A$\n\"modelarmor.googleapis.com/T" + + "emplate\022E\n\021response_template\030\002 \001(\tB*\340A\001\372" + + "A$\n\"modelarmor.googleapis.com/Template\022u" + + "\n\014failure_mode\030\003 \001(\0162Z.google.cloud.disc" + + "overyengine.v1beta.Assistant.CustomerPol" + + "icy.ModelArmorConfig.FailureModeB\003\340A\001\"K\n" + + "\013FailureMode\022\034\n\030FAILURE_MODE_UNSPECIFIED" + + "\020\000\022\r\n\tFAIL_OPEN\020\001\022\017\n\013FAIL_CLOSED\020\002\032l\n\021En" + + "abledToolsEntry\022\013\n\003key\030\001 \001(\t\022F\n\005value\030\002 " + + "\001(\01327.google.cloud.discoveryengine.v1bet" + + "a.Assistant.ToolList:\0028\001\"\253\001\n\020WebGroundin" + + "gType\022\"\n\036WEB_GROUNDING_TYPE_UNSPECIFIED\020" + + "\000\022\037\n\033WEB_GROUNDING_TYPE_DISABLED\020\001\022$\n WE" + + "B_GROUNDING_TYPE_GOOGLE_SEARCH\020\002\022,\n(WEB_" + + "GROUNDING_TYPE_ENTERPRISE_WEB_SEARCH\020\003:\230" + + "\001\352A\224\001\n(discoveryengine.googleapis.com/As" + + "sistant\022hprojects/{project}/locations/{l" + + "ocation}/collections/{collection}/engine" + + "s/{engine}/assistants/{assistant}B\225\002\n\'co" + + "m.google.cloud.discoveryengine.v1betaB\016A" + + "ssistantProtoP\001ZQcloud.google.com/go/dis" + + "coveryengine/apiv1beta/discoveryenginepb" + + ";discoveryenginepb\242\002\017DISCOVERYENGINE\252\002#G" + + "oogle.Cloud.DiscoveryEngine.V1Beta\312\002#Goo" + + "gle\\Cloud\\DiscoveryEngine\\V1beta\352\002&Googl" + + "e::Cloud::DiscoveryEngine::V1betab\006proto" + + "3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.ResourceProto.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), + }); + internal_static_google_cloud_discoveryengine_v1beta_Assistant_descriptor = + getDescriptor().getMessageType(0); + internal_static_google_cloud_discoveryengine_v1beta_Assistant_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1beta_Assistant_descriptor, + new java.lang.String[] { + "Name", + "DisplayName", + "Description", + "GenerationConfig", + "WebGroundingType", + "DefaultWebGroundingToggleOff", + "EnabledTools", + "CustomerPolicy", + "CreateTime", + "UpdateTime", + }); + internal_static_google_cloud_discoveryengine_v1beta_Assistant_GenerationConfig_descriptor = + internal_static_google_cloud_discoveryengine_v1beta_Assistant_descriptor.getNestedType(0); + internal_static_google_cloud_discoveryengine_v1beta_Assistant_GenerationConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1beta_Assistant_GenerationConfig_descriptor, + new java.lang.String[] { + "DefaultModelId", "AllowedModelIds", "SystemInstruction", "DefaultLanguage", + }); + internal_static_google_cloud_discoveryengine_v1beta_Assistant_GenerationConfig_SystemInstruction_descriptor = + internal_static_google_cloud_discoveryengine_v1beta_Assistant_GenerationConfig_descriptor + .getNestedType(0); + internal_static_google_cloud_discoveryengine_v1beta_Assistant_GenerationConfig_SystemInstruction_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1beta_Assistant_GenerationConfig_SystemInstruction_descriptor, + new java.lang.String[] { + "AdditionalSystemInstruction", + }); + internal_static_google_cloud_discoveryengine_v1beta_Assistant_ToolInfo_descriptor = + internal_static_google_cloud_discoveryengine_v1beta_Assistant_descriptor.getNestedType(1); + internal_static_google_cloud_discoveryengine_v1beta_Assistant_ToolInfo_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1beta_Assistant_ToolInfo_descriptor, + new java.lang.String[] { + "ToolName", "ToolDisplayName", + }); + internal_static_google_cloud_discoveryengine_v1beta_Assistant_ToolList_descriptor = + internal_static_google_cloud_discoveryengine_v1beta_Assistant_descriptor.getNestedType(2); + internal_static_google_cloud_discoveryengine_v1beta_Assistant_ToolList_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1beta_Assistant_ToolList_descriptor, + new java.lang.String[] { + "ToolInfo", + }); + internal_static_google_cloud_discoveryengine_v1beta_Assistant_CustomerPolicy_descriptor = + internal_static_google_cloud_discoveryengine_v1beta_Assistant_descriptor.getNestedType(3); + internal_static_google_cloud_discoveryengine_v1beta_Assistant_CustomerPolicy_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1beta_Assistant_CustomerPolicy_descriptor, + new java.lang.String[] { + "BannedPhrases", "ModelArmorConfig", + }); + internal_static_google_cloud_discoveryengine_v1beta_Assistant_CustomerPolicy_BannedPhrase_descriptor = + internal_static_google_cloud_discoveryengine_v1beta_Assistant_CustomerPolicy_descriptor + .getNestedType(0); + internal_static_google_cloud_discoveryengine_v1beta_Assistant_CustomerPolicy_BannedPhrase_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1beta_Assistant_CustomerPolicy_BannedPhrase_descriptor, + new java.lang.String[] { + "Phrase", "MatchType", "IgnoreDiacritics", + }); + internal_static_google_cloud_discoveryengine_v1beta_Assistant_CustomerPolicy_ModelArmorConfig_descriptor = + internal_static_google_cloud_discoveryengine_v1beta_Assistant_CustomerPolicy_descriptor + .getNestedType(1); + internal_static_google_cloud_discoveryengine_v1beta_Assistant_CustomerPolicy_ModelArmorConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1beta_Assistant_CustomerPolicy_ModelArmorConfig_descriptor, + new java.lang.String[] { + "UserPromptTemplate", "ResponseTemplate", "FailureMode", + }); + internal_static_google_cloud_discoveryengine_v1beta_Assistant_EnabledToolsEntry_descriptor = + internal_static_google_cloud_discoveryengine_v1beta_Assistant_descriptor.getNestedType(4); + internal_static_google_cloud_discoveryengine_v1beta_Assistant_EnabledToolsEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1beta_Assistant_EnabledToolsEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + descriptor.resolveAllFeaturesImmutable(); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.ResourceProto.resource); + registry.add(com.google.api.ResourceProto.resourceReference); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/AssistantServiceProto.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/AssistantServiceProto.java new file mode 100644 index 000000000000..733f75423d4f --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/AssistantServiceProto.java @@ -0,0 +1,426 @@ +/* + * 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/cloud/discoveryengine/v1beta/assistant_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.discoveryengine.v1beta; + +@com.google.protobuf.Generated +public final class AssistantServiceProto extends com.google.protobuf.GeneratedFile { + private AssistantServiceProto() {} + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "AssistantServiceProto"); + } + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1beta_AssistUserMetadata_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1beta_AssistUserMetadata_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1beta_StreamAssistRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1beta_StreamAssistRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1beta_StreamAssistRequest_ToolsSpec_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1beta_StreamAssistRequest_ToolsSpec_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1beta_StreamAssistRequest_ToolsSpec_VertexAiSearchSpec_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1beta_StreamAssistRequest_ToolsSpec_VertexAiSearchSpec_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1beta_StreamAssistRequest_ToolsSpec_WebGroundingSpec_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1beta_StreamAssistRequest_ToolsSpec_WebGroundingSpec_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1beta_StreamAssistRequest_ToolsSpec_ImageGenerationSpec_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1beta_StreamAssistRequest_ToolsSpec_ImageGenerationSpec_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1beta_StreamAssistRequest_ToolsSpec_VideoGenerationSpec_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1beta_StreamAssistRequest_ToolsSpec_VideoGenerationSpec_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1beta_StreamAssistRequest_GenerationSpec_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1beta_StreamAssistRequest_GenerationSpec_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1beta_StreamAssistResponse_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1beta_StreamAssistResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1beta_StreamAssistResponse_SessionInfo_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1beta_StreamAssistResponse_SessionInfo_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1beta_StreamAssistResponse_InvokedSkill_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1beta_StreamAssistResponse_InvokedSkill_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1beta_CreateAssistantRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1beta_CreateAssistantRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1beta_DeleteAssistantRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1beta_DeleteAssistantRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1beta_GetAssistantRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1beta_GetAssistantRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1beta_ListAssistantsRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1beta_ListAssistantsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1beta_ListAssistantsResponse_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1beta_ListAssistantsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1beta_UpdateAssistantRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1beta_UpdateAssistantRequest_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n;google/cloud/discoveryengine/v1beta/as" + + "sistant_service.proto\022#google.cloud.disc" + + "overyengine.v1beta\032\034google/api/annotatio" + + "ns.proto\032\027google/api/client.proto\032\037googl" + + "e/api/field_behavior.proto\032\031google/api/r" + + "esource.proto\0327google/cloud/discoveryeng" + + "ine/v1beta/assist_answer.proto\0323google/c" + + "loud/discoveryengine/v1beta/assistant.pr" + + "oto\0328google/cloud/discoveryengine/v1beta" + + "/search_service.proto\0321google/cloud/disc" + + "overyengine/v1beta/session.proto\032\033google" + + "/protobuf/empty.proto\032 google/protobuf/f" + + "ield_mask.proto\"R\n\022AssistUserMetadata\022\026\n" + + "\ttime_zone\030\001 \001(\tB\003\340A\001\022$\n\027preferred_langu" + + "age_code\030\002 \001(\tB\003\340A\001\"\336\t\n\023StreamAssistRequ" + + "est\022>\n\004name\030\001 \001(\tB0\340A\002\372A*\n(discoveryengi" + + "ne.googleapis.com/Assistant\022>\n\005query\030\002 \001" + + "(\0132*.google.cloud.discoveryengine.v1beta" + + ".QueryB\003\340A\001\022?\n\007session\030\003 \001(\tB.\340A\001\372A(\n&di" + + "scoveryengine.googleapis.com/Session\022S\n\r" + + "user_metadata\030\006 \001(\01327.google.cloud.disco" + + "veryengine.v1beta.AssistUserMetadataB\003\340A" + + "\001\022[\n\ntools_spec\030\022 \001(\0132B.google.cloud.dis" + + "coveryengine.v1beta.StreamAssistRequest." + + "ToolsSpecB\003\340A\001\022e\n\017generation_spec\030\023 \001(\0132" + + "G.google.cloud.discoveryengine.v1beta.St" + + "reamAssistRequest.GenerationSpecB\003\340A\001\032\303\005" + + "\n\tToolsSpec\022y\n\025vertex_ai_search_spec\030\001 \001" + + "(\0132U.google.cloud.discoveryengine.v1beta" + + ".StreamAssistRequest.ToolsSpec.VertexAiS" + + "earchSpecB\003\340A\001\022t\n\022web_grounding_spec\030\002 \001" + + "(\0132S.google.cloud.discoveryengine.v1beta" + + ".StreamAssistRequest.ToolsSpec.WebGround" + + "ingSpecB\003\340A\001\022z\n\025image_generation_spec\030\003 " + + "\001(\0132V.google.cloud.discoveryengine.v1bet" + + "a.StreamAssistRequest.ToolsSpec.ImageGen" + + "erationSpecB\003\340A\001\022z\n\025video_generation_spe" + + "c\030\004 \001(\0132V.google.cloud.discoveryengine.v" + + "1beta.StreamAssistRequest.ToolsSpec.Vide" + + "oGenerationSpecB\003\340A\001\032\212\001\n\022VertexAiSearchS" + + "pec\022_\n\020data_store_specs\030\002 \003(\0132@.google.c" + + "loud.discoveryengine.v1beta.SearchReques" + + "t.DataStoreSpecB\003\340A\001\022\023\n\006filter\030\004 \001(\tB\003\340A" + + "\001\032\022\n\020WebGroundingSpec\032\025\n\023ImageGeneration" + + "Spec\032\025\n\023VideoGenerationSpec\032\'\n\016Generatio" + + "nSpec\022\025\n\010model_id\030\001 \001(\tB\003\340A\001\"\307\003\n\024StreamA" + + "ssistResponse\022A\n\006answer\030\001 \001(\01321.google.c" + + "loud.discoveryengine.v1beta.AssistAnswer" + + "\022[\n\014session_info\030\002 \001(\0132E.google.cloud.di" + + "scoveryengine.v1beta.StreamAssistRespons" + + "e.SessionInfo\022\024\n\014assist_token\030\004 \001(\t\022\030\n\020i" + + "nvocation_tools\030\010 \003(\t\022^\n\016invoked_skills\030" + + "\n \003(\0132F.google.cloud.discoveryengine.v1b" + + "eta.StreamAssistResponse.InvokedSkill\032K\n" + + "\013SessionInfo\022<\n\007session\030\001 \001(\tB+\372A(\n&disc" + + "overyengine.googleapis.com/Session\0322\n\014In" + + "vokedSkill\022\014\n\004name\030\001 \001(\t\022\024\n\014display_name" + + "\030\002 \001(\t\"\272\001\n\026CreateAssistantRequest\022=\n\006par" + + "ent\030\001 \001(\tB-\340A\002\372A\'\n%discoveryengine.googl" + + "eapis.com/Engine\022F\n\tassistant\030\002 \001(\0132..go" + + "ogle.cloud.discoveryengine.v1beta.Assist" + + "antB\003\340A\002\022\031\n\014assistant_id\030\003 \001(\tB\003\340A\002\"X\n\026D" + + "eleteAssistantRequest\022>\n\004name\030\001 \001(\tB0\340A\002" + + "\372A*\n(discoveryengine.googleapis.com/Assi" + + "stant\"U\n\023GetAssistantRequest\022>\n\004name\030\001 \001" + + "(\tB0\340A\002\372A*\n(discoveryengine.googleapis.c" + + "om/Assistant\"}\n\025ListAssistantsRequest\022=\n" + + "\006parent\030\001 \001(\tB-\340A\002\372A\'\n%discoveryengine.g" + + "oogleapis.com/Engine\022\021\n\tpage_size\030\002 \001(\005\022" + + "\022\n\npage_token\030\003 \001(\t\"u\n\026ListAssistantsRes" + + "ponse\022B\n\nassistants\030\001 \003(\0132..google.cloud" + + ".discoveryengine.v1beta.Assistant\022\027\n\017nex" + + "t_page_token\030\002 \001(\t\"\221\001\n\026UpdateAssistantRe" + + "quest\022F\n\tassistant\030\001 \001(\0132..google.cloud." + + "discoveryengine.v1beta.AssistantB\003\340A\002\022/\n" + + "\013update_mask\030\002 \001(\0132\032.google.protobuf.Fie" + + "ldMask2\366\014\n\020AssistantService\022\351\001\n\014StreamAs" + + "sist\0228.google.cloud.discoveryengine.v1be" + + "ta.StreamAssistRequest\0329.google.cloud.di" + + "scoveryengine.v1beta.StreamAssistRespons" + + "e\"b\202\323\344\223\002\\\"W/v1beta/{name=projects/*/loca" + + "tions/*/collections/*/engines/*/assistan" + + "ts/*}:streamAssist:\001*0\001\022\335\001\n\017CreateAssist" + + "ant\022;.google.cloud.discoveryengine.v1bet" + + "a.CreateAssistantRequest\032..google.cloud." + + "discoveryengine.v1beta.Assistant\"]\202\323\344\223\002W" + + "\"J/v1beta/{parent=projects/*/locations/*" + + "/collections/*/engines/*}/assistants:\tas" + + "sistant\022\301\001\n\017DeleteAssistant\022;.google.clo" + + "ud.discoveryengine.v1beta.DeleteAssistan" + + "tRequest\032\026.google.protobuf.Empty\"Y\332A\004nam" + + "e\202\323\344\223\002L*J/v1beta/{name=projects/*/locati" + + "ons/*/collections/*/engines/*/assistants" + + "/*}\022\377\001\n\017UpdateAssistant\022;.google.cloud.d" + + "iscoveryengine.v1beta.UpdateAssistantReq" + + "uest\032..google.cloud.discoveryengine.v1be" + + "ta.Assistant\"\177\332A\025assistant,update_mask\202\323" + + "\344\223\002a2T/v1beta/{assistant.name=projects/*" + + "/locations/*/collections/*/engines/*/ass" + + "istants/*}:\tassistant\022\323\001\n\014GetAssistant\0228" + + ".google.cloud.discoveryengine.v1beta.Get" + + "AssistantRequest\032..google.cloud.discover" + + "yengine.v1beta.Assistant\"Y\332A\004name\202\323\344\223\002L\022" + + "J/v1beta/{name=projects/*/locations/*/co" + + "llections/*/engines/*/assistants/*}\022\346\001\n\016" + + "ListAssistants\022:.google.cloud.discoverye" + + "ngine.v1beta.ListAssistantsRequest\032;.goo" + + "gle.cloud.discoveryengine.v1beta.ListAss" + + "istantsResponse\"[\332A\006parent\202\323\344\223\002L\022J/v1bet" + + "a/{parent=projects/*/locations/*/collect" + + "ions/*/engines/*}/assistants\032\220\002\312A\036discov" + + "eryengine.googleapis.com\322A\353\001https://www." + + "googleapis.com/auth/cloud-platform,https" + + "://www.googleapis.com/auth/discoveryengi" + + "ne.assist.readwrite,https://www.googleap" + + "is.com/auth/discoveryengine.readwrite,ht" + + "tps://www.googleapis.com/auth/discoverye" + + "ngine.serving.readwriteB\234\002\n\'com.google.c" + + "loud.discoveryengine.v1betaB\025AssistantSe" + + "rviceProtoP\001ZQcloud.google.com/go/discov" + + "eryengine/apiv1beta/discoveryenginepb;di" + + "scoveryenginepb\242\002\017DISCOVERYENGINE\252\002#Goog" + + "le.Cloud.DiscoveryEngine.V1Beta\312\002#Google" + + "\\Cloud\\DiscoveryEngine\\V1beta\352\002&Google::" + + "Cloud::DiscoveryEngine::V1betab\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.AnnotationsProto.getDescriptor(), + com.google.api.ClientProto.getDescriptor(), + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.ResourceProto.getDescriptor(), + com.google.cloud.discoveryengine.v1beta.AssistAnswerProto.getDescriptor(), + com.google.cloud.discoveryengine.v1beta.AssistantProto.getDescriptor(), + com.google.cloud.discoveryengine.v1beta.SearchServiceProto.getDescriptor(), + com.google.cloud.discoveryengine.v1beta.SessionProto.getDescriptor(), + com.google.protobuf.EmptyProto.getDescriptor(), + com.google.protobuf.FieldMaskProto.getDescriptor(), + }); + internal_static_google_cloud_discoveryengine_v1beta_AssistUserMetadata_descriptor = + getDescriptor().getMessageType(0); + internal_static_google_cloud_discoveryengine_v1beta_AssistUserMetadata_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1beta_AssistUserMetadata_descriptor, + new java.lang.String[] { + "TimeZone", "PreferredLanguageCode", + }); + internal_static_google_cloud_discoveryengine_v1beta_StreamAssistRequest_descriptor = + getDescriptor().getMessageType(1); + internal_static_google_cloud_discoveryengine_v1beta_StreamAssistRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1beta_StreamAssistRequest_descriptor, + new java.lang.String[] { + "Name", "Query", "Session", "UserMetadata", "ToolsSpec", "GenerationSpec", + }); + internal_static_google_cloud_discoveryengine_v1beta_StreamAssistRequest_ToolsSpec_descriptor = + internal_static_google_cloud_discoveryengine_v1beta_StreamAssistRequest_descriptor + .getNestedType(0); + internal_static_google_cloud_discoveryengine_v1beta_StreamAssistRequest_ToolsSpec_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1beta_StreamAssistRequest_ToolsSpec_descriptor, + new java.lang.String[] { + "VertexAiSearchSpec", + "WebGroundingSpec", + "ImageGenerationSpec", + "VideoGenerationSpec", + }); + internal_static_google_cloud_discoveryengine_v1beta_StreamAssistRequest_ToolsSpec_VertexAiSearchSpec_descriptor = + internal_static_google_cloud_discoveryengine_v1beta_StreamAssistRequest_ToolsSpec_descriptor + .getNestedType(0); + internal_static_google_cloud_discoveryengine_v1beta_StreamAssistRequest_ToolsSpec_VertexAiSearchSpec_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1beta_StreamAssistRequest_ToolsSpec_VertexAiSearchSpec_descriptor, + new java.lang.String[] { + "DataStoreSpecs", "Filter", + }); + internal_static_google_cloud_discoveryengine_v1beta_StreamAssistRequest_ToolsSpec_WebGroundingSpec_descriptor = + internal_static_google_cloud_discoveryengine_v1beta_StreamAssistRequest_ToolsSpec_descriptor + .getNestedType(1); + internal_static_google_cloud_discoveryengine_v1beta_StreamAssistRequest_ToolsSpec_WebGroundingSpec_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1beta_StreamAssistRequest_ToolsSpec_WebGroundingSpec_descriptor, + new java.lang.String[] {}); + internal_static_google_cloud_discoveryengine_v1beta_StreamAssistRequest_ToolsSpec_ImageGenerationSpec_descriptor = + internal_static_google_cloud_discoveryengine_v1beta_StreamAssistRequest_ToolsSpec_descriptor + .getNestedType(2); + internal_static_google_cloud_discoveryengine_v1beta_StreamAssistRequest_ToolsSpec_ImageGenerationSpec_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1beta_StreamAssistRequest_ToolsSpec_ImageGenerationSpec_descriptor, + new java.lang.String[] {}); + internal_static_google_cloud_discoveryengine_v1beta_StreamAssistRequest_ToolsSpec_VideoGenerationSpec_descriptor = + internal_static_google_cloud_discoveryengine_v1beta_StreamAssistRequest_ToolsSpec_descriptor + .getNestedType(3); + internal_static_google_cloud_discoveryengine_v1beta_StreamAssistRequest_ToolsSpec_VideoGenerationSpec_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1beta_StreamAssistRequest_ToolsSpec_VideoGenerationSpec_descriptor, + new java.lang.String[] {}); + internal_static_google_cloud_discoveryengine_v1beta_StreamAssistRequest_GenerationSpec_descriptor = + internal_static_google_cloud_discoveryengine_v1beta_StreamAssistRequest_descriptor + .getNestedType(1); + internal_static_google_cloud_discoveryengine_v1beta_StreamAssistRequest_GenerationSpec_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1beta_StreamAssistRequest_GenerationSpec_descriptor, + new java.lang.String[] { + "ModelId", + }); + internal_static_google_cloud_discoveryengine_v1beta_StreamAssistResponse_descriptor = + getDescriptor().getMessageType(2); + internal_static_google_cloud_discoveryengine_v1beta_StreamAssistResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1beta_StreamAssistResponse_descriptor, + new java.lang.String[] { + "Answer", "SessionInfo", "AssistToken", "InvocationTools", "InvokedSkills", + }); + internal_static_google_cloud_discoveryengine_v1beta_StreamAssistResponse_SessionInfo_descriptor = + internal_static_google_cloud_discoveryengine_v1beta_StreamAssistResponse_descriptor + .getNestedType(0); + internal_static_google_cloud_discoveryengine_v1beta_StreamAssistResponse_SessionInfo_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1beta_StreamAssistResponse_SessionInfo_descriptor, + new java.lang.String[] { + "Session", + }); + internal_static_google_cloud_discoveryengine_v1beta_StreamAssistResponse_InvokedSkill_descriptor = + internal_static_google_cloud_discoveryengine_v1beta_StreamAssistResponse_descriptor + .getNestedType(1); + internal_static_google_cloud_discoveryengine_v1beta_StreamAssistResponse_InvokedSkill_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1beta_StreamAssistResponse_InvokedSkill_descriptor, + new java.lang.String[] { + "Name", "DisplayName", + }); + internal_static_google_cloud_discoveryengine_v1beta_CreateAssistantRequest_descriptor = + getDescriptor().getMessageType(3); + internal_static_google_cloud_discoveryengine_v1beta_CreateAssistantRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1beta_CreateAssistantRequest_descriptor, + new java.lang.String[] { + "Parent", "Assistant", "AssistantId", + }); + internal_static_google_cloud_discoveryengine_v1beta_DeleteAssistantRequest_descriptor = + getDescriptor().getMessageType(4); + internal_static_google_cloud_discoveryengine_v1beta_DeleteAssistantRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1beta_DeleteAssistantRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_discoveryengine_v1beta_GetAssistantRequest_descriptor = + getDescriptor().getMessageType(5); + internal_static_google_cloud_discoveryengine_v1beta_GetAssistantRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1beta_GetAssistantRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_discoveryengine_v1beta_ListAssistantsRequest_descriptor = + getDescriptor().getMessageType(6); + internal_static_google_cloud_discoveryengine_v1beta_ListAssistantsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1beta_ListAssistantsRequest_descriptor, + new java.lang.String[] { + "Parent", "PageSize", "PageToken", + }); + internal_static_google_cloud_discoveryengine_v1beta_ListAssistantsResponse_descriptor = + getDescriptor().getMessageType(7); + internal_static_google_cloud_discoveryengine_v1beta_ListAssistantsResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1beta_ListAssistantsResponse_descriptor, + new java.lang.String[] { + "Assistants", "NextPageToken", + }); + internal_static_google_cloud_discoveryengine_v1beta_UpdateAssistantRequest_descriptor = + getDescriptor().getMessageType(8); + internal_static_google_cloud_discoveryengine_v1beta_UpdateAssistantRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1beta_UpdateAssistantRequest_descriptor, + new java.lang.String[] { + "Assistant", "UpdateMask", + }); + descriptor.resolveAllFeaturesImmutable(); + com.google.api.AnnotationsProto.getDescriptor(); + com.google.api.ClientProto.getDescriptor(); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + com.google.cloud.discoveryengine.v1beta.AssistAnswerProto.getDescriptor(); + com.google.cloud.discoveryengine.v1beta.AssistantProto.getDescriptor(); + com.google.cloud.discoveryengine.v1beta.SearchServiceProto.getDescriptor(); + com.google.cloud.discoveryengine.v1beta.SessionProto.getDescriptor(); + com.google.protobuf.EmptyProto.getDescriptor(); + com.google.protobuf.FieldMaskProto.getDescriptor(); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.ClientProto.defaultHost); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.AnnotationsProto.http); + registry.add(com.google.api.ClientProto.methodSignature); + registry.add(com.google.api.ClientProto.oauthScopes); + registry.add(com.google.api.ResourceProto.resourceReference); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/BatchUpdateUserLicensesMetadata.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/BatchUpdateUserLicensesMetadata.java new file mode 100644 index 000000000000..8f8c130bcb84 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/BatchUpdateUserLicensesMetadata.java @@ -0,0 +1,1199 @@ +/* + * 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/cloud/discoveryengine/v1beta/user_license_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.discoveryengine.v1beta; + +/** + * + * + *
            + * Metadata related to the progress of the
            + * [UserLicenseService.BatchUpdateUserLicenses][google.cloud.discoveryengine.v1beta.UserLicenseService.BatchUpdateUserLicenses]
            + * operation. This will be returned by the google.longrunning.Operation.metadata
            + * field.
            + * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesMetadata} + */ +@com.google.protobuf.Generated +public final class BatchUpdateUserLicensesMetadata extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesMetadata) + BatchUpdateUserLicensesMetadataOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "BatchUpdateUserLicensesMetadata"); + } + + // Use BatchUpdateUserLicensesMetadata.newBuilder() to construct. + private BatchUpdateUserLicensesMetadata(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private BatchUpdateUserLicensesMetadata() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.UserLicenseServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_BatchUpdateUserLicensesMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.UserLicenseServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_BatchUpdateUserLicensesMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesMetadata.class, + com.google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesMetadata.Builder.class); + } + + private int bitField0_; + public static final int CREATE_TIME_FIELD_NUMBER = 1; + private com.google.protobuf.Timestamp createTime_; + + /** + * + * + *
            +   * Operation create time.
            +   * 
            + * + * .google.protobuf.Timestamp create_time = 1; + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
            +   * Operation create time.
            +   * 
            + * + * .google.protobuf.Timestamp create_time = 1; + * + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + /** + * + * + *
            +   * Operation create time.
            +   * 
            + * + * .google.protobuf.Timestamp create_time = 1; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp updateTime_; + + /** + * + * + *
            +   * Operation last update time. If the operation is done, this is also the
            +   * finish time.
            +   * 
            + * + * .google.protobuf.Timestamp update_time = 2; + * + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
            +   * Operation last update time. If the operation is done, this is also the
            +   * finish time.
            +   * 
            + * + * .google.protobuf.Timestamp update_time = 2; + * + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + /** + * + * + *
            +   * Operation last update time. If the operation is done, this is also the
            +   * finish time.
            +   * 
            + * + * .google.protobuf.Timestamp update_time = 2; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + public static final int SUCCESS_COUNT_FIELD_NUMBER = 3; + private long successCount_ = 0L; + + /** + * + * + *
            +   * Count of user licenses successfully updated.
            +   * 
            + * + * int64 success_count = 3; + * + * @return The successCount. + */ + @java.lang.Override + public long getSuccessCount() { + return successCount_; + } + + public static final int FAILURE_COUNT_FIELD_NUMBER = 4; + private long failureCount_ = 0L; + + /** + * + * + *
            +   * Count of user licenses that failed to be updated.
            +   * 
            + * + * int64 failure_count = 4; + * + * @return The failureCount. + */ + @java.lang.Override + public long getFailureCount() { + return failureCount_; + } + + 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, getCreateTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(2, getUpdateTime()); + } + if (successCount_ != 0L) { + output.writeInt64(3, successCount_); + } + if (failureCount_ != 0L) { + output.writeInt64(4, failureCount_); + } + 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, getCreateTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getUpdateTime()); + } + if (successCount_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(3, successCount_); + } + if (failureCount_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(4, failureCount_); + } + 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.discoveryengine.v1beta.BatchUpdateUserLicensesMetadata)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesMetadata other = + (com.google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesMetadata) obj; + + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime().equals(other.getUpdateTime())) return false; + } + if (getSuccessCount() != other.getSuccessCount()) return false; + if (getFailureCount() != other.getFailureCount()) 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 (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + hash = (37 * hash) + SUCCESS_COUNT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getSuccessCount()); + hash = (37 * hash) + FAILURE_COUNT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getFailureCount()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesMetadata parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesMetadata 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.discoveryengine.v1beta.BatchUpdateUserLicensesMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesMetadata 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.discoveryengine.v1beta.BatchUpdateUserLicensesMetadata parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesMetadata parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesMetadata parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesMetadata 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.discoveryengine.v1beta.BatchUpdateUserLicensesMetadata + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesMetadata + 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.discoveryengine.v1beta.BatchUpdateUserLicensesMetadata parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesMetadata 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.discoveryengine.v1beta.BatchUpdateUserLicensesMetadata 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; + } + + /** + * + * + *
            +   * Metadata related to the progress of the
            +   * [UserLicenseService.BatchUpdateUserLicenses][google.cloud.discoveryengine.v1beta.UserLicenseService.BatchUpdateUserLicenses]
            +   * operation. This will be returned by the google.longrunning.Operation.metadata
            +   * field.
            +   * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesMetadata) + com.google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.UserLicenseServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_BatchUpdateUserLicensesMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.UserLicenseServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_BatchUpdateUserLicensesMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesMetadata.class, + com.google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesMetadata.Builder + .class); + } + + // Construct using + // com.google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesMetadata.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetCreateTimeFieldBuilder(); + internalGetUpdateTimeFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + successCount_ = 0L; + failureCount_ = 0L; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1beta.UserLicenseServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_BatchUpdateUserLicensesMetadata_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesMetadata + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesMetadata + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesMetadata build() { + com.google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesMetadata result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesMetadata buildPartial() { + com.google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesMetadata result = + new com.google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesMetadata(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesMetadata result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.updateTime_ = updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.successCount_ = successCount_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.failureCount_ = failureCount_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesMetadata) { + return mergeFrom( + (com.google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesMetadata) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesMetadata other) { + if (other + == com.google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesMetadata + .getDefaultInstance()) return this; + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + if (other.getSuccessCount() != 0L) { + setSuccessCount(other.getSuccessCount()); + } + if (other.getFailureCount() != 0L) { + setFailureCount(other.getFailureCount()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage( + internalGetCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage( + internalGetUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: + { + successCount_ = input.readInt64(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 32: + { + failureCount_ = input.readInt64(); + bitField0_ |= 0x00000008; + break; + } // case 32 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + + /** + * + * + *
            +     * Operation create time.
            +     * 
            + * + * .google.protobuf.Timestamp create_time = 1; + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
            +     * Operation create time.
            +     * 
            + * + * .google.protobuf.Timestamp create_time = 1; + * + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
            +     * Operation create time.
            +     * 
            + * + * .google.protobuf.Timestamp create_time = 1; + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + } else { + createTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Operation create time.
            +     * 
            + * + * .google.protobuf.Timestamp create_time = 1; + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Operation create time.
            +     * 
            + * + * .google.protobuf.Timestamp create_time = 1; + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && createTime_ != null + && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); + } + if (createTime_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + + /** + * + * + *
            +     * Operation create time.
            +     * 
            + * + * .google.protobuf.Timestamp create_time = 1; + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000001); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
            +     * Operation create time.
            +     * 
            + * + * .google.protobuf.Timestamp create_time = 1; + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return internalGetCreateTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
            +     * Operation create time.
            +     * 
            + * + * .google.protobuf.Timestamp create_time = 1; + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } + + /** + * + * + *
            +     * Operation create time.
            +     * 
            + * + * .google.protobuf.Timestamp create_time = 1; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + internalGetCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp updateTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + updateTimeBuilder_; + + /** + * + * + *
            +     * Operation last update time. If the operation is done, this is also the
            +     * finish time.
            +     * 
            + * + * .google.protobuf.Timestamp update_time = 2; + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
            +     * Operation last update time. If the operation is done, this is also the
            +     * finish time.
            +     * 
            + * + * .google.protobuf.Timestamp update_time = 2; + * + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
            +     * Operation last update time. If the operation is done, this is also the
            +     * finish time.
            +     * 
            + * + * .google.protobuf.Timestamp update_time = 2; + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + } else { + updateTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Operation last update time. If the operation is done, this is also the
            +     * finish time.
            +     * 
            + * + * .google.protobuf.Timestamp update_time = 2; + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Operation last update time. If the operation is done, this is also the
            +     * finish time.
            +     * 
            + * + * .google.protobuf.Timestamp update_time = 2; + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && updateTime_ != null + && updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getUpdateTimeBuilder().mergeFrom(value); + } else { + updateTime_ = value; + } + } else { + updateTimeBuilder_.mergeFrom(value); + } + if (updateTime_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** + * + * + *
            +     * Operation last update time. If the operation is done, this is also the
            +     * finish time.
            +     * 
            + * + * .google.protobuf.Timestamp update_time = 2; + */ + public Builder clearUpdateTime() { + bitField0_ = (bitField0_ & ~0x00000002); + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
            +     * Operation last update time. If the operation is done, this is also the
            +     * finish time.
            +     * 
            + * + * .google.protobuf.Timestamp update_time = 2; + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return internalGetUpdateTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
            +     * Operation last update time. If the operation is done, this is also the
            +     * finish time.
            +     * 
            + * + * .google.protobuf.Timestamp update_time = 2; + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } + } + + /** + * + * + *
            +     * Operation last update time. If the operation is done, this is also the
            +     * finish time.
            +     * 
            + * + * .google.protobuf.Timestamp update_time = 2; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + internalGetUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getUpdateTime(), getParentForChildren(), isClean()); + updateTime_ = null; + } + return updateTimeBuilder_; + } + + private long successCount_; + + /** + * + * + *
            +     * Count of user licenses successfully updated.
            +     * 
            + * + * int64 success_count = 3; + * + * @return The successCount. + */ + @java.lang.Override + public long getSuccessCount() { + return successCount_; + } + + /** + * + * + *
            +     * Count of user licenses successfully updated.
            +     * 
            + * + * int64 success_count = 3; + * + * @param value The successCount to set. + * @return This builder for chaining. + */ + public Builder setSuccessCount(long value) { + + successCount_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Count of user licenses successfully updated.
            +     * 
            + * + * int64 success_count = 3; + * + * @return This builder for chaining. + */ + public Builder clearSuccessCount() { + bitField0_ = (bitField0_ & ~0x00000004); + successCount_ = 0L; + onChanged(); + return this; + } + + private long failureCount_; + + /** + * + * + *
            +     * Count of user licenses that failed to be updated.
            +     * 
            + * + * int64 failure_count = 4; + * + * @return The failureCount. + */ + @java.lang.Override + public long getFailureCount() { + return failureCount_; + } + + /** + * + * + *
            +     * Count of user licenses that failed to be updated.
            +     * 
            + * + * int64 failure_count = 4; + * + * @param value The failureCount to set. + * @return This builder for chaining. + */ + public Builder setFailureCount(long value) { + + failureCount_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Count of user licenses that failed to be updated.
            +     * 
            + * + * int64 failure_count = 4; + * + * @return This builder for chaining. + */ + public Builder clearFailureCount() { + bitField0_ = (bitField0_ & ~0x00000008); + failureCount_ = 0L; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesMetadata) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesMetadata) + private static final com.google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesMetadata + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesMetadata(); + } + + public static com.google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesMetadata + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BatchUpdateUserLicensesMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesMetadata + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/BatchUpdateUserLicensesMetadataOrBuilder.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/BatchUpdateUserLicensesMetadataOrBuilder.java new file mode 100644 index 000000000000..f98680f7bfde --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/BatchUpdateUserLicensesMetadataOrBuilder.java @@ -0,0 +1,131 @@ +/* + * 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/cloud/discoveryengine/v1beta/user_license_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.discoveryengine.v1beta; + +@com.google.protobuf.Generated +public interface BatchUpdateUserLicensesMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
            +   * Operation create time.
            +   * 
            + * + * .google.protobuf.Timestamp create_time = 1; + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + + /** + * + * + *
            +   * Operation create time.
            +   * 
            + * + * .google.protobuf.Timestamp create_time = 1; + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + + /** + * + * + *
            +   * Operation create time.
            +   * 
            + * + * .google.protobuf.Timestamp create_time = 1; + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
            +   * Operation last update time. If the operation is done, this is also the
            +   * finish time.
            +   * 
            + * + * .google.protobuf.Timestamp update_time = 2; + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + + /** + * + * + *
            +   * Operation last update time. If the operation is done, this is also the
            +   * finish time.
            +   * 
            + * + * .google.protobuf.Timestamp update_time = 2; + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + + /** + * + * + *
            +   * Operation last update time. If the operation is done, this is also the
            +   * finish time.
            +   * 
            + * + * .google.protobuf.Timestamp update_time = 2; + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + /** + * + * + *
            +   * Count of user licenses successfully updated.
            +   * 
            + * + * int64 success_count = 3; + * + * @return The successCount. + */ + long getSuccessCount(); + + /** + * + * + *
            +   * Count of user licenses that failed to be updated.
            +   * 
            + * + * int64 failure_count = 4; + * + * @return The failureCount. + */ + long getFailureCount(); +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/BatchUpdateUserLicensesRequest.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/BatchUpdateUserLicensesRequest.java new file mode 100644 index 000000000000..83e87e764824 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/BatchUpdateUserLicensesRequest.java @@ -0,0 +1,2704 @@ +/* + * 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/cloud/discoveryengine/v1beta/user_license_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.discoveryengine.v1beta; + +/** + * + * + *
            + * Request message for
            + * [UserLicenseService.BatchUpdateUserLicenses][google.cloud.discoveryengine.v1beta.UserLicenseService.BatchUpdateUserLicenses]
            + * method.
            + * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesRequest} + */ +@com.google.protobuf.Generated +public final class BatchUpdateUserLicensesRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesRequest) + BatchUpdateUserLicensesRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "BatchUpdateUserLicensesRequest"); + } + + // Use BatchUpdateUserLicensesRequest.newBuilder() to construct. + private BatchUpdateUserLicensesRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private BatchUpdateUserLicensesRequest() { + parent_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.UserLicenseServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_BatchUpdateUserLicensesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.UserLicenseServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_BatchUpdateUserLicensesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesRequest.class, + com.google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesRequest.Builder.class); + } + + public interface InlineSourceOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesRequest.InlineSource) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
            +     * Required. A list of user licenses to update. Each user license
            +     * must have a valid
            +     * [UserLicense.user_principal][google.cloud.discoveryengine.v1beta.UserLicense.user_principal].
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.UserLicense user_licenses = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + java.util.List getUserLicensesList(); + + /** + * + * + *
            +     * Required. A list of user licenses to update. Each user license
            +     * must have a valid
            +     * [UserLicense.user_principal][google.cloud.discoveryengine.v1beta.UserLicense.user_principal].
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.UserLicense user_licenses = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.discoveryengine.v1beta.UserLicense getUserLicenses(int index); + + /** + * + * + *
            +     * Required. A list of user licenses to update. Each user license
            +     * must have a valid
            +     * [UserLicense.user_principal][google.cloud.discoveryengine.v1beta.UserLicense.user_principal].
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.UserLicense user_licenses = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + int getUserLicensesCount(); + + /** + * + * + *
            +     * Required. A list of user licenses to update. Each user license
            +     * must have a valid
            +     * [UserLicense.user_principal][google.cloud.discoveryengine.v1beta.UserLicense.user_principal].
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.UserLicense user_licenses = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + java.util.List + getUserLicensesOrBuilderList(); + + /** + * + * + *
            +     * Required. A list of user licenses to update. Each user license
            +     * must have a valid
            +     * [UserLicense.user_principal][google.cloud.discoveryengine.v1beta.UserLicense.user_principal].
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.UserLicense user_licenses = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.discoveryengine.v1beta.UserLicenseOrBuilder getUserLicensesOrBuilder( + int index); + + /** + * + * + *
            +     * Optional. The list of fields to update.
            +     * 
            + * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the updateMask field is set. + */ + boolean hasUpdateMask(); + + /** + * + * + *
            +     * Optional. The list of fields to update.
            +     * 
            + * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The updateMask. + */ + com.google.protobuf.FieldMask getUpdateMask(); + + /** + * + * + *
            +     * Optional. The list of fields to update.
            +     * 
            + * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); + } + + /** + * + * + *
            +   * The inline source for the input config for BatchUpdateUserLicenses
            +   * method.
            +   * 
            + * + * Protobuf type {@code + * google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesRequest.InlineSource} + */ + public static final class InlineSource extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesRequest.InlineSource) + InlineSourceOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "InlineSource"); + } + + // Use InlineSource.newBuilder() to construct. + private InlineSource(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private InlineSource() { + userLicenses_ = java.util.Collections.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.UserLicenseServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_BatchUpdateUserLicensesRequest_InlineSource_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.UserLicenseServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_BatchUpdateUserLicensesRequest_InlineSource_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesRequest.InlineSource + .class, + com.google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesRequest.InlineSource + .Builder.class); + } + + private int bitField0_; + public static final int USER_LICENSES_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List userLicenses_; + + /** + * + * + *
            +     * Required. A list of user licenses to update. Each user license
            +     * must have a valid
            +     * [UserLicense.user_principal][google.cloud.discoveryengine.v1beta.UserLicense.user_principal].
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.UserLicense user_licenses = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public java.util.List + getUserLicensesList() { + return userLicenses_; + } + + /** + * + * + *
            +     * Required. A list of user licenses to update. Each user license
            +     * must have a valid
            +     * [UserLicense.user_principal][google.cloud.discoveryengine.v1beta.UserLicense.user_principal].
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.UserLicense user_licenses = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public java.util.List + getUserLicensesOrBuilderList() { + return userLicenses_; + } + + /** + * + * + *
            +     * Required. A list of user licenses to update. Each user license
            +     * must have a valid
            +     * [UserLicense.user_principal][google.cloud.discoveryengine.v1beta.UserLicense.user_principal].
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.UserLicense user_licenses = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public int getUserLicensesCount() { + return userLicenses_.size(); + } + + /** + * + * + *
            +     * Required. A list of user licenses to update. Each user license
            +     * must have a valid
            +     * [UserLicense.user_principal][google.cloud.discoveryengine.v1beta.UserLicense.user_principal].
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.UserLicense user_licenses = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.UserLicense getUserLicenses(int index) { + return userLicenses_.get(index); + } + + /** + * + * + *
            +     * Required. A list of user licenses to update. Each user license
            +     * must have a valid
            +     * [UserLicense.user_principal][google.cloud.discoveryengine.v1beta.UserLicense.user_principal].
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.UserLicense user_licenses = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.UserLicenseOrBuilder getUserLicensesOrBuilder( + int index) { + return userLicenses_.get(index); + } + + public static final int UPDATE_MASK_FIELD_NUMBER = 2; + private com.google.protobuf.FieldMask updateMask_; + + /** + * + * + *
            +     * Optional. The list of fields to update.
            +     * 
            + * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the updateMask field is set. + */ + @java.lang.Override + public boolean hasUpdateMask() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
            +     * Optional. The list of fields to update.
            +     * 
            + * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The updateMask. + */ + @java.lang.Override + public com.google.protobuf.FieldMask getUpdateMask() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + + /** + * + * + *
            +     * Optional. The list of fields to update.
            +     * 
            + * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + + 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 < userLicenses_.size(); i++) { + output.writeMessage(1, userLicenses_.get(i)); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getUpdateMask()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < userLicenses_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, userLicenses_.get(i)); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getUpdateMask()); + } + 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.discoveryengine.v1beta.BatchUpdateUserLicensesRequest.InlineSource)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesRequest.InlineSource other = + (com.google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesRequest.InlineSource) obj; + + if (!getUserLicensesList().equals(other.getUserLicensesList())) return false; + if (hasUpdateMask() != other.hasUpdateMask()) return false; + if (hasUpdateMask()) { + if (!getUpdateMask().equals(other.getUpdateMask())) 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 (getUserLicensesCount() > 0) { + hash = (37 * hash) + USER_LICENSES_FIELD_NUMBER; + hash = (53 * hash) + getUserLicensesList().hashCode(); + } + if (hasUpdateMask()) { + hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; + hash = (53 * hash) + getUpdateMask().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesRequest + .InlineSource + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesRequest + .InlineSource + 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.discoveryengine.v1beta.BatchUpdateUserLicensesRequest + .InlineSource + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesRequest + .InlineSource + 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.discoveryengine.v1beta.BatchUpdateUserLicensesRequest + .InlineSource + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesRequest + .InlineSource + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesRequest + .InlineSource + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesRequest + .InlineSource + 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.discoveryengine.v1beta.BatchUpdateUserLicensesRequest + .InlineSource + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesRequest + .InlineSource + 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.discoveryengine.v1beta.BatchUpdateUserLicensesRequest + .InlineSource + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesRequest + .InlineSource + 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.discoveryengine.v1beta.BatchUpdateUserLicensesRequest.InlineSource + 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; + } + + /** + * + * + *
            +     * The inline source for the input config for BatchUpdateUserLicenses
            +     * method.
            +     * 
            + * + * Protobuf type {@code + * google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesRequest.InlineSource} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesRequest.InlineSource) + com.google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesRequest + .InlineSourceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.UserLicenseServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_BatchUpdateUserLicensesRequest_InlineSource_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.UserLicenseServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_BatchUpdateUserLicensesRequest_InlineSource_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesRequest.InlineSource + .class, + com.google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesRequest.InlineSource + .Builder.class); + } + + // Construct using + // com.google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesRequest.InlineSource.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetUserLicensesFieldBuilder(); + internalGetUpdateMaskFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (userLicensesBuilder_ == null) { + userLicenses_ = java.util.Collections.emptyList(); + } else { + userLicenses_ = null; + userLicensesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1beta.UserLicenseServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_BatchUpdateUserLicensesRequest_InlineSource_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesRequest.InlineSource + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesRequest.InlineSource + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesRequest.InlineSource + build() { + com.google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesRequest.InlineSource result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesRequest.InlineSource + buildPartial() { + com.google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesRequest.InlineSource result = + new com.google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesRequest.InlineSource( + this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesRequest.InlineSource + result) { + if (userLicensesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + userLicenses_ = java.util.Collections.unmodifiableList(userLicenses_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.userLicenses_ = userLicenses_; + } else { + result.userLicenses_ = userLicensesBuilder_.build(); + } + } + + private void buildPartial0( + com.google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesRequest.InlineSource + result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.updateMask_ = + updateMaskBuilder_ == null ? updateMask_ : updateMaskBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesRequest.InlineSource) { + return mergeFrom( + (com.google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesRequest.InlineSource) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesRequest.InlineSource + other) { + if (other + == com.google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesRequest.InlineSource + .getDefaultInstance()) return this; + if (userLicensesBuilder_ == null) { + if (!other.userLicenses_.isEmpty()) { + if (userLicenses_.isEmpty()) { + userLicenses_ = other.userLicenses_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureUserLicensesIsMutable(); + userLicenses_.addAll(other.userLicenses_); + } + onChanged(); + } + } else { + if (!other.userLicenses_.isEmpty()) { + if (userLicensesBuilder_.isEmpty()) { + userLicensesBuilder_.dispose(); + userLicensesBuilder_ = null; + userLicenses_ = other.userLicenses_; + bitField0_ = (bitField0_ & ~0x00000001); + userLicensesBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetUserLicensesFieldBuilder() + : null; + } else { + userLicensesBuilder_.addAllMessages(other.userLicenses_); + } + } + } + if (other.hasUpdateMask()) { + mergeUpdateMask(other.getUpdateMask()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.discoveryengine.v1beta.UserLicense m = + input.readMessage( + com.google.cloud.discoveryengine.v1beta.UserLicense.parser(), + extensionRegistry); + if (userLicensesBuilder_ == null) { + ensureUserLicensesIsMutable(); + userLicenses_.add(m); + } else { + userLicensesBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + input.readMessage( + internalGetUpdateMaskFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List userLicenses_ = + java.util.Collections.emptyList(); + + private void ensureUserLicensesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + userLicenses_ = + new java.util.ArrayList( + userLicenses_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.discoveryengine.v1beta.UserLicense, + com.google.cloud.discoveryengine.v1beta.UserLicense.Builder, + com.google.cloud.discoveryengine.v1beta.UserLicenseOrBuilder> + userLicensesBuilder_; + + /** + * + * + *
            +       * Required. A list of user licenses to update. Each user license
            +       * must have a valid
            +       * [UserLicense.user_principal][google.cloud.discoveryengine.v1beta.UserLicense.user_principal].
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.UserLicense user_licenses = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List + getUserLicensesList() { + if (userLicensesBuilder_ == null) { + return java.util.Collections.unmodifiableList(userLicenses_); + } else { + return userLicensesBuilder_.getMessageList(); + } + } + + /** + * + * + *
            +       * Required. A list of user licenses to update. Each user license
            +       * must have a valid
            +       * [UserLicense.user_principal][google.cloud.discoveryengine.v1beta.UserLicense.user_principal].
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.UserLicense user_licenses = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public int getUserLicensesCount() { + if (userLicensesBuilder_ == null) { + return userLicenses_.size(); + } else { + return userLicensesBuilder_.getCount(); + } + } + + /** + * + * + *
            +       * Required. A list of user licenses to update. Each user license
            +       * must have a valid
            +       * [UserLicense.user_principal][google.cloud.discoveryengine.v1beta.UserLicense.user_principal].
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.UserLicense user_licenses = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.discoveryengine.v1beta.UserLicense getUserLicenses(int index) { + if (userLicensesBuilder_ == null) { + return userLicenses_.get(index); + } else { + return userLicensesBuilder_.getMessage(index); + } + } + + /** + * + * + *
            +       * Required. A list of user licenses to update. Each user license
            +       * must have a valid
            +       * [UserLicense.user_principal][google.cloud.discoveryengine.v1beta.UserLicense.user_principal].
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.UserLicense user_licenses = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setUserLicenses( + int index, com.google.cloud.discoveryengine.v1beta.UserLicense value) { + if (userLicensesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureUserLicensesIsMutable(); + userLicenses_.set(index, value); + onChanged(); + } else { + userLicensesBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
            +       * Required. A list of user licenses to update. Each user license
            +       * must have a valid
            +       * [UserLicense.user_principal][google.cloud.discoveryengine.v1beta.UserLicense.user_principal].
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.UserLicense user_licenses = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setUserLicenses( + int index, com.google.cloud.discoveryengine.v1beta.UserLicense.Builder builderForValue) { + if (userLicensesBuilder_ == null) { + ensureUserLicensesIsMutable(); + userLicenses_.set(index, builderForValue.build()); + onChanged(); + } else { + userLicensesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
            +       * Required. A list of user licenses to update. Each user license
            +       * must have a valid
            +       * [UserLicense.user_principal][google.cloud.discoveryengine.v1beta.UserLicense.user_principal].
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.UserLicense user_licenses = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addUserLicenses(com.google.cloud.discoveryengine.v1beta.UserLicense value) { + if (userLicensesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureUserLicensesIsMutable(); + userLicenses_.add(value); + onChanged(); + } else { + userLicensesBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
            +       * Required. A list of user licenses to update. Each user license
            +       * must have a valid
            +       * [UserLicense.user_principal][google.cloud.discoveryengine.v1beta.UserLicense.user_principal].
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.UserLicense user_licenses = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addUserLicenses( + int index, com.google.cloud.discoveryengine.v1beta.UserLicense value) { + if (userLicensesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureUserLicensesIsMutable(); + userLicenses_.add(index, value); + onChanged(); + } else { + userLicensesBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
            +       * Required. A list of user licenses to update. Each user license
            +       * must have a valid
            +       * [UserLicense.user_principal][google.cloud.discoveryengine.v1beta.UserLicense.user_principal].
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.UserLicense user_licenses = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addUserLicenses( + com.google.cloud.discoveryengine.v1beta.UserLicense.Builder builderForValue) { + if (userLicensesBuilder_ == null) { + ensureUserLicensesIsMutable(); + userLicenses_.add(builderForValue.build()); + onChanged(); + } else { + userLicensesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
            +       * Required. A list of user licenses to update. Each user license
            +       * must have a valid
            +       * [UserLicense.user_principal][google.cloud.discoveryengine.v1beta.UserLicense.user_principal].
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.UserLicense user_licenses = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addUserLicenses( + int index, com.google.cloud.discoveryengine.v1beta.UserLicense.Builder builderForValue) { + if (userLicensesBuilder_ == null) { + ensureUserLicensesIsMutable(); + userLicenses_.add(index, builderForValue.build()); + onChanged(); + } else { + userLicensesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
            +       * Required. A list of user licenses to update. Each user license
            +       * must have a valid
            +       * [UserLicense.user_principal][google.cloud.discoveryengine.v1beta.UserLicense.user_principal].
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.UserLicense user_licenses = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addAllUserLicenses( + java.lang.Iterable + values) { + if (userLicensesBuilder_ == null) { + ensureUserLicensesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, userLicenses_); + onChanged(); + } else { + userLicensesBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
            +       * Required. A list of user licenses to update. Each user license
            +       * must have a valid
            +       * [UserLicense.user_principal][google.cloud.discoveryengine.v1beta.UserLicense.user_principal].
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.UserLicense user_licenses = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearUserLicenses() { + if (userLicensesBuilder_ == null) { + userLicenses_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + userLicensesBuilder_.clear(); + } + return this; + } + + /** + * + * + *
            +       * Required. A list of user licenses to update. Each user license
            +       * must have a valid
            +       * [UserLicense.user_principal][google.cloud.discoveryengine.v1beta.UserLicense.user_principal].
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.UserLicense user_licenses = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder removeUserLicenses(int index) { + if (userLicensesBuilder_ == null) { + ensureUserLicensesIsMutable(); + userLicenses_.remove(index); + onChanged(); + } else { + userLicensesBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
            +       * Required. A list of user licenses to update. Each user license
            +       * must have a valid
            +       * [UserLicense.user_principal][google.cloud.discoveryengine.v1beta.UserLicense.user_principal].
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.UserLicense user_licenses = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.discoveryengine.v1beta.UserLicense.Builder getUserLicensesBuilder( + int index) { + return internalGetUserLicensesFieldBuilder().getBuilder(index); + } + + /** + * + * + *
            +       * Required. A list of user licenses to update. Each user license
            +       * must have a valid
            +       * [UserLicense.user_principal][google.cloud.discoveryengine.v1beta.UserLicense.user_principal].
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.UserLicense user_licenses = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.discoveryengine.v1beta.UserLicenseOrBuilder getUserLicensesOrBuilder( + int index) { + if (userLicensesBuilder_ == null) { + return userLicenses_.get(index); + } else { + return userLicensesBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
            +       * Required. A list of user licenses to update. Each user license
            +       * must have a valid
            +       * [UserLicense.user_principal][google.cloud.discoveryengine.v1beta.UserLicense.user_principal].
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.UserLicense user_licenses = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List + getUserLicensesOrBuilderList() { + if (userLicensesBuilder_ != null) { + return userLicensesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(userLicenses_); + } + } + + /** + * + * + *
            +       * Required. A list of user licenses to update. Each user license
            +       * must have a valid
            +       * [UserLicense.user_principal][google.cloud.discoveryengine.v1beta.UserLicense.user_principal].
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.UserLicense user_licenses = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.discoveryengine.v1beta.UserLicense.Builder addUserLicensesBuilder() { + return internalGetUserLicensesFieldBuilder() + .addBuilder(com.google.cloud.discoveryengine.v1beta.UserLicense.getDefaultInstance()); + } + + /** + * + * + *
            +       * Required. A list of user licenses to update. Each user license
            +       * must have a valid
            +       * [UserLicense.user_principal][google.cloud.discoveryengine.v1beta.UserLicense.user_principal].
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.UserLicense user_licenses = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.discoveryengine.v1beta.UserLicense.Builder addUserLicensesBuilder( + int index) { + return internalGetUserLicensesFieldBuilder() + .addBuilder( + index, com.google.cloud.discoveryengine.v1beta.UserLicense.getDefaultInstance()); + } + + /** + * + * + *
            +       * Required. A list of user licenses to update. Each user license
            +       * must have a valid
            +       * [UserLicense.user_principal][google.cloud.discoveryengine.v1beta.UserLicense.user_principal].
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.UserLicense user_licenses = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List + getUserLicensesBuilderList() { + return internalGetUserLicensesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.discoveryengine.v1beta.UserLicense, + com.google.cloud.discoveryengine.v1beta.UserLicense.Builder, + com.google.cloud.discoveryengine.v1beta.UserLicenseOrBuilder> + internalGetUserLicensesFieldBuilder() { + if (userLicensesBuilder_ == null) { + userLicensesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.discoveryengine.v1beta.UserLicense, + com.google.cloud.discoveryengine.v1beta.UserLicense.Builder, + com.google.cloud.discoveryengine.v1beta.UserLicenseOrBuilder>( + userLicenses_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + userLicenses_ = null; + } + return userLicensesBuilder_; + } + + private com.google.protobuf.FieldMask updateMask_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + updateMaskBuilder_; + + /** + * + * + *
            +       * Optional. The list of fields to update.
            +       * 
            + * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the updateMask field is set. + */ + public boolean hasUpdateMask() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
            +       * Optional. The list of fields to update.
            +       * 
            + * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The updateMask. + */ + public com.google.protobuf.FieldMask getUpdateMask() { + if (updateMaskBuilder_ == null) { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } else { + return updateMaskBuilder_.getMessage(); + } + } + + /** + * + * + *
            +       * Optional. The list of fields to update.
            +       * 
            + * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateMask_ = value; + } else { + updateMaskBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
            +       * Optional. The list of fields to update.
            +       * 
            + * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForValue) { + if (updateMaskBuilder_ == null) { + updateMask_ = builderForValue.build(); + } else { + updateMaskBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
            +       * Optional. The list of fields to update.
            +       * 
            + * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && updateMask_ != null + && updateMask_ != com.google.protobuf.FieldMask.getDefaultInstance()) { + getUpdateMaskBuilder().mergeFrom(value); + } else { + updateMask_ = value; + } + } else { + updateMaskBuilder_.mergeFrom(value); + } + if (updateMask_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** + * + * + *
            +       * Optional. The list of fields to update.
            +       * 
            + * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearUpdateMask() { + bitField0_ = (bitField0_ & ~0x00000002); + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
            +       * Optional. The list of fields to update.
            +       * 
            + * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return internalGetUpdateMaskFieldBuilder().getBuilder(); + } + + /** + * + * + *
            +       * Optional. The list of fields to update.
            +       * 
            + * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + if (updateMaskBuilder_ != null) { + return updateMaskBuilder_.getMessageOrBuilder(); + } else { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } + } + + /** + * + * + *
            +       * Optional. The list of fields to update.
            +       * 
            + * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + internalGetUpdateMaskFieldBuilder() { + if (updateMaskBuilder_ == null) { + updateMaskBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder>( + getUpdateMask(), getParentForChildren(), isClean()); + updateMask_ = null; + } + return updateMaskBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesRequest.InlineSource) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesRequest.InlineSource) + private static final com.google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesRequest + .InlineSource + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesRequest.InlineSource(); + } + + public static com.google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesRequest + .InlineSource + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public InlineSource parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesRequest.InlineSource + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int sourceCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object source_; + + public enum SourceCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + INLINE_SOURCE(2), + SOURCE_NOT_SET(0); + private final int value; + + private SourceCase(int value) { + this.value = value; + } + + /** + * @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 SourceCase valueOf(int value) { + return forNumber(value); + } + + public static SourceCase forNumber(int value) { + switch (value) { + case 2: + return INLINE_SOURCE; + case 0: + return SOURCE_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public SourceCase getSourceCase() { + return SourceCase.forNumber(sourceCase_); + } + + public static final int INLINE_SOURCE_FIELD_NUMBER = 2; + + /** + * + * + *
            +   * The inline source for the input content for document embeddings.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesRequest.InlineSource inline_source = 2; + * + * + * @return Whether the inlineSource field is set. + */ + @java.lang.Override + public boolean hasInlineSource() { + return sourceCase_ == 2; + } + + /** + * + * + *
            +   * The inline source for the input content for document embeddings.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesRequest.InlineSource inline_source = 2; + * + * + * @return The inlineSource. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesRequest.InlineSource + getInlineSource() { + if (sourceCase_ == 2) { + return (com.google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesRequest.InlineSource) + source_; + } + return com.google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesRequest.InlineSource + .getDefaultInstance(); + } + + /** + * + * + *
            +   * The inline source for the input content for document embeddings.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesRequest.InlineSource inline_source = 2; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesRequest + .InlineSourceOrBuilder + getInlineSourceOrBuilder() { + if (sourceCase_ == 2) { + return (com.google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesRequest.InlineSource) + source_; + } + return com.google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesRequest.InlineSource + .getDefaultInstance(); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + + /** + * + * + *
            +   * Required. The parent
            +   * [UserStore][google.cloud.discoveryengine.v1beta.UserStore] resource name,
            +   * format:
            +   * `projects/{project}/locations/{location}/userStores/{user_store_id}`.
            +   * 
            + * + * + * 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 parent
            +   * [UserStore][google.cloud.discoveryengine.v1beta.UserStore] resource name,
            +   * format:
            +   * `projects/{project}/locations/{location}/userStores/{user_store_id}`.
            +   * 
            + * + * + * 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 DELETE_UNASSIGNED_USER_LICENSES_FIELD_NUMBER = 4; + private boolean deleteUnassignedUserLicenses_ = false; + + /** + * + * + *
            +   * Optional. If true, if user licenses removed associated license config, the
            +   * user license will be deleted. By default which is false, the user license
            +   * will be updated to unassigned state.
            +   * 
            + * + * bool delete_unassigned_user_licenses = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The deleteUnassignedUserLicenses. + */ + @java.lang.Override + public boolean getDeleteUnassignedUserLicenses() { + return deleteUnassignedUserLicenses_; + } + + 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 (sourceCase_ == 2) { + output.writeMessage( + 2, + (com.google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesRequest.InlineSource) + source_); + } + if (deleteUnassignedUserLicenses_ != false) { + output.writeBool(4, deleteUnassignedUserLicenses_); + } + 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 (sourceCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, + (com.google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesRequest.InlineSource) + source_); + } + if (deleteUnassignedUserLicenses_ != false) { + size += + com.google.protobuf.CodedOutputStream.computeBoolSize(4, deleteUnassignedUserLicenses_); + } + 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.discoveryengine.v1beta.BatchUpdateUserLicensesRequest)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesRequest other = + (com.google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (getDeleteUnassignedUserLicenses() != other.getDeleteUnassignedUserLicenses()) return false; + if (!getSourceCase().equals(other.getSourceCase())) return false; + switch (sourceCase_) { + case 2: + if (!getInlineSource().equals(other.getInlineSource())) return false; + break; + case 0: + default: + } + 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) + DELETE_UNASSIGNED_USER_LICENSES_FIELD_NUMBER; + hash = + (53 * hash) + com.google.protobuf.Internal.hashBoolean(getDeleteUnassignedUserLicenses()); + switch (sourceCase_) { + case 2: + hash = (37 * hash) + INLINE_SOURCE_FIELD_NUMBER; + hash = (53 * hash) + getInlineSource().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesRequest 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.discoveryengine.v1beta.BatchUpdateUserLicensesRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesRequest 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.discoveryengine.v1beta.BatchUpdateUserLicensesRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesRequest 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.discoveryengine.v1beta.BatchUpdateUserLicensesRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesRequest + 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.discoveryengine.v1beta.BatchUpdateUserLicensesRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesRequest 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.discoveryengine.v1beta.BatchUpdateUserLicensesRequest 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
            +   * [UserLicenseService.BatchUpdateUserLicenses][google.cloud.discoveryengine.v1beta.UserLicenseService.BatchUpdateUserLicenses]
            +   * method.
            +   * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesRequest) + com.google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.UserLicenseServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_BatchUpdateUserLicensesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.UserLicenseServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_BatchUpdateUserLicensesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesRequest.class, + com.google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesRequest.Builder.class); + } + + // Construct using + // com.google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (inlineSourceBuilder_ != null) { + inlineSourceBuilder_.clear(); + } + parent_ = ""; + deleteUnassignedUserLicenses_ = false; + sourceCase_ = 0; + source_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1beta.UserLicenseServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_BatchUpdateUserLicensesRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesRequest + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesRequest build() { + com.google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesRequest result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesRequest buildPartial() { + com.google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesRequest result = + new com.google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.deleteUnassignedUserLicenses_ = deleteUnassignedUserLicenses_; + } + } + + private void buildPartialOneofs( + com.google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesRequest result) { + result.sourceCase_ = sourceCase_; + result.source_ = this.source_; + if (sourceCase_ == 2 && inlineSourceBuilder_ != null) { + result.source_ = inlineSourceBuilder_.build(); + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesRequest) { + return mergeFrom( + (com.google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesRequest other) { + if (other + == com.google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesRequest + .getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.getDeleteUnassignedUserLicenses() != false) { + setDeleteUnassignedUserLicenses(other.getDeleteUnassignedUserLicenses()); + } + switch (other.getSourceCase()) { + case INLINE_SOURCE: + { + mergeInlineSource(other.getInlineSource()); + break; + } + case SOURCE_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 10 + case 18: + { + input.readMessage( + internalGetInlineSourceFieldBuilder().getBuilder(), extensionRegistry); + sourceCase_ = 2; + break; + } // case 18 + case 32: + { + deleteUnassignedUserLicenses_ = input.readBool(); + bitField0_ |= 0x00000004; + break; + } // case 32 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int sourceCase_ = 0; + private java.lang.Object source_; + + public SourceCase getSourceCase() { + return SourceCase.forNumber(sourceCase_); + } + + public Builder clearSource() { + sourceCase_ = 0; + source_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesRequest.InlineSource, + com.google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesRequest.InlineSource + .Builder, + com.google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesRequest + .InlineSourceOrBuilder> + inlineSourceBuilder_; + + /** + * + * + *
            +     * The inline source for the input content for document embeddings.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesRequest.InlineSource inline_source = 2; + * + * + * @return Whether the inlineSource field is set. + */ + @java.lang.Override + public boolean hasInlineSource() { + return sourceCase_ == 2; + } + + /** + * + * + *
            +     * The inline source for the input content for document embeddings.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesRequest.InlineSource inline_source = 2; + * + * + * @return The inlineSource. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesRequest.InlineSource + getInlineSource() { + if (inlineSourceBuilder_ == null) { + if (sourceCase_ == 2) { + return (com.google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesRequest + .InlineSource) + source_; + } + return com.google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesRequest.InlineSource + .getDefaultInstance(); + } else { + if (sourceCase_ == 2) { + return inlineSourceBuilder_.getMessage(); + } + return com.google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesRequest.InlineSource + .getDefaultInstance(); + } + } + + /** + * + * + *
            +     * The inline source for the input content for document embeddings.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesRequest.InlineSource inline_source = 2; + * + */ + public Builder setInlineSource( + com.google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesRequest.InlineSource value) { + if (inlineSourceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + source_ = value; + onChanged(); + } else { + inlineSourceBuilder_.setMessage(value); + } + sourceCase_ = 2; + return this; + } + + /** + * + * + *
            +     * The inline source for the input content for document embeddings.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesRequest.InlineSource inline_source = 2; + * + */ + public Builder setInlineSource( + com.google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesRequest.InlineSource.Builder + builderForValue) { + if (inlineSourceBuilder_ == null) { + source_ = builderForValue.build(); + onChanged(); + } else { + inlineSourceBuilder_.setMessage(builderForValue.build()); + } + sourceCase_ = 2; + return this; + } + + /** + * + * + *
            +     * The inline source for the input content for document embeddings.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesRequest.InlineSource inline_source = 2; + * + */ + public Builder mergeInlineSource( + com.google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesRequest.InlineSource value) { + if (inlineSourceBuilder_ == null) { + if (sourceCase_ == 2 + && source_ + != com.google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesRequest + .InlineSource.getDefaultInstance()) { + source_ = + com.google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesRequest.InlineSource + .newBuilder( + (com.google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesRequest + .InlineSource) + source_) + .mergeFrom(value) + .buildPartial(); + } else { + source_ = value; + } + onChanged(); + } else { + if (sourceCase_ == 2) { + inlineSourceBuilder_.mergeFrom(value); + } else { + inlineSourceBuilder_.setMessage(value); + } + } + sourceCase_ = 2; + return this; + } + + /** + * + * + *
            +     * The inline source for the input content for document embeddings.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesRequest.InlineSource inline_source = 2; + * + */ + public Builder clearInlineSource() { + if (inlineSourceBuilder_ == null) { + if (sourceCase_ == 2) { + sourceCase_ = 0; + source_ = null; + onChanged(); + } + } else { + if (sourceCase_ == 2) { + sourceCase_ = 0; + source_ = null; + } + inlineSourceBuilder_.clear(); + } + return this; + } + + /** + * + * + *
            +     * The inline source for the input content for document embeddings.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesRequest.InlineSource inline_source = 2; + * + */ + public com.google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesRequest.InlineSource + .Builder + getInlineSourceBuilder() { + return internalGetInlineSourceFieldBuilder().getBuilder(); + } + + /** + * + * + *
            +     * The inline source for the input content for document embeddings.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesRequest.InlineSource inline_source = 2; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesRequest + .InlineSourceOrBuilder + getInlineSourceOrBuilder() { + if ((sourceCase_ == 2) && (inlineSourceBuilder_ != null)) { + return inlineSourceBuilder_.getMessageOrBuilder(); + } else { + if (sourceCase_ == 2) { + return (com.google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesRequest + .InlineSource) + source_; + } + return com.google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesRequest.InlineSource + .getDefaultInstance(); + } + } + + /** + * + * + *
            +     * The inline source for the input content for document embeddings.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesRequest.InlineSource inline_source = 2; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesRequest.InlineSource, + com.google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesRequest.InlineSource + .Builder, + com.google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesRequest + .InlineSourceOrBuilder> + internalGetInlineSourceFieldBuilder() { + if (inlineSourceBuilder_ == null) { + if (!(sourceCase_ == 2)) { + source_ = + com.google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesRequest.InlineSource + .getDefaultInstance(); + } + inlineSourceBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesRequest.InlineSource, + com.google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesRequest.InlineSource + .Builder, + com.google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesRequest + .InlineSourceOrBuilder>( + (com.google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesRequest + .InlineSource) + source_, + getParentForChildren(), + isClean()); + source_ = null; + } + sourceCase_ = 2; + onChanged(); + return inlineSourceBuilder_; + } + + private java.lang.Object parent_ = ""; + + /** + * + * + *
            +     * Required. The parent
            +     * [UserStore][google.cloud.discoveryengine.v1beta.UserStore] resource name,
            +     * format:
            +     * `projects/{project}/locations/{location}/userStores/{user_store_id}`.
            +     * 
            + * + * + * 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 parent
            +     * [UserStore][google.cloud.discoveryengine.v1beta.UserStore] resource name,
            +     * format:
            +     * `projects/{project}/locations/{location}/userStores/{user_store_id}`.
            +     * 
            + * + * + * 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 parent
            +     * [UserStore][google.cloud.discoveryengine.v1beta.UserStore] resource name,
            +     * format:
            +     * `projects/{project}/locations/{location}/userStores/{user_store_id}`.
            +     * 
            + * + * + * 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_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Required. The parent
            +     * [UserStore][google.cloud.discoveryengine.v1beta.UserStore] resource name,
            +     * format:
            +     * `projects/{project}/locations/{location}/userStores/{user_store_id}`.
            +     * 
            + * + * + * 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_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
            +     * Required. The parent
            +     * [UserStore][google.cloud.discoveryengine.v1beta.UserStore] resource name,
            +     * format:
            +     * `projects/{project}/locations/{location}/userStores/{user_store_id}`.
            +     * 
            + * + * + * 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_ |= 0x00000002; + onChanged(); + return this; + } + + private boolean deleteUnassignedUserLicenses_; + + /** + * + * + *
            +     * Optional. If true, if user licenses removed associated license config, the
            +     * user license will be deleted. By default which is false, the user license
            +     * will be updated to unassigned state.
            +     * 
            + * + * bool delete_unassigned_user_licenses = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The deleteUnassignedUserLicenses. + */ + @java.lang.Override + public boolean getDeleteUnassignedUserLicenses() { + return deleteUnassignedUserLicenses_; + } + + /** + * + * + *
            +     * Optional. If true, if user licenses removed associated license config, the
            +     * user license will be deleted. By default which is false, the user license
            +     * will be updated to unassigned state.
            +     * 
            + * + * bool delete_unassigned_user_licenses = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The deleteUnassignedUserLicenses to set. + * @return This builder for chaining. + */ + public Builder setDeleteUnassignedUserLicenses(boolean value) { + + deleteUnassignedUserLicenses_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Optional. If true, if user licenses removed associated license config, the
            +     * user license will be deleted. By default which is false, the user license
            +     * will be updated to unassigned state.
            +     * 
            + * + * bool delete_unassigned_user_licenses = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearDeleteUnassignedUserLicenses() { + bitField0_ = (bitField0_ & ~0x00000004); + deleteUnassignedUserLicenses_ = false; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesRequest) + private static final com.google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesRequest(); + } + + public static com.google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BatchUpdateUserLicensesRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/BatchUpdateUserLicensesRequestOrBuilder.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/BatchUpdateUserLicensesRequestOrBuilder.java new file mode 100644 index 000000000000..0dd51f53330e --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/BatchUpdateUserLicensesRequestOrBuilder.java @@ -0,0 +1,127 @@ +/* + * 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/cloud/discoveryengine/v1beta/user_license_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.discoveryengine.v1beta; + +@com.google.protobuf.Generated +public interface BatchUpdateUserLicensesRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
            +   * The inline source for the input content for document embeddings.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesRequest.InlineSource inline_source = 2; + * + * + * @return Whether the inlineSource field is set. + */ + boolean hasInlineSource(); + + /** + * + * + *
            +   * The inline source for the input content for document embeddings.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesRequest.InlineSource inline_source = 2; + * + * + * @return The inlineSource. + */ + com.google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesRequest.InlineSource + getInlineSource(); + + /** + * + * + *
            +   * The inline source for the input content for document embeddings.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesRequest.InlineSource inline_source = 2; + * + */ + com.google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesRequest.InlineSourceOrBuilder + getInlineSourceOrBuilder(); + + /** + * + * + *
            +   * Required. The parent
            +   * [UserStore][google.cloud.discoveryengine.v1beta.UserStore] resource name,
            +   * format:
            +   * `projects/{project}/locations/{location}/userStores/{user_store_id}`.
            +   * 
            + * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + + /** + * + * + *
            +   * Required. The parent
            +   * [UserStore][google.cloud.discoveryengine.v1beta.UserStore] resource name,
            +   * format:
            +   * `projects/{project}/locations/{location}/userStores/{user_store_id}`.
            +   * 
            + * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
            +   * Optional. If true, if user licenses removed associated license config, the
            +   * user license will be deleted. By default which is false, the user license
            +   * will be updated to unassigned state.
            +   * 
            + * + * bool delete_unassigned_user_licenses = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The deleteUnassignedUserLicenses. + */ + boolean getDeleteUnassignedUserLicenses(); + + com.google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesRequest.SourceCase getSourceCase(); +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/BatchUpdateUserLicensesResponse.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/BatchUpdateUserLicensesResponse.java new file mode 100644 index 000000000000..b2ee53804304 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/BatchUpdateUserLicensesResponse.java @@ -0,0 +1,1452 @@ +/* + * 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/cloud/discoveryengine/v1beta/user_license_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.discoveryengine.v1beta; + +/** + * + * + *
            + * Response message for
            + * [UserLicenseService.BatchUpdateUserLicenses][google.cloud.discoveryengine.v1beta.UserLicenseService.BatchUpdateUserLicenses]
            + * method.
            + * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesResponse} + */ +@com.google.protobuf.Generated +public final class BatchUpdateUserLicensesResponse extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesResponse) + BatchUpdateUserLicensesResponseOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "BatchUpdateUserLicensesResponse"); + } + + // Use BatchUpdateUserLicensesResponse.newBuilder() to construct. + private BatchUpdateUserLicensesResponse(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private BatchUpdateUserLicensesResponse() { + userLicenses_ = java.util.Collections.emptyList(); + errorSamples_ = java.util.Collections.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.UserLicenseServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_BatchUpdateUserLicensesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.UserLicenseServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_BatchUpdateUserLicensesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesResponse.class, + com.google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesResponse.Builder.class); + } + + public static final int USER_LICENSES_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List userLicenses_; + + /** + * + * + *
            +   * UserLicenses successfully updated.
            +   * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.UserLicense user_licenses = 1; + */ + @java.lang.Override + public java.util.List getUserLicensesList() { + return userLicenses_; + } + + /** + * + * + *
            +   * UserLicenses successfully updated.
            +   * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.UserLicense user_licenses = 1; + */ + @java.lang.Override + public java.util.List + getUserLicensesOrBuilderList() { + return userLicenses_; + } + + /** + * + * + *
            +   * UserLicenses successfully updated.
            +   * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.UserLicense user_licenses = 1; + */ + @java.lang.Override + public int getUserLicensesCount() { + return userLicenses_.size(); + } + + /** + * + * + *
            +   * UserLicenses successfully updated.
            +   * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.UserLicense user_licenses = 1; + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.UserLicense getUserLicenses(int index) { + return userLicenses_.get(index); + } + + /** + * + * + *
            +   * UserLicenses successfully updated.
            +   * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.UserLicense user_licenses = 1; + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.UserLicenseOrBuilder getUserLicensesOrBuilder( + int index) { + return userLicenses_.get(index); + } + + public static final int ERROR_SAMPLES_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private java.util.List errorSamples_; + + /** + * + * + *
            +   * A sample of errors encountered while processing the request.
            +   * 
            + * + * repeated .google.rpc.Status error_samples = 2; + */ + @java.lang.Override + public java.util.List getErrorSamplesList() { + return errorSamples_; + } + + /** + * + * + *
            +   * A sample of errors encountered while processing the request.
            +   * 
            + * + * repeated .google.rpc.Status error_samples = 2; + */ + @java.lang.Override + public java.util.List getErrorSamplesOrBuilderList() { + return errorSamples_; + } + + /** + * + * + *
            +   * A sample of errors encountered while processing the request.
            +   * 
            + * + * repeated .google.rpc.Status error_samples = 2; + */ + @java.lang.Override + public int getErrorSamplesCount() { + return errorSamples_.size(); + } + + /** + * + * + *
            +   * A sample of errors encountered while processing the request.
            +   * 
            + * + * repeated .google.rpc.Status error_samples = 2; + */ + @java.lang.Override + public com.google.rpc.Status getErrorSamples(int index) { + return errorSamples_.get(index); + } + + /** + * + * + *
            +   * A sample of errors encountered while processing the request.
            +   * 
            + * + * repeated .google.rpc.Status error_samples = 2; + */ + @java.lang.Override + public com.google.rpc.StatusOrBuilder getErrorSamplesOrBuilder(int index) { + return errorSamples_.get(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 { + for (int i = 0; i < userLicenses_.size(); i++) { + output.writeMessage(1, userLicenses_.get(i)); + } + for (int i = 0; i < errorSamples_.size(); i++) { + output.writeMessage(2, errorSamples_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < userLicenses_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, userLicenses_.get(i)); + } + for (int i = 0; i < errorSamples_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, errorSamples_.get(i)); + } + 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.discoveryengine.v1beta.BatchUpdateUserLicensesResponse)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesResponse other = + (com.google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesResponse) obj; + + if (!getUserLicensesList().equals(other.getUserLicensesList())) return false; + if (!getErrorSamplesList().equals(other.getErrorSamplesList())) 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 (getUserLicensesCount() > 0) { + hash = (37 * hash) + USER_LICENSES_FIELD_NUMBER; + hash = (53 * hash) + getUserLicensesList().hashCode(); + } + if (getErrorSamplesCount() > 0) { + hash = (37 * hash) + ERROR_SAMPLES_FIELD_NUMBER; + hash = (53 * hash) + getErrorSamplesList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesResponse 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.discoveryengine.v1beta.BatchUpdateUserLicensesResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesResponse 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.discoveryengine.v1beta.BatchUpdateUserLicensesResponse parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesResponse 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.discoveryengine.v1beta.BatchUpdateUserLicensesResponse + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesResponse + 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.discoveryengine.v1beta.BatchUpdateUserLicensesResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesResponse 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.discoveryengine.v1beta.BatchUpdateUserLicensesResponse 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
            +   * [UserLicenseService.BatchUpdateUserLicenses][google.cloud.discoveryengine.v1beta.UserLicenseService.BatchUpdateUserLicenses]
            +   * method.
            +   * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesResponse) + com.google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.UserLicenseServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_BatchUpdateUserLicensesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.UserLicenseServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_BatchUpdateUserLicensesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesResponse.class, + com.google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesResponse.Builder + .class); + } + + // Construct using + // com.google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (userLicensesBuilder_ == null) { + userLicenses_ = java.util.Collections.emptyList(); + } else { + userLicenses_ = null; + userLicensesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + if (errorSamplesBuilder_ == null) { + errorSamples_ = java.util.Collections.emptyList(); + } else { + errorSamples_ = null; + errorSamplesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1beta.UserLicenseServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_BatchUpdateUserLicensesResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesResponse + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesResponse + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesResponse build() { + com.google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesResponse result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesResponse buildPartial() { + com.google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesResponse result = + new com.google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesResponse result) { + if (userLicensesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + userLicenses_ = java.util.Collections.unmodifiableList(userLicenses_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.userLicenses_ = userLicenses_; + } else { + result.userLicenses_ = userLicensesBuilder_.build(); + } + if (errorSamplesBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + errorSamples_ = java.util.Collections.unmodifiableList(errorSamples_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.errorSamples_ = errorSamples_; + } else { + result.errorSamples_ = errorSamplesBuilder_.build(); + } + } + + private void buildPartial0( + com.google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesResponse result) { + int from_bitField0_ = bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesResponse) { + return mergeFrom( + (com.google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesResponse other) { + if (other + == com.google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesResponse + .getDefaultInstance()) return this; + if (userLicensesBuilder_ == null) { + if (!other.userLicenses_.isEmpty()) { + if (userLicenses_.isEmpty()) { + userLicenses_ = other.userLicenses_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureUserLicensesIsMutable(); + userLicenses_.addAll(other.userLicenses_); + } + onChanged(); + } + } else { + if (!other.userLicenses_.isEmpty()) { + if (userLicensesBuilder_.isEmpty()) { + userLicensesBuilder_.dispose(); + userLicensesBuilder_ = null; + userLicenses_ = other.userLicenses_; + bitField0_ = (bitField0_ & ~0x00000001); + userLicensesBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetUserLicensesFieldBuilder() + : null; + } else { + userLicensesBuilder_.addAllMessages(other.userLicenses_); + } + } + } + if (errorSamplesBuilder_ == null) { + if (!other.errorSamples_.isEmpty()) { + if (errorSamples_.isEmpty()) { + errorSamples_ = other.errorSamples_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureErrorSamplesIsMutable(); + errorSamples_.addAll(other.errorSamples_); + } + onChanged(); + } + } else { + if (!other.errorSamples_.isEmpty()) { + if (errorSamplesBuilder_.isEmpty()) { + errorSamplesBuilder_.dispose(); + errorSamplesBuilder_ = null; + errorSamples_ = other.errorSamples_; + bitField0_ = (bitField0_ & ~0x00000002); + errorSamplesBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetErrorSamplesFieldBuilder() + : null; + } else { + errorSamplesBuilder_.addAllMessages(other.errorSamples_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.discoveryengine.v1beta.UserLicense m = + input.readMessage( + com.google.cloud.discoveryengine.v1beta.UserLicense.parser(), + extensionRegistry); + if (userLicensesBuilder_ == null) { + ensureUserLicensesIsMutable(); + userLicenses_.add(m); + } else { + userLicensesBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + com.google.rpc.Status m = + input.readMessage(com.google.rpc.Status.parser(), extensionRegistry); + if (errorSamplesBuilder_ == null) { + ensureErrorSamplesIsMutable(); + errorSamples_.add(m); + } else { + errorSamplesBuilder_.addMessage(m); + } + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List userLicenses_ = + java.util.Collections.emptyList(); + + private void ensureUserLicensesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + userLicenses_ = + new java.util.ArrayList( + userLicenses_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.discoveryengine.v1beta.UserLicense, + com.google.cloud.discoveryengine.v1beta.UserLicense.Builder, + com.google.cloud.discoveryengine.v1beta.UserLicenseOrBuilder> + userLicensesBuilder_; + + /** + * + * + *
            +     * UserLicenses successfully updated.
            +     * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.UserLicense user_licenses = 1; + */ + public java.util.List + getUserLicensesList() { + if (userLicensesBuilder_ == null) { + return java.util.Collections.unmodifiableList(userLicenses_); + } else { + return userLicensesBuilder_.getMessageList(); + } + } + + /** + * + * + *
            +     * UserLicenses successfully updated.
            +     * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.UserLicense user_licenses = 1; + */ + public int getUserLicensesCount() { + if (userLicensesBuilder_ == null) { + return userLicenses_.size(); + } else { + return userLicensesBuilder_.getCount(); + } + } + + /** + * + * + *
            +     * UserLicenses successfully updated.
            +     * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.UserLicense user_licenses = 1; + */ + public com.google.cloud.discoveryengine.v1beta.UserLicense getUserLicenses(int index) { + if (userLicensesBuilder_ == null) { + return userLicenses_.get(index); + } else { + return userLicensesBuilder_.getMessage(index); + } + } + + /** + * + * + *
            +     * UserLicenses successfully updated.
            +     * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.UserLicense user_licenses = 1; + */ + public Builder setUserLicenses( + int index, com.google.cloud.discoveryengine.v1beta.UserLicense value) { + if (userLicensesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureUserLicensesIsMutable(); + userLicenses_.set(index, value); + onChanged(); + } else { + userLicensesBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
            +     * UserLicenses successfully updated.
            +     * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.UserLicense user_licenses = 1; + */ + public Builder setUserLicenses( + int index, com.google.cloud.discoveryengine.v1beta.UserLicense.Builder builderForValue) { + if (userLicensesBuilder_ == null) { + ensureUserLicensesIsMutable(); + userLicenses_.set(index, builderForValue.build()); + onChanged(); + } else { + userLicensesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
            +     * UserLicenses successfully updated.
            +     * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.UserLicense user_licenses = 1; + */ + public Builder addUserLicenses(com.google.cloud.discoveryengine.v1beta.UserLicense value) { + if (userLicensesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureUserLicensesIsMutable(); + userLicenses_.add(value); + onChanged(); + } else { + userLicensesBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
            +     * UserLicenses successfully updated.
            +     * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.UserLicense user_licenses = 1; + */ + public Builder addUserLicenses( + int index, com.google.cloud.discoveryengine.v1beta.UserLicense value) { + if (userLicensesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureUserLicensesIsMutable(); + userLicenses_.add(index, value); + onChanged(); + } else { + userLicensesBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
            +     * UserLicenses successfully updated.
            +     * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.UserLicense user_licenses = 1; + */ + public Builder addUserLicenses( + com.google.cloud.discoveryengine.v1beta.UserLicense.Builder builderForValue) { + if (userLicensesBuilder_ == null) { + ensureUserLicensesIsMutable(); + userLicenses_.add(builderForValue.build()); + onChanged(); + } else { + userLicensesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
            +     * UserLicenses successfully updated.
            +     * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.UserLicense user_licenses = 1; + */ + public Builder addUserLicenses( + int index, com.google.cloud.discoveryengine.v1beta.UserLicense.Builder builderForValue) { + if (userLicensesBuilder_ == null) { + ensureUserLicensesIsMutable(); + userLicenses_.add(index, builderForValue.build()); + onChanged(); + } else { + userLicensesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
            +     * UserLicenses successfully updated.
            +     * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.UserLicense user_licenses = 1; + */ + public Builder addAllUserLicenses( + java.lang.Iterable values) { + if (userLicensesBuilder_ == null) { + ensureUserLicensesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, userLicenses_); + onChanged(); + } else { + userLicensesBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
            +     * UserLicenses successfully updated.
            +     * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.UserLicense user_licenses = 1; + */ + public Builder clearUserLicenses() { + if (userLicensesBuilder_ == null) { + userLicenses_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + userLicensesBuilder_.clear(); + } + return this; + } + + /** + * + * + *
            +     * UserLicenses successfully updated.
            +     * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.UserLicense user_licenses = 1; + */ + public Builder removeUserLicenses(int index) { + if (userLicensesBuilder_ == null) { + ensureUserLicensesIsMutable(); + userLicenses_.remove(index); + onChanged(); + } else { + userLicensesBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
            +     * UserLicenses successfully updated.
            +     * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.UserLicense user_licenses = 1; + */ + public com.google.cloud.discoveryengine.v1beta.UserLicense.Builder getUserLicensesBuilder( + int index) { + return internalGetUserLicensesFieldBuilder().getBuilder(index); + } + + /** + * + * + *
            +     * UserLicenses successfully updated.
            +     * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.UserLicense user_licenses = 1; + */ + public com.google.cloud.discoveryengine.v1beta.UserLicenseOrBuilder getUserLicensesOrBuilder( + int index) { + if (userLicensesBuilder_ == null) { + return userLicenses_.get(index); + } else { + return userLicensesBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
            +     * UserLicenses successfully updated.
            +     * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.UserLicense user_licenses = 1; + */ + public java.util.List + getUserLicensesOrBuilderList() { + if (userLicensesBuilder_ != null) { + return userLicensesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(userLicenses_); + } + } + + /** + * + * + *
            +     * UserLicenses successfully updated.
            +     * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.UserLicense user_licenses = 1; + */ + public com.google.cloud.discoveryengine.v1beta.UserLicense.Builder addUserLicensesBuilder() { + return internalGetUserLicensesFieldBuilder() + .addBuilder(com.google.cloud.discoveryengine.v1beta.UserLicense.getDefaultInstance()); + } + + /** + * + * + *
            +     * UserLicenses successfully updated.
            +     * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.UserLicense user_licenses = 1; + */ + public com.google.cloud.discoveryengine.v1beta.UserLicense.Builder addUserLicensesBuilder( + int index) { + return internalGetUserLicensesFieldBuilder() + .addBuilder( + index, com.google.cloud.discoveryengine.v1beta.UserLicense.getDefaultInstance()); + } + + /** + * + * + *
            +     * UserLicenses successfully updated.
            +     * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.UserLicense user_licenses = 1; + */ + public java.util.List + getUserLicensesBuilderList() { + return internalGetUserLicensesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.discoveryengine.v1beta.UserLicense, + com.google.cloud.discoveryengine.v1beta.UserLicense.Builder, + com.google.cloud.discoveryengine.v1beta.UserLicenseOrBuilder> + internalGetUserLicensesFieldBuilder() { + if (userLicensesBuilder_ == null) { + userLicensesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.discoveryengine.v1beta.UserLicense, + com.google.cloud.discoveryengine.v1beta.UserLicense.Builder, + com.google.cloud.discoveryengine.v1beta.UserLicenseOrBuilder>( + userLicenses_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + userLicenses_ = null; + } + return userLicensesBuilder_; + } + + private java.util.List errorSamples_ = java.util.Collections.emptyList(); + + private void ensureErrorSamplesIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + errorSamples_ = new java.util.ArrayList(errorSamples_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> + errorSamplesBuilder_; + + /** + * + * + *
            +     * A sample of errors encountered while processing the request.
            +     * 
            + * + * repeated .google.rpc.Status error_samples = 2; + */ + public java.util.List getErrorSamplesList() { + if (errorSamplesBuilder_ == null) { + return java.util.Collections.unmodifiableList(errorSamples_); + } else { + return errorSamplesBuilder_.getMessageList(); + } + } + + /** + * + * + *
            +     * A sample of errors encountered while processing the request.
            +     * 
            + * + * repeated .google.rpc.Status error_samples = 2; + */ + public int getErrorSamplesCount() { + if (errorSamplesBuilder_ == null) { + return errorSamples_.size(); + } else { + return errorSamplesBuilder_.getCount(); + } + } + + /** + * + * + *
            +     * A sample of errors encountered while processing the request.
            +     * 
            + * + * repeated .google.rpc.Status error_samples = 2; + */ + public com.google.rpc.Status getErrorSamples(int index) { + if (errorSamplesBuilder_ == null) { + return errorSamples_.get(index); + } else { + return errorSamplesBuilder_.getMessage(index); + } + } + + /** + * + * + *
            +     * A sample of errors encountered while processing the request.
            +     * 
            + * + * repeated .google.rpc.Status error_samples = 2; + */ + public Builder setErrorSamples(int index, com.google.rpc.Status value) { + if (errorSamplesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureErrorSamplesIsMutable(); + errorSamples_.set(index, value); + onChanged(); + } else { + errorSamplesBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
            +     * A sample of errors encountered while processing the request.
            +     * 
            + * + * repeated .google.rpc.Status error_samples = 2; + */ + public Builder setErrorSamples(int index, com.google.rpc.Status.Builder builderForValue) { + if (errorSamplesBuilder_ == null) { + ensureErrorSamplesIsMutable(); + errorSamples_.set(index, builderForValue.build()); + onChanged(); + } else { + errorSamplesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
            +     * A sample of errors encountered while processing the request.
            +     * 
            + * + * repeated .google.rpc.Status error_samples = 2; + */ + public Builder addErrorSamples(com.google.rpc.Status value) { + if (errorSamplesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureErrorSamplesIsMutable(); + errorSamples_.add(value); + onChanged(); + } else { + errorSamplesBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
            +     * A sample of errors encountered while processing the request.
            +     * 
            + * + * repeated .google.rpc.Status error_samples = 2; + */ + public Builder addErrorSamples(int index, com.google.rpc.Status value) { + if (errorSamplesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureErrorSamplesIsMutable(); + errorSamples_.add(index, value); + onChanged(); + } else { + errorSamplesBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
            +     * A sample of errors encountered while processing the request.
            +     * 
            + * + * repeated .google.rpc.Status error_samples = 2; + */ + public Builder addErrorSamples(com.google.rpc.Status.Builder builderForValue) { + if (errorSamplesBuilder_ == null) { + ensureErrorSamplesIsMutable(); + errorSamples_.add(builderForValue.build()); + onChanged(); + } else { + errorSamplesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
            +     * A sample of errors encountered while processing the request.
            +     * 
            + * + * repeated .google.rpc.Status error_samples = 2; + */ + public Builder addErrorSamples(int index, com.google.rpc.Status.Builder builderForValue) { + if (errorSamplesBuilder_ == null) { + ensureErrorSamplesIsMutable(); + errorSamples_.add(index, builderForValue.build()); + onChanged(); + } else { + errorSamplesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
            +     * A sample of errors encountered while processing the request.
            +     * 
            + * + * repeated .google.rpc.Status error_samples = 2; + */ + public Builder addAllErrorSamples(java.lang.Iterable values) { + if (errorSamplesBuilder_ == null) { + ensureErrorSamplesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, errorSamples_); + onChanged(); + } else { + errorSamplesBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
            +     * A sample of errors encountered while processing the request.
            +     * 
            + * + * repeated .google.rpc.Status error_samples = 2; + */ + public Builder clearErrorSamples() { + if (errorSamplesBuilder_ == null) { + errorSamples_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + errorSamplesBuilder_.clear(); + } + return this; + } + + /** + * + * + *
            +     * A sample of errors encountered while processing the request.
            +     * 
            + * + * repeated .google.rpc.Status error_samples = 2; + */ + public Builder removeErrorSamples(int index) { + if (errorSamplesBuilder_ == null) { + ensureErrorSamplesIsMutable(); + errorSamples_.remove(index); + onChanged(); + } else { + errorSamplesBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
            +     * A sample of errors encountered while processing the request.
            +     * 
            + * + * repeated .google.rpc.Status error_samples = 2; + */ + public com.google.rpc.Status.Builder getErrorSamplesBuilder(int index) { + return internalGetErrorSamplesFieldBuilder().getBuilder(index); + } + + /** + * + * + *
            +     * A sample of errors encountered while processing the request.
            +     * 
            + * + * repeated .google.rpc.Status error_samples = 2; + */ + public com.google.rpc.StatusOrBuilder getErrorSamplesOrBuilder(int index) { + if (errorSamplesBuilder_ == null) { + return errorSamples_.get(index); + } else { + return errorSamplesBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
            +     * A sample of errors encountered while processing the request.
            +     * 
            + * + * repeated .google.rpc.Status error_samples = 2; + */ + public java.util.List getErrorSamplesOrBuilderList() { + if (errorSamplesBuilder_ != null) { + return errorSamplesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(errorSamples_); + } + } + + /** + * + * + *
            +     * A sample of errors encountered while processing the request.
            +     * 
            + * + * repeated .google.rpc.Status error_samples = 2; + */ + public com.google.rpc.Status.Builder addErrorSamplesBuilder() { + return internalGetErrorSamplesFieldBuilder() + .addBuilder(com.google.rpc.Status.getDefaultInstance()); + } + + /** + * + * + *
            +     * A sample of errors encountered while processing the request.
            +     * 
            + * + * repeated .google.rpc.Status error_samples = 2; + */ + public com.google.rpc.Status.Builder addErrorSamplesBuilder(int index) { + return internalGetErrorSamplesFieldBuilder() + .addBuilder(index, com.google.rpc.Status.getDefaultInstance()); + } + + /** + * + * + *
            +     * A sample of errors encountered while processing the request.
            +     * 
            + * + * repeated .google.rpc.Status error_samples = 2; + */ + public java.util.List getErrorSamplesBuilderList() { + return internalGetErrorSamplesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> + internalGetErrorSamplesFieldBuilder() { + if (errorSamplesBuilder_ == null) { + errorSamplesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.rpc.Status, + com.google.rpc.Status.Builder, + com.google.rpc.StatusOrBuilder>( + errorSamples_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); + errorSamples_ = null; + } + return errorSamplesBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesResponse) + private static final com.google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesResponse(); + } + + public static com.google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BatchUpdateUserLicensesResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/BatchUpdateUserLicensesResponseOrBuilder.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/BatchUpdateUserLicensesResponseOrBuilder.java new file mode 100644 index 000000000000..710a568f6438 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/BatchUpdateUserLicensesResponseOrBuilder.java @@ -0,0 +1,139 @@ +/* + * 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/cloud/discoveryengine/v1beta/user_license_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.discoveryengine.v1beta; + +@com.google.protobuf.Generated +public interface BatchUpdateUserLicensesResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
            +   * UserLicenses successfully updated.
            +   * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.UserLicense user_licenses = 1; + */ + java.util.List getUserLicensesList(); + + /** + * + * + *
            +   * UserLicenses successfully updated.
            +   * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.UserLicense user_licenses = 1; + */ + com.google.cloud.discoveryengine.v1beta.UserLicense getUserLicenses(int index); + + /** + * + * + *
            +   * UserLicenses successfully updated.
            +   * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.UserLicense user_licenses = 1; + */ + int getUserLicensesCount(); + + /** + * + * + *
            +   * UserLicenses successfully updated.
            +   * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.UserLicense user_licenses = 1; + */ + java.util.List + getUserLicensesOrBuilderList(); + + /** + * + * + *
            +   * UserLicenses successfully updated.
            +   * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.UserLicense user_licenses = 1; + */ + com.google.cloud.discoveryengine.v1beta.UserLicenseOrBuilder getUserLicensesOrBuilder(int index); + + /** + * + * + *
            +   * A sample of errors encountered while processing the request.
            +   * 
            + * + * repeated .google.rpc.Status error_samples = 2; + */ + java.util.List getErrorSamplesList(); + + /** + * + * + *
            +   * A sample of errors encountered while processing the request.
            +   * 
            + * + * repeated .google.rpc.Status error_samples = 2; + */ + com.google.rpc.Status getErrorSamples(int index); + + /** + * + * + *
            +   * A sample of errors encountered while processing the request.
            +   * 
            + * + * repeated .google.rpc.Status error_samples = 2; + */ + int getErrorSamplesCount(); + + /** + * + * + *
            +   * A sample of errors encountered while processing the request.
            +   * 
            + * + * repeated .google.rpc.Status error_samples = 2; + */ + java.util.List getErrorSamplesOrBuilderList(); + + /** + * + * + *
            +   * A sample of errors encountered while processing the request.
            +   * 
            + * + * repeated .google.rpc.Status error_samples = 2; + */ + com.google.rpc.StatusOrBuilder getErrorSamplesOrBuilder(int index); +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/BigtableOptions.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/BigtableOptions.java index 403f0d3f5448..af6ebbff9142 100644 --- a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/BigtableOptions.java +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/BigtableOptions.java @@ -90,7 +90,7 @@ protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldRefl * The type of values in a Bigtable column or column family. * The values are expected to be encoded using * [HBase - * Bytes.toBytes](https://hbase.apache.org/apidocs/org/apache/hadoop/hbase/util/Bytes.html) + * Bytes.toBytes](https://hbase.apache.org/1.4/apidocs/org/apache/hadoop/hbase/util/Bytes.html) * function when the encoding value is set to `BINARY`. *
            * diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/BillingAccountLicenseConfigName.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/BillingAccountLicenseConfigName.java new file mode 100644 index 000000000000..0a8d3f4953dc --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/BillingAccountLicenseConfigName.java @@ -0,0 +1,211 @@ +/* + * 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.discoveryengine.v1beta; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class BillingAccountLicenseConfigName implements ResourceName { + private static final PathTemplate BILLING_ACCOUNT_BILLING_ACCOUNT_LICENSE_CONFIG = + PathTemplate.createWithoutUrlEncoding( + "billingAccounts/{billing_account}/billingAccountLicenseConfigs/{billing_account_license_config}"); + private volatile Map fieldValuesMap; + private final String billingAccount; + private final String billingAccountLicenseConfig; + + @Deprecated + protected BillingAccountLicenseConfigName() { + billingAccount = null; + billingAccountLicenseConfig = null; + } + + private BillingAccountLicenseConfigName(Builder builder) { + billingAccount = Preconditions.checkNotNull(builder.getBillingAccount()); + billingAccountLicenseConfig = + Preconditions.checkNotNull(builder.getBillingAccountLicenseConfig()); + } + + public String getBillingAccount() { + return billingAccount; + } + + public String getBillingAccountLicenseConfig() { + return billingAccountLicenseConfig; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static BillingAccountLicenseConfigName of( + String billingAccount, String billingAccountLicenseConfig) { + return newBuilder() + .setBillingAccount(billingAccount) + .setBillingAccountLicenseConfig(billingAccountLicenseConfig) + .build(); + } + + public static String format(String billingAccount, String billingAccountLicenseConfig) { + return newBuilder() + .setBillingAccount(billingAccount) + .setBillingAccountLicenseConfig(billingAccountLicenseConfig) + .build() + .toString(); + } + + public static BillingAccountLicenseConfigName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + BILLING_ACCOUNT_BILLING_ACCOUNT_LICENSE_CONFIG.validatedMatch( + formattedString, + "BillingAccountLicenseConfigName.parse: formattedString not in valid format"); + return of(matchMap.get("billing_account"), matchMap.get("billing_account_license_config")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (BillingAccountLicenseConfigName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return BILLING_ACCOUNT_BILLING_ACCOUNT_LICENSE_CONFIG.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (billingAccount != null) { + fieldMapBuilder.put("billing_account", billingAccount); + } + if (billingAccountLicenseConfig != null) { + fieldMapBuilder.put("billing_account_license_config", billingAccountLicenseConfig); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return BILLING_ACCOUNT_BILLING_ACCOUNT_LICENSE_CONFIG.instantiate( + "billing_account", + billingAccount, + "billing_account_license_config", + billingAccountLicenseConfig); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null && getClass() == o.getClass()) { + BillingAccountLicenseConfigName that = ((BillingAccountLicenseConfigName) o); + return Objects.equals(this.billingAccount, that.billingAccount) + && Objects.equals(this.billingAccountLicenseConfig, that.billingAccountLicenseConfig); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(billingAccount); + h *= 1000003; + h ^= Objects.hashCode(billingAccountLicenseConfig); + return h; + } + + /** + * Builder for + * billingAccounts/{billing_account}/billingAccountLicenseConfigs/{billing_account_license_config}. + */ + public static class Builder { + private String billingAccount; + private String billingAccountLicenseConfig; + + protected Builder() {} + + public String getBillingAccount() { + return billingAccount; + } + + public String getBillingAccountLicenseConfig() { + return billingAccountLicenseConfig; + } + + public Builder setBillingAccount(String billingAccount) { + this.billingAccount = billingAccount; + return this; + } + + public Builder setBillingAccountLicenseConfig(String billingAccountLicenseConfig) { + this.billingAccountLicenseConfig = billingAccountLicenseConfig; + return this; + } + + private Builder(BillingAccountLicenseConfigName billingAccountLicenseConfigName) { + this.billingAccount = billingAccountLicenseConfigName.billingAccount; + this.billingAccountLicenseConfig = + billingAccountLicenseConfigName.billingAccountLicenseConfig; + } + + public BillingAccountLicenseConfigName build() { + return new BillingAccountLicenseConfigName(this); + } + } +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/CheckGroundingResponse.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/CheckGroundingResponse.java index cf303d2ac699..390f949e1a01 100644 --- a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/CheckGroundingResponse.java +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/CheckGroundingResponse.java @@ -747,7 +747,13 @@ public interface ClaimOrBuilder * *
                  * Position indicating the start of the claim in the answer candidate,
            -     * measured in bytes.
            +     * measured in bytes. Note that this is not measured in characters and,
            +     * therefore, must be rendered in the user interface keeping in mind that
            +     * some characters may take more than one byte. For example,
            +     * if the claim text contains non-ASCII characters, the start and end
            +     * positions vary when measured in characters
            +     * (programming-language-dependent) and when measured in bytes
            +     * (programming-language-independent).
                  * 
            * * optional int32 start_pos = 1; @@ -761,7 +767,13 @@ public interface ClaimOrBuilder * *
                  * Position indicating the start of the claim in the answer candidate,
            -     * measured in bytes.
            +     * measured in bytes. Note that this is not measured in characters and,
            +     * therefore, must be rendered in the user interface keeping in mind that
            +     * some characters may take more than one byte. For example,
            +     * if the claim text contains non-ASCII characters, the start and end
            +     * positions vary when measured in characters
            +     * (programming-language-dependent) and when measured in bytes
            +     * (programming-language-independent).
                  * 
            * * optional int32 start_pos = 1; @@ -775,7 +787,11 @@ public interface ClaimOrBuilder * *
                  * Position indicating the end of the claim in the answer candidate,
            -     * exclusive.
            +     * exclusive, in bytes. Note that this is not measured in characters and,
            +     * therefore, must be rendered as such. For example, if the claim text
            +     * contains non-ASCII characters, the start and end positions vary when
            +     * measured in characters (programming-language-dependent) and when measured
            +     * in bytes (programming-language-independent).
                  * 
            * * optional int32 end_pos = 2; @@ -789,7 +805,11 @@ public interface ClaimOrBuilder * *
                  * Position indicating the end of the claim in the answer candidate,
            -     * exclusive.
            +     * exclusive, in bytes. Note that this is not measured in characters and,
            +     * therefore, must be rendered as such. For example, if the claim text
            +     * contains non-ASCII characters, the start and end positions vary when
            +     * measured in characters (programming-language-dependent) and when measured
            +     * in bytes (programming-language-independent).
                  * 
            * * optional int32 end_pos = 2; @@ -886,10 +906,7 @@ public interface ClaimOrBuilder * decided this claim doesn't require attribution/grounding check, this * field will be set to false. In that case, no grounding check was done for * the claim and therefore - * [citation_indices][google.cloud.discoveryengine.v1beta.CheckGroundingResponse.Claim.citation_indices], - * [anti_citation_indices][google.cloud.discoveryengine.v1beta.CheckGroundingResponse.Claim.anti_citation_indices], - * and - * [score][google.cloud.discoveryengine.v1beta.CheckGroundingResponse.Claim.score] + * [citation_indices][google.cloud.discoveryengine.v1beta.CheckGroundingResponse.Claim.citation_indices] * should not be returned. *
            * @@ -907,10 +924,7 @@ public interface ClaimOrBuilder * decided this claim doesn't require attribution/grounding check, this * field will be set to false. In that case, no grounding check was done for * the claim and therefore - * [citation_indices][google.cloud.discoveryengine.v1beta.CheckGroundingResponse.Claim.citation_indices], - * [anti_citation_indices][google.cloud.discoveryengine.v1beta.CheckGroundingResponse.Claim.anti_citation_indices], - * and - * [score][google.cloud.discoveryengine.v1beta.CheckGroundingResponse.Claim.score] + * [citation_indices][google.cloud.discoveryengine.v1beta.CheckGroundingResponse.Claim.citation_indices] * should not be returned. *
            * @@ -919,6 +933,36 @@ public interface ClaimOrBuilder * @return The groundingCheckRequired. */ boolean getGroundingCheckRequired(); + + /** + * + * + *
            +     * Confidence score for the claim in the answer candidate, in the range of
            +     * [0, 1]. This is set only when
            +     * `CheckGroundingRequest.grounding_spec.enable_claim_level_score` is true.
            +     * 
            + * + * optional double score = 7; + * + * @return Whether the score field is set. + */ + boolean hasScore(); + + /** + * + * + *
            +     * Confidence score for the claim in the answer candidate, in the range of
            +     * [0, 1]. This is set only when
            +     * `CheckGroundingRequest.grounding_spec.enable_claim_level_score` is true.
            +     * 
            + * + * optional double score = 7; + * + * @return The score. + */ + double getScore(); } /** @@ -980,7 +1024,13 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * *
                  * Position indicating the start of the claim in the answer candidate,
            -     * measured in bytes.
            +     * measured in bytes. Note that this is not measured in characters and,
            +     * therefore, must be rendered in the user interface keeping in mind that
            +     * some characters may take more than one byte. For example,
            +     * if the claim text contains non-ASCII characters, the start and end
            +     * positions vary when measured in characters
            +     * (programming-language-dependent) and when measured in bytes
            +     * (programming-language-independent).
                  * 
            * * optional int32 start_pos = 1; @@ -997,7 +1047,13 @@ public boolean hasStartPos() { * *
                  * Position indicating the start of the claim in the answer candidate,
            -     * measured in bytes.
            +     * measured in bytes. Note that this is not measured in characters and,
            +     * therefore, must be rendered in the user interface keeping in mind that
            +     * some characters may take more than one byte. For example,
            +     * if the claim text contains non-ASCII characters, the start and end
            +     * positions vary when measured in characters
            +     * (programming-language-dependent) and when measured in bytes
            +     * (programming-language-independent).
                  * 
            * * optional int32 start_pos = 1; @@ -1017,7 +1073,11 @@ public int getStartPos() { * *
                  * Position indicating the end of the claim in the answer candidate,
            -     * exclusive.
            +     * exclusive, in bytes. Note that this is not measured in characters and,
            +     * therefore, must be rendered as such. For example, if the claim text
            +     * contains non-ASCII characters, the start and end positions vary when
            +     * measured in characters (programming-language-dependent) and when measured
            +     * in bytes (programming-language-independent).
                  * 
            * * optional int32 end_pos = 2; @@ -1034,7 +1094,11 @@ public boolean hasEndPos() { * *
                  * Position indicating the end of the claim in the answer candidate,
            -     * exclusive.
            +     * exclusive, in bytes. Note that this is not measured in characters and,
            +     * therefore, must be rendered as such. For example, if the claim text
            +     * contains non-ASCII characters, the start and end positions vary when
            +     * measured in characters (programming-language-dependent) and when measured
            +     * in bytes (programming-language-independent).
                  * 
            * * optional int32 end_pos = 2; @@ -1178,10 +1242,7 @@ public int getCitationIndices(int index) { * decided this claim doesn't require attribution/grounding check, this * field will be set to false. In that case, no grounding check was done for * the claim and therefore - * [citation_indices][google.cloud.discoveryengine.v1beta.CheckGroundingResponse.Claim.citation_indices], - * [anti_citation_indices][google.cloud.discoveryengine.v1beta.CheckGroundingResponse.Claim.anti_citation_indices], - * and - * [score][google.cloud.discoveryengine.v1beta.CheckGroundingResponse.Claim.score] + * [citation_indices][google.cloud.discoveryengine.v1beta.CheckGroundingResponse.Claim.citation_indices] * should not be returned. *
            * @@ -1202,10 +1263,7 @@ public boolean hasGroundingCheckRequired() { * decided this claim doesn't require attribution/grounding check, this * field will be set to false. In that case, no grounding check was done for * the claim and therefore - * [citation_indices][google.cloud.discoveryengine.v1beta.CheckGroundingResponse.Claim.citation_indices], - * [anti_citation_indices][google.cloud.discoveryengine.v1beta.CheckGroundingResponse.Claim.anti_citation_indices], - * and - * [score][google.cloud.discoveryengine.v1beta.CheckGroundingResponse.Claim.score] + * [citation_indices][google.cloud.discoveryengine.v1beta.CheckGroundingResponse.Claim.citation_indices] * should not be returned. *
            * @@ -1218,6 +1276,45 @@ public boolean getGroundingCheckRequired() { return groundingCheckRequired_; } + public static final int SCORE_FIELD_NUMBER = 7; + private double score_ = 0D; + + /** + * + * + *
            +     * Confidence score for the claim in the answer candidate, in the range of
            +     * [0, 1]. This is set only when
            +     * `CheckGroundingRequest.grounding_spec.enable_claim_level_score` is true.
            +     * 
            + * + * optional double score = 7; + * + * @return Whether the score field is set. + */ + @java.lang.Override + public boolean hasScore() { + return ((bitField0_ & 0x00000008) != 0); + } + + /** + * + * + *
            +     * Confidence score for the claim in the answer candidate, in the range of
            +     * [0, 1]. This is set only when
            +     * `CheckGroundingRequest.grounding_spec.enable_claim_level_score` is true.
            +     * 
            + * + * optional double score = 7; + * + * @return The score. + */ + @java.lang.Override + public double getScore() { + return score_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -1252,6 +1349,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000004) != 0)) { output.writeBool(6, groundingCheckRequired_); } + if (((bitField0_ & 0x00000008) != 0)) { + output.writeDouble(7, score_); + } getUnknownFields().writeTo(output); } @@ -1287,6 +1387,9 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000004) != 0)) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(6, groundingCheckRequired_); } + if (((bitField0_ & 0x00000008) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeDoubleSize(7, score_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -1317,6 +1420,11 @@ public boolean equals(final java.lang.Object obj) { if (hasGroundingCheckRequired()) { if (getGroundingCheckRequired() != other.getGroundingCheckRequired()) return false; } + if (hasScore() != other.hasScore()) return false; + if (hasScore()) { + if (java.lang.Double.doubleToLongBits(getScore()) + != java.lang.Double.doubleToLongBits(other.getScore())) return false; + } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1346,6 +1454,13 @@ public int hashCode() { hash = (37 * hash) + GROUNDING_CHECK_REQUIRED_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getGroundingCheckRequired()); } + if (hasScore()) { + hash = (37 * hash) + SCORE_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getScore())); + } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -1494,6 +1609,7 @@ public Builder clear() { claimText_ = ""; citationIndices_ = emptyIntList(); groundingCheckRequired_ = false; + score_ = 0D; return this; } @@ -1554,6 +1670,10 @@ private void buildPartial0( result.groundingCheckRequired_ = groundingCheckRequired_; to_bitField0_ |= 0x00000004; } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.score_ = score_; + to_bitField0_ |= 0x00000008; + } result.bitField0_ |= to_bitField0_; } @@ -1598,6 +1718,9 @@ public Builder mergeFrom( if (other.hasGroundingCheckRequired()) { setGroundingCheckRequired(other.getGroundingCheckRequired()); } + if (other.hasScore()) { + setScore(other.getScore()); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -1666,6 +1789,12 @@ public Builder mergeFrom( bitField0_ |= 0x00000010; break; } // case 48 + case 57: + { + score_ = input.readDouble(); + bitField0_ |= 0x00000020; + break; + } // case 57 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -1692,7 +1821,13 @@ public Builder mergeFrom( * *
                    * Position indicating the start of the claim in the answer candidate,
            -       * measured in bytes.
            +       * measured in bytes. Note that this is not measured in characters and,
            +       * therefore, must be rendered in the user interface keeping in mind that
            +       * some characters may take more than one byte. For example,
            +       * if the claim text contains non-ASCII characters, the start and end
            +       * positions vary when measured in characters
            +       * (programming-language-dependent) and when measured in bytes
            +       * (programming-language-independent).
                    * 
            * * optional int32 start_pos = 1; @@ -1709,7 +1844,13 @@ public boolean hasStartPos() { * *
                    * Position indicating the start of the claim in the answer candidate,
            -       * measured in bytes.
            +       * measured in bytes. Note that this is not measured in characters and,
            +       * therefore, must be rendered in the user interface keeping in mind that
            +       * some characters may take more than one byte. For example,
            +       * if the claim text contains non-ASCII characters, the start and end
            +       * positions vary when measured in characters
            +       * (programming-language-dependent) and when measured in bytes
            +       * (programming-language-independent).
                    * 
            * * optional int32 start_pos = 1; @@ -1726,7 +1867,13 @@ public int getStartPos() { * *
                    * Position indicating the start of the claim in the answer candidate,
            -       * measured in bytes.
            +       * measured in bytes. Note that this is not measured in characters and,
            +       * therefore, must be rendered in the user interface keeping in mind that
            +       * some characters may take more than one byte. For example,
            +       * if the claim text contains non-ASCII characters, the start and end
            +       * positions vary when measured in characters
            +       * (programming-language-dependent) and when measured in bytes
            +       * (programming-language-independent).
                    * 
            * * optional int32 start_pos = 1; @@ -1747,7 +1894,13 @@ public Builder setStartPos(int value) { * *
                    * Position indicating the start of the claim in the answer candidate,
            -       * measured in bytes.
            +       * measured in bytes. Note that this is not measured in characters and,
            +       * therefore, must be rendered in the user interface keeping in mind that
            +       * some characters may take more than one byte. For example,
            +       * if the claim text contains non-ASCII characters, the start and end
            +       * positions vary when measured in characters
            +       * (programming-language-dependent) and when measured in bytes
            +       * (programming-language-independent).
                    * 
            * * optional int32 start_pos = 1; @@ -1768,7 +1921,11 @@ public Builder clearStartPos() { * *
                    * Position indicating the end of the claim in the answer candidate,
            -       * exclusive.
            +       * exclusive, in bytes. Note that this is not measured in characters and,
            +       * therefore, must be rendered as such. For example, if the claim text
            +       * contains non-ASCII characters, the start and end positions vary when
            +       * measured in characters (programming-language-dependent) and when measured
            +       * in bytes (programming-language-independent).
                    * 
            * * optional int32 end_pos = 2; @@ -1785,7 +1942,11 @@ public boolean hasEndPos() { * *
                    * Position indicating the end of the claim in the answer candidate,
            -       * exclusive.
            +       * exclusive, in bytes. Note that this is not measured in characters and,
            +       * therefore, must be rendered as such. For example, if the claim text
            +       * contains non-ASCII characters, the start and end positions vary when
            +       * measured in characters (programming-language-dependent) and when measured
            +       * in bytes (programming-language-independent).
                    * 
            * * optional int32 end_pos = 2; @@ -1802,7 +1963,11 @@ public int getEndPos() { * *
                    * Position indicating the end of the claim in the answer candidate,
            -       * exclusive.
            +       * exclusive, in bytes. Note that this is not measured in characters and,
            +       * therefore, must be rendered as such. For example, if the claim text
            +       * contains non-ASCII characters, the start and end positions vary when
            +       * measured in characters (programming-language-dependent) and when measured
            +       * in bytes (programming-language-independent).
                    * 
            * * optional int32 end_pos = 2; @@ -1823,7 +1988,11 @@ public Builder setEndPos(int value) { * *
                    * Position indicating the end of the claim in the answer candidate,
            -       * exclusive.
            +       * exclusive, in bytes. Note that this is not measured in characters and,
            +       * therefore, must be rendered as such. For example, if the claim text
            +       * contains non-ASCII characters, the start and end positions vary when
            +       * measured in characters (programming-language-dependent) and when measured
            +       * in bytes (programming-language-independent).
                    * 
            * * optional int32 end_pos = 2; @@ -2128,10 +2297,7 @@ public Builder clearCitationIndices() { * decided this claim doesn't require attribution/grounding check, this * field will be set to false. In that case, no grounding check was done for * the claim and therefore - * [citation_indices][google.cloud.discoveryengine.v1beta.CheckGroundingResponse.Claim.citation_indices], - * [anti_citation_indices][google.cloud.discoveryengine.v1beta.CheckGroundingResponse.Claim.anti_citation_indices], - * and - * [score][google.cloud.discoveryengine.v1beta.CheckGroundingResponse.Claim.score] + * [citation_indices][google.cloud.discoveryengine.v1beta.CheckGroundingResponse.Claim.citation_indices] * should not be returned. *
            * @@ -2152,10 +2318,7 @@ public boolean hasGroundingCheckRequired() { * decided this claim doesn't require attribution/grounding check, this * field will be set to false. In that case, no grounding check was done for * the claim and therefore - * [citation_indices][google.cloud.discoveryengine.v1beta.CheckGroundingResponse.Claim.citation_indices], - * [anti_citation_indices][google.cloud.discoveryengine.v1beta.CheckGroundingResponse.Claim.anti_citation_indices], - * and - * [score][google.cloud.discoveryengine.v1beta.CheckGroundingResponse.Claim.score] + * [citation_indices][google.cloud.discoveryengine.v1beta.CheckGroundingResponse.Claim.citation_indices] * should not be returned. *
            * @@ -2176,10 +2339,7 @@ public boolean getGroundingCheckRequired() { * decided this claim doesn't require attribution/grounding check, this * field will be set to false. In that case, no grounding check was done for * the claim and therefore - * [citation_indices][google.cloud.discoveryengine.v1beta.CheckGroundingResponse.Claim.citation_indices], - * [anti_citation_indices][google.cloud.discoveryengine.v1beta.CheckGroundingResponse.Claim.anti_citation_indices], - * and - * [score][google.cloud.discoveryengine.v1beta.CheckGroundingResponse.Claim.score] + * [citation_indices][google.cloud.discoveryengine.v1beta.CheckGroundingResponse.Claim.citation_indices] * should not be returned. *
            * @@ -2204,10 +2364,7 @@ public Builder setGroundingCheckRequired(boolean value) { * decided this claim doesn't require attribution/grounding check, this * field will be set to false. In that case, no grounding check was done for * the claim and therefore - * [citation_indices][google.cloud.discoveryengine.v1beta.CheckGroundingResponse.Claim.citation_indices], - * [anti_citation_indices][google.cloud.discoveryengine.v1beta.CheckGroundingResponse.Claim.anti_citation_indices], - * and - * [score][google.cloud.discoveryengine.v1beta.CheckGroundingResponse.Claim.score] + * [citation_indices][google.cloud.discoveryengine.v1beta.CheckGroundingResponse.Claim.citation_indices] * should not be returned. *
            * @@ -2222,6 +2379,86 @@ public Builder clearGroundingCheckRequired() { return this; } + private double score_; + + /** + * + * + *
            +       * Confidence score for the claim in the answer candidate, in the range of
            +       * [0, 1]. This is set only when
            +       * `CheckGroundingRequest.grounding_spec.enable_claim_level_score` is true.
            +       * 
            + * + * optional double score = 7; + * + * @return Whether the score field is set. + */ + @java.lang.Override + public boolean hasScore() { + return ((bitField0_ & 0x00000020) != 0); + } + + /** + * + * + *
            +       * Confidence score for the claim in the answer candidate, in the range of
            +       * [0, 1]. This is set only when
            +       * `CheckGroundingRequest.grounding_spec.enable_claim_level_score` is true.
            +       * 
            + * + * optional double score = 7; + * + * @return The score. + */ + @java.lang.Override + public double getScore() { + return score_; + } + + /** + * + * + *
            +       * Confidence score for the claim in the answer candidate, in the range of
            +       * [0, 1]. This is set only when
            +       * `CheckGroundingRequest.grounding_spec.enable_claim_level_score` is true.
            +       * 
            + * + * optional double score = 7; + * + * @param value The score to set. + * @return This builder for chaining. + */ + public Builder setScore(double value) { + + score_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
            +       * Confidence score for the claim in the answer candidate, in the range of
            +       * [0, 1]. This is set only when
            +       * `CheckGroundingRequest.grounding_spec.enable_claim_level_score` is true.
            +       * 
            + * + * optional double score = 7; + * + * @return This builder for chaining. + */ + public Builder clearScore() { + bitField0_ = (bitField0_ & ~0x00000020); + score_ = 0D; + onChanged(); + return this; + } + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.CheckGroundingResponse.Claim) } diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/CheckGroundingSpec.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/CheckGroundingSpec.java index 56c2a78589ca..0742307eedb1 100644 --- a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/CheckGroundingSpec.java +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/CheckGroundingSpec.java @@ -112,6 +112,41 @@ public double getCitationThreshold() { return citationThreshold_; } + public static final int ENABLE_CLAIM_LEVEL_SCORE_FIELD_NUMBER = 4; + private boolean enableClaimLevelScore_ = false; + + /** + * + * + *
            +   * The control flag that enables claim-level grounding score in the response.
            +   * 
            + * + * optional bool enable_claim_level_score = 4; + * + * @return Whether the enableClaimLevelScore field is set. + */ + @java.lang.Override + public boolean hasEnableClaimLevelScore() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
            +   * The control flag that enables claim-level grounding score in the response.
            +   * 
            + * + * optional bool enable_claim_level_score = 4; + * + * @return The enableClaimLevelScore. + */ + @java.lang.Override + public boolean getEnableClaimLevelScore() { + return enableClaimLevelScore_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -129,6 +164,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { output.writeDouble(1, citationThreshold_); } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeBool(4, enableClaimLevelScore_); + } getUnknownFields().writeTo(output); } @@ -141,6 +179,9 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeDoubleSize(1, citationThreshold_); } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(4, enableClaimLevelScore_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -162,6 +203,10 @@ public boolean equals(final java.lang.Object obj) { if (java.lang.Double.doubleToLongBits(getCitationThreshold()) != java.lang.Double.doubleToLongBits(other.getCitationThreshold())) return false; } + if (hasEnableClaimLevelScore() != other.hasEnableClaimLevelScore()) return false; + if (hasEnableClaimLevelScore()) { + if (getEnableClaimLevelScore() != other.getEnableClaimLevelScore()) return false; + } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -180,6 +225,10 @@ public int hashCode() { + com.google.protobuf.Internal.hashLong( java.lang.Double.doubleToLongBits(getCitationThreshold())); } + if (hasEnableClaimLevelScore()) { + hash = (37 * hash) + ENABLE_CLAIM_LEVEL_SCORE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getEnableClaimLevelScore()); + } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -322,6 +371,7 @@ public Builder clear() { super.clear(); bitField0_ = 0; citationThreshold_ = 0D; + enableClaimLevelScore_ = false; return this; } @@ -363,6 +413,10 @@ private void buildPartial0(com.google.cloud.discoveryengine.v1beta.CheckGroundin result.citationThreshold_ = citationThreshold_; to_bitField0_ |= 0x00000001; } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.enableClaimLevelScore_ = enableClaimLevelScore_; + to_bitField0_ |= 0x00000002; + } result.bitField0_ |= to_bitField0_; } @@ -382,6 +436,9 @@ public Builder mergeFrom(com.google.cloud.discoveryengine.v1beta.CheckGroundingS if (other.hasCitationThreshold()) { setCitationThreshold(other.getCitationThreshold()); } + if (other.hasEnableClaimLevelScore()) { + setEnableClaimLevelScore(other.getEnableClaimLevelScore()); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -414,6 +471,12 @@ public Builder mergeFrom( bitField0_ |= 0x00000001; break; } // case 9 + case 32: + { + enableClaimLevelScore_ = input.readBool(); + bitField0_ |= 0x00000002; + break; + } // case 32 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -521,6 +584,78 @@ public Builder clearCitationThreshold() { return this; } + private boolean enableClaimLevelScore_; + + /** + * + * + *
            +     * The control flag that enables claim-level grounding score in the response.
            +     * 
            + * + * optional bool enable_claim_level_score = 4; + * + * @return Whether the enableClaimLevelScore field is set. + */ + @java.lang.Override + public boolean hasEnableClaimLevelScore() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
            +     * The control flag that enables claim-level grounding score in the response.
            +     * 
            + * + * optional bool enable_claim_level_score = 4; + * + * @return The enableClaimLevelScore. + */ + @java.lang.Override + public boolean getEnableClaimLevelScore() { + return enableClaimLevelScore_; + } + + /** + * + * + *
            +     * The control flag that enables claim-level grounding score in the response.
            +     * 
            + * + * optional bool enable_claim_level_score = 4; + * + * @param value The enableClaimLevelScore to set. + * @return This builder for chaining. + */ + public Builder setEnableClaimLevelScore(boolean value) { + + enableClaimLevelScore_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
            +     * The control flag that enables claim-level grounding score in the response.
            +     * 
            + * + * optional bool enable_claim_level_score = 4; + * + * @return This builder for chaining. + */ + public Builder clearEnableClaimLevelScore() { + bitField0_ = (bitField0_ & ~0x00000002); + enableClaimLevelScore_ = false; + onChanged(); + return this; + } + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.CheckGroundingSpec) } diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/CheckGroundingSpecOrBuilder.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/CheckGroundingSpecOrBuilder.java index 7d9ef07aa8a0..0c365cf99430 100644 --- a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/CheckGroundingSpecOrBuilder.java +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/CheckGroundingSpecOrBuilder.java @@ -59,4 +59,30 @@ public interface CheckGroundingSpecOrBuilder * @return The citationThreshold. */ double getCitationThreshold(); + + /** + * + * + *
            +   * The control flag that enables claim-level grounding score in the response.
            +   * 
            + * + * optional bool enable_claim_level_score = 4; + * + * @return Whether the enableClaimLevelScore field is set. + */ + boolean hasEnableClaimLevelScore(); + + /** + * + * + *
            +   * The control flag that enables claim-level grounding score in the response.
            +   * 
            + * + * optional bool enable_claim_level_score = 4; + * + * @return The enableClaimLevelScore. + */ + boolean getEnableClaimLevelScore(); } diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/Chunk.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/Chunk.java index 2b4ef81a64f4..86112c4138c7 100644 --- a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/Chunk.java +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/Chunk.java @@ -56,6 +56,9 @@ private Chunk() { name_ = ""; id_ = ""; content_ = ""; + dataUrls_ = com.google.protobuf.LazyStringArrayList.emptyList(); + annotationContents_ = com.google.protobuf.LazyStringArrayList.emptyList(); + annotationMetadata_ = java.util.Collections.emptyList(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @@ -73,6 +76,198 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { com.google.cloud.discoveryengine.v1beta.Chunk.Builder.class); } + /** + * + * + *
            +   * Defines the types of the structured content that can be extracted.
            +   * 
            + * + * Protobuf enum {@code google.cloud.discoveryengine.v1beta.Chunk.StructureType} + */ + public enum StructureType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
            +     * Default value.
            +     * 
            + * + * STRUCTURE_TYPE_UNSPECIFIED = 0; + */ + STRUCTURE_TYPE_UNSPECIFIED(0), + /** + * + * + *
            +     * Shareholder structure.
            +     * 
            + * + * SHAREHOLDER_STRUCTURE = 1; + */ + SHAREHOLDER_STRUCTURE(1), + /** + * + * + *
            +     * Signature structure.
            +     * 
            + * + * SIGNATURE_STRUCTURE = 2; + */ + SIGNATURE_STRUCTURE(2), + /** + * + * + *
            +     * Checkbox structure.
            +     * 
            + * + * CHECKBOX_STRUCTURE = 3; + */ + CHECKBOX_STRUCTURE(3), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "StructureType"); + } + + /** + * + * + *
            +     * Default value.
            +     * 
            + * + * STRUCTURE_TYPE_UNSPECIFIED = 0; + */ + public static final int STRUCTURE_TYPE_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
            +     * Shareholder structure.
            +     * 
            + * + * SHAREHOLDER_STRUCTURE = 1; + */ + public static final int SHAREHOLDER_STRUCTURE_VALUE = 1; + + /** + * + * + *
            +     * Signature structure.
            +     * 
            + * + * SIGNATURE_STRUCTURE = 2; + */ + public static final int SIGNATURE_STRUCTURE_VALUE = 2; + + /** + * + * + *
            +     * Checkbox structure.
            +     * 
            + * + * CHECKBOX_STRUCTURE = 3; + */ + public static final int CHECKBOX_STRUCTURE_VALUE = 3; + + 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 StructureType 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 StructureType forNumber(int value) { + switch (value) { + case 0: + return STRUCTURE_TYPE_UNSPECIFIED; + case 1: + return SHAREHOLDER_STRUCTURE; + case 2: + return SIGNATURE_STRUCTURE; + case 3: + return CHECKBOX_STRUCTURE; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public StructureType findValueByNumber(int number) { + return StructureType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.Chunk.getDescriptor().getEnumTypes().get(0); + } + + private static final StructureType[] VALUES = values(); + + public static StructureType valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private StructureType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.discoveryengine.v1beta.Chunk.StructureType) + } + public interface DocumentMetadataOrBuilder extends // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.Chunk.DocumentMetadata) @@ -130,6 +325,34 @@ public interface DocumentMetadataOrBuilder */ com.google.protobuf.ByteString getTitleBytes(); + /** + * + * + *
            +     * The mime type of the document.
            +     * https://www.iana.org/assignments/media-types/media-types.xhtml.
            +     * 
            + * + * string mime_type = 4; + * + * @return The mimeType. + */ + java.lang.String getMimeType(); + + /** + * + * + *
            +     * The mime type of the document.
            +     * https://www.iana.org/assignments/media-types/media-types.xhtml.
            +     * 
            + * + * string mime_type = 4; + * + * @return The bytes for mimeType. + */ + com.google.protobuf.ByteString getMimeTypeBytes(); + /** * * @@ -211,6 +434,7 @@ private DocumentMetadata(com.google.protobuf.GeneratedMessage.Builder builder private DocumentMetadata() { uri_ = ""; title_ = ""; + mimeType_ = ""; } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @@ -335,6 +559,61 @@ public com.google.protobuf.ByteString getTitleBytes() { } } + public static final int MIME_TYPE_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object mimeType_ = ""; + + /** + * + * + *
            +     * The mime type of the document.
            +     * https://www.iana.org/assignments/media-types/media-types.xhtml.
            +     * 
            + * + * string mime_type = 4; + * + * @return The mimeType. + */ + @java.lang.Override + public java.lang.String getMimeType() { + java.lang.Object ref = mimeType_; + 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(); + mimeType_ = s; + return s; + } + } + + /** + * + * + *
            +     * The mime type of the document.
            +     * https://www.iana.org/assignments/media-types/media-types.xhtml.
            +     * 
            + * + * string mime_type = 4; + * + * @return The bytes for mimeType. + */ + @java.lang.Override + public com.google.protobuf.ByteString getMimeTypeBytes() { + java.lang.Object ref = mimeType_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + mimeType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + public static final int STRUCT_DATA_FIELD_NUMBER = 3; private com.google.protobuf.Struct structData_; @@ -416,6 +695,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(3, getStructData()); } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(mimeType_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, mimeType_); + } getUnknownFields().writeTo(output); } @@ -434,6 +716,9 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getStructData()); } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(mimeType_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, mimeType_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -452,6 +737,7 @@ public boolean equals(final java.lang.Object obj) { if (!getUri().equals(other.getUri())) return false; if (!getTitle().equals(other.getTitle())) return false; + if (!getMimeType().equals(other.getMimeType())) return false; if (hasStructData() != other.hasStructData()) return false; if (hasStructData()) { if (!getStructData().equals(other.getStructData())) return false; @@ -471,6 +757,8 @@ public int hashCode() { hash = (53 * hash) + getUri().hashCode(); hash = (37 * hash) + TITLE_FIELD_NUMBER; hash = (53 * hash) + getTitle().hashCode(); + hash = (37 * hash) + MIME_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getMimeType().hashCode(); if (hasStructData()) { hash = (37 * hash) + STRUCT_DATA_FIELD_NUMBER; hash = (53 * hash) + getStructData().hashCode(); @@ -628,6 +916,7 @@ public Builder clear() { bitField0_ = 0; uri_ = ""; title_ = ""; + mimeType_ = ""; structData_ = null; if (structDataBuilder_ != null) { structDataBuilder_.dispose(); @@ -677,8 +966,11 @@ private void buildPartial0( if (((from_bitField0_ & 0x00000002) != 0)) { result.title_ = title_; } - int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000004) != 0)) { + result.mimeType_ = mimeType_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000008) != 0)) { result.structData_ = structDataBuilder_ == null ? structData_ : structDataBuilder_.build(); to_bitField0_ |= 0x00000001; @@ -711,6 +1003,11 @@ public Builder mergeFrom( bitField0_ |= 0x00000002; onChanged(); } + if (!other.getMimeType().isEmpty()) { + mimeType_ = other.mimeType_; + bitField0_ |= 0x00000004; + onChanged(); + } if (other.hasStructData()) { mergeStructData(other.getStructData()); } @@ -756,9 +1053,15 @@ public Builder mergeFrom( { input.readMessage( internalGetStructDataFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000008; break; } // case 26 + case 34: + { + mimeType_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 34 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -1000,52 +1303,53 @@ public Builder setTitleBytes(com.google.protobuf.ByteString value) { return this; } - private com.google.protobuf.Struct structData_; - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Struct, - com.google.protobuf.Struct.Builder, - com.google.protobuf.StructOrBuilder> - structDataBuilder_; + private java.lang.Object mimeType_ = ""; /** * * *
            -       * Data representation.
            -       * The structured JSON data for the document. It should conform to the
            -       * registered [Schema][google.cloud.discoveryengine.v1beta.Schema] or an
            -       * `INVALID_ARGUMENT` error is thrown.
            +       * The mime type of the document.
            +       * https://www.iana.org/assignments/media-types/media-types.xhtml.
                    * 
            * - * .google.protobuf.Struct struct_data = 3; + * string mime_type = 4; * - * @return Whether the structData field is set. + * @return The mimeType. */ - public boolean hasStructData() { - return ((bitField0_ & 0x00000004) != 0); + public java.lang.String getMimeType() { + java.lang.Object ref = mimeType_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + mimeType_ = s; + return s; + } else { + return (java.lang.String) ref; + } } /** * * *
            -       * Data representation.
            -       * The structured JSON data for the document. It should conform to the
            -       * registered [Schema][google.cloud.discoveryengine.v1beta.Schema] or an
            -       * `INVALID_ARGUMENT` error is thrown.
            +       * The mime type of the document.
            +       * https://www.iana.org/assignments/media-types/media-types.xhtml.
                    * 
            * - * .google.protobuf.Struct struct_data = 3; + * string mime_type = 4; * - * @return The structData. + * @return The bytes for mimeType. */ - public com.google.protobuf.Struct getStructData() { - if (structDataBuilder_ == null) { - return structData_ == null - ? com.google.protobuf.Struct.getDefaultInstance() - : structData_; + public com.google.protobuf.ByteString getMimeTypeBytes() { + java.lang.Object ref = mimeType_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + mimeType_ = b; + return b; } else { - return structDataBuilder_.getMessage(); + return (com.google.protobuf.ByteString) ref; } } @@ -1053,23 +1357,20 @@ public com.google.protobuf.Struct getStructData() { * * *
            -       * Data representation.
            -       * The structured JSON data for the document. It should conform to the
            -       * registered [Schema][google.cloud.discoveryengine.v1beta.Schema] or an
            -       * `INVALID_ARGUMENT` error is thrown.
            +       * The mime type of the document.
            +       * https://www.iana.org/assignments/media-types/media-types.xhtml.
                    * 
            * - * .google.protobuf.Struct struct_data = 3; + * string mime_type = 4; + * + * @param value The mimeType to set. + * @return This builder for chaining. */ - public Builder setStructData(com.google.protobuf.Struct value) { - if (structDataBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - structData_ = value; - } else { - structDataBuilder_.setMessage(value); + public Builder setMimeType(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); } + mimeType_ = value; bitField0_ |= 0x00000004; onChanged(); return this; @@ -1079,21 +1380,17 @@ public Builder setStructData(com.google.protobuf.Struct value) { * * *
            -       * Data representation.
            -       * The structured JSON data for the document. It should conform to the
            -       * registered [Schema][google.cloud.discoveryengine.v1beta.Schema] or an
            -       * `INVALID_ARGUMENT` error is thrown.
            +       * The mime type of the document.
            +       * https://www.iana.org/assignments/media-types/media-types.xhtml.
                    * 
            * - * .google.protobuf.Struct struct_data = 3; + * string mime_type = 4; + * + * @return This builder for chaining. */ - public Builder setStructData(com.google.protobuf.Struct.Builder builderForValue) { - if (structDataBuilder_ == null) { - structData_ = builderForValue.build(); - } else { - structDataBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000004; + public Builder clearMimeType() { + mimeType_ = getDefaultInstance().getMimeType(); + bitField0_ = (bitField0_ & ~0x00000004); onChanged(); return this; } @@ -1102,17 +1399,139 @@ public Builder setStructData(com.google.protobuf.Struct.Builder builderForValue) * * *
            -       * Data representation.
            -       * The structured JSON data for the document. It should conform to the
            -       * registered [Schema][google.cloud.discoveryengine.v1beta.Schema] or an
            -       * `INVALID_ARGUMENT` error is thrown.
            +       * The mime type of the document.
            +       * https://www.iana.org/assignments/media-types/media-types.xhtml.
                    * 
            * - * .google.protobuf.Struct struct_data = 3; + * string mime_type = 4; + * + * @param value The bytes for mimeType to set. + * @return This builder for chaining. + */ + public Builder setMimeTypeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + mimeType_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private com.google.protobuf.Struct structData_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Struct, + com.google.protobuf.Struct.Builder, + com.google.protobuf.StructOrBuilder> + structDataBuilder_; + + /** + * + * + *
            +       * Data representation.
            +       * The structured JSON data for the document. It should conform to the
            +       * registered [Schema][google.cloud.discoveryengine.v1beta.Schema] or an
            +       * `INVALID_ARGUMENT` error is thrown.
            +       * 
            + * + * .google.protobuf.Struct struct_data = 3; + * + * @return Whether the structData field is set. + */ + public boolean hasStructData() { + return ((bitField0_ & 0x00000008) != 0); + } + + /** + * + * + *
            +       * Data representation.
            +       * The structured JSON data for the document. It should conform to the
            +       * registered [Schema][google.cloud.discoveryengine.v1beta.Schema] or an
            +       * `INVALID_ARGUMENT` error is thrown.
            +       * 
            + * + * .google.protobuf.Struct struct_data = 3; + * + * @return The structData. + */ + public com.google.protobuf.Struct getStructData() { + if (structDataBuilder_ == null) { + return structData_ == null + ? com.google.protobuf.Struct.getDefaultInstance() + : structData_; + } else { + return structDataBuilder_.getMessage(); + } + } + + /** + * + * + *
            +       * Data representation.
            +       * The structured JSON data for the document. It should conform to the
            +       * registered [Schema][google.cloud.discoveryengine.v1beta.Schema] or an
            +       * `INVALID_ARGUMENT` error is thrown.
            +       * 
            + * + * .google.protobuf.Struct struct_data = 3; + */ + public Builder setStructData(com.google.protobuf.Struct value) { + if (structDataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + structData_ = value; + } else { + structDataBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
            +       * Data representation.
            +       * The structured JSON data for the document. It should conform to the
            +       * registered [Schema][google.cloud.discoveryengine.v1beta.Schema] or an
            +       * `INVALID_ARGUMENT` error is thrown.
            +       * 
            + * + * .google.protobuf.Struct struct_data = 3; + */ + public Builder setStructData(com.google.protobuf.Struct.Builder builderForValue) { + if (structDataBuilder_ == null) { + structData_ = builderForValue.build(); + } else { + structDataBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
            +       * Data representation.
            +       * The structured JSON data for the document. It should conform to the
            +       * registered [Schema][google.cloud.discoveryengine.v1beta.Schema] or an
            +       * `INVALID_ARGUMENT` error is thrown.
            +       * 
            + * + * .google.protobuf.Struct struct_data = 3; */ public Builder mergeStructData(com.google.protobuf.Struct value) { if (structDataBuilder_ == null) { - if (((bitField0_ & 0x00000004) != 0) + if (((bitField0_ & 0x00000008) != 0) && structData_ != null && structData_ != com.google.protobuf.Struct.getDefaultInstance()) { getStructDataBuilder().mergeFrom(value); @@ -1123,7 +1542,7 @@ public Builder mergeStructData(com.google.protobuf.Struct value) { structDataBuilder_.mergeFrom(value); } if (structData_ != null) { - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000008; onChanged(); } return this; @@ -1142,7 +1561,7 @@ public Builder mergeStructData(com.google.protobuf.Struct value) { * .google.protobuf.Struct struct_data = 3; */ public Builder clearStructData() { - bitField0_ = (bitField0_ & ~0x00000004); + bitField0_ = (bitField0_ & ~0x00000008); structData_ = null; if (structDataBuilder_ != null) { structDataBuilder_.dispose(); @@ -1165,7 +1584,7 @@ public Builder clearStructData() { * .google.protobuf.Struct struct_data = 3; */ public com.google.protobuf.Struct.Builder getStructDataBuilder() { - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000008; onChanged(); return internalGetStructDataFieldBuilder().getBuilder(); } @@ -3668,1014 +4087,4065 @@ public com.google.cloud.discoveryengine.v1beta.Chunk.ChunkMetadata getDefaultIns } } - private int bitField0_; - public static final int NAME_FIELD_NUMBER = 1; + public interface StructuredContentOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.Chunk.StructuredContent) + com.google.protobuf.MessageOrBuilder { - @SuppressWarnings("serial") - private volatile java.lang.Object name_ = ""; + /** + * + * + *
            +     * Output only. The structure type of the structured content.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Chunk.StructureType structure_type = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for structureType. + */ + int getStructureTypeValue(); - /** - * - * - *
            -   * The full resource name of the chunk.
            -   * Format:
            -   * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document_id}/chunks/{chunk_id}`.
            -   *
            -   * This field must be a UTF-8 encoded string with a length limit of 1024
            -   * characters.
            -   * 
            - * - * string name = 1; - * - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - 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(); - name_ = s; - return s; - } + /** + * + * + *
            +     * Output only. The structure type of the structured content.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Chunk.StructureType structure_type = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The structureType. + */ + com.google.cloud.discoveryengine.v1beta.Chunk.StructureType getStructureType(); + + /** + * + * + *
            +     * Output only. The content of the structured content.
            +     * 
            + * + * string content = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The content. + */ + java.lang.String getContent(); + + /** + * + * + *
            +     * Output only. The content of the structured content.
            +     * 
            + * + * string content = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for content. + */ + com.google.protobuf.ByteString getContentBytes(); } /** * * *
            -   * The full resource name of the chunk.
            -   * Format:
            -   * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document_id}/chunks/{chunk_id}`.
            -   *
            -   * This field must be a UTF-8 encoded string with a length limit of 1024
            -   * characters.
            +   * The structured content information.
                * 
            * - * string name = 1; - * - * @return The bytes for name. + * Protobuf type {@code google.cloud.discoveryengine.v1beta.Chunk.StructuredContent} */ - @java.lang.Override - public com.google.protobuf.ByteString getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; + public static final class StructuredContent extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.Chunk.StructuredContent) + StructuredContentOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "StructuredContent"); } - } - public static final int ID_FIELD_NUMBER = 2; + // Use StructuredContent.newBuilder() to construct. + private StructuredContent(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } - @SuppressWarnings("serial") - private volatile java.lang.Object id_ = ""; + private StructuredContent() { + structureType_ = 0; + content_ = ""; + } - /** - * - * - *
            -   * Unique chunk ID of the current chunk.
            -   * 
            - * - * string id = 2; - * - * @return The id. - */ - @java.lang.Override - public java.lang.String getId() { - java.lang.Object ref = id_; - 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(); - id_ = s; - return s; + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.ChunkProto + .internal_static_google_cloud_discoveryengine_v1beta_Chunk_StructuredContent_descriptor; } - } - /** - * - * - *
            -   * Unique chunk ID of the current chunk.
            -   * 
            - * - * string id = 2; - * - * @return The bytes for id. - */ - @java.lang.Override - public com.google.protobuf.ByteString getIdBytes() { - java.lang.Object ref = id_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - id_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.ChunkProto + .internal_static_google_cloud_discoveryengine_v1beta_Chunk_StructuredContent_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.Chunk.StructuredContent.class, + com.google.cloud.discoveryengine.v1beta.Chunk.StructuredContent.Builder.class); } - } - public static final int CONTENT_FIELD_NUMBER = 3; - - @SuppressWarnings("serial") - private volatile java.lang.Object content_ = ""; + public static final int STRUCTURE_TYPE_FIELD_NUMBER = 1; + private int structureType_ = 0; - /** - * - * - *
            -   * Content is a string from a document (parsed content).
            -   * 
            - * - * string content = 3; - * - * @return The content. - */ - @java.lang.Override - public java.lang.String getContent() { - java.lang.Object ref = content_; - 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(); - content_ = s; - return s; + /** + * + * + *
            +     * Output only. The structure type of the structured content.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Chunk.StructureType structure_type = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for structureType. + */ + @java.lang.Override + public int getStructureTypeValue() { + return structureType_; } - } - /** - * - * - *
            -   * Content is a string from a document (parsed content).
            -   * 
            - * - * string content = 3; - * - * @return The bytes for content. - */ - @java.lang.Override - public com.google.protobuf.ByteString getContentBytes() { - java.lang.Object ref = content_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - content_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; + /** + * + * + *
            +     * Output only. The structure type of the structured content.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Chunk.StructureType structure_type = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The structureType. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Chunk.StructureType getStructureType() { + com.google.cloud.discoveryengine.v1beta.Chunk.StructureType result = + com.google.cloud.discoveryengine.v1beta.Chunk.StructureType.forNumber(structureType_); + return result == null + ? com.google.cloud.discoveryengine.v1beta.Chunk.StructureType.UNRECOGNIZED + : result; } - } - public static final int RELEVANCE_SCORE_FIELD_NUMBER = 8; - private double relevanceScore_ = 0D; + public static final int CONTENT_FIELD_NUMBER = 2; - /** - * - * - *
            -   * Output only. Represents the relevance score based on similarity.
            -   * Higher score indicates higher chunk relevance.
            -   * The score is in range [-1.0, 1.0].
            -   * Only populated on [SearchService.SearchResponse][].
            -   * 
            - * - * optional double relevance_score = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return Whether the relevanceScore field is set. - */ - @java.lang.Override - public boolean hasRelevanceScore() { - return ((bitField0_ & 0x00000001) != 0); - } + @SuppressWarnings("serial") + private volatile java.lang.Object content_ = ""; - /** - * - * - *
            -   * Output only. Represents the relevance score based on similarity.
            -   * Higher score indicates higher chunk relevance.
            -   * The score is in range [-1.0, 1.0].
            -   * Only populated on [SearchService.SearchResponse][].
            -   * 
            - * - * optional double relevance_score = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The relevanceScore. - */ - @java.lang.Override - public double getRelevanceScore() { - return relevanceScore_; - } + /** + * + * + *
            +     * Output only. The content of the structured content.
            +     * 
            + * + * string content = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The content. + */ + @java.lang.Override + public java.lang.String getContent() { + java.lang.Object ref = content_; + 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(); + content_ = s; + return s; + } + } - public static final int DOCUMENT_METADATA_FIELD_NUMBER = 5; - private com.google.cloud.discoveryengine.v1beta.Chunk.DocumentMetadata documentMetadata_; + /** + * + * + *
            +     * Output only. The content of the structured content.
            +     * 
            + * + * string content = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for content. + */ + @java.lang.Override + public com.google.protobuf.ByteString getContentBytes() { + java.lang.Object ref = content_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + content_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } - /** - * - * - *
            -   * Metadata of the document from the current chunk.
            -   * 
            - * - * .google.cloud.discoveryengine.v1beta.Chunk.DocumentMetadata document_metadata = 5; - * - * @return Whether the documentMetadata field is set. - */ - @java.lang.Override - public boolean hasDocumentMetadata() { - return ((bitField0_ & 0x00000002) != 0); - } + private byte memoizedIsInitialized = -1; - /** - * - * - *
            -   * Metadata of the document from the current chunk.
            -   * 
            - * - * .google.cloud.discoveryengine.v1beta.Chunk.DocumentMetadata document_metadata = 5; - * - * @return The documentMetadata. - */ - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.Chunk.DocumentMetadata getDocumentMetadata() { - return documentMetadata_ == null - ? com.google.cloud.discoveryengine.v1beta.Chunk.DocumentMetadata.getDefaultInstance() - : documentMetadata_; - } + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; - /** - * - * - *
            -   * Metadata of the document from the current chunk.
            -   * 
            - * - * .google.cloud.discoveryengine.v1beta.Chunk.DocumentMetadata document_metadata = 5; - */ - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.Chunk.DocumentMetadataOrBuilder - getDocumentMetadataOrBuilder() { - return documentMetadata_ == null - ? com.google.cloud.discoveryengine.v1beta.Chunk.DocumentMetadata.getDefaultInstance() - : documentMetadata_; - } + memoizedIsInitialized = 1; + return true; + } - public static final int DERIVED_STRUCT_DATA_FIELD_NUMBER = 4; - private com.google.protobuf.Struct derivedStructData_; + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (structureType_ + != com.google.cloud.discoveryengine.v1beta.Chunk.StructureType.STRUCTURE_TYPE_UNSPECIFIED + .getNumber()) { + output.writeEnum(1, structureType_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(content_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, content_); + } + getUnknownFields().writeTo(output); + } - /** - * - * - *
            -   * Output only. This field is OUTPUT_ONLY.
            -   * It contains derived data that are not in the original input document.
            -   * 
            - * - * - * .google.protobuf.Struct derived_struct_data = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the derivedStructData field is set. - */ - @java.lang.Override - public boolean hasDerivedStructData() { - return ((bitField0_ & 0x00000004) != 0); - } + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; - /** - * - * - *
            -   * Output only. This field is OUTPUT_ONLY.
            -   * It contains derived data that are not in the original input document.
            -   * 
            - * - * - * .google.protobuf.Struct derived_struct_data = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The derivedStructData. - */ - @java.lang.Override - public com.google.protobuf.Struct getDerivedStructData() { - return derivedStructData_ == null - ? com.google.protobuf.Struct.getDefaultInstance() - : derivedStructData_; - } + size = 0; + if (structureType_ + != com.google.cloud.discoveryengine.v1beta.Chunk.StructureType.STRUCTURE_TYPE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, structureType_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(content_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, content_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } - /** - * - * - *
            -   * Output only. This field is OUTPUT_ONLY.
            -   * It contains derived data that are not in the original input document.
            -   * 
            - * - * - * .google.protobuf.Struct derived_struct_data = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.protobuf.StructOrBuilder getDerivedStructDataOrBuilder() { - return derivedStructData_ == null - ? com.google.protobuf.Struct.getDefaultInstance() - : derivedStructData_; - } + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.discoveryengine.v1beta.Chunk.StructuredContent)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1beta.Chunk.StructuredContent other = + (com.google.cloud.discoveryengine.v1beta.Chunk.StructuredContent) obj; - public static final int PAGE_SPAN_FIELD_NUMBER = 6; - private com.google.cloud.discoveryengine.v1beta.Chunk.PageSpan pageSpan_; + if (structureType_ != other.structureType_) return false; + if (!getContent().equals(other.getContent())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } - /** - * - * - *
            -   * Page span of the chunk.
            -   * 
            - * - * .google.cloud.discoveryengine.v1beta.Chunk.PageSpan page_span = 6; - * - * @return Whether the pageSpan field is set. - */ - @java.lang.Override - public boolean hasPageSpan() { - return ((bitField0_ & 0x00000008) != 0); - } + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + STRUCTURE_TYPE_FIELD_NUMBER; + hash = (53 * hash) + structureType_; + hash = (37 * hash) + CONTENT_FIELD_NUMBER; + hash = (53 * hash) + getContent().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } - /** - * - * - *
            -   * Page span of the chunk.
            -   * 
            - * - * .google.cloud.discoveryengine.v1beta.Chunk.PageSpan page_span = 6; - * - * @return The pageSpan. - */ - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.Chunk.PageSpan getPageSpan() { - return pageSpan_ == null - ? com.google.cloud.discoveryengine.v1beta.Chunk.PageSpan.getDefaultInstance() - : pageSpan_; - } + public static com.google.cloud.discoveryengine.v1beta.Chunk.StructuredContent parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - /** - * - * - *
            -   * Page span of the chunk.
            -   * 
            - * - * .google.cloud.discoveryengine.v1beta.Chunk.PageSpan page_span = 6; - */ - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.Chunk.PageSpanOrBuilder getPageSpanOrBuilder() { - return pageSpan_ == null - ? com.google.cloud.discoveryengine.v1beta.Chunk.PageSpan.getDefaultInstance() - : pageSpan_; - } + public static com.google.cloud.discoveryengine.v1beta.Chunk.StructuredContent parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - public static final int CHUNK_METADATA_FIELD_NUMBER = 7; - private com.google.cloud.discoveryengine.v1beta.Chunk.ChunkMetadata chunkMetadata_; + public static com.google.cloud.discoveryengine.v1beta.Chunk.StructuredContent parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - /** - * - * - *
            -   * Output only. Metadata of the current chunk.
            -   * 
            - * - * - * .google.cloud.discoveryengine.v1beta.Chunk.ChunkMetadata chunk_metadata = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the chunkMetadata field is set. - */ - @java.lang.Override - public boolean hasChunkMetadata() { - return ((bitField0_ & 0x00000010) != 0); - } + public static com.google.cloud.discoveryengine.v1beta.Chunk.StructuredContent parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - /** - * - * - *
            -   * Output only. Metadata of the current chunk.
            -   * 
            - * - * - * .google.cloud.discoveryengine.v1beta.Chunk.ChunkMetadata chunk_metadata = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The chunkMetadata. - */ - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.Chunk.ChunkMetadata getChunkMetadata() { - return chunkMetadata_ == null - ? com.google.cloud.discoveryengine.v1beta.Chunk.ChunkMetadata.getDefaultInstance() - : chunkMetadata_; - } + public static com.google.cloud.discoveryengine.v1beta.Chunk.StructuredContent parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - /** - * - * - *
            -   * Output only. Metadata of the current chunk.
            -   * 
            - * - * - * .google.cloud.discoveryengine.v1beta.Chunk.ChunkMetadata chunk_metadata = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.Chunk.ChunkMetadataOrBuilder - getChunkMetadataOrBuilder() { - return chunkMetadata_ == null - ? com.google.cloud.discoveryengine.v1beta.Chunk.ChunkMetadata.getDefaultInstance() - : chunkMetadata_; - } + public static com.google.cloud.discoveryengine.v1beta.Chunk.StructuredContent parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - private byte memoizedIsInitialized = -1; + public static com.google.cloud.discoveryengine.v1beta.Chunk.StructuredContent parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + public static com.google.cloud.discoveryengine.v1beta.Chunk.StructuredContent parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } - memoizedIsInitialized = 1; - return true; - } + public static com.google.cloud.discoveryengine.v1beta.Chunk.StructuredContent + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + public static com.google.cloud.discoveryengine.v1beta.Chunk.StructuredContent + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(id_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 2, id_); + + public static com.google.cloud.discoveryengine.v1beta.Chunk.StructuredContent parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(content_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 3, content_); + + public static com.google.cloud.discoveryengine.v1beta.Chunk.StructuredContent parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); } - if (((bitField0_ & 0x00000004) != 0)) { - output.writeMessage(4, getDerivedStructData()); + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); } - if (((bitField0_ & 0x00000002) != 0)) { - output.writeMessage(5, getDocumentMetadata()); + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); } - if (((bitField0_ & 0x00000008) != 0)) { - output.writeMessage(6, getPageSpan()); + + public static Builder newBuilder( + com.google.cloud.discoveryengine.v1beta.Chunk.StructuredContent prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } - if (((bitField0_ & 0x00000010) != 0)) { - output.writeMessage(7, getChunkMetadata()); + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); } - if (((bitField0_ & 0x00000001) != 0)) { - output.writeDouble(8, relevanceScore_); + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; } - getUnknownFields().writeTo(output); - } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; + /** + * + * + *
            +     * The structured content information.
            +     * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.Chunk.StructuredContent} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.Chunk.StructuredContent) + com.google.cloud.discoveryengine.v1beta.Chunk.StructuredContentOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.ChunkProto + .internal_static_google_cloud_discoveryengine_v1beta_Chunk_StructuredContent_descriptor; + } - size = 0; - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(id_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(2, id_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(content_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(3, content_); - } - if (((bitField0_ & 0x00000004) != 0)) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getDerivedStructData()); - } - if (((bitField0_ & 0x00000002) != 0)) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getDocumentMetadata()); - } - if (((bitField0_ & 0x00000008) != 0)) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getPageSpan()); - } - if (((bitField0_ & 0x00000010) != 0)) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getChunkMetadata()); - } - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream.computeDoubleSize(8, relevanceScore_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.ChunkProto + .internal_static_google_cloud_discoveryengine_v1beta_Chunk_StructuredContent_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.Chunk.StructuredContent.class, + com.google.cloud.discoveryengine.v1beta.Chunk.StructuredContent.Builder.class); + } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.discoveryengine.v1beta.Chunk)) { - return super.equals(obj); - } - com.google.cloud.discoveryengine.v1beta.Chunk other = - (com.google.cloud.discoveryengine.v1beta.Chunk) obj; + // Construct using + // com.google.cloud.discoveryengine.v1beta.Chunk.StructuredContent.newBuilder() + private Builder() {} - if (!getName().equals(other.getName())) return false; - if (!getId().equals(other.getId())) return false; - if (!getContent().equals(other.getContent())) return false; - if (hasRelevanceScore() != other.hasRelevanceScore()) return false; - if (hasRelevanceScore()) { - if (java.lang.Double.doubleToLongBits(getRelevanceScore()) - != java.lang.Double.doubleToLongBits(other.getRelevanceScore())) return false; - } - if (hasDocumentMetadata() != other.hasDocumentMetadata()) return false; - if (hasDocumentMetadata()) { - if (!getDocumentMetadata().equals(other.getDocumentMetadata())) return false; - } - if (hasDerivedStructData() != other.hasDerivedStructData()) return false; - if (hasDerivedStructData()) { - if (!getDerivedStructData().equals(other.getDerivedStructData())) return false; - } - if (hasPageSpan() != other.hasPageSpan()) return false; - if (hasPageSpan()) { - if (!getPageSpan().equals(other.getPageSpan())) return false; - } - if (hasChunkMetadata() != other.hasChunkMetadata()) return false; - if (hasChunkMetadata()) { - if (!getChunkMetadata().equals(other.getChunkMetadata())) return false; - } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (37 * hash) + ID_FIELD_NUMBER; - hash = (53 * hash) + getId().hashCode(); - hash = (37 * hash) + CONTENT_FIELD_NUMBER; - hash = (53 * hash) + getContent().hashCode(); - if (hasRelevanceScore()) { - hash = (37 * hash) + RELEVANCE_SCORE_FIELD_NUMBER; - hash = - (53 * hash) - + com.google.protobuf.Internal.hashLong( - java.lang.Double.doubleToLongBits(getRelevanceScore())); - } - if (hasDocumentMetadata()) { - hash = (37 * hash) + DOCUMENT_METADATA_FIELD_NUMBER; - hash = (53 * hash) + getDocumentMetadata().hashCode(); - } - if (hasDerivedStructData()) { - hash = (37 * hash) + DERIVED_STRUCT_DATA_FIELD_NUMBER; - hash = (53 * hash) + getDerivedStructData().hashCode(); - } - if (hasPageSpan()) { - hash = (37 * hash) + PAGE_SPAN_FIELD_NUMBER; - hash = (53 * hash) + getPageSpan().hashCode(); - } - if (hasChunkMetadata()) { - hash = (37 * hash) + CHUNK_METADATA_FIELD_NUMBER; - hash = (53 * hash) + getChunkMetadata().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + structureType_ = 0; + content_ = ""; + return this; + } - public static com.google.cloud.discoveryengine.v1beta.Chunk parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1beta.ChunkProto + .internal_static_google_cloud_discoveryengine_v1beta_Chunk_StructuredContent_descriptor; + } - public static com.google.cloud.discoveryengine.v1beta.Chunk parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Chunk.StructuredContent + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1beta.Chunk.StructuredContent.getDefaultInstance(); + } - public static com.google.cloud.discoveryengine.v1beta.Chunk parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Chunk.StructuredContent build() { + com.google.cloud.discoveryengine.v1beta.Chunk.StructuredContent result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } - public static com.google.cloud.discoveryengine.v1beta.Chunk parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Chunk.StructuredContent buildPartial() { + com.google.cloud.discoveryengine.v1beta.Chunk.StructuredContent result = + new com.google.cloud.discoveryengine.v1beta.Chunk.StructuredContent(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } - public static com.google.cloud.discoveryengine.v1beta.Chunk parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } + private void buildPartial0( + com.google.cloud.discoveryengine.v1beta.Chunk.StructuredContent result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.structureType_ = structureType_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.content_ = content_; + } + } - public static com.google.cloud.discoveryengine.v1beta.Chunk parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.discoveryengine.v1beta.Chunk.StructuredContent) { + return mergeFrom((com.google.cloud.discoveryengine.v1beta.Chunk.StructuredContent) other); + } else { + super.mergeFrom(other); + return this; + } + } - public static com.google.cloud.discoveryengine.v1beta.Chunk parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1beta.Chunk.StructuredContent other) { + if (other + == com.google.cloud.discoveryengine.v1beta.Chunk.StructuredContent.getDefaultInstance()) + return this; + if (other.structureType_ != 0) { + setStructureTypeValue(other.getStructureTypeValue()); + } + if (!other.getContent().isEmpty()) { + content_ = other.content_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } - public static com.google.cloud.discoveryengine.v1beta.Chunk parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } + @java.lang.Override + public final boolean isInitialized() { + return true; + } - public static com.google.cloud.discoveryengine.v1beta.Chunk parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + structureType_ = input.readEnum(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 18: + { + content_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private int structureType_ = 0; + + /** + * + * + *
            +       * Output only. The structure type of the structured content.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Chunk.StructureType structure_type = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for structureType. + */ + @java.lang.Override + public int getStructureTypeValue() { + return structureType_; + } + + /** + * + * + *
            +       * Output only. The structure type of the structured content.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Chunk.StructureType structure_type = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The enum numeric value on the wire for structureType to set. + * @return This builder for chaining. + */ + public Builder setStructureTypeValue(int value) { + structureType_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
            +       * Output only. The structure type of the structured content.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Chunk.StructureType structure_type = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The structureType. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Chunk.StructureType getStructureType() { + com.google.cloud.discoveryengine.v1beta.Chunk.StructureType result = + com.google.cloud.discoveryengine.v1beta.Chunk.StructureType.forNumber(structureType_); + return result == null + ? com.google.cloud.discoveryengine.v1beta.Chunk.StructureType.UNRECOGNIZED + : result; + } + + /** + * + * + *
            +       * Output only. The structure type of the structured content.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Chunk.StructureType structure_type = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The structureType to set. + * @return This builder for chaining. + */ + public Builder setStructureType( + com.google.cloud.discoveryengine.v1beta.Chunk.StructureType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + structureType_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
            +       * Output only. The structure type of the structured content.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Chunk.StructureType structure_type = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearStructureType() { + bitField0_ = (bitField0_ & ~0x00000001); + structureType_ = 0; + onChanged(); + return this; + } + + private java.lang.Object content_ = ""; + + /** + * + * + *
            +       * Output only. The content of the structured content.
            +       * 
            + * + * string content = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The content. + */ + public java.lang.String getContent() { + java.lang.Object ref = content_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + content_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
            +       * Output only. The content of the structured content.
            +       * 
            + * + * string content = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for content. + */ + public com.google.protobuf.ByteString getContentBytes() { + java.lang.Object ref = content_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + content_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
            +       * Output only. The content of the structured content.
            +       * 
            + * + * string content = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The content to set. + * @return This builder for chaining. + */ + public Builder setContent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + content_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
            +       * Output only. The content of the structured content.
            +       * 
            + * + * string content = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearContent() { + content_ = getDefaultInstance().getContent(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
            +       * Output only. The content of the structured content.
            +       * 
            + * + * string content = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for content to set. + * @return This builder for chaining. + */ + public Builder setContentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + content_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.Chunk.StructuredContent) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.Chunk.StructuredContent) + private static final com.google.cloud.discoveryengine.v1beta.Chunk.StructuredContent + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.discoveryengine.v1beta.Chunk.StructuredContent(); + } + + public static com.google.cloud.discoveryengine.v1beta.Chunk.StructuredContent + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public StructuredContent parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Chunk.StructuredContent + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface AnnotationMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.Chunk.AnnotationMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
            +     * Output only. The structured content information.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Chunk.StructuredContent structured_content = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the structuredContent field is set. + */ + boolean hasStructuredContent(); + + /** + * + * + *
            +     * Output only. The structured content information.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Chunk.StructuredContent structured_content = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The structuredContent. + */ + com.google.cloud.discoveryengine.v1beta.Chunk.StructuredContent getStructuredContent(); + + /** + * + * + *
            +     * Output only. The structured content information.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Chunk.StructuredContent structured_content = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.discoveryengine.v1beta.Chunk.StructuredContentOrBuilder + getStructuredContentOrBuilder(); + + /** + * + * + *
            +     * Output only. Image id is provided if the structured content is based on
            +     * an image.
            +     * 
            + * + * string image_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The imageId. + */ + java.lang.String getImageId(); + + /** + * + * + *
            +     * Output only. Image id is provided if the structured content is based on
            +     * an image.
            +     * 
            + * + * string image_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for imageId. + */ + com.google.protobuf.ByteString getImageIdBytes(); + } + + /** + * + * + *
            +   * The annotation metadata includes structured content in the current chunk.
            +   * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.Chunk.AnnotationMetadata} + */ + public static final class AnnotationMetadata extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.Chunk.AnnotationMetadata) + AnnotationMetadataOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "AnnotationMetadata"); + } + + // Use AnnotationMetadata.newBuilder() to construct. + private AnnotationMetadata(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private AnnotationMetadata() { + imageId_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.ChunkProto + .internal_static_google_cloud_discoveryengine_v1beta_Chunk_AnnotationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.ChunkProto + .internal_static_google_cloud_discoveryengine_v1beta_Chunk_AnnotationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.Chunk.AnnotationMetadata.class, + com.google.cloud.discoveryengine.v1beta.Chunk.AnnotationMetadata.Builder.class); + } + + private int bitField0_; + public static final int STRUCTURED_CONTENT_FIELD_NUMBER = 1; + private com.google.cloud.discoveryengine.v1beta.Chunk.StructuredContent structuredContent_; + + /** + * + * + *
            +     * Output only. The structured content information.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Chunk.StructuredContent structured_content = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the structuredContent field is set. + */ + @java.lang.Override + public boolean hasStructuredContent() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
            +     * Output only. The structured content information.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Chunk.StructuredContent structured_content = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The structuredContent. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Chunk.StructuredContent getStructuredContent() { + return structuredContent_ == null + ? com.google.cloud.discoveryengine.v1beta.Chunk.StructuredContent.getDefaultInstance() + : structuredContent_; + } + + /** + * + * + *
            +     * Output only. The structured content information.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Chunk.StructuredContent structured_content = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Chunk.StructuredContentOrBuilder + getStructuredContentOrBuilder() { + return structuredContent_ == null + ? com.google.cloud.discoveryengine.v1beta.Chunk.StructuredContent.getDefaultInstance() + : structuredContent_; + } + + public static final int IMAGE_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object imageId_ = ""; + + /** + * + * + *
            +     * Output only. Image id is provided if the structured content is based on
            +     * an image.
            +     * 
            + * + * string image_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The imageId. + */ + @java.lang.Override + public java.lang.String getImageId() { + java.lang.Object ref = imageId_; + 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(); + imageId_ = s; + return s; + } + } + + /** + * + * + *
            +     * Output only. Image id is provided if the structured content is based on
            +     * an image.
            +     * 
            + * + * string image_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for imageId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getImageIdBytes() { + java.lang.Object ref = imageId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + imageId_ = 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 { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getStructuredContent()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(imageId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, imageId_); + } + 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, getStructuredContent()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(imageId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, imageId_); + } + 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.discoveryengine.v1beta.Chunk.AnnotationMetadata)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1beta.Chunk.AnnotationMetadata other = + (com.google.cloud.discoveryengine.v1beta.Chunk.AnnotationMetadata) obj; + + if (hasStructuredContent() != other.hasStructuredContent()) return false; + if (hasStructuredContent()) { + if (!getStructuredContent().equals(other.getStructuredContent())) return false; + } + if (!getImageId().equals(other.getImageId())) 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 (hasStructuredContent()) { + hash = (37 * hash) + STRUCTURED_CONTENT_FIELD_NUMBER; + hash = (53 * hash) + getStructuredContent().hashCode(); + } + hash = (37 * hash) + IMAGE_ID_FIELD_NUMBER; + hash = (53 * hash) + getImageId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1beta.Chunk.AnnotationMetadata parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.Chunk.AnnotationMetadata 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.discoveryengine.v1beta.Chunk.AnnotationMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.Chunk.AnnotationMetadata 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.discoveryengine.v1beta.Chunk.AnnotationMetadata parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.Chunk.AnnotationMetadata parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1beta.Chunk.AnnotationMetadata parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.Chunk.AnnotationMetadata 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.discoveryengine.v1beta.Chunk.AnnotationMetadata + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.Chunk.AnnotationMetadata + 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.discoveryengine.v1beta.Chunk.AnnotationMetadata parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.Chunk.AnnotationMetadata 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.discoveryengine.v1beta.Chunk.AnnotationMetadata 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; + } + + /** + * + * + *
            +     * The annotation metadata includes structured content in the current chunk.
            +     * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.Chunk.AnnotationMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.Chunk.AnnotationMetadata) + com.google.cloud.discoveryengine.v1beta.Chunk.AnnotationMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.ChunkProto + .internal_static_google_cloud_discoveryengine_v1beta_Chunk_AnnotationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.ChunkProto + .internal_static_google_cloud_discoveryengine_v1beta_Chunk_AnnotationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.Chunk.AnnotationMetadata.class, + com.google.cloud.discoveryengine.v1beta.Chunk.AnnotationMetadata.Builder.class); + } + + // Construct using + // com.google.cloud.discoveryengine.v1beta.Chunk.AnnotationMetadata.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetStructuredContentFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + structuredContent_ = null; + if (structuredContentBuilder_ != null) { + structuredContentBuilder_.dispose(); + structuredContentBuilder_ = null; + } + imageId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1beta.ChunkProto + .internal_static_google_cloud_discoveryengine_v1beta_Chunk_AnnotationMetadata_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Chunk.AnnotationMetadata + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1beta.Chunk.AnnotationMetadata + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Chunk.AnnotationMetadata build() { + com.google.cloud.discoveryengine.v1beta.Chunk.AnnotationMetadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Chunk.AnnotationMetadata buildPartial() { + com.google.cloud.discoveryengine.v1beta.Chunk.AnnotationMetadata result = + new com.google.cloud.discoveryengine.v1beta.Chunk.AnnotationMetadata(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.discoveryengine.v1beta.Chunk.AnnotationMetadata result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.structuredContent_ = + structuredContentBuilder_ == null + ? structuredContent_ + : structuredContentBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.imageId_ = imageId_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.discoveryengine.v1beta.Chunk.AnnotationMetadata) { + return mergeFrom( + (com.google.cloud.discoveryengine.v1beta.Chunk.AnnotationMetadata) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1beta.Chunk.AnnotationMetadata other) { + if (other + == com.google.cloud.discoveryengine.v1beta.Chunk.AnnotationMetadata + .getDefaultInstance()) return this; + if (other.hasStructuredContent()) { + mergeStructuredContent(other.getStructuredContent()); + } + if (!other.getImageId().isEmpty()) { + imageId_ = other.imageId_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage( + internalGetStructuredContentFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + imageId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.cloud.discoveryengine.v1beta.Chunk.StructuredContent structuredContent_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.Chunk.StructuredContent, + com.google.cloud.discoveryengine.v1beta.Chunk.StructuredContent.Builder, + com.google.cloud.discoveryengine.v1beta.Chunk.StructuredContentOrBuilder> + structuredContentBuilder_; + + /** + * + * + *
            +       * Output only. The structured content information.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Chunk.StructuredContent structured_content = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the structuredContent field is set. + */ + public boolean hasStructuredContent() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
            +       * Output only. The structured content information.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Chunk.StructuredContent structured_content = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The structuredContent. + */ + public com.google.cloud.discoveryengine.v1beta.Chunk.StructuredContent + getStructuredContent() { + if (structuredContentBuilder_ == null) { + return structuredContent_ == null + ? com.google.cloud.discoveryengine.v1beta.Chunk.StructuredContent.getDefaultInstance() + : structuredContent_; + } else { + return structuredContentBuilder_.getMessage(); + } + } + + /** + * + * + *
            +       * Output only. The structured content information.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Chunk.StructuredContent structured_content = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setStructuredContent( + com.google.cloud.discoveryengine.v1beta.Chunk.StructuredContent value) { + if (structuredContentBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + structuredContent_ = value; + } else { + structuredContentBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
            +       * Output only. The structured content information.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Chunk.StructuredContent structured_content = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setStructuredContent( + com.google.cloud.discoveryengine.v1beta.Chunk.StructuredContent.Builder builderForValue) { + if (structuredContentBuilder_ == null) { + structuredContent_ = builderForValue.build(); + } else { + structuredContentBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
            +       * Output only. The structured content information.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Chunk.StructuredContent structured_content = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeStructuredContent( + com.google.cloud.discoveryengine.v1beta.Chunk.StructuredContent value) { + if (structuredContentBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && structuredContent_ != null + && structuredContent_ + != com.google.cloud.discoveryengine.v1beta.Chunk.StructuredContent + .getDefaultInstance()) { + getStructuredContentBuilder().mergeFrom(value); + } else { + structuredContent_ = value; + } + } else { + structuredContentBuilder_.mergeFrom(value); + } + if (structuredContent_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + + /** + * + * + *
            +       * Output only. The structured content information.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Chunk.StructuredContent structured_content = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearStructuredContent() { + bitField0_ = (bitField0_ & ~0x00000001); + structuredContent_ = null; + if (structuredContentBuilder_ != null) { + structuredContentBuilder_.dispose(); + structuredContentBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
            +       * Output only. The structured content information.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Chunk.StructuredContent structured_content = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.discoveryengine.v1beta.Chunk.StructuredContent.Builder + getStructuredContentBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return internalGetStructuredContentFieldBuilder().getBuilder(); + } + + /** + * + * + *
            +       * Output only. The structured content information.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Chunk.StructuredContent structured_content = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.discoveryengine.v1beta.Chunk.StructuredContentOrBuilder + getStructuredContentOrBuilder() { + if (structuredContentBuilder_ != null) { + return structuredContentBuilder_.getMessageOrBuilder(); + } else { + return structuredContent_ == null + ? com.google.cloud.discoveryengine.v1beta.Chunk.StructuredContent.getDefaultInstance() + : structuredContent_; + } + } + + /** + * + * + *
            +       * Output only. The structured content information.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Chunk.StructuredContent structured_content = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.Chunk.StructuredContent, + com.google.cloud.discoveryengine.v1beta.Chunk.StructuredContent.Builder, + com.google.cloud.discoveryengine.v1beta.Chunk.StructuredContentOrBuilder> + internalGetStructuredContentFieldBuilder() { + if (structuredContentBuilder_ == null) { + structuredContentBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.Chunk.StructuredContent, + com.google.cloud.discoveryengine.v1beta.Chunk.StructuredContent.Builder, + com.google.cloud.discoveryengine.v1beta.Chunk.StructuredContentOrBuilder>( + getStructuredContent(), getParentForChildren(), isClean()); + structuredContent_ = null; + } + return structuredContentBuilder_; + } + + private java.lang.Object imageId_ = ""; + + /** + * + * + *
            +       * Output only. Image id is provided if the structured content is based on
            +       * an image.
            +       * 
            + * + * string image_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The imageId. + */ + public java.lang.String getImageId() { + java.lang.Object ref = imageId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + imageId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
            +       * Output only. Image id is provided if the structured content is based on
            +       * an image.
            +       * 
            + * + * string image_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for imageId. + */ + public com.google.protobuf.ByteString getImageIdBytes() { + java.lang.Object ref = imageId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + imageId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
            +       * Output only. Image id is provided if the structured content is based on
            +       * an image.
            +       * 
            + * + * string image_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The imageId to set. + * @return This builder for chaining. + */ + public Builder setImageId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + imageId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
            +       * Output only. Image id is provided if the structured content is based on
            +       * an image.
            +       * 
            + * + * string image_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearImageId() { + imageId_ = getDefaultInstance().getImageId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
            +       * Output only. Image id is provided if the structured content is based on
            +       * an image.
            +       * 
            + * + * string image_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for imageId to set. + * @return This builder for chaining. + */ + public Builder setImageIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + imageId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.Chunk.AnnotationMetadata) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.Chunk.AnnotationMetadata) + private static final com.google.cloud.discoveryengine.v1beta.Chunk.AnnotationMetadata + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.discoveryengine.v1beta.Chunk.AnnotationMetadata(); + } + + public static com.google.cloud.discoveryengine.v1beta.Chunk.AnnotationMetadata + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AnnotationMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Chunk.AnnotationMetadata + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int bitField0_; + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
            +   * The full resource name of the chunk.
            +   * Format:
            +   * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document_id}/chunks/{chunk_id}`.
            +   *
            +   * This field must be a UTF-8 encoded string with a length limit of 1024
            +   * characters.
            +   * 
            + * + * string name = 1; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + 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(); + name_ = s; + return s; + } + } + + /** + * + * + *
            +   * The full resource name of the chunk.
            +   * Format:
            +   * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document_id}/chunks/{chunk_id}`.
            +   *
            +   * This field must be a UTF-8 encoded string with a length limit of 1024
            +   * characters.
            +   * 
            + * + * string name = 1; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object id_ = ""; + + /** + * + * + *
            +   * Unique chunk ID of the current chunk.
            +   * 
            + * + * string id = 2; + * + * @return The id. + */ + @java.lang.Override + public java.lang.String getId() { + java.lang.Object ref = id_; + 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(); + id_ = s; + return s; + } + } + + /** + * + * + *
            +   * Unique chunk ID of the current chunk.
            +   * 
            + * + * string id = 2; + * + * @return The bytes for id. + */ + @java.lang.Override + public com.google.protobuf.ByteString getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CONTENT_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object content_ = ""; + + /** + * + * + *
            +   * Content is a string from a document (parsed content).
            +   * 
            + * + * string content = 3; + * + * @return The content. + */ + @java.lang.Override + public java.lang.String getContent() { + java.lang.Object ref = content_; + 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(); + content_ = s; + return s; + } + } + + /** + * + * + *
            +   * Content is a string from a document (parsed content).
            +   * 
            + * + * string content = 3; + * + * @return The bytes for content. + */ + @java.lang.Override + public com.google.protobuf.ByteString getContentBytes() { + java.lang.Object ref = content_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + content_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int RELEVANCE_SCORE_FIELD_NUMBER = 8; + private double relevanceScore_ = 0D; + + /** + * + * + *
            +   * Output only. Represents the relevance score based on similarity.
            +   * Higher score indicates higher chunk relevance.
            +   * The score is in range [-1.0, 1.0].
            +   * Only populated on
            +   * [SearchResponse][google.cloud.discoveryengine.v1beta.SearchResponse].
            +   * 
            + * + * optional double relevance_score = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return Whether the relevanceScore field is set. + */ + @java.lang.Override + public boolean hasRelevanceScore() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
            +   * Output only. Represents the relevance score based on similarity.
            +   * Higher score indicates higher chunk relevance.
            +   * The score is in range [-1.0, 1.0].
            +   * Only populated on
            +   * [SearchResponse][google.cloud.discoveryengine.v1beta.SearchResponse].
            +   * 
            + * + * optional double relevance_score = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The relevanceScore. + */ + @java.lang.Override + public double getRelevanceScore() { + return relevanceScore_; + } + + public static final int DOCUMENT_METADATA_FIELD_NUMBER = 5; + private com.google.cloud.discoveryengine.v1beta.Chunk.DocumentMetadata documentMetadata_; + + /** + * + * + *
            +   * Metadata of the document from the current chunk.
            +   * 
            + * + * .google.cloud.discoveryengine.v1beta.Chunk.DocumentMetadata document_metadata = 5; + * + * @return Whether the documentMetadata field is set. + */ + @java.lang.Override + public boolean hasDocumentMetadata() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
            +   * Metadata of the document from the current chunk.
            +   * 
            + * + * .google.cloud.discoveryengine.v1beta.Chunk.DocumentMetadata document_metadata = 5; + * + * @return The documentMetadata. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Chunk.DocumentMetadata getDocumentMetadata() { + return documentMetadata_ == null + ? com.google.cloud.discoveryengine.v1beta.Chunk.DocumentMetadata.getDefaultInstance() + : documentMetadata_; + } + + /** + * + * + *
            +   * Metadata of the document from the current chunk.
            +   * 
            + * + * .google.cloud.discoveryengine.v1beta.Chunk.DocumentMetadata document_metadata = 5; + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Chunk.DocumentMetadataOrBuilder + getDocumentMetadataOrBuilder() { + return documentMetadata_ == null + ? com.google.cloud.discoveryengine.v1beta.Chunk.DocumentMetadata.getDefaultInstance() + : documentMetadata_; + } + + public static final int DERIVED_STRUCT_DATA_FIELD_NUMBER = 4; + private com.google.protobuf.Struct derivedStructData_; + + /** + * + * + *
            +   * Output only. This field is OUTPUT_ONLY.
            +   * It contains derived data that are not in the original input document.
            +   * 
            + * + * + * .google.protobuf.Struct derived_struct_data = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the derivedStructData field is set. + */ + @java.lang.Override + public boolean hasDerivedStructData() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
            +   * Output only. This field is OUTPUT_ONLY.
            +   * It contains derived data that are not in the original input document.
            +   * 
            + * + * + * .google.protobuf.Struct derived_struct_data = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The derivedStructData. + */ + @java.lang.Override + public com.google.protobuf.Struct getDerivedStructData() { + return derivedStructData_ == null + ? com.google.protobuf.Struct.getDefaultInstance() + : derivedStructData_; + } + + /** + * + * + *
            +   * Output only. This field is OUTPUT_ONLY.
            +   * It contains derived data that are not in the original input document.
            +   * 
            + * + * + * .google.protobuf.Struct derived_struct_data = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.StructOrBuilder getDerivedStructDataOrBuilder() { + return derivedStructData_ == null + ? com.google.protobuf.Struct.getDefaultInstance() + : derivedStructData_; + } + + public static final int PAGE_SPAN_FIELD_NUMBER = 6; + private com.google.cloud.discoveryengine.v1beta.Chunk.PageSpan pageSpan_; + + /** + * + * + *
            +   * Page span of the chunk.
            +   * 
            + * + * .google.cloud.discoveryengine.v1beta.Chunk.PageSpan page_span = 6; + * + * @return Whether the pageSpan field is set. + */ + @java.lang.Override + public boolean hasPageSpan() { + return ((bitField0_ & 0x00000008) != 0); + } + + /** + * + * + *
            +   * Page span of the chunk.
            +   * 
            + * + * .google.cloud.discoveryengine.v1beta.Chunk.PageSpan page_span = 6; + * + * @return The pageSpan. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Chunk.PageSpan getPageSpan() { + return pageSpan_ == null + ? com.google.cloud.discoveryengine.v1beta.Chunk.PageSpan.getDefaultInstance() + : pageSpan_; + } + + /** + * + * + *
            +   * Page span of the chunk.
            +   * 
            + * + * .google.cloud.discoveryengine.v1beta.Chunk.PageSpan page_span = 6; + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Chunk.PageSpanOrBuilder getPageSpanOrBuilder() { + return pageSpan_ == null + ? com.google.cloud.discoveryengine.v1beta.Chunk.PageSpan.getDefaultInstance() + : pageSpan_; + } + + public static final int CHUNK_METADATA_FIELD_NUMBER = 7; + private com.google.cloud.discoveryengine.v1beta.Chunk.ChunkMetadata chunkMetadata_; + + /** + * + * + *
            +   * Output only. Metadata of the current chunk.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Chunk.ChunkMetadata chunk_metadata = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the chunkMetadata field is set. + */ + @java.lang.Override + public boolean hasChunkMetadata() { + return ((bitField0_ & 0x00000010) != 0); + } + + /** + * + * + *
            +   * Output only. Metadata of the current chunk.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Chunk.ChunkMetadata chunk_metadata = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The chunkMetadata. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Chunk.ChunkMetadata getChunkMetadata() { + return chunkMetadata_ == null + ? com.google.cloud.discoveryengine.v1beta.Chunk.ChunkMetadata.getDefaultInstance() + : chunkMetadata_; + } + + /** + * + * + *
            +   * Output only. Metadata of the current chunk.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Chunk.ChunkMetadata chunk_metadata = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Chunk.ChunkMetadataOrBuilder + getChunkMetadataOrBuilder() { + return chunkMetadata_ == null + ? com.google.cloud.discoveryengine.v1beta.Chunk.ChunkMetadata.getDefaultInstance() + : chunkMetadata_; + } + + public static final int DATA_URLS_FIELD_NUMBER = 9; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList dataUrls_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + /** + * + * + *
            +   * Output only. Image Data URLs if the current chunk contains images.
            +   * Data URLs are composed of four parts: a prefix (data:), a MIME type
            +   * indicating the type of data, an optional base64 token if non-textual,
            +   * and the data itself:
            +   * data:[<mediatype>][;base64],<data>
            +   * 
            + * + * repeated string data_urls = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return A list containing the dataUrls. + */ + public com.google.protobuf.ProtocolStringList getDataUrlsList() { + return dataUrls_; + } + + /** + * + * + *
            +   * Output only. Image Data URLs if the current chunk contains images.
            +   * Data URLs are composed of four parts: a prefix (data:), a MIME type
            +   * indicating the type of data, an optional base64 token if non-textual,
            +   * and the data itself:
            +   * data:[<mediatype>][;base64],<data>
            +   * 
            + * + * repeated string data_urls = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The count of dataUrls. + */ + public int getDataUrlsCount() { + return dataUrls_.size(); + } + + /** + * + * + *
            +   * Output only. Image Data URLs if the current chunk contains images.
            +   * Data URLs are composed of four parts: a prefix (data:), a MIME type
            +   * indicating the type of data, an optional base64 token if non-textual,
            +   * and the data itself:
            +   * data:[<mediatype>][;base64],<data>
            +   * 
            + * + * repeated string data_urls = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param index The index of the element to return. + * @return The dataUrls at the given index. + */ + public java.lang.String getDataUrls(int index) { + return dataUrls_.get(index); + } + + /** + * + * + *
            +   * Output only. Image Data URLs if the current chunk contains images.
            +   * Data URLs are composed of four parts: a prefix (data:), a MIME type
            +   * indicating the type of data, an optional base64 token if non-textual,
            +   * and the data itself:
            +   * data:[<mediatype>][;base64],<data>
            +   * 
            + * + * repeated string data_urls = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param index The index of the value to return. + * @return The bytes of the dataUrls at the given index. + */ + public com.google.protobuf.ByteString getDataUrlsBytes(int index) { + return dataUrls_.getByteString(index); + } + + public static final int ANNOTATION_CONTENTS_FIELD_NUMBER = 11; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList annotationContents_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + /** + * + * + *
            +   * Output only. Annotation contents if the current chunk contains annotations.
            +   * 
            + * + * repeated string annotation_contents = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return A list containing the annotationContents. + */ + public com.google.protobuf.ProtocolStringList getAnnotationContentsList() { + return annotationContents_; + } + + /** + * + * + *
            +   * Output only. Annotation contents if the current chunk contains annotations.
            +   * 
            + * + * repeated string annotation_contents = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The count of annotationContents. + */ + public int getAnnotationContentsCount() { + return annotationContents_.size(); + } + + /** + * + * + *
            +   * Output only. Annotation contents if the current chunk contains annotations.
            +   * 
            + * + * repeated string annotation_contents = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index of the element to return. + * @return The annotationContents at the given index. + */ + public java.lang.String getAnnotationContents(int index) { + return annotationContents_.get(index); + } + + /** + * + * + *
            +   * Output only. Annotation contents if the current chunk contains annotations.
            +   * 
            + * + * repeated string annotation_contents = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index of the value to return. + * @return The bytes of the annotationContents at the given index. + */ + public com.google.protobuf.ByteString getAnnotationContentsBytes(int index) { + return annotationContents_.getByteString(index); + } + + public static final int ANNOTATION_METADATA_FIELD_NUMBER = 12; + + @SuppressWarnings("serial") + private java.util.List + annotationMetadata_; + + /** + * + * + *
            +   * Output only. The annotation metadata includes structured content in the
            +   * current chunk.
            +   * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Chunk.AnnotationMetadata annotation_metadata = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.List + getAnnotationMetadataList() { + return annotationMetadata_; + } + + /** + * + * + *
            +   * Output only. The annotation metadata includes structured content in the
            +   * current chunk.
            +   * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Chunk.AnnotationMetadata annotation_metadata = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.List< + ? extends com.google.cloud.discoveryengine.v1beta.Chunk.AnnotationMetadataOrBuilder> + getAnnotationMetadataOrBuilderList() { + return annotationMetadata_; + } + + /** + * + * + *
            +   * Output only. The annotation metadata includes structured content in the
            +   * current chunk.
            +   * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Chunk.AnnotationMetadata annotation_metadata = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public int getAnnotationMetadataCount() { + return annotationMetadata_.size(); + } + + /** + * + * + *
            +   * Output only. The annotation metadata includes structured content in the
            +   * current chunk.
            +   * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Chunk.AnnotationMetadata annotation_metadata = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Chunk.AnnotationMetadata getAnnotationMetadata( + int index) { + return annotationMetadata_.get(index); + } + + /** + * + * + *
            +   * Output only. The annotation metadata includes structured content in the
            +   * current chunk.
            +   * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Chunk.AnnotationMetadata annotation_metadata = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Chunk.AnnotationMetadataOrBuilder + getAnnotationMetadataOrBuilder(int index) { + return annotationMetadata_.get(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 (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(id_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, id_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(content_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, content_); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeMessage(4, getDerivedStructData()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(5, getDocumentMetadata()); + } + if (((bitField0_ & 0x00000008) != 0)) { + output.writeMessage(6, getPageSpan()); + } + if (((bitField0_ & 0x00000010) != 0)) { + output.writeMessage(7, getChunkMetadata()); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeDouble(8, relevanceScore_); + } + for (int i = 0; i < dataUrls_.size(); i++) { + com.google.protobuf.GeneratedMessage.writeString(output, 9, dataUrls_.getRaw(i)); + } + for (int i = 0; i < annotationContents_.size(); i++) { + com.google.protobuf.GeneratedMessage.writeString(output, 11, annotationContents_.getRaw(i)); + } + for (int i = 0; i < annotationMetadata_.size(); i++) { + output.writeMessage(12, annotationMetadata_.get(i)); + } + 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(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(id_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, id_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(content_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, content_); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getDerivedStructData()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getDocumentMetadata()); + } + if (((bitField0_ & 0x00000008) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getPageSpan()); + } + if (((bitField0_ & 0x00000010) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getChunkMetadata()); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeDoubleSize(8, relevanceScore_); + } + { + int dataSize = 0; + for (int i = 0; i < dataUrls_.size(); i++) { + dataSize += computeStringSizeNoTag(dataUrls_.getRaw(i)); + } + size += dataSize; + size += 1 * getDataUrlsList().size(); + } + { + int dataSize = 0; + for (int i = 0; i < annotationContents_.size(); i++) { + dataSize += computeStringSizeNoTag(annotationContents_.getRaw(i)); + } + size += dataSize; + size += 1 * getAnnotationContentsList().size(); + } + for (int i = 0; i < annotationMetadata_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(12, annotationMetadata_.get(i)); + } + 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.discoveryengine.v1beta.Chunk)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1beta.Chunk other = + (com.google.cloud.discoveryengine.v1beta.Chunk) obj; + + if (!getName().equals(other.getName())) return false; + if (!getId().equals(other.getId())) return false; + if (!getContent().equals(other.getContent())) return false; + if (hasRelevanceScore() != other.hasRelevanceScore()) return false; + if (hasRelevanceScore()) { + if (java.lang.Double.doubleToLongBits(getRelevanceScore()) + != java.lang.Double.doubleToLongBits(other.getRelevanceScore())) return false; + } + if (hasDocumentMetadata() != other.hasDocumentMetadata()) return false; + if (hasDocumentMetadata()) { + if (!getDocumentMetadata().equals(other.getDocumentMetadata())) return false; + } + if (hasDerivedStructData() != other.hasDerivedStructData()) return false; + if (hasDerivedStructData()) { + if (!getDerivedStructData().equals(other.getDerivedStructData())) return false; + } + if (hasPageSpan() != other.hasPageSpan()) return false; + if (hasPageSpan()) { + if (!getPageSpan().equals(other.getPageSpan())) return false; + } + if (hasChunkMetadata() != other.hasChunkMetadata()) return false; + if (hasChunkMetadata()) { + if (!getChunkMetadata().equals(other.getChunkMetadata())) return false; + } + if (!getDataUrlsList().equals(other.getDataUrlsList())) return false; + if (!getAnnotationContentsList().equals(other.getAnnotationContentsList())) return false; + if (!getAnnotationMetadataList().equals(other.getAnnotationMetadataList())) 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) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + ID_FIELD_NUMBER; + hash = (53 * hash) + getId().hashCode(); + hash = (37 * hash) + CONTENT_FIELD_NUMBER; + hash = (53 * hash) + getContent().hashCode(); + if (hasRelevanceScore()) { + hash = (37 * hash) + RELEVANCE_SCORE_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getRelevanceScore())); + } + if (hasDocumentMetadata()) { + hash = (37 * hash) + DOCUMENT_METADATA_FIELD_NUMBER; + hash = (53 * hash) + getDocumentMetadata().hashCode(); + } + if (hasDerivedStructData()) { + hash = (37 * hash) + DERIVED_STRUCT_DATA_FIELD_NUMBER; + hash = (53 * hash) + getDerivedStructData().hashCode(); + } + if (hasPageSpan()) { + hash = (37 * hash) + PAGE_SPAN_FIELD_NUMBER; + hash = (53 * hash) + getPageSpan().hashCode(); + } + if (hasChunkMetadata()) { + hash = (37 * hash) + CHUNK_METADATA_FIELD_NUMBER; + hash = (53 * hash) + getChunkMetadata().hashCode(); + } + if (getDataUrlsCount() > 0) { + hash = (37 * hash) + DATA_URLS_FIELD_NUMBER; + hash = (53 * hash) + getDataUrlsList().hashCode(); + } + if (getAnnotationContentsCount() > 0) { + hash = (37 * hash) + ANNOTATION_CONTENTS_FIELD_NUMBER; + hash = (53 * hash) + getAnnotationContentsList().hashCode(); + } + if (getAnnotationMetadataCount() > 0) { + hash = (37 * hash) + ANNOTATION_METADATA_FIELD_NUMBER; + hash = (53 * hash) + getAnnotationMetadataList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1beta.Chunk parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.Chunk 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.discoveryengine.v1beta.Chunk parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.Chunk 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.discoveryengine.v1beta.Chunk parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.Chunk parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1beta.Chunk parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.Chunk 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.discoveryengine.v1beta.Chunk parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.Chunk 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.discoveryengine.v1beta.Chunk parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.Chunk 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.discoveryengine.v1beta.Chunk 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; + } + + /** + * + * + *
            +   * Chunk captures all raw metadata information of items to be recommended or
            +   * searched in the chunk mode.
            +   * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.Chunk} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.Chunk) + com.google.cloud.discoveryengine.v1beta.ChunkOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.ChunkProto + .internal_static_google_cloud_discoveryengine_v1beta_Chunk_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.ChunkProto + .internal_static_google_cloud_discoveryengine_v1beta_Chunk_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.Chunk.class, + com.google.cloud.discoveryengine.v1beta.Chunk.Builder.class); + } + + // Construct using com.google.cloud.discoveryengine.v1beta.Chunk.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetDocumentMetadataFieldBuilder(); + internalGetDerivedStructDataFieldBuilder(); + internalGetPageSpanFieldBuilder(); + internalGetChunkMetadataFieldBuilder(); + internalGetAnnotationMetadataFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + id_ = ""; + content_ = ""; + relevanceScore_ = 0D; + documentMetadata_ = null; + if (documentMetadataBuilder_ != null) { + documentMetadataBuilder_.dispose(); + documentMetadataBuilder_ = null; + } + derivedStructData_ = null; + if (derivedStructDataBuilder_ != null) { + derivedStructDataBuilder_.dispose(); + derivedStructDataBuilder_ = null; + } + pageSpan_ = null; + if (pageSpanBuilder_ != null) { + pageSpanBuilder_.dispose(); + pageSpanBuilder_ = null; + } + chunkMetadata_ = null; + if (chunkMetadataBuilder_ != null) { + chunkMetadataBuilder_.dispose(); + chunkMetadataBuilder_ = null; + } + dataUrls_ = com.google.protobuf.LazyStringArrayList.emptyList(); + annotationContents_ = com.google.protobuf.LazyStringArrayList.emptyList(); + if (annotationMetadataBuilder_ == null) { + annotationMetadata_ = java.util.Collections.emptyList(); + } else { + annotationMetadata_ = null; + annotationMetadataBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000400); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1beta.ChunkProto + .internal_static_google_cloud_discoveryengine_v1beta_Chunk_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Chunk getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1beta.Chunk.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Chunk build() { + com.google.cloud.discoveryengine.v1beta.Chunk result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Chunk buildPartial() { + com.google.cloud.discoveryengine.v1beta.Chunk result = + new com.google.cloud.discoveryengine.v1beta.Chunk(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.google.cloud.discoveryengine.v1beta.Chunk result) { + if (annotationMetadataBuilder_ == null) { + if (((bitField0_ & 0x00000400) != 0)) { + annotationMetadata_ = java.util.Collections.unmodifiableList(annotationMetadata_); + bitField0_ = (bitField0_ & ~0x00000400); + } + result.annotationMetadata_ = annotationMetadata_; + } else { + result.annotationMetadata_ = annotationMetadataBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.discoveryengine.v1beta.Chunk result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.id_ = id_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.content_ = content_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000008) != 0)) { + result.relevanceScore_ = relevanceScore_; + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.documentMetadata_ = + documentMetadataBuilder_ == null ? documentMetadata_ : documentMetadataBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.derivedStructData_ = + derivedStructDataBuilder_ == null + ? derivedStructData_ + : derivedStructDataBuilder_.build(); + to_bitField0_ |= 0x00000004; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.pageSpan_ = pageSpanBuilder_ == null ? pageSpan_ : pageSpanBuilder_.build(); + to_bitField0_ |= 0x00000008; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.chunkMetadata_ = + chunkMetadataBuilder_ == null ? chunkMetadata_ : chunkMetadataBuilder_.build(); + to_bitField0_ |= 0x00000010; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + dataUrls_.makeImmutable(); + result.dataUrls_ = dataUrls_; + } + if (((from_bitField0_ & 0x00000200) != 0)) { + annotationContents_.makeImmutable(); + result.annotationContents_ = annotationContents_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.discoveryengine.v1beta.Chunk) { + return mergeFrom((com.google.cloud.discoveryengine.v1beta.Chunk) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.discoveryengine.v1beta.Chunk other) { + if (other == com.google.cloud.discoveryengine.v1beta.Chunk.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getId().isEmpty()) { + id_ = other.id_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getContent().isEmpty()) { + content_ = other.content_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (other.hasRelevanceScore()) { + setRelevanceScore(other.getRelevanceScore()); + } + if (other.hasDocumentMetadata()) { + mergeDocumentMetadata(other.getDocumentMetadata()); + } + if (other.hasDerivedStructData()) { + mergeDerivedStructData(other.getDerivedStructData()); + } + if (other.hasPageSpan()) { + mergePageSpan(other.getPageSpan()); + } + if (other.hasChunkMetadata()) { + mergeChunkMetadata(other.getChunkMetadata()); + } + if (!other.dataUrls_.isEmpty()) { + if (dataUrls_.isEmpty()) { + dataUrls_ = other.dataUrls_; + bitField0_ |= 0x00000100; + } else { + ensureDataUrlsIsMutable(); + dataUrls_.addAll(other.dataUrls_); + } + onChanged(); + } + if (!other.annotationContents_.isEmpty()) { + if (annotationContents_.isEmpty()) { + annotationContents_ = other.annotationContents_; + bitField0_ |= 0x00000200; + } else { + ensureAnnotationContentsIsMutable(); + annotationContents_.addAll(other.annotationContents_); + } + onChanged(); + } + if (annotationMetadataBuilder_ == null) { + if (!other.annotationMetadata_.isEmpty()) { + if (annotationMetadata_.isEmpty()) { + annotationMetadata_ = other.annotationMetadata_; + bitField0_ = (bitField0_ & ~0x00000400); + } else { + ensureAnnotationMetadataIsMutable(); + annotationMetadata_.addAll(other.annotationMetadata_); + } + onChanged(); + } + } else { + if (!other.annotationMetadata_.isEmpty()) { + if (annotationMetadataBuilder_.isEmpty()) { + annotationMetadataBuilder_.dispose(); + annotationMetadataBuilder_ = null; + annotationMetadata_ = other.annotationMetadata_; + bitField0_ = (bitField0_ & ~0x00000400); + annotationMetadataBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetAnnotationMetadataFieldBuilder() + : null; + } else { + annotationMetadataBuilder_.addAllMessages(other.annotationMetadata_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + id_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + content_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + input.readMessage( + internalGetDerivedStructDataFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 34 + case 42: + { + input.readMessage( + internalGetDocumentMetadataFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 50: + { + input.readMessage( + internalGetPageSpanFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000040; + break; + } // case 50 + case 58: + { + input.readMessage( + internalGetChunkMetadataFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000080; + break; + } // case 58 + case 65: + { + relevanceScore_ = input.readDouble(); + bitField0_ |= 0x00000008; + break; + } // case 65 + case 74: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureDataUrlsIsMutable(); + dataUrls_.add(s); + break; + } // case 74 + case 90: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureAnnotationContentsIsMutable(); + annotationContents_.add(s); + break; + } // case 90 + case 98: + { + com.google.cloud.discoveryengine.v1beta.Chunk.AnnotationMetadata m = + input.readMessage( + com.google.cloud.discoveryengine.v1beta.Chunk.AnnotationMetadata.parser(), + extensionRegistry); + if (annotationMetadataBuilder_ == null) { + ensureAnnotationMetadataIsMutable(); + annotationMetadata_.add(m); + } else { + annotationMetadataBuilder_.addMessage(m); + } + break; + } // case 98 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + + /** + * + * + *
            +     * The full resource name of the chunk.
            +     * Format:
            +     * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document_id}/chunks/{chunk_id}`.
            +     *
            +     * This field must be a UTF-8 encoded string with a length limit of 1024
            +     * characters.
            +     * 
            + * + * string name = 1; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
            +     * The full resource name of the chunk.
            +     * Format:
            +     * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document_id}/chunks/{chunk_id}`.
            +     *
            +     * This field must be a UTF-8 encoded string with a length limit of 1024
            +     * characters.
            +     * 
            + * + * string name = 1; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
            +     * The full resource name of the chunk.
            +     * Format:
            +     * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document_id}/chunks/{chunk_id}`.
            +     *
            +     * This field must be a UTF-8 encoded string with a length limit of 1024
            +     * characters.
            +     * 
            + * + * string name = 1; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
            +     * The full resource name of the chunk.
            +     * Format:
            +     * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document_id}/chunks/{chunk_id}`.
            +     *
            +     * This field must be a UTF-8 encoded string with a length limit of 1024
            +     * characters.
            +     * 
            + * + * string name = 1; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
            +     * The full resource name of the chunk.
            +     * Format:
            +     * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document_id}/chunks/{chunk_id}`.
            +     *
            +     * This field must be a UTF-8 encoded string with a length limit of 1024
            +     * characters.
            +     * 
            + * + * string name = 1; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object id_ = ""; + + /** + * + * + *
            +     * Unique chunk ID of the current chunk.
            +     * 
            + * + * string id = 2; + * + * @return The id. + */ + public java.lang.String getId() { + java.lang.Object ref = id_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
            +     * Unique chunk ID of the current chunk.
            +     * 
            + * + * string id = 2; + * + * @return The bytes for id. + */ + public com.google.protobuf.ByteString getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
            +     * Unique chunk ID of the current chunk.
            +     * 
            + * + * string id = 2; + * + * @param value The id to set. + * @return This builder for chaining. + */ + public Builder setId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + id_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Unique chunk ID of the current chunk.
            +     * 
            + * + * string id = 2; + * + * @return This builder for chaining. + */ + public Builder clearId() { + id_ = getDefaultInstance().getId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
            +     * Unique chunk ID of the current chunk.
            +     * 
            + * + * string id = 2; + * + * @param value The bytes for id to set. + * @return This builder for chaining. + */ + public Builder setIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + id_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object content_ = ""; + + /** + * + * + *
            +     * Content is a string from a document (parsed content).
            +     * 
            + * + * string content = 3; + * + * @return The content. + */ + public java.lang.String getContent() { + java.lang.Object ref = content_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + content_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
            +     * Content is a string from a document (parsed content).
            +     * 
            + * + * string content = 3; + * + * @return The bytes for content. + */ + public com.google.protobuf.ByteString getContentBytes() { + java.lang.Object ref = content_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + content_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
            +     * Content is a string from a document (parsed content).
            +     * 
            + * + * string content = 3; + * + * @param value The content to set. + * @return This builder for chaining. + */ + public Builder setContent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + content_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Content is a string from a document (parsed content).
            +     * 
            + * + * string content = 3; + * + * @return This builder for chaining. + */ + public Builder clearContent() { + content_ = getDefaultInstance().getContent(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } - public static com.google.cloud.discoveryengine.v1beta.Chunk parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } + /** + * + * + *
            +     * Content is a string from a document (parsed content).
            +     * 
            + * + * string content = 3; + * + * @param value The bytes for content to set. + * @return This builder for chaining. + */ + public Builder setContentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + content_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } - public static com.google.cloud.discoveryengine.v1beta.Chunk parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } + private double relevanceScore_; - public static com.google.cloud.discoveryengine.v1beta.Chunk parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } + /** + * + * + *
            +     * Output only. Represents the relevance score based on similarity.
            +     * Higher score indicates higher chunk relevance.
            +     * The score is in range [-1.0, 1.0].
            +     * Only populated on
            +     * [SearchResponse][google.cloud.discoveryengine.v1beta.SearchResponse].
            +     * 
            + * + * optional double relevance_score = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the relevanceScore field is set. + */ + @java.lang.Override + public boolean hasRelevanceScore() { + return ((bitField0_ & 0x00000008) != 0); + } - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } + /** + * + * + *
            +     * Output only. Represents the relevance score based on similarity.
            +     * Higher score indicates higher chunk relevance.
            +     * The score is in range [-1.0, 1.0].
            +     * Only populated on
            +     * [SearchResponse][google.cloud.discoveryengine.v1beta.SearchResponse].
            +     * 
            + * + * optional double relevance_score = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The relevanceScore. + */ + @java.lang.Override + public double getRelevanceScore() { + return relevanceScore_; + } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } + /** + * + * + *
            +     * Output only. Represents the relevance score based on similarity.
            +     * Higher score indicates higher chunk relevance.
            +     * The score is in range [-1.0, 1.0].
            +     * Only populated on
            +     * [SearchResponse][google.cloud.discoveryengine.v1beta.SearchResponse].
            +     * 
            + * + * optional double relevance_score = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The relevanceScore to set. + * @return This builder for chaining. + */ + public Builder setRelevanceScore(double value) { - public static Builder newBuilder(com.google.cloud.discoveryengine.v1beta.Chunk prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } + relevanceScore_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } + /** + * + * + *
            +     * Output only. Represents the relevance score based on similarity.
            +     * Higher score indicates higher chunk relevance.
            +     * The score is in range [-1.0, 1.0].
            +     * Only populated on
            +     * [SearchResponse][google.cloud.discoveryengine.v1beta.SearchResponse].
            +     * 
            + * + * optional double relevance_score = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearRelevanceScore() { + bitField0_ = (bitField0_ & ~0x00000008); + relevanceScore_ = 0D; + onChanged(); + return this; + } - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } + private com.google.cloud.discoveryengine.v1beta.Chunk.DocumentMetadata documentMetadata_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.Chunk.DocumentMetadata, + com.google.cloud.discoveryengine.v1beta.Chunk.DocumentMetadata.Builder, + com.google.cloud.discoveryengine.v1beta.Chunk.DocumentMetadataOrBuilder> + documentMetadataBuilder_; - /** - * - * - *
            -   * Chunk captures all raw metadata information of items to be recommended or
            -   * searched in the chunk mode.
            -   * 
            - * - * Protobuf type {@code google.cloud.discoveryengine.v1beta.Chunk} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.Chunk) - com.google.cloud.discoveryengine.v1beta.ChunkOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.discoveryengine.v1beta.ChunkProto - .internal_static_google_cloud_discoveryengine_v1beta_Chunk_descriptor; + /** + * + * + *
            +     * Metadata of the document from the current chunk.
            +     * 
            + * + * .google.cloud.discoveryengine.v1beta.Chunk.DocumentMetadata document_metadata = 5; + * + * + * @return Whether the documentMetadata field is set. + */ + public boolean hasDocumentMetadata() { + return ((bitField0_ & 0x00000010) != 0); } - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.discoveryengine.v1beta.ChunkProto - .internal_static_google_cloud_discoveryengine_v1beta_Chunk_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.discoveryengine.v1beta.Chunk.class, - com.google.cloud.discoveryengine.v1beta.Chunk.Builder.class); + /** + * + * + *
            +     * Metadata of the document from the current chunk.
            +     * 
            + * + * .google.cloud.discoveryengine.v1beta.Chunk.DocumentMetadata document_metadata = 5; + * + * + * @return The documentMetadata. + */ + public com.google.cloud.discoveryengine.v1beta.Chunk.DocumentMetadata getDocumentMetadata() { + if (documentMetadataBuilder_ == null) { + return documentMetadata_ == null + ? com.google.cloud.discoveryengine.v1beta.Chunk.DocumentMetadata.getDefaultInstance() + : documentMetadata_; + } else { + return documentMetadataBuilder_.getMessage(); + } } - // Construct using com.google.cloud.discoveryengine.v1beta.Chunk.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); + /** + * + * + *
            +     * Metadata of the document from the current chunk.
            +     * 
            + * + * .google.cloud.discoveryengine.v1beta.Chunk.DocumentMetadata document_metadata = 5; + * + */ + public Builder setDocumentMetadata( + com.google.cloud.discoveryengine.v1beta.Chunk.DocumentMetadata value) { + if (documentMetadataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + documentMetadata_ = value; + } else { + documentMetadataBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; } - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); + /** + * + * + *
            +     * Metadata of the document from the current chunk.
            +     * 
            + * + * .google.cloud.discoveryengine.v1beta.Chunk.DocumentMetadata document_metadata = 5; + * + */ + public Builder setDocumentMetadata( + com.google.cloud.discoveryengine.v1beta.Chunk.DocumentMetadata.Builder builderForValue) { + if (documentMetadataBuilder_ == null) { + documentMetadata_ = builderForValue.build(); + } else { + documentMetadataBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - internalGetDocumentMetadataFieldBuilder(); - internalGetDerivedStructDataFieldBuilder(); - internalGetPageSpanFieldBuilder(); - internalGetChunkMetadataFieldBuilder(); + /** + * + * + *
            +     * Metadata of the document from the current chunk.
            +     * 
            + * + * .google.cloud.discoveryengine.v1beta.Chunk.DocumentMetadata document_metadata = 5; + * + */ + public Builder mergeDocumentMetadata( + com.google.cloud.discoveryengine.v1beta.Chunk.DocumentMetadata value) { + if (documentMetadataBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) + && documentMetadata_ != null + && documentMetadata_ + != com.google.cloud.discoveryengine.v1beta.Chunk.DocumentMetadata + .getDefaultInstance()) { + getDocumentMetadataBuilder().mergeFrom(value); + } else { + documentMetadata_ = value; + } + } else { + documentMetadataBuilder_.mergeFrom(value); + } + if (documentMetadata_ != null) { + bitField0_ |= 0x00000010; + onChanged(); } + return this; } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - name_ = ""; - id_ = ""; - content_ = ""; - relevanceScore_ = 0D; + /** + * + * + *
            +     * Metadata of the document from the current chunk.
            +     * 
            + * + * .google.cloud.discoveryengine.v1beta.Chunk.DocumentMetadata document_metadata = 5; + * + */ + public Builder clearDocumentMetadata() { + bitField0_ = (bitField0_ & ~0x00000010); documentMetadata_ = null; if (documentMetadataBuilder_ != null) { documentMetadataBuilder_.dispose(); documentMetadataBuilder_ = null; } - derivedStructData_ = null; - if (derivedStructDataBuilder_ != null) { - derivedStructDataBuilder_.dispose(); - derivedStructDataBuilder_ = null; - } - pageSpan_ = null; - if (pageSpanBuilder_ != null) { - pageSpanBuilder_.dispose(); - pageSpanBuilder_ = null; - } - chunkMetadata_ = null; - if (chunkMetadataBuilder_ != null) { - chunkMetadataBuilder_.dispose(); - chunkMetadataBuilder_ = null; - } + onChanged(); return this; } - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.discoveryengine.v1beta.ChunkProto - .internal_static_google_cloud_discoveryengine_v1beta_Chunk_descriptor; + /** + * + * + *
            +     * Metadata of the document from the current chunk.
            +     * 
            + * + * .google.cloud.discoveryengine.v1beta.Chunk.DocumentMetadata document_metadata = 5; + * + */ + public com.google.cloud.discoveryengine.v1beta.Chunk.DocumentMetadata.Builder + getDocumentMetadataBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return internalGetDocumentMetadataFieldBuilder().getBuilder(); } - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.Chunk getDefaultInstanceForType() { - return com.google.cloud.discoveryengine.v1beta.Chunk.getDefaultInstance(); + /** + * + * + *
            +     * Metadata of the document from the current chunk.
            +     * 
            + * + * .google.cloud.discoveryengine.v1beta.Chunk.DocumentMetadata document_metadata = 5; + * + */ + public com.google.cloud.discoveryengine.v1beta.Chunk.DocumentMetadataOrBuilder + getDocumentMetadataOrBuilder() { + if (documentMetadataBuilder_ != null) { + return documentMetadataBuilder_.getMessageOrBuilder(); + } else { + return documentMetadata_ == null + ? com.google.cloud.discoveryengine.v1beta.Chunk.DocumentMetadata.getDefaultInstance() + : documentMetadata_; + } } - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.Chunk build() { - com.google.cloud.discoveryengine.v1beta.Chunk result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); + /** + * + * + *
            +     * Metadata of the document from the current chunk.
            +     * 
            + * + * .google.cloud.discoveryengine.v1beta.Chunk.DocumentMetadata document_metadata = 5; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.Chunk.DocumentMetadata, + com.google.cloud.discoveryengine.v1beta.Chunk.DocumentMetadata.Builder, + com.google.cloud.discoveryengine.v1beta.Chunk.DocumentMetadataOrBuilder> + internalGetDocumentMetadataFieldBuilder() { + if (documentMetadataBuilder_ == null) { + documentMetadataBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.Chunk.DocumentMetadata, + com.google.cloud.discoveryengine.v1beta.Chunk.DocumentMetadata.Builder, + com.google.cloud.discoveryengine.v1beta.Chunk.DocumentMetadataOrBuilder>( + getDocumentMetadata(), getParentForChildren(), isClean()); + documentMetadata_ = null; } - return result; + return documentMetadataBuilder_; } - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.Chunk buildPartial() { - com.google.cloud.discoveryengine.v1beta.Chunk result = - new com.google.cloud.discoveryengine.v1beta.Chunk(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; + private com.google.protobuf.Struct derivedStructData_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Struct, + com.google.protobuf.Struct.Builder, + com.google.protobuf.StructOrBuilder> + derivedStructDataBuilder_; + + /** + * + * + *
            +     * Output only. This field is OUTPUT_ONLY.
            +     * It contains derived data that are not in the original input document.
            +     * 
            + * + * + * .google.protobuf.Struct derived_struct_data = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the derivedStructData field is set. + */ + public boolean hasDerivedStructData() { + return ((bitField0_ & 0x00000020) != 0); } - private void buildPartial0(com.google.cloud.discoveryengine.v1beta.Chunk result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.name_ = name_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.id_ = id_; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.content_ = content_; - } - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000008) != 0)) { - result.relevanceScore_ = relevanceScore_; - to_bitField0_ |= 0x00000001; - } - if (((from_bitField0_ & 0x00000010) != 0)) { - result.documentMetadata_ = - documentMetadataBuilder_ == null ? documentMetadata_ : documentMetadataBuilder_.build(); - to_bitField0_ |= 0x00000002; - } - if (((from_bitField0_ & 0x00000020) != 0)) { - result.derivedStructData_ = - derivedStructDataBuilder_ == null - ? derivedStructData_ - : derivedStructDataBuilder_.build(); - to_bitField0_ |= 0x00000004; - } - if (((from_bitField0_ & 0x00000040) != 0)) { - result.pageSpan_ = pageSpanBuilder_ == null ? pageSpan_ : pageSpanBuilder_.build(); - to_bitField0_ |= 0x00000008; + /** + * + * + *
            +     * Output only. This field is OUTPUT_ONLY.
            +     * It contains derived data that are not in the original input document.
            +     * 
            + * + * + * .google.protobuf.Struct derived_struct_data = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The derivedStructData. + */ + public com.google.protobuf.Struct getDerivedStructData() { + if (derivedStructDataBuilder_ == null) { + return derivedStructData_ == null + ? com.google.protobuf.Struct.getDefaultInstance() + : derivedStructData_; + } else { + return derivedStructDataBuilder_.getMessage(); } - if (((from_bitField0_ & 0x00000080) != 0)) { - result.chunkMetadata_ = - chunkMetadataBuilder_ == null ? chunkMetadata_ : chunkMetadataBuilder_.build(); - to_bitField0_ |= 0x00000010; + } + + /** + * + * + *
            +     * Output only. This field is OUTPUT_ONLY.
            +     * It contains derived data that are not in the original input document.
            +     * 
            + * + * + * .google.protobuf.Struct derived_struct_data = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setDerivedStructData(com.google.protobuf.Struct value) { + if (derivedStructDataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + derivedStructData_ = value; + } else { + derivedStructDataBuilder_.setMessage(value); } - result.bitField0_ |= to_bitField0_; + bitField0_ |= 0x00000020; + onChanged(); + return this; } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.discoveryengine.v1beta.Chunk) { - return mergeFrom((com.google.cloud.discoveryengine.v1beta.Chunk) other); + /** + * + * + *
            +     * Output only. This field is OUTPUT_ONLY.
            +     * It contains derived data that are not in the original input document.
            +     * 
            + * + * + * .google.protobuf.Struct derived_struct_data = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setDerivedStructData(com.google.protobuf.Struct.Builder builderForValue) { + if (derivedStructDataBuilder_ == null) { + derivedStructData_ = builderForValue.build(); } else { - super.mergeFrom(other); - return this; + derivedStructDataBuilder_.setMessage(builderForValue.build()); } + bitField0_ |= 0x00000020; + onChanged(); + return this; } - public Builder mergeFrom(com.google.cloud.discoveryengine.v1beta.Chunk other) { - if (other == com.google.cloud.discoveryengine.v1beta.Chunk.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (!other.getId().isEmpty()) { - id_ = other.id_; - bitField0_ |= 0x00000002; - onChanged(); + /** + * + * + *
            +     * Output only. This field is OUTPUT_ONLY.
            +     * It contains derived data that are not in the original input document.
            +     * 
            + * + * + * .google.protobuf.Struct derived_struct_data = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeDerivedStructData(com.google.protobuf.Struct value) { + if (derivedStructDataBuilder_ == null) { + if (((bitField0_ & 0x00000020) != 0) + && derivedStructData_ != null + && derivedStructData_ != com.google.protobuf.Struct.getDefaultInstance()) { + getDerivedStructDataBuilder().mergeFrom(value); + } else { + derivedStructData_ = value; + } + } else { + derivedStructDataBuilder_.mergeFrom(value); } - if (!other.getContent().isEmpty()) { - content_ = other.content_; - bitField0_ |= 0x00000004; + if (derivedStructData_ != null) { + bitField0_ |= 0x00000020; onChanged(); } - if (other.hasRelevanceScore()) { - setRelevanceScore(other.getRelevanceScore()); - } - if (other.hasDocumentMetadata()) { - mergeDocumentMetadata(other.getDocumentMetadata()); - } - if (other.hasDerivedStructData()) { - mergeDerivedStructData(other.getDerivedStructData()); - } - if (other.hasPageSpan()) { - mergePageSpan(other.getPageSpan()); - } - if (other.hasChunkMetadata()) { - mergeChunkMetadata(other.getChunkMetadata()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); return this; } - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); + /** + * + * + *
            +     * Output only. This field is OUTPUT_ONLY.
            +     * It contains derived data that are not in the original input document.
            +     * 
            + * + * + * .google.protobuf.Struct derived_struct_data = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearDerivedStructData() { + bitField0_ = (bitField0_ & ~0x00000020); + derivedStructData_ = null; + if (derivedStructDataBuilder_ != null) { + derivedStructDataBuilder_.dispose(); + derivedStructDataBuilder_ = null; } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - name_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: - { - id_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 26: - { - content_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - break; - } // case 26 - case 34: - { - input.readMessage( - internalGetDerivedStructDataFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000020; - break; - } // case 34 - case 42: - { - input.readMessage( - internalGetDocumentMetadataFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000010; - break; - } // case 42 - case 50: - { - input.readMessage( - internalGetPageSpanFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000040; - break; - } // case 50 - case 58: - { - input.readMessage( - internalGetChunkMetadataFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000080; - break; - } // case 58 - case 65: - { - relevanceScore_ = input.readDouble(); - bitField0_ |= 0x00000008; - break; - } // case 65 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally + onChanged(); return this; } - private int bitField0_; - - private java.lang.Object name_ = ""; - /** * * *
            -     * The full resource name of the chunk.
            -     * Format:
            -     * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document_id}/chunks/{chunk_id}`.
            -     *
            -     * This field must be a UTF-8 encoded string with a length limit of 1024
            -     * characters.
            +     * Output only. This field is OUTPUT_ONLY.
            +     * It contains derived data that are not in the original input document.
                  * 
            * - * string name = 1; + * + * .google.protobuf.Struct derived_struct_data = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Struct.Builder getDerivedStructDataBuilder() { + bitField0_ |= 0x00000020; + onChanged(); + return internalGetDerivedStructDataFieldBuilder().getBuilder(); + } + + /** * - * @return The name. + * + *
            +     * Output only. This field is OUTPUT_ONLY.
            +     * It contains derived data that are not in the original input document.
            +     * 
            + * + * + * .google.protobuf.Struct derived_struct_data = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; + public com.google.protobuf.StructOrBuilder getDerivedStructDataOrBuilder() { + if (derivedStructDataBuilder_ != null) { + return derivedStructDataBuilder_.getMessageOrBuilder(); } else { - return (java.lang.String) ref; + return derivedStructData_ == null + ? com.google.protobuf.Struct.getDefaultInstance() + : derivedStructData_; } } @@ -4683,174 +8153,163 @@ public java.lang.String getName() { * * *
            -     * The full resource name of the chunk.
            -     * Format:
            -     * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document_id}/chunks/{chunk_id}`.
            -     *
            -     * This field must be a UTF-8 encoded string with a length limit of 1024
            -     * characters.
            +     * Output only. This field is OUTPUT_ONLY.
            +     * It contains derived data that are not in the original input document.
                  * 
            * - * string name = 1; - * - * @return The bytes for name. + * + * .google.protobuf.Struct derived_struct_data = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ - public com.google.protobuf.ByteString getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Struct, + com.google.protobuf.Struct.Builder, + com.google.protobuf.StructOrBuilder> + internalGetDerivedStructDataFieldBuilder() { + if (derivedStructDataBuilder_ == null) { + derivedStructDataBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Struct, + com.google.protobuf.Struct.Builder, + com.google.protobuf.StructOrBuilder>( + getDerivedStructData(), getParentForChildren(), isClean()); + derivedStructData_ = null; } + return derivedStructDataBuilder_; } + private com.google.cloud.discoveryengine.v1beta.Chunk.PageSpan pageSpan_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.Chunk.PageSpan, + com.google.cloud.discoveryengine.v1beta.Chunk.PageSpan.Builder, + com.google.cloud.discoveryengine.v1beta.Chunk.PageSpanOrBuilder> + pageSpanBuilder_; + /** * * *
            -     * The full resource name of the chunk.
            -     * Format:
            -     * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document_id}/chunks/{chunk_id}`.
            -     *
            -     * This field must be a UTF-8 encoded string with a length limit of 1024
            -     * characters.
            +     * Page span of the chunk.
                  * 
            * - * string name = 1; + * .google.cloud.discoveryengine.v1beta.Chunk.PageSpan page_span = 6; * - * @param value The name to set. - * @return This builder for chaining. + * @return Whether the pageSpan field is set. */ - public Builder setName(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - name_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; + public boolean hasPageSpan() { + return ((bitField0_ & 0x00000040) != 0); } /** * * *
            -     * The full resource name of the chunk.
            -     * Format:
            -     * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document_id}/chunks/{chunk_id}`.
            -     *
            -     * This field must be a UTF-8 encoded string with a length limit of 1024
            -     * characters.
            +     * Page span of the chunk.
                  * 
            * - * string name = 1; + * .google.cloud.discoveryengine.v1beta.Chunk.PageSpan page_span = 6; * - * @return This builder for chaining. + * @return The pageSpan. */ - public Builder clearName() { - name_ = getDefaultInstance().getName(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; + public com.google.cloud.discoveryengine.v1beta.Chunk.PageSpan getPageSpan() { + if (pageSpanBuilder_ == null) { + return pageSpan_ == null + ? com.google.cloud.discoveryengine.v1beta.Chunk.PageSpan.getDefaultInstance() + : pageSpan_; + } else { + return pageSpanBuilder_.getMessage(); + } } /** * * *
            -     * The full resource name of the chunk.
            -     * Format:
            -     * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document_id}/chunks/{chunk_id}`.
            -     *
            -     * This field must be a UTF-8 encoded string with a length limit of 1024
            -     * characters.
            +     * Page span of the chunk.
                  * 
            * - * string name = 1; - * - * @param value The bytes for name to set. - * @return This builder for chaining. + * .google.cloud.discoveryengine.v1beta.Chunk.PageSpan page_span = 6; */ - public Builder setNameBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); + public Builder setPageSpan(com.google.cloud.discoveryengine.v1beta.Chunk.PageSpan value) { + if (pageSpanBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + pageSpan_ = value; + } else { + pageSpanBuilder_.setMessage(value); } - checkByteStringIsUtf8(value); - name_ = value; - bitField0_ |= 0x00000001; + bitField0_ |= 0x00000040; onChanged(); return this; } - private java.lang.Object id_ = ""; - /** * * *
            -     * Unique chunk ID of the current chunk.
            +     * Page span of the chunk.
                  * 
            * - * string id = 2; - * - * @return The id. + * .google.cloud.discoveryengine.v1beta.Chunk.PageSpan page_span = 6; */ - public java.lang.String getId() { - java.lang.Object ref = id_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - id_ = s; - return s; + public Builder setPageSpan( + com.google.cloud.discoveryengine.v1beta.Chunk.PageSpan.Builder builderForValue) { + if (pageSpanBuilder_ == null) { + pageSpan_ = builderForValue.build(); } else { - return (java.lang.String) ref; + pageSpanBuilder_.setMessage(builderForValue.build()); } + bitField0_ |= 0x00000040; + onChanged(); + return this; } /** * * *
            -     * Unique chunk ID of the current chunk.
            +     * Page span of the chunk.
                  * 
            * - * string id = 2; - * - * @return The bytes for id. + * .google.cloud.discoveryengine.v1beta.Chunk.PageSpan page_span = 6; */ - public com.google.protobuf.ByteString getIdBytes() { - java.lang.Object ref = id_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - id_ = b; - return b; + public Builder mergePageSpan(com.google.cloud.discoveryengine.v1beta.Chunk.PageSpan value) { + if (pageSpanBuilder_ == null) { + if (((bitField0_ & 0x00000040) != 0) + && pageSpan_ != null + && pageSpan_ + != com.google.cloud.discoveryengine.v1beta.Chunk.PageSpan.getDefaultInstance()) { + getPageSpanBuilder().mergeFrom(value); + } else { + pageSpan_ = value; + } } else { - return (com.google.protobuf.ByteString) ref; + pageSpanBuilder_.mergeFrom(value); } + if (pageSpan_ != null) { + bitField0_ |= 0x00000040; + onChanged(); + } + return this; } /** * * *
            -     * Unique chunk ID of the current chunk.
            +     * Page span of the chunk.
                  * 
            * - * string id = 2; - * - * @param value The id to set. - * @return This builder for chaining. + * .google.cloud.discoveryengine.v1beta.Chunk.PageSpan page_span = 6; */ - public Builder setId(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); + public Builder clearPageSpan() { + bitField0_ = (bitField0_ & ~0x00000040); + pageSpan_ = null; + if (pageSpanBuilder_ != null) { + pageSpanBuilder_.dispose(); + pageSpanBuilder_ = null; } - id_ = value; - bitField0_ |= 0x00000002; onChanged(); return this; } @@ -4859,127 +8318,131 @@ public Builder setId(java.lang.String value) { * * *
            -     * Unique chunk ID of the current chunk.
            +     * Page span of the chunk.
                  * 
            * - * string id = 2; - * - * @return This builder for chaining. + * .google.cloud.discoveryengine.v1beta.Chunk.PageSpan page_span = 6; */ - public Builder clearId() { - id_ = getDefaultInstance().getId(); - bitField0_ = (bitField0_ & ~0x00000002); + public com.google.cloud.discoveryengine.v1beta.Chunk.PageSpan.Builder getPageSpanBuilder() { + bitField0_ |= 0x00000040; onChanged(); - return this; + return internalGetPageSpanFieldBuilder().getBuilder(); } /** * * *
            -     * Unique chunk ID of the current chunk.
            +     * Page span of the chunk.
                  * 
            * - * string id = 2; - * - * @param value The bytes for id to set. - * @return This builder for chaining. + * .google.cloud.discoveryengine.v1beta.Chunk.PageSpan page_span = 6; */ - public Builder setIdBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); + public com.google.cloud.discoveryengine.v1beta.Chunk.PageSpanOrBuilder getPageSpanOrBuilder() { + if (pageSpanBuilder_ != null) { + return pageSpanBuilder_.getMessageOrBuilder(); + } else { + return pageSpan_ == null + ? com.google.cloud.discoveryengine.v1beta.Chunk.PageSpan.getDefaultInstance() + : pageSpan_; } - checkByteStringIsUtf8(value); - id_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; } - private java.lang.Object content_ = ""; - /** * * *
            -     * Content is a string from a document (parsed content).
            +     * Page span of the chunk.
                  * 
            * - * string content = 3; - * - * @return The content. + * .google.cloud.discoveryengine.v1beta.Chunk.PageSpan page_span = 6; */ - public java.lang.String getContent() { - java.lang.Object ref = content_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - content_ = s; - return s; - } else { - return (java.lang.String) ref; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.Chunk.PageSpan, + com.google.cloud.discoveryengine.v1beta.Chunk.PageSpan.Builder, + com.google.cloud.discoveryengine.v1beta.Chunk.PageSpanOrBuilder> + internalGetPageSpanFieldBuilder() { + if (pageSpanBuilder_ == null) { + pageSpanBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.Chunk.PageSpan, + com.google.cloud.discoveryengine.v1beta.Chunk.PageSpan.Builder, + com.google.cloud.discoveryengine.v1beta.Chunk.PageSpanOrBuilder>( + getPageSpan(), getParentForChildren(), isClean()); + pageSpan_ = null; } + return pageSpanBuilder_; } + private com.google.cloud.discoveryengine.v1beta.Chunk.ChunkMetadata chunkMetadata_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.Chunk.ChunkMetadata, + com.google.cloud.discoveryengine.v1beta.Chunk.ChunkMetadata.Builder, + com.google.cloud.discoveryengine.v1beta.Chunk.ChunkMetadataOrBuilder> + chunkMetadataBuilder_; + /** * * *
            -     * Content is a string from a document (parsed content).
            +     * Output only. Metadata of the current chunk.
                  * 
            * - * string content = 3; + * + * .google.cloud.discoveryengine.v1beta.Chunk.ChunkMetadata chunk_metadata = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * * - * @return The bytes for content. + * @return Whether the chunkMetadata field is set. */ - public com.google.protobuf.ByteString getContentBytes() { - java.lang.Object ref = content_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - content_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } + public boolean hasChunkMetadata() { + return ((bitField0_ & 0x00000080) != 0); } /** * * *
            -     * Content is a string from a document (parsed content).
            +     * Output only. Metadata of the current chunk.
                  * 
            * - * string content = 3; + * + * .google.cloud.discoveryengine.v1beta.Chunk.ChunkMetadata chunk_metadata = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * * - * @param value The content to set. - * @return This builder for chaining. + * @return The chunkMetadata. */ - public Builder setContent(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); + public com.google.cloud.discoveryengine.v1beta.Chunk.ChunkMetadata getChunkMetadata() { + if (chunkMetadataBuilder_ == null) { + return chunkMetadata_ == null + ? com.google.cloud.discoveryengine.v1beta.Chunk.ChunkMetadata.getDefaultInstance() + : chunkMetadata_; + } else { + return chunkMetadataBuilder_.getMessage(); } - content_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; } /** * * *
            -     * Content is a string from a document (parsed content).
            +     * Output only. Metadata of the current chunk.
                  * 
            * - * string content = 3; - * - * @return This builder for chaining. + * + * .google.cloud.discoveryengine.v1beta.Chunk.ChunkMetadata chunk_metadata = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ - public Builder clearContent() { - content_ = getDefaultInstance().getContent(); - bitField0_ = (bitField0_ & ~0x00000004); + public Builder setChunkMetadata( + com.google.cloud.discoveryengine.v1beta.Chunk.ChunkMetadata value) { + if (chunkMetadataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + chunkMetadata_ = value; + } else { + chunkMetadataBuilder_.setMessage(value); + } + bitField0_ |= 0x00000080; onChanged(); return this; } @@ -4988,234 +8451,262 @@ public Builder clearContent() { * * *
            -     * Content is a string from a document (parsed content).
            +     * Output only. Metadata of the current chunk.
                  * 
            * - * string content = 3; - * - * @param value The bytes for content to set. - * @return This builder for chaining. + * + * .google.cloud.discoveryengine.v1beta.Chunk.ChunkMetadata chunk_metadata = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ - public Builder setContentBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); + public Builder setChunkMetadata( + com.google.cloud.discoveryengine.v1beta.Chunk.ChunkMetadata.Builder builderForValue) { + if (chunkMetadataBuilder_ == null) { + chunkMetadata_ = builderForValue.build(); + } else { + chunkMetadataBuilder_.setMessage(builderForValue.build()); } - checkByteStringIsUtf8(value); - content_ = value; - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000080; onChanged(); return this; } - private double relevanceScore_; - /** * * *
            -     * Output only. Represents the relevance score based on similarity.
            -     * Higher score indicates higher chunk relevance.
            -     * The score is in range [-1.0, 1.0].
            -     * Only populated on [SearchService.SearchResponse][].
            +     * Output only. Metadata of the current chunk.
                  * 
            * - * optional double relevance_score = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * .google.cloud.discoveryengine.v1beta.Chunk.ChunkMetadata chunk_metadata = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; * - * - * @return Whether the relevanceScore field is set. */ - @java.lang.Override - public boolean hasRelevanceScore() { - return ((bitField0_ & 0x00000008) != 0); + public Builder mergeChunkMetadata( + com.google.cloud.discoveryengine.v1beta.Chunk.ChunkMetadata value) { + if (chunkMetadataBuilder_ == null) { + if (((bitField0_ & 0x00000080) != 0) + && chunkMetadata_ != null + && chunkMetadata_ + != com.google.cloud.discoveryengine.v1beta.Chunk.ChunkMetadata + .getDefaultInstance()) { + getChunkMetadataBuilder().mergeFrom(value); + } else { + chunkMetadata_ = value; + } + } else { + chunkMetadataBuilder_.mergeFrom(value); + } + if (chunkMetadata_ != null) { + bitField0_ |= 0x00000080; + onChanged(); + } + return this; } /** * * *
            -     * Output only. Represents the relevance score based on similarity.
            -     * Higher score indicates higher chunk relevance.
            -     * The score is in range [-1.0, 1.0].
            -     * Only populated on [SearchService.SearchResponse][].
            +     * Output only. Metadata of the current chunk.
                  * 
            * - * optional double relevance_score = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * .google.cloud.discoveryengine.v1beta.Chunk.ChunkMetadata chunk_metadata = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; * - * - * @return The relevanceScore. */ - @java.lang.Override - public double getRelevanceScore() { - return relevanceScore_; + public Builder clearChunkMetadata() { + bitField0_ = (bitField0_ & ~0x00000080); + chunkMetadata_ = null; + if (chunkMetadataBuilder_ != null) { + chunkMetadataBuilder_.dispose(); + chunkMetadataBuilder_ = null; + } + onChanged(); + return this; } /** * * *
            -     * Output only. Represents the relevance score based on similarity.
            -     * Higher score indicates higher chunk relevance.
            -     * The score is in range [-1.0, 1.0].
            -     * Only populated on [SearchService.SearchResponse][].
            +     * Output only. Metadata of the current chunk.
                  * 
            * - * optional double relevance_score = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * .google.cloud.discoveryengine.v1beta.Chunk.ChunkMetadata chunk_metadata = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; * - * - * @param value The relevanceScore to set. - * @return This builder for chaining. */ - public Builder setRelevanceScore(double value) { - - relevanceScore_ = value; - bitField0_ |= 0x00000008; + public com.google.cloud.discoveryengine.v1beta.Chunk.ChunkMetadata.Builder + getChunkMetadataBuilder() { + bitField0_ |= 0x00000080; onChanged(); - return this; + return internalGetChunkMetadataFieldBuilder().getBuilder(); } /** * * *
            -     * Output only. Represents the relevance score based on similarity.
            -     * Higher score indicates higher chunk relevance.
            -     * The score is in range [-1.0, 1.0].
            -     * Only populated on [SearchService.SearchResponse][].
            +     * Output only. Metadata of the current chunk.
                  * 
            * - * optional double relevance_score = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * .google.cloud.discoveryengine.v1beta.Chunk.ChunkMetadata chunk_metadata = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; * - * - * @return This builder for chaining. */ - public Builder clearRelevanceScore() { - bitField0_ = (bitField0_ & ~0x00000008); - relevanceScore_ = 0D; - onChanged(); - return this; + public com.google.cloud.discoveryengine.v1beta.Chunk.ChunkMetadataOrBuilder + getChunkMetadataOrBuilder() { + if (chunkMetadataBuilder_ != null) { + return chunkMetadataBuilder_.getMessageOrBuilder(); + } else { + return chunkMetadata_ == null + ? com.google.cloud.discoveryengine.v1beta.Chunk.ChunkMetadata.getDefaultInstance() + : chunkMetadata_; + } } - private com.google.cloud.discoveryengine.v1beta.Chunk.DocumentMetadata documentMetadata_; - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.discoveryengine.v1beta.Chunk.DocumentMetadata, - com.google.cloud.discoveryengine.v1beta.Chunk.DocumentMetadata.Builder, - com.google.cloud.discoveryengine.v1beta.Chunk.DocumentMetadataOrBuilder> - documentMetadataBuilder_; - /** * * *
            -     * Metadata of the document from the current chunk.
            +     * Output only. Metadata of the current chunk.
                  * 
            * - * .google.cloud.discoveryengine.v1beta.Chunk.DocumentMetadata document_metadata = 5; + * + * .google.cloud.discoveryengine.v1beta.Chunk.ChunkMetadata chunk_metadata = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; * - * - * @return Whether the documentMetadata field is set. */ - public boolean hasDocumentMetadata() { - return ((bitField0_ & 0x00000010) != 0); + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.Chunk.ChunkMetadata, + com.google.cloud.discoveryengine.v1beta.Chunk.ChunkMetadata.Builder, + com.google.cloud.discoveryengine.v1beta.Chunk.ChunkMetadataOrBuilder> + internalGetChunkMetadataFieldBuilder() { + if (chunkMetadataBuilder_ == null) { + chunkMetadataBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.Chunk.ChunkMetadata, + com.google.cloud.discoveryengine.v1beta.Chunk.ChunkMetadata.Builder, + com.google.cloud.discoveryengine.v1beta.Chunk.ChunkMetadataOrBuilder>( + getChunkMetadata(), getParentForChildren(), isClean()); + chunkMetadata_ = null; + } + return chunkMetadataBuilder_; + } + + private com.google.protobuf.LazyStringArrayList dataUrls_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureDataUrlsIsMutable() { + if (!dataUrls_.isModifiable()) { + dataUrls_ = new com.google.protobuf.LazyStringArrayList(dataUrls_); + } + bitField0_ |= 0x00000100; } /** * * *
            -     * Metadata of the document from the current chunk.
            +     * Output only. Image Data URLs if the current chunk contains images.
            +     * Data URLs are composed of four parts: a prefix (data:), a MIME type
            +     * indicating the type of data, an optional base64 token if non-textual,
            +     * and the data itself:
            +     * data:[<mediatype>][;base64],<data>
                  * 
            * - * .google.cloud.discoveryengine.v1beta.Chunk.DocumentMetadata document_metadata = 5; - * + * repeated string data_urls = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; * - * @return The documentMetadata. + * @return A list containing the dataUrls. */ - public com.google.cloud.discoveryengine.v1beta.Chunk.DocumentMetadata getDocumentMetadata() { - if (documentMetadataBuilder_ == null) { - return documentMetadata_ == null - ? com.google.cloud.discoveryengine.v1beta.Chunk.DocumentMetadata.getDefaultInstance() - : documentMetadata_; - } else { - return documentMetadataBuilder_.getMessage(); - } + public com.google.protobuf.ProtocolStringList getDataUrlsList() { + dataUrls_.makeImmutable(); + return dataUrls_; } /** * * *
            -     * Metadata of the document from the current chunk.
            +     * Output only. Image Data URLs if the current chunk contains images.
            +     * Data URLs are composed of four parts: a prefix (data:), a MIME type
            +     * indicating the type of data, an optional base64 token if non-textual,
            +     * and the data itself:
            +     * data:[<mediatype>][;base64],<data>
                  * 
            * - * .google.cloud.discoveryengine.v1beta.Chunk.DocumentMetadata document_metadata = 5; - * + * repeated string data_urls = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The count of dataUrls. */ - public Builder setDocumentMetadata( - com.google.cloud.discoveryengine.v1beta.Chunk.DocumentMetadata value) { - if (documentMetadataBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - documentMetadata_ = value; - } else { - documentMetadataBuilder_.setMessage(value); - } - bitField0_ |= 0x00000010; - onChanged(); - return this; + public int getDataUrlsCount() { + return dataUrls_.size(); } /** * * *
            -     * Metadata of the document from the current chunk.
            +     * Output only. Image Data URLs if the current chunk contains images.
            +     * Data URLs are composed of four parts: a prefix (data:), a MIME type
            +     * indicating the type of data, an optional base64 token if non-textual,
            +     * and the data itself:
            +     * data:[<mediatype>][;base64],<data>
                  * 
            * - * .google.cloud.discoveryengine.v1beta.Chunk.DocumentMetadata document_metadata = 5; - * + * repeated string data_urls = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param index The index of the element to return. + * @return The dataUrls at the given index. */ - public Builder setDocumentMetadata( - com.google.cloud.discoveryengine.v1beta.Chunk.DocumentMetadata.Builder builderForValue) { - if (documentMetadataBuilder_ == null) { - documentMetadata_ = builderForValue.build(); - } else { - documentMetadataBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000010; - onChanged(); - return this; + public java.lang.String getDataUrls(int index) { + return dataUrls_.get(index); + } + + /** + * + * + *
            +     * Output only. Image Data URLs if the current chunk contains images.
            +     * Data URLs are composed of four parts: a prefix (data:), a MIME type
            +     * indicating the type of data, an optional base64 token if non-textual,
            +     * and the data itself:
            +     * data:[<mediatype>][;base64],<data>
            +     * 
            + * + * repeated string data_urls = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param index The index of the value to return. + * @return The bytes of the dataUrls at the given index. + */ + public com.google.protobuf.ByteString getDataUrlsBytes(int index) { + return dataUrls_.getByteString(index); } /** * * *
            -     * Metadata of the document from the current chunk.
            +     * Output only. Image Data URLs if the current chunk contains images.
            +     * Data URLs are composed of four parts: a prefix (data:), a MIME type
            +     * indicating the type of data, an optional base64 token if non-textual,
            +     * and the data itself:
            +     * data:[<mediatype>][;base64],<data>
                  * 
            * - * .google.cloud.discoveryengine.v1beta.Chunk.DocumentMetadata document_metadata = 5; - * + * repeated string data_urls = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param index The index to set the value at. + * @param value The dataUrls to set. + * @return This builder for chaining. */ - public Builder mergeDocumentMetadata( - com.google.cloud.discoveryengine.v1beta.Chunk.DocumentMetadata value) { - if (documentMetadataBuilder_ == null) { - if (((bitField0_ & 0x00000010) != 0) - && documentMetadata_ != null - && documentMetadata_ - != com.google.cloud.discoveryengine.v1beta.Chunk.DocumentMetadata - .getDefaultInstance()) { - getDocumentMetadataBuilder().mergeFrom(value); - } else { - documentMetadata_ = value; - } - } else { - documentMetadataBuilder_.mergeFrom(value); - } - if (documentMetadata_ != null) { - bitField0_ |= 0x00000010; - onChanged(); + public Builder setDataUrls(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); } + ensureDataUrlsIsMutable(); + dataUrls_.set(index, value); + bitField0_ |= 0x00000100; + onChanged(); return this; } @@ -5223,19 +8714,25 @@ public Builder mergeDocumentMetadata( * * *
            -     * Metadata of the document from the current chunk.
            +     * Output only. Image Data URLs if the current chunk contains images.
            +     * Data URLs are composed of four parts: a prefix (data:), a MIME type
            +     * indicating the type of data, an optional base64 token if non-textual,
            +     * and the data itself:
            +     * data:[<mediatype>][;base64],<data>
                  * 
            * - * .google.cloud.discoveryengine.v1beta.Chunk.DocumentMetadata document_metadata = 5; - * + * repeated string data_urls = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The dataUrls to add. + * @return This builder for chaining. */ - public Builder clearDocumentMetadata() { - bitField0_ = (bitField0_ & ~0x00000010); - documentMetadata_ = null; - if (documentMetadataBuilder_ != null) { - documentMetadataBuilder_.dispose(); - documentMetadataBuilder_ = null; + public Builder addDataUrls(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); } + ensureDataUrlsIsMutable(); + dataUrls_.add(value); + bitField0_ |= 0x00000100; onChanged(); return this; } @@ -5244,193 +8741,176 @@ public Builder clearDocumentMetadata() { * * *
            -     * Metadata of the document from the current chunk.
            +     * Output only. Image Data URLs if the current chunk contains images.
            +     * Data URLs are composed of four parts: a prefix (data:), a MIME type
            +     * indicating the type of data, an optional base64 token if non-textual,
            +     * and the data itself:
            +     * data:[<mediatype>][;base64],<data>
                  * 
            * - * .google.cloud.discoveryengine.v1beta.Chunk.DocumentMetadata document_metadata = 5; - * + * repeated string data_urls = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param values The dataUrls to add. + * @return This builder for chaining. */ - public com.google.cloud.discoveryengine.v1beta.Chunk.DocumentMetadata.Builder - getDocumentMetadataBuilder() { - bitField0_ |= 0x00000010; + public Builder addAllDataUrls(java.lang.Iterable values) { + ensureDataUrlsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, dataUrls_); + bitField0_ |= 0x00000100; onChanged(); - return internalGetDocumentMetadataFieldBuilder().getBuilder(); + return this; } /** * * *
            -     * Metadata of the document from the current chunk.
            +     * Output only. Image Data URLs if the current chunk contains images.
            +     * Data URLs are composed of four parts: a prefix (data:), a MIME type
            +     * indicating the type of data, an optional base64 token if non-textual,
            +     * and the data itself:
            +     * data:[<mediatype>][;base64],<data>
                  * 
            * - * .google.cloud.discoveryengine.v1beta.Chunk.DocumentMetadata document_metadata = 5; - * + * repeated string data_urls = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. */ - public com.google.cloud.discoveryengine.v1beta.Chunk.DocumentMetadataOrBuilder - getDocumentMetadataOrBuilder() { - if (documentMetadataBuilder_ != null) { - return documentMetadataBuilder_.getMessageOrBuilder(); - } else { - return documentMetadata_ == null - ? com.google.cloud.discoveryengine.v1beta.Chunk.DocumentMetadata.getDefaultInstance() - : documentMetadata_; - } + public Builder clearDataUrls() { + dataUrls_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000100); + ; + onChanged(); + return this; } /** * * *
            -     * Metadata of the document from the current chunk.
            +     * Output only. Image Data URLs if the current chunk contains images.
            +     * Data URLs are composed of four parts: a prefix (data:), a MIME type
            +     * indicating the type of data, an optional base64 token if non-textual,
            +     * and the data itself:
            +     * data:[<mediatype>][;base64],<data>
                  * 
            * - * .google.cloud.discoveryengine.v1beta.Chunk.DocumentMetadata document_metadata = 5; - * + * repeated string data_urls = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes of the dataUrls to add. + * @return This builder for chaining. */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.discoveryengine.v1beta.Chunk.DocumentMetadata, - com.google.cloud.discoveryengine.v1beta.Chunk.DocumentMetadata.Builder, - com.google.cloud.discoveryengine.v1beta.Chunk.DocumentMetadataOrBuilder> - internalGetDocumentMetadataFieldBuilder() { - if (documentMetadataBuilder_ == null) { - documentMetadataBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.discoveryengine.v1beta.Chunk.DocumentMetadata, - com.google.cloud.discoveryengine.v1beta.Chunk.DocumentMetadata.Builder, - com.google.cloud.discoveryengine.v1beta.Chunk.DocumentMetadataOrBuilder>( - getDocumentMetadata(), getParentForChildren(), isClean()); - documentMetadata_ = null; + public Builder addDataUrlsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); } - return documentMetadataBuilder_; + checkByteStringIsUtf8(value); + ensureDataUrlsIsMutable(); + dataUrls_.add(value); + bitField0_ |= 0x00000100; + onChanged(); + return this; } - private com.google.protobuf.Struct derivedStructData_; - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Struct, - com.google.protobuf.Struct.Builder, - com.google.protobuf.StructOrBuilder> - derivedStructDataBuilder_; + private com.google.protobuf.LazyStringArrayList annotationContents_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureAnnotationContentsIsMutable() { + if (!annotationContents_.isModifiable()) { + annotationContents_ = new com.google.protobuf.LazyStringArrayList(annotationContents_); + } + bitField0_ |= 0x00000200; + } /** * * *
            -     * Output only. This field is OUTPUT_ONLY.
            -     * It contains derived data that are not in the original input document.
            +     * Output only. Annotation contents if the current chunk contains annotations.
                  * 
            * - * - * .google.protobuf.Struct derived_struct_data = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * repeated string annotation_contents = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * - * @return Whether the derivedStructData field is set. + * @return A list containing the annotationContents. */ - public boolean hasDerivedStructData() { - return ((bitField0_ & 0x00000020) != 0); + public com.google.protobuf.ProtocolStringList getAnnotationContentsList() { + annotationContents_.makeImmutable(); + return annotationContents_; } /** * * *
            -     * Output only. This field is OUTPUT_ONLY.
            -     * It contains derived data that are not in the original input document.
            +     * Output only. Annotation contents if the current chunk contains annotations.
                  * 
            * - * - * .google.protobuf.Struct derived_struct_data = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * repeated string annotation_contents = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * - * @return The derivedStructData. + * @return The count of annotationContents. */ - public com.google.protobuf.Struct getDerivedStructData() { - if (derivedStructDataBuilder_ == null) { - return derivedStructData_ == null - ? com.google.protobuf.Struct.getDefaultInstance() - : derivedStructData_; - } else { - return derivedStructDataBuilder_.getMessage(); - } + public int getAnnotationContentsCount() { + return annotationContents_.size(); } /** * * *
            -     * Output only. This field is OUTPUT_ONLY.
            -     * It contains derived data that are not in the original input document.
            +     * Output only. Annotation contents if the current chunk contains annotations.
                  * 
            * - * - * .google.protobuf.Struct derived_struct_data = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * repeated string annotation_contents = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; * + * + * @param index The index of the element to return. + * @return The annotationContents at the given index. */ - public Builder setDerivedStructData(com.google.protobuf.Struct value) { - if (derivedStructDataBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - derivedStructData_ = value; - } else { - derivedStructDataBuilder_.setMessage(value); - } - bitField0_ |= 0x00000020; - onChanged(); - return this; + public java.lang.String getAnnotationContents(int index) { + return annotationContents_.get(index); } /** * * *
            -     * Output only. This field is OUTPUT_ONLY.
            -     * It contains derived data that are not in the original input document.
            +     * Output only. Annotation contents if the current chunk contains annotations.
                  * 
            * - * - * .google.protobuf.Struct derived_struct_data = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * repeated string annotation_contents = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; * + * + * @param index The index of the value to return. + * @return The bytes of the annotationContents at the given index. */ - public Builder setDerivedStructData(com.google.protobuf.Struct.Builder builderForValue) { - if (derivedStructDataBuilder_ == null) { - derivedStructData_ = builderForValue.build(); - } else { - derivedStructDataBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000020; - onChanged(); - return this; + public com.google.protobuf.ByteString getAnnotationContentsBytes(int index) { + return annotationContents_.getByteString(index); } /** * * *
            -     * Output only. This field is OUTPUT_ONLY.
            -     * It contains derived data that are not in the original input document.
            +     * Output only. Annotation contents if the current chunk contains annotations.
                  * 
            * - * - * .google.protobuf.Struct derived_struct_data = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * repeated string annotation_contents = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; * + * + * @param index The index to set the value at. + * @param value The annotationContents to set. + * @return This builder for chaining. */ - public Builder mergeDerivedStructData(com.google.protobuf.Struct value) { - if (derivedStructDataBuilder_ == null) { - if (((bitField0_ & 0x00000020) != 0) - && derivedStructData_ != null - && derivedStructData_ != com.google.protobuf.Struct.getDefaultInstance()) { - getDerivedStructDataBuilder().mergeFrom(value); - } else { - derivedStructData_ = value; - } - } else { - derivedStructDataBuilder_.mergeFrom(value); - } - if (derivedStructData_ != null) { - bitField0_ |= 0x00000020; - onChanged(); + public Builder setAnnotationContents(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); } + ensureAnnotationContentsIsMutable(); + annotationContents_.set(index, value); + bitField0_ |= 0x00000200; + onChanged(); return this; } @@ -5438,21 +8918,22 @@ public Builder mergeDerivedStructData(com.google.protobuf.Struct value) { * * *
            -     * Output only. This field is OUTPUT_ONLY.
            -     * It contains derived data that are not in the original input document.
            +     * Output only. Annotation contents if the current chunk contains annotations.
                  * 
            * - * - * .google.protobuf.Struct derived_struct_data = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * repeated string annotation_contents = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; * + * + * @param value The annotationContents to add. + * @return This builder for chaining. */ - public Builder clearDerivedStructData() { - bitField0_ = (bitField0_ & ~0x00000020); - derivedStructData_ = null; - if (derivedStructDataBuilder_ != null) { - derivedStructDataBuilder_.dispose(); - derivedStructDataBuilder_ = null; + public Builder addAnnotationContents(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); } + ensureAnnotationContentsIsMutable(); + annotationContents_.add(value); + bitField0_ |= 0x00000200; onChanged(); return this; } @@ -5461,111 +8942,125 @@ public Builder clearDerivedStructData() { * * *
            -     * Output only. This field is OUTPUT_ONLY.
            -     * It contains derived data that are not in the original input document.
            +     * Output only. Annotation contents if the current chunk contains annotations.
                  * 
            * - * - * .google.protobuf.Struct derived_struct_data = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * repeated string annotation_contents = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; * + * + * @param values The annotationContents to add. + * @return This builder for chaining. */ - public com.google.protobuf.Struct.Builder getDerivedStructDataBuilder() { - bitField0_ |= 0x00000020; + public Builder addAllAnnotationContents(java.lang.Iterable values) { + ensureAnnotationContentsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, annotationContents_); + bitField0_ |= 0x00000200; onChanged(); - return internalGetDerivedStructDataFieldBuilder().getBuilder(); + return this; } /** * * *
            -     * Output only. This field is OUTPUT_ONLY.
            -     * It contains derived data that are not in the original input document.
            +     * Output only. Annotation contents if the current chunk contains annotations.
                  * 
            * - * - * .google.protobuf.Struct derived_struct_data = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * repeated string annotation_contents = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; * + * + * @return This builder for chaining. */ - public com.google.protobuf.StructOrBuilder getDerivedStructDataOrBuilder() { - if (derivedStructDataBuilder_ != null) { - return derivedStructDataBuilder_.getMessageOrBuilder(); - } else { - return derivedStructData_ == null - ? com.google.protobuf.Struct.getDefaultInstance() - : derivedStructData_; - } + public Builder clearAnnotationContents() { + annotationContents_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000200); + ; + onChanged(); + return this; } /** * * *
            -     * Output only. This field is OUTPUT_ONLY.
            -     * It contains derived data that are not in the original input document.
            +     * Output only. Annotation contents if the current chunk contains annotations.
                  * 
            * - * - * .google.protobuf.Struct derived_struct_data = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * repeated string annotation_contents = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; * + * + * @param value The bytes of the annotationContents to add. + * @return This builder for chaining. */ - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Struct, - com.google.protobuf.Struct.Builder, - com.google.protobuf.StructOrBuilder> - internalGetDerivedStructDataFieldBuilder() { - if (derivedStructDataBuilder_ == null) { - derivedStructDataBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Struct, - com.google.protobuf.Struct.Builder, - com.google.protobuf.StructOrBuilder>( - getDerivedStructData(), getParentForChildren(), isClean()); - derivedStructData_ = null; + public Builder addAnnotationContentsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); } - return derivedStructDataBuilder_; + checkByteStringIsUtf8(value); + ensureAnnotationContentsIsMutable(); + annotationContents_.add(value); + bitField0_ |= 0x00000200; + onChanged(); + return this; } - private com.google.cloud.discoveryengine.v1beta.Chunk.PageSpan pageSpan_; - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.discoveryengine.v1beta.Chunk.PageSpan, - com.google.cloud.discoveryengine.v1beta.Chunk.PageSpan.Builder, - com.google.cloud.discoveryengine.v1beta.Chunk.PageSpanOrBuilder> - pageSpanBuilder_; + private java.util.List + annotationMetadata_ = java.util.Collections.emptyList(); + + private void ensureAnnotationMetadataIsMutable() { + if (!((bitField0_ & 0x00000400) != 0)) { + annotationMetadata_ = + new java.util.ArrayList< + com.google.cloud.discoveryengine.v1beta.Chunk.AnnotationMetadata>( + annotationMetadata_); + bitField0_ |= 0x00000400; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.discoveryengine.v1beta.Chunk.AnnotationMetadata, + com.google.cloud.discoveryengine.v1beta.Chunk.AnnotationMetadata.Builder, + com.google.cloud.discoveryengine.v1beta.Chunk.AnnotationMetadataOrBuilder> + annotationMetadataBuilder_; /** * * *
            -     * Page span of the chunk.
            +     * Output only. The annotation metadata includes structured content in the
            +     * current chunk.
                  * 
            * - * .google.cloud.discoveryengine.v1beta.Chunk.PageSpan page_span = 6; - * - * @return Whether the pageSpan field is set. + * + * repeated .google.cloud.discoveryengine.v1beta.Chunk.AnnotationMetadata annotation_metadata = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ - public boolean hasPageSpan() { - return ((bitField0_ & 0x00000040) != 0); + public java.util.List + getAnnotationMetadataList() { + if (annotationMetadataBuilder_ == null) { + return java.util.Collections.unmodifiableList(annotationMetadata_); + } else { + return annotationMetadataBuilder_.getMessageList(); + } } /** * * *
            -     * Page span of the chunk.
            +     * Output only. The annotation metadata includes structured content in the
            +     * current chunk.
                  * 
            * - * .google.cloud.discoveryengine.v1beta.Chunk.PageSpan page_span = 6; - * - * @return The pageSpan. + * + * repeated .google.cloud.discoveryengine.v1beta.Chunk.AnnotationMetadata annotation_metadata = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ - public com.google.cloud.discoveryengine.v1beta.Chunk.PageSpan getPageSpan() { - if (pageSpanBuilder_ == null) { - return pageSpan_ == null - ? com.google.cloud.discoveryengine.v1beta.Chunk.PageSpan.getDefaultInstance() - : pageSpan_; + public int getAnnotationMetadataCount() { + if (annotationMetadataBuilder_ == null) { + return annotationMetadata_.size(); } else { - return pageSpanBuilder_.getMessage(); + return annotationMetadataBuilder_.getCount(); } } @@ -5573,43 +9068,47 @@ public com.google.cloud.discoveryengine.v1beta.Chunk.PageSpan getPageSpan() { * * *
            -     * Page span of the chunk.
            +     * Output only. The annotation metadata includes structured content in the
            +     * current chunk.
                  * 
            * - * .google.cloud.discoveryengine.v1beta.Chunk.PageSpan page_span = 6; + * + * repeated .google.cloud.discoveryengine.v1beta.Chunk.AnnotationMetadata annotation_metadata = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ - public Builder setPageSpan(com.google.cloud.discoveryengine.v1beta.Chunk.PageSpan value) { - if (pageSpanBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - pageSpan_ = value; + public com.google.cloud.discoveryengine.v1beta.Chunk.AnnotationMetadata getAnnotationMetadata( + int index) { + if (annotationMetadataBuilder_ == null) { + return annotationMetadata_.get(index); } else { - pageSpanBuilder_.setMessage(value); + return annotationMetadataBuilder_.getMessage(index); } - bitField0_ |= 0x00000040; - onChanged(); - return this; } /** * * *
            -     * Page span of the chunk.
            +     * Output only. The annotation metadata includes structured content in the
            +     * current chunk.
                  * 
            * - * .google.cloud.discoveryengine.v1beta.Chunk.PageSpan page_span = 6; + * + * repeated .google.cloud.discoveryengine.v1beta.Chunk.AnnotationMetadata annotation_metadata = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ - public Builder setPageSpan( - com.google.cloud.discoveryengine.v1beta.Chunk.PageSpan.Builder builderForValue) { - if (pageSpanBuilder_ == null) { - pageSpan_ = builderForValue.build(); + public Builder setAnnotationMetadata( + int index, com.google.cloud.discoveryengine.v1beta.Chunk.AnnotationMetadata value) { + if (annotationMetadataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAnnotationMetadataIsMutable(); + annotationMetadata_.set(index, value); + onChanged(); } else { - pageSpanBuilder_.setMessage(builderForValue.build()); + annotationMetadataBuilder_.setMessage(index, value); } - bitField0_ |= 0x00000040; - onChanged(); return this; } @@ -5617,27 +9116,23 @@ public Builder setPageSpan( * * *
            -     * Page span of the chunk.
            +     * Output only. The annotation metadata includes structured content in the
            +     * current chunk.
                  * 
            * - * .google.cloud.discoveryengine.v1beta.Chunk.PageSpan page_span = 6; + * + * repeated .google.cloud.discoveryengine.v1beta.Chunk.AnnotationMetadata annotation_metadata = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ - public Builder mergePageSpan(com.google.cloud.discoveryengine.v1beta.Chunk.PageSpan value) { - if (pageSpanBuilder_ == null) { - if (((bitField0_ & 0x00000040) != 0) - && pageSpan_ != null - && pageSpan_ - != com.google.cloud.discoveryengine.v1beta.Chunk.PageSpan.getDefaultInstance()) { - getPageSpanBuilder().mergeFrom(value); - } else { - pageSpan_ = value; - } - } else { - pageSpanBuilder_.mergeFrom(value); - } - if (pageSpan_ != null) { - bitField0_ |= 0x00000040; + public Builder setAnnotationMetadata( + int index, + com.google.cloud.discoveryengine.v1beta.Chunk.AnnotationMetadata.Builder builderForValue) { + if (annotationMetadataBuilder_ == null) { + ensureAnnotationMetadataIsMutable(); + annotationMetadata_.set(index, builderForValue.build()); onChanged(); + } else { + annotationMetadataBuilder_.setMessage(index, builderForValue.build()); } return this; } @@ -5646,19 +9141,26 @@ public Builder mergePageSpan(com.google.cloud.discoveryengine.v1beta.Chunk.PageS * * *
            -     * Page span of the chunk.
            +     * Output only. The annotation metadata includes structured content in the
            +     * current chunk.
                  * 
            * - * .google.cloud.discoveryengine.v1beta.Chunk.PageSpan page_span = 6; + * + * repeated .google.cloud.discoveryengine.v1beta.Chunk.AnnotationMetadata annotation_metadata = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ - public Builder clearPageSpan() { - bitField0_ = (bitField0_ & ~0x00000040); - pageSpan_ = null; - if (pageSpanBuilder_ != null) { - pageSpanBuilder_.dispose(); - pageSpanBuilder_ = null; + public Builder addAnnotationMetadata( + com.google.cloud.discoveryengine.v1beta.Chunk.AnnotationMetadata value) { + if (annotationMetadataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAnnotationMetadataIsMutable(); + annotationMetadata_.add(value); + onChanged(); + } else { + annotationMetadataBuilder_.addMessage(value); } - onChanged(); return this; } @@ -5666,132 +9168,147 @@ public Builder clearPageSpan() { * * *
            -     * Page span of the chunk.
            +     * Output only. The annotation metadata includes structured content in the
            +     * current chunk.
                  * 
            * - * .google.cloud.discoveryengine.v1beta.Chunk.PageSpan page_span = 6; + * + * repeated .google.cloud.discoveryengine.v1beta.Chunk.AnnotationMetadata annotation_metadata = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ - public com.google.cloud.discoveryengine.v1beta.Chunk.PageSpan.Builder getPageSpanBuilder() { - bitField0_ |= 0x00000040; - onChanged(); - return internalGetPageSpanFieldBuilder().getBuilder(); + public Builder addAnnotationMetadata( + int index, com.google.cloud.discoveryengine.v1beta.Chunk.AnnotationMetadata value) { + if (annotationMetadataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAnnotationMetadataIsMutable(); + annotationMetadata_.add(index, value); + onChanged(); + } else { + annotationMetadataBuilder_.addMessage(index, value); + } + return this; } /** * * *
            -     * Page span of the chunk.
            +     * Output only. The annotation metadata includes structured content in the
            +     * current chunk.
                  * 
            * - * .google.cloud.discoveryengine.v1beta.Chunk.PageSpan page_span = 6; + * + * repeated .google.cloud.discoveryengine.v1beta.Chunk.AnnotationMetadata annotation_metadata = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ - public com.google.cloud.discoveryengine.v1beta.Chunk.PageSpanOrBuilder getPageSpanOrBuilder() { - if (pageSpanBuilder_ != null) { - return pageSpanBuilder_.getMessageOrBuilder(); + public Builder addAnnotationMetadata( + com.google.cloud.discoveryengine.v1beta.Chunk.AnnotationMetadata.Builder builderForValue) { + if (annotationMetadataBuilder_ == null) { + ensureAnnotationMetadataIsMutable(); + annotationMetadata_.add(builderForValue.build()); + onChanged(); } else { - return pageSpan_ == null - ? com.google.cloud.discoveryengine.v1beta.Chunk.PageSpan.getDefaultInstance() - : pageSpan_; + annotationMetadataBuilder_.addMessage(builderForValue.build()); } + return this; } /** * * *
            -     * Page span of the chunk.
            +     * Output only. The annotation metadata includes structured content in the
            +     * current chunk.
                  * 
            * - * .google.cloud.discoveryengine.v1beta.Chunk.PageSpan page_span = 6; + * + * repeated .google.cloud.discoveryengine.v1beta.Chunk.AnnotationMetadata annotation_metadata = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.discoveryengine.v1beta.Chunk.PageSpan, - com.google.cloud.discoveryengine.v1beta.Chunk.PageSpan.Builder, - com.google.cloud.discoveryengine.v1beta.Chunk.PageSpanOrBuilder> - internalGetPageSpanFieldBuilder() { - if (pageSpanBuilder_ == null) { - pageSpanBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.discoveryengine.v1beta.Chunk.PageSpan, - com.google.cloud.discoveryengine.v1beta.Chunk.PageSpan.Builder, - com.google.cloud.discoveryengine.v1beta.Chunk.PageSpanOrBuilder>( - getPageSpan(), getParentForChildren(), isClean()); - pageSpan_ = null; + public Builder addAnnotationMetadata( + int index, + com.google.cloud.discoveryengine.v1beta.Chunk.AnnotationMetadata.Builder builderForValue) { + if (annotationMetadataBuilder_ == null) { + ensureAnnotationMetadataIsMutable(); + annotationMetadata_.add(index, builderForValue.build()); + onChanged(); + } else { + annotationMetadataBuilder_.addMessage(index, builderForValue.build()); } - return pageSpanBuilder_; + return this; } - private com.google.cloud.discoveryengine.v1beta.Chunk.ChunkMetadata chunkMetadata_; - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.discoveryengine.v1beta.Chunk.ChunkMetadata, - com.google.cloud.discoveryengine.v1beta.Chunk.ChunkMetadata.Builder, - com.google.cloud.discoveryengine.v1beta.Chunk.ChunkMetadataOrBuilder> - chunkMetadataBuilder_; - /** * * *
            -     * Output only. Metadata of the current chunk.
            +     * Output only. The annotation metadata includes structured content in the
            +     * current chunk.
                  * 
            * * - * .google.cloud.discoveryengine.v1beta.Chunk.ChunkMetadata chunk_metadata = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * repeated .google.cloud.discoveryengine.v1beta.Chunk.AnnotationMetadata annotation_metadata = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; * - * - * @return Whether the chunkMetadata field is set. */ - public boolean hasChunkMetadata() { - return ((bitField0_ & 0x00000080) != 0); + public Builder addAllAnnotationMetadata( + java.lang.Iterable< + ? extends com.google.cloud.discoveryengine.v1beta.Chunk.AnnotationMetadata> + values) { + if (annotationMetadataBuilder_ == null) { + ensureAnnotationMetadataIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, annotationMetadata_); + onChanged(); + } else { + annotationMetadataBuilder_.addAllMessages(values); + } + return this; } /** * * *
            -     * Output only. Metadata of the current chunk.
            +     * Output only. The annotation metadata includes structured content in the
            +     * current chunk.
                  * 
            * * - * .google.cloud.discoveryengine.v1beta.Chunk.ChunkMetadata chunk_metadata = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * repeated .google.cloud.discoveryengine.v1beta.Chunk.AnnotationMetadata annotation_metadata = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; * - * - * @return The chunkMetadata. */ - public com.google.cloud.discoveryengine.v1beta.Chunk.ChunkMetadata getChunkMetadata() { - if (chunkMetadataBuilder_ == null) { - return chunkMetadata_ == null - ? com.google.cloud.discoveryengine.v1beta.Chunk.ChunkMetadata.getDefaultInstance() - : chunkMetadata_; + public Builder clearAnnotationMetadata() { + if (annotationMetadataBuilder_ == null) { + annotationMetadata_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000400); + onChanged(); } else { - return chunkMetadataBuilder_.getMessage(); + annotationMetadataBuilder_.clear(); } + return this; } /** * * *
            -     * Output only. Metadata of the current chunk.
            +     * Output only. The annotation metadata includes structured content in the
            +     * current chunk.
                  * 
            * * - * .google.cloud.discoveryengine.v1beta.Chunk.ChunkMetadata chunk_metadata = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * repeated .google.cloud.discoveryengine.v1beta.Chunk.AnnotationMetadata annotation_metadata = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ - public Builder setChunkMetadata( - com.google.cloud.discoveryengine.v1beta.Chunk.ChunkMetadata value) { - if (chunkMetadataBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - chunkMetadata_ = value; + public Builder removeAnnotationMetadata(int index) { + if (annotationMetadataBuilder_ == null) { + ensureAnnotationMetadataIsMutable(); + annotationMetadata_.remove(index); + onChanged(); } else { - chunkMetadataBuilder_.setMessage(value); + annotationMetadataBuilder_.remove(index); } - bitField0_ |= 0x00000080; - onChanged(); return this; } @@ -5799,146 +9316,138 @@ public Builder setChunkMetadata( * * *
            -     * Output only. Metadata of the current chunk.
            +     * Output only. The annotation metadata includes structured content in the
            +     * current chunk.
                  * 
            * * - * .google.cloud.discoveryengine.v1beta.Chunk.ChunkMetadata chunk_metadata = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * repeated .google.cloud.discoveryengine.v1beta.Chunk.AnnotationMetadata annotation_metadata = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ - public Builder setChunkMetadata( - com.google.cloud.discoveryengine.v1beta.Chunk.ChunkMetadata.Builder builderForValue) { - if (chunkMetadataBuilder_ == null) { - chunkMetadata_ = builderForValue.build(); - } else { - chunkMetadataBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000080; - onChanged(); - return this; + public com.google.cloud.discoveryengine.v1beta.Chunk.AnnotationMetadata.Builder + getAnnotationMetadataBuilder(int index) { + return internalGetAnnotationMetadataFieldBuilder().getBuilder(index); } /** * * *
            -     * Output only. Metadata of the current chunk.
            +     * Output only. The annotation metadata includes structured content in the
            +     * current chunk.
                  * 
            * * - * .google.cloud.discoveryengine.v1beta.Chunk.ChunkMetadata chunk_metadata = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * repeated .google.cloud.discoveryengine.v1beta.Chunk.AnnotationMetadata annotation_metadata = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ - public Builder mergeChunkMetadata( - com.google.cloud.discoveryengine.v1beta.Chunk.ChunkMetadata value) { - if (chunkMetadataBuilder_ == null) { - if (((bitField0_ & 0x00000080) != 0) - && chunkMetadata_ != null - && chunkMetadata_ - != com.google.cloud.discoveryengine.v1beta.Chunk.ChunkMetadata - .getDefaultInstance()) { - getChunkMetadataBuilder().mergeFrom(value); - } else { - chunkMetadata_ = value; - } + public com.google.cloud.discoveryengine.v1beta.Chunk.AnnotationMetadataOrBuilder + getAnnotationMetadataOrBuilder(int index) { + if (annotationMetadataBuilder_ == null) { + return annotationMetadata_.get(index); } else { - chunkMetadataBuilder_.mergeFrom(value); - } - if (chunkMetadata_ != null) { - bitField0_ |= 0x00000080; - onChanged(); + return annotationMetadataBuilder_.getMessageOrBuilder(index); } - return this; } /** * * *
            -     * Output only. Metadata of the current chunk.
            +     * Output only. The annotation metadata includes structured content in the
            +     * current chunk.
                  * 
            * * - * .google.cloud.discoveryengine.v1beta.Chunk.ChunkMetadata chunk_metadata = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * repeated .google.cloud.discoveryengine.v1beta.Chunk.AnnotationMetadata annotation_metadata = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ - public Builder clearChunkMetadata() { - bitField0_ = (bitField0_ & ~0x00000080); - chunkMetadata_ = null; - if (chunkMetadataBuilder_ != null) { - chunkMetadataBuilder_.dispose(); - chunkMetadataBuilder_ = null; + public java.util.List< + ? extends com.google.cloud.discoveryengine.v1beta.Chunk.AnnotationMetadataOrBuilder> + getAnnotationMetadataOrBuilderList() { + if (annotationMetadataBuilder_ != null) { + return annotationMetadataBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(annotationMetadata_); } - onChanged(); - return this; } /** * * *
            -     * Output only. Metadata of the current chunk.
            +     * Output only. The annotation metadata includes structured content in the
            +     * current chunk.
                  * 
            * * - * .google.cloud.discoveryengine.v1beta.Chunk.ChunkMetadata chunk_metadata = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * repeated .google.cloud.discoveryengine.v1beta.Chunk.AnnotationMetadata annotation_metadata = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ - public com.google.cloud.discoveryengine.v1beta.Chunk.ChunkMetadata.Builder - getChunkMetadataBuilder() { - bitField0_ |= 0x00000080; - onChanged(); - return internalGetChunkMetadataFieldBuilder().getBuilder(); + public com.google.cloud.discoveryengine.v1beta.Chunk.AnnotationMetadata.Builder + addAnnotationMetadataBuilder() { + return internalGetAnnotationMetadataFieldBuilder() + .addBuilder( + com.google.cloud.discoveryengine.v1beta.Chunk.AnnotationMetadata + .getDefaultInstance()); } /** * * *
            -     * Output only. Metadata of the current chunk.
            +     * Output only. The annotation metadata includes structured content in the
            +     * current chunk.
                  * 
            * * - * .google.cloud.discoveryengine.v1beta.Chunk.ChunkMetadata chunk_metadata = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * repeated .google.cloud.discoveryengine.v1beta.Chunk.AnnotationMetadata annotation_metadata = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ - public com.google.cloud.discoveryengine.v1beta.Chunk.ChunkMetadataOrBuilder - getChunkMetadataOrBuilder() { - if (chunkMetadataBuilder_ != null) { - return chunkMetadataBuilder_.getMessageOrBuilder(); - } else { - return chunkMetadata_ == null - ? com.google.cloud.discoveryengine.v1beta.Chunk.ChunkMetadata.getDefaultInstance() - : chunkMetadata_; - } + public com.google.cloud.discoveryengine.v1beta.Chunk.AnnotationMetadata.Builder + addAnnotationMetadataBuilder(int index) { + return internalGetAnnotationMetadataFieldBuilder() + .addBuilder( + index, + com.google.cloud.discoveryengine.v1beta.Chunk.AnnotationMetadata + .getDefaultInstance()); } /** * * *
            -     * Output only. Metadata of the current chunk.
            +     * Output only. The annotation metadata includes structured content in the
            +     * current chunk.
                  * 
            * * - * .google.cloud.discoveryengine.v1beta.Chunk.ChunkMetadata chunk_metadata = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * repeated .google.cloud.discoveryengine.v1beta.Chunk.AnnotationMetadata annotation_metadata = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.discoveryengine.v1beta.Chunk.ChunkMetadata, - com.google.cloud.discoveryengine.v1beta.Chunk.ChunkMetadata.Builder, - com.google.cloud.discoveryengine.v1beta.Chunk.ChunkMetadataOrBuilder> - internalGetChunkMetadataFieldBuilder() { - if (chunkMetadataBuilder_ == null) { - chunkMetadataBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.discoveryengine.v1beta.Chunk.ChunkMetadata, - com.google.cloud.discoveryengine.v1beta.Chunk.ChunkMetadata.Builder, - com.google.cloud.discoveryengine.v1beta.Chunk.ChunkMetadataOrBuilder>( - getChunkMetadata(), getParentForChildren(), isClean()); - chunkMetadata_ = null; - } - return chunkMetadataBuilder_; + public java.util.List + getAnnotationMetadataBuilderList() { + return internalGetAnnotationMetadataFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.discoveryengine.v1beta.Chunk.AnnotationMetadata, + com.google.cloud.discoveryengine.v1beta.Chunk.AnnotationMetadata.Builder, + com.google.cloud.discoveryengine.v1beta.Chunk.AnnotationMetadataOrBuilder> + internalGetAnnotationMetadataFieldBuilder() { + if (annotationMetadataBuilder_ == null) { + annotationMetadataBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.discoveryengine.v1beta.Chunk.AnnotationMetadata, + com.google.cloud.discoveryengine.v1beta.Chunk.AnnotationMetadata.Builder, + com.google.cloud.discoveryengine.v1beta.Chunk.AnnotationMetadataOrBuilder>( + annotationMetadata_, + ((bitField0_ & 0x00000400) != 0), + getParentForChildren(), + isClean()); + annotationMetadata_ = null; + } + return annotationMetadataBuilder_; } // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.Chunk) diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ChunkOrBuilder.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ChunkOrBuilder.java index 725e84d29525..e86a600e1aa7 100644 --- a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ChunkOrBuilder.java +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ChunkOrBuilder.java @@ -121,7 +121,8 @@ public interface ChunkOrBuilder * Output only. Represents the relevance score based on similarity. * Higher score indicates higher chunk relevance. * The score is in range [-1.0, 1.0]. - * Only populated on [SearchService.SearchResponse][]. + * Only populated on + * [SearchResponse][google.cloud.discoveryengine.v1beta.SearchResponse]. *
            * * optional double relevance_score = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -137,7 +138,8 @@ public interface ChunkOrBuilder * Output only. Represents the relevance score based on similarity. * Higher score indicates higher chunk relevance. * The score is in range [-1.0, 1.0]. - * Only populated on [SearchService.SearchResponse][]. + * Only populated on + * [SearchResponse][google.cloud.discoveryengine.v1beta.SearchResponse]. *
            * * optional double relevance_score = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -309,4 +311,206 @@ public interface ChunkOrBuilder * */ com.google.cloud.discoveryengine.v1beta.Chunk.ChunkMetadataOrBuilder getChunkMetadataOrBuilder(); + + /** + * + * + *
            +   * Output only. Image Data URLs if the current chunk contains images.
            +   * Data URLs are composed of four parts: a prefix (data:), a MIME type
            +   * indicating the type of data, an optional base64 token if non-textual,
            +   * and the data itself:
            +   * data:[<mediatype>][;base64],<data>
            +   * 
            + * + * repeated string data_urls = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return A list containing the dataUrls. + */ + java.util.List getDataUrlsList(); + + /** + * + * + *
            +   * Output only. Image Data URLs if the current chunk contains images.
            +   * Data URLs are composed of four parts: a prefix (data:), a MIME type
            +   * indicating the type of data, an optional base64 token if non-textual,
            +   * and the data itself:
            +   * data:[<mediatype>][;base64],<data>
            +   * 
            + * + * repeated string data_urls = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The count of dataUrls. + */ + int getDataUrlsCount(); + + /** + * + * + *
            +   * Output only. Image Data URLs if the current chunk contains images.
            +   * Data URLs are composed of four parts: a prefix (data:), a MIME type
            +   * indicating the type of data, an optional base64 token if non-textual,
            +   * and the data itself:
            +   * data:[<mediatype>][;base64],<data>
            +   * 
            + * + * repeated string data_urls = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param index The index of the element to return. + * @return The dataUrls at the given index. + */ + java.lang.String getDataUrls(int index); + + /** + * + * + *
            +   * Output only. Image Data URLs if the current chunk contains images.
            +   * Data URLs are composed of four parts: a prefix (data:), a MIME type
            +   * indicating the type of data, an optional base64 token if non-textual,
            +   * and the data itself:
            +   * data:[<mediatype>][;base64],<data>
            +   * 
            + * + * repeated string data_urls = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param index The index of the value to return. + * @return The bytes of the dataUrls at the given index. + */ + com.google.protobuf.ByteString getDataUrlsBytes(int index); + + /** + * + * + *
            +   * Output only. Annotation contents if the current chunk contains annotations.
            +   * 
            + * + * repeated string annotation_contents = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return A list containing the annotationContents. + */ + java.util.List getAnnotationContentsList(); + + /** + * + * + *
            +   * Output only. Annotation contents if the current chunk contains annotations.
            +   * 
            + * + * repeated string annotation_contents = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The count of annotationContents. + */ + int getAnnotationContentsCount(); + + /** + * + * + *
            +   * Output only. Annotation contents if the current chunk contains annotations.
            +   * 
            + * + * repeated string annotation_contents = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index of the element to return. + * @return The annotationContents at the given index. + */ + java.lang.String getAnnotationContents(int index); + + /** + * + * + *
            +   * Output only. Annotation contents if the current chunk contains annotations.
            +   * 
            + * + * repeated string annotation_contents = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index of the value to return. + * @return The bytes of the annotationContents at the given index. + */ + com.google.protobuf.ByteString getAnnotationContentsBytes(int index); + + /** + * + * + *
            +   * Output only. The annotation metadata includes structured content in the
            +   * current chunk.
            +   * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Chunk.AnnotationMetadata annotation_metadata = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.List + getAnnotationMetadataList(); + + /** + * + * + *
            +   * Output only. The annotation metadata includes structured content in the
            +   * current chunk.
            +   * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Chunk.AnnotationMetadata annotation_metadata = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.discoveryengine.v1beta.Chunk.AnnotationMetadata getAnnotationMetadata(int index); + + /** + * + * + *
            +   * Output only. The annotation metadata includes structured content in the
            +   * current chunk.
            +   * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Chunk.AnnotationMetadata annotation_metadata = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + int getAnnotationMetadataCount(); + + /** + * + * + *
            +   * Output only. The annotation metadata includes structured content in the
            +   * current chunk.
            +   * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Chunk.AnnotationMetadata annotation_metadata = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.List< + ? extends com.google.cloud.discoveryengine.v1beta.Chunk.AnnotationMetadataOrBuilder> + getAnnotationMetadataOrBuilderList(); + + /** + * + * + *
            +   * Output only. The annotation metadata includes structured content in the
            +   * current chunk.
            +   * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Chunk.AnnotationMetadata annotation_metadata = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.discoveryengine.v1beta.Chunk.AnnotationMetadataOrBuilder + getAnnotationMetadataOrBuilder(int index); } diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ChunkProto.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ChunkProto.java index 18d05d955ae4..2cb2433a472c 100644 --- a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ChunkProto.java +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ChunkProto.java @@ -56,6 +56,14 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_discoveryengine_v1beta_Chunk_ChunkMetadata_descriptor; static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_cloud_discoveryengine_v1beta_Chunk_ChunkMetadata_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1beta_Chunk_StructuredContent_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1beta_Chunk_StructuredContent_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1beta_Chunk_AnnotationMetadata_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1beta_Chunk_AnnotationMetadata_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { return descriptor; @@ -69,7 +77,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "unk.proto\022#google.cloud.discoveryengine." + "v1beta\032\037google/api/field_behavior.proto\032" + "\031google/api/resource.proto\032\034google/proto" - + "buf/struct.proto\"\370\007\n\005Chunk\022\014\n\004name\030\001 \001(\t" + + "buf/struct.proto\"\263\014\n\005Chunk\022\014\n\004name\030\001 \001(\t" + "\022\n\n\002id\030\002 \001(\t\022\017\n\007content\030\003 \001(\t\022!\n\017relevan" + "ce_score\030\010 \001(\001B\003\340A\003H\000\210\001\001\022V\n\021document_met" + "adata\030\005 \001(\0132;.google.cloud.discoveryengi" @@ -79,29 +87,44 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "cloud.discoveryengine.v1beta.Chunk.PageS" + "pan\022U\n\016chunk_metadata\030\007 \001(\01328.google.clo" + "ud.discoveryengine.v1beta.Chunk.ChunkMet" - + "adataB\003\340A\003\032\\\n\020DocumentMetadata\022\013\n\003uri\030\001 " - + "\001(\t\022\r\n\005title\030\002 \001(\t\022,\n\013struct_data\030\003 \001(\0132" - + "\027.google.protobuf.Struct\0320\n\010PageSpan\022\022\n\n" - + "page_start\030\001 \001(\005\022\020\n\010page_end\030\002 \001(\005\032\225\001\n\rC" - + "hunkMetadata\022C\n\017previous_chunks\030\001 \003(\0132*." - + "google.cloud.discoveryengine.v1beta.Chun" - + "k\022?\n\013next_chunks\030\002 \003(\0132*.google.cloud.di" - + "scoveryengine.v1beta.Chunk:\262\002\352A\256\002\n$disco" - + "veryengine.googleapis.com/Chunk\022uproject" - + "s/{project}/locations/{location}/dataSto" - + "res/{data_store}/branches/{branch}/docum" - + "ents/{document}/chunks/{chunk}\022\216\001project" - + "s/{project}/locations/{location}/collect" - + "ions/{collection}/dataStores/{data_store" - + "}/branches/{branch}/documents/{document}" - + "/chunks/{chunk}B\022\n\020_relevance_scoreB\221\002\n\'" - + "com.google.cloud.discoveryengine.v1betaB" - + "\nChunkProtoP\001ZQcloud.google.com/go/disco" - + "veryengine/apiv1beta/discoveryenginepb;d" - + "iscoveryenginepb\242\002\017DISCOVERYENGINE\252\002#Goo" - + "gle.Cloud.DiscoveryEngine.V1Beta\312\002#Googl" - + "e\\Cloud\\DiscoveryEngine\\V1beta\352\002&Google:" - + ":Cloud::DiscoveryEngine::V1betab\006proto3" + + "adataB\003\340A\003\022\026\n\tdata_urls\030\t \003(\tB\003\340A\003\022 \n\023an" + + "notation_contents\030\013 \003(\tB\003\340A\003\022_\n\023annotati" + + "on_metadata\030\014 \003(\0132=.google.cloud.discove" + + "ryengine.v1beta.Chunk.AnnotationMetadata" + + "B\003\340A\003\032o\n\020DocumentMetadata\022\013\n\003uri\030\001 \001(\t\022\r" + + "\n\005title\030\002 \001(\t\022\021\n\tmime_type\030\004 \001(\t\022,\n\013stru" + + "ct_data\030\003 \001(\0132\027.google.protobuf.Struct\0320" + + "\n\010PageSpan\022\022\n\npage_start\030\001 \001(\005\022\020\n\010page_e" + + "nd\030\002 \001(\005\032\225\001\n\rChunkMetadata\022C\n\017previous_c" + + "hunks\030\001 \003(\0132*.google.cloud.discoveryengi" + + "ne.v1beta.Chunk\022?\n\013next_chunks\030\002 \003(\0132*.g" + + "oogle.cloud.discoveryengine.v1beta.Chunk" + + "\032\200\001\n\021StructuredContent\022U\n\016structure_type" + + "\030\001 \001(\01628.google.cloud.discoveryengine.v1" + + "beta.Chunk.StructureTypeB\003\340A\003\022\024\n\007content" + + "\030\002 \001(\tB\003\340A\003\032\212\001\n\022AnnotationMetadata\022]\n\022st" + + "ructured_content\030\001 \001(\0132<.google.cloud.di" + + "scoveryengine.v1beta.Chunk.StructuredCon" + + "tentB\003\340A\003\022\025\n\010image_id\030\002 \001(\tB\003\340A\003\"{\n\rStru" + + "ctureType\022\036\n\032STRUCTURE_TYPE_UNSPECIFIED\020" + + "\000\022\031\n\025SHAREHOLDER_STRUCTURE\020\001\022\027\n\023SIGNATUR" + + "E_STRUCTURE\020\002\022\026\n\022CHECKBOX_STRUCTURE\020\003:\262\002" + + "\352A\256\002\n$discoveryengine.googleapis.com/Chu" + + "nk\022uprojects/{project}/locations/{locati" + + "on}/dataStores/{data_store}/branches/{br" + + "anch}/documents/{document}/chunks/{chunk" + + "}\022\216\001projects/{project}/locations/{locati" + + "on}/collections/{collection}/dataStores/" + + "{data_store}/branches/{branch}/documents" + + "/{document}/chunks/{chunk}B\022\n\020_relevance" + + "_scoreB\221\002\n\'com.google.cloud.discoveryeng" + + "ine.v1betaB\nChunkProtoP\001ZQcloud.google.c" + + "om/go/discoveryengine/apiv1beta/discover" + + "yenginepb;discoveryenginepb\242\002\017DISCOVERYE" + + "NGINE\252\002#Google.Cloud.DiscoveryEngine.V1B" + + "eta\312\002#Google\\Cloud\\DiscoveryEngine\\V1bet" + + "a\352\002&Google::Cloud::DiscoveryEngine::V1be" + + "tab\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -125,6 +148,9 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "DerivedStructData", "PageSpan", "ChunkMetadata", + "DataUrls", + "AnnotationContents", + "AnnotationMetadata", }); internal_static_google_cloud_discoveryengine_v1beta_Chunk_DocumentMetadata_descriptor = internal_static_google_cloud_discoveryengine_v1beta_Chunk_descriptor.getNestedType(0); @@ -132,7 +158,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_cloud_discoveryengine_v1beta_Chunk_DocumentMetadata_descriptor, new java.lang.String[] { - "Uri", "Title", "StructData", + "Uri", "Title", "MimeType", "StructData", }); internal_static_google_cloud_discoveryengine_v1beta_Chunk_PageSpan_descriptor = internal_static_google_cloud_discoveryengine_v1beta_Chunk_descriptor.getNestedType(1); @@ -150,6 +176,22 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "PreviousChunks", "NextChunks", }); + internal_static_google_cloud_discoveryengine_v1beta_Chunk_StructuredContent_descriptor = + internal_static_google_cloud_discoveryengine_v1beta_Chunk_descriptor.getNestedType(3); + internal_static_google_cloud_discoveryengine_v1beta_Chunk_StructuredContent_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1beta_Chunk_StructuredContent_descriptor, + new java.lang.String[] { + "StructureType", "Content", + }); + internal_static_google_cloud_discoveryengine_v1beta_Chunk_AnnotationMetadata_descriptor = + internal_static_google_cloud_discoveryengine_v1beta_Chunk_descriptor.getNestedType(4); + internal_static_google_cloud_discoveryengine_v1beta_Chunk_AnnotationMetadata_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1beta_Chunk_AnnotationMetadata_descriptor, + new java.lang.String[] { + "StructuredContent", "ImageId", + }); descriptor.resolveAllFeaturesImmutable(); com.google.api.FieldBehaviorProto.getDescriptor(); com.google.api.ResourceProto.getDescriptor(); diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/Citation.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/Citation.java new file mode 100644 index 000000000000..cc575d78c1f2 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/Citation.java @@ -0,0 +1,1730 @@ +/* + * 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/cloud/discoveryengine/v1beta/grounded_generation_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.discoveryengine.v1beta; + +/** + * + * + *
            + * Source attributions for content.
            + * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.Citation} + */ +@com.google.protobuf.Generated +public final class Citation extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.Citation) + CitationOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Citation"); + } + + // Use Citation.newBuilder() to construct. + private Citation(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private Citation() { + uri_ = ""; + title_ = ""; + license_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.GroundedGenerationServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_Citation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.GroundedGenerationServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_Citation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.Citation.class, + com.google.cloud.discoveryengine.v1beta.Citation.Builder.class); + } + + /** + * + * + *
            +   * These are available confidence level user can set to block malicious urls
            +   * with chosen confidence and above. For understanding different confidence of
            +   * webrisk, please refer to
            +   * https://cloud.google.com/web-risk/docs/reference/rpc/google.cloud.webrisk.v1eap1#confidencelevel
            +   * 
            + * + * Protobuf enum {@code google.cloud.discoveryengine.v1beta.Citation.PhishBlockThreshold} + */ + public enum PhishBlockThreshold implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
            +     * Defaults to unspecified.
            +     * 
            + * + * PHISH_BLOCK_THRESHOLD_UNSPECIFIED = 0; + */ + PHISH_BLOCK_THRESHOLD_UNSPECIFIED(0), + /** + * + * + *
            +     * Blocks Low and above confidence URL that is risky.
            +     * 
            + * + * BLOCK_LOW_AND_ABOVE = 30; + */ + BLOCK_LOW_AND_ABOVE(30), + /** + * + * + *
            +     * Blocks Medium and above confidence URL that is risky.
            +     * 
            + * + * BLOCK_MEDIUM_AND_ABOVE = 40; + */ + BLOCK_MEDIUM_AND_ABOVE(40), + /** + * + * + *
            +     * Blocks High and above confidence URL that is risky.
            +     * 
            + * + * BLOCK_HIGH_AND_ABOVE = 50; + */ + BLOCK_HIGH_AND_ABOVE(50), + /** + * + * + *
            +     * Blocks Higher and above confidence URL that is risky.
            +     * 
            + * + * BLOCK_HIGHER_AND_ABOVE = 55; + */ + BLOCK_HIGHER_AND_ABOVE(55), + /** + * + * + *
            +     * Blocks Very high and above confidence URL that is risky.
            +     * 
            + * + * BLOCK_VERY_HIGH_AND_ABOVE = 60; + */ + BLOCK_VERY_HIGH_AND_ABOVE(60), + /** + * + * + *
            +     * Blocks Extremely high confidence URL that is risky.
            +     * 
            + * + * BLOCK_ONLY_EXTREMELY_HIGH = 100; + */ + BLOCK_ONLY_EXTREMELY_HIGH(100), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "PhishBlockThreshold"); + } + + /** + * + * + *
            +     * Defaults to unspecified.
            +     * 
            + * + * PHISH_BLOCK_THRESHOLD_UNSPECIFIED = 0; + */ + public static final int PHISH_BLOCK_THRESHOLD_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
            +     * Blocks Low and above confidence URL that is risky.
            +     * 
            + * + * BLOCK_LOW_AND_ABOVE = 30; + */ + public static final int BLOCK_LOW_AND_ABOVE_VALUE = 30; + + /** + * + * + *
            +     * Blocks Medium and above confidence URL that is risky.
            +     * 
            + * + * BLOCK_MEDIUM_AND_ABOVE = 40; + */ + public static final int BLOCK_MEDIUM_AND_ABOVE_VALUE = 40; + + /** + * + * + *
            +     * Blocks High and above confidence URL that is risky.
            +     * 
            + * + * BLOCK_HIGH_AND_ABOVE = 50; + */ + public static final int BLOCK_HIGH_AND_ABOVE_VALUE = 50; + + /** + * + * + *
            +     * Blocks Higher and above confidence URL that is risky.
            +     * 
            + * + * BLOCK_HIGHER_AND_ABOVE = 55; + */ + public static final int BLOCK_HIGHER_AND_ABOVE_VALUE = 55; + + /** + * + * + *
            +     * Blocks Very high and above confidence URL that is risky.
            +     * 
            + * + * BLOCK_VERY_HIGH_AND_ABOVE = 60; + */ + public static final int BLOCK_VERY_HIGH_AND_ABOVE_VALUE = 60; + + /** + * + * + *
            +     * Blocks Extremely high confidence URL that is risky.
            +     * 
            + * + * BLOCK_ONLY_EXTREMELY_HIGH = 100; + */ + public static final int BLOCK_ONLY_EXTREMELY_HIGH_VALUE = 100; + + 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 PhishBlockThreshold 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 PhishBlockThreshold forNumber(int value) { + switch (value) { + case 0: + return PHISH_BLOCK_THRESHOLD_UNSPECIFIED; + case 30: + return BLOCK_LOW_AND_ABOVE; + case 40: + return BLOCK_MEDIUM_AND_ABOVE; + case 50: + return BLOCK_HIGH_AND_ABOVE; + case 55: + return BLOCK_HIGHER_AND_ABOVE; + case 60: + return BLOCK_VERY_HIGH_AND_ABOVE; + case 100: + return BLOCK_ONLY_EXTREMELY_HIGH; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap + internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public PhishBlockThreshold findValueByNumber(int number) { + return PhishBlockThreshold.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.Citation.getDescriptor().getEnumTypes().get(0); + } + + private static final PhishBlockThreshold[] VALUES = values(); + + public static PhishBlockThreshold valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private PhishBlockThreshold(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.discoveryengine.v1beta.Citation.PhishBlockThreshold) + } + + private int bitField0_; + public static final int START_INDEX_FIELD_NUMBER = 1; + private int startIndex_ = 0; + + /** + * + * + *
            +   * Output only. Start index into the content.
            +   * 
            + * + * int32 start_index = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The startIndex. + */ + @java.lang.Override + public int getStartIndex() { + return startIndex_; + } + + public static final int END_INDEX_FIELD_NUMBER = 2; + private int endIndex_ = 0; + + /** + * + * + *
            +   * Output only. End index into the content.
            +   * 
            + * + * int32 end_index = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The endIndex. + */ + @java.lang.Override + public int getEndIndex() { + return endIndex_; + } + + public static final int URI_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object uri_ = ""; + + /** + * + * + *
            +   * Output only. Url reference of the attribution.
            +   * 
            + * + * string uri = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The uri. + */ + @java.lang.Override + public java.lang.String getUri() { + java.lang.Object ref = uri_; + 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(); + uri_ = s; + return s; + } + } + + /** + * + * + *
            +   * Output only. Url reference of the attribution.
            +   * 
            + * + * string uri = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for uri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getUriBytes() { + java.lang.Object ref = uri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TITLE_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object title_ = ""; + + /** + * + * + *
            +   * Output only. Title of the attribution.
            +   * 
            + * + * string title = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The title. + */ + @java.lang.Override + public java.lang.String getTitle() { + java.lang.Object ref = title_; + 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(); + title_ = s; + return s; + } + } + + /** + * + * + *
            +   * Output only. Title of the attribution.
            +   * 
            + * + * string title = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for title. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTitleBytes() { + java.lang.Object ref = title_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + title_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LICENSE_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object license_ = ""; + + /** + * + * + *
            +   * Output only. License of the attribution.
            +   * 
            + * + * string license = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The license. + */ + @java.lang.Override + public java.lang.String getLicense() { + java.lang.Object ref = license_; + 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(); + license_ = s; + return s; + } + } + + /** + * + * + *
            +   * Output only. License of the attribution.
            +   * 
            + * + * string license = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for license. + */ + @java.lang.Override + public com.google.protobuf.ByteString getLicenseBytes() { + java.lang.Object ref = license_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + license_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PUBLICATION_DATE_FIELD_NUMBER = 6; + private com.google.type.Date publicationDate_; + + /** + * + * + *
            +   * Output only. Publication date of the attribution.
            +   * 
            + * + * .google.type.Date publication_date = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the publicationDate field is set. + */ + @java.lang.Override + public boolean hasPublicationDate() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
            +   * Output only. Publication date of the attribution.
            +   * 
            + * + * .google.type.Date publication_date = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The publicationDate. + */ + @java.lang.Override + public com.google.type.Date getPublicationDate() { + return publicationDate_ == null ? com.google.type.Date.getDefaultInstance() : publicationDate_; + } + + /** + * + * + *
            +   * Output only. Publication date of the attribution.
            +   * 
            + * + * .google.type.Date publication_date = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.type.DateOrBuilder getPublicationDateOrBuilder() { + return publicationDate_ == null ? com.google.type.Date.getDefaultInstance() : publicationDate_; + } + + 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 (startIndex_ != 0) { + output.writeInt32(1, startIndex_); + } + if (endIndex_ != 0) { + output.writeInt32(2, endIndex_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(uri_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, uri_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(title_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, title_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(license_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 5, license_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(6, getPublicationDate()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (startIndex_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(1, startIndex_); + } + if (endIndex_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, endIndex_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(uri_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, uri_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(title_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, title_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(license_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(5, license_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getPublicationDate()); + } + 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.discoveryengine.v1beta.Citation)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1beta.Citation other = + (com.google.cloud.discoveryengine.v1beta.Citation) obj; + + if (getStartIndex() != other.getStartIndex()) return false; + if (getEndIndex() != other.getEndIndex()) return false; + if (!getUri().equals(other.getUri())) return false; + if (!getTitle().equals(other.getTitle())) return false; + if (!getLicense().equals(other.getLicense())) return false; + if (hasPublicationDate() != other.hasPublicationDate()) return false; + if (hasPublicationDate()) { + if (!getPublicationDate().equals(other.getPublicationDate())) 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) + START_INDEX_FIELD_NUMBER; + hash = (53 * hash) + getStartIndex(); + hash = (37 * hash) + END_INDEX_FIELD_NUMBER; + hash = (53 * hash) + getEndIndex(); + hash = (37 * hash) + URI_FIELD_NUMBER; + hash = (53 * hash) + getUri().hashCode(); + hash = (37 * hash) + TITLE_FIELD_NUMBER; + hash = (53 * hash) + getTitle().hashCode(); + hash = (37 * hash) + LICENSE_FIELD_NUMBER; + hash = (53 * hash) + getLicense().hashCode(); + if (hasPublicationDate()) { + hash = (37 * hash) + PUBLICATION_DATE_FIELD_NUMBER; + hash = (53 * hash) + getPublicationDate().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1beta.Citation parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.Citation 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.discoveryengine.v1beta.Citation parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.Citation 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.discoveryengine.v1beta.Citation parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.Citation parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1beta.Citation parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.Citation 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.discoveryengine.v1beta.Citation parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.Citation 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.discoveryengine.v1beta.Citation parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.Citation 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.discoveryengine.v1beta.Citation 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; + } + + /** + * + * + *
            +   * Source attributions for content.
            +   * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.Citation} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.Citation) + com.google.cloud.discoveryengine.v1beta.CitationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.GroundedGenerationServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_Citation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.GroundedGenerationServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_Citation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.Citation.class, + com.google.cloud.discoveryengine.v1beta.Citation.Builder.class); + } + + // Construct using com.google.cloud.discoveryengine.v1beta.Citation.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetPublicationDateFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + startIndex_ = 0; + endIndex_ = 0; + uri_ = ""; + title_ = ""; + license_ = ""; + publicationDate_ = null; + if (publicationDateBuilder_ != null) { + publicationDateBuilder_.dispose(); + publicationDateBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1beta.GroundedGenerationServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_Citation_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Citation getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1beta.Citation.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Citation build() { + com.google.cloud.discoveryengine.v1beta.Citation result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Citation buildPartial() { + com.google.cloud.discoveryengine.v1beta.Citation result = + new com.google.cloud.discoveryengine.v1beta.Citation(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.discoveryengine.v1beta.Citation result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.startIndex_ = startIndex_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.endIndex_ = endIndex_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.uri_ = uri_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.title_ = title_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.license_ = license_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000020) != 0)) { + result.publicationDate_ = + publicationDateBuilder_ == null ? publicationDate_ : publicationDateBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.discoveryengine.v1beta.Citation) { + return mergeFrom((com.google.cloud.discoveryengine.v1beta.Citation) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.discoveryengine.v1beta.Citation other) { + if (other == com.google.cloud.discoveryengine.v1beta.Citation.getDefaultInstance()) + return this; + if (other.getStartIndex() != 0) { + setStartIndex(other.getStartIndex()); + } + if (other.getEndIndex() != 0) { + setEndIndex(other.getEndIndex()); + } + if (!other.getUri().isEmpty()) { + uri_ = other.uri_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getTitle().isEmpty()) { + title_ = other.title_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (!other.getLicense().isEmpty()) { + license_ = other.license_; + bitField0_ |= 0x00000010; + onChanged(); + } + if (other.hasPublicationDate()) { + mergePublicationDate(other.getPublicationDate()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + startIndex_ = input.readInt32(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 16: + { + endIndex_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: + { + uri_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + title_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + license_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 50: + { + input.readMessage( + internalGetPublicationDateFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 50 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private int startIndex_; + + /** + * + * + *
            +     * Output only. Start index into the content.
            +     * 
            + * + * int32 start_index = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The startIndex. + */ + @java.lang.Override + public int getStartIndex() { + return startIndex_; + } + + /** + * + * + *
            +     * Output only. Start index into the content.
            +     * 
            + * + * int32 start_index = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The startIndex to set. + * @return This builder for chaining. + */ + public Builder setStartIndex(int value) { + + startIndex_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Output only. Start index into the content.
            +     * 
            + * + * int32 start_index = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearStartIndex() { + bitField0_ = (bitField0_ & ~0x00000001); + startIndex_ = 0; + onChanged(); + return this; + } + + private int endIndex_; + + /** + * + * + *
            +     * Output only. End index into the content.
            +     * 
            + * + * int32 end_index = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The endIndex. + */ + @java.lang.Override + public int getEndIndex() { + return endIndex_; + } + + /** + * + * + *
            +     * Output only. End index into the content.
            +     * 
            + * + * int32 end_index = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The endIndex to set. + * @return This builder for chaining. + */ + public Builder setEndIndex(int value) { + + endIndex_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Output only. End index into the content.
            +     * 
            + * + * int32 end_index = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearEndIndex() { + bitField0_ = (bitField0_ & ~0x00000002); + endIndex_ = 0; + onChanged(); + return this; + } + + private java.lang.Object uri_ = ""; + + /** + * + * + *
            +     * Output only. Url reference of the attribution.
            +     * 
            + * + * string uri = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The uri. + */ + public java.lang.String getUri() { + java.lang.Object ref = uri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
            +     * Output only. Url reference of the attribution.
            +     * 
            + * + * string uri = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for uri. + */ + public com.google.protobuf.ByteString getUriBytes() { + java.lang.Object ref = uri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
            +     * Output only. Url reference of the attribution.
            +     * 
            + * + * string uri = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The uri to set. + * @return This builder for chaining. + */ + public Builder setUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + uri_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Output only. Url reference of the attribution.
            +     * 
            + * + * string uri = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearUri() { + uri_ = getDefaultInstance().getUri(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
            +     * Output only. Url reference of the attribution.
            +     * 
            + * + * string uri = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for uri to set. + * @return This builder for chaining. + */ + public Builder setUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + uri_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object title_ = ""; + + /** + * + * + *
            +     * Output only. Title of the attribution.
            +     * 
            + * + * string title = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The title. + */ + public java.lang.String getTitle() { + java.lang.Object ref = title_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + title_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
            +     * Output only. Title of the attribution.
            +     * 
            + * + * string title = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for title. + */ + public com.google.protobuf.ByteString getTitleBytes() { + java.lang.Object ref = title_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + title_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
            +     * Output only. Title of the attribution.
            +     * 
            + * + * string title = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The title to set. + * @return This builder for chaining. + */ + public Builder setTitle(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + title_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Output only. Title of the attribution.
            +     * 
            + * + * string title = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearTitle() { + title_ = getDefaultInstance().getTitle(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + + /** + * + * + *
            +     * Output only. Title of the attribution.
            +     * 
            + * + * string title = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for title to set. + * @return This builder for chaining. + */ + public Builder setTitleBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + title_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private java.lang.Object license_ = ""; + + /** + * + * + *
            +     * Output only. License of the attribution.
            +     * 
            + * + * string license = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The license. + */ + public java.lang.String getLicense() { + java.lang.Object ref = license_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + license_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
            +     * Output only. License of the attribution.
            +     * 
            + * + * string license = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for license. + */ + public com.google.protobuf.ByteString getLicenseBytes() { + java.lang.Object ref = license_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + license_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
            +     * Output only. License of the attribution.
            +     * 
            + * + * string license = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The license to set. + * @return This builder for chaining. + */ + public Builder setLicense(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + license_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Output only. License of the attribution.
            +     * 
            + * + * string license = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearLicense() { + license_ = getDefaultInstance().getLicense(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + + /** + * + * + *
            +     * Output only. License of the attribution.
            +     * 
            + * + * string license = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for license to set. + * @return This builder for chaining. + */ + public Builder setLicenseBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + license_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + private com.google.type.Date publicationDate_; + private com.google.protobuf.SingleFieldBuilder< + com.google.type.Date, com.google.type.Date.Builder, com.google.type.DateOrBuilder> + publicationDateBuilder_; + + /** + * + * + *
            +     * Output only. Publication date of the attribution.
            +     * 
            + * + * .google.type.Date publication_date = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the publicationDate field is set. + */ + public boolean hasPublicationDate() { + return ((bitField0_ & 0x00000020) != 0); + } + + /** + * + * + *
            +     * Output only. Publication date of the attribution.
            +     * 
            + * + * .google.type.Date publication_date = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The publicationDate. + */ + public com.google.type.Date getPublicationDate() { + if (publicationDateBuilder_ == null) { + return publicationDate_ == null + ? com.google.type.Date.getDefaultInstance() + : publicationDate_; + } else { + return publicationDateBuilder_.getMessage(); + } + } + + /** + * + * + *
            +     * Output only. Publication date of the attribution.
            +     * 
            + * + * .google.type.Date publication_date = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setPublicationDate(com.google.type.Date value) { + if (publicationDateBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + publicationDate_ = value; + } else { + publicationDateBuilder_.setMessage(value); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Output only. Publication date of the attribution.
            +     * 
            + * + * .google.type.Date publication_date = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setPublicationDate(com.google.type.Date.Builder builderForValue) { + if (publicationDateBuilder_ == null) { + publicationDate_ = builderForValue.build(); + } else { + publicationDateBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Output only. Publication date of the attribution.
            +     * 
            + * + * .google.type.Date publication_date = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergePublicationDate(com.google.type.Date value) { + if (publicationDateBuilder_ == null) { + if (((bitField0_ & 0x00000020) != 0) + && publicationDate_ != null + && publicationDate_ != com.google.type.Date.getDefaultInstance()) { + getPublicationDateBuilder().mergeFrom(value); + } else { + publicationDate_ = value; + } + } else { + publicationDateBuilder_.mergeFrom(value); + } + if (publicationDate_ != null) { + bitField0_ |= 0x00000020; + onChanged(); + } + return this; + } + + /** + * + * + *
            +     * Output only. Publication date of the attribution.
            +     * 
            + * + * .google.type.Date publication_date = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearPublicationDate() { + bitField0_ = (bitField0_ & ~0x00000020); + publicationDate_ = null; + if (publicationDateBuilder_ != null) { + publicationDateBuilder_.dispose(); + publicationDateBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
            +     * Output only. Publication date of the attribution.
            +     * 
            + * + * .google.type.Date publication_date = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.type.Date.Builder getPublicationDateBuilder() { + bitField0_ |= 0x00000020; + onChanged(); + return internalGetPublicationDateFieldBuilder().getBuilder(); + } + + /** + * + * + *
            +     * Output only. Publication date of the attribution.
            +     * 
            + * + * .google.type.Date publication_date = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.type.DateOrBuilder getPublicationDateOrBuilder() { + if (publicationDateBuilder_ != null) { + return publicationDateBuilder_.getMessageOrBuilder(); + } else { + return publicationDate_ == null + ? com.google.type.Date.getDefaultInstance() + : publicationDate_; + } + } + + /** + * + * + *
            +     * Output only. Publication date of the attribution.
            +     * 
            + * + * .google.type.Date publication_date = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.type.Date, com.google.type.Date.Builder, com.google.type.DateOrBuilder> + internalGetPublicationDateFieldBuilder() { + if (publicationDateBuilder_ == null) { + publicationDateBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.type.Date, com.google.type.Date.Builder, com.google.type.DateOrBuilder>( + getPublicationDate(), getParentForChildren(), isClean()); + publicationDate_ = null; + } + return publicationDateBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.Citation) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.Citation) + private static final com.google.cloud.discoveryengine.v1beta.Citation DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.discoveryengine.v1beta.Citation(); + } + + public static com.google.cloud.discoveryengine.v1beta.Citation getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Citation parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Citation getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/CitationMetadata.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/CitationMetadata.java new file mode 100644 index 000000000000..29b060383927 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/CitationMetadata.java @@ -0,0 +1,974 @@ +/* + * 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/cloud/discoveryengine/v1beta/grounded_generation_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.discoveryengine.v1beta; + +/** + * + * + *
            + * A collection of source attributions for a piece of content.
            + * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.CitationMetadata} + */ +@com.google.protobuf.Generated +public final class CitationMetadata extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.CitationMetadata) + CitationMetadataOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "CitationMetadata"); + } + + // Use CitationMetadata.newBuilder() to construct. + private CitationMetadata(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private CitationMetadata() { + citations_ = java.util.Collections.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.GroundedGenerationServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_CitationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.GroundedGenerationServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_CitationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.CitationMetadata.class, + com.google.cloud.discoveryengine.v1beta.CitationMetadata.Builder.class); + } + + public static final int CITATIONS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List citations_; + + /** + * + * + *
            +   * Output only. List of citations.
            +   * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Citation citations = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.List getCitationsList() { + return citations_; + } + + /** + * + * + *
            +   * Output only. List of citations.
            +   * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Citation citations = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.List + getCitationsOrBuilderList() { + return citations_; + } + + /** + * + * + *
            +   * Output only. List of citations.
            +   * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Citation citations = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public int getCitationsCount() { + return citations_.size(); + } + + /** + * + * + *
            +   * Output only. List of citations.
            +   * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Citation citations = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Citation getCitations(int index) { + return citations_.get(index); + } + + /** + * + * + *
            +   * Output only. List of citations.
            +   * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Citation citations = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.CitationOrBuilder getCitationsOrBuilder( + int index) { + return citations_.get(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 { + for (int i = 0; i < citations_.size(); i++) { + output.writeMessage(1, citations_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < citations_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, citations_.get(i)); + } + 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.discoveryengine.v1beta.CitationMetadata)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1beta.CitationMetadata other = + (com.google.cloud.discoveryengine.v1beta.CitationMetadata) obj; + + if (!getCitationsList().equals(other.getCitationsList())) 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 (getCitationsCount() > 0) { + hash = (37 * hash) + CITATIONS_FIELD_NUMBER; + hash = (53 * hash) + getCitationsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1beta.CitationMetadata parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.CitationMetadata 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.discoveryengine.v1beta.CitationMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.CitationMetadata 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.discoveryengine.v1beta.CitationMetadata parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.CitationMetadata parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1beta.CitationMetadata parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.CitationMetadata 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.discoveryengine.v1beta.CitationMetadata parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.CitationMetadata 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.discoveryengine.v1beta.CitationMetadata parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.CitationMetadata 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.discoveryengine.v1beta.CitationMetadata 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 collection of source attributions for a piece of content.
            +   * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.CitationMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.CitationMetadata) + com.google.cloud.discoveryengine.v1beta.CitationMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.GroundedGenerationServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_CitationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.GroundedGenerationServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_CitationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.CitationMetadata.class, + com.google.cloud.discoveryengine.v1beta.CitationMetadata.Builder.class); + } + + // Construct using com.google.cloud.discoveryengine.v1beta.CitationMetadata.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (citationsBuilder_ == null) { + citations_ = java.util.Collections.emptyList(); + } else { + citations_ = null; + citationsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1beta.GroundedGenerationServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_CitationMetadata_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.CitationMetadata getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1beta.CitationMetadata.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.CitationMetadata build() { + com.google.cloud.discoveryengine.v1beta.CitationMetadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.CitationMetadata buildPartial() { + com.google.cloud.discoveryengine.v1beta.CitationMetadata result = + new com.google.cloud.discoveryengine.v1beta.CitationMetadata(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.discoveryengine.v1beta.CitationMetadata result) { + if (citationsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + citations_ = java.util.Collections.unmodifiableList(citations_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.citations_ = citations_; + } else { + result.citations_ = citationsBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.discoveryengine.v1beta.CitationMetadata result) { + int from_bitField0_ = bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.discoveryengine.v1beta.CitationMetadata) { + return mergeFrom((com.google.cloud.discoveryengine.v1beta.CitationMetadata) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.discoveryengine.v1beta.CitationMetadata other) { + if (other == com.google.cloud.discoveryengine.v1beta.CitationMetadata.getDefaultInstance()) + return this; + if (citationsBuilder_ == null) { + if (!other.citations_.isEmpty()) { + if (citations_.isEmpty()) { + citations_ = other.citations_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureCitationsIsMutable(); + citations_.addAll(other.citations_); + } + onChanged(); + } + } else { + if (!other.citations_.isEmpty()) { + if (citationsBuilder_.isEmpty()) { + citationsBuilder_.dispose(); + citationsBuilder_ = null; + citations_ = other.citations_; + bitField0_ = (bitField0_ & ~0x00000001); + citationsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetCitationsFieldBuilder() + : null; + } else { + citationsBuilder_.addAllMessages(other.citations_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.discoveryengine.v1beta.Citation m = + input.readMessage( + com.google.cloud.discoveryengine.v1beta.Citation.parser(), + extensionRegistry); + if (citationsBuilder_ == null) { + ensureCitationsIsMutable(); + citations_.add(m); + } else { + citationsBuilder_.addMessage(m); + } + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List citations_ = + java.util.Collections.emptyList(); + + private void ensureCitationsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + citations_ = + new java.util.ArrayList(citations_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.discoveryengine.v1beta.Citation, + com.google.cloud.discoveryengine.v1beta.Citation.Builder, + com.google.cloud.discoveryengine.v1beta.CitationOrBuilder> + citationsBuilder_; + + /** + * + * + *
            +     * Output only. List of citations.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Citation citations = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List getCitationsList() { + if (citationsBuilder_ == null) { + return java.util.Collections.unmodifiableList(citations_); + } else { + return citationsBuilder_.getMessageList(); + } + } + + /** + * + * + *
            +     * Output only. List of citations.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Citation citations = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public int getCitationsCount() { + if (citationsBuilder_ == null) { + return citations_.size(); + } else { + return citationsBuilder_.getCount(); + } + } + + /** + * + * + *
            +     * Output only. List of citations.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Citation citations = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.discoveryengine.v1beta.Citation getCitations(int index) { + if (citationsBuilder_ == null) { + return citations_.get(index); + } else { + return citationsBuilder_.getMessage(index); + } + } + + /** + * + * + *
            +     * Output only. List of citations.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Citation citations = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCitations(int index, com.google.cloud.discoveryengine.v1beta.Citation value) { + if (citationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCitationsIsMutable(); + citations_.set(index, value); + onChanged(); + } else { + citationsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
            +     * Output only. List of citations.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Citation citations = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCitations( + int index, com.google.cloud.discoveryengine.v1beta.Citation.Builder builderForValue) { + if (citationsBuilder_ == null) { + ensureCitationsIsMutable(); + citations_.set(index, builderForValue.build()); + onChanged(); + } else { + citationsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
            +     * Output only. List of citations.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Citation citations = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addCitations(com.google.cloud.discoveryengine.v1beta.Citation value) { + if (citationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCitationsIsMutable(); + citations_.add(value); + onChanged(); + } else { + citationsBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
            +     * Output only. List of citations.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Citation citations = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addCitations(int index, com.google.cloud.discoveryengine.v1beta.Citation value) { + if (citationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCitationsIsMutable(); + citations_.add(index, value); + onChanged(); + } else { + citationsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
            +     * Output only. List of citations.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Citation citations = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addCitations( + com.google.cloud.discoveryengine.v1beta.Citation.Builder builderForValue) { + if (citationsBuilder_ == null) { + ensureCitationsIsMutable(); + citations_.add(builderForValue.build()); + onChanged(); + } else { + citationsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
            +     * Output only. List of citations.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Citation citations = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addCitations( + int index, com.google.cloud.discoveryengine.v1beta.Citation.Builder builderForValue) { + if (citationsBuilder_ == null) { + ensureCitationsIsMutable(); + citations_.add(index, builderForValue.build()); + onChanged(); + } else { + citationsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
            +     * Output only. List of citations.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Citation citations = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addAllCitations( + java.lang.Iterable values) { + if (citationsBuilder_ == null) { + ensureCitationsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, citations_); + onChanged(); + } else { + citationsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
            +     * Output only. List of citations.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Citation citations = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCitations() { + if (citationsBuilder_ == null) { + citations_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + citationsBuilder_.clear(); + } + return this; + } + + /** + * + * + *
            +     * Output only. List of citations.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Citation citations = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder removeCitations(int index) { + if (citationsBuilder_ == null) { + ensureCitationsIsMutable(); + citations_.remove(index); + onChanged(); + } else { + citationsBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
            +     * Output only. List of citations.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Citation citations = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.discoveryengine.v1beta.Citation.Builder getCitationsBuilder(int index) { + return internalGetCitationsFieldBuilder().getBuilder(index); + } + + /** + * + * + *
            +     * Output only. List of citations.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Citation citations = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.discoveryengine.v1beta.CitationOrBuilder getCitationsOrBuilder( + int index) { + if (citationsBuilder_ == null) { + return citations_.get(index); + } else { + return citationsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
            +     * Output only. List of citations.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Citation citations = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List + getCitationsOrBuilderList() { + if (citationsBuilder_ != null) { + return citationsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(citations_); + } + } + + /** + * + * + *
            +     * Output only. List of citations.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Citation citations = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.discoveryengine.v1beta.Citation.Builder addCitationsBuilder() { + return internalGetCitationsFieldBuilder() + .addBuilder(com.google.cloud.discoveryengine.v1beta.Citation.getDefaultInstance()); + } + + /** + * + * + *
            +     * Output only. List of citations.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Citation citations = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.discoveryengine.v1beta.Citation.Builder addCitationsBuilder(int index) { + return internalGetCitationsFieldBuilder() + .addBuilder(index, com.google.cloud.discoveryengine.v1beta.Citation.getDefaultInstance()); + } + + /** + * + * + *
            +     * Output only. List of citations.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Citation citations = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List + getCitationsBuilderList() { + return internalGetCitationsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.discoveryengine.v1beta.Citation, + com.google.cloud.discoveryengine.v1beta.Citation.Builder, + com.google.cloud.discoveryengine.v1beta.CitationOrBuilder> + internalGetCitationsFieldBuilder() { + if (citationsBuilder_ == null) { + citationsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.discoveryengine.v1beta.Citation, + com.google.cloud.discoveryengine.v1beta.Citation.Builder, + com.google.cloud.discoveryengine.v1beta.CitationOrBuilder>( + citations_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + citations_ = null; + } + return citationsBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.CitationMetadata) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.CitationMetadata) + private static final com.google.cloud.discoveryengine.v1beta.CitationMetadata DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.discoveryengine.v1beta.CitationMetadata(); + } + + public static com.google.cloud.discoveryengine.v1beta.CitationMetadata getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CitationMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.CitationMetadata getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/CitationMetadataOrBuilder.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/CitationMetadataOrBuilder.java new file mode 100644 index 000000000000..c56a2b975de7 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/CitationMetadataOrBuilder.java @@ -0,0 +1,94 @@ +/* + * 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/cloud/discoveryengine/v1beta/grounded_generation_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.discoveryengine.v1beta; + +@com.google.protobuf.Generated +public interface CitationMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.CitationMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
            +   * Output only. List of citations.
            +   * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Citation citations = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.List getCitationsList(); + + /** + * + * + *
            +   * Output only. List of citations.
            +   * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Citation citations = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.discoveryengine.v1beta.Citation getCitations(int index); + + /** + * + * + *
            +   * Output only. List of citations.
            +   * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Citation citations = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + int getCitationsCount(); + + /** + * + * + *
            +   * Output only. List of citations.
            +   * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Citation citations = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.List + getCitationsOrBuilderList(); + + /** + * + * + *
            +   * Output only. List of citations.
            +   * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Citation citations = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.discoveryengine.v1beta.CitationOrBuilder getCitationsOrBuilder(int index); +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/CitationOrBuilder.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/CitationOrBuilder.java new file mode 100644 index 000000000000..49646f704f6f --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/CitationOrBuilder.java @@ -0,0 +1,172 @@ +/* + * 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/cloud/discoveryengine/v1beta/grounded_generation_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.discoveryengine.v1beta; + +@com.google.protobuf.Generated +public interface CitationOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.Citation) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
            +   * Output only. Start index into the content.
            +   * 
            + * + * int32 start_index = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The startIndex. + */ + int getStartIndex(); + + /** + * + * + *
            +   * Output only. End index into the content.
            +   * 
            + * + * int32 end_index = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The endIndex. + */ + int getEndIndex(); + + /** + * + * + *
            +   * Output only. Url reference of the attribution.
            +   * 
            + * + * string uri = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The uri. + */ + java.lang.String getUri(); + + /** + * + * + *
            +   * Output only. Url reference of the attribution.
            +   * 
            + * + * string uri = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for uri. + */ + com.google.protobuf.ByteString getUriBytes(); + + /** + * + * + *
            +   * Output only. Title of the attribution.
            +   * 
            + * + * string title = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The title. + */ + java.lang.String getTitle(); + + /** + * + * + *
            +   * Output only. Title of the attribution.
            +   * 
            + * + * string title = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for title. + */ + com.google.protobuf.ByteString getTitleBytes(); + + /** + * + * + *
            +   * Output only. License of the attribution.
            +   * 
            + * + * string license = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The license. + */ + java.lang.String getLicense(); + + /** + * + * + *
            +   * Output only. License of the attribution.
            +   * 
            + * + * string license = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for license. + */ + com.google.protobuf.ByteString getLicenseBytes(); + + /** + * + * + *
            +   * Output only. Publication date of the attribution.
            +   * 
            + * + * .google.type.Date publication_date = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the publicationDate field is set. + */ + boolean hasPublicationDate(); + + /** + * + * + *
            +   * Output only. Publication date of the attribution.
            +   * 
            + * + * .google.type.Date publication_date = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The publicationDate. + */ + com.google.type.Date getPublicationDate(); + + /** + * + * + *
            +   * Output only. Publication date of the attribution.
            +   * 
            + * + * .google.type.Date publication_date = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.type.DateOrBuilder getPublicationDateOrBuilder(); +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/CmekConfig.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/CmekConfig.java new file mode 100644 index 000000000000..6224ba29d87b --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/CmekConfig.java @@ -0,0 +1,2710 @@ +/* + * 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/cloud/discoveryengine/v1beta/cmek_config_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.discoveryengine.v1beta; + +/** + * + * + *
            + * Configurations used to enable CMEK data encryption with Cloud KMS keys.
            + * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.CmekConfig} + */ +@com.google.protobuf.Generated +public final class CmekConfig extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.CmekConfig) + CmekConfigOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "CmekConfig"); + } + + // Use CmekConfig.newBuilder() to construct. + private CmekConfig(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private CmekConfig() { + name_ = ""; + kmsKey_ = ""; + kmsKeyVersion_ = ""; + state_ = 0; + singleRegionKeys_ = java.util.Collections.emptyList(); + notebooklmState_ = 0; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.CmekConfigServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_CmekConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.CmekConfigServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_CmekConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.CmekConfig.class, + com.google.cloud.discoveryengine.v1beta.CmekConfig.Builder.class); + } + + /** + * + * + *
            +   * States of the CmekConfig.
            +   * 
            + * + * Protobuf enum {@code google.cloud.discoveryengine.v1beta.CmekConfig.State} + */ + public enum State implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
            +     * The CmekConfig state is unknown.
            +     * 
            + * + * STATE_UNSPECIFIED = 0; + */ + STATE_UNSPECIFIED(0), + /** + * + * + *
            +     * The CmekConfig is creating.
            +     * 
            + * + * CREATING = 1; + */ + CREATING(1), + /** + * + * + *
            +     * The CmekConfig can be used with DataStores.
            +     * 
            + * + * ACTIVE = 2; + */ + ACTIVE(2), + /** + * + * + *
            +     * The CmekConfig is unavailable, most likely due to the KMS Key being
            +     * revoked.
            +     * 
            + * + * KEY_ISSUE = 3; + */ + KEY_ISSUE(3), + /** + * + * + *
            +     * The CmekConfig is deleting.
            +     * 
            + * + * DELETING = 4; + */ + DELETING(4), + /** + * + * + *
            +     * The CmekConfig deletion process failed.
            +     * 
            + * + * DELETE_FAILED = 7; + */ + DELETE_FAILED(7), + /** + * + * + *
            +     * The CmekConfig is not usable, most likely due to some internal issue.
            +     * 
            + * + * UNUSABLE = 5; + */ + UNUSABLE(5), + /** + * + * + *
            +     * The KMS key version is being rotated.
            +     * 
            + * + * ACTIVE_ROTATING = 6; + */ + ACTIVE_ROTATING(6), + /** + * + * + *
            +     * The KMS key is soft deleted. Some cleanup policy will eventually be
            +     * applied.
            +     * 
            + * + * DELETED = 8; + */ + DELETED(8), + /** + * + * + *
            +     * The KMS key is expired, meaning the key has been disabled for 30+ days.
            +     * The customer can call DeleteCmekConfig to change the state to DELETED.
            +     * 
            + * + * EXPIRED = 9; + */ + EXPIRED(9), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "State"); + } + + /** + * + * + *
            +     * The CmekConfig state is unknown.
            +     * 
            + * + * STATE_UNSPECIFIED = 0; + */ + public static final int STATE_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
            +     * The CmekConfig is creating.
            +     * 
            + * + * CREATING = 1; + */ + public static final int CREATING_VALUE = 1; + + /** + * + * + *
            +     * The CmekConfig can be used with DataStores.
            +     * 
            + * + * ACTIVE = 2; + */ + public static final int ACTIVE_VALUE = 2; + + /** + * + * + *
            +     * The CmekConfig is unavailable, most likely due to the KMS Key being
            +     * revoked.
            +     * 
            + * + * KEY_ISSUE = 3; + */ + public static final int KEY_ISSUE_VALUE = 3; + + /** + * + * + *
            +     * The CmekConfig is deleting.
            +     * 
            + * + * DELETING = 4; + */ + public static final int DELETING_VALUE = 4; + + /** + * + * + *
            +     * The CmekConfig deletion process failed.
            +     * 
            + * + * DELETE_FAILED = 7; + */ + public static final int DELETE_FAILED_VALUE = 7; + + /** + * + * + *
            +     * The CmekConfig is not usable, most likely due to some internal issue.
            +     * 
            + * + * UNUSABLE = 5; + */ + public static final int UNUSABLE_VALUE = 5; + + /** + * + * + *
            +     * The KMS key version is being rotated.
            +     * 
            + * + * ACTIVE_ROTATING = 6; + */ + public static final int ACTIVE_ROTATING_VALUE = 6; + + /** + * + * + *
            +     * The KMS key is soft deleted. Some cleanup policy will eventually be
            +     * applied.
            +     * 
            + * + * DELETED = 8; + */ + public static final int DELETED_VALUE = 8; + + /** + * + * + *
            +     * The KMS key is expired, meaning the key has been disabled for 30+ days.
            +     * The customer can call DeleteCmekConfig to change the state to DELETED.
            +     * 
            + * + * EXPIRED = 9; + */ + public static final int EXPIRED_VALUE = 9; + + 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 State 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 State forNumber(int value) { + switch (value) { + case 0: + return STATE_UNSPECIFIED; + case 1: + return CREATING; + case 2: + return ACTIVE; + case 3: + return KEY_ISSUE; + case 4: + return DELETING; + case 7: + return DELETE_FAILED; + case 5: + return UNUSABLE; + case 6: + return ACTIVE_ROTATING; + case 8: + return DELETED; + case 9: + return EXPIRED; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public State findValueByNumber(int number) { + return State.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.CmekConfig.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final State[] VALUES = values(); + + public static State valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private State(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.discoveryengine.v1beta.CmekConfig.State) + } + + /** + * + * + *
            +   * States of NotebookLM.
            +   * 
            + * + * Protobuf enum {@code google.cloud.discoveryengine.v1beta.CmekConfig.NotebookLMState} + */ + public enum NotebookLMState implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
            +     * The NotebookLM state is unknown.
            +     * 
            + * + * NOTEBOOK_LM_STATE_UNSPECIFIED = 0; + */ + NOTEBOOK_LM_STATE_UNSPECIFIED(0), + /** + * + * + *
            +     * The NotebookLM is not ready.
            +     * 
            + * + * NOTEBOOK_LM_NOT_READY = 1; + */ + NOTEBOOK_LM_NOT_READY(1), + /** + * + * + *
            +     * The NotebookLM is ready to be used.
            +     * 
            + * + * NOTEBOOK_LM_READY = 2; + */ + NOTEBOOK_LM_READY(2), + /** + * + * + *
            +     * The NotebookLM is not enabled.
            +     * 
            + * + * NOTEBOOK_LM_NOT_ENABLED = 3; + */ + NOTEBOOK_LM_NOT_ENABLED(3), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "NotebookLMState"); + } + + /** + * + * + *
            +     * The NotebookLM state is unknown.
            +     * 
            + * + * NOTEBOOK_LM_STATE_UNSPECIFIED = 0; + */ + public static final int NOTEBOOK_LM_STATE_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
            +     * The NotebookLM is not ready.
            +     * 
            + * + * NOTEBOOK_LM_NOT_READY = 1; + */ + public static final int NOTEBOOK_LM_NOT_READY_VALUE = 1; + + /** + * + * + *
            +     * The NotebookLM is ready to be used.
            +     * 
            + * + * NOTEBOOK_LM_READY = 2; + */ + public static final int NOTEBOOK_LM_READY_VALUE = 2; + + /** + * + * + *
            +     * The NotebookLM is not enabled.
            +     * 
            + * + * NOTEBOOK_LM_NOT_ENABLED = 3; + */ + public static final int NOTEBOOK_LM_NOT_ENABLED_VALUE = 3; + + 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 NotebookLMState 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 NotebookLMState forNumber(int value) { + switch (value) { + case 0: + return NOTEBOOK_LM_STATE_UNSPECIFIED; + case 1: + return NOTEBOOK_LM_NOT_READY; + case 2: + return NOTEBOOK_LM_READY; + case 3: + return NOTEBOOK_LM_NOT_ENABLED; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap + internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public NotebookLMState findValueByNumber(int number) { + return NotebookLMState.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.CmekConfig.getDescriptor() + .getEnumTypes() + .get(1); + } + + private static final NotebookLMState[] VALUES = values(); + + public static NotebookLMState valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private NotebookLMState(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.discoveryengine.v1beta.CmekConfig.NotebookLMState) + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
            +   * Required. The name of the CmekConfig of the form
            +   * `projects/{project}/locations/{location}/cmekConfig` or
            +   * `projects/{project}/locations/{location}/cmekConfigs/{cmek_config}`.
            +   * 
            + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + 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(); + name_ = s; + return s; + } + } + + /** + * + * + *
            +   * Required. The name of the CmekConfig of the form
            +   * `projects/{project}/locations/{location}/cmekConfig` or
            +   * `projects/{project}/locations/{location}/cmekConfigs/{cmek_config}`.
            +   * 
            + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int KMS_KEY_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object kmsKey_ = ""; + + /** + * + * + *
            +   * Required. KMS key resource name which will be used to encrypt resources
            +   * `projects/{project}/locations/{location}/keyRings/{keyRing}/cryptoKeys/{keyId}`.
            +   * 
            + * + * + * string kms_key = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The kmsKey. + */ + @java.lang.Override + public java.lang.String getKmsKey() { + java.lang.Object ref = kmsKey_; + 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(); + kmsKey_ = s; + return s; + } + } + + /** + * + * + *
            +   * Required. KMS key resource name which will be used to encrypt resources
            +   * `projects/{project}/locations/{location}/keyRings/{keyRing}/cryptoKeys/{keyId}`.
            +   * 
            + * + * + * string kms_key = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for kmsKey. + */ + @java.lang.Override + public com.google.protobuf.ByteString getKmsKeyBytes() { + java.lang.Object ref = kmsKey_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + kmsKey_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int KMS_KEY_VERSION_FIELD_NUMBER = 6; + + @SuppressWarnings("serial") + private volatile java.lang.Object kmsKeyVersion_ = ""; + + /** + * + * + *
            +   * Output only. KMS key version resource name which will be used to encrypt
            +   * resources
            +   * `<kms_key>/cryptoKeyVersions/{keyVersion}`.
            +   * 
            + * + * + * string kms_key_version = 6 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The kmsKeyVersion. + */ + @java.lang.Override + public java.lang.String getKmsKeyVersion() { + java.lang.Object ref = kmsKeyVersion_; + 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(); + kmsKeyVersion_ = s; + return s; + } + } + + /** + * + * + *
            +   * Output only. KMS key version resource name which will be used to encrypt
            +   * resources
            +   * `<kms_key>/cryptoKeyVersions/{keyVersion}`.
            +   * 
            + * + * + * string kms_key_version = 6 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for kmsKeyVersion. + */ + @java.lang.Override + public com.google.protobuf.ByteString getKmsKeyVersionBytes() { + java.lang.Object ref = kmsKeyVersion_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + kmsKeyVersion_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int STATE_FIELD_NUMBER = 3; + private int state_ = 0; + + /** + * + * + *
            +   * Output only. The states of the CmekConfig.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.CmekConfig.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + + /** + * + * + *
            +   * Output only. The states of the CmekConfig.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.CmekConfig.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.CmekConfig.State getState() { + com.google.cloud.discoveryengine.v1beta.CmekConfig.State result = + com.google.cloud.discoveryengine.v1beta.CmekConfig.State.forNumber(state_); + return result == null + ? com.google.cloud.discoveryengine.v1beta.CmekConfig.State.UNRECOGNIZED + : result; + } + + public static final int IS_DEFAULT_FIELD_NUMBER = 4; + private boolean isDefault_ = false; + + /** + * + * + *
            +   * Output only. The default CmekConfig for the Customer.
            +   * 
            + * + * bool is_default = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The isDefault. + */ + @java.lang.Override + public boolean getIsDefault() { + return isDefault_; + } + + public static final int LAST_ROTATION_TIMESTAMP_MICROS_FIELD_NUMBER = 5; + private long lastRotationTimestampMicros_ = 0L; + + /** + * + * + *
            +   * Output only. The timestamp of the last key rotation.
            +   * 
            + * + * int64 last_rotation_timestamp_micros = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The lastRotationTimestampMicros. + */ + @java.lang.Override + public long getLastRotationTimestampMicros() { + return lastRotationTimestampMicros_; + } + + public static final int SINGLE_REGION_KEYS_FIELD_NUMBER = 7; + + @SuppressWarnings("serial") + private java.util.List singleRegionKeys_; + + /** + * + * + *
            +   * Optional. Single-regional CMEKs that are required for some VAIS features.
            +   * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.SingleRegionKey single_region_keys = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List + getSingleRegionKeysList() { + return singleRegionKeys_; + } + + /** + * + * + *
            +   * Optional. Single-regional CMEKs that are required for some VAIS features.
            +   * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.SingleRegionKey single_region_keys = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List + getSingleRegionKeysOrBuilderList() { + return singleRegionKeys_; + } + + /** + * + * + *
            +   * Optional. Single-regional CMEKs that are required for some VAIS features.
            +   * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.SingleRegionKey single_region_keys = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public int getSingleRegionKeysCount() { + return singleRegionKeys_.size(); + } + + /** + * + * + *
            +   * Optional. Single-regional CMEKs that are required for some VAIS features.
            +   * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.SingleRegionKey single_region_keys = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.SingleRegionKey getSingleRegionKeys(int index) { + return singleRegionKeys_.get(index); + } + + /** + * + * + *
            +   * Optional. Single-regional CMEKs that are required for some VAIS features.
            +   * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.SingleRegionKey single_region_keys = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.SingleRegionKeyOrBuilder + getSingleRegionKeysOrBuilder(int index) { + return singleRegionKeys_.get(index); + } + + public static final int NOTEBOOKLM_STATE_FIELD_NUMBER = 8; + private int notebooklmState_ = 0; + + /** + * + * + *
            +   * Output only. Whether the NotebookLM Corpus is ready to be used.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.CmekConfig.NotebookLMState notebooklm_state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for notebooklmState. + */ + @java.lang.Override + public int getNotebooklmStateValue() { + return notebooklmState_; + } + + /** + * + * + *
            +   * Output only. Whether the NotebookLM Corpus is ready to be used.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.CmekConfig.NotebookLMState notebooklm_state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The notebooklmState. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.CmekConfig.NotebookLMState getNotebooklmState() { + com.google.cloud.discoveryengine.v1beta.CmekConfig.NotebookLMState result = + com.google.cloud.discoveryengine.v1beta.CmekConfig.NotebookLMState.forNumber( + notebooklmState_); + return result == null + ? com.google.cloud.discoveryengine.v1beta.CmekConfig.NotebookLMState.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(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(kmsKey_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, kmsKey_); + } + if (state_ + != com.google.cloud.discoveryengine.v1beta.CmekConfig.State.STATE_UNSPECIFIED.getNumber()) { + output.writeEnum(3, state_); + } + if (isDefault_ != false) { + output.writeBool(4, isDefault_); + } + if (lastRotationTimestampMicros_ != 0L) { + output.writeInt64(5, lastRotationTimestampMicros_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(kmsKeyVersion_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 6, kmsKeyVersion_); + } + for (int i = 0; i < singleRegionKeys_.size(); i++) { + output.writeMessage(7, singleRegionKeys_.get(i)); + } + if (notebooklmState_ + != com.google.cloud.discoveryengine.v1beta.CmekConfig.NotebookLMState + .NOTEBOOK_LM_STATE_UNSPECIFIED + .getNumber()) { + output.writeEnum(8, notebooklmState_); + } + 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(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(kmsKey_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, kmsKey_); + } + if (state_ + != com.google.cloud.discoveryengine.v1beta.CmekConfig.State.STATE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(3, state_); + } + if (isDefault_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(4, isDefault_); + } + if (lastRotationTimestampMicros_ != 0L) { + size += + com.google.protobuf.CodedOutputStream.computeInt64Size(5, lastRotationTimestampMicros_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(kmsKeyVersion_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(6, kmsKeyVersion_); + } + for (int i = 0; i < singleRegionKeys_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, singleRegionKeys_.get(i)); + } + if (notebooklmState_ + != com.google.cloud.discoveryengine.v1beta.CmekConfig.NotebookLMState + .NOTEBOOK_LM_STATE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(8, notebooklmState_); + } + 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.discoveryengine.v1beta.CmekConfig)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1beta.CmekConfig other = + (com.google.cloud.discoveryengine.v1beta.CmekConfig) obj; + + if (!getName().equals(other.getName())) return false; + if (!getKmsKey().equals(other.getKmsKey())) return false; + if (!getKmsKeyVersion().equals(other.getKmsKeyVersion())) return false; + if (state_ != other.state_) return false; + if (getIsDefault() != other.getIsDefault()) return false; + if (getLastRotationTimestampMicros() != other.getLastRotationTimestampMicros()) return false; + if (!getSingleRegionKeysList().equals(other.getSingleRegionKeysList())) return false; + if (notebooklmState_ != other.notebooklmState_) 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) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + KMS_KEY_FIELD_NUMBER; + hash = (53 * hash) + getKmsKey().hashCode(); + hash = (37 * hash) + KMS_KEY_VERSION_FIELD_NUMBER; + hash = (53 * hash) + getKmsKeyVersion().hashCode(); + hash = (37 * hash) + STATE_FIELD_NUMBER; + hash = (53 * hash) + state_; + hash = (37 * hash) + IS_DEFAULT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getIsDefault()); + hash = (37 * hash) + LAST_ROTATION_TIMESTAMP_MICROS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getLastRotationTimestampMicros()); + if (getSingleRegionKeysCount() > 0) { + hash = (37 * hash) + SINGLE_REGION_KEYS_FIELD_NUMBER; + hash = (53 * hash) + getSingleRegionKeysList().hashCode(); + } + hash = (37 * hash) + NOTEBOOKLM_STATE_FIELD_NUMBER; + hash = (53 * hash) + notebooklmState_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1beta.CmekConfig parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.CmekConfig 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.discoveryengine.v1beta.CmekConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.CmekConfig 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.discoveryengine.v1beta.CmekConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.CmekConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1beta.CmekConfig parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.CmekConfig 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.discoveryengine.v1beta.CmekConfig parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.CmekConfig 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.discoveryengine.v1beta.CmekConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.CmekConfig 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.discoveryengine.v1beta.CmekConfig 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; + } + + /** + * + * + *
            +   * Configurations used to enable CMEK data encryption with Cloud KMS keys.
            +   * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.CmekConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.CmekConfig) + com.google.cloud.discoveryengine.v1beta.CmekConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.CmekConfigServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_CmekConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.CmekConfigServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_CmekConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.CmekConfig.class, + com.google.cloud.discoveryengine.v1beta.CmekConfig.Builder.class); + } + + // Construct using com.google.cloud.discoveryengine.v1beta.CmekConfig.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + kmsKey_ = ""; + kmsKeyVersion_ = ""; + state_ = 0; + isDefault_ = false; + lastRotationTimestampMicros_ = 0L; + if (singleRegionKeysBuilder_ == null) { + singleRegionKeys_ = java.util.Collections.emptyList(); + } else { + singleRegionKeys_ = null; + singleRegionKeysBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000040); + notebooklmState_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1beta.CmekConfigServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_CmekConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.CmekConfig getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1beta.CmekConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.CmekConfig build() { + com.google.cloud.discoveryengine.v1beta.CmekConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.CmekConfig buildPartial() { + com.google.cloud.discoveryengine.v1beta.CmekConfig result = + new com.google.cloud.discoveryengine.v1beta.CmekConfig(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.discoveryengine.v1beta.CmekConfig result) { + if (singleRegionKeysBuilder_ == null) { + if (((bitField0_ & 0x00000040) != 0)) { + singleRegionKeys_ = java.util.Collections.unmodifiableList(singleRegionKeys_); + bitField0_ = (bitField0_ & ~0x00000040); + } + result.singleRegionKeys_ = singleRegionKeys_; + } else { + result.singleRegionKeys_ = singleRegionKeysBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.discoveryengine.v1beta.CmekConfig result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.kmsKey_ = kmsKey_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.kmsKeyVersion_ = kmsKeyVersion_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.state_ = state_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.isDefault_ = isDefault_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.lastRotationTimestampMicros_ = lastRotationTimestampMicros_; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.notebooklmState_ = notebooklmState_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.discoveryengine.v1beta.CmekConfig) { + return mergeFrom((com.google.cloud.discoveryengine.v1beta.CmekConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.discoveryengine.v1beta.CmekConfig other) { + if (other == com.google.cloud.discoveryengine.v1beta.CmekConfig.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getKmsKey().isEmpty()) { + kmsKey_ = other.kmsKey_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getKmsKeyVersion().isEmpty()) { + kmsKeyVersion_ = other.kmsKeyVersion_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (other.state_ != 0) { + setStateValue(other.getStateValue()); + } + if (other.getIsDefault() != false) { + setIsDefault(other.getIsDefault()); + } + if (other.getLastRotationTimestampMicros() != 0L) { + setLastRotationTimestampMicros(other.getLastRotationTimestampMicros()); + } + if (singleRegionKeysBuilder_ == null) { + if (!other.singleRegionKeys_.isEmpty()) { + if (singleRegionKeys_.isEmpty()) { + singleRegionKeys_ = other.singleRegionKeys_; + bitField0_ = (bitField0_ & ~0x00000040); + } else { + ensureSingleRegionKeysIsMutable(); + singleRegionKeys_.addAll(other.singleRegionKeys_); + } + onChanged(); + } + } else { + if (!other.singleRegionKeys_.isEmpty()) { + if (singleRegionKeysBuilder_.isEmpty()) { + singleRegionKeysBuilder_.dispose(); + singleRegionKeysBuilder_ = null; + singleRegionKeys_ = other.singleRegionKeys_; + bitField0_ = (bitField0_ & ~0x00000040); + singleRegionKeysBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetSingleRegionKeysFieldBuilder() + : null; + } else { + singleRegionKeysBuilder_.addAllMessages(other.singleRegionKeys_); + } + } + } + if (other.notebooklmState_ != 0) { + setNotebooklmStateValue(other.getNotebooklmStateValue()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + kmsKey_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: + { + state_ = input.readEnum(); + bitField0_ |= 0x00000008; + break; + } // case 24 + case 32: + { + isDefault_ = input.readBool(); + bitField0_ |= 0x00000010; + break; + } // case 32 + case 40: + { + lastRotationTimestampMicros_ = input.readInt64(); + bitField0_ |= 0x00000020; + break; + } // case 40 + case 50: + { + kmsKeyVersion_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 50 + case 58: + { + com.google.cloud.discoveryengine.v1beta.SingleRegionKey m = + input.readMessage( + com.google.cloud.discoveryengine.v1beta.SingleRegionKey.parser(), + extensionRegistry); + if (singleRegionKeysBuilder_ == null) { + ensureSingleRegionKeysIsMutable(); + singleRegionKeys_.add(m); + } else { + singleRegionKeysBuilder_.addMessage(m); + } + break; + } // case 58 + case 64: + { + notebooklmState_ = input.readEnum(); + bitField0_ |= 0x00000080; + break; + } // case 64 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + + /** + * + * + *
            +     * Required. The name of the CmekConfig of the form
            +     * `projects/{project}/locations/{location}/cmekConfig` or
            +     * `projects/{project}/locations/{location}/cmekConfigs/{cmek_config}`.
            +     * 
            + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
            +     * Required. The name of the CmekConfig of the form
            +     * `projects/{project}/locations/{location}/cmekConfig` or
            +     * `projects/{project}/locations/{location}/cmekConfigs/{cmek_config}`.
            +     * 
            + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
            +     * Required. The name of the CmekConfig of the form
            +     * `projects/{project}/locations/{location}/cmekConfig` or
            +     * `projects/{project}/locations/{location}/cmekConfigs/{cmek_config}`.
            +     * 
            + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Required. The name of the CmekConfig of the form
            +     * `projects/{project}/locations/{location}/cmekConfig` or
            +     * `projects/{project}/locations/{location}/cmekConfigs/{cmek_config}`.
            +     * 
            + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
            +     * Required. The name of the CmekConfig of the form
            +     * `projects/{project}/locations/{location}/cmekConfig` or
            +     * `projects/{project}/locations/{location}/cmekConfigs/{cmek_config}`.
            +     * 
            + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object kmsKey_ = ""; + + /** + * + * + *
            +     * Required. KMS key resource name which will be used to encrypt resources
            +     * `projects/{project}/locations/{location}/keyRings/{keyRing}/cryptoKeys/{keyId}`.
            +     * 
            + * + * + * string kms_key = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The kmsKey. + */ + public java.lang.String getKmsKey() { + java.lang.Object ref = kmsKey_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + kmsKey_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
            +     * Required. KMS key resource name which will be used to encrypt resources
            +     * `projects/{project}/locations/{location}/keyRings/{keyRing}/cryptoKeys/{keyId}`.
            +     * 
            + * + * + * string kms_key = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for kmsKey. + */ + public com.google.protobuf.ByteString getKmsKeyBytes() { + java.lang.Object ref = kmsKey_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + kmsKey_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
            +     * Required. KMS key resource name which will be used to encrypt resources
            +     * `projects/{project}/locations/{location}/keyRings/{keyRing}/cryptoKeys/{keyId}`.
            +     * 
            + * + * + * string kms_key = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The kmsKey to set. + * @return This builder for chaining. + */ + public Builder setKmsKey(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + kmsKey_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Required. KMS key resource name which will be used to encrypt resources
            +     * `projects/{project}/locations/{location}/keyRings/{keyRing}/cryptoKeys/{keyId}`.
            +     * 
            + * + * + * string kms_key = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearKmsKey() { + kmsKey_ = getDefaultInstance().getKmsKey(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
            +     * Required. KMS key resource name which will be used to encrypt resources
            +     * `projects/{project}/locations/{location}/keyRings/{keyRing}/cryptoKeys/{keyId}`.
            +     * 
            + * + * + * string kms_key = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for kmsKey to set. + * @return This builder for chaining. + */ + public Builder setKmsKeyBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + kmsKey_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object kmsKeyVersion_ = ""; + + /** + * + * + *
            +     * Output only. KMS key version resource name which will be used to encrypt
            +     * resources
            +     * `<kms_key>/cryptoKeyVersions/{keyVersion}`.
            +     * 
            + * + * + * string kms_key_version = 6 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The kmsKeyVersion. + */ + public java.lang.String getKmsKeyVersion() { + java.lang.Object ref = kmsKeyVersion_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + kmsKeyVersion_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
            +     * Output only. KMS key version resource name which will be used to encrypt
            +     * resources
            +     * `<kms_key>/cryptoKeyVersions/{keyVersion}`.
            +     * 
            + * + * + * string kms_key_version = 6 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for kmsKeyVersion. + */ + public com.google.protobuf.ByteString getKmsKeyVersionBytes() { + java.lang.Object ref = kmsKeyVersion_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + kmsKeyVersion_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
            +     * Output only. KMS key version resource name which will be used to encrypt
            +     * resources
            +     * `<kms_key>/cryptoKeyVersions/{keyVersion}`.
            +     * 
            + * + * + * string kms_key_version = 6 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @param value The kmsKeyVersion to set. + * @return This builder for chaining. + */ + public Builder setKmsKeyVersion(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + kmsKeyVersion_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Output only. KMS key version resource name which will be used to encrypt
            +     * resources
            +     * `<kms_key>/cryptoKeyVersions/{keyVersion}`.
            +     * 
            + * + * + * string kms_key_version = 6 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearKmsKeyVersion() { + kmsKeyVersion_ = getDefaultInstance().getKmsKeyVersion(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
            +     * Output only. KMS key version resource name which will be used to encrypt
            +     * resources
            +     * `<kms_key>/cryptoKeyVersions/{keyVersion}`.
            +     * 
            + * + * + * string kms_key_version = 6 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for kmsKeyVersion to set. + * @return This builder for chaining. + */ + public Builder setKmsKeyVersionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + kmsKeyVersion_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private int state_ = 0; + + /** + * + * + *
            +     * Output only. The states of the CmekConfig.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.CmekConfig.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + + /** + * + * + *
            +     * Output only. The states of the CmekConfig.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.CmekConfig.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The enum numeric value on the wire for state to set. + * @return This builder for chaining. + */ + public Builder setStateValue(int value) { + state_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Output only. The states of the CmekConfig.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.CmekConfig.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.CmekConfig.State getState() { + com.google.cloud.discoveryengine.v1beta.CmekConfig.State result = + com.google.cloud.discoveryengine.v1beta.CmekConfig.State.forNumber(state_); + return result == null + ? com.google.cloud.discoveryengine.v1beta.CmekConfig.State.UNRECOGNIZED + : result; + } + + /** + * + * + *
            +     * Output only. The states of the CmekConfig.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.CmekConfig.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The state to set. + * @return This builder for chaining. + */ + public Builder setState(com.google.cloud.discoveryengine.v1beta.CmekConfig.State value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000008; + state_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
            +     * Output only. The states of the CmekConfig.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.CmekConfig.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearState() { + bitField0_ = (bitField0_ & ~0x00000008); + state_ = 0; + onChanged(); + return this; + } + + private boolean isDefault_; + + /** + * + * + *
            +     * Output only. The default CmekConfig for the Customer.
            +     * 
            + * + * bool is_default = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The isDefault. + */ + @java.lang.Override + public boolean getIsDefault() { + return isDefault_; + } + + /** + * + * + *
            +     * Output only. The default CmekConfig for the Customer.
            +     * 
            + * + * bool is_default = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The isDefault to set. + * @return This builder for chaining. + */ + public Builder setIsDefault(boolean value) { + + isDefault_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Output only. The default CmekConfig for the Customer.
            +     * 
            + * + * bool is_default = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearIsDefault() { + bitField0_ = (bitField0_ & ~0x00000010); + isDefault_ = false; + onChanged(); + return this; + } + + private long lastRotationTimestampMicros_; + + /** + * + * + *
            +     * Output only. The timestamp of the last key rotation.
            +     * 
            + * + * int64 last_rotation_timestamp_micros = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The lastRotationTimestampMicros. + */ + @java.lang.Override + public long getLastRotationTimestampMicros() { + return lastRotationTimestampMicros_; + } + + /** + * + * + *
            +     * Output only. The timestamp of the last key rotation.
            +     * 
            + * + * int64 last_rotation_timestamp_micros = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The lastRotationTimestampMicros to set. + * @return This builder for chaining. + */ + public Builder setLastRotationTimestampMicros(long value) { + + lastRotationTimestampMicros_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Output only. The timestamp of the last key rotation.
            +     * 
            + * + * int64 last_rotation_timestamp_micros = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearLastRotationTimestampMicros() { + bitField0_ = (bitField0_ & ~0x00000020); + lastRotationTimestampMicros_ = 0L; + onChanged(); + return this; + } + + private java.util.List + singleRegionKeys_ = java.util.Collections.emptyList(); + + private void ensureSingleRegionKeysIsMutable() { + if (!((bitField0_ & 0x00000040) != 0)) { + singleRegionKeys_ = + new java.util.ArrayList( + singleRegionKeys_); + bitField0_ |= 0x00000040; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.discoveryengine.v1beta.SingleRegionKey, + com.google.cloud.discoveryengine.v1beta.SingleRegionKey.Builder, + com.google.cloud.discoveryengine.v1beta.SingleRegionKeyOrBuilder> + singleRegionKeysBuilder_; + + /** + * + * + *
            +     * Optional. Single-regional CMEKs that are required for some VAIS features.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.SingleRegionKey single_region_keys = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getSingleRegionKeysList() { + if (singleRegionKeysBuilder_ == null) { + return java.util.Collections.unmodifiableList(singleRegionKeys_); + } else { + return singleRegionKeysBuilder_.getMessageList(); + } + } + + /** + * + * + *
            +     * Optional. Single-regional CMEKs that are required for some VAIS features.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.SingleRegionKey single_region_keys = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public int getSingleRegionKeysCount() { + if (singleRegionKeysBuilder_ == null) { + return singleRegionKeys_.size(); + } else { + return singleRegionKeysBuilder_.getCount(); + } + } + + /** + * + * + *
            +     * Optional. Single-regional CMEKs that are required for some VAIS features.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.SingleRegionKey single_region_keys = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.discoveryengine.v1beta.SingleRegionKey getSingleRegionKeys(int index) { + if (singleRegionKeysBuilder_ == null) { + return singleRegionKeys_.get(index); + } else { + return singleRegionKeysBuilder_.getMessage(index); + } + } + + /** + * + * + *
            +     * Optional. Single-regional CMEKs that are required for some VAIS features.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.SingleRegionKey single_region_keys = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setSingleRegionKeys( + int index, com.google.cloud.discoveryengine.v1beta.SingleRegionKey value) { + if (singleRegionKeysBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSingleRegionKeysIsMutable(); + singleRegionKeys_.set(index, value); + onChanged(); + } else { + singleRegionKeysBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
            +     * Optional. Single-regional CMEKs that are required for some VAIS features.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.SingleRegionKey single_region_keys = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setSingleRegionKeys( + int index, + com.google.cloud.discoveryengine.v1beta.SingleRegionKey.Builder builderForValue) { + if (singleRegionKeysBuilder_ == null) { + ensureSingleRegionKeysIsMutable(); + singleRegionKeys_.set(index, builderForValue.build()); + onChanged(); + } else { + singleRegionKeysBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
            +     * Optional. Single-regional CMEKs that are required for some VAIS features.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.SingleRegionKey single_region_keys = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addSingleRegionKeys( + com.google.cloud.discoveryengine.v1beta.SingleRegionKey value) { + if (singleRegionKeysBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSingleRegionKeysIsMutable(); + singleRegionKeys_.add(value); + onChanged(); + } else { + singleRegionKeysBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
            +     * Optional. Single-regional CMEKs that are required for some VAIS features.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.SingleRegionKey single_region_keys = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addSingleRegionKeys( + int index, com.google.cloud.discoveryengine.v1beta.SingleRegionKey value) { + if (singleRegionKeysBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSingleRegionKeysIsMutable(); + singleRegionKeys_.add(index, value); + onChanged(); + } else { + singleRegionKeysBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
            +     * Optional. Single-regional CMEKs that are required for some VAIS features.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.SingleRegionKey single_region_keys = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addSingleRegionKeys( + com.google.cloud.discoveryengine.v1beta.SingleRegionKey.Builder builderForValue) { + if (singleRegionKeysBuilder_ == null) { + ensureSingleRegionKeysIsMutable(); + singleRegionKeys_.add(builderForValue.build()); + onChanged(); + } else { + singleRegionKeysBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
            +     * Optional. Single-regional CMEKs that are required for some VAIS features.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.SingleRegionKey single_region_keys = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addSingleRegionKeys( + int index, + com.google.cloud.discoveryengine.v1beta.SingleRegionKey.Builder builderForValue) { + if (singleRegionKeysBuilder_ == null) { + ensureSingleRegionKeysIsMutable(); + singleRegionKeys_.add(index, builderForValue.build()); + onChanged(); + } else { + singleRegionKeysBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
            +     * Optional. Single-regional CMEKs that are required for some VAIS features.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.SingleRegionKey single_region_keys = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addAllSingleRegionKeys( + java.lang.Iterable + values) { + if (singleRegionKeysBuilder_ == null) { + ensureSingleRegionKeysIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, singleRegionKeys_); + onChanged(); + } else { + singleRegionKeysBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
            +     * Optional. Single-regional CMEKs that are required for some VAIS features.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.SingleRegionKey single_region_keys = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearSingleRegionKeys() { + if (singleRegionKeysBuilder_ == null) { + singleRegionKeys_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000040); + onChanged(); + } else { + singleRegionKeysBuilder_.clear(); + } + return this; + } + + /** + * + * + *
            +     * Optional. Single-regional CMEKs that are required for some VAIS features.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.SingleRegionKey single_region_keys = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder removeSingleRegionKeys(int index) { + if (singleRegionKeysBuilder_ == null) { + ensureSingleRegionKeysIsMutable(); + singleRegionKeys_.remove(index); + onChanged(); + } else { + singleRegionKeysBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
            +     * Optional. Single-regional CMEKs that are required for some VAIS features.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.SingleRegionKey single_region_keys = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.discoveryengine.v1beta.SingleRegionKey.Builder + getSingleRegionKeysBuilder(int index) { + return internalGetSingleRegionKeysFieldBuilder().getBuilder(index); + } + + /** + * + * + *
            +     * Optional. Single-regional CMEKs that are required for some VAIS features.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.SingleRegionKey single_region_keys = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.discoveryengine.v1beta.SingleRegionKeyOrBuilder + getSingleRegionKeysOrBuilder(int index) { + if (singleRegionKeysBuilder_ == null) { + return singleRegionKeys_.get(index); + } else { + return singleRegionKeysBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
            +     * Optional. Single-regional CMEKs that are required for some VAIS features.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.SingleRegionKey single_region_keys = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List< + ? extends com.google.cloud.discoveryengine.v1beta.SingleRegionKeyOrBuilder> + getSingleRegionKeysOrBuilderList() { + if (singleRegionKeysBuilder_ != null) { + return singleRegionKeysBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(singleRegionKeys_); + } + } + + /** + * + * + *
            +     * Optional. Single-regional CMEKs that are required for some VAIS features.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.SingleRegionKey single_region_keys = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.discoveryengine.v1beta.SingleRegionKey.Builder + addSingleRegionKeysBuilder() { + return internalGetSingleRegionKeysFieldBuilder() + .addBuilder(com.google.cloud.discoveryengine.v1beta.SingleRegionKey.getDefaultInstance()); + } + + /** + * + * + *
            +     * Optional. Single-regional CMEKs that are required for some VAIS features.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.SingleRegionKey single_region_keys = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.discoveryengine.v1beta.SingleRegionKey.Builder + addSingleRegionKeysBuilder(int index) { + return internalGetSingleRegionKeysFieldBuilder() + .addBuilder( + index, com.google.cloud.discoveryengine.v1beta.SingleRegionKey.getDefaultInstance()); + } + + /** + * + * + *
            +     * Optional. Single-regional CMEKs that are required for some VAIS features.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.SingleRegionKey single_region_keys = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getSingleRegionKeysBuilderList() { + return internalGetSingleRegionKeysFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.discoveryengine.v1beta.SingleRegionKey, + com.google.cloud.discoveryengine.v1beta.SingleRegionKey.Builder, + com.google.cloud.discoveryengine.v1beta.SingleRegionKeyOrBuilder> + internalGetSingleRegionKeysFieldBuilder() { + if (singleRegionKeysBuilder_ == null) { + singleRegionKeysBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.discoveryengine.v1beta.SingleRegionKey, + com.google.cloud.discoveryengine.v1beta.SingleRegionKey.Builder, + com.google.cloud.discoveryengine.v1beta.SingleRegionKeyOrBuilder>( + singleRegionKeys_, + ((bitField0_ & 0x00000040) != 0), + getParentForChildren(), + isClean()); + singleRegionKeys_ = null; + } + return singleRegionKeysBuilder_; + } + + private int notebooklmState_ = 0; + + /** + * + * + *
            +     * Output only. Whether the NotebookLM Corpus is ready to be used.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.CmekConfig.NotebookLMState notebooklm_state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for notebooklmState. + */ + @java.lang.Override + public int getNotebooklmStateValue() { + return notebooklmState_; + } + + /** + * + * + *
            +     * Output only. Whether the NotebookLM Corpus is ready to be used.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.CmekConfig.NotebookLMState notebooklm_state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The enum numeric value on the wire for notebooklmState to set. + * @return This builder for chaining. + */ + public Builder setNotebooklmStateValue(int value) { + notebooklmState_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Output only. Whether the NotebookLM Corpus is ready to be used.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.CmekConfig.NotebookLMState notebooklm_state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The notebooklmState. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.CmekConfig.NotebookLMState getNotebooklmState() { + com.google.cloud.discoveryengine.v1beta.CmekConfig.NotebookLMState result = + com.google.cloud.discoveryengine.v1beta.CmekConfig.NotebookLMState.forNumber( + notebooklmState_); + return result == null + ? com.google.cloud.discoveryengine.v1beta.CmekConfig.NotebookLMState.UNRECOGNIZED + : result; + } + + /** + * + * + *
            +     * Output only. Whether the NotebookLM Corpus is ready to be used.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.CmekConfig.NotebookLMState notebooklm_state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The notebooklmState to set. + * @return This builder for chaining. + */ + public Builder setNotebooklmState( + com.google.cloud.discoveryengine.v1beta.CmekConfig.NotebookLMState value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000080; + notebooklmState_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
            +     * Output only. Whether the NotebookLM Corpus is ready to be used.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.CmekConfig.NotebookLMState notebooklm_state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearNotebooklmState() { + bitField0_ = (bitField0_ & ~0x00000080); + notebooklmState_ = 0; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.CmekConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.CmekConfig) + private static final com.google.cloud.discoveryengine.v1beta.CmekConfig DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.discoveryengine.v1beta.CmekConfig(); + } + + public static com.google.cloud.discoveryengine.v1beta.CmekConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CmekConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.CmekConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/CmekConfigName.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/CmekConfigName.java new file mode 100644 index 000000000000..b436e35bc99e --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/CmekConfigName.java @@ -0,0 +1,306 @@ +/* + * 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.discoveryengine.v1beta; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.pathtemplate.ValidationException; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class CmekConfigName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION = + PathTemplate.createWithoutUrlEncoding("projects/{project}/locations/{location}/cmekConfig"); + private static final PathTemplate PROJECT_LOCATION_CMEK_CONFIG = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/cmekConfigs/{cmek_config}"); + private volatile Map fieldValuesMap; + private PathTemplate pathTemplate; + private String fixedValue; + private final String project; + private final String location; + private final String cmekConfig; + + @Deprecated + protected CmekConfigName() { + project = null; + location = null; + cmekConfig = null; + } + + private CmekConfigName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + cmekConfig = null; + pathTemplate = PROJECT_LOCATION; + } + + private CmekConfigName(ProjectLocationCmekConfigBuilder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + cmekConfig = Preconditions.checkNotNull(builder.getCmekConfig()); + pathTemplate = PROJECT_LOCATION_CMEK_CONFIG; + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getCmekConfig() { + return cmekConfig; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public static Builder newProjectLocationBuilder() { + return new Builder(); + } + + public static ProjectLocationCmekConfigBuilder newProjectLocationCmekConfigBuilder() { + return new ProjectLocationCmekConfigBuilder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static CmekConfigName of(String project, String location) { + return newBuilder().setProject(project).setLocation(location).build(); + } + + public static CmekConfigName ofProjectLocationName(String project, String location) { + return newBuilder().setProject(project).setLocation(location).build(); + } + + public static CmekConfigName ofProjectLocationCmekConfigName( + String project, String location, String cmekConfig) { + return newProjectLocationCmekConfigBuilder() + .setProject(project) + .setLocation(location) + .setCmekConfig(cmekConfig) + .build(); + } + + public static String format(String project, String location) { + return newBuilder().setProject(project).setLocation(location).build().toString(); + } + + public static String formatProjectLocationName(String project, String location) { + return newBuilder().setProject(project).setLocation(location).build().toString(); + } + + public static String formatProjectLocationCmekConfigName( + String project, String location, String cmekConfig) { + return newProjectLocationCmekConfigBuilder() + .setProject(project) + .setLocation(location) + .setCmekConfig(cmekConfig) + .build() + .toString(); + } + + public static CmekConfigName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + if (PROJECT_LOCATION.matches(formattedString)) { + Map matchMap = PROJECT_LOCATION.match(formattedString); + return ofProjectLocationName(matchMap.get("project"), matchMap.get("location")); + } else if (PROJECT_LOCATION_CMEK_CONFIG.matches(formattedString)) { + Map matchMap = PROJECT_LOCATION_CMEK_CONFIG.match(formattedString); + return ofProjectLocationCmekConfigName( + matchMap.get("project"), matchMap.get("location"), matchMap.get("cmek_config")); + } + throw new ValidationException("CmekConfigName.parse: formattedString not in valid format"); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (CmekConfigName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION.matches(formattedString) + || PROJECT_LOCATION_CMEK_CONFIG.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (project != null) { + fieldMapBuilder.put("project", project); + } + if (location != null) { + fieldMapBuilder.put("location", location); + } + if (cmekConfig != null) { + fieldMapBuilder.put("cmek_config", cmekConfig); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return fixedValue != null ? fixedValue : pathTemplate.instantiate(getFieldValuesMap()); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null && getClass() == o.getClass()) { + CmekConfigName that = ((CmekConfigName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.cmekConfig, that.cmekConfig); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(fixedValue); + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(location); + h *= 1000003; + h ^= Objects.hashCode(cmekConfig); + return h; + } + + /** Builder for projects/{project}/locations/{location}/cmekConfig. */ + public static class Builder { + private String project; + private String location; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + private Builder(CmekConfigName cmekConfigName) { + Preconditions.checkArgument( + Objects.equals(cmekConfigName.pathTemplate, PROJECT_LOCATION), + "toBuilder is only supported when CmekConfigName has the pattern of" + + " projects/{project}/locations/{location}/cmekConfig"); + this.project = cmekConfigName.project; + this.location = cmekConfigName.location; + } + + public CmekConfigName build() { + return new CmekConfigName(this); + } + } + + /** Builder for projects/{project}/locations/{location}/cmekConfigs/{cmek_config}. */ + public static class ProjectLocationCmekConfigBuilder { + private String project; + private String location; + private String cmekConfig; + + protected ProjectLocationCmekConfigBuilder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getCmekConfig() { + return cmekConfig; + } + + public ProjectLocationCmekConfigBuilder setProject(String project) { + this.project = project; + return this; + } + + public ProjectLocationCmekConfigBuilder setLocation(String location) { + this.location = location; + return this; + } + + public ProjectLocationCmekConfigBuilder setCmekConfig(String cmekConfig) { + this.cmekConfig = cmekConfig; + return this; + } + + public CmekConfigName build() { + return new CmekConfigName(this); + } + } +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/CmekConfigOrBuilder.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/CmekConfigOrBuilder.java new file mode 100644 index 000000000000..ac2599875711 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/CmekConfigOrBuilder.java @@ -0,0 +1,278 @@ +/* + * 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/cloud/discoveryengine/v1beta/cmek_config_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.discoveryengine.v1beta; + +@com.google.protobuf.Generated +public interface CmekConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.CmekConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
            +   * Required. The name of the CmekConfig of the form
            +   * `projects/{project}/locations/{location}/cmekConfig` or
            +   * `projects/{project}/locations/{location}/cmekConfigs/{cmek_config}`.
            +   * 
            + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
            +   * Required. The name of the CmekConfig of the form
            +   * `projects/{project}/locations/{location}/cmekConfig` or
            +   * `projects/{project}/locations/{location}/cmekConfigs/{cmek_config}`.
            +   * 
            + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
            +   * Required. KMS key resource name which will be used to encrypt resources
            +   * `projects/{project}/locations/{location}/keyRings/{keyRing}/cryptoKeys/{keyId}`.
            +   * 
            + * + * + * string kms_key = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The kmsKey. + */ + java.lang.String getKmsKey(); + + /** + * + * + *
            +   * Required. KMS key resource name which will be used to encrypt resources
            +   * `projects/{project}/locations/{location}/keyRings/{keyRing}/cryptoKeys/{keyId}`.
            +   * 
            + * + * + * string kms_key = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for kmsKey. + */ + com.google.protobuf.ByteString getKmsKeyBytes(); + + /** + * + * + *
            +   * Output only. KMS key version resource name which will be used to encrypt
            +   * resources
            +   * `<kms_key>/cryptoKeyVersions/{keyVersion}`.
            +   * 
            + * + * + * string kms_key_version = 6 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The kmsKeyVersion. + */ + java.lang.String getKmsKeyVersion(); + + /** + * + * + *
            +   * Output only. KMS key version resource name which will be used to encrypt
            +   * resources
            +   * `<kms_key>/cryptoKeyVersions/{keyVersion}`.
            +   * 
            + * + * + * string kms_key_version = 6 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for kmsKeyVersion. + */ + com.google.protobuf.ByteString getKmsKeyVersionBytes(); + + /** + * + * + *
            +   * Output only. The states of the CmekConfig.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.CmekConfig.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + int getStateValue(); + + /** + * + * + *
            +   * Output only. The states of the CmekConfig.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.CmekConfig.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + com.google.cloud.discoveryengine.v1beta.CmekConfig.State getState(); + + /** + * + * + *
            +   * Output only. The default CmekConfig for the Customer.
            +   * 
            + * + * bool is_default = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The isDefault. + */ + boolean getIsDefault(); + + /** + * + * + *
            +   * Output only. The timestamp of the last key rotation.
            +   * 
            + * + * int64 last_rotation_timestamp_micros = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The lastRotationTimestampMicros. + */ + long getLastRotationTimestampMicros(); + + /** + * + * + *
            +   * Optional. Single-regional CMEKs that are required for some VAIS features.
            +   * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.SingleRegionKey single_region_keys = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List getSingleRegionKeysList(); + + /** + * + * + *
            +   * Optional. Single-regional CMEKs that are required for some VAIS features.
            +   * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.SingleRegionKey single_region_keys = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.discoveryengine.v1beta.SingleRegionKey getSingleRegionKeys(int index); + + /** + * + * + *
            +   * Optional. Single-regional CMEKs that are required for some VAIS features.
            +   * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.SingleRegionKey single_region_keys = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + int getSingleRegionKeysCount(); + + /** + * + * + *
            +   * Optional. Single-regional CMEKs that are required for some VAIS features.
            +   * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.SingleRegionKey single_region_keys = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List + getSingleRegionKeysOrBuilderList(); + + /** + * + * + *
            +   * Optional. Single-regional CMEKs that are required for some VAIS features.
            +   * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.SingleRegionKey single_region_keys = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.discoveryengine.v1beta.SingleRegionKeyOrBuilder getSingleRegionKeysOrBuilder( + int index); + + /** + * + * + *
            +   * Output only. Whether the NotebookLM Corpus is ready to be used.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.CmekConfig.NotebookLMState notebooklm_state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for notebooklmState. + */ + int getNotebooklmStateValue(); + + /** + * + * + *
            +   * Output only. Whether the NotebookLM Corpus is ready to be used.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.CmekConfig.NotebookLMState notebooklm_state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The notebooklmState. + */ + com.google.cloud.discoveryengine.v1beta.CmekConfig.NotebookLMState getNotebooklmState(); +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/CmekConfigServiceProto.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/CmekConfigServiceProto.java new file mode 100644 index 000000000000..cc4158501b53 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/CmekConfigServiceProto.java @@ -0,0 +1,300 @@ +/* + * 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/cloud/discoveryengine/v1beta/cmek_config_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.discoveryengine.v1beta; + +@com.google.protobuf.Generated +public final class CmekConfigServiceProto extends com.google.protobuf.GeneratedFile { + private CmekConfigServiceProto() {} + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "CmekConfigServiceProto"); + } + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1beta_UpdateCmekConfigRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1beta_UpdateCmekConfigRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1beta_GetCmekConfigRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1beta_GetCmekConfigRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1beta_SingleRegionKey_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1beta_SingleRegionKey_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1beta_CmekConfig_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1beta_CmekConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1beta_UpdateCmekConfigMetadata_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1beta_UpdateCmekConfigMetadata_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1beta_ListCmekConfigsRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1beta_ListCmekConfigsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1beta_ListCmekConfigsResponse_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1beta_ListCmekConfigsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1beta_DeleteCmekConfigRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1beta_DeleteCmekConfigRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1beta_DeleteCmekConfigMetadata_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1beta_DeleteCmekConfigMetadata_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n" + + "=google/cloud/discoveryengine/v1beta/cmek_config_service.proto\022#google.cloud.di" + + "scoveryengine.v1beta\032\034google/api/annotat" + + "ions.proto\032\027google/api/client.proto\032\037goo" + + "gle/api/field_behavior.proto\032\031google/api" + + "/resource.proto\032#google/longrunning/oper" + + "ations.proto\032\033google/protobuf/empty.proto\032\037google/protobuf/timestamp.proto\"t\n" + + "\027UpdateCmekConfigRequest\022D\n" + + "\006config\030\001 \001(\0132/." + + "google.cloud.discoveryengine.v1beta.CmekConfigB\003\340A\002\022\023\n" + + "\013set_default\030\002 \001(\010\"W\n" + + "\024GetCmekConfigRequest\022?\n" + + "\004name\030\001 \001(\tB1\340A\002\372A+\n" + + ")discoveryengine.googleapis.com/CmekConfig\"N\n" + + "\017SingleRegionKey\022;\n" + + "\007kms_key\030\001 \001(\tB*\340A\002\372A$\n" + + "\"cloudkms.googleapis.com/CryptoKeys\"\340\007\n\n" + + "CmekConfig\022\021\n" + + "\004name\030\001 \001(\tB\003\340A\002\022;\n" + + "\007kms_key\030\002 \001(\tB*\340A\002\372A$\n" + + "\"cloudkms.googleapis.com/CryptoKeys\022J\n" + + "\017kms_key_version\030\006 \001(\tB1\340A\003\372A+\n" + + ")cloudkms.googleapis.com/CryptoKeyVersions\022I\n" + + "\005state\030\003 \001(\01625.google.clo" + + "ud.discoveryengine.v1beta.CmekConfig.StateB\003\340A\003\022\027\n\n" + + "is_default\030\004 \001(\010B\003\340A\003\022+\n" + + "\036last_rotation_timestamp_micros\030\005 \001(\003B\003\340A\003\022U\n" + + "\022single_region_keys\030\007 \003(\01324.google.cloud" + + ".discoveryengine.v1beta.SingleRegionKeyB\003\340A\001\022^\n" + + "\020notebooklm_state\030\010 \001(\0162?.google." + + "cloud.discoveryengine.v1beta.CmekConfig.NotebookLMStateB\003\340A\003\"\245\001\n" + + "\005State\022\025\n" + + "\021STATE_UNSPECIFIED\020\000\022\014\n" + + "\010CREATING\020\001\022\n\n" + + "\006ACTIVE\020\002\022\r\n" + + "\tKEY_ISSUE\020\003\022\014\n" + + "\010DELETING\020\004\022\021\n\r" + + "DELETE_FAILED\020\007\022\014\n" + + "\010UNUSABLE\020\005\022\023\n" + + "\017ACTIVE_ROTATING\020\006\022\013\n" + + "\007DELETED\020\010\022\013\n" + + "\007EXPIRED\020\t\"\203\001\n" + + "\017NotebookLMState\022!\n" + + "\035NOTEBOOK_LM_STATE_UNSPECIFIED\020\000\022\031\n" + + "\025NOTEBOOK_LM_NOT_READY\020\001\022\025\n" + + "\021NOTEBOOK_LM_READY\020\002\022\033\n" + + "\027NOTEBOOK_LM_NOT_ENABLED\020\003:\277\001\352A\273\001\n" + + ")discoveryengine.googleapis.com/CmekConfig\0222projects/{project}/locatio" + + "ns/{location}/cmekConfig\022Aprojects/{proj" + + "ect}/locations/{location}/cmekConfigs/{cmek_config}*\013cmekConfigs2\n" + + "cmekConfig\"|\n" + + "\030UpdateCmekConfigMetadata\022/\n" + + "\013create_time\030\001 \001(\0132\032.google.protobuf.Timestamp\022/\n" + + "\013update_time\030\002 \001(\0132\032.google.protobuf.Timestamp\"Y\n" + + "\026ListCmekConfigsRequest\022?\n" + + "\006parent\030\001 \001(\tB/\340A\002\372A)\n" + + "\'discoveryengine.googleapis.com/Location\"`\n" + + "\027ListCmekConfigsResponse\022E\n" + + "\014cmek_configs\030\001" + + " \003(\0132/.google.cloud.discoveryengine.v1beta.CmekConfig\"Z\n" + + "\027DeleteCmekConfigRequest\022?\n" + + "\004name\030\001 \001(\tB1\340A\002\372A+\n" + + ")discoveryengine.googleapis.com/CmekConfig\"|\n" + + "\030DeleteCmekConfigMetadata\022/\n" + + "\013create_time\030\001 \001(\0132\032.google.protobuf.Timestamp\022/\n" + + "\013update_time\030\002 \001(\0132\032.google.protobuf.Timestamp2\274\n\n" + + "\021CmekConfigService\022\372\002\n" + + "\020UpdateCmekConfig\022<.google.cloud.discoveryeng" + + "ine.v1beta.UpdateCmekConfigRequest\032\035.google.longrunning.Operation\"\210\002\312An\n" + + ".google.cloud.discoveryengine.v1beta.CmekConfig\022" + + " - * Required. The parent DataStore resource name, such as + * Required. The parent resource name. + * If the collect user event action is applied in + * [DataStore][google.cloud.discoveryengine.v1beta.DataStore] level, the + * format is: * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`. + * If the collect user event action is applied in + * [Location][google.cloud.location.Location] level, for example, the event + * with [Document][google.cloud.discoveryengine.v1beta.Document] across + * multiple [DataStore][google.cloud.discoveryengine.v1beta.DataStore], the + * format is: `projects/{project}/locations/{location}`. *
            * * @@ -109,8 +117,16 @@ public java.lang.String getParent() { * * *
            -   * Required. The parent DataStore resource name, such as
            +   * Required. The parent resource name.
            +   * If the collect user event action is applied in
            +   * [DataStore][google.cloud.discoveryengine.v1beta.DataStore] level, the
            +   * format is:
                * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`.
            +   * If the collect user event action is applied in
            +   * [Location][google.cloud.location.Location] level, for example, the event
            +   * with [Document][google.cloud.discoveryengine.v1beta.Document] across
            +   * multiple [DataStore][google.cloud.discoveryengine.v1beta.DataStore], the
            +   * format is: `projects/{project}/locations/{location}`.
                * 
            * * @@ -709,8 +725,16 @@ public Builder mergeFrom( * * *
            -     * Required. The parent DataStore resource name, such as
            +     * Required. The parent resource name.
            +     * If the collect user event action is applied in
            +     * [DataStore][google.cloud.discoveryengine.v1beta.DataStore] level, the
            +     * format is:
                  * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`.
            +     * If the collect user event action is applied in
            +     * [Location][google.cloud.location.Location] level, for example, the event
            +     * with [Document][google.cloud.discoveryengine.v1beta.Document] across
            +     * multiple [DataStore][google.cloud.discoveryengine.v1beta.DataStore], the
            +     * format is: `projects/{project}/locations/{location}`.
                  * 
            * * @@ -735,8 +759,16 @@ public java.lang.String getParent() { * * *
            -     * Required. The parent DataStore resource name, such as
            +     * Required. The parent resource name.
            +     * If the collect user event action is applied in
            +     * [DataStore][google.cloud.discoveryengine.v1beta.DataStore] level, the
            +     * format is:
                  * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`.
            +     * If the collect user event action is applied in
            +     * [Location][google.cloud.location.Location] level, for example, the event
            +     * with [Document][google.cloud.discoveryengine.v1beta.Document] across
            +     * multiple [DataStore][google.cloud.discoveryengine.v1beta.DataStore], the
            +     * format is: `projects/{project}/locations/{location}`.
                  * 
            * * @@ -761,8 +793,16 @@ public com.google.protobuf.ByteString getParentBytes() { * * *
            -     * Required. The parent DataStore resource name, such as
            +     * Required. The parent resource name.
            +     * If the collect user event action is applied in
            +     * [DataStore][google.cloud.discoveryengine.v1beta.DataStore] level, the
            +     * format is:
                  * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`.
            +     * If the collect user event action is applied in
            +     * [Location][google.cloud.location.Location] level, for example, the event
            +     * with [Document][google.cloud.discoveryengine.v1beta.Document] across
            +     * multiple [DataStore][google.cloud.discoveryengine.v1beta.DataStore], the
            +     * format is: `projects/{project}/locations/{location}`.
                  * 
            * * @@ -786,8 +826,16 @@ public Builder setParent(java.lang.String value) { * * *
            -     * Required. The parent DataStore resource name, such as
            +     * Required. The parent resource name.
            +     * If the collect user event action is applied in
            +     * [DataStore][google.cloud.discoveryengine.v1beta.DataStore] level, the
            +     * format is:
                  * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`.
            +     * If the collect user event action is applied in
            +     * [Location][google.cloud.location.Location] level, for example, the event
            +     * with [Document][google.cloud.discoveryengine.v1beta.Document] across
            +     * multiple [DataStore][google.cloud.discoveryengine.v1beta.DataStore], the
            +     * format is: `projects/{project}/locations/{location}`.
                  * 
            * * @@ -807,8 +855,16 @@ public Builder clearParent() { * * *
            -     * Required. The parent DataStore resource name, such as
            +     * Required. The parent resource name.
            +     * If the collect user event action is applied in
            +     * [DataStore][google.cloud.discoveryengine.v1beta.DataStore] level, the
            +     * format is:
                  * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`.
            +     * If the collect user event action is applied in
            +     * [Location][google.cloud.location.Location] level, for example, the event
            +     * with [Document][google.cloud.discoveryengine.v1beta.Document] across
            +     * multiple [DataStore][google.cloud.discoveryengine.v1beta.DataStore], the
            +     * format is: `projects/{project}/locations/{location}`.
                  * 
            * * diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/CollectUserEventRequestOrBuilder.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/CollectUserEventRequestOrBuilder.java index c8da8eb54f66..8a5def05821a 100644 --- a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/CollectUserEventRequestOrBuilder.java +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/CollectUserEventRequestOrBuilder.java @@ -30,8 +30,16 @@ public interface CollectUserEventRequestOrBuilder * * *
            -   * Required. The parent DataStore resource name, such as
            +   * Required. The parent resource name.
            +   * If the collect user event action is applied in
            +   * [DataStore][google.cloud.discoveryengine.v1beta.DataStore] level, the
            +   * format is:
                * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`.
            +   * If the collect user event action is applied in
            +   * [Location][google.cloud.location.Location] level, for example, the event
            +   * with [Document][google.cloud.discoveryengine.v1beta.Document] across
            +   * multiple [DataStore][google.cloud.discoveryengine.v1beta.DataStore], the
            +   * format is: `projects/{project}/locations/{location}`.
                * 
            * * @@ -46,8 +54,16 @@ public interface CollectUserEventRequestOrBuilder * * *
            -   * Required. The parent DataStore resource name, such as
            +   * Required. The parent resource name.
            +   * If the collect user event action is applied in
            +   * [DataStore][google.cloud.discoveryengine.v1beta.DataStore] level, the
            +   * format is:
                * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`.
            +   * If the collect user event action is applied in
            +   * [Location][google.cloud.location.Location] level, for example, the event
            +   * with [Document][google.cloud.discoveryengine.v1beta.Document] across
            +   * multiple [DataStore][google.cloud.discoveryengine.v1beta.DataStore], the
            +   * format is: `projects/{project}/locations/{location}`.
                * 
            * * diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/CommonProto.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/CommonProto.java index 768c866f719f..19e01811fa6d 100644 --- a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/CommonProto.java +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/CommonProto.java @@ -52,6 +52,10 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_discoveryengine_v1beta_UserInfo_descriptor; static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_cloud_discoveryengine_v1beta_UserInfo_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1beta_UserInfo_PreciseLocation_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1beta_UserInfo_PreciseLocation_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_discoveryengine_v1beta_EmbeddingConfig_descriptor; static final com.google.protobuf.GeneratedMessage.FieldAccessorTable @@ -60,6 +64,26 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_discoveryengine_v1beta_DoubleList_descriptor; static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_cloud_discoveryengine_v1beta_DoubleList_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1beta_IdpConfig_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1beta_IdpConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1beta_IdpConfig_ExternalIdpConfig_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1beta_IdpConfig_ExternalIdpConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1beta_Principal_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1beta_Principal_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1beta_HealthcareFhirConfig_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1beta_HealthcareFhirConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1beta_SearchLinkPromotion_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1beta_SearchLinkPromotion_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { return descriptor; @@ -70,8 +94,9 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { static { java.lang.String[] descriptorData = { "\n" - + "0google/cloud/discoveryengine/v1beta/co" - + "mmon.proto\022#google.cloud.discoveryengine.v1beta\032\031google/api/resource.proto\"x\n" + + "0google/cloud/discoveryengine/v1beta/common.proto\022#google.cloud.discoveryengine" + + ".v1beta\032\037google/api/field_behavior.proto" + + "\032\031google/api/resource.proto\032\030google/type/latlng.proto\"x\n" + "\010Interval\022\021\n" + "\007minimum\030\001 \001(\001H\000\022\033\n" + "\021exclusive_minimum\030\002 \001(\001H\000\022\021\n" @@ -81,25 +106,61 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\003max\"0\n" + "\017CustomAttribute\022\014\n" + "\004text\030\001 \003(\t\022\017\n" - + "\007numbers\030\002 \003(\001\"/\n" + + "\007numbers\030\002 \003(\001\"\212\002\n" + "\010UserInfo\022\017\n" + "\007user_id\030\001 \001(\t\022\022\n\n" - + "user_agent\030\002 \001(\t\"%\n" + + "user_agent\030\002 \001(\t\022\026\n" + + "\ttime_zone\030\003 \001(\tB\003\340A\001\022_\n" + + "\020precise_location\030\004" + + " \001(\0132=.google.cloud.discoveryengine.v1beta.UserInfo.PreciseLocationB\006\340A\004\340A\001\032`\n" + + "\017PreciseLocation\022)\n" + + "\005point\030\001 \001(\0132\023.google.type.LatLngB\003\340A\001H\000\022\026\n" + + "\007address\030\002 \001(\tB\003\340A\001H\000B\n\n" + + "\010location\"%\n" + "\017EmbeddingConfig\022\022\n\n" + "field_path\030\001 \001(\t\"\034\n\n" + "DoubleList\022\016\n" - + "\006values\030\001 \003(\001*b\n" + + "\006values\030\001 \003(\001\"\250\002\n" + + "\tIdpConfig\022H\n" + + "\010idp_type\030\001 \001(\01626.go" + + "ogle.cloud.discoveryengine.v1beta.IdpConfig.IdpType\022]\n" + + "\023external_idp_config\030\002 \001(\013" + + "2@.google.cloud.discoveryengine.v1beta.IdpConfig.ExternalIdpConfig\0320\n" + + "\021ExternalIdpConfig\022\033\n" + + "\023workforce_pool_name\030\001 \001(\t\"@\n" + + "\007IdpType\022\030\n" + + "\024IDP_TYPE_UNSPECIFIED\020\000\022\n\n" + + "\006GSUITE\020\001\022\017\n" + + "\013THIRD_PARTY\020\002\"]\n" + + "\tPrincipal\022\021\n" + + "\007user_id\030\001 \001(\tH\000\022\022\n" + + "\010group_id\030\002 \001(\tH\000\022\034\n" + + "\022external_entity_id\030\003 \001(\tH\000B\013\n" + + "\tprincipal\"\222\001\n" + + "\024HealthcareFhirConfig\022\"\n" + + "\032enable_configurable_schema\030\001 \001(\010\0222\n" + + "*enable_static_indexing_for_batch_ingestion\030\002 \001(\010\022\"\n" + + "\025initial_filter_groups\030\004 \003(\tB\003\340A\001\"\306\001\n" + + "\023SearchLinkPromotion\022\022\n" + + "\005title\030\001 \001(\tB\003\340A\002\022\020\n" + + "\003uri\030\002 \001(\tB\003\340A\001\022A\n" + + "\010document\030\006 \001(\tB/\340A\001\372A)\n" + + "\'discoveryengine.googleapis.com/Document\022\026\n" + + "\timage_uri\030\003 \001(\tB\003\340A\001\022\030\n" + + "\013description\030\004 \001(\tB\003\340A\001\022\024\n" + + "\007enabled\030\005 \001(\010B\003\340A\001*b\n" + "\020IndustryVertical\022!\n" + "\035INDUSTRY_VERTICAL_UNSPECIFIED\020\000\022\013\n" + "\007GENERIC\020\001\022\t\n" + "\005MEDIA\020\002\022\023\n" - + "\017HEALTHCARE_FHIR\020\007*\244\001\n" + + "\017HEALTHCARE_FHIR\020\007*\277\001\n" + "\014SolutionType\022\035\n" + "\031SOLUTION_TYPE_UNSPECIFIED\020\000\022 \n" + "\034SOLUTION_TYPE_RECOMMENDATION\020\001\022\030\n" + "\024SOLUTION_TYPE_SEARCH\020\002\022\026\n" + "\022SOLUTION_TYPE_CHAT\020\003\022!\n" - + "\035SOLUTION_TYPE_GENERATIVE_CHAT\020\004*h\n\r" + + "\035SOLUTION_TYPE_GENERATIVE_CHAT\020\004\022\031\n" + + "\025SOLUTION_TYPE_AI_MODE\020\005*h\n\r" + "SearchUseCase\022\037\n" + "\033SEARCH_USE_CASE_UNSPECIFIED\020\000\022\032\n" + "\026SEARCH_USE_CASE_SEARCH\020\001\022\032\n" @@ -110,38 +171,78 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\026SEARCH_TIER_ENTERPRISE\020\002*C\n" + "\013SearchAddOn\022\035\n" + "\031SEARCH_ADD_ON_UNSPECIFIED\020\000\022\025\n" - + "\021SEARCH_ADD_ON_LLM\020\001B\265\013\n" - + "\'com.google.cloud.discoveryengine.v1betaB\013CommonProto" - + "P\001ZQcloud.google.com/go/discoveryengine/apiv1beta/discoveryenginepb;discoveryeng" - + "inepb\242\002\017DISCOVERYENGINE\252\002#Google.Cloud.D" - + "iscoveryEngine.V1Beta\312\002#Google\\Cloud\\Dis" - + "coveryEngine\\V1beta\352\002&Google::Cloud::DiscoveryEngine::V1beta\352A\346\001\n" - + "%discoveryengine.googleapis.com/Branch\022Qprojects/{proje" - + "ct}/locations/{location}/dataStores/{data_store}/branches/{branch}\022jprojects/{pr" - + "oject}/locations/{location}/collections/" - + "{collection}/dataStores/{data_store}/branches/{branch}\352Am\n" - + ")discoveryengine.googleapis.com/Collection\022@projects/{project}" - + "/locations/{location}/collections/{collection}\352AR\n" - + "\'discoveryengine.googleapis.co" - + "m/Location\022\'projects/{project}/locations/{location}\352Aw\n" - + ",discoveryengine.googleapis.com/RankingConfig\022Gprojects/{project}" - + "/locations/{location}/rankingConfigs/{ranking_config}\352A\322\002\n" - + "/discoveryengine.googleapis.com/CompletionConfig\022Pprojects/{pr" - + "oject}/locations/{location}/dataStores/{data_store}/completionConfig\022iprojects/{" - + "project}/locations/{location}/collections/{collection}/dataStores/{data_store}/c" - + "ompletionConfig\022bprojects/{project}/loca" - + "tions/{location}/collections/{collection}/engines/{engine}/completionConfig\352Ay\n" - + "#healthcare.googleapis.com/FhirStore\022Rprojects/{project}/locations/{location}/dat" - + "asets/{dataset}/fhirStores/{fhir_store}\352A\244\001\n" - + "&healthcare.googleapis.com/FhirResource\022zprojects/{project}/locations/{locat" - + "ion}/datasets/{dataset}/fhirStores/{fhir_store}/fhir/{resource_type}/{fhir_resou" - + "rce_id}b\006proto3" + + "\021SEARCH_ADD_ON_LLM\020\001*\233\004\n" + + "\020SubscriptionTier\022!\n" + + "\035SUBSCRIPTION_TIER_UNSPECIFIED\020\000\022\034\n" + + "\030SUBSCRIPTION_TIER_SEARCH\020\001\022*\n" + + "&SUBSCRIPTION_TIER_SEARCH_AND_ASSISTANT\020\002\022!\n" + + "\035SUBSCRIPTION_TIER_NOTEBOOK_LM\020\003\022&\n" + + "\"SUBSCRIPTION_TIER_FRONTLINE_WORKER\020\004\022(\n" + + "$SUBSCRIPTION_TIER_AGENTSPACE_STARTER\020\n" + + "\022)\n" + + "%SUBSCRIPTION_TIER_AGENTSPACE_BUSINESS\020\006\022 \n" + + "\034SUBSCRIPTION_TIER_ENTERPRISE\020\007\022)\n" + + "%SUBSCRIPTION_TIER_ENTERPRISE_EMERGING\020\017\022\031\n" + + "\025SUBSCRIPTION_TIER_EDU\020\010\022\035\n" + + "\031SUBSCRIPTION_TIER_EDU_PRO\020\t\022\"\n" + + "\036SUBSCRIPTION_TIER_EDU_EMERGING\020\013\022&\n" + + "\"SUBSCRIPTION_TIER_EDU_PRO_EMERGING\020\014\022\'\n" + + "#SUBSCRIPTION_TIER_FRONTLINE_STARTER\020\r" + + "*\267\001\n" + + "\020SubscriptionTerm\022!\n" + + "\035SUBSCRIPTION_TERM_UNSPECIFIED\020\000\022\037\n" + + "\033SUBSCRIPTION_TERM_ONE_MONTH\020\001\022\036\n" + + "\032SUBSCRIPTION_TERM_ONE_YEAR\020\002\022!\n" + + "\035SUBSCRIPTION_TERM_THREE_YEARS\020\003\022\034\n" + + "\030SUBSCRIPTION_TERM_CUSTOM\020\006B\235\022\n" + + "\'com.google.cloud.discoveryengine.v1betaB\013CommonProtoP\001ZQcloud.google.com/g" + + "o/discoveryengine/apiv1beta/discoveryeng" + + "inepb;discoveryenginepb\242\002\017DISCOVERYENGIN" + + "E\252\002#Google.Cloud.DiscoveryEngine.V1Beta\312" + + "\002#Google\\Cloud\\DiscoveryEngine\\V1beta\352\002&" + + "Google::Cloud::DiscoveryEngine::V1beta\352A\346\001\n" + + "%discoveryengine.googleapis.com/Branch\022Qprojects/{project}/locations/{locatio" + + "n}/dataStores/{data_store}/branches/{branch}\022jprojects/{project}/locations/{loca" + + "tion}/collections/{collection}/dataStores/{data_store}/branches/{branch}\352Am\n" + + ")discoveryengine.googleapis.com/Collection\022@" + + "projects/{project}/locations/{location}/collections/{collection}\352AR\n" + + "\'discoveryen" + + "gine.googleapis.com/Location\022\'projects/{project}/locations/{location}\352Aw\n" + + ",discoveryengine.googleapis.com/RankingConfig\022G" + + "projects/{project}/locations/{location}/rankingConfigs/{ranking_config}\352A\322\002\n" + + "/discoveryengine.googleapis.com/CompletionCo" + + "nfig\022Pprojects/{project}/locations/{location}/dataStores/{data_store}/completion" + + "Config\022iprojects/{project}/locations/{location}/collections/{collection}/dataSto" + + "res/{data_store}/completionConfig\022bprojects/{project}/locations/{location}/colle" + + "ctions/{collection}/engines/{engine}/completionConfig\352A\235\001\n" + + ":discoveryengine.googleapis.com/BillingAccountLicenseConfig\022_b" + + "illingAccounts/{billing_account}/billing" + + "AccountLicenseConfigs/{billing_account_license_config}\352At\n" + + "+networkservices.googleapis.com/AgentGateway\022Eprojects/{projec" + + "t}/locations/{location}/agentGateways/{agent_gateway}\352Ab\n" + + "\"modelarmor.googleapis." + + "com/Template\022 - * A unique identifier for tracking visitors. For example, this could be - * implemented with an HTTP cookie, which should be able to uniquely identify - * a visitor on a single device. This unique identifier should not change if - * the visitor logs in or out of the website. + * Optional. A unique identifier for tracking visitors. For example, this + * could be implemented with an HTTP cookie, which should be able to uniquely + * identify a visitor on a single device. This unique identifier should not + * change if the visitor logs in or out of the website. * * This field should NOT have a fixed value such as `unknown_visitor`. * @@ -301,7 +301,7 @@ public com.google.protobuf.ByteString getQueryModelBytes() { * characters. Otherwise, an `INVALID_ARGUMENT` error is returned. *
            * - * string user_pseudo_id = 4; + * string user_pseudo_id = 4 [(.google.api.field_behavior) = OPTIONAL]; * * @return The userPseudoId. */ @@ -322,10 +322,10 @@ public java.lang.String getUserPseudoId() { * * *
            -   * A unique identifier for tracking visitors. For example, this could be
            -   * implemented with an HTTP cookie, which should be able to uniquely identify
            -   * a visitor on a single device. This unique identifier should not change if
            -   * the visitor logs in or out of the website.
            +   * Optional. A unique identifier for tracking visitors. For example, this
            +   * could be implemented with an HTTP cookie, which should be able to uniquely
            +   * identify a visitor on a single device. This unique identifier should not
            +   * change if the visitor logs in or out of the website.
                *
                * This field should NOT have a fixed value such as `unknown_visitor`.
                *
            @@ -338,7 +338,7 @@ public java.lang.String getUserPseudoId() {
                * characters. Otherwise, an `INVALID_ARGUMENT` error is returned.
                * 
            * - * string user_pseudo_id = 4; + * string user_pseudo_id = 4 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for userPseudoId. */ @@ -1231,10 +1231,10 @@ public Builder setQueryModelBytes(com.google.protobuf.ByteString value) { * * *
            -     * A unique identifier for tracking visitors. For example, this could be
            -     * implemented with an HTTP cookie, which should be able to uniquely identify
            -     * a visitor on a single device. This unique identifier should not change if
            -     * the visitor logs in or out of the website.
            +     * Optional. A unique identifier for tracking visitors. For example, this
            +     * could be implemented with an HTTP cookie, which should be able to uniquely
            +     * identify a visitor on a single device. This unique identifier should not
            +     * change if the visitor logs in or out of the website.
                  *
                  * This field should NOT have a fixed value such as `unknown_visitor`.
                  *
            @@ -1247,7 +1247,7 @@ public Builder setQueryModelBytes(com.google.protobuf.ByteString value) {
                  * characters. Otherwise, an `INVALID_ARGUMENT` error is returned.
                  * 
            * - * string user_pseudo_id = 4; + * string user_pseudo_id = 4 [(.google.api.field_behavior) = OPTIONAL]; * * @return The userPseudoId. */ @@ -1267,10 +1267,10 @@ public java.lang.String getUserPseudoId() { * * *
            -     * A unique identifier for tracking visitors. For example, this could be
            -     * implemented with an HTTP cookie, which should be able to uniquely identify
            -     * a visitor on a single device. This unique identifier should not change if
            -     * the visitor logs in or out of the website.
            +     * Optional. A unique identifier for tracking visitors. For example, this
            +     * could be implemented with an HTTP cookie, which should be able to uniquely
            +     * identify a visitor on a single device. This unique identifier should not
            +     * change if the visitor logs in or out of the website.
                  *
                  * This field should NOT have a fixed value such as `unknown_visitor`.
                  *
            @@ -1283,7 +1283,7 @@ public java.lang.String getUserPseudoId() {
                  * characters. Otherwise, an `INVALID_ARGUMENT` error is returned.
                  * 
            * - * string user_pseudo_id = 4; + * string user_pseudo_id = 4 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for userPseudoId. */ @@ -1303,10 +1303,10 @@ public com.google.protobuf.ByteString getUserPseudoIdBytes() { * * *
            -     * A unique identifier for tracking visitors. For example, this could be
            -     * implemented with an HTTP cookie, which should be able to uniquely identify
            -     * a visitor on a single device. This unique identifier should not change if
            -     * the visitor logs in or out of the website.
            +     * Optional. A unique identifier for tracking visitors. For example, this
            +     * could be implemented with an HTTP cookie, which should be able to uniquely
            +     * identify a visitor on a single device. This unique identifier should not
            +     * change if the visitor logs in or out of the website.
                  *
                  * This field should NOT have a fixed value such as `unknown_visitor`.
                  *
            @@ -1319,7 +1319,7 @@ public com.google.protobuf.ByteString getUserPseudoIdBytes() {
                  * characters. Otherwise, an `INVALID_ARGUMENT` error is returned.
                  * 
            * - * string user_pseudo_id = 4; + * string user_pseudo_id = 4 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The userPseudoId to set. * @return This builder for chaining. @@ -1338,10 +1338,10 @@ public Builder setUserPseudoId(java.lang.String value) { * * *
            -     * A unique identifier for tracking visitors. For example, this could be
            -     * implemented with an HTTP cookie, which should be able to uniquely identify
            -     * a visitor on a single device. This unique identifier should not change if
            -     * the visitor logs in or out of the website.
            +     * Optional. A unique identifier for tracking visitors. For example, this
            +     * could be implemented with an HTTP cookie, which should be able to uniquely
            +     * identify a visitor on a single device. This unique identifier should not
            +     * change if the visitor logs in or out of the website.
                  *
                  * This field should NOT have a fixed value such as `unknown_visitor`.
                  *
            @@ -1354,7 +1354,7 @@ public Builder setUserPseudoId(java.lang.String value) {
                  * characters. Otherwise, an `INVALID_ARGUMENT` error is returned.
                  * 
            * - * string user_pseudo_id = 4; + * string user_pseudo_id = 4 [(.google.api.field_behavior) = OPTIONAL]; * * @return This builder for chaining. */ @@ -1369,10 +1369,10 @@ public Builder clearUserPseudoId() { * * *
            -     * A unique identifier for tracking visitors. For example, this could be
            -     * implemented with an HTTP cookie, which should be able to uniquely identify
            -     * a visitor on a single device. This unique identifier should not change if
            -     * the visitor logs in or out of the website.
            +     * Optional. A unique identifier for tracking visitors. For example, this
            +     * could be implemented with an HTTP cookie, which should be able to uniquely
            +     * identify a visitor on a single device. This unique identifier should not
            +     * change if the visitor logs in or out of the website.
                  *
                  * This field should NOT have a fixed value such as `unknown_visitor`.
                  *
            @@ -1385,7 +1385,7 @@ public Builder clearUserPseudoId() {
                  * characters. Otherwise, an `INVALID_ARGUMENT` error is returned.
                  * 
            * - * string user_pseudo_id = 4; + * string user_pseudo_id = 4 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The bytes for userPseudoId to set. * @return This builder for chaining. diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/CompleteQueryRequestOrBuilder.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/CompleteQueryRequestOrBuilder.java index 42848abf0ae3..29bc48e7bb1c 100644 --- a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/CompleteQueryRequestOrBuilder.java +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/CompleteQueryRequestOrBuilder.java @@ -150,10 +150,10 @@ public interface CompleteQueryRequestOrBuilder * * *
            -   * A unique identifier for tracking visitors. For example, this could be
            -   * implemented with an HTTP cookie, which should be able to uniquely identify
            -   * a visitor on a single device. This unique identifier should not change if
            -   * the visitor logs in or out of the website.
            +   * Optional. A unique identifier for tracking visitors. For example, this
            +   * could be implemented with an HTTP cookie, which should be able to uniquely
            +   * identify a visitor on a single device. This unique identifier should not
            +   * change if the visitor logs in or out of the website.
                *
                * This field should NOT have a fixed value such as `unknown_visitor`.
                *
            @@ -166,7 +166,7 @@ public interface CompleteQueryRequestOrBuilder
                * characters. Otherwise, an `INVALID_ARGUMENT` error is returned.
                * 
            * - * string user_pseudo_id = 4; + * string user_pseudo_id = 4 [(.google.api.field_behavior) = OPTIONAL]; * * @return The userPseudoId. */ @@ -176,10 +176,10 @@ public interface CompleteQueryRequestOrBuilder * * *
            -   * A unique identifier for tracking visitors. For example, this could be
            -   * implemented with an HTTP cookie, which should be able to uniquely identify
            -   * a visitor on a single device. This unique identifier should not change if
            -   * the visitor logs in or out of the website.
            +   * Optional. A unique identifier for tracking visitors. For example, this
            +   * could be implemented with an HTTP cookie, which should be able to uniquely
            +   * identify a visitor on a single device. This unique identifier should not
            +   * change if the visitor logs in or out of the website.
                *
                * This field should NOT have a fixed value such as `unknown_visitor`.
                *
            @@ -192,7 +192,7 @@ public interface CompleteQueryRequestOrBuilder
                * characters. Otherwise, an `INVALID_ARGUMENT` error is returned.
                * 
            * - * string user_pseudo_id = 4; + * string user_pseudo_id = 4 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for userPseudoId. */ diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/CompletionServiceProto.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/CompletionServiceProto.java index 86f61a030cee..d8c74ab8ef15 100644 --- a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/CompletionServiceProto.java +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/CompletionServiceProto.java @@ -64,6 +64,10 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_discoveryengine_v1beta_AdvancedCompleteQueryRequest_BoostSpec_ConditionBoostSpec_descriptor; static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_cloud_discoveryengine_v1beta_AdvancedCompleteQueryRequest_BoostSpec_ConditionBoostSpec_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1beta_AdvancedCompleteQueryRequest_SuggestionTypeSpec_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1beta_AdvancedCompleteQueryRequest_SuggestionTypeSpec_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_discoveryengine_v1beta_AdvancedCompleteQueryResponse_descriptor; static final com.google.protobuf.GeneratedMessage.FieldAccessorTable @@ -84,6 +88,14 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_discoveryengine_v1beta_AdvancedCompleteQueryResponse_RecentSearchSuggestion_descriptor; static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_cloud_discoveryengine_v1beta_AdvancedCompleteQueryResponse_RecentSearchSuggestion_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1beta_RemoveSuggestionRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1beta_RemoveSuggestionRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1beta_RemoveSuggestionResponse_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1beta_RemoveSuggestionResponse_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { return descriptor; @@ -101,145 +113,183 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "resource.proto\0320google/cloud/discoveryengine/v1beta/common.proto\0322google/cloud/d" + "iscoveryengine/v1beta/document.proto\0327google/cloud/discoveryengine/v1beta/import" + "_config.proto\0326google/cloud/discoveryengine/v1beta/purge_config.proto\032#google/lo" - + "ngrunning/operations.proto\032\037google/protobuf/timestamp.proto\"\277\001\n" + + "ngrunning/operations.proto\032\037google/protobuf/timestamp.proto\"\304\001\n" + "\024CompleteQueryRequest\022D\n\n" + "data_store\030\001 \001(\tB0\340A\002\372A*\n" + "(discoveryengine.googleapis.com/DataStore\022\022\n" + "\005query\030\002 \001(\tB\003\340A\002\022\023\n" - + "\013query_model\030\003 \001(\t\022\026\n" - + "\016user_pseudo_id\030\004 \001(\t\022 \n" + + "\013query_model\030\003 \001(\t\022\033\n" + + "\016user_pseudo_id\030\004 \001(\tB\003\340A\001\022 \n" + "\030include_tail_suggestions\030\005 \001(\010\"\344\001\n" + "\025CompleteQueryResponse\022e\n" - + "\021query_suggestions\030\001 \003(\0132J.google.clou" - + "d.discoveryengine.v1beta.CompleteQueryResponse.QuerySuggestion\022\034\n" + + "\021query_suggestions\030\001 \003(\0132J.google" + + ".cloud.discoveryengine.v1beta.CompleteQueryResponse.QuerySuggestion\022\034\n" + "\024tail_match_triggered\030\002 \001(\010\032F\n" + "\017QuerySuggestion\022\022\n\n" + "suggestion\030\001 \001(\t\022\037\n" - + "\027completable_field_paths\030\002 \003(\t\"\270\006\n" + + "\027completable_field_paths\030\002 \003(\t\"\371\010\n" + "\034AdvancedCompleteQueryRequest\022R\n" + "\021completion_config\030\001 \001(\tB7\340A\002\372A1\n" + "/discoveryengine.googleapis.com/CompletionConfig\022\022\n" + "\005query\030\002 \001(\tB\003\340A\002\022\023\n" - + "\013query_model\030\003 \001(\t\022\026\n" - + "\016user_pseudo_id\030\004 \001(\t\022E\n" + + "\013query_model\030\003 \001(\t\022\033\n" + + "\016user_pseudo_id\030\004 \001(\tB\003\340A\001\022E\n" + "\tuser_info\030\t" + " \001(\0132-.google.cloud.discoveryengine.v1beta.UserInfoB\003\340A\001\022 \n" + "\030include_tail_suggestions\030\005 \001(\010\022d\n\n" - + "boost_spec\030\006 \001(\0132K.google" - + ".cloud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.BoostSpecB\003\340A\001\022o\n" - + "\020suggestion_types\030\007 \003(\0162P.google.cloud.disco" - + "veryengine.v1beta.AdvancedCompleteQueryRequest.SuggestionTypeB\003\340A\001\032\302\001\n" + + "boost_spec\030\006 \001(\0132K.google.cloud.discoveryengine.v1beta." + + "AdvancedCompleteQueryRequest.BoostSpecB\003\340A\001\022o\n" + + "\020suggestion_types\030\007 \003(\0162P.google.c" + + "loud.discoveryengine.v1beta.AdvancedCompleteQueryRequest.SuggestionTypeB\003\340A\001\022x\n" + + "\025suggestion_type_specs\030\n" + + " \003(\0132T.google.cloud.discoveryengine.v1beta.AdvancedComple" + + "teQueryRequest.SuggestionTypeSpecB\003\340A\001\022\033\n" + + "\016experiment_ids\030\016 \003(\tB\003\340A\001\032\302\001\n" + "\tBoostSpec\022}\n" - + "\025condition_boost_specs\030\001 \003(\0132^.google" - + ".cloud.discoveryengine.v1beta.AdvancedCo" - + "mpleteQueryRequest.BoostSpec.ConditionBoostSpec\0326\n" + + "\025condition_boost_specs\030\001 \003(\0132^.googl" + + "e.cloud.discoveryengine.v1beta.AdvancedC" + + "ompleteQueryRequest.BoostSpec.ConditionBoostSpec\0326\n" + "\022ConditionBoostSpec\022\021\n" + "\tcondition\030\001 \001(\t\022\r\n" - + "\005boost\030\002 \001(\002\"~\n" + + "\005boost\030\002 \001(\002\032\242\001\n" + + "\022SuggestionTypeSpec\022n\n" + + "\017suggestion_type\030\001 \001(\0162P.google.cloud.discoveryengine.v1beta.AdvancedC" + + "ompleteQueryRequest.SuggestionTypeB\003\340A\001\022\034\n" + + "\017max_suggestions\030\002 \001(\005B\003\340A\001\"~\n" + "\016SuggestionType\022\037\n" + "\033SUGGESTION_TYPE_UNSPECIFIED\020\000\022\t\n" + "\005QUERY\020\001\022\n\n" + "\006PEOPLE\020\002\022\013\n" + "\007CONTENT\020\003\022\021\n\r" + "RECENT_SEARCH\020\004\022\024\n" - + "\020GOOGLE_WORKSPACE\020\005\"\305\013\n" + + "\020GOOGLE_WORKSPACE\020\005\"\340\014\n" + "\035AdvancedCompleteQueryResponse\022m\n" - + "\021query_suggestions\030\001 \003(\0132R.google.cloud.discoveryeng" - + "ine.v1beta.AdvancedCompleteQueryResponse.QuerySuggestion\022\034\n" + + "\021query_suggestions\030\001 \003(\0132R.google.cloud.discov" + + "eryengine.v1beta.AdvancedCompleteQueryResponse.QuerySuggestion\022\034\n" + "\024tail_match_triggered\030\002 \001(\010\022o\n" - + "\022people_suggestions\030\003 \003(\0132S.google.cloud.discoveryengine.v1beta.Advance" - + "dCompleteQueryResponse.PersonSuggestion\022q\n" - + "\023content_suggestions\030\004 \003(\0132T.google.cl" - + "oud.discoveryengine.v1beta.AdvancedCompleteQueryResponse.ContentSuggestion\022|\n" - + "\031recent_search_suggestions\030\005 \003(\0132Y.google.c" - + "loud.discoveryengine.v1beta.AdvancedComp" - + "leteQueryResponse.RecentSearchSuggestion\032Z\n" + + "\022people_suggestions\030\003 \003(\0132S.google.cloud.discoveryengine.v1beta.A" + + "dvancedCompleteQueryResponse.PersonSuggestion\022q\n" + + "\023content_suggestions\030\004 \003(\0132T.goo" + + "gle.cloud.discoveryengine.v1beta.Advance" + + "dCompleteQueryResponse.ContentSuggestion\022|\n" + + "\031recent_search_suggestions\030\005 \003(\0132Y.go" + + "ogle.cloud.discoveryengine.v1beta.Advanc" + + "edCompleteQueryResponse.RecentSearchSuggestion\032i\n" + "\017QuerySuggestion\022\022\n\n" + "suggestion\030\001 \001(\t\022\037\n" + "\027completable_field_paths\030\002 \003(\t\022\022\n\n" - + "data_store\030\003 \003(\t\032\370\002\n" + + "data_store\030\003 \003(\t\022\r\n" + + "\005score\030\004 \001(\001\032\273\003\n" + "\020PersonSuggestion\022\022\n\n" + "suggestion\030\001 \001(\t\022s\n" - + "\013person_type\030\002 \001(\0162^.google.cloud.discoveryengine.v1beta.Advance" - + "dCompleteQueryResponse.PersonSuggestion.PersonType\022?\n" + + "\013person_type\030\002 \001(\0162^.google.cloud.discovery" + + "engine.v1beta.AdvancedCompleteQueryResponse.PersonSuggestion.PersonType\022?\n" + "\010document\030\004 \001(\0132-.google.cloud.discoveryengine.v1beta.Document\022A\n\n" + "data_store\030\005 \001(\tB-\372A*\n" - + "(discoveryengine.googleapis.com/DataStore\"W\n\n" + + "(discoveryengine.googleapis.com/DataStore\022\r\n" + + "\005score\030\006 \001(\001\022\031\n" + + "\021display_photo_uri\030\007 \001(\t\022\027\n" + + "\017destination_uri\030\010 \001(\t\"W\n\n" + "PersonType\022\033\n" + "\027PERSON_TYPE_UNSPECIFIED\020\000\022\022\n" + "\016CLOUD_IDENTITY\020\001\022\030\n" - + "\024THIRD_PARTY_IDENTITY\020\002\032\367\002\n" + + "\024THIRD_PARTY_IDENTITY\020\002\032\261\003\n" + "\021ContentSuggestion\022\022\n\n" + "suggestion\030\001 \001(\t\022v\n" - + "\014content_type\030\002 \001(\0162`.google.cloud.discovery" - + "engine.v1beta.AdvancedCompleteQueryResponse.ContentSuggestion.ContentType\022?\n" + + "\014content_type\030\002 \001(\0162`.google.cloud.d" + + "iscoveryengine.v1beta.AdvancedCompleteQu" + + "eryResponse.ContentSuggestion.ContentType\022?\n" + "\010document\030\004 \001(\0132-.google.cloud.discoveryengine.v1beta.Document\022A\n\n" + "data_store\030\005 \001(\tB-\372A*\n" - + "(discoveryengine.googleapis.com/DataStore\"R\n" + + "(discoveryengine.googleapis.com/DataStore\022\r\n" + + "\005score\030\006 \001(\001\022\020\n" + + "\010icon_uri\030\007 \001(\t\022\027\n" + + "\017destination_uri\030\010 \001(\t\"R\n" + "\013ContentType\022\034\n" + "\030CONTENT_TYPE_UNSPECIFIED\020\000\022\024\n" + "\020GOOGLE_WORKSPACE\020\001\022\017\n" - + "\013THIRD_PARTY\020\002\032d\n" + + "\013THIRD_PARTY\020\002\032s\n" + "\026RecentSearchSuggestion\022\022\n\n" + "suggestion\030\001 \001(\t\0226\n" - + "\022recent_search_time\030\002 \001(\0132\032.google.protobuf.Timestamp2\300\026\n" + + "\022recent_search_time\030\002 \001(\0132\032.google.protobuf.Timestamp\022\r\n" + + "\005score\030\003 \001(\001\"\353\002\n" + + "\027RemoveSuggestionRequest\022#\n" + + "\031search_history_suggestion\030\002 \001(\tH\000\022/\n" + + "%remove_all_search_history_suggestions\030\006 \001(\010H\000\022R\n" + + "\021completion_config\030\001 \001(\tB7\340A\002\372A1\n" + + "/discoveryengine.googleapis.com/CompletionConfig\022\033\n" + + "\016user_pseudo_id\030\003 \001(\tB\003\340A\002\022E\n" + + "\tuser_info\030\004 \001(\0132-" + + ".google.cloud.discoveryengine.v1beta.UserInfoB\003\340A\001\0224\n" + + "\013remove_time\030\005" + + " \001(\0132\032.google.protobuf.TimestampB\003\340A\002B\014\n\n" + + "suggestion\"\032\n" + + "\030RemoveSuggestionResponse2\275\032\n" + "\021CompletionService\022\260\002\n\r" - + "CompleteQuery\0229.google.cloud.discoveryengine.v1beta.CompleteQu" - + "eryRequest\032:.google.cloud.discoveryengin" - + "e.v1beta.CompleteQueryResponse\"\247\001\202\323\344\223\002\240\001" - + "\022F/v1beta/{data_store=projects/*/locations/*/dataStores/*}:completeQueryZV\022T/v1b" - + "eta/{data_store=projects/*/locations/*/c" - + "ollections/*/dataStores/*}:completeQuery\022\356\003\n" - + "\025AdvancedCompleteQuery\022A.google.cloud.discoveryengine.v1beta.AdvancedComplet" - + "eQueryRequest\032B.google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryRespons" - + "e\"\315\002\202\323\344\223\002\306\002\"^/v1beta/{completion_config=" - + "projects/*/locations/*/dataStores/*/completionConfig}:completeQuery:\001*Zq\"l/v1bet" - + "a/{completion_config=projects/*/locations/*/collections/*/dataStores/*/completio" - + "nConfig}:completeQuery:\001*Zn\"i/v1beta/{completion_config=projects/*/locations/*/c" - + "ollections/*/engines/*/completionConfig}:completeQuery:\001*\022\371\003\n" - + "\037ImportSuggestionDenyListEntries\022K.google.cloud.discoveryen" - + "gine.v1beta.ImportSuggestionDenyListEntr" - + "iesRequest\032\035.google.longrunning.Operation\"\351\002\312A\232\001\n" - + "Kgoogle.cloud.discoveryengine.v1beta.ImportSuggestionDenyListEntriesRes" - + "ponse\022Kgoogle.cloud.discoveryengine.v1beta.ImportSuggestionDenyListEntriesMetada" - + "ta\202\323\344\223\002\304\001\"c/v1beta/{parent=projects/*/lo" - + "cations/*/collections/*/dataStores/*}/suggestionDenyListEntries:import:\001*ZZ\"U/v1" - + "beta/{parent=projects/*/locations/*/data" - + "Stores/*}/suggestionDenyListEntries:import:\001*\022\364\003\n" - + "\036PurgeSuggestionDenyListEntries\022J.google.cloud.discoveryengine.v1beta.P" - + "urgeSuggestionDenyListEntriesRequest\032\035.google.longrunning.Operation\"\346\002\312A\230\001\n" - + "Jgoogle.cloud.discoveryengine.v1beta.PurgeSug" - + "gestionDenyListEntriesResponse\022Jgoogle.cloud.discoveryengine.v1beta.PurgeSuggest" - + "ionDenyListEntriesMetadata\202\323\344\223\002\303\001\"b/v1be" - + "ta/{parent=projects/*/locations/*/collections/*/dataStores/*}/suggestionDenyList" - + "Entries:purge:\001*ZZ\"U/v1beta/{parent=proj" - + "ects/*/locations/*/dataStores/**}/suggestionDenyListEntries:purge:\001*\022\341\003\n" - + "\033ImportCompletionSuggestions\022G.google.cloud.disc" - + "overyengine.v1beta.ImportCompletionSugge" - + "stionsRequest\032\035.google.longrunning.Operation\"\331\002\312A\222\001\n" - + "Ggoogle.cloud.discoveryengine.v1beta.ImportCompletionSuggestionsResp" - + "onse\022Ggoogle.cloud.discoveryengine.v1bet" - + "a.ImportCompletionSuggestionsMetadata\202\323\344" - + "\223\002\274\001\"_/v1beta/{parent=projects/*/locatio" - + "ns/*/collections/*/dataStores/*}/completionSuggestions:import:\001*ZV\"Q/v1beta/{par" - + "ent=projects/*/locations/*/dataStores/*}/completionSuggestions:import:\001*\022\333\003\n" - + "\032PurgeCompletionSuggestions\022F.google.cloud.d" - + "iscoveryengine.v1beta.PurgeCompletionSug" - + "gestionsRequest\032\035.google.longrunning.Operation\"\325\002\312A\220\001\n" - + "Fgoogle.cloud.discoveryengine.v1beta.PurgeCompletionSuggestionsRes" - + "ponse\022Fgoogle.cloud.discoveryengine.v1be" - + "ta.PurgeCompletionSuggestionsMetadata\202\323\344" - + "\223\002\272\001\"^/v1beta/{parent=projects/*/locatio" - + "ns/*/collections/*/dataStores/*}/completionSuggestions:purge:\001*ZU\"P/v1beta/{pare" - + "nt=projects/*/locations/*/dataStores/*}/" - + "completionSuggestions:purge:\001*\032R\312A\036disco" - + "veryengine.googleapis.com\322A.https://www.googleapis.com/auth/cloud-platformB\235\002\n" - + "\'com.google.cloud.discoveryengine.v1betaB\026" - + "CompletionServiceProtoP\001ZQcloud.google.com/go/discoveryengine/apiv1beta/discover" - + "yenginepb;discoveryenginepb\242\002\017DISCOVERYE" - + "NGINE\252\002#Google.Cloud.DiscoveryEngine.V1B" - + "eta\312\002#Google\\Cloud\\DiscoveryEngine\\V1bet" - + "a\352\002&Google::Cloud::DiscoveryEngine::V1betab\006proto3" + + "CompleteQuery\0229.google.cloud.discoveryengine.v1beta.CompleteQueryRe" + + "quest\032:.google.cloud.discoveryengine.v1b" + + "eta.CompleteQueryResponse\"\247\001\202\323\344\223\002\240\001\022F/v1" + + "beta/{data_store=projects/*/locations/*/dataStores/*}:completeQueryZV\022T/v1beta/{" + + "data_store=projects/*/locations/*/collections/*/dataStores/*}:completeQuery\022\356\003\n" + + "\025AdvancedCompleteQuery\022A.google.cloud.dis" + + "coveryengine.v1beta.AdvancedCompleteQueryRequest\032B.google.cloud.discoveryengine." + + "v1beta.AdvancedCompleteQueryResponse\"\315\002\202" + + "\323\344\223\002\306\002\"^/v1beta/{completion_config=proje" + + "cts/*/locations/*/dataStores/*/completionConfig}:completeQuery:\001*Zq\"l/v1beta/{co" + + "mpletion_config=projects/*/locations/*/collections/*/dataStores/*/completionConf" + + "ig}:completeQuery:\001*Zn\"i/v1beta/{completion_config=projects/*/locations/*/collec" + + "tions/*/engines/*/completionConfig}:completeQuery:\001*\022\371\003\n" + + "\037ImportSuggestionDenyListEntries\022K.google.cloud.discoveryengine." + + "v1beta.ImportSuggestionDenyListEntriesRe" + + "quest\032\035.google.longrunning.Operation\"\351\002\312A\232\001\n" + + "Kgoogle.cloud.discoveryengine.v1beta.ImportSuggestionDenyListEntriesResponse" + + "\022Kgoogle.cloud.discoveryengine.v1beta.Im" + + "portSuggestionDenyListEntriesMetadata\202\323\344" + + "\223\002\304\001\"c/v1beta/{parent=projects/*/locatio" + + "ns/*/collections/*/dataStores/*}/suggestionDenyListEntries:import:\001*ZZ\"U/v1beta/" + + "{parent=projects/*/locations/*/dataStore" + + "s/*}/suggestionDenyListEntries:import:\001*\022\364\003\n" + + "\036PurgeSuggestionDenyListEntries\022J.google.cloud.discoveryengine.v1beta.PurgeS" + + "uggestionDenyListEntriesRequest\032\035.google.longrunning.Operation\"\346\002\312A\230\001\n" + + "Jgoogle.cloud.discoveryengine.v1beta.PurgeSuggesti" + + "onDenyListEntriesResponse\022Jgoogle.cloud.discoveryengine.v1beta.PurgeSuggestionDe" + + "nyListEntriesMetadata\202\323\344\223\002\303\001\"b/v1beta/{p" + + "arent=projects/*/locations/*/collections/*/dataStores/*}/suggestionDenyListEntri" + + "es:purge:\001*ZZ\"U/v1beta/{parent=projects/" + + "*/locations/*/dataStores/**}/suggestionDenyListEntries:purge:\001*\022\341\003\n" + + "\033ImportCompletionSuggestions\022G.google.cloud.discovery" + + "engine.v1beta.ImportCompletionSuggestion" + + "sRequest\032\035.google.longrunning.Operation\"\331\002\312A\222\001\n" + + "Ggoogle.cloud.discoveryengine.v1beta.ImportCompletionSuggestionsResponse\022" + + "Ggoogle.cloud.discoveryengine.v1beta.Imp" + + "ortCompletionSuggestionsMetadata\202\323\344\223\002\274\001\"" + + "_/v1beta/{parent=projects/*/locations/*/collections/*/dataStores/*}/completionSu" + + "ggestions:import:\001*ZV\"Q/v1beta/{parent=p" + + "rojects/*/locations/*/dataStores/*}/completionSuggestions:import:\001*\022\333\003\n" + + "\032PurgeCompletionSuggestions\022F.google.cloud.discov" + + "eryengine.v1beta.PurgeCompletionSuggesti" + + "onsRequest\032\035.google.longrunning.Operation\"\325\002\312A\220\001\n" + + "Fgoogle.cloud.discoveryengine.v1beta.PurgeCompletionSuggestionsResponse" + + "\022Fgoogle.cloud.discoveryengine.v1beta.Pu" + + "rgeCompletionSuggestionsMetadata\202\323\344\223\002\272\001\"" + + "^/v1beta/{parent=projects/*/locations/*/collections/*/dataStores/*}/completionSu" + + "ggestions:purge:\001*ZU\"P/v1beta/{parent=pr" + + "ojects/*/locations/*/dataStores/*}/completionSuggestions:purge:\001*\022\210\002\n" + + "\020RemoveSuggestion\022<.google.cloud.discoveryengine.v1" + + "beta.RemoveSuggestionRequest\032=.google.cloud.discoveryengine.v1beta.RemoveSuggest" + + "ionResponse\"w\202\323\344\223\002q\"l/v1beta/{completion" + + "_config=projects/*/locations/*/collections/*/engines/*/completionConfig}:removeS" + + "uggestion:\001*\032\303\002\312A\036discoveryengine.google" + + "apis.com\322A\236\002https://www.googleapis.com/a" + + "uth/cloud-platform,https://www.googleapis.com/auth/cloud_search.query,https://ww" + + "w.googleapis.com/auth/discoveryengine.assist.readwrite,https://www.googleapis.co" + + "m/auth/discoveryengine.readwrite,https:/" + + "/www.googleapis.com/auth/discoveryengine.serving.readwriteB\235\002\n" + + "\'com.google.cloud.discoveryengine.v1betaB\026CompletionServic" + + "eProtoP\001ZQcloud.google.com/go/discoveryengine/apiv1beta/discoveryenginepb;discov" + + "eryenginepb\242\002\017DISCOVERYENGINE\252\002#Google.C" + + "loud.DiscoveryEngine.V1Beta\312\002#Google\\Clo" + + "ud\\DiscoveryEngine\\V1beta\352\002&Google::Cloud::DiscoveryEngine::V1betab\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -295,6 +345,8 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "IncludeTailSuggestions", "BoostSpec", "SuggestionTypes", + "SuggestionTypeSpecs", + "ExperimentIds", }); internal_static_google_cloud_discoveryengine_v1beta_AdvancedCompleteQueryRequest_BoostSpec_descriptor = internal_static_google_cloud_discoveryengine_v1beta_AdvancedCompleteQueryRequest_descriptor @@ -314,6 +366,15 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "Condition", "Boost", }); + internal_static_google_cloud_discoveryengine_v1beta_AdvancedCompleteQueryRequest_SuggestionTypeSpec_descriptor = + internal_static_google_cloud_discoveryengine_v1beta_AdvancedCompleteQueryRequest_descriptor + .getNestedType(1); + internal_static_google_cloud_discoveryengine_v1beta_AdvancedCompleteQueryRequest_SuggestionTypeSpec_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1beta_AdvancedCompleteQueryRequest_SuggestionTypeSpec_descriptor, + new java.lang.String[] { + "SuggestionType", "MaxSuggestions", + }); internal_static_google_cloud_discoveryengine_v1beta_AdvancedCompleteQueryResponse_descriptor = getDescriptor().getMessageType(3); internal_static_google_cloud_discoveryengine_v1beta_AdvancedCompleteQueryResponse_fieldAccessorTable = @@ -333,7 +394,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_cloud_discoveryengine_v1beta_AdvancedCompleteQueryResponse_QuerySuggestion_descriptor, new java.lang.String[] { - "Suggestion", "CompletableFieldPaths", "DataStore", + "Suggestion", "CompletableFieldPaths", "DataStore", "Score", }); internal_static_google_cloud_discoveryengine_v1beta_AdvancedCompleteQueryResponse_PersonSuggestion_descriptor = internal_static_google_cloud_discoveryengine_v1beta_AdvancedCompleteQueryResponse_descriptor @@ -342,7 +403,13 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_cloud_discoveryengine_v1beta_AdvancedCompleteQueryResponse_PersonSuggestion_descriptor, new java.lang.String[] { - "Suggestion", "PersonType", "Document", "DataStore", + "Suggestion", + "PersonType", + "Document", + "DataStore", + "Score", + "DisplayPhotoUri", + "DestinationUri", }); internal_static_google_cloud_discoveryengine_v1beta_AdvancedCompleteQueryResponse_ContentSuggestion_descriptor = internal_static_google_cloud_discoveryengine_v1beta_AdvancedCompleteQueryResponse_descriptor @@ -351,7 +418,13 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_cloud_discoveryengine_v1beta_AdvancedCompleteQueryResponse_ContentSuggestion_descriptor, new java.lang.String[] { - "Suggestion", "ContentType", "Document", "DataStore", + "Suggestion", + "ContentType", + "Document", + "DataStore", + "Score", + "IconUri", + "DestinationUri", }); internal_static_google_cloud_discoveryengine_v1beta_AdvancedCompleteQueryResponse_RecentSearchSuggestion_descriptor = internal_static_google_cloud_discoveryengine_v1beta_AdvancedCompleteQueryResponse_descriptor @@ -360,8 +433,28 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_cloud_discoveryengine_v1beta_AdvancedCompleteQueryResponse_RecentSearchSuggestion_descriptor, new java.lang.String[] { - "Suggestion", "RecentSearchTime", + "Suggestion", "RecentSearchTime", "Score", }); + internal_static_google_cloud_discoveryengine_v1beta_RemoveSuggestionRequest_descriptor = + getDescriptor().getMessageType(4); + internal_static_google_cloud_discoveryengine_v1beta_RemoveSuggestionRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1beta_RemoveSuggestionRequest_descriptor, + new java.lang.String[] { + "SearchHistorySuggestion", + "RemoveAllSearchHistorySuggestions", + "CompletionConfig", + "UserPseudoId", + "UserInfo", + "RemoveTime", + "Suggestion", + }); + internal_static_google_cloud_discoveryengine_v1beta_RemoveSuggestionResponse_descriptor = + getDescriptor().getMessageType(5); + internal_static_google_cloud_discoveryengine_v1beta_RemoveSuggestionResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1beta_RemoveSuggestionResponse_descriptor, + new java.lang.String[] {}); descriptor.resolveAllFeaturesImmutable(); com.google.api.AnnotationsProto.getDescriptor(); com.google.api.ClientProto.getDescriptor(); diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/Condition.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/Condition.java index b930f2336d03..3a5cb8da194e 100644 --- a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/Condition.java +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/Condition.java @@ -2161,7 +2161,7 @@ public com.google.cloud.discoveryengine.v1beta.Condition.TimeRange getActiveTime * Optional. Query regex to match the whole search query. * Cannot be set when * [Condition.query_terms][google.cloud.discoveryengine.v1beta.Condition.query_terms] - * is set. This is currently supporting promotion use case. + * is set. Only supported for Basic Site Search promotion serving controls. *
            * * string query_regex = 4 [(.google.api.field_behavior) = OPTIONAL]; @@ -2188,7 +2188,7 @@ public java.lang.String getQueryRegex() { * Optional. Query regex to match the whole search query. * Cannot be set when * [Condition.query_terms][google.cloud.discoveryengine.v1beta.Condition.query_terms] - * is set. This is currently supporting promotion use case. + * is set. Only supported for Basic Site Search promotion serving controls. *
            * * string query_regex = 4 [(.google.api.field_behavior) = OPTIONAL]; @@ -3638,7 +3638,7 @@ public Builder removeActiveTimeRange(int index) { * Optional. Query regex to match the whole search query. * Cannot be set when * [Condition.query_terms][google.cloud.discoveryengine.v1beta.Condition.query_terms] - * is set. This is currently supporting promotion use case. + * is set. Only supported for Basic Site Search promotion serving controls. *
            * * string query_regex = 4 [(.google.api.field_behavior) = OPTIONAL]; @@ -3664,7 +3664,7 @@ public java.lang.String getQueryRegex() { * Optional. Query regex to match the whole search query. * Cannot be set when * [Condition.query_terms][google.cloud.discoveryengine.v1beta.Condition.query_terms] - * is set. This is currently supporting promotion use case. + * is set. Only supported for Basic Site Search promotion serving controls. *
            * * string query_regex = 4 [(.google.api.field_behavior) = OPTIONAL]; @@ -3690,7 +3690,7 @@ public com.google.protobuf.ByteString getQueryRegexBytes() { * Optional. Query regex to match the whole search query. * Cannot be set when * [Condition.query_terms][google.cloud.discoveryengine.v1beta.Condition.query_terms] - * is set. This is currently supporting promotion use case. + * is set. Only supported for Basic Site Search promotion serving controls. *
            * * string query_regex = 4 [(.google.api.field_behavior) = OPTIONAL]; @@ -3715,7 +3715,7 @@ public Builder setQueryRegex(java.lang.String value) { * Optional. Query regex to match the whole search query. * Cannot be set when * [Condition.query_terms][google.cloud.discoveryengine.v1beta.Condition.query_terms] - * is set. This is currently supporting promotion use case. + * is set. Only supported for Basic Site Search promotion serving controls. *
            * * string query_regex = 4 [(.google.api.field_behavior) = OPTIONAL]; @@ -3736,7 +3736,7 @@ public Builder clearQueryRegex() { * Optional. Query regex to match the whole search query. * Cannot be set when * [Condition.query_terms][google.cloud.discoveryengine.v1beta.Condition.query_terms] - * is set. This is currently supporting promotion use case. + * is set. Only supported for Basic Site Search promotion serving controls. * * * string query_regex = 4 [(.google.api.field_behavior) = OPTIONAL]; diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ConditionOrBuilder.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ConditionOrBuilder.java index e79ccc043e7b..090d50ef3328 100644 --- a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ConditionOrBuilder.java +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ConditionOrBuilder.java @@ -193,7 +193,7 @@ com.google.cloud.discoveryengine.v1beta.Condition.TimeRangeOrBuilder getActiveTi * Optional. Query regex to match the whole search query. * Cannot be set when * [Condition.query_terms][google.cloud.discoveryengine.v1beta.Condition.query_terms] - * is set. This is currently supporting promotion use case. + * is set. Only supported for Basic Site Search promotion serving controls. * * * string query_regex = 4 [(.google.api.field_behavior) = OPTIONAL]; @@ -209,7 +209,7 @@ com.google.cloud.discoveryengine.v1beta.Condition.TimeRangeOrBuilder getActiveTi * Optional. Query regex to match the whole search query. * Cannot be set when * [Condition.query_terms][google.cloud.discoveryengine.v1beta.Condition.query_terms] - * is set. This is currently supporting promotion use case. + * is set. Only supported for Basic Site Search promotion serving controls. * * * string query_regex = 4 [(.google.api.field_behavior) = OPTIONAL]; diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/Control.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/Control.java index 6ca3fe5eb708..eee5e4047c08 100644 --- a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/Control.java +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/Control.java @@ -87,30 +87,4909 @@ public interface BoostActionOrBuilder * * *
            -     * Required. Strength of the boost, which should be in [-1, 1]. Negative
            +     * Optional. Strength of the boost, which should be in [-1, 1]. Negative
                  * boost means demotion. Default is 0.0 (No-op).
                  * 
            * - * float boost = 1 [(.google.api.field_behavior) = REQUIRED]; + * float fixed_boost = 4 [(.google.api.field_behavior) = OPTIONAL]; * + * @return Whether the fixedBoost field is set. + */ + boolean hasFixedBoost(); + + /** + * + * + *
            +     * Optional. Strength of the boost, which should be in [-1, 1]. Negative
            +     * boost means demotion. Default is 0.0 (No-op).
            +     * 
            + * + * float fixed_boost = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The fixedBoost. + */ + float getFixedBoost(); + + /** + * + * + *
            +     * Optional. Complex specification for custom ranking based on customer
            +     * defined attribute value.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Control.BoostAction.InterpolationBoostSpec interpolation_boost_spec = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the interpolationBoostSpec field is set. + */ + boolean hasInterpolationBoostSpec(); + + /** + * + * + *
            +     * Optional. Complex specification for custom ranking based on customer
            +     * defined attribute value.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Control.BoostAction.InterpolationBoostSpec interpolation_boost_spec = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The interpolationBoostSpec. + */ + com.google.cloud.discoveryengine.v1beta.Control.BoostAction.InterpolationBoostSpec + getInterpolationBoostSpec(); + + /** + * + * + *
            +     * Optional. Complex specification for custom ranking based on customer
            +     * defined attribute value.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Control.BoostAction.InterpolationBoostSpec interpolation_boost_spec = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.discoveryengine.v1beta.Control.BoostAction.InterpolationBoostSpecOrBuilder + getInterpolationBoostSpecOrBuilder(); + + /** + * + * + *
            +     * Strength of the boost, which should be in [-1, 1]. Negative
            +     * boost means demotion. Default is 0.0 (No-op).
            +     * 
            + * + * float boost = 1 [deprecated = true]; + * + * @deprecated google.cloud.discoveryengine.v1beta.Control.BoostAction.boost is deprecated. See + * google/cloud/discoveryengine/v1beta/control.proto;l=187 * @return The boost. */ + @java.lang.Deprecated float getBoost(); /** * * *
            -     * Required. Specifies which products to apply the boost to.
            +     * Required. Specifies which products to apply the boost to.
            +     *
            +     * If no filter is provided all products will be boosted (No-op).
            +     * Syntax documentation:
            +     * https://cloud.google.com/retail/docs/filter-and-order
            +     * Maximum length is 5000 characters.
            +     * Otherwise an INVALID ARGUMENT error is thrown.
            +     * 
            + * + * string filter = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The filter. + */ + java.lang.String getFilter(); + + /** + * + * + *
            +     * Required. Specifies which products to apply the boost to.
            +     *
            +     * If no filter is provided all products will be boosted (No-op).
            +     * Syntax documentation:
            +     * https://cloud.google.com/retail/docs/filter-and-order
            +     * Maximum length is 5000 characters.
            +     * Otherwise an INVALID ARGUMENT error is thrown.
            +     * 
            + * + * string filter = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for filter. + */ + com.google.protobuf.ByteString getFilterBytes(); + + /** + * + * + *
            +     * Required. Specifies which data store's documents can be boosted by this
            +     * control. Full data store name e.g.
            +     * projects/123/locations/global/collections/default_collection/dataStores/default_data_store
            +     * 
            + * + * + * string data_store = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The dataStore. + */ + java.lang.String getDataStore(); + + /** + * + * + *
            +     * Required. Specifies which data store's documents can be boosted by this
            +     * control. Full data store name e.g.
            +     * projects/123/locations/global/collections/default_collection/dataStores/default_data_store
            +     * 
            + * + * + * string data_store = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for dataStore. + */ + com.google.protobuf.ByteString getDataStoreBytes(); + + com.google.cloud.discoveryengine.v1beta.Control.BoostAction.BoostSpecCase getBoostSpecCase(); + } + + /** + * + * + *
            +   * Adjusts order of products in returned list.
            +   * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.Control.BoostAction} + */ + public static final class BoostAction extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.Control.BoostAction) + BoostActionOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "BoostAction"); + } + + // Use BoostAction.newBuilder() to construct. + private BoostAction(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private BoostAction() { + filter_ = ""; + dataStore_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.ControlProto + .internal_static_google_cloud_discoveryengine_v1beta_Control_BoostAction_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.ControlProto + .internal_static_google_cloud_discoveryengine_v1beta_Control_BoostAction_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.Control.BoostAction.class, + com.google.cloud.discoveryengine.v1beta.Control.BoostAction.Builder.class); + } + + public interface InterpolationBoostSpecOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.Control.BoostAction.InterpolationBoostSpec) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
            +       * Optional. The name of the field whose value will be used to determine
            +       * the boost amount.
            +       * 
            + * + * string field_name = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The fieldName. + */ + java.lang.String getFieldName(); + + /** + * + * + *
            +       * Optional. The name of the field whose value will be used to determine
            +       * the boost amount.
            +       * 
            + * + * string field_name = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for fieldName. + */ + com.google.protobuf.ByteString getFieldNameBytes(); + + /** + * + * + *
            +       * Optional. The attribute type to be used to determine the boost amount.
            +       * The attribute value can be derived from the field value of the
            +       * specified field_name. In the case of numerical it is straightforward
            +       * i.e. attribute_value = numerical_field_value. In the case of freshness
            +       * however, attribute_value = (time.now() - datetime_field_value).
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Control.BoostAction.InterpolationBoostSpec.AttributeType attribute_type = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for attributeType. + */ + int getAttributeTypeValue(); + + /** + * + * + *
            +       * Optional. The attribute type to be used to determine the boost amount.
            +       * The attribute value can be derived from the field value of the
            +       * specified field_name. In the case of numerical it is straightforward
            +       * i.e. attribute_value = numerical_field_value. In the case of freshness
            +       * however, attribute_value = (time.now() - datetime_field_value).
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Control.BoostAction.InterpolationBoostSpec.AttributeType attribute_type = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The attributeType. + */ + com.google.cloud.discoveryengine.v1beta.Control.BoostAction.InterpolationBoostSpec + .AttributeType + getAttributeType(); + + /** + * + * + *
            +       * Optional. The interpolation type to be applied to connect the control
            +       * points listed below.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Control.BoostAction.InterpolationBoostSpec.InterpolationType interpolation_type = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for interpolationType. + */ + int getInterpolationTypeValue(); + + /** + * + * + *
            +       * Optional. The interpolation type to be applied to connect the control
            +       * points listed below.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Control.BoostAction.InterpolationBoostSpec.InterpolationType interpolation_type = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The interpolationType. + */ + com.google.cloud.discoveryengine.v1beta.Control.BoostAction.InterpolationBoostSpec + .InterpolationType + getInterpolationType(); + + /** + * + * + *
            +       * Optional. The control points used to define the curve. The monotonic
            +       * function (defined through the interpolation_type above) passes through
            +       * the control points listed here.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Control.BoostAction.InterpolationBoostSpec.ControlPoint control_points = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List< + com.google.cloud.discoveryengine.v1beta.Control.BoostAction.InterpolationBoostSpec + .ControlPoint> + getControlPointsList(); + + /** + * + * + *
            +       * Optional. The control points used to define the curve. The monotonic
            +       * function (defined through the interpolation_type above) passes through
            +       * the control points listed here.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Control.BoostAction.InterpolationBoostSpec.ControlPoint control_points = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.discoveryengine.v1beta.Control.BoostAction.InterpolationBoostSpec + .ControlPoint + getControlPoints(int index); + + /** + * + * + *
            +       * Optional. The control points used to define the curve. The monotonic
            +       * function (defined through the interpolation_type above) passes through
            +       * the control points listed here.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Control.BoostAction.InterpolationBoostSpec.ControlPoint control_points = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + int getControlPointsCount(); + + /** + * + * + *
            +       * Optional. The control points used to define the curve. The monotonic
            +       * function (defined through the interpolation_type above) passes through
            +       * the control points listed here.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Control.BoostAction.InterpolationBoostSpec.ControlPoint control_points = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List< + ? extends + com.google.cloud.discoveryengine.v1beta.Control.BoostAction.InterpolationBoostSpec + .ControlPointOrBuilder> + getControlPointsOrBuilderList(); + + /** + * + * + *
            +       * Optional. The control points used to define the curve. The monotonic
            +       * function (defined through the interpolation_type above) passes through
            +       * the control points listed here.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Control.BoostAction.InterpolationBoostSpec.ControlPoint control_points = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.discoveryengine.v1beta.Control.BoostAction.InterpolationBoostSpec + .ControlPointOrBuilder + getControlPointsOrBuilder(int index); + } + + /** + * + * + *
            +     * Specification for custom ranking based on customer specified attribute
            +     * value. It provides more controls for customized ranking than the simple
            +     * (condition, boost) combination above.
            +     * 
            + * + * Protobuf type {@code + * google.cloud.discoveryengine.v1beta.Control.BoostAction.InterpolationBoostSpec} + */ + public static final class InterpolationBoostSpec extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.Control.BoostAction.InterpolationBoostSpec) + InterpolationBoostSpecOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "InterpolationBoostSpec"); + } + + // Use InterpolationBoostSpec.newBuilder() to construct. + private InterpolationBoostSpec(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private InterpolationBoostSpec() { + fieldName_ = ""; + attributeType_ = 0; + interpolationType_ = 0; + controlPoints_ = java.util.Collections.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.ControlProto + .internal_static_google_cloud_discoveryengine_v1beta_Control_BoostAction_InterpolationBoostSpec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.ControlProto + .internal_static_google_cloud_discoveryengine_v1beta_Control_BoostAction_InterpolationBoostSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.Control.BoostAction.InterpolationBoostSpec + .class, + com.google.cloud.discoveryengine.v1beta.Control.BoostAction.InterpolationBoostSpec + .Builder.class); + } + + /** + * + * + *
            +       * The attribute(or function) for which the custom ranking is to be
            +       * applied.
            +       * 
            + * + * Protobuf enum {@code + * google.cloud.discoveryengine.v1beta.Control.BoostAction.InterpolationBoostSpec.AttributeType} + */ + public enum AttributeType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
            +         * Unspecified AttributeType.
            +         * 
            + * + * ATTRIBUTE_TYPE_UNSPECIFIED = 0; + */ + ATTRIBUTE_TYPE_UNSPECIFIED(0), + /** + * + * + *
            +         * The value of the numerical field will be used to dynamically update
            +         * the boost amount. In this case, the attribute_value (the x value)
            +         * of the control point will be the actual value of the numerical
            +         * field for which the boost_amount is specified.
            +         * 
            + * + * NUMERICAL = 1; + */ + NUMERICAL(1), + /** + * + * + *
            +         * For the freshness use case the attribute value will be the duration
            +         * between the current time and the date in the datetime field
            +         * specified. The value must be formatted as an XSD `dayTimeDuration`
            +         * value (a restricted subset of an ISO 8601 duration value). The
            +         * pattern for this is: `[nD][T[nH][nM][nS]]`.
            +         * For example, `5D`, `3DT12H30M`, `T24H`.
            +         * 
            + * + * FRESHNESS = 2; + */ + FRESHNESS(2), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "AttributeType"); + } + + /** + * + * + *
            +         * Unspecified AttributeType.
            +         * 
            + * + * ATTRIBUTE_TYPE_UNSPECIFIED = 0; + */ + public static final int ATTRIBUTE_TYPE_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
            +         * The value of the numerical field will be used to dynamically update
            +         * the boost amount. In this case, the attribute_value (the x value)
            +         * of the control point will be the actual value of the numerical
            +         * field for which the boost_amount is specified.
            +         * 
            + * + * NUMERICAL = 1; + */ + public static final int NUMERICAL_VALUE = 1; + + /** + * + * + *
            +         * For the freshness use case the attribute value will be the duration
            +         * between the current time and the date in the datetime field
            +         * specified. The value must be formatted as an XSD `dayTimeDuration`
            +         * value (a restricted subset of an ISO 8601 duration value). The
            +         * pattern for this is: `[nD][T[nH][nM][nS]]`.
            +         * For example, `5D`, `3DT12H30M`, `T24H`.
            +         * 
            + * + * FRESHNESS = 2; + */ + public static final int FRESHNESS_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 AttributeType 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 AttributeType forNumber(int value) { + switch (value) { + case 0: + return ATTRIBUTE_TYPE_UNSPECIFIED; + case 1: + return NUMERICAL; + case 2: + return FRESHNESS; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap + internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public AttributeType findValueByNumber(int number) { + return AttributeType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.Control.BoostAction.InterpolationBoostSpec + .getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final AttributeType[] VALUES = values(); + + public static AttributeType valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private AttributeType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.discoveryengine.v1beta.Control.BoostAction.InterpolationBoostSpec.AttributeType) + } + + /** + * + * + *
            +       * The interpolation type to be applied. Default will be linear
            +       * (Piecewise Linear).
            +       * 
            + * + * Protobuf enum {@code + * google.cloud.discoveryengine.v1beta.Control.BoostAction.InterpolationBoostSpec.InterpolationType} + */ + public enum InterpolationType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
            +         * Interpolation type is unspecified. In this case, it defaults to
            +         * Linear.
            +         * 
            + * + * INTERPOLATION_TYPE_UNSPECIFIED = 0; + */ + INTERPOLATION_TYPE_UNSPECIFIED(0), + /** + * + * + *
            +         * Piecewise linear interpolation will be applied.
            +         * 
            + * + * LINEAR = 1; + */ + LINEAR(1), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "InterpolationType"); + } + + /** + * + * + *
            +         * Interpolation type is unspecified. In this case, it defaults to
            +         * Linear.
            +         * 
            + * + * INTERPOLATION_TYPE_UNSPECIFIED = 0; + */ + public static final int INTERPOLATION_TYPE_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
            +         * Piecewise linear interpolation will be applied.
            +         * 
            + * + * LINEAR = 1; + */ + public static final int LINEAR_VALUE = 1; + + 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 InterpolationType 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 InterpolationType forNumber(int value) { + switch (value) { + case 0: + return INTERPOLATION_TYPE_UNSPECIFIED; + case 1: + return LINEAR; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap + internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public InterpolationType findValueByNumber(int number) { + return InterpolationType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.Control.BoostAction.InterpolationBoostSpec + .getDescriptor() + .getEnumTypes() + .get(1); + } + + private static final InterpolationType[] VALUES = values(); + + public static InterpolationType valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private InterpolationType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.discoveryengine.v1beta.Control.BoostAction.InterpolationBoostSpec.InterpolationType) + } + + public interface ControlPointOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.Control.BoostAction.InterpolationBoostSpec.ControlPoint) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
            +         * Optional. Can be one of:
            +         * 1. The numerical field value.
            +         * 2. The duration spec for freshness:
            +         * The value must be formatted as an XSD `dayTimeDuration` value (a
            +         * restricted subset of an ISO 8601 duration value). The pattern for
            +         * this is: `[nD][T[nH][nM][nS]]`.
            +         * 
            + * + * string attribute_value = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The attributeValue. + */ + java.lang.String getAttributeValue(); + + /** + * + * + *
            +         * Optional. Can be one of:
            +         * 1. The numerical field value.
            +         * 2. The duration spec for freshness:
            +         * The value must be formatted as an XSD `dayTimeDuration` value (a
            +         * restricted subset of an ISO 8601 duration value). The pattern for
            +         * this is: `[nD][T[nH][nM][nS]]`.
            +         * 
            + * + * string attribute_value = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for attributeValue. + */ + com.google.protobuf.ByteString getAttributeValueBytes(); + + /** + * + * + *
            +         * Optional. The value between -1 to 1 by which to boost the score if
            +         * the attribute_value evaluates to the value specified above.
            +         * 
            + * + * float boost_amount = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The boostAmount. + */ + float getBoostAmount(); + } + + /** + * + * + *
            +       * The control points used to define the curve. The curve defined
            +       * through these control points can only be monotonically increasing
            +       * or decreasing(constant values are acceptable).
            +       * 
            + * + * Protobuf type {@code + * google.cloud.discoveryengine.v1beta.Control.BoostAction.InterpolationBoostSpec.ControlPoint} + */ + public static final class ControlPoint extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.Control.BoostAction.InterpolationBoostSpec.ControlPoint) + ControlPointOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ControlPoint"); + } + + // Use ControlPoint.newBuilder() to construct. + private ControlPoint(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ControlPoint() { + attributeValue_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.ControlProto + .internal_static_google_cloud_discoveryengine_v1beta_Control_BoostAction_InterpolationBoostSpec_ControlPoint_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.ControlProto + .internal_static_google_cloud_discoveryengine_v1beta_Control_BoostAction_InterpolationBoostSpec_ControlPoint_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.Control.BoostAction.InterpolationBoostSpec + .ControlPoint.class, + com.google.cloud.discoveryengine.v1beta.Control.BoostAction.InterpolationBoostSpec + .ControlPoint.Builder.class); + } + + public static final int ATTRIBUTE_VALUE_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object attributeValue_ = ""; + + /** + * + * + *
            +         * Optional. Can be one of:
            +         * 1. The numerical field value.
            +         * 2. The duration spec for freshness:
            +         * The value must be formatted as an XSD `dayTimeDuration` value (a
            +         * restricted subset of an ISO 8601 duration value). The pattern for
            +         * this is: `[nD][T[nH][nM][nS]]`.
            +         * 
            + * + * string attribute_value = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The attributeValue. + */ + @java.lang.Override + public java.lang.String getAttributeValue() { + java.lang.Object ref = attributeValue_; + 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(); + attributeValue_ = s; + return s; + } + } + + /** + * + * + *
            +         * Optional. Can be one of:
            +         * 1. The numerical field value.
            +         * 2. The duration spec for freshness:
            +         * The value must be formatted as an XSD `dayTimeDuration` value (a
            +         * restricted subset of an ISO 8601 duration value). The pattern for
            +         * this is: `[nD][T[nH][nM][nS]]`.
            +         * 
            + * + * string attribute_value = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for attributeValue. + */ + @java.lang.Override + public com.google.protobuf.ByteString getAttributeValueBytes() { + java.lang.Object ref = attributeValue_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + attributeValue_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int BOOST_AMOUNT_FIELD_NUMBER = 2; + private float boostAmount_ = 0F; + + /** + * + * + *
            +         * Optional. The value between -1 to 1 by which to boost the score if
            +         * the attribute_value evaluates to the value specified above.
            +         * 
            + * + * float boost_amount = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The boostAmount. + */ + @java.lang.Override + public float getBoostAmount() { + return boostAmount_; + } + + 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(attributeValue_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, attributeValue_); + } + if (java.lang.Float.floatToRawIntBits(boostAmount_) != 0) { + output.writeFloat(2, boostAmount_); + } + 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(attributeValue_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, attributeValue_); + } + if (java.lang.Float.floatToRawIntBits(boostAmount_) != 0) { + size += com.google.protobuf.CodedOutputStream.computeFloatSize(2, boostAmount_); + } + 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.discoveryengine.v1beta.Control.BoostAction.InterpolationBoostSpec + .ControlPoint)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1beta.Control.BoostAction.InterpolationBoostSpec + .ControlPoint + other = + (com.google.cloud.discoveryengine.v1beta.Control.BoostAction + .InterpolationBoostSpec.ControlPoint) + obj; + + if (!getAttributeValue().equals(other.getAttributeValue())) return false; + if (java.lang.Float.floatToIntBits(getBoostAmount()) + != java.lang.Float.floatToIntBits(other.getBoostAmount())) 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) + ATTRIBUTE_VALUE_FIELD_NUMBER; + hash = (53 * hash) + getAttributeValue().hashCode(); + hash = (37 * hash) + BOOST_AMOUNT_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits(getBoostAmount()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1beta.Control.BoostAction + .InterpolationBoostSpec.ControlPoint + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.Control.BoostAction + .InterpolationBoostSpec.ControlPoint + 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.discoveryengine.v1beta.Control.BoostAction + .InterpolationBoostSpec.ControlPoint + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.Control.BoostAction + .InterpolationBoostSpec.ControlPoint + 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.discoveryengine.v1beta.Control.BoostAction + .InterpolationBoostSpec.ControlPoint + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.Control.BoostAction + .InterpolationBoostSpec.ControlPoint + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1beta.Control.BoostAction + .InterpolationBoostSpec.ControlPoint + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.Control.BoostAction + .InterpolationBoostSpec.ControlPoint + 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.discoveryengine.v1beta.Control.BoostAction + .InterpolationBoostSpec.ControlPoint + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.Control.BoostAction + .InterpolationBoostSpec.ControlPoint + 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.discoveryengine.v1beta.Control.BoostAction + .InterpolationBoostSpec.ControlPoint + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.Control.BoostAction + .InterpolationBoostSpec.ControlPoint + 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.discoveryengine.v1beta.Control.BoostAction.InterpolationBoostSpec + .ControlPoint + 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; + } + + /** + * + * + *
            +         * The control points used to define the curve. The curve defined
            +         * through these control points can only be monotonically increasing
            +         * or decreasing(constant values are acceptable).
            +         * 
            + * + * Protobuf type {@code + * google.cloud.discoveryengine.v1beta.Control.BoostAction.InterpolationBoostSpec.ControlPoint} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.Control.BoostAction.InterpolationBoostSpec.ControlPoint) + com.google.cloud.discoveryengine.v1beta.Control.BoostAction.InterpolationBoostSpec + .ControlPointOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.ControlProto + .internal_static_google_cloud_discoveryengine_v1beta_Control_BoostAction_InterpolationBoostSpec_ControlPoint_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.ControlProto + .internal_static_google_cloud_discoveryengine_v1beta_Control_BoostAction_InterpolationBoostSpec_ControlPoint_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.Control.BoostAction + .InterpolationBoostSpec.ControlPoint.class, + com.google.cloud.discoveryengine.v1beta.Control.BoostAction + .InterpolationBoostSpec.ControlPoint.Builder.class); + } + + // Construct using + // com.google.cloud.discoveryengine.v1beta.Control.BoostAction.InterpolationBoostSpec.ControlPoint.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + attributeValue_ = ""; + boostAmount_ = 0F; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1beta.ControlProto + .internal_static_google_cloud_discoveryengine_v1beta_Control_BoostAction_InterpolationBoostSpec_ControlPoint_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Control.BoostAction.InterpolationBoostSpec + .ControlPoint + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1beta.Control.BoostAction + .InterpolationBoostSpec.ControlPoint.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Control.BoostAction.InterpolationBoostSpec + .ControlPoint + build() { + com.google.cloud.discoveryengine.v1beta.Control.BoostAction.InterpolationBoostSpec + .ControlPoint + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Control.BoostAction.InterpolationBoostSpec + .ControlPoint + buildPartial() { + com.google.cloud.discoveryengine.v1beta.Control.BoostAction.InterpolationBoostSpec + .ControlPoint + result = + new com.google.cloud.discoveryengine.v1beta.Control.BoostAction + .InterpolationBoostSpec.ControlPoint(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.discoveryengine.v1beta.Control.BoostAction.InterpolationBoostSpec + .ControlPoint + result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.attributeValue_ = attributeValue_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.boostAmount_ = boostAmount_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.discoveryengine.v1beta.Control.BoostAction.InterpolationBoostSpec + .ControlPoint) { + return mergeFrom( + (com.google.cloud.discoveryengine.v1beta.Control.BoostAction + .InterpolationBoostSpec.ControlPoint) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1beta.Control.BoostAction.InterpolationBoostSpec + .ControlPoint + other) { + if (other + == com.google.cloud.discoveryengine.v1beta.Control.BoostAction + .InterpolationBoostSpec.ControlPoint.getDefaultInstance()) return this; + if (!other.getAttributeValue().isEmpty()) { + attributeValue_ = other.attributeValue_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (java.lang.Float.floatToRawIntBits(other.getBoostAmount()) != 0) { + setBoostAmount(other.getBoostAmount()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + attributeValue_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 21: + { + boostAmount_ = input.readFloat(); + bitField0_ |= 0x00000002; + break; + } // case 21 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object attributeValue_ = ""; + + /** + * + * + *
            +           * Optional. Can be one of:
            +           * 1. The numerical field value.
            +           * 2. The duration spec for freshness:
            +           * The value must be formatted as an XSD `dayTimeDuration` value (a
            +           * restricted subset of an ISO 8601 duration value). The pattern for
            +           * this is: `[nD][T[nH][nM][nS]]`.
            +           * 
            + * + * string attribute_value = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The attributeValue. + */ + public java.lang.String getAttributeValue() { + java.lang.Object ref = attributeValue_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + attributeValue_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
            +           * Optional. Can be one of:
            +           * 1. The numerical field value.
            +           * 2. The duration spec for freshness:
            +           * The value must be formatted as an XSD `dayTimeDuration` value (a
            +           * restricted subset of an ISO 8601 duration value). The pattern for
            +           * this is: `[nD][T[nH][nM][nS]]`.
            +           * 
            + * + * string attribute_value = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for attributeValue. + */ + public com.google.protobuf.ByteString getAttributeValueBytes() { + java.lang.Object ref = attributeValue_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + attributeValue_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
            +           * Optional. Can be one of:
            +           * 1. The numerical field value.
            +           * 2. The duration spec for freshness:
            +           * The value must be formatted as an XSD `dayTimeDuration` value (a
            +           * restricted subset of an ISO 8601 duration value). The pattern for
            +           * this is: `[nD][T[nH][nM][nS]]`.
            +           * 
            + * + * string attribute_value = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The attributeValue to set. + * @return This builder for chaining. + */ + public Builder setAttributeValue(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + attributeValue_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
            +           * Optional. Can be one of:
            +           * 1. The numerical field value.
            +           * 2. The duration spec for freshness:
            +           * The value must be formatted as an XSD `dayTimeDuration` value (a
            +           * restricted subset of an ISO 8601 duration value). The pattern for
            +           * this is: `[nD][T[nH][nM][nS]]`.
            +           * 
            + * + * string attribute_value = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearAttributeValue() { + attributeValue_ = getDefaultInstance().getAttributeValue(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
            +           * Optional. Can be one of:
            +           * 1. The numerical field value.
            +           * 2. The duration spec for freshness:
            +           * The value must be formatted as an XSD `dayTimeDuration` value (a
            +           * restricted subset of an ISO 8601 duration value). The pattern for
            +           * this is: `[nD][T[nH][nM][nS]]`.
            +           * 
            + * + * string attribute_value = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for attributeValue to set. + * @return This builder for chaining. + */ + public Builder setAttributeValueBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + attributeValue_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private float boostAmount_; + + /** + * + * + *
            +           * Optional. The value between -1 to 1 by which to boost the score if
            +           * the attribute_value evaluates to the value specified above.
            +           * 
            + * + * float boost_amount = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The boostAmount. + */ + @java.lang.Override + public float getBoostAmount() { + return boostAmount_; + } + + /** + * + * + *
            +           * Optional. The value between -1 to 1 by which to boost the score if
            +           * the attribute_value evaluates to the value specified above.
            +           * 
            + * + * float boost_amount = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The boostAmount to set. + * @return This builder for chaining. + */ + public Builder setBoostAmount(float value) { + + boostAmount_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
            +           * Optional. The value between -1 to 1 by which to boost the score if
            +           * the attribute_value evaluates to the value specified above.
            +           * 
            + * + * float boost_amount = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearBoostAmount() { + bitField0_ = (bitField0_ & ~0x00000002); + boostAmount_ = 0F; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.Control.BoostAction.InterpolationBoostSpec.ControlPoint) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.Control.BoostAction.InterpolationBoostSpec.ControlPoint) + private static final com.google.cloud.discoveryengine.v1beta.Control.BoostAction + .InterpolationBoostSpec.ControlPoint + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.discoveryengine.v1beta.Control.BoostAction.InterpolationBoostSpec + .ControlPoint(); + } + + public static com.google.cloud.discoveryengine.v1beta.Control.BoostAction + .InterpolationBoostSpec.ControlPoint + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ControlPoint parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Control.BoostAction.InterpolationBoostSpec + .ControlPoint + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int FIELD_NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object fieldName_ = ""; + + /** + * + * + *
            +       * Optional. The name of the field whose value will be used to determine
            +       * the boost amount.
            +       * 
            + * + * string field_name = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The fieldName. + */ + @java.lang.Override + public java.lang.String getFieldName() { + java.lang.Object ref = fieldName_; + 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(); + fieldName_ = s; + return s; + } + } + + /** + * + * + *
            +       * Optional. The name of the field whose value will be used to determine
            +       * the boost amount.
            +       * 
            + * + * string field_name = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for fieldName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFieldNameBytes() { + java.lang.Object ref = fieldName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + fieldName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ATTRIBUTE_TYPE_FIELD_NUMBER = 2; + private int attributeType_ = 0; + + /** + * + * + *
            +       * Optional. The attribute type to be used to determine the boost amount.
            +       * The attribute value can be derived from the field value of the
            +       * specified field_name. In the case of numerical it is straightforward
            +       * i.e. attribute_value = numerical_field_value. In the case of freshness
            +       * however, attribute_value = (time.now() - datetime_field_value).
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Control.BoostAction.InterpolationBoostSpec.AttributeType attribute_type = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for attributeType. + */ + @java.lang.Override + public int getAttributeTypeValue() { + return attributeType_; + } + + /** + * + * + *
            +       * Optional. The attribute type to be used to determine the boost amount.
            +       * The attribute value can be derived from the field value of the
            +       * specified field_name. In the case of numerical it is straightforward
            +       * i.e. attribute_value = numerical_field_value. In the case of freshness
            +       * however, attribute_value = (time.now() - datetime_field_value).
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Control.BoostAction.InterpolationBoostSpec.AttributeType attribute_type = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The attributeType. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Control.BoostAction.InterpolationBoostSpec + .AttributeType + getAttributeType() { + com.google.cloud.discoveryengine.v1beta.Control.BoostAction.InterpolationBoostSpec + .AttributeType + result = + com.google.cloud.discoveryengine.v1beta.Control.BoostAction.InterpolationBoostSpec + .AttributeType.forNumber(attributeType_); + return result == null + ? com.google.cloud.discoveryengine.v1beta.Control.BoostAction.InterpolationBoostSpec + .AttributeType.UNRECOGNIZED + : result; + } + + public static final int INTERPOLATION_TYPE_FIELD_NUMBER = 3; + private int interpolationType_ = 0; + + /** + * + * + *
            +       * Optional. The interpolation type to be applied to connect the control
            +       * points listed below.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Control.BoostAction.InterpolationBoostSpec.InterpolationType interpolation_type = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for interpolationType. + */ + @java.lang.Override + public int getInterpolationTypeValue() { + return interpolationType_; + } + + /** + * + * + *
            +       * Optional. The interpolation type to be applied to connect the control
            +       * points listed below.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Control.BoostAction.InterpolationBoostSpec.InterpolationType interpolation_type = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The interpolationType. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Control.BoostAction.InterpolationBoostSpec + .InterpolationType + getInterpolationType() { + com.google.cloud.discoveryengine.v1beta.Control.BoostAction.InterpolationBoostSpec + .InterpolationType + result = + com.google.cloud.discoveryengine.v1beta.Control.BoostAction.InterpolationBoostSpec + .InterpolationType.forNumber(interpolationType_); + return result == null + ? com.google.cloud.discoveryengine.v1beta.Control.BoostAction.InterpolationBoostSpec + .InterpolationType.UNRECOGNIZED + : result; + } + + public static final int CONTROL_POINTS_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private java.util.List< + com.google.cloud.discoveryengine.v1beta.Control.BoostAction.InterpolationBoostSpec + .ControlPoint> + controlPoints_; + + /** + * + * + *
            +       * Optional. The control points used to define the curve. The monotonic
            +       * function (defined through the interpolation_type above) passes through
            +       * the control points listed here.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Control.BoostAction.InterpolationBoostSpec.ControlPoint control_points = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List< + com.google.cloud.discoveryengine.v1beta.Control.BoostAction.InterpolationBoostSpec + .ControlPoint> + getControlPointsList() { + return controlPoints_; + } + + /** + * + * + *
            +       * Optional. The control points used to define the curve. The monotonic
            +       * function (defined through the interpolation_type above) passes through
            +       * the control points listed here.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Control.BoostAction.InterpolationBoostSpec.ControlPoint control_points = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List< + ? extends + com.google.cloud.discoveryengine.v1beta.Control.BoostAction.InterpolationBoostSpec + .ControlPointOrBuilder> + getControlPointsOrBuilderList() { + return controlPoints_; + } + + /** + * + * + *
            +       * Optional. The control points used to define the curve. The monotonic
            +       * function (defined through the interpolation_type above) passes through
            +       * the control points listed here.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Control.BoostAction.InterpolationBoostSpec.ControlPoint control_points = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public int getControlPointsCount() { + return controlPoints_.size(); + } + + /** + * + * + *
            +       * Optional. The control points used to define the curve. The monotonic
            +       * function (defined through the interpolation_type above) passes through
            +       * the control points listed here.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Control.BoostAction.InterpolationBoostSpec.ControlPoint control_points = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Control.BoostAction.InterpolationBoostSpec + .ControlPoint + getControlPoints(int index) { + return controlPoints_.get(index); + } + + /** + * + * + *
            +       * Optional. The control points used to define the curve. The monotonic
            +       * function (defined through the interpolation_type above) passes through
            +       * the control points listed here.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Control.BoostAction.InterpolationBoostSpec.ControlPoint control_points = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Control.BoostAction.InterpolationBoostSpec + .ControlPointOrBuilder + getControlPointsOrBuilder(int index) { + return controlPoints_.get(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 (!com.google.protobuf.GeneratedMessage.isStringEmpty(fieldName_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, fieldName_); + } + if (attributeType_ + != com.google.cloud.discoveryengine.v1beta.Control.BoostAction.InterpolationBoostSpec + .AttributeType.ATTRIBUTE_TYPE_UNSPECIFIED + .getNumber()) { + output.writeEnum(2, attributeType_); + } + if (interpolationType_ + != com.google.cloud.discoveryengine.v1beta.Control.BoostAction.InterpolationBoostSpec + .InterpolationType.INTERPOLATION_TYPE_UNSPECIFIED + .getNumber()) { + output.writeEnum(3, interpolationType_); + } + for (int i = 0; i < controlPoints_.size(); i++) { + output.writeMessage(4, controlPoints_.get(i)); + } + 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(fieldName_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, fieldName_); + } + if (attributeType_ + != com.google.cloud.discoveryengine.v1beta.Control.BoostAction.InterpolationBoostSpec + .AttributeType.ATTRIBUTE_TYPE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, attributeType_); + } + if (interpolationType_ + != com.google.cloud.discoveryengine.v1beta.Control.BoostAction.InterpolationBoostSpec + .InterpolationType.INTERPOLATION_TYPE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(3, interpolationType_); + } + for (int i = 0; i < controlPoints_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(4, controlPoints_.get(i)); + } + 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.discoveryengine.v1beta.Control.BoostAction.InterpolationBoostSpec)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1beta.Control.BoostAction.InterpolationBoostSpec other = + (com.google.cloud.discoveryengine.v1beta.Control.BoostAction.InterpolationBoostSpec) + obj; + + if (!getFieldName().equals(other.getFieldName())) return false; + if (attributeType_ != other.attributeType_) return false; + if (interpolationType_ != other.interpolationType_) return false; + if (!getControlPointsList().equals(other.getControlPointsList())) 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) + FIELD_NAME_FIELD_NUMBER; + hash = (53 * hash) + getFieldName().hashCode(); + hash = (37 * hash) + ATTRIBUTE_TYPE_FIELD_NUMBER; + hash = (53 * hash) + attributeType_; + hash = (37 * hash) + INTERPOLATION_TYPE_FIELD_NUMBER; + hash = (53 * hash) + interpolationType_; + if (getControlPointsCount() > 0) { + hash = (37 * hash) + CONTROL_POINTS_FIELD_NUMBER; + hash = (53 * hash) + getControlPointsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1beta.Control.BoostAction + .InterpolationBoostSpec + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.Control.BoostAction + .InterpolationBoostSpec + 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.discoveryengine.v1beta.Control.BoostAction + .InterpolationBoostSpec + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.Control.BoostAction + .InterpolationBoostSpec + 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.discoveryengine.v1beta.Control.BoostAction + .InterpolationBoostSpec + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.Control.BoostAction + .InterpolationBoostSpec + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1beta.Control.BoostAction + .InterpolationBoostSpec + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.Control.BoostAction + .InterpolationBoostSpec + 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.discoveryengine.v1beta.Control.BoostAction + .InterpolationBoostSpec + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.Control.BoostAction + .InterpolationBoostSpec + 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.discoveryengine.v1beta.Control.BoostAction + .InterpolationBoostSpec + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.Control.BoostAction + .InterpolationBoostSpec + 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.discoveryengine.v1beta.Control.BoostAction.InterpolationBoostSpec + 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; + } + + /** + * + * + *
            +       * Specification for custom ranking based on customer specified attribute
            +       * value. It provides more controls for customized ranking than the simple
            +       * (condition, boost) combination above.
            +       * 
            + * + * Protobuf type {@code + * google.cloud.discoveryengine.v1beta.Control.BoostAction.InterpolationBoostSpec} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.Control.BoostAction.InterpolationBoostSpec) + com.google.cloud.discoveryengine.v1beta.Control.BoostAction + .InterpolationBoostSpecOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.ControlProto + .internal_static_google_cloud_discoveryengine_v1beta_Control_BoostAction_InterpolationBoostSpec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.ControlProto + .internal_static_google_cloud_discoveryengine_v1beta_Control_BoostAction_InterpolationBoostSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.Control.BoostAction.InterpolationBoostSpec + .class, + com.google.cloud.discoveryengine.v1beta.Control.BoostAction.InterpolationBoostSpec + .Builder.class); + } + + // Construct using + // com.google.cloud.discoveryengine.v1beta.Control.BoostAction.InterpolationBoostSpec.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + fieldName_ = ""; + attributeType_ = 0; + interpolationType_ = 0; + if (controlPointsBuilder_ == null) { + controlPoints_ = java.util.Collections.emptyList(); + } else { + controlPoints_ = null; + controlPointsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000008); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1beta.ControlProto + .internal_static_google_cloud_discoveryengine_v1beta_Control_BoostAction_InterpolationBoostSpec_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Control.BoostAction.InterpolationBoostSpec + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1beta.Control.BoostAction.InterpolationBoostSpec + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Control.BoostAction.InterpolationBoostSpec + build() { + com.google.cloud.discoveryengine.v1beta.Control.BoostAction.InterpolationBoostSpec + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Control.BoostAction.InterpolationBoostSpec + buildPartial() { + com.google.cloud.discoveryengine.v1beta.Control.BoostAction.InterpolationBoostSpec + result = + new com.google.cloud.discoveryengine.v1beta.Control.BoostAction + .InterpolationBoostSpec(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.discoveryengine.v1beta.Control.BoostAction.InterpolationBoostSpec + result) { + if (controlPointsBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0)) { + controlPoints_ = java.util.Collections.unmodifiableList(controlPoints_); + bitField0_ = (bitField0_ & ~0x00000008); + } + result.controlPoints_ = controlPoints_; + } else { + result.controlPoints_ = controlPointsBuilder_.build(); + } + } + + private void buildPartial0( + com.google.cloud.discoveryengine.v1beta.Control.BoostAction.InterpolationBoostSpec + result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.fieldName_ = fieldName_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.attributeType_ = attributeType_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.interpolationType_ = interpolationType_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.discoveryengine.v1beta.Control.BoostAction.InterpolationBoostSpec) { + return mergeFrom( + (com.google.cloud.discoveryengine.v1beta.Control.BoostAction.InterpolationBoostSpec) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1beta.Control.BoostAction.InterpolationBoostSpec + other) { + if (other + == com.google.cloud.discoveryengine.v1beta.Control.BoostAction.InterpolationBoostSpec + .getDefaultInstance()) return this; + if (!other.getFieldName().isEmpty()) { + fieldName_ = other.fieldName_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.attributeType_ != 0) { + setAttributeTypeValue(other.getAttributeTypeValue()); + } + if (other.interpolationType_ != 0) { + setInterpolationTypeValue(other.getInterpolationTypeValue()); + } + if (controlPointsBuilder_ == null) { + if (!other.controlPoints_.isEmpty()) { + if (controlPoints_.isEmpty()) { + controlPoints_ = other.controlPoints_; + bitField0_ = (bitField0_ & ~0x00000008); + } else { + ensureControlPointsIsMutable(); + controlPoints_.addAll(other.controlPoints_); + } + onChanged(); + } + } else { + if (!other.controlPoints_.isEmpty()) { + if (controlPointsBuilder_.isEmpty()) { + controlPointsBuilder_.dispose(); + controlPointsBuilder_ = null; + controlPoints_ = other.controlPoints_; + bitField0_ = (bitField0_ & ~0x00000008); + controlPointsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetControlPointsFieldBuilder() + : null; + } else { + controlPointsBuilder_.addAllMessages(other.controlPoints_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + fieldName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + attributeType_ = input.readEnum(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 24: + { + interpolationType_ = input.readEnum(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 34: + { + com.google.cloud.discoveryengine.v1beta.Control.BoostAction + .InterpolationBoostSpec.ControlPoint + m = + input.readMessage( + com.google.cloud.discoveryengine.v1beta.Control.BoostAction + .InterpolationBoostSpec.ControlPoint.parser(), + extensionRegistry); + if (controlPointsBuilder_ == null) { + ensureControlPointsIsMutable(); + controlPoints_.add(m); + } else { + controlPointsBuilder_.addMessage(m); + } + break; + } // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object fieldName_ = ""; + + /** + * + * + *
            +         * Optional. The name of the field whose value will be used to determine
            +         * the boost amount.
            +         * 
            + * + * string field_name = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The fieldName. + */ + public java.lang.String getFieldName() { + java.lang.Object ref = fieldName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + fieldName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
            +         * Optional. The name of the field whose value will be used to determine
            +         * the boost amount.
            +         * 
            + * + * string field_name = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for fieldName. + */ + public com.google.protobuf.ByteString getFieldNameBytes() { + java.lang.Object ref = fieldName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + fieldName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
            +         * Optional. The name of the field whose value will be used to determine
            +         * the boost amount.
            +         * 
            + * + * string field_name = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The fieldName to set. + * @return This builder for chaining. + */ + public Builder setFieldName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + fieldName_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
            +         * Optional. The name of the field whose value will be used to determine
            +         * the boost amount.
            +         * 
            + * + * string field_name = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearFieldName() { + fieldName_ = getDefaultInstance().getFieldName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
            +         * Optional. The name of the field whose value will be used to determine
            +         * the boost amount.
            +         * 
            + * + * string field_name = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for fieldName to set. + * @return This builder for chaining. + */ + public Builder setFieldNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + fieldName_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int attributeType_ = 0; + + /** + * + * + *
            +         * Optional. The attribute type to be used to determine the boost amount.
            +         * The attribute value can be derived from the field value of the
            +         * specified field_name. In the case of numerical it is straightforward
            +         * i.e. attribute_value = numerical_field_value. In the case of freshness
            +         * however, attribute_value = (time.now() - datetime_field_value).
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Control.BoostAction.InterpolationBoostSpec.AttributeType attribute_type = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for attributeType. + */ + @java.lang.Override + public int getAttributeTypeValue() { + return attributeType_; + } + + /** + * + * + *
            +         * Optional. The attribute type to be used to determine the boost amount.
            +         * The attribute value can be derived from the field value of the
            +         * specified field_name. In the case of numerical it is straightforward
            +         * i.e. attribute_value = numerical_field_value. In the case of freshness
            +         * however, attribute_value = (time.now() - datetime_field_value).
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Control.BoostAction.InterpolationBoostSpec.AttributeType attribute_type = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The enum numeric value on the wire for attributeType to set. + * @return This builder for chaining. + */ + public Builder setAttributeTypeValue(int value) { + attributeType_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
            +         * Optional. The attribute type to be used to determine the boost amount.
            +         * The attribute value can be derived from the field value of the
            +         * specified field_name. In the case of numerical it is straightforward
            +         * i.e. attribute_value = numerical_field_value. In the case of freshness
            +         * however, attribute_value = (time.now() - datetime_field_value).
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Control.BoostAction.InterpolationBoostSpec.AttributeType attribute_type = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The attributeType. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Control.BoostAction.InterpolationBoostSpec + .AttributeType + getAttributeType() { + com.google.cloud.discoveryengine.v1beta.Control.BoostAction.InterpolationBoostSpec + .AttributeType + result = + com.google.cloud.discoveryengine.v1beta.Control.BoostAction.InterpolationBoostSpec + .AttributeType.forNumber(attributeType_); + return result == null + ? com.google.cloud.discoveryengine.v1beta.Control.BoostAction.InterpolationBoostSpec + .AttributeType.UNRECOGNIZED + : result; + } + + /** + * + * + *
            +         * Optional. The attribute type to be used to determine the boost amount.
            +         * The attribute value can be derived from the field value of the
            +         * specified field_name. In the case of numerical it is straightforward
            +         * i.e. attribute_value = numerical_field_value. In the case of freshness
            +         * however, attribute_value = (time.now() - datetime_field_value).
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Control.BoostAction.InterpolationBoostSpec.AttributeType attribute_type = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The attributeType to set. + * @return This builder for chaining. + */ + public Builder setAttributeType( + com.google.cloud.discoveryengine.v1beta.Control.BoostAction.InterpolationBoostSpec + .AttributeType + value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + attributeType_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
            +         * Optional. The attribute type to be used to determine the boost amount.
            +         * The attribute value can be derived from the field value of the
            +         * specified field_name. In the case of numerical it is straightforward
            +         * i.e. attribute_value = numerical_field_value. In the case of freshness
            +         * however, attribute_value = (time.now() - datetime_field_value).
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Control.BoostAction.InterpolationBoostSpec.AttributeType attribute_type = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearAttributeType() { + bitField0_ = (bitField0_ & ~0x00000002); + attributeType_ = 0; + onChanged(); + return this; + } + + private int interpolationType_ = 0; + + /** + * + * + *
            +         * Optional. The interpolation type to be applied to connect the control
            +         * points listed below.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Control.BoostAction.InterpolationBoostSpec.InterpolationType interpolation_type = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for interpolationType. + */ + @java.lang.Override + public int getInterpolationTypeValue() { + return interpolationType_; + } + + /** + * + * + *
            +         * Optional. The interpolation type to be applied to connect the control
            +         * points listed below.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Control.BoostAction.InterpolationBoostSpec.InterpolationType interpolation_type = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The enum numeric value on the wire for interpolationType to set. + * @return This builder for chaining. + */ + public Builder setInterpolationTypeValue(int value) { + interpolationType_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
            +         * Optional. The interpolation type to be applied to connect the control
            +         * points listed below.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Control.BoostAction.InterpolationBoostSpec.InterpolationType interpolation_type = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The interpolationType. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Control.BoostAction.InterpolationBoostSpec + .InterpolationType + getInterpolationType() { + com.google.cloud.discoveryengine.v1beta.Control.BoostAction.InterpolationBoostSpec + .InterpolationType + result = + com.google.cloud.discoveryengine.v1beta.Control.BoostAction.InterpolationBoostSpec + .InterpolationType.forNumber(interpolationType_); + return result == null + ? com.google.cloud.discoveryengine.v1beta.Control.BoostAction.InterpolationBoostSpec + .InterpolationType.UNRECOGNIZED + : result; + } + + /** + * + * + *
            +         * Optional. The interpolation type to be applied to connect the control
            +         * points listed below.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Control.BoostAction.InterpolationBoostSpec.InterpolationType interpolation_type = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The interpolationType to set. + * @return This builder for chaining. + */ + public Builder setInterpolationType( + com.google.cloud.discoveryengine.v1beta.Control.BoostAction.InterpolationBoostSpec + .InterpolationType + value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000004; + interpolationType_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
            +         * Optional. The interpolation type to be applied to connect the control
            +         * points listed below.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Control.BoostAction.InterpolationBoostSpec.InterpolationType interpolation_type = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearInterpolationType() { + bitField0_ = (bitField0_ & ~0x00000004); + interpolationType_ = 0; + onChanged(); + return this; + } + + private java.util.List< + com.google.cloud.discoveryengine.v1beta.Control.BoostAction.InterpolationBoostSpec + .ControlPoint> + controlPoints_ = java.util.Collections.emptyList(); + + private void ensureControlPointsIsMutable() { + if (!((bitField0_ & 0x00000008) != 0)) { + controlPoints_ = + new java.util.ArrayList< + com.google.cloud.discoveryengine.v1beta.Control.BoostAction + .InterpolationBoostSpec.ControlPoint>(controlPoints_); + bitField0_ |= 0x00000008; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.discoveryengine.v1beta.Control.BoostAction.InterpolationBoostSpec + .ControlPoint, + com.google.cloud.discoveryengine.v1beta.Control.BoostAction.InterpolationBoostSpec + .ControlPoint.Builder, + com.google.cloud.discoveryengine.v1beta.Control.BoostAction.InterpolationBoostSpec + .ControlPointOrBuilder> + controlPointsBuilder_; + + /** + * + * + *
            +         * Optional. The control points used to define the curve. The monotonic
            +         * function (defined through the interpolation_type above) passes through
            +         * the control points listed here.
            +         * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Control.BoostAction.InterpolationBoostSpec.ControlPoint control_points = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List< + com.google.cloud.discoveryengine.v1beta.Control.BoostAction.InterpolationBoostSpec + .ControlPoint> + getControlPointsList() { + if (controlPointsBuilder_ == null) { + return java.util.Collections.unmodifiableList(controlPoints_); + } else { + return controlPointsBuilder_.getMessageList(); + } + } + + /** + * + * + *
            +         * Optional. The control points used to define the curve. The monotonic
            +         * function (defined through the interpolation_type above) passes through
            +         * the control points listed here.
            +         * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Control.BoostAction.InterpolationBoostSpec.ControlPoint control_points = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public int getControlPointsCount() { + if (controlPointsBuilder_ == null) { + return controlPoints_.size(); + } else { + return controlPointsBuilder_.getCount(); + } + } + + /** + * + * + *
            +         * Optional. The control points used to define the curve. The monotonic
            +         * function (defined through the interpolation_type above) passes through
            +         * the control points listed here.
            +         * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Control.BoostAction.InterpolationBoostSpec.ControlPoint control_points = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.discoveryengine.v1beta.Control.BoostAction.InterpolationBoostSpec + .ControlPoint + getControlPoints(int index) { + if (controlPointsBuilder_ == null) { + return controlPoints_.get(index); + } else { + return controlPointsBuilder_.getMessage(index); + } + } + + /** + * + * + *
            +         * Optional. The control points used to define the curve. The monotonic
            +         * function (defined through the interpolation_type above) passes through
            +         * the control points listed here.
            +         * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Control.BoostAction.InterpolationBoostSpec.ControlPoint control_points = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setControlPoints( + int index, + com.google.cloud.discoveryengine.v1beta.Control.BoostAction.InterpolationBoostSpec + .ControlPoint + value) { + if (controlPointsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureControlPointsIsMutable(); + controlPoints_.set(index, value); + onChanged(); + } else { + controlPointsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
            +         * Optional. The control points used to define the curve. The monotonic
            +         * function (defined through the interpolation_type above) passes through
            +         * the control points listed here.
            +         * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Control.BoostAction.InterpolationBoostSpec.ControlPoint control_points = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setControlPoints( + int index, + com.google.cloud.discoveryengine.v1beta.Control.BoostAction.InterpolationBoostSpec + .ControlPoint.Builder + builderForValue) { + if (controlPointsBuilder_ == null) { + ensureControlPointsIsMutable(); + controlPoints_.set(index, builderForValue.build()); + onChanged(); + } else { + controlPointsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
            +         * Optional. The control points used to define the curve. The monotonic
            +         * function (defined through the interpolation_type above) passes through
            +         * the control points listed here.
            +         * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Control.BoostAction.InterpolationBoostSpec.ControlPoint control_points = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addControlPoints( + com.google.cloud.discoveryengine.v1beta.Control.BoostAction.InterpolationBoostSpec + .ControlPoint + value) { + if (controlPointsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureControlPointsIsMutable(); + controlPoints_.add(value); + onChanged(); + } else { + controlPointsBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
            +         * Optional. The control points used to define the curve. The monotonic
            +         * function (defined through the interpolation_type above) passes through
            +         * the control points listed here.
            +         * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Control.BoostAction.InterpolationBoostSpec.ControlPoint control_points = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addControlPoints( + int index, + com.google.cloud.discoveryengine.v1beta.Control.BoostAction.InterpolationBoostSpec + .ControlPoint + value) { + if (controlPointsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureControlPointsIsMutable(); + controlPoints_.add(index, value); + onChanged(); + } else { + controlPointsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
            +         * Optional. The control points used to define the curve. The monotonic
            +         * function (defined through the interpolation_type above) passes through
            +         * the control points listed here.
            +         * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Control.BoostAction.InterpolationBoostSpec.ControlPoint control_points = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addControlPoints( + com.google.cloud.discoveryengine.v1beta.Control.BoostAction.InterpolationBoostSpec + .ControlPoint.Builder + builderForValue) { + if (controlPointsBuilder_ == null) { + ensureControlPointsIsMutable(); + controlPoints_.add(builderForValue.build()); + onChanged(); + } else { + controlPointsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
            +         * Optional. The control points used to define the curve. The monotonic
            +         * function (defined through the interpolation_type above) passes through
            +         * the control points listed here.
            +         * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Control.BoostAction.InterpolationBoostSpec.ControlPoint control_points = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addControlPoints( + int index, + com.google.cloud.discoveryengine.v1beta.Control.BoostAction.InterpolationBoostSpec + .ControlPoint.Builder + builderForValue) { + if (controlPointsBuilder_ == null) { + ensureControlPointsIsMutable(); + controlPoints_.add(index, builderForValue.build()); + onChanged(); + } else { + controlPointsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
            +         * Optional. The control points used to define the curve. The monotonic
            +         * function (defined through the interpolation_type above) passes through
            +         * the control points listed here.
            +         * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Control.BoostAction.InterpolationBoostSpec.ControlPoint control_points = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addAllControlPoints( + java.lang.Iterable< + ? extends + com.google.cloud.discoveryengine.v1beta.Control.BoostAction + .InterpolationBoostSpec.ControlPoint> + values) { + if (controlPointsBuilder_ == null) { + ensureControlPointsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, controlPoints_); + onChanged(); + } else { + controlPointsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
            +         * Optional. The control points used to define the curve. The monotonic
            +         * function (defined through the interpolation_type above) passes through
            +         * the control points listed here.
            +         * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Control.BoostAction.InterpolationBoostSpec.ControlPoint control_points = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearControlPoints() { + if (controlPointsBuilder_ == null) { + controlPoints_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + } else { + controlPointsBuilder_.clear(); + } + return this; + } + + /** + * + * + *
            +         * Optional. The control points used to define the curve. The monotonic
            +         * function (defined through the interpolation_type above) passes through
            +         * the control points listed here.
            +         * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Control.BoostAction.InterpolationBoostSpec.ControlPoint control_points = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder removeControlPoints(int index) { + if (controlPointsBuilder_ == null) { + ensureControlPointsIsMutable(); + controlPoints_.remove(index); + onChanged(); + } else { + controlPointsBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
            +         * Optional. The control points used to define the curve. The monotonic
            +         * function (defined through the interpolation_type above) passes through
            +         * the control points listed here.
            +         * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Control.BoostAction.InterpolationBoostSpec.ControlPoint control_points = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.discoveryengine.v1beta.Control.BoostAction.InterpolationBoostSpec + .ControlPoint.Builder + getControlPointsBuilder(int index) { + return internalGetControlPointsFieldBuilder().getBuilder(index); + } + + /** + * + * + *
            +         * Optional. The control points used to define the curve. The monotonic
            +         * function (defined through the interpolation_type above) passes through
            +         * the control points listed here.
            +         * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Control.BoostAction.InterpolationBoostSpec.ControlPoint control_points = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.discoveryengine.v1beta.Control.BoostAction.InterpolationBoostSpec + .ControlPointOrBuilder + getControlPointsOrBuilder(int index) { + if (controlPointsBuilder_ == null) { + return controlPoints_.get(index); + } else { + return controlPointsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
            +         * Optional. The control points used to define the curve. The monotonic
            +         * function (defined through the interpolation_type above) passes through
            +         * the control points listed here.
            +         * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Control.BoostAction.InterpolationBoostSpec.ControlPoint control_points = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List< + ? extends + com.google.cloud.discoveryengine.v1beta.Control.BoostAction + .InterpolationBoostSpec.ControlPointOrBuilder> + getControlPointsOrBuilderList() { + if (controlPointsBuilder_ != null) { + return controlPointsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(controlPoints_); + } + } + + /** + * + * + *
            +         * Optional. The control points used to define the curve. The monotonic
            +         * function (defined through the interpolation_type above) passes through
            +         * the control points listed here.
            +         * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Control.BoostAction.InterpolationBoostSpec.ControlPoint control_points = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.discoveryengine.v1beta.Control.BoostAction.InterpolationBoostSpec + .ControlPoint.Builder + addControlPointsBuilder() { + return internalGetControlPointsFieldBuilder() + .addBuilder( + com.google.cloud.discoveryengine.v1beta.Control.BoostAction.InterpolationBoostSpec + .ControlPoint.getDefaultInstance()); + } + + /** + * + * + *
            +         * Optional. The control points used to define the curve. The monotonic
            +         * function (defined through the interpolation_type above) passes through
            +         * the control points listed here.
            +         * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Control.BoostAction.InterpolationBoostSpec.ControlPoint control_points = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.discoveryengine.v1beta.Control.BoostAction.InterpolationBoostSpec + .ControlPoint.Builder + addControlPointsBuilder(int index) { + return internalGetControlPointsFieldBuilder() + .addBuilder( + index, + com.google.cloud.discoveryengine.v1beta.Control.BoostAction.InterpolationBoostSpec + .ControlPoint.getDefaultInstance()); + } + + /** + * + * + *
            +         * Optional. The control points used to define the curve. The monotonic
            +         * function (defined through the interpolation_type above) passes through
            +         * the control points listed here.
            +         * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Control.BoostAction.InterpolationBoostSpec.ControlPoint control_points = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List< + com.google.cloud.discoveryengine.v1beta.Control.BoostAction.InterpolationBoostSpec + .ControlPoint.Builder> + getControlPointsBuilderList() { + return internalGetControlPointsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.discoveryengine.v1beta.Control.BoostAction.InterpolationBoostSpec + .ControlPoint, + com.google.cloud.discoveryengine.v1beta.Control.BoostAction.InterpolationBoostSpec + .ControlPoint.Builder, + com.google.cloud.discoveryengine.v1beta.Control.BoostAction.InterpolationBoostSpec + .ControlPointOrBuilder> + internalGetControlPointsFieldBuilder() { + if (controlPointsBuilder_ == null) { + controlPointsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.discoveryengine.v1beta.Control.BoostAction + .InterpolationBoostSpec.ControlPoint, + com.google.cloud.discoveryengine.v1beta.Control.BoostAction + .InterpolationBoostSpec.ControlPoint.Builder, + com.google.cloud.discoveryengine.v1beta.Control.BoostAction + .InterpolationBoostSpec.ControlPointOrBuilder>( + controlPoints_, + ((bitField0_ & 0x00000008) != 0), + getParentForChildren(), + isClean()); + controlPoints_ = null; + } + return controlPointsBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.Control.BoostAction.InterpolationBoostSpec) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.Control.BoostAction.InterpolationBoostSpec) + private static final com.google.cloud.discoveryengine.v1beta.Control.BoostAction + .InterpolationBoostSpec + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.discoveryengine.v1beta.Control.BoostAction + .InterpolationBoostSpec(); + } + + public static com.google.cloud.discoveryengine.v1beta.Control.BoostAction + .InterpolationBoostSpec + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public InterpolationBoostSpec parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Control.BoostAction.InterpolationBoostSpec + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int boostSpecCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object boostSpec_; + + public enum BoostSpecCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + FIXED_BOOST(4), + INTERPOLATION_BOOST_SPEC(5), + BOOSTSPEC_NOT_SET(0); + private final int value; + + private BoostSpecCase(int value) { + this.value = value; + } + + /** + * @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 BoostSpecCase valueOf(int value) { + return forNumber(value); + } + + public static BoostSpecCase forNumber(int value) { + switch (value) { + case 4: + return FIXED_BOOST; + case 5: + return INTERPOLATION_BOOST_SPEC; + case 0: + return BOOSTSPEC_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public BoostSpecCase getBoostSpecCase() { + return BoostSpecCase.forNumber(boostSpecCase_); + } + + public static final int FIXED_BOOST_FIELD_NUMBER = 4; + + /** + * + * + *
            +     * Optional. Strength of the boost, which should be in [-1, 1]. Negative
            +     * boost means demotion. Default is 0.0 (No-op).
            +     * 
            + * + * float fixed_boost = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the fixedBoost field is set. + */ + @java.lang.Override + public boolean hasFixedBoost() { + return boostSpecCase_ == 4; + } + + /** + * + * + *
            +     * Optional. Strength of the boost, which should be in [-1, 1]. Negative
            +     * boost means demotion. Default is 0.0 (No-op).
            +     * 
            + * + * float fixed_boost = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The fixedBoost. + */ + @java.lang.Override + public float getFixedBoost() { + if (boostSpecCase_ == 4) { + return (java.lang.Float) boostSpec_; + } + return 0F; + } + + public static final int INTERPOLATION_BOOST_SPEC_FIELD_NUMBER = 5; + + /** + * + * + *
            +     * Optional. Complex specification for custom ranking based on customer
            +     * defined attribute value.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Control.BoostAction.InterpolationBoostSpec interpolation_boost_spec = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the interpolationBoostSpec field is set. + */ + @java.lang.Override + public boolean hasInterpolationBoostSpec() { + return boostSpecCase_ == 5; + } + + /** + * + * + *
            +     * Optional. Complex specification for custom ranking based on customer
            +     * defined attribute value.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Control.BoostAction.InterpolationBoostSpec interpolation_boost_spec = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The interpolationBoostSpec. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Control.BoostAction.InterpolationBoostSpec + getInterpolationBoostSpec() { + if (boostSpecCase_ == 5) { + return (com.google.cloud.discoveryengine.v1beta.Control.BoostAction.InterpolationBoostSpec) + boostSpec_; + } + return com.google.cloud.discoveryengine.v1beta.Control.BoostAction.InterpolationBoostSpec + .getDefaultInstance(); + } + + /** + * + * + *
            +     * Optional. Complex specification for custom ranking based on customer
            +     * defined attribute value.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Control.BoostAction.InterpolationBoostSpec interpolation_boost_spec = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Control.BoostAction + .InterpolationBoostSpecOrBuilder + getInterpolationBoostSpecOrBuilder() { + if (boostSpecCase_ == 5) { + return (com.google.cloud.discoveryengine.v1beta.Control.BoostAction.InterpolationBoostSpec) + boostSpec_; + } + return com.google.cloud.discoveryengine.v1beta.Control.BoostAction.InterpolationBoostSpec + .getDefaultInstance(); + } + + public static final int BOOST_FIELD_NUMBER = 1; + private float boost_ = 0F; + + /** + * + * + *
            +     * Strength of the boost, which should be in [-1, 1]. Negative
            +     * boost means demotion. Default is 0.0 (No-op).
            +     * 
            + * + * float boost = 1 [deprecated = true]; + * + * @deprecated google.cloud.discoveryengine.v1beta.Control.BoostAction.boost is deprecated. See + * google/cloud/discoveryengine/v1beta/control.proto;l=187 + * @return The boost. + */ + @java.lang.Override + @java.lang.Deprecated + public float getBoost() { + return boost_; + } + + public static final int FILTER_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object filter_ = ""; + + /** + * + * + *
            +     * Required. Specifies which products to apply the boost to.
            +     *
            +     * If no filter is provided all products will be boosted (No-op).
            +     * Syntax documentation:
            +     * https://cloud.google.com/retail/docs/filter-and-order
            +     * Maximum length is 5000 characters.
            +     * Otherwise an INVALID ARGUMENT error is thrown.
            +     * 
            + * + * 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. Specifies which products to apply the boost to.
            +     *
            +     * If no filter is provided all products will be boosted (No-op).
            +     * Syntax documentation:
            +     * https://cloud.google.com/retail/docs/filter-and-order
            +     * Maximum length is 5000 characters.
            +     * Otherwise an INVALID ARGUMENT error is thrown.
            +     * 
            + * + * 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 DATA_STORE_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object dataStore_ = ""; + + /** + * + * + *
            +     * Required. Specifies which data store's documents can be boosted by this
            +     * control. Full data store name e.g.
            +     * projects/123/locations/global/collections/default_collection/dataStores/default_data_store
            +     * 
            + * + * + * string data_store = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The dataStore. + */ + @java.lang.Override + public java.lang.String getDataStore() { + java.lang.Object ref = dataStore_; + 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(); + dataStore_ = s; + return s; + } + } + + /** + * + * + *
            +     * Required. Specifies which data store's documents can be boosted by this
            +     * control. Full data store name e.g.
            +     * projects/123/locations/global/collections/default_collection/dataStores/default_data_store
            +     * 
            + * + * + * string data_store = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for dataStore. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDataStoreBytes() { + java.lang.Object ref = dataStore_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + dataStore_ = 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 { + if (java.lang.Float.floatToRawIntBits(boost_) != 0) { + output.writeFloat(1, boost_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(filter_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, filter_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(dataStore_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, dataStore_); + } + if (boostSpecCase_ == 4) { + output.writeFloat(4, (float) ((java.lang.Float) boostSpec_)); + } + if (boostSpecCase_ == 5) { + output.writeMessage( + 5, + (com.google.cloud.discoveryengine.v1beta.Control.BoostAction.InterpolationBoostSpec) + boostSpec_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (java.lang.Float.floatToRawIntBits(boost_) != 0) { + size += com.google.protobuf.CodedOutputStream.computeFloatSize(1, boost_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(filter_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, filter_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(dataStore_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, dataStore_); + } + if (boostSpecCase_ == 4) { + size += + com.google.protobuf.CodedOutputStream.computeFloatSize( + 4, (float) ((java.lang.Float) boostSpec_)); + } + if (boostSpecCase_ == 5) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 5, + (com.google.cloud.discoveryengine.v1beta.Control.BoostAction.InterpolationBoostSpec) + boostSpec_); + } + 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.discoveryengine.v1beta.Control.BoostAction)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1beta.Control.BoostAction other = + (com.google.cloud.discoveryengine.v1beta.Control.BoostAction) obj; + + if (java.lang.Float.floatToIntBits(getBoost()) + != java.lang.Float.floatToIntBits(other.getBoost())) return false; + if (!getFilter().equals(other.getFilter())) return false; + if (!getDataStore().equals(other.getDataStore())) return false; + if (!getBoostSpecCase().equals(other.getBoostSpecCase())) return false; + switch (boostSpecCase_) { + case 4: + if (java.lang.Float.floatToIntBits(getFixedBoost()) + != java.lang.Float.floatToIntBits(other.getFixedBoost())) return false; + break; + case 5: + if (!getInterpolationBoostSpec().equals(other.getInterpolationBoostSpec())) return false; + break; + case 0: + default: + } + 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) + BOOST_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits(getBoost()); + hash = (37 * hash) + FILTER_FIELD_NUMBER; + hash = (53 * hash) + getFilter().hashCode(); + hash = (37 * hash) + DATA_STORE_FIELD_NUMBER; + hash = (53 * hash) + getDataStore().hashCode(); + switch (boostSpecCase_) { + case 4: + hash = (37 * hash) + FIXED_BOOST_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits(getFixedBoost()); + break; + case 5: + hash = (37 * hash) + INTERPOLATION_BOOST_SPEC_FIELD_NUMBER; + hash = (53 * hash) + getInterpolationBoostSpec().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1beta.Control.BoostAction parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.Control.BoostAction 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.discoveryengine.v1beta.Control.BoostAction parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.Control.BoostAction 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.discoveryengine.v1beta.Control.BoostAction parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.Control.BoostAction parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1beta.Control.BoostAction parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.Control.BoostAction 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.discoveryengine.v1beta.Control.BoostAction parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.Control.BoostAction 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.discoveryengine.v1beta.Control.BoostAction parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.Control.BoostAction 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.discoveryengine.v1beta.Control.BoostAction 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; + } + + /** + * + * + *
            +     * Adjusts order of products in returned list.
            +     * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.Control.BoostAction} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.Control.BoostAction) + com.google.cloud.discoveryengine.v1beta.Control.BoostActionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.ControlProto + .internal_static_google_cloud_discoveryengine_v1beta_Control_BoostAction_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.ControlProto + .internal_static_google_cloud_discoveryengine_v1beta_Control_BoostAction_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.Control.BoostAction.class, + com.google.cloud.discoveryengine.v1beta.Control.BoostAction.Builder.class); + } + + // Construct using com.google.cloud.discoveryengine.v1beta.Control.BoostAction.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (interpolationBoostSpecBuilder_ != null) { + interpolationBoostSpecBuilder_.clear(); + } + boost_ = 0F; + filter_ = ""; + dataStore_ = ""; + boostSpecCase_ = 0; + boostSpec_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1beta.ControlProto + .internal_static_google_cloud_discoveryengine_v1beta_Control_BoostAction_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Control.BoostAction + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1beta.Control.BoostAction.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Control.BoostAction build() { + com.google.cloud.discoveryengine.v1beta.Control.BoostAction result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Control.BoostAction buildPartial() { + com.google.cloud.discoveryengine.v1beta.Control.BoostAction result = + new com.google.cloud.discoveryengine.v1beta.Control.BoostAction(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.discoveryengine.v1beta.Control.BoostAction result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.boost_ = boost_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.filter_ = filter_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.dataStore_ = dataStore_; + } + } + + private void buildPartialOneofs( + com.google.cloud.discoveryengine.v1beta.Control.BoostAction result) { + result.boostSpecCase_ = boostSpecCase_; + result.boostSpec_ = this.boostSpec_; + if (boostSpecCase_ == 5 && interpolationBoostSpecBuilder_ != null) { + result.boostSpec_ = interpolationBoostSpecBuilder_.build(); + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.discoveryengine.v1beta.Control.BoostAction) { + return mergeFrom((com.google.cloud.discoveryengine.v1beta.Control.BoostAction) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.discoveryengine.v1beta.Control.BoostAction other) { + if (other + == com.google.cloud.discoveryengine.v1beta.Control.BoostAction.getDefaultInstance()) + return this; + if (java.lang.Float.floatToRawIntBits(other.getBoost()) != 0) { + setBoost(other.getBoost()); + } + if (!other.getFilter().isEmpty()) { + filter_ = other.filter_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (!other.getDataStore().isEmpty()) { + dataStore_ = other.dataStore_; + bitField0_ |= 0x00000010; + onChanged(); + } + switch (other.getBoostSpecCase()) { + case FIXED_BOOST: + { + setFixedBoost(other.getFixedBoost()); + break; + } + case INTERPOLATION_BOOST_SPEC: + { + mergeInterpolationBoostSpec(other.getInterpolationBoostSpec()); + break; + } + case BOOSTSPEC_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 13: + { + boost_ = input.readFloat(); + bitField0_ |= 0x00000004; + break; + } // case 13 + case 18: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 18 + case 26: + { + dataStore_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 26 + case 37: + { + boostSpec_ = input.readFloat(); + boostSpecCase_ = 4; + break; + } // case 37 + case 42: + { + input.readMessage( + internalGetInterpolationBoostSpecFieldBuilder().getBuilder(), + extensionRegistry); + boostSpecCase_ = 5; + break; + } // case 42 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int boostSpecCase_ = 0; + private java.lang.Object boostSpec_; + + public BoostSpecCase getBoostSpecCase() { + return BoostSpecCase.forNumber(boostSpecCase_); + } + + public Builder clearBoostSpec() { + boostSpecCase_ = 0; + boostSpec_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + /** + * + * + *
            +       * Optional. Strength of the boost, which should be in [-1, 1]. Negative
            +       * boost means demotion. Default is 0.0 (No-op).
            +       * 
            + * + * float fixed_boost = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the fixedBoost field is set. + */ + public boolean hasFixedBoost() { + return boostSpecCase_ == 4; + } + + /** + * + * + *
            +       * Optional. Strength of the boost, which should be in [-1, 1]. Negative
            +       * boost means demotion. Default is 0.0 (No-op).
            +       * 
            + * + * float fixed_boost = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The fixedBoost. + */ + public float getFixedBoost() { + if (boostSpecCase_ == 4) { + return (java.lang.Float) boostSpec_; + } + return 0F; + } + + /** + * + * + *
            +       * Optional. Strength of the boost, which should be in [-1, 1]. Negative
            +       * boost means demotion. Default is 0.0 (No-op).
            +       * 
            + * + * float fixed_boost = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The fixedBoost to set. + * @return This builder for chaining. + */ + public Builder setFixedBoost(float value) { + + boostSpecCase_ = 4; + boostSpec_ = value; + onChanged(); + return this; + } + + /** + * + * + *
            +       * Optional. Strength of the boost, which should be in [-1, 1]. Negative
            +       * boost means demotion. Default is 0.0 (No-op).
            +       * 
            + * + * float fixed_boost = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearFixedBoost() { + if (boostSpecCase_ == 4) { + boostSpecCase_ = 0; + boostSpec_ = null; + onChanged(); + } + return this; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.Control.BoostAction.InterpolationBoostSpec, + com.google.cloud.discoveryengine.v1beta.Control.BoostAction.InterpolationBoostSpec + .Builder, + com.google.cloud.discoveryengine.v1beta.Control.BoostAction + .InterpolationBoostSpecOrBuilder> + interpolationBoostSpecBuilder_; + + /** + * + * + *
            +       * Optional. Complex specification for custom ranking based on customer
            +       * defined attribute value.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Control.BoostAction.InterpolationBoostSpec interpolation_boost_spec = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the interpolationBoostSpec field is set. + */ + @java.lang.Override + public boolean hasInterpolationBoostSpec() { + return boostSpecCase_ == 5; + } + + /** + * + * + *
            +       * Optional. Complex specification for custom ranking based on customer
            +       * defined attribute value.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Control.BoostAction.InterpolationBoostSpec interpolation_boost_spec = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The interpolationBoostSpec. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Control.BoostAction.InterpolationBoostSpec + getInterpolationBoostSpec() { + if (interpolationBoostSpecBuilder_ == null) { + if (boostSpecCase_ == 5) { + return (com.google.cloud.discoveryengine.v1beta.Control.BoostAction + .InterpolationBoostSpec) + boostSpec_; + } + return com.google.cloud.discoveryengine.v1beta.Control.BoostAction.InterpolationBoostSpec + .getDefaultInstance(); + } else { + if (boostSpecCase_ == 5) { + return interpolationBoostSpecBuilder_.getMessage(); + } + return com.google.cloud.discoveryengine.v1beta.Control.BoostAction.InterpolationBoostSpec + .getDefaultInstance(); + } + } + + /** + * + * + *
            +       * Optional. Complex specification for custom ranking based on customer
            +       * defined attribute value.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Control.BoostAction.InterpolationBoostSpec interpolation_boost_spec = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setInterpolationBoostSpec( + com.google.cloud.discoveryengine.v1beta.Control.BoostAction.InterpolationBoostSpec + value) { + if (interpolationBoostSpecBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + boostSpec_ = value; + onChanged(); + } else { + interpolationBoostSpecBuilder_.setMessage(value); + } + boostSpecCase_ = 5; + return this; + } + + /** + * + * + *
            +       * Optional. Complex specification for custom ranking based on customer
            +       * defined attribute value.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Control.BoostAction.InterpolationBoostSpec interpolation_boost_spec = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setInterpolationBoostSpec( + com.google.cloud.discoveryengine.v1beta.Control.BoostAction.InterpolationBoostSpec.Builder + builderForValue) { + if (interpolationBoostSpecBuilder_ == null) { + boostSpec_ = builderForValue.build(); + onChanged(); + } else { + interpolationBoostSpecBuilder_.setMessage(builderForValue.build()); + } + boostSpecCase_ = 5; + return this; + } + + /** + * + * + *
            +       * Optional. Complex specification for custom ranking based on customer
            +       * defined attribute value.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Control.BoostAction.InterpolationBoostSpec interpolation_boost_spec = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeInterpolationBoostSpec( + com.google.cloud.discoveryengine.v1beta.Control.BoostAction.InterpolationBoostSpec + value) { + if (interpolationBoostSpecBuilder_ == null) { + if (boostSpecCase_ == 5 + && boostSpec_ + != com.google.cloud.discoveryengine.v1beta.Control.BoostAction + .InterpolationBoostSpec.getDefaultInstance()) { + boostSpec_ = + com.google.cloud.discoveryengine.v1beta.Control.BoostAction.InterpolationBoostSpec + .newBuilder( + (com.google.cloud.discoveryengine.v1beta.Control.BoostAction + .InterpolationBoostSpec) + boostSpec_) + .mergeFrom(value) + .buildPartial(); + } else { + boostSpec_ = value; + } + onChanged(); + } else { + if (boostSpecCase_ == 5) { + interpolationBoostSpecBuilder_.mergeFrom(value); + } else { + interpolationBoostSpecBuilder_.setMessage(value); + } + } + boostSpecCase_ = 5; + return this; + } + + /** + * + * + *
            +       * Optional. Complex specification for custom ranking based on customer
            +       * defined attribute value.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Control.BoostAction.InterpolationBoostSpec interpolation_boost_spec = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearInterpolationBoostSpec() { + if (interpolationBoostSpecBuilder_ == null) { + if (boostSpecCase_ == 5) { + boostSpecCase_ = 0; + boostSpec_ = null; + onChanged(); + } + } else { + if (boostSpecCase_ == 5) { + boostSpecCase_ = 0; + boostSpec_ = null; + } + interpolationBoostSpecBuilder_.clear(); + } + return this; + } + + /** + * + * + *
            +       * Optional. Complex specification for custom ranking based on customer
            +       * defined attribute value.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Control.BoostAction.InterpolationBoostSpec interpolation_boost_spec = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.discoveryengine.v1beta.Control.BoostAction.InterpolationBoostSpec + .Builder + getInterpolationBoostSpecBuilder() { + return internalGetInterpolationBoostSpecFieldBuilder().getBuilder(); + } + + /** + * + * + *
            +       * Optional. Complex specification for custom ranking based on customer
            +       * defined attribute value.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Control.BoostAction.InterpolationBoostSpec interpolation_boost_spec = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Control.BoostAction + .InterpolationBoostSpecOrBuilder + getInterpolationBoostSpecOrBuilder() { + if ((boostSpecCase_ == 5) && (interpolationBoostSpecBuilder_ != null)) { + return interpolationBoostSpecBuilder_.getMessageOrBuilder(); + } else { + if (boostSpecCase_ == 5) { + return (com.google.cloud.discoveryengine.v1beta.Control.BoostAction + .InterpolationBoostSpec) + boostSpec_; + } + return com.google.cloud.discoveryengine.v1beta.Control.BoostAction.InterpolationBoostSpec + .getDefaultInstance(); + } + } + + /** + * + * + *
            +       * Optional. Complex specification for custom ranking based on customer
            +       * defined attribute value.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Control.BoostAction.InterpolationBoostSpec interpolation_boost_spec = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.Control.BoostAction.InterpolationBoostSpec, + com.google.cloud.discoveryengine.v1beta.Control.BoostAction.InterpolationBoostSpec + .Builder, + com.google.cloud.discoveryengine.v1beta.Control.BoostAction + .InterpolationBoostSpecOrBuilder> + internalGetInterpolationBoostSpecFieldBuilder() { + if (interpolationBoostSpecBuilder_ == null) { + if (!(boostSpecCase_ == 5)) { + boostSpec_ = + com.google.cloud.discoveryengine.v1beta.Control.BoostAction.InterpolationBoostSpec + .getDefaultInstance(); + } + interpolationBoostSpecBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.Control.BoostAction + .InterpolationBoostSpec, + com.google.cloud.discoveryengine.v1beta.Control.BoostAction.InterpolationBoostSpec + .Builder, + com.google.cloud.discoveryengine.v1beta.Control.BoostAction + .InterpolationBoostSpecOrBuilder>( + (com.google.cloud.discoveryengine.v1beta.Control.BoostAction + .InterpolationBoostSpec) + boostSpec_, + getParentForChildren(), + isClean()); + boostSpec_ = null; + } + boostSpecCase_ = 5; + onChanged(); + return interpolationBoostSpecBuilder_; + } + + private float boost_; + + /** + * + * + *
            +       * Strength of the boost, which should be in [-1, 1]. Negative
            +       * boost means demotion. Default is 0.0 (No-op).
            +       * 
            + * + * float boost = 1 [deprecated = true]; + * + * @deprecated google.cloud.discoveryengine.v1beta.Control.BoostAction.boost is deprecated. + * See google/cloud/discoveryengine/v1beta/control.proto;l=187 + * @return The boost. + */ + @java.lang.Override + @java.lang.Deprecated + public float getBoost() { + return boost_; + } + + /** + * + * + *
            +       * Strength of the boost, which should be in [-1, 1]. Negative
            +       * boost means demotion. Default is 0.0 (No-op).
            +       * 
            + * + * float boost = 1 [deprecated = true]; + * + * @deprecated google.cloud.discoveryengine.v1beta.Control.BoostAction.boost is deprecated. + * See google/cloud/discoveryengine/v1beta/control.proto;l=187 + * @param value The boost to set. + * @return This builder for chaining. + */ + @java.lang.Deprecated + public Builder setBoost(float value) { + + boost_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
            +       * Strength of the boost, which should be in [-1, 1]. Negative
            +       * boost means demotion. Default is 0.0 (No-op).
            +       * 
            + * + * float boost = 1 [deprecated = true]; + * + * @deprecated google.cloud.discoveryengine.v1beta.Control.BoostAction.boost is deprecated. + * See google/cloud/discoveryengine/v1beta/control.proto;l=187 + * @return This builder for chaining. + */ + @java.lang.Deprecated + public Builder clearBoost() { + bitField0_ = (bitField0_ & ~0x00000004); + boost_ = 0F; + onChanged(); + return this; + } + + private java.lang.Object filter_ = ""; + + /** + * + * + *
            +       * Required. Specifies which products to apply the boost to.
            +       *
            +       * If no filter is provided all products will be boosted (No-op).
            +       * Syntax documentation:
            +       * https://cloud.google.com/retail/docs/filter-and-order
            +       * Maximum length is 5000 characters.
            +       * Otherwise an INVALID ARGUMENT error is thrown.
            +       * 
            + * + * 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. Specifies which products to apply the boost to.
            +       *
            +       * If no filter is provided all products will be boosted (No-op).
            +       * Syntax documentation:
            +       * https://cloud.google.com/retail/docs/filter-and-order
            +       * Maximum length is 5000 characters.
            +       * Otherwise an INVALID ARGUMENT error is thrown.
            +       * 
            + * + * 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. Specifies which products to apply the boost to.
            +       *
            +       * If no filter is provided all products will be boosted (No-op).
            +       * Syntax documentation:
            +       * https://cloud.google.com/retail/docs/filter-and-order
            +       * Maximum length is 5000 characters.
            +       * Otherwise an INVALID ARGUMENT error is thrown.
            +       * 
            + * + * 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_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
            +       * Required. Specifies which products to apply the boost to.
            +       *
            +       * If no filter is provided all products will be boosted (No-op).
            +       * Syntax documentation:
            +       * https://cloud.google.com/retail/docs/filter-and-order
            +       * Maximum length is 5000 characters.
            +       * Otherwise an INVALID ARGUMENT error is thrown.
            +       * 
            + * + * string filter = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearFilter() { + filter_ = getDefaultInstance().getFilter(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + + /** + * + * + *
            +       * Required. Specifies which products to apply the boost to.
            +       *
            +       * If no filter is provided all products will be boosted (No-op).
            +       * Syntax documentation:
            +       * https://cloud.google.com/retail/docs/filter-and-order
            +       * Maximum length is 5000 characters.
            +       * Otherwise an INVALID ARGUMENT error is thrown.
            +       * 
            + * + * 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_ |= 0x00000008; + onChanged(); + return this; + } + + private java.lang.Object dataStore_ = ""; + + /** + * + * + *
            +       * Required. Specifies which data store's documents can be boosted by this
            +       * control. Full data store name e.g.
            +       * projects/123/locations/global/collections/default_collection/dataStores/default_data_store
            +       * 
            + * + * + * string data_store = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The dataStore. + */ + public java.lang.String getDataStore() { + java.lang.Object ref = dataStore_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + dataStore_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
            +       * Required. Specifies which data store's documents can be boosted by this
            +       * control. Full data store name e.g.
            +       * projects/123/locations/global/collections/default_collection/dataStores/default_data_store
            +       * 
            + * + * + * string data_store = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for dataStore. + */ + public com.google.protobuf.ByteString getDataStoreBytes() { + java.lang.Object ref = dataStore_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + dataStore_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
            +       * Required. Specifies which data store's documents can be boosted by this
            +       * control. Full data store name e.g.
            +       * projects/123/locations/global/collections/default_collection/dataStores/default_data_store
            +       * 
            + * + * + * string data_store = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The dataStore to set. + * @return This builder for chaining. + */ + public Builder setDataStore(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + dataStore_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
            +       * Required. Specifies which data store's documents can be boosted by this
            +       * control. Full data store name e.g.
            +       * projects/123/locations/global/collections/default_collection/dataStores/default_data_store
            +       * 
            + * + * + * string data_store = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearDataStore() { + dataStore_ = getDefaultInstance().getDataStore(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + + /** + * + * + *
            +       * Required. Specifies which data store's documents can be boosted by this
            +       * control. Full data store name e.g.
            +       * projects/123/locations/global/collections/default_collection/dataStores/default_data_store
            +       * 
            + * + * + * string data_store = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for dataStore to set. + * @return This builder for chaining. + */ + public Builder setDataStoreBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + dataStore_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.Control.BoostAction) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.Control.BoostAction) + private static final com.google.cloud.discoveryengine.v1beta.Control.BoostAction + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.discoveryengine.v1beta.Control.BoostAction(); + } + + public static com.google.cloud.discoveryengine.v1beta.Control.BoostAction getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BoostAction parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Control.BoostAction getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface FilterActionOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.Control.FilterAction) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
            +     * Required. A filter to apply on the matching condition results.
                  *
            -     * If no filter is provided all products will be boosted (No-op).
            +     * Required
                  * Syntax documentation:
                  * https://cloud.google.com/retail/docs/filter-and-order
            -     * Maximum length is 5000 characters.
            -     * Otherwise an INVALID ARGUMENT error is thrown.
            +     * Maximum length is 5000 characters. Otherwise an INVALID
            +     * ARGUMENT error is thrown.
                  * 
            * - * string filter = 2 [(.google.api.field_behavior) = REQUIRED]; + * string filter = 1 [(.google.api.field_behavior) = REQUIRED]; * * @return The filter. */ @@ -120,16 +4999,16 @@ public interface BoostActionOrBuilder * * *
            -     * Required. Specifies which products to apply the boost to.
            +     * Required. A filter to apply on the matching condition results.
                  *
            -     * If no filter is provided all products will be boosted (No-op).
            +     * Required
                  * Syntax documentation:
                  * https://cloud.google.com/retail/docs/filter-and-order
            -     * Maximum length is 5000 characters.
            -     * Otherwise an INVALID ARGUMENT error is thrown.
            +     * Maximum length is 5000 characters. Otherwise an INVALID
            +     * ARGUMENT error is thrown.
                  * 
            * - * string filter = 2 [(.google.api.field_behavior) = REQUIRED]; + * string filter = 1 [(.google.api.field_behavior) = REQUIRED]; * * @return The bytes for filter. */ @@ -139,13 +5018,13 @@ public interface BoostActionOrBuilder * * *
            -     * Required. Specifies which data store's documents can be boosted by this
            +     * Required. Specifies which data store's documents can be filtered by this
                  * control. Full data store name e.g.
                  * projects/123/locations/global/collections/default_collection/dataStores/default_data_store
                  * 
            * * - * string data_store = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * string data_store = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } * * * @return The dataStore. @@ -156,13 +5035,13 @@ public interface BoostActionOrBuilder * * *
            -     * Required. Specifies which data store's documents can be boosted by this
            +     * Required. Specifies which data store's documents can be filtered by this
                  * control. Full data store name e.g.
                  * projects/123/locations/global/collections/default_collection/dataStores/default_data_store
                  * 
            * * - * string data_store = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * string data_store = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } * * * @return The bytes for dataStore. @@ -174,15 +5053,16 @@ public interface BoostActionOrBuilder * * *
            -   * Adjusts order of products in returned list.
            +   * Specified which products may be included in results.
            +   * Uses same filter as boost.
                * 
            * - * Protobuf type {@code google.cloud.discoveryengine.v1beta.Control.BoostAction} + * Protobuf type {@code google.cloud.discoveryengine.v1beta.Control.FilterAction} */ - public static final class BoostAction extends com.google.protobuf.GeneratedMessage + public static final class FilterAction extends com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.Control.BoostAction) - BoostActionOrBuilder { + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.Control.FilterAction) + FilterActionOrBuilder { private static final long serialVersionUID = 0L; static { @@ -192,55 +5072,35 @@ public static final class BoostAction extends com.google.protobuf.GeneratedMessa /* minor= */ 33, /* patch= */ 2, /* suffix= */ "", - "BoostAction"); + "FilterAction"); } - // Use BoostAction.newBuilder() to construct. - private BoostAction(com.google.protobuf.GeneratedMessage.Builder builder) { + // Use FilterAction.newBuilder() to construct. + private FilterAction(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } - private BoostAction() { + private FilterAction() { filter_ = ""; dataStore_ = ""; } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.discoveryengine.v1beta.ControlProto - .internal_static_google_cloud_discoveryengine_v1beta_Control_BoostAction_descriptor; + .internal_static_google_cloud_discoveryengine_v1beta_Control_FilterAction_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.discoveryengine.v1beta.ControlProto - .internal_static_google_cloud_discoveryengine_v1beta_Control_BoostAction_fieldAccessorTable + .internal_static_google_cloud_discoveryengine_v1beta_Control_FilterAction_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.discoveryengine.v1beta.Control.BoostAction.class, - com.google.cloud.discoveryengine.v1beta.Control.BoostAction.Builder.class); - } - - public static final int BOOST_FIELD_NUMBER = 1; - private float boost_ = 0F; - - /** - * - * - *
            -     * Required. Strength of the boost, which should be in [-1, 1]. Negative
            -     * boost means demotion. Default is 0.0 (No-op).
            -     * 
            - * - * float boost = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The boost. - */ - @java.lang.Override - public float getBoost() { - return boost_; + com.google.cloud.discoveryengine.v1beta.Control.FilterAction.class, + com.google.cloud.discoveryengine.v1beta.Control.FilterAction.Builder.class); } - public static final int FILTER_FIELD_NUMBER = 2; + public static final int FILTER_FIELD_NUMBER = 1; @SuppressWarnings("serial") private volatile java.lang.Object filter_ = ""; @@ -249,16 +5109,16 @@ public float getBoost() { * * *
            -     * Required. Specifies which products to apply the boost to.
            +     * Required. A filter to apply on the matching condition results.
                  *
            -     * If no filter is provided all products will be boosted (No-op).
            +     * Required
                  * Syntax documentation:
                  * https://cloud.google.com/retail/docs/filter-and-order
            -     * Maximum length is 5000 characters.
            -     * Otherwise an INVALID ARGUMENT error is thrown.
            +     * Maximum length is 5000 characters. Otherwise an INVALID
            +     * ARGUMENT error is thrown.
                  * 
            * - * string filter = 2 [(.google.api.field_behavior) = REQUIRED]; + * string filter = 1 [(.google.api.field_behavior) = REQUIRED]; * * @return The filter. */ @@ -279,16 +5139,16 @@ public java.lang.String getFilter() { * * *
            -     * Required. Specifies which products to apply the boost to.
            +     * Required. A filter to apply on the matching condition results.
                  *
            -     * If no filter is provided all products will be boosted (No-op).
            +     * Required
                  * Syntax documentation:
                  * https://cloud.google.com/retail/docs/filter-and-order
            -     * Maximum length is 5000 characters.
            -     * Otherwise an INVALID ARGUMENT error is thrown.
            +     * Maximum length is 5000 characters. Otherwise an INVALID
            +     * ARGUMENT error is thrown.
                  * 
            * - * string filter = 2 [(.google.api.field_behavior) = REQUIRED]; + * string filter = 1 [(.google.api.field_behavior) = REQUIRED]; * * @return The bytes for filter. */ @@ -305,7 +5165,7 @@ public com.google.protobuf.ByteString getFilterBytes() { } } - public static final int DATA_STORE_FIELD_NUMBER = 3; + public static final int DATA_STORE_FIELD_NUMBER = 2; @SuppressWarnings("serial") private volatile java.lang.Object dataStore_ = ""; @@ -314,13 +5174,13 @@ public com.google.protobuf.ByteString getFilterBytes() { * * *
            -     * Required. Specifies which data store's documents can be boosted by this
            +     * Required. Specifies which data store's documents can be filtered by this
                  * control. Full data store name e.g.
                  * projects/123/locations/global/collections/default_collection/dataStores/default_data_store
                  * 
            * * - * string data_store = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * string data_store = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } * * * @return The dataStore. @@ -342,13 +5202,13 @@ public java.lang.String getDataStore() { * * *
            -     * Required. Specifies which data store's documents can be boosted by this
            +     * Required. Specifies which data store's documents can be filtered by this
                  * control. Full data store name e.g.
                  * projects/123/locations/global/collections/default_collection/dataStores/default_data_store
                  * 
            * * - * string data_store = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * string data_store = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } * * * @return The bytes for dataStore. @@ -380,14 +5240,11 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (java.lang.Float.floatToRawIntBits(boost_) != 0) { - output.writeFloat(1, boost_); - } if (!com.google.protobuf.GeneratedMessage.isStringEmpty(filter_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 2, filter_); + com.google.protobuf.GeneratedMessage.writeString(output, 1, filter_); } if (!com.google.protobuf.GeneratedMessage.isStringEmpty(dataStore_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 3, dataStore_); + com.google.protobuf.GeneratedMessage.writeString(output, 2, dataStore_); } getUnknownFields().writeTo(output); } @@ -398,14 +5255,11 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (java.lang.Float.floatToRawIntBits(boost_) != 0) { - size += com.google.protobuf.CodedOutputStream.computeFloatSize(1, boost_); - } if (!com.google.protobuf.GeneratedMessage.isStringEmpty(filter_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(2, filter_); + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, filter_); } if (!com.google.protobuf.GeneratedMessage.isStringEmpty(dataStore_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(3, dataStore_); + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, dataStore_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -417,14 +5271,12 @@ public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } - if (!(obj instanceof com.google.cloud.discoveryengine.v1beta.Control.BoostAction)) { + if (!(obj instanceof com.google.cloud.discoveryengine.v1beta.Control.FilterAction)) { return super.equals(obj); } - com.google.cloud.discoveryengine.v1beta.Control.BoostAction other = - (com.google.cloud.discoveryengine.v1beta.Control.BoostAction) obj; + com.google.cloud.discoveryengine.v1beta.Control.FilterAction other = + (com.google.cloud.discoveryengine.v1beta.Control.FilterAction) obj; - if (java.lang.Float.floatToIntBits(getBoost()) - != java.lang.Float.floatToIntBits(other.getBoost())) return false; if (!getFilter().equals(other.getFilter())) return false; if (!getDataStore().equals(other.getDataStore())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; @@ -438,8 +5290,6 @@ public int hashCode() { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + BOOST_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits(getBoost()); hash = (37 * hash) + FILTER_FIELD_NUMBER; hash = (53 * hash) + getFilter().hashCode(); hash = (37 * hash) + DATA_STORE_FIELD_NUMBER; @@ -449,71 +5299,71 @@ public int hashCode() { return hash; } - public static com.google.cloud.discoveryengine.v1beta.Control.BoostAction parseFrom( + public static com.google.cloud.discoveryengine.v1beta.Control.FilterAction parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.discoveryengine.v1beta.Control.BoostAction parseFrom( + public static com.google.cloud.discoveryengine.v1beta.Control.FilterAction 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.discoveryengine.v1beta.Control.BoostAction parseFrom( + public static com.google.cloud.discoveryengine.v1beta.Control.FilterAction parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.discoveryengine.v1beta.Control.BoostAction parseFrom( + public static com.google.cloud.discoveryengine.v1beta.Control.FilterAction 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.discoveryengine.v1beta.Control.BoostAction parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { + public static com.google.cloud.discoveryengine.v1beta.Control.FilterAction parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.discoveryengine.v1beta.Control.BoostAction parseFrom( + public static com.google.cloud.discoveryengine.v1beta.Control.FilterAction parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.discoveryengine.v1beta.Control.BoostAction parseFrom( + public static com.google.cloud.discoveryengine.v1beta.Control.FilterAction parseFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } - public static com.google.cloud.discoveryengine.v1beta.Control.BoostAction parseFrom( + public static com.google.cloud.discoveryengine.v1beta.Control.FilterAction 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.discoveryengine.v1beta.Control.BoostAction parseDelimitedFrom( + public static com.google.cloud.discoveryengine.v1beta.Control.FilterAction parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } - public static com.google.cloud.discoveryengine.v1beta.Control.BoostAction parseDelimitedFrom( + public static com.google.cloud.discoveryengine.v1beta.Control.FilterAction 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.discoveryengine.v1beta.Control.BoostAction parseFrom( + public static com.google.cloud.discoveryengine.v1beta.Control.FilterAction parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } - public static com.google.cloud.discoveryengine.v1beta.Control.BoostAction parseFrom( + public static com.google.cloud.discoveryengine.v1beta.Control.FilterAction parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -531,7 +5381,7 @@ public static Builder newBuilder() { } public static Builder newBuilder( - com.google.cloud.discoveryengine.v1beta.Control.BoostAction prototype) { + com.google.cloud.discoveryengine.v1beta.Control.FilterAction prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @@ -550,31 +5400,32 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.Builder * * *
            -     * Adjusts order of products in returned list.
            +     * Specified which products may be included in results.
            +     * Uses same filter as boost.
                  * 
            * - * Protobuf type {@code google.cloud.discoveryengine.v1beta.Control.BoostAction} + * Protobuf type {@code google.cloud.discoveryengine.v1beta.Control.FilterAction} */ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.Control.BoostAction) - com.google.cloud.discoveryengine.v1beta.Control.BoostActionOrBuilder { + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.Control.FilterAction) + com.google.cloud.discoveryengine.v1beta.Control.FilterActionOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.discoveryengine.v1beta.ControlProto - .internal_static_google_cloud_discoveryengine_v1beta_Control_BoostAction_descriptor; + .internal_static_google_cloud_discoveryengine_v1beta_Control_FilterAction_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.discoveryengine.v1beta.ControlProto - .internal_static_google_cloud_discoveryengine_v1beta_Control_BoostAction_fieldAccessorTable + .internal_static_google_cloud_discoveryengine_v1beta_Control_FilterAction_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.discoveryengine.v1beta.Control.BoostAction.class, - com.google.cloud.discoveryengine.v1beta.Control.BoostAction.Builder.class); + com.google.cloud.discoveryengine.v1beta.Control.FilterAction.class, + com.google.cloud.discoveryengine.v1beta.Control.FilterAction.Builder.class); } - // Construct using com.google.cloud.discoveryengine.v1beta.Control.BoostAction.newBuilder() + // Construct using com.google.cloud.discoveryengine.v1beta.Control.FilterAction.newBuilder() private Builder() {} private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { @@ -585,7 +5436,6 @@ private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { public Builder clear() { super.clear(); bitField0_ = 0; - boost_ = 0F; filter_ = ""; dataStore_ = ""; return this; @@ -594,18 +5444,18 @@ public Builder clear() { @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.cloud.discoveryengine.v1beta.ControlProto - .internal_static_google_cloud_discoveryengine_v1beta_Control_BoostAction_descriptor; + .internal_static_google_cloud_discoveryengine_v1beta_Control_FilterAction_descriptor; } @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.Control.BoostAction + public com.google.cloud.discoveryengine.v1beta.Control.FilterAction getDefaultInstanceForType() { - return com.google.cloud.discoveryengine.v1beta.Control.BoostAction.getDefaultInstance(); + return com.google.cloud.discoveryengine.v1beta.Control.FilterAction.getDefaultInstance(); } @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.Control.BoostAction build() { - com.google.cloud.discoveryengine.v1beta.Control.BoostAction result = buildPartial(); + public com.google.cloud.discoveryengine.v1beta.Control.FilterAction build() { + com.google.cloud.discoveryengine.v1beta.Control.FilterAction result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } @@ -613,9 +5463,9 @@ public com.google.cloud.discoveryengine.v1beta.Control.BoostAction build() { } @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.Control.BoostAction buildPartial() { - com.google.cloud.discoveryengine.v1beta.Control.BoostAction result = - new com.google.cloud.discoveryengine.v1beta.Control.BoostAction(this); + public com.google.cloud.discoveryengine.v1beta.Control.FilterAction buildPartial() { + com.google.cloud.discoveryengine.v1beta.Control.FilterAction result = + new com.google.cloud.discoveryengine.v1beta.Control.FilterAction(this); if (bitField0_ != 0) { buildPartial0(result); } @@ -624,44 +5474,38 @@ public com.google.cloud.discoveryengine.v1beta.Control.BoostAction buildPartial( } private void buildPartial0( - com.google.cloud.discoveryengine.v1beta.Control.BoostAction result) { + com.google.cloud.discoveryengine.v1beta.Control.FilterAction result) { int from_bitField0_ = bitField0_; if (((from_bitField0_ & 0x00000001) != 0)) { - result.boost_ = boost_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { result.filter_ = filter_; } - if (((from_bitField0_ & 0x00000004) != 0)) { + if (((from_bitField0_ & 0x00000002) != 0)) { result.dataStore_ = dataStore_; } } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.discoveryengine.v1beta.Control.BoostAction) { - return mergeFrom((com.google.cloud.discoveryengine.v1beta.Control.BoostAction) other); + if (other instanceof com.google.cloud.discoveryengine.v1beta.Control.FilterAction) { + return mergeFrom((com.google.cloud.discoveryengine.v1beta.Control.FilterAction) other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(com.google.cloud.discoveryengine.v1beta.Control.BoostAction other) { + public Builder mergeFrom(com.google.cloud.discoveryengine.v1beta.Control.FilterAction other) { if (other - == com.google.cloud.discoveryengine.v1beta.Control.BoostAction.getDefaultInstance()) + == com.google.cloud.discoveryengine.v1beta.Control.FilterAction.getDefaultInstance()) return this; - if (java.lang.Float.floatToRawIntBits(other.getBoost()) != 0) { - setBoost(other.getBoost()); - } if (!other.getFilter().isEmpty()) { filter_ = other.filter_; - bitField0_ |= 0x00000002; + bitField0_ |= 0x00000001; onChanged(); } if (!other.getDataStore().isEmpty()) { dataStore_ = other.dataStore_; - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000002; onChanged(); } this.mergeUnknownFields(other.getUnknownFields()); @@ -690,24 +5534,18 @@ public Builder mergeFrom( case 0: done = true; break; - case 13: + case 10: { - boost_ = input.readFloat(); + filter_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000001; break; - } // case 13 + } // case 10 case 18: { - filter_ = input.readStringRequireUtf8(); + dataStore_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000002; break; } // case 18 - case 26: - { - dataStore_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - break; - } // case 26 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -727,81 +5565,22 @@ public Builder mergeFrom( private int bitField0_; - private float boost_; - - /** - * - * - *
            -       * Required. Strength of the boost, which should be in [-1, 1]. Negative
            -       * boost means demotion. Default is 0.0 (No-op).
            -       * 
            - * - * float boost = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The boost. - */ - @java.lang.Override - public float getBoost() { - return boost_; - } - - /** - * - * - *
            -       * Required. Strength of the boost, which should be in [-1, 1]. Negative
            -       * boost means demotion. Default is 0.0 (No-op).
            -       * 
            - * - * float boost = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The boost to set. - * @return This builder for chaining. - */ - public Builder setBoost(float value) { - - boost_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - /** - * - * - *
            -       * Required. Strength of the boost, which should be in [-1, 1]. Negative
            -       * boost means demotion. Default is 0.0 (No-op).
            -       * 
            - * - * float boost = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return This builder for chaining. - */ - public Builder clearBoost() { - bitField0_ = (bitField0_ & ~0x00000001); - boost_ = 0F; - onChanged(); - return this; - } - private java.lang.Object filter_ = ""; /** * * *
            -       * Required. Specifies which products to apply the boost to.
            +       * Required. A filter to apply on the matching condition results.
                    *
            -       * If no filter is provided all products will be boosted (No-op).
            +       * Required
                    * Syntax documentation:
                    * https://cloud.google.com/retail/docs/filter-and-order
            -       * Maximum length is 5000 characters.
            -       * Otherwise an INVALID ARGUMENT error is thrown.
            +       * Maximum length is 5000 characters. Otherwise an INVALID
            +       * ARGUMENT error is thrown.
                    * 
            * - * string filter = 2 [(.google.api.field_behavior) = REQUIRED]; + * string filter = 1 [(.google.api.field_behavior) = REQUIRED]; * * @return The filter. */ @@ -821,16 +5600,16 @@ public java.lang.String getFilter() { * * *
            -       * Required. Specifies which products to apply the boost to.
            +       * Required. A filter to apply on the matching condition results.
                    *
            -       * If no filter is provided all products will be boosted (No-op).
            +       * Required
                    * Syntax documentation:
                    * https://cloud.google.com/retail/docs/filter-and-order
            -       * Maximum length is 5000 characters.
            -       * Otherwise an INVALID ARGUMENT error is thrown.
            +       * Maximum length is 5000 characters. Otherwise an INVALID
            +       * ARGUMENT error is thrown.
                    * 
            * - * string filter = 2 [(.google.api.field_behavior) = REQUIRED]; + * string filter = 1 [(.google.api.field_behavior) = REQUIRED]; * * @return The bytes for filter. */ @@ -850,16 +5629,16 @@ public com.google.protobuf.ByteString getFilterBytes() { * * *
            -       * Required. Specifies which products to apply the boost to.
            +       * Required. A filter to apply on the matching condition results.
                    *
            -       * If no filter is provided all products will be boosted (No-op).
            +       * Required
                    * Syntax documentation:
                    * https://cloud.google.com/retail/docs/filter-and-order
            -       * Maximum length is 5000 characters.
            -       * Otherwise an INVALID ARGUMENT error is thrown.
            +       * Maximum length is 5000 characters. Otherwise an INVALID
            +       * ARGUMENT error is thrown.
                    * 
            * - * string filter = 2 [(.google.api.field_behavior) = REQUIRED]; + * string filter = 1 [(.google.api.field_behavior) = REQUIRED]; * * @param value The filter to set. * @return This builder for chaining. @@ -869,7 +5648,7 @@ public Builder setFilter(java.lang.String value) { throw new NullPointerException(); } filter_ = value; - bitField0_ |= 0x00000002; + bitField0_ |= 0x00000001; onChanged(); return this; } @@ -878,22 +5657,22 @@ public Builder setFilter(java.lang.String value) { * * *
            -       * Required. Specifies which products to apply the boost to.
            +       * Required. A filter to apply on the matching condition results.
                    *
            -       * If no filter is provided all products will be boosted (No-op).
            +       * Required
                    * Syntax documentation:
                    * https://cloud.google.com/retail/docs/filter-and-order
            -       * Maximum length is 5000 characters.
            -       * Otherwise an INVALID ARGUMENT error is thrown.
            +       * Maximum length is 5000 characters. Otherwise an INVALID
            +       * ARGUMENT error is thrown.
                    * 
            * - * string filter = 2 [(.google.api.field_behavior) = REQUIRED]; + * string filter = 1 [(.google.api.field_behavior) = REQUIRED]; * * @return This builder for chaining. */ public Builder clearFilter() { filter_ = getDefaultInstance().getFilter(); - bitField0_ = (bitField0_ & ~0x00000002); + bitField0_ = (bitField0_ & ~0x00000001); onChanged(); return this; } @@ -902,16 +5681,16 @@ public Builder clearFilter() { * * *
            -       * Required. Specifies which products to apply the boost to.
            +       * Required. A filter to apply on the matching condition results.
                    *
            -       * If no filter is provided all products will be boosted (No-op).
            +       * Required
                    * Syntax documentation:
                    * https://cloud.google.com/retail/docs/filter-and-order
            -       * Maximum length is 5000 characters.
            -       * Otherwise an INVALID ARGUMENT error is thrown.
            +       * Maximum length is 5000 characters. Otherwise an INVALID
            +       * ARGUMENT error is thrown.
                    * 
            * - * string filter = 2 [(.google.api.field_behavior) = REQUIRED]; + * string filter = 1 [(.google.api.field_behavior) = REQUIRED]; * * @param value The bytes for filter to set. * @return This builder for chaining. @@ -922,7 +5701,7 @@ public Builder setFilterBytes(com.google.protobuf.ByteString value) { } checkByteStringIsUtf8(value); filter_ = value; - bitField0_ |= 0x00000002; + bitField0_ |= 0x00000001; onChanged(); return this; } @@ -933,13 +5712,13 @@ public Builder setFilterBytes(com.google.protobuf.ByteString value) { * * *
            -       * Required. Specifies which data store's documents can be boosted by this
            +       * Required. Specifies which data store's documents can be filtered by this
                    * control. Full data store name e.g.
                    * projects/123/locations/global/collections/default_collection/dataStores/default_data_store
                    * 
            * * - * string data_store = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * string data_store = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } * * * @return The dataStore. @@ -960,13 +5739,13 @@ public java.lang.String getDataStore() { * * *
            -       * Required. Specifies which data store's documents can be boosted by this
            +       * Required. Specifies which data store's documents can be filtered by this
                    * control. Full data store name e.g.
                    * projects/123/locations/global/collections/default_collection/dataStores/default_data_store
                    * 
            * * - * string data_store = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * string data_store = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } * * * @return The bytes for dataStore. @@ -987,13 +5766,13 @@ public com.google.protobuf.ByteString getDataStoreBytes() { * * *
            -       * Required. Specifies which data store's documents can be boosted by this
            +       * Required. Specifies which data store's documents can be filtered by this
                    * control. Full data store name e.g.
                    * projects/123/locations/global/collections/default_collection/dataStores/default_data_store
                    * 
            * * - * string data_store = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * string data_store = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } * * * @param value The dataStore to set. @@ -1004,7 +5783,7 @@ public Builder setDataStore(java.lang.String value) { throw new NullPointerException(); } dataStore_ = value; - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000002; onChanged(); return this; } @@ -1013,20 +5792,20 @@ public Builder setDataStore(java.lang.String value) { * * *
            -       * Required. Specifies which data store's documents can be boosted by this
            +       * Required. Specifies which data store's documents can be filtered by this
                    * control. Full data store name e.g.
                    * projects/123/locations/global/collections/default_collection/dataStores/default_data_store
                    * 
            * * - * string data_store = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * string data_store = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } * * * @return This builder for chaining. */ public Builder clearDataStore() { dataStore_ = getDefaultInstance().getDataStore(); - bitField0_ = (bitField0_ & ~0x00000004); + bitField0_ = (bitField0_ & ~0x00000002); onChanged(); return this; } @@ -1035,13 +5814,13 @@ public Builder clearDataStore() { * * *
            -       * Required. Specifies which data store's documents can be boosted by this
            +       * Required. Specifies which data store's documents can be filtered by this
                    * control. Full data store name e.g.
                    * projects/123/locations/global/collections/default_collection/dataStores/default_data_store
                    * 
            * * - * string data_store = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * string data_store = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } * * * @param value The bytes for dataStore to set. @@ -1053,30 +5832,31 @@ public Builder setDataStoreBytes(com.google.protobuf.ByteString value) { } checkByteStringIsUtf8(value); dataStore_ = value; - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000002; onChanged(); return this; } - // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.Control.BoostAction) + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.Control.FilterAction) } - // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.Control.BoostAction) - private static final com.google.cloud.discoveryengine.v1beta.Control.BoostAction + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.Control.FilterAction) + private static final com.google.cloud.discoveryengine.v1beta.Control.FilterAction DEFAULT_INSTANCE; static { - DEFAULT_INSTANCE = new com.google.cloud.discoveryengine.v1beta.Control.BoostAction(); + DEFAULT_INSTANCE = new com.google.cloud.discoveryengine.v1beta.Control.FilterAction(); } - public static com.google.cloud.discoveryengine.v1beta.Control.BoostAction getDefaultInstance() { + public static com.google.cloud.discoveryengine.v1beta.Control.FilterAction + getDefaultInstance() { return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { @java.lang.Override - public BoostAction parsePartialFrom( + public FilterAction parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { @@ -1096,113 +5876,75 @@ public BoostAction parsePartialFrom( } }; - public static com.google.protobuf.Parser parser() { + public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override - public com.google.protobuf.Parser getParserForType() { + public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.Control.BoostAction getDefaultInstanceForType() { + public com.google.cloud.discoveryengine.v1beta.Control.FilterAction + getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } - public interface FilterActionOrBuilder + public interface RedirectActionOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.Control.FilterAction) + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.Control.RedirectAction) com.google.protobuf.MessageOrBuilder { /** * * *
            -     * Required. A filter to apply on the matching condition results.
            -     *
            -     * Required
            -     * Syntax documentation:
            -     * https://cloud.google.com/retail/docs/filter-and-order
            -     * Maximum length is 5000 characters. Otherwise an INVALID
            -     * ARGUMENT error is thrown.
            -     * 
            - * - * string filter = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The filter. - */ - java.lang.String getFilter(); - - /** - * - * - *
            -     * Required. A filter to apply on the matching condition results.
            -     *
            -     * Required
            -     * Syntax documentation:
            -     * https://cloud.google.com/retail/docs/filter-and-order
            -     * Maximum length is 5000 characters. Otherwise an INVALID
            -     * ARGUMENT error is thrown.
            -     * 
            - * - * string filter = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for filter. - */ - com.google.protobuf.ByteString getFilterBytes(); - - /** - * + * Required. The URI to which the shopper will be redirected. * - *
            -     * Required. Specifies which data store's documents can be filtered by this
            -     * control. Full data store name e.g.
            -     * projects/123/locations/global/collections/default_collection/dataStores/default_data_store
            +     * Required.
            +     * URI must have length equal or less than 2000 characters.
            +     * Otherwise an INVALID ARGUMENT error is thrown.
                  * 
            * - * - * string data_store = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * + * string redirect_uri = 1 [(.google.api.field_behavior) = REQUIRED]; * - * @return The dataStore. + * @return The redirectUri. */ - java.lang.String getDataStore(); + java.lang.String getRedirectUri(); /** * * *
            -     * Required. Specifies which data store's documents can be filtered by this
            -     * control. Full data store name e.g.
            -     * projects/123/locations/global/collections/default_collection/dataStores/default_data_store
            +     * Required. The URI to which the shopper will be redirected.
            +     *
            +     * Required.
            +     * URI must have length equal or less than 2000 characters.
            +     * Otherwise an INVALID ARGUMENT error is thrown.
                  * 
            * - * - * string data_store = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * + * string redirect_uri = 1 [(.google.api.field_behavior) = REQUIRED]; * - * @return The bytes for dataStore. + * @return The bytes for redirectUri. */ - com.google.protobuf.ByteString getDataStoreBytes(); + com.google.protobuf.ByteString getRedirectUriBytes(); } /** * * *
            -   * Specified which products may be included in results.
            -   * Uses same filter as boost.
            +   * Redirects a shopper to the provided URI.
                * 
            * - * Protobuf type {@code google.cloud.discoveryengine.v1beta.Control.FilterAction} + * Protobuf type {@code google.cloud.discoveryengine.v1beta.Control.RedirectAction} */ - public static final class FilterAction extends com.google.protobuf.GeneratedMessage + public static final class RedirectAction extends com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.Control.FilterAction) - FilterActionOrBuilder { + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.Control.RedirectAction) + RedirectActionOrBuilder { private static final long serialVersionUID = 0L; static { @@ -1212,65 +5954,62 @@ public static final class FilterAction extends com.google.protobuf.GeneratedMess /* minor= */ 33, /* patch= */ 2, /* suffix= */ "", - "FilterAction"); + "RedirectAction"); } - // Use FilterAction.newBuilder() to construct. - private FilterAction(com.google.protobuf.GeneratedMessage.Builder builder) { + // Use RedirectAction.newBuilder() to construct. + private RedirectAction(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } - private FilterAction() { - filter_ = ""; - dataStore_ = ""; + private RedirectAction() { + redirectUri_ = ""; } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.discoveryengine.v1beta.ControlProto - .internal_static_google_cloud_discoveryengine_v1beta_Control_FilterAction_descriptor; + .internal_static_google_cloud_discoveryengine_v1beta_Control_RedirectAction_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.discoveryengine.v1beta.ControlProto - .internal_static_google_cloud_discoveryengine_v1beta_Control_FilterAction_fieldAccessorTable + .internal_static_google_cloud_discoveryengine_v1beta_Control_RedirectAction_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.discoveryengine.v1beta.Control.FilterAction.class, - com.google.cloud.discoveryengine.v1beta.Control.FilterAction.Builder.class); + com.google.cloud.discoveryengine.v1beta.Control.RedirectAction.class, + com.google.cloud.discoveryengine.v1beta.Control.RedirectAction.Builder.class); } - public static final int FILTER_FIELD_NUMBER = 1; + public static final int REDIRECT_URI_FIELD_NUMBER = 1; @SuppressWarnings("serial") - private volatile java.lang.Object filter_ = ""; + private volatile java.lang.Object redirectUri_ = ""; /** * * *
            -     * Required. A filter to apply on the matching condition results.
            +     * Required. The URI to which the shopper will be redirected.
                  *
            -     * Required
            -     * Syntax documentation:
            -     * https://cloud.google.com/retail/docs/filter-and-order
            -     * Maximum length is 5000 characters. Otherwise an INVALID
            -     * ARGUMENT error is thrown.
            +     * Required.
            +     * URI must have length equal or less than 2000 characters.
            +     * Otherwise an INVALID ARGUMENT error is thrown.
                  * 
            * - * string filter = 1 [(.google.api.field_behavior) = REQUIRED]; + * string redirect_uri = 1 [(.google.api.field_behavior) = REQUIRED]; * - * @return The filter. + * @return The redirectUri. */ @java.lang.Override - public java.lang.String getFilter() { - java.lang.Object ref = filter_; + public java.lang.String getRedirectUri() { + java.lang.Object ref = redirectUri_; 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; + redirectUri_ = s; return s; } } @@ -1279,87 +6018,24 @@ public java.lang.String getFilter() { * * *
            -     * Required. A filter to apply on the matching condition results.
            -     *
            -     * Required
            -     * Syntax documentation:
            -     * https://cloud.google.com/retail/docs/filter-and-order
            -     * Maximum length is 5000 characters. Otherwise an INVALID
            -     * ARGUMENT error is thrown.
            -     * 
            - * - * string filter = 1 [(.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 DATA_STORE_FIELD_NUMBER = 2; - - @SuppressWarnings("serial") - private volatile java.lang.Object dataStore_ = ""; - - /** - * - * - *
            -     * Required. Specifies which data store's documents can be filtered by this
            -     * control. Full data store name e.g.
            -     * projects/123/locations/global/collections/default_collection/dataStores/default_data_store
            -     * 
            - * - * - * string data_store = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The dataStore. - */ - @java.lang.Override - public java.lang.String getDataStore() { - java.lang.Object ref = dataStore_; - 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(); - dataStore_ = s; - return s; - } - } - - /** - * + * Required. The URI to which the shopper will be redirected. * - *
            -     * Required. Specifies which data store's documents can be filtered by this
            -     * control. Full data store name e.g.
            -     * projects/123/locations/global/collections/default_collection/dataStores/default_data_store
            +     * Required.
            +     * URI must have length equal or less than 2000 characters.
            +     * Otherwise an INVALID ARGUMENT error is thrown.
                  * 
            * - * - * string data_store = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * + * string redirect_uri = 1 [(.google.api.field_behavior) = REQUIRED]; * - * @return The bytes for dataStore. + * @return The bytes for redirectUri. */ @java.lang.Override - public com.google.protobuf.ByteString getDataStoreBytes() { - java.lang.Object ref = dataStore_; + public com.google.protobuf.ByteString getRedirectUriBytes() { + java.lang.Object ref = redirectUri_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - dataStore_ = b; + redirectUri_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; @@ -1380,11 +6056,8 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(filter_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, filter_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(dataStore_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 2, dataStore_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(redirectUri_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, redirectUri_); } getUnknownFields().writeTo(output); } @@ -1395,11 +6068,8 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(filter_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, filter_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(dataStore_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(2, dataStore_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(redirectUri_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, redirectUri_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -1411,14 +6081,13 @@ public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } - if (!(obj instanceof com.google.cloud.discoveryengine.v1beta.Control.FilterAction)) { + if (!(obj instanceof com.google.cloud.discoveryengine.v1beta.Control.RedirectAction)) { return super.equals(obj); } - com.google.cloud.discoveryengine.v1beta.Control.FilterAction other = - (com.google.cloud.discoveryengine.v1beta.Control.FilterAction) obj; + com.google.cloud.discoveryengine.v1beta.Control.RedirectAction other = + (com.google.cloud.discoveryengine.v1beta.Control.RedirectAction) obj; - if (!getFilter().equals(other.getFilter())) return false; - if (!getDataStore().equals(other.getDataStore())) return false; + if (!getRedirectUri().equals(other.getRedirectUri())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1430,80 +6099,78 @@ public int hashCode() { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + FILTER_FIELD_NUMBER; - hash = (53 * hash) + getFilter().hashCode(); - hash = (37 * hash) + DATA_STORE_FIELD_NUMBER; - hash = (53 * hash) + getDataStore().hashCode(); + hash = (37 * hash) + REDIRECT_URI_FIELD_NUMBER; + hash = (53 * hash) + getRedirectUri().hashCode(); hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } - public static com.google.cloud.discoveryengine.v1beta.Control.FilterAction parseFrom( + public static com.google.cloud.discoveryengine.v1beta.Control.RedirectAction parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.discoveryengine.v1beta.Control.FilterAction parseFrom( + public static com.google.cloud.discoveryengine.v1beta.Control.RedirectAction 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.discoveryengine.v1beta.Control.FilterAction parseFrom( + public static com.google.cloud.discoveryengine.v1beta.Control.RedirectAction parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.discoveryengine.v1beta.Control.FilterAction parseFrom( + public static com.google.cloud.discoveryengine.v1beta.Control.RedirectAction 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.discoveryengine.v1beta.Control.FilterAction parseFrom( + public static com.google.cloud.discoveryengine.v1beta.Control.RedirectAction parseFrom( byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.discoveryengine.v1beta.Control.FilterAction parseFrom( + public static com.google.cloud.discoveryengine.v1beta.Control.RedirectAction parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.discoveryengine.v1beta.Control.FilterAction parseFrom( + public static com.google.cloud.discoveryengine.v1beta.Control.RedirectAction parseFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } - public static com.google.cloud.discoveryengine.v1beta.Control.FilterAction parseFrom( + public static com.google.cloud.discoveryengine.v1beta.Control.RedirectAction 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.discoveryengine.v1beta.Control.FilterAction parseDelimitedFrom( + public static com.google.cloud.discoveryengine.v1beta.Control.RedirectAction parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } - public static com.google.cloud.discoveryengine.v1beta.Control.FilterAction parseDelimitedFrom( + public static com.google.cloud.discoveryengine.v1beta.Control.RedirectAction 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.discoveryengine.v1beta.Control.FilterAction parseFrom( + public static com.google.cloud.discoveryengine.v1beta.Control.RedirectAction parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } - public static com.google.cloud.discoveryengine.v1beta.Control.FilterAction parseFrom( + public static com.google.cloud.discoveryengine.v1beta.Control.RedirectAction parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -1521,7 +6188,7 @@ public static Builder newBuilder() { } public static Builder newBuilder( - com.google.cloud.discoveryengine.v1beta.Control.FilterAction prototype) { + com.google.cloud.discoveryengine.v1beta.Control.RedirectAction prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @@ -1540,32 +6207,31 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.Builder * * *
            -     * Specified which products may be included in results.
            -     * Uses same filter as boost.
            +     * Redirects a shopper to the provided URI.
                  * 
            * - * Protobuf type {@code google.cloud.discoveryengine.v1beta.Control.FilterAction} + * Protobuf type {@code google.cloud.discoveryengine.v1beta.Control.RedirectAction} */ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.Control.FilterAction) - com.google.cloud.discoveryengine.v1beta.Control.FilterActionOrBuilder { + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.Control.RedirectAction) + com.google.cloud.discoveryengine.v1beta.Control.RedirectActionOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.discoveryengine.v1beta.ControlProto - .internal_static_google_cloud_discoveryengine_v1beta_Control_FilterAction_descriptor; + .internal_static_google_cloud_discoveryengine_v1beta_Control_RedirectAction_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.discoveryengine.v1beta.ControlProto - .internal_static_google_cloud_discoveryengine_v1beta_Control_FilterAction_fieldAccessorTable + .internal_static_google_cloud_discoveryengine_v1beta_Control_RedirectAction_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.discoveryengine.v1beta.Control.FilterAction.class, - com.google.cloud.discoveryengine.v1beta.Control.FilterAction.Builder.class); + com.google.cloud.discoveryengine.v1beta.Control.RedirectAction.class, + com.google.cloud.discoveryengine.v1beta.Control.RedirectAction.Builder.class); } - // Construct using com.google.cloud.discoveryengine.v1beta.Control.FilterAction.newBuilder() + // Construct using com.google.cloud.discoveryengine.v1beta.Control.RedirectAction.newBuilder() private Builder() {} private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { @@ -1576,26 +6242,25 @@ private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { public Builder clear() { super.clear(); bitField0_ = 0; - filter_ = ""; - dataStore_ = ""; + redirectUri_ = ""; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.cloud.discoveryengine.v1beta.ControlProto - .internal_static_google_cloud_discoveryengine_v1beta_Control_FilterAction_descriptor; + .internal_static_google_cloud_discoveryengine_v1beta_Control_RedirectAction_descriptor; } @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.Control.FilterAction + public com.google.cloud.discoveryengine.v1beta.Control.RedirectAction getDefaultInstanceForType() { - return com.google.cloud.discoveryengine.v1beta.Control.FilterAction.getDefaultInstance(); + return com.google.cloud.discoveryengine.v1beta.Control.RedirectAction.getDefaultInstance(); } @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.Control.FilterAction build() { - com.google.cloud.discoveryengine.v1beta.Control.FilterAction result = buildPartial(); + public com.google.cloud.discoveryengine.v1beta.Control.RedirectAction build() { + com.google.cloud.discoveryengine.v1beta.Control.RedirectAction result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } @@ -1603,9 +6268,9 @@ public com.google.cloud.discoveryengine.v1beta.Control.FilterAction build() { } @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.Control.FilterAction buildPartial() { - com.google.cloud.discoveryengine.v1beta.Control.FilterAction result = - new com.google.cloud.discoveryengine.v1beta.Control.FilterAction(this); + public com.google.cloud.discoveryengine.v1beta.Control.RedirectAction buildPartial() { + com.google.cloud.discoveryengine.v1beta.Control.RedirectAction result = + new com.google.cloud.discoveryengine.v1beta.Control.RedirectAction(this); if (bitField0_ != 0) { buildPartial0(result); } @@ -1614,40 +6279,33 @@ public com.google.cloud.discoveryengine.v1beta.Control.FilterAction buildPartial } private void buildPartial0( - com.google.cloud.discoveryengine.v1beta.Control.FilterAction result) { + com.google.cloud.discoveryengine.v1beta.Control.RedirectAction result) { int from_bitField0_ = bitField0_; if (((from_bitField0_ & 0x00000001) != 0)) { - result.filter_ = filter_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.dataStore_ = dataStore_; + result.redirectUri_ = redirectUri_; } } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.discoveryengine.v1beta.Control.FilterAction) { - return mergeFrom((com.google.cloud.discoveryengine.v1beta.Control.FilterAction) other); + if (other instanceof com.google.cloud.discoveryengine.v1beta.Control.RedirectAction) { + return mergeFrom((com.google.cloud.discoveryengine.v1beta.Control.RedirectAction) other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(com.google.cloud.discoveryengine.v1beta.Control.FilterAction other) { + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1beta.Control.RedirectAction other) { if (other - == com.google.cloud.discoveryengine.v1beta.Control.FilterAction.getDefaultInstance()) + == com.google.cloud.discoveryengine.v1beta.Control.RedirectAction.getDefaultInstance()) return this; - if (!other.getFilter().isEmpty()) { - filter_ = other.filter_; + if (!other.getRedirectUri().isEmpty()) { + redirectUri_ = other.redirectUri_; bitField0_ |= 0x00000001; onChanged(); } - if (!other.getDataStore().isEmpty()) { - dataStore_ = other.dataStore_; - bitField0_ |= 0x00000002; - onChanged(); - } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -1676,16 +6334,10 @@ public Builder mergeFrom( break; case 10: { - filter_ = input.readStringRequireUtf8(); + redirectUri_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000001; break; } // case 10 - case 18: - { - dataStore_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 18 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -1705,31 +6357,29 @@ public Builder mergeFrom( private int bitField0_; - private java.lang.Object filter_ = ""; + private java.lang.Object redirectUri_ = ""; /** * * *
            -       * Required. A filter to apply on the matching condition results.
            +       * Required. The URI to which the shopper will be redirected.
                    *
            -       * Required
            -       * Syntax documentation:
            -       * https://cloud.google.com/retail/docs/filter-and-order
            -       * Maximum length is 5000 characters. Otherwise an INVALID
            -       * ARGUMENT error is thrown.
            +       * Required.
            +       * URI must have length equal or less than 2000 characters.
            +       * Otherwise an INVALID ARGUMENT error is thrown.
                    * 
            * - * string filter = 1 [(.google.api.field_behavior) = REQUIRED]; + * string redirect_uri = 1 [(.google.api.field_behavior) = REQUIRED]; * - * @return The filter. + * @return The redirectUri. */ - public java.lang.String getFilter() { - java.lang.Object ref = filter_; + public java.lang.String getRedirectUri() { + java.lang.Object ref = redirectUri_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); - filter_ = s; + redirectUri_ = s; return s; } else { return (java.lang.String) ref; @@ -1740,25 +6390,23 @@ public java.lang.String getFilter() { * * *
            -       * Required. A filter to apply on the matching condition results.
            +       * Required. The URI to which the shopper will be redirected.
                    *
            -       * Required
            -       * Syntax documentation:
            -       * https://cloud.google.com/retail/docs/filter-and-order
            -       * Maximum length is 5000 characters. Otherwise an INVALID
            -       * ARGUMENT error is thrown.
            +       * Required.
            +       * URI must have length equal or less than 2000 characters.
            +       * Otherwise an INVALID ARGUMENT error is thrown.
                    * 
            * - * string filter = 1 [(.google.api.field_behavior) = REQUIRED]; + * string redirect_uri = 1 [(.google.api.field_behavior) = REQUIRED]; * - * @return The bytes for filter. + * @return The bytes for redirectUri. */ - public com.google.protobuf.ByteString getFilterBytes() { - java.lang.Object ref = filter_; + public com.google.protobuf.ByteString getRedirectUriBytes() { + java.lang.Object ref = redirectUri_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - filter_ = b; + redirectUri_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; @@ -1769,25 +6417,23 @@ public com.google.protobuf.ByteString getFilterBytes() { * * *
            -       * Required. A filter to apply on the matching condition results.
            +       * Required. The URI to which the shopper will be redirected.
                    *
            -       * Required
            -       * Syntax documentation:
            -       * https://cloud.google.com/retail/docs/filter-and-order
            -       * Maximum length is 5000 characters. Otherwise an INVALID
            -       * ARGUMENT error is thrown.
            +       * Required.
            +       * URI must have length equal or less than 2000 characters.
            +       * Otherwise an INVALID ARGUMENT error is thrown.
                    * 
            * - * string filter = 1 [(.google.api.field_behavior) = REQUIRED]; + * string redirect_uri = 1 [(.google.api.field_behavior) = REQUIRED]; * - * @param value The filter to set. + * @param value The redirectUri to set. * @return This builder for chaining. */ - public Builder setFilter(java.lang.String value) { + public Builder setRedirectUri(java.lang.String value) { if (value == null) { throw new NullPointerException(); } - filter_ = value; + redirectUri_ = value; bitField0_ |= 0x00000001; onChanged(); return this; @@ -1797,21 +6443,19 @@ public Builder setFilter(java.lang.String value) { * * *
            -       * Required. A filter to apply on the matching condition results.
            +       * Required. The URI to which the shopper will be redirected.
                    *
            -       * Required
            -       * Syntax documentation:
            -       * https://cloud.google.com/retail/docs/filter-and-order
            -       * Maximum length is 5000 characters. Otherwise an INVALID
            -       * ARGUMENT error is thrown.
            +       * Required.
            +       * URI must have length equal or less than 2000 characters.
            +       * Otherwise an INVALID ARGUMENT error is thrown.
                    * 
            * - * string filter = 1 [(.google.api.field_behavior) = REQUIRED]; + * string redirect_uri = 1 [(.google.api.field_behavior) = REQUIRED]; * * @return This builder for chaining. */ - public Builder clearFilter() { - filter_ = getDefaultInstance().getFilter(); + public Builder clearRedirectUri() { + redirectUri_ = getDefaultInstance().getRedirectUri(); bitField0_ = (bitField0_ & ~0x00000001); onChanged(); return this; @@ -1821,182 +6465,49 @@ public Builder clearFilter() { * * *
            -       * Required. A filter to apply on the matching condition results.
            +       * Required. The URI to which the shopper will be redirected.
                    *
            -       * Required
            -       * Syntax documentation:
            -       * https://cloud.google.com/retail/docs/filter-and-order
            -       * Maximum length is 5000 characters. Otherwise an INVALID
            -       * ARGUMENT error is thrown.
            +       * Required.
            +       * URI must have length equal or less than 2000 characters.
            +       * Otherwise an INVALID ARGUMENT error is thrown.
                    * 
            * - * string filter = 1 [(.google.api.field_behavior) = REQUIRED]; + * string redirect_uri = 1 [(.google.api.field_behavior) = REQUIRED]; * - * @param value The bytes for filter to set. + * @param value The bytes for redirectUri to set. * @return This builder for chaining. */ - public Builder setFilterBytes(com.google.protobuf.ByteString value) { + public Builder setRedirectUriBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); - filter_ = value; + redirectUri_ = value; bitField0_ |= 0x00000001; onChanged(); return this; } - private java.lang.Object dataStore_ = ""; - - /** - * - * - *
            -       * Required. Specifies which data store's documents can be filtered by this
            -       * control. Full data store name e.g.
            -       * projects/123/locations/global/collections/default_collection/dataStores/default_data_store
            -       * 
            - * - * - * string data_store = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The dataStore. - */ - public java.lang.String getDataStore() { - java.lang.Object ref = dataStore_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - dataStore_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - - /** - * - * - *
            -       * Required. Specifies which data store's documents can be filtered by this
            -       * control. Full data store name e.g.
            -       * projects/123/locations/global/collections/default_collection/dataStores/default_data_store
            -       * 
            - * - * - * string data_store = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for dataStore. - */ - public com.google.protobuf.ByteString getDataStoreBytes() { - java.lang.Object ref = dataStore_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - dataStore_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - /** - * - * - *
            -       * Required. Specifies which data store's documents can be filtered by this
            -       * control. Full data store name e.g.
            -       * projects/123/locations/global/collections/default_collection/dataStores/default_data_store
            -       * 
            - * - * - * string data_store = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The dataStore to set. - * @return This builder for chaining. - */ - public Builder setDataStore(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - dataStore_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - /** - * - * - *
            -       * Required. Specifies which data store's documents can be filtered by this
            -       * control. Full data store name e.g.
            -       * projects/123/locations/global/collections/default_collection/dataStores/default_data_store
            -       * 
            - * - * - * string data_store = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return This builder for chaining. - */ - public Builder clearDataStore() { - dataStore_ = getDefaultInstance().getDataStore(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - - /** - * - * - *
            -       * Required. Specifies which data store's documents can be filtered by this
            -       * control. Full data store name e.g.
            -       * projects/123/locations/global/collections/default_collection/dataStores/default_data_store
            -       * 
            - * - * - * string data_store = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The bytes for dataStore to set. - * @return This builder for chaining. - */ - public Builder setDataStoreBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - dataStore_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.Control.FilterAction) + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.Control.RedirectAction) } - // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.Control.FilterAction) - private static final com.google.cloud.discoveryengine.v1beta.Control.FilterAction + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.Control.RedirectAction) + private static final com.google.cloud.discoveryengine.v1beta.Control.RedirectAction DEFAULT_INSTANCE; static { - DEFAULT_INSTANCE = new com.google.cloud.discoveryengine.v1beta.Control.FilterAction(); + DEFAULT_INSTANCE = new com.google.cloud.discoveryengine.v1beta.Control.RedirectAction(); } - public static com.google.cloud.discoveryengine.v1beta.Control.FilterAction + public static com.google.cloud.discoveryengine.v1beta.Control.RedirectAction getDefaultInstance() { return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { @java.lang.Override - public FilterAction parsePartialFrom( + public RedirectAction parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { @@ -2016,75 +6527,110 @@ public FilterAction parsePartialFrom( } }; - public static com.google.protobuf.Parser parser() { + public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override - public com.google.protobuf.Parser getParserForType() { + public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.Control.FilterAction + public com.google.cloud.discoveryengine.v1beta.Control.RedirectAction getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } - public interface RedirectActionOrBuilder + public interface SynonymsActionOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.Control.RedirectAction) + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.Control.SynonymsAction) com.google.protobuf.MessageOrBuilder { /** * * *
            -     * Required. The URI to which the shopper will be redirected.
            +     * Defines a set of synonyms.
            +     * Can specify up to 100 synonyms.
            +     * Must specify at least 2 synonyms. Otherwise an INVALID ARGUMENT error is
            +     * thrown.
            +     * 
            * - * Required. - * URI must have length equal or less than 2000 characters. - * Otherwise an INVALID ARGUMENT error is thrown. + * repeated string synonyms = 1; + * + * @return A list containing the synonyms. + */ + java.util.List getSynonymsList(); + + /** + * + * + *
            +     * Defines a set of synonyms.
            +     * Can specify up to 100 synonyms.
            +     * Must specify at least 2 synonyms. Otherwise an INVALID ARGUMENT error is
            +     * thrown.
                  * 
            * - * string redirect_uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * repeated string synonyms = 1; * - * @return The redirectUri. + * @return The count of synonyms. */ - java.lang.String getRedirectUri(); + int getSynonymsCount(); /** * * *
            -     * Required. The URI to which the shopper will be redirected.
            +     * Defines a set of synonyms.
            +     * Can specify up to 100 synonyms.
            +     * Must specify at least 2 synonyms. Otherwise an INVALID ARGUMENT error is
            +     * thrown.
            +     * 
            * - * Required. - * URI must have length equal or less than 2000 characters. - * Otherwise an INVALID ARGUMENT error is thrown. + * repeated string synonyms = 1; + * + * @param index The index of the element to return. + * @return The synonyms at the given index. + */ + java.lang.String getSynonyms(int index); + + /** + * + * + *
            +     * Defines a set of synonyms.
            +     * Can specify up to 100 synonyms.
            +     * Must specify at least 2 synonyms. Otherwise an INVALID ARGUMENT error is
            +     * thrown.
                  * 
            * - * string redirect_uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * repeated string synonyms = 1; * - * @return The bytes for redirectUri. + * @param index The index of the value to return. + * @return The bytes of the synonyms at the given index. */ - com.google.protobuf.ByteString getRedirectUriBytes(); + com.google.protobuf.ByteString getSynonymsBytes(int index); } /** * * *
            -   * Redirects a shopper to the provided URI.
            +   * Creates a set of terms that will act as synonyms of one another.
            +   *
            +   * Example: "happy" will also be considered as "glad", "glad" will also be
            +   * considered as "happy".
                * 
            * - * Protobuf type {@code google.cloud.discoveryengine.v1beta.Control.RedirectAction} + * Protobuf type {@code google.cloud.discoveryengine.v1beta.Control.SynonymsAction} */ - public static final class RedirectAction extends com.google.protobuf.GeneratedMessage + public static final class SynonymsAction extends com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.Control.RedirectAction) - RedirectActionOrBuilder { + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.Control.SynonymsAction) + SynonymsActionOrBuilder { private static final long serialVersionUID = 0L; static { @@ -2094,92 +6640,111 @@ public static final class RedirectAction extends com.google.protobuf.GeneratedMe /* minor= */ 33, /* patch= */ 2, /* suffix= */ "", - "RedirectAction"); + "SynonymsAction"); } - // Use RedirectAction.newBuilder() to construct. - private RedirectAction(com.google.protobuf.GeneratedMessage.Builder builder) { + // Use SynonymsAction.newBuilder() to construct. + private SynonymsAction(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } - private RedirectAction() { - redirectUri_ = ""; + private SynonymsAction() { + synonyms_ = com.google.protobuf.LazyStringArrayList.emptyList(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.discoveryengine.v1beta.ControlProto - .internal_static_google_cloud_discoveryengine_v1beta_Control_RedirectAction_descriptor; + .internal_static_google_cloud_discoveryengine_v1beta_Control_SynonymsAction_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.discoveryengine.v1beta.ControlProto - .internal_static_google_cloud_discoveryengine_v1beta_Control_RedirectAction_fieldAccessorTable + .internal_static_google_cloud_discoveryengine_v1beta_Control_SynonymsAction_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.discoveryengine.v1beta.Control.RedirectAction.class, - com.google.cloud.discoveryengine.v1beta.Control.RedirectAction.Builder.class); + com.google.cloud.discoveryengine.v1beta.Control.SynonymsAction.class, + com.google.cloud.discoveryengine.v1beta.Control.SynonymsAction.Builder.class); } - public static final int REDIRECT_URI_FIELD_NUMBER = 1; + public static final int SYNONYMS_FIELD_NUMBER = 1; @SuppressWarnings("serial") - private volatile java.lang.Object redirectUri_ = ""; + private com.google.protobuf.LazyStringArrayList synonyms_ = + com.google.protobuf.LazyStringArrayList.emptyList(); /** * * *
            -     * Required. The URI to which the shopper will be redirected.
            +     * Defines a set of synonyms.
            +     * Can specify up to 100 synonyms.
            +     * Must specify at least 2 synonyms. Otherwise an INVALID ARGUMENT error is
            +     * thrown.
            +     * 
            * - * Required. - * URI must have length equal or less than 2000 characters. - * Otherwise an INVALID ARGUMENT error is thrown. + * repeated string synonyms = 1; + * + * @return A list containing the synonyms. + */ + public com.google.protobuf.ProtocolStringList getSynonymsList() { + return synonyms_; + } + + /** + * + * + *
            +     * Defines a set of synonyms.
            +     * Can specify up to 100 synonyms.
            +     * Must specify at least 2 synonyms. Otherwise an INVALID ARGUMENT error is
            +     * thrown.
                  * 
            * - * string redirect_uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * repeated string synonyms = 1; * - * @return The redirectUri. + * @return The count of synonyms. */ - @java.lang.Override - public java.lang.String getRedirectUri() { - java.lang.Object ref = redirectUri_; - 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(); - redirectUri_ = s; - return s; - } + public int getSynonymsCount() { + return synonyms_.size(); } /** * * *
            -     * Required. The URI to which the shopper will be redirected.
            +     * Defines a set of synonyms.
            +     * Can specify up to 100 synonyms.
            +     * Must specify at least 2 synonyms. Otherwise an INVALID ARGUMENT error is
            +     * thrown.
            +     * 
            * - * Required. - * URI must have length equal or less than 2000 characters. - * Otherwise an INVALID ARGUMENT error is thrown. + * repeated string synonyms = 1; + * + * @param index The index of the element to return. + * @return The synonyms at the given index. + */ + public java.lang.String getSynonyms(int index) { + return synonyms_.get(index); + } + + /** + * + * + *
            +     * Defines a set of synonyms.
            +     * Can specify up to 100 synonyms.
            +     * Must specify at least 2 synonyms. Otherwise an INVALID ARGUMENT error is
            +     * thrown.
                  * 
            * - * string redirect_uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * repeated string synonyms = 1; * - * @return The bytes for redirectUri. + * @param index The index of the value to return. + * @return The bytes of the synonyms at the given index. */ - @java.lang.Override - public com.google.protobuf.ByteString getRedirectUriBytes() { - java.lang.Object ref = redirectUri_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - redirectUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } + public com.google.protobuf.ByteString getSynonymsBytes(int index) { + return synonyms_.getByteString(index); } private byte memoizedIsInitialized = -1; @@ -2196,8 +6761,8 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(redirectUri_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, redirectUri_); + for (int i = 0; i < synonyms_.size(); i++) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, synonyms_.getRaw(i)); } getUnknownFields().writeTo(output); } @@ -2208,8 +6773,13 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(redirectUri_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, redirectUri_); + { + int dataSize = 0; + for (int i = 0; i < synonyms_.size(); i++) { + dataSize += computeStringSizeNoTag(synonyms_.getRaw(i)); + } + size += dataSize; + size += 1 * getSynonymsList().size(); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -2221,13 +6791,13 @@ public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } - if (!(obj instanceof com.google.cloud.discoveryengine.v1beta.Control.RedirectAction)) { + if (!(obj instanceof com.google.cloud.discoveryengine.v1beta.Control.SynonymsAction)) { return super.equals(obj); } - com.google.cloud.discoveryengine.v1beta.Control.RedirectAction other = - (com.google.cloud.discoveryengine.v1beta.Control.RedirectAction) obj; + com.google.cloud.discoveryengine.v1beta.Control.SynonymsAction other = + (com.google.cloud.discoveryengine.v1beta.Control.SynonymsAction) obj; - if (!getRedirectUri().equals(other.getRedirectUri())) return false; + if (!getSynonymsList().equals(other.getSynonymsList())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -2239,78 +6809,80 @@ public int hashCode() { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + REDIRECT_URI_FIELD_NUMBER; - hash = (53 * hash) + getRedirectUri().hashCode(); + if (getSynonymsCount() > 0) { + hash = (37 * hash) + SYNONYMS_FIELD_NUMBER; + hash = (53 * hash) + getSynonymsList().hashCode(); + } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } - public static com.google.cloud.discoveryengine.v1beta.Control.RedirectAction parseFrom( + public static com.google.cloud.discoveryengine.v1beta.Control.SynonymsAction parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.discoveryengine.v1beta.Control.RedirectAction parseFrom( + public static com.google.cloud.discoveryengine.v1beta.Control.SynonymsAction 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.discoveryengine.v1beta.Control.RedirectAction parseFrom( + public static com.google.cloud.discoveryengine.v1beta.Control.SynonymsAction parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.discoveryengine.v1beta.Control.RedirectAction parseFrom( + public static com.google.cloud.discoveryengine.v1beta.Control.SynonymsAction 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.discoveryengine.v1beta.Control.RedirectAction parseFrom( + public static com.google.cloud.discoveryengine.v1beta.Control.SynonymsAction parseFrom( byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.discoveryengine.v1beta.Control.RedirectAction parseFrom( + public static com.google.cloud.discoveryengine.v1beta.Control.SynonymsAction parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.discoveryengine.v1beta.Control.RedirectAction parseFrom( + public static com.google.cloud.discoveryengine.v1beta.Control.SynonymsAction parseFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } - public static com.google.cloud.discoveryengine.v1beta.Control.RedirectAction parseFrom( + public static com.google.cloud.discoveryengine.v1beta.Control.SynonymsAction 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.discoveryengine.v1beta.Control.RedirectAction parseDelimitedFrom( + public static com.google.cloud.discoveryengine.v1beta.Control.SynonymsAction parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } - public static com.google.cloud.discoveryengine.v1beta.Control.RedirectAction parseDelimitedFrom( + public static com.google.cloud.discoveryengine.v1beta.Control.SynonymsAction 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.discoveryengine.v1beta.Control.RedirectAction parseFrom( + public static com.google.cloud.discoveryengine.v1beta.Control.SynonymsAction parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } - public static com.google.cloud.discoveryengine.v1beta.Control.RedirectAction parseFrom( + public static com.google.cloud.discoveryengine.v1beta.Control.SynonymsAction parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -2328,7 +6900,7 @@ public static Builder newBuilder() { } public static Builder newBuilder( - com.google.cloud.discoveryengine.v1beta.Control.RedirectAction prototype) { + com.google.cloud.discoveryengine.v1beta.Control.SynonymsAction prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @@ -2346,32 +6918,35 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.Builder /** * * - *
            -     * Redirects a shopper to the provided URI.
            +     * 
            +     * Creates a set of terms that will act as synonyms of one another.
            +     *
            +     * Example: "happy" will also be considered as "glad", "glad" will also be
            +     * considered as "happy".
                  * 
            * - * Protobuf type {@code google.cloud.discoveryengine.v1beta.Control.RedirectAction} + * Protobuf type {@code google.cloud.discoveryengine.v1beta.Control.SynonymsAction} */ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.Control.RedirectAction) - com.google.cloud.discoveryengine.v1beta.Control.RedirectActionOrBuilder { + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.Control.SynonymsAction) + com.google.cloud.discoveryengine.v1beta.Control.SynonymsActionOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.discoveryengine.v1beta.ControlProto - .internal_static_google_cloud_discoveryengine_v1beta_Control_RedirectAction_descriptor; + .internal_static_google_cloud_discoveryengine_v1beta_Control_SynonymsAction_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.discoveryengine.v1beta.ControlProto - .internal_static_google_cloud_discoveryengine_v1beta_Control_RedirectAction_fieldAccessorTable + .internal_static_google_cloud_discoveryengine_v1beta_Control_SynonymsAction_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.discoveryengine.v1beta.Control.RedirectAction.class, - com.google.cloud.discoveryengine.v1beta.Control.RedirectAction.Builder.class); + com.google.cloud.discoveryengine.v1beta.Control.SynonymsAction.class, + com.google.cloud.discoveryengine.v1beta.Control.SynonymsAction.Builder.class); } - // Construct using com.google.cloud.discoveryengine.v1beta.Control.RedirectAction.newBuilder() + // Construct using com.google.cloud.discoveryengine.v1beta.Control.SynonymsAction.newBuilder() private Builder() {} private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { @@ -2382,25 +6957,25 @@ private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { public Builder clear() { super.clear(); bitField0_ = 0; - redirectUri_ = ""; + synonyms_ = com.google.protobuf.LazyStringArrayList.emptyList(); return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.cloud.discoveryengine.v1beta.ControlProto - .internal_static_google_cloud_discoveryengine_v1beta_Control_RedirectAction_descriptor; + .internal_static_google_cloud_discoveryengine_v1beta_Control_SynonymsAction_descriptor; } @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.Control.RedirectAction + public com.google.cloud.discoveryengine.v1beta.Control.SynonymsAction getDefaultInstanceForType() { - return com.google.cloud.discoveryengine.v1beta.Control.RedirectAction.getDefaultInstance(); + return com.google.cloud.discoveryengine.v1beta.Control.SynonymsAction.getDefaultInstance(); } @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.Control.RedirectAction build() { - com.google.cloud.discoveryengine.v1beta.Control.RedirectAction result = buildPartial(); + public com.google.cloud.discoveryengine.v1beta.Control.SynonymsAction build() { + com.google.cloud.discoveryengine.v1beta.Control.SynonymsAction result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } @@ -2408,9 +6983,9 @@ public com.google.cloud.discoveryengine.v1beta.Control.RedirectAction build() { } @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.Control.RedirectAction buildPartial() { - com.google.cloud.discoveryengine.v1beta.Control.RedirectAction result = - new com.google.cloud.discoveryengine.v1beta.Control.RedirectAction(this); + public com.google.cloud.discoveryengine.v1beta.Control.SynonymsAction buildPartial() { + com.google.cloud.discoveryengine.v1beta.Control.SynonymsAction result = + new com.google.cloud.discoveryengine.v1beta.Control.SynonymsAction(this); if (bitField0_ != 0) { buildPartial0(result); } @@ -2419,17 +6994,18 @@ public com.google.cloud.discoveryengine.v1beta.Control.RedirectAction buildParti } private void buildPartial0( - com.google.cloud.discoveryengine.v1beta.Control.RedirectAction result) { + com.google.cloud.discoveryengine.v1beta.Control.SynonymsAction result) { int from_bitField0_ = bitField0_; if (((from_bitField0_ & 0x00000001) != 0)) { - result.redirectUri_ = redirectUri_; + synonyms_.makeImmutable(); + result.synonyms_ = synonyms_; } } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.discoveryengine.v1beta.Control.RedirectAction) { - return mergeFrom((com.google.cloud.discoveryengine.v1beta.Control.RedirectAction) other); + if (other instanceof com.google.cloud.discoveryengine.v1beta.Control.SynonymsAction) { + return mergeFrom((com.google.cloud.discoveryengine.v1beta.Control.SynonymsAction) other); } else { super.mergeFrom(other); return this; @@ -2437,13 +7013,18 @@ public Builder mergeFrom(com.google.protobuf.Message other) { } public Builder mergeFrom( - com.google.cloud.discoveryengine.v1beta.Control.RedirectAction other) { + com.google.cloud.discoveryengine.v1beta.Control.SynonymsAction other) { if (other - == com.google.cloud.discoveryengine.v1beta.Control.RedirectAction.getDefaultInstance()) + == com.google.cloud.discoveryengine.v1beta.Control.SynonymsAction.getDefaultInstance()) return this; - if (!other.getRedirectUri().isEmpty()) { - redirectUri_ = other.redirectUri_; - bitField0_ |= 0x00000001; + if (!other.synonyms_.isEmpty()) { + if (synonyms_.isEmpty()) { + synonyms_ = other.synonyms_; + bitField0_ |= 0x00000001; + } else { + ensureSynonymsIsMutable(); + synonyms_.addAll(other.synonyms_); + } onChanged(); } this.mergeUnknownFields(other.getUnknownFields()); @@ -2474,8 +7055,9 @@ public Builder mergeFrom( break; case 10: { - redirectUri_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; + java.lang.String s = input.readStringRequireUtf8(); + ensureSynonymsIsMutable(); + synonyms_.add(s); break; } // case 10 default: @@ -2497,83 +7079,139 @@ public Builder mergeFrom( private int bitField0_; - private java.lang.Object redirectUri_ = ""; + private com.google.protobuf.LazyStringArrayList synonyms_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureSynonymsIsMutable() { + if (!synonyms_.isModifiable()) { + synonyms_ = new com.google.protobuf.LazyStringArrayList(synonyms_); + } + bitField0_ |= 0x00000001; + } /** * * *
            -       * Required. The URI to which the shopper will be redirected.
            +       * Defines a set of synonyms.
            +       * Can specify up to 100 synonyms.
            +       * Must specify at least 2 synonyms. Otherwise an INVALID ARGUMENT error is
            +       * thrown.
            +       * 
            * - * Required. - * URI must have length equal or less than 2000 characters. - * Otherwise an INVALID ARGUMENT error is thrown. + * repeated string synonyms = 1; + * + * @return A list containing the synonyms. + */ + public com.google.protobuf.ProtocolStringList getSynonymsList() { + synonyms_.makeImmutable(); + return synonyms_; + } + + /** + * + * + *
            +       * Defines a set of synonyms.
            +       * Can specify up to 100 synonyms.
            +       * Must specify at least 2 synonyms. Otherwise an INVALID ARGUMENT error is
            +       * thrown.
                    * 
            * - * string redirect_uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * repeated string synonyms = 1; * - * @return The redirectUri. + * @return The count of synonyms. */ - public java.lang.String getRedirectUri() { - java.lang.Object ref = redirectUri_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - redirectUri_ = s; - return s; - } else { - return (java.lang.String) ref; - } + public int getSynonymsCount() { + return synonyms_.size(); } /** * * *
            -       * Required. The URI to which the shopper will be redirected.
            +       * Defines a set of synonyms.
            +       * Can specify up to 100 synonyms.
            +       * Must specify at least 2 synonyms. Otherwise an INVALID ARGUMENT error is
            +       * thrown.
            +       * 
            * - * Required. - * URI must have length equal or less than 2000 characters. - * Otherwise an INVALID ARGUMENT error is thrown. + * repeated string synonyms = 1; + * + * @param index The index of the element to return. + * @return The synonyms at the given index. + */ + public java.lang.String getSynonyms(int index) { + return synonyms_.get(index); + } + + /** + * + * + *
            +       * Defines a set of synonyms.
            +       * Can specify up to 100 synonyms.
            +       * Must specify at least 2 synonyms. Otherwise an INVALID ARGUMENT error is
            +       * thrown.
                    * 
            * - * string redirect_uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * repeated string synonyms = 1; * - * @return The bytes for redirectUri. + * @param index The index of the value to return. + * @return The bytes of the synonyms at the given index. */ - public com.google.protobuf.ByteString getRedirectUriBytes() { - java.lang.Object ref = redirectUri_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - redirectUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } + public com.google.protobuf.ByteString getSynonymsBytes(int index) { + return synonyms_.getByteString(index); } /** * * *
            -       * Required. The URI to which the shopper will be redirected.
            +       * Defines a set of synonyms.
            +       * Can specify up to 100 synonyms.
            +       * Must specify at least 2 synonyms. Otherwise an INVALID ARGUMENT error is
            +       * thrown.
            +       * 
            * - * Required. - * URI must have length equal or less than 2000 characters. - * Otherwise an INVALID ARGUMENT error is thrown. + * repeated string synonyms = 1; + * + * @param index The index to set the value at. + * @param value The synonyms to set. + * @return This builder for chaining. + */ + public Builder setSynonyms(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureSynonymsIsMutable(); + synonyms_.set(index, value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
            +       * Defines a set of synonyms.
            +       * Can specify up to 100 synonyms.
            +       * Must specify at least 2 synonyms. Otherwise an INVALID ARGUMENT error is
            +       * thrown.
                    * 
            * - * string redirect_uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * repeated string synonyms = 1; * - * @param value The redirectUri to set. + * @param value The synonyms to add. * @return This builder for chaining. */ - public Builder setRedirectUri(java.lang.String value) { + public Builder addSynonyms(java.lang.String value) { if (value == null) { throw new NullPointerException(); } - redirectUri_ = value; + ensureSynonymsIsMutable(); + synonyms_.add(value); bitField0_ |= 0x00000001; onChanged(); return this; @@ -2583,20 +7221,43 @@ public Builder setRedirectUri(java.lang.String value) { * * *
            -       * Required. The URI to which the shopper will be redirected.
            +       * Defines a set of synonyms.
            +       * Can specify up to 100 synonyms.
            +       * Must specify at least 2 synonyms. Otherwise an INVALID ARGUMENT error is
            +       * thrown.
            +       * 
            * - * Required. - * URI must have length equal or less than 2000 characters. - * Otherwise an INVALID ARGUMENT error is thrown. + * repeated string synonyms = 1; + * + * @param values The synonyms to add. + * @return This builder for chaining. + */ + public Builder addAllSynonyms(java.lang.Iterable values) { + ensureSynonymsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, synonyms_); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
            +       * Defines a set of synonyms.
            +       * Can specify up to 100 synonyms.
            +       * Must specify at least 2 synonyms. Otherwise an INVALID ARGUMENT error is
            +       * thrown.
                    * 
            * - * string redirect_uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * repeated string synonyms = 1; * * @return This builder for chaining. */ - public Builder clearRedirectUri() { - redirectUri_ = getDefaultInstance().getRedirectUri(); + public Builder clearSynonyms() { + synonyms_ = com.google.protobuf.LazyStringArrayList.emptyList(); bitField0_ = (bitField0_ & ~0x00000001); + ; onChanged(); return this; } @@ -2605,49 +7266,49 @@ public Builder clearRedirectUri() { * * *
            -       * Required. The URI to which the shopper will be redirected.
            -       *
            -       * Required.
            -       * URI must have length equal or less than 2000 characters.
            -       * Otherwise an INVALID ARGUMENT error is thrown.
            +       * Defines a set of synonyms.
            +       * Can specify up to 100 synonyms.
            +       * Must specify at least 2 synonyms. Otherwise an INVALID ARGUMENT error is
            +       * thrown.
                    * 
            * - * string redirect_uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * repeated string synonyms = 1; * - * @param value The bytes for redirectUri to set. + * @param value The bytes of the synonyms to add. * @return This builder for chaining. */ - public Builder setRedirectUriBytes(com.google.protobuf.ByteString value) { + public Builder addSynonymsBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); - redirectUri_ = value; + ensureSynonymsIsMutable(); + synonyms_.add(value); bitField0_ |= 0x00000001; onChanged(); return this; } - // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.Control.RedirectAction) + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.Control.SynonymsAction) } - // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.Control.RedirectAction) - private static final com.google.cloud.discoveryengine.v1beta.Control.RedirectAction + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.Control.SynonymsAction) + private static final com.google.cloud.discoveryengine.v1beta.Control.SynonymsAction DEFAULT_INSTANCE; static { - DEFAULT_INSTANCE = new com.google.cloud.discoveryengine.v1beta.Control.RedirectAction(); + DEFAULT_INSTANCE = new com.google.cloud.discoveryengine.v1beta.Control.SynonymsAction(); } - public static com.google.cloud.discoveryengine.v1beta.Control.RedirectAction + public static com.google.cloud.discoveryengine.v1beta.Control.SynonymsAction getDefaultInstance() { return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { @java.lang.Override - public RedirectAction parsePartialFrom( + public SynonymsAction parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { @@ -2667,110 +7328,118 @@ public RedirectAction parsePartialFrom( } }; - public static com.google.protobuf.Parser parser() { + public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override - public com.google.protobuf.Parser getParserForType() { + public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.Control.RedirectAction + public com.google.cloud.discoveryengine.v1beta.Control.SynonymsAction getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } - public interface SynonymsActionOrBuilder + public interface PromoteActionOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.Control.SynonymsAction) + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.Control.PromoteAction) com.google.protobuf.MessageOrBuilder { /** * * *
            -     * Defines a set of synonyms.
            -     * Can specify up to 100 synonyms.
            -     * Must specify at least 2 synonyms. Otherwise an INVALID ARGUMENT error is
            -     * thrown.
            +     * Required. Data store with which this promotion is attached to.
                  * 
            * - * repeated string synonyms = 1; + * + * string data_store = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * - * @return A list containing the synonyms. + * @return The dataStore. */ - java.util.List getSynonymsList(); + java.lang.String getDataStore(); /** * * *
            -     * Defines a set of synonyms.
            -     * Can specify up to 100 synonyms.
            -     * Must specify at least 2 synonyms. Otherwise an INVALID ARGUMENT error is
            -     * thrown.
            +     * Required. Data store with which this promotion is attached to.
                  * 
            * - * repeated string synonyms = 1; + * + * string data_store = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * - * @return The count of synonyms. + * @return The bytes for dataStore. */ - int getSynonymsCount(); + com.google.protobuf.ByteString getDataStoreBytes(); /** * * *
            -     * Defines a set of synonyms.
            -     * Can specify up to 100 synonyms.
            -     * Must specify at least 2 synonyms. Otherwise an INVALID ARGUMENT error is
            -     * thrown.
            +     * Required. Promotion attached to this action.
                  * 
            * - * repeated string synonyms = 1; + * + * .google.cloud.discoveryengine.v1beta.SearchLinkPromotion search_link_promotion = 2 [(.google.api.field_behavior) = REQUIRED]; + * * - * @param index The index of the element to return. - * @return The synonyms at the given index. + * @return Whether the searchLinkPromotion field is set. */ - java.lang.String getSynonyms(int index); + boolean hasSearchLinkPromotion(); /** * * *
            -     * Defines a set of synonyms.
            -     * Can specify up to 100 synonyms.
            -     * Must specify at least 2 synonyms. Otherwise an INVALID ARGUMENT error is
            -     * thrown.
            +     * Required. Promotion attached to this action.
                  * 
            * - * repeated string synonyms = 1; + * + * .google.cloud.discoveryengine.v1beta.SearchLinkPromotion search_link_promotion = 2 [(.google.api.field_behavior) = REQUIRED]; + * * - * @param index The index of the value to return. - * @return The bytes of the synonyms at the given index. + * @return The searchLinkPromotion. */ - com.google.protobuf.ByteString getSynonymsBytes(int index); + com.google.cloud.discoveryengine.v1beta.SearchLinkPromotion getSearchLinkPromotion(); + + /** + * + * + *
            +     * Required. Promotion attached to this action.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchLinkPromotion search_link_promotion = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.discoveryengine.v1beta.SearchLinkPromotionOrBuilder + getSearchLinkPromotionOrBuilder(); } /** * * *
            -   * Creates a set of terms that will act as synonyms of one another.
            +   * Promote certain links based on some trigger queries.
                *
            -   * Example: "happy" will also be considered as "glad", "glad" will also be
            -   * considered as "happy".
            +   * Example: Promote shoe store link when searching for `shoe` keyword.
            +   * The link can be outside of associated data store.
                * 
            * - * Protobuf type {@code google.cloud.discoveryengine.v1beta.Control.SynonymsAction} + * Protobuf type {@code google.cloud.discoveryengine.v1beta.Control.PromoteAction} */ - public static final class SynonymsAction extends com.google.protobuf.GeneratedMessage + public static final class PromoteAction extends com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.Control.SynonymsAction) - SynonymsActionOrBuilder { + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.Control.PromoteAction) + PromoteActionOrBuilder { private static final long serialVersionUID = 0L; static { @@ -2780,111 +7449,149 @@ public static final class SynonymsAction extends com.google.protobuf.GeneratedMe /* minor= */ 33, /* patch= */ 2, /* suffix= */ "", - "SynonymsAction"); + "PromoteAction"); } - // Use SynonymsAction.newBuilder() to construct. - private SynonymsAction(com.google.protobuf.GeneratedMessage.Builder builder) { + // Use PromoteAction.newBuilder() to construct. + private PromoteAction(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } - private SynonymsAction() { - synonyms_ = com.google.protobuf.LazyStringArrayList.emptyList(); + private PromoteAction() { + dataStore_ = ""; } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.discoveryengine.v1beta.ControlProto - .internal_static_google_cloud_discoveryengine_v1beta_Control_SynonymsAction_descriptor; + .internal_static_google_cloud_discoveryengine_v1beta_Control_PromoteAction_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.discoveryengine.v1beta.ControlProto - .internal_static_google_cloud_discoveryengine_v1beta_Control_SynonymsAction_fieldAccessorTable + .internal_static_google_cloud_discoveryengine_v1beta_Control_PromoteAction_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.discoveryengine.v1beta.Control.SynonymsAction.class, - com.google.cloud.discoveryengine.v1beta.Control.SynonymsAction.Builder.class); + com.google.cloud.discoveryengine.v1beta.Control.PromoteAction.class, + com.google.cloud.discoveryengine.v1beta.Control.PromoteAction.Builder.class); } - public static final int SYNONYMS_FIELD_NUMBER = 1; + private int bitField0_; + public static final int DATA_STORE_FIELD_NUMBER = 1; @SuppressWarnings("serial") - private com.google.protobuf.LazyStringArrayList synonyms_ = - com.google.protobuf.LazyStringArrayList.emptyList(); + private volatile java.lang.Object dataStore_ = ""; /** * * *
            -     * Defines a set of synonyms.
            -     * Can specify up to 100 synonyms.
            -     * Must specify at least 2 synonyms. Otherwise an INVALID ARGUMENT error is
            -     * thrown.
            +     * Required. Data store with which this promotion is attached to.
                  * 
            * - * repeated string synonyms = 1; + * + * string data_store = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * - * @return A list containing the synonyms. + * @return The dataStore. */ - public com.google.protobuf.ProtocolStringList getSynonymsList() { - return synonyms_; + @java.lang.Override + public java.lang.String getDataStore() { + java.lang.Object ref = dataStore_; + 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(); + dataStore_ = s; + return s; + } } /** * * *
            -     * Defines a set of synonyms.
            -     * Can specify up to 100 synonyms.
            -     * Must specify at least 2 synonyms. Otherwise an INVALID ARGUMENT error is
            -     * thrown.
            +     * Required. Data store with which this promotion is attached to.
                  * 
            * - * repeated string synonyms = 1; + * + * string data_store = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * - * @return The count of synonyms. + * @return The bytes for dataStore. */ - public int getSynonymsCount() { - return synonyms_.size(); + @java.lang.Override + public com.google.protobuf.ByteString getDataStoreBytes() { + java.lang.Object ref = dataStore_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + dataStore_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } } + public static final int SEARCH_LINK_PROMOTION_FIELD_NUMBER = 2; + private com.google.cloud.discoveryengine.v1beta.SearchLinkPromotion searchLinkPromotion_; + /** * * *
            -     * Defines a set of synonyms.
            -     * Can specify up to 100 synonyms.
            -     * Must specify at least 2 synonyms. Otherwise an INVALID ARGUMENT error is
            -     * thrown.
            +     * Required. Promotion attached to this action.
                  * 
            * - * repeated string synonyms = 1; + * + * .google.cloud.discoveryengine.v1beta.SearchLinkPromotion search_link_promotion = 2 [(.google.api.field_behavior) = REQUIRED]; + * * - * @param index The index of the element to return. - * @return The synonyms at the given index. + * @return Whether the searchLinkPromotion field is set. */ - public java.lang.String getSynonyms(int index) { - return synonyms_.get(index); + @java.lang.Override + public boolean hasSearchLinkPromotion() { + return ((bitField0_ & 0x00000001) != 0); } /** * * *
            -     * Defines a set of synonyms.
            -     * Can specify up to 100 synonyms.
            -     * Must specify at least 2 synonyms. Otherwise an INVALID ARGUMENT error is
            -     * thrown.
            +     * Required. Promotion attached to this action.
                  * 
            * - * repeated string synonyms = 1; + * + * .google.cloud.discoveryengine.v1beta.SearchLinkPromotion search_link_promotion = 2 [(.google.api.field_behavior) = REQUIRED]; + * * - * @param index The index of the value to return. - * @return The bytes of the synonyms at the given index. + * @return The searchLinkPromotion. */ - public com.google.protobuf.ByteString getSynonymsBytes(int index) { - return synonyms_.getByteString(index); + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.SearchLinkPromotion getSearchLinkPromotion() { + return searchLinkPromotion_ == null + ? com.google.cloud.discoveryengine.v1beta.SearchLinkPromotion.getDefaultInstance() + : searchLinkPromotion_; + } + + /** + * + * + *
            +     * Required. Promotion attached to this action.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchLinkPromotion search_link_promotion = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.SearchLinkPromotionOrBuilder + getSearchLinkPromotionOrBuilder() { + return searchLinkPromotion_ == null + ? com.google.cloud.discoveryengine.v1beta.SearchLinkPromotion.getDefaultInstance() + : searchLinkPromotion_; } private byte memoizedIsInitialized = -1; @@ -2901,8 +7608,11 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - for (int i = 0; i < synonyms_.size(); i++) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, synonyms_.getRaw(i)); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(dataStore_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, dataStore_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getSearchLinkPromotion()); } getUnknownFields().writeTo(output); } @@ -2913,13 +7623,12 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - { - int dataSize = 0; - for (int i = 0; i < synonyms_.size(); i++) { - dataSize += computeStringSizeNoTag(synonyms_.getRaw(i)); - } - size += dataSize; - size += 1 * getSynonymsList().size(); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(dataStore_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, dataStore_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(2, getSearchLinkPromotion()); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -2931,13 +7640,17 @@ public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } - if (!(obj instanceof com.google.cloud.discoveryengine.v1beta.Control.SynonymsAction)) { + if (!(obj instanceof com.google.cloud.discoveryengine.v1beta.Control.PromoteAction)) { return super.equals(obj); } - com.google.cloud.discoveryengine.v1beta.Control.SynonymsAction other = - (com.google.cloud.discoveryengine.v1beta.Control.SynonymsAction) obj; + com.google.cloud.discoveryengine.v1beta.Control.PromoteAction other = + (com.google.cloud.discoveryengine.v1beta.Control.PromoteAction) obj; - if (!getSynonymsList().equals(other.getSynonymsList())) return false; + if (!getDataStore().equals(other.getDataStore())) return false; + if (hasSearchLinkPromotion() != other.hasSearchLinkPromotion()) return false; + if (hasSearchLinkPromotion()) { + if (!getSearchLinkPromotion().equals(other.getSearchLinkPromotion())) return false; + } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -2949,80 +7662,82 @@ public int hashCode() { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); - if (getSynonymsCount() > 0) { - hash = (37 * hash) + SYNONYMS_FIELD_NUMBER; - hash = (53 * hash) + getSynonymsList().hashCode(); + hash = (37 * hash) + DATA_STORE_FIELD_NUMBER; + hash = (53 * hash) + getDataStore().hashCode(); + if (hasSearchLinkPromotion()) { + hash = (37 * hash) + SEARCH_LINK_PROMOTION_FIELD_NUMBER; + hash = (53 * hash) + getSearchLinkPromotion().hashCode(); } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } - public static com.google.cloud.discoveryengine.v1beta.Control.SynonymsAction parseFrom( + public static com.google.cloud.discoveryengine.v1beta.Control.PromoteAction parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.discoveryengine.v1beta.Control.SynonymsAction parseFrom( + public static com.google.cloud.discoveryengine.v1beta.Control.PromoteAction 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.discoveryengine.v1beta.Control.SynonymsAction parseFrom( + public static com.google.cloud.discoveryengine.v1beta.Control.PromoteAction parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.discoveryengine.v1beta.Control.SynonymsAction parseFrom( + public static com.google.cloud.discoveryengine.v1beta.Control.PromoteAction 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.discoveryengine.v1beta.Control.SynonymsAction parseFrom( + public static com.google.cloud.discoveryengine.v1beta.Control.PromoteAction parseFrom( byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.discoveryengine.v1beta.Control.SynonymsAction parseFrom( + public static com.google.cloud.discoveryengine.v1beta.Control.PromoteAction parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.discoveryengine.v1beta.Control.SynonymsAction parseFrom( + public static com.google.cloud.discoveryengine.v1beta.Control.PromoteAction parseFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } - public static com.google.cloud.discoveryengine.v1beta.Control.SynonymsAction parseFrom( + public static com.google.cloud.discoveryengine.v1beta.Control.PromoteAction 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.discoveryengine.v1beta.Control.SynonymsAction parseDelimitedFrom( + public static com.google.cloud.discoveryengine.v1beta.Control.PromoteAction parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } - public static com.google.cloud.discoveryengine.v1beta.Control.SynonymsAction parseDelimitedFrom( + public static com.google.cloud.discoveryengine.v1beta.Control.PromoteAction 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.discoveryengine.v1beta.Control.SynonymsAction parseFrom( + public static com.google.cloud.discoveryengine.v1beta.Control.PromoteAction parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } - public static com.google.cloud.discoveryengine.v1beta.Control.SynonymsAction parseFrom( + public static com.google.cloud.discoveryengine.v1beta.Control.PromoteAction parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -3040,7 +7755,7 @@ public static Builder newBuilder() { } public static Builder newBuilder( - com.google.cloud.discoveryengine.v1beta.Control.SynonymsAction prototype) { + com.google.cloud.discoveryengine.v1beta.Control.PromoteAction prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @@ -3059,63 +7774,77 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.Builder * * *
            -     * Creates a set of terms that will act as synonyms of one another.
            +     * Promote certain links based on some trigger queries.
                  *
            -     * Example: "happy" will also be considered as "glad", "glad" will also be
            -     * considered as "happy".
            +     * Example: Promote shoe store link when searching for `shoe` keyword.
            +     * The link can be outside of associated data store.
                  * 
            * - * Protobuf type {@code google.cloud.discoveryengine.v1beta.Control.SynonymsAction} + * Protobuf type {@code google.cloud.discoveryengine.v1beta.Control.PromoteAction} */ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.Control.SynonymsAction) - com.google.cloud.discoveryengine.v1beta.Control.SynonymsActionOrBuilder { + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.Control.PromoteAction) + com.google.cloud.discoveryengine.v1beta.Control.PromoteActionOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.discoveryengine.v1beta.ControlProto - .internal_static_google_cloud_discoveryengine_v1beta_Control_SynonymsAction_descriptor; + .internal_static_google_cloud_discoveryengine_v1beta_Control_PromoteAction_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.discoveryengine.v1beta.ControlProto - .internal_static_google_cloud_discoveryengine_v1beta_Control_SynonymsAction_fieldAccessorTable + .internal_static_google_cloud_discoveryengine_v1beta_Control_PromoteAction_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.discoveryengine.v1beta.Control.SynonymsAction.class, - com.google.cloud.discoveryengine.v1beta.Control.SynonymsAction.Builder.class); + com.google.cloud.discoveryengine.v1beta.Control.PromoteAction.class, + com.google.cloud.discoveryengine.v1beta.Control.PromoteAction.Builder.class); } - // Construct using com.google.cloud.discoveryengine.v1beta.Control.SynonymsAction.newBuilder() - private Builder() {} + // Construct using com.google.cloud.discoveryengine.v1beta.Control.PromoteAction.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetSearchLinkPromotionFieldBuilder(); + } } @java.lang.Override public Builder clear() { super.clear(); bitField0_ = 0; - synonyms_ = com.google.protobuf.LazyStringArrayList.emptyList(); + dataStore_ = ""; + searchLinkPromotion_ = null; + if (searchLinkPromotionBuilder_ != null) { + searchLinkPromotionBuilder_.dispose(); + searchLinkPromotionBuilder_ = null; + } return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.cloud.discoveryengine.v1beta.ControlProto - .internal_static_google_cloud_discoveryengine_v1beta_Control_SynonymsAction_descriptor; + .internal_static_google_cloud_discoveryengine_v1beta_Control_PromoteAction_descriptor; } @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.Control.SynonymsAction + public com.google.cloud.discoveryengine.v1beta.Control.PromoteAction getDefaultInstanceForType() { - return com.google.cloud.discoveryengine.v1beta.Control.SynonymsAction.getDefaultInstance(); + return com.google.cloud.discoveryengine.v1beta.Control.PromoteAction.getDefaultInstance(); } @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.Control.SynonymsAction build() { - com.google.cloud.discoveryengine.v1beta.Control.SynonymsAction result = buildPartial(); + public com.google.cloud.discoveryengine.v1beta.Control.PromoteAction build() { + com.google.cloud.discoveryengine.v1beta.Control.PromoteAction result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } @@ -3123,9 +7852,9 @@ public com.google.cloud.discoveryengine.v1beta.Control.SynonymsAction build() { } @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.Control.SynonymsAction buildPartial() { - com.google.cloud.discoveryengine.v1beta.Control.SynonymsAction result = - new com.google.cloud.discoveryengine.v1beta.Control.SynonymsAction(this); + public com.google.cloud.discoveryengine.v1beta.Control.PromoteAction buildPartial() { + com.google.cloud.discoveryengine.v1beta.Control.PromoteAction result = + new com.google.cloud.discoveryengine.v1beta.Control.PromoteAction(this); if (bitField0_ != 0) { buildPartial0(result); } @@ -3134,18 +7863,26 @@ public com.google.cloud.discoveryengine.v1beta.Control.SynonymsAction buildParti } private void buildPartial0( - com.google.cloud.discoveryengine.v1beta.Control.SynonymsAction result) { + com.google.cloud.discoveryengine.v1beta.Control.PromoteAction result) { int from_bitField0_ = bitField0_; if (((from_bitField0_ & 0x00000001) != 0)) { - synonyms_.makeImmutable(); - result.synonyms_ = synonyms_; + result.dataStore_ = dataStore_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.searchLinkPromotion_ = + searchLinkPromotionBuilder_ == null + ? searchLinkPromotion_ + : searchLinkPromotionBuilder_.build(); + to_bitField0_ |= 0x00000001; } + result.bitField0_ |= to_bitField0_; } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.discoveryengine.v1beta.Control.SynonymsAction) { - return mergeFrom((com.google.cloud.discoveryengine.v1beta.Control.SynonymsAction) other); + if (other instanceof com.google.cloud.discoveryengine.v1beta.Control.PromoteAction) { + return mergeFrom((com.google.cloud.discoveryengine.v1beta.Control.PromoteAction) other); } else { super.mergeFrom(other); return this; @@ -3153,20 +7890,18 @@ public Builder mergeFrom(com.google.protobuf.Message other) { } public Builder mergeFrom( - com.google.cloud.discoveryengine.v1beta.Control.SynonymsAction other) { + com.google.cloud.discoveryengine.v1beta.Control.PromoteAction other) { if (other - == com.google.cloud.discoveryengine.v1beta.Control.SynonymsAction.getDefaultInstance()) + == com.google.cloud.discoveryengine.v1beta.Control.PromoteAction.getDefaultInstance()) return this; - if (!other.synonyms_.isEmpty()) { - if (synonyms_.isEmpty()) { - synonyms_ = other.synonyms_; - bitField0_ |= 0x00000001; - } else { - ensureSynonymsIsMutable(); - synonyms_.addAll(other.synonyms_); - } + if (!other.getDataStore().isEmpty()) { + dataStore_ = other.dataStore_; + bitField0_ |= 0x00000001; onChanged(); } + if (other.hasSearchLinkPromotion()) { + mergeSearchLinkPromotion(other.getSearchLinkPromotion()); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -3195,11 +7930,17 @@ public Builder mergeFrom( break; case 10: { - java.lang.String s = input.readStringRequireUtf8(); - ensureSynonymsIsMutable(); - synonyms_.add(s); + dataStore_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; break; } // case 10 + case 18: + { + input.readMessage( + internalGetSearchLinkPromotionFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -3219,140 +7960,196 @@ public Builder mergeFrom( private int bitField0_; - private com.google.protobuf.LazyStringArrayList synonyms_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - - private void ensureSynonymsIsMutable() { - if (!synonyms_.isModifiable()) { - synonyms_ = new com.google.protobuf.LazyStringArrayList(synonyms_); - } - bitField0_ |= 0x00000001; - } + private java.lang.Object dataStore_ = ""; /** * * *
            -       * Defines a set of synonyms.
            -       * Can specify up to 100 synonyms.
            -       * Must specify at least 2 synonyms. Otherwise an INVALID ARGUMENT error is
            -       * thrown.
            +       * Required. Data store with which this promotion is attached to.
                    * 
            * - * repeated string synonyms = 1; + * + * string data_store = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * - * @return A list containing the synonyms. + * @return The dataStore. */ - public com.google.protobuf.ProtocolStringList getSynonymsList() { - synonyms_.makeImmutable(); - return synonyms_; + public java.lang.String getDataStore() { + java.lang.Object ref = dataStore_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + dataStore_ = s; + return s; + } else { + return (java.lang.String) ref; + } } /** * * *
            -       * Defines a set of synonyms.
            -       * Can specify up to 100 synonyms.
            -       * Must specify at least 2 synonyms. Otherwise an INVALID ARGUMENT error is
            -       * thrown.
            +       * Required. Data store with which this promotion is attached to.
                    * 
            * - * repeated string synonyms = 1; + * + * string data_store = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * - * @return The count of synonyms. + * @return The bytes for dataStore. */ - public int getSynonymsCount() { - return synonyms_.size(); + public com.google.protobuf.ByteString getDataStoreBytes() { + java.lang.Object ref = dataStore_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + dataStore_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } } /** * * *
            -       * Defines a set of synonyms.
            -       * Can specify up to 100 synonyms.
            -       * Must specify at least 2 synonyms. Otherwise an INVALID ARGUMENT error is
            -       * thrown.
            +       * Required. Data store with which this promotion is attached to.
                    * 
            * - * repeated string synonyms = 1; + * + * string data_store = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * - * @param index The index of the element to return. - * @return The synonyms at the given index. + * @param value The dataStore to set. + * @return This builder for chaining. */ - public java.lang.String getSynonyms(int index) { - return synonyms_.get(index); + public Builder setDataStore(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + dataStore_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; } /** * * *
            -       * Defines a set of synonyms.
            -       * Can specify up to 100 synonyms.
            -       * Must specify at least 2 synonyms. Otherwise an INVALID ARGUMENT error is
            -       * thrown.
            +       * Required. Data store with which this promotion is attached to.
                    * 
            * - * repeated string synonyms = 1; + * + * string data_store = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * - * @param index The index of the value to return. - * @return The bytes of the synonyms at the given index. + * @return This builder for chaining. */ - public com.google.protobuf.ByteString getSynonymsBytes(int index) { - return synonyms_.getByteString(index); + public Builder clearDataStore() { + dataStore_ = getDefaultInstance().getDataStore(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; } /** * * *
            -       * Defines a set of synonyms.
            -       * Can specify up to 100 synonyms.
            -       * Must specify at least 2 synonyms. Otherwise an INVALID ARGUMENT error is
            -       * thrown.
            +       * Required. Data store with which this promotion is attached to.
                    * 
            * - * repeated string synonyms = 1; + * + * string data_store = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * - * @param index The index to set the value at. - * @param value The synonyms to set. + * @param value The bytes for dataStore to set. * @return This builder for chaining. */ - public Builder setSynonyms(int index, java.lang.String value) { + public Builder setDataStoreBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } - ensureSynonymsIsMutable(); - synonyms_.set(index, value); + checkByteStringIsUtf8(value); + dataStore_ = value; bitField0_ |= 0x00000001; onChanged(); return this; } + private com.google.cloud.discoveryengine.v1beta.SearchLinkPromotion searchLinkPromotion_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.SearchLinkPromotion, + com.google.cloud.discoveryengine.v1beta.SearchLinkPromotion.Builder, + com.google.cloud.discoveryengine.v1beta.SearchLinkPromotionOrBuilder> + searchLinkPromotionBuilder_; + /** * * *
            -       * Defines a set of synonyms.
            -       * Can specify up to 100 synonyms.
            -       * Must specify at least 2 synonyms. Otherwise an INVALID ARGUMENT error is
            -       * thrown.
            +       * Required. Promotion attached to this action.
                    * 
            * - * repeated string synonyms = 1; + * + * .google.cloud.discoveryengine.v1beta.SearchLinkPromotion search_link_promotion = 2 [(.google.api.field_behavior) = REQUIRED]; + * * - * @param value The synonyms to add. - * @return This builder for chaining. + * @return Whether the searchLinkPromotion field is set. */ - public Builder addSynonyms(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); + public boolean hasSearchLinkPromotion() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
            +       * Required. Promotion attached to this action.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchLinkPromotion search_link_promotion = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The searchLinkPromotion. + */ + public com.google.cloud.discoveryengine.v1beta.SearchLinkPromotion getSearchLinkPromotion() { + if (searchLinkPromotionBuilder_ == null) { + return searchLinkPromotion_ == null + ? com.google.cloud.discoveryengine.v1beta.SearchLinkPromotion.getDefaultInstance() + : searchLinkPromotion_; + } else { + return searchLinkPromotionBuilder_.getMessage(); } - ensureSynonymsIsMutable(); - synonyms_.add(value); - bitField0_ |= 0x00000001; + } + + /** + * + * + *
            +       * Required. Promotion attached to this action.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchLinkPromotion search_link_promotion = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setSearchLinkPromotion( + com.google.cloud.discoveryengine.v1beta.SearchLinkPromotion value) { + if (searchLinkPromotionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + searchLinkPromotion_ = value; + } else { + searchLinkPromotionBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; onChanged(); return this; } @@ -3361,21 +8158,21 @@ public Builder addSynonyms(java.lang.String value) { * * *
            -       * Defines a set of synonyms.
            -       * Can specify up to 100 synonyms.
            -       * Must specify at least 2 synonyms. Otherwise an INVALID ARGUMENT error is
            -       * thrown.
            +       * Required. Promotion attached to this action.
                    * 
            * - * repeated string synonyms = 1; - * - * @param values The synonyms to add. - * @return This builder for chaining. + * + * .google.cloud.discoveryengine.v1beta.SearchLinkPromotion search_link_promotion = 2 [(.google.api.field_behavior) = REQUIRED]; + * */ - public Builder addAllSynonyms(java.lang.Iterable values) { - ensureSynonymsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, synonyms_); - bitField0_ |= 0x00000001; + public Builder setSearchLinkPromotion( + com.google.cloud.discoveryengine.v1beta.SearchLinkPromotion.Builder builderForValue) { + if (searchLinkPromotionBuilder_ == null) { + searchLinkPromotion_ = builderForValue.build(); + } else { + searchLinkPromotionBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; onChanged(); return this; } @@ -3384,20 +8181,53 @@ public Builder addAllSynonyms(java.lang.Iterable values) { * * *
            -       * Defines a set of synonyms.
            -       * Can specify up to 100 synonyms.
            -       * Must specify at least 2 synonyms. Otherwise an INVALID ARGUMENT error is
            -       * thrown.
            +       * Required. Promotion attached to this action.
                    * 
            * - * repeated string synonyms = 1; + * + * .google.cloud.discoveryengine.v1beta.SearchLinkPromotion search_link_promotion = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeSearchLinkPromotion( + com.google.cloud.discoveryengine.v1beta.SearchLinkPromotion value) { + if (searchLinkPromotionBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && searchLinkPromotion_ != null + && searchLinkPromotion_ + != com.google.cloud.discoveryengine.v1beta.SearchLinkPromotion + .getDefaultInstance()) { + getSearchLinkPromotionBuilder().mergeFrom(value); + } else { + searchLinkPromotion_ = value; + } + } else { + searchLinkPromotionBuilder_.mergeFrom(value); + } + if (searchLinkPromotion_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** * - * @return This builder for chaining. + * + *
            +       * Required. Promotion attached to this action.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchLinkPromotion search_link_promotion = 2 [(.google.api.field_behavior) = REQUIRED]; + * */ - public Builder clearSynonyms() { - synonyms_ = com.google.protobuf.LazyStringArrayList.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - ; + public Builder clearSearchLinkPromotion() { + bitField0_ = (bitField0_ & ~0x00000002); + searchLinkPromotion_ = null; + if (searchLinkPromotionBuilder_ != null) { + searchLinkPromotionBuilder_.dispose(); + searchLinkPromotionBuilder_ = null; + } onChanged(); return this; } @@ -3406,49 +8236,90 @@ public Builder clearSynonyms() { * * *
            -       * Defines a set of synonyms.
            -       * Can specify up to 100 synonyms.
            -       * Must specify at least 2 synonyms. Otherwise an INVALID ARGUMENT error is
            -       * thrown.
            +       * Required. Promotion attached to this action.
                    * 
            * - * repeated string synonyms = 1; + * + * .google.cloud.discoveryengine.v1beta.SearchLinkPromotion search_link_promotion = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.discoveryengine.v1beta.SearchLinkPromotion.Builder + getSearchLinkPromotionBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return internalGetSearchLinkPromotionFieldBuilder().getBuilder(); + } + + /** * - * @param value The bytes of the synonyms to add. - * @return This builder for chaining. + * + *
            +       * Required. Promotion attached to this action.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchLinkPromotion search_link_promotion = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.discoveryengine.v1beta.SearchLinkPromotionOrBuilder + getSearchLinkPromotionOrBuilder() { + if (searchLinkPromotionBuilder_ != null) { + return searchLinkPromotionBuilder_.getMessageOrBuilder(); + } else { + return searchLinkPromotion_ == null + ? com.google.cloud.discoveryengine.v1beta.SearchLinkPromotion.getDefaultInstance() + : searchLinkPromotion_; + } + } + + /** + * + * + *
            +       * Required. Promotion attached to this action.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchLinkPromotion search_link_promotion = 2 [(.google.api.field_behavior) = REQUIRED]; + * */ - public Builder addSynonymsBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.SearchLinkPromotion, + com.google.cloud.discoveryengine.v1beta.SearchLinkPromotion.Builder, + com.google.cloud.discoveryengine.v1beta.SearchLinkPromotionOrBuilder> + internalGetSearchLinkPromotionFieldBuilder() { + if (searchLinkPromotionBuilder_ == null) { + searchLinkPromotionBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.SearchLinkPromotion, + com.google.cloud.discoveryengine.v1beta.SearchLinkPromotion.Builder, + com.google.cloud.discoveryengine.v1beta.SearchLinkPromotionOrBuilder>( + getSearchLinkPromotion(), getParentForChildren(), isClean()); + searchLinkPromotion_ = null; } - checkByteStringIsUtf8(value); - ensureSynonymsIsMutable(); - synonyms_.add(value); - bitField0_ |= 0x00000001; - onChanged(); - return this; + return searchLinkPromotionBuilder_; } - // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.Control.SynonymsAction) + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.Control.PromoteAction) } - // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.Control.SynonymsAction) - private static final com.google.cloud.discoveryengine.v1beta.Control.SynonymsAction + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.Control.PromoteAction) + private static final com.google.cloud.discoveryengine.v1beta.Control.PromoteAction DEFAULT_INSTANCE; static { - DEFAULT_INSTANCE = new com.google.cloud.discoveryengine.v1beta.Control.SynonymsAction(); + DEFAULT_INSTANCE = new com.google.cloud.discoveryengine.v1beta.Control.PromoteAction(); } - public static com.google.cloud.discoveryengine.v1beta.Control.SynonymsAction + public static com.google.cloud.discoveryengine.v1beta.Control.PromoteAction getDefaultInstance() { return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { @java.lang.Override - public SynonymsAction parsePartialFrom( + public PromoteAction parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { @@ -3468,17 +8339,17 @@ public SynonymsAction parsePartialFrom( } }; - public static com.google.protobuf.Parser parser() { + public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override - public com.google.protobuf.Parser getParserForType() { + public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.Control.SynonymsAction + public com.google.cloud.discoveryengine.v1beta.Control.PromoteAction getDefaultInstanceForType() { return DEFAULT_INSTANCE; } @@ -3497,6 +8368,7 @@ public enum ActionCase FILTER_ACTION(7), REDIRECT_ACTION(9), SYNONYMS_ACTION(10), + PROMOTE_ACTION(15), ACTION_NOT_SET(0); private final int value; @@ -3524,6 +8396,8 @@ public static ActionCase forNumber(int value) { return REDIRECT_ACTION; case 10: return SYNONYMS_ACTION; + case 15: + return PROMOTE_ACTION; case 0: return ACTION_NOT_SET; default: @@ -3763,6 +8637,61 @@ public com.google.cloud.discoveryengine.v1beta.Control.SynonymsAction getSynonym return com.google.cloud.discoveryengine.v1beta.Control.SynonymsAction.getDefaultInstance(); } + public static final int PROMOTE_ACTION_FIELD_NUMBER = 15; + + /** + * + * + *
            +   * Promote certain links based on predefined trigger queries.
            +   * 
            + * + * .google.cloud.discoveryengine.v1beta.Control.PromoteAction promote_action = 15; + * + * @return Whether the promoteAction field is set. + */ + @java.lang.Override + public boolean hasPromoteAction() { + return actionCase_ == 15; + } + + /** + * + * + *
            +   * Promote certain links based on predefined trigger queries.
            +   * 
            + * + * .google.cloud.discoveryengine.v1beta.Control.PromoteAction promote_action = 15; + * + * @return The promoteAction. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Control.PromoteAction getPromoteAction() { + if (actionCase_ == 15) { + return (com.google.cloud.discoveryengine.v1beta.Control.PromoteAction) action_; + } + return com.google.cloud.discoveryengine.v1beta.Control.PromoteAction.getDefaultInstance(); + } + + /** + * + * + *
            +   * Promote certain links based on predefined trigger queries.
            +   * 
            + * + * .google.cloud.discoveryengine.v1beta.Control.PromoteAction promote_action = 15; + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Control.PromoteActionOrBuilder + getPromoteActionOrBuilder() { + if (actionCase_ == 15) { + return (com.google.cloud.discoveryengine.v1beta.Control.PromoteAction) action_; + } + return com.google.cloud.discoveryengine.v1beta.Control.PromoteAction.getDefaultInstance(); + } + public static final int NAME_FIELD_NUMBER = 1; @SuppressWarnings("serial") @@ -4296,6 +9225,10 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io output.writeMessage( 10, (com.google.cloud.discoveryengine.v1beta.Control.SynonymsAction) action_); } + if (actionCase_ == 15) { + output.writeMessage( + 15, (com.google.cloud.discoveryengine.v1beta.Control.PromoteAction) action_); + } getUnknownFields().writeTo(output); } @@ -4359,6 +9292,11 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 10, (com.google.cloud.discoveryengine.v1beta.Control.SynonymsAction) action_); } + if (actionCase_ == 15) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 15, (com.google.cloud.discoveryengine.v1beta.Control.PromoteAction) action_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -4396,6 +9334,9 @@ public boolean equals(final java.lang.Object obj) { case 10: if (!getSynonymsAction().equals(other.getSynonymsAction())) return false; break; + case 15: + if (!getPromoteAction().equals(other.getPromoteAction())) return false; + break; case 0: default: } @@ -4445,6 +9386,10 @@ public int hashCode() { hash = (37 * hash) + SYNONYMS_ACTION_FIELD_NUMBER; hash = (53 * hash) + getSynonymsAction().hashCode(); break; + case 15: + hash = (37 * hash) + PROMOTE_ACTION_FIELD_NUMBER; + hash = (53 * hash) + getPromoteAction().hashCode(); + break; case 0: default: } @@ -4603,6 +9548,9 @@ public Builder clear() { if (synonymsActionBuilder_ != null) { synonymsActionBuilder_.clear(); } + if (promoteActionBuilder_ != null) { + promoteActionBuilder_.clear(); + } name_ = ""; displayName_ = ""; associatedServingConfigIds_ = com.google.protobuf.LazyStringArrayList.emptyList(); @@ -4614,7 +9562,7 @@ public Builder clear() { conditions_ = null; conditionsBuilder_.clear(); } - bitField0_ = (bitField0_ & ~0x00000200); + bitField0_ = (bitField0_ & ~0x00000400); actionCase_ = 0; action_ = null; return this; @@ -4656,9 +9604,9 @@ public com.google.cloud.discoveryengine.v1beta.Control buildPartial() { private void buildPartialRepeatedFields( com.google.cloud.discoveryengine.v1beta.Control result) { if (conditionsBuilder_ == null) { - if (((bitField0_ & 0x00000200) != 0)) { + if (((bitField0_ & 0x00000400) != 0)) { conditions_ = java.util.Collections.unmodifiableList(conditions_); - bitField0_ = (bitField0_ & ~0x00000200); + bitField0_ = (bitField0_ & ~0x00000400); } result.conditions_ = conditions_; } else { @@ -4668,20 +9616,20 @@ private void buildPartialRepeatedFields( private void buildPartial0(com.google.cloud.discoveryengine.v1beta.Control result) { int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000010) != 0)) { + if (((from_bitField0_ & 0x00000020) != 0)) { result.name_ = name_; } - if (((from_bitField0_ & 0x00000020) != 0)) { + if (((from_bitField0_ & 0x00000040) != 0)) { result.displayName_ = displayName_; } - if (((from_bitField0_ & 0x00000040) != 0)) { + if (((from_bitField0_ & 0x00000080) != 0)) { associatedServingConfigIds_.makeImmutable(); result.associatedServingConfigIds_ = associatedServingConfigIds_; } - if (((from_bitField0_ & 0x00000080) != 0)) { + if (((from_bitField0_ & 0x00000100) != 0)) { result.solutionType_ = solutionType_; } - if (((from_bitField0_ & 0x00000100) != 0)) { + if (((from_bitField0_ & 0x00000200) != 0)) { useCases_.makeImmutable(); result.useCases_ = useCases_; } @@ -4702,6 +9650,9 @@ private void buildPartialOneofs(com.google.cloud.discoveryengine.v1beta.Control if (actionCase_ == 10 && synonymsActionBuilder_ != null) { result.action_ = synonymsActionBuilder_.build(); } + if (actionCase_ == 15 && promoteActionBuilder_ != null) { + result.action_ = promoteActionBuilder_.build(); + } } @java.lang.Override @@ -4719,18 +9670,18 @@ public Builder mergeFrom(com.google.cloud.discoveryengine.v1beta.Control other) return this; if (!other.getName().isEmpty()) { name_ = other.name_; - bitField0_ |= 0x00000010; + bitField0_ |= 0x00000020; onChanged(); } if (!other.getDisplayName().isEmpty()) { displayName_ = other.displayName_; - bitField0_ |= 0x00000020; + bitField0_ |= 0x00000040; onChanged(); } if (!other.associatedServingConfigIds_.isEmpty()) { if (associatedServingConfigIds_.isEmpty()) { associatedServingConfigIds_ = other.associatedServingConfigIds_; - bitField0_ |= 0x00000040; + bitField0_ |= 0x00000080; } else { ensureAssociatedServingConfigIdsIsMutable(); associatedServingConfigIds_.addAll(other.associatedServingConfigIds_); @@ -4744,7 +9695,7 @@ public Builder mergeFrom(com.google.cloud.discoveryengine.v1beta.Control other) if (useCases_.isEmpty()) { useCases_ = other.useCases_; useCases_.makeImmutable(); - bitField0_ |= 0x00000100; + bitField0_ |= 0x00000200; } else { ensureUseCasesIsMutable(); useCases_.addAll(other.useCases_); @@ -4755,7 +9706,7 @@ public Builder mergeFrom(com.google.cloud.discoveryengine.v1beta.Control other) if (!other.conditions_.isEmpty()) { if (conditions_.isEmpty()) { conditions_ = other.conditions_; - bitField0_ = (bitField0_ & ~0x00000200); + bitField0_ = (bitField0_ & ~0x00000400); } else { ensureConditionsIsMutable(); conditions_.addAll(other.conditions_); @@ -4768,7 +9719,7 @@ public Builder mergeFrom(com.google.cloud.discoveryengine.v1beta.Control other) conditionsBuilder_.dispose(); conditionsBuilder_ = null; conditions_ = other.conditions_; - bitField0_ = (bitField0_ & ~0x00000200); + bitField0_ = (bitField0_ & ~0x00000400); conditionsBuilder_ = com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? internalGetConditionsFieldBuilder() @@ -4799,6 +9750,11 @@ public Builder mergeFrom(com.google.cloud.discoveryengine.v1beta.Control other) mergeSynonymsAction(other.getSynonymsAction()); break; } + case PROMOTE_ACTION: + { + mergePromoteAction(other.getPromoteAction()); + break; + } case ACTION_NOT_SET: { break; @@ -4833,13 +9789,13 @@ public Builder mergeFrom( case 10: { name_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000010; + bitField0_ |= 0x00000020; break; } // case 10 case 18: { displayName_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000020; + bitField0_ |= 0x00000040; break; } // case 18 case 26: @@ -4852,7 +9808,7 @@ public Builder mergeFrom( case 32: { solutionType_ = input.readEnum(); - bitField0_ |= 0x00000080; + bitField0_ |= 0x00000100; break; } // case 32 case 42: @@ -4915,6 +9871,13 @@ public Builder mergeFrom( actionCase_ = 10; break; } // case 82 + case 122: + { + input.readMessage( + internalGetPromoteActionFieldBuilder().getBuilder(), extensionRegistry); + actionCase_ = 15; + break; + } // case 122 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -5866,6 +10829,231 @@ public Builder clearSynonymsAction() { return synonymsActionBuilder_; } + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.Control.PromoteAction, + com.google.cloud.discoveryengine.v1beta.Control.PromoteAction.Builder, + com.google.cloud.discoveryengine.v1beta.Control.PromoteActionOrBuilder> + promoteActionBuilder_; + + /** + * + * + *
            +     * Promote certain links based on predefined trigger queries.
            +     * 
            + * + * .google.cloud.discoveryengine.v1beta.Control.PromoteAction promote_action = 15; + * + * @return Whether the promoteAction field is set. + */ + @java.lang.Override + public boolean hasPromoteAction() { + return actionCase_ == 15; + } + + /** + * + * + *
            +     * Promote certain links based on predefined trigger queries.
            +     * 
            + * + * .google.cloud.discoveryengine.v1beta.Control.PromoteAction promote_action = 15; + * + * @return The promoteAction. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Control.PromoteAction getPromoteAction() { + if (promoteActionBuilder_ == null) { + if (actionCase_ == 15) { + return (com.google.cloud.discoveryengine.v1beta.Control.PromoteAction) action_; + } + return com.google.cloud.discoveryengine.v1beta.Control.PromoteAction.getDefaultInstance(); + } else { + if (actionCase_ == 15) { + return promoteActionBuilder_.getMessage(); + } + return com.google.cloud.discoveryengine.v1beta.Control.PromoteAction.getDefaultInstance(); + } + } + + /** + * + * + *
            +     * Promote certain links based on predefined trigger queries.
            +     * 
            + * + * .google.cloud.discoveryengine.v1beta.Control.PromoteAction promote_action = 15; + */ + public Builder setPromoteAction( + com.google.cloud.discoveryengine.v1beta.Control.PromoteAction value) { + if (promoteActionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + action_ = value; + onChanged(); + } else { + promoteActionBuilder_.setMessage(value); + } + actionCase_ = 15; + return this; + } + + /** + * + * + *
            +     * Promote certain links based on predefined trigger queries.
            +     * 
            + * + * .google.cloud.discoveryengine.v1beta.Control.PromoteAction promote_action = 15; + */ + public Builder setPromoteAction( + com.google.cloud.discoveryengine.v1beta.Control.PromoteAction.Builder builderForValue) { + if (promoteActionBuilder_ == null) { + action_ = builderForValue.build(); + onChanged(); + } else { + promoteActionBuilder_.setMessage(builderForValue.build()); + } + actionCase_ = 15; + return this; + } + + /** + * + * + *
            +     * Promote certain links based on predefined trigger queries.
            +     * 
            + * + * .google.cloud.discoveryengine.v1beta.Control.PromoteAction promote_action = 15; + */ + public Builder mergePromoteAction( + com.google.cloud.discoveryengine.v1beta.Control.PromoteAction value) { + if (promoteActionBuilder_ == null) { + if (actionCase_ == 15 + && action_ + != com.google.cloud.discoveryengine.v1beta.Control.PromoteAction + .getDefaultInstance()) { + action_ = + com.google.cloud.discoveryengine.v1beta.Control.PromoteAction.newBuilder( + (com.google.cloud.discoveryengine.v1beta.Control.PromoteAction) action_) + .mergeFrom(value) + .buildPartial(); + } else { + action_ = value; + } + onChanged(); + } else { + if (actionCase_ == 15) { + promoteActionBuilder_.mergeFrom(value); + } else { + promoteActionBuilder_.setMessage(value); + } + } + actionCase_ = 15; + return this; + } + + /** + * + * + *
            +     * Promote certain links based on predefined trigger queries.
            +     * 
            + * + * .google.cloud.discoveryengine.v1beta.Control.PromoteAction promote_action = 15; + */ + public Builder clearPromoteAction() { + if (promoteActionBuilder_ == null) { + if (actionCase_ == 15) { + actionCase_ = 0; + action_ = null; + onChanged(); + } + } else { + if (actionCase_ == 15) { + actionCase_ = 0; + action_ = null; + } + promoteActionBuilder_.clear(); + } + return this; + } + + /** + * + * + *
            +     * Promote certain links based on predefined trigger queries.
            +     * 
            + * + * .google.cloud.discoveryengine.v1beta.Control.PromoteAction promote_action = 15; + */ + public com.google.cloud.discoveryengine.v1beta.Control.PromoteAction.Builder + getPromoteActionBuilder() { + return internalGetPromoteActionFieldBuilder().getBuilder(); + } + + /** + * + * + *
            +     * Promote certain links based on predefined trigger queries.
            +     * 
            + * + * .google.cloud.discoveryengine.v1beta.Control.PromoteAction promote_action = 15; + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Control.PromoteActionOrBuilder + getPromoteActionOrBuilder() { + if ((actionCase_ == 15) && (promoteActionBuilder_ != null)) { + return promoteActionBuilder_.getMessageOrBuilder(); + } else { + if (actionCase_ == 15) { + return (com.google.cloud.discoveryengine.v1beta.Control.PromoteAction) action_; + } + return com.google.cloud.discoveryengine.v1beta.Control.PromoteAction.getDefaultInstance(); + } + } + + /** + * + * + *
            +     * Promote certain links based on predefined trigger queries.
            +     * 
            + * + * .google.cloud.discoveryengine.v1beta.Control.PromoteAction promote_action = 15; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.Control.PromoteAction, + com.google.cloud.discoveryengine.v1beta.Control.PromoteAction.Builder, + com.google.cloud.discoveryengine.v1beta.Control.PromoteActionOrBuilder> + internalGetPromoteActionFieldBuilder() { + if (promoteActionBuilder_ == null) { + if (!(actionCase_ == 15)) { + action_ = + com.google.cloud.discoveryengine.v1beta.Control.PromoteAction.getDefaultInstance(); + } + promoteActionBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.Control.PromoteAction, + com.google.cloud.discoveryengine.v1beta.Control.PromoteAction.Builder, + com.google.cloud.discoveryengine.v1beta.Control.PromoteActionOrBuilder>( + (com.google.cloud.discoveryengine.v1beta.Control.PromoteAction) action_, + getParentForChildren(), + isClean()); + action_ = null; + } + actionCase_ = 15; + onChanged(); + return promoteActionBuilder_; + } + private java.lang.Object name_ = ""; /** @@ -5934,7 +11122,7 @@ public Builder setName(java.lang.String value) { throw new NullPointerException(); } name_ = value; - bitField0_ |= 0x00000010; + bitField0_ |= 0x00000020; onChanged(); return this; } @@ -5953,7 +11141,7 @@ public Builder setName(java.lang.String value) { */ public Builder clearName() { name_ = getDefaultInstance().getName(); - bitField0_ = (bitField0_ & ~0x00000010); + bitField0_ = (bitField0_ & ~0x00000020); onChanged(); return this; } @@ -5977,7 +11165,7 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { } checkByteStringIsUtf8(value); name_ = value; - bitField0_ |= 0x00000010; + bitField0_ |= 0x00000020; onChanged(); return this; } @@ -6056,7 +11244,7 @@ public Builder setDisplayName(java.lang.String value) { throw new NullPointerException(); } displayName_ = value; - bitField0_ |= 0x00000020; + bitField0_ |= 0x00000040; onChanged(); return this; } @@ -6077,7 +11265,7 @@ public Builder setDisplayName(java.lang.String value) { */ public Builder clearDisplayName() { displayName_ = getDefaultInstance().getDisplayName(); - bitField0_ = (bitField0_ & ~0x00000020); + bitField0_ = (bitField0_ & ~0x00000040); onChanged(); return this; } @@ -6103,7 +11291,7 @@ public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { } checkByteStringIsUtf8(value); displayName_ = value; - bitField0_ |= 0x00000020; + bitField0_ |= 0x00000040; onChanged(); return this; } @@ -6116,7 +11304,7 @@ private void ensureAssociatedServingConfigIdsIsMutable() { associatedServingConfigIds_ = new com.google.protobuf.LazyStringArrayList(associatedServingConfigIds_); } - bitField0_ |= 0x00000040; + bitField0_ |= 0x00000080; } /** @@ -6221,7 +11409,7 @@ public Builder setAssociatedServingConfigIds(int index, java.lang.String value) } ensureAssociatedServingConfigIdsIsMutable(); associatedServingConfigIds_.set(index, value); - bitField0_ |= 0x00000040; + bitField0_ |= 0x00000080; onChanged(); return this; } @@ -6248,7 +11436,7 @@ public Builder addAssociatedServingConfigIds(java.lang.String value) { } ensureAssociatedServingConfigIdsIsMutable(); associatedServingConfigIds_.add(value); - bitField0_ |= 0x00000040; + bitField0_ |= 0x00000080; onChanged(); return this; } @@ -6272,7 +11460,7 @@ public Builder addAssociatedServingConfigIds(java.lang.String value) { public Builder addAllAssociatedServingConfigIds(java.lang.Iterable values) { ensureAssociatedServingConfigIdsIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll(values, associatedServingConfigIds_); - bitField0_ |= 0x00000040; + bitField0_ |= 0x00000080; onChanged(); return this; } @@ -6294,7 +11482,7 @@ public Builder addAllAssociatedServingConfigIds(java.lang.Iterable values) java.util.Collections.emptyList(); private void ensureConditionsIsMutable() { - if (!((bitField0_ & 0x00000200) != 0)) { + if (!((bitField0_ & 0x00000400) != 0)) { conditions_ = new java.util.ArrayList(conditions_); - bitField0_ |= 0x00000200; + bitField0_ |= 0x00000400; } } @@ -7036,7 +12224,7 @@ public Builder addAllConditions( public Builder clearConditions() { if (conditionsBuilder_ == null) { conditions_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000200); + bitField0_ = (bitField0_ & ~0x00000400); onChanged(); } else { conditionsBuilder_.clear(); @@ -7197,7 +12385,7 @@ public com.google.cloud.discoveryengine.v1beta.Condition.Builder addConditionsBu com.google.cloud.discoveryengine.v1beta.Condition, com.google.cloud.discoveryengine.v1beta.Condition.Builder, com.google.cloud.discoveryengine.v1beta.ConditionOrBuilder>( - conditions_, ((bitField0_ & 0x00000200) != 0), getParentForChildren(), isClean()); + conditions_, ((bitField0_ & 0x00000400) != 0), getParentForChildren(), isClean()); conditions_ = null; } return conditionsBuilder_; diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ControlOrBuilder.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ControlOrBuilder.java index 25fbeb9460c3..b0460e565881 100644 --- a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ControlOrBuilder.java +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ControlOrBuilder.java @@ -179,6 +179,44 @@ public interface ControlOrBuilder com.google.cloud.discoveryengine.v1beta.Control.SynonymsActionOrBuilder getSynonymsActionOrBuilder(); + /** + * + * + *
            +   * Promote certain links based on predefined trigger queries.
            +   * 
            + * + * .google.cloud.discoveryengine.v1beta.Control.PromoteAction promote_action = 15; + * + * @return Whether the promoteAction field is set. + */ + boolean hasPromoteAction(); + + /** + * + * + *
            +   * Promote certain links based on predefined trigger queries.
            +   * 
            + * + * .google.cloud.discoveryengine.v1beta.Control.PromoteAction promote_action = 15; + * + * @return The promoteAction. + */ + com.google.cloud.discoveryengine.v1beta.Control.PromoteAction getPromoteAction(); + + /** + * + * + *
            +   * Promote certain links based on predefined trigger queries.
            +   * 
            + * + * .google.cloud.discoveryengine.v1beta.Control.PromoteAction promote_action = 15; + */ + com.google.cloud.discoveryengine.v1beta.Control.PromoteActionOrBuilder + getPromoteActionOrBuilder(); + /** * * diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ControlProto.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ControlProto.java index f9c873a9355c..703495a5abbe 100644 --- a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ControlProto.java +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ControlProto.java @@ -60,6 +60,14 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_discoveryengine_v1beta_Control_BoostAction_descriptor; static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_cloud_discoveryengine_v1beta_Control_BoostAction_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1beta_Control_BoostAction_InterpolationBoostSpec_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1beta_Control_BoostAction_InterpolationBoostSpec_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1beta_Control_BoostAction_InterpolationBoostSpec_ControlPoint_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1beta_Control_BoostAction_InterpolationBoostSpec_ControlPoint_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_discoveryengine_v1beta_Control_FilterAction_descriptor; static final com.google.protobuf.GeneratedMessage.FieldAccessorTable @@ -72,6 +80,10 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_discoveryengine_v1beta_Control_SynonymsAction_descriptor; static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_cloud_discoveryengine_v1beta_Control_SynonymsAction_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1beta_Control_PromoteAction_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1beta_Control_PromoteAction_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { return descriptor; @@ -97,7 +109,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "full_match\030\002 \001(\010\032i\n" + "\tTimeRange\022.\n\n" + "start_time\030\001 \001(\0132\032.google.protobuf.Timestamp\022,\n" - + "\010end_time\030\002 \001(\0132\032.google.protobuf.Timestamp\"\260\n\n" + + "\010end_time\030\002 \001(\0132\032.google.protobuf.Timestamp\"\355\022\n" + "\007Control\022P\n" + "\014boost_action\030\006 \001(\01328.google.cloud." + "discoveryengine.v1beta.Control.BoostActionH\000\022R\n\r" @@ -106,20 +118,47 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\017redirect_action\030\t \001(\0132;.goog" + "le.cloud.discoveryengine.v1beta.Control.RedirectActionH\000\022V\n" + "\017synonyms_action\030\n" - + " \001(\0132;.google.cloud.discoveryengine.v1beta.Control.SynonymsActionH\000\022\021\n" + + " \001(\0132;.google.cloud.discoveryengine.v1beta.Control.SynonymsActionH\000\022T\n" + + "\016promote_action\030\017" + + " \001(\0132:.google.cloud.discoveryengine.v1beta.Control.PromoteActionH\000\022\021\n" + "\004name\030\001 \001(\tB\003\340A\005\022\031\n" + "\014display_name\030\002 \001(\tB\003\340A\002\022*\n" + "\035associated_serving_config_ids\030\003 \003(\tB\003\340A\003\022P\n\r" - + "solution_type\030\004" - + " \001(\01621.google.cloud.discoveryengine.v1beta.SolutionTypeB\006\340A\002\340A\005\022E\n" + + "solution_type\030\004 \001(\01621.google.cloud.d" + + "iscoveryengine.v1beta.SolutionTypeB\006\340A\002\340A\005\022E\n" + "\tuse_cases\030\010" + " \003(\01622.google.cloud.discoveryengine.v1beta.SearchUseCase\022B\n\n" - + "conditions\030\005 \003(\0132..google.cloud.discoveryengine.v1beta.Condition\032|\n" - + "\013BoostAction\022\022\n" - + "\005boost\030\001 \001(\002B\003\340A\002\022\023\n" + + "conditions\030\005" + + " \003(\0132..google.cloud.discoveryengine.v1beta.Condition\032\254\007\n" + + "\013BoostAction\022\032\n" + + "\013fixed_boost\030\004 \001(\002B\003\340A\001H\000\022x\n" + + "\030interpolation_boost_spec\030\005 \001(\0132O.google.cloud.disco" + + "veryengine.v1beta.Control.BoostAction.InterpolationBoostSpecB\003\340A\001H\000\022\021\n" + + "\005boost\030\001 \001(\002B\002\030\001\022\023\n" + "\006filter\030\002 \001(\tB\003\340A\002\022D\n\n" + "data_store\030\003 \001(\tB0\340A\002\372A*\n" - + "(discoveryengine.googleapis.com/DataStore\032i\n" + + "(discoveryengine.googleapis.com/DataStore\032\212\005\n" + + "\026InterpolationBoostSpec\022\027\n\n" + + "field_name\030\001 \001(\tB\003\340A\001\022z\n" + + "\016attribute_type\030\002 \001(\0162].google.cloud.discoveryen" + + "gine.v1beta.Control.BoostAction.InterpolationBoostSpec.AttributeTypeB\003\340A\001\022\202\001\n" + + "\022interpolation_type\030\003 \001(\0162a.google.cloud.di" + + "scoveryengine.v1beta.Control.BoostAction" + + ".InterpolationBoostSpec.InterpolationTypeB\003\340A\001\022y\n" + + "\016control_points\030\004 \003(\0132\\.google." + + "cloud.discoveryengine.v1beta.Control.Boo" + + "stAction.InterpolationBoostSpec.ControlPointB\003\340A\001\032G\n" + + "\014ControlPoint\022\034\n" + + "\017attribute_value\030\001 \001(\tB\003\340A\001\022\031\n" + + "\014boost_amount\030\002 \001(\002B\003\340A\001\"M\n\r" + + "AttributeType\022\036\n" + + "\032ATTRIBUTE_TYPE_UNSPECIFIED\020\000\022\r\n" + + "\tNUMERICAL\020\001\022\r\n" + + "\tFRESHNESS\020\002\"C\n" + + "\021InterpolationType\022\"\n" + + "\036INTERPOLATION_TYPE_UNSPECIFIED\020\000\022\n\n" + + "\006LINEAR\020\001B\014\n\n" + + "boost_spec\032i\n" + "\014FilterAction\022\023\n" + "\006filter\030\001 \001(\tB\003\340A\002\022D\n\n" + "data_store\030\002 \001(\tB0\340A\002\372A*\n" @@ -127,19 +166,24 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\016RedirectAction\022\031\n" + "\014redirect_uri\030\001 \001(\tB\003\340A\002\032\"\n" + "\016SynonymsAction\022\020\n" - + "\010synonyms\030\001 \003(\t:\323\002\352A\317\002\n" - + "&discoveryengine.googleapis.com/Control\022Rprojects/{project}/loc" - + "ations/{location}/dataStores/{data_store}/controls/{control}\022kprojects/{project}" - + "/locations/{location}/collections/{collection}/dataStores/{data_store}/controls/" - + "{control}\022dprojects/{project}/locations/" - + "{location}/collections/{collection}/engines/{engine}/controls/{control}B\010\n" + + "\010synonyms\030\001 \003(\t\032\263\001\n\r" + + "PromoteAction\022D\n\n" + + "data_store\030\001 \001(\tB0\340A\002\372A*\n" + + "(discoveryengine.googleapis.com/DataStore\022\\\n" + + "\025search_link_promotion\030\002 \001(\01328.google" + + ".cloud.discoveryengine.v1beta.SearchLinkPromotionB\003\340A\002:\323\002\352A\317\002\n" + + "&discoveryengine.googleapis.com/Control\022Rprojects/{project" + + "}/locations/{location}/dataStores/{data_store}/controls/{control}\022kprojects/{pro" + + "ject}/locations/{location}/collections/{collection}/dataStores/{data_store}/cont" + + "rols/{control}\022dprojects/{project}/locat" + + "ions/{location}/collections/{collection}/engines/{engine}/controls/{control}B\010\n" + "\006actionB\223\002\n" - + "\'com.google.cloud.discoveryengine.v1betaB\014ControlProtoP\001ZQcloud.google.com/" - + "go/discoveryengine/apiv1beta/discoveryen" - + "ginepb;discoveryenginepb\242\002\017DISCOVERYENGI" - + "NE\252\002#Google.Cloud.DiscoveryEngine.V1Beta" - + "\312\002#Google\\Cloud\\DiscoveryEngine\\V1beta\352\002" - + "&Google::Cloud::DiscoveryEngine::V1betab\006proto3" + + "\'com.google.cloud.discoveryengine.v1betaB\014ControlProtoP\001ZQcloud.google" + + ".com/go/discoveryengine/apiv1beta/discov" + + "eryenginepb;discoveryenginepb\242\002\017DISCOVER" + + "YENGINE\252\002#Google.Cloud.DiscoveryEngine.V" + + "1Beta\312\002#Google\\Cloud\\DiscoveryEngine\\V1b" + + "eta\352\002&Google::Cloud::DiscoveryEngine::V1betab\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -184,6 +228,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "FilterAction", "RedirectAction", "SynonymsAction", + "PromoteAction", "Name", "DisplayName", "AssociatedServingConfigIds", @@ -198,7 +243,25 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_cloud_discoveryengine_v1beta_Control_BoostAction_descriptor, new java.lang.String[] { - "Boost", "Filter", "DataStore", + "FixedBoost", "InterpolationBoostSpec", "Boost", "Filter", "DataStore", "BoostSpec", + }); + internal_static_google_cloud_discoveryengine_v1beta_Control_BoostAction_InterpolationBoostSpec_descriptor = + internal_static_google_cloud_discoveryengine_v1beta_Control_BoostAction_descriptor + .getNestedType(0); + internal_static_google_cloud_discoveryengine_v1beta_Control_BoostAction_InterpolationBoostSpec_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1beta_Control_BoostAction_InterpolationBoostSpec_descriptor, + new java.lang.String[] { + "FieldName", "AttributeType", "InterpolationType", "ControlPoints", + }); + internal_static_google_cloud_discoveryengine_v1beta_Control_BoostAction_InterpolationBoostSpec_ControlPoint_descriptor = + internal_static_google_cloud_discoveryengine_v1beta_Control_BoostAction_InterpolationBoostSpec_descriptor + .getNestedType(0); + internal_static_google_cloud_discoveryengine_v1beta_Control_BoostAction_InterpolationBoostSpec_ControlPoint_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1beta_Control_BoostAction_InterpolationBoostSpec_ControlPoint_descriptor, + new java.lang.String[] { + "AttributeValue", "BoostAmount", }); internal_static_google_cloud_discoveryengine_v1beta_Control_FilterAction_descriptor = internal_static_google_cloud_discoveryengine_v1beta_Control_descriptor.getNestedType(1); @@ -224,6 +287,14 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "Synonyms", }); + internal_static_google_cloud_discoveryengine_v1beta_Control_PromoteAction_descriptor = + internal_static_google_cloud_discoveryengine_v1beta_Control_descriptor.getNestedType(4); + internal_static_google_cloud_discoveryengine_v1beta_Control_PromoteAction_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1beta_Control_PromoteAction_descriptor, + new java.lang.String[] { + "DataStore", "SearchLinkPromotion", + }); descriptor.resolveAllFeaturesImmutable(); com.google.api.FieldBehaviorProto.getDescriptor(); com.google.api.ResourceProto.getDescriptor(); diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ControlServiceProto.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ControlServiceProto.java index 477083127ae2..1b9bdc62c0ea 100644 --- a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ControlServiceProto.java +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ControlServiceProto.java @@ -105,7 +105,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\006filter\030\004 \001(\tB\003\340A\001\"o\n" + "\024ListControlsResponse\022>\n" + "\010controls\030\001 \003(\0132,.google.cloud.discoveryengine.v1beta.Control\022\027\n" - + "\017next_page_token\030\002 \001(\t2\305\017\n" + + "\017next_page_token\030\002 \001(\t2\303\020\n" + "\016ControlService\022\223\003\n\r" + "CreateControl\0229.google.cloud.discoveryengi" + "ne.v1beta.CreateControlRequest\032,.google." @@ -140,14 +140,15 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "t=projects/*/locations/*/dataStores/*}/controlsZM\022K/v1beta/{parent=projects/*/lo" + "cations/*/collections/*/dataStores/*}/controlsZJ\022H/v1beta/{parent=projects/*/loc" + "ations/*/collections/*/engines/*}/contro" - + "ls\032R\312A\036discoveryengine.googleapis.com\322A." - + "https://www.googleapis.com/auth/cloud-platformB\232\002\n" - + "\'com.google.cloud.discoveryengine.v1betaB\023ControlServiceProtoP\001ZQcloud" - + ".google.com/go/discoveryengine/apiv1beta" - + "/discoveryenginepb;discoveryenginepb\242\002\017D" - + "ISCOVERYENGINE\252\002#Google.Cloud.DiscoveryE" - + "ngine.V1Beta\312\002#Google\\Cloud\\DiscoveryEng" - + "ine\\V1beta\352\002&Google::Cloud::DiscoveryEngine::V1betab\006proto3" + + "ls\032\317\001\312A\036discoveryengine.googleapis.com\322A" + + "\252\001https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth" + + "/discoveryengine.readwrite,https://www.g" + + "oogleapis.com/auth/discoveryengine.serving.readwriteB\232\002\n" + + "\'com.google.cloud.discoveryengine.v1betaB\023ControlServiceProtoP\001Z" + + "Qcloud.google.com/go/discoveryengine/apiv1beta/discoveryenginepb;discoveryengine" + + "pb\242\002\017DISCOVERYENGINE\252\002#Google.Cloud.Disc" + + "overyEngine.V1Beta\312\002#Google\\Cloud\\Discov" + + "eryEngine\\V1beta\352\002&Google::Cloud::DiscoveryEngine::V1betab\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ConversationalSearchServiceProto.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ConversationalSearchServiceProto.java index c52fe958bd5e..f4a74b4fec85 100644 --- a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ConversationalSearchServiceProto.java +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ConversationalSearchServiceProto.java @@ -84,6 +84,10 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_SafetySpec_descriptor; static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_SafetySpec_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_SafetySpec_SafetySetting_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_SafetySpec_SafetySetting_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_RelatedQuestionsSpec_descriptor; static final com.google.protobuf.GeneratedMessage.FieldAccessorTable @@ -104,6 +108,10 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_AnswerGenerationSpec_PromptSpec_descriptor; static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_AnswerGenerationSpec_PromptSpec_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_AnswerGenerationSpec_MultimodalSpec_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_AnswerGenerationSpec_MultimodalSpec_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_SearchSpec_descriptor; static final com.google.protobuf.GeneratedMessage.FieldAccessorTable @@ -156,6 +164,26 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_QueryUnderstandingSpec_QueryRephraserSpec_descriptor; static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_QueryUnderstandingSpec_QueryRephraserSpec_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_QueryUnderstandingSpec_QueryRephraserSpec_ModelSpec_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_QueryUnderstandingSpec_QueryRephraserSpec_ModelSpec_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_EndUserSpec_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_EndUserSpec_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_EndUserSpec_EndUserMetaData_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_EndUserSpec_EndUserMetaData_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_EndUserSpec_EndUserMetaData_ChunkInfo_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_EndUserSpec_EndUserMetaData_ChunkInfo_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_EndUserSpec_EndUserMetaData_ChunkInfo_DocumentMetadata_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_EndUserSpec_EndUserMetaData_ChunkInfo_DocumentMetadata_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_UserLabelsEntry_descriptor; static final com.google.protobuf.GeneratedMessage.FieldAccessorTable @@ -207,24 +235,25 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "pi/annotations.proto\032\027google/api/client." + "proto\032\037google/api/field_behavior.proto\032\031" + "google/api/resource.proto\0320google/cloud/discoveryengine/v1beta/answer.proto\0326goo" - + "gle/cloud/discoveryengine/v1beta/conversation.proto\0328google/cloud/discoveryengin" - + "e/v1beta/search_service.proto\0321google/cl" - + "oud/discoveryengine/v1beta/session.proto\032\033google/protobuf/empty.proto\032" + + "gle/cloud/discoveryengine/v1beta/conversation.proto\0320google/cloud/discoveryengin" + + "e/v1beta/safety.proto\0328google/cloud/discoveryengine/v1beta/search_service.proto\032" + + "1google/cloud/discoveryengine/v1beta/ses" + + "sion.proto\032\033google/protobuf/empty.proto\032" + " google/protobuf/field_mask.proto\"\261\005\n" + "\033ConverseConversationRequest\022A\n" + "\004name\030\001 \001(\tB3\340A\002\372A-\n" + "+discoveryengine.googleapis.com/Conversation\022B\n" - + "\005query\030\002" - + " \001(\0132..google.cloud.discoveryengine.v1beta.TextInputB\003\340A\002\022I\n" + + "\005query\030\002 \001(\0132..google.clo" + + "ud.discoveryengine.v1beta.TextInputB\003\340A\002\022I\n" + "\016serving_config\030\003 \001(\tB1\372A.\n" + ",discoveryengine.googleapis.com/ServingConfig\022G\n" + "\014conversation\030\005" + " \001(\01321.google.cloud.discoveryengine.v1beta.Conversation\022\023\n" + "\013safe_search\030\006 \001(\010\022e\n" - + "\013user_labels\030\007 \003(\0132P.google.cloud.disc" - + "overyengine.v1beta.ConverseConversationRequest.UserLabelsEntry\022f\n" - + "\014summary_spec\030\010 \001(\0132P.google.cloud.discoveryengine.v1be" - + "ta.SearchRequest.ContentSearchSpec.SummarySpec\022\016\n" + + "\013user_labels\030\007 \003(\0132P.google." + + "cloud.discoveryengine.v1beta.ConverseConversationRequest.UserLabelsEntry\022f\n" + + "\014summary_spec\030\010 \001(\0132P.google.cloud.discoverye" + + "ngine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec\022\016\n" + "\006filter\030\t \001(\t\022P\n\n" + "boost_spec\030\n" + " \001(\0132<.google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec\0321\n" @@ -233,19 +262,19 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\005value\030\002 \001(\t:\0028\001\"\227\002\n" + "\034ConverseConversationResponse\0229\n" + "\005reply\030\001 \001(\0132*.google.cloud.discoveryengine.v1beta.Reply\022G\n" - + "\014conversation\030\002 \001(\01321.google.c" - + "loud.discoveryengine.v1beta.Conversation\022\031\n" + + "\014conversation\030\002 \001(\0132" + + "1.google.cloud.discoveryengine.v1beta.Conversation\022\031\n" + "\021related_questions\030\006 \003(\t\022X\n" - + "\016search_results\030\003 \003(\0132@.google.cloud.discoveryengi" - + "ne.v1beta.SearchResponse.SearchResult\"\253\001\n" + + "\016search_results\030\003 \003(\0132@.google.cloud.dis" + + "coveryengine.v1beta.SearchResponse.SearchResult\"\253\001\n" + "\031CreateConversationRequest\022@\n" + "\006parent\030\001 \001(\tB0\340A\002\372A*\n" + "(discoveryengine.googleapis.com/DataStore\022L\n" - + "\014conversation\030\002 \001(\01321.go" - + "ogle.cloud.discoveryengine.v1beta.ConversationB\003\340A\002\"\232\001\n" + + "\014conversation\030\002" + + " \001(\01321.google.cloud.discoveryengine.v1beta.ConversationB\003\340A\002\"\232\001\n" + "\031UpdateConversationRequest\022L\n" - + "\014conversation\030\001 \001(\01321.google.cloud.d" - + "iscoveryengine.v1beta.ConversationB\003\340A\002\022/\n" + + "\014conversation\030\001 \001(\01321.goog" + + "le.cloud.discoveryengine.v1beta.ConversationB\003\340A\002\022/\n" + "\013update_mask\030\002 \001(\0132\032.google.protobuf.FieldMask\"^\n" + "\031DeleteConversationRequest\022A\n" + "\004name\030\001 \001(\tB3\340A\002\372A-\n" @@ -261,9 +290,9 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\006filter\030\004 \001(\t\022\020\n" + "\010order_by\030\005 \001(\t\"~\n" + "\031ListConversationsResponse\022H\n\r" - + "conversations\030\001" - + " \003(\01321.google.cloud.discoveryengine.v1beta.Conversation\022\027\n" - + "\017next_page_token\030\002 \001(\t\"\305&\n" + + "conversations\030\001 \003(\01321.google.clo" + + "ud.discoveryengine.v1beta.Conversation\022\027\n" + + "\017next_page_token\030\002 \001(\t\"\2715\n" + "\022AnswerQueryRequest\022L\n" + "\016serving_config\030\001 \001(\tB4\340A\002\372A.\n" + ",discoveryengine.googleapis.com/ServingConfig\022>\n" @@ -271,94 +300,120 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + " \001(\0132*.google.cloud.discoveryengine.v1beta.QueryB\003\340A\002\022<\n" + "\007session\030\003 \001(\tB+\372A(\n" + "&discoveryengine.googleapis.com/Session\022W\n" - + "\013safety_spec\030\004 \001(\0132B.google.cloud.dis" - + "coveryengine.v1beta.AnswerQueryRequest.SafetySpec\022l\n" - + "\026related_questions_spec\030\005 \001(\0132L.google.cloud.discoveryengine.v1beta." - + "AnswerQueryRequest.RelatedQuestionsSpec\022b\n" - + "\016grounding_spec\030\006 \001(\0132E.google.cloud.d" - + "iscoveryengine.v1beta.AnswerQueryRequest.GroundingSpecB\003\340A\001\022l\n" - + "\026answer_generation_spec\030\007 \001(\0132L.google.cloud.discoveryengi" - + "ne.v1beta.AnswerQueryRequest.AnswerGenerationSpec\022W\n" - + "\013search_spec\030\010 \001(\0132B.google." - + "cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec\022p\n" - + "\030query_understanding_spec\030\t \001(\0132N.google.cloud.discoveryeng" - + "ine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec\022\035\n" + + "\013safety_spec\030\004 \001(\0132B.google" + + ".cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec\022l\n" + + "\026related_questions_spec\030\005 \001(\0132L.google.cloud.discoveryengi" + + "ne.v1beta.AnswerQueryRequest.RelatedQuestionsSpec\022b\n" + + "\016grounding_spec\030\006 \001(\0132E.goog" + + "le.cloud.discoveryengine.v1beta.AnswerQueryRequest.GroundingSpecB\003\340A\001\022l\n" + + "\026answer_generation_spec\030\007 \001(\0132L.google.cloud.dis" + + "coveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec\022W\n" + + "\013search_spec\030\010 \001(\013" + + "2B.google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec\022p\n" + + "\030query_understanding_spec\030\t \001(\0132N.google.cloud.di" + + "scoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec\022\035\n" + "\021asynchronous_mode\030\n" + " \001(\010B\002\030\001\022\026\n" + "\016user_pseudo_id\030\014 \001(\t\022\\\n" + "\013user_labels\030\r" - + " \003(\0132G.google.cloud.discoveryengine." - + "v1beta.AnswerQueryRequest.UserLabelsEntry\032\034\n\n" + + " \003(\0132G.google.cloud.discov" + + "eryengine.v1beta.AnswerQueryRequest.UserLabelsEntry\022_\n\r" + + "end_user_spec\030\016 \001(\0132C.goo" + + "gle.cloud.discoveryengine.v1beta.AnswerQueryRequest.EndUserSpecB\003\340A\001\032\205\004\n\n" + "SafetySpec\022\016\n" - + "\006enable\030\001 \001(\010\032&\n" + + "\006enable\030\001 \001(\010\022n\n" + + "\017safety_settings\030\002 \003(\0132P.google.cloud.discoveryengine.v1be" + + "ta.AnswerQueryRequest.SafetySpec.SafetySettingB\003\340A\001\032\366\002\n\r" + + "SafetySetting\022H\n" + + "\010category\030\001" + + " \001(\01621.google.cloud.discoveryengine.v1beta.HarmCategoryB\003\340A\002\022{\n" + + "\tthreshold\030\002 \001(\0162c.google.cloud.discoveryengine.v1beta" + + ".AnswerQueryRequest.SafetySpec.SafetySetting.HarmBlockThresholdB\003\340A\002\"\235\001\n" + + "\022HarmBlockThreshold\022$\n" + + " HARM_BLOCK_THRESHOLD_UNSPECIFIED\020\000\022\027\n" + + "\023BLOCK_LOW_AND_ABOVE\020\001\022\032\n" + + "\026BLOCK_MEDIUM_AND_ABOVE\020\002\022\023\n" + + "\017BLOCK_ONLY_HIGH\020\003\022\016\n\n" + + "BLOCK_NONE\020\004\022\007\n" + + "\003OFF\020\005\032&\n" + "\024RelatedQuestionsSpec\022\016\n" + "\006enable\030\001 \001(\010\032\222\002\n\r" + "GroundingSpec\022\'\n" + "\032include_grounding_supports\030\002 \001(\010B\003\340A\001\022r\n" - + "\017filtering_level\030\003 \001(\0162T.google.cloud.discoveryengine.v1beta.Answer" - + "QueryRequest.GroundingSpec.FilteringLevelB\003\340A\001\"d\n" + + "\017filtering_level\030\003 \001(\0162T.google.cloud.discoveryengine.v1beta.AnswerQue" + + "ryRequest.GroundingSpec.FilteringLevelB\003\340A\001\"d\n" + "\016FilteringLevel\022\037\n" + "\033FILTERING_LEVEL_UNSPECIFIED\020\000\022\027\n" + "\023FILTERING_LEVEL_LOW\020\001\022\030\n" - + "\024FILTERING_LEVEL_HIGH\020\002\032\253\004\n" + + "\024FILTERING_LEVEL_HIGH\020\002\032\271\007\n" + "\024AnswerGenerationSpec\022j\n\n" - + "model_spec\030\001 \001(\0132V.google.cloud.discoveryengine.v1beta.AnswerQu" - + "eryRequest.AnswerGenerationSpec.ModelSpec\022l\n" - + "\013prompt_spec\030\002 \001(\0132W.google.cloud.di" - + "scoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec.PromptSpec\022\031\n" + + "model_spec\030\001 \001(\0132V.google.cloud.discoveryengine.v1beta.AnswerQuery" + + "Request.AnswerGenerationSpec.ModelSpec\022l\n" + + "\013prompt_spec\030\002 \001(\0132W.google.cloud.disco" + + "veryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec.PromptSpec\022\031\n" + "\021include_citations\030\003 \001(\010\022\034\n" + "\024answer_language_code\030\004 \001(\t\022 \n" + "\030ignore_adversarial_query\030\005 \001(\010\022\'\n" + "\037ignore_non_answer_seeking_query\030\006 \001(\010\022(\n" + "\033ignore_low_relevant_content\030\007 \001(\010H\000\210\001\001\022\'\n" - + "\032ignore_jail_breaking_query\030\010 \001(\010B\003\340A\001\032\"\n" + + "\032ignore_jail_breaking_query\030\010 \001(\010B\003\340A\001\022y\n" + + "\017multimodal_spec\030\t \001(\0132[.google.cl" + + "oud.discoveryengine.v1beta.AnswerQueryRe" + + "quest.AnswerGenerationSpec.MultimodalSpecB\003\340A\001\032\"\n" + "\tModelSpec\022\025\n\r" + "model_version\030\001 \001(\t\032\036\n\n" + "PromptSpec\022\020\n" - + "\010preamble\030\001 \001(\tB\036\n" + + "\010preamble\030\001 \001(\t\032\220\002\n" + + "\016MultimodalSpec\022\202\001\n" + + "\014image_source\030\003 \001(\0162g.google.cloud.discoveryengine.v1beta.Answe" + + "rQueryRequest.AnswerGenerationSpec.MultimodalSpec.ImageSourceB\003\340A\001\"y\n" + + "\013ImageSource\022\034\n" + + "\030IMAGE_SOURCE_UNSPECIFIED\020\000\022\031\n" + + "\025ALL_AVAILABLE_SOURCES\020\001\022\025\n" + + "\021CORPUS_IMAGE_ONLY\020\002\022\032\n" + + "\026FIGURE_GENERATION_ONLY\020\003B\036\n" + "\034_ignore_low_relevant_content\032\234\022\n\n" + "SearchSpec\022h\n\r" - + "search_params\030\001 \001(\0132O.google.cloud." - + "discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchParamsH\000\022q\n" - + "\022search_result_list\030\002 \001(\0132S.google.cloud.discovery" - + "engine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultListH\000\032\200\004\n" + + "search_params\030\001 \001(\0132O.google.cloud.disco" + + "veryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchParamsH\000\022q\n" + + "\022search_result_list\030\002 \001(\0132S.google.cloud.discoveryengin" + + "e.v1beta.AnswerQueryRequest.SearchSpec.SearchResultListH\000\032\200\004\n" + "\014SearchParams\022\032\n" + "\022max_return_results\030\001 \001(\005\022\016\n" + "\006filter\030\002 \001(\t\022P\n\n" - + "boost_spec\030\003 \001(\0132<.google.cloud.d" - + "iscoveryengine.v1beta.SearchRequest.BoostSpec\022\020\n" + + "boost_spec\030\003 \001(\0132<.google.cloud.discov" + + "eryengine.v1beta.SearchRequest.BoostSpec\022\020\n" + "\010order_by\030\004 \001(\t\022q\n" - + "\022search_result_mode\030\005 \001(\0162U.google.cloud.discoveryengi" - + "ne.v1beta.SearchRequest.ContentSearchSpec.SearchResultMode\022Z\n" - + "\020data_store_specs\030\007" - + " \003(\0132@.google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec\022\220\001\n" - + ")natural_language_query_understanding_spec\030\010 \001" - + "(\0132X.google.cloud.discoveryengine.v1beta" - + ".SearchRequest.NaturalLanguageQueryUnderstandingSpecB\003\340A\001\032\244\014\n" + + "\022search_result_mode\030\005 \001(\0162U.google.cloud.discoveryengine.v1" + + "beta.SearchRequest.ContentSearchSpec.SearchResultMode\022Z\n" + + "\020data_store_specs\030\007 \003(\0132" + + "@.google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec\022\220\001\n" + + ")natural_language_query_understanding_spec\030\010 \001(\0132X." + + "google.cloud.discoveryengine.v1beta.Sear" + + "chRequest.NaturalLanguageQueryUnderstandingSpecB\003\340A\001\032\244\014\n" + "\020SearchResultList\022x\n" - + "\016search_results\030\001 \003(\0132`.google.cloud.di" - + "scoveryengine.v1beta.AnswerQueryRequest." - + "SearchSpec.SearchResultList.SearchResult\032\225\013\n" + + "\016search_results\030\001 \003(\0132`.google.cloud.discove" + + "ryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult\032\225\013\n" + "\014SearchResult\022\237\001\n" - + "\032unstructured_document_info\030\001 \001(\0132y.google.cloud.discoverye" - + "ngine.v1beta.AnswerQueryRequest.SearchSp" - + "ec.SearchResultList.SearchResult.UnstructuredDocumentInfoH\000\022\200\001\n\n" - + "chunk_info\030\002 \001(\0132j.google.cloud.discoveryengine.v1beta.A" - + "nswerQueryRequest.SearchSpec.SearchResultList.SearchResult.ChunkInfoH\000\032\262\006\n" + + "\032unstructured_document_info\030\001 \001(\0132y.google.cloud.discoveryengine" + + ".v1beta.AnswerQueryRequest.SearchSpec.Se" + + "archResultList.SearchResult.UnstructuredDocumentInfoH\000\022\200\001\n\n" + + "chunk_info\030\002 \001(\0132j.google.cloud.discoveryengine.v1beta.Answer" + + "QueryRequest.SearchSpec.SearchResultList.SearchResult.ChunkInfoH\000\032\262\006\n" + "\030UnstructuredDocumentInfo\022>\n" + "\010document\030\001 \001(\tB,\372A)\n" + "\'discoveryengine.googleapis.com/Document\022\013\n" + "\003uri\030\002 \001(\t\022\r\n" + "\005title\030\003 \001(\t\022\245\001\n" - + "\021document_contexts\030\004 \003(\0132\211\001.google.cloud.disc" - + "overyengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.U" - + "nstructuredDocumentInfo.DocumentContext\022\251\001\n" - + "\023extractive_segments\030\005 \003(\0132\213\001.google." - + "cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.Sear" - + "chResult.UnstructuredDocumentInfo.ExtractiveSegment\022\253\001\n" - + "\022extractive_answers\030\006 \003(\0132\212\001.google.cloud.discoveryengine.v1beta." - + "AnswerQueryRequest.SearchSpec.SearchResu" - + "ltList.SearchResult.UnstructuredDocumentInfo.ExtractiveAnswerB\002\030\001\032;\n" + + "\021document_contexts\030\004 \003(\0132\211\001.google.cloud.discovery" + + "engine.v1beta.AnswerQueryRequest.SearchS" + + "pec.SearchResultList.SearchResult.UnstructuredDocumentInfo.DocumentContext\022\251\001\n" + + "\023extractive_segments\030\005 \003(\0132\213\001.google.cloud" + + ".discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchRes" + + "ult.UnstructuredDocumentInfo.ExtractiveSegment\022\253\001\n" + + "\022extractive_answers\030\006 \003(\0132\212\001.g" + + "oogle.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultLis" + + "t.SearchResult.UnstructuredDocumentInfo.ExtractiveAnswerB\002\030\001\032;\n" + "\017DocumentContext\022\027\n" + "\017page_identifier\030\001 \001(\t\022\017\n" + "\007content\030\002 \001(\t\032=\n" @@ -372,33 +427,59 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\005chunk\030\001 \001(\tB)\372A&\n" + "$discoveryengine.googleapis.com/Chunk\022\017\n" + "\007content\030\002 \001(\t\022\226\001\n" - + "\021document_metadata\030\004 \001(\0132{.google.cloud.discoveryengine." - + "v1beta.AnswerQueryRequest.SearchSpec.Sea" - + "rchResultList.SearchResult.ChunkInfo.DocumentMetadata\032.\n" + + "\021document_metadata\030\004 \001(\0132{.google.cloud.discoveryengine.v1bet" + + "a.AnswerQueryRequest.SearchSpec.SearchRe" + + "sultList.SearchResult.ChunkInfo.DocumentMetadata\032.\n" + "\020DocumentMetadata\022\013\n" + "\003uri\030\001 \001(\t\022\r\n" + "\005title\030\002 \001(\tB\t\n" + "\007contentB\007\n" - + "\005input\032\216\005\n" + + "\005input\032\302\010\n" + "\026QueryUnderstandingSpec\022\211\001\n" - + "\031query_classification_spec\030\001 \001(\0132f.google.cloud." - + "discoveryengine.v1beta.AnswerQueryReques" - + "t.QueryUnderstandingSpec.QueryClassificationSpec\022\177\n" - + "\024query_rephraser_spec\030\002 \001(\0132a.google.cloud.discoveryengine.v1beta.Ans" - + "werQueryRequest.QueryUnderstandingSpec.QueryRephraserSpec\032\243\002\n" + + "\031query_classification_spec\030\001 \001(\0132f.google.cloud.disco" + + "veryengine.v1beta.AnswerQueryRequest.Que" + + "ryUnderstandingSpec.QueryClassificationSpec\022\177\n" + + "\024query_rephraser_spec\030\002 \001(\0132a.goog" + + "le.cloud.discoveryengine.v1beta.AnswerQu" + + "eryRequest.QueryUnderstandingSpec.QueryRephraserSpec\022%\n" + + "\030disable_spell_correction\030\003 \001(\010B\003\340A\001\032\312\002\n" + "\027QueryClassificationSpec\022z\n" - + "\005types\030\001 \003(\0162k.google.cloud.disc" - + "overyengine.v1beta.AnswerQueryRequest.Qu" - + "eryUnderstandingSpec.QueryClassificationSpec.Type\"\213\001\n" + + "\005types\030\001 \003(\0162k.google.cloud.discoverye" + + "ngine.v1beta.AnswerQueryRequest.QueryUnd" + + "erstandingSpec.QueryClassificationSpec.Type\"\262\001\n" + "\004Type\022\024\n" + "\020TYPE_UNSPECIFIED\020\000\022\025\n" + "\021ADVERSARIAL_QUERY\020\001\022\034\n" + "\030NON_ANSWER_SEEKING_QUERY\020\002\022\027\n" + "\023JAIL_BREAKING_QUERY\020\003\022\037\n" - + "\033NON_ANSWER_SEEKING_QUERY_V2\020\004\032A\n" + + "\033NON_ANSWER_SEEKING_QUERY_V2\020\004\022%\n" + + "!USER_DEFINED_CLASSIFICATION_QUERY\020\005\032\246\003\n" + "\022QueryRephraserSpec\022\017\n" + "\007disable\030\001 \001(\010\022\032\n" - + "\022max_rephrase_steps\030\002 \001(\005\0321\n" + + "\022max_rephrase_steps\030\002 \001(\005\022\204\001\n\n" + + "model_spec\030\003 \001(\0132k.google.cloud.discoveryengine.v1beta.AnswerQu" + + "eryRequest.QueryUnderstandingSpec.QueryRephraserSpec.ModelSpecB\003\340A\001\032\333\001\n" + + "\tModelSpec\022\216\001\n\n" + + "model_type\030\001 \001(\0162u.google.cloud.discoveryengine.v1beta.AnswerQueryRequest." + + "QueryUnderstandingSpec.QueryRephraserSpec.ModelSpec.ModelTypeB\003\340A\001\"=\n" + + "\tModelType\022\032\n" + + "\026MODEL_TYPE_UNSPECIFIED\020\000\022\t\n" + + "\005SMALL\020\001\022\t\n" + + "\005LARGE\020\002\032\344\003\n" + + "\013EndUserSpec\022s\n" + + "\021end_user_metadata\030\001 \003(\0132S.google.cloud.discoveryeng" + + "ine.v1beta.AnswerQueryRequest.EndUserSpec.EndUserMetaDataB\003\340A\001\032\337\002\n" + + "\017EndUserMetaData\022s\n\n" + + "chunk_info\030\001 \001(\0132].google.cloud.discoveryengine.v1beta.AnswerQueryRequest." + + "EndUserSpec.EndUserMetaData.ChunkInfoH\000\032\313\001\n" + + "\tChunkInfo\022\017\n" + + "\007content\030\001 \001(\t\022\211\001\n" + + "\021document_metadata\030\002 \001(\0132n.google.cloud.discov" + + "eryengine.v1beta.AnswerQueryRequest.EndU" + + "serSpec.EndUserMetaData.ChunkInfo.DocumentMetadata\032!\n" + + "\020DocumentMetadata\022\r\n" + + "\005title\030\001 \001(\tB\t\n" + + "\007content\0321\n" + "\017UserLabelsEntry\022\013\n" + "\003key\030\001 \001(\t\022\r\n" + "\005value\030\002 \001(\t:\0028\001\"\255\001\n" @@ -408,15 +489,16 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\022answer_query_token\030\003 \001(\t\"O\n" + "\020GetAnswerRequest\022;\n" + "\004name\030\001 \001(\tB-\340A\002\372A\'\n" - + "%discoveryengine.googleapis.com/Answer\"\234\001\n" + + "%discoveryengine.googleapis.com/Answer\"\265\001\n" + "\024CreateSessionRequest\022@\n" + "\006parent\030\001 \001(\tB0\340A\002\372A*\n" + "(discoveryengine.googleapis.com/DataStore\022B\n" - + "\007session\030\002 \001(\0132,.goo" - + "gle.cloud.discoveryengine.v1beta.SessionB\003\340A\002\"\213\001\n" + + "\007session\030\002 \001(\0132,.googl" + + "e.cloud.discoveryengine.v1beta.SessionB\003\340A\002\022\027\n\n" + + "session_id\030\003 \001(\tB\003\340A\001\"\213\001\n" + "\024UpdateSessionRequest\022B\n" - + "\007session\030\001" - + " \001(\0132,.google.cloud.discoveryengine.v1beta.SessionB\003\340A\002\022/\n" + + "\007session\030\001 \001(\0132,.google." + + "cloud.discoveryengine.v1beta.SessionB\003\340A\002\022/\n" + "\013update_mask\030\002 \001(\0132\032.google.protobuf.FieldMask\"T\n" + "\024DeleteSessionRequest\022<\n" + "\004name\030\001 \001(\tB.\340A\002\372A(\n" @@ -434,101 +516,118 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\010order_by\030\005 \001(\t\"o\n" + "\024ListSessionsResponse\022>\n" + "\010sessions\030\001 \003(\0132,.google.cloud.discoveryengine.v1beta.Session\022\027\n" - + "\017next_page_token\030\002 \001(\t2\327)\n" + + "\017next_page_token\030\002 \001(\t2\244.\n" + "\033ConversationalSearchService\022\277\003\n" - + "\024ConverseConversation\022@.google.cloud.discoveryengine.v1" - + "beta.ConverseConversationRequest\032A.googl" - + "e.cloud.discoveryengine.v1beta.ConverseConversationResponse\"\241\002\332A\n" - + "name,query\202\323\344\223\002\215\002\"K/v1beta/{name=projects/*/locations/*" - + "/dataStores/*/conversations/*}:converse:\001*Z^\"Y/v1beta/{name=projects/*/locations" - + "/*/collections/*/dataStores/*/conversations/*}:converse:\001*Z[\"V/v1beta/{name=proj" - + "ects/*/locations/*/collections/*/engines/*/conversations/*}:converse:\001*\022\272\003\n" - + "\022CreateConversation\022>.google.cloud.discoverye" - + "ngine.v1beta.CreateConversationRequest\0321.google.cloud.discoveryengine.v1beta.Con" - + "versation\"\260\002\332A\023parent,conversation\202\323\344\223\002\223" - + "\002\"B/v1beta/{parent=projects/*/locations/" - + "*/dataStores/*}/conversations:\014conversationZ`\"P/v1beta/{parent=projects/*/locati" - + "ons/*/collections/*/dataStores/*}/conversations:\014conversationZ]\"M/v1beta/{parent" - + "=projects/*/locations/*/collections/*/engines/*}/conversations:\014conversation\022\346\002\n" - + "\022DeleteConversation\022>.google.cloud.discoveryengine.v1beta.DeleteConversationRequ" - + "est\032\026.google.protobuf.Empty\"\367\001\332A\004name\202\323\344" - + "\223\002\351\001*B/v1beta/{name=projects/*/locations" - + "/*/dataStores/*/conversations/*}ZR*P/v1beta/{name=projects/*/locations/*/collect" - + "ions/*/dataStores/*/conversations/*}ZO*M/v1beta/{name=projects/*/locations/*/col" - + "lections/*/engines/*/conversations/*}\022\346\003\n" - + "\022UpdateConversation\022>.google.cloud.discoveryengine.v1beta.UpdateConversationReq" - + "uest\0321.google.cloud.discoveryengine.v1be" - + "ta.Conversation\"\334\002\332A\030conversation,update" - + "_mask\202\323\344\223\002\272\0022O/v1beta/{conversation.name" - + "=projects/*/locations/*/dataStores/*/conversations/*}:\014conversationZm2]/v1beta/{" - + "conversation.name=projects/*/locations/*/collections/*/dataStores/*/conversation" - + "s/*}:\014conversationZj2Z/v1beta/{conversation.name=projects/*/locations/*/collecti" - + "ons/*/engines/*/conversations/*}:\014conversation\022\373\002\n" - + "\017GetConversation\022;.google.cloud.discoveryengine.v1beta.GetConversation" - + "Request\0321.google.cloud.discoveryengine.v" - + "1beta.Conversation\"\367\001\332A\004name\202\323\344\223\002\351\001\022B/v1" - + "beta/{name=projects/*/locations/*/dataStores/*/conversations/*}ZR\022P/v1beta/{name" - + "=projects/*/locations/*/collections/*/dataStores/*/conversations/*}ZO\022M/v1beta/{" - + "name=projects/*/locations/*/collections/*/engines/*/conversations/*}\022\216\003\n" - + "\021ListConversations\022=.google.cloud.discoveryengin" - + "e.v1beta.ListConversationsRequest\032>.google.cloud.discoveryengine.v1beta.ListConv" - + "ersationsResponse\"\371\001\332A\006parent\202\323\344\223\002\351\001\022B/v" - + "1beta/{parent=projects/*/locations/*/dataStores/*}/conversationsZR\022P/v1beta/{par" - + "ent=projects/*/locations/*/collections/*/dataStores/*}/conversationsZO\022M/v1beta/" - + "{parent=projects/*/locations/*/collections/*/engines/*}/conversations\022\262\003\n" - + "\013AnswerQuery\0227.google.cloud.discoveryengine.v1b" - + "eta.AnswerQueryRequest\0328.google.cloud.discoveryengine.v1beta.AnswerQueryResponse" - + "\"\257\002\202\323\344\223\002\250\002\"T/v1beta/{serving_config=proj" - + "ects/*/locations/*/dataStores/*/servingConfigs/*}:answer:\001*Zg\"b/v1beta/{serving_" - + "config=projects/*/locations/*/collections/*/dataStores/*/servingConfigs/*}:answe" - + "r:\001*Zd\"_/v1beta/{serving_config=projects" - + "/*/locations/*/collections/*/engines/*/servingConfigs/*}:answer:\001*\022\370\002\n" - + "\tGetAnswer\0225.google.cloud.discoveryengine.v1beta.G" - + "etAnswerRequest\032+.google.cloud.discovery" - + "engine.v1beta.Answer\"\206\002\332A\004name\202\323\344\223\002\370\001\022G/" - + "v1beta/{name=projects/*/locations/*/dataStores/*/sessions/*/answers/*}ZW\022U/v1bet" - + "a/{name=projects/*/locations/*/collections/*/dataStores/*/sessions/*/answers/*}Z" - + "T\022R/v1beta/{name=projects/*/locations/*/" - + "collections/*/engines/*/sessions/*/answers/*}\022\210\003\n\r" - + "CreateSession\0229.google.cloud.discoveryengine.v1beta.CreateSessionReque" - + "st\032,.google.cloud.discoveryengine.v1beta" - + ".Session\"\215\002\332A\016parent,session\202\323\344\223\002\365\001\"=/v1" - + "beta/{parent=projects/*/locations/*/dataStores/*}/sessions:\007sessionZV\"K/v1beta/{" - + "parent=projects/*/locations/*/collections/*/dataStores/*}/sessions:\007sessionZS\"H/" - + "v1beta/{parent=projects/*/locations/*/co" - + "llections/*/engines/*}/sessions:\007session\022\315\002\n\r" - + "DeleteSession\0229.google.cloud.discoveryengine.v1beta.DeleteSessionRequest\032\026." - + "google.protobuf.Empty\"\350\001\332A\004name\202\323\344\223\002\332\001*=" - + "/v1beta/{name=projects/*/locations/*/dataStores/*/sessions/*}ZM*K/v1beta/{name=p" - + "rojects/*/locations/*/collections/*/dataStores/*/sessions/*}ZJ*H/v1beta/{name=pr" - + "ojects/*/locations/*/collections/*/engines/*/sessions/*}\022\245\003\n\r" - + "UpdateSession\0229.google.cloud.discoveryengine.v1beta.UpdateS" - + "essionRequest\032,.google.cloud.discoveryen" - + "gine.v1beta.Session\"\252\002\332A\023session,update_" - + "mask\202\323\344\223\002\215\0022E/v1beta/{session.name=proje" - + "cts/*/locations/*/dataStores/*/sessions/*}:\007sessionZ^2S/v1beta/{session.name=pro" - + "jects/*/locations/*/collections/*/dataStores/*/sessions/*}:\007sessionZ[2P/v1beta/{" - + "session.name=projects/*/locations/*/coll" - + "ections/*/engines/*/sessions/*}:\007session\022\335\002\n\n" - + "GetSession\0226.google.cloud.discoveryengine.v1beta.GetSessionRequest\032,.google" - + ".cloud.discoveryengine.v1beta.Session\"\350\001" - + "\332A\004name\202\323\344\223\002\332\001\022=/v1beta/{name=projects/*" - + "/locations/*/dataStores/*/sessions/*}ZM\022K/v1beta/{name=projects/*/locations/*/co" - + "llections/*/dataStores/*/sessions/*}ZJ\022H" - + "/v1beta/{name=projects/*/locations/*/collections/*/engines/*/sessions/*}\022\360\002\n" - + "\014ListSessions\0228.google.cloud.discoveryengine" - + ".v1beta.ListSessionsRequest\0329.google.cloud.discoveryengine.v1beta.ListSessionsRe" - + "sponse\"\352\001\332A\006parent\202\323\344\223\002\332\001\022=/v1beta/{pare" - + "nt=projects/*/locations/*/dataStores/*}/sessionsZM\022K/v1beta/{parent=projects/*/l" - + "ocations/*/collections/*/dataStores/*}/sessionsZJ\022H/v1beta/{parent=projects/*/lo" - + "cations/*/collections/*/engines/*}/sessi" - + "ons\032R\312A\036discoveryengine.googleapis.com\322A" - + ".https://www.googleapis.com/auth/cloud-platformB\247\002\n" - + "\'com.google.cloud.discoveryengine.v1betaB ConversationalSearchService" - + "ProtoP\001ZQcloud.google.com/go/discoveryengine/apiv1beta/discoveryenginepb;discove" - + "ryenginepb\242\002\017DISCOVERYENGINE\252\002#Google.Cl" - + "oud.DiscoveryEngine.V1Beta\312\002#Google\\Clou" - + "d\\DiscoveryEngine\\V1beta\352\002&Google::Cloud::DiscoveryEngine::V1betab\006proto3" + + "\024ConverseConversation\022@.google.cloud.discoveryengine.v1beta.ConverseConv" + + "ersationRequest\032A.google.cloud.discovery" + + "engine.v1beta.ConverseConversationResponse\"\241\002\332A\n" + + "name,query\202\323\344\223\002\215\002\"K/v1beta/{name" + + "=projects/*/locations/*/dataStores/*/conversations/*}:converse:\001*Z^\"Y/v1beta/{na" + + "me=projects/*/locations/*/collections/*/dataStores/*/conversations/*}:converse:\001" + + "*Z[\"V/v1beta/{name=projects/*/locations/" + + "*/collections/*/engines/*/conversations/*}:converse:\001*\022\272\003\n" + + "\022CreateConversation\022>.google.cloud.discoveryengine.v1beta.Crea" + + "teConversationRequest\0321.google.cloud.dis" + + "coveryengine.v1beta.Conversation\"\260\002\332A\023pa" + + "rent,conversation\202\323\344\223\002\223\002\"B/v1beta/{paren" + + "t=projects/*/locations/*/dataStores/*}/conversations:\014conversationZ`\"P/v1beta/{p" + + "arent=projects/*/locations/*/collections/*/dataStores/*}/conversations:\014conversa" + + "tionZ]\"M/v1beta/{parent=projects/*/locat" + + "ions/*/collections/*/engines/*}/conversations:\014conversation\022\346\002\n" + + "\022DeleteConversation\022>.google.cloud.discoveryengine.v1beta" + + ".DeleteConversationRequest\032\026.google.prot" + + "obuf.Empty\"\367\001\332A\004name\202\323\344\223\002\351\001*B/v1beta/{na" + + "me=projects/*/locations/*/dataStores/*/conversations/*}ZR*P/v1beta/{name=project" + + "s/*/locations/*/collections/*/dataStores/*/conversations/*}ZO*M/v1beta/{name=pro" + + "jects/*/locations/*/collections/*/engines/*/conversations/*}\022\346\003\n" + + "\022UpdateConversation\022>.google.cloud.discoveryengine.v1bet" + + "a.UpdateConversationRequest\0321.google.clo" + + "ud.discoveryengine.v1beta.Conversation\"\334" + + "\002\332A\030conversation,update_mask\202\323\344\223\002\272\0022O/v1" + + "beta/{conversation.name=projects/*/locations/*/dataStores/*/conversations/*}:\014co" + + "nversationZm2]/v1beta/{conversation.name=projects/*/locations/*/collections/*/da" + + "taStores/*/conversations/*}:\014conversationZj2Z/v1beta/{conversation.name=projects" + + "/*/locations/*/collections/*/engines/*/conversations/*}:\014conversation\022\373\002\n" + + "\017GetConversation\022;.google.cloud.discoveryengine" + + ".v1beta.GetConversationRequest\0321.google.cloud.discoveryengine.v1beta.Conversatio" + + "n\"\367\001\332A\004name\202\323\344\223\002\351\001\022B/v1beta/{name=projec" + + "ts/*/locations/*/dataStores/*/conversations/*}ZR\022P/v1beta/{name=projects/*/locat" + + "ions/*/collections/*/dataStores/*/conversations/*}ZO\022M/v1beta/{name=projects/*/l" + + "ocations/*/collections/*/engines/*/conversations/*}\022\216\003\n" + + "\021ListConversations\022=.google.cloud.discoveryengine.v1beta.ListConv" + + "ersationsRequest\032>.google.cloud.discoveryengine.v1beta.ListConversationsResponse" + + "\"\371\001\332A\006parent\202\323\344\223\002\351\001\022B/v1beta/{parent=pro" + + "jects/*/locations/*/dataStores/*}/conversationsZR\022P/v1beta/{parent=projects/*/lo" + + "cations/*/collections/*/dataStores/*}/conversationsZO\022M/v1beta/{parent=projects/" + + "*/locations/*/collections/*/engines/*}/conversations\022\262\003\n" + + "\013AnswerQuery\0227.google.cloud.discoveryengine.v1beta.AnswerQueryRe" + + "quest\0328.google.cloud.discoveryengine.v1b" + + "eta.AnswerQueryResponse\"\257\002\202\323\344\223\002\250\002\"T/v1be" + + "ta/{serving_config=projects/*/locations/*/dataStores/*/servingConfigs/*}:answer:" + + "\001*Zg\"b/v1beta/{serving_config=projects/*/locations/*/collections/*/dataStores/*/" + + "servingConfigs/*}:answer:\001*Zd\"_/v1beta/{serving_config=projects/*/locations/*/co" + + "llections/*/engines/*/servingConfigs/*}:answer:\001*\022\314\003\n" + + "\021StreamAnswerQuery\0227.google.cloud.discoveryengine.v1beta.AnswerQuer" + + "yRequest\0328.google.cloud.discoveryengine." + + "v1beta.AnswerQueryResponse\"\301\002\202\323\344\223\002\272\002\"Z/v" + + "1beta/{serving_config=projects/*/locations/*/dataStores/*/servingConfigs/*}:stre" + + "amAnswer:\001*Zm\"h/v1beta/{serving_config=projects/*/locations/*/collections/*/data" + + "Stores/*/servingConfigs/*}:streamAnswer:\001*Zj\"e/v1beta/{serving_config=projects/*" + + "/locations/*/collections/*/engines/*/servingConfigs/*}:streamAnswer:\001*0\001\022\370\002\n" + + "\tGetAnswer\0225.google.cloud.discoveryengine.v1" + + "beta.GetAnswerRequest\032+.google.cloud.dis" + + "coveryengine.v1beta.Answer\"\206\002\332A\004name\202\323\344\223" + + "\002\370\001\022G/v1beta/{name=projects/*/locations/" + + "*/dataStores/*/sessions/*/answers/*}ZW\022U/v1beta/{name=projects/*/locations/*/col" + + "lections/*/dataStores/*/sessions/*/answers/*}ZT\022R/v1beta/{name=projects/*/locati" + + "ons/*/collections/*/engines/*/sessions/*/answers/*}\022\210\003\n\r" + + "CreateSession\0229.google.cloud.discoveryengine.v1beta.CreateSessio" + + "nRequest\032,.google.cloud.discoveryengine." + + "v1beta.Session\"\215\002\332A\016parent,session\202\323\344\223\002\365" + + "\001\"=/v1beta/{parent=projects/*/locations/" + + "*/dataStores/*}/sessions:\007sessionZV\"K/v1beta/{parent=projects/*/locations/*/coll" + + "ections/*/dataStores/*}/sessions:\007sessionZS\"H/v1beta/{parent=projects/*/location" + + "s/*/collections/*/engines/*}/sessions:\007session\022\315\002\n\r" + + "DeleteSession\0229.google.cloud.discoveryengine.v1beta.DeleteSessionRequ" + + "est\032\026.google.protobuf.Empty\"\350\001\332A\004name\202\323\344" + + "\223\002\332\001*=/v1beta/{name=projects/*/locations" + + "/*/dataStores/*/sessions/*}ZM*K/v1beta/{name=projects/*/locations/*/collections/" + + "*/dataStores/*/sessions/*}ZJ*H/v1beta/{n" + + "ame=projects/*/locations/*/collections/*/engines/*/sessions/*}\022\245\003\n\r" + + "UpdateSession\0229.google.cloud.discoveryengine.v1beta.U" + + "pdateSessionRequest\032,.google.cloud.disco" + + "veryengine.v1beta.Session\"\252\002\332A\023session,u" + + "pdate_mask\202\323\344\223\002\215\0022E/v1beta/{session.name" + + "=projects/*/locations/*/dataStores/*/sessions/*}:\007sessionZ^2S/v1beta/{session.na" + + "me=projects/*/locations/*/collections/*/dataStores/*/sessions/*}:\007sessionZ[2P/v1" + + "beta/{session.name=projects/*/locations/" + + "*/collections/*/engines/*/sessions/*}:\007session\022\335\002\n\n" + + "GetSession\0226.google.cloud.discoveryengine.v1beta.GetSessionRequest\032,." + + "google.cloud.discoveryengine.v1beta.Sess" + + "ion\"\350\001\332A\004name\202\323\344\223\002\332\001\022=/v1beta/{name=proj" + + "ects/*/locations/*/dataStores/*/sessions/*}ZM\022K/v1beta/{name=projects/*/location" + + "s/*/collections/*/dataStores/*/sessions/*}ZJ\022H/v1beta/{name=projects/*/locations" + + "/*/collections/*/engines/*/sessions/*}\022\360\002\n" + + "\014ListSessions\0228.google.cloud.discovery" + + "engine.v1beta.ListSessionsRequest\0329.google.cloud.discoveryengine.v1beta.ListSess" + + "ionsResponse\"\352\001\332A\006parent\202\323\344\223\002\332\001\022=/v1beta" + + "/{parent=projects/*/locations/*/dataStores/*}/sessionsZM\022K/v1beta/{parent=projec" + + "ts/*/locations/*/collections/*/dataStores/*}/sessionsZJ\022H/v1beta/{parent=project" + + "s/*/locations/*/collections/*/engines/*}" + + "/sessions\032\317\001\312A\036discoveryengine.googleapi", + "s.com\322A\252\001https://www.googleapis.com/auth" + + "/cloud-platform,https://www.googleapis.c" + + "om/auth/discoveryengine.readwrite,https:" + + "//www.googleapis.com/auth/discoveryengin" + + "e.serving.readwriteB\247\002\n\'com.google.cloud" + + ".discoveryengine.v1betaB ConversationalS" + + "earchServiceProtoP\001ZQcloud.google.com/go" + + "/discoveryengine/apiv1beta/discoveryengi" + + "nepb;discoveryenginepb\242\002\017DISCOVERYENGINE" + + "\252\002#Google.Cloud.DiscoveryEngine.V1Beta\312\002" + + "#Google\\Cloud\\DiscoveryEngine\\V1beta\352\002&G" + + "oogle::Cloud::DiscoveryEngine::V1betab\006p" + + "roto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -540,6 +639,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.api.ResourceProto.getDescriptor(), com.google.cloud.discoveryengine.v1beta.AnswerProto.getDescriptor(), com.google.cloud.discoveryengine.v1beta.ConversationProto.getDescriptor(), + com.google.cloud.discoveryengine.v1beta.SafetyProto.getDescriptor(), com.google.cloud.discoveryengine.v1beta.SearchServiceProto.getDescriptor(), com.google.cloud.discoveryengine.v1beta.SessionProto.getDescriptor(), com.google.protobuf.EmptyProto.getDescriptor(), @@ -644,6 +744,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "AsynchronousMode", "UserPseudoId", "UserLabels", + "EndUserSpec", }); internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_SafetySpec_descriptor = internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_descriptor @@ -652,7 +753,16 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_SafetySpec_descriptor, new java.lang.String[] { - "Enable", + "Enable", "SafetySettings", + }); + internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_SafetySpec_SafetySetting_descriptor = + internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_SafetySpec_descriptor + .getNestedType(0); + internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_SafetySpec_SafetySetting_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_SafetySpec_SafetySetting_descriptor, + new java.lang.String[] { + "Category", "Threshold", }); internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_RelatedQuestionsSpec_descriptor = internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_descriptor @@ -687,6 +797,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "IgnoreNonAnswerSeekingQuery", "IgnoreLowRelevantContent", "IgnoreJailBreakingQuery", + "MultimodalSpec", }); internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_AnswerGenerationSpec_ModelSpec_descriptor = internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_AnswerGenerationSpec_descriptor @@ -706,6 +817,15 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "Preamble", }); + internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_AnswerGenerationSpec_MultimodalSpec_descriptor = + internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_AnswerGenerationSpec_descriptor + .getNestedType(2); + internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_AnswerGenerationSpec_MultimodalSpec_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_AnswerGenerationSpec_MultimodalSpec_descriptor, + new java.lang.String[] { + "ImageSource", + }); internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_SearchSpec_descriptor = internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_descriptor .getNestedType(4); @@ -814,7 +934,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_QueryUnderstandingSpec_descriptor, new java.lang.String[] { - "QueryClassificationSpec", "QueryRephraserSpec", + "QueryClassificationSpec", "QueryRephraserSpec", "DisableSpellCorrection", }); internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_QueryUnderstandingSpec_QueryClassificationSpec_descriptor = internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_QueryUnderstandingSpec_descriptor @@ -832,11 +952,56 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_QueryUnderstandingSpec_QueryRephraserSpec_descriptor, new java.lang.String[] { - "Disable", "MaxRephraseSteps", + "Disable", "MaxRephraseSteps", "ModelSpec", }); - internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_UserLabelsEntry_descriptor = + internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_QueryUnderstandingSpec_QueryRephraserSpec_ModelSpec_descriptor = + internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_QueryUnderstandingSpec_QueryRephraserSpec_descriptor + .getNestedType(0); + internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_QueryUnderstandingSpec_QueryRephraserSpec_ModelSpec_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_QueryUnderstandingSpec_QueryRephraserSpec_ModelSpec_descriptor, + new java.lang.String[] { + "ModelType", + }); + internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_EndUserSpec_descriptor = internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_descriptor .getNestedType(6); + internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_EndUserSpec_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_EndUserSpec_descriptor, + new java.lang.String[] { + "EndUserMetadata", + }); + internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_EndUserSpec_EndUserMetaData_descriptor = + internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_EndUserSpec_descriptor + .getNestedType(0); + internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_EndUserSpec_EndUserMetaData_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_EndUserSpec_EndUserMetaData_descriptor, + new java.lang.String[] { + "ChunkInfo", "Content", + }); + internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_EndUserSpec_EndUserMetaData_ChunkInfo_descriptor = + internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_EndUserSpec_EndUserMetaData_descriptor + .getNestedType(0); + internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_EndUserSpec_EndUserMetaData_ChunkInfo_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_EndUserSpec_EndUserMetaData_ChunkInfo_descriptor, + new java.lang.String[] { + "Content", "DocumentMetadata", + }); + internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_EndUserSpec_EndUserMetaData_ChunkInfo_DocumentMetadata_descriptor = + internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_EndUserSpec_EndUserMetaData_ChunkInfo_descriptor + .getNestedType(0); + internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_EndUserSpec_EndUserMetaData_ChunkInfo_DocumentMetadata_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_EndUserSpec_EndUserMetaData_ChunkInfo_DocumentMetadata_descriptor, + new java.lang.String[] { + "Title", + }); + internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_UserLabelsEntry_descriptor = + internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_descriptor + .getNestedType(7); internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_UserLabelsEntry_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_cloud_discoveryengine_v1beta_AnswerQueryRequest_UserLabelsEntry_descriptor, @@ -865,7 +1030,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_cloud_discoveryengine_v1beta_CreateSessionRequest_descriptor, new java.lang.String[] { - "Parent", "Session", + "Parent", "Session", "SessionId", }); internal_static_google_cloud_discoveryengine_v1beta_UpdateSessionRequest_descriptor = getDescriptor().getMessageType(12); @@ -914,6 +1079,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.api.ResourceProto.getDescriptor(); com.google.cloud.discoveryengine.v1beta.AnswerProto.getDescriptor(); com.google.cloud.discoveryengine.v1beta.ConversationProto.getDescriptor(); + com.google.cloud.discoveryengine.v1beta.SafetyProto.getDescriptor(); com.google.cloud.discoveryengine.v1beta.SearchServiceProto.getDescriptor(); com.google.cloud.discoveryengine.v1beta.SessionProto.getDescriptor(); com.google.protobuf.EmptyProto.getDescriptor(); diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/CreateAssistantRequest.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/CreateAssistantRequest.java new file mode 100644 index 000000000000..79d262421254 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/CreateAssistantRequest.java @@ -0,0 +1,1196 @@ +/* + * 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/cloud/discoveryengine/v1beta/assistant_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.discoveryengine.v1beta; + +/** + * + * + *
            + * Request for the
            + * [AssistantService.CreateAssistant][google.cloud.discoveryengine.v1beta.AssistantService.CreateAssistant]
            + * method.
            + * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.CreateAssistantRequest} + */ +@com.google.protobuf.Generated +public final class CreateAssistantRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.CreateAssistantRequest) + CreateAssistantRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "CreateAssistantRequest"); + } + + // Use CreateAssistantRequest.newBuilder() to construct. + private CreateAssistantRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private CreateAssistantRequest() { + parent_ = ""; + assistantId_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.AssistantServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_CreateAssistantRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.AssistantServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_CreateAssistantRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.CreateAssistantRequest.class, + com.google.cloud.discoveryengine.v1beta.CreateAssistantRequest.Builder.class); + } + + private int bitField0_; + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + + /** + * + * + *
            +   * Required. The parent resource name.
            +   * Format:
            +   * `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}`
            +   * 
            + * + * + * 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 parent resource name.
            +   * Format:
            +   * `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}`
            +   * 
            + * + * + * 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 ASSISTANT_FIELD_NUMBER = 2; + private com.google.cloud.discoveryengine.v1beta.Assistant assistant_; + + /** + * + * + *
            +   * Required. The [Assistant][google.cloud.discoveryengine.v1beta.Assistant] to
            +   * create.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Assistant assistant = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the assistant field is set. + */ + @java.lang.Override + public boolean hasAssistant() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
            +   * Required. The [Assistant][google.cloud.discoveryengine.v1beta.Assistant] to
            +   * create.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Assistant assistant = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The assistant. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Assistant getAssistant() { + return assistant_ == null + ? com.google.cloud.discoveryengine.v1beta.Assistant.getDefaultInstance() + : assistant_; + } + + /** + * + * + *
            +   * Required. The [Assistant][google.cloud.discoveryengine.v1beta.Assistant] to
            +   * create.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Assistant assistant = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AssistantOrBuilder getAssistantOrBuilder() { + return assistant_ == null + ? com.google.cloud.discoveryengine.v1beta.Assistant.getDefaultInstance() + : assistant_; + } + + public static final int ASSISTANT_ID_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object assistantId_ = ""; + + /** + * + * + *
            +   * Required. The ID to use for the
            +   * [Assistant][google.cloud.discoveryengine.v1beta.Assistant], which will
            +   * become the final component of the
            +   * [Assistant][google.cloud.discoveryengine.v1beta.Assistant]'s resource name.
            +   *
            +   * This field must conform to [RFC-1034](https://tools.ietf.org/html/rfc1034)
            +   * with a length limit of 63 characters.
            +   * 
            + * + * string assistant_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The assistantId. + */ + @java.lang.Override + public java.lang.String getAssistantId() { + java.lang.Object ref = assistantId_; + 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(); + assistantId_ = s; + return s; + } + } + + /** + * + * + *
            +   * Required. The ID to use for the
            +   * [Assistant][google.cloud.discoveryengine.v1beta.Assistant], which will
            +   * become the final component of the
            +   * [Assistant][google.cloud.discoveryengine.v1beta.Assistant]'s resource name.
            +   *
            +   * This field must conform to [RFC-1034](https://tools.ietf.org/html/rfc1034)
            +   * with a length limit of 63 characters.
            +   * 
            + * + * string assistant_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for assistantId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getAssistantIdBytes() { + java.lang.Object ref = assistantId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + assistantId_ = 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 { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, parent_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getAssistant()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(assistantId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, assistantId_); + } + 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 (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getAssistant()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(assistantId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, assistantId_); + } + 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.discoveryengine.v1beta.CreateAssistantRequest)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1beta.CreateAssistantRequest other = + (com.google.cloud.discoveryengine.v1beta.CreateAssistantRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (hasAssistant() != other.hasAssistant()) return false; + if (hasAssistant()) { + if (!getAssistant().equals(other.getAssistant())) return false; + } + if (!getAssistantId().equals(other.getAssistantId())) 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(); + if (hasAssistant()) { + hash = (37 * hash) + ASSISTANT_FIELD_NUMBER; + hash = (53 * hash) + getAssistant().hashCode(); + } + hash = (37 * hash) + ASSISTANT_ID_FIELD_NUMBER; + hash = (53 * hash) + getAssistantId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1beta.CreateAssistantRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.CreateAssistantRequest 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.discoveryengine.v1beta.CreateAssistantRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.CreateAssistantRequest 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.discoveryengine.v1beta.CreateAssistantRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.CreateAssistantRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1beta.CreateAssistantRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.CreateAssistantRequest 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.discoveryengine.v1beta.CreateAssistantRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.CreateAssistantRequest 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.discoveryengine.v1beta.CreateAssistantRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.CreateAssistantRequest 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.discoveryengine.v1beta.CreateAssistantRequest 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 for the
            +   * [AssistantService.CreateAssistant][google.cloud.discoveryengine.v1beta.AssistantService.CreateAssistant]
            +   * method.
            +   * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.CreateAssistantRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.CreateAssistantRequest) + com.google.cloud.discoveryengine.v1beta.CreateAssistantRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.AssistantServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_CreateAssistantRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.AssistantServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_CreateAssistantRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.CreateAssistantRequest.class, + com.google.cloud.discoveryengine.v1beta.CreateAssistantRequest.Builder.class); + } + + // Construct using com.google.cloud.discoveryengine.v1beta.CreateAssistantRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetAssistantFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + assistant_ = null; + if (assistantBuilder_ != null) { + assistantBuilder_.dispose(); + assistantBuilder_ = null; + } + assistantId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1beta.AssistantServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_CreateAssistantRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.CreateAssistantRequest + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1beta.CreateAssistantRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.CreateAssistantRequest build() { + com.google.cloud.discoveryengine.v1beta.CreateAssistantRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.CreateAssistantRequest buildPartial() { + com.google.cloud.discoveryengine.v1beta.CreateAssistantRequest result = + new com.google.cloud.discoveryengine.v1beta.CreateAssistantRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.discoveryengine.v1beta.CreateAssistantRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.assistant_ = assistantBuilder_ == null ? assistant_ : assistantBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.assistantId_ = assistantId_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.discoveryengine.v1beta.CreateAssistantRequest) { + return mergeFrom((com.google.cloud.discoveryengine.v1beta.CreateAssistantRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.discoveryengine.v1beta.CreateAssistantRequest other) { + if (other + == com.google.cloud.discoveryengine.v1beta.CreateAssistantRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasAssistant()) { + mergeAssistant(other.getAssistant()); + } + if (!other.getAssistantId().isEmpty()) { + assistantId_ = other.assistantId_; + bitField0_ |= 0x00000004; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage( + internalGetAssistantFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + assistantId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + + /** + * + * + *
            +     * Required. The parent resource name.
            +     * Format:
            +     * `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}`
            +     * 
            + * + * + * 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 parent resource name.
            +     * Format:
            +     * `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}`
            +     * 
            + * + * + * 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 parent resource name.
            +     * Format:
            +     * `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}`
            +     * 
            + * + * + * 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 parent resource name.
            +     * Format:
            +     * `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}`
            +     * 
            + * + * + * 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 parent resource name.
            +     * Format:
            +     * `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}`
            +     * 
            + * + * + * 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 com.google.cloud.discoveryengine.v1beta.Assistant assistant_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.Assistant, + com.google.cloud.discoveryengine.v1beta.Assistant.Builder, + com.google.cloud.discoveryengine.v1beta.AssistantOrBuilder> + assistantBuilder_; + + /** + * + * + *
            +     * Required. The [Assistant][google.cloud.discoveryengine.v1beta.Assistant] to
            +     * create.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Assistant assistant = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the assistant field is set. + */ + public boolean hasAssistant() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
            +     * Required. The [Assistant][google.cloud.discoveryengine.v1beta.Assistant] to
            +     * create.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Assistant assistant = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The assistant. + */ + public com.google.cloud.discoveryengine.v1beta.Assistant getAssistant() { + if (assistantBuilder_ == null) { + return assistant_ == null + ? com.google.cloud.discoveryengine.v1beta.Assistant.getDefaultInstance() + : assistant_; + } else { + return assistantBuilder_.getMessage(); + } + } + + /** + * + * + *
            +     * Required. The [Assistant][google.cloud.discoveryengine.v1beta.Assistant] to
            +     * create.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Assistant assistant = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setAssistant(com.google.cloud.discoveryengine.v1beta.Assistant value) { + if (assistantBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + assistant_ = value; + } else { + assistantBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Required. The [Assistant][google.cloud.discoveryengine.v1beta.Assistant] to
            +     * create.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Assistant assistant = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setAssistant( + com.google.cloud.discoveryengine.v1beta.Assistant.Builder builderForValue) { + if (assistantBuilder_ == null) { + assistant_ = builderForValue.build(); + } else { + assistantBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Required. The [Assistant][google.cloud.discoveryengine.v1beta.Assistant] to
            +     * create.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Assistant assistant = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeAssistant(com.google.cloud.discoveryengine.v1beta.Assistant value) { + if (assistantBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && assistant_ != null + && assistant_ + != com.google.cloud.discoveryengine.v1beta.Assistant.getDefaultInstance()) { + getAssistantBuilder().mergeFrom(value); + } else { + assistant_ = value; + } + } else { + assistantBuilder_.mergeFrom(value); + } + if (assistant_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** + * + * + *
            +     * Required. The [Assistant][google.cloud.discoveryengine.v1beta.Assistant] to
            +     * create.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Assistant assistant = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearAssistant() { + bitField0_ = (bitField0_ & ~0x00000002); + assistant_ = null; + if (assistantBuilder_ != null) { + assistantBuilder_.dispose(); + assistantBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
            +     * Required. The [Assistant][google.cloud.discoveryengine.v1beta.Assistant] to
            +     * create.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Assistant assistant = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.discoveryengine.v1beta.Assistant.Builder getAssistantBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return internalGetAssistantFieldBuilder().getBuilder(); + } + + /** + * + * + *
            +     * Required. The [Assistant][google.cloud.discoveryengine.v1beta.Assistant] to
            +     * create.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Assistant assistant = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.discoveryengine.v1beta.AssistantOrBuilder getAssistantOrBuilder() { + if (assistantBuilder_ != null) { + return assistantBuilder_.getMessageOrBuilder(); + } else { + return assistant_ == null + ? com.google.cloud.discoveryengine.v1beta.Assistant.getDefaultInstance() + : assistant_; + } + } + + /** + * + * + *
            +     * Required. The [Assistant][google.cloud.discoveryengine.v1beta.Assistant] to
            +     * create.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Assistant assistant = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.Assistant, + com.google.cloud.discoveryengine.v1beta.Assistant.Builder, + com.google.cloud.discoveryengine.v1beta.AssistantOrBuilder> + internalGetAssistantFieldBuilder() { + if (assistantBuilder_ == null) { + assistantBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.Assistant, + com.google.cloud.discoveryengine.v1beta.Assistant.Builder, + com.google.cloud.discoveryengine.v1beta.AssistantOrBuilder>( + getAssistant(), getParentForChildren(), isClean()); + assistant_ = null; + } + return assistantBuilder_; + } + + private java.lang.Object assistantId_ = ""; + + /** + * + * + *
            +     * Required. The ID to use for the
            +     * [Assistant][google.cloud.discoveryengine.v1beta.Assistant], which will
            +     * become the final component of the
            +     * [Assistant][google.cloud.discoveryengine.v1beta.Assistant]'s resource name.
            +     *
            +     * This field must conform to [RFC-1034](https://tools.ietf.org/html/rfc1034)
            +     * with a length limit of 63 characters.
            +     * 
            + * + * string assistant_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The assistantId. + */ + public java.lang.String getAssistantId() { + java.lang.Object ref = assistantId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + assistantId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
            +     * Required. The ID to use for the
            +     * [Assistant][google.cloud.discoveryengine.v1beta.Assistant], which will
            +     * become the final component of the
            +     * [Assistant][google.cloud.discoveryengine.v1beta.Assistant]'s resource name.
            +     *
            +     * This field must conform to [RFC-1034](https://tools.ietf.org/html/rfc1034)
            +     * with a length limit of 63 characters.
            +     * 
            + * + * string assistant_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for assistantId. + */ + public com.google.protobuf.ByteString getAssistantIdBytes() { + java.lang.Object ref = assistantId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + assistantId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
            +     * Required. The ID to use for the
            +     * [Assistant][google.cloud.discoveryengine.v1beta.Assistant], which will
            +     * become the final component of the
            +     * [Assistant][google.cloud.discoveryengine.v1beta.Assistant]'s resource name.
            +     *
            +     * This field must conform to [RFC-1034](https://tools.ietf.org/html/rfc1034)
            +     * with a length limit of 63 characters.
            +     * 
            + * + * string assistant_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The assistantId to set. + * @return This builder for chaining. + */ + public Builder setAssistantId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + assistantId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Required. The ID to use for the
            +     * [Assistant][google.cloud.discoveryengine.v1beta.Assistant], which will
            +     * become the final component of the
            +     * [Assistant][google.cloud.discoveryengine.v1beta.Assistant]'s resource name.
            +     *
            +     * This field must conform to [RFC-1034](https://tools.ietf.org/html/rfc1034)
            +     * with a length limit of 63 characters.
            +     * 
            + * + * string assistant_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearAssistantId() { + assistantId_ = getDefaultInstance().getAssistantId(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
            +     * Required. The ID to use for the
            +     * [Assistant][google.cloud.discoveryengine.v1beta.Assistant], which will
            +     * become the final component of the
            +     * [Assistant][google.cloud.discoveryengine.v1beta.Assistant]'s resource name.
            +     *
            +     * This field must conform to [RFC-1034](https://tools.ietf.org/html/rfc1034)
            +     * with a length limit of 63 characters.
            +     * 
            + * + * string assistant_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for assistantId to set. + * @return This builder for chaining. + */ + public Builder setAssistantIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + assistantId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.CreateAssistantRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.CreateAssistantRequest) + private static final com.google.cloud.discoveryengine.v1beta.CreateAssistantRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.discoveryengine.v1beta.CreateAssistantRequest(); + } + + public static com.google.cloud.discoveryengine.v1beta.CreateAssistantRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateAssistantRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.CreateAssistantRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/CreateAssistantRequestOrBuilder.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/CreateAssistantRequestOrBuilder.java new file mode 100644 index 000000000000..3c0ff41c790a --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/CreateAssistantRequestOrBuilder.java @@ -0,0 +1,146 @@ +/* + * 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/cloud/discoveryengine/v1beta/assistant_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.discoveryengine.v1beta; + +@com.google.protobuf.Generated +public interface CreateAssistantRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.CreateAssistantRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
            +   * Required. The parent resource name.
            +   * Format:
            +   * `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}`
            +   * 
            + * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + + /** + * + * + *
            +   * Required. The parent resource name.
            +   * Format:
            +   * `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}`
            +   * 
            + * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
            +   * Required. The [Assistant][google.cloud.discoveryengine.v1beta.Assistant] to
            +   * create.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Assistant assistant = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the assistant field is set. + */ + boolean hasAssistant(); + + /** + * + * + *
            +   * Required. The [Assistant][google.cloud.discoveryengine.v1beta.Assistant] to
            +   * create.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Assistant assistant = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The assistant. + */ + com.google.cloud.discoveryengine.v1beta.Assistant getAssistant(); + + /** + * + * + *
            +   * Required. The [Assistant][google.cloud.discoveryengine.v1beta.Assistant] to
            +   * create.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Assistant assistant = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.discoveryengine.v1beta.AssistantOrBuilder getAssistantOrBuilder(); + + /** + * + * + *
            +   * Required. The ID to use for the
            +   * [Assistant][google.cloud.discoveryengine.v1beta.Assistant], which will
            +   * become the final component of the
            +   * [Assistant][google.cloud.discoveryengine.v1beta.Assistant]'s resource name.
            +   *
            +   * This field must conform to [RFC-1034](https://tools.ietf.org/html/rfc1034)
            +   * with a length limit of 63 characters.
            +   * 
            + * + * string assistant_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The assistantId. + */ + java.lang.String getAssistantId(); + + /** + * + * + *
            +   * Required. The ID to use for the
            +   * [Assistant][google.cloud.discoveryengine.v1beta.Assistant], which will
            +   * become the final component of the
            +   * [Assistant][google.cloud.discoveryengine.v1beta.Assistant]'s resource name.
            +   *
            +   * This field must conform to [RFC-1034](https://tools.ietf.org/html/rfc1034)
            +   * with a length limit of 63 characters.
            +   * 
            + * + * string assistant_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for assistantId. + */ + com.google.protobuf.ByteString getAssistantIdBytes(); +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/CreateDataStoreRequest.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/CreateDataStoreRequest.java index 60cbd662106a..3d1eceb89efa 100644 --- a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/CreateDataStoreRequest.java +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/CreateDataStoreRequest.java @@ -74,6 +74,170 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } private int bitField0_; + private int cmekOptionsCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object cmekOptions_; + + public enum CmekOptionsCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + CMEK_CONFIG_NAME(5), + DISABLE_CMEK(6), + CMEKOPTIONS_NOT_SET(0); + private final int value; + + private CmekOptionsCase(int value) { + this.value = value; + } + + /** + * @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 CmekOptionsCase valueOf(int value) { + return forNumber(value); + } + + public static CmekOptionsCase forNumber(int value) { + switch (value) { + case 5: + return CMEK_CONFIG_NAME; + case 6: + return DISABLE_CMEK; + case 0: + return CMEKOPTIONS_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public CmekOptionsCase getCmekOptionsCase() { + return CmekOptionsCase.forNumber(cmekOptionsCase_); + } + + public static final int CMEK_CONFIG_NAME_FIELD_NUMBER = 5; + + /** + * + * + *
            +   * Resource name of the CmekConfig to use for protecting this DataStore.
            +   * 
            + * + * string cmek_config_name = 5 [(.google.api.resource_reference) = { ... } + * + * @return Whether the cmekConfigName field is set. + */ + public boolean hasCmekConfigName() { + return cmekOptionsCase_ == 5; + } + + /** + * + * + *
            +   * Resource name of the CmekConfig to use for protecting this DataStore.
            +   * 
            + * + * string cmek_config_name = 5 [(.google.api.resource_reference) = { ... } + * + * @return The cmekConfigName. + */ + public java.lang.String getCmekConfigName() { + java.lang.Object ref = ""; + if (cmekOptionsCase_ == 5) { + ref = cmekOptions_; + } + 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(); + if (cmekOptionsCase_ == 5) { + cmekOptions_ = s; + } + return s; + } + } + + /** + * + * + *
            +   * Resource name of the CmekConfig to use for protecting this DataStore.
            +   * 
            + * + * string cmek_config_name = 5 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for cmekConfigName. + */ + public com.google.protobuf.ByteString getCmekConfigNameBytes() { + java.lang.Object ref = ""; + if (cmekOptionsCase_ == 5) { + ref = cmekOptions_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (cmekOptionsCase_ == 5) { + cmekOptions_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DISABLE_CMEK_FIELD_NUMBER = 6; + + /** + * + * + *
            +   * DataStore without CMEK protections. If a default CmekConfig is set for
            +   * the project, setting this field will override the default CmekConfig as
            +   * well.
            +   * 
            + * + * bool disable_cmek = 6; + * + * @return Whether the disableCmek field is set. + */ + @java.lang.Override + public boolean hasDisableCmek() { + return cmekOptionsCase_ == 6; + } + + /** + * + * + *
            +   * DataStore without CMEK protections. If a default CmekConfig is set for
            +   * the project, setting this field will override the default CmekConfig as
            +   * well.
            +   * 
            + * + * bool disable_cmek = 6; + * + * @return The disableCmek. + */ + @java.lang.Override + public boolean getDisableCmek() { + if (cmekOptionsCase_ == 6) { + return (java.lang.Boolean) cmekOptions_; + } + return false; + } + public static final int PARENT_FIELD_NUMBER = 1; @SuppressWarnings("serial") @@ -337,6 +501,12 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (createAdvancedSiteSearch_ != false) { output.writeBool(4, createAdvancedSiteSearch_); } + if (cmekOptionsCase_ == 5) { + com.google.protobuf.GeneratedMessage.writeString(output, 5, cmekOptions_); + } + if (cmekOptionsCase_ == 6) { + output.writeBool(6, (boolean) ((java.lang.Boolean) cmekOptions_)); + } if (skipDefaultSchemaCreation_ != false) { output.writeBool(7, skipDefaultSchemaCreation_); } @@ -361,6 +531,14 @@ public int getSerializedSize() { if (createAdvancedSiteSearch_ != false) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(4, createAdvancedSiteSearch_); } + if (cmekOptionsCase_ == 5) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(5, cmekOptions_); + } + if (cmekOptionsCase_ == 6) { + size += + com.google.protobuf.CodedOutputStream.computeBoolSize( + 6, (boolean) ((java.lang.Boolean) cmekOptions_)); + } if (skipDefaultSchemaCreation_ != false) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(7, skipDefaultSchemaCreation_); } @@ -388,6 +566,17 @@ public boolean equals(final java.lang.Object obj) { if (!getDataStoreId().equals(other.getDataStoreId())) return false; if (getCreateAdvancedSiteSearch() != other.getCreateAdvancedSiteSearch()) return false; if (getSkipDefaultSchemaCreation() != other.getSkipDefaultSchemaCreation()) return false; + if (!getCmekOptionsCase().equals(other.getCmekOptionsCase())) return false; + switch (cmekOptionsCase_) { + case 5: + if (!getCmekConfigName().equals(other.getCmekConfigName())) return false; + break; + case 6: + if (getDisableCmek() != other.getDisableCmek()) return false; + break; + case 0: + default: + } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -411,6 +600,18 @@ public int hashCode() { hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getCreateAdvancedSiteSearch()); hash = (37 * hash) + SKIP_DEFAULT_SCHEMA_CREATION_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getSkipDefaultSchemaCreation()); + switch (cmekOptionsCase_) { + case 5: + hash = (37 * hash) + CMEK_CONFIG_NAME_FIELD_NUMBER; + hash = (53 * hash) + getCmekConfigName().hashCode(); + break; + case 6: + hash = (37 * hash) + DISABLE_CMEK_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getDisableCmek()); + break; + case 0: + default: + } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -572,6 +773,8 @@ public Builder clear() { dataStoreId_ = ""; createAdvancedSiteSearch_ = false; skipDefaultSchemaCreation_ = false; + cmekOptionsCase_ = 0; + cmekOptions_ = null; return this; } @@ -603,6 +806,7 @@ public com.google.cloud.discoveryengine.v1beta.CreateDataStoreRequest buildParti if (bitField0_ != 0) { buildPartial0(result); } + buildPartialOneofs(result); onBuilt(); return result; } @@ -610,26 +814,32 @@ public com.google.cloud.discoveryengine.v1beta.CreateDataStoreRequest buildParti private void buildPartial0( com.google.cloud.discoveryengine.v1beta.CreateDataStoreRequest result) { int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { + if (((from_bitField0_ & 0x00000004) != 0)) { result.parent_ = parent_; } int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000002) != 0)) { + if (((from_bitField0_ & 0x00000008) != 0)) { result.dataStore_ = dataStoreBuilder_ == null ? dataStore_ : dataStoreBuilder_.build(); to_bitField0_ |= 0x00000001; } - if (((from_bitField0_ & 0x00000004) != 0)) { + if (((from_bitField0_ & 0x00000010) != 0)) { result.dataStoreId_ = dataStoreId_; } - if (((from_bitField0_ & 0x00000008) != 0)) { + if (((from_bitField0_ & 0x00000020) != 0)) { result.createAdvancedSiteSearch_ = createAdvancedSiteSearch_; } - if (((from_bitField0_ & 0x00000010) != 0)) { + if (((from_bitField0_ & 0x00000040) != 0)) { result.skipDefaultSchemaCreation_ = skipDefaultSchemaCreation_; } result.bitField0_ |= to_bitField0_; } + private void buildPartialOneofs( + com.google.cloud.discoveryengine.v1beta.CreateDataStoreRequest result) { + result.cmekOptionsCase_ = cmekOptionsCase_; + result.cmekOptions_ = this.cmekOptions_; + } + @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.cloud.discoveryengine.v1beta.CreateDataStoreRequest) { @@ -646,7 +856,7 @@ public Builder mergeFrom(com.google.cloud.discoveryengine.v1beta.CreateDataStore return this; if (!other.getParent().isEmpty()) { parent_ = other.parent_; - bitField0_ |= 0x00000001; + bitField0_ |= 0x00000004; onChanged(); } if (other.hasDataStore()) { @@ -654,7 +864,7 @@ public Builder mergeFrom(com.google.cloud.discoveryengine.v1beta.CreateDataStore } if (!other.getDataStoreId().isEmpty()) { dataStoreId_ = other.dataStoreId_; - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000010; onChanged(); } if (other.getCreateAdvancedSiteSearch() != false) { @@ -663,6 +873,24 @@ public Builder mergeFrom(com.google.cloud.discoveryengine.v1beta.CreateDataStore if (other.getSkipDefaultSchemaCreation() != false) { setSkipDefaultSchemaCreation(other.getSkipDefaultSchemaCreation()); } + switch (other.getCmekOptionsCase()) { + case CMEK_CONFIG_NAME: + { + cmekOptionsCase_ = 5; + cmekOptions_ = other.cmekOptions_; + onChanged(); + break; + } + case DISABLE_CMEK: + { + setDisableCmek(other.getDisableCmek()); + break; + } + case CMEKOPTIONS_NOT_SET: + { + break; + } + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -692,32 +920,45 @@ public Builder mergeFrom( case 10: { parent_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; + bitField0_ |= 0x00000004; break; } // case 10 case 18: { input.readMessage( internalGetDataStoreFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000002; + bitField0_ |= 0x00000008; break; } // case 18 case 26: { dataStoreId_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000010; break; } // case 26 case 32: { createAdvancedSiteSearch_ = input.readBool(); - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000020; break; } // case 32 + case 42: + { + java.lang.String s = input.readStringRequireUtf8(); + cmekOptionsCase_ = 5; + cmekOptions_ = s; + break; + } // case 42 + case 48: + { + cmekOptions_ = input.readBool(); + cmekOptionsCase_ = 6; + break; + } // case 48 case 56: { skipDefaultSchemaCreation_ = input.readBool(); - bitField0_ |= 0x00000010; + bitField0_ |= 0x00000040; break; } // case 56 default: @@ -737,8 +978,242 @@ public Builder mergeFrom( return this; } + private int cmekOptionsCase_ = 0; + private java.lang.Object cmekOptions_; + + public CmekOptionsCase getCmekOptionsCase() { + return CmekOptionsCase.forNumber(cmekOptionsCase_); + } + + public Builder clearCmekOptions() { + cmekOptionsCase_ = 0; + cmekOptions_ = null; + onChanged(); + return this; + } + private int bitField0_; + /** + * + * + *
            +     * Resource name of the CmekConfig to use for protecting this DataStore.
            +     * 
            + * + * string cmek_config_name = 5 [(.google.api.resource_reference) = { ... } + * + * @return Whether the cmekConfigName field is set. + */ + @java.lang.Override + public boolean hasCmekConfigName() { + return cmekOptionsCase_ == 5; + } + + /** + * + * + *
            +     * Resource name of the CmekConfig to use for protecting this DataStore.
            +     * 
            + * + * string cmek_config_name = 5 [(.google.api.resource_reference) = { ... } + * + * @return The cmekConfigName. + */ + @java.lang.Override + public java.lang.String getCmekConfigName() { + java.lang.Object ref = ""; + if (cmekOptionsCase_ == 5) { + ref = cmekOptions_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (cmekOptionsCase_ == 5) { + cmekOptions_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
            +     * Resource name of the CmekConfig to use for protecting this DataStore.
            +     * 
            + * + * string cmek_config_name = 5 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for cmekConfigName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getCmekConfigNameBytes() { + java.lang.Object ref = ""; + if (cmekOptionsCase_ == 5) { + ref = cmekOptions_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (cmekOptionsCase_ == 5) { + cmekOptions_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
            +     * Resource name of the CmekConfig to use for protecting this DataStore.
            +     * 
            + * + * string cmek_config_name = 5 [(.google.api.resource_reference) = { ... } + * + * @param value The cmekConfigName to set. + * @return This builder for chaining. + */ + public Builder setCmekConfigName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + cmekOptionsCase_ = 5; + cmekOptions_ = value; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Resource name of the CmekConfig to use for protecting this DataStore.
            +     * 
            + * + * string cmek_config_name = 5 [(.google.api.resource_reference) = { ... } + * + * @return This builder for chaining. + */ + public Builder clearCmekConfigName() { + if (cmekOptionsCase_ == 5) { + cmekOptionsCase_ = 0; + cmekOptions_ = null; + onChanged(); + } + return this; + } + + /** + * + * + *
            +     * Resource name of the CmekConfig to use for protecting this DataStore.
            +     * 
            + * + * string cmek_config_name = 5 [(.google.api.resource_reference) = { ... } + * + * @param value The bytes for cmekConfigName to set. + * @return This builder for chaining. + */ + public Builder setCmekConfigNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + cmekOptionsCase_ = 5; + cmekOptions_ = value; + onChanged(); + return this; + } + + /** + * + * + *
            +     * DataStore without CMEK protections. If a default CmekConfig is set for
            +     * the project, setting this field will override the default CmekConfig as
            +     * well.
            +     * 
            + * + * bool disable_cmek = 6; + * + * @return Whether the disableCmek field is set. + */ + public boolean hasDisableCmek() { + return cmekOptionsCase_ == 6; + } + + /** + * + * + *
            +     * DataStore without CMEK protections. If a default CmekConfig is set for
            +     * the project, setting this field will override the default CmekConfig as
            +     * well.
            +     * 
            + * + * bool disable_cmek = 6; + * + * @return The disableCmek. + */ + public boolean getDisableCmek() { + if (cmekOptionsCase_ == 6) { + return (java.lang.Boolean) cmekOptions_; + } + return false; + } + + /** + * + * + *
            +     * DataStore without CMEK protections. If a default CmekConfig is set for
            +     * the project, setting this field will override the default CmekConfig as
            +     * well.
            +     * 
            + * + * bool disable_cmek = 6; + * + * @param value The disableCmek to set. + * @return This builder for chaining. + */ + public Builder setDisableCmek(boolean value) { + + cmekOptionsCase_ = 6; + cmekOptions_ = value; + onChanged(); + return this; + } + + /** + * + * + *
            +     * DataStore without CMEK protections. If a default CmekConfig is set for
            +     * the project, setting this field will override the default CmekConfig as
            +     * well.
            +     * 
            + * + * bool disable_cmek = 6; + * + * @return This builder for chaining. + */ + public Builder clearDisableCmek() { + if (cmekOptionsCase_ == 6) { + cmekOptionsCase_ = 0; + cmekOptions_ = null; + onChanged(); + } + return this; + } + private java.lang.Object parent_ = ""; /** @@ -813,7 +1288,7 @@ public Builder setParent(java.lang.String value) { throw new NullPointerException(); } parent_ = value; - bitField0_ |= 0x00000001; + bitField0_ |= 0x00000004; onChanged(); return this; } @@ -834,7 +1309,7 @@ public Builder setParent(java.lang.String value) { */ public Builder clearParent() { parent_ = getDefaultInstance().getParent(); - bitField0_ = (bitField0_ & ~0x00000001); + bitField0_ = (bitField0_ & ~0x00000004); onChanged(); return this; } @@ -860,7 +1335,7 @@ public Builder setParentBytes(com.google.protobuf.ByteString value) { } checkByteStringIsUtf8(value); parent_ = value; - bitField0_ |= 0x00000001; + bitField0_ |= 0x00000004; onChanged(); return this; } @@ -887,7 +1362,7 @@ public Builder setParentBytes(com.google.protobuf.ByteString value) { * @return Whether the dataStore field is set. */ public boolean hasDataStore() { - return ((bitField0_ & 0x00000002) != 0); + return ((bitField0_ & 0x00000008) != 0); } /** @@ -935,7 +1410,7 @@ public Builder setDataStore(com.google.cloud.discoveryengine.v1beta.DataStore va } else { dataStoreBuilder_.setMessage(value); } - bitField0_ |= 0x00000002; + bitField0_ |= 0x00000008; onChanged(); return this; } @@ -959,7 +1434,7 @@ public Builder setDataStore( } else { dataStoreBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00000002; + bitField0_ |= 0x00000008; onChanged(); return this; } @@ -978,7 +1453,7 @@ public Builder setDataStore( */ public Builder mergeDataStore(com.google.cloud.discoveryengine.v1beta.DataStore value) { if (dataStoreBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0) + if (((bitField0_ & 0x00000008) != 0) && dataStore_ != null && dataStore_ != com.google.cloud.discoveryengine.v1beta.DataStore.getDefaultInstance()) { @@ -990,7 +1465,7 @@ public Builder mergeDataStore(com.google.cloud.discoveryengine.v1beta.DataStore dataStoreBuilder_.mergeFrom(value); } if (dataStore_ != null) { - bitField0_ |= 0x00000002; + bitField0_ |= 0x00000008; onChanged(); } return this; @@ -1009,7 +1484,7 @@ public Builder mergeDataStore(com.google.cloud.discoveryengine.v1beta.DataStore *
            */ public Builder clearDataStore() { - bitField0_ = (bitField0_ & ~0x00000002); + bitField0_ = (bitField0_ & ~0x00000008); dataStore_ = null; if (dataStoreBuilder_ != null) { dataStoreBuilder_.dispose(); @@ -1032,7 +1507,7 @@ public Builder clearDataStore() { *
            */ public com.google.cloud.discoveryengine.v1beta.DataStore.Builder getDataStoreBuilder() { - bitField0_ |= 0x00000002; + bitField0_ |= 0x00000008; onChanged(); return internalGetDataStoreFieldBuilder().getBuilder(); } @@ -1174,7 +1649,7 @@ public Builder setDataStoreId(java.lang.String value) { throw new NullPointerException(); } dataStoreId_ = value; - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000010; onChanged(); return this; } @@ -1199,7 +1674,7 @@ public Builder setDataStoreId(java.lang.String value) { */ public Builder clearDataStoreId() { dataStoreId_ = getDefaultInstance().getDataStoreId(); - bitField0_ = (bitField0_ & ~0x00000004); + bitField0_ = (bitField0_ & ~0x00000010); onChanged(); return this; } @@ -1229,7 +1704,7 @@ public Builder setDataStoreIdBytes(com.google.protobuf.ByteString value) { } checkByteStringIsUtf8(value); dataStoreId_ = value; - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000010; onChanged(); return this; } @@ -1275,7 +1750,7 @@ public boolean getCreateAdvancedSiteSearch() { public Builder setCreateAdvancedSiteSearch(boolean value) { createAdvancedSiteSearch_ = value; - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000020; onChanged(); return this; } @@ -1296,7 +1771,7 @@ public Builder setCreateAdvancedSiteSearch(boolean value) { * @return This builder for chaining. */ public Builder clearCreateAdvancedSiteSearch() { - bitField0_ = (bitField0_ & ~0x00000008); + bitField0_ = (bitField0_ & ~0x00000020); createAdvancedSiteSearch_ = false; onChanged(); return this; @@ -1349,7 +1824,7 @@ public boolean getSkipDefaultSchemaCreation() { public Builder setSkipDefaultSchemaCreation(boolean value) { skipDefaultSchemaCreation_ = value; - bitField0_ |= 0x00000010; + bitField0_ |= 0x00000040; onChanged(); return this; } @@ -1373,7 +1848,7 @@ public Builder setSkipDefaultSchemaCreation(boolean value) { * @return This builder for chaining. */ public Builder clearSkipDefaultSchemaCreation() { - bitField0_ = (bitField0_ & ~0x00000010); + bitField0_ = (bitField0_ & ~0x00000040); skipDefaultSchemaCreation_ = false; onChanged(); return this; diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/CreateDataStoreRequestOrBuilder.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/CreateDataStoreRequestOrBuilder.java index 58e2f37a9764..0ed027ae83c9 100644 --- a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/CreateDataStoreRequestOrBuilder.java +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/CreateDataStoreRequestOrBuilder.java @@ -26,6 +26,75 @@ public interface CreateDataStoreRequestOrBuilder // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.CreateDataStoreRequest) com.google.protobuf.MessageOrBuilder { + /** + * + * + *
            +   * Resource name of the CmekConfig to use for protecting this DataStore.
            +   * 
            + * + * string cmek_config_name = 5 [(.google.api.resource_reference) = { ... } + * + * @return Whether the cmekConfigName field is set. + */ + boolean hasCmekConfigName(); + + /** + * + * + *
            +   * Resource name of the CmekConfig to use for protecting this DataStore.
            +   * 
            + * + * string cmek_config_name = 5 [(.google.api.resource_reference) = { ... } + * + * @return The cmekConfigName. + */ + java.lang.String getCmekConfigName(); + + /** + * + * + *
            +   * Resource name of the CmekConfig to use for protecting this DataStore.
            +   * 
            + * + * string cmek_config_name = 5 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for cmekConfigName. + */ + com.google.protobuf.ByteString getCmekConfigNameBytes(); + + /** + * + * + *
            +   * DataStore without CMEK protections. If a default CmekConfig is set for
            +   * the project, setting this field will override the default CmekConfig as
            +   * well.
            +   * 
            + * + * bool disable_cmek = 6; + * + * @return Whether the disableCmek field is set. + */ + boolean hasDisableCmek(); + + /** + * + * + *
            +   * DataStore without CMEK protections. If a default CmekConfig is set for
            +   * the project, setting this field will override the default CmekConfig as
            +   * well.
            +   * 
            + * + * bool disable_cmek = 6; + * + * @return The disableCmek. + */ + boolean getDisableCmek(); + /** * * @@ -180,4 +249,7 @@ public interface CreateDataStoreRequestOrBuilder * @return The skipDefaultSchemaCreation. */ boolean getSkipDefaultSchemaCreation(); + + com.google.cloud.discoveryengine.v1beta.CreateDataStoreRequest.CmekOptionsCase + getCmekOptionsCase(); } diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/CreateDocumentRequest.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/CreateDocumentRequest.java index 61ccebf83da9..a9f2b9d48872 100644 --- a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/CreateDocumentRequest.java +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/CreateDocumentRequest.java @@ -219,7 +219,7 @@ public com.google.cloud.discoveryengine.v1beta.DocumentOrBuilder getDocumentOrBu * Otherwise, an `ALREADY_EXISTS` error is returned. * * This field must conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) - * standard with a length limit of 63 characters. Otherwise, an + * standard with a length limit of 128 characters. Otherwise, an * `INVALID_ARGUMENT` error is returned. *
            * @@ -259,7 +259,7 @@ public java.lang.String getDocumentId() { * Otherwise, an `ALREADY_EXISTS` error is returned. * * This field must conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) - * standard with a length limit of 63 characters. Otherwise, an + * standard with a length limit of 128 characters. Otherwise, an * `INVALID_ARGUMENT` error is returned. * * @@ -1033,7 +1033,7 @@ public com.google.cloud.discoveryengine.v1beta.DocumentOrBuilder getDocumentOrBu * Otherwise, an `ALREADY_EXISTS` error is returned. * * This field must conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) - * standard with a length limit of 63 characters. Otherwise, an + * standard with a length limit of 128 characters. Otherwise, an * `INVALID_ARGUMENT` error is returned. * * @@ -1072,7 +1072,7 @@ public java.lang.String getDocumentId() { * Otherwise, an `ALREADY_EXISTS` error is returned. * * This field must conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) - * standard with a length limit of 63 characters. Otherwise, an + * standard with a length limit of 128 characters. Otherwise, an * `INVALID_ARGUMENT` error is returned. * * @@ -1111,7 +1111,7 @@ public com.google.protobuf.ByteString getDocumentIdBytes() { * Otherwise, an `ALREADY_EXISTS` error is returned. * * This field must conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) - * standard with a length limit of 63 characters. Otherwise, an + * standard with a length limit of 128 characters. Otherwise, an * `INVALID_ARGUMENT` error is returned. * * @@ -1149,7 +1149,7 @@ public Builder setDocumentId(java.lang.String value) { * Otherwise, an `ALREADY_EXISTS` error is returned. * * This field must conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) - * standard with a length limit of 63 characters. Otherwise, an + * standard with a length limit of 128 characters. Otherwise, an * `INVALID_ARGUMENT` error is returned. * * @@ -1183,7 +1183,7 @@ public Builder clearDocumentId() { * Otherwise, an `ALREADY_EXISTS` error is returned. * * This field must conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) - * standard with a length limit of 63 characters. Otherwise, an + * standard with a length limit of 128 characters. Otherwise, an * `INVALID_ARGUMENT` error is returned. * * diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/CreateDocumentRequestOrBuilder.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/CreateDocumentRequestOrBuilder.java index 2981351094c5..11f63fea130c 100644 --- a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/CreateDocumentRequestOrBuilder.java +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/CreateDocumentRequestOrBuilder.java @@ -123,7 +123,7 @@ public interface CreateDocumentRequestOrBuilder * Otherwise, an `ALREADY_EXISTS` error is returned. * * This field must conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) - * standard with a length limit of 63 characters. Otherwise, an + * standard with a length limit of 128 characters. Otherwise, an * `INVALID_ARGUMENT` error is returned. * * @@ -152,7 +152,7 @@ public interface CreateDocumentRequestOrBuilder * Otherwise, an `ALREADY_EXISTS` error is returned. * * This field must conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) - * standard with a length limit of 63 characters. Otherwise, an + * standard with a length limit of 128 characters. Otherwise, an * `INVALID_ARGUMENT` error is returned. * * diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/CreateIdentityMappingStoreRequest.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/CreateIdentityMappingStoreRequest.java new file mode 100644 index 000000000000..fe59dbbd1abc --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/CreateIdentityMappingStoreRequest.java @@ -0,0 +1,1661 @@ +/* + * 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/cloud/discoveryengine/v1beta/identity_mapping_store_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.discoveryengine.v1beta; + +/** + * + * + *
            + * Request message for
            + * [IdentityMappingStoreService.CreateIdentityMappingStore][google.cloud.discoveryengine.v1beta.IdentityMappingStoreService.CreateIdentityMappingStore]
            + * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.CreateIdentityMappingStoreRequest} + */ +@com.google.protobuf.Generated +public final class CreateIdentityMappingStoreRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.CreateIdentityMappingStoreRequest) + CreateIdentityMappingStoreRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "CreateIdentityMappingStoreRequest"); + } + + // Use CreateIdentityMappingStoreRequest.newBuilder() to construct. + private CreateIdentityMappingStoreRequest( + com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private CreateIdentityMappingStoreRequest() { + parent_ = ""; + identityMappingStoreId_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.IdentityMappingStoreServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_CreateIdentityMappingStoreRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.IdentityMappingStoreServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_CreateIdentityMappingStoreRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.CreateIdentityMappingStoreRequest.class, + com.google.cloud.discoveryengine.v1beta.CreateIdentityMappingStoreRequest.Builder + .class); + } + + private int bitField0_; + private int cmekOptionsCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object cmekOptions_; + + public enum CmekOptionsCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + CMEK_CONFIG_NAME(5), + DISABLE_CMEK(6), + CMEKOPTIONS_NOT_SET(0); + private final int value; + + private CmekOptionsCase(int value) { + this.value = value; + } + + /** + * @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 CmekOptionsCase valueOf(int value) { + return forNumber(value); + } + + public static CmekOptionsCase forNumber(int value) { + switch (value) { + case 5: + return CMEK_CONFIG_NAME; + case 6: + return DISABLE_CMEK; + case 0: + return CMEKOPTIONS_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public CmekOptionsCase getCmekOptionsCase() { + return CmekOptionsCase.forNumber(cmekOptionsCase_); + } + + public static final int CMEK_CONFIG_NAME_FIELD_NUMBER = 5; + + /** + * + * + *
            +   * Resource name of the CmekConfig to use for protecting this Identity
            +   * Mapping Store.
            +   * 
            + * + * string cmek_config_name = 5 [(.google.api.resource_reference) = { ... } + * + * @return Whether the cmekConfigName field is set. + */ + public boolean hasCmekConfigName() { + return cmekOptionsCase_ == 5; + } + + /** + * + * + *
            +   * Resource name of the CmekConfig to use for protecting this Identity
            +   * Mapping Store.
            +   * 
            + * + * string cmek_config_name = 5 [(.google.api.resource_reference) = { ... } + * + * @return The cmekConfigName. + */ + public java.lang.String getCmekConfigName() { + java.lang.Object ref = ""; + if (cmekOptionsCase_ == 5) { + ref = cmekOptions_; + } + 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(); + if (cmekOptionsCase_ == 5) { + cmekOptions_ = s; + } + return s; + } + } + + /** + * + * + *
            +   * Resource name of the CmekConfig to use for protecting this Identity
            +   * Mapping Store.
            +   * 
            + * + * string cmek_config_name = 5 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for cmekConfigName. + */ + public com.google.protobuf.ByteString getCmekConfigNameBytes() { + java.lang.Object ref = ""; + if (cmekOptionsCase_ == 5) { + ref = cmekOptions_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (cmekOptionsCase_ == 5) { + cmekOptions_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DISABLE_CMEK_FIELD_NUMBER = 6; + + /** + * + * + *
            +   * Identity Mapping Store without CMEK protections. If a default CmekConfig
            +   * is set for the project, setting this field will override the default
            +   * CmekConfig as well.
            +   * 
            + * + * bool disable_cmek = 6; + * + * @return Whether the disableCmek field is set. + */ + @java.lang.Override + public boolean hasDisableCmek() { + return cmekOptionsCase_ == 6; + } + + /** + * + * + *
            +   * Identity Mapping Store without CMEK protections. If a default CmekConfig
            +   * is set for the project, setting this field will override the default
            +   * CmekConfig as well.
            +   * 
            + * + * bool disable_cmek = 6; + * + * @return The disableCmek. + */ + @java.lang.Override + public boolean getDisableCmek() { + if (cmekOptionsCase_ == 6) { + return (java.lang.Boolean) cmekOptions_; + } + return false; + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + + /** + * + * + *
            +   * Required. The parent collection resource name, such as
            +   * `projects/{project}/locations/{location}`.
            +   * 
            + * + * + * 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 parent collection resource name, such as
            +   * `projects/{project}/locations/{location}`.
            +   * 
            + * + * + * 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 IDENTITY_MAPPING_STORE_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object identityMappingStoreId_ = ""; + + /** + * + * + *
            +   * Required. The ID of the Identity Mapping Store to create.
            +   *
            +   * The ID must contain only letters (a-z, A-Z), numbers (0-9), underscores
            +   * (_), and hyphens (-). The maximum length is 63 characters.
            +   * 
            + * + * string identity_mapping_store_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The identityMappingStoreId. + */ + @java.lang.Override + public java.lang.String getIdentityMappingStoreId() { + java.lang.Object ref = identityMappingStoreId_; + 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(); + identityMappingStoreId_ = s; + return s; + } + } + + /** + * + * + *
            +   * Required. The ID of the Identity Mapping Store to create.
            +   *
            +   * The ID must contain only letters (a-z, A-Z), numbers (0-9), underscores
            +   * (_), and hyphens (-). The maximum length is 63 characters.
            +   * 
            + * + * string identity_mapping_store_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for identityMappingStoreId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getIdentityMappingStoreIdBytes() { + java.lang.Object ref = identityMappingStoreId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + identityMappingStoreId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int IDENTITY_MAPPING_STORE_FIELD_NUMBER = 3; + private com.google.cloud.discoveryengine.v1beta.IdentityMappingStore identityMappingStore_; + + /** + * + * + *
            +   * Required. The Identity Mapping Store to create.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.IdentityMappingStore identity_mapping_store = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the identityMappingStore field is set. + */ + @java.lang.Override + public boolean hasIdentityMappingStore() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
            +   * Required. The Identity Mapping Store to create.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.IdentityMappingStore identity_mapping_store = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The identityMappingStore. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.IdentityMappingStore getIdentityMappingStore() { + return identityMappingStore_ == null + ? com.google.cloud.discoveryengine.v1beta.IdentityMappingStore.getDefaultInstance() + : identityMappingStore_; + } + + /** + * + * + *
            +   * Required. The Identity Mapping Store to create.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.IdentityMappingStore identity_mapping_store = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.IdentityMappingStoreOrBuilder + getIdentityMappingStoreOrBuilder() { + return identityMappingStore_ == null + ? com.google.cloud.discoveryengine.v1beta.IdentityMappingStore.getDefaultInstance() + : identityMappingStore_; + } + + 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(identityMappingStoreId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, identityMappingStoreId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(3, getIdentityMappingStore()); + } + if (cmekOptionsCase_ == 5) { + com.google.protobuf.GeneratedMessage.writeString(output, 5, cmekOptions_); + } + if (cmekOptionsCase_ == 6) { + output.writeBool(6, (boolean) ((java.lang.Boolean) cmekOptions_)); + } + 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(identityMappingStoreId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, identityMappingStoreId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(3, getIdentityMappingStore()); + } + if (cmekOptionsCase_ == 5) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(5, cmekOptions_); + } + if (cmekOptionsCase_ == 6) { + size += + com.google.protobuf.CodedOutputStream.computeBoolSize( + 6, (boolean) ((java.lang.Boolean) cmekOptions_)); + } + 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.discoveryengine.v1beta.CreateIdentityMappingStoreRequest)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1beta.CreateIdentityMappingStoreRequest other = + (com.google.cloud.discoveryengine.v1beta.CreateIdentityMappingStoreRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (!getIdentityMappingStoreId().equals(other.getIdentityMappingStoreId())) return false; + if (hasIdentityMappingStore() != other.hasIdentityMappingStore()) return false; + if (hasIdentityMappingStore()) { + if (!getIdentityMappingStore().equals(other.getIdentityMappingStore())) return false; + } + if (!getCmekOptionsCase().equals(other.getCmekOptionsCase())) return false; + switch (cmekOptionsCase_) { + case 5: + if (!getCmekConfigName().equals(other.getCmekConfigName())) return false; + break; + case 6: + if (getDisableCmek() != other.getDisableCmek()) return false; + break; + case 0: + default: + } + 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) + IDENTITY_MAPPING_STORE_ID_FIELD_NUMBER; + hash = (53 * hash) + getIdentityMappingStoreId().hashCode(); + if (hasIdentityMappingStore()) { + hash = (37 * hash) + IDENTITY_MAPPING_STORE_FIELD_NUMBER; + hash = (53 * hash) + getIdentityMappingStore().hashCode(); + } + switch (cmekOptionsCase_) { + case 5: + hash = (37 * hash) + CMEK_CONFIG_NAME_FIELD_NUMBER; + hash = (53 * hash) + getCmekConfigName().hashCode(); + break; + case 6: + hash = (37 * hash) + DISABLE_CMEK_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getDisableCmek()); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1beta.CreateIdentityMappingStoreRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.CreateIdentityMappingStoreRequest 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.discoveryengine.v1beta.CreateIdentityMappingStoreRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.CreateIdentityMappingStoreRequest 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.discoveryengine.v1beta.CreateIdentityMappingStoreRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.CreateIdentityMappingStoreRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1beta.CreateIdentityMappingStoreRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.CreateIdentityMappingStoreRequest 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.discoveryengine.v1beta.CreateIdentityMappingStoreRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.CreateIdentityMappingStoreRequest + 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.discoveryengine.v1beta.CreateIdentityMappingStoreRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.CreateIdentityMappingStoreRequest 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.discoveryengine.v1beta.CreateIdentityMappingStoreRequest 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
            +   * [IdentityMappingStoreService.CreateIdentityMappingStore][google.cloud.discoveryengine.v1beta.IdentityMappingStoreService.CreateIdentityMappingStore]
            +   * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.CreateIdentityMappingStoreRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.CreateIdentityMappingStoreRequest) + com.google.cloud.discoveryengine.v1beta.CreateIdentityMappingStoreRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.IdentityMappingStoreServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_CreateIdentityMappingStoreRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.IdentityMappingStoreServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_CreateIdentityMappingStoreRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.CreateIdentityMappingStoreRequest.class, + com.google.cloud.discoveryengine.v1beta.CreateIdentityMappingStoreRequest.Builder + .class); + } + + // Construct using + // com.google.cloud.discoveryengine.v1beta.CreateIdentityMappingStoreRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetIdentityMappingStoreFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + identityMappingStoreId_ = ""; + identityMappingStore_ = null; + if (identityMappingStoreBuilder_ != null) { + identityMappingStoreBuilder_.dispose(); + identityMappingStoreBuilder_ = null; + } + cmekOptionsCase_ = 0; + cmekOptions_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1beta.IdentityMappingStoreServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_CreateIdentityMappingStoreRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.CreateIdentityMappingStoreRequest + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1beta.CreateIdentityMappingStoreRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.CreateIdentityMappingStoreRequest build() { + com.google.cloud.discoveryengine.v1beta.CreateIdentityMappingStoreRequest result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.CreateIdentityMappingStoreRequest + buildPartial() { + com.google.cloud.discoveryengine.v1beta.CreateIdentityMappingStoreRequest result = + new com.google.cloud.discoveryengine.v1beta.CreateIdentityMappingStoreRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.discoveryengine.v1beta.CreateIdentityMappingStoreRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.identityMappingStoreId_ = identityMappingStoreId_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000010) != 0)) { + result.identityMappingStore_ = + identityMappingStoreBuilder_ == null + ? identityMappingStore_ + : identityMappingStoreBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + private void buildPartialOneofs( + com.google.cloud.discoveryengine.v1beta.CreateIdentityMappingStoreRequest result) { + result.cmekOptionsCase_ = cmekOptionsCase_; + result.cmekOptions_ = this.cmekOptions_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.cloud.discoveryengine.v1beta.CreateIdentityMappingStoreRequest) { + return mergeFrom( + (com.google.cloud.discoveryengine.v1beta.CreateIdentityMappingStoreRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1beta.CreateIdentityMappingStoreRequest other) { + if (other + == com.google.cloud.discoveryengine.v1beta.CreateIdentityMappingStoreRequest + .getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getIdentityMappingStoreId().isEmpty()) { + identityMappingStoreId_ = other.identityMappingStoreId_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (other.hasIdentityMappingStore()) { + mergeIdentityMappingStore(other.getIdentityMappingStore()); + } + switch (other.getCmekOptionsCase()) { + case CMEK_CONFIG_NAME: + { + cmekOptionsCase_ = 5; + cmekOptions_ = other.cmekOptions_; + onChanged(); + break; + } + case DISABLE_CMEK: + { + setDisableCmek(other.getDisableCmek()); + break; + } + case CMEKOPTIONS_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 10 + case 18: + { + identityMappingStoreId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 18 + case 26: + { + input.readMessage( + internalGetIdentityMappingStoreFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 26 + case 42: + { + java.lang.String s = input.readStringRequireUtf8(); + cmekOptionsCase_ = 5; + cmekOptions_ = s; + break; + } // case 42 + case 48: + { + cmekOptions_ = input.readBool(); + cmekOptionsCase_ = 6; + break; + } // case 48 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int cmekOptionsCase_ = 0; + private java.lang.Object cmekOptions_; + + public CmekOptionsCase getCmekOptionsCase() { + return CmekOptionsCase.forNumber(cmekOptionsCase_); + } + + public Builder clearCmekOptions() { + cmekOptionsCase_ = 0; + cmekOptions_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + /** + * + * + *
            +     * Resource name of the CmekConfig to use for protecting this Identity
            +     * Mapping Store.
            +     * 
            + * + * string cmek_config_name = 5 [(.google.api.resource_reference) = { ... } + * + * @return Whether the cmekConfigName field is set. + */ + @java.lang.Override + public boolean hasCmekConfigName() { + return cmekOptionsCase_ == 5; + } + + /** + * + * + *
            +     * Resource name of the CmekConfig to use for protecting this Identity
            +     * Mapping Store.
            +     * 
            + * + * string cmek_config_name = 5 [(.google.api.resource_reference) = { ... } + * + * @return The cmekConfigName. + */ + @java.lang.Override + public java.lang.String getCmekConfigName() { + java.lang.Object ref = ""; + if (cmekOptionsCase_ == 5) { + ref = cmekOptions_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (cmekOptionsCase_ == 5) { + cmekOptions_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
            +     * Resource name of the CmekConfig to use for protecting this Identity
            +     * Mapping Store.
            +     * 
            + * + * string cmek_config_name = 5 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for cmekConfigName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getCmekConfigNameBytes() { + java.lang.Object ref = ""; + if (cmekOptionsCase_ == 5) { + ref = cmekOptions_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (cmekOptionsCase_ == 5) { + cmekOptions_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
            +     * Resource name of the CmekConfig to use for protecting this Identity
            +     * Mapping Store.
            +     * 
            + * + * string cmek_config_name = 5 [(.google.api.resource_reference) = { ... } + * + * @param value The cmekConfigName to set. + * @return This builder for chaining. + */ + public Builder setCmekConfigName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + cmekOptionsCase_ = 5; + cmekOptions_ = value; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Resource name of the CmekConfig to use for protecting this Identity
            +     * Mapping Store.
            +     * 
            + * + * string cmek_config_name = 5 [(.google.api.resource_reference) = { ... } + * + * @return This builder for chaining. + */ + public Builder clearCmekConfigName() { + if (cmekOptionsCase_ == 5) { + cmekOptionsCase_ = 0; + cmekOptions_ = null; + onChanged(); + } + return this; + } + + /** + * + * + *
            +     * Resource name of the CmekConfig to use for protecting this Identity
            +     * Mapping Store.
            +     * 
            + * + * string cmek_config_name = 5 [(.google.api.resource_reference) = { ... } + * + * @param value The bytes for cmekConfigName to set. + * @return This builder for chaining. + */ + public Builder setCmekConfigNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + cmekOptionsCase_ = 5; + cmekOptions_ = value; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Identity Mapping Store without CMEK protections. If a default CmekConfig
            +     * is set for the project, setting this field will override the default
            +     * CmekConfig as well.
            +     * 
            + * + * bool disable_cmek = 6; + * + * @return Whether the disableCmek field is set. + */ + public boolean hasDisableCmek() { + return cmekOptionsCase_ == 6; + } + + /** + * + * + *
            +     * Identity Mapping Store without CMEK protections. If a default CmekConfig
            +     * is set for the project, setting this field will override the default
            +     * CmekConfig as well.
            +     * 
            + * + * bool disable_cmek = 6; + * + * @return The disableCmek. + */ + public boolean getDisableCmek() { + if (cmekOptionsCase_ == 6) { + return (java.lang.Boolean) cmekOptions_; + } + return false; + } + + /** + * + * + *
            +     * Identity Mapping Store without CMEK protections. If a default CmekConfig
            +     * is set for the project, setting this field will override the default
            +     * CmekConfig as well.
            +     * 
            + * + * bool disable_cmek = 6; + * + * @param value The disableCmek to set. + * @return This builder for chaining. + */ + public Builder setDisableCmek(boolean value) { + + cmekOptionsCase_ = 6; + cmekOptions_ = value; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Identity Mapping Store without CMEK protections. If a default CmekConfig
            +     * is set for the project, setting this field will override the default
            +     * CmekConfig as well.
            +     * 
            + * + * bool disable_cmek = 6; + * + * @return This builder for chaining. + */ + public Builder clearDisableCmek() { + if (cmekOptionsCase_ == 6) { + cmekOptionsCase_ = 0; + cmekOptions_ = null; + onChanged(); + } + return this; + } + + private java.lang.Object parent_ = ""; + + /** + * + * + *
            +     * Required. The parent collection resource name, such as
            +     * `projects/{project}/locations/{location}`.
            +     * 
            + * + * + * 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 parent collection resource name, such as
            +     * `projects/{project}/locations/{location}`.
            +     * 
            + * + * + * 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 parent collection resource name, such as
            +     * `projects/{project}/locations/{location}`.
            +     * 
            + * + * + * 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_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Required. The parent collection resource name, such as
            +     * `projects/{project}/locations/{location}`.
            +     * 
            + * + * + * 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_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
            +     * Required. The parent collection resource name, such as
            +     * `projects/{project}/locations/{location}`.
            +     * 
            + * + * + * 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_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object identityMappingStoreId_ = ""; + + /** + * + * + *
            +     * Required. The ID of the Identity Mapping Store to create.
            +     *
            +     * The ID must contain only letters (a-z, A-Z), numbers (0-9), underscores
            +     * (_), and hyphens (-). The maximum length is 63 characters.
            +     * 
            + * + * string identity_mapping_store_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The identityMappingStoreId. + */ + public java.lang.String getIdentityMappingStoreId() { + java.lang.Object ref = identityMappingStoreId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + identityMappingStoreId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
            +     * Required. The ID of the Identity Mapping Store to create.
            +     *
            +     * The ID must contain only letters (a-z, A-Z), numbers (0-9), underscores
            +     * (_), and hyphens (-). The maximum length is 63 characters.
            +     * 
            + * + * string identity_mapping_store_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for identityMappingStoreId. + */ + public com.google.protobuf.ByteString getIdentityMappingStoreIdBytes() { + java.lang.Object ref = identityMappingStoreId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + identityMappingStoreId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
            +     * Required. The ID of the Identity Mapping Store to create.
            +     *
            +     * The ID must contain only letters (a-z, A-Z), numbers (0-9), underscores
            +     * (_), and hyphens (-). The maximum length is 63 characters.
            +     * 
            + * + * string identity_mapping_store_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The identityMappingStoreId to set. + * @return This builder for chaining. + */ + public Builder setIdentityMappingStoreId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + identityMappingStoreId_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Required. The ID of the Identity Mapping Store to create.
            +     *
            +     * The ID must contain only letters (a-z, A-Z), numbers (0-9), underscores
            +     * (_), and hyphens (-). The maximum length is 63 characters.
            +     * 
            + * + * string identity_mapping_store_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearIdentityMappingStoreId() { + identityMappingStoreId_ = getDefaultInstance().getIdentityMappingStoreId(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + + /** + * + * + *
            +     * Required. The ID of the Identity Mapping Store to create.
            +     *
            +     * The ID must contain only letters (a-z, A-Z), numbers (0-9), underscores
            +     * (_), and hyphens (-). The maximum length is 63 characters.
            +     * 
            + * + * string identity_mapping_store_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for identityMappingStoreId to set. + * @return This builder for chaining. + */ + public Builder setIdentityMappingStoreIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + identityMappingStoreId_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private com.google.cloud.discoveryengine.v1beta.IdentityMappingStore identityMappingStore_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.IdentityMappingStore, + com.google.cloud.discoveryengine.v1beta.IdentityMappingStore.Builder, + com.google.cloud.discoveryengine.v1beta.IdentityMappingStoreOrBuilder> + identityMappingStoreBuilder_; + + /** + * + * + *
            +     * Required. The Identity Mapping Store to create.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.IdentityMappingStore identity_mapping_store = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the identityMappingStore field is set. + */ + public boolean hasIdentityMappingStore() { + return ((bitField0_ & 0x00000010) != 0); + } + + /** + * + * + *
            +     * Required. The Identity Mapping Store to create.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.IdentityMappingStore identity_mapping_store = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The identityMappingStore. + */ + public com.google.cloud.discoveryengine.v1beta.IdentityMappingStore getIdentityMappingStore() { + if (identityMappingStoreBuilder_ == null) { + return identityMappingStore_ == null + ? com.google.cloud.discoveryengine.v1beta.IdentityMappingStore.getDefaultInstance() + : identityMappingStore_; + } else { + return identityMappingStoreBuilder_.getMessage(); + } + } + + /** + * + * + *
            +     * Required. The Identity Mapping Store to create.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.IdentityMappingStore identity_mapping_store = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setIdentityMappingStore( + com.google.cloud.discoveryengine.v1beta.IdentityMappingStore value) { + if (identityMappingStoreBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + identityMappingStore_ = value; + } else { + identityMappingStoreBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Required. The Identity Mapping Store to create.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.IdentityMappingStore identity_mapping_store = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setIdentityMappingStore( + com.google.cloud.discoveryengine.v1beta.IdentityMappingStore.Builder builderForValue) { + if (identityMappingStoreBuilder_ == null) { + identityMappingStore_ = builderForValue.build(); + } else { + identityMappingStoreBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Required. The Identity Mapping Store to create.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.IdentityMappingStore identity_mapping_store = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeIdentityMappingStore( + com.google.cloud.discoveryengine.v1beta.IdentityMappingStore value) { + if (identityMappingStoreBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) + && identityMappingStore_ != null + && identityMappingStore_ + != com.google.cloud.discoveryengine.v1beta.IdentityMappingStore + .getDefaultInstance()) { + getIdentityMappingStoreBuilder().mergeFrom(value); + } else { + identityMappingStore_ = value; + } + } else { + identityMappingStoreBuilder_.mergeFrom(value); + } + if (identityMappingStore_ != null) { + bitField0_ |= 0x00000010; + onChanged(); + } + return this; + } + + /** + * + * + *
            +     * Required. The Identity Mapping Store to create.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.IdentityMappingStore identity_mapping_store = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearIdentityMappingStore() { + bitField0_ = (bitField0_ & ~0x00000010); + identityMappingStore_ = null; + if (identityMappingStoreBuilder_ != null) { + identityMappingStoreBuilder_.dispose(); + identityMappingStoreBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
            +     * Required. The Identity Mapping Store to create.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.IdentityMappingStore identity_mapping_store = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.discoveryengine.v1beta.IdentityMappingStore.Builder + getIdentityMappingStoreBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return internalGetIdentityMappingStoreFieldBuilder().getBuilder(); + } + + /** + * + * + *
            +     * Required. The Identity Mapping Store to create.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.IdentityMappingStore identity_mapping_store = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.discoveryengine.v1beta.IdentityMappingStoreOrBuilder + getIdentityMappingStoreOrBuilder() { + if (identityMappingStoreBuilder_ != null) { + return identityMappingStoreBuilder_.getMessageOrBuilder(); + } else { + return identityMappingStore_ == null + ? com.google.cloud.discoveryengine.v1beta.IdentityMappingStore.getDefaultInstance() + : identityMappingStore_; + } + } + + /** + * + * + *
            +     * Required. The Identity Mapping Store to create.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.IdentityMappingStore identity_mapping_store = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.IdentityMappingStore, + com.google.cloud.discoveryengine.v1beta.IdentityMappingStore.Builder, + com.google.cloud.discoveryengine.v1beta.IdentityMappingStoreOrBuilder> + internalGetIdentityMappingStoreFieldBuilder() { + if (identityMappingStoreBuilder_ == null) { + identityMappingStoreBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.IdentityMappingStore, + com.google.cloud.discoveryengine.v1beta.IdentityMappingStore.Builder, + com.google.cloud.discoveryengine.v1beta.IdentityMappingStoreOrBuilder>( + getIdentityMappingStore(), getParentForChildren(), isClean()); + identityMappingStore_ = null; + } + return identityMappingStoreBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.CreateIdentityMappingStoreRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.CreateIdentityMappingStoreRequest) + private static final com.google.cloud.discoveryengine.v1beta.CreateIdentityMappingStoreRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.discoveryengine.v1beta.CreateIdentityMappingStoreRequest(); + } + + public static com.google.cloud.discoveryengine.v1beta.CreateIdentityMappingStoreRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateIdentityMappingStoreRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.CreateIdentityMappingStoreRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/CreateIdentityMappingStoreRequestOrBuilder.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/CreateIdentityMappingStoreRequestOrBuilder.java new file mode 100644 index 000000000000..2809f6903791 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/CreateIdentityMappingStoreRequestOrBuilder.java @@ -0,0 +1,211 @@ +/* + * 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/cloud/discoveryengine/v1beta/identity_mapping_store_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.discoveryengine.v1beta; + +@com.google.protobuf.Generated +public interface CreateIdentityMappingStoreRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.CreateIdentityMappingStoreRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
            +   * Resource name of the CmekConfig to use for protecting this Identity
            +   * Mapping Store.
            +   * 
            + * + * string cmek_config_name = 5 [(.google.api.resource_reference) = { ... } + * + * @return Whether the cmekConfigName field is set. + */ + boolean hasCmekConfigName(); + + /** + * + * + *
            +   * Resource name of the CmekConfig to use for protecting this Identity
            +   * Mapping Store.
            +   * 
            + * + * string cmek_config_name = 5 [(.google.api.resource_reference) = { ... } + * + * @return The cmekConfigName. + */ + java.lang.String getCmekConfigName(); + + /** + * + * + *
            +   * Resource name of the CmekConfig to use for protecting this Identity
            +   * Mapping Store.
            +   * 
            + * + * string cmek_config_name = 5 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for cmekConfigName. + */ + com.google.protobuf.ByteString getCmekConfigNameBytes(); + + /** + * + * + *
            +   * Identity Mapping Store without CMEK protections. If a default CmekConfig
            +   * is set for the project, setting this field will override the default
            +   * CmekConfig as well.
            +   * 
            + * + * bool disable_cmek = 6; + * + * @return Whether the disableCmek field is set. + */ + boolean hasDisableCmek(); + + /** + * + * + *
            +   * Identity Mapping Store without CMEK protections. If a default CmekConfig
            +   * is set for the project, setting this field will override the default
            +   * CmekConfig as well.
            +   * 
            + * + * bool disable_cmek = 6; + * + * @return The disableCmek. + */ + boolean getDisableCmek(); + + /** + * + * + *
            +   * Required. The parent collection resource name, such as
            +   * `projects/{project}/locations/{location}`.
            +   * 
            + * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + + /** + * + * + *
            +   * Required. The parent collection resource name, such as
            +   * `projects/{project}/locations/{location}`.
            +   * 
            + * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
            +   * Required. The ID of the Identity Mapping Store to create.
            +   *
            +   * The ID must contain only letters (a-z, A-Z), numbers (0-9), underscores
            +   * (_), and hyphens (-). The maximum length is 63 characters.
            +   * 
            + * + * string identity_mapping_store_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The identityMappingStoreId. + */ + java.lang.String getIdentityMappingStoreId(); + + /** + * + * + *
            +   * Required. The ID of the Identity Mapping Store to create.
            +   *
            +   * The ID must contain only letters (a-z, A-Z), numbers (0-9), underscores
            +   * (_), and hyphens (-). The maximum length is 63 characters.
            +   * 
            + * + * string identity_mapping_store_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for identityMappingStoreId. + */ + com.google.protobuf.ByteString getIdentityMappingStoreIdBytes(); + + /** + * + * + *
            +   * Required. The Identity Mapping Store to create.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.IdentityMappingStore identity_mapping_store = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the identityMappingStore field is set. + */ + boolean hasIdentityMappingStore(); + + /** + * + * + *
            +   * Required. The Identity Mapping Store to create.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.IdentityMappingStore identity_mapping_store = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The identityMappingStore. + */ + com.google.cloud.discoveryengine.v1beta.IdentityMappingStore getIdentityMappingStore(); + + /** + * + * + *
            +   * Required. The Identity Mapping Store to create.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.IdentityMappingStore identity_mapping_store = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.discoveryengine.v1beta.IdentityMappingStoreOrBuilder + getIdentityMappingStoreOrBuilder(); + + com.google.cloud.discoveryengine.v1beta.CreateIdentityMappingStoreRequest.CmekOptionsCase + getCmekOptionsCase(); +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/CreateLicenseConfigRequest.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/CreateLicenseConfigRequest.java new file mode 100644 index 000000000000..dec148c17fa3 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/CreateLicenseConfigRequest.java @@ -0,0 +1,1202 @@ +/* + * 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/cloud/discoveryengine/v1beta/license_config_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.discoveryengine.v1beta; + +/** + * + * + *
            + * Request message for
            + * [LicenseConfigService.CreateLicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfigService.CreateLicenseConfig]
            + * method.
            + * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.CreateLicenseConfigRequest} + */ +@com.google.protobuf.Generated +public final class CreateLicenseConfigRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.CreateLicenseConfigRequest) + CreateLicenseConfigRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "CreateLicenseConfigRequest"); + } + + // Use CreateLicenseConfigRequest.newBuilder() to construct. + private CreateLicenseConfigRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private CreateLicenseConfigRequest() { + parent_ = ""; + licenseConfigId_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.LicenseConfigServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_CreateLicenseConfigRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.LicenseConfigServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_CreateLicenseConfigRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.CreateLicenseConfigRequest.class, + com.google.cloud.discoveryengine.v1beta.CreateLicenseConfigRequest.Builder.class); + } + + private int bitField0_; + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + + /** + * + * + *
            +   * Required. The parent resource name, such as
            +   * `projects/{project}/locations/{location}`.
            +   * 
            + * + * + * 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 parent resource name, such as
            +   * `projects/{project}/locations/{location}`.
            +   * 
            + * + * + * 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 LICENSE_CONFIG_FIELD_NUMBER = 2; + private com.google.cloud.discoveryengine.v1beta.LicenseConfig licenseConfig_; + + /** + * + * + *
            +   * Required. The
            +   * [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig] to
            +   * create.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.LicenseConfig license_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the licenseConfig field is set. + */ + @java.lang.Override + public boolean hasLicenseConfig() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
            +   * Required. The
            +   * [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig] to
            +   * create.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.LicenseConfig license_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The licenseConfig. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.LicenseConfig getLicenseConfig() { + return licenseConfig_ == null + ? com.google.cloud.discoveryengine.v1beta.LicenseConfig.getDefaultInstance() + : licenseConfig_; + } + + /** + * + * + *
            +   * Required. The
            +   * [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig] to
            +   * create.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.LicenseConfig license_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.LicenseConfigOrBuilder + getLicenseConfigOrBuilder() { + return licenseConfig_ == null + ? com.google.cloud.discoveryengine.v1beta.LicenseConfig.getDefaultInstance() + : licenseConfig_; + } + + public static final int LICENSE_CONFIG_ID_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object licenseConfigId_ = ""; + + /** + * + * + *
            +   * Optional. The ID to use for the
            +   * [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig], which
            +   * will become the final component of the
            +   * [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig]'s
            +   * resource name. We are using the tier (product edition) name as the license
            +   * config id such as `search` or `search_and_assistant`.
            +   * 
            + * + * string license_config_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The licenseConfigId. + */ + @java.lang.Override + public java.lang.String getLicenseConfigId() { + java.lang.Object ref = licenseConfigId_; + 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(); + licenseConfigId_ = s; + return s; + } + } + + /** + * + * + *
            +   * Optional. The ID to use for the
            +   * [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig], which
            +   * will become the final component of the
            +   * [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig]'s
            +   * resource name. We are using the tier (product edition) name as the license
            +   * config id such as `search` or `search_and_assistant`.
            +   * 
            + * + * string license_config_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for licenseConfigId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getLicenseConfigIdBytes() { + java.lang.Object ref = licenseConfigId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + licenseConfigId_ = 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 { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, parent_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getLicenseConfig()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(licenseConfigId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, licenseConfigId_); + } + 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 (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getLicenseConfig()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(licenseConfigId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, licenseConfigId_); + } + 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.discoveryengine.v1beta.CreateLicenseConfigRequest)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1beta.CreateLicenseConfigRequest other = + (com.google.cloud.discoveryengine.v1beta.CreateLicenseConfigRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (hasLicenseConfig() != other.hasLicenseConfig()) return false; + if (hasLicenseConfig()) { + if (!getLicenseConfig().equals(other.getLicenseConfig())) return false; + } + if (!getLicenseConfigId().equals(other.getLicenseConfigId())) 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(); + if (hasLicenseConfig()) { + hash = (37 * hash) + LICENSE_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getLicenseConfig().hashCode(); + } + hash = (37 * hash) + LICENSE_CONFIG_ID_FIELD_NUMBER; + hash = (53 * hash) + getLicenseConfigId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1beta.CreateLicenseConfigRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.CreateLicenseConfigRequest 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.discoveryengine.v1beta.CreateLicenseConfigRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.CreateLicenseConfigRequest 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.discoveryengine.v1beta.CreateLicenseConfigRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.CreateLicenseConfigRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1beta.CreateLicenseConfigRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.CreateLicenseConfigRequest 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.discoveryengine.v1beta.CreateLicenseConfigRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.CreateLicenseConfigRequest + 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.discoveryengine.v1beta.CreateLicenseConfigRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.CreateLicenseConfigRequest 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.discoveryengine.v1beta.CreateLicenseConfigRequest 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
            +   * [LicenseConfigService.CreateLicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfigService.CreateLicenseConfig]
            +   * method.
            +   * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.CreateLicenseConfigRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.CreateLicenseConfigRequest) + com.google.cloud.discoveryengine.v1beta.CreateLicenseConfigRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.LicenseConfigServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_CreateLicenseConfigRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.LicenseConfigServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_CreateLicenseConfigRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.CreateLicenseConfigRequest.class, + com.google.cloud.discoveryengine.v1beta.CreateLicenseConfigRequest.Builder.class); + } + + // Construct using + // com.google.cloud.discoveryengine.v1beta.CreateLicenseConfigRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetLicenseConfigFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + licenseConfig_ = null; + if (licenseConfigBuilder_ != null) { + licenseConfigBuilder_.dispose(); + licenseConfigBuilder_ = null; + } + licenseConfigId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1beta.LicenseConfigServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_CreateLicenseConfigRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.CreateLicenseConfigRequest + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1beta.CreateLicenseConfigRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.CreateLicenseConfigRequest build() { + com.google.cloud.discoveryengine.v1beta.CreateLicenseConfigRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.CreateLicenseConfigRequest buildPartial() { + com.google.cloud.discoveryengine.v1beta.CreateLicenseConfigRequest result = + new com.google.cloud.discoveryengine.v1beta.CreateLicenseConfigRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.discoveryengine.v1beta.CreateLicenseConfigRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.licenseConfig_ = + licenseConfigBuilder_ == null ? licenseConfig_ : licenseConfigBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.licenseConfigId_ = licenseConfigId_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.discoveryengine.v1beta.CreateLicenseConfigRequest) { + return mergeFrom( + (com.google.cloud.discoveryengine.v1beta.CreateLicenseConfigRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1beta.CreateLicenseConfigRequest other) { + if (other + == com.google.cloud.discoveryengine.v1beta.CreateLicenseConfigRequest + .getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasLicenseConfig()) { + mergeLicenseConfig(other.getLicenseConfig()); + } + if (!other.getLicenseConfigId().isEmpty()) { + licenseConfigId_ = other.licenseConfigId_; + bitField0_ |= 0x00000004; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage( + internalGetLicenseConfigFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + licenseConfigId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + + /** + * + * + *
            +     * Required. The parent resource name, such as
            +     * `projects/{project}/locations/{location}`.
            +     * 
            + * + * + * 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 parent resource name, such as
            +     * `projects/{project}/locations/{location}`.
            +     * 
            + * + * + * 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 parent resource name, such as
            +     * `projects/{project}/locations/{location}`.
            +     * 
            + * + * + * 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 parent resource name, such as
            +     * `projects/{project}/locations/{location}`.
            +     * 
            + * + * + * 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 parent resource name, such as
            +     * `projects/{project}/locations/{location}`.
            +     * 
            + * + * + * 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 com.google.cloud.discoveryengine.v1beta.LicenseConfig licenseConfig_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.LicenseConfig, + com.google.cloud.discoveryengine.v1beta.LicenseConfig.Builder, + com.google.cloud.discoveryengine.v1beta.LicenseConfigOrBuilder> + licenseConfigBuilder_; + + /** + * + * + *
            +     * Required. The
            +     * [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig] to
            +     * create.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.LicenseConfig license_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the licenseConfig field is set. + */ + public boolean hasLicenseConfig() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
            +     * Required. The
            +     * [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig] to
            +     * create.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.LicenseConfig license_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The licenseConfig. + */ + public com.google.cloud.discoveryengine.v1beta.LicenseConfig getLicenseConfig() { + if (licenseConfigBuilder_ == null) { + return licenseConfig_ == null + ? com.google.cloud.discoveryengine.v1beta.LicenseConfig.getDefaultInstance() + : licenseConfig_; + } else { + return licenseConfigBuilder_.getMessage(); + } + } + + /** + * + * + *
            +     * Required. The
            +     * [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig] to
            +     * create.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.LicenseConfig license_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setLicenseConfig(com.google.cloud.discoveryengine.v1beta.LicenseConfig value) { + if (licenseConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + licenseConfig_ = value; + } else { + licenseConfigBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Required. The
            +     * [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig] to
            +     * create.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.LicenseConfig license_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setLicenseConfig( + com.google.cloud.discoveryengine.v1beta.LicenseConfig.Builder builderForValue) { + if (licenseConfigBuilder_ == null) { + licenseConfig_ = builderForValue.build(); + } else { + licenseConfigBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Required. The
            +     * [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig] to
            +     * create.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.LicenseConfig license_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeLicenseConfig(com.google.cloud.discoveryengine.v1beta.LicenseConfig value) { + if (licenseConfigBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && licenseConfig_ != null + && licenseConfig_ + != com.google.cloud.discoveryengine.v1beta.LicenseConfig.getDefaultInstance()) { + getLicenseConfigBuilder().mergeFrom(value); + } else { + licenseConfig_ = value; + } + } else { + licenseConfigBuilder_.mergeFrom(value); + } + if (licenseConfig_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** + * + * + *
            +     * Required. The
            +     * [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig] to
            +     * create.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.LicenseConfig license_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearLicenseConfig() { + bitField0_ = (bitField0_ & ~0x00000002); + licenseConfig_ = null; + if (licenseConfigBuilder_ != null) { + licenseConfigBuilder_.dispose(); + licenseConfigBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
            +     * Required. The
            +     * [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig] to
            +     * create.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.LicenseConfig license_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.discoveryengine.v1beta.LicenseConfig.Builder getLicenseConfigBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return internalGetLicenseConfigFieldBuilder().getBuilder(); + } + + /** + * + * + *
            +     * Required. The
            +     * [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig] to
            +     * create.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.LicenseConfig license_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.discoveryengine.v1beta.LicenseConfigOrBuilder + getLicenseConfigOrBuilder() { + if (licenseConfigBuilder_ != null) { + return licenseConfigBuilder_.getMessageOrBuilder(); + } else { + return licenseConfig_ == null + ? com.google.cloud.discoveryengine.v1beta.LicenseConfig.getDefaultInstance() + : licenseConfig_; + } + } + + /** + * + * + *
            +     * Required. The
            +     * [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig] to
            +     * create.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.LicenseConfig license_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.LicenseConfig, + com.google.cloud.discoveryengine.v1beta.LicenseConfig.Builder, + com.google.cloud.discoveryengine.v1beta.LicenseConfigOrBuilder> + internalGetLicenseConfigFieldBuilder() { + if (licenseConfigBuilder_ == null) { + licenseConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.LicenseConfig, + com.google.cloud.discoveryengine.v1beta.LicenseConfig.Builder, + com.google.cloud.discoveryengine.v1beta.LicenseConfigOrBuilder>( + getLicenseConfig(), getParentForChildren(), isClean()); + licenseConfig_ = null; + } + return licenseConfigBuilder_; + } + + private java.lang.Object licenseConfigId_ = ""; + + /** + * + * + *
            +     * Optional. The ID to use for the
            +     * [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig], which
            +     * will become the final component of the
            +     * [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig]'s
            +     * resource name. We are using the tier (product edition) name as the license
            +     * config id such as `search` or `search_and_assistant`.
            +     * 
            + * + * string license_config_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The licenseConfigId. + */ + public java.lang.String getLicenseConfigId() { + java.lang.Object ref = licenseConfigId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + licenseConfigId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
            +     * Optional. The ID to use for the
            +     * [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig], which
            +     * will become the final component of the
            +     * [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig]'s
            +     * resource name. We are using the tier (product edition) name as the license
            +     * config id such as `search` or `search_and_assistant`.
            +     * 
            + * + * string license_config_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for licenseConfigId. + */ + public com.google.protobuf.ByteString getLicenseConfigIdBytes() { + java.lang.Object ref = licenseConfigId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + licenseConfigId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
            +     * Optional. The ID to use for the
            +     * [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig], which
            +     * will become the final component of the
            +     * [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig]'s
            +     * resource name. We are using the tier (product edition) name as the license
            +     * config id such as `search` or `search_and_assistant`.
            +     * 
            + * + * string license_config_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The licenseConfigId to set. + * @return This builder for chaining. + */ + public Builder setLicenseConfigId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + licenseConfigId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Optional. The ID to use for the
            +     * [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig], which
            +     * will become the final component of the
            +     * [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig]'s
            +     * resource name. We are using the tier (product edition) name as the license
            +     * config id such as `search` or `search_and_assistant`.
            +     * 
            + * + * string license_config_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearLicenseConfigId() { + licenseConfigId_ = getDefaultInstance().getLicenseConfigId(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
            +     * Optional. The ID to use for the
            +     * [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig], which
            +     * will become the final component of the
            +     * [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig]'s
            +     * resource name. We are using the tier (product edition) name as the license
            +     * config id such as `search` or `search_and_assistant`.
            +     * 
            + * + * string license_config_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for licenseConfigId to set. + * @return This builder for chaining. + */ + public Builder setLicenseConfigIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + licenseConfigId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.CreateLicenseConfigRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.CreateLicenseConfigRequest) + private static final com.google.cloud.discoveryengine.v1beta.CreateLicenseConfigRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.discoveryengine.v1beta.CreateLicenseConfigRequest(); + } + + public static com.google.cloud.discoveryengine.v1beta.CreateLicenseConfigRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateLicenseConfigRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.CreateLicenseConfigRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/CreateLicenseConfigRequestOrBuilder.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/CreateLicenseConfigRequestOrBuilder.java new file mode 100644 index 000000000000..58cbf1b5595e --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/CreateLicenseConfigRequestOrBuilder.java @@ -0,0 +1,145 @@ +/* + * 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/cloud/discoveryengine/v1beta/license_config_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.discoveryengine.v1beta; + +@com.google.protobuf.Generated +public interface CreateLicenseConfigRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.CreateLicenseConfigRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
            +   * Required. The parent resource name, such as
            +   * `projects/{project}/locations/{location}`.
            +   * 
            + * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + + /** + * + * + *
            +   * Required. The parent resource name, such as
            +   * `projects/{project}/locations/{location}`.
            +   * 
            + * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
            +   * Required. The
            +   * [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig] to
            +   * create.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.LicenseConfig license_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the licenseConfig field is set. + */ + boolean hasLicenseConfig(); + + /** + * + * + *
            +   * Required. The
            +   * [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig] to
            +   * create.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.LicenseConfig license_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The licenseConfig. + */ + com.google.cloud.discoveryengine.v1beta.LicenseConfig getLicenseConfig(); + + /** + * + * + *
            +   * Required. The
            +   * [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig] to
            +   * create.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.LicenseConfig license_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.discoveryengine.v1beta.LicenseConfigOrBuilder getLicenseConfigOrBuilder(); + + /** + * + * + *
            +   * Optional. The ID to use for the
            +   * [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig], which
            +   * will become the final component of the
            +   * [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig]'s
            +   * resource name. We are using the tier (product edition) name as the license
            +   * config id such as `search` or `search_and_assistant`.
            +   * 
            + * + * string license_config_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The licenseConfigId. + */ + java.lang.String getLicenseConfigId(); + + /** + * + * + *
            +   * Optional. The ID to use for the
            +   * [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig], which
            +   * will become the final component of the
            +   * [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig]'s
            +   * resource name. We are using the tier (product edition) name as the license
            +   * config id such as `search` or `search_and_assistant`.
            +   * 
            + * + * string license_config_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for licenseConfigId. + */ + com.google.protobuf.ByteString getLicenseConfigIdBytes(); +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/CreateServingConfigRequest.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/CreateServingConfigRequest.java new file mode 100644 index 000000000000..a886223e99cd --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/CreateServingConfigRequest.java @@ -0,0 +1,1167 @@ +/* + * 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/cloud/discoveryengine/v1beta/serving_config_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.discoveryengine.v1beta; + +/** + * + * + *
            + * Request for CreateServingConfig method.
            + * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.CreateServingConfigRequest} + */ +@com.google.protobuf.Generated +public final class CreateServingConfigRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.CreateServingConfigRequest) + CreateServingConfigRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "CreateServingConfigRequest"); + } + + // Use CreateServingConfigRequest.newBuilder() to construct. + private CreateServingConfigRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private CreateServingConfigRequest() { + parent_ = ""; + servingConfigId_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.ServingConfigServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_CreateServingConfigRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.ServingConfigServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_CreateServingConfigRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.CreateServingConfigRequest.class, + com.google.cloud.discoveryengine.v1beta.CreateServingConfigRequest.Builder.class); + } + + private int bitField0_; + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + + /** + * + * + *
            +   * Required. Full resource name of parent. Format:
            +   * `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}`
            +   * 
            + * + * + * 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. Full resource name of parent. Format:
            +   * `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}`
            +   * 
            + * + * + * 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 SERVING_CONFIG_FIELD_NUMBER = 2; + private com.google.cloud.discoveryengine.v1beta.ServingConfig servingConfig_; + + /** + * + * + *
            +   * Required. The ServingConfig to create.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.ServingConfig serving_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the servingConfig field is set. + */ + @java.lang.Override + public boolean hasServingConfig() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
            +   * Required. The ServingConfig to create.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.ServingConfig serving_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The servingConfig. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.ServingConfig getServingConfig() { + return servingConfig_ == null + ? com.google.cloud.discoveryengine.v1beta.ServingConfig.getDefaultInstance() + : servingConfig_; + } + + /** + * + * + *
            +   * Required. The ServingConfig to create.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.ServingConfig serving_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.ServingConfigOrBuilder + getServingConfigOrBuilder() { + return servingConfig_ == null + ? com.google.cloud.discoveryengine.v1beta.ServingConfig.getDefaultInstance() + : servingConfig_; + } + + public static final int SERVING_CONFIG_ID_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object servingConfigId_ = ""; + + /** + * + * + *
            +   * Required. The ID to use for the ServingConfig, which will become the final
            +   * component of the ServingConfig's resource name.
            +   *
            +   * This value should be 4-63 characters, and valid characters
            +   * are /[a-zA-Z0-9][a-zA-Z0-9_-]+/.
            +   * 
            + * + * string serving_config_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The servingConfigId. + */ + @java.lang.Override + public java.lang.String getServingConfigId() { + java.lang.Object ref = servingConfigId_; + 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(); + servingConfigId_ = s; + return s; + } + } + + /** + * + * + *
            +   * Required. The ID to use for the ServingConfig, which will become the final
            +   * component of the ServingConfig's resource name.
            +   *
            +   * This value should be 4-63 characters, and valid characters
            +   * are /[a-zA-Z0-9][a-zA-Z0-9_-]+/.
            +   * 
            + * + * string serving_config_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for servingConfigId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getServingConfigIdBytes() { + java.lang.Object ref = servingConfigId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + servingConfigId_ = 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 { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, parent_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getServingConfig()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(servingConfigId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, servingConfigId_); + } + 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 (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getServingConfig()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(servingConfigId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, servingConfigId_); + } + 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.discoveryengine.v1beta.CreateServingConfigRequest)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1beta.CreateServingConfigRequest other = + (com.google.cloud.discoveryengine.v1beta.CreateServingConfigRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (hasServingConfig() != other.hasServingConfig()) return false; + if (hasServingConfig()) { + if (!getServingConfig().equals(other.getServingConfig())) return false; + } + if (!getServingConfigId().equals(other.getServingConfigId())) 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(); + if (hasServingConfig()) { + hash = (37 * hash) + SERVING_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getServingConfig().hashCode(); + } + hash = (37 * hash) + SERVING_CONFIG_ID_FIELD_NUMBER; + hash = (53 * hash) + getServingConfigId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1beta.CreateServingConfigRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.CreateServingConfigRequest 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.discoveryengine.v1beta.CreateServingConfigRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.CreateServingConfigRequest 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.discoveryengine.v1beta.CreateServingConfigRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.CreateServingConfigRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1beta.CreateServingConfigRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.CreateServingConfigRequest 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.discoveryengine.v1beta.CreateServingConfigRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.CreateServingConfigRequest + 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.discoveryengine.v1beta.CreateServingConfigRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.CreateServingConfigRequest 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.discoveryengine.v1beta.CreateServingConfigRequest 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 for CreateServingConfig method.
            +   * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.CreateServingConfigRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.CreateServingConfigRequest) + com.google.cloud.discoveryengine.v1beta.CreateServingConfigRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.ServingConfigServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_CreateServingConfigRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.ServingConfigServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_CreateServingConfigRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.CreateServingConfigRequest.class, + com.google.cloud.discoveryengine.v1beta.CreateServingConfigRequest.Builder.class); + } + + // Construct using + // com.google.cloud.discoveryengine.v1beta.CreateServingConfigRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetServingConfigFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + servingConfig_ = null; + if (servingConfigBuilder_ != null) { + servingConfigBuilder_.dispose(); + servingConfigBuilder_ = null; + } + servingConfigId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1beta.ServingConfigServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_CreateServingConfigRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.CreateServingConfigRequest + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1beta.CreateServingConfigRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.CreateServingConfigRequest build() { + com.google.cloud.discoveryengine.v1beta.CreateServingConfigRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.CreateServingConfigRequest buildPartial() { + com.google.cloud.discoveryengine.v1beta.CreateServingConfigRequest result = + new com.google.cloud.discoveryengine.v1beta.CreateServingConfigRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.discoveryengine.v1beta.CreateServingConfigRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.servingConfig_ = + servingConfigBuilder_ == null ? servingConfig_ : servingConfigBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.servingConfigId_ = servingConfigId_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.discoveryengine.v1beta.CreateServingConfigRequest) { + return mergeFrom( + (com.google.cloud.discoveryengine.v1beta.CreateServingConfigRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1beta.CreateServingConfigRequest other) { + if (other + == com.google.cloud.discoveryengine.v1beta.CreateServingConfigRequest + .getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasServingConfig()) { + mergeServingConfig(other.getServingConfig()); + } + if (!other.getServingConfigId().isEmpty()) { + servingConfigId_ = other.servingConfigId_; + bitField0_ |= 0x00000004; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage( + internalGetServingConfigFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + servingConfigId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + + /** + * + * + *
            +     * Required. Full resource name of parent. Format:
            +     * `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}`
            +     * 
            + * + * + * 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. Full resource name of parent. Format:
            +     * `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}`
            +     * 
            + * + * + * 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. Full resource name of parent. Format:
            +     * `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}`
            +     * 
            + * + * + * 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. Full resource name of parent. Format:
            +     * `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}`
            +     * 
            + * + * + * 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. Full resource name of parent. Format:
            +     * `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}`
            +     * 
            + * + * + * 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 com.google.cloud.discoveryengine.v1beta.ServingConfig servingConfig_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.ServingConfig, + com.google.cloud.discoveryengine.v1beta.ServingConfig.Builder, + com.google.cloud.discoveryengine.v1beta.ServingConfigOrBuilder> + servingConfigBuilder_; + + /** + * + * + *
            +     * Required. The ServingConfig to create.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.ServingConfig serving_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the servingConfig field is set. + */ + public boolean hasServingConfig() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
            +     * Required. The ServingConfig to create.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.ServingConfig serving_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The servingConfig. + */ + public com.google.cloud.discoveryengine.v1beta.ServingConfig getServingConfig() { + if (servingConfigBuilder_ == null) { + return servingConfig_ == null + ? com.google.cloud.discoveryengine.v1beta.ServingConfig.getDefaultInstance() + : servingConfig_; + } else { + return servingConfigBuilder_.getMessage(); + } + } + + /** + * + * + *
            +     * Required. The ServingConfig to create.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.ServingConfig serving_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setServingConfig(com.google.cloud.discoveryengine.v1beta.ServingConfig value) { + if (servingConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + servingConfig_ = value; + } else { + servingConfigBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Required. The ServingConfig to create.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.ServingConfig serving_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setServingConfig( + com.google.cloud.discoveryengine.v1beta.ServingConfig.Builder builderForValue) { + if (servingConfigBuilder_ == null) { + servingConfig_ = builderForValue.build(); + } else { + servingConfigBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Required. The ServingConfig to create.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.ServingConfig serving_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeServingConfig(com.google.cloud.discoveryengine.v1beta.ServingConfig value) { + if (servingConfigBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && servingConfig_ != null + && servingConfig_ + != com.google.cloud.discoveryengine.v1beta.ServingConfig.getDefaultInstance()) { + getServingConfigBuilder().mergeFrom(value); + } else { + servingConfig_ = value; + } + } else { + servingConfigBuilder_.mergeFrom(value); + } + if (servingConfig_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** + * + * + *
            +     * Required. The ServingConfig to create.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.ServingConfig serving_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearServingConfig() { + bitField0_ = (bitField0_ & ~0x00000002); + servingConfig_ = null; + if (servingConfigBuilder_ != null) { + servingConfigBuilder_.dispose(); + servingConfigBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
            +     * Required. The ServingConfig to create.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.ServingConfig serving_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.discoveryengine.v1beta.ServingConfig.Builder getServingConfigBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return internalGetServingConfigFieldBuilder().getBuilder(); + } + + /** + * + * + *
            +     * Required. The ServingConfig to create.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.ServingConfig serving_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.discoveryengine.v1beta.ServingConfigOrBuilder + getServingConfigOrBuilder() { + if (servingConfigBuilder_ != null) { + return servingConfigBuilder_.getMessageOrBuilder(); + } else { + return servingConfig_ == null + ? com.google.cloud.discoveryengine.v1beta.ServingConfig.getDefaultInstance() + : servingConfig_; + } + } + + /** + * + * + *
            +     * Required. The ServingConfig to create.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.ServingConfig serving_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.ServingConfig, + com.google.cloud.discoveryengine.v1beta.ServingConfig.Builder, + com.google.cloud.discoveryengine.v1beta.ServingConfigOrBuilder> + internalGetServingConfigFieldBuilder() { + if (servingConfigBuilder_ == null) { + servingConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.ServingConfig, + com.google.cloud.discoveryengine.v1beta.ServingConfig.Builder, + com.google.cloud.discoveryengine.v1beta.ServingConfigOrBuilder>( + getServingConfig(), getParentForChildren(), isClean()); + servingConfig_ = null; + } + return servingConfigBuilder_; + } + + private java.lang.Object servingConfigId_ = ""; + + /** + * + * + *
            +     * Required. The ID to use for the ServingConfig, which will become the final
            +     * component of the ServingConfig's resource name.
            +     *
            +     * This value should be 4-63 characters, and valid characters
            +     * are /[a-zA-Z0-9][a-zA-Z0-9_-]+/.
            +     * 
            + * + * string serving_config_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The servingConfigId. + */ + public java.lang.String getServingConfigId() { + java.lang.Object ref = servingConfigId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + servingConfigId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
            +     * Required. The ID to use for the ServingConfig, which will become the final
            +     * component of the ServingConfig's resource name.
            +     *
            +     * This value should be 4-63 characters, and valid characters
            +     * are /[a-zA-Z0-9][a-zA-Z0-9_-]+/.
            +     * 
            + * + * string serving_config_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for servingConfigId. + */ + public com.google.protobuf.ByteString getServingConfigIdBytes() { + java.lang.Object ref = servingConfigId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + servingConfigId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
            +     * Required. The ID to use for the ServingConfig, which will become the final
            +     * component of the ServingConfig's resource name.
            +     *
            +     * This value should be 4-63 characters, and valid characters
            +     * are /[a-zA-Z0-9][a-zA-Z0-9_-]+/.
            +     * 
            + * + * string serving_config_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The servingConfigId to set. + * @return This builder for chaining. + */ + public Builder setServingConfigId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + servingConfigId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Required. The ID to use for the ServingConfig, which will become the final
            +     * component of the ServingConfig's resource name.
            +     *
            +     * This value should be 4-63 characters, and valid characters
            +     * are /[a-zA-Z0-9][a-zA-Z0-9_-]+/.
            +     * 
            + * + * string serving_config_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearServingConfigId() { + servingConfigId_ = getDefaultInstance().getServingConfigId(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
            +     * Required. The ID to use for the ServingConfig, which will become the final
            +     * component of the ServingConfig's resource name.
            +     *
            +     * This value should be 4-63 characters, and valid characters
            +     * are /[a-zA-Z0-9][a-zA-Z0-9_-]+/.
            +     * 
            + * + * string serving_config_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for servingConfigId to set. + * @return This builder for chaining. + */ + public Builder setServingConfigIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + servingConfigId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.CreateServingConfigRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.CreateServingConfigRequest) + private static final com.google.cloud.discoveryengine.v1beta.CreateServingConfigRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.discoveryengine.v1beta.CreateServingConfigRequest(); + } + + public static com.google.cloud.discoveryengine.v1beta.CreateServingConfigRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateServingConfigRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.CreateServingConfigRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/CreateServingConfigRequestOrBuilder.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/CreateServingConfigRequestOrBuilder.java new file mode 100644 index 000000000000..743b200485fd --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/CreateServingConfigRequestOrBuilder.java @@ -0,0 +1,137 @@ +/* + * 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/cloud/discoveryengine/v1beta/serving_config_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.discoveryengine.v1beta; + +@com.google.protobuf.Generated +public interface CreateServingConfigRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.CreateServingConfigRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
            +   * Required. Full resource name of parent. Format:
            +   * `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}`
            +   * 
            + * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + + /** + * + * + *
            +   * Required. Full resource name of parent. Format:
            +   * `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}`
            +   * 
            + * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
            +   * Required. The ServingConfig to create.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.ServingConfig serving_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the servingConfig field is set. + */ + boolean hasServingConfig(); + + /** + * + * + *
            +   * Required. The ServingConfig to create.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.ServingConfig serving_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The servingConfig. + */ + com.google.cloud.discoveryengine.v1beta.ServingConfig getServingConfig(); + + /** + * + * + *
            +   * Required. The ServingConfig to create.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.ServingConfig serving_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.discoveryengine.v1beta.ServingConfigOrBuilder getServingConfigOrBuilder(); + + /** + * + * + *
            +   * Required. The ID to use for the ServingConfig, which will become the final
            +   * component of the ServingConfig's resource name.
            +   *
            +   * This value should be 4-63 characters, and valid characters
            +   * are /[a-zA-Z0-9][a-zA-Z0-9_-]+/.
            +   * 
            + * + * string serving_config_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The servingConfigId. + */ + java.lang.String getServingConfigId(); + + /** + * + * + *
            +   * Required. The ID to use for the ServingConfig, which will become the final
            +   * component of the ServingConfig's resource name.
            +   *
            +   * This value should be 4-63 characters, and valid characters
            +   * are /[a-zA-Z0-9][a-zA-Z0-9_-]+/.
            +   * 
            + * + * string serving_config_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for servingConfigId. + */ + com.google.protobuf.ByteString getServingConfigIdBytes(); +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/CreateSessionRequest.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/CreateSessionRequest.java index 3b84d95c3598..d52e211f39e6 100644 --- a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/CreateSessionRequest.java +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/CreateSessionRequest.java @@ -53,6 +53,7 @@ private CreateSessionRequest(com.google.protobuf.GeneratedMessage.Builder bui private CreateSessionRequest() { parent_ = ""; + sessionId_ = ""; } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @@ -189,6 +190,69 @@ public com.google.cloud.discoveryengine.v1beta.SessionOrBuilder getSessionOrBuil : session_; } + public static final int SESSION_ID_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object sessionId_ = ""; + + /** + * + * + *
            +   * Optional. The ID to use for the session, which will become the final
            +   * component of the session's resource name.
            +   *
            +   * This value should be 1-63 characters, and valid characters
            +   * are /[a-z0-9][a-z0-9-]{0,61}[a-z0-9]/. If not specified, a unique ID will
            +   * be generated.
            +   * 
            + * + * string session_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The sessionId. + */ + @java.lang.Override + public java.lang.String getSessionId() { + java.lang.Object ref = sessionId_; + 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(); + sessionId_ = s; + return s; + } + } + + /** + * + * + *
            +   * Optional. The ID to use for the session, which will become the final
            +   * component of the session's resource name.
            +   *
            +   * This value should be 1-63 characters, and valid characters
            +   * are /[a-z0-9][a-z0-9-]{0,61}[a-z0-9]/. If not specified, a unique ID will
            +   * be generated.
            +   * 
            + * + * string session_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for sessionId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSessionIdBytes() { + java.lang.Object ref = sessionId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + sessionId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -209,6 +273,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(2, getSession()); } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(sessionId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, sessionId_); + } getUnknownFields().writeTo(output); } @@ -224,6 +291,9 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getSession()); } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(sessionId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, sessionId_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -245,6 +315,7 @@ public boolean equals(final java.lang.Object obj) { if (hasSession()) { if (!getSession().equals(other.getSession())) return false; } + if (!getSessionId().equals(other.getSessionId())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -262,6 +333,8 @@ public int hashCode() { hash = (37 * hash) + SESSION_FIELD_NUMBER; hash = (53 * hash) + getSession().hashCode(); } + hash = (37 * hash) + SESSION_ID_FIELD_NUMBER; + hash = (53 * hash) + getSessionId().hashCode(); hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -418,6 +491,7 @@ public Builder clear() { sessionBuilder_.dispose(); sessionBuilder_ = null; } + sessionId_ = ""; return this; } @@ -464,6 +538,9 @@ private void buildPartial0( result.session_ = sessionBuilder_ == null ? session_ : sessionBuilder_.build(); to_bitField0_ |= 0x00000001; } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.sessionId_ = sessionId_; + } result.bitField0_ |= to_bitField0_; } @@ -489,6 +566,11 @@ public Builder mergeFrom(com.google.cloud.discoveryengine.v1beta.CreateSessionRe if (other.hasSession()) { mergeSession(other.getSession()); } + if (!other.getSessionId().isEmpty()) { + sessionId_ = other.sessionId_; + bitField0_ |= 0x00000004; + onChanged(); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -527,6 +609,12 @@ public Builder mergeFrom( bitField0_ |= 0x00000002; break; } // case 18 + case 26: + { + sessionId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -885,6 +973,142 @@ public com.google.cloud.discoveryengine.v1beta.SessionOrBuilder getSessionOrBuil return sessionBuilder_; } + private java.lang.Object sessionId_ = ""; + + /** + * + * + *
            +     * Optional. The ID to use for the session, which will become the final
            +     * component of the session's resource name.
            +     *
            +     * This value should be 1-63 characters, and valid characters
            +     * are /[a-z0-9][a-z0-9-]{0,61}[a-z0-9]/. If not specified, a unique ID will
            +     * be generated.
            +     * 
            + * + * string session_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The sessionId. + */ + public java.lang.String getSessionId() { + java.lang.Object ref = sessionId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + sessionId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
            +     * Optional. The ID to use for the session, which will become the final
            +     * component of the session's resource name.
            +     *
            +     * This value should be 1-63 characters, and valid characters
            +     * are /[a-z0-9][a-z0-9-]{0,61}[a-z0-9]/. If not specified, a unique ID will
            +     * be generated.
            +     * 
            + * + * string session_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for sessionId. + */ + public com.google.protobuf.ByteString getSessionIdBytes() { + java.lang.Object ref = sessionId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + sessionId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
            +     * Optional. The ID to use for the session, which will become the final
            +     * component of the session's resource name.
            +     *
            +     * This value should be 1-63 characters, and valid characters
            +     * are /[a-z0-9][a-z0-9-]{0,61}[a-z0-9]/. If not specified, a unique ID will
            +     * be generated.
            +     * 
            + * + * string session_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The sessionId to set. + * @return This builder for chaining. + */ + public Builder setSessionId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + sessionId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Optional. The ID to use for the session, which will become the final
            +     * component of the session's resource name.
            +     *
            +     * This value should be 1-63 characters, and valid characters
            +     * are /[a-z0-9][a-z0-9-]{0,61}[a-z0-9]/. If not specified, a unique ID will
            +     * be generated.
            +     * 
            + * + * string session_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearSessionId() { + sessionId_ = getDefaultInstance().getSessionId(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
            +     * Optional. The ID to use for the session, which will become the final
            +     * component of the session's resource name.
            +     *
            +     * This value should be 1-63 characters, and valid characters
            +     * are /[a-z0-9][a-z0-9-]{0,61}[a-z0-9]/. If not specified, a unique ID will
            +     * be generated.
            +     * 
            + * + * string session_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for sessionId to set. + * @return This builder for chaining. + */ + public Builder setSessionIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + sessionId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.CreateSessionRequest) } diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/CreateSessionRequestOrBuilder.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/CreateSessionRequestOrBuilder.java index 1377ad9d00a3..33dd71033231 100644 --- a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/CreateSessionRequestOrBuilder.java +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/CreateSessionRequestOrBuilder.java @@ -100,4 +100,40 @@ public interface CreateSessionRequestOrBuilder * */ com.google.cloud.discoveryengine.v1beta.SessionOrBuilder getSessionOrBuilder(); + + /** + * + * + *
            +   * Optional. The ID to use for the session, which will become the final
            +   * component of the session's resource name.
            +   *
            +   * This value should be 1-63 characters, and valid characters
            +   * are /[a-z0-9][a-z0-9-]{0,61}[a-z0-9]/. If not specified, a unique ID will
            +   * be generated.
            +   * 
            + * + * string session_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The sessionId. + */ + java.lang.String getSessionId(); + + /** + * + * + *
            +   * Optional. The ID to use for the session, which will become the final
            +   * component of the session's resource name.
            +   *
            +   * This value should be 1-63 characters, and valid characters
            +   * are /[a-z0-9][a-z0-9-]{0,61}[a-z0-9]/. If not specified, a unique ID will
            +   * be generated.
            +   * 
            + * + * string session_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for sessionId. + */ + com.google.protobuf.ByteString getSessionIdBytes(); } diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/DataStore.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/DataStore.java index 0c0e9f51bf82..9057d7c88ec0 100644 --- a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/DataStore.java +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/DataStore.java @@ -58,6 +58,9 @@ private DataStore() { solutionTypes_ = emptyIntList(); defaultSchemaId_ = ""; contentConfig_ = 0; + kmsKeyName_ = ""; + identityMappingStore_ = ""; + configurableBillingApproach_ = 0; } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @@ -300,6 +303,182 @@ private ContentConfig(int value) { // @@protoc_insertion_point(enum_scope:google.cloud.discoveryengine.v1beta.DataStore.ContentConfig) } + /** + * + * + *
            +   * Configuration for configurable billing approach.
            +   * 
            + * + * Protobuf enum {@code google.cloud.discoveryengine.v1beta.DataStore.ConfigurableBillingApproach} + */ + public enum ConfigurableBillingApproach implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
            +     * Default value. For Spark and non-Spark non-configurable billing approach.
            +     * 
            + * + * CONFIGURABLE_BILLING_APPROACH_UNSPECIFIED = 0; + */ + CONFIGURABLE_BILLING_APPROACH_UNSPECIFIED(0), + /** + * + * + *
            +     * Use the subscription base + overage billing for indexing core for non
            +     * embedding storage.
            +     * 
            + * + * CONFIGURABLE_SUBSCRIPTION_INDEXING_CORE = 1; + */ + CONFIGURABLE_SUBSCRIPTION_INDEXING_CORE(1), + /** + * + * + *
            +     * Use the consumption pay-as-you-go billing for embedding storage add-on.
            +     * 
            + * + * CONFIGURABLE_CONSUMPTION_EMBEDDING = 2; + */ + CONFIGURABLE_CONSUMPTION_EMBEDDING(2), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ConfigurableBillingApproach"); + } + + /** + * + * + *
            +     * Default value. For Spark and non-Spark non-configurable billing approach.
            +     * 
            + * + * CONFIGURABLE_BILLING_APPROACH_UNSPECIFIED = 0; + */ + public static final int CONFIGURABLE_BILLING_APPROACH_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
            +     * Use the subscription base + overage billing for indexing core for non
            +     * embedding storage.
            +     * 
            + * + * CONFIGURABLE_SUBSCRIPTION_INDEXING_CORE = 1; + */ + public static final int CONFIGURABLE_SUBSCRIPTION_INDEXING_CORE_VALUE = 1; + + /** + * + * + *
            +     * Use the consumption pay-as-you-go billing for embedding storage add-on.
            +     * 
            + * + * CONFIGURABLE_CONSUMPTION_EMBEDDING = 2; + */ + public static final int CONFIGURABLE_CONSUMPTION_EMBEDDING_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 ConfigurableBillingApproach 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 ConfigurableBillingApproach forNumber(int value) { + switch (value) { + case 0: + return CONFIGURABLE_BILLING_APPROACH_UNSPECIFIED; + case 1: + return CONFIGURABLE_SUBSCRIPTION_INDEXING_CORE; + case 2: + return CONFIGURABLE_CONSUMPTION_EMBEDDING; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap + internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public ConfigurableBillingApproach findValueByNumber(int number) { + return ConfigurableBillingApproach.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.DataStore.getDescriptor() + .getEnumTypes() + .get(1); + } + + private static final ConfigurableBillingApproach[] VALUES = values(); + + public static ConfigurableBillingApproach valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private ConfigurableBillingApproach(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.discoveryengine.v1beta.DataStore.ConfigurableBillingApproach) + } + public interface BillingEstimationOrBuilder extends // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.DataStore.BillingEstimation) @@ -2030,11 +2209,11 @@ public interface ServingConfigDataStoreOrBuilder * * *
            -     * If set true, the DataStore will not be available for serving search
            -     * requests.
            +     * Optional. If set true, the DataStore will not be available for serving
            +     * search requests.
                  * 
            * - * bool disabled_for_serving = 1; + * bool disabled_for_serving = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @return The disabledForServing. */ @@ -2096,11 +2275,11 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * *
            -     * If set true, the DataStore will not be available for serving search
            -     * requests.
            +     * Optional. If set true, the DataStore will not be available for serving
            +     * search requests.
                  * 
            * - * bool disabled_for_serving = 1; + * bool disabled_for_serving = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @return The disabledForServing. */ @@ -2442,11 +2621,11 @@ public Builder mergeFrom( * * *
            -       * If set true, the DataStore will not be available for serving search
            -       * requests.
            +       * Optional. If set true, the DataStore will not be available for serving
            +       * search requests.
                    * 
            * - * bool disabled_for_serving = 1; + * bool disabled_for_serving = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @return The disabledForServing. */ @@ -2459,11 +2638,11 @@ public boolean getDisabledForServing() { * * *
            -       * If set true, the DataStore will not be available for serving search
            -       * requests.
            +       * Optional. If set true, the DataStore will not be available for serving
            +       * search requests.
                    * 
            * - * bool disabled_for_serving = 1; + * bool disabled_for_serving = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The disabledForServing to set. * @return This builder for chaining. @@ -2480,11 +2659,11 @@ public Builder setDisabledForServing(boolean value) { * * *
            -       * If set true, the DataStore will not be available for serving search
            -       * requests.
            +       * Optional. If set true, the DataStore will not be available for serving
            +       * search requests.
                    * 
            * - * bool disabled_for_serving = 1; + * bool disabled_for_serving = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @return This builder for chaining. */ @@ -2551,1734 +2730,11543 @@ public com.google.protobuf.Parser getParserForType() { } } - private int bitField0_; - public static final int NAME_FIELD_NUMBER = 1; + public interface FederatedSearchConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig) + com.google.protobuf.MessageOrBuilder { - @SuppressWarnings("serial") - private volatile java.lang.Object name_ = ""; + /** + * + * + *
            +     * AlloyDB config. If set, this DataStore is connected to AlloyDB.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig.AlloyDbConfig alloy_db_config = 1; + * + * + * @return Whether the alloyDbConfig field is set. + */ + boolean hasAlloyDbConfig(); + + /** + * + * + *
            +     * AlloyDB config. If set, this DataStore is connected to AlloyDB.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig.AlloyDbConfig alloy_db_config = 1; + * + * + * @return The alloyDbConfig. + */ + com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig.AlloyDbConfig + getAlloyDbConfig(); + + /** + * + * + *
            +     * AlloyDB config. If set, this DataStore is connected to AlloyDB.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig.AlloyDbConfig alloy_db_config = 1; + * + */ + com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig.AlloyDbConfigOrBuilder + getAlloyDbConfigOrBuilder(); + + /** + * + * + *
            +     * Third Party OAuth config. If set, this DataStore is connected to a
            +     * third party application.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig.ThirdPartyOauthConfig third_party_oauth_config = 2; + * + * + * @return Whether the thirdPartyOauthConfig field is set. + */ + boolean hasThirdPartyOauthConfig(); + + /** + * + * + *
            +     * Third Party OAuth config. If set, this DataStore is connected to a
            +     * third party application.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig.ThirdPartyOauthConfig third_party_oauth_config = 2; + * + * + * @return The thirdPartyOauthConfig. + */ + com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig.ThirdPartyOauthConfig + getThirdPartyOauthConfig(); + + /** + * + * + *
            +     * Third Party OAuth config. If set, this DataStore is connected to a
            +     * third party application.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig.ThirdPartyOauthConfig third_party_oauth_config = 2; + * + */ + com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .ThirdPartyOauthConfigOrBuilder + getThirdPartyOauthConfigOrBuilder(); + + /** + * + * + *
            +     * NotebookLM config. If set, this DataStore is connected to
            +     * NotebookLM Enterprise.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig.NotebooklmConfig notebooklm_config = 3; + * + * + * @return Whether the notebooklmConfig field is set. + */ + boolean hasNotebooklmConfig(); + + /** + * + * + *
            +     * NotebookLM config. If set, this DataStore is connected to
            +     * NotebookLM Enterprise.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig.NotebooklmConfig notebooklm_config = 3; + * + * + * @return The notebooklmConfig. + */ + com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig.NotebooklmConfig + getNotebooklmConfig(); + + /** + * + * + *
            +     * NotebookLM config. If set, this DataStore is connected to
            +     * NotebookLM Enterprise.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig.NotebooklmConfig notebooklm_config = 3; + * + */ + com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .NotebooklmConfigOrBuilder + getNotebooklmConfigOrBuilder(); + + com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig.DataSourceConfigCase + getDataSourceConfigCase(); + } /** * * *
            -   * Immutable. The full resource name of the data store.
            -   * Format:
            -   * `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`.
            -   *
            -   * This field must be a UTF-8 encoded string with a length limit of 1024
            -   * characters.
            +   * Stores information for federated search.
                * 
            * - * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The name. + * Protobuf type {@code google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig} */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - 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(); - name_ = s; - return s; - } - } + public static final class FederatedSearchConfig extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig) + FederatedSearchConfigOrBuilder { + private static final long serialVersionUID = 0L; - /** - * - * - *
            -   * Immutable. The full resource name of the data store.
            -   * Format:
            -   * `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`.
            -   *
            -   * This field must be a UTF-8 encoded string with a length limit of 1024
            -   * characters.
            -   * 
            - * - * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "FederatedSearchConfig"); } - } - public static final int DISPLAY_NAME_FIELD_NUMBER = 2; + // Use FederatedSearchConfig.newBuilder() to construct. + private FederatedSearchConfig(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } - @SuppressWarnings("serial") - private volatile java.lang.Object displayName_ = ""; + private FederatedSearchConfig() {} - /** - * - * - *
            -   * Required. The data store display name.
            -   *
            -   * This field must be a UTF-8 encoded string with a length limit of 128
            -   * characters. Otherwise, an INVALID_ARGUMENT error is returned.
            -   * 
            - * - * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The displayName. - */ - @java.lang.Override - public java.lang.String getDisplayName() { - java.lang.Object ref = displayName_; - 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(); - displayName_ = s; - return s; + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.DataStoreProto + .internal_static_google_cloud_discoveryengine_v1beta_DataStore_FederatedSearchConfig_descriptor; } - } - /** - * - * - *
            -   * Required. The data store display name.
            -   *
            -   * This field must be a UTF-8 encoded string with a length limit of 128
            -   * characters. Otherwise, an INVALID_ARGUMENT error is returned.
            -   * 
            - * - * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for displayName. - */ - @java.lang.Override - public com.google.protobuf.ByteString getDisplayNameBytes() { - java.lang.Object ref = displayName_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - displayName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.DataStoreProto + .internal_static_google_cloud_discoveryengine_v1beta_DataStore_FederatedSearchConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig.class, + com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig.Builder + .class); } - } - public static final int INDUSTRY_VERTICAL_FIELD_NUMBER = 3; - private int industryVertical_ = 0; + public interface AlloyDbConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig.AlloyDbConfig) + com.google.protobuf.MessageOrBuilder { - /** - * - * - *
            -   * Immutable. The industry vertical that the data store registers.
            -   * 
            - * - * - * .google.cloud.discoveryengine.v1beta.IndustryVertical industry_vertical = 3 [(.google.api.field_behavior) = IMMUTABLE]; - * - * - * @return The enum numeric value on the wire for industryVertical. - */ - @java.lang.Override - public int getIndustryVerticalValue() { - return industryVertical_; - } + /** + * + * + *
            +       * Required. Configuration for connecting to AlloyDB.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig.AlloyDbConfig.AlloyDbConnectionConfig alloydb_connection_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the alloydbConnectionConfig field is set. + */ + boolean hasAlloydbConnectionConfig(); - /** - * - * - *
            -   * Immutable. The industry vertical that the data store registers.
            -   * 
            - * - * - * .google.cloud.discoveryengine.v1beta.IndustryVertical industry_vertical = 3 [(.google.api.field_behavior) = IMMUTABLE]; - * - * - * @return The industryVertical. - */ - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.IndustryVertical getIndustryVertical() { - com.google.cloud.discoveryengine.v1beta.IndustryVertical result = - com.google.cloud.discoveryengine.v1beta.IndustryVertical.forNumber(industryVertical_); - return result == null - ? com.google.cloud.discoveryengine.v1beta.IndustryVertical.UNRECOGNIZED - : result; - } + /** + * + * + *
            +       * Required. Configuration for connecting to AlloyDB.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig.AlloyDbConfig.AlloyDbConnectionConfig alloydb_connection_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The alloydbConnectionConfig. + */ + com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig.AlloyDbConfig + .AlloyDbConnectionConfig + getAlloydbConnectionConfig(); - public static final int SOLUTION_TYPES_FIELD_NUMBER = 5; + /** + * + * + *
            +       * Required. Configuration for connecting to AlloyDB.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig.AlloyDbConfig.AlloyDbConnectionConfig alloydb_connection_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig.AlloyDbConfig + .AlloyDbConnectionConfigOrBuilder + getAlloydbConnectionConfigOrBuilder(); - @SuppressWarnings("serial") - private com.google.protobuf.Internal.IntList solutionTypes_ = emptyIntList(); + /** + * + * + *
            +       * Optional. Configuration for Magic.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig.AlloyDbConfig.AlloyDbAiNaturalLanguageConfig alloydb_ai_nl_config = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the alloydbAiNlConfig field is set. + */ + boolean hasAlloydbAiNlConfig(); - private static final com.google.protobuf.Internal.IntListAdapter.IntConverter< - com.google.cloud.discoveryengine.v1beta.SolutionType> - solutionTypes_converter_ = - new com.google.protobuf.Internal.IntListAdapter.IntConverter< - com.google.cloud.discoveryengine.v1beta.SolutionType>() { - public com.google.cloud.discoveryengine.v1beta.SolutionType convert(int from) { - com.google.cloud.discoveryengine.v1beta.SolutionType result = - com.google.cloud.discoveryengine.v1beta.SolutionType.forNumber(from); - return result == null - ? com.google.cloud.discoveryengine.v1beta.SolutionType.UNRECOGNIZED - : result; - } - }; + /** + * + * + *
            +       * Optional. Configuration for Magic.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig.AlloyDbConfig.AlloyDbAiNaturalLanguageConfig alloydb_ai_nl_config = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The alloydbAiNlConfig. + */ + com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig.AlloyDbConfig + .AlloyDbAiNaturalLanguageConfig + getAlloydbAiNlConfig(); - /** - * - * - *
            -   * The solutions that the data store enrolls. Available solutions for each
            -   * [industry_vertical][google.cloud.discoveryengine.v1beta.DataStore.industry_vertical]:
            -   *
            -   * * `MEDIA`: `SOLUTION_TYPE_RECOMMENDATION` and `SOLUTION_TYPE_SEARCH`.
            -   * * `SITE_SEARCH`: `SOLUTION_TYPE_SEARCH` is automatically enrolled. Other
            -   * solutions cannot be enrolled.
            -   * 
            - * - * repeated .google.cloud.discoveryengine.v1beta.SolutionType solution_types = 5; - * - * @return A list containing the solutionTypes. - */ - @java.lang.Override - public java.util.List - getSolutionTypesList() { - return new com.google.protobuf.Internal.IntListAdapter< - com.google.cloud.discoveryengine.v1beta.SolutionType>( - solutionTypes_, solutionTypes_converter_); - } + /** + * + * + *
            +       * Optional. Configuration for Magic.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig.AlloyDbConfig.AlloyDbAiNaturalLanguageConfig alloydb_ai_nl_config = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig.AlloyDbConfig + .AlloyDbAiNaturalLanguageConfigOrBuilder + getAlloydbAiNlConfigOrBuilder(); - /** - * - * - *
            -   * The solutions that the data store enrolls. Available solutions for each
            -   * [industry_vertical][google.cloud.discoveryengine.v1beta.DataStore.industry_vertical]:
            -   *
            -   * * `MEDIA`: `SOLUTION_TYPE_RECOMMENDATION` and `SOLUTION_TYPE_SEARCH`.
            -   * * `SITE_SEARCH`: `SOLUTION_TYPE_SEARCH` is automatically enrolled. Other
            -   * solutions cannot be enrolled.
            -   * 
            - * - * repeated .google.cloud.discoveryengine.v1beta.SolutionType solution_types = 5; - * - * @return The count of solutionTypes. - */ - @java.lang.Override - public int getSolutionTypesCount() { - return solutionTypes_.size(); - } + /** + * + * + *
            +       * Optional. Fields to be returned in the search results. If empty, all
            +       * fields will be returned.
            +       * 
            + * + * repeated string returned_fields = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the returnedFields. + */ + java.util.List getReturnedFieldsList(); - /** - * - * - *
            -   * The solutions that the data store enrolls. Available solutions for each
            -   * [industry_vertical][google.cloud.discoveryengine.v1beta.DataStore.industry_vertical]:
            -   *
            -   * * `MEDIA`: `SOLUTION_TYPE_RECOMMENDATION` and `SOLUTION_TYPE_SEARCH`.
            -   * * `SITE_SEARCH`: `SOLUTION_TYPE_SEARCH` is automatically enrolled. Other
            -   * solutions cannot be enrolled.
            -   * 
            - * - * repeated .google.cloud.discoveryengine.v1beta.SolutionType solution_types = 5; - * - * @param index The index of the element to return. - * @return The solutionTypes at the given index. - */ - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.SolutionType getSolutionTypes(int index) { - return solutionTypes_converter_.convert(solutionTypes_.getInt(index)); - } + /** + * + * + *
            +       * Optional. Fields to be returned in the search results. If empty, all
            +       * fields will be returned.
            +       * 
            + * + * repeated string returned_fields = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of returnedFields. + */ + int getReturnedFieldsCount(); - /** - * - * - *
            -   * The solutions that the data store enrolls. Available solutions for each
            -   * [industry_vertical][google.cloud.discoveryengine.v1beta.DataStore.industry_vertical]:
            -   *
            -   * * `MEDIA`: `SOLUTION_TYPE_RECOMMENDATION` and `SOLUTION_TYPE_SEARCH`.
            -   * * `SITE_SEARCH`: `SOLUTION_TYPE_SEARCH` is automatically enrolled. Other
            -   * solutions cannot be enrolled.
            -   * 
            - * - * repeated .google.cloud.discoveryengine.v1beta.SolutionType solution_types = 5; - * - * @return A list containing the enum numeric values on the wire for solutionTypes. - */ - @java.lang.Override - public java.util.List getSolutionTypesValueList() { - return solutionTypes_; - } + /** + * + * + *
            +       * Optional. Fields to be returned in the search results. If empty, all
            +       * fields will be returned.
            +       * 
            + * + * repeated string returned_fields = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The returnedFields at the given index. + */ + java.lang.String getReturnedFields(int index); - /** - * - * - *
            -   * The solutions that the data store enrolls. Available solutions for each
            -   * [industry_vertical][google.cloud.discoveryengine.v1beta.DataStore.industry_vertical]:
            -   *
            -   * * `MEDIA`: `SOLUTION_TYPE_RECOMMENDATION` and `SOLUTION_TYPE_SEARCH`.
            -   * * `SITE_SEARCH`: `SOLUTION_TYPE_SEARCH` is automatically enrolled. Other
            -   * solutions cannot be enrolled.
            -   * 
            - * - * repeated .google.cloud.discoveryengine.v1beta.SolutionType solution_types = 5; - * - * @param index The index of the value to return. - * @return The enum numeric value on the wire of solutionTypes at the given index. - */ - @java.lang.Override - public int getSolutionTypesValue(int index) { - return solutionTypes_.getInt(index); - } + /** + * + * + *
            +       * Optional. Fields to be returned in the search results. If empty, all
            +       * fields will be returned.
            +       * 
            + * + * repeated string returned_fields = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the returnedFields at the given index. + */ + com.google.protobuf.ByteString getReturnedFieldsBytes(int index); + } - private int solutionTypesMemoizedSerializedSize; + /** + * + * + *
            +     * Stores information for connecting to AlloyDB.
            +     * 
            + * + * Protobuf type {@code + * google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig.AlloyDbConfig} + */ + public static final class AlloyDbConfig extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig.AlloyDbConfig) + AlloyDbConfigOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "AlloyDbConfig"); + } - public static final int DEFAULT_SCHEMA_ID_FIELD_NUMBER = 7; + // Use AlloyDbConfig.newBuilder() to construct. + private AlloyDbConfig(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } - @SuppressWarnings("serial") - private volatile java.lang.Object defaultSchemaId_ = ""; + private AlloyDbConfig() { + returnedFields_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } - /** - * - * - *
            -   * Output only. The id of the default
            -   * [Schema][google.cloud.discoveryengine.v1beta.Schema] asscociated to this
            -   * data store.
            -   * 
            - * - * string default_schema_id = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The defaultSchemaId. - */ - @java.lang.Override - public java.lang.String getDefaultSchemaId() { - java.lang.Object ref = defaultSchemaId_; - 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(); - defaultSchemaId_ = s; - return s; - } - } + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.DataStoreProto + .internal_static_google_cloud_discoveryengine_v1beta_DataStore_FederatedSearchConfig_AlloyDbConfig_descriptor; + } - /** - * - * - *
            -   * Output only. The id of the default
            -   * [Schema][google.cloud.discoveryengine.v1beta.Schema] asscociated to this
            -   * data store.
            -   * 
            - * - * string default_schema_id = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for defaultSchemaId. - */ - @java.lang.Override - public com.google.protobuf.ByteString getDefaultSchemaIdBytes() { - java.lang.Object ref = defaultSchemaId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - defaultSchemaId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.DataStoreProto + .internal_static_google_cloud_discoveryengine_v1beta_DataStore_FederatedSearchConfig_AlloyDbConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .AlloyDbConfig.class, + com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .AlloyDbConfig.Builder.class); + } - public static final int CONTENT_CONFIG_FIELD_NUMBER = 6; - private int contentConfig_ = 0; + public interface AlloyDbConnectionConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig.AlloyDbConfig.AlloyDbConnectionConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
            +         * Required. The AlloyDB instance to connect to.
            +         * 
            + * + * string instance = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The instance. + */ + java.lang.String getInstance(); + + /** + * + * + *
            +         * Required. The AlloyDB instance to connect to.
            +         * 
            + * + * string instance = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for instance. + */ + com.google.protobuf.ByteString getInstanceBytes(); + + /** + * + * + *
            +         * Required. The AlloyDB database to connect to.
            +         * 
            + * + * string database = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The database. + */ + java.lang.String getDatabase(); + + /** + * + * + *
            +         * Required. The AlloyDB database to connect to.
            +         * 
            + * + * string database = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for database. + */ + com.google.protobuf.ByteString getDatabaseBytes(); + + /** + * + * + *
            +         * Required. Database user.
            +         *
            +         * If auth_mode = END_USER_ACCOUNT, it can be unset. In that case,
            +         * the user will be inferred on the AlloyDB side, based on the
            +         * authenticated user.
            +         * 
            + * + * string user = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The user. + */ + java.lang.String getUser(); + + /** + * + * + *
            +         * Required. Database user.
            +         *
            +         * If auth_mode = END_USER_ACCOUNT, it can be unset. In that case,
            +         * the user will be inferred on the AlloyDB side, based on the
            +         * authenticated user.
            +         * 
            + * + * string user = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for user. + */ + com.google.protobuf.ByteString getUserBytes(); + + /** + * + * + *
            +         * Required. Database password.
            +         *
            +         * If auth_mode = END_USER_ACCOUNT, it can be unset. In that case,
            +         * the password will be inferred on the AlloyDB side, based on the
            +         * authenticated user.
            +         * 
            + * + * string password = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The password. + */ + java.lang.String getPassword(); + + /** + * + * + *
            +         * Required. Database password.
            +         *
            +         * If auth_mode = END_USER_ACCOUNT, it can be unset. In that case,
            +         * the password will be inferred on the AlloyDB side, based on the
            +         * authenticated user.
            +         * 
            + * + * string password = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for password. + */ + com.google.protobuf.ByteString getPasswordBytes(); + + /** + * + * + *
            +         * Optional. Auth mode.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig.AlloyDbConfig.AlloyDbConnectionConfig.AuthMode auth_mode = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for authMode. + */ + int getAuthModeValue(); + + /** + * + * + *
            +         * Optional. Auth mode.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig.AlloyDbConfig.AlloyDbConnectionConfig.AuthMode auth_mode = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The authMode. + */ + com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig.AlloyDbConfig + .AlloyDbConnectionConfig.AuthMode + getAuthMode(); + + /** + * + * + *
            +         * Optional. If true, enable PSVS for AlloyDB.
            +         * 
            + * + * bool enable_psvs = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The enablePsvs. + */ + boolean getEnablePsvs(); + } - /** - * - * - *
            -   * Immutable. The content config of the data store. If this field is unset,
            -   * the server behavior defaults to
            -   * [ContentConfig.NO_CONTENT][google.cloud.discoveryengine.v1beta.DataStore.ContentConfig.NO_CONTENT].
            -   * 
            - * - * - * .google.cloud.discoveryengine.v1beta.DataStore.ContentConfig content_config = 6 [(.google.api.field_behavior) = IMMUTABLE]; - * - * - * @return The enum numeric value on the wire for contentConfig. - */ - @java.lang.Override - public int getContentConfigValue() { - return contentConfig_; - } + /** + * + * + *
            +       * Configuration for connecting to AlloyDB.
            +       * 
            + * + * Protobuf type {@code + * google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig.AlloyDbConfig.AlloyDbConnectionConfig} + */ + public static final class AlloyDbConnectionConfig extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig.AlloyDbConfig.AlloyDbConnectionConfig) + AlloyDbConnectionConfigOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "AlloyDbConnectionConfig"); + } - /** - * - * - *
            -   * Immutable. The content config of the data store. If this field is unset,
            -   * the server behavior defaults to
            -   * [ContentConfig.NO_CONTENT][google.cloud.discoveryengine.v1beta.DataStore.ContentConfig.NO_CONTENT].
            -   * 
            - * - * - * .google.cloud.discoveryengine.v1beta.DataStore.ContentConfig content_config = 6 [(.google.api.field_behavior) = IMMUTABLE]; - * - * - * @return The contentConfig. - */ - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.DataStore.ContentConfig getContentConfig() { - com.google.cloud.discoveryengine.v1beta.DataStore.ContentConfig result = - com.google.cloud.discoveryengine.v1beta.DataStore.ContentConfig.forNumber(contentConfig_); - return result == null - ? com.google.cloud.discoveryengine.v1beta.DataStore.ContentConfig.UNRECOGNIZED - : result; - } + // Use AlloyDbConnectionConfig.newBuilder() to construct. + private AlloyDbConnectionConfig(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } - public static final int CREATE_TIME_FIELD_NUMBER = 4; - private com.google.protobuf.Timestamp createTime_; + private AlloyDbConnectionConfig() { + instance_ = ""; + database_ = ""; + user_ = ""; + password_ = ""; + authMode_ = 0; + } - /** - * - * - *
            -   * Output only. Timestamp the
            -   * [DataStore][google.cloud.discoveryengine.v1beta.DataStore] was created at.
            -   * 
            - * - * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the createTime field is set. - */ - @java.lang.Override - public boolean hasCreateTime() { - return ((bitField0_ & 0x00000001) != 0); - } + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.DataStoreProto + .internal_static_google_cloud_discoveryengine_v1beta_DataStore_FederatedSearchConfig_AlloyDbConfig_AlloyDbConnectionConfig_descriptor; + } - /** - * - * - *
            -   * Output only. Timestamp the
            -   * [DataStore][google.cloud.discoveryengine.v1beta.DataStore] was created at.
            -   * 
            - * - * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The createTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getCreateTime() { - return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; - } + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.DataStoreProto + .internal_static_google_cloud_discoveryengine_v1beta_DataStore_FederatedSearchConfig_AlloyDbConfig_AlloyDbConnectionConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .AlloyDbConfig.AlloyDbConnectionConfig.class, + com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .AlloyDbConfig.AlloyDbConnectionConfig.Builder.class); + } - /** - * - * - *
            -   * Output only. Timestamp the
            -   * [DataStore][google.cloud.discoveryengine.v1beta.DataStore] was created at.
            -   * 
            - * - * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { - return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; - } + /** + * + * + *
            +         * Auth mode.
            +         * 
            + * + * Protobuf enum {@code + * google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig.AlloyDbConfig.AlloyDbConnectionConfig.AuthMode} + */ + public enum AuthMode implements com.google.protobuf.ProtocolMessageEnum { + /** AUTH_MODE_UNSPECIFIED = 0; */ + AUTH_MODE_UNSPECIFIED(0), + /** + * + * + *
            +           * Uses P4SA when VAIS talks to AlloyDB.
            +           * 
            + * + * AUTH_MODE_SERVICE_ACCOUNT = 1; + */ + AUTH_MODE_SERVICE_ACCOUNT(1), + /** + * + * + *
            +           * Uses EUC when VAIS talks to AlloyDB.
            +           * 
            + * + * AUTH_MODE_END_USER_ACCOUNT = 2; + */ + AUTH_MODE_END_USER_ACCOUNT(2), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "AuthMode"); + } - public static final int LANGUAGE_INFO_FIELD_NUMBER = 14; - private com.google.cloud.discoveryengine.v1beta.LanguageInfo languageInfo_; + /** AUTH_MODE_UNSPECIFIED = 0; */ + public static final int AUTH_MODE_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
            +           * Uses P4SA when VAIS talks to AlloyDB.
            +           * 
            + * + * AUTH_MODE_SERVICE_ACCOUNT = 1; + */ + public static final int AUTH_MODE_SERVICE_ACCOUNT_VALUE = 1; + + /** + * + * + *
            +           * Uses EUC when VAIS talks to AlloyDB.
            +           * 
            + * + * AUTH_MODE_END_USER_ACCOUNT = 2; + */ + public static final int AUTH_MODE_END_USER_ACCOUNT_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; + } - /** - * - * - *
            -   * Language info for DataStore.
            -   * 
            - * - * .google.cloud.discoveryengine.v1beta.LanguageInfo language_info = 14; - * - * @return Whether the languageInfo field is set. - */ - @java.lang.Override - public boolean hasLanguageInfo() { - return ((bitField0_ & 0x00000002) != 0); - } + /** + * @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 AuthMode valueOf(int value) { + return forNumber(value); + } - /** - * - * - *
            -   * Language info for DataStore.
            -   * 
            - * - * .google.cloud.discoveryengine.v1beta.LanguageInfo language_info = 14; - * - * @return The languageInfo. - */ - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.LanguageInfo getLanguageInfo() { - return languageInfo_ == null - ? com.google.cloud.discoveryengine.v1beta.LanguageInfo.getDefaultInstance() - : languageInfo_; - } + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static AuthMode forNumber(int value) { + switch (value) { + case 0: + return AUTH_MODE_UNSPECIFIED; + case 1: + return AUTH_MODE_SERVICE_ACCOUNT; + case 2: + return AUTH_MODE_END_USER_ACCOUNT; + default: + return null; + } + } - /** - * - * - *
            -   * Language info for DataStore.
            -   * 
            - * - * .google.cloud.discoveryengine.v1beta.LanguageInfo language_info = 14; - */ - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.LanguageInfoOrBuilder getLanguageInfoOrBuilder() { - return languageInfo_ == null - ? com.google.cloud.discoveryengine.v1beta.LanguageInfo.getDefaultInstance() - : languageInfo_; - } + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } - public static final int NATURAL_LANGUAGE_QUERY_UNDERSTANDING_CONFIG_FIELD_NUMBER = 34; - private com.google.cloud.discoveryengine.v1beta.NaturalLanguageQueryUnderstandingConfig - naturalLanguageQueryUnderstandingConfig_; + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public AuthMode findValueByNumber(int number) { + return AuthMode.forNumber(number); + } + }; - /** - * - * - *
            -   * Optional. Configuration for Natural Language Query Understanding.
            -   * 
            - * - * - * .google.cloud.discoveryengine.v1beta.NaturalLanguageQueryUnderstandingConfig natural_language_query_understanding_config = 34 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the naturalLanguageQueryUnderstandingConfig field is set. - */ - @java.lang.Override - public boolean hasNaturalLanguageQueryUnderstandingConfig() { - return ((bitField0_ & 0x00000004) != 0); - } + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } - /** - * - * - *
            -   * Optional. Configuration for Natural Language Query Understanding.
            -   * 
            - * - * - * .google.cloud.discoveryengine.v1beta.NaturalLanguageQueryUnderstandingConfig natural_language_query_understanding_config = 34 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The naturalLanguageQueryUnderstandingConfig. - */ - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.NaturalLanguageQueryUnderstandingConfig - getNaturalLanguageQueryUnderstandingConfig() { - return naturalLanguageQueryUnderstandingConfig_ == null - ? com.google.cloud.discoveryengine.v1beta.NaturalLanguageQueryUnderstandingConfig - .getDefaultInstance() - : naturalLanguageQueryUnderstandingConfig_; - } + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } - /** - * - * - *
            -   * Optional. Configuration for Natural Language Query Understanding.
            -   * 
            - * - * - * .google.cloud.discoveryengine.v1beta.NaturalLanguageQueryUnderstandingConfig natural_language_query_understanding_config = 34 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.NaturalLanguageQueryUnderstandingConfigOrBuilder - getNaturalLanguageQueryUnderstandingConfigOrBuilder() { - return naturalLanguageQueryUnderstandingConfig_ == null - ? com.google.cloud.discoveryengine.v1beta.NaturalLanguageQueryUnderstandingConfig - .getDefaultInstance() - : naturalLanguageQueryUnderstandingConfig_; - } + public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .AlloyDbConfig.AlloyDbConnectionConfig.getDescriptor() + .getEnumTypes() + .get(0); + } - public static final int BILLING_ESTIMATION_FIELD_NUMBER = 23; - private com.google.cloud.discoveryengine.v1beta.DataStore.BillingEstimation billingEstimation_; + private static final AuthMode[] VALUES = values(); - /** - * - * - *
            -   * Output only. Data size estimation for billing.
            -   * 
            - * - * - * .google.cloud.discoveryengine.v1beta.DataStore.BillingEstimation billing_estimation = 23 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the billingEstimation field is set. - */ - @java.lang.Override - public boolean hasBillingEstimation() { - return ((bitField0_ & 0x00000008) != 0); - } + public static AuthMode valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } - /** - * - * - *
            -   * Output only. Data size estimation for billing.
            -   * 
            - * - * - * .google.cloud.discoveryengine.v1beta.DataStore.BillingEstimation billing_estimation = 23 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The billingEstimation. - */ - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.DataStore.BillingEstimation - getBillingEstimation() { - return billingEstimation_ == null - ? com.google.cloud.discoveryengine.v1beta.DataStore.BillingEstimation.getDefaultInstance() - : billingEstimation_; - } + private final int value; - /** - * - * - *
            -   * Output only. Data size estimation for billing.
            -   * 
            - * - * - * .google.cloud.discoveryengine.v1beta.DataStore.BillingEstimation billing_estimation = 23 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.DataStore.BillingEstimationOrBuilder - getBillingEstimationOrBuilder() { - return billingEstimation_ == null - ? com.google.cloud.discoveryengine.v1beta.DataStore.BillingEstimation.getDefaultInstance() - : billingEstimation_; - } + private AuthMode(int value) { + this.value = value; + } - public static final int WORKSPACE_CONFIG_FIELD_NUMBER = 25; - private com.google.cloud.discoveryengine.v1beta.WorkspaceConfig workspaceConfig_; + // @@protoc_insertion_point(enum_scope:google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig.AlloyDbConfig.AlloyDbConnectionConfig.AuthMode) + } - /** - * - * - *
            -   * Config to store data store type configuration for workspace data. This
            -   * must be set when
            -   * [DataStore.content_config][google.cloud.discoveryengine.v1beta.DataStore.content_config]
            -   * is set as
            -   * [DataStore.ContentConfig.GOOGLE_WORKSPACE][google.cloud.discoveryengine.v1beta.DataStore.ContentConfig.GOOGLE_WORKSPACE].
            -   * 
            - * - * .google.cloud.discoveryengine.v1beta.WorkspaceConfig workspace_config = 25; - * - * @return Whether the workspaceConfig field is set. - */ - @java.lang.Override - public boolean hasWorkspaceConfig() { - return ((bitField0_ & 0x00000010) != 0); - } + public static final int INSTANCE_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object instance_ = ""; + + /** + * + * + *
            +         * Required. The AlloyDB instance to connect to.
            +         * 
            + * + * string instance = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The instance. + */ + @java.lang.Override + public java.lang.String getInstance() { + java.lang.Object ref = instance_; + 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(); + instance_ = s; + return s; + } + } - /** - * - * - *
            -   * Config to store data store type configuration for workspace data. This
            -   * must be set when
            -   * [DataStore.content_config][google.cloud.discoveryengine.v1beta.DataStore.content_config]
            -   * is set as
            -   * [DataStore.ContentConfig.GOOGLE_WORKSPACE][google.cloud.discoveryengine.v1beta.DataStore.ContentConfig.GOOGLE_WORKSPACE].
            -   * 
            - * - * .google.cloud.discoveryengine.v1beta.WorkspaceConfig workspace_config = 25; - * - * @return The workspaceConfig. - */ - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.WorkspaceConfig getWorkspaceConfig() { - return workspaceConfig_ == null - ? com.google.cloud.discoveryengine.v1beta.WorkspaceConfig.getDefaultInstance() - : workspaceConfig_; - } + /** + * + * + *
            +         * Required. The AlloyDB instance to connect to.
            +         * 
            + * + * string instance = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for instance. + */ + @java.lang.Override + public com.google.protobuf.ByteString getInstanceBytes() { + java.lang.Object ref = instance_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + instance_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } - /** - * - * - *
            -   * Config to store data store type configuration for workspace data. This
            -   * must be set when
            -   * [DataStore.content_config][google.cloud.discoveryengine.v1beta.DataStore.content_config]
            -   * is set as
            -   * [DataStore.ContentConfig.GOOGLE_WORKSPACE][google.cloud.discoveryengine.v1beta.DataStore.ContentConfig.GOOGLE_WORKSPACE].
            -   * 
            - * - * .google.cloud.discoveryengine.v1beta.WorkspaceConfig workspace_config = 25; - */ - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.WorkspaceConfigOrBuilder - getWorkspaceConfigOrBuilder() { - return workspaceConfig_ == null - ? com.google.cloud.discoveryengine.v1beta.WorkspaceConfig.getDefaultInstance() - : workspaceConfig_; - } - - public static final int DOCUMENT_PROCESSING_CONFIG_FIELD_NUMBER = 27; - private com.google.cloud.discoveryengine.v1beta.DocumentProcessingConfig - documentProcessingConfig_; - - /** - * - * - *
            -   * Configuration for Document understanding and enrichment.
            -   * 
            - * - * - * .google.cloud.discoveryengine.v1beta.DocumentProcessingConfig document_processing_config = 27; - * - * - * @return Whether the documentProcessingConfig field is set. - */ - @java.lang.Override - public boolean hasDocumentProcessingConfig() { - return ((bitField0_ & 0x00000020) != 0); - } + public static final int DATABASE_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object database_ = ""; + + /** + * + * + *
            +         * Required. The AlloyDB database to connect to.
            +         * 
            + * + * string database = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The database. + */ + @java.lang.Override + public java.lang.String getDatabase() { + java.lang.Object ref = database_; + 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(); + database_ = s; + return s; + } + } - /** - * - * - *
            -   * Configuration for Document understanding and enrichment.
            -   * 
            - * - * - * .google.cloud.discoveryengine.v1beta.DocumentProcessingConfig document_processing_config = 27; - * - * - * @return The documentProcessingConfig. - */ - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.DocumentProcessingConfig - getDocumentProcessingConfig() { - return documentProcessingConfig_ == null - ? com.google.cloud.discoveryengine.v1beta.DocumentProcessingConfig.getDefaultInstance() - : documentProcessingConfig_; - } + /** + * + * + *
            +         * Required. The AlloyDB database to connect to.
            +         * 
            + * + * string database = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for database. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDatabaseBytes() { + java.lang.Object ref = database_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + database_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } - /** - * - * - *
            -   * Configuration for Document understanding and enrichment.
            -   * 
            - * - * - * .google.cloud.discoveryengine.v1beta.DocumentProcessingConfig document_processing_config = 27; - * - */ - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.DocumentProcessingConfigOrBuilder - getDocumentProcessingConfigOrBuilder() { - return documentProcessingConfig_ == null - ? com.google.cloud.discoveryengine.v1beta.DocumentProcessingConfig.getDefaultInstance() - : documentProcessingConfig_; - } + public static final int USER_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object user_ = ""; + + /** + * + * + *
            +         * Required. Database user.
            +         *
            +         * If auth_mode = END_USER_ACCOUNT, it can be unset. In that case,
            +         * the user will be inferred on the AlloyDB side, based on the
            +         * authenticated user.
            +         * 
            + * + * string user = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The user. + */ + @java.lang.Override + public java.lang.String getUser() { + java.lang.Object ref = user_; + 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(); + user_ = s; + return s; + } + } - public static final int STARTING_SCHEMA_FIELD_NUMBER = 28; - private com.google.cloud.discoveryengine.v1beta.Schema startingSchema_; + /** + * + * + *
            +         * Required. Database user.
            +         *
            +         * If auth_mode = END_USER_ACCOUNT, it can be unset. In that case,
            +         * the user will be inferred on the AlloyDB side, based on the
            +         * authenticated user.
            +         * 
            + * + * string user = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for user. + */ + @java.lang.Override + public com.google.protobuf.ByteString getUserBytes() { + java.lang.Object ref = user_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + user_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } - /** - * - * - *
            -   * The start schema to use for this
            -   * [DataStore][google.cloud.discoveryengine.v1beta.DataStore] when
            -   * provisioning it. If unset, a default vertical specialized schema will be
            -   * used.
            -   *
            -   * This field is only used by [CreateDataStore][] API, and will be ignored if
            -   * used in other APIs. This field will be omitted from all API responses
            -   * including [CreateDataStore][] API. To retrieve a schema of a
            -   * [DataStore][google.cloud.discoveryengine.v1beta.DataStore], use
            -   * [SchemaService.GetSchema][google.cloud.discoveryengine.v1beta.SchemaService.GetSchema]
            -   * API instead.
            -   *
            -   * The provided schema will be validated against certain rules on schema.
            -   * Learn more from [this
            -   * doc](https://cloud.google.com/generative-ai-app-builder/docs/provide-schema).
            -   * 
            - * - * .google.cloud.discoveryengine.v1beta.Schema starting_schema = 28; - * - * @return Whether the startingSchema field is set. - */ - @java.lang.Override - public boolean hasStartingSchema() { - return ((bitField0_ & 0x00000040) != 0); - } + public static final int PASSWORD_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object password_ = ""; + + /** + * + * + *
            +         * Required. Database password.
            +         *
            +         * If auth_mode = END_USER_ACCOUNT, it can be unset. In that case,
            +         * the password will be inferred on the AlloyDB side, based on the
            +         * authenticated user.
            +         * 
            + * + * string password = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The password. + */ + @java.lang.Override + public java.lang.String getPassword() { + java.lang.Object ref = password_; + 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(); + password_ = s; + return s; + } + } - /** - * - * - *
            -   * The start schema to use for this
            -   * [DataStore][google.cloud.discoveryengine.v1beta.DataStore] when
            -   * provisioning it. If unset, a default vertical specialized schema will be
            -   * used.
            -   *
            -   * This field is only used by [CreateDataStore][] API, and will be ignored if
            -   * used in other APIs. This field will be omitted from all API responses
            -   * including [CreateDataStore][] API. To retrieve a schema of a
            -   * [DataStore][google.cloud.discoveryengine.v1beta.DataStore], use
            -   * [SchemaService.GetSchema][google.cloud.discoveryengine.v1beta.SchemaService.GetSchema]
            -   * API instead.
            -   *
            -   * The provided schema will be validated against certain rules on schema.
            -   * Learn more from [this
            -   * doc](https://cloud.google.com/generative-ai-app-builder/docs/provide-schema).
            -   * 
            - * - * .google.cloud.discoveryengine.v1beta.Schema starting_schema = 28; - * - * @return The startingSchema. - */ - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.Schema getStartingSchema() { - return startingSchema_ == null - ? com.google.cloud.discoveryengine.v1beta.Schema.getDefaultInstance() - : startingSchema_; - } + /** + * + * + *
            +         * Required. Database password.
            +         *
            +         * If auth_mode = END_USER_ACCOUNT, it can be unset. In that case,
            +         * the password will be inferred on the AlloyDB side, based on the
            +         * authenticated user.
            +         * 
            + * + * string password = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for password. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPasswordBytes() { + java.lang.Object ref = password_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + password_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } - /** - * - * - *
            -   * The start schema to use for this
            -   * [DataStore][google.cloud.discoveryengine.v1beta.DataStore] when
            -   * provisioning it. If unset, a default vertical specialized schema will be
            -   * used.
            -   *
            -   * This field is only used by [CreateDataStore][] API, and will be ignored if
            -   * used in other APIs. This field will be omitted from all API responses
            -   * including [CreateDataStore][] API. To retrieve a schema of a
            -   * [DataStore][google.cloud.discoveryengine.v1beta.DataStore], use
            -   * [SchemaService.GetSchema][google.cloud.discoveryengine.v1beta.SchemaService.GetSchema]
            -   * API instead.
            -   *
            -   * The provided schema will be validated against certain rules on schema.
            -   * Learn more from [this
            -   * doc](https://cloud.google.com/generative-ai-app-builder/docs/provide-schema).
            -   * 
            - * - * .google.cloud.discoveryengine.v1beta.Schema starting_schema = 28; - */ - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.SchemaOrBuilder getStartingSchemaOrBuilder() { - return startingSchema_ == null - ? com.google.cloud.discoveryengine.v1beta.Schema.getDefaultInstance() - : startingSchema_; - } + public static final int AUTH_MODE_FIELD_NUMBER = 5; + private int authMode_ = 0; + + /** + * + * + *
            +         * Optional. Auth mode.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig.AlloyDbConfig.AlloyDbConnectionConfig.AuthMode auth_mode = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for authMode. + */ + @java.lang.Override + public int getAuthModeValue() { + return authMode_; + } - public static final int SERVING_CONFIG_DATA_STORE_FIELD_NUMBER = 30; - private com.google.cloud.discoveryengine.v1beta.DataStore.ServingConfigDataStore - servingConfigDataStore_; + /** + * + * + *
            +         * Optional. Auth mode.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig.AlloyDbConfig.AlloyDbConnectionConfig.AuthMode auth_mode = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The authMode. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig.AlloyDbConfig + .AlloyDbConnectionConfig.AuthMode + getAuthMode() { + com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig.AlloyDbConfig + .AlloyDbConnectionConfig.AuthMode + result = + com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .AlloyDbConfig.AlloyDbConnectionConfig.AuthMode.forNumber(authMode_); + return result == null + ? com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .AlloyDbConfig.AlloyDbConnectionConfig.AuthMode.UNRECOGNIZED + : result; + } - /** - * - * - *
            -   * Optional. Stores serving config at DataStore level.
            -   * 
            - * - * - * .google.cloud.discoveryengine.v1beta.DataStore.ServingConfigDataStore serving_config_data_store = 30 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the servingConfigDataStore field is set. - */ - @java.lang.Override - public boolean hasServingConfigDataStore() { - return ((bitField0_ & 0x00000080) != 0); - } + public static final int ENABLE_PSVS_FIELD_NUMBER = 6; + private boolean enablePsvs_ = false; + + /** + * + * + *
            +         * Optional. If true, enable PSVS for AlloyDB.
            +         * 
            + * + * bool enable_psvs = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The enablePsvs. + */ + @java.lang.Override + public boolean getEnablePsvs() { + return enablePsvs_; + } - /** - * - * - *
            -   * Optional. Stores serving config at DataStore level.
            -   * 
            - * - * - * .google.cloud.discoveryengine.v1beta.DataStore.ServingConfigDataStore serving_config_data_store = 30 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The servingConfigDataStore. - */ - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.DataStore.ServingConfigDataStore - getServingConfigDataStore() { - return servingConfigDataStore_ == null - ? com.google.cloud.discoveryengine.v1beta.DataStore.ServingConfigDataStore - .getDefaultInstance() - : servingConfigDataStore_; - } + private byte memoizedIsInitialized = -1; - /** - * - * - *
            -   * Optional. Stores serving config at DataStore level.
            -   * 
            - * - * - * .google.cloud.discoveryengine.v1beta.DataStore.ServingConfigDataStore serving_config_data_store = 30 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.DataStore.ServingConfigDataStoreOrBuilder - getServingConfigDataStoreOrBuilder() { - return servingConfigDataStore_ == null - ? com.google.cloud.discoveryengine.v1beta.DataStore.ServingConfigDataStore - .getDefaultInstance() - : servingConfigDataStore_; - } + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; - private byte memoizedIsInitialized = -1; + memoizedIsInitialized = 1; + return true; + } - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(instance_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, instance_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(database_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, database_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(user_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, user_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(password_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, password_); + } + if (authMode_ + != com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .AlloyDbConfig.AlloyDbConnectionConfig.AuthMode.AUTH_MODE_UNSPECIFIED + .getNumber()) { + output.writeEnum(5, authMode_); + } + if (enablePsvs_ != false) { + output.writeBool(6, enablePsvs_); + } + getUnknownFields().writeTo(output); + } - memoizedIsInitialized = 1; - return true; - } + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(instance_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, instance_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(database_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, database_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(user_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, user_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(password_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, password_); + } + if (authMode_ + != com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .AlloyDbConfig.AlloyDbConnectionConfig.AuthMode.AUTH_MODE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(5, authMode_); + } + if (enablePsvs_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(6, enablePsvs_); + } + 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.discoveryengine.v1beta.DataStore.FederatedSearchConfig.AlloyDbConfig + .AlloyDbConnectionConfig)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig.AlloyDbConfig + .AlloyDbConnectionConfig + other = + (com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .AlloyDbConfig.AlloyDbConnectionConfig) + obj; + + if (!getInstance().equals(other.getInstance())) return false; + if (!getDatabase().equals(other.getDatabase())) return false; + if (!getUser().equals(other.getUser())) return false; + if (!getPassword().equals(other.getPassword())) return false; + if (authMode_ != other.authMode_) return false; + if (getEnablePsvs() != other.getEnablePsvs()) 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) + INSTANCE_FIELD_NUMBER; + hash = (53 * hash) + getInstance().hashCode(); + hash = (37 * hash) + DATABASE_FIELD_NUMBER; + hash = (53 * hash) + getDatabase().hashCode(); + hash = (37 * hash) + USER_FIELD_NUMBER; + hash = (53 * hash) + getUser().hashCode(); + hash = (37 * hash) + PASSWORD_FIELD_NUMBER; + hash = (53 * hash) + getPassword().hashCode(); + hash = (37 * hash) + AUTH_MODE_FIELD_NUMBER; + hash = (53 * hash) + authMode_; + hash = (37 * hash) + ENABLE_PSVS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getEnablePsvs()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .AlloyDbConfig.AlloyDbConnectionConfig + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .AlloyDbConfig.AlloyDbConnectionConfig + 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.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .AlloyDbConfig.AlloyDbConnectionConfig + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .AlloyDbConfig.AlloyDbConnectionConfig + 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.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .AlloyDbConfig.AlloyDbConnectionConfig + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .AlloyDbConfig.AlloyDbConnectionConfig + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .AlloyDbConfig.AlloyDbConnectionConfig + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .AlloyDbConfig.AlloyDbConnectionConfig + 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.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .AlloyDbConfig.AlloyDbConnectionConfig + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .AlloyDbConfig.AlloyDbConnectionConfig + 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.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .AlloyDbConfig.AlloyDbConnectionConfig + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .AlloyDbConfig.AlloyDbConnectionConfig + 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.discoveryengine.v1beta.DataStore.FederatedSearchConfig.AlloyDbConfig + .AlloyDbConnectionConfig + 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; + } + + /** + * + * + *
            +         * Configuration for connecting to AlloyDB.
            +         * 
            + * + * Protobuf type {@code + * google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig.AlloyDbConfig.AlloyDbConnectionConfig} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig.AlloyDbConfig.AlloyDbConnectionConfig) + com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig.AlloyDbConfig + .AlloyDbConnectionConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.DataStoreProto + .internal_static_google_cloud_discoveryengine_v1beta_DataStore_FederatedSearchConfig_AlloyDbConfig_AlloyDbConnectionConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.DataStoreProto + .internal_static_google_cloud_discoveryengine_v1beta_DataStore_FederatedSearchConfig_AlloyDbConfig_AlloyDbConnectionConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .AlloyDbConfig.AlloyDbConnectionConfig.class, + com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .AlloyDbConfig.AlloyDbConnectionConfig.Builder.class); + } + + // Construct using + // com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig.AlloyDbConfig.AlloyDbConnectionConfig.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + instance_ = ""; + database_ = ""; + user_ = ""; + password_ = ""; + authMode_ = 0; + enablePsvs_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1beta.DataStoreProto + .internal_static_google_cloud_discoveryengine_v1beta_DataStore_FederatedSearchConfig_AlloyDbConfig_AlloyDbConnectionConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .AlloyDbConfig.AlloyDbConnectionConfig + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .AlloyDbConfig.AlloyDbConnectionConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .AlloyDbConfig.AlloyDbConnectionConfig + build() { + com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig.AlloyDbConfig + .AlloyDbConnectionConfig + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .AlloyDbConfig.AlloyDbConnectionConfig + buildPartial() { + com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig.AlloyDbConfig + .AlloyDbConnectionConfig + result = + new com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .AlloyDbConfig.AlloyDbConnectionConfig(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig.AlloyDbConfig + .AlloyDbConnectionConfig + result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.instance_ = instance_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.database_ = database_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.user_ = user_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.password_ = password_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.authMode_ = authMode_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.enablePsvs_ = enablePsvs_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .AlloyDbConfig.AlloyDbConnectionConfig) { + return mergeFrom( + (com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .AlloyDbConfig.AlloyDbConnectionConfig) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig.AlloyDbConfig + .AlloyDbConnectionConfig + other) { + if (other + == com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .AlloyDbConfig.AlloyDbConnectionConfig.getDefaultInstance()) return this; + if (!other.getInstance().isEmpty()) { + instance_ = other.instance_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getDatabase().isEmpty()) { + database_ = other.database_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getUser().isEmpty()) { + user_ = other.user_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getPassword().isEmpty()) { + password_ = other.password_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (other.authMode_ != 0) { + setAuthModeValue(other.getAuthModeValue()); + } + if (other.getEnablePsvs() != false) { + setEnablePsvs(other.getEnablePsvs()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + instance_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + database_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + user_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + password_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 40: + { + authMode_ = input.readEnum(); + bitField0_ |= 0x00000010; + break; + } // case 40 + case 48: + { + enablePsvs_ = input.readBool(); + bitField0_ |= 0x00000020; + break; + } // case 48 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object instance_ = ""; + + /** + * + * + *
            +           * Required. The AlloyDB instance to connect to.
            +           * 
            + * + * string instance = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The instance. + */ + public java.lang.String getInstance() { + java.lang.Object ref = instance_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + instance_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
            +           * Required. The AlloyDB instance to connect to.
            +           * 
            + * + * string instance = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for instance. + */ + public com.google.protobuf.ByteString getInstanceBytes() { + java.lang.Object ref = instance_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + instance_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
            +           * Required. The AlloyDB instance to connect to.
            +           * 
            + * + * string instance = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The instance to set. + * @return This builder for chaining. + */ + public Builder setInstance(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + instance_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
            +           * Required. The AlloyDB instance to connect to.
            +           * 
            + * + * string instance = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearInstance() { + instance_ = getDefaultInstance().getInstance(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
            +           * Required. The AlloyDB instance to connect to.
            +           * 
            + * + * string instance = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for instance to set. + * @return This builder for chaining. + */ + public Builder setInstanceBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + instance_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object database_ = ""; + + /** + * + * + *
            +           * Required. The AlloyDB database to connect to.
            +           * 
            + * + * string database = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The database. + */ + public java.lang.String getDatabase() { + java.lang.Object ref = database_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + database_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
            +           * Required. The AlloyDB database to connect to.
            +           * 
            + * + * string database = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for database. + */ + public com.google.protobuf.ByteString getDatabaseBytes() { + java.lang.Object ref = database_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + database_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
            +           * Required. The AlloyDB database to connect to.
            +           * 
            + * + * string database = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The database to set. + * @return This builder for chaining. + */ + public Builder setDatabase(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + database_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
            +           * Required. The AlloyDB database to connect to.
            +           * 
            + * + * string database = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearDatabase() { + database_ = getDefaultInstance().getDatabase(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
            +           * Required. The AlloyDB database to connect to.
            +           * 
            + * + * string database = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for database to set. + * @return This builder for chaining. + */ + public Builder setDatabaseBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + database_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object user_ = ""; + + /** + * + * + *
            +           * Required. Database user.
            +           *
            +           * If auth_mode = END_USER_ACCOUNT, it can be unset. In that case,
            +           * the user will be inferred on the AlloyDB side, based on the
            +           * authenticated user.
            +           * 
            + * + * string user = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The user. + */ + public java.lang.String getUser() { + java.lang.Object ref = user_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + user_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
            +           * Required. Database user.
            +           *
            +           * If auth_mode = END_USER_ACCOUNT, it can be unset. In that case,
            +           * the user will be inferred on the AlloyDB side, based on the
            +           * authenticated user.
            +           * 
            + * + * string user = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for user. + */ + public com.google.protobuf.ByteString getUserBytes() { + java.lang.Object ref = user_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + user_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
            +           * Required. Database user.
            +           *
            +           * If auth_mode = END_USER_ACCOUNT, it can be unset. In that case,
            +           * the user will be inferred on the AlloyDB side, based on the
            +           * authenticated user.
            +           * 
            + * + * string user = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The user to set. + * @return This builder for chaining. + */ + public Builder setUser(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + user_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
            +           * Required. Database user.
            +           *
            +           * If auth_mode = END_USER_ACCOUNT, it can be unset. In that case,
            +           * the user will be inferred on the AlloyDB side, based on the
            +           * authenticated user.
            +           * 
            + * + * string user = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearUser() { + user_ = getDefaultInstance().getUser(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
            +           * Required. Database user.
            +           *
            +           * If auth_mode = END_USER_ACCOUNT, it can be unset. In that case,
            +           * the user will be inferred on the AlloyDB side, based on the
            +           * authenticated user.
            +           * 
            + * + * string user = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for user to set. + * @return This builder for chaining. + */ + public Builder setUserBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + user_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object password_ = ""; + + /** + * + * + *
            +           * Required. Database password.
            +           *
            +           * If auth_mode = END_USER_ACCOUNT, it can be unset. In that case,
            +           * the password will be inferred on the AlloyDB side, based on the
            +           * authenticated user.
            +           * 
            + * + * string password = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The password. + */ + public java.lang.String getPassword() { + java.lang.Object ref = password_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + password_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
            +           * Required. Database password.
            +           *
            +           * If auth_mode = END_USER_ACCOUNT, it can be unset. In that case,
            +           * the password will be inferred on the AlloyDB side, based on the
            +           * authenticated user.
            +           * 
            + * + * string password = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for password. + */ + public com.google.protobuf.ByteString getPasswordBytes() { + java.lang.Object ref = password_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + password_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
            +           * Required. Database password.
            +           *
            +           * If auth_mode = END_USER_ACCOUNT, it can be unset. In that case,
            +           * the password will be inferred on the AlloyDB side, based on the
            +           * authenticated user.
            +           * 
            + * + * string password = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The password to set. + * @return This builder for chaining. + */ + public Builder setPassword(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + password_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
            +           * Required. Database password.
            +           *
            +           * If auth_mode = END_USER_ACCOUNT, it can be unset. In that case,
            +           * the password will be inferred on the AlloyDB side, based on the
            +           * authenticated user.
            +           * 
            + * + * string password = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearPassword() { + password_ = getDefaultInstance().getPassword(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + + /** + * + * + *
            +           * Required. Database password.
            +           *
            +           * If auth_mode = END_USER_ACCOUNT, it can be unset. In that case,
            +           * the password will be inferred on the AlloyDB side, based on the
            +           * authenticated user.
            +           * 
            + * + * string password = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for password to set. + * @return This builder for chaining. + */ + public Builder setPasswordBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + password_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private int authMode_ = 0; + + /** + * + * + *
            +           * Optional. Auth mode.
            +           * 
            + * + * + * .google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig.AlloyDbConfig.AlloyDbConnectionConfig.AuthMode auth_mode = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for authMode. + */ + @java.lang.Override + public int getAuthModeValue() { + return authMode_; + } + + /** + * + * + *
            +           * Optional. Auth mode.
            +           * 
            + * + * + * .google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig.AlloyDbConfig.AlloyDbConnectionConfig.AuthMode auth_mode = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The enum numeric value on the wire for authMode to set. + * @return This builder for chaining. + */ + public Builder setAuthModeValue(int value) { + authMode_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
            +           * Optional. Auth mode.
            +           * 
            + * + * + * .google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig.AlloyDbConfig.AlloyDbConnectionConfig.AuthMode auth_mode = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The authMode. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .AlloyDbConfig.AlloyDbConnectionConfig.AuthMode + getAuthMode() { + com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig.AlloyDbConfig + .AlloyDbConnectionConfig.AuthMode + result = + com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .AlloyDbConfig.AlloyDbConnectionConfig.AuthMode.forNumber(authMode_); + return result == null + ? com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .AlloyDbConfig.AlloyDbConnectionConfig.AuthMode.UNRECOGNIZED + : result; + } + + /** + * + * + *
            +           * Optional. Auth mode.
            +           * 
            + * + * + * .google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig.AlloyDbConfig.AlloyDbConnectionConfig.AuthMode auth_mode = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The authMode to set. + * @return This builder for chaining. + */ + public Builder setAuthMode( + com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig.AlloyDbConfig + .AlloyDbConnectionConfig.AuthMode + value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000010; + authMode_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
            +           * Optional. Auth mode.
            +           * 
            + * + * + * .google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig.AlloyDbConfig.AlloyDbConnectionConfig.AuthMode auth_mode = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearAuthMode() { + bitField0_ = (bitField0_ & ~0x00000010); + authMode_ = 0; + onChanged(); + return this; + } + + private boolean enablePsvs_; + + /** + * + * + *
            +           * Optional. If true, enable PSVS for AlloyDB.
            +           * 
            + * + * bool enable_psvs = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The enablePsvs. + */ + @java.lang.Override + public boolean getEnablePsvs() { + return enablePsvs_; + } + + /** + * + * + *
            +           * Optional. If true, enable PSVS for AlloyDB.
            +           * 
            + * + * bool enable_psvs = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The enablePsvs to set. + * @return This builder for chaining. + */ + public Builder setEnablePsvs(boolean value) { + + enablePsvs_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
            +           * Optional. If true, enable PSVS for AlloyDB.
            +           * 
            + * + * bool enable_psvs = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearEnablePsvs() { + bitField0_ = (bitField0_ & ~0x00000020); + enablePsvs_ = false; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig.AlloyDbConfig.AlloyDbConnectionConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig.AlloyDbConfig.AlloyDbConnectionConfig) + private static final com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .AlloyDbConfig.AlloyDbConnectionConfig + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .AlloyDbConfig.AlloyDbConnectionConfig(); + } + + public static com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .AlloyDbConfig.AlloyDbConnectionConfig + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AlloyDbConnectionConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig.AlloyDbConfig + .AlloyDbConnectionConfig + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface AlloyDbAiNaturalLanguageConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig.AlloyDbConfig.AlloyDbAiNaturalLanguageConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
            +         * Optional. AlloyDb AI NL config id, i.e. the value that was used for
            +         * calling `SELECT alloydb_ai_nl.g_create_configuration(...)`. Can be
            +         * empty.
            +         * 
            + * + * string nl_config_id = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The nlConfigId. + */ + java.lang.String getNlConfigId(); + + /** + * + * + *
            +         * Optional. AlloyDb AI NL config id, i.e. the value that was used for
            +         * calling `SELECT alloydb_ai_nl.g_create_configuration(...)`. Can be
            +         * empty.
            +         * 
            + * + * string nl_config_id = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for nlConfigId. + */ + com.google.protobuf.ByteString getNlConfigIdBytes(); + } + + /** + * + * + *
            +       * Configuration for AlloyDB AI Natural Language.
            +       * 
            + * + * Protobuf type {@code + * google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig.AlloyDbConfig.AlloyDbAiNaturalLanguageConfig} + */ + public static final class AlloyDbAiNaturalLanguageConfig + extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig.AlloyDbConfig.AlloyDbAiNaturalLanguageConfig) + AlloyDbAiNaturalLanguageConfigOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "AlloyDbAiNaturalLanguageConfig"); + } + + // Use AlloyDbAiNaturalLanguageConfig.newBuilder() to construct. + private AlloyDbAiNaturalLanguageConfig( + com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private AlloyDbAiNaturalLanguageConfig() { + nlConfigId_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.DataStoreProto + .internal_static_google_cloud_discoveryengine_v1beta_DataStore_FederatedSearchConfig_AlloyDbConfig_AlloyDbAiNaturalLanguageConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.DataStoreProto + .internal_static_google_cloud_discoveryengine_v1beta_DataStore_FederatedSearchConfig_AlloyDbConfig_AlloyDbAiNaturalLanguageConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .AlloyDbConfig.AlloyDbAiNaturalLanguageConfig.class, + com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .AlloyDbConfig.AlloyDbAiNaturalLanguageConfig.Builder.class); + } + + public static final int NL_CONFIG_ID_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object nlConfigId_ = ""; + + /** + * + * + *
            +         * Optional. AlloyDb AI NL config id, i.e. the value that was used for
            +         * calling `SELECT alloydb_ai_nl.g_create_configuration(...)`. Can be
            +         * empty.
            +         * 
            + * + * string nl_config_id = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The nlConfigId. + */ + @java.lang.Override + public java.lang.String getNlConfigId() { + java.lang.Object ref = nlConfigId_; + 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(); + nlConfigId_ = s; + return s; + } + } + + /** + * + * + *
            +         * Optional. AlloyDb AI NL config id, i.e. the value that was used for
            +         * calling `SELECT alloydb_ai_nl.g_create_configuration(...)`. Can be
            +         * empty.
            +         * 
            + * + * string nl_config_id = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for nlConfigId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNlConfigIdBytes() { + java.lang.Object ref = nlConfigId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nlConfigId_ = 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 { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(nlConfigId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, nlConfigId_); + } + 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(nlConfigId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, nlConfigId_); + } + 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.discoveryengine.v1beta.DataStore.FederatedSearchConfig.AlloyDbConfig + .AlloyDbAiNaturalLanguageConfig)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig.AlloyDbConfig + .AlloyDbAiNaturalLanguageConfig + other = + (com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .AlloyDbConfig.AlloyDbAiNaturalLanguageConfig) + obj; + + if (!getNlConfigId().equals(other.getNlConfigId())) 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) + NL_CONFIG_ID_FIELD_NUMBER; + hash = (53 * hash) + getNlConfigId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .AlloyDbConfig.AlloyDbAiNaturalLanguageConfig + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .AlloyDbConfig.AlloyDbAiNaturalLanguageConfig + 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.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .AlloyDbConfig.AlloyDbAiNaturalLanguageConfig + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .AlloyDbConfig.AlloyDbAiNaturalLanguageConfig + 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.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .AlloyDbConfig.AlloyDbAiNaturalLanguageConfig + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .AlloyDbConfig.AlloyDbAiNaturalLanguageConfig + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .AlloyDbConfig.AlloyDbAiNaturalLanguageConfig + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .AlloyDbConfig.AlloyDbAiNaturalLanguageConfig + 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.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .AlloyDbConfig.AlloyDbAiNaturalLanguageConfig + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .AlloyDbConfig.AlloyDbAiNaturalLanguageConfig + 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.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .AlloyDbConfig.AlloyDbAiNaturalLanguageConfig + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .AlloyDbConfig.AlloyDbAiNaturalLanguageConfig + 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.discoveryengine.v1beta.DataStore.FederatedSearchConfig.AlloyDbConfig + .AlloyDbAiNaturalLanguageConfig + 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; + } + + /** + * + * + *
            +         * Configuration for AlloyDB AI Natural Language.
            +         * 
            + * + * Protobuf type {@code + * google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig.AlloyDbConfig.AlloyDbAiNaturalLanguageConfig} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig.AlloyDbConfig.AlloyDbAiNaturalLanguageConfig) + com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig.AlloyDbConfig + .AlloyDbAiNaturalLanguageConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.DataStoreProto + .internal_static_google_cloud_discoveryengine_v1beta_DataStore_FederatedSearchConfig_AlloyDbConfig_AlloyDbAiNaturalLanguageConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.DataStoreProto + .internal_static_google_cloud_discoveryengine_v1beta_DataStore_FederatedSearchConfig_AlloyDbConfig_AlloyDbAiNaturalLanguageConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .AlloyDbConfig.AlloyDbAiNaturalLanguageConfig.class, + com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .AlloyDbConfig.AlloyDbAiNaturalLanguageConfig.Builder.class); + } + + // Construct using + // com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig.AlloyDbConfig.AlloyDbAiNaturalLanguageConfig.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + nlConfigId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1beta.DataStoreProto + .internal_static_google_cloud_discoveryengine_v1beta_DataStore_FederatedSearchConfig_AlloyDbConfig_AlloyDbAiNaturalLanguageConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .AlloyDbConfig.AlloyDbAiNaturalLanguageConfig + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .AlloyDbConfig.AlloyDbAiNaturalLanguageConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .AlloyDbConfig.AlloyDbAiNaturalLanguageConfig + build() { + com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig.AlloyDbConfig + .AlloyDbAiNaturalLanguageConfig + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .AlloyDbConfig.AlloyDbAiNaturalLanguageConfig + buildPartial() { + com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig.AlloyDbConfig + .AlloyDbAiNaturalLanguageConfig + result = + new com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .AlloyDbConfig.AlloyDbAiNaturalLanguageConfig(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig.AlloyDbConfig + .AlloyDbAiNaturalLanguageConfig + result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.nlConfigId_ = nlConfigId_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .AlloyDbConfig.AlloyDbAiNaturalLanguageConfig) { + return mergeFrom( + (com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .AlloyDbConfig.AlloyDbAiNaturalLanguageConfig) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig.AlloyDbConfig + .AlloyDbAiNaturalLanguageConfig + other) { + if (other + == com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .AlloyDbConfig.AlloyDbAiNaturalLanguageConfig.getDefaultInstance()) return this; + if (!other.getNlConfigId().isEmpty()) { + nlConfigId_ = other.nlConfigId_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + nlConfigId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object nlConfigId_ = ""; + + /** + * + * + *
            +           * Optional. AlloyDb AI NL config id, i.e. the value that was used for
            +           * calling `SELECT alloydb_ai_nl.g_create_configuration(...)`. Can be
            +           * empty.
            +           * 
            + * + * string nl_config_id = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The nlConfigId. + */ + public java.lang.String getNlConfigId() { + java.lang.Object ref = nlConfigId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nlConfigId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
            +           * Optional. AlloyDb AI NL config id, i.e. the value that was used for
            +           * calling `SELECT alloydb_ai_nl.g_create_configuration(...)`. Can be
            +           * empty.
            +           * 
            + * + * string nl_config_id = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for nlConfigId. + */ + public com.google.protobuf.ByteString getNlConfigIdBytes() { + java.lang.Object ref = nlConfigId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nlConfigId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
            +           * Optional. AlloyDb AI NL config id, i.e. the value that was used for
            +           * calling `SELECT alloydb_ai_nl.g_create_configuration(...)`. Can be
            +           * empty.
            +           * 
            + * + * string nl_config_id = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The nlConfigId to set. + * @return This builder for chaining. + */ + public Builder setNlConfigId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + nlConfigId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
            +           * Optional. AlloyDb AI NL config id, i.e. the value that was used for
            +           * calling `SELECT alloydb_ai_nl.g_create_configuration(...)`. Can be
            +           * empty.
            +           * 
            + * + * string nl_config_id = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearNlConfigId() { + nlConfigId_ = getDefaultInstance().getNlConfigId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
            +           * Optional. AlloyDb AI NL config id, i.e. the value that was used for
            +           * calling `SELECT alloydb_ai_nl.g_create_configuration(...)`. Can be
            +           * empty.
            +           * 
            + * + * string nl_config_id = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for nlConfigId to set. + * @return This builder for chaining. + */ + public Builder setNlConfigIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + nlConfigId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig.AlloyDbConfig.AlloyDbAiNaturalLanguageConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig.AlloyDbConfig.AlloyDbAiNaturalLanguageConfig) + private static final com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .AlloyDbConfig.AlloyDbAiNaturalLanguageConfig + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .AlloyDbConfig.AlloyDbAiNaturalLanguageConfig(); + } + + public static com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .AlloyDbConfig.AlloyDbAiNaturalLanguageConfig + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AlloyDbAiNaturalLanguageConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig.AlloyDbConfig + .AlloyDbAiNaturalLanguageConfig + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int bitField0_; + public static final int ALLOYDB_CONNECTION_CONFIG_FIELD_NUMBER = 1; + private com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig.AlloyDbConfig + .AlloyDbConnectionConfig + alloydbConnectionConfig_; + + /** + * + * + *
            +       * Required. Configuration for connecting to AlloyDB.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig.AlloyDbConfig.AlloyDbConnectionConfig alloydb_connection_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the alloydbConnectionConfig field is set. + */ + @java.lang.Override + public boolean hasAlloydbConnectionConfig() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
            +       * Required. Configuration for connecting to AlloyDB.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig.AlloyDbConfig.AlloyDbConnectionConfig alloydb_connection_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The alloydbConnectionConfig. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig.AlloyDbConfig + .AlloyDbConnectionConfig + getAlloydbConnectionConfig() { + return alloydbConnectionConfig_ == null + ? com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig.AlloyDbConfig + .AlloyDbConnectionConfig.getDefaultInstance() + : alloydbConnectionConfig_; + } + + /** + * + * + *
            +       * Required. Configuration for connecting to AlloyDB.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig.AlloyDbConfig.AlloyDbConnectionConfig alloydb_connection_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig.AlloyDbConfig + .AlloyDbConnectionConfigOrBuilder + getAlloydbConnectionConfigOrBuilder() { + return alloydbConnectionConfig_ == null + ? com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig.AlloyDbConfig + .AlloyDbConnectionConfig.getDefaultInstance() + : alloydbConnectionConfig_; + } + + public static final int ALLOYDB_AI_NL_CONFIG_FIELD_NUMBER = 2; + private com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig.AlloyDbConfig + .AlloyDbAiNaturalLanguageConfig + alloydbAiNlConfig_; + + /** + * + * + *
            +       * Optional. Configuration for Magic.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig.AlloyDbConfig.AlloyDbAiNaturalLanguageConfig alloydb_ai_nl_config = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the alloydbAiNlConfig field is set. + */ + @java.lang.Override + public boolean hasAlloydbAiNlConfig() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
            +       * Optional. Configuration for Magic.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig.AlloyDbConfig.AlloyDbAiNaturalLanguageConfig alloydb_ai_nl_config = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The alloydbAiNlConfig. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig.AlloyDbConfig + .AlloyDbAiNaturalLanguageConfig + getAlloydbAiNlConfig() { + return alloydbAiNlConfig_ == null + ? com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig.AlloyDbConfig + .AlloyDbAiNaturalLanguageConfig.getDefaultInstance() + : alloydbAiNlConfig_; + } + + /** + * + * + *
            +       * Optional. Configuration for Magic.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig.AlloyDbConfig.AlloyDbAiNaturalLanguageConfig alloydb_ai_nl_config = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig.AlloyDbConfig + .AlloyDbAiNaturalLanguageConfigOrBuilder + getAlloydbAiNlConfigOrBuilder() { + return alloydbAiNlConfig_ == null + ? com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig.AlloyDbConfig + .AlloyDbAiNaturalLanguageConfig.getDefaultInstance() + : alloydbAiNlConfig_; + } + + public static final int RETURNED_FIELDS_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList returnedFields_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + /** + * + * + *
            +       * Optional. Fields to be returned in the search results. If empty, all
            +       * fields will be returned.
            +       * 
            + * + * repeated string returned_fields = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the returnedFields. + */ + public com.google.protobuf.ProtocolStringList getReturnedFieldsList() { + return returnedFields_; + } + + /** + * + * + *
            +       * Optional. Fields to be returned in the search results. If empty, all
            +       * fields will be returned.
            +       * 
            + * + * repeated string returned_fields = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of returnedFields. + */ + public int getReturnedFieldsCount() { + return returnedFields_.size(); + } + + /** + * + * + *
            +       * Optional. Fields to be returned in the search results. If empty, all
            +       * fields will be returned.
            +       * 
            + * + * repeated string returned_fields = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The returnedFields at the given index. + */ + public java.lang.String getReturnedFields(int index) { + return returnedFields_.get(index); + } + + /** + * + * + *
            +       * Optional. Fields to be returned in the search results. If empty, all
            +       * fields will be returned.
            +       * 
            + * + * repeated string returned_fields = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the returnedFields at the given index. + */ + public com.google.protobuf.ByteString getReturnedFieldsBytes(int index) { + return returnedFields_.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, getAlloydbConnectionConfig()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(2, getAlloydbAiNlConfig()); + } + for (int i = 0; i < returnedFields_.size(); i++) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, returnedFields_.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, getAlloydbConnectionConfig()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(2, getAlloydbAiNlConfig()); + } + { + int dataSize = 0; + for (int i = 0; i < returnedFields_.size(); i++) { + dataSize += computeStringSizeNoTag(returnedFields_.getRaw(i)); + } + size += dataSize; + size += 1 * getReturnedFieldsList().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.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .AlloyDbConfig)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig.AlloyDbConfig + other = + (com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .AlloyDbConfig) + obj; + + if (hasAlloydbConnectionConfig() != other.hasAlloydbConnectionConfig()) return false; + if (hasAlloydbConnectionConfig()) { + if (!getAlloydbConnectionConfig().equals(other.getAlloydbConnectionConfig())) + return false; + } + if (hasAlloydbAiNlConfig() != other.hasAlloydbAiNlConfig()) return false; + if (hasAlloydbAiNlConfig()) { + if (!getAlloydbAiNlConfig().equals(other.getAlloydbAiNlConfig())) return false; + } + if (!getReturnedFieldsList().equals(other.getReturnedFieldsList())) 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 (hasAlloydbConnectionConfig()) { + hash = (37 * hash) + ALLOYDB_CONNECTION_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getAlloydbConnectionConfig().hashCode(); + } + if (hasAlloydbAiNlConfig()) { + hash = (37 * hash) + ALLOYDB_AI_NL_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getAlloydbAiNlConfig().hashCode(); + } + if (getReturnedFieldsCount() > 0) { + hash = (37 * hash) + RETURNED_FIELDS_FIELD_NUMBER; + hash = (53 * hash) + getReturnedFieldsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .AlloyDbConfig + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .AlloyDbConfig + 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.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .AlloyDbConfig + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .AlloyDbConfig + 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.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .AlloyDbConfig + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .AlloyDbConfig + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .AlloyDbConfig + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .AlloyDbConfig + 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.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .AlloyDbConfig + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .AlloyDbConfig + 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.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .AlloyDbConfig + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .AlloyDbConfig + 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.discoveryengine.v1beta.DataStore.FederatedSearchConfig.AlloyDbConfig + 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; + } + + /** + * + * + *
            +       * Stores information for connecting to AlloyDB.
            +       * 
            + * + * Protobuf type {@code + * google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig.AlloyDbConfig} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig.AlloyDbConfig) + com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .AlloyDbConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.DataStoreProto + .internal_static_google_cloud_discoveryengine_v1beta_DataStore_FederatedSearchConfig_AlloyDbConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.DataStoreProto + .internal_static_google_cloud_discoveryengine_v1beta_DataStore_FederatedSearchConfig_AlloyDbConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .AlloyDbConfig.class, + com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .AlloyDbConfig.Builder.class); + } + + // Construct using + // com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig.AlloyDbConfig.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetAlloydbConnectionConfigFieldBuilder(); + internalGetAlloydbAiNlConfigFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + alloydbConnectionConfig_ = null; + if (alloydbConnectionConfigBuilder_ != null) { + alloydbConnectionConfigBuilder_.dispose(); + alloydbConnectionConfigBuilder_ = null; + } + alloydbAiNlConfig_ = null; + if (alloydbAiNlConfigBuilder_ != null) { + alloydbAiNlConfigBuilder_.dispose(); + alloydbAiNlConfigBuilder_ = null; + } + returnedFields_ = com.google.protobuf.LazyStringArrayList.emptyList(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1beta.DataStoreProto + .internal_static_google_cloud_discoveryengine_v1beta_DataStore_FederatedSearchConfig_AlloyDbConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig.AlloyDbConfig + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .AlloyDbConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig.AlloyDbConfig + build() { + com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig.AlloyDbConfig + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig.AlloyDbConfig + buildPartial() { + com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig.AlloyDbConfig + result = + new com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .AlloyDbConfig(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig.AlloyDbConfig + result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.alloydbConnectionConfig_ = + alloydbConnectionConfigBuilder_ == null + ? alloydbConnectionConfig_ + : alloydbConnectionConfigBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.alloydbAiNlConfig_ = + alloydbAiNlConfigBuilder_ == null + ? alloydbAiNlConfig_ + : alloydbAiNlConfigBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + returnedFields_.makeImmutable(); + result.returnedFields_ = returnedFields_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .AlloyDbConfig) { + return mergeFrom( + (com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .AlloyDbConfig) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig.AlloyDbConfig + other) { + if (other + == com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .AlloyDbConfig.getDefaultInstance()) return this; + if (other.hasAlloydbConnectionConfig()) { + mergeAlloydbConnectionConfig(other.getAlloydbConnectionConfig()); + } + if (other.hasAlloydbAiNlConfig()) { + mergeAlloydbAiNlConfig(other.getAlloydbAiNlConfig()); + } + if (!other.returnedFields_.isEmpty()) { + if (returnedFields_.isEmpty()) { + returnedFields_ = other.returnedFields_; + bitField0_ |= 0x00000004; + } else { + ensureReturnedFieldsIsMutable(); + returnedFields_.addAll(other.returnedFields_); + } + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage( + internalGetAlloydbConnectionConfigFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage( + internalGetAlloydbAiNlConfigFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureReturnedFieldsIsMutable(); + returnedFields_.add(s); + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .AlloyDbConfig.AlloyDbConnectionConfig + alloydbConnectionConfig_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .AlloyDbConfig.AlloyDbConnectionConfig, + com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .AlloyDbConfig.AlloyDbConnectionConfig.Builder, + com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .AlloyDbConfig.AlloyDbConnectionConfigOrBuilder> + alloydbConnectionConfigBuilder_; + + /** + * + * + *
            +         * Required. Configuration for connecting to AlloyDB.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig.AlloyDbConfig.AlloyDbConnectionConfig alloydb_connection_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the alloydbConnectionConfig field is set. + */ + public boolean hasAlloydbConnectionConfig() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
            +         * Required. Configuration for connecting to AlloyDB.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig.AlloyDbConfig.AlloyDbConnectionConfig alloydb_connection_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The alloydbConnectionConfig. + */ + public com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig.AlloyDbConfig + .AlloyDbConnectionConfig + getAlloydbConnectionConfig() { + if (alloydbConnectionConfigBuilder_ == null) { + return alloydbConnectionConfig_ == null + ? com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .AlloyDbConfig.AlloyDbConnectionConfig.getDefaultInstance() + : alloydbConnectionConfig_; + } else { + return alloydbConnectionConfigBuilder_.getMessage(); + } + } + + /** + * + * + *
            +         * Required. Configuration for connecting to AlloyDB.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig.AlloyDbConfig.AlloyDbConnectionConfig alloydb_connection_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setAlloydbConnectionConfig( + com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig.AlloyDbConfig + .AlloyDbConnectionConfig + value) { + if (alloydbConnectionConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + alloydbConnectionConfig_ = value; + } else { + alloydbConnectionConfigBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
            +         * Required. Configuration for connecting to AlloyDB.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig.AlloyDbConfig.AlloyDbConnectionConfig alloydb_connection_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setAlloydbConnectionConfig( + com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig.AlloyDbConfig + .AlloyDbConnectionConfig.Builder + builderForValue) { + if (alloydbConnectionConfigBuilder_ == null) { + alloydbConnectionConfig_ = builderForValue.build(); + } else { + alloydbConnectionConfigBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
            +         * Required. Configuration for connecting to AlloyDB.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig.AlloyDbConfig.AlloyDbConnectionConfig alloydb_connection_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeAlloydbConnectionConfig( + com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig.AlloyDbConfig + .AlloyDbConnectionConfig + value) { + if (alloydbConnectionConfigBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && alloydbConnectionConfig_ != null + && alloydbConnectionConfig_ + != com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .AlloyDbConfig.AlloyDbConnectionConfig.getDefaultInstance()) { + getAlloydbConnectionConfigBuilder().mergeFrom(value); + } else { + alloydbConnectionConfig_ = value; + } + } else { + alloydbConnectionConfigBuilder_.mergeFrom(value); + } + if (alloydbConnectionConfig_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + + /** + * + * + *
            +         * Required. Configuration for connecting to AlloyDB.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig.AlloyDbConfig.AlloyDbConnectionConfig alloydb_connection_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearAlloydbConnectionConfig() { + bitField0_ = (bitField0_ & ~0x00000001); + alloydbConnectionConfig_ = null; + if (alloydbConnectionConfigBuilder_ != null) { + alloydbConnectionConfigBuilder_.dispose(); + alloydbConnectionConfigBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
            +         * Required. Configuration for connecting to AlloyDB.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig.AlloyDbConfig.AlloyDbConnectionConfig alloydb_connection_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig.AlloyDbConfig + .AlloyDbConnectionConfig.Builder + getAlloydbConnectionConfigBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return internalGetAlloydbConnectionConfigFieldBuilder().getBuilder(); + } + + /** + * + * + *
            +         * Required. Configuration for connecting to AlloyDB.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig.AlloyDbConfig.AlloyDbConnectionConfig alloydb_connection_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig.AlloyDbConfig + .AlloyDbConnectionConfigOrBuilder + getAlloydbConnectionConfigOrBuilder() { + if (alloydbConnectionConfigBuilder_ != null) { + return alloydbConnectionConfigBuilder_.getMessageOrBuilder(); + } else { + return alloydbConnectionConfig_ == null + ? com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .AlloyDbConfig.AlloyDbConnectionConfig.getDefaultInstance() + : alloydbConnectionConfig_; + } + } + + /** + * + * + *
            +         * Required. Configuration for connecting to AlloyDB.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig.AlloyDbConfig.AlloyDbConnectionConfig alloydb_connection_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .AlloyDbConfig.AlloyDbConnectionConfig, + com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .AlloyDbConfig.AlloyDbConnectionConfig.Builder, + com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .AlloyDbConfig.AlloyDbConnectionConfigOrBuilder> + internalGetAlloydbConnectionConfigFieldBuilder() { + if (alloydbConnectionConfigBuilder_ == null) { + alloydbConnectionConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .AlloyDbConfig.AlloyDbConnectionConfig, + com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .AlloyDbConfig.AlloyDbConnectionConfig.Builder, + com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .AlloyDbConfig.AlloyDbConnectionConfigOrBuilder>( + getAlloydbConnectionConfig(), getParentForChildren(), isClean()); + alloydbConnectionConfig_ = null; + } + return alloydbConnectionConfigBuilder_; + } + + private com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .AlloyDbConfig.AlloyDbAiNaturalLanguageConfig + alloydbAiNlConfig_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .AlloyDbConfig.AlloyDbAiNaturalLanguageConfig, + com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .AlloyDbConfig.AlloyDbAiNaturalLanguageConfig.Builder, + com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .AlloyDbConfig.AlloyDbAiNaturalLanguageConfigOrBuilder> + alloydbAiNlConfigBuilder_; + + /** + * + * + *
            +         * Optional. Configuration for Magic.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig.AlloyDbConfig.AlloyDbAiNaturalLanguageConfig alloydb_ai_nl_config = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the alloydbAiNlConfig field is set. + */ + public boolean hasAlloydbAiNlConfig() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
            +         * Optional. Configuration for Magic.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig.AlloyDbConfig.AlloyDbAiNaturalLanguageConfig alloydb_ai_nl_config = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The alloydbAiNlConfig. + */ + public com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig.AlloyDbConfig + .AlloyDbAiNaturalLanguageConfig + getAlloydbAiNlConfig() { + if (alloydbAiNlConfigBuilder_ == null) { + return alloydbAiNlConfig_ == null + ? com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .AlloyDbConfig.AlloyDbAiNaturalLanguageConfig.getDefaultInstance() + : alloydbAiNlConfig_; + } else { + return alloydbAiNlConfigBuilder_.getMessage(); + } + } + + /** + * + * + *
            +         * Optional. Configuration for Magic.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig.AlloyDbConfig.AlloyDbAiNaturalLanguageConfig alloydb_ai_nl_config = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setAlloydbAiNlConfig( + com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig.AlloyDbConfig + .AlloyDbAiNaturalLanguageConfig + value) { + if (alloydbAiNlConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + alloydbAiNlConfig_ = value; + } else { + alloydbAiNlConfigBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
            +         * Optional. Configuration for Magic.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig.AlloyDbConfig.AlloyDbAiNaturalLanguageConfig alloydb_ai_nl_config = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setAlloydbAiNlConfig( + com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig.AlloyDbConfig + .AlloyDbAiNaturalLanguageConfig.Builder + builderForValue) { + if (alloydbAiNlConfigBuilder_ == null) { + alloydbAiNlConfig_ = builderForValue.build(); + } else { + alloydbAiNlConfigBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
            +         * Optional. Configuration for Magic.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig.AlloyDbConfig.AlloyDbAiNaturalLanguageConfig alloydb_ai_nl_config = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeAlloydbAiNlConfig( + com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig.AlloyDbConfig + .AlloyDbAiNaturalLanguageConfig + value) { + if (alloydbAiNlConfigBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && alloydbAiNlConfig_ != null + && alloydbAiNlConfig_ + != com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .AlloyDbConfig.AlloyDbAiNaturalLanguageConfig.getDefaultInstance()) { + getAlloydbAiNlConfigBuilder().mergeFrom(value); + } else { + alloydbAiNlConfig_ = value; + } + } else { + alloydbAiNlConfigBuilder_.mergeFrom(value); + } + if (alloydbAiNlConfig_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** + * + * + *
            +         * Optional. Configuration for Magic.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig.AlloyDbConfig.AlloyDbAiNaturalLanguageConfig alloydb_ai_nl_config = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearAlloydbAiNlConfig() { + bitField0_ = (bitField0_ & ~0x00000002); + alloydbAiNlConfig_ = null; + if (alloydbAiNlConfigBuilder_ != null) { + alloydbAiNlConfigBuilder_.dispose(); + alloydbAiNlConfigBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
            +         * Optional. Configuration for Magic.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig.AlloyDbConfig.AlloyDbAiNaturalLanguageConfig alloydb_ai_nl_config = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig.AlloyDbConfig + .AlloyDbAiNaturalLanguageConfig.Builder + getAlloydbAiNlConfigBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return internalGetAlloydbAiNlConfigFieldBuilder().getBuilder(); + } + + /** + * + * + *
            +         * Optional. Configuration for Magic.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig.AlloyDbConfig.AlloyDbAiNaturalLanguageConfig alloydb_ai_nl_config = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig.AlloyDbConfig + .AlloyDbAiNaturalLanguageConfigOrBuilder + getAlloydbAiNlConfigOrBuilder() { + if (alloydbAiNlConfigBuilder_ != null) { + return alloydbAiNlConfigBuilder_.getMessageOrBuilder(); + } else { + return alloydbAiNlConfig_ == null + ? com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .AlloyDbConfig.AlloyDbAiNaturalLanguageConfig.getDefaultInstance() + : alloydbAiNlConfig_; + } + } + + /** + * + * + *
            +         * Optional. Configuration for Magic.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig.AlloyDbConfig.AlloyDbAiNaturalLanguageConfig alloydb_ai_nl_config = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .AlloyDbConfig.AlloyDbAiNaturalLanguageConfig, + com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .AlloyDbConfig.AlloyDbAiNaturalLanguageConfig.Builder, + com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .AlloyDbConfig.AlloyDbAiNaturalLanguageConfigOrBuilder> + internalGetAlloydbAiNlConfigFieldBuilder() { + if (alloydbAiNlConfigBuilder_ == null) { + alloydbAiNlConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .AlloyDbConfig.AlloyDbAiNaturalLanguageConfig, + com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .AlloyDbConfig.AlloyDbAiNaturalLanguageConfig.Builder, + com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .AlloyDbConfig.AlloyDbAiNaturalLanguageConfigOrBuilder>( + getAlloydbAiNlConfig(), getParentForChildren(), isClean()); + alloydbAiNlConfig_ = null; + } + return alloydbAiNlConfigBuilder_; + } + + private com.google.protobuf.LazyStringArrayList returnedFields_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureReturnedFieldsIsMutable() { + if (!returnedFields_.isModifiable()) { + returnedFields_ = new com.google.protobuf.LazyStringArrayList(returnedFields_); + } + bitField0_ |= 0x00000004; + } + + /** + * + * + *
            +         * Optional. Fields to be returned in the search results. If empty, all
            +         * fields will be returned.
            +         * 
            + * + * repeated string returned_fields = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the returnedFields. + */ + public com.google.protobuf.ProtocolStringList getReturnedFieldsList() { + returnedFields_.makeImmutable(); + return returnedFields_; + } + + /** + * + * + *
            +         * Optional. Fields to be returned in the search results. If empty, all
            +         * fields will be returned.
            +         * 
            + * + * repeated string returned_fields = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The count of returnedFields. + */ + public int getReturnedFieldsCount() { + return returnedFields_.size(); + } + + /** + * + * + *
            +         * Optional. Fields to be returned in the search results. If empty, all
            +         * fields will be returned.
            +         * 
            + * + * repeated string returned_fields = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the element to return. + * @return The returnedFields at the given index. + */ + public java.lang.String getReturnedFields(int index) { + return returnedFields_.get(index); + } + + /** + * + * + *
            +         * Optional. Fields to be returned in the search results. If empty, all
            +         * fields will be returned.
            +         * 
            + * + * repeated string returned_fields = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the value to return. + * @return The bytes of the returnedFields at the given index. + */ + public com.google.protobuf.ByteString getReturnedFieldsBytes(int index) { + return returnedFields_.getByteString(index); + } + + /** + * + * + *
            +         * Optional. Fields to be returned in the search results. If empty, all
            +         * fields will be returned.
            +         * 
            + * + * repeated string returned_fields = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index to set the value at. + * @param value The returnedFields to set. + * @return This builder for chaining. + */ + public Builder setReturnedFields(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureReturnedFieldsIsMutable(); + returnedFields_.set(index, value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
            +         * Optional. Fields to be returned in the search results. If empty, all
            +         * fields will be returned.
            +         * 
            + * + * repeated string returned_fields = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The returnedFields to add. + * @return This builder for chaining. + */ + public Builder addReturnedFields(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureReturnedFieldsIsMutable(); + returnedFields_.add(value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
            +         * Optional. Fields to be returned in the search results. If empty, all
            +         * fields will be returned.
            +         * 
            + * + * repeated string returned_fields = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param values The returnedFields to add. + * @return This builder for chaining. + */ + public Builder addAllReturnedFields(java.lang.Iterable values) { + ensureReturnedFieldsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, returnedFields_); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
            +         * Optional. Fields to be returned in the search results. If empty, all
            +         * fields will be returned.
            +         * 
            + * + * repeated string returned_fields = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearReturnedFields() { + returnedFields_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + ; + onChanged(); + return this; + } + + /** + * + * + *
            +         * Optional. Fields to be returned in the search results. If empty, all
            +         * fields will be returned.
            +         * 
            + * + * repeated string returned_fields = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The bytes of the returnedFields to add. + * @return This builder for chaining. + */ + public Builder addReturnedFieldsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureReturnedFieldsIsMutable(); + returnedFields_.add(value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig.AlloyDbConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig.AlloyDbConfig) + private static final com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .AlloyDbConfig + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .AlloyDbConfig(); + } + + public static com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .AlloyDbConfig + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AlloyDbConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig.AlloyDbConfig + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface ThirdPartyOauthConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig.ThirdPartyOauthConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
            +       * Optional. The type of the application. E.g., "jira", "box", etc.
            +       * 
            + * + * string app_name = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The appName. + */ + java.lang.String getAppName(); + + /** + * + * + *
            +       * Optional. The type of the application. E.g., "jira", "box", etc.
            +       * 
            + * + * string app_name = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for appName. + */ + com.google.protobuf.ByteString getAppNameBytes(); + + /** + * + * + *
            +       * Optional. The instance name identifying the 3P app, e.g.,
            +       * "vaissptbots-my". This is different from the instance_uri which is the
            +       * full URL of the 3P app e.g., "https://vaissptbots-my.sharepoint.com".
            +       * 
            + * + * string instance_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The instanceName. + */ + java.lang.String getInstanceName(); + + /** + * + * + *
            +       * Optional. The instance name identifying the 3P app, e.g.,
            +       * "vaissptbots-my". This is different from the instance_uri which is the
            +       * full URL of the 3P app e.g., "https://vaissptbots-my.sharepoint.com".
            +       * 
            + * + * string instance_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for instanceName. + */ + com.google.protobuf.ByteString getInstanceNameBytes(); + } + + /** + * + * + *
            +     * Stores information for third party applicationOAuth.
            +     * 
            + * + * Protobuf type {@code + * google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig.ThirdPartyOauthConfig} + */ + public static final class ThirdPartyOauthConfig extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig.ThirdPartyOauthConfig) + ThirdPartyOauthConfigOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ThirdPartyOauthConfig"); + } + + // Use ThirdPartyOauthConfig.newBuilder() to construct. + private ThirdPartyOauthConfig(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ThirdPartyOauthConfig() { + appName_ = ""; + instanceName_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.DataStoreProto + .internal_static_google_cloud_discoveryengine_v1beta_DataStore_FederatedSearchConfig_ThirdPartyOauthConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.DataStoreProto + .internal_static_google_cloud_discoveryengine_v1beta_DataStore_FederatedSearchConfig_ThirdPartyOauthConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .ThirdPartyOauthConfig.class, + com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .ThirdPartyOauthConfig.Builder.class); + } + + public static final int APP_NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object appName_ = ""; + + /** + * + * + *
            +       * Optional. The type of the application. E.g., "jira", "box", etc.
            +       * 
            + * + * string app_name = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The appName. + */ + @java.lang.Override + public java.lang.String getAppName() { + java.lang.Object ref = appName_; + 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(); + appName_ = s; + return s; + } + } + + /** + * + * + *
            +       * Optional. The type of the application. E.g., "jira", "box", etc.
            +       * 
            + * + * string app_name = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for appName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getAppNameBytes() { + java.lang.Object ref = appName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + appName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int INSTANCE_NAME_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object instanceName_ = ""; + + /** + * + * + *
            +       * Optional. The instance name identifying the 3P app, e.g.,
            +       * "vaissptbots-my". This is different from the instance_uri which is the
            +       * full URL of the 3P app e.g., "https://vaissptbots-my.sharepoint.com".
            +       * 
            + * + * string instance_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The instanceName. + */ + @java.lang.Override + public java.lang.String getInstanceName() { + java.lang.Object ref = instanceName_; + 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(); + instanceName_ = s; + return s; + } + } + + /** + * + * + *
            +       * Optional. The instance name identifying the 3P app, e.g.,
            +       * "vaissptbots-my". This is different from the instance_uri which is the
            +       * full URL of the 3P app e.g., "https://vaissptbots-my.sharepoint.com".
            +       * 
            + * + * string instance_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for instanceName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getInstanceNameBytes() { + java.lang.Object ref = instanceName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + instanceName_ = 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 { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(appName_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, appName_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(instanceName_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, instanceName_); + } + 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(appName_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, appName_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(instanceName_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, instanceName_); + } + 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.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .ThirdPartyOauthConfig)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .ThirdPartyOauthConfig + other = + (com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .ThirdPartyOauthConfig) + obj; + + if (!getAppName().equals(other.getAppName())) return false; + if (!getInstanceName().equals(other.getInstanceName())) 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) + APP_NAME_FIELD_NUMBER; + hash = (53 * hash) + getAppName().hashCode(); + hash = (37 * hash) + INSTANCE_NAME_FIELD_NUMBER; + hash = (53 * hash) + getInstanceName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .ThirdPartyOauthConfig + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .ThirdPartyOauthConfig + 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.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .ThirdPartyOauthConfig + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .ThirdPartyOauthConfig + 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.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .ThirdPartyOauthConfig + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .ThirdPartyOauthConfig + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .ThirdPartyOauthConfig + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .ThirdPartyOauthConfig + 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.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .ThirdPartyOauthConfig + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .ThirdPartyOauthConfig + 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.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .ThirdPartyOauthConfig + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .ThirdPartyOauthConfig + 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.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .ThirdPartyOauthConfig + 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; + } + + /** + * + * + *
            +       * Stores information for third party applicationOAuth.
            +       * 
            + * + * Protobuf type {@code + * google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig.ThirdPartyOauthConfig} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig.ThirdPartyOauthConfig) + com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .ThirdPartyOauthConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.DataStoreProto + .internal_static_google_cloud_discoveryengine_v1beta_DataStore_FederatedSearchConfig_ThirdPartyOauthConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.DataStoreProto + .internal_static_google_cloud_discoveryengine_v1beta_DataStore_FederatedSearchConfig_ThirdPartyOauthConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .ThirdPartyOauthConfig.class, + com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .ThirdPartyOauthConfig.Builder.class); + } + + // Construct using + // com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig.ThirdPartyOauthConfig.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + appName_ = ""; + instanceName_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1beta.DataStoreProto + .internal_static_google_cloud_discoveryengine_v1beta_DataStore_FederatedSearchConfig_ThirdPartyOauthConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .ThirdPartyOauthConfig + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .ThirdPartyOauthConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .ThirdPartyOauthConfig + build() { + com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .ThirdPartyOauthConfig + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .ThirdPartyOauthConfig + buildPartial() { + com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .ThirdPartyOauthConfig + result = + new com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .ThirdPartyOauthConfig(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .ThirdPartyOauthConfig + result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.appName_ = appName_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.instanceName_ = instanceName_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .ThirdPartyOauthConfig) { + return mergeFrom( + (com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .ThirdPartyOauthConfig) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .ThirdPartyOauthConfig + other) { + if (other + == com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .ThirdPartyOauthConfig.getDefaultInstance()) return this; + if (!other.getAppName().isEmpty()) { + appName_ = other.appName_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getInstanceName().isEmpty()) { + instanceName_ = other.instanceName_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + appName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + instanceName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object appName_ = ""; + + /** + * + * + *
            +         * Optional. The type of the application. E.g., "jira", "box", etc.
            +         * 
            + * + * string app_name = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The appName. + */ + public java.lang.String getAppName() { + java.lang.Object ref = appName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + appName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
            +         * Optional. The type of the application. E.g., "jira", "box", etc.
            +         * 
            + * + * string app_name = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for appName. + */ + public com.google.protobuf.ByteString getAppNameBytes() { + java.lang.Object ref = appName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + appName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
            +         * Optional. The type of the application. E.g., "jira", "box", etc.
            +         * 
            + * + * string app_name = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The appName to set. + * @return This builder for chaining. + */ + public Builder setAppName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + appName_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
            +         * Optional. The type of the application. E.g., "jira", "box", etc.
            +         * 
            + * + * string app_name = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearAppName() { + appName_ = getDefaultInstance().getAppName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
            +         * Optional. The type of the application. E.g., "jira", "box", etc.
            +         * 
            + * + * string app_name = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for appName to set. + * @return This builder for chaining. + */ + public Builder setAppNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + appName_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object instanceName_ = ""; + + /** + * + * + *
            +         * Optional. The instance name identifying the 3P app, e.g.,
            +         * "vaissptbots-my". This is different from the instance_uri which is the
            +         * full URL of the 3P app e.g., "https://vaissptbots-my.sharepoint.com".
            +         * 
            + * + * string instance_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The instanceName. + */ + public java.lang.String getInstanceName() { + java.lang.Object ref = instanceName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + instanceName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
            +         * Optional. The instance name identifying the 3P app, e.g.,
            +         * "vaissptbots-my". This is different from the instance_uri which is the
            +         * full URL of the 3P app e.g., "https://vaissptbots-my.sharepoint.com".
            +         * 
            + * + * string instance_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for instanceName. + */ + public com.google.protobuf.ByteString getInstanceNameBytes() { + java.lang.Object ref = instanceName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + instanceName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
            +         * Optional. The instance name identifying the 3P app, e.g.,
            +         * "vaissptbots-my". This is different from the instance_uri which is the
            +         * full URL of the 3P app e.g., "https://vaissptbots-my.sharepoint.com".
            +         * 
            + * + * string instance_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The instanceName to set. + * @return This builder for chaining. + */ + public Builder setInstanceName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + instanceName_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
            +         * Optional. The instance name identifying the 3P app, e.g.,
            +         * "vaissptbots-my". This is different from the instance_uri which is the
            +         * full URL of the 3P app e.g., "https://vaissptbots-my.sharepoint.com".
            +         * 
            + * + * string instance_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearInstanceName() { + instanceName_ = getDefaultInstance().getInstanceName(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
            +         * Optional. The instance name identifying the 3P app, e.g.,
            +         * "vaissptbots-my". This is different from the instance_uri which is the
            +         * full URL of the 3P app e.g., "https://vaissptbots-my.sharepoint.com".
            +         * 
            + * + * string instance_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for instanceName to set. + * @return This builder for chaining. + */ + public Builder setInstanceNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + instanceName_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig.ThirdPartyOauthConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig.ThirdPartyOauthConfig) + private static final com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .ThirdPartyOauthConfig + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .ThirdPartyOauthConfig(); + } + + public static com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .ThirdPartyOauthConfig + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ThirdPartyOauthConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .ThirdPartyOauthConfig + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface NotebooklmConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig.NotebooklmConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
            +       * Required. Search config name.
            +       *
            +       * Format: projects/*/locations/global/notebookLmSearchConfigs/*
            +       * 
            + * + * string search_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The searchConfig. + */ + java.lang.String getSearchConfig(); + + /** + * + * + *
            +       * Required. Search config name.
            +       *
            +       * Format: projects/*/locations/global/notebookLmSearchConfigs/*
            +       * 
            + * + * string search_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for searchConfig. + */ + com.google.protobuf.ByteString getSearchConfigBytes(); + } + + /** + * + * + *
            +     * Config for connecting to NotebookLM Enterprise.
            +     * 
            + * + * Protobuf type {@code + * google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig.NotebooklmConfig} + */ + public static final class NotebooklmConfig extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig.NotebooklmConfig) + NotebooklmConfigOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "NotebooklmConfig"); + } + + // Use NotebooklmConfig.newBuilder() to construct. + private NotebooklmConfig(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private NotebooklmConfig() { + searchConfig_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.DataStoreProto + .internal_static_google_cloud_discoveryengine_v1beta_DataStore_FederatedSearchConfig_NotebooklmConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.DataStoreProto + .internal_static_google_cloud_discoveryengine_v1beta_DataStore_FederatedSearchConfig_NotebooklmConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .NotebooklmConfig.class, + com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .NotebooklmConfig.Builder.class); + } + + public static final int SEARCH_CONFIG_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object searchConfig_ = ""; + + /** + * + * + *
            +       * Required. Search config name.
            +       *
            +       * Format: projects/*/locations/global/notebookLmSearchConfigs/*
            +       * 
            + * + * string search_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The searchConfig. + */ + @java.lang.Override + public java.lang.String getSearchConfig() { + java.lang.Object ref = searchConfig_; + 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(); + searchConfig_ = s; + return s; + } + } + + /** + * + * + *
            +       * Required. Search config name.
            +       *
            +       * Format: projects/*/locations/global/notebookLmSearchConfigs/*
            +       * 
            + * + * string search_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for searchConfig. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSearchConfigBytes() { + java.lang.Object ref = searchConfig_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + searchConfig_ = 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 { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(searchConfig_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, searchConfig_); + } + 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(searchConfig_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, searchConfig_); + } + 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.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .NotebooklmConfig)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig.NotebooklmConfig + other = + (com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .NotebooklmConfig) + obj; + + if (!getSearchConfig().equals(other.getSearchConfig())) 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) + SEARCH_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getSearchConfig().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .NotebooklmConfig + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .NotebooklmConfig + 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.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .NotebooklmConfig + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .NotebooklmConfig + 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.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .NotebooklmConfig + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .NotebooklmConfig + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .NotebooklmConfig + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .NotebooklmConfig + 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.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .NotebooklmConfig + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .NotebooklmConfig + 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.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .NotebooklmConfig + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .NotebooklmConfig + 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.discoveryengine.v1beta.DataStore.FederatedSearchConfig.NotebooklmConfig + 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; + } + + /** + * + * + *
            +       * Config for connecting to NotebookLM Enterprise.
            +       * 
            + * + * Protobuf type {@code + * google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig.NotebooklmConfig} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig.NotebooklmConfig) + com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .NotebooklmConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.DataStoreProto + .internal_static_google_cloud_discoveryengine_v1beta_DataStore_FederatedSearchConfig_NotebooklmConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.DataStoreProto + .internal_static_google_cloud_discoveryengine_v1beta_DataStore_FederatedSearchConfig_NotebooklmConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .NotebooklmConfig.class, + com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .NotebooklmConfig.Builder.class); + } + + // Construct using + // com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig.NotebooklmConfig.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + searchConfig_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1beta.DataStoreProto + .internal_static_google_cloud_discoveryengine_v1beta_DataStore_FederatedSearchConfig_NotebooklmConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .NotebooklmConfig + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .NotebooklmConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .NotebooklmConfig + build() { + com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig.NotebooklmConfig + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .NotebooklmConfig + buildPartial() { + com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig.NotebooklmConfig + result = + new com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .NotebooklmConfig(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig.NotebooklmConfig + result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.searchConfig_ = searchConfig_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .NotebooklmConfig) { + return mergeFrom( + (com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .NotebooklmConfig) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig.NotebooklmConfig + other) { + if (other + == com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .NotebooklmConfig.getDefaultInstance()) return this; + if (!other.getSearchConfig().isEmpty()) { + searchConfig_ = other.searchConfig_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + searchConfig_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object searchConfig_ = ""; + + /** + * + * + *
            +         * Required. Search config name.
            +         *
            +         * Format: projects/*/locations/global/notebookLmSearchConfigs/*
            +         * 
            + * + * string search_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The searchConfig. + */ + public java.lang.String getSearchConfig() { + java.lang.Object ref = searchConfig_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + searchConfig_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
            +         * Required. Search config name.
            +         *
            +         * Format: projects/*/locations/global/notebookLmSearchConfigs/*
            +         * 
            + * + * string search_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for searchConfig. + */ + public com.google.protobuf.ByteString getSearchConfigBytes() { + java.lang.Object ref = searchConfig_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + searchConfig_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
            +         * Required. Search config name.
            +         *
            +         * Format: projects/*/locations/global/notebookLmSearchConfigs/*
            +         * 
            + * + * string search_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The searchConfig to set. + * @return This builder for chaining. + */ + public Builder setSearchConfig(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + searchConfig_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
            +         * Required. Search config name.
            +         *
            +         * Format: projects/*/locations/global/notebookLmSearchConfigs/*
            +         * 
            + * + * string search_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearSearchConfig() { + searchConfig_ = getDefaultInstance().getSearchConfig(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
            +         * Required. Search config name.
            +         *
            +         * Format: projects/*/locations/global/notebookLmSearchConfigs/*
            +         * 
            + * + * string search_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for searchConfig to set. + * @return This builder for chaining. + */ + public Builder setSearchConfigBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + searchConfig_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig.NotebooklmConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig.NotebooklmConfig) + private static final com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .NotebooklmConfig + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .NotebooklmConfig(); + } + + public static com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .NotebooklmConfig + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public NotebooklmConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .NotebooklmConfig + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int dataSourceConfigCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object dataSourceConfig_; + + public enum DataSourceConfigCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + ALLOY_DB_CONFIG(1), + THIRD_PARTY_OAUTH_CONFIG(2), + NOTEBOOKLM_CONFIG(3), + DATASOURCECONFIG_NOT_SET(0); + private final int value; + + private DataSourceConfigCase(int value) { + this.value = value; + } + + /** + * @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 DataSourceConfigCase valueOf(int value) { + return forNumber(value); + } + + public static DataSourceConfigCase forNumber(int value) { + switch (value) { + case 1: + return ALLOY_DB_CONFIG; + case 2: + return THIRD_PARTY_OAUTH_CONFIG; + case 3: + return NOTEBOOKLM_CONFIG; + case 0: + return DATASOURCECONFIG_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public DataSourceConfigCase getDataSourceConfigCase() { + return DataSourceConfigCase.forNumber(dataSourceConfigCase_); + } + + public static final int ALLOY_DB_CONFIG_FIELD_NUMBER = 1; + + /** + * + * + *
            +     * AlloyDB config. If set, this DataStore is connected to AlloyDB.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig.AlloyDbConfig alloy_db_config = 1; + * + * + * @return Whether the alloyDbConfig field is set. + */ + @java.lang.Override + public boolean hasAlloyDbConfig() { + return dataSourceConfigCase_ == 1; + } + + /** + * + * + *
            +     * AlloyDB config. If set, this DataStore is connected to AlloyDB.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig.AlloyDbConfig alloy_db_config = 1; + * + * + * @return The alloyDbConfig. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig.AlloyDbConfig + getAlloyDbConfig() { + if (dataSourceConfigCase_ == 1) { + return (com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .AlloyDbConfig) + dataSourceConfig_; + } + return com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig.AlloyDbConfig + .getDefaultInstance(); + } + + /** + * + * + *
            +     * AlloyDB config. If set, this DataStore is connected to AlloyDB.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig.AlloyDbConfig alloy_db_config = 1; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .AlloyDbConfigOrBuilder + getAlloyDbConfigOrBuilder() { + if (dataSourceConfigCase_ == 1) { + return (com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .AlloyDbConfig) + dataSourceConfig_; + } + return com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig.AlloyDbConfig + .getDefaultInstance(); + } + + public static final int THIRD_PARTY_OAUTH_CONFIG_FIELD_NUMBER = 2; + + /** + * + * + *
            +     * Third Party OAuth config. If set, this DataStore is connected to a
            +     * third party application.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig.ThirdPartyOauthConfig third_party_oauth_config = 2; + * + * + * @return Whether the thirdPartyOauthConfig field is set. + */ + @java.lang.Override + public boolean hasThirdPartyOauthConfig() { + return dataSourceConfigCase_ == 2; + } + + /** + * + * + *
            +     * Third Party OAuth config. If set, this DataStore is connected to a
            +     * third party application.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig.ThirdPartyOauthConfig third_party_oauth_config = 2; + * + * + * @return The thirdPartyOauthConfig. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .ThirdPartyOauthConfig + getThirdPartyOauthConfig() { + if (dataSourceConfigCase_ == 2) { + return (com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .ThirdPartyOauthConfig) + dataSourceConfig_; + } + return com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .ThirdPartyOauthConfig.getDefaultInstance(); + } + + /** + * + * + *
            +     * Third Party OAuth config. If set, this DataStore is connected to a
            +     * third party application.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig.ThirdPartyOauthConfig third_party_oauth_config = 2; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .ThirdPartyOauthConfigOrBuilder + getThirdPartyOauthConfigOrBuilder() { + if (dataSourceConfigCase_ == 2) { + return (com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .ThirdPartyOauthConfig) + dataSourceConfig_; + } + return com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .ThirdPartyOauthConfig.getDefaultInstance(); + } + + public static final int NOTEBOOKLM_CONFIG_FIELD_NUMBER = 3; + + /** + * + * + *
            +     * NotebookLM config. If set, this DataStore is connected to
            +     * NotebookLM Enterprise.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig.NotebooklmConfig notebooklm_config = 3; + * + * + * @return Whether the notebooklmConfig field is set. + */ + @java.lang.Override + public boolean hasNotebooklmConfig() { + return dataSourceConfigCase_ == 3; + } + + /** + * + * + *
            +     * NotebookLM config. If set, this DataStore is connected to
            +     * NotebookLM Enterprise.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig.NotebooklmConfig notebooklm_config = 3; + * + * + * @return The notebooklmConfig. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig.NotebooklmConfig + getNotebooklmConfig() { + if (dataSourceConfigCase_ == 3) { + return (com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .NotebooklmConfig) + dataSourceConfig_; + } + return com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .NotebooklmConfig.getDefaultInstance(); + } + + /** + * + * + *
            +     * NotebookLM config. If set, this DataStore is connected to
            +     * NotebookLM Enterprise.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig.NotebooklmConfig notebooklm_config = 3; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .NotebooklmConfigOrBuilder + getNotebooklmConfigOrBuilder() { + if (dataSourceConfigCase_ == 3) { + return (com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .NotebooklmConfig) + dataSourceConfig_; + } + return com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .NotebooklmConfig.getDefaultInstance(); + } + + 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 (dataSourceConfigCase_ == 1) { + output.writeMessage( + 1, + (com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig.AlloyDbConfig) + dataSourceConfig_); + } + if (dataSourceConfigCase_ == 2) { + output.writeMessage( + 2, + (com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .ThirdPartyOauthConfig) + dataSourceConfig_); + } + if (dataSourceConfigCase_ == 3) { + output.writeMessage( + 3, + (com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .NotebooklmConfig) + dataSourceConfig_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (dataSourceConfigCase_ == 1) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 1, + (com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .AlloyDbConfig) + dataSourceConfig_); + } + if (dataSourceConfigCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, + (com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .ThirdPartyOauthConfig) + dataSourceConfig_); + } + if (dataSourceConfigCase_ == 3) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 3, + (com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .NotebooklmConfig) + dataSourceConfig_); + } + 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.discoveryengine.v1beta.DataStore.FederatedSearchConfig)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig other = + (com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig) obj; + + if (!getDataSourceConfigCase().equals(other.getDataSourceConfigCase())) return false; + switch (dataSourceConfigCase_) { + case 1: + if (!getAlloyDbConfig().equals(other.getAlloyDbConfig())) return false; + break; + case 2: + if (!getThirdPartyOauthConfig().equals(other.getThirdPartyOauthConfig())) return false; + break; + case 3: + if (!getNotebooklmConfig().equals(other.getNotebooklmConfig())) return false; + break; + case 0: + default: + } + 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(); + switch (dataSourceConfigCase_) { + case 1: + hash = (37 * hash) + ALLOY_DB_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getAlloyDbConfig().hashCode(); + break; + case 2: + hash = (37 * hash) + THIRD_PARTY_OAUTH_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getThirdPartyOauthConfig().hashCode(); + break; + case 3: + hash = (37 * hash) + NOTEBOOKLM_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getNotebooklmConfig().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig 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.discoveryengine.v1beta.DataStore.FederatedSearchConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig 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.discoveryengine.v1beta.DataStore.FederatedSearchConfig parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig 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.discoveryengine.v1beta.DataStore.FederatedSearchConfig + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + 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.discoveryengine.v1beta.DataStore.FederatedSearchConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig 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.discoveryengine.v1beta.DataStore.FederatedSearchConfig 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; + } + + /** + * + * + *
            +     * Stores information for federated search.
            +     * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig) + com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.DataStoreProto + .internal_static_google_cloud_discoveryengine_v1beta_DataStore_FederatedSearchConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.DataStoreProto + .internal_static_google_cloud_discoveryengine_v1beta_DataStore_FederatedSearchConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig.class, + com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig.Builder + .class); + } + + // Construct using + // com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (alloyDbConfigBuilder_ != null) { + alloyDbConfigBuilder_.clear(); + } + if (thirdPartyOauthConfigBuilder_ != null) { + thirdPartyOauthConfigBuilder_.clear(); + } + if (notebooklmConfigBuilder_ != null) { + notebooklmConfigBuilder_.clear(); + } + dataSourceConfigCase_ = 0; + dataSourceConfig_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1beta.DataStoreProto + .internal_static_google_cloud_discoveryengine_v1beta_DataStore_FederatedSearchConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig build() { + com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + buildPartial() { + com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig result = + new com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig result) { + int from_bitField0_ = bitField0_; + } + + private void buildPartialOneofs( + com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig result) { + result.dataSourceConfigCase_ = dataSourceConfigCase_; + result.dataSourceConfig_ = this.dataSourceConfig_; + if (dataSourceConfigCase_ == 1 && alloyDbConfigBuilder_ != null) { + result.dataSourceConfig_ = alloyDbConfigBuilder_.build(); + } + if (dataSourceConfigCase_ == 2 && thirdPartyOauthConfigBuilder_ != null) { + result.dataSourceConfig_ = thirdPartyOauthConfigBuilder_.build(); + } + if (dataSourceConfigCase_ == 3 && notebooklmConfigBuilder_ != null) { + result.dataSourceConfig_ = notebooklmConfigBuilder_.build(); + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig) { + return mergeFrom( + (com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig other) { + if (other + == com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .getDefaultInstance()) return this; + switch (other.getDataSourceConfigCase()) { + case ALLOY_DB_CONFIG: + { + mergeAlloyDbConfig(other.getAlloyDbConfig()); + break; + } + case THIRD_PARTY_OAUTH_CONFIG: + { + mergeThirdPartyOauthConfig(other.getThirdPartyOauthConfig()); + break; + } + case NOTEBOOKLM_CONFIG: + { + mergeNotebooklmConfig(other.getNotebooklmConfig()); + break; + } + case DATASOURCECONFIG_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage( + internalGetAlloyDbConfigFieldBuilder().getBuilder(), extensionRegistry); + dataSourceConfigCase_ = 1; + break; + } // case 10 + case 18: + { + input.readMessage( + internalGetThirdPartyOauthConfigFieldBuilder().getBuilder(), + extensionRegistry); + dataSourceConfigCase_ = 2; + break; + } // case 18 + case 26: + { + input.readMessage( + internalGetNotebooklmConfigFieldBuilder().getBuilder(), extensionRegistry); + dataSourceConfigCase_ = 3; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int dataSourceConfigCase_ = 0; + private java.lang.Object dataSourceConfig_; + + public DataSourceConfigCase getDataSourceConfigCase() { + return DataSourceConfigCase.forNumber(dataSourceConfigCase_); + } + + public Builder clearDataSourceConfig() { + dataSourceConfigCase_ = 0; + dataSourceConfig_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig.AlloyDbConfig, + com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig.AlloyDbConfig + .Builder, + com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .AlloyDbConfigOrBuilder> + alloyDbConfigBuilder_; + + /** + * + * + *
            +       * AlloyDB config. If set, this DataStore is connected to AlloyDB.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig.AlloyDbConfig alloy_db_config = 1; + * + * + * @return Whether the alloyDbConfig field is set. + */ + @java.lang.Override + public boolean hasAlloyDbConfig() { + return dataSourceConfigCase_ == 1; + } + + /** + * + * + *
            +       * AlloyDB config. If set, this DataStore is connected to AlloyDB.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig.AlloyDbConfig alloy_db_config = 1; + * + * + * @return The alloyDbConfig. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig.AlloyDbConfig + getAlloyDbConfig() { + if (alloyDbConfigBuilder_ == null) { + if (dataSourceConfigCase_ == 1) { + return (com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .AlloyDbConfig) + dataSourceConfig_; + } + return com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .AlloyDbConfig.getDefaultInstance(); + } else { + if (dataSourceConfigCase_ == 1) { + return alloyDbConfigBuilder_.getMessage(); + } + return com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .AlloyDbConfig.getDefaultInstance(); + } + } + + /** + * + * + *
            +       * AlloyDB config. If set, this DataStore is connected to AlloyDB.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig.AlloyDbConfig alloy_db_config = 1; + * + */ + public Builder setAlloyDbConfig( + com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig.AlloyDbConfig + value) { + if (alloyDbConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + dataSourceConfig_ = value; + onChanged(); + } else { + alloyDbConfigBuilder_.setMessage(value); + } + dataSourceConfigCase_ = 1; + return this; + } + + /** + * + * + *
            +       * AlloyDB config. If set, this DataStore is connected to AlloyDB.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig.AlloyDbConfig alloy_db_config = 1; + * + */ + public Builder setAlloyDbConfig( + com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig.AlloyDbConfig + .Builder + builderForValue) { + if (alloyDbConfigBuilder_ == null) { + dataSourceConfig_ = builderForValue.build(); + onChanged(); + } else { + alloyDbConfigBuilder_.setMessage(builderForValue.build()); + } + dataSourceConfigCase_ = 1; + return this; + } + + /** + * + * + *
            +       * AlloyDB config. If set, this DataStore is connected to AlloyDB.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig.AlloyDbConfig alloy_db_config = 1; + * + */ + public Builder mergeAlloyDbConfig( + com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig.AlloyDbConfig + value) { + if (alloyDbConfigBuilder_ == null) { + if (dataSourceConfigCase_ == 1 + && dataSourceConfig_ + != com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .AlloyDbConfig.getDefaultInstance()) { + dataSourceConfig_ = + com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .AlloyDbConfig.newBuilder( + (com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .AlloyDbConfig) + dataSourceConfig_) + .mergeFrom(value) + .buildPartial(); + } else { + dataSourceConfig_ = value; + } + onChanged(); + } else { + if (dataSourceConfigCase_ == 1) { + alloyDbConfigBuilder_.mergeFrom(value); + } else { + alloyDbConfigBuilder_.setMessage(value); + } + } + dataSourceConfigCase_ = 1; + return this; + } + + /** + * + * + *
            +       * AlloyDB config. If set, this DataStore is connected to AlloyDB.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig.AlloyDbConfig alloy_db_config = 1; + * + */ + public Builder clearAlloyDbConfig() { + if (alloyDbConfigBuilder_ == null) { + if (dataSourceConfigCase_ == 1) { + dataSourceConfigCase_ = 0; + dataSourceConfig_ = null; + onChanged(); + } + } else { + if (dataSourceConfigCase_ == 1) { + dataSourceConfigCase_ = 0; + dataSourceConfig_ = null; + } + alloyDbConfigBuilder_.clear(); + } + return this; + } + + /** + * + * + *
            +       * AlloyDB config. If set, this DataStore is connected to AlloyDB.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig.AlloyDbConfig alloy_db_config = 1; + * + */ + public com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig.AlloyDbConfig + .Builder + getAlloyDbConfigBuilder() { + return internalGetAlloyDbConfigFieldBuilder().getBuilder(); + } + + /** + * + * + *
            +       * AlloyDB config. If set, this DataStore is connected to AlloyDB.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig.AlloyDbConfig alloy_db_config = 1; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .AlloyDbConfigOrBuilder + getAlloyDbConfigOrBuilder() { + if ((dataSourceConfigCase_ == 1) && (alloyDbConfigBuilder_ != null)) { + return alloyDbConfigBuilder_.getMessageOrBuilder(); + } else { + if (dataSourceConfigCase_ == 1) { + return (com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .AlloyDbConfig) + dataSourceConfig_; + } + return com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .AlloyDbConfig.getDefaultInstance(); + } + } + + /** + * + * + *
            +       * AlloyDB config. If set, this DataStore is connected to AlloyDB.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig.AlloyDbConfig alloy_db_config = 1; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig.AlloyDbConfig, + com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig.AlloyDbConfig + .Builder, + com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .AlloyDbConfigOrBuilder> + internalGetAlloyDbConfigFieldBuilder() { + if (alloyDbConfigBuilder_ == null) { + if (!(dataSourceConfigCase_ == 1)) { + dataSourceConfig_ = + com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .AlloyDbConfig.getDefaultInstance(); + } + alloyDbConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .AlloyDbConfig, + com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .AlloyDbConfig.Builder, + com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .AlloyDbConfigOrBuilder>( + (com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .AlloyDbConfig) + dataSourceConfig_, + getParentForChildren(), + isClean()); + dataSourceConfig_ = null; + } + dataSourceConfigCase_ = 1; + onChanged(); + return alloyDbConfigBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .ThirdPartyOauthConfig, + com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .ThirdPartyOauthConfig.Builder, + com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .ThirdPartyOauthConfigOrBuilder> + thirdPartyOauthConfigBuilder_; + + /** + * + * + *
            +       * Third Party OAuth config. If set, this DataStore is connected to a
            +       * third party application.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig.ThirdPartyOauthConfig third_party_oauth_config = 2; + * + * + * @return Whether the thirdPartyOauthConfig field is set. + */ + @java.lang.Override + public boolean hasThirdPartyOauthConfig() { + return dataSourceConfigCase_ == 2; + } + + /** + * + * + *
            +       * Third Party OAuth config. If set, this DataStore is connected to a
            +       * third party application.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig.ThirdPartyOauthConfig third_party_oauth_config = 2; + * + * + * @return The thirdPartyOauthConfig. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .ThirdPartyOauthConfig + getThirdPartyOauthConfig() { + if (thirdPartyOauthConfigBuilder_ == null) { + if (dataSourceConfigCase_ == 2) { + return (com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .ThirdPartyOauthConfig) + dataSourceConfig_; + } + return com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .ThirdPartyOauthConfig.getDefaultInstance(); + } else { + if (dataSourceConfigCase_ == 2) { + return thirdPartyOauthConfigBuilder_.getMessage(); + } + return com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .ThirdPartyOauthConfig.getDefaultInstance(); + } + } + + /** + * + * + *
            +       * Third Party OAuth config. If set, this DataStore is connected to a
            +       * third party application.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig.ThirdPartyOauthConfig third_party_oauth_config = 2; + * + */ + public Builder setThirdPartyOauthConfig( + com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .ThirdPartyOauthConfig + value) { + if (thirdPartyOauthConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + dataSourceConfig_ = value; + onChanged(); + } else { + thirdPartyOauthConfigBuilder_.setMessage(value); + } + dataSourceConfigCase_ = 2; + return this; + } + + /** + * + * + *
            +       * Third Party OAuth config. If set, this DataStore is connected to a
            +       * third party application.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig.ThirdPartyOauthConfig third_party_oauth_config = 2; + * + */ + public Builder setThirdPartyOauthConfig( + com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .ThirdPartyOauthConfig.Builder + builderForValue) { + if (thirdPartyOauthConfigBuilder_ == null) { + dataSourceConfig_ = builderForValue.build(); + onChanged(); + } else { + thirdPartyOauthConfigBuilder_.setMessage(builderForValue.build()); + } + dataSourceConfigCase_ = 2; + return this; + } + + /** + * + * + *
            +       * Third Party OAuth config. If set, this DataStore is connected to a
            +       * third party application.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig.ThirdPartyOauthConfig third_party_oauth_config = 2; + * + */ + public Builder mergeThirdPartyOauthConfig( + com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .ThirdPartyOauthConfig + value) { + if (thirdPartyOauthConfigBuilder_ == null) { + if (dataSourceConfigCase_ == 2 + && dataSourceConfig_ + != com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .ThirdPartyOauthConfig.getDefaultInstance()) { + dataSourceConfig_ = + com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .ThirdPartyOauthConfig.newBuilder( + (com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .ThirdPartyOauthConfig) + dataSourceConfig_) + .mergeFrom(value) + .buildPartial(); + } else { + dataSourceConfig_ = value; + } + onChanged(); + } else { + if (dataSourceConfigCase_ == 2) { + thirdPartyOauthConfigBuilder_.mergeFrom(value); + } else { + thirdPartyOauthConfigBuilder_.setMessage(value); + } + } + dataSourceConfigCase_ = 2; + return this; + } + + /** + * + * + *
            +       * Third Party OAuth config. If set, this DataStore is connected to a
            +       * third party application.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig.ThirdPartyOauthConfig third_party_oauth_config = 2; + * + */ + public Builder clearThirdPartyOauthConfig() { + if (thirdPartyOauthConfigBuilder_ == null) { + if (dataSourceConfigCase_ == 2) { + dataSourceConfigCase_ = 0; + dataSourceConfig_ = null; + onChanged(); + } + } else { + if (dataSourceConfigCase_ == 2) { + dataSourceConfigCase_ = 0; + dataSourceConfig_ = null; + } + thirdPartyOauthConfigBuilder_.clear(); + } + return this; + } + + /** + * + * + *
            +       * Third Party OAuth config. If set, this DataStore is connected to a
            +       * third party application.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig.ThirdPartyOauthConfig third_party_oauth_config = 2; + * + */ + public com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .ThirdPartyOauthConfig.Builder + getThirdPartyOauthConfigBuilder() { + return internalGetThirdPartyOauthConfigFieldBuilder().getBuilder(); + } + + /** + * + * + *
            +       * Third Party OAuth config. If set, this DataStore is connected to a
            +       * third party application.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig.ThirdPartyOauthConfig third_party_oauth_config = 2; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .ThirdPartyOauthConfigOrBuilder + getThirdPartyOauthConfigOrBuilder() { + if ((dataSourceConfigCase_ == 2) && (thirdPartyOauthConfigBuilder_ != null)) { + return thirdPartyOauthConfigBuilder_.getMessageOrBuilder(); + } else { + if (dataSourceConfigCase_ == 2) { + return (com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .ThirdPartyOauthConfig) + dataSourceConfig_; + } + return com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .ThirdPartyOauthConfig.getDefaultInstance(); + } + } + + /** + * + * + *
            +       * Third Party OAuth config. If set, this DataStore is connected to a
            +       * third party application.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig.ThirdPartyOauthConfig third_party_oauth_config = 2; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .ThirdPartyOauthConfig, + com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .ThirdPartyOauthConfig.Builder, + com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .ThirdPartyOauthConfigOrBuilder> + internalGetThirdPartyOauthConfigFieldBuilder() { + if (thirdPartyOauthConfigBuilder_ == null) { + if (!(dataSourceConfigCase_ == 2)) { + dataSourceConfig_ = + com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .ThirdPartyOauthConfig.getDefaultInstance(); + } + thirdPartyOauthConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .ThirdPartyOauthConfig, + com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .ThirdPartyOauthConfig.Builder, + com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .ThirdPartyOauthConfigOrBuilder>( + (com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .ThirdPartyOauthConfig) + dataSourceConfig_, + getParentForChildren(), + isClean()); + dataSourceConfig_ = null; + } + dataSourceConfigCase_ = 2; + onChanged(); + return thirdPartyOauthConfigBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .NotebooklmConfig, + com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .NotebooklmConfig.Builder, + com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .NotebooklmConfigOrBuilder> + notebooklmConfigBuilder_; + + /** + * + * + *
            +       * NotebookLM config. If set, this DataStore is connected to
            +       * NotebookLM Enterprise.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig.NotebooklmConfig notebooklm_config = 3; + * + * + * @return Whether the notebooklmConfig field is set. + */ + @java.lang.Override + public boolean hasNotebooklmConfig() { + return dataSourceConfigCase_ == 3; + } + + /** + * + * + *
            +       * NotebookLM config. If set, this DataStore is connected to
            +       * NotebookLM Enterprise.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig.NotebooklmConfig notebooklm_config = 3; + * + * + * @return The notebooklmConfig. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .NotebooklmConfig + getNotebooklmConfig() { + if (notebooklmConfigBuilder_ == null) { + if (dataSourceConfigCase_ == 3) { + return (com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .NotebooklmConfig) + dataSourceConfig_; + } + return com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .NotebooklmConfig.getDefaultInstance(); + } else { + if (dataSourceConfigCase_ == 3) { + return notebooklmConfigBuilder_.getMessage(); + } + return com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .NotebooklmConfig.getDefaultInstance(); + } + } + + /** + * + * + *
            +       * NotebookLM config. If set, this DataStore is connected to
            +       * NotebookLM Enterprise.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig.NotebooklmConfig notebooklm_config = 3; + * + */ + public Builder setNotebooklmConfig( + com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig.NotebooklmConfig + value) { + if (notebooklmConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + dataSourceConfig_ = value; + onChanged(); + } else { + notebooklmConfigBuilder_.setMessage(value); + } + dataSourceConfigCase_ = 3; + return this; + } + + /** + * + * + *
            +       * NotebookLM config. If set, this DataStore is connected to
            +       * NotebookLM Enterprise.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig.NotebooklmConfig notebooklm_config = 3; + * + */ + public Builder setNotebooklmConfig( + com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig.NotebooklmConfig + .Builder + builderForValue) { + if (notebooklmConfigBuilder_ == null) { + dataSourceConfig_ = builderForValue.build(); + onChanged(); + } else { + notebooklmConfigBuilder_.setMessage(builderForValue.build()); + } + dataSourceConfigCase_ = 3; + return this; + } + + /** + * + * + *
            +       * NotebookLM config. If set, this DataStore is connected to
            +       * NotebookLM Enterprise.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig.NotebooklmConfig notebooklm_config = 3; + * + */ + public Builder mergeNotebooklmConfig( + com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig.NotebooklmConfig + value) { + if (notebooklmConfigBuilder_ == null) { + if (dataSourceConfigCase_ == 3 + && dataSourceConfig_ + != com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .NotebooklmConfig.getDefaultInstance()) { + dataSourceConfig_ = + com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .NotebooklmConfig.newBuilder( + (com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .NotebooklmConfig) + dataSourceConfig_) + .mergeFrom(value) + .buildPartial(); + } else { + dataSourceConfig_ = value; + } + onChanged(); + } else { + if (dataSourceConfigCase_ == 3) { + notebooklmConfigBuilder_.mergeFrom(value); + } else { + notebooklmConfigBuilder_.setMessage(value); + } + } + dataSourceConfigCase_ = 3; + return this; + } + + /** + * + * + *
            +       * NotebookLM config. If set, this DataStore is connected to
            +       * NotebookLM Enterprise.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig.NotebooklmConfig notebooklm_config = 3; + * + */ + public Builder clearNotebooklmConfig() { + if (notebooklmConfigBuilder_ == null) { + if (dataSourceConfigCase_ == 3) { + dataSourceConfigCase_ = 0; + dataSourceConfig_ = null; + onChanged(); + } + } else { + if (dataSourceConfigCase_ == 3) { + dataSourceConfigCase_ = 0; + dataSourceConfig_ = null; + } + notebooklmConfigBuilder_.clear(); + } + return this; + } + + /** + * + * + *
            +       * NotebookLM config. If set, this DataStore is connected to
            +       * NotebookLM Enterprise.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig.NotebooklmConfig notebooklm_config = 3; + * + */ + public com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .NotebooklmConfig.Builder + getNotebooklmConfigBuilder() { + return internalGetNotebooklmConfigFieldBuilder().getBuilder(); + } + + /** + * + * + *
            +       * NotebookLM config. If set, this DataStore is connected to
            +       * NotebookLM Enterprise.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig.NotebooklmConfig notebooklm_config = 3; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .NotebooklmConfigOrBuilder + getNotebooklmConfigOrBuilder() { + if ((dataSourceConfigCase_ == 3) && (notebooklmConfigBuilder_ != null)) { + return notebooklmConfigBuilder_.getMessageOrBuilder(); + } else { + if (dataSourceConfigCase_ == 3) { + return (com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .NotebooklmConfig) + dataSourceConfig_; + } + return com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .NotebooklmConfig.getDefaultInstance(); + } + } + + /** + * + * + *
            +       * NotebookLM config. If set, this DataStore is connected to
            +       * NotebookLM Enterprise.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig.NotebooklmConfig notebooklm_config = 3; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .NotebooklmConfig, + com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .NotebooklmConfig.Builder, + com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .NotebooklmConfigOrBuilder> + internalGetNotebooklmConfigFieldBuilder() { + if (notebooklmConfigBuilder_ == null) { + if (!(dataSourceConfigCase_ == 3)) { + dataSourceConfig_ = + com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .NotebooklmConfig.getDefaultInstance(); + } + notebooklmConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .NotebooklmConfig, + com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .NotebooklmConfig.Builder, + com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .NotebooklmConfigOrBuilder>( + (com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .NotebooklmConfig) + dataSourceConfig_, + getParentForChildren(), + isClean()); + dataSourceConfig_ = null; + } + dataSourceConfigCase_ = 3; + onChanged(); + return notebooklmConfigBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig) + private static final com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig(); + } + + public static com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public FederatedSearchConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int bitField0_; + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
            +   * Immutable. Identifier. The full resource name of the data store.
            +   * Format:
            +   * `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`.
            +   *
            +   * This field must be a UTF-8 encoded string with a length limit of 1024
            +   * characters.
            +   * 
            + * + * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = IDENTIFIER]; + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + 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(); + name_ = s; + return s; + } + } + + /** + * + * + *
            +   * Immutable. Identifier. The full resource name of the data store.
            +   * Format:
            +   * `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`.
            +   *
            +   * This field must be a UTF-8 encoded string with a length limit of 1024
            +   * characters.
            +   * 
            + * + * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = IDENTIFIER]; + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DISPLAY_NAME_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object displayName_ = ""; + + /** + * + * + *
            +   * Required. The data store display name.
            +   *
            +   * This field must be a UTF-8 encoded string with a length limit of 128
            +   * characters. Otherwise, an INVALID_ARGUMENT error is returned.
            +   * 
            + * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The displayName. + */ + @java.lang.Override + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + 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(); + displayName_ = s; + return s; + } + } + + /** + * + * + *
            +   * Required. The data store display name.
            +   *
            +   * This field must be a UTF-8 encoded string with a length limit of 128
            +   * characters. Otherwise, an INVALID_ARGUMENT error is returned.
            +   * 
            + * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for displayName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int INDUSTRY_VERTICAL_FIELD_NUMBER = 3; + private int industryVertical_ = 0; + + /** + * + * + *
            +   * Immutable. The industry vertical that the data store registers.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.IndustryVertical industry_vertical = 3 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The enum numeric value on the wire for industryVertical. + */ + @java.lang.Override + public int getIndustryVerticalValue() { + return industryVertical_; + } + + /** + * + * + *
            +   * Immutable. The industry vertical that the data store registers.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.IndustryVertical industry_vertical = 3 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The industryVertical. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.IndustryVertical getIndustryVertical() { + com.google.cloud.discoveryengine.v1beta.IndustryVertical result = + com.google.cloud.discoveryengine.v1beta.IndustryVertical.forNumber(industryVertical_); + return result == null + ? com.google.cloud.discoveryengine.v1beta.IndustryVertical.UNRECOGNIZED + : result; + } + + public static final int SOLUTION_TYPES_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private com.google.protobuf.Internal.IntList solutionTypes_ = emptyIntList(); + + private static final com.google.protobuf.Internal.IntListAdapter.IntConverter< + com.google.cloud.discoveryengine.v1beta.SolutionType> + solutionTypes_converter_ = + new com.google.protobuf.Internal.IntListAdapter.IntConverter< + com.google.cloud.discoveryengine.v1beta.SolutionType>() { + public com.google.cloud.discoveryengine.v1beta.SolutionType convert(int from) { + com.google.cloud.discoveryengine.v1beta.SolutionType result = + com.google.cloud.discoveryengine.v1beta.SolutionType.forNumber(from); + return result == null + ? com.google.cloud.discoveryengine.v1beta.SolutionType.UNRECOGNIZED + : result; + } + }; + + /** + * + * + *
            +   * The solutions that the data store enrolls. Available solutions for each
            +   * [industry_vertical][google.cloud.discoveryengine.v1beta.DataStore.industry_vertical]:
            +   *
            +   * * `MEDIA`: `SOLUTION_TYPE_RECOMMENDATION` and `SOLUTION_TYPE_SEARCH`.
            +   * * `SITE_SEARCH`: `SOLUTION_TYPE_SEARCH` is automatically enrolled. Other
            +   * solutions cannot be enrolled.
            +   * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.SolutionType solution_types = 5; + * + * @return A list containing the solutionTypes. + */ + @java.lang.Override + public java.util.List + getSolutionTypesList() { + return new com.google.protobuf.Internal.IntListAdapter< + com.google.cloud.discoveryengine.v1beta.SolutionType>( + solutionTypes_, solutionTypes_converter_); + } + + /** + * + * + *
            +   * The solutions that the data store enrolls. Available solutions for each
            +   * [industry_vertical][google.cloud.discoveryengine.v1beta.DataStore.industry_vertical]:
            +   *
            +   * * `MEDIA`: `SOLUTION_TYPE_RECOMMENDATION` and `SOLUTION_TYPE_SEARCH`.
            +   * * `SITE_SEARCH`: `SOLUTION_TYPE_SEARCH` is automatically enrolled. Other
            +   * solutions cannot be enrolled.
            +   * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.SolutionType solution_types = 5; + * + * @return The count of solutionTypes. + */ + @java.lang.Override + public int getSolutionTypesCount() { + return solutionTypes_.size(); + } + + /** + * + * + *
            +   * The solutions that the data store enrolls. Available solutions for each
            +   * [industry_vertical][google.cloud.discoveryengine.v1beta.DataStore.industry_vertical]:
            +   *
            +   * * `MEDIA`: `SOLUTION_TYPE_RECOMMENDATION` and `SOLUTION_TYPE_SEARCH`.
            +   * * `SITE_SEARCH`: `SOLUTION_TYPE_SEARCH` is automatically enrolled. Other
            +   * solutions cannot be enrolled.
            +   * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.SolutionType solution_types = 5; + * + * @param index The index of the element to return. + * @return The solutionTypes at the given index. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.SolutionType getSolutionTypes(int index) { + return solutionTypes_converter_.convert(solutionTypes_.getInt(index)); + } + + /** + * + * + *
            +   * The solutions that the data store enrolls. Available solutions for each
            +   * [industry_vertical][google.cloud.discoveryengine.v1beta.DataStore.industry_vertical]:
            +   *
            +   * * `MEDIA`: `SOLUTION_TYPE_RECOMMENDATION` and `SOLUTION_TYPE_SEARCH`.
            +   * * `SITE_SEARCH`: `SOLUTION_TYPE_SEARCH` is automatically enrolled. Other
            +   * solutions cannot be enrolled.
            +   * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.SolutionType solution_types = 5; + * + * @return A list containing the enum numeric values on the wire for solutionTypes. + */ + @java.lang.Override + public java.util.List getSolutionTypesValueList() { + return solutionTypes_; + } + + /** + * + * + *
            +   * The solutions that the data store enrolls. Available solutions for each
            +   * [industry_vertical][google.cloud.discoveryengine.v1beta.DataStore.industry_vertical]:
            +   *
            +   * * `MEDIA`: `SOLUTION_TYPE_RECOMMENDATION` and `SOLUTION_TYPE_SEARCH`.
            +   * * `SITE_SEARCH`: `SOLUTION_TYPE_SEARCH` is automatically enrolled. Other
            +   * solutions cannot be enrolled.
            +   * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.SolutionType solution_types = 5; + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of solutionTypes at the given index. + */ + @java.lang.Override + public int getSolutionTypesValue(int index) { + return solutionTypes_.getInt(index); + } + + private int solutionTypesMemoizedSerializedSize; + + public static final int DEFAULT_SCHEMA_ID_FIELD_NUMBER = 7; + + @SuppressWarnings("serial") + private volatile java.lang.Object defaultSchemaId_ = ""; + + /** + * + * + *
            +   * Output only. The id of the default
            +   * [Schema][google.cloud.discoveryengine.v1beta.Schema] associated to this
            +   * data store.
            +   * 
            + * + * string default_schema_id = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The defaultSchemaId. + */ + @java.lang.Override + public java.lang.String getDefaultSchemaId() { + java.lang.Object ref = defaultSchemaId_; + 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(); + defaultSchemaId_ = s; + return s; + } + } + + /** + * + * + *
            +   * Output only. The id of the default
            +   * [Schema][google.cloud.discoveryengine.v1beta.Schema] associated to this
            +   * data store.
            +   * 
            + * + * string default_schema_id = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for defaultSchemaId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDefaultSchemaIdBytes() { + java.lang.Object ref = defaultSchemaId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + defaultSchemaId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CONTENT_CONFIG_FIELD_NUMBER = 6; + private int contentConfig_ = 0; + + /** + * + * + *
            +   * Immutable. The content config of the data store. If this field is unset,
            +   * the server behavior defaults to
            +   * [ContentConfig.NO_CONTENT][google.cloud.discoveryengine.v1beta.DataStore.ContentConfig.NO_CONTENT].
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.DataStore.ContentConfig content_config = 6 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The enum numeric value on the wire for contentConfig. + */ + @java.lang.Override + public int getContentConfigValue() { + return contentConfig_; + } + + /** + * + * + *
            +   * Immutable. The content config of the data store. If this field is unset,
            +   * the server behavior defaults to
            +   * [ContentConfig.NO_CONTENT][google.cloud.discoveryengine.v1beta.DataStore.ContentConfig.NO_CONTENT].
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.DataStore.ContentConfig content_config = 6 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The contentConfig. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.DataStore.ContentConfig getContentConfig() { + com.google.cloud.discoveryengine.v1beta.DataStore.ContentConfig result = + com.google.cloud.discoveryengine.v1beta.DataStore.ContentConfig.forNumber(contentConfig_); + return result == null + ? com.google.cloud.discoveryengine.v1beta.DataStore.ContentConfig.UNRECOGNIZED + : result; + } + + public static final int CREATE_TIME_FIELD_NUMBER = 4; + private com.google.protobuf.Timestamp createTime_; + + /** + * + * + *
            +   * Output only. Timestamp the
            +   * [DataStore][google.cloud.discoveryengine.v1beta.DataStore] was created at.
            +   * 
            + * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
            +   * Output only. Timestamp the
            +   * [DataStore][google.cloud.discoveryengine.v1beta.DataStore] was created at.
            +   * 
            + * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + /** + * + * + *
            +   * Output only. Timestamp the
            +   * [DataStore][google.cloud.discoveryengine.v1beta.DataStore] was created at.
            +   * 
            + * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + public static final int ADVANCED_SITE_SEARCH_CONFIG_FIELD_NUMBER = 12; + private com.google.cloud.discoveryengine.v1beta.AdvancedSiteSearchConfig + advancedSiteSearchConfig_; + + /** + * + * + *
            +   * Optional. Configuration for advanced site search.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AdvancedSiteSearchConfig advanced_site_search_config = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the advancedSiteSearchConfig field is set. + */ + @java.lang.Override + public boolean hasAdvancedSiteSearchConfig() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
            +   * Optional. Configuration for advanced site search.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AdvancedSiteSearchConfig advanced_site_search_config = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The advancedSiteSearchConfig. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AdvancedSiteSearchConfig + getAdvancedSiteSearchConfig() { + return advancedSiteSearchConfig_ == null + ? com.google.cloud.discoveryengine.v1beta.AdvancedSiteSearchConfig.getDefaultInstance() + : advancedSiteSearchConfig_; + } + + /** + * + * + *
            +   * Optional. Configuration for advanced site search.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AdvancedSiteSearchConfig advanced_site_search_config = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AdvancedSiteSearchConfigOrBuilder + getAdvancedSiteSearchConfigOrBuilder() { + return advancedSiteSearchConfig_ == null + ? com.google.cloud.discoveryengine.v1beta.AdvancedSiteSearchConfig.getDefaultInstance() + : advancedSiteSearchConfig_; + } + + public static final int LANGUAGE_INFO_FIELD_NUMBER = 14; + private com.google.cloud.discoveryengine.v1beta.LanguageInfo languageInfo_; + + /** + * + * + *
            +   * Language info for DataStore.
            +   * 
            + * + * .google.cloud.discoveryengine.v1beta.LanguageInfo language_info = 14; + * + * @return Whether the languageInfo field is set. + */ + @java.lang.Override + public boolean hasLanguageInfo() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
            +   * Language info for DataStore.
            +   * 
            + * + * .google.cloud.discoveryengine.v1beta.LanguageInfo language_info = 14; + * + * @return The languageInfo. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.LanguageInfo getLanguageInfo() { + return languageInfo_ == null + ? com.google.cloud.discoveryengine.v1beta.LanguageInfo.getDefaultInstance() + : languageInfo_; + } + + /** + * + * + *
            +   * Language info for DataStore.
            +   * 
            + * + * .google.cloud.discoveryengine.v1beta.LanguageInfo language_info = 14; + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.LanguageInfoOrBuilder getLanguageInfoOrBuilder() { + return languageInfo_ == null + ? com.google.cloud.discoveryengine.v1beta.LanguageInfo.getDefaultInstance() + : languageInfo_; + } + + public static final int NATURAL_LANGUAGE_QUERY_UNDERSTANDING_CONFIG_FIELD_NUMBER = 34; + private com.google.cloud.discoveryengine.v1beta.NaturalLanguageQueryUnderstandingConfig + naturalLanguageQueryUnderstandingConfig_; + + /** + * + * + *
            +   * Optional. Configuration for Natural Language Query Understanding.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.NaturalLanguageQueryUnderstandingConfig natural_language_query_understanding_config = 34 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the naturalLanguageQueryUnderstandingConfig field is set. + */ + @java.lang.Override + public boolean hasNaturalLanguageQueryUnderstandingConfig() { + return ((bitField0_ & 0x00000008) != 0); + } + + /** + * + * + *
            +   * Optional. Configuration for Natural Language Query Understanding.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.NaturalLanguageQueryUnderstandingConfig natural_language_query_understanding_config = 34 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The naturalLanguageQueryUnderstandingConfig. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.NaturalLanguageQueryUnderstandingConfig + getNaturalLanguageQueryUnderstandingConfig() { + return naturalLanguageQueryUnderstandingConfig_ == null + ? com.google.cloud.discoveryengine.v1beta.NaturalLanguageQueryUnderstandingConfig + .getDefaultInstance() + : naturalLanguageQueryUnderstandingConfig_; + } + + /** + * + * + *
            +   * Optional. Configuration for Natural Language Query Understanding.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.NaturalLanguageQueryUnderstandingConfig natural_language_query_understanding_config = 34 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.NaturalLanguageQueryUnderstandingConfigOrBuilder + getNaturalLanguageQueryUnderstandingConfigOrBuilder() { + return naturalLanguageQueryUnderstandingConfig_ == null + ? com.google.cloud.discoveryengine.v1beta.NaturalLanguageQueryUnderstandingConfig + .getDefaultInstance() + : naturalLanguageQueryUnderstandingConfig_; + } + + public static final int KMS_KEY_NAME_FIELD_NUMBER = 32; + + @SuppressWarnings("serial") + private volatile java.lang.Object kmsKeyName_ = ""; + + /** + * + * + *
            +   * Input only. The KMS key to be used to protect this DataStore at creation
            +   * time.
            +   *
            +   * Must be set for requests that need to comply with CMEK Org Policy
            +   * protections.
            +   *
            +   * If this field is set and processed successfully, the DataStore will be
            +   * protected by the KMS key, as indicated in the cmek_config field.
            +   * 
            + * + * string kms_key_name = 32 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * @return The kmsKeyName. + */ + @java.lang.Override + public java.lang.String getKmsKeyName() { + java.lang.Object ref = kmsKeyName_; + 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(); + kmsKeyName_ = s; + return s; + } + } + + /** + * + * + *
            +   * Input only. The KMS key to be used to protect this DataStore at creation
            +   * time.
            +   *
            +   * Must be set for requests that need to comply with CMEK Org Policy
            +   * protections.
            +   *
            +   * If this field is set and processed successfully, the DataStore will be
            +   * protected by the KMS key, as indicated in the cmek_config field.
            +   * 
            + * + * string kms_key_name = 32 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * @return The bytes for kmsKeyName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getKmsKeyNameBytes() { + java.lang.Object ref = kmsKeyName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + kmsKeyName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CMEK_CONFIG_FIELD_NUMBER = 18; + private com.google.cloud.discoveryengine.v1beta.CmekConfig cmekConfig_; + + /** + * + * + *
            +   * Output only. CMEK-related information for the DataStore.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.CmekConfig cmek_config = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the cmekConfig field is set. + */ + @java.lang.Override + public boolean hasCmekConfig() { + return ((bitField0_ & 0x00000010) != 0); + } + + /** + * + * + *
            +   * Output only. CMEK-related information for the DataStore.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.CmekConfig cmek_config = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The cmekConfig. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.CmekConfig getCmekConfig() { + return cmekConfig_ == null + ? com.google.cloud.discoveryengine.v1beta.CmekConfig.getDefaultInstance() + : cmekConfig_; + } + + /** + * + * + *
            +   * Output only. CMEK-related information for the DataStore.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.CmekConfig cmek_config = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.CmekConfigOrBuilder getCmekConfigOrBuilder() { + return cmekConfig_ == null + ? com.google.cloud.discoveryengine.v1beta.CmekConfig.getDefaultInstance() + : cmekConfig_; + } + + public static final int BILLING_ESTIMATION_FIELD_NUMBER = 23; + private com.google.cloud.discoveryengine.v1beta.DataStore.BillingEstimation billingEstimation_; + + /** + * + * + *
            +   * Output only. Data size estimation for billing.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.DataStore.BillingEstimation billing_estimation = 23 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the billingEstimation field is set. + */ + @java.lang.Override + public boolean hasBillingEstimation() { + return ((bitField0_ & 0x00000020) != 0); + } + + /** + * + * + *
            +   * Output only. Data size estimation for billing.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.DataStore.BillingEstimation billing_estimation = 23 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The billingEstimation. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.DataStore.BillingEstimation + getBillingEstimation() { + return billingEstimation_ == null + ? com.google.cloud.discoveryengine.v1beta.DataStore.BillingEstimation.getDefaultInstance() + : billingEstimation_; + } + + /** + * + * + *
            +   * Output only. Data size estimation for billing.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.DataStore.BillingEstimation billing_estimation = 23 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.DataStore.BillingEstimationOrBuilder + getBillingEstimationOrBuilder() { + return billingEstimation_ == null + ? com.google.cloud.discoveryengine.v1beta.DataStore.BillingEstimation.getDefaultInstance() + : billingEstimation_; + } + + public static final int ACL_ENABLED_FIELD_NUMBER = 24; + private boolean aclEnabled_ = false; + + /** + * + * + *
            +   * Immutable. Whether data in the
            +   * [DataStore][google.cloud.discoveryengine.v1beta.DataStore] has ACL
            +   * information. If set to `true`, the source data must have ACL. ACL will be
            +   * ingested when data is ingested by
            +   * [DocumentService.ImportDocuments][google.cloud.discoveryengine.v1beta.DocumentService.ImportDocuments]
            +   * methods.
            +   *
            +   * When ACL is enabled for the
            +   * [DataStore][google.cloud.discoveryengine.v1beta.DataStore],
            +   * [Document][google.cloud.discoveryengine.v1beta.Document] can't be accessed
            +   * by calling
            +   * [DocumentService.GetDocument][google.cloud.discoveryengine.v1beta.DocumentService.GetDocument]
            +   * or
            +   * [DocumentService.ListDocuments][google.cloud.discoveryengine.v1beta.DocumentService.ListDocuments].
            +   *
            +   * Currently ACL is only supported in `GENERIC` industry vertical with
            +   * non-`PUBLIC_WEBSITE` content config.
            +   * 
            + * + * bool acl_enabled = 24 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The aclEnabled. + */ + @java.lang.Override + public boolean getAclEnabled() { + return aclEnabled_; + } + + public static final int WORKSPACE_CONFIG_FIELD_NUMBER = 25; + private com.google.cloud.discoveryengine.v1beta.WorkspaceConfig workspaceConfig_; + + /** + * + * + *
            +   * Config to store data store type configuration for workspace data. This
            +   * must be set when
            +   * [DataStore.content_config][google.cloud.discoveryengine.v1beta.DataStore.content_config]
            +   * is set as
            +   * [DataStore.ContentConfig.GOOGLE_WORKSPACE][google.cloud.discoveryengine.v1beta.DataStore.ContentConfig.GOOGLE_WORKSPACE].
            +   * 
            + * + * .google.cloud.discoveryengine.v1beta.WorkspaceConfig workspace_config = 25; + * + * @return Whether the workspaceConfig field is set. + */ + @java.lang.Override + public boolean hasWorkspaceConfig() { + return ((bitField0_ & 0x00000040) != 0); + } + + /** + * + * + *
            +   * Config to store data store type configuration for workspace data. This
            +   * must be set when
            +   * [DataStore.content_config][google.cloud.discoveryengine.v1beta.DataStore.content_config]
            +   * is set as
            +   * [DataStore.ContentConfig.GOOGLE_WORKSPACE][google.cloud.discoveryengine.v1beta.DataStore.ContentConfig.GOOGLE_WORKSPACE].
            +   * 
            + * + * .google.cloud.discoveryengine.v1beta.WorkspaceConfig workspace_config = 25; + * + * @return The workspaceConfig. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.WorkspaceConfig getWorkspaceConfig() { + return workspaceConfig_ == null + ? com.google.cloud.discoveryengine.v1beta.WorkspaceConfig.getDefaultInstance() + : workspaceConfig_; + } + + /** + * + * + *
            +   * Config to store data store type configuration for workspace data. This
            +   * must be set when
            +   * [DataStore.content_config][google.cloud.discoveryengine.v1beta.DataStore.content_config]
            +   * is set as
            +   * [DataStore.ContentConfig.GOOGLE_WORKSPACE][google.cloud.discoveryengine.v1beta.DataStore.ContentConfig.GOOGLE_WORKSPACE].
            +   * 
            + * + * .google.cloud.discoveryengine.v1beta.WorkspaceConfig workspace_config = 25; + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.WorkspaceConfigOrBuilder + getWorkspaceConfigOrBuilder() { + return workspaceConfig_ == null + ? com.google.cloud.discoveryengine.v1beta.WorkspaceConfig.getDefaultInstance() + : workspaceConfig_; + } + + public static final int DOCUMENT_PROCESSING_CONFIG_FIELD_NUMBER = 27; + private com.google.cloud.discoveryengine.v1beta.DocumentProcessingConfig + documentProcessingConfig_; + + /** + * + * + *
            +   * Configuration for Document understanding and enrichment.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.DocumentProcessingConfig document_processing_config = 27; + * + * + * @return Whether the documentProcessingConfig field is set. + */ + @java.lang.Override + public boolean hasDocumentProcessingConfig() { + return ((bitField0_ & 0x00000080) != 0); + } + + /** + * + * + *
            +   * Configuration for Document understanding and enrichment.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.DocumentProcessingConfig document_processing_config = 27; + * + * + * @return The documentProcessingConfig. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.DocumentProcessingConfig + getDocumentProcessingConfig() { + return documentProcessingConfig_ == null + ? com.google.cloud.discoveryengine.v1beta.DocumentProcessingConfig.getDefaultInstance() + : documentProcessingConfig_; + } + + /** + * + * + *
            +   * Configuration for Document understanding and enrichment.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.DocumentProcessingConfig document_processing_config = 27; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.DocumentProcessingConfigOrBuilder + getDocumentProcessingConfigOrBuilder() { + return documentProcessingConfig_ == null + ? com.google.cloud.discoveryengine.v1beta.DocumentProcessingConfig.getDefaultInstance() + : documentProcessingConfig_; + } + + public static final int STARTING_SCHEMA_FIELD_NUMBER = 28; + private com.google.cloud.discoveryengine.v1beta.Schema startingSchema_; + + /** + * + * + *
            +   * The start schema to use for this
            +   * [DataStore][google.cloud.discoveryengine.v1beta.DataStore] when
            +   * provisioning it. If unset, a default vertical specialized schema will be
            +   * used.
            +   *
            +   * This field is only used by
            +   * [CreateDataStore][google.cloud.discoveryengine.v1beta.DataStoreService.CreateDataStore]
            +   * API, and will be ignored if used in other APIs. This field will be omitted
            +   * from all API responses including
            +   * [CreateDataStore][google.cloud.discoveryengine.v1beta.DataStoreService.CreateDataStore]
            +   * API. To retrieve a schema of a
            +   * [DataStore][google.cloud.discoveryengine.v1beta.DataStore], use
            +   * [SchemaService.GetSchema][google.cloud.discoveryengine.v1beta.SchemaService.GetSchema]
            +   * API instead.
            +   *
            +   * The provided schema will be validated against certain rules on schema.
            +   * Learn more from [this
            +   * doc](https://cloud.google.com/generative-ai-app-builder/docs/provide-schema).
            +   * 
            + * + * .google.cloud.discoveryengine.v1beta.Schema starting_schema = 28; + * + * @return Whether the startingSchema field is set. + */ + @java.lang.Override + public boolean hasStartingSchema() { + return ((bitField0_ & 0x00000100) != 0); + } + + /** + * + * + *
            +   * The start schema to use for this
            +   * [DataStore][google.cloud.discoveryengine.v1beta.DataStore] when
            +   * provisioning it. If unset, a default vertical specialized schema will be
            +   * used.
            +   *
            +   * This field is only used by
            +   * [CreateDataStore][google.cloud.discoveryengine.v1beta.DataStoreService.CreateDataStore]
            +   * API, and will be ignored if used in other APIs. This field will be omitted
            +   * from all API responses including
            +   * [CreateDataStore][google.cloud.discoveryengine.v1beta.DataStoreService.CreateDataStore]
            +   * API. To retrieve a schema of a
            +   * [DataStore][google.cloud.discoveryengine.v1beta.DataStore], use
            +   * [SchemaService.GetSchema][google.cloud.discoveryengine.v1beta.SchemaService.GetSchema]
            +   * API instead.
            +   *
            +   * The provided schema will be validated against certain rules on schema.
            +   * Learn more from [this
            +   * doc](https://cloud.google.com/generative-ai-app-builder/docs/provide-schema).
            +   * 
            + * + * .google.cloud.discoveryengine.v1beta.Schema starting_schema = 28; + * + * @return The startingSchema. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Schema getStartingSchema() { + return startingSchema_ == null + ? com.google.cloud.discoveryengine.v1beta.Schema.getDefaultInstance() + : startingSchema_; + } + + /** + * + * + *
            +   * The start schema to use for this
            +   * [DataStore][google.cloud.discoveryengine.v1beta.DataStore] when
            +   * provisioning it. If unset, a default vertical specialized schema will be
            +   * used.
            +   *
            +   * This field is only used by
            +   * [CreateDataStore][google.cloud.discoveryengine.v1beta.DataStoreService.CreateDataStore]
            +   * API, and will be ignored if used in other APIs. This field will be omitted
            +   * from all API responses including
            +   * [CreateDataStore][google.cloud.discoveryengine.v1beta.DataStoreService.CreateDataStore]
            +   * API. To retrieve a schema of a
            +   * [DataStore][google.cloud.discoveryengine.v1beta.DataStore], use
            +   * [SchemaService.GetSchema][google.cloud.discoveryengine.v1beta.SchemaService.GetSchema]
            +   * API instead.
            +   *
            +   * The provided schema will be validated against certain rules on schema.
            +   * Learn more from [this
            +   * doc](https://cloud.google.com/generative-ai-app-builder/docs/provide-schema).
            +   * 
            + * + * .google.cloud.discoveryengine.v1beta.Schema starting_schema = 28; + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.SchemaOrBuilder getStartingSchemaOrBuilder() { + return startingSchema_ == null + ? com.google.cloud.discoveryengine.v1beta.Schema.getDefaultInstance() + : startingSchema_; + } + + public static final int HEALTHCARE_FHIR_CONFIG_FIELD_NUMBER = 29; + private com.google.cloud.discoveryengine.v1beta.HealthcareFhirConfig healthcareFhirConfig_; + + /** + * + * + *
            +   * Optional. Configuration for `HEALTHCARE_FHIR` vertical.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.HealthcareFhirConfig healthcare_fhir_config = 29 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the healthcareFhirConfig field is set. + */ + @java.lang.Override + public boolean hasHealthcareFhirConfig() { + return ((bitField0_ & 0x00000200) != 0); + } + + /** + * + * + *
            +   * Optional. Configuration for `HEALTHCARE_FHIR` vertical.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.HealthcareFhirConfig healthcare_fhir_config = 29 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The healthcareFhirConfig. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.HealthcareFhirConfig getHealthcareFhirConfig() { + return healthcareFhirConfig_ == null + ? com.google.cloud.discoveryengine.v1beta.HealthcareFhirConfig.getDefaultInstance() + : healthcareFhirConfig_; + } + + /** + * + * + *
            +   * Optional. Configuration for `HEALTHCARE_FHIR` vertical.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.HealthcareFhirConfig healthcare_fhir_config = 29 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.HealthcareFhirConfigOrBuilder + getHealthcareFhirConfigOrBuilder() { + return healthcareFhirConfig_ == null + ? com.google.cloud.discoveryengine.v1beta.HealthcareFhirConfig.getDefaultInstance() + : healthcareFhirConfig_; + } + + public static final int SERVING_CONFIG_DATA_STORE_FIELD_NUMBER = 30; + private com.google.cloud.discoveryengine.v1beta.DataStore.ServingConfigDataStore + servingConfigDataStore_; + + /** + * + * + *
            +   * Optional. Stores serving config at DataStore level.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.DataStore.ServingConfigDataStore serving_config_data_store = 30 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the servingConfigDataStore field is set. + */ + @java.lang.Override + public boolean hasServingConfigDataStore() { + return ((bitField0_ & 0x00000400) != 0); + } + + /** + * + * + *
            +   * Optional. Stores serving config at DataStore level.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.DataStore.ServingConfigDataStore serving_config_data_store = 30 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The servingConfigDataStore. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.DataStore.ServingConfigDataStore + getServingConfigDataStore() { + return servingConfigDataStore_ == null + ? com.google.cloud.discoveryengine.v1beta.DataStore.ServingConfigDataStore + .getDefaultInstance() + : servingConfigDataStore_; + } + + /** + * + * + *
            +   * Optional. Stores serving config at DataStore level.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.DataStore.ServingConfigDataStore serving_config_data_store = 30 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.DataStore.ServingConfigDataStoreOrBuilder + getServingConfigDataStoreOrBuilder() { + return servingConfigDataStore_ == null + ? com.google.cloud.discoveryengine.v1beta.DataStore.ServingConfigDataStore + .getDefaultInstance() + : servingConfigDataStore_; + } + + public static final int IDENTITY_MAPPING_STORE_FIELD_NUMBER = 31; + + @SuppressWarnings("serial") + private volatile java.lang.Object identityMappingStore_ = ""; + + /** + * + * + *
            +   * Immutable. The fully qualified resource name of the associated
            +   * [IdentityMappingStore][google.cloud.discoveryengine.v1beta.IdentityMappingStore].
            +   * This field can only be set for acl_enabled DataStores with `THIRD_PARTY` or
            +   * `GSUITE` IdP. Format:
            +   * `projects/{project}/locations/{location}/identityMappingStores/{identity_mapping_store}`.
            +   * 
            + * + * + * string identity_mapping_store = 31 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * + * + * @return The identityMappingStore. + */ + @java.lang.Override + public java.lang.String getIdentityMappingStore() { + java.lang.Object ref = identityMappingStore_; + 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(); + identityMappingStore_ = s; + return s; + } + } + + /** + * + * + *
            +   * Immutable. The fully qualified resource name of the associated
            +   * [IdentityMappingStore][google.cloud.discoveryengine.v1beta.IdentityMappingStore].
            +   * This field can only be set for acl_enabled DataStores with `THIRD_PARTY` or
            +   * `GSUITE` IdP. Format:
            +   * `projects/{project}/locations/{location}/identityMappingStores/{identity_mapping_store}`.
            +   * 
            + * + * + * string identity_mapping_store = 31 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for identityMappingStore. + */ + @java.lang.Override + public com.google.protobuf.ByteString getIdentityMappingStoreBytes() { + java.lang.Object ref = identityMappingStore_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + identityMappingStore_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int IS_INFOBOT_FAQ_DATA_STORE_FIELD_NUMBER = 37; + private boolean isInfobotFaqDataStore_ = false; + + /** + * + * + *
            +   * Optional. If set, this DataStore is an Infobot FAQ DataStore.
            +   * 
            + * + * bool is_infobot_faq_data_store = 37 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The isInfobotFaqDataStore. + */ + @java.lang.Override + public boolean getIsInfobotFaqDataStore() { + return isInfobotFaqDataStore_; + } + + public static final int FEDERATED_SEARCH_CONFIG_FIELD_NUMBER = 38; + private com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + federatedSearchConfig_; + + /** + * + * + *
            +   * Optional. If set, this DataStore is a federated search DataStore.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig federated_search_config = 38 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the federatedSearchConfig field is set. + */ + @java.lang.Override + public boolean hasFederatedSearchConfig() { + return ((bitField0_ & 0x00000800) != 0); + } + + /** + * + * + *
            +   * Optional. If set, this DataStore is a federated search DataStore.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig federated_search_config = 38 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The federatedSearchConfig. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + getFederatedSearchConfig() { + return federatedSearchConfig_ == null + ? com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .getDefaultInstance() + : federatedSearchConfig_; + } + + /** + * + * + *
            +   * Optional. If set, this DataStore is a federated search DataStore.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig federated_search_config = 38 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfigOrBuilder + getFederatedSearchConfigOrBuilder() { + return federatedSearchConfig_ == null + ? com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .getDefaultInstance() + : federatedSearchConfig_; + } + + public static final int CONFIGURABLE_BILLING_APPROACH_FIELD_NUMBER = 45; + private int configurableBillingApproach_ = 0; + + /** + * + * + *
            +   * Optional. Configuration for configurable billing approach. See
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.DataStore.ConfigurableBillingApproach configurable_billing_approach = 45 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for configurableBillingApproach. + */ + @java.lang.Override + public int getConfigurableBillingApproachValue() { + return configurableBillingApproach_; + } + + /** + * + * + *
            +   * Optional. Configuration for configurable billing approach. See
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.DataStore.ConfigurableBillingApproach configurable_billing_approach = 45 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The configurableBillingApproach. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.DataStore.ConfigurableBillingApproach + getConfigurableBillingApproach() { + com.google.cloud.discoveryengine.v1beta.DataStore.ConfigurableBillingApproach result = + com.google.cloud.discoveryengine.v1beta.DataStore.ConfigurableBillingApproach.forNumber( + configurableBillingApproach_); + return result == null + ? com.google.cloud.discoveryengine.v1beta.DataStore.ConfigurableBillingApproach.UNRECOGNIZED + : result; + } + + public static final int CONFIGURABLE_BILLING_APPROACH_UPDATE_TIME_FIELD_NUMBER = 46; + private com.google.protobuf.Timestamp configurableBillingApproachUpdateTime_; + + /** + * + * + *
            +   * Output only. The timestamp when configurable_billing_approach was last
            +   * updated.
            +   * 
            + * + * + * .google.protobuf.Timestamp configurable_billing_approach_update_time = 46 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the configurableBillingApproachUpdateTime field is set. + */ + @java.lang.Override + public boolean hasConfigurableBillingApproachUpdateTime() { + return ((bitField0_ & 0x00001000) != 0); + } + + /** + * + * + *
            +   * Output only. The timestamp when configurable_billing_approach was last
            +   * updated.
            +   * 
            + * + * + * .google.protobuf.Timestamp configurable_billing_approach_update_time = 46 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The configurableBillingApproachUpdateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getConfigurableBillingApproachUpdateTime() { + return configurableBillingApproachUpdateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : configurableBillingApproachUpdateTime_; + } + + /** + * + * + *
            +   * Output only. The timestamp when configurable_billing_approach was last
            +   * updated.
            +   * 
            + * + * + * .google.protobuf.Timestamp configurable_billing_approach_update_time = 46 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder + getConfigurableBillingApproachUpdateTimeOrBuilder() { + return configurableBillingApproachUpdateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : configurableBillingApproachUpdateTime_; + } + + 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 { + getSerializedSize(); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(displayName_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, displayName_); + } + if (industryVertical_ + != com.google.cloud.discoveryengine.v1beta.IndustryVertical.INDUSTRY_VERTICAL_UNSPECIFIED + .getNumber()) { + output.writeEnum(3, industryVertical_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(4, getCreateTime()); + } + if (getSolutionTypesList().size() > 0) { + output.writeUInt32NoTag(42); + output.writeUInt32NoTag(solutionTypesMemoizedSerializedSize); + } + for (int i = 0; i < solutionTypes_.size(); i++) { + output.writeEnumNoTag(solutionTypes_.getInt(i)); + } + if (contentConfig_ + != com.google.cloud.discoveryengine.v1beta.DataStore.ContentConfig + .CONTENT_CONFIG_UNSPECIFIED + .getNumber()) { + output.writeEnum(6, contentConfig_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(defaultSchemaId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 7, defaultSchemaId_); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(12, getAdvancedSiteSearchConfig()); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeMessage(14, getLanguageInfo()); + } + if (((bitField0_ & 0x00000010) != 0)) { + output.writeMessage(18, getCmekConfig()); + } + if (((bitField0_ & 0x00000020) != 0)) { + output.writeMessage(23, getBillingEstimation()); + } + if (aclEnabled_ != false) { + output.writeBool(24, aclEnabled_); + } + if (((bitField0_ & 0x00000040) != 0)) { + output.writeMessage(25, getWorkspaceConfig()); + } + if (((bitField0_ & 0x00000080) != 0)) { + output.writeMessage(27, getDocumentProcessingConfig()); + } + if (((bitField0_ & 0x00000100) != 0)) { + output.writeMessage(28, getStartingSchema()); + } + if (((bitField0_ & 0x00000200) != 0)) { + output.writeMessage(29, getHealthcareFhirConfig()); + } + if (((bitField0_ & 0x00000400) != 0)) { + output.writeMessage(30, getServingConfigDataStore()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(identityMappingStore_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 31, identityMappingStore_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(kmsKeyName_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 32, kmsKeyName_); + } + if (((bitField0_ & 0x00000008) != 0)) { + output.writeMessage(34, getNaturalLanguageQueryUnderstandingConfig()); + } + if (isInfobotFaqDataStore_ != false) { + output.writeBool(37, isInfobotFaqDataStore_); + } + if (((bitField0_ & 0x00000800) != 0)) { + output.writeMessage(38, getFederatedSearchConfig()); + } + if (configurableBillingApproach_ + != com.google.cloud.discoveryengine.v1beta.DataStore.ConfigurableBillingApproach + .CONFIGURABLE_BILLING_APPROACH_UNSPECIFIED + .getNumber()) { + output.writeEnum(45, configurableBillingApproach_); + } + if (((bitField0_ & 0x00001000) != 0)) { + output.writeMessage(46, getConfigurableBillingApproachUpdateTime()); + } + 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(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(displayName_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, displayName_); + } + if (industryVertical_ + != com.google.cloud.discoveryengine.v1beta.IndustryVertical.INDUSTRY_VERTICAL_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(3, industryVertical_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getCreateTime()); + } + { + int dataSize = 0; + for (int i = 0; i < solutionTypes_.size(); i++) { + dataSize += + com.google.protobuf.CodedOutputStream.computeEnumSizeNoTag(solutionTypes_.getInt(i)); + } + size += dataSize; + if (!getSolutionTypesList().isEmpty()) { + size += 1; + size += com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(dataSize); + } + solutionTypesMemoizedSerializedSize = dataSize; + } + if (contentConfig_ + != com.google.cloud.discoveryengine.v1beta.DataStore.ContentConfig + .CONTENT_CONFIG_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(6, contentConfig_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(defaultSchemaId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(7, defaultSchemaId_); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 12, getAdvancedSiteSearchConfig()); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(14, getLanguageInfo()); + } + if (((bitField0_ & 0x00000010) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(18, getCmekConfig()); + } + if (((bitField0_ & 0x00000020) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(23, getBillingEstimation()); + } + if (aclEnabled_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(24, aclEnabled_); + } + if (((bitField0_ & 0x00000040) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(25, getWorkspaceConfig()); + } + if (((bitField0_ & 0x00000080) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 27, getDocumentProcessingConfig()); + } + if (((bitField0_ & 0x00000100) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(28, getStartingSchema()); + } + if (((bitField0_ & 0x00000200) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(29, getHealthcareFhirConfig()); + } + if (((bitField0_ & 0x00000400) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(30, getServingConfigDataStore()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(identityMappingStore_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(31, identityMappingStore_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(kmsKeyName_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(32, kmsKeyName_); + } + if (((bitField0_ & 0x00000008) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 34, getNaturalLanguageQueryUnderstandingConfig()); + } + if (isInfobotFaqDataStore_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(37, isInfobotFaqDataStore_); + } + if (((bitField0_ & 0x00000800) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(38, getFederatedSearchConfig()); + } + if (configurableBillingApproach_ + != com.google.cloud.discoveryengine.v1beta.DataStore.ConfigurableBillingApproach + .CONFIGURABLE_BILLING_APPROACH_UNSPECIFIED + .getNumber()) { + size += + com.google.protobuf.CodedOutputStream.computeEnumSize(45, configurableBillingApproach_); + } + if (((bitField0_ & 0x00001000) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 46, getConfigurableBillingApproachUpdateTime()); + } + 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.discoveryengine.v1beta.DataStore)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1beta.DataStore other = + (com.google.cloud.discoveryengine.v1beta.DataStore) obj; + + if (!getName().equals(other.getName())) return false; + if (!getDisplayName().equals(other.getDisplayName())) return false; + if (industryVertical_ != other.industryVertical_) return false; + if (!solutionTypes_.equals(other.solutionTypes_)) return false; + if (!getDefaultSchemaId().equals(other.getDefaultSchemaId())) return false; + if (contentConfig_ != other.contentConfig_) return false; + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (hasAdvancedSiteSearchConfig() != other.hasAdvancedSiteSearchConfig()) return false; + if (hasAdvancedSiteSearchConfig()) { + if (!getAdvancedSiteSearchConfig().equals(other.getAdvancedSiteSearchConfig())) return false; + } + if (hasLanguageInfo() != other.hasLanguageInfo()) return false; + if (hasLanguageInfo()) { + if (!getLanguageInfo().equals(other.getLanguageInfo())) return false; + } + if (hasNaturalLanguageQueryUnderstandingConfig() + != other.hasNaturalLanguageQueryUnderstandingConfig()) return false; + if (hasNaturalLanguageQueryUnderstandingConfig()) { + if (!getNaturalLanguageQueryUnderstandingConfig() + .equals(other.getNaturalLanguageQueryUnderstandingConfig())) return false; + } + if (!getKmsKeyName().equals(other.getKmsKeyName())) return false; + if (hasCmekConfig() != other.hasCmekConfig()) return false; + if (hasCmekConfig()) { + if (!getCmekConfig().equals(other.getCmekConfig())) return false; + } + if (hasBillingEstimation() != other.hasBillingEstimation()) return false; + if (hasBillingEstimation()) { + if (!getBillingEstimation().equals(other.getBillingEstimation())) return false; + } + if (getAclEnabled() != other.getAclEnabled()) return false; + if (hasWorkspaceConfig() != other.hasWorkspaceConfig()) return false; + if (hasWorkspaceConfig()) { + if (!getWorkspaceConfig().equals(other.getWorkspaceConfig())) return false; + } + if (hasDocumentProcessingConfig() != other.hasDocumentProcessingConfig()) return false; + if (hasDocumentProcessingConfig()) { + if (!getDocumentProcessingConfig().equals(other.getDocumentProcessingConfig())) return false; + } + if (hasStartingSchema() != other.hasStartingSchema()) return false; + if (hasStartingSchema()) { + if (!getStartingSchema().equals(other.getStartingSchema())) return false; + } + if (hasHealthcareFhirConfig() != other.hasHealthcareFhirConfig()) return false; + if (hasHealthcareFhirConfig()) { + if (!getHealthcareFhirConfig().equals(other.getHealthcareFhirConfig())) return false; + } + if (hasServingConfigDataStore() != other.hasServingConfigDataStore()) return false; + if (hasServingConfigDataStore()) { + if (!getServingConfigDataStore().equals(other.getServingConfigDataStore())) return false; + } + if (!getIdentityMappingStore().equals(other.getIdentityMappingStore())) return false; + if (getIsInfobotFaqDataStore() != other.getIsInfobotFaqDataStore()) return false; + if (hasFederatedSearchConfig() != other.hasFederatedSearchConfig()) return false; + if (hasFederatedSearchConfig()) { + if (!getFederatedSearchConfig().equals(other.getFederatedSearchConfig())) return false; + } + if (configurableBillingApproach_ != other.configurableBillingApproach_) return false; + if (hasConfigurableBillingApproachUpdateTime() + != other.hasConfigurableBillingApproachUpdateTime()) return false; + if (hasConfigurableBillingApproachUpdateTime()) { + if (!getConfigurableBillingApproachUpdateTime() + .equals(other.getConfigurableBillingApproachUpdateTime())) 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) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); + hash = (37 * hash) + INDUSTRY_VERTICAL_FIELD_NUMBER; + hash = (53 * hash) + industryVertical_; + if (getSolutionTypesCount() > 0) { + hash = (37 * hash) + SOLUTION_TYPES_FIELD_NUMBER; + hash = (53 * hash) + solutionTypes_.hashCode(); + } + hash = (37 * hash) + DEFAULT_SCHEMA_ID_FIELD_NUMBER; + hash = (53 * hash) + getDefaultSchemaId().hashCode(); + hash = (37 * hash) + CONTENT_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + contentConfig_; + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasAdvancedSiteSearchConfig()) { + hash = (37 * hash) + ADVANCED_SITE_SEARCH_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getAdvancedSiteSearchConfig().hashCode(); + } + if (hasLanguageInfo()) { + hash = (37 * hash) + LANGUAGE_INFO_FIELD_NUMBER; + hash = (53 * hash) + getLanguageInfo().hashCode(); + } + if (hasNaturalLanguageQueryUnderstandingConfig()) { + hash = (37 * hash) + NATURAL_LANGUAGE_QUERY_UNDERSTANDING_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getNaturalLanguageQueryUnderstandingConfig().hashCode(); + } + hash = (37 * hash) + KMS_KEY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getKmsKeyName().hashCode(); + if (hasCmekConfig()) { + hash = (37 * hash) + CMEK_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getCmekConfig().hashCode(); + } + if (hasBillingEstimation()) { + hash = (37 * hash) + BILLING_ESTIMATION_FIELD_NUMBER; + hash = (53 * hash) + getBillingEstimation().hashCode(); + } + hash = (37 * hash) + ACL_ENABLED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getAclEnabled()); + if (hasWorkspaceConfig()) { + hash = (37 * hash) + WORKSPACE_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getWorkspaceConfig().hashCode(); + } + if (hasDocumentProcessingConfig()) { + hash = (37 * hash) + DOCUMENT_PROCESSING_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getDocumentProcessingConfig().hashCode(); + } + if (hasStartingSchema()) { + hash = (37 * hash) + STARTING_SCHEMA_FIELD_NUMBER; + hash = (53 * hash) + getStartingSchema().hashCode(); + } + if (hasHealthcareFhirConfig()) { + hash = (37 * hash) + HEALTHCARE_FHIR_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getHealthcareFhirConfig().hashCode(); + } + if (hasServingConfigDataStore()) { + hash = (37 * hash) + SERVING_CONFIG_DATA_STORE_FIELD_NUMBER; + hash = (53 * hash) + getServingConfigDataStore().hashCode(); + } + hash = (37 * hash) + IDENTITY_MAPPING_STORE_FIELD_NUMBER; + hash = (53 * hash) + getIdentityMappingStore().hashCode(); + hash = (37 * hash) + IS_INFOBOT_FAQ_DATA_STORE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getIsInfobotFaqDataStore()); + if (hasFederatedSearchConfig()) { + hash = (37 * hash) + FEDERATED_SEARCH_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getFederatedSearchConfig().hashCode(); + } + hash = (37 * hash) + CONFIGURABLE_BILLING_APPROACH_FIELD_NUMBER; + hash = (53 * hash) + configurableBillingApproach_; + if (hasConfigurableBillingApproachUpdateTime()) { + hash = (37 * hash) + CONFIGURABLE_BILLING_APPROACH_UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getConfigurableBillingApproachUpdateTime().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1beta.DataStore parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.DataStore 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.discoveryengine.v1beta.DataStore parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.DataStore 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.discoveryengine.v1beta.DataStore parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.DataStore parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1beta.DataStore parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.DataStore 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.discoveryengine.v1beta.DataStore parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.DataStore 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.discoveryengine.v1beta.DataStore parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.DataStore 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 void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - getSerializedSize(); - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.discoveryengine.v1beta.DataStore 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; + } + + /** + * + * + *
            +   * DataStore captures global settings and configs at the DataStore level.
            +   * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.DataStore} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.DataStore) + com.google.cloud.discoveryengine.v1beta.DataStoreOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.DataStoreProto + .internal_static_google_cloud_discoveryengine_v1beta_DataStore_descriptor; } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(displayName_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 2, displayName_); + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.DataStoreProto + .internal_static_google_cloud_discoveryengine_v1beta_DataStore_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.DataStore.class, + com.google.cloud.discoveryengine.v1beta.DataStore.Builder.class); } - if (industryVertical_ - != com.google.cloud.discoveryengine.v1beta.IndustryVertical.INDUSTRY_VERTICAL_UNSPECIFIED - .getNumber()) { - output.writeEnum(3, industryVertical_); + + // Construct using com.google.cloud.discoveryengine.v1beta.DataStore.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); } - if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(4, getCreateTime()); + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); } - if (getSolutionTypesList().size() > 0) { - output.writeUInt32NoTag(42); - output.writeUInt32NoTag(solutionTypesMemoizedSerializedSize); + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetCreateTimeFieldBuilder(); + internalGetAdvancedSiteSearchConfigFieldBuilder(); + internalGetLanguageInfoFieldBuilder(); + internalGetNaturalLanguageQueryUnderstandingConfigFieldBuilder(); + internalGetCmekConfigFieldBuilder(); + internalGetBillingEstimationFieldBuilder(); + internalGetWorkspaceConfigFieldBuilder(); + internalGetDocumentProcessingConfigFieldBuilder(); + internalGetStartingSchemaFieldBuilder(); + internalGetHealthcareFhirConfigFieldBuilder(); + internalGetServingConfigDataStoreFieldBuilder(); + internalGetFederatedSearchConfigFieldBuilder(); + internalGetConfigurableBillingApproachUpdateTimeFieldBuilder(); + } } - for (int i = 0; i < solutionTypes_.size(); i++) { - output.writeEnumNoTag(solutionTypes_.getInt(i)); + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + displayName_ = ""; + industryVertical_ = 0; + solutionTypes_ = emptyIntList(); + defaultSchemaId_ = ""; + contentConfig_ = 0; + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + advancedSiteSearchConfig_ = null; + if (advancedSiteSearchConfigBuilder_ != null) { + advancedSiteSearchConfigBuilder_.dispose(); + advancedSiteSearchConfigBuilder_ = null; + } + languageInfo_ = null; + if (languageInfoBuilder_ != null) { + languageInfoBuilder_.dispose(); + languageInfoBuilder_ = null; + } + naturalLanguageQueryUnderstandingConfig_ = null; + if (naturalLanguageQueryUnderstandingConfigBuilder_ != null) { + naturalLanguageQueryUnderstandingConfigBuilder_.dispose(); + naturalLanguageQueryUnderstandingConfigBuilder_ = null; + } + kmsKeyName_ = ""; + cmekConfig_ = null; + if (cmekConfigBuilder_ != null) { + cmekConfigBuilder_.dispose(); + cmekConfigBuilder_ = null; + } + billingEstimation_ = null; + if (billingEstimationBuilder_ != null) { + billingEstimationBuilder_.dispose(); + billingEstimationBuilder_ = null; + } + aclEnabled_ = false; + workspaceConfig_ = null; + if (workspaceConfigBuilder_ != null) { + workspaceConfigBuilder_.dispose(); + workspaceConfigBuilder_ = null; + } + documentProcessingConfig_ = null; + if (documentProcessingConfigBuilder_ != null) { + documentProcessingConfigBuilder_.dispose(); + documentProcessingConfigBuilder_ = null; + } + startingSchema_ = null; + if (startingSchemaBuilder_ != null) { + startingSchemaBuilder_.dispose(); + startingSchemaBuilder_ = null; + } + healthcareFhirConfig_ = null; + if (healthcareFhirConfigBuilder_ != null) { + healthcareFhirConfigBuilder_.dispose(); + healthcareFhirConfigBuilder_ = null; + } + servingConfigDataStore_ = null; + if (servingConfigDataStoreBuilder_ != null) { + servingConfigDataStoreBuilder_.dispose(); + servingConfigDataStoreBuilder_ = null; + } + identityMappingStore_ = ""; + isInfobotFaqDataStore_ = false; + federatedSearchConfig_ = null; + if (federatedSearchConfigBuilder_ != null) { + federatedSearchConfigBuilder_.dispose(); + federatedSearchConfigBuilder_ = null; + } + configurableBillingApproach_ = 0; + configurableBillingApproachUpdateTime_ = null; + if (configurableBillingApproachUpdateTimeBuilder_ != null) { + configurableBillingApproachUpdateTimeBuilder_.dispose(); + configurableBillingApproachUpdateTimeBuilder_ = null; + } + return this; } - if (contentConfig_ - != com.google.cloud.discoveryengine.v1beta.DataStore.ContentConfig - .CONTENT_CONFIG_UNSPECIFIED - .getNumber()) { - output.writeEnum(6, contentConfig_); + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1beta.DataStoreProto + .internal_static_google_cloud_discoveryengine_v1beta_DataStore_descriptor; } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(defaultSchemaId_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 7, defaultSchemaId_); + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.DataStore getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1beta.DataStore.getDefaultInstance(); } - if (((bitField0_ & 0x00000002) != 0)) { - output.writeMessage(14, getLanguageInfo()); + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.DataStore build() { + com.google.cloud.discoveryengine.v1beta.DataStore result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; } - if (((bitField0_ & 0x00000008) != 0)) { - output.writeMessage(23, getBillingEstimation()); + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.DataStore buildPartial() { + com.google.cloud.discoveryengine.v1beta.DataStore result = + new com.google.cloud.discoveryengine.v1beta.DataStore(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; } - if (((bitField0_ & 0x00000010) != 0)) { - output.writeMessage(25, getWorkspaceConfig()); + + private void buildPartial0(com.google.cloud.discoveryengine.v1beta.DataStore result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.displayName_ = displayName_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.industryVertical_ = industryVertical_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + solutionTypes_.makeImmutable(); + result.solutionTypes_ = solutionTypes_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.defaultSchemaId_ = defaultSchemaId_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.contentConfig_ = contentConfig_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000040) != 0)) { + result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.advancedSiteSearchConfig_ = + advancedSiteSearchConfigBuilder_ == null + ? advancedSiteSearchConfig_ + : advancedSiteSearchConfigBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.languageInfo_ = + languageInfoBuilder_ == null ? languageInfo_ : languageInfoBuilder_.build(); + to_bitField0_ |= 0x00000004; + } + if (((from_bitField0_ & 0x00000200) != 0)) { + result.naturalLanguageQueryUnderstandingConfig_ = + naturalLanguageQueryUnderstandingConfigBuilder_ == null + ? naturalLanguageQueryUnderstandingConfig_ + : naturalLanguageQueryUnderstandingConfigBuilder_.build(); + to_bitField0_ |= 0x00000008; + } + if (((from_bitField0_ & 0x00000400) != 0)) { + result.kmsKeyName_ = kmsKeyName_; + } + if (((from_bitField0_ & 0x00000800) != 0)) { + result.cmekConfig_ = cmekConfigBuilder_ == null ? cmekConfig_ : cmekConfigBuilder_.build(); + to_bitField0_ |= 0x00000010; + } + if (((from_bitField0_ & 0x00001000) != 0)) { + result.billingEstimation_ = + billingEstimationBuilder_ == null + ? billingEstimation_ + : billingEstimationBuilder_.build(); + to_bitField0_ |= 0x00000020; + } + if (((from_bitField0_ & 0x00002000) != 0)) { + result.aclEnabled_ = aclEnabled_; + } + if (((from_bitField0_ & 0x00004000) != 0)) { + result.workspaceConfig_ = + workspaceConfigBuilder_ == null ? workspaceConfig_ : workspaceConfigBuilder_.build(); + to_bitField0_ |= 0x00000040; + } + if (((from_bitField0_ & 0x00008000) != 0)) { + result.documentProcessingConfig_ = + documentProcessingConfigBuilder_ == null + ? documentProcessingConfig_ + : documentProcessingConfigBuilder_.build(); + to_bitField0_ |= 0x00000080; + } + if (((from_bitField0_ & 0x00010000) != 0)) { + result.startingSchema_ = + startingSchemaBuilder_ == null ? startingSchema_ : startingSchemaBuilder_.build(); + to_bitField0_ |= 0x00000100; + } + if (((from_bitField0_ & 0x00020000) != 0)) { + result.healthcareFhirConfig_ = + healthcareFhirConfigBuilder_ == null + ? healthcareFhirConfig_ + : healthcareFhirConfigBuilder_.build(); + to_bitField0_ |= 0x00000200; + } + if (((from_bitField0_ & 0x00040000) != 0)) { + result.servingConfigDataStore_ = + servingConfigDataStoreBuilder_ == null + ? servingConfigDataStore_ + : servingConfigDataStoreBuilder_.build(); + to_bitField0_ |= 0x00000400; + } + if (((from_bitField0_ & 0x00080000) != 0)) { + result.identityMappingStore_ = identityMappingStore_; + } + if (((from_bitField0_ & 0x00100000) != 0)) { + result.isInfobotFaqDataStore_ = isInfobotFaqDataStore_; + } + if (((from_bitField0_ & 0x00200000) != 0)) { + result.federatedSearchConfig_ = + federatedSearchConfigBuilder_ == null + ? federatedSearchConfig_ + : federatedSearchConfigBuilder_.build(); + to_bitField0_ |= 0x00000800; + } + if (((from_bitField0_ & 0x00400000) != 0)) { + result.configurableBillingApproach_ = configurableBillingApproach_; + } + if (((from_bitField0_ & 0x00800000) != 0)) { + result.configurableBillingApproachUpdateTime_ = + configurableBillingApproachUpdateTimeBuilder_ == null + ? configurableBillingApproachUpdateTime_ + : configurableBillingApproachUpdateTimeBuilder_.build(); + to_bitField0_ |= 0x00001000; + } + result.bitField0_ |= to_bitField0_; } - if (((bitField0_ & 0x00000020) != 0)) { - output.writeMessage(27, getDocumentProcessingConfig()); + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.discoveryengine.v1beta.DataStore) { + return mergeFrom((com.google.cloud.discoveryengine.v1beta.DataStore) other); + } else { + super.mergeFrom(other); + return this; + } } - if (((bitField0_ & 0x00000040) != 0)) { - output.writeMessage(28, getStartingSchema()); + + public Builder mergeFrom(com.google.cloud.discoveryengine.v1beta.DataStore other) { + if (other == com.google.cloud.discoveryengine.v1beta.DataStore.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.industryVertical_ != 0) { + setIndustryVerticalValue(other.getIndustryVerticalValue()); + } + if (!other.solutionTypes_.isEmpty()) { + if (solutionTypes_.isEmpty()) { + solutionTypes_ = other.solutionTypes_; + solutionTypes_.makeImmutable(); + bitField0_ |= 0x00000008; + } else { + ensureSolutionTypesIsMutable(); + solutionTypes_.addAll(other.solutionTypes_); + } + onChanged(); + } + if (!other.getDefaultSchemaId().isEmpty()) { + defaultSchemaId_ = other.defaultSchemaId_; + bitField0_ |= 0x00000010; + onChanged(); + } + if (other.contentConfig_ != 0) { + setContentConfigValue(other.getContentConfigValue()); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasAdvancedSiteSearchConfig()) { + mergeAdvancedSiteSearchConfig(other.getAdvancedSiteSearchConfig()); + } + if (other.hasLanguageInfo()) { + mergeLanguageInfo(other.getLanguageInfo()); + } + if (other.hasNaturalLanguageQueryUnderstandingConfig()) { + mergeNaturalLanguageQueryUnderstandingConfig( + other.getNaturalLanguageQueryUnderstandingConfig()); + } + if (!other.getKmsKeyName().isEmpty()) { + kmsKeyName_ = other.kmsKeyName_; + bitField0_ |= 0x00000400; + onChanged(); + } + if (other.hasCmekConfig()) { + mergeCmekConfig(other.getCmekConfig()); + } + if (other.hasBillingEstimation()) { + mergeBillingEstimation(other.getBillingEstimation()); + } + if (other.getAclEnabled() != false) { + setAclEnabled(other.getAclEnabled()); + } + if (other.hasWorkspaceConfig()) { + mergeWorkspaceConfig(other.getWorkspaceConfig()); + } + if (other.hasDocumentProcessingConfig()) { + mergeDocumentProcessingConfig(other.getDocumentProcessingConfig()); + } + if (other.hasStartingSchema()) { + mergeStartingSchema(other.getStartingSchema()); + } + if (other.hasHealthcareFhirConfig()) { + mergeHealthcareFhirConfig(other.getHealthcareFhirConfig()); + } + if (other.hasServingConfigDataStore()) { + mergeServingConfigDataStore(other.getServingConfigDataStore()); + } + if (!other.getIdentityMappingStore().isEmpty()) { + identityMappingStore_ = other.identityMappingStore_; + bitField0_ |= 0x00080000; + onChanged(); + } + if (other.getIsInfobotFaqDataStore() != false) { + setIsInfobotFaqDataStore(other.getIsInfobotFaqDataStore()); + } + if (other.hasFederatedSearchConfig()) { + mergeFederatedSearchConfig(other.getFederatedSearchConfig()); + } + if (other.configurableBillingApproach_ != 0) { + setConfigurableBillingApproachValue(other.getConfigurableBillingApproachValue()); + } + if (other.hasConfigurableBillingApproachUpdateTime()) { + mergeConfigurableBillingApproachUpdateTime( + other.getConfigurableBillingApproachUpdateTime()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; } - if (((bitField0_ & 0x00000080) != 0)) { - output.writeMessage(30, getServingConfigDataStore()); + + @java.lang.Override + public final boolean isInitialized() { + return true; } - if (((bitField0_ & 0x00000004) != 0)) { - output.writeMessage(34, getNaturalLanguageQueryUnderstandingConfig()); + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + displayName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: + { + industryVertical_ = input.readEnum(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 34: + { + input.readMessage( + internalGetCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000040; + break; + } // case 34 + case 40: + { + int tmpRaw = input.readEnum(); + ensureSolutionTypesIsMutable(); + solutionTypes_.addInt(tmpRaw); + break; + } // case 40 + case 42: + { + int length = input.readRawVarint32(); + int limit = input.pushLimit(length); + ensureSolutionTypesIsMutable(); + while (input.getBytesUntilLimit() > 0) { + solutionTypes_.addInt(input.readEnum()); + } + input.popLimit(limit); + break; + } // case 42 + case 48: + { + contentConfig_ = input.readEnum(); + bitField0_ |= 0x00000020; + break; + } // case 48 + case 58: + { + defaultSchemaId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 58 + case 98: + { + input.readMessage( + internalGetAdvancedSiteSearchConfigFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000080; + break; + } // case 98 + case 114: + { + input.readMessage( + internalGetLanguageInfoFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000100; + break; + } // case 114 + case 146: + { + input.readMessage( + internalGetCmekConfigFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000800; + break; + } // case 146 + case 186: + { + input.readMessage( + internalGetBillingEstimationFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00001000; + break; + } // case 186 + case 192: + { + aclEnabled_ = input.readBool(); + bitField0_ |= 0x00002000; + break; + } // case 192 + case 202: + { + input.readMessage( + internalGetWorkspaceConfigFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00004000; + break; + } // case 202 + case 218: + { + input.readMessage( + internalGetDocumentProcessingConfigFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00008000; + break; + } // case 218 + case 226: + { + input.readMessage( + internalGetStartingSchemaFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00010000; + break; + } // case 226 + case 234: + { + input.readMessage( + internalGetHealthcareFhirConfigFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00020000; + break; + } // case 234 + case 242: + { + input.readMessage( + internalGetServingConfigDataStoreFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00040000; + break; + } // case 242 + case 250: + { + identityMappingStore_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00080000; + break; + } // case 250 + case 258: + { + kmsKeyName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000400; + break; + } // case 258 + case 274: + { + input.readMessage( + internalGetNaturalLanguageQueryUnderstandingConfigFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000200; + break; + } // case 274 + case 296: + { + isInfobotFaqDataStore_ = input.readBool(); + bitField0_ |= 0x00100000; + break; + } // case 296 + case 306: + { + input.readMessage( + internalGetFederatedSearchConfigFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00200000; + break; + } // case 306 + case 360: + { + configurableBillingApproach_ = input.readEnum(); + bitField0_ |= 0x00400000; + break; + } // case 360 + case 370: + { + input.readMessage( + internalGetConfigurableBillingApproachUpdateTimeFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00800000; + break; + } // case 370 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; } - getUnknownFields().writeTo(output); - } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; + private int bitField0_; - size = 0; - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(displayName_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(2, displayName_); - } - if (industryVertical_ - != com.google.cloud.discoveryengine.v1beta.IndustryVertical.INDUSTRY_VERTICAL_UNSPECIFIED - .getNumber()) { - size += com.google.protobuf.CodedOutputStream.computeEnumSize(3, industryVertical_); - } - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getCreateTime()); - } - { - int dataSize = 0; - for (int i = 0; i < solutionTypes_.size(); i++) { - dataSize += - com.google.protobuf.CodedOutputStream.computeEnumSizeNoTag(solutionTypes_.getInt(i)); - } - size += dataSize; - if (!getSolutionTypesList().isEmpty()) { - size += 1; - size += com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(dataSize); + private java.lang.Object name_ = ""; + + /** + * + * + *
            +     * Immutable. Identifier. The full resource name of the data store.
            +     * Format:
            +     * `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`.
            +     *
            +     * This field must be a UTF-8 encoded string with a length limit of 1024
            +     * characters.
            +     * 
            + * + * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = IDENTIFIER]; + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; } - solutionTypesMemoizedSerializedSize = dataSize; - } - if (contentConfig_ - != com.google.cloud.discoveryengine.v1beta.DataStore.ContentConfig - .CONTENT_CONFIG_UNSPECIFIED - .getNumber()) { - size += com.google.protobuf.CodedOutputStream.computeEnumSize(6, contentConfig_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(defaultSchemaId_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(7, defaultSchemaId_); } - if (((bitField0_ & 0x00000002) != 0)) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(14, getLanguageInfo()); - } - if (((bitField0_ & 0x00000008) != 0)) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(23, getBillingEstimation()); - } - if (((bitField0_ & 0x00000010) != 0)) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(25, getWorkspaceConfig()); + + /** + * + * + *
            +     * Immutable. Identifier. The full resource name of the data store.
            +     * Format:
            +     * `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`.
            +     *
            +     * This field must be a UTF-8 encoded string with a length limit of 1024
            +     * characters.
            +     * 
            + * + * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = IDENTIFIER]; + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } } - if (((bitField0_ & 0x00000020) != 0)) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 27, getDocumentProcessingConfig()); + + /** + * + * + *
            +     * Immutable. Identifier. The full resource name of the data store.
            +     * Format:
            +     * `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`.
            +     *
            +     * This field must be a UTF-8 encoded string with a length limit of 1024
            +     * characters.
            +     * 
            + * + * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = IDENTIFIER]; + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; } - if (((bitField0_ & 0x00000040) != 0)) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(28, getStartingSchema()); + + /** + * + * + *
            +     * Immutable. Identifier. The full resource name of the data store.
            +     * Format:
            +     * `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`.
            +     *
            +     * This field must be a UTF-8 encoded string with a length limit of 1024
            +     * characters.
            +     * 
            + * + * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = IDENTIFIER]; + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; } - if (((bitField0_ & 0x00000080) != 0)) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize(30, getServingConfigDataStore()); + + /** + * + * + *
            +     * Immutable. Identifier. The full resource name of the data store.
            +     * Format:
            +     * `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`.
            +     *
            +     * This field must be a UTF-8 encoded string with a length limit of 1024
            +     * characters.
            +     * 
            + * + * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = IDENTIFIER]; + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; } - if (((bitField0_ & 0x00000004) != 0)) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 34, getNaturalLanguageQueryUnderstandingConfig()); + + private java.lang.Object displayName_ = ""; + + /** + * + * + *
            +     * Required. The data store display name.
            +     *
            +     * This field must be a UTF-8 encoded string with a length limit of 128
            +     * characters. Otherwise, an INVALID_ARGUMENT error is returned.
            +     * 
            + * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The displayName. + */ + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; + /** + * + * + *
            +     * Required. The data store display name.
            +     *
            +     * This field must be a UTF-8 encoded string with a length limit of 128
            +     * characters. Otherwise, an INVALID_ARGUMENT error is returned.
            +     * 
            + * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for displayName. + */ + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } } - if (!(obj instanceof com.google.cloud.discoveryengine.v1beta.DataStore)) { - return super.equals(obj); + + /** + * + * + *
            +     * Required. The data store display name.
            +     *
            +     * This field must be a UTF-8 encoded string with a length limit of 128
            +     * characters. Otherwise, an INVALID_ARGUMENT error is returned.
            +     * 
            + * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + displayName_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; } - com.google.cloud.discoveryengine.v1beta.DataStore other = - (com.google.cloud.discoveryengine.v1beta.DataStore) obj; - if (!getName().equals(other.getName())) return false; - if (!getDisplayName().equals(other.getDisplayName())) return false; - if (industryVertical_ != other.industryVertical_) return false; - if (!solutionTypes_.equals(other.solutionTypes_)) return false; - if (!getDefaultSchemaId().equals(other.getDefaultSchemaId())) return false; - if (contentConfig_ != other.contentConfig_) return false; - if (hasCreateTime() != other.hasCreateTime()) return false; - if (hasCreateTime()) { - if (!getCreateTime().equals(other.getCreateTime())) return false; + /** + * + * + *
            +     * Required. The data store display name.
            +     *
            +     * This field must be a UTF-8 encoded string with a length limit of 128
            +     * characters. Otherwise, an INVALID_ARGUMENT error is returned.
            +     * 
            + * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + displayName_ = getDefaultInstance().getDisplayName(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; } - if (hasLanguageInfo() != other.hasLanguageInfo()) return false; - if (hasLanguageInfo()) { - if (!getLanguageInfo().equals(other.getLanguageInfo())) return false; + + /** + * + * + *
            +     * Required. The data store display name.
            +     *
            +     * This field must be a UTF-8 encoded string with a length limit of 128
            +     * characters. Otherwise, an INVALID_ARGUMENT error is returned.
            +     * 
            + * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + displayName_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; } - if (hasNaturalLanguageQueryUnderstandingConfig() - != other.hasNaturalLanguageQueryUnderstandingConfig()) return false; - if (hasNaturalLanguageQueryUnderstandingConfig()) { - if (!getNaturalLanguageQueryUnderstandingConfig() - .equals(other.getNaturalLanguageQueryUnderstandingConfig())) return false; + + private int industryVertical_ = 0; + + /** + * + * + *
            +     * Immutable. The industry vertical that the data store registers.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.IndustryVertical industry_vertical = 3 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The enum numeric value on the wire for industryVertical. + */ + @java.lang.Override + public int getIndustryVerticalValue() { + return industryVertical_; } - if (hasBillingEstimation() != other.hasBillingEstimation()) return false; - if (hasBillingEstimation()) { - if (!getBillingEstimation().equals(other.getBillingEstimation())) return false; + + /** + * + * + *
            +     * Immutable. The industry vertical that the data store registers.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.IndustryVertical industry_vertical = 3 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @param value The enum numeric value on the wire for industryVertical to set. + * @return This builder for chaining. + */ + public Builder setIndustryVerticalValue(int value) { + industryVertical_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; } - if (hasWorkspaceConfig() != other.hasWorkspaceConfig()) return false; - if (hasWorkspaceConfig()) { - if (!getWorkspaceConfig().equals(other.getWorkspaceConfig())) return false; + + /** + * + * + *
            +     * Immutable. The industry vertical that the data store registers.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.IndustryVertical industry_vertical = 3 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The industryVertical. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.IndustryVertical getIndustryVertical() { + com.google.cloud.discoveryengine.v1beta.IndustryVertical result = + com.google.cloud.discoveryengine.v1beta.IndustryVertical.forNumber(industryVertical_); + return result == null + ? com.google.cloud.discoveryengine.v1beta.IndustryVertical.UNRECOGNIZED + : result; } - if (hasDocumentProcessingConfig() != other.hasDocumentProcessingConfig()) return false; - if (hasDocumentProcessingConfig()) { - if (!getDocumentProcessingConfig().equals(other.getDocumentProcessingConfig())) return false; + + /** + * + * + *
            +     * Immutable. The industry vertical that the data store registers.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.IndustryVertical industry_vertical = 3 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @param value The industryVertical to set. + * @return This builder for chaining. + */ + public Builder setIndustryVertical( + com.google.cloud.discoveryengine.v1beta.IndustryVertical value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000004; + industryVertical_ = value.getNumber(); + onChanged(); + return this; } - if (hasStartingSchema() != other.hasStartingSchema()) return false; - if (hasStartingSchema()) { - if (!getStartingSchema().equals(other.getStartingSchema())) return false; + + /** + * + * + *
            +     * Immutable. The industry vertical that the data store registers.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.IndustryVertical industry_vertical = 3 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return This builder for chaining. + */ + public Builder clearIndustryVertical() { + bitField0_ = (bitField0_ & ~0x00000004); + industryVertical_ = 0; + onChanged(); + return this; } - if (hasServingConfigDataStore() != other.hasServingConfigDataStore()) return false; - if (hasServingConfigDataStore()) { - if (!getServingConfigDataStore().equals(other.getServingConfigDataStore())) return false; + + private com.google.protobuf.Internal.IntList solutionTypes_ = emptyIntList(); + + private void ensureSolutionTypesIsMutable() { + if (!solutionTypes_.isModifiable()) { + solutionTypes_ = makeMutableCopy(solutionTypes_); + } + bitField0_ |= 0x00000008; } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; + /** + * + * + *
            +     * The solutions that the data store enrolls. Available solutions for each
            +     * [industry_vertical][google.cloud.discoveryengine.v1beta.DataStore.industry_vertical]:
            +     *
            +     * * `MEDIA`: `SOLUTION_TYPE_RECOMMENDATION` and `SOLUTION_TYPE_SEARCH`.
            +     * * `SITE_SEARCH`: `SOLUTION_TYPE_SEARCH` is automatically enrolled. Other
            +     * solutions cannot be enrolled.
            +     * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.SolutionType solution_types = 5; + * + * @return A list containing the solutionTypes. + */ + public java.util.List + getSolutionTypesList() { + return new com.google.protobuf.Internal.IntListAdapter< + com.google.cloud.discoveryengine.v1beta.SolutionType>( + solutionTypes_, solutionTypes_converter_); } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; - hash = (53 * hash) + getDisplayName().hashCode(); - hash = (37 * hash) + INDUSTRY_VERTICAL_FIELD_NUMBER; - hash = (53 * hash) + industryVertical_; - if (getSolutionTypesCount() > 0) { - hash = (37 * hash) + SOLUTION_TYPES_FIELD_NUMBER; - hash = (53 * hash) + solutionTypes_.hashCode(); + + /** + * + * + *
            +     * The solutions that the data store enrolls. Available solutions for each
            +     * [industry_vertical][google.cloud.discoveryengine.v1beta.DataStore.industry_vertical]:
            +     *
            +     * * `MEDIA`: `SOLUTION_TYPE_RECOMMENDATION` and `SOLUTION_TYPE_SEARCH`.
            +     * * `SITE_SEARCH`: `SOLUTION_TYPE_SEARCH` is automatically enrolled. Other
            +     * solutions cannot be enrolled.
            +     * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.SolutionType solution_types = 5; + * + * @return The count of solutionTypes. + */ + public int getSolutionTypesCount() { + return solutionTypes_.size(); } - hash = (37 * hash) + DEFAULT_SCHEMA_ID_FIELD_NUMBER; - hash = (53 * hash) + getDefaultSchemaId().hashCode(); - hash = (37 * hash) + CONTENT_CONFIG_FIELD_NUMBER; - hash = (53 * hash) + contentConfig_; - if (hasCreateTime()) { - hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; - hash = (53 * hash) + getCreateTime().hashCode(); + + /** + * + * + *
            +     * The solutions that the data store enrolls. Available solutions for each
            +     * [industry_vertical][google.cloud.discoveryengine.v1beta.DataStore.industry_vertical]:
            +     *
            +     * * `MEDIA`: `SOLUTION_TYPE_RECOMMENDATION` and `SOLUTION_TYPE_SEARCH`.
            +     * * `SITE_SEARCH`: `SOLUTION_TYPE_SEARCH` is automatically enrolled. Other
            +     * solutions cannot be enrolled.
            +     * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.SolutionType solution_types = 5; + * + * @param index The index of the element to return. + * @return The solutionTypes at the given index. + */ + public com.google.cloud.discoveryengine.v1beta.SolutionType getSolutionTypes(int index) { + return solutionTypes_converter_.convert(solutionTypes_.getInt(index)); } - if (hasLanguageInfo()) { - hash = (37 * hash) + LANGUAGE_INFO_FIELD_NUMBER; - hash = (53 * hash) + getLanguageInfo().hashCode(); + + /** + * + * + *
            +     * The solutions that the data store enrolls. Available solutions for each
            +     * [industry_vertical][google.cloud.discoveryengine.v1beta.DataStore.industry_vertical]:
            +     *
            +     * * `MEDIA`: `SOLUTION_TYPE_RECOMMENDATION` and `SOLUTION_TYPE_SEARCH`.
            +     * * `SITE_SEARCH`: `SOLUTION_TYPE_SEARCH` is automatically enrolled. Other
            +     * solutions cannot be enrolled.
            +     * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.SolutionType solution_types = 5; + * + * @param index The index to set the value at. + * @param value The solutionTypes to set. + * @return This builder for chaining. + */ + public Builder setSolutionTypes( + int index, com.google.cloud.discoveryengine.v1beta.SolutionType value) { + if (value == null) { + throw new NullPointerException(); + } + ensureSolutionTypesIsMutable(); + solutionTypes_.setInt(index, value.getNumber()); + onChanged(); + return this; } - if (hasNaturalLanguageQueryUnderstandingConfig()) { - hash = (37 * hash) + NATURAL_LANGUAGE_QUERY_UNDERSTANDING_CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getNaturalLanguageQueryUnderstandingConfig().hashCode(); + + /** + * + * + *
            +     * The solutions that the data store enrolls. Available solutions for each
            +     * [industry_vertical][google.cloud.discoveryengine.v1beta.DataStore.industry_vertical]:
            +     *
            +     * * `MEDIA`: `SOLUTION_TYPE_RECOMMENDATION` and `SOLUTION_TYPE_SEARCH`.
            +     * * `SITE_SEARCH`: `SOLUTION_TYPE_SEARCH` is automatically enrolled. Other
            +     * solutions cannot be enrolled.
            +     * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.SolutionType solution_types = 5; + * + * @param value The solutionTypes to add. + * @return This builder for chaining. + */ + public Builder addSolutionTypes(com.google.cloud.discoveryengine.v1beta.SolutionType value) { + if (value == null) { + throw new NullPointerException(); + } + ensureSolutionTypesIsMutable(); + solutionTypes_.addInt(value.getNumber()); + onChanged(); + return this; } - if (hasBillingEstimation()) { - hash = (37 * hash) + BILLING_ESTIMATION_FIELD_NUMBER; - hash = (53 * hash) + getBillingEstimation().hashCode(); + + /** + * + * + *
            +     * The solutions that the data store enrolls. Available solutions for each
            +     * [industry_vertical][google.cloud.discoveryengine.v1beta.DataStore.industry_vertical]:
            +     *
            +     * * `MEDIA`: `SOLUTION_TYPE_RECOMMENDATION` and `SOLUTION_TYPE_SEARCH`.
            +     * * `SITE_SEARCH`: `SOLUTION_TYPE_SEARCH` is automatically enrolled. Other
            +     * solutions cannot be enrolled.
            +     * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.SolutionType solution_types = 5; + * + * @param values The solutionTypes to add. + * @return This builder for chaining. + */ + public Builder addAllSolutionTypes( + java.lang.Iterable values) { + ensureSolutionTypesIsMutable(); + for (com.google.cloud.discoveryengine.v1beta.SolutionType value : values) { + solutionTypes_.addInt(value.getNumber()); + } + onChanged(); + return this; } - if (hasWorkspaceConfig()) { - hash = (37 * hash) + WORKSPACE_CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getWorkspaceConfig().hashCode(); + + /** + * + * + *
            +     * The solutions that the data store enrolls. Available solutions for each
            +     * [industry_vertical][google.cloud.discoveryengine.v1beta.DataStore.industry_vertical]:
            +     *
            +     * * `MEDIA`: `SOLUTION_TYPE_RECOMMENDATION` and `SOLUTION_TYPE_SEARCH`.
            +     * * `SITE_SEARCH`: `SOLUTION_TYPE_SEARCH` is automatically enrolled. Other
            +     * solutions cannot be enrolled.
            +     * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.SolutionType solution_types = 5; + * + * @return This builder for chaining. + */ + public Builder clearSolutionTypes() { + solutionTypes_ = emptyIntList(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; } - if (hasDocumentProcessingConfig()) { - hash = (37 * hash) + DOCUMENT_PROCESSING_CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getDocumentProcessingConfig().hashCode(); + + /** + * + * + *
            +     * The solutions that the data store enrolls. Available solutions for each
            +     * [industry_vertical][google.cloud.discoveryengine.v1beta.DataStore.industry_vertical]:
            +     *
            +     * * `MEDIA`: `SOLUTION_TYPE_RECOMMENDATION` and `SOLUTION_TYPE_SEARCH`.
            +     * * `SITE_SEARCH`: `SOLUTION_TYPE_SEARCH` is automatically enrolled. Other
            +     * solutions cannot be enrolled.
            +     * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.SolutionType solution_types = 5; + * + * @return A list containing the enum numeric values on the wire for solutionTypes. + */ + public java.util.List getSolutionTypesValueList() { + solutionTypes_.makeImmutable(); + return solutionTypes_; } - if (hasStartingSchema()) { - hash = (37 * hash) + STARTING_SCHEMA_FIELD_NUMBER; - hash = (53 * hash) + getStartingSchema().hashCode(); + + /** + * + * + *
            +     * The solutions that the data store enrolls. Available solutions for each
            +     * [industry_vertical][google.cloud.discoveryengine.v1beta.DataStore.industry_vertical]:
            +     *
            +     * * `MEDIA`: `SOLUTION_TYPE_RECOMMENDATION` and `SOLUTION_TYPE_SEARCH`.
            +     * * `SITE_SEARCH`: `SOLUTION_TYPE_SEARCH` is automatically enrolled. Other
            +     * solutions cannot be enrolled.
            +     * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.SolutionType solution_types = 5; + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of solutionTypes at the given index. + */ + public int getSolutionTypesValue(int index) { + return solutionTypes_.getInt(index); } - if (hasServingConfigDataStore()) { - hash = (37 * hash) + SERVING_CONFIG_DATA_STORE_FIELD_NUMBER; - hash = (53 * hash) + getServingConfigDataStore().hashCode(); + + /** + * + * + *
            +     * The solutions that the data store enrolls. Available solutions for each
            +     * [industry_vertical][google.cloud.discoveryengine.v1beta.DataStore.industry_vertical]:
            +     *
            +     * * `MEDIA`: `SOLUTION_TYPE_RECOMMENDATION` and `SOLUTION_TYPE_SEARCH`.
            +     * * `SITE_SEARCH`: `SOLUTION_TYPE_SEARCH` is automatically enrolled. Other
            +     * solutions cannot be enrolled.
            +     * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.SolutionType solution_types = 5; + * + * @param index The index to set the value at. + * @param value The enum numeric value on the wire for solutionTypes to set. + * @return This builder for chaining. + */ + public Builder setSolutionTypesValue(int index, int value) { + ensureSolutionTypesIsMutable(); + solutionTypes_.setInt(index, value); + onChanged(); + return this; } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.discoveryengine.v1beta.DataStore parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.discoveryengine.v1beta.DataStore 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.discoveryengine.v1beta.DataStore parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } + /** + * + * + *
            +     * The solutions that the data store enrolls. Available solutions for each
            +     * [industry_vertical][google.cloud.discoveryengine.v1beta.DataStore.industry_vertical]:
            +     *
            +     * * `MEDIA`: `SOLUTION_TYPE_RECOMMENDATION` and `SOLUTION_TYPE_SEARCH`.
            +     * * `SITE_SEARCH`: `SOLUTION_TYPE_SEARCH` is automatically enrolled. Other
            +     * solutions cannot be enrolled.
            +     * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.SolutionType solution_types = 5; + * + * @param value The enum numeric value on the wire for solutionTypes to add. + * @return This builder for chaining. + */ + public Builder addSolutionTypesValue(int value) { + ensureSolutionTypesIsMutable(); + solutionTypes_.addInt(value); + onChanged(); + return this; + } - public static com.google.cloud.discoveryengine.v1beta.DataStore parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } + /** + * + * + *
            +     * The solutions that the data store enrolls. Available solutions for each
            +     * [industry_vertical][google.cloud.discoveryengine.v1beta.DataStore.industry_vertical]:
            +     *
            +     * * `MEDIA`: `SOLUTION_TYPE_RECOMMENDATION` and `SOLUTION_TYPE_SEARCH`.
            +     * * `SITE_SEARCH`: `SOLUTION_TYPE_SEARCH` is automatically enrolled. Other
            +     * solutions cannot be enrolled.
            +     * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.SolutionType solution_types = 5; + * + * @param values The enum numeric values on the wire for solutionTypes to add. + * @return This builder for chaining. + */ + public Builder addAllSolutionTypesValue(java.lang.Iterable values) { + ensureSolutionTypesIsMutable(); + for (int value : values) { + solutionTypes_.addInt(value); + } + onChanged(); + return this; + } - public static com.google.cloud.discoveryengine.v1beta.DataStore parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } + private java.lang.Object defaultSchemaId_ = ""; - public static com.google.cloud.discoveryengine.v1beta.DataStore parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } + /** + * + * + *
            +     * Output only. The id of the default
            +     * [Schema][google.cloud.discoveryengine.v1beta.Schema] associated to this
            +     * data store.
            +     * 
            + * + * string default_schema_id = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The defaultSchemaId. + */ + public java.lang.String getDefaultSchemaId() { + java.lang.Object ref = defaultSchemaId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + defaultSchemaId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } - public static com.google.cloud.discoveryengine.v1beta.DataStore parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } + /** + * + * + *
            +     * Output only. The id of the default
            +     * [Schema][google.cloud.discoveryengine.v1beta.Schema] associated to this
            +     * data store.
            +     * 
            + * + * string default_schema_id = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for defaultSchemaId. + */ + public com.google.protobuf.ByteString getDefaultSchemaIdBytes() { + java.lang.Object ref = defaultSchemaId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + defaultSchemaId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } - public static com.google.cloud.discoveryengine.v1beta.DataStore parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } + /** + * + * + *
            +     * Output only. The id of the default
            +     * [Schema][google.cloud.discoveryengine.v1beta.Schema] associated to this
            +     * data store.
            +     * 
            + * + * string default_schema_id = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The defaultSchemaId to set. + * @return This builder for chaining. + */ + public Builder setDefaultSchemaId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + defaultSchemaId_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } - public static com.google.cloud.discoveryengine.v1beta.DataStore parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } + /** + * + * + *
            +     * Output only. The id of the default
            +     * [Schema][google.cloud.discoveryengine.v1beta.Schema] associated to this
            +     * data store.
            +     * 
            + * + * string default_schema_id = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearDefaultSchemaId() { + defaultSchemaId_ = getDefaultInstance().getDefaultSchemaId(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } - public static com.google.cloud.discoveryengine.v1beta.DataStore parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } + /** + * + * + *
            +     * Output only. The id of the default
            +     * [Schema][google.cloud.discoveryengine.v1beta.Schema] associated to this
            +     * data store.
            +     * 
            + * + * string default_schema_id = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for defaultSchemaId to set. + * @return This builder for chaining. + */ + public Builder setDefaultSchemaIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + defaultSchemaId_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } - public static com.google.cloud.discoveryengine.v1beta.DataStore parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } + private int contentConfig_ = 0; - public static com.google.cloud.discoveryengine.v1beta.DataStore parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } + /** + * + * + *
            +     * Immutable. The content config of the data store. If this field is unset,
            +     * the server behavior defaults to
            +     * [ContentConfig.NO_CONTENT][google.cloud.discoveryengine.v1beta.DataStore.ContentConfig.NO_CONTENT].
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.DataStore.ContentConfig content_config = 6 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The enum numeric value on the wire for contentConfig. + */ + @java.lang.Override + public int getContentConfigValue() { + return contentConfig_; + } - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } + /** + * + * + *
            +     * Immutable. The content config of the data store. If this field is unset,
            +     * the server behavior defaults to
            +     * [ContentConfig.NO_CONTENT][google.cloud.discoveryengine.v1beta.DataStore.ContentConfig.NO_CONTENT].
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.DataStore.ContentConfig content_config = 6 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @param value The enum numeric value on the wire for contentConfig to set. + * @return This builder for chaining. + */ + public Builder setContentConfigValue(int value) { + contentConfig_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } + /** + * + * + *
            +     * Immutable. The content config of the data store. If this field is unset,
            +     * the server behavior defaults to
            +     * [ContentConfig.NO_CONTENT][google.cloud.discoveryengine.v1beta.DataStore.ContentConfig.NO_CONTENT].
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.DataStore.ContentConfig content_config = 6 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The contentConfig. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.DataStore.ContentConfig getContentConfig() { + com.google.cloud.discoveryengine.v1beta.DataStore.ContentConfig result = + com.google.cloud.discoveryengine.v1beta.DataStore.ContentConfig.forNumber(contentConfig_); + return result == null + ? com.google.cloud.discoveryengine.v1beta.DataStore.ContentConfig.UNRECOGNIZED + : result; + } - public static Builder newBuilder(com.google.cloud.discoveryengine.v1beta.DataStore prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } + /** + * + * + *
            +     * Immutable. The content config of the data store. If this field is unset,
            +     * the server behavior defaults to
            +     * [ContentConfig.NO_CONTENT][google.cloud.discoveryengine.v1beta.DataStore.ContentConfig.NO_CONTENT].
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.DataStore.ContentConfig content_config = 6 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @param value The contentConfig to set. + * @return This builder for chaining. + */ + public Builder setContentConfig( + com.google.cloud.discoveryengine.v1beta.DataStore.ContentConfig value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000020; + contentConfig_ = value.getNumber(); + onChanged(); + return this; + } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } + /** + * + * + *
            +     * Immutable. The content config of the data store. If this field is unset,
            +     * the server behavior defaults to
            +     * [ContentConfig.NO_CONTENT][google.cloud.discoveryengine.v1beta.DataStore.ContentConfig.NO_CONTENT].
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.DataStore.ContentConfig content_config = 6 [(.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return This builder for chaining. + */ + public Builder clearContentConfig() { + bitField0_ = (bitField0_ & ~0x00000020); + contentConfig_ = 0; + onChanged(); + return this; + } - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; - /** - * - * - *
            -   * DataStore captures global settings and configs at the DataStore level.
            -   * 
            - * - * Protobuf type {@code google.cloud.discoveryengine.v1beta.DataStore} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.DataStore) - com.google.cloud.discoveryengine.v1beta.DataStoreOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.discoveryengine.v1beta.DataStoreProto - .internal_static_google_cloud_discoveryengine_v1beta_DataStore_descriptor; + /** + * + * + *
            +     * Output only. Timestamp the
            +     * [DataStore][google.cloud.discoveryengine.v1beta.DataStore] was created at.
            +     * 
            + * + * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000040) != 0); } - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.discoveryengine.v1beta.DataStoreProto - .internal_static_google_cloud_discoveryengine_v1beta_DataStore_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.discoveryengine.v1beta.DataStore.class, - com.google.cloud.discoveryengine.v1beta.DataStore.Builder.class); + /** + * + * + *
            +     * Output only. Timestamp the
            +     * [DataStore][google.cloud.discoveryengine.v1beta.DataStore] was created at.
            +     * 
            + * + * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } } - // Construct using com.google.cloud.discoveryengine.v1beta.DataStore.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); + /** + * + * + *
            +     * Output only. Timestamp the
            +     * [DataStore][google.cloud.discoveryengine.v1beta.DataStore] was created at.
            +     * 
            + * + * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + } else { + createTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; } - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); + /** + * + * + *
            +     * Output only. Timestamp the
            +     * [DataStore][google.cloud.discoveryengine.v1beta.DataStore] was created at.
            +     * 
            + * + * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - internalGetCreateTimeFieldBuilder(); - internalGetLanguageInfoFieldBuilder(); - internalGetNaturalLanguageQueryUnderstandingConfigFieldBuilder(); - internalGetBillingEstimationFieldBuilder(); - internalGetWorkspaceConfigFieldBuilder(); - internalGetDocumentProcessingConfigFieldBuilder(); - internalGetStartingSchemaFieldBuilder(); - internalGetServingConfigDataStoreFieldBuilder(); + /** + * + * + *
            +     * Output only. Timestamp the
            +     * [DataStore][google.cloud.discoveryengine.v1beta.DataStore] was created at.
            +     * 
            + * + * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 0x00000040) != 0) + && createTime_ != null + && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); } + if (createTime_ != null) { + bitField0_ |= 0x00000040; + onChanged(); + } + return this; } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - name_ = ""; - displayName_ = ""; - industryVertical_ = 0; - solutionTypes_ = emptyIntList(); - defaultSchemaId_ = ""; - contentConfig_ = 0; + /** + * + * + *
            +     * Output only. Timestamp the
            +     * [DataStore][google.cloud.discoveryengine.v1beta.DataStore] was created at.
            +     * 
            + * + * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000040); createTime_ = null; if (createTimeBuilder_ != null) { createTimeBuilder_.dispose(); createTimeBuilder_ = null; } - languageInfo_ = null; - if (languageInfoBuilder_ != null) { - languageInfoBuilder_.dispose(); - languageInfoBuilder_ = null; - } - naturalLanguageQueryUnderstandingConfig_ = null; - if (naturalLanguageQueryUnderstandingConfigBuilder_ != null) { - naturalLanguageQueryUnderstandingConfigBuilder_.dispose(); - naturalLanguageQueryUnderstandingConfigBuilder_ = null; - } - billingEstimation_ = null; - if (billingEstimationBuilder_ != null) { - billingEstimationBuilder_.dispose(); - billingEstimationBuilder_ = null; - } - workspaceConfig_ = null; - if (workspaceConfigBuilder_ != null) { - workspaceConfigBuilder_.dispose(); - workspaceConfigBuilder_ = null; - } - documentProcessingConfig_ = null; - if (documentProcessingConfigBuilder_ != null) { - documentProcessingConfigBuilder_.dispose(); - documentProcessingConfigBuilder_ = null; - } - startingSchema_ = null; - if (startingSchemaBuilder_ != null) { - startingSchemaBuilder_.dispose(); - startingSchemaBuilder_ = null; - } - servingConfigDataStore_ = null; - if (servingConfigDataStoreBuilder_ != null) { - servingConfigDataStoreBuilder_.dispose(); - servingConfigDataStoreBuilder_ = null; - } + onChanged(); return this; } - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.discoveryengine.v1beta.DataStoreProto - .internal_static_google_cloud_discoveryengine_v1beta_DataStore_descriptor; + /** + * + * + *
            +     * Output only. Timestamp the
            +     * [DataStore][google.cloud.discoveryengine.v1beta.DataStore] was created at.
            +     * 
            + * + * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000040; + onChanged(); + return internalGetCreateTimeFieldBuilder().getBuilder(); } - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.DataStore getDefaultInstanceForType() { - return com.google.cloud.discoveryengine.v1beta.DataStore.getDefaultInstance(); + /** + * + * + *
            +     * Output only. Timestamp the
            +     * [DataStore][google.cloud.discoveryengine.v1beta.DataStore] was created at.
            +     * 
            + * + * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } } - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.DataStore build() { - com.google.cloud.discoveryengine.v1beta.DataStore result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); + /** + * + * + *
            +     * Output only. Timestamp the
            +     * [DataStore][google.cloud.discoveryengine.v1beta.DataStore] was created at.
            +     * 
            + * + * + * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + internalGetCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; } - return result; + return createTimeBuilder_; } - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.DataStore buildPartial() { - com.google.cloud.discoveryengine.v1beta.DataStore result = - new com.google.cloud.discoveryengine.v1beta.DataStore(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; + private com.google.cloud.discoveryengine.v1beta.AdvancedSiteSearchConfig + advancedSiteSearchConfig_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.AdvancedSiteSearchConfig, + com.google.cloud.discoveryengine.v1beta.AdvancedSiteSearchConfig.Builder, + com.google.cloud.discoveryengine.v1beta.AdvancedSiteSearchConfigOrBuilder> + advancedSiteSearchConfigBuilder_; + + /** + * + * + *
            +     * Optional. Configuration for advanced site search.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AdvancedSiteSearchConfig advanced_site_search_config = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the advancedSiteSearchConfig field is set. + */ + public boolean hasAdvancedSiteSearchConfig() { + return ((bitField0_ & 0x00000080) != 0); } - private void buildPartial0(com.google.cloud.discoveryengine.v1beta.DataStore result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.name_ = name_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.displayName_ = displayName_; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.industryVertical_ = industryVertical_; - } - if (((from_bitField0_ & 0x00000008) != 0)) { - solutionTypes_.makeImmutable(); - result.solutionTypes_ = solutionTypes_; - } - if (((from_bitField0_ & 0x00000010) != 0)) { - result.defaultSchemaId_ = defaultSchemaId_; - } - if (((from_bitField0_ & 0x00000020) != 0)) { - result.contentConfig_ = contentConfig_; - } - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000040) != 0)) { - result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - if (((from_bitField0_ & 0x00000080) != 0)) { - result.languageInfo_ = - languageInfoBuilder_ == null ? languageInfo_ : languageInfoBuilder_.build(); - to_bitField0_ |= 0x00000002; - } - if (((from_bitField0_ & 0x00000100) != 0)) { - result.naturalLanguageQueryUnderstandingConfig_ = - naturalLanguageQueryUnderstandingConfigBuilder_ == null - ? naturalLanguageQueryUnderstandingConfig_ - : naturalLanguageQueryUnderstandingConfigBuilder_.build(); - to_bitField0_ |= 0x00000004; - } - if (((from_bitField0_ & 0x00000200) != 0)) { - result.billingEstimation_ = - billingEstimationBuilder_ == null - ? billingEstimation_ - : billingEstimationBuilder_.build(); - to_bitField0_ |= 0x00000008; - } - if (((from_bitField0_ & 0x00000400) != 0)) { - result.workspaceConfig_ = - workspaceConfigBuilder_ == null ? workspaceConfig_ : workspaceConfigBuilder_.build(); - to_bitField0_ |= 0x00000010; - } - if (((from_bitField0_ & 0x00000800) != 0)) { - result.documentProcessingConfig_ = - documentProcessingConfigBuilder_ == null - ? documentProcessingConfig_ - : documentProcessingConfigBuilder_.build(); - to_bitField0_ |= 0x00000020; - } - if (((from_bitField0_ & 0x00001000) != 0)) { - result.startingSchema_ = - startingSchemaBuilder_ == null ? startingSchema_ : startingSchemaBuilder_.build(); - to_bitField0_ |= 0x00000040; + /** + * + * + *
            +     * Optional. Configuration for advanced site search.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AdvancedSiteSearchConfig advanced_site_search_config = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The advancedSiteSearchConfig. + */ + public com.google.cloud.discoveryengine.v1beta.AdvancedSiteSearchConfig + getAdvancedSiteSearchConfig() { + if (advancedSiteSearchConfigBuilder_ == null) { + return advancedSiteSearchConfig_ == null + ? com.google.cloud.discoveryengine.v1beta.AdvancedSiteSearchConfig.getDefaultInstance() + : advancedSiteSearchConfig_; + } else { + return advancedSiteSearchConfigBuilder_.getMessage(); } - if (((from_bitField0_ & 0x00002000) != 0)) { - result.servingConfigDataStore_ = - servingConfigDataStoreBuilder_ == null - ? servingConfigDataStore_ - : servingConfigDataStoreBuilder_.build(); - to_bitField0_ |= 0x00000080; + } + + /** + * + * + *
            +     * Optional. Configuration for advanced site search.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AdvancedSiteSearchConfig advanced_site_search_config = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setAdvancedSiteSearchConfig( + com.google.cloud.discoveryengine.v1beta.AdvancedSiteSearchConfig value) { + if (advancedSiteSearchConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + advancedSiteSearchConfig_ = value; + } else { + advancedSiteSearchConfigBuilder_.setMessage(value); } - result.bitField0_ |= to_bitField0_; + bitField0_ |= 0x00000080; + onChanged(); + return this; } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.discoveryengine.v1beta.DataStore) { - return mergeFrom((com.google.cloud.discoveryengine.v1beta.DataStore) other); + /** + * + * + *
            +     * Optional. Configuration for advanced site search.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AdvancedSiteSearchConfig advanced_site_search_config = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setAdvancedSiteSearchConfig( + com.google.cloud.discoveryengine.v1beta.AdvancedSiteSearchConfig.Builder builderForValue) { + if (advancedSiteSearchConfigBuilder_ == null) { + advancedSiteSearchConfig_ = builderForValue.build(); } else { - super.mergeFrom(other); - return this; + advancedSiteSearchConfigBuilder_.setMessage(builderForValue.build()); } + bitField0_ |= 0x00000080; + onChanged(); + return this; } - public Builder mergeFrom(com.google.cloud.discoveryengine.v1beta.DataStore other) { - if (other == com.google.cloud.discoveryengine.v1beta.DataStore.getDefaultInstance()) - return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (!other.getDisplayName().isEmpty()) { - displayName_ = other.displayName_; - bitField0_ |= 0x00000002; - onChanged(); - } - if (other.industryVertical_ != 0) { - setIndustryVerticalValue(other.getIndustryVerticalValue()); - } - if (!other.solutionTypes_.isEmpty()) { - if (solutionTypes_.isEmpty()) { - solutionTypes_ = other.solutionTypes_; - solutionTypes_.makeImmutable(); - bitField0_ |= 0x00000008; + /** + * + * + *
            +     * Optional. Configuration for advanced site search.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AdvancedSiteSearchConfig advanced_site_search_config = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeAdvancedSiteSearchConfig( + com.google.cloud.discoveryengine.v1beta.AdvancedSiteSearchConfig value) { + if (advancedSiteSearchConfigBuilder_ == null) { + if (((bitField0_ & 0x00000080) != 0) + && advancedSiteSearchConfig_ != null + && advancedSiteSearchConfig_ + != com.google.cloud.discoveryengine.v1beta.AdvancedSiteSearchConfig + .getDefaultInstance()) { + getAdvancedSiteSearchConfigBuilder().mergeFrom(value); } else { - ensureSolutionTypesIsMutable(); - solutionTypes_.addAll(other.solutionTypes_); + advancedSiteSearchConfig_ = value; } - onChanged(); + } else { + advancedSiteSearchConfigBuilder_.mergeFrom(value); } - if (!other.getDefaultSchemaId().isEmpty()) { - defaultSchemaId_ = other.defaultSchemaId_; - bitField0_ |= 0x00000010; + if (advancedSiteSearchConfig_ != null) { + bitField0_ |= 0x00000080; onChanged(); } - if (other.contentConfig_ != 0) { - setContentConfigValue(other.getContentConfigValue()); - } - if (other.hasCreateTime()) { - mergeCreateTime(other.getCreateTime()); - } - if (other.hasLanguageInfo()) { - mergeLanguageInfo(other.getLanguageInfo()); - } - if (other.hasNaturalLanguageQueryUnderstandingConfig()) { - mergeNaturalLanguageQueryUnderstandingConfig( - other.getNaturalLanguageQueryUnderstandingConfig()); - } - if (other.hasBillingEstimation()) { - mergeBillingEstimation(other.getBillingEstimation()); - } - if (other.hasWorkspaceConfig()) { - mergeWorkspaceConfig(other.getWorkspaceConfig()); - } - if (other.hasDocumentProcessingConfig()) { - mergeDocumentProcessingConfig(other.getDocumentProcessingConfig()); - } - if (other.hasStartingSchema()) { - mergeStartingSchema(other.getStartingSchema()); - } - if (other.hasServingConfigDataStore()) { - mergeServingConfigDataStore(other.getServingConfigDataStore()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); return this; } - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); + /** + * + * + *
            +     * Optional. Configuration for advanced site search.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AdvancedSiteSearchConfig advanced_site_search_config = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearAdvancedSiteSearchConfig() { + bitField0_ = (bitField0_ & ~0x00000080); + advancedSiteSearchConfig_ = null; + if (advancedSiteSearchConfigBuilder_ != null) { + advancedSiteSearchConfigBuilder_.dispose(); + advancedSiteSearchConfigBuilder_ = null; } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - name_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: - { - displayName_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 24: - { - industryVertical_ = input.readEnum(); - bitField0_ |= 0x00000004; - break; - } // case 24 - case 34: - { - input.readMessage( - internalGetCreateTimeFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000040; - break; - } // case 34 - case 40: - { - int tmpRaw = input.readEnum(); - ensureSolutionTypesIsMutable(); - solutionTypes_.addInt(tmpRaw); - break; - } // case 40 - case 42: - { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - ensureSolutionTypesIsMutable(); - while (input.getBytesUntilLimit() > 0) { - solutionTypes_.addInt(input.readEnum()); - } - input.popLimit(limit); - break; - } // case 42 - case 48: - { - contentConfig_ = input.readEnum(); - bitField0_ |= 0x00000020; - break; - } // case 48 - case 58: - { - defaultSchemaId_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000010; - break; - } // case 58 - case 114: - { - input.readMessage( - internalGetLanguageInfoFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000080; - break; - } // case 114 - case 186: - { - input.readMessage( - internalGetBillingEstimationFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000200; - break; - } // case 186 - case 202: - { - input.readMessage( - internalGetWorkspaceConfigFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000400; - break; - } // case 202 - case 218: - { - input.readMessage( - internalGetDocumentProcessingConfigFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000800; - break; - } // case 218 - case 226: - { - input.readMessage( - internalGetStartingSchemaFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00001000; - break; - } // case 226 - case 242: - { - input.readMessage( - internalGetServingConfigDataStoreFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00002000; - break; - } // case 242 - case 274: - { - input.readMessage( - internalGetNaturalLanguageQueryUnderstandingConfigFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000100; - break; - } // case 274 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally + onChanged(); return this; - } - - private int bitField0_; - - private java.lang.Object name_ = ""; + } /** * * *
            -     * Immutable. The full resource name of the data store.
            -     * Format:
            -     * `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`.
            -     *
            -     * This field must be a UTF-8 encoded string with a length limit of 1024
            -     * characters.
            +     * Optional. Configuration for advanced site search.
                  * 
            * - * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * .google.cloud.discoveryengine.v1beta.AdvancedSiteSearchConfig advanced_site_search_config = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.discoveryengine.v1beta.AdvancedSiteSearchConfig.Builder + getAdvancedSiteSearchConfigBuilder() { + bitField0_ |= 0x00000080; + onChanged(); + return internalGetAdvancedSiteSearchConfigFieldBuilder().getBuilder(); + } + + /** + * * - * @return The name. + *
            +     * Optional. Configuration for advanced site search.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AdvancedSiteSearchConfig advanced_site_search_config = 12 [(.google.api.field_behavior) = OPTIONAL]; + * */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; + public com.google.cloud.discoveryengine.v1beta.AdvancedSiteSearchConfigOrBuilder + getAdvancedSiteSearchConfigOrBuilder() { + if (advancedSiteSearchConfigBuilder_ != null) { + return advancedSiteSearchConfigBuilder_.getMessageOrBuilder(); } else { - return (java.lang.String) ref; + return advancedSiteSearchConfig_ == null + ? com.google.cloud.discoveryengine.v1beta.AdvancedSiteSearchConfig.getDefaultInstance() + : advancedSiteSearchConfig_; } } @@ -4286,27 +14274,70 @@ public java.lang.String getName() { * * *
            -     * Immutable. The full resource name of the data store.
            -     * Format:
            -     * `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`.
            +     * Optional. Configuration for advanced site search.
            +     * 
            * - * This field must be a UTF-8 encoded string with a length limit of 1024 - * characters. + * + * .google.cloud.discoveryengine.v1beta.AdvancedSiteSearchConfig advanced_site_search_config = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.AdvancedSiteSearchConfig, + com.google.cloud.discoveryengine.v1beta.AdvancedSiteSearchConfig.Builder, + com.google.cloud.discoveryengine.v1beta.AdvancedSiteSearchConfigOrBuilder> + internalGetAdvancedSiteSearchConfigFieldBuilder() { + if (advancedSiteSearchConfigBuilder_ == null) { + advancedSiteSearchConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.AdvancedSiteSearchConfig, + com.google.cloud.discoveryengine.v1beta.AdvancedSiteSearchConfig.Builder, + com.google.cloud.discoveryengine.v1beta.AdvancedSiteSearchConfigOrBuilder>( + getAdvancedSiteSearchConfig(), getParentForChildren(), isClean()); + advancedSiteSearchConfig_ = null; + } + return advancedSiteSearchConfigBuilder_; + } + + private com.google.cloud.discoveryengine.v1beta.LanguageInfo languageInfo_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.LanguageInfo, + com.google.cloud.discoveryengine.v1beta.LanguageInfo.Builder, + com.google.cloud.discoveryengine.v1beta.LanguageInfoOrBuilder> + languageInfoBuilder_; + + /** + * + * + *
            +     * Language info for DataStore.
                  * 
            * - * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * .google.cloud.discoveryengine.v1beta.LanguageInfo language_info = 14; * - * @return The bytes for name. + * @return Whether the languageInfo field is set. */ - public com.google.protobuf.ByteString getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - name_ = b; - return b; + public boolean hasLanguageInfo() { + return ((bitField0_ & 0x00000100) != 0); + } + + /** + * + * + *
            +     * Language info for DataStore.
            +     * 
            + * + * .google.cloud.discoveryengine.v1beta.LanguageInfo language_info = 14; + * + * @return The languageInfo. + */ + public com.google.cloud.discoveryengine.v1beta.LanguageInfo getLanguageInfo() { + if (languageInfoBuilder_ == null) { + return languageInfo_ == null + ? com.google.cloud.discoveryengine.v1beta.LanguageInfo.getDefaultInstance() + : languageInfo_; } else { - return (com.google.protobuf.ByteString) ref; + return languageInfoBuilder_.getMessage(); } } @@ -4314,25 +14345,21 @@ public com.google.protobuf.ByteString getNameBytes() { * * *
            -     * Immutable. The full resource name of the data store.
            -     * Format:
            -     * `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`.
            -     *
            -     * This field must be a UTF-8 encoded string with a length limit of 1024
            -     * characters.
            +     * Language info for DataStore.
                  * 
            * - * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @param value The name to set. - * @return This builder for chaining. + * .google.cloud.discoveryengine.v1beta.LanguageInfo language_info = 14; */ - public Builder setName(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); + public Builder setLanguageInfo(com.google.cloud.discoveryengine.v1beta.LanguageInfo value) { + if (languageInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + languageInfo_ = value; + } else { + languageInfoBuilder_.setMessage(value); } - name_ = value; - bitField0_ |= 0x00000001; + bitField0_ |= 0x00000100; onChanged(); return this; } @@ -4341,21 +14368,19 @@ public Builder setName(java.lang.String value) { * * *
            -     * Immutable. The full resource name of the data store.
            -     * Format:
            -     * `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`.
            -     *
            -     * This field must be a UTF-8 encoded string with a length limit of 1024
            -     * characters.
            +     * Language info for DataStore.
                  * 
            * - * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return This builder for chaining. + * .google.cloud.discoveryengine.v1beta.LanguageInfo language_info = 14; */ - public Builder clearName() { - name_ = getDefaultInstance().getName(); - bitField0_ = (bitField0_ & ~0x00000001); + public Builder setLanguageInfo( + com.google.cloud.discoveryengine.v1beta.LanguageInfo.Builder builderForValue) { + if (languageInfoBuilder_ == null) { + languageInfo_ = builderForValue.build(); + } else { + languageInfoBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000100; onChanged(); return this; } @@ -4364,55 +14389,83 @@ public Builder clearName() { * * *
            -     * Immutable. The full resource name of the data store.
            -     * Format:
            -     * `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`.
            -     *
            -     * This field must be a UTF-8 encoded string with a length limit of 1024
            -     * characters.
            +     * Language info for DataStore.
                  * 
            * - * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * .google.cloud.discoveryengine.v1beta.LanguageInfo language_info = 14; + */ + public Builder mergeLanguageInfo(com.google.cloud.discoveryengine.v1beta.LanguageInfo value) { + if (languageInfoBuilder_ == null) { + if (((bitField0_ & 0x00000100) != 0) + && languageInfo_ != null + && languageInfo_ + != com.google.cloud.discoveryengine.v1beta.LanguageInfo.getDefaultInstance()) { + getLanguageInfoBuilder().mergeFrom(value); + } else { + languageInfo_ = value; + } + } else { + languageInfoBuilder_.mergeFrom(value); + } + if (languageInfo_ != null) { + bitField0_ |= 0x00000100; + onChanged(); + } + return this; + } + + /** * - * @param value The bytes for name to set. - * @return This builder for chaining. + * + *
            +     * Language info for DataStore.
            +     * 
            + * + * .google.cloud.discoveryengine.v1beta.LanguageInfo language_info = 14; */ - public Builder setNameBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); + public Builder clearLanguageInfo() { + bitField0_ = (bitField0_ & ~0x00000100); + languageInfo_ = null; + if (languageInfoBuilder_ != null) { + languageInfoBuilder_.dispose(); + languageInfoBuilder_ = null; } - checkByteStringIsUtf8(value); - name_ = value; - bitField0_ |= 0x00000001; onChanged(); return this; } - private java.lang.Object displayName_ = ""; - /** * * *
            -     * Required. The data store display name.
            -     *
            -     * This field must be a UTF-8 encoded string with a length limit of 128
            -     * characters. Otherwise, an INVALID_ARGUMENT error is returned.
            +     * Language info for DataStore.
                  * 
            * - * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * .google.cloud.discoveryengine.v1beta.LanguageInfo language_info = 14; + */ + public com.google.cloud.discoveryengine.v1beta.LanguageInfo.Builder getLanguageInfoBuilder() { + bitField0_ |= 0x00000100; + onChanged(); + return internalGetLanguageInfoFieldBuilder().getBuilder(); + } + + /** * - * @return The displayName. + * + *
            +     * Language info for DataStore.
            +     * 
            + * + * .google.cloud.discoveryengine.v1beta.LanguageInfo language_info = 14; */ - public java.lang.String getDisplayName() { - java.lang.Object ref = displayName_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - displayName_ = s; - return s; + public com.google.cloud.discoveryengine.v1beta.LanguageInfoOrBuilder + getLanguageInfoOrBuilder() { + if (languageInfoBuilder_ != null) { + return languageInfoBuilder_.getMessageOrBuilder(); } else { - return (java.lang.String) ref; + return languageInfo_ == null + ? com.google.cloud.discoveryengine.v1beta.LanguageInfo.getDefaultInstance() + : languageInfo_; } } @@ -4420,138 +14473,159 @@ public java.lang.String getDisplayName() { * * *
            -     * Required. The data store display name.
            -     *
            -     * This field must be a UTF-8 encoded string with a length limit of 128
            -     * characters. Otherwise, an INVALID_ARGUMENT error is returned.
            +     * Language info for DataStore.
                  * 
            * - * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for displayName. + * .google.cloud.discoveryengine.v1beta.LanguageInfo language_info = 14; */ - public com.google.protobuf.ByteString getDisplayNameBytes() { - java.lang.Object ref = displayName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - displayName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.LanguageInfo, + com.google.cloud.discoveryengine.v1beta.LanguageInfo.Builder, + com.google.cloud.discoveryengine.v1beta.LanguageInfoOrBuilder> + internalGetLanguageInfoFieldBuilder() { + if (languageInfoBuilder_ == null) { + languageInfoBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.LanguageInfo, + com.google.cloud.discoveryengine.v1beta.LanguageInfo.Builder, + com.google.cloud.discoveryengine.v1beta.LanguageInfoOrBuilder>( + getLanguageInfo(), getParentForChildren(), isClean()); + languageInfo_ = null; } + return languageInfoBuilder_; } + private com.google.cloud.discoveryengine.v1beta.NaturalLanguageQueryUnderstandingConfig + naturalLanguageQueryUnderstandingConfig_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.NaturalLanguageQueryUnderstandingConfig, + com.google.cloud.discoveryengine.v1beta.NaturalLanguageQueryUnderstandingConfig.Builder, + com.google.cloud.discoveryengine.v1beta + .NaturalLanguageQueryUnderstandingConfigOrBuilder> + naturalLanguageQueryUnderstandingConfigBuilder_; + /** * * *
            -     * Required. The data store display name.
            -     *
            -     * This field must be a UTF-8 encoded string with a length limit of 128
            -     * characters. Otherwise, an INVALID_ARGUMENT error is returned.
            +     * Optional. Configuration for Natural Language Query Understanding.
                  * 
            * - * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * .google.cloud.discoveryengine.v1beta.NaturalLanguageQueryUnderstandingConfig natural_language_query_understanding_config = 34 [(.google.api.field_behavior) = OPTIONAL]; + * * - * @param value The displayName to set. - * @return This builder for chaining. + * @return Whether the naturalLanguageQueryUnderstandingConfig field is set. */ - public Builder setDisplayName(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - displayName_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; + public boolean hasNaturalLanguageQueryUnderstandingConfig() { + return ((bitField0_ & 0x00000200) != 0); } /** * * *
            -     * Required. The data store display name.
            -     *
            -     * This field must be a UTF-8 encoded string with a length limit of 128
            -     * characters. Otherwise, an INVALID_ARGUMENT error is returned.
            +     * Optional. Configuration for Natural Language Query Understanding.
                  * 
            * - * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * .google.cloud.discoveryengine.v1beta.NaturalLanguageQueryUnderstandingConfig natural_language_query_understanding_config = 34 [(.google.api.field_behavior) = OPTIONAL]; + * * - * @return This builder for chaining. + * @return The naturalLanguageQueryUnderstandingConfig. */ - public Builder clearDisplayName() { - displayName_ = getDefaultInstance().getDisplayName(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; + public com.google.cloud.discoveryengine.v1beta.NaturalLanguageQueryUnderstandingConfig + getNaturalLanguageQueryUnderstandingConfig() { + if (naturalLanguageQueryUnderstandingConfigBuilder_ == null) { + return naturalLanguageQueryUnderstandingConfig_ == null + ? com.google.cloud.discoveryengine.v1beta.NaturalLanguageQueryUnderstandingConfig + .getDefaultInstance() + : naturalLanguageQueryUnderstandingConfig_; + } else { + return naturalLanguageQueryUnderstandingConfigBuilder_.getMessage(); + } } /** * * *
            -     * Required. The data store display name.
            -     *
            -     * This field must be a UTF-8 encoded string with a length limit of 128
            -     * characters. Otherwise, an INVALID_ARGUMENT error is returned.
            +     * Optional. Configuration for Natural Language Query Understanding.
                  * 
            * - * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The bytes for displayName to set. - * @return This builder for chaining. + * + * .google.cloud.discoveryengine.v1beta.NaturalLanguageQueryUnderstandingConfig natural_language_query_understanding_config = 34 [(.google.api.field_behavior) = OPTIONAL]; + * */ - public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); + public Builder setNaturalLanguageQueryUnderstandingConfig( + com.google.cloud.discoveryengine.v1beta.NaturalLanguageQueryUnderstandingConfig value) { + if (naturalLanguageQueryUnderstandingConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + naturalLanguageQueryUnderstandingConfig_ = value; + } else { + naturalLanguageQueryUnderstandingConfigBuilder_.setMessage(value); } - checkByteStringIsUtf8(value); - displayName_ = value; - bitField0_ |= 0x00000002; + bitField0_ |= 0x00000200; onChanged(); return this; } - private int industryVertical_ = 0; - /** * * *
            -     * Immutable. The industry vertical that the data store registers.
            +     * Optional. Configuration for Natural Language Query Understanding.
                  * 
            * * - * .google.cloud.discoveryengine.v1beta.IndustryVertical industry_vertical = 3 [(.google.api.field_behavior) = IMMUTABLE]; + * .google.cloud.discoveryengine.v1beta.NaturalLanguageQueryUnderstandingConfig natural_language_query_understanding_config = 34 [(.google.api.field_behavior) = OPTIONAL]; * - * - * @return The enum numeric value on the wire for industryVertical. */ - @java.lang.Override - public int getIndustryVerticalValue() { - return industryVertical_; + public Builder setNaturalLanguageQueryUnderstandingConfig( + com.google.cloud.discoveryengine.v1beta.NaturalLanguageQueryUnderstandingConfig.Builder + builderForValue) { + if (naturalLanguageQueryUnderstandingConfigBuilder_ == null) { + naturalLanguageQueryUnderstandingConfig_ = builderForValue.build(); + } else { + naturalLanguageQueryUnderstandingConfigBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000200; + onChanged(); + return this; } /** * * *
            -     * Immutable. The industry vertical that the data store registers.
            +     * Optional. Configuration for Natural Language Query Understanding.
                  * 
            * * - * .google.cloud.discoveryengine.v1beta.IndustryVertical industry_vertical = 3 [(.google.api.field_behavior) = IMMUTABLE]; + * .google.cloud.discoveryengine.v1beta.NaturalLanguageQueryUnderstandingConfig natural_language_query_understanding_config = 34 [(.google.api.field_behavior) = OPTIONAL]; * - * - * @param value The enum numeric value on the wire for industryVertical to set. - * @return This builder for chaining. */ - public Builder setIndustryVerticalValue(int value) { - industryVertical_ = value; - bitField0_ |= 0x00000004; - onChanged(); + public Builder mergeNaturalLanguageQueryUnderstandingConfig( + com.google.cloud.discoveryengine.v1beta.NaturalLanguageQueryUnderstandingConfig value) { + if (naturalLanguageQueryUnderstandingConfigBuilder_ == null) { + if (((bitField0_ & 0x00000200) != 0) + && naturalLanguageQueryUnderstandingConfig_ != null + && naturalLanguageQueryUnderstandingConfig_ + != com.google.cloud.discoveryengine.v1beta.NaturalLanguageQueryUnderstandingConfig + .getDefaultInstance()) { + getNaturalLanguageQueryUnderstandingConfigBuilder().mergeFrom(value); + } else { + naturalLanguageQueryUnderstandingConfig_ = value; + } + } else { + naturalLanguageQueryUnderstandingConfigBuilder_.mergeFrom(value); + } + if (naturalLanguageQueryUnderstandingConfig_ != null) { + bitField0_ |= 0x00000200; + onChanged(); + } return this; } @@ -4559,167 +14633,183 @@ public Builder setIndustryVerticalValue(int value) { * * *
            -     * Immutable. The industry vertical that the data store registers.
            +     * Optional. Configuration for Natural Language Query Understanding.
                  * 
            * * - * .google.cloud.discoveryengine.v1beta.IndustryVertical industry_vertical = 3 [(.google.api.field_behavior) = IMMUTABLE]; + * .google.cloud.discoveryengine.v1beta.NaturalLanguageQueryUnderstandingConfig natural_language_query_understanding_config = 34 [(.google.api.field_behavior) = OPTIONAL]; * - * - * @return The industryVertical. */ - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.IndustryVertical getIndustryVertical() { - com.google.cloud.discoveryengine.v1beta.IndustryVertical result = - com.google.cloud.discoveryengine.v1beta.IndustryVertical.forNumber(industryVertical_); - return result == null - ? com.google.cloud.discoveryengine.v1beta.IndustryVertical.UNRECOGNIZED - : result; + public Builder clearNaturalLanguageQueryUnderstandingConfig() { + bitField0_ = (bitField0_ & ~0x00000200); + naturalLanguageQueryUnderstandingConfig_ = null; + if (naturalLanguageQueryUnderstandingConfigBuilder_ != null) { + naturalLanguageQueryUnderstandingConfigBuilder_.dispose(); + naturalLanguageQueryUnderstandingConfigBuilder_ = null; + } + onChanged(); + return this; } /** * * *
            -     * Immutable. The industry vertical that the data store registers.
            +     * Optional. Configuration for Natural Language Query Understanding.
                  * 
            * * - * .google.cloud.discoveryengine.v1beta.IndustryVertical industry_vertical = 3 [(.google.api.field_behavior) = IMMUTABLE]; + * .google.cloud.discoveryengine.v1beta.NaturalLanguageQueryUnderstandingConfig natural_language_query_understanding_config = 34 [(.google.api.field_behavior) = OPTIONAL]; * - * - * @param value The industryVertical to set. - * @return This builder for chaining. */ - public Builder setIndustryVertical( - com.google.cloud.discoveryengine.v1beta.IndustryVertical value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000004; - industryVertical_ = value.getNumber(); + public com.google.cloud.discoveryengine.v1beta.NaturalLanguageQueryUnderstandingConfig.Builder + getNaturalLanguageQueryUnderstandingConfigBuilder() { + bitField0_ |= 0x00000200; onChanged(); - return this; + return internalGetNaturalLanguageQueryUnderstandingConfigFieldBuilder().getBuilder(); } /** * * *
            -     * Immutable. The industry vertical that the data store registers.
            +     * Optional. Configuration for Natural Language Query Understanding.
                  * 
            * * - * .google.cloud.discoveryengine.v1beta.IndustryVertical industry_vertical = 3 [(.google.api.field_behavior) = IMMUTABLE]; + * .google.cloud.discoveryengine.v1beta.NaturalLanguageQueryUnderstandingConfig natural_language_query_understanding_config = 34 [(.google.api.field_behavior) = OPTIONAL]; * - * - * @return This builder for chaining. */ - public Builder clearIndustryVertical() { - bitField0_ = (bitField0_ & ~0x00000004); - industryVertical_ = 0; - onChanged(); - return this; - } - - private com.google.protobuf.Internal.IntList solutionTypes_ = emptyIntList(); - - private void ensureSolutionTypesIsMutable() { - if (!solutionTypes_.isModifiable()) { - solutionTypes_ = makeMutableCopy(solutionTypes_); + public com.google.cloud.discoveryengine.v1beta.NaturalLanguageQueryUnderstandingConfigOrBuilder + getNaturalLanguageQueryUnderstandingConfigOrBuilder() { + if (naturalLanguageQueryUnderstandingConfigBuilder_ != null) { + return naturalLanguageQueryUnderstandingConfigBuilder_.getMessageOrBuilder(); + } else { + return naturalLanguageQueryUnderstandingConfig_ == null + ? com.google.cloud.discoveryengine.v1beta.NaturalLanguageQueryUnderstandingConfig + .getDefaultInstance() + : naturalLanguageQueryUnderstandingConfig_; } - bitField0_ |= 0x00000008; } /** * * *
            -     * The solutions that the data store enrolls. Available solutions for each
            -     * [industry_vertical][google.cloud.discoveryengine.v1beta.DataStore.industry_vertical]:
            -     *
            -     * * `MEDIA`: `SOLUTION_TYPE_RECOMMENDATION` and `SOLUTION_TYPE_SEARCH`.
            -     * * `SITE_SEARCH`: `SOLUTION_TYPE_SEARCH` is automatically enrolled. Other
            -     * solutions cannot be enrolled.
            +     * Optional. Configuration for Natural Language Query Understanding.
                  * 
            * - * repeated .google.cloud.discoveryengine.v1beta.SolutionType solution_types = 5; - * - * @return A list containing the solutionTypes. + * + * .google.cloud.discoveryengine.v1beta.NaturalLanguageQueryUnderstandingConfig natural_language_query_understanding_config = 34 [(.google.api.field_behavior) = OPTIONAL]; + * */ - public java.util.List - getSolutionTypesList() { - return new com.google.protobuf.Internal.IntListAdapter< - com.google.cloud.discoveryengine.v1beta.SolutionType>( - solutionTypes_, solutionTypes_converter_); + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.NaturalLanguageQueryUnderstandingConfig, + com.google.cloud.discoveryengine.v1beta.NaturalLanguageQueryUnderstandingConfig.Builder, + com.google.cloud.discoveryengine.v1beta + .NaturalLanguageQueryUnderstandingConfigOrBuilder> + internalGetNaturalLanguageQueryUnderstandingConfigFieldBuilder() { + if (naturalLanguageQueryUnderstandingConfigBuilder_ == null) { + naturalLanguageQueryUnderstandingConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.NaturalLanguageQueryUnderstandingConfig, + com.google.cloud.discoveryengine.v1beta.NaturalLanguageQueryUnderstandingConfig + .Builder, + com.google.cloud.discoveryengine.v1beta + .NaturalLanguageQueryUnderstandingConfigOrBuilder>( + getNaturalLanguageQueryUnderstandingConfig(), getParentForChildren(), isClean()); + naturalLanguageQueryUnderstandingConfig_ = null; + } + return naturalLanguageQueryUnderstandingConfigBuilder_; } + private java.lang.Object kmsKeyName_ = ""; + /** * * *
            -     * The solutions that the data store enrolls. Available solutions for each
            -     * [industry_vertical][google.cloud.discoveryengine.v1beta.DataStore.industry_vertical]:
            +     * Input only. The KMS key to be used to protect this DataStore at creation
            +     * time.
                  *
            -     * * `MEDIA`: `SOLUTION_TYPE_RECOMMENDATION` and `SOLUTION_TYPE_SEARCH`.
            -     * * `SITE_SEARCH`: `SOLUTION_TYPE_SEARCH` is automatically enrolled. Other
            -     * solutions cannot be enrolled.
            +     * Must be set for requests that need to comply with CMEK Org Policy
            +     * protections.
            +     *
            +     * If this field is set and processed successfully, the DataStore will be
            +     * protected by the KMS key, as indicated in the cmek_config field.
                  * 
            * - * repeated .google.cloud.discoveryengine.v1beta.SolutionType solution_types = 5; + * string kms_key_name = 32 [(.google.api.field_behavior) = INPUT_ONLY]; * - * @return The count of solutionTypes. + * @return The kmsKeyName. */ - public int getSolutionTypesCount() { - return solutionTypes_.size(); + public java.lang.String getKmsKeyName() { + java.lang.Object ref = kmsKeyName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + kmsKeyName_ = s; + return s; + } else { + return (java.lang.String) ref; + } } /** * * *
            -     * The solutions that the data store enrolls. Available solutions for each
            -     * [industry_vertical][google.cloud.discoveryengine.v1beta.DataStore.industry_vertical]:
            +     * Input only. The KMS key to be used to protect this DataStore at creation
            +     * time.
                  *
            -     * * `MEDIA`: `SOLUTION_TYPE_RECOMMENDATION` and `SOLUTION_TYPE_SEARCH`.
            -     * * `SITE_SEARCH`: `SOLUTION_TYPE_SEARCH` is automatically enrolled. Other
            -     * solutions cannot be enrolled.
            +     * Must be set for requests that need to comply with CMEK Org Policy
            +     * protections.
            +     *
            +     * If this field is set and processed successfully, the DataStore will be
            +     * protected by the KMS key, as indicated in the cmek_config field.
                  * 
            * - * repeated .google.cloud.discoveryengine.v1beta.SolutionType solution_types = 5; + * string kms_key_name = 32 [(.google.api.field_behavior) = INPUT_ONLY]; * - * @param index The index of the element to return. - * @return The solutionTypes at the given index. + * @return The bytes for kmsKeyName. */ - public com.google.cloud.discoveryengine.v1beta.SolutionType getSolutionTypes(int index) { - return solutionTypes_converter_.convert(solutionTypes_.getInt(index)); + public com.google.protobuf.ByteString getKmsKeyNameBytes() { + java.lang.Object ref = kmsKeyName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + kmsKeyName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } } /** * * *
            -     * The solutions that the data store enrolls. Available solutions for each
            -     * [industry_vertical][google.cloud.discoveryengine.v1beta.DataStore.industry_vertical]:
            +     * Input only. The KMS key to be used to protect this DataStore at creation
            +     * time.
                  *
            -     * * `MEDIA`: `SOLUTION_TYPE_RECOMMENDATION` and `SOLUTION_TYPE_SEARCH`.
            -     * * `SITE_SEARCH`: `SOLUTION_TYPE_SEARCH` is automatically enrolled. Other
            -     * solutions cannot be enrolled.
            +     * Must be set for requests that need to comply with CMEK Org Policy
            +     * protections.
            +     *
            +     * If this field is set and processed successfully, the DataStore will be
            +     * protected by the KMS key, as indicated in the cmek_config field.
                  * 
            * - * repeated .google.cloud.discoveryengine.v1beta.SolutionType solution_types = 5; + * string kms_key_name = 32 [(.google.api.field_behavior) = INPUT_ONLY]; * - * @param index The index to set the value at. - * @param value The solutionTypes to set. + * @param value The kmsKeyName to set. * @return This builder for chaining. */ - public Builder setSolutionTypes( - int index, com.google.cloud.discoveryengine.v1beta.SolutionType value) { + public Builder setKmsKeyName(java.lang.String value) { if (value == null) { throw new NullPointerException(); } - ensureSolutionTypesIsMutable(); - solutionTypes_.setInt(index, value.getNumber()); + kmsKeyName_ = value; + bitField0_ |= 0x00000400; onChanged(); return this; } @@ -4728,25 +14818,23 @@ public Builder setSolutionTypes( * * *
            -     * The solutions that the data store enrolls. Available solutions for each
            -     * [industry_vertical][google.cloud.discoveryengine.v1beta.DataStore.industry_vertical]:
            +     * Input only. The KMS key to be used to protect this DataStore at creation
            +     * time.
                  *
            -     * * `MEDIA`: `SOLUTION_TYPE_RECOMMENDATION` and `SOLUTION_TYPE_SEARCH`.
            -     * * `SITE_SEARCH`: `SOLUTION_TYPE_SEARCH` is automatically enrolled. Other
            -     * solutions cannot be enrolled.
            +     * Must be set for requests that need to comply with CMEK Org Policy
            +     * protections.
            +     *
            +     * If this field is set and processed successfully, the DataStore will be
            +     * protected by the KMS key, as indicated in the cmek_config field.
                  * 
            * - * repeated .google.cloud.discoveryengine.v1beta.SolutionType solution_types = 5; + * string kms_key_name = 32 [(.google.api.field_behavior) = INPUT_ONLY]; * - * @param value The solutionTypes to add. * @return This builder for chaining. */ - public Builder addSolutionTypes(com.google.cloud.discoveryengine.v1beta.SolutionType value) { - if (value == null) { - throw new NullPointerException(); - } - ensureSolutionTypesIsMutable(); - solutionTypes_.addInt(value.getNumber()); + public Builder clearKmsKeyName() { + kmsKeyName_ = getDefaultInstance().getKmsKeyName(); + bitField0_ = (bitField0_ & ~0x00000400); onChanged(); return this; } @@ -4755,115 +14843,123 @@ public Builder addSolutionTypes(com.google.cloud.discoveryengine.v1beta.Solution * * *
            -     * The solutions that the data store enrolls. Available solutions for each
            -     * [industry_vertical][google.cloud.discoveryengine.v1beta.DataStore.industry_vertical]:
            +     * Input only. The KMS key to be used to protect this DataStore at creation
            +     * time.
                  *
            -     * * `MEDIA`: `SOLUTION_TYPE_RECOMMENDATION` and `SOLUTION_TYPE_SEARCH`.
            -     * * `SITE_SEARCH`: `SOLUTION_TYPE_SEARCH` is automatically enrolled. Other
            -     * solutions cannot be enrolled.
            +     * Must be set for requests that need to comply with CMEK Org Policy
            +     * protections.
            +     *
            +     * If this field is set and processed successfully, the DataStore will be
            +     * protected by the KMS key, as indicated in the cmek_config field.
                  * 
            * - * repeated .google.cloud.discoveryengine.v1beta.SolutionType solution_types = 5; + * string kms_key_name = 32 [(.google.api.field_behavior) = INPUT_ONLY]; * - * @param values The solutionTypes to add. + * @param value The bytes for kmsKeyName to set. * @return This builder for chaining. */ - public Builder addAllSolutionTypes( - java.lang.Iterable values) { - ensureSolutionTypesIsMutable(); - for (com.google.cloud.discoveryengine.v1beta.SolutionType value : values) { - solutionTypes_.addInt(value.getNumber()); + public Builder setKmsKeyNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); } + checkByteStringIsUtf8(value); + kmsKeyName_ = value; + bitField0_ |= 0x00000400; onChanged(); return this; } + private com.google.cloud.discoveryengine.v1beta.CmekConfig cmekConfig_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.CmekConfig, + com.google.cloud.discoveryengine.v1beta.CmekConfig.Builder, + com.google.cloud.discoveryengine.v1beta.CmekConfigOrBuilder> + cmekConfigBuilder_; + /** * * *
            -     * The solutions that the data store enrolls. Available solutions for each
            -     * [industry_vertical][google.cloud.discoveryengine.v1beta.DataStore.industry_vertical]:
            -     *
            -     * * `MEDIA`: `SOLUTION_TYPE_RECOMMENDATION` and `SOLUTION_TYPE_SEARCH`.
            -     * * `SITE_SEARCH`: `SOLUTION_TYPE_SEARCH` is automatically enrolled. Other
            -     * solutions cannot be enrolled.
            +     * Output only. CMEK-related information for the DataStore.
                  * 
            * - * repeated .google.cloud.discoveryengine.v1beta.SolutionType solution_types = 5; + * + * .google.cloud.discoveryengine.v1beta.CmekConfig cmek_config = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * * - * @return This builder for chaining. + * @return Whether the cmekConfig field is set. */ - public Builder clearSolutionTypes() { - solutionTypes_ = emptyIntList(); - bitField0_ = (bitField0_ & ~0x00000008); - onChanged(); - return this; + public boolean hasCmekConfig() { + return ((bitField0_ & 0x00000800) != 0); } /** * * *
            -     * The solutions that the data store enrolls. Available solutions for each
            -     * [industry_vertical][google.cloud.discoveryengine.v1beta.DataStore.industry_vertical]:
            -     *
            -     * * `MEDIA`: `SOLUTION_TYPE_RECOMMENDATION` and `SOLUTION_TYPE_SEARCH`.
            -     * * `SITE_SEARCH`: `SOLUTION_TYPE_SEARCH` is automatically enrolled. Other
            -     * solutions cannot be enrolled.
            +     * Output only. CMEK-related information for the DataStore.
                  * 
            * - * repeated .google.cloud.discoveryengine.v1beta.SolutionType solution_types = 5; + * + * .google.cloud.discoveryengine.v1beta.CmekConfig cmek_config = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * * - * @return A list containing the enum numeric values on the wire for solutionTypes. + * @return The cmekConfig. */ - public java.util.List getSolutionTypesValueList() { - solutionTypes_.makeImmutable(); - return solutionTypes_; + public com.google.cloud.discoveryengine.v1beta.CmekConfig getCmekConfig() { + if (cmekConfigBuilder_ == null) { + return cmekConfig_ == null + ? com.google.cloud.discoveryengine.v1beta.CmekConfig.getDefaultInstance() + : cmekConfig_; + } else { + return cmekConfigBuilder_.getMessage(); + } } /** * * *
            -     * The solutions that the data store enrolls. Available solutions for each
            -     * [industry_vertical][google.cloud.discoveryengine.v1beta.DataStore.industry_vertical]:
            -     *
            -     * * `MEDIA`: `SOLUTION_TYPE_RECOMMENDATION` and `SOLUTION_TYPE_SEARCH`.
            -     * * `SITE_SEARCH`: `SOLUTION_TYPE_SEARCH` is automatically enrolled. Other
            -     * solutions cannot be enrolled.
            +     * Output only. CMEK-related information for the DataStore.
                  * 
            * - * repeated .google.cloud.discoveryengine.v1beta.SolutionType solution_types = 5; - * - * @param index The index of the value to return. - * @return The enum numeric value on the wire of solutionTypes at the given index. + * + * .google.cloud.discoveryengine.v1beta.CmekConfig cmek_config = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ - public int getSolutionTypesValue(int index) { - return solutionTypes_.getInt(index); + public Builder setCmekConfig(com.google.cloud.discoveryengine.v1beta.CmekConfig value) { + if (cmekConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + cmekConfig_ = value; + } else { + cmekConfigBuilder_.setMessage(value); + } + bitField0_ |= 0x00000800; + onChanged(); + return this; } /** * * *
            -     * The solutions that the data store enrolls. Available solutions for each
            -     * [industry_vertical][google.cloud.discoveryengine.v1beta.DataStore.industry_vertical]:
            -     *
            -     * * `MEDIA`: `SOLUTION_TYPE_RECOMMENDATION` and `SOLUTION_TYPE_SEARCH`.
            -     * * `SITE_SEARCH`: `SOLUTION_TYPE_SEARCH` is automatically enrolled. Other
            -     * solutions cannot be enrolled.
            +     * Output only. CMEK-related information for the DataStore.
                  * 
            * - * repeated .google.cloud.discoveryengine.v1beta.SolutionType solution_types = 5; - * - * @param index The index to set the value at. - * @param value The enum numeric value on the wire for solutionTypes to set. - * @return This builder for chaining. + * + * .google.cloud.discoveryengine.v1beta.CmekConfig cmek_config = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ - public Builder setSolutionTypesValue(int index, int value) { - ensureSolutionTypesIsMutable(); - solutionTypes_.setInt(index, value); + public Builder setCmekConfig( + com.google.cloud.discoveryengine.v1beta.CmekConfig.Builder builderForValue) { + if (cmekConfigBuilder_ == null) { + cmekConfig_ = builderForValue.build(); + } else { + cmekConfigBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000800; onChanged(); return this; } @@ -4872,22 +14968,51 @@ public Builder setSolutionTypesValue(int index, int value) { * * *
            -     * The solutions that the data store enrolls. Available solutions for each
            -     * [industry_vertical][google.cloud.discoveryengine.v1beta.DataStore.industry_vertical]:
            -     *
            -     * * `MEDIA`: `SOLUTION_TYPE_RECOMMENDATION` and `SOLUTION_TYPE_SEARCH`.
            -     * * `SITE_SEARCH`: `SOLUTION_TYPE_SEARCH` is automatically enrolled. Other
            -     * solutions cannot be enrolled.
            +     * Output only. CMEK-related information for the DataStore.
                  * 
            * - * repeated .google.cloud.discoveryengine.v1beta.SolutionType solution_types = 5; + * + * .google.cloud.discoveryengine.v1beta.CmekConfig cmek_config = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCmekConfig(com.google.cloud.discoveryengine.v1beta.CmekConfig value) { + if (cmekConfigBuilder_ == null) { + if (((bitField0_ & 0x00000800) != 0) + && cmekConfig_ != null + && cmekConfig_ + != com.google.cloud.discoveryengine.v1beta.CmekConfig.getDefaultInstance()) { + getCmekConfigBuilder().mergeFrom(value); + } else { + cmekConfig_ = value; + } + } else { + cmekConfigBuilder_.mergeFrom(value); + } + if (cmekConfig_ != null) { + bitField0_ |= 0x00000800; + onChanged(); + } + return this; + } + + /** * - * @param value The enum numeric value on the wire for solutionTypes to add. - * @return This builder for chaining. + * + *
            +     * Output only. CMEK-related information for the DataStore.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.CmekConfig cmek_config = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ - public Builder addSolutionTypesValue(int value) { - ensureSolutionTypesIsMutable(); - solutionTypes_.addInt(value); + public Builder clearCmekConfig() { + bitField0_ = (bitField0_ & ~0x00000800); + cmekConfig_ = null; + if (cmekConfigBuilder_ != null) { + cmekConfigBuilder_.dispose(); + cmekConfigBuilder_ = null; + } onChanged(); return this; } @@ -4896,52 +15021,114 @@ public Builder addSolutionTypesValue(int value) { * * *
            -     * The solutions that the data store enrolls. Available solutions for each
            -     * [industry_vertical][google.cloud.discoveryengine.v1beta.DataStore.industry_vertical]:
            +     * Output only. CMEK-related information for the DataStore.
            +     * 
            * - * * `MEDIA`: `SOLUTION_TYPE_RECOMMENDATION` and `SOLUTION_TYPE_SEARCH`. - * * `SITE_SEARCH`: `SOLUTION_TYPE_SEARCH` is automatically enrolled. Other - * solutions cannot be enrolled. + * + * .google.cloud.discoveryengine.v1beta.CmekConfig cmek_config = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.discoveryengine.v1beta.CmekConfig.Builder getCmekConfigBuilder() { + bitField0_ |= 0x00000800; + onChanged(); + return internalGetCmekConfigFieldBuilder().getBuilder(); + } + + /** + * + * + *
            +     * Output only. CMEK-related information for the DataStore.
                  * 
            * - * repeated .google.cloud.discoveryengine.v1beta.SolutionType solution_types = 5; + * + * .google.cloud.discoveryengine.v1beta.CmekConfig cmek_config = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.discoveryengine.v1beta.CmekConfigOrBuilder getCmekConfigOrBuilder() { + if (cmekConfigBuilder_ != null) { + return cmekConfigBuilder_.getMessageOrBuilder(); + } else { + return cmekConfig_ == null + ? com.google.cloud.discoveryengine.v1beta.CmekConfig.getDefaultInstance() + : cmekConfig_; + } + } + + /** * - * @param values The enum numeric values on the wire for solutionTypes to add. - * @return This builder for chaining. + * + *
            +     * Output only. CMEK-related information for the DataStore.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.CmekConfig cmek_config = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ - public Builder addAllSolutionTypesValue(java.lang.Iterable values) { - ensureSolutionTypesIsMutable(); - for (int value : values) { - solutionTypes_.addInt(value); + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.CmekConfig, + com.google.cloud.discoveryengine.v1beta.CmekConfig.Builder, + com.google.cloud.discoveryengine.v1beta.CmekConfigOrBuilder> + internalGetCmekConfigFieldBuilder() { + if (cmekConfigBuilder_ == null) { + cmekConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.CmekConfig, + com.google.cloud.discoveryengine.v1beta.CmekConfig.Builder, + com.google.cloud.discoveryengine.v1beta.CmekConfigOrBuilder>( + getCmekConfig(), getParentForChildren(), isClean()); + cmekConfig_ = null; } - onChanged(); - return this; + return cmekConfigBuilder_; } - private java.lang.Object defaultSchemaId_ = ""; + private com.google.cloud.discoveryengine.v1beta.DataStore.BillingEstimation billingEstimation_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.DataStore.BillingEstimation, + com.google.cloud.discoveryengine.v1beta.DataStore.BillingEstimation.Builder, + com.google.cloud.discoveryengine.v1beta.DataStore.BillingEstimationOrBuilder> + billingEstimationBuilder_; /** * * *
            -     * Output only. The id of the default
            -     * [Schema][google.cloud.discoveryengine.v1beta.Schema] asscociated to this
            -     * data store.
            +     * Output only. Data size estimation for billing.
                  * 
            * - * string default_schema_id = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * .google.cloud.discoveryengine.v1beta.DataStore.BillingEstimation billing_estimation = 23 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * * - * @return The defaultSchemaId. + * @return Whether the billingEstimation field is set. */ - public java.lang.String getDefaultSchemaId() { - java.lang.Object ref = defaultSchemaId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - defaultSchemaId_ = s; - return s; + public boolean hasBillingEstimation() { + return ((bitField0_ & 0x00001000) != 0); + } + + /** + * + * + *
            +     * Output only. Data size estimation for billing.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.DataStore.BillingEstimation billing_estimation = 23 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The billingEstimation. + */ + public com.google.cloud.discoveryengine.v1beta.DataStore.BillingEstimation + getBillingEstimation() { + if (billingEstimationBuilder_ == null) { + return billingEstimation_ == null + ? com.google.cloud.discoveryengine.v1beta.DataStore.BillingEstimation + .getDefaultInstance() + : billingEstimation_; } else { - return (java.lang.String) ref; + return billingEstimationBuilder_.getMessage(); } } @@ -4949,47 +15136,48 @@ public java.lang.String getDefaultSchemaId() { * * *
            -     * Output only. The id of the default
            -     * [Schema][google.cloud.discoveryengine.v1beta.Schema] asscociated to this
            -     * data store.
            +     * Output only. Data size estimation for billing.
                  * 
            * - * string default_schema_id = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for defaultSchemaId. + * + * .google.cloud.discoveryengine.v1beta.DataStore.BillingEstimation billing_estimation = 23 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ - public com.google.protobuf.ByteString getDefaultSchemaIdBytes() { - java.lang.Object ref = defaultSchemaId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - defaultSchemaId_ = b; - return b; + public Builder setBillingEstimation( + com.google.cloud.discoveryengine.v1beta.DataStore.BillingEstimation value) { + if (billingEstimationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + billingEstimation_ = value; } else { - return (com.google.protobuf.ByteString) ref; + billingEstimationBuilder_.setMessage(value); } + bitField0_ |= 0x00001000; + onChanged(); + return this; } /** * * *
            -     * Output only. The id of the default
            -     * [Schema][google.cloud.discoveryengine.v1beta.Schema] asscociated to this
            -     * data store.
            +     * Output only. Data size estimation for billing.
                  * 
            * - * string default_schema_id = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The defaultSchemaId to set. - * @return This builder for chaining. + * + * .google.cloud.discoveryengine.v1beta.DataStore.BillingEstimation billing_estimation = 23 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ - public Builder setDefaultSchemaId(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); + public Builder setBillingEstimation( + com.google.cloud.discoveryengine.v1beta.DataStore.BillingEstimation.Builder + builderForValue) { + if (billingEstimationBuilder_ == null) { + billingEstimation_ = builderForValue.build(); + } else { + billingEstimationBuilder_.setMessage(builderForValue.build()); } - defaultSchemaId_ = value; - bitField0_ |= 0x00000010; + bitField0_ |= 0x00001000; onChanged(); return this; } @@ -4998,19 +15186,32 @@ public Builder setDefaultSchemaId(java.lang.String value) { * * *
            -     * Output only. The id of the default
            -     * [Schema][google.cloud.discoveryengine.v1beta.Schema] asscociated to this
            -     * data store.
            +     * Output only. Data size estimation for billing.
                  * 
            * - * string default_schema_id = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return This builder for chaining. + * + * .google.cloud.discoveryengine.v1beta.DataStore.BillingEstimation billing_estimation = 23 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ - public Builder clearDefaultSchemaId() { - defaultSchemaId_ = getDefaultInstance().getDefaultSchemaId(); - bitField0_ = (bitField0_ & ~0x00000010); - onChanged(); + public Builder mergeBillingEstimation( + com.google.cloud.discoveryengine.v1beta.DataStore.BillingEstimation value) { + if (billingEstimationBuilder_ == null) { + if (((bitField0_ & 0x00001000) != 0) + && billingEstimation_ != null + && billingEstimation_ + != com.google.cloud.discoveryengine.v1beta.DataStore.BillingEstimation + .getDefaultInstance()) { + getBillingEstimationBuilder().mergeFrom(value); + } else { + billingEstimation_ = value; + } + } else { + billingEstimationBuilder_.mergeFrom(value); + } + if (billingEstimation_ != null) { + bitField0_ |= 0x00001000; + onChanged(); + } return this; } @@ -5018,119 +15219,159 @@ public Builder clearDefaultSchemaId() { * * *
            -     * Output only. The id of the default
            -     * [Schema][google.cloud.discoveryengine.v1beta.Schema] asscociated to this
            -     * data store.
            +     * Output only. Data size estimation for billing.
                  * 
            * - * string default_schema_id = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The bytes for defaultSchemaId to set. - * @return This builder for chaining. + * + * .google.cloud.discoveryengine.v1beta.DataStore.BillingEstimation billing_estimation = 23 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ - public Builder setDefaultSchemaIdBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); + public Builder clearBillingEstimation() { + bitField0_ = (bitField0_ & ~0x00001000); + billingEstimation_ = null; + if (billingEstimationBuilder_ != null) { + billingEstimationBuilder_.dispose(); + billingEstimationBuilder_ = null; } - checkByteStringIsUtf8(value); - defaultSchemaId_ = value; - bitField0_ |= 0x00000010; onChanged(); return this; } - private int contentConfig_ = 0; - /** * * *
            -     * Immutable. The content config of the data store. If this field is unset,
            -     * the server behavior defaults to
            -     * [ContentConfig.NO_CONTENT][google.cloud.discoveryengine.v1beta.DataStore.ContentConfig.NO_CONTENT].
            +     * Output only. Data size estimation for billing.
                  * 
            * * - * .google.cloud.discoveryengine.v1beta.DataStore.ContentConfig content_config = 6 [(.google.api.field_behavior) = IMMUTABLE]; + * .google.cloud.discoveryengine.v1beta.DataStore.BillingEstimation billing_estimation = 23 [(.google.api.field_behavior) = OUTPUT_ONLY]; * - * - * @return The enum numeric value on the wire for contentConfig. */ - @java.lang.Override - public int getContentConfigValue() { - return contentConfig_; + public com.google.cloud.discoveryengine.v1beta.DataStore.BillingEstimation.Builder + getBillingEstimationBuilder() { + bitField0_ |= 0x00001000; + onChanged(); + return internalGetBillingEstimationFieldBuilder().getBuilder(); } /** * * *
            -     * Immutable. The content config of the data store. If this field is unset,
            -     * the server behavior defaults to
            -     * [ContentConfig.NO_CONTENT][google.cloud.discoveryengine.v1beta.DataStore.ContentConfig.NO_CONTENT].
            +     * Output only. Data size estimation for billing.
                  * 
            * * - * .google.cloud.discoveryengine.v1beta.DataStore.ContentConfig content_config = 6 [(.google.api.field_behavior) = IMMUTABLE]; + * .google.cloud.discoveryengine.v1beta.DataStore.BillingEstimation billing_estimation = 23 [(.google.api.field_behavior) = OUTPUT_ONLY]; * - * - * @param value The enum numeric value on the wire for contentConfig to set. - * @return This builder for chaining. */ - public Builder setContentConfigValue(int value) { - contentConfig_ = value; - bitField0_ |= 0x00000020; - onChanged(); - return this; + public com.google.cloud.discoveryengine.v1beta.DataStore.BillingEstimationOrBuilder + getBillingEstimationOrBuilder() { + if (billingEstimationBuilder_ != null) { + return billingEstimationBuilder_.getMessageOrBuilder(); + } else { + return billingEstimation_ == null + ? com.google.cloud.discoveryengine.v1beta.DataStore.BillingEstimation + .getDefaultInstance() + : billingEstimation_; + } } /** * * *
            -     * Immutable. The content config of the data store. If this field is unset,
            -     * the server behavior defaults to
            -     * [ContentConfig.NO_CONTENT][google.cloud.discoveryengine.v1beta.DataStore.ContentConfig.NO_CONTENT].
            +     * Output only. Data size estimation for billing.
                  * 
            * * - * .google.cloud.discoveryengine.v1beta.DataStore.ContentConfig content_config = 6 [(.google.api.field_behavior) = IMMUTABLE]; + * .google.cloud.discoveryengine.v1beta.DataStore.BillingEstimation billing_estimation = 23 [(.google.api.field_behavior) = OUTPUT_ONLY]; * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.DataStore.BillingEstimation, + com.google.cloud.discoveryengine.v1beta.DataStore.BillingEstimation.Builder, + com.google.cloud.discoveryengine.v1beta.DataStore.BillingEstimationOrBuilder> + internalGetBillingEstimationFieldBuilder() { + if (billingEstimationBuilder_ == null) { + billingEstimationBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.DataStore.BillingEstimation, + com.google.cloud.discoveryengine.v1beta.DataStore.BillingEstimation.Builder, + com.google.cloud.discoveryengine.v1beta.DataStore.BillingEstimationOrBuilder>( + getBillingEstimation(), getParentForChildren(), isClean()); + billingEstimation_ = null; + } + return billingEstimationBuilder_; + } + + private boolean aclEnabled_; + + /** * - * @return The contentConfig. + * + *
            +     * Immutable. Whether data in the
            +     * [DataStore][google.cloud.discoveryengine.v1beta.DataStore] has ACL
            +     * information. If set to `true`, the source data must have ACL. ACL will be
            +     * ingested when data is ingested by
            +     * [DocumentService.ImportDocuments][google.cloud.discoveryengine.v1beta.DocumentService.ImportDocuments]
            +     * methods.
            +     *
            +     * When ACL is enabled for the
            +     * [DataStore][google.cloud.discoveryengine.v1beta.DataStore],
            +     * [Document][google.cloud.discoveryengine.v1beta.Document] can't be accessed
            +     * by calling
            +     * [DocumentService.GetDocument][google.cloud.discoveryengine.v1beta.DocumentService.GetDocument]
            +     * or
            +     * [DocumentService.ListDocuments][google.cloud.discoveryengine.v1beta.DocumentService.ListDocuments].
            +     *
            +     * Currently ACL is only supported in `GENERIC` industry vertical with
            +     * non-`PUBLIC_WEBSITE` content config.
            +     * 
            + * + * bool acl_enabled = 24 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The aclEnabled. */ @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.DataStore.ContentConfig getContentConfig() { - com.google.cloud.discoveryengine.v1beta.DataStore.ContentConfig result = - com.google.cloud.discoveryengine.v1beta.DataStore.ContentConfig.forNumber(contentConfig_); - return result == null - ? com.google.cloud.discoveryengine.v1beta.DataStore.ContentConfig.UNRECOGNIZED - : result; + public boolean getAclEnabled() { + return aclEnabled_; } /** * * *
            -     * Immutable. The content config of the data store. If this field is unset,
            -     * the server behavior defaults to
            -     * [ContentConfig.NO_CONTENT][google.cloud.discoveryengine.v1beta.DataStore.ContentConfig.NO_CONTENT].
            +     * Immutable. Whether data in the
            +     * [DataStore][google.cloud.discoveryengine.v1beta.DataStore] has ACL
            +     * information. If set to `true`, the source data must have ACL. ACL will be
            +     * ingested when data is ingested by
            +     * [DocumentService.ImportDocuments][google.cloud.discoveryengine.v1beta.DocumentService.ImportDocuments]
            +     * methods.
            +     *
            +     * When ACL is enabled for the
            +     * [DataStore][google.cloud.discoveryengine.v1beta.DataStore],
            +     * [Document][google.cloud.discoveryengine.v1beta.Document] can't be accessed
            +     * by calling
            +     * [DocumentService.GetDocument][google.cloud.discoveryengine.v1beta.DocumentService.GetDocument]
            +     * or
            +     * [DocumentService.ListDocuments][google.cloud.discoveryengine.v1beta.DocumentService.ListDocuments].
            +     *
            +     * Currently ACL is only supported in `GENERIC` industry vertical with
            +     * non-`PUBLIC_WEBSITE` content config.
                  * 
            * - * - * .google.cloud.discoveryengine.v1beta.DataStore.ContentConfig content_config = 6 [(.google.api.field_behavior) = IMMUTABLE]; - * + * bool acl_enabled = 24 [(.google.api.field_behavior) = IMMUTABLE]; * - * @param value The contentConfig to set. + * @param value The aclEnabled to set. * @return This builder for chaining. */ - public Builder setContentConfig( - com.google.cloud.discoveryengine.v1beta.DataStore.ContentConfig value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000020; - contentConfig_ = value.getNumber(); + public Builder setAclEnabled(boolean value) { + + aclEnabled_ = value; + bitField0_ |= 0x00002000; onChanged(); return this; } @@ -5139,70 +15380,84 @@ public Builder setContentConfig( * * *
            -     * Immutable. The content config of the data store. If this field is unset,
            -     * the server behavior defaults to
            -     * [ContentConfig.NO_CONTENT][google.cloud.discoveryengine.v1beta.DataStore.ContentConfig.NO_CONTENT].
            +     * Immutable. Whether data in the
            +     * [DataStore][google.cloud.discoveryengine.v1beta.DataStore] has ACL
            +     * information. If set to `true`, the source data must have ACL. ACL will be
            +     * ingested when data is ingested by
            +     * [DocumentService.ImportDocuments][google.cloud.discoveryengine.v1beta.DocumentService.ImportDocuments]
            +     * methods.
            +     *
            +     * When ACL is enabled for the
            +     * [DataStore][google.cloud.discoveryengine.v1beta.DataStore],
            +     * [Document][google.cloud.discoveryengine.v1beta.Document] can't be accessed
            +     * by calling
            +     * [DocumentService.GetDocument][google.cloud.discoveryengine.v1beta.DocumentService.GetDocument]
            +     * or
            +     * [DocumentService.ListDocuments][google.cloud.discoveryengine.v1beta.DocumentService.ListDocuments].
            +     *
            +     * Currently ACL is only supported in `GENERIC` industry vertical with
            +     * non-`PUBLIC_WEBSITE` content config.
                  * 
            * - * - * .google.cloud.discoveryengine.v1beta.DataStore.ContentConfig content_config = 6 [(.google.api.field_behavior) = IMMUTABLE]; - * + * bool acl_enabled = 24 [(.google.api.field_behavior) = IMMUTABLE]; * * @return This builder for chaining. */ - public Builder clearContentConfig() { - bitField0_ = (bitField0_ & ~0x00000020); - contentConfig_ = 0; + public Builder clearAclEnabled() { + bitField0_ = (bitField0_ & ~0x00002000); + aclEnabled_ = false; onChanged(); return this; } - private com.google.protobuf.Timestamp createTime_; + private com.google.cloud.discoveryengine.v1beta.WorkspaceConfig workspaceConfig_; private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - createTimeBuilder_; + com.google.cloud.discoveryengine.v1beta.WorkspaceConfig, + com.google.cloud.discoveryengine.v1beta.WorkspaceConfig.Builder, + com.google.cloud.discoveryengine.v1beta.WorkspaceConfigOrBuilder> + workspaceConfigBuilder_; /** * * *
            -     * Output only. Timestamp the
            -     * [DataStore][google.cloud.discoveryengine.v1beta.DataStore] was created at.
            +     * Config to store data store type configuration for workspace data. This
            +     * must be set when
            +     * [DataStore.content_config][google.cloud.discoveryengine.v1beta.DataStore.content_config]
            +     * is set as
            +     * [DataStore.ContentConfig.GOOGLE_WORKSPACE][google.cloud.discoveryengine.v1beta.DataStore.ContentConfig.GOOGLE_WORKSPACE].
                  * 
            * - * - * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * .google.cloud.discoveryengine.v1beta.WorkspaceConfig workspace_config = 25; * - * @return Whether the createTime field is set. + * @return Whether the workspaceConfig field is set. */ - public boolean hasCreateTime() { - return ((bitField0_ & 0x00000040) != 0); + public boolean hasWorkspaceConfig() { + return ((bitField0_ & 0x00004000) != 0); } /** * * *
            -     * Output only. Timestamp the
            -     * [DataStore][google.cloud.discoveryengine.v1beta.DataStore] was created at.
            +     * Config to store data store type configuration for workspace data. This
            +     * must be set when
            +     * [DataStore.content_config][google.cloud.discoveryengine.v1beta.DataStore.content_config]
            +     * is set as
            +     * [DataStore.ContentConfig.GOOGLE_WORKSPACE][google.cloud.discoveryengine.v1beta.DataStore.ContentConfig.GOOGLE_WORKSPACE].
                  * 
            * - * - * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * .google.cloud.discoveryengine.v1beta.WorkspaceConfig workspace_config = 25; * - * @return The createTime. + * @return The workspaceConfig. */ - public com.google.protobuf.Timestamp getCreateTime() { - if (createTimeBuilder_ == null) { - return createTime_ == null - ? com.google.protobuf.Timestamp.getDefaultInstance() - : createTime_; + public com.google.cloud.discoveryengine.v1beta.WorkspaceConfig getWorkspaceConfig() { + if (workspaceConfigBuilder_ == null) { + return workspaceConfig_ == null + ? com.google.cloud.discoveryengine.v1beta.WorkspaceConfig.getDefaultInstance() + : workspaceConfig_; } else { - return createTimeBuilder_.getMessage(); + return workspaceConfigBuilder_.getMessage(); } } @@ -5210,24 +15465,26 @@ public com.google.protobuf.Timestamp getCreateTime() { * * *
            -     * Output only. Timestamp the
            -     * [DataStore][google.cloud.discoveryengine.v1beta.DataStore] was created at.
            +     * Config to store data store type configuration for workspace data. This
            +     * must be set when
            +     * [DataStore.content_config][google.cloud.discoveryengine.v1beta.DataStore.content_config]
            +     * is set as
            +     * [DataStore.ContentConfig.GOOGLE_WORKSPACE][google.cloud.discoveryengine.v1beta.DataStore.ContentConfig.GOOGLE_WORKSPACE].
                  * 
            * - * - * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * .google.cloud.discoveryengine.v1beta.WorkspaceConfig workspace_config = 25; */ - public Builder setCreateTime(com.google.protobuf.Timestamp value) { - if (createTimeBuilder_ == null) { + public Builder setWorkspaceConfig( + com.google.cloud.discoveryengine.v1beta.WorkspaceConfig value) { + if (workspaceConfigBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - createTime_ = value; + workspaceConfig_ = value; } else { - createTimeBuilder_.setMessage(value); + workspaceConfigBuilder_.setMessage(value); } - bitField0_ |= 0x00000040; + bitField0_ |= 0x00004000; onChanged(); return this; } @@ -5236,21 +15493,23 @@ public Builder setCreateTime(com.google.protobuf.Timestamp value) { * * *
            -     * Output only. Timestamp the
            -     * [DataStore][google.cloud.discoveryengine.v1beta.DataStore] was created at.
            +     * Config to store data store type configuration for workspace data. This
            +     * must be set when
            +     * [DataStore.content_config][google.cloud.discoveryengine.v1beta.DataStore.content_config]
            +     * is set as
            +     * [DataStore.ContentConfig.GOOGLE_WORKSPACE][google.cloud.discoveryengine.v1beta.DataStore.ContentConfig.GOOGLE_WORKSPACE].
                  * 
            * - * - * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * .google.cloud.discoveryengine.v1beta.WorkspaceConfig workspace_config = 25; */ - public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { - if (createTimeBuilder_ == null) { - createTime_ = builderForValue.build(); + public Builder setWorkspaceConfig( + com.google.cloud.discoveryengine.v1beta.WorkspaceConfig.Builder builderForValue) { + if (workspaceConfigBuilder_ == null) { + workspaceConfig_ = builderForValue.build(); } else { - createTimeBuilder_.setMessage(builderForValue.build()); + workspaceConfigBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00000040; + bitField0_ |= 0x00004000; onChanged(); return this; } @@ -5259,28 +15518,31 @@ public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForVal * * *
            -     * Output only. Timestamp the
            -     * [DataStore][google.cloud.discoveryengine.v1beta.DataStore] was created at.
            +     * Config to store data store type configuration for workspace data. This
            +     * must be set when
            +     * [DataStore.content_config][google.cloud.discoveryengine.v1beta.DataStore.content_config]
            +     * is set as
            +     * [DataStore.ContentConfig.GOOGLE_WORKSPACE][google.cloud.discoveryengine.v1beta.DataStore.ContentConfig.GOOGLE_WORKSPACE].
                  * 
            * - * - * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * .google.cloud.discoveryengine.v1beta.WorkspaceConfig workspace_config = 25; */ - public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { - if (createTimeBuilder_ == null) { - if (((bitField0_ & 0x00000040) != 0) - && createTime_ != null - && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { - getCreateTimeBuilder().mergeFrom(value); + public Builder mergeWorkspaceConfig( + com.google.cloud.discoveryengine.v1beta.WorkspaceConfig value) { + if (workspaceConfigBuilder_ == null) { + if (((bitField0_ & 0x00004000) != 0) + && workspaceConfig_ != null + && workspaceConfig_ + != com.google.cloud.discoveryengine.v1beta.WorkspaceConfig.getDefaultInstance()) { + getWorkspaceConfigBuilder().mergeFrom(value); } else { - createTime_ = value; + workspaceConfig_ = value; } } else { - createTimeBuilder_.mergeFrom(value); + workspaceConfigBuilder_.mergeFrom(value); } - if (createTime_ != null) { - bitField0_ |= 0x00000040; + if (workspaceConfig_ != null) { + bitField0_ |= 0x00004000; onChanged(); } return this; @@ -5290,20 +15552,21 @@ public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { * * *
            -     * Output only. Timestamp the
            -     * [DataStore][google.cloud.discoveryengine.v1beta.DataStore] was created at.
            +     * Config to store data store type configuration for workspace data. This
            +     * must be set when
            +     * [DataStore.content_config][google.cloud.discoveryengine.v1beta.DataStore.content_config]
            +     * is set as
            +     * [DataStore.ContentConfig.GOOGLE_WORKSPACE][google.cloud.discoveryengine.v1beta.DataStore.ContentConfig.GOOGLE_WORKSPACE].
                  * 
            * - * - * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * .google.cloud.discoveryengine.v1beta.WorkspaceConfig workspace_config = 25; */ - public Builder clearCreateTime() { - bitField0_ = (bitField0_ & ~0x00000040); - createTime_ = null; - if (createTimeBuilder_ != null) { - createTimeBuilder_.dispose(); - createTimeBuilder_ = null; + public Builder clearWorkspaceConfig() { + bitField0_ = (bitField0_ & ~0x00004000); + workspaceConfig_ = null; + if (workspaceConfigBuilder_ != null) { + workspaceConfigBuilder_.dispose(); + workspaceConfigBuilder_ = null; } onChanged(); return this; @@ -5313,39 +15576,43 @@ public Builder clearCreateTime() { * * *
            -     * Output only. Timestamp the
            -     * [DataStore][google.cloud.discoveryengine.v1beta.DataStore] was created at.
            +     * Config to store data store type configuration for workspace data. This
            +     * must be set when
            +     * [DataStore.content_config][google.cloud.discoveryengine.v1beta.DataStore.content_config]
            +     * is set as
            +     * [DataStore.ContentConfig.GOOGLE_WORKSPACE][google.cloud.discoveryengine.v1beta.DataStore.ContentConfig.GOOGLE_WORKSPACE].
                  * 
            * - * - * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * .google.cloud.discoveryengine.v1beta.WorkspaceConfig workspace_config = 25; */ - public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { - bitField0_ |= 0x00000040; + public com.google.cloud.discoveryengine.v1beta.WorkspaceConfig.Builder + getWorkspaceConfigBuilder() { + bitField0_ |= 0x00004000; onChanged(); - return internalGetCreateTimeFieldBuilder().getBuilder(); + return internalGetWorkspaceConfigFieldBuilder().getBuilder(); } /** * * *
            -     * Output only. Timestamp the
            -     * [DataStore][google.cloud.discoveryengine.v1beta.DataStore] was created at.
            +     * Config to store data store type configuration for workspace data. This
            +     * must be set when
            +     * [DataStore.content_config][google.cloud.discoveryengine.v1beta.DataStore.content_config]
            +     * is set as
            +     * [DataStore.ContentConfig.GOOGLE_WORKSPACE][google.cloud.discoveryengine.v1beta.DataStore.ContentConfig.GOOGLE_WORKSPACE].
                  * 
            * - * - * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * .google.cloud.discoveryengine.v1beta.WorkspaceConfig workspace_config = 25; */ - public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { - if (createTimeBuilder_ != null) { - return createTimeBuilder_.getMessageOrBuilder(); + public com.google.cloud.discoveryengine.v1beta.WorkspaceConfigOrBuilder + getWorkspaceConfigOrBuilder() { + if (workspaceConfigBuilder_ != null) { + return workspaceConfigBuilder_.getMessageOrBuilder(); } else { - return createTime_ == null - ? com.google.protobuf.Timestamp.getDefaultInstance() - : createTime_; + return workspaceConfig_ == null + ? com.google.cloud.discoveryengine.v1beta.WorkspaceConfig.getDefaultInstance() + : workspaceConfig_; } } @@ -5353,71 +15620,78 @@ public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { * * *
            -     * Output only. Timestamp the
            -     * [DataStore][google.cloud.discoveryengine.v1beta.DataStore] was created at.
            +     * Config to store data store type configuration for workspace data. This
            +     * must be set when
            +     * [DataStore.content_config][google.cloud.discoveryengine.v1beta.DataStore.content_config]
            +     * is set as
            +     * [DataStore.ContentConfig.GOOGLE_WORKSPACE][google.cloud.discoveryengine.v1beta.DataStore.ContentConfig.GOOGLE_WORKSPACE].
                  * 
            * - * - * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * + * .google.cloud.discoveryengine.v1beta.WorkspaceConfig workspace_config = 25; */ private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - internalGetCreateTimeFieldBuilder() { - if (createTimeBuilder_ == null) { - createTimeBuilder_ = + com.google.cloud.discoveryengine.v1beta.WorkspaceConfig, + com.google.cloud.discoveryengine.v1beta.WorkspaceConfig.Builder, + com.google.cloud.discoveryengine.v1beta.WorkspaceConfigOrBuilder> + internalGetWorkspaceConfigFieldBuilder() { + if (workspaceConfigBuilder_ == null) { + workspaceConfigBuilder_ = new com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder>( - getCreateTime(), getParentForChildren(), isClean()); - createTime_ = null; + com.google.cloud.discoveryengine.v1beta.WorkspaceConfig, + com.google.cloud.discoveryengine.v1beta.WorkspaceConfig.Builder, + com.google.cloud.discoveryengine.v1beta.WorkspaceConfigOrBuilder>( + getWorkspaceConfig(), getParentForChildren(), isClean()); + workspaceConfig_ = null; } - return createTimeBuilder_; + return workspaceConfigBuilder_; } - private com.google.cloud.discoveryengine.v1beta.LanguageInfo languageInfo_; + private com.google.cloud.discoveryengine.v1beta.DocumentProcessingConfig + documentProcessingConfig_; private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.discoveryengine.v1beta.LanguageInfo, - com.google.cloud.discoveryengine.v1beta.LanguageInfo.Builder, - com.google.cloud.discoveryengine.v1beta.LanguageInfoOrBuilder> - languageInfoBuilder_; + com.google.cloud.discoveryengine.v1beta.DocumentProcessingConfig, + com.google.cloud.discoveryengine.v1beta.DocumentProcessingConfig.Builder, + com.google.cloud.discoveryengine.v1beta.DocumentProcessingConfigOrBuilder> + documentProcessingConfigBuilder_; /** * * *
            -     * Language info for DataStore.
            +     * Configuration for Document understanding and enrichment.
                  * 
            * - * .google.cloud.discoveryengine.v1beta.LanguageInfo language_info = 14; + * + * .google.cloud.discoveryengine.v1beta.DocumentProcessingConfig document_processing_config = 27; + * * - * @return Whether the languageInfo field is set. + * @return Whether the documentProcessingConfig field is set. */ - public boolean hasLanguageInfo() { - return ((bitField0_ & 0x00000080) != 0); + public boolean hasDocumentProcessingConfig() { + return ((bitField0_ & 0x00008000) != 0); } /** * * *
            -     * Language info for DataStore.
            +     * Configuration for Document understanding and enrichment.
                  * 
            * - * .google.cloud.discoveryengine.v1beta.LanguageInfo language_info = 14; + * + * .google.cloud.discoveryengine.v1beta.DocumentProcessingConfig document_processing_config = 27; + * * - * @return The languageInfo. + * @return The documentProcessingConfig. */ - public com.google.cloud.discoveryengine.v1beta.LanguageInfo getLanguageInfo() { - if (languageInfoBuilder_ == null) { - return languageInfo_ == null - ? com.google.cloud.discoveryengine.v1beta.LanguageInfo.getDefaultInstance() - : languageInfo_; + public com.google.cloud.discoveryengine.v1beta.DocumentProcessingConfig + getDocumentProcessingConfig() { + if (documentProcessingConfigBuilder_ == null) { + return documentProcessingConfig_ == null + ? com.google.cloud.discoveryengine.v1beta.DocumentProcessingConfig.getDefaultInstance() + : documentProcessingConfig_; } else { - return languageInfoBuilder_.getMessage(); + return documentProcessingConfigBuilder_.getMessage(); } } @@ -5425,21 +15699,24 @@ public com.google.cloud.discoveryengine.v1beta.LanguageInfo getLanguageInfo() { * * *
            -     * Language info for DataStore.
            +     * Configuration for Document understanding and enrichment.
                  * 
            * - * .google.cloud.discoveryengine.v1beta.LanguageInfo language_info = 14; + * + * .google.cloud.discoveryengine.v1beta.DocumentProcessingConfig document_processing_config = 27; + * */ - public Builder setLanguageInfo(com.google.cloud.discoveryengine.v1beta.LanguageInfo value) { - if (languageInfoBuilder_ == null) { + public Builder setDocumentProcessingConfig( + com.google.cloud.discoveryengine.v1beta.DocumentProcessingConfig value) { + if (documentProcessingConfigBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - languageInfo_ = value; + documentProcessingConfig_ = value; } else { - languageInfoBuilder_.setMessage(value); + documentProcessingConfigBuilder_.setMessage(value); } - bitField0_ |= 0x00000080; + bitField0_ |= 0x00008000; onChanged(); return this; } @@ -5448,19 +15725,21 @@ public Builder setLanguageInfo(com.google.cloud.discoveryengine.v1beta.LanguageI * * *
            -     * Language info for DataStore.
            +     * Configuration for Document understanding and enrichment.
                  * 
            * - * .google.cloud.discoveryengine.v1beta.LanguageInfo language_info = 14; + * + * .google.cloud.discoveryengine.v1beta.DocumentProcessingConfig document_processing_config = 27; + * */ - public Builder setLanguageInfo( - com.google.cloud.discoveryengine.v1beta.LanguageInfo.Builder builderForValue) { - if (languageInfoBuilder_ == null) { - languageInfo_ = builderForValue.build(); + public Builder setDocumentProcessingConfig( + com.google.cloud.discoveryengine.v1beta.DocumentProcessingConfig.Builder builderForValue) { + if (documentProcessingConfigBuilder_ == null) { + documentProcessingConfig_ = builderForValue.build(); } else { - languageInfoBuilder_.setMessage(builderForValue.build()); + documentProcessingConfigBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00000080; + bitField0_ |= 0x00008000; onChanged(); return this; } @@ -5469,26 +15748,30 @@ public Builder setLanguageInfo( * * *
            -     * Language info for DataStore.
            +     * Configuration for Document understanding and enrichment.
                  * 
            * - * .google.cloud.discoveryengine.v1beta.LanguageInfo language_info = 14; + * + * .google.cloud.discoveryengine.v1beta.DocumentProcessingConfig document_processing_config = 27; + * */ - public Builder mergeLanguageInfo(com.google.cloud.discoveryengine.v1beta.LanguageInfo value) { - if (languageInfoBuilder_ == null) { - if (((bitField0_ & 0x00000080) != 0) - && languageInfo_ != null - && languageInfo_ - != com.google.cloud.discoveryengine.v1beta.LanguageInfo.getDefaultInstance()) { - getLanguageInfoBuilder().mergeFrom(value); + public Builder mergeDocumentProcessingConfig( + com.google.cloud.discoveryengine.v1beta.DocumentProcessingConfig value) { + if (documentProcessingConfigBuilder_ == null) { + if (((bitField0_ & 0x00008000) != 0) + && documentProcessingConfig_ != null + && documentProcessingConfig_ + != com.google.cloud.discoveryengine.v1beta.DocumentProcessingConfig + .getDefaultInstance()) { + getDocumentProcessingConfigBuilder().mergeFrom(value); } else { - languageInfo_ = value; + documentProcessingConfig_ = value; } } else { - languageInfoBuilder_.mergeFrom(value); + documentProcessingConfigBuilder_.mergeFrom(value); } - if (languageInfo_ != null) { - bitField0_ |= 0x00000080; + if (documentProcessingConfig_ != null) { + bitField0_ |= 0x00008000; onChanged(); } return this; @@ -5498,17 +15781,19 @@ public Builder mergeLanguageInfo(com.google.cloud.discoveryengine.v1beta.Languag * * *
            -     * Language info for DataStore.
            +     * Configuration for Document understanding and enrichment.
                  * 
            * - * .google.cloud.discoveryengine.v1beta.LanguageInfo language_info = 14; + * + * .google.cloud.discoveryengine.v1beta.DocumentProcessingConfig document_processing_config = 27; + * */ - public Builder clearLanguageInfo() { - bitField0_ = (bitField0_ & ~0x00000080); - languageInfo_ = null; - if (languageInfoBuilder_ != null) { - languageInfoBuilder_.dispose(); - languageInfoBuilder_ = null; + public Builder clearDocumentProcessingConfig() { + bitField0_ = (bitField0_ & ~0x00008000); + documentProcessingConfig_ = null; + if (documentProcessingConfigBuilder_ != null) { + documentProcessingConfigBuilder_.dispose(); + documentProcessingConfigBuilder_ = null; } onChanged(); return this; @@ -5518,34 +15803,39 @@ public Builder clearLanguageInfo() { * * *
            -     * Language info for DataStore.
            +     * Configuration for Document understanding and enrichment.
                  * 
            * - * .google.cloud.discoveryengine.v1beta.LanguageInfo language_info = 14; + * + * .google.cloud.discoveryengine.v1beta.DocumentProcessingConfig document_processing_config = 27; + * */ - public com.google.cloud.discoveryengine.v1beta.LanguageInfo.Builder getLanguageInfoBuilder() { - bitField0_ |= 0x00000080; + public com.google.cloud.discoveryengine.v1beta.DocumentProcessingConfig.Builder + getDocumentProcessingConfigBuilder() { + bitField0_ |= 0x00008000; onChanged(); - return internalGetLanguageInfoFieldBuilder().getBuilder(); + return internalGetDocumentProcessingConfigFieldBuilder().getBuilder(); } /** * * *
            -     * Language info for DataStore.
            +     * Configuration for Document understanding and enrichment.
                  * 
            * - * .google.cloud.discoveryengine.v1beta.LanguageInfo language_info = 14; + * + * .google.cloud.discoveryengine.v1beta.DocumentProcessingConfig document_processing_config = 27; + * */ - public com.google.cloud.discoveryengine.v1beta.LanguageInfoOrBuilder - getLanguageInfoOrBuilder() { - if (languageInfoBuilder_ != null) { - return languageInfoBuilder_.getMessageOrBuilder(); + public com.google.cloud.discoveryengine.v1beta.DocumentProcessingConfigOrBuilder + getDocumentProcessingConfigOrBuilder() { + if (documentProcessingConfigBuilder_ != null) { + return documentProcessingConfigBuilder_.getMessageOrBuilder(); } else { - return languageInfo_ == null - ? com.google.cloud.discoveryengine.v1beta.LanguageInfo.getDefaultInstance() - : languageInfo_; + return documentProcessingConfig_ == null + ? com.google.cloud.discoveryengine.v1beta.DocumentProcessingConfig.getDefaultInstance() + : documentProcessingConfig_; } } @@ -5553,76 +15843,104 @@ public com.google.cloud.discoveryengine.v1beta.LanguageInfo.Builder getLanguageI * * *
            -     * Language info for DataStore.
            +     * Configuration for Document understanding and enrichment.
                  * 
            * - * .google.cloud.discoveryengine.v1beta.LanguageInfo language_info = 14; + * + * .google.cloud.discoveryengine.v1beta.DocumentProcessingConfig document_processing_config = 27; + * */ private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.discoveryengine.v1beta.LanguageInfo, - com.google.cloud.discoveryengine.v1beta.LanguageInfo.Builder, - com.google.cloud.discoveryengine.v1beta.LanguageInfoOrBuilder> - internalGetLanguageInfoFieldBuilder() { - if (languageInfoBuilder_ == null) { - languageInfoBuilder_ = + com.google.cloud.discoveryengine.v1beta.DocumentProcessingConfig, + com.google.cloud.discoveryengine.v1beta.DocumentProcessingConfig.Builder, + com.google.cloud.discoveryengine.v1beta.DocumentProcessingConfigOrBuilder> + internalGetDocumentProcessingConfigFieldBuilder() { + if (documentProcessingConfigBuilder_ == null) { + documentProcessingConfigBuilder_ = new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.discoveryengine.v1beta.LanguageInfo, - com.google.cloud.discoveryengine.v1beta.LanguageInfo.Builder, - com.google.cloud.discoveryengine.v1beta.LanguageInfoOrBuilder>( - getLanguageInfo(), getParentForChildren(), isClean()); - languageInfo_ = null; + com.google.cloud.discoveryengine.v1beta.DocumentProcessingConfig, + com.google.cloud.discoveryengine.v1beta.DocumentProcessingConfig.Builder, + com.google.cloud.discoveryengine.v1beta.DocumentProcessingConfigOrBuilder>( + getDocumentProcessingConfig(), getParentForChildren(), isClean()); + documentProcessingConfig_ = null; } - return languageInfoBuilder_; + return documentProcessingConfigBuilder_; } - private com.google.cloud.discoveryengine.v1beta.NaturalLanguageQueryUnderstandingConfig - naturalLanguageQueryUnderstandingConfig_; + private com.google.cloud.discoveryengine.v1beta.Schema startingSchema_; private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.discoveryengine.v1beta.NaturalLanguageQueryUnderstandingConfig, - com.google.cloud.discoveryengine.v1beta.NaturalLanguageQueryUnderstandingConfig.Builder, - com.google.cloud.discoveryengine.v1beta - .NaturalLanguageQueryUnderstandingConfigOrBuilder> - naturalLanguageQueryUnderstandingConfigBuilder_; + com.google.cloud.discoveryengine.v1beta.Schema, + com.google.cloud.discoveryengine.v1beta.Schema.Builder, + com.google.cloud.discoveryengine.v1beta.SchemaOrBuilder> + startingSchemaBuilder_; /** * * *
            -     * Optional. Configuration for Natural Language Query Understanding.
            +     * The start schema to use for this
            +     * [DataStore][google.cloud.discoveryengine.v1beta.DataStore] when
            +     * provisioning it. If unset, a default vertical specialized schema will be
            +     * used.
            +     *
            +     * This field is only used by
            +     * [CreateDataStore][google.cloud.discoveryengine.v1beta.DataStoreService.CreateDataStore]
            +     * API, and will be ignored if used in other APIs. This field will be omitted
            +     * from all API responses including
            +     * [CreateDataStore][google.cloud.discoveryengine.v1beta.DataStoreService.CreateDataStore]
            +     * API. To retrieve a schema of a
            +     * [DataStore][google.cloud.discoveryengine.v1beta.DataStore], use
            +     * [SchemaService.GetSchema][google.cloud.discoveryengine.v1beta.SchemaService.GetSchema]
            +     * API instead.
            +     *
            +     * The provided schema will be validated against certain rules on schema.
            +     * Learn more from [this
            +     * doc](https://cloud.google.com/generative-ai-app-builder/docs/provide-schema).
                  * 
            * - * - * .google.cloud.discoveryengine.v1beta.NaturalLanguageQueryUnderstandingConfig natural_language_query_understanding_config = 34 [(.google.api.field_behavior) = OPTIONAL]; - * + * .google.cloud.discoveryengine.v1beta.Schema starting_schema = 28; * - * @return Whether the naturalLanguageQueryUnderstandingConfig field is set. + * @return Whether the startingSchema field is set. */ - public boolean hasNaturalLanguageQueryUnderstandingConfig() { - return ((bitField0_ & 0x00000100) != 0); + public boolean hasStartingSchema() { + return ((bitField0_ & 0x00010000) != 0); } /** * * *
            -     * Optional. Configuration for Natural Language Query Understanding.
            +     * The start schema to use for this
            +     * [DataStore][google.cloud.discoveryengine.v1beta.DataStore] when
            +     * provisioning it. If unset, a default vertical specialized schema will be
            +     * used.
            +     *
            +     * This field is only used by
            +     * [CreateDataStore][google.cloud.discoveryengine.v1beta.DataStoreService.CreateDataStore]
            +     * API, and will be ignored if used in other APIs. This field will be omitted
            +     * from all API responses including
            +     * [CreateDataStore][google.cloud.discoveryengine.v1beta.DataStoreService.CreateDataStore]
            +     * API. To retrieve a schema of a
            +     * [DataStore][google.cloud.discoveryengine.v1beta.DataStore], use
            +     * [SchemaService.GetSchema][google.cloud.discoveryengine.v1beta.SchemaService.GetSchema]
            +     * API instead.
            +     *
            +     * The provided schema will be validated against certain rules on schema.
            +     * Learn more from [this
            +     * doc](https://cloud.google.com/generative-ai-app-builder/docs/provide-schema).
                  * 
            * - * - * .google.cloud.discoveryengine.v1beta.NaturalLanguageQueryUnderstandingConfig natural_language_query_understanding_config = 34 [(.google.api.field_behavior) = OPTIONAL]; - * + * .google.cloud.discoveryengine.v1beta.Schema starting_schema = 28; * - * @return The naturalLanguageQueryUnderstandingConfig. + * @return The startingSchema. */ - public com.google.cloud.discoveryengine.v1beta.NaturalLanguageQueryUnderstandingConfig - getNaturalLanguageQueryUnderstandingConfig() { - if (naturalLanguageQueryUnderstandingConfigBuilder_ == null) { - return naturalLanguageQueryUnderstandingConfig_ == null - ? com.google.cloud.discoveryengine.v1beta.NaturalLanguageQueryUnderstandingConfig - .getDefaultInstance() - : naturalLanguageQueryUnderstandingConfig_; + public com.google.cloud.discoveryengine.v1beta.Schema getStartingSchema() { + if (startingSchemaBuilder_ == null) { + return startingSchema_ == null + ? com.google.cloud.discoveryengine.v1beta.Schema.getDefaultInstance() + : startingSchema_; } else { - return naturalLanguageQueryUnderstandingConfigBuilder_.getMessage(); + return startingSchemaBuilder_.getMessage(); } } @@ -5630,24 +15948,38 @@ public boolean hasNaturalLanguageQueryUnderstandingConfig() { * * *
            -     * Optional. Configuration for Natural Language Query Understanding.
            +     * The start schema to use for this
            +     * [DataStore][google.cloud.discoveryengine.v1beta.DataStore] when
            +     * provisioning it. If unset, a default vertical specialized schema will be
            +     * used.
            +     *
            +     * This field is only used by
            +     * [CreateDataStore][google.cloud.discoveryengine.v1beta.DataStoreService.CreateDataStore]
            +     * API, and will be ignored if used in other APIs. This field will be omitted
            +     * from all API responses including
            +     * [CreateDataStore][google.cloud.discoveryengine.v1beta.DataStoreService.CreateDataStore]
            +     * API. To retrieve a schema of a
            +     * [DataStore][google.cloud.discoveryengine.v1beta.DataStore], use
            +     * [SchemaService.GetSchema][google.cloud.discoveryengine.v1beta.SchemaService.GetSchema]
            +     * API instead.
            +     *
            +     * The provided schema will be validated against certain rules on schema.
            +     * Learn more from [this
            +     * doc](https://cloud.google.com/generative-ai-app-builder/docs/provide-schema).
                  * 
            * - * - * .google.cloud.discoveryengine.v1beta.NaturalLanguageQueryUnderstandingConfig natural_language_query_understanding_config = 34 [(.google.api.field_behavior) = OPTIONAL]; - * + * .google.cloud.discoveryengine.v1beta.Schema starting_schema = 28; */ - public Builder setNaturalLanguageQueryUnderstandingConfig( - com.google.cloud.discoveryengine.v1beta.NaturalLanguageQueryUnderstandingConfig value) { - if (naturalLanguageQueryUnderstandingConfigBuilder_ == null) { + public Builder setStartingSchema(com.google.cloud.discoveryengine.v1beta.Schema value) { + if (startingSchemaBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - naturalLanguageQueryUnderstandingConfig_ = value; + startingSchema_ = value; } else { - naturalLanguageQueryUnderstandingConfigBuilder_.setMessage(value); + startingSchemaBuilder_.setMessage(value); } - bitField0_ |= 0x00000100; + bitField0_ |= 0x00010000; onChanged(); return this; } @@ -5656,22 +15988,36 @@ public Builder setNaturalLanguageQueryUnderstandingConfig( * * *
            -     * Optional. Configuration for Natural Language Query Understanding.
            +     * The start schema to use for this
            +     * [DataStore][google.cloud.discoveryengine.v1beta.DataStore] when
            +     * provisioning it. If unset, a default vertical specialized schema will be
            +     * used.
            +     *
            +     * This field is only used by
            +     * [CreateDataStore][google.cloud.discoveryengine.v1beta.DataStoreService.CreateDataStore]
            +     * API, and will be ignored if used in other APIs. This field will be omitted
            +     * from all API responses including
            +     * [CreateDataStore][google.cloud.discoveryengine.v1beta.DataStoreService.CreateDataStore]
            +     * API. To retrieve a schema of a
            +     * [DataStore][google.cloud.discoveryengine.v1beta.DataStore], use
            +     * [SchemaService.GetSchema][google.cloud.discoveryengine.v1beta.SchemaService.GetSchema]
            +     * API instead.
            +     *
            +     * The provided schema will be validated against certain rules on schema.
            +     * Learn more from [this
            +     * doc](https://cloud.google.com/generative-ai-app-builder/docs/provide-schema).
                  * 
            * - * - * .google.cloud.discoveryengine.v1beta.NaturalLanguageQueryUnderstandingConfig natural_language_query_understanding_config = 34 [(.google.api.field_behavior) = OPTIONAL]; - * + * .google.cloud.discoveryengine.v1beta.Schema starting_schema = 28; */ - public Builder setNaturalLanguageQueryUnderstandingConfig( - com.google.cloud.discoveryengine.v1beta.NaturalLanguageQueryUnderstandingConfig.Builder - builderForValue) { - if (naturalLanguageQueryUnderstandingConfigBuilder_ == null) { - naturalLanguageQueryUnderstandingConfig_ = builderForValue.build(); + public Builder setStartingSchema( + com.google.cloud.discoveryengine.v1beta.Schema.Builder builderForValue) { + if (startingSchemaBuilder_ == null) { + startingSchema_ = builderForValue.build(); } else { - naturalLanguageQueryUnderstandingConfigBuilder_.setMessage(builderForValue.build()); + startingSchemaBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00000100; + bitField0_ |= 0x00010000; onChanged(); return this; } @@ -5680,30 +16026,43 @@ public Builder setNaturalLanguageQueryUnderstandingConfig( * * *
            -     * Optional. Configuration for Natural Language Query Understanding.
            -     * 
            + * The start schema to use for this + * [DataStore][google.cloud.discoveryengine.v1beta.DataStore] when + * provisioning it. If unset, a default vertical specialized schema will be + * used. * - * - * .google.cloud.discoveryengine.v1beta.NaturalLanguageQueryUnderstandingConfig natural_language_query_understanding_config = 34 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder mergeNaturalLanguageQueryUnderstandingConfig( - com.google.cloud.discoveryengine.v1beta.NaturalLanguageQueryUnderstandingConfig value) { - if (naturalLanguageQueryUnderstandingConfigBuilder_ == null) { - if (((bitField0_ & 0x00000100) != 0) - && naturalLanguageQueryUnderstandingConfig_ != null - && naturalLanguageQueryUnderstandingConfig_ - != com.google.cloud.discoveryengine.v1beta.NaturalLanguageQueryUnderstandingConfig - .getDefaultInstance()) { - getNaturalLanguageQueryUnderstandingConfigBuilder().mergeFrom(value); + * This field is only used by + * [CreateDataStore][google.cloud.discoveryengine.v1beta.DataStoreService.CreateDataStore] + * API, and will be ignored if used in other APIs. This field will be omitted + * from all API responses including + * [CreateDataStore][google.cloud.discoveryengine.v1beta.DataStoreService.CreateDataStore] + * API. To retrieve a schema of a + * [DataStore][google.cloud.discoveryengine.v1beta.DataStore], use + * [SchemaService.GetSchema][google.cloud.discoveryengine.v1beta.SchemaService.GetSchema] + * API instead. + * + * The provided schema will be validated against certain rules on schema. + * Learn more from [this + * doc](https://cloud.google.com/generative-ai-app-builder/docs/provide-schema). + * + * + * .google.cloud.discoveryengine.v1beta.Schema starting_schema = 28; + */ + public Builder mergeStartingSchema(com.google.cloud.discoveryengine.v1beta.Schema value) { + if (startingSchemaBuilder_ == null) { + if (((bitField0_ & 0x00010000) != 0) + && startingSchema_ != null + && startingSchema_ + != com.google.cloud.discoveryengine.v1beta.Schema.getDefaultInstance()) { + getStartingSchemaBuilder().mergeFrom(value); } else { - naturalLanguageQueryUnderstandingConfig_ = value; + startingSchema_ = value; } } else { - naturalLanguageQueryUnderstandingConfigBuilder_.mergeFrom(value); + startingSchemaBuilder_.mergeFrom(value); } - if (naturalLanguageQueryUnderstandingConfig_ != null) { - bitField0_ |= 0x00000100; + if (startingSchema_ != null) { + bitField0_ |= 0x00010000; onChanged(); } return this; @@ -5713,19 +16072,34 @@ public Builder mergeNaturalLanguageQueryUnderstandingConfig( * * *
            -     * Optional. Configuration for Natural Language Query Understanding.
            +     * The start schema to use for this
            +     * [DataStore][google.cloud.discoveryengine.v1beta.DataStore] when
            +     * provisioning it. If unset, a default vertical specialized schema will be
            +     * used.
            +     *
            +     * This field is only used by
            +     * [CreateDataStore][google.cloud.discoveryengine.v1beta.DataStoreService.CreateDataStore]
            +     * API, and will be ignored if used in other APIs. This field will be omitted
            +     * from all API responses including
            +     * [CreateDataStore][google.cloud.discoveryengine.v1beta.DataStoreService.CreateDataStore]
            +     * API. To retrieve a schema of a
            +     * [DataStore][google.cloud.discoveryengine.v1beta.DataStore], use
            +     * [SchemaService.GetSchema][google.cloud.discoveryengine.v1beta.SchemaService.GetSchema]
            +     * API instead.
            +     *
            +     * The provided schema will be validated against certain rules on schema.
            +     * Learn more from [this
            +     * doc](https://cloud.google.com/generative-ai-app-builder/docs/provide-schema).
                  * 
            * - * - * .google.cloud.discoveryengine.v1beta.NaturalLanguageQueryUnderstandingConfig natural_language_query_understanding_config = 34 [(.google.api.field_behavior) = OPTIONAL]; - * + * .google.cloud.discoveryengine.v1beta.Schema starting_schema = 28; */ - public Builder clearNaturalLanguageQueryUnderstandingConfig() { - bitField0_ = (bitField0_ & ~0x00000100); - naturalLanguageQueryUnderstandingConfig_ = null; - if (naturalLanguageQueryUnderstandingConfigBuilder_ != null) { - naturalLanguageQueryUnderstandingConfigBuilder_.dispose(); - naturalLanguageQueryUnderstandingConfigBuilder_ = null; + public Builder clearStartingSchema() { + bitField0_ = (bitField0_ & ~0x00010000); + startingSchema_ = null; + if (startingSchemaBuilder_ != null) { + startingSchemaBuilder_.dispose(); + startingSchemaBuilder_ = null; } onChanged(); return this; @@ -5735,40 +16109,67 @@ public Builder clearNaturalLanguageQueryUnderstandingConfig() { * * *
            -     * Optional. Configuration for Natural Language Query Understanding.
            +     * The start schema to use for this
            +     * [DataStore][google.cloud.discoveryengine.v1beta.DataStore] when
            +     * provisioning it. If unset, a default vertical specialized schema will be
            +     * used.
            +     *
            +     * This field is only used by
            +     * [CreateDataStore][google.cloud.discoveryengine.v1beta.DataStoreService.CreateDataStore]
            +     * API, and will be ignored if used in other APIs. This field will be omitted
            +     * from all API responses including
            +     * [CreateDataStore][google.cloud.discoveryengine.v1beta.DataStoreService.CreateDataStore]
            +     * API. To retrieve a schema of a
            +     * [DataStore][google.cloud.discoveryengine.v1beta.DataStore], use
            +     * [SchemaService.GetSchema][google.cloud.discoveryengine.v1beta.SchemaService.GetSchema]
            +     * API instead.
            +     *
            +     * The provided schema will be validated against certain rules on schema.
            +     * Learn more from [this
            +     * doc](https://cloud.google.com/generative-ai-app-builder/docs/provide-schema).
                  * 
            * - * - * .google.cloud.discoveryengine.v1beta.NaturalLanguageQueryUnderstandingConfig natural_language_query_understanding_config = 34 [(.google.api.field_behavior) = OPTIONAL]; - * + * .google.cloud.discoveryengine.v1beta.Schema starting_schema = 28; */ - public com.google.cloud.discoveryengine.v1beta.NaturalLanguageQueryUnderstandingConfig.Builder - getNaturalLanguageQueryUnderstandingConfigBuilder() { - bitField0_ |= 0x00000100; + public com.google.cloud.discoveryengine.v1beta.Schema.Builder getStartingSchemaBuilder() { + bitField0_ |= 0x00010000; onChanged(); - return internalGetNaturalLanguageQueryUnderstandingConfigFieldBuilder().getBuilder(); + return internalGetStartingSchemaFieldBuilder().getBuilder(); } /** * * *
            -     * Optional. Configuration for Natural Language Query Understanding.
            +     * The start schema to use for this
            +     * [DataStore][google.cloud.discoveryengine.v1beta.DataStore] when
            +     * provisioning it. If unset, a default vertical specialized schema will be
            +     * used.
            +     *
            +     * This field is only used by
            +     * [CreateDataStore][google.cloud.discoveryengine.v1beta.DataStoreService.CreateDataStore]
            +     * API, and will be ignored if used in other APIs. This field will be omitted
            +     * from all API responses including
            +     * [CreateDataStore][google.cloud.discoveryengine.v1beta.DataStoreService.CreateDataStore]
            +     * API. To retrieve a schema of a
            +     * [DataStore][google.cloud.discoveryengine.v1beta.DataStore], use
            +     * [SchemaService.GetSchema][google.cloud.discoveryengine.v1beta.SchemaService.GetSchema]
            +     * API instead.
            +     *
            +     * The provided schema will be validated against certain rules on schema.
            +     * Learn more from [this
            +     * doc](https://cloud.google.com/generative-ai-app-builder/docs/provide-schema).
                  * 
            * - * - * .google.cloud.discoveryengine.v1beta.NaturalLanguageQueryUnderstandingConfig natural_language_query_understanding_config = 34 [(.google.api.field_behavior) = OPTIONAL]; - * + * .google.cloud.discoveryengine.v1beta.Schema starting_schema = 28; */ - public com.google.cloud.discoveryengine.v1beta.NaturalLanguageQueryUnderstandingConfigOrBuilder - getNaturalLanguageQueryUnderstandingConfigOrBuilder() { - if (naturalLanguageQueryUnderstandingConfigBuilder_ != null) { - return naturalLanguageQueryUnderstandingConfigBuilder_.getMessageOrBuilder(); + public com.google.cloud.discoveryengine.v1beta.SchemaOrBuilder getStartingSchemaOrBuilder() { + if (startingSchemaBuilder_ != null) { + return startingSchemaBuilder_.getMessageOrBuilder(); } else { - return naturalLanguageQueryUnderstandingConfig_ == null - ? com.google.cloud.discoveryengine.v1beta.NaturalLanguageQueryUnderstandingConfig - .getDefaultInstance() - : naturalLanguageQueryUnderstandingConfig_; + return startingSchema_ == null + ? com.google.cloud.discoveryengine.v1beta.Schema.getDefaultInstance() + : startingSchema_; } } @@ -5776,79 +16177,89 @@ public Builder clearNaturalLanguageQueryUnderstandingConfig() { * * *
            -     * Optional. Configuration for Natural Language Query Understanding.
            +     * The start schema to use for this
            +     * [DataStore][google.cloud.discoveryengine.v1beta.DataStore] when
            +     * provisioning it. If unset, a default vertical specialized schema will be
            +     * used.
            +     *
            +     * This field is only used by
            +     * [CreateDataStore][google.cloud.discoveryengine.v1beta.DataStoreService.CreateDataStore]
            +     * API, and will be ignored if used in other APIs. This field will be omitted
            +     * from all API responses including
            +     * [CreateDataStore][google.cloud.discoveryengine.v1beta.DataStoreService.CreateDataStore]
            +     * API. To retrieve a schema of a
            +     * [DataStore][google.cloud.discoveryengine.v1beta.DataStore], use
            +     * [SchemaService.GetSchema][google.cloud.discoveryengine.v1beta.SchemaService.GetSchema]
            +     * API instead.
            +     *
            +     * The provided schema will be validated against certain rules on schema.
            +     * Learn more from [this
            +     * doc](https://cloud.google.com/generative-ai-app-builder/docs/provide-schema).
                  * 
            * - * - * .google.cloud.discoveryengine.v1beta.NaturalLanguageQueryUnderstandingConfig natural_language_query_understanding_config = 34 [(.google.api.field_behavior) = OPTIONAL]; - * + * .google.cloud.discoveryengine.v1beta.Schema starting_schema = 28; */ private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.discoveryengine.v1beta.NaturalLanguageQueryUnderstandingConfig, - com.google.cloud.discoveryengine.v1beta.NaturalLanguageQueryUnderstandingConfig.Builder, - com.google.cloud.discoveryengine.v1beta - .NaturalLanguageQueryUnderstandingConfigOrBuilder> - internalGetNaturalLanguageQueryUnderstandingConfigFieldBuilder() { - if (naturalLanguageQueryUnderstandingConfigBuilder_ == null) { - naturalLanguageQueryUnderstandingConfigBuilder_ = + com.google.cloud.discoveryengine.v1beta.Schema, + com.google.cloud.discoveryengine.v1beta.Schema.Builder, + com.google.cloud.discoveryengine.v1beta.SchemaOrBuilder> + internalGetStartingSchemaFieldBuilder() { + if (startingSchemaBuilder_ == null) { + startingSchemaBuilder_ = new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.discoveryengine.v1beta.NaturalLanguageQueryUnderstandingConfig, - com.google.cloud.discoveryengine.v1beta.NaturalLanguageQueryUnderstandingConfig - .Builder, - com.google.cloud.discoveryengine.v1beta - .NaturalLanguageQueryUnderstandingConfigOrBuilder>( - getNaturalLanguageQueryUnderstandingConfig(), getParentForChildren(), isClean()); - naturalLanguageQueryUnderstandingConfig_ = null; + com.google.cloud.discoveryengine.v1beta.Schema, + com.google.cloud.discoveryengine.v1beta.Schema.Builder, + com.google.cloud.discoveryengine.v1beta.SchemaOrBuilder>( + getStartingSchema(), getParentForChildren(), isClean()); + startingSchema_ = null; } - return naturalLanguageQueryUnderstandingConfigBuilder_; + return startingSchemaBuilder_; } - private com.google.cloud.discoveryengine.v1beta.DataStore.BillingEstimation billingEstimation_; + private com.google.cloud.discoveryengine.v1beta.HealthcareFhirConfig healthcareFhirConfig_; private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.discoveryengine.v1beta.DataStore.BillingEstimation, - com.google.cloud.discoveryengine.v1beta.DataStore.BillingEstimation.Builder, - com.google.cloud.discoveryengine.v1beta.DataStore.BillingEstimationOrBuilder> - billingEstimationBuilder_; + com.google.cloud.discoveryengine.v1beta.HealthcareFhirConfig, + com.google.cloud.discoveryengine.v1beta.HealthcareFhirConfig.Builder, + com.google.cloud.discoveryengine.v1beta.HealthcareFhirConfigOrBuilder> + healthcareFhirConfigBuilder_; /** * * *
            -     * Output only. Data size estimation for billing.
            +     * Optional. Configuration for `HEALTHCARE_FHIR` vertical.
                  * 
            * * - * .google.cloud.discoveryengine.v1beta.DataStore.BillingEstimation billing_estimation = 23 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * .google.cloud.discoveryengine.v1beta.HealthcareFhirConfig healthcare_fhir_config = 29 [(.google.api.field_behavior) = OPTIONAL]; * * - * @return Whether the billingEstimation field is set. + * @return Whether the healthcareFhirConfig field is set. */ - public boolean hasBillingEstimation() { - return ((bitField0_ & 0x00000200) != 0); + public boolean hasHealthcareFhirConfig() { + return ((bitField0_ & 0x00020000) != 0); } /** * * *
            -     * Output only. Data size estimation for billing.
            +     * Optional. Configuration for `HEALTHCARE_FHIR` vertical.
                  * 
            * * - * .google.cloud.discoveryengine.v1beta.DataStore.BillingEstimation billing_estimation = 23 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * .google.cloud.discoveryengine.v1beta.HealthcareFhirConfig healthcare_fhir_config = 29 [(.google.api.field_behavior) = OPTIONAL]; * * - * @return The billingEstimation. + * @return The healthcareFhirConfig. */ - public com.google.cloud.discoveryengine.v1beta.DataStore.BillingEstimation - getBillingEstimation() { - if (billingEstimationBuilder_ == null) { - return billingEstimation_ == null - ? com.google.cloud.discoveryengine.v1beta.DataStore.BillingEstimation - .getDefaultInstance() - : billingEstimation_; + public com.google.cloud.discoveryengine.v1beta.HealthcareFhirConfig getHealthcareFhirConfig() { + if (healthcareFhirConfigBuilder_ == null) { + return healthcareFhirConfig_ == null + ? com.google.cloud.discoveryengine.v1beta.HealthcareFhirConfig.getDefaultInstance() + : healthcareFhirConfig_; } else { - return billingEstimationBuilder_.getMessage(); + return healthcareFhirConfigBuilder_.getMessage(); } } @@ -5856,24 +16267,24 @@ public boolean hasBillingEstimation() { * * *
            -     * Output only. Data size estimation for billing.
            +     * Optional. Configuration for `HEALTHCARE_FHIR` vertical.
                  * 
            * * - * .google.cloud.discoveryengine.v1beta.DataStore.BillingEstimation billing_estimation = 23 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * .google.cloud.discoveryengine.v1beta.HealthcareFhirConfig healthcare_fhir_config = 29 [(.google.api.field_behavior) = OPTIONAL]; * */ - public Builder setBillingEstimation( - com.google.cloud.discoveryengine.v1beta.DataStore.BillingEstimation value) { - if (billingEstimationBuilder_ == null) { + public Builder setHealthcareFhirConfig( + com.google.cloud.discoveryengine.v1beta.HealthcareFhirConfig value) { + if (healthcareFhirConfigBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - billingEstimation_ = value; + healthcareFhirConfig_ = value; } else { - billingEstimationBuilder_.setMessage(value); + healthcareFhirConfigBuilder_.setMessage(value); } - bitField0_ |= 0x00000200; + bitField0_ |= 0x00020000; onChanged(); return this; } @@ -5882,22 +16293,21 @@ public Builder setBillingEstimation( * * *
            -     * Output only. Data size estimation for billing.
            +     * Optional. Configuration for `HEALTHCARE_FHIR` vertical.
                  * 
            * * - * .google.cloud.discoveryengine.v1beta.DataStore.BillingEstimation billing_estimation = 23 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * .google.cloud.discoveryengine.v1beta.HealthcareFhirConfig healthcare_fhir_config = 29 [(.google.api.field_behavior) = OPTIONAL]; * */ - public Builder setBillingEstimation( - com.google.cloud.discoveryengine.v1beta.DataStore.BillingEstimation.Builder - builderForValue) { - if (billingEstimationBuilder_ == null) { - billingEstimation_ = builderForValue.build(); + public Builder setHealthcareFhirConfig( + com.google.cloud.discoveryengine.v1beta.HealthcareFhirConfig.Builder builderForValue) { + if (healthcareFhirConfigBuilder_ == null) { + healthcareFhirConfig_ = builderForValue.build(); } else { - billingEstimationBuilder_.setMessage(builderForValue.build()); + healthcareFhirConfigBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00000200; + bitField0_ |= 0x00020000; onChanged(); return this; } @@ -5906,30 +16316,30 @@ public Builder setBillingEstimation( * * *
            -     * Output only. Data size estimation for billing.
            +     * Optional. Configuration for `HEALTHCARE_FHIR` vertical.
                  * 
            * * - * .google.cloud.discoveryengine.v1beta.DataStore.BillingEstimation billing_estimation = 23 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * .google.cloud.discoveryengine.v1beta.HealthcareFhirConfig healthcare_fhir_config = 29 [(.google.api.field_behavior) = OPTIONAL]; * */ - public Builder mergeBillingEstimation( - com.google.cloud.discoveryengine.v1beta.DataStore.BillingEstimation value) { - if (billingEstimationBuilder_ == null) { - if (((bitField0_ & 0x00000200) != 0) - && billingEstimation_ != null - && billingEstimation_ - != com.google.cloud.discoveryengine.v1beta.DataStore.BillingEstimation + public Builder mergeHealthcareFhirConfig( + com.google.cloud.discoveryengine.v1beta.HealthcareFhirConfig value) { + if (healthcareFhirConfigBuilder_ == null) { + if (((bitField0_ & 0x00020000) != 0) + && healthcareFhirConfig_ != null + && healthcareFhirConfig_ + != com.google.cloud.discoveryengine.v1beta.HealthcareFhirConfig .getDefaultInstance()) { - getBillingEstimationBuilder().mergeFrom(value); + getHealthcareFhirConfigBuilder().mergeFrom(value); } else { - billingEstimation_ = value; + healthcareFhirConfig_ = value; } } else { - billingEstimationBuilder_.mergeFrom(value); + healthcareFhirConfigBuilder_.mergeFrom(value); } - if (billingEstimation_ != null) { - bitField0_ |= 0x00000200; + if (healthcareFhirConfig_ != null) { + bitField0_ |= 0x00020000; onChanged(); } return this; @@ -5939,19 +16349,19 @@ public Builder mergeBillingEstimation( * * *
            -     * Output only. Data size estimation for billing.
            +     * Optional. Configuration for `HEALTHCARE_FHIR` vertical.
                  * 
            * * - * .google.cloud.discoveryengine.v1beta.DataStore.BillingEstimation billing_estimation = 23 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * .google.cloud.discoveryengine.v1beta.HealthcareFhirConfig healthcare_fhir_config = 29 [(.google.api.field_behavior) = OPTIONAL]; * */ - public Builder clearBillingEstimation() { - bitField0_ = (bitField0_ & ~0x00000200); - billingEstimation_ = null; - if (billingEstimationBuilder_ != null) { - billingEstimationBuilder_.dispose(); - billingEstimationBuilder_ = null; + public Builder clearHealthcareFhirConfig() { + bitField0_ = (bitField0_ & ~0x00020000); + healthcareFhirConfig_ = null; + if (healthcareFhirConfigBuilder_ != null) { + healthcareFhirConfigBuilder_.dispose(); + healthcareFhirConfigBuilder_ = null; } onChanged(); return this; @@ -5961,40 +16371,39 @@ public Builder clearBillingEstimation() { * * *
            -     * Output only. Data size estimation for billing.
            +     * Optional. Configuration for `HEALTHCARE_FHIR` vertical.
                  * 
            * * - * .google.cloud.discoveryengine.v1beta.DataStore.BillingEstimation billing_estimation = 23 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * .google.cloud.discoveryengine.v1beta.HealthcareFhirConfig healthcare_fhir_config = 29 [(.google.api.field_behavior) = OPTIONAL]; * */ - public com.google.cloud.discoveryengine.v1beta.DataStore.BillingEstimation.Builder - getBillingEstimationBuilder() { - bitField0_ |= 0x00000200; + public com.google.cloud.discoveryengine.v1beta.HealthcareFhirConfig.Builder + getHealthcareFhirConfigBuilder() { + bitField0_ |= 0x00020000; onChanged(); - return internalGetBillingEstimationFieldBuilder().getBuilder(); + return internalGetHealthcareFhirConfigFieldBuilder().getBuilder(); } /** * * *
            -     * Output only. Data size estimation for billing.
            +     * Optional. Configuration for `HEALTHCARE_FHIR` vertical.
                  * 
            * * - * .google.cloud.discoveryengine.v1beta.DataStore.BillingEstimation billing_estimation = 23 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * .google.cloud.discoveryengine.v1beta.HealthcareFhirConfig healthcare_fhir_config = 29 [(.google.api.field_behavior) = OPTIONAL]; * */ - public com.google.cloud.discoveryengine.v1beta.DataStore.BillingEstimationOrBuilder - getBillingEstimationOrBuilder() { - if (billingEstimationBuilder_ != null) { - return billingEstimationBuilder_.getMessageOrBuilder(); + public com.google.cloud.discoveryengine.v1beta.HealthcareFhirConfigOrBuilder + getHealthcareFhirConfigOrBuilder() { + if (healthcareFhirConfigBuilder_ != null) { + return healthcareFhirConfigBuilder_.getMessageOrBuilder(); } else { - return billingEstimation_ == null - ? com.google.cloud.discoveryengine.v1beta.DataStore.BillingEstimation - .getDefaultInstance() - : billingEstimation_; + return healthcareFhirConfig_ == null + ? com.google.cloud.discoveryengine.v1beta.HealthcareFhirConfig.getDefaultInstance() + : healthcareFhirConfig_; } } @@ -6002,78 +16411,77 @@ public Builder clearBillingEstimation() { * * *
            -     * Output only. Data size estimation for billing.
            +     * Optional. Configuration for `HEALTHCARE_FHIR` vertical.
                  * 
            * * - * .google.cloud.discoveryengine.v1beta.DataStore.BillingEstimation billing_estimation = 23 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * .google.cloud.discoveryengine.v1beta.HealthcareFhirConfig healthcare_fhir_config = 29 [(.google.api.field_behavior) = OPTIONAL]; * */ private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.discoveryengine.v1beta.DataStore.BillingEstimation, - com.google.cloud.discoveryengine.v1beta.DataStore.BillingEstimation.Builder, - com.google.cloud.discoveryengine.v1beta.DataStore.BillingEstimationOrBuilder> - internalGetBillingEstimationFieldBuilder() { - if (billingEstimationBuilder_ == null) { - billingEstimationBuilder_ = + com.google.cloud.discoveryengine.v1beta.HealthcareFhirConfig, + com.google.cloud.discoveryengine.v1beta.HealthcareFhirConfig.Builder, + com.google.cloud.discoveryengine.v1beta.HealthcareFhirConfigOrBuilder> + internalGetHealthcareFhirConfigFieldBuilder() { + if (healthcareFhirConfigBuilder_ == null) { + healthcareFhirConfigBuilder_ = new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.discoveryengine.v1beta.DataStore.BillingEstimation, - com.google.cloud.discoveryengine.v1beta.DataStore.BillingEstimation.Builder, - com.google.cloud.discoveryengine.v1beta.DataStore.BillingEstimationOrBuilder>( - getBillingEstimation(), getParentForChildren(), isClean()); - billingEstimation_ = null; + com.google.cloud.discoveryengine.v1beta.HealthcareFhirConfig, + com.google.cloud.discoveryengine.v1beta.HealthcareFhirConfig.Builder, + com.google.cloud.discoveryengine.v1beta.HealthcareFhirConfigOrBuilder>( + getHealthcareFhirConfig(), getParentForChildren(), isClean()); + healthcareFhirConfig_ = null; } - return billingEstimationBuilder_; + return healthcareFhirConfigBuilder_; } - private com.google.cloud.discoveryengine.v1beta.WorkspaceConfig workspaceConfig_; + private com.google.cloud.discoveryengine.v1beta.DataStore.ServingConfigDataStore + servingConfigDataStore_; private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.discoveryengine.v1beta.WorkspaceConfig, - com.google.cloud.discoveryengine.v1beta.WorkspaceConfig.Builder, - com.google.cloud.discoveryengine.v1beta.WorkspaceConfigOrBuilder> - workspaceConfigBuilder_; + com.google.cloud.discoveryengine.v1beta.DataStore.ServingConfigDataStore, + com.google.cloud.discoveryengine.v1beta.DataStore.ServingConfigDataStore.Builder, + com.google.cloud.discoveryengine.v1beta.DataStore.ServingConfigDataStoreOrBuilder> + servingConfigDataStoreBuilder_; - /** - * - * - *
            -     * Config to store data store type configuration for workspace data. This
            -     * must be set when
            -     * [DataStore.content_config][google.cloud.discoveryengine.v1beta.DataStore.content_config]
            -     * is set as
            -     * [DataStore.ContentConfig.GOOGLE_WORKSPACE][google.cloud.discoveryengine.v1beta.DataStore.ContentConfig.GOOGLE_WORKSPACE].
            +    /**
            +     *
            +     *
            +     * 
            +     * Optional. Stores serving config at DataStore level.
                  * 
            * - * .google.cloud.discoveryengine.v1beta.WorkspaceConfig workspace_config = 25; + * + * .google.cloud.discoveryengine.v1beta.DataStore.ServingConfigDataStore serving_config_data_store = 30 [(.google.api.field_behavior) = OPTIONAL]; + * * - * @return Whether the workspaceConfig field is set. + * @return Whether the servingConfigDataStore field is set. */ - public boolean hasWorkspaceConfig() { - return ((bitField0_ & 0x00000400) != 0); + public boolean hasServingConfigDataStore() { + return ((bitField0_ & 0x00040000) != 0); } /** * * *
            -     * Config to store data store type configuration for workspace data. This
            -     * must be set when
            -     * [DataStore.content_config][google.cloud.discoveryengine.v1beta.DataStore.content_config]
            -     * is set as
            -     * [DataStore.ContentConfig.GOOGLE_WORKSPACE][google.cloud.discoveryengine.v1beta.DataStore.ContentConfig.GOOGLE_WORKSPACE].
            +     * Optional. Stores serving config at DataStore level.
                  * 
            * - * .google.cloud.discoveryengine.v1beta.WorkspaceConfig workspace_config = 25; + * + * .google.cloud.discoveryengine.v1beta.DataStore.ServingConfigDataStore serving_config_data_store = 30 [(.google.api.field_behavior) = OPTIONAL]; + * * - * @return The workspaceConfig. + * @return The servingConfigDataStore. */ - public com.google.cloud.discoveryengine.v1beta.WorkspaceConfig getWorkspaceConfig() { - if (workspaceConfigBuilder_ == null) { - return workspaceConfig_ == null - ? com.google.cloud.discoveryengine.v1beta.WorkspaceConfig.getDefaultInstance() - : workspaceConfig_; + public com.google.cloud.discoveryengine.v1beta.DataStore.ServingConfigDataStore + getServingConfigDataStore() { + if (servingConfigDataStoreBuilder_ == null) { + return servingConfigDataStore_ == null + ? com.google.cloud.discoveryengine.v1beta.DataStore.ServingConfigDataStore + .getDefaultInstance() + : servingConfigDataStore_; } else { - return workspaceConfigBuilder_.getMessage(); + return servingConfigDataStoreBuilder_.getMessage(); } } @@ -6081,26 +16489,24 @@ public com.google.cloud.discoveryengine.v1beta.WorkspaceConfig getWorkspaceConfi * * *
            -     * Config to store data store type configuration for workspace data. This
            -     * must be set when
            -     * [DataStore.content_config][google.cloud.discoveryengine.v1beta.DataStore.content_config]
            -     * is set as
            -     * [DataStore.ContentConfig.GOOGLE_WORKSPACE][google.cloud.discoveryengine.v1beta.DataStore.ContentConfig.GOOGLE_WORKSPACE].
            +     * Optional. Stores serving config at DataStore level.
                  * 
            * - * .google.cloud.discoveryengine.v1beta.WorkspaceConfig workspace_config = 25; + * + * .google.cloud.discoveryengine.v1beta.DataStore.ServingConfigDataStore serving_config_data_store = 30 [(.google.api.field_behavior) = OPTIONAL]; + * */ - public Builder setWorkspaceConfig( - com.google.cloud.discoveryengine.v1beta.WorkspaceConfig value) { - if (workspaceConfigBuilder_ == null) { + public Builder setServingConfigDataStore( + com.google.cloud.discoveryengine.v1beta.DataStore.ServingConfigDataStore value) { + if (servingConfigDataStoreBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - workspaceConfig_ = value; + servingConfigDataStore_ = value; } else { - workspaceConfigBuilder_.setMessage(value); + servingConfigDataStoreBuilder_.setMessage(value); } - bitField0_ |= 0x00000400; + bitField0_ |= 0x00040000; onChanged(); return this; } @@ -6109,23 +16515,22 @@ public Builder setWorkspaceConfig( * * *
            -     * Config to store data store type configuration for workspace data. This
            -     * must be set when
            -     * [DataStore.content_config][google.cloud.discoveryengine.v1beta.DataStore.content_config]
            -     * is set as
            -     * [DataStore.ContentConfig.GOOGLE_WORKSPACE][google.cloud.discoveryengine.v1beta.DataStore.ContentConfig.GOOGLE_WORKSPACE].
            +     * Optional. Stores serving config at DataStore level.
                  * 
            * - * .google.cloud.discoveryengine.v1beta.WorkspaceConfig workspace_config = 25; + * + * .google.cloud.discoveryengine.v1beta.DataStore.ServingConfigDataStore serving_config_data_store = 30 [(.google.api.field_behavior) = OPTIONAL]; + * */ - public Builder setWorkspaceConfig( - com.google.cloud.discoveryengine.v1beta.WorkspaceConfig.Builder builderForValue) { - if (workspaceConfigBuilder_ == null) { - workspaceConfig_ = builderForValue.build(); + public Builder setServingConfigDataStore( + com.google.cloud.discoveryengine.v1beta.DataStore.ServingConfigDataStore.Builder + builderForValue) { + if (servingConfigDataStoreBuilder_ == null) { + servingConfigDataStore_ = builderForValue.build(); } else { - workspaceConfigBuilder_.setMessage(builderForValue.build()); + servingConfigDataStoreBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00000400; + bitField0_ |= 0x00040000; onChanged(); return this; } @@ -6134,31 +16539,30 @@ public Builder setWorkspaceConfig( * * *
            -     * Config to store data store type configuration for workspace data. This
            -     * must be set when
            -     * [DataStore.content_config][google.cloud.discoveryengine.v1beta.DataStore.content_config]
            -     * is set as
            -     * [DataStore.ContentConfig.GOOGLE_WORKSPACE][google.cloud.discoveryengine.v1beta.DataStore.ContentConfig.GOOGLE_WORKSPACE].
            +     * Optional. Stores serving config at DataStore level.
                  * 
            * - * .google.cloud.discoveryengine.v1beta.WorkspaceConfig workspace_config = 25; + * + * .google.cloud.discoveryengine.v1beta.DataStore.ServingConfigDataStore serving_config_data_store = 30 [(.google.api.field_behavior) = OPTIONAL]; + * */ - public Builder mergeWorkspaceConfig( - com.google.cloud.discoveryengine.v1beta.WorkspaceConfig value) { - if (workspaceConfigBuilder_ == null) { - if (((bitField0_ & 0x00000400) != 0) - && workspaceConfig_ != null - && workspaceConfig_ - != com.google.cloud.discoveryengine.v1beta.WorkspaceConfig.getDefaultInstance()) { - getWorkspaceConfigBuilder().mergeFrom(value); + public Builder mergeServingConfigDataStore( + com.google.cloud.discoveryengine.v1beta.DataStore.ServingConfigDataStore value) { + if (servingConfigDataStoreBuilder_ == null) { + if (((bitField0_ & 0x00040000) != 0) + && servingConfigDataStore_ != null + && servingConfigDataStore_ + != com.google.cloud.discoveryengine.v1beta.DataStore.ServingConfigDataStore + .getDefaultInstance()) { + getServingConfigDataStoreBuilder().mergeFrom(value); } else { - workspaceConfig_ = value; + servingConfigDataStore_ = value; } } else { - workspaceConfigBuilder_.mergeFrom(value); + servingConfigDataStoreBuilder_.mergeFrom(value); } - if (workspaceConfig_ != null) { - bitField0_ |= 0x00000400; + if (servingConfigDataStore_ != null) { + bitField0_ |= 0x00040000; onChanged(); } return this; @@ -6168,21 +16572,19 @@ public Builder mergeWorkspaceConfig( * * *
            -     * Config to store data store type configuration for workspace data. This
            -     * must be set when
            -     * [DataStore.content_config][google.cloud.discoveryengine.v1beta.DataStore.content_config]
            -     * is set as
            -     * [DataStore.ContentConfig.GOOGLE_WORKSPACE][google.cloud.discoveryengine.v1beta.DataStore.ContentConfig.GOOGLE_WORKSPACE].
            +     * Optional. Stores serving config at DataStore level.
                  * 
            * - * .google.cloud.discoveryengine.v1beta.WorkspaceConfig workspace_config = 25; + * + * .google.cloud.discoveryengine.v1beta.DataStore.ServingConfigDataStore serving_config_data_store = 30 [(.google.api.field_behavior) = OPTIONAL]; + * */ - public Builder clearWorkspaceConfig() { - bitField0_ = (bitField0_ & ~0x00000400); - workspaceConfig_ = null; - if (workspaceConfigBuilder_ != null) { - workspaceConfigBuilder_.dispose(); - workspaceConfigBuilder_ = null; + public Builder clearServingConfigDataStore() { + bitField0_ = (bitField0_ & ~0x00040000); + servingConfigDataStore_ = null; + if (servingConfigDataStoreBuilder_ != null) { + servingConfigDataStoreBuilder_.dispose(); + servingConfigDataStoreBuilder_ = null; } onChanged(); return this; @@ -6192,43 +16594,40 @@ public Builder clearWorkspaceConfig() { * * *
            -     * Config to store data store type configuration for workspace data. This
            -     * must be set when
            -     * [DataStore.content_config][google.cloud.discoveryengine.v1beta.DataStore.content_config]
            -     * is set as
            -     * [DataStore.ContentConfig.GOOGLE_WORKSPACE][google.cloud.discoveryengine.v1beta.DataStore.ContentConfig.GOOGLE_WORKSPACE].
            +     * Optional. Stores serving config at DataStore level.
                  * 
            * - * .google.cloud.discoveryengine.v1beta.WorkspaceConfig workspace_config = 25; + * + * .google.cloud.discoveryengine.v1beta.DataStore.ServingConfigDataStore serving_config_data_store = 30 [(.google.api.field_behavior) = OPTIONAL]; + * */ - public com.google.cloud.discoveryengine.v1beta.WorkspaceConfig.Builder - getWorkspaceConfigBuilder() { - bitField0_ |= 0x00000400; + public com.google.cloud.discoveryengine.v1beta.DataStore.ServingConfigDataStore.Builder + getServingConfigDataStoreBuilder() { + bitField0_ |= 0x00040000; onChanged(); - return internalGetWorkspaceConfigFieldBuilder().getBuilder(); + return internalGetServingConfigDataStoreFieldBuilder().getBuilder(); } /** * * *
            -     * Config to store data store type configuration for workspace data. This
            -     * must be set when
            -     * [DataStore.content_config][google.cloud.discoveryengine.v1beta.DataStore.content_config]
            -     * is set as
            -     * [DataStore.ContentConfig.GOOGLE_WORKSPACE][google.cloud.discoveryengine.v1beta.DataStore.ContentConfig.GOOGLE_WORKSPACE].
            +     * Optional. Stores serving config at DataStore level.
                  * 
            * - * .google.cloud.discoveryengine.v1beta.WorkspaceConfig workspace_config = 25; + * + * .google.cloud.discoveryengine.v1beta.DataStore.ServingConfigDataStore serving_config_data_store = 30 [(.google.api.field_behavior) = OPTIONAL]; + * */ - public com.google.cloud.discoveryengine.v1beta.WorkspaceConfigOrBuilder - getWorkspaceConfigOrBuilder() { - if (workspaceConfigBuilder_ != null) { - return workspaceConfigBuilder_.getMessageOrBuilder(); + public com.google.cloud.discoveryengine.v1beta.DataStore.ServingConfigDataStoreOrBuilder + getServingConfigDataStoreOrBuilder() { + if (servingConfigDataStoreBuilder_ != null) { + return servingConfigDataStoreBuilder_.getMessageOrBuilder(); } else { - return workspaceConfig_ == null - ? com.google.cloud.discoveryengine.v1beta.WorkspaceConfig.getDefaultInstance() - : workspaceConfig_; + return servingConfigDataStore_ == null + ? com.google.cloud.discoveryengine.v1beta.DataStore.ServingConfigDataStore + .getDefaultInstance() + : servingConfigDataStore_; } } @@ -6236,160 +16635,206 @@ public Builder clearWorkspaceConfig() { * * *
            -     * Config to store data store type configuration for workspace data. This
            -     * must be set when
            -     * [DataStore.content_config][google.cloud.discoveryengine.v1beta.DataStore.content_config]
            -     * is set as
            -     * [DataStore.ContentConfig.GOOGLE_WORKSPACE][google.cloud.discoveryengine.v1beta.DataStore.ContentConfig.GOOGLE_WORKSPACE].
            +     * Optional. Stores serving config at DataStore level.
                  * 
            * - * .google.cloud.discoveryengine.v1beta.WorkspaceConfig workspace_config = 25; + * + * .google.cloud.discoveryengine.v1beta.DataStore.ServingConfigDataStore serving_config_data_store = 30 [(.google.api.field_behavior) = OPTIONAL]; + * */ private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.discoveryengine.v1beta.WorkspaceConfig, - com.google.cloud.discoveryengine.v1beta.WorkspaceConfig.Builder, - com.google.cloud.discoveryengine.v1beta.WorkspaceConfigOrBuilder> - internalGetWorkspaceConfigFieldBuilder() { - if (workspaceConfigBuilder_ == null) { - workspaceConfigBuilder_ = + com.google.cloud.discoveryengine.v1beta.DataStore.ServingConfigDataStore, + com.google.cloud.discoveryengine.v1beta.DataStore.ServingConfigDataStore.Builder, + com.google.cloud.discoveryengine.v1beta.DataStore.ServingConfigDataStoreOrBuilder> + internalGetServingConfigDataStoreFieldBuilder() { + if (servingConfigDataStoreBuilder_ == null) { + servingConfigDataStoreBuilder_ = new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.discoveryengine.v1beta.WorkspaceConfig, - com.google.cloud.discoveryengine.v1beta.WorkspaceConfig.Builder, - com.google.cloud.discoveryengine.v1beta.WorkspaceConfigOrBuilder>( - getWorkspaceConfig(), getParentForChildren(), isClean()); - workspaceConfig_ = null; + com.google.cloud.discoveryengine.v1beta.DataStore.ServingConfigDataStore, + com.google.cloud.discoveryengine.v1beta.DataStore.ServingConfigDataStore.Builder, + com.google.cloud.discoveryengine.v1beta.DataStore.ServingConfigDataStoreOrBuilder>( + getServingConfigDataStore(), getParentForChildren(), isClean()); + servingConfigDataStore_ = null; } - return workspaceConfigBuilder_; + return servingConfigDataStoreBuilder_; } - private com.google.cloud.discoveryengine.v1beta.DocumentProcessingConfig - documentProcessingConfig_; - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.discoveryengine.v1beta.DocumentProcessingConfig, - com.google.cloud.discoveryengine.v1beta.DocumentProcessingConfig.Builder, - com.google.cloud.discoveryengine.v1beta.DocumentProcessingConfigOrBuilder> - documentProcessingConfigBuilder_; + private java.lang.Object identityMappingStore_ = ""; + + /** + * + * + *
            +     * Immutable. The fully qualified resource name of the associated
            +     * [IdentityMappingStore][google.cloud.discoveryengine.v1beta.IdentityMappingStore].
            +     * This field can only be set for acl_enabled DataStores with `THIRD_PARTY` or
            +     * `GSUITE` IdP. Format:
            +     * `projects/{project}/locations/{location}/identityMappingStores/{identity_mapping_store}`.
            +     * 
            + * + * + * string identity_mapping_store = 31 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * + * + * @return The identityMappingStore. + */ + public java.lang.String getIdentityMappingStore() { + java.lang.Object ref = identityMappingStore_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + identityMappingStore_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
            +     * Immutable. The fully qualified resource name of the associated
            +     * [IdentityMappingStore][google.cloud.discoveryengine.v1beta.IdentityMappingStore].
            +     * This field can only be set for acl_enabled DataStores with `THIRD_PARTY` or
            +     * `GSUITE` IdP. Format:
            +     * `projects/{project}/locations/{location}/identityMappingStores/{identity_mapping_store}`.
            +     * 
            + * + * + * string identity_mapping_store = 31 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for identityMappingStore. + */ + public com.google.protobuf.ByteString getIdentityMappingStoreBytes() { + java.lang.Object ref = identityMappingStore_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + identityMappingStore_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } /** * * *
            -     * Configuration for Document understanding and enrichment.
            +     * Immutable. The fully qualified resource name of the associated
            +     * [IdentityMappingStore][google.cloud.discoveryengine.v1beta.IdentityMappingStore].
            +     * This field can only be set for acl_enabled DataStores with `THIRD_PARTY` or
            +     * `GSUITE` IdP. Format:
            +     * `projects/{project}/locations/{location}/identityMappingStores/{identity_mapping_store}`.
                  * 
            * * - * .google.cloud.discoveryengine.v1beta.DocumentProcessingConfig document_processing_config = 27; + * string identity_mapping_store = 31 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } * * - * @return Whether the documentProcessingConfig field is set. + * @param value The identityMappingStore to set. + * @return This builder for chaining. */ - public boolean hasDocumentProcessingConfig() { - return ((bitField0_ & 0x00000800) != 0); + public Builder setIdentityMappingStore(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + identityMappingStore_ = value; + bitField0_ |= 0x00080000; + onChanged(); + return this; } /** * * *
            -     * Configuration for Document understanding and enrichment.
            +     * Immutable. The fully qualified resource name of the associated
            +     * [IdentityMappingStore][google.cloud.discoveryengine.v1beta.IdentityMappingStore].
            +     * This field can only be set for acl_enabled DataStores with `THIRD_PARTY` or
            +     * `GSUITE` IdP. Format:
            +     * `projects/{project}/locations/{location}/identityMappingStores/{identity_mapping_store}`.
                  * 
            * * - * .google.cloud.discoveryengine.v1beta.DocumentProcessingConfig document_processing_config = 27; + * string identity_mapping_store = 31 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } * * - * @return The documentProcessingConfig. + * @return This builder for chaining. */ - public com.google.cloud.discoveryengine.v1beta.DocumentProcessingConfig - getDocumentProcessingConfig() { - if (documentProcessingConfigBuilder_ == null) { - return documentProcessingConfig_ == null - ? com.google.cloud.discoveryengine.v1beta.DocumentProcessingConfig.getDefaultInstance() - : documentProcessingConfig_; - } else { - return documentProcessingConfigBuilder_.getMessage(); - } + public Builder clearIdentityMappingStore() { + identityMappingStore_ = getDefaultInstance().getIdentityMappingStore(); + bitField0_ = (bitField0_ & ~0x00080000); + onChanged(); + return this; } /** * * *
            -     * Configuration for Document understanding and enrichment.
            +     * Immutable. The fully qualified resource name of the associated
            +     * [IdentityMappingStore][google.cloud.discoveryengine.v1beta.IdentityMappingStore].
            +     * This field can only be set for acl_enabled DataStores with `THIRD_PARTY` or
            +     * `GSUITE` IdP. Format:
            +     * `projects/{project}/locations/{location}/identityMappingStores/{identity_mapping_store}`.
                  * 
            * * - * .google.cloud.discoveryengine.v1beta.DocumentProcessingConfig document_processing_config = 27; + * string identity_mapping_store = 31 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } * + * + * @param value The bytes for identityMappingStore to set. + * @return This builder for chaining. */ - public Builder setDocumentProcessingConfig( - com.google.cloud.discoveryengine.v1beta.DocumentProcessingConfig value) { - if (documentProcessingConfigBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - documentProcessingConfig_ = value; - } else { - documentProcessingConfigBuilder_.setMessage(value); + public Builder setIdentityMappingStoreBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); } - bitField0_ |= 0x00000800; + checkByteStringIsUtf8(value); + identityMappingStore_ = value; + bitField0_ |= 0x00080000; onChanged(); return this; } + private boolean isInfobotFaqDataStore_; + /** * * *
            -     * Configuration for Document understanding and enrichment.
            +     * Optional. If set, this DataStore is an Infobot FAQ DataStore.
                  * 
            * - * - * .google.cloud.discoveryengine.v1beta.DocumentProcessingConfig document_processing_config = 27; - * + * bool is_infobot_faq_data_store = 37 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The isInfobotFaqDataStore. */ - public Builder setDocumentProcessingConfig( - com.google.cloud.discoveryengine.v1beta.DocumentProcessingConfig.Builder builderForValue) { - if (documentProcessingConfigBuilder_ == null) { - documentProcessingConfig_ = builderForValue.build(); - } else { - documentProcessingConfigBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000800; - onChanged(); - return this; + @java.lang.Override + public boolean getIsInfobotFaqDataStore() { + return isInfobotFaqDataStore_; } /** * * *
            -     * Configuration for Document understanding and enrichment.
            +     * Optional. If set, this DataStore is an Infobot FAQ DataStore.
                  * 
            * - * - * .google.cloud.discoveryengine.v1beta.DocumentProcessingConfig document_processing_config = 27; - * + * bool is_infobot_faq_data_store = 37 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The isInfobotFaqDataStore to set. + * @return This builder for chaining. */ - public Builder mergeDocumentProcessingConfig( - com.google.cloud.discoveryengine.v1beta.DocumentProcessingConfig value) { - if (documentProcessingConfigBuilder_ == null) { - if (((bitField0_ & 0x00000800) != 0) - && documentProcessingConfig_ != null - && documentProcessingConfig_ - != com.google.cloud.discoveryengine.v1beta.DocumentProcessingConfig - .getDefaultInstance()) { - getDocumentProcessingConfigBuilder().mergeFrom(value); - } else { - documentProcessingConfig_ = value; - } - } else { - documentProcessingConfigBuilder_.mergeFrom(value); - } - if (documentProcessingConfig_ != null) { - bitField0_ |= 0x00000800; - onChanged(); - } + public Builder setIsInfobotFaqDataStore(boolean value) { + + isInfobotFaqDataStore_ = value; + bitField0_ |= 0x00100000; + onChanged(); return this; } @@ -6397,61 +16842,67 @@ public Builder mergeDocumentProcessingConfig( * * *
            -     * Configuration for Document understanding and enrichment.
            +     * Optional. If set, this DataStore is an Infobot FAQ DataStore.
                  * 
            * - * - * .google.cloud.discoveryengine.v1beta.DocumentProcessingConfig document_processing_config = 27; - * + * bool is_infobot_faq_data_store = 37 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. */ - public Builder clearDocumentProcessingConfig() { - bitField0_ = (bitField0_ & ~0x00000800); - documentProcessingConfig_ = null; - if (documentProcessingConfigBuilder_ != null) { - documentProcessingConfigBuilder_.dispose(); - documentProcessingConfigBuilder_ = null; - } + public Builder clearIsInfobotFaqDataStore() { + bitField0_ = (bitField0_ & ~0x00100000); + isInfobotFaqDataStore_ = false; onChanged(); return this; } + private com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + federatedSearchConfig_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig, + com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig.Builder, + com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfigOrBuilder> + federatedSearchConfigBuilder_; + /** * * *
            -     * Configuration for Document understanding and enrichment.
            +     * Optional. If set, this DataStore is a federated search DataStore.
                  * 
            * * - * .google.cloud.discoveryengine.v1beta.DocumentProcessingConfig document_processing_config = 27; + * .google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig federated_search_config = 38 [(.google.api.field_behavior) = OPTIONAL]; * + * + * @return Whether the federatedSearchConfig field is set. */ - public com.google.cloud.discoveryengine.v1beta.DocumentProcessingConfig.Builder - getDocumentProcessingConfigBuilder() { - bitField0_ |= 0x00000800; - onChanged(); - return internalGetDocumentProcessingConfigFieldBuilder().getBuilder(); + public boolean hasFederatedSearchConfig() { + return ((bitField0_ & 0x00200000) != 0); } /** * * *
            -     * Configuration for Document understanding and enrichment.
            +     * Optional. If set, this DataStore is a federated search DataStore.
                  * 
            * * - * .google.cloud.discoveryengine.v1beta.DocumentProcessingConfig document_processing_config = 27; + * .google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig federated_search_config = 38 [(.google.api.field_behavior) = OPTIONAL]; * + * + * @return The federatedSearchConfig. */ - public com.google.cloud.discoveryengine.v1beta.DocumentProcessingConfigOrBuilder - getDocumentProcessingConfigOrBuilder() { - if (documentProcessingConfigBuilder_ != null) { - return documentProcessingConfigBuilder_.getMessageOrBuilder(); + public com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + getFederatedSearchConfig() { + if (federatedSearchConfigBuilder_ == null) { + return federatedSearchConfig_ == null + ? com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .getDefaultInstance() + : federatedSearchConfig_; } else { - return documentProcessingConfig_ == null - ? com.google.cloud.discoveryengine.v1beta.DocumentProcessingConfig.getDefaultInstance() - : documentProcessingConfig_; + return federatedSearchConfigBuilder_.getMessage(); } } @@ -6459,134 +16910,103 @@ public Builder clearDocumentProcessingConfig() { * * *
            -     * Configuration for Document understanding and enrichment.
            +     * Optional. If set, this DataStore is a federated search DataStore.
                  * 
            * * - * .google.cloud.discoveryengine.v1beta.DocumentProcessingConfig document_processing_config = 27; + * .google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig federated_search_config = 38 [(.google.api.field_behavior) = OPTIONAL]; * */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.discoveryengine.v1beta.DocumentProcessingConfig, - com.google.cloud.discoveryengine.v1beta.DocumentProcessingConfig.Builder, - com.google.cloud.discoveryengine.v1beta.DocumentProcessingConfigOrBuilder> - internalGetDocumentProcessingConfigFieldBuilder() { - if (documentProcessingConfigBuilder_ == null) { - documentProcessingConfigBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.discoveryengine.v1beta.DocumentProcessingConfig, - com.google.cloud.discoveryengine.v1beta.DocumentProcessingConfig.Builder, - com.google.cloud.discoveryengine.v1beta.DocumentProcessingConfigOrBuilder>( - getDocumentProcessingConfig(), getParentForChildren(), isClean()); - documentProcessingConfig_ = null; + public Builder setFederatedSearchConfig( + com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig value) { + if (federatedSearchConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + federatedSearchConfig_ = value; + } else { + federatedSearchConfigBuilder_.setMessage(value); } - return documentProcessingConfigBuilder_; + bitField0_ |= 0x00200000; + onChanged(); + return this; } - private com.google.cloud.discoveryengine.v1beta.Schema startingSchema_; - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.discoveryengine.v1beta.Schema, - com.google.cloud.discoveryengine.v1beta.Schema.Builder, - com.google.cloud.discoveryengine.v1beta.SchemaOrBuilder> - startingSchemaBuilder_; - /** * * *
            -     * The start schema to use for this
            -     * [DataStore][google.cloud.discoveryengine.v1beta.DataStore] when
            -     * provisioning it. If unset, a default vertical specialized schema will be
            -     * used.
            -     *
            -     * This field is only used by [CreateDataStore][] API, and will be ignored if
            -     * used in other APIs. This field will be omitted from all API responses
            -     * including [CreateDataStore][] API. To retrieve a schema of a
            -     * [DataStore][google.cloud.discoveryengine.v1beta.DataStore], use
            -     * [SchemaService.GetSchema][google.cloud.discoveryengine.v1beta.SchemaService.GetSchema]
            -     * API instead.
            -     *
            -     * The provided schema will be validated against certain rules on schema.
            -     * Learn more from [this
            -     * doc](https://cloud.google.com/generative-ai-app-builder/docs/provide-schema).
            +     * Optional. If set, this DataStore is a federated search DataStore.
                  * 
            * - * .google.cloud.discoveryengine.v1beta.Schema starting_schema = 28; - * - * @return Whether the startingSchema field is set. + * + * .google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig federated_search_config = 38 [(.google.api.field_behavior) = OPTIONAL]; + * */ - public boolean hasStartingSchema() { - return ((bitField0_ & 0x00001000) != 0); + public Builder setFederatedSearchConfig( + com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig.Builder + builderForValue) { + if (federatedSearchConfigBuilder_ == null) { + federatedSearchConfig_ = builderForValue.build(); + } else { + federatedSearchConfigBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00200000; + onChanged(); + return this; } /** * * *
            -     * The start schema to use for this
            -     * [DataStore][google.cloud.discoveryengine.v1beta.DataStore] when
            -     * provisioning it. If unset, a default vertical specialized schema will be
            -     * used.
            -     *
            -     * This field is only used by [CreateDataStore][] API, and will be ignored if
            -     * used in other APIs. This field will be omitted from all API responses
            -     * including [CreateDataStore][] API. To retrieve a schema of a
            -     * [DataStore][google.cloud.discoveryengine.v1beta.DataStore], use
            -     * [SchemaService.GetSchema][google.cloud.discoveryengine.v1beta.SchemaService.GetSchema]
            -     * API instead.
            -     *
            -     * The provided schema will be validated against certain rules on schema.
            -     * Learn more from [this
            -     * doc](https://cloud.google.com/generative-ai-app-builder/docs/provide-schema).
            +     * Optional. If set, this DataStore is a federated search DataStore.
                  * 
            * - * .google.cloud.discoveryengine.v1beta.Schema starting_schema = 28; - * - * @return The startingSchema. + * + * .google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig federated_search_config = 38 [(.google.api.field_behavior) = OPTIONAL]; + * */ - public com.google.cloud.discoveryengine.v1beta.Schema getStartingSchema() { - if (startingSchemaBuilder_ == null) { - return startingSchema_ == null - ? com.google.cloud.discoveryengine.v1beta.Schema.getDefaultInstance() - : startingSchema_; + public Builder mergeFederatedSearchConfig( + com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig value) { + if (federatedSearchConfigBuilder_ == null) { + if (((bitField0_ & 0x00200000) != 0) + && federatedSearchConfig_ != null + && federatedSearchConfig_ + != com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .getDefaultInstance()) { + getFederatedSearchConfigBuilder().mergeFrom(value); + } else { + federatedSearchConfig_ = value; + } } else { - return startingSchemaBuilder_.getMessage(); + federatedSearchConfigBuilder_.mergeFrom(value); } + if (federatedSearchConfig_ != null) { + bitField0_ |= 0x00200000; + onChanged(); + } + return this; } /** * * *
            -     * The start schema to use for this
            -     * [DataStore][google.cloud.discoveryengine.v1beta.DataStore] when
            -     * provisioning it. If unset, a default vertical specialized schema will be
            -     * used.
            -     *
            -     * This field is only used by [CreateDataStore][] API, and will be ignored if
            -     * used in other APIs. This field will be omitted from all API responses
            -     * including [CreateDataStore][] API. To retrieve a schema of a
            -     * [DataStore][google.cloud.discoveryengine.v1beta.DataStore], use
            -     * [SchemaService.GetSchema][google.cloud.discoveryengine.v1beta.SchemaService.GetSchema]
            -     * API instead.
            -     *
            -     * The provided schema will be validated against certain rules on schema.
            -     * Learn more from [this
            -     * doc](https://cloud.google.com/generative-ai-app-builder/docs/provide-schema).
            +     * Optional. If set, this DataStore is a federated search DataStore.
                  * 
            * - * .google.cloud.discoveryengine.v1beta.Schema starting_schema = 28; + * + * .google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig federated_search_config = 38 [(.google.api.field_behavior) = OPTIONAL]; + * */ - public Builder setStartingSchema(com.google.cloud.discoveryengine.v1beta.Schema value) { - if (startingSchemaBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - startingSchema_ = value; - } else { - startingSchemaBuilder_.setMessage(value); + public Builder clearFederatedSearchConfig() { + bitField0_ = (bitField0_ & ~0x00200000); + federatedSearchConfig_ = null; + if (federatedSearchConfigBuilder_ != null) { + federatedSearchConfigBuilder_.dispose(); + federatedSearchConfigBuilder_ = null; } - bitField0_ |= 0x00001000; onChanged(); return this; } @@ -6595,110 +17015,108 @@ public Builder setStartingSchema(com.google.cloud.discoveryengine.v1beta.Schema * * *
            -     * The start schema to use for this
            -     * [DataStore][google.cloud.discoveryengine.v1beta.DataStore] when
            -     * provisioning it. If unset, a default vertical specialized schema will be
            -     * used.
            +     * Optional. If set, this DataStore is a federated search DataStore.
            +     * 
            * - * This field is only used by [CreateDataStore][] API, and will be ignored if - * used in other APIs. This field will be omitted from all API responses - * including [CreateDataStore][] API. To retrieve a schema of a - * [DataStore][google.cloud.discoveryengine.v1beta.DataStore], use - * [SchemaService.GetSchema][google.cloud.discoveryengine.v1beta.SchemaService.GetSchema] - * API instead. + * + * .google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig federated_search_config = 38 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig.Builder + getFederatedSearchConfigBuilder() { + bitField0_ |= 0x00200000; + onChanged(); + return internalGetFederatedSearchConfigFieldBuilder().getBuilder(); + } + + /** * - * The provided schema will be validated against certain rules on schema. - * Learn more from [this - * doc](https://cloud.google.com/generative-ai-app-builder/docs/provide-schema). + * + *
            +     * Optional. If set, this DataStore is a federated search DataStore.
                  * 
            * - * .google.cloud.discoveryengine.v1beta.Schema starting_schema = 28; + * + * .google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig federated_search_config = 38 [(.google.api.field_behavior) = OPTIONAL]; + * */ - public Builder setStartingSchema( - com.google.cloud.discoveryengine.v1beta.Schema.Builder builderForValue) { - if (startingSchemaBuilder_ == null) { - startingSchema_ = builderForValue.build(); + public com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfigOrBuilder + getFederatedSearchConfigOrBuilder() { + if (federatedSearchConfigBuilder_ != null) { + return federatedSearchConfigBuilder_.getMessageOrBuilder(); } else { - startingSchemaBuilder_.setMessage(builderForValue.build()); + return federatedSearchConfig_ == null + ? com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + .getDefaultInstance() + : federatedSearchConfig_; } - bitField0_ |= 0x00001000; - onChanged(); - return this; } /** * * *
            -     * The start schema to use for this
            -     * [DataStore][google.cloud.discoveryengine.v1beta.DataStore] when
            -     * provisioning it. If unset, a default vertical specialized schema will be
            -     * used.
            -     *
            -     * This field is only used by [CreateDataStore][] API, and will be ignored if
            -     * used in other APIs. This field will be omitted from all API responses
            -     * including [CreateDataStore][] API. To retrieve a schema of a
            -     * [DataStore][google.cloud.discoveryengine.v1beta.DataStore], use
            -     * [SchemaService.GetSchema][google.cloud.discoveryengine.v1beta.SchemaService.GetSchema]
            -     * API instead.
            -     *
            -     * The provided schema will be validated against certain rules on schema.
            -     * Learn more from [this
            -     * doc](https://cloud.google.com/generative-ai-app-builder/docs/provide-schema).
            +     * Optional. If set, this DataStore is a federated search DataStore.
                  * 
            * - * .google.cloud.discoveryengine.v1beta.Schema starting_schema = 28; + * + * .google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig federated_search_config = 38 [(.google.api.field_behavior) = OPTIONAL]; + * */ - public Builder mergeStartingSchema(com.google.cloud.discoveryengine.v1beta.Schema value) { - if (startingSchemaBuilder_ == null) { - if (((bitField0_ & 0x00001000) != 0) - && startingSchema_ != null - && startingSchema_ - != com.google.cloud.discoveryengine.v1beta.Schema.getDefaultInstance()) { - getStartingSchemaBuilder().mergeFrom(value); - } else { - startingSchema_ = value; - } - } else { - startingSchemaBuilder_.mergeFrom(value); - } - if (startingSchema_ != null) { - bitField0_ |= 0x00001000; - onChanged(); + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig, + com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig.Builder, + com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfigOrBuilder> + internalGetFederatedSearchConfigFieldBuilder() { + if (federatedSearchConfigBuilder_ == null) { + federatedSearchConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig, + com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig.Builder, + com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfigOrBuilder>( + getFederatedSearchConfig(), getParentForChildren(), isClean()); + federatedSearchConfig_ = null; } - return this; + return federatedSearchConfigBuilder_; } + private int configurableBillingApproach_ = 0; + /** * * *
            -     * The start schema to use for this
            -     * [DataStore][google.cloud.discoveryengine.v1beta.DataStore] when
            -     * provisioning it. If unset, a default vertical specialized schema will be
            -     * used.
            +     * Optional. Configuration for configurable billing approach. See
            +     * 
            * - * This field is only used by [CreateDataStore][] API, and will be ignored if - * used in other APIs. This field will be omitted from all API responses - * including [CreateDataStore][] API. To retrieve a schema of a - * [DataStore][google.cloud.discoveryengine.v1beta.DataStore], use - * [SchemaService.GetSchema][google.cloud.discoveryengine.v1beta.SchemaService.GetSchema] - * API instead. + * + * .google.cloud.discoveryengine.v1beta.DataStore.ConfigurableBillingApproach configurable_billing_approach = 45 [(.google.api.field_behavior) = OPTIONAL]; + * * - * The provided schema will be validated against certain rules on schema. - * Learn more from [this - * doc](https://cloud.google.com/generative-ai-app-builder/docs/provide-schema). + * @return The enum numeric value on the wire for configurableBillingApproach. + */ + @java.lang.Override + public int getConfigurableBillingApproachValue() { + return configurableBillingApproach_; + } + + /** + * + * + *
            +     * Optional. Configuration for configurable billing approach. See
                  * 
            * - * .google.cloud.discoveryengine.v1beta.Schema starting_schema = 28; + * + * .google.cloud.discoveryengine.v1beta.DataStore.ConfigurableBillingApproach configurable_billing_approach = 45 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The enum numeric value on the wire for configurableBillingApproach to set. + * @return This builder for chaining. */ - public Builder clearStartingSchema() { - bitField0_ = (bitField0_ & ~0x00001000); - startingSchema_ = null; - if (startingSchemaBuilder_ != null) { - startingSchemaBuilder_.dispose(); - startingSchemaBuilder_ = null; - } + public Builder setConfigurableBillingApproachValue(int value) { + configurableBillingApproach_ = value; + bitField0_ |= 0x00400000; onChanged(); return this; } @@ -6707,151 +17125,118 @@ public Builder clearStartingSchema() { * * *
            -     * The start schema to use for this
            -     * [DataStore][google.cloud.discoveryengine.v1beta.DataStore] when
            -     * provisioning it. If unset, a default vertical specialized schema will be
            -     * used.
            -     *
            -     * This field is only used by [CreateDataStore][] API, and will be ignored if
            -     * used in other APIs. This field will be omitted from all API responses
            -     * including [CreateDataStore][] API. To retrieve a schema of a
            -     * [DataStore][google.cloud.discoveryengine.v1beta.DataStore], use
            -     * [SchemaService.GetSchema][google.cloud.discoveryengine.v1beta.SchemaService.GetSchema]
            -     * API instead.
            -     *
            -     * The provided schema will be validated against certain rules on schema.
            -     * Learn more from [this
            -     * doc](https://cloud.google.com/generative-ai-app-builder/docs/provide-schema).
            +     * Optional. Configuration for configurable billing approach. See
                  * 
            * - * .google.cloud.discoveryengine.v1beta.Schema starting_schema = 28; + * + * .google.cloud.discoveryengine.v1beta.DataStore.ConfigurableBillingApproach configurable_billing_approach = 45 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The configurableBillingApproach. */ - public com.google.cloud.discoveryengine.v1beta.Schema.Builder getStartingSchemaBuilder() { - bitField0_ |= 0x00001000; - onChanged(); - return internalGetStartingSchemaFieldBuilder().getBuilder(); + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.DataStore.ConfigurableBillingApproach + getConfigurableBillingApproach() { + com.google.cloud.discoveryengine.v1beta.DataStore.ConfigurableBillingApproach result = + com.google.cloud.discoveryengine.v1beta.DataStore.ConfigurableBillingApproach.forNumber( + configurableBillingApproach_); + return result == null + ? com.google.cloud.discoveryengine.v1beta.DataStore.ConfigurableBillingApproach + .UNRECOGNIZED + : result; } /** * * *
            -     * The start schema to use for this
            -     * [DataStore][google.cloud.discoveryengine.v1beta.DataStore] when
            -     * provisioning it. If unset, a default vertical specialized schema will be
            -     * used.
            -     *
            -     * This field is only used by [CreateDataStore][] API, and will be ignored if
            -     * used in other APIs. This field will be omitted from all API responses
            -     * including [CreateDataStore][] API. To retrieve a schema of a
            -     * [DataStore][google.cloud.discoveryengine.v1beta.DataStore], use
            -     * [SchemaService.GetSchema][google.cloud.discoveryengine.v1beta.SchemaService.GetSchema]
            -     * API instead.
            -     *
            -     * The provided schema will be validated against certain rules on schema.
            -     * Learn more from [this
            -     * doc](https://cloud.google.com/generative-ai-app-builder/docs/provide-schema).
            +     * Optional. Configuration for configurable billing approach. See
                  * 
            * - * .google.cloud.discoveryengine.v1beta.Schema starting_schema = 28; + * + * .google.cloud.discoveryengine.v1beta.DataStore.ConfigurableBillingApproach configurable_billing_approach = 45 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The configurableBillingApproach to set. + * @return This builder for chaining. */ - public com.google.cloud.discoveryengine.v1beta.SchemaOrBuilder getStartingSchemaOrBuilder() { - if (startingSchemaBuilder_ != null) { - return startingSchemaBuilder_.getMessageOrBuilder(); - } else { - return startingSchema_ == null - ? com.google.cloud.discoveryengine.v1beta.Schema.getDefaultInstance() - : startingSchema_; + public Builder setConfigurableBillingApproach( + com.google.cloud.discoveryengine.v1beta.DataStore.ConfigurableBillingApproach value) { + if (value == null) { + throw new NullPointerException(); } + bitField0_ |= 0x00400000; + configurableBillingApproach_ = value.getNumber(); + onChanged(); + return this; } /** * * *
            -     * The start schema to use for this
            -     * [DataStore][google.cloud.discoveryengine.v1beta.DataStore] when
            -     * provisioning it. If unset, a default vertical specialized schema will be
            -     * used.
            -     *
            -     * This field is only used by [CreateDataStore][] API, and will be ignored if
            -     * used in other APIs. This field will be omitted from all API responses
            -     * including [CreateDataStore][] API. To retrieve a schema of a
            -     * [DataStore][google.cloud.discoveryengine.v1beta.DataStore], use
            -     * [SchemaService.GetSchema][google.cloud.discoveryengine.v1beta.SchemaService.GetSchema]
            -     * API instead.
            -     *
            -     * The provided schema will be validated against certain rules on schema.
            -     * Learn more from [this
            -     * doc](https://cloud.google.com/generative-ai-app-builder/docs/provide-schema).
            +     * Optional. Configuration for configurable billing approach. See
                  * 
            * - * .google.cloud.discoveryengine.v1beta.Schema starting_schema = 28; + * + * .google.cloud.discoveryengine.v1beta.DataStore.ConfigurableBillingApproach configurable_billing_approach = 45 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.discoveryengine.v1beta.Schema, - com.google.cloud.discoveryengine.v1beta.Schema.Builder, - com.google.cloud.discoveryengine.v1beta.SchemaOrBuilder> - internalGetStartingSchemaFieldBuilder() { - if (startingSchemaBuilder_ == null) { - startingSchemaBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.discoveryengine.v1beta.Schema, - com.google.cloud.discoveryengine.v1beta.Schema.Builder, - com.google.cloud.discoveryengine.v1beta.SchemaOrBuilder>( - getStartingSchema(), getParentForChildren(), isClean()); - startingSchema_ = null; - } - return startingSchemaBuilder_; + public Builder clearConfigurableBillingApproach() { + bitField0_ = (bitField0_ & ~0x00400000); + configurableBillingApproach_ = 0; + onChanged(); + return this; } - private com.google.cloud.discoveryengine.v1beta.DataStore.ServingConfigDataStore - servingConfigDataStore_; + private com.google.protobuf.Timestamp configurableBillingApproachUpdateTime_; private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.discoveryengine.v1beta.DataStore.ServingConfigDataStore, - com.google.cloud.discoveryengine.v1beta.DataStore.ServingConfigDataStore.Builder, - com.google.cloud.discoveryengine.v1beta.DataStore.ServingConfigDataStoreOrBuilder> - servingConfigDataStoreBuilder_; + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + configurableBillingApproachUpdateTimeBuilder_; /** * * *
            -     * Optional. Stores serving config at DataStore level.
            +     * Output only. The timestamp when configurable_billing_approach was last
            +     * updated.
                  * 
            * * - * .google.cloud.discoveryengine.v1beta.DataStore.ServingConfigDataStore serving_config_data_store = 30 [(.google.api.field_behavior) = OPTIONAL]; + * .google.protobuf.Timestamp configurable_billing_approach_update_time = 46 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * - * @return Whether the servingConfigDataStore field is set. + * @return Whether the configurableBillingApproachUpdateTime field is set. */ - public boolean hasServingConfigDataStore() { - return ((bitField0_ & 0x00002000) != 0); + public boolean hasConfigurableBillingApproachUpdateTime() { + return ((bitField0_ & 0x00800000) != 0); } /** * * *
            -     * Optional. Stores serving config at DataStore level.
            +     * Output only. The timestamp when configurable_billing_approach was last
            +     * updated.
                  * 
            * * - * .google.cloud.discoveryengine.v1beta.DataStore.ServingConfigDataStore serving_config_data_store = 30 [(.google.api.field_behavior) = OPTIONAL]; + * .google.protobuf.Timestamp configurable_billing_approach_update_time = 46 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * - * @return The servingConfigDataStore. + * @return The configurableBillingApproachUpdateTime. */ - public com.google.cloud.discoveryengine.v1beta.DataStore.ServingConfigDataStore - getServingConfigDataStore() { - if (servingConfigDataStoreBuilder_ == null) { - return servingConfigDataStore_ == null - ? com.google.cloud.discoveryengine.v1beta.DataStore.ServingConfigDataStore - .getDefaultInstance() - : servingConfigDataStore_; + public com.google.protobuf.Timestamp getConfigurableBillingApproachUpdateTime() { + if (configurableBillingApproachUpdateTimeBuilder_ == null) { + return configurableBillingApproachUpdateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : configurableBillingApproachUpdateTime_; } else { - return servingConfigDataStoreBuilder_.getMessage(); + return configurableBillingApproachUpdateTimeBuilder_.getMessage(); } } @@ -6859,24 +17244,24 @@ public boolean hasServingConfigDataStore() { * * *
            -     * Optional. Stores serving config at DataStore level.
            +     * Output only. The timestamp when configurable_billing_approach was last
            +     * updated.
                  * 
            * * - * .google.cloud.discoveryengine.v1beta.DataStore.ServingConfigDataStore serving_config_data_store = 30 [(.google.api.field_behavior) = OPTIONAL]; + * .google.protobuf.Timestamp configurable_billing_approach_update_time = 46 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ - public Builder setServingConfigDataStore( - com.google.cloud.discoveryengine.v1beta.DataStore.ServingConfigDataStore value) { - if (servingConfigDataStoreBuilder_ == null) { + public Builder setConfigurableBillingApproachUpdateTime(com.google.protobuf.Timestamp value) { + if (configurableBillingApproachUpdateTimeBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - servingConfigDataStore_ = value; + configurableBillingApproachUpdateTime_ = value; } else { - servingConfigDataStoreBuilder_.setMessage(value); + configurableBillingApproachUpdateTimeBuilder_.setMessage(value); } - bitField0_ |= 0x00002000; + bitField0_ |= 0x00800000; onChanged(); return this; } @@ -6885,22 +17270,22 @@ public Builder setServingConfigDataStore( * * *
            -     * Optional. Stores serving config at DataStore level.
            +     * Output only. The timestamp when configurable_billing_approach was last
            +     * updated.
                  * 
            * * - * .google.cloud.discoveryengine.v1beta.DataStore.ServingConfigDataStore serving_config_data_store = 30 [(.google.api.field_behavior) = OPTIONAL]; + * .google.protobuf.Timestamp configurable_billing_approach_update_time = 46 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ - public Builder setServingConfigDataStore( - com.google.cloud.discoveryengine.v1beta.DataStore.ServingConfigDataStore.Builder - builderForValue) { - if (servingConfigDataStoreBuilder_ == null) { - servingConfigDataStore_ = builderForValue.build(); + public Builder setConfigurableBillingApproachUpdateTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (configurableBillingApproachUpdateTimeBuilder_ == null) { + configurableBillingApproachUpdateTime_ = builderForValue.build(); } else { - servingConfigDataStoreBuilder_.setMessage(builderForValue.build()); + configurableBillingApproachUpdateTimeBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00002000; + bitField0_ |= 0x00800000; onChanged(); return this; } @@ -6909,30 +17294,29 @@ public Builder setServingConfigDataStore( * * *
            -     * Optional. Stores serving config at DataStore level.
            +     * Output only. The timestamp when configurable_billing_approach was last
            +     * updated.
                  * 
            * * - * .google.cloud.discoveryengine.v1beta.DataStore.ServingConfigDataStore serving_config_data_store = 30 [(.google.api.field_behavior) = OPTIONAL]; + * .google.protobuf.Timestamp configurable_billing_approach_update_time = 46 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ - public Builder mergeServingConfigDataStore( - com.google.cloud.discoveryengine.v1beta.DataStore.ServingConfigDataStore value) { - if (servingConfigDataStoreBuilder_ == null) { - if (((bitField0_ & 0x00002000) != 0) - && servingConfigDataStore_ != null - && servingConfigDataStore_ - != com.google.cloud.discoveryengine.v1beta.DataStore.ServingConfigDataStore - .getDefaultInstance()) { - getServingConfigDataStoreBuilder().mergeFrom(value); + public Builder mergeConfigurableBillingApproachUpdateTime(com.google.protobuf.Timestamp value) { + if (configurableBillingApproachUpdateTimeBuilder_ == null) { + if (((bitField0_ & 0x00800000) != 0) + && configurableBillingApproachUpdateTime_ != null + && configurableBillingApproachUpdateTime_ + != com.google.protobuf.Timestamp.getDefaultInstance()) { + getConfigurableBillingApproachUpdateTimeBuilder().mergeFrom(value); } else { - servingConfigDataStore_ = value; + configurableBillingApproachUpdateTime_ = value; } } else { - servingConfigDataStoreBuilder_.mergeFrom(value); + configurableBillingApproachUpdateTimeBuilder_.mergeFrom(value); } - if (servingConfigDataStore_ != null) { - bitField0_ |= 0x00002000; + if (configurableBillingApproachUpdateTime_ != null) { + bitField0_ |= 0x00800000; onChanged(); } return this; @@ -6942,19 +17326,20 @@ public Builder mergeServingConfigDataStore( * * *
            -     * Optional. Stores serving config at DataStore level.
            +     * Output only. The timestamp when configurable_billing_approach was last
            +     * updated.
                  * 
            * * - * .google.cloud.discoveryengine.v1beta.DataStore.ServingConfigDataStore serving_config_data_store = 30 [(.google.api.field_behavior) = OPTIONAL]; + * .google.protobuf.Timestamp configurable_billing_approach_update_time = 46 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ - public Builder clearServingConfigDataStore() { - bitField0_ = (bitField0_ & ~0x00002000); - servingConfigDataStore_ = null; - if (servingConfigDataStoreBuilder_ != null) { - servingConfigDataStoreBuilder_.dispose(); - servingConfigDataStoreBuilder_ = null; + public Builder clearConfigurableBillingApproachUpdateTime() { + bitField0_ = (bitField0_ & ~0x00800000); + configurableBillingApproachUpdateTime_ = null; + if (configurableBillingApproachUpdateTimeBuilder_ != null) { + configurableBillingApproachUpdateTimeBuilder_.dispose(); + configurableBillingApproachUpdateTimeBuilder_ = null; } onChanged(); return this; @@ -6964,40 +17349,40 @@ public Builder clearServingConfigDataStore() { * * *
            -     * Optional. Stores serving config at DataStore level.
            +     * Output only. The timestamp when configurable_billing_approach was last
            +     * updated.
                  * 
            * * - * .google.cloud.discoveryengine.v1beta.DataStore.ServingConfigDataStore serving_config_data_store = 30 [(.google.api.field_behavior) = OPTIONAL]; + * .google.protobuf.Timestamp configurable_billing_approach_update_time = 46 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ - public com.google.cloud.discoveryengine.v1beta.DataStore.ServingConfigDataStore.Builder - getServingConfigDataStoreBuilder() { - bitField0_ |= 0x00002000; + public com.google.protobuf.Timestamp.Builder getConfigurableBillingApproachUpdateTimeBuilder() { + bitField0_ |= 0x00800000; onChanged(); - return internalGetServingConfigDataStoreFieldBuilder().getBuilder(); + return internalGetConfigurableBillingApproachUpdateTimeFieldBuilder().getBuilder(); } /** * * *
            -     * Optional. Stores serving config at DataStore level.
            +     * Output only. The timestamp when configurable_billing_approach was last
            +     * updated.
                  * 
            * * - * .google.cloud.discoveryengine.v1beta.DataStore.ServingConfigDataStore serving_config_data_store = 30 [(.google.api.field_behavior) = OPTIONAL]; + * .google.protobuf.Timestamp configurable_billing_approach_update_time = 46 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ - public com.google.cloud.discoveryengine.v1beta.DataStore.ServingConfigDataStoreOrBuilder - getServingConfigDataStoreOrBuilder() { - if (servingConfigDataStoreBuilder_ != null) { - return servingConfigDataStoreBuilder_.getMessageOrBuilder(); + public com.google.protobuf.TimestampOrBuilder + getConfigurableBillingApproachUpdateTimeOrBuilder() { + if (configurableBillingApproachUpdateTimeBuilder_ != null) { + return configurableBillingApproachUpdateTimeBuilder_.getMessageOrBuilder(); } else { - return servingConfigDataStore_ == null - ? com.google.cloud.discoveryengine.v1beta.DataStore.ServingConfigDataStore - .getDefaultInstance() - : servingConfigDataStore_; + return configurableBillingApproachUpdateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : configurableBillingApproachUpdateTime_; } } @@ -7005,28 +17390,29 @@ public Builder clearServingConfigDataStore() { * * *
            -     * Optional. Stores serving config at DataStore level.
            +     * Output only. The timestamp when configurable_billing_approach was last
            +     * updated.
                  * 
            * * - * .google.cloud.discoveryengine.v1beta.DataStore.ServingConfigDataStore serving_config_data_store = 30 [(.google.api.field_behavior) = OPTIONAL]; + * .google.protobuf.Timestamp configurable_billing_approach_update_time = 46 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.discoveryengine.v1beta.DataStore.ServingConfigDataStore, - com.google.cloud.discoveryengine.v1beta.DataStore.ServingConfigDataStore.Builder, - com.google.cloud.discoveryengine.v1beta.DataStore.ServingConfigDataStoreOrBuilder> - internalGetServingConfigDataStoreFieldBuilder() { - if (servingConfigDataStoreBuilder_ == null) { - servingConfigDataStoreBuilder_ = + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + internalGetConfigurableBillingApproachUpdateTimeFieldBuilder() { + if (configurableBillingApproachUpdateTimeBuilder_ == null) { + configurableBillingApproachUpdateTimeBuilder_ = new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.discoveryengine.v1beta.DataStore.ServingConfigDataStore, - com.google.cloud.discoveryengine.v1beta.DataStore.ServingConfigDataStore.Builder, - com.google.cloud.discoveryengine.v1beta.DataStore.ServingConfigDataStoreOrBuilder>( - getServingConfigDataStore(), getParentForChildren(), isClean()); - servingConfigDataStore_ = null; + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getConfigurableBillingApproachUpdateTime(), getParentForChildren(), isClean()); + configurableBillingApproachUpdateTime_ = null; } - return servingConfigDataStoreBuilder_; + return configurableBillingApproachUpdateTimeBuilder_; } // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.DataStore) diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/DataStoreOrBuilder.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/DataStoreOrBuilder.java index b6dd141a9c05..b7d6db279180 100644 --- a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/DataStoreOrBuilder.java +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/DataStoreOrBuilder.java @@ -30,7 +30,7 @@ public interface DataStoreOrBuilder * * *
            -   * Immutable. The full resource name of the data store.
            +   * Immutable. Identifier. The full resource name of the data store.
                * Format:
                * `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`.
                *
            @@ -38,7 +38,9 @@ public interface DataStoreOrBuilder
                * characters.
                * 
            * - * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = IDENTIFIER]; + * * * @return The name. */ @@ -48,7 +50,7 @@ public interface DataStoreOrBuilder * * *
            -   * Immutable. The full resource name of the data store.
            +   * Immutable. Identifier. The full resource name of the data store.
                * Format:
                * `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`.
                *
            @@ -56,7 +58,9 @@ public interface DataStoreOrBuilder
                * characters.
                * 
            * - * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = IDENTIFIER]; + * * * @return The bytes for name. */ @@ -221,7 +225,7 @@ public interface DataStoreOrBuilder * *
                * Output only. The id of the default
            -   * [Schema][google.cloud.discoveryengine.v1beta.Schema] asscociated to this
            +   * [Schema][google.cloud.discoveryengine.v1beta.Schema] associated to this
                * data store.
                * 
            * @@ -236,7 +240,7 @@ public interface DataStoreOrBuilder * *
                * Output only. The id of the default
            -   * [Schema][google.cloud.discoveryengine.v1beta.Schema] asscociated to this
            +   * [Schema][google.cloud.discoveryengine.v1beta.Schema] associated to this
                * data store.
                * 
            * @@ -323,6 +327,50 @@ public interface DataStoreOrBuilder */ com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + /** + * + * + *
            +   * Optional. Configuration for advanced site search.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AdvancedSiteSearchConfig advanced_site_search_config = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the advancedSiteSearchConfig field is set. + */ + boolean hasAdvancedSiteSearchConfig(); + + /** + * + * + *
            +   * Optional. Configuration for advanced site search.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AdvancedSiteSearchConfig advanced_site_search_config = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The advancedSiteSearchConfig. + */ + com.google.cloud.discoveryengine.v1beta.AdvancedSiteSearchConfig getAdvancedSiteSearchConfig(); + + /** + * + * + *
            +   * Optional. Configuration for advanced site search.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AdvancedSiteSearchConfig advanced_site_search_config = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.discoveryengine.v1beta.AdvancedSiteSearchConfigOrBuilder + getAdvancedSiteSearchConfigOrBuilder(); + /** * * @@ -405,6 +453,89 @@ public interface DataStoreOrBuilder com.google.cloud.discoveryengine.v1beta.NaturalLanguageQueryUnderstandingConfigOrBuilder getNaturalLanguageQueryUnderstandingConfigOrBuilder(); + /** + * + * + *
            +   * Input only. The KMS key to be used to protect this DataStore at creation
            +   * time.
            +   *
            +   * Must be set for requests that need to comply with CMEK Org Policy
            +   * protections.
            +   *
            +   * If this field is set and processed successfully, the DataStore will be
            +   * protected by the KMS key, as indicated in the cmek_config field.
            +   * 
            + * + * string kms_key_name = 32 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * @return The kmsKeyName. + */ + java.lang.String getKmsKeyName(); + + /** + * + * + *
            +   * Input only. The KMS key to be used to protect this DataStore at creation
            +   * time.
            +   *
            +   * Must be set for requests that need to comply with CMEK Org Policy
            +   * protections.
            +   *
            +   * If this field is set and processed successfully, the DataStore will be
            +   * protected by the KMS key, as indicated in the cmek_config field.
            +   * 
            + * + * string kms_key_name = 32 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * @return The bytes for kmsKeyName. + */ + com.google.protobuf.ByteString getKmsKeyNameBytes(); + + /** + * + * + *
            +   * Output only. CMEK-related information for the DataStore.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.CmekConfig cmek_config = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the cmekConfig field is set. + */ + boolean hasCmekConfig(); + + /** + * + * + *
            +   * Output only. CMEK-related information for the DataStore.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.CmekConfig cmek_config = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The cmekConfig. + */ + com.google.cloud.discoveryengine.v1beta.CmekConfig getCmekConfig(); + + /** + * + * + *
            +   * Output only. CMEK-related information for the DataStore.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.CmekConfig cmek_config = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.discoveryengine.v1beta.CmekConfigOrBuilder getCmekConfigOrBuilder(); + /** * * @@ -449,6 +580,35 @@ public interface DataStoreOrBuilder com.google.cloud.discoveryengine.v1beta.DataStore.BillingEstimationOrBuilder getBillingEstimationOrBuilder(); + /** + * + * + *
            +   * Immutable. Whether data in the
            +   * [DataStore][google.cloud.discoveryengine.v1beta.DataStore] has ACL
            +   * information. If set to `true`, the source data must have ACL. ACL will be
            +   * ingested when data is ingested by
            +   * [DocumentService.ImportDocuments][google.cloud.discoveryengine.v1beta.DocumentService.ImportDocuments]
            +   * methods.
            +   *
            +   * When ACL is enabled for the
            +   * [DataStore][google.cloud.discoveryengine.v1beta.DataStore],
            +   * [Document][google.cloud.discoveryengine.v1beta.Document] can't be accessed
            +   * by calling
            +   * [DocumentService.GetDocument][google.cloud.discoveryengine.v1beta.DocumentService.GetDocument]
            +   * or
            +   * [DocumentService.ListDocuments][google.cloud.discoveryengine.v1beta.DocumentService.ListDocuments].
            +   *
            +   * Currently ACL is only supported in `GENERIC` industry vertical with
            +   * non-`PUBLIC_WEBSITE` content config.
            +   * 
            + * + * bool acl_enabled = 24 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The aclEnabled. + */ + boolean getAclEnabled(); + /** * * @@ -551,9 +711,12 @@ public interface DataStoreOrBuilder * provisioning it. If unset, a default vertical specialized schema will be * used. * - * This field is only used by [CreateDataStore][] API, and will be ignored if - * used in other APIs. This field will be omitted from all API responses - * including [CreateDataStore][] API. To retrieve a schema of a + * This field is only used by + * [CreateDataStore][google.cloud.discoveryengine.v1beta.DataStoreService.CreateDataStore] + * API, and will be ignored if used in other APIs. This field will be omitted + * from all API responses including + * [CreateDataStore][google.cloud.discoveryengine.v1beta.DataStoreService.CreateDataStore] + * API. To retrieve a schema of a * [DataStore][google.cloud.discoveryengine.v1beta.DataStore], use * [SchemaService.GetSchema][google.cloud.discoveryengine.v1beta.SchemaService.GetSchema] * API instead. @@ -578,9 +741,12 @@ public interface DataStoreOrBuilder * provisioning it. If unset, a default vertical specialized schema will be * used. * - * This field is only used by [CreateDataStore][] API, and will be ignored if - * used in other APIs. This field will be omitted from all API responses - * including [CreateDataStore][] API. To retrieve a schema of a + * This field is only used by + * [CreateDataStore][google.cloud.discoveryengine.v1beta.DataStoreService.CreateDataStore] + * API, and will be ignored if used in other APIs. This field will be omitted + * from all API responses including + * [CreateDataStore][google.cloud.discoveryengine.v1beta.DataStoreService.CreateDataStore] + * API. To retrieve a schema of a * [DataStore][google.cloud.discoveryengine.v1beta.DataStore], use * [SchemaService.GetSchema][google.cloud.discoveryengine.v1beta.SchemaService.GetSchema] * API instead. @@ -605,9 +771,12 @@ public interface DataStoreOrBuilder * provisioning it. If unset, a default vertical specialized schema will be * used. * - * This field is only used by [CreateDataStore][] API, and will be ignored if - * used in other APIs. This field will be omitted from all API responses - * including [CreateDataStore][] API. To retrieve a schema of a + * This field is only used by + * [CreateDataStore][google.cloud.discoveryengine.v1beta.DataStoreService.CreateDataStore] + * API, and will be ignored if used in other APIs. This field will be omitted + * from all API responses including + * [CreateDataStore][google.cloud.discoveryengine.v1beta.DataStoreService.CreateDataStore] + * API. To retrieve a schema of a * [DataStore][google.cloud.discoveryengine.v1beta.DataStore], use * [SchemaService.GetSchema][google.cloud.discoveryengine.v1beta.SchemaService.GetSchema] * API instead. @@ -621,6 +790,50 @@ public interface DataStoreOrBuilder */ com.google.cloud.discoveryengine.v1beta.SchemaOrBuilder getStartingSchemaOrBuilder(); + /** + * + * + *
            +   * Optional. Configuration for `HEALTHCARE_FHIR` vertical.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.HealthcareFhirConfig healthcare_fhir_config = 29 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the healthcareFhirConfig field is set. + */ + boolean hasHealthcareFhirConfig(); + + /** + * + * + *
            +   * Optional. Configuration for `HEALTHCARE_FHIR` vertical.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.HealthcareFhirConfig healthcare_fhir_config = 29 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The healthcareFhirConfig. + */ + com.google.cloud.discoveryengine.v1beta.HealthcareFhirConfig getHealthcareFhirConfig(); + + /** + * + * + *
            +   * Optional. Configuration for `HEALTHCARE_FHIR` vertical.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.HealthcareFhirConfig healthcare_fhir_config = 29 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.discoveryengine.v1beta.HealthcareFhirConfigOrBuilder + getHealthcareFhirConfigOrBuilder(); + /** * * @@ -665,4 +878,177 @@ public interface DataStoreOrBuilder */ com.google.cloud.discoveryengine.v1beta.DataStore.ServingConfigDataStoreOrBuilder getServingConfigDataStoreOrBuilder(); + + /** + * + * + *
            +   * Immutable. The fully qualified resource name of the associated
            +   * [IdentityMappingStore][google.cloud.discoveryengine.v1beta.IdentityMappingStore].
            +   * This field can only be set for acl_enabled DataStores with `THIRD_PARTY` or
            +   * `GSUITE` IdP. Format:
            +   * `projects/{project}/locations/{location}/identityMappingStores/{identity_mapping_store}`.
            +   * 
            + * + * + * string identity_mapping_store = 31 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * + * + * @return The identityMappingStore. + */ + java.lang.String getIdentityMappingStore(); + + /** + * + * + *
            +   * Immutable. The fully qualified resource name of the associated
            +   * [IdentityMappingStore][google.cloud.discoveryengine.v1beta.IdentityMappingStore].
            +   * This field can only be set for acl_enabled DataStores with `THIRD_PARTY` or
            +   * `GSUITE` IdP. Format:
            +   * `projects/{project}/locations/{location}/identityMappingStores/{identity_mapping_store}`.
            +   * 
            + * + * + * string identity_mapping_store = 31 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for identityMappingStore. + */ + com.google.protobuf.ByteString getIdentityMappingStoreBytes(); + + /** + * + * + *
            +   * Optional. If set, this DataStore is an Infobot FAQ DataStore.
            +   * 
            + * + * bool is_infobot_faq_data_store = 37 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The isInfobotFaqDataStore. + */ + boolean getIsInfobotFaqDataStore(); + + /** + * + * + *
            +   * Optional. If set, this DataStore is a federated search DataStore.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig federated_search_config = 38 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the federatedSearchConfig field is set. + */ + boolean hasFederatedSearchConfig(); + + /** + * + * + *
            +   * Optional. If set, this DataStore is a federated search DataStore.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig federated_search_config = 38 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The federatedSearchConfig. + */ + com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig + getFederatedSearchConfig(); + + /** + * + * + *
            +   * Optional. If set, this DataStore is a federated search DataStore.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfig federated_search_config = 38 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.discoveryengine.v1beta.DataStore.FederatedSearchConfigOrBuilder + getFederatedSearchConfigOrBuilder(); + + /** + * + * + *
            +   * Optional. Configuration for configurable billing approach. See
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.DataStore.ConfigurableBillingApproach configurable_billing_approach = 45 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for configurableBillingApproach. + */ + int getConfigurableBillingApproachValue(); + + /** + * + * + *
            +   * Optional. Configuration for configurable billing approach. See
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.DataStore.ConfigurableBillingApproach configurable_billing_approach = 45 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The configurableBillingApproach. + */ + com.google.cloud.discoveryengine.v1beta.DataStore.ConfigurableBillingApproach + getConfigurableBillingApproach(); + + /** + * + * + *
            +   * Output only. The timestamp when configurable_billing_approach was last
            +   * updated.
            +   * 
            + * + * + * .google.protobuf.Timestamp configurable_billing_approach_update_time = 46 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the configurableBillingApproachUpdateTime field is set. + */ + boolean hasConfigurableBillingApproachUpdateTime(); + + /** + * + * + *
            +   * Output only. The timestamp when configurable_billing_approach was last
            +   * updated.
            +   * 
            + * + * + * .google.protobuf.Timestamp configurable_billing_approach_update_time = 46 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The configurableBillingApproachUpdateTime. + */ + com.google.protobuf.Timestamp getConfigurableBillingApproachUpdateTime(); + + /** + * + * + *
            +   * Output only. The timestamp when configurable_billing_approach was last
            +   * updated.
            +   * 
            + * + * + * .google.protobuf.Timestamp configurable_billing_approach_update_time = 46 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getConfigurableBillingApproachUpdateTimeOrBuilder(); } diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/DataStoreProto.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/DataStoreProto.java index 70274815eaa1..236d04475f2e 100644 --- a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/DataStoreProto.java +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/DataStoreProto.java @@ -52,6 +52,34 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_discoveryengine_v1beta_DataStore_ServingConfigDataStore_descriptor; static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_cloud_discoveryengine_v1beta_DataStore_ServingConfigDataStore_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1beta_DataStore_FederatedSearchConfig_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1beta_DataStore_FederatedSearchConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1beta_DataStore_FederatedSearchConfig_AlloyDbConfig_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1beta_DataStore_FederatedSearchConfig_AlloyDbConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1beta_DataStore_FederatedSearchConfig_AlloyDbConfig_AlloyDbConnectionConfig_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1beta_DataStore_FederatedSearchConfig_AlloyDbConfig_AlloyDbConnectionConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1beta_DataStore_FederatedSearchConfig_AlloyDbConfig_AlloyDbAiNaturalLanguageConfig_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1beta_DataStore_FederatedSearchConfig_AlloyDbConfig_AlloyDbAiNaturalLanguageConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1beta_DataStore_FederatedSearchConfig_ThirdPartyOauthConfig_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1beta_DataStore_FederatedSearchConfig_ThirdPartyOauthConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1beta_DataStore_FederatedSearchConfig_NotebooklmConfig_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1beta_DataStore_FederatedSearchConfig_NotebooklmConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1beta_AdvancedSiteSearchConfig_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1beta_AdvancedSiteSearchConfig_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_discoveryengine_v1beta_LanguageInfo_descriptor; static final com.google.protobuf.GeneratedMessage.FieldAccessorTable @@ -76,37 +104,54 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "\n" + "4google/cloud/discoveryengine/v1beta/data_store.proto\022#google.cloud.discoveryen" + "gine.v1beta\032\037google/api/field_behavior.p" - + "roto\032\031google/api/resource.proto\0320google/" - + "cloud/discoveryengine/v1beta/common.proto\032Dgoogle/cloud/discoveryengine/v1beta/d" - + "ocument_processing_config.proto\0320google/" - + "cloud/discoveryengine/v1beta/schema.proto\032\037google/protobuf/timestamp.proto\"\340\r\n" - + "\tDataStore\022\021\n" - + "\004name\030\001 \001(\tB\003\340A\005\022\031\n" + + "roto\032\031google/api/resource.proto\032=google/" + + "cloud/discoveryengine/v1beta/cmek_config_service.proto\0320google/cloud/discoveryen" + + "gine/v1beta/common.proto\032Dgoogle/cloud/discoveryengine/v1beta/document_processin" + + "g_config.proto\0320google/cloud/discoveryen" + + "gine/v1beta/schema.proto\032\037google/protobuf/timestamp.proto\"\274\037\n" + + "\tDataStore\022\024\n" + + "\004name\030\001 \001(\tB\006\340A\005\340A\010\022\031\n" + "\014display_name\030\002 \001(\tB\003\340A\002\022U\n" - + "\021industry_vertical\030\003 \001(" - + "\01625.google.cloud.discoveryengine.v1beta.IndustryVerticalB\003\340A\005\022I\n" - + "\016solution_types\030\005" - + " \003(\01621.google.cloud.discoveryengine.v1beta.SolutionType\022\036\n" + + "\021industry_vertical\030\003 \001(\01625.google.clo" + + "ud.discoveryengine.v1beta.IndustryVerticalB\003\340A\005\022I\n" + + "\016solution_types\030\005 \003(\01621.google" + + ".cloud.discoveryengine.v1beta.SolutionType\022\036\n" + "\021default_schema_id\030\007 \001(\tB\003\340A\003\022Y\n" - + "\016content_config\030\006 \001(\0162<.googl" - + "e.cloud.discoveryengine.v1beta.DataStore.ContentConfigB\003\340A\005\0224\n" - + "\013create_time\030\004" - + " \001(\0132\032.google.protobuf.TimestampB\003\340A\003\022H\n\r" - + "language_info\030\016" - + " \001(\01321.google.cloud.discoveryengine.v1beta.LanguageInfo\022\206\001\n" - + "+natural_language_query_understanding_config\030\" \001(" - + "\0132L.google.cloud.discoveryengine.v1beta." - + "NaturalLanguageQueryUnderstandingConfigB\003\340A\001\022a\n" - + "\022billing_estimation\030\027 \001(\0132@.googl" - + "e.cloud.discoveryengine.v1beta.DataStore.BillingEstimationB\003\340A\003\022N\n" - + "\020workspace_config\030\031" - + " \001(\01324.google.cloud.discoveryengine.v1beta.WorkspaceConfig\022a\n" - + "\032document_processing_config\030\033 \001(\0132=.google.cloud.disco" - + "veryengine.v1beta.DocumentProcessingConfig\022D\n" + + "\016content_config\030\006 \001(\0162<.google.cloud.discov" + + "eryengine.v1beta.DataStore.ContentConfigB\003\340A\005\0224\n" + + "\013create_time\030\004 \001(\0132\032.google.protobuf.TimestampB\003\340A\003\022g\n" + + "\033advanced_site_search_config\030\014 \001(\0132=.google.cloud.discover" + + "yengine.v1beta.AdvancedSiteSearchConfigB\003\340A\001\022H\n\r" + + "language_info\030\016 \001(\01321.google.clo" + + "ud.discoveryengine.v1beta.LanguageInfo\022\206\001\n" + + "+natural_language_query_understanding_config\030\"" + + " \001(\0132L.google.cloud.discoveryeng" + + "ine.v1beta.NaturalLanguageQueryUnderstandingConfigB\003\340A\001\022\031\n" + + "\014kms_key_name\030 \001(\tB\003\340A\004\022I\n" + + "\013cmek_config\030\022" + + " \001(\0132/.google.cloud.discoveryengine.v1beta.CmekConfigB\003\340A\003\022a\n" + + "\022billing_estimation\030\027 \001(\0132@.google.cloud" + + ".discoveryengine.v1beta.DataStore.BillingEstimationB\003\340A\003\022\030\n" + + "\013acl_enabled\030\030 \001(\010B\003\340A\005\022N\n" + + "\020workspace_config\030\031 \001(\01324.google.cl" + + "oud.discoveryengine.v1beta.WorkspaceConfig\022a\n" + + "\032document_processing_config\030\033 \001(\0132=" + + ".google.cloud.discoveryengine.v1beta.DocumentProcessingConfig\022D\n" + "\017starting_schema\030\034" - + " \001(\0132+.google.cloud.discoveryengine.v1beta.Schema\022m\n" - + "\031serving_config_data_store\030\036 \001(\0132E.google.clo" - + "ud.discoveryengine.v1beta.DataStore.ServingConfigDataStoreB\003\340A\001\032\256\002\n" + + " \001(\0132+.google.cloud.discoveryengine.v1beta.Schema\022^\n" + + "\026healthcare_fhir_config\030\035 " + + "\001(\01329.google.cloud.discoveryengine.v1beta.HealthcareFhirConfigB\003\340A\001\022m\n" + + "\031serving_config_data_store\030\036 \001(\0132E.google.cloud.di" + + "scoveryengine.v1beta.DataStore.ServingConfigDataStoreB\003\340A\001\022[\n" + + "\026identity_mapping_store\030\037 \001(\tB;\340A\005\372A5\n" + + "3discoveryengine.googleapis.com/IdentityMappingStore\022&\n" + + "\031is_infobot_faq_data_store\030% \001(\010B\003\340A\001\022j\n" + + "\027federated_search_config\030& \001(\0132D.google.cloud." + + "discoveryengine.v1beta.DataStore.FederatedSearchConfigB\003\340A\001\022v\n" + + "\035configurable_billing_approach\030- \001(\0162J.google.cloud.discov" + + "eryengine.v1beta.DataStore.ConfigurableBillingApproachB\003\340A\001\022R\n" + + ")configurable_billing_approach_update_time\030." + + " \001(\0132\032.google.protobuf.TimestampB\003\340A\003\032\256\002\n" + "\021BillingEstimation\022\034\n" + "\024structured_data_size\030\001 \001(\003\022\036\n" + "\026unstructured_data_size\030\002 \001(\003\022\031\n" @@ -115,36 +160,81 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + " \001(\0132\032.google.protobuf.Timestamp\022A\n" + "\035unstructured_data_update_time\030\005" + " \001(\0132\032.google.protobuf.Timestamp\022<\n" - + "\030website_data_update_time\030\006 \001(\0132\032.google.protobuf.Timestamp\0326\n" - + "\026ServingConfigDataStore\022\034\n" - + "\024disabled_for_serving\030\001 \001(\010\"\177\n\r" + + "\030website_data_update_time\030\006 \001(\0132\032.google.protobuf.Timestamp\032;\n" + + "\026ServingConfigDataStore\022!\n" + + "\024disabled_for_serving\030\001 \001(\010B\003\340A\001\032\247\n\n" + + "\025FederatedSearchConfig\022m\n" + + "\017alloy_db_config\030\001 \001(\0132R.google.cloud.discoveryengine.v1beta.D" + + "ataStore.FederatedSearchConfig.AlloyDbConfigH\000\022~\n" + + "\030third_party_oauth_config\030\002 \001(\0132Z.google.cloud.discoveryengine.v1beta.D" + + "ataStore.FederatedSearchConfig.ThirdPartyOauthConfigH\000\022r\n" + + "\021notebooklm_config\030\003 \001(\0132U.google.cloud.discoveryengine.v1beta." + + "DataStore.FederatedSearchConfig.NotebooklmConfigH\000\032\230\006\n\r" + + "AlloyDbConfig\022\222\001\n" + + "\031alloydb_connection_config\030\001 \001(\0132j.google.cloud." + + "discoveryengine.v1beta.DataStore.Federat" + + "edSearchConfig.AlloyDbConfig.AlloyDbConnectionConfigB\003\340A\002\022\224\001\n" + + "\024alloydb_ai_nl_config\030\002 \001(\0132q.google.cloud.discoveryengine." + + "v1beta.DataStore.FederatedSearchConfig.A" + + "lloyDbConfig.AlloyDbAiNaturalLanguageConfigB\003\340A\001\022\034\n" + + "\017returned_fields\030\003 \003(\tB\003\340A\001\032\377\002\n" + + "\027AlloyDbConnectionConfig\022\025\n" + + "\010instance\030\001 \001(\tB\003\340A\002\022\025\n" + + "\010database\030\002 \001(\tB\003\340A\002\022\021\n" + + "\004user\030\003 \001(\tB\003\340A\002\022\025\n" + + "\010password\030\004 \001(\tB\003\340A\002\022\213\001\n" + + "\tauth_mode\030\005 \001(\0162s.google.cloud.discoverye" + + "ngine.v1beta.DataStore.FederatedSearchCo" + + "nfig.AlloyDbConfig.AlloyDbConnectionConfig.AuthModeB\003\340A\001\022\030\n" + + "\013enable_psvs\030\006 \001(\010B\003\340A\001\"d\n" + + "\010AuthMode\022\031\n" + + "\025AUTH_MODE_UNSPECIFIED\020\000\022\035\n" + + "\031AUTH_MODE_SERVICE_ACCOUNT\020\001\022\036\n" + + "\032AUTH_MODE_END_USER_ACCOUNT\020\002\032;\n" + + "\036AlloyDbAiNaturalLanguageConfig\022\031\n" + + "\014nl_config_id\030\001 \001(\tB\003\340A\001\032J\n" + + "\025ThirdPartyOauthConfig\022\025\n" + + "\010app_name\030\001 \001(\tB\003\340A\001\022\032\n\r" + + "instance_name\030\002 \001(\tB\003\340A\001\032.\n" + + "\020NotebooklmConfig\022\032\n\r" + + "search_config\030\001 \001(\tB\003\340A\002B\024\n" + + "\022data_source_config\"\177\n\r" + "ContentConfig\022\036\n" + "\032CONTENT_CONFIG_UNSPECIFIED\020\000\022\016\n\n" + "NO_CONTENT\020\001\022\024\n" + "\020CONTENT_REQUIRED\020\002\022\022\n" + "\016PUBLIC_WEBSITE\020\003\022\024\n" - + "\020GOOGLE_WORKSPACE\020\004:\311\001\352A\305\001\n" - + "(discoveryengine.googleapis.com/DataStore\022?projects/{project}/locations/{locati" - + "on}/dataStores/{data_store}\022Xprojects/{p" - + "roject}/locations/{location}/collections/{collection}/dataStores/{data_store}\"x\n" + + "\020GOOGLE_WORKSPACE\020\004\"\241\001\n" + + "\033ConfigurableBillingApproach\022-\n" + + ")CONFIGURABLE_BILLING_APPROACH_UNSPECIFIED\020\000\022+\n" + + "\'CONFIGURABLE_SUBSCRIPTION_INDEXING_CORE\020\001\022&\n" + + "\"CONFIGURABLE_CONSUMPTION_EMBEDDING\020\002:\311\001\352A\305\001\n" + + "(discoveryengine.googleapis.com/DataStore\022?projects/{project}/locati" + + "ons/{location}/dataStores/{data_store}\022Xprojects/{project}/locations/{location}/" + + "collections/{collection}/dataStores/{data_store}\"\236\001\n" + + "\030AdvancedSiteSearchConfig\022\"\n" + + "\025disable_initial_index\030\003 \001(\010H\000\210\001\001\022&\n" + + "\031disable_automatic_refresh\030\004 \001(\010H\001\210\001\001B\030\n" + + "\026_disable_initial_indexB\034\n" + + "\032_disable_automatic_refresh\"x\n" + "\014LanguageInfo\022\025\n\r" + "language_code\030\001 \001(\t\022%\n" + "\030normalized_language_code\030\002 \001(\tB\003\340A\003\022\025\n" + "\010language\030\003 \001(\tB\003\340A\003\022\023\n" + "\006region\030\004 \001(\tB\003\340A\003\"\303\001\n" + "\'NaturalLanguageQueryUnderstandingConfig\022_\n" - + "\004mode\030\001 \001(\0162Q.google.cloud.discove" - + "ryengine.v1beta.NaturalLanguageQueryUnderstandingConfig.Mode\"7\n" + + "\004mode\030\001 \001(\0162Q.google.c" + + "loud.discoveryengine.v1beta.NaturalLanguageQueryUnderstandingConfig.Mode\"7\n" + "\004Mode\022\024\n" + "\020MODE_UNSPECIFIED\020\000\022\014\n" + "\010DISABLED\020\001\022\013\n" - + "\007ENABLED\020\002\"\346\002\n" + + "\007ENABLED\020\002\"\376\002\n" + "\017WorkspaceConfig\022G\n" - + "\004type\030\001 \001(\01629.google" - + ".cloud.discoveryengine.v1beta.WorkspaceConfig.Type\022\032\n" - + "\022dasher_customer_id\030\002 \001(\t\022(\n" + + "\004type\030\001 " + + "\001(\01629.google.cloud.discoveryengine.v1beta.WorkspaceConfig.Type\022\037\n" + + "\022dasher_customer_id\030\002 \001(\tB\003\340A\003\022(\n" + "\033super_admin_service_account\030\004 \001(\tB\003\340A\001\022&\n" - + "\031super_admin_email_address\030\005 \001(\tB\003\340A\001\"\233\001\n" + + "\031super_admin_email_address\030\005 \001(\tB\003\340A\001\"\256\001\n" + "\004Type\022\024\n" + "\020TYPE_UNSPECIFIED\020\000\022\020\n" + "\014GOOGLE_DRIVE\020\001\022\017\n" @@ -153,13 +243,14 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\017GOOGLE_CALENDAR\020\004\022\017\n" + "\013GOOGLE_CHAT\020\005\022\021\n\r" + "GOOGLE_GROUPS\020\006\022\017\n" - + "\013GOOGLE_KEEP\020\007B\225\002\n" - + "\'com.google.cloud.discoveryengine.v1betaB\016DataStoreProtoP\001ZQcloud.google.com/g" - + "o/discoveryengine/apiv1beta/discoveryeng" - + "inepb;discoveryenginepb\242\002\017DISCOVERYENGIN" - + "E\252\002#Google.Cloud.DiscoveryEngine.V1Beta\312" - + "\002#Google\\Cloud\\DiscoveryEngine\\V1beta\352\002&" - + "Google::Cloud::DiscoveryEngine::V1betab\006proto3" + + "\013GOOGLE_KEEP\020\007\022\021\n\r" + + "GOOGLE_PEOPLE\020\010B\225\002\n" + + "\'com.google.cloud.discoveryengine.v1betaB\016" + + "DataStoreProtoP\001ZQcloud.google.com/go/discoveryengine/apiv1beta/discoveryenginep" + + "b;discoveryenginepb\242\002\017DISCOVERYENGINE\252\002#" + + "Google.Cloud.DiscoveryEngine.V1Beta\312\002#Go" + + "ogle\\Cloud\\DiscoveryEngine\\V1beta\352\002&Goog" + + "le::Cloud::DiscoveryEngine::V1betab\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -167,6 +258,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.Descriptors.FileDescriptor[] { com.google.api.FieldBehaviorProto.getDescriptor(), com.google.api.ResourceProto.getDescriptor(), + com.google.cloud.discoveryengine.v1beta.CmekConfigServiceProto.getDescriptor(), com.google.cloud.discoveryengine.v1beta.CommonProto.getDescriptor(), com.google.cloud.discoveryengine.v1beta.DocumentProcessingConfigProto.getDescriptor(), com.google.cloud.discoveryengine.v1beta.SchemaProto.getDescriptor(), @@ -185,13 +277,23 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "DefaultSchemaId", "ContentConfig", "CreateTime", + "AdvancedSiteSearchConfig", "LanguageInfo", "NaturalLanguageQueryUnderstandingConfig", + "KmsKeyName", + "CmekConfig", "BillingEstimation", + "AclEnabled", "WorkspaceConfig", "DocumentProcessingConfig", "StartingSchema", + "HealthcareFhirConfig", "ServingConfigDataStore", + "IdentityMappingStore", + "IsInfobotFaqDataStore", + "FederatedSearchConfig", + "ConfigurableBillingApproach", + "ConfigurableBillingApproachUpdateTime", }); internal_static_google_cloud_discoveryengine_v1beta_DataStore_BillingEstimation_descriptor = internal_static_google_cloud_discoveryengine_v1beta_DataStore_descriptor.getNestedType(0); @@ -214,8 +316,69 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "DisabledForServing", }); - internal_static_google_cloud_discoveryengine_v1beta_LanguageInfo_descriptor = + internal_static_google_cloud_discoveryengine_v1beta_DataStore_FederatedSearchConfig_descriptor = + internal_static_google_cloud_discoveryengine_v1beta_DataStore_descriptor.getNestedType(2); + internal_static_google_cloud_discoveryengine_v1beta_DataStore_FederatedSearchConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1beta_DataStore_FederatedSearchConfig_descriptor, + new java.lang.String[] { + "AlloyDbConfig", "ThirdPartyOauthConfig", "NotebooklmConfig", "DataSourceConfig", + }); + internal_static_google_cloud_discoveryengine_v1beta_DataStore_FederatedSearchConfig_AlloyDbConfig_descriptor = + internal_static_google_cloud_discoveryengine_v1beta_DataStore_FederatedSearchConfig_descriptor + .getNestedType(0); + internal_static_google_cloud_discoveryengine_v1beta_DataStore_FederatedSearchConfig_AlloyDbConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1beta_DataStore_FederatedSearchConfig_AlloyDbConfig_descriptor, + new java.lang.String[] { + "AlloydbConnectionConfig", "AlloydbAiNlConfig", "ReturnedFields", + }); + internal_static_google_cloud_discoveryengine_v1beta_DataStore_FederatedSearchConfig_AlloyDbConfig_AlloyDbConnectionConfig_descriptor = + internal_static_google_cloud_discoveryengine_v1beta_DataStore_FederatedSearchConfig_AlloyDbConfig_descriptor + .getNestedType(0); + internal_static_google_cloud_discoveryengine_v1beta_DataStore_FederatedSearchConfig_AlloyDbConfig_AlloyDbConnectionConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1beta_DataStore_FederatedSearchConfig_AlloyDbConfig_AlloyDbConnectionConfig_descriptor, + new java.lang.String[] { + "Instance", "Database", "User", "Password", "AuthMode", "EnablePsvs", + }); + internal_static_google_cloud_discoveryengine_v1beta_DataStore_FederatedSearchConfig_AlloyDbConfig_AlloyDbAiNaturalLanguageConfig_descriptor = + internal_static_google_cloud_discoveryengine_v1beta_DataStore_FederatedSearchConfig_AlloyDbConfig_descriptor + .getNestedType(1); + internal_static_google_cloud_discoveryengine_v1beta_DataStore_FederatedSearchConfig_AlloyDbConfig_AlloyDbAiNaturalLanguageConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1beta_DataStore_FederatedSearchConfig_AlloyDbConfig_AlloyDbAiNaturalLanguageConfig_descriptor, + new java.lang.String[] { + "NlConfigId", + }); + internal_static_google_cloud_discoveryengine_v1beta_DataStore_FederatedSearchConfig_ThirdPartyOauthConfig_descriptor = + internal_static_google_cloud_discoveryengine_v1beta_DataStore_FederatedSearchConfig_descriptor + .getNestedType(1); + internal_static_google_cloud_discoveryengine_v1beta_DataStore_FederatedSearchConfig_ThirdPartyOauthConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1beta_DataStore_FederatedSearchConfig_ThirdPartyOauthConfig_descriptor, + new java.lang.String[] { + "AppName", "InstanceName", + }); + internal_static_google_cloud_discoveryengine_v1beta_DataStore_FederatedSearchConfig_NotebooklmConfig_descriptor = + internal_static_google_cloud_discoveryengine_v1beta_DataStore_FederatedSearchConfig_descriptor + .getNestedType(2); + internal_static_google_cloud_discoveryengine_v1beta_DataStore_FederatedSearchConfig_NotebooklmConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1beta_DataStore_FederatedSearchConfig_NotebooklmConfig_descriptor, + new java.lang.String[] { + "SearchConfig", + }); + internal_static_google_cloud_discoveryengine_v1beta_AdvancedSiteSearchConfig_descriptor = getDescriptor().getMessageType(1); + internal_static_google_cloud_discoveryengine_v1beta_AdvancedSiteSearchConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1beta_AdvancedSiteSearchConfig_descriptor, + new java.lang.String[] { + "DisableInitialIndex", "DisableAutomaticRefresh", + }); + internal_static_google_cloud_discoveryengine_v1beta_LanguageInfo_descriptor = + getDescriptor().getMessageType(2); internal_static_google_cloud_discoveryengine_v1beta_LanguageInfo_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_cloud_discoveryengine_v1beta_LanguageInfo_descriptor, @@ -223,7 +386,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "LanguageCode", "NormalizedLanguageCode", "Language", "Region", }); internal_static_google_cloud_discoveryengine_v1beta_NaturalLanguageQueryUnderstandingConfig_descriptor = - getDescriptor().getMessageType(2); + getDescriptor().getMessageType(3); internal_static_google_cloud_discoveryengine_v1beta_NaturalLanguageQueryUnderstandingConfig_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_cloud_discoveryengine_v1beta_NaturalLanguageQueryUnderstandingConfig_descriptor, @@ -231,7 +394,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Mode", }); internal_static_google_cloud_discoveryengine_v1beta_WorkspaceConfig_descriptor = - getDescriptor().getMessageType(3); + getDescriptor().getMessageType(4); internal_static_google_cloud_discoveryengine_v1beta_WorkspaceConfig_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_cloud_discoveryengine_v1beta_WorkspaceConfig_descriptor, @@ -241,6 +404,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { descriptor.resolveAllFeaturesImmutable(); com.google.api.FieldBehaviorProto.getDescriptor(); com.google.api.ResourceProto.getDescriptor(); + com.google.cloud.discoveryengine.v1beta.CmekConfigServiceProto.getDescriptor(); com.google.cloud.discoveryengine.v1beta.CommonProto.getDescriptor(); com.google.cloud.discoveryengine.v1beta.DocumentProcessingConfigProto.getDescriptor(); com.google.cloud.discoveryengine.v1beta.SchemaProto.getDescriptor(); @@ -249,6 +413,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.protobuf.ExtensionRegistry.newInstance(); registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); registry.add(com.google.api.ResourceProto.resource); + registry.add(com.google.api.ResourceProto.resourceReference); com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( descriptor, registry); } diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/DataStoreServiceProto.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/DataStoreServiceProto.java index 5589a114850c..1d0018a75ec6 100644 --- a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/DataStoreServiceProto.java +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/DataStoreServiceProto.java @@ -91,85 +91,91 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "grunning/operations.proto\032\033google/protob" + "uf/empty.proto\032 google/protobuf/field_ma" + "sk.proto\032\037google/protobuf/timestamp.prot" - + "o\"\213\002\n\026CreateDataStoreRequest\022A\n\006parent\030\001" - + " \001(\tB1\340A\002\372A+\n)discoveryengine.googleapis" - + ".com/Collection\022G\n\ndata_store\030\002 \001(\0132..go" - + "ogle.cloud.discoveryengine.v1beta.DataSt" - + "oreB\003\340A\002\022\032\n\rdata_store_id\030\003 \001(\tB\003\340A\002\022#\n\033" - + "create_advanced_site_search\030\004 \001(\010\022$\n\034ski" - + "p_default_schema_creation\030\007 \001(\010\"U\n\023GetDa" - + "taStoreRequest\022>\n\004name\030\001 \001(\tB0\340A\002\372A*\n(di" - + "scoveryengine.googleapis.com/DataStore\"{" - + "\n\027CreateDataStoreMetadata\022/\n\013create_time" - + "\030\001 \001(\0132\032.google.protobuf.Timestamp\022/\n\013up" - + "date_time\030\002 \001(\0132\032.google.protobuf.Timest" - + "amp\"\221\001\n\025ListDataStoresRequest\022A\n\006parent\030" - + "\001 \001(\tB1\340A\002\372A+\n)discoveryengine.googleapi" - + "s.com/Collection\022\021\n\tpage_size\030\002 \001(\005\022\022\n\np" - + "age_token\030\003 \001(\t\022\016\n\006filter\030\004 \001(\t\"v\n\026ListD" - + "ataStoresResponse\022C\n\013data_stores\030\001 \003(\0132." - + ".google.cloud.discoveryengine.v1beta.Dat" - + "aStore\022\027\n\017next_page_token\030\002 \001(\t\"X\n\026Delet" - + "eDataStoreRequest\022>\n\004name\030\001 \001(\tB0\340A\002\372A*\n" - + "(discoveryengine.googleapis.com/DataStor" - + "e\"\222\001\n\026UpdateDataStoreRequest\022G\n\ndata_sto" - + "re\030\001 \001(\0132..google.cloud.discoveryengine." - + "v1beta.DataStoreB\003\340A\002\022/\n\013update_mask\030\002 \001" - + "(\0132\032.google.protobuf.FieldMask\"{\n\027Delete" - + "DataStoreMetadata\022/\n\013create_time\030\001 \001(\0132\032" - + ".google.protobuf.Timestamp\022/\n\013update_tim" - + "e\030\002 \001(\0132\032.google.protobuf.Timestamp2\263\r\n\020" - + "DataStoreService\022\230\003\n\017CreateDataStore\022;.g" - + "oogle.cloud.discoveryengine.v1beta.Creat" - + "eDataStoreRequest\032\035.google.longrunning.O" - + "peration\"\250\002\312Al\n-google.cloud.discoveryen" - + "gine.v1beta.DataStore\022;google.cloud.disc" - + "overyengine.v1beta.CreateDataStoreMetada" - + "ta\332A\037parent,data_store,data_store_id\202\323\344\223" - + "\002\220\001\"2/v1beta/{parent=projects/*/location" - + "s/*}/dataStores:\ndata_storeZN\"@/v1beta/{" - + "parent=projects/*/locations/*/collection" - + "s/*}/dataStores:\ndata_store\022\200\002\n\014GetDataS" - + "tore\0228.google.cloud.discoveryengine.v1be" - + "ta.GetDataStoreRequest\032..google.cloud.di" - + "scoveryengine.v1beta.DataStore\"\205\001\332A\004name" - + "\202\323\344\223\002x\0222/v1beta/{name=projects/*/locatio" - + "ns/*/dataStores/*}ZB\022@/v1beta/{name=proj" - + "ects/*/locations/*/collections/*/dataSto" - + "res/*}\022\223\002\n\016ListDataStores\022:.google.cloud" - + ".discoveryengine.v1beta.ListDataStoresRe" - + "quest\032;.google.cloud.discoveryengine.v1b" - + "eta.ListDataStoresResponse\"\207\001\332A\006parent\202\323" - + "\344\223\002x\0222/v1beta/{parent=projects/*/locatio" - + "ns/*}/dataStoresZB\022@/v1beta/{parent=proj" - + "ects/*/locations/*/collections/*}/dataSt" - + "ores\022\314\002\n\017DeleteDataStore\022;.google.cloud." - + "discoveryengine.v1beta.DeleteDataStoreRe" - + "quest\032\035.google.longrunning.Operation\"\334\001\312" - + "AT\n\025google.protobuf.Empty\022;google.cloud." - + "discoveryengine.v1beta.DeleteDataStoreMe" - + "tadata\332A\004name\202\323\344\223\002x*2/v1beta/{name=proje" - + "cts/*/locations/*/dataStores/*}ZB*@/v1be" - + "ta/{name=projects/*/locations/*/collecti" - + "ons/*/dataStores/*}\022\307\002\n\017UpdateDataStore\022" - + ";.google.cloud.discoveryengine.v1beta.Up" - + "dateDataStoreRequest\032..google.cloud.disc" - + "overyengine.v1beta.DataStore\"\306\001\332A\026data_s" - + "tore,update_mask\202\323\344\223\002\246\0012=/v1beta/{data_s" - + "tore.name=projects/*/locations/*/dataSto" - + "res/*}:\ndata_storeZY2K/v1beta/{data_stor" - + "e.name=projects/*/locations/*/collection" - + "s/*/dataStores/*}:\ndata_store\032R\312A\036discov" - + "eryengine.googleapis.com\322A.https://www.g" - + "oogleapis.com/auth/cloud-platformB\234\002\n\'co" - + "m.google.cloud.discoveryengine.v1betaB\025D" - + "ataStoreServiceProtoP\001ZQcloud.google.com" - + "/go/discoveryengine/apiv1beta/discoverye" - + "nginepb;discoveryenginepb\242\002\017DISCOVERYENG" - + "INE\252\002#Google.Cloud.DiscoveryEngine.V1Bet" - + "a\312\002#Google\\Cloud\\DiscoveryEngine\\V1beta\352" - + "\002&Google::Cloud::DiscoveryEngine::V1beta" - + "b\006proto3" + + "o\"\377\002\n\026CreateDataStoreRequest\022J\n\020cmek_con" + + "fig_name\030\005 \001(\tB.\372A+\n)discoveryengine.goo" + + "gleapis.com/CmekConfigH\000\022\026\n\014disable_cmek" + + "\030\006 \001(\010H\000\022A\n\006parent\030\001 \001(\tB1\340A\002\372A+\n)discov" + + "eryengine.googleapis.com/Collection\022G\n\nd" + + "ata_store\030\002 \001(\0132..google.cloud.discovery" + + "engine.v1beta.DataStoreB\003\340A\002\022\032\n\rdata_sto" + + "re_id\030\003 \001(\tB\003\340A\002\022#\n\033create_advanced_site" + + "_search\030\004 \001(\010\022$\n\034skip_default_schema_cre" + + "ation\030\007 \001(\010B\016\n\014cmek_options\"U\n\023GetDataSt" + + "oreRequest\022>\n\004name\030\001 \001(\tB0\340A\002\372A*\n(discov" + + "eryengine.googleapis.com/DataStore\"{\n\027Cr" + + "eateDataStoreMetadata\022/\n\013create_time\030\001 \001" + + "(\0132\032.google.protobuf.Timestamp\022/\n\013update" + + "_time\030\002 \001(\0132\032.google.protobuf.Timestamp\"" + + "\221\001\n\025ListDataStoresRequest\022A\n\006parent\030\001 \001(" + + "\tB1\340A\002\372A+\n)discoveryengine.googleapis.co" + + "m/Collection\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npage_" + + "token\030\003 \001(\t\022\016\n\006filter\030\004 \001(\t\"v\n\026ListDataS" + + "toresResponse\022C\n\013data_stores\030\001 \003(\0132..goo" + + "gle.cloud.discoveryengine.v1beta.DataSto" + + "re\022\027\n\017next_page_token\030\002 \001(\t\"X\n\026DeleteDat" + + "aStoreRequest\022>\n\004name\030\001 \001(\tB0\340A\002\372A*\n(dis" + + "coveryengine.googleapis.com/DataStore\"\222\001" + + "\n\026UpdateDataStoreRequest\022G\n\ndata_store\030\001" + + " \001(\0132..google.cloud.discoveryengine.v1be" + + "ta.DataStoreB\003\340A\002\022/\n\013update_mask\030\002 \001(\0132\032" + + ".google.protobuf.FieldMask\"{\n\027DeleteData" + + "StoreMetadata\022/\n\013create_time\030\001 \001(\0132\032.goo" + + "gle.protobuf.Timestamp\022/\n\013update_time\030\002 " + + "\001(\0132\032.google.protobuf.Timestamp2\261\016\n\020Data" + + "StoreService\022\230\003\n\017CreateDataStore\022;.googl" + + "e.cloud.discoveryengine.v1beta.CreateDat" + + "aStoreRequest\032\035.google.longrunning.Opera" + + "tion\"\250\002\312Al\n-google.cloud.discoveryengine" + + ".v1beta.DataStore\022;google.cloud.discover" + + "yengine.v1beta.CreateDataStoreMetadata\332A" + + "\037parent,data_store,data_store_id\202\323\344\223\002\220\001\"" + + "2/v1beta/{parent=projects/*/locations/*}" + + "/dataStores:\ndata_storeZN\"@/v1beta/{pare" + + "nt=projects/*/locations/*/collections/*}" + + "/dataStores:\ndata_store\022\200\002\n\014GetDataStore" + + "\0228.google.cloud.discoveryengine.v1beta.G" + + "etDataStoreRequest\032..google.cloud.discov" + + "eryengine.v1beta.DataStore\"\205\001\332A\004name\202\323\344\223" + + "\002x\0222/v1beta/{name=projects/*/locations/*" + + "/dataStores/*}ZB\022@/v1beta/{name=projects" + + "/*/locations/*/collections/*/dataStores/" + + "*}\022\223\002\n\016ListDataStores\022:.google.cloud.dis" + + "coveryengine.v1beta.ListDataStoresReques" + + "t\032;.google.cloud.discoveryengine.v1beta." + + "ListDataStoresResponse\"\207\001\332A\006parent\202\323\344\223\002x" + + "\0222/v1beta/{parent=projects/*/locations/*" + + "}/dataStoresZB\022@/v1beta/{parent=projects" + + "/*/locations/*/collections/*}/dataStores" + + "\022\314\002\n\017DeleteDataStore\022;.google.cloud.disc" + + "overyengine.v1beta.DeleteDataStoreReques" + + "t\032\035.google.longrunning.Operation\"\334\001\312AT\n\025" + + "google.protobuf.Empty\022;google.cloud.disc" + + "overyengine.v1beta.DeleteDataStoreMetada" + + "ta\332A\004name\202\323\344\223\002x*2/v1beta/{name=projects/" + + "*/locations/*/dataStores/*}ZB*@/v1beta/{" + + "name=projects/*/locations/*/collections/" + + "*/dataStores/*}\022\307\002\n\017UpdateDataStore\022;.go" + + "ogle.cloud.discoveryengine.v1beta.Update" + + "DataStoreRequest\032..google.cloud.discover" + + "yengine.v1beta.DataStore\"\306\001\332A\026data_store" + + ",update_mask\202\323\344\223\002\246\0012=/v1beta/{data_store" + + ".name=projects/*/locations/*/dataStores/" + + "*}:\ndata_storeZY2K/v1beta/{data_store.na" + + "me=projects/*/locations/*/collections/*/" + + "dataStores/*}:\ndata_store\032\317\001\312A\036discovery" + + "engine.googleapis.com\322A\252\001https://www.goo" + + "gleapis.com/auth/cloud-platform,https://" + + "www.googleapis.com/auth/discoveryengine." + + "readwrite,https://www.googleapis.com/aut" + + "h/discoveryengine.serving.readwriteB\234\002\n\'" + + "com.google.cloud.discoveryengine.v1betaB" + + "\025DataStoreServiceProtoP\001ZQcloud.google.c" + + "om/go/discoveryengine/apiv1beta/discover" + + "yenginepb;discoveryenginepb\242\002\017DISCOVERYE" + + "NGINE\252\002#Google.Cloud.DiscoveryEngine.V1B" + + "eta\312\002#Google\\Cloud\\DiscoveryEngine\\V1bet" + + "a\352\002&Google::Cloud::DiscoveryEngine::V1be" + + "tab\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -191,11 +197,14 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_cloud_discoveryengine_v1beta_CreateDataStoreRequest_descriptor, new java.lang.String[] { + "CmekConfigName", + "DisableCmek", "Parent", "DataStore", "DataStoreId", "CreateAdvancedSiteSearch", "SkipDefaultSchemaCreation", + "CmekOptions", }); internal_static_google_cloud_discoveryengine_v1beta_GetDataStoreRequest_descriptor = getDescriptor().getMessageType(1); diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/DeleteAssistantRequest.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/DeleteAssistantRequest.java new file mode 100644 index 000000000000..51fe42ce2468 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/DeleteAssistantRequest.java @@ -0,0 +1,684 @@ +/* + * 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/cloud/discoveryengine/v1beta/assistant_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.discoveryengine.v1beta; + +/** + * + * + *
            + * Request message for the
            + * [AssistantService.DeleteAssistant][google.cloud.discoveryengine.v1beta.AssistantService.DeleteAssistant]
            + * method.
            + * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.DeleteAssistantRequest} + */ +@com.google.protobuf.Generated +public final class DeleteAssistantRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.DeleteAssistantRequest) + DeleteAssistantRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "DeleteAssistantRequest"); + } + + // Use DeleteAssistantRequest.newBuilder() to construct. + private DeleteAssistantRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private DeleteAssistantRequest() { + name_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.AssistantServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_DeleteAssistantRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.AssistantServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_DeleteAssistantRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.DeleteAssistantRequest.class, + com.google.cloud.discoveryengine.v1beta.DeleteAssistantRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
            +   * Required. Resource name of
            +   * [Assistant][google.cloud.discoveryengine.v1beta.Assistant]. Format:
            +   * `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/assistants/{assistant}`
            +   *
            +   * If the caller does not have permission to delete the
            +   * [Assistant][google.cloud.discoveryengine.v1beta.Assistant], regardless of
            +   * whether or not it exists, a PERMISSION_DENIED error is returned.
            +   *
            +   * If the [Assistant][google.cloud.discoveryengine.v1beta.Assistant] to delete
            +   * does not exist, a NOT_FOUND error is returned.
            +   * 
            + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + 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(); + name_ = s; + return s; + } + } + + /** + * + * + *
            +   * Required. Resource name of
            +   * [Assistant][google.cloud.discoveryengine.v1beta.Assistant]. Format:
            +   * `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/assistants/{assistant}`
            +   *
            +   * If the caller does not have permission to delete the
            +   * [Assistant][google.cloud.discoveryengine.v1beta.Assistant], regardless of
            +   * whether or not it exists, a PERMISSION_DENIED error is returned.
            +   *
            +   * If the [Assistant][google.cloud.discoveryengine.v1beta.Assistant] to delete
            +   * does not exist, a NOT_FOUND error is returned.
            +   * 
            + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = 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 { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + 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(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + 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.discoveryengine.v1beta.DeleteAssistantRequest)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1beta.DeleteAssistantRequest other = + (com.google.cloud.discoveryengine.v1beta.DeleteAssistantRequest) obj; + + if (!getName().equals(other.getName())) 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) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1beta.DeleteAssistantRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.DeleteAssistantRequest 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.discoveryengine.v1beta.DeleteAssistantRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.DeleteAssistantRequest 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.discoveryengine.v1beta.DeleteAssistantRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.DeleteAssistantRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1beta.DeleteAssistantRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.DeleteAssistantRequest 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.discoveryengine.v1beta.DeleteAssistantRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.DeleteAssistantRequest 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.discoveryengine.v1beta.DeleteAssistantRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.DeleteAssistantRequest 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.discoveryengine.v1beta.DeleteAssistantRequest 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 the
            +   * [AssistantService.DeleteAssistant][google.cloud.discoveryengine.v1beta.AssistantService.DeleteAssistant]
            +   * method.
            +   * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.DeleteAssistantRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.DeleteAssistantRequest) + com.google.cloud.discoveryengine.v1beta.DeleteAssistantRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.AssistantServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_DeleteAssistantRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.AssistantServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_DeleteAssistantRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.DeleteAssistantRequest.class, + com.google.cloud.discoveryengine.v1beta.DeleteAssistantRequest.Builder.class); + } + + // Construct using com.google.cloud.discoveryengine.v1beta.DeleteAssistantRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1beta.AssistantServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_DeleteAssistantRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.DeleteAssistantRequest + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1beta.DeleteAssistantRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.DeleteAssistantRequest build() { + com.google.cloud.discoveryengine.v1beta.DeleteAssistantRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.DeleteAssistantRequest buildPartial() { + com.google.cloud.discoveryengine.v1beta.DeleteAssistantRequest result = + new com.google.cloud.discoveryengine.v1beta.DeleteAssistantRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.discoveryengine.v1beta.DeleteAssistantRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.discoveryengine.v1beta.DeleteAssistantRequest) { + return mergeFrom((com.google.cloud.discoveryengine.v1beta.DeleteAssistantRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.discoveryengine.v1beta.DeleteAssistantRequest other) { + if (other + == com.google.cloud.discoveryengine.v1beta.DeleteAssistantRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + + /** + * + * + *
            +     * Required. Resource name of
            +     * [Assistant][google.cloud.discoveryengine.v1beta.Assistant]. Format:
            +     * `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/assistants/{assistant}`
            +     *
            +     * If the caller does not have permission to delete the
            +     * [Assistant][google.cloud.discoveryengine.v1beta.Assistant], regardless of
            +     * whether or not it exists, a PERMISSION_DENIED error is returned.
            +     *
            +     * If the [Assistant][google.cloud.discoveryengine.v1beta.Assistant] to delete
            +     * does not exist, a NOT_FOUND error is returned.
            +     * 
            + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
            +     * Required. Resource name of
            +     * [Assistant][google.cloud.discoveryengine.v1beta.Assistant]. Format:
            +     * `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/assistants/{assistant}`
            +     *
            +     * If the caller does not have permission to delete the
            +     * [Assistant][google.cloud.discoveryengine.v1beta.Assistant], regardless of
            +     * whether or not it exists, a PERMISSION_DENIED error is returned.
            +     *
            +     * If the [Assistant][google.cloud.discoveryengine.v1beta.Assistant] to delete
            +     * does not exist, a NOT_FOUND error is returned.
            +     * 
            + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
            +     * Required. Resource name of
            +     * [Assistant][google.cloud.discoveryengine.v1beta.Assistant]. Format:
            +     * `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/assistants/{assistant}`
            +     *
            +     * If the caller does not have permission to delete the
            +     * [Assistant][google.cloud.discoveryengine.v1beta.Assistant], regardless of
            +     * whether or not it exists, a PERMISSION_DENIED error is returned.
            +     *
            +     * If the [Assistant][google.cloud.discoveryengine.v1beta.Assistant] to delete
            +     * does not exist, a NOT_FOUND error is returned.
            +     * 
            + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Required. Resource name of
            +     * [Assistant][google.cloud.discoveryengine.v1beta.Assistant]. Format:
            +     * `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/assistants/{assistant}`
            +     *
            +     * If the caller does not have permission to delete the
            +     * [Assistant][google.cloud.discoveryengine.v1beta.Assistant], regardless of
            +     * whether or not it exists, a PERMISSION_DENIED error is returned.
            +     *
            +     * If the [Assistant][google.cloud.discoveryengine.v1beta.Assistant] to delete
            +     * does not exist, a NOT_FOUND error is returned.
            +     * 
            + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
            +     * Required. Resource name of
            +     * [Assistant][google.cloud.discoveryengine.v1beta.Assistant]. Format:
            +     * `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/assistants/{assistant}`
            +     *
            +     * If the caller does not have permission to delete the
            +     * [Assistant][google.cloud.discoveryengine.v1beta.Assistant], regardless of
            +     * whether or not it exists, a PERMISSION_DENIED error is returned.
            +     *
            +     * If the [Assistant][google.cloud.discoveryengine.v1beta.Assistant] to delete
            +     * does not exist, a NOT_FOUND error is returned.
            +     * 
            + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.DeleteAssistantRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.DeleteAssistantRequest) + private static final com.google.cloud.discoveryengine.v1beta.DeleteAssistantRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.discoveryengine.v1beta.DeleteAssistantRequest(); + } + + public static com.google.cloud.discoveryengine.v1beta.DeleteAssistantRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteAssistantRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.DeleteAssistantRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/DeleteAssistantRequestOrBuilder.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/DeleteAssistantRequestOrBuilder.java new file mode 100644 index 000000000000..3e265d6554e5 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/DeleteAssistantRequestOrBuilder.java @@ -0,0 +1,76 @@ +/* + * 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/cloud/discoveryengine/v1beta/assistant_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.discoveryengine.v1beta; + +@com.google.protobuf.Generated +public interface DeleteAssistantRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.DeleteAssistantRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
            +   * Required. Resource name of
            +   * [Assistant][google.cloud.discoveryengine.v1beta.Assistant]. Format:
            +   * `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/assistants/{assistant}`
            +   *
            +   * If the caller does not have permission to delete the
            +   * [Assistant][google.cloud.discoveryengine.v1beta.Assistant], regardless of
            +   * whether or not it exists, a PERMISSION_DENIED error is returned.
            +   *
            +   * If the [Assistant][google.cloud.discoveryengine.v1beta.Assistant] to delete
            +   * does not exist, a NOT_FOUND error is returned.
            +   * 
            + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
            +   * Required. Resource name of
            +   * [Assistant][google.cloud.discoveryengine.v1beta.Assistant]. Format:
            +   * `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/assistants/{assistant}`
            +   *
            +   * If the caller does not have permission to delete the
            +   * [Assistant][google.cloud.discoveryengine.v1beta.Assistant], regardless of
            +   * whether or not it exists, a PERMISSION_DENIED error is returned.
            +   *
            +   * If the [Assistant][google.cloud.discoveryengine.v1beta.Assistant] to delete
            +   * does not exist, a NOT_FOUND error is returned.
            +   * 
            + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/DeleteCmekConfigMetadata.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/DeleteCmekConfigMetadata.java new file mode 100644 index 000000000000..d48f9aa31ae7 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/DeleteCmekConfigMetadata.java @@ -0,0 +1,997 @@ +/* + * 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/cloud/discoveryengine/v1beta/cmek_config_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.discoveryengine.v1beta; + +/** + * + * + *
            + * Metadata related to the progress of the
            + * [CmekConfigService.DeleteCmekConfig][google.cloud.discoveryengine.v1beta.CmekConfigService.DeleteCmekConfig]
            + * operation. This will be returned by the google.longrunning.Operation.metadata
            + * field.
            + * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.DeleteCmekConfigMetadata} + */ +@com.google.protobuf.Generated +public final class DeleteCmekConfigMetadata extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.DeleteCmekConfigMetadata) + DeleteCmekConfigMetadataOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "DeleteCmekConfigMetadata"); + } + + // Use DeleteCmekConfigMetadata.newBuilder() to construct. + private DeleteCmekConfigMetadata(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private DeleteCmekConfigMetadata() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.CmekConfigServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_DeleteCmekConfigMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.CmekConfigServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_DeleteCmekConfigMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.DeleteCmekConfigMetadata.class, + com.google.cloud.discoveryengine.v1beta.DeleteCmekConfigMetadata.Builder.class); + } + + private int bitField0_; + public static final int CREATE_TIME_FIELD_NUMBER = 1; + private com.google.protobuf.Timestamp createTime_; + + /** + * + * + *
            +   * Operation create time.
            +   * 
            + * + * .google.protobuf.Timestamp create_time = 1; + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
            +   * Operation create time.
            +   * 
            + * + * .google.protobuf.Timestamp create_time = 1; + * + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + /** + * + * + *
            +   * Operation create time.
            +   * 
            + * + * .google.protobuf.Timestamp create_time = 1; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp updateTime_; + + /** + * + * + *
            +   * Operation last update time. If the operation is done, this is also the
            +   * finish time.
            +   * 
            + * + * .google.protobuf.Timestamp update_time = 2; + * + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
            +   * Operation last update time. If the operation is done, this is also the
            +   * finish time.
            +   * 
            + * + * .google.protobuf.Timestamp update_time = 2; + * + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + /** + * + * + *
            +   * Operation last update time. If the operation is done, this is also the
            +   * finish time.
            +   * 
            + * + * .google.protobuf.Timestamp update_time = 2; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + 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, getCreateTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(2, getUpdateTime()); + } + 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, getCreateTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getUpdateTime()); + } + 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.discoveryengine.v1beta.DeleteCmekConfigMetadata)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1beta.DeleteCmekConfigMetadata other = + (com.google.cloud.discoveryengine.v1beta.DeleteCmekConfigMetadata) obj; + + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime().equals(other.getUpdateTime())) 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 (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1beta.DeleteCmekConfigMetadata parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.DeleteCmekConfigMetadata 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.discoveryengine.v1beta.DeleteCmekConfigMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.DeleteCmekConfigMetadata 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.discoveryengine.v1beta.DeleteCmekConfigMetadata parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.DeleteCmekConfigMetadata parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1beta.DeleteCmekConfigMetadata parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.DeleteCmekConfigMetadata 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.discoveryengine.v1beta.DeleteCmekConfigMetadata parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.DeleteCmekConfigMetadata 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.discoveryengine.v1beta.DeleteCmekConfigMetadata parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.DeleteCmekConfigMetadata 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.discoveryengine.v1beta.DeleteCmekConfigMetadata 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; + } + + /** + * + * + *
            +   * Metadata related to the progress of the
            +   * [CmekConfigService.DeleteCmekConfig][google.cloud.discoveryengine.v1beta.CmekConfigService.DeleteCmekConfig]
            +   * operation. This will be returned by the google.longrunning.Operation.metadata
            +   * field.
            +   * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.DeleteCmekConfigMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.DeleteCmekConfigMetadata) + com.google.cloud.discoveryengine.v1beta.DeleteCmekConfigMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.CmekConfigServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_DeleteCmekConfigMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.CmekConfigServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_DeleteCmekConfigMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.DeleteCmekConfigMetadata.class, + com.google.cloud.discoveryengine.v1beta.DeleteCmekConfigMetadata.Builder.class); + } + + // Construct using com.google.cloud.discoveryengine.v1beta.DeleteCmekConfigMetadata.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetCreateTimeFieldBuilder(); + internalGetUpdateTimeFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1beta.CmekConfigServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_DeleteCmekConfigMetadata_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.DeleteCmekConfigMetadata + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1beta.DeleteCmekConfigMetadata.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.DeleteCmekConfigMetadata build() { + com.google.cloud.discoveryengine.v1beta.DeleteCmekConfigMetadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.DeleteCmekConfigMetadata buildPartial() { + com.google.cloud.discoveryengine.v1beta.DeleteCmekConfigMetadata result = + new com.google.cloud.discoveryengine.v1beta.DeleteCmekConfigMetadata(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.discoveryengine.v1beta.DeleteCmekConfigMetadata result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.updateTime_ = updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.discoveryengine.v1beta.DeleteCmekConfigMetadata) { + return mergeFrom((com.google.cloud.discoveryengine.v1beta.DeleteCmekConfigMetadata) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1beta.DeleteCmekConfigMetadata other) { + if (other + == com.google.cloud.discoveryengine.v1beta.DeleteCmekConfigMetadata.getDefaultInstance()) + return this; + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage( + internalGetCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage( + internalGetUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + + /** + * + * + *
            +     * Operation create time.
            +     * 
            + * + * .google.protobuf.Timestamp create_time = 1; + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
            +     * Operation create time.
            +     * 
            + * + * .google.protobuf.Timestamp create_time = 1; + * + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
            +     * Operation create time.
            +     * 
            + * + * .google.protobuf.Timestamp create_time = 1; + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + } else { + createTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Operation create time.
            +     * 
            + * + * .google.protobuf.Timestamp create_time = 1; + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Operation create time.
            +     * 
            + * + * .google.protobuf.Timestamp create_time = 1; + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && createTime_ != null + && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); + } + if (createTime_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + + /** + * + * + *
            +     * Operation create time.
            +     * 
            + * + * .google.protobuf.Timestamp create_time = 1; + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000001); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
            +     * Operation create time.
            +     * 
            + * + * .google.protobuf.Timestamp create_time = 1; + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return internalGetCreateTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
            +     * Operation create time.
            +     * 
            + * + * .google.protobuf.Timestamp create_time = 1; + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } + + /** + * + * + *
            +     * Operation create time.
            +     * 
            + * + * .google.protobuf.Timestamp create_time = 1; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + internalGetCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp updateTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + updateTimeBuilder_; + + /** + * + * + *
            +     * Operation last update time. If the operation is done, this is also the
            +     * finish time.
            +     * 
            + * + * .google.protobuf.Timestamp update_time = 2; + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
            +     * Operation last update time. If the operation is done, this is also the
            +     * finish time.
            +     * 
            + * + * .google.protobuf.Timestamp update_time = 2; + * + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
            +     * Operation last update time. If the operation is done, this is also the
            +     * finish time.
            +     * 
            + * + * .google.protobuf.Timestamp update_time = 2; + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + } else { + updateTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Operation last update time. If the operation is done, this is also the
            +     * finish time.
            +     * 
            + * + * .google.protobuf.Timestamp update_time = 2; + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Operation last update time. If the operation is done, this is also the
            +     * finish time.
            +     * 
            + * + * .google.protobuf.Timestamp update_time = 2; + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && updateTime_ != null + && updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getUpdateTimeBuilder().mergeFrom(value); + } else { + updateTime_ = value; + } + } else { + updateTimeBuilder_.mergeFrom(value); + } + if (updateTime_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** + * + * + *
            +     * Operation last update time. If the operation is done, this is also the
            +     * finish time.
            +     * 
            + * + * .google.protobuf.Timestamp update_time = 2; + */ + public Builder clearUpdateTime() { + bitField0_ = (bitField0_ & ~0x00000002); + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
            +     * Operation last update time. If the operation is done, this is also the
            +     * finish time.
            +     * 
            + * + * .google.protobuf.Timestamp update_time = 2; + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return internalGetUpdateTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
            +     * Operation last update time. If the operation is done, this is also the
            +     * finish time.
            +     * 
            + * + * .google.protobuf.Timestamp update_time = 2; + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } + } + + /** + * + * + *
            +     * Operation last update time. If the operation is done, this is also the
            +     * finish time.
            +     * 
            + * + * .google.protobuf.Timestamp update_time = 2; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + internalGetUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getUpdateTime(), getParentForChildren(), isClean()); + updateTime_ = null; + } + return updateTimeBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.DeleteCmekConfigMetadata) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.DeleteCmekConfigMetadata) + private static final com.google.cloud.discoveryengine.v1beta.DeleteCmekConfigMetadata + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.discoveryengine.v1beta.DeleteCmekConfigMetadata(); + } + + public static com.google.cloud.discoveryengine.v1beta.DeleteCmekConfigMetadata + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteCmekConfigMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.DeleteCmekConfigMetadata + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/DeleteCmekConfigMetadataOrBuilder.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/DeleteCmekConfigMetadataOrBuilder.java new file mode 100644 index 000000000000..dec2ddb091c8 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/DeleteCmekConfigMetadataOrBuilder.java @@ -0,0 +1,105 @@ +/* + * 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/cloud/discoveryengine/v1beta/cmek_config_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.discoveryengine.v1beta; + +@com.google.protobuf.Generated +public interface DeleteCmekConfigMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.DeleteCmekConfigMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
            +   * Operation create time.
            +   * 
            + * + * .google.protobuf.Timestamp create_time = 1; + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + + /** + * + * + *
            +   * Operation create time.
            +   * 
            + * + * .google.protobuf.Timestamp create_time = 1; + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + + /** + * + * + *
            +   * Operation create time.
            +   * 
            + * + * .google.protobuf.Timestamp create_time = 1; + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
            +   * Operation last update time. If the operation is done, this is also the
            +   * finish time.
            +   * 
            + * + * .google.protobuf.Timestamp update_time = 2; + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + + /** + * + * + *
            +   * Operation last update time. If the operation is done, this is also the
            +   * finish time.
            +   * 
            + * + * .google.protobuf.Timestamp update_time = 2; + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + + /** + * + * + *
            +   * Operation last update time. If the operation is done, this is also the
            +   * finish time.
            +   * 
            + * + * .google.protobuf.Timestamp update_time = 2; + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); +} diff --git a/java-oracledatabase/proto-google-cloud-oracledatabase-v1/src/main/java/com/google/cloud/oracledatabase/v1/GetGoldengateDeploymentEnvironmentRequest.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/DeleteCmekConfigRequest.java similarity index 54% rename from java-oracledatabase/proto-google-cloud-oracledatabase-v1/src/main/java/com/google/cloud/oracledatabase/v1/GetGoldengateDeploymentEnvironmentRequest.java rename to java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/DeleteCmekConfigRequest.java index 4e0464121b18..524f6c27ba2d 100644 --- a/java-oracledatabase/proto-google-cloud-oracledatabase-v1/src/main/java/com/google/cloud/oracledatabase/v1/GetGoldengateDeploymentEnvironmentRequest.java +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/DeleteCmekConfigRequest.java @@ -15,26 +15,27 @@ */ // Generated by the protocol buffer compiler. DO NOT EDIT! // NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/oracledatabase/v1/goldengate_deployment_environment.proto +// source: google/cloud/discoveryengine/v1beta/cmek_config_service.proto // Protobuf Java Version: 4.33.2 -package com.google.cloud.oracledatabase.v1; +package com.google.cloud.discoveryengine.v1beta; /** * * *
            - * Message for getting a GoldengateDeploymentEnvironment.
            + * Request message for
            + * [CmekConfigService.DeleteCmekConfig][google.cloud.discoveryengine.v1beta.CmekConfigService.DeleteCmekConfig]
            + * method.
              * 
            * - * Protobuf type {@code google.cloud.oracledatabase.v1.GetGoldengateDeploymentEnvironmentRequest} + * Protobuf type {@code google.cloud.discoveryengine.v1beta.DeleteCmekConfigRequest} */ @com.google.protobuf.Generated -public final class GetGoldengateDeploymentEnvironmentRequest - extends com.google.protobuf.GeneratedMessage +public final class DeleteCmekConfigRequest extends com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:google.cloud.oracledatabase.v1.GetGoldengateDeploymentEnvironmentRequest) - GetGoldengateDeploymentEnvironmentRequestOrBuilder { + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.DeleteCmekConfigRequest) + DeleteCmekConfigRequestOrBuilder { private static final long serialVersionUID = 0L; static { @@ -44,33 +45,31 @@ public final class GetGoldengateDeploymentEnvironmentRequest /* minor= */ 33, /* patch= */ 2, /* suffix= */ "", - "GetGoldengateDeploymentEnvironmentRequest"); + "DeleteCmekConfigRequest"); } - // Use GetGoldengateDeploymentEnvironmentRequest.newBuilder() to construct. - private GetGoldengateDeploymentEnvironmentRequest( - com.google.protobuf.GeneratedMessage.Builder builder) { + // Use DeleteCmekConfigRequest.newBuilder() to construct. + private DeleteCmekConfigRequest(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } - private GetGoldengateDeploymentEnvironmentRequest() { + private DeleteCmekConfigRequest() { name_ = ""; } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.oracledatabase.v1.GoldengateDeploymentEnvironmentProto - .internal_static_google_cloud_oracledatabase_v1_GetGoldengateDeploymentEnvironmentRequest_descriptor; + return com.google.cloud.discoveryengine.v1beta.CmekConfigServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_DeleteCmekConfigRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.oracledatabase.v1.GoldengateDeploymentEnvironmentProto - .internal_static_google_cloud_oracledatabase_v1_GetGoldengateDeploymentEnvironmentRequest_fieldAccessorTable + return com.google.cloud.discoveryengine.v1beta.CmekConfigServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_DeleteCmekConfigRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.oracledatabase.v1.GetGoldengateDeploymentEnvironmentRequest.class, - com.google.cloud.oracledatabase.v1.GetGoldengateDeploymentEnvironmentRequest.Builder - .class); + com.google.cloud.discoveryengine.v1beta.DeleteCmekConfigRequest.class, + com.google.cloud.discoveryengine.v1beta.DeleteCmekConfigRequest.Builder.class); } public static final int NAME_FIELD_NUMBER = 1; @@ -82,8 +81,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * *
            -   * Required. Name of the resource with the format:
            -   * projects/{project}/locations/{location}/goldengateDeploymentEnvironments/{goldengate_deployment_environment}
            +   * Required. The resource name of the
            +   * [CmekConfig][google.cloud.discoveryengine.v1beta.CmekConfig] to delete,
            +   * such as
            +   * `projects/{project}/locations/{location}/cmekConfigs/{cmek_config}`.
                * 
            * * @@ -109,8 +110,10 @@ public java.lang.String getName() { * * *
            -   * Required. Name of the resource with the format:
            -   * projects/{project}/locations/{location}/goldengateDeploymentEnvironments/{goldengate_deployment_environment}
            +   * Required. The resource name of the
            +   * [CmekConfig][google.cloud.discoveryengine.v1beta.CmekConfig] to delete,
            +   * such as
            +   * `projects/{project}/locations/{location}/cmekConfigs/{cmek_config}`.
                * 
            * * @@ -171,12 +174,11 @@ public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } - if (!(obj - instanceof com.google.cloud.oracledatabase.v1.GetGoldengateDeploymentEnvironmentRequest)) { + if (!(obj instanceof com.google.cloud.discoveryengine.v1beta.DeleteCmekConfigRequest)) { return super.equals(obj); } - com.google.cloud.oracledatabase.v1.GetGoldengateDeploymentEnvironmentRequest other = - (com.google.cloud.oracledatabase.v1.GetGoldengateDeploymentEnvironmentRequest) obj; + com.google.cloud.discoveryengine.v1beta.DeleteCmekConfigRequest other = + (com.google.cloud.discoveryengine.v1beta.DeleteCmekConfigRequest) obj; if (!getName().equals(other.getName())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; @@ -197,80 +199,74 @@ public int hashCode() { return hash; } - public static com.google.cloud.oracledatabase.v1.GetGoldengateDeploymentEnvironmentRequest - parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { + public static com.google.cloud.discoveryengine.v1beta.DeleteCmekConfigRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.oracledatabase.v1.GetGoldengateDeploymentEnvironmentRequest - parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { + public static com.google.cloud.discoveryengine.v1beta.DeleteCmekConfigRequest 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.oracledatabase.v1.GetGoldengateDeploymentEnvironmentRequest - parseFrom(com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { + public static com.google.cloud.discoveryengine.v1beta.DeleteCmekConfigRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.oracledatabase.v1.GetGoldengateDeploymentEnvironmentRequest - parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { + public static com.google.cloud.discoveryengine.v1beta.DeleteCmekConfigRequest 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.oracledatabase.v1.GetGoldengateDeploymentEnvironmentRequest - parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + public static com.google.cloud.discoveryengine.v1beta.DeleteCmekConfigRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.oracledatabase.v1.GetGoldengateDeploymentEnvironmentRequest - parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { + public static com.google.cloud.discoveryengine.v1beta.DeleteCmekConfigRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.oracledatabase.v1.GetGoldengateDeploymentEnvironmentRequest - parseFrom(java.io.InputStream input) throws java.io.IOException { + public static com.google.cloud.discoveryengine.v1beta.DeleteCmekConfigRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } - public static com.google.cloud.oracledatabase.v1.GetGoldengateDeploymentEnvironmentRequest - parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { + public static com.google.cloud.discoveryengine.v1beta.DeleteCmekConfigRequest 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.oracledatabase.v1.GetGoldengateDeploymentEnvironmentRequest - parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + public static com.google.cloud.discoveryengine.v1beta.DeleteCmekConfigRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } - public static com.google.cloud.oracledatabase.v1.GetGoldengateDeploymentEnvironmentRequest - parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { + public static com.google.cloud.discoveryengine.v1beta.DeleteCmekConfigRequest 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.oracledatabase.v1.GetGoldengateDeploymentEnvironmentRequest - parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + public static com.google.cloud.discoveryengine.v1beta.DeleteCmekConfigRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } - public static com.google.cloud.oracledatabase.v1.GetGoldengateDeploymentEnvironmentRequest - parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { + public static com.google.cloud.discoveryengine.v1beta.DeleteCmekConfigRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -285,7 +281,7 @@ public static Builder newBuilder() { } public static Builder newBuilder( - com.google.cloud.oracledatabase.v1.GetGoldengateDeploymentEnvironmentRequest prototype) { + com.google.cloud.discoveryengine.v1beta.DeleteCmekConfigRequest prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @@ -304,33 +300,33 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.Builder * * *
            -   * Message for getting a GoldengateDeploymentEnvironment.
            +   * Request message for
            +   * [CmekConfigService.DeleteCmekConfig][google.cloud.discoveryengine.v1beta.CmekConfigService.DeleteCmekConfig]
            +   * method.
                * 
            * - * Protobuf type {@code google.cloud.oracledatabase.v1.GetGoldengateDeploymentEnvironmentRequest} + * Protobuf type {@code google.cloud.discoveryengine.v1beta.DeleteCmekConfigRequest} */ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.oracledatabase.v1.GetGoldengateDeploymentEnvironmentRequest) - com.google.cloud.oracledatabase.v1.GetGoldengateDeploymentEnvironmentRequestOrBuilder { + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.DeleteCmekConfigRequest) + com.google.cloud.discoveryengine.v1beta.DeleteCmekConfigRequestOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.oracledatabase.v1.GoldengateDeploymentEnvironmentProto - .internal_static_google_cloud_oracledatabase_v1_GetGoldengateDeploymentEnvironmentRequest_descriptor; + return com.google.cloud.discoveryengine.v1beta.CmekConfigServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_DeleteCmekConfigRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.oracledatabase.v1.GoldengateDeploymentEnvironmentProto - .internal_static_google_cloud_oracledatabase_v1_GetGoldengateDeploymentEnvironmentRequest_fieldAccessorTable + return com.google.cloud.discoveryengine.v1beta.CmekConfigServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_DeleteCmekConfigRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.oracledatabase.v1.GetGoldengateDeploymentEnvironmentRequest.class, - com.google.cloud.oracledatabase.v1.GetGoldengateDeploymentEnvironmentRequest.Builder - .class); + com.google.cloud.discoveryengine.v1beta.DeleteCmekConfigRequest.class, + com.google.cloud.discoveryengine.v1beta.DeleteCmekConfigRequest.Builder.class); } - // Construct using - // com.google.cloud.oracledatabase.v1.GetGoldengateDeploymentEnvironmentRequest.newBuilder() + // Construct using com.google.cloud.discoveryengine.v1beta.DeleteCmekConfigRequest.newBuilder() private Builder() {} private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { @@ -347,21 +343,19 @@ public Builder clear() { @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.oracledatabase.v1.GoldengateDeploymentEnvironmentProto - .internal_static_google_cloud_oracledatabase_v1_GetGoldengateDeploymentEnvironmentRequest_descriptor; + return com.google.cloud.discoveryengine.v1beta.CmekConfigServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_DeleteCmekConfigRequest_descriptor; } @java.lang.Override - public com.google.cloud.oracledatabase.v1.GetGoldengateDeploymentEnvironmentRequest + public com.google.cloud.discoveryengine.v1beta.DeleteCmekConfigRequest getDefaultInstanceForType() { - return com.google.cloud.oracledatabase.v1.GetGoldengateDeploymentEnvironmentRequest - .getDefaultInstance(); + return com.google.cloud.discoveryengine.v1beta.DeleteCmekConfigRequest.getDefaultInstance(); } @java.lang.Override - public com.google.cloud.oracledatabase.v1.GetGoldengateDeploymentEnvironmentRequest build() { - com.google.cloud.oracledatabase.v1.GetGoldengateDeploymentEnvironmentRequest result = - buildPartial(); + public com.google.cloud.discoveryengine.v1beta.DeleteCmekConfigRequest build() { + com.google.cloud.discoveryengine.v1beta.DeleteCmekConfigRequest result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } @@ -369,10 +363,9 @@ public com.google.cloud.oracledatabase.v1.GetGoldengateDeploymentEnvironmentRequ } @java.lang.Override - public com.google.cloud.oracledatabase.v1.GetGoldengateDeploymentEnvironmentRequest - buildPartial() { - com.google.cloud.oracledatabase.v1.GetGoldengateDeploymentEnvironmentRequest result = - new com.google.cloud.oracledatabase.v1.GetGoldengateDeploymentEnvironmentRequest(this); + public com.google.cloud.discoveryengine.v1beta.DeleteCmekConfigRequest buildPartial() { + com.google.cloud.discoveryengine.v1beta.DeleteCmekConfigRequest result = + new com.google.cloud.discoveryengine.v1beta.DeleteCmekConfigRequest(this); if (bitField0_ != 0) { buildPartial0(result); } @@ -381,7 +374,7 @@ public com.google.cloud.oracledatabase.v1.GetGoldengateDeploymentEnvironmentRequ } private void buildPartial0( - com.google.cloud.oracledatabase.v1.GetGoldengateDeploymentEnvironmentRequest result) { + com.google.cloud.discoveryengine.v1beta.DeleteCmekConfigRequest result) { int from_bitField0_ = bitField0_; if (((from_bitField0_ & 0x00000001) != 0)) { result.name_ = name_; @@ -390,10 +383,8 @@ private void buildPartial0( @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { - if (other - instanceof com.google.cloud.oracledatabase.v1.GetGoldengateDeploymentEnvironmentRequest) { - return mergeFrom( - (com.google.cloud.oracledatabase.v1.GetGoldengateDeploymentEnvironmentRequest) other); + if (other instanceof com.google.cloud.discoveryengine.v1beta.DeleteCmekConfigRequest) { + return mergeFrom((com.google.cloud.discoveryengine.v1beta.DeleteCmekConfigRequest) other); } else { super.mergeFrom(other); return this; @@ -401,10 +392,10 @@ public Builder mergeFrom(com.google.protobuf.Message other) { } public Builder mergeFrom( - com.google.cloud.oracledatabase.v1.GetGoldengateDeploymentEnvironmentRequest other) { + com.google.cloud.discoveryengine.v1beta.DeleteCmekConfigRequest other) { if (other - == com.google.cloud.oracledatabase.v1.GetGoldengateDeploymentEnvironmentRequest - .getDefaultInstance()) return this; + == com.google.cloud.discoveryengine.v1beta.DeleteCmekConfigRequest.getDefaultInstance()) + return this; if (!other.getName().isEmpty()) { name_ = other.name_; bitField0_ |= 0x00000001; @@ -467,8 +458,10 @@ public Builder mergeFrom( * * *
            -     * Required. Name of the resource with the format:
            -     * projects/{project}/locations/{location}/goldengateDeploymentEnvironments/{goldengate_deployment_environment}
            +     * Required. The resource name of the
            +     * [CmekConfig][google.cloud.discoveryengine.v1beta.CmekConfig] to delete,
            +     * such as
            +     * `projects/{project}/locations/{location}/cmekConfigs/{cmek_config}`.
                  * 
            * * @@ -493,8 +486,10 @@ public java.lang.String getName() { * * *
            -     * Required. Name of the resource with the format:
            -     * projects/{project}/locations/{location}/goldengateDeploymentEnvironments/{goldengate_deployment_environment}
            +     * Required. The resource name of the
            +     * [CmekConfig][google.cloud.discoveryengine.v1beta.CmekConfig] to delete,
            +     * such as
            +     * `projects/{project}/locations/{location}/cmekConfigs/{cmek_config}`.
                  * 
            * * @@ -519,8 +514,10 @@ public com.google.protobuf.ByteString getNameBytes() { * * *
            -     * Required. Name of the resource with the format:
            -     * projects/{project}/locations/{location}/goldengateDeploymentEnvironments/{goldengate_deployment_environment}
            +     * Required. The resource name of the
            +     * [CmekConfig][google.cloud.discoveryengine.v1beta.CmekConfig] to delete,
            +     * such as
            +     * `projects/{project}/locations/{location}/cmekConfigs/{cmek_config}`.
                  * 
            * * @@ -544,8 +541,10 @@ public Builder setName(java.lang.String value) { * * *
            -     * Required. Name of the resource with the format:
            -     * projects/{project}/locations/{location}/goldengateDeploymentEnvironments/{goldengate_deployment_environment}
            +     * Required. The resource name of the
            +     * [CmekConfig][google.cloud.discoveryengine.v1beta.CmekConfig] to delete,
            +     * such as
            +     * `projects/{project}/locations/{location}/cmekConfigs/{cmek_config}`.
                  * 
            * * @@ -565,8 +564,10 @@ public Builder clearName() { * * *
            -     * Required. Name of the resource with the format:
            -     * projects/{project}/locations/{location}/goldengateDeploymentEnvironments/{goldengate_deployment_environment}
            +     * Required. The resource name of the
            +     * [CmekConfig][google.cloud.discoveryengine.v1beta.CmekConfig] to delete,
            +     * such as
            +     * `projects/{project}/locations/{location}/cmekConfigs/{cmek_config}`.
                  * 
            * * @@ -587,58 +588,55 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { return this; } - // @@protoc_insertion_point(builder_scope:google.cloud.oracledatabase.v1.GetGoldengateDeploymentEnvironmentRequest) + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.DeleteCmekConfigRequest) } - // @@protoc_insertion_point(class_scope:google.cloud.oracledatabase.v1.GetGoldengateDeploymentEnvironmentRequest) - private static final com.google.cloud.oracledatabase.v1.GetGoldengateDeploymentEnvironmentRequest + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.DeleteCmekConfigRequest) + private static final com.google.cloud.discoveryengine.v1beta.DeleteCmekConfigRequest DEFAULT_INSTANCE; static { - DEFAULT_INSTANCE = - new com.google.cloud.oracledatabase.v1.GetGoldengateDeploymentEnvironmentRequest(); + DEFAULT_INSTANCE = new com.google.cloud.discoveryengine.v1beta.DeleteCmekConfigRequest(); } - public static com.google.cloud.oracledatabase.v1.GetGoldengateDeploymentEnvironmentRequest + public static com.google.cloud.discoveryengine.v1beta.DeleteCmekConfigRequest getDefaultInstance() { return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser - PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public GetGoldengateDeploymentEnvironmentRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException() - .setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteCmekConfigRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override - public com.google.protobuf.Parser getParserForType() { + public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override - public com.google.cloud.oracledatabase.v1.GetGoldengateDeploymentEnvironmentRequest + public com.google.cloud.discoveryengine.v1beta.DeleteCmekConfigRequest getDefaultInstanceForType() { return DEFAULT_INSTANCE; } diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/DeleteCmekConfigRequestOrBuilder.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/DeleteCmekConfigRequestOrBuilder.java new file mode 100644 index 000000000000..b6e00960ced1 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/DeleteCmekConfigRequestOrBuilder.java @@ -0,0 +1,64 @@ +/* + * 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/cloud/discoveryengine/v1beta/cmek_config_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.discoveryengine.v1beta; + +@com.google.protobuf.Generated +public interface DeleteCmekConfigRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.DeleteCmekConfigRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
            +   * Required. The resource name of the
            +   * [CmekConfig][google.cloud.discoveryengine.v1beta.CmekConfig] to delete,
            +   * such as
            +   * `projects/{project}/locations/{location}/cmekConfigs/{cmek_config}`.
            +   * 
            + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
            +   * Required. The resource name of the
            +   * [CmekConfig][google.cloud.discoveryengine.v1beta.CmekConfig] to delete,
            +   * such as
            +   * `projects/{project}/locations/{location}/cmekConfigs/{cmek_config}`.
            +   * 
            + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/DeleteIdentityMappingStoreMetadata.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/DeleteIdentityMappingStoreMetadata.java new file mode 100644 index 000000000000..7ece36f0a86d --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/DeleteIdentityMappingStoreMetadata.java @@ -0,0 +1,1014 @@ +/* + * 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/cloud/discoveryengine/v1beta/identity_mapping_store_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.discoveryengine.v1beta; + +/** + * + * + *
            + * Metadata related to the progress of the
            + * [IdentityMappingStoreService.DeleteIdentityMappingStore][google.cloud.discoveryengine.v1beta.IdentityMappingStoreService.DeleteIdentityMappingStore]
            + * operation. This will be returned by the google.longrunning.Operation.metadata
            + * field.
            + * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.DeleteIdentityMappingStoreMetadata} + */ +@com.google.protobuf.Generated +public final class DeleteIdentityMappingStoreMetadata extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.DeleteIdentityMappingStoreMetadata) + DeleteIdentityMappingStoreMetadataOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "DeleteIdentityMappingStoreMetadata"); + } + + // Use DeleteIdentityMappingStoreMetadata.newBuilder() to construct. + private DeleteIdentityMappingStoreMetadata( + com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private DeleteIdentityMappingStoreMetadata() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.IdentityMappingStoreServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_DeleteIdentityMappingStoreMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.IdentityMappingStoreServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_DeleteIdentityMappingStoreMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.DeleteIdentityMappingStoreMetadata.class, + com.google.cloud.discoveryengine.v1beta.DeleteIdentityMappingStoreMetadata.Builder + .class); + } + + private int bitField0_; + public static final int CREATE_TIME_FIELD_NUMBER = 1; + private com.google.protobuf.Timestamp createTime_; + + /** + * + * + *
            +   * Operation create time.
            +   * 
            + * + * .google.protobuf.Timestamp create_time = 1; + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
            +   * Operation create time.
            +   * 
            + * + * .google.protobuf.Timestamp create_time = 1; + * + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + /** + * + * + *
            +   * Operation create time.
            +   * 
            + * + * .google.protobuf.Timestamp create_time = 1; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp updateTime_; + + /** + * + * + *
            +   * Operation last update time. If the operation is done, this is also the
            +   * finish time.
            +   * 
            + * + * .google.protobuf.Timestamp update_time = 2; + * + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
            +   * Operation last update time. If the operation is done, this is also the
            +   * finish time.
            +   * 
            + * + * .google.protobuf.Timestamp update_time = 2; + * + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + /** + * + * + *
            +   * Operation last update time. If the operation is done, this is also the
            +   * finish time.
            +   * 
            + * + * .google.protobuf.Timestamp update_time = 2; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + 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, getCreateTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(2, getUpdateTime()); + } + 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, getCreateTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getUpdateTime()); + } + 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.discoveryengine.v1beta.DeleteIdentityMappingStoreMetadata)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1beta.DeleteIdentityMappingStoreMetadata other = + (com.google.cloud.discoveryengine.v1beta.DeleteIdentityMappingStoreMetadata) obj; + + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime().equals(other.getUpdateTime())) 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 (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1beta.DeleteIdentityMappingStoreMetadata + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.DeleteIdentityMappingStoreMetadata + 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.discoveryengine.v1beta.DeleteIdentityMappingStoreMetadata + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.DeleteIdentityMappingStoreMetadata + 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.discoveryengine.v1beta.DeleteIdentityMappingStoreMetadata + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.DeleteIdentityMappingStoreMetadata + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1beta.DeleteIdentityMappingStoreMetadata + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.DeleteIdentityMappingStoreMetadata + 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.discoveryengine.v1beta.DeleteIdentityMappingStoreMetadata + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.DeleteIdentityMappingStoreMetadata + 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.discoveryengine.v1beta.DeleteIdentityMappingStoreMetadata + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.DeleteIdentityMappingStoreMetadata + 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.discoveryengine.v1beta.DeleteIdentityMappingStoreMetadata 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; + } + + /** + * + * + *
            +   * Metadata related to the progress of the
            +   * [IdentityMappingStoreService.DeleteIdentityMappingStore][google.cloud.discoveryengine.v1beta.IdentityMappingStoreService.DeleteIdentityMappingStore]
            +   * operation. This will be returned by the google.longrunning.Operation.metadata
            +   * field.
            +   * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.DeleteIdentityMappingStoreMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.DeleteIdentityMappingStoreMetadata) + com.google.cloud.discoveryengine.v1beta.DeleteIdentityMappingStoreMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.IdentityMappingStoreServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_DeleteIdentityMappingStoreMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.IdentityMappingStoreServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_DeleteIdentityMappingStoreMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.DeleteIdentityMappingStoreMetadata.class, + com.google.cloud.discoveryengine.v1beta.DeleteIdentityMappingStoreMetadata.Builder + .class); + } + + // Construct using + // com.google.cloud.discoveryengine.v1beta.DeleteIdentityMappingStoreMetadata.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetCreateTimeFieldBuilder(); + internalGetUpdateTimeFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1beta.IdentityMappingStoreServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_DeleteIdentityMappingStoreMetadata_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.DeleteIdentityMappingStoreMetadata + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1beta.DeleteIdentityMappingStoreMetadata + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.DeleteIdentityMappingStoreMetadata build() { + com.google.cloud.discoveryengine.v1beta.DeleteIdentityMappingStoreMetadata result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.DeleteIdentityMappingStoreMetadata + buildPartial() { + com.google.cloud.discoveryengine.v1beta.DeleteIdentityMappingStoreMetadata result = + new com.google.cloud.discoveryengine.v1beta.DeleteIdentityMappingStoreMetadata(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.discoveryengine.v1beta.DeleteIdentityMappingStoreMetadata result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.updateTime_ = updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.cloud.discoveryengine.v1beta.DeleteIdentityMappingStoreMetadata) { + return mergeFrom( + (com.google.cloud.discoveryengine.v1beta.DeleteIdentityMappingStoreMetadata) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1beta.DeleteIdentityMappingStoreMetadata other) { + if (other + == com.google.cloud.discoveryengine.v1beta.DeleteIdentityMappingStoreMetadata + .getDefaultInstance()) return this; + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage( + internalGetCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage( + internalGetUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + + /** + * + * + *
            +     * Operation create time.
            +     * 
            + * + * .google.protobuf.Timestamp create_time = 1; + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
            +     * Operation create time.
            +     * 
            + * + * .google.protobuf.Timestamp create_time = 1; + * + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
            +     * Operation create time.
            +     * 
            + * + * .google.protobuf.Timestamp create_time = 1; + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + } else { + createTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Operation create time.
            +     * 
            + * + * .google.protobuf.Timestamp create_time = 1; + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Operation create time.
            +     * 
            + * + * .google.protobuf.Timestamp create_time = 1; + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && createTime_ != null + && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); + } + if (createTime_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + + /** + * + * + *
            +     * Operation create time.
            +     * 
            + * + * .google.protobuf.Timestamp create_time = 1; + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000001); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
            +     * Operation create time.
            +     * 
            + * + * .google.protobuf.Timestamp create_time = 1; + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return internalGetCreateTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
            +     * Operation create time.
            +     * 
            + * + * .google.protobuf.Timestamp create_time = 1; + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } + + /** + * + * + *
            +     * Operation create time.
            +     * 
            + * + * .google.protobuf.Timestamp create_time = 1; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + internalGetCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp updateTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + updateTimeBuilder_; + + /** + * + * + *
            +     * Operation last update time. If the operation is done, this is also the
            +     * finish time.
            +     * 
            + * + * .google.protobuf.Timestamp update_time = 2; + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
            +     * Operation last update time. If the operation is done, this is also the
            +     * finish time.
            +     * 
            + * + * .google.protobuf.Timestamp update_time = 2; + * + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
            +     * Operation last update time. If the operation is done, this is also the
            +     * finish time.
            +     * 
            + * + * .google.protobuf.Timestamp update_time = 2; + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + } else { + updateTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Operation last update time. If the operation is done, this is also the
            +     * finish time.
            +     * 
            + * + * .google.protobuf.Timestamp update_time = 2; + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Operation last update time. If the operation is done, this is also the
            +     * finish time.
            +     * 
            + * + * .google.protobuf.Timestamp update_time = 2; + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && updateTime_ != null + && updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getUpdateTimeBuilder().mergeFrom(value); + } else { + updateTime_ = value; + } + } else { + updateTimeBuilder_.mergeFrom(value); + } + if (updateTime_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** + * + * + *
            +     * Operation last update time. If the operation is done, this is also the
            +     * finish time.
            +     * 
            + * + * .google.protobuf.Timestamp update_time = 2; + */ + public Builder clearUpdateTime() { + bitField0_ = (bitField0_ & ~0x00000002); + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
            +     * Operation last update time. If the operation is done, this is also the
            +     * finish time.
            +     * 
            + * + * .google.protobuf.Timestamp update_time = 2; + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return internalGetUpdateTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
            +     * Operation last update time. If the operation is done, this is also the
            +     * finish time.
            +     * 
            + * + * .google.protobuf.Timestamp update_time = 2; + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } + } + + /** + * + * + *
            +     * Operation last update time. If the operation is done, this is also the
            +     * finish time.
            +     * 
            + * + * .google.protobuf.Timestamp update_time = 2; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + internalGetUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getUpdateTime(), getParentForChildren(), isClean()); + updateTime_ = null; + } + return updateTimeBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.DeleteIdentityMappingStoreMetadata) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.DeleteIdentityMappingStoreMetadata) + private static final com.google.cloud.discoveryengine.v1beta.DeleteIdentityMappingStoreMetadata + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.discoveryengine.v1beta.DeleteIdentityMappingStoreMetadata(); + } + + public static com.google.cloud.discoveryengine.v1beta.DeleteIdentityMappingStoreMetadata + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteIdentityMappingStoreMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.DeleteIdentityMappingStoreMetadata + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/DeleteIdentityMappingStoreMetadataOrBuilder.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/DeleteIdentityMappingStoreMetadataOrBuilder.java new file mode 100644 index 000000000000..8c1b496f06f9 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/DeleteIdentityMappingStoreMetadataOrBuilder.java @@ -0,0 +1,105 @@ +/* + * 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/cloud/discoveryengine/v1beta/identity_mapping_store_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.discoveryengine.v1beta; + +@com.google.protobuf.Generated +public interface DeleteIdentityMappingStoreMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.DeleteIdentityMappingStoreMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
            +   * Operation create time.
            +   * 
            + * + * .google.protobuf.Timestamp create_time = 1; + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + + /** + * + * + *
            +   * Operation create time.
            +   * 
            + * + * .google.protobuf.Timestamp create_time = 1; + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + + /** + * + * + *
            +   * Operation create time.
            +   * 
            + * + * .google.protobuf.Timestamp create_time = 1; + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
            +   * Operation last update time. If the operation is done, this is also the
            +   * finish time.
            +   * 
            + * + * .google.protobuf.Timestamp update_time = 2; + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + + /** + * + * + *
            +   * Operation last update time. If the operation is done, this is also the
            +   * finish time.
            +   * 
            + * + * .google.protobuf.Timestamp update_time = 2; + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + + /** + * + * + *
            +   * Operation last update time. If the operation is done, this is also the
            +   * finish time.
            +   * 
            + * + * .google.protobuf.Timestamp update_time = 2; + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); +} diff --git a/java-oracledatabase/proto-google-cloud-oracledatabase-v1/src/main/java/com/google/cloud/oracledatabase/v1/GetGoldengateDeploymentVersionRequest.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/DeleteIdentityMappingStoreRequest.java similarity index 66% rename from java-oracledatabase/proto-google-cloud-oracledatabase-v1/src/main/java/com/google/cloud/oracledatabase/v1/GetGoldengateDeploymentVersionRequest.java rename to java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/DeleteIdentityMappingStoreRequest.java index 5208c44c40fb..3c83ce26df68 100644 --- a/java-oracledatabase/proto-google-cloud-oracledatabase-v1/src/main/java/com/google/cloud/oracledatabase/v1/GetGoldengateDeploymentVersionRequest.java +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/DeleteIdentityMappingStoreRequest.java @@ -15,26 +15,26 @@ */ // Generated by the protocol buffer compiler. DO NOT EDIT! // NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/oracledatabase/v1/goldengate_deployment_version.proto +// source: google/cloud/discoveryengine/v1beta/identity_mapping_store_service.proto // Protobuf Java Version: 4.33.2 -package com.google.cloud.oracledatabase.v1; +package com.google.cloud.discoveryengine.v1beta; /** * * *
            - * Message for getting a GoldengateDeploymentVersion.
            + * Request message for
            + * [IdentityMappingStoreService.DeleteIdentityMappingStore][google.cloud.discoveryengine.v1beta.IdentityMappingStoreService.DeleteIdentityMappingStore]
              * 
            * - * Protobuf type {@code google.cloud.oracledatabase.v1.GetGoldengateDeploymentVersionRequest} + * Protobuf type {@code google.cloud.discoveryengine.v1beta.DeleteIdentityMappingStoreRequest} */ @com.google.protobuf.Generated -public final class GetGoldengateDeploymentVersionRequest - extends com.google.protobuf.GeneratedMessage +public final class DeleteIdentityMappingStoreRequest extends com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:google.cloud.oracledatabase.v1.GetGoldengateDeploymentVersionRequest) - GetGoldengateDeploymentVersionRequestOrBuilder { + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.DeleteIdentityMappingStoreRequest) + DeleteIdentityMappingStoreRequestOrBuilder { private static final long serialVersionUID = 0L; static { @@ -44,32 +44,33 @@ public final class GetGoldengateDeploymentVersionRequest /* minor= */ 33, /* patch= */ 2, /* suffix= */ "", - "GetGoldengateDeploymentVersionRequest"); + "DeleteIdentityMappingStoreRequest"); } - // Use GetGoldengateDeploymentVersionRequest.newBuilder() to construct. - private GetGoldengateDeploymentVersionRequest( + // Use DeleteIdentityMappingStoreRequest.newBuilder() to construct. + private DeleteIdentityMappingStoreRequest( com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } - private GetGoldengateDeploymentVersionRequest() { + private DeleteIdentityMappingStoreRequest() { name_ = ""; } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.oracledatabase.v1.GoldengateDeploymentVersionProto - .internal_static_google_cloud_oracledatabase_v1_GetGoldengateDeploymentVersionRequest_descriptor; + return com.google.cloud.discoveryengine.v1beta.IdentityMappingStoreServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_DeleteIdentityMappingStoreRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.oracledatabase.v1.GoldengateDeploymentVersionProto - .internal_static_google_cloud_oracledatabase_v1_GetGoldengateDeploymentVersionRequest_fieldAccessorTable + return com.google.cloud.discoveryengine.v1beta.IdentityMappingStoreServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_DeleteIdentityMappingStoreRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.oracledatabase.v1.GetGoldengateDeploymentVersionRequest.class, - com.google.cloud.oracledatabase.v1.GetGoldengateDeploymentVersionRequest.Builder.class); + com.google.cloud.discoveryengine.v1beta.DeleteIdentityMappingStoreRequest.class, + com.google.cloud.discoveryengine.v1beta.DeleteIdentityMappingStoreRequest.Builder + .class); } public static final int NAME_FIELD_NUMBER = 1; @@ -81,9 +82,9 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * *
            -   * Required. The name of the GoldengateDeploymentVersion to retrieve.
            +   * Required. The name of the Identity Mapping Store to delete.
                * Format:
            -   * projects/{project}/locations/{location}/goldengateDeploymentVersions/{goldengate_deployment_version}
            +   * `projects/{project}/locations/{location}/identityMappingStores/{identityMappingStore}`
                * 
            * * @@ -109,9 +110,9 @@ public java.lang.String getName() { * * *
            -   * Required. The name of the GoldengateDeploymentVersion to retrieve.
            +   * Required. The name of the Identity Mapping Store to delete.
                * Format:
            -   * projects/{project}/locations/{location}/goldengateDeploymentVersions/{goldengate_deployment_version}
            +   * `projects/{project}/locations/{location}/identityMappingStores/{identityMappingStore}`
                * 
            * * @@ -173,11 +174,11 @@ public boolean equals(final java.lang.Object obj) { return true; } if (!(obj - instanceof com.google.cloud.oracledatabase.v1.GetGoldengateDeploymentVersionRequest)) { + instanceof com.google.cloud.discoveryengine.v1beta.DeleteIdentityMappingStoreRequest)) { return super.equals(obj); } - com.google.cloud.oracledatabase.v1.GetGoldengateDeploymentVersionRequest other = - (com.google.cloud.oracledatabase.v1.GetGoldengateDeploymentVersionRequest) obj; + com.google.cloud.discoveryengine.v1beta.DeleteIdentityMappingStoreRequest other = + (com.google.cloud.discoveryengine.v1beta.DeleteIdentityMappingStoreRequest) obj; if (!getName().equals(other.getName())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; @@ -198,59 +199,59 @@ public int hashCode() { return hash; } - public static com.google.cloud.oracledatabase.v1.GetGoldengateDeploymentVersionRequest parseFrom( + public static com.google.cloud.discoveryengine.v1beta.DeleteIdentityMappingStoreRequest parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.oracledatabase.v1.GetGoldengateDeploymentVersionRequest parseFrom( + public static com.google.cloud.discoveryengine.v1beta.DeleteIdentityMappingStoreRequest 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.oracledatabase.v1.GetGoldengateDeploymentVersionRequest parseFrom( + public static com.google.cloud.discoveryengine.v1beta.DeleteIdentityMappingStoreRequest parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.oracledatabase.v1.GetGoldengateDeploymentVersionRequest parseFrom( + public static com.google.cloud.discoveryengine.v1beta.DeleteIdentityMappingStoreRequest 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.oracledatabase.v1.GetGoldengateDeploymentVersionRequest parseFrom( + public static com.google.cloud.discoveryengine.v1beta.DeleteIdentityMappingStoreRequest parseFrom( byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.oracledatabase.v1.GetGoldengateDeploymentVersionRequest parseFrom( + public static com.google.cloud.discoveryengine.v1beta.DeleteIdentityMappingStoreRequest parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.oracledatabase.v1.GetGoldengateDeploymentVersionRequest parseFrom( + public static com.google.cloud.discoveryengine.v1beta.DeleteIdentityMappingStoreRequest parseFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } - public static com.google.cloud.oracledatabase.v1.GetGoldengateDeploymentVersionRequest parseFrom( + public static com.google.cloud.discoveryengine.v1beta.DeleteIdentityMappingStoreRequest 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.oracledatabase.v1.GetGoldengateDeploymentVersionRequest + public static com.google.cloud.discoveryengine.v1beta.DeleteIdentityMappingStoreRequest parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } - public static com.google.cloud.oracledatabase.v1.GetGoldengateDeploymentVersionRequest + public static com.google.cloud.discoveryengine.v1beta.DeleteIdentityMappingStoreRequest parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -258,12 +259,12 @@ public static com.google.cloud.oracledatabase.v1.GetGoldengateDeploymentVersionR PARSER, input, extensionRegistry); } - public static com.google.cloud.oracledatabase.v1.GetGoldengateDeploymentVersionRequest parseFrom( + public static com.google.cloud.discoveryengine.v1beta.DeleteIdentityMappingStoreRequest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } - public static com.google.cloud.oracledatabase.v1.GetGoldengateDeploymentVersionRequest parseFrom( + public static com.google.cloud.discoveryengine.v1beta.DeleteIdentityMappingStoreRequest parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -281,7 +282,7 @@ public static Builder newBuilder() { } public static Builder newBuilder( - com.google.cloud.oracledatabase.v1.GetGoldengateDeploymentVersionRequest prototype) { + com.google.cloud.discoveryengine.v1beta.DeleteIdentityMappingStoreRequest prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @@ -300,33 +301,34 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.Builder * * *
            -   * Message for getting a GoldengateDeploymentVersion.
            +   * Request message for
            +   * [IdentityMappingStoreService.DeleteIdentityMappingStore][google.cloud.discoveryengine.v1beta.IdentityMappingStoreService.DeleteIdentityMappingStore]
                * 
            * - * Protobuf type {@code google.cloud.oracledatabase.v1.GetGoldengateDeploymentVersionRequest} + * Protobuf type {@code google.cloud.discoveryengine.v1beta.DeleteIdentityMappingStoreRequest} */ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.oracledatabase.v1.GetGoldengateDeploymentVersionRequest) - com.google.cloud.oracledatabase.v1.GetGoldengateDeploymentVersionRequestOrBuilder { + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.DeleteIdentityMappingStoreRequest) + com.google.cloud.discoveryengine.v1beta.DeleteIdentityMappingStoreRequestOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.oracledatabase.v1.GoldengateDeploymentVersionProto - .internal_static_google_cloud_oracledatabase_v1_GetGoldengateDeploymentVersionRequest_descriptor; + return com.google.cloud.discoveryengine.v1beta.IdentityMappingStoreServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_DeleteIdentityMappingStoreRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.oracledatabase.v1.GoldengateDeploymentVersionProto - .internal_static_google_cloud_oracledatabase_v1_GetGoldengateDeploymentVersionRequest_fieldAccessorTable + return com.google.cloud.discoveryengine.v1beta.IdentityMappingStoreServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_DeleteIdentityMappingStoreRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.oracledatabase.v1.GetGoldengateDeploymentVersionRequest.class, - com.google.cloud.oracledatabase.v1.GetGoldengateDeploymentVersionRequest.Builder + com.google.cloud.discoveryengine.v1beta.DeleteIdentityMappingStoreRequest.class, + com.google.cloud.discoveryengine.v1beta.DeleteIdentityMappingStoreRequest.Builder .class); } // Construct using - // com.google.cloud.oracledatabase.v1.GetGoldengateDeploymentVersionRequest.newBuilder() + // com.google.cloud.discoveryengine.v1beta.DeleteIdentityMappingStoreRequest.newBuilder() private Builder() {} private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { @@ -343,20 +345,20 @@ public Builder clear() { @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.oracledatabase.v1.GoldengateDeploymentVersionProto - .internal_static_google_cloud_oracledatabase_v1_GetGoldengateDeploymentVersionRequest_descriptor; + return com.google.cloud.discoveryengine.v1beta.IdentityMappingStoreServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_DeleteIdentityMappingStoreRequest_descriptor; } @java.lang.Override - public com.google.cloud.oracledatabase.v1.GetGoldengateDeploymentVersionRequest + public com.google.cloud.discoveryengine.v1beta.DeleteIdentityMappingStoreRequest getDefaultInstanceForType() { - return com.google.cloud.oracledatabase.v1.GetGoldengateDeploymentVersionRequest + return com.google.cloud.discoveryengine.v1beta.DeleteIdentityMappingStoreRequest .getDefaultInstance(); } @java.lang.Override - public com.google.cloud.oracledatabase.v1.GetGoldengateDeploymentVersionRequest build() { - com.google.cloud.oracledatabase.v1.GetGoldengateDeploymentVersionRequest result = + public com.google.cloud.discoveryengine.v1beta.DeleteIdentityMappingStoreRequest build() { + com.google.cloud.discoveryengine.v1beta.DeleteIdentityMappingStoreRequest result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); @@ -365,9 +367,10 @@ public com.google.cloud.oracledatabase.v1.GetGoldengateDeploymentVersionRequest } @java.lang.Override - public com.google.cloud.oracledatabase.v1.GetGoldengateDeploymentVersionRequest buildPartial() { - com.google.cloud.oracledatabase.v1.GetGoldengateDeploymentVersionRequest result = - new com.google.cloud.oracledatabase.v1.GetGoldengateDeploymentVersionRequest(this); + public com.google.cloud.discoveryengine.v1beta.DeleteIdentityMappingStoreRequest + buildPartial() { + com.google.cloud.discoveryengine.v1beta.DeleteIdentityMappingStoreRequest result = + new com.google.cloud.discoveryengine.v1beta.DeleteIdentityMappingStoreRequest(this); if (bitField0_ != 0) { buildPartial0(result); } @@ -376,7 +379,7 @@ public com.google.cloud.oracledatabase.v1.GetGoldengateDeploymentVersionRequest } private void buildPartial0( - com.google.cloud.oracledatabase.v1.GetGoldengateDeploymentVersionRequest result) { + com.google.cloud.discoveryengine.v1beta.DeleteIdentityMappingStoreRequest result) { int from_bitField0_ = bitField0_; if (((from_bitField0_ & 0x00000001) != 0)) { result.name_ = name_; @@ -386,9 +389,9 @@ private void buildPartial0( @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other - instanceof com.google.cloud.oracledatabase.v1.GetGoldengateDeploymentVersionRequest) { + instanceof com.google.cloud.discoveryengine.v1beta.DeleteIdentityMappingStoreRequest) { return mergeFrom( - (com.google.cloud.oracledatabase.v1.GetGoldengateDeploymentVersionRequest) other); + (com.google.cloud.discoveryengine.v1beta.DeleteIdentityMappingStoreRequest) other); } else { super.mergeFrom(other); return this; @@ -396,9 +399,9 @@ public Builder mergeFrom(com.google.protobuf.Message other) { } public Builder mergeFrom( - com.google.cloud.oracledatabase.v1.GetGoldengateDeploymentVersionRequest other) { + com.google.cloud.discoveryengine.v1beta.DeleteIdentityMappingStoreRequest other) { if (other - == com.google.cloud.oracledatabase.v1.GetGoldengateDeploymentVersionRequest + == com.google.cloud.discoveryengine.v1beta.DeleteIdentityMappingStoreRequest .getDefaultInstance()) return this; if (!other.getName().isEmpty()) { name_ = other.name_; @@ -462,9 +465,9 @@ public Builder mergeFrom( * * *
            -     * Required. The name of the GoldengateDeploymentVersion to retrieve.
            +     * Required. The name of the Identity Mapping Store to delete.
                  * Format:
            -     * projects/{project}/locations/{location}/goldengateDeploymentVersions/{goldengate_deployment_version}
            +     * `projects/{project}/locations/{location}/identityMappingStores/{identityMappingStore}`
                  * 
            * * @@ -489,9 +492,9 @@ public java.lang.String getName() { * * *
            -     * Required. The name of the GoldengateDeploymentVersion to retrieve.
            +     * Required. The name of the Identity Mapping Store to delete.
                  * Format:
            -     * projects/{project}/locations/{location}/goldengateDeploymentVersions/{goldengate_deployment_version}
            +     * `projects/{project}/locations/{location}/identityMappingStores/{identityMappingStore}`
                  * 
            * * @@ -516,9 +519,9 @@ public com.google.protobuf.ByteString getNameBytes() { * * *
            -     * Required. The name of the GoldengateDeploymentVersion to retrieve.
            +     * Required. The name of the Identity Mapping Store to delete.
                  * Format:
            -     * projects/{project}/locations/{location}/goldengateDeploymentVersions/{goldengate_deployment_version}
            +     * `projects/{project}/locations/{location}/identityMappingStores/{identityMappingStore}`
                  * 
            * * @@ -542,9 +545,9 @@ public Builder setName(java.lang.String value) { * * *
            -     * Required. The name of the GoldengateDeploymentVersion to retrieve.
            +     * Required. The name of the Identity Mapping Store to delete.
                  * Format:
            -     * projects/{project}/locations/{location}/goldengateDeploymentVersions/{goldengate_deployment_version}
            +     * `projects/{project}/locations/{location}/identityMappingStores/{identityMappingStore}`
                  * 
            * * @@ -564,9 +567,9 @@ public Builder clearName() { * * *
            -     * Required. The name of the GoldengateDeploymentVersion to retrieve.
            +     * Required. The name of the Identity Mapping Store to delete.
                  * Format:
            -     * projects/{project}/locations/{location}/goldengateDeploymentVersions/{goldengate_deployment_version}
            +     * `projects/{project}/locations/{location}/identityMappingStores/{identityMappingStore}`
                  * 
            * * @@ -587,27 +590,27 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { return this; } - // @@protoc_insertion_point(builder_scope:google.cloud.oracledatabase.v1.GetGoldengateDeploymentVersionRequest) + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.DeleteIdentityMappingStoreRequest) } - // @@protoc_insertion_point(class_scope:google.cloud.oracledatabase.v1.GetGoldengateDeploymentVersionRequest) - private static final com.google.cloud.oracledatabase.v1.GetGoldengateDeploymentVersionRequest + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.DeleteIdentityMappingStoreRequest) + private static final com.google.cloud.discoveryengine.v1beta.DeleteIdentityMappingStoreRequest DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = - new com.google.cloud.oracledatabase.v1.GetGoldengateDeploymentVersionRequest(); + new com.google.cloud.discoveryengine.v1beta.DeleteIdentityMappingStoreRequest(); } - public static com.google.cloud.oracledatabase.v1.GetGoldengateDeploymentVersionRequest + public static com.google.cloud.discoveryengine.v1beta.DeleteIdentityMappingStoreRequest getDefaultInstance() { return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { @java.lang.Override - public GetGoldengateDeploymentVersionRequest parsePartialFrom( + public DeleteIdentityMappingStoreRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { @@ -626,17 +629,17 @@ public GetGoldengateDeploymentVersionRequest parsePartialFrom( } }; - public static com.google.protobuf.Parser parser() { + public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override - public com.google.protobuf.Parser getParserForType() { + public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override - public com.google.cloud.oracledatabase.v1.GetGoldengateDeploymentVersionRequest + public com.google.cloud.discoveryengine.v1beta.DeleteIdentityMappingStoreRequest getDefaultInstanceForType() { return DEFAULT_INSTANCE; } diff --git a/java-oracledatabase/proto-google-cloud-oracledatabase-v1/src/main/java/com/google/cloud/oracledatabase/v1/GetGoldengateDeploymentTypeRequestOrBuilder.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/DeleteIdentityMappingStoreRequestOrBuilder.java similarity index 67% rename from java-oracledatabase/proto-google-cloud-oracledatabase-v1/src/main/java/com/google/cloud/oracledatabase/v1/GetGoldengateDeploymentTypeRequestOrBuilder.java rename to java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/DeleteIdentityMappingStoreRequestOrBuilder.java index 38802753b66e..280f91ae6b91 100644 --- a/java-oracledatabase/proto-google-cloud-oracledatabase-v1/src/main/java/com/google/cloud/oracledatabase/v1/GetGoldengateDeploymentTypeRequestOrBuilder.java +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/DeleteIdentityMappingStoreRequestOrBuilder.java @@ -15,24 +15,24 @@ */ // Generated by the protocol buffer compiler. DO NOT EDIT! // NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/oracledatabase/v1/goldengate_deployment_type.proto +// source: google/cloud/discoveryengine/v1beta/identity_mapping_store_service.proto // Protobuf Java Version: 4.33.2 -package com.google.cloud.oracledatabase.v1; +package com.google.cloud.discoveryengine.v1beta; @com.google.protobuf.Generated -public interface GetGoldengateDeploymentTypeRequestOrBuilder +public interface DeleteIdentityMappingStoreRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.oracledatabase.v1.GetGoldengateDeploymentTypeRequest) + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.DeleteIdentityMappingStoreRequest) com.google.protobuf.MessageOrBuilder { /** * * *
            -   * Required. The name of the GoldengateDeploymentType to retrieve.
            +   * Required. The name of the Identity Mapping Store to delete.
                * Format:
            -   * projects/{project}/locations/{location}/goldengateDeploymentTypes/{goldengate_deployment_type}
            +   * `projects/{project}/locations/{location}/identityMappingStores/{identityMappingStore}`
                * 
            * * @@ -47,9 +47,9 @@ public interface GetGoldengateDeploymentTypeRequestOrBuilder * * *
            -   * Required. The name of the GoldengateDeploymentType to retrieve.
            +   * Required. The name of the Identity Mapping Store to delete.
                * Format:
            -   * projects/{project}/locations/{location}/goldengateDeploymentTypes/{goldengate_deployment_type}
            +   * `projects/{project}/locations/{location}/identityMappingStores/{identityMappingStore}`
                * 
            * * diff --git a/java-oracledatabase/proto-google-cloud-oracledatabase-v1/src/main/java/com/google/cloud/oracledatabase/v1/GetGoldengateConnectionTypeRequest.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/DeleteServingConfigRequest.java similarity index 67% rename from java-oracledatabase/proto-google-cloud-oracledatabase-v1/src/main/java/com/google/cloud/oracledatabase/v1/GetGoldengateConnectionTypeRequest.java rename to java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/DeleteServingConfigRequest.java index 784c019a90c3..f846af5a7b5e 100644 --- a/java-oracledatabase/proto-google-cloud-oracledatabase-v1/src/main/java/com/google/cloud/oracledatabase/v1/GetGoldengateConnectionTypeRequest.java +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/DeleteServingConfigRequest.java @@ -15,25 +15,25 @@ */ // Generated by the protocol buffer compiler. DO NOT EDIT! // NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/oracledatabase/v1/goldengate_connection_type.proto +// source: google/cloud/discoveryengine/v1beta/serving_config_service.proto // Protobuf Java Version: 4.33.2 -package com.google.cloud.oracledatabase.v1; +package com.google.cloud.discoveryengine.v1beta; /** * * *
            - * Message for getting a GoldengateConnectionType.
            + * Request for DeleteServingConfig method.
              * 
            * - * Protobuf type {@code google.cloud.oracledatabase.v1.GetGoldengateConnectionTypeRequest} + * Protobuf type {@code google.cloud.discoveryengine.v1beta.DeleteServingConfigRequest} */ @com.google.protobuf.Generated -public final class GetGoldengateConnectionTypeRequest extends com.google.protobuf.GeneratedMessage +public final class DeleteServingConfigRequest extends com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:google.cloud.oracledatabase.v1.GetGoldengateConnectionTypeRequest) - GetGoldengateConnectionTypeRequestOrBuilder { + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.DeleteServingConfigRequest) + DeleteServingConfigRequestOrBuilder { private static final long serialVersionUID = 0L; static { @@ -43,32 +43,31 @@ public final class GetGoldengateConnectionTypeRequest extends com.google.protobu /* minor= */ 33, /* patch= */ 2, /* suffix= */ "", - "GetGoldengateConnectionTypeRequest"); + "DeleteServingConfigRequest"); } - // Use GetGoldengateConnectionTypeRequest.newBuilder() to construct. - private GetGoldengateConnectionTypeRequest( - com.google.protobuf.GeneratedMessage.Builder builder) { + // Use DeleteServingConfigRequest.newBuilder() to construct. + private DeleteServingConfigRequest(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } - private GetGoldengateConnectionTypeRequest() { + private DeleteServingConfigRequest() { name_ = ""; } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.oracledatabase.v1.GoldengateConnectionTypeProto - .internal_static_google_cloud_oracledatabase_v1_GetGoldengateConnectionTypeRequest_descriptor; + return com.google.cloud.discoveryengine.v1beta.ServingConfigServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_DeleteServingConfigRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.oracledatabase.v1.GoldengateConnectionTypeProto - .internal_static_google_cloud_oracledatabase_v1_GetGoldengateConnectionTypeRequest_fieldAccessorTable + return com.google.cloud.discoveryengine.v1beta.ServingConfigServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_DeleteServingConfigRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.oracledatabase.v1.GetGoldengateConnectionTypeRequest.class, - com.google.cloud.oracledatabase.v1.GetGoldengateConnectionTypeRequest.Builder.class); + com.google.cloud.discoveryengine.v1beta.DeleteServingConfigRequest.class, + com.google.cloud.discoveryengine.v1beta.DeleteServingConfigRequest.Builder.class); } public static final int NAME_FIELD_NUMBER = 1; @@ -80,8 +79,8 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * *
            -   * Required. Name of the resource in the format:
            -   * projects/{project}/locations/{location}/goldengateConnectionTypes/{goldengate_connection_type}
            +   * Required. The resource name of the ServingConfig to delete. Format:
            +   * `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/servingConfigs/{serving_config_id}`
                * 
            * * @@ -107,8 +106,8 @@ public java.lang.String getName() { * * *
            -   * Required. Name of the resource in the format:
            -   * projects/{project}/locations/{location}/goldengateConnectionTypes/{goldengate_connection_type}
            +   * Required. The resource name of the ServingConfig to delete. Format:
            +   * `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/servingConfigs/{serving_config_id}`
                * 
            * * @@ -169,11 +168,11 @@ public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } - if (!(obj instanceof com.google.cloud.oracledatabase.v1.GetGoldengateConnectionTypeRequest)) { + if (!(obj instanceof com.google.cloud.discoveryengine.v1beta.DeleteServingConfigRequest)) { return super.equals(obj); } - com.google.cloud.oracledatabase.v1.GetGoldengateConnectionTypeRequest other = - (com.google.cloud.oracledatabase.v1.GetGoldengateConnectionTypeRequest) obj; + com.google.cloud.discoveryengine.v1beta.DeleteServingConfigRequest other = + (com.google.cloud.discoveryengine.v1beta.DeleteServingConfigRequest) obj; if (!getName().equals(other.getName())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; @@ -194,59 +193,59 @@ public int hashCode() { return hash; } - public static com.google.cloud.oracledatabase.v1.GetGoldengateConnectionTypeRequest parseFrom( + public static com.google.cloud.discoveryengine.v1beta.DeleteServingConfigRequest parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.oracledatabase.v1.GetGoldengateConnectionTypeRequest parseFrom( + public static com.google.cloud.discoveryengine.v1beta.DeleteServingConfigRequest 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.oracledatabase.v1.GetGoldengateConnectionTypeRequest parseFrom( + public static com.google.cloud.discoveryengine.v1beta.DeleteServingConfigRequest parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.oracledatabase.v1.GetGoldengateConnectionTypeRequest parseFrom( + public static com.google.cloud.discoveryengine.v1beta.DeleteServingConfigRequest 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.oracledatabase.v1.GetGoldengateConnectionTypeRequest parseFrom( + public static com.google.cloud.discoveryengine.v1beta.DeleteServingConfigRequest parseFrom( byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.oracledatabase.v1.GetGoldengateConnectionTypeRequest parseFrom( + public static com.google.cloud.discoveryengine.v1beta.DeleteServingConfigRequest parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.oracledatabase.v1.GetGoldengateConnectionTypeRequest parseFrom( + public static com.google.cloud.discoveryengine.v1beta.DeleteServingConfigRequest parseFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } - public static com.google.cloud.oracledatabase.v1.GetGoldengateConnectionTypeRequest parseFrom( + public static com.google.cloud.discoveryengine.v1beta.DeleteServingConfigRequest 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.oracledatabase.v1.GetGoldengateConnectionTypeRequest + public static com.google.cloud.discoveryengine.v1beta.DeleteServingConfigRequest parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } - public static com.google.cloud.oracledatabase.v1.GetGoldengateConnectionTypeRequest + public static com.google.cloud.discoveryengine.v1beta.DeleteServingConfigRequest parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -254,12 +253,12 @@ public static com.google.cloud.oracledatabase.v1.GetGoldengateConnectionTypeRequ PARSER, input, extensionRegistry); } - public static com.google.cloud.oracledatabase.v1.GetGoldengateConnectionTypeRequest parseFrom( + public static com.google.cloud.discoveryengine.v1beta.DeleteServingConfigRequest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } - public static com.google.cloud.oracledatabase.v1.GetGoldengateConnectionTypeRequest parseFrom( + public static com.google.cloud.discoveryengine.v1beta.DeleteServingConfigRequest parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -277,7 +276,7 @@ public static Builder newBuilder() { } public static Builder newBuilder( - com.google.cloud.oracledatabase.v1.GetGoldengateConnectionTypeRequest prototype) { + com.google.cloud.discoveryengine.v1beta.DeleteServingConfigRequest prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @@ -296,32 +295,32 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.Builder * * *
            -   * Message for getting a GoldengateConnectionType.
            +   * Request for DeleteServingConfig method.
                * 
            * - * Protobuf type {@code google.cloud.oracledatabase.v1.GetGoldengateConnectionTypeRequest} + * Protobuf type {@code google.cloud.discoveryengine.v1beta.DeleteServingConfigRequest} */ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.oracledatabase.v1.GetGoldengateConnectionTypeRequest) - com.google.cloud.oracledatabase.v1.GetGoldengateConnectionTypeRequestOrBuilder { + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.DeleteServingConfigRequest) + com.google.cloud.discoveryengine.v1beta.DeleteServingConfigRequestOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.oracledatabase.v1.GoldengateConnectionTypeProto - .internal_static_google_cloud_oracledatabase_v1_GetGoldengateConnectionTypeRequest_descriptor; + return com.google.cloud.discoveryengine.v1beta.ServingConfigServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_DeleteServingConfigRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.oracledatabase.v1.GoldengateConnectionTypeProto - .internal_static_google_cloud_oracledatabase_v1_GetGoldengateConnectionTypeRequest_fieldAccessorTable + return com.google.cloud.discoveryengine.v1beta.ServingConfigServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_DeleteServingConfigRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.oracledatabase.v1.GetGoldengateConnectionTypeRequest.class, - com.google.cloud.oracledatabase.v1.GetGoldengateConnectionTypeRequest.Builder.class); + com.google.cloud.discoveryengine.v1beta.DeleteServingConfigRequest.class, + com.google.cloud.discoveryengine.v1beta.DeleteServingConfigRequest.Builder.class); } // Construct using - // com.google.cloud.oracledatabase.v1.GetGoldengateConnectionTypeRequest.newBuilder() + // com.google.cloud.discoveryengine.v1beta.DeleteServingConfigRequest.newBuilder() private Builder() {} private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { @@ -338,20 +337,20 @@ public Builder clear() { @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.oracledatabase.v1.GoldengateConnectionTypeProto - .internal_static_google_cloud_oracledatabase_v1_GetGoldengateConnectionTypeRequest_descriptor; + return com.google.cloud.discoveryengine.v1beta.ServingConfigServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_DeleteServingConfigRequest_descriptor; } @java.lang.Override - public com.google.cloud.oracledatabase.v1.GetGoldengateConnectionTypeRequest + public com.google.cloud.discoveryengine.v1beta.DeleteServingConfigRequest getDefaultInstanceForType() { - return com.google.cloud.oracledatabase.v1.GetGoldengateConnectionTypeRequest + return com.google.cloud.discoveryengine.v1beta.DeleteServingConfigRequest .getDefaultInstance(); } @java.lang.Override - public com.google.cloud.oracledatabase.v1.GetGoldengateConnectionTypeRequest build() { - com.google.cloud.oracledatabase.v1.GetGoldengateConnectionTypeRequest result = buildPartial(); + public com.google.cloud.discoveryengine.v1beta.DeleteServingConfigRequest build() { + com.google.cloud.discoveryengine.v1beta.DeleteServingConfigRequest result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } @@ -359,9 +358,9 @@ public com.google.cloud.oracledatabase.v1.GetGoldengateConnectionTypeRequest bui } @java.lang.Override - public com.google.cloud.oracledatabase.v1.GetGoldengateConnectionTypeRequest buildPartial() { - com.google.cloud.oracledatabase.v1.GetGoldengateConnectionTypeRequest result = - new com.google.cloud.oracledatabase.v1.GetGoldengateConnectionTypeRequest(this); + public com.google.cloud.discoveryengine.v1beta.DeleteServingConfigRequest buildPartial() { + com.google.cloud.discoveryengine.v1beta.DeleteServingConfigRequest result = + new com.google.cloud.discoveryengine.v1beta.DeleteServingConfigRequest(this); if (bitField0_ != 0) { buildPartial0(result); } @@ -370,7 +369,7 @@ public com.google.cloud.oracledatabase.v1.GetGoldengateConnectionTypeRequest bui } private void buildPartial0( - com.google.cloud.oracledatabase.v1.GetGoldengateConnectionTypeRequest result) { + com.google.cloud.discoveryengine.v1beta.DeleteServingConfigRequest result) { int from_bitField0_ = bitField0_; if (((from_bitField0_ & 0x00000001) != 0)) { result.name_ = name_; @@ -379,9 +378,9 @@ private void buildPartial0( @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.oracledatabase.v1.GetGoldengateConnectionTypeRequest) { + if (other instanceof com.google.cloud.discoveryengine.v1beta.DeleteServingConfigRequest) { return mergeFrom( - (com.google.cloud.oracledatabase.v1.GetGoldengateConnectionTypeRequest) other); + (com.google.cloud.discoveryengine.v1beta.DeleteServingConfigRequest) other); } else { super.mergeFrom(other); return this; @@ -389,9 +388,9 @@ public Builder mergeFrom(com.google.protobuf.Message other) { } public Builder mergeFrom( - com.google.cloud.oracledatabase.v1.GetGoldengateConnectionTypeRequest other) { + com.google.cloud.discoveryengine.v1beta.DeleteServingConfigRequest other) { if (other - == com.google.cloud.oracledatabase.v1.GetGoldengateConnectionTypeRequest + == com.google.cloud.discoveryengine.v1beta.DeleteServingConfigRequest .getDefaultInstance()) return this; if (!other.getName().isEmpty()) { name_ = other.name_; @@ -455,8 +454,8 @@ public Builder mergeFrom( * * *
            -     * Required. Name of the resource in the format:
            -     * projects/{project}/locations/{location}/goldengateConnectionTypes/{goldengate_connection_type}
            +     * Required. The resource name of the ServingConfig to delete. Format:
            +     * `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/servingConfigs/{serving_config_id}`
                  * 
            * * @@ -481,8 +480,8 @@ public java.lang.String getName() { * * *
            -     * Required. Name of the resource in the format:
            -     * projects/{project}/locations/{location}/goldengateConnectionTypes/{goldengate_connection_type}
            +     * Required. The resource name of the ServingConfig to delete. Format:
            +     * `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/servingConfigs/{serving_config_id}`
                  * 
            * * @@ -507,8 +506,8 @@ public com.google.protobuf.ByteString getNameBytes() { * * *
            -     * Required. Name of the resource in the format:
            -     * projects/{project}/locations/{location}/goldengateConnectionTypes/{goldengate_connection_type}
            +     * Required. The resource name of the ServingConfig to delete. Format:
            +     * `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/servingConfigs/{serving_config_id}`
                  * 
            * * @@ -532,8 +531,8 @@ public Builder setName(java.lang.String value) { * * *
            -     * Required. Name of the resource in the format:
            -     * projects/{project}/locations/{location}/goldengateConnectionTypes/{goldengate_connection_type}
            +     * Required. The resource name of the ServingConfig to delete. Format:
            +     * `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/servingConfigs/{serving_config_id}`
                  * 
            * * @@ -553,8 +552,8 @@ public Builder clearName() { * * *
            -     * Required. Name of the resource in the format:
            -     * projects/{project}/locations/{location}/goldengateConnectionTypes/{goldengate_connection_type}
            +     * Required. The resource name of the ServingConfig to delete. Format:
            +     * `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/servingConfigs/{serving_config_id}`
                  * 
            * * @@ -575,26 +574,26 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { return this; } - // @@protoc_insertion_point(builder_scope:google.cloud.oracledatabase.v1.GetGoldengateConnectionTypeRequest) + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.DeleteServingConfigRequest) } - // @@protoc_insertion_point(class_scope:google.cloud.oracledatabase.v1.GetGoldengateConnectionTypeRequest) - private static final com.google.cloud.oracledatabase.v1.GetGoldengateConnectionTypeRequest + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.DeleteServingConfigRequest) + private static final com.google.cloud.discoveryengine.v1beta.DeleteServingConfigRequest DEFAULT_INSTANCE; static { - DEFAULT_INSTANCE = new com.google.cloud.oracledatabase.v1.GetGoldengateConnectionTypeRequest(); + DEFAULT_INSTANCE = new com.google.cloud.discoveryengine.v1beta.DeleteServingConfigRequest(); } - public static com.google.cloud.oracledatabase.v1.GetGoldengateConnectionTypeRequest + public static com.google.cloud.discoveryengine.v1beta.DeleteServingConfigRequest getDefaultInstance() { return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { @java.lang.Override - public GetGoldengateConnectionTypeRequest parsePartialFrom( + public DeleteServingConfigRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { @@ -613,17 +612,17 @@ public GetGoldengateConnectionTypeRequest parsePartialFrom( } }; - public static com.google.protobuf.Parser parser() { + public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override - public com.google.protobuf.Parser getParserForType() { + public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override - public com.google.cloud.oracledatabase.v1.GetGoldengateConnectionTypeRequest + public com.google.cloud.discoveryengine.v1beta.DeleteServingConfigRequest getDefaultInstanceForType() { return DEFAULT_INSTANCE; } diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/DeleteServingConfigRequestOrBuilder.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/DeleteServingConfigRequestOrBuilder.java new file mode 100644 index 000000000000..b3ead06c9850 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/DeleteServingConfigRequestOrBuilder.java @@ -0,0 +1,60 @@ +/* + * 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/cloud/discoveryengine/v1beta/serving_config_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.discoveryengine.v1beta; + +@com.google.protobuf.Generated +public interface DeleteServingConfigRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.DeleteServingConfigRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
            +   * Required. The resource name of the ServingConfig to delete. Format:
            +   * `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/servingConfigs/{serving_config_id}`
            +   * 
            + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
            +   * Required. The resource name of the ServingConfig to delete. Format:
            +   * `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/servingConfigs/{serving_config_id}`
            +   * 
            + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/DistributeLicenseConfigRequest.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/DistributeLicenseConfigRequest.java new file mode 100644 index 000000000000..e400764cc6fb --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/DistributeLicenseConfigRequest.java @@ -0,0 +1,1247 @@ +/* + * 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/cloud/discoveryengine/v1beta/license_config_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.discoveryengine.v1beta; + +/** + * + * + *
            + * Request message for
            + * [LicenseConfigService.DistributeLicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfigService.DistributeLicenseConfig]
            + * method.
            + * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.DistributeLicenseConfigRequest} + */ +@com.google.protobuf.Generated +public final class DistributeLicenseConfigRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.DistributeLicenseConfigRequest) + DistributeLicenseConfigRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "DistributeLicenseConfigRequest"); + } + + // Use DistributeLicenseConfigRequest.newBuilder() to construct. + private DistributeLicenseConfigRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private DistributeLicenseConfigRequest() { + billingAccountLicenseConfig_ = ""; + location_ = ""; + licenseConfigId_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.LicenseConfigServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_DistributeLicenseConfigRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.LicenseConfigServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_DistributeLicenseConfigRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.DistributeLicenseConfigRequest.class, + com.google.cloud.discoveryengine.v1beta.DistributeLicenseConfigRequest.Builder.class); + } + + public static final int BILLING_ACCOUNT_LICENSE_CONFIG_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object billingAccountLicenseConfig_ = ""; + + /** + * + * + *
            +   * Required. Full resource name of [BillingAccountLicenseConfig][].
            +   *
            +   * Format:
            +   * `billingAccounts/{billing_account}/billingAccountLicenseConfigs/{billing_account_license_config_id}`.
            +   * 
            + * + * + * string billing_account_license_config = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The billingAccountLicenseConfig. + */ + @java.lang.Override + public java.lang.String getBillingAccountLicenseConfig() { + java.lang.Object ref = billingAccountLicenseConfig_; + 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(); + billingAccountLicenseConfig_ = s; + return s; + } + } + + /** + * + * + *
            +   * Required. Full resource name of [BillingAccountLicenseConfig][].
            +   *
            +   * Format:
            +   * `billingAccounts/{billing_account}/billingAccountLicenseConfigs/{billing_account_license_config_id}`.
            +   * 
            + * + * + * string billing_account_license_config = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for billingAccountLicenseConfig. + */ + @java.lang.Override + public com.google.protobuf.ByteString getBillingAccountLicenseConfigBytes() { + java.lang.Object ref = billingAccountLicenseConfig_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + billingAccountLicenseConfig_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PROJECT_NUMBER_FIELD_NUMBER = 2; + private long projectNumber_ = 0L; + + /** + * + * + *
            +   * Required. The target GCP project number to distribute the license config
            +   * to.
            +   * 
            + * + * int64 project_number = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The projectNumber. + */ + @java.lang.Override + public long getProjectNumber() { + return projectNumber_; + } + + public static final int LOCATION_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object location_ = ""; + + /** + * + * + *
            +   * Required. The target GCP project region to distribute the license config
            +   * to.
            +   * 
            + * + * string location = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The location. + */ + @java.lang.Override + public java.lang.String getLocation() { + java.lang.Object ref = location_; + 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(); + location_ = s; + return s; + } + } + + /** + * + * + *
            +   * Required. The target GCP project region to distribute the license config
            +   * to.
            +   * 
            + * + * string location = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for location. + */ + @java.lang.Override + public com.google.protobuf.ByteString getLocationBytes() { + java.lang.Object ref = location_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + location_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LICENSE_COUNT_FIELD_NUMBER = 4; + private long licenseCount_ = 0L; + + /** + * + * + *
            +   * Required. The number of licenses to distribute.
            +   * 
            + * + * int64 license_count = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The licenseCount. + */ + @java.lang.Override + public long getLicenseCount() { + return licenseCount_; + } + + public static final int LICENSE_CONFIG_ID_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object licenseConfigId_ = ""; + + /** + * + * + *
            +   * Optional. Distribute seats to this license config instead of creating a new
            +   * one. If not specified, a new license config will be created from the
            +   * billing account license config.
            +   * 
            + * + * string license_config_id = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The licenseConfigId. + */ + @java.lang.Override + public java.lang.String getLicenseConfigId() { + java.lang.Object ref = licenseConfigId_; + 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(); + licenseConfigId_ = s; + return s; + } + } + + /** + * + * + *
            +   * Optional. Distribute seats to this license config instead of creating a new
            +   * one. If not specified, a new license config will be created from the
            +   * billing account license config.
            +   * 
            + * + * string license_config_id = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for licenseConfigId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getLicenseConfigIdBytes() { + java.lang.Object ref = licenseConfigId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + licenseConfigId_ = 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 { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(billingAccountLicenseConfig_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, billingAccountLicenseConfig_); + } + if (projectNumber_ != 0L) { + output.writeInt64(2, projectNumber_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(location_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, location_); + } + if (licenseCount_ != 0L) { + output.writeInt64(4, licenseCount_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(licenseConfigId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 5, licenseConfigId_); + } + 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(billingAccountLicenseConfig_)) { + size += + com.google.protobuf.GeneratedMessage.computeStringSize(1, billingAccountLicenseConfig_); + } + if (projectNumber_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(2, projectNumber_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(location_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, location_); + } + if (licenseCount_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(4, licenseCount_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(licenseConfigId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(5, licenseConfigId_); + } + 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.discoveryengine.v1beta.DistributeLicenseConfigRequest)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1beta.DistributeLicenseConfigRequest other = + (com.google.cloud.discoveryengine.v1beta.DistributeLicenseConfigRequest) obj; + + if (!getBillingAccountLicenseConfig().equals(other.getBillingAccountLicenseConfig())) + return false; + if (getProjectNumber() != other.getProjectNumber()) return false; + if (!getLocation().equals(other.getLocation())) return false; + if (getLicenseCount() != other.getLicenseCount()) return false; + if (!getLicenseConfigId().equals(other.getLicenseConfigId())) 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) + BILLING_ACCOUNT_LICENSE_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getBillingAccountLicenseConfig().hashCode(); + hash = (37 * hash) + PROJECT_NUMBER_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getProjectNumber()); + hash = (37 * hash) + LOCATION_FIELD_NUMBER; + hash = (53 * hash) + getLocation().hashCode(); + hash = (37 * hash) + LICENSE_COUNT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getLicenseCount()); + hash = (37 * hash) + LICENSE_CONFIG_ID_FIELD_NUMBER; + hash = (53 * hash) + getLicenseConfigId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1beta.DistributeLicenseConfigRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.DistributeLicenseConfigRequest 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.discoveryengine.v1beta.DistributeLicenseConfigRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.DistributeLicenseConfigRequest 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.discoveryengine.v1beta.DistributeLicenseConfigRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.DistributeLicenseConfigRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1beta.DistributeLicenseConfigRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.DistributeLicenseConfigRequest 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.discoveryengine.v1beta.DistributeLicenseConfigRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.DistributeLicenseConfigRequest + 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.discoveryengine.v1beta.DistributeLicenseConfigRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.DistributeLicenseConfigRequest 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.discoveryengine.v1beta.DistributeLicenseConfigRequest 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
            +   * [LicenseConfigService.DistributeLicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfigService.DistributeLicenseConfig]
            +   * method.
            +   * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.DistributeLicenseConfigRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.DistributeLicenseConfigRequest) + com.google.cloud.discoveryengine.v1beta.DistributeLicenseConfigRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.LicenseConfigServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_DistributeLicenseConfigRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.LicenseConfigServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_DistributeLicenseConfigRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.DistributeLicenseConfigRequest.class, + com.google.cloud.discoveryengine.v1beta.DistributeLicenseConfigRequest.Builder.class); + } + + // Construct using + // com.google.cloud.discoveryengine.v1beta.DistributeLicenseConfigRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + billingAccountLicenseConfig_ = ""; + projectNumber_ = 0L; + location_ = ""; + licenseCount_ = 0L; + licenseConfigId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1beta.LicenseConfigServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_DistributeLicenseConfigRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.DistributeLicenseConfigRequest + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1beta.DistributeLicenseConfigRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.DistributeLicenseConfigRequest build() { + com.google.cloud.discoveryengine.v1beta.DistributeLicenseConfigRequest result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.DistributeLicenseConfigRequest buildPartial() { + com.google.cloud.discoveryengine.v1beta.DistributeLicenseConfigRequest result = + new com.google.cloud.discoveryengine.v1beta.DistributeLicenseConfigRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.discoveryengine.v1beta.DistributeLicenseConfigRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.billingAccountLicenseConfig_ = billingAccountLicenseConfig_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.projectNumber_ = projectNumber_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.location_ = location_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.licenseCount_ = licenseCount_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.licenseConfigId_ = licenseConfigId_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.discoveryengine.v1beta.DistributeLicenseConfigRequest) { + return mergeFrom( + (com.google.cloud.discoveryengine.v1beta.DistributeLicenseConfigRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1beta.DistributeLicenseConfigRequest other) { + if (other + == com.google.cloud.discoveryengine.v1beta.DistributeLicenseConfigRequest + .getDefaultInstance()) return this; + if (!other.getBillingAccountLicenseConfig().isEmpty()) { + billingAccountLicenseConfig_ = other.billingAccountLicenseConfig_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getProjectNumber() != 0L) { + setProjectNumber(other.getProjectNumber()); + } + if (!other.getLocation().isEmpty()) { + location_ = other.location_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (other.getLicenseCount() != 0L) { + setLicenseCount(other.getLicenseCount()); + } + if (!other.getLicenseConfigId().isEmpty()) { + licenseConfigId_ = other.licenseConfigId_; + bitField0_ |= 0x00000010; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + billingAccountLicenseConfig_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + projectNumber_ = input.readInt64(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: + { + location_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 32: + { + licenseCount_ = input.readInt64(); + bitField0_ |= 0x00000008; + break; + } // case 32 + case 42: + { + licenseConfigId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object billingAccountLicenseConfig_ = ""; + + /** + * + * + *
            +     * Required. Full resource name of [BillingAccountLicenseConfig][].
            +     *
            +     * Format:
            +     * `billingAccounts/{billing_account}/billingAccountLicenseConfigs/{billing_account_license_config_id}`.
            +     * 
            + * + * + * string billing_account_license_config = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The billingAccountLicenseConfig. + */ + public java.lang.String getBillingAccountLicenseConfig() { + java.lang.Object ref = billingAccountLicenseConfig_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + billingAccountLicenseConfig_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
            +     * Required. Full resource name of [BillingAccountLicenseConfig][].
            +     *
            +     * Format:
            +     * `billingAccounts/{billing_account}/billingAccountLicenseConfigs/{billing_account_license_config_id}`.
            +     * 
            + * + * + * string billing_account_license_config = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for billingAccountLicenseConfig. + */ + public com.google.protobuf.ByteString getBillingAccountLicenseConfigBytes() { + java.lang.Object ref = billingAccountLicenseConfig_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + billingAccountLicenseConfig_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
            +     * Required. Full resource name of [BillingAccountLicenseConfig][].
            +     *
            +     * Format:
            +     * `billingAccounts/{billing_account}/billingAccountLicenseConfigs/{billing_account_license_config_id}`.
            +     * 
            + * + * + * string billing_account_license_config = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The billingAccountLicenseConfig to set. + * @return This builder for chaining. + */ + public Builder setBillingAccountLicenseConfig(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + billingAccountLicenseConfig_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Required. Full resource name of [BillingAccountLicenseConfig][].
            +     *
            +     * Format:
            +     * `billingAccounts/{billing_account}/billingAccountLicenseConfigs/{billing_account_license_config_id}`.
            +     * 
            + * + * + * string billing_account_license_config = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearBillingAccountLicenseConfig() { + billingAccountLicenseConfig_ = getDefaultInstance().getBillingAccountLicenseConfig(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
            +     * Required. Full resource name of [BillingAccountLicenseConfig][].
            +     *
            +     * Format:
            +     * `billingAccounts/{billing_account}/billingAccountLicenseConfigs/{billing_account_license_config_id}`.
            +     * 
            + * + * + * string billing_account_license_config = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for billingAccountLicenseConfig to set. + * @return This builder for chaining. + */ + public Builder setBillingAccountLicenseConfigBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + billingAccountLicenseConfig_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private long projectNumber_; + + /** + * + * + *
            +     * Required. The target GCP project number to distribute the license config
            +     * to.
            +     * 
            + * + * int64 project_number = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The projectNumber. + */ + @java.lang.Override + public long getProjectNumber() { + return projectNumber_; + } + + /** + * + * + *
            +     * Required. The target GCP project number to distribute the license config
            +     * to.
            +     * 
            + * + * int64 project_number = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The projectNumber to set. + * @return This builder for chaining. + */ + public Builder setProjectNumber(long value) { + + projectNumber_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Required. The target GCP project number to distribute the license config
            +     * to.
            +     * 
            + * + * int64 project_number = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearProjectNumber() { + bitField0_ = (bitField0_ & ~0x00000002); + projectNumber_ = 0L; + onChanged(); + return this; + } + + private java.lang.Object location_ = ""; + + /** + * + * + *
            +     * Required. The target GCP project region to distribute the license config
            +     * to.
            +     * 
            + * + * string location = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The location. + */ + public java.lang.String getLocation() { + java.lang.Object ref = location_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + location_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
            +     * Required. The target GCP project region to distribute the license config
            +     * to.
            +     * 
            + * + * string location = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for location. + */ + public com.google.protobuf.ByteString getLocationBytes() { + java.lang.Object ref = location_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + location_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
            +     * Required. The target GCP project region to distribute the license config
            +     * to.
            +     * 
            + * + * string location = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The location to set. + * @return This builder for chaining. + */ + public Builder setLocation(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + location_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Required. The target GCP project region to distribute the license config
            +     * to.
            +     * 
            + * + * string location = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearLocation() { + location_ = getDefaultInstance().getLocation(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
            +     * Required. The target GCP project region to distribute the license config
            +     * to.
            +     * 
            + * + * string location = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for location to set. + * @return This builder for chaining. + */ + public Builder setLocationBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + location_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private long licenseCount_; + + /** + * + * + *
            +     * Required. The number of licenses to distribute.
            +     * 
            + * + * int64 license_count = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The licenseCount. + */ + @java.lang.Override + public long getLicenseCount() { + return licenseCount_; + } + + /** + * + * + *
            +     * Required. The number of licenses to distribute.
            +     * 
            + * + * int64 license_count = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The licenseCount to set. + * @return This builder for chaining. + */ + public Builder setLicenseCount(long value) { + + licenseCount_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Required. The number of licenses to distribute.
            +     * 
            + * + * int64 license_count = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearLicenseCount() { + bitField0_ = (bitField0_ & ~0x00000008); + licenseCount_ = 0L; + onChanged(); + return this; + } + + private java.lang.Object licenseConfigId_ = ""; + + /** + * + * + *
            +     * Optional. Distribute seats to this license config instead of creating a new
            +     * one. If not specified, a new license config will be created from the
            +     * billing account license config.
            +     * 
            + * + * string license_config_id = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The licenseConfigId. + */ + public java.lang.String getLicenseConfigId() { + java.lang.Object ref = licenseConfigId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + licenseConfigId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
            +     * Optional. Distribute seats to this license config instead of creating a new
            +     * one. If not specified, a new license config will be created from the
            +     * billing account license config.
            +     * 
            + * + * string license_config_id = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for licenseConfigId. + */ + public com.google.protobuf.ByteString getLicenseConfigIdBytes() { + java.lang.Object ref = licenseConfigId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + licenseConfigId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
            +     * Optional. Distribute seats to this license config instead of creating a new
            +     * one. If not specified, a new license config will be created from the
            +     * billing account license config.
            +     * 
            + * + * string license_config_id = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The licenseConfigId to set. + * @return This builder for chaining. + */ + public Builder setLicenseConfigId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + licenseConfigId_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Optional. Distribute seats to this license config instead of creating a new
            +     * one. If not specified, a new license config will be created from the
            +     * billing account license config.
            +     * 
            + * + * string license_config_id = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearLicenseConfigId() { + licenseConfigId_ = getDefaultInstance().getLicenseConfigId(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + + /** + * + * + *
            +     * Optional. Distribute seats to this license config instead of creating a new
            +     * one. If not specified, a new license config will be created from the
            +     * billing account license config.
            +     * 
            + * + * string license_config_id = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for licenseConfigId to set. + * @return This builder for chaining. + */ + public Builder setLicenseConfigIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + licenseConfigId_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.DistributeLicenseConfigRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.DistributeLicenseConfigRequest) + private static final com.google.cloud.discoveryengine.v1beta.DistributeLicenseConfigRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.discoveryengine.v1beta.DistributeLicenseConfigRequest(); + } + + public static com.google.cloud.discoveryengine.v1beta.DistributeLicenseConfigRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DistributeLicenseConfigRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.DistributeLicenseConfigRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/DistributeLicenseConfigRequestOrBuilder.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/DistributeLicenseConfigRequestOrBuilder.java new file mode 100644 index 000000000000..169d36092196 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/DistributeLicenseConfigRequestOrBuilder.java @@ -0,0 +1,149 @@ +/* + * 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/cloud/discoveryengine/v1beta/license_config_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.discoveryengine.v1beta; + +@com.google.protobuf.Generated +public interface DistributeLicenseConfigRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.DistributeLicenseConfigRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
            +   * Required. Full resource name of [BillingAccountLicenseConfig][].
            +   *
            +   * Format:
            +   * `billingAccounts/{billing_account}/billingAccountLicenseConfigs/{billing_account_license_config_id}`.
            +   * 
            + * + * + * string billing_account_license_config = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The billingAccountLicenseConfig. + */ + java.lang.String getBillingAccountLicenseConfig(); + + /** + * + * + *
            +   * Required. Full resource name of [BillingAccountLicenseConfig][].
            +   *
            +   * Format:
            +   * `billingAccounts/{billing_account}/billingAccountLicenseConfigs/{billing_account_license_config_id}`.
            +   * 
            + * + * + * string billing_account_license_config = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for billingAccountLicenseConfig. + */ + com.google.protobuf.ByteString getBillingAccountLicenseConfigBytes(); + + /** + * + * + *
            +   * Required. The target GCP project number to distribute the license config
            +   * to.
            +   * 
            + * + * int64 project_number = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The projectNumber. + */ + long getProjectNumber(); + + /** + * + * + *
            +   * Required. The target GCP project region to distribute the license config
            +   * to.
            +   * 
            + * + * string location = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The location. + */ + java.lang.String getLocation(); + + /** + * + * + *
            +   * Required. The target GCP project region to distribute the license config
            +   * to.
            +   * 
            + * + * string location = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for location. + */ + com.google.protobuf.ByteString getLocationBytes(); + + /** + * + * + *
            +   * Required. The number of licenses to distribute.
            +   * 
            + * + * int64 license_count = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The licenseCount. + */ + long getLicenseCount(); + + /** + * + * + *
            +   * Optional. Distribute seats to this license config instead of creating a new
            +   * one. If not specified, a new license config will be created from the
            +   * billing account license config.
            +   * 
            + * + * string license_config_id = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The licenseConfigId. + */ + java.lang.String getLicenseConfigId(); + + /** + * + * + *
            +   * Optional. Distribute seats to this license config instead of creating a new
            +   * one. If not specified, a new license config will be created from the
            +   * billing account license config.
            +   * 
            + * + * string license_config_id = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for licenseConfigId. + */ + com.google.protobuf.ByteString getLicenseConfigIdBytes(); +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/DistributeLicenseConfigResponse.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/DistributeLicenseConfigResponse.java new file mode 100644 index 000000000000..98be4a30068a --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/DistributeLicenseConfigResponse.java @@ -0,0 +1,723 @@ +/* + * 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/cloud/discoveryengine/v1beta/license_config_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.discoveryengine.v1beta; + +/** + * + * + *
            + * Response message for
            + * [LicenseConfigService.DistributeLicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfigService.DistributeLicenseConfig]
            + * method.
            + * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.DistributeLicenseConfigResponse} + */ +@com.google.protobuf.Generated +public final class DistributeLicenseConfigResponse extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.DistributeLicenseConfigResponse) + DistributeLicenseConfigResponseOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "DistributeLicenseConfigResponse"); + } + + // Use DistributeLicenseConfigResponse.newBuilder() to construct. + private DistributeLicenseConfigResponse(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private DistributeLicenseConfigResponse() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.LicenseConfigServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_DistributeLicenseConfigResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.LicenseConfigServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_DistributeLicenseConfigResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.DistributeLicenseConfigResponse.class, + com.google.cloud.discoveryengine.v1beta.DistributeLicenseConfigResponse.Builder.class); + } + + private int bitField0_; + public static final int LICENSE_CONFIG_FIELD_NUMBER = 1; + private com.google.cloud.discoveryengine.v1beta.LicenseConfig licenseConfig_; + + /** + * + * + *
            +   * The updated or created LicenseConfig.
            +   * 
            + * + * .google.cloud.discoveryengine.v1beta.LicenseConfig license_config = 1; + * + * @return Whether the licenseConfig field is set. + */ + @java.lang.Override + public boolean hasLicenseConfig() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
            +   * The updated or created LicenseConfig.
            +   * 
            + * + * .google.cloud.discoveryengine.v1beta.LicenseConfig license_config = 1; + * + * @return The licenseConfig. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.LicenseConfig getLicenseConfig() { + return licenseConfig_ == null + ? com.google.cloud.discoveryengine.v1beta.LicenseConfig.getDefaultInstance() + : licenseConfig_; + } + + /** + * + * + *
            +   * The updated or created LicenseConfig.
            +   * 
            + * + * .google.cloud.discoveryengine.v1beta.LicenseConfig license_config = 1; + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.LicenseConfigOrBuilder + getLicenseConfigOrBuilder() { + return licenseConfig_ == null + ? com.google.cloud.discoveryengine.v1beta.LicenseConfig.getDefaultInstance() + : licenseConfig_; + } + + 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, getLicenseConfig()); + } + 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, getLicenseConfig()); + } + 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.discoveryengine.v1beta.DistributeLicenseConfigResponse)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1beta.DistributeLicenseConfigResponse other = + (com.google.cloud.discoveryengine.v1beta.DistributeLicenseConfigResponse) obj; + + if (hasLicenseConfig() != other.hasLicenseConfig()) return false; + if (hasLicenseConfig()) { + if (!getLicenseConfig().equals(other.getLicenseConfig())) 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 (hasLicenseConfig()) { + hash = (37 * hash) + LICENSE_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getLicenseConfig().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1beta.DistributeLicenseConfigResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.DistributeLicenseConfigResponse 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.discoveryengine.v1beta.DistributeLicenseConfigResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.DistributeLicenseConfigResponse 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.discoveryengine.v1beta.DistributeLicenseConfigResponse parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.DistributeLicenseConfigResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1beta.DistributeLicenseConfigResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.DistributeLicenseConfigResponse 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.discoveryengine.v1beta.DistributeLicenseConfigResponse + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.DistributeLicenseConfigResponse + 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.discoveryengine.v1beta.DistributeLicenseConfigResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.DistributeLicenseConfigResponse 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.discoveryengine.v1beta.DistributeLicenseConfigResponse 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
            +   * [LicenseConfigService.DistributeLicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfigService.DistributeLicenseConfig]
            +   * method.
            +   * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.DistributeLicenseConfigResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.DistributeLicenseConfigResponse) + com.google.cloud.discoveryengine.v1beta.DistributeLicenseConfigResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.LicenseConfigServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_DistributeLicenseConfigResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.LicenseConfigServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_DistributeLicenseConfigResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.DistributeLicenseConfigResponse.class, + com.google.cloud.discoveryengine.v1beta.DistributeLicenseConfigResponse.Builder + .class); + } + + // Construct using + // com.google.cloud.discoveryengine.v1beta.DistributeLicenseConfigResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetLicenseConfigFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + licenseConfig_ = null; + if (licenseConfigBuilder_ != null) { + licenseConfigBuilder_.dispose(); + licenseConfigBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1beta.LicenseConfigServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_DistributeLicenseConfigResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.DistributeLicenseConfigResponse + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1beta.DistributeLicenseConfigResponse + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.DistributeLicenseConfigResponse build() { + com.google.cloud.discoveryengine.v1beta.DistributeLicenseConfigResponse result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.DistributeLicenseConfigResponse buildPartial() { + com.google.cloud.discoveryengine.v1beta.DistributeLicenseConfigResponse result = + new com.google.cloud.discoveryengine.v1beta.DistributeLicenseConfigResponse(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.discoveryengine.v1beta.DistributeLicenseConfigResponse result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.licenseConfig_ = + licenseConfigBuilder_ == null ? licenseConfig_ : licenseConfigBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.cloud.discoveryengine.v1beta.DistributeLicenseConfigResponse) { + return mergeFrom( + (com.google.cloud.discoveryengine.v1beta.DistributeLicenseConfigResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1beta.DistributeLicenseConfigResponse other) { + if (other + == com.google.cloud.discoveryengine.v1beta.DistributeLicenseConfigResponse + .getDefaultInstance()) return this; + if (other.hasLicenseConfig()) { + mergeLicenseConfig(other.getLicenseConfig()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage( + internalGetLicenseConfigFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.cloud.discoveryengine.v1beta.LicenseConfig licenseConfig_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.LicenseConfig, + com.google.cloud.discoveryengine.v1beta.LicenseConfig.Builder, + com.google.cloud.discoveryengine.v1beta.LicenseConfigOrBuilder> + licenseConfigBuilder_; + + /** + * + * + *
            +     * The updated or created LicenseConfig.
            +     * 
            + * + * .google.cloud.discoveryengine.v1beta.LicenseConfig license_config = 1; + * + * @return Whether the licenseConfig field is set. + */ + public boolean hasLicenseConfig() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
            +     * The updated or created LicenseConfig.
            +     * 
            + * + * .google.cloud.discoveryengine.v1beta.LicenseConfig license_config = 1; + * + * @return The licenseConfig. + */ + public com.google.cloud.discoveryengine.v1beta.LicenseConfig getLicenseConfig() { + if (licenseConfigBuilder_ == null) { + return licenseConfig_ == null + ? com.google.cloud.discoveryengine.v1beta.LicenseConfig.getDefaultInstance() + : licenseConfig_; + } else { + return licenseConfigBuilder_.getMessage(); + } + } + + /** + * + * + *
            +     * The updated or created LicenseConfig.
            +     * 
            + * + * .google.cloud.discoveryengine.v1beta.LicenseConfig license_config = 1; + */ + public Builder setLicenseConfig(com.google.cloud.discoveryengine.v1beta.LicenseConfig value) { + if (licenseConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + licenseConfig_ = value; + } else { + licenseConfigBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
            +     * The updated or created LicenseConfig.
            +     * 
            + * + * .google.cloud.discoveryengine.v1beta.LicenseConfig license_config = 1; + */ + public Builder setLicenseConfig( + com.google.cloud.discoveryengine.v1beta.LicenseConfig.Builder builderForValue) { + if (licenseConfigBuilder_ == null) { + licenseConfig_ = builderForValue.build(); + } else { + licenseConfigBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
            +     * The updated or created LicenseConfig.
            +     * 
            + * + * .google.cloud.discoveryengine.v1beta.LicenseConfig license_config = 1; + */ + public Builder mergeLicenseConfig(com.google.cloud.discoveryengine.v1beta.LicenseConfig value) { + if (licenseConfigBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && licenseConfig_ != null + && licenseConfig_ + != com.google.cloud.discoveryengine.v1beta.LicenseConfig.getDefaultInstance()) { + getLicenseConfigBuilder().mergeFrom(value); + } else { + licenseConfig_ = value; + } + } else { + licenseConfigBuilder_.mergeFrom(value); + } + if (licenseConfig_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + + /** + * + * + *
            +     * The updated or created LicenseConfig.
            +     * 
            + * + * .google.cloud.discoveryengine.v1beta.LicenseConfig license_config = 1; + */ + public Builder clearLicenseConfig() { + bitField0_ = (bitField0_ & ~0x00000001); + licenseConfig_ = null; + if (licenseConfigBuilder_ != null) { + licenseConfigBuilder_.dispose(); + licenseConfigBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
            +     * The updated or created LicenseConfig.
            +     * 
            + * + * .google.cloud.discoveryengine.v1beta.LicenseConfig license_config = 1; + */ + public com.google.cloud.discoveryengine.v1beta.LicenseConfig.Builder getLicenseConfigBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return internalGetLicenseConfigFieldBuilder().getBuilder(); + } + + /** + * + * + *
            +     * The updated or created LicenseConfig.
            +     * 
            + * + * .google.cloud.discoveryengine.v1beta.LicenseConfig license_config = 1; + */ + public com.google.cloud.discoveryengine.v1beta.LicenseConfigOrBuilder + getLicenseConfigOrBuilder() { + if (licenseConfigBuilder_ != null) { + return licenseConfigBuilder_.getMessageOrBuilder(); + } else { + return licenseConfig_ == null + ? com.google.cloud.discoveryengine.v1beta.LicenseConfig.getDefaultInstance() + : licenseConfig_; + } + } + + /** + * + * + *
            +     * The updated or created LicenseConfig.
            +     * 
            + * + * .google.cloud.discoveryengine.v1beta.LicenseConfig license_config = 1; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.LicenseConfig, + com.google.cloud.discoveryengine.v1beta.LicenseConfig.Builder, + com.google.cloud.discoveryengine.v1beta.LicenseConfigOrBuilder> + internalGetLicenseConfigFieldBuilder() { + if (licenseConfigBuilder_ == null) { + licenseConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.LicenseConfig, + com.google.cloud.discoveryengine.v1beta.LicenseConfig.Builder, + com.google.cloud.discoveryengine.v1beta.LicenseConfigOrBuilder>( + getLicenseConfig(), getParentForChildren(), isClean()); + licenseConfig_ = null; + } + return licenseConfigBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.DistributeLicenseConfigResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.DistributeLicenseConfigResponse) + private static final com.google.cloud.discoveryengine.v1beta.DistributeLicenseConfigResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.discoveryengine.v1beta.DistributeLicenseConfigResponse(); + } + + public static com.google.cloud.discoveryengine.v1beta.DistributeLicenseConfigResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DistributeLicenseConfigResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.DistributeLicenseConfigResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/DistributeLicenseConfigResponseOrBuilder.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/DistributeLicenseConfigResponseOrBuilder.java new file mode 100644 index 000000000000..6e6d3dc06133 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/DistributeLicenseConfigResponseOrBuilder.java @@ -0,0 +1,65 @@ +/* + * 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/cloud/discoveryengine/v1beta/license_config_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.discoveryengine.v1beta; + +@com.google.protobuf.Generated +public interface DistributeLicenseConfigResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.DistributeLicenseConfigResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
            +   * The updated or created LicenseConfig.
            +   * 
            + * + * .google.cloud.discoveryengine.v1beta.LicenseConfig license_config = 1; + * + * @return Whether the licenseConfig field is set. + */ + boolean hasLicenseConfig(); + + /** + * + * + *
            +   * The updated or created LicenseConfig.
            +   * 
            + * + * .google.cloud.discoveryengine.v1beta.LicenseConfig license_config = 1; + * + * @return The licenseConfig. + */ + com.google.cloud.discoveryengine.v1beta.LicenseConfig getLicenseConfig(); + + /** + * + * + *
            +   * The updated or created LicenseConfig.
            +   * 
            + * + * .google.cloud.discoveryengine.v1beta.LicenseConfig license_config = 1; + */ + com.google.cloud.discoveryengine.v1beta.LicenseConfigOrBuilder getLicenseConfigOrBuilder(); +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/Document.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/Document.java index c7976d7c43f4..b333e4000b70 100644 --- a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/Document.java +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/Document.java @@ -172,9 +172,23 @@ public interface ContentOrBuilder * * * `application/pdf` (PDF, only native PDFs are supported for now) * * `text/html` (HTML) + * * `text/plain` (TXT) + * * `application/xml` or `text/xml` (XML) + * * `application/json` (JSON) * * `application/vnd.openxmlformats-officedocument.wordprocessingml.document` (DOCX) * * `application/vnd.openxmlformats-officedocument.presentationml.presentation` (PPTX) - * * `text/plain` (TXT) + * * `application/vnd.openxmlformats-officedocument.spreadsheetml.sheet` + * (XLSX) + * * `application/vnd.ms-excel.sheet.macroenabled.12` (XLSM) + * + * The following types are supported only if layout parser is enabled in the + * data store: + * + * * `image/bmp` (BMP) + * * `image/gif` (GIF) + * * `image/jpeg` (JPEG) + * * `image/png` (PNG) + * * `image/tiff` (TIFF) * * See https://www.iana.org/assignments/media-types/media-types.xhtml. *
            @@ -193,9 +207,23 @@ public interface ContentOrBuilder * * * `application/pdf` (PDF, only native PDFs are supported for now) * * `text/html` (HTML) + * * `text/plain` (TXT) + * * `application/xml` or `text/xml` (XML) + * * `application/json` (JSON) * * `application/vnd.openxmlformats-officedocument.wordprocessingml.document` (DOCX) * * `application/vnd.openxmlformats-officedocument.presentationml.presentation` (PPTX) - * * `text/plain` (TXT) + * * `application/vnd.openxmlformats-officedocument.spreadsheetml.sheet` + * (XLSX) + * * `application/vnd.ms-excel.sheet.macroenabled.12` (XLSM) + * + * The following types are supported only if layout parser is enabled in the + * data store: + * + * * `image/bmp` (BMP) + * * `image/gif` (GIF) + * * `image/jpeg` (JPEG) + * * `image/png` (PNG) + * * `image/tiff` (TIFF) * * See https://www.iana.org/assignments/media-types/media-types.xhtml. * @@ -451,9 +479,23 @@ public com.google.protobuf.ByteString getUriBytes() { * * * `application/pdf` (PDF, only native PDFs are supported for now) * * `text/html` (HTML) + * * `text/plain` (TXT) + * * `application/xml` or `text/xml` (XML) + * * `application/json` (JSON) * * `application/vnd.openxmlformats-officedocument.wordprocessingml.document` (DOCX) * * `application/vnd.openxmlformats-officedocument.presentationml.presentation` (PPTX) - * * `text/plain` (TXT) + * * `application/vnd.openxmlformats-officedocument.spreadsheetml.sheet` + * (XLSX) + * * `application/vnd.ms-excel.sheet.macroenabled.12` (XLSM) + * + * The following types are supported only if layout parser is enabled in the + * data store: + * + * * `image/bmp` (BMP) + * * `image/gif` (GIF) + * * `image/jpeg` (JPEG) + * * `image/png` (PNG) + * * `image/tiff` (TIFF) * * See https://www.iana.org/assignments/media-types/media-types.xhtml. * @@ -483,9 +525,23 @@ public java.lang.String getMimeType() { * * * `application/pdf` (PDF, only native PDFs are supported for now) * * `text/html` (HTML) + * * `text/plain` (TXT) + * * `application/xml` or `text/xml` (XML) + * * `application/json` (JSON) * * `application/vnd.openxmlformats-officedocument.wordprocessingml.document` (DOCX) * * `application/vnd.openxmlformats-officedocument.presentationml.presentation` (PPTX) - * * `text/plain` (TXT) + * * `application/vnd.openxmlformats-officedocument.spreadsheetml.sheet` + * (XLSX) + * * `application/vnd.ms-excel.sheet.macroenabled.12` (XLSM) + * + * The following types are supported only if layout parser is enabled in the + * data store: + * + * * `image/bmp` (BMP) + * * `image/gif` (GIF) + * * `image/jpeg` (JPEG) + * * `image/png` (PNG) + * * `image/tiff` (TIFF) * * See https://www.iana.org/assignments/media-types/media-types.xhtml. * @@ -1173,9 +1229,23 @@ public Builder setUriBytes(com.google.protobuf.ByteString value) { * * * `application/pdf` (PDF, only native PDFs are supported for now) * * `text/html` (HTML) + * * `text/plain` (TXT) + * * `application/xml` or `text/xml` (XML) + * * `application/json` (JSON) * * `application/vnd.openxmlformats-officedocument.wordprocessingml.document` (DOCX) * * `application/vnd.openxmlformats-officedocument.presentationml.presentation` (PPTX) - * * `text/plain` (TXT) + * * `application/vnd.openxmlformats-officedocument.spreadsheetml.sheet` + * (XLSX) + * * `application/vnd.ms-excel.sheet.macroenabled.12` (XLSM) + * + * The following types are supported only if layout parser is enabled in the + * data store: + * + * * `image/bmp` (BMP) + * * `image/gif` (GIF) + * * `image/jpeg` (JPEG) + * * `image/png` (PNG) + * * `image/tiff` (TIFF) * * See https://www.iana.org/assignments/media-types/media-types.xhtml. * @@ -1204,26 +1274,2379 @@ public java.lang.String getMimeType() { * * * `application/pdf` (PDF, only native PDFs are supported for now) * * `text/html` (HTML) + * * `text/plain` (TXT) + * * `application/xml` or `text/xml` (XML) + * * `application/json` (JSON) + * * `application/vnd.openxmlformats-officedocument.wordprocessingml.document` (DOCX) + * * `application/vnd.openxmlformats-officedocument.presentationml.presentation` (PPTX) + * * `application/vnd.openxmlformats-officedocument.spreadsheetml.sheet` + * (XLSX) + * * `application/vnd.ms-excel.sheet.macroenabled.12` (XLSM) + * + * The following types are supported only if layout parser is enabled in the + * data store: + * + * * `image/bmp` (BMP) + * * `image/gif` (GIF) + * * `image/jpeg` (JPEG) + * * `image/png` (PNG) + * * `image/tiff` (TIFF) + * + * See https://www.iana.org/assignments/media-types/media-types.xhtml. + * + * + * string mime_type = 1; + * + * @return The bytes for mimeType. + */ + public com.google.protobuf.ByteString getMimeTypeBytes() { + java.lang.Object ref = mimeType_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + mimeType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
            +       * The MIME type of the content. Supported types:
            +       *
            +       * * `application/pdf` (PDF, only native PDFs are supported for now)
            +       * * `text/html` (HTML)
            +       * * `text/plain` (TXT)
            +       * * `application/xml` or `text/xml` (XML)
            +       * * `application/json` (JSON)
            +       * * `application/vnd.openxmlformats-officedocument.wordprocessingml.document` (DOCX)
            +       * * `application/vnd.openxmlformats-officedocument.presentationml.presentation` (PPTX)
            +       * * `application/vnd.openxmlformats-officedocument.spreadsheetml.sheet`
            +       * (XLSX)
            +       * * `application/vnd.ms-excel.sheet.macroenabled.12` (XLSM)
            +       *
            +       * The following types are supported only if layout parser is enabled in the
            +       * data store:
            +       *
            +       * * `image/bmp` (BMP)
            +       * * `image/gif` (GIF)
            +       * * `image/jpeg` (JPEG)
            +       * * `image/png` (PNG)
            +       * * `image/tiff` (TIFF)
            +       *
            +       * See https://www.iana.org/assignments/media-types/media-types.xhtml.
            +       * 
            + * + * string mime_type = 1; + * + * @param value The mimeType to set. + * @return This builder for chaining. + */ + public Builder setMimeType(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + mimeType_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
            +       * The MIME type of the content. Supported types:
            +       *
            +       * * `application/pdf` (PDF, only native PDFs are supported for now)
            +       * * `text/html` (HTML)
            +       * * `text/plain` (TXT)
            +       * * `application/xml` or `text/xml` (XML)
            +       * * `application/json` (JSON)
                    * * `application/vnd.openxmlformats-officedocument.wordprocessingml.document` (DOCX)
                    * * `application/vnd.openxmlformats-officedocument.presentationml.presentation` (PPTX)
            +       * * `application/vnd.openxmlformats-officedocument.spreadsheetml.sheet`
            +       * (XLSX)
            +       * * `application/vnd.ms-excel.sheet.macroenabled.12` (XLSM)
            +       *
            +       * The following types are supported only if layout parser is enabled in the
            +       * data store:
            +       *
            +       * * `image/bmp` (BMP)
            +       * * `image/gif` (GIF)
            +       * * `image/jpeg` (JPEG)
            +       * * `image/png` (PNG)
            +       * * `image/tiff` (TIFF)
            +       *
            +       * See https://www.iana.org/assignments/media-types/media-types.xhtml.
            +       * 
            + * + * string mime_type = 1; + * + * @return This builder for chaining. + */ + public Builder clearMimeType() { + mimeType_ = getDefaultInstance().getMimeType(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
            +       * The MIME type of the content. Supported types:
            +       *
            +       * * `application/pdf` (PDF, only native PDFs are supported for now)
            +       * * `text/html` (HTML)
                    * * `text/plain` (TXT)
            +       * * `application/xml` or `text/xml` (XML)
            +       * * `application/json` (JSON)
            +       * * `application/vnd.openxmlformats-officedocument.wordprocessingml.document` (DOCX)
            +       * * `application/vnd.openxmlformats-officedocument.presentationml.presentation` (PPTX)
            +       * * `application/vnd.openxmlformats-officedocument.spreadsheetml.sheet`
            +       * (XLSX)
            +       * * `application/vnd.ms-excel.sheet.macroenabled.12` (XLSM)
            +       *
            +       * The following types are supported only if layout parser is enabled in the
            +       * data store:
            +       *
            +       * * `image/bmp` (BMP)
            +       * * `image/gif` (GIF)
            +       * * `image/jpeg` (JPEG)
            +       * * `image/png` (PNG)
            +       * * `image/tiff` (TIFF)
                    *
                    * See https://www.iana.org/assignments/media-types/media-types.xhtml.
                    * 
            * - * string mime_type = 1; + * string mime_type = 1; + * + * @param value The bytes for mimeType to set. + * @return This builder for chaining. + */ + public Builder setMimeTypeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + mimeType_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.Document.Content) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.Document.Content) + private static final com.google.cloud.discoveryengine.v1beta.Document.Content DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.discoveryengine.v1beta.Document.Content(); + } + + public static com.google.cloud.discoveryengine.v1beta.Document.Content getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Content parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Document.Content getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface AclInfoOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.Document.AclInfo) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
            +     * Readers of the document.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Document.AclInfo.AccessRestriction readers = 1; + * + */ + java.util.List + getReadersList(); + + /** + * + * + *
            +     * Readers of the document.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Document.AclInfo.AccessRestriction readers = 1; + * + */ + com.google.cloud.discoveryengine.v1beta.Document.AclInfo.AccessRestriction getReaders( + int index); + + /** + * + * + *
            +     * Readers of the document.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Document.AclInfo.AccessRestriction readers = 1; + * + */ + int getReadersCount(); + + /** + * + * + *
            +     * Readers of the document.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Document.AclInfo.AccessRestriction readers = 1; + * + */ + java.util.List< + ? extends + com.google.cloud.discoveryengine.v1beta.Document.AclInfo.AccessRestrictionOrBuilder> + getReadersOrBuilderList(); + + /** + * + * + *
            +     * Readers of the document.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Document.AclInfo.AccessRestriction readers = 1; + * + */ + com.google.cloud.discoveryengine.v1beta.Document.AclInfo.AccessRestrictionOrBuilder + getReadersOrBuilder(int index); + } + + /** + * + * + *
            +   * ACL Information of the Document.
            +   * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.Document.AclInfo} + */ + public static final class AclInfo extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.Document.AclInfo) + AclInfoOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "AclInfo"); + } + + // Use AclInfo.newBuilder() to construct. + private AclInfo(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private AclInfo() { + readers_ = java.util.Collections.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.DocumentProto + .internal_static_google_cloud_discoveryengine_v1beta_Document_AclInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.DocumentProto + .internal_static_google_cloud_discoveryengine_v1beta_Document_AclInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.Document.AclInfo.class, + com.google.cloud.discoveryengine.v1beta.Document.AclInfo.Builder.class); + } + + public interface AccessRestrictionOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.Document.AclInfo.AccessRestriction) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
            +       * List of principals.
            +       * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.Principal principals = 1; + */ + java.util.List getPrincipalsList(); + + /** + * + * + *
            +       * List of principals.
            +       * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.Principal principals = 1; + */ + com.google.cloud.discoveryengine.v1beta.Principal getPrincipals(int index); + + /** + * + * + *
            +       * List of principals.
            +       * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.Principal principals = 1; + */ + int getPrincipalsCount(); + + /** + * + * + *
            +       * List of principals.
            +       * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.Principal principals = 1; + */ + java.util.List + getPrincipalsOrBuilderList(); + + /** + * + * + *
            +       * List of principals.
            +       * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.Principal principals = 1; + */ + com.google.cloud.discoveryengine.v1beta.PrincipalOrBuilder getPrincipalsOrBuilder(int index); + + /** + * + * + *
            +       * All users within the Identity Provider.
            +       * 
            + * + * bool idp_wide = 2; + * + * @return The idpWide. + */ + boolean getIdpWide(); + } + + /** + * + * + *
            +     * AclRestriction to model complex inheritance restrictions.
            +     *
            +     * Example: Modeling a "Both Permit" inheritance, where to access a
            +     * child document, user needs to have access to parent document.
            +     *
            +     * Document Hierarchy - Space_S --> Page_P.
            +     *
            +     * Readers:
            +     * Space_S: group_1, user_1
            +     * Page_P: group_2, group_3, user_2
            +     *
            +     * Space_S ACL Restriction -
            +     * {
            +     * "acl_info": {
            +     * "readers": [
            +     * {
            +     * "principals": [
            +     * {
            +     * "group_id": "group_1"
            +     * },
            +     * {
            +     * "user_id": "user_1"
            +     * }
            +     * ]
            +     * }
            +     * ]
            +     * }
            +     * }
            +     *
            +     * Page_P ACL Restriction.
            +     * {
            +     * "acl_info": {
            +     * "readers": [
            +     * {
            +     * "principals": [
            +     * {
            +     * "group_id": "group_2"
            +     * },
            +     * {
            +     * "group_id": "group_3"
            +     * },
            +     * {
            +     * "user_id": "user_2"
            +     * }
            +     * ],
            +     * },
            +     * {
            +     * "principals": [
            +     * {
            +     * "group_id": "group_1"
            +     * },
            +     * {
            +     * "user_id": "user_1"
            +     * }
            +     * ],
            +     * }
            +     * ]
            +     * }
            +     * }
            +     * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.Document.AclInfo.AccessRestriction} + */ + public static final class AccessRestriction extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.Document.AclInfo.AccessRestriction) + AccessRestrictionOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "AccessRestriction"); + } + + // Use AccessRestriction.newBuilder() to construct. + private AccessRestriction(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private AccessRestriction() { + principals_ = java.util.Collections.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.DocumentProto + .internal_static_google_cloud_discoveryengine_v1beta_Document_AclInfo_AccessRestriction_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.DocumentProto + .internal_static_google_cloud_discoveryengine_v1beta_Document_AclInfo_AccessRestriction_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.Document.AclInfo.AccessRestriction.class, + com.google.cloud.discoveryengine.v1beta.Document.AclInfo.AccessRestriction.Builder + .class); + } + + public static final int PRINCIPALS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List principals_; + + /** + * + * + *
            +       * List of principals.
            +       * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.Principal principals = 1; + */ + @java.lang.Override + public java.util.List getPrincipalsList() { + return principals_; + } + + /** + * + * + *
            +       * List of principals.
            +       * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.Principal principals = 1; + */ + @java.lang.Override + public java.util.List + getPrincipalsOrBuilderList() { + return principals_; + } + + /** + * + * + *
            +       * List of principals.
            +       * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.Principal principals = 1; + */ + @java.lang.Override + public int getPrincipalsCount() { + return principals_.size(); + } + + /** + * + * + *
            +       * List of principals.
            +       * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.Principal principals = 1; + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Principal getPrincipals(int index) { + return principals_.get(index); + } + + /** + * + * + *
            +       * List of principals.
            +       * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.Principal principals = 1; + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.PrincipalOrBuilder getPrincipalsOrBuilder( + int index) { + return principals_.get(index); + } + + public static final int IDP_WIDE_FIELD_NUMBER = 2; + private boolean idpWide_ = false; + + /** + * + * + *
            +       * All users within the Identity Provider.
            +       * 
            + * + * bool idp_wide = 2; + * + * @return The idpWide. + */ + @java.lang.Override + public boolean getIdpWide() { + return idpWide_; + } + + 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 < principals_.size(); i++) { + output.writeMessage(1, principals_.get(i)); + } + if (idpWide_ != false) { + output.writeBool(2, idpWide_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < principals_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, principals_.get(i)); + } + if (idpWide_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, idpWide_); + } + 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.discoveryengine.v1beta.Document.AclInfo.AccessRestriction)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1beta.Document.AclInfo.AccessRestriction other = + (com.google.cloud.discoveryengine.v1beta.Document.AclInfo.AccessRestriction) obj; + + if (!getPrincipalsList().equals(other.getPrincipalsList())) return false; + if (getIdpWide() != other.getIdpWide()) 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 (getPrincipalsCount() > 0) { + hash = (37 * hash) + PRINCIPALS_FIELD_NUMBER; + hash = (53 * hash) + getPrincipalsList().hashCode(); + } + hash = (37 * hash) + IDP_WIDE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getIdpWide()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1beta.Document.AclInfo.AccessRestriction + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.Document.AclInfo.AccessRestriction + 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.discoveryengine.v1beta.Document.AclInfo.AccessRestriction + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.Document.AclInfo.AccessRestriction + 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.discoveryengine.v1beta.Document.AclInfo.AccessRestriction + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.Document.AclInfo.AccessRestriction + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1beta.Document.AclInfo.AccessRestriction + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.Document.AclInfo.AccessRestriction + 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.discoveryengine.v1beta.Document.AclInfo.AccessRestriction + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.Document.AclInfo.AccessRestriction + 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.discoveryengine.v1beta.Document.AclInfo.AccessRestriction + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.Document.AclInfo.AccessRestriction + 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.discoveryengine.v1beta.Document.AclInfo.AccessRestriction 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; + } + + /** + * + * + *
            +       * AclRestriction to model complex inheritance restrictions.
            +       *
            +       * Example: Modeling a "Both Permit" inheritance, where to access a
            +       * child document, user needs to have access to parent document.
            +       *
            +       * Document Hierarchy - Space_S --> Page_P.
            +       *
            +       * Readers:
            +       * Space_S: group_1, user_1
            +       * Page_P: group_2, group_3, user_2
            +       *
            +       * Space_S ACL Restriction -
            +       * {
            +       * "acl_info": {
            +       * "readers": [
            +       * {
            +       * "principals": [
            +       * {
            +       * "group_id": "group_1"
            +       * },
            +       * {
            +       * "user_id": "user_1"
            +       * }
            +       * ]
            +       * }
            +       * ]
            +       * }
            +       * }
            +       *
            +       * Page_P ACL Restriction.
            +       * {
            +       * "acl_info": {
            +       * "readers": [
            +       * {
            +       * "principals": [
            +       * {
            +       * "group_id": "group_2"
            +       * },
            +       * {
            +       * "group_id": "group_3"
            +       * },
            +       * {
            +       * "user_id": "user_2"
            +       * }
            +       * ],
            +       * },
            +       * {
            +       * "principals": [
            +       * {
            +       * "group_id": "group_1"
            +       * },
            +       * {
            +       * "user_id": "user_1"
            +       * }
            +       * ],
            +       * }
            +       * ]
            +       * }
            +       * }
            +       * 
            + * + * Protobuf type {@code + * google.cloud.discoveryengine.v1beta.Document.AclInfo.AccessRestriction} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.Document.AclInfo.AccessRestriction) + com.google.cloud.discoveryengine.v1beta.Document.AclInfo.AccessRestrictionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.DocumentProto + .internal_static_google_cloud_discoveryengine_v1beta_Document_AclInfo_AccessRestriction_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.DocumentProto + .internal_static_google_cloud_discoveryengine_v1beta_Document_AclInfo_AccessRestriction_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.Document.AclInfo.AccessRestriction.class, + com.google.cloud.discoveryengine.v1beta.Document.AclInfo.AccessRestriction.Builder + .class); + } + + // Construct using + // com.google.cloud.discoveryengine.v1beta.Document.AclInfo.AccessRestriction.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (principalsBuilder_ == null) { + principals_ = java.util.Collections.emptyList(); + } else { + principals_ = null; + principalsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + idpWide_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1beta.DocumentProto + .internal_static_google_cloud_discoveryengine_v1beta_Document_AclInfo_AccessRestriction_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Document.AclInfo.AccessRestriction + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1beta.Document.AclInfo.AccessRestriction + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Document.AclInfo.AccessRestriction build() { + com.google.cloud.discoveryengine.v1beta.Document.AclInfo.AccessRestriction result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Document.AclInfo.AccessRestriction + buildPartial() { + com.google.cloud.discoveryengine.v1beta.Document.AclInfo.AccessRestriction result = + new com.google.cloud.discoveryengine.v1beta.Document.AclInfo.AccessRestriction(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.discoveryengine.v1beta.Document.AclInfo.AccessRestriction result) { + if (principalsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + principals_ = java.util.Collections.unmodifiableList(principals_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.principals_ = principals_; + } else { + result.principals_ = principalsBuilder_.build(); + } + } + + private void buildPartial0( + com.google.cloud.discoveryengine.v1beta.Document.AclInfo.AccessRestriction result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.idpWide_ = idpWide_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.discoveryengine.v1beta.Document.AclInfo.AccessRestriction) { + return mergeFrom( + (com.google.cloud.discoveryengine.v1beta.Document.AclInfo.AccessRestriction) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1beta.Document.AclInfo.AccessRestriction other) { + if (other + == com.google.cloud.discoveryengine.v1beta.Document.AclInfo.AccessRestriction + .getDefaultInstance()) return this; + if (principalsBuilder_ == null) { + if (!other.principals_.isEmpty()) { + if (principals_.isEmpty()) { + principals_ = other.principals_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensurePrincipalsIsMutable(); + principals_.addAll(other.principals_); + } + onChanged(); + } + } else { + if (!other.principals_.isEmpty()) { + if (principalsBuilder_.isEmpty()) { + principalsBuilder_.dispose(); + principalsBuilder_ = null; + principals_ = other.principals_; + bitField0_ = (bitField0_ & ~0x00000001); + principalsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetPrincipalsFieldBuilder() + : null; + } else { + principalsBuilder_.addAllMessages(other.principals_); + } + } + } + if (other.getIdpWide() != false) { + setIdpWide(other.getIdpWide()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.discoveryengine.v1beta.Principal m = + input.readMessage( + com.google.cloud.discoveryengine.v1beta.Principal.parser(), + extensionRegistry); + if (principalsBuilder_ == null) { + ensurePrincipalsIsMutable(); + principals_.add(m); + } else { + principalsBuilder_.addMessage(m); + } + break; + } // case 10 + case 16: + { + idpWide_ = input.readBool(); + bitField0_ |= 0x00000002; + break; + } // case 16 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List principals_ = + java.util.Collections.emptyList(); + + private void ensurePrincipalsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + principals_ = + new java.util.ArrayList( + principals_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.discoveryengine.v1beta.Principal, + com.google.cloud.discoveryengine.v1beta.Principal.Builder, + com.google.cloud.discoveryengine.v1beta.PrincipalOrBuilder> + principalsBuilder_; + + /** + * + * + *
            +         * List of principals.
            +         * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.Principal principals = 1; + */ + public java.util.List + getPrincipalsList() { + if (principalsBuilder_ == null) { + return java.util.Collections.unmodifiableList(principals_); + } else { + return principalsBuilder_.getMessageList(); + } + } + + /** + * + * + *
            +         * List of principals.
            +         * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.Principal principals = 1; + */ + public int getPrincipalsCount() { + if (principalsBuilder_ == null) { + return principals_.size(); + } else { + return principalsBuilder_.getCount(); + } + } + + /** + * + * + *
            +         * List of principals.
            +         * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.Principal principals = 1; + */ + public com.google.cloud.discoveryengine.v1beta.Principal getPrincipals(int index) { + if (principalsBuilder_ == null) { + return principals_.get(index); + } else { + return principalsBuilder_.getMessage(index); + } + } + + /** + * + * + *
            +         * List of principals.
            +         * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.Principal principals = 1; + */ + public Builder setPrincipals( + int index, com.google.cloud.discoveryengine.v1beta.Principal value) { + if (principalsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePrincipalsIsMutable(); + principals_.set(index, value); + onChanged(); + } else { + principalsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
            +         * List of principals.
            +         * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.Principal principals = 1; + */ + public Builder setPrincipals( + int index, com.google.cloud.discoveryengine.v1beta.Principal.Builder builderForValue) { + if (principalsBuilder_ == null) { + ensurePrincipalsIsMutable(); + principals_.set(index, builderForValue.build()); + onChanged(); + } else { + principalsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
            +         * List of principals.
            +         * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.Principal principals = 1; + */ + public Builder addPrincipals(com.google.cloud.discoveryengine.v1beta.Principal value) { + if (principalsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePrincipalsIsMutable(); + principals_.add(value); + onChanged(); + } else { + principalsBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
            +         * List of principals.
            +         * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.Principal principals = 1; + */ + public Builder addPrincipals( + int index, com.google.cloud.discoveryengine.v1beta.Principal value) { + if (principalsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePrincipalsIsMutable(); + principals_.add(index, value); + onChanged(); + } else { + principalsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
            +         * List of principals.
            +         * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.Principal principals = 1; + */ + public Builder addPrincipals( + com.google.cloud.discoveryengine.v1beta.Principal.Builder builderForValue) { + if (principalsBuilder_ == null) { + ensurePrincipalsIsMutable(); + principals_.add(builderForValue.build()); + onChanged(); + } else { + principalsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
            +         * List of principals.
            +         * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.Principal principals = 1; + */ + public Builder addPrincipals( + int index, com.google.cloud.discoveryengine.v1beta.Principal.Builder builderForValue) { + if (principalsBuilder_ == null) { + ensurePrincipalsIsMutable(); + principals_.add(index, builderForValue.build()); + onChanged(); + } else { + principalsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
            +         * List of principals.
            +         * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.Principal principals = 1; + */ + public Builder addAllPrincipals( + java.lang.Iterable + values) { + if (principalsBuilder_ == null) { + ensurePrincipalsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, principals_); + onChanged(); + } else { + principalsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
            +         * List of principals.
            +         * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.Principal principals = 1; + */ + public Builder clearPrincipals() { + if (principalsBuilder_ == null) { + principals_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + principalsBuilder_.clear(); + } + return this; + } + + /** + * + * + *
            +         * List of principals.
            +         * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.Principal principals = 1; + */ + public Builder removePrincipals(int index) { + if (principalsBuilder_ == null) { + ensurePrincipalsIsMutable(); + principals_.remove(index); + onChanged(); + } else { + principalsBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
            +         * List of principals.
            +         * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.Principal principals = 1; + */ + public com.google.cloud.discoveryengine.v1beta.Principal.Builder getPrincipalsBuilder( + int index) { + return internalGetPrincipalsFieldBuilder().getBuilder(index); + } + + /** + * + * + *
            +         * List of principals.
            +         * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.Principal principals = 1; + */ + public com.google.cloud.discoveryengine.v1beta.PrincipalOrBuilder getPrincipalsOrBuilder( + int index) { + if (principalsBuilder_ == null) { + return principals_.get(index); + } else { + return principalsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
            +         * List of principals.
            +         * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.Principal principals = 1; + */ + public java.util.List + getPrincipalsOrBuilderList() { + if (principalsBuilder_ != null) { + return principalsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(principals_); + } + } + + /** + * + * + *
            +         * List of principals.
            +         * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.Principal principals = 1; + */ + public com.google.cloud.discoveryengine.v1beta.Principal.Builder addPrincipalsBuilder() { + return internalGetPrincipalsFieldBuilder() + .addBuilder(com.google.cloud.discoveryengine.v1beta.Principal.getDefaultInstance()); + } + + /** + * + * + *
            +         * List of principals.
            +         * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.Principal principals = 1; + */ + public com.google.cloud.discoveryengine.v1beta.Principal.Builder addPrincipalsBuilder( + int index) { + return internalGetPrincipalsFieldBuilder() + .addBuilder( + index, com.google.cloud.discoveryengine.v1beta.Principal.getDefaultInstance()); + } + + /** + * + * + *
            +         * List of principals.
            +         * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.Principal principals = 1; + */ + public java.util.List + getPrincipalsBuilderList() { + return internalGetPrincipalsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.discoveryengine.v1beta.Principal, + com.google.cloud.discoveryengine.v1beta.Principal.Builder, + com.google.cloud.discoveryengine.v1beta.PrincipalOrBuilder> + internalGetPrincipalsFieldBuilder() { + if (principalsBuilder_ == null) { + principalsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.discoveryengine.v1beta.Principal, + com.google.cloud.discoveryengine.v1beta.Principal.Builder, + com.google.cloud.discoveryengine.v1beta.PrincipalOrBuilder>( + principals_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + principals_ = null; + } + return principalsBuilder_; + } + + private boolean idpWide_; + + /** + * + * + *
            +         * All users within the Identity Provider.
            +         * 
            + * + * bool idp_wide = 2; + * + * @return The idpWide. + */ + @java.lang.Override + public boolean getIdpWide() { + return idpWide_; + } + + /** + * + * + *
            +         * All users within the Identity Provider.
            +         * 
            + * + * bool idp_wide = 2; + * + * @param value The idpWide to set. + * @return This builder for chaining. + */ + public Builder setIdpWide(boolean value) { + + idpWide_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
            +         * All users within the Identity Provider.
            +         * 
            + * + * bool idp_wide = 2; + * + * @return This builder for chaining. + */ + public Builder clearIdpWide() { + bitField0_ = (bitField0_ & ~0x00000002); + idpWide_ = false; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.Document.AclInfo.AccessRestriction) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.Document.AclInfo.AccessRestriction) + private static final com.google.cloud.discoveryengine.v1beta.Document.AclInfo + .AccessRestriction + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.discoveryengine.v1beta.Document.AclInfo.AccessRestriction(); + } + + public static com.google.cloud.discoveryengine.v1beta.Document.AclInfo.AccessRestriction + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AccessRestriction parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Document.AclInfo.AccessRestriction + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int READERS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List< + com.google.cloud.discoveryengine.v1beta.Document.AclInfo.AccessRestriction> + readers_; + + /** + * + * + *
            +     * Readers of the document.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Document.AclInfo.AccessRestriction readers = 1; + * + */ + @java.lang.Override + public java.util.List< + com.google.cloud.discoveryengine.v1beta.Document.AclInfo.AccessRestriction> + getReadersList() { + return readers_; + } + + /** + * + * + *
            +     * Readers of the document.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Document.AclInfo.AccessRestriction readers = 1; + * + */ + @java.lang.Override + public java.util.List< + ? extends + com.google.cloud.discoveryengine.v1beta.Document.AclInfo.AccessRestrictionOrBuilder> + getReadersOrBuilderList() { + return readers_; + } + + /** + * + * + *
            +     * Readers of the document.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Document.AclInfo.AccessRestriction readers = 1; + * + */ + @java.lang.Override + public int getReadersCount() { + return readers_.size(); + } + + /** + * + * + *
            +     * Readers of the document.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Document.AclInfo.AccessRestriction readers = 1; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Document.AclInfo.AccessRestriction getReaders( + int index) { + return readers_.get(index); + } + + /** + * + * + *
            +     * Readers of the document.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Document.AclInfo.AccessRestriction readers = 1; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Document.AclInfo.AccessRestrictionOrBuilder + getReadersOrBuilder(int index) { + return readers_.get(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 { + for (int i = 0; i < readers_.size(); i++) { + output.writeMessage(1, readers_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < readers_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, readers_.get(i)); + } + 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.discoveryengine.v1beta.Document.AclInfo)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1beta.Document.AclInfo other = + (com.google.cloud.discoveryengine.v1beta.Document.AclInfo) obj; + + if (!getReadersList().equals(other.getReadersList())) 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 (getReadersCount() > 0) { + hash = (37 * hash) + READERS_FIELD_NUMBER; + hash = (53 * hash) + getReadersList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1beta.Document.AclInfo parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.Document.AclInfo 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.discoveryengine.v1beta.Document.AclInfo parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.Document.AclInfo 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.discoveryengine.v1beta.Document.AclInfo parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.Document.AclInfo parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1beta.Document.AclInfo parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.Document.AclInfo 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.discoveryengine.v1beta.Document.AclInfo parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.Document.AclInfo 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.discoveryengine.v1beta.Document.AclInfo parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.Document.AclInfo 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.discoveryengine.v1beta.Document.AclInfo 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; + } + + /** + * + * + *
            +     * ACL Information of the Document.
            +     * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.Document.AclInfo} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.Document.AclInfo) + com.google.cloud.discoveryengine.v1beta.Document.AclInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.DocumentProto + .internal_static_google_cloud_discoveryengine_v1beta_Document_AclInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.DocumentProto + .internal_static_google_cloud_discoveryengine_v1beta_Document_AclInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.Document.AclInfo.class, + com.google.cloud.discoveryengine.v1beta.Document.AclInfo.Builder.class); + } + + // Construct using com.google.cloud.discoveryengine.v1beta.Document.AclInfo.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (readersBuilder_ == null) { + readers_ = java.util.Collections.emptyList(); + } else { + readers_ = null; + readersBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1beta.DocumentProto + .internal_static_google_cloud_discoveryengine_v1beta_Document_AclInfo_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Document.AclInfo getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1beta.Document.AclInfo.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Document.AclInfo build() { + com.google.cloud.discoveryengine.v1beta.Document.AclInfo result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Document.AclInfo buildPartial() { + com.google.cloud.discoveryengine.v1beta.Document.AclInfo result = + new com.google.cloud.discoveryengine.v1beta.Document.AclInfo(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.discoveryengine.v1beta.Document.AclInfo result) { + if (readersBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + readers_ = java.util.Collections.unmodifiableList(readers_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.readers_ = readers_; + } else { + result.readers_ = readersBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.discoveryengine.v1beta.Document.AclInfo result) { + int from_bitField0_ = bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.discoveryengine.v1beta.Document.AclInfo) { + return mergeFrom((com.google.cloud.discoveryengine.v1beta.Document.AclInfo) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.discoveryengine.v1beta.Document.AclInfo other) { + if (other == com.google.cloud.discoveryengine.v1beta.Document.AclInfo.getDefaultInstance()) + return this; + if (readersBuilder_ == null) { + if (!other.readers_.isEmpty()) { + if (readers_.isEmpty()) { + readers_ = other.readers_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureReadersIsMutable(); + readers_.addAll(other.readers_); + } + onChanged(); + } + } else { + if (!other.readers_.isEmpty()) { + if (readersBuilder_.isEmpty()) { + readersBuilder_.dispose(); + readersBuilder_ = null; + readers_ = other.readers_; + bitField0_ = (bitField0_ & ~0x00000001); + readersBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetReadersFieldBuilder() + : null; + } else { + readersBuilder_.addAllMessages(other.readers_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.discoveryengine.v1beta.Document.AclInfo.AccessRestriction m = + input.readMessage( + com.google.cloud.discoveryengine.v1beta.Document.AclInfo.AccessRestriction + .parser(), + extensionRegistry); + if (readersBuilder_ == null) { + ensureReadersIsMutable(); + readers_.add(m); + } else { + readersBuilder_.addMessage(m); + } + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List< + com.google.cloud.discoveryengine.v1beta.Document.AclInfo.AccessRestriction> + readers_ = java.util.Collections.emptyList(); + + private void ensureReadersIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + readers_ = + new java.util.ArrayList< + com.google.cloud.discoveryengine.v1beta.Document.AclInfo.AccessRestriction>( + readers_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.discoveryengine.v1beta.Document.AclInfo.AccessRestriction, + com.google.cloud.discoveryengine.v1beta.Document.AclInfo.AccessRestriction.Builder, + com.google.cloud.discoveryengine.v1beta.Document.AclInfo.AccessRestrictionOrBuilder> + readersBuilder_; + + /** + * + * + *
            +       * Readers of the document.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Document.AclInfo.AccessRestriction readers = 1; + * + */ + public java.util.List< + com.google.cloud.discoveryengine.v1beta.Document.AclInfo.AccessRestriction> + getReadersList() { + if (readersBuilder_ == null) { + return java.util.Collections.unmodifiableList(readers_); + } else { + return readersBuilder_.getMessageList(); + } + } + + /** + * + * + *
            +       * Readers of the document.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Document.AclInfo.AccessRestriction readers = 1; + * + */ + public int getReadersCount() { + if (readersBuilder_ == null) { + return readers_.size(); + } else { + return readersBuilder_.getCount(); + } + } + + /** + * + * + *
            +       * Readers of the document.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Document.AclInfo.AccessRestriction readers = 1; + * + */ + public com.google.cloud.discoveryengine.v1beta.Document.AclInfo.AccessRestriction getReaders( + int index) { + if (readersBuilder_ == null) { + return readers_.get(index); + } else { + return readersBuilder_.getMessage(index); + } + } + + /** + * + * + *
            +       * Readers of the document.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Document.AclInfo.AccessRestriction readers = 1; + * + */ + public Builder setReaders( + int index, + com.google.cloud.discoveryengine.v1beta.Document.AclInfo.AccessRestriction value) { + if (readersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureReadersIsMutable(); + readers_.set(index, value); + onChanged(); + } else { + readersBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
            +       * Readers of the document.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Document.AclInfo.AccessRestriction readers = 1; + * + */ + public Builder setReaders( + int index, + com.google.cloud.discoveryengine.v1beta.Document.AclInfo.AccessRestriction.Builder + builderForValue) { + if (readersBuilder_ == null) { + ensureReadersIsMutable(); + readers_.set(index, builderForValue.build()); + onChanged(); + } else { + readersBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
            +       * Readers of the document.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Document.AclInfo.AccessRestriction readers = 1; + * + */ + public Builder addReaders( + com.google.cloud.discoveryengine.v1beta.Document.AclInfo.AccessRestriction value) { + if (readersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureReadersIsMutable(); + readers_.add(value); + onChanged(); + } else { + readersBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
            +       * Readers of the document.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Document.AclInfo.AccessRestriction readers = 1; + * + */ + public Builder addReaders( + int index, + com.google.cloud.discoveryengine.v1beta.Document.AclInfo.AccessRestriction value) { + if (readersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureReadersIsMutable(); + readers_.add(index, value); + onChanged(); + } else { + readersBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
            +       * Readers of the document.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Document.AclInfo.AccessRestriction readers = 1; + * + */ + public Builder addReaders( + com.google.cloud.discoveryengine.v1beta.Document.AclInfo.AccessRestriction.Builder + builderForValue) { + if (readersBuilder_ == null) { + ensureReadersIsMutable(); + readers_.add(builderForValue.build()); + onChanged(); + } else { + readersBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
            +       * Readers of the document.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Document.AclInfo.AccessRestriction readers = 1; + * + */ + public Builder addReaders( + int index, + com.google.cloud.discoveryengine.v1beta.Document.AclInfo.AccessRestriction.Builder + builderForValue) { + if (readersBuilder_ == null) { + ensureReadersIsMutable(); + readers_.add(index, builderForValue.build()); + onChanged(); + } else { + readersBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
            +       * Readers of the document.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Document.AclInfo.AccessRestriction readers = 1; + * + */ + public Builder addAllReaders( + java.lang.Iterable< + ? extends + com.google.cloud.discoveryengine.v1beta.Document.AclInfo.AccessRestriction> + values) { + if (readersBuilder_ == null) { + ensureReadersIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, readers_); + onChanged(); + } else { + readersBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
            +       * Readers of the document.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Document.AclInfo.AccessRestriction readers = 1; + * + */ + public Builder clearReaders() { + if (readersBuilder_ == null) { + readers_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + readersBuilder_.clear(); + } + return this; + } + + /** + * + * + *
            +       * Readers of the document.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Document.AclInfo.AccessRestriction readers = 1; + * + */ + public Builder removeReaders(int index) { + if (readersBuilder_ == null) { + ensureReadersIsMutable(); + readers_.remove(index); + onChanged(); + } else { + readersBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
            +       * Readers of the document.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Document.AclInfo.AccessRestriction readers = 1; + * + */ + public com.google.cloud.discoveryengine.v1beta.Document.AclInfo.AccessRestriction.Builder + getReadersBuilder(int index) { + return internalGetReadersFieldBuilder().getBuilder(index); + } + + /** + * + * + *
            +       * Readers of the document.
            +       * 
            * - * @return The bytes for mimeType. + * + * repeated .google.cloud.discoveryengine.v1beta.Document.AclInfo.AccessRestriction readers = 1; + * */ - public com.google.protobuf.ByteString getMimeTypeBytes() { - java.lang.Object ref = mimeType_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - mimeType_ = b; - return b; + public com.google.cloud.discoveryengine.v1beta.Document.AclInfo.AccessRestrictionOrBuilder + getReadersOrBuilder(int index) { + if (readersBuilder_ == null) { + return readers_.get(index); } else { - return (com.google.protobuf.ByteString) ref; + return readersBuilder_.getMessageOrBuilder(index); } } @@ -1231,107 +3654,118 @@ public com.google.protobuf.ByteString getMimeTypeBytes() { * * *
            -       * The MIME type of the content. Supported types:
            -       *
            -       * * `application/pdf` (PDF, only native PDFs are supported for now)
            -       * * `text/html` (HTML)
            -       * * `application/vnd.openxmlformats-officedocument.wordprocessingml.document` (DOCX)
            -       * * `application/vnd.openxmlformats-officedocument.presentationml.presentation` (PPTX)
            -       * * `text/plain` (TXT)
            -       *
            -       * See https://www.iana.org/assignments/media-types/media-types.xhtml.
            +       * Readers of the document.
                    * 
            * - * string mime_type = 1; - * - * @param value The mimeType to set. - * @return This builder for chaining. + * + * repeated .google.cloud.discoveryengine.v1beta.Document.AclInfo.AccessRestriction readers = 1; + * */ - public Builder setMimeType(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); + public java.util.List< + ? extends + com.google.cloud.discoveryengine.v1beta.Document.AclInfo + .AccessRestrictionOrBuilder> + getReadersOrBuilderList() { + if (readersBuilder_ != null) { + return readersBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(readers_); } - mimeType_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; } /** * * *
            -       * The MIME type of the content. Supported types:
            -       *
            -       * * `application/pdf` (PDF, only native PDFs are supported for now)
            -       * * `text/html` (HTML)
            -       * * `application/vnd.openxmlformats-officedocument.wordprocessingml.document` (DOCX)
            -       * * `application/vnd.openxmlformats-officedocument.presentationml.presentation` (PPTX)
            -       * * `text/plain` (TXT)
            -       *
            -       * See https://www.iana.org/assignments/media-types/media-types.xhtml.
            +       * Readers of the document.
                    * 
            * - * string mime_type = 1; - * - * @return This builder for chaining. + * + * repeated .google.cloud.discoveryengine.v1beta.Document.AclInfo.AccessRestriction readers = 1; + * */ - public Builder clearMimeType() { - mimeType_ = getDefaultInstance().getMimeType(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - return this; + public com.google.cloud.discoveryengine.v1beta.Document.AclInfo.AccessRestriction.Builder + addReadersBuilder() { + return internalGetReadersFieldBuilder() + .addBuilder( + com.google.cloud.discoveryengine.v1beta.Document.AclInfo.AccessRestriction + .getDefaultInstance()); } /** * * *
            -       * The MIME type of the content. Supported types:
            +       * Readers of the document.
            +       * 
            * - * * `application/pdf` (PDF, only native PDFs are supported for now) - * * `text/html` (HTML) - * * `application/vnd.openxmlformats-officedocument.wordprocessingml.document` (DOCX) - * * `application/vnd.openxmlformats-officedocument.presentationml.presentation` (PPTX) - * * `text/plain` (TXT) + * + * repeated .google.cloud.discoveryengine.v1beta.Document.AclInfo.AccessRestriction readers = 1; + * + */ + public com.google.cloud.discoveryengine.v1beta.Document.AclInfo.AccessRestriction.Builder + addReadersBuilder(int index) { + return internalGetReadersFieldBuilder() + .addBuilder( + index, + com.google.cloud.discoveryengine.v1beta.Document.AclInfo.AccessRestriction + .getDefaultInstance()); + } + + /** * - * See https://www.iana.org/assignments/media-types/media-types.xhtml. - * * - * string mime_type = 1; + *
            +       * Readers of the document.
            +       * 
            * - * @param value The bytes for mimeType to set. - * @return This builder for chaining. + * + * repeated .google.cloud.discoveryengine.v1beta.Document.AclInfo.AccessRestriction readers = 1; + * */ - public Builder setMimeTypeBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); + public java.util.List< + com.google.cloud.discoveryengine.v1beta.Document.AclInfo.AccessRestriction.Builder> + getReadersBuilderList() { + return internalGetReadersFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.discoveryengine.v1beta.Document.AclInfo.AccessRestriction, + com.google.cloud.discoveryengine.v1beta.Document.AclInfo.AccessRestriction.Builder, + com.google.cloud.discoveryengine.v1beta.Document.AclInfo.AccessRestrictionOrBuilder> + internalGetReadersFieldBuilder() { + if (readersBuilder_ == null) { + readersBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.discoveryengine.v1beta.Document.AclInfo.AccessRestriction, + com.google.cloud.discoveryengine.v1beta.Document.AclInfo.AccessRestriction + .Builder, + com.google.cloud.discoveryengine.v1beta.Document.AclInfo + .AccessRestrictionOrBuilder>( + readers_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + readers_ = null; } - checkByteStringIsUtf8(value); - mimeType_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; + return readersBuilder_; } - // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.Document.Content) + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.Document.AclInfo) } - // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.Document.Content) - private static final com.google.cloud.discoveryengine.v1beta.Document.Content DEFAULT_INSTANCE; + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.Document.AclInfo) + private static final com.google.cloud.discoveryengine.v1beta.Document.AclInfo DEFAULT_INSTANCE; static { - DEFAULT_INSTANCE = new com.google.cloud.discoveryengine.v1beta.Document.Content(); + DEFAULT_INSTANCE = new com.google.cloud.discoveryengine.v1beta.Document.AclInfo(); } - public static com.google.cloud.discoveryengine.v1beta.Document.Content getDefaultInstance() { + public static com.google.cloud.discoveryengine.v1beta.Document.AclInfo getDefaultInstance() { return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { @java.lang.Override - public Content parsePartialFrom( + public AclInfo parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { @@ -1351,17 +3785,17 @@ public Content parsePartialFrom( } }; - public static com.google.protobuf.Parser parser() { + public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override - public com.google.protobuf.Parser getParserForType() { + public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.Document.Content getDefaultInstanceForType() { + public com.google.cloud.discoveryengine.v1beta.Document.AclInfo getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } @@ -1377,6 +3811,8 @@ public interface IndexStatusOrBuilder *
                  * The time when the document was indexed.
                  * If this field is populated, it means the document has been indexed.
            +     * While documents typically become searchable within seconds of indexing,
            +     * it can sometimes take up to a few hours.
                  * 
            * * .google.protobuf.Timestamp index_time = 1; @@ -1391,6 +3827,8 @@ public interface IndexStatusOrBuilder *
                  * The time when the document was indexed.
                  * If this field is populated, it means the document has been indexed.
            +     * While documents typically become searchable within seconds of indexing,
            +     * it can sometimes take up to a few hours.
                  * 
            * * .google.protobuf.Timestamp index_time = 1; @@ -1405,6 +3843,8 @@ public interface IndexStatusOrBuilder *
                  * The time when the document was indexed.
                  * If this field is populated, it means the document has been indexed.
            +     * While documents typically become searchable within seconds of indexing,
            +     * it can sometimes take up to a few hours.
                  * 
            * * .google.protobuf.Timestamp index_time = 1; @@ -1470,6 +3910,34 @@ public interface IndexStatusOrBuilder * repeated .google.rpc.Status error_samples = 2; */ com.google.rpc.StatusOrBuilder getErrorSamplesOrBuilder(int index); + + /** + * + * + *
            +     * Immutable. The message indicates the document index is in progress.
            +     * If this field is populated, the document index is pending.
            +     * 
            + * + * string pending_message = 3 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The pendingMessage. + */ + java.lang.String getPendingMessage(); + + /** + * + * + *
            +     * Immutable. The message indicates the document index is in progress.
            +     * If this field is populated, the document index is pending.
            +     * 
            + * + * string pending_message = 3 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The bytes for pendingMessage. + */ + com.google.protobuf.ByteString getPendingMessageBytes(); } /** @@ -1504,6 +3972,7 @@ private IndexStatus(com.google.protobuf.GeneratedMessage.Builder builder) { private IndexStatus() { errorSamples_ = java.util.Collections.emptyList(); + pendingMessage_ = ""; } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @@ -1531,6 +4000,8 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { *
                  * The time when the document was indexed.
                  * If this field is populated, it means the document has been indexed.
            +     * While documents typically become searchable within seconds of indexing,
            +     * it can sometimes take up to a few hours.
                  * 
            * * .google.protobuf.Timestamp index_time = 1; @@ -1548,6 +4019,8 @@ public boolean hasIndexTime() { *
                  * The time when the document was indexed.
                  * If this field is populated, it means the document has been indexed.
            +     * While documents typically become searchable within seconds of indexing,
            +     * it can sometimes take up to a few hours.
                  * 
            * * .google.protobuf.Timestamp index_time = 1; @@ -1565,6 +4038,8 @@ public com.google.protobuf.Timestamp getIndexTime() { *
                  * The time when the document was indexed.
                  * If this field is populated, it means the document has been indexed.
            +     * While documents typically become searchable within seconds of indexing,
            +     * it can sometimes take up to a few hours.
                  * 
            * * .google.protobuf.Timestamp index_time = 1; @@ -1654,6 +4129,61 @@ public com.google.rpc.StatusOrBuilder getErrorSamplesOrBuilder(int index) { return errorSamples_.get(index); } + public static final int PENDING_MESSAGE_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object pendingMessage_ = ""; + + /** + * + * + *
            +     * Immutable. The message indicates the document index is in progress.
            +     * If this field is populated, the document index is pending.
            +     * 
            + * + * string pending_message = 3 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The pendingMessage. + */ + @java.lang.Override + public java.lang.String getPendingMessage() { + java.lang.Object ref = pendingMessage_; + 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(); + pendingMessage_ = s; + return s; + } + } + + /** + * + * + *
            +     * Immutable. The message indicates the document index is in progress.
            +     * If this field is populated, the document index is pending.
            +     * 
            + * + * string pending_message = 3 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The bytes for pendingMessage. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPendingMessageBytes() { + java.lang.Object ref = pendingMessage_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pendingMessage_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -1674,6 +4204,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < errorSamples_.size(); i++) { output.writeMessage(2, errorSamples_.get(i)); } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pendingMessage_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, pendingMessage_); + } getUnknownFields().writeTo(output); } @@ -1689,6 +4222,9 @@ public int getSerializedSize() { for (int i = 0; i < errorSamples_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, errorSamples_.get(i)); } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pendingMessage_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, pendingMessage_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -1710,6 +4246,7 @@ public boolean equals(final java.lang.Object obj) { if (!getIndexTime().equals(other.getIndexTime())) return false; } if (!getErrorSamplesList().equals(other.getErrorSamplesList())) return false; + if (!getPendingMessage().equals(other.getPendingMessage())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1729,6 +4266,8 @@ public int hashCode() { hash = (37 * hash) + ERROR_SAMPLES_FIELD_NUMBER; hash = (53 * hash) + getErrorSamplesList().hashCode(); } + hash = (37 * hash) + PENDING_MESSAGE_FIELD_NUMBER; + hash = (53 * hash) + getPendingMessage().hashCode(); hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -1892,6 +4431,7 @@ public Builder clear() { errorSamplesBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000002); + pendingMessage_ = ""; return this; } @@ -1949,6 +4489,9 @@ private void buildPartial0( result.indexTime_ = indexTimeBuilder_ == null ? indexTime_ : indexTimeBuilder_.build(); to_bitField0_ |= 0x00000001; } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.pendingMessage_ = pendingMessage_; + } result.bitField0_ |= to_bitField0_; } @@ -1996,6 +4539,11 @@ public Builder mergeFrom(com.google.cloud.discoveryengine.v1beta.Document.IndexS } } } + if (!other.getPendingMessage().isEmpty()) { + pendingMessage_ = other.pendingMessage_; + bitField0_ |= 0x00000004; + onChanged(); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -2041,6 +4589,12 @@ public Builder mergeFrom( } break; } // case 18 + case 26: + { + pendingMessage_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -2073,6 +4627,8 @@ public Builder mergeFrom( *
                    * The time when the document was indexed.
                    * If this field is populated, it means the document has been indexed.
            +       * While documents typically become searchable within seconds of indexing,
            +       * it can sometimes take up to a few hours.
                    * 
            * * .google.protobuf.Timestamp index_time = 1; @@ -2089,6 +4645,8 @@ public boolean hasIndexTime() { *
                    * The time when the document was indexed.
                    * If this field is populated, it means the document has been indexed.
            +       * While documents typically become searchable within seconds of indexing,
            +       * it can sometimes take up to a few hours.
                    * 
            * * .google.protobuf.Timestamp index_time = 1; @@ -2111,6 +4669,8 @@ public com.google.protobuf.Timestamp getIndexTime() { *
                    * The time when the document was indexed.
                    * If this field is populated, it means the document has been indexed.
            +       * While documents typically become searchable within seconds of indexing,
            +       * it can sometimes take up to a few hours.
                    * 
            * * .google.protobuf.Timestamp index_time = 1; @@ -2135,6 +4695,8 @@ public Builder setIndexTime(com.google.protobuf.Timestamp value) { *
                    * The time when the document was indexed.
                    * If this field is populated, it means the document has been indexed.
            +       * While documents typically become searchable within seconds of indexing,
            +       * it can sometimes take up to a few hours.
                    * 
            * * .google.protobuf.Timestamp index_time = 1; @@ -2156,6 +4718,8 @@ public Builder setIndexTime(com.google.protobuf.Timestamp.Builder builderForValu *
                    * The time when the document was indexed.
                    * If this field is populated, it means the document has been indexed.
            +       * While documents typically become searchable within seconds of indexing,
            +       * it can sometimes take up to a few hours.
                    * 
            * * .google.protobuf.Timestamp index_time = 1; @@ -2185,6 +4749,8 @@ public Builder mergeIndexTime(com.google.protobuf.Timestamp value) { *
                    * The time when the document was indexed.
                    * If this field is populated, it means the document has been indexed.
            +       * While documents typically become searchable within seconds of indexing,
            +       * it can sometimes take up to a few hours.
                    * 
            * * .google.protobuf.Timestamp index_time = 1; @@ -2206,6 +4772,8 @@ public Builder clearIndexTime() { *
                    * The time when the document was indexed.
                    * If this field is populated, it means the document has been indexed.
            +       * While documents typically become searchable within seconds of indexing,
            +       * it can sometimes take up to a few hours.
                    * 
            * * .google.protobuf.Timestamp index_time = 1; @@ -2222,6 +4790,8 @@ public com.google.protobuf.Timestamp.Builder getIndexTimeBuilder() { *
                    * The time when the document was indexed.
                    * If this field is populated, it means the document has been indexed.
            +       * While documents typically become searchable within seconds of indexing,
            +       * it can sometimes take up to a few hours.
                    * 
            * * .google.protobuf.Timestamp index_time = 1; @@ -2242,6 +4812,8 @@ public com.google.protobuf.TimestampOrBuilder getIndexTimeOrBuilder() { *
                    * The time when the document was indexed.
                    * If this field is populated, it means the document has been indexed.
            +       * While documents typically become searchable within seconds of indexing,
            +       * it can sometimes take up to a few hours.
                    * 
            * * .google.protobuf.Timestamp index_time = 1; @@ -2619,28 +5191,144 @@ public com.google.rpc.Status.Builder addErrorSamplesBuilder(int index) { * If this field is populated, the document is not indexed due to errors. * * - * repeated .google.rpc.Status error_samples = 2; + * repeated .google.rpc.Status error_samples = 2; + */ + public java.util.List getErrorSamplesBuilderList() { + return internalGetErrorSamplesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> + internalGetErrorSamplesFieldBuilder() { + if (errorSamplesBuilder_ == null) { + errorSamplesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.rpc.Status, + com.google.rpc.Status.Builder, + com.google.rpc.StatusOrBuilder>( + errorSamples_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + errorSamples_ = null; + } + return errorSamplesBuilder_; + } + + private java.lang.Object pendingMessage_ = ""; + + /** + * + * + *
            +       * Immutable. The message indicates the document index is in progress.
            +       * If this field is populated, the document index is pending.
            +       * 
            + * + * string pending_message = 3 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The pendingMessage. + */ + public java.lang.String getPendingMessage() { + java.lang.Object ref = pendingMessage_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pendingMessage_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
            +       * Immutable. The message indicates the document index is in progress.
            +       * If this field is populated, the document index is pending.
            +       * 
            + * + * string pending_message = 3 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The bytes for pendingMessage. + */ + public com.google.protobuf.ByteString getPendingMessageBytes() { + java.lang.Object ref = pendingMessage_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pendingMessage_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
            +       * Immutable. The message indicates the document index is in progress.
            +       * If this field is populated, the document index is pending.
            +       * 
            + * + * string pending_message = 3 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @param value The pendingMessage to set. + * @return This builder for chaining. + */ + public Builder setPendingMessage(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + pendingMessage_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
            +       * Immutable. The message indicates the document index is in progress.
            +       * If this field is populated, the document index is pending.
            +       * 
            + * + * string pending_message = 3 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return This builder for chaining. + */ + public Builder clearPendingMessage() { + pendingMessage_ = getDefaultInstance().getPendingMessage(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
            +       * Immutable. The message indicates the document index is in progress.
            +       * If this field is populated, the document index is pending.
            +       * 
            + * + * string pending_message = 3 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @param value The bytes for pendingMessage to set. + * @return This builder for chaining. */ - public java.util.List getErrorSamplesBuilderList() { - return internalGetErrorSamplesFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilder< - com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> - internalGetErrorSamplesFieldBuilder() { - if (errorSamplesBuilder_ == null) { - errorSamplesBuilder_ = - new com.google.protobuf.RepeatedFieldBuilder< - com.google.rpc.Status, - com.google.rpc.Status.Builder, - com.google.rpc.StatusOrBuilder>( - errorSamples_, - ((bitField0_ & 0x00000002) != 0), - getParentForChildren(), - isClean()); - errorSamples_ = null; + public Builder setPendingMessageBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); } - return errorSamplesBuilder_; + checkByteStringIsUtf8(value); + pendingMessage_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; } // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.Document.IndexStatus) @@ -2963,7 +5651,7 @@ public com.google.protobuf.ByteString getNameBytes() { * Immutable. The identifier of the document. * * Id should conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) - * standard with a length limit of 63 characters. + * standard with a length limit of 128 characters. * * * string id = 2 [(.google.api.field_behavior) = IMMUTABLE]; @@ -2990,7 +5678,7 @@ public java.lang.String getId() { * Immutable. The identifier of the document. * * Id should conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) - * standard with a length limit of 63 characters. + * standard with a length limit of 128 characters. * * * string id = 2 [(.google.api.field_behavior) = IMMUTABLE]; @@ -3070,9 +5758,8 @@ public com.google.protobuf.ByteString getSchemaIdBytes() { * * *
            -   * The unstructured data linked to this document. Content must be set if this
            -   * document is under a
            -   * `CONTENT_REQUIRED` data store.
            +   * The unstructured data linked to this document. Content can only be set
            +   * and must be set if this document is under a `CONTENT_REQUIRED` data store.
                * 
            * * .google.cloud.discoveryengine.v1beta.Document.Content content = 10; @@ -3088,9 +5775,8 @@ public boolean hasContent() { * * *
            -   * The unstructured data linked to this document. Content must be set if this
            -   * document is under a
            -   * `CONTENT_REQUIRED` data store.
            +   * The unstructured data linked to this document. Content can only be set
            +   * and must be set if this document is under a `CONTENT_REQUIRED` data store.
                * 
            * * .google.cloud.discoveryengine.v1beta.Document.Content content = 10; @@ -3108,9 +5794,8 @@ public com.google.cloud.discoveryengine.v1beta.Document.Content getContent() { * * *
            -   * The unstructured data linked to this document. Content must be set if this
            -   * document is under a
            -   * `CONTENT_REQUIRED` data store.
            +   * The unstructured data linked to this document. Content can only be set
            +   * and must be set if this document is under a `CONTENT_REQUIRED` data store.
                * 
            * * .google.cloud.discoveryengine.v1beta.Document.Content content = 10; @@ -3245,6 +5930,59 @@ public com.google.protobuf.StructOrBuilder getDerivedStructDataOrBuilder() { : derivedStructData_; } + public static final int ACL_INFO_FIELD_NUMBER = 11; + private com.google.cloud.discoveryengine.v1beta.Document.AclInfo aclInfo_; + + /** + * + * + *
            +   * Access control information for the document.
            +   * 
            + * + * .google.cloud.discoveryengine.v1beta.Document.AclInfo acl_info = 11; + * + * @return Whether the aclInfo field is set. + */ + @java.lang.Override + public boolean hasAclInfo() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
            +   * Access control information for the document.
            +   * 
            + * + * .google.cloud.discoveryengine.v1beta.Document.AclInfo acl_info = 11; + * + * @return The aclInfo. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Document.AclInfo getAclInfo() { + return aclInfo_ == null + ? com.google.cloud.discoveryengine.v1beta.Document.AclInfo.getDefaultInstance() + : aclInfo_; + } + + /** + * + * + *
            +   * Access control information for the document.
            +   * 
            + * + * .google.cloud.discoveryengine.v1beta.Document.AclInfo acl_info = 11; + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Document.AclInfoOrBuilder getAclInfoOrBuilder() { + return aclInfo_ == null + ? com.google.cloud.discoveryengine.v1beta.Document.AclInfo.getDefaultInstance() + : aclInfo_; + } + public static final int INDEX_TIME_FIELD_NUMBER = 13; private com.google.protobuf.Timestamp indexTime_; @@ -3252,11 +5990,14 @@ public com.google.protobuf.StructOrBuilder getDerivedStructDataOrBuilder() { * * *
            -   * Output only. The last time the document was indexed. If this field is set,
            -   * the document could be returned in search results.
            +   * Output only. The time when the document was last indexed.
                *
            -   * This field is OUTPUT_ONLY. If this field is not populated, it means the
            -   * document has never been indexed.
            +   * If this field is populated, it means the document has been indexed.
            +   * While documents typically become searchable within seconds of indexing,
            +   * it can sometimes take up to a few hours.
            +   *
            +   * If this field is not populated, it means the document has never been
            +   * indexed.
                * 
            * * .google.protobuf.Timestamp index_time = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -3266,18 +6007,21 @@ public com.google.protobuf.StructOrBuilder getDerivedStructDataOrBuilder() { */ @java.lang.Override public boolean hasIndexTime() { - return ((bitField0_ & 0x00000004) != 0); + return ((bitField0_ & 0x00000008) != 0); } /** * * *
            -   * Output only. The last time the document was indexed. If this field is set,
            -   * the document could be returned in search results.
            +   * Output only. The time when the document was last indexed.
            +   *
            +   * If this field is populated, it means the document has been indexed.
            +   * While documents typically become searchable within seconds of indexing,
            +   * it can sometimes take up to a few hours.
                *
            -   * This field is OUTPUT_ONLY. If this field is not populated, it means the
            -   * document has never been indexed.
            +   * If this field is not populated, it means the document has never been
            +   * indexed.
                * 
            * * .google.protobuf.Timestamp index_time = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -3294,11 +6038,14 @@ public com.google.protobuf.Timestamp getIndexTime() { * * *
            -   * Output only. The last time the document was indexed. If this field is set,
            -   * the document could be returned in search results.
            +   * Output only. The time when the document was last indexed.
                *
            -   * This field is OUTPUT_ONLY. If this field is not populated, it means the
            -   * document has never been indexed.
            +   * If this field is populated, it means the document has been indexed.
            +   * While documents typically become searchable within seconds of indexing,
            +   * it can sometimes take up to a few hours.
            +   *
            +   * If this field is not populated, it means the document has never been
            +   * indexed.
                * 
            * * .google.protobuf.Timestamp index_time = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -3321,7 +6068,8 @@ public com.google.protobuf.TimestampOrBuilder getIndexTimeOrBuilder() { * * If document is indexed successfully, the index_time field is populated. * * Otherwise, if document is not indexed due to errors, the error_samples * field is populated. - * * Otherwise, index_status is unset. + * * Otherwise, if document's index is in progress, the pending_message field + * is populated. * * * @@ -3332,7 +6080,7 @@ public com.google.protobuf.TimestampOrBuilder getIndexTimeOrBuilder() { */ @java.lang.Override public boolean hasIndexStatus() { - return ((bitField0_ & 0x00000008) != 0); + return ((bitField0_ & 0x00000010) != 0); } /** @@ -3344,7 +6092,8 @@ public boolean hasIndexStatus() { * * If document is indexed successfully, the index_time field is populated. * * Otherwise, if document is not indexed due to errors, the error_samples * field is populated. - * * Otherwise, index_status is unset. + * * Otherwise, if document's index is in progress, the pending_message field + * is populated. * * * @@ -3369,7 +6118,8 @@ public com.google.cloud.discoveryengine.v1beta.Document.IndexStatus getIndexStat * * If document is indexed successfully, the index_time field is populated. * * Otherwise, if document is not indexed due to errors, the error_samples * field is populated. - * * Otherwise, index_status is unset. + * * Otherwise, if document's index is in progress, the pending_message field + * is populated. * * * @@ -3423,9 +6173,12 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io output.writeMessage(10, getContent()); } if (((bitField0_ & 0x00000004) != 0)) { - output.writeMessage(13, getIndexTime()); + output.writeMessage(11, getAclInfo()); } if (((bitField0_ & 0x00000008) != 0)) { + output.writeMessage(13, getIndexTime()); + } + if (((bitField0_ & 0x00000010) != 0)) { output.writeMessage(15, getIndexStatus()); } getUnknownFields().writeTo(output); @@ -3464,9 +6217,12 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeMessageSize(10, getContent()); } if (((bitField0_ & 0x00000004) != 0)) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(13, getIndexTime()); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(11, getAclInfo()); } if (((bitField0_ & 0x00000008) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(13, getIndexTime()); + } + if (((bitField0_ & 0x00000010) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(15, getIndexStatus()); } size += getUnknownFields().getSerializedSize(); @@ -3497,6 +6253,10 @@ public boolean equals(final java.lang.Object obj) { if (hasDerivedStructData()) { if (!getDerivedStructData().equals(other.getDerivedStructData())) return false; } + if (hasAclInfo() != other.hasAclInfo()) return false; + if (hasAclInfo()) { + if (!getAclInfo().equals(other.getAclInfo())) return false; + } if (hasIndexTime() != other.hasIndexTime()) return false; if (hasIndexTime()) { if (!getIndexTime().equals(other.getIndexTime())) return false; @@ -3543,6 +6303,10 @@ public int hashCode() { hash = (37 * hash) + DERIVED_STRUCT_DATA_FIELD_NUMBER; hash = (53 * hash) + getDerivedStructData().hashCode(); } + if (hasAclInfo()) { + hash = (37 * hash) + ACL_INFO_FIELD_NUMBER; + hash = (53 * hash) + getAclInfo().hashCode(); + } if (hasIndexTime()) { hash = (37 * hash) + INDEX_TIME_FIELD_NUMBER; hash = (53 * hash) + getIndexTime().hashCode(); @@ -3707,6 +6471,7 @@ private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { internalGetContentFieldBuilder(); internalGetDerivedStructDataFieldBuilder(); + internalGetAclInfoFieldBuilder(); internalGetIndexTimeFieldBuilder(); internalGetIndexStatusFieldBuilder(); } @@ -3733,6 +6498,11 @@ public Builder clear() { derivedStructDataBuilder_.dispose(); derivedStructDataBuilder_ = null; } + aclInfo_ = null; + if (aclInfoBuilder_ != null) { + aclInfoBuilder_.dispose(); + aclInfoBuilder_ = null; + } indexTime_ = null; if (indexTimeBuilder_ != null) { indexTimeBuilder_.dispose(); @@ -3807,13 +6577,17 @@ private void buildPartial0(com.google.cloud.discoveryengine.v1beta.Document resu to_bitField0_ |= 0x00000002; } if (((from_bitField0_ & 0x00000100) != 0)) { - result.indexTime_ = indexTimeBuilder_ == null ? indexTime_ : indexTimeBuilder_.build(); + result.aclInfo_ = aclInfoBuilder_ == null ? aclInfo_ : aclInfoBuilder_.build(); to_bitField0_ |= 0x00000004; } if (((from_bitField0_ & 0x00000200) != 0)) { + result.indexTime_ = indexTimeBuilder_ == null ? indexTime_ : indexTimeBuilder_.build(); + to_bitField0_ |= 0x00000008; + } + if (((from_bitField0_ & 0x00000400) != 0)) { result.indexStatus_ = indexStatusBuilder_ == null ? indexStatus_ : indexStatusBuilder_.build(); - to_bitField0_ |= 0x00000008; + to_bitField0_ |= 0x00000010; } result.bitField0_ |= to_bitField0_; } @@ -3865,6 +6639,9 @@ public Builder mergeFrom(com.google.cloud.discoveryengine.v1beta.Document other) if (other.hasDerivedStructData()) { mergeDerivedStructData(other.getDerivedStructData()); } + if (other.hasAclInfo()) { + mergeAclInfo(other.getAclInfo()); + } if (other.hasIndexTime()) { mergeIndexTime(other.getIndexTime()); } @@ -3966,18 +6743,24 @@ public Builder mergeFrom( bitField0_ |= 0x00000020; break; } // case 82 + case 90: + { + input.readMessage(internalGetAclInfoFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000100; + break; + } // case 90 case 106: { input.readMessage( internalGetIndexTimeFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000100; + bitField0_ |= 0x00000200; break; } // case 106 case 122: { input.readMessage( internalGetIndexStatusFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000200; + bitField0_ |= 0x00000400; break; } // case 122 default: @@ -4540,7 +7323,7 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { * Immutable. The identifier of the document. * * Id should conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) - * standard with a length limit of 63 characters. + * standard with a length limit of 128 characters. * * * string id = 2 [(.google.api.field_behavior) = IMMUTABLE]; @@ -4566,7 +7349,7 @@ public java.lang.String getId() { * Immutable. The identifier of the document. * * Id should conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) - * standard with a length limit of 63 characters. + * standard with a length limit of 128 characters. * * * string id = 2 [(.google.api.field_behavior) = IMMUTABLE]; @@ -4592,7 +7375,7 @@ public com.google.protobuf.ByteString getIdBytes() { * Immutable. The identifier of the document. * * Id should conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) - * standard with a length limit of 63 characters. + * standard with a length limit of 128 characters. * * * string id = 2 [(.google.api.field_behavior) = IMMUTABLE]; @@ -4617,7 +7400,7 @@ public Builder setId(java.lang.String value) { * Immutable. The identifier of the document. * * Id should conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) - * standard with a length limit of 63 characters. + * standard with a length limit of 128 characters. * * * string id = 2 [(.google.api.field_behavior) = IMMUTABLE]; @@ -4638,7 +7421,7 @@ public Builder clearId() { * Immutable. The identifier of the document. * * Id should conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) - * standard with a length limit of 63 characters. + * standard with a length limit of 128 characters. * * * string id = 2 [(.google.api.field_behavior) = IMMUTABLE]; @@ -4779,9 +7562,8 @@ public Builder setSchemaIdBytes(com.google.protobuf.ByteString value) { * * *
            -     * The unstructured data linked to this document. Content must be set if this
            -     * document is under a
            -     * `CONTENT_REQUIRED` data store.
            +     * The unstructured data linked to this document. Content can only be set
            +     * and must be set if this document is under a `CONTENT_REQUIRED` data store.
                  * 
            * * .google.cloud.discoveryengine.v1beta.Document.Content content = 10; @@ -4796,9 +7578,8 @@ public boolean hasContent() { * * *
            -     * The unstructured data linked to this document. Content must be set if this
            -     * document is under a
            -     * `CONTENT_REQUIRED` data store.
            +     * The unstructured data linked to this document. Content can only be set
            +     * and must be set if this document is under a `CONTENT_REQUIRED` data store.
                  * 
            * * .google.cloud.discoveryengine.v1beta.Document.Content content = 10; @@ -4819,9 +7600,8 @@ public com.google.cloud.discoveryengine.v1beta.Document.Content getContent() { * * *
            -     * The unstructured data linked to this document. Content must be set if this
            -     * document is under a
            -     * `CONTENT_REQUIRED` data store.
            +     * The unstructured data linked to this document. Content can only be set
            +     * and must be set if this document is under a `CONTENT_REQUIRED` data store.
                  * 
            * * .google.cloud.discoveryengine.v1beta.Document.Content content = 10; @@ -4844,9 +7624,8 @@ public Builder setContent(com.google.cloud.discoveryengine.v1beta.Document.Conte * * *
            -     * The unstructured data linked to this document. Content must be set if this
            -     * document is under a
            -     * `CONTENT_REQUIRED` data store.
            +     * The unstructured data linked to this document. Content can only be set
            +     * and must be set if this document is under a `CONTENT_REQUIRED` data store.
                  * 
            * * .google.cloud.discoveryengine.v1beta.Document.Content content = 10; @@ -4867,9 +7646,8 @@ public Builder setContent( * * *
            -     * The unstructured data linked to this document. Content must be set if this
            -     * document is under a
            -     * `CONTENT_REQUIRED` data store.
            +     * The unstructured data linked to this document. Content can only be set
            +     * and must be set if this document is under a `CONTENT_REQUIRED` data store.
                  * 
            * * .google.cloud.discoveryengine.v1beta.Document.Content content = 10; @@ -4898,9 +7676,8 @@ public Builder mergeContent(com.google.cloud.discoveryengine.v1beta.Document.Con * * *
            -     * The unstructured data linked to this document. Content must be set if this
            -     * document is under a
            -     * `CONTENT_REQUIRED` data store.
            +     * The unstructured data linked to this document. Content can only be set
            +     * and must be set if this document is under a `CONTENT_REQUIRED` data store.
                  * 
            * * .google.cloud.discoveryengine.v1beta.Document.Content content = 10; @@ -4920,9 +7697,8 @@ public Builder clearContent() { * * *
            -     * The unstructured data linked to this document. Content must be set if this
            -     * document is under a
            -     * `CONTENT_REQUIRED` data store.
            +     * The unstructured data linked to this document. Content can only be set
            +     * and must be set if this document is under a `CONTENT_REQUIRED` data store.
                  * 
            * * .google.cloud.discoveryengine.v1beta.Document.Content content = 10; @@ -4937,9 +7713,8 @@ public com.google.cloud.discoveryengine.v1beta.Document.Content.Builder getConte * * *
            -     * The unstructured data linked to this document. Content must be set if this
            -     * document is under a
            -     * `CONTENT_REQUIRED` data store.
            +     * The unstructured data linked to this document. Content can only be set
            +     * and must be set if this document is under a `CONTENT_REQUIRED` data store.
                  * 
            * * .google.cloud.discoveryengine.v1beta.Document.Content content = 10; @@ -4958,9 +7733,8 @@ public com.google.cloud.discoveryengine.v1beta.Document.ContentOrBuilder getCont * * *
            -     * The unstructured data linked to this document. Content must be set if this
            -     * document is under a
            -     * `CONTENT_REQUIRED` data store.
            +     * The unstructured data linked to this document. Content can only be set
            +     * and must be set if this document is under a `CONTENT_REQUIRED` data store.
                  * 
            * * .google.cloud.discoveryengine.v1beta.Document.Content content = 10; @@ -5334,6 +8108,202 @@ public com.google.protobuf.StructOrBuilder getDerivedStructDataOrBuilder() { return derivedStructDataBuilder_; } + private com.google.cloud.discoveryengine.v1beta.Document.AclInfo aclInfo_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.Document.AclInfo, + com.google.cloud.discoveryengine.v1beta.Document.AclInfo.Builder, + com.google.cloud.discoveryengine.v1beta.Document.AclInfoOrBuilder> + aclInfoBuilder_; + + /** + * + * + *
            +     * Access control information for the document.
            +     * 
            + * + * .google.cloud.discoveryengine.v1beta.Document.AclInfo acl_info = 11; + * + * @return Whether the aclInfo field is set. + */ + public boolean hasAclInfo() { + return ((bitField0_ & 0x00000100) != 0); + } + + /** + * + * + *
            +     * Access control information for the document.
            +     * 
            + * + * .google.cloud.discoveryengine.v1beta.Document.AclInfo acl_info = 11; + * + * @return The aclInfo. + */ + public com.google.cloud.discoveryengine.v1beta.Document.AclInfo getAclInfo() { + if (aclInfoBuilder_ == null) { + return aclInfo_ == null + ? com.google.cloud.discoveryengine.v1beta.Document.AclInfo.getDefaultInstance() + : aclInfo_; + } else { + return aclInfoBuilder_.getMessage(); + } + } + + /** + * + * + *
            +     * Access control information for the document.
            +     * 
            + * + * .google.cloud.discoveryengine.v1beta.Document.AclInfo acl_info = 11; + */ + public Builder setAclInfo(com.google.cloud.discoveryengine.v1beta.Document.AclInfo value) { + if (aclInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + aclInfo_ = value; + } else { + aclInfoBuilder_.setMessage(value); + } + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Access control information for the document.
            +     * 
            + * + * .google.cloud.discoveryengine.v1beta.Document.AclInfo acl_info = 11; + */ + public Builder setAclInfo( + com.google.cloud.discoveryengine.v1beta.Document.AclInfo.Builder builderForValue) { + if (aclInfoBuilder_ == null) { + aclInfo_ = builderForValue.build(); + } else { + aclInfoBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Access control information for the document.
            +     * 
            + * + * .google.cloud.discoveryengine.v1beta.Document.AclInfo acl_info = 11; + */ + public Builder mergeAclInfo(com.google.cloud.discoveryengine.v1beta.Document.AclInfo value) { + if (aclInfoBuilder_ == null) { + if (((bitField0_ & 0x00000100) != 0) + && aclInfo_ != null + && aclInfo_ + != com.google.cloud.discoveryengine.v1beta.Document.AclInfo.getDefaultInstance()) { + getAclInfoBuilder().mergeFrom(value); + } else { + aclInfo_ = value; + } + } else { + aclInfoBuilder_.mergeFrom(value); + } + if (aclInfo_ != null) { + bitField0_ |= 0x00000100; + onChanged(); + } + return this; + } + + /** + * + * + *
            +     * Access control information for the document.
            +     * 
            + * + * .google.cloud.discoveryengine.v1beta.Document.AclInfo acl_info = 11; + */ + public Builder clearAclInfo() { + bitField0_ = (bitField0_ & ~0x00000100); + aclInfo_ = null; + if (aclInfoBuilder_ != null) { + aclInfoBuilder_.dispose(); + aclInfoBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
            +     * Access control information for the document.
            +     * 
            + * + * .google.cloud.discoveryengine.v1beta.Document.AclInfo acl_info = 11; + */ + public com.google.cloud.discoveryengine.v1beta.Document.AclInfo.Builder getAclInfoBuilder() { + bitField0_ |= 0x00000100; + onChanged(); + return internalGetAclInfoFieldBuilder().getBuilder(); + } + + /** + * + * + *
            +     * Access control information for the document.
            +     * 
            + * + * .google.cloud.discoveryengine.v1beta.Document.AclInfo acl_info = 11; + */ + public com.google.cloud.discoveryengine.v1beta.Document.AclInfoOrBuilder getAclInfoOrBuilder() { + if (aclInfoBuilder_ != null) { + return aclInfoBuilder_.getMessageOrBuilder(); + } else { + return aclInfo_ == null + ? com.google.cloud.discoveryengine.v1beta.Document.AclInfo.getDefaultInstance() + : aclInfo_; + } + } + + /** + * + * + *
            +     * Access control information for the document.
            +     * 
            + * + * .google.cloud.discoveryengine.v1beta.Document.AclInfo acl_info = 11; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.Document.AclInfo, + com.google.cloud.discoveryengine.v1beta.Document.AclInfo.Builder, + com.google.cloud.discoveryengine.v1beta.Document.AclInfoOrBuilder> + internalGetAclInfoFieldBuilder() { + if (aclInfoBuilder_ == null) { + aclInfoBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.Document.AclInfo, + com.google.cloud.discoveryengine.v1beta.Document.AclInfo.Builder, + com.google.cloud.discoveryengine.v1beta.Document.AclInfoOrBuilder>( + getAclInfo(), getParentForChildren(), isClean()); + aclInfo_ = null; + } + return aclInfoBuilder_; + } + private com.google.protobuf.Timestamp indexTime_; private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, @@ -5345,11 +8315,14 @@ public com.google.protobuf.StructOrBuilder getDerivedStructDataOrBuilder() { * * *
            -     * Output only. The last time the document was indexed. If this field is set,
            -     * the document could be returned in search results.
            +     * Output only. The time when the document was last indexed.
            +     *
            +     * If this field is populated, it means the document has been indexed.
            +     * While documents typically become searchable within seconds of indexing,
            +     * it can sometimes take up to a few hours.
                  *
            -     * This field is OUTPUT_ONLY. If this field is not populated, it means the
            -     * document has never been indexed.
            +     * If this field is not populated, it means the document has never been
            +     * indexed.
                  * 
            * * @@ -5359,18 +8332,21 @@ public com.google.protobuf.StructOrBuilder getDerivedStructDataOrBuilder() { * @return Whether the indexTime field is set. */ public boolean hasIndexTime() { - return ((bitField0_ & 0x00000100) != 0); + return ((bitField0_ & 0x00000200) != 0); } /** * * *
            -     * Output only. The last time the document was indexed. If this field is set,
            -     * the document could be returned in search results.
            +     * Output only. The time when the document was last indexed.
            +     *
            +     * If this field is populated, it means the document has been indexed.
            +     * While documents typically become searchable within seconds of indexing,
            +     * it can sometimes take up to a few hours.
                  *
            -     * This field is OUTPUT_ONLY. If this field is not populated, it means the
            -     * document has never been indexed.
            +     * If this field is not populated, it means the document has never been
            +     * indexed.
                  * 
            * * @@ -5391,11 +8367,14 @@ public com.google.protobuf.Timestamp getIndexTime() { * * *
            -     * Output only. The last time the document was indexed. If this field is set,
            -     * the document could be returned in search results.
            +     * Output only. The time when the document was last indexed.
            +     *
            +     * If this field is populated, it means the document has been indexed.
            +     * While documents typically become searchable within seconds of indexing,
            +     * it can sometimes take up to a few hours.
                  *
            -     * This field is OUTPUT_ONLY. If this field is not populated, it means the
            -     * document has never been indexed.
            +     * If this field is not populated, it means the document has never been
            +     * indexed.
                  * 
            * * @@ -5411,7 +8390,7 @@ public Builder setIndexTime(com.google.protobuf.Timestamp value) { } else { indexTimeBuilder_.setMessage(value); } - bitField0_ |= 0x00000100; + bitField0_ |= 0x00000200; onChanged(); return this; } @@ -5420,11 +8399,14 @@ public Builder setIndexTime(com.google.protobuf.Timestamp value) { * * *
            -     * Output only. The last time the document was indexed. If this field is set,
            -     * the document could be returned in search results.
            +     * Output only. The time when the document was last indexed.
            +     *
            +     * If this field is populated, it means the document has been indexed.
            +     * While documents typically become searchable within seconds of indexing,
            +     * it can sometimes take up to a few hours.
                  *
            -     * This field is OUTPUT_ONLY. If this field is not populated, it means the
            -     * document has never been indexed.
            +     * If this field is not populated, it means the document has never been
            +     * indexed.
                  * 
            * * @@ -5437,7 +8419,7 @@ public Builder setIndexTime(com.google.protobuf.Timestamp.Builder builderForValu } else { indexTimeBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00000100; + bitField0_ |= 0x00000200; onChanged(); return this; } @@ -5446,11 +8428,14 @@ public Builder setIndexTime(com.google.protobuf.Timestamp.Builder builderForValu * * *
            -     * Output only. The last time the document was indexed. If this field is set,
            -     * the document could be returned in search results.
            +     * Output only. The time when the document was last indexed.
            +     *
            +     * If this field is populated, it means the document has been indexed.
            +     * While documents typically become searchable within seconds of indexing,
            +     * it can sometimes take up to a few hours.
                  *
            -     * This field is OUTPUT_ONLY. If this field is not populated, it means the
            -     * document has never been indexed.
            +     * If this field is not populated, it means the document has never been
            +     * indexed.
                  * 
            * * @@ -5459,7 +8444,7 @@ public Builder setIndexTime(com.google.protobuf.Timestamp.Builder builderForValu */ public Builder mergeIndexTime(com.google.protobuf.Timestamp value) { if (indexTimeBuilder_ == null) { - if (((bitField0_ & 0x00000100) != 0) + if (((bitField0_ & 0x00000200) != 0) && indexTime_ != null && indexTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { getIndexTimeBuilder().mergeFrom(value); @@ -5470,7 +8455,7 @@ public Builder mergeIndexTime(com.google.protobuf.Timestamp value) { indexTimeBuilder_.mergeFrom(value); } if (indexTime_ != null) { - bitField0_ |= 0x00000100; + bitField0_ |= 0x00000200; onChanged(); } return this; @@ -5480,11 +8465,14 @@ public Builder mergeIndexTime(com.google.protobuf.Timestamp value) { * * *
            -     * Output only. The last time the document was indexed. If this field is set,
            -     * the document could be returned in search results.
            +     * Output only. The time when the document was last indexed.
            +     *
            +     * If this field is populated, it means the document has been indexed.
            +     * While documents typically become searchable within seconds of indexing,
            +     * it can sometimes take up to a few hours.
                  *
            -     * This field is OUTPUT_ONLY. If this field is not populated, it means the
            -     * document has never been indexed.
            +     * If this field is not populated, it means the document has never been
            +     * indexed.
                  * 
            * * @@ -5492,7 +8480,7 @@ public Builder mergeIndexTime(com.google.protobuf.Timestamp value) { * */ public Builder clearIndexTime() { - bitField0_ = (bitField0_ & ~0x00000100); + bitField0_ = (bitField0_ & ~0x00000200); indexTime_ = null; if (indexTimeBuilder_ != null) { indexTimeBuilder_.dispose(); @@ -5506,11 +8494,14 @@ public Builder clearIndexTime() { * * *
            -     * Output only. The last time the document was indexed. If this field is set,
            -     * the document could be returned in search results.
            +     * Output only. The time when the document was last indexed.
            +     *
            +     * If this field is populated, it means the document has been indexed.
            +     * While documents typically become searchable within seconds of indexing,
            +     * it can sometimes take up to a few hours.
                  *
            -     * This field is OUTPUT_ONLY. If this field is not populated, it means the
            -     * document has never been indexed.
            +     * If this field is not populated, it means the document has never been
            +     * indexed.
                  * 
            * * @@ -5518,7 +8509,7 @@ public Builder clearIndexTime() { * */ public com.google.protobuf.Timestamp.Builder getIndexTimeBuilder() { - bitField0_ |= 0x00000100; + bitField0_ |= 0x00000200; onChanged(); return internalGetIndexTimeFieldBuilder().getBuilder(); } @@ -5527,11 +8518,14 @@ public com.google.protobuf.Timestamp.Builder getIndexTimeBuilder() { * * *
            -     * Output only. The last time the document was indexed. If this field is set,
            -     * the document could be returned in search results.
            +     * Output only. The time when the document was last indexed.
            +     *
            +     * If this field is populated, it means the document has been indexed.
            +     * While documents typically become searchable within seconds of indexing,
            +     * it can sometimes take up to a few hours.
                  *
            -     * This field is OUTPUT_ONLY. If this field is not populated, it means the
            -     * document has never been indexed.
            +     * If this field is not populated, it means the document has never been
            +     * indexed.
                  * 
            * * @@ -5550,11 +8544,14 @@ public com.google.protobuf.TimestampOrBuilder getIndexTimeOrBuilder() { * * *
            -     * Output only. The last time the document was indexed. If this field is set,
            -     * the document could be returned in search results.
            +     * Output only. The time when the document was last indexed.
            +     *
            +     * If this field is populated, it means the document has been indexed.
            +     * While documents typically become searchable within seconds of indexing,
            +     * it can sometimes take up to a few hours.
                  *
            -     * This field is OUTPUT_ONLY. If this field is not populated, it means the
            -     * document has never been indexed.
            +     * If this field is not populated, it means the document has never been
            +     * indexed.
                  * 
            * * @@ -5594,7 +8591,8 @@ public com.google.protobuf.TimestampOrBuilder getIndexTimeOrBuilder() { * * If document is indexed successfully, the index_time field is populated. * * Otherwise, if document is not indexed due to errors, the error_samples * field is populated. - * * Otherwise, index_status is unset. + * * Otherwise, if document's index is in progress, the pending_message field + * is populated. * * * @@ -5604,7 +8602,7 @@ public com.google.protobuf.TimestampOrBuilder getIndexTimeOrBuilder() { * @return Whether the indexStatus field is set. */ public boolean hasIndexStatus() { - return ((bitField0_ & 0x00000200) != 0); + return ((bitField0_ & 0x00000400) != 0); } /** @@ -5616,7 +8614,8 @@ public boolean hasIndexStatus() { * * If document is indexed successfully, the index_time field is populated. * * Otherwise, if document is not indexed due to errors, the error_samples * field is populated. - * * Otherwise, index_status is unset. + * * Otherwise, if document's index is in progress, the pending_message field + * is populated. * * * @@ -5644,7 +8643,8 @@ public com.google.cloud.discoveryengine.v1beta.Document.IndexStatus getIndexStat * * If document is indexed successfully, the index_time field is populated. * * Otherwise, if document is not indexed due to errors, the error_samples * field is populated. - * * Otherwise, index_status is unset. + * * Otherwise, if document's index is in progress, the pending_message field + * is populated. * * * @@ -5661,7 +8661,7 @@ public Builder setIndexStatus( } else { indexStatusBuilder_.setMessage(value); } - bitField0_ |= 0x00000200; + bitField0_ |= 0x00000400; onChanged(); return this; } @@ -5675,7 +8675,8 @@ public Builder setIndexStatus( * * If document is indexed successfully, the index_time field is populated. * * Otherwise, if document is not indexed due to errors, the error_samples * field is populated. - * * Otherwise, index_status is unset. + * * Otherwise, if document's index is in progress, the pending_message field + * is populated. * * * @@ -5689,7 +8690,7 @@ public Builder setIndexStatus( } else { indexStatusBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00000200; + bitField0_ |= 0x00000400; onChanged(); return this; } @@ -5703,7 +8704,8 @@ public Builder setIndexStatus( * * If document is indexed successfully, the index_time field is populated. * * Otherwise, if document is not indexed due to errors, the error_samples * field is populated. - * * Otherwise, index_status is unset. + * * Otherwise, if document's index is in progress, the pending_message field + * is populated. * * * @@ -5713,7 +8715,7 @@ public Builder setIndexStatus( public Builder mergeIndexStatus( com.google.cloud.discoveryengine.v1beta.Document.IndexStatus value) { if (indexStatusBuilder_ == null) { - if (((bitField0_ & 0x00000200) != 0) + if (((bitField0_ & 0x00000400) != 0) && indexStatus_ != null && indexStatus_ != com.google.cloud.discoveryengine.v1beta.Document.IndexStatus @@ -5726,7 +8728,7 @@ public Builder mergeIndexStatus( indexStatusBuilder_.mergeFrom(value); } if (indexStatus_ != null) { - bitField0_ |= 0x00000200; + bitField0_ |= 0x00000400; onChanged(); } return this; @@ -5741,7 +8743,8 @@ public Builder mergeIndexStatus( * * If document is indexed successfully, the index_time field is populated. * * Otherwise, if document is not indexed due to errors, the error_samples * field is populated. - * * Otherwise, index_status is unset. + * * Otherwise, if document's index is in progress, the pending_message field + * is populated. * * * @@ -5749,7 +8752,7 @@ public Builder mergeIndexStatus( * */ public Builder clearIndexStatus() { - bitField0_ = (bitField0_ & ~0x00000200); + bitField0_ = (bitField0_ & ~0x00000400); indexStatus_ = null; if (indexStatusBuilder_ != null) { indexStatusBuilder_.dispose(); @@ -5768,7 +8771,8 @@ public Builder clearIndexStatus() { * * If document is indexed successfully, the index_time field is populated. * * Otherwise, if document is not indexed due to errors, the error_samples * field is populated. - * * Otherwise, index_status is unset. + * * Otherwise, if document's index is in progress, the pending_message field + * is populated. * * * @@ -5777,7 +8781,7 @@ public Builder clearIndexStatus() { */ public com.google.cloud.discoveryengine.v1beta.Document.IndexStatus.Builder getIndexStatusBuilder() { - bitField0_ |= 0x00000200; + bitField0_ |= 0x00000400; onChanged(); return internalGetIndexStatusFieldBuilder().getBuilder(); } @@ -5791,7 +8795,8 @@ public Builder clearIndexStatus() { * * If document is indexed successfully, the index_time field is populated. * * Otherwise, if document is not indexed due to errors, the error_samples * field is populated. - * * Otherwise, index_status is unset. + * * Otherwise, if document's index is in progress, the pending_message field + * is populated. * * * @@ -5818,7 +8823,8 @@ public Builder clearIndexStatus() { * * If document is indexed successfully, the index_time field is populated. * * Otherwise, if document is not indexed due to errors, the error_samples * field is populated. - * * Otherwise, index_status is unset. + * * Otherwise, if document's index is in progress, the pending_message field + * is populated. * * * diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/DocumentInfo.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/DocumentInfo.java index b74c90eb54d2..264bf5e13a65 100644 --- a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/DocumentInfo.java +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/DocumentInfo.java @@ -495,6 +495,53 @@ public boolean getJoined() { return joined_; } + public static final int CONVERSION_VALUE_FIELD_NUMBER = 7; + private float conversionValue_ = 0F; + + /** + * + * + *
            +   * Optional. The conversion value associated with this Document.
            +   * Must be set if
            +   * [UserEvent.event_type][google.cloud.discoveryengine.v1beta.UserEvent.event_type]
            +   * is "conversion".
            +   *
            +   * For example, a value of 1000 signifies that 1000 seconds were spent viewing
            +   * a Document for the `watch` conversion type.
            +   * 
            + * + * optional float conversion_value = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the conversionValue field is set. + */ + @java.lang.Override + public boolean hasConversionValue() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
            +   * Optional. The conversion value associated with this Document.
            +   * Must be set if
            +   * [UserEvent.event_type][google.cloud.discoveryengine.v1beta.UserEvent.event_type]
            +   * is "conversion".
            +   *
            +   * For example, a value of 1000 signifies that 1000 seconds were spent viewing
            +   * a Document for the `watch` conversion type.
            +   * 
            + * + * optional float conversion_value = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The conversionValue. + */ + @java.lang.Override + public float getConversionValue() { + return conversionValue_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -527,6 +574,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (documentDescriptorCase_ == 6) { com.google.protobuf.GeneratedMessage.writeString(output, 6, documentDescriptor_); } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeFloat(7, conversionValue_); + } getUnknownFields().writeTo(output); } @@ -559,6 +609,9 @@ public int getSerializedSize() { if (documentDescriptorCase_ == 6) { size += com.google.protobuf.GeneratedMessage.computeStringSize(6, documentDescriptor_); } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeFloatSize(7, conversionValue_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -581,6 +634,11 @@ public boolean equals(final java.lang.Object obj) { } if (!getPromotionIdsList().equals(other.getPromotionIdsList())) return false; if (getJoined() != other.getJoined()) return false; + if (hasConversionValue() != other.hasConversionValue()) return false; + if (hasConversionValue()) { + if (java.lang.Float.floatToIntBits(getConversionValue()) + != java.lang.Float.floatToIntBits(other.getConversionValue())) return false; + } if (!getDocumentDescriptorCase().equals(other.getDocumentDescriptorCase())) return false; switch (documentDescriptorCase_) { case 1: @@ -616,6 +674,10 @@ public int hashCode() { } hash = (37 * hash) + JOINED_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getJoined()); + if (hasConversionValue()) { + hash = (37 * hash) + CONVERSION_VALUE_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits(getConversionValue()); + } switch (documentDescriptorCase_) { case 1: hash = (37 * hash) + ID_FIELD_NUMBER; @@ -775,6 +837,7 @@ public Builder clear() { quantity_ = 0; promotionIds_ = com.google.protobuf.LazyStringArrayList.emptyList(); joined_ = false; + conversionValue_ = 0F; documentDescriptorCase_ = 0; documentDescriptor_ = null; return this; @@ -826,6 +889,10 @@ private void buildPartial0(com.google.cloud.discoveryengine.v1beta.DocumentInfo if (((from_bitField0_ & 0x00000020) != 0)) { result.joined_ = joined_; } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.conversionValue_ = conversionValue_; + to_bitField0_ |= 0x00000002; + } result.bitField0_ |= to_bitField0_; } @@ -863,6 +930,9 @@ public Builder mergeFrom(com.google.cloud.discoveryengine.v1beta.DocumentInfo ot if (other.getJoined() != false) { setJoined(other.getJoined()); } + if (other.hasConversionValue()) { + setConversionValue(other.getConversionValue()); + } switch (other.getDocumentDescriptorCase()) { case ID: { @@ -956,6 +1026,12 @@ public Builder mergeFrom( documentDescriptor_ = s; break; } // case 50 + case 61: + { + conversionValue_ = input.readFloat(); + bitField0_ |= 0x00000040; + break; + } // case 61 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -1779,6 +1855,102 @@ public Builder clearJoined() { return this; } + private float conversionValue_; + + /** + * + * + *
            +     * Optional. The conversion value associated with this Document.
            +     * Must be set if
            +     * [UserEvent.event_type][google.cloud.discoveryengine.v1beta.UserEvent.event_type]
            +     * is "conversion".
            +     *
            +     * For example, a value of 1000 signifies that 1000 seconds were spent viewing
            +     * a Document for the `watch` conversion type.
            +     * 
            + * + * optional float conversion_value = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the conversionValue field is set. + */ + @java.lang.Override + public boolean hasConversionValue() { + return ((bitField0_ & 0x00000040) != 0); + } + + /** + * + * + *
            +     * Optional. The conversion value associated with this Document.
            +     * Must be set if
            +     * [UserEvent.event_type][google.cloud.discoveryengine.v1beta.UserEvent.event_type]
            +     * is "conversion".
            +     *
            +     * For example, a value of 1000 signifies that 1000 seconds were spent viewing
            +     * a Document for the `watch` conversion type.
            +     * 
            + * + * optional float conversion_value = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The conversionValue. + */ + @java.lang.Override + public float getConversionValue() { + return conversionValue_; + } + + /** + * + * + *
            +     * Optional. The conversion value associated with this Document.
            +     * Must be set if
            +     * [UserEvent.event_type][google.cloud.discoveryengine.v1beta.UserEvent.event_type]
            +     * is "conversion".
            +     *
            +     * For example, a value of 1000 signifies that 1000 seconds were spent viewing
            +     * a Document for the `watch` conversion type.
            +     * 
            + * + * optional float conversion_value = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The conversionValue to set. + * @return This builder for chaining. + */ + public Builder setConversionValue(float value) { + + conversionValue_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Optional. The conversion value associated with this Document.
            +     * Must be set if
            +     * [UserEvent.event_type][google.cloud.discoveryengine.v1beta.UserEvent.event_type]
            +     * is "conversion".
            +     *
            +     * For example, a value of 1000 signifies that 1000 seconds were spent viewing
            +     * a Document for the `watch` conversion type.
            +     * 
            + * + * optional float conversion_value = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearConversionValue() { + bitField0_ = (bitField0_ & ~0x00000040); + conversionValue_ = 0F; + onChanged(); + return this; + } + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.DocumentInfo) } diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/DocumentInfoOrBuilder.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/DocumentInfoOrBuilder.java index 7f50b38a9222..eb9baabf7823 100644 --- a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/DocumentInfoOrBuilder.java +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/DocumentInfoOrBuilder.java @@ -266,6 +266,44 @@ public interface DocumentInfoOrBuilder */ boolean getJoined(); + /** + * + * + *
            +   * Optional. The conversion value associated with this Document.
            +   * Must be set if
            +   * [UserEvent.event_type][google.cloud.discoveryengine.v1beta.UserEvent.event_type]
            +   * is "conversion".
            +   *
            +   * For example, a value of 1000 signifies that 1000 seconds were spent viewing
            +   * a Document for the `watch` conversion type.
            +   * 
            + * + * optional float conversion_value = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the conversionValue field is set. + */ + boolean hasConversionValue(); + + /** + * + * + *
            +   * Optional. The conversion value associated with this Document.
            +   * Must be set if
            +   * [UserEvent.event_type][google.cloud.discoveryengine.v1beta.UserEvent.event_type]
            +   * is "conversion".
            +   *
            +   * For example, a value of 1000 signifies that 1000 seconds were spent viewing
            +   * a Document for the `watch` conversion type.
            +   * 
            + * + * optional float conversion_value = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The conversionValue. + */ + float getConversionValue(); + com.google.cloud.discoveryengine.v1beta.DocumentInfo.DocumentDescriptorCase getDocumentDescriptorCase(); } diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/DocumentOrBuilder.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/DocumentOrBuilder.java index 0b3e0020d8aa..3032ebd1ab63 100644 --- a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/DocumentOrBuilder.java +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/DocumentOrBuilder.java @@ -157,7 +157,7 @@ public interface DocumentOrBuilder * Immutable. The identifier of the document. * * Id should conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) - * standard with a length limit of 63 characters. + * standard with a length limit of 128 characters. * * * string id = 2 [(.google.api.field_behavior) = IMMUTABLE]; @@ -173,7 +173,7 @@ public interface DocumentOrBuilder * Immutable. The identifier of the document. * * Id should conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) - * standard with a length limit of 63 characters. + * standard with a length limit of 128 characters. * * * string id = 2 [(.google.api.field_behavior) = IMMUTABLE]; @@ -212,9 +212,8 @@ public interface DocumentOrBuilder * * *
            -   * The unstructured data linked to this document. Content must be set if this
            -   * document is under a
            -   * `CONTENT_REQUIRED` data store.
            +   * The unstructured data linked to this document. Content can only be set
            +   * and must be set if this document is under a `CONTENT_REQUIRED` data store.
                * 
            * * .google.cloud.discoveryengine.v1beta.Document.Content content = 10; @@ -227,9 +226,8 @@ public interface DocumentOrBuilder * * *
            -   * The unstructured data linked to this document. Content must be set if this
            -   * document is under a
            -   * `CONTENT_REQUIRED` data store.
            +   * The unstructured data linked to this document. Content can only be set
            +   * and must be set if this document is under a `CONTENT_REQUIRED` data store.
                * 
            * * .google.cloud.discoveryengine.v1beta.Document.Content content = 10; @@ -242,9 +240,8 @@ public interface DocumentOrBuilder * * *
            -   * The unstructured data linked to this document. Content must be set if this
            -   * document is under a
            -   * `CONTENT_REQUIRED` data store.
            +   * The unstructured data linked to this document. Content can only be set
            +   * and must be set if this document is under a `CONTENT_REQUIRED` data store.
                * 
            * * .google.cloud.discoveryengine.v1beta.Document.Content content = 10; @@ -335,11 +332,51 @@ public interface DocumentOrBuilder * * *
            -   * Output only. The last time the document was indexed. If this field is set,
            -   * the document could be returned in search results.
            +   * Access control information for the document.
            +   * 
            + * + * .google.cloud.discoveryengine.v1beta.Document.AclInfo acl_info = 11; + * + * @return Whether the aclInfo field is set. + */ + boolean hasAclInfo(); + + /** * - * This field is OUTPUT_ONLY. If this field is not populated, it means the - * document has never been indexed. + * + *
            +   * Access control information for the document.
            +   * 
            + * + * .google.cloud.discoveryengine.v1beta.Document.AclInfo acl_info = 11; + * + * @return The aclInfo. + */ + com.google.cloud.discoveryengine.v1beta.Document.AclInfo getAclInfo(); + + /** + * + * + *
            +   * Access control information for the document.
            +   * 
            + * + * .google.cloud.discoveryengine.v1beta.Document.AclInfo acl_info = 11; + */ + com.google.cloud.discoveryengine.v1beta.Document.AclInfoOrBuilder getAclInfoOrBuilder(); + + /** + * + * + *
            +   * Output only. The time when the document was last indexed.
            +   *
            +   * If this field is populated, it means the document has been indexed.
            +   * While documents typically become searchable within seconds of indexing,
            +   * it can sometimes take up to a few hours.
            +   *
            +   * If this field is not populated, it means the document has never been
            +   * indexed.
                * 
            * * .google.protobuf.Timestamp index_time = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -353,11 +390,14 @@ public interface DocumentOrBuilder * * *
            -   * Output only. The last time the document was indexed. If this field is set,
            -   * the document could be returned in search results.
            +   * Output only. The time when the document was last indexed.
            +   *
            +   * If this field is populated, it means the document has been indexed.
            +   * While documents typically become searchable within seconds of indexing,
            +   * it can sometimes take up to a few hours.
                *
            -   * This field is OUTPUT_ONLY. If this field is not populated, it means the
            -   * document has never been indexed.
            +   * If this field is not populated, it means the document has never been
            +   * indexed.
                * 
            * * .google.protobuf.Timestamp index_time = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -371,11 +411,14 @@ public interface DocumentOrBuilder * * *
            -   * Output only. The last time the document was indexed. If this field is set,
            -   * the document could be returned in search results.
            +   * Output only. The time when the document was last indexed.
            +   *
            +   * If this field is populated, it means the document has been indexed.
            +   * While documents typically become searchable within seconds of indexing,
            +   * it can sometimes take up to a few hours.
                *
            -   * This field is OUTPUT_ONLY. If this field is not populated, it means the
            -   * document has never been indexed.
            +   * If this field is not populated, it means the document has never been
            +   * indexed.
                * 
            * * .google.protobuf.Timestamp index_time = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -392,7 +435,8 @@ public interface DocumentOrBuilder * * If document is indexed successfully, the index_time field is populated. * * Otherwise, if document is not indexed due to errors, the error_samples * field is populated. - * * Otherwise, index_status is unset. + * * Otherwise, if document's index is in progress, the pending_message field + * is populated. * * * @@ -412,7 +456,8 @@ public interface DocumentOrBuilder * * If document is indexed successfully, the index_time field is populated. * * Otherwise, if document is not indexed due to errors, the error_samples * field is populated. - * * Otherwise, index_status is unset. + * * Otherwise, if document's index is in progress, the pending_message field + * is populated. * * * @@ -432,7 +477,8 @@ public interface DocumentOrBuilder * * If document is indexed successfully, the index_time field is populated. * * Otherwise, if document is not indexed due to errors, the error_samples * field is populated. - * * Otherwise, index_status is unset. + * * Otherwise, if document's index is in progress, the pending_message field + * is populated. * * * diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/DocumentProcessingConfig.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/DocumentProcessingConfig.java index 5f692594d674..adb85f006a8f 100644 --- a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/DocumentProcessingConfig.java +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/DocumentProcessingConfig.java @@ -3432,7 +3432,312 @@ public com.google.protobuf.Parser getParserForType() { public interface LayoutParsingConfigOrBuilder extends // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.DocumentProcessingConfig.ParsingConfig.LayoutParsingConfig) - com.google.protobuf.MessageOrBuilder {} + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
            +       * Optional. If true, the LLM based annotation is added to the table
            +       * during parsing.
            +       * 
            + * + * bool enable_table_annotation = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The enableTableAnnotation. + */ + boolean getEnableTableAnnotation(); + + /** + * + * + *
            +       * Optional. If true, the LLM based annotation is added to the image
            +       * during parsing.
            +       * 
            + * + * bool enable_image_annotation = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The enableImageAnnotation. + */ + boolean getEnableImageAnnotation(); + + /** + * + * + *
            +       * Optional. If true, the pdf layout will be refined using an LLM.
            +       * 
            + * + * bool enable_llm_layout_parsing = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The enableLlmLayoutParsing. + */ + boolean getEnableLlmLayoutParsing(); + + /** + * + * + *
            +       * Optional. Contains the required structure types to extract from the
            +       * document. Supported values:
            +       *
            +       * * `shareholder-structure`
            +       * 
            + * + * + * repeated string structured_content_types = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the structuredContentTypes. + */ + java.util.List getStructuredContentTypesList(); + + /** + * + * + *
            +       * Optional. Contains the required structure types to extract from the
            +       * document. Supported values:
            +       *
            +       * * `shareholder-structure`
            +       * 
            + * + * + * repeated string structured_content_types = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The count of structuredContentTypes. + */ + int getStructuredContentTypesCount(); + + /** + * + * + *
            +       * Optional. Contains the required structure types to extract from the
            +       * document. Supported values:
            +       *
            +       * * `shareholder-structure`
            +       * 
            + * + * + * repeated string structured_content_types = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the element to return. + * @return The structuredContentTypes at the given index. + */ + java.lang.String getStructuredContentTypes(int index); + + /** + * + * + *
            +       * Optional. Contains the required structure types to extract from the
            +       * document. Supported values:
            +       *
            +       * * `shareholder-structure`
            +       * 
            + * + * + * repeated string structured_content_types = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the value to return. + * @return The bytes of the structuredContentTypes at the given index. + */ + com.google.protobuf.ByteString getStructuredContentTypesBytes(int index); + + /** + * + * + *
            +       * Optional. List of HTML elements to exclude from the parsed content.
            +       * 
            + * + * repeated string exclude_html_elements = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the excludeHtmlElements. + */ + java.util.List getExcludeHtmlElementsList(); + + /** + * + * + *
            +       * Optional. List of HTML elements to exclude from the parsed content.
            +       * 
            + * + * repeated string exclude_html_elements = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The count of excludeHtmlElements. + */ + int getExcludeHtmlElementsCount(); + + /** + * + * + *
            +       * Optional. List of HTML elements to exclude from the parsed content.
            +       * 
            + * + * repeated string exclude_html_elements = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the element to return. + * @return The excludeHtmlElements at the given index. + */ + java.lang.String getExcludeHtmlElements(int index); + + /** + * + * + *
            +       * Optional. List of HTML elements to exclude from the parsed content.
            +       * 
            + * + * repeated string exclude_html_elements = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the value to return. + * @return The bytes of the excludeHtmlElements at the given index. + */ + com.google.protobuf.ByteString getExcludeHtmlElementsBytes(int index); + + /** + * + * + *
            +       * Optional. List of HTML classes to exclude from the parsed content.
            +       * 
            + * + * repeated string exclude_html_classes = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the excludeHtmlClasses. + */ + java.util.List getExcludeHtmlClassesList(); + + /** + * + * + *
            +       * Optional. List of HTML classes to exclude from the parsed content.
            +       * 
            + * + * repeated string exclude_html_classes = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The count of excludeHtmlClasses. + */ + int getExcludeHtmlClassesCount(); + + /** + * + * + *
            +       * Optional. List of HTML classes to exclude from the parsed content.
            +       * 
            + * + * repeated string exclude_html_classes = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the element to return. + * @return The excludeHtmlClasses at the given index. + */ + java.lang.String getExcludeHtmlClasses(int index); + + /** + * + * + *
            +       * Optional. List of HTML classes to exclude from the parsed content.
            +       * 
            + * + * repeated string exclude_html_classes = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the value to return. + * @return The bytes of the excludeHtmlClasses at the given index. + */ + com.google.protobuf.ByteString getExcludeHtmlClassesBytes(int index); + + /** + * + * + *
            +       * Optional. List of HTML ids to exclude from the parsed content.
            +       * 
            + * + * repeated string exclude_html_ids = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the excludeHtmlIds. + */ + java.util.List getExcludeHtmlIdsList(); + + /** + * + * + *
            +       * Optional. List of HTML ids to exclude from the parsed content.
            +       * 
            + * + * repeated string exclude_html_ids = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The count of excludeHtmlIds. + */ + int getExcludeHtmlIdsCount(); + + /** + * + * + *
            +       * Optional. List of HTML ids to exclude from the parsed content.
            +       * 
            + * + * repeated string exclude_html_ids = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the element to return. + * @return The excludeHtmlIds at the given index. + */ + java.lang.String getExcludeHtmlIds(int index); + + /** + * + * + *
            +       * Optional. List of HTML ids to exclude from the parsed content.
            +       * 
            + * + * repeated string exclude_html_ids = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the value to return. + * @return The bytes of the excludeHtmlIds at the given index. + */ + com.google.protobuf.ByteString getExcludeHtmlIdsBytes(int index); + + /** + * + * + *
            +       * Optional. If true, the processed document will be made available for
            +       * the GetProcessedDocument API.
            +       * 
            + * + * bool enable_get_processed_document = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enableGetProcessedDocument. + */ + boolean getEnableGetProcessedDocument(); + } /** * @@ -3465,7 +3770,12 @@ private LayoutParsingConfig(com.google.protobuf.GeneratedMessage.Builder buil super(builder); } - private LayoutParsingConfig() {} + private LayoutParsingConfig() { + structuredContentTypes_ = com.google.protobuf.LazyStringArrayList.emptyList(); + excludeHtmlElements_ = com.google.protobuf.LazyStringArrayList.emptyList(); + excludeHtmlClasses_ = com.google.protobuf.LazyStringArrayList.emptyList(); + excludeHtmlIds_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.discoveryengine.v1beta.DocumentProcessingConfigProto @@ -3484,338 +3794,2045 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { .LayoutParsingConfig.Builder.class); } - private byte memoizedIsInitialized = -1; + public static final int ENABLE_TABLE_ANNOTATION_FIELD_NUMBER = 1; + private boolean enableTableAnnotation_ = false; + /** + * + * + *
            +       * Optional. If true, the LLM based annotation is added to the table
            +       * during parsing.
            +       * 
            + * + * bool enable_table_annotation = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The enableTableAnnotation. + */ @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; + public boolean getEnableTableAnnotation() { + return enableTableAnnotation_; } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - getUnknownFields().writeTo(output); - } + public static final int ENABLE_IMAGE_ANNOTATION_FIELD_NUMBER = 2; + private boolean enableImageAnnotation_ = false; + /** + * + * + *
            +       * Optional. If true, the LLM based annotation is added to the image
            +       * during parsing.
            +       * 
            + * + * bool enable_image_annotation = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The enableImageAnnotation. + */ @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; + public boolean getEnableImageAnnotation() { + return enableImageAnnotation_; } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj - instanceof - com.google.cloud.discoveryengine.v1beta.DocumentProcessingConfig.ParsingConfig - .LayoutParsingConfig)) { - return super.equals(obj); - } - com.google.cloud.discoveryengine.v1beta.DocumentProcessingConfig.ParsingConfig - .LayoutParsingConfig - other = - (com.google.cloud.discoveryengine.v1beta.DocumentProcessingConfig.ParsingConfig - .LayoutParsingConfig) - obj; - - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } + public static final int ENABLE_LLM_LAYOUT_PARSING_FIELD_NUMBER = 5; + private boolean enableLlmLayoutParsing_ = false; + /** + * + * + *
            +       * Optional. If true, the pdf layout will be refined using an LLM.
            +       * 
            + * + * bool enable_llm_layout_parsing = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The enableLlmLayoutParsing. + */ @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; + public boolean getEnableLlmLayoutParsing() { + return enableLlmLayoutParsing_; } - public static com.google.cloud.discoveryengine.v1beta.DocumentProcessingConfig.ParsingConfig - .LayoutParsingConfig - parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } + public static final int STRUCTURED_CONTENT_TYPES_FIELD_NUMBER = 9; - public static com.google.cloud.discoveryengine.v1beta.DocumentProcessingConfig.ParsingConfig - .LayoutParsingConfig - parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList structuredContentTypes_ = + com.google.protobuf.LazyStringArrayList.emptyList(); - public static com.google.cloud.discoveryengine.v1beta.DocumentProcessingConfig.ParsingConfig - .LayoutParsingConfig - parseFrom(com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); + /** + * + * + *
            +       * Optional. Contains the required structure types to extract from the
            +       * document. Supported values:
            +       *
            +       * * `shareholder-structure`
            +       * 
            + * + * + * repeated string structured_content_types = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the structuredContentTypes. + */ + public com.google.protobuf.ProtocolStringList getStructuredContentTypesList() { + return structuredContentTypes_; } - public static com.google.cloud.discoveryengine.v1beta.DocumentProcessingConfig.ParsingConfig - .LayoutParsingConfig - parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); + /** + * + * + *
            +       * Optional. Contains the required structure types to extract from the
            +       * document. Supported values:
            +       *
            +       * * `shareholder-structure`
            +       * 
            + * + * + * repeated string structured_content_types = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The count of structuredContentTypes. + */ + public int getStructuredContentTypesCount() { + return structuredContentTypes_.size(); } - public static com.google.cloud.discoveryengine.v1beta.DocumentProcessingConfig.ParsingConfig - .LayoutParsingConfig - parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); + /** + * + * + *
            +       * Optional. Contains the required structure types to extract from the
            +       * document. Supported values:
            +       *
            +       * * `shareholder-structure`
            +       * 
            + * + * + * repeated string structured_content_types = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the element to return. + * @return The structuredContentTypes at the given index. + */ + public java.lang.String getStructuredContentTypes(int index) { + return structuredContentTypes_.get(index); } - public static com.google.cloud.discoveryengine.v1beta.DocumentProcessingConfig.ParsingConfig - .LayoutParsingConfig - parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); + /** + * + * + *
            +       * Optional. Contains the required structure types to extract from the
            +       * document. Supported values:
            +       *
            +       * * `shareholder-structure`
            +       * 
            + * + * + * repeated string structured_content_types = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the value to return. + * @return The bytes of the structuredContentTypes at the given index. + */ + public com.google.protobuf.ByteString getStructuredContentTypesBytes(int index) { + return structuredContentTypes_.getByteString(index); } - public static com.google.cloud.discoveryengine.v1beta.DocumentProcessingConfig.ParsingConfig - .LayoutParsingConfig - parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } + public static final int EXCLUDE_HTML_ELEMENTS_FIELD_NUMBER = 10; - public static com.google.cloud.discoveryengine.v1beta.DocumentProcessingConfig.ParsingConfig - .LayoutParsingConfig - parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList excludeHtmlElements_ = + com.google.protobuf.LazyStringArrayList.emptyList(); - public static com.google.cloud.discoveryengine.v1beta.DocumentProcessingConfig.ParsingConfig - .LayoutParsingConfig - parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + /** + * + * + *
            +       * Optional. List of HTML elements to exclude from the parsed content.
            +       * 
            + * + * repeated string exclude_html_elements = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the excludeHtmlElements. + */ + public com.google.protobuf.ProtocolStringList getExcludeHtmlElementsList() { + return excludeHtmlElements_; } - public static com.google.cloud.discoveryengine.v1beta.DocumentProcessingConfig.ParsingConfig - .LayoutParsingConfig - parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); + /** + * + * + *
            +       * Optional. List of HTML elements to exclude from the parsed content.
            +       * 
            + * + * repeated string exclude_html_elements = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The count of excludeHtmlElements. + */ + public int getExcludeHtmlElementsCount() { + return excludeHtmlElements_.size(); } - public static com.google.cloud.discoveryengine.v1beta.DocumentProcessingConfig.ParsingConfig - .LayoutParsingConfig - parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + /** + * + * + *
            +       * Optional. List of HTML elements to exclude from the parsed content.
            +       * 
            + * + * repeated string exclude_html_elements = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the element to return. + * @return The excludeHtmlElements at the given index. + */ + public java.lang.String getExcludeHtmlElements(int index) { + return excludeHtmlElements_.get(index); } - public static com.google.cloud.discoveryengine.v1beta.DocumentProcessingConfig.ParsingConfig - .LayoutParsingConfig - parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); + /** + * + * + *
            +       * Optional. List of HTML elements to exclude from the parsed content.
            +       * 
            + * + * repeated string exclude_html_elements = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the value to return. + * @return The bytes of the excludeHtmlElements at the given index. + */ + public com.google.protobuf.ByteString getExcludeHtmlElementsBytes(int index) { + return excludeHtmlElements_.getByteString(index); } - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } + public static final int EXCLUDE_HTML_CLASSES_FIELD_NUMBER = 11; - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList excludeHtmlClasses_ = + com.google.protobuf.LazyStringArrayList.emptyList(); - public static Builder newBuilder( - com.google.cloud.discoveryengine.v1beta.DocumentProcessingConfig.ParsingConfig - .LayoutParsingConfig - prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + /** + * + * + *
            +       * Optional. List of HTML classes to exclude from the parsed content.
            +       * 
            + * + * repeated string exclude_html_classes = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the excludeHtmlClasses. + */ + public com.google.protobuf.ProtocolStringList getExcludeHtmlClassesList() { + return excludeHtmlClasses_; } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + /** + * + * + *
            +       * Optional. List of HTML classes to exclude from the parsed content.
            +       * 
            + * + * repeated string exclude_html_classes = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The count of excludeHtmlClasses. + */ + public int getExcludeHtmlClassesCount() { + return excludeHtmlClasses_.size(); } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; + /** + * + * + *
            +       * Optional. List of HTML classes to exclude from the parsed content.
            +       * 
            + * + * repeated string exclude_html_classes = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the element to return. + * @return The excludeHtmlClasses at the given index. + */ + public java.lang.String getExcludeHtmlClasses(int index) { + return excludeHtmlClasses_.get(index); } /** * * *
            -       * The layout parsing configurations for documents.
            +       * Optional. List of HTML classes to exclude from the parsed content.
                    * 
            * - * Protobuf type {@code - * google.cloud.discoveryengine.v1beta.DocumentProcessingConfig.ParsingConfig.LayoutParsingConfig} + * repeated string exclude_html_classes = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the value to return. + * @return The bytes of the excludeHtmlClasses at the given index. */ - public static final class Builder - extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.DocumentProcessingConfig.ParsingConfig.LayoutParsingConfig) - com.google.cloud.discoveryengine.v1beta.DocumentProcessingConfig.ParsingConfig + public com.google.protobuf.ByteString getExcludeHtmlClassesBytes(int index) { + return excludeHtmlClasses_.getByteString(index); + } + + public static final int EXCLUDE_HTML_IDS_FIELD_NUMBER = 12; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList excludeHtmlIds_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + /** + * + * + *
            +       * Optional. List of HTML ids to exclude from the parsed content.
            +       * 
            + * + * repeated string exclude_html_ids = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the excludeHtmlIds. + */ + public com.google.protobuf.ProtocolStringList getExcludeHtmlIdsList() { + return excludeHtmlIds_; + } + + /** + * + * + *
            +       * Optional. List of HTML ids to exclude from the parsed content.
            +       * 
            + * + * repeated string exclude_html_ids = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The count of excludeHtmlIds. + */ + public int getExcludeHtmlIdsCount() { + return excludeHtmlIds_.size(); + } + + /** + * + * + *
            +       * Optional. List of HTML ids to exclude from the parsed content.
            +       * 
            + * + * repeated string exclude_html_ids = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the element to return. + * @return The excludeHtmlIds at the given index. + */ + public java.lang.String getExcludeHtmlIds(int index) { + return excludeHtmlIds_.get(index); + } + + /** + * + * + *
            +       * Optional. List of HTML ids to exclude from the parsed content.
            +       * 
            + * + * repeated string exclude_html_ids = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the value to return. + * @return The bytes of the excludeHtmlIds at the given index. + */ + public com.google.protobuf.ByteString getExcludeHtmlIdsBytes(int index) { + return excludeHtmlIds_.getByteString(index); + } + + public static final int ENABLE_GET_PROCESSED_DOCUMENT_FIELD_NUMBER = 14; + private boolean enableGetProcessedDocument_ = false; + + /** + * + * + *
            +       * Optional. If true, the processed document will be made available for
            +       * the GetProcessedDocument API.
            +       * 
            + * + * bool enable_get_processed_document = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enableGetProcessedDocument. + */ + @java.lang.Override + public boolean getEnableGetProcessedDocument() { + return enableGetProcessedDocument_; + } + + 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 (enableTableAnnotation_ != false) { + output.writeBool(1, enableTableAnnotation_); + } + if (enableImageAnnotation_ != false) { + output.writeBool(2, enableImageAnnotation_); + } + if (enableLlmLayoutParsing_ != false) { + output.writeBool(5, enableLlmLayoutParsing_); + } + for (int i = 0; i < structuredContentTypes_.size(); i++) { + com.google.protobuf.GeneratedMessage.writeString( + output, 9, structuredContentTypes_.getRaw(i)); + } + for (int i = 0; i < excludeHtmlElements_.size(); i++) { + com.google.protobuf.GeneratedMessage.writeString( + output, 10, excludeHtmlElements_.getRaw(i)); + } + for (int i = 0; i < excludeHtmlClasses_.size(); i++) { + com.google.protobuf.GeneratedMessage.writeString( + output, 11, excludeHtmlClasses_.getRaw(i)); + } + for (int i = 0; i < excludeHtmlIds_.size(); i++) { + com.google.protobuf.GeneratedMessage.writeString(output, 12, excludeHtmlIds_.getRaw(i)); + } + if (enableGetProcessedDocument_ != false) { + output.writeBool(14, enableGetProcessedDocument_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (enableTableAnnotation_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(1, enableTableAnnotation_); + } + if (enableImageAnnotation_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, enableImageAnnotation_); + } + if (enableLlmLayoutParsing_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(5, enableLlmLayoutParsing_); + } + { + int dataSize = 0; + for (int i = 0; i < structuredContentTypes_.size(); i++) { + dataSize += computeStringSizeNoTag(structuredContentTypes_.getRaw(i)); + } + size += dataSize; + size += 1 * getStructuredContentTypesList().size(); + } + { + int dataSize = 0; + for (int i = 0; i < excludeHtmlElements_.size(); i++) { + dataSize += computeStringSizeNoTag(excludeHtmlElements_.getRaw(i)); + } + size += dataSize; + size += 1 * getExcludeHtmlElementsList().size(); + } + { + int dataSize = 0; + for (int i = 0; i < excludeHtmlClasses_.size(); i++) { + dataSize += computeStringSizeNoTag(excludeHtmlClasses_.getRaw(i)); + } + size += dataSize; + size += 1 * getExcludeHtmlClassesList().size(); + } + { + int dataSize = 0; + for (int i = 0; i < excludeHtmlIds_.size(); i++) { + dataSize += computeStringSizeNoTag(excludeHtmlIds_.getRaw(i)); + } + size += dataSize; + size += 1 * getExcludeHtmlIdsList().size(); + } + if (enableGetProcessedDocument_ != false) { + size += + com.google.protobuf.CodedOutputStream.computeBoolSize( + 14, enableGetProcessedDocument_); + } + 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.discoveryengine.v1beta.DocumentProcessingConfig.ParsingConfig + .LayoutParsingConfig)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1beta.DocumentProcessingConfig.ParsingConfig + .LayoutParsingConfig + other = + (com.google.cloud.discoveryengine.v1beta.DocumentProcessingConfig.ParsingConfig + .LayoutParsingConfig) + obj; + + if (getEnableTableAnnotation() != other.getEnableTableAnnotation()) return false; + if (getEnableImageAnnotation() != other.getEnableImageAnnotation()) return false; + if (getEnableLlmLayoutParsing() != other.getEnableLlmLayoutParsing()) return false; + if (!getStructuredContentTypesList().equals(other.getStructuredContentTypesList())) + return false; + if (!getExcludeHtmlElementsList().equals(other.getExcludeHtmlElementsList())) return false; + if (!getExcludeHtmlClassesList().equals(other.getExcludeHtmlClassesList())) return false; + if (!getExcludeHtmlIdsList().equals(other.getExcludeHtmlIdsList())) return false; + if (getEnableGetProcessedDocument() != other.getEnableGetProcessedDocument()) 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) + ENABLE_TABLE_ANNOTATION_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getEnableTableAnnotation()); + hash = (37 * hash) + ENABLE_IMAGE_ANNOTATION_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getEnableImageAnnotation()); + hash = (37 * hash) + ENABLE_LLM_LAYOUT_PARSING_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getEnableLlmLayoutParsing()); + if (getStructuredContentTypesCount() > 0) { + hash = (37 * hash) + STRUCTURED_CONTENT_TYPES_FIELD_NUMBER; + hash = (53 * hash) + getStructuredContentTypesList().hashCode(); + } + if (getExcludeHtmlElementsCount() > 0) { + hash = (37 * hash) + EXCLUDE_HTML_ELEMENTS_FIELD_NUMBER; + hash = (53 * hash) + getExcludeHtmlElementsList().hashCode(); + } + if (getExcludeHtmlClassesCount() > 0) { + hash = (37 * hash) + EXCLUDE_HTML_CLASSES_FIELD_NUMBER; + hash = (53 * hash) + getExcludeHtmlClassesList().hashCode(); + } + if (getExcludeHtmlIdsCount() > 0) { + hash = (37 * hash) + EXCLUDE_HTML_IDS_FIELD_NUMBER; + hash = (53 * hash) + getExcludeHtmlIdsList().hashCode(); + } + hash = (37 * hash) + ENABLE_GET_PROCESSED_DOCUMENT_FIELD_NUMBER; + hash = + (53 * hash) + com.google.protobuf.Internal.hashBoolean(getEnableGetProcessedDocument()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1beta.DocumentProcessingConfig.ParsingConfig + .LayoutParsingConfig + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.DocumentProcessingConfig.ParsingConfig + .LayoutParsingConfig + 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.discoveryengine.v1beta.DocumentProcessingConfig.ParsingConfig + .LayoutParsingConfig + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.DocumentProcessingConfig.ParsingConfig + .LayoutParsingConfig + 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.discoveryengine.v1beta.DocumentProcessingConfig.ParsingConfig + .LayoutParsingConfig + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.DocumentProcessingConfig.ParsingConfig + .LayoutParsingConfig + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1beta.DocumentProcessingConfig.ParsingConfig + .LayoutParsingConfig + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.DocumentProcessingConfig.ParsingConfig + .LayoutParsingConfig + 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.discoveryengine.v1beta.DocumentProcessingConfig.ParsingConfig + .LayoutParsingConfig + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.DocumentProcessingConfig.ParsingConfig + .LayoutParsingConfig + 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.discoveryengine.v1beta.DocumentProcessingConfig.ParsingConfig + .LayoutParsingConfig + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.DocumentProcessingConfig.ParsingConfig + .LayoutParsingConfig + 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.discoveryengine.v1beta.DocumentProcessingConfig.ParsingConfig + .LayoutParsingConfig + 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; + } + + /** + * + * + *
            +       * The layout parsing configurations for documents.
            +       * 
            + * + * Protobuf type {@code + * google.cloud.discoveryengine.v1beta.DocumentProcessingConfig.ParsingConfig.LayoutParsingConfig} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.DocumentProcessingConfig.ParsingConfig.LayoutParsingConfig) + com.google.cloud.discoveryengine.v1beta.DocumentProcessingConfig.ParsingConfig .LayoutParsingConfigOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.discoveryengine.v1beta.DocumentProcessingConfigProto .internal_static_google_cloud_discoveryengine_v1beta_DocumentProcessingConfig_ParsingConfig_LayoutParsingConfig_descriptor; } - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.discoveryengine.v1beta.DocumentProcessingConfigProto - .internal_static_google_cloud_discoveryengine_v1beta_DocumentProcessingConfig_ParsingConfig_LayoutParsingConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.discoveryengine.v1beta.DocumentProcessingConfig.ParsingConfig - .LayoutParsingConfig.class, - com.google.cloud.discoveryengine.v1beta.DocumentProcessingConfig.ParsingConfig - .LayoutParsingConfig.Builder.class); + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.DocumentProcessingConfigProto + .internal_static_google_cloud_discoveryengine_v1beta_DocumentProcessingConfig_ParsingConfig_LayoutParsingConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.DocumentProcessingConfig.ParsingConfig + .LayoutParsingConfig.class, + com.google.cloud.discoveryengine.v1beta.DocumentProcessingConfig.ParsingConfig + .LayoutParsingConfig.Builder.class); + } + + // Construct using + // com.google.cloud.discoveryengine.v1beta.DocumentProcessingConfig.ParsingConfig.LayoutParsingConfig.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + enableTableAnnotation_ = false; + enableImageAnnotation_ = false; + enableLlmLayoutParsing_ = false; + structuredContentTypes_ = com.google.protobuf.LazyStringArrayList.emptyList(); + excludeHtmlElements_ = com.google.protobuf.LazyStringArrayList.emptyList(); + excludeHtmlClasses_ = com.google.protobuf.LazyStringArrayList.emptyList(); + excludeHtmlIds_ = com.google.protobuf.LazyStringArrayList.emptyList(); + enableGetProcessedDocument_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1beta.DocumentProcessingConfigProto + .internal_static_google_cloud_discoveryengine_v1beta_DocumentProcessingConfig_ParsingConfig_LayoutParsingConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.DocumentProcessingConfig.ParsingConfig + .LayoutParsingConfig + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1beta.DocumentProcessingConfig.ParsingConfig + .LayoutParsingConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.DocumentProcessingConfig.ParsingConfig + .LayoutParsingConfig + build() { + com.google.cloud.discoveryengine.v1beta.DocumentProcessingConfig.ParsingConfig + .LayoutParsingConfig + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.DocumentProcessingConfig.ParsingConfig + .LayoutParsingConfig + buildPartial() { + com.google.cloud.discoveryengine.v1beta.DocumentProcessingConfig.ParsingConfig + .LayoutParsingConfig + result = + new com.google.cloud.discoveryengine.v1beta.DocumentProcessingConfig.ParsingConfig + .LayoutParsingConfig(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.discoveryengine.v1beta.DocumentProcessingConfig.ParsingConfig + .LayoutParsingConfig + result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.enableTableAnnotation_ = enableTableAnnotation_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.enableImageAnnotation_ = enableImageAnnotation_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.enableLlmLayoutParsing_ = enableLlmLayoutParsing_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + structuredContentTypes_.makeImmutable(); + result.structuredContentTypes_ = structuredContentTypes_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + excludeHtmlElements_.makeImmutable(); + result.excludeHtmlElements_ = excludeHtmlElements_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + excludeHtmlClasses_.makeImmutable(); + result.excludeHtmlClasses_ = excludeHtmlClasses_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + excludeHtmlIds_.makeImmutable(); + result.excludeHtmlIds_ = excludeHtmlIds_; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.enableGetProcessedDocument_ = enableGetProcessedDocument_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.discoveryengine.v1beta.DocumentProcessingConfig.ParsingConfig + .LayoutParsingConfig) { + return mergeFrom( + (com.google.cloud.discoveryengine.v1beta.DocumentProcessingConfig.ParsingConfig + .LayoutParsingConfig) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1beta.DocumentProcessingConfig.ParsingConfig + .LayoutParsingConfig + other) { + if (other + == com.google.cloud.discoveryengine.v1beta.DocumentProcessingConfig.ParsingConfig + .LayoutParsingConfig.getDefaultInstance()) return this; + if (other.getEnableTableAnnotation() != false) { + setEnableTableAnnotation(other.getEnableTableAnnotation()); + } + if (other.getEnableImageAnnotation() != false) { + setEnableImageAnnotation(other.getEnableImageAnnotation()); + } + if (other.getEnableLlmLayoutParsing() != false) { + setEnableLlmLayoutParsing(other.getEnableLlmLayoutParsing()); + } + if (!other.structuredContentTypes_.isEmpty()) { + if (structuredContentTypes_.isEmpty()) { + structuredContentTypes_ = other.structuredContentTypes_; + bitField0_ |= 0x00000008; + } else { + ensureStructuredContentTypesIsMutable(); + structuredContentTypes_.addAll(other.structuredContentTypes_); + } + onChanged(); + } + if (!other.excludeHtmlElements_.isEmpty()) { + if (excludeHtmlElements_.isEmpty()) { + excludeHtmlElements_ = other.excludeHtmlElements_; + bitField0_ |= 0x00000010; + } else { + ensureExcludeHtmlElementsIsMutable(); + excludeHtmlElements_.addAll(other.excludeHtmlElements_); + } + onChanged(); + } + if (!other.excludeHtmlClasses_.isEmpty()) { + if (excludeHtmlClasses_.isEmpty()) { + excludeHtmlClasses_ = other.excludeHtmlClasses_; + bitField0_ |= 0x00000020; + } else { + ensureExcludeHtmlClassesIsMutable(); + excludeHtmlClasses_.addAll(other.excludeHtmlClasses_); + } + onChanged(); + } + if (!other.excludeHtmlIds_.isEmpty()) { + if (excludeHtmlIds_.isEmpty()) { + excludeHtmlIds_ = other.excludeHtmlIds_; + bitField0_ |= 0x00000040; + } else { + ensureExcludeHtmlIdsIsMutable(); + excludeHtmlIds_.addAll(other.excludeHtmlIds_); + } + onChanged(); + } + if (other.getEnableGetProcessedDocument() != false) { + setEnableGetProcessedDocument(other.getEnableGetProcessedDocument()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + enableTableAnnotation_ = input.readBool(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 16: + { + enableImageAnnotation_ = input.readBool(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 40: + { + enableLlmLayoutParsing_ = input.readBool(); + bitField0_ |= 0x00000004; + break; + } // case 40 + case 74: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureStructuredContentTypesIsMutable(); + structuredContentTypes_.add(s); + break; + } // case 74 + case 82: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureExcludeHtmlElementsIsMutable(); + excludeHtmlElements_.add(s); + break; + } // case 82 + case 90: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureExcludeHtmlClassesIsMutable(); + excludeHtmlClasses_.add(s); + break; + } // case 90 + case 98: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureExcludeHtmlIdsIsMutable(); + excludeHtmlIds_.add(s); + break; + } // case 98 + case 112: + { + enableGetProcessedDocument_ = input.readBool(); + bitField0_ |= 0x00000080; + break; + } // case 112 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private boolean enableTableAnnotation_; + + /** + * + * + *
            +         * Optional. If true, the LLM based annotation is added to the table
            +         * during parsing.
            +         * 
            + * + * bool enable_table_annotation = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The enableTableAnnotation. + */ + @java.lang.Override + public boolean getEnableTableAnnotation() { + return enableTableAnnotation_; + } + + /** + * + * + *
            +         * Optional. If true, the LLM based annotation is added to the table
            +         * during parsing.
            +         * 
            + * + * bool enable_table_annotation = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The enableTableAnnotation to set. + * @return This builder for chaining. + */ + public Builder setEnableTableAnnotation(boolean value) { + + enableTableAnnotation_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
            +         * Optional. If true, the LLM based annotation is added to the table
            +         * during parsing.
            +         * 
            + * + * bool enable_table_annotation = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearEnableTableAnnotation() { + bitField0_ = (bitField0_ & ~0x00000001); + enableTableAnnotation_ = false; + onChanged(); + return this; + } + + private boolean enableImageAnnotation_; + + /** + * + * + *
            +         * Optional. If true, the LLM based annotation is added to the image
            +         * during parsing.
            +         * 
            + * + * bool enable_image_annotation = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The enableImageAnnotation. + */ + @java.lang.Override + public boolean getEnableImageAnnotation() { + return enableImageAnnotation_; + } + + /** + * + * + *
            +         * Optional. If true, the LLM based annotation is added to the image
            +         * during parsing.
            +         * 
            + * + * bool enable_image_annotation = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The enableImageAnnotation to set. + * @return This builder for chaining. + */ + public Builder setEnableImageAnnotation(boolean value) { + + enableImageAnnotation_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
            +         * Optional. If true, the LLM based annotation is added to the image
            +         * during parsing.
            +         * 
            + * + * bool enable_image_annotation = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearEnableImageAnnotation() { + bitField0_ = (bitField0_ & ~0x00000002); + enableImageAnnotation_ = false; + onChanged(); + return this; + } + + private boolean enableLlmLayoutParsing_; + + /** + * + * + *
            +         * Optional. If true, the pdf layout will be refined using an LLM.
            +         * 
            + * + * bool enable_llm_layout_parsing = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enableLlmLayoutParsing. + */ + @java.lang.Override + public boolean getEnableLlmLayoutParsing() { + return enableLlmLayoutParsing_; + } + + /** + * + * + *
            +         * Optional. If true, the pdf layout will be refined using an LLM.
            +         * 
            + * + * bool enable_llm_layout_parsing = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The enableLlmLayoutParsing to set. + * @return This builder for chaining. + */ + public Builder setEnableLlmLayoutParsing(boolean value) { + + enableLlmLayoutParsing_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
            +         * Optional. If true, the pdf layout will be refined using an LLM.
            +         * 
            + * + * bool enable_llm_layout_parsing = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearEnableLlmLayoutParsing() { + bitField0_ = (bitField0_ & ~0x00000004); + enableLlmLayoutParsing_ = false; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList structuredContentTypes_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureStructuredContentTypesIsMutable() { + if (!structuredContentTypes_.isModifiable()) { + structuredContentTypes_ = + new com.google.protobuf.LazyStringArrayList(structuredContentTypes_); + } + bitField0_ |= 0x00000008; + } + + /** + * + * + *
            +         * Optional. Contains the required structure types to extract from the
            +         * document. Supported values:
            +         *
            +         * * `shareholder-structure`
            +         * 
            + * + * + * repeated string structured_content_types = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the structuredContentTypes. + */ + public com.google.protobuf.ProtocolStringList getStructuredContentTypesList() { + structuredContentTypes_.makeImmutable(); + return structuredContentTypes_; + } + + /** + * + * + *
            +         * Optional. Contains the required structure types to extract from the
            +         * document. Supported values:
            +         *
            +         * * `shareholder-structure`
            +         * 
            + * + * + * repeated string structured_content_types = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The count of structuredContentTypes. + */ + public int getStructuredContentTypesCount() { + return structuredContentTypes_.size(); + } + + /** + * + * + *
            +         * Optional. Contains the required structure types to extract from the
            +         * document. Supported values:
            +         *
            +         * * `shareholder-structure`
            +         * 
            + * + * + * repeated string structured_content_types = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the element to return. + * @return The structuredContentTypes at the given index. + */ + public java.lang.String getStructuredContentTypes(int index) { + return structuredContentTypes_.get(index); + } + + /** + * + * + *
            +         * Optional. Contains the required structure types to extract from the
            +         * document. Supported values:
            +         *
            +         * * `shareholder-structure`
            +         * 
            + * + * + * repeated string structured_content_types = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the value to return. + * @return The bytes of the structuredContentTypes at the given index. + */ + public com.google.protobuf.ByteString getStructuredContentTypesBytes(int index) { + return structuredContentTypes_.getByteString(index); + } + + /** + * + * + *
            +         * Optional. Contains the required structure types to extract from the
            +         * document. Supported values:
            +         *
            +         * * `shareholder-structure`
            +         * 
            + * + * + * repeated string structured_content_types = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index to set the value at. + * @param value The structuredContentTypes to set. + * @return This builder for chaining. + */ + public Builder setStructuredContentTypes(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureStructuredContentTypesIsMutable(); + structuredContentTypes_.set(index, value); + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
            +         * Optional. Contains the required structure types to extract from the
            +         * document. Supported values:
            +         *
            +         * * `shareholder-structure`
            +         * 
            + * + * + * repeated string structured_content_types = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The structuredContentTypes to add. + * @return This builder for chaining. + */ + public Builder addStructuredContentTypes(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureStructuredContentTypesIsMutable(); + structuredContentTypes_.add(value); + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
            +         * Optional. Contains the required structure types to extract from the
            +         * document. Supported values:
            +         *
            +         * * `shareholder-structure`
            +         * 
            + * + * + * repeated string structured_content_types = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param values The structuredContentTypes to add. + * @return This builder for chaining. + */ + public Builder addAllStructuredContentTypes(java.lang.Iterable values) { + ensureStructuredContentTypesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, structuredContentTypes_); + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
            +         * Optional. Contains the required structure types to extract from the
            +         * document. Supported values:
            +         *
            +         * * `shareholder-structure`
            +         * 
            + * + * + * repeated string structured_content_types = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearStructuredContentTypes() { + structuredContentTypes_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + ; + onChanged(); + return this; + } + + /** + * + * + *
            +         * Optional. Contains the required structure types to extract from the
            +         * document. Supported values:
            +         *
            +         * * `shareholder-structure`
            +         * 
            + * + * + * repeated string structured_content_types = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The bytes of the structuredContentTypes to add. + * @return This builder for chaining. + */ + public Builder addStructuredContentTypesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureStructuredContentTypesIsMutable(); + structuredContentTypes_.add(value); + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList excludeHtmlElements_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureExcludeHtmlElementsIsMutable() { + if (!excludeHtmlElements_.isModifiable()) { + excludeHtmlElements_ = + new com.google.protobuf.LazyStringArrayList(excludeHtmlElements_); + } + bitField0_ |= 0x00000010; + } + + /** + * + * + *
            +         * Optional. List of HTML elements to exclude from the parsed content.
            +         * 
            + * + * + * repeated string exclude_html_elements = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the excludeHtmlElements. + */ + public com.google.protobuf.ProtocolStringList getExcludeHtmlElementsList() { + excludeHtmlElements_.makeImmutable(); + return excludeHtmlElements_; + } + + /** + * + * + *
            +         * Optional. List of HTML elements to exclude from the parsed content.
            +         * 
            + * + * + * repeated string exclude_html_elements = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The count of excludeHtmlElements. + */ + public int getExcludeHtmlElementsCount() { + return excludeHtmlElements_.size(); + } + + /** + * + * + *
            +         * Optional. List of HTML elements to exclude from the parsed content.
            +         * 
            + * + * + * repeated string exclude_html_elements = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the element to return. + * @return The excludeHtmlElements at the given index. + */ + public java.lang.String getExcludeHtmlElements(int index) { + return excludeHtmlElements_.get(index); + } + + /** + * + * + *
            +         * Optional. List of HTML elements to exclude from the parsed content.
            +         * 
            + * + * + * repeated string exclude_html_elements = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the value to return. + * @return The bytes of the excludeHtmlElements at the given index. + */ + public com.google.protobuf.ByteString getExcludeHtmlElementsBytes(int index) { + return excludeHtmlElements_.getByteString(index); + } + + /** + * + * + *
            +         * Optional. List of HTML elements to exclude from the parsed content.
            +         * 
            + * + * + * repeated string exclude_html_elements = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index to set the value at. + * @param value The excludeHtmlElements to set. + * @return This builder for chaining. + */ + public Builder setExcludeHtmlElements(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureExcludeHtmlElementsIsMutable(); + excludeHtmlElements_.set(index, value); + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
            +         * Optional. List of HTML elements to exclude from the parsed content.
            +         * 
            + * + * + * repeated string exclude_html_elements = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The excludeHtmlElements to add. + * @return This builder for chaining. + */ + public Builder addExcludeHtmlElements(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureExcludeHtmlElementsIsMutable(); + excludeHtmlElements_.add(value); + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
            +         * Optional. List of HTML elements to exclude from the parsed content.
            +         * 
            + * + * + * repeated string exclude_html_elements = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param values The excludeHtmlElements to add. + * @return This builder for chaining. + */ + public Builder addAllExcludeHtmlElements(java.lang.Iterable values) { + ensureExcludeHtmlElementsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, excludeHtmlElements_); + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
            +         * Optional. List of HTML elements to exclude from the parsed content.
            +         * 
            + * + * + * repeated string exclude_html_elements = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearExcludeHtmlElements() { + excludeHtmlElements_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000010); + ; + onChanged(); + return this; + } + + /** + * + * + *
            +         * Optional. List of HTML elements to exclude from the parsed content.
            +         * 
            + * + * + * repeated string exclude_html_elements = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The bytes of the excludeHtmlElements to add. + * @return This builder for chaining. + */ + public Builder addExcludeHtmlElementsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureExcludeHtmlElementsIsMutable(); + excludeHtmlElements_.add(value); + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList excludeHtmlClasses_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureExcludeHtmlClassesIsMutable() { + if (!excludeHtmlClasses_.isModifiable()) { + excludeHtmlClasses_ = new com.google.protobuf.LazyStringArrayList(excludeHtmlClasses_); + } + bitField0_ |= 0x00000020; + } + + /** + * + * + *
            +         * Optional. List of HTML classes to exclude from the parsed content.
            +         * 
            + * + * + * repeated string exclude_html_classes = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the excludeHtmlClasses. + */ + public com.google.protobuf.ProtocolStringList getExcludeHtmlClassesList() { + excludeHtmlClasses_.makeImmutable(); + return excludeHtmlClasses_; + } + + /** + * + * + *
            +         * Optional. List of HTML classes to exclude from the parsed content.
            +         * 
            + * + * + * repeated string exclude_html_classes = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The count of excludeHtmlClasses. + */ + public int getExcludeHtmlClassesCount() { + return excludeHtmlClasses_.size(); + } + + /** + * + * + *
            +         * Optional. List of HTML classes to exclude from the parsed content.
            +         * 
            + * + * + * repeated string exclude_html_classes = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the element to return. + * @return The excludeHtmlClasses at the given index. + */ + public java.lang.String getExcludeHtmlClasses(int index) { + return excludeHtmlClasses_.get(index); + } + + /** + * + * + *
            +         * Optional. List of HTML classes to exclude from the parsed content.
            +         * 
            + * + * + * repeated string exclude_html_classes = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the value to return. + * @return The bytes of the excludeHtmlClasses at the given index. + */ + public com.google.protobuf.ByteString getExcludeHtmlClassesBytes(int index) { + return excludeHtmlClasses_.getByteString(index); + } + + /** + * + * + *
            +         * Optional. List of HTML classes to exclude from the parsed content.
            +         * 
            + * + * + * repeated string exclude_html_classes = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index to set the value at. + * @param value The excludeHtmlClasses to set. + * @return This builder for chaining. + */ + public Builder setExcludeHtmlClasses(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureExcludeHtmlClassesIsMutable(); + excludeHtmlClasses_.set(index, value); + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
            +         * Optional. List of HTML classes to exclude from the parsed content.
            +         * 
            + * + * + * repeated string exclude_html_classes = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The excludeHtmlClasses to add. + * @return This builder for chaining. + */ + public Builder addExcludeHtmlClasses(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureExcludeHtmlClassesIsMutable(); + excludeHtmlClasses_.add(value); + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
            +         * Optional. List of HTML classes to exclude from the parsed content.
            +         * 
            + * + * + * repeated string exclude_html_classes = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param values The excludeHtmlClasses to add. + * @return This builder for chaining. + */ + public Builder addAllExcludeHtmlClasses(java.lang.Iterable values) { + ensureExcludeHtmlClassesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, excludeHtmlClasses_); + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
            +         * Optional. List of HTML classes to exclude from the parsed content.
            +         * 
            + * + * + * repeated string exclude_html_classes = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearExcludeHtmlClasses() { + excludeHtmlClasses_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000020); + ; + onChanged(); + return this; + } + + /** + * + * + *
            +         * Optional. List of HTML classes to exclude from the parsed content.
            +         * 
            + * + * + * repeated string exclude_html_classes = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The bytes of the excludeHtmlClasses to add. + * @return This builder for chaining. + */ + public Builder addExcludeHtmlClassesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureExcludeHtmlClassesIsMutable(); + excludeHtmlClasses_.add(value); + bitField0_ |= 0x00000020; + onChanged(); + return this; } - // Construct using - // com.google.cloud.discoveryengine.v1beta.DocumentProcessingConfig.ParsingConfig.LayoutParsingConfig.newBuilder() - private Builder() {} + private com.google.protobuf.LazyStringArrayList excludeHtmlIds_ = + com.google.protobuf.LazyStringArrayList.emptyList(); - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); + private void ensureExcludeHtmlIdsIsMutable() { + if (!excludeHtmlIds_.isModifiable()) { + excludeHtmlIds_ = new com.google.protobuf.LazyStringArrayList(excludeHtmlIds_); + } + bitField0_ |= 0x00000040; } - @java.lang.Override - public Builder clear() { - super.clear(); - return this; + /** + * + * + *
            +         * Optional. List of HTML ids to exclude from the parsed content.
            +         * 
            + * + * repeated string exclude_html_ids = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the excludeHtmlIds. + */ + public com.google.protobuf.ProtocolStringList getExcludeHtmlIdsList() { + excludeHtmlIds_.makeImmutable(); + return excludeHtmlIds_; } - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.discoveryengine.v1beta.DocumentProcessingConfigProto - .internal_static_google_cloud_discoveryengine_v1beta_DocumentProcessingConfig_ParsingConfig_LayoutParsingConfig_descriptor; + /** + * + * + *
            +         * Optional. List of HTML ids to exclude from the parsed content.
            +         * 
            + * + * repeated string exclude_html_ids = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The count of excludeHtmlIds. + */ + public int getExcludeHtmlIdsCount() { + return excludeHtmlIds_.size(); } - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.DocumentProcessingConfig.ParsingConfig - .LayoutParsingConfig - getDefaultInstanceForType() { - return com.google.cloud.discoveryengine.v1beta.DocumentProcessingConfig.ParsingConfig - .LayoutParsingConfig.getDefaultInstance(); + /** + * + * + *
            +         * Optional. List of HTML ids to exclude from the parsed content.
            +         * 
            + * + * repeated string exclude_html_ids = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the element to return. + * @return The excludeHtmlIds at the given index. + */ + public java.lang.String getExcludeHtmlIds(int index) { + return excludeHtmlIds_.get(index); } - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.DocumentProcessingConfig.ParsingConfig - .LayoutParsingConfig - build() { - com.google.cloud.discoveryengine.v1beta.DocumentProcessingConfig.ParsingConfig - .LayoutParsingConfig - result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; + /** + * + * + *
            +         * Optional. List of HTML ids to exclude from the parsed content.
            +         * 
            + * + * repeated string exclude_html_ids = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the value to return. + * @return The bytes of the excludeHtmlIds at the given index. + */ + public com.google.protobuf.ByteString getExcludeHtmlIdsBytes(int index) { + return excludeHtmlIds_.getByteString(index); } - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.DocumentProcessingConfig.ParsingConfig - .LayoutParsingConfig - buildPartial() { - com.google.cloud.discoveryengine.v1beta.DocumentProcessingConfig.ParsingConfig - .LayoutParsingConfig - result = - new com.google.cloud.discoveryengine.v1beta.DocumentProcessingConfig.ParsingConfig - .LayoutParsingConfig(this); - onBuilt(); - return result; + /** + * + * + *
            +         * Optional. List of HTML ids to exclude from the parsed content.
            +         * 
            + * + * repeated string exclude_html_ids = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index to set the value at. + * @param value The excludeHtmlIds to set. + * @return This builder for chaining. + */ + public Builder setExcludeHtmlIds(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureExcludeHtmlIdsIsMutable(); + excludeHtmlIds_.set(index, value); + bitField0_ |= 0x00000040; + onChanged(); + return this; } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other - instanceof - com.google.cloud.discoveryengine.v1beta.DocumentProcessingConfig.ParsingConfig - .LayoutParsingConfig) { - return mergeFrom( - (com.google.cloud.discoveryengine.v1beta.DocumentProcessingConfig.ParsingConfig - .LayoutParsingConfig) - other); - } else { - super.mergeFrom(other); - return this; + /** + * + * + *
            +         * Optional. List of HTML ids to exclude from the parsed content.
            +         * 
            + * + * repeated string exclude_html_ids = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The excludeHtmlIds to add. + * @return This builder for chaining. + */ + public Builder addExcludeHtmlIds(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); } + ensureExcludeHtmlIdsIsMutable(); + excludeHtmlIds_.add(value); + bitField0_ |= 0x00000040; + onChanged(); + return this; } - public Builder mergeFrom( - com.google.cloud.discoveryengine.v1beta.DocumentProcessingConfig.ParsingConfig - .LayoutParsingConfig - other) { - if (other - == com.google.cloud.discoveryengine.v1beta.DocumentProcessingConfig.ParsingConfig - .LayoutParsingConfig.getDefaultInstance()) return this; - this.mergeUnknownFields(other.getUnknownFields()); + /** + * + * + *
            +         * Optional. List of HTML ids to exclude from the parsed content.
            +         * 
            + * + * repeated string exclude_html_ids = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param values The excludeHtmlIds to add. + * @return This builder for chaining. + */ + public Builder addAllExcludeHtmlIds(java.lang.Iterable values) { + ensureExcludeHtmlIdsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, excludeHtmlIds_); + bitField0_ |= 0x00000040; onChanged(); return this; } - @java.lang.Override - public final boolean isInitialized() { - return true; + /** + * + * + *
            +         * Optional. List of HTML ids to exclude from the parsed content.
            +         * 
            + * + * repeated string exclude_html_ids = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearExcludeHtmlIds() { + excludeHtmlIds_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000040); + ; + onChanged(); + return this; } - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); + /** + * + * + *
            +         * Optional. List of HTML ids to exclude from the parsed content.
            +         * 
            + * + * repeated string exclude_html_ids = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The bytes of the excludeHtmlIds to add. + * @return This builder for chaining. + */ + public Builder addExcludeHtmlIdsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally + checkByteStringIsUtf8(value); + ensureExcludeHtmlIdsIsMutable(); + excludeHtmlIds_.add(value); + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + private boolean enableGetProcessedDocument_; + + /** + * + * + *
            +         * Optional. If true, the processed document will be made available for
            +         * the GetProcessedDocument API.
            +         * 
            + * + * bool enable_get_processed_document = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enableGetProcessedDocument. + */ + @java.lang.Override + public boolean getEnableGetProcessedDocument() { + return enableGetProcessedDocument_; + } + + /** + * + * + *
            +         * Optional. If true, the processed document will be made available for
            +         * the GetProcessedDocument API.
            +         * 
            + * + * bool enable_get_processed_document = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The enableGetProcessedDocument to set. + * @return This builder for chaining. + */ + public Builder setEnableGetProcessedDocument(boolean value) { + + enableGetProcessedDocument_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + + /** + * + * + *
            +         * Optional. If true, the processed document will be made available for
            +         * the GetProcessedDocument API.
            +         * 
            + * + * bool enable_get_processed_document = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearEnableGetProcessedDocument() { + bitField0_ = (bitField0_ & ~0x00000080); + enableGetProcessedDocument_ = false; + onChanged(); return this; } diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/DocumentProcessingConfigProto.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/DocumentProcessingConfigProto.java index b3a186665277..053e5db65ef1 100644 --- a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/DocumentProcessingConfigProto.java +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/DocumentProcessingConfigProto.java @@ -85,7 +85,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "cument_processing_config.proto\022#google.c" + "loud.discoveryengine.v1beta\032\037google/api/" + "field_behavior.proto\032\031google/api/resourc" - + "e.proto\"\314\014\n\030DocumentProcessingConfig\022\014\n\004" + + "e.proto\"\372\016\n\030DocumentProcessingConfig\022\014\n\004" + "name\030\001 \001(\t\022e\n\017chunking_config\030\003 \001(\0132L.go" + "ogle.cloud.discoveryengine.v1beta.Docume" + "ntProcessingConfig.ChunkingConfig\022k\n\026def" @@ -101,7 +101,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "fig.LayoutBasedChunkingConfigH\000\032R\n\031Layou" + "tBasedChunkingConfig\022\022\n\nchunk_size\030\001 \001(\005" + "\022!\n\031include_ancestor_headings\030\002 \001(\010B\014\n\nc" - + "hunk_mode\032\260\004\n\rParsingConfig\022\202\001\n\026digital_" + + "hunk_mode\032\336\006\n\rParsingConfig\022\202\001\n\026digital_" + "parsing_config\030\001 \001(\0132`.google.cloud.disc" + "overyengine.v1beta.DocumentProcessingCon" + "fig.ParsingConfig.DigitalParsingConfigH\000" @@ -114,26 +114,33 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "ParsingConfigH\000\032\026\n\024DigitalParsingConfig\032" + "S\n\020OcrParsingConfig\022&\n\032enhanced_document" + "_elements\030\001 \003(\tB\002\030\001\022\027\n\017use_native_text\030\002" - + " \001(\010\032\025\n\023LayoutParsingConfigB\027\n\025type_dedi" - + "cated_config\032\212\001\n\033ParsingConfigOverridesE" - + "ntry\022\013\n\003key\030\001 \001(\t\022Z\n\005value\030\002 \001(\0132K.googl" - + "e.cloud.discoveryengine.v1beta.DocumentP" - + "rocessingConfig.ParsingConfig:\0028\001:\212\002\352A\206\002" - + "\n7discoveryengine.googleapis.com/Documen" - + "tProcessingConfig\022Xprojects/{project}/lo" - + "cations/{location}/dataStores/{data_stor" - + "e}/documentProcessingConfig\022qprojects/{p" - + "roject}/locations/{location}/collections" - + "/{collection}/dataStores/{data_store}/do" - + "cumentProcessingConfigB\244\002\n\'com.google.cl" - + "oud.discoveryengine.v1betaB\035DocumentProc" - + "essingConfigProtoP\001ZQcloud.google.com/go" - + "/discoveryengine/apiv1beta/discoveryengi" - + "nepb;discoveryenginepb\242\002\017DISCOVERYENGINE" - + "\252\002#Google.Cloud.DiscoveryEngine.V1Beta\312\002" - + "#Google\\Cloud\\DiscoveryEngine\\V1beta\352\002&G" - + "oogle::Cloud::DiscoveryEngine::V1betab\006p" - + "roto3" + + " \001(\010\032\302\002\n\023LayoutParsingConfig\022$\n\027enable_t" + + "able_annotation\030\001 \001(\010B\003\340A\001\022$\n\027enable_ima" + + "ge_annotation\030\002 \001(\010B\003\340A\001\022&\n\031enable_llm_l" + + "ayout_parsing\030\005 \001(\010B\003\340A\001\022%\n\030structured_c" + + "ontent_types\030\t \003(\tB\003\340A\001\022\"\n\025exclude_html_" + + "elements\030\n \003(\tB\003\340A\001\022!\n\024exclude_html_clas" + + "ses\030\013 \003(\tB\003\340A\001\022\035\n\020exclude_html_ids\030\014 \003(\t" + + "B\003\340A\001\022*\n\035enable_get_processed_document\030\016" + + " \001(\010B\003\340A\001B\027\n\025type_dedicated_config\032\212\001\n\033P" + + "arsingConfigOverridesEntry\022\013\n\003key\030\001 \001(\t\022" + + "Z\n\005value\030\002 \001(\0132K.google.cloud.discoverye" + + "ngine.v1beta.DocumentProcessingConfig.Pa" + + "rsingConfig:\0028\001:\212\002\352A\206\002\n7discoveryengine." + + "googleapis.com/DocumentProcessingConfig\022" + + "Xprojects/{project}/locations/{location}" + + "/dataStores/{data_store}/documentProcess" + + "ingConfig\022qprojects/{project}/locations/" + + "{location}/collections/{collection}/data" + + "Stores/{data_store}/documentProcessingCo" + + "nfigB\244\002\n\'com.google.cloud.discoveryengin" + + "e.v1betaB\035DocumentProcessingConfigProtoP" + + "\001ZQcloud.google.com/go/discoveryengine/a" + + "piv1beta/discoveryenginepb;discoveryengi" + + "nepb\242\002\017DISCOVERYENGINE\252\002#Google.Cloud.Di" + + "scoveryEngine.V1Beta\312\002#Google\\Cloud\\Disc" + + "overyEngine\\V1beta\352\002&Google::Cloud::Disc" + + "overyEngine::V1betab\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -202,7 +209,16 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { internal_static_google_cloud_discoveryengine_v1beta_DocumentProcessingConfig_ParsingConfig_LayoutParsingConfig_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_cloud_discoveryengine_v1beta_DocumentProcessingConfig_ParsingConfig_LayoutParsingConfig_descriptor, - new java.lang.String[] {}); + new java.lang.String[] { + "EnableTableAnnotation", + "EnableImageAnnotation", + "EnableLlmLayoutParsing", + "StructuredContentTypes", + "ExcludeHtmlElements", + "ExcludeHtmlClasses", + "ExcludeHtmlIds", + "EnableGetProcessedDocument", + }); internal_static_google_cloud_discoveryengine_v1beta_DocumentProcessingConfig_ParsingConfigOverridesEntry_descriptor = internal_static_google_cloud_discoveryengine_v1beta_DocumentProcessingConfig_descriptor .getNestedType(2); @@ -217,6 +233,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.api.ResourceProto.getDescriptor(); com.google.protobuf.ExtensionRegistry registry = com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); registry.add(com.google.api.ResourceProto.resource); com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( descriptor, registry); diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/DocumentProto.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/DocumentProto.java index 23dbeba69894..52a5d73a01fe 100644 --- a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/DocumentProto.java +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/DocumentProto.java @@ -48,6 +48,14 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_discoveryengine_v1beta_Document_Content_descriptor; static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_cloud_discoveryengine_v1beta_Document_Content_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1beta_Document_AclInfo_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1beta_Document_AclInfo_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1beta_Document_AclInfo_AccessRestriction_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1beta_Document_AclInfo_AccessRestriction_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_discoveryengine_v1beta_Document_IndexStatus_descriptor; static final com.google.protobuf.GeneratedMessage.FieldAccessorTable @@ -64,9 +72,10 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "\n" + "2google/cloud/discoveryengine/v1beta/document.proto\022#google.cloud.discoveryengi" + "ne.v1beta\032\037google/api/field_behavior.pro" - + "to\032\031google/api/resource.proto\032\034google/pr" - + "otobuf/struct.proto\032\037google/protobuf/tim" - + "estamp.proto\032\027google/rpc/status.proto\"\210\007\n" + + "to\032\031google/api/resource.proto\0320google/cl" + + "oud/discoveryengine/v1beta/common.proto\032" + + "\034google/protobuf/struct.proto\032\037google/pr" + + "otobuf/timestamp.proto\032\027google/rpc/status.proto\"\301\t\n" + "\010Document\022.\n" + "\013struct_data\030\004 \001(\0132\027.google.protobuf.StructH\000\022\023\n" + "\tjson_data\030\005 \001(\tH\000\022\021\n" @@ -77,7 +86,9 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + " \001(\01325.google.cloud.discoveryengine.v1beta.Document.Content\022\032\n" + "\022parent_document_id\030\007 \001(\t\0229\n" + "\023derived_struct_data\030\006" - + " \001(\0132\027.google.protobuf.StructB\003\340A\003\0223\n\n" + + " \001(\0132\027.google.protobuf.StructB\003\340A\003\022G\n" + + "\010acl_info\030\013 \001(" + + "\01325.google.cloud.discoveryengine.v1beta.Document.AclInfo\0223\n\n" + "index_time\030\r" + " \001(\0132\032.google.protobuf.TimestampB\003\340A\003\022T\n" + "\014index_status\030\017" @@ -86,21 +97,28 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\traw_bytes\030\002 \001(\014H\000\022\r\n" + "\003uri\030\003 \001(\tH\000\022\021\n" + "\tmime_type\030\001 \001(\tB\t\n" - + "\007content\032h\n" + + "\007content\032\316\001\n" + + "\007AclInfo\022X\n" + + "\007readers\030\001 \003(\0132G.google.cloud.dis" + + "coveryengine.v1beta.Document.AclInfo.AccessRestriction\032i\n" + + "\021AccessRestriction\022B\n\n" + + "principals\030\001 \003(\0132..google.cloud.discoveryengine.v1beta.Principal\022\020\n" + + "\010idp_wide\030\002 \001(\010\032\206\001\n" + "\013IndexStatus\022.\n\n" + "index_time\030\001 \001(\0132\032.google.protobuf.Timestamp\022)\n\r" - + "error_samples\030\002 \003(\0132\022.google.rpc.Status:\226\002\352A\222\002\n" - + "\'discoveryengine.googleapis.com/Document\022fprojects/{proje" - + "ct}/locations/{location}/dataStores/{data_store}/branches/{branch}/documents/{do" - + "cument}\022\177projects/{project}/locations/{location}/collections/{collection}/dataSt" - + "ores/{data_store}/branches/{branch}/documents/{document}B\006\n" + + "error_samples\030\002 \003(\0132\022.google.rpc.Status\022\034\n" + + "\017pending_message\030\003 \001(\tB\003\340A\005:\226\002\352A\222\002\n" + + "\'discoveryengine.googleapis.com/Document\022fprojects/{pr" + + "oject}/locations/{location}/dataStores/{data_store}/branches/{branch}/documents/" + + "{document}\022\177projects/{project}/locations/{location}/collections/{collection}/dat" + + "aStores/{data_store}/branches/{branch}/documents/{document}B\006\n" + "\004dataB\224\002\n" + "\'com.google.cloud.discoveryengine.v1betaB\r" - + "DocumentProtoP\001ZQcloud.google.com/go/discoveryengi" - + "ne/apiv1beta/discoveryenginepb;discovery" - + "enginepb\242\002\017DISCOVERYENGINE\252\002#Google.Clou" - + "d.DiscoveryEngine.V1Beta\312\002#Google\\Cloud\\" - + "DiscoveryEngine\\V1beta\352\002&Google::Cloud::DiscoveryEngine::V1betab\006proto3" + + "DocumentProtoP\001ZQcloud.google.com/go/discoverye" + + "ngine/apiv1beta/discoveryenginepb;discov" + + "eryenginepb\242\002\017DISCOVERYENGINE\252\002#Google.C" + + "loud.DiscoveryEngine.V1Beta\312\002#Google\\Clo" + + "ud\\DiscoveryEngine\\V1beta\352\002&Google::Cloud::DiscoveryEngine::V1betab\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -108,6 +126,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.Descriptors.FileDescriptor[] { com.google.api.FieldBehaviorProto.getDescriptor(), com.google.api.ResourceProto.getDescriptor(), + com.google.cloud.discoveryengine.v1beta.CommonProto.getDescriptor(), com.google.protobuf.StructProto.getDescriptor(), com.google.protobuf.TimestampProto.getDescriptor(), com.google.rpc.StatusProto.getDescriptor(), @@ -126,6 +145,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Content", "ParentDocumentId", "DerivedStructData", + "AclInfo", "IndexTime", "IndexStatus", "Data", @@ -138,17 +158,35 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "RawBytes", "Uri", "MimeType", "Content", }); - internal_static_google_cloud_discoveryengine_v1beta_Document_IndexStatus_descriptor = + internal_static_google_cloud_discoveryengine_v1beta_Document_AclInfo_descriptor = internal_static_google_cloud_discoveryengine_v1beta_Document_descriptor.getNestedType(1); + internal_static_google_cloud_discoveryengine_v1beta_Document_AclInfo_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1beta_Document_AclInfo_descriptor, + new java.lang.String[] { + "Readers", + }); + internal_static_google_cloud_discoveryengine_v1beta_Document_AclInfo_AccessRestriction_descriptor = + internal_static_google_cloud_discoveryengine_v1beta_Document_AclInfo_descriptor + .getNestedType(0); + internal_static_google_cloud_discoveryengine_v1beta_Document_AclInfo_AccessRestriction_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1beta_Document_AclInfo_AccessRestriction_descriptor, + new java.lang.String[] { + "Principals", "IdpWide", + }); + internal_static_google_cloud_discoveryengine_v1beta_Document_IndexStatus_descriptor = + internal_static_google_cloud_discoveryengine_v1beta_Document_descriptor.getNestedType(2); internal_static_google_cloud_discoveryengine_v1beta_Document_IndexStatus_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_cloud_discoveryengine_v1beta_Document_IndexStatus_descriptor, new java.lang.String[] { - "IndexTime", "ErrorSamples", + "IndexTime", "ErrorSamples", "PendingMessage", }); descriptor.resolveAllFeaturesImmutable(); com.google.api.FieldBehaviorProto.getDescriptor(); com.google.api.ResourceProto.getDescriptor(); + com.google.cloud.discoveryengine.v1beta.CommonProto.getDescriptor(); com.google.protobuf.StructProto.getDescriptor(); com.google.protobuf.TimestampProto.getDescriptor(); com.google.rpc.StatusProto.getDescriptor(); diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/DocumentServiceProto.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/DocumentServiceProto.java index 8a39911cab8a..c9d3cb045646 100644 --- a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/DocumentServiceProto.java +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/DocumentServiceProto.java @@ -164,7 +164,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "/FhirResourceH\000B\017\n\rmatcher_value\"U\n\005Stat" + "e\022\025\n\021STATE_UNSPECIFIED\020\000\022\013\n\007INDEXED\020\001\022\026\n" + "\022NOT_IN_TARGET_SITE\020\002\022\020\n\014NOT_IN_INDEX\020\0032" - + "\241\027\n\017DocumentService\022\254\002\n\013GetDocument\0227.go" + + "\237\030\n\017DocumentService\022\254\002\n\013GetDocument\0227.go" + "ogle.cloud.discoveryengine.v1beta.GetDoc" + "umentRequest\032-.google.cloud.discoveryeng" + "ine.v1beta.Document\"\264\001\332A\004name\202\323\344\223\002\246\001\022I/v" @@ -236,16 +236,19 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "*}/batchGetDocumentsMetadataZi\022g/v1beta/" + "{parent=projects/*/locations/*/collectio" + "ns/*/dataStores/*/branches/*}/batchGetDo" - + "cumentsMetadata\032R\312A\036discoveryengine.goog" - + "leapis.com\322A.https://www.googleapis.com/" - + "auth/cloud-platformB\233\002\n\'com.google.cloud" - + ".discoveryengine.v1betaB\024DocumentService" - + "ProtoP\001ZQcloud.google.com/go/discoveryen" - + "gine/apiv1beta/discoveryenginepb;discove" - + "ryenginepb\242\002\017DISCOVERYENGINE\252\002#Google.Cl" - + "oud.DiscoveryEngine.V1Beta\312\002#Google\\Clou" - + "d\\DiscoveryEngine\\V1beta\352\002&Google::Cloud" - + "::DiscoveryEngine::V1betab\006proto3" + + "cumentsMetadata\032\317\001\312A\036discoveryengine.goo" + + "gleapis.com\322A\252\001https://www.googleapis.co" + + "m/auth/cloud-platform,https://www.google" + + "apis.com/auth/discoveryengine.readwrite," + + "https://www.googleapis.com/auth/discover" + + "yengine.serving.readwriteB\233\002\n\'com.google" + + ".cloud.discoveryengine.v1betaB\024DocumentS" + + "erviceProtoP\001ZQcloud.google.com/go/disco" + + "veryengine/apiv1beta/discoveryenginepb;d" + + "iscoveryenginepb\242\002\017DISCOVERYENGINE\252\002#Goo" + + "gle.Cloud.DiscoveryEngine.V1Beta\312\002#Googl" + + "e\\Cloud\\DiscoveryEngine\\V1beta\352\002&Google:" + + ":Cloud::DiscoveryEngine::V1betab\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/Engine.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/Engine.java index ef87970d3e0e..7d2bb00a2e52 100644 --- a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/Engine.java +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/Engine.java @@ -58,6 +58,10 @@ private Engine() { dataStoreIds_ = com.google.protobuf.LazyStringArrayList.emptyList(); solutionType_ = 0; industryVertical_ = 0; + appType_ = 0; + configurableBillingApproach_ = 0; + marketplaceAgentVisibility_ = 0; + procurementContactEmails_ = com.google.protobuf.LazyStringArrayList.emptyList(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @@ -65,6 +69,22 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { .internal_static_google_cloud_discoveryengine_v1beta_Engine_descriptor; } + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 30: + return internalGetFeatures(); + case 37: + return internalGetModelConfigs(); + case 42: + return internalGetConnectorTenantInfo(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + @java.lang.Override protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { @@ -75,133 +95,194 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { com.google.cloud.discoveryengine.v1beta.Engine.Builder.class); } - public interface SearchEngineConfigOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.Engine.SearchEngineConfig) - com.google.protobuf.MessageOrBuilder { - + /** + * + * + *
            +   * The app of the engine.
            +   * 
            + * + * Protobuf enum {@code google.cloud.discoveryengine.v1beta.Engine.AppType} + */ + public enum AppType implements com.google.protobuf.ProtocolMessageEnum { /** * * *
            -     * The search feature tier of this engine.
            -     *
            -     * Different tiers might have different
            -     * pricing. To learn more, check the pricing documentation.
            -     *
            -     * Defaults to
            -     * [SearchTier.SEARCH_TIER_STANDARD][google.cloud.discoveryengine.v1beta.SearchTier.SEARCH_TIER_STANDARD]
            -     * if not specified.
            +     * All non specified apps.
                  * 
            * - * .google.cloud.discoveryengine.v1beta.SearchTier search_tier = 1; - * - * @return The enum numeric value on the wire for searchTier. + * APP_TYPE_UNSPECIFIED = 0; */ - int getSearchTierValue(); - + APP_TYPE_UNSPECIFIED(0), /** * * *
            -     * The search feature tier of this engine.
            -     *
            -     * Different tiers might have different
            -     * pricing. To learn more, check the pricing documentation.
            -     *
            -     * Defaults to
            -     * [SearchTier.SEARCH_TIER_STANDARD][google.cloud.discoveryengine.v1beta.SearchTier.SEARCH_TIER_STANDARD]
            -     * if not specified.
            +     * App type for intranet search and Agentspace.
                  * 
            * - * .google.cloud.discoveryengine.v1beta.SearchTier search_tier = 1; - * - * @return The searchTier. + * APP_TYPE_INTRANET = 1; */ - com.google.cloud.discoveryengine.v1beta.SearchTier getSearchTier(); + APP_TYPE_INTRANET(1), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "AppType"); + } /** * * *
            -     * The add-on that this search engine enables.
            +     * All non specified apps.
                  * 
            * - * repeated .google.cloud.discoveryengine.v1beta.SearchAddOn search_add_ons = 2; - * - * @return A list containing the searchAddOns. + * APP_TYPE_UNSPECIFIED = 0; */ - java.util.List getSearchAddOnsList(); + public static final int APP_TYPE_UNSPECIFIED_VALUE = 0; /** * * *
            -     * The add-on that this search engine enables.
            +     * App type for intranet search and Agentspace.
                  * 
            * - * repeated .google.cloud.discoveryengine.v1beta.SearchAddOn search_add_ons = 2; - * - * @return The count of searchAddOns. + * APP_TYPE_INTRANET = 1; */ - int getSearchAddOnsCount(); + public static final int APP_TYPE_INTRANET_VALUE = 1; + + 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 AppType 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 AppType forNumber(int value) { + switch (value) { + case 0: + return APP_TYPE_UNSPECIFIED; + case 1: + return APP_TYPE_INTRANET; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public AppType findValueByNumber(int number) { + return AppType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.Engine.getDescriptor().getEnumTypes().get(0); + } + + private static final AppType[] VALUES = values(); + + public static AppType valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private AppType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.discoveryengine.v1beta.Engine.AppType) + } + + /** + * + * + *
            +   * The state of the feature for the engine.
            +   * 
            + * + * Protobuf enum {@code google.cloud.discoveryengine.v1beta.Engine.FeatureState} + */ + public enum FeatureState implements com.google.protobuf.ProtocolMessageEnum { /** * * *
            -     * The add-on that this search engine enables.
            +     * The feature state is unspecified.
                  * 
            * - * repeated .google.cloud.discoveryengine.v1beta.SearchAddOn search_add_ons = 2; - * - * @param index The index of the element to return. - * @return The searchAddOns at the given index. + * FEATURE_STATE_UNSPECIFIED = 0; */ - com.google.cloud.discoveryengine.v1beta.SearchAddOn getSearchAddOns(int index); - + FEATURE_STATE_UNSPECIFIED(0), /** * * *
            -     * The add-on that this search engine enables.
            +     * The feature is turned on to be accessible.
                  * 
            * - * repeated .google.cloud.discoveryengine.v1beta.SearchAddOn search_add_ons = 2; - * - * @return A list containing the enum numeric values on the wire for searchAddOns. + * FEATURE_STATE_ON = 1; */ - java.util.List getSearchAddOnsValueList(); - + FEATURE_STATE_ON(1), /** * * *
            -     * The add-on that this search engine enables.
            +     * The feature is turned off to be inaccessible.
                  * 
            * - * repeated .google.cloud.discoveryengine.v1beta.SearchAddOn search_add_ons = 2; - * - * @param index The index of the value to return. - * @return The enum numeric value on the wire of searchAddOns at the given index. + * FEATURE_STATE_OFF = 2; */ - int getSearchAddOnsValue(int index); - } - - /** - * - * - *
            -   * Configurations for a Search Engine.
            -   * 
            - * - * Protobuf type {@code google.cloud.discoveryengine.v1beta.Engine.SearchEngineConfig} - */ - public static final class SearchEngineConfig extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.Engine.SearchEngineConfig) - SearchEngineConfigOrBuilder { - private static final long serialVersionUID = 0L; + FEATURE_STATE_OFF(2), + UNRECOGNIZED(-1), + ; static { com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( @@ -210,6567 +291,20848 @@ public static final class SearchEngineConfig extends com.google.protobuf.Generat /* minor= */ 33, /* patch= */ 2, /* suffix= */ "", - "SearchEngineConfig"); - } - - // Use SearchEngineConfig.newBuilder() to construct. - private SearchEngineConfig(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private SearchEngineConfig() { - searchTier_ = 0; - searchAddOns_ = emptyIntList(); - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.discoveryengine.v1beta.EngineProto - .internal_static_google_cloud_discoveryengine_v1beta_Engine_SearchEngineConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.discoveryengine.v1beta.EngineProto - .internal_static_google_cloud_discoveryengine_v1beta_Engine_SearchEngineConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.discoveryengine.v1beta.Engine.SearchEngineConfig.class, - com.google.cloud.discoveryengine.v1beta.Engine.SearchEngineConfig.Builder.class); + "FeatureState"); } - public static final int SEARCH_TIER_FIELD_NUMBER = 1; - private int searchTier_ = 0; - /** * * *
            -     * The search feature tier of this engine.
            -     *
            -     * Different tiers might have different
            -     * pricing. To learn more, check the pricing documentation.
            -     *
            -     * Defaults to
            -     * [SearchTier.SEARCH_TIER_STANDARD][google.cloud.discoveryengine.v1beta.SearchTier.SEARCH_TIER_STANDARD]
            -     * if not specified.
            +     * The feature state is unspecified.
                  * 
            * - * .google.cloud.discoveryengine.v1beta.SearchTier search_tier = 1; - * - * @return The enum numeric value on the wire for searchTier. + * FEATURE_STATE_UNSPECIFIED = 0; */ - @java.lang.Override - public int getSearchTierValue() { - return searchTier_; - } + public static final int FEATURE_STATE_UNSPECIFIED_VALUE = 0; /** * * *
            -     * The search feature tier of this engine.
            -     *
            -     * Different tiers might have different
            -     * pricing. To learn more, check the pricing documentation.
            -     *
            -     * Defaults to
            -     * [SearchTier.SEARCH_TIER_STANDARD][google.cloud.discoveryengine.v1beta.SearchTier.SEARCH_TIER_STANDARD]
            -     * if not specified.
            +     * The feature is turned on to be accessible.
                  * 
            * - * .google.cloud.discoveryengine.v1beta.SearchTier search_tier = 1; - * - * @return The searchTier. + * FEATURE_STATE_ON = 1; */ - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.SearchTier getSearchTier() { - com.google.cloud.discoveryengine.v1beta.SearchTier result = - com.google.cloud.discoveryengine.v1beta.SearchTier.forNumber(searchTier_); - return result == null - ? com.google.cloud.discoveryengine.v1beta.SearchTier.UNRECOGNIZED - : result; - } - - public static final int SEARCH_ADD_ONS_FIELD_NUMBER = 2; - - @SuppressWarnings("serial") - private com.google.protobuf.Internal.IntList searchAddOns_ = emptyIntList(); - - private static final com.google.protobuf.Internal.IntListAdapter.IntConverter< - com.google.cloud.discoveryengine.v1beta.SearchAddOn> - searchAddOns_converter_ = - new com.google.protobuf.Internal.IntListAdapter.IntConverter< - com.google.cloud.discoveryengine.v1beta.SearchAddOn>() { - public com.google.cloud.discoveryengine.v1beta.SearchAddOn convert(int from) { - com.google.cloud.discoveryengine.v1beta.SearchAddOn result = - com.google.cloud.discoveryengine.v1beta.SearchAddOn.forNumber(from); - return result == null - ? com.google.cloud.discoveryengine.v1beta.SearchAddOn.UNRECOGNIZED - : result; - } - }; + public static final int FEATURE_STATE_ON_VALUE = 1; /** * * *
            -     * The add-on that this search engine enables.
            +     * The feature is turned off to be inaccessible.
                  * 
            * - * repeated .google.cloud.discoveryengine.v1beta.SearchAddOn search_add_ons = 2; - * - * @return A list containing the searchAddOns. + * FEATURE_STATE_OFF = 2; */ - @java.lang.Override - public java.util.List - getSearchAddOnsList() { - return new com.google.protobuf.Internal.IntListAdapter< - com.google.cloud.discoveryengine.v1beta.SearchAddOn>( - searchAddOns_, searchAddOns_converter_); + public static final int FEATURE_STATE_OFF_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; } /** - * - * - *
            -     * The add-on that this search engine enables.
            -     * 
            - * - * repeated .google.cloud.discoveryengine.v1beta.SearchAddOn search_add_ons = 2; - * - * @return The count of searchAddOns. + * @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.Override - public int getSearchAddOnsCount() { - return searchAddOns_.size(); + @java.lang.Deprecated + public static FeatureState 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 FeatureState forNumber(int value) { + switch (value) { + case 0: + return FEATURE_STATE_UNSPECIFIED; + case 1: + return FEATURE_STATE_ON; + case 2: + return FEATURE_STATE_OFF; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public FeatureState findValueByNumber(int number) { + return FeatureState.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.Engine.getDescriptor().getEnumTypes().get(1); + } + + private static final FeatureState[] VALUES = values(); + + public static FeatureState valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private FeatureState(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.discoveryengine.v1beta.Engine.FeatureState) + } + + /** + * + * + *
            +   * Configuration for configurable billing approach.
            +   * 
            + * + * Protobuf enum {@code google.cloud.discoveryengine.v1beta.Engine.ConfigurableBillingApproach} + */ + public enum ConfigurableBillingApproach implements com.google.protobuf.ProtocolMessageEnum { /** * - * + * *
            -     * The add-on that this search engine enables.
            +     * Default value. For Spark and non-Spark non-configurable billing approach.
            +     * General pricing model.
                  * 
            * - * repeated .google.cloud.discoveryengine.v1beta.SearchAddOn search_add_ons = 2; + * CONFIGURABLE_BILLING_APPROACH_UNSPECIFIED = 0; + */ + CONFIGURABLE_BILLING_APPROACH_UNSPECIFIED(0), + /** * - * @param index The index of the element to return. - * @return The searchAddOns at the given index. + * + *
            +     * The billing approach follows configurations specified by customer.
            +     * 
            + * + * CONFIGURABLE_BILLING_APPROACH_ENABLED = 1; */ - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.SearchAddOn getSearchAddOns(int index) { - return searchAddOns_converter_.convert(searchAddOns_.getInt(index)); + CONFIGURABLE_BILLING_APPROACH_ENABLED(1), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ConfigurableBillingApproach"); } /** * * *
            -     * The add-on that this search engine enables.
            +     * Default value. For Spark and non-Spark non-configurable billing approach.
            +     * General pricing model.
                  * 
            * - * repeated .google.cloud.discoveryengine.v1beta.SearchAddOn search_add_ons = 2; - * - * @return A list containing the enum numeric values on the wire for searchAddOns. + * CONFIGURABLE_BILLING_APPROACH_UNSPECIFIED = 0; */ - @java.lang.Override - public java.util.List getSearchAddOnsValueList() { - return searchAddOns_; - } + public static final int CONFIGURABLE_BILLING_APPROACH_UNSPECIFIED_VALUE = 0; /** * * *
            -     * The add-on that this search engine enables.
            +     * The billing approach follows configurations specified by customer.
                  * 
            * - * repeated .google.cloud.discoveryengine.v1beta.SearchAddOn search_add_ons = 2; - * - * @param index The index of the value to return. - * @return The enum numeric value on the wire of searchAddOns at the given index. + * CONFIGURABLE_BILLING_APPROACH_ENABLED = 1; */ - @java.lang.Override - public int getSearchAddOnsValue(int index) { - return searchAddOns_.getInt(index); - } - - private int searchAddOnsMemoizedSerializedSize; - - 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; - } + public static final int CONFIGURABLE_BILLING_APPROACH_ENABLED_VALUE = 1; - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - getSerializedSize(); - if (searchTier_ - != com.google.cloud.discoveryengine.v1beta.SearchTier.SEARCH_TIER_UNSPECIFIED - .getNumber()) { - output.writeEnum(1, searchTier_); - } - if (getSearchAddOnsList().size() > 0) { - output.writeUInt32NoTag(18); - output.writeUInt32NoTag(searchAddOnsMemoizedSerializedSize); + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); } - for (int i = 0; i < searchAddOns_.size(); i++) { - output.writeEnumNoTag(searchAddOns_.getInt(i)); - } - getUnknownFields().writeTo(output); + return value; } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (searchTier_ - != com.google.cloud.discoveryengine.v1beta.SearchTier.SEARCH_TIER_UNSPECIFIED - .getNumber()) { - size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, searchTier_); - } - { - int dataSize = 0; - for (int i = 0; i < searchAddOns_.size(); i++) { - dataSize += - com.google.protobuf.CodedOutputStream.computeEnumSizeNoTag(searchAddOns_.getInt(i)); - } - size += dataSize; - if (!getSearchAddOnsList().isEmpty()) { - size += 1; - size += com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(dataSize); - } - searchAddOnsMemoizedSerializedSize = dataSize; - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; + /** + * @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 ConfigurableBillingApproach valueOf(int value) { + return forNumber(value); } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.discoveryengine.v1beta.Engine.SearchEngineConfig)) { - return super.equals(obj); + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static ConfigurableBillingApproach forNumber(int value) { + switch (value) { + case 0: + return CONFIGURABLE_BILLING_APPROACH_UNSPECIFIED; + case 1: + return CONFIGURABLE_BILLING_APPROACH_ENABLED; + default: + return null; } - com.google.cloud.discoveryengine.v1beta.Engine.SearchEngineConfig other = - (com.google.cloud.discoveryengine.v1beta.Engine.SearchEngineConfig) obj; + } - if (searchTier_ != other.searchTier_) return false; - if (!searchAddOns_.equals(other.searchAddOns_)) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; } - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + SEARCH_TIER_FIELD_NUMBER; - hash = (53 * hash) + searchTier_; - if (getSearchAddOnsCount() > 0) { - hash = (37 * hash) + SEARCH_ADD_ONS_FIELD_NUMBER; - hash = (53 * hash) + searchAddOns_.hashCode(); + private static final com.google.protobuf.Internal.EnumLiteMap + internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public ConfigurableBillingApproach findValueByNumber(int number) { + return ConfigurableBillingApproach.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; + return getDescriptor().getValues().get(ordinal()); } - public static com.google.cloud.discoveryengine.v1beta.Engine.SearchEngineConfig parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); } - public static com.google.cloud.discoveryengine.v1beta.Engine.SearchEngineConfig parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); + public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.Engine.getDescriptor().getEnumTypes().get(2); } - public static com.google.cloud.discoveryengine.v1beta.Engine.SearchEngineConfig parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } + private static final ConfigurableBillingApproach[] VALUES = values(); - public static com.google.cloud.discoveryengine.v1beta.Engine.SearchEngineConfig parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); + public static ConfigurableBillingApproach valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; } - public static com.google.cloud.discoveryengine.v1beta.Engine.SearchEngineConfig parseFrom( - byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } + private final int value; - public static com.google.cloud.discoveryengine.v1beta.Engine.SearchEngineConfig parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); + private ConfigurableBillingApproach(int value) { + this.value = value; } - public static com.google.cloud.discoveryengine.v1beta.Engine.SearchEngineConfig parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } + // @@protoc_insertion_point(enum_scope:google.cloud.discoveryengine.v1beta.Engine.ConfigurableBillingApproach) + } - public static com.google.cloud.discoveryengine.v1beta.Engine.SearchEngineConfig parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } + /** + * + * + *
            +   * The status of the model for the engine.
            +   * 
            + * + * Protobuf enum {@code google.cloud.discoveryengine.v1beta.Engine.ModelState} + */ + public enum ModelState implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
            +     * The model state is unspecified.
            +     * 
            + * + * MODEL_STATE_UNSPECIFIED = 0; + */ + MODEL_STATE_UNSPECIFIED(0), + /** + * + * + *
            +     * The model is enabled by admin.
            +     * 
            + * + * MODEL_ENABLED = 1; + */ + MODEL_ENABLED(1), + /** + * + * + *
            +     * The model is disabled by admin.
            +     * 
            + * + * MODEL_DISABLED = 2; + */ + MODEL_DISABLED(2), + UNRECOGNIZED(-1), + ; - public static com.google.cloud.discoveryengine.v1beta.Engine.SearchEngineConfig - parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ModelState"); } - public static com.google.cloud.discoveryengine.v1beta.Engine.SearchEngineConfig - parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); + /** + * + * + *
            +     * The model state is unspecified.
            +     * 
            + * + * MODEL_STATE_UNSPECIFIED = 0; + */ + public static final int MODEL_STATE_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
            +     * The model is enabled by admin.
            +     * 
            + * + * MODEL_ENABLED = 1; + */ + public static final int MODEL_ENABLED_VALUE = 1; + + /** + * + * + *
            +     * The model is disabled by admin.
            +     * 
            + * + * MODEL_DISABLED = 2; + */ + public static final int MODEL_DISABLED_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; } - public static com.google.cloud.discoveryengine.v1beta.Engine.SearchEngineConfig parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + /** + * @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 ModelState valueOf(int value) { + return forNumber(value); } - public static com.google.cloud.discoveryengine.v1beta.Engine.SearchEngineConfig parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static ModelState forNumber(int value) { + switch (value) { + case 0: + return MODEL_STATE_UNSPECIFIED; + case 1: + return MODEL_ENABLED; + case 2: + return MODEL_DISABLED; + default: + return null; + } } - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public ModelState findValueByNumber(int number) { + return ModelState.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); } - public static Builder newBuilder( - com.google.cloud.discoveryengine.v1beta.Engine.SearchEngineConfig prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.Engine.getDescriptor().getEnumTypes().get(3); } - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; + private static final ModelState[] VALUES = values(); + + public static ModelState valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private ModelState(int value) { + this.value = value; } + // @@protoc_insertion_point(enum_scope:google.cloud.discoveryengine.v1beta.Engine.ModelState) + } + + /** + * + * + *
            +   * Represents which marketplace agents are visible to any users in agent
            +   * gallery.
            +   * 
            + * + * Protobuf enum {@code google.cloud.discoveryengine.v1beta.Engine.MarketplaceAgentVisibility} + */ + public enum MarketplaceAgentVisibility implements com.google.protobuf.ProtocolMessageEnum { /** * * *
            -     * Configurations for a Search Engine.
            +     * Defaults to `MARKETPLACE_AGENT_VISIBILITY_UNSPECIFIED`.
                  * 
            * - * Protobuf type {@code google.cloud.discoveryengine.v1beta.Engine.SearchEngineConfig} + * MARKETPLACE_AGENT_VISIBILITY_UNSPECIFIED = 0; */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.Engine.SearchEngineConfig) - com.google.cloud.discoveryengine.v1beta.Engine.SearchEngineConfigOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.discoveryengine.v1beta.EngineProto - .internal_static_google_cloud_discoveryengine_v1beta_Engine_SearchEngineConfig_descriptor; - } + MARKETPLACE_AGENT_VISIBILITY_UNSPECIFIED(0), + /** + * + * + *
            +     * Only agents that are currently available for use by the user are visible.
            +     * 
            + * + * SHOW_AVAILABLE_AGENTS_ONLY = 1; + */ + SHOW_AVAILABLE_AGENTS_ONLY(1), + /** + * + * + *
            +     * Show marketplace agents that the user does not yet have access to but
            +     * are integrated into the engine. This level also includes all agents
            +     * visible with `SHOW_AVAILABLE_AGENTS_ONLY`.
            +     * 
            + * + * SHOW_AGENTS_ALREADY_INTEGRATED = 2; + */ + SHOW_AGENTS_ALREADY_INTEGRATED(2), + /** + * + * + *
            +     * Show all agents visible with `SHOW_AGENTS_ALREADY_INTEGRATED`, plus
            +     * agents that have already been purchased by the project/organization, even
            +     * if they are not currently integrated into the engine.
            +     * 
            + * + * SHOW_AGENTS_ALREADY_PURCHASED = 3; + */ + SHOW_AGENTS_ALREADY_PURCHASED(3), + /** + * + * + *
            +     * All agents in the marketplace are visible, regardless of access or
            +     * purchase status. This level encompasses all agents shown in the previous
            +     * levels.
            +     * 
            + * + * SHOW_ALL_AGENTS = 4; + */ + SHOW_ALL_AGENTS(4), + UNRECOGNIZED(-1), + ; - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.discoveryengine.v1beta.EngineProto - .internal_static_google_cloud_discoveryengine_v1beta_Engine_SearchEngineConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.discoveryengine.v1beta.Engine.SearchEngineConfig.class, - com.google.cloud.discoveryengine.v1beta.Engine.SearchEngineConfig.Builder.class); - } + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "MarketplaceAgentVisibility"); + } - // Construct using - // com.google.cloud.discoveryengine.v1beta.Engine.SearchEngineConfig.newBuilder() - private Builder() {} + /** + * + * + *
            +     * Defaults to `MARKETPLACE_AGENT_VISIBILITY_UNSPECIFIED`.
            +     * 
            + * + * MARKETPLACE_AGENT_VISIBILITY_UNSPECIFIED = 0; + */ + public static final int MARKETPLACE_AGENT_VISIBILITY_UNSPECIFIED_VALUE = 0; - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - } + /** + * + * + *
            +     * Only agents that are currently available for use by the user are visible.
            +     * 
            + * + * SHOW_AVAILABLE_AGENTS_ONLY = 1; + */ + public static final int SHOW_AVAILABLE_AGENTS_ONLY_VALUE = 1; - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - searchTier_ = 0; - searchAddOns_ = emptyIntList(); - return this; - } + /** + * + * + *
            +     * Show marketplace agents that the user does not yet have access to but
            +     * are integrated into the engine. This level also includes all agents
            +     * visible with `SHOW_AVAILABLE_AGENTS_ONLY`.
            +     * 
            + * + * SHOW_AGENTS_ALREADY_INTEGRATED = 2; + */ + public static final int SHOW_AGENTS_ALREADY_INTEGRATED_VALUE = 2; - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.discoveryengine.v1beta.EngineProto - .internal_static_google_cloud_discoveryengine_v1beta_Engine_SearchEngineConfig_descriptor; - } + /** + * + * + *
            +     * Show all agents visible with `SHOW_AGENTS_ALREADY_INTEGRATED`, plus
            +     * agents that have already been purchased by the project/organization, even
            +     * if they are not currently integrated into the engine.
            +     * 
            + * + * SHOW_AGENTS_ALREADY_PURCHASED = 3; + */ + public static final int SHOW_AGENTS_ALREADY_PURCHASED_VALUE = 3; - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.Engine.SearchEngineConfig - getDefaultInstanceForType() { - return com.google.cloud.discoveryengine.v1beta.Engine.SearchEngineConfig - .getDefaultInstance(); - } + /** + * + * + *
            +     * All agents in the marketplace are visible, regardless of access or
            +     * purchase status. This level encompasses all agents shown in the previous
            +     * levels.
            +     * 
            + * + * SHOW_ALL_AGENTS = 4; + */ + public static final int SHOW_ALL_AGENTS_VALUE = 4; - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.Engine.SearchEngineConfig build() { - com.google.cloud.discoveryengine.v1beta.Engine.SearchEngineConfig result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); } + return value; + } - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.Engine.SearchEngineConfig buildPartial() { - com.google.cloud.discoveryengine.v1beta.Engine.SearchEngineConfig result = - new com.google.cloud.discoveryengine.v1beta.Engine.SearchEngineConfig(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } + /** + * @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 MarketplaceAgentVisibility valueOf(int value) { + return forNumber(value); + } - private void buildPartial0( - com.google.cloud.discoveryengine.v1beta.Engine.SearchEngineConfig result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.searchTier_ = searchTier_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - searchAddOns_.makeImmutable(); - result.searchAddOns_ = searchAddOns_; - } + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static MarketplaceAgentVisibility forNumber(int value) { + switch (value) { + case 0: + return MARKETPLACE_AGENT_VISIBILITY_UNSPECIFIED; + case 1: + return SHOW_AVAILABLE_AGENTS_ONLY; + case 2: + return SHOW_AGENTS_ALREADY_INTEGRATED; + case 3: + return SHOW_AGENTS_ALREADY_PURCHASED; + case 4: + return SHOW_ALL_AGENTS; + default: + return null; } + } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.discoveryengine.v1beta.Engine.SearchEngineConfig) { - return mergeFrom( - (com.google.cloud.discoveryengine.v1beta.Engine.SearchEngineConfig) other); - } else { - super.mergeFrom(other); - return this; - } - } + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } - public Builder mergeFrom( - com.google.cloud.discoveryengine.v1beta.Engine.SearchEngineConfig other) { - if (other - == com.google.cloud.discoveryengine.v1beta.Engine.SearchEngineConfig - .getDefaultInstance()) return this; - if (other.searchTier_ != 0) { - setSearchTierValue(other.getSearchTierValue()); - } - if (!other.searchAddOns_.isEmpty()) { - if (searchAddOns_.isEmpty()) { - searchAddOns_ = other.searchAddOns_; - searchAddOns_.makeImmutable(); - bitField0_ |= 0x00000002; - } else { - ensureSearchAddOnsIsMutable(); - searchAddOns_.addAll(other.searchAddOns_); - } - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } + private static final com.google.protobuf.Internal.EnumLiteMap + internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public MarketplaceAgentVisibility findValueByNumber(int number) { + return MarketplaceAgentVisibility.forNumber(number); + } + }; - @java.lang.Override - public final boolean isInitialized() { - return true; + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); } + return getDescriptor().getValues().get(ordinal()); + } - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: - { - searchTier_ = input.readEnum(); - bitField0_ |= 0x00000001; - break; - } // case 8 - case 16: - { - int tmpRaw = input.readEnum(); - ensureSearchAddOnsIsMutable(); - searchAddOns_.addInt(tmpRaw); - break; - } // case 16 - case 18: - { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - ensureSearchAddOnsIsMutable(); - while (input.getBytesUntilLimit() > 0) { - searchAddOns_.addInt(input.readEnum()); - } - input.popLimit(limit); - break; - } // case 18 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } - private int bitField0_; + public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.Engine.getDescriptor().getEnumTypes().get(4); + } - private int searchTier_ = 0; + private static final MarketplaceAgentVisibility[] VALUES = values(); - /** - * - * - *
            -       * The search feature tier of this engine.
            -       *
            -       * Different tiers might have different
            -       * pricing. To learn more, check the pricing documentation.
            -       *
            -       * Defaults to
            -       * [SearchTier.SEARCH_TIER_STANDARD][google.cloud.discoveryengine.v1beta.SearchTier.SEARCH_TIER_STANDARD]
            -       * if not specified.
            -       * 
            - * - * .google.cloud.discoveryengine.v1beta.SearchTier search_tier = 1; - * - * @return The enum numeric value on the wire for searchTier. - */ - @java.lang.Override - public int getSearchTierValue() { - return searchTier_; + public static MarketplaceAgentVisibility valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); } - - /** - * - * - *
            -       * The search feature tier of this engine.
            -       *
            -       * Different tiers might have different
            -       * pricing. To learn more, check the pricing documentation.
            -       *
            -       * Defaults to
            -       * [SearchTier.SEARCH_TIER_STANDARD][google.cloud.discoveryengine.v1beta.SearchTier.SEARCH_TIER_STANDARD]
            -       * if not specified.
            -       * 
            - * - * .google.cloud.discoveryengine.v1beta.SearchTier search_tier = 1; - * - * @param value The enum numeric value on the wire for searchTier to set. - * @return This builder for chaining. - */ - public Builder setSearchTierValue(int value) { - searchTier_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; + if (desc.getIndex() == -1) { + return UNRECOGNIZED; } + return VALUES[desc.getIndex()]; + } - /** - * - * - *
            -       * The search feature tier of this engine.
            -       *
            -       * Different tiers might have different
            -       * pricing. To learn more, check the pricing documentation.
            -       *
            -       * Defaults to
            -       * [SearchTier.SEARCH_TIER_STANDARD][google.cloud.discoveryengine.v1beta.SearchTier.SEARCH_TIER_STANDARD]
            -       * if not specified.
            -       * 
            - * - * .google.cloud.discoveryengine.v1beta.SearchTier search_tier = 1; - * - * @return The searchTier. - */ - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.SearchTier getSearchTier() { - com.google.cloud.discoveryengine.v1beta.SearchTier result = - com.google.cloud.discoveryengine.v1beta.SearchTier.forNumber(searchTier_); - return result == null - ? com.google.cloud.discoveryengine.v1beta.SearchTier.UNRECOGNIZED - : result; - } + private final int value; - /** - * - * - *
            -       * The search feature tier of this engine.
            -       *
            -       * Different tiers might have different
            -       * pricing. To learn more, check the pricing documentation.
            -       *
            -       * Defaults to
            -       * [SearchTier.SEARCH_TIER_STANDARD][google.cloud.discoveryengine.v1beta.SearchTier.SEARCH_TIER_STANDARD]
            -       * if not specified.
            -       * 
            - * - * .google.cloud.discoveryengine.v1beta.SearchTier search_tier = 1; - * - * @param value The searchTier to set. - * @return This builder for chaining. - */ - public Builder setSearchTier(com.google.cloud.discoveryengine.v1beta.SearchTier value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000001; - searchTier_ = value.getNumber(); - onChanged(); - return this; - } + private MarketplaceAgentVisibility(int value) { + this.value = value; + } - /** - * - * - *
            -       * The search feature tier of this engine.
            -       *
            -       * Different tiers might have different
            -       * pricing. To learn more, check the pricing documentation.
            -       *
            -       * Defaults to
            -       * [SearchTier.SEARCH_TIER_STANDARD][google.cloud.discoveryengine.v1beta.SearchTier.SEARCH_TIER_STANDARD]
            -       * if not specified.
            -       * 
            - * - * .google.cloud.discoveryengine.v1beta.SearchTier search_tier = 1; - * - * @return This builder for chaining. - */ - public Builder clearSearchTier() { - bitField0_ = (bitField0_ & ~0x00000001); - searchTier_ = 0; - onChanged(); - return this; - } + // @@protoc_insertion_point(enum_scope:google.cloud.discoveryengine.v1beta.Engine.MarketplaceAgentVisibility) + } - private com.google.protobuf.Internal.IntList searchAddOns_ = emptyIntList(); + public interface SearchEngineConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.Engine.SearchEngineConfig) + com.google.protobuf.MessageOrBuilder { - private void ensureSearchAddOnsIsMutable() { - if (!searchAddOns_.isModifiable()) { - searchAddOns_ = makeMutableCopy(searchAddOns_); - } - bitField0_ |= 0x00000002; - } + /** + * + * + *
            +     * The search feature tier of this engine.
            +     *
            +     * Different tiers might have different
            +     * pricing. To learn more, check the pricing documentation.
            +     *
            +     * Defaults to
            +     * [SearchTier.SEARCH_TIER_STANDARD][google.cloud.discoveryengine.v1beta.SearchTier.SEARCH_TIER_STANDARD]
            +     * if not specified.
            +     * 
            + * + * .google.cloud.discoveryengine.v1beta.SearchTier search_tier = 1; + * + * @return The enum numeric value on the wire for searchTier. + */ + int getSearchTierValue(); - /** - * - * - *
            -       * The add-on that this search engine enables.
            -       * 
            - * - * repeated .google.cloud.discoveryengine.v1beta.SearchAddOn search_add_ons = 2; - * - * @return A list containing the searchAddOns. - */ - public java.util.List - getSearchAddOnsList() { - return new com.google.protobuf.Internal.IntListAdapter< - com.google.cloud.discoveryengine.v1beta.SearchAddOn>( - searchAddOns_, searchAddOns_converter_); - } - - /** - * - * - *
            -       * The add-on that this search engine enables.
            -       * 
            - * - * repeated .google.cloud.discoveryengine.v1beta.SearchAddOn search_add_ons = 2; - * - * @return The count of searchAddOns. - */ - public int getSearchAddOnsCount() { - return searchAddOns_.size(); - } + /** + * + * + *
            +     * The search feature tier of this engine.
            +     *
            +     * Different tiers might have different
            +     * pricing. To learn more, check the pricing documentation.
            +     *
            +     * Defaults to
            +     * [SearchTier.SEARCH_TIER_STANDARD][google.cloud.discoveryengine.v1beta.SearchTier.SEARCH_TIER_STANDARD]
            +     * if not specified.
            +     * 
            + * + * .google.cloud.discoveryengine.v1beta.SearchTier search_tier = 1; + * + * @return The searchTier. + */ + com.google.cloud.discoveryengine.v1beta.SearchTier getSearchTier(); - /** - * - * - *
            -       * The add-on that this search engine enables.
            -       * 
            - * - * repeated .google.cloud.discoveryengine.v1beta.SearchAddOn search_add_ons = 2; - * - * @param index The index of the element to return. - * @return The searchAddOns at the given index. - */ - public com.google.cloud.discoveryengine.v1beta.SearchAddOn getSearchAddOns(int index) { - return searchAddOns_converter_.convert(searchAddOns_.getInt(index)); - } + /** + * + * + *
            +     * Optional. The required subscription tier of this engine.
            +     *
            +     * They cannot be modified after engine creation. If the required
            +     * subscription tier is search, user with higher license tier like assist
            +     * can still access the standalone app associated with this engine.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SubscriptionTier required_subscription_tier = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for requiredSubscriptionTier. + */ + int getRequiredSubscriptionTierValue(); - /** - * - * - *
            -       * The add-on that this search engine enables.
            -       * 
            - * - * repeated .google.cloud.discoveryengine.v1beta.SearchAddOn search_add_ons = 2; - * - * @param index The index to set the value at. - * @param value The searchAddOns to set. - * @return This builder for chaining. - */ - public Builder setSearchAddOns( - int index, com.google.cloud.discoveryengine.v1beta.SearchAddOn value) { - if (value == null) { - throw new NullPointerException(); - } - ensureSearchAddOnsIsMutable(); - searchAddOns_.setInt(index, value.getNumber()); - onChanged(); - return this; - } + /** + * + * + *
            +     * Optional. The required subscription tier of this engine.
            +     *
            +     * They cannot be modified after engine creation. If the required
            +     * subscription tier is search, user with higher license tier like assist
            +     * can still access the standalone app associated with this engine.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SubscriptionTier required_subscription_tier = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The requiredSubscriptionTier. + */ + com.google.cloud.discoveryengine.v1beta.SubscriptionTier getRequiredSubscriptionTier(); - /** - * - * - *
            -       * The add-on that this search engine enables.
            -       * 
            - * - * repeated .google.cloud.discoveryengine.v1beta.SearchAddOn search_add_ons = 2; - * - * @param value The searchAddOns to add. - * @return This builder for chaining. - */ - public Builder addSearchAddOns(com.google.cloud.discoveryengine.v1beta.SearchAddOn value) { - if (value == null) { - throw new NullPointerException(); - } - ensureSearchAddOnsIsMutable(); - searchAddOns_.addInt(value.getNumber()); - onChanged(); - return this; - } + /** + * + * + *
            +     * The add-on that this search engine enables.
            +     * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.SearchAddOn search_add_ons = 2; + * + * @return A list containing the searchAddOns. + */ + java.util.List getSearchAddOnsList(); - /** - * - * - *
            -       * The add-on that this search engine enables.
            -       * 
            - * - * repeated .google.cloud.discoveryengine.v1beta.SearchAddOn search_add_ons = 2; - * - * @param values The searchAddOns to add. - * @return This builder for chaining. - */ - public Builder addAllSearchAddOns( - java.lang.Iterable - values) { - ensureSearchAddOnsIsMutable(); - for (com.google.cloud.discoveryengine.v1beta.SearchAddOn value : values) { - searchAddOns_.addInt(value.getNumber()); - } - onChanged(); - return this; - } + /** + * + * + *
            +     * The add-on that this search engine enables.
            +     * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.SearchAddOn search_add_ons = 2; + * + * @return The count of searchAddOns. + */ + int getSearchAddOnsCount(); - /** - * - * - *
            -       * The add-on that this search engine enables.
            -       * 
            - * - * repeated .google.cloud.discoveryengine.v1beta.SearchAddOn search_add_ons = 2; - * - * @return This builder for chaining. - */ - public Builder clearSearchAddOns() { - searchAddOns_ = emptyIntList(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } + /** + * + * + *
            +     * The add-on that this search engine enables.
            +     * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.SearchAddOn search_add_ons = 2; + * + * @param index The index of the element to return. + * @return The searchAddOns at the given index. + */ + com.google.cloud.discoveryengine.v1beta.SearchAddOn getSearchAddOns(int index); - /** - * - * - *
            -       * The add-on that this search engine enables.
            -       * 
            - * - * repeated .google.cloud.discoveryengine.v1beta.SearchAddOn search_add_ons = 2; - * - * @return A list containing the enum numeric values on the wire for searchAddOns. - */ - public java.util.List getSearchAddOnsValueList() { - searchAddOns_.makeImmutable(); - return searchAddOns_; - } + /** + * + * + *
            +     * The add-on that this search engine enables.
            +     * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.SearchAddOn search_add_ons = 2; + * + * @return A list containing the enum numeric values on the wire for searchAddOns. + */ + java.util.List getSearchAddOnsValueList(); - /** - * - * - *
            -       * The add-on that this search engine enables.
            -       * 
            - * - * repeated .google.cloud.discoveryengine.v1beta.SearchAddOn search_add_ons = 2; - * - * @param index The index of the value to return. - * @return The enum numeric value on the wire of searchAddOns at the given index. - */ - public int getSearchAddOnsValue(int index) { - return searchAddOns_.getInt(index); - } + /** + * + * + *
            +     * The add-on that this search engine enables.
            +     * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.SearchAddOn search_add_ons = 2; + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of searchAddOns at the given index. + */ + int getSearchAddOnsValue(int index); + } - /** - * - * - *
            -       * The add-on that this search engine enables.
            -       * 
            - * - * repeated .google.cloud.discoveryengine.v1beta.SearchAddOn search_add_ons = 2; - * - * @param index The index to set the value at. - * @param value The enum numeric value on the wire for searchAddOns to set. - * @return This builder for chaining. - */ - public Builder setSearchAddOnsValue(int index, int value) { - ensureSearchAddOnsIsMutable(); - searchAddOns_.setInt(index, value); - onChanged(); - return this; - } - - /** - * - * - *
            -       * The add-on that this search engine enables.
            -       * 
            - * - * repeated .google.cloud.discoveryengine.v1beta.SearchAddOn search_add_ons = 2; - * - * @param value The enum numeric value on the wire for searchAddOns to add. - * @return This builder for chaining. - */ - public Builder addSearchAddOnsValue(int value) { - ensureSearchAddOnsIsMutable(); - searchAddOns_.addInt(value); - onChanged(); - return this; - } - - /** - * - * - *
            -       * The add-on that this search engine enables.
            -       * 
            - * - * repeated .google.cloud.discoveryengine.v1beta.SearchAddOn search_add_ons = 2; - * - * @param values The enum numeric values on the wire for searchAddOns to add. - * @return This builder for chaining. - */ - public Builder addAllSearchAddOnsValue(java.lang.Iterable values) { - ensureSearchAddOnsIsMutable(); - for (int value : values) { - searchAddOns_.addInt(value); - } - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.Engine.SearchEngineConfig) - } - - // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.Engine.SearchEngineConfig) - private static final com.google.cloud.discoveryengine.v1beta.Engine.SearchEngineConfig - DEFAULT_INSTANCE; + /** + * + * + *
            +   * Configurations for a Search Engine.
            +   * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.Engine.SearchEngineConfig} + */ + public static final class SearchEngineConfig extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.Engine.SearchEngineConfig) + SearchEngineConfigOrBuilder { + private static final long serialVersionUID = 0L; static { - DEFAULT_INSTANCE = new com.google.cloud.discoveryengine.v1beta.Engine.SearchEngineConfig(); + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "SearchEngineConfig"); } - public static com.google.cloud.discoveryengine.v1beta.Engine.SearchEngineConfig - getDefaultInstance() { - return DEFAULT_INSTANCE; + // Use SearchEngineConfig.newBuilder() to construct. + private SearchEngineConfig(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public SearchEngineConfig parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException() - .setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; + private SearchEngineConfig() { + searchTier_ = 0; + requiredSubscriptionTier_ = 0; + searchAddOns_ = emptyIntList(); } - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.EngineProto + .internal_static_google_cloud_discoveryengine_v1beta_Engine_SearchEngineConfig_descriptor; } @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.Engine.SearchEngineConfig - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.EngineProto + .internal_static_google_cloud_discoveryengine_v1beta_Engine_SearchEngineConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.Engine.SearchEngineConfig.class, + com.google.cloud.discoveryengine.v1beta.Engine.SearchEngineConfig.Builder.class); } - } - public interface ChatEngineConfigOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig) - com.google.protobuf.MessageOrBuilder { + public static final int SEARCH_TIER_FIELD_NUMBER = 1; + private int searchTier_ = 0; /** * * *
            -     * The configurationt generate the Dialogflow agent that is associated to
            -     * this Engine.
            +     * The search feature tier of this engine.
                  *
            -     * Note that these configurations are one-time consumed by
            -     * and passed to Dialogflow service. It means they cannot be retrieved using
            -     * [EngineService.GetEngine][google.cloud.discoveryengine.v1beta.EngineService.GetEngine]
            -     * or
            -     * [EngineService.ListEngines][google.cloud.discoveryengine.v1beta.EngineService.ListEngines]
            -     * API after engine creation.
            +     * Different tiers might have different
            +     * pricing. To learn more, check the pricing documentation.
            +     *
            +     * Defaults to
            +     * [SearchTier.SEARCH_TIER_STANDARD][google.cloud.discoveryengine.v1beta.SearchTier.SEARCH_TIER_STANDARD]
            +     * if not specified.
                  * 
            * - * - * .google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig.AgentCreationConfig agent_creation_config = 1; - * + * .google.cloud.discoveryengine.v1beta.SearchTier search_tier = 1; * - * @return Whether the agentCreationConfig field is set. + * @return The enum numeric value on the wire for searchTier. */ - boolean hasAgentCreationConfig(); + @java.lang.Override + public int getSearchTierValue() { + return searchTier_; + } /** * * *
            -     * The configurationt generate the Dialogflow agent that is associated to
            -     * this Engine.
            +     * The search feature tier of this engine.
                  *
            -     * Note that these configurations are one-time consumed by
            -     * and passed to Dialogflow service. It means they cannot be retrieved using
            -     * [EngineService.GetEngine][google.cloud.discoveryengine.v1beta.EngineService.GetEngine]
            -     * or
            -     * [EngineService.ListEngines][google.cloud.discoveryengine.v1beta.EngineService.ListEngines]
            -     * API after engine creation.
            +     * Different tiers might have different
            +     * pricing. To learn more, check the pricing documentation.
            +     *
            +     * Defaults to
            +     * [SearchTier.SEARCH_TIER_STANDARD][google.cloud.discoveryengine.v1beta.SearchTier.SEARCH_TIER_STANDARD]
            +     * if not specified.
                  * 
            * - * - * .google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig.AgentCreationConfig agent_creation_config = 1; - * + * .google.cloud.discoveryengine.v1beta.SearchTier search_tier = 1; * - * @return The agentCreationConfig. + * @return The searchTier. */ - com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig.AgentCreationConfig - getAgentCreationConfig(); + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.SearchTier getSearchTier() { + com.google.cloud.discoveryengine.v1beta.SearchTier result = + com.google.cloud.discoveryengine.v1beta.SearchTier.forNumber(searchTier_); + return result == null + ? com.google.cloud.discoveryengine.v1beta.SearchTier.UNRECOGNIZED + : result; + } + + public static final int REQUIRED_SUBSCRIPTION_TIER_FIELD_NUMBER = 3; + private int requiredSubscriptionTier_ = 0; /** * * *
            -     * The configurationt generate the Dialogflow agent that is associated to
            -     * this Engine.
            +     * Optional. The required subscription tier of this engine.
                  *
            -     * Note that these configurations are one-time consumed by
            -     * and passed to Dialogflow service. It means they cannot be retrieved using
            -     * [EngineService.GetEngine][google.cloud.discoveryengine.v1beta.EngineService.GetEngine]
            -     * or
            -     * [EngineService.ListEngines][google.cloud.discoveryengine.v1beta.EngineService.ListEngines]
            -     * API after engine creation.
            +     * They cannot be modified after engine creation. If the required
            +     * subscription tier is search, user with higher license tier like assist
            +     * can still access the standalone app associated with this engine.
                  * 
            * * - * .google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig.AgentCreationConfig agent_creation_config = 1; + * .google.cloud.discoveryengine.v1beta.SubscriptionTier required_subscription_tier = 3 [(.google.api.field_behavior) = OPTIONAL]; * + * + * @return The enum numeric value on the wire for requiredSubscriptionTier. */ - com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig.AgentCreationConfigOrBuilder - getAgentCreationConfigOrBuilder(); + @java.lang.Override + public int getRequiredSubscriptionTierValue() { + return requiredSubscriptionTier_; + } /** * * *
            -     * The resource name of an exist Dialogflow agent to link to this Chat
            -     * Engine. Customers can either provide `agent_creation_config` to create
            -     * agent or provide an agent name that links the agent with the Chat engine.
            -     *
            -     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
            -     * ID>`.
            +     * Optional. The required subscription tier of this engine.
                  *
            -     * Note that the `dialogflow_agent_to_link` are one-time consumed by and
            -     * passed to Dialogflow service. It means they cannot be retrieved using
            -     * [EngineService.GetEngine][google.cloud.discoveryengine.v1beta.EngineService.GetEngine]
            -     * or
            -     * [EngineService.ListEngines][google.cloud.discoveryengine.v1beta.EngineService.ListEngines]
            -     * API after engine creation. Use
            -     * [ChatEngineMetadata.dialogflow_agent][google.cloud.discoveryengine.v1beta.Engine.ChatEngineMetadata.dialogflow_agent]
            -     * for actual agent association after Engine is created.
            +     * They cannot be modified after engine creation. If the required
            +     * subscription tier is search, user with higher license tier like assist
            +     * can still access the standalone app associated with this engine.
                  * 
            * - * string dialogflow_agent_to_link = 2; + * + * .google.cloud.discoveryengine.v1beta.SubscriptionTier required_subscription_tier = 3 [(.google.api.field_behavior) = OPTIONAL]; + * * - * @return The dialogflowAgentToLink. + * @return The requiredSubscriptionTier. */ - java.lang.String getDialogflowAgentToLink(); + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.SubscriptionTier getRequiredSubscriptionTier() { + com.google.cloud.discoveryengine.v1beta.SubscriptionTier result = + com.google.cloud.discoveryengine.v1beta.SubscriptionTier.forNumber( + requiredSubscriptionTier_); + return result == null + ? com.google.cloud.discoveryengine.v1beta.SubscriptionTier.UNRECOGNIZED + : result; + } - /** - * - * - *
            -     * The resource name of an exist Dialogflow agent to link to this Chat
            -     * Engine. Customers can either provide `agent_creation_config` to create
            -     * agent or provide an agent name that links the agent with the Chat engine.
            -     *
            -     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
            -     * ID>`.
            -     *
            -     * Note that the `dialogflow_agent_to_link` are one-time consumed by and
            -     * passed to Dialogflow service. It means they cannot be retrieved using
            -     * [EngineService.GetEngine][google.cloud.discoveryengine.v1beta.EngineService.GetEngine]
            -     * or
            -     * [EngineService.ListEngines][google.cloud.discoveryengine.v1beta.EngineService.ListEngines]
            -     * API after engine creation. Use
            -     * [ChatEngineMetadata.dialogflow_agent][google.cloud.discoveryengine.v1beta.Engine.ChatEngineMetadata.dialogflow_agent]
            -     * for actual agent association after Engine is created.
            +    public static final int SEARCH_ADD_ONS_FIELD_NUMBER = 2;
            +
            +    @SuppressWarnings("serial")
            +    private com.google.protobuf.Internal.IntList searchAddOns_ = emptyIntList();
            +
            +    private static final com.google.protobuf.Internal.IntListAdapter.IntConverter<
            +            com.google.cloud.discoveryengine.v1beta.SearchAddOn>
            +        searchAddOns_converter_ =
            +            new com.google.protobuf.Internal.IntListAdapter.IntConverter<
            +                com.google.cloud.discoveryengine.v1beta.SearchAddOn>() {
            +              public com.google.cloud.discoveryengine.v1beta.SearchAddOn convert(int from) {
            +                com.google.cloud.discoveryengine.v1beta.SearchAddOn result =
            +                    com.google.cloud.discoveryengine.v1beta.SearchAddOn.forNumber(from);
            +                return result == null
            +                    ? com.google.cloud.discoveryengine.v1beta.SearchAddOn.UNRECOGNIZED
            +                    : result;
            +              }
            +            };
            +
            +    /**
            +     *
            +     *
            +     * 
            +     * The add-on that this search engine enables.
                  * 
            * - * string dialogflow_agent_to_link = 2; + * repeated .google.cloud.discoveryengine.v1beta.SearchAddOn search_add_ons = 2; * - * @return The bytes for dialogflowAgentToLink. + * @return A list containing the searchAddOns. */ - com.google.protobuf.ByteString getDialogflowAgentToLinkBytes(); - } - - /** - * - * - *
            -   * Configurations for a Chat Engine.
            -   * 
            - * - * Protobuf type {@code google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig} - */ - public static final class ChatEngineConfig extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig) - ChatEngineConfigOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "ChatEngineConfig"); + @java.lang.Override + public java.util.List + getSearchAddOnsList() { + return new com.google.protobuf.Internal.IntListAdapter< + com.google.cloud.discoveryengine.v1beta.SearchAddOn>( + searchAddOns_, searchAddOns_converter_); } - // Use ChatEngineConfig.newBuilder() to construct. - private ChatEngineConfig(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); + /** + * + * + *
            +     * The add-on that this search engine enables.
            +     * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.SearchAddOn search_add_ons = 2; + * + * @return The count of searchAddOns. + */ + @java.lang.Override + public int getSearchAddOnsCount() { + return searchAddOns_.size(); } - private ChatEngineConfig() { - dialogflowAgentToLink_ = ""; + /** + * + * + *
            +     * The add-on that this search engine enables.
            +     * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.SearchAddOn search_add_ons = 2; + * + * @param index The index of the element to return. + * @return The searchAddOns at the given index. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.SearchAddOn getSearchAddOns(int index) { + return searchAddOns_converter_.convert(searchAddOns_.getInt(index)); } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.discoveryengine.v1beta.EngineProto - .internal_static_google_cloud_discoveryengine_v1beta_Engine_ChatEngineConfig_descriptor; + /** + * + * + *
            +     * The add-on that this search engine enables.
            +     * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.SearchAddOn search_add_ons = 2; + * + * @return A list containing the enum numeric values on the wire for searchAddOns. + */ + @java.lang.Override + public java.util.List getSearchAddOnsValueList() { + return searchAddOns_; } + /** + * + * + *
            +     * The add-on that this search engine enables.
            +     * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.SearchAddOn search_add_ons = 2; + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of searchAddOns at the given index. + */ @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.discoveryengine.v1beta.EngineProto - .internal_static_google_cloud_discoveryengine_v1beta_Engine_ChatEngineConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig.class, - com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig.Builder.class); + public int getSearchAddOnsValue(int index) { + return searchAddOns_.getInt(index); } - public interface AgentCreationConfigOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig.AgentCreationConfig) - com.google.protobuf.MessageOrBuilder { + private int searchAddOnsMemoizedSerializedSize; - /** - * - * - *
            -       * Name of the company, organization or other entity that the agent
            -       * represents. Used for knowledge connector LLM prompt and for knowledge
            -       * search.
            -       * 
            - * - * string business = 1; - * - * @return The business. - */ - java.lang.String getBusiness(); + private byte memoizedIsInitialized = -1; - /** - * - * - *
            -       * Name of the company, organization or other entity that the agent
            -       * represents. Used for knowledge connector LLM prompt and for knowledge
            -       * search.
            -       * 
            - * - * string business = 1; - * - * @return The bytes for business. - */ - com.google.protobuf.ByteString getBusinessBytes(); + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; - /** - * - * - *
            -       * Required. The default language of the agent as a language tag.
            -       * See [Language
            -       * Support](https://cloud.google.com/dialogflow/docs/reference/language)
            -       * for a list of the currently supported language codes.
            -       * 
            - * - * string default_language_code = 2; - * - * @return The defaultLanguageCode. - */ - java.lang.String getDefaultLanguageCode(); + memoizedIsInitialized = 1; + return true; + } - /** - * - * - *
            -       * Required. The default language of the agent as a language tag.
            -       * See [Language
            -       * Support](https://cloud.google.com/dialogflow/docs/reference/language)
            -       * for a list of the currently supported language codes.
            -       * 
            - * - * string default_language_code = 2; - * - * @return The bytes for defaultLanguageCode. - */ - com.google.protobuf.ByteString getDefaultLanguageCodeBytes(); + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + getSerializedSize(); + if (searchTier_ + != com.google.cloud.discoveryengine.v1beta.SearchTier.SEARCH_TIER_UNSPECIFIED + .getNumber()) { + output.writeEnum(1, searchTier_); + } + if (getSearchAddOnsList().size() > 0) { + output.writeUInt32NoTag(18); + output.writeUInt32NoTag(searchAddOnsMemoizedSerializedSize); + } + for (int i = 0; i < searchAddOns_.size(); i++) { + output.writeEnumNoTag(searchAddOns_.getInt(i)); + } + if (requiredSubscriptionTier_ + != com.google.cloud.discoveryengine.v1beta.SubscriptionTier.SUBSCRIPTION_TIER_UNSPECIFIED + .getNumber()) { + output.writeEnum(3, requiredSubscriptionTier_); + } + getUnknownFields().writeTo(output); + } - /** - * - * - *
            -       * Required. The time zone of the agent from the [time zone
            -       * database](https://www.iana.org/time-zones), e.g., America/New_York,
            -       * Europe/Paris.
            -       * 
            - * - * string time_zone = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The timeZone. - */ - java.lang.String getTimeZone(); + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; - /** - * - * - *
            -       * Required. The time zone of the agent from the [time zone
            -       * database](https://www.iana.org/time-zones), e.g., America/New_York,
            -       * Europe/Paris.
            -       * 
            - * - * string time_zone = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for timeZone. - */ - com.google.protobuf.ByteString getTimeZoneBytes(); + size = 0; + if (searchTier_ + != com.google.cloud.discoveryengine.v1beta.SearchTier.SEARCH_TIER_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, searchTier_); + } + { + int dataSize = 0; + for (int i = 0; i < searchAddOns_.size(); i++) { + dataSize += + com.google.protobuf.CodedOutputStream.computeEnumSizeNoTag(searchAddOns_.getInt(i)); + } + size += dataSize; + if (!getSearchAddOnsList().isEmpty()) { + size += 1; + size += com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(dataSize); + } + searchAddOnsMemoizedSerializedSize = dataSize; + } + if (requiredSubscriptionTier_ + != com.google.cloud.discoveryengine.v1beta.SubscriptionTier.SUBSCRIPTION_TIER_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(3, requiredSubscriptionTier_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } - /** - * - * - *
            -       * Agent location for Agent creation, supported values: global/us/eu.
            -       * If not provided, us Engine will create Agent using us-central-1 by
            -       * default; eu Engine will create Agent using eu-west-1 by default.
            -       * 
            - * - * string location = 4; - * - * @return The location. - */ - java.lang.String getLocation(); + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.discoveryengine.v1beta.Engine.SearchEngineConfig)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1beta.Engine.SearchEngineConfig other = + (com.google.cloud.discoveryengine.v1beta.Engine.SearchEngineConfig) obj; - /** - * - * - *
            -       * Agent location for Agent creation, supported values: global/us/eu.
            -       * If not provided, us Engine will create Agent using us-central-1 by
            -       * default; eu Engine will create Agent using eu-west-1 by default.
            -       * 
            - * - * string location = 4; - * - * @return The bytes for location. - */ - com.google.protobuf.ByteString getLocationBytes(); + if (searchTier_ != other.searchTier_) return false; + if (requiredSubscriptionTier_ != other.requiredSubscriptionTier_) return false; + if (!searchAddOns_.equals(other.searchAddOns_)) 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) + SEARCH_TIER_FIELD_NUMBER; + hash = (53 * hash) + searchTier_; + hash = (37 * hash) + REQUIRED_SUBSCRIPTION_TIER_FIELD_NUMBER; + hash = (53 * hash) + requiredSubscriptionTier_; + if (getSearchAddOnsCount() > 0) { + hash = (37 * hash) + SEARCH_ADD_ONS_FIELD_NUMBER; + hash = (53 * hash) + searchAddOns_.hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1beta.Engine.SearchEngineConfig parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.Engine.SearchEngineConfig 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.discoveryengine.v1beta.Engine.SearchEngineConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.Engine.SearchEngineConfig 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.discoveryengine.v1beta.Engine.SearchEngineConfig parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.Engine.SearchEngineConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1beta.Engine.SearchEngineConfig parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.Engine.SearchEngineConfig 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.discoveryengine.v1beta.Engine.SearchEngineConfig + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.Engine.SearchEngineConfig + 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.discoveryengine.v1beta.Engine.SearchEngineConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.Engine.SearchEngineConfig 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.discoveryengine.v1beta.Engine.SearchEngineConfig 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; } /** * * *
            -     * Configurations for generating a Dialogflow agent.
            -     *
            -     * Note that these configurations are one-time consumed by
            -     * and passed to Dialogflow service. It means they cannot be retrieved using
            -     * [EngineService.GetEngine][google.cloud.discoveryengine.v1beta.EngineService.GetEngine]
            -     * or
            -     * [EngineService.ListEngines][google.cloud.discoveryengine.v1beta.EngineService.ListEngines]
            -     * API after engine creation.
            +     * Configurations for a Search Engine.
                  * 
            * - * Protobuf type {@code - * google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig.AgentCreationConfig} + * Protobuf type {@code google.cloud.discoveryengine.v1beta.Engine.SearchEngineConfig} */ - public static final class AgentCreationConfig extends com.google.protobuf.GeneratedMessage + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig.AgentCreationConfig) - AgentCreationConfigOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "AgentCreationConfig"); - } - - // Use AgentCreationConfig.newBuilder() to construct. - private AgentCreationConfig(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private AgentCreationConfig() { - business_ = ""; - defaultLanguageCode_ = ""; - timeZone_ = ""; - location_ = ""; - } - + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.Engine.SearchEngineConfig) + com.google.cloud.discoveryengine.v1beta.Engine.SearchEngineConfigOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.discoveryengine.v1beta.EngineProto - .internal_static_google_cloud_discoveryengine_v1beta_Engine_ChatEngineConfig_AgentCreationConfig_descriptor; + .internal_static_google_cloud_discoveryengine_v1beta_Engine_SearchEngineConfig_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.discoveryengine.v1beta.EngineProto - .internal_static_google_cloud_discoveryengine_v1beta_Engine_ChatEngineConfig_AgentCreationConfig_fieldAccessorTable + .internal_static_google_cloud_discoveryengine_v1beta_Engine_SearchEngineConfig_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig.AgentCreationConfig - .class, - com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig.AgentCreationConfig - .Builder.class); + com.google.cloud.discoveryengine.v1beta.Engine.SearchEngineConfig.class, + com.google.cloud.discoveryengine.v1beta.Engine.SearchEngineConfig.Builder.class); } - public static final int BUSINESS_FIELD_NUMBER = 1; + // Construct using + // com.google.cloud.discoveryengine.v1beta.Engine.SearchEngineConfig.newBuilder() + private Builder() {} - @SuppressWarnings("serial") - private volatile java.lang.Object business_ = ""; + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } - /** - * - * - *
            -       * Name of the company, organization or other entity that the agent
            -       * represents. Used for knowledge connector LLM prompt and for knowledge
            -       * search.
            -       * 
            - * - * string business = 1; - * - * @return The business. - */ @java.lang.Override - public java.lang.String getBusiness() { - java.lang.Object ref = business_; - 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(); - business_ = s; - return s; + public Builder clear() { + super.clear(); + bitField0_ = 0; + searchTier_ = 0; + requiredSubscriptionTier_ = 0; + searchAddOns_ = emptyIntList(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1beta.EngineProto + .internal_static_google_cloud_discoveryengine_v1beta_Engine_SearchEngineConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Engine.SearchEngineConfig + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1beta.Engine.SearchEngineConfig + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Engine.SearchEngineConfig build() { + com.google.cloud.discoveryengine.v1beta.Engine.SearchEngineConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); } + return result; } - /** - * - * - *
            -       * Name of the company, organization or other entity that the agent
            -       * represents. Used for knowledge connector LLM prompt and for knowledge
            -       * search.
            -       * 
            - * - * string business = 1; - * - * @return The bytes for business. - */ @java.lang.Override - public com.google.protobuf.ByteString getBusinessBytes() { - java.lang.Object ref = business_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - business_ = b; - return b; + public com.google.cloud.discoveryengine.v1beta.Engine.SearchEngineConfig buildPartial() { + com.google.cloud.discoveryengine.v1beta.Engine.SearchEngineConfig result = + new com.google.cloud.discoveryengine.v1beta.Engine.SearchEngineConfig(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.discoveryengine.v1beta.Engine.SearchEngineConfig result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.searchTier_ = searchTier_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.requiredSubscriptionTier_ = requiredSubscriptionTier_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + searchAddOns_.makeImmutable(); + result.searchAddOns_ = searchAddOns_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.discoveryengine.v1beta.Engine.SearchEngineConfig) { + return mergeFrom( + (com.google.cloud.discoveryengine.v1beta.Engine.SearchEngineConfig) other); } else { - return (com.google.protobuf.ByteString) ref; + super.mergeFrom(other); + return this; } } - public static final int DEFAULT_LANGUAGE_CODE_FIELD_NUMBER = 2; + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1beta.Engine.SearchEngineConfig other) { + if (other + == com.google.cloud.discoveryengine.v1beta.Engine.SearchEngineConfig + .getDefaultInstance()) return this; + if (other.searchTier_ != 0) { + setSearchTierValue(other.getSearchTierValue()); + } + if (other.requiredSubscriptionTier_ != 0) { + setRequiredSubscriptionTierValue(other.getRequiredSubscriptionTierValue()); + } + if (!other.searchAddOns_.isEmpty()) { + if (searchAddOns_.isEmpty()) { + searchAddOns_ = other.searchAddOns_; + searchAddOns_.makeImmutable(); + bitField0_ |= 0x00000004; + } else { + ensureSearchAddOnsIsMutable(); + searchAddOns_.addAll(other.searchAddOns_); + } + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } - @SuppressWarnings("serial") - private volatile java.lang.Object defaultLanguageCode_ = ""; + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + searchTier_ = input.readEnum(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 16: + { + int tmpRaw = input.readEnum(); + ensureSearchAddOnsIsMutable(); + searchAddOns_.addInt(tmpRaw); + break; + } // case 16 + case 18: + { + int length = input.readRawVarint32(); + int limit = input.pushLimit(length); + ensureSearchAddOnsIsMutable(); + while (input.getBytesUntilLimit() > 0) { + searchAddOns_.addInt(input.readEnum()); + } + input.popLimit(limit); + break; + } // case 18 + case 24: + { + requiredSubscriptionTier_ = input.readEnum(); + bitField0_ |= 0x00000002; + break; + } // case 24 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private int searchTier_ = 0; /** * * *
            -       * Required. The default language of the agent as a language tag.
            -       * See [Language
            -       * Support](https://cloud.google.com/dialogflow/docs/reference/language)
            -       * for a list of the currently supported language codes.
            +       * The search feature tier of this engine.
            +       *
            +       * Different tiers might have different
            +       * pricing. To learn more, check the pricing documentation.
            +       *
            +       * Defaults to
            +       * [SearchTier.SEARCH_TIER_STANDARD][google.cloud.discoveryengine.v1beta.SearchTier.SEARCH_TIER_STANDARD]
            +       * if not specified.
                    * 
            * - * string default_language_code = 2; + * .google.cloud.discoveryengine.v1beta.SearchTier search_tier = 1; * - * @return The defaultLanguageCode. + * @return The enum numeric value on the wire for searchTier. */ @java.lang.Override - public java.lang.String getDefaultLanguageCode() { - java.lang.Object ref = defaultLanguageCode_; - 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(); - defaultLanguageCode_ = s; - return s; - } + public int getSearchTierValue() { + return searchTier_; } /** * * *
            -       * Required. The default language of the agent as a language tag.
            -       * See [Language
            -       * Support](https://cloud.google.com/dialogflow/docs/reference/language)
            -       * for a list of the currently supported language codes.
            +       * The search feature tier of this engine.
            +       *
            +       * Different tiers might have different
            +       * pricing. To learn more, check the pricing documentation.
            +       *
            +       * Defaults to
            +       * [SearchTier.SEARCH_TIER_STANDARD][google.cloud.discoveryengine.v1beta.SearchTier.SEARCH_TIER_STANDARD]
            +       * if not specified.
                    * 
            * - * string default_language_code = 2; + * .google.cloud.discoveryengine.v1beta.SearchTier search_tier = 1; * - * @return The bytes for defaultLanguageCode. + * @param value The enum numeric value on the wire for searchTier to set. + * @return This builder for chaining. */ - @java.lang.Override - public com.google.protobuf.ByteString getDefaultLanguageCodeBytes() { - java.lang.Object ref = defaultLanguageCode_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - defaultLanguageCode_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } + public Builder setSearchTierValue(int value) { + searchTier_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; } - public static final int TIME_ZONE_FIELD_NUMBER = 3; - - @SuppressWarnings("serial") - private volatile java.lang.Object timeZone_ = ""; - /** * * *
            -       * Required. The time zone of the agent from the [time zone
            -       * database](https://www.iana.org/time-zones), e.g., America/New_York,
            -       * Europe/Paris.
            -       * 
            + * The search feature tier of this engine. * - * string time_zone = 3 [(.google.api.field_behavior) = REQUIRED]; + * Different tiers might have different + * pricing. To learn more, check the pricing documentation. * - * @return The timeZone. + * Defaults to + * [SearchTier.SEARCH_TIER_STANDARD][google.cloud.discoveryengine.v1beta.SearchTier.SEARCH_TIER_STANDARD] + * if not specified. + *
            + * + * .google.cloud.discoveryengine.v1beta.SearchTier search_tier = 1; + * + * @return The searchTier. */ @java.lang.Override - public java.lang.String getTimeZone() { - java.lang.Object ref = timeZone_; - 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(); - timeZone_ = s; - return s; - } + public com.google.cloud.discoveryengine.v1beta.SearchTier getSearchTier() { + com.google.cloud.discoveryengine.v1beta.SearchTier result = + com.google.cloud.discoveryengine.v1beta.SearchTier.forNumber(searchTier_); + return result == null + ? com.google.cloud.discoveryengine.v1beta.SearchTier.UNRECOGNIZED + : result; } /** * * *
            -       * Required. The time zone of the agent from the [time zone
            -       * database](https://www.iana.org/time-zones), e.g., America/New_York,
            -       * Europe/Paris.
            +       * The search feature tier of this engine.
            +       *
            +       * Different tiers might have different
            +       * pricing. To learn more, check the pricing documentation.
            +       *
            +       * Defaults to
            +       * [SearchTier.SEARCH_TIER_STANDARD][google.cloud.discoveryengine.v1beta.SearchTier.SEARCH_TIER_STANDARD]
            +       * if not specified.
                    * 
            * - * string time_zone = 3 [(.google.api.field_behavior) = REQUIRED]; + * .google.cloud.discoveryengine.v1beta.SearchTier search_tier = 1; * - * @return The bytes for timeZone. + * @param value The searchTier to set. + * @return This builder for chaining. */ - @java.lang.Override - public com.google.protobuf.ByteString getTimeZoneBytes() { - java.lang.Object ref = timeZone_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - timeZone_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; + public Builder setSearchTier(com.google.cloud.discoveryengine.v1beta.SearchTier value) { + if (value == null) { + throw new NullPointerException(); } + bitField0_ |= 0x00000001; + searchTier_ = value.getNumber(); + onChanged(); + return this; } - public static final int LOCATION_FIELD_NUMBER = 4; + /** + * + * + *
            +       * The search feature tier of this engine.
            +       *
            +       * Different tiers might have different
            +       * pricing. To learn more, check the pricing documentation.
            +       *
            +       * Defaults to
            +       * [SearchTier.SEARCH_TIER_STANDARD][google.cloud.discoveryengine.v1beta.SearchTier.SEARCH_TIER_STANDARD]
            +       * if not specified.
            +       * 
            + * + * .google.cloud.discoveryengine.v1beta.SearchTier search_tier = 1; + * + * @return This builder for chaining. + */ + public Builder clearSearchTier() { + bitField0_ = (bitField0_ & ~0x00000001); + searchTier_ = 0; + onChanged(); + return this; + } - @SuppressWarnings("serial") - private volatile java.lang.Object location_ = ""; + private int requiredSubscriptionTier_ = 0; /** * * *
            -       * Agent location for Agent creation, supported values: global/us/eu.
            -       * If not provided, us Engine will create Agent using us-central-1 by
            -       * default; eu Engine will create Agent using eu-west-1 by default.
            +       * Optional. The required subscription tier of this engine.
            +       *
            +       * They cannot be modified after engine creation. If the required
            +       * subscription tier is search, user with higher license tier like assist
            +       * can still access the standalone app associated with this engine.
                    * 
            * - * string location = 4; + * + * .google.cloud.discoveryengine.v1beta.SubscriptionTier required_subscription_tier = 3 [(.google.api.field_behavior) = OPTIONAL]; + * * - * @return The location. + * @return The enum numeric value on the wire for requiredSubscriptionTier. */ @java.lang.Override - public java.lang.String getLocation() { - java.lang.Object ref = location_; - 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(); - location_ = s; - return s; - } + public int getRequiredSubscriptionTierValue() { + return requiredSubscriptionTier_; } /** * * *
            -       * Agent location for Agent creation, supported values: global/us/eu.
            -       * If not provided, us Engine will create Agent using us-central-1 by
            -       * default; eu Engine will create Agent using eu-west-1 by default.
            +       * Optional. The required subscription tier of this engine.
            +       *
            +       * They cannot be modified after engine creation. If the required
            +       * subscription tier is search, user with higher license tier like assist
            +       * can still access the standalone app associated with this engine.
                    * 
            * - * string location = 4; + * + * .google.cloud.discoveryengine.v1beta.SubscriptionTier required_subscription_tier = 3 [(.google.api.field_behavior) = OPTIONAL]; + * * - * @return The bytes for location. + * @param value The enum numeric value on the wire for requiredSubscriptionTier to set. + * @return This builder for chaining. */ - @java.lang.Override - public com.google.protobuf.ByteString getLocationBytes() { - java.lang.Object ref = location_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - location_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } + public Builder setRequiredSubscriptionTierValue(int value) { + requiredSubscriptionTier_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; } - private byte memoizedIsInitialized = -1; - + /** + * + * + *
            +       * Optional. The required subscription tier of this engine.
            +       *
            +       * They cannot be modified after engine creation. If the required
            +       * subscription tier is search, user with higher license tier like assist
            +       * can still access the standalone app associated with this engine.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SubscriptionTier required_subscription_tier = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The requiredSubscriptionTier. + */ @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; + public com.google.cloud.discoveryengine.v1beta.SubscriptionTier + getRequiredSubscriptionTier() { + com.google.cloud.discoveryengine.v1beta.SubscriptionTier result = + com.google.cloud.discoveryengine.v1beta.SubscriptionTier.forNumber( + requiredSubscriptionTier_); + return result == null + ? com.google.cloud.discoveryengine.v1beta.SubscriptionTier.UNRECOGNIZED + : result; } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(business_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, business_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(defaultLanguageCode_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 2, defaultLanguageCode_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(timeZone_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 3, timeZone_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(location_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 4, location_); + /** + * + * + *
            +       * Optional. The required subscription tier of this engine.
            +       *
            +       * They cannot be modified after engine creation. If the required
            +       * subscription tier is search, user with higher license tier like assist
            +       * can still access the standalone app associated with this engine.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SubscriptionTier required_subscription_tier = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The requiredSubscriptionTier to set. + * @return This builder for chaining. + */ + public Builder setRequiredSubscriptionTier( + com.google.cloud.discoveryengine.v1beta.SubscriptionTier value) { + if (value == null) { + throw new NullPointerException(); } - getUnknownFields().writeTo(output); + bitField0_ |= 0x00000002; + requiredSubscriptionTier_ = value.getNumber(); + onChanged(); + return this; } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(business_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, business_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(defaultLanguageCode_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(2, defaultLanguageCode_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(timeZone_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(3, timeZone_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(location_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(4, location_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; + /** + * + * + *
            +       * Optional. The required subscription tier of this engine.
            +       *
            +       * They cannot be modified after engine creation. If the required
            +       * subscription tier is search, user with higher license tier like assist
            +       * can still access the standalone app associated with this engine.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SubscriptionTier required_subscription_tier = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearRequiredSubscriptionTier() { + bitField0_ = (bitField0_ & ~0x00000002); + requiredSubscriptionTier_ = 0; + onChanged(); + return this; } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj - instanceof - com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig.AgentCreationConfig)) { - return super.equals(obj); - } - com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig.AgentCreationConfig other = - (com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig.AgentCreationConfig) - obj; + private com.google.protobuf.Internal.IntList searchAddOns_ = emptyIntList(); - if (!getBusiness().equals(other.getBusiness())) return false; - if (!getDefaultLanguageCode().equals(other.getDefaultLanguageCode())) return false; - if (!getTimeZone().equals(other.getTimeZone())) return false; - if (!getLocation().equals(other.getLocation())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; + private void ensureSearchAddOnsIsMutable() { + if (!searchAddOns_.isModifiable()) { + searchAddOns_ = makeMutableCopy(searchAddOns_); + } + bitField0_ |= 0x00000004; } - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + BUSINESS_FIELD_NUMBER; - hash = (53 * hash) + getBusiness().hashCode(); - hash = (37 * hash) + DEFAULT_LANGUAGE_CODE_FIELD_NUMBER; - hash = (53 * hash) + getDefaultLanguageCode().hashCode(); - hash = (37 * hash) + TIME_ZONE_FIELD_NUMBER; - hash = (53 * hash) + getTimeZone().hashCode(); - hash = (37 * hash) + LOCATION_FIELD_NUMBER; - hash = (53 * hash) + getLocation().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig - .AgentCreationConfig - parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig - .AgentCreationConfig - 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.discoveryengine.v1beta.Engine.ChatEngineConfig - .AgentCreationConfig - parseFrom(com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig - .AgentCreationConfig - 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.discoveryengine.v1beta.Engine.ChatEngineConfig - .AgentCreationConfig - parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig - .AgentCreationConfig - parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig - .AgentCreationConfig - parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig - .AgentCreationConfig - 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.discoveryengine.v1beta.Engine.ChatEngineConfig - .AgentCreationConfig - parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig - .AgentCreationConfig - parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); + /** + * + * + *
            +       * The add-on that this search engine enables.
            +       * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.SearchAddOn search_add_ons = 2; + * + * @return A list containing the searchAddOns. + */ + public java.util.List + getSearchAddOnsList() { + return new com.google.protobuf.Internal.IntListAdapter< + com.google.cloud.discoveryengine.v1beta.SearchAddOn>( + searchAddOns_, searchAddOns_converter_); } - public static com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig - .AgentCreationConfig - parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + /** + * + * + *
            +       * The add-on that this search engine enables.
            +       * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.SearchAddOn search_add_ons = 2; + * + * @return The count of searchAddOns. + */ + public int getSearchAddOnsCount() { + return searchAddOns_.size(); } - public static com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig - .AgentCreationConfig - parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); + /** + * + * + *
            +       * The add-on that this search engine enables.
            +       * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.SearchAddOn search_add_ons = 2; + * + * @param index The index of the element to return. + * @return The searchAddOns at the given index. + */ + public com.google.cloud.discoveryengine.v1beta.SearchAddOn getSearchAddOns(int index) { + return searchAddOns_converter_.convert(searchAddOns_.getInt(index)); } - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); + /** + * + * + *
            +       * The add-on that this search engine enables.
            +       * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.SearchAddOn search_add_ons = 2; + * + * @param index The index to set the value at. + * @param value The searchAddOns to set. + * @return This builder for chaining. + */ + public Builder setSearchAddOns( + int index, com.google.cloud.discoveryengine.v1beta.SearchAddOn value) { + if (value == null) { + throw new NullPointerException(); + } + ensureSearchAddOnsIsMutable(); + searchAddOns_.setInt(index, value.getNumber()); + onChanged(); + return this; } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); + /** + * + * + *
            +       * The add-on that this search engine enables.
            +       * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.SearchAddOn search_add_ons = 2; + * + * @param value The searchAddOns to add. + * @return This builder for chaining. + */ + public Builder addSearchAddOns(com.google.cloud.discoveryengine.v1beta.SearchAddOn value) { + if (value == null) { + throw new NullPointerException(); + } + ensureSearchAddOnsIsMutable(); + searchAddOns_.addInt(value.getNumber()); + onChanged(); + return this; } - public static Builder newBuilder( - com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig.AgentCreationConfig - prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + /** + * + * + *
            +       * The add-on that this search engine enables.
            +       * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.SearchAddOn search_add_ons = 2; + * + * @param values The searchAddOns to add. + * @return This builder for chaining. + */ + public Builder addAllSearchAddOns( + java.lang.Iterable + values) { + ensureSearchAddOnsIsMutable(); + for (com.google.cloud.discoveryengine.v1beta.SearchAddOn value : values) { + searchAddOns_.addInt(value.getNumber()); + } + onChanged(); + return this; } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + /** + * + * + *
            +       * The add-on that this search engine enables.
            +       * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.SearchAddOn search_add_ons = 2; + * + * @return This builder for chaining. + */ + public Builder clearSearchAddOns() { + searchAddOns_ = emptyIntList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; + /** + * + * + *
            +       * The add-on that this search engine enables.
            +       * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.SearchAddOn search_add_ons = 2; + * + * @return A list containing the enum numeric values on the wire for searchAddOns. + */ + public java.util.List getSearchAddOnsValueList() { + searchAddOns_.makeImmutable(); + return searchAddOns_; } /** * * *
            -       * Configurations for generating a Dialogflow agent.
            -       *
            -       * Note that these configurations are one-time consumed by
            -       * and passed to Dialogflow service. It means they cannot be retrieved using
            -       * [EngineService.GetEngine][google.cloud.discoveryengine.v1beta.EngineService.GetEngine]
            -       * or
            -       * [EngineService.ListEngines][google.cloud.discoveryengine.v1beta.EngineService.ListEngines]
            -       * API after engine creation.
            +       * The add-on that this search engine enables.
                    * 
            * - * Protobuf type {@code - * google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig.AgentCreationConfig} - */ - public static final class Builder - extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig.AgentCreationConfig) - com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig - .AgentCreationConfigOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.discoveryengine.v1beta.EngineProto - .internal_static_google_cloud_discoveryengine_v1beta_Engine_ChatEngineConfig_AgentCreationConfig_descriptor; - } + * repeated .google.cloud.discoveryengine.v1beta.SearchAddOn search_add_ons = 2; + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of searchAddOns at the given index. + */ + public int getSearchAddOnsValue(int index) { + return searchAddOns_.getInt(index); + } - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.discoveryengine.v1beta.EngineProto - .internal_static_google_cloud_discoveryengine_v1beta_Engine_ChatEngineConfig_AgentCreationConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig - .AgentCreationConfig.class, - com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig - .AgentCreationConfig.Builder.class); - } + /** + * + * + *
            +       * The add-on that this search engine enables.
            +       * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.SearchAddOn search_add_ons = 2; + * + * @param index The index to set the value at. + * @param value The enum numeric value on the wire for searchAddOns to set. + * @return This builder for chaining. + */ + public Builder setSearchAddOnsValue(int index, int value) { + ensureSearchAddOnsIsMutable(); + searchAddOns_.setInt(index, value); + onChanged(); + return this; + } - // Construct using - // com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig.AgentCreationConfig.newBuilder() - private Builder() {} + /** + * + * + *
            +       * The add-on that this search engine enables.
            +       * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.SearchAddOn search_add_ons = 2; + * + * @param value The enum numeric value on the wire for searchAddOns to add. + * @return This builder for chaining. + */ + public Builder addSearchAddOnsValue(int value) { + ensureSearchAddOnsIsMutable(); + searchAddOns_.addInt(value); + onChanged(); + return this; + } - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); + /** + * + * + *
            +       * The add-on that this search engine enables.
            +       * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.SearchAddOn search_add_ons = 2; + * + * @param values The enum numeric values on the wire for searchAddOns to add. + * @return This builder for chaining. + */ + public Builder addAllSearchAddOnsValue(java.lang.Iterable values) { + ensureSearchAddOnsIsMutable(); + for (int value : values) { + searchAddOns_.addInt(value); } + onChanged(); + return this; + } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - business_ = ""; - defaultLanguageCode_ = ""; - timeZone_ = ""; - location_ = ""; - return this; - } + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.Engine.SearchEngineConfig) + } - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.discoveryengine.v1beta.EngineProto - .internal_static_google_cloud_discoveryengine_v1beta_Engine_ChatEngineConfig_AgentCreationConfig_descriptor; - } + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.Engine.SearchEngineConfig) + private static final com.google.cloud.discoveryengine.v1beta.Engine.SearchEngineConfig + DEFAULT_INSTANCE; - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig.AgentCreationConfig - getDefaultInstanceForType() { - return com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig.AgentCreationConfig - .getDefaultInstance(); - } + static { + DEFAULT_INSTANCE = new com.google.cloud.discoveryengine.v1beta.Engine.SearchEngineConfig(); + } - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig.AgentCreationConfig - build() { - com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig.AgentCreationConfig - result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } + public static com.google.cloud.discoveryengine.v1beta.Engine.SearchEngineConfig + getDefaultInstance() { + return DEFAULT_INSTANCE; + } - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig.AgentCreationConfig - buildPartial() { - com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig.AgentCreationConfig - result = - new com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig - .AgentCreationConfig(this); - if (bitField0_ != 0) { - buildPartial0(result); + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SearchEngineConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } - onBuilt(); - return result; - } + }; - private void buildPartial0( - com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig.AgentCreationConfig - result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.business_ = business_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.defaultLanguageCode_ = defaultLanguageCode_; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.timeZone_ = timeZone_; - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.location_ = location_; - } - } + public static com.google.protobuf.Parser parser() { + return PARSER; + } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other - instanceof - com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig.AgentCreationConfig) { - return mergeFrom( - (com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig - .AgentCreationConfig) - other); - } else { - super.mergeFrom(other); - return this; - } - } + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } - public Builder mergeFrom( - com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig.AgentCreationConfig - other) { - if (other - == com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig.AgentCreationConfig - .getDefaultInstance()) return this; - if (!other.getBusiness().isEmpty()) { - business_ = other.business_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (!other.getDefaultLanguageCode().isEmpty()) { - defaultLanguageCode_ = other.defaultLanguageCode_; - bitField0_ |= 0x00000002; - onChanged(); - } - if (!other.getTimeZone().isEmpty()) { - timeZone_ = other.timeZone_; - bitField0_ |= 0x00000004; - onChanged(); - } - if (!other.getLocation().isEmpty()) { - location_ = other.location_; - bitField0_ |= 0x00000008; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Engine.SearchEngineConfig + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } - @java.lang.Override - public final boolean isInitialized() { - return true; - } + public interface MediaRecommendationEngineConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig) + com.google.protobuf.MessageOrBuilder { - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - business_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: - { - defaultLanguageCode_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 26: - { - timeZone_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - break; - } // case 26 - case 34: - { - location_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - break; - } // case 34 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; + /** + * + * + *
            +     * Required. The type of engine. e.g., `recommended-for-you`.
            +     *
            +     * This field together with
            +     * [optimization_objective][google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig.optimization_objective]
            +     * describe engine metadata to use to control engine training and serving.
            +     *
            +     * Currently supported values: `recommended-for-you`, `others-you-may-like`,
            +     * `more-like-this`, `most-popular-items`.
            +     * 
            + * + * string type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The type. + */ + java.lang.String getType(); - private java.lang.Object business_ = ""; + /** + * + * + *
            +     * Required. The type of engine. e.g., `recommended-for-you`.
            +     *
            +     * This field together with
            +     * [optimization_objective][google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig.optimization_objective]
            +     * describe engine metadata to use to control engine training and serving.
            +     *
            +     * Currently supported values: `recommended-for-you`, `others-you-may-like`,
            +     * `more-like-this`, `most-popular-items`.
            +     * 
            + * + * string type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for type. + */ + com.google.protobuf.ByteString getTypeBytes(); - /** - * - * - *
            -         * Name of the company, organization or other entity that the agent
            -         * represents. Used for knowledge connector LLM prompt and for knowledge
            -         * search.
            -         * 
            - * - * string business = 1; - * - * @return The business. - */ - public java.lang.String getBusiness() { - java.lang.Object ref = business_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - business_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } + /** + * + * + *
            +     * The optimization objective. e.g., `cvr`.
            +     *
            +     * This field together with
            +     * [optimization_objective][google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig.type]
            +     * describe engine metadata to use to control engine training and serving.
            +     *
            +     * Currently supported
            +     * values: `ctr`, `cvr`.
            +     *
            +     * If not specified, we choose default based on engine type.
            +     * Default depends on type of recommendation:
            +     *
            +     * `recommended-for-you` => `ctr`
            +     *
            +     * `others-you-may-like` => `ctr`
            +     * 
            + * + * string optimization_objective = 2; + * + * @return The optimizationObjective. + */ + java.lang.String getOptimizationObjective(); - /** - * - * - *
            -         * Name of the company, organization or other entity that the agent
            -         * represents. Used for knowledge connector LLM prompt and for knowledge
            -         * search.
            -         * 
            - * - * string business = 1; - * - * @return The bytes for business. - */ - public com.google.protobuf.ByteString getBusinessBytes() { - java.lang.Object ref = business_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - business_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } + /** + * + * + *
            +     * The optimization objective. e.g., `cvr`.
            +     *
            +     * This field together with
            +     * [optimization_objective][google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig.type]
            +     * describe engine metadata to use to control engine training and serving.
            +     *
            +     * Currently supported
            +     * values: `ctr`, `cvr`.
            +     *
            +     * If not specified, we choose default based on engine type.
            +     * Default depends on type of recommendation:
            +     *
            +     * `recommended-for-you` => `ctr`
            +     *
            +     * `others-you-may-like` => `ctr`
            +     * 
            + * + * string optimization_objective = 2; + * + * @return The bytes for optimizationObjective. + */ + com.google.protobuf.ByteString getOptimizationObjectiveBytes(); - /** - * - * - *
            -         * Name of the company, organization or other entity that the agent
            -         * represents. Used for knowledge connector LLM prompt and for knowledge
            -         * search.
            -         * 
            - * - * string business = 1; - * - * @param value The business to set. - * @return This builder for chaining. - */ - public Builder setBusiness(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - business_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } + /** + * + * + *
            +     * Name and value of the custom threshold for cvr optimization_objective.
            +     * For target_field `watch-time`, target_field_value must be an integer
            +     * value indicating the media progress time in seconds between (0, 86400]
            +     * (excludes 0, includes 86400) (e.g., 90).
            +     * For target_field `watch-percentage`, the target_field_value must be a
            +     * valid float value between (0, 1.0] (excludes 0, includes 1.0) (e.g.,
            +     * 0.5).
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig.OptimizationObjectiveConfig optimization_objective_config = 3; + * + * + * @return Whether the optimizationObjectiveConfig field is set. + */ + boolean hasOptimizationObjectiveConfig(); - /** - * - * - *
            -         * Name of the company, organization or other entity that the agent
            -         * represents. Used for knowledge connector LLM prompt and for knowledge
            -         * search.
            -         * 
            - * - * string business = 1; - * - * @return This builder for chaining. - */ - public Builder clearBusiness() { - business_ = getDefaultInstance().getBusiness(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } + /** + * + * + *
            +     * Name and value of the custom threshold for cvr optimization_objective.
            +     * For target_field `watch-time`, target_field_value must be an integer
            +     * value indicating the media progress time in seconds between (0, 86400]
            +     * (excludes 0, includes 86400) (e.g., 90).
            +     * For target_field `watch-percentage`, the target_field_value must be a
            +     * valid float value between (0, 1.0] (excludes 0, includes 1.0) (e.g.,
            +     * 0.5).
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig.OptimizationObjectiveConfig optimization_objective_config = 3; + * + * + * @return The optimizationObjectiveConfig. + */ + com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .OptimizationObjectiveConfig + getOptimizationObjectiveConfig(); - /** - * - * - *
            -         * Name of the company, organization or other entity that the agent
            -         * represents. Used for knowledge connector LLM prompt and for knowledge
            -         * search.
            -         * 
            - * - * string business = 1; - * - * @param value The bytes for business to set. - * @return This builder for chaining. - */ - public Builder setBusinessBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - business_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } + /** + * + * + *
            +     * Name and value of the custom threshold for cvr optimization_objective.
            +     * For target_field `watch-time`, target_field_value must be an integer
            +     * value indicating the media progress time in seconds between (0, 86400]
            +     * (excludes 0, includes 86400) (e.g., 90).
            +     * For target_field `watch-percentage`, the target_field_value must be a
            +     * valid float value between (0, 1.0] (excludes 0, includes 1.0) (e.g.,
            +     * 0.5).
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig.OptimizationObjectiveConfig optimization_objective_config = 3; + * + */ + com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .OptimizationObjectiveConfigOrBuilder + getOptimizationObjectiveConfigOrBuilder(); - private java.lang.Object defaultLanguageCode_ = ""; + /** + * + * + *
            +     * The training state that the engine is in (e.g.
            +     * `TRAINING` or `PAUSED`).
            +     *
            +     * Since part of the cost of running the service
            +     * is frequency of training - this can be used to determine when to train
            +     * engine in order to control cost. If not specified: the default value for
            +     * `CreateEngine` method is `TRAINING`. The default value for
            +     * `UpdateEngine` method is to keep the state the same as before.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig.TrainingState training_state = 4; + * + * + * @return The enum numeric value on the wire for trainingState. + */ + int getTrainingStateValue(); - /** - * - * - *
            -         * Required. The default language of the agent as a language tag.
            -         * See [Language
            -         * Support](https://cloud.google.com/dialogflow/docs/reference/language)
            -         * for a list of the currently supported language codes.
            -         * 
            - * - * string default_language_code = 2; - * - * @return The defaultLanguageCode. - */ - public java.lang.String getDefaultLanguageCode() { - java.lang.Object ref = defaultLanguageCode_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - defaultLanguageCode_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } + /** + * + * + *
            +     * The training state that the engine is in (e.g.
            +     * `TRAINING` or `PAUSED`).
            +     *
            +     * Since part of the cost of running the service
            +     * is frequency of training - this can be used to determine when to train
            +     * engine in order to control cost. If not specified: the default value for
            +     * `CreateEngine` method is `TRAINING`. The default value for
            +     * `UpdateEngine` method is to keep the state the same as before.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig.TrainingState training_state = 4; + * + * + * @return The trainingState. + */ + com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig.TrainingState + getTrainingState(); - /** - * - * - *
            -         * Required. The default language of the agent as a language tag.
            -         * See [Language
            -         * Support](https://cloud.google.com/dialogflow/docs/reference/language)
            -         * for a list of the currently supported language codes.
            -         * 
            - * - * string default_language_code = 2; - * - * @return The bytes for defaultLanguageCode. - */ - public com.google.protobuf.ByteString getDefaultLanguageCodeBytes() { - java.lang.Object ref = defaultLanguageCode_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - defaultLanguageCode_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } + /** + * + * + *
            +     * Optional. Additional engine features config.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig.EngineFeaturesConfig engine_features_config = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the engineFeaturesConfig field is set. + */ + boolean hasEngineFeaturesConfig(); - /** - * - * - *
            -         * Required. The default language of the agent as a language tag.
            -         * See [Language
            -         * Support](https://cloud.google.com/dialogflow/docs/reference/language)
            -         * for a list of the currently supported language codes.
            -         * 
            - * - * string default_language_code = 2; - * - * @param value The defaultLanguageCode to set. - * @return This builder for chaining. - */ - public Builder setDefaultLanguageCode(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - defaultLanguageCode_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } + /** + * + * + *
            +     * Optional. Additional engine features config.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig.EngineFeaturesConfig engine_features_config = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The engineFeaturesConfig. + */ + com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .EngineFeaturesConfig + getEngineFeaturesConfig(); - /** - * - * - *
            -         * Required. The default language of the agent as a language tag.
            -         * See [Language
            -         * Support](https://cloud.google.com/dialogflow/docs/reference/language)
            -         * for a list of the currently supported language codes.
            -         * 
            - * - * string default_language_code = 2; - * - * @return This builder for chaining. - */ - public Builder clearDefaultLanguageCode() { - defaultLanguageCode_ = getDefaultInstance().getDefaultLanguageCode(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } + /** + * + * + *
            +     * Optional. Additional engine features config.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig.EngineFeaturesConfig engine_features_config = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .EngineFeaturesConfigOrBuilder + getEngineFeaturesConfigOrBuilder(); + } - /** - * - * - *
            -         * Required. The default language of the agent as a language tag.
            -         * See [Language
            -         * Support](https://cloud.google.com/dialogflow/docs/reference/language)
            -         * for a list of the currently supported language codes.
            -         * 
            - * - * string default_language_code = 2; - * - * @param value The bytes for defaultLanguageCode to set. - * @return This builder for chaining. - */ - public Builder setDefaultLanguageCodeBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - defaultLanguageCode_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } + /** + * + * + *
            +   * Additional config specs for a Media Recommendation engine.
            +   * 
            + * + * Protobuf type {@code + * google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig} + */ + public static final class MediaRecommendationEngineConfig + extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig) + MediaRecommendationEngineConfigOrBuilder { + private static final long serialVersionUID = 0L; - private java.lang.Object timeZone_ = ""; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "MediaRecommendationEngineConfig"); + } - /** - * - * - *
            -         * Required. The time zone of the agent from the [time zone
            -         * database](https://www.iana.org/time-zones), e.g., America/New_York,
            -         * Europe/Paris.
            -         * 
            - * - * string time_zone = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The timeZone. - */ - public java.lang.String getTimeZone() { - java.lang.Object ref = timeZone_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - timeZone_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } + // Use MediaRecommendationEngineConfig.newBuilder() to construct. + private MediaRecommendationEngineConfig( + com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } - /** - * - * - *
            -         * Required. The time zone of the agent from the [time zone
            -         * database](https://www.iana.org/time-zones), e.g., America/New_York,
            -         * Europe/Paris.
            -         * 
            - * - * string time_zone = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for timeZone. - */ - public com.google.protobuf.ByteString getTimeZoneBytes() { - java.lang.Object ref = timeZone_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - timeZone_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } + private MediaRecommendationEngineConfig() { + type_ = ""; + optimizationObjective_ = ""; + trainingState_ = 0; + } - /** - * - * - *
            -         * Required. The time zone of the agent from the [time zone
            -         * database](https://www.iana.org/time-zones), e.g., America/New_York,
            -         * Europe/Paris.
            -         * 
            - * - * string time_zone = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The timeZone to set. - * @return This builder for chaining. - */ - public Builder setTimeZone(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - timeZone_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.EngineProto + .internal_static_google_cloud_discoveryengine_v1beta_Engine_MediaRecommendationEngineConfig_descriptor; + } - /** - * - * - *
            -         * Required. The time zone of the agent from the [time zone
            -         * database](https://www.iana.org/time-zones), e.g., America/New_York,
            -         * Europe/Paris.
            -         * 
            - * - * string time_zone = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @return This builder for chaining. - */ - public Builder clearTimeZone() { - timeZone_ = getDefaultInstance().getTimeZone(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - return this; - } + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.EngineProto + .internal_static_google_cloud_discoveryengine_v1beta_Engine_MediaRecommendationEngineConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig.class, + com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig.Builder + .class); + } - /** - * - * - *
            -         * Required. The time zone of the agent from the [time zone
            -         * database](https://www.iana.org/time-zones), e.g., America/New_York,
            -         * Europe/Paris.
            -         * 
            - * - * string time_zone = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The bytes for timeZone to set. - * @return This builder for chaining. - */ - public Builder setTimeZoneBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - timeZone_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } + /** + * + * + *
            +     * The training state of the engine.
            +     * 
            + * + * Protobuf enum {@code + * google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig.TrainingState} + */ + public enum TrainingState implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
            +       * Unspecified training state.
            +       * 
            + * + * TRAINING_STATE_UNSPECIFIED = 0; + */ + TRAINING_STATE_UNSPECIFIED(0), + /** + * + * + *
            +       * The engine training is paused.
            +       * 
            + * + * PAUSED = 1; + */ + PAUSED(1), + /** + * + * + *
            +       * The engine is training.
            +       * 
            + * + * TRAINING = 2; + */ + TRAINING(2), + UNRECOGNIZED(-1), + ; - private java.lang.Object location_ = ""; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "TrainingState"); + } - /** - * - * - *
            -         * Agent location for Agent creation, supported values: global/us/eu.
            -         * If not provided, us Engine will create Agent using us-central-1 by
            -         * default; eu Engine will create Agent using eu-west-1 by default.
            -         * 
            - * - * string location = 4; - * - * @return The location. - */ - public java.lang.String getLocation() { - java.lang.Object ref = location_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - location_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } + /** + * + * + *
            +       * Unspecified training state.
            +       * 
            + * + * TRAINING_STATE_UNSPECIFIED = 0; + */ + public static final int TRAINING_STATE_UNSPECIFIED_VALUE = 0; - /** - * - * - *
            -         * Agent location for Agent creation, supported values: global/us/eu.
            -         * If not provided, us Engine will create Agent using us-central-1 by
            -         * default; eu Engine will create Agent using eu-west-1 by default.
            -         * 
            - * - * string location = 4; - * - * @return The bytes for location. - */ - public com.google.protobuf.ByteString getLocationBytes() { - java.lang.Object ref = location_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - location_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } + /** + * + * + *
            +       * The engine training is paused.
            +       * 
            + * + * PAUSED = 1; + */ + public static final int PAUSED_VALUE = 1; - /** - * - * - *
            -         * Agent location for Agent creation, supported values: global/us/eu.
            -         * If not provided, us Engine will create Agent using us-central-1 by
            -         * default; eu Engine will create Agent using eu-west-1 by default.
            -         * 
            - * - * string location = 4; - * - * @param value The location to set. - * @return This builder for chaining. - */ - public Builder setLocation(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - location_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } + /** + * + * + *
            +       * The engine is training.
            +       * 
            + * + * TRAINING = 2; + */ + public static final int TRAINING_VALUE = 2; - /** - * - * - *
            -         * Agent location for Agent creation, supported values: global/us/eu.
            -         * If not provided, us Engine will create Agent using us-central-1 by
            -         * default; eu Engine will create Agent using eu-west-1 by default.
            -         * 
            - * - * string location = 4; - * - * @return This builder for chaining. - */ - public Builder clearLocation() { - location_ = getDefaultInstance().getLocation(); - bitField0_ = (bitField0_ & ~0x00000008); - onChanged(); - return this; + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); } + return value; + } - /** - * - * - *
            -         * Agent location for Agent creation, supported values: global/us/eu.
            -         * If not provided, us Engine will create Agent using us-central-1 by
            -         * default; eu Engine will create Agent using eu-west-1 by default.
            -         * 
            - * - * string location = 4; - * - * @param value The bytes for location to set. - * @return This builder for chaining. - */ - public Builder setLocationBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - location_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; + /** + * @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 TrainingState 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 TrainingState forNumber(int value) { + switch (value) { + case 0: + return TRAINING_STATE_UNSPECIFIED; + case 1: + return PAUSED; + case 2: + return TRAINING; + default: + return null; } + } - // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig.AgentCreationConfig) + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; } - // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig.AgentCreationConfig) - private static final com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig - .AgentCreationConfig - DEFAULT_INSTANCE; + private static final com.google.protobuf.Internal.EnumLiteMap + internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public TrainingState findValueByNumber(int number) { + return TrainingState.forNumber(number); + } + }; - static { - DEFAULT_INSTANCE = - new com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig - .AgentCreationConfig(); + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); } - public static com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig - .AgentCreationConfig - getDefaultInstance() { - return DEFAULT_INSTANCE; + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public AgentCreationConfig parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException() - .setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; + public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .getDescriptor() + .getEnumTypes() + .get(0); + } - public static com.google.protobuf.Parser parser() { - return PARSER; - } + private static final TrainingState[] VALUES = values(); - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; + public static TrainingState valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; } - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig.AgentCreationConfig - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; + private final int value; + + private TrainingState(int value) { + this.value = value; } + + // @@protoc_insertion_point(enum_scope:google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig.TrainingState) } - private int bitField0_; - public static final int AGENT_CREATION_CONFIG_FIELD_NUMBER = 1; - private com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig.AgentCreationConfig - agentCreationConfig_; + public interface OptimizationObjectiveConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig.OptimizationObjectiveConfig) + com.google.protobuf.MessageOrBuilder { - /** - * - * - *
            -     * The configurationt generate the Dialogflow agent that is associated to
            -     * this Engine.
            -     *
            -     * Note that these configurations are one-time consumed by
            -     * and passed to Dialogflow service. It means they cannot be retrieved using
            -     * [EngineService.GetEngine][google.cloud.discoveryengine.v1beta.EngineService.GetEngine]
            -     * or
            -     * [EngineService.ListEngines][google.cloud.discoveryengine.v1beta.EngineService.ListEngines]
            -     * API after engine creation.
            -     * 
            - * - * - * .google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig.AgentCreationConfig agent_creation_config = 1; - * - * - * @return Whether the agentCreationConfig field is set. - */ - @java.lang.Override - public boolean hasAgentCreationConfig() { - return ((bitField0_ & 0x00000001) != 0); - } + /** + * + * + *
            +       * Required. The name of the field to target. Currently supported
            +       * values: `watch-percentage`, `watch-time`.
            +       * 
            + * + * string target_field = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The targetField. + */ + java.lang.String getTargetField(); - /** - * - * - *
            -     * The configurationt generate the Dialogflow agent that is associated to
            -     * this Engine.
            -     *
            -     * Note that these configurations are one-time consumed by
            -     * and passed to Dialogflow service. It means they cannot be retrieved using
            -     * [EngineService.GetEngine][google.cloud.discoveryengine.v1beta.EngineService.GetEngine]
            -     * or
            -     * [EngineService.ListEngines][google.cloud.discoveryengine.v1beta.EngineService.ListEngines]
            -     * API after engine creation.
            -     * 
            - * - * - * .google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig.AgentCreationConfig agent_creation_config = 1; - * - * - * @return The agentCreationConfig. - */ - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig.AgentCreationConfig - getAgentCreationConfig() { - return agentCreationConfig_ == null - ? com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig.AgentCreationConfig - .getDefaultInstance() - : agentCreationConfig_; + /** + * + * + *
            +       * Required. The name of the field to target. Currently supported
            +       * values: `watch-percentage`, `watch-time`.
            +       * 
            + * + * string target_field = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for targetField. + */ + com.google.protobuf.ByteString getTargetFieldBytes(); + + /** + * + * + *
            +       * Required. The threshold to be applied to the target (e.g., 0.5).
            +       * 
            + * + * float target_field_value_float = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The targetFieldValueFloat. + */ + float getTargetFieldValueFloat(); } /** * * *
            -     * The configurationt generate the Dialogflow agent that is associated to
            -     * this Engine.
            -     *
            -     * Note that these configurations are one-time consumed by
            -     * and passed to Dialogflow service. It means they cannot be retrieved using
            -     * [EngineService.GetEngine][google.cloud.discoveryengine.v1beta.EngineService.GetEngine]
            -     * or
            -     * [EngineService.ListEngines][google.cloud.discoveryengine.v1beta.EngineService.ListEngines]
            -     * API after engine creation.
            +     * Custom threshold for `cvr` optimization_objective.
                  * 
            * - * - * .google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig.AgentCreationConfig agent_creation_config = 1; - * + * Protobuf type {@code + * google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig.OptimizationObjectiveConfig} */ - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig - .AgentCreationConfigOrBuilder - getAgentCreationConfigOrBuilder() { - return agentCreationConfig_ == null - ? com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig.AgentCreationConfig - .getDefaultInstance() - : agentCreationConfig_; - } + public static final class OptimizationObjectiveConfig + extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig.OptimizationObjectiveConfig) + OptimizationObjectiveConfigOrBuilder { + private static final long serialVersionUID = 0L; - public static final int DIALOGFLOW_AGENT_TO_LINK_FIELD_NUMBER = 2; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "OptimizationObjectiveConfig"); + } - @SuppressWarnings("serial") - private volatile java.lang.Object dialogflowAgentToLink_ = ""; + // Use OptimizationObjectiveConfig.newBuilder() to construct. + private OptimizationObjectiveConfig(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } - /** - * - * - *
            -     * The resource name of an exist Dialogflow agent to link to this Chat
            -     * Engine. Customers can either provide `agent_creation_config` to create
            -     * agent or provide an agent name that links the agent with the Chat engine.
            -     *
            -     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
            -     * ID>`.
            -     *
            -     * Note that the `dialogflow_agent_to_link` are one-time consumed by and
            -     * passed to Dialogflow service. It means they cannot be retrieved using
            -     * [EngineService.GetEngine][google.cloud.discoveryengine.v1beta.EngineService.GetEngine]
            -     * or
            -     * [EngineService.ListEngines][google.cloud.discoveryengine.v1beta.EngineService.ListEngines]
            -     * API after engine creation. Use
            -     * [ChatEngineMetadata.dialogflow_agent][google.cloud.discoveryengine.v1beta.Engine.ChatEngineMetadata.dialogflow_agent]
            -     * for actual agent association after Engine is created.
            -     * 
            - * - * string dialogflow_agent_to_link = 2; - * - * @return The dialogflowAgentToLink. - */ - @java.lang.Override - public java.lang.String getDialogflowAgentToLink() { - java.lang.Object ref = dialogflowAgentToLink_; - 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(); - dialogflowAgentToLink_ = s; - return s; + private OptimizationObjectiveConfig() { + targetField_ = ""; } - } - /** - * - * - *
            -     * The resource name of an exist Dialogflow agent to link to this Chat
            -     * Engine. Customers can either provide `agent_creation_config` to create
            -     * agent or provide an agent name that links the agent with the Chat engine.
            -     *
            -     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
            -     * ID>`.
            -     *
            -     * Note that the `dialogflow_agent_to_link` are one-time consumed by and
            -     * passed to Dialogflow service. It means they cannot be retrieved using
            -     * [EngineService.GetEngine][google.cloud.discoveryengine.v1beta.EngineService.GetEngine]
            -     * or
            -     * [EngineService.ListEngines][google.cloud.discoveryengine.v1beta.EngineService.ListEngines]
            -     * API after engine creation. Use
            -     * [ChatEngineMetadata.dialogflow_agent][google.cloud.discoveryengine.v1beta.Engine.ChatEngineMetadata.dialogflow_agent]
            -     * for actual agent association after Engine is created.
            -     * 
            - * - * string dialogflow_agent_to_link = 2; - * - * @return The bytes for dialogflowAgentToLink. - */ - @java.lang.Override - public com.google.protobuf.ByteString getDialogflowAgentToLinkBytes() { - java.lang.Object ref = dialogflowAgentToLink_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - dialogflowAgentToLink_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.EngineProto + .internal_static_google_cloud_discoveryengine_v1beta_Engine_MediaRecommendationEngineConfig_OptimizationObjectiveConfig_descriptor; } - } - private byte memoizedIsInitialized = -1; + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.EngineProto + .internal_static_google_cloud_discoveryengine_v1beta_Engine_MediaRecommendationEngineConfig_OptimizationObjectiveConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .OptimizationObjectiveConfig.class, + com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .OptimizationObjectiveConfig.Builder.class); + } - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + public static final int TARGET_FIELD_FIELD_NUMBER = 1; - memoizedIsInitialized = 1; - return true; - } + @SuppressWarnings("serial") + private volatile java.lang.Object targetField_ = ""; - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(1, getAgentCreationConfig()); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(dialogflowAgentToLink_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 2, dialogflowAgentToLink_); + /** + * + * + *
            +       * Required. The name of the field to target. Currently supported
            +       * values: `watch-percentage`, `watch-time`.
            +       * 
            + * + * string target_field = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The targetField. + */ + @java.lang.Override + public java.lang.String getTargetField() { + java.lang.Object ref = targetField_; + 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(); + targetField_ = s; + return s; + } } - 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, getAgentCreationConfig()); + /** + * + * + *
            +       * Required. The name of the field to target. Currently supported
            +       * values: `watch-percentage`, `watch-time`.
            +       * 
            + * + * string target_field = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for targetField. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTargetFieldBytes() { + java.lang.Object ref = targetField_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + targetField_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(dialogflowAgentToLink_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(2, dialogflowAgentToLink_); + + public static final int TARGET_FIELD_VALUE_FLOAT_FIELD_NUMBER = 2; + private float targetFieldValueFloat_ = 0F; + + /** + * + * + *
            +       * Required. The threshold to be applied to the target (e.g., 0.5).
            +       * 
            + * + * float target_field_value_float = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The targetFieldValueFloat. + */ + @java.lang.Override + public float getTargetFieldValueFloat() { + return targetFieldValueFloat_; } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { + 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; } - if (!(obj instanceof com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig)) { - return super.equals(obj); + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(targetField_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, targetField_); + } + if (java.lang.Float.floatToRawIntBits(targetFieldValueFloat_) != 0) { + output.writeFloat(2, targetFieldValueFloat_); + } + getUnknownFields().writeTo(output); } - com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig other = - (com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig) obj; - if (hasAgentCreationConfig() != other.hasAgentCreationConfig()) return false; - if (hasAgentCreationConfig()) { - if (!getAgentCreationConfig().equals(other.getAgentCreationConfig())) return false; + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(targetField_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, targetField_); + } + if (java.lang.Float.floatToRawIntBits(targetFieldValueFloat_) != 0) { + size += com.google.protobuf.CodedOutputStream.computeFloatSize(2, targetFieldValueFloat_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; } - if (!getDialogflowAgentToLink().equals(other.getDialogflowAgentToLink())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof + com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .OptimizationObjectiveConfig)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .OptimizationObjectiveConfig + other = + (com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .OptimizationObjectiveConfig) + obj; + + if (!getTargetField().equals(other.getTargetField())) return false; + if (java.lang.Float.floatToIntBits(getTargetFieldValueFloat()) + != java.lang.Float.floatToIntBits(other.getTargetFieldValueFloat())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasAgentCreationConfig()) { - hash = (37 * hash) + AGENT_CREATION_CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getAgentCreationConfig().hashCode(); + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + TARGET_FIELD_FIELD_NUMBER; + hash = (53 * hash) + getTargetField().hashCode(); + hash = (37 * hash) + TARGET_FIELD_VALUE_FLOAT_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits(getTargetFieldValueFloat()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; } - hash = (37 * hash) + DIALOGFLOW_AGENT_TO_LINK_FIELD_NUMBER; - hash = (53 * hash) + getDialogflowAgentToLink().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - public static com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } + public static com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .OptimizationObjectiveConfig + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - public static com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig 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.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .OptimizationObjectiveConfig + 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.discoveryengine.v1beta.Engine.ChatEngineConfig parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } + public static com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .OptimizationObjectiveConfig + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - public static com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig 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.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .OptimizationObjectiveConfig + 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.discoveryengine.v1beta.Engine.ChatEngineConfig parseFrom( - byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } + public static com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .OptimizationObjectiveConfig + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - public static com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } + public static com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .OptimizationObjectiveConfig + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - public static com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } + public static com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .OptimizationObjectiveConfig + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } - public static com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig 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.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .OptimizationObjectiveConfig + 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.discoveryengine.v1beta.Engine.ChatEngineConfig - parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } + public static com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .OptimizationObjectiveConfig + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } - public static com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig - 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.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .OptimizationObjectiveConfig + 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.discoveryengine.v1beta.Engine.ChatEngineConfig parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } + public static com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .OptimizationObjectiveConfig + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } - public static com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } + public static com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .OptimizationObjectiveConfig + 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(); - } + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } - public static Builder newBuilder( - com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } + public static Builder newBuilder( + com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .OptimizationObjectiveConfig + 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; - } - - /** - * - * - *
            -     * Configurations for a Chat Engine.
            -     * 
            - * - * Protobuf type {@code google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig) - com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfigOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.discoveryengine.v1beta.EngineProto - .internal_static_google_cloud_discoveryengine_v1beta_Engine_ChatEngineConfig_descriptor; + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); } @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.discoveryengine.v1beta.EngineProto - .internal_static_google_cloud_discoveryengine_v1beta_Engine_ChatEngineConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig.class, - com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig.Builder.class); + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; } - // Construct using - // com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + /** + * + * + *
            +       * Custom threshold for `cvr` optimization_objective.
            +       * 
            + * + * Protobuf type {@code + * google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig.OptimizationObjectiveConfig} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig.OptimizationObjectiveConfig) + com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .OptimizationObjectiveConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.EngineProto + .internal_static_google_cloud_discoveryengine_v1beta_Engine_MediaRecommendationEngineConfig_OptimizationObjectiveConfig_descriptor; + } - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.EngineProto + .internal_static_google_cloud_discoveryengine_v1beta_Engine_MediaRecommendationEngineConfig_OptimizationObjectiveConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .OptimizationObjectiveConfig.class, + com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .OptimizationObjectiveConfig.Builder.class); + } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - internalGetAgentCreationConfigFieldBuilder(); + // Construct using + // com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig.OptimizationObjectiveConfig.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); } - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - agentCreationConfig_ = null; - if (agentCreationConfigBuilder_ != null) { - agentCreationConfigBuilder_.dispose(); - agentCreationConfigBuilder_ = null; + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + targetField_ = ""; + targetFieldValueFloat_ = 0F; + return this; } - dialogflowAgentToLink_ = ""; - return this; - } - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.discoveryengine.v1beta.EngineProto - .internal_static_google_cloud_discoveryengine_v1beta_Engine_ChatEngineConfig_descriptor; - } + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1beta.EngineProto + .internal_static_google_cloud_discoveryengine_v1beta_Engine_MediaRecommendationEngineConfig_OptimizationObjectiveConfig_descriptor; + } - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig - getDefaultInstanceForType() { - return com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig.getDefaultInstance(); - } + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .OptimizationObjectiveConfig + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .OptimizationObjectiveConfig.getDefaultInstance(); + } - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig build() { - com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .OptimizationObjectiveConfig + build() { + com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .OptimizationObjectiveConfig + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; } - return result; - } - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig buildPartial() { - com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig result = - new com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig(this); - if (bitField0_ != 0) { - buildPartial0(result); + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .OptimizationObjectiveConfig + buildPartial() { + com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .OptimizationObjectiveConfig + result = + new com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .OptimizationObjectiveConfig(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; } - onBuilt(); - return result; - } - private void buildPartial0( - com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.agentCreationConfig_ = - agentCreationConfigBuilder_ == null - ? agentCreationConfig_ - : agentCreationConfigBuilder_.build(); - to_bitField0_ |= 0x00000001; + private void buildPartial0( + com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .OptimizationObjectiveConfig + result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.targetField_ = targetField_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.targetFieldValueFloat_ = targetFieldValueFloat_; + } } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.dialogflowAgentToLink_ = dialogflowAgentToLink_; + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .OptimizationObjectiveConfig) { + return mergeFrom( + (com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .OptimizationObjectiveConfig) + other); + } else { + super.mergeFrom(other); + return this; + } } - result.bitField0_ |= to_bitField0_; - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig) { - return mergeFrom((com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig) other); - } else { - super.mergeFrom(other); + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .OptimizationObjectiveConfig + other) { + if (other + == com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .OptimizationObjectiveConfig.getDefaultInstance()) return this; + if (!other.getTargetField().isEmpty()) { + targetField_ = other.targetField_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (java.lang.Float.floatToRawIntBits(other.getTargetFieldValueFloat()) != 0) { + setTargetFieldValueFloat(other.getTargetFieldValueFloat()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); return this; } - } - public Builder mergeFrom( - com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig other) { - if (other - == com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig.getDefaultInstance()) - return this; - if (other.hasAgentCreationConfig()) { - mergeAgentCreationConfig(other.getAgentCreationConfig()); + @java.lang.Override + public final boolean isInitialized() { + return true; } - if (!other.getDialogflowAgentToLink().isEmpty()) { - dialogflowAgentToLink_ = other.dialogflowAgentToLink_; - bitField0_ |= 0x00000002; - onChanged(); + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + targetField_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 21: + { + targetFieldValueFloat_ = input.readFloat(); + bitField0_ |= 0x00000002; + break; + } // case 21 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - @java.lang.Override - public final boolean isInitialized() { - return true; - } + private int bitField0_; - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); + private java.lang.Object targetField_ = ""; + + /** + * + * + *
            +         * Required. The name of the field to target. Currently supported
            +         * values: `watch-percentage`, `watch-time`.
            +         * 
            + * + * string target_field = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The targetField. + */ + public java.lang.String getTargetField() { + java.lang.Object ref = targetField_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + targetField_ = s; + return s; + } else { + return (java.lang.String) ref; + } } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - input.readMessage( - internalGetAgentCreationConfigFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: - { - dialogflowAgentToLink_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 18 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { + + /** + * + * + *
            +         * Required. The name of the field to target. Currently supported
            +         * values: `watch-percentage`, `watch-time`.
            +         * 
            + * + * string target_field = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for targetField. + */ + public com.google.protobuf.ByteString getTargetFieldBytes() { + java.lang.Object ref = targetField_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + targetField_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
            +         * Required. The name of the field to target. Currently supported
            +         * values: `watch-percentage`, `watch-time`.
            +         * 
            + * + * string target_field = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The targetField to set. + * @return This builder for chaining. + */ + public Builder setTargetField(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + targetField_ = value; + bitField0_ |= 0x00000001; onChanged(); - } // finally - return this; + return this; + } + + /** + * + * + *
            +         * Required. The name of the field to target. Currently supported
            +         * values: `watch-percentage`, `watch-time`.
            +         * 
            + * + * string target_field = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearTargetField() { + targetField_ = getDefaultInstance().getTargetField(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
            +         * Required. The name of the field to target. Currently supported
            +         * values: `watch-percentage`, `watch-time`.
            +         * 
            + * + * string target_field = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for targetField to set. + * @return This builder for chaining. + */ + public Builder setTargetFieldBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + targetField_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private float targetFieldValueFloat_; + + /** + * + * + *
            +         * Required. The threshold to be applied to the target (e.g., 0.5).
            +         * 
            + * + * float target_field_value_float = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The targetFieldValueFloat. + */ + @java.lang.Override + public float getTargetFieldValueFloat() { + return targetFieldValueFloat_; + } + + /** + * + * + *
            +         * Required. The threshold to be applied to the target (e.g., 0.5).
            +         * 
            + * + * float target_field_value_float = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The targetFieldValueFloat to set. + * @return This builder for chaining. + */ + public Builder setTargetFieldValueFloat(float value) { + + targetFieldValueFloat_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
            +         * Required. The threshold to be applied to the target (e.g., 0.5).
            +         * 
            + * + * float target_field_value_float = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return This builder for chaining. + */ + public Builder clearTargetFieldValueFloat() { + bitField0_ = (bitField0_ & ~0x00000002); + targetFieldValueFloat_ = 0F; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig.OptimizationObjectiveConfig) } - private int bitField0_; + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig.OptimizationObjectiveConfig) + private static final com.google.cloud.discoveryengine.v1beta.Engine + .MediaRecommendationEngineConfig.OptimizationObjectiveConfig + DEFAULT_INSTANCE; - private com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig.AgentCreationConfig - agentCreationConfig_; - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig.AgentCreationConfig, - com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig.AgentCreationConfig - .Builder, - com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig - .AgentCreationConfigOrBuilder> - agentCreationConfigBuilder_; + static { + DEFAULT_INSTANCE = + new com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .OptimizationObjectiveConfig(); + } + + public static com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .OptimizationObjectiveConfig + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public OptimizationObjectiveConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .OptimizationObjectiveConfig + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface EngineFeaturesConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig.EngineFeaturesConfig) + com.google.protobuf.MessageOrBuilder { /** * * *
            -       * The configurationt generate the Dialogflow agent that is associated to
            -       * this Engine.
            -       *
            -       * Note that these configurations are one-time consumed by
            -       * and passed to Dialogflow service. It means they cannot be retrieved using
            -       * [EngineService.GetEngine][google.cloud.discoveryengine.v1beta.EngineService.GetEngine]
            -       * or
            -       * [EngineService.ListEngines][google.cloud.discoveryengine.v1beta.EngineService.ListEngines]
            -       * API after engine creation.
            +       * Recommended for you engine feature config.
                    * 
            * * - * .google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig.AgentCreationConfig agent_creation_config = 1; + * .google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig.RecommendedForYouFeatureConfig recommended_for_you_config = 1; * * - * @return Whether the agentCreationConfig field is set. + * @return Whether the recommendedForYouConfig field is set. */ - public boolean hasAgentCreationConfig() { - return ((bitField0_ & 0x00000001) != 0); - } + boolean hasRecommendedForYouConfig(); /** * * *
            -       * The configurationt generate the Dialogflow agent that is associated to
            -       * this Engine.
            -       *
            -       * Note that these configurations are one-time consumed by
            -       * and passed to Dialogflow service. It means they cannot be retrieved using
            -       * [EngineService.GetEngine][google.cloud.discoveryengine.v1beta.EngineService.GetEngine]
            -       * or
            -       * [EngineService.ListEngines][google.cloud.discoveryengine.v1beta.EngineService.ListEngines]
            -       * API after engine creation.
            +       * Recommended for you engine feature config.
                    * 
            * * - * .google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig.AgentCreationConfig agent_creation_config = 1; + * .google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig.RecommendedForYouFeatureConfig recommended_for_you_config = 1; * * - * @return The agentCreationConfig. + * @return The recommendedForYouConfig. */ - public com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig.AgentCreationConfig - getAgentCreationConfig() { - if (agentCreationConfigBuilder_ == null) { - return agentCreationConfig_ == null - ? com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig.AgentCreationConfig - .getDefaultInstance() - : agentCreationConfig_; - } else { - return agentCreationConfigBuilder_.getMessage(); - } - } + com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .RecommendedForYouFeatureConfig + getRecommendedForYouConfig(); /** * * *
            -       * The configurationt generate the Dialogflow agent that is associated to
            -       * this Engine.
            -       *
            -       * Note that these configurations are one-time consumed by
            -       * and passed to Dialogflow service. It means they cannot be retrieved using
            -       * [EngineService.GetEngine][google.cloud.discoveryengine.v1beta.EngineService.GetEngine]
            -       * or
            -       * [EngineService.ListEngines][google.cloud.discoveryengine.v1beta.EngineService.ListEngines]
            -       * API after engine creation.
            -       * 
            + * Recommended for you engine feature config. + * * * - * .google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig.AgentCreationConfig agent_creation_config = 1; + * .google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig.RecommendedForYouFeatureConfig recommended_for_you_config = 1; * */ - public Builder setAgentCreationConfig( - com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig.AgentCreationConfig - value) { - if (agentCreationConfigBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - agentCreationConfig_ = value; - } else { - agentCreationConfigBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } + com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .RecommendedForYouFeatureConfigOrBuilder + getRecommendedForYouConfigOrBuilder(); /** * * *
            -       * The configurationt generate the Dialogflow agent that is associated to
            -       * this Engine.
            -       *
            -       * Note that these configurations are one-time consumed by
            -       * and passed to Dialogflow service. It means they cannot be retrieved using
            -       * [EngineService.GetEngine][google.cloud.discoveryengine.v1beta.EngineService.GetEngine]
            -       * or
            -       * [EngineService.ListEngines][google.cloud.discoveryengine.v1beta.EngineService.ListEngines]
            -       * API after engine creation.
            +       * Most popular engine feature config.
                    * 
            * * - * .google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig.AgentCreationConfig agent_creation_config = 1; + * .google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig.MostPopularFeatureConfig most_popular_config = 2; * + * + * @return Whether the mostPopularConfig field is set. */ - public Builder setAgentCreationConfig( - com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig.AgentCreationConfig - .Builder - builderForValue) { - if (agentCreationConfigBuilder_ == null) { - agentCreationConfig_ = builderForValue.build(); - } else { - agentCreationConfigBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } + boolean hasMostPopularConfig(); /** * * *
            -       * The configurationt generate the Dialogflow agent that is associated to
            -       * this Engine.
            -       *
            -       * Note that these configurations are one-time consumed by
            -       * and passed to Dialogflow service. It means they cannot be retrieved using
            -       * [EngineService.GetEngine][google.cloud.discoveryengine.v1beta.EngineService.GetEngine]
            -       * or
            -       * [EngineService.ListEngines][google.cloud.discoveryengine.v1beta.EngineService.ListEngines]
            -       * API after engine creation.
            +       * Most popular engine feature config.
                    * 
            * * - * .google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig.AgentCreationConfig agent_creation_config = 1; + * .google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig.MostPopularFeatureConfig most_popular_config = 2; * + * + * @return The mostPopularConfig. */ - public Builder mergeAgentCreationConfig( - com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig.AgentCreationConfig - value) { - if (agentCreationConfigBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) - && agentCreationConfig_ != null - && agentCreationConfig_ - != com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig - .AgentCreationConfig.getDefaultInstance()) { - getAgentCreationConfigBuilder().mergeFrom(value); - } else { - agentCreationConfig_ = value; - } - } else { - agentCreationConfigBuilder_.mergeFrom(value); - } - if (agentCreationConfig_ != null) { - bitField0_ |= 0x00000001; - onChanged(); - } - return this; - } + com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .MostPopularFeatureConfig + getMostPopularConfig(); /** * * *
            -       * The configurationt generate the Dialogflow agent that is associated to
            -       * this Engine.
            -       *
            -       * Note that these configurations are one-time consumed by
            -       * and passed to Dialogflow service. It means they cannot be retrieved using
            -       * [EngineService.GetEngine][google.cloud.discoveryengine.v1beta.EngineService.GetEngine]
            -       * or
            -       * [EngineService.ListEngines][google.cloud.discoveryengine.v1beta.EngineService.ListEngines]
            -       * API after engine creation.
            +       * Most popular engine feature config.
                    * 
            * * - * .google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig.AgentCreationConfig agent_creation_config = 1; + * .google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig.MostPopularFeatureConfig most_popular_config = 2; * */ - public Builder clearAgentCreationConfig() { - bitField0_ = (bitField0_ & ~0x00000001); - agentCreationConfig_ = null; - if (agentCreationConfigBuilder_ != null) { - agentCreationConfigBuilder_.dispose(); - agentCreationConfigBuilder_ = null; + com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .MostPopularFeatureConfigOrBuilder + getMostPopularConfigOrBuilder(); + + com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .EngineFeaturesConfig.TypeDedicatedConfigCase + getTypeDedicatedConfigCase(); + } + + /** + * + * + *
            +     * More feature configs of the selected engine type.
            +     * 
            + * + * Protobuf type {@code + * google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig.EngineFeaturesConfig} + */ + public static final class EngineFeaturesConfig extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig.EngineFeaturesConfig) + EngineFeaturesConfigOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "EngineFeaturesConfig"); + } + + // Use EngineFeaturesConfig.newBuilder() to construct. + private EngineFeaturesConfig(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private EngineFeaturesConfig() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.EngineProto + .internal_static_google_cloud_discoveryengine_v1beta_Engine_MediaRecommendationEngineConfig_EngineFeaturesConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.EngineProto + .internal_static_google_cloud_discoveryengine_v1beta_Engine_MediaRecommendationEngineConfig_EngineFeaturesConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .EngineFeaturesConfig.class, + com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .EngineFeaturesConfig.Builder.class); + } + + private int typeDedicatedConfigCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object typeDedicatedConfig_; + + public enum TypeDedicatedConfigCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + RECOMMENDED_FOR_YOU_CONFIG(1), + MOST_POPULAR_CONFIG(2), + TYPEDEDICATEDCONFIG_NOT_SET(0); + private final int value; + + private TypeDedicatedConfigCase(int value) { + this.value = value; } - onChanged(); - return this; + + /** + * @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 TypeDedicatedConfigCase valueOf(int value) { + return forNumber(value); + } + + public static TypeDedicatedConfigCase forNumber(int value) { + switch (value) { + case 1: + return RECOMMENDED_FOR_YOU_CONFIG; + case 2: + return MOST_POPULAR_CONFIG; + case 0: + return TYPEDEDICATEDCONFIG_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public TypeDedicatedConfigCase getTypeDedicatedConfigCase() { + return TypeDedicatedConfigCase.forNumber(typeDedicatedConfigCase_); } + public static final int RECOMMENDED_FOR_YOU_CONFIG_FIELD_NUMBER = 1; + /** * * *
            -       * The configurationt generate the Dialogflow agent that is associated to
            -       * this Engine.
            -       *
            -       * Note that these configurations are one-time consumed by
            -       * and passed to Dialogflow service. It means they cannot be retrieved using
            -       * [EngineService.GetEngine][google.cloud.discoveryengine.v1beta.EngineService.GetEngine]
            -       * or
            -       * [EngineService.ListEngines][google.cloud.discoveryengine.v1beta.EngineService.ListEngines]
            -       * API after engine creation.
            +       * Recommended for you engine feature config.
                    * 
            * * - * .google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig.AgentCreationConfig agent_creation_config = 1; + * .google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig.RecommendedForYouFeatureConfig recommended_for_you_config = 1; * + * + * @return Whether the recommendedForYouConfig field is set. */ - public com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig.AgentCreationConfig - .Builder - getAgentCreationConfigBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return internalGetAgentCreationConfigFieldBuilder().getBuilder(); + @java.lang.Override + public boolean hasRecommendedForYouConfig() { + return typeDedicatedConfigCase_ == 1; } /** * * *
            -       * The configurationt generate the Dialogflow agent that is associated to
            -       * this Engine.
            -       *
            -       * Note that these configurations are one-time consumed by
            -       * and passed to Dialogflow service. It means they cannot be retrieved using
            -       * [EngineService.GetEngine][google.cloud.discoveryengine.v1beta.EngineService.GetEngine]
            -       * or
            -       * [EngineService.ListEngines][google.cloud.discoveryengine.v1beta.EngineService.ListEngines]
            -       * API after engine creation.
            +       * Recommended for you engine feature config.
                    * 
            * * - * .google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig.AgentCreationConfig agent_creation_config = 1; + * .google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig.RecommendedForYouFeatureConfig recommended_for_you_config = 1; * + * + * @return The recommendedForYouConfig. */ - public com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig - .AgentCreationConfigOrBuilder - getAgentCreationConfigOrBuilder() { - if (agentCreationConfigBuilder_ != null) { - return agentCreationConfigBuilder_.getMessageOrBuilder(); - } else { - return agentCreationConfig_ == null - ? com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig.AgentCreationConfig - .getDefaultInstance() - : agentCreationConfig_; + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .RecommendedForYouFeatureConfig + getRecommendedForYouConfig() { + if (typeDedicatedConfigCase_ == 1) { + return (com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .RecommendedForYouFeatureConfig) + typeDedicatedConfig_; } + return com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .RecommendedForYouFeatureConfig.getDefaultInstance(); } /** * * *
            -       * The configurationt generate the Dialogflow agent that is associated to
            -       * this Engine.
            -       *
            -       * Note that these configurations are one-time consumed by
            -       * and passed to Dialogflow service. It means they cannot be retrieved using
            -       * [EngineService.GetEngine][google.cloud.discoveryengine.v1beta.EngineService.GetEngine]
            -       * or
            -       * [EngineService.ListEngines][google.cloud.discoveryengine.v1beta.EngineService.ListEngines]
            -       * API after engine creation.
            +       * Recommended for you engine feature config.
                    * 
            * * - * .google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig.AgentCreationConfig agent_creation_config = 1; + * .google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig.RecommendedForYouFeatureConfig recommended_for_you_config = 1; * */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig.AgentCreationConfig, - com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig.AgentCreationConfig - .Builder, - com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig - .AgentCreationConfigOrBuilder> - internalGetAgentCreationConfigFieldBuilder() { - if (agentCreationConfigBuilder_ == null) { - agentCreationConfigBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig - .AgentCreationConfig, - com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig - .AgentCreationConfig.Builder, - com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig - .AgentCreationConfigOrBuilder>( - getAgentCreationConfig(), getParentForChildren(), isClean()); - agentCreationConfig_ = null; + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .RecommendedForYouFeatureConfigOrBuilder + getRecommendedForYouConfigOrBuilder() { + if (typeDedicatedConfigCase_ == 1) { + return (com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .RecommendedForYouFeatureConfig) + typeDedicatedConfig_; } - return agentCreationConfigBuilder_; + return com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .RecommendedForYouFeatureConfig.getDefaultInstance(); } - private java.lang.Object dialogflowAgentToLink_ = ""; + public static final int MOST_POPULAR_CONFIG_FIELD_NUMBER = 2; /** * * *
            -       * The resource name of an exist Dialogflow agent to link to this Chat
            -       * Engine. Customers can either provide `agent_creation_config` to create
            -       * agent or provide an agent name that links the agent with the Chat engine.
            -       *
            -       * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
            -       * ID>`.
            -       *
            -       * Note that the `dialogflow_agent_to_link` are one-time consumed by and
            -       * passed to Dialogflow service. It means they cannot be retrieved using
            -       * [EngineService.GetEngine][google.cloud.discoveryengine.v1beta.EngineService.GetEngine]
            -       * or
            -       * [EngineService.ListEngines][google.cloud.discoveryengine.v1beta.EngineService.ListEngines]
            -       * API after engine creation. Use
            -       * [ChatEngineMetadata.dialogflow_agent][google.cloud.discoveryengine.v1beta.Engine.ChatEngineMetadata.dialogflow_agent]
            -       * for actual agent association after Engine is created.
            +       * Most popular engine feature config.
                    * 
            * - * string dialogflow_agent_to_link = 2; + * + * .google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig.MostPopularFeatureConfig most_popular_config = 2; + * * - * @return The dialogflowAgentToLink. + * @return Whether the mostPopularConfig field is set. */ - public java.lang.String getDialogflowAgentToLink() { - java.lang.Object ref = dialogflowAgentToLink_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - dialogflowAgentToLink_ = s; - return s; - } else { - return (java.lang.String) ref; - } + @java.lang.Override + public boolean hasMostPopularConfig() { + return typeDedicatedConfigCase_ == 2; } /** * * *
            -       * The resource name of an exist Dialogflow agent to link to this Chat
            -       * Engine. Customers can either provide `agent_creation_config` to create
            -       * agent or provide an agent name that links the agent with the Chat engine.
            +       * Most popular engine feature config.
            +       * 
            * - * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent - * ID>`. - * - * Note that the `dialogflow_agent_to_link` are one-time consumed by and - * passed to Dialogflow service. It means they cannot be retrieved using - * [EngineService.GetEngine][google.cloud.discoveryengine.v1beta.EngineService.GetEngine] - * or - * [EngineService.ListEngines][google.cloud.discoveryengine.v1beta.EngineService.ListEngines] - * API after engine creation. Use - * [ChatEngineMetadata.dialogflow_agent][google.cloud.discoveryengine.v1beta.Engine.ChatEngineMetadata.dialogflow_agent] - * for actual agent association after Engine is created. - * - * - * string dialogflow_agent_to_link = 2; + * + * .google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig.MostPopularFeatureConfig most_popular_config = 2; + * * - * @return The bytes for dialogflowAgentToLink. + * @return The mostPopularConfig. */ - public com.google.protobuf.ByteString getDialogflowAgentToLinkBytes() { - java.lang.Object ref = dialogflowAgentToLink_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - dialogflowAgentToLink_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .MostPopularFeatureConfig + getMostPopularConfig() { + if (typeDedicatedConfigCase_ == 2) { + return (com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .MostPopularFeatureConfig) + typeDedicatedConfig_; } + return com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .MostPopularFeatureConfig.getDefaultInstance(); } /** * * *
            -       * The resource name of an exist Dialogflow agent to link to this Chat
            -       * Engine. Customers can either provide `agent_creation_config` to create
            -       * agent or provide an agent name that links the agent with the Chat engine.
            -       *
            -       * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
            -       * ID>`.
            -       *
            -       * Note that the `dialogflow_agent_to_link` are one-time consumed by and
            -       * passed to Dialogflow service. It means they cannot be retrieved using
            -       * [EngineService.GetEngine][google.cloud.discoveryengine.v1beta.EngineService.GetEngine]
            -       * or
            -       * [EngineService.ListEngines][google.cloud.discoveryengine.v1beta.EngineService.ListEngines]
            -       * API after engine creation. Use
            -       * [ChatEngineMetadata.dialogflow_agent][google.cloud.discoveryengine.v1beta.Engine.ChatEngineMetadata.dialogflow_agent]
            -       * for actual agent association after Engine is created.
            +       * Most popular engine feature config.
                    * 
            * - * string dialogflow_agent_to_link = 2; - * - * @param value The dialogflowAgentToLink to set. - * @return This builder for chaining. + * + * .google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig.MostPopularFeatureConfig most_popular_config = 2; + * */ - public Builder setDialogflowAgentToLink(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .MostPopularFeatureConfigOrBuilder + getMostPopularConfigOrBuilder() { + if (typeDedicatedConfigCase_ == 2) { + return (com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .MostPopularFeatureConfig) + typeDedicatedConfig_; } - dialogflowAgentToLink_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; + return com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .MostPopularFeatureConfig.getDefaultInstance(); } - /** - * - * - *
            -       * The resource name of an exist Dialogflow agent to link to this Chat
            -       * Engine. Customers can either provide `agent_creation_config` to create
            -       * agent or provide an agent name that links the agent with the Chat engine.
            -       *
            -       * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
            -       * ID>`.
            -       *
            -       * Note that the `dialogflow_agent_to_link` are one-time consumed by and
            -       * passed to Dialogflow service. It means they cannot be retrieved using
            -       * [EngineService.GetEngine][google.cloud.discoveryengine.v1beta.EngineService.GetEngine]
            -       * or
            -       * [EngineService.ListEngines][google.cloud.discoveryengine.v1beta.EngineService.ListEngines]
            -       * API after engine creation. Use
            -       * [ChatEngineMetadata.dialogflow_agent][google.cloud.discoveryengine.v1beta.Engine.ChatEngineMetadata.dialogflow_agent]
            -       * for actual agent association after Engine is created.
            -       * 
            - * - * string dialogflow_agent_to_link = 2; - * - * @return This builder for chaining. - */ - public Builder clearDialogflowAgentToLink() { - dialogflowAgentToLink_ = getDefaultInstance().getDialogflowAgentToLink(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; + 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; } - /** - * - * - *
            -       * The resource name of an exist Dialogflow agent to link to this Chat
            -       * Engine. Customers can either provide `agent_creation_config` to create
            -       * agent or provide an agent name that links the agent with the Chat engine.
            -       *
            -       * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
            -       * ID>`.
            -       *
            -       * Note that the `dialogflow_agent_to_link` are one-time consumed by and
            -       * passed to Dialogflow service. It means they cannot be retrieved using
            -       * [EngineService.GetEngine][google.cloud.discoveryengine.v1beta.EngineService.GetEngine]
            -       * or
            -       * [EngineService.ListEngines][google.cloud.discoveryengine.v1beta.EngineService.ListEngines]
            -       * API after engine creation. Use
            -       * [ChatEngineMetadata.dialogflow_agent][google.cloud.discoveryengine.v1beta.Engine.ChatEngineMetadata.dialogflow_agent]
            -       * for actual agent association after Engine is created.
            -       * 
            - * - * string dialogflow_agent_to_link = 2; - * - * @param value The bytes for dialogflowAgentToLink to set. - * @return This builder for chaining. - */ - public Builder setDialogflowAgentToLinkBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (typeDedicatedConfigCase_ == 1) { + output.writeMessage( + 1, + (com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .RecommendedForYouFeatureConfig) + typeDedicatedConfig_); } - checkByteStringIsUtf8(value); - dialogflowAgentToLink_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; + if (typeDedicatedConfigCase_ == 2) { + output.writeMessage( + 2, + (com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .MostPopularFeatureConfig) + typeDedicatedConfig_); + } + getUnknownFields().writeTo(output); } - // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig) - } + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; - // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig) - private static final com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig - DEFAULT_INSTANCE; + size = 0; + if (typeDedicatedConfigCase_ == 1) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 1, + (com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .RecommendedForYouFeatureConfig) + typeDedicatedConfig_); + } + if (typeDedicatedConfigCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, + (com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .MostPopularFeatureConfig) + typeDedicatedConfig_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } - static { - DEFAULT_INSTANCE = new com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig(); - } + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof + com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .EngineFeaturesConfig)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .EngineFeaturesConfig + other = + (com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .EngineFeaturesConfig) + obj; + + if (!getTypeDedicatedConfigCase().equals(other.getTypeDedicatedConfigCase())) return false; + switch (typeDedicatedConfigCase_) { + case 1: + if (!getRecommendedForYouConfig().equals(other.getRecommendedForYouConfig())) + return false; + break; + case 2: + if (!getMostPopularConfig().equals(other.getMostPopularConfig())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } - public static com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig - getDefaultInstance() { - return DEFAULT_INSTANCE; - } + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + switch (typeDedicatedConfigCase_) { + case 1: + hash = (37 * hash) + RECOMMENDED_FOR_YOU_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getRecommendedForYouConfig().hashCode(); + break; + case 2: + hash = (37 * hash) + MOST_POPULAR_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getMostPopularConfig().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ChatEngineConfig parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) + public static com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .EngineFeaturesConfig + parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException() - .setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; + return PARSER.parseFrom(data); + } - public static com.google.protobuf.Parser parser() { - return PARSER; - } + public static com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .EngineFeaturesConfig + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + public static com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .EngineFeaturesConfig + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - } + public static com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .EngineFeaturesConfig + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - public interface CommonConfigOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.Engine.CommonConfig) - com.google.protobuf.MessageOrBuilder { + public static com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .EngineFeaturesConfig + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - /** - * - * - *
            -     * The name of the company, business or entity that is associated with the
            -     * engine. Setting this may help improve LLM related features.
            -     * 
            - * - * string company_name = 1; - * - * @return The companyName. - */ - java.lang.String getCompanyName(); + public static com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .EngineFeaturesConfig + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - /** - * - * - *
            -     * The name of the company, business or entity that is associated with the
            -     * engine. Setting this may help improve LLM related features.
            -     * 
            - * - * string company_name = 1; - * - * @return The bytes for companyName. - */ - com.google.protobuf.ByteString getCompanyNameBytes(); - } + public static com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .EngineFeaturesConfig + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } - /** - * - * - *
            -   * Common configurations for an Engine.
            -   * 
            - * - * Protobuf type {@code google.cloud.discoveryengine.v1beta.Engine.CommonConfig} - */ - public static final class CommonConfig extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.Engine.CommonConfig) - CommonConfigOrBuilder { - private static final long serialVersionUID = 0L; + public static com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .EngineFeaturesConfig + parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "CommonConfig"); - } + public static com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .EngineFeaturesConfig + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } - // Use CommonConfig.newBuilder() to construct. - private CommonConfig(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } + public static com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .EngineFeaturesConfig + parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } - private CommonConfig() { - companyName_ = ""; - } + public static com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .EngineFeaturesConfig + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.discoveryengine.v1beta.EngineProto - .internal_static_google_cloud_discoveryengine_v1beta_Engine_CommonConfig_descriptor; - } + public static com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .EngineFeaturesConfig + 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 - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.discoveryengine.v1beta.EngineProto - .internal_static_google_cloud_discoveryengine_v1beta_Engine_CommonConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.discoveryengine.v1beta.Engine.CommonConfig.class, - com.google.cloud.discoveryengine.v1beta.Engine.CommonConfig.Builder.class); - } + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } - public static final int COMPANY_NAME_FIELD_NUMBER = 1; + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } - @SuppressWarnings("serial") - private volatile java.lang.Object companyName_ = ""; + public static Builder newBuilder( + com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .EngineFeaturesConfig + prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } - /** - * - * - *
            -     * The name of the company, business or entity that is associated with the
            -     * engine. Setting this may help improve LLM related features.
            -     * 
            - * - * string company_name = 1; - * - * @return The companyName. - */ - @java.lang.Override - public java.lang.String getCompanyName() { - java.lang.Object ref = companyName_; - 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(); - companyName_ = s; - return s; + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); } - } - /** - * - * - *
            -     * The name of the company, business or entity that is associated with the
            -     * engine. Setting this may help improve LLM related features.
            -     * 
            - * - * string company_name = 1; - * - * @return The bytes for companyName. - */ - @java.lang.Override - public com.google.protobuf.ByteString getCompanyNameBytes() { - java.lang.Object ref = companyName_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - companyName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; } - } - private byte memoizedIsInitialized = -1; + /** + * + * + *
            +       * More feature configs of the selected engine type.
            +       * 
            + * + * Protobuf type {@code + * google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig.EngineFeaturesConfig} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig.EngineFeaturesConfig) + com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .EngineFeaturesConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.EngineProto + .internal_static_google_cloud_discoveryengine_v1beta_Engine_MediaRecommendationEngineConfig_EngineFeaturesConfig_descriptor; + } - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.EngineProto + .internal_static_google_cloud_discoveryengine_v1beta_Engine_MediaRecommendationEngineConfig_EngineFeaturesConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .EngineFeaturesConfig.class, + com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .EngineFeaturesConfig.Builder.class); + } - memoizedIsInitialized = 1; - return true; - } + // Construct using + // com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig.EngineFeaturesConfig.newBuilder() + private Builder() {} - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(companyName_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, companyName_); - } - getUnknownFields().writeTo(output); - } + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (recommendedForYouConfigBuilder_ != null) { + recommendedForYouConfigBuilder_.clear(); + } + if (mostPopularConfigBuilder_ != null) { + mostPopularConfigBuilder_.clear(); + } + typeDedicatedConfigCase_ = 0; + typeDedicatedConfig_ = null; + return this; + } - size = 0; - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(companyName_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, companyName_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1beta.EngineProto + .internal_static_google_cloud_discoveryengine_v1beta_Engine_MediaRecommendationEngineConfig_EngineFeaturesConfig_descriptor; + } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.discoveryengine.v1beta.Engine.CommonConfig)) { - return super.equals(obj); - } - com.google.cloud.discoveryengine.v1beta.Engine.CommonConfig other = - (com.google.cloud.discoveryengine.v1beta.Engine.CommonConfig) obj; + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .EngineFeaturesConfig + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .EngineFeaturesConfig.getDefaultInstance(); + } - if (!getCompanyName().equals(other.getCompanyName())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .EngineFeaturesConfig + build() { + com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .EngineFeaturesConfig + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + COMPANY_NAME_FIELD_NUMBER; - hash = (53 * hash) + getCompanyName().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.discoveryengine.v1beta.Engine.CommonConfig parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .EngineFeaturesConfig + buildPartial() { + com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .EngineFeaturesConfig + result = + new com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .EngineFeaturesConfig(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } - public static com.google.cloud.discoveryengine.v1beta.Engine.CommonConfig parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } + private void buildPartial0( + com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .EngineFeaturesConfig + result) { + int from_bitField0_ = bitField0_; + } - public static com.google.cloud.discoveryengine.v1beta.Engine.CommonConfig parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } + private void buildPartialOneofs( + com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .EngineFeaturesConfig + result) { + result.typeDedicatedConfigCase_ = typeDedicatedConfigCase_; + result.typeDedicatedConfig_ = this.typeDedicatedConfig_; + if (typeDedicatedConfigCase_ == 1 && recommendedForYouConfigBuilder_ != null) { + result.typeDedicatedConfig_ = recommendedForYouConfigBuilder_.build(); + } + if (typeDedicatedConfigCase_ == 2 && mostPopularConfigBuilder_ != null) { + result.typeDedicatedConfig_ = mostPopularConfigBuilder_.build(); + } + } - public static com.google.cloud.discoveryengine.v1beta.Engine.CommonConfig parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .EngineFeaturesConfig) { + return mergeFrom( + (com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .EngineFeaturesConfig) + other); + } else { + super.mergeFrom(other); + return this; + } + } - public static com.google.cloud.discoveryengine.v1beta.Engine.CommonConfig parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .EngineFeaturesConfig + other) { + if (other + == com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .EngineFeaturesConfig.getDefaultInstance()) return this; + switch (other.getTypeDedicatedConfigCase()) { + case RECOMMENDED_FOR_YOU_CONFIG: + { + mergeRecommendedForYouConfig(other.getRecommendedForYouConfig()); + break; + } + case MOST_POPULAR_CONFIG: + { + mergeMostPopularConfig(other.getMostPopularConfig()); + break; + } + case TYPEDEDICATEDCONFIG_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } - public static com.google.cloud.discoveryengine.v1beta.Engine.CommonConfig parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } + @java.lang.Override + public final boolean isInitialized() { + return true; + } - public static com.google.cloud.discoveryengine.v1beta.Engine.CommonConfig parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage( + internalGetRecommendedForYouConfigFieldBuilder().getBuilder(), + extensionRegistry); + typeDedicatedConfigCase_ = 1; + break; + } // case 10 + case 18: + { + input.readMessage( + internalGetMostPopularConfigFieldBuilder().getBuilder(), extensionRegistry); + typeDedicatedConfigCase_ = 2; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } - public static com.google.cloud.discoveryengine.v1beta.Engine.CommonConfig parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } + private int typeDedicatedConfigCase_ = 0; + private java.lang.Object typeDedicatedConfig_; - public static com.google.cloud.discoveryengine.v1beta.Engine.CommonConfig parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } + public TypeDedicatedConfigCase getTypeDedicatedConfigCase() { + return TypeDedicatedConfigCase.forNumber(typeDedicatedConfigCase_); + } - public static com.google.cloud.discoveryengine.v1beta.Engine.CommonConfig parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } + public Builder clearTypeDedicatedConfig() { + typeDedicatedConfigCase_ = 0; + typeDedicatedConfig_ = null; + onChanged(); + return this; + } - public static com.google.cloud.discoveryengine.v1beta.Engine.CommonConfig parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } + private int bitField0_; - public static com.google.cloud.discoveryengine.v1beta.Engine.CommonConfig parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .RecommendedForYouFeatureConfig, + com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .RecommendedForYouFeatureConfig.Builder, + com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .RecommendedForYouFeatureConfigOrBuilder> + recommendedForYouConfigBuilder_; - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } + /** + * + * + *
            +         * Recommended for you engine feature config.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig.RecommendedForYouFeatureConfig recommended_for_you_config = 1; + * + * + * @return Whether the recommendedForYouConfig field is set. + */ + @java.lang.Override + public boolean hasRecommendedForYouConfig() { + return typeDedicatedConfigCase_ == 1; + } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } + /** + * + * + *
            +         * Recommended for you engine feature config.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig.RecommendedForYouFeatureConfig recommended_for_you_config = 1; + * + * + * @return The recommendedForYouConfig. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .RecommendedForYouFeatureConfig + getRecommendedForYouConfig() { + if (recommendedForYouConfigBuilder_ == null) { + if (typeDedicatedConfigCase_ == 1) { + return (com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .RecommendedForYouFeatureConfig) + typeDedicatedConfig_; + } + return com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .RecommendedForYouFeatureConfig.getDefaultInstance(); + } else { + if (typeDedicatedConfigCase_ == 1) { + return recommendedForYouConfigBuilder_.getMessage(); + } + return com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .RecommendedForYouFeatureConfig.getDefaultInstance(); + } + } - public static Builder newBuilder( - com.google.cloud.discoveryengine.v1beta.Engine.CommonConfig prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } + /** + * + * + *
            +         * Recommended for you engine feature config.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig.RecommendedForYouFeatureConfig recommended_for_you_config = 1; + * + */ + public Builder setRecommendedForYouConfig( + com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .RecommendedForYouFeatureConfig + value) { + if (recommendedForYouConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + typeDedicatedConfig_ = value; + onChanged(); + } else { + recommendedForYouConfigBuilder_.setMessage(value); + } + typeDedicatedConfigCase_ = 1; + return this; + } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } + /** + * + * + *
            +         * Recommended for you engine feature config.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig.RecommendedForYouFeatureConfig recommended_for_you_config = 1; + * + */ + public Builder setRecommendedForYouConfig( + com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .RecommendedForYouFeatureConfig.Builder + builderForValue) { + if (recommendedForYouConfigBuilder_ == null) { + typeDedicatedConfig_ = builderForValue.build(); + onChanged(); + } else { + recommendedForYouConfigBuilder_.setMessage(builderForValue.build()); + } + typeDedicatedConfigCase_ = 1; + return this; + } - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } + /** + * + * + *
            +         * Recommended for you engine feature config.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig.RecommendedForYouFeatureConfig recommended_for_you_config = 1; + * + */ + public Builder mergeRecommendedForYouConfig( + com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .RecommendedForYouFeatureConfig + value) { + if (recommendedForYouConfigBuilder_ == null) { + if (typeDedicatedConfigCase_ == 1 + && typeDedicatedConfig_ + != com.google.cloud.discoveryengine.v1beta.Engine + .MediaRecommendationEngineConfig.RecommendedForYouFeatureConfig + .getDefaultInstance()) { + typeDedicatedConfig_ = + com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .RecommendedForYouFeatureConfig.newBuilder( + (com.google.cloud.discoveryengine.v1beta.Engine + .MediaRecommendationEngineConfig.RecommendedForYouFeatureConfig) + typeDedicatedConfig_) + .mergeFrom(value) + .buildPartial(); + } else { + typeDedicatedConfig_ = value; + } + onChanged(); + } else { + if (typeDedicatedConfigCase_ == 1) { + recommendedForYouConfigBuilder_.mergeFrom(value); + } else { + recommendedForYouConfigBuilder_.setMessage(value); + } + } + typeDedicatedConfigCase_ = 1; + return this; + } - /** - * - * - *
            -     * Common configurations for an Engine.
            -     * 
            - * - * Protobuf type {@code google.cloud.discoveryengine.v1beta.Engine.CommonConfig} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.Engine.CommonConfig) - com.google.cloud.discoveryengine.v1beta.Engine.CommonConfigOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.discoveryengine.v1beta.EngineProto - .internal_static_google_cloud_discoveryengine_v1beta_Engine_CommonConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.discoveryengine.v1beta.EngineProto - .internal_static_google_cloud_discoveryengine_v1beta_Engine_CommonConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.discoveryengine.v1beta.Engine.CommonConfig.class, - com.google.cloud.discoveryengine.v1beta.Engine.CommonConfig.Builder.class); - } + /** + * + * + *
            +         * Recommended for you engine feature config.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig.RecommendedForYouFeatureConfig recommended_for_you_config = 1; + * + */ + public Builder clearRecommendedForYouConfig() { + if (recommendedForYouConfigBuilder_ == null) { + if (typeDedicatedConfigCase_ == 1) { + typeDedicatedConfigCase_ = 0; + typeDedicatedConfig_ = null; + onChanged(); + } + } else { + if (typeDedicatedConfigCase_ == 1) { + typeDedicatedConfigCase_ = 0; + typeDedicatedConfig_ = null; + } + recommendedForYouConfigBuilder_.clear(); + } + return this; + } - // Construct using com.google.cloud.discoveryengine.v1beta.Engine.CommonConfig.newBuilder() - private Builder() {} + /** + * + * + *
            +         * Recommended for you engine feature config.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig.RecommendedForYouFeatureConfig recommended_for_you_config = 1; + * + */ + public com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .RecommendedForYouFeatureConfig.Builder + getRecommendedForYouConfigBuilder() { + return internalGetRecommendedForYouConfigFieldBuilder().getBuilder(); + } - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - } + /** + * + * + *
            +         * Recommended for you engine feature config.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig.RecommendedForYouFeatureConfig recommended_for_you_config = 1; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .RecommendedForYouFeatureConfigOrBuilder + getRecommendedForYouConfigOrBuilder() { + if ((typeDedicatedConfigCase_ == 1) && (recommendedForYouConfigBuilder_ != null)) { + return recommendedForYouConfigBuilder_.getMessageOrBuilder(); + } else { + if (typeDedicatedConfigCase_ == 1) { + return (com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .RecommendedForYouFeatureConfig) + typeDedicatedConfig_; + } + return com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .RecommendedForYouFeatureConfig.getDefaultInstance(); + } + } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - companyName_ = ""; - return this; - } + /** + * + * + *
            +         * Recommended for you engine feature config.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig.RecommendedForYouFeatureConfig recommended_for_you_config = 1; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .RecommendedForYouFeatureConfig, + com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .RecommendedForYouFeatureConfig.Builder, + com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .RecommendedForYouFeatureConfigOrBuilder> + internalGetRecommendedForYouConfigFieldBuilder() { + if (recommendedForYouConfigBuilder_ == null) { + if (!(typeDedicatedConfigCase_ == 1)) { + typeDedicatedConfig_ = + com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .RecommendedForYouFeatureConfig.getDefaultInstance(); + } + recommendedForYouConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .RecommendedForYouFeatureConfig, + com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .RecommendedForYouFeatureConfig.Builder, + com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .RecommendedForYouFeatureConfigOrBuilder>( + (com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .RecommendedForYouFeatureConfig) + typeDedicatedConfig_, + getParentForChildren(), + isClean()); + typeDedicatedConfig_ = null; + } + typeDedicatedConfigCase_ = 1; + onChanged(); + return recommendedForYouConfigBuilder_; + } - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.discoveryengine.v1beta.EngineProto - .internal_static_google_cloud_discoveryengine_v1beta_Engine_CommonConfig_descriptor; - } + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .MostPopularFeatureConfig, + com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .MostPopularFeatureConfig.Builder, + com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .MostPopularFeatureConfigOrBuilder> + mostPopularConfigBuilder_; - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.Engine.CommonConfig - getDefaultInstanceForType() { - return com.google.cloud.discoveryengine.v1beta.Engine.CommonConfig.getDefaultInstance(); - } + /** + * + * + *
            +         * Most popular engine feature config.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig.MostPopularFeatureConfig most_popular_config = 2; + * + * + * @return Whether the mostPopularConfig field is set. + */ + @java.lang.Override + public boolean hasMostPopularConfig() { + return typeDedicatedConfigCase_ == 2; + } - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.Engine.CommonConfig build() { - com.google.cloud.discoveryengine.v1beta.Engine.CommonConfig result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); + /** + * + * + *
            +         * Most popular engine feature config.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig.MostPopularFeatureConfig most_popular_config = 2; + * + * + * @return The mostPopularConfig. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .MostPopularFeatureConfig + getMostPopularConfig() { + if (mostPopularConfigBuilder_ == null) { + if (typeDedicatedConfigCase_ == 2) { + return (com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .MostPopularFeatureConfig) + typeDedicatedConfig_; + } + return com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .MostPopularFeatureConfig.getDefaultInstance(); + } else { + if (typeDedicatedConfigCase_ == 2) { + return mostPopularConfigBuilder_.getMessage(); + } + return com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .MostPopularFeatureConfig.getDefaultInstance(); + } } - return result; - } - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.Engine.CommonConfig buildPartial() { - com.google.cloud.discoveryengine.v1beta.Engine.CommonConfig result = - new com.google.cloud.discoveryengine.v1beta.Engine.CommonConfig(this); - if (bitField0_ != 0) { - buildPartial0(result); + /** + * + * + *
            +         * Most popular engine feature config.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig.MostPopularFeatureConfig most_popular_config = 2; + * + */ + public Builder setMostPopularConfig( + com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .MostPopularFeatureConfig + value) { + if (mostPopularConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + typeDedicatedConfig_ = value; + onChanged(); + } else { + mostPopularConfigBuilder_.setMessage(value); + } + typeDedicatedConfigCase_ = 2; + return this; } - onBuilt(); - return result; - } - private void buildPartial0( - com.google.cloud.discoveryengine.v1beta.Engine.CommonConfig result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.companyName_ = companyName_; + /** + * + * + *
            +         * Most popular engine feature config.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig.MostPopularFeatureConfig most_popular_config = 2; + * + */ + public Builder setMostPopularConfig( + com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .MostPopularFeatureConfig.Builder + builderForValue) { + if (mostPopularConfigBuilder_ == null) { + typeDedicatedConfig_ = builderForValue.build(); + onChanged(); + } else { + mostPopularConfigBuilder_.setMessage(builderForValue.build()); + } + typeDedicatedConfigCase_ = 2; + return this; } - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.discoveryengine.v1beta.Engine.CommonConfig) { - return mergeFrom((com.google.cloud.discoveryengine.v1beta.Engine.CommonConfig) other); - } else { - super.mergeFrom(other); + /** + * + * + *
            +         * Most popular engine feature config.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig.MostPopularFeatureConfig most_popular_config = 2; + * + */ + public Builder mergeMostPopularConfig( + com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .MostPopularFeatureConfig + value) { + if (mostPopularConfigBuilder_ == null) { + if (typeDedicatedConfigCase_ == 2 + && typeDedicatedConfig_ + != com.google.cloud.discoveryengine.v1beta.Engine + .MediaRecommendationEngineConfig.MostPopularFeatureConfig + .getDefaultInstance()) { + typeDedicatedConfig_ = + com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .MostPopularFeatureConfig.newBuilder( + (com.google.cloud.discoveryengine.v1beta.Engine + .MediaRecommendationEngineConfig.MostPopularFeatureConfig) + typeDedicatedConfig_) + .mergeFrom(value) + .buildPartial(); + } else { + typeDedicatedConfig_ = value; + } + onChanged(); + } else { + if (typeDedicatedConfigCase_ == 2) { + mostPopularConfigBuilder_.mergeFrom(value); + } else { + mostPopularConfigBuilder_.setMessage(value); + } + } + typeDedicatedConfigCase_ = 2; return this; } - } - public Builder mergeFrom(com.google.cloud.discoveryengine.v1beta.Engine.CommonConfig other) { - if (other - == com.google.cloud.discoveryengine.v1beta.Engine.CommonConfig.getDefaultInstance()) + /** + * + * + *
            +         * Most popular engine feature config.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig.MostPopularFeatureConfig most_popular_config = 2; + * + */ + public Builder clearMostPopularConfig() { + if (mostPopularConfigBuilder_ == null) { + if (typeDedicatedConfigCase_ == 2) { + typeDedicatedConfigCase_ = 0; + typeDedicatedConfig_ = null; + onChanged(); + } + } else { + if (typeDedicatedConfigCase_ == 2) { + typeDedicatedConfigCase_ = 0; + typeDedicatedConfig_ = null; + } + mostPopularConfigBuilder_.clear(); + } return this; - if (!other.getCompanyName().isEmpty()) { - companyName_ = other.companyName_; - bitField0_ |= 0x00000001; + } + + /** + * + * + *
            +         * Most popular engine feature config.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig.MostPopularFeatureConfig most_popular_config = 2; + * + */ + public com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .MostPopularFeatureConfig.Builder + getMostPopularConfigBuilder() { + return internalGetMostPopularConfigFieldBuilder().getBuilder(); + } + + /** + * + * + *
            +         * Most popular engine feature config.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig.MostPopularFeatureConfig most_popular_config = 2; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .MostPopularFeatureConfigOrBuilder + getMostPopularConfigOrBuilder() { + if ((typeDedicatedConfigCase_ == 2) && (mostPopularConfigBuilder_ != null)) { + return mostPopularConfigBuilder_.getMessageOrBuilder(); + } else { + if (typeDedicatedConfigCase_ == 2) { + return (com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .MostPopularFeatureConfig) + typeDedicatedConfig_; + } + return com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .MostPopularFeatureConfig.getDefaultInstance(); + } + } + + /** + * + * + *
            +         * Most popular engine feature config.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig.MostPopularFeatureConfig most_popular_config = 2; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .MostPopularFeatureConfig, + com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .MostPopularFeatureConfig.Builder, + com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .MostPopularFeatureConfigOrBuilder> + internalGetMostPopularConfigFieldBuilder() { + if (mostPopularConfigBuilder_ == null) { + if (!(typeDedicatedConfigCase_ == 2)) { + typeDedicatedConfig_ = + com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .MostPopularFeatureConfig.getDefaultInstance(); + } + mostPopularConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .MostPopularFeatureConfig, + com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .MostPopularFeatureConfig.Builder, + com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .MostPopularFeatureConfigOrBuilder>( + (com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .MostPopularFeatureConfig) + typeDedicatedConfig_, + getParentForChildren(), + isClean()); + typeDedicatedConfig_ = null; + } + typeDedicatedConfigCase_ = 2; onChanged(); + return mostPopularConfigBuilder_; } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig.EngineFeaturesConfig) } - @java.lang.Override - public final boolean isInitialized() { - return true; + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig.EngineFeaturesConfig) + private static final com.google.cloud.discoveryengine.v1beta.Engine + .MediaRecommendationEngineConfig.EngineFeaturesConfig + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .EngineFeaturesConfig(); } - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - companyName_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; + public static com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .EngineFeaturesConfig + getDefaultInstance() { + return DEFAULT_INSTANCE; } - private int bitField0_; + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public EngineFeaturesConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; - private java.lang.Object companyName_ = ""; + public static com.google.protobuf.Parser parser() { + return PARSER; + } - /** - * - * - *
            -       * The name of the company, business or entity that is associated with the
            -       * engine. Setting this may help improve LLM related features.
            -       * 
            - * - * string company_name = 1; - * - * @return The companyName. - */ - public java.lang.String getCompanyName() { - java.lang.Object ref = companyName_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - companyName_ = s; - return s; - } else { - return (java.lang.String) ref; - } + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .EngineFeaturesConfig + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; } + } + + public interface RecommendedForYouFeatureConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig.RecommendedForYouFeatureConfig) + com.google.protobuf.MessageOrBuilder { /** * * *
            -       * The name of the company, business or entity that is associated with the
            -       * engine. Setting this may help improve LLM related features.
            +       * The type of event with which the engine is queried at prediction time.
            +       * If set to `generic`, only `view-item`, `media-play`,and
            +       * `media-complete` will be used as `context-event` in engine training. If
            +       * set to `view-home-page`, `view-home-page` will also be used as
            +       * `context-events` in addition to `view-item`, `media-play`, and
            +       * `media-complete`. Currently supported for the `recommended-for-you`
            +       * engine. Currently supported values: `view-home-page`, `generic`.
                    * 
            * - * string company_name = 1; + * string context_event_type = 1; * - * @return The bytes for companyName. + * @return The contextEventType. */ - public com.google.protobuf.ByteString getCompanyNameBytes() { - java.lang.Object ref = companyName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - companyName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } + java.lang.String getContextEventType(); /** * * *
            -       * The name of the company, business or entity that is associated with the
            -       * engine. Setting this may help improve LLM related features.
            +       * The type of event with which the engine is queried at prediction time.
            +       * If set to `generic`, only `view-item`, `media-play`,and
            +       * `media-complete` will be used as `context-event` in engine training. If
            +       * set to `view-home-page`, `view-home-page` will also be used as
            +       * `context-events` in addition to `view-item`, `media-play`, and
            +       * `media-complete`. Currently supported for the `recommended-for-you`
            +       * engine. Currently supported values: `view-home-page`, `generic`.
                    * 
            * - * string company_name = 1; + * string context_event_type = 1; * - * @param value The companyName to set. - * @return This builder for chaining. + * @return The bytes for contextEventType. */ - public Builder setCompanyName(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - companyName_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; + com.google.protobuf.ByteString getContextEventTypeBytes(); + } + + /** + * + * + *
            +     * Additional feature configurations for creating a `recommended-for-you`
            +     * engine.
            +     * 
            + * + * Protobuf type {@code + * google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig.RecommendedForYouFeatureConfig} + */ + public static final class RecommendedForYouFeatureConfig + extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig.RecommendedForYouFeatureConfig) + RecommendedForYouFeatureConfigOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "RecommendedForYouFeatureConfig"); + } + + // Use RecommendedForYouFeatureConfig.newBuilder() to construct. + private RecommendedForYouFeatureConfig( + com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private RecommendedForYouFeatureConfig() { + contextEventType_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.EngineProto + .internal_static_google_cloud_discoveryengine_v1beta_Engine_MediaRecommendationEngineConfig_RecommendedForYouFeatureConfig_descriptor; } + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.EngineProto + .internal_static_google_cloud_discoveryengine_v1beta_Engine_MediaRecommendationEngineConfig_RecommendedForYouFeatureConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .RecommendedForYouFeatureConfig.class, + com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .RecommendedForYouFeatureConfig.Builder.class); + } + + public static final int CONTEXT_EVENT_TYPE_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object contextEventType_ = ""; + /** * * *
            -       * The name of the company, business or entity that is associated with the
            -       * engine. Setting this may help improve LLM related features.
            +       * The type of event with which the engine is queried at prediction time.
            +       * If set to `generic`, only `view-item`, `media-play`,and
            +       * `media-complete` will be used as `context-event` in engine training. If
            +       * set to `view-home-page`, `view-home-page` will also be used as
            +       * `context-events` in addition to `view-item`, `media-play`, and
            +       * `media-complete`. Currently supported for the `recommended-for-you`
            +       * engine. Currently supported values: `view-home-page`, `generic`.
                    * 
            * - * string company_name = 1; + * string context_event_type = 1; * - * @return This builder for chaining. + * @return The contextEventType. */ - public Builder clearCompanyName() { - companyName_ = getDefaultInstance().getCompanyName(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; + @java.lang.Override + public java.lang.String getContextEventType() { + java.lang.Object ref = contextEventType_; + 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(); + contextEventType_ = s; + return s; + } } /** * * *
            -       * The name of the company, business or entity that is associated with the
            -       * engine. Setting this may help improve LLM related features.
            +       * The type of event with which the engine is queried at prediction time.
            +       * If set to `generic`, only `view-item`, `media-play`,and
            +       * `media-complete` will be used as `context-event` in engine training. If
            +       * set to `view-home-page`, `view-home-page` will also be used as
            +       * `context-events` in addition to `view-item`, `media-play`, and
            +       * `media-complete`. Currently supported for the `recommended-for-you`
            +       * engine. Currently supported values: `view-home-page`, `generic`.
                    * 
            * - * string company_name = 1; + * string context_event_type = 1; * - * @param value The bytes for companyName to set. - * @return This builder for chaining. + * @return The bytes for contextEventType. */ - public Builder setCompanyNameBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); + @java.lang.Override + public com.google.protobuf.ByteString getContextEventTypeBytes() { + java.lang.Object ref = contextEventType_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + contextEventType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; } - checkByteStringIsUtf8(value); - companyName_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; } - // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.Engine.CommonConfig) - } + private byte memoizedIsInitialized = -1; - // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.Engine.CommonConfig) - private static final com.google.cloud.discoveryengine.v1beta.Engine.CommonConfig - DEFAULT_INSTANCE; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; - static { - DEFAULT_INSTANCE = new com.google.cloud.discoveryengine.v1beta.Engine.CommonConfig(); - } + memoizedIsInitialized = 1; + return true; + } - public static com.google.cloud.discoveryengine.v1beta.Engine.CommonConfig getDefaultInstance() { - return DEFAULT_INSTANCE; - } + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(contextEventType_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, contextEventType_); + } + getUnknownFields().writeTo(output); + } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public CommonConfig parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException() - .setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; - public static com.google.protobuf.Parser parser() { - return PARSER; - } + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(contextEventType_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, contextEventType_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof + com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .RecommendedForYouFeatureConfig)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .RecommendedForYouFeatureConfig + other = + (com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .RecommendedForYouFeatureConfig) + obj; + + if (!getContextEventType().equals(other.getContextEventType())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.Engine.CommonConfig getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - } - - public interface ChatEngineMetadataOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.Engine.ChatEngineMetadata) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
            -     * The resource name of a Dialogflow agent, that this Chat Engine refers
            -     * to.
            -     *
            -     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
            -     * ID>`.
            -     * 
            - * - * string dialogflow_agent = 1; - * - * @return The dialogflowAgent. - */ - java.lang.String getDialogflowAgent(); - - /** - * - * - *
            -     * The resource name of a Dialogflow agent, that this Chat Engine refers
            -     * to.
            -     *
            -     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
            -     * ID>`.
            -     * 
            - * - * string dialogflow_agent = 1; - * - * @return The bytes for dialogflowAgent. - */ - com.google.protobuf.ByteString getDialogflowAgentBytes(); - } - - /** - * - * - *
            -   * Additional information of a Chat Engine.
            -   * Fields in this message are output only.
            -   * 
            - * - * Protobuf type {@code google.cloud.discoveryengine.v1beta.Engine.ChatEngineMetadata} - */ - public static final class ChatEngineMetadata extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.Engine.ChatEngineMetadata) - ChatEngineMetadataOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "ChatEngineMetadata"); - } + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + CONTEXT_EVENT_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getContextEventType().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } - // Use ChatEngineMetadata.newBuilder() to construct. - private ChatEngineMetadata(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } + public static com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .RecommendedForYouFeatureConfig + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - private ChatEngineMetadata() { - dialogflowAgent_ = ""; - } + public static com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .RecommendedForYouFeatureConfig + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.discoveryengine.v1beta.EngineProto - .internal_static_google_cloud_discoveryengine_v1beta_Engine_ChatEngineMetadata_descriptor; - } + public static com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .RecommendedForYouFeatureConfig + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.discoveryengine.v1beta.EngineProto - .internal_static_google_cloud_discoveryengine_v1beta_Engine_ChatEngineMetadata_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineMetadata.class, - com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineMetadata.Builder.class); - } + public static com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .RecommendedForYouFeatureConfig + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - public static final int DIALOGFLOW_AGENT_FIELD_NUMBER = 1; + public static com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .RecommendedForYouFeatureConfig + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - @SuppressWarnings("serial") - private volatile java.lang.Object dialogflowAgent_ = ""; + public static com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .RecommendedForYouFeatureConfig + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - /** - * - * - *
            -     * The resource name of a Dialogflow agent, that this Chat Engine refers
            -     * to.
            -     *
            -     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
            -     * ID>`.
            -     * 
            - * - * string dialogflow_agent = 1; - * - * @return The dialogflowAgent. - */ - @java.lang.Override - public java.lang.String getDialogflowAgent() { - java.lang.Object ref = dialogflowAgent_; - 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(); - dialogflowAgent_ = s; - return s; + public static com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .RecommendedForYouFeatureConfig + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } - } - /** - * - * - *
            -     * The resource name of a Dialogflow agent, that this Chat Engine refers
            -     * to.
            -     *
            -     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
            -     * ID>`.
            -     * 
            - * - * string dialogflow_agent = 1; - * - * @return The bytes for dialogflowAgent. - */ - @java.lang.Override - public com.google.protobuf.ByteString getDialogflowAgentBytes() { - java.lang.Object ref = dialogflowAgent_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - dialogflowAgent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; + public static com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .RecommendedForYouFeatureConfig + parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); } - } - private byte memoizedIsInitialized = -1; + public static com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .RecommendedForYouFeatureConfig + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + public static com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .RecommendedForYouFeatureConfig + parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } - memoizedIsInitialized = 1; - return true; - } + public static com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .RecommendedForYouFeatureConfig + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(dialogflowAgent_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, dialogflowAgent_); + public static com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .RecommendedForYouFeatureConfig + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); } - getUnknownFields().writeTo(output); - } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } - size = 0; - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(dialogflowAgent_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, dialogflowAgent_); + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; + public static Builder newBuilder( + com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .RecommendedForYouFeatureConfig + prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } - if (!(obj instanceof com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineMetadata)) { - return super.equals(obj); + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); } - com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineMetadata other = - (com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineMetadata) obj; - if (!getDialogflowAgent().equals(other.getDialogflowAgent())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + DIALOGFLOW_AGENT_FIELD_NUMBER; - hash = (53 * hash) + getDialogflowAgent().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - public static com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineMetadata parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } + /** + * + * + *
            +       * Additional feature configurations for creating a `recommended-for-you`
            +       * engine.
            +       * 
            + * + * Protobuf type {@code + * google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig.RecommendedForYouFeatureConfig} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig.RecommendedForYouFeatureConfig) + com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .RecommendedForYouFeatureConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.EngineProto + .internal_static_google_cloud_discoveryengine_v1beta_Engine_MediaRecommendationEngineConfig_RecommendedForYouFeatureConfig_descriptor; + } - public static com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineMetadata parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.EngineProto + .internal_static_google_cloud_discoveryengine_v1beta_Engine_MediaRecommendationEngineConfig_RecommendedForYouFeatureConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .RecommendedForYouFeatureConfig.class, + com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .RecommendedForYouFeatureConfig.Builder.class); + } - public static com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineMetadata parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } + // Construct using + // com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig.RecommendedForYouFeatureConfig.newBuilder() + private Builder() {} - public static com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineMetadata parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } - public static com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineMetadata parseFrom( - byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + contextEventType_ = ""; + return this; + } - public static com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineMetadata parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1beta.EngineProto + .internal_static_google_cloud_discoveryengine_v1beta_Engine_MediaRecommendationEngineConfig_RecommendedForYouFeatureConfig_descriptor; + } - public static com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineMetadata parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .RecommendedForYouFeatureConfig + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .RecommendedForYouFeatureConfig.getDefaultInstance(); + } - public static com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineMetadata parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .RecommendedForYouFeatureConfig + build() { + com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .RecommendedForYouFeatureConfig + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } - public static com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineMetadata - parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .RecommendedForYouFeatureConfig + buildPartial() { + com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .RecommendedForYouFeatureConfig + result = + new com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .RecommendedForYouFeatureConfig(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } - public static com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineMetadata - parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } + private void buildPartial0( + com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .RecommendedForYouFeatureConfig + result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.contextEventType_ = contextEventType_; + } + } - public static com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineMetadata parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .RecommendedForYouFeatureConfig) { + return mergeFrom( + (com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .RecommendedForYouFeatureConfig) + other); + } else { + super.mergeFrom(other); + return this; + } + } - public static com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineMetadata parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .RecommendedForYouFeatureConfig + other) { + if (other + == com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .RecommendedForYouFeatureConfig.getDefaultInstance()) return this; + if (!other.getContextEventType().isEmpty()) { + contextEventType_ = other.contextEventType_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } + @java.lang.Override + public final boolean isInitialized() { + return true; + } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + contextEventType_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } - public static Builder newBuilder( - com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineMetadata prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } + private int bitField0_; - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } + private java.lang.Object contextEventType_ = ""; - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } + /** + * + * + *
            +         * The type of event with which the engine is queried at prediction time.
            +         * If set to `generic`, only `view-item`, `media-play`,and
            +         * `media-complete` will be used as `context-event` in engine training. If
            +         * set to `view-home-page`, `view-home-page` will also be used as
            +         * `context-events` in addition to `view-item`, `media-play`, and
            +         * `media-complete`. Currently supported for the `recommended-for-you`
            +         * engine. Currently supported values: `view-home-page`, `generic`.
            +         * 
            + * + * string context_event_type = 1; + * + * @return The contextEventType. + */ + public java.lang.String getContextEventType() { + java.lang.Object ref = contextEventType_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + contextEventType_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } - /** - * - * - *
            -     * Additional information of a Chat Engine.
            -     * Fields in this message are output only.
            -     * 
            - * - * Protobuf type {@code google.cloud.discoveryengine.v1beta.Engine.ChatEngineMetadata} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.Engine.ChatEngineMetadata) - com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineMetadataOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.discoveryengine.v1beta.EngineProto - .internal_static_google_cloud_discoveryengine_v1beta_Engine_ChatEngineMetadata_descriptor; + /** + * + * + *
            +         * The type of event with which the engine is queried at prediction time.
            +         * If set to `generic`, only `view-item`, `media-play`,and
            +         * `media-complete` will be used as `context-event` in engine training. If
            +         * set to `view-home-page`, `view-home-page` will also be used as
            +         * `context-events` in addition to `view-item`, `media-play`, and
            +         * `media-complete`. Currently supported for the `recommended-for-you`
            +         * engine. Currently supported values: `view-home-page`, `generic`.
            +         * 
            + * + * string context_event_type = 1; + * + * @return The bytes for contextEventType. + */ + public com.google.protobuf.ByteString getContextEventTypeBytes() { + java.lang.Object ref = contextEventType_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + contextEventType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
            +         * The type of event with which the engine is queried at prediction time.
            +         * If set to `generic`, only `view-item`, `media-play`,and
            +         * `media-complete` will be used as `context-event` in engine training. If
            +         * set to `view-home-page`, `view-home-page` will also be used as
            +         * `context-events` in addition to `view-item`, `media-play`, and
            +         * `media-complete`. Currently supported for the `recommended-for-you`
            +         * engine. Currently supported values: `view-home-page`, `generic`.
            +         * 
            + * + * string context_event_type = 1; + * + * @param value The contextEventType to set. + * @return This builder for chaining. + */ + public Builder setContextEventType(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + contextEventType_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
            +         * The type of event with which the engine is queried at prediction time.
            +         * If set to `generic`, only `view-item`, `media-play`,and
            +         * `media-complete` will be used as `context-event` in engine training. If
            +         * set to `view-home-page`, `view-home-page` will also be used as
            +         * `context-events` in addition to `view-item`, `media-play`, and
            +         * `media-complete`. Currently supported for the `recommended-for-you`
            +         * engine. Currently supported values: `view-home-page`, `generic`.
            +         * 
            + * + * string context_event_type = 1; + * + * @return This builder for chaining. + */ + public Builder clearContextEventType() { + contextEventType_ = getDefaultInstance().getContextEventType(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
            +         * The type of event with which the engine is queried at prediction time.
            +         * If set to `generic`, only `view-item`, `media-play`,and
            +         * `media-complete` will be used as `context-event` in engine training. If
            +         * set to `view-home-page`, `view-home-page` will also be used as
            +         * `context-events` in addition to `view-item`, `media-play`, and
            +         * `media-complete`. Currently supported for the `recommended-for-you`
            +         * engine. Currently supported values: `view-home-page`, `generic`.
            +         * 
            + * + * string context_event_type = 1; + * + * @param value The bytes for contextEventType to set. + * @return This builder for chaining. + */ + public Builder setContextEventTypeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + contextEventType_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig.RecommendedForYouFeatureConfig) } - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.discoveryengine.v1beta.EngineProto - .internal_static_google_cloud_discoveryengine_v1beta_Engine_ChatEngineMetadata_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineMetadata.class, - com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineMetadata.Builder.class); + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig.RecommendedForYouFeatureConfig) + private static final com.google.cloud.discoveryengine.v1beta.Engine + .MediaRecommendationEngineConfig.RecommendedForYouFeatureConfig + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .RecommendedForYouFeatureConfig(); } - // Construct using - // com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineMetadata.newBuilder() - private Builder() {} + public static com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .RecommendedForYouFeatureConfig + getDefaultInstance() { + return DEFAULT_INSTANCE; + } - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RecommendedForYouFeatureConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; } @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - dialogflowAgent_ = ""; - return this; + public com.google.protobuf.Parser getParserForType() { + return PARSER; } @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + public com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .RecommendedForYouFeatureConfig + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface MostPopularFeatureConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig.MostPopularFeatureConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
            +       * The time window of which the engine is queried at training and
            +       * prediction time. Positive integers only. The value translates to the
            +       * last X days of events. Currently required for the `most-popular-items`
            +       * engine.
            +       * 
            + * + * int64 time_window_days = 1; + * + * @return The timeWindowDays. + */ + long getTimeWindowDays(); + } + + /** + * + * + *
            +     * Feature configurations that are required for creating a Most Popular
            +     * engine.
            +     * 
            + * + * Protobuf type {@code + * google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig.MostPopularFeatureConfig} + */ + public static final class MostPopularFeatureConfig extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig.MostPopularFeatureConfig) + MostPopularFeatureConfigOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "MostPopularFeatureConfig"); + } + + // Use MostPopularFeatureConfig.newBuilder() to construct. + private MostPopularFeatureConfig(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private MostPopularFeatureConfig() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.discoveryengine.v1beta.EngineProto - .internal_static_google_cloud_discoveryengine_v1beta_Engine_ChatEngineMetadata_descriptor; + .internal_static_google_cloud_discoveryengine_v1beta_Engine_MediaRecommendationEngineConfig_MostPopularFeatureConfig_descriptor; } @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineMetadata - getDefaultInstanceForType() { - return com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineMetadata - .getDefaultInstance(); + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.EngineProto + .internal_static_google_cloud_discoveryengine_v1beta_Engine_MediaRecommendationEngineConfig_MostPopularFeatureConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .MostPopularFeatureConfig.class, + com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .MostPopularFeatureConfig.Builder.class); } + public static final int TIME_WINDOW_DAYS_FIELD_NUMBER = 1; + private long timeWindowDays_ = 0L; + + /** + * + * + *
            +       * The time window of which the engine is queried at training and
            +       * prediction time. Positive integers only. The value translates to the
            +       * last X days of events. Currently required for the `most-popular-items`
            +       * engine.
            +       * 
            + * + * int64 time_window_days = 1; + * + * @return The timeWindowDays. + */ @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineMetadata build() { - com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineMetadata result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; + public long getTimeWindowDays() { + return timeWindowDays_; } + private byte memoizedIsInitialized = -1; + @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineMetadata buildPartial() { - com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineMetadata result = - new com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineMetadata(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; - private void buildPartial0( - com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineMetadata result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.dialogflowAgent_ = dialogflowAgent_; - } + memoizedIsInitialized = 1; + return true; } @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineMetadata) { - return mergeFrom( - (com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineMetadata) other); - } else { - super.mergeFrom(other); - return this; + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (timeWindowDays_ != 0L) { + output.writeInt64(1, timeWindowDays_); } + getUnknownFields().writeTo(output); } - public Builder mergeFrom( - com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineMetadata other) { - if (other - == com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineMetadata - .getDefaultInstance()) return this; - if (!other.getDialogflowAgent().isEmpty()) { - dialogflowAgent_ = other.dialogflowAgent_; - bitField0_ |= 0x00000001; - onChanged(); + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (timeWindowDays_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(1, timeWindowDays_); } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; } @java.lang.Override - public final boolean isInitialized() { + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof + com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .MostPopularFeatureConfig)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .MostPopularFeatureConfig + other = + (com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .MostPopularFeatureConfig) + obj; + + if (getTimeWindowDays() != other.getTimeWindowDays()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - dialogflowAgent_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + TIME_WINDOW_DAYS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getTimeWindowDays()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; } - private int bitField0_; + public static com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .MostPopularFeatureConfig + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - private java.lang.Object dialogflowAgent_ = ""; + public static com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .MostPopularFeatureConfig + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - /** - * - * - *
            -       * The resource name of a Dialogflow agent, that this Chat Engine refers
            -       * to.
            -       *
            -       * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
            -       * ID>`.
            -       * 
            - * - * string dialogflow_agent = 1; - * - * @return The dialogflowAgent. - */ - public java.lang.String getDialogflowAgent() { - java.lang.Object ref = dialogflowAgent_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - dialogflowAgent_ = s; - return s; - } else { - return (java.lang.String) ref; - } + public static com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .MostPopularFeatureConfig + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); } - /** - * - * - *
            -       * The resource name of a Dialogflow agent, that this Chat Engine refers
            -       * to.
            -       *
            -       * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
            -       * ID>`.
            -       * 
            - * - * string dialogflow_agent = 1; - * - * @return The bytes for dialogflowAgent. - */ - public com.google.protobuf.ByteString getDialogflowAgentBytes() { - java.lang.Object ref = dialogflowAgent_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - dialogflowAgent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } + public static com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .MostPopularFeatureConfig + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); } - /** - * - * - *
            -       * The resource name of a Dialogflow agent, that this Chat Engine refers
            -       * to.
            -       *
            -       * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
            -       * ID>`.
            -       * 
            - * - * string dialogflow_agent = 1; - * - * @param value The dialogflowAgent to set. - * @return This builder for chaining. - */ - public Builder setDialogflowAgent(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - dialogflowAgent_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; + public static com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .MostPopularFeatureConfig + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); } - /** - * - * - *
            -       * The resource name of a Dialogflow agent, that this Chat Engine refers
            -       * to.
            -       *
            -       * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
            -       * ID>`.
            -       * 
            - * - * string dialogflow_agent = 1; - * - * @return This builder for chaining. - */ - public Builder clearDialogflowAgent() { - dialogflowAgent_ = getDefaultInstance().getDialogflowAgent(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; + public static com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .MostPopularFeatureConfig + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .MostPopularFeatureConfig + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .MostPopularFeatureConfig + 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.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .MostPopularFeatureConfig + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .MostPopularFeatureConfig + 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.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .MostPopularFeatureConfig + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .MostPopularFeatureConfig + 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.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .MostPopularFeatureConfig + 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; } /** * * *
            -       * The resource name of a Dialogflow agent, that this Chat Engine refers
            -       * to.
            -       *
            -       * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
            -       * ID>`.
            +       * Feature configurations that are required for creating a Most Popular
            +       * engine.
                    * 
            * - * string dialogflow_agent = 1; - * - * @param value The bytes for dialogflowAgent to set. - * @return This builder for chaining. + * Protobuf type {@code + * google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig.MostPopularFeatureConfig} */ - public Builder setDialogflowAgentBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); + public static final class Builder + extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig.MostPopularFeatureConfig) + com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .MostPopularFeatureConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.EngineProto + .internal_static_google_cloud_discoveryengine_v1beta_Engine_MediaRecommendationEngineConfig_MostPopularFeatureConfig_descriptor; } - checkByteStringIsUtf8(value); - dialogflowAgent_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.Engine.ChatEngineMetadata) - } + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.EngineProto + .internal_static_google_cloud_discoveryengine_v1beta_Engine_MediaRecommendationEngineConfig_MostPopularFeatureConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .MostPopularFeatureConfig.class, + com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .MostPopularFeatureConfig.Builder.class); + } - // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.Engine.ChatEngineMetadata) - private static final com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineMetadata - DEFAULT_INSTANCE; + // Construct using + // com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig.MostPopularFeatureConfig.newBuilder() + private Builder() {} - static { - DEFAULT_INSTANCE = new com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineMetadata(); - } + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } - public static com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineMetadata - getDefaultInstance() { - return DEFAULT_INSTANCE; - } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + timeWindowDays_ = 0L; + return this; + } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ChatEngineMetadata parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException() - .setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1beta.EngineProto + .internal_static_google_cloud_discoveryengine_v1beta_Engine_MediaRecommendationEngineConfig_MostPopularFeatureConfig_descriptor; + } - public static com.google.protobuf.Parser parser() { - return PARSER; - } + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .MostPopularFeatureConfig + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .MostPopularFeatureConfig.getDefaultInstance(); + } - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .MostPopularFeatureConfig + build() { + com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .MostPopularFeatureConfig + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineMetadata - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - } + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .MostPopularFeatureConfig + buildPartial() { + com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .MostPopularFeatureConfig + result = + new com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .MostPopularFeatureConfig(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } - private int bitField0_; - private int engineConfigCase_ = 0; + private void buildPartial0( + com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .MostPopularFeatureConfig + result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.timeWindowDays_ = timeWindowDays_; + } + } - @SuppressWarnings("serial") - private java.lang.Object engineConfig_; + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .MostPopularFeatureConfig) { + return mergeFrom( + (com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .MostPopularFeatureConfig) + other); + } else { + super.mergeFrom(other); + return this; + } + } - public enum EngineConfigCase - implements - com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - CHAT_ENGINE_CONFIG(11), - SEARCH_ENGINE_CONFIG(13), - ENGINECONFIG_NOT_SET(0); - private final int value; + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .MostPopularFeatureConfig + other) { + if (other + == com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .MostPopularFeatureConfig.getDefaultInstance()) return this; + if (other.getTimeWindowDays() != 0L) { + setTimeWindowDays(other.getTimeWindowDays()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } - private EngineConfigCase(int value) { - this.value = value; - } + @java.lang.Override + public final boolean isInitialized() { + return true; + } - /** - * @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 EngineConfigCase valueOf(int value) { - return forNumber(value); - } + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + timeWindowDays_ = input.readInt64(); + bitField0_ |= 0x00000001; + break; + } // case 8 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } - public static EngineConfigCase forNumber(int value) { - switch (value) { - case 11: - return CHAT_ENGINE_CONFIG; - case 13: - return SEARCH_ENGINE_CONFIG; - case 0: - return ENGINECONFIG_NOT_SET; - default: - return null; - } - } + private int bitField0_; - public int getNumber() { - return this.value; - } - }; + private long timeWindowDays_; - public EngineConfigCase getEngineConfigCase() { - return EngineConfigCase.forNumber(engineConfigCase_); - } + /** + * + * + *
            +         * The time window of which the engine is queried at training and
            +         * prediction time. Positive integers only. The value translates to the
            +         * last X days of events. Currently required for the `most-popular-items`
            +         * engine.
            +         * 
            + * + * int64 time_window_days = 1; + * + * @return The timeWindowDays. + */ + @java.lang.Override + public long getTimeWindowDays() { + return timeWindowDays_; + } - private int engineMetadataCase_ = 0; + /** + * + * + *
            +         * The time window of which the engine is queried at training and
            +         * prediction time. Positive integers only. The value translates to the
            +         * last X days of events. Currently required for the `most-popular-items`
            +         * engine.
            +         * 
            + * + * int64 time_window_days = 1; + * + * @param value The timeWindowDays to set. + * @return This builder for chaining. + */ + public Builder setTimeWindowDays(long value) { - @SuppressWarnings("serial") - private java.lang.Object engineMetadata_; + timeWindowDays_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } - public enum EngineMetadataCase - implements - com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - CHAT_ENGINE_METADATA(12), - ENGINEMETADATA_NOT_SET(0); - private final int value; + /** + * + * + *
            +         * The time window of which the engine is queried at training and
            +         * prediction time. Positive integers only. The value translates to the
            +         * last X days of events. Currently required for the `most-popular-items`
            +         * engine.
            +         * 
            + * + * int64 time_window_days = 1; + * + * @return This builder for chaining. + */ + public Builder clearTimeWindowDays() { + bitField0_ = (bitField0_ & ~0x00000001); + timeWindowDays_ = 0L; + onChanged(); + return this; + } - private EngineMetadataCase(int value) { - this.value = value; - } + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig.MostPopularFeatureConfig) + } - /** - * @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 EngineMetadataCase valueOf(int value) { - return forNumber(value); - } + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig.MostPopularFeatureConfig) + private static final com.google.cloud.discoveryengine.v1beta.Engine + .MediaRecommendationEngineConfig.MostPopularFeatureConfig + DEFAULT_INSTANCE; - public static EngineMetadataCase forNumber(int value) { - switch (value) { - case 12: - return CHAT_ENGINE_METADATA; - case 0: - return ENGINEMETADATA_NOT_SET; - default: - return null; + static { + DEFAULT_INSTANCE = + new com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .MostPopularFeatureConfig(); } - } - public int getNumber() { - return this.value; - } - }; + public static com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .MostPopularFeatureConfig + getDefaultInstance() { + return DEFAULT_INSTANCE; + } - public EngineMetadataCase getEngineMetadataCase() { - return EngineMetadataCase.forNumber(engineMetadataCase_); - } - - public static final int CHAT_ENGINE_CONFIG_FIELD_NUMBER = 11; + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public MostPopularFeatureConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; - /** - * - * - *
            -   * Configurations for the Chat Engine. Only applicable if
            -   * [solution_type][google.cloud.discoveryengine.v1beta.Engine.solution_type]
            -   * is
            -   * [SOLUTION_TYPE_CHAT][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_CHAT].
            -   * 
            - * - * .google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig chat_engine_config = 11; - * - * - * @return Whether the chatEngineConfig field is set. - */ - @java.lang.Override - public boolean hasChatEngineConfig() { - return engineConfigCase_ == 11; - } + public static com.google.protobuf.Parser parser() { + return PARSER; + } - /** - * - * - *
            -   * Configurations for the Chat Engine. Only applicable if
            -   * [solution_type][google.cloud.discoveryengine.v1beta.Engine.solution_type]
            -   * is
            -   * [SOLUTION_TYPE_CHAT][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_CHAT].
            -   * 
            - * - * .google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig chat_engine_config = 11; - * - * - * @return The chatEngineConfig. - */ - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig getChatEngineConfig() { - if (engineConfigCase_ == 11) { - return (com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig) engineConfig_; - } - return com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig.getDefaultInstance(); - } + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } - /** - * - * - *
            -   * Configurations for the Chat Engine. Only applicable if
            -   * [solution_type][google.cloud.discoveryengine.v1beta.Engine.solution_type]
            -   * is
            -   * [SOLUTION_TYPE_CHAT][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_CHAT].
            -   * 
            - * - * .google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig chat_engine_config = 11; - * - */ - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfigOrBuilder - getChatEngineConfigOrBuilder() { - if (engineConfigCase_ == 11) { - return (com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig) engineConfig_; + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .MostPopularFeatureConfig + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } } - return com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig.getDefaultInstance(); - } - public static final int SEARCH_ENGINE_CONFIG_FIELD_NUMBER = 13; + private int bitField0_; + public static final int TYPE_FIELD_NUMBER = 1; - /** - * - * - *
            -   * Configurations for the Search Engine. Only applicable if
            -   * [solution_type][google.cloud.discoveryengine.v1beta.Engine.solution_type]
            -   * is
            -   * [SOLUTION_TYPE_SEARCH][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_SEARCH].
            -   * 
            - * - * .google.cloud.discoveryengine.v1beta.Engine.SearchEngineConfig search_engine_config = 13; - * - * - * @return Whether the searchEngineConfig field is set. - */ - @java.lang.Override - public boolean hasSearchEngineConfig() { - return engineConfigCase_ == 13; - } + @SuppressWarnings("serial") + private volatile java.lang.Object type_ = ""; - /** - * - * - *
            -   * Configurations for the Search Engine. Only applicable if
            -   * [solution_type][google.cloud.discoveryengine.v1beta.Engine.solution_type]
            -   * is
            -   * [SOLUTION_TYPE_SEARCH][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_SEARCH].
            -   * 
            - * - * .google.cloud.discoveryengine.v1beta.Engine.SearchEngineConfig search_engine_config = 13; - * - * - * @return The searchEngineConfig. - */ - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.Engine.SearchEngineConfig getSearchEngineConfig() { - if (engineConfigCase_ == 13) { - return (com.google.cloud.discoveryengine.v1beta.Engine.SearchEngineConfig) engineConfig_; + /** + * + * + *
            +     * Required. The type of engine. e.g., `recommended-for-you`.
            +     *
            +     * This field together with
            +     * [optimization_objective][google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig.optimization_objective]
            +     * describe engine metadata to use to control engine training and serving.
            +     *
            +     * Currently supported values: `recommended-for-you`, `others-you-may-like`,
            +     * `more-like-this`, `most-popular-items`.
            +     * 
            + * + * string type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The type. + */ + @java.lang.Override + public java.lang.String getType() { + java.lang.Object ref = type_; + 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(); + type_ = s; + return s; + } } - return com.google.cloud.discoveryengine.v1beta.Engine.SearchEngineConfig.getDefaultInstance(); - } - /** - * - * - *
            -   * Configurations for the Search Engine. Only applicable if
            -   * [solution_type][google.cloud.discoveryengine.v1beta.Engine.solution_type]
            -   * is
            -   * [SOLUTION_TYPE_SEARCH][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_SEARCH].
            -   * 
            - * - * .google.cloud.discoveryengine.v1beta.Engine.SearchEngineConfig search_engine_config = 13; - * - */ - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.Engine.SearchEngineConfigOrBuilder - getSearchEngineConfigOrBuilder() { - if (engineConfigCase_ == 13) { - return (com.google.cloud.discoveryengine.v1beta.Engine.SearchEngineConfig) engineConfig_; + /** + * + * + *
            +     * Required. The type of engine. e.g., `recommended-for-you`.
            +     *
            +     * This field together with
            +     * [optimization_objective][google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig.optimization_objective]
            +     * describe engine metadata to use to control engine training and serving.
            +     *
            +     * Currently supported values: `recommended-for-you`, `others-you-may-like`,
            +     * `more-like-this`, `most-popular-items`.
            +     * 
            + * + * string type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for type. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTypeBytes() { + java.lang.Object ref = type_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + type_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } } - return com.google.cloud.discoveryengine.v1beta.Engine.SearchEngineConfig.getDefaultInstance(); - } - public static final int CHAT_ENGINE_METADATA_FIELD_NUMBER = 12; + public static final int OPTIMIZATION_OBJECTIVE_FIELD_NUMBER = 2; - /** - * - * - *
            -   * Output only. Additional information of the Chat Engine. Only applicable
            -   * if
            -   * [solution_type][google.cloud.discoveryengine.v1beta.Engine.solution_type]
            -   * is
            -   * [SOLUTION_TYPE_CHAT][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_CHAT].
            -   * 
            - * - * - * .google.cloud.discoveryengine.v1beta.Engine.ChatEngineMetadata chat_engine_metadata = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the chatEngineMetadata field is set. - */ - @java.lang.Override - public boolean hasChatEngineMetadata() { - return engineMetadataCase_ == 12; - } + @SuppressWarnings("serial") + private volatile java.lang.Object optimizationObjective_ = ""; - /** - * - * - *
            -   * Output only. Additional information of the Chat Engine. Only applicable
            -   * if
            -   * [solution_type][google.cloud.discoveryengine.v1beta.Engine.solution_type]
            -   * is
            -   * [SOLUTION_TYPE_CHAT][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_CHAT].
            -   * 
            - * - * - * .google.cloud.discoveryengine.v1beta.Engine.ChatEngineMetadata chat_engine_metadata = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The chatEngineMetadata. - */ - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineMetadata getChatEngineMetadata() { - if (engineMetadataCase_ == 12) { - return (com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineMetadata) engineMetadata_; + /** + * + * + *
            +     * The optimization objective. e.g., `cvr`.
            +     *
            +     * This field together with
            +     * [optimization_objective][google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig.type]
            +     * describe engine metadata to use to control engine training and serving.
            +     *
            +     * Currently supported
            +     * values: `ctr`, `cvr`.
            +     *
            +     * If not specified, we choose default based on engine type.
            +     * Default depends on type of recommendation:
            +     *
            +     * `recommended-for-you` => `ctr`
            +     *
            +     * `others-you-may-like` => `ctr`
            +     * 
            + * + * string optimization_objective = 2; + * + * @return The optimizationObjective. + */ + @java.lang.Override + public java.lang.String getOptimizationObjective() { + java.lang.Object ref = optimizationObjective_; + 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(); + optimizationObjective_ = s; + return s; + } } - return com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineMetadata.getDefaultInstance(); - } - /** - * - * - *
            -   * Output only. Additional information of the Chat Engine. Only applicable
            -   * if
            -   * [solution_type][google.cloud.discoveryengine.v1beta.Engine.solution_type]
            -   * is
            -   * [SOLUTION_TYPE_CHAT][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_CHAT].
            -   * 
            - * - * - * .google.cloud.discoveryengine.v1beta.Engine.ChatEngineMetadata chat_engine_metadata = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineMetadataOrBuilder - getChatEngineMetadataOrBuilder() { - if (engineMetadataCase_ == 12) { - return (com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineMetadata) engineMetadata_; + /** + * + * + *
            +     * The optimization objective. e.g., `cvr`.
            +     *
            +     * This field together with
            +     * [optimization_objective][google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig.type]
            +     * describe engine metadata to use to control engine training and serving.
            +     *
            +     * Currently supported
            +     * values: `ctr`, `cvr`.
            +     *
            +     * If not specified, we choose default based on engine type.
            +     * Default depends on type of recommendation:
            +     *
            +     * `recommended-for-you` => `ctr`
            +     *
            +     * `others-you-may-like` => `ctr`
            +     * 
            + * + * string optimization_objective = 2; + * + * @return The bytes for optimizationObjective. + */ + @java.lang.Override + public com.google.protobuf.ByteString getOptimizationObjectiveBytes() { + java.lang.Object ref = optimizationObjective_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + optimizationObjective_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } } - return com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineMetadata.getDefaultInstance(); - } - - public static final int NAME_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object name_ = ""; + public static final int OPTIMIZATION_OBJECTIVE_CONFIG_FIELD_NUMBER = 3; + private com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .OptimizationObjectiveConfig + optimizationObjectiveConfig_; - /** - * - * - *
            -   * Immutable. The fully qualified resource name of the engine.
            -   *
            -   * This field must be a UTF-8 encoded string with a length limit of 1024
            -   * characters.
            -   *
            -   * Format:
            -   * `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}`
            -   * engine should be 1-63 characters, and valid characters are
            -   * /[a-z0-9][a-z0-9-_]*/. Otherwise, an INVALID_ARGUMENT error is returned.
            -   * 
            - * - * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - 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(); - name_ = s; - return s; + /** + * + * + *
            +     * Name and value of the custom threshold for cvr optimization_objective.
            +     * For target_field `watch-time`, target_field_value must be an integer
            +     * value indicating the media progress time in seconds between (0, 86400]
            +     * (excludes 0, includes 86400) (e.g., 90).
            +     * For target_field `watch-percentage`, the target_field_value must be a
            +     * valid float value between (0, 1.0] (excludes 0, includes 1.0) (e.g.,
            +     * 0.5).
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig.OptimizationObjectiveConfig optimization_objective_config = 3; + * + * + * @return Whether the optimizationObjectiveConfig field is set. + */ + @java.lang.Override + public boolean hasOptimizationObjectiveConfig() { + return ((bitField0_ & 0x00000001) != 0); } - } - /** - * - * - *
            -   * Immutable. The fully qualified resource name of the engine.
            -   *
            -   * This field must be a UTF-8 encoded string with a length limit of 1024
            -   * characters.
            -   *
            -   * Format:
            -   * `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}`
            -   * engine should be 1-63 characters, and valid characters are
            -   * /[a-z0-9][a-z0-9-_]*/. Otherwise, an INVALID_ARGUMENT error is returned.
            -   * 
            - * - * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; + /** + * + * + *
            +     * Name and value of the custom threshold for cvr optimization_objective.
            +     * For target_field `watch-time`, target_field_value must be an integer
            +     * value indicating the media progress time in seconds between (0, 86400]
            +     * (excludes 0, includes 86400) (e.g., 90).
            +     * For target_field `watch-percentage`, the target_field_value must be a
            +     * valid float value between (0, 1.0] (excludes 0, includes 1.0) (e.g.,
            +     * 0.5).
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig.OptimizationObjectiveConfig optimization_objective_config = 3; + * + * + * @return The optimizationObjectiveConfig. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .OptimizationObjectiveConfig + getOptimizationObjectiveConfig() { + return optimizationObjectiveConfig_ == null + ? com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .OptimizationObjectiveConfig.getDefaultInstance() + : optimizationObjectiveConfig_; } - } - public static final int DISPLAY_NAME_FIELD_NUMBER = 2; + /** + * + * + *
            +     * Name and value of the custom threshold for cvr optimization_objective.
            +     * For target_field `watch-time`, target_field_value must be an integer
            +     * value indicating the media progress time in seconds between (0, 86400]
            +     * (excludes 0, includes 86400) (e.g., 90).
            +     * For target_field `watch-percentage`, the target_field_value must be a
            +     * valid float value between (0, 1.0] (excludes 0, includes 1.0) (e.g.,
            +     * 0.5).
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig.OptimizationObjectiveConfig optimization_objective_config = 3; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .OptimizationObjectiveConfigOrBuilder + getOptimizationObjectiveConfigOrBuilder() { + return optimizationObjectiveConfig_ == null + ? com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .OptimizationObjectiveConfig.getDefaultInstance() + : optimizationObjectiveConfig_; + } - @SuppressWarnings("serial") - private volatile java.lang.Object displayName_ = ""; + public static final int TRAINING_STATE_FIELD_NUMBER = 4; + private int trainingState_ = 0; - /** - * - * - *
            -   * Required. The display name of the engine. Should be human readable. UTF-8
            -   * encoded string with limit of 1024 characters.
            -   * 
            - * - * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The displayName. - */ - @java.lang.Override - public java.lang.String getDisplayName() { - java.lang.Object ref = displayName_; - 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(); - displayName_ = s; - return s; + /** + * + * + *
            +     * The training state that the engine is in (e.g.
            +     * `TRAINING` or `PAUSED`).
            +     *
            +     * Since part of the cost of running the service
            +     * is frequency of training - this can be used to determine when to train
            +     * engine in order to control cost. If not specified: the default value for
            +     * `CreateEngine` method is `TRAINING`. The default value for
            +     * `UpdateEngine` method is to keep the state the same as before.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig.TrainingState training_state = 4; + * + * + * @return The enum numeric value on the wire for trainingState. + */ + @java.lang.Override + public int getTrainingStateValue() { + return trainingState_; } - } - /** - * - * - *
            -   * Required. The display name of the engine. Should be human readable. UTF-8
            -   * encoded string with limit of 1024 characters.
            -   * 
            - * - * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for displayName. - */ - @java.lang.Override - public com.google.protobuf.ByteString getDisplayNameBytes() { - java.lang.Object ref = displayName_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - displayName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; + /** + * + * + *
            +     * The training state that the engine is in (e.g.
            +     * `TRAINING` or `PAUSED`).
            +     *
            +     * Since part of the cost of running the service
            +     * is frequency of training - this can be used to determine when to train
            +     * engine in order to control cost. If not specified: the default value for
            +     * `CreateEngine` method is `TRAINING`. The default value for
            +     * `UpdateEngine` method is to keep the state the same as before.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig.TrainingState training_state = 4; + * + * + * @return The trainingState. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .TrainingState + getTrainingState() { + com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig.TrainingState + result = + com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .TrainingState.forNumber(trainingState_); + return result == null + ? com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .TrainingState.UNRECOGNIZED + : result; } - } - public static final int CREATE_TIME_FIELD_NUMBER = 3; - private com.google.protobuf.Timestamp createTime_; + public static final int ENGINE_FEATURES_CONFIG_FIELD_NUMBER = 5; + private com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .EngineFeaturesConfig + engineFeaturesConfig_; - /** - * - * - *
            -   * Output only. Timestamp the Recommendation Engine was created at.
            -   * 
            - * - * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the createTime field is set. - */ - @java.lang.Override - public boolean hasCreateTime() { - return ((bitField0_ & 0x00000001) != 0); - } + /** + * + * + *
            +     * Optional. Additional engine features config.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig.EngineFeaturesConfig engine_features_config = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the engineFeaturesConfig field is set. + */ + @java.lang.Override + public boolean hasEngineFeaturesConfig() { + return ((bitField0_ & 0x00000002) != 0); + } - /** - * - * - *
            -   * Output only. Timestamp the Recommendation Engine was created at.
            -   * 
            - * - * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The createTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getCreateTime() { - return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; - } + /** + * + * + *
            +     * Optional. Additional engine features config.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig.EngineFeaturesConfig engine_features_config = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The engineFeaturesConfig. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .EngineFeaturesConfig + getEngineFeaturesConfig() { + return engineFeaturesConfig_ == null + ? com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .EngineFeaturesConfig.getDefaultInstance() + : engineFeaturesConfig_; + } - /** - * - * - *
            -   * Output only. Timestamp the Recommendation Engine was created at.
            -   * 
            - * - * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { - return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; - } + /** + * + * + *
            +     * Optional. Additional engine features config.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig.EngineFeaturesConfig engine_features_config = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .EngineFeaturesConfigOrBuilder + getEngineFeaturesConfigOrBuilder() { + return engineFeaturesConfig_ == null + ? com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .EngineFeaturesConfig.getDefaultInstance() + : engineFeaturesConfig_; + } - public static final int UPDATE_TIME_FIELD_NUMBER = 4; - private com.google.protobuf.Timestamp updateTime_; + private byte memoizedIsInitialized = -1; - /** - * - * - *
            -   * Output only. Timestamp the Recommendation Engine was last updated.
            -   * 
            - * - * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the updateTime field is set. - */ - @java.lang.Override - public boolean hasUpdateTime() { - return ((bitField0_ & 0x00000002) != 0); - } + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; - /** - * - * - *
            -   * Output only. Timestamp the Recommendation Engine was last updated.
            -   * 
            - * - * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The updateTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getUpdateTime() { - return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; - } + memoizedIsInitialized = 1; + return true; + } - /** - * - * - *
            -   * Output only. Timestamp the Recommendation Engine was last updated.
            -   * 
            - * - * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { - return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; - } + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(type_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, type_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(optimizationObjective_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, optimizationObjective_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(3, getOptimizationObjectiveConfig()); + } + if (trainingState_ + != com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .TrainingState.TRAINING_STATE_UNSPECIFIED + .getNumber()) { + output.writeEnum(4, trainingState_); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(5, getEngineFeaturesConfig()); + } + getUnknownFields().writeTo(output); + } - public static final int DATA_STORE_IDS_FIELD_NUMBER = 5; + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; - @SuppressWarnings("serial") - private com.google.protobuf.LazyStringArrayList dataStoreIds_ = - com.google.protobuf.LazyStringArrayList.emptyList(); + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(type_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, type_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(optimizationObjective_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, optimizationObjective_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 3, getOptimizationObjectiveConfig()); + } + if (trainingState_ + != com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .TrainingState.TRAINING_STATE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(4, trainingState_); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(5, getEngineFeaturesConfig()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } - /** - * - * - *
            -   * The data stores associated with this engine.
            -   *
            -   * For
            -   * [SOLUTION_TYPE_SEARCH][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_SEARCH]
            -   * and
            -   * [SOLUTION_TYPE_RECOMMENDATION][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_RECOMMENDATION]
            -   * type of engines, they can only associate with at most one data store.
            -   *
            -   * If
            -   * [solution_type][google.cloud.discoveryengine.v1beta.Engine.solution_type]
            -   * is
            -   * [SOLUTION_TYPE_CHAT][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_CHAT],
            -   * multiple [DataStore][google.cloud.discoveryengine.v1beta.DataStore]s in the
            -   * same [Collection][google.cloud.discoveryengine.v1beta.Collection] can be
            -   * associated here.
            -   *
            -   * Note that when used in
            -   * [CreateEngineRequest][google.cloud.discoveryengine.v1beta.CreateEngineRequest],
            -   * one DataStore id must be provided as the system will use it for necessary
            -   * initializations.
            -   * 
            - * - * repeated string data_store_ids = 5; - * - * @return A list containing the dataStoreIds. - */ - public com.google.protobuf.ProtocolStringList getDataStoreIdsList() { - return dataStoreIds_; - } + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof + com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig other = + (com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig) obj; - /** - * - * - *
            -   * The data stores associated with this engine.
            -   *
            -   * For
            -   * [SOLUTION_TYPE_SEARCH][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_SEARCH]
            -   * and
            -   * [SOLUTION_TYPE_RECOMMENDATION][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_RECOMMENDATION]
            -   * type of engines, they can only associate with at most one data store.
            -   *
            -   * If
            -   * [solution_type][google.cloud.discoveryengine.v1beta.Engine.solution_type]
            -   * is
            -   * [SOLUTION_TYPE_CHAT][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_CHAT],
            -   * multiple [DataStore][google.cloud.discoveryengine.v1beta.DataStore]s in the
            -   * same [Collection][google.cloud.discoveryengine.v1beta.Collection] can be
            -   * associated here.
            -   *
            -   * Note that when used in
            -   * [CreateEngineRequest][google.cloud.discoveryengine.v1beta.CreateEngineRequest],
            -   * one DataStore id must be provided as the system will use it for necessary
            -   * initializations.
            -   * 
            - * - * repeated string data_store_ids = 5; - * - * @return The count of dataStoreIds. - */ - public int getDataStoreIdsCount() { - return dataStoreIds_.size(); - } + if (!getType().equals(other.getType())) return false; + if (!getOptimizationObjective().equals(other.getOptimizationObjective())) return false; + if (hasOptimizationObjectiveConfig() != other.hasOptimizationObjectiveConfig()) return false; + if (hasOptimizationObjectiveConfig()) { + if (!getOptimizationObjectiveConfig().equals(other.getOptimizationObjectiveConfig())) + return false; + } + if (trainingState_ != other.trainingState_) return false; + if (hasEngineFeaturesConfig() != other.hasEngineFeaturesConfig()) return false; + if (hasEngineFeaturesConfig()) { + if (!getEngineFeaturesConfig().equals(other.getEngineFeaturesConfig())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } - /** - * - * - *
            -   * The data stores associated with this engine.
            -   *
            -   * For
            -   * [SOLUTION_TYPE_SEARCH][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_SEARCH]
            -   * and
            -   * [SOLUTION_TYPE_RECOMMENDATION][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_RECOMMENDATION]
            -   * type of engines, they can only associate with at most one data store.
            -   *
            -   * If
            -   * [solution_type][google.cloud.discoveryengine.v1beta.Engine.solution_type]
            -   * is
            -   * [SOLUTION_TYPE_CHAT][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_CHAT],
            -   * multiple [DataStore][google.cloud.discoveryengine.v1beta.DataStore]s in the
            -   * same [Collection][google.cloud.discoveryengine.v1beta.Collection] can be
            -   * associated here.
            -   *
            -   * Note that when used in
            -   * [CreateEngineRequest][google.cloud.discoveryengine.v1beta.CreateEngineRequest],
            -   * one DataStore id must be provided as the system will use it for necessary
            -   * initializations.
            -   * 
            - * - * repeated string data_store_ids = 5; - * - * @param index The index of the element to return. - * @return The dataStoreIds at the given index. - */ - public java.lang.String getDataStoreIds(int index) { - return dataStoreIds_.get(index); - } + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + getType().hashCode(); + hash = (37 * hash) + OPTIMIZATION_OBJECTIVE_FIELD_NUMBER; + hash = (53 * hash) + getOptimizationObjective().hashCode(); + if (hasOptimizationObjectiveConfig()) { + hash = (37 * hash) + OPTIMIZATION_OBJECTIVE_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getOptimizationObjectiveConfig().hashCode(); + } + hash = (37 * hash) + TRAINING_STATE_FIELD_NUMBER; + hash = (53 * hash) + trainingState_; + if (hasEngineFeaturesConfig()) { + hash = (37 * hash) + ENGINE_FEATURES_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getEngineFeaturesConfig().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } - /** - * - * - *
            -   * The data stores associated with this engine.
            -   *
            -   * For
            -   * [SOLUTION_TYPE_SEARCH][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_SEARCH]
            -   * and
            -   * [SOLUTION_TYPE_RECOMMENDATION][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_RECOMMENDATION]
            -   * type of engines, they can only associate with at most one data store.
            -   *
            -   * If
            -   * [solution_type][google.cloud.discoveryengine.v1beta.Engine.solution_type]
            -   * is
            -   * [SOLUTION_TYPE_CHAT][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_CHAT],
            -   * multiple [DataStore][google.cloud.discoveryengine.v1beta.DataStore]s in the
            -   * same [Collection][google.cloud.discoveryengine.v1beta.Collection] can be
            -   * associated here.
            -   *
            -   * Note that when used in
            -   * [CreateEngineRequest][google.cloud.discoveryengine.v1beta.CreateEngineRequest],
            -   * one DataStore id must be provided as the system will use it for necessary
            -   * initializations.
            -   * 
            - * - * repeated string data_store_ids = 5; - * - * @param index The index of the value to return. - * @return The bytes of the dataStoreIds at the given index. - */ - public com.google.protobuf.ByteString getDataStoreIdsBytes(int index) { - return dataStoreIds_.getByteString(index); - } - - public static final int SOLUTION_TYPE_FIELD_NUMBER = 6; - private int solutionType_ = 0; - - /** - * - * - *
            -   * Required. The solutions of the engine.
            -   * 
            - * - * - * .google.cloud.discoveryengine.v1beta.SolutionType solution_type = 6 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The enum numeric value on the wire for solutionType. - */ - @java.lang.Override - public int getSolutionTypeValue() { - return solutionType_; - } - - /** - * - * - *
            -   * Required. The solutions of the engine.
            -   * 
            - * - * - * .google.cloud.discoveryengine.v1beta.SolutionType solution_type = 6 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The solutionType. - */ - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.SolutionType getSolutionType() { - com.google.cloud.discoveryengine.v1beta.SolutionType result = - com.google.cloud.discoveryengine.v1beta.SolutionType.forNumber(solutionType_); - return result == null - ? com.google.cloud.discoveryengine.v1beta.SolutionType.UNRECOGNIZED - : result; - } - - public static final int INDUSTRY_VERTICAL_FIELD_NUMBER = 16; - private int industryVertical_ = 0; - - /** - * - * - *
            -   * The industry vertical that the engine registers.
            -   * The restriction of the Engine industry vertical is based on
            -   * [DataStore][google.cloud.discoveryengine.v1beta.DataStore]: If unspecified,
            -   * default to `GENERIC`. Vertical on Engine has to match vertical of the
            -   * DataStore linked to the engine.
            -   * 
            - * - * .google.cloud.discoveryengine.v1beta.IndustryVertical industry_vertical = 16; - * - * @return The enum numeric value on the wire for industryVertical. - */ - @java.lang.Override - public int getIndustryVerticalValue() { - return industryVertical_; - } + public static com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - /** - * - * - *
            -   * The industry vertical that the engine registers.
            -   * The restriction of the Engine industry vertical is based on
            -   * [DataStore][google.cloud.discoveryengine.v1beta.DataStore]: If unspecified,
            -   * default to `GENERIC`. Vertical on Engine has to match vertical of the
            -   * DataStore linked to the engine.
            -   * 
            - * - * .google.cloud.discoveryengine.v1beta.IndustryVertical industry_vertical = 16; - * - * @return The industryVertical. - */ - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.IndustryVertical getIndustryVertical() { - com.google.cloud.discoveryengine.v1beta.IndustryVertical result = - com.google.cloud.discoveryengine.v1beta.IndustryVertical.forNumber(industryVertical_); - return result == null - ? com.google.cloud.discoveryengine.v1beta.IndustryVertical.UNRECOGNIZED - : result; - } + public static com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - public static final int COMMON_CONFIG_FIELD_NUMBER = 15; - private com.google.cloud.discoveryengine.v1beta.Engine.CommonConfig commonConfig_; + public static com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - /** - * - * - *
            -   * Common config spec that specifies the metadata of the engine.
            -   * 
            - * - * .google.cloud.discoveryengine.v1beta.Engine.CommonConfig common_config = 15; - * - * @return Whether the commonConfig field is set. - */ - @java.lang.Override - public boolean hasCommonConfig() { - return ((bitField0_ & 0x00000004) != 0); - } + public static com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - /** - * - * - *
            -   * Common config spec that specifies the metadata of the engine.
            -   * 
            - * - * .google.cloud.discoveryengine.v1beta.Engine.CommonConfig common_config = 15; - * - * @return The commonConfig. - */ - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.Engine.CommonConfig getCommonConfig() { - return commonConfig_ == null - ? com.google.cloud.discoveryengine.v1beta.Engine.CommonConfig.getDefaultInstance() - : commonConfig_; - } + public static com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - /** - * - * - *
            -   * Common config spec that specifies the metadata of the engine.
            -   * 
            - * - * .google.cloud.discoveryengine.v1beta.Engine.CommonConfig common_config = 15; - */ - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.Engine.CommonConfigOrBuilder - getCommonConfigOrBuilder() { - return commonConfig_ == null - ? com.google.cloud.discoveryengine.v1beta.Engine.CommonConfig.getDefaultInstance() - : commonConfig_; - } + public static com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - public static final int DISABLE_ANALYTICS_FIELD_NUMBER = 26; - private boolean disableAnalytics_ = false; + public static com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } - /** - * - * - *
            -   * Optional. Whether to disable analytics for searches performed on this
            -   * engine.
            -   * 
            - * - * bool disable_analytics = 26 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The disableAnalytics. - */ - @java.lang.Override - public boolean getDisableAnalytics() { - return disableAnalytics_; - } + public static com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } - private byte memoizedIsInitialized = -1; + public static com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + public static com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } - memoizedIsInitialized = 1; - return true; - } + public static com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + public static com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(displayName_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 2, displayName_); + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); } - if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(3, getCreateTime()); + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); } - if (((bitField0_ & 0x00000002) != 0)) { - output.writeMessage(4, getUpdateTime()); + + public static Builder newBuilder( + com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } - for (int i = 0; i < dataStoreIds_.size(); i++) { - com.google.protobuf.GeneratedMessage.writeString(output, 5, dataStoreIds_.getRaw(i)); + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); } - if (solutionType_ - != com.google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_UNSPECIFIED - .getNumber()) { - output.writeEnum(6, solutionType_); + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; } - if (engineConfigCase_ == 11) { + + /** + * + * + *
            +     * Additional config specs for a Media Recommendation engine.
            +     * 
            + * + * Protobuf type {@code + * google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig) + com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.EngineProto + .internal_static_google_cloud_discoveryengine_v1beta_Engine_MediaRecommendationEngineConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.EngineProto + .internal_static_google_cloud_discoveryengine_v1beta_Engine_MediaRecommendationEngineConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .class, + com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .Builder.class); + } + + // Construct using + // com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetOptimizationObjectiveConfigFieldBuilder(); + internalGetEngineFeaturesConfigFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + type_ = ""; + optimizationObjective_ = ""; + optimizationObjectiveConfig_ = null; + if (optimizationObjectiveConfigBuilder_ != null) { + optimizationObjectiveConfigBuilder_.dispose(); + optimizationObjectiveConfigBuilder_ = null; + } + trainingState_ = 0; + engineFeaturesConfig_ = null; + if (engineFeaturesConfigBuilder_ != null) { + engineFeaturesConfigBuilder_.dispose(); + engineFeaturesConfigBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1beta.EngineProto + .internal_static_google_cloud_discoveryengine_v1beta_Engine_MediaRecommendationEngineConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + build() { + com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + buildPartial() { + com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig result = + new com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig( + this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.type_ = type_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.optimizationObjective_ = optimizationObjective_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.optimizationObjectiveConfig_ = + optimizationObjectiveConfigBuilder_ == null + ? optimizationObjectiveConfig_ + : optimizationObjectiveConfigBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.trainingState_ = trainingState_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.engineFeaturesConfig_ = + engineFeaturesConfigBuilder_ == null + ? engineFeaturesConfig_ + : engineFeaturesConfigBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig) { + return mergeFrom( + (com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig other) { + if (other + == com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .getDefaultInstance()) return this; + if (!other.getType().isEmpty()) { + type_ = other.type_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getOptimizationObjective().isEmpty()) { + optimizationObjective_ = other.optimizationObjective_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasOptimizationObjectiveConfig()) { + mergeOptimizationObjectiveConfig(other.getOptimizationObjectiveConfig()); + } + if (other.trainingState_ != 0) { + setTrainingStateValue(other.getTrainingStateValue()); + } + if (other.hasEngineFeaturesConfig()) { + mergeEngineFeaturesConfig(other.getEngineFeaturesConfig()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + type_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + optimizationObjective_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage( + internalGetOptimizationObjectiveConfigFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 32: + { + trainingState_ = input.readEnum(); + bitField0_ |= 0x00000008; + break; + } // case 32 + case 42: + { + input.readMessage( + internalGetEngineFeaturesConfigFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 42 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object type_ = ""; + + /** + * + * + *
            +       * Required. The type of engine. e.g., `recommended-for-you`.
            +       *
            +       * This field together with
            +       * [optimization_objective][google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig.optimization_objective]
            +       * describe engine metadata to use to control engine training and serving.
            +       *
            +       * Currently supported values: `recommended-for-you`, `others-you-may-like`,
            +       * `more-like-this`, `most-popular-items`.
            +       * 
            + * + * string type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The type. + */ + public java.lang.String getType() { + java.lang.Object ref = type_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + type_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
            +       * Required. The type of engine. e.g., `recommended-for-you`.
            +       *
            +       * This field together with
            +       * [optimization_objective][google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig.optimization_objective]
            +       * describe engine metadata to use to control engine training and serving.
            +       *
            +       * Currently supported values: `recommended-for-you`, `others-you-may-like`,
            +       * `more-like-this`, `most-popular-items`.
            +       * 
            + * + * string type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for type. + */ + public com.google.protobuf.ByteString getTypeBytes() { + java.lang.Object ref = type_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + type_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
            +       * Required. The type of engine. e.g., `recommended-for-you`.
            +       *
            +       * This field together with
            +       * [optimization_objective][google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig.optimization_objective]
            +       * describe engine metadata to use to control engine training and serving.
            +       *
            +       * Currently supported values: `recommended-for-you`, `others-you-may-like`,
            +       * `more-like-this`, `most-popular-items`.
            +       * 
            + * + * string type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The type to set. + * @return This builder for chaining. + */ + public Builder setType(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + type_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
            +       * Required. The type of engine. e.g., `recommended-for-you`.
            +       *
            +       * This field together with
            +       * [optimization_objective][google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig.optimization_objective]
            +       * describe engine metadata to use to control engine training and serving.
            +       *
            +       * Currently supported values: `recommended-for-you`, `others-you-may-like`,
            +       * `more-like-this`, `most-popular-items`.
            +       * 
            + * + * string type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearType() { + type_ = getDefaultInstance().getType(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
            +       * Required. The type of engine. e.g., `recommended-for-you`.
            +       *
            +       * This field together with
            +       * [optimization_objective][google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig.optimization_objective]
            +       * describe engine metadata to use to control engine training and serving.
            +       *
            +       * Currently supported values: `recommended-for-you`, `others-you-may-like`,
            +       * `more-like-this`, `most-popular-items`.
            +       * 
            + * + * string type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for type to set. + * @return This builder for chaining. + */ + public Builder setTypeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + type_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object optimizationObjective_ = ""; + + /** + * + * + *
            +       * The optimization objective. e.g., `cvr`.
            +       *
            +       * This field together with
            +       * [optimization_objective][google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig.type]
            +       * describe engine metadata to use to control engine training and serving.
            +       *
            +       * Currently supported
            +       * values: `ctr`, `cvr`.
            +       *
            +       * If not specified, we choose default based on engine type.
            +       * Default depends on type of recommendation:
            +       *
            +       * `recommended-for-you` => `ctr`
            +       *
            +       * `others-you-may-like` => `ctr`
            +       * 
            + * + * string optimization_objective = 2; + * + * @return The optimizationObjective. + */ + public java.lang.String getOptimizationObjective() { + java.lang.Object ref = optimizationObjective_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + optimizationObjective_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
            +       * The optimization objective. e.g., `cvr`.
            +       *
            +       * This field together with
            +       * [optimization_objective][google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig.type]
            +       * describe engine metadata to use to control engine training and serving.
            +       *
            +       * Currently supported
            +       * values: `ctr`, `cvr`.
            +       *
            +       * If not specified, we choose default based on engine type.
            +       * Default depends on type of recommendation:
            +       *
            +       * `recommended-for-you` => `ctr`
            +       *
            +       * `others-you-may-like` => `ctr`
            +       * 
            + * + * string optimization_objective = 2; + * + * @return The bytes for optimizationObjective. + */ + public com.google.protobuf.ByteString getOptimizationObjectiveBytes() { + java.lang.Object ref = optimizationObjective_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + optimizationObjective_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
            +       * The optimization objective. e.g., `cvr`.
            +       *
            +       * This field together with
            +       * [optimization_objective][google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig.type]
            +       * describe engine metadata to use to control engine training and serving.
            +       *
            +       * Currently supported
            +       * values: `ctr`, `cvr`.
            +       *
            +       * If not specified, we choose default based on engine type.
            +       * Default depends on type of recommendation:
            +       *
            +       * `recommended-for-you` => `ctr`
            +       *
            +       * `others-you-may-like` => `ctr`
            +       * 
            + * + * string optimization_objective = 2; + * + * @param value The optimizationObjective to set. + * @return This builder for chaining. + */ + public Builder setOptimizationObjective(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + optimizationObjective_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
            +       * The optimization objective. e.g., `cvr`.
            +       *
            +       * This field together with
            +       * [optimization_objective][google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig.type]
            +       * describe engine metadata to use to control engine training and serving.
            +       *
            +       * Currently supported
            +       * values: `ctr`, `cvr`.
            +       *
            +       * If not specified, we choose default based on engine type.
            +       * Default depends on type of recommendation:
            +       *
            +       * `recommended-for-you` => `ctr`
            +       *
            +       * `others-you-may-like` => `ctr`
            +       * 
            + * + * string optimization_objective = 2; + * + * @return This builder for chaining. + */ + public Builder clearOptimizationObjective() { + optimizationObjective_ = getDefaultInstance().getOptimizationObjective(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
            +       * The optimization objective. e.g., `cvr`.
            +       *
            +       * This field together with
            +       * [optimization_objective][google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig.type]
            +       * describe engine metadata to use to control engine training and serving.
            +       *
            +       * Currently supported
            +       * values: `ctr`, `cvr`.
            +       *
            +       * If not specified, we choose default based on engine type.
            +       * Default depends on type of recommendation:
            +       *
            +       * `recommended-for-you` => `ctr`
            +       *
            +       * `others-you-may-like` => `ctr`
            +       * 
            + * + * string optimization_objective = 2; + * + * @param value The bytes for optimizationObjective to set. + * @return This builder for chaining. + */ + public Builder setOptimizationObjectiveBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + optimizationObjective_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .OptimizationObjectiveConfig + optimizationObjectiveConfig_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .OptimizationObjectiveConfig, + com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .OptimizationObjectiveConfig.Builder, + com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .OptimizationObjectiveConfigOrBuilder> + optimizationObjectiveConfigBuilder_; + + /** + * + * + *
            +       * Name and value of the custom threshold for cvr optimization_objective.
            +       * For target_field `watch-time`, target_field_value must be an integer
            +       * value indicating the media progress time in seconds between (0, 86400]
            +       * (excludes 0, includes 86400) (e.g., 90).
            +       * For target_field `watch-percentage`, the target_field_value must be a
            +       * valid float value between (0, 1.0] (excludes 0, includes 1.0) (e.g.,
            +       * 0.5).
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig.OptimizationObjectiveConfig optimization_objective_config = 3; + * + * + * @return Whether the optimizationObjectiveConfig field is set. + */ + public boolean hasOptimizationObjectiveConfig() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
            +       * Name and value of the custom threshold for cvr optimization_objective.
            +       * For target_field `watch-time`, target_field_value must be an integer
            +       * value indicating the media progress time in seconds between (0, 86400]
            +       * (excludes 0, includes 86400) (e.g., 90).
            +       * For target_field `watch-percentage`, the target_field_value must be a
            +       * valid float value between (0, 1.0] (excludes 0, includes 1.0) (e.g.,
            +       * 0.5).
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig.OptimizationObjectiveConfig optimization_objective_config = 3; + * + * + * @return The optimizationObjectiveConfig. + */ + public com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .OptimizationObjectiveConfig + getOptimizationObjectiveConfig() { + if (optimizationObjectiveConfigBuilder_ == null) { + return optimizationObjectiveConfig_ == null + ? com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .OptimizationObjectiveConfig.getDefaultInstance() + : optimizationObjectiveConfig_; + } else { + return optimizationObjectiveConfigBuilder_.getMessage(); + } + } + + /** + * + * + *
            +       * Name and value of the custom threshold for cvr optimization_objective.
            +       * For target_field `watch-time`, target_field_value must be an integer
            +       * value indicating the media progress time in seconds between (0, 86400]
            +       * (excludes 0, includes 86400) (e.g., 90).
            +       * For target_field `watch-percentage`, the target_field_value must be a
            +       * valid float value between (0, 1.0] (excludes 0, includes 1.0) (e.g.,
            +       * 0.5).
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig.OptimizationObjectiveConfig optimization_objective_config = 3; + * + */ + public Builder setOptimizationObjectiveConfig( + com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .OptimizationObjectiveConfig + value) { + if (optimizationObjectiveConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + optimizationObjectiveConfig_ = value; + } else { + optimizationObjectiveConfigBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
            +       * Name and value of the custom threshold for cvr optimization_objective.
            +       * For target_field `watch-time`, target_field_value must be an integer
            +       * value indicating the media progress time in seconds between (0, 86400]
            +       * (excludes 0, includes 86400) (e.g., 90).
            +       * For target_field `watch-percentage`, the target_field_value must be a
            +       * valid float value between (0, 1.0] (excludes 0, includes 1.0) (e.g.,
            +       * 0.5).
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig.OptimizationObjectiveConfig optimization_objective_config = 3; + * + */ + public Builder setOptimizationObjectiveConfig( + com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .OptimizationObjectiveConfig.Builder + builderForValue) { + if (optimizationObjectiveConfigBuilder_ == null) { + optimizationObjectiveConfig_ = builderForValue.build(); + } else { + optimizationObjectiveConfigBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
            +       * Name and value of the custom threshold for cvr optimization_objective.
            +       * For target_field `watch-time`, target_field_value must be an integer
            +       * value indicating the media progress time in seconds between (0, 86400]
            +       * (excludes 0, includes 86400) (e.g., 90).
            +       * For target_field `watch-percentage`, the target_field_value must be a
            +       * valid float value between (0, 1.0] (excludes 0, includes 1.0) (e.g.,
            +       * 0.5).
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig.OptimizationObjectiveConfig optimization_objective_config = 3; + * + */ + public Builder mergeOptimizationObjectiveConfig( + com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .OptimizationObjectiveConfig + value) { + if (optimizationObjectiveConfigBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && optimizationObjectiveConfig_ != null + && optimizationObjectiveConfig_ + != com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .OptimizationObjectiveConfig.getDefaultInstance()) { + getOptimizationObjectiveConfigBuilder().mergeFrom(value); + } else { + optimizationObjectiveConfig_ = value; + } + } else { + optimizationObjectiveConfigBuilder_.mergeFrom(value); + } + if (optimizationObjectiveConfig_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + + /** + * + * + *
            +       * Name and value of the custom threshold for cvr optimization_objective.
            +       * For target_field `watch-time`, target_field_value must be an integer
            +       * value indicating the media progress time in seconds between (0, 86400]
            +       * (excludes 0, includes 86400) (e.g., 90).
            +       * For target_field `watch-percentage`, the target_field_value must be a
            +       * valid float value between (0, 1.0] (excludes 0, includes 1.0) (e.g.,
            +       * 0.5).
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig.OptimizationObjectiveConfig optimization_objective_config = 3; + * + */ + public Builder clearOptimizationObjectiveConfig() { + bitField0_ = (bitField0_ & ~0x00000004); + optimizationObjectiveConfig_ = null; + if (optimizationObjectiveConfigBuilder_ != null) { + optimizationObjectiveConfigBuilder_.dispose(); + optimizationObjectiveConfigBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
            +       * Name and value of the custom threshold for cvr optimization_objective.
            +       * For target_field `watch-time`, target_field_value must be an integer
            +       * value indicating the media progress time in seconds between (0, 86400]
            +       * (excludes 0, includes 86400) (e.g., 90).
            +       * For target_field `watch-percentage`, the target_field_value must be a
            +       * valid float value between (0, 1.0] (excludes 0, includes 1.0) (e.g.,
            +       * 0.5).
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig.OptimizationObjectiveConfig optimization_objective_config = 3; + * + */ + public com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .OptimizationObjectiveConfig.Builder + getOptimizationObjectiveConfigBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return internalGetOptimizationObjectiveConfigFieldBuilder().getBuilder(); + } + + /** + * + * + *
            +       * Name and value of the custom threshold for cvr optimization_objective.
            +       * For target_field `watch-time`, target_field_value must be an integer
            +       * value indicating the media progress time in seconds between (0, 86400]
            +       * (excludes 0, includes 86400) (e.g., 90).
            +       * For target_field `watch-percentage`, the target_field_value must be a
            +       * valid float value between (0, 1.0] (excludes 0, includes 1.0) (e.g.,
            +       * 0.5).
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig.OptimizationObjectiveConfig optimization_objective_config = 3; + * + */ + public com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .OptimizationObjectiveConfigOrBuilder + getOptimizationObjectiveConfigOrBuilder() { + if (optimizationObjectiveConfigBuilder_ != null) { + return optimizationObjectiveConfigBuilder_.getMessageOrBuilder(); + } else { + return optimizationObjectiveConfig_ == null + ? com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .OptimizationObjectiveConfig.getDefaultInstance() + : optimizationObjectiveConfig_; + } + } + + /** + * + * + *
            +       * Name and value of the custom threshold for cvr optimization_objective.
            +       * For target_field `watch-time`, target_field_value must be an integer
            +       * value indicating the media progress time in seconds between (0, 86400]
            +       * (excludes 0, includes 86400) (e.g., 90).
            +       * For target_field `watch-percentage`, the target_field_value must be a
            +       * valid float value between (0, 1.0] (excludes 0, includes 1.0) (e.g.,
            +       * 0.5).
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig.OptimizationObjectiveConfig optimization_objective_config = 3; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .OptimizationObjectiveConfig, + com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .OptimizationObjectiveConfig.Builder, + com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .OptimizationObjectiveConfigOrBuilder> + internalGetOptimizationObjectiveConfigFieldBuilder() { + if (optimizationObjectiveConfigBuilder_ == null) { + optimizationObjectiveConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .OptimizationObjectiveConfig, + com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .OptimizationObjectiveConfig.Builder, + com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .OptimizationObjectiveConfigOrBuilder>( + getOptimizationObjectiveConfig(), getParentForChildren(), isClean()); + optimizationObjectiveConfig_ = null; + } + return optimizationObjectiveConfigBuilder_; + } + + private int trainingState_ = 0; + + /** + * + * + *
            +       * The training state that the engine is in (e.g.
            +       * `TRAINING` or `PAUSED`).
            +       *
            +       * Since part of the cost of running the service
            +       * is frequency of training - this can be used to determine when to train
            +       * engine in order to control cost. If not specified: the default value for
            +       * `CreateEngine` method is `TRAINING`. The default value for
            +       * `UpdateEngine` method is to keep the state the same as before.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig.TrainingState training_state = 4; + * + * + * @return The enum numeric value on the wire for trainingState. + */ + @java.lang.Override + public int getTrainingStateValue() { + return trainingState_; + } + + /** + * + * + *
            +       * The training state that the engine is in (e.g.
            +       * `TRAINING` or `PAUSED`).
            +       *
            +       * Since part of the cost of running the service
            +       * is frequency of training - this can be used to determine when to train
            +       * engine in order to control cost. If not specified: the default value for
            +       * `CreateEngine` method is `TRAINING`. The default value for
            +       * `UpdateEngine` method is to keep the state the same as before.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig.TrainingState training_state = 4; + * + * + * @param value The enum numeric value on the wire for trainingState to set. + * @return This builder for chaining. + */ + public Builder setTrainingStateValue(int value) { + trainingState_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
            +       * The training state that the engine is in (e.g.
            +       * `TRAINING` or `PAUSED`).
            +       *
            +       * Since part of the cost of running the service
            +       * is frequency of training - this can be used to determine when to train
            +       * engine in order to control cost. If not specified: the default value for
            +       * `CreateEngine` method is `TRAINING`. The default value for
            +       * `UpdateEngine` method is to keep the state the same as before.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig.TrainingState training_state = 4; + * + * + * @return The trainingState. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .TrainingState + getTrainingState() { + com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig.TrainingState + result = + com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .TrainingState.forNumber(trainingState_); + return result == null + ? com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .TrainingState.UNRECOGNIZED + : result; + } + + /** + * + * + *
            +       * The training state that the engine is in (e.g.
            +       * `TRAINING` or `PAUSED`).
            +       *
            +       * Since part of the cost of running the service
            +       * is frequency of training - this can be used to determine when to train
            +       * engine in order to control cost. If not specified: the default value for
            +       * `CreateEngine` method is `TRAINING`. The default value for
            +       * `UpdateEngine` method is to keep the state the same as before.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig.TrainingState training_state = 4; + * + * + * @param value The trainingState to set. + * @return This builder for chaining. + */ + public Builder setTrainingState( + com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .TrainingState + value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000008; + trainingState_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
            +       * The training state that the engine is in (e.g.
            +       * `TRAINING` or `PAUSED`).
            +       *
            +       * Since part of the cost of running the service
            +       * is frequency of training - this can be used to determine when to train
            +       * engine in order to control cost. If not specified: the default value for
            +       * `CreateEngine` method is `TRAINING`. The default value for
            +       * `UpdateEngine` method is to keep the state the same as before.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig.TrainingState training_state = 4; + * + * + * @return This builder for chaining. + */ + public Builder clearTrainingState() { + bitField0_ = (bitField0_ & ~0x00000008); + trainingState_ = 0; + onChanged(); + return this; + } + + private com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .EngineFeaturesConfig + engineFeaturesConfig_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .EngineFeaturesConfig, + com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .EngineFeaturesConfig.Builder, + com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .EngineFeaturesConfigOrBuilder> + engineFeaturesConfigBuilder_; + + /** + * + * + *
            +       * Optional. Additional engine features config.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig.EngineFeaturesConfig engine_features_config = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the engineFeaturesConfig field is set. + */ + public boolean hasEngineFeaturesConfig() { + return ((bitField0_ & 0x00000010) != 0); + } + + /** + * + * + *
            +       * Optional. Additional engine features config.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig.EngineFeaturesConfig engine_features_config = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The engineFeaturesConfig. + */ + public com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .EngineFeaturesConfig + getEngineFeaturesConfig() { + if (engineFeaturesConfigBuilder_ == null) { + return engineFeaturesConfig_ == null + ? com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .EngineFeaturesConfig.getDefaultInstance() + : engineFeaturesConfig_; + } else { + return engineFeaturesConfigBuilder_.getMessage(); + } + } + + /** + * + * + *
            +       * Optional. Additional engine features config.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig.EngineFeaturesConfig engine_features_config = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setEngineFeaturesConfig( + com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .EngineFeaturesConfig + value) { + if (engineFeaturesConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + engineFeaturesConfig_ = value; + } else { + engineFeaturesConfigBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
            +       * Optional. Additional engine features config.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig.EngineFeaturesConfig engine_features_config = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setEngineFeaturesConfig( + com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .EngineFeaturesConfig.Builder + builderForValue) { + if (engineFeaturesConfigBuilder_ == null) { + engineFeaturesConfig_ = builderForValue.build(); + } else { + engineFeaturesConfigBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
            +       * Optional. Additional engine features config.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig.EngineFeaturesConfig engine_features_config = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeEngineFeaturesConfig( + com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .EngineFeaturesConfig + value) { + if (engineFeaturesConfigBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) + && engineFeaturesConfig_ != null + && engineFeaturesConfig_ + != com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .EngineFeaturesConfig.getDefaultInstance()) { + getEngineFeaturesConfigBuilder().mergeFrom(value); + } else { + engineFeaturesConfig_ = value; + } + } else { + engineFeaturesConfigBuilder_.mergeFrom(value); + } + if (engineFeaturesConfig_ != null) { + bitField0_ |= 0x00000010; + onChanged(); + } + return this; + } + + /** + * + * + *
            +       * Optional. Additional engine features config.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig.EngineFeaturesConfig engine_features_config = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearEngineFeaturesConfig() { + bitField0_ = (bitField0_ & ~0x00000010); + engineFeaturesConfig_ = null; + if (engineFeaturesConfigBuilder_ != null) { + engineFeaturesConfigBuilder_.dispose(); + engineFeaturesConfigBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
            +       * Optional. Additional engine features config.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig.EngineFeaturesConfig engine_features_config = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .EngineFeaturesConfig.Builder + getEngineFeaturesConfigBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return internalGetEngineFeaturesConfigFieldBuilder().getBuilder(); + } + + /** + * + * + *
            +       * Optional. Additional engine features config.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig.EngineFeaturesConfig engine_features_config = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .EngineFeaturesConfigOrBuilder + getEngineFeaturesConfigOrBuilder() { + if (engineFeaturesConfigBuilder_ != null) { + return engineFeaturesConfigBuilder_.getMessageOrBuilder(); + } else { + return engineFeaturesConfig_ == null + ? com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .EngineFeaturesConfig.getDefaultInstance() + : engineFeaturesConfig_; + } + } + + /** + * + * + *
            +       * Optional. Additional engine features config.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig.EngineFeaturesConfig engine_features_config = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .EngineFeaturesConfig, + com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .EngineFeaturesConfig.Builder, + com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .EngineFeaturesConfigOrBuilder> + internalGetEngineFeaturesConfigFieldBuilder() { + if (engineFeaturesConfigBuilder_ == null) { + engineFeaturesConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .EngineFeaturesConfig, + com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .EngineFeaturesConfig.Builder, + com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .EngineFeaturesConfigOrBuilder>( + getEngineFeaturesConfig(), getParentForChildren(), isClean()); + engineFeaturesConfig_ = null; + } + return engineFeaturesConfigBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig) + private static final com.google.cloud.discoveryengine.v1beta.Engine + .MediaRecommendationEngineConfig + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig(); + } + + public static com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public MediaRecommendationEngineConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface ChatEngineConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
            +     * The configurationt generate the Dialogflow agent that is associated to
            +     * this Engine.
            +     *
            +     * Note that these configurations are one-time consumed by
            +     * and passed to Dialogflow service. It means they cannot be retrieved using
            +     * [EngineService.GetEngine][google.cloud.discoveryengine.v1beta.EngineService.GetEngine]
            +     * or
            +     * [EngineService.ListEngines][google.cloud.discoveryengine.v1beta.EngineService.ListEngines]
            +     * API after engine creation.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig.AgentCreationConfig agent_creation_config = 1; + * + * + * @return Whether the agentCreationConfig field is set. + */ + boolean hasAgentCreationConfig(); + + /** + * + * + *
            +     * The configurationt generate the Dialogflow agent that is associated to
            +     * this Engine.
            +     *
            +     * Note that these configurations are one-time consumed by
            +     * and passed to Dialogflow service. It means they cannot be retrieved using
            +     * [EngineService.GetEngine][google.cloud.discoveryengine.v1beta.EngineService.GetEngine]
            +     * or
            +     * [EngineService.ListEngines][google.cloud.discoveryengine.v1beta.EngineService.ListEngines]
            +     * API after engine creation.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig.AgentCreationConfig agent_creation_config = 1; + * + * + * @return The agentCreationConfig. + */ + com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig.AgentCreationConfig + getAgentCreationConfig(); + + /** + * + * + *
            +     * The configurationt generate the Dialogflow agent that is associated to
            +     * this Engine.
            +     *
            +     * Note that these configurations are one-time consumed by
            +     * and passed to Dialogflow service. It means they cannot be retrieved using
            +     * [EngineService.GetEngine][google.cloud.discoveryengine.v1beta.EngineService.GetEngine]
            +     * or
            +     * [EngineService.ListEngines][google.cloud.discoveryengine.v1beta.EngineService.ListEngines]
            +     * API after engine creation.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig.AgentCreationConfig agent_creation_config = 1; + * + */ + com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig.AgentCreationConfigOrBuilder + getAgentCreationConfigOrBuilder(); + + /** + * + * + *
            +     * The resource name of an exist Dialogflow agent to link to this Chat
            +     * Engine. Customers can either provide `agent_creation_config` to create
            +     * agent or provide an agent name that links the agent with the Chat engine.
            +     *
            +     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
            +     * ID>`.
            +     *
            +     * Note that the `dialogflow_agent_to_link` are one-time consumed by and
            +     * passed to Dialogflow service. It means they cannot be retrieved using
            +     * [EngineService.GetEngine][google.cloud.discoveryengine.v1beta.EngineService.GetEngine]
            +     * or
            +     * [EngineService.ListEngines][google.cloud.discoveryengine.v1beta.EngineService.ListEngines]
            +     * API after engine creation. Use
            +     * [ChatEngineMetadata.dialogflow_agent][google.cloud.discoveryengine.v1beta.Engine.ChatEngineMetadata.dialogflow_agent]
            +     * for actual agent association after Engine is created.
            +     * 
            + * + * string dialogflow_agent_to_link = 2; + * + * @return The dialogflowAgentToLink. + */ + java.lang.String getDialogflowAgentToLink(); + + /** + * + * + *
            +     * The resource name of an exist Dialogflow agent to link to this Chat
            +     * Engine. Customers can either provide `agent_creation_config` to create
            +     * agent or provide an agent name that links the agent with the Chat engine.
            +     *
            +     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
            +     * ID>`.
            +     *
            +     * Note that the `dialogflow_agent_to_link` are one-time consumed by and
            +     * passed to Dialogflow service. It means they cannot be retrieved using
            +     * [EngineService.GetEngine][google.cloud.discoveryengine.v1beta.EngineService.GetEngine]
            +     * or
            +     * [EngineService.ListEngines][google.cloud.discoveryengine.v1beta.EngineService.ListEngines]
            +     * API after engine creation. Use
            +     * [ChatEngineMetadata.dialogflow_agent][google.cloud.discoveryengine.v1beta.Engine.ChatEngineMetadata.dialogflow_agent]
            +     * for actual agent association after Engine is created.
            +     * 
            + * + * string dialogflow_agent_to_link = 2; + * + * @return The bytes for dialogflowAgentToLink. + */ + com.google.protobuf.ByteString getDialogflowAgentToLinkBytes(); + + /** + * + * + *
            +     * Optional. If the flag set to true, we allow the agent and engine are in
            +     * different locations, otherwise the agent and engine are required to be in
            +     * the same location. The flag is set to false by default.
            +     *
            +     * Note that the `allow_cross_region` are one-time consumed by and
            +     * passed to
            +     * [EngineService.CreateEngine][google.cloud.discoveryengine.v1beta.EngineService.CreateEngine].
            +     * It means they cannot be retrieved using
            +     * [EngineService.GetEngine][google.cloud.discoveryengine.v1beta.EngineService.GetEngine]
            +     * or
            +     * [EngineService.ListEngines][google.cloud.discoveryengine.v1beta.EngineService.ListEngines]
            +     * API after engine creation.
            +     * 
            + * + * bool allow_cross_region = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The allowCrossRegion. + */ + boolean getAllowCrossRegion(); + } + + /** + * + * + *
            +   * Configurations for a Chat Engine.
            +   * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig} + */ + public static final class ChatEngineConfig extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig) + ChatEngineConfigOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ChatEngineConfig"); + } + + // Use ChatEngineConfig.newBuilder() to construct. + private ChatEngineConfig(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ChatEngineConfig() { + dialogflowAgentToLink_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.EngineProto + .internal_static_google_cloud_discoveryengine_v1beta_Engine_ChatEngineConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.EngineProto + .internal_static_google_cloud_discoveryengine_v1beta_Engine_ChatEngineConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig.class, + com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig.Builder.class); + } + + public interface AgentCreationConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig.AgentCreationConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
            +       * Name of the company, organization or other entity that the agent
            +       * represents. Used for knowledge connector LLM prompt and for knowledge
            +       * search.
            +       * 
            + * + * string business = 1; + * + * @return The business. + */ + java.lang.String getBusiness(); + + /** + * + * + *
            +       * Name of the company, organization or other entity that the agent
            +       * represents. Used for knowledge connector LLM prompt and for knowledge
            +       * search.
            +       * 
            + * + * string business = 1; + * + * @return The bytes for business. + */ + com.google.protobuf.ByteString getBusinessBytes(); + + /** + * + * + *
            +       * Required. The default language of the agent as a language tag.
            +       * See [Language
            +       * Support](https://cloud.google.com/dialogflow/docs/reference/language)
            +       * for a list of the currently supported language codes.
            +       * 
            + * + * string default_language_code = 2; + * + * @return The defaultLanguageCode. + */ + java.lang.String getDefaultLanguageCode(); + + /** + * + * + *
            +       * Required. The default language of the agent as a language tag.
            +       * See [Language
            +       * Support](https://cloud.google.com/dialogflow/docs/reference/language)
            +       * for a list of the currently supported language codes.
            +       * 
            + * + * string default_language_code = 2; + * + * @return The bytes for defaultLanguageCode. + */ + com.google.protobuf.ByteString getDefaultLanguageCodeBytes(); + + /** + * + * + *
            +       * Required. The time zone of the agent from the [time zone
            +       * database](https://www.iana.org/time-zones), e.g., America/New_York,
            +       * Europe/Paris.
            +       * 
            + * + * string time_zone = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The timeZone. + */ + java.lang.String getTimeZone(); + + /** + * + * + *
            +       * Required. The time zone of the agent from the [time zone
            +       * database](https://www.iana.org/time-zones), e.g., America/New_York,
            +       * Europe/Paris.
            +       * 
            + * + * string time_zone = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for timeZone. + */ + com.google.protobuf.ByteString getTimeZoneBytes(); + + /** + * + * + *
            +       * Agent location for Agent creation, supported values: global/us/eu.
            +       * If not provided, us Engine will create Agent using us-central-1 by
            +       * default; eu Engine will create Agent using eu-west-1 by default.
            +       * 
            + * + * string location = 4; + * + * @return The location. + */ + java.lang.String getLocation(); + + /** + * + * + *
            +       * Agent location for Agent creation, supported values: global/us/eu.
            +       * If not provided, us Engine will create Agent using us-central-1 by
            +       * default; eu Engine will create Agent using eu-west-1 by default.
            +       * 
            + * + * string location = 4; + * + * @return The bytes for location. + */ + com.google.protobuf.ByteString getLocationBytes(); + } + + /** + * + * + *
            +     * Configurations for generating a Dialogflow agent.
            +     *
            +     * Note that these configurations are one-time consumed by
            +     * and passed to Dialogflow service. It means they cannot be retrieved using
            +     * [EngineService.GetEngine][google.cloud.discoveryengine.v1beta.EngineService.GetEngine]
            +     * or
            +     * [EngineService.ListEngines][google.cloud.discoveryengine.v1beta.EngineService.ListEngines]
            +     * API after engine creation.
            +     * 
            + * + * Protobuf type {@code + * google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig.AgentCreationConfig} + */ + public static final class AgentCreationConfig extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig.AgentCreationConfig) + AgentCreationConfigOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "AgentCreationConfig"); + } + + // Use AgentCreationConfig.newBuilder() to construct. + private AgentCreationConfig(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private AgentCreationConfig() { + business_ = ""; + defaultLanguageCode_ = ""; + timeZone_ = ""; + location_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.EngineProto + .internal_static_google_cloud_discoveryengine_v1beta_Engine_ChatEngineConfig_AgentCreationConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.EngineProto + .internal_static_google_cloud_discoveryengine_v1beta_Engine_ChatEngineConfig_AgentCreationConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig.AgentCreationConfig + .class, + com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig.AgentCreationConfig + .Builder.class); + } + + public static final int BUSINESS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object business_ = ""; + + /** + * + * + *
            +       * Name of the company, organization or other entity that the agent
            +       * represents. Used for knowledge connector LLM prompt and for knowledge
            +       * search.
            +       * 
            + * + * string business = 1; + * + * @return The business. + */ + @java.lang.Override + public java.lang.String getBusiness() { + java.lang.Object ref = business_; + 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(); + business_ = s; + return s; + } + } + + /** + * + * + *
            +       * Name of the company, organization or other entity that the agent
            +       * represents. Used for knowledge connector LLM prompt and for knowledge
            +       * search.
            +       * 
            + * + * string business = 1; + * + * @return The bytes for business. + */ + @java.lang.Override + public com.google.protobuf.ByteString getBusinessBytes() { + java.lang.Object ref = business_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + business_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DEFAULT_LANGUAGE_CODE_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object defaultLanguageCode_ = ""; + + /** + * + * + *
            +       * Required. The default language of the agent as a language tag.
            +       * See [Language
            +       * Support](https://cloud.google.com/dialogflow/docs/reference/language)
            +       * for a list of the currently supported language codes.
            +       * 
            + * + * string default_language_code = 2; + * + * @return The defaultLanguageCode. + */ + @java.lang.Override + public java.lang.String getDefaultLanguageCode() { + java.lang.Object ref = defaultLanguageCode_; + 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(); + defaultLanguageCode_ = s; + return s; + } + } + + /** + * + * + *
            +       * Required. The default language of the agent as a language tag.
            +       * See [Language
            +       * Support](https://cloud.google.com/dialogflow/docs/reference/language)
            +       * for a list of the currently supported language codes.
            +       * 
            + * + * string default_language_code = 2; + * + * @return The bytes for defaultLanguageCode. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDefaultLanguageCodeBytes() { + java.lang.Object ref = defaultLanguageCode_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + defaultLanguageCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TIME_ZONE_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object timeZone_ = ""; + + /** + * + * + *
            +       * Required. The time zone of the agent from the [time zone
            +       * database](https://www.iana.org/time-zones), e.g., America/New_York,
            +       * Europe/Paris.
            +       * 
            + * + * string time_zone = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The timeZone. + */ + @java.lang.Override + public java.lang.String getTimeZone() { + java.lang.Object ref = timeZone_; + 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(); + timeZone_ = s; + return s; + } + } + + /** + * + * + *
            +       * Required. The time zone of the agent from the [time zone
            +       * database](https://www.iana.org/time-zones), e.g., America/New_York,
            +       * Europe/Paris.
            +       * 
            + * + * string time_zone = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for timeZone. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTimeZoneBytes() { + java.lang.Object ref = timeZone_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + timeZone_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LOCATION_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object location_ = ""; + + /** + * + * + *
            +       * Agent location for Agent creation, supported values: global/us/eu.
            +       * If not provided, us Engine will create Agent using us-central-1 by
            +       * default; eu Engine will create Agent using eu-west-1 by default.
            +       * 
            + * + * string location = 4; + * + * @return The location. + */ + @java.lang.Override + public java.lang.String getLocation() { + java.lang.Object ref = location_; + 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(); + location_ = s; + return s; + } + } + + /** + * + * + *
            +       * Agent location for Agent creation, supported values: global/us/eu.
            +       * If not provided, us Engine will create Agent using us-central-1 by
            +       * default; eu Engine will create Agent using eu-west-1 by default.
            +       * 
            + * + * string location = 4; + * + * @return The bytes for location. + */ + @java.lang.Override + public com.google.protobuf.ByteString getLocationBytes() { + java.lang.Object ref = location_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + location_ = 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 { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(business_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, business_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(defaultLanguageCode_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, defaultLanguageCode_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(timeZone_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, timeZone_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(location_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, location_); + } + 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(business_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, business_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(defaultLanguageCode_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, defaultLanguageCode_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(timeZone_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, timeZone_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(location_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, location_); + } + 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.discoveryengine.v1beta.Engine.ChatEngineConfig.AgentCreationConfig)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig.AgentCreationConfig other = + (com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig.AgentCreationConfig) + obj; + + if (!getBusiness().equals(other.getBusiness())) return false; + if (!getDefaultLanguageCode().equals(other.getDefaultLanguageCode())) return false; + if (!getTimeZone().equals(other.getTimeZone())) return false; + if (!getLocation().equals(other.getLocation())) 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) + BUSINESS_FIELD_NUMBER; + hash = (53 * hash) + getBusiness().hashCode(); + hash = (37 * hash) + DEFAULT_LANGUAGE_CODE_FIELD_NUMBER; + hash = (53 * hash) + getDefaultLanguageCode().hashCode(); + hash = (37 * hash) + TIME_ZONE_FIELD_NUMBER; + hash = (53 * hash) + getTimeZone().hashCode(); + hash = (37 * hash) + LOCATION_FIELD_NUMBER; + hash = (53 * hash) + getLocation().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig + .AgentCreationConfig + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig + .AgentCreationConfig + 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.discoveryengine.v1beta.Engine.ChatEngineConfig + .AgentCreationConfig + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig + .AgentCreationConfig + 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.discoveryengine.v1beta.Engine.ChatEngineConfig + .AgentCreationConfig + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig + .AgentCreationConfig + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig + .AgentCreationConfig + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig + .AgentCreationConfig + 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.discoveryengine.v1beta.Engine.ChatEngineConfig + .AgentCreationConfig + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig + .AgentCreationConfig + 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.discoveryengine.v1beta.Engine.ChatEngineConfig + .AgentCreationConfig + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig + .AgentCreationConfig + 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.discoveryengine.v1beta.Engine.ChatEngineConfig.AgentCreationConfig + 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; + } + + /** + * + * + *
            +       * Configurations for generating a Dialogflow agent.
            +       *
            +       * Note that these configurations are one-time consumed by
            +       * and passed to Dialogflow service. It means they cannot be retrieved using
            +       * [EngineService.GetEngine][google.cloud.discoveryengine.v1beta.EngineService.GetEngine]
            +       * or
            +       * [EngineService.ListEngines][google.cloud.discoveryengine.v1beta.EngineService.ListEngines]
            +       * API after engine creation.
            +       * 
            + * + * Protobuf type {@code + * google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig.AgentCreationConfig} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig.AgentCreationConfig) + com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig + .AgentCreationConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.EngineProto + .internal_static_google_cloud_discoveryengine_v1beta_Engine_ChatEngineConfig_AgentCreationConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.EngineProto + .internal_static_google_cloud_discoveryengine_v1beta_Engine_ChatEngineConfig_AgentCreationConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig + .AgentCreationConfig.class, + com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig + .AgentCreationConfig.Builder.class); + } + + // Construct using + // com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig.AgentCreationConfig.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + business_ = ""; + defaultLanguageCode_ = ""; + timeZone_ = ""; + location_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1beta.EngineProto + .internal_static_google_cloud_discoveryengine_v1beta_Engine_ChatEngineConfig_AgentCreationConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig.AgentCreationConfig + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig.AgentCreationConfig + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig.AgentCreationConfig + build() { + com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig.AgentCreationConfig + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig.AgentCreationConfig + buildPartial() { + com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig.AgentCreationConfig + result = + new com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig + .AgentCreationConfig(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig.AgentCreationConfig + result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.business_ = business_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.defaultLanguageCode_ = defaultLanguageCode_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.timeZone_ = timeZone_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.location_ = location_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig.AgentCreationConfig) { + return mergeFrom( + (com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig + .AgentCreationConfig) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig.AgentCreationConfig + other) { + if (other + == com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig.AgentCreationConfig + .getDefaultInstance()) return this; + if (!other.getBusiness().isEmpty()) { + business_ = other.business_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getDefaultLanguageCode().isEmpty()) { + defaultLanguageCode_ = other.defaultLanguageCode_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getTimeZone().isEmpty()) { + timeZone_ = other.timeZone_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getLocation().isEmpty()) { + location_ = other.location_; + bitField0_ |= 0x00000008; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + business_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + defaultLanguageCode_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + timeZone_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + location_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object business_ = ""; + + /** + * + * + *
            +         * Name of the company, organization or other entity that the agent
            +         * represents. Used for knowledge connector LLM prompt and for knowledge
            +         * search.
            +         * 
            + * + * string business = 1; + * + * @return The business. + */ + public java.lang.String getBusiness() { + java.lang.Object ref = business_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + business_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
            +         * Name of the company, organization or other entity that the agent
            +         * represents. Used for knowledge connector LLM prompt and for knowledge
            +         * search.
            +         * 
            + * + * string business = 1; + * + * @return The bytes for business. + */ + public com.google.protobuf.ByteString getBusinessBytes() { + java.lang.Object ref = business_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + business_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
            +         * Name of the company, organization or other entity that the agent
            +         * represents. Used for knowledge connector LLM prompt and for knowledge
            +         * search.
            +         * 
            + * + * string business = 1; + * + * @param value The business to set. + * @return This builder for chaining. + */ + public Builder setBusiness(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + business_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
            +         * Name of the company, organization or other entity that the agent
            +         * represents. Used for knowledge connector LLM prompt and for knowledge
            +         * search.
            +         * 
            + * + * string business = 1; + * + * @return This builder for chaining. + */ + public Builder clearBusiness() { + business_ = getDefaultInstance().getBusiness(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
            +         * Name of the company, organization or other entity that the agent
            +         * represents. Used for knowledge connector LLM prompt and for knowledge
            +         * search.
            +         * 
            + * + * string business = 1; + * + * @param value The bytes for business to set. + * @return This builder for chaining. + */ + public Builder setBusinessBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + business_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object defaultLanguageCode_ = ""; + + /** + * + * + *
            +         * Required. The default language of the agent as a language tag.
            +         * See [Language
            +         * Support](https://cloud.google.com/dialogflow/docs/reference/language)
            +         * for a list of the currently supported language codes.
            +         * 
            + * + * string default_language_code = 2; + * + * @return The defaultLanguageCode. + */ + public java.lang.String getDefaultLanguageCode() { + java.lang.Object ref = defaultLanguageCode_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + defaultLanguageCode_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
            +         * Required. The default language of the agent as a language tag.
            +         * See [Language
            +         * Support](https://cloud.google.com/dialogflow/docs/reference/language)
            +         * for a list of the currently supported language codes.
            +         * 
            + * + * string default_language_code = 2; + * + * @return The bytes for defaultLanguageCode. + */ + public com.google.protobuf.ByteString getDefaultLanguageCodeBytes() { + java.lang.Object ref = defaultLanguageCode_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + defaultLanguageCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
            +         * Required. The default language of the agent as a language tag.
            +         * See [Language
            +         * Support](https://cloud.google.com/dialogflow/docs/reference/language)
            +         * for a list of the currently supported language codes.
            +         * 
            + * + * string default_language_code = 2; + * + * @param value The defaultLanguageCode to set. + * @return This builder for chaining. + */ + public Builder setDefaultLanguageCode(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + defaultLanguageCode_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
            +         * Required. The default language of the agent as a language tag.
            +         * See [Language
            +         * Support](https://cloud.google.com/dialogflow/docs/reference/language)
            +         * for a list of the currently supported language codes.
            +         * 
            + * + * string default_language_code = 2; + * + * @return This builder for chaining. + */ + public Builder clearDefaultLanguageCode() { + defaultLanguageCode_ = getDefaultInstance().getDefaultLanguageCode(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
            +         * Required. The default language of the agent as a language tag.
            +         * See [Language
            +         * Support](https://cloud.google.com/dialogflow/docs/reference/language)
            +         * for a list of the currently supported language codes.
            +         * 
            + * + * string default_language_code = 2; + * + * @param value The bytes for defaultLanguageCode to set. + * @return This builder for chaining. + */ + public Builder setDefaultLanguageCodeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + defaultLanguageCode_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object timeZone_ = ""; + + /** + * + * + *
            +         * Required. The time zone of the agent from the [time zone
            +         * database](https://www.iana.org/time-zones), e.g., America/New_York,
            +         * Europe/Paris.
            +         * 
            + * + * string time_zone = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The timeZone. + */ + public java.lang.String getTimeZone() { + java.lang.Object ref = timeZone_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + timeZone_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
            +         * Required. The time zone of the agent from the [time zone
            +         * database](https://www.iana.org/time-zones), e.g., America/New_York,
            +         * Europe/Paris.
            +         * 
            + * + * string time_zone = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for timeZone. + */ + public com.google.protobuf.ByteString getTimeZoneBytes() { + java.lang.Object ref = timeZone_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + timeZone_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
            +         * Required. The time zone of the agent from the [time zone
            +         * database](https://www.iana.org/time-zones), e.g., America/New_York,
            +         * Europe/Paris.
            +         * 
            + * + * string time_zone = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The timeZone to set. + * @return This builder for chaining. + */ + public Builder setTimeZone(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + timeZone_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
            +         * Required. The time zone of the agent from the [time zone
            +         * database](https://www.iana.org/time-zones), e.g., America/New_York,
            +         * Europe/Paris.
            +         * 
            + * + * string time_zone = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearTimeZone() { + timeZone_ = getDefaultInstance().getTimeZone(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
            +         * Required. The time zone of the agent from the [time zone
            +         * database](https://www.iana.org/time-zones), e.g., America/New_York,
            +         * Europe/Paris.
            +         * 
            + * + * string time_zone = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for timeZone to set. + * @return This builder for chaining. + */ + public Builder setTimeZoneBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + timeZone_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object location_ = ""; + + /** + * + * + *
            +         * Agent location for Agent creation, supported values: global/us/eu.
            +         * If not provided, us Engine will create Agent using us-central-1 by
            +         * default; eu Engine will create Agent using eu-west-1 by default.
            +         * 
            + * + * string location = 4; + * + * @return The location. + */ + public java.lang.String getLocation() { + java.lang.Object ref = location_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + location_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
            +         * Agent location for Agent creation, supported values: global/us/eu.
            +         * If not provided, us Engine will create Agent using us-central-1 by
            +         * default; eu Engine will create Agent using eu-west-1 by default.
            +         * 
            + * + * string location = 4; + * + * @return The bytes for location. + */ + public com.google.protobuf.ByteString getLocationBytes() { + java.lang.Object ref = location_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + location_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
            +         * Agent location for Agent creation, supported values: global/us/eu.
            +         * If not provided, us Engine will create Agent using us-central-1 by
            +         * default; eu Engine will create Agent using eu-west-1 by default.
            +         * 
            + * + * string location = 4; + * + * @param value The location to set. + * @return This builder for chaining. + */ + public Builder setLocation(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + location_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
            +         * Agent location for Agent creation, supported values: global/us/eu.
            +         * If not provided, us Engine will create Agent using us-central-1 by
            +         * default; eu Engine will create Agent using eu-west-1 by default.
            +         * 
            + * + * string location = 4; + * + * @return This builder for chaining. + */ + public Builder clearLocation() { + location_ = getDefaultInstance().getLocation(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + + /** + * + * + *
            +         * Agent location for Agent creation, supported values: global/us/eu.
            +         * If not provided, us Engine will create Agent using us-central-1 by
            +         * default; eu Engine will create Agent using eu-west-1 by default.
            +         * 
            + * + * string location = 4; + * + * @param value The bytes for location to set. + * @return This builder for chaining. + */ + public Builder setLocationBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + location_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig.AgentCreationConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig.AgentCreationConfig) + private static final com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig + .AgentCreationConfig + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig + .AgentCreationConfig(); + } + + public static com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig + .AgentCreationConfig + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AgentCreationConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig.AgentCreationConfig + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int bitField0_; + public static final int AGENT_CREATION_CONFIG_FIELD_NUMBER = 1; + private com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig.AgentCreationConfig + agentCreationConfig_; + + /** + * + * + *
            +     * The configurationt generate the Dialogflow agent that is associated to
            +     * this Engine.
            +     *
            +     * Note that these configurations are one-time consumed by
            +     * and passed to Dialogflow service. It means they cannot be retrieved using
            +     * [EngineService.GetEngine][google.cloud.discoveryengine.v1beta.EngineService.GetEngine]
            +     * or
            +     * [EngineService.ListEngines][google.cloud.discoveryengine.v1beta.EngineService.ListEngines]
            +     * API after engine creation.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig.AgentCreationConfig agent_creation_config = 1; + * + * + * @return Whether the agentCreationConfig field is set. + */ + @java.lang.Override + public boolean hasAgentCreationConfig() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
            +     * The configurationt generate the Dialogflow agent that is associated to
            +     * this Engine.
            +     *
            +     * Note that these configurations are one-time consumed by
            +     * and passed to Dialogflow service. It means they cannot be retrieved using
            +     * [EngineService.GetEngine][google.cloud.discoveryengine.v1beta.EngineService.GetEngine]
            +     * or
            +     * [EngineService.ListEngines][google.cloud.discoveryengine.v1beta.EngineService.ListEngines]
            +     * API after engine creation.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig.AgentCreationConfig agent_creation_config = 1; + * + * + * @return The agentCreationConfig. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig.AgentCreationConfig + getAgentCreationConfig() { + return agentCreationConfig_ == null + ? com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig.AgentCreationConfig + .getDefaultInstance() + : agentCreationConfig_; + } + + /** + * + * + *
            +     * The configurationt generate the Dialogflow agent that is associated to
            +     * this Engine.
            +     *
            +     * Note that these configurations are one-time consumed by
            +     * and passed to Dialogflow service. It means they cannot be retrieved using
            +     * [EngineService.GetEngine][google.cloud.discoveryengine.v1beta.EngineService.GetEngine]
            +     * or
            +     * [EngineService.ListEngines][google.cloud.discoveryengine.v1beta.EngineService.ListEngines]
            +     * API after engine creation.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig.AgentCreationConfig agent_creation_config = 1; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig + .AgentCreationConfigOrBuilder + getAgentCreationConfigOrBuilder() { + return agentCreationConfig_ == null + ? com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig.AgentCreationConfig + .getDefaultInstance() + : agentCreationConfig_; + } + + public static final int DIALOGFLOW_AGENT_TO_LINK_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object dialogflowAgentToLink_ = ""; + + /** + * + * + *
            +     * The resource name of an exist Dialogflow agent to link to this Chat
            +     * Engine. Customers can either provide `agent_creation_config` to create
            +     * agent or provide an agent name that links the agent with the Chat engine.
            +     *
            +     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
            +     * ID>`.
            +     *
            +     * Note that the `dialogflow_agent_to_link` are one-time consumed by and
            +     * passed to Dialogflow service. It means they cannot be retrieved using
            +     * [EngineService.GetEngine][google.cloud.discoveryengine.v1beta.EngineService.GetEngine]
            +     * or
            +     * [EngineService.ListEngines][google.cloud.discoveryengine.v1beta.EngineService.ListEngines]
            +     * API after engine creation. Use
            +     * [ChatEngineMetadata.dialogflow_agent][google.cloud.discoveryengine.v1beta.Engine.ChatEngineMetadata.dialogflow_agent]
            +     * for actual agent association after Engine is created.
            +     * 
            + * + * string dialogflow_agent_to_link = 2; + * + * @return The dialogflowAgentToLink. + */ + @java.lang.Override + public java.lang.String getDialogflowAgentToLink() { + java.lang.Object ref = dialogflowAgentToLink_; + 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(); + dialogflowAgentToLink_ = s; + return s; + } + } + + /** + * + * + *
            +     * The resource name of an exist Dialogflow agent to link to this Chat
            +     * Engine. Customers can either provide `agent_creation_config` to create
            +     * agent or provide an agent name that links the agent with the Chat engine.
            +     *
            +     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
            +     * ID>`.
            +     *
            +     * Note that the `dialogflow_agent_to_link` are one-time consumed by and
            +     * passed to Dialogflow service. It means they cannot be retrieved using
            +     * [EngineService.GetEngine][google.cloud.discoveryengine.v1beta.EngineService.GetEngine]
            +     * or
            +     * [EngineService.ListEngines][google.cloud.discoveryengine.v1beta.EngineService.ListEngines]
            +     * API after engine creation. Use
            +     * [ChatEngineMetadata.dialogflow_agent][google.cloud.discoveryengine.v1beta.Engine.ChatEngineMetadata.dialogflow_agent]
            +     * for actual agent association after Engine is created.
            +     * 
            + * + * string dialogflow_agent_to_link = 2; + * + * @return The bytes for dialogflowAgentToLink. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDialogflowAgentToLinkBytes() { + java.lang.Object ref = dialogflowAgentToLink_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + dialogflowAgentToLink_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ALLOW_CROSS_REGION_FIELD_NUMBER = 3; + private boolean allowCrossRegion_ = false; + + /** + * + * + *
            +     * Optional. If the flag set to true, we allow the agent and engine are in
            +     * different locations, otherwise the agent and engine are required to be in
            +     * the same location. The flag is set to false by default.
            +     *
            +     * Note that the `allow_cross_region` are one-time consumed by and
            +     * passed to
            +     * [EngineService.CreateEngine][google.cloud.discoveryengine.v1beta.EngineService.CreateEngine].
            +     * It means they cannot be retrieved using
            +     * [EngineService.GetEngine][google.cloud.discoveryengine.v1beta.EngineService.GetEngine]
            +     * or
            +     * [EngineService.ListEngines][google.cloud.discoveryengine.v1beta.EngineService.ListEngines]
            +     * API after engine creation.
            +     * 
            + * + * bool allow_cross_region = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The allowCrossRegion. + */ + @java.lang.Override + public boolean getAllowCrossRegion() { + return allowCrossRegion_; + } + + 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, getAgentCreationConfig()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(dialogflowAgentToLink_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, dialogflowAgentToLink_); + } + if (allowCrossRegion_ != false) { + output.writeBool(3, allowCrossRegion_); + } + 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, getAgentCreationConfig()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(dialogflowAgentToLink_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, dialogflowAgentToLink_); + } + if (allowCrossRegion_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, allowCrossRegion_); + } + 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.discoveryengine.v1beta.Engine.ChatEngineConfig)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig other = + (com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig) obj; + + if (hasAgentCreationConfig() != other.hasAgentCreationConfig()) return false; + if (hasAgentCreationConfig()) { + if (!getAgentCreationConfig().equals(other.getAgentCreationConfig())) return false; + } + if (!getDialogflowAgentToLink().equals(other.getDialogflowAgentToLink())) return false; + if (getAllowCrossRegion() != other.getAllowCrossRegion()) 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 (hasAgentCreationConfig()) { + hash = (37 * hash) + AGENT_CREATION_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getAgentCreationConfig().hashCode(); + } + hash = (37 * hash) + DIALOGFLOW_AGENT_TO_LINK_FIELD_NUMBER; + hash = (53 * hash) + getDialogflowAgentToLink().hashCode(); + hash = (37 * hash) + ALLOW_CROSS_REGION_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getAllowCrossRegion()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig 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.discoveryengine.v1beta.Engine.ChatEngineConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig 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.discoveryengine.v1beta.Engine.ChatEngineConfig parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig 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.discoveryengine.v1beta.Engine.ChatEngineConfig + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig + 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.discoveryengine.v1beta.Engine.ChatEngineConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig 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.discoveryengine.v1beta.Engine.ChatEngineConfig 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; + } + + /** + * + * + *
            +     * Configurations for a Chat Engine.
            +     * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig) + com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.EngineProto + .internal_static_google_cloud_discoveryengine_v1beta_Engine_ChatEngineConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.EngineProto + .internal_static_google_cloud_discoveryengine_v1beta_Engine_ChatEngineConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig.class, + com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig.Builder.class); + } + + // Construct using + // com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetAgentCreationConfigFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + agentCreationConfig_ = null; + if (agentCreationConfigBuilder_ != null) { + agentCreationConfigBuilder_.dispose(); + agentCreationConfigBuilder_ = null; + } + dialogflowAgentToLink_ = ""; + allowCrossRegion_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1beta.EngineProto + .internal_static_google_cloud_discoveryengine_v1beta_Engine_ChatEngineConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig build() { + com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig buildPartial() { + com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig result = + new com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.agentCreationConfig_ = + agentCreationConfigBuilder_ == null + ? agentCreationConfig_ + : agentCreationConfigBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.dialogflowAgentToLink_ = dialogflowAgentToLink_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.allowCrossRegion_ = allowCrossRegion_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig) { + return mergeFrom((com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig other) { + if (other + == com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig.getDefaultInstance()) + return this; + if (other.hasAgentCreationConfig()) { + mergeAgentCreationConfig(other.getAgentCreationConfig()); + } + if (!other.getDialogflowAgentToLink().isEmpty()) { + dialogflowAgentToLink_ = other.dialogflowAgentToLink_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.getAllowCrossRegion() != false) { + setAllowCrossRegion(other.getAllowCrossRegion()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage( + internalGetAgentCreationConfigFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + dialogflowAgentToLink_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: + { + allowCrossRegion_ = input.readBool(); + bitField0_ |= 0x00000004; + break; + } // case 24 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig.AgentCreationConfig + agentCreationConfig_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig.AgentCreationConfig, + com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig.AgentCreationConfig + .Builder, + com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig + .AgentCreationConfigOrBuilder> + agentCreationConfigBuilder_; + + /** + * + * + *
            +       * The configurationt generate the Dialogflow agent that is associated to
            +       * this Engine.
            +       *
            +       * Note that these configurations are one-time consumed by
            +       * and passed to Dialogflow service. It means they cannot be retrieved using
            +       * [EngineService.GetEngine][google.cloud.discoveryengine.v1beta.EngineService.GetEngine]
            +       * or
            +       * [EngineService.ListEngines][google.cloud.discoveryengine.v1beta.EngineService.ListEngines]
            +       * API after engine creation.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig.AgentCreationConfig agent_creation_config = 1; + * + * + * @return Whether the agentCreationConfig field is set. + */ + public boolean hasAgentCreationConfig() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
            +       * The configurationt generate the Dialogflow agent that is associated to
            +       * this Engine.
            +       *
            +       * Note that these configurations are one-time consumed by
            +       * and passed to Dialogflow service. It means they cannot be retrieved using
            +       * [EngineService.GetEngine][google.cloud.discoveryengine.v1beta.EngineService.GetEngine]
            +       * or
            +       * [EngineService.ListEngines][google.cloud.discoveryengine.v1beta.EngineService.ListEngines]
            +       * API after engine creation.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig.AgentCreationConfig agent_creation_config = 1; + * + * + * @return The agentCreationConfig. + */ + public com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig.AgentCreationConfig + getAgentCreationConfig() { + if (agentCreationConfigBuilder_ == null) { + return agentCreationConfig_ == null + ? com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig.AgentCreationConfig + .getDefaultInstance() + : agentCreationConfig_; + } else { + return agentCreationConfigBuilder_.getMessage(); + } + } + + /** + * + * + *
            +       * The configurationt generate the Dialogflow agent that is associated to
            +       * this Engine.
            +       *
            +       * Note that these configurations are one-time consumed by
            +       * and passed to Dialogflow service. It means they cannot be retrieved using
            +       * [EngineService.GetEngine][google.cloud.discoveryengine.v1beta.EngineService.GetEngine]
            +       * or
            +       * [EngineService.ListEngines][google.cloud.discoveryengine.v1beta.EngineService.ListEngines]
            +       * API after engine creation.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig.AgentCreationConfig agent_creation_config = 1; + * + */ + public Builder setAgentCreationConfig( + com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig.AgentCreationConfig + value) { + if (agentCreationConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + agentCreationConfig_ = value; + } else { + agentCreationConfigBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
            +       * The configurationt generate the Dialogflow agent that is associated to
            +       * this Engine.
            +       *
            +       * Note that these configurations are one-time consumed by
            +       * and passed to Dialogflow service. It means they cannot be retrieved using
            +       * [EngineService.GetEngine][google.cloud.discoveryengine.v1beta.EngineService.GetEngine]
            +       * or
            +       * [EngineService.ListEngines][google.cloud.discoveryengine.v1beta.EngineService.ListEngines]
            +       * API after engine creation.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig.AgentCreationConfig agent_creation_config = 1; + * + */ + public Builder setAgentCreationConfig( + com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig.AgentCreationConfig + .Builder + builderForValue) { + if (agentCreationConfigBuilder_ == null) { + agentCreationConfig_ = builderForValue.build(); + } else { + agentCreationConfigBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
            +       * The configurationt generate the Dialogflow agent that is associated to
            +       * this Engine.
            +       *
            +       * Note that these configurations are one-time consumed by
            +       * and passed to Dialogflow service. It means they cannot be retrieved using
            +       * [EngineService.GetEngine][google.cloud.discoveryengine.v1beta.EngineService.GetEngine]
            +       * or
            +       * [EngineService.ListEngines][google.cloud.discoveryengine.v1beta.EngineService.ListEngines]
            +       * API after engine creation.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig.AgentCreationConfig agent_creation_config = 1; + * + */ + public Builder mergeAgentCreationConfig( + com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig.AgentCreationConfig + value) { + if (agentCreationConfigBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && agentCreationConfig_ != null + && agentCreationConfig_ + != com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig + .AgentCreationConfig.getDefaultInstance()) { + getAgentCreationConfigBuilder().mergeFrom(value); + } else { + agentCreationConfig_ = value; + } + } else { + agentCreationConfigBuilder_.mergeFrom(value); + } + if (agentCreationConfig_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + + /** + * + * + *
            +       * The configurationt generate the Dialogflow agent that is associated to
            +       * this Engine.
            +       *
            +       * Note that these configurations are one-time consumed by
            +       * and passed to Dialogflow service. It means they cannot be retrieved using
            +       * [EngineService.GetEngine][google.cloud.discoveryengine.v1beta.EngineService.GetEngine]
            +       * or
            +       * [EngineService.ListEngines][google.cloud.discoveryengine.v1beta.EngineService.ListEngines]
            +       * API after engine creation.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig.AgentCreationConfig agent_creation_config = 1; + * + */ + public Builder clearAgentCreationConfig() { + bitField0_ = (bitField0_ & ~0x00000001); + agentCreationConfig_ = null; + if (agentCreationConfigBuilder_ != null) { + agentCreationConfigBuilder_.dispose(); + agentCreationConfigBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
            +       * The configurationt generate the Dialogflow agent that is associated to
            +       * this Engine.
            +       *
            +       * Note that these configurations are one-time consumed by
            +       * and passed to Dialogflow service. It means they cannot be retrieved using
            +       * [EngineService.GetEngine][google.cloud.discoveryengine.v1beta.EngineService.GetEngine]
            +       * or
            +       * [EngineService.ListEngines][google.cloud.discoveryengine.v1beta.EngineService.ListEngines]
            +       * API after engine creation.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig.AgentCreationConfig agent_creation_config = 1; + * + */ + public com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig.AgentCreationConfig + .Builder + getAgentCreationConfigBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return internalGetAgentCreationConfigFieldBuilder().getBuilder(); + } + + /** + * + * + *
            +       * The configurationt generate the Dialogflow agent that is associated to
            +       * this Engine.
            +       *
            +       * Note that these configurations are one-time consumed by
            +       * and passed to Dialogflow service. It means they cannot be retrieved using
            +       * [EngineService.GetEngine][google.cloud.discoveryengine.v1beta.EngineService.GetEngine]
            +       * or
            +       * [EngineService.ListEngines][google.cloud.discoveryengine.v1beta.EngineService.ListEngines]
            +       * API after engine creation.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig.AgentCreationConfig agent_creation_config = 1; + * + */ + public com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig + .AgentCreationConfigOrBuilder + getAgentCreationConfigOrBuilder() { + if (agentCreationConfigBuilder_ != null) { + return agentCreationConfigBuilder_.getMessageOrBuilder(); + } else { + return agentCreationConfig_ == null + ? com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig.AgentCreationConfig + .getDefaultInstance() + : agentCreationConfig_; + } + } + + /** + * + * + *
            +       * The configurationt generate the Dialogflow agent that is associated to
            +       * this Engine.
            +       *
            +       * Note that these configurations are one-time consumed by
            +       * and passed to Dialogflow service. It means they cannot be retrieved using
            +       * [EngineService.GetEngine][google.cloud.discoveryengine.v1beta.EngineService.GetEngine]
            +       * or
            +       * [EngineService.ListEngines][google.cloud.discoveryengine.v1beta.EngineService.ListEngines]
            +       * API after engine creation.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig.AgentCreationConfig agent_creation_config = 1; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig.AgentCreationConfig, + com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig.AgentCreationConfig + .Builder, + com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig + .AgentCreationConfigOrBuilder> + internalGetAgentCreationConfigFieldBuilder() { + if (agentCreationConfigBuilder_ == null) { + agentCreationConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig + .AgentCreationConfig, + com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig + .AgentCreationConfig.Builder, + com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig + .AgentCreationConfigOrBuilder>( + getAgentCreationConfig(), getParentForChildren(), isClean()); + agentCreationConfig_ = null; + } + return agentCreationConfigBuilder_; + } + + private java.lang.Object dialogflowAgentToLink_ = ""; + + /** + * + * + *
            +       * The resource name of an exist Dialogflow agent to link to this Chat
            +       * Engine. Customers can either provide `agent_creation_config` to create
            +       * agent or provide an agent name that links the agent with the Chat engine.
            +       *
            +       * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
            +       * ID>`.
            +       *
            +       * Note that the `dialogflow_agent_to_link` are one-time consumed by and
            +       * passed to Dialogflow service. It means they cannot be retrieved using
            +       * [EngineService.GetEngine][google.cloud.discoveryengine.v1beta.EngineService.GetEngine]
            +       * or
            +       * [EngineService.ListEngines][google.cloud.discoveryengine.v1beta.EngineService.ListEngines]
            +       * API after engine creation. Use
            +       * [ChatEngineMetadata.dialogflow_agent][google.cloud.discoveryengine.v1beta.Engine.ChatEngineMetadata.dialogflow_agent]
            +       * for actual agent association after Engine is created.
            +       * 
            + * + * string dialogflow_agent_to_link = 2; + * + * @return The dialogflowAgentToLink. + */ + public java.lang.String getDialogflowAgentToLink() { + java.lang.Object ref = dialogflowAgentToLink_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + dialogflowAgentToLink_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
            +       * The resource name of an exist Dialogflow agent to link to this Chat
            +       * Engine. Customers can either provide `agent_creation_config` to create
            +       * agent or provide an agent name that links the agent with the Chat engine.
            +       *
            +       * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
            +       * ID>`.
            +       *
            +       * Note that the `dialogflow_agent_to_link` are one-time consumed by and
            +       * passed to Dialogflow service. It means they cannot be retrieved using
            +       * [EngineService.GetEngine][google.cloud.discoveryengine.v1beta.EngineService.GetEngine]
            +       * or
            +       * [EngineService.ListEngines][google.cloud.discoveryengine.v1beta.EngineService.ListEngines]
            +       * API after engine creation. Use
            +       * [ChatEngineMetadata.dialogflow_agent][google.cloud.discoveryengine.v1beta.Engine.ChatEngineMetadata.dialogflow_agent]
            +       * for actual agent association after Engine is created.
            +       * 
            + * + * string dialogflow_agent_to_link = 2; + * + * @return The bytes for dialogflowAgentToLink. + */ + public com.google.protobuf.ByteString getDialogflowAgentToLinkBytes() { + java.lang.Object ref = dialogflowAgentToLink_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + dialogflowAgentToLink_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
            +       * The resource name of an exist Dialogflow agent to link to this Chat
            +       * Engine. Customers can either provide `agent_creation_config` to create
            +       * agent or provide an agent name that links the agent with the Chat engine.
            +       *
            +       * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
            +       * ID>`.
            +       *
            +       * Note that the `dialogflow_agent_to_link` are one-time consumed by and
            +       * passed to Dialogflow service. It means they cannot be retrieved using
            +       * [EngineService.GetEngine][google.cloud.discoveryengine.v1beta.EngineService.GetEngine]
            +       * or
            +       * [EngineService.ListEngines][google.cloud.discoveryengine.v1beta.EngineService.ListEngines]
            +       * API after engine creation. Use
            +       * [ChatEngineMetadata.dialogflow_agent][google.cloud.discoveryengine.v1beta.Engine.ChatEngineMetadata.dialogflow_agent]
            +       * for actual agent association after Engine is created.
            +       * 
            + * + * string dialogflow_agent_to_link = 2; + * + * @param value The dialogflowAgentToLink to set. + * @return This builder for chaining. + */ + public Builder setDialogflowAgentToLink(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + dialogflowAgentToLink_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
            +       * The resource name of an exist Dialogflow agent to link to this Chat
            +       * Engine. Customers can either provide `agent_creation_config` to create
            +       * agent or provide an agent name that links the agent with the Chat engine.
            +       *
            +       * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
            +       * ID>`.
            +       *
            +       * Note that the `dialogflow_agent_to_link` are one-time consumed by and
            +       * passed to Dialogflow service. It means they cannot be retrieved using
            +       * [EngineService.GetEngine][google.cloud.discoveryengine.v1beta.EngineService.GetEngine]
            +       * or
            +       * [EngineService.ListEngines][google.cloud.discoveryengine.v1beta.EngineService.ListEngines]
            +       * API after engine creation. Use
            +       * [ChatEngineMetadata.dialogflow_agent][google.cloud.discoveryengine.v1beta.Engine.ChatEngineMetadata.dialogflow_agent]
            +       * for actual agent association after Engine is created.
            +       * 
            + * + * string dialogflow_agent_to_link = 2; + * + * @return This builder for chaining. + */ + public Builder clearDialogflowAgentToLink() { + dialogflowAgentToLink_ = getDefaultInstance().getDialogflowAgentToLink(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
            +       * The resource name of an exist Dialogflow agent to link to this Chat
            +       * Engine. Customers can either provide `agent_creation_config` to create
            +       * agent or provide an agent name that links the agent with the Chat engine.
            +       *
            +       * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
            +       * ID>`.
            +       *
            +       * Note that the `dialogflow_agent_to_link` are one-time consumed by and
            +       * passed to Dialogflow service. It means they cannot be retrieved using
            +       * [EngineService.GetEngine][google.cloud.discoveryengine.v1beta.EngineService.GetEngine]
            +       * or
            +       * [EngineService.ListEngines][google.cloud.discoveryengine.v1beta.EngineService.ListEngines]
            +       * API after engine creation. Use
            +       * [ChatEngineMetadata.dialogflow_agent][google.cloud.discoveryengine.v1beta.Engine.ChatEngineMetadata.dialogflow_agent]
            +       * for actual agent association after Engine is created.
            +       * 
            + * + * string dialogflow_agent_to_link = 2; + * + * @param value The bytes for dialogflowAgentToLink to set. + * @return This builder for chaining. + */ + public Builder setDialogflowAgentToLinkBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + dialogflowAgentToLink_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private boolean allowCrossRegion_; + + /** + * + * + *
            +       * Optional. If the flag set to true, we allow the agent and engine are in
            +       * different locations, otherwise the agent and engine are required to be in
            +       * the same location. The flag is set to false by default.
            +       *
            +       * Note that the `allow_cross_region` are one-time consumed by and
            +       * passed to
            +       * [EngineService.CreateEngine][google.cloud.discoveryengine.v1beta.EngineService.CreateEngine].
            +       * It means they cannot be retrieved using
            +       * [EngineService.GetEngine][google.cloud.discoveryengine.v1beta.EngineService.GetEngine]
            +       * or
            +       * [EngineService.ListEngines][google.cloud.discoveryengine.v1beta.EngineService.ListEngines]
            +       * API after engine creation.
            +       * 
            + * + * bool allow_cross_region = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The allowCrossRegion. + */ + @java.lang.Override + public boolean getAllowCrossRegion() { + return allowCrossRegion_; + } + + /** + * + * + *
            +       * Optional. If the flag set to true, we allow the agent and engine are in
            +       * different locations, otherwise the agent and engine are required to be in
            +       * the same location. The flag is set to false by default.
            +       *
            +       * Note that the `allow_cross_region` are one-time consumed by and
            +       * passed to
            +       * [EngineService.CreateEngine][google.cloud.discoveryengine.v1beta.EngineService.CreateEngine].
            +       * It means they cannot be retrieved using
            +       * [EngineService.GetEngine][google.cloud.discoveryengine.v1beta.EngineService.GetEngine]
            +       * or
            +       * [EngineService.ListEngines][google.cloud.discoveryengine.v1beta.EngineService.ListEngines]
            +       * API after engine creation.
            +       * 
            + * + * bool allow_cross_region = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The allowCrossRegion to set. + * @return This builder for chaining. + */ + public Builder setAllowCrossRegion(boolean value) { + + allowCrossRegion_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
            +       * Optional. If the flag set to true, we allow the agent and engine are in
            +       * different locations, otherwise the agent and engine are required to be in
            +       * the same location. The flag is set to false by default.
            +       *
            +       * Note that the `allow_cross_region` are one-time consumed by and
            +       * passed to
            +       * [EngineService.CreateEngine][google.cloud.discoveryengine.v1beta.EngineService.CreateEngine].
            +       * It means they cannot be retrieved using
            +       * [EngineService.GetEngine][google.cloud.discoveryengine.v1beta.EngineService.GetEngine]
            +       * or
            +       * [EngineService.ListEngines][google.cloud.discoveryengine.v1beta.EngineService.ListEngines]
            +       * API after engine creation.
            +       * 
            + * + * bool allow_cross_region = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearAllowCrossRegion() { + bitField0_ = (bitField0_ & ~0x00000004); + allowCrossRegion_ = false; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig) + private static final com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig(); + } + + public static com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ChatEngineConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface CommonConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.Engine.CommonConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
            +     * The name of the company, business or entity that is associated with the
            +     * engine. Setting this may help improve LLM related features.
            +     * 
            + * + * string company_name = 1; + * + * @return The companyName. + */ + java.lang.String getCompanyName(); + + /** + * + * + *
            +     * The name of the company, business or entity that is associated with the
            +     * engine. Setting this may help improve LLM related features.
            +     * 
            + * + * string company_name = 1; + * + * @return The bytes for companyName. + */ + com.google.protobuf.ByteString getCompanyNameBytes(); + } + + /** + * + * + *
            +   * Common configurations for an Engine.
            +   * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.Engine.CommonConfig} + */ + public static final class CommonConfig extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.Engine.CommonConfig) + CommonConfigOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "CommonConfig"); + } + + // Use CommonConfig.newBuilder() to construct. + private CommonConfig(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private CommonConfig() { + companyName_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.EngineProto + .internal_static_google_cloud_discoveryengine_v1beta_Engine_CommonConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.EngineProto + .internal_static_google_cloud_discoveryengine_v1beta_Engine_CommonConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.Engine.CommonConfig.class, + com.google.cloud.discoveryengine.v1beta.Engine.CommonConfig.Builder.class); + } + + public static final int COMPANY_NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object companyName_ = ""; + + /** + * + * + *
            +     * The name of the company, business or entity that is associated with the
            +     * engine. Setting this may help improve LLM related features.
            +     * 
            + * + * string company_name = 1; + * + * @return The companyName. + */ + @java.lang.Override + public java.lang.String getCompanyName() { + java.lang.Object ref = companyName_; + 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(); + companyName_ = s; + return s; + } + } + + /** + * + * + *
            +     * The name of the company, business or entity that is associated with the
            +     * engine. Setting this may help improve LLM related features.
            +     * 
            + * + * string company_name = 1; + * + * @return The bytes for companyName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getCompanyNameBytes() { + java.lang.Object ref = companyName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + companyName_ = 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 { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(companyName_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, companyName_); + } + 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(companyName_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, companyName_); + } + 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.discoveryengine.v1beta.Engine.CommonConfig)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1beta.Engine.CommonConfig other = + (com.google.cloud.discoveryengine.v1beta.Engine.CommonConfig) obj; + + if (!getCompanyName().equals(other.getCompanyName())) 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) + COMPANY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getCompanyName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1beta.Engine.CommonConfig parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.Engine.CommonConfig 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.discoveryengine.v1beta.Engine.CommonConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.Engine.CommonConfig 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.discoveryengine.v1beta.Engine.CommonConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.Engine.CommonConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1beta.Engine.CommonConfig parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.Engine.CommonConfig 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.discoveryengine.v1beta.Engine.CommonConfig parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.Engine.CommonConfig 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.discoveryengine.v1beta.Engine.CommonConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.Engine.CommonConfig 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.discoveryengine.v1beta.Engine.CommonConfig 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; + } + + /** + * + * + *
            +     * Common configurations for an Engine.
            +     * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.Engine.CommonConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.Engine.CommonConfig) + com.google.cloud.discoveryengine.v1beta.Engine.CommonConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.EngineProto + .internal_static_google_cloud_discoveryengine_v1beta_Engine_CommonConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.EngineProto + .internal_static_google_cloud_discoveryengine_v1beta_Engine_CommonConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.Engine.CommonConfig.class, + com.google.cloud.discoveryengine.v1beta.Engine.CommonConfig.Builder.class); + } + + // Construct using com.google.cloud.discoveryengine.v1beta.Engine.CommonConfig.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + companyName_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1beta.EngineProto + .internal_static_google_cloud_discoveryengine_v1beta_Engine_CommonConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Engine.CommonConfig + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1beta.Engine.CommonConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Engine.CommonConfig build() { + com.google.cloud.discoveryengine.v1beta.Engine.CommonConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Engine.CommonConfig buildPartial() { + com.google.cloud.discoveryengine.v1beta.Engine.CommonConfig result = + new com.google.cloud.discoveryengine.v1beta.Engine.CommonConfig(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.discoveryengine.v1beta.Engine.CommonConfig result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.companyName_ = companyName_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.discoveryengine.v1beta.Engine.CommonConfig) { + return mergeFrom((com.google.cloud.discoveryengine.v1beta.Engine.CommonConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.discoveryengine.v1beta.Engine.CommonConfig other) { + if (other + == com.google.cloud.discoveryengine.v1beta.Engine.CommonConfig.getDefaultInstance()) + return this; + if (!other.getCompanyName().isEmpty()) { + companyName_ = other.companyName_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + companyName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object companyName_ = ""; + + /** + * + * + *
            +       * The name of the company, business or entity that is associated with the
            +       * engine. Setting this may help improve LLM related features.
            +       * 
            + * + * string company_name = 1; + * + * @return The companyName. + */ + public java.lang.String getCompanyName() { + java.lang.Object ref = companyName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + companyName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
            +       * The name of the company, business or entity that is associated with the
            +       * engine. Setting this may help improve LLM related features.
            +       * 
            + * + * string company_name = 1; + * + * @return The bytes for companyName. + */ + public com.google.protobuf.ByteString getCompanyNameBytes() { + java.lang.Object ref = companyName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + companyName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
            +       * The name of the company, business or entity that is associated with the
            +       * engine. Setting this may help improve LLM related features.
            +       * 
            + * + * string company_name = 1; + * + * @param value The companyName to set. + * @return This builder for chaining. + */ + public Builder setCompanyName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + companyName_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
            +       * The name of the company, business or entity that is associated with the
            +       * engine. Setting this may help improve LLM related features.
            +       * 
            + * + * string company_name = 1; + * + * @return This builder for chaining. + */ + public Builder clearCompanyName() { + companyName_ = getDefaultInstance().getCompanyName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
            +       * The name of the company, business or entity that is associated with the
            +       * engine. Setting this may help improve LLM related features.
            +       * 
            + * + * string company_name = 1; + * + * @param value The bytes for companyName to set. + * @return This builder for chaining. + */ + public Builder setCompanyNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + companyName_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.Engine.CommonConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.Engine.CommonConfig) + private static final com.google.cloud.discoveryengine.v1beta.Engine.CommonConfig + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.discoveryengine.v1beta.Engine.CommonConfig(); + } + + public static com.google.cloud.discoveryengine.v1beta.Engine.CommonConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CommonConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Engine.CommonConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface KnowledgeGraphConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.Engine.KnowledgeGraphConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
            +     * Whether to enable the Cloud Knowledge Graph for the engine.
            +     *
            +     * Defaults to false if not specified.
            +     * 
            + * + * bool enable_cloud_knowledge_graph = 1; + * + * @return The enableCloudKnowledgeGraph. + */ + boolean getEnableCloudKnowledgeGraph(); + + /** + * + * + *
            +     * Specify entity types to support.
            +     * 
            + * + * repeated string cloud_knowledge_graph_types = 2; + * + * @return A list containing the cloudKnowledgeGraphTypes. + */ + java.util.List getCloudKnowledgeGraphTypesList(); + + /** + * + * + *
            +     * Specify entity types to support.
            +     * 
            + * + * repeated string cloud_knowledge_graph_types = 2; + * + * @return The count of cloudKnowledgeGraphTypes. + */ + int getCloudKnowledgeGraphTypesCount(); + + /** + * + * + *
            +     * Specify entity types to support.
            +     * 
            + * + * repeated string cloud_knowledge_graph_types = 2; + * + * @param index The index of the element to return. + * @return The cloudKnowledgeGraphTypes at the given index. + */ + java.lang.String getCloudKnowledgeGraphTypes(int index); + + /** + * + * + *
            +     * Specify entity types to support.
            +     * 
            + * + * repeated string cloud_knowledge_graph_types = 2; + * + * @param index The index of the value to return. + * @return The bytes of the cloudKnowledgeGraphTypes at the given index. + */ + com.google.protobuf.ByteString getCloudKnowledgeGraphTypesBytes(int index); + + /** + * + * + *
            +     * Whether to enable the Private Knowledge Graph for the engine.
            +     *
            +     * Defaults to false if not specified.
            +     * 
            + * + * bool enable_private_knowledge_graph = 3; + * + * @return The enablePrivateKnowledgeGraph. + */ + boolean getEnablePrivateKnowledgeGraph(); + + /** + * + * + *
            +     * Specify entity types to support.
            +     * 
            + * + * repeated string private_knowledge_graph_types = 4; + * + * @return A list containing the privateKnowledgeGraphTypes. + */ + java.util.List getPrivateKnowledgeGraphTypesList(); + + /** + * + * + *
            +     * Specify entity types to support.
            +     * 
            + * + * repeated string private_knowledge_graph_types = 4; + * + * @return The count of privateKnowledgeGraphTypes. + */ + int getPrivateKnowledgeGraphTypesCount(); + + /** + * + * + *
            +     * Specify entity types to support.
            +     * 
            + * + * repeated string private_knowledge_graph_types = 4; + * + * @param index The index of the element to return. + * @return The privateKnowledgeGraphTypes at the given index. + */ + java.lang.String getPrivateKnowledgeGraphTypes(int index); + + /** + * + * + *
            +     * Specify entity types to support.
            +     * 
            + * + * repeated string private_knowledge_graph_types = 4; + * + * @param index The index of the value to return. + * @return The bytes of the privateKnowledgeGraphTypes at the given index. + */ + com.google.protobuf.ByteString getPrivateKnowledgeGraphTypesBytes(int index); + + /** + * + * + *
            +     * Optional. Feature config for the Knowledge Graph.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Engine.KnowledgeGraphConfig.FeatureConfig feature_config = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the featureConfig field is set. + */ + boolean hasFeatureConfig(); + + /** + * + * + *
            +     * Optional. Feature config for the Knowledge Graph.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Engine.KnowledgeGraphConfig.FeatureConfig feature_config = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The featureConfig. + */ + com.google.cloud.discoveryengine.v1beta.Engine.KnowledgeGraphConfig.FeatureConfig + getFeatureConfig(); + + /** + * + * + *
            +     * Optional. Feature config for the Knowledge Graph.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Engine.KnowledgeGraphConfig.FeatureConfig feature_config = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.discoveryengine.v1beta.Engine.KnowledgeGraphConfig.FeatureConfigOrBuilder + getFeatureConfigOrBuilder(); + } + + /** + * + * + *
            +   * Configuration message for the Knowledge Graph.
            +   * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.Engine.KnowledgeGraphConfig} + */ + public static final class KnowledgeGraphConfig extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.Engine.KnowledgeGraphConfig) + KnowledgeGraphConfigOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "KnowledgeGraphConfig"); + } + + // Use KnowledgeGraphConfig.newBuilder() to construct. + private KnowledgeGraphConfig(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private KnowledgeGraphConfig() { + cloudKnowledgeGraphTypes_ = com.google.protobuf.LazyStringArrayList.emptyList(); + privateKnowledgeGraphTypes_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.EngineProto + .internal_static_google_cloud_discoveryengine_v1beta_Engine_KnowledgeGraphConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.EngineProto + .internal_static_google_cloud_discoveryengine_v1beta_Engine_KnowledgeGraphConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.Engine.KnowledgeGraphConfig.class, + com.google.cloud.discoveryengine.v1beta.Engine.KnowledgeGraphConfig.Builder.class); + } + + public interface FeatureConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.Engine.KnowledgeGraphConfig.FeatureConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
            +       * Whether to disable the private KG query understanding for the engine.
            +       *
            +       * Defaults to false if not specified.
            +       * 
            + * + * bool disable_private_kg_query_understanding = 1; + * + * @return The disablePrivateKgQueryUnderstanding. + */ + boolean getDisablePrivateKgQueryUnderstanding(); + + /** + * + * + *
            +       * Whether to disable the private KG enrichment for the engine.
            +       *
            +       * Defaults to false if not specified.
            +       * 
            + * + * bool disable_private_kg_enrichment = 2; + * + * @return The disablePrivateKgEnrichment. + */ + boolean getDisablePrivateKgEnrichment(); + + /** + * + * + *
            +       * Whether to disable the private KG auto complete for the engine.
            +       *
            +       * Defaults to false if not specified.
            +       * 
            + * + * bool disable_private_kg_auto_complete = 3; + * + * @return The disablePrivateKgAutoComplete. + */ + boolean getDisablePrivateKgAutoComplete(); + + /** + * + * + *
            +       * Whether to disable the private KG for query UI chips.
            +       *
            +       * Defaults to false if not specified.
            +       * 
            + * + * bool disable_private_kg_query_ui_chips = 4; + * + * @return The disablePrivateKgQueryUiChips. + */ + boolean getDisablePrivateKgQueryUiChips(); + } + + /** + * + * + *
            +     * Feature config for the Knowledge Graph.
            +     * 
            + * + * Protobuf type {@code + * google.cloud.discoveryengine.v1beta.Engine.KnowledgeGraphConfig.FeatureConfig} + */ + public static final class FeatureConfig extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.Engine.KnowledgeGraphConfig.FeatureConfig) + FeatureConfigOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "FeatureConfig"); + } + + // Use FeatureConfig.newBuilder() to construct. + private FeatureConfig(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private FeatureConfig() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.EngineProto + .internal_static_google_cloud_discoveryengine_v1beta_Engine_KnowledgeGraphConfig_FeatureConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.EngineProto + .internal_static_google_cloud_discoveryengine_v1beta_Engine_KnowledgeGraphConfig_FeatureConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.Engine.KnowledgeGraphConfig.FeatureConfig + .class, + com.google.cloud.discoveryengine.v1beta.Engine.KnowledgeGraphConfig.FeatureConfig + .Builder.class); + } + + public static final int DISABLE_PRIVATE_KG_QUERY_UNDERSTANDING_FIELD_NUMBER = 1; + private boolean disablePrivateKgQueryUnderstanding_ = false; + + /** + * + * + *
            +       * Whether to disable the private KG query understanding for the engine.
            +       *
            +       * Defaults to false if not specified.
            +       * 
            + * + * bool disable_private_kg_query_understanding = 1; + * + * @return The disablePrivateKgQueryUnderstanding. + */ + @java.lang.Override + public boolean getDisablePrivateKgQueryUnderstanding() { + return disablePrivateKgQueryUnderstanding_; + } + + public static final int DISABLE_PRIVATE_KG_ENRICHMENT_FIELD_NUMBER = 2; + private boolean disablePrivateKgEnrichment_ = false; + + /** + * + * + *
            +       * Whether to disable the private KG enrichment for the engine.
            +       *
            +       * Defaults to false if not specified.
            +       * 
            + * + * bool disable_private_kg_enrichment = 2; + * + * @return The disablePrivateKgEnrichment. + */ + @java.lang.Override + public boolean getDisablePrivateKgEnrichment() { + return disablePrivateKgEnrichment_; + } + + public static final int DISABLE_PRIVATE_KG_AUTO_COMPLETE_FIELD_NUMBER = 3; + private boolean disablePrivateKgAutoComplete_ = false; + + /** + * + * + *
            +       * Whether to disable the private KG auto complete for the engine.
            +       *
            +       * Defaults to false if not specified.
            +       * 
            + * + * bool disable_private_kg_auto_complete = 3; + * + * @return The disablePrivateKgAutoComplete. + */ + @java.lang.Override + public boolean getDisablePrivateKgAutoComplete() { + return disablePrivateKgAutoComplete_; + } + + public static final int DISABLE_PRIVATE_KG_QUERY_UI_CHIPS_FIELD_NUMBER = 4; + private boolean disablePrivateKgQueryUiChips_ = false; + + /** + * + * + *
            +       * Whether to disable the private KG for query UI chips.
            +       *
            +       * Defaults to false if not specified.
            +       * 
            + * + * bool disable_private_kg_query_ui_chips = 4; + * + * @return The disablePrivateKgQueryUiChips. + */ + @java.lang.Override + public boolean getDisablePrivateKgQueryUiChips() { + return disablePrivateKgQueryUiChips_; + } + + 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 (disablePrivateKgQueryUnderstanding_ != false) { + output.writeBool(1, disablePrivateKgQueryUnderstanding_); + } + if (disablePrivateKgEnrichment_ != false) { + output.writeBool(2, disablePrivateKgEnrichment_); + } + if (disablePrivateKgAutoComplete_ != false) { + output.writeBool(3, disablePrivateKgAutoComplete_); + } + if (disablePrivateKgQueryUiChips_ != false) { + output.writeBool(4, disablePrivateKgQueryUiChips_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (disablePrivateKgQueryUnderstanding_ != false) { + size += + com.google.protobuf.CodedOutputStream.computeBoolSize( + 1, disablePrivateKgQueryUnderstanding_); + } + if (disablePrivateKgEnrichment_ != false) { + size += + com.google.protobuf.CodedOutputStream.computeBoolSize(2, disablePrivateKgEnrichment_); + } + if (disablePrivateKgAutoComplete_ != false) { + size += + com.google.protobuf.CodedOutputStream.computeBoolSize( + 3, disablePrivateKgAutoComplete_); + } + if (disablePrivateKgQueryUiChips_ != false) { + size += + com.google.protobuf.CodedOutputStream.computeBoolSize( + 4, disablePrivateKgQueryUiChips_); + } + 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.discoveryengine.v1beta.Engine.KnowledgeGraphConfig.FeatureConfig)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1beta.Engine.KnowledgeGraphConfig.FeatureConfig other = + (com.google.cloud.discoveryengine.v1beta.Engine.KnowledgeGraphConfig.FeatureConfig) obj; + + if (getDisablePrivateKgQueryUnderstanding() + != other.getDisablePrivateKgQueryUnderstanding()) return false; + if (getDisablePrivateKgEnrichment() != other.getDisablePrivateKgEnrichment()) return false; + if (getDisablePrivateKgAutoComplete() != other.getDisablePrivateKgAutoComplete()) + return false; + if (getDisablePrivateKgQueryUiChips() != other.getDisablePrivateKgQueryUiChips()) + 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) + DISABLE_PRIVATE_KG_QUERY_UNDERSTANDING_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashBoolean(getDisablePrivateKgQueryUnderstanding()); + hash = (37 * hash) + DISABLE_PRIVATE_KG_ENRICHMENT_FIELD_NUMBER; + hash = + (53 * hash) + com.google.protobuf.Internal.hashBoolean(getDisablePrivateKgEnrichment()); + hash = (37 * hash) + DISABLE_PRIVATE_KG_AUTO_COMPLETE_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashBoolean(getDisablePrivateKgAutoComplete()); + hash = (37 * hash) + DISABLE_PRIVATE_KG_QUERY_UI_CHIPS_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashBoolean(getDisablePrivateKgQueryUiChips()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1beta.Engine.KnowledgeGraphConfig + .FeatureConfig + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.Engine.KnowledgeGraphConfig + .FeatureConfig + 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.discoveryengine.v1beta.Engine.KnowledgeGraphConfig + .FeatureConfig + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.Engine.KnowledgeGraphConfig + .FeatureConfig + 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.discoveryengine.v1beta.Engine.KnowledgeGraphConfig + .FeatureConfig + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.Engine.KnowledgeGraphConfig + .FeatureConfig + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1beta.Engine.KnowledgeGraphConfig + .FeatureConfig + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.Engine.KnowledgeGraphConfig + .FeatureConfig + 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.discoveryengine.v1beta.Engine.KnowledgeGraphConfig + .FeatureConfig + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.Engine.KnowledgeGraphConfig + .FeatureConfig + 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.discoveryengine.v1beta.Engine.KnowledgeGraphConfig + .FeatureConfig + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.Engine.KnowledgeGraphConfig + .FeatureConfig + 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.discoveryengine.v1beta.Engine.KnowledgeGraphConfig.FeatureConfig + 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; + } + + /** + * + * + *
            +       * Feature config for the Knowledge Graph.
            +       * 
            + * + * Protobuf type {@code + * google.cloud.discoveryengine.v1beta.Engine.KnowledgeGraphConfig.FeatureConfig} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.Engine.KnowledgeGraphConfig.FeatureConfig) + com.google.cloud.discoveryengine.v1beta.Engine.KnowledgeGraphConfig + .FeatureConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.EngineProto + .internal_static_google_cloud_discoveryengine_v1beta_Engine_KnowledgeGraphConfig_FeatureConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.EngineProto + .internal_static_google_cloud_discoveryengine_v1beta_Engine_KnowledgeGraphConfig_FeatureConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.Engine.KnowledgeGraphConfig.FeatureConfig + .class, + com.google.cloud.discoveryengine.v1beta.Engine.KnowledgeGraphConfig.FeatureConfig + .Builder.class); + } + + // Construct using + // com.google.cloud.discoveryengine.v1beta.Engine.KnowledgeGraphConfig.FeatureConfig.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + disablePrivateKgQueryUnderstanding_ = false; + disablePrivateKgEnrichment_ = false; + disablePrivateKgAutoComplete_ = false; + disablePrivateKgQueryUiChips_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1beta.EngineProto + .internal_static_google_cloud_discoveryengine_v1beta_Engine_KnowledgeGraphConfig_FeatureConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Engine.KnowledgeGraphConfig.FeatureConfig + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1beta.Engine.KnowledgeGraphConfig.FeatureConfig + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Engine.KnowledgeGraphConfig.FeatureConfig + build() { + com.google.cloud.discoveryengine.v1beta.Engine.KnowledgeGraphConfig.FeatureConfig result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Engine.KnowledgeGraphConfig.FeatureConfig + buildPartial() { + com.google.cloud.discoveryengine.v1beta.Engine.KnowledgeGraphConfig.FeatureConfig result = + new com.google.cloud.discoveryengine.v1beta.Engine.KnowledgeGraphConfig.FeatureConfig( + this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.discoveryengine.v1beta.Engine.KnowledgeGraphConfig.FeatureConfig + result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.disablePrivateKgQueryUnderstanding_ = disablePrivateKgQueryUnderstanding_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.disablePrivateKgEnrichment_ = disablePrivateKgEnrichment_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.disablePrivateKgAutoComplete_ = disablePrivateKgAutoComplete_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.disablePrivateKgQueryUiChips_ = disablePrivateKgQueryUiChips_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.discoveryengine.v1beta.Engine.KnowledgeGraphConfig.FeatureConfig) { + return mergeFrom( + (com.google.cloud.discoveryengine.v1beta.Engine.KnowledgeGraphConfig.FeatureConfig) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1beta.Engine.KnowledgeGraphConfig.FeatureConfig + other) { + if (other + == com.google.cloud.discoveryengine.v1beta.Engine.KnowledgeGraphConfig.FeatureConfig + .getDefaultInstance()) return this; + if (other.getDisablePrivateKgQueryUnderstanding() != false) { + setDisablePrivateKgQueryUnderstanding(other.getDisablePrivateKgQueryUnderstanding()); + } + if (other.getDisablePrivateKgEnrichment() != false) { + setDisablePrivateKgEnrichment(other.getDisablePrivateKgEnrichment()); + } + if (other.getDisablePrivateKgAutoComplete() != false) { + setDisablePrivateKgAutoComplete(other.getDisablePrivateKgAutoComplete()); + } + if (other.getDisablePrivateKgQueryUiChips() != false) { + setDisablePrivateKgQueryUiChips(other.getDisablePrivateKgQueryUiChips()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + disablePrivateKgQueryUnderstanding_ = input.readBool(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 16: + { + disablePrivateKgEnrichment_ = input.readBool(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 24: + { + disablePrivateKgAutoComplete_ = input.readBool(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 32: + { + disablePrivateKgQueryUiChips_ = input.readBool(); + bitField0_ |= 0x00000008; + break; + } // case 32 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private boolean disablePrivateKgQueryUnderstanding_; + + /** + * + * + *
            +         * Whether to disable the private KG query understanding for the engine.
            +         *
            +         * Defaults to false if not specified.
            +         * 
            + * + * bool disable_private_kg_query_understanding = 1; + * + * @return The disablePrivateKgQueryUnderstanding. + */ + @java.lang.Override + public boolean getDisablePrivateKgQueryUnderstanding() { + return disablePrivateKgQueryUnderstanding_; + } + + /** + * + * + *
            +         * Whether to disable the private KG query understanding for the engine.
            +         *
            +         * Defaults to false if not specified.
            +         * 
            + * + * bool disable_private_kg_query_understanding = 1; + * + * @param value The disablePrivateKgQueryUnderstanding to set. + * @return This builder for chaining. + */ + public Builder setDisablePrivateKgQueryUnderstanding(boolean value) { + + disablePrivateKgQueryUnderstanding_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
            +         * Whether to disable the private KG query understanding for the engine.
            +         *
            +         * Defaults to false if not specified.
            +         * 
            + * + * bool disable_private_kg_query_understanding = 1; + * + * @return This builder for chaining. + */ + public Builder clearDisablePrivateKgQueryUnderstanding() { + bitField0_ = (bitField0_ & ~0x00000001); + disablePrivateKgQueryUnderstanding_ = false; + onChanged(); + return this; + } + + private boolean disablePrivateKgEnrichment_; + + /** + * + * + *
            +         * Whether to disable the private KG enrichment for the engine.
            +         *
            +         * Defaults to false if not specified.
            +         * 
            + * + * bool disable_private_kg_enrichment = 2; + * + * @return The disablePrivateKgEnrichment. + */ + @java.lang.Override + public boolean getDisablePrivateKgEnrichment() { + return disablePrivateKgEnrichment_; + } + + /** + * + * + *
            +         * Whether to disable the private KG enrichment for the engine.
            +         *
            +         * Defaults to false if not specified.
            +         * 
            + * + * bool disable_private_kg_enrichment = 2; + * + * @param value The disablePrivateKgEnrichment to set. + * @return This builder for chaining. + */ + public Builder setDisablePrivateKgEnrichment(boolean value) { + + disablePrivateKgEnrichment_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
            +         * Whether to disable the private KG enrichment for the engine.
            +         *
            +         * Defaults to false if not specified.
            +         * 
            + * + * bool disable_private_kg_enrichment = 2; + * + * @return This builder for chaining. + */ + public Builder clearDisablePrivateKgEnrichment() { + bitField0_ = (bitField0_ & ~0x00000002); + disablePrivateKgEnrichment_ = false; + onChanged(); + return this; + } + + private boolean disablePrivateKgAutoComplete_; + + /** + * + * + *
            +         * Whether to disable the private KG auto complete for the engine.
            +         *
            +         * Defaults to false if not specified.
            +         * 
            + * + * bool disable_private_kg_auto_complete = 3; + * + * @return The disablePrivateKgAutoComplete. + */ + @java.lang.Override + public boolean getDisablePrivateKgAutoComplete() { + return disablePrivateKgAutoComplete_; + } + + /** + * + * + *
            +         * Whether to disable the private KG auto complete for the engine.
            +         *
            +         * Defaults to false if not specified.
            +         * 
            + * + * bool disable_private_kg_auto_complete = 3; + * + * @param value The disablePrivateKgAutoComplete to set. + * @return This builder for chaining. + */ + public Builder setDisablePrivateKgAutoComplete(boolean value) { + + disablePrivateKgAutoComplete_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
            +         * Whether to disable the private KG auto complete for the engine.
            +         *
            +         * Defaults to false if not specified.
            +         * 
            + * + * bool disable_private_kg_auto_complete = 3; + * + * @return This builder for chaining. + */ + public Builder clearDisablePrivateKgAutoComplete() { + bitField0_ = (bitField0_ & ~0x00000004); + disablePrivateKgAutoComplete_ = false; + onChanged(); + return this; + } + + private boolean disablePrivateKgQueryUiChips_; + + /** + * + * + *
            +         * Whether to disable the private KG for query UI chips.
            +         *
            +         * Defaults to false if not specified.
            +         * 
            + * + * bool disable_private_kg_query_ui_chips = 4; + * + * @return The disablePrivateKgQueryUiChips. + */ + @java.lang.Override + public boolean getDisablePrivateKgQueryUiChips() { + return disablePrivateKgQueryUiChips_; + } + + /** + * + * + *
            +         * Whether to disable the private KG for query UI chips.
            +         *
            +         * Defaults to false if not specified.
            +         * 
            + * + * bool disable_private_kg_query_ui_chips = 4; + * + * @param value The disablePrivateKgQueryUiChips to set. + * @return This builder for chaining. + */ + public Builder setDisablePrivateKgQueryUiChips(boolean value) { + + disablePrivateKgQueryUiChips_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
            +         * Whether to disable the private KG for query UI chips.
            +         *
            +         * Defaults to false if not specified.
            +         * 
            + * + * bool disable_private_kg_query_ui_chips = 4; + * + * @return This builder for chaining. + */ + public Builder clearDisablePrivateKgQueryUiChips() { + bitField0_ = (bitField0_ & ~0x00000008); + disablePrivateKgQueryUiChips_ = false; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.Engine.KnowledgeGraphConfig.FeatureConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.Engine.KnowledgeGraphConfig.FeatureConfig) + private static final com.google.cloud.discoveryengine.v1beta.Engine.KnowledgeGraphConfig + .FeatureConfig + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.discoveryengine.v1beta.Engine.KnowledgeGraphConfig.FeatureConfig(); + } + + public static com.google.cloud.discoveryengine.v1beta.Engine.KnowledgeGraphConfig + .FeatureConfig + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public FeatureConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Engine.KnowledgeGraphConfig.FeatureConfig + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int bitField0_; + public static final int ENABLE_CLOUD_KNOWLEDGE_GRAPH_FIELD_NUMBER = 1; + private boolean enableCloudKnowledgeGraph_ = false; + + /** + * + * + *
            +     * Whether to enable the Cloud Knowledge Graph for the engine.
            +     *
            +     * Defaults to false if not specified.
            +     * 
            + * + * bool enable_cloud_knowledge_graph = 1; + * + * @return The enableCloudKnowledgeGraph. + */ + @java.lang.Override + public boolean getEnableCloudKnowledgeGraph() { + return enableCloudKnowledgeGraph_; + } + + public static final int CLOUD_KNOWLEDGE_GRAPH_TYPES_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList cloudKnowledgeGraphTypes_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + /** + * + * + *
            +     * Specify entity types to support.
            +     * 
            + * + * repeated string cloud_knowledge_graph_types = 2; + * + * @return A list containing the cloudKnowledgeGraphTypes. + */ + public com.google.protobuf.ProtocolStringList getCloudKnowledgeGraphTypesList() { + return cloudKnowledgeGraphTypes_; + } + + /** + * + * + *
            +     * Specify entity types to support.
            +     * 
            + * + * repeated string cloud_knowledge_graph_types = 2; + * + * @return The count of cloudKnowledgeGraphTypes. + */ + public int getCloudKnowledgeGraphTypesCount() { + return cloudKnowledgeGraphTypes_.size(); + } + + /** + * + * + *
            +     * Specify entity types to support.
            +     * 
            + * + * repeated string cloud_knowledge_graph_types = 2; + * + * @param index The index of the element to return. + * @return The cloudKnowledgeGraphTypes at the given index. + */ + public java.lang.String getCloudKnowledgeGraphTypes(int index) { + return cloudKnowledgeGraphTypes_.get(index); + } + + /** + * + * + *
            +     * Specify entity types to support.
            +     * 
            + * + * repeated string cloud_knowledge_graph_types = 2; + * + * @param index The index of the value to return. + * @return The bytes of the cloudKnowledgeGraphTypes at the given index. + */ + public com.google.protobuf.ByteString getCloudKnowledgeGraphTypesBytes(int index) { + return cloudKnowledgeGraphTypes_.getByteString(index); + } + + public static final int ENABLE_PRIVATE_KNOWLEDGE_GRAPH_FIELD_NUMBER = 3; + private boolean enablePrivateKnowledgeGraph_ = false; + + /** + * + * + *
            +     * Whether to enable the Private Knowledge Graph for the engine.
            +     *
            +     * Defaults to false if not specified.
            +     * 
            + * + * bool enable_private_knowledge_graph = 3; + * + * @return The enablePrivateKnowledgeGraph. + */ + @java.lang.Override + public boolean getEnablePrivateKnowledgeGraph() { + return enablePrivateKnowledgeGraph_; + } + + public static final int PRIVATE_KNOWLEDGE_GRAPH_TYPES_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList privateKnowledgeGraphTypes_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + /** + * + * + *
            +     * Specify entity types to support.
            +     * 
            + * + * repeated string private_knowledge_graph_types = 4; + * + * @return A list containing the privateKnowledgeGraphTypes. + */ + public com.google.protobuf.ProtocolStringList getPrivateKnowledgeGraphTypesList() { + return privateKnowledgeGraphTypes_; + } + + /** + * + * + *
            +     * Specify entity types to support.
            +     * 
            + * + * repeated string private_knowledge_graph_types = 4; + * + * @return The count of privateKnowledgeGraphTypes. + */ + public int getPrivateKnowledgeGraphTypesCount() { + return privateKnowledgeGraphTypes_.size(); + } + + /** + * + * + *
            +     * Specify entity types to support.
            +     * 
            + * + * repeated string private_knowledge_graph_types = 4; + * + * @param index The index of the element to return. + * @return The privateKnowledgeGraphTypes at the given index. + */ + public java.lang.String getPrivateKnowledgeGraphTypes(int index) { + return privateKnowledgeGraphTypes_.get(index); + } + + /** + * + * + *
            +     * Specify entity types to support.
            +     * 
            + * + * repeated string private_knowledge_graph_types = 4; + * + * @param index The index of the value to return. + * @return The bytes of the privateKnowledgeGraphTypes at the given index. + */ + public com.google.protobuf.ByteString getPrivateKnowledgeGraphTypesBytes(int index) { + return privateKnowledgeGraphTypes_.getByteString(index); + } + + public static final int FEATURE_CONFIG_FIELD_NUMBER = 5; + private com.google.cloud.discoveryengine.v1beta.Engine.KnowledgeGraphConfig.FeatureConfig + featureConfig_; + + /** + * + * + *
            +     * Optional. Feature config for the Knowledge Graph.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Engine.KnowledgeGraphConfig.FeatureConfig feature_config = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the featureConfig field is set. + */ + @java.lang.Override + public boolean hasFeatureConfig() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
            +     * Optional. Feature config for the Knowledge Graph.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Engine.KnowledgeGraphConfig.FeatureConfig feature_config = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The featureConfig. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Engine.KnowledgeGraphConfig.FeatureConfig + getFeatureConfig() { + return featureConfig_ == null + ? com.google.cloud.discoveryengine.v1beta.Engine.KnowledgeGraphConfig.FeatureConfig + .getDefaultInstance() + : featureConfig_; + } + + /** + * + * + *
            +     * Optional. Feature config for the Knowledge Graph.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Engine.KnowledgeGraphConfig.FeatureConfig feature_config = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Engine.KnowledgeGraphConfig + .FeatureConfigOrBuilder + getFeatureConfigOrBuilder() { + return featureConfig_ == null + ? com.google.cloud.discoveryengine.v1beta.Engine.KnowledgeGraphConfig.FeatureConfig + .getDefaultInstance() + : featureConfig_; + } + + 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 (enableCloudKnowledgeGraph_ != false) { + output.writeBool(1, enableCloudKnowledgeGraph_); + } + for (int i = 0; i < cloudKnowledgeGraphTypes_.size(); i++) { + com.google.protobuf.GeneratedMessage.writeString( + output, 2, cloudKnowledgeGraphTypes_.getRaw(i)); + } + if (enablePrivateKnowledgeGraph_ != false) { + output.writeBool(3, enablePrivateKnowledgeGraph_); + } + for (int i = 0; i < privateKnowledgeGraphTypes_.size(); i++) { + com.google.protobuf.GeneratedMessage.writeString( + output, 4, privateKnowledgeGraphTypes_.getRaw(i)); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(5, getFeatureConfig()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (enableCloudKnowledgeGraph_ != false) { + size += + com.google.protobuf.CodedOutputStream.computeBoolSize(1, enableCloudKnowledgeGraph_); + } + { + int dataSize = 0; + for (int i = 0; i < cloudKnowledgeGraphTypes_.size(); i++) { + dataSize += computeStringSizeNoTag(cloudKnowledgeGraphTypes_.getRaw(i)); + } + size += dataSize; + size += 1 * getCloudKnowledgeGraphTypesList().size(); + } + if (enablePrivateKnowledgeGraph_ != false) { + size += + com.google.protobuf.CodedOutputStream.computeBoolSize(3, enablePrivateKnowledgeGraph_); + } + { + int dataSize = 0; + for (int i = 0; i < privateKnowledgeGraphTypes_.size(); i++) { + dataSize += computeStringSizeNoTag(privateKnowledgeGraphTypes_.getRaw(i)); + } + size += dataSize; + size += 1 * getPrivateKnowledgeGraphTypesList().size(); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getFeatureConfig()); + } + 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.discoveryengine.v1beta.Engine.KnowledgeGraphConfig)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1beta.Engine.KnowledgeGraphConfig other = + (com.google.cloud.discoveryengine.v1beta.Engine.KnowledgeGraphConfig) obj; + + if (getEnableCloudKnowledgeGraph() != other.getEnableCloudKnowledgeGraph()) return false; + if (!getCloudKnowledgeGraphTypesList().equals(other.getCloudKnowledgeGraphTypesList())) + return false; + if (getEnablePrivateKnowledgeGraph() != other.getEnablePrivateKnowledgeGraph()) return false; + if (!getPrivateKnowledgeGraphTypesList().equals(other.getPrivateKnowledgeGraphTypesList())) + return false; + if (hasFeatureConfig() != other.hasFeatureConfig()) return false; + if (hasFeatureConfig()) { + if (!getFeatureConfig().equals(other.getFeatureConfig())) 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) + ENABLE_CLOUD_KNOWLEDGE_GRAPH_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getEnableCloudKnowledgeGraph()); + if (getCloudKnowledgeGraphTypesCount() > 0) { + hash = (37 * hash) + CLOUD_KNOWLEDGE_GRAPH_TYPES_FIELD_NUMBER; + hash = (53 * hash) + getCloudKnowledgeGraphTypesList().hashCode(); + } + hash = (37 * hash) + ENABLE_PRIVATE_KNOWLEDGE_GRAPH_FIELD_NUMBER; + hash = + (53 * hash) + com.google.protobuf.Internal.hashBoolean(getEnablePrivateKnowledgeGraph()); + if (getPrivateKnowledgeGraphTypesCount() > 0) { + hash = (37 * hash) + PRIVATE_KNOWLEDGE_GRAPH_TYPES_FIELD_NUMBER; + hash = (53 * hash) + getPrivateKnowledgeGraphTypesList().hashCode(); + } + if (hasFeatureConfig()) { + hash = (37 * hash) + FEATURE_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getFeatureConfig().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1beta.Engine.KnowledgeGraphConfig parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.Engine.KnowledgeGraphConfig 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.discoveryengine.v1beta.Engine.KnowledgeGraphConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.Engine.KnowledgeGraphConfig 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.discoveryengine.v1beta.Engine.KnowledgeGraphConfig parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.Engine.KnowledgeGraphConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1beta.Engine.KnowledgeGraphConfig parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.Engine.KnowledgeGraphConfig 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.discoveryengine.v1beta.Engine.KnowledgeGraphConfig + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.Engine.KnowledgeGraphConfig + 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.discoveryengine.v1beta.Engine.KnowledgeGraphConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.Engine.KnowledgeGraphConfig 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.discoveryengine.v1beta.Engine.KnowledgeGraphConfig 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; + } + + /** + * + * + *
            +     * Configuration message for the Knowledge Graph.
            +     * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.Engine.KnowledgeGraphConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.Engine.KnowledgeGraphConfig) + com.google.cloud.discoveryengine.v1beta.Engine.KnowledgeGraphConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.EngineProto + .internal_static_google_cloud_discoveryengine_v1beta_Engine_KnowledgeGraphConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.EngineProto + .internal_static_google_cloud_discoveryengine_v1beta_Engine_KnowledgeGraphConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.Engine.KnowledgeGraphConfig.class, + com.google.cloud.discoveryengine.v1beta.Engine.KnowledgeGraphConfig.Builder.class); + } + + // Construct using + // com.google.cloud.discoveryengine.v1beta.Engine.KnowledgeGraphConfig.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetFeatureConfigFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + enableCloudKnowledgeGraph_ = false; + cloudKnowledgeGraphTypes_ = com.google.protobuf.LazyStringArrayList.emptyList(); + enablePrivateKnowledgeGraph_ = false; + privateKnowledgeGraphTypes_ = com.google.protobuf.LazyStringArrayList.emptyList(); + featureConfig_ = null; + if (featureConfigBuilder_ != null) { + featureConfigBuilder_.dispose(); + featureConfigBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1beta.EngineProto + .internal_static_google_cloud_discoveryengine_v1beta_Engine_KnowledgeGraphConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Engine.KnowledgeGraphConfig + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1beta.Engine.KnowledgeGraphConfig + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Engine.KnowledgeGraphConfig build() { + com.google.cloud.discoveryengine.v1beta.Engine.KnowledgeGraphConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Engine.KnowledgeGraphConfig buildPartial() { + com.google.cloud.discoveryengine.v1beta.Engine.KnowledgeGraphConfig result = + new com.google.cloud.discoveryengine.v1beta.Engine.KnowledgeGraphConfig(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.discoveryengine.v1beta.Engine.KnowledgeGraphConfig result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.enableCloudKnowledgeGraph_ = enableCloudKnowledgeGraph_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + cloudKnowledgeGraphTypes_.makeImmutable(); + result.cloudKnowledgeGraphTypes_ = cloudKnowledgeGraphTypes_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.enablePrivateKnowledgeGraph_ = enablePrivateKnowledgeGraph_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + privateKnowledgeGraphTypes_.makeImmutable(); + result.privateKnowledgeGraphTypes_ = privateKnowledgeGraphTypes_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000010) != 0)) { + result.featureConfig_ = + featureConfigBuilder_ == null ? featureConfig_ : featureConfigBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.discoveryengine.v1beta.Engine.KnowledgeGraphConfig) { + return mergeFrom( + (com.google.cloud.discoveryengine.v1beta.Engine.KnowledgeGraphConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1beta.Engine.KnowledgeGraphConfig other) { + if (other + == com.google.cloud.discoveryengine.v1beta.Engine.KnowledgeGraphConfig + .getDefaultInstance()) return this; + if (other.getEnableCloudKnowledgeGraph() != false) { + setEnableCloudKnowledgeGraph(other.getEnableCloudKnowledgeGraph()); + } + if (!other.cloudKnowledgeGraphTypes_.isEmpty()) { + if (cloudKnowledgeGraphTypes_.isEmpty()) { + cloudKnowledgeGraphTypes_ = other.cloudKnowledgeGraphTypes_; + bitField0_ |= 0x00000002; + } else { + ensureCloudKnowledgeGraphTypesIsMutable(); + cloudKnowledgeGraphTypes_.addAll(other.cloudKnowledgeGraphTypes_); + } + onChanged(); + } + if (other.getEnablePrivateKnowledgeGraph() != false) { + setEnablePrivateKnowledgeGraph(other.getEnablePrivateKnowledgeGraph()); + } + if (!other.privateKnowledgeGraphTypes_.isEmpty()) { + if (privateKnowledgeGraphTypes_.isEmpty()) { + privateKnowledgeGraphTypes_ = other.privateKnowledgeGraphTypes_; + bitField0_ |= 0x00000008; + } else { + ensurePrivateKnowledgeGraphTypesIsMutable(); + privateKnowledgeGraphTypes_.addAll(other.privateKnowledgeGraphTypes_); + } + onChanged(); + } + if (other.hasFeatureConfig()) { + mergeFeatureConfig(other.getFeatureConfig()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + enableCloudKnowledgeGraph_ = input.readBool(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureCloudKnowledgeGraphTypesIsMutable(); + cloudKnowledgeGraphTypes_.add(s); + break; + } // case 18 + case 24: + { + enablePrivateKnowledgeGraph_ = input.readBool(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + ensurePrivateKnowledgeGraphTypesIsMutable(); + privateKnowledgeGraphTypes_.add(s); + break; + } // case 34 + case 42: + { + input.readMessage( + internalGetFeatureConfigFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 42 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private boolean enableCloudKnowledgeGraph_; + + /** + * + * + *
            +       * Whether to enable the Cloud Knowledge Graph for the engine.
            +       *
            +       * Defaults to false if not specified.
            +       * 
            + * + * bool enable_cloud_knowledge_graph = 1; + * + * @return The enableCloudKnowledgeGraph. + */ + @java.lang.Override + public boolean getEnableCloudKnowledgeGraph() { + return enableCloudKnowledgeGraph_; + } + + /** + * + * + *
            +       * Whether to enable the Cloud Knowledge Graph for the engine.
            +       *
            +       * Defaults to false if not specified.
            +       * 
            + * + * bool enable_cloud_knowledge_graph = 1; + * + * @param value The enableCloudKnowledgeGraph to set. + * @return This builder for chaining. + */ + public Builder setEnableCloudKnowledgeGraph(boolean value) { + + enableCloudKnowledgeGraph_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
            +       * Whether to enable the Cloud Knowledge Graph for the engine.
            +       *
            +       * Defaults to false if not specified.
            +       * 
            + * + * bool enable_cloud_knowledge_graph = 1; + * + * @return This builder for chaining. + */ + public Builder clearEnableCloudKnowledgeGraph() { + bitField0_ = (bitField0_ & ~0x00000001); + enableCloudKnowledgeGraph_ = false; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList cloudKnowledgeGraphTypes_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureCloudKnowledgeGraphTypesIsMutable() { + if (!cloudKnowledgeGraphTypes_.isModifiable()) { + cloudKnowledgeGraphTypes_ = + new com.google.protobuf.LazyStringArrayList(cloudKnowledgeGraphTypes_); + } + bitField0_ |= 0x00000002; + } + + /** + * + * + *
            +       * Specify entity types to support.
            +       * 
            + * + * repeated string cloud_knowledge_graph_types = 2; + * + * @return A list containing the cloudKnowledgeGraphTypes. + */ + public com.google.protobuf.ProtocolStringList getCloudKnowledgeGraphTypesList() { + cloudKnowledgeGraphTypes_.makeImmutable(); + return cloudKnowledgeGraphTypes_; + } + + /** + * + * + *
            +       * Specify entity types to support.
            +       * 
            + * + * repeated string cloud_knowledge_graph_types = 2; + * + * @return The count of cloudKnowledgeGraphTypes. + */ + public int getCloudKnowledgeGraphTypesCount() { + return cloudKnowledgeGraphTypes_.size(); + } + + /** + * + * + *
            +       * Specify entity types to support.
            +       * 
            + * + * repeated string cloud_knowledge_graph_types = 2; + * + * @param index The index of the element to return. + * @return The cloudKnowledgeGraphTypes at the given index. + */ + public java.lang.String getCloudKnowledgeGraphTypes(int index) { + return cloudKnowledgeGraphTypes_.get(index); + } + + /** + * + * + *
            +       * Specify entity types to support.
            +       * 
            + * + * repeated string cloud_knowledge_graph_types = 2; + * + * @param index The index of the value to return. + * @return The bytes of the cloudKnowledgeGraphTypes at the given index. + */ + public com.google.protobuf.ByteString getCloudKnowledgeGraphTypesBytes(int index) { + return cloudKnowledgeGraphTypes_.getByteString(index); + } + + /** + * + * + *
            +       * Specify entity types to support.
            +       * 
            + * + * repeated string cloud_knowledge_graph_types = 2; + * + * @param index The index to set the value at. + * @param value The cloudKnowledgeGraphTypes to set. + * @return This builder for chaining. + */ + public Builder setCloudKnowledgeGraphTypes(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureCloudKnowledgeGraphTypesIsMutable(); + cloudKnowledgeGraphTypes_.set(index, value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
            +       * Specify entity types to support.
            +       * 
            + * + * repeated string cloud_knowledge_graph_types = 2; + * + * @param value The cloudKnowledgeGraphTypes to add. + * @return This builder for chaining. + */ + public Builder addCloudKnowledgeGraphTypes(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureCloudKnowledgeGraphTypesIsMutable(); + cloudKnowledgeGraphTypes_.add(value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
            +       * Specify entity types to support.
            +       * 
            + * + * repeated string cloud_knowledge_graph_types = 2; + * + * @param values The cloudKnowledgeGraphTypes to add. + * @return This builder for chaining. + */ + public Builder addAllCloudKnowledgeGraphTypes(java.lang.Iterable values) { + ensureCloudKnowledgeGraphTypesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, cloudKnowledgeGraphTypes_); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
            +       * Specify entity types to support.
            +       * 
            + * + * repeated string cloud_knowledge_graph_types = 2; + * + * @return This builder for chaining. + */ + public Builder clearCloudKnowledgeGraphTypes() { + cloudKnowledgeGraphTypes_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + ; + onChanged(); + return this; + } + + /** + * + * + *
            +       * Specify entity types to support.
            +       * 
            + * + * repeated string cloud_knowledge_graph_types = 2; + * + * @param value The bytes of the cloudKnowledgeGraphTypes to add. + * @return This builder for chaining. + */ + public Builder addCloudKnowledgeGraphTypesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureCloudKnowledgeGraphTypesIsMutable(); + cloudKnowledgeGraphTypes_.add(value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private boolean enablePrivateKnowledgeGraph_; + + /** + * + * + *
            +       * Whether to enable the Private Knowledge Graph for the engine.
            +       *
            +       * Defaults to false if not specified.
            +       * 
            + * + * bool enable_private_knowledge_graph = 3; + * + * @return The enablePrivateKnowledgeGraph. + */ + @java.lang.Override + public boolean getEnablePrivateKnowledgeGraph() { + return enablePrivateKnowledgeGraph_; + } + + /** + * + * + *
            +       * Whether to enable the Private Knowledge Graph for the engine.
            +       *
            +       * Defaults to false if not specified.
            +       * 
            + * + * bool enable_private_knowledge_graph = 3; + * + * @param value The enablePrivateKnowledgeGraph to set. + * @return This builder for chaining. + */ + public Builder setEnablePrivateKnowledgeGraph(boolean value) { + + enablePrivateKnowledgeGraph_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
            +       * Whether to enable the Private Knowledge Graph for the engine.
            +       *
            +       * Defaults to false if not specified.
            +       * 
            + * + * bool enable_private_knowledge_graph = 3; + * + * @return This builder for chaining. + */ + public Builder clearEnablePrivateKnowledgeGraph() { + bitField0_ = (bitField0_ & ~0x00000004); + enablePrivateKnowledgeGraph_ = false; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList privateKnowledgeGraphTypes_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensurePrivateKnowledgeGraphTypesIsMutable() { + if (!privateKnowledgeGraphTypes_.isModifiable()) { + privateKnowledgeGraphTypes_ = + new com.google.protobuf.LazyStringArrayList(privateKnowledgeGraphTypes_); + } + bitField0_ |= 0x00000008; + } + + /** + * + * + *
            +       * Specify entity types to support.
            +       * 
            + * + * repeated string private_knowledge_graph_types = 4; + * + * @return A list containing the privateKnowledgeGraphTypes. + */ + public com.google.protobuf.ProtocolStringList getPrivateKnowledgeGraphTypesList() { + privateKnowledgeGraphTypes_.makeImmutable(); + return privateKnowledgeGraphTypes_; + } + + /** + * + * + *
            +       * Specify entity types to support.
            +       * 
            + * + * repeated string private_knowledge_graph_types = 4; + * + * @return The count of privateKnowledgeGraphTypes. + */ + public int getPrivateKnowledgeGraphTypesCount() { + return privateKnowledgeGraphTypes_.size(); + } + + /** + * + * + *
            +       * Specify entity types to support.
            +       * 
            + * + * repeated string private_knowledge_graph_types = 4; + * + * @param index The index of the element to return. + * @return The privateKnowledgeGraphTypes at the given index. + */ + public java.lang.String getPrivateKnowledgeGraphTypes(int index) { + return privateKnowledgeGraphTypes_.get(index); + } + + /** + * + * + *
            +       * Specify entity types to support.
            +       * 
            + * + * repeated string private_knowledge_graph_types = 4; + * + * @param index The index of the value to return. + * @return The bytes of the privateKnowledgeGraphTypes at the given index. + */ + public com.google.protobuf.ByteString getPrivateKnowledgeGraphTypesBytes(int index) { + return privateKnowledgeGraphTypes_.getByteString(index); + } + + /** + * + * + *
            +       * Specify entity types to support.
            +       * 
            + * + * repeated string private_knowledge_graph_types = 4; + * + * @param index The index to set the value at. + * @param value The privateKnowledgeGraphTypes to set. + * @return This builder for chaining. + */ + public Builder setPrivateKnowledgeGraphTypes(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensurePrivateKnowledgeGraphTypesIsMutable(); + privateKnowledgeGraphTypes_.set(index, value); + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
            +       * Specify entity types to support.
            +       * 
            + * + * repeated string private_knowledge_graph_types = 4; + * + * @param value The privateKnowledgeGraphTypes to add. + * @return This builder for chaining. + */ + public Builder addPrivateKnowledgeGraphTypes(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensurePrivateKnowledgeGraphTypesIsMutable(); + privateKnowledgeGraphTypes_.add(value); + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
            +       * Specify entity types to support.
            +       * 
            + * + * repeated string private_knowledge_graph_types = 4; + * + * @param values The privateKnowledgeGraphTypes to add. + * @return This builder for chaining. + */ + public Builder addAllPrivateKnowledgeGraphTypes(java.lang.Iterable values) { + ensurePrivateKnowledgeGraphTypesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, privateKnowledgeGraphTypes_); + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
            +       * Specify entity types to support.
            +       * 
            + * + * repeated string private_knowledge_graph_types = 4; + * + * @return This builder for chaining. + */ + public Builder clearPrivateKnowledgeGraphTypes() { + privateKnowledgeGraphTypes_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + ; + onChanged(); + return this; + } + + /** + * + * + *
            +       * Specify entity types to support.
            +       * 
            + * + * repeated string private_knowledge_graph_types = 4; + * + * @param value The bytes of the privateKnowledgeGraphTypes to add. + * @return This builder for chaining. + */ + public Builder addPrivateKnowledgeGraphTypesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensurePrivateKnowledgeGraphTypesIsMutable(); + privateKnowledgeGraphTypes_.add(value); + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private com.google.cloud.discoveryengine.v1beta.Engine.KnowledgeGraphConfig.FeatureConfig + featureConfig_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.Engine.KnowledgeGraphConfig.FeatureConfig, + com.google.cloud.discoveryengine.v1beta.Engine.KnowledgeGraphConfig.FeatureConfig + .Builder, + com.google.cloud.discoveryengine.v1beta.Engine.KnowledgeGraphConfig + .FeatureConfigOrBuilder> + featureConfigBuilder_; + + /** + * + * + *
            +       * Optional. Feature config for the Knowledge Graph.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Engine.KnowledgeGraphConfig.FeatureConfig feature_config = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the featureConfig field is set. + */ + public boolean hasFeatureConfig() { + return ((bitField0_ & 0x00000010) != 0); + } + + /** + * + * + *
            +       * Optional. Feature config for the Knowledge Graph.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Engine.KnowledgeGraphConfig.FeatureConfig feature_config = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The featureConfig. + */ + public com.google.cloud.discoveryengine.v1beta.Engine.KnowledgeGraphConfig.FeatureConfig + getFeatureConfig() { + if (featureConfigBuilder_ == null) { + return featureConfig_ == null + ? com.google.cloud.discoveryengine.v1beta.Engine.KnowledgeGraphConfig.FeatureConfig + .getDefaultInstance() + : featureConfig_; + } else { + return featureConfigBuilder_.getMessage(); + } + } + + /** + * + * + *
            +       * Optional. Feature config for the Knowledge Graph.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Engine.KnowledgeGraphConfig.FeatureConfig feature_config = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setFeatureConfig( + com.google.cloud.discoveryengine.v1beta.Engine.KnowledgeGraphConfig.FeatureConfig value) { + if (featureConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + featureConfig_ = value; + } else { + featureConfigBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
            +       * Optional. Feature config for the Knowledge Graph.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Engine.KnowledgeGraphConfig.FeatureConfig feature_config = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setFeatureConfig( + com.google.cloud.discoveryengine.v1beta.Engine.KnowledgeGraphConfig.FeatureConfig.Builder + builderForValue) { + if (featureConfigBuilder_ == null) { + featureConfig_ = builderForValue.build(); + } else { + featureConfigBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
            +       * Optional. Feature config for the Knowledge Graph.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Engine.KnowledgeGraphConfig.FeatureConfig feature_config = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeFeatureConfig( + com.google.cloud.discoveryengine.v1beta.Engine.KnowledgeGraphConfig.FeatureConfig value) { + if (featureConfigBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) + && featureConfig_ != null + && featureConfig_ + != com.google.cloud.discoveryengine.v1beta.Engine.KnowledgeGraphConfig + .FeatureConfig.getDefaultInstance()) { + getFeatureConfigBuilder().mergeFrom(value); + } else { + featureConfig_ = value; + } + } else { + featureConfigBuilder_.mergeFrom(value); + } + if (featureConfig_ != null) { + bitField0_ |= 0x00000010; + onChanged(); + } + return this; + } + + /** + * + * + *
            +       * Optional. Feature config for the Knowledge Graph.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Engine.KnowledgeGraphConfig.FeatureConfig feature_config = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearFeatureConfig() { + bitField0_ = (bitField0_ & ~0x00000010); + featureConfig_ = null; + if (featureConfigBuilder_ != null) { + featureConfigBuilder_.dispose(); + featureConfigBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
            +       * Optional. Feature config for the Knowledge Graph.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Engine.KnowledgeGraphConfig.FeatureConfig feature_config = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.discoveryengine.v1beta.Engine.KnowledgeGraphConfig.FeatureConfig + .Builder + getFeatureConfigBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return internalGetFeatureConfigFieldBuilder().getBuilder(); + } + + /** + * + * + *
            +       * Optional. Feature config for the Knowledge Graph.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Engine.KnowledgeGraphConfig.FeatureConfig feature_config = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.discoveryengine.v1beta.Engine.KnowledgeGraphConfig + .FeatureConfigOrBuilder + getFeatureConfigOrBuilder() { + if (featureConfigBuilder_ != null) { + return featureConfigBuilder_.getMessageOrBuilder(); + } else { + return featureConfig_ == null + ? com.google.cloud.discoveryengine.v1beta.Engine.KnowledgeGraphConfig.FeatureConfig + .getDefaultInstance() + : featureConfig_; + } + } + + /** + * + * + *
            +       * Optional. Feature config for the Knowledge Graph.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Engine.KnowledgeGraphConfig.FeatureConfig feature_config = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.Engine.KnowledgeGraphConfig.FeatureConfig, + com.google.cloud.discoveryengine.v1beta.Engine.KnowledgeGraphConfig.FeatureConfig + .Builder, + com.google.cloud.discoveryengine.v1beta.Engine.KnowledgeGraphConfig + .FeatureConfigOrBuilder> + internalGetFeatureConfigFieldBuilder() { + if (featureConfigBuilder_ == null) { + featureConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.Engine.KnowledgeGraphConfig.FeatureConfig, + com.google.cloud.discoveryengine.v1beta.Engine.KnowledgeGraphConfig.FeatureConfig + .Builder, + com.google.cloud.discoveryengine.v1beta.Engine.KnowledgeGraphConfig + .FeatureConfigOrBuilder>( + getFeatureConfig(), getParentForChildren(), isClean()); + featureConfig_ = null; + } + return featureConfigBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.Engine.KnowledgeGraphConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.Engine.KnowledgeGraphConfig) + private static final com.google.cloud.discoveryengine.v1beta.Engine.KnowledgeGraphConfig + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.discoveryengine.v1beta.Engine.KnowledgeGraphConfig(); + } + + public static com.google.cloud.discoveryengine.v1beta.Engine.KnowledgeGraphConfig + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public KnowledgeGraphConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Engine.KnowledgeGraphConfig + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface ChatEngineMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.Engine.ChatEngineMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
            +     * The resource name of a Dialogflow agent, that this Chat Engine refers
            +     * to.
            +     *
            +     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
            +     * ID>`.
            +     * 
            + * + * string dialogflow_agent = 1; + * + * @return The dialogflowAgent. + */ + java.lang.String getDialogflowAgent(); + + /** + * + * + *
            +     * The resource name of a Dialogflow agent, that this Chat Engine refers
            +     * to.
            +     *
            +     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
            +     * ID>`.
            +     * 
            + * + * string dialogflow_agent = 1; + * + * @return The bytes for dialogflowAgent. + */ + com.google.protobuf.ByteString getDialogflowAgentBytes(); + } + + /** + * + * + *
            +   * Additional information of a Chat Engine.
            +   * Fields in this message are output only.
            +   * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.Engine.ChatEngineMetadata} + */ + public static final class ChatEngineMetadata extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.Engine.ChatEngineMetadata) + ChatEngineMetadataOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ChatEngineMetadata"); + } + + // Use ChatEngineMetadata.newBuilder() to construct. + private ChatEngineMetadata(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ChatEngineMetadata() { + dialogflowAgent_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.EngineProto + .internal_static_google_cloud_discoveryengine_v1beta_Engine_ChatEngineMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.EngineProto + .internal_static_google_cloud_discoveryengine_v1beta_Engine_ChatEngineMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineMetadata.class, + com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineMetadata.Builder.class); + } + + public static final int DIALOGFLOW_AGENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object dialogflowAgent_ = ""; + + /** + * + * + *
            +     * The resource name of a Dialogflow agent, that this Chat Engine refers
            +     * to.
            +     *
            +     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
            +     * ID>`.
            +     * 
            + * + * string dialogflow_agent = 1; + * + * @return The dialogflowAgent. + */ + @java.lang.Override + public java.lang.String getDialogflowAgent() { + java.lang.Object ref = dialogflowAgent_; + 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(); + dialogflowAgent_ = s; + return s; + } + } + + /** + * + * + *
            +     * The resource name of a Dialogflow agent, that this Chat Engine refers
            +     * to.
            +     *
            +     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
            +     * ID>`.
            +     * 
            + * + * string dialogflow_agent = 1; + * + * @return The bytes for dialogflowAgent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDialogflowAgentBytes() { + java.lang.Object ref = dialogflowAgent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + dialogflowAgent_ = 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 { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(dialogflowAgent_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, dialogflowAgent_); + } + 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(dialogflowAgent_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, dialogflowAgent_); + } + 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.discoveryengine.v1beta.Engine.ChatEngineMetadata)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineMetadata other = + (com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineMetadata) obj; + + if (!getDialogflowAgent().equals(other.getDialogflowAgent())) 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) + DIALOGFLOW_AGENT_FIELD_NUMBER; + hash = (53 * hash) + getDialogflowAgent().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineMetadata parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineMetadata 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.discoveryengine.v1beta.Engine.ChatEngineMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineMetadata 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.discoveryengine.v1beta.Engine.ChatEngineMetadata parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineMetadata parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineMetadata parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineMetadata 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.discoveryengine.v1beta.Engine.ChatEngineMetadata + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineMetadata + 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.discoveryengine.v1beta.Engine.ChatEngineMetadata parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineMetadata 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.discoveryengine.v1beta.Engine.ChatEngineMetadata 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 information of a Chat Engine.
            +     * Fields in this message are output only.
            +     * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.Engine.ChatEngineMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.Engine.ChatEngineMetadata) + com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.EngineProto + .internal_static_google_cloud_discoveryengine_v1beta_Engine_ChatEngineMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.EngineProto + .internal_static_google_cloud_discoveryengine_v1beta_Engine_ChatEngineMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineMetadata.class, + com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineMetadata.Builder.class); + } + + // Construct using + // com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineMetadata.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + dialogflowAgent_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1beta.EngineProto + .internal_static_google_cloud_discoveryengine_v1beta_Engine_ChatEngineMetadata_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineMetadata + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineMetadata + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineMetadata build() { + com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineMetadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineMetadata buildPartial() { + com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineMetadata result = + new com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineMetadata(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineMetadata result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.dialogflowAgent_ = dialogflowAgent_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineMetadata) { + return mergeFrom( + (com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineMetadata) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineMetadata other) { + if (other + == com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineMetadata + .getDefaultInstance()) return this; + if (!other.getDialogflowAgent().isEmpty()) { + dialogflowAgent_ = other.dialogflowAgent_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + dialogflowAgent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object dialogflowAgent_ = ""; + + /** + * + * + *
            +       * The resource name of a Dialogflow agent, that this Chat Engine refers
            +       * to.
            +       *
            +       * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
            +       * ID>`.
            +       * 
            + * + * string dialogflow_agent = 1; + * + * @return The dialogflowAgent. + */ + public java.lang.String getDialogflowAgent() { + java.lang.Object ref = dialogflowAgent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + dialogflowAgent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
            +       * The resource name of a Dialogflow agent, that this Chat Engine refers
            +       * to.
            +       *
            +       * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
            +       * ID>`.
            +       * 
            + * + * string dialogflow_agent = 1; + * + * @return The bytes for dialogflowAgent. + */ + public com.google.protobuf.ByteString getDialogflowAgentBytes() { + java.lang.Object ref = dialogflowAgent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + dialogflowAgent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
            +       * The resource name of a Dialogflow agent, that this Chat Engine refers
            +       * to.
            +       *
            +       * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
            +       * ID>`.
            +       * 
            + * + * string dialogflow_agent = 1; + * + * @param value The dialogflowAgent to set. + * @return This builder for chaining. + */ + public Builder setDialogflowAgent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + dialogflowAgent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
            +       * The resource name of a Dialogflow agent, that this Chat Engine refers
            +       * to.
            +       *
            +       * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
            +       * ID>`.
            +       * 
            + * + * string dialogflow_agent = 1; + * + * @return This builder for chaining. + */ + public Builder clearDialogflowAgent() { + dialogflowAgent_ = getDefaultInstance().getDialogflowAgent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
            +       * The resource name of a Dialogflow agent, that this Chat Engine refers
            +       * to.
            +       *
            +       * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
            +       * ID>`.
            +       * 
            + * + * string dialogflow_agent = 1; + * + * @param value The bytes for dialogflowAgent to set. + * @return This builder for chaining. + */ + public Builder setDialogflowAgentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + dialogflowAgent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.Engine.ChatEngineMetadata) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.Engine.ChatEngineMetadata) + private static final com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineMetadata + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineMetadata(); + } + + public static com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineMetadata + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ChatEngineMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineMetadata + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int bitField0_; + private int engineConfigCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object engineConfig_; + + public enum EngineConfigCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + CHAT_ENGINE_CONFIG(11), + SEARCH_ENGINE_CONFIG(13), + MEDIA_RECOMMENDATION_ENGINE_CONFIG(14), + ENGINECONFIG_NOT_SET(0); + private final int value; + + private EngineConfigCase(int value) { + this.value = value; + } + + /** + * @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 EngineConfigCase valueOf(int value) { + return forNumber(value); + } + + public static EngineConfigCase forNumber(int value) { + switch (value) { + case 11: + return CHAT_ENGINE_CONFIG; + case 13: + return SEARCH_ENGINE_CONFIG; + case 14: + return MEDIA_RECOMMENDATION_ENGINE_CONFIG; + case 0: + return ENGINECONFIG_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public EngineConfigCase getEngineConfigCase() { + return EngineConfigCase.forNumber(engineConfigCase_); + } + + private int engineMetadataCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object engineMetadata_; + + public enum EngineMetadataCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + CHAT_ENGINE_METADATA(12), + ENGINEMETADATA_NOT_SET(0); + private final int value; + + private EngineMetadataCase(int value) { + this.value = value; + } + + /** + * @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 EngineMetadataCase valueOf(int value) { + return forNumber(value); + } + + public static EngineMetadataCase forNumber(int value) { + switch (value) { + case 12: + return CHAT_ENGINE_METADATA; + case 0: + return ENGINEMETADATA_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public EngineMetadataCase getEngineMetadataCase() { + return EngineMetadataCase.forNumber(engineMetadataCase_); + } + + public static final int CHAT_ENGINE_CONFIG_FIELD_NUMBER = 11; + + /** + * + * + *
            +   * Configurations for the Chat Engine. Only applicable if
            +   * [solution_type][google.cloud.discoveryengine.v1beta.Engine.solution_type]
            +   * is
            +   * [SOLUTION_TYPE_CHAT][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_CHAT].
            +   * 
            + * + * .google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig chat_engine_config = 11; + * + * + * @return Whether the chatEngineConfig field is set. + */ + @java.lang.Override + public boolean hasChatEngineConfig() { + return engineConfigCase_ == 11; + } + + /** + * + * + *
            +   * Configurations for the Chat Engine. Only applicable if
            +   * [solution_type][google.cloud.discoveryengine.v1beta.Engine.solution_type]
            +   * is
            +   * [SOLUTION_TYPE_CHAT][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_CHAT].
            +   * 
            + * + * .google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig chat_engine_config = 11; + * + * + * @return The chatEngineConfig. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig getChatEngineConfig() { + if (engineConfigCase_ == 11) { + return (com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig) engineConfig_; + } + return com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig.getDefaultInstance(); + } + + /** + * + * + *
            +   * Configurations for the Chat Engine. Only applicable if
            +   * [solution_type][google.cloud.discoveryengine.v1beta.Engine.solution_type]
            +   * is
            +   * [SOLUTION_TYPE_CHAT][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_CHAT].
            +   * 
            + * + * .google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig chat_engine_config = 11; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfigOrBuilder + getChatEngineConfigOrBuilder() { + if (engineConfigCase_ == 11) { + return (com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig) engineConfig_; + } + return com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig.getDefaultInstance(); + } + + public static final int SEARCH_ENGINE_CONFIG_FIELD_NUMBER = 13; + + /** + * + * + *
            +   * Configurations for the Search Engine. Only applicable if
            +   * [solution_type][google.cloud.discoveryengine.v1beta.Engine.solution_type]
            +   * is
            +   * [SOLUTION_TYPE_SEARCH][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_SEARCH].
            +   * 
            + * + * .google.cloud.discoveryengine.v1beta.Engine.SearchEngineConfig search_engine_config = 13; + * + * + * @return Whether the searchEngineConfig field is set. + */ + @java.lang.Override + public boolean hasSearchEngineConfig() { + return engineConfigCase_ == 13; + } + + /** + * + * + *
            +   * Configurations for the Search Engine. Only applicable if
            +   * [solution_type][google.cloud.discoveryengine.v1beta.Engine.solution_type]
            +   * is
            +   * [SOLUTION_TYPE_SEARCH][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_SEARCH].
            +   * 
            + * + * .google.cloud.discoveryengine.v1beta.Engine.SearchEngineConfig search_engine_config = 13; + * + * + * @return The searchEngineConfig. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Engine.SearchEngineConfig getSearchEngineConfig() { + if (engineConfigCase_ == 13) { + return (com.google.cloud.discoveryengine.v1beta.Engine.SearchEngineConfig) engineConfig_; + } + return com.google.cloud.discoveryengine.v1beta.Engine.SearchEngineConfig.getDefaultInstance(); + } + + /** + * + * + *
            +   * Configurations for the Search Engine. Only applicable if
            +   * [solution_type][google.cloud.discoveryengine.v1beta.Engine.solution_type]
            +   * is
            +   * [SOLUTION_TYPE_SEARCH][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_SEARCH].
            +   * 
            + * + * .google.cloud.discoveryengine.v1beta.Engine.SearchEngineConfig search_engine_config = 13; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Engine.SearchEngineConfigOrBuilder + getSearchEngineConfigOrBuilder() { + if (engineConfigCase_ == 13) { + return (com.google.cloud.discoveryengine.v1beta.Engine.SearchEngineConfig) engineConfig_; + } + return com.google.cloud.discoveryengine.v1beta.Engine.SearchEngineConfig.getDefaultInstance(); + } + + public static final int MEDIA_RECOMMENDATION_ENGINE_CONFIG_FIELD_NUMBER = 14; + + /** + * + * + *
            +   * Configurations for the Media Engine. Only applicable on the data
            +   * stores with
            +   * [solution_type][google.cloud.discoveryengine.v1beta.Engine.solution_type]
            +   * [SOLUTION_TYPE_RECOMMENDATION][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_RECOMMENDATION]
            +   * and
            +   * [IndustryVertical.MEDIA][google.cloud.discoveryengine.v1beta.IndustryVertical.MEDIA]
            +   * vertical.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig media_recommendation_engine_config = 14; + * + * + * @return Whether the mediaRecommendationEngineConfig field is set. + */ + @java.lang.Override + public boolean hasMediaRecommendationEngineConfig() { + return engineConfigCase_ == 14; + } + + /** + * + * + *
            +   * Configurations for the Media Engine. Only applicable on the data
            +   * stores with
            +   * [solution_type][google.cloud.discoveryengine.v1beta.Engine.solution_type]
            +   * [SOLUTION_TYPE_RECOMMENDATION][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_RECOMMENDATION]
            +   * and
            +   * [IndustryVertical.MEDIA][google.cloud.discoveryengine.v1beta.IndustryVertical.MEDIA]
            +   * vertical.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig media_recommendation_engine_config = 14; + * + * + * @return The mediaRecommendationEngineConfig. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + getMediaRecommendationEngineConfig() { + if (engineConfigCase_ == 14) { + return (com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig) + engineConfig_; + } + return com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .getDefaultInstance(); + } + + /** + * + * + *
            +   * Configurations for the Media Engine. Only applicable on the data
            +   * stores with
            +   * [solution_type][google.cloud.discoveryengine.v1beta.Engine.solution_type]
            +   * [SOLUTION_TYPE_RECOMMENDATION][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_RECOMMENDATION]
            +   * and
            +   * [IndustryVertical.MEDIA][google.cloud.discoveryengine.v1beta.IndustryVertical.MEDIA]
            +   * vertical.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig media_recommendation_engine_config = 14; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfigOrBuilder + getMediaRecommendationEngineConfigOrBuilder() { + if (engineConfigCase_ == 14) { + return (com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig) + engineConfig_; + } + return com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .getDefaultInstance(); + } + + public static final int CHAT_ENGINE_METADATA_FIELD_NUMBER = 12; + + /** + * + * + *
            +   * Output only. Additional information of the Chat Engine. Only applicable
            +   * if
            +   * [solution_type][google.cloud.discoveryengine.v1beta.Engine.solution_type]
            +   * is
            +   * [SOLUTION_TYPE_CHAT][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_CHAT].
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Engine.ChatEngineMetadata chat_engine_metadata = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the chatEngineMetadata field is set. + */ + @java.lang.Override + public boolean hasChatEngineMetadata() { + return engineMetadataCase_ == 12; + } + + /** + * + * + *
            +   * Output only. Additional information of the Chat Engine. Only applicable
            +   * if
            +   * [solution_type][google.cloud.discoveryengine.v1beta.Engine.solution_type]
            +   * is
            +   * [SOLUTION_TYPE_CHAT][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_CHAT].
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Engine.ChatEngineMetadata chat_engine_metadata = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The chatEngineMetadata. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineMetadata getChatEngineMetadata() { + if (engineMetadataCase_ == 12) { + return (com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineMetadata) engineMetadata_; + } + return com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineMetadata.getDefaultInstance(); + } + + /** + * + * + *
            +   * Output only. Additional information of the Chat Engine. Only applicable
            +   * if
            +   * [solution_type][google.cloud.discoveryengine.v1beta.Engine.solution_type]
            +   * is
            +   * [SOLUTION_TYPE_CHAT][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_CHAT].
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Engine.ChatEngineMetadata chat_engine_metadata = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineMetadataOrBuilder + getChatEngineMetadataOrBuilder() { + if (engineMetadataCase_ == 12) { + return (com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineMetadata) engineMetadata_; + } + return com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineMetadata.getDefaultInstance(); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
            +   * Immutable. Identifier. The fully qualified resource name of the engine.
            +   *
            +   * This field must be a UTF-8 encoded string with a length limit of 1024
            +   * characters.
            +   *
            +   * Format:
            +   * `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}`
            +   * engine should be 1-63 characters, and valid characters are
            +   * /[a-z0-9][a-z0-9-_]*/. Otherwise, an INVALID_ARGUMENT error is returned.
            +   * 
            + * + * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = IDENTIFIER]; + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + 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(); + name_ = s; + return s; + } + } + + /** + * + * + *
            +   * Immutable. Identifier. The fully qualified resource name of the engine.
            +   *
            +   * This field must be a UTF-8 encoded string with a length limit of 1024
            +   * characters.
            +   *
            +   * Format:
            +   * `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}`
            +   * engine should be 1-63 characters, and valid characters are
            +   * /[a-z0-9][a-z0-9-_]*/. Otherwise, an INVALID_ARGUMENT error is returned.
            +   * 
            + * + * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = IDENTIFIER]; + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DISPLAY_NAME_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object displayName_ = ""; + + /** + * + * + *
            +   * Required. The display name of the engine. Should be human readable. UTF-8
            +   * encoded string with limit of 1024 characters.
            +   * 
            + * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The displayName. + */ + @java.lang.Override + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + 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(); + displayName_ = s; + return s; + } + } + + /** + * + * + *
            +   * Required. The display name of the engine. Should be human readable. UTF-8
            +   * encoded string with limit of 1024 characters.
            +   * 
            + * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for displayName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CREATE_TIME_FIELD_NUMBER = 3; + private com.google.protobuf.Timestamp createTime_; + + /** + * + * + *
            +   * Output only. Timestamp the Recommendation Engine was created at.
            +   * 
            + * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
            +   * Output only. Timestamp the Recommendation Engine was created at.
            +   * 
            + * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + /** + * + * + *
            +   * Output only. Timestamp the Recommendation Engine was created at.
            +   * 
            + * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 4; + private com.google.protobuf.Timestamp updateTime_; + + /** + * + * + *
            +   * Output only. Timestamp the Recommendation Engine was last updated.
            +   * 
            + * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
            +   * Output only. Timestamp the Recommendation Engine was last updated.
            +   * 
            + * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + /** + * + * + *
            +   * Output only. Timestamp the Recommendation Engine was last updated.
            +   * 
            + * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + public static final int DATA_STORE_IDS_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList dataStoreIds_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + /** + * + * + *
            +   * Optional. The data stores associated with this engine.
            +   *
            +   * For
            +   * [SOLUTION_TYPE_SEARCH][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_SEARCH]
            +   * and
            +   * [SOLUTION_TYPE_RECOMMENDATION][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_RECOMMENDATION]
            +   * type of engines, they can only associate with at most one data store.
            +   *
            +   * If
            +   * [solution_type][google.cloud.discoveryengine.v1beta.Engine.solution_type]
            +   * is
            +   * [SOLUTION_TYPE_CHAT][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_CHAT],
            +   * multiple [DataStore][google.cloud.discoveryengine.v1beta.DataStore]s in the
            +   * same [Collection][google.cloud.discoveryengine.v1beta.Collection] can be
            +   * associated here.
            +   *
            +   * Note that when used in
            +   * [CreateEngineRequest][google.cloud.discoveryengine.v1beta.CreateEngineRequest],
            +   * one DataStore id must be provided as the system will use it for necessary
            +   * initializations.
            +   * 
            + * + * repeated string data_store_ids = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the dataStoreIds. + */ + public com.google.protobuf.ProtocolStringList getDataStoreIdsList() { + return dataStoreIds_; + } + + /** + * + * + *
            +   * Optional. The data stores associated with this engine.
            +   *
            +   * For
            +   * [SOLUTION_TYPE_SEARCH][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_SEARCH]
            +   * and
            +   * [SOLUTION_TYPE_RECOMMENDATION][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_RECOMMENDATION]
            +   * type of engines, they can only associate with at most one data store.
            +   *
            +   * If
            +   * [solution_type][google.cloud.discoveryengine.v1beta.Engine.solution_type]
            +   * is
            +   * [SOLUTION_TYPE_CHAT][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_CHAT],
            +   * multiple [DataStore][google.cloud.discoveryengine.v1beta.DataStore]s in the
            +   * same [Collection][google.cloud.discoveryengine.v1beta.Collection] can be
            +   * associated here.
            +   *
            +   * Note that when used in
            +   * [CreateEngineRequest][google.cloud.discoveryengine.v1beta.CreateEngineRequest],
            +   * one DataStore id must be provided as the system will use it for necessary
            +   * initializations.
            +   * 
            + * + * repeated string data_store_ids = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of dataStoreIds. + */ + public int getDataStoreIdsCount() { + return dataStoreIds_.size(); + } + + /** + * + * + *
            +   * Optional. The data stores associated with this engine.
            +   *
            +   * For
            +   * [SOLUTION_TYPE_SEARCH][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_SEARCH]
            +   * and
            +   * [SOLUTION_TYPE_RECOMMENDATION][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_RECOMMENDATION]
            +   * type of engines, they can only associate with at most one data store.
            +   *
            +   * If
            +   * [solution_type][google.cloud.discoveryengine.v1beta.Engine.solution_type]
            +   * is
            +   * [SOLUTION_TYPE_CHAT][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_CHAT],
            +   * multiple [DataStore][google.cloud.discoveryengine.v1beta.DataStore]s in the
            +   * same [Collection][google.cloud.discoveryengine.v1beta.Collection] can be
            +   * associated here.
            +   *
            +   * Note that when used in
            +   * [CreateEngineRequest][google.cloud.discoveryengine.v1beta.CreateEngineRequest],
            +   * one DataStore id must be provided as the system will use it for necessary
            +   * initializations.
            +   * 
            + * + * repeated string data_store_ids = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The dataStoreIds at the given index. + */ + public java.lang.String getDataStoreIds(int index) { + return dataStoreIds_.get(index); + } + + /** + * + * + *
            +   * Optional. The data stores associated with this engine.
            +   *
            +   * For
            +   * [SOLUTION_TYPE_SEARCH][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_SEARCH]
            +   * and
            +   * [SOLUTION_TYPE_RECOMMENDATION][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_RECOMMENDATION]
            +   * type of engines, they can only associate with at most one data store.
            +   *
            +   * If
            +   * [solution_type][google.cloud.discoveryengine.v1beta.Engine.solution_type]
            +   * is
            +   * [SOLUTION_TYPE_CHAT][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_CHAT],
            +   * multiple [DataStore][google.cloud.discoveryengine.v1beta.DataStore]s in the
            +   * same [Collection][google.cloud.discoveryengine.v1beta.Collection] can be
            +   * associated here.
            +   *
            +   * Note that when used in
            +   * [CreateEngineRequest][google.cloud.discoveryengine.v1beta.CreateEngineRequest],
            +   * one DataStore id must be provided as the system will use it for necessary
            +   * initializations.
            +   * 
            + * + * repeated string data_store_ids = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the dataStoreIds at the given index. + */ + public com.google.protobuf.ByteString getDataStoreIdsBytes(int index) { + return dataStoreIds_.getByteString(index); + } + + public static final int SOLUTION_TYPE_FIELD_NUMBER = 6; + private int solutionType_ = 0; + + /** + * + * + *
            +   * Required. The solutions of the engine.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SolutionType solution_type = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for solutionType. + */ + @java.lang.Override + public int getSolutionTypeValue() { + return solutionType_; + } + + /** + * + * + *
            +   * Required. The solutions of the engine.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SolutionType solution_type = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The solutionType. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.SolutionType getSolutionType() { + com.google.cloud.discoveryengine.v1beta.SolutionType result = + com.google.cloud.discoveryengine.v1beta.SolutionType.forNumber(solutionType_); + return result == null + ? com.google.cloud.discoveryengine.v1beta.SolutionType.UNRECOGNIZED + : result; + } + + public static final int INDUSTRY_VERTICAL_FIELD_NUMBER = 16; + private int industryVertical_ = 0; + + /** + * + * + *
            +   * Optional. The industry vertical that the engine registers.
            +   * The restriction of the Engine industry vertical is based on
            +   * [DataStore][google.cloud.discoveryengine.v1beta.DataStore]: Vertical on
            +   * Engine has to match vertical of the DataStore linked to the engine.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.IndustryVertical industry_vertical = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for industryVertical. + */ + @java.lang.Override + public int getIndustryVerticalValue() { + return industryVertical_; + } + + /** + * + * + *
            +   * Optional. The industry vertical that the engine registers.
            +   * The restriction of the Engine industry vertical is based on
            +   * [DataStore][google.cloud.discoveryengine.v1beta.DataStore]: Vertical on
            +   * Engine has to match vertical of the DataStore linked to the engine.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.IndustryVertical industry_vertical = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The industryVertical. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.IndustryVertical getIndustryVertical() { + com.google.cloud.discoveryengine.v1beta.IndustryVertical result = + com.google.cloud.discoveryengine.v1beta.IndustryVertical.forNumber(industryVertical_); + return result == null + ? com.google.cloud.discoveryengine.v1beta.IndustryVertical.UNRECOGNIZED + : result; + } + + public static final int COMMON_CONFIG_FIELD_NUMBER = 15; + private com.google.cloud.discoveryengine.v1beta.Engine.CommonConfig commonConfig_; + + /** + * + * + *
            +   * Common config spec that specifies the metadata of the engine.
            +   * 
            + * + * .google.cloud.discoveryengine.v1beta.Engine.CommonConfig common_config = 15; + * + * @return Whether the commonConfig field is set. + */ + @java.lang.Override + public boolean hasCommonConfig() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
            +   * Common config spec that specifies the metadata of the engine.
            +   * 
            + * + * .google.cloud.discoveryengine.v1beta.Engine.CommonConfig common_config = 15; + * + * @return The commonConfig. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Engine.CommonConfig getCommonConfig() { + return commonConfig_ == null + ? com.google.cloud.discoveryengine.v1beta.Engine.CommonConfig.getDefaultInstance() + : commonConfig_; + } + + /** + * + * + *
            +   * Common config spec that specifies the metadata of the engine.
            +   * 
            + * + * .google.cloud.discoveryengine.v1beta.Engine.CommonConfig common_config = 15; + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Engine.CommonConfigOrBuilder + getCommonConfigOrBuilder() { + return commonConfig_ == null + ? com.google.cloud.discoveryengine.v1beta.Engine.CommonConfig.getDefaultInstance() + : commonConfig_; + } + + public static final int KNOWLEDGE_GRAPH_CONFIG_FIELD_NUMBER = 23; + private com.google.cloud.discoveryengine.v1beta.Engine.KnowledgeGraphConfig knowledgeGraphConfig_; + + /** + * + * + *
            +   * Optional. Configurations for the Knowledge Graph. Only applicable if
            +   * [solution_type][google.cloud.discoveryengine.v1beta.Engine.solution_type]
            +   * is
            +   * [SOLUTION_TYPE_SEARCH][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_SEARCH].
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Engine.KnowledgeGraphConfig knowledge_graph_config = 23 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the knowledgeGraphConfig field is set. + */ + @java.lang.Override + public boolean hasKnowledgeGraphConfig() { + return ((bitField0_ & 0x00000008) != 0); + } + + /** + * + * + *
            +   * Optional. Configurations for the Knowledge Graph. Only applicable if
            +   * [solution_type][google.cloud.discoveryengine.v1beta.Engine.solution_type]
            +   * is
            +   * [SOLUTION_TYPE_SEARCH][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_SEARCH].
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Engine.KnowledgeGraphConfig knowledge_graph_config = 23 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The knowledgeGraphConfig. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Engine.KnowledgeGraphConfig + getKnowledgeGraphConfig() { + return knowledgeGraphConfig_ == null + ? com.google.cloud.discoveryengine.v1beta.Engine.KnowledgeGraphConfig.getDefaultInstance() + : knowledgeGraphConfig_; + } + + /** + * + * + *
            +   * Optional. Configurations for the Knowledge Graph. Only applicable if
            +   * [solution_type][google.cloud.discoveryengine.v1beta.Engine.solution_type]
            +   * is
            +   * [SOLUTION_TYPE_SEARCH][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_SEARCH].
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Engine.KnowledgeGraphConfig knowledge_graph_config = 23 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Engine.KnowledgeGraphConfigOrBuilder + getKnowledgeGraphConfigOrBuilder() { + return knowledgeGraphConfig_ == null + ? com.google.cloud.discoveryengine.v1beta.Engine.KnowledgeGraphConfig.getDefaultInstance() + : knowledgeGraphConfig_; + } + + public static final int APP_TYPE_FIELD_NUMBER = 24; + private int appType_ = 0; + + /** + * + * + *
            +   * Optional. Immutable. This the application type which this engine resource
            +   * represents. NOTE: this is a new concept independ of existing industry
            +   * vertical or solution type.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Engine.AppType app_type = 24 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The enum numeric value on the wire for appType. + */ + @java.lang.Override + public int getAppTypeValue() { + return appType_; + } + + /** + * + * + *
            +   * Optional. Immutable. This the application type which this engine resource
            +   * represents. NOTE: this is a new concept independ of existing industry
            +   * vertical or solution type.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Engine.AppType app_type = 24 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The appType. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Engine.AppType getAppType() { + com.google.cloud.discoveryengine.v1beta.Engine.AppType result = + com.google.cloud.discoveryengine.v1beta.Engine.AppType.forNumber(appType_); + return result == null + ? com.google.cloud.discoveryengine.v1beta.Engine.AppType.UNRECOGNIZED + : result; + } + + public static final int DISABLE_ANALYTICS_FIELD_NUMBER = 26; + private boolean disableAnalytics_ = false; + + /** + * + * + *
            +   * Optional. Whether to disable analytics for searches performed on this
            +   * engine.
            +   * 
            + * + * bool disable_analytics = 26 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The disableAnalytics. + */ + @java.lang.Override + public boolean getDisableAnalytics() { + return disableAnalytics_; + } + + public static final int FEATURES_FIELD_NUMBER = 30; + + private static final class FeaturesDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.discoveryengine.v1beta.EngineProto + .internal_static_google_cloud_discoveryengine_v1beta_Engine_FeaturesEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.ENUM, + com.google.cloud.discoveryengine.v1beta.Engine.FeatureState.FEATURE_STATE_UNSPECIFIED + .getNumber()); + } + + @SuppressWarnings("serial") + private com.google.protobuf.MapField features_; + + private com.google.protobuf.MapField internalGetFeatures() { + if (features_ == null) { + return com.google.protobuf.MapField.emptyMapField(FeaturesDefaultEntryHolder.defaultEntry); + } + return features_; + } + + private static final com.google.protobuf.Internal.MapAdapter.Converter< + java.lang.Integer, com.google.cloud.discoveryengine.v1beta.Engine.FeatureState> + featuresValueConverter = + com.google.protobuf.Internal.MapAdapter.newEnumConverter( + com.google.cloud.discoveryengine.v1beta.Engine.FeatureState.internalGetValueMap(), + com.google.cloud.discoveryengine.v1beta.Engine.FeatureState.UNRECOGNIZED); + + private static final java.util.Map< + java.lang.String, com.google.cloud.discoveryengine.v1beta.Engine.FeatureState> + internalGetAdaptedFeaturesMap(java.util.Map map) { + return new com.google.protobuf.Internal.MapAdapter< + java.lang.String, + com.google.cloud.discoveryengine.v1beta.Engine.FeatureState, + java.lang.Integer>(map, featuresValueConverter); + } + + public int getFeaturesCount() { + return internalGetFeatures().getMap().size(); + } + + /** + * + * + *
            +   * Optional. Feature config for the engine to opt in or opt out of features.
            +   * Supported keys:
            +   *
            +   * * `*`: all features, if it's present, all other feature state settings are
            +   * ignored.
            +   * * `agent-gallery`
            +   * * `no-code-agent-builder`
            +   * * `prompt-gallery`
            +   * * `model-selector`
            +   * * `notebook-lm`
            +   * * `people-search`
            +   * * `people-search-org-chart`
            +   * * `bi-directional-audio`
            +   * * `feedback`
            +   * * `session-sharing`
            +   * * `personalization-memory`
            +   * * `personalization-suggested-highlights`
            +   * * `mobile-app-access`
            +   * * `disable-agent-sharing`
            +   * * `disable-image-generation`
            +   * * `disable-video-generation`
            +   * * `disable-onedrive-upload`
            +   * * `disable-talk-to-content`
            +   * * `disable-google-drive-upload`
            +   * * `disable-welcome-emails`
            +   * * `disable-canvas`
            +   * * `disable-canvas-workspace`
            +   * * `disable-skills`
            +   * * `enable-end-user-sharing-with-groups`
            +   * * `single-agent-orchestration`
            +   * * `multi-agent-orchestration`
            +   * * `cross-product-intelligence`
            +   * 
            + * + * + * map<string, .google.cloud.discoveryengine.v1beta.Engine.FeatureState> features = 30 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public boolean containsFeatures(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetFeatures().getMap().containsKey(key); + } + + /** Use {@link #getFeaturesMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map< + java.lang.String, com.google.cloud.discoveryengine.v1beta.Engine.FeatureState> + getFeatures() { + return getFeaturesMap(); + } + + /** + * + * + *
            +   * Optional. Feature config for the engine to opt in or opt out of features.
            +   * Supported keys:
            +   *
            +   * * `*`: all features, if it's present, all other feature state settings are
            +   * ignored.
            +   * * `agent-gallery`
            +   * * `no-code-agent-builder`
            +   * * `prompt-gallery`
            +   * * `model-selector`
            +   * * `notebook-lm`
            +   * * `people-search`
            +   * * `people-search-org-chart`
            +   * * `bi-directional-audio`
            +   * * `feedback`
            +   * * `session-sharing`
            +   * * `personalization-memory`
            +   * * `personalization-suggested-highlights`
            +   * * `mobile-app-access`
            +   * * `disable-agent-sharing`
            +   * * `disable-image-generation`
            +   * * `disable-video-generation`
            +   * * `disable-onedrive-upload`
            +   * * `disable-talk-to-content`
            +   * * `disable-google-drive-upload`
            +   * * `disable-welcome-emails`
            +   * * `disable-canvas`
            +   * * `disable-canvas-workspace`
            +   * * `disable-skills`
            +   * * `enable-end-user-sharing-with-groups`
            +   * * `single-agent-orchestration`
            +   * * `multi-agent-orchestration`
            +   * * `cross-product-intelligence`
            +   * 
            + * + * + * map<string, .google.cloud.discoveryengine.v1beta.Engine.FeatureState> features = 30 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.Map< + java.lang.String, com.google.cloud.discoveryengine.v1beta.Engine.FeatureState> + getFeaturesMap() { + return internalGetAdaptedFeaturesMap(internalGetFeatures().getMap()); + } + + /** + * + * + *
            +   * Optional. Feature config for the engine to opt in or opt out of features.
            +   * Supported keys:
            +   *
            +   * * `*`: all features, if it's present, all other feature state settings are
            +   * ignored.
            +   * * `agent-gallery`
            +   * * `no-code-agent-builder`
            +   * * `prompt-gallery`
            +   * * `model-selector`
            +   * * `notebook-lm`
            +   * * `people-search`
            +   * * `people-search-org-chart`
            +   * * `bi-directional-audio`
            +   * * `feedback`
            +   * * `session-sharing`
            +   * * `personalization-memory`
            +   * * `personalization-suggested-highlights`
            +   * * `mobile-app-access`
            +   * * `disable-agent-sharing`
            +   * * `disable-image-generation`
            +   * * `disable-video-generation`
            +   * * `disable-onedrive-upload`
            +   * * `disable-talk-to-content`
            +   * * `disable-google-drive-upload`
            +   * * `disable-welcome-emails`
            +   * * `disable-canvas`
            +   * * `disable-canvas-workspace`
            +   * * `disable-skills`
            +   * * `enable-end-user-sharing-with-groups`
            +   * * `single-agent-orchestration`
            +   * * `multi-agent-orchestration`
            +   * * `cross-product-intelligence`
            +   * 
            + * + * + * map<string, .google.cloud.discoveryengine.v1beta.Engine.FeatureState> features = 30 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public /* nullable */ com.google.cloud.discoveryengine.v1beta.Engine.FeatureState + getFeaturesOrDefault( + java.lang.String key, + /* nullable */ + com.google.cloud.discoveryengine.v1beta.Engine.FeatureState defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetFeatures().getMap(); + return map.containsKey(key) ? featuresValueConverter.doForward(map.get(key)) : defaultValue; + } + + /** + * + * + *
            +   * Optional. Feature config for the engine to opt in or opt out of features.
            +   * Supported keys:
            +   *
            +   * * `*`: all features, if it's present, all other feature state settings are
            +   * ignored.
            +   * * `agent-gallery`
            +   * * `no-code-agent-builder`
            +   * * `prompt-gallery`
            +   * * `model-selector`
            +   * * `notebook-lm`
            +   * * `people-search`
            +   * * `people-search-org-chart`
            +   * * `bi-directional-audio`
            +   * * `feedback`
            +   * * `session-sharing`
            +   * * `personalization-memory`
            +   * * `personalization-suggested-highlights`
            +   * * `mobile-app-access`
            +   * * `disable-agent-sharing`
            +   * * `disable-image-generation`
            +   * * `disable-video-generation`
            +   * * `disable-onedrive-upload`
            +   * * `disable-talk-to-content`
            +   * * `disable-google-drive-upload`
            +   * * `disable-welcome-emails`
            +   * * `disable-canvas`
            +   * * `disable-canvas-workspace`
            +   * * `disable-skills`
            +   * * `enable-end-user-sharing-with-groups`
            +   * * `single-agent-orchestration`
            +   * * `multi-agent-orchestration`
            +   * * `cross-product-intelligence`
            +   * 
            + * + * + * map<string, .google.cloud.discoveryengine.v1beta.Engine.FeatureState> features = 30 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Engine.FeatureState getFeaturesOrThrow( + java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetFeatures().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return featuresValueConverter.doForward(map.get(key)); + } + + /** Use {@link #getFeaturesValueMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getFeaturesValue() { + return getFeaturesValueMap(); + } + + /** + * + * + *
            +   * Optional. Feature config for the engine to opt in or opt out of features.
            +   * Supported keys:
            +   *
            +   * * `*`: all features, if it's present, all other feature state settings are
            +   * ignored.
            +   * * `agent-gallery`
            +   * * `no-code-agent-builder`
            +   * * `prompt-gallery`
            +   * * `model-selector`
            +   * * `notebook-lm`
            +   * * `people-search`
            +   * * `people-search-org-chart`
            +   * * `bi-directional-audio`
            +   * * `feedback`
            +   * * `session-sharing`
            +   * * `personalization-memory`
            +   * * `personalization-suggested-highlights`
            +   * * `mobile-app-access`
            +   * * `disable-agent-sharing`
            +   * * `disable-image-generation`
            +   * * `disable-video-generation`
            +   * * `disable-onedrive-upload`
            +   * * `disable-talk-to-content`
            +   * * `disable-google-drive-upload`
            +   * * `disable-welcome-emails`
            +   * * `disable-canvas`
            +   * * `disable-canvas-workspace`
            +   * * `disable-skills`
            +   * * `enable-end-user-sharing-with-groups`
            +   * * `single-agent-orchestration`
            +   * * `multi-agent-orchestration`
            +   * * `cross-product-intelligence`
            +   * 
            + * + * + * map<string, .google.cloud.discoveryengine.v1beta.Engine.FeatureState> features = 30 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.Map getFeaturesValueMap() { + return internalGetFeatures().getMap(); + } + + /** + * + * + *
            +   * Optional. Feature config for the engine to opt in or opt out of features.
            +   * Supported keys:
            +   *
            +   * * `*`: all features, if it's present, all other feature state settings are
            +   * ignored.
            +   * * `agent-gallery`
            +   * * `no-code-agent-builder`
            +   * * `prompt-gallery`
            +   * * `model-selector`
            +   * * `notebook-lm`
            +   * * `people-search`
            +   * * `people-search-org-chart`
            +   * * `bi-directional-audio`
            +   * * `feedback`
            +   * * `session-sharing`
            +   * * `personalization-memory`
            +   * * `personalization-suggested-highlights`
            +   * * `mobile-app-access`
            +   * * `disable-agent-sharing`
            +   * * `disable-image-generation`
            +   * * `disable-video-generation`
            +   * * `disable-onedrive-upload`
            +   * * `disable-talk-to-content`
            +   * * `disable-google-drive-upload`
            +   * * `disable-welcome-emails`
            +   * * `disable-canvas`
            +   * * `disable-canvas-workspace`
            +   * * `disable-skills`
            +   * * `enable-end-user-sharing-with-groups`
            +   * * `single-agent-orchestration`
            +   * * `multi-agent-orchestration`
            +   * * `cross-product-intelligence`
            +   * 
            + * + * + * map<string, .google.cloud.discoveryengine.v1beta.Engine.FeatureState> features = 30 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public int getFeaturesValueOrDefault(java.lang.String key, int defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetFeatures().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + + /** + * + * + *
            +   * Optional. Feature config for the engine to opt in or opt out of features.
            +   * Supported keys:
            +   *
            +   * * `*`: all features, if it's present, all other feature state settings are
            +   * ignored.
            +   * * `agent-gallery`
            +   * * `no-code-agent-builder`
            +   * * `prompt-gallery`
            +   * * `model-selector`
            +   * * `notebook-lm`
            +   * * `people-search`
            +   * * `people-search-org-chart`
            +   * * `bi-directional-audio`
            +   * * `feedback`
            +   * * `session-sharing`
            +   * * `personalization-memory`
            +   * * `personalization-suggested-highlights`
            +   * * `mobile-app-access`
            +   * * `disable-agent-sharing`
            +   * * `disable-image-generation`
            +   * * `disable-video-generation`
            +   * * `disable-onedrive-upload`
            +   * * `disable-talk-to-content`
            +   * * `disable-google-drive-upload`
            +   * * `disable-welcome-emails`
            +   * * `disable-canvas`
            +   * * `disable-canvas-workspace`
            +   * * `disable-skills`
            +   * * `enable-end-user-sharing-with-groups`
            +   * * `single-agent-orchestration`
            +   * * `multi-agent-orchestration`
            +   * * `cross-product-intelligence`
            +   * 
            + * + * + * map<string, .google.cloud.discoveryengine.v1beta.Engine.FeatureState> features = 30 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public int getFeaturesValueOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetFeatures().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int CMEK_CONFIG_FIELD_NUMBER = 32; + private com.google.cloud.discoveryengine.v1beta.CmekConfig cmekConfig_; + + /** + * + * + *
            +   * Output only. CMEK-related information for the Engine.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.CmekConfig cmek_config = 32 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the cmekConfig field is set. + */ + @java.lang.Override + public boolean hasCmekConfig() { + return ((bitField0_ & 0x00000010) != 0); + } + + /** + * + * + *
            +   * Output only. CMEK-related information for the Engine.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.CmekConfig cmek_config = 32 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The cmekConfig. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.CmekConfig getCmekConfig() { + return cmekConfig_ == null + ? com.google.cloud.discoveryengine.v1beta.CmekConfig.getDefaultInstance() + : cmekConfig_; + } + + /** + * + * + *
            +   * Output only. CMEK-related information for the Engine.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.CmekConfig cmek_config = 32 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.CmekConfigOrBuilder getCmekConfigOrBuilder() { + return cmekConfig_ == null + ? com.google.cloud.discoveryengine.v1beta.CmekConfig.getDefaultInstance() + : cmekConfig_; + } + + public static final int CONFIGURABLE_BILLING_APPROACH_FIELD_NUMBER = 36; + private int configurableBillingApproach_ = 0; + + /** + * + * + *
            +   * Optional. Configuration for configurable billing approach.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Engine.ConfigurableBillingApproach configurable_billing_approach = 36 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for configurableBillingApproach. + */ + @java.lang.Override + public int getConfigurableBillingApproachValue() { + return configurableBillingApproach_; + } + + /** + * + * + *
            +   * Optional. Configuration for configurable billing approach.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Engine.ConfigurableBillingApproach configurable_billing_approach = 36 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The configurableBillingApproach. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Engine.ConfigurableBillingApproach + getConfigurableBillingApproach() { + com.google.cloud.discoveryengine.v1beta.Engine.ConfigurableBillingApproach result = + com.google.cloud.discoveryengine.v1beta.Engine.ConfigurableBillingApproach.forNumber( + configurableBillingApproach_); + return result == null + ? com.google.cloud.discoveryengine.v1beta.Engine.ConfigurableBillingApproach.UNRECOGNIZED + : result; + } + + public static final int MODEL_CONFIGS_FIELD_NUMBER = 37; + + private static final class ModelConfigsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.discoveryengine.v1beta.EngineProto + .internal_static_google_cloud_discoveryengine_v1beta_Engine_ModelConfigsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.ENUM, + com.google.cloud.discoveryengine.v1beta.Engine.ModelState.MODEL_STATE_UNSPECIFIED + .getNumber()); + } + + @SuppressWarnings("serial") + private com.google.protobuf.MapField modelConfigs_; + + private com.google.protobuf.MapField + internalGetModelConfigs() { + if (modelConfigs_ == null) { + return com.google.protobuf.MapField.emptyMapField( + ModelConfigsDefaultEntryHolder.defaultEntry); + } + return modelConfigs_; + } + + private static final com.google.protobuf.Internal.MapAdapter.Converter< + java.lang.Integer, com.google.cloud.discoveryengine.v1beta.Engine.ModelState> + modelConfigsValueConverter = + com.google.protobuf.Internal.MapAdapter.newEnumConverter( + com.google.cloud.discoveryengine.v1beta.Engine.ModelState.internalGetValueMap(), + com.google.cloud.discoveryengine.v1beta.Engine.ModelState.UNRECOGNIZED); + + private static final java.util.Map< + java.lang.String, com.google.cloud.discoveryengine.v1beta.Engine.ModelState> + internalGetAdaptedModelConfigsMap(java.util.Map map) { + return new com.google.protobuf.Internal.MapAdapter< + java.lang.String, + com.google.cloud.discoveryengine.v1beta.Engine.ModelState, + java.lang.Integer>(map, modelConfigsValueConverter); + } + + public int getModelConfigsCount() { + return internalGetModelConfigs().getMap().size(); + } + + /** + * + * + *
            +   * Optional. Maps a model name to its specific configuration for this engine.
            +   * This allows admin users to turn on/off individual models. This only stores
            +   * models whose states are overridden by the admin.
            +   *
            +   * When the state is unspecified, or model_configs is empty for this
            +   * model, the system will decide if this model should be available or not
            +   * based on the default configuration. For example, a preview model
            +   * should be disabled by default if the admin has not chosen to enable it.
            +   * 
            + * + * + * map<string, .google.cloud.discoveryengine.v1beta.Engine.ModelState> model_configs = 37 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public boolean containsModelConfigs(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetModelConfigs().getMap().containsKey(key); + } + + /** Use {@link #getModelConfigsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map + getModelConfigs() { + return getModelConfigsMap(); + } + + /** + * + * + *
            +   * Optional. Maps a model name to its specific configuration for this engine.
            +   * This allows admin users to turn on/off individual models. This only stores
            +   * models whose states are overridden by the admin.
            +   *
            +   * When the state is unspecified, or model_configs is empty for this
            +   * model, the system will decide if this model should be available or not
            +   * based on the default configuration. For example, a preview model
            +   * should be disabled by default if the admin has not chosen to enable it.
            +   * 
            + * + * + * map<string, .google.cloud.discoveryengine.v1beta.Engine.ModelState> model_configs = 37 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.Map + getModelConfigsMap() { + return internalGetAdaptedModelConfigsMap(internalGetModelConfigs().getMap()); + } + + /** + * + * + *
            +   * Optional. Maps a model name to its specific configuration for this engine.
            +   * This allows admin users to turn on/off individual models. This only stores
            +   * models whose states are overridden by the admin.
            +   *
            +   * When the state is unspecified, or model_configs is empty for this
            +   * model, the system will decide if this model should be available or not
            +   * based on the default configuration. For example, a preview model
            +   * should be disabled by default if the admin has not chosen to enable it.
            +   * 
            + * + * + * map<string, .google.cloud.discoveryengine.v1beta.Engine.ModelState> model_configs = 37 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public /* nullable */ com.google.cloud.discoveryengine.v1beta.Engine.ModelState + getModelConfigsOrDefault( + java.lang.String key, + /* nullable */ + com.google.cloud.discoveryengine.v1beta.Engine.ModelState defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetModelConfigs().getMap(); + return map.containsKey(key) ? modelConfigsValueConverter.doForward(map.get(key)) : defaultValue; + } + + /** + * + * + *
            +   * Optional. Maps a model name to its specific configuration for this engine.
            +   * This allows admin users to turn on/off individual models. This only stores
            +   * models whose states are overridden by the admin.
            +   *
            +   * When the state is unspecified, or model_configs is empty for this
            +   * model, the system will decide if this model should be available or not
            +   * based on the default configuration. For example, a preview model
            +   * should be disabled by default if the admin has not chosen to enable it.
            +   * 
            + * + * + * map<string, .google.cloud.discoveryengine.v1beta.Engine.ModelState> model_configs = 37 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Engine.ModelState getModelConfigsOrThrow( + java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetModelConfigs().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return modelConfigsValueConverter.doForward(map.get(key)); + } + + /** Use {@link #getModelConfigsValueMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getModelConfigsValue() { + return getModelConfigsValueMap(); + } + + /** + * + * + *
            +   * Optional. Maps a model name to its specific configuration for this engine.
            +   * This allows admin users to turn on/off individual models. This only stores
            +   * models whose states are overridden by the admin.
            +   *
            +   * When the state is unspecified, or model_configs is empty for this
            +   * model, the system will decide if this model should be available or not
            +   * based on the default configuration. For example, a preview model
            +   * should be disabled by default if the admin has not chosen to enable it.
            +   * 
            + * + * + * map<string, .google.cloud.discoveryengine.v1beta.Engine.ModelState> model_configs = 37 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.Map getModelConfigsValueMap() { + return internalGetModelConfigs().getMap(); + } + + /** + * + * + *
            +   * Optional. Maps a model name to its specific configuration for this engine.
            +   * This allows admin users to turn on/off individual models. This only stores
            +   * models whose states are overridden by the admin.
            +   *
            +   * When the state is unspecified, or model_configs is empty for this
            +   * model, the system will decide if this model should be available or not
            +   * based on the default configuration. For example, a preview model
            +   * should be disabled by default if the admin has not chosen to enable it.
            +   * 
            + * + * + * map<string, .google.cloud.discoveryengine.v1beta.Engine.ModelState> model_configs = 37 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public int getModelConfigsValueOrDefault(java.lang.String key, int defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetModelConfigs().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + + /** + * + * + *
            +   * Optional. Maps a model name to its specific configuration for this engine.
            +   * This allows admin users to turn on/off individual models. This only stores
            +   * models whose states are overridden by the admin.
            +   *
            +   * When the state is unspecified, or model_configs is empty for this
            +   * model, the system will decide if this model should be available or not
            +   * based on the default configuration. For example, a preview model
            +   * should be disabled by default if the admin has not chosen to enable it.
            +   * 
            + * + * + * map<string, .google.cloud.discoveryengine.v1beta.Engine.ModelState> model_configs = 37 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public int getModelConfigsValueOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetModelConfigs().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int OBSERVABILITY_CONFIG_FIELD_NUMBER = 39; + private com.google.cloud.discoveryengine.v1beta.ObservabilityConfig observabilityConfig_; + + /** + * + * + *
            +   * Optional. Observability config for the engine.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.ObservabilityConfig observability_config = 39 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the observabilityConfig field is set. + */ + @java.lang.Override + public boolean hasObservabilityConfig() { + return ((bitField0_ & 0x00000020) != 0); + } + + /** + * + * + *
            +   * Optional. Observability config for the engine.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.ObservabilityConfig observability_config = 39 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The observabilityConfig. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.ObservabilityConfig getObservabilityConfig() { + return observabilityConfig_ == null + ? com.google.cloud.discoveryengine.v1beta.ObservabilityConfig.getDefaultInstance() + : observabilityConfig_; + } + + /** + * + * + *
            +   * Optional. Observability config for the engine.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.ObservabilityConfig observability_config = 39 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.ObservabilityConfigOrBuilder + getObservabilityConfigOrBuilder() { + return observabilityConfig_ == null + ? com.google.cloud.discoveryengine.v1beta.ObservabilityConfig.getDefaultInstance() + : observabilityConfig_; + } + + public static final int CONNECTOR_TENANT_INFO_FIELD_NUMBER = 42; + + private static final class ConnectorTenantInfoDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.discoveryengine.v1beta.EngineProto + .internal_static_google_cloud_discoveryengine_v1beta_Engine_ConnectorTenantInfoEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + @SuppressWarnings("serial") + private com.google.protobuf.MapField connectorTenantInfo_; + + private com.google.protobuf.MapField + internalGetConnectorTenantInfo() { + if (connectorTenantInfo_ == null) { + return com.google.protobuf.MapField.emptyMapField( + ConnectorTenantInfoDefaultEntryHolder.defaultEntry); + } + return connectorTenantInfo_; + } + + public int getConnectorTenantInfoCount() { + return internalGetConnectorTenantInfo().getMap().size(); + } + + /** + * + * + *
            +   * Optional. Maps a connector ID (e.g., "hybrid-github", "shopify") to
            +   * tenant-specific information required for that connector. The structure of
            +   * the tenant information string is connector-dependent.
            +   * 
            + * + * + * map<string, string> connector_tenant_info = 42 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public boolean containsConnectorTenantInfo(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetConnectorTenantInfo().getMap().containsKey(key); + } + + /** Use {@link #getConnectorTenantInfoMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getConnectorTenantInfo() { + return getConnectorTenantInfoMap(); + } + + /** + * + * + *
            +   * Optional. Maps a connector ID (e.g., "hybrid-github", "shopify") to
            +   * tenant-specific information required for that connector. The structure of
            +   * the tenant information string is connector-dependent.
            +   * 
            + * + * + * map<string, string> connector_tenant_info = 42 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.Map getConnectorTenantInfoMap() { + return internalGetConnectorTenantInfo().getMap(); + } + + /** + * + * + *
            +   * Optional. Maps a connector ID (e.g., "hybrid-github", "shopify") to
            +   * tenant-specific information required for that connector. The structure of
            +   * the tenant information string is connector-dependent.
            +   * 
            + * + * + * map<string, string> connector_tenant_info = 42 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public /* nullable */ java.lang.String getConnectorTenantInfoOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = + internalGetConnectorTenantInfo().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + + /** + * + * + *
            +   * Optional. Maps a connector ID (e.g., "hybrid-github", "shopify") to
            +   * tenant-specific information required for that connector. The structure of
            +   * the tenant information string is connector-dependent.
            +   * 
            + * + * + * map<string, string> connector_tenant_info = 42 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.lang.String getConnectorTenantInfoOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = + internalGetConnectorTenantInfo().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int AGENT_GATEWAY_SETTING_FIELD_NUMBER = 43; + private com.google.cloud.discoveryengine.v1beta.AgentGatewaySetting agentGatewaySetting_; + + /** + * + * + *
            +   * Optional. The agent gateway setting for the engine.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AgentGatewaySetting agent_gateway_setting = 43 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the agentGatewaySetting field is set. + */ + @java.lang.Override + public boolean hasAgentGatewaySetting() { + return ((bitField0_ & 0x00000040) != 0); + } + + /** + * + * + *
            +   * Optional. The agent gateway setting for the engine.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AgentGatewaySetting agent_gateway_setting = 43 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The agentGatewaySetting. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AgentGatewaySetting getAgentGatewaySetting() { + return agentGatewaySetting_ == null + ? com.google.cloud.discoveryengine.v1beta.AgentGatewaySetting.getDefaultInstance() + : agentGatewaySetting_; + } + + /** + * + * + *
            +   * Optional. The agent gateway setting for the engine.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AgentGatewaySetting agent_gateway_setting = 43 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AgentGatewaySettingOrBuilder + getAgentGatewaySettingOrBuilder() { + return agentGatewaySetting_ == null + ? com.google.cloud.discoveryengine.v1beta.AgentGatewaySetting.getDefaultInstance() + : agentGatewaySetting_; + } + + public static final int MARKETPLACE_AGENT_VISIBILITY_FIELD_NUMBER = 44; + private int marketplaceAgentVisibility_ = 0; + + /** + * + * + *
            +   * Optional. The visibility of marketplace agents in the agent gallery.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Engine.MarketplaceAgentVisibility marketplace_agent_visibility = 44 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for marketplaceAgentVisibility. + */ + @java.lang.Override + public int getMarketplaceAgentVisibilityValue() { + return marketplaceAgentVisibility_; + } + + /** + * + * + *
            +   * Optional. The visibility of marketplace agents in the agent gallery.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Engine.MarketplaceAgentVisibility marketplace_agent_visibility = 44 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The marketplaceAgentVisibility. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Engine.MarketplaceAgentVisibility + getMarketplaceAgentVisibility() { + com.google.cloud.discoveryengine.v1beta.Engine.MarketplaceAgentVisibility result = + com.google.cloud.discoveryengine.v1beta.Engine.MarketplaceAgentVisibility.forNumber( + marketplaceAgentVisibility_); + return result == null + ? com.google.cloud.discoveryengine.v1beta.Engine.MarketplaceAgentVisibility.UNRECOGNIZED + : result; + } + + public static final int PROCUREMENT_CONTACT_EMAILS_FIELD_NUMBER = 45; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList procurementContactEmails_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + /** + * + * + *
            +   * Optional. The emails of the procurement contacts.
            +   * 
            + * + * + * repeated string procurement_contact_emails = 45 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the procurementContactEmails. + */ + public com.google.protobuf.ProtocolStringList getProcurementContactEmailsList() { + return procurementContactEmails_; + } + + /** + * + * + *
            +   * Optional. The emails of the procurement contacts.
            +   * 
            + * + * + * repeated string procurement_contact_emails = 45 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The count of procurementContactEmails. + */ + public int getProcurementContactEmailsCount() { + return procurementContactEmails_.size(); + } + + /** + * + * + *
            +   * Optional. The emails of the procurement contacts.
            +   * 
            + * + * + * repeated string procurement_contact_emails = 45 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the element to return. + * @return The procurementContactEmails at the given index. + */ + public java.lang.String getProcurementContactEmails(int index) { + return procurementContactEmails_.get(index); + } + + /** + * + * + *
            +   * Optional. The emails of the procurement contacts.
            +   * 
            + * + * + * repeated string procurement_contact_emails = 45 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the value to return. + * @return The bytes of the procurementContactEmails at the given index. + */ + public com.google.protobuf.ByteString getProcurementContactEmailsBytes(int index) { + return procurementContactEmails_.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 (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(displayName_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, displayName_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(3, getCreateTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(4, getUpdateTime()); + } + for (int i = 0; i < dataStoreIds_.size(); i++) { + com.google.protobuf.GeneratedMessage.writeString(output, 5, dataStoreIds_.getRaw(i)); + } + if (solutionType_ + != com.google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_UNSPECIFIED + .getNumber()) { + output.writeEnum(6, solutionType_); + } + if (engineConfigCase_ == 11) { output.writeMessage( 11, (com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig) engineConfig_); } - if (engineMetadataCase_ == 12) { - output.writeMessage( - 12, (com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineMetadata) engineMetadata_); + if (engineMetadataCase_ == 12) { + output.writeMessage( + 12, (com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineMetadata) engineMetadata_); + } + if (engineConfigCase_ == 13) { + output.writeMessage( + 13, (com.google.cloud.discoveryengine.v1beta.Engine.SearchEngineConfig) engineConfig_); + } + if (engineConfigCase_ == 14) { + output.writeMessage( + 14, + (com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig) + engineConfig_); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeMessage(15, getCommonConfig()); + } + if (industryVertical_ + != com.google.cloud.discoveryengine.v1beta.IndustryVertical.INDUSTRY_VERTICAL_UNSPECIFIED + .getNumber()) { + output.writeEnum(16, industryVertical_); + } + if (((bitField0_ & 0x00000008) != 0)) { + output.writeMessage(23, getKnowledgeGraphConfig()); + } + if (appType_ + != com.google.cloud.discoveryengine.v1beta.Engine.AppType.APP_TYPE_UNSPECIFIED + .getNumber()) { + output.writeEnum(24, appType_); + } + if (disableAnalytics_ != false) { + output.writeBool(26, disableAnalytics_); + } + com.google.protobuf.GeneratedMessage.serializeStringMapTo( + output, internalGetFeatures(), FeaturesDefaultEntryHolder.defaultEntry, 30); + if (((bitField0_ & 0x00000010) != 0)) { + output.writeMessage(32, getCmekConfig()); + } + if (configurableBillingApproach_ + != com.google.cloud.discoveryengine.v1beta.Engine.ConfigurableBillingApproach + .CONFIGURABLE_BILLING_APPROACH_UNSPECIFIED + .getNumber()) { + output.writeEnum(36, configurableBillingApproach_); + } + com.google.protobuf.GeneratedMessage.serializeStringMapTo( + output, internalGetModelConfigs(), ModelConfigsDefaultEntryHolder.defaultEntry, 37); + if (((bitField0_ & 0x00000020) != 0)) { + output.writeMessage(39, getObservabilityConfig()); + } + com.google.protobuf.GeneratedMessage.serializeStringMapTo( + output, + internalGetConnectorTenantInfo(), + ConnectorTenantInfoDefaultEntryHolder.defaultEntry, + 42); + if (((bitField0_ & 0x00000040) != 0)) { + output.writeMessage(43, getAgentGatewaySetting()); + } + if (marketplaceAgentVisibility_ + != com.google.cloud.discoveryengine.v1beta.Engine.MarketplaceAgentVisibility + .MARKETPLACE_AGENT_VISIBILITY_UNSPECIFIED + .getNumber()) { + output.writeEnum(44, marketplaceAgentVisibility_); + } + for (int i = 0; i < procurementContactEmails_.size(); i++) { + com.google.protobuf.GeneratedMessage.writeString( + output, 45, procurementContactEmails_.getRaw(i)); + } + 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(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(displayName_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, displayName_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getCreateTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getUpdateTime()); + } + { + int dataSize = 0; + for (int i = 0; i < dataStoreIds_.size(); i++) { + dataSize += computeStringSizeNoTag(dataStoreIds_.getRaw(i)); + } + size += dataSize; + size += 1 * getDataStoreIdsList().size(); + } + if (solutionType_ + != com.google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(6, solutionType_); + } + if (engineConfigCase_ == 11) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 11, (com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig) engineConfig_); + } + if (engineMetadataCase_ == 12) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 12, + (com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineMetadata) engineMetadata_); + } + if (engineConfigCase_ == 13) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 13, + (com.google.cloud.discoveryengine.v1beta.Engine.SearchEngineConfig) engineConfig_); + } + if (engineConfigCase_ == 14) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 14, + (com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig) + engineConfig_); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(15, getCommonConfig()); + } + if (industryVertical_ + != com.google.cloud.discoveryengine.v1beta.IndustryVertical.INDUSTRY_VERTICAL_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(16, industryVertical_); + } + if (((bitField0_ & 0x00000008) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(23, getKnowledgeGraphConfig()); + } + if (appType_ + != com.google.cloud.discoveryengine.v1beta.Engine.AppType.APP_TYPE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(24, appType_); + } + if (disableAnalytics_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(26, disableAnalytics_); + } + for (java.util.Map.Entry entry : + internalGetFeatures().getMap().entrySet()) { + com.google.protobuf.MapEntry features__ = + FeaturesDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(30, features__); + } + if (((bitField0_ & 0x00000010) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(32, getCmekConfig()); + } + if (configurableBillingApproach_ + != com.google.cloud.discoveryengine.v1beta.Engine.ConfigurableBillingApproach + .CONFIGURABLE_BILLING_APPROACH_UNSPECIFIED + .getNumber()) { + size += + com.google.protobuf.CodedOutputStream.computeEnumSize(36, configurableBillingApproach_); + } + for (java.util.Map.Entry entry : + internalGetModelConfigs().getMap().entrySet()) { + com.google.protobuf.MapEntry modelConfigs__ = + ModelConfigsDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(37, modelConfigs__); + } + if (((bitField0_ & 0x00000020) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(39, getObservabilityConfig()); + } + for (java.util.Map.Entry entry : + internalGetConnectorTenantInfo().getMap().entrySet()) { + com.google.protobuf.MapEntry connectorTenantInfo__ = + ConnectorTenantInfoDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(42, connectorTenantInfo__); + } + if (((bitField0_ & 0x00000040) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(43, getAgentGatewaySetting()); + } + if (marketplaceAgentVisibility_ + != com.google.cloud.discoveryengine.v1beta.Engine.MarketplaceAgentVisibility + .MARKETPLACE_AGENT_VISIBILITY_UNSPECIFIED + .getNumber()) { + size += + com.google.protobuf.CodedOutputStream.computeEnumSize(44, marketplaceAgentVisibility_); + } + { + int dataSize = 0; + for (int i = 0; i < procurementContactEmails_.size(); i++) { + dataSize += computeStringSizeNoTag(procurementContactEmails_.getRaw(i)); + } + size += dataSize; + size += 2 * getProcurementContactEmailsList().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.discoveryengine.v1beta.Engine)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1beta.Engine other = + (com.google.cloud.discoveryengine.v1beta.Engine) obj; + + if (!getName().equals(other.getName())) return false; + if (!getDisplayName().equals(other.getDisplayName())) return false; + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime().equals(other.getUpdateTime())) return false; + } + if (!getDataStoreIdsList().equals(other.getDataStoreIdsList())) return false; + if (solutionType_ != other.solutionType_) return false; + if (industryVertical_ != other.industryVertical_) return false; + if (hasCommonConfig() != other.hasCommonConfig()) return false; + if (hasCommonConfig()) { + if (!getCommonConfig().equals(other.getCommonConfig())) return false; + } + if (hasKnowledgeGraphConfig() != other.hasKnowledgeGraphConfig()) return false; + if (hasKnowledgeGraphConfig()) { + if (!getKnowledgeGraphConfig().equals(other.getKnowledgeGraphConfig())) return false; + } + if (appType_ != other.appType_) return false; + if (getDisableAnalytics() != other.getDisableAnalytics()) return false; + if (!internalGetFeatures().equals(other.internalGetFeatures())) return false; + if (hasCmekConfig() != other.hasCmekConfig()) return false; + if (hasCmekConfig()) { + if (!getCmekConfig().equals(other.getCmekConfig())) return false; + } + if (configurableBillingApproach_ != other.configurableBillingApproach_) return false; + if (!internalGetModelConfigs().equals(other.internalGetModelConfigs())) return false; + if (hasObservabilityConfig() != other.hasObservabilityConfig()) return false; + if (hasObservabilityConfig()) { + if (!getObservabilityConfig().equals(other.getObservabilityConfig())) return false; + } + if (!internalGetConnectorTenantInfo().equals(other.internalGetConnectorTenantInfo())) + return false; + if (hasAgentGatewaySetting() != other.hasAgentGatewaySetting()) return false; + if (hasAgentGatewaySetting()) { + if (!getAgentGatewaySetting().equals(other.getAgentGatewaySetting())) return false; + } + if (marketplaceAgentVisibility_ != other.marketplaceAgentVisibility_) return false; + if (!getProcurementContactEmailsList().equals(other.getProcurementContactEmailsList())) + return false; + if (!getEngineConfigCase().equals(other.getEngineConfigCase())) return false; + switch (engineConfigCase_) { + case 11: + if (!getChatEngineConfig().equals(other.getChatEngineConfig())) return false; + break; + case 13: + if (!getSearchEngineConfig().equals(other.getSearchEngineConfig())) return false; + break; + case 14: + if (!getMediaRecommendationEngineConfig() + .equals(other.getMediaRecommendationEngineConfig())) return false; + break; + case 0: + default: + } + if (!getEngineMetadataCase().equals(other.getEngineMetadataCase())) return false; + switch (engineMetadataCase_) { + case 12: + if (!getChatEngineMetadata().equals(other.getChatEngineMetadata())) return false; + break; + case 0: + default: + } + 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) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + if (getDataStoreIdsCount() > 0) { + hash = (37 * hash) + DATA_STORE_IDS_FIELD_NUMBER; + hash = (53 * hash) + getDataStoreIdsList().hashCode(); + } + hash = (37 * hash) + SOLUTION_TYPE_FIELD_NUMBER; + hash = (53 * hash) + solutionType_; + hash = (37 * hash) + INDUSTRY_VERTICAL_FIELD_NUMBER; + hash = (53 * hash) + industryVertical_; + if (hasCommonConfig()) { + hash = (37 * hash) + COMMON_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getCommonConfig().hashCode(); + } + if (hasKnowledgeGraphConfig()) { + hash = (37 * hash) + KNOWLEDGE_GRAPH_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getKnowledgeGraphConfig().hashCode(); + } + hash = (37 * hash) + APP_TYPE_FIELD_NUMBER; + hash = (53 * hash) + appType_; + hash = (37 * hash) + DISABLE_ANALYTICS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getDisableAnalytics()); + if (!internalGetFeatures().getMap().isEmpty()) { + hash = (37 * hash) + FEATURES_FIELD_NUMBER; + hash = (53 * hash) + internalGetFeatures().hashCode(); + } + if (hasCmekConfig()) { + hash = (37 * hash) + CMEK_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getCmekConfig().hashCode(); + } + hash = (37 * hash) + CONFIGURABLE_BILLING_APPROACH_FIELD_NUMBER; + hash = (53 * hash) + configurableBillingApproach_; + if (!internalGetModelConfigs().getMap().isEmpty()) { + hash = (37 * hash) + MODEL_CONFIGS_FIELD_NUMBER; + hash = (53 * hash) + internalGetModelConfigs().hashCode(); + } + if (hasObservabilityConfig()) { + hash = (37 * hash) + OBSERVABILITY_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getObservabilityConfig().hashCode(); + } + if (!internalGetConnectorTenantInfo().getMap().isEmpty()) { + hash = (37 * hash) + CONNECTOR_TENANT_INFO_FIELD_NUMBER; + hash = (53 * hash) + internalGetConnectorTenantInfo().hashCode(); + } + if (hasAgentGatewaySetting()) { + hash = (37 * hash) + AGENT_GATEWAY_SETTING_FIELD_NUMBER; + hash = (53 * hash) + getAgentGatewaySetting().hashCode(); + } + hash = (37 * hash) + MARKETPLACE_AGENT_VISIBILITY_FIELD_NUMBER; + hash = (53 * hash) + marketplaceAgentVisibility_; + if (getProcurementContactEmailsCount() > 0) { + hash = (37 * hash) + PROCUREMENT_CONTACT_EMAILS_FIELD_NUMBER; + hash = (53 * hash) + getProcurementContactEmailsList().hashCode(); + } + switch (engineConfigCase_) { + case 11: + hash = (37 * hash) + CHAT_ENGINE_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getChatEngineConfig().hashCode(); + break; + case 13: + hash = (37 * hash) + SEARCH_ENGINE_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getSearchEngineConfig().hashCode(); + break; + case 14: + hash = (37 * hash) + MEDIA_RECOMMENDATION_ENGINE_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getMediaRecommendationEngineConfig().hashCode(); + break; + case 0: + default: + } + switch (engineMetadataCase_) { + case 12: + hash = (37 * hash) + CHAT_ENGINE_METADATA_FIELD_NUMBER; + hash = (53 * hash) + getChatEngineMetadata().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1beta.Engine parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.Engine 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.discoveryengine.v1beta.Engine parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.Engine 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.discoveryengine.v1beta.Engine parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.Engine parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1beta.Engine parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.Engine 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.discoveryengine.v1beta.Engine parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.Engine 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.discoveryengine.v1beta.Engine parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.Engine 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.discoveryengine.v1beta.Engine 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; + } + + /** + * + * + *
            +   * Metadata that describes the training and serving parameters of an
            +   * [Engine][google.cloud.discoveryengine.v1beta.Engine].
            +   * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.Engine} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.Engine) + com.google.cloud.discoveryengine.v1beta.EngineOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.EngineProto + .internal_static_google_cloud_discoveryengine_v1beta_Engine_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 30: + return internalGetFeatures(); + case 37: + return internalGetModelConfigs(); + case 42: + return internalGetConnectorTenantInfo(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( + int number) { + switch (number) { + case 30: + return internalGetMutableFeatures(); + case 37: + return internalGetMutableModelConfigs(); + case 42: + return internalGetMutableConnectorTenantInfo(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.EngineProto + .internal_static_google_cloud_discoveryengine_v1beta_Engine_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.Engine.class, + com.google.cloud.discoveryengine.v1beta.Engine.Builder.class); + } + + // Construct using com.google.cloud.discoveryengine.v1beta.Engine.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetCreateTimeFieldBuilder(); + internalGetUpdateTimeFieldBuilder(); + internalGetCommonConfigFieldBuilder(); + internalGetKnowledgeGraphConfigFieldBuilder(); + internalGetCmekConfigFieldBuilder(); + internalGetObservabilityConfigFieldBuilder(); + internalGetAgentGatewaySettingFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (chatEngineConfigBuilder_ != null) { + chatEngineConfigBuilder_.clear(); + } + if (searchEngineConfigBuilder_ != null) { + searchEngineConfigBuilder_.clear(); + } + if (mediaRecommendationEngineConfigBuilder_ != null) { + mediaRecommendationEngineConfigBuilder_.clear(); + } + if (chatEngineMetadataBuilder_ != null) { + chatEngineMetadataBuilder_.clear(); + } + name_ = ""; + displayName_ = ""; + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + dataStoreIds_ = com.google.protobuf.LazyStringArrayList.emptyList(); + solutionType_ = 0; + industryVertical_ = 0; + commonConfig_ = null; + if (commonConfigBuilder_ != null) { + commonConfigBuilder_.dispose(); + commonConfigBuilder_ = null; + } + knowledgeGraphConfig_ = null; + if (knowledgeGraphConfigBuilder_ != null) { + knowledgeGraphConfigBuilder_.dispose(); + knowledgeGraphConfigBuilder_ = null; + } + appType_ = 0; + disableAnalytics_ = false; + internalGetMutableFeatures().clear(); + cmekConfig_ = null; + if (cmekConfigBuilder_ != null) { + cmekConfigBuilder_.dispose(); + cmekConfigBuilder_ = null; + } + configurableBillingApproach_ = 0; + internalGetMutableModelConfigs().clear(); + observabilityConfig_ = null; + if (observabilityConfigBuilder_ != null) { + observabilityConfigBuilder_.dispose(); + observabilityConfigBuilder_ = null; + } + internalGetMutableConnectorTenantInfo().clear(); + agentGatewaySetting_ = null; + if (agentGatewaySettingBuilder_ != null) { + agentGatewaySettingBuilder_.dispose(); + agentGatewaySettingBuilder_ = null; + } + marketplaceAgentVisibility_ = 0; + procurementContactEmails_ = com.google.protobuf.LazyStringArrayList.emptyList(); + engineConfigCase_ = 0; + engineConfig_ = null; + engineMetadataCase_ = 0; + engineMetadata_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1beta.EngineProto + .internal_static_google_cloud_discoveryengine_v1beta_Engine_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Engine getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1beta.Engine.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Engine build() { + com.google.cloud.discoveryengine.v1beta.Engine result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Engine buildPartial() { + com.google.cloud.discoveryengine.v1beta.Engine result = + new com.google.cloud.discoveryengine.v1beta.Engine(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.discoveryengine.v1beta.Engine result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000010) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.displayName_ = displayName_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000040) != 0)) { + result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.updateTime_ = updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + dataStoreIds_.makeImmutable(); + result.dataStoreIds_ = dataStoreIds_; + } + if (((from_bitField0_ & 0x00000200) != 0)) { + result.solutionType_ = solutionType_; + } + if (((from_bitField0_ & 0x00000400) != 0)) { + result.industryVertical_ = industryVertical_; + } + if (((from_bitField0_ & 0x00000800) != 0)) { + result.commonConfig_ = + commonConfigBuilder_ == null ? commonConfig_ : commonConfigBuilder_.build(); + to_bitField0_ |= 0x00000004; + } + if (((from_bitField0_ & 0x00001000) != 0)) { + result.knowledgeGraphConfig_ = + knowledgeGraphConfigBuilder_ == null + ? knowledgeGraphConfig_ + : knowledgeGraphConfigBuilder_.build(); + to_bitField0_ |= 0x00000008; + } + if (((from_bitField0_ & 0x00002000) != 0)) { + result.appType_ = appType_; + } + if (((from_bitField0_ & 0x00004000) != 0)) { + result.disableAnalytics_ = disableAnalytics_; + } + if (((from_bitField0_ & 0x00008000) != 0)) { + result.features_ = internalGetFeatures(); + result.features_.makeImmutable(); + } + if (((from_bitField0_ & 0x00010000) != 0)) { + result.cmekConfig_ = cmekConfigBuilder_ == null ? cmekConfig_ : cmekConfigBuilder_.build(); + to_bitField0_ |= 0x00000010; + } + if (((from_bitField0_ & 0x00020000) != 0)) { + result.configurableBillingApproach_ = configurableBillingApproach_; + } + if (((from_bitField0_ & 0x00040000) != 0)) { + result.modelConfigs_ = internalGetModelConfigs(); + result.modelConfigs_.makeImmutable(); + } + if (((from_bitField0_ & 0x00080000) != 0)) { + result.observabilityConfig_ = + observabilityConfigBuilder_ == null + ? observabilityConfig_ + : observabilityConfigBuilder_.build(); + to_bitField0_ |= 0x00000020; + } + if (((from_bitField0_ & 0x00100000) != 0)) { + result.connectorTenantInfo_ = internalGetConnectorTenantInfo(); + result.connectorTenantInfo_.makeImmutable(); + } + if (((from_bitField0_ & 0x00200000) != 0)) { + result.agentGatewaySetting_ = + agentGatewaySettingBuilder_ == null + ? agentGatewaySetting_ + : agentGatewaySettingBuilder_.build(); + to_bitField0_ |= 0x00000040; + } + if (((from_bitField0_ & 0x00400000) != 0)) { + result.marketplaceAgentVisibility_ = marketplaceAgentVisibility_; + } + if (((from_bitField0_ & 0x00800000) != 0)) { + procurementContactEmails_.makeImmutable(); + result.procurementContactEmails_ = procurementContactEmails_; + } + result.bitField0_ |= to_bitField0_; + } + + private void buildPartialOneofs(com.google.cloud.discoveryengine.v1beta.Engine result) { + result.engineConfigCase_ = engineConfigCase_; + result.engineConfig_ = this.engineConfig_; + if (engineConfigCase_ == 11 && chatEngineConfigBuilder_ != null) { + result.engineConfig_ = chatEngineConfigBuilder_.build(); + } + if (engineConfigCase_ == 13 && searchEngineConfigBuilder_ != null) { + result.engineConfig_ = searchEngineConfigBuilder_.build(); + } + if (engineConfigCase_ == 14 && mediaRecommendationEngineConfigBuilder_ != null) { + result.engineConfig_ = mediaRecommendationEngineConfigBuilder_.build(); + } + result.engineMetadataCase_ = engineMetadataCase_; + result.engineMetadata_ = this.engineMetadata_; + if (engineMetadataCase_ == 12 && chatEngineMetadataBuilder_ != null) { + result.engineMetadata_ = chatEngineMetadataBuilder_.build(); + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.discoveryengine.v1beta.Engine) { + return mergeFrom((com.google.cloud.discoveryengine.v1beta.Engine) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.discoveryengine.v1beta.Engine other) { + if (other == com.google.cloud.discoveryengine.v1beta.Engine.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000010; + onChanged(); + } + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + bitField0_ |= 0x00000020; + onChanged(); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + if (!other.dataStoreIds_.isEmpty()) { + if (dataStoreIds_.isEmpty()) { + dataStoreIds_ = other.dataStoreIds_; + bitField0_ |= 0x00000100; + } else { + ensureDataStoreIdsIsMutable(); + dataStoreIds_.addAll(other.dataStoreIds_); + } + onChanged(); + } + if (other.solutionType_ != 0) { + setSolutionTypeValue(other.getSolutionTypeValue()); + } + if (other.industryVertical_ != 0) { + setIndustryVerticalValue(other.getIndustryVerticalValue()); + } + if (other.hasCommonConfig()) { + mergeCommonConfig(other.getCommonConfig()); + } + if (other.hasKnowledgeGraphConfig()) { + mergeKnowledgeGraphConfig(other.getKnowledgeGraphConfig()); + } + if (other.appType_ != 0) { + setAppTypeValue(other.getAppTypeValue()); + } + if (other.getDisableAnalytics() != false) { + setDisableAnalytics(other.getDisableAnalytics()); + } + internalGetMutableFeatures().mergeFrom(other.internalGetFeatures()); + bitField0_ |= 0x00008000; + if (other.hasCmekConfig()) { + mergeCmekConfig(other.getCmekConfig()); + } + if (other.configurableBillingApproach_ != 0) { + setConfigurableBillingApproachValue(other.getConfigurableBillingApproachValue()); + } + internalGetMutableModelConfigs().mergeFrom(other.internalGetModelConfigs()); + bitField0_ |= 0x00040000; + if (other.hasObservabilityConfig()) { + mergeObservabilityConfig(other.getObservabilityConfig()); + } + internalGetMutableConnectorTenantInfo().mergeFrom(other.internalGetConnectorTenantInfo()); + bitField0_ |= 0x00100000; + if (other.hasAgentGatewaySetting()) { + mergeAgentGatewaySetting(other.getAgentGatewaySetting()); + } + if (other.marketplaceAgentVisibility_ != 0) { + setMarketplaceAgentVisibilityValue(other.getMarketplaceAgentVisibilityValue()); + } + if (!other.procurementContactEmails_.isEmpty()) { + if (procurementContactEmails_.isEmpty()) { + procurementContactEmails_ = other.procurementContactEmails_; + bitField0_ |= 0x00800000; + } else { + ensureProcurementContactEmailsIsMutable(); + procurementContactEmails_.addAll(other.procurementContactEmails_); + } + onChanged(); + } + switch (other.getEngineConfigCase()) { + case CHAT_ENGINE_CONFIG: + { + mergeChatEngineConfig(other.getChatEngineConfig()); + break; + } + case SEARCH_ENGINE_CONFIG: + { + mergeSearchEngineConfig(other.getSearchEngineConfig()); + break; + } + case MEDIA_RECOMMENDATION_ENGINE_CONFIG: + { + mergeMediaRecommendationEngineConfig(other.getMediaRecommendationEngineConfig()); + break; + } + case ENGINECONFIG_NOT_SET: + { + break; + } + } + switch (other.getEngineMetadataCase()) { + case CHAT_ENGINE_METADATA: + { + mergeChatEngineMetadata(other.getChatEngineMetadata()); + break; + } + case ENGINEMETADATA_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 10 + case 18: + { + displayName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 18 + case 26: + { + input.readMessage( + internalGetCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000040; + break; + } // case 26 + case 34: + { + input.readMessage( + internalGetUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000080; + break; + } // case 34 + case 42: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureDataStoreIdsIsMutable(); + dataStoreIds_.add(s); + break; + } // case 42 + case 48: + { + solutionType_ = input.readEnum(); + bitField0_ |= 0x00000200; + break; + } // case 48 + case 90: + { + input.readMessage( + internalGetChatEngineConfigFieldBuilder().getBuilder(), extensionRegistry); + engineConfigCase_ = 11; + break; + } // case 90 + case 98: + { + input.readMessage( + internalGetChatEngineMetadataFieldBuilder().getBuilder(), extensionRegistry); + engineMetadataCase_ = 12; + break; + } // case 98 + case 106: + { + input.readMessage( + internalGetSearchEngineConfigFieldBuilder().getBuilder(), extensionRegistry); + engineConfigCase_ = 13; + break; + } // case 106 + case 114: + { + input.readMessage( + internalGetMediaRecommendationEngineConfigFieldBuilder().getBuilder(), + extensionRegistry); + engineConfigCase_ = 14; + break; + } // case 114 + case 122: + { + input.readMessage( + internalGetCommonConfigFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000800; + break; + } // case 122 + case 128: + { + industryVertical_ = input.readEnum(); + bitField0_ |= 0x00000400; + break; + } // case 128 + case 186: + { + input.readMessage( + internalGetKnowledgeGraphConfigFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00001000; + break; + } // case 186 + case 192: + { + appType_ = input.readEnum(); + bitField0_ |= 0x00002000; + break; + } // case 192 + case 208: + { + disableAnalytics_ = input.readBool(); + bitField0_ |= 0x00004000; + break; + } // case 208 + case 242: + { + com.google.protobuf.MapEntry features__ = + input.readMessage( + FeaturesDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableFeatures() + .getMutableMap() + .put(features__.getKey(), features__.getValue()); + bitField0_ |= 0x00008000; + break; + } // case 242 + case 258: + { + input.readMessage( + internalGetCmekConfigFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00010000; + break; + } // case 258 + case 288: + { + configurableBillingApproach_ = input.readEnum(); + bitField0_ |= 0x00020000; + break; + } // case 288 + case 298: + { + com.google.protobuf.MapEntry modelConfigs__ = + input.readMessage( + ModelConfigsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableModelConfigs() + .getMutableMap() + .put(modelConfigs__.getKey(), modelConfigs__.getValue()); + bitField0_ |= 0x00040000; + break; + } // case 298 + case 314: + { + input.readMessage( + internalGetObservabilityConfigFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00080000; + break; + } // case 314 + case 338: + { + com.google.protobuf.MapEntry + connectorTenantInfo__ = + input.readMessage( + ConnectorTenantInfoDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableConnectorTenantInfo() + .getMutableMap() + .put(connectorTenantInfo__.getKey(), connectorTenantInfo__.getValue()); + bitField0_ |= 0x00100000; + break; + } // case 338 + case 346: + { + input.readMessage( + internalGetAgentGatewaySettingFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00200000; + break; + } // case 346 + case 352: + { + marketplaceAgentVisibility_ = input.readEnum(); + bitField0_ |= 0x00400000; + break; + } // case 352 + case 362: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureProcurementContactEmailsIsMutable(); + procurementContactEmails_.add(s); + break; + } // case 362 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int engineConfigCase_ = 0; + private java.lang.Object engineConfig_; + + public EngineConfigCase getEngineConfigCase() { + return EngineConfigCase.forNumber(engineConfigCase_); + } + + public Builder clearEngineConfig() { + engineConfigCase_ = 0; + engineConfig_ = null; + onChanged(); + return this; + } + + private int engineMetadataCase_ = 0; + private java.lang.Object engineMetadata_; + + public EngineMetadataCase getEngineMetadataCase() { + return EngineMetadataCase.forNumber(engineMetadataCase_); + } + + public Builder clearEngineMetadata() { + engineMetadataCase_ = 0; + engineMetadata_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig, + com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig.Builder, + com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfigOrBuilder> + chatEngineConfigBuilder_; + + /** + * + * + *
            +     * Configurations for the Chat Engine. Only applicable if
            +     * [solution_type][google.cloud.discoveryengine.v1beta.Engine.solution_type]
            +     * is
            +     * [SOLUTION_TYPE_CHAT][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_CHAT].
            +     * 
            + * + * .google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig chat_engine_config = 11; + * + * + * @return Whether the chatEngineConfig field is set. + */ + @java.lang.Override + public boolean hasChatEngineConfig() { + return engineConfigCase_ == 11; + } + + /** + * + * + *
            +     * Configurations for the Chat Engine. Only applicable if
            +     * [solution_type][google.cloud.discoveryengine.v1beta.Engine.solution_type]
            +     * is
            +     * [SOLUTION_TYPE_CHAT][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_CHAT].
            +     * 
            + * + * .google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig chat_engine_config = 11; + * + * + * @return The chatEngineConfig. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig getChatEngineConfig() { + if (chatEngineConfigBuilder_ == null) { + if (engineConfigCase_ == 11) { + return (com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig) engineConfig_; + } + return com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig.getDefaultInstance(); + } else { + if (engineConfigCase_ == 11) { + return chatEngineConfigBuilder_.getMessage(); + } + return com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig.getDefaultInstance(); + } + } + + /** + * + * + *
            +     * Configurations for the Chat Engine. Only applicable if
            +     * [solution_type][google.cloud.discoveryengine.v1beta.Engine.solution_type]
            +     * is
            +     * [SOLUTION_TYPE_CHAT][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_CHAT].
            +     * 
            + * + * .google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig chat_engine_config = 11; + * + */ + public Builder setChatEngineConfig( + com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig value) { + if (chatEngineConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + engineConfig_ = value; + onChanged(); + } else { + chatEngineConfigBuilder_.setMessage(value); + } + engineConfigCase_ = 11; + return this; + } + + /** + * + * + *
            +     * Configurations for the Chat Engine. Only applicable if
            +     * [solution_type][google.cloud.discoveryengine.v1beta.Engine.solution_type]
            +     * is
            +     * [SOLUTION_TYPE_CHAT][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_CHAT].
            +     * 
            + * + * .google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig chat_engine_config = 11; + * + */ + public Builder setChatEngineConfig( + com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig.Builder builderForValue) { + if (chatEngineConfigBuilder_ == null) { + engineConfig_ = builderForValue.build(); + onChanged(); + } else { + chatEngineConfigBuilder_.setMessage(builderForValue.build()); + } + engineConfigCase_ = 11; + return this; + } + + /** + * + * + *
            +     * Configurations for the Chat Engine. Only applicable if
            +     * [solution_type][google.cloud.discoveryengine.v1beta.Engine.solution_type]
            +     * is
            +     * [SOLUTION_TYPE_CHAT][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_CHAT].
            +     * 
            + * + * .google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig chat_engine_config = 11; + * + */ + public Builder mergeChatEngineConfig( + com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig value) { + if (chatEngineConfigBuilder_ == null) { + if (engineConfigCase_ == 11 + && engineConfig_ + != com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig + .getDefaultInstance()) { + engineConfig_ = + com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig.newBuilder( + (com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig) + engineConfig_) + .mergeFrom(value) + .buildPartial(); + } else { + engineConfig_ = value; + } + onChanged(); + } else { + if (engineConfigCase_ == 11) { + chatEngineConfigBuilder_.mergeFrom(value); + } else { + chatEngineConfigBuilder_.setMessage(value); + } + } + engineConfigCase_ = 11; + return this; + } + + /** + * + * + *
            +     * Configurations for the Chat Engine. Only applicable if
            +     * [solution_type][google.cloud.discoveryengine.v1beta.Engine.solution_type]
            +     * is
            +     * [SOLUTION_TYPE_CHAT][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_CHAT].
            +     * 
            + * + * .google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig chat_engine_config = 11; + * + */ + public Builder clearChatEngineConfig() { + if (chatEngineConfigBuilder_ == null) { + if (engineConfigCase_ == 11) { + engineConfigCase_ = 0; + engineConfig_ = null; + onChanged(); + } + } else { + if (engineConfigCase_ == 11) { + engineConfigCase_ = 0; + engineConfig_ = null; + } + chatEngineConfigBuilder_.clear(); + } + return this; + } + + /** + * + * + *
            +     * Configurations for the Chat Engine. Only applicable if
            +     * [solution_type][google.cloud.discoveryengine.v1beta.Engine.solution_type]
            +     * is
            +     * [SOLUTION_TYPE_CHAT][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_CHAT].
            +     * 
            + * + * .google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig chat_engine_config = 11; + * + */ + public com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig.Builder + getChatEngineConfigBuilder() { + return internalGetChatEngineConfigFieldBuilder().getBuilder(); + } + + /** + * + * + *
            +     * Configurations for the Chat Engine. Only applicable if
            +     * [solution_type][google.cloud.discoveryengine.v1beta.Engine.solution_type]
            +     * is
            +     * [SOLUTION_TYPE_CHAT][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_CHAT].
            +     * 
            + * + * .google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig chat_engine_config = 11; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfigOrBuilder + getChatEngineConfigOrBuilder() { + if ((engineConfigCase_ == 11) && (chatEngineConfigBuilder_ != null)) { + return chatEngineConfigBuilder_.getMessageOrBuilder(); + } else { + if (engineConfigCase_ == 11) { + return (com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig) engineConfig_; + } + return com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig.getDefaultInstance(); + } + } + + /** + * + * + *
            +     * Configurations for the Chat Engine. Only applicable if
            +     * [solution_type][google.cloud.discoveryengine.v1beta.Engine.solution_type]
            +     * is
            +     * [SOLUTION_TYPE_CHAT][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_CHAT].
            +     * 
            + * + * .google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig chat_engine_config = 11; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig, + com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig.Builder, + com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfigOrBuilder> + internalGetChatEngineConfigFieldBuilder() { + if (chatEngineConfigBuilder_ == null) { + if (!(engineConfigCase_ == 11)) { + engineConfig_ = + com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig.getDefaultInstance(); + } + chatEngineConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig, + com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig.Builder, + com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfigOrBuilder>( + (com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig) engineConfig_, + getParentForChildren(), + isClean()); + engineConfig_ = null; + } + engineConfigCase_ = 11; + onChanged(); + return chatEngineConfigBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.Engine.SearchEngineConfig, + com.google.cloud.discoveryengine.v1beta.Engine.SearchEngineConfig.Builder, + com.google.cloud.discoveryengine.v1beta.Engine.SearchEngineConfigOrBuilder> + searchEngineConfigBuilder_; + + /** + * + * + *
            +     * Configurations for the Search Engine. Only applicable if
            +     * [solution_type][google.cloud.discoveryengine.v1beta.Engine.solution_type]
            +     * is
            +     * [SOLUTION_TYPE_SEARCH][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_SEARCH].
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Engine.SearchEngineConfig search_engine_config = 13; + * + * + * @return Whether the searchEngineConfig field is set. + */ + @java.lang.Override + public boolean hasSearchEngineConfig() { + return engineConfigCase_ == 13; + } + + /** + * + * + *
            +     * Configurations for the Search Engine. Only applicable if
            +     * [solution_type][google.cloud.discoveryengine.v1beta.Engine.solution_type]
            +     * is
            +     * [SOLUTION_TYPE_SEARCH][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_SEARCH].
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Engine.SearchEngineConfig search_engine_config = 13; + * + * + * @return The searchEngineConfig. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Engine.SearchEngineConfig + getSearchEngineConfig() { + if (searchEngineConfigBuilder_ == null) { + if (engineConfigCase_ == 13) { + return (com.google.cloud.discoveryengine.v1beta.Engine.SearchEngineConfig) engineConfig_; + } + return com.google.cloud.discoveryengine.v1beta.Engine.SearchEngineConfig + .getDefaultInstance(); + } else { + if (engineConfigCase_ == 13) { + return searchEngineConfigBuilder_.getMessage(); + } + return com.google.cloud.discoveryengine.v1beta.Engine.SearchEngineConfig + .getDefaultInstance(); + } + } + + /** + * + * + *
            +     * Configurations for the Search Engine. Only applicable if
            +     * [solution_type][google.cloud.discoveryengine.v1beta.Engine.solution_type]
            +     * is
            +     * [SOLUTION_TYPE_SEARCH][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_SEARCH].
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Engine.SearchEngineConfig search_engine_config = 13; + * + */ + public Builder setSearchEngineConfig( + com.google.cloud.discoveryengine.v1beta.Engine.SearchEngineConfig value) { + if (searchEngineConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + engineConfig_ = value; + onChanged(); + } else { + searchEngineConfigBuilder_.setMessage(value); + } + engineConfigCase_ = 13; + return this; + } + + /** + * + * + *
            +     * Configurations for the Search Engine. Only applicable if
            +     * [solution_type][google.cloud.discoveryengine.v1beta.Engine.solution_type]
            +     * is
            +     * [SOLUTION_TYPE_SEARCH][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_SEARCH].
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Engine.SearchEngineConfig search_engine_config = 13; + * + */ + public Builder setSearchEngineConfig( + com.google.cloud.discoveryengine.v1beta.Engine.SearchEngineConfig.Builder builderForValue) { + if (searchEngineConfigBuilder_ == null) { + engineConfig_ = builderForValue.build(); + onChanged(); + } else { + searchEngineConfigBuilder_.setMessage(builderForValue.build()); + } + engineConfigCase_ = 13; + return this; + } + + /** + * + * + *
            +     * Configurations for the Search Engine. Only applicable if
            +     * [solution_type][google.cloud.discoveryengine.v1beta.Engine.solution_type]
            +     * is
            +     * [SOLUTION_TYPE_SEARCH][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_SEARCH].
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Engine.SearchEngineConfig search_engine_config = 13; + * + */ + public Builder mergeSearchEngineConfig( + com.google.cloud.discoveryengine.v1beta.Engine.SearchEngineConfig value) { + if (searchEngineConfigBuilder_ == null) { + if (engineConfigCase_ == 13 + && engineConfig_ + != com.google.cloud.discoveryengine.v1beta.Engine.SearchEngineConfig + .getDefaultInstance()) { + engineConfig_ = + com.google.cloud.discoveryengine.v1beta.Engine.SearchEngineConfig.newBuilder( + (com.google.cloud.discoveryengine.v1beta.Engine.SearchEngineConfig) + engineConfig_) + .mergeFrom(value) + .buildPartial(); + } else { + engineConfig_ = value; + } + onChanged(); + } else { + if (engineConfigCase_ == 13) { + searchEngineConfigBuilder_.mergeFrom(value); + } else { + searchEngineConfigBuilder_.setMessage(value); + } + } + engineConfigCase_ = 13; + return this; + } + + /** + * + * + *
            +     * Configurations for the Search Engine. Only applicable if
            +     * [solution_type][google.cloud.discoveryengine.v1beta.Engine.solution_type]
            +     * is
            +     * [SOLUTION_TYPE_SEARCH][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_SEARCH].
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Engine.SearchEngineConfig search_engine_config = 13; + * + */ + public Builder clearSearchEngineConfig() { + if (searchEngineConfigBuilder_ == null) { + if (engineConfigCase_ == 13) { + engineConfigCase_ = 0; + engineConfig_ = null; + onChanged(); + } + } else { + if (engineConfigCase_ == 13) { + engineConfigCase_ = 0; + engineConfig_ = null; + } + searchEngineConfigBuilder_.clear(); + } + return this; + } + + /** + * + * + *
            +     * Configurations for the Search Engine. Only applicable if
            +     * [solution_type][google.cloud.discoveryengine.v1beta.Engine.solution_type]
            +     * is
            +     * [SOLUTION_TYPE_SEARCH][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_SEARCH].
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Engine.SearchEngineConfig search_engine_config = 13; + * + */ + public com.google.cloud.discoveryengine.v1beta.Engine.SearchEngineConfig.Builder + getSearchEngineConfigBuilder() { + return internalGetSearchEngineConfigFieldBuilder().getBuilder(); + } + + /** + * + * + *
            +     * Configurations for the Search Engine. Only applicable if
            +     * [solution_type][google.cloud.discoveryengine.v1beta.Engine.solution_type]
            +     * is
            +     * [SOLUTION_TYPE_SEARCH][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_SEARCH].
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Engine.SearchEngineConfig search_engine_config = 13; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Engine.SearchEngineConfigOrBuilder + getSearchEngineConfigOrBuilder() { + if ((engineConfigCase_ == 13) && (searchEngineConfigBuilder_ != null)) { + return searchEngineConfigBuilder_.getMessageOrBuilder(); + } else { + if (engineConfigCase_ == 13) { + return (com.google.cloud.discoveryengine.v1beta.Engine.SearchEngineConfig) engineConfig_; + } + return com.google.cloud.discoveryengine.v1beta.Engine.SearchEngineConfig + .getDefaultInstance(); + } + } + + /** + * + * + *
            +     * Configurations for the Search Engine. Only applicable if
            +     * [solution_type][google.cloud.discoveryengine.v1beta.Engine.solution_type]
            +     * is
            +     * [SOLUTION_TYPE_SEARCH][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_SEARCH].
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Engine.SearchEngineConfig search_engine_config = 13; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.Engine.SearchEngineConfig, + com.google.cloud.discoveryengine.v1beta.Engine.SearchEngineConfig.Builder, + com.google.cloud.discoveryengine.v1beta.Engine.SearchEngineConfigOrBuilder> + internalGetSearchEngineConfigFieldBuilder() { + if (searchEngineConfigBuilder_ == null) { + if (!(engineConfigCase_ == 13)) { + engineConfig_ = + com.google.cloud.discoveryengine.v1beta.Engine.SearchEngineConfig + .getDefaultInstance(); + } + searchEngineConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.Engine.SearchEngineConfig, + com.google.cloud.discoveryengine.v1beta.Engine.SearchEngineConfig.Builder, + com.google.cloud.discoveryengine.v1beta.Engine.SearchEngineConfigOrBuilder>( + (com.google.cloud.discoveryengine.v1beta.Engine.SearchEngineConfig) engineConfig_, + getParentForChildren(), + isClean()); + engineConfig_ = null; + } + engineConfigCase_ = 13; + onChanged(); + return searchEngineConfigBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig, + com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig.Builder, + com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfigOrBuilder> + mediaRecommendationEngineConfigBuilder_; + + /** + * + * + *
            +     * Configurations for the Media Engine. Only applicable on the data
            +     * stores with
            +     * [solution_type][google.cloud.discoveryengine.v1beta.Engine.solution_type]
            +     * [SOLUTION_TYPE_RECOMMENDATION][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_RECOMMENDATION]
            +     * and
            +     * [IndustryVertical.MEDIA][google.cloud.discoveryengine.v1beta.IndustryVertical.MEDIA]
            +     * vertical.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig media_recommendation_engine_config = 14; + * + * + * @return Whether the mediaRecommendationEngineConfig field is set. + */ + @java.lang.Override + public boolean hasMediaRecommendationEngineConfig() { + return engineConfigCase_ == 14; + } + + /** + * + * + *
            +     * Configurations for the Media Engine. Only applicable on the data
            +     * stores with
            +     * [solution_type][google.cloud.discoveryengine.v1beta.Engine.solution_type]
            +     * [SOLUTION_TYPE_RECOMMENDATION][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_RECOMMENDATION]
            +     * and
            +     * [IndustryVertical.MEDIA][google.cloud.discoveryengine.v1beta.IndustryVertical.MEDIA]
            +     * vertical.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig media_recommendation_engine_config = 14; + * + * + * @return The mediaRecommendationEngineConfig. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + getMediaRecommendationEngineConfig() { + if (mediaRecommendationEngineConfigBuilder_ == null) { + if (engineConfigCase_ == 14) { + return (com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig) + engineConfig_; + } + return com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .getDefaultInstance(); + } else { + if (engineConfigCase_ == 14) { + return mediaRecommendationEngineConfigBuilder_.getMessage(); + } + return com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .getDefaultInstance(); + } + } + + /** + * + * + *
            +     * Configurations for the Media Engine. Only applicable on the data
            +     * stores with
            +     * [solution_type][google.cloud.discoveryengine.v1beta.Engine.solution_type]
            +     * [SOLUTION_TYPE_RECOMMENDATION][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_RECOMMENDATION]
            +     * and
            +     * [IndustryVertical.MEDIA][google.cloud.discoveryengine.v1beta.IndustryVertical.MEDIA]
            +     * vertical.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig media_recommendation_engine_config = 14; + * + */ + public Builder setMediaRecommendationEngineConfig( + com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig value) { + if (mediaRecommendationEngineConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + engineConfig_ = value; + onChanged(); + } else { + mediaRecommendationEngineConfigBuilder_.setMessage(value); + } + engineConfigCase_ = 14; + return this; + } + + /** + * + * + *
            +     * Configurations for the Media Engine. Only applicable on the data
            +     * stores with
            +     * [solution_type][google.cloud.discoveryengine.v1beta.Engine.solution_type]
            +     * [SOLUTION_TYPE_RECOMMENDATION][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_RECOMMENDATION]
            +     * and
            +     * [IndustryVertical.MEDIA][google.cloud.discoveryengine.v1beta.IndustryVertical.MEDIA]
            +     * vertical.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig media_recommendation_engine_config = 14; + * + */ + public Builder setMediaRecommendationEngineConfig( + com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig.Builder + builderForValue) { + if (mediaRecommendationEngineConfigBuilder_ == null) { + engineConfig_ = builderForValue.build(); + onChanged(); + } else { + mediaRecommendationEngineConfigBuilder_.setMessage(builderForValue.build()); + } + engineConfigCase_ = 14; + return this; + } + + /** + * + * + *
            +     * Configurations for the Media Engine. Only applicable on the data
            +     * stores with
            +     * [solution_type][google.cloud.discoveryengine.v1beta.Engine.solution_type]
            +     * [SOLUTION_TYPE_RECOMMENDATION][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_RECOMMENDATION]
            +     * and
            +     * [IndustryVertical.MEDIA][google.cloud.discoveryengine.v1beta.IndustryVertical.MEDIA]
            +     * vertical.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig media_recommendation_engine_config = 14; + * + */ + public Builder mergeMediaRecommendationEngineConfig( + com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig value) { + if (mediaRecommendationEngineConfigBuilder_ == null) { + if (engineConfigCase_ == 14 + && engineConfig_ + != com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .getDefaultInstance()) { + engineConfig_ = + com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .newBuilder( + (com.google.cloud.discoveryengine.v1beta.Engine + .MediaRecommendationEngineConfig) + engineConfig_) + .mergeFrom(value) + .buildPartial(); + } else { + engineConfig_ = value; + } + onChanged(); + } else { + if (engineConfigCase_ == 14) { + mediaRecommendationEngineConfigBuilder_.mergeFrom(value); + } else { + mediaRecommendationEngineConfigBuilder_.setMessage(value); + } + } + engineConfigCase_ = 14; + return this; + } + + /** + * + * + *
            +     * Configurations for the Media Engine. Only applicable on the data
            +     * stores with
            +     * [solution_type][google.cloud.discoveryengine.v1beta.Engine.solution_type]
            +     * [SOLUTION_TYPE_RECOMMENDATION][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_RECOMMENDATION]
            +     * and
            +     * [IndustryVertical.MEDIA][google.cloud.discoveryengine.v1beta.IndustryVertical.MEDIA]
            +     * vertical.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig media_recommendation_engine_config = 14; + * + */ + public Builder clearMediaRecommendationEngineConfig() { + if (mediaRecommendationEngineConfigBuilder_ == null) { + if (engineConfigCase_ == 14) { + engineConfigCase_ = 0; + engineConfig_ = null; + onChanged(); + } + } else { + if (engineConfigCase_ == 14) { + engineConfigCase_ = 0; + engineConfig_ = null; + } + mediaRecommendationEngineConfigBuilder_.clear(); + } + return this; + } + + /** + * + * + *
            +     * Configurations for the Media Engine. Only applicable on the data
            +     * stores with
            +     * [solution_type][google.cloud.discoveryengine.v1beta.Engine.solution_type]
            +     * [SOLUTION_TYPE_RECOMMENDATION][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_RECOMMENDATION]
            +     * and
            +     * [IndustryVertical.MEDIA][google.cloud.discoveryengine.v1beta.IndustryVertical.MEDIA]
            +     * vertical.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig media_recommendation_engine_config = 14; + * + */ + public com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig.Builder + getMediaRecommendationEngineConfigBuilder() { + return internalGetMediaRecommendationEngineConfigFieldBuilder().getBuilder(); + } + + /** + * + * + *
            +     * Configurations for the Media Engine. Only applicable on the data
            +     * stores with
            +     * [solution_type][google.cloud.discoveryengine.v1beta.Engine.solution_type]
            +     * [SOLUTION_TYPE_RECOMMENDATION][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_RECOMMENDATION]
            +     * and
            +     * [IndustryVertical.MEDIA][google.cloud.discoveryengine.v1beta.IndustryVertical.MEDIA]
            +     * vertical.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig media_recommendation_engine_config = 14; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfigOrBuilder + getMediaRecommendationEngineConfigOrBuilder() { + if ((engineConfigCase_ == 14) && (mediaRecommendationEngineConfigBuilder_ != null)) { + return mediaRecommendationEngineConfigBuilder_.getMessageOrBuilder(); + } else { + if (engineConfigCase_ == 14) { + return (com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig) + engineConfig_; + } + return com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .getDefaultInstance(); + } + } + + /** + * + * + *
            +     * Configurations for the Media Engine. Only applicable on the data
            +     * stores with
            +     * [solution_type][google.cloud.discoveryengine.v1beta.Engine.solution_type]
            +     * [SOLUTION_TYPE_RECOMMENDATION][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_RECOMMENDATION]
            +     * and
            +     * [IndustryVertical.MEDIA][google.cloud.discoveryengine.v1beta.IndustryVertical.MEDIA]
            +     * vertical.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig media_recommendation_engine_config = 14; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig, + com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig.Builder, + com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfigOrBuilder> + internalGetMediaRecommendationEngineConfigFieldBuilder() { + if (mediaRecommendationEngineConfigBuilder_ == null) { + if (!(engineConfigCase_ == 14)) { + engineConfig_ = + com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .getDefaultInstance(); + } + mediaRecommendationEngineConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig, + com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + .Builder, + com.google.cloud.discoveryengine.v1beta.Engine + .MediaRecommendationEngineConfigOrBuilder>( + (com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig) + engineConfig_, + getParentForChildren(), + isClean()); + engineConfig_ = null; + } + engineConfigCase_ = 14; + onChanged(); + return mediaRecommendationEngineConfigBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineMetadata, + com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineMetadata.Builder, + com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineMetadataOrBuilder> + chatEngineMetadataBuilder_; + + /** + * + * + *
            +     * Output only. Additional information of the Chat Engine. Only applicable
            +     * if
            +     * [solution_type][google.cloud.discoveryengine.v1beta.Engine.solution_type]
            +     * is
            +     * [SOLUTION_TYPE_CHAT][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_CHAT].
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Engine.ChatEngineMetadata chat_engine_metadata = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the chatEngineMetadata field is set. + */ + @java.lang.Override + public boolean hasChatEngineMetadata() { + return engineMetadataCase_ == 12; + } + + /** + * + * + *
            +     * Output only. Additional information of the Chat Engine. Only applicable
            +     * if
            +     * [solution_type][google.cloud.discoveryengine.v1beta.Engine.solution_type]
            +     * is
            +     * [SOLUTION_TYPE_CHAT][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_CHAT].
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Engine.ChatEngineMetadata chat_engine_metadata = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The chatEngineMetadata. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineMetadata + getChatEngineMetadata() { + if (chatEngineMetadataBuilder_ == null) { + if (engineMetadataCase_ == 12) { + return (com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineMetadata) + engineMetadata_; + } + return com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineMetadata + .getDefaultInstance(); + } else { + if (engineMetadataCase_ == 12) { + return chatEngineMetadataBuilder_.getMessage(); + } + return com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineMetadata + .getDefaultInstance(); + } + } + + /** + * + * + *
            +     * Output only. Additional information of the Chat Engine. Only applicable
            +     * if
            +     * [solution_type][google.cloud.discoveryengine.v1beta.Engine.solution_type]
            +     * is
            +     * [SOLUTION_TYPE_CHAT][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_CHAT].
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Engine.ChatEngineMetadata chat_engine_metadata = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setChatEngineMetadata( + com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineMetadata value) { + if (chatEngineMetadataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + engineMetadata_ = value; + onChanged(); + } else { + chatEngineMetadataBuilder_.setMessage(value); + } + engineMetadataCase_ = 12; + return this; + } + + /** + * + * + *
            +     * Output only. Additional information of the Chat Engine. Only applicable
            +     * if
            +     * [solution_type][google.cloud.discoveryengine.v1beta.Engine.solution_type]
            +     * is
            +     * [SOLUTION_TYPE_CHAT][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_CHAT].
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Engine.ChatEngineMetadata chat_engine_metadata = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setChatEngineMetadata( + com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineMetadata.Builder builderForValue) { + if (chatEngineMetadataBuilder_ == null) { + engineMetadata_ = builderForValue.build(); + onChanged(); + } else { + chatEngineMetadataBuilder_.setMessage(builderForValue.build()); + } + engineMetadataCase_ = 12; + return this; } - if (engineConfigCase_ == 13) { - output.writeMessage( - 13, (com.google.cloud.discoveryengine.v1beta.Engine.SearchEngineConfig) engineConfig_); + + /** + * + * + *
            +     * Output only. Additional information of the Chat Engine. Only applicable
            +     * if
            +     * [solution_type][google.cloud.discoveryengine.v1beta.Engine.solution_type]
            +     * is
            +     * [SOLUTION_TYPE_CHAT][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_CHAT].
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Engine.ChatEngineMetadata chat_engine_metadata = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeChatEngineMetadata( + com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineMetadata value) { + if (chatEngineMetadataBuilder_ == null) { + if (engineMetadataCase_ == 12 + && engineMetadata_ + != com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineMetadata + .getDefaultInstance()) { + engineMetadata_ = + com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineMetadata.newBuilder( + (com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineMetadata) + engineMetadata_) + .mergeFrom(value) + .buildPartial(); + } else { + engineMetadata_ = value; + } + onChanged(); + } else { + if (engineMetadataCase_ == 12) { + chatEngineMetadataBuilder_.mergeFrom(value); + } else { + chatEngineMetadataBuilder_.setMessage(value); + } + } + engineMetadataCase_ = 12; + return this; + } + + /** + * + * + *
            +     * Output only. Additional information of the Chat Engine. Only applicable
            +     * if
            +     * [solution_type][google.cloud.discoveryengine.v1beta.Engine.solution_type]
            +     * is
            +     * [SOLUTION_TYPE_CHAT][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_CHAT].
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Engine.ChatEngineMetadata chat_engine_metadata = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearChatEngineMetadata() { + if (chatEngineMetadataBuilder_ == null) { + if (engineMetadataCase_ == 12) { + engineMetadataCase_ = 0; + engineMetadata_ = null; + onChanged(); + } + } else { + if (engineMetadataCase_ == 12) { + engineMetadataCase_ = 0; + engineMetadata_ = null; + } + chatEngineMetadataBuilder_.clear(); + } + return this; + } + + /** + * + * + *
            +     * Output only. Additional information of the Chat Engine. Only applicable
            +     * if
            +     * [solution_type][google.cloud.discoveryengine.v1beta.Engine.solution_type]
            +     * is
            +     * [SOLUTION_TYPE_CHAT][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_CHAT].
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Engine.ChatEngineMetadata chat_engine_metadata = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineMetadata.Builder + getChatEngineMetadataBuilder() { + return internalGetChatEngineMetadataFieldBuilder().getBuilder(); + } + + /** + * + * + *
            +     * Output only. Additional information of the Chat Engine. Only applicable
            +     * if
            +     * [solution_type][google.cloud.discoveryengine.v1beta.Engine.solution_type]
            +     * is
            +     * [SOLUTION_TYPE_CHAT][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_CHAT].
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Engine.ChatEngineMetadata chat_engine_metadata = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineMetadataOrBuilder + getChatEngineMetadataOrBuilder() { + if ((engineMetadataCase_ == 12) && (chatEngineMetadataBuilder_ != null)) { + return chatEngineMetadataBuilder_.getMessageOrBuilder(); + } else { + if (engineMetadataCase_ == 12) { + return (com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineMetadata) + engineMetadata_; + } + return com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineMetadata + .getDefaultInstance(); + } + } + + /** + * + * + *
            +     * Output only. Additional information of the Chat Engine. Only applicable
            +     * if
            +     * [solution_type][google.cloud.discoveryengine.v1beta.Engine.solution_type]
            +     * is
            +     * [SOLUTION_TYPE_CHAT][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_CHAT].
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Engine.ChatEngineMetadata chat_engine_metadata = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineMetadata, + com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineMetadata.Builder, + com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineMetadataOrBuilder> + internalGetChatEngineMetadataFieldBuilder() { + if (chatEngineMetadataBuilder_ == null) { + if (!(engineMetadataCase_ == 12)) { + engineMetadata_ = + com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineMetadata + .getDefaultInstance(); + } + chatEngineMetadataBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineMetadata, + com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineMetadata.Builder, + com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineMetadataOrBuilder>( + (com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineMetadata) engineMetadata_, + getParentForChildren(), + isClean()); + engineMetadata_ = null; + } + engineMetadataCase_ = 12; + onChanged(); + return chatEngineMetadataBuilder_; + } + + private java.lang.Object name_ = ""; + + /** + * + * + *
            +     * Immutable. Identifier. The fully qualified resource name of the engine.
            +     *
            +     * This field must be a UTF-8 encoded string with a length limit of 1024
            +     * characters.
            +     *
            +     * Format:
            +     * `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}`
            +     * engine should be 1-63 characters, and valid characters are
            +     * /[a-z0-9][a-z0-9-_]*/. Otherwise, an INVALID_ARGUMENT error is returned.
            +     * 
            + * + * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = IDENTIFIER]; + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
            +     * Immutable. Identifier. The fully qualified resource name of the engine.
            +     *
            +     * This field must be a UTF-8 encoded string with a length limit of 1024
            +     * characters.
            +     *
            +     * Format:
            +     * `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}`
            +     * engine should be 1-63 characters, and valid characters are
            +     * /[a-z0-9][a-z0-9-_]*/. Otherwise, an INVALID_ARGUMENT error is returned.
            +     * 
            + * + * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = IDENTIFIER]; + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } } - if (((bitField0_ & 0x00000004) != 0)) { - output.writeMessage(15, getCommonConfig()); + + /** + * + * + *
            +     * Immutable. Identifier. The fully qualified resource name of the engine.
            +     *
            +     * This field must be a UTF-8 encoded string with a length limit of 1024
            +     * characters.
            +     *
            +     * Format:
            +     * `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}`
            +     * engine should be 1-63 characters, and valid characters are
            +     * /[a-z0-9][a-z0-9-_]*/. Otherwise, an INVALID_ARGUMENT error is returned.
            +     * 
            + * + * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = IDENTIFIER]; + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; } - if (industryVertical_ - != com.google.cloud.discoveryengine.v1beta.IndustryVertical.INDUSTRY_VERTICAL_UNSPECIFIED - .getNumber()) { - output.writeEnum(16, industryVertical_); + + /** + * + * + *
            +     * Immutable. Identifier. The fully qualified resource name of the engine.
            +     *
            +     * This field must be a UTF-8 encoded string with a length limit of 1024
            +     * characters.
            +     *
            +     * Format:
            +     * `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}`
            +     * engine should be 1-63 characters, and valid characters are
            +     * /[a-z0-9][a-z0-9-_]*/. Otherwise, an INVALID_ARGUMENT error is returned.
            +     * 
            + * + * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = IDENTIFIER]; + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; } - if (disableAnalytics_ != false) { - output.writeBool(26, disableAnalytics_); + + /** + * + * + *
            +     * Immutable. Identifier. The fully qualified resource name of the engine.
            +     *
            +     * This field must be a UTF-8 encoded string with a length limit of 1024
            +     * characters.
            +     *
            +     * Format:
            +     * `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}`
            +     * engine should be 1-63 characters, and valid characters are
            +     * /[a-z0-9][a-z0-9-_]*/. Otherwise, an INVALID_ARGUMENT error is returned.
            +     * 
            + * + * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = IDENTIFIER]; + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; } - getUnknownFields().writeTo(output); - } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; + private java.lang.Object displayName_ = ""; - size = 0; - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(displayName_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(2, displayName_); - } - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getCreateTime()); - } - if (((bitField0_ & 0x00000002) != 0)) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getUpdateTime()); - } - { - int dataSize = 0; - for (int i = 0; i < dataStoreIds_.size(); i++) { - dataSize += computeStringSizeNoTag(dataStoreIds_.getRaw(i)); + /** + * + * + *
            +     * Required. The display name of the engine. Should be human readable. UTF-8
            +     * encoded string with limit of 1024 characters.
            +     * 
            + * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The displayName. + */ + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } else { + return (java.lang.String) ref; } - size += dataSize; - size += 1 * getDataStoreIdsList().size(); - } - if (solutionType_ - != com.google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_UNSPECIFIED - .getNumber()) { - size += com.google.protobuf.CodedOutputStream.computeEnumSize(6, solutionType_); - } - if (engineConfigCase_ == 11) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 11, (com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig) engineConfig_); } - if (engineMetadataCase_ == 12) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 12, - (com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineMetadata) engineMetadata_); - } - if (engineConfigCase_ == 13) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 13, - (com.google.cloud.discoveryengine.v1beta.Engine.SearchEngineConfig) engineConfig_); + + /** + * + * + *
            +     * Required. The display name of the engine. Should be human readable. UTF-8
            +     * encoded string with limit of 1024 characters.
            +     * 
            + * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for displayName. + */ + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } } - if (((bitField0_ & 0x00000004) != 0)) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(15, getCommonConfig()); + + /** + * + * + *
            +     * Required. The display name of the engine. Should be human readable. UTF-8
            +     * encoded string with limit of 1024 characters.
            +     * 
            + * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + displayName_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; } - if (industryVertical_ - != com.google.cloud.discoveryengine.v1beta.IndustryVertical.INDUSTRY_VERTICAL_UNSPECIFIED - .getNumber()) { - size += com.google.protobuf.CodedOutputStream.computeEnumSize(16, industryVertical_); + + /** + * + * + *
            +     * Required. The display name of the engine. Should be human readable. UTF-8
            +     * encoded string with limit of 1024 characters.
            +     * 
            + * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + displayName_ = getDefaultInstance().getDisplayName(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; } - if (disableAnalytics_ != false) { - size += com.google.protobuf.CodedOutputStream.computeBoolSize(26, disableAnalytics_); + + /** + * + * + *
            +     * Required. The display name of the engine. Should be human readable. UTF-8
            +     * encoded string with limit of 1024 characters.
            +     * 
            + * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + displayName_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; } - 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.discoveryengine.v1beta.Engine)) { - return super.equals(obj); - } - com.google.cloud.discoveryengine.v1beta.Engine other = - (com.google.cloud.discoveryengine.v1beta.Engine) obj; + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; - if (!getName().equals(other.getName())) return false; - if (!getDisplayName().equals(other.getDisplayName())) return false; - if (hasCreateTime() != other.hasCreateTime()) return false; - if (hasCreateTime()) { - if (!getCreateTime().equals(other.getCreateTime())) return false; - } - if (hasUpdateTime() != other.hasUpdateTime()) return false; - if (hasUpdateTime()) { - if (!getUpdateTime().equals(other.getUpdateTime())) return false; - } - if (!getDataStoreIdsList().equals(other.getDataStoreIdsList())) return false; - if (solutionType_ != other.solutionType_) return false; - if (industryVertical_ != other.industryVertical_) return false; - if (hasCommonConfig() != other.hasCommonConfig()) return false; - if (hasCommonConfig()) { - if (!getCommonConfig().equals(other.getCommonConfig())) return false; + /** + * + * + *
            +     * Output only. Timestamp the Recommendation Engine was created at.
            +     * 
            + * + * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000040) != 0); } - if (getDisableAnalytics() != other.getDisableAnalytics()) return false; - if (!getEngineConfigCase().equals(other.getEngineConfigCase())) return false; - switch (engineConfigCase_) { - case 11: - if (!getChatEngineConfig().equals(other.getChatEngineConfig())) return false; - break; - case 13: - if (!getSearchEngineConfig().equals(other.getSearchEngineConfig())) return false; - break; - case 0: - default: + + /** + * + * + *
            +     * Output only. Timestamp the Recommendation Engine was created at.
            +     * 
            + * + * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } } - if (!getEngineMetadataCase().equals(other.getEngineMetadataCase())) return false; - switch (engineMetadataCase_) { - case 12: - if (!getChatEngineMetadata().equals(other.getChatEngineMetadata())) return false; - break; - case 0: - default: + + /** + * + * + *
            +     * Output only. Timestamp the Recommendation Engine was created at.
            +     * 
            + * + * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + } else { + createTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; + /** + * + * + *
            +     * Output only. Timestamp the Recommendation Engine was created at.
            +     * 
            + * + * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; - hash = (53 * hash) + getDisplayName().hashCode(); - if (hasCreateTime()) { - hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; - hash = (53 * hash) + getCreateTime().hashCode(); + + /** + * + * + *
            +     * Output only. Timestamp the Recommendation Engine was created at.
            +     * 
            + * + * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 0x00000040) != 0) + && createTime_ != null + && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); + } + if (createTime_ != null) { + bitField0_ |= 0x00000040; + onChanged(); + } + return this; } - if (hasUpdateTime()) { - hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; - hash = (53 * hash) + getUpdateTime().hashCode(); + + /** + * + * + *
            +     * Output only. Timestamp the Recommendation Engine was created at.
            +     * 
            + * + * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000040); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + onChanged(); + return this; } - if (getDataStoreIdsCount() > 0) { - hash = (37 * hash) + DATA_STORE_IDS_FIELD_NUMBER; - hash = (53 * hash) + getDataStoreIdsList().hashCode(); + + /** + * + * + *
            +     * Output only. Timestamp the Recommendation Engine was created at.
            +     * 
            + * + * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000040; + onChanged(); + return internalGetCreateTimeFieldBuilder().getBuilder(); } - hash = (37 * hash) + SOLUTION_TYPE_FIELD_NUMBER; - hash = (53 * hash) + solutionType_; - hash = (37 * hash) + INDUSTRY_VERTICAL_FIELD_NUMBER; - hash = (53 * hash) + industryVertical_; - if (hasCommonConfig()) { - hash = (37 * hash) + COMMON_CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getCommonConfig().hashCode(); + + /** + * + * + *
            +     * Output only. Timestamp the Recommendation Engine was created at.
            +     * 
            + * + * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } } - hash = (37 * hash) + DISABLE_ANALYTICS_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getDisableAnalytics()); - switch (engineConfigCase_) { - case 11: - hash = (37 * hash) + CHAT_ENGINE_CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getChatEngineConfig().hashCode(); - break; - case 13: - hash = (37 * hash) + SEARCH_ENGINE_CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getSearchEngineConfig().hashCode(); - break; - case 0: - default: + + /** + * + * + *
            +     * Output only. Timestamp the Recommendation Engine was created at.
            +     * 
            + * + * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + internalGetCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; } - switch (engineMetadataCase_) { - case 12: - hash = (37 * hash) + CHAT_ENGINE_METADATA_FIELD_NUMBER; - hash = (53 * hash) + getChatEngineMetadata().hashCode(); - break; - case 0: - default: + + private com.google.protobuf.Timestamp updateTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + updateTimeBuilder_; + + /** + * + * + *
            +     * Output only. Timestamp the Recommendation Engine was last updated.
            +     * 
            + * + * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000080) != 0); } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - public static com.google.cloud.discoveryengine.v1beta.Engine parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } + /** + * + * + *
            +     * Output only. Timestamp the Recommendation Engine was last updated.
            +     * 
            + * + * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } - public static com.google.cloud.discoveryengine.v1beta.Engine parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } + /** + * + * + *
            +     * Output only. Timestamp the Recommendation Engine was last updated.
            +     * 
            + * + * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + } else { + updateTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } - public static com.google.cloud.discoveryengine.v1beta.Engine parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } + /** + * + * + *
            +     * Output only. Timestamp the Recommendation Engine was last updated.
            +     * 
            + * + * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } - public static com.google.cloud.discoveryengine.v1beta.Engine parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } + /** + * + * + *
            +     * Output only. Timestamp the Recommendation Engine was last updated.
            +     * 
            + * + * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (((bitField0_ & 0x00000080) != 0) + && updateTime_ != null + && updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getUpdateTimeBuilder().mergeFrom(value); + } else { + updateTime_ = value; + } + } else { + updateTimeBuilder_.mergeFrom(value); + } + if (updateTime_ != null) { + bitField0_ |= 0x00000080; + onChanged(); + } + return this; + } - public static com.google.cloud.discoveryengine.v1beta.Engine parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } + /** + * + * + *
            +     * Output only. Timestamp the Recommendation Engine was last updated.
            +     * 
            + * + * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearUpdateTime() { + bitField0_ = (bitField0_ & ~0x00000080); + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + onChanged(); + return this; + } - public static com.google.cloud.discoveryengine.v1beta.Engine parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } + /** + * + * + *
            +     * Output only. Timestamp the Recommendation Engine was last updated.
            +     * 
            + * + * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + bitField0_ |= 0x00000080; + onChanged(); + return internalGetUpdateTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
            +     * Output only. Timestamp the Recommendation Engine was last updated.
            +     * 
            + * + * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } + } - public static com.google.cloud.discoveryengine.v1beta.Engine parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } + /** + * + * + *
            +     * Output only. Timestamp the Recommendation Engine was last updated.
            +     * 
            + * + * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + internalGetUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getUpdateTime(), getParentForChildren(), isClean()); + updateTime_ = null; + } + return updateTimeBuilder_; + } - public static com.google.cloud.discoveryengine.v1beta.Engine parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } + private com.google.protobuf.LazyStringArrayList dataStoreIds_ = + com.google.protobuf.LazyStringArrayList.emptyList(); - public static com.google.cloud.discoveryengine.v1beta.Engine parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } + private void ensureDataStoreIdsIsMutable() { + if (!dataStoreIds_.isModifiable()) { + dataStoreIds_ = new com.google.protobuf.LazyStringArrayList(dataStoreIds_); + } + bitField0_ |= 0x00000100; + } - public static com.google.cloud.discoveryengine.v1beta.Engine parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } + /** + * + * + *
            +     * Optional. The data stores associated with this engine.
            +     *
            +     * For
            +     * [SOLUTION_TYPE_SEARCH][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_SEARCH]
            +     * and
            +     * [SOLUTION_TYPE_RECOMMENDATION][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_RECOMMENDATION]
            +     * type of engines, they can only associate with at most one data store.
            +     *
            +     * If
            +     * [solution_type][google.cloud.discoveryengine.v1beta.Engine.solution_type]
            +     * is
            +     * [SOLUTION_TYPE_CHAT][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_CHAT],
            +     * multiple [DataStore][google.cloud.discoveryengine.v1beta.DataStore]s in the
            +     * same [Collection][google.cloud.discoveryengine.v1beta.Collection] can be
            +     * associated here.
            +     *
            +     * Note that when used in
            +     * [CreateEngineRequest][google.cloud.discoveryengine.v1beta.CreateEngineRequest],
            +     * one DataStore id must be provided as the system will use it for necessary
            +     * initializations.
            +     * 
            + * + * repeated string data_store_ids = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the dataStoreIds. + */ + public com.google.protobuf.ProtocolStringList getDataStoreIdsList() { + dataStoreIds_.makeImmutable(); + return dataStoreIds_; + } - public static com.google.cloud.discoveryengine.v1beta.Engine parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } + /** + * + * + *
            +     * Optional. The data stores associated with this engine.
            +     *
            +     * For
            +     * [SOLUTION_TYPE_SEARCH][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_SEARCH]
            +     * and
            +     * [SOLUTION_TYPE_RECOMMENDATION][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_RECOMMENDATION]
            +     * type of engines, they can only associate with at most one data store.
            +     *
            +     * If
            +     * [solution_type][google.cloud.discoveryengine.v1beta.Engine.solution_type]
            +     * is
            +     * [SOLUTION_TYPE_CHAT][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_CHAT],
            +     * multiple [DataStore][google.cloud.discoveryengine.v1beta.DataStore]s in the
            +     * same [Collection][google.cloud.discoveryengine.v1beta.Collection] can be
            +     * associated here.
            +     *
            +     * Note that when used in
            +     * [CreateEngineRequest][google.cloud.discoveryengine.v1beta.CreateEngineRequest],
            +     * one DataStore id must be provided as the system will use it for necessary
            +     * initializations.
            +     * 
            + * + * repeated string data_store_ids = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of dataStoreIds. + */ + public int getDataStoreIdsCount() { + return dataStoreIds_.size(); + } - public static com.google.cloud.discoveryengine.v1beta.Engine parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } + /** + * + * + *
            +     * Optional. The data stores associated with this engine.
            +     *
            +     * For
            +     * [SOLUTION_TYPE_SEARCH][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_SEARCH]
            +     * and
            +     * [SOLUTION_TYPE_RECOMMENDATION][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_RECOMMENDATION]
            +     * type of engines, they can only associate with at most one data store.
            +     *
            +     * If
            +     * [solution_type][google.cloud.discoveryengine.v1beta.Engine.solution_type]
            +     * is
            +     * [SOLUTION_TYPE_CHAT][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_CHAT],
            +     * multiple [DataStore][google.cloud.discoveryengine.v1beta.DataStore]s in the
            +     * same [Collection][google.cloud.discoveryengine.v1beta.Collection] can be
            +     * associated here.
            +     *
            +     * Note that when used in
            +     * [CreateEngineRequest][google.cloud.discoveryengine.v1beta.CreateEngineRequest],
            +     * one DataStore id must be provided as the system will use it for necessary
            +     * initializations.
            +     * 
            + * + * repeated string data_store_ids = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The dataStoreIds at the given index. + */ + public java.lang.String getDataStoreIds(int index) { + return dataStoreIds_.get(index); + } - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } + /** + * + * + *
            +     * Optional. The data stores associated with this engine.
            +     *
            +     * For
            +     * [SOLUTION_TYPE_SEARCH][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_SEARCH]
            +     * and
            +     * [SOLUTION_TYPE_RECOMMENDATION][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_RECOMMENDATION]
            +     * type of engines, they can only associate with at most one data store.
            +     *
            +     * If
            +     * [solution_type][google.cloud.discoveryengine.v1beta.Engine.solution_type]
            +     * is
            +     * [SOLUTION_TYPE_CHAT][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_CHAT],
            +     * multiple [DataStore][google.cloud.discoveryengine.v1beta.DataStore]s in the
            +     * same [Collection][google.cloud.discoveryengine.v1beta.Collection] can be
            +     * associated here.
            +     *
            +     * Note that when used in
            +     * [CreateEngineRequest][google.cloud.discoveryengine.v1beta.CreateEngineRequest],
            +     * one DataStore id must be provided as the system will use it for necessary
            +     * initializations.
            +     * 
            + * + * repeated string data_store_ids = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the dataStoreIds at the given index. + */ + public com.google.protobuf.ByteString getDataStoreIdsBytes(int index) { + return dataStoreIds_.getByteString(index); + } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } + /** + * + * + *
            +     * Optional. The data stores associated with this engine.
            +     *
            +     * For
            +     * [SOLUTION_TYPE_SEARCH][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_SEARCH]
            +     * and
            +     * [SOLUTION_TYPE_RECOMMENDATION][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_RECOMMENDATION]
            +     * type of engines, they can only associate with at most one data store.
            +     *
            +     * If
            +     * [solution_type][google.cloud.discoveryengine.v1beta.Engine.solution_type]
            +     * is
            +     * [SOLUTION_TYPE_CHAT][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_CHAT],
            +     * multiple [DataStore][google.cloud.discoveryengine.v1beta.DataStore]s in the
            +     * same [Collection][google.cloud.discoveryengine.v1beta.Collection] can be
            +     * associated here.
            +     *
            +     * Note that when used in
            +     * [CreateEngineRequest][google.cloud.discoveryengine.v1beta.CreateEngineRequest],
            +     * one DataStore id must be provided as the system will use it for necessary
            +     * initializations.
            +     * 
            + * + * repeated string data_store_ids = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index to set the value at. + * @param value The dataStoreIds to set. + * @return This builder for chaining. + */ + public Builder setDataStoreIds(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureDataStoreIdsIsMutable(); + dataStoreIds_.set(index, value); + bitField0_ |= 0x00000100; + onChanged(); + return this; + } - public static Builder newBuilder(com.google.cloud.discoveryengine.v1beta.Engine prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } + /** + * + * + *
            +     * Optional. The data stores associated with this engine.
            +     *
            +     * For
            +     * [SOLUTION_TYPE_SEARCH][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_SEARCH]
            +     * and
            +     * [SOLUTION_TYPE_RECOMMENDATION][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_RECOMMENDATION]
            +     * type of engines, they can only associate with at most one data store.
            +     *
            +     * If
            +     * [solution_type][google.cloud.discoveryengine.v1beta.Engine.solution_type]
            +     * is
            +     * [SOLUTION_TYPE_CHAT][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_CHAT],
            +     * multiple [DataStore][google.cloud.discoveryengine.v1beta.DataStore]s in the
            +     * same [Collection][google.cloud.discoveryengine.v1beta.Collection] can be
            +     * associated here.
            +     *
            +     * Note that when used in
            +     * [CreateEngineRequest][google.cloud.discoveryengine.v1beta.CreateEngineRequest],
            +     * one DataStore id must be provided as the system will use it for necessary
            +     * initializations.
            +     * 
            + * + * repeated string data_store_ids = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The dataStoreIds to add. + * @return This builder for chaining. + */ + public Builder addDataStoreIds(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureDataStoreIdsIsMutable(); + dataStoreIds_.add(value); + bitField0_ |= 0x00000100; + onChanged(); + return this; + } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } + /** + * + * + *
            +     * Optional. The data stores associated with this engine.
            +     *
            +     * For
            +     * [SOLUTION_TYPE_SEARCH][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_SEARCH]
            +     * and
            +     * [SOLUTION_TYPE_RECOMMENDATION][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_RECOMMENDATION]
            +     * type of engines, they can only associate with at most one data store.
            +     *
            +     * If
            +     * [solution_type][google.cloud.discoveryengine.v1beta.Engine.solution_type]
            +     * is
            +     * [SOLUTION_TYPE_CHAT][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_CHAT],
            +     * multiple [DataStore][google.cloud.discoveryengine.v1beta.DataStore]s in the
            +     * same [Collection][google.cloud.discoveryengine.v1beta.Collection] can be
            +     * associated here.
            +     *
            +     * Note that when used in
            +     * [CreateEngineRequest][google.cloud.discoveryengine.v1beta.CreateEngineRequest],
            +     * one DataStore id must be provided as the system will use it for necessary
            +     * initializations.
            +     * 
            + * + * repeated string data_store_ids = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param values The dataStoreIds to add. + * @return This builder for chaining. + */ + public Builder addAllDataStoreIds(java.lang.Iterable values) { + ensureDataStoreIdsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, dataStoreIds_); + bitField0_ |= 0x00000100; + onChanged(); + return this; + } - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } + /** + * + * + *
            +     * Optional. The data stores associated with this engine.
            +     *
            +     * For
            +     * [SOLUTION_TYPE_SEARCH][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_SEARCH]
            +     * and
            +     * [SOLUTION_TYPE_RECOMMENDATION][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_RECOMMENDATION]
            +     * type of engines, they can only associate with at most one data store.
            +     *
            +     * If
            +     * [solution_type][google.cloud.discoveryengine.v1beta.Engine.solution_type]
            +     * is
            +     * [SOLUTION_TYPE_CHAT][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_CHAT],
            +     * multiple [DataStore][google.cloud.discoveryengine.v1beta.DataStore]s in the
            +     * same [Collection][google.cloud.discoveryengine.v1beta.Collection] can be
            +     * associated here.
            +     *
            +     * Note that when used in
            +     * [CreateEngineRequest][google.cloud.discoveryengine.v1beta.CreateEngineRequest],
            +     * one DataStore id must be provided as the system will use it for necessary
            +     * initializations.
            +     * 
            + * + * repeated string data_store_ids = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearDataStoreIds() { + dataStoreIds_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000100); + ; + onChanged(); + return this; + } - /** - * - * - *
            -   * Metadata that describes the training and serving parameters of an
            -   * [Engine][google.cloud.discoveryengine.v1beta.Engine].
            -   * 
            - * - * Protobuf type {@code google.cloud.discoveryengine.v1beta.Engine} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.Engine) - com.google.cloud.discoveryengine.v1beta.EngineOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.discoveryengine.v1beta.EngineProto - .internal_static_google_cloud_discoveryengine_v1beta_Engine_descriptor; + /** + * + * + *
            +     * Optional. The data stores associated with this engine.
            +     *
            +     * For
            +     * [SOLUTION_TYPE_SEARCH][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_SEARCH]
            +     * and
            +     * [SOLUTION_TYPE_RECOMMENDATION][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_RECOMMENDATION]
            +     * type of engines, they can only associate with at most one data store.
            +     *
            +     * If
            +     * [solution_type][google.cloud.discoveryengine.v1beta.Engine.solution_type]
            +     * is
            +     * [SOLUTION_TYPE_CHAT][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_CHAT],
            +     * multiple [DataStore][google.cloud.discoveryengine.v1beta.DataStore]s in the
            +     * same [Collection][google.cloud.discoveryengine.v1beta.Collection] can be
            +     * associated here.
            +     *
            +     * Note that when used in
            +     * [CreateEngineRequest][google.cloud.discoveryengine.v1beta.CreateEngineRequest],
            +     * one DataStore id must be provided as the system will use it for necessary
            +     * initializations.
            +     * 
            + * + * repeated string data_store_ids = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes of the dataStoreIds to add. + * @return This builder for chaining. + */ + public Builder addDataStoreIdsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureDataStoreIdsIsMutable(); + dataStoreIds_.add(value); + bitField0_ |= 0x00000100; + onChanged(); + return this; } + private int solutionType_ = 0; + + /** + * + * + *
            +     * Required. The solutions of the engine.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SolutionType solution_type = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for solutionType. + */ @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.discoveryengine.v1beta.EngineProto - .internal_static_google_cloud_discoveryengine_v1beta_Engine_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.discoveryengine.v1beta.Engine.class, - com.google.cloud.discoveryengine.v1beta.Engine.Builder.class); + public int getSolutionTypeValue() { + return solutionType_; } - // Construct using com.google.cloud.discoveryengine.v1beta.Engine.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); + /** + * + * + *
            +     * Required. The solutions of the engine.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SolutionType solution_type = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The enum numeric value on the wire for solutionType to set. + * @return This builder for chaining. + */ + public Builder setSolutionTypeValue(int value) { + solutionType_ = value; + bitField0_ |= 0x00000200; + onChanged(); + return this; } - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); + /** + * + * + *
            +     * Required. The solutions of the engine.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SolutionType solution_type = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The solutionType. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.SolutionType getSolutionType() { + com.google.cloud.discoveryengine.v1beta.SolutionType result = + com.google.cloud.discoveryengine.v1beta.SolutionType.forNumber(solutionType_); + return result == null + ? com.google.cloud.discoveryengine.v1beta.SolutionType.UNRECOGNIZED + : result; } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - internalGetCreateTimeFieldBuilder(); - internalGetUpdateTimeFieldBuilder(); - internalGetCommonConfigFieldBuilder(); + /** + * + * + *
            +     * Required. The solutions of the engine.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SolutionType solution_type = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The solutionType to set. + * @return This builder for chaining. + */ + public Builder setSolutionType(com.google.cloud.discoveryengine.v1beta.SolutionType value) { + if (value == null) { + throw new NullPointerException(); } + bitField0_ |= 0x00000200; + solutionType_ = value.getNumber(); + onChanged(); + return this; } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - if (chatEngineConfigBuilder_ != null) { - chatEngineConfigBuilder_.clear(); - } - if (searchEngineConfigBuilder_ != null) { - searchEngineConfigBuilder_.clear(); - } - if (chatEngineMetadataBuilder_ != null) { - chatEngineMetadataBuilder_.clear(); - } - name_ = ""; - displayName_ = ""; - createTime_ = null; - if (createTimeBuilder_ != null) { - createTimeBuilder_.dispose(); - createTimeBuilder_ = null; - } - updateTime_ = null; - if (updateTimeBuilder_ != null) { - updateTimeBuilder_.dispose(); - updateTimeBuilder_ = null; - } - dataStoreIds_ = com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
            +     * Required. The solutions of the engine.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SolutionType solution_type = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return This builder for chaining. + */ + public Builder clearSolutionType() { + bitField0_ = (bitField0_ & ~0x00000200); solutionType_ = 0; - industryVertical_ = 0; - commonConfig_ = null; - if (commonConfigBuilder_ != null) { - commonConfigBuilder_.dispose(); - commonConfigBuilder_ = null; - } - disableAnalytics_ = false; - engineConfigCase_ = 0; - engineConfig_ = null; - engineMetadataCase_ = 0; - engineMetadata_ = null; + onChanged(); return this; } + private int industryVertical_ = 0; + + /** + * + * + *
            +     * Optional. The industry vertical that the engine registers.
            +     * The restriction of the Engine industry vertical is based on
            +     * [DataStore][google.cloud.discoveryengine.v1beta.DataStore]: Vertical on
            +     * Engine has to match vertical of the DataStore linked to the engine.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.IndustryVertical industry_vertical = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for industryVertical. + */ @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.discoveryengine.v1beta.EngineProto - .internal_static_google_cloud_discoveryengine_v1beta_Engine_descriptor; + public int getIndustryVerticalValue() { + return industryVertical_; } - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.Engine getDefaultInstanceForType() { - return com.google.cloud.discoveryengine.v1beta.Engine.getDefaultInstance(); + /** + * + * + *
            +     * Optional. The industry vertical that the engine registers.
            +     * The restriction of the Engine industry vertical is based on
            +     * [DataStore][google.cloud.discoveryengine.v1beta.DataStore]: Vertical on
            +     * Engine has to match vertical of the DataStore linked to the engine.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.IndustryVertical industry_vertical = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The enum numeric value on the wire for industryVertical to set. + * @return This builder for chaining. + */ + public Builder setIndustryVerticalValue(int value) { + industryVertical_ = value; + bitField0_ |= 0x00000400; + onChanged(); + return this; } + /** + * + * + *
            +     * Optional. The industry vertical that the engine registers.
            +     * The restriction of the Engine industry vertical is based on
            +     * [DataStore][google.cloud.discoveryengine.v1beta.DataStore]: Vertical on
            +     * Engine has to match vertical of the DataStore linked to the engine.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.IndustryVertical industry_vertical = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The industryVertical. + */ @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.Engine build() { - com.google.cloud.discoveryengine.v1beta.Engine result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; + public com.google.cloud.discoveryengine.v1beta.IndustryVertical getIndustryVertical() { + com.google.cloud.discoveryengine.v1beta.IndustryVertical result = + com.google.cloud.discoveryengine.v1beta.IndustryVertical.forNumber(industryVertical_); + return result == null + ? com.google.cloud.discoveryengine.v1beta.IndustryVertical.UNRECOGNIZED + : result; } - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.Engine buildPartial() { - com.google.cloud.discoveryengine.v1beta.Engine result = - new com.google.cloud.discoveryengine.v1beta.Engine(this); - if (bitField0_ != 0) { - buildPartial0(result); + /** + * + * + *
            +     * Optional. The industry vertical that the engine registers.
            +     * The restriction of the Engine industry vertical is based on
            +     * [DataStore][google.cloud.discoveryengine.v1beta.DataStore]: Vertical on
            +     * Engine has to match vertical of the DataStore linked to the engine.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.IndustryVertical industry_vertical = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The industryVertical to set. + * @return This builder for chaining. + */ + public Builder setIndustryVertical( + com.google.cloud.discoveryengine.v1beta.IndustryVertical value) { + if (value == null) { + throw new NullPointerException(); } - buildPartialOneofs(result); - onBuilt(); - return result; + bitField0_ |= 0x00000400; + industryVertical_ = value.getNumber(); + onChanged(); + return this; } - private void buildPartial0(com.google.cloud.discoveryengine.v1beta.Engine result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000008) != 0)) { - result.name_ = name_; - } - if (((from_bitField0_ & 0x00000010) != 0)) { - result.displayName_ = displayName_; - } - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000020) != 0)) { - result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - if (((from_bitField0_ & 0x00000040) != 0)) { - result.updateTime_ = updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build(); - to_bitField0_ |= 0x00000002; - } - if (((from_bitField0_ & 0x00000080) != 0)) { - dataStoreIds_.makeImmutable(); - result.dataStoreIds_ = dataStoreIds_; - } - if (((from_bitField0_ & 0x00000100) != 0)) { - result.solutionType_ = solutionType_; - } - if (((from_bitField0_ & 0x00000200) != 0)) { - result.industryVertical_ = industryVertical_; - } - if (((from_bitField0_ & 0x00000400) != 0)) { - result.commonConfig_ = - commonConfigBuilder_ == null ? commonConfig_ : commonConfigBuilder_.build(); - to_bitField0_ |= 0x00000004; - } - if (((from_bitField0_ & 0x00000800) != 0)) { - result.disableAnalytics_ = disableAnalytics_; - } - result.bitField0_ |= to_bitField0_; + /** + * + * + *
            +     * Optional. The industry vertical that the engine registers.
            +     * The restriction of the Engine industry vertical is based on
            +     * [DataStore][google.cloud.discoveryengine.v1beta.DataStore]: Vertical on
            +     * Engine has to match vertical of the DataStore linked to the engine.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.IndustryVertical industry_vertical = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearIndustryVertical() { + bitField0_ = (bitField0_ & ~0x00000400); + industryVertical_ = 0; + onChanged(); + return this; } - private void buildPartialOneofs(com.google.cloud.discoveryengine.v1beta.Engine result) { - result.engineConfigCase_ = engineConfigCase_; - result.engineConfig_ = this.engineConfig_; - if (engineConfigCase_ == 11 && chatEngineConfigBuilder_ != null) { - result.engineConfig_ = chatEngineConfigBuilder_.build(); - } - if (engineConfigCase_ == 13 && searchEngineConfigBuilder_ != null) { - result.engineConfig_ = searchEngineConfigBuilder_.build(); - } - result.engineMetadataCase_ = engineMetadataCase_; - result.engineMetadata_ = this.engineMetadata_; - if (engineMetadataCase_ == 12 && chatEngineMetadataBuilder_ != null) { - result.engineMetadata_ = chatEngineMetadataBuilder_.build(); - } + private com.google.cloud.discoveryengine.v1beta.Engine.CommonConfig commonConfig_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.Engine.CommonConfig, + com.google.cloud.discoveryengine.v1beta.Engine.CommonConfig.Builder, + com.google.cloud.discoveryengine.v1beta.Engine.CommonConfigOrBuilder> + commonConfigBuilder_; + + /** + * + * + *
            +     * Common config spec that specifies the metadata of the engine.
            +     * 
            + * + * .google.cloud.discoveryengine.v1beta.Engine.CommonConfig common_config = 15; + * + * @return Whether the commonConfig field is set. + */ + public boolean hasCommonConfig() { + return ((bitField0_ & 0x00000800) != 0); } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.discoveryengine.v1beta.Engine) { - return mergeFrom((com.google.cloud.discoveryengine.v1beta.Engine) other); + /** + * + * + *
            +     * Common config spec that specifies the metadata of the engine.
            +     * 
            + * + * .google.cloud.discoveryengine.v1beta.Engine.CommonConfig common_config = 15; + * + * @return The commonConfig. + */ + public com.google.cloud.discoveryengine.v1beta.Engine.CommonConfig getCommonConfig() { + if (commonConfigBuilder_ == null) { + return commonConfig_ == null + ? com.google.cloud.discoveryengine.v1beta.Engine.CommonConfig.getDefaultInstance() + : commonConfig_; } else { - super.mergeFrom(other); - return this; + return commonConfigBuilder_.getMessage(); } } - public Builder mergeFrom(com.google.cloud.discoveryengine.v1beta.Engine other) { - if (other == com.google.cloud.discoveryengine.v1beta.Engine.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - bitField0_ |= 0x00000008; - onChanged(); - } - if (!other.getDisplayName().isEmpty()) { - displayName_ = other.displayName_; - bitField0_ |= 0x00000010; - onChanged(); - } - if (other.hasCreateTime()) { - mergeCreateTime(other.getCreateTime()); - } - if (other.hasUpdateTime()) { - mergeUpdateTime(other.getUpdateTime()); - } - if (!other.dataStoreIds_.isEmpty()) { - if (dataStoreIds_.isEmpty()) { - dataStoreIds_ = other.dataStoreIds_; - bitField0_ |= 0x00000080; - } else { - ensureDataStoreIdsIsMutable(); - dataStoreIds_.addAll(other.dataStoreIds_); + /** + * + * + *
            +     * Common config spec that specifies the metadata of the engine.
            +     * 
            + * + * .google.cloud.discoveryengine.v1beta.Engine.CommonConfig common_config = 15; + */ + public Builder setCommonConfig( + com.google.cloud.discoveryengine.v1beta.Engine.CommonConfig value) { + if (commonConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); } - onChanged(); - } - if (other.solutionType_ != 0) { - setSolutionTypeValue(other.getSolutionTypeValue()); - } - if (other.industryVertical_ != 0) { - setIndustryVerticalValue(other.getIndustryVerticalValue()); - } - if (other.hasCommonConfig()) { - mergeCommonConfig(other.getCommonConfig()); - } - if (other.getDisableAnalytics() != false) { - setDisableAnalytics(other.getDisableAnalytics()); - } - switch (other.getEngineConfigCase()) { - case CHAT_ENGINE_CONFIG: - { - mergeChatEngineConfig(other.getChatEngineConfig()); - break; - } - case SEARCH_ENGINE_CONFIG: - { - mergeSearchEngineConfig(other.getSearchEngineConfig()); - break; - } - case ENGINECONFIG_NOT_SET: - { - break; - } - } - switch (other.getEngineMetadataCase()) { - case CHAT_ENGINE_METADATA: - { - mergeChatEngineMetadata(other.getChatEngineMetadata()); - break; - } - case ENGINEMETADATA_NOT_SET: - { - break; - } + commonConfig_ = value; + } else { + commonConfigBuilder_.setMessage(value); } - this.mergeUnknownFields(other.getUnknownFields()); + bitField0_ |= 0x00000800; onChanged(); return this; } - @java.lang.Override - public final boolean isInitialized() { - return true; + /** + * + * + *
            +     * Common config spec that specifies the metadata of the engine.
            +     * 
            + * + * .google.cloud.discoveryengine.v1beta.Engine.CommonConfig common_config = 15; + */ + public Builder setCommonConfig( + com.google.cloud.discoveryengine.v1beta.Engine.CommonConfig.Builder builderForValue) { + if (commonConfigBuilder_ == null) { + commonConfig_ = builderForValue.build(); + } else { + commonConfigBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000800; + onChanged(); + return this; } - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); + /** + * + * + *
            +     * Common config spec that specifies the metadata of the engine.
            +     * 
            + * + * .google.cloud.discoveryengine.v1beta.Engine.CommonConfig common_config = 15; + */ + public Builder mergeCommonConfig( + com.google.cloud.discoveryengine.v1beta.Engine.CommonConfig value) { + if (commonConfigBuilder_ == null) { + if (((bitField0_ & 0x00000800) != 0) + && commonConfig_ != null + && commonConfig_ + != com.google.cloud.discoveryengine.v1beta.Engine.CommonConfig + .getDefaultInstance()) { + getCommonConfigBuilder().mergeFrom(value); + } else { + commonConfig_ = value; + } + } else { + commonConfigBuilder_.mergeFrom(value); } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - name_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - break; - } // case 10 - case 18: - { - displayName_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000010; - break; - } // case 18 - case 26: - { - input.readMessage( - internalGetCreateTimeFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000020; - break; - } // case 26 - case 34: - { - input.readMessage( - internalGetUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000040; - break; - } // case 34 - case 42: - { - java.lang.String s = input.readStringRequireUtf8(); - ensureDataStoreIdsIsMutable(); - dataStoreIds_.add(s); - break; - } // case 42 - case 48: - { - solutionType_ = input.readEnum(); - bitField0_ |= 0x00000100; - break; - } // case 48 - case 90: - { - input.readMessage( - internalGetChatEngineConfigFieldBuilder().getBuilder(), extensionRegistry); - engineConfigCase_ = 11; - break; - } // case 90 - case 98: - { - input.readMessage( - internalGetChatEngineMetadataFieldBuilder().getBuilder(), extensionRegistry); - engineMetadataCase_ = 12; - break; - } // case 98 - case 106: - { - input.readMessage( - internalGetSearchEngineConfigFieldBuilder().getBuilder(), extensionRegistry); - engineConfigCase_ = 13; - break; - } // case 106 - case 122: - { - input.readMessage( - internalGetCommonConfigFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000400; - break; - } // case 122 - case 128: - { - industryVertical_ = input.readEnum(); - bitField0_ |= 0x00000200; - break; - } // case 128 - case 208: - { - disableAnalytics_ = input.readBool(); - bitField0_ |= 0x00000800; - break; - } // case 208 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { + if (commonConfig_ != null) { + bitField0_ |= 0x00000800; onChanged(); - } // finally + } return this; } - private int engineConfigCase_ = 0; - private java.lang.Object engineConfig_; - - public EngineConfigCase getEngineConfigCase() { - return EngineConfigCase.forNumber(engineConfigCase_); - } - - public Builder clearEngineConfig() { - engineConfigCase_ = 0; - engineConfig_ = null; + /** + * + * + *
            +     * Common config spec that specifies the metadata of the engine.
            +     * 
            + * + * .google.cloud.discoveryengine.v1beta.Engine.CommonConfig common_config = 15; + */ + public Builder clearCommonConfig() { + bitField0_ = (bitField0_ & ~0x00000800); + commonConfig_ = null; + if (commonConfigBuilder_ != null) { + commonConfigBuilder_.dispose(); + commonConfigBuilder_ = null; + } onChanged(); return this; } - private int engineMetadataCase_ = 0; - private java.lang.Object engineMetadata_; - - public EngineMetadataCase getEngineMetadataCase() { - return EngineMetadataCase.forNumber(engineMetadataCase_); + /** + * + * + *
            +     * Common config spec that specifies the metadata of the engine.
            +     * 
            + * + * .google.cloud.discoveryengine.v1beta.Engine.CommonConfig common_config = 15; + */ + public com.google.cloud.discoveryengine.v1beta.Engine.CommonConfig.Builder + getCommonConfigBuilder() { + bitField0_ |= 0x00000800; + onChanged(); + return internalGetCommonConfigFieldBuilder().getBuilder(); } - public Builder clearEngineMetadata() { - engineMetadataCase_ = 0; - engineMetadata_ = null; - onChanged(); - return this; + /** + * + * + *
            +     * Common config spec that specifies the metadata of the engine.
            +     * 
            + * + * .google.cloud.discoveryengine.v1beta.Engine.CommonConfig common_config = 15; + */ + public com.google.cloud.discoveryengine.v1beta.Engine.CommonConfigOrBuilder + getCommonConfigOrBuilder() { + if (commonConfigBuilder_ != null) { + return commonConfigBuilder_.getMessageOrBuilder(); + } else { + return commonConfig_ == null + ? com.google.cloud.discoveryengine.v1beta.Engine.CommonConfig.getDefaultInstance() + : commonConfig_; + } } - private int bitField0_; + /** + * + * + *
            +     * Common config spec that specifies the metadata of the engine.
            +     * 
            + * + * .google.cloud.discoveryengine.v1beta.Engine.CommonConfig common_config = 15; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.Engine.CommonConfig, + com.google.cloud.discoveryengine.v1beta.Engine.CommonConfig.Builder, + com.google.cloud.discoveryengine.v1beta.Engine.CommonConfigOrBuilder> + internalGetCommonConfigFieldBuilder() { + if (commonConfigBuilder_ == null) { + commonConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.Engine.CommonConfig, + com.google.cloud.discoveryengine.v1beta.Engine.CommonConfig.Builder, + com.google.cloud.discoveryengine.v1beta.Engine.CommonConfigOrBuilder>( + getCommonConfig(), getParentForChildren(), isClean()); + commonConfig_ = null; + } + return commonConfigBuilder_; + } + private com.google.cloud.discoveryengine.v1beta.Engine.KnowledgeGraphConfig + knowledgeGraphConfig_; private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig, - com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig.Builder, - com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfigOrBuilder> - chatEngineConfigBuilder_; + com.google.cloud.discoveryengine.v1beta.Engine.KnowledgeGraphConfig, + com.google.cloud.discoveryengine.v1beta.Engine.KnowledgeGraphConfig.Builder, + com.google.cloud.discoveryengine.v1beta.Engine.KnowledgeGraphConfigOrBuilder> + knowledgeGraphConfigBuilder_; /** * * *
            -     * Configurations for the Chat Engine. Only applicable if
            +     * Optional. Configurations for the Knowledge Graph. Only applicable if
                  * [solution_type][google.cloud.discoveryengine.v1beta.Engine.solution_type]
                  * is
            -     * [SOLUTION_TYPE_CHAT][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_CHAT].
            +     * [SOLUTION_TYPE_SEARCH][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_SEARCH].
                  * 
            * - * .google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig chat_engine_config = 11; + * + * .google.cloud.discoveryengine.v1beta.Engine.KnowledgeGraphConfig knowledge_graph_config = 23 [(.google.api.field_behavior) = OPTIONAL]; * * - * @return Whether the chatEngineConfig field is set. + * @return Whether the knowledgeGraphConfig field is set. */ - @java.lang.Override - public boolean hasChatEngineConfig() { - return engineConfigCase_ == 11; + public boolean hasKnowledgeGraphConfig() { + return ((bitField0_ & 0x00001000) != 0); } /** * * *
            -     * Configurations for the Chat Engine. Only applicable if
            +     * Optional. Configurations for the Knowledge Graph. Only applicable if
                  * [solution_type][google.cloud.discoveryengine.v1beta.Engine.solution_type]
                  * is
            -     * [SOLUTION_TYPE_CHAT][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_CHAT].
            +     * [SOLUTION_TYPE_SEARCH][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_SEARCH].
                  * 
            * - * .google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig chat_engine_config = 11; + * + * .google.cloud.discoveryengine.v1beta.Engine.KnowledgeGraphConfig knowledge_graph_config = 23 [(.google.api.field_behavior) = OPTIONAL]; * * - * @return The chatEngineConfig. + * @return The knowledgeGraphConfig. */ - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig getChatEngineConfig() { - if (chatEngineConfigBuilder_ == null) { - if (engineConfigCase_ == 11) { - return (com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig) engineConfig_; - } - return com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig.getDefaultInstance(); + public com.google.cloud.discoveryengine.v1beta.Engine.KnowledgeGraphConfig + getKnowledgeGraphConfig() { + if (knowledgeGraphConfigBuilder_ == null) { + return knowledgeGraphConfig_ == null + ? com.google.cloud.discoveryengine.v1beta.Engine.KnowledgeGraphConfig + .getDefaultInstance() + : knowledgeGraphConfig_; } else { - if (engineConfigCase_ == 11) { - return chatEngineConfigBuilder_.getMessage(); - } - return com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig.getDefaultInstance(); + return knowledgeGraphConfigBuilder_.getMessage(); } } @@ -6778,27 +21140,28 @@ public com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig getChatEn * * *
            -     * Configurations for the Chat Engine. Only applicable if
            +     * Optional. Configurations for the Knowledge Graph. Only applicable if
                  * [solution_type][google.cloud.discoveryengine.v1beta.Engine.solution_type]
                  * is
            -     * [SOLUTION_TYPE_CHAT][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_CHAT].
            +     * [SOLUTION_TYPE_SEARCH][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_SEARCH].
                  * 
            * - * .google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig chat_engine_config = 11; + * + * .google.cloud.discoveryengine.v1beta.Engine.KnowledgeGraphConfig knowledge_graph_config = 23 [(.google.api.field_behavior) = OPTIONAL]; * */ - public Builder setChatEngineConfig( - com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig value) { - if (chatEngineConfigBuilder_ == null) { + public Builder setKnowledgeGraphConfig( + com.google.cloud.discoveryengine.v1beta.Engine.KnowledgeGraphConfig value) { + if (knowledgeGraphConfigBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - engineConfig_ = value; - onChanged(); + knowledgeGraphConfig_ = value; } else { - chatEngineConfigBuilder_.setMessage(value); + knowledgeGraphConfigBuilder_.setMessage(value); } - engineConfigCase_ = 11; + bitField0_ |= 0x00001000; + onChanged(); return this; } @@ -6806,24 +21169,26 @@ public Builder setChatEngineConfig( * * *
            -     * Configurations for the Chat Engine. Only applicable if
            +     * Optional. Configurations for the Knowledge Graph. Only applicable if
                  * [solution_type][google.cloud.discoveryengine.v1beta.Engine.solution_type]
                  * is
            -     * [SOLUTION_TYPE_CHAT][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_CHAT].
            +     * [SOLUTION_TYPE_SEARCH][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_SEARCH].
                  * 
            * - * .google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig chat_engine_config = 11; + * + * .google.cloud.discoveryengine.v1beta.Engine.KnowledgeGraphConfig knowledge_graph_config = 23 [(.google.api.field_behavior) = OPTIONAL]; * */ - public Builder setChatEngineConfig( - com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig.Builder builderForValue) { - if (chatEngineConfigBuilder_ == null) { - engineConfig_ = builderForValue.build(); - onChanged(); + public Builder setKnowledgeGraphConfig( + com.google.cloud.discoveryengine.v1beta.Engine.KnowledgeGraphConfig.Builder + builderForValue) { + if (knowledgeGraphConfigBuilder_ == null) { + knowledgeGraphConfig_ = builderForValue.build(); } else { - chatEngineConfigBuilder_.setMessage(builderForValue.build()); + knowledgeGraphConfigBuilder_.setMessage(builderForValue.build()); } - engineConfigCase_ = 11; + bitField0_ |= 0x00001000; + onChanged(); return this; } @@ -6831,40 +21196,35 @@ public Builder setChatEngineConfig( * * *
            -     * Configurations for the Chat Engine. Only applicable if
            +     * Optional. Configurations for the Knowledge Graph. Only applicable if
                  * [solution_type][google.cloud.discoveryengine.v1beta.Engine.solution_type]
                  * is
            -     * [SOLUTION_TYPE_CHAT][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_CHAT].
            +     * [SOLUTION_TYPE_SEARCH][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_SEARCH].
                  * 
            * - * .google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig chat_engine_config = 11; + * + * .google.cloud.discoveryengine.v1beta.Engine.KnowledgeGraphConfig knowledge_graph_config = 23 [(.google.api.field_behavior) = OPTIONAL]; * */ - public Builder mergeChatEngineConfig( - com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig value) { - if (chatEngineConfigBuilder_ == null) { - if (engineConfigCase_ == 11 - && engineConfig_ - != com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig + public Builder mergeKnowledgeGraphConfig( + com.google.cloud.discoveryengine.v1beta.Engine.KnowledgeGraphConfig value) { + if (knowledgeGraphConfigBuilder_ == null) { + if (((bitField0_ & 0x00001000) != 0) + && knowledgeGraphConfig_ != null + && knowledgeGraphConfig_ + != com.google.cloud.discoveryengine.v1beta.Engine.KnowledgeGraphConfig .getDefaultInstance()) { - engineConfig_ = - com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig.newBuilder( - (com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig) - engineConfig_) - .mergeFrom(value) - .buildPartial(); + getKnowledgeGraphConfigBuilder().mergeFrom(value); } else { - engineConfig_ = value; + knowledgeGraphConfig_ = value; } - onChanged(); } else { - if (engineConfigCase_ == 11) { - chatEngineConfigBuilder_.mergeFrom(value); - } else { - chatEngineConfigBuilder_.setMessage(value); - } + knowledgeGraphConfigBuilder_.mergeFrom(value); + } + if (knowledgeGraphConfig_ != null) { + bitField0_ |= 0x00001000; + onChanged(); } - engineConfigCase_ = 11; return this; } @@ -6872,29 +21232,24 @@ public Builder mergeChatEngineConfig( * * *
            -     * Configurations for the Chat Engine. Only applicable if
            +     * Optional. Configurations for the Knowledge Graph. Only applicable if
                  * [solution_type][google.cloud.discoveryengine.v1beta.Engine.solution_type]
                  * is
            -     * [SOLUTION_TYPE_CHAT][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_CHAT].
            +     * [SOLUTION_TYPE_SEARCH][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_SEARCH].
                  * 
            * - * .google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig chat_engine_config = 11; + * + * .google.cloud.discoveryengine.v1beta.Engine.KnowledgeGraphConfig knowledge_graph_config = 23 [(.google.api.field_behavior) = OPTIONAL]; * */ - public Builder clearChatEngineConfig() { - if (chatEngineConfigBuilder_ == null) { - if (engineConfigCase_ == 11) { - engineConfigCase_ = 0; - engineConfig_ = null; - onChanged(); - } - } else { - if (engineConfigCase_ == 11) { - engineConfigCase_ = 0; - engineConfig_ = null; - } - chatEngineConfigBuilder_.clear(); + public Builder clearKnowledgeGraphConfig() { + bitField0_ = (bitField0_ & ~0x00001000); + knowledgeGraphConfig_ = null; + if (knowledgeGraphConfigBuilder_ != null) { + knowledgeGraphConfigBuilder_.dispose(); + knowledgeGraphConfigBuilder_ = null; } + onChanged(); return this; } @@ -6902,43 +21257,46 @@ public Builder clearChatEngineConfig() { * * *
            -     * Configurations for the Chat Engine. Only applicable if
            +     * Optional. Configurations for the Knowledge Graph. Only applicable if
                  * [solution_type][google.cloud.discoveryengine.v1beta.Engine.solution_type]
                  * is
            -     * [SOLUTION_TYPE_CHAT][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_CHAT].
            +     * [SOLUTION_TYPE_SEARCH][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_SEARCH].
                  * 
            * - * .google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig chat_engine_config = 11; + * + * .google.cloud.discoveryengine.v1beta.Engine.KnowledgeGraphConfig knowledge_graph_config = 23 [(.google.api.field_behavior) = OPTIONAL]; * */ - public com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig.Builder - getChatEngineConfigBuilder() { - return internalGetChatEngineConfigFieldBuilder().getBuilder(); + public com.google.cloud.discoveryengine.v1beta.Engine.KnowledgeGraphConfig.Builder + getKnowledgeGraphConfigBuilder() { + bitField0_ |= 0x00001000; + onChanged(); + return internalGetKnowledgeGraphConfigFieldBuilder().getBuilder(); } /** * * *
            -     * Configurations for the Chat Engine. Only applicable if
            +     * Optional. Configurations for the Knowledge Graph. Only applicable if
                  * [solution_type][google.cloud.discoveryengine.v1beta.Engine.solution_type]
                  * is
            -     * [SOLUTION_TYPE_CHAT][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_CHAT].
            +     * [SOLUTION_TYPE_SEARCH][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_SEARCH].
                  * 
            * - * .google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig chat_engine_config = 11; + * + * .google.cloud.discoveryengine.v1beta.Engine.KnowledgeGraphConfig knowledge_graph_config = 23 [(.google.api.field_behavior) = OPTIONAL]; * */ - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfigOrBuilder - getChatEngineConfigOrBuilder() { - if ((engineConfigCase_ == 11) && (chatEngineConfigBuilder_ != null)) { - return chatEngineConfigBuilder_.getMessageOrBuilder(); + public com.google.cloud.discoveryengine.v1beta.Engine.KnowledgeGraphConfigOrBuilder + getKnowledgeGraphConfigOrBuilder() { + if (knowledgeGraphConfigBuilder_ != null) { + return knowledgeGraphConfigBuilder_.getMessageOrBuilder(); } else { - if (engineConfigCase_ == 11) { - return (com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig) engineConfig_; - } - return com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig.getDefaultInstance(); + return knowledgeGraphConfig_ == null + ? com.google.cloud.discoveryengine.v1beta.Engine.KnowledgeGraphConfig + .getDefaultInstance() + : knowledgeGraphConfig_; } } @@ -6946,407 +21304,731 @@ public Builder clearChatEngineConfig() { * * *
            -     * Configurations for the Chat Engine. Only applicable if
            +     * Optional. Configurations for the Knowledge Graph. Only applicable if
                  * [solution_type][google.cloud.discoveryengine.v1beta.Engine.solution_type]
                  * is
            -     * [SOLUTION_TYPE_CHAT][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_CHAT].
            +     * [SOLUTION_TYPE_SEARCH][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_SEARCH].
                  * 
            * - * .google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig chat_engine_config = 11; + * + * .google.cloud.discoveryengine.v1beta.Engine.KnowledgeGraphConfig knowledge_graph_config = 23 [(.google.api.field_behavior) = OPTIONAL]; * */ private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig, - com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig.Builder, - com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfigOrBuilder> - internalGetChatEngineConfigFieldBuilder() { - if (chatEngineConfigBuilder_ == null) { - if (!(engineConfigCase_ == 11)) { - engineConfig_ = - com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig.getDefaultInstance(); - } - chatEngineConfigBuilder_ = + com.google.cloud.discoveryengine.v1beta.Engine.KnowledgeGraphConfig, + com.google.cloud.discoveryengine.v1beta.Engine.KnowledgeGraphConfig.Builder, + com.google.cloud.discoveryengine.v1beta.Engine.KnowledgeGraphConfigOrBuilder> + internalGetKnowledgeGraphConfigFieldBuilder() { + if (knowledgeGraphConfigBuilder_ == null) { + knowledgeGraphConfigBuilder_ = new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig, - com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig.Builder, - com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfigOrBuilder>( - (com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfig) engineConfig_, - getParentForChildren(), - isClean()); - engineConfig_ = null; + com.google.cloud.discoveryengine.v1beta.Engine.KnowledgeGraphConfig, + com.google.cloud.discoveryengine.v1beta.Engine.KnowledgeGraphConfig.Builder, + com.google.cloud.discoveryengine.v1beta.Engine.KnowledgeGraphConfigOrBuilder>( + getKnowledgeGraphConfig(), getParentForChildren(), isClean()); + knowledgeGraphConfig_ = null; } - engineConfigCase_ = 11; - onChanged(); - return chatEngineConfigBuilder_; + return knowledgeGraphConfigBuilder_; } - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.discoveryengine.v1beta.Engine.SearchEngineConfig, - com.google.cloud.discoveryengine.v1beta.Engine.SearchEngineConfig.Builder, - com.google.cloud.discoveryengine.v1beta.Engine.SearchEngineConfigOrBuilder> - searchEngineConfigBuilder_; + private int appType_ = 0; + + /** + * + * + *
            +     * Optional. Immutable. This the application type which this engine resource
            +     * represents. NOTE: this is a new concept independ of existing industry
            +     * vertical or solution type.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Engine.AppType app_type = 24 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The enum numeric value on the wire for appType. + */ + @java.lang.Override + public int getAppTypeValue() { + return appType_; + } + + /** + * + * + *
            +     * Optional. Immutable. This the application type which this engine resource
            +     * represents. NOTE: this is a new concept independ of existing industry
            +     * vertical or solution type.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Engine.AppType app_type = 24 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @param value The enum numeric value on the wire for appType to set. + * @return This builder for chaining. + */ + public Builder setAppTypeValue(int value) { + appType_ = value; + bitField0_ |= 0x00002000; + onChanged(); + return this; + } /** * * *
            -     * Configurations for the Search Engine. Only applicable if
            -     * [solution_type][google.cloud.discoveryengine.v1beta.Engine.solution_type]
            -     * is
            -     * [SOLUTION_TYPE_SEARCH][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_SEARCH].
            +     * Optional. Immutable. This the application type which this engine resource
            +     * represents. NOTE: this is a new concept independ of existing industry
            +     * vertical or solution type.
                  * 
            * * - * .google.cloud.discoveryengine.v1beta.Engine.SearchEngineConfig search_engine_config = 13; + * .google.cloud.discoveryengine.v1beta.Engine.AppType app_type = 24 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; * * - * @return Whether the searchEngineConfig field is set. + * @return The appType. */ @java.lang.Override - public boolean hasSearchEngineConfig() { - return engineConfigCase_ == 13; + public com.google.cloud.discoveryengine.v1beta.Engine.AppType getAppType() { + com.google.cloud.discoveryengine.v1beta.Engine.AppType result = + com.google.cloud.discoveryengine.v1beta.Engine.AppType.forNumber(appType_); + return result == null + ? com.google.cloud.discoveryengine.v1beta.Engine.AppType.UNRECOGNIZED + : result; } /** * * *
            -     * Configurations for the Search Engine. Only applicable if
            -     * [solution_type][google.cloud.discoveryengine.v1beta.Engine.solution_type]
            -     * is
            -     * [SOLUTION_TYPE_SEARCH][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_SEARCH].
            +     * Optional. Immutable. This the application type which this engine resource
            +     * represents. NOTE: this is a new concept independ of existing industry
            +     * vertical or solution type.
                  * 
            * * - * .google.cloud.discoveryengine.v1beta.Engine.SearchEngineConfig search_engine_config = 13; + * .google.cloud.discoveryengine.v1beta.Engine.AppType app_type = 24 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; * * - * @return The searchEngineConfig. + * @param value The appType to set. + * @return This builder for chaining. */ - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.Engine.SearchEngineConfig - getSearchEngineConfig() { - if (searchEngineConfigBuilder_ == null) { - if (engineConfigCase_ == 13) { - return (com.google.cloud.discoveryengine.v1beta.Engine.SearchEngineConfig) engineConfig_; - } - return com.google.cloud.discoveryengine.v1beta.Engine.SearchEngineConfig - .getDefaultInstance(); - } else { - if (engineConfigCase_ == 13) { - return searchEngineConfigBuilder_.getMessage(); - } - return com.google.cloud.discoveryengine.v1beta.Engine.SearchEngineConfig - .getDefaultInstance(); + public Builder setAppType(com.google.cloud.discoveryengine.v1beta.Engine.AppType value) { + if (value == null) { + throw new NullPointerException(); } + bitField0_ |= 0x00002000; + appType_ = value.getNumber(); + onChanged(); + return this; } /** * * *
            -     * Configurations for the Search Engine. Only applicable if
            -     * [solution_type][google.cloud.discoveryengine.v1beta.Engine.solution_type]
            -     * is
            -     * [SOLUTION_TYPE_SEARCH][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_SEARCH].
            +     * Optional. Immutable. This the application type which this engine resource
            +     * represents. NOTE: this is a new concept independ of existing industry
            +     * vertical or solution type.
                  * 
            * * - * .google.cloud.discoveryengine.v1beta.Engine.SearchEngineConfig search_engine_config = 13; + * .google.cloud.discoveryengine.v1beta.Engine.AppType app_type = 24 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; * + * + * @return This builder for chaining. */ - public Builder setSearchEngineConfig( - com.google.cloud.discoveryengine.v1beta.Engine.SearchEngineConfig value) { - if (searchEngineConfigBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - engineConfig_ = value; - onChanged(); - } else { - searchEngineConfigBuilder_.setMessage(value); - } - engineConfigCase_ = 13; + public Builder clearAppType() { + bitField0_ = (bitField0_ & ~0x00002000); + appType_ = 0; + onChanged(); return this; } + private boolean disableAnalytics_; + /** * * *
            -     * Configurations for the Search Engine. Only applicable if
            -     * [solution_type][google.cloud.discoveryengine.v1beta.Engine.solution_type]
            -     * is
            -     * [SOLUTION_TYPE_SEARCH][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_SEARCH].
            +     * Optional. Whether to disable analytics for searches performed on this
            +     * engine.
            +     * 
            + * + * bool disable_analytics = 26 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The disableAnalytics. + */ + @java.lang.Override + public boolean getDisableAnalytics() { + return disableAnalytics_; + } + + /** + * + * + *
            +     * Optional. Whether to disable analytics for searches performed on this
            +     * engine.
            +     * 
            + * + * bool disable_analytics = 26 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The disableAnalytics to set. + * @return This builder for chaining. + */ + public Builder setDisableAnalytics(boolean value) { + + disableAnalytics_ = value; + bitField0_ |= 0x00004000; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Optional. Whether to disable analytics for searches performed on this
            +     * engine.
            +     * 
            + * + * bool disable_analytics = 26 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearDisableAnalytics() { + bitField0_ = (bitField0_ & ~0x00004000); + disableAnalytics_ = false; + onChanged(); + return this; + } + + private com.google.protobuf.MapField features_; + + private com.google.protobuf.MapField + internalGetFeatures() { + if (features_ == null) { + return com.google.protobuf.MapField.emptyMapField(FeaturesDefaultEntryHolder.defaultEntry); + } + return features_; + } + + private com.google.protobuf.MapField + internalGetMutableFeatures() { + if (features_ == null) { + features_ = + com.google.protobuf.MapField.newMapField(FeaturesDefaultEntryHolder.defaultEntry); + } + if (!features_.isMutable()) { + features_ = features_.copy(); + } + bitField0_ |= 0x00008000; + onChanged(); + return features_; + } + + public int getFeaturesCount() { + return internalGetFeatures().getMap().size(); + } + + /** + * + * + *
            +     * Optional. Feature config for the engine to opt in or opt out of features.
            +     * Supported keys:
            +     *
            +     * * `*`: all features, if it's present, all other feature state settings are
            +     * ignored.
            +     * * `agent-gallery`
            +     * * `no-code-agent-builder`
            +     * * `prompt-gallery`
            +     * * `model-selector`
            +     * * `notebook-lm`
            +     * * `people-search`
            +     * * `people-search-org-chart`
            +     * * `bi-directional-audio`
            +     * * `feedback`
            +     * * `session-sharing`
            +     * * `personalization-memory`
            +     * * `personalization-suggested-highlights`
            +     * * `mobile-app-access`
            +     * * `disable-agent-sharing`
            +     * * `disable-image-generation`
            +     * * `disable-video-generation`
            +     * * `disable-onedrive-upload`
            +     * * `disable-talk-to-content`
            +     * * `disable-google-drive-upload`
            +     * * `disable-welcome-emails`
            +     * * `disable-canvas`
            +     * * `disable-canvas-workspace`
            +     * * `disable-skills`
            +     * * `enable-end-user-sharing-with-groups`
            +     * * `single-agent-orchestration`
            +     * * `multi-agent-orchestration`
            +     * * `cross-product-intelligence`
                  * 
            * * - * .google.cloud.discoveryengine.v1beta.Engine.SearchEngineConfig search_engine_config = 13; + * map<string, .google.cloud.discoveryengine.v1beta.Engine.FeatureState> features = 30 [(.google.api.field_behavior) = OPTIONAL]; * */ - public Builder setSearchEngineConfig( - com.google.cloud.discoveryengine.v1beta.Engine.SearchEngineConfig.Builder builderForValue) { - if (searchEngineConfigBuilder_ == null) { - engineConfig_ = builderForValue.build(); - onChanged(); - } else { - searchEngineConfigBuilder_.setMessage(builderForValue.build()); + @java.lang.Override + public boolean containsFeatures(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); } - engineConfigCase_ = 13; - return this; + return internalGetFeatures().getMap().containsKey(key); + } + + /** Use {@link #getFeaturesMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map< + java.lang.String, com.google.cloud.discoveryengine.v1beta.Engine.FeatureState> + getFeatures() { + return getFeaturesMap(); } /** * * *
            -     * Configurations for the Search Engine. Only applicable if
            -     * [solution_type][google.cloud.discoveryengine.v1beta.Engine.solution_type]
            -     * is
            -     * [SOLUTION_TYPE_SEARCH][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_SEARCH].
            +     * Optional. Feature config for the engine to opt in or opt out of features.
            +     * Supported keys:
            +     *
            +     * * `*`: all features, if it's present, all other feature state settings are
            +     * ignored.
            +     * * `agent-gallery`
            +     * * `no-code-agent-builder`
            +     * * `prompt-gallery`
            +     * * `model-selector`
            +     * * `notebook-lm`
            +     * * `people-search`
            +     * * `people-search-org-chart`
            +     * * `bi-directional-audio`
            +     * * `feedback`
            +     * * `session-sharing`
            +     * * `personalization-memory`
            +     * * `personalization-suggested-highlights`
            +     * * `mobile-app-access`
            +     * * `disable-agent-sharing`
            +     * * `disable-image-generation`
            +     * * `disable-video-generation`
            +     * * `disable-onedrive-upload`
            +     * * `disable-talk-to-content`
            +     * * `disable-google-drive-upload`
            +     * * `disable-welcome-emails`
            +     * * `disable-canvas`
            +     * * `disable-canvas-workspace`
            +     * * `disable-skills`
            +     * * `enable-end-user-sharing-with-groups`
            +     * * `single-agent-orchestration`
            +     * * `multi-agent-orchestration`
            +     * * `cross-product-intelligence`
                  * 
            * * - * .google.cloud.discoveryengine.v1beta.Engine.SearchEngineConfig search_engine_config = 13; + * map<string, .google.cloud.discoveryengine.v1beta.Engine.FeatureState> features = 30 [(.google.api.field_behavior) = OPTIONAL]; * */ - public Builder mergeSearchEngineConfig( - com.google.cloud.discoveryengine.v1beta.Engine.SearchEngineConfig value) { - if (searchEngineConfigBuilder_ == null) { - if (engineConfigCase_ == 13 - && engineConfig_ - != com.google.cloud.discoveryengine.v1beta.Engine.SearchEngineConfig - .getDefaultInstance()) { - engineConfig_ = - com.google.cloud.discoveryengine.v1beta.Engine.SearchEngineConfig.newBuilder( - (com.google.cloud.discoveryengine.v1beta.Engine.SearchEngineConfig) - engineConfig_) - .mergeFrom(value) - .buildPartial(); - } else { - engineConfig_ = value; - } - onChanged(); - } else { - if (engineConfigCase_ == 13) { - searchEngineConfigBuilder_.mergeFrom(value); - } else { - searchEngineConfigBuilder_.setMessage(value); - } - } - engineConfigCase_ = 13; - return this; + @java.lang.Override + public java.util.Map< + java.lang.String, com.google.cloud.discoveryengine.v1beta.Engine.FeatureState> + getFeaturesMap() { + return internalGetAdaptedFeaturesMap(internalGetFeatures().getMap()); } /** * * *
            -     * Configurations for the Search Engine. Only applicable if
            -     * [solution_type][google.cloud.discoveryengine.v1beta.Engine.solution_type]
            -     * is
            -     * [SOLUTION_TYPE_SEARCH][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_SEARCH].
            +     * Optional. Feature config for the engine to opt in or opt out of features.
            +     * Supported keys:
            +     *
            +     * * `*`: all features, if it's present, all other feature state settings are
            +     * ignored.
            +     * * `agent-gallery`
            +     * * `no-code-agent-builder`
            +     * * `prompt-gallery`
            +     * * `model-selector`
            +     * * `notebook-lm`
            +     * * `people-search`
            +     * * `people-search-org-chart`
            +     * * `bi-directional-audio`
            +     * * `feedback`
            +     * * `session-sharing`
            +     * * `personalization-memory`
            +     * * `personalization-suggested-highlights`
            +     * * `mobile-app-access`
            +     * * `disable-agent-sharing`
            +     * * `disable-image-generation`
            +     * * `disable-video-generation`
            +     * * `disable-onedrive-upload`
            +     * * `disable-talk-to-content`
            +     * * `disable-google-drive-upload`
            +     * * `disable-welcome-emails`
            +     * * `disable-canvas`
            +     * * `disable-canvas-workspace`
            +     * * `disable-skills`
            +     * * `enable-end-user-sharing-with-groups`
            +     * * `single-agent-orchestration`
            +     * * `multi-agent-orchestration`
            +     * * `cross-product-intelligence`
                  * 
            * * - * .google.cloud.discoveryengine.v1beta.Engine.SearchEngineConfig search_engine_config = 13; + * map<string, .google.cloud.discoveryengine.v1beta.Engine.FeatureState> features = 30 [(.google.api.field_behavior) = OPTIONAL]; * */ - public Builder clearSearchEngineConfig() { - if (searchEngineConfigBuilder_ == null) { - if (engineConfigCase_ == 13) { - engineConfigCase_ = 0; - engineConfig_ = null; - onChanged(); - } - } else { - if (engineConfigCase_ == 13) { - engineConfigCase_ = 0; - engineConfig_ = null; - } - searchEngineConfigBuilder_.clear(); + @java.lang.Override + public /* nullable */ com.google.cloud.discoveryengine.v1beta.Engine.FeatureState + getFeaturesOrDefault( + java.lang.String key, + /* nullable */ + com.google.cloud.discoveryengine.v1beta.Engine.FeatureState defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); } - return this; + java.util.Map map = internalGetFeatures().getMap(); + return map.containsKey(key) ? featuresValueConverter.doForward(map.get(key)) : defaultValue; } /** * * *
            -     * Configurations for the Search Engine. Only applicable if
            -     * [solution_type][google.cloud.discoveryengine.v1beta.Engine.solution_type]
            -     * is
            -     * [SOLUTION_TYPE_SEARCH][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_SEARCH].
            +     * Optional. Feature config for the engine to opt in or opt out of features.
            +     * Supported keys:
            +     *
            +     * * `*`: all features, if it's present, all other feature state settings are
            +     * ignored.
            +     * * `agent-gallery`
            +     * * `no-code-agent-builder`
            +     * * `prompt-gallery`
            +     * * `model-selector`
            +     * * `notebook-lm`
            +     * * `people-search`
            +     * * `people-search-org-chart`
            +     * * `bi-directional-audio`
            +     * * `feedback`
            +     * * `session-sharing`
            +     * * `personalization-memory`
            +     * * `personalization-suggested-highlights`
            +     * * `mobile-app-access`
            +     * * `disable-agent-sharing`
            +     * * `disable-image-generation`
            +     * * `disable-video-generation`
            +     * * `disable-onedrive-upload`
            +     * * `disable-talk-to-content`
            +     * * `disable-google-drive-upload`
            +     * * `disable-welcome-emails`
            +     * * `disable-canvas`
            +     * * `disable-canvas-workspace`
            +     * * `disable-skills`
            +     * * `enable-end-user-sharing-with-groups`
            +     * * `single-agent-orchestration`
            +     * * `multi-agent-orchestration`
            +     * * `cross-product-intelligence`
                  * 
            * * - * .google.cloud.discoveryengine.v1beta.Engine.SearchEngineConfig search_engine_config = 13; + * map<string, .google.cloud.discoveryengine.v1beta.Engine.FeatureState> features = 30 [(.google.api.field_behavior) = OPTIONAL]; * */ - public com.google.cloud.discoveryengine.v1beta.Engine.SearchEngineConfig.Builder - getSearchEngineConfigBuilder() { - return internalGetSearchEngineConfigFieldBuilder().getBuilder(); + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Engine.FeatureState getFeaturesOrThrow( + java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetFeatures().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return featuresValueConverter.doForward(map.get(key)); + } + + /** Use {@link #getFeaturesValueMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getFeaturesValue() { + return getFeaturesValueMap(); } /** * * *
            -     * Configurations for the Search Engine. Only applicable if
            -     * [solution_type][google.cloud.discoveryengine.v1beta.Engine.solution_type]
            -     * is
            -     * [SOLUTION_TYPE_SEARCH][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_SEARCH].
            +     * Optional. Feature config for the engine to opt in or opt out of features.
            +     * Supported keys:
            +     *
            +     * * `*`: all features, if it's present, all other feature state settings are
            +     * ignored.
            +     * * `agent-gallery`
            +     * * `no-code-agent-builder`
            +     * * `prompt-gallery`
            +     * * `model-selector`
            +     * * `notebook-lm`
            +     * * `people-search`
            +     * * `people-search-org-chart`
            +     * * `bi-directional-audio`
            +     * * `feedback`
            +     * * `session-sharing`
            +     * * `personalization-memory`
            +     * * `personalization-suggested-highlights`
            +     * * `mobile-app-access`
            +     * * `disable-agent-sharing`
            +     * * `disable-image-generation`
            +     * * `disable-video-generation`
            +     * * `disable-onedrive-upload`
            +     * * `disable-talk-to-content`
            +     * * `disable-google-drive-upload`
            +     * * `disable-welcome-emails`
            +     * * `disable-canvas`
            +     * * `disable-canvas-workspace`
            +     * * `disable-skills`
            +     * * `enable-end-user-sharing-with-groups`
            +     * * `single-agent-orchestration`
            +     * * `multi-agent-orchestration`
            +     * * `cross-product-intelligence`
                  * 
            * * - * .google.cloud.discoveryengine.v1beta.Engine.SearchEngineConfig search_engine_config = 13; + * map<string, .google.cloud.discoveryengine.v1beta.Engine.FeatureState> features = 30 [(.google.api.field_behavior) = OPTIONAL]; * */ @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.Engine.SearchEngineConfigOrBuilder - getSearchEngineConfigOrBuilder() { - if ((engineConfigCase_ == 13) && (searchEngineConfigBuilder_ != null)) { - return searchEngineConfigBuilder_.getMessageOrBuilder(); - } else { - if (engineConfigCase_ == 13) { - return (com.google.cloud.discoveryengine.v1beta.Engine.SearchEngineConfig) engineConfig_; - } - return com.google.cloud.discoveryengine.v1beta.Engine.SearchEngineConfig - .getDefaultInstance(); - } + public java.util.Map getFeaturesValueMap() { + return internalGetFeatures().getMap(); } /** * * *
            -     * Configurations for the Search Engine. Only applicable if
            -     * [solution_type][google.cloud.discoveryengine.v1beta.Engine.solution_type]
            -     * is
            -     * [SOLUTION_TYPE_SEARCH][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_SEARCH].
            +     * Optional. Feature config for the engine to opt in or opt out of features.
            +     * Supported keys:
            +     *
            +     * * `*`: all features, if it's present, all other feature state settings are
            +     * ignored.
            +     * * `agent-gallery`
            +     * * `no-code-agent-builder`
            +     * * `prompt-gallery`
            +     * * `model-selector`
            +     * * `notebook-lm`
            +     * * `people-search`
            +     * * `people-search-org-chart`
            +     * * `bi-directional-audio`
            +     * * `feedback`
            +     * * `session-sharing`
            +     * * `personalization-memory`
            +     * * `personalization-suggested-highlights`
            +     * * `mobile-app-access`
            +     * * `disable-agent-sharing`
            +     * * `disable-image-generation`
            +     * * `disable-video-generation`
            +     * * `disable-onedrive-upload`
            +     * * `disable-talk-to-content`
            +     * * `disable-google-drive-upload`
            +     * * `disable-welcome-emails`
            +     * * `disable-canvas`
            +     * * `disable-canvas-workspace`
            +     * * `disable-skills`
            +     * * `enable-end-user-sharing-with-groups`
            +     * * `single-agent-orchestration`
            +     * * `multi-agent-orchestration`
            +     * * `cross-product-intelligence`
                  * 
            * * - * .google.cloud.discoveryengine.v1beta.Engine.SearchEngineConfig search_engine_config = 13; + * map<string, .google.cloud.discoveryengine.v1beta.Engine.FeatureState> features = 30 [(.google.api.field_behavior) = OPTIONAL]; * */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.discoveryengine.v1beta.Engine.SearchEngineConfig, - com.google.cloud.discoveryengine.v1beta.Engine.SearchEngineConfig.Builder, - com.google.cloud.discoveryengine.v1beta.Engine.SearchEngineConfigOrBuilder> - internalGetSearchEngineConfigFieldBuilder() { - if (searchEngineConfigBuilder_ == null) { - if (!(engineConfigCase_ == 13)) { - engineConfig_ = - com.google.cloud.discoveryengine.v1beta.Engine.SearchEngineConfig - .getDefaultInstance(); - } - searchEngineConfigBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.discoveryengine.v1beta.Engine.SearchEngineConfig, - com.google.cloud.discoveryengine.v1beta.Engine.SearchEngineConfig.Builder, - com.google.cloud.discoveryengine.v1beta.Engine.SearchEngineConfigOrBuilder>( - (com.google.cloud.discoveryengine.v1beta.Engine.SearchEngineConfig) engineConfig_, - getParentForChildren(), - isClean()); - engineConfig_ = null; - } - engineConfigCase_ = 13; - onChanged(); - return searchEngineConfigBuilder_; + @java.lang.Override + public int getFeaturesValueOrDefault(java.lang.String key, int defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetFeatures().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; } - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineMetadata, - com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineMetadata.Builder, - com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineMetadataOrBuilder> - chatEngineMetadataBuilder_; - /** * * *
            -     * Output only. Additional information of the Chat Engine. Only applicable
            -     * if
            -     * [solution_type][google.cloud.discoveryengine.v1beta.Engine.solution_type]
            -     * is
            -     * [SOLUTION_TYPE_CHAT][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_CHAT].
            +     * Optional. Feature config for the engine to opt in or opt out of features.
            +     * Supported keys:
            +     *
            +     * * `*`: all features, if it's present, all other feature state settings are
            +     * ignored.
            +     * * `agent-gallery`
            +     * * `no-code-agent-builder`
            +     * * `prompt-gallery`
            +     * * `model-selector`
            +     * * `notebook-lm`
            +     * * `people-search`
            +     * * `people-search-org-chart`
            +     * * `bi-directional-audio`
            +     * * `feedback`
            +     * * `session-sharing`
            +     * * `personalization-memory`
            +     * * `personalization-suggested-highlights`
            +     * * `mobile-app-access`
            +     * * `disable-agent-sharing`
            +     * * `disable-image-generation`
            +     * * `disable-video-generation`
            +     * * `disable-onedrive-upload`
            +     * * `disable-talk-to-content`
            +     * * `disable-google-drive-upload`
            +     * * `disable-welcome-emails`
            +     * * `disable-canvas`
            +     * * `disable-canvas-workspace`
            +     * * `disable-skills`
            +     * * `enable-end-user-sharing-with-groups`
            +     * * `single-agent-orchestration`
            +     * * `multi-agent-orchestration`
            +     * * `cross-product-intelligence`
                  * 
            * * - * .google.cloud.discoveryengine.v1beta.Engine.ChatEngineMetadata chat_engine_metadata = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * map<string, .google.cloud.discoveryengine.v1beta.Engine.FeatureState> features = 30 [(.google.api.field_behavior) = OPTIONAL]; * - * - * @return Whether the chatEngineMetadata field is set. */ @java.lang.Override - public boolean hasChatEngineMetadata() { - return engineMetadataCase_ == 12; + public int getFeaturesValueOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetFeatures().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearFeatures() { + bitField0_ = (bitField0_ & ~0x00008000); + internalGetMutableFeatures().getMutableMap().clear(); + return this; } /** * * *
            -     * Output only. Additional information of the Chat Engine. Only applicable
            -     * if
            -     * [solution_type][google.cloud.discoveryengine.v1beta.Engine.solution_type]
            -     * is
            -     * [SOLUTION_TYPE_CHAT][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_CHAT].
            +     * Optional. Feature config for the engine to opt in or opt out of features.
            +     * Supported keys:
            +     *
            +     * * `*`: all features, if it's present, all other feature state settings are
            +     * ignored.
            +     * * `agent-gallery`
            +     * * `no-code-agent-builder`
            +     * * `prompt-gallery`
            +     * * `model-selector`
            +     * * `notebook-lm`
            +     * * `people-search`
            +     * * `people-search-org-chart`
            +     * * `bi-directional-audio`
            +     * * `feedback`
            +     * * `session-sharing`
            +     * * `personalization-memory`
            +     * * `personalization-suggested-highlights`
            +     * * `mobile-app-access`
            +     * * `disable-agent-sharing`
            +     * * `disable-image-generation`
            +     * * `disable-video-generation`
            +     * * `disable-onedrive-upload`
            +     * * `disable-talk-to-content`
            +     * * `disable-google-drive-upload`
            +     * * `disable-welcome-emails`
            +     * * `disable-canvas`
            +     * * `disable-canvas-workspace`
            +     * * `disable-skills`
            +     * * `enable-end-user-sharing-with-groups`
            +     * * `single-agent-orchestration`
            +     * * `multi-agent-orchestration`
            +     * * `cross-product-intelligence`
                  * 
            * * - * .google.cloud.discoveryengine.v1beta.Engine.ChatEngineMetadata chat_engine_metadata = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * map<string, .google.cloud.discoveryengine.v1beta.Engine.FeatureState> features = 30 [(.google.api.field_behavior) = OPTIONAL]; * - * - * @return The chatEngineMetadata. */ - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineMetadata - getChatEngineMetadata() { - if (chatEngineMetadataBuilder_ == null) { - if (engineMetadataCase_ == 12) { - return (com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineMetadata) - engineMetadata_; - } - return com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineMetadata - .getDefaultInstance(); - } else { - if (engineMetadataCase_ == 12) { - return chatEngineMetadataBuilder_.getMessage(); - } - return com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineMetadata - .getDefaultInstance(); + public Builder removeFeatures(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); } + internalGetMutableFeatures().getMutableMap().remove(key); + return this; + } + + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map< + java.lang.String, com.google.cloud.discoveryengine.v1beta.Engine.FeatureState> + getMutableFeatures() { + bitField0_ |= 0x00008000; + return internalGetAdaptedFeaturesMap(internalGetMutableFeatures().getMutableMap()); } /** * * *
            -     * Output only. Additional information of the Chat Engine. Only applicable
            -     * if
            -     * [solution_type][google.cloud.discoveryengine.v1beta.Engine.solution_type]
            -     * is
            -     * [SOLUTION_TYPE_CHAT][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_CHAT].
            +     * Optional. Feature config for the engine to opt in or opt out of features.
            +     * Supported keys:
            +     *
            +     * * `*`: all features, if it's present, all other feature state settings are
            +     * ignored.
            +     * * `agent-gallery`
            +     * * `no-code-agent-builder`
            +     * * `prompt-gallery`
            +     * * `model-selector`
            +     * * `notebook-lm`
            +     * * `people-search`
            +     * * `people-search-org-chart`
            +     * * `bi-directional-audio`
            +     * * `feedback`
            +     * * `session-sharing`
            +     * * `personalization-memory`
            +     * * `personalization-suggested-highlights`
            +     * * `mobile-app-access`
            +     * * `disable-agent-sharing`
            +     * * `disable-image-generation`
            +     * * `disable-video-generation`
            +     * * `disable-onedrive-upload`
            +     * * `disable-talk-to-content`
            +     * * `disable-google-drive-upload`
            +     * * `disable-welcome-emails`
            +     * * `disable-canvas`
            +     * * `disable-canvas-workspace`
            +     * * `disable-skills`
            +     * * `enable-end-user-sharing-with-groups`
            +     * * `single-agent-orchestration`
            +     * * `multi-agent-orchestration`
            +     * * `cross-product-intelligence`
                  * 
            * * - * .google.cloud.discoveryengine.v1beta.Engine.ChatEngineMetadata chat_engine_metadata = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * map<string, .google.cloud.discoveryengine.v1beta.Engine.FeatureState> features = 30 [(.google.api.field_behavior) = OPTIONAL]; * */ - public Builder setChatEngineMetadata( - com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineMetadata value) { - if (chatEngineMetadataBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - engineMetadata_ = value; - onChanged(); - } else { - chatEngineMetadataBuilder_.setMessage(value); + public Builder putFeatures( + java.lang.String key, com.google.cloud.discoveryengine.v1beta.Engine.FeatureState value) { + if (key == null) { + throw new NullPointerException("map key"); } - engineMetadataCase_ = 12; + + internalGetMutableFeatures() + .getMutableMap() + .put(key, featuresValueConverter.doBackward(value)); + bitField0_ |= 0x00008000; return this; } @@ -7354,69 +22036,108 @@ public Builder setChatEngineMetadata( * * *
            -     * Output only. Additional information of the Chat Engine. Only applicable
            -     * if
            -     * [solution_type][google.cloud.discoveryengine.v1beta.Engine.solution_type]
            -     * is
            -     * [SOLUTION_TYPE_CHAT][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_CHAT].
            +     * Optional. Feature config for the engine to opt in or opt out of features.
            +     * Supported keys:
            +     *
            +     * * `*`: all features, if it's present, all other feature state settings are
            +     * ignored.
            +     * * `agent-gallery`
            +     * * `no-code-agent-builder`
            +     * * `prompt-gallery`
            +     * * `model-selector`
            +     * * `notebook-lm`
            +     * * `people-search`
            +     * * `people-search-org-chart`
            +     * * `bi-directional-audio`
            +     * * `feedback`
            +     * * `session-sharing`
            +     * * `personalization-memory`
            +     * * `personalization-suggested-highlights`
            +     * * `mobile-app-access`
            +     * * `disable-agent-sharing`
            +     * * `disable-image-generation`
            +     * * `disable-video-generation`
            +     * * `disable-onedrive-upload`
            +     * * `disable-talk-to-content`
            +     * * `disable-google-drive-upload`
            +     * * `disable-welcome-emails`
            +     * * `disable-canvas`
            +     * * `disable-canvas-workspace`
            +     * * `disable-skills`
            +     * * `enable-end-user-sharing-with-groups`
            +     * * `single-agent-orchestration`
            +     * * `multi-agent-orchestration`
            +     * * `cross-product-intelligence`
                  * 
            * * - * .google.cloud.discoveryengine.v1beta.Engine.ChatEngineMetadata chat_engine_metadata = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * map<string, .google.cloud.discoveryengine.v1beta.Engine.FeatureState> features = 30 [(.google.api.field_behavior) = OPTIONAL]; * */ - public Builder setChatEngineMetadata( - com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineMetadata.Builder builderForValue) { - if (chatEngineMetadataBuilder_ == null) { - engineMetadata_ = builderForValue.build(); - onChanged(); - } else { - chatEngineMetadataBuilder_.setMessage(builderForValue.build()); - } - engineMetadataCase_ = 12; + public Builder putAllFeatures( + java.util.Map + values) { + internalGetAdaptedFeaturesMap(internalGetMutableFeatures().getMutableMap()).putAll(values); + bitField0_ |= 0x00008000; return this; } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableFeaturesValue() { + bitField0_ |= 0x00008000; + return internalGetMutableFeatures().getMutableMap(); + } + /** * * *
            -     * Output only. Additional information of the Chat Engine. Only applicable
            -     * if
            -     * [solution_type][google.cloud.discoveryengine.v1beta.Engine.solution_type]
            -     * is
            -     * [SOLUTION_TYPE_CHAT][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_CHAT].
            +     * Optional. Feature config for the engine to opt in or opt out of features.
            +     * Supported keys:
            +     *
            +     * * `*`: all features, if it's present, all other feature state settings are
            +     * ignored.
            +     * * `agent-gallery`
            +     * * `no-code-agent-builder`
            +     * * `prompt-gallery`
            +     * * `model-selector`
            +     * * `notebook-lm`
            +     * * `people-search`
            +     * * `people-search-org-chart`
            +     * * `bi-directional-audio`
            +     * * `feedback`
            +     * * `session-sharing`
            +     * * `personalization-memory`
            +     * * `personalization-suggested-highlights`
            +     * * `mobile-app-access`
            +     * * `disable-agent-sharing`
            +     * * `disable-image-generation`
            +     * * `disable-video-generation`
            +     * * `disable-onedrive-upload`
            +     * * `disable-talk-to-content`
            +     * * `disable-google-drive-upload`
            +     * * `disable-welcome-emails`
            +     * * `disable-canvas`
            +     * * `disable-canvas-workspace`
            +     * * `disable-skills`
            +     * * `enable-end-user-sharing-with-groups`
            +     * * `single-agent-orchestration`
            +     * * `multi-agent-orchestration`
            +     * * `cross-product-intelligence`
                  * 
            * * - * .google.cloud.discoveryengine.v1beta.Engine.ChatEngineMetadata chat_engine_metadata = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * map<string, .google.cloud.discoveryengine.v1beta.Engine.FeatureState> features = 30 [(.google.api.field_behavior) = OPTIONAL]; * */ - public Builder mergeChatEngineMetadata( - com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineMetadata value) { - if (chatEngineMetadataBuilder_ == null) { - if (engineMetadataCase_ == 12 - && engineMetadata_ - != com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineMetadata - .getDefaultInstance()) { - engineMetadata_ = - com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineMetadata.newBuilder( - (com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineMetadata) - engineMetadata_) - .mergeFrom(value) - .buildPartial(); - } else { - engineMetadata_ = value; - } - onChanged(); - } else { - if (engineMetadataCase_ == 12) { - chatEngineMetadataBuilder_.mergeFrom(value); - } else { - chatEngineMetadataBuilder_.setMessage(value); - } + public Builder putFeaturesValue(java.lang.String key, int value) { + if (key == null) { + throw new NullPointerException("map key"); } - engineMetadataCase_ = 12; + + internalGetMutableFeatures().getMutableMap().put(key, value); + bitField0_ |= 0x00008000; return this; } @@ -7424,81 +22145,94 @@ public Builder mergeChatEngineMetadata( * * *
            -     * Output only. Additional information of the Chat Engine. Only applicable
            -     * if
            -     * [solution_type][google.cloud.discoveryengine.v1beta.Engine.solution_type]
            -     * is
            -     * [SOLUTION_TYPE_CHAT][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_CHAT].
            +     * Optional. Feature config for the engine to opt in or opt out of features.
            +     * Supported keys:
            +     *
            +     * * `*`: all features, if it's present, all other feature state settings are
            +     * ignored.
            +     * * `agent-gallery`
            +     * * `no-code-agent-builder`
            +     * * `prompt-gallery`
            +     * * `model-selector`
            +     * * `notebook-lm`
            +     * * `people-search`
            +     * * `people-search-org-chart`
            +     * * `bi-directional-audio`
            +     * * `feedback`
            +     * * `session-sharing`
            +     * * `personalization-memory`
            +     * * `personalization-suggested-highlights`
            +     * * `mobile-app-access`
            +     * * `disable-agent-sharing`
            +     * * `disable-image-generation`
            +     * * `disable-video-generation`
            +     * * `disable-onedrive-upload`
            +     * * `disable-talk-to-content`
            +     * * `disable-google-drive-upload`
            +     * * `disable-welcome-emails`
            +     * * `disable-canvas`
            +     * * `disable-canvas-workspace`
            +     * * `disable-skills`
            +     * * `enable-end-user-sharing-with-groups`
            +     * * `single-agent-orchestration`
            +     * * `multi-agent-orchestration`
            +     * * `cross-product-intelligence`
                  * 
            * * - * .google.cloud.discoveryengine.v1beta.Engine.ChatEngineMetadata chat_engine_metadata = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * map<string, .google.cloud.discoveryengine.v1beta.Engine.FeatureState> features = 30 [(.google.api.field_behavior) = OPTIONAL]; * */ - public Builder clearChatEngineMetadata() { - if (chatEngineMetadataBuilder_ == null) { - if (engineMetadataCase_ == 12) { - engineMetadataCase_ = 0; - engineMetadata_ = null; - onChanged(); - } - } else { - if (engineMetadataCase_ == 12) { - engineMetadataCase_ = 0; - engineMetadata_ = null; - } - chatEngineMetadataBuilder_.clear(); - } + public Builder putAllFeaturesValue(java.util.Map values) { + internalGetMutableFeatures().getMutableMap().putAll(values); + bitField0_ |= 0x00008000; return this; } + private com.google.cloud.discoveryengine.v1beta.CmekConfig cmekConfig_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.CmekConfig, + com.google.cloud.discoveryengine.v1beta.CmekConfig.Builder, + com.google.cloud.discoveryengine.v1beta.CmekConfigOrBuilder> + cmekConfigBuilder_; + /** * * *
            -     * Output only. Additional information of the Chat Engine. Only applicable
            -     * if
            -     * [solution_type][google.cloud.discoveryengine.v1beta.Engine.solution_type]
            -     * is
            -     * [SOLUTION_TYPE_CHAT][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_CHAT].
            +     * Output only. CMEK-related information for the Engine.
                  * 
            * * - * .google.cloud.discoveryengine.v1beta.Engine.ChatEngineMetadata chat_engine_metadata = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * .google.cloud.discoveryengine.v1beta.CmekConfig cmek_config = 32 [(.google.api.field_behavior) = OUTPUT_ONLY]; * + * + * @return Whether the cmekConfig field is set. */ - public com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineMetadata.Builder - getChatEngineMetadataBuilder() { - return internalGetChatEngineMetadataFieldBuilder().getBuilder(); + public boolean hasCmekConfig() { + return ((bitField0_ & 0x00010000) != 0); } /** * * *
            -     * Output only. Additional information of the Chat Engine. Only applicable
            -     * if
            -     * [solution_type][google.cloud.discoveryengine.v1beta.Engine.solution_type]
            -     * is
            -     * [SOLUTION_TYPE_CHAT][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_CHAT].
            +     * Output only. CMEK-related information for the Engine.
                  * 
            * * - * .google.cloud.discoveryengine.v1beta.Engine.ChatEngineMetadata chat_engine_metadata = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * .google.cloud.discoveryengine.v1beta.CmekConfig cmek_config = 32 [(.google.api.field_behavior) = OUTPUT_ONLY]; * + * + * @return The cmekConfig. */ - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineMetadataOrBuilder - getChatEngineMetadataOrBuilder() { - if ((engineMetadataCase_ == 12) && (chatEngineMetadataBuilder_ != null)) { - return chatEngineMetadataBuilder_.getMessageOrBuilder(); + public com.google.cloud.discoveryengine.v1beta.CmekConfig getCmekConfig() { + if (cmekConfigBuilder_ == null) { + return cmekConfig_ == null + ? com.google.cloud.discoveryengine.v1beta.CmekConfig.getDefaultInstance() + : cmekConfig_; } else { - if (engineMetadataCase_ == 12) { - return (com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineMetadata) - engineMetadata_; - } - return com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineMetadata - .getDefaultInstance(); + return cmekConfigBuilder_.getMessage(); } } @@ -7506,263 +22240,255 @@ public Builder clearChatEngineMetadata() { * * *
            -     * Output only. Additional information of the Chat Engine. Only applicable
            -     * if
            -     * [solution_type][google.cloud.discoveryengine.v1beta.Engine.solution_type]
            -     * is
            -     * [SOLUTION_TYPE_CHAT][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_CHAT].
            +     * Output only. CMEK-related information for the Engine.
                  * 
            * * - * .google.cloud.discoveryengine.v1beta.Engine.ChatEngineMetadata chat_engine_metadata = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * .google.cloud.discoveryengine.v1beta.CmekConfig cmek_config = 32 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineMetadata, - com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineMetadata.Builder, - com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineMetadataOrBuilder> - internalGetChatEngineMetadataFieldBuilder() { - if (chatEngineMetadataBuilder_ == null) { - if (!(engineMetadataCase_ == 12)) { - engineMetadata_ = - com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineMetadata - .getDefaultInstance(); + public Builder setCmekConfig(com.google.cloud.discoveryengine.v1beta.CmekConfig value) { + if (cmekConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); } - chatEngineMetadataBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineMetadata, - com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineMetadata.Builder, - com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineMetadataOrBuilder>( - (com.google.cloud.discoveryengine.v1beta.Engine.ChatEngineMetadata) engineMetadata_, - getParentForChildren(), - isClean()); - engineMetadata_ = null; + cmekConfig_ = value; + } else { + cmekConfigBuilder_.setMessage(value); } - engineMetadataCase_ = 12; + bitField0_ |= 0x00010000; onChanged(); - return chatEngineMetadataBuilder_; + return this; } - private java.lang.Object name_ = ""; - /** * * *
            -     * Immutable. The fully qualified resource name of the engine.
            -     *
            -     * This field must be a UTF-8 encoded string with a length limit of 1024
            -     * characters.
            -     *
            -     * Format:
            -     * `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}`
            -     * engine should be 1-63 characters, and valid characters are
            -     * /[a-z0-9][a-z0-9-_]*/. Otherwise, an INVALID_ARGUMENT error is returned.
            +     * Output only. CMEK-related information for the Engine.
                  * 
            * - * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The name. + * + * .google.cloud.discoveryengine.v1beta.CmekConfig cmek_config = 32 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; + public Builder setCmekConfig( + com.google.cloud.discoveryengine.v1beta.CmekConfig.Builder builderForValue) { + if (cmekConfigBuilder_ == null) { + cmekConfig_ = builderForValue.build(); } else { - return (java.lang.String) ref; + cmekConfigBuilder_.setMessage(builderForValue.build()); } + bitField0_ |= 0x00010000; + onChanged(); + return this; } /** * * *
            -     * Immutable. The fully qualified resource name of the engine.
            -     *
            -     * This field must be a UTF-8 encoded string with a length limit of 1024
            -     * characters.
            -     *
            -     * Format:
            -     * `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}`
            -     * engine should be 1-63 characters, and valid characters are
            -     * /[a-z0-9][a-z0-9-_]*/. Otherwise, an INVALID_ARGUMENT error is returned.
            +     * Output only. CMEK-related information for the Engine.
                  * 
            * - * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The bytes for name. + * + * .google.cloud.discoveryengine.v1beta.CmekConfig cmek_config = 32 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ - public com.google.protobuf.ByteString getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - name_ = b; - return b; + public Builder mergeCmekConfig(com.google.cloud.discoveryengine.v1beta.CmekConfig value) { + if (cmekConfigBuilder_ == null) { + if (((bitField0_ & 0x00010000) != 0) + && cmekConfig_ != null + && cmekConfig_ + != com.google.cloud.discoveryengine.v1beta.CmekConfig.getDefaultInstance()) { + getCmekConfigBuilder().mergeFrom(value); + } else { + cmekConfig_ = value; + } } else { - return (com.google.protobuf.ByteString) ref; + cmekConfigBuilder_.mergeFrom(value); + } + if (cmekConfig_ != null) { + bitField0_ |= 0x00010000; + onChanged(); + } + return this; + } + + /** + * + * + *
            +     * Output only. CMEK-related information for the Engine.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.CmekConfig cmek_config = 32 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCmekConfig() { + bitField0_ = (bitField0_ & ~0x00010000); + cmekConfig_ = null; + if (cmekConfigBuilder_ != null) { + cmekConfigBuilder_.dispose(); + cmekConfigBuilder_ = null; } + onChanged(); + return this; } /** * * *
            -     * Immutable. The fully qualified resource name of the engine.
            -     *
            -     * This field must be a UTF-8 encoded string with a length limit of 1024
            -     * characters.
            -     *
            -     * Format:
            -     * `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}`
            -     * engine should be 1-63 characters, and valid characters are
            -     * /[a-z0-9][a-z0-9-_]*/. Otherwise, an INVALID_ARGUMENT error is returned.
            +     * Output only. CMEK-related information for the Engine.
                  * 
            * - * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @param value The name to set. - * @return This builder for chaining. + * + * .google.cloud.discoveryengine.v1beta.CmekConfig cmek_config = 32 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ - public Builder setName(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - name_ = value; - bitField0_ |= 0x00000008; + public com.google.cloud.discoveryengine.v1beta.CmekConfig.Builder getCmekConfigBuilder() { + bitField0_ |= 0x00010000; onChanged(); - return this; + return internalGetCmekConfigFieldBuilder().getBuilder(); } /** * * *
            -     * Immutable. The fully qualified resource name of the engine.
            -     *
            -     * This field must be a UTF-8 encoded string with a length limit of 1024
            -     * characters.
            -     *
            -     * Format:
            -     * `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}`
            -     * engine should be 1-63 characters, and valid characters are
            -     * /[a-z0-9][a-z0-9-_]*/. Otherwise, an INVALID_ARGUMENT error is returned.
            +     * Output only. CMEK-related information for the Engine.
                  * 
            * - * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return This builder for chaining. + * + * .google.cloud.discoveryengine.v1beta.CmekConfig cmek_config = 32 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ - public Builder clearName() { - name_ = getDefaultInstance().getName(); - bitField0_ = (bitField0_ & ~0x00000008); - onChanged(); - return this; + public com.google.cloud.discoveryengine.v1beta.CmekConfigOrBuilder getCmekConfigOrBuilder() { + if (cmekConfigBuilder_ != null) { + return cmekConfigBuilder_.getMessageOrBuilder(); + } else { + return cmekConfig_ == null + ? com.google.cloud.discoveryengine.v1beta.CmekConfig.getDefaultInstance() + : cmekConfig_; + } } /** * * *
            -     * Immutable. The fully qualified resource name of the engine.
            +     * Output only. CMEK-related information for the Engine.
            +     * 
            * - * This field must be a UTF-8 encoded string with a length limit of 1024 - * characters. + * + * .google.cloud.discoveryengine.v1beta.CmekConfig cmek_config = 32 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.CmekConfig, + com.google.cloud.discoveryengine.v1beta.CmekConfig.Builder, + com.google.cloud.discoveryengine.v1beta.CmekConfigOrBuilder> + internalGetCmekConfigFieldBuilder() { + if (cmekConfigBuilder_ == null) { + cmekConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.CmekConfig, + com.google.cloud.discoveryengine.v1beta.CmekConfig.Builder, + com.google.cloud.discoveryengine.v1beta.CmekConfigOrBuilder>( + getCmekConfig(), getParentForChildren(), isClean()); + cmekConfig_ = null; + } + return cmekConfigBuilder_; + } + + private int configurableBillingApproach_ = 0; + + /** * - * Format: - * `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}` - * engine should be 1-63 characters, and valid characters are - * /[a-z0-9][a-z0-9-_]*/. Otherwise, an INVALID_ARGUMENT error is returned. + * + *
            +     * Optional. Configuration for configurable billing approach.
                  * 
            * - * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * .google.cloud.discoveryengine.v1beta.Engine.ConfigurableBillingApproach configurable_billing_approach = 36 [(.google.api.field_behavior) = OPTIONAL]; + * * - * @param value The bytes for name to set. - * @return This builder for chaining. + * @return The enum numeric value on the wire for configurableBillingApproach. */ - public Builder setNameBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - name_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; + @java.lang.Override + public int getConfigurableBillingApproachValue() { + return configurableBillingApproach_; } - private java.lang.Object displayName_ = ""; - /** * * *
            -     * Required. The display name of the engine. Should be human readable. UTF-8
            -     * encoded string with limit of 1024 characters.
            +     * Optional. Configuration for configurable billing approach.
                  * 
            * - * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * .google.cloud.discoveryengine.v1beta.Engine.ConfigurableBillingApproach configurable_billing_approach = 36 [(.google.api.field_behavior) = OPTIONAL]; + * * - * @return The displayName. + * @param value The enum numeric value on the wire for configurableBillingApproach to set. + * @return This builder for chaining. */ - public java.lang.String getDisplayName() { - java.lang.Object ref = displayName_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - displayName_ = s; - return s; - } else { - return (java.lang.String) ref; - } + public Builder setConfigurableBillingApproachValue(int value) { + configurableBillingApproach_ = value; + bitField0_ |= 0x00020000; + onChanged(); + return this; } /** * * *
            -     * Required. The display name of the engine. Should be human readable. UTF-8
            -     * encoded string with limit of 1024 characters.
            +     * Optional. Configuration for configurable billing approach.
                  * 
            * - * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * .google.cloud.discoveryengine.v1beta.Engine.ConfigurableBillingApproach configurable_billing_approach = 36 [(.google.api.field_behavior) = OPTIONAL]; + * * - * @return The bytes for displayName. + * @return The configurableBillingApproach. */ - public com.google.protobuf.ByteString getDisplayNameBytes() { - java.lang.Object ref = displayName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - displayName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Engine.ConfigurableBillingApproach + getConfigurableBillingApproach() { + com.google.cloud.discoveryengine.v1beta.Engine.ConfigurableBillingApproach result = + com.google.cloud.discoveryengine.v1beta.Engine.ConfigurableBillingApproach.forNumber( + configurableBillingApproach_); + return result == null + ? com.google.cloud.discoveryengine.v1beta.Engine.ConfigurableBillingApproach.UNRECOGNIZED + : result; } /** * * *
            -     * Required. The display name of the engine. Should be human readable. UTF-8
            -     * encoded string with limit of 1024 characters.
            +     * Optional. Configuration for configurable billing approach.
                  * 
            * - * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * .google.cloud.discoveryengine.v1beta.Engine.ConfigurableBillingApproach configurable_billing_approach = 36 [(.google.api.field_behavior) = OPTIONAL]; + * * - * @param value The displayName to set. + * @param value The configurableBillingApproach to set. * @return This builder for chaining. */ - public Builder setDisplayName(java.lang.String value) { + public Builder setConfigurableBillingApproach( + com.google.cloud.discoveryengine.v1beta.Engine.ConfigurableBillingApproach value) { if (value == null) { throw new NullPointerException(); } - displayName_ = value; - bitField0_ |= 0x00000010; + bitField0_ |= 0x00020000; + configurableBillingApproach_ = value.getNumber(); onChanged(); return this; } @@ -7771,188 +22497,331 @@ public Builder setDisplayName(java.lang.String value) { * * *
            -     * Required. The display name of the engine. Should be human readable. UTF-8
            -     * encoded string with limit of 1024 characters.
            +     * Optional. Configuration for configurable billing approach.
                  * 
            * - * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * .google.cloud.discoveryengine.v1beta.Engine.ConfigurableBillingApproach configurable_billing_approach = 36 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return This builder for chaining. */ - public Builder clearDisplayName() { - displayName_ = getDefaultInstance().getDisplayName(); - bitField0_ = (bitField0_ & ~0x00000010); + public Builder clearConfigurableBillingApproach() { + bitField0_ = (bitField0_ & ~0x00020000); + configurableBillingApproach_ = 0; onChanged(); return this; } + private com.google.protobuf.MapField modelConfigs_; + + private com.google.protobuf.MapField + internalGetModelConfigs() { + if (modelConfigs_ == null) { + return com.google.protobuf.MapField.emptyMapField( + ModelConfigsDefaultEntryHolder.defaultEntry); + } + return modelConfigs_; + } + + private com.google.protobuf.MapField + internalGetMutableModelConfigs() { + if (modelConfigs_ == null) { + modelConfigs_ = + com.google.protobuf.MapField.newMapField(ModelConfigsDefaultEntryHolder.defaultEntry); + } + if (!modelConfigs_.isMutable()) { + modelConfigs_ = modelConfigs_.copy(); + } + bitField0_ |= 0x00040000; + onChanged(); + return modelConfigs_; + } + + public int getModelConfigsCount() { + return internalGetModelConfigs().getMap().size(); + } + /** * * *
            -     * Required. The display name of the engine. Should be human readable. UTF-8
            -     * encoded string with limit of 1024 characters.
            +     * Optional. Maps a model name to its specific configuration for this engine.
            +     * This allows admin users to turn on/off individual models. This only stores
            +     * models whose states are overridden by the admin.
            +     *
            +     * When the state is unspecified, or model_configs is empty for this
            +     * model, the system will decide if this model should be available or not
            +     * based on the default configuration. For example, a preview model
            +     * should be disabled by default if the admin has not chosen to enable it.
                  * 
            * - * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The bytes for displayName to set. - * @return This builder for chaining. + * + * map<string, .google.cloud.discoveryengine.v1beta.Engine.ModelState> model_configs = 37 [(.google.api.field_behavior) = OPTIONAL]; + * */ - public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); + @java.lang.Override + public boolean containsModelConfigs(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); } - checkByteStringIsUtf8(value); - displayName_ = value; - bitField0_ |= 0x00000010; - onChanged(); - return this; + return internalGetModelConfigs().getMap().containsKey(key); } - private com.google.protobuf.Timestamp createTime_; - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - createTimeBuilder_; + /** Use {@link #getModelConfigsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map< + java.lang.String, com.google.cloud.discoveryengine.v1beta.Engine.ModelState> + getModelConfigs() { + return getModelConfigsMap(); + } /** * * *
            -     * Output only. Timestamp the Recommendation Engine was created at.
            +     * Optional. Maps a model name to its specific configuration for this engine.
            +     * This allows admin users to turn on/off individual models. This only stores
            +     * models whose states are overridden by the admin.
            +     *
            +     * When the state is unspecified, or model_configs is empty for this
            +     * model, the system will decide if this model should be available or not
            +     * based on the default configuration. For example, a preview model
            +     * should be disabled by default if the admin has not chosen to enable it.
                  * 
            * * - * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * map<string, .google.cloud.discoveryengine.v1beta.Engine.ModelState> model_configs = 37 [(.google.api.field_behavior) = OPTIONAL]; * - * - * @return Whether the createTime field is set. */ - public boolean hasCreateTime() { - return ((bitField0_ & 0x00000020) != 0); + @java.lang.Override + public java.util.Map< + java.lang.String, com.google.cloud.discoveryengine.v1beta.Engine.ModelState> + getModelConfigsMap() { + return internalGetAdaptedModelConfigsMap(internalGetModelConfigs().getMap()); } /** * * *
            -     * Output only. Timestamp the Recommendation Engine was created at.
            +     * Optional. Maps a model name to its specific configuration for this engine.
            +     * This allows admin users to turn on/off individual models. This only stores
            +     * models whose states are overridden by the admin.
            +     *
            +     * When the state is unspecified, or model_configs is empty for this
            +     * model, the system will decide if this model should be available or not
            +     * based on the default configuration. For example, a preview model
            +     * should be disabled by default if the admin has not chosen to enable it.
                  * 
            * * - * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * map<string, .google.cloud.discoveryengine.v1beta.Engine.ModelState> model_configs = 37 [(.google.api.field_behavior) = OPTIONAL]; * - * - * @return The createTime. */ - public com.google.protobuf.Timestamp getCreateTime() { - if (createTimeBuilder_ == null) { - return createTime_ == null - ? com.google.protobuf.Timestamp.getDefaultInstance() - : createTime_; - } else { - return createTimeBuilder_.getMessage(); + @java.lang.Override + public /* nullable */ com.google.cloud.discoveryengine.v1beta.Engine.ModelState + getModelConfigsOrDefault( + java.lang.String key, + /* nullable */ + com.google.cloud.discoveryengine.v1beta.Engine.ModelState defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); } + java.util.Map map = internalGetModelConfigs().getMap(); + return map.containsKey(key) + ? modelConfigsValueConverter.doForward(map.get(key)) + : defaultValue; } /** * * *
            -     * Output only. Timestamp the Recommendation Engine was created at.
            +     * Optional. Maps a model name to its specific configuration for this engine.
            +     * This allows admin users to turn on/off individual models. This only stores
            +     * models whose states are overridden by the admin.
            +     *
            +     * When the state is unspecified, or model_configs is empty for this
            +     * model, the system will decide if this model should be available or not
            +     * based on the default configuration. For example, a preview model
            +     * should be disabled by default if the admin has not chosen to enable it.
                  * 
            * * - * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * map<string, .google.cloud.discoveryengine.v1beta.Engine.ModelState> model_configs = 37 [(.google.api.field_behavior) = OPTIONAL]; * */ - public Builder setCreateTime(com.google.protobuf.Timestamp value) { - if (createTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - createTime_ = value; - } else { - createTimeBuilder_.setMessage(value); + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Engine.ModelState getModelConfigsOrThrow( + java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); } - bitField0_ |= 0x00000020; - onChanged(); - return this; + java.util.Map map = internalGetModelConfigs().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return modelConfigsValueConverter.doForward(map.get(key)); + } + + /** Use {@link #getModelConfigsValueMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getModelConfigsValue() { + return getModelConfigsValueMap(); } /** * * *
            -     * Output only. Timestamp the Recommendation Engine was created at.
            +     * Optional. Maps a model name to its specific configuration for this engine.
            +     * This allows admin users to turn on/off individual models. This only stores
            +     * models whose states are overridden by the admin.
            +     *
            +     * When the state is unspecified, or model_configs is empty for this
            +     * model, the system will decide if this model should be available or not
            +     * based on the default configuration. For example, a preview model
            +     * should be disabled by default if the admin has not chosen to enable it.
                  * 
            * * - * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * map<string, .google.cloud.discoveryengine.v1beta.Engine.ModelState> model_configs = 37 [(.google.api.field_behavior) = OPTIONAL]; * */ - public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { - if (createTimeBuilder_ == null) { - createTime_ = builderForValue.build(); - } else { - createTimeBuilder_.setMessage(builderForValue.build()); + @java.lang.Override + public java.util.Map getModelConfigsValueMap() { + return internalGetModelConfigs().getMap(); + } + + /** + * + * + *
            +     * Optional. Maps a model name to its specific configuration for this engine.
            +     * This allows admin users to turn on/off individual models. This only stores
            +     * models whose states are overridden by the admin.
            +     *
            +     * When the state is unspecified, or model_configs is empty for this
            +     * model, the system will decide if this model should be available or not
            +     * based on the default configuration. For example, a preview model
            +     * should be disabled by default if the admin has not chosen to enable it.
            +     * 
            + * + * + * map<string, .google.cloud.discoveryengine.v1beta.Engine.ModelState> model_configs = 37 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public int getModelConfigsValueOrDefault(java.lang.String key, int defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); } - bitField0_ |= 0x00000020; - onChanged(); - return this; + java.util.Map map = internalGetModelConfigs().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; } /** * * *
            -     * Output only. Timestamp the Recommendation Engine was created at.
            +     * Optional. Maps a model name to its specific configuration for this engine.
            +     * This allows admin users to turn on/off individual models. This only stores
            +     * models whose states are overridden by the admin.
            +     *
            +     * When the state is unspecified, or model_configs is empty for this
            +     * model, the system will decide if this model should be available or not
            +     * based on the default configuration. For example, a preview model
            +     * should be disabled by default if the admin has not chosen to enable it.
                  * 
            * * - * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * map<string, .google.cloud.discoveryengine.v1beta.Engine.ModelState> model_configs = 37 [(.google.api.field_behavior) = OPTIONAL]; * */ - public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { - if (createTimeBuilder_ == null) { - if (((bitField0_ & 0x00000020) != 0) - && createTime_ != null - && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { - getCreateTimeBuilder().mergeFrom(value); - } else { - createTime_ = value; - } - } else { - createTimeBuilder_.mergeFrom(value); + @java.lang.Override + public int getModelConfigsValueOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); } - if (createTime_ != null) { - bitField0_ |= 0x00000020; - onChanged(); + java.util.Map map = internalGetModelConfigs().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearModelConfigs() { + bitField0_ = (bitField0_ & ~0x00040000); + internalGetMutableModelConfigs().getMutableMap().clear(); + return this; + } + + /** + * + * + *
            +     * Optional. Maps a model name to its specific configuration for this engine.
            +     * This allows admin users to turn on/off individual models. This only stores
            +     * models whose states are overridden by the admin.
            +     *
            +     * When the state is unspecified, or model_configs is empty for this
            +     * model, the system will decide if this model should be available or not
            +     * based on the default configuration. For example, a preview model
            +     * should be disabled by default if the admin has not chosen to enable it.
            +     * 
            + * + * + * map<string, .google.cloud.discoveryengine.v1beta.Engine.ModelState> model_configs = 37 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder removeModelConfigs(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); } + internalGetMutableModelConfigs().getMutableMap().remove(key); return this; } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map< + java.lang.String, com.google.cloud.discoveryengine.v1beta.Engine.ModelState> + getMutableModelConfigs() { + bitField0_ |= 0x00040000; + return internalGetAdaptedModelConfigsMap(internalGetMutableModelConfigs().getMutableMap()); + } + /** * * *
            -     * Output only. Timestamp the Recommendation Engine was created at.
            +     * Optional. Maps a model name to its specific configuration for this engine.
            +     * This allows admin users to turn on/off individual models. This only stores
            +     * models whose states are overridden by the admin.
            +     *
            +     * When the state is unspecified, or model_configs is empty for this
            +     * model, the system will decide if this model should be available or not
            +     * based on the default configuration. For example, a preview model
            +     * should be disabled by default if the admin has not chosen to enable it.
                  * 
            * * - * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * map<string, .google.cloud.discoveryengine.v1beta.Engine.ModelState> model_configs = 37 [(.google.api.field_behavior) = OPTIONAL]; * */ - public Builder clearCreateTime() { - bitField0_ = (bitField0_ & ~0x00000020); - createTime_ = null; - if (createTimeBuilder_ != null) { - createTimeBuilder_.dispose(); - createTimeBuilder_ = null; + public Builder putModelConfigs( + java.lang.String key, com.google.cloud.discoveryengine.v1beta.Engine.ModelState value) { + if (key == null) { + throw new NullPointerException("map key"); } - onChanged(); + + internalGetMutableModelConfigs() + .getMutableMap() + .put(key, modelConfigsValueConverter.doBackward(value)); + bitField0_ |= 0x00040000; return this; } @@ -7960,112 +22829,133 @@ public Builder clearCreateTime() { * * *
            -     * Output only. Timestamp the Recommendation Engine was created at.
            +     * Optional. Maps a model name to its specific configuration for this engine.
            +     * This allows admin users to turn on/off individual models. This only stores
            +     * models whose states are overridden by the admin.
            +     *
            +     * When the state is unspecified, or model_configs is empty for this
            +     * model, the system will decide if this model should be available or not
            +     * based on the default configuration. For example, a preview model
            +     * should be disabled by default if the admin has not chosen to enable it.
                  * 
            * * - * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * map<string, .google.cloud.discoveryengine.v1beta.Engine.ModelState> model_configs = 37 [(.google.api.field_behavior) = OPTIONAL]; * */ - public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { - bitField0_ |= 0x00000020; - onChanged(); - return internalGetCreateTimeFieldBuilder().getBuilder(); + public Builder putAllModelConfigs( + java.util.Map + values) { + internalGetAdaptedModelConfigsMap(internalGetMutableModelConfigs().getMutableMap()) + .putAll(values); + bitField0_ |= 0x00040000; + return this; + } + + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableModelConfigsValue() { + bitField0_ |= 0x00040000; + return internalGetMutableModelConfigs().getMutableMap(); } /** * * *
            -     * Output only. Timestamp the Recommendation Engine was created at.
            +     * Optional. Maps a model name to its specific configuration for this engine.
            +     * This allows admin users to turn on/off individual models. This only stores
            +     * models whose states are overridden by the admin.
            +     *
            +     * When the state is unspecified, or model_configs is empty for this
            +     * model, the system will decide if this model should be available or not
            +     * based on the default configuration. For example, a preview model
            +     * should be disabled by default if the admin has not chosen to enable it.
                  * 
            * * - * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * map<string, .google.cloud.discoveryengine.v1beta.Engine.ModelState> model_configs = 37 [(.google.api.field_behavior) = OPTIONAL]; * */ - public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { - if (createTimeBuilder_ != null) { - return createTimeBuilder_.getMessageOrBuilder(); - } else { - return createTime_ == null - ? com.google.protobuf.Timestamp.getDefaultInstance() - : createTime_; + public Builder putModelConfigsValue(java.lang.String key, int value) { + if (key == null) { + throw new NullPointerException("map key"); } + + internalGetMutableModelConfigs().getMutableMap().put(key, value); + bitField0_ |= 0x00040000; + return this; } /** * * *
            -     * Output only. Timestamp the Recommendation Engine was created at.
            +     * Optional. Maps a model name to its specific configuration for this engine.
            +     * This allows admin users to turn on/off individual models. This only stores
            +     * models whose states are overridden by the admin.
            +     *
            +     * When the state is unspecified, or model_configs is empty for this
            +     * model, the system will decide if this model should be available or not
            +     * based on the default configuration. For example, a preview model
            +     * should be disabled by default if the admin has not chosen to enable it.
                  * 
            * * - * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * map<string, .google.cloud.discoveryengine.v1beta.Engine.ModelState> model_configs = 37 [(.google.api.field_behavior) = OPTIONAL]; * */ - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - internalGetCreateTimeFieldBuilder() { - if (createTimeBuilder_ == null) { - createTimeBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder>( - getCreateTime(), getParentForChildren(), isClean()); - createTime_ = null; - } - return createTimeBuilder_; + public Builder putAllModelConfigsValue( + java.util.Map values) { + internalGetMutableModelConfigs().getMutableMap().putAll(values); + bitField0_ |= 0x00040000; + return this; } - private com.google.protobuf.Timestamp updateTime_; + private com.google.cloud.discoveryengine.v1beta.ObservabilityConfig observabilityConfig_; private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - updateTimeBuilder_; + com.google.cloud.discoveryengine.v1beta.ObservabilityConfig, + com.google.cloud.discoveryengine.v1beta.ObservabilityConfig.Builder, + com.google.cloud.discoveryengine.v1beta.ObservabilityConfigOrBuilder> + observabilityConfigBuilder_; /** * * *
            -     * Output only. Timestamp the Recommendation Engine was last updated.
            +     * Optional. Observability config for the engine.
                  * 
            * * - * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * .google.cloud.discoveryengine.v1beta.ObservabilityConfig observability_config = 39 [(.google.api.field_behavior) = OPTIONAL]; * * - * @return Whether the updateTime field is set. + * @return Whether the observabilityConfig field is set. */ - public boolean hasUpdateTime() { - return ((bitField0_ & 0x00000040) != 0); + public boolean hasObservabilityConfig() { + return ((bitField0_ & 0x00080000) != 0); } /** * * *
            -     * Output only. Timestamp the Recommendation Engine was last updated.
            +     * Optional. Observability config for the engine.
                  * 
            * * - * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * .google.cloud.discoveryengine.v1beta.ObservabilityConfig observability_config = 39 [(.google.api.field_behavior) = OPTIONAL]; * * - * @return The updateTime. + * @return The observabilityConfig. */ - public com.google.protobuf.Timestamp getUpdateTime() { - if (updateTimeBuilder_ == null) { - return updateTime_ == null - ? com.google.protobuf.Timestamp.getDefaultInstance() - : updateTime_; + public com.google.cloud.discoveryengine.v1beta.ObservabilityConfig getObservabilityConfig() { + if (observabilityConfigBuilder_ == null) { + return observabilityConfig_ == null + ? com.google.cloud.discoveryengine.v1beta.ObservabilityConfig.getDefaultInstance() + : observabilityConfig_; } else { - return updateTimeBuilder_.getMessage(); + return observabilityConfigBuilder_.getMessage(); } } @@ -8073,23 +22963,24 @@ public com.google.protobuf.Timestamp getUpdateTime() { * * *
            -     * Output only. Timestamp the Recommendation Engine was last updated.
            +     * Optional. Observability config for the engine.
                  * 
            * * - * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * .google.cloud.discoveryengine.v1beta.ObservabilityConfig observability_config = 39 [(.google.api.field_behavior) = OPTIONAL]; * */ - public Builder setUpdateTime(com.google.protobuf.Timestamp value) { - if (updateTimeBuilder_ == null) { + public Builder setObservabilityConfig( + com.google.cloud.discoveryengine.v1beta.ObservabilityConfig value) { + if (observabilityConfigBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - updateTime_ = value; + observabilityConfig_ = value; } else { - updateTimeBuilder_.setMessage(value); + observabilityConfigBuilder_.setMessage(value); } - bitField0_ |= 0x00000040; + bitField0_ |= 0x00080000; onChanged(); return this; } @@ -8098,20 +22989,21 @@ public Builder setUpdateTime(com.google.protobuf.Timestamp value) { * * *
            -     * Output only. Timestamp the Recommendation Engine was last updated.
            +     * Optional. Observability config for the engine.
                  * 
            * * - * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * .google.cloud.discoveryengine.v1beta.ObservabilityConfig observability_config = 39 [(.google.api.field_behavior) = OPTIONAL]; * */ - public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { - if (updateTimeBuilder_ == null) { - updateTime_ = builderForValue.build(); + public Builder setObservabilityConfig( + com.google.cloud.discoveryengine.v1beta.ObservabilityConfig.Builder builderForValue) { + if (observabilityConfigBuilder_ == null) { + observabilityConfig_ = builderForValue.build(); } else { - updateTimeBuilder_.setMessage(builderForValue.build()); + observabilityConfigBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00000040; + bitField0_ |= 0x00080000; onChanged(); return this; } @@ -8120,27 +23012,30 @@ public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForVal * * *
            -     * Output only. Timestamp the Recommendation Engine was last updated.
            +     * Optional. Observability config for the engine.
                  * 
            * * - * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * .google.cloud.discoveryengine.v1beta.ObservabilityConfig observability_config = 39 [(.google.api.field_behavior) = OPTIONAL]; * */ - public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { - if (updateTimeBuilder_ == null) { - if (((bitField0_ & 0x00000040) != 0) - && updateTime_ != null - && updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { - getUpdateTimeBuilder().mergeFrom(value); + public Builder mergeObservabilityConfig( + com.google.cloud.discoveryengine.v1beta.ObservabilityConfig value) { + if (observabilityConfigBuilder_ == null) { + if (((bitField0_ & 0x00080000) != 0) + && observabilityConfig_ != null + && observabilityConfig_ + != com.google.cloud.discoveryengine.v1beta.ObservabilityConfig + .getDefaultInstance()) { + getObservabilityConfigBuilder().mergeFrom(value); } else { - updateTime_ = value; + observabilityConfig_ = value; } } else { - updateTimeBuilder_.mergeFrom(value); + observabilityConfigBuilder_.mergeFrom(value); } - if (updateTime_ != null) { - bitField0_ |= 0x00000040; + if (observabilityConfig_ != null) { + bitField0_ |= 0x00080000; onChanged(); } return this; @@ -8150,19 +23045,19 @@ public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { * * *
            -     * Output only. Timestamp the Recommendation Engine was last updated.
            +     * Optional. Observability config for the engine.
                  * 
            * * - * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * .google.cloud.discoveryengine.v1beta.ObservabilityConfig observability_config = 39 [(.google.api.field_behavior) = OPTIONAL]; * */ - public Builder clearUpdateTime() { - bitField0_ = (bitField0_ & ~0x00000040); - updateTime_ = null; - if (updateTimeBuilder_ != null) { - updateTimeBuilder_.dispose(); - updateTimeBuilder_ = null; + public Builder clearObservabilityConfig() { + bitField0_ = (bitField0_ & ~0x00080000); + observabilityConfig_ = null; + if (observabilityConfigBuilder_ != null) { + observabilityConfigBuilder_.dispose(); + observabilityConfigBuilder_ = null; } onChanged(); return this; @@ -8172,37 +23067,39 @@ public Builder clearUpdateTime() { * * *
            -     * Output only. Timestamp the Recommendation Engine was last updated.
            +     * Optional. Observability config for the engine.
                  * 
            * * - * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * .google.cloud.discoveryengine.v1beta.ObservabilityConfig observability_config = 39 [(.google.api.field_behavior) = OPTIONAL]; * */ - public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { - bitField0_ |= 0x00000040; + public com.google.cloud.discoveryengine.v1beta.ObservabilityConfig.Builder + getObservabilityConfigBuilder() { + bitField0_ |= 0x00080000; onChanged(); - return internalGetUpdateTimeFieldBuilder().getBuilder(); + return internalGetObservabilityConfigFieldBuilder().getBuilder(); } /** * * *
            -     * Output only. Timestamp the Recommendation Engine was last updated.
            +     * Optional. Observability config for the engine.
                  * 
            * * - * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * .google.cloud.discoveryengine.v1beta.ObservabilityConfig observability_config = 39 [(.google.api.field_behavior) = OPTIONAL]; * */ - public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { - if (updateTimeBuilder_ != null) { - return updateTimeBuilder_.getMessageOrBuilder(); + public com.google.cloud.discoveryengine.v1beta.ObservabilityConfigOrBuilder + getObservabilityConfigOrBuilder() { + if (observabilityConfigBuilder_ != null) { + return observabilityConfigBuilder_.getMessageOrBuilder(); } else { - return updateTime_ == null - ? com.google.protobuf.Timestamp.getDefaultInstance() - : updateTime_; + return observabilityConfig_ == null + ? com.google.cloud.discoveryengine.v1beta.ObservabilityConfig.getDefaultInstance() + : observabilityConfig_; } } @@ -8210,219 +23107,161 @@ public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { * * *
            -     * Output only. Timestamp the Recommendation Engine was last updated.
            +     * Optional. Observability config for the engine.
                  * 
            * * - * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * .google.cloud.discoveryengine.v1beta.ObservabilityConfig observability_config = 39 [(.google.api.field_behavior) = OPTIONAL]; * */ private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - internalGetUpdateTimeFieldBuilder() { - if (updateTimeBuilder_ == null) { - updateTimeBuilder_ = + com.google.cloud.discoveryengine.v1beta.ObservabilityConfig, + com.google.cloud.discoveryengine.v1beta.ObservabilityConfig.Builder, + com.google.cloud.discoveryengine.v1beta.ObservabilityConfigOrBuilder> + internalGetObservabilityConfigFieldBuilder() { + if (observabilityConfigBuilder_ == null) { + observabilityConfigBuilder_ = new com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder>( - getUpdateTime(), getParentForChildren(), isClean()); - updateTime_ = null; + com.google.cloud.discoveryengine.v1beta.ObservabilityConfig, + com.google.cloud.discoveryengine.v1beta.ObservabilityConfig.Builder, + com.google.cloud.discoveryengine.v1beta.ObservabilityConfigOrBuilder>( + getObservabilityConfig(), getParentForChildren(), isClean()); + observabilityConfig_ = null; } - return updateTimeBuilder_; + return observabilityConfigBuilder_; } - private com.google.protobuf.LazyStringArrayList dataStoreIds_ = - com.google.protobuf.LazyStringArrayList.emptyList(); + private com.google.protobuf.MapField connectorTenantInfo_; - private void ensureDataStoreIdsIsMutable() { - if (!dataStoreIds_.isModifiable()) { - dataStoreIds_ = new com.google.protobuf.LazyStringArrayList(dataStoreIds_); + private com.google.protobuf.MapField + internalGetConnectorTenantInfo() { + if (connectorTenantInfo_ == null) { + return com.google.protobuf.MapField.emptyMapField( + ConnectorTenantInfoDefaultEntryHolder.defaultEntry); } - bitField0_ |= 0x00000080; + return connectorTenantInfo_; } - /** - * - * - *
            -     * The data stores associated with this engine.
            -     *
            -     * For
            -     * [SOLUTION_TYPE_SEARCH][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_SEARCH]
            -     * and
            -     * [SOLUTION_TYPE_RECOMMENDATION][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_RECOMMENDATION]
            -     * type of engines, they can only associate with at most one data store.
            -     *
            -     * If
            -     * [solution_type][google.cloud.discoveryengine.v1beta.Engine.solution_type]
            -     * is
            -     * [SOLUTION_TYPE_CHAT][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_CHAT],
            -     * multiple [DataStore][google.cloud.discoveryengine.v1beta.DataStore]s in the
            -     * same [Collection][google.cloud.discoveryengine.v1beta.Collection] can be
            -     * associated here.
            -     *
            -     * Note that when used in
            -     * [CreateEngineRequest][google.cloud.discoveryengine.v1beta.CreateEngineRequest],
            -     * one DataStore id must be provided as the system will use it for necessary
            -     * initializations.
            -     * 
            - * - * repeated string data_store_ids = 5; - * - * @return A list containing the dataStoreIds. - */ - public com.google.protobuf.ProtocolStringList getDataStoreIdsList() { - dataStoreIds_.makeImmutable(); - return dataStoreIds_; + private com.google.protobuf.MapField + internalGetMutableConnectorTenantInfo() { + if (connectorTenantInfo_ == null) { + connectorTenantInfo_ = + com.google.protobuf.MapField.newMapField( + ConnectorTenantInfoDefaultEntryHolder.defaultEntry); + } + if (!connectorTenantInfo_.isMutable()) { + connectorTenantInfo_ = connectorTenantInfo_.copy(); + } + bitField0_ |= 0x00100000; + onChanged(); + return connectorTenantInfo_; } - /** - * - * - *
            -     * The data stores associated with this engine.
            -     *
            -     * For
            -     * [SOLUTION_TYPE_SEARCH][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_SEARCH]
            -     * and
            -     * [SOLUTION_TYPE_RECOMMENDATION][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_RECOMMENDATION]
            -     * type of engines, they can only associate with at most one data store.
            -     *
            -     * If
            -     * [solution_type][google.cloud.discoveryengine.v1beta.Engine.solution_type]
            -     * is
            -     * [SOLUTION_TYPE_CHAT][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_CHAT],
            -     * multiple [DataStore][google.cloud.discoveryengine.v1beta.DataStore]s in the
            -     * same [Collection][google.cloud.discoveryengine.v1beta.Collection] can be
            -     * associated here.
            -     *
            -     * Note that when used in
            -     * [CreateEngineRequest][google.cloud.discoveryengine.v1beta.CreateEngineRequest],
            -     * one DataStore id must be provided as the system will use it for necessary
            -     * initializations.
            -     * 
            - * - * repeated string data_store_ids = 5; - * - * @return The count of dataStoreIds. - */ - public int getDataStoreIdsCount() { - return dataStoreIds_.size(); + public int getConnectorTenantInfoCount() { + return internalGetConnectorTenantInfo().getMap().size(); } /** * * *
            -     * The data stores associated with this engine.
            -     *
            -     * For
            -     * [SOLUTION_TYPE_SEARCH][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_SEARCH]
            -     * and
            -     * [SOLUTION_TYPE_RECOMMENDATION][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_RECOMMENDATION]
            -     * type of engines, they can only associate with at most one data store.
            -     *
            -     * If
            -     * [solution_type][google.cloud.discoveryengine.v1beta.Engine.solution_type]
            -     * is
            -     * [SOLUTION_TYPE_CHAT][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_CHAT],
            -     * multiple [DataStore][google.cloud.discoveryengine.v1beta.DataStore]s in the
            -     * same [Collection][google.cloud.discoveryengine.v1beta.Collection] can be
            -     * associated here.
            -     *
            -     * Note that when used in
            -     * [CreateEngineRequest][google.cloud.discoveryengine.v1beta.CreateEngineRequest],
            -     * one DataStore id must be provided as the system will use it for necessary
            -     * initializations.
            +     * Optional. Maps a connector ID (e.g., "hybrid-github", "shopify") to
            +     * tenant-specific information required for that connector. The structure of
            +     * the tenant information string is connector-dependent.
                  * 
            * - * repeated string data_store_ids = 5; - * - * @param index The index of the element to return. - * @return The dataStoreIds at the given index. + * + * map<string, string> connector_tenant_info = 42 [(.google.api.field_behavior) = OPTIONAL]; + * */ - public java.lang.String getDataStoreIds(int index) { - return dataStoreIds_.get(index); + @java.lang.Override + public boolean containsConnectorTenantInfo(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetConnectorTenantInfo().getMap().containsKey(key); } - /** - * - * - *
            -     * The data stores associated with this engine.
            -     *
            -     * For
            -     * [SOLUTION_TYPE_SEARCH][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_SEARCH]
            -     * and
            -     * [SOLUTION_TYPE_RECOMMENDATION][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_RECOMMENDATION]
            -     * type of engines, they can only associate with at most one data store.
            -     *
            -     * If
            -     * [solution_type][google.cloud.discoveryengine.v1beta.Engine.solution_type]
            -     * is
            -     * [SOLUTION_TYPE_CHAT][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_CHAT],
            -     * multiple [DataStore][google.cloud.discoveryengine.v1beta.DataStore]s in the
            -     * same [Collection][google.cloud.discoveryengine.v1beta.Collection] can be
            -     * associated here.
            +    /** Use {@link #getConnectorTenantInfoMap()} instead. */
            +    @java.lang.Override
            +    @java.lang.Deprecated
            +    public java.util.Map getConnectorTenantInfo() {
            +      return getConnectorTenantInfoMap();
            +    }
            +
            +    /**
                  *
            -     * Note that when used in
            -     * [CreateEngineRequest][google.cloud.discoveryengine.v1beta.CreateEngineRequest],
            -     * one DataStore id must be provided as the system will use it for necessary
            -     * initializations.
            -     * 
            * - * repeated string data_store_ids = 5; + *
            +     * Optional. Maps a connector ID (e.g., "hybrid-github", "shopify") to
            +     * tenant-specific information required for that connector. The structure of
            +     * the tenant information string is connector-dependent.
            +     * 
            * - * @param index The index of the value to return. - * @return The bytes of the dataStoreIds at the given index. + * + * map<string, string> connector_tenant_info = 42 [(.google.api.field_behavior) = OPTIONAL]; + * */ - public com.google.protobuf.ByteString getDataStoreIdsBytes(int index) { - return dataStoreIds_.getByteString(index); + @java.lang.Override + public java.util.Map getConnectorTenantInfoMap() { + return internalGetConnectorTenantInfo().getMap(); } /** * * *
            -     * The data stores associated with this engine.
            +     * Optional. Maps a connector ID (e.g., "hybrid-github", "shopify") to
            +     * tenant-specific information required for that connector. The structure of
            +     * the tenant information string is connector-dependent.
            +     * 
            * - * For - * [SOLUTION_TYPE_SEARCH][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_SEARCH] - * and - * [SOLUTION_TYPE_RECOMMENDATION][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_RECOMMENDATION] - * type of engines, they can only associate with at most one data store. + * + * map<string, string> connector_tenant_info = 42 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public /* nullable */ java.lang.String getConnectorTenantInfoOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = + internalGetConnectorTenantInfo().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + + /** * - * If - * [solution_type][google.cloud.discoveryengine.v1beta.Engine.solution_type] - * is - * [SOLUTION_TYPE_CHAT][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_CHAT], - * multiple [DataStore][google.cloud.discoveryengine.v1beta.DataStore]s in the - * same [Collection][google.cloud.discoveryengine.v1beta.Collection] can be - * associated here. * - * Note that when used in - * [CreateEngineRequest][google.cloud.discoveryengine.v1beta.CreateEngineRequest], - * one DataStore id must be provided as the system will use it for necessary - * initializations. + *
            +     * Optional. Maps a connector ID (e.g., "hybrid-github", "shopify") to
            +     * tenant-specific information required for that connector. The structure of
            +     * the tenant information string is connector-dependent.
                  * 
            * - * repeated string data_store_ids = 5; - * - * @param index The index to set the value at. - * @param value The dataStoreIds to set. - * @return This builder for chaining. + * + * map<string, string> connector_tenant_info = 42 [(.google.api.field_behavior) = OPTIONAL]; + * */ - public Builder setDataStoreIds(int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); + @java.lang.Override + public java.lang.String getConnectorTenantInfoOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); } - ensureDataStoreIdsIsMutable(); - dataStoreIds_.set(index, value); - bitField0_ |= 0x00000080; - onChanged(); + java.util.Map map = + internalGetConnectorTenantInfo().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearConnectorTenantInfo() { + bitField0_ = (bitField0_ & ~0x00100000); + internalGetMutableConnectorTenantInfo().getMutableMap().clear(); return this; } @@ -8430,41 +23269,52 @@ public Builder setDataStoreIds(int index, java.lang.String value) { * * *
            -     * The data stores associated with this engine.
            +     * Optional. Maps a connector ID (e.g., "hybrid-github", "shopify") to
            +     * tenant-specific information required for that connector. The structure of
            +     * the tenant information string is connector-dependent.
            +     * 
            * - * For - * [SOLUTION_TYPE_SEARCH][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_SEARCH] - * and - * [SOLUTION_TYPE_RECOMMENDATION][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_RECOMMENDATION] - * type of engines, they can only associate with at most one data store. + * + * map<string, string> connector_tenant_info = 42 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder removeConnectorTenantInfo(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + internalGetMutableConnectorTenantInfo().getMutableMap().remove(key); + return this; + } + + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableConnectorTenantInfo() { + bitField0_ |= 0x00100000; + return internalGetMutableConnectorTenantInfo().getMutableMap(); + } + + /** * - * If - * [solution_type][google.cloud.discoveryengine.v1beta.Engine.solution_type] - * is - * [SOLUTION_TYPE_CHAT][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_CHAT], - * multiple [DataStore][google.cloud.discoveryengine.v1beta.DataStore]s in the - * same [Collection][google.cloud.discoveryengine.v1beta.Collection] can be - * associated here. * - * Note that when used in - * [CreateEngineRequest][google.cloud.discoveryengine.v1beta.CreateEngineRequest], - * one DataStore id must be provided as the system will use it for necessary - * initializations. + *
            +     * Optional. Maps a connector ID (e.g., "hybrid-github", "shopify") to
            +     * tenant-specific information required for that connector. The structure of
            +     * the tenant information string is connector-dependent.
                  * 
            * - * repeated string data_store_ids = 5; - * - * @param value The dataStoreIds to add. - * @return This builder for chaining. + * + * map<string, string> connector_tenant_info = 42 [(.google.api.field_behavior) = OPTIONAL]; + * */ - public Builder addDataStoreIds(java.lang.String value) { + public Builder putConnectorTenantInfo(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new NullPointerException("map key"); + } if (value == null) { - throw new NullPointerException(); + throw new NullPointerException("map value"); } - ensureDataStoreIdsIsMutable(); - dataStoreIds_.add(value); - bitField0_ |= 0x00000080; - onChanged(); + internalGetMutableConnectorTenantInfo().getMutableMap().put(key, value); + bitField0_ |= 0x00100000; return this; } @@ -8472,75 +23322,91 @@ public Builder addDataStoreIds(java.lang.String value) { * * *
            -     * The data stores associated with this engine.
            +     * Optional. Maps a connector ID (e.g., "hybrid-github", "shopify") to
            +     * tenant-specific information required for that connector. The structure of
            +     * the tenant information string is connector-dependent.
            +     * 
            * - * For - * [SOLUTION_TYPE_SEARCH][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_SEARCH] - * and - * [SOLUTION_TYPE_RECOMMENDATION][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_RECOMMENDATION] - * type of engines, they can only associate with at most one data store. + * + * map<string, string> connector_tenant_info = 42 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder putAllConnectorTenantInfo( + java.util.Map values) { + internalGetMutableConnectorTenantInfo().getMutableMap().putAll(values); + bitField0_ |= 0x00100000; + return this; + } + + private com.google.cloud.discoveryengine.v1beta.AgentGatewaySetting agentGatewaySetting_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.AgentGatewaySetting, + com.google.cloud.discoveryengine.v1beta.AgentGatewaySetting.Builder, + com.google.cloud.discoveryengine.v1beta.AgentGatewaySettingOrBuilder> + agentGatewaySettingBuilder_; + + /** * - * If - * [solution_type][google.cloud.discoveryengine.v1beta.Engine.solution_type] - * is - * [SOLUTION_TYPE_CHAT][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_CHAT], - * multiple [DataStore][google.cloud.discoveryengine.v1beta.DataStore]s in the - * same [Collection][google.cloud.discoveryengine.v1beta.Collection] can be - * associated here. * - * Note that when used in - * [CreateEngineRequest][google.cloud.discoveryengine.v1beta.CreateEngineRequest], - * one DataStore id must be provided as the system will use it for necessary - * initializations. + *
            +     * Optional. The agent gateway setting for the engine.
                  * 
            * - * repeated string data_store_ids = 5; + * + * .google.cloud.discoveryengine.v1beta.AgentGatewaySetting agent_gateway_setting = 43 [(.google.api.field_behavior) = OPTIONAL]; + * * - * @param values The dataStoreIds to add. - * @return This builder for chaining. + * @return Whether the agentGatewaySetting field is set. */ - public Builder addAllDataStoreIds(java.lang.Iterable values) { - ensureDataStoreIdsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, dataStoreIds_); - bitField0_ |= 0x00000080; - onChanged(); - return this; + public boolean hasAgentGatewaySetting() { + return ((bitField0_ & 0x00200000) != 0); } /** * * *
            -     * The data stores associated with this engine.
            +     * Optional. The agent gateway setting for the engine.
            +     * 
            * - * For - * [SOLUTION_TYPE_SEARCH][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_SEARCH] - * and - * [SOLUTION_TYPE_RECOMMENDATION][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_RECOMMENDATION] - * type of engines, they can only associate with at most one data store. + * + * .google.cloud.discoveryengine.v1beta.AgentGatewaySetting agent_gateway_setting = 43 [(.google.api.field_behavior) = OPTIONAL]; + * * - * If - * [solution_type][google.cloud.discoveryengine.v1beta.Engine.solution_type] - * is - * [SOLUTION_TYPE_CHAT][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_CHAT], - * multiple [DataStore][google.cloud.discoveryengine.v1beta.DataStore]s in the - * same [Collection][google.cloud.discoveryengine.v1beta.Collection] can be - * associated here. + * @return The agentGatewaySetting. + */ + public com.google.cloud.discoveryengine.v1beta.AgentGatewaySetting getAgentGatewaySetting() { + if (agentGatewaySettingBuilder_ == null) { + return agentGatewaySetting_ == null + ? com.google.cloud.discoveryengine.v1beta.AgentGatewaySetting.getDefaultInstance() + : agentGatewaySetting_; + } else { + return agentGatewaySettingBuilder_.getMessage(); + } + } + + /** * - * Note that when used in - * [CreateEngineRequest][google.cloud.discoveryengine.v1beta.CreateEngineRequest], - * one DataStore id must be provided as the system will use it for necessary - * initializations. - * * - * repeated string data_store_ids = 5; + *
            +     * Optional. The agent gateway setting for the engine.
            +     * 
            * - * @return This builder for chaining. + * + * .google.cloud.discoveryengine.v1beta.AgentGatewaySetting agent_gateway_setting = 43 [(.google.api.field_behavior) = OPTIONAL]; + * */ - public Builder clearDataStoreIds() { - dataStoreIds_ = com.google.protobuf.LazyStringArrayList.emptyList(); - bitField0_ = (bitField0_ & ~0x00000080); - ; + public Builder setAgentGatewaySetting( + com.google.cloud.discoveryengine.v1beta.AgentGatewaySetting value) { + if (agentGatewaySettingBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + agentGatewaySetting_ = value; + } else { + agentGatewaySettingBuilder_.setMessage(value); + } + bitField0_ |= 0x00200000; onChanged(); return this; } @@ -8549,82 +23415,76 @@ public Builder clearDataStoreIds() { * * *
            -     * The data stores associated with this engine.
            -     *
            -     * For
            -     * [SOLUTION_TYPE_SEARCH][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_SEARCH]
            -     * and
            -     * [SOLUTION_TYPE_RECOMMENDATION][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_RECOMMENDATION]
            -     * type of engines, they can only associate with at most one data store.
            -     *
            -     * If
            -     * [solution_type][google.cloud.discoveryengine.v1beta.Engine.solution_type]
            -     * is
            -     * [SOLUTION_TYPE_CHAT][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_CHAT],
            -     * multiple [DataStore][google.cloud.discoveryengine.v1beta.DataStore]s in the
            -     * same [Collection][google.cloud.discoveryengine.v1beta.Collection] can be
            -     * associated here.
            -     *
            -     * Note that when used in
            -     * [CreateEngineRequest][google.cloud.discoveryengine.v1beta.CreateEngineRequest],
            -     * one DataStore id must be provided as the system will use it for necessary
            -     * initializations.
            +     * Optional. The agent gateway setting for the engine.
                  * 
            * - * repeated string data_store_ids = 5; - * - * @param value The bytes of the dataStoreIds to add. - * @return This builder for chaining. + * + * .google.cloud.discoveryengine.v1beta.AgentGatewaySetting agent_gateway_setting = 43 [(.google.api.field_behavior) = OPTIONAL]; + * */ - public Builder addDataStoreIdsBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); + public Builder setAgentGatewaySetting( + com.google.cloud.discoveryengine.v1beta.AgentGatewaySetting.Builder builderForValue) { + if (agentGatewaySettingBuilder_ == null) { + agentGatewaySetting_ = builderForValue.build(); + } else { + agentGatewaySettingBuilder_.setMessage(builderForValue.build()); } - checkByteStringIsUtf8(value); - ensureDataStoreIdsIsMutable(); - dataStoreIds_.add(value); - bitField0_ |= 0x00000080; + bitField0_ |= 0x00200000; onChanged(); return this; } - private int solutionType_ = 0; - /** * * *
            -     * Required. The solutions of the engine.
            +     * Optional. The agent gateway setting for the engine.
                  * 
            * * - * .google.cloud.discoveryengine.v1beta.SolutionType solution_type = 6 [(.google.api.field_behavior) = REQUIRED]; + * .google.cloud.discoveryengine.v1beta.AgentGatewaySetting agent_gateway_setting = 43 [(.google.api.field_behavior) = OPTIONAL]; * - * - * @return The enum numeric value on the wire for solutionType. */ - @java.lang.Override - public int getSolutionTypeValue() { - return solutionType_; + public Builder mergeAgentGatewaySetting( + com.google.cloud.discoveryengine.v1beta.AgentGatewaySetting value) { + if (agentGatewaySettingBuilder_ == null) { + if (((bitField0_ & 0x00200000) != 0) + && agentGatewaySetting_ != null + && agentGatewaySetting_ + != com.google.cloud.discoveryengine.v1beta.AgentGatewaySetting + .getDefaultInstance()) { + getAgentGatewaySettingBuilder().mergeFrom(value); + } else { + agentGatewaySetting_ = value; + } + } else { + agentGatewaySettingBuilder_.mergeFrom(value); + } + if (agentGatewaySetting_ != null) { + bitField0_ |= 0x00200000; + onChanged(); + } + return this; } /** * * *
            -     * Required. The solutions of the engine.
            +     * Optional. The agent gateway setting for the engine.
                  * 
            * * - * .google.cloud.discoveryengine.v1beta.SolutionType solution_type = 6 [(.google.api.field_behavior) = REQUIRED]; + * .google.cloud.discoveryengine.v1beta.AgentGatewaySetting agent_gateway_setting = 43 [(.google.api.field_behavior) = OPTIONAL]; * - * - * @param value The enum numeric value on the wire for solutionType to set. - * @return This builder for chaining. */ - public Builder setSolutionTypeValue(int value) { - solutionType_ = value; - bitField0_ |= 0x00000100; + public Builder clearAgentGatewaySetting() { + bitField0_ = (bitField0_ & ~0x00200000); + agentGatewaySetting_ = null; + if (agentGatewaySettingBuilder_ != null) { + agentGatewaySettingBuilder_.dispose(); + agentGatewaySettingBuilder_ = null; + } onChanged(); return this; } @@ -8633,109 +23493,107 @@ public Builder setSolutionTypeValue(int value) { * * *
            -     * Required. The solutions of the engine.
            +     * Optional. The agent gateway setting for the engine.
                  * 
            * * - * .google.cloud.discoveryengine.v1beta.SolutionType solution_type = 6 [(.google.api.field_behavior) = REQUIRED]; + * .google.cloud.discoveryengine.v1beta.AgentGatewaySetting agent_gateway_setting = 43 [(.google.api.field_behavior) = OPTIONAL]; * - * - * @return The solutionType. */ - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.SolutionType getSolutionType() { - com.google.cloud.discoveryengine.v1beta.SolutionType result = - com.google.cloud.discoveryengine.v1beta.SolutionType.forNumber(solutionType_); - return result == null - ? com.google.cloud.discoveryengine.v1beta.SolutionType.UNRECOGNIZED - : result; + public com.google.cloud.discoveryengine.v1beta.AgentGatewaySetting.Builder + getAgentGatewaySettingBuilder() { + bitField0_ |= 0x00200000; + onChanged(); + return internalGetAgentGatewaySettingFieldBuilder().getBuilder(); } /** * * *
            -     * Required. The solutions of the engine.
            +     * Optional. The agent gateway setting for the engine.
                  * 
            * * - * .google.cloud.discoveryengine.v1beta.SolutionType solution_type = 6 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @param value The solutionType to set. - * @return This builder for chaining. - */ - public Builder setSolutionType(com.google.cloud.discoveryengine.v1beta.SolutionType value) { - if (value == null) { - throw new NullPointerException(); + * .google.cloud.discoveryengine.v1beta.AgentGatewaySetting agent_gateway_setting = 43 [(.google.api.field_behavior) = OPTIONAL]; + *
            + */ + public com.google.cloud.discoveryengine.v1beta.AgentGatewaySettingOrBuilder + getAgentGatewaySettingOrBuilder() { + if (agentGatewaySettingBuilder_ != null) { + return agentGatewaySettingBuilder_.getMessageOrBuilder(); + } else { + return agentGatewaySetting_ == null + ? com.google.cloud.discoveryengine.v1beta.AgentGatewaySetting.getDefaultInstance() + : agentGatewaySetting_; } - bitField0_ |= 0x00000100; - solutionType_ = value.getNumber(); - onChanged(); - return this; } /** * * *
            -     * Required. The solutions of the engine.
            +     * Optional. The agent gateway setting for the engine.
                  * 
            * * - * .google.cloud.discoveryengine.v1beta.SolutionType solution_type = 6 [(.google.api.field_behavior) = REQUIRED]; + * .google.cloud.discoveryengine.v1beta.AgentGatewaySetting agent_gateway_setting = 43 [(.google.api.field_behavior) = OPTIONAL]; * - * - * @return This builder for chaining. */ - public Builder clearSolutionType() { - bitField0_ = (bitField0_ & ~0x00000100); - solutionType_ = 0; - onChanged(); - return this; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.AgentGatewaySetting, + com.google.cloud.discoveryengine.v1beta.AgentGatewaySetting.Builder, + com.google.cloud.discoveryengine.v1beta.AgentGatewaySettingOrBuilder> + internalGetAgentGatewaySettingFieldBuilder() { + if (agentGatewaySettingBuilder_ == null) { + agentGatewaySettingBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.AgentGatewaySetting, + com.google.cloud.discoveryengine.v1beta.AgentGatewaySetting.Builder, + com.google.cloud.discoveryengine.v1beta.AgentGatewaySettingOrBuilder>( + getAgentGatewaySetting(), getParentForChildren(), isClean()); + agentGatewaySetting_ = null; + } + return agentGatewaySettingBuilder_; } - private int industryVertical_ = 0; + private int marketplaceAgentVisibility_ = 0; /** * * *
            -     * The industry vertical that the engine registers.
            -     * The restriction of the Engine industry vertical is based on
            -     * [DataStore][google.cloud.discoveryengine.v1beta.DataStore]: If unspecified,
            -     * default to `GENERIC`. Vertical on Engine has to match vertical of the
            -     * DataStore linked to the engine.
            +     * Optional. The visibility of marketplace agents in the agent gallery.
                  * 
            * - * .google.cloud.discoveryengine.v1beta.IndustryVertical industry_vertical = 16; + * + * .google.cloud.discoveryengine.v1beta.Engine.MarketplaceAgentVisibility marketplace_agent_visibility = 44 [(.google.api.field_behavior) = OPTIONAL]; + * * - * @return The enum numeric value on the wire for industryVertical. + * @return The enum numeric value on the wire for marketplaceAgentVisibility. */ @java.lang.Override - public int getIndustryVerticalValue() { - return industryVertical_; + public int getMarketplaceAgentVisibilityValue() { + return marketplaceAgentVisibility_; } /** * * *
            -     * The industry vertical that the engine registers.
            -     * The restriction of the Engine industry vertical is based on
            -     * [DataStore][google.cloud.discoveryengine.v1beta.DataStore]: If unspecified,
            -     * default to `GENERIC`. Vertical on Engine has to match vertical of the
            -     * DataStore linked to the engine.
            +     * Optional. The visibility of marketplace agents in the agent gallery.
                  * 
            * - * .google.cloud.discoveryengine.v1beta.IndustryVertical industry_vertical = 16; + * + * .google.cloud.discoveryengine.v1beta.Engine.MarketplaceAgentVisibility marketplace_agent_visibility = 44 [(.google.api.field_behavior) = OPTIONAL]; + * * - * @param value The enum numeric value on the wire for industryVertical to set. + * @param value The enum numeric value on the wire for marketplaceAgentVisibility to set. * @return This builder for chaining. */ - public Builder setIndustryVerticalValue(int value) { - industryVertical_ = value; - bitField0_ |= 0x00000200; + public Builder setMarketplaceAgentVisibilityValue(int value) { + marketplaceAgentVisibility_ = value; + bitField0_ |= 0x00400000; onChanged(); return this; } @@ -8744,23 +23602,23 @@ public Builder setIndustryVerticalValue(int value) { * * *
            -     * The industry vertical that the engine registers.
            -     * The restriction of the Engine industry vertical is based on
            -     * [DataStore][google.cloud.discoveryengine.v1beta.DataStore]: If unspecified,
            -     * default to `GENERIC`. Vertical on Engine has to match vertical of the
            -     * DataStore linked to the engine.
            +     * Optional. The visibility of marketplace agents in the agent gallery.
                  * 
            * - * .google.cloud.discoveryengine.v1beta.IndustryVertical industry_vertical = 16; + * + * .google.cloud.discoveryengine.v1beta.Engine.MarketplaceAgentVisibility marketplace_agent_visibility = 44 [(.google.api.field_behavior) = OPTIONAL]; + * * - * @return The industryVertical. + * @return The marketplaceAgentVisibility. */ @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.IndustryVertical getIndustryVertical() { - com.google.cloud.discoveryengine.v1beta.IndustryVertical result = - com.google.cloud.discoveryengine.v1beta.IndustryVertical.forNumber(industryVertical_); + public com.google.cloud.discoveryengine.v1beta.Engine.MarketplaceAgentVisibility + getMarketplaceAgentVisibility() { + com.google.cloud.discoveryengine.v1beta.Engine.MarketplaceAgentVisibility result = + com.google.cloud.discoveryengine.v1beta.Engine.MarketplaceAgentVisibility.forNumber( + marketplaceAgentVisibility_); return result == null - ? com.google.cloud.discoveryengine.v1beta.IndustryVertical.UNRECOGNIZED + ? com.google.cloud.discoveryengine.v1beta.Engine.MarketplaceAgentVisibility.UNRECOGNIZED : result; } @@ -8768,25 +23626,23 @@ public com.google.cloud.discoveryengine.v1beta.IndustryVertical getIndustryVerti * * *
            -     * The industry vertical that the engine registers.
            -     * The restriction of the Engine industry vertical is based on
            -     * [DataStore][google.cloud.discoveryengine.v1beta.DataStore]: If unspecified,
            -     * default to `GENERIC`. Vertical on Engine has to match vertical of the
            -     * DataStore linked to the engine.
            +     * Optional. The visibility of marketplace agents in the agent gallery.
                  * 
            * - * .google.cloud.discoveryengine.v1beta.IndustryVertical industry_vertical = 16; + * + * .google.cloud.discoveryengine.v1beta.Engine.MarketplaceAgentVisibility marketplace_agent_visibility = 44 [(.google.api.field_behavior) = OPTIONAL]; + * * - * @param value The industryVertical to set. + * @param value The marketplaceAgentVisibility to set. * @return This builder for chaining. */ - public Builder setIndustryVertical( - com.google.cloud.discoveryengine.v1beta.IndustryVertical value) { + public Builder setMarketplaceAgentVisibility( + com.google.cloud.discoveryengine.v1beta.Engine.MarketplaceAgentVisibility value) { if (value == null) { throw new NullPointerException(); } - bitField0_ |= 0x00000200; - industryVertical_ = value.getNumber(); + bitField0_ |= 0x00400000; + marketplaceAgentVisibility_ = value.getNumber(); onChanged(); return this; } @@ -8795,159 +23651,126 @@ public Builder setIndustryVertical( * * *
            -     * The industry vertical that the engine registers.
            -     * The restriction of the Engine industry vertical is based on
            -     * [DataStore][google.cloud.discoveryengine.v1beta.DataStore]: If unspecified,
            -     * default to `GENERIC`. Vertical on Engine has to match vertical of the
            -     * DataStore linked to the engine.
            +     * Optional. The visibility of marketplace agents in the agent gallery.
                  * 
            * - * .google.cloud.discoveryengine.v1beta.IndustryVertical industry_vertical = 16; + * + * .google.cloud.discoveryengine.v1beta.Engine.MarketplaceAgentVisibility marketplace_agent_visibility = 44 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return This builder for chaining. */ - public Builder clearIndustryVertical() { - bitField0_ = (bitField0_ & ~0x00000200); - industryVertical_ = 0; + public Builder clearMarketplaceAgentVisibility() { + bitField0_ = (bitField0_ & ~0x00400000); + marketplaceAgentVisibility_ = 0; onChanged(); return this; } - private com.google.cloud.discoveryengine.v1beta.Engine.CommonConfig commonConfig_; - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.discoveryengine.v1beta.Engine.CommonConfig, - com.google.cloud.discoveryengine.v1beta.Engine.CommonConfig.Builder, - com.google.cloud.discoveryengine.v1beta.Engine.CommonConfigOrBuilder> - commonConfigBuilder_; + private com.google.protobuf.LazyStringArrayList procurementContactEmails_ = + com.google.protobuf.LazyStringArrayList.emptyList(); - /** - * - * - *
            -     * Common config spec that specifies the metadata of the engine.
            -     * 
            - * - * .google.cloud.discoveryengine.v1beta.Engine.CommonConfig common_config = 15; - * - * @return Whether the commonConfig field is set. - */ - public boolean hasCommonConfig() { - return ((bitField0_ & 0x00000400) != 0); + private void ensureProcurementContactEmailsIsMutable() { + if (!procurementContactEmails_.isModifiable()) { + procurementContactEmails_ = + new com.google.protobuf.LazyStringArrayList(procurementContactEmails_); + } + bitField0_ |= 0x00800000; } /** * * *
            -     * Common config spec that specifies the metadata of the engine.
            +     * Optional. The emails of the procurement contacts.
                  * 
            * - * .google.cloud.discoveryengine.v1beta.Engine.CommonConfig common_config = 15; + * + * repeated string procurement_contact_emails = 45 [(.google.api.field_behavior) = OPTIONAL]; + * * - * @return The commonConfig. + * @return A list containing the procurementContactEmails. */ - public com.google.cloud.discoveryengine.v1beta.Engine.CommonConfig getCommonConfig() { - if (commonConfigBuilder_ == null) { - return commonConfig_ == null - ? com.google.cloud.discoveryengine.v1beta.Engine.CommonConfig.getDefaultInstance() - : commonConfig_; - } else { - return commonConfigBuilder_.getMessage(); - } + public com.google.protobuf.ProtocolStringList getProcurementContactEmailsList() { + procurementContactEmails_.makeImmutable(); + return procurementContactEmails_; } /** * * *
            -     * Common config spec that specifies the metadata of the engine.
            +     * Optional. The emails of the procurement contacts.
                  * 
            * - * .google.cloud.discoveryengine.v1beta.Engine.CommonConfig common_config = 15; + * + * repeated string procurement_contact_emails = 45 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The count of procurementContactEmails. */ - public Builder setCommonConfig( - com.google.cloud.discoveryengine.v1beta.Engine.CommonConfig value) { - if (commonConfigBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - commonConfig_ = value; - } else { - commonConfigBuilder_.setMessage(value); - } - bitField0_ |= 0x00000400; - onChanged(); - return this; + public int getProcurementContactEmailsCount() { + return procurementContactEmails_.size(); } /** * * *
            -     * Common config spec that specifies the metadata of the engine.
            +     * Optional. The emails of the procurement contacts.
                  * 
            * - * .google.cloud.discoveryengine.v1beta.Engine.CommonConfig common_config = 15; + * + * repeated string procurement_contact_emails = 45 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the element to return. + * @return The procurementContactEmails at the given index. */ - public Builder setCommonConfig( - com.google.cloud.discoveryengine.v1beta.Engine.CommonConfig.Builder builderForValue) { - if (commonConfigBuilder_ == null) { - commonConfig_ = builderForValue.build(); - } else { - commonConfigBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000400; - onChanged(); - return this; + public java.lang.String getProcurementContactEmails(int index) { + return procurementContactEmails_.get(index); } /** * * *
            -     * Common config spec that specifies the metadata of the engine.
            +     * Optional. The emails of the procurement contacts.
                  * 
            * - * .google.cloud.discoveryengine.v1beta.Engine.CommonConfig common_config = 15; + * + * repeated string procurement_contact_emails = 45 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the value to return. + * @return The bytes of the procurementContactEmails at the given index. */ - public Builder mergeCommonConfig( - com.google.cloud.discoveryengine.v1beta.Engine.CommonConfig value) { - if (commonConfigBuilder_ == null) { - if (((bitField0_ & 0x00000400) != 0) - && commonConfig_ != null - && commonConfig_ - != com.google.cloud.discoveryengine.v1beta.Engine.CommonConfig - .getDefaultInstance()) { - getCommonConfigBuilder().mergeFrom(value); - } else { - commonConfig_ = value; - } - } else { - commonConfigBuilder_.mergeFrom(value); - } - if (commonConfig_ != null) { - bitField0_ |= 0x00000400; - onChanged(); - } - return this; + public com.google.protobuf.ByteString getProcurementContactEmailsBytes(int index) { + return procurementContactEmails_.getByteString(index); } /** * * *
            -     * Common config spec that specifies the metadata of the engine.
            +     * Optional. The emails of the procurement contacts.
                  * 
            * - * .google.cloud.discoveryengine.v1beta.Engine.CommonConfig common_config = 15; + * + * repeated string procurement_contact_emails = 45 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index to set the value at. + * @param value The procurementContactEmails to set. + * @return This builder for chaining. */ - public Builder clearCommonConfig() { - bitField0_ = (bitField0_ & ~0x00000400); - commonConfig_ = null; - if (commonConfigBuilder_ != null) { - commonConfigBuilder_.dispose(); - commonConfigBuilder_ = null; + public Builder setProcurementContactEmails(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); } + ensureProcurementContactEmailsIsMutable(); + procurementContactEmails_.set(index, value); + bitField0_ |= 0x00800000; onChanged(); return this; } @@ -8956,100 +23779,66 @@ public Builder clearCommonConfig() { * * *
            -     * Common config spec that specifies the metadata of the engine.
            -     * 
            - * - * .google.cloud.discoveryengine.v1beta.Engine.CommonConfig common_config = 15; - */ - public com.google.cloud.discoveryengine.v1beta.Engine.CommonConfig.Builder - getCommonConfigBuilder() { - bitField0_ |= 0x00000400; - onChanged(); - return internalGetCommonConfigFieldBuilder().getBuilder(); - } - - /** - * - * - *
            -     * Common config spec that specifies the metadata of the engine.
            +     * Optional. The emails of the procurement contacts.
                  * 
            * - * .google.cloud.discoveryengine.v1beta.Engine.CommonConfig common_config = 15; - */ - public com.google.cloud.discoveryengine.v1beta.Engine.CommonConfigOrBuilder - getCommonConfigOrBuilder() { - if (commonConfigBuilder_ != null) { - return commonConfigBuilder_.getMessageOrBuilder(); - } else { - return commonConfig_ == null - ? com.google.cloud.discoveryengine.v1beta.Engine.CommonConfig.getDefaultInstance() - : commonConfig_; - } - } - - /** - * - * - *
            -     * Common config spec that specifies the metadata of the engine.
            -     * 
            + * + * repeated string procurement_contact_emails = 45 [(.google.api.field_behavior) = OPTIONAL]; + * * - * .google.cloud.discoveryengine.v1beta.Engine.CommonConfig common_config = 15; + * @param value The procurementContactEmails to add. + * @return This builder for chaining. */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.discoveryengine.v1beta.Engine.CommonConfig, - com.google.cloud.discoveryengine.v1beta.Engine.CommonConfig.Builder, - com.google.cloud.discoveryengine.v1beta.Engine.CommonConfigOrBuilder> - internalGetCommonConfigFieldBuilder() { - if (commonConfigBuilder_ == null) { - commonConfigBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.discoveryengine.v1beta.Engine.CommonConfig, - com.google.cloud.discoveryengine.v1beta.Engine.CommonConfig.Builder, - com.google.cloud.discoveryengine.v1beta.Engine.CommonConfigOrBuilder>( - getCommonConfig(), getParentForChildren(), isClean()); - commonConfig_ = null; + public Builder addProcurementContactEmails(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); } - return commonConfigBuilder_; + ensureProcurementContactEmailsIsMutable(); + procurementContactEmails_.add(value); + bitField0_ |= 0x00800000; + onChanged(); + return this; } - private boolean disableAnalytics_; - /** * * *
            -     * Optional. Whether to disable analytics for searches performed on this
            -     * engine.
            +     * Optional. The emails of the procurement contacts.
                  * 
            * - * bool disable_analytics = 26 [(.google.api.field_behavior) = OPTIONAL]; + * + * repeated string procurement_contact_emails = 45 [(.google.api.field_behavior) = OPTIONAL]; + * * - * @return The disableAnalytics. + * @param values The procurementContactEmails to add. + * @return This builder for chaining. */ - @java.lang.Override - public boolean getDisableAnalytics() { - return disableAnalytics_; + public Builder addAllProcurementContactEmails(java.lang.Iterable values) { + ensureProcurementContactEmailsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, procurementContactEmails_); + bitField0_ |= 0x00800000; + onChanged(); + return this; } /** * * *
            -     * Optional. Whether to disable analytics for searches performed on this
            -     * engine.
            +     * Optional. The emails of the procurement contacts.
                  * 
            * - * bool disable_analytics = 26 [(.google.api.field_behavior) = OPTIONAL]; + * + * repeated string procurement_contact_emails = 45 [(.google.api.field_behavior) = OPTIONAL]; + * * - * @param value The disableAnalytics to set. * @return This builder for chaining. */ - public Builder setDisableAnalytics(boolean value) { - - disableAnalytics_ = value; - bitField0_ |= 0x00000800; + public Builder clearProcurementContactEmails() { + procurementContactEmails_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00800000); + ; onChanged(); return this; } @@ -9058,17 +23847,24 @@ public Builder setDisableAnalytics(boolean value) { * * *
            -     * Optional. Whether to disable analytics for searches performed on this
            -     * engine.
            +     * Optional. The emails of the procurement contacts.
                  * 
            * - * bool disable_analytics = 26 [(.google.api.field_behavior) = OPTIONAL]; + * + * repeated string procurement_contact_emails = 45 [(.google.api.field_behavior) = OPTIONAL]; + * * + * @param value The bytes of the procurementContactEmails to add. * @return This builder for chaining. */ - public Builder clearDisableAnalytics() { - bitField0_ = (bitField0_ & ~0x00000800); - disableAnalytics_ = false; + public Builder addProcurementContactEmailsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureProcurementContactEmailsIsMutable(); + procurementContactEmails_.add(value); + bitField0_ |= 0x00800000; onChanged(); return this; } diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/EngineOrBuilder.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/EngineOrBuilder.java index 6c431e8bcb0e..450cc83399b9 100644 --- a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/EngineOrBuilder.java +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/EngineOrBuilder.java @@ -126,6 +126,69 @@ public interface EngineOrBuilder com.google.cloud.discoveryengine.v1beta.Engine.SearchEngineConfigOrBuilder getSearchEngineConfigOrBuilder(); + /** + * + * + *
            +   * Configurations for the Media Engine. Only applicable on the data
            +   * stores with
            +   * [solution_type][google.cloud.discoveryengine.v1beta.Engine.solution_type]
            +   * [SOLUTION_TYPE_RECOMMENDATION][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_RECOMMENDATION]
            +   * and
            +   * [IndustryVertical.MEDIA][google.cloud.discoveryengine.v1beta.IndustryVertical.MEDIA]
            +   * vertical.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig media_recommendation_engine_config = 14; + * + * + * @return Whether the mediaRecommendationEngineConfig field is set. + */ + boolean hasMediaRecommendationEngineConfig(); + + /** + * + * + *
            +   * Configurations for the Media Engine. Only applicable on the data
            +   * stores with
            +   * [solution_type][google.cloud.discoveryengine.v1beta.Engine.solution_type]
            +   * [SOLUTION_TYPE_RECOMMENDATION][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_RECOMMENDATION]
            +   * and
            +   * [IndustryVertical.MEDIA][google.cloud.discoveryengine.v1beta.IndustryVertical.MEDIA]
            +   * vertical.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig media_recommendation_engine_config = 14; + * + * + * @return The mediaRecommendationEngineConfig. + */ + com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig + getMediaRecommendationEngineConfig(); + + /** + * + * + *
            +   * Configurations for the Media Engine. Only applicable on the data
            +   * stores with
            +   * [solution_type][google.cloud.discoveryengine.v1beta.Engine.solution_type]
            +   * [SOLUTION_TYPE_RECOMMENDATION][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_RECOMMENDATION]
            +   * and
            +   * [IndustryVertical.MEDIA][google.cloud.discoveryengine.v1beta.IndustryVertical.MEDIA]
            +   * vertical.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig media_recommendation_engine_config = 14; + * + */ + com.google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfigOrBuilder + getMediaRecommendationEngineConfigOrBuilder(); + /** * * @@ -186,7 +249,7 @@ public interface EngineOrBuilder * * *
            -   * Immutable. The fully qualified resource name of the engine.
            +   * Immutable. Identifier. The fully qualified resource name of the engine.
                *
                * This field must be a UTF-8 encoded string with a length limit of 1024
                * characters.
            @@ -197,7 +260,9 @@ public interface EngineOrBuilder
                * /[a-z0-9][a-z0-9-_]*/. Otherwise, an INVALID_ARGUMENT error is returned.
                * 
            * - * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = IDENTIFIER]; + * * * @return The name. */ @@ -207,7 +272,7 @@ public interface EngineOrBuilder * * *
            -   * Immutable. The fully qualified resource name of the engine.
            +   * Immutable. Identifier. The fully qualified resource name of the engine.
                *
                * This field must be a UTF-8 encoded string with a length limit of 1024
                * characters.
            @@ -218,7 +283,9 @@ public interface EngineOrBuilder
                * /[a-z0-9][a-z0-9-_]*/. Otherwise, an INVALID_ARGUMENT error is returned.
                * 
            * - * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = IDENTIFIER]; + * * * @return The bytes for name. */ @@ -336,7 +403,7 @@ public interface EngineOrBuilder * * *
            -   * The data stores associated with this engine.
            +   * Optional. The data stores associated with this engine.
                *
                * For
                * [SOLUTION_TYPE_SEARCH][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_SEARCH]
            @@ -358,7 +425,7 @@ public interface EngineOrBuilder
                * initializations.
                * 
            * - * repeated string data_store_ids = 5; + * repeated string data_store_ids = 5 [(.google.api.field_behavior) = OPTIONAL]; * * @return A list containing the dataStoreIds. */ @@ -368,7 +435,7 @@ public interface EngineOrBuilder * * *
            -   * The data stores associated with this engine.
            +   * Optional. The data stores associated with this engine.
                *
                * For
                * [SOLUTION_TYPE_SEARCH][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_SEARCH]
            @@ -390,7 +457,7 @@ public interface EngineOrBuilder
                * initializations.
                * 
            * - * repeated string data_store_ids = 5; + * repeated string data_store_ids = 5 [(.google.api.field_behavior) = OPTIONAL]; * * @return The count of dataStoreIds. */ @@ -400,7 +467,7 @@ public interface EngineOrBuilder * * *
            -   * The data stores associated with this engine.
            +   * Optional. The data stores associated with this engine.
                *
                * For
                * [SOLUTION_TYPE_SEARCH][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_SEARCH]
            @@ -422,7 +489,7 @@ public interface EngineOrBuilder
                * initializations.
                * 
            * - * repeated string data_store_ids = 5; + * repeated string data_store_ids = 5 [(.google.api.field_behavior) = OPTIONAL]; * * @param index The index of the element to return. * @return The dataStoreIds at the given index. @@ -433,7 +500,7 @@ public interface EngineOrBuilder * * *
            -   * The data stores associated with this engine.
            +   * Optional. The data stores associated with this engine.
                *
                * For
                * [SOLUTION_TYPE_SEARCH][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_SEARCH]
            @@ -455,7 +522,7 @@ public interface EngineOrBuilder
                * initializations.
                * 
            * - * repeated string data_store_ids = 5; + * repeated string data_store_ids = 5 [(.google.api.field_behavior) = OPTIONAL]; * * @param index The index of the value to return. * @return The bytes of the dataStoreIds at the given index. @@ -496,14 +563,15 @@ public interface EngineOrBuilder * * *
            -   * The industry vertical that the engine registers.
            +   * Optional. The industry vertical that the engine registers.
                * The restriction of the Engine industry vertical is based on
            -   * [DataStore][google.cloud.discoveryengine.v1beta.DataStore]: If unspecified,
            -   * default to `GENERIC`. Vertical on Engine has to match vertical of the
            -   * DataStore linked to the engine.
            +   * [DataStore][google.cloud.discoveryengine.v1beta.DataStore]: Vertical on
            +   * Engine has to match vertical of the DataStore linked to the engine.
                * 
            * - * .google.cloud.discoveryengine.v1beta.IndustryVertical industry_vertical = 16; + * + * .google.cloud.discoveryengine.v1beta.IndustryVertical industry_vertical = 16 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return The enum numeric value on the wire for industryVertical. */ @@ -513,14 +581,15 @@ public interface EngineOrBuilder * * *
            -   * The industry vertical that the engine registers.
            +   * Optional. The industry vertical that the engine registers.
                * The restriction of the Engine industry vertical is based on
            -   * [DataStore][google.cloud.discoveryengine.v1beta.DataStore]: If unspecified,
            -   * default to `GENERIC`. Vertical on Engine has to match vertical of the
            -   * DataStore linked to the engine.
            +   * [DataStore][google.cloud.discoveryengine.v1beta.DataStore]: Vertical on
            +   * Engine has to match vertical of the DataStore linked to the engine.
                * 
            * - * .google.cloud.discoveryengine.v1beta.IndustryVertical industry_vertical = 16; + * + * .google.cloud.discoveryengine.v1beta.IndustryVertical industry_vertical = 16 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return The industryVertical. */ @@ -563,6 +632,93 @@ public interface EngineOrBuilder */ com.google.cloud.discoveryengine.v1beta.Engine.CommonConfigOrBuilder getCommonConfigOrBuilder(); + /** + * + * + *
            +   * Optional. Configurations for the Knowledge Graph. Only applicable if
            +   * [solution_type][google.cloud.discoveryengine.v1beta.Engine.solution_type]
            +   * is
            +   * [SOLUTION_TYPE_SEARCH][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_SEARCH].
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Engine.KnowledgeGraphConfig knowledge_graph_config = 23 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the knowledgeGraphConfig field is set. + */ + boolean hasKnowledgeGraphConfig(); + + /** + * + * + *
            +   * Optional. Configurations for the Knowledge Graph. Only applicable if
            +   * [solution_type][google.cloud.discoveryengine.v1beta.Engine.solution_type]
            +   * is
            +   * [SOLUTION_TYPE_SEARCH][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_SEARCH].
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Engine.KnowledgeGraphConfig knowledge_graph_config = 23 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The knowledgeGraphConfig. + */ + com.google.cloud.discoveryengine.v1beta.Engine.KnowledgeGraphConfig getKnowledgeGraphConfig(); + + /** + * + * + *
            +   * Optional. Configurations for the Knowledge Graph. Only applicable if
            +   * [solution_type][google.cloud.discoveryengine.v1beta.Engine.solution_type]
            +   * is
            +   * [SOLUTION_TYPE_SEARCH][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_SEARCH].
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Engine.KnowledgeGraphConfig knowledge_graph_config = 23 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.discoveryengine.v1beta.Engine.KnowledgeGraphConfigOrBuilder + getKnowledgeGraphConfigOrBuilder(); + + /** + * + * + *
            +   * Optional. Immutable. This the application type which this engine resource
            +   * represents. NOTE: this is a new concept independ of existing industry
            +   * vertical or solution type.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Engine.AppType app_type = 24 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The enum numeric value on the wire for appType. + */ + int getAppTypeValue(); + + /** + * + * + *
            +   * Optional. Immutable. This the application type which this engine resource
            +   * represents. NOTE: this is a new concept independ of existing industry
            +   * vertical or solution type.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Engine.AppType app_type = 24 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The appType. + */ + com.google.cloud.discoveryengine.v1beta.Engine.AppType getAppType(); + /** * * @@ -577,6 +733,886 @@ public interface EngineOrBuilder */ boolean getDisableAnalytics(); + /** + * + * + *
            +   * Optional. Feature config for the engine to opt in or opt out of features.
            +   * Supported keys:
            +   *
            +   * * `*`: all features, if it's present, all other feature state settings are
            +   * ignored.
            +   * * `agent-gallery`
            +   * * `no-code-agent-builder`
            +   * * `prompt-gallery`
            +   * * `model-selector`
            +   * * `notebook-lm`
            +   * * `people-search`
            +   * * `people-search-org-chart`
            +   * * `bi-directional-audio`
            +   * * `feedback`
            +   * * `session-sharing`
            +   * * `personalization-memory`
            +   * * `personalization-suggested-highlights`
            +   * * `mobile-app-access`
            +   * * `disable-agent-sharing`
            +   * * `disable-image-generation`
            +   * * `disable-video-generation`
            +   * * `disable-onedrive-upload`
            +   * * `disable-talk-to-content`
            +   * * `disable-google-drive-upload`
            +   * * `disable-welcome-emails`
            +   * * `disable-canvas`
            +   * * `disable-canvas-workspace`
            +   * * `disable-skills`
            +   * * `enable-end-user-sharing-with-groups`
            +   * * `single-agent-orchestration`
            +   * * `multi-agent-orchestration`
            +   * * `cross-product-intelligence`
            +   * 
            + * + * + * map<string, .google.cloud.discoveryengine.v1beta.Engine.FeatureState> features = 30 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + int getFeaturesCount(); + + /** + * + * + *
            +   * Optional. Feature config for the engine to opt in or opt out of features.
            +   * Supported keys:
            +   *
            +   * * `*`: all features, if it's present, all other feature state settings are
            +   * ignored.
            +   * * `agent-gallery`
            +   * * `no-code-agent-builder`
            +   * * `prompt-gallery`
            +   * * `model-selector`
            +   * * `notebook-lm`
            +   * * `people-search`
            +   * * `people-search-org-chart`
            +   * * `bi-directional-audio`
            +   * * `feedback`
            +   * * `session-sharing`
            +   * * `personalization-memory`
            +   * * `personalization-suggested-highlights`
            +   * * `mobile-app-access`
            +   * * `disable-agent-sharing`
            +   * * `disable-image-generation`
            +   * * `disable-video-generation`
            +   * * `disable-onedrive-upload`
            +   * * `disable-talk-to-content`
            +   * * `disable-google-drive-upload`
            +   * * `disable-welcome-emails`
            +   * * `disable-canvas`
            +   * * `disable-canvas-workspace`
            +   * * `disable-skills`
            +   * * `enable-end-user-sharing-with-groups`
            +   * * `single-agent-orchestration`
            +   * * `multi-agent-orchestration`
            +   * * `cross-product-intelligence`
            +   * 
            + * + * + * map<string, .google.cloud.discoveryengine.v1beta.Engine.FeatureState> features = 30 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + boolean containsFeatures(java.lang.String key); + + /** Use {@link #getFeaturesMap()} instead. */ + @java.lang.Deprecated + java.util.Map + getFeatures(); + + /** + * + * + *
            +   * Optional. Feature config for the engine to opt in or opt out of features.
            +   * Supported keys:
            +   *
            +   * * `*`: all features, if it's present, all other feature state settings are
            +   * ignored.
            +   * * `agent-gallery`
            +   * * `no-code-agent-builder`
            +   * * `prompt-gallery`
            +   * * `model-selector`
            +   * * `notebook-lm`
            +   * * `people-search`
            +   * * `people-search-org-chart`
            +   * * `bi-directional-audio`
            +   * * `feedback`
            +   * * `session-sharing`
            +   * * `personalization-memory`
            +   * * `personalization-suggested-highlights`
            +   * * `mobile-app-access`
            +   * * `disable-agent-sharing`
            +   * * `disable-image-generation`
            +   * * `disable-video-generation`
            +   * * `disable-onedrive-upload`
            +   * * `disable-talk-to-content`
            +   * * `disable-google-drive-upload`
            +   * * `disable-welcome-emails`
            +   * * `disable-canvas`
            +   * * `disable-canvas-workspace`
            +   * * `disable-skills`
            +   * * `enable-end-user-sharing-with-groups`
            +   * * `single-agent-orchestration`
            +   * * `multi-agent-orchestration`
            +   * * `cross-product-intelligence`
            +   * 
            + * + * + * map<string, .google.cloud.discoveryengine.v1beta.Engine.FeatureState> features = 30 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.Map + getFeaturesMap(); + + /** + * + * + *
            +   * Optional. Feature config for the engine to opt in or opt out of features.
            +   * Supported keys:
            +   *
            +   * * `*`: all features, if it's present, all other feature state settings are
            +   * ignored.
            +   * * `agent-gallery`
            +   * * `no-code-agent-builder`
            +   * * `prompt-gallery`
            +   * * `model-selector`
            +   * * `notebook-lm`
            +   * * `people-search`
            +   * * `people-search-org-chart`
            +   * * `bi-directional-audio`
            +   * * `feedback`
            +   * * `session-sharing`
            +   * * `personalization-memory`
            +   * * `personalization-suggested-highlights`
            +   * * `mobile-app-access`
            +   * * `disable-agent-sharing`
            +   * * `disable-image-generation`
            +   * * `disable-video-generation`
            +   * * `disable-onedrive-upload`
            +   * * `disable-talk-to-content`
            +   * * `disable-google-drive-upload`
            +   * * `disable-welcome-emails`
            +   * * `disable-canvas`
            +   * * `disable-canvas-workspace`
            +   * * `disable-skills`
            +   * * `enable-end-user-sharing-with-groups`
            +   * * `single-agent-orchestration`
            +   * * `multi-agent-orchestration`
            +   * * `cross-product-intelligence`
            +   * 
            + * + * + * map<string, .google.cloud.discoveryengine.v1beta.Engine.FeatureState> features = 30 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + /* nullable */ + com.google.cloud.discoveryengine.v1beta.Engine.FeatureState getFeaturesOrDefault( + java.lang.String key, + /* nullable */ + com.google.cloud.discoveryengine.v1beta.Engine.FeatureState defaultValue); + + /** + * + * + *
            +   * Optional. Feature config for the engine to opt in or opt out of features.
            +   * Supported keys:
            +   *
            +   * * `*`: all features, if it's present, all other feature state settings are
            +   * ignored.
            +   * * `agent-gallery`
            +   * * `no-code-agent-builder`
            +   * * `prompt-gallery`
            +   * * `model-selector`
            +   * * `notebook-lm`
            +   * * `people-search`
            +   * * `people-search-org-chart`
            +   * * `bi-directional-audio`
            +   * * `feedback`
            +   * * `session-sharing`
            +   * * `personalization-memory`
            +   * * `personalization-suggested-highlights`
            +   * * `mobile-app-access`
            +   * * `disable-agent-sharing`
            +   * * `disable-image-generation`
            +   * * `disable-video-generation`
            +   * * `disable-onedrive-upload`
            +   * * `disable-talk-to-content`
            +   * * `disable-google-drive-upload`
            +   * * `disable-welcome-emails`
            +   * * `disable-canvas`
            +   * * `disable-canvas-workspace`
            +   * * `disable-skills`
            +   * * `enable-end-user-sharing-with-groups`
            +   * * `single-agent-orchestration`
            +   * * `multi-agent-orchestration`
            +   * * `cross-product-intelligence`
            +   * 
            + * + * + * map<string, .google.cloud.discoveryengine.v1beta.Engine.FeatureState> features = 30 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.discoveryengine.v1beta.Engine.FeatureState getFeaturesOrThrow( + java.lang.String key); + + /** Use {@link #getFeaturesValueMap()} instead. */ + @java.lang.Deprecated + java.util.Map getFeaturesValue(); + + /** + * + * + *
            +   * Optional. Feature config for the engine to opt in or opt out of features.
            +   * Supported keys:
            +   *
            +   * * `*`: all features, if it's present, all other feature state settings are
            +   * ignored.
            +   * * `agent-gallery`
            +   * * `no-code-agent-builder`
            +   * * `prompt-gallery`
            +   * * `model-selector`
            +   * * `notebook-lm`
            +   * * `people-search`
            +   * * `people-search-org-chart`
            +   * * `bi-directional-audio`
            +   * * `feedback`
            +   * * `session-sharing`
            +   * * `personalization-memory`
            +   * * `personalization-suggested-highlights`
            +   * * `mobile-app-access`
            +   * * `disable-agent-sharing`
            +   * * `disable-image-generation`
            +   * * `disable-video-generation`
            +   * * `disable-onedrive-upload`
            +   * * `disable-talk-to-content`
            +   * * `disable-google-drive-upload`
            +   * * `disable-welcome-emails`
            +   * * `disable-canvas`
            +   * * `disable-canvas-workspace`
            +   * * `disable-skills`
            +   * * `enable-end-user-sharing-with-groups`
            +   * * `single-agent-orchestration`
            +   * * `multi-agent-orchestration`
            +   * * `cross-product-intelligence`
            +   * 
            + * + * + * map<string, .google.cloud.discoveryengine.v1beta.Engine.FeatureState> features = 30 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.Map getFeaturesValueMap(); + + /** + * + * + *
            +   * Optional. Feature config for the engine to opt in or opt out of features.
            +   * Supported keys:
            +   *
            +   * * `*`: all features, if it's present, all other feature state settings are
            +   * ignored.
            +   * * `agent-gallery`
            +   * * `no-code-agent-builder`
            +   * * `prompt-gallery`
            +   * * `model-selector`
            +   * * `notebook-lm`
            +   * * `people-search`
            +   * * `people-search-org-chart`
            +   * * `bi-directional-audio`
            +   * * `feedback`
            +   * * `session-sharing`
            +   * * `personalization-memory`
            +   * * `personalization-suggested-highlights`
            +   * * `mobile-app-access`
            +   * * `disable-agent-sharing`
            +   * * `disable-image-generation`
            +   * * `disable-video-generation`
            +   * * `disable-onedrive-upload`
            +   * * `disable-talk-to-content`
            +   * * `disable-google-drive-upload`
            +   * * `disable-welcome-emails`
            +   * * `disable-canvas`
            +   * * `disable-canvas-workspace`
            +   * * `disable-skills`
            +   * * `enable-end-user-sharing-with-groups`
            +   * * `single-agent-orchestration`
            +   * * `multi-agent-orchestration`
            +   * * `cross-product-intelligence`
            +   * 
            + * + * + * map<string, .google.cloud.discoveryengine.v1beta.Engine.FeatureState> features = 30 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + int getFeaturesValueOrDefault(java.lang.String key, int defaultValue); + + /** + * + * + *
            +   * Optional. Feature config for the engine to opt in or opt out of features.
            +   * Supported keys:
            +   *
            +   * * `*`: all features, if it's present, all other feature state settings are
            +   * ignored.
            +   * * `agent-gallery`
            +   * * `no-code-agent-builder`
            +   * * `prompt-gallery`
            +   * * `model-selector`
            +   * * `notebook-lm`
            +   * * `people-search`
            +   * * `people-search-org-chart`
            +   * * `bi-directional-audio`
            +   * * `feedback`
            +   * * `session-sharing`
            +   * * `personalization-memory`
            +   * * `personalization-suggested-highlights`
            +   * * `mobile-app-access`
            +   * * `disable-agent-sharing`
            +   * * `disable-image-generation`
            +   * * `disable-video-generation`
            +   * * `disable-onedrive-upload`
            +   * * `disable-talk-to-content`
            +   * * `disable-google-drive-upload`
            +   * * `disable-welcome-emails`
            +   * * `disable-canvas`
            +   * * `disable-canvas-workspace`
            +   * * `disable-skills`
            +   * * `enable-end-user-sharing-with-groups`
            +   * * `single-agent-orchestration`
            +   * * `multi-agent-orchestration`
            +   * * `cross-product-intelligence`
            +   * 
            + * + * + * map<string, .google.cloud.discoveryengine.v1beta.Engine.FeatureState> features = 30 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + int getFeaturesValueOrThrow(java.lang.String key); + + /** + * + * + *
            +   * Output only. CMEK-related information for the Engine.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.CmekConfig cmek_config = 32 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the cmekConfig field is set. + */ + boolean hasCmekConfig(); + + /** + * + * + *
            +   * Output only. CMEK-related information for the Engine.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.CmekConfig cmek_config = 32 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The cmekConfig. + */ + com.google.cloud.discoveryengine.v1beta.CmekConfig getCmekConfig(); + + /** + * + * + *
            +   * Output only. CMEK-related information for the Engine.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.CmekConfig cmek_config = 32 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.discoveryengine.v1beta.CmekConfigOrBuilder getCmekConfigOrBuilder(); + + /** + * + * + *
            +   * Optional. Configuration for configurable billing approach.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Engine.ConfigurableBillingApproach configurable_billing_approach = 36 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for configurableBillingApproach. + */ + int getConfigurableBillingApproachValue(); + + /** + * + * + *
            +   * Optional. Configuration for configurable billing approach.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Engine.ConfigurableBillingApproach configurable_billing_approach = 36 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The configurableBillingApproach. + */ + com.google.cloud.discoveryengine.v1beta.Engine.ConfigurableBillingApproach + getConfigurableBillingApproach(); + + /** + * + * + *
            +   * Optional. Maps a model name to its specific configuration for this engine.
            +   * This allows admin users to turn on/off individual models. This only stores
            +   * models whose states are overridden by the admin.
            +   *
            +   * When the state is unspecified, or model_configs is empty for this
            +   * model, the system will decide if this model should be available or not
            +   * based on the default configuration. For example, a preview model
            +   * should be disabled by default if the admin has not chosen to enable it.
            +   * 
            + * + * + * map<string, .google.cloud.discoveryengine.v1beta.Engine.ModelState> model_configs = 37 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + int getModelConfigsCount(); + + /** + * + * + *
            +   * Optional. Maps a model name to its specific configuration for this engine.
            +   * This allows admin users to turn on/off individual models. This only stores
            +   * models whose states are overridden by the admin.
            +   *
            +   * When the state is unspecified, or model_configs is empty for this
            +   * model, the system will decide if this model should be available or not
            +   * based on the default configuration. For example, a preview model
            +   * should be disabled by default if the admin has not chosen to enable it.
            +   * 
            + * + * + * map<string, .google.cloud.discoveryengine.v1beta.Engine.ModelState> model_configs = 37 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + boolean containsModelConfigs(java.lang.String key); + + /** Use {@link #getModelConfigsMap()} instead. */ + @java.lang.Deprecated + java.util.Map + getModelConfigs(); + + /** + * + * + *
            +   * Optional. Maps a model name to its specific configuration for this engine.
            +   * This allows admin users to turn on/off individual models. This only stores
            +   * models whose states are overridden by the admin.
            +   *
            +   * When the state is unspecified, or model_configs is empty for this
            +   * model, the system will decide if this model should be available or not
            +   * based on the default configuration. For example, a preview model
            +   * should be disabled by default if the admin has not chosen to enable it.
            +   * 
            + * + * + * map<string, .google.cloud.discoveryengine.v1beta.Engine.ModelState> model_configs = 37 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.Map + getModelConfigsMap(); + + /** + * + * + *
            +   * Optional. Maps a model name to its specific configuration for this engine.
            +   * This allows admin users to turn on/off individual models. This only stores
            +   * models whose states are overridden by the admin.
            +   *
            +   * When the state is unspecified, or model_configs is empty for this
            +   * model, the system will decide if this model should be available or not
            +   * based on the default configuration. For example, a preview model
            +   * should be disabled by default if the admin has not chosen to enable it.
            +   * 
            + * + * + * map<string, .google.cloud.discoveryengine.v1beta.Engine.ModelState> model_configs = 37 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + /* nullable */ + com.google.cloud.discoveryengine.v1beta.Engine.ModelState getModelConfigsOrDefault( + java.lang.String key, + /* nullable */ + com.google.cloud.discoveryengine.v1beta.Engine.ModelState defaultValue); + + /** + * + * + *
            +   * Optional. Maps a model name to its specific configuration for this engine.
            +   * This allows admin users to turn on/off individual models. This only stores
            +   * models whose states are overridden by the admin.
            +   *
            +   * When the state is unspecified, or model_configs is empty for this
            +   * model, the system will decide if this model should be available or not
            +   * based on the default configuration. For example, a preview model
            +   * should be disabled by default if the admin has not chosen to enable it.
            +   * 
            + * + * + * map<string, .google.cloud.discoveryengine.v1beta.Engine.ModelState> model_configs = 37 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.discoveryengine.v1beta.Engine.ModelState getModelConfigsOrThrow( + java.lang.String key); + + /** Use {@link #getModelConfigsValueMap()} instead. */ + @java.lang.Deprecated + java.util.Map getModelConfigsValue(); + + /** + * + * + *
            +   * Optional. Maps a model name to its specific configuration for this engine.
            +   * This allows admin users to turn on/off individual models. This only stores
            +   * models whose states are overridden by the admin.
            +   *
            +   * When the state is unspecified, or model_configs is empty for this
            +   * model, the system will decide if this model should be available or not
            +   * based on the default configuration. For example, a preview model
            +   * should be disabled by default if the admin has not chosen to enable it.
            +   * 
            + * + * + * map<string, .google.cloud.discoveryengine.v1beta.Engine.ModelState> model_configs = 37 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.Map getModelConfigsValueMap(); + + /** + * + * + *
            +   * Optional. Maps a model name to its specific configuration for this engine.
            +   * This allows admin users to turn on/off individual models. This only stores
            +   * models whose states are overridden by the admin.
            +   *
            +   * When the state is unspecified, or model_configs is empty for this
            +   * model, the system will decide if this model should be available or not
            +   * based on the default configuration. For example, a preview model
            +   * should be disabled by default if the admin has not chosen to enable it.
            +   * 
            + * + * + * map<string, .google.cloud.discoveryengine.v1beta.Engine.ModelState> model_configs = 37 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + int getModelConfigsValueOrDefault(java.lang.String key, int defaultValue); + + /** + * + * + *
            +   * Optional. Maps a model name to its specific configuration for this engine.
            +   * This allows admin users to turn on/off individual models. This only stores
            +   * models whose states are overridden by the admin.
            +   *
            +   * When the state is unspecified, or model_configs is empty for this
            +   * model, the system will decide if this model should be available or not
            +   * based on the default configuration. For example, a preview model
            +   * should be disabled by default if the admin has not chosen to enable it.
            +   * 
            + * + * + * map<string, .google.cloud.discoveryengine.v1beta.Engine.ModelState> model_configs = 37 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + int getModelConfigsValueOrThrow(java.lang.String key); + + /** + * + * + *
            +   * Optional. Observability config for the engine.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.ObservabilityConfig observability_config = 39 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the observabilityConfig field is set. + */ + boolean hasObservabilityConfig(); + + /** + * + * + *
            +   * Optional. Observability config for the engine.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.ObservabilityConfig observability_config = 39 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The observabilityConfig. + */ + com.google.cloud.discoveryengine.v1beta.ObservabilityConfig getObservabilityConfig(); + + /** + * + * + *
            +   * Optional. Observability config for the engine.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.ObservabilityConfig observability_config = 39 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.discoveryengine.v1beta.ObservabilityConfigOrBuilder + getObservabilityConfigOrBuilder(); + + /** + * + * + *
            +   * Optional. Maps a connector ID (e.g., "hybrid-github", "shopify") to
            +   * tenant-specific information required for that connector. The structure of
            +   * the tenant information string is connector-dependent.
            +   * 
            + * + * + * map<string, string> connector_tenant_info = 42 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + int getConnectorTenantInfoCount(); + + /** + * + * + *
            +   * Optional. Maps a connector ID (e.g., "hybrid-github", "shopify") to
            +   * tenant-specific information required for that connector. The structure of
            +   * the tenant information string is connector-dependent.
            +   * 
            + * + * + * map<string, string> connector_tenant_info = 42 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + boolean containsConnectorTenantInfo(java.lang.String key); + + /** Use {@link #getConnectorTenantInfoMap()} instead. */ + @java.lang.Deprecated + java.util.Map getConnectorTenantInfo(); + + /** + * + * + *
            +   * Optional. Maps a connector ID (e.g., "hybrid-github", "shopify") to
            +   * tenant-specific information required for that connector. The structure of
            +   * the tenant information string is connector-dependent.
            +   * 
            + * + * + * map<string, string> connector_tenant_info = 42 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.Map getConnectorTenantInfoMap(); + + /** + * + * + *
            +   * Optional. Maps a connector ID (e.g., "hybrid-github", "shopify") to
            +   * tenant-specific information required for that connector. The structure of
            +   * the tenant information string is connector-dependent.
            +   * 
            + * + * + * map<string, string> connector_tenant_info = 42 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + /* nullable */ + java.lang.String getConnectorTenantInfoOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue); + + /** + * + * + *
            +   * Optional. Maps a connector ID (e.g., "hybrid-github", "shopify") to
            +   * tenant-specific information required for that connector. The structure of
            +   * the tenant information string is connector-dependent.
            +   * 
            + * + * + * map<string, string> connector_tenant_info = 42 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.lang.String getConnectorTenantInfoOrThrow(java.lang.String key); + + /** + * + * + *
            +   * Optional. The agent gateway setting for the engine.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AgentGatewaySetting agent_gateway_setting = 43 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the agentGatewaySetting field is set. + */ + boolean hasAgentGatewaySetting(); + + /** + * + * + *
            +   * Optional. The agent gateway setting for the engine.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AgentGatewaySetting agent_gateway_setting = 43 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The agentGatewaySetting. + */ + com.google.cloud.discoveryengine.v1beta.AgentGatewaySetting getAgentGatewaySetting(); + + /** + * + * + *
            +   * Optional. The agent gateway setting for the engine.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AgentGatewaySetting agent_gateway_setting = 43 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.discoveryengine.v1beta.AgentGatewaySettingOrBuilder + getAgentGatewaySettingOrBuilder(); + + /** + * + * + *
            +   * Optional. The visibility of marketplace agents in the agent gallery.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Engine.MarketplaceAgentVisibility marketplace_agent_visibility = 44 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for marketplaceAgentVisibility. + */ + int getMarketplaceAgentVisibilityValue(); + + /** + * + * + *
            +   * Optional. The visibility of marketplace agents in the agent gallery.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Engine.MarketplaceAgentVisibility marketplace_agent_visibility = 44 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The marketplaceAgentVisibility. + */ + com.google.cloud.discoveryengine.v1beta.Engine.MarketplaceAgentVisibility + getMarketplaceAgentVisibility(); + + /** + * + * + *
            +   * Optional. The emails of the procurement contacts.
            +   * 
            + * + * + * repeated string procurement_contact_emails = 45 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the procurementContactEmails. + */ + java.util.List getProcurementContactEmailsList(); + + /** + * + * + *
            +   * Optional. The emails of the procurement contacts.
            +   * 
            + * + * + * repeated string procurement_contact_emails = 45 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The count of procurementContactEmails. + */ + int getProcurementContactEmailsCount(); + + /** + * + * + *
            +   * Optional. The emails of the procurement contacts.
            +   * 
            + * + * + * repeated string procurement_contact_emails = 45 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the element to return. + * @return The procurementContactEmails at the given index. + */ + java.lang.String getProcurementContactEmails(int index); + + /** + * + * + *
            +   * Optional. The emails of the procurement contacts.
            +   * 
            + * + * + * repeated string procurement_contact_emails = 45 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the value to return. + * @return The bytes of the procurementContactEmails at the given index. + */ + com.google.protobuf.ByteString getProcurementContactEmailsBytes(int index); + com.google.cloud.discoveryengine.v1beta.Engine.EngineConfigCase getEngineConfigCase(); com.google.cloud.discoveryengine.v1beta.Engine.EngineMetadataCase getEngineMetadataCase(); diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/EngineProto.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/EngineProto.java index 0172425ee3c0..f590b225db54 100644 --- a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/EngineProto.java +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/EngineProto.java @@ -48,6 +48,26 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_discoveryengine_v1beta_Engine_SearchEngineConfig_descriptor; static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_cloud_discoveryengine_v1beta_Engine_SearchEngineConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1beta_Engine_MediaRecommendationEngineConfig_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1beta_Engine_MediaRecommendationEngineConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1beta_Engine_MediaRecommendationEngineConfig_OptimizationObjectiveConfig_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1beta_Engine_MediaRecommendationEngineConfig_OptimizationObjectiveConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1beta_Engine_MediaRecommendationEngineConfig_EngineFeaturesConfig_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1beta_Engine_MediaRecommendationEngineConfig_EngineFeaturesConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1beta_Engine_MediaRecommendationEngineConfig_RecommendedForYouFeatureConfig_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1beta_Engine_MediaRecommendationEngineConfig_RecommendedForYouFeatureConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1beta_Engine_MediaRecommendationEngineConfig_MostPopularFeatureConfig_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1beta_Engine_MediaRecommendationEngineConfig_MostPopularFeatureConfig_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_discoveryengine_v1beta_Engine_ChatEngineConfig_descriptor; static final com.google.protobuf.GeneratedMessage.FieldAccessorTable @@ -60,10 +80,30 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_discoveryengine_v1beta_Engine_CommonConfig_descriptor; static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_cloud_discoveryengine_v1beta_Engine_CommonConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1beta_Engine_KnowledgeGraphConfig_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1beta_Engine_KnowledgeGraphConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1beta_Engine_KnowledgeGraphConfig_FeatureConfig_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1beta_Engine_KnowledgeGraphConfig_FeatureConfig_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_discoveryengine_v1beta_Engine_ChatEngineMetadata_descriptor; static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_cloud_discoveryengine_v1beta_Engine_ChatEngineMetadata_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1beta_Engine_FeaturesEntry_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1beta_Engine_FeaturesEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1beta_Engine_ModelConfigsEntry_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1beta_Engine_ModelConfigsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1beta_Engine_ConnectorTenantInfoEntry_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1beta_Engine_ConnectorTenantInfoEntry_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { return descriptor; @@ -76,56 +116,158 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "\n" + "0google/cloud/discoveryengine/v1beta/engine.proto\022#google.cloud.discoveryengine" + ".v1beta\032\037google/api/field_behavior.proto" - + "\032\031google/api/resource.proto\0320google/clou" - + "d/discoveryengine/v1beta/common.proto\032\037google/protobuf/timestamp.proto\"\247\013\n" + + "\032\031google/api/resource.proto\032?google/clou" + + "d/discoveryengine/v1beta/agent_gateway_setting.proto\032=google/cloud/discoveryengi" + + "ne/v1beta/cmek_config_service.proto\0320google/cloud/discoveryengine/v1beta/common." + + "proto\0321google/cloud/discoveryengine/v1be" + + "ta/logging.proto\032\037google/protobuf/timestamp.proto\"\200(\n" + "\006Engine\022Z\n" - + "\022chat_engine_config\030\013 \001(\0132<.google.c" - + "loud.discoveryengine.v1beta.Engine.ChatEngineConfigH\000\022^\n" + + "\022chat_engine_config\030\013" + + " \001(\0132<.google.cloud.discoveryengine.v1beta.Engine.ChatEngineConfigH\000\022^\n" + "\024search_engine_config\030\r" - + " \001(\0132>.google.cloud.discoveryengine.v1beta.Engine.SearchEngineConfigH\000\022c\n" - + "\024chat_engine_metadata\030\014 \001(\0132>.google.cloud.disco" - + "veryengine.v1beta.Engine.ChatEngineMetadataB\003\340A\003H\001\022\021\n" - + "\004name\030\001 \001(\tB\003\340A\005\022\031\n" + + " \001(\0132>.google.cloud.discoveryengine.v1beta.Engine.SearchEngineConfigH\000\022y\n" + + "\"media_recommendation_engine_config\030\016 \001(\0132K.google.cloud.discoveryeng" + + "ine.v1beta.Engine.MediaRecommendationEngineConfigH\000\022c\n" + + "\024chat_engine_metadata\030\014 \001(" + + "\0132>.google.cloud.discoveryengine.v1beta.Engine.ChatEngineMetadataB\003\340A\003H\001\022\024\n" + + "\004name\030\001 \001(\tB\006\340A\005\340A\010\022\031\n" + "\014display_name\030\002 \001(\tB\003\340A\002\0224\n" + "\013create_time\030\003 \001(\0132\032.google.protobuf.TimestampB\003\340A\003\0224\n" + "\013update_time\030\004" - + " \001(\0132\032.google.protobuf.TimestampB\003\340A\003\022\026\n" - + "\016data_store_ids\030\005 \003(\t\022M\n\r" - + "solution_type\030\006" - + " \001(\01621.google.cloud.discoveryengine.v1beta.SolutionTypeB\003\340A\002\022P\n" + + " \001(\0132\032.google.protobuf.TimestampB\003\340A\003\022\033\n" + + "\016data_store_ids\030\005 \003(\tB\003\340A\001\022M\n\r" + + "solution_type\030\006 \001(" + + "\01621.google.cloud.discoveryengine.v1beta.SolutionTypeB\003\340A\002\022U\n" + "\021industry_vertical\030\020" - + " \001(\01625.google.cloud.discoveryengine.v1beta.IndustryVertical\022O\n\r" + + " \001(\01625.google.cloud.discoveryengine.v1beta.IndustryVerticalB\003\340A\001\022O\n\r" + "common_config\030\017" - + " \001(\01328.google.cloud.discoveryengine.v1beta.Engine.CommonConfig\022\036\n" - + "\021disable_analytics\030\032 \001(\010B\003\340A\001\032\244\001\n" + + " \001(\01328.google.cloud.discoveryengine.v1beta.Engine.CommonConfig\022e\n" + + "\026knowledge_graph_config\030\027 \001(\0132@.google.cloud.discove" + + "ryengine.v1beta.Engine.KnowledgeGraphConfigB\003\340A\001\022M\n" + + "\010app_type\030\030 \001(\01623.google.clou" + + "d.discoveryengine.v1beta.Engine.AppTypeB\006\340A\001\340A\005\022\036\n" + + "\021disable_analytics\030\032 \001(\010B\003\340A\001\022P\n" + + "\010features\030\036 \003(\01329.google.cloud.discove" + + "ryengine.v1beta.Engine.FeaturesEntryB\003\340A\001\022I\n" + + "\013cmek_config\030 " + + " \001(\0132/.google.cloud.discoveryengine.v1beta.CmekConfigB\003\340A\003\022s\n" + + "\035configurable_billing_approach\030$ \001(\0162G.go" + + "ogle.cloud.discoveryengine.v1beta.Engine.ConfigurableBillingApproachB\003\340A\001\022Y\n\r" + + "model_configs\030% \003(\0132=.google.cloud.discover" + + "yengine.v1beta.Engine.ModelConfigsEntryB\003\340A\001\022[\n" + + "\024observability_config\030\' \001(\01328.goo" + + "gle.cloud.discoveryengine.v1beta.ObservabilityConfigB\003\340A\001\022h\n" + + "\025connector_tenant_info\030* \003(\0132D.google.cloud.discoveryengine." + + "v1beta.Engine.ConnectorTenantInfoEntryB\003\340A\001\022\\\n" + + "\025agent_gateway_setting\030+ \001(\01328.goo" + + "gle.cloud.discoveryengine.v1beta.AgentGatewaySettingB\003\340A\001\022q\n" + + "\034marketplace_agent_visibility\030, \001(\0162F.google.cloud.discovery" + + "engine.v1beta.Engine.MarketplaceAgentVisibilityB\003\340A\001\022\'\n" + + "\032procurement_contact_emails\030- \003(\tB\003\340A\001\032\204\002\n" + "\022SearchEngineConfig\022D\n" + "\013search_tier\030\001" - + " \001(\0162/.google.cloud.discoveryengine.v1beta.SearchTier\022H\n" + + " \001(\0162/.google.cloud.discoveryengine.v1beta.SearchTier\022^\n" + + "\032required_subscription_tier\030\003 \001(\01625.google.cloud.di" + + "scoveryengine.v1beta.SubscriptionTierB\003\340A\001\022H\n" + "\016search_add_ons\030\002" - + " \003(\01620.google.cloud.discoveryengine.v1beta.SearchAddOn\032\227\002\n" + + " \003(\01620.google.cloud.discoveryengine.v1beta.SearchAddOn\032\313\010\n" + + "\037MediaRecommendationEngineConfig\022\021\n" + + "\004type\030\001 \001(\tB\003\340A\002\022\036\n" + + "\026optimization_objective\030\002 \001(\t\022\216\001\n" + + "\035optimization_objective_config\030\003 " + + "\001(\0132g.google.cloud.discoveryengine.v1bet" + + "a.Engine.MediaRecommendationEngineConfig.OptimizationObjectiveConfig\022q\n" + + "\016training_state\030\004 \001(\0162Y.google.cloud.discoveryeng" + + "ine.v1beta.Engine.MediaRecommendationEngineConfig.TrainingState\022\205\001\n" + + "\026engine_features_config\030\005 \001(\0132`.google.cloud.discover" + + "yengine.v1beta.Engine.MediaRecommendatio" + + "nEngineConfig.EngineFeaturesConfigB\003\340A\001\032_\n" + + "\033OptimizationObjectiveConfig\022\031\n" + + "\014target_field\030\001 \001(\tB\003\340A\002\022%\n" + + "\030target_field_value_float\030\002 \001(\002B\003\340A\002\032\310\002\n" + + "\024EngineFeaturesConfig\022\220\001\n" + + "\032recommended_for_you_config\030\001 \001(\0132j" + + ".google.cloud.discoveryengine.v1beta.Eng" + + "ine.MediaRecommendationEngineConfig.RecommendedForYouFeatureConfigH\000\022\203\001\n" + + "\023most_popular_config\030\002 \001(\0132d.google.cloud.discov" + + "eryengine.v1beta.Engine.MediaRecommendat" + + "ionEngineConfig.MostPopularFeatureConfigH\000B\027\n" + + "\025type_dedicated_config\032<\n" + + "\036RecommendedForYouFeatureConfig\022\032\n" + + "\022context_event_type\030\001 \001(\t\0324\n" + + "\030MostPopularFeatureConfig\022\030\n" + + "\020time_window_days\030\001 \001(\003\"I\n\r" + + "TrainingState\022\036\n" + + "\032TRAINING_STATE_UNSPECIFIED\020\000\022\n\n" + + "\006PAUSED\020\001\022\014\n" + + "\010TRAINING\020\002\032\270\002\n" + "\020ChatEngineConfig\022o\n" - + "\025agent_creation_config\030\001 \001(\0132P.google.cloud.discoveryengine.v1beta." - + "Engine.ChatEngineConfig.AgentCreationConfig\022 \n" - + "\030dialogflow_agent_to_link\030\002 \001(\t\032p\n" + + "\025agent_creation_config\030\001 \001(\0132P.google." + + "cloud.discoveryengine.v1beta.Engine.ChatEngineConfig.AgentCreationConfig\022 \n" + + "\030dialogflow_agent_to_link\030\002 \001(\t\022\037\n" + + "\022allow_cross_region\030\003 \001(\010B\003\340A\001\032p\n" + "\023AgentCreationConfig\022\020\n" + "\010business\030\001 \001(\t\022\035\n" + "\025default_language_code\030\002 \001(\t\022\026\n" + "\ttime_zone\030\003 \001(\tB\003\340A\002\022\020\n" + "\010location\030\004 \001(\t\032$\n" + "\014CommonConfig\022\024\n" - + "\014company_name\030\001 \001(\t\032.\n" + + "\014company_name\030\001 \001(\t\032\333\003\n" + + "\024KnowledgeGraphConfig\022$\n" + + "\034enable_cloud_knowledge_graph\030\001 \001(\010\022#\n" + + "\033cloud_knowledge_graph_types\030\002 \003(\t\022&\n" + + "\036enable_private_knowledge_graph\030\003 \001(\010\022%\n" + + "\035private_knowledge_graph_types\030\004 \003(\t\022k\n" + + "\016feature_config\030\005 \001(\0132N.google.cloud.discoverye" + + "ngine.v1beta.Engine.KnowledgeGraphConfig.FeatureConfigB\003\340A\001\032\273\001\n\r" + + "FeatureConfig\022.\n" + + "&disable_private_kg_query_understanding\030\001 \001(\010\022%\n" + + "\035disable_private_kg_enrichment\030\002 \001(\010\022(\n" + + " disable_private_kg_auto_complete\030\003 \001(\010\022)\n" + + "!disable_private_kg_query_ui_chips\030\004 \001(\010\032.\n" + "\022ChatEngineMetadata\022\030\n" - + "\020dialogflow_agent\030\001 \001(\t:}\352Az\n" - + "%discoveryengine.googleapis.com/Engine\022Qprojects/{project}/locations/{locatio" - + "n}/collections/{collection}/engines/{engine}B\017\n\r" + + "\020dialogflow_agent\030\001 \001(\t\032i\n\r" + + "FeaturesEntry\022\013\n" + + "\003key\030\001 \001(\t\022G\n" + + "\005value\030\002 \001(\01628.google.cloud.di" + + "scoveryengine.v1beta.Engine.FeatureState:\0028\001\032k\n" + + "\021ModelConfigsEntry\022\013\n" + + "\003key\030\001 \001(\t\022E\n" + + "\005value\030\002" + + " \001(\01626.google.cloud.discoveryengine.v1beta.Engine.ModelState:\0028\001\032:\n" + + "\030ConnectorTenantInfoEntry\022\013\n" + + "\003key\030\001 \001(\t\022\r\n" + + "\005value\030\002 \001(\t:\0028\001\":\n" + + "\007AppType\022\030\n" + + "\024APP_TYPE_UNSPECIFIED\020\000\022\025\n" + + "\021APP_TYPE_INTRANET\020\001\"Z\n" + + "\014FeatureState\022\035\n" + + "\031FEATURE_STATE_UNSPECIFIED\020\000\022\024\n" + + "\020FEATURE_STATE_ON\020\001\022\025\n" + + "\021FEATURE_STATE_OFF\020\002\"w\n" + + "\033ConfigurableBillingApproach\022-\n" + + ")CONFIGURABLE_BILLING_APPROACH_UNSPECIFIED\020\000\022)\n" + + "%CONFIGURABLE_BILLING_APPROACH_ENABLED\020\001\"P\n\n" + + "ModelState\022\033\n" + + "\027MODEL_STATE_UNSPECIFIED\020\000\022\021\n\r" + + "MODEL_ENABLED\020\001\022\022\n" + + "\016MODEL_DISABLED\020\002\"\306\001\n" + + "\032MarketplaceAgentVisibility\022,\n" + + "(MARKETPLACE_AGENT_VISIBILITY_UNSPECIFIED\020\000\022\036\n" + + "\032SHOW_AVAILABLE_AGENTS_ONLY\020\001\022\"\n" + + "\036SHOW_AGENTS_ALREADY_INTEGRATED\020\002\022!\n" + + "\035SHOW_AGENTS_ALREADY_PURCHASED\020\003\022\023\n" + + "\017SHOW_ALL_AGENTS\020\004:}\352Az\n" + + "%discoveryengine.googleapis.com/Engine\022Qprojects/{project}/locati" + + "ons/{location}/collections/{collection}/engines/{engine}B\017\n\r" + "engine_configB\021\n" + "\017engine_metadataB\222\002\n" - + "\'com.google.cloud.discoveryengine.v1betaB\013EngineProtoP\001ZQcloud.google.com/go" - + "/discoveryengine/apiv1beta/discoveryengi" - + "nepb;discoveryenginepb\242\002\017DISCOVERYENGINE" - + "\252\002#Google.Cloud.DiscoveryEngine.V1Beta\312\002" - + "#Google\\Cloud\\DiscoveryEngine\\V1beta\352\002&G" - + "oogle::Cloud::DiscoveryEngine::V1betab\006proto3" + + "\'com.google.cloud.discoveryengine.v1betaB\013EngineProtoP\001ZQcloud.g" + + "oogle.com/go/discoveryengine/apiv1beta/d" + + "iscoveryenginepb;discoveryenginepb\242\002\017DIS" + + "COVERYENGINE\252\002#Google.Cloud.DiscoveryEng" + + "ine.V1Beta\312\002#Google\\Cloud\\DiscoveryEngin" + + "e\\V1beta\352\002&Google::Cloud::DiscoveryEngine::V1betab\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -133,7 +275,10 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.Descriptors.FileDescriptor[] { com.google.api.FieldBehaviorProto.getDescriptor(), com.google.api.ResourceProto.getDescriptor(), + com.google.cloud.discoveryengine.v1beta.AgentGatewaySettingProto.getDescriptor(), + com.google.cloud.discoveryengine.v1beta.CmekConfigServiceProto.getDescriptor(), com.google.cloud.discoveryengine.v1beta.CommonProto.getDescriptor(), + com.google.cloud.discoveryengine.v1beta.LoggingProto.getDescriptor(), com.google.protobuf.TimestampProto.getDescriptor(), }); internal_static_google_cloud_discoveryengine_v1beta_Engine_descriptor = @@ -144,6 +289,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "ChatEngineConfig", "SearchEngineConfig", + "MediaRecommendationEngineConfig", "ChatEngineMetadata", "Name", "DisplayName", @@ -153,7 +299,18 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "SolutionType", "IndustryVertical", "CommonConfig", + "KnowledgeGraphConfig", + "AppType", "DisableAnalytics", + "Features", + "CmekConfig", + "ConfigurableBillingApproach", + "ModelConfigs", + "ObservabilityConfig", + "ConnectorTenantInfo", + "AgentGatewaySetting", + "MarketplaceAgentVisibility", + "ProcurementContactEmails", "EngineConfig", "EngineMetadata", }); @@ -163,15 +320,63 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_cloud_discoveryengine_v1beta_Engine_SearchEngineConfig_descriptor, new java.lang.String[] { - "SearchTier", "SearchAddOns", + "SearchTier", "RequiredSubscriptionTier", "SearchAddOns", }); - internal_static_google_cloud_discoveryengine_v1beta_Engine_ChatEngineConfig_descriptor = + internal_static_google_cloud_discoveryengine_v1beta_Engine_MediaRecommendationEngineConfig_descriptor = internal_static_google_cloud_discoveryengine_v1beta_Engine_descriptor.getNestedType(1); + internal_static_google_cloud_discoveryengine_v1beta_Engine_MediaRecommendationEngineConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1beta_Engine_MediaRecommendationEngineConfig_descriptor, + new java.lang.String[] { + "Type", + "OptimizationObjective", + "OptimizationObjectiveConfig", + "TrainingState", + "EngineFeaturesConfig", + }); + internal_static_google_cloud_discoveryengine_v1beta_Engine_MediaRecommendationEngineConfig_OptimizationObjectiveConfig_descriptor = + internal_static_google_cloud_discoveryengine_v1beta_Engine_MediaRecommendationEngineConfig_descriptor + .getNestedType(0); + internal_static_google_cloud_discoveryengine_v1beta_Engine_MediaRecommendationEngineConfig_OptimizationObjectiveConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1beta_Engine_MediaRecommendationEngineConfig_OptimizationObjectiveConfig_descriptor, + new java.lang.String[] { + "TargetField", "TargetFieldValueFloat", + }); + internal_static_google_cloud_discoveryengine_v1beta_Engine_MediaRecommendationEngineConfig_EngineFeaturesConfig_descriptor = + internal_static_google_cloud_discoveryengine_v1beta_Engine_MediaRecommendationEngineConfig_descriptor + .getNestedType(1); + internal_static_google_cloud_discoveryengine_v1beta_Engine_MediaRecommendationEngineConfig_EngineFeaturesConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1beta_Engine_MediaRecommendationEngineConfig_EngineFeaturesConfig_descriptor, + new java.lang.String[] { + "RecommendedForYouConfig", "MostPopularConfig", "TypeDedicatedConfig", + }); + internal_static_google_cloud_discoveryengine_v1beta_Engine_MediaRecommendationEngineConfig_RecommendedForYouFeatureConfig_descriptor = + internal_static_google_cloud_discoveryengine_v1beta_Engine_MediaRecommendationEngineConfig_descriptor + .getNestedType(2); + internal_static_google_cloud_discoveryengine_v1beta_Engine_MediaRecommendationEngineConfig_RecommendedForYouFeatureConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1beta_Engine_MediaRecommendationEngineConfig_RecommendedForYouFeatureConfig_descriptor, + new java.lang.String[] { + "ContextEventType", + }); + internal_static_google_cloud_discoveryengine_v1beta_Engine_MediaRecommendationEngineConfig_MostPopularFeatureConfig_descriptor = + internal_static_google_cloud_discoveryengine_v1beta_Engine_MediaRecommendationEngineConfig_descriptor + .getNestedType(3); + internal_static_google_cloud_discoveryengine_v1beta_Engine_MediaRecommendationEngineConfig_MostPopularFeatureConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1beta_Engine_MediaRecommendationEngineConfig_MostPopularFeatureConfig_descriptor, + new java.lang.String[] { + "TimeWindowDays", + }); + internal_static_google_cloud_discoveryengine_v1beta_Engine_ChatEngineConfig_descriptor = + internal_static_google_cloud_discoveryengine_v1beta_Engine_descriptor.getNestedType(2); internal_static_google_cloud_discoveryengine_v1beta_Engine_ChatEngineConfig_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_cloud_discoveryengine_v1beta_Engine_ChatEngineConfig_descriptor, new java.lang.String[] { - "AgentCreationConfig", "DialogflowAgentToLink", + "AgentCreationConfig", "DialogflowAgentToLink", "AllowCrossRegion", }); internal_static_google_cloud_discoveryengine_v1beta_Engine_ChatEngineConfig_AgentCreationConfig_descriptor = internal_static_google_cloud_discoveryengine_v1beta_Engine_ChatEngineConfig_descriptor @@ -183,25 +388,76 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Business", "DefaultLanguageCode", "TimeZone", "Location", }); internal_static_google_cloud_discoveryengine_v1beta_Engine_CommonConfig_descriptor = - internal_static_google_cloud_discoveryengine_v1beta_Engine_descriptor.getNestedType(2); + internal_static_google_cloud_discoveryengine_v1beta_Engine_descriptor.getNestedType(3); internal_static_google_cloud_discoveryengine_v1beta_Engine_CommonConfig_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_cloud_discoveryengine_v1beta_Engine_CommonConfig_descriptor, new java.lang.String[] { "CompanyName", }); + internal_static_google_cloud_discoveryengine_v1beta_Engine_KnowledgeGraphConfig_descriptor = + internal_static_google_cloud_discoveryengine_v1beta_Engine_descriptor.getNestedType(4); + internal_static_google_cloud_discoveryengine_v1beta_Engine_KnowledgeGraphConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1beta_Engine_KnowledgeGraphConfig_descriptor, + new java.lang.String[] { + "EnableCloudKnowledgeGraph", + "CloudKnowledgeGraphTypes", + "EnablePrivateKnowledgeGraph", + "PrivateKnowledgeGraphTypes", + "FeatureConfig", + }); + internal_static_google_cloud_discoveryengine_v1beta_Engine_KnowledgeGraphConfig_FeatureConfig_descriptor = + internal_static_google_cloud_discoveryengine_v1beta_Engine_KnowledgeGraphConfig_descriptor + .getNestedType(0); + internal_static_google_cloud_discoveryengine_v1beta_Engine_KnowledgeGraphConfig_FeatureConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1beta_Engine_KnowledgeGraphConfig_FeatureConfig_descriptor, + new java.lang.String[] { + "DisablePrivateKgQueryUnderstanding", + "DisablePrivateKgEnrichment", + "DisablePrivateKgAutoComplete", + "DisablePrivateKgQueryUiChips", + }); internal_static_google_cloud_discoveryengine_v1beta_Engine_ChatEngineMetadata_descriptor = - internal_static_google_cloud_discoveryengine_v1beta_Engine_descriptor.getNestedType(3); + internal_static_google_cloud_discoveryengine_v1beta_Engine_descriptor.getNestedType(5); internal_static_google_cloud_discoveryengine_v1beta_Engine_ChatEngineMetadata_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_cloud_discoveryengine_v1beta_Engine_ChatEngineMetadata_descriptor, new java.lang.String[] { "DialogflowAgent", }); + internal_static_google_cloud_discoveryengine_v1beta_Engine_FeaturesEntry_descriptor = + internal_static_google_cloud_discoveryengine_v1beta_Engine_descriptor.getNestedType(6); + internal_static_google_cloud_discoveryengine_v1beta_Engine_FeaturesEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1beta_Engine_FeaturesEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + internal_static_google_cloud_discoveryengine_v1beta_Engine_ModelConfigsEntry_descriptor = + internal_static_google_cloud_discoveryengine_v1beta_Engine_descriptor.getNestedType(7); + internal_static_google_cloud_discoveryengine_v1beta_Engine_ModelConfigsEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1beta_Engine_ModelConfigsEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + internal_static_google_cloud_discoveryengine_v1beta_Engine_ConnectorTenantInfoEntry_descriptor = + internal_static_google_cloud_discoveryengine_v1beta_Engine_descriptor.getNestedType(8); + internal_static_google_cloud_discoveryengine_v1beta_Engine_ConnectorTenantInfoEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1beta_Engine_ConnectorTenantInfoEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); descriptor.resolveAllFeaturesImmutable(); com.google.api.FieldBehaviorProto.getDescriptor(); com.google.api.ResourceProto.getDescriptor(); + com.google.cloud.discoveryengine.v1beta.AgentGatewaySettingProto.getDescriptor(); + com.google.cloud.discoveryengine.v1beta.CmekConfigServiceProto.getDescriptor(); com.google.cloud.discoveryengine.v1beta.CommonProto.getDescriptor(); + com.google.cloud.discoveryengine.v1beta.LoggingProto.getDescriptor(); com.google.protobuf.TimestampProto.getDescriptor(); com.google.protobuf.ExtensionRegistry registry = com.google.protobuf.ExtensionRegistry.newInstance(); diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/EngineServiceProto.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/EngineServiceProto.java index 348ff077ee2b..76e170ece978 100644 --- a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/EngineServiceProto.java +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/EngineServiceProto.java @@ -107,101 +107,114 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "proto\032\027google/api/client.proto\032\037google/a" + "pi/field_behavior.proto\032\031google/api/reso" + "urce.proto\0320google/cloud/discoveryengine" - + "/v1beta/engine.proto\032#google/longrunning" - + "/operations.proto\032\033google/protobuf/empty" - + ".proto\032 google/protobuf/field_mask.proto" - + "\032\037google/protobuf/timestamp.proto\"\262\001\n\023Cr" - + "eateEngineRequest\022A\n\006parent\030\001 \001(\tB1\340A\002\372A" - + "+\n)discoveryengine.googleapis.com/Collec" - + "tion\022@\n\006engine\030\002 \001(\0132+.google.cloud.disc" - + "overyengine.v1beta.EngineB\003\340A\002\022\026\n\tengine" - + "_id\030\003 \001(\tB\003\340A\002\"x\n\024CreateEngineMetadata\022/" - + "\n\013create_time\030\001 \001(\0132\032.google.protobuf.Ti" - + "mestamp\022/\n\013update_time\030\002 \001(\0132\032.google.pr" - + "otobuf.Timestamp\"R\n\023DeleteEngineRequest\022" - + ";\n\004name\030\001 \001(\tB-\340A\002\372A\'\n%discoveryengine.g" - + "oogleapis.com/Engine\"x\n\024DeleteEngineMeta" - + "data\022/\n\013create_time\030\001 \001(\0132\032.google.proto" - + "buf.Timestamp\022/\n\013update_time\030\002 \001(\0132\032.goo" - + "gle.protobuf.Timestamp\"O\n\020GetEngineReque" - + "st\022;\n\004name\030\001 \001(\tB-\340A\002\372A\'\n%discoveryengin" - + "e.googleapis.com/Engine\"\235\001\n\022ListEnginesR" - + "equest\022A\n\006parent\030\001 \001(\tB1\340A\002\372A+\n)discover" - + "yengine.googleapis.com/Collection\022\026\n\tpag" - + "e_size\030\002 \001(\005B\003\340A\001\022\027\n\npage_token\030\003 \001(\tB\003\340" - + "A\001\022\023\n\006filter\030\004 \001(\tB\003\340A\001\"l\n\023ListEnginesRe" - + "sponse\022<\n\007engines\030\001 \003(\0132+.google.cloud.d" - + "iscoveryengine.v1beta.Engine\022\027\n\017next_pag" - + "e_token\030\002 \001(\t\"\210\001\n\023UpdateEngineRequest\022@\n" - + "\006engine\030\001 \001(\0132+.google.cloud.discoveryen" - + "gine.v1beta.EngineB\003\340A\002\022/\n\013update_mask\030\002" - + " \001(\0132\032.google.protobuf.FieldMask\"Q\n\022Paus" - + "eEngineRequest\022;\n\004name\030\001 \001(\tB-\340A\002\372A\'\n%di" - + "scoveryengine.googleapis.com/Engine\"R\n\023R" - + "esumeEngineRequest\022;\n\004name\030\001 \001(\tB-\340A\002\372A\'" - + "\n%discoveryengine.googleapis.com/Engine\"" - + "P\n\021TuneEngineRequest\022;\n\004name\030\001 \001(\tB-\340A\002\372" - + "A\'\n%discoveryengine.googleapis.com/Engin" - + "e\"S\n\022TuneEngineMetadata\022=\n\006engine\030\001 \001(\tB" - + "-\340A\002\372A\'\n%discoveryengine.googleapis.com/" - + "Engine\"\024\n\022TuneEngineResponse2\247\017\n\rEngineS" - + "ervice\022\272\002\n\014CreateEngine\0228.google.cloud.d" - + "iscoveryengine.v1beta.CreateEngineReques" - + "t\032\035.google.longrunning.Operation\"\320\001\312Af\n*" - + "google.cloud.discoveryengine.v1beta.Engi" - + "ne\0228google.cloud.discoveryengine.v1beta." - + "CreateEngineMetadata\332A\027parent,engine,eng" - + "ine_id\202\323\344\223\002G\"=/v1beta/{parent=projects/*" - + "/locations/*/collections/*}/engines:\006eng" - + "ine\022\212\002\n\014DeleteEngine\0228.google.cloud.disc" - + "overyengine.v1beta.DeleteEngineRequest\032\035" - + ".google.longrunning.Operation\"\240\001\312AQ\n\025goo" - + "gle.protobuf.Empty\0228google.cloud.discove" - + "ryengine.v1beta.DeleteEngineMetadata\332A\004n" - + "ame\202\323\344\223\002?*=/v1beta/{name=projects/*/loca" - + "tions/*/collections/*/engines/*}\022\340\001\n\014Upd" - + "ateEngine\0228.google.cloud.discoveryengine" - + ".v1beta.UpdateEngineRequest\032+.google.clo" - + "ud.discoveryengine.v1beta.Engine\"i\332A\022eng" - + "ine,update_mask\202\323\344\223\002N2D/v1beta/{engine.n" - + "ame=projects/*/locations/*/collections/*" - + "/engines/*}:\006engine\022\275\001\n\tGetEngine\0225.goog" - + "le.cloud.discoveryengine.v1beta.GetEngin" - + "eRequest\032+.google.cloud.discoveryengine." - + "v1beta.Engine\"L\332A\004name\202\323\344\223\002?\022=/v1beta/{n" - + "ame=projects/*/locations/*/collections/*" - + "/engines/*}\022\320\001\n\013ListEngines\0227.google.clo" - + "ud.discoveryengine.v1beta.ListEnginesReq" - + "uest\0328.google.cloud.discoveryengine.v1be" - + "ta.ListEnginesResponse\"N\332A\006parent\202\323\344\223\002?\022" - + "=/v1beta/{parent=projects/*/locations/*/" - + "collections/*}/engines\022\312\001\n\013PauseEngine\0227" - + ".google.cloud.discoveryengine.v1beta.Pau" - + "seEngineRequest\032+.google.cloud.discovery" - + "engine.v1beta.Engine\"U\332A\004name\202\323\344\223\002H\"C/v1" - + "beta/{name=projects/*/locations/*/collec" - + "tions/*/engines/*}:pause:\001*\022\315\001\n\014ResumeEn" - + "gine\0228.google.cloud.discoveryengine.v1be" - + "ta.ResumeEngineRequest\032+.google.cloud.di" - + "scoveryengine.v1beta.Engine\"V\332A\004name\202\323\344\223" - + "\002I\"D/v1beta/{name=projects/*/locations/*" - + "/collections/*/engines/*}:resume:\001*\022\344\001\n\n" - + "TuneEngine\0226.google.cloud.discoveryengin" - + "e.v1beta.TuneEngineRequest\032\035.google.long" - + "running.Operation\"\177\312A(\n\022TuneEngineRespon" - + "se\022\022TuneEngineMetadata\332A\004name\202\323\344\223\002G\"B/v1" - + "beta/{name=projects/*/locations/*/collec" - + "tions/*/engines/*}:tune:\001*\032R\312A\036discovery" - + "engine.googleapis.com\322A.https://www.goog" - + "leapis.com/auth/cloud-platformB\231\002\n\'com.g" - + "oogle.cloud.discoveryengine.v1betaB\022Engi" - + "neServiceProtoP\001ZQcloud.google.com/go/di" - + "scoveryengine/apiv1beta/discoveryenginep" - + "b;discoveryenginepb\242\002\017DISCOVERYENGINE\252\002#" - + "Google.Cloud.DiscoveryEngine.V1Beta\312\002#Go" - + "ogle\\Cloud\\DiscoveryEngine\\V1beta\352\002&Goog" - + "le::Cloud::DiscoveryEngine::V1betab\006prot" - + "o3" + + "/v1beta/engine.proto\032\036google/iam/v1/iam_" + + "policy.proto\032\032google/iam/v1/policy.proto" + + "\032#google/longrunning/operations.proto\032\033g" + + "oogle/protobuf/empty.proto\032 google/proto" + + "buf/field_mask.proto\032\037google/protobuf/ti" + + "mestamp.proto\"\262\001\n\023CreateEngineRequest\022A\n" + + "\006parent\030\001 \001(\tB1\340A\002\372A+\n)discoveryengine.g" + + "oogleapis.com/Collection\022@\n\006engine\030\002 \001(\013" + + "2+.google.cloud.discoveryengine.v1beta.E" + + "ngineB\003\340A\002\022\026\n\tengine_id\030\003 \001(\tB\003\340A\002\"x\n\024Cr" + + "eateEngineMetadata\022/\n\013create_time\030\001 \001(\0132" + + "\032.google.protobuf.Timestamp\022/\n\013update_ti" + + "me\030\002 \001(\0132\032.google.protobuf.Timestamp\"R\n\023" + + "DeleteEngineRequest\022;\n\004name\030\001 \001(\tB-\340A\002\372A" + + "\'\n%discoveryengine.googleapis.com/Engine" + + "\"x\n\024DeleteEngineMetadata\022/\n\013create_time\030" + + "\001 \001(\0132\032.google.protobuf.Timestamp\022/\n\013upd" + + "ate_time\030\002 \001(\0132\032.google.protobuf.Timesta" + + "mp\"O\n\020GetEngineRequest\022;\n\004name\030\001 \001(\tB-\340A" + + "\002\372A\'\n%discoveryengine.googleapis.com/Eng" + + "ine\"\235\001\n\022ListEnginesRequest\022A\n\006parent\030\001 \001" + + "(\tB1\340A\002\372A+\n)discoveryengine.googleapis.c" + + "om/Collection\022\026\n\tpage_size\030\002 \001(\005B\003\340A\001\022\027\n" + + "\npage_token\030\003 \001(\tB\003\340A\001\022\023\n\006filter\030\004 \001(\tB\003" + + "\340A\001\"l\n\023ListEnginesResponse\022<\n\007engines\030\001 " + + "\003(\0132+.google.cloud.discoveryengine.v1bet" + + "a.Engine\022\027\n\017next_page_token\030\002 \001(\t\"\210\001\n\023Up" + + "dateEngineRequest\022@\n\006engine\030\001 \001(\0132+.goog" + + "le.cloud.discoveryengine.v1beta.EngineB\003" + + "\340A\002\022/\n\013update_mask\030\002 \001(\0132\032.google.protob" + + "uf.FieldMask\"Q\n\022PauseEngineRequest\022;\n\004na" + + "me\030\001 \001(\tB-\340A\002\372A\'\n%discoveryengine.google" + + "apis.com/Engine\"R\n\023ResumeEngineRequest\022;" + + "\n\004name\030\001 \001(\tB-\340A\002\372A\'\n%discoveryengine.go" + + "ogleapis.com/Engine\"P\n\021TuneEngineRequest" + + "\022;\n\004name\030\001 \001(\tB-\340A\002\372A\'\n%discoveryengine." + + "googleapis.com/Engine\"S\n\022TuneEngineMetad" + + "ata\022=\n\006engine\030\001 \001(\tB-\340A\002\372A\'\n%discoveryen" + + "gine.googleapis.com/Engine\"\024\n\022TuneEngine" + + "Response2\215\023\n\rEngineService\022\272\002\n\014CreateEng" + + "ine\0228.google.cloud.discoveryengine.v1bet" + + "a.CreateEngineRequest\032\035.google.longrunni" + + "ng.Operation\"\320\001\312Af\n*google.cloud.discove" + + "ryengine.v1beta.Engine\0228google.cloud.dis" + + "coveryengine.v1beta.CreateEngineMetadata" + + "\332A\027parent,engine,engine_id\202\323\344\223\002G\"=/v1bet" + + "a/{parent=projects/*/locations/*/collect" + + "ions/*}/engines:\006engine\022\212\002\n\014DeleteEngine" + + "\0228.google.cloud.discoveryengine.v1beta.D" + + "eleteEngineRequest\032\035.google.longrunning." + + "Operation\"\240\001\312AQ\n\025google.protobuf.Empty\0228" + + "google.cloud.discoveryengine.v1beta.Dele" + + "teEngineMetadata\332A\004name\202\323\344\223\002?*=/v1beta/{" + + "name=projects/*/locations/*/collections/" + + "*/engines/*}\022\340\001\n\014UpdateEngine\0228.google.c" + + "loud.discoveryengine.v1beta.UpdateEngine" + + "Request\032+.google.cloud.discoveryengine.v" + + "1beta.Engine\"i\332A\022engine,update_mask\202\323\344\223\002" + + "N2D/v1beta/{engine.name=projects/*/locat" + + "ions/*/collections/*/engines/*}:\006engine\022" + + "\275\001\n\tGetEngine\0225.google.cloud.discoveryen" + + "gine.v1beta.GetEngineRequest\032+.google.cl" + + "oud.discoveryengine.v1beta.Engine\"L\332A\004na" + + "me\202\323\344\223\002?\022=/v1beta/{name=projects/*/locat" + + "ions/*/collections/*/engines/*}\022\320\001\n\013List" + + "Engines\0227.google.cloud.discoveryengine.v" + + "1beta.ListEnginesRequest\0328.google.cloud." + + "discoveryengine.v1beta.ListEnginesRespon" + + "se\"N\332A\006parent\202\323\344\223\002?\022=/v1beta/{parent=pro" + + "jects/*/locations/*/collections/*}/engin" + + "es\022\312\001\n\013PauseEngine\0227.google.cloud.discov" + + "eryengine.v1beta.PauseEngineRequest\032+.go" + + "ogle.cloud.discoveryengine.v1beta.Engine" + + "\"U\332A\004name\202\323\344\223\002H\"C/v1beta/{name=projects/" + + "*/locations/*/collections/*/engines/*}:p" + + "ause:\001*\022\315\001\n\014ResumeEngine\0228.google.cloud." + + "discoveryengine.v1beta.ResumeEngineReque" + + "st\032+.google.cloud.discoveryengine.v1beta" + + ".Engine\"V\332A\004name\202\323\344\223\002I\"D/v1beta/{name=pr" + + "ojects/*/locations/*/collections/*/engin" + + "es/*}:resume:\001*\022\344\001\n\nTuneEngine\0226.google." + + "cloud.discoveryengine.v1beta.TuneEngineR" + + "equest\032\035.google.longrunning.Operation\"\177\312" + + "A(\n\022TuneEngineResponse\022\022TuneEngineMetada" + + "ta\332A\004name\202\323\344\223\002G\"B/v1beta/{name=projects/" + + "*/locations/*/collections/*/engines/*}:t" + + "une:\001*\022\254\001\n\014GetIamPolicy\022\".google.iam.v1." + + "GetIamPolicyRequest\032\025.google.iam.v1.Poli" + + "cy\"a\332A\010resource\202\323\344\223\002P\022N/v1beta/{resource" + + "=projects/*/locations/*/collections/*/en" + + "gines/*}:getIamPolicy\022\266\001\n\014SetIamPolicy\022\"" + + ".google.iam.v1.SetIamPolicyRequest\032\025.goo" + + "gle.iam.v1.Policy\"k\332A\017resource,policy\202\323\344" + + "\223\002S\"N/v1beta/{resource=projects/*/locati" + + "ons/*/collections/*/engines/*}:setIamPol" + + "icy:\001*\032\317\001\312A\036discoveryengine.googleapis.c" + + "om\322A\252\001https://www.googleapis.com/auth/cl" + + "oud-platform,https://www.googleapis.com/" + + "auth/discoveryengine.readwrite,https://w" + + "ww.googleapis.com/auth/discoveryengine.s" + + "erving.readwriteB\231\002\n\'com.google.cloud.di" + + "scoveryengine.v1betaB\022EngineServiceProto" + + "P\001ZQcloud.google.com/go/discoveryengine/" + + "apiv1beta/discoveryenginepb;discoveryeng" + + "inepb\242\002\017DISCOVERYENGINE\252\002#Google.Cloud.D" + + "iscoveryEngine.V1Beta\312\002#Google\\Cloud\\Dis" + + "coveryEngine\\V1beta\352\002&Google::Cloud::Dis" + + "coveryEngine::V1betab\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -212,6 +225,8 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.api.FieldBehaviorProto.getDescriptor(), com.google.api.ResourceProto.getDescriptor(), com.google.cloud.discoveryengine.v1beta.EngineProto.getDescriptor(), + com.google.iam.v1.IamPolicyProto.getDescriptor(), + com.google.iam.v1.PolicyProto.getDescriptor(), com.google.longrunning.OperationsProto.getDescriptor(), com.google.protobuf.EmptyProto.getDescriptor(), com.google.protobuf.FieldMaskProto.getDescriptor(), @@ -325,6 +340,8 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.api.FieldBehaviorProto.getDescriptor(); com.google.api.ResourceProto.getDescriptor(); com.google.cloud.discoveryengine.v1beta.EngineProto.getDescriptor(); + com.google.iam.v1.IamPolicyProto.getDescriptor(); + com.google.iam.v1.PolicyProto.getDescriptor(); com.google.longrunning.OperationsProto.getDescriptor(); com.google.protobuf.EmptyProto.getDescriptor(); com.google.protobuf.FieldMaskProto.getDescriptor(); diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/Evaluation.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/Evaluation.java index ea5393115989..5813c8c75df8 100644 --- a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/Evaluation.java +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/Evaluation.java @@ -375,11 +375,11 @@ public interface EvaluationSpecOrBuilder * * *
            -     * Required. The specification of the query set.
            +     * Optional. The specification of the query set.
                  * 
            * * - * .google.cloud.discoveryengine.v1beta.Evaluation.EvaluationSpec.QuerySetSpec query_set_spec = 1 [(.google.api.field_behavior) = REQUIRED]; + * .google.cloud.discoveryengine.v1beta.Evaluation.EvaluationSpec.QuerySetSpec query_set_spec = 1 [(.google.api.field_behavior) = OPTIONAL]; * * * @return Whether the querySetSpec field is set. @@ -390,11 +390,11 @@ public interface EvaluationSpecOrBuilder * * *
            -     * Required. The specification of the query set.
            +     * Optional. The specification of the query set.
                  * 
            * * - * .google.cloud.discoveryengine.v1beta.Evaluation.EvaluationSpec.QuerySetSpec query_set_spec = 1 [(.google.api.field_behavior) = REQUIRED]; + * .google.cloud.discoveryengine.v1beta.Evaluation.EvaluationSpec.QuerySetSpec query_set_spec = 1 [(.google.api.field_behavior) = OPTIONAL]; * * * @return The querySetSpec. @@ -406,11 +406,11 @@ public interface EvaluationSpecOrBuilder * * *
            -     * Required. The specification of the query set.
            +     * Optional. The specification of the query set.
                  * 
            * * - * .google.cloud.discoveryengine.v1beta.Evaluation.EvaluationSpec.QuerySetSpec query_set_spec = 1 [(.google.api.field_behavior) = REQUIRED]; + * .google.cloud.discoveryengine.v1beta.Evaluation.EvaluationSpec.QuerySetSpec query_set_spec = 1 [(.google.api.field_behavior) = OPTIONAL]; * */ com.google.cloud.discoveryengine.v1beta.Evaluation.EvaluationSpec.QuerySetSpecOrBuilder @@ -476,14 +476,14 @@ public interface QuerySetSpecOrBuilder * * *
            -       * Required. The full resource name of the
            +       * Optional. The full resource name of the
                    * [SampleQuerySet][google.cloud.discoveryengine.v1beta.SampleQuerySet]
                    * used for the evaluation, in the format of
                    * `projects/{project}/locations/{location}/sampleQuerySets/{sampleQuerySet}`.
                    * 
            * * - * string sample_query_set = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * string sample_query_set = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } * * * @return The sampleQuerySet. @@ -494,14 +494,14 @@ public interface QuerySetSpecOrBuilder * * *
            -       * Required. The full resource name of the
            +       * Optional. The full resource name of the
                    * [SampleQuerySet][google.cloud.discoveryengine.v1beta.SampleQuerySet]
                    * used for the evaluation, in the format of
                    * `projects/{project}/locations/{location}/sampleQuerySets/{sampleQuerySet}`.
                    * 
            * * - * string sample_query_set = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * string sample_query_set = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } * * * @return The bytes for sampleQuerySet. @@ -570,14 +570,14 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * *
            -       * Required. The full resource name of the
            +       * Optional. The full resource name of the
                    * [SampleQuerySet][google.cloud.discoveryengine.v1beta.SampleQuerySet]
                    * used for the evaluation, in the format of
                    * `projects/{project}/locations/{location}/sampleQuerySets/{sampleQuerySet}`.
                    * 
            * * - * string sample_query_set = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * string sample_query_set = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } * * * @return The sampleQuerySet. @@ -599,14 +599,14 @@ public java.lang.String getSampleQuerySet() { * * *
            -       * Required. The full resource name of the
            +       * Optional. The full resource name of the
                    * [SampleQuerySet][google.cloud.discoveryengine.v1beta.SampleQuerySet]
                    * used for the evaluation, in the format of
                    * `projects/{project}/locations/{location}/sampleQuerySets/{sampleQuerySet}`.
                    * 
            * * - * string sample_query_set = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * string sample_query_set = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } * * * @return The bytes for sampleQuerySet. @@ -971,14 +971,14 @@ public Builder mergeFrom( * * *
            -         * Required. The full resource name of the
            +         * Optional. The full resource name of the
                      * [SampleQuerySet][google.cloud.discoveryengine.v1beta.SampleQuerySet]
                      * used for the evaluation, in the format of
                      * `projects/{project}/locations/{location}/sampleQuerySets/{sampleQuerySet}`.
                      * 
            * * - * string sample_query_set = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * string sample_query_set = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } * * * @return The sampleQuerySet. @@ -999,14 +999,14 @@ public java.lang.String getSampleQuerySet() { * * *
            -         * Required. The full resource name of the
            +         * Optional. The full resource name of the
                      * [SampleQuerySet][google.cloud.discoveryengine.v1beta.SampleQuerySet]
                      * used for the evaluation, in the format of
                      * `projects/{project}/locations/{location}/sampleQuerySets/{sampleQuerySet}`.
                      * 
            * * - * string sample_query_set = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * string sample_query_set = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } * * * @return The bytes for sampleQuerySet. @@ -1027,14 +1027,14 @@ public com.google.protobuf.ByteString getSampleQuerySetBytes() { * * *
            -         * Required. The full resource name of the
            +         * Optional. The full resource name of the
                      * [SampleQuerySet][google.cloud.discoveryengine.v1beta.SampleQuerySet]
                      * used for the evaluation, in the format of
                      * `projects/{project}/locations/{location}/sampleQuerySets/{sampleQuerySet}`.
                      * 
            * * - * string sample_query_set = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * string sample_query_set = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } * * * @param value The sampleQuerySet to set. @@ -1054,14 +1054,14 @@ public Builder setSampleQuerySet(java.lang.String value) { * * *
            -         * Required. The full resource name of the
            +         * Optional. The full resource name of the
                      * [SampleQuerySet][google.cloud.discoveryengine.v1beta.SampleQuerySet]
                      * used for the evaluation, in the format of
                      * `projects/{project}/locations/{location}/sampleQuerySets/{sampleQuerySet}`.
                      * 
            * * - * string sample_query_set = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * string sample_query_set = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } * * * @return This builder for chaining. @@ -1077,14 +1077,14 @@ public Builder clearSampleQuerySet() { * * *
            -         * Required. The full resource name of the
            +         * Optional. The full resource name of the
                      * [SampleQuerySet][google.cloud.discoveryengine.v1beta.SampleQuerySet]
                      * used for the evaluation, in the format of
                      * `projects/{project}/locations/{location}/sampleQuerySets/{sampleQuerySet}`.
                      * 
            * * - * string sample_query_set = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * string sample_query_set = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } * * * @param value The bytes for sampleQuerySet to set. @@ -1308,11 +1308,11 @@ public com.google.cloud.discoveryengine.v1beta.SearchRequest getSearchRequest() * * *
            -     * Required. The specification of the query set.
            +     * Optional. The specification of the query set.
                  * 
            * * - * .google.cloud.discoveryengine.v1beta.Evaluation.EvaluationSpec.QuerySetSpec query_set_spec = 1 [(.google.api.field_behavior) = REQUIRED]; + * .google.cloud.discoveryengine.v1beta.Evaluation.EvaluationSpec.QuerySetSpec query_set_spec = 1 [(.google.api.field_behavior) = OPTIONAL]; * * * @return Whether the querySetSpec field is set. @@ -1326,11 +1326,11 @@ public boolean hasQuerySetSpec() { * * *
            -     * Required. The specification of the query set.
            +     * Optional. The specification of the query set.
                  * 
            * * - * .google.cloud.discoveryengine.v1beta.Evaluation.EvaluationSpec.QuerySetSpec query_set_spec = 1 [(.google.api.field_behavior) = REQUIRED]; + * .google.cloud.discoveryengine.v1beta.Evaluation.EvaluationSpec.QuerySetSpec query_set_spec = 1 [(.google.api.field_behavior) = OPTIONAL]; * * * @return The querySetSpec. @@ -1348,11 +1348,11 @@ public boolean hasQuerySetSpec() { * * *
            -     * Required. The specification of the query set.
            +     * Optional. The specification of the query set.
                  * 
            * * - * .google.cloud.discoveryengine.v1beta.Evaluation.EvaluationSpec.QuerySetSpec query_set_spec = 1 [(.google.api.field_behavior) = REQUIRED]; + * .google.cloud.discoveryengine.v1beta.Evaluation.EvaluationSpec.QuerySetSpec query_set_spec = 1 [(.google.api.field_behavior) = OPTIONAL]; * */ @java.lang.Override @@ -2129,11 +2129,11 @@ public Builder clearSearchRequest() { * * *
            -       * Required. The specification of the query set.
            +       * Optional. The specification of the query set.
                    * 
            * * - * .google.cloud.discoveryengine.v1beta.Evaluation.EvaluationSpec.QuerySetSpec query_set_spec = 1 [(.google.api.field_behavior) = REQUIRED]; + * .google.cloud.discoveryengine.v1beta.Evaluation.EvaluationSpec.QuerySetSpec query_set_spec = 1 [(.google.api.field_behavior) = OPTIONAL]; * * * @return Whether the querySetSpec field is set. @@ -2146,11 +2146,11 @@ public boolean hasQuerySetSpec() { * * *
            -       * Required. The specification of the query set.
            +       * Optional. The specification of the query set.
                    * 
            * * - * .google.cloud.discoveryengine.v1beta.Evaluation.EvaluationSpec.QuerySetSpec query_set_spec = 1 [(.google.api.field_behavior) = REQUIRED]; + * .google.cloud.discoveryengine.v1beta.Evaluation.EvaluationSpec.QuerySetSpec query_set_spec = 1 [(.google.api.field_behavior) = OPTIONAL]; * * * @return The querySetSpec. @@ -2171,11 +2171,11 @@ public boolean hasQuerySetSpec() { * * *
            -       * Required. The specification of the query set.
            +       * Optional. The specification of the query set.
                    * 
            * * - * .google.cloud.discoveryengine.v1beta.Evaluation.EvaluationSpec.QuerySetSpec query_set_spec = 1 [(.google.api.field_behavior) = REQUIRED]; + * .google.cloud.discoveryengine.v1beta.Evaluation.EvaluationSpec.QuerySetSpec query_set_spec = 1 [(.google.api.field_behavior) = OPTIONAL]; * */ public Builder setQuerySetSpec( @@ -2197,11 +2197,11 @@ public Builder setQuerySetSpec( * * *
            -       * Required. The specification of the query set.
            +       * Optional. The specification of the query set.
                    * 
            * * - * .google.cloud.discoveryengine.v1beta.Evaluation.EvaluationSpec.QuerySetSpec query_set_spec = 1 [(.google.api.field_behavior) = REQUIRED]; + * .google.cloud.discoveryengine.v1beta.Evaluation.EvaluationSpec.QuerySetSpec query_set_spec = 1 [(.google.api.field_behavior) = OPTIONAL]; * */ public Builder setQuerySetSpec( @@ -2221,11 +2221,11 @@ public Builder setQuerySetSpec( * * *
            -       * Required. The specification of the query set.
            +       * Optional. The specification of the query set.
                    * 
            * * - * .google.cloud.discoveryengine.v1beta.Evaluation.EvaluationSpec.QuerySetSpec query_set_spec = 1 [(.google.api.field_behavior) = REQUIRED]; + * .google.cloud.discoveryengine.v1beta.Evaluation.EvaluationSpec.QuerySetSpec query_set_spec = 1 [(.google.api.field_behavior) = OPTIONAL]; * */ public Builder mergeQuerySetSpec( @@ -2254,11 +2254,11 @@ public Builder mergeQuerySetSpec( * * *
            -       * Required. The specification of the query set.
            +       * Optional. The specification of the query set.
                    * 
            * * - * .google.cloud.discoveryengine.v1beta.Evaluation.EvaluationSpec.QuerySetSpec query_set_spec = 1 [(.google.api.field_behavior) = REQUIRED]; + * .google.cloud.discoveryengine.v1beta.Evaluation.EvaluationSpec.QuerySetSpec query_set_spec = 1 [(.google.api.field_behavior) = OPTIONAL]; * */ public Builder clearQuerySetSpec() { @@ -2276,11 +2276,11 @@ public Builder clearQuerySetSpec() { * * *
            -       * Required. The specification of the query set.
            +       * Optional. The specification of the query set.
                    * 
            * * - * .google.cloud.discoveryengine.v1beta.Evaluation.EvaluationSpec.QuerySetSpec query_set_spec = 1 [(.google.api.field_behavior) = REQUIRED]; + * .google.cloud.discoveryengine.v1beta.Evaluation.EvaluationSpec.QuerySetSpec query_set_spec = 1 [(.google.api.field_behavior) = OPTIONAL]; * */ public com.google.cloud.discoveryengine.v1beta.Evaluation.EvaluationSpec.QuerySetSpec.Builder @@ -2294,11 +2294,11 @@ public Builder clearQuerySetSpec() { * * *
            -       * Required. The specification of the query set.
            +       * Optional. The specification of the query set.
                    * 
            * * - * .google.cloud.discoveryengine.v1beta.Evaluation.EvaluationSpec.QuerySetSpec query_set_spec = 1 [(.google.api.field_behavior) = REQUIRED]; + * .google.cloud.discoveryengine.v1beta.Evaluation.EvaluationSpec.QuerySetSpec query_set_spec = 1 [(.google.api.field_behavior) = OPTIONAL]; * */ public com.google.cloud.discoveryengine.v1beta.Evaluation.EvaluationSpec.QuerySetSpecOrBuilder @@ -2317,11 +2317,11 @@ public Builder clearQuerySetSpec() { * * *
            -       * Required. The specification of the query set.
            +       * Optional. The specification of the query set.
                    * 
            * * - * .google.cloud.discoveryengine.v1beta.Evaluation.EvaluationSpec.QuerySetSpec query_set_spec = 1 [(.google.api.field_behavior) = REQUIRED]; + * .google.cloud.discoveryengine.v1beta.Evaluation.EvaluationSpec.QuerySetSpec query_set_spec = 1 [(.google.api.field_behavior) = OPTIONAL]; * */ private com.google.protobuf.SingleFieldBuilder< diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/EvaluationProto.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/EvaluationProto.java index d24a6e5bc2bb..746bfd76cf6b 100644 --- a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/EvaluationProto.java +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/EvaluationProto.java @@ -91,9 +91,9 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\016search_request\030\002 \001(\01322.google.c" + "loud.discoveryengine.v1beta.SearchRequestB\003\340A\002H\000\022h\n" + "\016query_set_spec\030\001 \001(\0132K.googl" - + "e.cloud.discoveryengine.v1beta.Evaluation.EvaluationSpec.QuerySetSpecB\003\340A\002\032_\n" + + "e.cloud.discoveryengine.v1beta.Evaluation.EvaluationSpec.QuerySetSpecB\003\340A\001\032_\n" + "\014QuerySetSpec\022O\n" - + "\020sample_query_set\030\001 \001(\tB5\340A\002\372A/\n" + + "\020sample_query_set\030\001 \001(\tB5\340A\001\372A/\n" + "-discoveryengine.googleapis.com/SampleQuerySetB\r\n" + "\013search_spec\"S\n" + "\005State\022\025\n" diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/EvaluationServiceProto.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/EvaluationServiceProto.java index a699e8f0e6fb..7736103d4cff 100644 --- a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/EvaluationServiceProto.java +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/EvaluationServiceProto.java @@ -92,65 +92,70 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "roto\032#google/longrunning/operations.prot" + "o\"W\n\024GetEvaluationRequest\022?\n\004name\030\001 \001(\tB" + "1\340A\002\372A+\n)discoveryengine.googleapis.com/" - + "Evaluation\"\200\001\n\026ListEvaluationsRequest\022?\n" + + "Evaluation\"\212\001\n\026ListEvaluationsRequest\022?\n" + "\006parent\030\001 \001(\tB/\340A\002\372A)\n\'discoveryengine.g" - + "oogleapis.com/Location\022\021\n\tpage_size\030\002 \001(" - + "\005\022\022\n\npage_token\030\003 \001(\t\"x\n\027ListEvaluations" - + "Response\022D\n\013evaluations\030\001 \003(\0132/.google.c" - + "loud.discoveryengine.v1beta.Evaluation\022\027" - + "\n\017next_page_token\030\002 \001(\t\"\244\001\n\027CreateEvalua" - + "tionRequest\022?\n\006parent\030\001 \001(\tB/\340A\002\372A)\n\'dis" - + "coveryengine.googleapis.com/Location\022H\n\n" - + "evaluation\030\002 \001(\0132/.google.cloud.discover" - + "yengine.v1beta.EvaluationB\003\340A\002\"\032\n\030Create" - + "EvaluationMetadata\"\214\001\n\034ListEvaluationRes" - + "ultsRequest\022E\n\nevaluation\030\001 \001(\tB1\340A\002\372A+\n" - + ")discoveryengine.googleapis.com/Evaluati" - + "on\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npage_token\030\003 \001(" - + "\t\"\336\002\n\035ListEvaluationResultsResponse\022o\n\022e" - + "valuation_results\030\001 \003(\0132S.google.cloud.d" - + "iscoveryengine.v1beta.ListEvaluationResu" - + "ltsResponse.EvaluationResult\022\027\n\017next_pag" - + "e_token\030\002 \001(\t\032\262\001\n\020EvaluationResult\022K\n\014sa" - + "mple_query\030\001 \001(\01320.google.cloud.discover" - + "yengine.v1beta.SampleQueryB\003\340A\003\022Q\n\017quali" - + "ty_metrics\030\002 \001(\01323.google.cloud.discover" - + "yengine.v1beta.QualityMetricsB\003\340A\0032\274\010\n\021E" - + "valuationService\022\277\001\n\rGetEvaluation\0229.goo" - + "gle.cloud.discoveryengine.v1beta.GetEval" - + "uationRequest\032/.google.cloud.discoveryen" - + "gine.v1beta.Evaluation\"B\332A\004name\202\323\344\223\0025\0223/" - + "v1beta/{name=projects/*/locations/*/eval" - + "uations/*}\022\322\001\n\017ListEvaluations\022;.google." + + "oogleapis.com/Location\022\026\n\tpage_size\030\002 \001(" + + "\005B\003\340A\001\022\027\n\npage_token\030\003 \001(\tB\003\340A\001\"x\n\027ListE" + + "valuationsResponse\022D\n\013evaluations\030\001 \003(\0132" + + "/.google.cloud.discoveryengine.v1beta.Ev" + + "aluation\022\027\n\017next_page_token\030\002 \001(\t\"\244\001\n\027Cr" + + "eateEvaluationRequest\022?\n\006parent\030\001 \001(\tB/\340" + + "A\002\372A)\n\'discoveryengine.googleapis.com/Lo" + + "cation\022H\n\nevaluation\030\002 \001(\0132/.google.clou" + + "d.discoveryengine.v1beta.EvaluationB\003\340A\002" + + "\"\032\n\030CreateEvaluationMetadata\"\226\001\n\034ListEva" + + "luationResultsRequest\022E\n\nevaluation\030\001 \001(" + + "\tB1\340A\002\372A+\n)discoveryengine.googleapis.co" + + "m/Evaluation\022\026\n\tpage_size\030\002 \001(\005B\003\340A\001\022\027\n\n" + + "page_token\030\003 \001(\tB\003\340A\001\"\336\002\n\035ListEvaluation" + + "ResultsResponse\022o\n\022evaluation_results\030\001 " + + "\003(\0132S.google.cloud.discoveryengine.v1bet" + + "a.ListEvaluationResultsResponse.Evaluati" + + "onResult\022\027\n\017next_page_token\030\002 \001(\t\032\262\001\n\020Ev" + + "aluationResult\022K\n\014sample_query\030\001 \001(\01320.g" + + "oogle.cloud.discoveryengine.v1beta.Sampl" + + "eQueryB\003\340A\003\022Q\n\017quality_metrics\030\002 \001(\01323.g" + + "oogle.cloud.discoveryengine.v1beta.Quali" + + "tyMetricsB\003\340A\0032\373\t\n\021EvaluationService\022\277\001\n" + + "\rGetEvaluation\0229.google.cloud.discoverye" + + "ngine.v1beta.GetEvaluationRequest\032/.goog" + + "le.cloud.discoveryengine.v1beta.Evaluati" + + "on\"B\332A\004name\202\323\344\223\0025\0223/v1beta/{name=project" + + "s/*/locations/*/evaluations/*}\022\322\001\n\017ListE" + + "valuations\022;.google.cloud.discoveryengin" + + "e.v1beta.ListEvaluationsRequest\032<.google" + + ".cloud.discoveryengine.v1beta.ListEvalua" + + "tionsResponse\"D\332A\006parent\202\323\344\223\0025\0223/v1beta/" + + "{parent=projects/*/locations/*}/evaluati" + + "ons\022\276\002\n\020CreateEvaluation\022<.google.cloud." + + "discoveryengine.v1beta.CreateEvaluationR" + + "equest\032\035.google.longrunning.Operation\"\314\001" + + "\312An\n.google.cloud.discoveryengine.v1beta" + + ".Evaluation\022 builder) { private FactChunk() { chunkText_ = ""; source_ = ""; + uri_ = ""; + title_ = ""; + domain_ = ""; } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @@ -323,6 +326,165 @@ public java.lang.String getSourceMetadataOrThrow(java.lang.String key) { return map.get(key); } + public static final int URI_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object uri_ = ""; + + /** + * + * + *
            +   * The URI of the source.
            +   * 
            + * + * string uri = 5; + * + * @return The uri. + */ + @java.lang.Override + public java.lang.String getUri() { + java.lang.Object ref = uri_; + 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(); + uri_ = s; + return s; + } + } + + /** + * + * + *
            +   * The URI of the source.
            +   * 
            + * + * string uri = 5; + * + * @return The bytes for uri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getUriBytes() { + java.lang.Object ref = uri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TITLE_FIELD_NUMBER = 6; + + @SuppressWarnings("serial") + private volatile java.lang.Object title_ = ""; + + /** + * + * + *
            +   * The title of the source.
            +   * 
            + * + * string title = 6; + * + * @return The title. + */ + @java.lang.Override + public java.lang.String getTitle() { + java.lang.Object ref = title_; + 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(); + title_ = s; + return s; + } + } + + /** + * + * + *
            +   * The title of the source.
            +   * 
            + * + * string title = 6; + * + * @return The bytes for title. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTitleBytes() { + java.lang.Object ref = title_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + title_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DOMAIN_FIELD_NUMBER = 7; + + @SuppressWarnings("serial") + private volatile java.lang.Object domain_ = ""; + + /** + * + * + *
            +   * The domain of the source.
            +   * 
            + * + * string domain = 7; + * + * @return The domain. + */ + @java.lang.Override + public java.lang.String getDomain() { + java.lang.Object ref = domain_; + 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(); + domain_ = s; + return s; + } + } + + /** + * + * + *
            +   * The domain of the source.
            +   * 
            + * + * string domain = 7; + * + * @return The bytes for domain. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDomainBytes() { + java.lang.Object ref = domain_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + domain_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -348,6 +510,15 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (index_ != 0) { output.writeInt32(4, index_); } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(uri_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 5, uri_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(title_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 6, title_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(domain_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 7, domain_); + } getUnknownFields().writeTo(output); } @@ -376,6 +547,15 @@ public int getSerializedSize() { if (index_ != 0) { size += com.google.protobuf.CodedOutputStream.computeInt32Size(4, index_); } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(uri_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(5, uri_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(title_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(6, title_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(domain_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(7, domain_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -396,6 +576,9 @@ public boolean equals(final java.lang.Object obj) { if (!getSource().equals(other.getSource())) return false; if (getIndex() != other.getIndex()) return false; if (!internalGetSourceMetadata().equals(other.internalGetSourceMetadata())) return false; + if (!getUri().equals(other.getUri())) return false; + if (!getTitle().equals(other.getTitle())) return false; + if (!getDomain().equals(other.getDomain())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -417,6 +600,12 @@ public int hashCode() { hash = (37 * hash) + SOURCE_METADATA_FIELD_NUMBER; hash = (53 * hash) + internalGetSourceMetadata().hashCode(); } + hash = (37 * hash) + URI_FIELD_NUMBER; + hash = (53 * hash) + getUri().hashCode(); + hash = (37 * hash) + TITLE_FIELD_NUMBER; + hash = (53 * hash) + getTitle().hashCode(); + hash = (37 * hash) + DOMAIN_FIELD_NUMBER; + hash = (53 * hash) + getDomain().hashCode(); hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -583,6 +772,9 @@ public Builder clear() { source_ = ""; index_ = 0; internalGetMutableSourceMetadata().clear(); + uri_ = ""; + title_ = ""; + domain_ = ""; return this; } @@ -632,6 +824,15 @@ private void buildPartial0(com.google.cloud.discoveryengine.v1beta.FactChunk res result.sourceMetadata_ = internalGetSourceMetadata(); result.sourceMetadata_.makeImmutable(); } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.uri_ = uri_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.title_ = title_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.domain_ = domain_; + } } @java.lang.Override @@ -662,6 +863,21 @@ public Builder mergeFrom(com.google.cloud.discoveryengine.v1beta.FactChunk other } internalGetMutableSourceMetadata().mergeFrom(other.internalGetSourceMetadata()); bitField0_ |= 0x00000008; + if (!other.getUri().isEmpty()) { + uri_ = other.uri_; + bitField0_ |= 0x00000010; + onChanged(); + } + if (!other.getTitle().isEmpty()) { + title_ = other.title_; + bitField0_ |= 0x00000020; + onChanged(); + } + if (!other.getDomain().isEmpty()) { + domain_ = other.domain_; + bitField0_ |= 0x00000040; + onChanged(); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -718,6 +934,24 @@ public Builder mergeFrom( bitField0_ |= 0x00000004; break; } // case 32 + case 42: + { + uri_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 50: + { + title_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 50 + case 58: + { + domain_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000040; + break; + } // case 58 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -1205,6 +1439,339 @@ public Builder putAllSourceMetadata(java.util.Map + * The URI of the source. + * + * + * string uri = 5; + * + * @return The uri. + */ + public java.lang.String getUri() { + java.lang.Object ref = uri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
            +     * The URI of the source.
            +     * 
            + * + * string uri = 5; + * + * @return The bytes for uri. + */ + public com.google.protobuf.ByteString getUriBytes() { + java.lang.Object ref = uri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
            +     * The URI of the source.
            +     * 
            + * + * string uri = 5; + * + * @param value The uri to set. + * @return This builder for chaining. + */ + public Builder setUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + uri_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
            +     * The URI of the source.
            +     * 
            + * + * string uri = 5; + * + * @return This builder for chaining. + */ + public Builder clearUri() { + uri_ = getDefaultInstance().getUri(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + + /** + * + * + *
            +     * The URI of the source.
            +     * 
            + * + * string uri = 5; + * + * @param value The bytes for uri to set. + * @return This builder for chaining. + */ + public Builder setUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + uri_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + private java.lang.Object title_ = ""; + + /** + * + * + *
            +     * The title of the source.
            +     * 
            + * + * string title = 6; + * + * @return The title. + */ + public java.lang.String getTitle() { + java.lang.Object ref = title_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + title_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
            +     * The title of the source.
            +     * 
            + * + * string title = 6; + * + * @return The bytes for title. + */ + public com.google.protobuf.ByteString getTitleBytes() { + java.lang.Object ref = title_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + title_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
            +     * The title of the source.
            +     * 
            + * + * string title = 6; + * + * @param value The title to set. + * @return This builder for chaining. + */ + public Builder setTitle(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + title_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
            +     * The title of the source.
            +     * 
            + * + * string title = 6; + * + * @return This builder for chaining. + */ + public Builder clearTitle() { + title_ = getDefaultInstance().getTitle(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; + } + + /** + * + * + *
            +     * The title of the source.
            +     * 
            + * + * string title = 6; + * + * @param value The bytes for title to set. + * @return This builder for chaining. + */ + public Builder setTitleBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + title_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + private java.lang.Object domain_ = ""; + + /** + * + * + *
            +     * The domain of the source.
            +     * 
            + * + * string domain = 7; + * + * @return The domain. + */ + public java.lang.String getDomain() { + java.lang.Object ref = domain_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + domain_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
            +     * The domain of the source.
            +     * 
            + * + * string domain = 7; + * + * @return The bytes for domain. + */ + public com.google.protobuf.ByteString getDomainBytes() { + java.lang.Object ref = domain_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + domain_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
            +     * The domain of the source.
            +     * 
            + * + * string domain = 7; + * + * @param value The domain to set. + * @return This builder for chaining. + */ + public Builder setDomain(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + domain_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + /** + * + * + *
            +     * The domain of the source.
            +     * 
            + * + * string domain = 7; + * + * @return This builder for chaining. + */ + public Builder clearDomain() { + domain_ = getDefaultInstance().getDomain(); + bitField0_ = (bitField0_ & ~0x00000040); + onChanged(); + return this; + } + + /** + * + * + *
            +     * The domain of the source.
            +     * 
            + * + * string domain = 7; + * + * @param value The bytes for domain to set. + * @return This builder for chaining. + */ + public Builder setDomainBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + domain_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.FactChunk) } diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/FactChunkOrBuilder.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/FactChunkOrBuilder.java index 362e12d37cad..783af1e040a2 100644 --- a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/FactChunkOrBuilder.java +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/FactChunkOrBuilder.java @@ -159,4 +159,82 @@ java.lang.String getSourceMetadataOrDefault( * map<string, string> source_metadata = 3; */ java.lang.String getSourceMetadataOrThrow(java.lang.String key); + + /** + * + * + *
            +   * The URI of the source.
            +   * 
            + * + * string uri = 5; + * + * @return The uri. + */ + java.lang.String getUri(); + + /** + * + * + *
            +   * The URI of the source.
            +   * 
            + * + * string uri = 5; + * + * @return The bytes for uri. + */ + com.google.protobuf.ByteString getUriBytes(); + + /** + * + * + *
            +   * The title of the source.
            +   * 
            + * + * string title = 6; + * + * @return The title. + */ + java.lang.String getTitle(); + + /** + * + * + *
            +   * The title of the source.
            +   * 
            + * + * string title = 6; + * + * @return The bytes for title. + */ + com.google.protobuf.ByteString getTitleBytes(); + + /** + * + * + *
            +   * The domain of the source.
            +   * 
            + * + * string domain = 7; + * + * @return The domain. + */ + java.lang.String getDomain(); + + /** + * + * + *
            +   * The domain of the source.
            +   * 
            + * + * string domain = 7; + * + * @return The bytes for domain. + */ + com.google.protobuf.ByteString getDomainBytes(); } diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/Feedback.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/Feedback.java new file mode 100644 index 000000000000..35dcdb26b3bf --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/Feedback.java @@ -0,0 +1,4443 @@ +/* + * 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/cloud/discoveryengine/v1beta/feedback.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.discoveryengine.v1beta; + +/** + * + * + *
            + * Information about the user feedback. This information will be used for
            + * logging and metrics purpose.
            + * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.Feedback} + */ +@com.google.protobuf.Generated +public final class Feedback extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.Feedback) + FeedbackOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Feedback"); + } + + // Use Feedback.newBuilder() to construct. + private Feedback(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private Feedback() { + feedbackType_ = 0; + reasons_ = emptyIntList(); + comment_ = ""; + llmModelVersion_ = ""; + feedbackSource_ = 0; + componentVersion_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.FeedbackProto + .internal_static_google_cloud_discoveryengine_v1beta_Feedback_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.FeedbackProto + .internal_static_google_cloud_discoveryengine_v1beta_Feedback_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.Feedback.class, + com.google.cloud.discoveryengine.v1beta.Feedback.Builder.class); + } + + /** + * + * + *
            +   * The type of the feedback user gives.
            +   * 
            + * + * Protobuf enum {@code google.cloud.discoveryengine.v1beta.Feedback.FeedbackType} + */ + public enum FeedbackType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
            +     * Unspecified feedback type.
            +     * 
            + * + * FEEDBACK_TYPE_UNSPECIFIED = 0; + */ + FEEDBACK_TYPE_UNSPECIFIED(0), + /** + * + * + *
            +     * The user gives a positive feedback.
            +     * 
            + * + * LIKE = 1; + */ + LIKE(1), + /** + * + * + *
            +     * The user gives a negative feedback.
            +     * 
            + * + * DISLIKE = 2; + */ + DISLIKE(2), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "FeedbackType"); + } + + /** + * + * + *
            +     * Unspecified feedback type.
            +     * 
            + * + * FEEDBACK_TYPE_UNSPECIFIED = 0; + */ + public static final int FEEDBACK_TYPE_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
            +     * The user gives a positive feedback.
            +     * 
            + * + * LIKE = 1; + */ + public static final int LIKE_VALUE = 1; + + /** + * + * + *
            +     * The user gives a negative feedback.
            +     * 
            + * + * DISLIKE = 2; + */ + public static final int DISLIKE_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 FeedbackType 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 FeedbackType forNumber(int value) { + switch (value) { + case 0: + return FEEDBACK_TYPE_UNSPECIFIED; + case 1: + return LIKE; + case 2: + return DISLIKE; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public FeedbackType findValueByNumber(int number) { + return FeedbackType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.Feedback.getDescriptor().getEnumTypes().get(0); + } + + private static final FeedbackType[] VALUES = values(); + + public static FeedbackType valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private FeedbackType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.discoveryengine.v1beta.Feedback.FeedbackType) + } + + /** + * + * + *
            +   * The reason why user gives a negative feedback.
            +   * 
            + * + * Protobuf enum {@code google.cloud.discoveryengine.v1beta.Feedback.Reason} + */ + public enum Reason implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
            +     * Unspecified reason.
            +     * 
            + * + * REASON_UNSPECIFIED = 0; + */ + REASON_UNSPECIFIED(0), + /** + * + * + *
            +     * The response is inaccurate.
            +     * 
            + * + * INACCURATE_RESPONSE = 1; + */ + INACCURATE_RESPONSE(1), + /** + * + * + *
            +     * The response is not relevant.
            +     * 
            + * + * NOT_RELEVANT = 2; + */ + NOT_RELEVANT(2), + /** + * + * + *
            +     * The response is incomprehensive.
            +     * 
            + * + * INCOMPREHENSIVE = 3; + */ + INCOMPREHENSIVE(3), + /** + * + * + *
            +     * The response is offensive or unsafe.
            +     * 
            + * + * OFFENSIVE_OR_UNSAFE = 4; + */ + OFFENSIVE_OR_UNSAFE(4), + /** + * + * + *
            +     * The response is not well-formatted.
            +     * 
            + * + * FORMAT_AND_STYLES = 6; + */ + FORMAT_AND_STYLES(6), + /** + * + * + *
            +     * The response is not well-associated with the query.
            +     * 
            + * + * BAD_CITATION = 7; + */ + BAD_CITATION(7), + /** + * + * + *
            +     * The expected canvas was not generated for the response.
            +     * 
            + * + * CANVAS_NOT_GENERATED = 8; + */ + CANVAS_NOT_GENERATED(8), + /** + * + * + *
            +     * The generated canvas is of bad quality (e.g. inaccurate, incomplete,
            +     * poorly formatted).
            +     * 
            + * + * CANVAS_QUALITY_BAD = 9; + */ + CANVAS_QUALITY_BAD(9), + /** + * + * + *
            +     * Exporting the generated canvas failed (e.g. download or external
            +     * export action did not complete successfully).
            +     * 
            + * + * CANVAS_EXPORT_FAILED = 10; + */ + CANVAS_EXPORT_FAILED(10), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Reason"); + } + + /** + * + * + *
            +     * Unspecified reason.
            +     * 
            + * + * REASON_UNSPECIFIED = 0; + */ + public static final int REASON_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
            +     * The response is inaccurate.
            +     * 
            + * + * INACCURATE_RESPONSE = 1; + */ + public static final int INACCURATE_RESPONSE_VALUE = 1; + + /** + * + * + *
            +     * The response is not relevant.
            +     * 
            + * + * NOT_RELEVANT = 2; + */ + public static final int NOT_RELEVANT_VALUE = 2; + + /** + * + * + *
            +     * The response is incomprehensive.
            +     * 
            + * + * INCOMPREHENSIVE = 3; + */ + public static final int INCOMPREHENSIVE_VALUE = 3; + + /** + * + * + *
            +     * The response is offensive or unsafe.
            +     * 
            + * + * OFFENSIVE_OR_UNSAFE = 4; + */ + public static final int OFFENSIVE_OR_UNSAFE_VALUE = 4; + + /** + * + * + *
            +     * The response is not well-formatted.
            +     * 
            + * + * FORMAT_AND_STYLES = 6; + */ + public static final int FORMAT_AND_STYLES_VALUE = 6; + + /** + * + * + *
            +     * The response is not well-associated with the query.
            +     * 
            + * + * BAD_CITATION = 7; + */ + public static final int BAD_CITATION_VALUE = 7; + + /** + * + * + *
            +     * The expected canvas was not generated for the response.
            +     * 
            + * + * CANVAS_NOT_GENERATED = 8; + */ + public static final int CANVAS_NOT_GENERATED_VALUE = 8; + + /** + * + * + *
            +     * The generated canvas is of bad quality (e.g. inaccurate, incomplete,
            +     * poorly formatted).
            +     * 
            + * + * CANVAS_QUALITY_BAD = 9; + */ + public static final int CANVAS_QUALITY_BAD_VALUE = 9; + + /** + * + * + *
            +     * Exporting the generated canvas failed (e.g. download or external
            +     * export action did not complete successfully).
            +     * 
            + * + * CANVAS_EXPORT_FAILED = 10; + */ + public static final int CANVAS_EXPORT_FAILED_VALUE = 10; + + 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 Reason 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 Reason forNumber(int value) { + switch (value) { + case 0: + return REASON_UNSPECIFIED; + case 1: + return INACCURATE_RESPONSE; + case 2: + return NOT_RELEVANT; + case 3: + return INCOMPREHENSIVE; + case 4: + return OFFENSIVE_OR_UNSAFE; + case 6: + return FORMAT_AND_STYLES; + case 7: + return BAD_CITATION; + case 8: + return CANVAS_NOT_GENERATED; + case 9: + return CANVAS_QUALITY_BAD; + case 10: + return CANVAS_EXPORT_FAILED; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public Reason findValueByNumber(int number) { + return Reason.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.Feedback.getDescriptor().getEnumTypes().get(1); + } + + private static final Reason[] VALUES = values(); + + public static Reason valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private Reason(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.discoveryengine.v1beta.Feedback.Reason) + } + + /** + * + * + *
            +   * Source of the feedback as per integration.
            +   * 
            + * + * Protobuf enum {@code google.cloud.discoveryengine.v1beta.Feedback.FeedbackSource} + */ + public enum FeedbackSource implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
            +     * Unspecified feedback source.
            +     * 
            + * + * FEEDBACK_SOURCE_UNSPECIFIED = 0; + */ + FEEDBACK_SOURCE_UNSPECIFIED(0), + /** + * + * + *
            +     * Feedback source is Google Console.
            +     * 
            + * + * GOOGLE_CONSOLE = 1; + */ + GOOGLE_CONSOLE(1), + /** + * + * + *
            +     * Feedback source is Google Widget.
            +     * 
            + * + * GOOGLE_WIDGET = 2; + */ + GOOGLE_WIDGET(2), + /** + * + * + *
            +     * Feedback source is Google Webapp.
            +     * 
            + * + * GOOGLE_WEBAPP = 3; + */ + GOOGLE_WEBAPP(3), + /** + * + * + *
            +     * Feedback source is Google AgentSpace Mobile app.
            +     * 
            + * + * GOOGLE_AGENTSPACE_MOBILE = 4; + */ + GOOGLE_AGENTSPACE_MOBILE(4), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "FeedbackSource"); + } + + /** + * + * + *
            +     * Unspecified feedback source.
            +     * 
            + * + * FEEDBACK_SOURCE_UNSPECIFIED = 0; + */ + public static final int FEEDBACK_SOURCE_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
            +     * Feedback source is Google Console.
            +     * 
            + * + * GOOGLE_CONSOLE = 1; + */ + public static final int GOOGLE_CONSOLE_VALUE = 1; + + /** + * + * + *
            +     * Feedback source is Google Widget.
            +     * 
            + * + * GOOGLE_WIDGET = 2; + */ + public static final int GOOGLE_WIDGET_VALUE = 2; + + /** + * + * + *
            +     * Feedback source is Google Webapp.
            +     * 
            + * + * GOOGLE_WEBAPP = 3; + */ + public static final int GOOGLE_WEBAPP_VALUE = 3; + + /** + * + * + *
            +     * Feedback source is Google AgentSpace Mobile app.
            +     * 
            + * + * GOOGLE_AGENTSPACE_MOBILE = 4; + */ + public static final int GOOGLE_AGENTSPACE_MOBILE_VALUE = 4; + + 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 FeedbackSource 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 FeedbackSource forNumber(int value) { + switch (value) { + case 0: + return FEEDBACK_SOURCE_UNSPECIFIED; + case 1: + return GOOGLE_CONSOLE; + case 2: + return GOOGLE_WIDGET; + case 3: + return GOOGLE_WEBAPP; + case 4: + return GOOGLE_AGENTSPACE_MOBILE; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public FeedbackSource findValueByNumber(int number) { + return FeedbackSource.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.Feedback.getDescriptor().getEnumTypes().get(2); + } + + private static final FeedbackSource[] VALUES = values(); + + public static FeedbackSource valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private FeedbackSource(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.discoveryengine.v1beta.Feedback.FeedbackSource) + } + + public interface ConversationInfoOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.Feedback.ConversationInfo) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
            +     * The index of the user input within the conversation messages.
            +     * 
            + * + * int32 question_index = 1; + * + * @return The questionIndex. + */ + int getQuestionIndex(); + + /** + * + * + *
            +     * Name of the newly generated or continued session.
            +     * 
            + * + * string session = 2; + * + * @return The session. + */ + java.lang.String getSession(); + + /** + * + * + *
            +     * Name of the newly generated or continued session.
            +     * 
            + * + * string session = 2; + * + * @return The bytes for session. + */ + com.google.protobuf.ByteString getSessionBytes(); + + /** + * + * + *
            +     * Required. The user's search query.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Query query = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the query field is set. + */ + boolean hasQuery(); + + /** + * + * + *
            +     * Required. The user's search query.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Query query = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The query. + */ + com.google.cloud.discoveryengine.v1beta.Query getQuery(); + + /** + * + * + *
            +     * Required. The user's search query.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Query query = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.discoveryengine.v1beta.QueryOrBuilder getQueryOrBuilder(); + + /** + * + * + *
            +     * Optional. The token which could be used to fetch the assistant log.
            +     * 
            + * + * string assist_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The assistToken. + */ + java.lang.String getAssistToken(); + + /** + * + * + *
            +     * Optional. The token which could be used to fetch the assistant log.
            +     * 
            + * + * string assist_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for assistToken. + */ + com.google.protobuf.ByteString getAssistTokenBytes(); + + /** + * + * + *
            +     * Optional. The token which could be used to fetch the answer log.
            +     * 
            + * + * string answer_query_token = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The answerQueryToken. + */ + java.lang.String getAnswerQueryToken(); + + /** + * + * + *
            +     * Optional. The token which could be used to fetch the answer log.
            +     * 
            + * + * string answer_query_token = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for answerQueryToken. + */ + com.google.protobuf.ByteString getAnswerQueryTokenBytes(); + } + + /** + * + * + *
            +   * The conversation information such as the question index and session name.
            +   * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.Feedback.ConversationInfo} + */ + public static final class ConversationInfo extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.Feedback.ConversationInfo) + ConversationInfoOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ConversationInfo"); + } + + // Use ConversationInfo.newBuilder() to construct. + private ConversationInfo(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ConversationInfo() { + session_ = ""; + assistToken_ = ""; + answerQueryToken_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.FeedbackProto + .internal_static_google_cloud_discoveryengine_v1beta_Feedback_ConversationInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.FeedbackProto + .internal_static_google_cloud_discoveryengine_v1beta_Feedback_ConversationInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.Feedback.ConversationInfo.class, + com.google.cloud.discoveryengine.v1beta.Feedback.ConversationInfo.Builder.class); + } + + private int bitField0_; + public static final int QUESTION_INDEX_FIELD_NUMBER = 1; + private int questionIndex_ = 0; + + /** + * + * + *
            +     * The index of the user input within the conversation messages.
            +     * 
            + * + * int32 question_index = 1; + * + * @return The questionIndex. + */ + @java.lang.Override + public int getQuestionIndex() { + return questionIndex_; + } + + public static final int SESSION_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object session_ = ""; + + /** + * + * + *
            +     * Name of the newly generated or continued session.
            +     * 
            + * + * string session = 2; + * + * @return The session. + */ + @java.lang.Override + public java.lang.String getSession() { + java.lang.Object ref = session_; + 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(); + session_ = s; + return s; + } + } + + /** + * + * + *
            +     * Name of the newly generated or continued session.
            +     * 
            + * + * string session = 2; + * + * @return The bytes for session. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSessionBytes() { + java.lang.Object ref = session_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + session_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int QUERY_FIELD_NUMBER = 3; + private com.google.cloud.discoveryengine.v1beta.Query query_; + + /** + * + * + *
            +     * Required. The user's search query.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Query query = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the query field is set. + */ + @java.lang.Override + public boolean hasQuery() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
            +     * Required. The user's search query.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Query query = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The query. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Query getQuery() { + return query_ == null + ? com.google.cloud.discoveryengine.v1beta.Query.getDefaultInstance() + : query_; + } + + /** + * + * + *
            +     * Required. The user's search query.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Query query = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.QueryOrBuilder getQueryOrBuilder() { + return query_ == null + ? com.google.cloud.discoveryengine.v1beta.Query.getDefaultInstance() + : query_; + } + + public static final int ASSIST_TOKEN_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object assistToken_ = ""; + + /** + * + * + *
            +     * Optional. The token which could be used to fetch the assistant log.
            +     * 
            + * + * string assist_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The assistToken. + */ + @java.lang.Override + public java.lang.String getAssistToken() { + java.lang.Object ref = assistToken_; + 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(); + assistToken_ = s; + return s; + } + } + + /** + * + * + *
            +     * Optional. The token which could be used to fetch the assistant log.
            +     * 
            + * + * string assist_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for assistToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getAssistTokenBytes() { + java.lang.Object ref = assistToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + assistToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ANSWER_QUERY_TOKEN_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object answerQueryToken_ = ""; + + /** + * + * + *
            +     * Optional. The token which could be used to fetch the answer log.
            +     * 
            + * + * string answer_query_token = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The answerQueryToken. + */ + @java.lang.Override + public java.lang.String getAnswerQueryToken() { + java.lang.Object ref = answerQueryToken_; + 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(); + answerQueryToken_ = s; + return s; + } + } + + /** + * + * + *
            +     * Optional. The token which could be used to fetch the answer log.
            +     * 
            + * + * string answer_query_token = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for answerQueryToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getAnswerQueryTokenBytes() { + java.lang.Object ref = answerQueryToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + answerQueryToken_ = 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 { + if (questionIndex_ != 0) { + output.writeInt32(1, questionIndex_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(session_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, session_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(3, getQuery()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(assistToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, assistToken_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(answerQueryToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 5, answerQueryToken_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (questionIndex_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(1, questionIndex_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(session_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, session_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getQuery()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(assistToken_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, assistToken_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(answerQueryToken_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(5, answerQueryToken_); + } + 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.discoveryengine.v1beta.Feedback.ConversationInfo)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1beta.Feedback.ConversationInfo other = + (com.google.cloud.discoveryengine.v1beta.Feedback.ConversationInfo) obj; + + if (getQuestionIndex() != other.getQuestionIndex()) return false; + if (!getSession().equals(other.getSession())) return false; + if (hasQuery() != other.hasQuery()) return false; + if (hasQuery()) { + if (!getQuery().equals(other.getQuery())) return false; + } + if (!getAssistToken().equals(other.getAssistToken())) return false; + if (!getAnswerQueryToken().equals(other.getAnswerQueryToken())) 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) + QUESTION_INDEX_FIELD_NUMBER; + hash = (53 * hash) + getQuestionIndex(); + hash = (37 * hash) + SESSION_FIELD_NUMBER; + hash = (53 * hash) + getSession().hashCode(); + if (hasQuery()) { + hash = (37 * hash) + QUERY_FIELD_NUMBER; + hash = (53 * hash) + getQuery().hashCode(); + } + hash = (37 * hash) + ASSIST_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getAssistToken().hashCode(); + hash = (37 * hash) + ANSWER_QUERY_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getAnswerQueryToken().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1beta.Feedback.ConversationInfo parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.Feedback.ConversationInfo 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.discoveryengine.v1beta.Feedback.ConversationInfo parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.Feedback.ConversationInfo 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.discoveryengine.v1beta.Feedback.ConversationInfo parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.Feedback.ConversationInfo parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1beta.Feedback.ConversationInfo parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.Feedback.ConversationInfo 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.discoveryengine.v1beta.Feedback.ConversationInfo + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.Feedback.ConversationInfo + 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.discoveryengine.v1beta.Feedback.ConversationInfo parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.Feedback.ConversationInfo 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.discoveryengine.v1beta.Feedback.ConversationInfo 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; + } + + /** + * + * + *
            +     * The conversation information such as the question index and session name.
            +     * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.Feedback.ConversationInfo} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.Feedback.ConversationInfo) + com.google.cloud.discoveryengine.v1beta.Feedback.ConversationInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.FeedbackProto + .internal_static_google_cloud_discoveryengine_v1beta_Feedback_ConversationInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.FeedbackProto + .internal_static_google_cloud_discoveryengine_v1beta_Feedback_ConversationInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.Feedback.ConversationInfo.class, + com.google.cloud.discoveryengine.v1beta.Feedback.ConversationInfo.Builder.class); + } + + // Construct using + // com.google.cloud.discoveryengine.v1beta.Feedback.ConversationInfo.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetQueryFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + questionIndex_ = 0; + session_ = ""; + query_ = null; + if (queryBuilder_ != null) { + queryBuilder_.dispose(); + queryBuilder_ = null; + } + assistToken_ = ""; + answerQueryToken_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1beta.FeedbackProto + .internal_static_google_cloud_discoveryengine_v1beta_Feedback_ConversationInfo_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Feedback.ConversationInfo + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1beta.Feedback.ConversationInfo + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Feedback.ConversationInfo build() { + com.google.cloud.discoveryengine.v1beta.Feedback.ConversationInfo result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Feedback.ConversationInfo buildPartial() { + com.google.cloud.discoveryengine.v1beta.Feedback.ConversationInfo result = + new com.google.cloud.discoveryengine.v1beta.Feedback.ConversationInfo(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.discoveryengine.v1beta.Feedback.ConversationInfo result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.questionIndex_ = questionIndex_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.session_ = session_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.query_ = queryBuilder_ == null ? query_ : queryBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.assistToken_ = assistToken_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.answerQueryToken_ = answerQueryToken_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.discoveryengine.v1beta.Feedback.ConversationInfo) { + return mergeFrom( + (com.google.cloud.discoveryengine.v1beta.Feedback.ConversationInfo) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1beta.Feedback.ConversationInfo other) { + if (other + == com.google.cloud.discoveryengine.v1beta.Feedback.ConversationInfo + .getDefaultInstance()) return this; + if (other.getQuestionIndex() != 0) { + setQuestionIndex(other.getQuestionIndex()); + } + if (!other.getSession().isEmpty()) { + session_ = other.session_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasQuery()) { + mergeQuery(other.getQuery()); + } + if (!other.getAssistToken().isEmpty()) { + assistToken_ = other.assistToken_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (!other.getAnswerQueryToken().isEmpty()) { + answerQueryToken_ = other.answerQueryToken_; + bitField0_ |= 0x00000010; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + questionIndex_ = input.readInt32(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 18: + { + session_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage(internalGetQueryFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + assistToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + answerQueryToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private int questionIndex_; + + /** + * + * + *
            +       * The index of the user input within the conversation messages.
            +       * 
            + * + * int32 question_index = 1; + * + * @return The questionIndex. + */ + @java.lang.Override + public int getQuestionIndex() { + return questionIndex_; + } + + /** + * + * + *
            +       * The index of the user input within the conversation messages.
            +       * 
            + * + * int32 question_index = 1; + * + * @param value The questionIndex to set. + * @return This builder for chaining. + */ + public Builder setQuestionIndex(int value) { + + questionIndex_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
            +       * The index of the user input within the conversation messages.
            +       * 
            + * + * int32 question_index = 1; + * + * @return This builder for chaining. + */ + public Builder clearQuestionIndex() { + bitField0_ = (bitField0_ & ~0x00000001); + questionIndex_ = 0; + onChanged(); + return this; + } + + private java.lang.Object session_ = ""; + + /** + * + * + *
            +       * Name of the newly generated or continued session.
            +       * 
            + * + * string session = 2; + * + * @return The session. + */ + public java.lang.String getSession() { + java.lang.Object ref = session_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + session_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
            +       * Name of the newly generated or continued session.
            +       * 
            + * + * string session = 2; + * + * @return The bytes for session. + */ + public com.google.protobuf.ByteString getSessionBytes() { + java.lang.Object ref = session_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + session_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
            +       * Name of the newly generated or continued session.
            +       * 
            + * + * string session = 2; + * + * @param value The session to set. + * @return This builder for chaining. + */ + public Builder setSession(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + session_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
            +       * Name of the newly generated or continued session.
            +       * 
            + * + * string session = 2; + * + * @return This builder for chaining. + */ + public Builder clearSession() { + session_ = getDefaultInstance().getSession(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
            +       * Name of the newly generated or continued session.
            +       * 
            + * + * string session = 2; + * + * @param value The bytes for session to set. + * @return This builder for chaining. + */ + public Builder setSessionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + session_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.cloud.discoveryengine.v1beta.Query query_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.Query, + com.google.cloud.discoveryengine.v1beta.Query.Builder, + com.google.cloud.discoveryengine.v1beta.QueryOrBuilder> + queryBuilder_; + + /** + * + * + *
            +       * Required. The user's search query.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Query query = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the query field is set. + */ + public boolean hasQuery() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
            +       * Required. The user's search query.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Query query = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The query. + */ + public com.google.cloud.discoveryengine.v1beta.Query getQuery() { + if (queryBuilder_ == null) { + return query_ == null + ? com.google.cloud.discoveryengine.v1beta.Query.getDefaultInstance() + : query_; + } else { + return queryBuilder_.getMessage(); + } + } + + /** + * + * + *
            +       * Required. The user's search query.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Query query = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setQuery(com.google.cloud.discoveryengine.v1beta.Query value) { + if (queryBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + query_ = value; + } else { + queryBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
            +       * Required. The user's search query.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Query query = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setQuery( + com.google.cloud.discoveryengine.v1beta.Query.Builder builderForValue) { + if (queryBuilder_ == null) { + query_ = builderForValue.build(); + } else { + queryBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
            +       * Required. The user's search query.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Query query = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeQuery(com.google.cloud.discoveryengine.v1beta.Query value) { + if (queryBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && query_ != null + && query_ != com.google.cloud.discoveryengine.v1beta.Query.getDefaultInstance()) { + getQueryBuilder().mergeFrom(value); + } else { + query_ = value; + } + } else { + queryBuilder_.mergeFrom(value); + } + if (query_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + + /** + * + * + *
            +       * Required. The user's search query.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Query query = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearQuery() { + bitField0_ = (bitField0_ & ~0x00000004); + query_ = null; + if (queryBuilder_ != null) { + queryBuilder_.dispose(); + queryBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
            +       * Required. The user's search query.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Query query = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.discoveryengine.v1beta.Query.Builder getQueryBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return internalGetQueryFieldBuilder().getBuilder(); + } + + /** + * + * + *
            +       * Required. The user's search query.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Query query = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.discoveryengine.v1beta.QueryOrBuilder getQueryOrBuilder() { + if (queryBuilder_ != null) { + return queryBuilder_.getMessageOrBuilder(); + } else { + return query_ == null + ? com.google.cloud.discoveryengine.v1beta.Query.getDefaultInstance() + : query_; + } + } + + /** + * + * + *
            +       * Required. The user's search query.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Query query = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.Query, + com.google.cloud.discoveryengine.v1beta.Query.Builder, + com.google.cloud.discoveryengine.v1beta.QueryOrBuilder> + internalGetQueryFieldBuilder() { + if (queryBuilder_ == null) { + queryBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.Query, + com.google.cloud.discoveryengine.v1beta.Query.Builder, + com.google.cloud.discoveryengine.v1beta.QueryOrBuilder>( + getQuery(), getParentForChildren(), isClean()); + query_ = null; + } + return queryBuilder_; + } + + private java.lang.Object assistToken_ = ""; + + /** + * + * + *
            +       * Optional. The token which could be used to fetch the assistant log.
            +       * 
            + * + * string assist_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The assistToken. + */ + public java.lang.String getAssistToken() { + java.lang.Object ref = assistToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + assistToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
            +       * Optional. The token which could be used to fetch the assistant log.
            +       * 
            + * + * string assist_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for assistToken. + */ + public com.google.protobuf.ByteString getAssistTokenBytes() { + java.lang.Object ref = assistToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + assistToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
            +       * Optional. The token which could be used to fetch the assistant log.
            +       * 
            + * + * string assist_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The assistToken to set. + * @return This builder for chaining. + */ + public Builder setAssistToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + assistToken_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
            +       * Optional. The token which could be used to fetch the assistant log.
            +       * 
            + * + * string assist_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearAssistToken() { + assistToken_ = getDefaultInstance().getAssistToken(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + + /** + * + * + *
            +       * Optional. The token which could be used to fetch the assistant log.
            +       * 
            + * + * string assist_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for assistToken to set. + * @return This builder for chaining. + */ + public Builder setAssistTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + assistToken_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private java.lang.Object answerQueryToken_ = ""; + + /** + * + * + *
            +       * Optional. The token which could be used to fetch the answer log.
            +       * 
            + * + * string answer_query_token = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The answerQueryToken. + */ + public java.lang.String getAnswerQueryToken() { + java.lang.Object ref = answerQueryToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + answerQueryToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
            +       * Optional. The token which could be used to fetch the answer log.
            +       * 
            + * + * string answer_query_token = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for answerQueryToken. + */ + public com.google.protobuf.ByteString getAnswerQueryTokenBytes() { + java.lang.Object ref = answerQueryToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + answerQueryToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
            +       * Optional. The token which could be used to fetch the answer log.
            +       * 
            + * + * string answer_query_token = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The answerQueryToken to set. + * @return This builder for chaining. + */ + public Builder setAnswerQueryToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + answerQueryToken_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
            +       * Optional. The token which could be used to fetch the answer log.
            +       * 
            + * + * string answer_query_token = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearAnswerQueryToken() { + answerQueryToken_ = getDefaultInstance().getAnswerQueryToken(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + + /** + * + * + *
            +       * Optional. The token which could be used to fetch the answer log.
            +       * 
            + * + * string answer_query_token = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for answerQueryToken to set. + * @return This builder for chaining. + */ + public Builder setAnswerQueryTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + answerQueryToken_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.Feedback.ConversationInfo) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.Feedback.ConversationInfo) + private static final com.google.cloud.discoveryengine.v1beta.Feedback.ConversationInfo + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.discoveryengine.v1beta.Feedback.ConversationInfo(); + } + + public static com.google.cloud.discoveryengine.v1beta.Feedback.ConversationInfo + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ConversationInfo parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Feedback.ConversationInfo + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int bitField0_; + public static final int FEEDBACK_TYPE_FIELD_NUMBER = 1; + private int feedbackType_ = 0; + + /** + * + * + *
            +   * Required. Indicate whether the user gives a positive or negative feedback.
            +   * If the user gives a negative feedback, there might be more feedback
            +   * details.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Feedback.FeedbackType feedback_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for feedbackType. + */ + @java.lang.Override + public int getFeedbackTypeValue() { + return feedbackType_; + } + + /** + * + * + *
            +   * Required. Indicate whether the user gives a positive or negative feedback.
            +   * If the user gives a negative feedback, there might be more feedback
            +   * details.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Feedback.FeedbackType feedback_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The feedbackType. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Feedback.FeedbackType getFeedbackType() { + com.google.cloud.discoveryengine.v1beta.Feedback.FeedbackType result = + com.google.cloud.discoveryengine.v1beta.Feedback.FeedbackType.forNumber(feedbackType_); + return result == null + ? com.google.cloud.discoveryengine.v1beta.Feedback.FeedbackType.UNRECOGNIZED + : result; + } + + public static final int REASONS_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private com.google.protobuf.Internal.IntList reasons_ = emptyIntList(); + + private static final com.google.protobuf.Internal.IntListAdapter.IntConverter< + com.google.cloud.discoveryengine.v1beta.Feedback.Reason> + reasons_converter_ = + new com.google.protobuf.Internal.IntListAdapter.IntConverter< + com.google.cloud.discoveryengine.v1beta.Feedback.Reason>() { + public com.google.cloud.discoveryengine.v1beta.Feedback.Reason convert(int from) { + com.google.cloud.discoveryengine.v1beta.Feedback.Reason result = + com.google.cloud.discoveryengine.v1beta.Feedback.Reason.forNumber(from); + return result == null + ? com.google.cloud.discoveryengine.v1beta.Feedback.Reason.UNRECOGNIZED + : result; + } + }; + + /** + * + * + *
            +   * Optional. The reason if user gives a thumb down.
            +   * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Feedback.Reason reasons = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the reasons. + */ + @java.lang.Override + public java.util.List getReasonsList() { + return new com.google.protobuf.Internal.IntListAdapter< + com.google.cloud.discoveryengine.v1beta.Feedback.Reason>(reasons_, reasons_converter_); + } + + /** + * + * + *
            +   * Optional. The reason if user gives a thumb down.
            +   * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Feedback.Reason reasons = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The count of reasons. + */ + @java.lang.Override + public int getReasonsCount() { + return reasons_.size(); + } + + /** + * + * + *
            +   * Optional. The reason if user gives a thumb down.
            +   * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Feedback.Reason reasons = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the element to return. + * @return The reasons at the given index. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Feedback.Reason getReasons(int index) { + return reasons_converter_.convert(reasons_.getInt(index)); + } + + /** + * + * + *
            +   * Optional. The reason if user gives a thumb down.
            +   * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Feedback.Reason reasons = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the enum numeric values on the wire for reasons. + */ + @java.lang.Override + public java.util.List getReasonsValueList() { + return reasons_; + } + + /** + * + * + *
            +   * Optional. The reason if user gives a thumb down.
            +   * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Feedback.Reason reasons = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of reasons at the given index. + */ + @java.lang.Override + public int getReasonsValue(int index) { + return reasons_.getInt(index); + } + + private int reasonsMemoizedSerializedSize; + + public static final int COMMENT_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object comment_ = ""; + + /** + * + * + *
            +   * Optional. The additional user comment of the feedback if user gives a thumb
            +   * down.
            +   * 
            + * + * string comment = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The comment. + */ + @java.lang.Override + public java.lang.String getComment() { + java.lang.Object ref = comment_; + 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(); + comment_ = s; + return s; + } + } + + /** + * + * + *
            +   * Optional. The additional user comment of the feedback if user gives a thumb
            +   * down.
            +   * 
            + * + * string comment = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for comment. + */ + @java.lang.Override + public com.google.protobuf.ByteString getCommentBytes() { + java.lang.Object ref = comment_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + comment_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CONVERSATION_INFO_FIELD_NUMBER = 4; + private com.google.cloud.discoveryengine.v1beta.Feedback.ConversationInfo conversationInfo_; + + /** + * + * + *
            +   * The related conversation information when user gives feedback.
            +   * 
            + * + * .google.cloud.discoveryengine.v1beta.Feedback.ConversationInfo conversation_info = 4; + * + * + * @return Whether the conversationInfo field is set. + */ + @java.lang.Override + public boolean hasConversationInfo() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
            +   * The related conversation information when user gives feedback.
            +   * 
            + * + * .google.cloud.discoveryengine.v1beta.Feedback.ConversationInfo conversation_info = 4; + * + * + * @return The conversationInfo. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Feedback.ConversationInfo getConversationInfo() { + return conversationInfo_ == null + ? com.google.cloud.discoveryengine.v1beta.Feedback.ConversationInfo.getDefaultInstance() + : conversationInfo_; + } + + /** + * + * + *
            +   * The related conversation information when user gives feedback.
            +   * 
            + * + * .google.cloud.discoveryengine.v1beta.Feedback.ConversationInfo conversation_info = 4; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Feedback.ConversationInfoOrBuilder + getConversationInfoOrBuilder() { + return conversationInfo_ == null + ? com.google.cloud.discoveryengine.v1beta.Feedback.ConversationInfo.getDefaultInstance() + : conversationInfo_; + } + + public static final int LLM_MODEL_VERSION_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object llmModelVersion_ = ""; + + /** + * + * + *
            +   * The version of the LLM model that was used to generate the response.
            +   * 
            + * + * string llm_model_version = 5; + * + * @return The llmModelVersion. + */ + @java.lang.Override + public java.lang.String getLlmModelVersion() { + java.lang.Object ref = llmModelVersion_; + 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(); + llmModelVersion_ = s; + return s; + } + } + + /** + * + * + *
            +   * The version of the LLM model that was used to generate the response.
            +   * 
            + * + * string llm_model_version = 5; + * + * @return The bytes for llmModelVersion. + */ + @java.lang.Override + public com.google.protobuf.ByteString getLlmModelVersionBytes() { + java.lang.Object ref = llmModelVersion_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + llmModelVersion_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FEEDBACK_SOURCE_FIELD_NUMBER = 6; + private int feedbackSource_ = 0; + + /** + * + * + *
            +   * Optional. The UI component the user feedback comes from, which could be
            +   * GOOGLE_CONSOLE, GOOGLE_WIDGET, GOOGLE_WEBAPP.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Feedback.FeedbackSource feedback_source = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for feedbackSource. + */ + @java.lang.Override + public int getFeedbackSourceValue() { + return feedbackSource_; + } + + /** + * + * + *
            +   * Optional. The UI component the user feedback comes from, which could be
            +   * GOOGLE_CONSOLE, GOOGLE_WIDGET, GOOGLE_WEBAPP.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Feedback.FeedbackSource feedback_source = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The feedbackSource. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Feedback.FeedbackSource getFeedbackSource() { + com.google.cloud.discoveryengine.v1beta.Feedback.FeedbackSource result = + com.google.cloud.discoveryengine.v1beta.Feedback.FeedbackSource.forNumber(feedbackSource_); + return result == null + ? com.google.cloud.discoveryengine.v1beta.Feedback.FeedbackSource.UNRECOGNIZED + : result; + } + + public static final int COMPONENT_VERSION_FIELD_NUMBER = 7; + + @SuppressWarnings("serial") + private volatile java.lang.Object componentVersion_ = ""; + + /** + * + * + *
            +   * Optional. The version of the component that this report is being sent from.
            +   * 
            + * + * string component_version = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The componentVersion. + */ + @java.lang.Override + public java.lang.String getComponentVersion() { + java.lang.Object ref = componentVersion_; + 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(); + componentVersion_ = s; + return s; + } + } + + /** + * + * + *
            +   * Optional. The version of the component that this report is being sent from.
            +   * 
            + * + * string component_version = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for componentVersion. + */ + @java.lang.Override + public com.google.protobuf.ByteString getComponentVersionBytes() { + java.lang.Object ref = componentVersion_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + componentVersion_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DATA_TERMS_ACCEPTED_FIELD_NUMBER = 8; + private boolean dataTermsAccepted_ = false; + + /** + * + * + *
            +   * Optional. Whether the customer accepted data use terms.
            +   * 
            + * + * bool data_terms_accepted = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The dataTermsAccepted. + */ + @java.lang.Override + public boolean getDataTermsAccepted() { + return dataTermsAccepted_; + } + + 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 { + getSerializedSize(); + if (feedbackType_ + != com.google.cloud.discoveryengine.v1beta.Feedback.FeedbackType.FEEDBACK_TYPE_UNSPECIFIED + .getNumber()) { + output.writeEnum(1, feedbackType_); + } + if (getReasonsList().size() > 0) { + output.writeUInt32NoTag(18); + output.writeUInt32NoTag(reasonsMemoizedSerializedSize); + } + for (int i = 0; i < reasons_.size(); i++) { + output.writeEnumNoTag(reasons_.getInt(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(comment_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, comment_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(4, getConversationInfo()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(llmModelVersion_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 5, llmModelVersion_); + } + if (feedbackSource_ + != com.google.cloud.discoveryengine.v1beta.Feedback.FeedbackSource + .FEEDBACK_SOURCE_UNSPECIFIED + .getNumber()) { + output.writeEnum(6, feedbackSource_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(componentVersion_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 7, componentVersion_); + } + if (dataTermsAccepted_ != false) { + output.writeBool(8, dataTermsAccepted_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (feedbackType_ + != com.google.cloud.discoveryengine.v1beta.Feedback.FeedbackType.FEEDBACK_TYPE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, feedbackType_); + } + { + int dataSize = 0; + for (int i = 0; i < reasons_.size(); i++) { + dataSize += com.google.protobuf.CodedOutputStream.computeEnumSizeNoTag(reasons_.getInt(i)); + } + size += dataSize; + if (!getReasonsList().isEmpty()) { + size += 1; + size += com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(dataSize); + } + reasonsMemoizedSerializedSize = dataSize; + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(comment_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, comment_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getConversationInfo()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(llmModelVersion_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(5, llmModelVersion_); + } + if (feedbackSource_ + != com.google.cloud.discoveryengine.v1beta.Feedback.FeedbackSource + .FEEDBACK_SOURCE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(6, feedbackSource_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(componentVersion_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(7, componentVersion_); + } + if (dataTermsAccepted_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(8, dataTermsAccepted_); + } + 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.discoveryengine.v1beta.Feedback)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1beta.Feedback other = + (com.google.cloud.discoveryengine.v1beta.Feedback) obj; + + if (feedbackType_ != other.feedbackType_) return false; + if (!reasons_.equals(other.reasons_)) return false; + if (!getComment().equals(other.getComment())) return false; + if (hasConversationInfo() != other.hasConversationInfo()) return false; + if (hasConversationInfo()) { + if (!getConversationInfo().equals(other.getConversationInfo())) return false; + } + if (!getLlmModelVersion().equals(other.getLlmModelVersion())) return false; + if (feedbackSource_ != other.feedbackSource_) return false; + if (!getComponentVersion().equals(other.getComponentVersion())) return false; + if (getDataTermsAccepted() != other.getDataTermsAccepted()) 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) + FEEDBACK_TYPE_FIELD_NUMBER; + hash = (53 * hash) + feedbackType_; + if (getReasonsCount() > 0) { + hash = (37 * hash) + REASONS_FIELD_NUMBER; + hash = (53 * hash) + reasons_.hashCode(); + } + hash = (37 * hash) + COMMENT_FIELD_NUMBER; + hash = (53 * hash) + getComment().hashCode(); + if (hasConversationInfo()) { + hash = (37 * hash) + CONVERSATION_INFO_FIELD_NUMBER; + hash = (53 * hash) + getConversationInfo().hashCode(); + } + hash = (37 * hash) + LLM_MODEL_VERSION_FIELD_NUMBER; + hash = (53 * hash) + getLlmModelVersion().hashCode(); + hash = (37 * hash) + FEEDBACK_SOURCE_FIELD_NUMBER; + hash = (53 * hash) + feedbackSource_; + hash = (37 * hash) + COMPONENT_VERSION_FIELD_NUMBER; + hash = (53 * hash) + getComponentVersion().hashCode(); + hash = (37 * hash) + DATA_TERMS_ACCEPTED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getDataTermsAccepted()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1beta.Feedback parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.Feedback 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.discoveryengine.v1beta.Feedback parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.Feedback 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.discoveryengine.v1beta.Feedback parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.Feedback parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1beta.Feedback parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.Feedback 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.discoveryengine.v1beta.Feedback parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.Feedback 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.discoveryengine.v1beta.Feedback parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.Feedback 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.discoveryengine.v1beta.Feedback 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; + } + + /** + * + * + *
            +   * Information about the user feedback. This information will be used for
            +   * logging and metrics purpose.
            +   * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.Feedback} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.Feedback) + com.google.cloud.discoveryengine.v1beta.FeedbackOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.FeedbackProto + .internal_static_google_cloud_discoveryengine_v1beta_Feedback_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.FeedbackProto + .internal_static_google_cloud_discoveryengine_v1beta_Feedback_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.Feedback.class, + com.google.cloud.discoveryengine.v1beta.Feedback.Builder.class); + } + + // Construct using com.google.cloud.discoveryengine.v1beta.Feedback.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetConversationInfoFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + feedbackType_ = 0; + reasons_ = emptyIntList(); + comment_ = ""; + conversationInfo_ = null; + if (conversationInfoBuilder_ != null) { + conversationInfoBuilder_.dispose(); + conversationInfoBuilder_ = null; + } + llmModelVersion_ = ""; + feedbackSource_ = 0; + componentVersion_ = ""; + dataTermsAccepted_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1beta.FeedbackProto + .internal_static_google_cloud_discoveryengine_v1beta_Feedback_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Feedback getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1beta.Feedback.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Feedback build() { + com.google.cloud.discoveryengine.v1beta.Feedback result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Feedback buildPartial() { + com.google.cloud.discoveryengine.v1beta.Feedback result = + new com.google.cloud.discoveryengine.v1beta.Feedback(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.discoveryengine.v1beta.Feedback result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.feedbackType_ = feedbackType_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + reasons_.makeImmutable(); + result.reasons_ = reasons_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.comment_ = comment_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000008) != 0)) { + result.conversationInfo_ = + conversationInfoBuilder_ == null ? conversationInfo_ : conversationInfoBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.llmModelVersion_ = llmModelVersion_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.feedbackSource_ = feedbackSource_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.componentVersion_ = componentVersion_; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.dataTermsAccepted_ = dataTermsAccepted_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.discoveryengine.v1beta.Feedback) { + return mergeFrom((com.google.cloud.discoveryengine.v1beta.Feedback) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.discoveryengine.v1beta.Feedback other) { + if (other == com.google.cloud.discoveryengine.v1beta.Feedback.getDefaultInstance()) + return this; + if (other.feedbackType_ != 0) { + setFeedbackTypeValue(other.getFeedbackTypeValue()); + } + if (!other.reasons_.isEmpty()) { + if (reasons_.isEmpty()) { + reasons_ = other.reasons_; + reasons_.makeImmutable(); + bitField0_ |= 0x00000002; + } else { + ensureReasonsIsMutable(); + reasons_.addAll(other.reasons_); + } + onChanged(); + } + if (!other.getComment().isEmpty()) { + comment_ = other.comment_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (other.hasConversationInfo()) { + mergeConversationInfo(other.getConversationInfo()); + } + if (!other.getLlmModelVersion().isEmpty()) { + llmModelVersion_ = other.llmModelVersion_; + bitField0_ |= 0x00000010; + onChanged(); + } + if (other.feedbackSource_ != 0) { + setFeedbackSourceValue(other.getFeedbackSourceValue()); + } + if (!other.getComponentVersion().isEmpty()) { + componentVersion_ = other.componentVersion_; + bitField0_ |= 0x00000040; + onChanged(); + } + if (other.getDataTermsAccepted() != false) { + setDataTermsAccepted(other.getDataTermsAccepted()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + feedbackType_ = input.readEnum(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 16: + { + int tmpRaw = input.readEnum(); + ensureReasonsIsMutable(); + reasons_.addInt(tmpRaw); + break; + } // case 16 + case 18: + { + int length = input.readRawVarint32(); + int limit = input.pushLimit(length); + ensureReasonsIsMutable(); + while (input.getBytesUntilLimit() > 0) { + reasons_.addInt(input.readEnum()); + } + input.popLimit(limit); + break; + } // case 18 + case 26: + { + comment_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + input.readMessage( + internalGetConversationInfoFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + llmModelVersion_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 48: + { + feedbackSource_ = input.readEnum(); + bitField0_ |= 0x00000020; + break; + } // case 48 + case 58: + { + componentVersion_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000040; + break; + } // case 58 + case 64: + { + dataTermsAccepted_ = input.readBool(); + bitField0_ |= 0x00000080; + break; + } // case 64 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private int feedbackType_ = 0; + + /** + * + * + *
            +     * Required. Indicate whether the user gives a positive or negative feedback.
            +     * If the user gives a negative feedback, there might be more feedback
            +     * details.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Feedback.FeedbackType feedback_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for feedbackType. + */ + @java.lang.Override + public int getFeedbackTypeValue() { + return feedbackType_; + } + + /** + * + * + *
            +     * Required. Indicate whether the user gives a positive or negative feedback.
            +     * If the user gives a negative feedback, there might be more feedback
            +     * details.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Feedback.FeedbackType feedback_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The enum numeric value on the wire for feedbackType to set. + * @return This builder for chaining. + */ + public Builder setFeedbackTypeValue(int value) { + feedbackType_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Required. Indicate whether the user gives a positive or negative feedback.
            +     * If the user gives a negative feedback, there might be more feedback
            +     * details.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Feedback.FeedbackType feedback_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The feedbackType. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Feedback.FeedbackType getFeedbackType() { + com.google.cloud.discoveryengine.v1beta.Feedback.FeedbackType result = + com.google.cloud.discoveryengine.v1beta.Feedback.FeedbackType.forNumber(feedbackType_); + return result == null + ? com.google.cloud.discoveryengine.v1beta.Feedback.FeedbackType.UNRECOGNIZED + : result; + } + + /** + * + * + *
            +     * Required. Indicate whether the user gives a positive or negative feedback.
            +     * If the user gives a negative feedback, there might be more feedback
            +     * details.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Feedback.FeedbackType feedback_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The feedbackType to set. + * @return This builder for chaining. + */ + public Builder setFeedbackType( + com.google.cloud.discoveryengine.v1beta.Feedback.FeedbackType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + feedbackType_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
            +     * Required. Indicate whether the user gives a positive or negative feedback.
            +     * If the user gives a negative feedback, there might be more feedback
            +     * details.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Feedback.FeedbackType feedback_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return This builder for chaining. + */ + public Builder clearFeedbackType() { + bitField0_ = (bitField0_ & ~0x00000001); + feedbackType_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.Internal.IntList reasons_ = emptyIntList(); + + private void ensureReasonsIsMutable() { + if (!reasons_.isModifiable()) { + reasons_ = makeMutableCopy(reasons_); + } + bitField0_ |= 0x00000002; + } + + /** + * + * + *
            +     * Optional. The reason if user gives a thumb down.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Feedback.Reason reasons = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the reasons. + */ + public java.util.List + getReasonsList() { + return new com.google.protobuf.Internal.IntListAdapter< + com.google.cloud.discoveryengine.v1beta.Feedback.Reason>(reasons_, reasons_converter_); + } + + /** + * + * + *
            +     * Optional. The reason if user gives a thumb down.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Feedback.Reason reasons = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The count of reasons. + */ + public int getReasonsCount() { + return reasons_.size(); + } + + /** + * + * + *
            +     * Optional. The reason if user gives a thumb down.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Feedback.Reason reasons = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the element to return. + * @return The reasons at the given index. + */ + public com.google.cloud.discoveryengine.v1beta.Feedback.Reason getReasons(int index) { + return reasons_converter_.convert(reasons_.getInt(index)); + } + + /** + * + * + *
            +     * Optional. The reason if user gives a thumb down.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Feedback.Reason reasons = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index to set the value at. + * @param value The reasons to set. + * @return This builder for chaining. + */ + public Builder setReasons( + int index, com.google.cloud.discoveryengine.v1beta.Feedback.Reason value) { + if (value == null) { + throw new NullPointerException(); + } + ensureReasonsIsMutable(); + reasons_.setInt(index, value.getNumber()); + onChanged(); + return this; + } + + /** + * + * + *
            +     * Optional. The reason if user gives a thumb down.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Feedback.Reason reasons = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The reasons to add. + * @return This builder for chaining. + */ + public Builder addReasons(com.google.cloud.discoveryengine.v1beta.Feedback.Reason value) { + if (value == null) { + throw new NullPointerException(); + } + ensureReasonsIsMutable(); + reasons_.addInt(value.getNumber()); + onChanged(); + return this; + } + + /** + * + * + *
            +     * Optional. The reason if user gives a thumb down.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Feedback.Reason reasons = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param values The reasons to add. + * @return This builder for chaining. + */ + public Builder addAllReasons( + java.lang.Iterable + values) { + ensureReasonsIsMutable(); + for (com.google.cloud.discoveryengine.v1beta.Feedback.Reason value : values) { + reasons_.addInt(value.getNumber()); + } + onChanged(); + return this; + } + + /** + * + * + *
            +     * Optional. The reason if user gives a thumb down.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Feedback.Reason reasons = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearReasons() { + reasons_ = emptyIntList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
            +     * Optional. The reason if user gives a thumb down.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Feedback.Reason reasons = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the enum numeric values on the wire for reasons. + */ + public java.util.List getReasonsValueList() { + reasons_.makeImmutable(); + return reasons_; + } + + /** + * + * + *
            +     * Optional. The reason if user gives a thumb down.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Feedback.Reason reasons = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of reasons at the given index. + */ + public int getReasonsValue(int index) { + return reasons_.getInt(index); + } + + /** + * + * + *
            +     * Optional. The reason if user gives a thumb down.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Feedback.Reason reasons = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index to set the value at. + * @param value The enum numeric value on the wire for reasons to set. + * @return This builder for chaining. + */ + public Builder setReasonsValue(int index, int value) { + ensureReasonsIsMutable(); + reasons_.setInt(index, value); + onChanged(); + return this; + } + + /** + * + * + *
            +     * Optional. The reason if user gives a thumb down.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Feedback.Reason reasons = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The enum numeric value on the wire for reasons to add. + * @return This builder for chaining. + */ + public Builder addReasonsValue(int value) { + ensureReasonsIsMutable(); + reasons_.addInt(value); + onChanged(); + return this; + } + + /** + * + * + *
            +     * Optional. The reason if user gives a thumb down.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Feedback.Reason reasons = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param values The enum numeric values on the wire for reasons to add. + * @return This builder for chaining. + */ + public Builder addAllReasonsValue(java.lang.Iterable values) { + ensureReasonsIsMutable(); + for (int value : values) { + reasons_.addInt(value); + } + onChanged(); + return this; + } + + private java.lang.Object comment_ = ""; + + /** + * + * + *
            +     * Optional. The additional user comment of the feedback if user gives a thumb
            +     * down.
            +     * 
            + * + * string comment = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The comment. + */ + public java.lang.String getComment() { + java.lang.Object ref = comment_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + comment_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
            +     * Optional. The additional user comment of the feedback if user gives a thumb
            +     * down.
            +     * 
            + * + * string comment = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for comment. + */ + public com.google.protobuf.ByteString getCommentBytes() { + java.lang.Object ref = comment_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + comment_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
            +     * Optional. The additional user comment of the feedback if user gives a thumb
            +     * down.
            +     * 
            + * + * string comment = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The comment to set. + * @return This builder for chaining. + */ + public Builder setComment(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + comment_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Optional. The additional user comment of the feedback if user gives a thumb
            +     * down.
            +     * 
            + * + * string comment = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearComment() { + comment_ = getDefaultInstance().getComment(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
            +     * Optional. The additional user comment of the feedback if user gives a thumb
            +     * down.
            +     * 
            + * + * string comment = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for comment to set. + * @return This builder for chaining. + */ + public Builder setCommentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + comment_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private com.google.cloud.discoveryengine.v1beta.Feedback.ConversationInfo conversationInfo_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.Feedback.ConversationInfo, + com.google.cloud.discoveryengine.v1beta.Feedback.ConversationInfo.Builder, + com.google.cloud.discoveryengine.v1beta.Feedback.ConversationInfoOrBuilder> + conversationInfoBuilder_; + + /** + * + * + *
            +     * The related conversation information when user gives feedback.
            +     * 
            + * + * .google.cloud.discoveryengine.v1beta.Feedback.ConversationInfo conversation_info = 4; + * + * + * @return Whether the conversationInfo field is set. + */ + public boolean hasConversationInfo() { + return ((bitField0_ & 0x00000008) != 0); + } + + /** + * + * + *
            +     * The related conversation information when user gives feedback.
            +     * 
            + * + * .google.cloud.discoveryengine.v1beta.Feedback.ConversationInfo conversation_info = 4; + * + * + * @return The conversationInfo. + */ + public com.google.cloud.discoveryengine.v1beta.Feedback.ConversationInfo getConversationInfo() { + if (conversationInfoBuilder_ == null) { + return conversationInfo_ == null + ? com.google.cloud.discoveryengine.v1beta.Feedback.ConversationInfo.getDefaultInstance() + : conversationInfo_; + } else { + return conversationInfoBuilder_.getMessage(); + } + } + + /** + * + * + *
            +     * The related conversation information when user gives feedback.
            +     * 
            + * + * .google.cloud.discoveryengine.v1beta.Feedback.ConversationInfo conversation_info = 4; + * + */ + public Builder setConversationInfo( + com.google.cloud.discoveryengine.v1beta.Feedback.ConversationInfo value) { + if (conversationInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + conversationInfo_ = value; + } else { + conversationInfoBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
            +     * The related conversation information when user gives feedback.
            +     * 
            + * + * .google.cloud.discoveryengine.v1beta.Feedback.ConversationInfo conversation_info = 4; + * + */ + public Builder setConversationInfo( + com.google.cloud.discoveryengine.v1beta.Feedback.ConversationInfo.Builder builderForValue) { + if (conversationInfoBuilder_ == null) { + conversationInfo_ = builderForValue.build(); + } else { + conversationInfoBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
            +     * The related conversation information when user gives feedback.
            +     * 
            + * + * .google.cloud.discoveryengine.v1beta.Feedback.ConversationInfo conversation_info = 4; + * + */ + public Builder mergeConversationInfo( + com.google.cloud.discoveryengine.v1beta.Feedback.ConversationInfo value) { + if (conversationInfoBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) + && conversationInfo_ != null + && conversationInfo_ + != com.google.cloud.discoveryengine.v1beta.Feedback.ConversationInfo + .getDefaultInstance()) { + getConversationInfoBuilder().mergeFrom(value); + } else { + conversationInfo_ = value; + } + } else { + conversationInfoBuilder_.mergeFrom(value); + } + if (conversationInfo_ != null) { + bitField0_ |= 0x00000008; + onChanged(); + } + return this; + } + + /** + * + * + *
            +     * The related conversation information when user gives feedback.
            +     * 
            + * + * .google.cloud.discoveryengine.v1beta.Feedback.ConversationInfo conversation_info = 4; + * + */ + public Builder clearConversationInfo() { + bitField0_ = (bitField0_ & ~0x00000008); + conversationInfo_ = null; + if (conversationInfoBuilder_ != null) { + conversationInfoBuilder_.dispose(); + conversationInfoBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
            +     * The related conversation information when user gives feedback.
            +     * 
            + * + * .google.cloud.discoveryengine.v1beta.Feedback.ConversationInfo conversation_info = 4; + * + */ + public com.google.cloud.discoveryengine.v1beta.Feedback.ConversationInfo.Builder + getConversationInfoBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return internalGetConversationInfoFieldBuilder().getBuilder(); + } + + /** + * + * + *
            +     * The related conversation information when user gives feedback.
            +     * 
            + * + * .google.cloud.discoveryengine.v1beta.Feedback.ConversationInfo conversation_info = 4; + * + */ + public com.google.cloud.discoveryengine.v1beta.Feedback.ConversationInfoOrBuilder + getConversationInfoOrBuilder() { + if (conversationInfoBuilder_ != null) { + return conversationInfoBuilder_.getMessageOrBuilder(); + } else { + return conversationInfo_ == null + ? com.google.cloud.discoveryengine.v1beta.Feedback.ConversationInfo.getDefaultInstance() + : conversationInfo_; + } + } + + /** + * + * + *
            +     * The related conversation information when user gives feedback.
            +     * 
            + * + * .google.cloud.discoveryengine.v1beta.Feedback.ConversationInfo conversation_info = 4; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.Feedback.ConversationInfo, + com.google.cloud.discoveryengine.v1beta.Feedback.ConversationInfo.Builder, + com.google.cloud.discoveryengine.v1beta.Feedback.ConversationInfoOrBuilder> + internalGetConversationInfoFieldBuilder() { + if (conversationInfoBuilder_ == null) { + conversationInfoBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.Feedback.ConversationInfo, + com.google.cloud.discoveryengine.v1beta.Feedback.ConversationInfo.Builder, + com.google.cloud.discoveryengine.v1beta.Feedback.ConversationInfoOrBuilder>( + getConversationInfo(), getParentForChildren(), isClean()); + conversationInfo_ = null; + } + return conversationInfoBuilder_; + } + + private java.lang.Object llmModelVersion_ = ""; + + /** + * + * + *
            +     * The version of the LLM model that was used to generate the response.
            +     * 
            + * + * string llm_model_version = 5; + * + * @return The llmModelVersion. + */ + public java.lang.String getLlmModelVersion() { + java.lang.Object ref = llmModelVersion_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + llmModelVersion_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
            +     * The version of the LLM model that was used to generate the response.
            +     * 
            + * + * string llm_model_version = 5; + * + * @return The bytes for llmModelVersion. + */ + public com.google.protobuf.ByteString getLlmModelVersionBytes() { + java.lang.Object ref = llmModelVersion_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + llmModelVersion_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
            +     * The version of the LLM model that was used to generate the response.
            +     * 
            + * + * string llm_model_version = 5; + * + * @param value The llmModelVersion to set. + * @return This builder for chaining. + */ + public Builder setLlmModelVersion(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + llmModelVersion_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
            +     * The version of the LLM model that was used to generate the response.
            +     * 
            + * + * string llm_model_version = 5; + * + * @return This builder for chaining. + */ + public Builder clearLlmModelVersion() { + llmModelVersion_ = getDefaultInstance().getLlmModelVersion(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + + /** + * + * + *
            +     * The version of the LLM model that was used to generate the response.
            +     * 
            + * + * string llm_model_version = 5; + * + * @param value The bytes for llmModelVersion to set. + * @return This builder for chaining. + */ + public Builder setLlmModelVersionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + llmModelVersion_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + private int feedbackSource_ = 0; + + /** + * + * + *
            +     * Optional. The UI component the user feedback comes from, which could be
            +     * GOOGLE_CONSOLE, GOOGLE_WIDGET, GOOGLE_WEBAPP.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Feedback.FeedbackSource feedback_source = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for feedbackSource. + */ + @java.lang.Override + public int getFeedbackSourceValue() { + return feedbackSource_; + } + + /** + * + * + *
            +     * Optional. The UI component the user feedback comes from, which could be
            +     * GOOGLE_CONSOLE, GOOGLE_WIDGET, GOOGLE_WEBAPP.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Feedback.FeedbackSource feedback_source = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The enum numeric value on the wire for feedbackSource to set. + * @return This builder for chaining. + */ + public Builder setFeedbackSourceValue(int value) { + feedbackSource_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Optional. The UI component the user feedback comes from, which could be
            +     * GOOGLE_CONSOLE, GOOGLE_WIDGET, GOOGLE_WEBAPP.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Feedback.FeedbackSource feedback_source = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The feedbackSource. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Feedback.FeedbackSource getFeedbackSource() { + com.google.cloud.discoveryengine.v1beta.Feedback.FeedbackSource result = + com.google.cloud.discoveryengine.v1beta.Feedback.FeedbackSource.forNumber( + feedbackSource_); + return result == null + ? com.google.cloud.discoveryengine.v1beta.Feedback.FeedbackSource.UNRECOGNIZED + : result; + } + + /** + * + * + *
            +     * Optional. The UI component the user feedback comes from, which could be
            +     * GOOGLE_CONSOLE, GOOGLE_WIDGET, GOOGLE_WEBAPP.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Feedback.FeedbackSource feedback_source = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The feedbackSource to set. + * @return This builder for chaining. + */ + public Builder setFeedbackSource( + com.google.cloud.discoveryengine.v1beta.Feedback.FeedbackSource value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000020; + feedbackSource_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
            +     * Optional. The UI component the user feedback comes from, which could be
            +     * GOOGLE_CONSOLE, GOOGLE_WIDGET, GOOGLE_WEBAPP.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Feedback.FeedbackSource feedback_source = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearFeedbackSource() { + bitField0_ = (bitField0_ & ~0x00000020); + feedbackSource_ = 0; + onChanged(); + return this; + } + + private java.lang.Object componentVersion_ = ""; + + /** + * + * + *
            +     * Optional. The version of the component that this report is being sent from.
            +     * 
            + * + * string component_version = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The componentVersion. + */ + public java.lang.String getComponentVersion() { + java.lang.Object ref = componentVersion_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + componentVersion_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
            +     * Optional. The version of the component that this report is being sent from.
            +     * 
            + * + * string component_version = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for componentVersion. + */ + public com.google.protobuf.ByteString getComponentVersionBytes() { + java.lang.Object ref = componentVersion_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + componentVersion_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
            +     * Optional. The version of the component that this report is being sent from.
            +     * 
            + * + * string component_version = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The componentVersion to set. + * @return This builder for chaining. + */ + public Builder setComponentVersion(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + componentVersion_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Optional. The version of the component that this report is being sent from.
            +     * 
            + * + * string component_version = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearComponentVersion() { + componentVersion_ = getDefaultInstance().getComponentVersion(); + bitField0_ = (bitField0_ & ~0x00000040); + onChanged(); + return this; + } + + /** + * + * + *
            +     * Optional. The version of the component that this report is being sent from.
            +     * 
            + * + * string component_version = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for componentVersion to set. + * @return This builder for chaining. + */ + public Builder setComponentVersionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + componentVersion_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + private boolean dataTermsAccepted_; + + /** + * + * + *
            +     * Optional. Whether the customer accepted data use terms.
            +     * 
            + * + * bool data_terms_accepted = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The dataTermsAccepted. + */ + @java.lang.Override + public boolean getDataTermsAccepted() { + return dataTermsAccepted_; + } + + /** + * + * + *
            +     * Optional. Whether the customer accepted data use terms.
            +     * 
            + * + * bool data_terms_accepted = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The dataTermsAccepted to set. + * @return This builder for chaining. + */ + public Builder setDataTermsAccepted(boolean value) { + + dataTermsAccepted_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Optional. Whether the customer accepted data use terms.
            +     * 
            + * + * bool data_terms_accepted = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearDataTermsAccepted() { + bitField0_ = (bitField0_ & ~0x00000080); + dataTermsAccepted_ = false; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.Feedback) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.Feedback) + private static final com.google.cloud.discoveryengine.v1beta.Feedback DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.discoveryengine.v1beta.Feedback(); + } + + public static com.google.cloud.discoveryengine.v1beta.Feedback getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Feedback parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Feedback getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/FeedbackOrBuilder.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/FeedbackOrBuilder.java new file mode 100644 index 000000000000..70901dd346e0 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/FeedbackOrBuilder.java @@ -0,0 +1,305 @@ +/* + * 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/cloud/discoveryengine/v1beta/feedback.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.discoveryengine.v1beta; + +@com.google.protobuf.Generated +public interface FeedbackOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.Feedback) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
            +   * Required. Indicate whether the user gives a positive or negative feedback.
            +   * If the user gives a negative feedback, there might be more feedback
            +   * details.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Feedback.FeedbackType feedback_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for feedbackType. + */ + int getFeedbackTypeValue(); + + /** + * + * + *
            +   * Required. Indicate whether the user gives a positive or negative feedback.
            +   * If the user gives a negative feedback, there might be more feedback
            +   * details.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Feedback.FeedbackType feedback_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The feedbackType. + */ + com.google.cloud.discoveryengine.v1beta.Feedback.FeedbackType getFeedbackType(); + + /** + * + * + *
            +   * Optional. The reason if user gives a thumb down.
            +   * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Feedback.Reason reasons = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the reasons. + */ + java.util.List getReasonsList(); + + /** + * + * + *
            +   * Optional. The reason if user gives a thumb down.
            +   * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Feedback.Reason reasons = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The count of reasons. + */ + int getReasonsCount(); + + /** + * + * + *
            +   * Optional. The reason if user gives a thumb down.
            +   * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Feedback.Reason reasons = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the element to return. + * @return The reasons at the given index. + */ + com.google.cloud.discoveryengine.v1beta.Feedback.Reason getReasons(int index); + + /** + * + * + *
            +   * Optional. The reason if user gives a thumb down.
            +   * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Feedback.Reason reasons = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the enum numeric values on the wire for reasons. + */ + java.util.List getReasonsValueList(); + + /** + * + * + *
            +   * Optional. The reason if user gives a thumb down.
            +   * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Feedback.Reason reasons = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of reasons at the given index. + */ + int getReasonsValue(int index); + + /** + * + * + *
            +   * Optional. The additional user comment of the feedback if user gives a thumb
            +   * down.
            +   * 
            + * + * string comment = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The comment. + */ + java.lang.String getComment(); + + /** + * + * + *
            +   * Optional. The additional user comment of the feedback if user gives a thumb
            +   * down.
            +   * 
            + * + * string comment = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for comment. + */ + com.google.protobuf.ByteString getCommentBytes(); + + /** + * + * + *
            +   * The related conversation information when user gives feedback.
            +   * 
            + * + * .google.cloud.discoveryengine.v1beta.Feedback.ConversationInfo conversation_info = 4; + * + * + * @return Whether the conversationInfo field is set. + */ + boolean hasConversationInfo(); + + /** + * + * + *
            +   * The related conversation information when user gives feedback.
            +   * 
            + * + * .google.cloud.discoveryengine.v1beta.Feedback.ConversationInfo conversation_info = 4; + * + * + * @return The conversationInfo. + */ + com.google.cloud.discoveryengine.v1beta.Feedback.ConversationInfo getConversationInfo(); + + /** + * + * + *
            +   * The related conversation information when user gives feedback.
            +   * 
            + * + * .google.cloud.discoveryengine.v1beta.Feedback.ConversationInfo conversation_info = 4; + * + */ + com.google.cloud.discoveryengine.v1beta.Feedback.ConversationInfoOrBuilder + getConversationInfoOrBuilder(); + + /** + * + * + *
            +   * The version of the LLM model that was used to generate the response.
            +   * 
            + * + * string llm_model_version = 5; + * + * @return The llmModelVersion. + */ + java.lang.String getLlmModelVersion(); + + /** + * + * + *
            +   * The version of the LLM model that was used to generate the response.
            +   * 
            + * + * string llm_model_version = 5; + * + * @return The bytes for llmModelVersion. + */ + com.google.protobuf.ByteString getLlmModelVersionBytes(); + + /** + * + * + *
            +   * Optional. The UI component the user feedback comes from, which could be
            +   * GOOGLE_CONSOLE, GOOGLE_WIDGET, GOOGLE_WEBAPP.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Feedback.FeedbackSource feedback_source = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for feedbackSource. + */ + int getFeedbackSourceValue(); + + /** + * + * + *
            +   * Optional. The UI component the user feedback comes from, which could be
            +   * GOOGLE_CONSOLE, GOOGLE_WIDGET, GOOGLE_WEBAPP.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Feedback.FeedbackSource feedback_source = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The feedbackSource. + */ + com.google.cloud.discoveryengine.v1beta.Feedback.FeedbackSource getFeedbackSource(); + + /** + * + * + *
            +   * Optional. The version of the component that this report is being sent from.
            +   * 
            + * + * string component_version = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The componentVersion. + */ + java.lang.String getComponentVersion(); + + /** + * + * + *
            +   * Optional. The version of the component that this report is being sent from.
            +   * 
            + * + * string component_version = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for componentVersion. + */ + com.google.protobuf.ByteString getComponentVersionBytes(); + + /** + * + * + *
            +   * Optional. Whether the customer accepted data use terms.
            +   * 
            + * + * bool data_terms_accepted = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The dataTermsAccepted. + */ + boolean getDataTermsAccepted(); +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/FeedbackProto.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/FeedbackProto.java new file mode 100644 index 000000000000..85e892c96b40 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/FeedbackProto.java @@ -0,0 +1,154 @@ +/* + * 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/cloud/discoveryengine/v1beta/feedback.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.discoveryengine.v1beta; + +@com.google.protobuf.Generated +public final class FeedbackProto extends com.google.protobuf.GeneratedFile { + private FeedbackProto() {} + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "FeedbackProto"); + } + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1beta_Feedback_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1beta_Feedback_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1beta_Feedback_ConversationInfo_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1beta_Feedback_ConversationInfo_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n" + + "2google/cloud/discoveryengine/v1beta/feedback.proto\022#google.cloud.discoveryengi" + + "ne.v1beta\032\037google/api/field_behavior.pro" + + "to\0321google/cloud/discoveryengine/v1beta/session.proto\"\325\010\n" + + "\010Feedback\022V\n\r" + + "feedback_type\030\001" + + " \001(\0162:.google.cloud.discoveryengine.v1beta.Feedback.FeedbackTypeB\003\340A\002\022J\n" + + "\007reasons\030\002" + + " \003(\01624.google.cloud.discoveryengine.v1beta.Feedback.ReasonB\003\340A\001\022\024\n" + + "\007comment\030\003 \001(\tB\003\340A\001\022Y\n" + + "\021conversation_info\030\004 \001(\0132" + + ">.google.cloud.discoveryengine.v1beta.Feedback.ConversationInfo\022\031\n" + + "\021llm_model_version\030\005 \001(\t\022Z\n" + + "\017feedback_source\030\006 \001(\0162<.go" + + "ogle.cloud.discoveryengine.v1beta.Feedback.FeedbackSourceB\003\340A\001\022\036\n" + + "\021component_version\030\007 \001(\tB\003\340A\001\022 \n" + + "\023data_terms_accepted\030\010 \001(\010B\003\340A\001\032\267\001\n" + + "\020ConversationInfo\022\026\n" + + "\016question_index\030\001 \001(\005\022\017\n" + + "\007session\030\002 \001(\t\022>\n" + + "\005query\030\003" + + " \001(\0132*.google.cloud.discoveryengine.v1beta.QueryB\003\340A\002\022\031\n" + + "\014assist_token\030\004 \001(\tB\003\340A\001\022\037\n" + + "\022answer_query_token\030\005 \001(\tB\003\340A\001\"D\n" + + "\014FeedbackType\022\035\n" + + "\031FEEDBACK_TYPE_UNSPECIFIED\020\000\022\010\n" + + "\004LIKE\020\001\022\013\n" + + "\007DISLIKE\020\002\"\356\001\n" + + "\006Reason\022\026\n" + + "\022REASON_UNSPECIFIED\020\000\022\027\n" + + "\023INACCURATE_RESPONSE\020\001\022\020\n" + + "\014NOT_RELEVANT\020\002\022\023\n" + + "\017INCOMPREHENSIVE\020\003\022\027\n" + + "\023OFFENSIVE_OR_UNSAFE\020\004\022\025\n" + + "\021FORMAT_AND_STYLES\020\006\022\020\n" + + "\014BAD_CITATION\020\007\022\030\n" + + "\024CANVAS_NOT_GENERATED\020\010\022\026\n" + + "\022CANVAS_QUALITY_BAD\020\t\022\030\n" + + "\024CANVAS_EXPORT_FAILED\020\n" + + "\"\211\001\n" + + "\016FeedbackSource\022\037\n" + + "\033FEEDBACK_SOURCE_UNSPECIFIED\020\000\022\022\n" + + "\016GOOGLE_CONSOLE\020\001\022\021\n\r" + + "GOOGLE_WIDGET\020\002\022\021\n\r" + + "GOOGLE_WEBAPP\020\003\022\034\n" + + "\030GOOGLE_AGENTSPACE_MOBILE\020\004B\224\002\n" + + "\'com.google.cloud.discoveryengine.v1betaB\r" + + "FeedbackProtoP\001ZQcloud.google.com/go/discoveryengine/apiv1beta/discov" + + "eryenginepb;discoveryenginepb\242\002\017DISCOVER" + + "YENGINE\252\002#Google.Cloud.DiscoveryEngine.V" + + "1Beta\312\002#Google\\Cloud\\DiscoveryEngine\\V1b" + + "eta\352\002&Google::Cloud::DiscoveryEngine::V1betab\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.cloud.discoveryengine.v1beta.SessionProto.getDescriptor(), + }); + internal_static_google_cloud_discoveryengine_v1beta_Feedback_descriptor = + getDescriptor().getMessageType(0); + internal_static_google_cloud_discoveryengine_v1beta_Feedback_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1beta_Feedback_descriptor, + new java.lang.String[] { + "FeedbackType", + "Reasons", + "Comment", + "ConversationInfo", + "LlmModelVersion", + "FeedbackSource", + "ComponentVersion", + "DataTermsAccepted", + }); + internal_static_google_cloud_discoveryengine_v1beta_Feedback_ConversationInfo_descriptor = + internal_static_google_cloud_discoveryengine_v1beta_Feedback_descriptor.getNestedType(0); + internal_static_google_cloud_discoveryengine_v1beta_Feedback_ConversationInfo_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1beta_Feedback_ConversationInfo_descriptor, + new java.lang.String[] { + "QuestionIndex", "Session", "Query", "AssistToken", "AnswerQueryToken", + }); + descriptor.resolveAllFeaturesImmutable(); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.cloud.discoveryengine.v1beta.SessionProto.getDescriptor(); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/FhirStoreSource.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/FhirStoreSource.java index 3c949c2675dd..62d4d7071b3d 100644 --- a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/FhirStoreSource.java +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/FhirStoreSource.java @@ -270,6 +270,34 @@ public com.google.protobuf.ByteString getResourceTypesBytes(int index) { return resourceTypes_.getByteString(index); } + public static final int UPDATE_FROM_LATEST_PREDEFINED_SCHEMA_FIELD_NUMBER = 4; + private boolean updateFromLatestPredefinedSchema_ = false; + + /** + * + * + *
            +   * Optional. Whether to update the DataStore schema to the latest predefined
            +   * schema.
            +   *
            +   * If true, the DataStore schema will be updated to include any FHIR fields
            +   * or resource types that have been added since the last import and
            +   * corresponding FHIR resources will be imported from the FHIR store.
            +   *
            +   * Note this field cannot be used in conjunction with `resource_types`. It
            +   * should be used after initial import.
            +   * 
            + * + * bool update_from_latest_predefined_schema = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The updateFromLatestPredefinedSchema. + */ + @java.lang.Override + public boolean getUpdateFromLatestPredefinedSchema() { + return updateFromLatestPredefinedSchema_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -293,6 +321,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < resourceTypes_.size(); i++) { com.google.protobuf.GeneratedMessage.writeString(output, 3, resourceTypes_.getRaw(i)); } + if (updateFromLatestPredefinedSchema_ != false) { + output.writeBool(4, updateFromLatestPredefinedSchema_); + } getUnknownFields().writeTo(output); } @@ -316,6 +347,11 @@ public int getSerializedSize() { size += dataSize; size += 1 * getResourceTypesList().size(); } + if (updateFromLatestPredefinedSchema_ != false) { + size += + com.google.protobuf.CodedOutputStream.computeBoolSize( + 4, updateFromLatestPredefinedSchema_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -335,6 +371,8 @@ public boolean equals(final java.lang.Object obj) { if (!getFhirStore().equals(other.getFhirStore())) return false; if (!getGcsStagingDir().equals(other.getGcsStagingDir())) return false; if (!getResourceTypesList().equals(other.getResourceTypesList())) return false; + if (getUpdateFromLatestPredefinedSchema() != other.getUpdateFromLatestPredefinedSchema()) + return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -354,6 +392,10 @@ public int hashCode() { hash = (37 * hash) + RESOURCE_TYPES_FIELD_NUMBER; hash = (53 * hash) + getResourceTypesList().hashCode(); } + hash = (37 * hash) + UPDATE_FROM_LATEST_PREDEFINED_SCHEMA_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashBoolean(getUpdateFromLatestPredefinedSchema()); hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -498,6 +540,7 @@ public Builder clear() { fhirStore_ = ""; gcsStagingDir_ = ""; resourceTypes_ = com.google.protobuf.LazyStringArrayList.emptyList(); + updateFromLatestPredefinedSchema_ = false; return this; } @@ -544,6 +587,9 @@ private void buildPartial0(com.google.cloud.discoveryengine.v1beta.FhirStoreSour resourceTypes_.makeImmutable(); result.resourceTypes_ = resourceTypes_; } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.updateFromLatestPredefinedSchema_ = updateFromLatestPredefinedSchema_; + } } @java.lang.Override @@ -579,6 +625,9 @@ public Builder mergeFrom(com.google.cloud.discoveryengine.v1beta.FhirStoreSource } onChanged(); } + if (other.getUpdateFromLatestPredefinedSchema() != false) { + setUpdateFromLatestPredefinedSchema(other.getUpdateFromLatestPredefinedSchema()); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -624,6 +673,12 @@ public Builder mergeFrom( resourceTypes_.add(s); break; } // case 26 + case 32: + { + updateFromLatestPredefinedSchema_ = input.readBool(); + bitField0_ |= 0x00000008; + break; + } // case 32 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -1105,6 +1160,92 @@ public Builder addResourceTypesBytes(com.google.protobuf.ByteString value) { return this; } + private boolean updateFromLatestPredefinedSchema_; + + /** + * + * + *
            +     * Optional. Whether to update the DataStore schema to the latest predefined
            +     * schema.
            +     *
            +     * If true, the DataStore schema will be updated to include any FHIR fields
            +     * or resource types that have been added since the last import and
            +     * corresponding FHIR resources will be imported from the FHIR store.
            +     *
            +     * Note this field cannot be used in conjunction with `resource_types`. It
            +     * should be used after initial import.
            +     * 
            + * + * + * bool update_from_latest_predefined_schema = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The updateFromLatestPredefinedSchema. + */ + @java.lang.Override + public boolean getUpdateFromLatestPredefinedSchema() { + return updateFromLatestPredefinedSchema_; + } + + /** + * + * + *
            +     * Optional. Whether to update the DataStore schema to the latest predefined
            +     * schema.
            +     *
            +     * If true, the DataStore schema will be updated to include any FHIR fields
            +     * or resource types that have been added since the last import and
            +     * corresponding FHIR resources will be imported from the FHIR store.
            +     *
            +     * Note this field cannot be used in conjunction with `resource_types`. It
            +     * should be used after initial import.
            +     * 
            + * + * + * bool update_from_latest_predefined_schema = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The updateFromLatestPredefinedSchema to set. + * @return This builder for chaining. + */ + public Builder setUpdateFromLatestPredefinedSchema(boolean value) { + + updateFromLatestPredefinedSchema_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Optional. Whether to update the DataStore schema to the latest predefined
            +     * schema.
            +     *
            +     * If true, the DataStore schema will be updated to include any FHIR fields
            +     * or resource types that have been added since the last import and
            +     * corresponding FHIR resources will be imported from the FHIR store.
            +     *
            +     * Note this field cannot be used in conjunction with `resource_types`. It
            +     * should be used after initial import.
            +     * 
            + * + * + * bool update_from_latest_predefined_schema = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearUpdateFromLatestPredefinedSchema() { + bitField0_ = (bitField0_ & ~0x00000008); + updateFromLatestPredefinedSchema_ = false; + onChanged(); + return this; + } + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.FhirStoreSource) } diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/FhirStoreSourceOrBuilder.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/FhirStoreSourceOrBuilder.java index bbe40e1d6261..0199c59b2b02 100644 --- a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/FhirStoreSourceOrBuilder.java +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/FhirStoreSourceOrBuilder.java @@ -155,4 +155,26 @@ public interface FhirStoreSourceOrBuilder * @return The bytes of the resourceTypes at the given index. */ com.google.protobuf.ByteString getResourceTypesBytes(int index); + + /** + * + * + *
            +   * Optional. Whether to update the DataStore schema to the latest predefined
            +   * schema.
            +   *
            +   * If true, the DataStore schema will be updated to include any FHIR fields
            +   * or resource types that have been added since the last import and
            +   * corresponding FHIR resources will be imported from the FHIR store.
            +   *
            +   * Note this field cannot be used in conjunction with `resource_types`. It
            +   * should be used after initial import.
            +   * 
            + * + * bool update_from_latest_predefined_schema = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The updateFromLatestPredefinedSchema. + */ + boolean getUpdateFromLatestPredefinedSchema(); } diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/GenerateGroundedContentRequest.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/GenerateGroundedContentRequest.java index 90eba0b012a4..22f1f15b596c 100644 --- a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/GenerateGroundedContentRequest.java +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/GenerateGroundedContentRequest.java @@ -247,6 +247,32 @@ public interface GenerationSpecOrBuilder */ float getFrequencyPenalty(); + /** + * + * + *
            +     * If specified, custom value for the seed will be used.
            +     * 
            + * + * optional int32 seed = 12; + * + * @return Whether the seed field is set. + */ + boolean hasSeed(); + + /** + * + * + *
            +     * If specified, custom value for the seed will be used.
            +     * 
            + * + * optional int32 seed = 12; + * + * @return The seed. + */ + int getSeed(); + /** * * @@ -298,6 +324,38 @@ public interface GenerationSpecOrBuilder * @return The maxOutputTokens. */ int getMaxOutputTokens(); + + /** + * + * + *
            +     * Optional. Setting for provisioned throughput.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.GenerateGroundedContentRequest.GenerationSpec.ProvisionedThroughputSetting provisioned_throughput_setting = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for provisionedThroughputSetting. + */ + int getProvisionedThroughputSettingValue(); + + /** + * + * + *
            +     * Optional. Setting for provisioned throughput.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.GenerateGroundedContentRequest.GenerationSpec.ProvisionedThroughputSetting provisioned_throughput_setting = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The provisionedThroughputSetting. + */ + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentRequest.GenerationSpec + .ProvisionedThroughputSetting + getProvisionedThroughputSetting(); } /** @@ -334,6 +392,7 @@ private GenerationSpec(com.google.protobuf.GeneratedMessage.Builder builder) private GenerationSpec() { modelId_ = ""; languageCode_ = ""; + provisionedThroughputSetting_ = 0; } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @@ -353,6 +412,188 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { .Builder.class); } + /** + * + * + *
            +     * Setting for provisioned throughput.
            +     * 
            + * + * Protobuf enum {@code + * google.cloud.discoveryengine.v1beta.GenerateGroundedContentRequest.GenerationSpec.ProvisionedThroughputSetting} + */ + public enum ProvisionedThroughputSetting implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
            +       * Default value. If the user has remaining provisioned throughput,
            +       * provisioned throughput will be used. Otherwise, pay as you go will be
            +       * used.
            +       * 
            + * + * PROVISIONED_THROUGHPUT_SETTING_UNSPECIFIED = 0; + */ + PROVISIONED_THROUGHPUT_SETTING_UNSPECIFIED(0), + /** + * + * + *
            +       * Only use provisioned throughput. If the user has no remaining
            +       * provisioned throughput, an error will be returned.
            +       * 
            + * + * PROVISIONED_THROUGHPUT_ONLY = 1; + */ + PROVISIONED_THROUGHPUT_ONLY(1), + /** + * + * + *
            +       * Disables provisioned throughput.
            +       * 
            + * + * PAY_AS_YOU_GO_ONLY = 2; + */ + PAY_AS_YOU_GO_ONLY(2), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ProvisionedThroughputSetting"); + } + + /** + * + * + *
            +       * Default value. If the user has remaining provisioned throughput,
            +       * provisioned throughput will be used. Otherwise, pay as you go will be
            +       * used.
            +       * 
            + * + * PROVISIONED_THROUGHPUT_SETTING_UNSPECIFIED = 0; + */ + public static final int PROVISIONED_THROUGHPUT_SETTING_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
            +       * Only use provisioned throughput. If the user has no remaining
            +       * provisioned throughput, an error will be returned.
            +       * 
            + * + * PROVISIONED_THROUGHPUT_ONLY = 1; + */ + public static final int PROVISIONED_THROUGHPUT_ONLY_VALUE = 1; + + /** + * + * + *
            +       * Disables provisioned throughput.
            +       * 
            + * + * PAY_AS_YOU_GO_ONLY = 2; + */ + public static final int PAY_AS_YOU_GO_ONLY_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 ProvisionedThroughputSetting 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 ProvisionedThroughputSetting forNumber(int value) { + switch (value) { + case 0: + return PROVISIONED_THROUGHPUT_SETTING_UNSPECIFIED; + case 1: + return PROVISIONED_THROUGHPUT_ONLY; + case 2: + return PAY_AS_YOU_GO_ONLY; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap + internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public ProvisionedThroughputSetting findValueByNumber(int number) { + return ProvisionedThroughputSetting.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentRequest.GenerationSpec + .getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final ProvisionedThroughputSetting[] VALUES = values(); + + public static ProvisionedThroughputSetting valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private ProvisionedThroughputSetting(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.discoveryengine.v1beta.GenerateGroundedContentRequest.GenerationSpec.ProvisionedThroughputSetting) + } + private int bitField0_; public static final int MODEL_ID_FIELD_NUMBER = 3; @@ -602,6 +843,41 @@ public float getFrequencyPenalty() { return frequencyPenalty_; } + public static final int SEED_FIELD_NUMBER = 12; + private int seed_ = 0; + + /** + * + * + *
            +     * If specified, custom value for the seed will be used.
            +     * 
            + * + * optional int32 seed = 12; + * + * @return Whether the seed field is set. + */ + @java.lang.Override + public boolean hasSeed() { + return ((bitField0_ & 0x00000010) != 0); + } + + /** + * + * + *
            +     * If specified, custom value for the seed will be used.
            +     * 
            + * + * optional int32 seed = 12; + * + * @return The seed. + */ + @java.lang.Override + public int getSeed() { + return seed_; + } + public static final int PRESENCE_PENALTY_FIELD_NUMBER = 9; private float presencePenalty_ = 0F; @@ -618,7 +894,7 @@ public float getFrequencyPenalty() { */ @java.lang.Override public boolean hasPresencePenalty() { - return ((bitField0_ & 0x00000010) != 0); + return ((bitField0_ & 0x00000020) != 0); } /** @@ -653,7 +929,7 @@ public float getPresencePenalty() { */ @java.lang.Override public boolean hasMaxOutputTokens() { - return ((bitField0_ & 0x00000020) != 0); + return ((bitField0_ & 0x00000040) != 0); } /** @@ -672,6 +948,55 @@ public int getMaxOutputTokens() { return maxOutputTokens_; } + public static final int PROVISIONED_THROUGHPUT_SETTING_FIELD_NUMBER = 13; + private int provisionedThroughputSetting_ = 0; + + /** + * + * + *
            +     * Optional. Setting for provisioned throughput.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.GenerateGroundedContentRequest.GenerationSpec.ProvisionedThroughputSetting provisioned_throughput_setting = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for provisionedThroughputSetting. + */ + @java.lang.Override + public int getProvisionedThroughputSettingValue() { + return provisionedThroughputSetting_; + } + + /** + * + * + *
            +     * Optional. Setting for provisioned throughput.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.GenerateGroundedContentRequest.GenerationSpec.ProvisionedThroughputSetting provisioned_throughput_setting = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The provisionedThroughputSetting. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentRequest.GenerationSpec + .ProvisionedThroughputSetting + getProvisionedThroughputSetting() { + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentRequest.GenerationSpec + .ProvisionedThroughputSetting + result = + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentRequest.GenerationSpec + .ProvisionedThroughputSetting.forNumber(provisionedThroughputSetting_); + return result == null + ? com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentRequest.GenerationSpec + .ProvisionedThroughputSetting.UNRECOGNIZED + : result; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -704,12 +1029,21 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000008) != 0)) { output.writeFloat(8, frequencyPenalty_); } - if (((bitField0_ & 0x00000010) != 0)) { + if (((bitField0_ & 0x00000020) != 0)) { output.writeFloat(9, presencePenalty_); } - if (((bitField0_ & 0x00000020) != 0)) { + if (((bitField0_ & 0x00000040) != 0)) { output.writeInt32(10, maxOutputTokens_); } + if (((bitField0_ & 0x00000010) != 0)) { + output.writeInt32(12, seed_); + } + if (provisionedThroughputSetting_ + != com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentRequest.GenerationSpec + .ProvisionedThroughputSetting.PROVISIONED_THROUGHPUT_SETTING_UNSPECIFIED + .getNumber()) { + output.writeEnum(13, provisionedThroughputSetting_); + } getUnknownFields().writeTo(output); } @@ -737,12 +1071,23 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000008) != 0)) { size += com.google.protobuf.CodedOutputStream.computeFloatSize(8, frequencyPenalty_); } - if (((bitField0_ & 0x00000010) != 0)) { + if (((bitField0_ & 0x00000020) != 0)) { size += com.google.protobuf.CodedOutputStream.computeFloatSize(9, presencePenalty_); } - if (((bitField0_ & 0x00000020) != 0)) { + if (((bitField0_ & 0x00000040) != 0)) { size += com.google.protobuf.CodedOutputStream.computeInt32Size(10, maxOutputTokens_); } + if (((bitField0_ & 0x00000010) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(12, seed_); + } + if (provisionedThroughputSetting_ + != com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentRequest.GenerationSpec + .ProvisionedThroughputSetting.PROVISIONED_THROUGHPUT_SETTING_UNSPECIFIED + .getNumber()) { + size += + com.google.protobuf.CodedOutputStream.computeEnumSize( + 13, provisionedThroughputSetting_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -783,6 +1128,10 @@ public boolean equals(final java.lang.Object obj) { if (java.lang.Float.floatToIntBits(getFrequencyPenalty()) != java.lang.Float.floatToIntBits(other.getFrequencyPenalty())) return false; } + if (hasSeed() != other.hasSeed()) return false; + if (hasSeed()) { + if (getSeed() != other.getSeed()) return false; + } if (hasPresencePenalty() != other.hasPresencePenalty()) return false; if (hasPresencePenalty()) { if (java.lang.Float.floatToIntBits(getPresencePenalty()) @@ -792,6 +1141,7 @@ public boolean equals(final java.lang.Object obj) { if (hasMaxOutputTokens()) { if (getMaxOutputTokens() != other.getMaxOutputTokens()) return false; } + if (provisionedThroughputSetting_ != other.provisionedThroughputSetting_) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -823,6 +1173,10 @@ public int hashCode() { hash = (37 * hash) + FREQUENCY_PENALTY_FIELD_NUMBER; hash = (53 * hash) + java.lang.Float.floatToIntBits(getFrequencyPenalty()); } + if (hasSeed()) { + hash = (37 * hash) + SEED_FIELD_NUMBER; + hash = (53 * hash) + getSeed(); + } if (hasPresencePenalty()) { hash = (37 * hash) + PRESENCE_PENALTY_FIELD_NUMBER; hash = (53 * hash) + java.lang.Float.floatToIntBits(getPresencePenalty()); @@ -831,6 +1185,8 @@ public int hashCode() { hash = (37 * hash) + MAX_OUTPUT_TOKENS_FIELD_NUMBER; hash = (53 * hash) + getMaxOutputTokens(); } + hash = (37 * hash) + PROVISIONED_THROUGHPUT_SETTING_FIELD_NUMBER; + hash = (53 * hash) + provisionedThroughputSetting_; hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -1002,8 +1358,10 @@ public Builder clear() { topP_ = 0F; topK_ = 0; frequencyPenalty_ = 0F; + seed_ = 0; presencePenalty_ = 0F; maxOutputTokens_ = 0; + provisionedThroughputSetting_ = 0; return this; } @@ -1073,13 +1431,20 @@ private void buildPartial0( to_bitField0_ |= 0x00000008; } if (((from_bitField0_ & 0x00000040) != 0)) { - result.presencePenalty_ = presencePenalty_; + result.seed_ = seed_; to_bitField0_ |= 0x00000010; } if (((from_bitField0_ & 0x00000080) != 0)) { - result.maxOutputTokens_ = maxOutputTokens_; + result.presencePenalty_ = presencePenalty_; to_bitField0_ |= 0x00000020; } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.maxOutputTokens_ = maxOutputTokens_; + to_bitField0_ |= 0x00000040; + } + if (((from_bitField0_ & 0x00000200) != 0)) { + result.provisionedThroughputSetting_ = provisionedThroughputSetting_; + } result.bitField0_ |= to_bitField0_; } @@ -1126,12 +1491,18 @@ public Builder mergeFrom( if (other.hasFrequencyPenalty()) { setFrequencyPenalty(other.getFrequencyPenalty()); } + if (other.hasSeed()) { + setSeed(other.getSeed()); + } if (other.hasPresencePenalty()) { setPresencePenalty(other.getPresencePenalty()); } if (other.hasMaxOutputTokens()) { setMaxOutputTokens(other.getMaxOutputTokens()); } + if (other.provisionedThroughputSetting_ != 0) { + setProvisionedThroughputSettingValue(other.getProvisionedThroughputSettingValue()); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -1197,15 +1568,27 @@ public Builder mergeFrom( case 77: { presencePenalty_ = input.readFloat(); - bitField0_ |= 0x00000040; + bitField0_ |= 0x00000080; break; } // case 77 case 80: { maxOutputTokens_ = input.readInt32(); - bitField0_ |= 0x00000080; + bitField0_ |= 0x00000100; break; } // case 80 + case 96: + { + seed_ = input.readInt32(); + bitField0_ |= 0x00000040; + break; + } // case 96 + case 104: + { + provisionedThroughputSetting_ = input.readEnum(); + bitField0_ |= 0x00000200; + break; + } // case 104 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -1740,21 +2123,21 @@ public Builder clearFrequencyPenalty() { return this; } - private float presencePenalty_; + private int seed_; /** * * *
            -       * If specified, custom value for presence penalty will be used.
            +       * If specified, custom value for the seed will be used.
                    * 
            * - * optional float presence_penalty = 9; + * optional int32 seed = 12; * - * @return Whether the presencePenalty field is set. + * @return Whether the seed field is set. */ @java.lang.Override - public boolean hasPresencePenalty() { + public boolean hasSeed() { return ((bitField0_ & 0x00000040) != 0); } @@ -1762,33 +2145,33 @@ public boolean hasPresencePenalty() { * * *
            -       * If specified, custom value for presence penalty will be used.
            +       * If specified, custom value for the seed will be used.
                    * 
            * - * optional float presence_penalty = 9; + * optional int32 seed = 12; * - * @return The presencePenalty. + * @return The seed. */ @java.lang.Override - public float getPresencePenalty() { - return presencePenalty_; + public int getSeed() { + return seed_; } /** * * *
            -       * If specified, custom value for presence penalty will be used.
            +       * If specified, custom value for the seed will be used.
                    * 
            * - * optional float presence_penalty = 9; + * optional int32 seed = 12; * - * @param value The presencePenalty to set. + * @param value The seed to set. * @return This builder for chaining. */ - public Builder setPresencePenalty(float value) { + public Builder setSeed(int value) { - presencePenalty_ = value; + seed_ = value; bitField0_ |= 0x00000040; onChanged(); return this; @@ -1798,27 +2181,99 @@ public Builder setPresencePenalty(float value) { * * *
            -       * If specified, custom value for presence penalty will be used.
            +       * If specified, custom value for the seed will be used.
                    * 
            * - * optional float presence_penalty = 9; + * optional int32 seed = 12; * * @return This builder for chaining. */ - public Builder clearPresencePenalty() { + public Builder clearSeed() { bitField0_ = (bitField0_ & ~0x00000040); - presencePenalty_ = 0F; + seed_ = 0; onChanged(); return this; } - private int maxOutputTokens_; + private float presencePenalty_; /** * * *
            -       * If specified, custom value for max output tokens will be used.
            +       * If specified, custom value for presence penalty will be used.
            +       * 
            + * + * optional float presence_penalty = 9; + * + * @return Whether the presencePenalty field is set. + */ + @java.lang.Override + public boolean hasPresencePenalty() { + return ((bitField0_ & 0x00000080) != 0); + } + + /** + * + * + *
            +       * If specified, custom value for presence penalty will be used.
            +       * 
            + * + * optional float presence_penalty = 9; + * + * @return The presencePenalty. + */ + @java.lang.Override + public float getPresencePenalty() { + return presencePenalty_; + } + + /** + * + * + *
            +       * If specified, custom value for presence penalty will be used.
            +       * 
            + * + * optional float presence_penalty = 9; + * + * @param value The presencePenalty to set. + * @return This builder for chaining. + */ + public Builder setPresencePenalty(float value) { + + presencePenalty_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + + /** + * + * + *
            +       * If specified, custom value for presence penalty will be used.
            +       * 
            + * + * optional float presence_penalty = 9; + * + * @return This builder for chaining. + */ + public Builder clearPresencePenalty() { + bitField0_ = (bitField0_ & ~0x00000080); + presencePenalty_ = 0F; + onChanged(); + return this; + } + + private int maxOutputTokens_; + + /** + * + * + *
            +       * If specified, custom value for max output tokens will be used.
                    * 
            * * optional int32 max_output_tokens = 10; @@ -1827,7 +2282,7 @@ public Builder clearPresencePenalty() { */ @java.lang.Override public boolean hasMaxOutputTokens() { - return ((bitField0_ & 0x00000080) != 0); + return ((bitField0_ & 0x00000100) != 0); } /** @@ -1861,7 +2316,7 @@ public int getMaxOutputTokens() { public Builder setMaxOutputTokens(int value) { maxOutputTokens_ = value; - bitField0_ |= 0x00000080; + bitField0_ |= 0x00000100; onChanged(); return this; } @@ -1878,12 +2333,129 @@ public Builder setMaxOutputTokens(int value) { * @return This builder for chaining. */ public Builder clearMaxOutputTokens() { - bitField0_ = (bitField0_ & ~0x00000080); + bitField0_ = (bitField0_ & ~0x00000100); maxOutputTokens_ = 0; onChanged(); return this; } + private int provisionedThroughputSetting_ = 0; + + /** + * + * + *
            +       * Optional. Setting for provisioned throughput.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.GenerateGroundedContentRequest.GenerationSpec.ProvisionedThroughputSetting provisioned_throughput_setting = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for provisionedThroughputSetting. + */ + @java.lang.Override + public int getProvisionedThroughputSettingValue() { + return provisionedThroughputSetting_; + } + + /** + * + * + *
            +       * Optional. Setting for provisioned throughput.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.GenerateGroundedContentRequest.GenerationSpec.ProvisionedThroughputSetting provisioned_throughput_setting = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The enum numeric value on the wire for provisionedThroughputSetting to set. + * @return This builder for chaining. + */ + public Builder setProvisionedThroughputSettingValue(int value) { + provisionedThroughputSetting_ = value; + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + + /** + * + * + *
            +       * Optional. Setting for provisioned throughput.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.GenerateGroundedContentRequest.GenerationSpec.ProvisionedThroughputSetting provisioned_throughput_setting = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The provisionedThroughputSetting. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentRequest.GenerationSpec + .ProvisionedThroughputSetting + getProvisionedThroughputSetting() { + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentRequest.GenerationSpec + .ProvisionedThroughputSetting + result = + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentRequest + .GenerationSpec.ProvisionedThroughputSetting.forNumber( + provisionedThroughputSetting_); + return result == null + ? com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentRequest.GenerationSpec + .ProvisionedThroughputSetting.UNRECOGNIZED + : result; + } + + /** + * + * + *
            +       * Optional. Setting for provisioned throughput.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.GenerateGroundedContentRequest.GenerationSpec.ProvisionedThroughputSetting provisioned_throughput_setting = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The provisionedThroughputSetting to set. + * @return This builder for chaining. + */ + public Builder setProvisionedThroughputSetting( + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentRequest.GenerationSpec + .ProvisionedThroughputSetting + value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000200; + provisionedThroughputSetting_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
            +       * Optional. Setting for provisioned throughput.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.GenerateGroundedContentRequest.GenerationSpec.ProvisionedThroughputSetting provisioned_throughput_setting = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearProvisionedThroughputSetting() { + bitField0_ = (bitField0_ & ~0x00000200); + provisionedThroughputSetting_ = 0; + onChanged(); + return this; + } + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.GenerateGroundedContentRequest.GenerationSpec) } @@ -3970,6 +4542,53 @@ public interface GroundingSourceOrBuilder .GoogleSearchSourceOrBuilder getGoogleSearchSourceOrBuilder(); + /** + * + * + *
            +     * If set, grounding is performed with enterprise web retrieval.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.GenerateGroundedContentRequest.GroundingSource.EnterpriseWebRetrievalSource enterprise_web_retrieval_source = 8; + * + * + * @return Whether the enterpriseWebRetrievalSource field is set. + */ + boolean hasEnterpriseWebRetrievalSource(); + + /** + * + * + *
            +     * If set, grounding is performed with enterprise web retrieval.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.GenerateGroundedContentRequest.GroundingSource.EnterpriseWebRetrievalSource enterprise_web_retrieval_source = 8; + * + * + * @return The enterpriseWebRetrievalSource. + */ + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentRequest.GroundingSource + .EnterpriseWebRetrievalSource + getEnterpriseWebRetrievalSource(); + + /** + * + * + *
            +     * If set, grounding is performed with enterprise web retrieval.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.GenerateGroundedContentRequest.GroundingSource.EnterpriseWebRetrievalSource enterprise_web_retrieval_source = 8; + * + */ + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentRequest.GroundingSource + .EnterpriseWebRetrievalSourceOrBuilder + getEnterpriseWebRetrievalSourceOrBuilder(); + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentRequest.GroundingSource .SourceCase getSourceCase(); @@ -6816,6 +7435,92 @@ public interface GoogleSearchSourceOrBuilder com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentRequest .DynamicRetrievalConfigurationOrBuilder getDynamicRetrievalConfigOrBuilder(); + + /** + * + * + *
            +       * Optional. List of domains to be excluded from the search results.
            +       * 
            + * + * repeated string exclude_domains = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the excludeDomains. + */ + java.util.List getExcludeDomainsList(); + + /** + * + * + *
            +       * Optional. List of domains to be excluded from the search results.
            +       * 
            + * + * repeated string exclude_domains = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of excludeDomains. + */ + int getExcludeDomainsCount(); + + /** + * + * + *
            +       * Optional. List of domains to be excluded from the search results.
            +       * 
            + * + * repeated string exclude_domains = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The excludeDomains at the given index. + */ + java.lang.String getExcludeDomains(int index); + + /** + * + * + *
            +       * Optional. List of domains to be excluded from the search results.
            +       * 
            + * + * repeated string exclude_domains = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the excludeDomains at the given index. + */ + com.google.protobuf.ByteString getExcludeDomainsBytes(int index); + + /** + * + * + *
            +       * Optional. Sites with confidence level chosen & above this value will be
            +       * blocked from the search results.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Citation.PhishBlockThreshold blocking_confidence = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for blockingConfidence. + */ + int getBlockingConfidenceValue(); + + /** + * + * + *
            +       * Optional. Sites with confidence level chosen & above this value will be
            +       * blocked from the search results.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Citation.PhishBlockThreshold blocking_confidence = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The blockingConfidence. + */ + com.google.cloud.discoveryengine.v1beta.Citation.PhishBlockThreshold getBlockingConfidence(); } /** @@ -6849,7 +7554,10 @@ private GoogleSearchSource(com.google.protobuf.GeneratedMessage.Builder build super(builder); } - private GoogleSearchSource() {} + private GoogleSearchSource() { + excludeDomains_ = com.google.protobuf.LazyStringArrayList.emptyList(); + blockingConfidence_ = 0; + } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.discoveryengine.v1beta.GroundedGenerationServiceProto @@ -6939,10 +7647,125 @@ public boolean hasDynamicRetrievalConfig() { : dynamicRetrievalConfig_; } - private byte memoizedIsInitialized = -1; + public static final int EXCLUDE_DOMAINS_FIELD_NUMBER = 5; - @java.lang.Override - public final boolean isInitialized() { + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList excludeDomains_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + /** + * + * + *
            +       * Optional. List of domains to be excluded from the search results.
            +       * 
            + * + * repeated string exclude_domains = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the excludeDomains. + */ + public com.google.protobuf.ProtocolStringList getExcludeDomainsList() { + return excludeDomains_; + } + + /** + * + * + *
            +       * Optional. List of domains to be excluded from the search results.
            +       * 
            + * + * repeated string exclude_domains = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of excludeDomains. + */ + public int getExcludeDomainsCount() { + return excludeDomains_.size(); + } + + /** + * + * + *
            +       * Optional. List of domains to be excluded from the search results.
            +       * 
            + * + * repeated string exclude_domains = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The excludeDomains at the given index. + */ + public java.lang.String getExcludeDomains(int index) { + return excludeDomains_.get(index); + } + + /** + * + * + *
            +       * Optional. List of domains to be excluded from the search results.
            +       * 
            + * + * repeated string exclude_domains = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the excludeDomains at the given index. + */ + public com.google.protobuf.ByteString getExcludeDomainsBytes(int index) { + return excludeDomains_.getByteString(index); + } + + public static final int BLOCKING_CONFIDENCE_FIELD_NUMBER = 6; + private int blockingConfidence_ = 0; + + /** + * + * + *
            +       * Optional. Sites with confidence level chosen & above this value will be
            +       * blocked from the search results.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Citation.PhishBlockThreshold blocking_confidence = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for blockingConfidence. + */ + @java.lang.Override + public int getBlockingConfidenceValue() { + return blockingConfidence_; + } + + /** + * + * + *
            +       * Optional. Sites with confidence level chosen & above this value will be
            +       * blocked from the search results.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Citation.PhishBlockThreshold blocking_confidence = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The blockingConfidence. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Citation.PhishBlockThreshold + getBlockingConfidence() { + com.google.cloud.discoveryengine.v1beta.Citation.PhishBlockThreshold result = + com.google.cloud.discoveryengine.v1beta.Citation.PhishBlockThreshold.forNumber( + blockingConfidence_); + return result == null + ? com.google.cloud.discoveryengine.v1beta.Citation.PhishBlockThreshold.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; @@ -6956,6 +7779,15 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(2, getDynamicRetrievalConfig()); } + for (int i = 0; i < excludeDomains_.size(); i++) { + com.google.protobuf.GeneratedMessage.writeString(output, 5, excludeDomains_.getRaw(i)); + } + if (blockingConfidence_ + != com.google.cloud.discoveryengine.v1beta.Citation.PhishBlockThreshold + .PHISH_BLOCK_THRESHOLD_UNSPECIFIED + .getNumber()) { + output.writeEnum(6, blockingConfidence_); + } getUnknownFields().writeTo(output); } @@ -6970,6 +7802,20 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 2, getDynamicRetrievalConfig()); } + { + int dataSize = 0; + for (int i = 0; i < excludeDomains_.size(); i++) { + dataSize += computeStringSizeNoTag(excludeDomains_.getRaw(i)); + } + size += dataSize; + size += 1 * getExcludeDomainsList().size(); + } + if (blockingConfidence_ + != com.google.cloud.discoveryengine.v1beta.Citation.PhishBlockThreshold + .PHISH_BLOCK_THRESHOLD_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(6, blockingConfidence_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -6997,6 +7843,8 @@ public boolean equals(final java.lang.Object obj) { if (hasDynamicRetrievalConfig()) { if (!getDynamicRetrievalConfig().equals(other.getDynamicRetrievalConfig())) return false; } + if (!getExcludeDomainsList().equals(other.getExcludeDomainsList())) return false; + if (blockingConfidence_ != other.blockingConfidence_) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -7012,6 +7860,12 @@ public int hashCode() { hash = (37 * hash) + DYNAMIC_RETRIEVAL_CONFIG_FIELD_NUMBER; hash = (53 * hash) + getDynamicRetrievalConfig().hashCode(); } + if (getExcludeDomainsCount() > 0) { + hash = (37 * hash) + EXCLUDE_DOMAINS_FIELD_NUMBER; + hash = (53 * hash) + getExcludeDomainsList().hashCode(); + } + hash = (37 * hash) + BLOCKING_CONFIDENCE_FIELD_NUMBER; + hash = (53 * hash) + blockingConfidence_; hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -7196,6 +8050,8 @@ public Builder clear() { dynamicRetrievalConfigBuilder_.dispose(); dynamicRetrievalConfigBuilder_ = null; } + excludeDomains_ = com.google.protobuf.LazyStringArrayList.emptyList(); + blockingConfidence_ = 0; return this; } @@ -7255,6 +8111,13 @@ private void buildPartial0( : dynamicRetrievalConfigBuilder_.build(); to_bitField0_ |= 0x00000001; } + if (((from_bitField0_ & 0x00000002) != 0)) { + excludeDomains_.makeImmutable(); + result.excludeDomains_ = excludeDomains_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.blockingConfidence_ = blockingConfidence_; + } result.bitField0_ |= to_bitField0_; } @@ -7284,6 +8147,19 @@ public Builder mergeFrom( if (other.hasDynamicRetrievalConfig()) { mergeDynamicRetrievalConfig(other.getDynamicRetrievalConfig()); } + if (!other.excludeDomains_.isEmpty()) { + if (excludeDomains_.isEmpty()) { + excludeDomains_ = other.excludeDomains_; + bitField0_ |= 0x00000002; + } else { + ensureExcludeDomainsIsMutable(); + excludeDomains_.addAll(other.excludeDomains_); + } + onChanged(); + } + if (other.blockingConfidence_ != 0) { + setBlockingConfidenceValue(other.getBlockingConfidenceValue()); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -7318,6 +8194,19 @@ public Builder mergeFrom( bitField0_ |= 0x00000001; break; } // case 18 + case 42: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureExcludeDomainsIsMutable(); + excludeDomains_.add(s); + break; + } // case 42 + case 48: + { + blockingConfidence_ = input.readEnum(); + bitField0_ |= 0x00000004; + break; + } // case 48 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -7588,83 +8477,1434 @@ public Builder clearDynamicRetrievalConfig() { return dynamicRetrievalConfigBuilder_; } - // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.GenerateGroundedContentRequest.GroundingSource.GoogleSearchSource) - } - - // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.GenerateGroundedContentRequest.GroundingSource.GoogleSearchSource) - private static final com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentRequest - .GroundingSource.GoogleSearchSource - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = - new com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentRequest - .GroundingSource.GoogleSearchSource(); - } + private com.google.protobuf.LazyStringArrayList excludeDomains_ = + com.google.protobuf.LazyStringArrayList.emptyList(); - public static com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentRequest - .GroundingSource.GoogleSearchSource - getDefaultInstance() { - return DEFAULT_INSTANCE; - } + private void ensureExcludeDomainsIsMutable() { + if (!excludeDomains_.isModifiable()) { + excludeDomains_ = new com.google.protobuf.LazyStringArrayList(excludeDomains_); + } + bitField0_ |= 0x00000002; + } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public GoogleSearchSource parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException() - .setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; + /** + * + * + *
            +         * Optional. List of domains to be excluded from the search results.
            +         * 
            + * + * repeated string exclude_domains = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the excludeDomains. + */ + public com.google.protobuf.ProtocolStringList getExcludeDomainsList() { + excludeDomains_.makeImmutable(); + return excludeDomains_; + } - public static com.google.protobuf.Parser parser() { - return PARSER; - } + /** + * + * + *
            +         * Optional. List of domains to be excluded from the search results.
            +         * 
            + * + * repeated string exclude_domains = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The count of excludeDomains. + */ + public int getExcludeDomainsCount() { + return excludeDomains_.size(); + } - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + /** + * + * + *
            +         * Optional. List of domains to be excluded from the search results.
            +         * 
            + * + * repeated string exclude_domains = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the element to return. + * @return The excludeDomains at the given index. + */ + public java.lang.String getExcludeDomains(int index) { + return excludeDomains_.get(index); + } - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentRequest.GroundingSource - .GoogleSearchSource - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - } + /** + * + * + *
            +         * Optional. List of domains to be excluded from the search results.
            +         * 
            + * + * repeated string exclude_domains = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the value to return. + * @return The bytes of the excludeDomains at the given index. + */ + public com.google.protobuf.ByteString getExcludeDomainsBytes(int index) { + return excludeDomains_.getByteString(index); + } - private int sourceCase_ = 0; + /** + * + * + *
            +         * Optional. List of domains to be excluded from the search results.
            +         * 
            + * + * repeated string exclude_domains = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index to set the value at. + * @param value The excludeDomains to set. + * @return This builder for chaining. + */ + public Builder setExcludeDomains(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureExcludeDomainsIsMutable(); + excludeDomains_.set(index, value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } - @SuppressWarnings("serial") - private java.lang.Object source_; + /** + * + * + *
            +         * Optional. List of domains to be excluded from the search results.
            +         * 
            + * + * repeated string exclude_domains = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The excludeDomains to add. + * @return This builder for chaining. + */ + public Builder addExcludeDomains(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureExcludeDomainsIsMutable(); + excludeDomains_.add(value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } - public enum SourceCase - implements - com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - INLINE_SOURCE(1), - SEARCH_SOURCE(2), - GOOGLE_SEARCH_SOURCE(3), - SOURCE_NOT_SET(0); - private final int value; + /** + * + * + *
            +         * Optional. List of domains to be excluded from the search results.
            +         * 
            + * + * repeated string exclude_domains = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param values The excludeDomains to add. + * @return This builder for chaining. + */ + public Builder addAllExcludeDomains(java.lang.Iterable values) { + ensureExcludeDomainsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, excludeDomains_); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } - private SourceCase(int value) { - this.value = value; + /** + * + * + *
            +         * Optional. List of domains to be excluded from the search results.
            +         * 
            + * + * repeated string exclude_domains = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearExcludeDomains() { + excludeDomains_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + ; + onChanged(); + return this; + } + + /** + * + * + *
            +         * Optional. List of domains to be excluded from the search results.
            +         * 
            + * + * repeated string exclude_domains = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The bytes of the excludeDomains to add. + * @return This builder for chaining. + */ + public Builder addExcludeDomainsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureExcludeDomainsIsMutable(); + excludeDomains_.add(value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private int blockingConfidence_ = 0; + + /** + * + * + *
            +         * Optional. Sites with confidence level chosen & above this value will be
            +         * blocked from the search results.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Citation.PhishBlockThreshold blocking_confidence = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for blockingConfidence. + */ + @java.lang.Override + public int getBlockingConfidenceValue() { + return blockingConfidence_; + } + + /** + * + * + *
            +         * Optional. Sites with confidence level chosen & above this value will be
            +         * blocked from the search results.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Citation.PhishBlockThreshold blocking_confidence = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The enum numeric value on the wire for blockingConfidence to set. + * @return This builder for chaining. + */ + public Builder setBlockingConfidenceValue(int value) { + blockingConfidence_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
            +         * Optional. Sites with confidence level chosen & above this value will be
            +         * blocked from the search results.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Citation.PhishBlockThreshold blocking_confidence = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The blockingConfidence. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Citation.PhishBlockThreshold + getBlockingConfidence() { + com.google.cloud.discoveryengine.v1beta.Citation.PhishBlockThreshold result = + com.google.cloud.discoveryengine.v1beta.Citation.PhishBlockThreshold.forNumber( + blockingConfidence_); + return result == null + ? com.google.cloud.discoveryengine.v1beta.Citation.PhishBlockThreshold.UNRECOGNIZED + : result; + } + + /** + * + * + *
            +         * Optional. Sites with confidence level chosen & above this value will be
            +         * blocked from the search results.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Citation.PhishBlockThreshold blocking_confidence = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The blockingConfidence to set. + * @return This builder for chaining. + */ + public Builder setBlockingConfidence( + com.google.cloud.discoveryengine.v1beta.Citation.PhishBlockThreshold value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000004; + blockingConfidence_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
            +         * Optional. Sites with confidence level chosen & above this value will be
            +         * blocked from the search results.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Citation.PhishBlockThreshold blocking_confidence = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearBlockingConfidence() { + bitField0_ = (bitField0_ & ~0x00000004); + blockingConfidence_ = 0; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.GenerateGroundedContentRequest.GroundingSource.GoogleSearchSource) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.GenerateGroundedContentRequest.GroundingSource.GoogleSearchSource) + private static final com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentRequest + .GroundingSource.GoogleSearchSource + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentRequest + .GroundingSource.GoogleSearchSource(); + } + + public static com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentRequest + .GroundingSource.GoogleSearchSource + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GoogleSearchSource parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentRequest.GroundingSource + .GoogleSearchSource + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface EnterpriseWebRetrievalSourceOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.GenerateGroundedContentRequest.GroundingSource.EnterpriseWebRetrievalSource) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
            +       * Optional. List of domains to be excluded from the search results.
            +       * 
            + * + * repeated string exclude_domains = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the excludeDomains. + */ + java.util.List getExcludeDomainsList(); + + /** + * + * + *
            +       * Optional. List of domains to be excluded from the search results.
            +       * 
            + * + * repeated string exclude_domains = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of excludeDomains. + */ + int getExcludeDomainsCount(); + + /** + * + * + *
            +       * Optional. List of domains to be excluded from the search results.
            +       * 
            + * + * repeated string exclude_domains = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The excludeDomains at the given index. + */ + java.lang.String getExcludeDomains(int index); + + /** + * + * + *
            +       * Optional. List of domains to be excluded from the search results.
            +       * 
            + * + * repeated string exclude_domains = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the excludeDomains at the given index. + */ + com.google.protobuf.ByteString getExcludeDomainsBytes(int index); + + /** + * + * + *
            +       * Optional. Sites with confidence level chosen & above this value will be
            +       * blocked from the search results.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Citation.PhishBlockThreshold blocking_confidence = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for blockingConfidence. + */ + int getBlockingConfidenceValue(); + + /** + * + * + *
            +       * Optional. Sites with confidence level chosen & above this value will be
            +       * blocked from the search results.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Citation.PhishBlockThreshold blocking_confidence = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The blockingConfidence. + */ + com.google.cloud.discoveryengine.v1beta.Citation.PhishBlockThreshold getBlockingConfidence(); + } + + /** + * + * + *
            +     * Params for using enterprise web retrieval as grounding source.
            +     * 
            + * + * Protobuf type {@code + * google.cloud.discoveryengine.v1beta.GenerateGroundedContentRequest.GroundingSource.EnterpriseWebRetrievalSource} + */ + public static final class EnterpriseWebRetrievalSource + extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.GenerateGroundedContentRequest.GroundingSource.EnterpriseWebRetrievalSource) + EnterpriseWebRetrievalSourceOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "EnterpriseWebRetrievalSource"); + } + + // Use EnterpriseWebRetrievalSource.newBuilder() to construct. + private EnterpriseWebRetrievalSource( + com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private EnterpriseWebRetrievalSource() { + excludeDomains_ = com.google.protobuf.LazyStringArrayList.emptyList(); + blockingConfidence_ = 0; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.GroundedGenerationServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_GenerateGroundedContentRequest_GroundingSource_EnterpriseWebRetrievalSource_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.GroundedGenerationServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_GenerateGroundedContentRequest_GroundingSource_EnterpriseWebRetrievalSource_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentRequest + .GroundingSource.EnterpriseWebRetrievalSource.class, + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentRequest + .GroundingSource.EnterpriseWebRetrievalSource.Builder.class); + } + + public static final int EXCLUDE_DOMAINS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList excludeDomains_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + /** + * + * + *
            +       * Optional. List of domains to be excluded from the search results.
            +       * 
            + * + * repeated string exclude_domains = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the excludeDomains. + */ + public com.google.protobuf.ProtocolStringList getExcludeDomainsList() { + return excludeDomains_; + } + + /** + * + * + *
            +       * Optional. List of domains to be excluded from the search results.
            +       * 
            + * + * repeated string exclude_domains = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of excludeDomains. + */ + public int getExcludeDomainsCount() { + return excludeDomains_.size(); + } + + /** + * + * + *
            +       * Optional. List of domains to be excluded from the search results.
            +       * 
            + * + * repeated string exclude_domains = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The excludeDomains at the given index. + */ + public java.lang.String getExcludeDomains(int index) { + return excludeDomains_.get(index); + } + + /** + * + * + *
            +       * Optional. List of domains to be excluded from the search results.
            +       * 
            + * + * repeated string exclude_domains = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the excludeDomains at the given index. + */ + public com.google.protobuf.ByteString getExcludeDomainsBytes(int index) { + return excludeDomains_.getByteString(index); + } + + public static final int BLOCKING_CONFIDENCE_FIELD_NUMBER = 2; + private int blockingConfidence_ = 0; + + /** + * + * + *
            +       * Optional. Sites with confidence level chosen & above this value will be
            +       * blocked from the search results.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Citation.PhishBlockThreshold blocking_confidence = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for blockingConfidence. + */ + @java.lang.Override + public int getBlockingConfidenceValue() { + return blockingConfidence_; + } + + /** + * + * + *
            +       * Optional. Sites with confidence level chosen & above this value will be
            +       * blocked from the search results.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Citation.PhishBlockThreshold blocking_confidence = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The blockingConfidence. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Citation.PhishBlockThreshold + getBlockingConfidence() { + com.google.cloud.discoveryengine.v1beta.Citation.PhishBlockThreshold result = + com.google.cloud.discoveryengine.v1beta.Citation.PhishBlockThreshold.forNumber( + blockingConfidence_); + return result == null + ? com.google.cloud.discoveryengine.v1beta.Citation.PhishBlockThreshold.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 { + for (int i = 0; i < excludeDomains_.size(); i++) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, excludeDomains_.getRaw(i)); + } + if (blockingConfidence_ + != com.google.cloud.discoveryengine.v1beta.Citation.PhishBlockThreshold + .PHISH_BLOCK_THRESHOLD_UNSPECIFIED + .getNumber()) { + output.writeEnum(2, blockingConfidence_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + { + int dataSize = 0; + for (int i = 0; i < excludeDomains_.size(); i++) { + dataSize += computeStringSizeNoTag(excludeDomains_.getRaw(i)); + } + size += dataSize; + size += 1 * getExcludeDomainsList().size(); + } + if (blockingConfidence_ + != com.google.cloud.discoveryengine.v1beta.Citation.PhishBlockThreshold + .PHISH_BLOCK_THRESHOLD_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, blockingConfidence_); + } + 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.discoveryengine.v1beta.GenerateGroundedContentRequest.GroundingSource + .EnterpriseWebRetrievalSource)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentRequest.GroundingSource + .EnterpriseWebRetrievalSource + other = + (com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentRequest + .GroundingSource.EnterpriseWebRetrievalSource) + obj; + + if (!getExcludeDomainsList().equals(other.getExcludeDomainsList())) return false; + if (blockingConfidence_ != other.blockingConfidence_) 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 (getExcludeDomainsCount() > 0) { + hash = (37 * hash) + EXCLUDE_DOMAINS_FIELD_NUMBER; + hash = (53 * hash) + getExcludeDomainsList().hashCode(); + } + hash = (37 * hash) + BLOCKING_CONFIDENCE_FIELD_NUMBER; + hash = (53 * hash) + blockingConfidence_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentRequest + .GroundingSource.EnterpriseWebRetrievalSource + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentRequest + .GroundingSource.EnterpriseWebRetrievalSource + 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.discoveryengine.v1beta.GenerateGroundedContentRequest + .GroundingSource.EnterpriseWebRetrievalSource + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentRequest + .GroundingSource.EnterpriseWebRetrievalSource + 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.discoveryengine.v1beta.GenerateGroundedContentRequest + .GroundingSource.EnterpriseWebRetrievalSource + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentRequest + .GroundingSource.EnterpriseWebRetrievalSource + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentRequest + .GroundingSource.EnterpriseWebRetrievalSource + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentRequest + .GroundingSource.EnterpriseWebRetrievalSource + 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.discoveryengine.v1beta.GenerateGroundedContentRequest + .GroundingSource.EnterpriseWebRetrievalSource + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentRequest + .GroundingSource.EnterpriseWebRetrievalSource + 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.discoveryengine.v1beta.GenerateGroundedContentRequest + .GroundingSource.EnterpriseWebRetrievalSource + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentRequest + .GroundingSource.EnterpriseWebRetrievalSource + 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.discoveryengine.v1beta.GenerateGroundedContentRequest.GroundingSource + .EnterpriseWebRetrievalSource + 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; + } + + /** + * + * + *
            +       * Params for using enterprise web retrieval as grounding source.
            +       * 
            + * + * Protobuf type {@code + * google.cloud.discoveryengine.v1beta.GenerateGroundedContentRequest.GroundingSource.EnterpriseWebRetrievalSource} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.GenerateGroundedContentRequest.GroundingSource.EnterpriseWebRetrievalSource) + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentRequest.GroundingSource + .EnterpriseWebRetrievalSourceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.GroundedGenerationServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_GenerateGroundedContentRequest_GroundingSource_EnterpriseWebRetrievalSource_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.GroundedGenerationServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_GenerateGroundedContentRequest_GroundingSource_EnterpriseWebRetrievalSource_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentRequest + .GroundingSource.EnterpriseWebRetrievalSource.class, + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentRequest + .GroundingSource.EnterpriseWebRetrievalSource.Builder.class); + } + + // Construct using + // com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentRequest.GroundingSource.EnterpriseWebRetrievalSource.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + excludeDomains_ = com.google.protobuf.LazyStringArrayList.emptyList(); + blockingConfidence_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1beta.GroundedGenerationServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_GenerateGroundedContentRequest_GroundingSource_EnterpriseWebRetrievalSource_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentRequest + .GroundingSource.EnterpriseWebRetrievalSource + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentRequest + .GroundingSource.EnterpriseWebRetrievalSource.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentRequest + .GroundingSource.EnterpriseWebRetrievalSource + build() { + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentRequest.GroundingSource + .EnterpriseWebRetrievalSource + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentRequest + .GroundingSource.EnterpriseWebRetrievalSource + buildPartial() { + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentRequest.GroundingSource + .EnterpriseWebRetrievalSource + result = + new com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentRequest + .GroundingSource.EnterpriseWebRetrievalSource(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentRequest.GroundingSource + .EnterpriseWebRetrievalSource + result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + excludeDomains_.makeImmutable(); + result.excludeDomains_ = excludeDomains_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.blockingConfidence_ = blockingConfidence_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentRequest.GroundingSource + .EnterpriseWebRetrievalSource) { + return mergeFrom( + (com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentRequest + .GroundingSource.EnterpriseWebRetrievalSource) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentRequest.GroundingSource + .EnterpriseWebRetrievalSource + other) { + if (other + == com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentRequest + .GroundingSource.EnterpriseWebRetrievalSource.getDefaultInstance()) return this; + if (!other.excludeDomains_.isEmpty()) { + if (excludeDomains_.isEmpty()) { + excludeDomains_ = other.excludeDomains_; + bitField0_ |= 0x00000001; + } else { + ensureExcludeDomainsIsMutable(); + excludeDomains_.addAll(other.excludeDomains_); + } + onChanged(); + } + if (other.blockingConfidence_ != 0) { + setBlockingConfidenceValue(other.getBlockingConfidenceValue()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureExcludeDomainsIsMutable(); + excludeDomains_.add(s); + break; + } // case 10 + case 16: + { + blockingConfidence_ = input.readEnum(); + bitField0_ |= 0x00000002; + break; + } // case 16 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.protobuf.LazyStringArrayList excludeDomains_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureExcludeDomainsIsMutable() { + if (!excludeDomains_.isModifiable()) { + excludeDomains_ = new com.google.protobuf.LazyStringArrayList(excludeDomains_); + } + bitField0_ |= 0x00000001; + } + + /** + * + * + *
            +         * Optional. List of domains to be excluded from the search results.
            +         * 
            + * + * repeated string exclude_domains = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the excludeDomains. + */ + public com.google.protobuf.ProtocolStringList getExcludeDomainsList() { + excludeDomains_.makeImmutable(); + return excludeDomains_; + } + + /** + * + * + *
            +         * Optional. List of domains to be excluded from the search results.
            +         * 
            + * + * repeated string exclude_domains = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The count of excludeDomains. + */ + public int getExcludeDomainsCount() { + return excludeDomains_.size(); + } + + /** + * + * + *
            +         * Optional. List of domains to be excluded from the search results.
            +         * 
            + * + * repeated string exclude_domains = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the element to return. + * @return The excludeDomains at the given index. + */ + public java.lang.String getExcludeDomains(int index) { + return excludeDomains_.get(index); + } + + /** + * + * + *
            +         * Optional. List of domains to be excluded from the search results.
            +         * 
            + * + * repeated string exclude_domains = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the value to return. + * @return The bytes of the excludeDomains at the given index. + */ + public com.google.protobuf.ByteString getExcludeDomainsBytes(int index) { + return excludeDomains_.getByteString(index); + } + + /** + * + * + *
            +         * Optional. List of domains to be excluded from the search results.
            +         * 
            + * + * repeated string exclude_domains = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index to set the value at. + * @param value The excludeDomains to set. + * @return This builder for chaining. + */ + public Builder setExcludeDomains(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureExcludeDomainsIsMutable(); + excludeDomains_.set(index, value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
            +         * Optional. List of domains to be excluded from the search results.
            +         * 
            + * + * repeated string exclude_domains = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The excludeDomains to add. + * @return This builder for chaining. + */ + public Builder addExcludeDomains(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureExcludeDomainsIsMutable(); + excludeDomains_.add(value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
            +         * Optional. List of domains to be excluded from the search results.
            +         * 
            + * + * repeated string exclude_domains = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param values The excludeDomains to add. + * @return This builder for chaining. + */ + public Builder addAllExcludeDomains(java.lang.Iterable values) { + ensureExcludeDomainsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, excludeDomains_); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
            +         * Optional. List of domains to be excluded from the search results.
            +         * 
            + * + * repeated string exclude_domains = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearExcludeDomains() { + excludeDomains_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + ; + onChanged(); + return this; + } + + /** + * + * + *
            +         * Optional. List of domains to be excluded from the search results.
            +         * 
            + * + * repeated string exclude_domains = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The bytes of the excludeDomains to add. + * @return This builder for chaining. + */ + public Builder addExcludeDomainsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureExcludeDomainsIsMutable(); + excludeDomains_.add(value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int blockingConfidence_ = 0; + + /** + * + * + *
            +         * Optional. Sites with confidence level chosen & above this value will be
            +         * blocked from the search results.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Citation.PhishBlockThreshold blocking_confidence = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for blockingConfidence. + */ + @java.lang.Override + public int getBlockingConfidenceValue() { + return blockingConfidence_; + } + + /** + * + * + *
            +         * Optional. Sites with confidence level chosen & above this value will be
            +         * blocked from the search results.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Citation.PhishBlockThreshold blocking_confidence = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The enum numeric value on the wire for blockingConfidence to set. + * @return This builder for chaining. + */ + public Builder setBlockingConfidenceValue(int value) { + blockingConfidence_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
            +         * Optional. Sites with confidence level chosen & above this value will be
            +         * blocked from the search results.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Citation.PhishBlockThreshold blocking_confidence = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The blockingConfidence. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Citation.PhishBlockThreshold + getBlockingConfidence() { + com.google.cloud.discoveryengine.v1beta.Citation.PhishBlockThreshold result = + com.google.cloud.discoveryengine.v1beta.Citation.PhishBlockThreshold.forNumber( + blockingConfidence_); + return result == null + ? com.google.cloud.discoveryengine.v1beta.Citation.PhishBlockThreshold.UNRECOGNIZED + : result; + } + + /** + * + * + *
            +         * Optional. Sites with confidence level chosen & above this value will be
            +         * blocked from the search results.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Citation.PhishBlockThreshold blocking_confidence = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The blockingConfidence to set. + * @return This builder for chaining. + */ + public Builder setBlockingConfidence( + com.google.cloud.discoveryengine.v1beta.Citation.PhishBlockThreshold value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + blockingConfidence_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
            +         * Optional. Sites with confidence level chosen & above this value will be
            +         * blocked from the search results.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Citation.PhishBlockThreshold blocking_confidence = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearBlockingConfidence() { + bitField0_ = (bitField0_ & ~0x00000002); + blockingConfidence_ = 0; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.GenerateGroundedContentRequest.GroundingSource.EnterpriseWebRetrievalSource) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.GenerateGroundedContentRequest.GroundingSource.EnterpriseWebRetrievalSource) + private static final com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentRequest + .GroundingSource.EnterpriseWebRetrievalSource + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentRequest + .GroundingSource.EnterpriseWebRetrievalSource(); + } + + public static com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentRequest + .GroundingSource.EnterpriseWebRetrievalSource + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public EnterpriseWebRetrievalSource parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentRequest.GroundingSource + .EnterpriseWebRetrievalSource + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int sourceCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object source_; + + public enum SourceCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + INLINE_SOURCE(1), + SEARCH_SOURCE(2), + GOOGLE_SEARCH_SOURCE(3), + ENTERPRISE_WEB_RETRIEVAL_SOURCE(8), + SOURCE_NOT_SET(0); + private final int value; + + private SourceCase(int value) { + this.value = value; } /** @@ -7685,6 +9925,8 @@ public static SourceCase forNumber(int value) { return SEARCH_SOURCE; case 3: return GOOGLE_SEARCH_SOURCE; + case 8: + return ENTERPRISE_WEB_RETRIEVAL_SOURCE; case 0: return SOURCE_NOT_SET; default: @@ -7802,113 +10044,183 @@ public boolean hasSearchSource() { * .google.cloud.discoveryengine.v1beta.GenerateGroundedContentRequest.GroundingSource.SearchSource search_source = 2; *
            * - * @return The searchSource. + * @return The searchSource. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentRequest.GroundingSource + .SearchSource + getSearchSource() { + if (sourceCase_ == 2) { + return (com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentRequest + .GroundingSource.SearchSource) + source_; + } + return com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentRequest.GroundingSource + .SearchSource.getDefaultInstance(); + } + + /** + * + * + *
            +     * If set, grounding is performed with Vertex AI Search.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.GenerateGroundedContentRequest.GroundingSource.SearchSource search_source = 2; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentRequest.GroundingSource + .SearchSourceOrBuilder + getSearchSourceOrBuilder() { + if (sourceCase_ == 2) { + return (com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentRequest + .GroundingSource.SearchSource) + source_; + } + return com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentRequest.GroundingSource + .SearchSource.getDefaultInstance(); + } + + public static final int GOOGLE_SEARCH_SOURCE_FIELD_NUMBER = 3; + + /** + * + * + *
            +     * If set, grounding is performed with Google Search.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.GenerateGroundedContentRequest.GroundingSource.GoogleSearchSource google_search_source = 3; + * + * + * @return Whether the googleSearchSource field is set. + */ + @java.lang.Override + public boolean hasGoogleSearchSource() { + return sourceCase_ == 3; + } + + /** + * + * + *
            +     * If set, grounding is performed with Google Search.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.GenerateGroundedContentRequest.GroundingSource.GoogleSearchSource google_search_source = 3; + * + * + * @return The googleSearchSource. */ @java.lang.Override public com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentRequest.GroundingSource - .SearchSource - getSearchSource() { - if (sourceCase_ == 2) { + .GoogleSearchSource + getGoogleSearchSource() { + if (sourceCase_ == 3) { return (com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentRequest - .GroundingSource.SearchSource) + .GroundingSource.GoogleSearchSource) source_; } return com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentRequest.GroundingSource - .SearchSource.getDefaultInstance(); + .GoogleSearchSource.getDefaultInstance(); } /** * * *
            -     * If set, grounding is performed with Vertex AI Search.
            +     * If set, grounding is performed with Google Search.
                  * 
            * * - * .google.cloud.discoveryengine.v1beta.GenerateGroundedContentRequest.GroundingSource.SearchSource search_source = 2; + * .google.cloud.discoveryengine.v1beta.GenerateGroundedContentRequest.GroundingSource.GoogleSearchSource google_search_source = 3; * */ @java.lang.Override public com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentRequest.GroundingSource - .SearchSourceOrBuilder - getSearchSourceOrBuilder() { - if (sourceCase_ == 2) { + .GoogleSearchSourceOrBuilder + getGoogleSearchSourceOrBuilder() { + if (sourceCase_ == 3) { return (com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentRequest - .GroundingSource.SearchSource) + .GroundingSource.GoogleSearchSource) source_; } return com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentRequest.GroundingSource - .SearchSource.getDefaultInstance(); + .GoogleSearchSource.getDefaultInstance(); } - public static final int GOOGLE_SEARCH_SOURCE_FIELD_NUMBER = 3; + public static final int ENTERPRISE_WEB_RETRIEVAL_SOURCE_FIELD_NUMBER = 8; /** * * *
            -     * If set, grounding is performed with Google Search.
            +     * If set, grounding is performed with enterprise web retrieval.
                  * 
            * * - * .google.cloud.discoveryengine.v1beta.GenerateGroundedContentRequest.GroundingSource.GoogleSearchSource google_search_source = 3; + * .google.cloud.discoveryengine.v1beta.GenerateGroundedContentRequest.GroundingSource.EnterpriseWebRetrievalSource enterprise_web_retrieval_source = 8; * * - * @return Whether the googleSearchSource field is set. + * @return Whether the enterpriseWebRetrievalSource field is set. */ @java.lang.Override - public boolean hasGoogleSearchSource() { - return sourceCase_ == 3; + public boolean hasEnterpriseWebRetrievalSource() { + return sourceCase_ == 8; } /** * * *
            -     * If set, grounding is performed with Google Search.
            +     * If set, grounding is performed with enterprise web retrieval.
                  * 
            * * - * .google.cloud.discoveryengine.v1beta.GenerateGroundedContentRequest.GroundingSource.GoogleSearchSource google_search_source = 3; + * .google.cloud.discoveryengine.v1beta.GenerateGroundedContentRequest.GroundingSource.EnterpriseWebRetrievalSource enterprise_web_retrieval_source = 8; * * - * @return The googleSearchSource. + * @return The enterpriseWebRetrievalSource. */ @java.lang.Override public com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentRequest.GroundingSource - .GoogleSearchSource - getGoogleSearchSource() { - if (sourceCase_ == 3) { + .EnterpriseWebRetrievalSource + getEnterpriseWebRetrievalSource() { + if (sourceCase_ == 8) { return (com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentRequest - .GroundingSource.GoogleSearchSource) + .GroundingSource.EnterpriseWebRetrievalSource) source_; } return com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentRequest.GroundingSource - .GoogleSearchSource.getDefaultInstance(); + .EnterpriseWebRetrievalSource.getDefaultInstance(); } /** * * *
            -     * If set, grounding is performed with Google Search.
            +     * If set, grounding is performed with enterprise web retrieval.
                  * 
            * * - * .google.cloud.discoveryengine.v1beta.GenerateGroundedContentRequest.GroundingSource.GoogleSearchSource google_search_source = 3; + * .google.cloud.discoveryengine.v1beta.GenerateGroundedContentRequest.GroundingSource.EnterpriseWebRetrievalSource enterprise_web_retrieval_source = 8; * */ @java.lang.Override public com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentRequest.GroundingSource - .GoogleSearchSourceOrBuilder - getGoogleSearchSourceOrBuilder() { - if (sourceCase_ == 3) { + .EnterpriseWebRetrievalSourceOrBuilder + getEnterpriseWebRetrievalSourceOrBuilder() { + if (sourceCase_ == 8) { return (com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentRequest - .GroundingSource.GoogleSearchSource) + .GroundingSource.EnterpriseWebRetrievalSource) source_; } return com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentRequest.GroundingSource - .GoogleSearchSource.getDefaultInstance(); + .EnterpriseWebRetrievalSource.getDefaultInstance(); } private byte memoizedIsInitialized = -1; @@ -7946,6 +10258,13 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io .GoogleSearchSource) source_); } + if (sourceCase_ == 8) { + output.writeMessage( + 8, + (com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentRequest.GroundingSource + .EnterpriseWebRetrievalSource) + source_); + } getUnknownFields().writeTo(output); } @@ -7979,6 +10298,14 @@ public int getSerializedSize() { .GroundingSource.GoogleSearchSource) source_); } + if (sourceCase_ == 8) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 8, + (com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentRequest + .GroundingSource.EnterpriseWebRetrievalSource) + source_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -8009,6 +10336,10 @@ public boolean equals(final java.lang.Object obj) { case 3: if (!getGoogleSearchSource().equals(other.getGoogleSearchSource())) return false; break; + case 8: + if (!getEnterpriseWebRetrievalSource().equals(other.getEnterpriseWebRetrievalSource())) + return false; + break; case 0: default: } @@ -8036,6 +10367,10 @@ public int hashCode() { hash = (37 * hash) + GOOGLE_SEARCH_SOURCE_FIELD_NUMBER; hash = (53 * hash) + getGoogleSearchSource().hashCode(); break; + case 8: + hash = (37 * hash) + ENTERPRISE_WEB_RETRIEVAL_SOURCE_FIELD_NUMBER; + hash = (53 * hash) + getEnterpriseWebRetrievalSource().hashCode(); + break; case 0: default: } @@ -8213,6 +10548,9 @@ public Builder clear() { if (googleSearchSourceBuilder_ != null) { googleSearchSourceBuilder_.clear(); } + if (enterpriseWebRetrievalSourceBuilder_ != null) { + enterpriseWebRetrievalSourceBuilder_.clear(); + } sourceCase_ = 0; source_ = null; return this; @@ -8277,6 +10615,9 @@ private void buildPartialOneofs( if (sourceCase_ == 3 && googleSearchSourceBuilder_ != null) { result.source_ = googleSearchSourceBuilder_.build(); } + if (sourceCase_ == 8 && enterpriseWebRetrievalSourceBuilder_ != null) { + result.source_ = enterpriseWebRetrievalSourceBuilder_.build(); + } } @java.lang.Override @@ -8317,6 +10658,11 @@ public Builder mergeFrom( mergeGoogleSearchSource(other.getGoogleSearchSource()); break; } + case ENTERPRISE_WEB_RETRIEVAL_SOURCE: + { + mergeEnterpriseWebRetrievalSource(other.getEnterpriseWebRetrievalSource()); + break; + } case SOURCE_NOT_SET: { break; @@ -8369,6 +10715,14 @@ public Builder mergeFrom( sourceCase_ = 3; break; } // case 26 + case 66: + { + input.readMessage( + internalGetEnterpriseWebRetrievalSourceFieldBuilder().getBuilder(), + extensionRegistry); + sourceCase_ = 8; + break; + } // case 66 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -9227,6 +11581,281 @@ public Builder clearGoogleSearchSource() { return googleSearchSourceBuilder_; } + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentRequest.GroundingSource + .EnterpriseWebRetrievalSource, + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentRequest.GroundingSource + .EnterpriseWebRetrievalSource.Builder, + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentRequest.GroundingSource + .EnterpriseWebRetrievalSourceOrBuilder> + enterpriseWebRetrievalSourceBuilder_; + + /** + * + * + *
            +       * If set, grounding is performed with enterprise web retrieval.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.GenerateGroundedContentRequest.GroundingSource.EnterpriseWebRetrievalSource enterprise_web_retrieval_source = 8; + * + * + * @return Whether the enterpriseWebRetrievalSource field is set. + */ + @java.lang.Override + public boolean hasEnterpriseWebRetrievalSource() { + return sourceCase_ == 8; + } + + /** + * + * + *
            +       * If set, grounding is performed with enterprise web retrieval.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.GenerateGroundedContentRequest.GroundingSource.EnterpriseWebRetrievalSource enterprise_web_retrieval_source = 8; + * + * + * @return The enterpriseWebRetrievalSource. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentRequest.GroundingSource + .EnterpriseWebRetrievalSource + getEnterpriseWebRetrievalSource() { + if (enterpriseWebRetrievalSourceBuilder_ == null) { + if (sourceCase_ == 8) { + return (com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentRequest + .GroundingSource.EnterpriseWebRetrievalSource) + source_; + } + return com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentRequest + .GroundingSource.EnterpriseWebRetrievalSource.getDefaultInstance(); + } else { + if (sourceCase_ == 8) { + return enterpriseWebRetrievalSourceBuilder_.getMessage(); + } + return com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentRequest + .GroundingSource.EnterpriseWebRetrievalSource.getDefaultInstance(); + } + } + + /** + * + * + *
            +       * If set, grounding is performed with enterprise web retrieval.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.GenerateGroundedContentRequest.GroundingSource.EnterpriseWebRetrievalSource enterprise_web_retrieval_source = 8; + * + */ + public Builder setEnterpriseWebRetrievalSource( + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentRequest.GroundingSource + .EnterpriseWebRetrievalSource + value) { + if (enterpriseWebRetrievalSourceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + source_ = value; + onChanged(); + } else { + enterpriseWebRetrievalSourceBuilder_.setMessage(value); + } + sourceCase_ = 8; + return this; + } + + /** + * + * + *
            +       * If set, grounding is performed with enterprise web retrieval.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.GenerateGroundedContentRequest.GroundingSource.EnterpriseWebRetrievalSource enterprise_web_retrieval_source = 8; + * + */ + public Builder setEnterpriseWebRetrievalSource( + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentRequest.GroundingSource + .EnterpriseWebRetrievalSource.Builder + builderForValue) { + if (enterpriseWebRetrievalSourceBuilder_ == null) { + source_ = builderForValue.build(); + onChanged(); + } else { + enterpriseWebRetrievalSourceBuilder_.setMessage(builderForValue.build()); + } + sourceCase_ = 8; + return this; + } + + /** + * + * + *
            +       * If set, grounding is performed with enterprise web retrieval.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.GenerateGroundedContentRequest.GroundingSource.EnterpriseWebRetrievalSource enterprise_web_retrieval_source = 8; + * + */ + public Builder mergeEnterpriseWebRetrievalSource( + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentRequest.GroundingSource + .EnterpriseWebRetrievalSource + value) { + if (enterpriseWebRetrievalSourceBuilder_ == null) { + if (sourceCase_ == 8 + && source_ + != com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentRequest + .GroundingSource.EnterpriseWebRetrievalSource.getDefaultInstance()) { + source_ = + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentRequest + .GroundingSource.EnterpriseWebRetrievalSource.newBuilder( + (com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentRequest + .GroundingSource.EnterpriseWebRetrievalSource) + source_) + .mergeFrom(value) + .buildPartial(); + } else { + source_ = value; + } + onChanged(); + } else { + if (sourceCase_ == 8) { + enterpriseWebRetrievalSourceBuilder_.mergeFrom(value); + } else { + enterpriseWebRetrievalSourceBuilder_.setMessage(value); + } + } + sourceCase_ = 8; + return this; + } + + /** + * + * + *
            +       * If set, grounding is performed with enterprise web retrieval.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.GenerateGroundedContentRequest.GroundingSource.EnterpriseWebRetrievalSource enterprise_web_retrieval_source = 8; + * + */ + public Builder clearEnterpriseWebRetrievalSource() { + if (enterpriseWebRetrievalSourceBuilder_ == null) { + if (sourceCase_ == 8) { + sourceCase_ = 0; + source_ = null; + onChanged(); + } + } else { + if (sourceCase_ == 8) { + sourceCase_ = 0; + source_ = null; + } + enterpriseWebRetrievalSourceBuilder_.clear(); + } + return this; + } + + /** + * + * + *
            +       * If set, grounding is performed with enterprise web retrieval.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.GenerateGroundedContentRequest.GroundingSource.EnterpriseWebRetrievalSource enterprise_web_retrieval_source = 8; + * + */ + public com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentRequest.GroundingSource + .EnterpriseWebRetrievalSource.Builder + getEnterpriseWebRetrievalSourceBuilder() { + return internalGetEnterpriseWebRetrievalSourceFieldBuilder().getBuilder(); + } + + /** + * + * + *
            +       * If set, grounding is performed with enterprise web retrieval.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.GenerateGroundedContentRequest.GroundingSource.EnterpriseWebRetrievalSource enterprise_web_retrieval_source = 8; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentRequest.GroundingSource + .EnterpriseWebRetrievalSourceOrBuilder + getEnterpriseWebRetrievalSourceOrBuilder() { + if ((sourceCase_ == 8) && (enterpriseWebRetrievalSourceBuilder_ != null)) { + return enterpriseWebRetrievalSourceBuilder_.getMessageOrBuilder(); + } else { + if (sourceCase_ == 8) { + return (com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentRequest + .GroundingSource.EnterpriseWebRetrievalSource) + source_; + } + return com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentRequest + .GroundingSource.EnterpriseWebRetrievalSource.getDefaultInstance(); + } + } + + /** + * + * + *
            +       * If set, grounding is performed with enterprise web retrieval.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.GenerateGroundedContentRequest.GroundingSource.EnterpriseWebRetrievalSource enterprise_web_retrieval_source = 8; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentRequest.GroundingSource + .EnterpriseWebRetrievalSource, + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentRequest.GroundingSource + .EnterpriseWebRetrievalSource.Builder, + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentRequest.GroundingSource + .EnterpriseWebRetrievalSourceOrBuilder> + internalGetEnterpriseWebRetrievalSourceFieldBuilder() { + if (enterpriseWebRetrievalSourceBuilder_ == null) { + if (!(sourceCase_ == 8)) { + source_ = + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentRequest + .GroundingSource.EnterpriseWebRetrievalSource.getDefaultInstance(); + } + enterpriseWebRetrievalSourceBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentRequest + .GroundingSource.EnterpriseWebRetrievalSource, + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentRequest + .GroundingSource.EnterpriseWebRetrievalSource.Builder, + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentRequest + .GroundingSource.EnterpriseWebRetrievalSourceOrBuilder>( + (com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentRequest + .GroundingSource.EnterpriseWebRetrievalSource) + source_, + getParentForChildren(), + isClean()); + source_ = null; + } + sourceCase_ = 8; + onChanged(); + return enterpriseWebRetrievalSourceBuilder_; + } + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.GenerateGroundedContentRequest.GroundingSource) } diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/GenerateGroundedContentResponse.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/GenerateGroundedContentResponse.java index 191121ba3ecc..7134574c7d59 100644 --- a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/GenerateGroundedContentResponse.java +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/GenerateGroundedContentResponse.java @@ -594,6 +594,158 @@ com.google.cloud.discoveryengine.v1beta.FactChunkOrBuilder getSupportChunksOrBui com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate .GroundingMetadata.GroundingSupportOrBuilder getGroundingSupportOrBuilder(int index); + + /** + * + * + *
            +       * Images from the web search.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.ImageMetadata images = 9; + * + */ + java.util.List< + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.ImageMetadata> + getImagesList(); + + /** + * + * + *
            +       * Images from the web search.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.ImageMetadata images = 9; + * + */ + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.ImageMetadata + getImages(int index); + + /** + * + * + *
            +       * Images from the web search.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.ImageMetadata images = 9; + * + */ + int getImagesCount(); + + /** + * + * + *
            +       * Images from the web search.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.ImageMetadata images = 9; + * + */ + java.util.List< + ? extends + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.ImageMetadataOrBuilder> + getImagesOrBuilderList(); + + /** + * + * + *
            +       * Images from the web search.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.ImageMetadata images = 9; + * + */ + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.ImageMetadataOrBuilder + getImagesOrBuilder(int index); + + /** + * + * + *
            +       * Videos from the web search.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.VideoMetadata videos = 11; + * + */ + java.util.List< + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.VideoMetadata> + getVideosList(); + + /** + * + * + *
            +       * Videos from the web search.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.VideoMetadata videos = 11; + * + */ + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.VideoMetadata + getVideos(int index); + + /** + * + * + *
            +       * Videos from the web search.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.VideoMetadata videos = 11; + * + */ + int getVideosCount(); + + /** + * + * + *
            +       * Videos from the web search.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.VideoMetadata videos = 11; + * + */ + java.util.List< + ? extends + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.VideoMetadataOrBuilder> + getVideosOrBuilderList(); + + /** + * + * + *
            +       * Videos from the web search.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.VideoMetadata videos = 11; + * + */ + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.VideoMetadataOrBuilder + getVideosOrBuilder(int index); } /** @@ -632,6 +784,8 @@ private GroundingMetadata() { supportChunks_ = java.util.Collections.emptyList(); webSearchQueries_ = com.google.protobuf.LazyStringArrayList.emptyList(); groundingSupport_ = java.util.Collections.emptyList(); + images_ = java.util.Collections.emptyList(); + videos_ = java.util.Collections.emptyList(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @@ -5911,1292 +6065,6814 @@ public com.google.protobuf.Parser getParserForType() { } } - private int bitField0_; - public static final int RETRIEVAL_METADATA_FIELD_NUMBER = 5; + public interface ImageMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.ImageMetadata) + com.google.protobuf.MessageOrBuilder { - @SuppressWarnings("serial") - private java.util.List< - com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate - .GroundingMetadata.RetrievalMetadata> - retrievalMetadata_; + /** + * + * + *
            +         * Metadata about the full size image.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.ImageMetadata.Image image = 1; + * + * + * @return Whether the image field is set. + */ + boolean hasImage(); - /** - * - * - *
            -       * Retrieval metadata to provide an understanding in the
            -       * retrieval steps performed by the model. There can be multiple such
            -       * messages which can correspond to different parts of the retrieval. This
            -       * is a mechanism used to ensure transparency to our users.
            -       * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.RetrievalMetadata retrieval_metadata = 5; - * - */ - @java.lang.Override - public java.util.List< - com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate - .GroundingMetadata.RetrievalMetadata> - getRetrievalMetadataList() { - return retrievalMetadata_; + /** + * + * + *
            +         * Metadata about the full size image.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.ImageMetadata.Image image = 1; + * + * + * @return The image. + */ + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.ImageMetadata.Image + getImage(); + + /** + * + * + *
            +         * Metadata about the full size image.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.ImageMetadata.Image image = 1; + * + */ + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.ImageMetadata.ImageOrBuilder + getImageOrBuilder(); + + /** + * + * + *
            +         * Metadata about the thumbnail.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.ImageMetadata.Image thumbnail = 2; + * + * + * @return Whether the thumbnail field is set. + */ + boolean hasThumbnail(); + + /** + * + * + *
            +         * Metadata about the thumbnail.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.ImageMetadata.Image thumbnail = 2; + * + * + * @return The thumbnail. + */ + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.ImageMetadata.Image + getThumbnail(); + + /** + * + * + *
            +         * Metadata about the thumbnail.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.ImageMetadata.Image thumbnail = 2; + * + */ + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.ImageMetadata.ImageOrBuilder + getThumbnailOrBuilder(); + + /** + * + * + *
            +         * The details about the website that the image is from.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.ImageMetadata.WebsiteInfo source = 3; + * + * + * @return Whether the source field is set. + */ + boolean hasSource(); + + /** + * + * + *
            +         * The details about the website that the image is from.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.ImageMetadata.WebsiteInfo source = 3; + * + * + * @return The source. + */ + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.ImageMetadata.WebsiteInfo + getSource(); + + /** + * + * + *
            +         * The details about the website that the image is from.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.ImageMetadata.WebsiteInfo source = 3; + * + */ + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.ImageMetadata.WebsiteInfoOrBuilder + getSourceOrBuilder(); } /** * * *
            -       * Retrieval metadata to provide an understanding in the
            -       * retrieval steps performed by the model. There can be multiple such
            -       * messages which can correspond to different parts of the retrieval. This
            -       * is a mechanism used to ensure transparency to our users.
            +       * Metadata about an image from the web search.
                    * 
            * - * - * repeated .google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.RetrievalMetadata retrieval_metadata = 5; - * + * Protobuf type {@code + * google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.ImageMetadata} */ - @java.lang.Override - public java.util.List< - ? extends - com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate - .GroundingMetadata.RetrievalMetadataOrBuilder> - getRetrievalMetadataOrBuilderList() { - return retrievalMetadata_; - } - - /** - * - * - *
            -       * Retrieval metadata to provide an understanding in the
            -       * retrieval steps performed by the model. There can be multiple such
            -       * messages which can correspond to different parts of the retrieval. This
            -       * is a mechanism used to ensure transparency to our users.
            -       * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.RetrievalMetadata retrieval_metadata = 5; - * - */ - @java.lang.Override - public int getRetrievalMetadataCount() { - return retrievalMetadata_.size(); - } + public static final class ImageMetadata extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.ImageMetadata) + ImageMetadataOrBuilder { + private static final long serialVersionUID = 0L; - /** - * - * - *
            -       * Retrieval metadata to provide an understanding in the
            -       * retrieval steps performed by the model. There can be multiple such
            -       * messages which can correspond to different parts of the retrieval. This
            -       * is a mechanism used to ensure transparency to our users.
            -       * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.RetrievalMetadata retrieval_metadata = 5; - * - */ - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate - .GroundingMetadata.RetrievalMetadata - getRetrievalMetadata(int index) { - return retrievalMetadata_.get(index); - } + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ImageMetadata"); + } - /** - * - * - *
            -       * Retrieval metadata to provide an understanding in the
            -       * retrieval steps performed by the model. There can be multiple such
            -       * messages which can correspond to different parts of the retrieval. This
            -       * is a mechanism used to ensure transparency to our users.
            -       * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.RetrievalMetadata retrieval_metadata = 5; - * - */ - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate - .GroundingMetadata.RetrievalMetadataOrBuilder - getRetrievalMetadataOrBuilder(int index) { - return retrievalMetadata_.get(index); - } + // Use ImageMetadata.newBuilder() to construct. + private ImageMetadata(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } - public static final int SUPPORT_CHUNKS_FIELD_NUMBER = 1; + private ImageMetadata() {} - @SuppressWarnings("serial") - private java.util.List supportChunks_; + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.GroundedGenerationServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_GenerateGroundedContentResponse_Candidate_GroundingMetadata_ImageMetadata_descriptor; + } - /** - * - * - *
            -       * List of chunks to be attributed across all claims in the candidate.
            -       * These are derived from the grounding sources supplied in the request.
            -       * 
            - * - * repeated .google.cloud.discoveryengine.v1beta.FactChunk support_chunks = 1; - */ - @java.lang.Override - public java.util.List - getSupportChunksList() { - return supportChunks_; - } + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.GroundedGenerationServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_GenerateGroundedContentResponse_Candidate_GroundingMetadata_ImageMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.ImageMetadata.class, + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.ImageMetadata.Builder.class); + } - /** - * - * - *
            -       * List of chunks to be attributed across all claims in the candidate.
            -       * These are derived from the grounding sources supplied in the request.
            -       * 
            - * - * repeated .google.cloud.discoveryengine.v1beta.FactChunk support_chunks = 1; - */ - @java.lang.Override - public java.util.List - getSupportChunksOrBuilderList() { - return supportChunks_; - } + public interface WebsiteInfoOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.ImageMetadata.WebsiteInfo) + com.google.protobuf.MessageOrBuilder { - /** - * - * - *
            -       * List of chunks to be attributed across all claims in the candidate.
            -       * These are derived from the grounding sources supplied in the request.
            -       * 
            - * - * repeated .google.cloud.discoveryengine.v1beta.FactChunk support_chunks = 1; - */ - @java.lang.Override - public int getSupportChunksCount() { - return supportChunks_.size(); - } + /** + * + * + *
            +           * The url of the website.
            +           * 
            + * + * string uri = 1; + * + * @return The uri. + */ + java.lang.String getUri(); - /** - * - * - *
            -       * List of chunks to be attributed across all claims in the candidate.
            -       * These are derived from the grounding sources supplied in the request.
            -       * 
            - * - * repeated .google.cloud.discoveryengine.v1beta.FactChunk support_chunks = 1; - */ - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.FactChunk getSupportChunks(int index) { - return supportChunks_.get(index); - } + /** + * + * + *
            +           * The url of the website.
            +           * 
            + * + * string uri = 1; + * + * @return The bytes for uri. + */ + com.google.protobuf.ByteString getUriBytes(); - /** - * - * - *
            -       * List of chunks to be attributed across all claims in the candidate.
            -       * These are derived from the grounding sources supplied in the request.
            -       * 
            - * - * repeated .google.cloud.discoveryengine.v1beta.FactChunk support_chunks = 1; - */ - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.FactChunkOrBuilder getSupportChunksOrBuilder( - int index) { - return supportChunks_.get(index); - } + /** + * + * + *
            +           * The title of the website.
            +           * 
            + * + * string title = 2; + * + * @return The title. + */ + java.lang.String getTitle(); - public static final int WEB_SEARCH_QUERIES_FIELD_NUMBER = 3; + /** + * + * + *
            +           * The title of the website.
            +           * 
            + * + * string title = 2; + * + * @return The bytes for title. + */ + com.google.protobuf.ByteString getTitleBytes(); - @SuppressWarnings("serial") - private com.google.protobuf.LazyStringArrayList webSearchQueries_ = - com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
            +           * The display name of the website.
            +           * 
            + * + * string site_display_name = 3; + * + * @return The siteDisplayName. + */ + java.lang.String getSiteDisplayName(); - /** - * - * - *
            -       * Web search queries for the following-up web search.
            -       * 
            - * - * repeated string web_search_queries = 3; - * - * @return A list containing the webSearchQueries. - */ - public com.google.protobuf.ProtocolStringList getWebSearchQueriesList() { - return webSearchQueries_; - } + /** + * + * + *
            +           * The display name of the website.
            +           * 
            + * + * string site_display_name = 3; + * + * @return The bytes for siteDisplayName. + */ + com.google.protobuf.ByteString getSiteDisplayNameBytes(); + } - /** - * - * - *
            -       * Web search queries for the following-up web search.
            -       * 
            - * - * repeated string web_search_queries = 3; - * - * @return The count of webSearchQueries. - */ - public int getWebSearchQueriesCount() { - return webSearchQueries_.size(); - } + /** + * + * + *
            +         * Metadata about the website that the image is from.
            +         * 
            + * + * Protobuf type {@code + * google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.ImageMetadata.WebsiteInfo} + */ + public static final class WebsiteInfo extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.ImageMetadata.WebsiteInfo) + WebsiteInfoOrBuilder { + private static final long serialVersionUID = 0L; - /** - * - * - *
            -       * Web search queries for the following-up web search.
            -       * 
            - * - * repeated string web_search_queries = 3; - * - * @param index The index of the element to return. - * @return The webSearchQueries at the given index. - */ - public java.lang.String getWebSearchQueries(int index) { - return webSearchQueries_.get(index); - } + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "WebsiteInfo"); + } - /** - * - * - *
            -       * Web search queries for the following-up web search.
            -       * 
            - * - * repeated string web_search_queries = 3; - * - * @param index The index of the value to return. - * @return The bytes of the webSearchQueries at the given index. - */ - public com.google.protobuf.ByteString getWebSearchQueriesBytes(int index) { - return webSearchQueries_.getByteString(index); - } + // Use WebsiteInfo.newBuilder() to construct. + private WebsiteInfo(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } - public static final int SEARCH_ENTRY_POINT_FIELD_NUMBER = 4; - private com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate - .GroundingMetadata.SearchEntryPoint - searchEntryPoint_; + private WebsiteInfo() { + uri_ = ""; + title_ = ""; + siteDisplayName_ = ""; + } - /** - * - * - *
            -       * Google search entry for the following-up web searches.
            -       * 
            - * - * - * .google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.SearchEntryPoint search_entry_point = 4; - * - * - * @return Whether the searchEntryPoint field is set. - */ - @java.lang.Override - public boolean hasSearchEntryPoint() { - return ((bitField0_ & 0x00000001) != 0); - } + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.GroundedGenerationServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_GenerateGroundedContentResponse_Candidate_GroundingMetadata_ImageMetadata_WebsiteInfo_descriptor; + } - /** - * - * - *
            -       * Google search entry for the following-up web searches.
            -       * 
            - * - * - * .google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.SearchEntryPoint search_entry_point = 4; - * - * - * @return The searchEntryPoint. - */ - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate - .GroundingMetadata.SearchEntryPoint - getSearchEntryPoint() { - return searchEntryPoint_ == null - ? com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate - .GroundingMetadata.SearchEntryPoint.getDefaultInstance() - : searchEntryPoint_; - } + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.GroundedGenerationServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_GenerateGroundedContentResponse_Candidate_GroundingMetadata_ImageMetadata_WebsiteInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse + .Candidate.GroundingMetadata.ImageMetadata.WebsiteInfo.class, + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse + .Candidate.GroundingMetadata.ImageMetadata.WebsiteInfo.Builder.class); + } - /** - * - * - *
            -       * Google search entry for the following-up web searches.
            -       * 
            - * - * - * .google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.SearchEntryPoint search_entry_point = 4; - * - */ - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate - .GroundingMetadata.SearchEntryPointOrBuilder - getSearchEntryPointOrBuilder() { - return searchEntryPoint_ == null - ? com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate - .GroundingMetadata.SearchEntryPoint.getDefaultInstance() - : searchEntryPoint_; - } + public static final int URI_FIELD_NUMBER = 1; - public static final int GROUNDING_SUPPORT_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object uri_ = ""; - @SuppressWarnings("serial") - private java.util.List< - com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate - .GroundingMetadata.GroundingSupport> - groundingSupport_; + /** + * + * + *
            +           * The url of the website.
            +           * 
            + * + * string uri = 1; + * + * @return The uri. + */ + @java.lang.Override + public java.lang.String getUri() { + java.lang.Object ref = uri_; + 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(); + uri_ = s; + return s; + } + } - /** - * - * - *
            -       * GroundingSupport across all claims in the answer candidate.
            -       * An support to a fact indicates that the claim is supported by
            -       * the fact.
            -       * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.GroundingSupport grounding_support = 2; - * - */ - @java.lang.Override - public java.util.List< - com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate - .GroundingMetadata.GroundingSupport> - getGroundingSupportList() { - return groundingSupport_; - } + /** + * + * + *
            +           * The url of the website.
            +           * 
            + * + * string uri = 1; + * + * @return The bytes for uri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getUriBytes() { + java.lang.Object ref = uri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } - /** - * - * - *
            -       * GroundingSupport across all claims in the answer candidate.
            -       * An support to a fact indicates that the claim is supported by
            -       * the fact.
            -       * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.GroundingSupport grounding_support = 2; - * - */ - @java.lang.Override - public java.util.List< - ? extends - com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate - .GroundingMetadata.GroundingSupportOrBuilder> - getGroundingSupportOrBuilderList() { - return groundingSupport_; - } + public static final int TITLE_FIELD_NUMBER = 2; - /** - * - * - *
            -       * GroundingSupport across all claims in the answer candidate.
            -       * An support to a fact indicates that the claim is supported by
            -       * the fact.
            -       * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.GroundingSupport grounding_support = 2; - * - */ - @java.lang.Override - public int getGroundingSupportCount() { - return groundingSupport_.size(); - } + @SuppressWarnings("serial") + private volatile java.lang.Object title_ = ""; - /** - * - * - *
            -       * GroundingSupport across all claims in the answer candidate.
            -       * An support to a fact indicates that the claim is supported by
            -       * the fact.
            -       * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.GroundingSupport grounding_support = 2; - * - */ - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate - .GroundingMetadata.GroundingSupport - getGroundingSupport(int index) { - return groundingSupport_.get(index); - } + /** + * + * + *
            +           * The title of the website.
            +           * 
            + * + * string title = 2; + * + * @return The title. + */ + @java.lang.Override + public java.lang.String getTitle() { + java.lang.Object ref = title_; + 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(); + title_ = s; + return s; + } + } - /** - * - * - *
            -       * GroundingSupport across all claims in the answer candidate.
            -       * An support to a fact indicates that the claim is supported by
            -       * the fact.
            -       * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.GroundingSupport grounding_support = 2; - * - */ - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate - .GroundingMetadata.GroundingSupportOrBuilder - getGroundingSupportOrBuilder(int index) { - return groundingSupport_.get(index); - } + /** + * + * + *
            +           * The title of the website.
            +           * 
            + * + * string title = 2; + * + * @return The bytes for title. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTitleBytes() { + java.lang.Object ref = title_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + title_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } - private byte memoizedIsInitialized = -1; + public static final int SITE_DISPLAY_NAME_FIELD_NUMBER = 3; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + @SuppressWarnings("serial") + private volatile java.lang.Object siteDisplayName_ = ""; - memoizedIsInitialized = 1; - return true; - } + /** + * + * + *
            +           * The display name of the website.
            +           * 
            + * + * string site_display_name = 3; + * + * @return The siteDisplayName. + */ + @java.lang.Override + public java.lang.String getSiteDisplayName() { + java.lang.Object ref = siteDisplayName_; + 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(); + siteDisplayName_ = s; + return s; + } + } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - for (int i = 0; i < supportChunks_.size(); i++) { - output.writeMessage(1, supportChunks_.get(i)); - } - for (int i = 0; i < groundingSupport_.size(); i++) { - output.writeMessage(2, groundingSupport_.get(i)); - } - for (int i = 0; i < webSearchQueries_.size(); i++) { - com.google.protobuf.GeneratedMessage.writeString(output, 3, webSearchQueries_.getRaw(i)); - } - if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(4, getSearchEntryPoint()); - } - for (int i = 0; i < retrievalMetadata_.size(); i++) { - output.writeMessage(5, retrievalMetadata_.get(i)); - } - getUnknownFields().writeTo(output); - } + /** + * + * + *
            +           * The display name of the website.
            +           * 
            + * + * string site_display_name = 3; + * + * @return The bytes for siteDisplayName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSiteDisplayNameBytes() { + java.lang.Object ref = siteDisplayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + siteDisplayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; + private byte memoizedIsInitialized = -1; - size = 0; - for (int i = 0; i < supportChunks_.size(); i++) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize(1, supportChunks_.get(i)); - } - for (int i = 0; i < groundingSupport_.size(); i++) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize(2, groundingSupport_.get(i)); - } - { - int dataSize = 0; - for (int i = 0; i < webSearchQueries_.size(); i++) { - dataSize += computeStringSizeNoTag(webSearchQueries_.getRaw(i)); + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; } - size += dataSize; - size += 1 * getWebSearchQueriesList().size(); - } - if (((bitField0_ & 0x00000001) != 0)) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize(4, getSearchEntryPoint()); - } - for (int i = 0; i < retrievalMetadata_.size(); i++) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 5, retrievalMetadata_.get(i)); - } - 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.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate - .GroundingMetadata)) { - return super.equals(obj); - } - com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate - .GroundingMetadata - other = - (com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate - .GroundingMetadata) - obj; + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(uri_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, uri_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(title_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, title_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(siteDisplayName_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, siteDisplayName_); + } + getUnknownFields().writeTo(output); + } - if (!getRetrievalMetadataList().equals(other.getRetrievalMetadataList())) return false; - if (!getSupportChunksList().equals(other.getSupportChunksList())) return false; - if (!getWebSearchQueriesList().equals(other.getWebSearchQueriesList())) return false; - if (hasSearchEntryPoint() != other.hasSearchEntryPoint()) return false; - if (hasSearchEntryPoint()) { - if (!getSearchEntryPoint().equals(other.getSearchEntryPoint())) return false; - } - if (!getGroundingSupportList().equals(other.getGroundingSupportList())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getRetrievalMetadataCount() > 0) { - hash = (37 * hash) + RETRIEVAL_METADATA_FIELD_NUMBER; - hash = (53 * hash) + getRetrievalMetadataList().hashCode(); - } - if (getSupportChunksCount() > 0) { - hash = (37 * hash) + SUPPORT_CHUNKS_FIELD_NUMBER; - hash = (53 * hash) + getSupportChunksList().hashCode(); - } - if (getWebSearchQueriesCount() > 0) { - hash = (37 * hash) + WEB_SEARCH_QUERIES_FIELD_NUMBER; - hash = (53 * hash) + getWebSearchQueriesList().hashCode(); - } - if (hasSearchEntryPoint()) { - hash = (37 * hash) + SEARCH_ENTRY_POINT_FIELD_NUMBER; - hash = (53 * hash) + getSearchEntryPoint().hashCode(); - } - if (getGroundingSupportCount() > 0) { - hash = (37 * hash) + GROUNDING_SUPPORT_FIELD_NUMBER; - hash = (53 * hash) + getGroundingSupportList().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(uri_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, uri_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(title_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, title_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(siteDisplayName_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, siteDisplayName_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } - public static com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse - .Candidate.GroundingMetadata - parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.ImageMetadata.WebsiteInfo)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.ImageMetadata.WebsiteInfo + other = + (com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse + .Candidate.GroundingMetadata.ImageMetadata.WebsiteInfo) + obj; + + if (!getUri().equals(other.getUri())) return false; + if (!getTitle().equals(other.getTitle())) return false; + if (!getSiteDisplayName().equals(other.getSiteDisplayName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } - public static com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse - .Candidate.GroundingMetadata - parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + URI_FIELD_NUMBER; + hash = (53 * hash) + getUri().hashCode(); + hash = (37 * hash) + TITLE_FIELD_NUMBER; + hash = (53 * hash) + getTitle().hashCode(); + hash = (37 * hash) + SITE_DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getSiteDisplayName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse + .Candidate.GroundingMetadata.ImageMetadata.WebsiteInfo + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - public static com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse - .Candidate.GroundingMetadata - parseFrom(com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } + public static com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse + .Candidate.GroundingMetadata.ImageMetadata.WebsiteInfo + 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.discoveryengine.v1beta.GenerateGroundedContentResponse - .Candidate.GroundingMetadata - 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.discoveryengine.v1beta.GenerateGroundedContentResponse + .Candidate.GroundingMetadata.ImageMetadata.WebsiteInfo + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - public static com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse - .Candidate.GroundingMetadata - parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } + public static com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse + .Candidate.GroundingMetadata.ImageMetadata.WebsiteInfo + 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.discoveryengine.v1beta.GenerateGroundedContentResponse - .Candidate.GroundingMetadata - parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } + public static com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse + .Candidate.GroundingMetadata.ImageMetadata.WebsiteInfo + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - public static com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse - .Candidate.GroundingMetadata - parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } + public static com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse + .Candidate.GroundingMetadata.ImageMetadata.WebsiteInfo + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - public static com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse - .Candidate.GroundingMetadata - 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.discoveryengine.v1beta.GenerateGroundedContentResponse + .Candidate.GroundingMetadata.ImageMetadata.WebsiteInfo + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } - public static com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse - .Candidate.GroundingMetadata - parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } + public static com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse + .Candidate.GroundingMetadata.ImageMetadata.WebsiteInfo + 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.discoveryengine.v1beta.GenerateGroundedContentResponse - .Candidate.GroundingMetadata - 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.discoveryengine.v1beta.GenerateGroundedContentResponse + .Candidate.GroundingMetadata.ImageMetadata.WebsiteInfo + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input); + } - public static com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse - .Candidate.GroundingMetadata - parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } + public static com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse + .Candidate.GroundingMetadata.ImageMetadata.WebsiteInfo + 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.discoveryengine.v1beta.GenerateGroundedContentResponse - .Candidate.GroundingMetadata - parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } + public static com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse + .Candidate.GroundingMetadata.ImageMetadata.WebsiteInfo + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } + public static com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse + .Candidate.GroundingMetadata.ImageMetadata.WebsiteInfo + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } - public static Builder newBuilder( - com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate - .GroundingMetadata - prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } + public static Builder newBuilder( + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.ImageMetadata.WebsiteInfo + prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } - /** - * - * - *
            -       * Citation for the generated content.
            -       * 
            - * - * Protobuf type {@code - * google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata} - */ - public static final class Builder - extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata) - com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate - .GroundingMetadataOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.discoveryengine.v1beta.GroundedGenerationServiceProto - .internal_static_google_cloud_discoveryengine_v1beta_GenerateGroundedContentResponse_Candidate_GroundingMetadata_descriptor; - } + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.discoveryengine.v1beta.GroundedGenerationServiceProto - .internal_static_google_cloud_discoveryengine_v1beta_GenerateGroundedContentResponse_Candidate_GroundingMetadata_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate - .GroundingMetadata.class, + /** + * + * + *
            +           * Metadata about the website that the image is from.
            +           * 
            + * + * Protobuf type {@code + * google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.ImageMetadata.WebsiteInfo} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.ImageMetadata.WebsiteInfo) + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.ImageMetadata.WebsiteInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.GroundedGenerationServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_GenerateGroundedContentResponse_Candidate_GroundingMetadata_ImageMetadata_WebsiteInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.GroundedGenerationServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_GenerateGroundedContentResponse_Candidate_GroundingMetadata_ImageMetadata_WebsiteInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse + .Candidate.GroundingMetadata.ImageMetadata.WebsiteInfo.class, + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse + .Candidate.GroundingMetadata.ImageMetadata.WebsiteInfo.Builder.class); + } + + // Construct using + // com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.ImageMetadata.WebsiteInfo.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + uri_ = ""; + title_ = ""; + siteDisplayName_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1beta.GroundedGenerationServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_GenerateGroundedContentResponse_Candidate_GroundingMetadata_ImageMetadata_WebsiteInfo_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.ImageMetadata.WebsiteInfo + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse + .Candidate.GroundingMetadata.ImageMetadata.WebsiteInfo.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.ImageMetadata.WebsiteInfo + build() { + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.ImageMetadata.WebsiteInfo + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.ImageMetadata.WebsiteInfo + buildPartial() { + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.ImageMetadata.WebsiteInfo + result = + new com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse + .Candidate.GroundingMetadata.ImageMetadata.WebsiteInfo(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.ImageMetadata.WebsiteInfo + result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.uri_ = uri_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.title_ = title_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.siteDisplayName_ = siteDisplayName_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate - .GroundingMetadata.Builder.class); - } + .GroundingMetadata.ImageMetadata.WebsiteInfo) { + return mergeFrom( + (com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse + .Candidate.GroundingMetadata.ImageMetadata.WebsiteInfo) + other); + } else { + super.mergeFrom(other); + return this; + } + } - // Construct using - // com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.ImageMetadata.WebsiteInfo + other) { + if (other + == com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse + .Candidate.GroundingMetadata.ImageMetadata.WebsiteInfo.getDefaultInstance()) + return this; + if (!other.getUri().isEmpty()) { + uri_ = other.uri_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getTitle().isEmpty()) { + title_ = other.title_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getSiteDisplayName().isEmpty()) { + siteDisplayName_ = other.siteDisplayName_; + bitField0_ |= 0x00000004; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + uri_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + title_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + siteDisplayName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object uri_ = ""; + + /** + * + * + *
            +             * The url of the website.
            +             * 
            + * + * string uri = 1; + * + * @return The uri. + */ + public java.lang.String getUri() { + java.lang.Object ref = uri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
            +             * The url of the website.
            +             * 
            + * + * string uri = 1; + * + * @return The bytes for uri. + */ + public com.google.protobuf.ByteString getUriBytes() { + java.lang.Object ref = uri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
            +             * The url of the website.
            +             * 
            + * + * string uri = 1; + * + * @param value The uri to set. + * @return This builder for chaining. + */ + public Builder setUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + uri_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
            +             * The url of the website.
            +             * 
            + * + * string uri = 1; + * + * @return This builder for chaining. + */ + public Builder clearUri() { + uri_ = getDefaultInstance().getUri(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
            +             * The url of the website.
            +             * 
            + * + * string uri = 1; + * + * @param value The bytes for uri to set. + * @return This builder for chaining. + */ + public Builder setUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + uri_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object title_ = ""; + + /** + * + * + *
            +             * The title of the website.
            +             * 
            + * + * string title = 2; + * + * @return The title. + */ + public java.lang.String getTitle() { + java.lang.Object ref = title_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + title_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
            +             * The title of the website.
            +             * 
            + * + * string title = 2; + * + * @return The bytes for title. + */ + public com.google.protobuf.ByteString getTitleBytes() { + java.lang.Object ref = title_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + title_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
            +             * The title of the website.
            +             * 
            + * + * string title = 2; + * + * @param value The title to set. + * @return This builder for chaining. + */ + public Builder setTitle(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + title_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
            +             * The title of the website.
            +             * 
            + * + * string title = 2; + * + * @return This builder for chaining. + */ + public Builder clearTitle() { + title_ = getDefaultInstance().getTitle(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
            +             * The title of the website.
            +             * 
            + * + * string title = 2; + * + * @param value The bytes for title to set. + * @return This builder for chaining. + */ + public Builder setTitleBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + title_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object siteDisplayName_ = ""; + + /** + * + * + *
            +             * The display name of the website.
            +             * 
            + * + * string site_display_name = 3; + * + * @return The siteDisplayName. + */ + public java.lang.String getSiteDisplayName() { + java.lang.Object ref = siteDisplayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + siteDisplayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
            +             * The display name of the website.
            +             * 
            + * + * string site_display_name = 3; + * + * @return The bytes for siteDisplayName. + */ + public com.google.protobuf.ByteString getSiteDisplayNameBytes() { + java.lang.Object ref = siteDisplayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + siteDisplayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
            +             * The display name of the website.
            +             * 
            + * + * string site_display_name = 3; + * + * @param value The siteDisplayName to set. + * @return This builder for chaining. + */ + public Builder setSiteDisplayName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + siteDisplayName_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
            +             * The display name of the website.
            +             * 
            + * + * string site_display_name = 3; + * + * @return This builder for chaining. + */ + public Builder clearSiteDisplayName() { + siteDisplayName_ = getDefaultInstance().getSiteDisplayName(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
            +             * The display name of the website.
            +             * 
            + * + * string site_display_name = 3; + * + * @param value The bytes for siteDisplayName to set. + * @return This builder for chaining. + */ + public Builder setSiteDisplayNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + siteDisplayName_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.ImageMetadata.WebsiteInfo) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.ImageMetadata.WebsiteInfo) + private static final com.google.cloud.discoveryengine.v1beta + .GenerateGroundedContentResponse.Candidate.GroundingMetadata.ImageMetadata + .WebsiteInfo + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse + .Candidate.GroundingMetadata.ImageMetadata.WebsiteInfo(); + } + + public static com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse + .Candidate.GroundingMetadata.ImageMetadata.WebsiteInfo + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public WebsiteInfo parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.ImageMetadata.WebsiteInfo + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface ImageOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.ImageMetadata.Image) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
            +           * The url of the image.
            +           * 
            + * + * string uri = 1; + * + * @return The uri. + */ + java.lang.String getUri(); + + /** + * + * + *
            +           * The url of the image.
            +           * 
            + * + * string uri = 1; + * + * @return The bytes for uri. + */ + com.google.protobuf.ByteString getUriBytes(); + + /** + * + * + *
            +           * The width of the image in pixels.
            +           * 
            + * + * int32 width = 2; + * + * @return The width. + */ + int getWidth(); + + /** + * + * + *
            +           * The height of the image in pixels.
            +           * 
            + * + * int32 height = 3; + * + * @return The height. + */ + int getHeight(); + } + + /** + * + * + *
            +         * Metadata about the image.
            +         * 
            + * + * Protobuf type {@code + * google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.ImageMetadata.Image} + */ + public static final class Image extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.ImageMetadata.Image) + ImageOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Image"); + } + + // Use Image.newBuilder() to construct. + private Image(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private Image() { + uri_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.GroundedGenerationServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_GenerateGroundedContentResponse_Candidate_GroundingMetadata_ImageMetadata_Image_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.GroundedGenerationServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_GenerateGroundedContentResponse_Candidate_GroundingMetadata_ImageMetadata_Image_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse + .Candidate.GroundingMetadata.ImageMetadata.Image.class, + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse + .Candidate.GroundingMetadata.ImageMetadata.Image.Builder.class); + } + + public static final int URI_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object uri_ = ""; + + /** + * + * + *
            +           * The url of the image.
            +           * 
            + * + * string uri = 1; + * + * @return The uri. + */ + @java.lang.Override + public java.lang.String getUri() { + java.lang.Object ref = uri_; + 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(); + uri_ = s; + return s; + } + } + + /** + * + * + *
            +           * The url of the image.
            +           * 
            + * + * string uri = 1; + * + * @return The bytes for uri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getUriBytes() { + java.lang.Object ref = uri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int WIDTH_FIELD_NUMBER = 2; + private int width_ = 0; + + /** + * + * + *
            +           * The width of the image in pixels.
            +           * 
            + * + * int32 width = 2; + * + * @return The width. + */ + @java.lang.Override + public int getWidth() { + return width_; + } + + public static final int HEIGHT_FIELD_NUMBER = 3; + private int height_ = 0; + + /** + * + * + *
            +           * The height of the image in pixels.
            +           * 
            + * + * int32 height = 3; + * + * @return The height. + */ + @java.lang.Override + public int getHeight() { + return height_; + } + + 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(uri_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, uri_); + } + if (width_ != 0) { + output.writeInt32(2, width_); + } + if (height_ != 0) { + output.writeInt32(3, height_); + } + 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(uri_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, uri_); + } + if (width_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, width_); + } + if (height_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(3, height_); + } + 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.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.ImageMetadata.Image)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.ImageMetadata.Image + other = + (com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse + .Candidate.GroundingMetadata.ImageMetadata.Image) + obj; + + if (!getUri().equals(other.getUri())) return false; + if (getWidth() != other.getWidth()) return false; + if (getHeight() != other.getHeight()) 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) + URI_FIELD_NUMBER; + hash = (53 * hash) + getUri().hashCode(); + hash = (37 * hash) + WIDTH_FIELD_NUMBER; + hash = (53 * hash) + getWidth(); + hash = (37 * hash) + HEIGHT_FIELD_NUMBER; + hash = (53 * hash) + getHeight(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse + .Candidate.GroundingMetadata.ImageMetadata.Image + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse + .Candidate.GroundingMetadata.ImageMetadata.Image + 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.discoveryengine.v1beta.GenerateGroundedContentResponse + .Candidate.GroundingMetadata.ImageMetadata.Image + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse + .Candidate.GroundingMetadata.ImageMetadata.Image + 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.discoveryengine.v1beta.GenerateGroundedContentResponse + .Candidate.GroundingMetadata.ImageMetadata.Image + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse + .Candidate.GroundingMetadata.ImageMetadata.Image + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse + .Candidate.GroundingMetadata.ImageMetadata.Image + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse + .Candidate.GroundingMetadata.ImageMetadata.Image + 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.discoveryengine.v1beta.GenerateGroundedContentResponse + .Candidate.GroundingMetadata.ImageMetadata.Image + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse + .Candidate.GroundingMetadata.ImageMetadata.Image + 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.discoveryengine.v1beta.GenerateGroundedContentResponse + .Candidate.GroundingMetadata.ImageMetadata.Image + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse + .Candidate.GroundingMetadata.ImageMetadata.Image + 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.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.ImageMetadata.Image + 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; + } + + /** + * + * + *
            +           * Metadata about the image.
            +           * 
            + * + * Protobuf type {@code + * google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.ImageMetadata.Image} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.ImageMetadata.Image) + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.ImageMetadata.ImageOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.GroundedGenerationServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_GenerateGroundedContentResponse_Candidate_GroundingMetadata_ImageMetadata_Image_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.GroundedGenerationServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_GenerateGroundedContentResponse_Candidate_GroundingMetadata_ImageMetadata_Image_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse + .Candidate.GroundingMetadata.ImageMetadata.Image.class, + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse + .Candidate.GroundingMetadata.ImageMetadata.Image.Builder.class); + } + + // Construct using + // com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.ImageMetadata.Image.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + uri_ = ""; + width_ = 0; + height_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1beta.GroundedGenerationServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_GenerateGroundedContentResponse_Candidate_GroundingMetadata_ImageMetadata_Image_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.ImageMetadata.Image + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse + .Candidate.GroundingMetadata.ImageMetadata.Image.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.ImageMetadata.Image + build() { + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.ImageMetadata.Image + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.ImageMetadata.Image + buildPartial() { + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.ImageMetadata.Image + result = + new com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse + .Candidate.GroundingMetadata.ImageMetadata.Image(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.ImageMetadata.Image + result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.uri_ = uri_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.width_ = width_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.height_ = height_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.ImageMetadata.Image) { + return mergeFrom( + (com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse + .Candidate.GroundingMetadata.ImageMetadata.Image) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.ImageMetadata.Image + other) { + if (other + == com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse + .Candidate.GroundingMetadata.ImageMetadata.Image.getDefaultInstance()) + return this; + if (!other.getUri().isEmpty()) { + uri_ = other.uri_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getWidth() != 0) { + setWidth(other.getWidth()); + } + if (other.getHeight() != 0) { + setHeight(other.getHeight()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + uri_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + width_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 24: + { + height_ = input.readInt32(); + bitField0_ |= 0x00000004; + break; + } // case 24 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object uri_ = ""; + + /** + * + * + *
            +             * The url of the image.
            +             * 
            + * + * string uri = 1; + * + * @return The uri. + */ + public java.lang.String getUri() { + java.lang.Object ref = uri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
            +             * The url of the image.
            +             * 
            + * + * string uri = 1; + * + * @return The bytes for uri. + */ + public com.google.protobuf.ByteString getUriBytes() { + java.lang.Object ref = uri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
            +             * The url of the image.
            +             * 
            + * + * string uri = 1; + * + * @param value The uri to set. + * @return This builder for chaining. + */ + public Builder setUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + uri_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
            +             * The url of the image.
            +             * 
            + * + * string uri = 1; + * + * @return This builder for chaining. + */ + public Builder clearUri() { + uri_ = getDefaultInstance().getUri(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
            +             * The url of the image.
            +             * 
            + * + * string uri = 1; + * + * @param value The bytes for uri to set. + * @return This builder for chaining. + */ + public Builder setUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + uri_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int width_; + + /** + * + * + *
            +             * The width of the image in pixels.
            +             * 
            + * + * int32 width = 2; + * + * @return The width. + */ + @java.lang.Override + public int getWidth() { + return width_; + } + + /** + * + * + *
            +             * The width of the image in pixels.
            +             * 
            + * + * int32 width = 2; + * + * @param value The width to set. + * @return This builder for chaining. + */ + public Builder setWidth(int value) { + + width_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
            +             * The width of the image in pixels.
            +             * 
            + * + * int32 width = 2; + * + * @return This builder for chaining. + */ + public Builder clearWidth() { + bitField0_ = (bitField0_ & ~0x00000002); + width_ = 0; + onChanged(); + return this; + } + + private int height_; + + /** + * + * + *
            +             * The height of the image in pixels.
            +             * 
            + * + * int32 height = 3; + * + * @return The height. + */ + @java.lang.Override + public int getHeight() { + return height_; + } + + /** + * + * + *
            +             * The height of the image in pixels.
            +             * 
            + * + * int32 height = 3; + * + * @param value The height to set. + * @return This builder for chaining. + */ + public Builder setHeight(int value) { + + height_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
            +             * The height of the image in pixels.
            +             * 
            + * + * int32 height = 3; + * + * @return This builder for chaining. + */ + public Builder clearHeight() { + bitField0_ = (bitField0_ & ~0x00000004); + height_ = 0; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.ImageMetadata.Image) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.ImageMetadata.Image) + private static final com.google.cloud.discoveryengine.v1beta + .GenerateGroundedContentResponse.Candidate.GroundingMetadata.ImageMetadata.Image + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse + .Candidate.GroundingMetadata.ImageMetadata.Image(); + } + + public static com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse + .Candidate.GroundingMetadata.ImageMetadata.Image + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Image parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.ImageMetadata.Image + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int bitField0_; + public static final int IMAGE_FIELD_NUMBER = 1; + private com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.ImageMetadata.Image + image_; + + /** + * + * + *
            +         * Metadata about the full size image.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.ImageMetadata.Image image = 1; + * + * + * @return Whether the image field is set. + */ + @java.lang.Override + public boolean hasImage() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
            +         * Metadata about the full size image.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.ImageMetadata.Image image = 1; + * + * + * @return The image. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.ImageMetadata.Image + getImage() { + return image_ == null + ? com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.ImageMetadata.Image.getDefaultInstance() + : image_; + } + + /** + * + * + *
            +         * Metadata about the full size image.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.ImageMetadata.Image image = 1; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.ImageMetadata.ImageOrBuilder + getImageOrBuilder() { + return image_ == null + ? com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.ImageMetadata.Image.getDefaultInstance() + : image_; + } + + public static final int THUMBNAIL_FIELD_NUMBER = 2; + private com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.ImageMetadata.Image + thumbnail_; + + /** + * + * + *
            +         * Metadata about the thumbnail.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.ImageMetadata.Image thumbnail = 2; + * + * + * @return Whether the thumbnail field is set. + */ + @java.lang.Override + public boolean hasThumbnail() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
            +         * Metadata about the thumbnail.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.ImageMetadata.Image thumbnail = 2; + * + * + * @return The thumbnail. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.ImageMetadata.Image + getThumbnail() { + return thumbnail_ == null + ? com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.ImageMetadata.Image.getDefaultInstance() + : thumbnail_; + } + + /** + * + * + *
            +         * Metadata about the thumbnail.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.ImageMetadata.Image thumbnail = 2; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.ImageMetadata.ImageOrBuilder + getThumbnailOrBuilder() { + return thumbnail_ == null + ? com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.ImageMetadata.Image.getDefaultInstance() + : thumbnail_; + } + + public static final int SOURCE_FIELD_NUMBER = 3; + private com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.ImageMetadata.WebsiteInfo + source_; + + /** + * + * + *
            +         * The details about the website that the image is from.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.ImageMetadata.WebsiteInfo source = 3; + * + * + * @return Whether the source field is set. + */ + @java.lang.Override + public boolean hasSource() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
            +         * The details about the website that the image is from.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.ImageMetadata.WebsiteInfo source = 3; + * + * + * @return The source. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.ImageMetadata.WebsiteInfo + getSource() { + return source_ == null + ? com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.ImageMetadata.WebsiteInfo.getDefaultInstance() + : source_; + } + + /** + * + * + *
            +         * The details about the website that the image is from.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.ImageMetadata.WebsiteInfo source = 3; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.ImageMetadata.WebsiteInfoOrBuilder + getSourceOrBuilder() { + return source_ == null + ? com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.ImageMetadata.WebsiteInfo.getDefaultInstance() + : source_; + } + + 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, getImage()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(2, getThumbnail()); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeMessage(3, getSource()); + } + 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, getImage()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getThumbnail()); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getSource()); + } + 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.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.ImageMetadata)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.ImageMetadata + other = + (com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.ImageMetadata) + obj; + + if (hasImage() != other.hasImage()) return false; + if (hasImage()) { + if (!getImage().equals(other.getImage())) return false; + } + if (hasThumbnail() != other.hasThumbnail()) return false; + if (hasThumbnail()) { + if (!getThumbnail().equals(other.getThumbnail())) return false; + } + if (hasSource() != other.hasSource()) return false; + if (hasSource()) { + if (!getSource().equals(other.getSource())) 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 (hasImage()) { + hash = (37 * hash) + IMAGE_FIELD_NUMBER; + hash = (53 * hash) + getImage().hashCode(); + } + if (hasThumbnail()) { + hash = (37 * hash) + THUMBNAIL_FIELD_NUMBER; + hash = (53 * hash) + getThumbnail().hashCode(); + } + if (hasSource()) { + hash = (37 * hash) + SOURCE_FIELD_NUMBER; + hash = (53 * hash) + getSource().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse + .Candidate.GroundingMetadata.ImageMetadata + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse + .Candidate.GroundingMetadata.ImageMetadata + 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.discoveryengine.v1beta.GenerateGroundedContentResponse + .Candidate.GroundingMetadata.ImageMetadata + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse + .Candidate.GroundingMetadata.ImageMetadata + 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.discoveryengine.v1beta.GenerateGroundedContentResponse + .Candidate.GroundingMetadata.ImageMetadata + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse + .Candidate.GroundingMetadata.ImageMetadata + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse + .Candidate.GroundingMetadata.ImageMetadata + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse + .Candidate.GroundingMetadata.ImageMetadata + 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.discoveryengine.v1beta.GenerateGroundedContentResponse + .Candidate.GroundingMetadata.ImageMetadata + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse + .Candidate.GroundingMetadata.ImageMetadata + 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.discoveryengine.v1beta.GenerateGroundedContentResponse + .Candidate.GroundingMetadata.ImageMetadata + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse + .Candidate.GroundingMetadata.ImageMetadata + 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.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.ImageMetadata + 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; + } + + /** + * + * + *
            +         * Metadata about an image from the web search.
            +         * 
            + * + * Protobuf type {@code + * google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.ImageMetadata} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.ImageMetadata) + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.ImageMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.GroundedGenerationServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_GenerateGroundedContentResponse_Candidate_GroundingMetadata_ImageMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.GroundedGenerationServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_GenerateGroundedContentResponse_Candidate_GroundingMetadata_ImageMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse + .Candidate.GroundingMetadata.ImageMetadata.class, + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse + .Candidate.GroundingMetadata.ImageMetadata.Builder.class); + } + + // Construct using + // com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.ImageMetadata.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetImageFieldBuilder(); + internalGetThumbnailFieldBuilder(); + internalGetSourceFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + image_ = null; + if (imageBuilder_ != null) { + imageBuilder_.dispose(); + imageBuilder_ = null; + } + thumbnail_ = null; + if (thumbnailBuilder_ != null) { + thumbnailBuilder_.dispose(); + thumbnailBuilder_ = null; + } + source_ = null; + if (sourceBuilder_ != null) { + sourceBuilder_.dispose(); + sourceBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1beta.GroundedGenerationServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_GenerateGroundedContentResponse_Candidate_GroundingMetadata_ImageMetadata_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.ImageMetadata + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.ImageMetadata.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.ImageMetadata + build() { + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.ImageMetadata + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.ImageMetadata + buildPartial() { + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.ImageMetadata + result = + new com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse + .Candidate.GroundingMetadata.ImageMetadata(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.ImageMetadata + result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.image_ = imageBuilder_ == null ? image_ : imageBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.thumbnail_ = + thumbnailBuilder_ == null ? thumbnail_ : thumbnailBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.source_ = sourceBuilder_ == null ? source_ : sourceBuilder_.build(); + to_bitField0_ |= 0x00000004; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.ImageMetadata) { + return mergeFrom( + (com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.ImageMetadata) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.ImageMetadata + other) { + if (other + == com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.ImageMetadata.getDefaultInstance()) return this; + if (other.hasImage()) { + mergeImage(other.getImage()); + } + if (other.hasThumbnail()) { + mergeThumbnail(other.getThumbnail()); + } + if (other.hasSource()) { + mergeSource(other.getSource()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage( + internalGetImageFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage( + internalGetThumbnailFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage( + internalGetSourceFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.ImageMetadata.Image + image_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.ImageMetadata.Image, + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.ImageMetadata.Image.Builder, + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.ImageMetadata.ImageOrBuilder> + imageBuilder_; + + /** + * + * + *
            +           * Metadata about the full size image.
            +           * 
            + * + * + * .google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.ImageMetadata.Image image = 1; + * + * + * @return Whether the image field is set. + */ + public boolean hasImage() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
            +           * Metadata about the full size image.
            +           * 
            + * + * + * .google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.ImageMetadata.Image image = 1; + * + * + * @return The image. + */ + public com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.ImageMetadata.Image + getImage() { + if (imageBuilder_ == null) { + return image_ == null + ? com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse + .Candidate.GroundingMetadata.ImageMetadata.Image.getDefaultInstance() + : image_; + } else { + return imageBuilder_.getMessage(); + } + } + + /** + * + * + *
            +           * Metadata about the full size image.
            +           * 
            + * + * + * .google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.ImageMetadata.Image image = 1; + * + */ + public Builder setImage( + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.ImageMetadata.Image + value) { + if (imageBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + image_ = value; + } else { + imageBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
            +           * Metadata about the full size image.
            +           * 
            + * + * + * .google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.ImageMetadata.Image image = 1; + * + */ + public Builder setImage( + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.ImageMetadata.Image.Builder + builderForValue) { + if (imageBuilder_ == null) { + image_ = builderForValue.build(); + } else { + imageBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
            +           * Metadata about the full size image.
            +           * 
            + * + * + * .google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.ImageMetadata.Image image = 1; + * + */ + public Builder mergeImage( + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.ImageMetadata.Image + value) { + if (imageBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && image_ != null + && image_ + != com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse + .Candidate.GroundingMetadata.ImageMetadata.Image.getDefaultInstance()) { + getImageBuilder().mergeFrom(value); + } else { + image_ = value; + } + } else { + imageBuilder_.mergeFrom(value); + } + if (image_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + + /** + * + * + *
            +           * Metadata about the full size image.
            +           * 
            + * + * + * .google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.ImageMetadata.Image image = 1; + * + */ + public Builder clearImage() { + bitField0_ = (bitField0_ & ~0x00000001); + image_ = null; + if (imageBuilder_ != null) { + imageBuilder_.dispose(); + imageBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
            +           * Metadata about the full size image.
            +           * 
            + * + * + * .google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.ImageMetadata.Image image = 1; + * + */ + public com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.ImageMetadata.Image.Builder + getImageBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return internalGetImageFieldBuilder().getBuilder(); + } + + /** + * + * + *
            +           * Metadata about the full size image.
            +           * 
            + * + * + * .google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.ImageMetadata.Image image = 1; + * + */ + public com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.ImageMetadata.ImageOrBuilder + getImageOrBuilder() { + if (imageBuilder_ != null) { + return imageBuilder_.getMessageOrBuilder(); + } else { + return image_ == null + ? com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse + .Candidate.GroundingMetadata.ImageMetadata.Image.getDefaultInstance() + : image_; + } + } + + /** + * + * + *
            +           * Metadata about the full size image.
            +           * 
            + * + * + * .google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.ImageMetadata.Image image = 1; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.ImageMetadata.Image, + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.ImageMetadata.Image.Builder, + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.ImageMetadata.ImageOrBuilder> + internalGetImageFieldBuilder() { + if (imageBuilder_ == null) { + imageBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse + .Candidate.GroundingMetadata.ImageMetadata.Image, + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse + .Candidate.GroundingMetadata.ImageMetadata.Image.Builder, + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse + .Candidate.GroundingMetadata.ImageMetadata.ImageOrBuilder>( + getImage(), getParentForChildren(), isClean()); + image_ = null; + } + return imageBuilder_; + } + + private com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.ImageMetadata.Image + thumbnail_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.ImageMetadata.Image, + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.ImageMetadata.Image.Builder, + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.ImageMetadata.ImageOrBuilder> + thumbnailBuilder_; + + /** + * + * + *
            +           * Metadata about the thumbnail.
            +           * 
            + * + * + * .google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.ImageMetadata.Image thumbnail = 2; + * + * + * @return Whether the thumbnail field is set. + */ + public boolean hasThumbnail() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
            +           * Metadata about the thumbnail.
            +           * 
            + * + * + * .google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.ImageMetadata.Image thumbnail = 2; + * + * + * @return The thumbnail. + */ + public com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.ImageMetadata.Image + getThumbnail() { + if (thumbnailBuilder_ == null) { + return thumbnail_ == null + ? com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse + .Candidate.GroundingMetadata.ImageMetadata.Image.getDefaultInstance() + : thumbnail_; + } else { + return thumbnailBuilder_.getMessage(); + } + } + + /** + * + * + *
            +           * Metadata about the thumbnail.
            +           * 
            + * + * + * .google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.ImageMetadata.Image thumbnail = 2; + * + */ + public Builder setThumbnail( + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.ImageMetadata.Image + value) { + if (thumbnailBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + thumbnail_ = value; + } else { + thumbnailBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
            +           * Metadata about the thumbnail.
            +           * 
            + * + * + * .google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.ImageMetadata.Image thumbnail = 2; + * + */ + public Builder setThumbnail( + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.ImageMetadata.Image.Builder + builderForValue) { + if (thumbnailBuilder_ == null) { + thumbnail_ = builderForValue.build(); + } else { + thumbnailBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
            +           * Metadata about the thumbnail.
            +           * 
            + * + * + * .google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.ImageMetadata.Image thumbnail = 2; + * + */ + public Builder mergeThumbnail( + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.ImageMetadata.Image + value) { + if (thumbnailBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && thumbnail_ != null + && thumbnail_ + != com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse + .Candidate.GroundingMetadata.ImageMetadata.Image.getDefaultInstance()) { + getThumbnailBuilder().mergeFrom(value); + } else { + thumbnail_ = value; + } + } else { + thumbnailBuilder_.mergeFrom(value); + } + if (thumbnail_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** + * + * + *
            +           * Metadata about the thumbnail.
            +           * 
            + * + * + * .google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.ImageMetadata.Image thumbnail = 2; + * + */ + public Builder clearThumbnail() { + bitField0_ = (bitField0_ & ~0x00000002); + thumbnail_ = null; + if (thumbnailBuilder_ != null) { + thumbnailBuilder_.dispose(); + thumbnailBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
            +           * Metadata about the thumbnail.
            +           * 
            + * + * + * .google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.ImageMetadata.Image thumbnail = 2; + * + */ + public com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.ImageMetadata.Image.Builder + getThumbnailBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return internalGetThumbnailFieldBuilder().getBuilder(); + } + + /** + * + * + *
            +           * Metadata about the thumbnail.
            +           * 
            + * + * + * .google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.ImageMetadata.Image thumbnail = 2; + * + */ + public com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.ImageMetadata.ImageOrBuilder + getThumbnailOrBuilder() { + if (thumbnailBuilder_ != null) { + return thumbnailBuilder_.getMessageOrBuilder(); + } else { + return thumbnail_ == null + ? com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse + .Candidate.GroundingMetadata.ImageMetadata.Image.getDefaultInstance() + : thumbnail_; + } + } + + /** + * + * + *
            +           * Metadata about the thumbnail.
            +           * 
            + * + * + * .google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.ImageMetadata.Image thumbnail = 2; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.ImageMetadata.Image, + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.ImageMetadata.Image.Builder, + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.ImageMetadata.ImageOrBuilder> + internalGetThumbnailFieldBuilder() { + if (thumbnailBuilder_ == null) { + thumbnailBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse + .Candidate.GroundingMetadata.ImageMetadata.Image, + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse + .Candidate.GroundingMetadata.ImageMetadata.Image.Builder, + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse + .Candidate.GroundingMetadata.ImageMetadata.ImageOrBuilder>( + getThumbnail(), getParentForChildren(), isClean()); + thumbnail_ = null; + } + return thumbnailBuilder_; + } + + private com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.ImageMetadata.WebsiteInfo + source_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.ImageMetadata.WebsiteInfo, + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.ImageMetadata.WebsiteInfo.Builder, + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.ImageMetadata.WebsiteInfoOrBuilder> + sourceBuilder_; + + /** + * + * + *
            +           * The details about the website that the image is from.
            +           * 
            + * + * + * .google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.ImageMetadata.WebsiteInfo source = 3; + * + * + * @return Whether the source field is set. + */ + public boolean hasSource() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
            +           * The details about the website that the image is from.
            +           * 
            + * + * + * .google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.ImageMetadata.WebsiteInfo source = 3; + * + * + * @return The source. + */ + public com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.ImageMetadata.WebsiteInfo + getSource() { + if (sourceBuilder_ == null) { + return source_ == null + ? com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse + .Candidate.GroundingMetadata.ImageMetadata.WebsiteInfo.getDefaultInstance() + : source_; + } else { + return sourceBuilder_.getMessage(); + } + } + + /** + * + * + *
            +           * The details about the website that the image is from.
            +           * 
            + * + * + * .google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.ImageMetadata.WebsiteInfo source = 3; + * + */ + public Builder setSource( + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.ImageMetadata.WebsiteInfo + value) { + if (sourceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + source_ = value; + } else { + sourceBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
            +           * The details about the website that the image is from.
            +           * 
            + * + * + * .google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.ImageMetadata.WebsiteInfo source = 3; + * + */ + public Builder setSource( + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.ImageMetadata.WebsiteInfo.Builder + builderForValue) { + if (sourceBuilder_ == null) { + source_ = builderForValue.build(); + } else { + sourceBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
            +           * The details about the website that the image is from.
            +           * 
            + * + * + * .google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.ImageMetadata.WebsiteInfo source = 3; + * + */ + public Builder mergeSource( + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.ImageMetadata.WebsiteInfo + value) { + if (sourceBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && source_ != null + && source_ + != com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse + .Candidate.GroundingMetadata.ImageMetadata.WebsiteInfo + .getDefaultInstance()) { + getSourceBuilder().mergeFrom(value); + } else { + source_ = value; + } + } else { + sourceBuilder_.mergeFrom(value); + } + if (source_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + + /** + * + * + *
            +           * The details about the website that the image is from.
            +           * 
            + * + * + * .google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.ImageMetadata.WebsiteInfo source = 3; + * + */ + public Builder clearSource() { + bitField0_ = (bitField0_ & ~0x00000004); + source_ = null; + if (sourceBuilder_ != null) { + sourceBuilder_.dispose(); + sourceBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
            +           * The details about the website that the image is from.
            +           * 
            + * + * + * .google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.ImageMetadata.WebsiteInfo source = 3; + * + */ + public com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.ImageMetadata.WebsiteInfo.Builder + getSourceBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return internalGetSourceFieldBuilder().getBuilder(); + } + + /** + * + * + *
            +           * The details about the website that the image is from.
            +           * 
            + * + * + * .google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.ImageMetadata.WebsiteInfo source = 3; + * + */ + public com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.ImageMetadata.WebsiteInfoOrBuilder + getSourceOrBuilder() { + if (sourceBuilder_ != null) { + return sourceBuilder_.getMessageOrBuilder(); + } else { + return source_ == null + ? com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse + .Candidate.GroundingMetadata.ImageMetadata.WebsiteInfo.getDefaultInstance() + : source_; + } + } + + /** + * + * + *
            +           * The details about the website that the image is from.
            +           * 
            + * + * + * .google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.ImageMetadata.WebsiteInfo source = 3; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.ImageMetadata.WebsiteInfo, + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.ImageMetadata.WebsiteInfo.Builder, + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.ImageMetadata.WebsiteInfoOrBuilder> + internalGetSourceFieldBuilder() { + if (sourceBuilder_ == null) { + sourceBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse + .Candidate.GroundingMetadata.ImageMetadata.WebsiteInfo, + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse + .Candidate.GroundingMetadata.ImageMetadata.WebsiteInfo.Builder, + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse + .Candidate.GroundingMetadata.ImageMetadata.WebsiteInfoOrBuilder>( + getSource(), getParentForChildren(), isClean()); + source_ = null; + } + return sourceBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.ImageMetadata) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.ImageMetadata) + private static final com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse + .Candidate.GroundingMetadata.ImageMetadata + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.ImageMetadata(); + } + + public static com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse + .Candidate.GroundingMetadata.ImageMetadata + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ImageMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.ImageMetadata + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface VideoMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.VideoMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
            +         * The external id of the video.
            +         * 
            + * + * string youtube_external_id = 1; + * + * @return The youtubeExternalId. + */ + java.lang.String getYoutubeExternalId(); + + /** + * + * + *
            +         * The external id of the video.
            +         * 
            + * + * string youtube_external_id = 1; + * + * @return The bytes for youtubeExternalId. + */ + com.google.protobuf.ByteString getYoutubeExternalIdBytes(); + } + + /** + * + * + *
            +       * Metadata about a video from the web search.
            +       * 
            + * + * Protobuf type {@code + * google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.VideoMetadata} + */ + public static final class VideoMetadata extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.VideoMetadata) + VideoMetadataOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "VideoMetadata"); + } + + // Use VideoMetadata.newBuilder() to construct. + private VideoMetadata(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private VideoMetadata() { + youtubeExternalId_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.GroundedGenerationServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_GenerateGroundedContentResponse_Candidate_GroundingMetadata_VideoMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.GroundedGenerationServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_GenerateGroundedContentResponse_Candidate_GroundingMetadata_VideoMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.VideoMetadata.class, + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.VideoMetadata.Builder.class); + } + + public static final int YOUTUBE_EXTERNAL_ID_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object youtubeExternalId_ = ""; + + /** + * + * + *
            +         * The external id of the video.
            +         * 
            + * + * string youtube_external_id = 1; + * + * @return The youtubeExternalId. + */ + @java.lang.Override + public java.lang.String getYoutubeExternalId() { + java.lang.Object ref = youtubeExternalId_; + 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(); + youtubeExternalId_ = s; + return s; + } + } + + /** + * + * + *
            +         * The external id of the video.
            +         * 
            + * + * string youtube_external_id = 1; + * + * @return The bytes for youtubeExternalId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getYoutubeExternalIdBytes() { + java.lang.Object ref = youtubeExternalId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + youtubeExternalId_ = 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 { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(youtubeExternalId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, youtubeExternalId_); + } + 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(youtubeExternalId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, youtubeExternalId_); + } + 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.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.VideoMetadata)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.VideoMetadata + other = + (com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.VideoMetadata) + obj; + + if (!getYoutubeExternalId().equals(other.getYoutubeExternalId())) 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) + YOUTUBE_EXTERNAL_ID_FIELD_NUMBER; + hash = (53 * hash) + getYoutubeExternalId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse + .Candidate.GroundingMetadata.VideoMetadata + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse + .Candidate.GroundingMetadata.VideoMetadata + 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.discoveryengine.v1beta.GenerateGroundedContentResponse + .Candidate.GroundingMetadata.VideoMetadata + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse + .Candidate.GroundingMetadata.VideoMetadata + 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.discoveryengine.v1beta.GenerateGroundedContentResponse + .Candidate.GroundingMetadata.VideoMetadata + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse + .Candidate.GroundingMetadata.VideoMetadata + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse + .Candidate.GroundingMetadata.VideoMetadata + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse + .Candidate.GroundingMetadata.VideoMetadata + 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.discoveryengine.v1beta.GenerateGroundedContentResponse + .Candidate.GroundingMetadata.VideoMetadata + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse + .Candidate.GroundingMetadata.VideoMetadata + 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.discoveryengine.v1beta.GenerateGroundedContentResponse + .Candidate.GroundingMetadata.VideoMetadata + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse + .Candidate.GroundingMetadata.VideoMetadata + 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.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.VideoMetadata + 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; + } + + /** + * + * + *
            +         * Metadata about a video from the web search.
            +         * 
            + * + * Protobuf type {@code + * google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.VideoMetadata} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.VideoMetadata) + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.VideoMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.GroundedGenerationServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_GenerateGroundedContentResponse_Candidate_GroundingMetadata_VideoMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.GroundedGenerationServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_GenerateGroundedContentResponse_Candidate_GroundingMetadata_VideoMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse + .Candidate.GroundingMetadata.VideoMetadata.class, + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse + .Candidate.GroundingMetadata.VideoMetadata.Builder.class); + } + + // Construct using + // com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.VideoMetadata.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + youtubeExternalId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1beta.GroundedGenerationServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_GenerateGroundedContentResponse_Candidate_GroundingMetadata_VideoMetadata_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.VideoMetadata + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.VideoMetadata.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.VideoMetadata + build() { + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.VideoMetadata + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.VideoMetadata + buildPartial() { + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.VideoMetadata + result = + new com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse + .Candidate.GroundingMetadata.VideoMetadata(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.VideoMetadata + result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.youtubeExternalId_ = youtubeExternalId_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.VideoMetadata) { + return mergeFrom( + (com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.VideoMetadata) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.VideoMetadata + other) { + if (other + == com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.VideoMetadata.getDefaultInstance()) return this; + if (!other.getYoutubeExternalId().isEmpty()) { + youtubeExternalId_ = other.youtubeExternalId_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + youtubeExternalId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object youtubeExternalId_ = ""; + + /** + * + * + *
            +           * The external id of the video.
            +           * 
            + * + * string youtube_external_id = 1; + * + * @return The youtubeExternalId. + */ + public java.lang.String getYoutubeExternalId() { + java.lang.Object ref = youtubeExternalId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + youtubeExternalId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
            +           * The external id of the video.
            +           * 
            + * + * string youtube_external_id = 1; + * + * @return The bytes for youtubeExternalId. + */ + public com.google.protobuf.ByteString getYoutubeExternalIdBytes() { + java.lang.Object ref = youtubeExternalId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + youtubeExternalId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
            +           * The external id of the video.
            +           * 
            + * + * string youtube_external_id = 1; + * + * @param value The youtubeExternalId to set. + * @return This builder for chaining. + */ + public Builder setYoutubeExternalId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + youtubeExternalId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
            +           * The external id of the video.
            +           * 
            + * + * string youtube_external_id = 1; + * + * @return This builder for chaining. + */ + public Builder clearYoutubeExternalId() { + youtubeExternalId_ = getDefaultInstance().getYoutubeExternalId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
            +           * The external id of the video.
            +           * 
            + * + * string youtube_external_id = 1; + * + * @param value The bytes for youtubeExternalId to set. + * @return This builder for chaining. + */ + public Builder setYoutubeExternalIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + youtubeExternalId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.VideoMetadata) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.VideoMetadata) + private static final com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse + .Candidate.GroundingMetadata.VideoMetadata + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.VideoMetadata(); + } + + public static com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse + .Candidate.GroundingMetadata.VideoMetadata + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public VideoMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.VideoMetadata + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int bitField0_; + public static final int RETRIEVAL_METADATA_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private java.util.List< + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.RetrievalMetadata> + retrievalMetadata_; + + /** + * + * + *
            +       * Retrieval metadata to provide an understanding in the
            +       * retrieval steps performed by the model. There can be multiple such
            +       * messages which can correspond to different parts of the retrieval. This
            +       * is a mechanism used to ensure transparency to our users.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.RetrievalMetadata retrieval_metadata = 5; + * + */ + @java.lang.Override + public java.util.List< + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.RetrievalMetadata> + getRetrievalMetadataList() { + return retrievalMetadata_; + } + + /** + * + * + *
            +       * Retrieval metadata to provide an understanding in the
            +       * retrieval steps performed by the model. There can be multiple such
            +       * messages which can correspond to different parts of the retrieval. This
            +       * is a mechanism used to ensure transparency to our users.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.RetrievalMetadata retrieval_metadata = 5; + * + */ + @java.lang.Override + public java.util.List< + ? extends + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.RetrievalMetadataOrBuilder> + getRetrievalMetadataOrBuilderList() { + return retrievalMetadata_; + } + + /** + * + * + *
            +       * Retrieval metadata to provide an understanding in the
            +       * retrieval steps performed by the model. There can be multiple such
            +       * messages which can correspond to different parts of the retrieval. This
            +       * is a mechanism used to ensure transparency to our users.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.RetrievalMetadata retrieval_metadata = 5; + * + */ + @java.lang.Override + public int getRetrievalMetadataCount() { + return retrievalMetadata_.size(); + } + + /** + * + * + *
            +       * Retrieval metadata to provide an understanding in the
            +       * retrieval steps performed by the model. There can be multiple such
            +       * messages which can correspond to different parts of the retrieval. This
            +       * is a mechanism used to ensure transparency to our users.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.RetrievalMetadata retrieval_metadata = 5; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.RetrievalMetadata + getRetrievalMetadata(int index) { + return retrievalMetadata_.get(index); + } + + /** + * + * + *
            +       * Retrieval metadata to provide an understanding in the
            +       * retrieval steps performed by the model. There can be multiple such
            +       * messages which can correspond to different parts of the retrieval. This
            +       * is a mechanism used to ensure transparency to our users.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.RetrievalMetadata retrieval_metadata = 5; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.RetrievalMetadataOrBuilder + getRetrievalMetadataOrBuilder(int index) { + return retrievalMetadata_.get(index); + } + + public static final int SUPPORT_CHUNKS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List supportChunks_; + + /** + * + * + *
            +       * List of chunks to be attributed across all claims in the candidate.
            +       * These are derived from the grounding sources supplied in the request.
            +       * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.FactChunk support_chunks = 1; + */ + @java.lang.Override + public java.util.List + getSupportChunksList() { + return supportChunks_; + } + + /** + * + * + *
            +       * List of chunks to be attributed across all claims in the candidate.
            +       * These are derived from the grounding sources supplied in the request.
            +       * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.FactChunk support_chunks = 1; + */ + @java.lang.Override + public java.util.List + getSupportChunksOrBuilderList() { + return supportChunks_; + } + + /** + * + * + *
            +       * List of chunks to be attributed across all claims in the candidate.
            +       * These are derived from the grounding sources supplied in the request.
            +       * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.FactChunk support_chunks = 1; + */ + @java.lang.Override + public int getSupportChunksCount() { + return supportChunks_.size(); + } + + /** + * + * + *
            +       * List of chunks to be attributed across all claims in the candidate.
            +       * These are derived from the grounding sources supplied in the request.
            +       * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.FactChunk support_chunks = 1; + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.FactChunk getSupportChunks(int index) { + return supportChunks_.get(index); + } + + /** + * + * + *
            +       * List of chunks to be attributed across all claims in the candidate.
            +       * These are derived from the grounding sources supplied in the request.
            +       * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.FactChunk support_chunks = 1; + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.FactChunkOrBuilder getSupportChunksOrBuilder( + int index) { + return supportChunks_.get(index); + } + + public static final int WEB_SEARCH_QUERIES_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList webSearchQueries_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + /** + * + * + *
            +       * Web search queries for the following-up web search.
            +       * 
            + * + * repeated string web_search_queries = 3; + * + * @return A list containing the webSearchQueries. + */ + public com.google.protobuf.ProtocolStringList getWebSearchQueriesList() { + return webSearchQueries_; + } + + /** + * + * + *
            +       * Web search queries for the following-up web search.
            +       * 
            + * + * repeated string web_search_queries = 3; + * + * @return The count of webSearchQueries. + */ + public int getWebSearchQueriesCount() { + return webSearchQueries_.size(); + } + + /** + * + * + *
            +       * Web search queries for the following-up web search.
            +       * 
            + * + * repeated string web_search_queries = 3; + * + * @param index The index of the element to return. + * @return The webSearchQueries at the given index. + */ + public java.lang.String getWebSearchQueries(int index) { + return webSearchQueries_.get(index); + } + + /** + * + * + *
            +       * Web search queries for the following-up web search.
            +       * 
            + * + * repeated string web_search_queries = 3; + * + * @param index The index of the value to return. + * @return The bytes of the webSearchQueries at the given index. + */ + public com.google.protobuf.ByteString getWebSearchQueriesBytes(int index) { + return webSearchQueries_.getByteString(index); + } + + public static final int SEARCH_ENTRY_POINT_FIELD_NUMBER = 4; + private com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.SearchEntryPoint + searchEntryPoint_; + + /** + * + * + *
            +       * Google search entry for the following-up web searches.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.SearchEntryPoint search_entry_point = 4; + * + * + * @return Whether the searchEntryPoint field is set. + */ + @java.lang.Override + public boolean hasSearchEntryPoint() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
            +       * Google search entry for the following-up web searches.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.SearchEntryPoint search_entry_point = 4; + * + * + * @return The searchEntryPoint. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.SearchEntryPoint + getSearchEntryPoint() { + return searchEntryPoint_ == null + ? com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.SearchEntryPoint.getDefaultInstance() + : searchEntryPoint_; + } + + /** + * + * + *
            +       * Google search entry for the following-up web searches.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.SearchEntryPoint search_entry_point = 4; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.SearchEntryPointOrBuilder + getSearchEntryPointOrBuilder() { + return searchEntryPoint_ == null + ? com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.SearchEntryPoint.getDefaultInstance() + : searchEntryPoint_; + } + + public static final int GROUNDING_SUPPORT_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private java.util.List< + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.GroundingSupport> + groundingSupport_; + + /** + * + * + *
            +       * GroundingSupport across all claims in the answer candidate.
            +       * An support to a fact indicates that the claim is supported by
            +       * the fact.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.GroundingSupport grounding_support = 2; + * + */ + @java.lang.Override + public java.util.List< + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.GroundingSupport> + getGroundingSupportList() { + return groundingSupport_; + } + + /** + * + * + *
            +       * GroundingSupport across all claims in the answer candidate.
            +       * An support to a fact indicates that the claim is supported by
            +       * the fact.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.GroundingSupport grounding_support = 2; + * + */ + @java.lang.Override + public java.util.List< + ? extends + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.GroundingSupportOrBuilder> + getGroundingSupportOrBuilderList() { + return groundingSupport_; + } + + /** + * + * + *
            +       * GroundingSupport across all claims in the answer candidate.
            +       * An support to a fact indicates that the claim is supported by
            +       * the fact.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.GroundingSupport grounding_support = 2; + * + */ + @java.lang.Override + public int getGroundingSupportCount() { + return groundingSupport_.size(); + } + + /** + * + * + *
            +       * GroundingSupport across all claims in the answer candidate.
            +       * An support to a fact indicates that the claim is supported by
            +       * the fact.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.GroundingSupport grounding_support = 2; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.GroundingSupport + getGroundingSupport(int index) { + return groundingSupport_.get(index); + } + + /** + * + * + *
            +       * GroundingSupport across all claims in the answer candidate.
            +       * An support to a fact indicates that the claim is supported by
            +       * the fact.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.GroundingSupport grounding_support = 2; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.GroundingSupportOrBuilder + getGroundingSupportOrBuilder(int index) { + return groundingSupport_.get(index); + } + + public static final int IMAGES_FIELD_NUMBER = 9; + + @SuppressWarnings("serial") + private java.util.List< + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.ImageMetadata> + images_; + + /** + * + * + *
            +       * Images from the web search.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.ImageMetadata images = 9; + * + */ + @java.lang.Override + public java.util.List< + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.ImageMetadata> + getImagesList() { + return images_; + } + + /** + * + * + *
            +       * Images from the web search.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.ImageMetadata images = 9; + * + */ + @java.lang.Override + public java.util.List< + ? extends + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.ImageMetadataOrBuilder> + getImagesOrBuilderList() { + return images_; + } + + /** + * + * + *
            +       * Images from the web search.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.ImageMetadata images = 9; + * + */ + @java.lang.Override + public int getImagesCount() { + return images_.size(); + } + + /** + * + * + *
            +       * Images from the web search.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.ImageMetadata images = 9; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.ImageMetadata + getImages(int index) { + return images_.get(index); + } + + /** + * + * + *
            +       * Images from the web search.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.ImageMetadata images = 9; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.ImageMetadataOrBuilder + getImagesOrBuilder(int index) { + return images_.get(index); + } + + public static final int VIDEOS_FIELD_NUMBER = 11; + + @SuppressWarnings("serial") + private java.util.List< + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.VideoMetadata> + videos_; + + /** + * + * + *
            +       * Videos from the web search.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.VideoMetadata videos = 11; + * + */ + @java.lang.Override + public java.util.List< + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.VideoMetadata> + getVideosList() { + return videos_; + } + + /** + * + * + *
            +       * Videos from the web search.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.VideoMetadata videos = 11; + * + */ + @java.lang.Override + public java.util.List< + ? extends + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.VideoMetadataOrBuilder> + getVideosOrBuilderList() { + return videos_; + } + + /** + * + * + *
            +       * Videos from the web search.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.VideoMetadata videos = 11; + * + */ + @java.lang.Override + public int getVideosCount() { + return videos_.size(); + } + + /** + * + * + *
            +       * Videos from the web search.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.VideoMetadata videos = 11; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.VideoMetadata + getVideos(int index) { + return videos_.get(index); + } + + /** + * + * + *
            +       * Videos from the web search.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.VideoMetadata videos = 11; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.VideoMetadataOrBuilder + getVideosOrBuilder(int index) { + return videos_.get(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 { + for (int i = 0; i < supportChunks_.size(); i++) { + output.writeMessage(1, supportChunks_.get(i)); + } + for (int i = 0; i < groundingSupport_.size(); i++) { + output.writeMessage(2, groundingSupport_.get(i)); + } + for (int i = 0; i < webSearchQueries_.size(); i++) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, webSearchQueries_.getRaw(i)); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(4, getSearchEntryPoint()); + } + for (int i = 0; i < retrievalMetadata_.size(); i++) { + output.writeMessage(5, retrievalMetadata_.get(i)); + } + for (int i = 0; i < images_.size(); i++) { + output.writeMessage(9, images_.get(i)); + } + for (int i = 0; i < videos_.size(); i++) { + output.writeMessage(11, videos_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < supportChunks_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(1, supportChunks_.get(i)); + } + for (int i = 0; i < groundingSupport_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(2, groundingSupport_.get(i)); + } + { + int dataSize = 0; + for (int i = 0; i < webSearchQueries_.size(); i++) { + dataSize += computeStringSizeNoTag(webSearchQueries_.getRaw(i)); + } + size += dataSize; + size += 1 * getWebSearchQueriesList().size(); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(4, getSearchEntryPoint()); + } + for (int i = 0; i < retrievalMetadata_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 5, retrievalMetadata_.get(i)); + } + for (int i = 0; i < images_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(9, images_.get(i)); + } + for (int i = 0; i < videos_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(11, videos_.get(i)); + } + 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.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata + other = + (com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata) + obj; + + if (!getRetrievalMetadataList().equals(other.getRetrievalMetadataList())) return false; + if (!getSupportChunksList().equals(other.getSupportChunksList())) return false; + if (!getWebSearchQueriesList().equals(other.getWebSearchQueriesList())) return false; + if (hasSearchEntryPoint() != other.hasSearchEntryPoint()) return false; + if (hasSearchEntryPoint()) { + if (!getSearchEntryPoint().equals(other.getSearchEntryPoint())) return false; + } + if (!getGroundingSupportList().equals(other.getGroundingSupportList())) return false; + if (!getImagesList().equals(other.getImagesList())) return false; + if (!getVideosList().equals(other.getVideosList())) 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 (getRetrievalMetadataCount() > 0) { + hash = (37 * hash) + RETRIEVAL_METADATA_FIELD_NUMBER; + hash = (53 * hash) + getRetrievalMetadataList().hashCode(); + } + if (getSupportChunksCount() > 0) { + hash = (37 * hash) + SUPPORT_CHUNKS_FIELD_NUMBER; + hash = (53 * hash) + getSupportChunksList().hashCode(); + } + if (getWebSearchQueriesCount() > 0) { + hash = (37 * hash) + WEB_SEARCH_QUERIES_FIELD_NUMBER; + hash = (53 * hash) + getWebSearchQueriesList().hashCode(); + } + if (hasSearchEntryPoint()) { + hash = (37 * hash) + SEARCH_ENTRY_POINT_FIELD_NUMBER; + hash = (53 * hash) + getSearchEntryPoint().hashCode(); + } + if (getGroundingSupportCount() > 0) { + hash = (37 * hash) + GROUNDING_SUPPORT_FIELD_NUMBER; + hash = (53 * hash) + getGroundingSupportList().hashCode(); + } + if (getImagesCount() > 0) { + hash = (37 * hash) + IMAGES_FIELD_NUMBER; + hash = (53 * hash) + getImagesList().hashCode(); + } + if (getVideosCount() > 0) { + hash = (37 * hash) + VIDEOS_FIELD_NUMBER; + hash = (53 * hash) + getVideosList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse + .Candidate.GroundingMetadata + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse + .Candidate.GroundingMetadata + 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.discoveryengine.v1beta.GenerateGroundedContentResponse + .Candidate.GroundingMetadata + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse + .Candidate.GroundingMetadata + 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.discoveryengine.v1beta.GenerateGroundedContentResponse + .Candidate.GroundingMetadata + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse + .Candidate.GroundingMetadata + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse + .Candidate.GroundingMetadata + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse + .Candidate.GroundingMetadata + 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.discoveryengine.v1beta.GenerateGroundedContentResponse + .Candidate.GroundingMetadata + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse + .Candidate.GroundingMetadata + 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.discoveryengine.v1beta.GenerateGroundedContentResponse + .Candidate.GroundingMetadata + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse + .Candidate.GroundingMetadata + 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.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata + 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; + } + + /** + * + * + *
            +       * Citation for the generated content.
            +       * 
            + * + * Protobuf type {@code + * google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata) + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.GroundedGenerationServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_GenerateGroundedContentResponse_Candidate_GroundingMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.GroundedGenerationServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_GenerateGroundedContentResponse_Candidate_GroundingMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.class, + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.Builder.class); + } + + // Construct using + // com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetRetrievalMetadataFieldBuilder(); + internalGetSupportChunksFieldBuilder(); + internalGetSearchEntryPointFieldBuilder(); + internalGetGroundingSupportFieldBuilder(); + internalGetImagesFieldBuilder(); + internalGetVideosFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (retrievalMetadataBuilder_ == null) { + retrievalMetadata_ = java.util.Collections.emptyList(); + } else { + retrievalMetadata_ = null; + retrievalMetadataBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + if (supportChunksBuilder_ == null) { + supportChunks_ = java.util.Collections.emptyList(); + } else { + supportChunks_ = null; + supportChunksBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + webSearchQueries_ = com.google.protobuf.LazyStringArrayList.emptyList(); + searchEntryPoint_ = null; + if (searchEntryPointBuilder_ != null) { + searchEntryPointBuilder_.dispose(); + searchEntryPointBuilder_ = null; + } + if (groundingSupportBuilder_ == null) { + groundingSupport_ = java.util.Collections.emptyList(); + } else { + groundingSupport_ = null; + groundingSupportBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000010); + if (imagesBuilder_ == null) { + images_ = java.util.Collections.emptyList(); + } else { + images_ = null; + imagesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000020); + if (videosBuilder_ == null) { + videos_ = java.util.Collections.emptyList(); + } else { + videos_ = null; + videosBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000040); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1beta.GroundedGenerationServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_GenerateGroundedContentResponse_Candidate_GroundingMetadata_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata + build() { + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata + buildPartial() { + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata + result = + new com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse + .Candidate.GroundingMetadata(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata + result) { + if (retrievalMetadataBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + retrievalMetadata_ = java.util.Collections.unmodifiableList(retrievalMetadata_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.retrievalMetadata_ = retrievalMetadata_; + } else { + result.retrievalMetadata_ = retrievalMetadataBuilder_.build(); + } + if (supportChunksBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + supportChunks_ = java.util.Collections.unmodifiableList(supportChunks_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.supportChunks_ = supportChunks_; + } else { + result.supportChunks_ = supportChunksBuilder_.build(); + } + if (groundingSupportBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0)) { + groundingSupport_ = java.util.Collections.unmodifiableList(groundingSupport_); + bitField0_ = (bitField0_ & ~0x00000010); + } + result.groundingSupport_ = groundingSupport_; + } else { + result.groundingSupport_ = groundingSupportBuilder_.build(); + } + if (imagesBuilder_ == null) { + if (((bitField0_ & 0x00000020) != 0)) { + images_ = java.util.Collections.unmodifiableList(images_); + bitField0_ = (bitField0_ & ~0x00000020); + } + result.images_ = images_; + } else { + result.images_ = imagesBuilder_.build(); + } + if (videosBuilder_ == null) { + if (((bitField0_ & 0x00000040) != 0)) { + videos_ = java.util.Collections.unmodifiableList(videos_); + bitField0_ = (bitField0_ & ~0x00000040); + } + result.videos_ = videos_; + } else { + result.videos_ = videosBuilder_.build(); + } + } + + private void buildPartial0( + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata + result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000004) != 0)) { + webSearchQueries_.makeImmutable(); + result.webSearchQueries_ = webSearchQueries_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000008) != 0)) { + result.searchEntryPoint_ = + searchEntryPointBuilder_ == null + ? searchEntryPoint_ + : searchEntryPointBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata) { + return mergeFrom( + (com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata + other) { + if (other + == com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.getDefaultInstance()) return this; + if (retrievalMetadataBuilder_ == null) { + if (!other.retrievalMetadata_.isEmpty()) { + if (retrievalMetadata_.isEmpty()) { + retrievalMetadata_ = other.retrievalMetadata_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureRetrievalMetadataIsMutable(); + retrievalMetadata_.addAll(other.retrievalMetadata_); + } + onChanged(); + } + } else { + if (!other.retrievalMetadata_.isEmpty()) { + if (retrievalMetadataBuilder_.isEmpty()) { + retrievalMetadataBuilder_.dispose(); + retrievalMetadataBuilder_ = null; + retrievalMetadata_ = other.retrievalMetadata_; + bitField0_ = (bitField0_ & ~0x00000001); + retrievalMetadataBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetRetrievalMetadataFieldBuilder() + : null; + } else { + retrievalMetadataBuilder_.addAllMessages(other.retrievalMetadata_); + } + } + } + if (supportChunksBuilder_ == null) { + if (!other.supportChunks_.isEmpty()) { + if (supportChunks_.isEmpty()) { + supportChunks_ = other.supportChunks_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureSupportChunksIsMutable(); + supportChunks_.addAll(other.supportChunks_); + } + onChanged(); + } + } else { + if (!other.supportChunks_.isEmpty()) { + if (supportChunksBuilder_.isEmpty()) { + supportChunksBuilder_.dispose(); + supportChunksBuilder_ = null; + supportChunks_ = other.supportChunks_; + bitField0_ = (bitField0_ & ~0x00000002); + supportChunksBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetSupportChunksFieldBuilder() + : null; + } else { + supportChunksBuilder_.addAllMessages(other.supportChunks_); + } + } + } + if (!other.webSearchQueries_.isEmpty()) { + if (webSearchQueries_.isEmpty()) { + webSearchQueries_ = other.webSearchQueries_; + bitField0_ |= 0x00000004; + } else { + ensureWebSearchQueriesIsMutable(); + webSearchQueries_.addAll(other.webSearchQueries_); + } + onChanged(); + } + if (other.hasSearchEntryPoint()) { + mergeSearchEntryPoint(other.getSearchEntryPoint()); + } + if (groundingSupportBuilder_ == null) { + if (!other.groundingSupport_.isEmpty()) { + if (groundingSupport_.isEmpty()) { + groundingSupport_ = other.groundingSupport_; + bitField0_ = (bitField0_ & ~0x00000010); + } else { + ensureGroundingSupportIsMutable(); + groundingSupport_.addAll(other.groundingSupport_); + } + onChanged(); + } + } else { + if (!other.groundingSupport_.isEmpty()) { + if (groundingSupportBuilder_.isEmpty()) { + groundingSupportBuilder_.dispose(); + groundingSupportBuilder_ = null; + groundingSupport_ = other.groundingSupport_; + bitField0_ = (bitField0_ & ~0x00000010); + groundingSupportBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetGroundingSupportFieldBuilder() + : null; + } else { + groundingSupportBuilder_.addAllMessages(other.groundingSupport_); + } + } + } + if (imagesBuilder_ == null) { + if (!other.images_.isEmpty()) { + if (images_.isEmpty()) { + images_ = other.images_; + bitField0_ = (bitField0_ & ~0x00000020); + } else { + ensureImagesIsMutable(); + images_.addAll(other.images_); + } + onChanged(); + } + } else { + if (!other.images_.isEmpty()) { + if (imagesBuilder_.isEmpty()) { + imagesBuilder_.dispose(); + imagesBuilder_ = null; + images_ = other.images_; + bitField0_ = (bitField0_ & ~0x00000020); + imagesBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetImagesFieldBuilder() + : null; + } else { + imagesBuilder_.addAllMessages(other.images_); + } + } + } + if (videosBuilder_ == null) { + if (!other.videos_.isEmpty()) { + if (videos_.isEmpty()) { + videos_ = other.videos_; + bitField0_ = (bitField0_ & ~0x00000040); + } else { + ensureVideosIsMutable(); + videos_.addAll(other.videos_); + } + onChanged(); + } + } else { + if (!other.videos_.isEmpty()) { + if (videosBuilder_.isEmpty()) { + videosBuilder_.dispose(); + videosBuilder_ = null; + videos_ = other.videos_; + bitField0_ = (bitField0_ & ~0x00000040); + videosBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetVideosFieldBuilder() + : null; + } else { + videosBuilder_.addAllMessages(other.videos_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.discoveryengine.v1beta.FactChunk m = + input.readMessage( + com.google.cloud.discoveryengine.v1beta.FactChunk.parser(), + extensionRegistry); + if (supportChunksBuilder_ == null) { + ensureSupportChunksIsMutable(); + supportChunks_.add(m); + } else { + supportChunksBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse + .Candidate.GroundingMetadata.GroundingSupport + m = + input.readMessage( + com.google.cloud.discoveryengine.v1beta + .GenerateGroundedContentResponse.Candidate.GroundingMetadata + .GroundingSupport.parser(), + extensionRegistry); + if (groundingSupportBuilder_ == null) { + ensureGroundingSupportIsMutable(); + groundingSupport_.add(m); + } else { + groundingSupportBuilder_.addMessage(m); + } + break; + } // case 18 + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureWebSearchQueriesIsMutable(); + webSearchQueries_.add(s); + break; + } // case 26 + case 34: + { + input.readMessage( + internalGetSearchEntryPointFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse + .Candidate.GroundingMetadata.RetrievalMetadata + m = + input.readMessage( + com.google.cloud.discoveryengine.v1beta + .GenerateGroundedContentResponse.Candidate.GroundingMetadata + .RetrievalMetadata.parser(), + extensionRegistry); + if (retrievalMetadataBuilder_ == null) { + ensureRetrievalMetadataIsMutable(); + retrievalMetadata_.add(m); + } else { + retrievalMetadataBuilder_.addMessage(m); + } + break; + } // case 42 + case 74: + { + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse + .Candidate.GroundingMetadata.ImageMetadata + m = + input.readMessage( + com.google.cloud.discoveryengine.v1beta + .GenerateGroundedContentResponse.Candidate.GroundingMetadata + .ImageMetadata.parser(), + extensionRegistry); + if (imagesBuilder_ == null) { + ensureImagesIsMutable(); + images_.add(m); + } else { + imagesBuilder_.addMessage(m); + } + break; + } // case 74 + case 90: + { + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse + .Candidate.GroundingMetadata.VideoMetadata + m = + input.readMessage( + com.google.cloud.discoveryengine.v1beta + .GenerateGroundedContentResponse.Candidate.GroundingMetadata + .VideoMetadata.parser(), + extensionRegistry); + if (videosBuilder_ == null) { + ensureVideosIsMutable(); + videos_.add(m); + } else { + videosBuilder_.addMessage(m); + } + break; + } // case 90 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List< + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.RetrievalMetadata> + retrievalMetadata_ = java.util.Collections.emptyList(); + + private void ensureRetrievalMetadataIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + retrievalMetadata_ = + new java.util.ArrayList< + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse + .Candidate.GroundingMetadata.RetrievalMetadata>(retrievalMetadata_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.RetrievalMetadata, + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.RetrievalMetadata.Builder, + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.RetrievalMetadataOrBuilder> + retrievalMetadataBuilder_; + + /** + * + * + *
            +         * Retrieval metadata to provide an understanding in the
            +         * retrieval steps performed by the model. There can be multiple such
            +         * messages which can correspond to different parts of the retrieval. This
            +         * is a mechanism used to ensure transparency to our users.
            +         * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.RetrievalMetadata retrieval_metadata = 5; + * + */ + public java.util.List< + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.RetrievalMetadata> + getRetrievalMetadataList() { + if (retrievalMetadataBuilder_ == null) { + return java.util.Collections.unmodifiableList(retrievalMetadata_); + } else { + return retrievalMetadataBuilder_.getMessageList(); + } + } + + /** + * + * + *
            +         * Retrieval metadata to provide an understanding in the
            +         * retrieval steps performed by the model. There can be multiple such
            +         * messages which can correspond to different parts of the retrieval. This
            +         * is a mechanism used to ensure transparency to our users.
            +         * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.RetrievalMetadata retrieval_metadata = 5; + * + */ + public int getRetrievalMetadataCount() { + if (retrievalMetadataBuilder_ == null) { + return retrievalMetadata_.size(); + } else { + return retrievalMetadataBuilder_.getCount(); + } + } + + /** + * + * + *
            +         * Retrieval metadata to provide an understanding in the
            +         * retrieval steps performed by the model. There can be multiple such
            +         * messages which can correspond to different parts of the retrieval. This
            +         * is a mechanism used to ensure transparency to our users.
            +         * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.RetrievalMetadata retrieval_metadata = 5; + * + */ + public com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.RetrievalMetadata + getRetrievalMetadata(int index) { + if (retrievalMetadataBuilder_ == null) { + return retrievalMetadata_.get(index); + } else { + return retrievalMetadataBuilder_.getMessage(index); + } + } + + /** + * + * + *
            +         * Retrieval metadata to provide an understanding in the
            +         * retrieval steps performed by the model. There can be multiple such
            +         * messages which can correspond to different parts of the retrieval. This
            +         * is a mechanism used to ensure transparency to our users.
            +         * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.RetrievalMetadata retrieval_metadata = 5; + * + */ + public Builder setRetrievalMetadata( + int index, + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.RetrievalMetadata + value) { + if (retrievalMetadataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRetrievalMetadataIsMutable(); + retrievalMetadata_.set(index, value); + onChanged(); + } else { + retrievalMetadataBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
            +         * Retrieval metadata to provide an understanding in the
            +         * retrieval steps performed by the model. There can be multiple such
            +         * messages which can correspond to different parts of the retrieval. This
            +         * is a mechanism used to ensure transparency to our users.
            +         * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.RetrievalMetadata retrieval_metadata = 5; + * + */ + public Builder setRetrievalMetadata( + int index, + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.RetrievalMetadata.Builder + builderForValue) { + if (retrievalMetadataBuilder_ == null) { + ensureRetrievalMetadataIsMutable(); + retrievalMetadata_.set(index, builderForValue.build()); + onChanged(); + } else { + retrievalMetadataBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
            +         * Retrieval metadata to provide an understanding in the
            +         * retrieval steps performed by the model. There can be multiple such
            +         * messages which can correspond to different parts of the retrieval. This
            +         * is a mechanism used to ensure transparency to our users.
            +         * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.RetrievalMetadata retrieval_metadata = 5; + * + */ + public Builder addRetrievalMetadata( + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.RetrievalMetadata + value) { + if (retrievalMetadataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRetrievalMetadataIsMutable(); + retrievalMetadata_.add(value); + onChanged(); + } else { + retrievalMetadataBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
            +         * Retrieval metadata to provide an understanding in the
            +         * retrieval steps performed by the model. There can be multiple such
            +         * messages which can correspond to different parts of the retrieval. This
            +         * is a mechanism used to ensure transparency to our users.
            +         * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.RetrievalMetadata retrieval_metadata = 5; + * + */ + public Builder addRetrievalMetadata( + int index, + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.RetrievalMetadata + value) { + if (retrievalMetadataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRetrievalMetadataIsMutable(); + retrievalMetadata_.add(index, value); + onChanged(); + } else { + retrievalMetadataBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
            +         * Retrieval metadata to provide an understanding in the
            +         * retrieval steps performed by the model. There can be multiple such
            +         * messages which can correspond to different parts of the retrieval. This
            +         * is a mechanism used to ensure transparency to our users.
            +         * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.RetrievalMetadata retrieval_metadata = 5; + * + */ + public Builder addRetrievalMetadata( + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.RetrievalMetadata.Builder + builderForValue) { + if (retrievalMetadataBuilder_ == null) { + ensureRetrievalMetadataIsMutable(); + retrievalMetadata_.add(builderForValue.build()); + onChanged(); + } else { + retrievalMetadataBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
            +         * Retrieval metadata to provide an understanding in the
            +         * retrieval steps performed by the model. There can be multiple such
            +         * messages which can correspond to different parts of the retrieval. This
            +         * is a mechanism used to ensure transparency to our users.
            +         * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.RetrievalMetadata retrieval_metadata = 5; + * + */ + public Builder addRetrievalMetadata( + int index, + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.RetrievalMetadata.Builder + builderForValue) { + if (retrievalMetadataBuilder_ == null) { + ensureRetrievalMetadataIsMutable(); + retrievalMetadata_.add(index, builderForValue.build()); + onChanged(); + } else { + retrievalMetadataBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
            +         * Retrieval metadata to provide an understanding in the
            +         * retrieval steps performed by the model. There can be multiple such
            +         * messages which can correspond to different parts of the retrieval. This
            +         * is a mechanism used to ensure transparency to our users.
            +         * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.RetrievalMetadata retrieval_metadata = 5; + * + */ + public Builder addAllRetrievalMetadata( + java.lang.Iterable< + ? extends + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse + .Candidate.GroundingMetadata.RetrievalMetadata> + values) { + if (retrievalMetadataBuilder_ == null) { + ensureRetrievalMetadataIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, retrievalMetadata_); + onChanged(); + } else { + retrievalMetadataBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
            +         * Retrieval metadata to provide an understanding in the
            +         * retrieval steps performed by the model. There can be multiple such
            +         * messages which can correspond to different parts of the retrieval. This
            +         * is a mechanism used to ensure transparency to our users.
            +         * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.RetrievalMetadata retrieval_metadata = 5; + * + */ + public Builder clearRetrievalMetadata() { + if (retrievalMetadataBuilder_ == null) { + retrievalMetadata_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + retrievalMetadataBuilder_.clear(); + } + return this; + } + + /** + * + * + *
            +         * Retrieval metadata to provide an understanding in the
            +         * retrieval steps performed by the model. There can be multiple such
            +         * messages which can correspond to different parts of the retrieval. This
            +         * is a mechanism used to ensure transparency to our users.
            +         * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.RetrievalMetadata retrieval_metadata = 5; + * + */ + public Builder removeRetrievalMetadata(int index) { + if (retrievalMetadataBuilder_ == null) { + ensureRetrievalMetadataIsMutable(); + retrievalMetadata_.remove(index); + onChanged(); + } else { + retrievalMetadataBuilder_.remove(index); + } + return this; } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - internalGetRetrievalMetadataFieldBuilder(); - internalGetSupportChunksFieldBuilder(); - internalGetSearchEntryPointFieldBuilder(); - internalGetGroundingSupportFieldBuilder(); - } + /** + * + * + *
            +         * Retrieval metadata to provide an understanding in the
            +         * retrieval steps performed by the model. There can be multiple such
            +         * messages which can correspond to different parts of the retrieval. This
            +         * is a mechanism used to ensure transparency to our users.
            +         * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.RetrievalMetadata retrieval_metadata = 5; + * + */ + public com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.RetrievalMetadata.Builder + getRetrievalMetadataBuilder(int index) { + return internalGetRetrievalMetadataFieldBuilder().getBuilder(index); } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; + /** + * + * + *
            +         * Retrieval metadata to provide an understanding in the
            +         * retrieval steps performed by the model. There can be multiple such
            +         * messages which can correspond to different parts of the retrieval. This
            +         * is a mechanism used to ensure transparency to our users.
            +         * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.RetrievalMetadata retrieval_metadata = 5; + * + */ + public com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.RetrievalMetadataOrBuilder + getRetrievalMetadataOrBuilder(int index) { if (retrievalMetadataBuilder_ == null) { - retrievalMetadata_ = java.util.Collections.emptyList(); - } else { - retrievalMetadata_ = null; - retrievalMetadataBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000001); - if (supportChunksBuilder_ == null) { - supportChunks_ = java.util.Collections.emptyList(); + return retrievalMetadata_.get(index); } else { - supportChunks_ = null; - supportChunksBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000002); - webSearchQueries_ = com.google.protobuf.LazyStringArrayList.emptyList(); - searchEntryPoint_ = null; - if (searchEntryPointBuilder_ != null) { - searchEntryPointBuilder_.dispose(); - searchEntryPointBuilder_ = null; + return retrievalMetadataBuilder_.getMessageOrBuilder(index); } - if (groundingSupportBuilder_ == null) { - groundingSupport_ = java.util.Collections.emptyList(); + } + + /** + * + * + *
            +         * Retrieval metadata to provide an understanding in the
            +         * retrieval steps performed by the model. There can be multiple such
            +         * messages which can correspond to different parts of the retrieval. This
            +         * is a mechanism used to ensure transparency to our users.
            +         * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.RetrievalMetadata retrieval_metadata = 5; + * + */ + public java.util.List< + ? extends + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse + .Candidate.GroundingMetadata.RetrievalMetadataOrBuilder> + getRetrievalMetadataOrBuilderList() { + if (retrievalMetadataBuilder_ != null) { + return retrievalMetadataBuilder_.getMessageOrBuilderList(); } else { - groundingSupport_ = null; - groundingSupportBuilder_.clear(); + return java.util.Collections.unmodifiableList(retrievalMetadata_); } - bitField0_ = (bitField0_ & ~0x00000010); - return this; } - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.discoveryengine.v1beta.GroundedGenerationServiceProto - .internal_static_google_cloud_discoveryengine_v1beta_GenerateGroundedContentResponse_Candidate_GroundingMetadata_descriptor; + /** + * + * + *
            +         * Retrieval metadata to provide an understanding in the
            +         * retrieval steps performed by the model. There can be multiple such
            +         * messages which can correspond to different parts of the retrieval. This
            +         * is a mechanism used to ensure transparency to our users.
            +         * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.RetrievalMetadata retrieval_metadata = 5; + * + */ + public com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.RetrievalMetadata.Builder + addRetrievalMetadataBuilder() { + return internalGetRetrievalMetadataFieldBuilder() + .addBuilder( + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.RetrievalMetadata.getDefaultInstance()); } - @java.lang.Override + /** + * + * + *
            +         * Retrieval metadata to provide an understanding in the
            +         * retrieval steps performed by the model. There can be multiple such
            +         * messages which can correspond to different parts of the retrieval. This
            +         * is a mechanism used to ensure transparency to our users.
            +         * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.RetrievalMetadata retrieval_metadata = 5; + * + */ public com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate - .GroundingMetadata - getDefaultInstanceForType() { - return com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate - .GroundingMetadata.getDefaultInstance(); + .GroundingMetadata.RetrievalMetadata.Builder + addRetrievalMetadataBuilder(int index) { + return internalGetRetrievalMetadataFieldBuilder() + .addBuilder( + index, + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.RetrievalMetadata.getDefaultInstance()); } - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate - .GroundingMetadata - build() { - com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate - .GroundingMetadata - result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); + /** + * + * + *
            +         * Retrieval metadata to provide an understanding in the
            +         * retrieval steps performed by the model. There can be multiple such
            +         * messages which can correspond to different parts of the retrieval. This
            +         * is a mechanism used to ensure transparency to our users.
            +         * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.RetrievalMetadata retrieval_metadata = 5; + * + */ + public java.util.List< + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.RetrievalMetadata.Builder> + getRetrievalMetadataBuilderList() { + return internalGetRetrievalMetadataFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.RetrievalMetadata, + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.RetrievalMetadata.Builder, + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.RetrievalMetadataOrBuilder> + internalGetRetrievalMetadataFieldBuilder() { + if (retrievalMetadataBuilder_ == null) { + retrievalMetadataBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse + .Candidate.GroundingMetadata.RetrievalMetadata, + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse + .Candidate.GroundingMetadata.RetrievalMetadata.Builder, + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse + .Candidate.GroundingMetadata.RetrievalMetadataOrBuilder>( + retrievalMetadata_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + retrievalMetadata_ = null; } - return result; + return retrievalMetadataBuilder_; } - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate - .GroundingMetadata - buildPartial() { - com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate - .GroundingMetadata - result = - new com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse - .Candidate.GroundingMetadata(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { - buildPartial0(result); + private java.util.List supportChunks_ = + java.util.Collections.emptyList(); + + private void ensureSupportChunksIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + supportChunks_ = + new java.util.ArrayList( + supportChunks_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.discoveryengine.v1beta.FactChunk, + com.google.cloud.discoveryengine.v1beta.FactChunk.Builder, + com.google.cloud.discoveryengine.v1beta.FactChunkOrBuilder> + supportChunksBuilder_; + + /** + * + * + *
            +         * List of chunks to be attributed across all claims in the candidate.
            +         * These are derived from the grounding sources supplied in the request.
            +         * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.FactChunk support_chunks = 1; + */ + public java.util.List + getSupportChunksList() { + if (supportChunksBuilder_ == null) { + return java.util.Collections.unmodifiableList(supportChunks_); + } else { + return supportChunksBuilder_.getMessageList(); } - onBuilt(); - return result; } - private void buildPartialRepeatedFields( - com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate - .GroundingMetadata - result) { - if (retrievalMetadataBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - retrievalMetadata_ = java.util.Collections.unmodifiableList(retrievalMetadata_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.retrievalMetadata_ = retrievalMetadata_; + /** + * + * + *
            +         * List of chunks to be attributed across all claims in the candidate.
            +         * These are derived from the grounding sources supplied in the request.
            +         * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.FactChunk support_chunks = 1; + */ + public int getSupportChunksCount() { + if (supportChunksBuilder_ == null) { + return supportChunks_.size(); } else { - result.retrievalMetadata_ = retrievalMetadataBuilder_.build(); + return supportChunksBuilder_.getCount(); } + } + + /** + * + * + *
            +         * List of chunks to be attributed across all claims in the candidate.
            +         * These are derived from the grounding sources supplied in the request.
            +         * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.FactChunk support_chunks = 1; + */ + public com.google.cloud.discoveryengine.v1beta.FactChunk getSupportChunks(int index) { if (supportChunksBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0)) { - supportChunks_ = java.util.Collections.unmodifiableList(supportChunks_); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.supportChunks_ = supportChunks_; + return supportChunks_.get(index); } else { - result.supportChunks_ = supportChunksBuilder_.build(); + return supportChunksBuilder_.getMessage(index); } - if (groundingSupportBuilder_ == null) { - if (((bitField0_ & 0x00000010) != 0)) { - groundingSupport_ = java.util.Collections.unmodifiableList(groundingSupport_); - bitField0_ = (bitField0_ & ~0x00000010); + } + + /** + * + * + *
            +         * List of chunks to be attributed across all claims in the candidate.
            +         * These are derived from the grounding sources supplied in the request.
            +         * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.FactChunk support_chunks = 1; + */ + public Builder setSupportChunks( + int index, com.google.cloud.discoveryengine.v1beta.FactChunk value) { + if (supportChunksBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); } - result.groundingSupport_ = groundingSupport_; + ensureSupportChunksIsMutable(); + supportChunks_.set(index, value); + onChanged(); } else { - result.groundingSupport_ = groundingSupportBuilder_.build(); + supportChunksBuilder_.setMessage(index, value); } + return this; } - private void buildPartial0( - com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate - .GroundingMetadata - result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000004) != 0)) { - webSearchQueries_.makeImmutable(); - result.webSearchQueries_ = webSearchQueries_; - } - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000008) != 0)) { - result.searchEntryPoint_ = - searchEntryPointBuilder_ == null - ? searchEntryPoint_ - : searchEntryPointBuilder_.build(); - to_bitField0_ |= 0x00000001; + /** + * + * + *
            +         * List of chunks to be attributed across all claims in the candidate.
            +         * These are derived from the grounding sources supplied in the request.
            +         * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.FactChunk support_chunks = 1; + */ + public Builder setSupportChunks( + int index, com.google.cloud.discoveryengine.v1beta.FactChunk.Builder builderForValue) { + if (supportChunksBuilder_ == null) { + ensureSupportChunksIsMutable(); + supportChunks_.set(index, builderForValue.build()); + onChanged(); + } else { + supportChunksBuilder_.setMessage(index, builderForValue.build()); } - result.bitField0_ |= to_bitField0_; + return this; } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other - instanceof - com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate - .GroundingMetadata) { - return mergeFrom( - (com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate - .GroundingMetadata) - other); + /** + * + * + *
            +         * List of chunks to be attributed across all claims in the candidate.
            +         * These are derived from the grounding sources supplied in the request.
            +         * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.FactChunk support_chunks = 1; + */ + public Builder addSupportChunks(com.google.cloud.discoveryengine.v1beta.FactChunk value) { + if (supportChunksBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSupportChunksIsMutable(); + supportChunks_.add(value); + onChanged(); } else { - super.mergeFrom(other); - return this; + supportChunksBuilder_.addMessage(value); } + return this; } - public Builder mergeFrom( - com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate - .GroundingMetadata - other) { - if (other - == com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate - .GroundingMetadata.getDefaultInstance()) return this; - if (retrievalMetadataBuilder_ == null) { - if (!other.retrievalMetadata_.isEmpty()) { - if (retrievalMetadata_.isEmpty()) { - retrievalMetadata_ = other.retrievalMetadata_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureRetrievalMetadataIsMutable(); - retrievalMetadata_.addAll(other.retrievalMetadata_); - } - onChanged(); + /** + * + * + *
            +         * List of chunks to be attributed across all claims in the candidate.
            +         * These are derived from the grounding sources supplied in the request.
            +         * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.FactChunk support_chunks = 1; + */ + public Builder addSupportChunks( + int index, com.google.cloud.discoveryengine.v1beta.FactChunk value) { + if (supportChunksBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); } + ensureSupportChunksIsMutable(); + supportChunks_.add(index, value); + onChanged(); } else { - if (!other.retrievalMetadata_.isEmpty()) { - if (retrievalMetadataBuilder_.isEmpty()) { - retrievalMetadataBuilder_.dispose(); - retrievalMetadataBuilder_ = null; - retrievalMetadata_ = other.retrievalMetadata_; - bitField0_ = (bitField0_ & ~0x00000001); - retrievalMetadataBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders - ? internalGetRetrievalMetadataFieldBuilder() - : null; - } else { - retrievalMetadataBuilder_.addAllMessages(other.retrievalMetadata_); - } - } + supportChunksBuilder_.addMessage(index, value); } + return this; + } + + /** + * + * + *
            +         * List of chunks to be attributed across all claims in the candidate.
            +         * These are derived from the grounding sources supplied in the request.
            +         * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.FactChunk support_chunks = 1; + */ + public Builder addSupportChunks( + com.google.cloud.discoveryengine.v1beta.FactChunk.Builder builderForValue) { if (supportChunksBuilder_ == null) { - if (!other.supportChunks_.isEmpty()) { - if (supportChunks_.isEmpty()) { - supportChunks_ = other.supportChunks_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureSupportChunksIsMutable(); - supportChunks_.addAll(other.supportChunks_); - } - onChanged(); - } + ensureSupportChunksIsMutable(); + supportChunks_.add(builderForValue.build()); + onChanged(); } else { - if (!other.supportChunks_.isEmpty()) { - if (supportChunksBuilder_.isEmpty()) { - supportChunksBuilder_.dispose(); - supportChunksBuilder_ = null; - supportChunks_ = other.supportChunks_; - bitField0_ = (bitField0_ & ~0x00000002); - supportChunksBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders - ? internalGetSupportChunksFieldBuilder() - : null; - } else { - supportChunksBuilder_.addAllMessages(other.supportChunks_); - } - } + supportChunksBuilder_.addMessage(builderForValue.build()); } - if (!other.webSearchQueries_.isEmpty()) { - if (webSearchQueries_.isEmpty()) { - webSearchQueries_ = other.webSearchQueries_; - bitField0_ |= 0x00000004; - } else { - ensureWebSearchQueriesIsMutable(); - webSearchQueries_.addAll(other.webSearchQueries_); - } + return this; + } + + /** + * + * + *
            +         * List of chunks to be attributed across all claims in the candidate.
            +         * These are derived from the grounding sources supplied in the request.
            +         * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.FactChunk support_chunks = 1; + */ + public Builder addSupportChunks( + int index, com.google.cloud.discoveryengine.v1beta.FactChunk.Builder builderForValue) { + if (supportChunksBuilder_ == null) { + ensureSupportChunksIsMutable(); + supportChunks_.add(index, builderForValue.build()); onChanged(); - } - if (other.hasSearchEntryPoint()) { - mergeSearchEntryPoint(other.getSearchEntryPoint()); - } - if (groundingSupportBuilder_ == null) { - if (!other.groundingSupport_.isEmpty()) { - if (groundingSupport_.isEmpty()) { - groundingSupport_ = other.groundingSupport_; - bitField0_ = (bitField0_ & ~0x00000010); - } else { - ensureGroundingSupportIsMutable(); - groundingSupport_.addAll(other.groundingSupport_); - } - onChanged(); - } } else { - if (!other.groundingSupport_.isEmpty()) { - if (groundingSupportBuilder_.isEmpty()) { - groundingSupportBuilder_.dispose(); - groundingSupportBuilder_ = null; - groundingSupport_ = other.groundingSupport_; - bitField0_ = (bitField0_ & ~0x00000010); - groundingSupportBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders - ? internalGetGroundingSupportFieldBuilder() - : null; - } else { - groundingSupportBuilder_.addAllMessages(other.groundingSupport_); - } - } + supportChunksBuilder_.addMessage(index, builderForValue.build()); } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); return this; } - @java.lang.Override - public final boolean isInitialized() { - return true; + /** + * + * + *
            +         * List of chunks to be attributed across all claims in the candidate.
            +         * These are derived from the grounding sources supplied in the request.
            +         * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.FactChunk support_chunks = 1; + */ + public Builder addAllSupportChunks( + java.lang.Iterable + values) { + if (supportChunksBuilder_ == null) { + ensureSupportChunksIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, supportChunks_); + onChanged(); + } else { + supportChunksBuilder_.addAllMessages(values); + } + return this; } - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); + /** + * + * + *
            +         * List of chunks to be attributed across all claims in the candidate.
            +         * These are derived from the grounding sources supplied in the request.
            +         * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.FactChunk support_chunks = 1; + */ + public Builder clearSupportChunks() { + if (supportChunksBuilder_ == null) { + supportChunks_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + supportChunksBuilder_.clear(); } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - com.google.cloud.discoveryengine.v1beta.FactChunk m = - input.readMessage( - com.google.cloud.discoveryengine.v1beta.FactChunk.parser(), - extensionRegistry); - if (supportChunksBuilder_ == null) { - ensureSupportChunksIsMutable(); - supportChunks_.add(m); - } else { - supportChunksBuilder_.addMessage(m); - } - break; - } // case 10 - case 18: - { - com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse - .Candidate.GroundingMetadata.GroundingSupport - m = - input.readMessage( - com.google.cloud.discoveryengine.v1beta - .GenerateGroundedContentResponse.Candidate.GroundingMetadata - .GroundingSupport.parser(), - extensionRegistry); - if (groundingSupportBuilder_ == null) { - ensureGroundingSupportIsMutable(); - groundingSupport_.add(m); - } else { - groundingSupportBuilder_.addMessage(m); - } - break; - } // case 18 - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - ensureWebSearchQueriesIsMutable(); - webSearchQueries_.add(s); - break; - } // case 26 - case 34: - { - input.readMessage( - internalGetSearchEntryPointFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000008; - break; - } // case 34 - case 42: - { - com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse - .Candidate.GroundingMetadata.RetrievalMetadata - m = - input.readMessage( - com.google.cloud.discoveryengine.v1beta - .GenerateGroundedContentResponse.Candidate.GroundingMetadata - .RetrievalMetadata.parser(), - extensionRegistry); - if (retrievalMetadataBuilder_ == null) { - ensureRetrievalMetadataIsMutable(); - retrievalMetadata_.add(m); - } else { - retrievalMetadataBuilder_.addMessage(m); - } - break; - } // case 42 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { + return this; + } + + /** + * + * + *
            +         * List of chunks to be attributed across all claims in the candidate.
            +         * These are derived from the grounding sources supplied in the request.
            +         * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.FactChunk support_chunks = 1; + */ + public Builder removeSupportChunks(int index) { + if (supportChunksBuilder_ == null) { + ensureSupportChunksIsMutable(); + supportChunks_.remove(index); onChanged(); - } // finally + } else { + supportChunksBuilder_.remove(index); + } return this; } - private int bitField0_; + /** + * + * + *
            +         * List of chunks to be attributed across all claims in the candidate.
            +         * These are derived from the grounding sources supplied in the request.
            +         * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.FactChunk support_chunks = 1; + */ + public com.google.cloud.discoveryengine.v1beta.FactChunk.Builder getSupportChunksBuilder( + int index) { + return internalGetSupportChunksFieldBuilder().getBuilder(index); + } - private java.util.List< - com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate - .GroundingMetadata.RetrievalMetadata> - retrievalMetadata_ = java.util.Collections.emptyList(); + /** + * + * + *
            +         * List of chunks to be attributed across all claims in the candidate.
            +         * These are derived from the grounding sources supplied in the request.
            +         * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.FactChunk support_chunks = 1; + */ + public com.google.cloud.discoveryengine.v1beta.FactChunkOrBuilder getSupportChunksOrBuilder( + int index) { + if (supportChunksBuilder_ == null) { + return supportChunks_.get(index); + } else { + return supportChunksBuilder_.getMessageOrBuilder(index); + } + } - private void ensureRetrievalMetadataIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - retrievalMetadata_ = - new java.util.ArrayList< - com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse - .Candidate.GroundingMetadata.RetrievalMetadata>(retrievalMetadata_); - bitField0_ |= 0x00000001; + /** + * + * + *
            +         * List of chunks to be attributed across all claims in the candidate.
            +         * These are derived from the grounding sources supplied in the request.
            +         * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.FactChunk support_chunks = 1; + */ + public java.util.List + getSupportChunksOrBuilderList() { + if (supportChunksBuilder_ != null) { + return supportChunksBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(supportChunks_); } } - private com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate - .GroundingMetadata.RetrievalMetadata, - com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate - .GroundingMetadata.RetrievalMetadata.Builder, - com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate - .GroundingMetadata.RetrievalMetadataOrBuilder> - retrievalMetadataBuilder_; + /** + * + * + *
            +         * List of chunks to be attributed across all claims in the candidate.
            +         * These are derived from the grounding sources supplied in the request.
            +         * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.FactChunk support_chunks = 1; + */ + public com.google.cloud.discoveryengine.v1beta.FactChunk.Builder addSupportChunksBuilder() { + return internalGetSupportChunksFieldBuilder() + .addBuilder(com.google.cloud.discoveryengine.v1beta.FactChunk.getDefaultInstance()); + } + + /** + * + * + *
            +         * List of chunks to be attributed across all claims in the candidate.
            +         * These are derived from the grounding sources supplied in the request.
            +         * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.FactChunk support_chunks = 1; + */ + public com.google.cloud.discoveryengine.v1beta.FactChunk.Builder addSupportChunksBuilder( + int index) { + return internalGetSupportChunksFieldBuilder() + .addBuilder( + index, com.google.cloud.discoveryengine.v1beta.FactChunk.getDefaultInstance()); + } /** * * *
            -         * Retrieval metadata to provide an understanding in the
            -         * retrieval steps performed by the model. There can be multiple such
            -         * messages which can correspond to different parts of the retrieval. This
            -         * is a mechanism used to ensure transparency to our users.
            +         * List of chunks to be attributed across all claims in the candidate.
            +         * These are derived from the grounding sources supplied in the request.
                      * 
            * - * - * repeated .google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.RetrievalMetadata retrieval_metadata = 5; - * + * repeated .google.cloud.discoveryengine.v1beta.FactChunk support_chunks = 1; */ - public java.util.List< - com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate - .GroundingMetadata.RetrievalMetadata> - getRetrievalMetadataList() { - if (retrievalMetadataBuilder_ == null) { - return java.util.Collections.unmodifiableList(retrievalMetadata_); - } else { - return retrievalMetadataBuilder_.getMessageList(); + public java.util.List + getSupportChunksBuilderList() { + return internalGetSupportChunksFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.discoveryengine.v1beta.FactChunk, + com.google.cloud.discoveryengine.v1beta.FactChunk.Builder, + com.google.cloud.discoveryengine.v1beta.FactChunkOrBuilder> + internalGetSupportChunksFieldBuilder() { + if (supportChunksBuilder_ == null) { + supportChunksBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.discoveryengine.v1beta.FactChunk, + com.google.cloud.discoveryengine.v1beta.FactChunk.Builder, + com.google.cloud.discoveryengine.v1beta.FactChunkOrBuilder>( + supportChunks_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + supportChunks_ = null; + } + return supportChunksBuilder_; + } + + private com.google.protobuf.LazyStringArrayList webSearchQueries_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureWebSearchQueriesIsMutable() { + if (!webSearchQueries_.isModifiable()) { + webSearchQueries_ = new com.google.protobuf.LazyStringArrayList(webSearchQueries_); } + bitField0_ |= 0x00000004; } /** * * *
            -         * Retrieval metadata to provide an understanding in the
            -         * retrieval steps performed by the model. There can be multiple such
            -         * messages which can correspond to different parts of the retrieval. This
            -         * is a mechanism used to ensure transparency to our users.
            +         * Web search queries for the following-up web search.
                      * 
            * - * - * repeated .google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.RetrievalMetadata retrieval_metadata = 5; - * + * repeated string web_search_queries = 3; + * + * @return A list containing the webSearchQueries. */ - public int getRetrievalMetadataCount() { - if (retrievalMetadataBuilder_ == null) { - return retrievalMetadata_.size(); - } else { - return retrievalMetadataBuilder_.getCount(); - } + public com.google.protobuf.ProtocolStringList getWebSearchQueriesList() { + webSearchQueries_.makeImmutable(); + return webSearchQueries_; } /** * * *
            -         * Retrieval metadata to provide an understanding in the
            -         * retrieval steps performed by the model. There can be multiple such
            -         * messages which can correspond to different parts of the retrieval. This
            -         * is a mechanism used to ensure transparency to our users.
            +         * Web search queries for the following-up web search.
                      * 
            * - * - * repeated .google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.RetrievalMetadata retrieval_metadata = 5; - * + * repeated string web_search_queries = 3; + * + * @return The count of webSearchQueries. */ - public com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate - .GroundingMetadata.RetrievalMetadata - getRetrievalMetadata(int index) { - if (retrievalMetadataBuilder_ == null) { - return retrievalMetadata_.get(index); - } else { - return retrievalMetadataBuilder_.getMessage(index); - } + public int getWebSearchQueriesCount() { + return webSearchQueries_.size(); } /** * * *
            -         * Retrieval metadata to provide an understanding in the
            -         * retrieval steps performed by the model. There can be multiple such
            -         * messages which can correspond to different parts of the retrieval. This
            -         * is a mechanism used to ensure transparency to our users.
            +         * Web search queries for the following-up web search.
                      * 
            * - * - * repeated .google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.RetrievalMetadata retrieval_metadata = 5; - * + * repeated string web_search_queries = 3; + * + * @param index The index of the element to return. + * @return The webSearchQueries at the given index. */ - public Builder setRetrievalMetadata( - int index, - com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate - .GroundingMetadata.RetrievalMetadata - value) { - if (retrievalMetadataBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureRetrievalMetadataIsMutable(); - retrievalMetadata_.set(index, value); - onChanged(); - } else { - retrievalMetadataBuilder_.setMessage(index, value); - } - return this; + public java.lang.String getWebSearchQueries(int index) { + return webSearchQueries_.get(index); } /** * * *
            -         * Retrieval metadata to provide an understanding in the
            -         * retrieval steps performed by the model. There can be multiple such
            -         * messages which can correspond to different parts of the retrieval. This
            -         * is a mechanism used to ensure transparency to our users.
            +         * Web search queries for the following-up web search.
                      * 
            * - * - * repeated .google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.RetrievalMetadata retrieval_metadata = 5; - * + * repeated string web_search_queries = 3; + * + * @param index The index of the value to return. + * @return The bytes of the webSearchQueries at the given index. */ - public Builder setRetrievalMetadata( - int index, - com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate - .GroundingMetadata.RetrievalMetadata.Builder - builderForValue) { - if (retrievalMetadataBuilder_ == null) { - ensureRetrievalMetadataIsMutable(); - retrievalMetadata_.set(index, builderForValue.build()); - onChanged(); - } else { - retrievalMetadataBuilder_.setMessage(index, builderForValue.build()); - } - return this; + public com.google.protobuf.ByteString getWebSearchQueriesBytes(int index) { + return webSearchQueries_.getByteString(index); } /** * * *
            -         * Retrieval metadata to provide an understanding in the
            -         * retrieval steps performed by the model. There can be multiple such
            -         * messages which can correspond to different parts of the retrieval. This
            -         * is a mechanism used to ensure transparency to our users.
            +         * Web search queries for the following-up web search.
                      * 
            * - * - * repeated .google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.RetrievalMetadata retrieval_metadata = 5; - * + * repeated string web_search_queries = 3; + * + * @param index The index to set the value at. + * @param value The webSearchQueries to set. + * @return This builder for chaining. */ - public Builder addRetrievalMetadata( - com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate - .GroundingMetadata.RetrievalMetadata - value) { - if (retrievalMetadataBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureRetrievalMetadataIsMutable(); - retrievalMetadata_.add(value); - onChanged(); - } else { - retrievalMetadataBuilder_.addMessage(value); + public Builder setWebSearchQueries(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); } + ensureWebSearchQueriesIsMutable(); + webSearchQueries_.set(index, value); + bitField0_ |= 0x00000004; + onChanged(); return this; } @@ -7204,31 +12880,42 @@ public Builder addRetrievalMetadata( * * *
            -         * Retrieval metadata to provide an understanding in the
            -         * retrieval steps performed by the model. There can be multiple such
            -         * messages which can correspond to different parts of the retrieval. This
            -         * is a mechanism used to ensure transparency to our users.
            +         * Web search queries for the following-up web search.
                      * 
            * - * - * repeated .google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.RetrievalMetadata retrieval_metadata = 5; - * + * repeated string web_search_queries = 3; + * + * @param value The webSearchQueries to add. + * @return This builder for chaining. */ - public Builder addRetrievalMetadata( - int index, - com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate - .GroundingMetadata.RetrievalMetadata - value) { - if (retrievalMetadataBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureRetrievalMetadataIsMutable(); - retrievalMetadata_.add(index, value); - onChanged(); - } else { - retrievalMetadataBuilder_.addMessage(index, value); + public Builder addWebSearchQueries(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); } + ensureWebSearchQueriesIsMutable(); + webSearchQueries_.add(value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
            +         * Web search queries for the following-up web search.
            +         * 
            + * + * repeated string web_search_queries = 3; + * + * @param values The webSearchQueries to add. + * @return This builder for chaining. + */ + public Builder addAllWebSearchQueries(java.lang.Iterable values) { + ensureWebSearchQueriesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, webSearchQueries_); + bitField0_ |= 0x00000004; + onChanged(); return this; } @@ -7236,27 +12923,18 @@ public Builder addRetrievalMetadata( * * *
            -         * Retrieval metadata to provide an understanding in the
            -         * retrieval steps performed by the model. There can be multiple such
            -         * messages which can correspond to different parts of the retrieval. This
            -         * is a mechanism used to ensure transparency to our users.
            +         * Web search queries for the following-up web search.
                      * 
            * - * - * repeated .google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.RetrievalMetadata retrieval_metadata = 5; - * + * repeated string web_search_queries = 3; + * + * @return This builder for chaining. */ - public Builder addRetrievalMetadata( - com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate - .GroundingMetadata.RetrievalMetadata.Builder - builderForValue) { - if (retrievalMetadataBuilder_ == null) { - ensureRetrievalMetadataIsMutable(); - retrievalMetadata_.add(builderForValue.build()); - onChanged(); - } else { - retrievalMetadataBuilder_.addMessage(builderForValue.build()); - } + public Builder clearWebSearchQueries() { + webSearchQueries_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + ; + onChanged(); return this; } @@ -7264,108 +12942,106 @@ public Builder addRetrievalMetadata( * * *
            -         * Retrieval metadata to provide an understanding in the
            -         * retrieval steps performed by the model. There can be multiple such
            -         * messages which can correspond to different parts of the retrieval. This
            -         * is a mechanism used to ensure transparency to our users.
            +         * Web search queries for the following-up web search.
                      * 
            * - * - * repeated .google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.RetrievalMetadata retrieval_metadata = 5; - * + * repeated string web_search_queries = 3; + * + * @param value The bytes of the webSearchQueries to add. + * @return This builder for chaining. */ - public Builder addRetrievalMetadata( - int index, - com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate - .GroundingMetadata.RetrievalMetadata.Builder - builderForValue) { - if (retrievalMetadataBuilder_ == null) { - ensureRetrievalMetadataIsMutable(); - retrievalMetadata_.add(index, builderForValue.build()); - onChanged(); - } else { - retrievalMetadataBuilder_.addMessage(index, builderForValue.build()); + public Builder addWebSearchQueriesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); } + checkByteStringIsUtf8(value); + ensureWebSearchQueriesIsMutable(); + webSearchQueries_.add(value); + bitField0_ |= 0x00000004; + onChanged(); return this; } + private com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.SearchEntryPoint + searchEntryPoint_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.SearchEntryPoint, + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.SearchEntryPoint.Builder, + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.SearchEntryPointOrBuilder> + searchEntryPointBuilder_; + /** * * *
            -         * Retrieval metadata to provide an understanding in the
            -         * retrieval steps performed by the model. There can be multiple such
            -         * messages which can correspond to different parts of the retrieval. This
            -         * is a mechanism used to ensure transparency to our users.
            +         * Google search entry for the following-up web searches.
                      * 
            * * - * repeated .google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.RetrievalMetadata retrieval_metadata = 5; + * .google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.SearchEntryPoint search_entry_point = 4; * + * + * @return Whether the searchEntryPoint field is set. */ - public Builder addAllRetrievalMetadata( - java.lang.Iterable< - ? extends - com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse - .Candidate.GroundingMetadata.RetrievalMetadata> - values) { - if (retrievalMetadataBuilder_ == null) { - ensureRetrievalMetadataIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, retrievalMetadata_); - onChanged(); - } else { - retrievalMetadataBuilder_.addAllMessages(values); - } - return this; + public boolean hasSearchEntryPoint() { + return ((bitField0_ & 0x00000008) != 0); } /** * * *
            -         * Retrieval metadata to provide an understanding in the
            -         * retrieval steps performed by the model. There can be multiple such
            -         * messages which can correspond to different parts of the retrieval. This
            -         * is a mechanism used to ensure transparency to our users.
            +         * Google search entry for the following-up web searches.
                      * 
            * * - * repeated .google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.RetrievalMetadata retrieval_metadata = 5; + * .google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.SearchEntryPoint search_entry_point = 4; * + * + * @return The searchEntryPoint. */ - public Builder clearRetrievalMetadata() { - if (retrievalMetadataBuilder_ == null) { - retrievalMetadata_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); + public com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.SearchEntryPoint + getSearchEntryPoint() { + if (searchEntryPointBuilder_ == null) { + return searchEntryPoint_ == null + ? com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.SearchEntryPoint.getDefaultInstance() + : searchEntryPoint_; } else { - retrievalMetadataBuilder_.clear(); + return searchEntryPointBuilder_.getMessage(); } - return this; } /** * * *
            -         * Retrieval metadata to provide an understanding in the
            -         * retrieval steps performed by the model. There can be multiple such
            -         * messages which can correspond to different parts of the retrieval. This
            -         * is a mechanism used to ensure transparency to our users.
            +         * Google search entry for the following-up web searches.
                      * 
            * * - * repeated .google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.RetrievalMetadata retrieval_metadata = 5; + * .google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.SearchEntryPoint search_entry_point = 4; * */ - public Builder removeRetrievalMetadata(int index) { - if (retrievalMetadataBuilder_ == null) { - ensureRetrievalMetadataIsMutable(); - retrievalMetadata_.remove(index); - onChanged(); + public Builder setSearchEntryPoint( + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.SearchEntryPoint + value) { + if (searchEntryPointBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + searchEntryPoint_ = value; } else { - retrievalMetadataBuilder_.remove(index); + searchEntryPointBuilder_.setMessage(value); } + bitField0_ |= 0x00000008; + onChanged(); return this; } @@ -7373,200 +13049,206 @@ public Builder removeRetrievalMetadata(int index) { * * *
            -         * Retrieval metadata to provide an understanding in the
            -         * retrieval steps performed by the model. There can be multiple such
            -         * messages which can correspond to different parts of the retrieval. This
            -         * is a mechanism used to ensure transparency to our users.
            +         * Google search entry for the following-up web searches.
                      * 
            * * - * repeated .google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.RetrievalMetadata retrieval_metadata = 5; + * .google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.SearchEntryPoint search_entry_point = 4; * */ - public com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate - .GroundingMetadata.RetrievalMetadata.Builder - getRetrievalMetadataBuilder(int index) { - return internalGetRetrievalMetadataFieldBuilder().getBuilder(index); + public Builder setSearchEntryPoint( + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.SearchEntryPoint.Builder + builderForValue) { + if (searchEntryPointBuilder_ == null) { + searchEntryPoint_ = builderForValue.build(); + } else { + searchEntryPointBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; } /** * * *
            -         * Retrieval metadata to provide an understanding in the
            -         * retrieval steps performed by the model. There can be multiple such
            -         * messages which can correspond to different parts of the retrieval. This
            -         * is a mechanism used to ensure transparency to our users.
            +         * Google search entry for the following-up web searches.
                      * 
            * * - * repeated .google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.RetrievalMetadata retrieval_metadata = 5; + * .google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.SearchEntryPoint search_entry_point = 4; * */ - public com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate - .GroundingMetadata.RetrievalMetadataOrBuilder - getRetrievalMetadataOrBuilder(int index) { - if (retrievalMetadataBuilder_ == null) { - return retrievalMetadata_.get(index); + public Builder mergeSearchEntryPoint( + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.SearchEntryPoint + value) { + if (searchEntryPointBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) + && searchEntryPoint_ != null + && searchEntryPoint_ + != com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse + .Candidate.GroundingMetadata.SearchEntryPoint.getDefaultInstance()) { + getSearchEntryPointBuilder().mergeFrom(value); + } else { + searchEntryPoint_ = value; + } } else { - return retrievalMetadataBuilder_.getMessageOrBuilder(index); + searchEntryPointBuilder_.mergeFrom(value); + } + if (searchEntryPoint_ != null) { + bitField0_ |= 0x00000008; + onChanged(); } + return this; } /** * * *
            -         * Retrieval metadata to provide an understanding in the
            -         * retrieval steps performed by the model. There can be multiple such
            -         * messages which can correspond to different parts of the retrieval. This
            -         * is a mechanism used to ensure transparency to our users.
            +         * Google search entry for the following-up web searches.
                      * 
            * * - * repeated .google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.RetrievalMetadata retrieval_metadata = 5; + * .google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.SearchEntryPoint search_entry_point = 4; * */ - public java.util.List< - ? extends - com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse - .Candidate.GroundingMetadata.RetrievalMetadataOrBuilder> - getRetrievalMetadataOrBuilderList() { - if (retrievalMetadataBuilder_ != null) { - return retrievalMetadataBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(retrievalMetadata_); + public Builder clearSearchEntryPoint() { + bitField0_ = (bitField0_ & ~0x00000008); + searchEntryPoint_ = null; + if (searchEntryPointBuilder_ != null) { + searchEntryPointBuilder_.dispose(); + searchEntryPointBuilder_ = null; } + onChanged(); + return this; } /** * * *
            -         * Retrieval metadata to provide an understanding in the
            -         * retrieval steps performed by the model. There can be multiple such
            -         * messages which can correspond to different parts of the retrieval. This
            -         * is a mechanism used to ensure transparency to our users.
            +         * Google search entry for the following-up web searches.
                      * 
            * * - * repeated .google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.RetrievalMetadata retrieval_metadata = 5; - * - */ - public com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate - .GroundingMetadata.RetrievalMetadata.Builder - addRetrievalMetadataBuilder() { - return internalGetRetrievalMetadataFieldBuilder() - .addBuilder( - com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate - .GroundingMetadata.RetrievalMetadata.getDefaultInstance()); + * .google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.SearchEntryPoint search_entry_point = 4; + * + */ + public com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.SearchEntryPoint.Builder + getSearchEntryPointBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return internalGetSearchEntryPointFieldBuilder().getBuilder(); } /** * * *
            -         * Retrieval metadata to provide an understanding in the
            -         * retrieval steps performed by the model. There can be multiple such
            -         * messages which can correspond to different parts of the retrieval. This
            -         * is a mechanism used to ensure transparency to our users.
            +         * Google search entry for the following-up web searches.
                      * 
            * * - * repeated .google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.RetrievalMetadata retrieval_metadata = 5; + * .google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.SearchEntryPoint search_entry_point = 4; * */ public com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate - .GroundingMetadata.RetrievalMetadata.Builder - addRetrievalMetadataBuilder(int index) { - return internalGetRetrievalMetadataFieldBuilder() - .addBuilder( - index, - com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate - .GroundingMetadata.RetrievalMetadata.getDefaultInstance()); + .GroundingMetadata.SearchEntryPointOrBuilder + getSearchEntryPointOrBuilder() { + if (searchEntryPointBuilder_ != null) { + return searchEntryPointBuilder_.getMessageOrBuilder(); + } else { + return searchEntryPoint_ == null + ? com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.SearchEntryPoint.getDefaultInstance() + : searchEntryPoint_; + } } /** * * *
            -         * Retrieval metadata to provide an understanding in the
            -         * retrieval steps performed by the model. There can be multiple such
            -         * messages which can correspond to different parts of the retrieval. This
            -         * is a mechanism used to ensure transparency to our users.
            +         * Google search entry for the following-up web searches.
                      * 
            * * - * repeated .google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.RetrievalMetadata retrieval_metadata = 5; + * .google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.SearchEntryPoint search_entry_point = 4; * */ - public java.util.List< - com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate - .GroundingMetadata.RetrievalMetadata.Builder> - getRetrievalMetadataBuilderList() { - return internalGetRetrievalMetadataFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilder< + private com.google.protobuf.SingleFieldBuilder< com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate - .GroundingMetadata.RetrievalMetadata, + .GroundingMetadata.SearchEntryPoint, com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate - .GroundingMetadata.RetrievalMetadata.Builder, + .GroundingMetadata.SearchEntryPoint.Builder, com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate - .GroundingMetadata.RetrievalMetadataOrBuilder> - internalGetRetrievalMetadataFieldBuilder() { - if (retrievalMetadataBuilder_ == null) { - retrievalMetadataBuilder_ = - new com.google.protobuf.RepeatedFieldBuilder< + .GroundingMetadata.SearchEntryPointOrBuilder> + internalGetSearchEntryPointFieldBuilder() { + if (searchEntryPointBuilder_ == null) { + searchEntryPointBuilder_ = + new com.google.protobuf.SingleFieldBuilder< com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse - .Candidate.GroundingMetadata.RetrievalMetadata, + .Candidate.GroundingMetadata.SearchEntryPoint, com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse - .Candidate.GroundingMetadata.RetrievalMetadata.Builder, + .Candidate.GroundingMetadata.SearchEntryPoint.Builder, com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse - .Candidate.GroundingMetadata.RetrievalMetadataOrBuilder>( - retrievalMetadata_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - retrievalMetadata_ = null; + .Candidate.GroundingMetadata.SearchEntryPointOrBuilder>( + getSearchEntryPoint(), getParentForChildren(), isClean()); + searchEntryPoint_ = null; } - return retrievalMetadataBuilder_; + return searchEntryPointBuilder_; } - private java.util.List supportChunks_ = - java.util.Collections.emptyList(); + private java.util.List< + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.GroundingSupport> + groundingSupport_ = java.util.Collections.emptyList(); - private void ensureSupportChunksIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { - supportChunks_ = - new java.util.ArrayList( - supportChunks_); - bitField0_ |= 0x00000002; + private void ensureGroundingSupportIsMutable() { + if (!((bitField0_ & 0x00000010) != 0)) { + groundingSupport_ = + new java.util.ArrayList< + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse + .Candidate.GroundingMetadata.GroundingSupport>(groundingSupport_); + bitField0_ |= 0x00000010; } } private com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.discoveryengine.v1beta.FactChunk, - com.google.cloud.discoveryengine.v1beta.FactChunk.Builder, - com.google.cloud.discoveryengine.v1beta.FactChunkOrBuilder> - supportChunksBuilder_; + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.GroundingSupport, + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.GroundingSupport.Builder, + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.GroundingSupportOrBuilder> + groundingSupportBuilder_; /** * * *
            -         * List of chunks to be attributed across all claims in the candidate.
            -         * These are derived from the grounding sources supplied in the request.
            +         * GroundingSupport across all claims in the answer candidate.
            +         * An support to a fact indicates that the claim is supported by
            +         * the fact.
                      * 
            * - * repeated .google.cloud.discoveryengine.v1beta.FactChunk support_chunks = 1; + * + * repeated .google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.GroundingSupport grounding_support = 2; + * */ - public java.util.List - getSupportChunksList() { - if (supportChunksBuilder_ == null) { - return java.util.Collections.unmodifiableList(supportChunks_); + public java.util.List< + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.GroundingSupport> + getGroundingSupportList() { + if (groundingSupportBuilder_ == null) { + return java.util.Collections.unmodifiableList(groundingSupport_); } else { - return supportChunksBuilder_.getMessageList(); + return groundingSupportBuilder_.getMessageList(); } } @@ -7574,17 +13256,20 @@ private void ensureSupportChunksIsMutable() { * * *
            -         * List of chunks to be attributed across all claims in the candidate.
            -         * These are derived from the grounding sources supplied in the request.
            +         * GroundingSupport across all claims in the answer candidate.
            +         * An support to a fact indicates that the claim is supported by
            +         * the fact.
                      * 
            * - * repeated .google.cloud.discoveryengine.v1beta.FactChunk support_chunks = 1; + * + * repeated .google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.GroundingSupport grounding_support = 2; + * */ - public int getSupportChunksCount() { - if (supportChunksBuilder_ == null) { - return supportChunks_.size(); + public int getGroundingSupportCount() { + if (groundingSupportBuilder_ == null) { + return groundingSupport_.size(); } else { - return supportChunksBuilder_.getCount(); + return groundingSupportBuilder_.getCount(); } } @@ -7592,17 +13277,22 @@ public int getSupportChunksCount() { * * *
            -         * List of chunks to be attributed across all claims in the candidate.
            -         * These are derived from the grounding sources supplied in the request.
            +         * GroundingSupport across all claims in the answer candidate.
            +         * An support to a fact indicates that the claim is supported by
            +         * the fact.
                      * 
            * - * repeated .google.cloud.discoveryengine.v1beta.FactChunk support_chunks = 1; + * + * repeated .google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.GroundingSupport grounding_support = 2; + * */ - public com.google.cloud.discoveryengine.v1beta.FactChunk getSupportChunks(int index) { - if (supportChunksBuilder_ == null) { - return supportChunks_.get(index); + public com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.GroundingSupport + getGroundingSupport(int index) { + if (groundingSupportBuilder_ == null) { + return groundingSupport_.get(index); } else { - return supportChunksBuilder_.getMessage(index); + return groundingSupportBuilder_.getMessage(index); } } @@ -7610,23 +13300,29 @@ public com.google.cloud.discoveryengine.v1beta.FactChunk getSupportChunks(int in * * *
            -         * List of chunks to be attributed across all claims in the candidate.
            -         * These are derived from the grounding sources supplied in the request.
            +         * GroundingSupport across all claims in the answer candidate.
            +         * An support to a fact indicates that the claim is supported by
            +         * the fact.
                      * 
            * - * repeated .google.cloud.discoveryengine.v1beta.FactChunk support_chunks = 1; + * + * repeated .google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.GroundingSupport grounding_support = 2; + * */ - public Builder setSupportChunks( - int index, com.google.cloud.discoveryengine.v1beta.FactChunk value) { - if (supportChunksBuilder_ == null) { + public Builder setGroundingSupport( + int index, + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.GroundingSupport + value) { + if (groundingSupportBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - ensureSupportChunksIsMutable(); - supportChunks_.set(index, value); + ensureGroundingSupportIsMutable(); + groundingSupport_.set(index, value); onChanged(); } else { - supportChunksBuilder_.setMessage(index, value); + groundingSupportBuilder_.setMessage(index, value); } return this; } @@ -7635,20 +13331,26 @@ public Builder setSupportChunks( * * *
            -         * List of chunks to be attributed across all claims in the candidate.
            -         * These are derived from the grounding sources supplied in the request.
            +         * GroundingSupport across all claims in the answer candidate.
            +         * An support to a fact indicates that the claim is supported by
            +         * the fact.
                      * 
            * - * repeated .google.cloud.discoveryengine.v1beta.FactChunk support_chunks = 1; + * + * repeated .google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.GroundingSupport grounding_support = 2; + * */ - public Builder setSupportChunks( - int index, com.google.cloud.discoveryengine.v1beta.FactChunk.Builder builderForValue) { - if (supportChunksBuilder_ == null) { - ensureSupportChunksIsMutable(); - supportChunks_.set(index, builderForValue.build()); + public Builder setGroundingSupport( + int index, + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.GroundingSupport.Builder + builderForValue) { + if (groundingSupportBuilder_ == null) { + ensureGroundingSupportIsMutable(); + groundingSupport_.set(index, builderForValue.build()); onChanged(); } else { - supportChunksBuilder_.setMessage(index, builderForValue.build()); + groundingSupportBuilder_.setMessage(index, builderForValue.build()); } return this; } @@ -7657,22 +13359,28 @@ public Builder setSupportChunks( * * *
            -         * List of chunks to be attributed across all claims in the candidate.
            -         * These are derived from the grounding sources supplied in the request.
            +         * GroundingSupport across all claims in the answer candidate.
            +         * An support to a fact indicates that the claim is supported by
            +         * the fact.
                      * 
            * - * repeated .google.cloud.discoveryengine.v1beta.FactChunk support_chunks = 1; + * + * repeated .google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.GroundingSupport grounding_support = 2; + * */ - public Builder addSupportChunks(com.google.cloud.discoveryengine.v1beta.FactChunk value) { - if (supportChunksBuilder_ == null) { + public Builder addGroundingSupport( + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.GroundingSupport + value) { + if (groundingSupportBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - ensureSupportChunksIsMutable(); - supportChunks_.add(value); + ensureGroundingSupportIsMutable(); + groundingSupport_.add(value); onChanged(); } else { - supportChunksBuilder_.addMessage(value); + groundingSupportBuilder_.addMessage(value); } return this; } @@ -7681,23 +13389,29 @@ public Builder addSupportChunks(com.google.cloud.discoveryengine.v1beta.FactChun * * *
            -         * List of chunks to be attributed across all claims in the candidate.
            -         * These are derived from the grounding sources supplied in the request.
            +         * GroundingSupport across all claims in the answer candidate.
            +         * An support to a fact indicates that the claim is supported by
            +         * the fact.
                      * 
            * - * repeated .google.cloud.discoveryengine.v1beta.FactChunk support_chunks = 1; + * + * repeated .google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.GroundingSupport grounding_support = 2; + * */ - public Builder addSupportChunks( - int index, com.google.cloud.discoveryengine.v1beta.FactChunk value) { - if (supportChunksBuilder_ == null) { + public Builder addGroundingSupport( + int index, + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.GroundingSupport + value) { + if (groundingSupportBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - ensureSupportChunksIsMutable(); - supportChunks_.add(index, value); + ensureGroundingSupportIsMutable(); + groundingSupport_.add(index, value); onChanged(); } else { - supportChunksBuilder_.addMessage(index, value); + groundingSupportBuilder_.addMessage(index, value); } return this; } @@ -7706,20 +13420,25 @@ public Builder addSupportChunks( * * *
            -         * List of chunks to be attributed across all claims in the candidate.
            -         * These are derived from the grounding sources supplied in the request.
            +         * GroundingSupport across all claims in the answer candidate.
            +         * An support to a fact indicates that the claim is supported by
            +         * the fact.
                      * 
            * - * repeated .google.cloud.discoveryengine.v1beta.FactChunk support_chunks = 1; + * + * repeated .google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.GroundingSupport grounding_support = 2; + * */ - public Builder addSupportChunks( - com.google.cloud.discoveryengine.v1beta.FactChunk.Builder builderForValue) { - if (supportChunksBuilder_ == null) { - ensureSupportChunksIsMutable(); - supportChunks_.add(builderForValue.build()); + public Builder addGroundingSupport( + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.GroundingSupport.Builder + builderForValue) { + if (groundingSupportBuilder_ == null) { + ensureGroundingSupportIsMutable(); + groundingSupport_.add(builderForValue.build()); onChanged(); } else { - supportChunksBuilder_.addMessage(builderForValue.build()); + groundingSupportBuilder_.addMessage(builderForValue.build()); } return this; } @@ -7728,20 +13447,26 @@ public Builder addSupportChunks( * * *
            -         * List of chunks to be attributed across all claims in the candidate.
            -         * These are derived from the grounding sources supplied in the request.
            +         * GroundingSupport across all claims in the answer candidate.
            +         * An support to a fact indicates that the claim is supported by
            +         * the fact.
                      * 
            * - * repeated .google.cloud.discoveryengine.v1beta.FactChunk support_chunks = 1; + * + * repeated .google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.GroundingSupport grounding_support = 2; + * */ - public Builder addSupportChunks( - int index, com.google.cloud.discoveryengine.v1beta.FactChunk.Builder builderForValue) { - if (supportChunksBuilder_ == null) { - ensureSupportChunksIsMutable(); - supportChunks_.add(index, builderForValue.build()); + public Builder addGroundingSupport( + int index, + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.GroundingSupport.Builder + builderForValue) { + if (groundingSupportBuilder_ == null) { + ensureGroundingSupportIsMutable(); + groundingSupport_.add(index, builderForValue.build()); onChanged(); } else { - supportChunksBuilder_.addMessage(index, builderForValue.build()); + groundingSupportBuilder_.addMessage(index, builderForValue.build()); } return this; } @@ -7750,21 +13475,27 @@ public Builder addSupportChunks( * * *
            -         * List of chunks to be attributed across all claims in the candidate.
            -         * These are derived from the grounding sources supplied in the request.
            +         * GroundingSupport across all claims in the answer candidate.
            +         * An support to a fact indicates that the claim is supported by
            +         * the fact.
                      * 
            * - * repeated .google.cloud.discoveryengine.v1beta.FactChunk support_chunks = 1; + * + * repeated .google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.GroundingSupport grounding_support = 2; + * */ - public Builder addAllSupportChunks( - java.lang.Iterable + public Builder addAllGroundingSupport( + java.lang.Iterable< + ? extends + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse + .Candidate.GroundingMetadata.GroundingSupport> values) { - if (supportChunksBuilder_ == null) { - ensureSupportChunksIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, supportChunks_); + if (groundingSupportBuilder_ == null) { + ensureGroundingSupportIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, groundingSupport_); onChanged(); } else { - supportChunksBuilder_.addAllMessages(values); + groundingSupportBuilder_.addAllMessages(values); } return this; } @@ -7773,19 +13504,22 @@ public Builder addAllSupportChunks( * * *
            -         * List of chunks to be attributed across all claims in the candidate.
            -         * These are derived from the grounding sources supplied in the request.
            +         * GroundingSupport across all claims in the answer candidate.
            +         * An support to a fact indicates that the claim is supported by
            +         * the fact.
                      * 
            * - * repeated .google.cloud.discoveryengine.v1beta.FactChunk support_chunks = 1; + * + * repeated .google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.GroundingSupport grounding_support = 2; + * */ - public Builder clearSupportChunks() { - if (supportChunksBuilder_ == null) { - supportChunks_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); + public Builder clearGroundingSupport() { + if (groundingSupportBuilder_ == null) { + groundingSupport_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000010); onChanged(); } else { - supportChunksBuilder_.clear(); + groundingSupportBuilder_.clear(); } return this; } @@ -7794,19 +13528,22 @@ public Builder clearSupportChunks() { * * *
            -         * List of chunks to be attributed across all claims in the candidate.
            -         * These are derived from the grounding sources supplied in the request.
            +         * GroundingSupport across all claims in the answer candidate.
            +         * An support to a fact indicates that the claim is supported by
            +         * the fact.
                      * 
            * - * repeated .google.cloud.discoveryengine.v1beta.FactChunk support_chunks = 1; + * + * repeated .google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.GroundingSupport grounding_support = 2; + * */ - public Builder removeSupportChunks(int index) { - if (supportChunksBuilder_ == null) { - ensureSupportChunksIsMutable(); - supportChunks_.remove(index); + public Builder removeGroundingSupport(int index) { + if (groundingSupportBuilder_ == null) { + ensureGroundingSupportIsMutable(); + groundingSupport_.remove(index); onChanged(); } else { - supportChunksBuilder_.remove(index); + groundingSupportBuilder_.remove(index); } return this; } @@ -7815,33 +13552,41 @@ public Builder removeSupportChunks(int index) { * * *
            -         * List of chunks to be attributed across all claims in the candidate.
            -         * These are derived from the grounding sources supplied in the request.
            +         * GroundingSupport across all claims in the answer candidate.
            +         * An support to a fact indicates that the claim is supported by
            +         * the fact.
                      * 
            * - * repeated .google.cloud.discoveryengine.v1beta.FactChunk support_chunks = 1; + * + * repeated .google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.GroundingSupport grounding_support = 2; + * */ - public com.google.cloud.discoveryengine.v1beta.FactChunk.Builder getSupportChunksBuilder( - int index) { - return internalGetSupportChunksFieldBuilder().getBuilder(index); + public com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.GroundingSupport.Builder + getGroundingSupportBuilder(int index) { + return internalGetGroundingSupportFieldBuilder().getBuilder(index); } /** * * *
            -         * List of chunks to be attributed across all claims in the candidate.
            -         * These are derived from the grounding sources supplied in the request.
            +         * GroundingSupport across all claims in the answer candidate.
            +         * An support to a fact indicates that the claim is supported by
            +         * the fact.
                      * 
            * - * repeated .google.cloud.discoveryengine.v1beta.FactChunk support_chunks = 1; + * + * repeated .google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.GroundingSupport grounding_support = 2; + * */ - public com.google.cloud.discoveryengine.v1beta.FactChunkOrBuilder getSupportChunksOrBuilder( - int index) { - if (supportChunksBuilder_ == null) { - return supportChunks_.get(index); + public com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.GroundingSupportOrBuilder + getGroundingSupportOrBuilder(int index) { + if (groundingSupportBuilder_ == null) { + return groundingSupport_.get(index); } else { - return supportChunksBuilder_.getMessageOrBuilder(index); + return groundingSupportBuilder_.getMessageOrBuilder(index); } } @@ -7849,18 +13594,24 @@ public com.google.cloud.discoveryengine.v1beta.FactChunkOrBuilder getSupportChun * * *
            -         * List of chunks to be attributed across all claims in the candidate.
            -         * These are derived from the grounding sources supplied in the request.
            +         * GroundingSupport across all claims in the answer candidate.
            +         * An support to a fact indicates that the claim is supported by
            +         * the fact.
                      * 
            * - * repeated .google.cloud.discoveryengine.v1beta.FactChunk support_chunks = 1; + * + * repeated .google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.GroundingSupport grounding_support = 2; + * */ - public java.util.List - getSupportChunksOrBuilderList() { - if (supportChunksBuilder_ != null) { - return supportChunksBuilder_.getMessageOrBuilderList(); + public java.util.List< + ? extends + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse + .Candidate.GroundingMetadata.GroundingSupportOrBuilder> + getGroundingSupportOrBuilderList() { + if (groundingSupportBuilder_ != null) { + return groundingSupportBuilder_.getMessageOrBuilderList(); } else { - return java.util.Collections.unmodifiableList(supportChunks_); + return java.util.Collections.unmodifiableList(groundingSupport_); } } @@ -7868,163 +13619,231 @@ public com.google.cloud.discoveryengine.v1beta.FactChunkOrBuilder getSupportChun * * *
            -         * List of chunks to be attributed across all claims in the candidate.
            -         * These are derived from the grounding sources supplied in the request.
            +         * GroundingSupport across all claims in the answer candidate.
            +         * An support to a fact indicates that the claim is supported by
            +         * the fact.
                      * 
            * - * repeated .google.cloud.discoveryengine.v1beta.FactChunk support_chunks = 1; + * + * repeated .google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.GroundingSupport grounding_support = 2; + * */ - public com.google.cloud.discoveryengine.v1beta.FactChunk.Builder addSupportChunksBuilder() { - return internalGetSupportChunksFieldBuilder() - .addBuilder(com.google.cloud.discoveryengine.v1beta.FactChunk.getDefaultInstance()); + public com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.GroundingSupport.Builder + addGroundingSupportBuilder() { + return internalGetGroundingSupportFieldBuilder() + .addBuilder( + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.GroundingSupport.getDefaultInstance()); } /** * * *
            -         * List of chunks to be attributed across all claims in the candidate.
            -         * These are derived from the grounding sources supplied in the request.
            +         * GroundingSupport across all claims in the answer candidate.
            +         * An support to a fact indicates that the claim is supported by
            +         * the fact.
                      * 
            * - * repeated .google.cloud.discoveryengine.v1beta.FactChunk support_chunks = 1; + * + * repeated .google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.GroundingSupport grounding_support = 2; + * */ - public com.google.cloud.discoveryengine.v1beta.FactChunk.Builder addSupportChunksBuilder( - int index) { - return internalGetSupportChunksFieldBuilder() + public com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.GroundingSupport.Builder + addGroundingSupportBuilder(int index) { + return internalGetGroundingSupportFieldBuilder() .addBuilder( - index, com.google.cloud.discoveryengine.v1beta.FactChunk.getDefaultInstance()); + index, + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.GroundingSupport.getDefaultInstance()); } /** * * *
            -         * List of chunks to be attributed across all claims in the candidate.
            -         * These are derived from the grounding sources supplied in the request.
            +         * GroundingSupport across all claims in the answer candidate.
            +         * An support to a fact indicates that the claim is supported by
            +         * the fact.
                      * 
            * - * repeated .google.cloud.discoveryengine.v1beta.FactChunk support_chunks = 1; + * + * repeated .google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.GroundingSupport grounding_support = 2; + * */ - public java.util.List - getSupportChunksBuilderList() { - return internalGetSupportChunksFieldBuilder().getBuilderList(); + public java.util.List< + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.GroundingSupport.Builder> + getGroundingSupportBuilderList() { + return internalGetGroundingSupportFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.discoveryengine.v1beta.FactChunk, - com.google.cloud.discoveryengine.v1beta.FactChunk.Builder, - com.google.cloud.discoveryengine.v1beta.FactChunkOrBuilder> - internalGetSupportChunksFieldBuilder() { - if (supportChunksBuilder_ == null) { - supportChunksBuilder_ = + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.GroundingSupport, + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.GroundingSupport.Builder, + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.GroundingSupportOrBuilder> + internalGetGroundingSupportFieldBuilder() { + if (groundingSupportBuilder_ == null) { + groundingSupportBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.discoveryengine.v1beta.FactChunk, - com.google.cloud.discoveryengine.v1beta.FactChunk.Builder, - com.google.cloud.discoveryengine.v1beta.FactChunkOrBuilder>( - supportChunks_, - ((bitField0_ & 0x00000002) != 0), + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse + .Candidate.GroundingMetadata.GroundingSupport, + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse + .Candidate.GroundingMetadata.GroundingSupport.Builder, + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse + .Candidate.GroundingMetadata.GroundingSupportOrBuilder>( + groundingSupport_, + ((bitField0_ & 0x00000010) != 0), getParentForChildren(), isClean()); - supportChunks_ = null; + groundingSupport_ = null; } - return supportChunksBuilder_; + return groundingSupportBuilder_; } - private com.google.protobuf.LazyStringArrayList webSearchQueries_ = - com.google.protobuf.LazyStringArrayList.emptyList(); + private java.util.List< + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.ImageMetadata> + images_ = java.util.Collections.emptyList(); - private void ensureWebSearchQueriesIsMutable() { - if (!webSearchQueries_.isModifiable()) { - webSearchQueries_ = new com.google.protobuf.LazyStringArrayList(webSearchQueries_); + private void ensureImagesIsMutable() { + if (!((bitField0_ & 0x00000020) != 0)) { + images_ = + new java.util.ArrayList< + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse + .Candidate.GroundingMetadata.ImageMetadata>(images_); + bitField0_ |= 0x00000020; } - bitField0_ |= 0x00000004; } + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.ImageMetadata, + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.ImageMetadata.Builder, + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.ImageMetadataOrBuilder> + imagesBuilder_; + /** * * *
            -         * Web search queries for the following-up web search.
            +         * Images from the web search.
                      * 
            * - * repeated string web_search_queries = 3; - * - * @return A list containing the webSearchQueries. + * + * repeated .google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.ImageMetadata images = 9; + * */ - public com.google.protobuf.ProtocolStringList getWebSearchQueriesList() { - webSearchQueries_.makeImmutable(); - return webSearchQueries_; + public java.util.List< + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.ImageMetadata> + getImagesList() { + if (imagesBuilder_ == null) { + return java.util.Collections.unmodifiableList(images_); + } else { + return imagesBuilder_.getMessageList(); + } } /** * * *
            -         * Web search queries for the following-up web search.
            +         * Images from the web search.
                      * 
            * - * repeated string web_search_queries = 3; - * - * @return The count of webSearchQueries. + * + * repeated .google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.ImageMetadata images = 9; + * */ - public int getWebSearchQueriesCount() { - return webSearchQueries_.size(); + public int getImagesCount() { + if (imagesBuilder_ == null) { + return images_.size(); + } else { + return imagesBuilder_.getCount(); + } } /** * * *
            -         * Web search queries for the following-up web search.
            +         * Images from the web search.
                      * 
            * - * repeated string web_search_queries = 3; - * - * @param index The index of the element to return. - * @return The webSearchQueries at the given index. + * + * repeated .google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.ImageMetadata images = 9; + * */ - public java.lang.String getWebSearchQueries(int index) { - return webSearchQueries_.get(index); + public com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.ImageMetadata + getImages(int index) { + if (imagesBuilder_ == null) { + return images_.get(index); + } else { + return imagesBuilder_.getMessage(index); + } } /** * * *
            -         * Web search queries for the following-up web search.
            +         * Images from the web search.
                      * 
            * - * repeated string web_search_queries = 3; - * - * @param index The index of the value to return. - * @return The bytes of the webSearchQueries at the given index. + * + * repeated .google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.ImageMetadata images = 9; + * */ - public com.google.protobuf.ByteString getWebSearchQueriesBytes(int index) { - return webSearchQueries_.getByteString(index); + public Builder setImages( + int index, + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.ImageMetadata + value) { + if (imagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureImagesIsMutable(); + images_.set(index, value); + onChanged(); + } else { + imagesBuilder_.setMessage(index, value); + } + return this; } /** * * *
            -         * Web search queries for the following-up web search.
            +         * Images from the web search.
                      * 
            * - * repeated string web_search_queries = 3; - * - * @param index The index to set the value at. - * @param value The webSearchQueries to set. - * @return This builder for chaining. + * + * repeated .google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.ImageMetadata images = 9; + * */ - public Builder setWebSearchQueries(int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); + public Builder setImages( + int index, + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.ImageMetadata.Builder + builderForValue) { + if (imagesBuilder_ == null) { + ensureImagesIsMutable(); + images_.set(index, builderForValue.build()); + onChanged(); + } else { + imagesBuilder_.setMessage(index, builderForValue.build()); } - ensureWebSearchQueriesIsMutable(); - webSearchQueries_.set(index, value); - bitField0_ |= 0x00000004; - onChanged(); return this; } @@ -8032,22 +13851,27 @@ public Builder setWebSearchQueries(int index, java.lang.String value) { * * *
            -         * Web search queries for the following-up web search.
            +         * Images from the web search.
                      * 
            * - * repeated string web_search_queries = 3; - * - * @param value The webSearchQueries to add. - * @return This builder for chaining. + * + * repeated .google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.ImageMetadata images = 9; + * */ - public Builder addWebSearchQueries(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); + public Builder addImages( + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.ImageMetadata + value) { + if (imagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureImagesIsMutable(); + images_.add(value); + onChanged(); + } else { + imagesBuilder_.addMessage(value); } - ensureWebSearchQueriesIsMutable(); - webSearchQueries_.add(value); - bitField0_ |= 0x00000004; - onChanged(); return this; } @@ -8055,19 +13879,28 @@ public Builder addWebSearchQueries(java.lang.String value) { * * *
            -         * Web search queries for the following-up web search.
            +         * Images from the web search.
                      * 
            * - * repeated string web_search_queries = 3; - * - * @param values The webSearchQueries to add. - * @return This builder for chaining. + * + * repeated .google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.ImageMetadata images = 9; + * */ - public Builder addAllWebSearchQueries(java.lang.Iterable values) { - ensureWebSearchQueriesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, webSearchQueries_); - bitField0_ |= 0x00000004; - onChanged(); + public Builder addImages( + int index, + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.ImageMetadata + value) { + if (imagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureImagesIsMutable(); + images_.add(index, value); + onChanged(); + } else { + imagesBuilder_.addMessage(index, value); + } return this; } @@ -8075,18 +13908,24 @@ public Builder addAllWebSearchQueries(java.lang.Iterable value * * *
            -         * Web search queries for the following-up web search.
            +         * Images from the web search.
                      * 
            * - * repeated string web_search_queries = 3; - * - * @return This builder for chaining. + * + * repeated .google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.ImageMetadata images = 9; + * */ - public Builder clearWebSearchQueries() { - webSearchQueries_ = com.google.protobuf.LazyStringArrayList.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); - ; - onChanged(); + public Builder addImages( + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.ImageMetadata.Builder + builderForValue) { + if (imagesBuilder_ == null) { + ensureImagesIsMutable(); + images_.add(builderForValue.build()); + onChanged(); + } else { + imagesBuilder_.addMessage(builderForValue.build()); + } return this; } @@ -8094,106 +13933,96 @@ public Builder clearWebSearchQueries() { * * *
            -         * Web search queries for the following-up web search.
            +         * Images from the web search.
                      * 
            * - * repeated string web_search_queries = 3; - * - * @param value The bytes of the webSearchQueries to add. - * @return This builder for chaining. + * + * repeated .google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.ImageMetadata images = 9; + * */ - public Builder addWebSearchQueriesBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); + public Builder addImages( + int index, + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.ImageMetadata.Builder + builderForValue) { + if (imagesBuilder_ == null) { + ensureImagesIsMutable(); + images_.add(index, builderForValue.build()); + onChanged(); + } else { + imagesBuilder_.addMessage(index, builderForValue.build()); } - checkByteStringIsUtf8(value); - ensureWebSearchQueriesIsMutable(); - webSearchQueries_.add(value); - bitField0_ |= 0x00000004; - onChanged(); return this; } - private com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate - .GroundingMetadata.SearchEntryPoint - searchEntryPoint_; - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate - .GroundingMetadata.SearchEntryPoint, - com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate - .GroundingMetadata.SearchEntryPoint.Builder, - com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate - .GroundingMetadata.SearchEntryPointOrBuilder> - searchEntryPointBuilder_; - /** * * *
            -         * Google search entry for the following-up web searches.
            +         * Images from the web search.
                      * 
            * * - * .google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.SearchEntryPoint search_entry_point = 4; + * repeated .google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.ImageMetadata images = 9; * - * - * @return Whether the searchEntryPoint field is set. */ - public boolean hasSearchEntryPoint() { - return ((bitField0_ & 0x00000008) != 0); + public Builder addAllImages( + java.lang.Iterable< + ? extends + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse + .Candidate.GroundingMetadata.ImageMetadata> + values) { + if (imagesBuilder_ == null) { + ensureImagesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, images_); + onChanged(); + } else { + imagesBuilder_.addAllMessages(values); + } + return this; } /** * * *
            -         * Google search entry for the following-up web searches.
            +         * Images from the web search.
                      * 
            * * - * .google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.SearchEntryPoint search_entry_point = 4; + * repeated .google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.ImageMetadata images = 9; * - * - * @return The searchEntryPoint. */ - public com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate - .GroundingMetadata.SearchEntryPoint - getSearchEntryPoint() { - if (searchEntryPointBuilder_ == null) { - return searchEntryPoint_ == null - ? com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate - .GroundingMetadata.SearchEntryPoint.getDefaultInstance() - : searchEntryPoint_; + public Builder clearImages() { + if (imagesBuilder_ == null) { + images_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); } else { - return searchEntryPointBuilder_.getMessage(); + imagesBuilder_.clear(); } + return this; } /** * * *
            -         * Google search entry for the following-up web searches.
            +         * Images from the web search.
                      * 
            * * - * .google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.SearchEntryPoint search_entry_point = 4; + * repeated .google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.ImageMetadata images = 9; * */ - public Builder setSearchEntryPoint( - com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate - .GroundingMetadata.SearchEntryPoint - value) { - if (searchEntryPointBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - searchEntryPoint_ = value; + public Builder removeImages(int index) { + if (imagesBuilder_ == null) { + ensureImagesIsMutable(); + images_.remove(index); + onChanged(); } else { - searchEntryPointBuilder_.setMessage(value); + imagesBuilder_.remove(index); } - bitField0_ |= 0x00000008; - onChanged(); return this; } @@ -8201,206 +14030,188 @@ public Builder setSearchEntryPoint( * * *
            -         * Google search entry for the following-up web searches.
            +         * Images from the web search.
                      * 
            * * - * .google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.SearchEntryPoint search_entry_point = 4; + * repeated .google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.ImageMetadata images = 9; * */ - public Builder setSearchEntryPoint( - com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate - .GroundingMetadata.SearchEntryPoint.Builder - builderForValue) { - if (searchEntryPointBuilder_ == null) { - searchEntryPoint_ = builderForValue.build(); - } else { - searchEntryPointBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000008; - onChanged(); - return this; + public com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.ImageMetadata.Builder + getImagesBuilder(int index) { + return internalGetImagesFieldBuilder().getBuilder(index); } /** * * *
            -         * Google search entry for the following-up web searches.
            +         * Images from the web search.
                      * 
            * * - * .google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.SearchEntryPoint search_entry_point = 4; + * repeated .google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.ImageMetadata images = 9; * - */ - public Builder mergeSearchEntryPoint( - com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate - .GroundingMetadata.SearchEntryPoint - value) { - if (searchEntryPointBuilder_ == null) { - if (((bitField0_ & 0x00000008) != 0) - && searchEntryPoint_ != null - && searchEntryPoint_ - != com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse - .Candidate.GroundingMetadata.SearchEntryPoint.getDefaultInstance()) { - getSearchEntryPointBuilder().mergeFrom(value); - } else { - searchEntryPoint_ = value; - } + */ + public com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.ImageMetadataOrBuilder + getImagesOrBuilder(int index) { + if (imagesBuilder_ == null) { + return images_.get(index); } else { - searchEntryPointBuilder_.mergeFrom(value); - } - if (searchEntryPoint_ != null) { - bitField0_ |= 0x00000008; - onChanged(); + return imagesBuilder_.getMessageOrBuilder(index); } - return this; } /** * * *
            -         * Google search entry for the following-up web searches.
            +         * Images from the web search.
                      * 
            * * - * .google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.SearchEntryPoint search_entry_point = 4; + * repeated .google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.ImageMetadata images = 9; * */ - public Builder clearSearchEntryPoint() { - bitField0_ = (bitField0_ & ~0x00000008); - searchEntryPoint_ = null; - if (searchEntryPointBuilder_ != null) { - searchEntryPointBuilder_.dispose(); - searchEntryPointBuilder_ = null; + public java.util.List< + ? extends + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse + .Candidate.GroundingMetadata.ImageMetadataOrBuilder> + getImagesOrBuilderList() { + if (imagesBuilder_ != null) { + return imagesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(images_); } - onChanged(); - return this; } /** * * *
            -         * Google search entry for the following-up web searches.
            +         * Images from the web search.
                      * 
            * * - * .google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.SearchEntryPoint search_entry_point = 4; + * repeated .google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.ImageMetadata images = 9; * */ public com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate - .GroundingMetadata.SearchEntryPoint.Builder - getSearchEntryPointBuilder() { - bitField0_ |= 0x00000008; - onChanged(); - return internalGetSearchEntryPointFieldBuilder().getBuilder(); + .GroundingMetadata.ImageMetadata.Builder + addImagesBuilder() { + return internalGetImagesFieldBuilder() + .addBuilder( + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.ImageMetadata.getDefaultInstance()); } /** * * *
            -         * Google search entry for the following-up web searches.
            +         * Images from the web search.
                      * 
            * * - * .google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.SearchEntryPoint search_entry_point = 4; + * repeated .google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.ImageMetadata images = 9; * */ public com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate - .GroundingMetadata.SearchEntryPointOrBuilder - getSearchEntryPointOrBuilder() { - if (searchEntryPointBuilder_ != null) { - return searchEntryPointBuilder_.getMessageOrBuilder(); - } else { - return searchEntryPoint_ == null - ? com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate - .GroundingMetadata.SearchEntryPoint.getDefaultInstance() - : searchEntryPoint_; - } + .GroundingMetadata.ImageMetadata.Builder + addImagesBuilder(int index) { + return internalGetImagesFieldBuilder() + .addBuilder( + index, + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.ImageMetadata.getDefaultInstance()); } /** * * *
            -         * Google search entry for the following-up web searches.
            +         * Images from the web search.
                      * 
            * * - * .google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.SearchEntryPoint search_entry_point = 4; + * repeated .google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.ImageMetadata images = 9; * */ - private com.google.protobuf.SingleFieldBuilder< + public java.util.List< com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate - .GroundingMetadata.SearchEntryPoint, + .GroundingMetadata.ImageMetadata.Builder> + getImagesBuilderList() { + return internalGetImagesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate - .GroundingMetadata.SearchEntryPoint.Builder, + .GroundingMetadata.ImageMetadata, com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate - .GroundingMetadata.SearchEntryPointOrBuilder> - internalGetSearchEntryPointFieldBuilder() { - if (searchEntryPointBuilder_ == null) { - searchEntryPointBuilder_ = - new com.google.protobuf.SingleFieldBuilder< + .GroundingMetadata.ImageMetadata.Builder, + com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate + .GroundingMetadata.ImageMetadataOrBuilder> + internalGetImagesFieldBuilder() { + if (imagesBuilder_ == null) { + imagesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse - .Candidate.GroundingMetadata.SearchEntryPoint, + .Candidate.GroundingMetadata.ImageMetadata, com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse - .Candidate.GroundingMetadata.SearchEntryPoint.Builder, + .Candidate.GroundingMetadata.ImageMetadata.Builder, com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse - .Candidate.GroundingMetadata.SearchEntryPointOrBuilder>( - getSearchEntryPoint(), getParentForChildren(), isClean()); - searchEntryPoint_ = null; + .Candidate.GroundingMetadata.ImageMetadataOrBuilder>( + images_, ((bitField0_ & 0x00000020) != 0), getParentForChildren(), isClean()); + images_ = null; } - return searchEntryPointBuilder_; + return imagesBuilder_; } private java.util.List< com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate - .GroundingMetadata.GroundingSupport> - groundingSupport_ = java.util.Collections.emptyList(); + .GroundingMetadata.VideoMetadata> + videos_ = java.util.Collections.emptyList(); - private void ensureGroundingSupportIsMutable() { - if (!((bitField0_ & 0x00000010) != 0)) { - groundingSupport_ = + private void ensureVideosIsMutable() { + if (!((bitField0_ & 0x00000040) != 0)) { + videos_ = new java.util.ArrayList< com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse - .Candidate.GroundingMetadata.GroundingSupport>(groundingSupport_); - bitField0_ |= 0x00000010; + .Candidate.GroundingMetadata.VideoMetadata>(videos_); + bitField0_ |= 0x00000040; } } private com.google.protobuf.RepeatedFieldBuilder< com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate - .GroundingMetadata.GroundingSupport, + .GroundingMetadata.VideoMetadata, com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate - .GroundingMetadata.GroundingSupport.Builder, + .GroundingMetadata.VideoMetadata.Builder, com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate - .GroundingMetadata.GroundingSupportOrBuilder> - groundingSupportBuilder_; + .GroundingMetadata.VideoMetadataOrBuilder> + videosBuilder_; /** * * *
            -         * GroundingSupport across all claims in the answer candidate.
            -         * An support to a fact indicates that the claim is supported by
            -         * the fact.
            +         * Videos from the web search.
                      * 
            * * - * repeated .google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.GroundingSupport grounding_support = 2; + * repeated .google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.VideoMetadata videos = 11; * */ public java.util.List< com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate - .GroundingMetadata.GroundingSupport> - getGroundingSupportList() { - if (groundingSupportBuilder_ == null) { - return java.util.Collections.unmodifiableList(groundingSupport_); + .GroundingMetadata.VideoMetadata> + getVideosList() { + if (videosBuilder_ == null) { + return java.util.Collections.unmodifiableList(videos_); } else { - return groundingSupportBuilder_.getMessageList(); + return videosBuilder_.getMessageList(); } } @@ -8408,20 +14219,18 @@ private void ensureGroundingSupportIsMutable() { * * *
            -         * GroundingSupport across all claims in the answer candidate.
            -         * An support to a fact indicates that the claim is supported by
            -         * the fact.
            +         * Videos from the web search.
                      * 
            * * - * repeated .google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.GroundingSupport grounding_support = 2; + * repeated .google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.VideoMetadata videos = 11; * */ - public int getGroundingSupportCount() { - if (groundingSupportBuilder_ == null) { - return groundingSupport_.size(); + public int getVideosCount() { + if (videosBuilder_ == null) { + return videos_.size(); } else { - return groundingSupportBuilder_.getCount(); + return videosBuilder_.getCount(); } } @@ -8429,22 +14238,20 @@ public int getGroundingSupportCount() { * * *
            -         * GroundingSupport across all claims in the answer candidate.
            -         * An support to a fact indicates that the claim is supported by
            -         * the fact.
            +         * Videos from the web search.
                      * 
            * * - * repeated .google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.GroundingSupport grounding_support = 2; + * repeated .google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.VideoMetadata videos = 11; * */ public com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate - .GroundingMetadata.GroundingSupport - getGroundingSupport(int index) { - if (groundingSupportBuilder_ == null) { - return groundingSupport_.get(index); + .GroundingMetadata.VideoMetadata + getVideos(int index) { + if (videosBuilder_ == null) { + return videos_.get(index); } else { - return groundingSupportBuilder_.getMessage(index); + return videosBuilder_.getMessage(index); } } @@ -8452,29 +14259,27 @@ public int getGroundingSupportCount() { * * *
            -         * GroundingSupport across all claims in the answer candidate.
            -         * An support to a fact indicates that the claim is supported by
            -         * the fact.
            +         * Videos from the web search.
                      * 
            * * - * repeated .google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.GroundingSupport grounding_support = 2; + * repeated .google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.VideoMetadata videos = 11; * */ - public Builder setGroundingSupport( + public Builder setVideos( int index, com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate - .GroundingMetadata.GroundingSupport + .GroundingMetadata.VideoMetadata value) { - if (groundingSupportBuilder_ == null) { + if (videosBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - ensureGroundingSupportIsMutable(); - groundingSupport_.set(index, value); + ensureVideosIsMutable(); + videos_.set(index, value); onChanged(); } else { - groundingSupportBuilder_.setMessage(index, value); + videosBuilder_.setMessage(index, value); } return this; } @@ -8483,26 +14288,24 @@ public Builder setGroundingSupport( * * *
            -         * GroundingSupport across all claims in the answer candidate.
            -         * An support to a fact indicates that the claim is supported by
            -         * the fact.
            +         * Videos from the web search.
                      * 
            * * - * repeated .google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.GroundingSupport grounding_support = 2; + * repeated .google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.VideoMetadata videos = 11; * */ - public Builder setGroundingSupport( + public Builder setVideos( int index, com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate - .GroundingMetadata.GroundingSupport.Builder + .GroundingMetadata.VideoMetadata.Builder builderForValue) { - if (groundingSupportBuilder_ == null) { - ensureGroundingSupportIsMutable(); - groundingSupport_.set(index, builderForValue.build()); + if (videosBuilder_ == null) { + ensureVideosIsMutable(); + videos_.set(index, builderForValue.build()); onChanged(); } else { - groundingSupportBuilder_.setMessage(index, builderForValue.build()); + videosBuilder_.setMessage(index, builderForValue.build()); } return this; } @@ -8511,28 +14314,26 @@ public Builder setGroundingSupport( * * *
            -         * GroundingSupport across all claims in the answer candidate.
            -         * An support to a fact indicates that the claim is supported by
            -         * the fact.
            +         * Videos from the web search.
                      * 
            * * - * repeated .google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.GroundingSupport grounding_support = 2; + * repeated .google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.VideoMetadata videos = 11; * */ - public Builder addGroundingSupport( + public Builder addVideos( com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate - .GroundingMetadata.GroundingSupport + .GroundingMetadata.VideoMetadata value) { - if (groundingSupportBuilder_ == null) { + if (videosBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - ensureGroundingSupportIsMutable(); - groundingSupport_.add(value); + ensureVideosIsMutable(); + videos_.add(value); onChanged(); } else { - groundingSupportBuilder_.addMessage(value); + videosBuilder_.addMessage(value); } return this; } @@ -8541,29 +14342,27 @@ public Builder addGroundingSupport( * * *
            -         * GroundingSupport across all claims in the answer candidate.
            -         * An support to a fact indicates that the claim is supported by
            -         * the fact.
            +         * Videos from the web search.
                      * 
            * * - * repeated .google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.GroundingSupport grounding_support = 2; + * repeated .google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.VideoMetadata videos = 11; * */ - public Builder addGroundingSupport( + public Builder addVideos( int index, com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate - .GroundingMetadata.GroundingSupport + .GroundingMetadata.VideoMetadata value) { - if (groundingSupportBuilder_ == null) { + if (videosBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - ensureGroundingSupportIsMutable(); - groundingSupport_.add(index, value); + ensureVideosIsMutable(); + videos_.add(index, value); onChanged(); } else { - groundingSupportBuilder_.addMessage(index, value); + videosBuilder_.addMessage(index, value); } return this; } @@ -8572,25 +14371,23 @@ public Builder addGroundingSupport( * * *
            -         * GroundingSupport across all claims in the answer candidate.
            -         * An support to a fact indicates that the claim is supported by
            -         * the fact.
            +         * Videos from the web search.
                      * 
            * * - * repeated .google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.GroundingSupport grounding_support = 2; + * repeated .google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.VideoMetadata videos = 11; * */ - public Builder addGroundingSupport( + public Builder addVideos( com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate - .GroundingMetadata.GroundingSupport.Builder + .GroundingMetadata.VideoMetadata.Builder builderForValue) { - if (groundingSupportBuilder_ == null) { - ensureGroundingSupportIsMutable(); - groundingSupport_.add(builderForValue.build()); + if (videosBuilder_ == null) { + ensureVideosIsMutable(); + videos_.add(builderForValue.build()); onChanged(); } else { - groundingSupportBuilder_.addMessage(builderForValue.build()); + videosBuilder_.addMessage(builderForValue.build()); } return this; } @@ -8599,26 +14396,24 @@ public Builder addGroundingSupport( * * *
            -         * GroundingSupport across all claims in the answer candidate.
            -         * An support to a fact indicates that the claim is supported by
            -         * the fact.
            +         * Videos from the web search.
                      * 
            * * - * repeated .google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.GroundingSupport grounding_support = 2; + * repeated .google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.VideoMetadata videos = 11; * */ - public Builder addGroundingSupport( + public Builder addVideos( int index, com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate - .GroundingMetadata.GroundingSupport.Builder + .GroundingMetadata.VideoMetadata.Builder builderForValue) { - if (groundingSupportBuilder_ == null) { - ensureGroundingSupportIsMutable(); - groundingSupport_.add(index, builderForValue.build()); + if (videosBuilder_ == null) { + ensureVideosIsMutable(); + videos_.add(index, builderForValue.build()); onChanged(); } else { - groundingSupportBuilder_.addMessage(index, builderForValue.build()); + videosBuilder_.addMessage(index, builderForValue.build()); } return this; } @@ -8627,27 +14422,25 @@ public Builder addGroundingSupport( * * *
            -         * GroundingSupport across all claims in the answer candidate.
            -         * An support to a fact indicates that the claim is supported by
            -         * the fact.
            +         * Videos from the web search.
                      * 
            * * - * repeated .google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.GroundingSupport grounding_support = 2; + * repeated .google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.VideoMetadata videos = 11; * */ - public Builder addAllGroundingSupport( + public Builder addAllVideos( java.lang.Iterable< ? extends com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse - .Candidate.GroundingMetadata.GroundingSupport> + .Candidate.GroundingMetadata.VideoMetadata> values) { - if (groundingSupportBuilder_ == null) { - ensureGroundingSupportIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, groundingSupport_); + if (videosBuilder_ == null) { + ensureVideosIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, videos_); onChanged(); } else { - groundingSupportBuilder_.addAllMessages(values); + videosBuilder_.addAllMessages(values); } return this; } @@ -8656,22 +14449,20 @@ public Builder addAllGroundingSupport( * * *
            -         * GroundingSupport across all claims in the answer candidate.
            -         * An support to a fact indicates that the claim is supported by
            -         * the fact.
            +         * Videos from the web search.
                      * 
            * * - * repeated .google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.GroundingSupport grounding_support = 2; + * repeated .google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.VideoMetadata videos = 11; * */ - public Builder clearGroundingSupport() { - if (groundingSupportBuilder_ == null) { - groundingSupport_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000010); + public Builder clearVideos() { + if (videosBuilder_ == null) { + videos_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000040); onChanged(); } else { - groundingSupportBuilder_.clear(); + videosBuilder_.clear(); } return this; } @@ -8680,22 +14471,20 @@ public Builder clearGroundingSupport() { * * *
            -         * GroundingSupport across all claims in the answer candidate.
            -         * An support to a fact indicates that the claim is supported by
            -         * the fact.
            +         * Videos from the web search.
                      * 
            * * - * repeated .google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.GroundingSupport grounding_support = 2; + * repeated .google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.VideoMetadata videos = 11; * */ - public Builder removeGroundingSupport(int index) { - if (groundingSupportBuilder_ == null) { - ensureGroundingSupportIsMutable(); - groundingSupport_.remove(index); + public Builder removeVideos(int index) { + if (videosBuilder_ == null) { + ensureVideosIsMutable(); + videos_.remove(index); onChanged(); } else { - groundingSupportBuilder_.remove(index); + videosBuilder_.remove(index); } return this; } @@ -8704,41 +14493,37 @@ public Builder removeGroundingSupport(int index) { * * *
            -         * GroundingSupport across all claims in the answer candidate.
            -         * An support to a fact indicates that the claim is supported by
            -         * the fact.
            +         * Videos from the web search.
                      * 
            * * - * repeated .google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.GroundingSupport grounding_support = 2; + * repeated .google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.VideoMetadata videos = 11; * */ public com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate - .GroundingMetadata.GroundingSupport.Builder - getGroundingSupportBuilder(int index) { - return internalGetGroundingSupportFieldBuilder().getBuilder(index); + .GroundingMetadata.VideoMetadata.Builder + getVideosBuilder(int index) { + return internalGetVideosFieldBuilder().getBuilder(index); } /** * * *
            -         * GroundingSupport across all claims in the answer candidate.
            -         * An support to a fact indicates that the claim is supported by
            -         * the fact.
            +         * Videos from the web search.
                      * 
            * * - * repeated .google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.GroundingSupport grounding_support = 2; + * repeated .google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.VideoMetadata videos = 11; * */ public com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate - .GroundingMetadata.GroundingSupportOrBuilder - getGroundingSupportOrBuilder(int index) { - if (groundingSupportBuilder_ == null) { - return groundingSupport_.get(index); + .GroundingMetadata.VideoMetadataOrBuilder + getVideosOrBuilder(int index) { + if (videosBuilder_ == null) { + return videos_.get(index); } else { - return groundingSupportBuilder_.getMessageOrBuilder(index); + return videosBuilder_.getMessageOrBuilder(index); } } @@ -8746,24 +14531,22 @@ public Builder removeGroundingSupport(int index) { * * *
            -         * GroundingSupport across all claims in the answer candidate.
            -         * An support to a fact indicates that the claim is supported by
            -         * the fact.
            +         * Videos from the web search.
                      * 
            * * - * repeated .google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.GroundingSupport grounding_support = 2; + * repeated .google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.VideoMetadata videos = 11; * */ public java.util.List< ? extends com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse - .Candidate.GroundingMetadata.GroundingSupportOrBuilder> - getGroundingSupportOrBuilderList() { - if (groundingSupportBuilder_ != null) { - return groundingSupportBuilder_.getMessageOrBuilderList(); + .Candidate.GroundingMetadata.VideoMetadataOrBuilder> + getVideosOrBuilderList() { + if (videosBuilder_ != null) { + return videosBuilder_.getMessageOrBuilderList(); } else { - return java.util.Collections.unmodifiableList(groundingSupport_); + return java.util.Collections.unmodifiableList(videos_); } } @@ -8771,91 +14554,82 @@ public Builder removeGroundingSupport(int index) { * * *
            -         * GroundingSupport across all claims in the answer candidate.
            -         * An support to a fact indicates that the claim is supported by
            -         * the fact.
            +         * Videos from the web search.
                      * 
            * * - * repeated .google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.GroundingSupport grounding_support = 2; + * repeated .google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.VideoMetadata videos = 11; * */ public com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate - .GroundingMetadata.GroundingSupport.Builder - addGroundingSupportBuilder() { - return internalGetGroundingSupportFieldBuilder() + .GroundingMetadata.VideoMetadata.Builder + addVideosBuilder() { + return internalGetVideosFieldBuilder() .addBuilder( com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate - .GroundingMetadata.GroundingSupport.getDefaultInstance()); + .GroundingMetadata.VideoMetadata.getDefaultInstance()); } /** * * *
            -         * GroundingSupport across all claims in the answer candidate.
            -         * An support to a fact indicates that the claim is supported by
            -         * the fact.
            +         * Videos from the web search.
                      * 
            * * - * repeated .google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.GroundingSupport grounding_support = 2; + * repeated .google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.VideoMetadata videos = 11; * */ public com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate - .GroundingMetadata.GroundingSupport.Builder - addGroundingSupportBuilder(int index) { - return internalGetGroundingSupportFieldBuilder() + .GroundingMetadata.VideoMetadata.Builder + addVideosBuilder(int index) { + return internalGetVideosFieldBuilder() .addBuilder( index, com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate - .GroundingMetadata.GroundingSupport.getDefaultInstance()); + .GroundingMetadata.VideoMetadata.getDefaultInstance()); } /** * * *
            -         * GroundingSupport across all claims in the answer candidate.
            -         * An support to a fact indicates that the claim is supported by
            -         * the fact.
            +         * Videos from the web search.
                      * 
            * * - * repeated .google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.GroundingSupport grounding_support = 2; + * repeated .google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.VideoMetadata videos = 11; * */ public java.util.List< com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate - .GroundingMetadata.GroundingSupport.Builder> - getGroundingSupportBuilderList() { - return internalGetGroundingSupportFieldBuilder().getBuilderList(); + .GroundingMetadata.VideoMetadata.Builder> + getVideosBuilderList() { + return internalGetVideosFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilder< com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate - .GroundingMetadata.GroundingSupport, + .GroundingMetadata.VideoMetadata, com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate - .GroundingMetadata.GroundingSupport.Builder, + .GroundingMetadata.VideoMetadata.Builder, com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate - .GroundingMetadata.GroundingSupportOrBuilder> - internalGetGroundingSupportFieldBuilder() { - if (groundingSupportBuilder_ == null) { - groundingSupportBuilder_ = + .GroundingMetadata.VideoMetadataOrBuilder> + internalGetVideosFieldBuilder() { + if (videosBuilder_ == null) { + videosBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse - .Candidate.GroundingMetadata.GroundingSupport, + .Candidate.GroundingMetadata.VideoMetadata, com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse - .Candidate.GroundingMetadata.GroundingSupport.Builder, + .Candidate.GroundingMetadata.VideoMetadata.Builder, com.google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse - .Candidate.GroundingMetadata.GroundingSupportOrBuilder>( - groundingSupport_, - ((bitField0_ & 0x00000010) != 0), - getParentForChildren(), - isClean()); - groundingSupport_ = null; + .Candidate.GroundingMetadata.VideoMetadataOrBuilder>( + videos_, ((bitField0_ & 0x00000040) != 0), getParentForChildren(), isClean()); + videos_ = null; } - return groundingSupportBuilder_; + return videosBuilder_; } // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMetadata) diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/GetAclConfigRequest.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/GetAclConfigRequest.java new file mode 100644 index 000000000000..4dbdadf1bd91 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/GetAclConfigRequest.java @@ -0,0 +1,653 @@ +/* + * 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/cloud/discoveryengine/v1beta/acl_config_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.discoveryengine.v1beta; + +/** + * + * + *
            + * Request message for GetAclConfigRequest method.
            + * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.GetAclConfigRequest} + */ +@com.google.protobuf.Generated +public final class GetAclConfigRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.GetAclConfigRequest) + GetAclConfigRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "GetAclConfigRequest"); + } + + // Use GetAclConfigRequest.newBuilder() to construct. + private GetAclConfigRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private GetAclConfigRequest() { + name_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.AclConfigServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_GetAclConfigRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.AclConfigServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_GetAclConfigRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.GetAclConfigRequest.class, + com.google.cloud.discoveryengine.v1beta.GetAclConfigRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
            +   * Required. Resource name of
            +   * [AclConfig][google.cloud.discoveryengine.v1beta.AclConfig], such as
            +   * `projects/*/locations/*/aclConfig`.
            +   *
            +   * If the caller does not have permission to access the
            +   * [AclConfig][google.cloud.discoveryengine.v1beta.AclConfig], regardless of
            +   * whether or not it exists, a PERMISSION_DENIED error is returned.
            +   * 
            + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + 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(); + name_ = s; + return s; + } + } + + /** + * + * + *
            +   * Required. Resource name of
            +   * [AclConfig][google.cloud.discoveryengine.v1beta.AclConfig], such as
            +   * `projects/*/locations/*/aclConfig`.
            +   *
            +   * If the caller does not have permission to access the
            +   * [AclConfig][google.cloud.discoveryengine.v1beta.AclConfig], regardless of
            +   * whether or not it exists, a PERMISSION_DENIED error is returned.
            +   * 
            + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = 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 { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + 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(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + 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.discoveryengine.v1beta.GetAclConfigRequest)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1beta.GetAclConfigRequest other = + (com.google.cloud.discoveryengine.v1beta.GetAclConfigRequest) obj; + + if (!getName().equals(other.getName())) 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) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1beta.GetAclConfigRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.GetAclConfigRequest 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.discoveryengine.v1beta.GetAclConfigRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.GetAclConfigRequest 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.discoveryengine.v1beta.GetAclConfigRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.GetAclConfigRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1beta.GetAclConfigRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.GetAclConfigRequest 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.discoveryengine.v1beta.GetAclConfigRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.GetAclConfigRequest 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.discoveryengine.v1beta.GetAclConfigRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.GetAclConfigRequest 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.discoveryengine.v1beta.GetAclConfigRequest 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 GetAclConfigRequest method.
            +   * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.GetAclConfigRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.GetAclConfigRequest) + com.google.cloud.discoveryengine.v1beta.GetAclConfigRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.AclConfigServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_GetAclConfigRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.AclConfigServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_GetAclConfigRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.GetAclConfigRequest.class, + com.google.cloud.discoveryengine.v1beta.GetAclConfigRequest.Builder.class); + } + + // Construct using com.google.cloud.discoveryengine.v1beta.GetAclConfigRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1beta.AclConfigServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_GetAclConfigRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.GetAclConfigRequest getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1beta.GetAclConfigRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.GetAclConfigRequest build() { + com.google.cloud.discoveryengine.v1beta.GetAclConfigRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.GetAclConfigRequest buildPartial() { + com.google.cloud.discoveryengine.v1beta.GetAclConfigRequest result = + new com.google.cloud.discoveryengine.v1beta.GetAclConfigRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.discoveryengine.v1beta.GetAclConfigRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.discoveryengine.v1beta.GetAclConfigRequest) { + return mergeFrom((com.google.cloud.discoveryengine.v1beta.GetAclConfigRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.discoveryengine.v1beta.GetAclConfigRequest other) { + if (other == com.google.cloud.discoveryengine.v1beta.GetAclConfigRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + + /** + * + * + *
            +     * Required. Resource name of
            +     * [AclConfig][google.cloud.discoveryengine.v1beta.AclConfig], such as
            +     * `projects/*/locations/*/aclConfig`.
            +     *
            +     * If the caller does not have permission to access the
            +     * [AclConfig][google.cloud.discoveryengine.v1beta.AclConfig], regardless of
            +     * whether or not it exists, a PERMISSION_DENIED error is returned.
            +     * 
            + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
            +     * Required. Resource name of
            +     * [AclConfig][google.cloud.discoveryengine.v1beta.AclConfig], such as
            +     * `projects/*/locations/*/aclConfig`.
            +     *
            +     * If the caller does not have permission to access the
            +     * [AclConfig][google.cloud.discoveryengine.v1beta.AclConfig], regardless of
            +     * whether or not it exists, a PERMISSION_DENIED error is returned.
            +     * 
            + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
            +     * Required. Resource name of
            +     * [AclConfig][google.cloud.discoveryengine.v1beta.AclConfig], such as
            +     * `projects/*/locations/*/aclConfig`.
            +     *
            +     * If the caller does not have permission to access the
            +     * [AclConfig][google.cloud.discoveryengine.v1beta.AclConfig], regardless of
            +     * whether or not it exists, a PERMISSION_DENIED error is returned.
            +     * 
            + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Required. Resource name of
            +     * [AclConfig][google.cloud.discoveryengine.v1beta.AclConfig], such as
            +     * `projects/*/locations/*/aclConfig`.
            +     *
            +     * If the caller does not have permission to access the
            +     * [AclConfig][google.cloud.discoveryengine.v1beta.AclConfig], regardless of
            +     * whether or not it exists, a PERMISSION_DENIED error is returned.
            +     * 
            + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
            +     * Required. Resource name of
            +     * [AclConfig][google.cloud.discoveryengine.v1beta.AclConfig], such as
            +     * `projects/*/locations/*/aclConfig`.
            +     *
            +     * If the caller does not have permission to access the
            +     * [AclConfig][google.cloud.discoveryengine.v1beta.AclConfig], regardless of
            +     * whether or not it exists, a PERMISSION_DENIED error is returned.
            +     * 
            + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.GetAclConfigRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.GetAclConfigRequest) + private static final com.google.cloud.discoveryengine.v1beta.GetAclConfigRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.discoveryengine.v1beta.GetAclConfigRequest(); + } + + public static com.google.cloud.discoveryengine.v1beta.GetAclConfigRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetAclConfigRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.GetAclConfigRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/GetAclConfigRequestOrBuilder.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/GetAclConfigRequestOrBuilder.java new file mode 100644 index 000000000000..8d52edb0e8b9 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/GetAclConfigRequestOrBuilder.java @@ -0,0 +1,70 @@ +/* + * 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/cloud/discoveryengine/v1beta/acl_config_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.discoveryengine.v1beta; + +@com.google.protobuf.Generated +public interface GetAclConfigRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.GetAclConfigRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
            +   * Required. Resource name of
            +   * [AclConfig][google.cloud.discoveryengine.v1beta.AclConfig], such as
            +   * `projects/*/locations/*/aclConfig`.
            +   *
            +   * If the caller does not have permission to access the
            +   * [AclConfig][google.cloud.discoveryengine.v1beta.AclConfig], regardless of
            +   * whether or not it exists, a PERMISSION_DENIED error is returned.
            +   * 
            + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
            +   * Required. Resource name of
            +   * [AclConfig][google.cloud.discoveryengine.v1beta.AclConfig], such as
            +   * `projects/*/locations/*/aclConfig`.
            +   *
            +   * If the caller does not have permission to access the
            +   * [AclConfig][google.cloud.discoveryengine.v1beta.AclConfig], regardless of
            +   * whether or not it exists, a PERMISSION_DENIED error is returned.
            +   * 
            + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/GetAssistantRequest.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/GetAssistantRequest.java new file mode 100644 index 000000000000..0d3761709804 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/GetAssistantRequest.java @@ -0,0 +1,629 @@ +/* + * 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/cloud/discoveryengine/v1beta/assistant_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.discoveryengine.v1beta; + +/** + * + * + *
            + * Request message for the
            + * [AssistantService.GetAssistant][google.cloud.discoveryengine.v1beta.AssistantService.GetAssistant]
            + * method.
            + * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.GetAssistantRequest} + */ +@com.google.protobuf.Generated +public final class GetAssistantRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.GetAssistantRequest) + GetAssistantRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "GetAssistantRequest"); + } + + // Use GetAssistantRequest.newBuilder() to construct. + private GetAssistantRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private GetAssistantRequest() { + name_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.AssistantServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_GetAssistantRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.AssistantServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_GetAssistantRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.GetAssistantRequest.class, + com.google.cloud.discoveryengine.v1beta.GetAssistantRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
            +   * Required. Resource name of
            +   * [Assistant][google.cloud.discoveryengine.v1beta.Assistant]. Format:
            +   * `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/assistants/{assistant}`
            +   * 
            + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + 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(); + name_ = s; + return s; + } + } + + /** + * + * + *
            +   * Required. Resource name of
            +   * [Assistant][google.cloud.discoveryengine.v1beta.Assistant]. Format:
            +   * `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/assistants/{assistant}`
            +   * 
            + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = 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 { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + 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(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + 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.discoveryengine.v1beta.GetAssistantRequest)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1beta.GetAssistantRequest other = + (com.google.cloud.discoveryengine.v1beta.GetAssistantRequest) obj; + + if (!getName().equals(other.getName())) 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) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1beta.GetAssistantRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.GetAssistantRequest 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.discoveryengine.v1beta.GetAssistantRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.GetAssistantRequest 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.discoveryengine.v1beta.GetAssistantRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.GetAssistantRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1beta.GetAssistantRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.GetAssistantRequest 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.discoveryengine.v1beta.GetAssistantRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.GetAssistantRequest 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.discoveryengine.v1beta.GetAssistantRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.GetAssistantRequest 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.discoveryengine.v1beta.GetAssistantRequest 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 the
            +   * [AssistantService.GetAssistant][google.cloud.discoveryengine.v1beta.AssistantService.GetAssistant]
            +   * method.
            +   * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.GetAssistantRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.GetAssistantRequest) + com.google.cloud.discoveryengine.v1beta.GetAssistantRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.AssistantServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_GetAssistantRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.AssistantServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_GetAssistantRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.GetAssistantRequest.class, + com.google.cloud.discoveryengine.v1beta.GetAssistantRequest.Builder.class); + } + + // Construct using com.google.cloud.discoveryengine.v1beta.GetAssistantRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1beta.AssistantServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_GetAssistantRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.GetAssistantRequest getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1beta.GetAssistantRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.GetAssistantRequest build() { + com.google.cloud.discoveryengine.v1beta.GetAssistantRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.GetAssistantRequest buildPartial() { + com.google.cloud.discoveryengine.v1beta.GetAssistantRequest result = + new com.google.cloud.discoveryengine.v1beta.GetAssistantRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.discoveryengine.v1beta.GetAssistantRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.discoveryengine.v1beta.GetAssistantRequest) { + return mergeFrom((com.google.cloud.discoveryengine.v1beta.GetAssistantRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.discoveryengine.v1beta.GetAssistantRequest other) { + if (other == com.google.cloud.discoveryengine.v1beta.GetAssistantRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + + /** + * + * + *
            +     * Required. Resource name of
            +     * [Assistant][google.cloud.discoveryengine.v1beta.Assistant]. Format:
            +     * `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/assistants/{assistant}`
            +     * 
            + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
            +     * Required. Resource name of
            +     * [Assistant][google.cloud.discoveryengine.v1beta.Assistant]. Format:
            +     * `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/assistants/{assistant}`
            +     * 
            + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
            +     * Required. Resource name of
            +     * [Assistant][google.cloud.discoveryengine.v1beta.Assistant]. Format:
            +     * `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/assistants/{assistant}`
            +     * 
            + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Required. Resource name of
            +     * [Assistant][google.cloud.discoveryengine.v1beta.Assistant]. Format:
            +     * `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/assistants/{assistant}`
            +     * 
            + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
            +     * Required. Resource name of
            +     * [Assistant][google.cloud.discoveryengine.v1beta.Assistant]. Format:
            +     * `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/assistants/{assistant}`
            +     * 
            + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.GetAssistantRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.GetAssistantRequest) + private static final com.google.cloud.discoveryengine.v1beta.GetAssistantRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.discoveryengine.v1beta.GetAssistantRequest(); + } + + public static com.google.cloud.discoveryengine.v1beta.GetAssistantRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetAssistantRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.GetAssistantRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/GetAssistantRequestOrBuilder.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/GetAssistantRequestOrBuilder.java new file mode 100644 index 000000000000..f71249cdee10 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/GetAssistantRequestOrBuilder.java @@ -0,0 +1,62 @@ +/* + * 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/cloud/discoveryengine/v1beta/assistant_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.discoveryengine.v1beta; + +@com.google.protobuf.Generated +public interface GetAssistantRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.GetAssistantRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
            +   * Required. Resource name of
            +   * [Assistant][google.cloud.discoveryengine.v1beta.Assistant]. Format:
            +   * `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/assistants/{assistant}`
            +   * 
            + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
            +   * Required. Resource name of
            +   * [Assistant][google.cloud.discoveryengine.v1beta.Assistant]. Format:
            +   * `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/assistants/{assistant}`
            +   * 
            + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/GetCmekConfigRequest.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/GetCmekConfigRequest.java new file mode 100644 index 000000000000..91eb2d6359a6 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/GetCmekConfigRequest.java @@ -0,0 +1,664 @@ +/* + * 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/cloud/discoveryengine/v1beta/cmek_config_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.discoveryengine.v1beta; + +/** + * + * + *
            + * Request message for GetCmekConfigRequest method.
            + * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.GetCmekConfigRequest} + */ +@com.google.protobuf.Generated +public final class GetCmekConfigRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.GetCmekConfigRequest) + GetCmekConfigRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "GetCmekConfigRequest"); + } + + // Use GetCmekConfigRequest.newBuilder() to construct. + private GetCmekConfigRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private GetCmekConfigRequest() { + name_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.CmekConfigServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_GetCmekConfigRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.CmekConfigServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_GetCmekConfigRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.GetCmekConfigRequest.class, + com.google.cloud.discoveryengine.v1beta.GetCmekConfigRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
            +   * Required. Resource name of
            +   * [CmekConfig][google.cloud.discoveryengine.v1beta.CmekConfig], such as
            +   * `projects/*/locations/*/cmekConfig` or
            +   * `projects/*/locations/*/cmekConfigs/*`.
            +   *
            +   * If the caller does not have permission to access the
            +   * [CmekConfig][google.cloud.discoveryengine.v1beta.CmekConfig], regardless of
            +   * whether or not it exists, a PERMISSION_DENIED error is returned.
            +   * 
            + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + 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(); + name_ = s; + return s; + } + } + + /** + * + * + *
            +   * Required. Resource name of
            +   * [CmekConfig][google.cloud.discoveryengine.v1beta.CmekConfig], such as
            +   * `projects/*/locations/*/cmekConfig` or
            +   * `projects/*/locations/*/cmekConfigs/*`.
            +   *
            +   * If the caller does not have permission to access the
            +   * [CmekConfig][google.cloud.discoveryengine.v1beta.CmekConfig], regardless of
            +   * whether or not it exists, a PERMISSION_DENIED error is returned.
            +   * 
            + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = 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 { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + 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(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + 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.discoveryengine.v1beta.GetCmekConfigRequest)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1beta.GetCmekConfigRequest other = + (com.google.cloud.discoveryengine.v1beta.GetCmekConfigRequest) obj; + + if (!getName().equals(other.getName())) 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) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1beta.GetCmekConfigRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.GetCmekConfigRequest 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.discoveryengine.v1beta.GetCmekConfigRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.GetCmekConfigRequest 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.discoveryengine.v1beta.GetCmekConfigRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.GetCmekConfigRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1beta.GetCmekConfigRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.GetCmekConfigRequest 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.discoveryengine.v1beta.GetCmekConfigRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.GetCmekConfigRequest 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.discoveryengine.v1beta.GetCmekConfigRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.GetCmekConfigRequest 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.discoveryengine.v1beta.GetCmekConfigRequest 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 GetCmekConfigRequest method.
            +   * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.GetCmekConfigRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.GetCmekConfigRequest) + com.google.cloud.discoveryengine.v1beta.GetCmekConfigRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.CmekConfigServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_GetCmekConfigRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.CmekConfigServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_GetCmekConfigRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.GetCmekConfigRequest.class, + com.google.cloud.discoveryengine.v1beta.GetCmekConfigRequest.Builder.class); + } + + // Construct using com.google.cloud.discoveryengine.v1beta.GetCmekConfigRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1beta.CmekConfigServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_GetCmekConfigRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.GetCmekConfigRequest + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1beta.GetCmekConfigRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.GetCmekConfigRequest build() { + com.google.cloud.discoveryengine.v1beta.GetCmekConfigRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.GetCmekConfigRequest buildPartial() { + com.google.cloud.discoveryengine.v1beta.GetCmekConfigRequest result = + new com.google.cloud.discoveryengine.v1beta.GetCmekConfigRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.discoveryengine.v1beta.GetCmekConfigRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.discoveryengine.v1beta.GetCmekConfigRequest) { + return mergeFrom((com.google.cloud.discoveryengine.v1beta.GetCmekConfigRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.discoveryengine.v1beta.GetCmekConfigRequest other) { + if (other + == com.google.cloud.discoveryengine.v1beta.GetCmekConfigRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + + /** + * + * + *
            +     * Required. Resource name of
            +     * [CmekConfig][google.cloud.discoveryengine.v1beta.CmekConfig], such as
            +     * `projects/*/locations/*/cmekConfig` or
            +     * `projects/*/locations/*/cmekConfigs/*`.
            +     *
            +     * If the caller does not have permission to access the
            +     * [CmekConfig][google.cloud.discoveryengine.v1beta.CmekConfig], regardless of
            +     * whether or not it exists, a PERMISSION_DENIED error is returned.
            +     * 
            + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
            +     * Required. Resource name of
            +     * [CmekConfig][google.cloud.discoveryengine.v1beta.CmekConfig], such as
            +     * `projects/*/locations/*/cmekConfig` or
            +     * `projects/*/locations/*/cmekConfigs/*`.
            +     *
            +     * If the caller does not have permission to access the
            +     * [CmekConfig][google.cloud.discoveryengine.v1beta.CmekConfig], regardless of
            +     * whether or not it exists, a PERMISSION_DENIED error is returned.
            +     * 
            + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
            +     * Required. Resource name of
            +     * [CmekConfig][google.cloud.discoveryengine.v1beta.CmekConfig], such as
            +     * `projects/*/locations/*/cmekConfig` or
            +     * `projects/*/locations/*/cmekConfigs/*`.
            +     *
            +     * If the caller does not have permission to access the
            +     * [CmekConfig][google.cloud.discoveryengine.v1beta.CmekConfig], regardless of
            +     * whether or not it exists, a PERMISSION_DENIED error is returned.
            +     * 
            + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Required. Resource name of
            +     * [CmekConfig][google.cloud.discoveryengine.v1beta.CmekConfig], such as
            +     * `projects/*/locations/*/cmekConfig` or
            +     * `projects/*/locations/*/cmekConfigs/*`.
            +     *
            +     * If the caller does not have permission to access the
            +     * [CmekConfig][google.cloud.discoveryengine.v1beta.CmekConfig], regardless of
            +     * whether or not it exists, a PERMISSION_DENIED error is returned.
            +     * 
            + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
            +     * Required. Resource name of
            +     * [CmekConfig][google.cloud.discoveryengine.v1beta.CmekConfig], such as
            +     * `projects/*/locations/*/cmekConfig` or
            +     * `projects/*/locations/*/cmekConfigs/*`.
            +     *
            +     * If the caller does not have permission to access the
            +     * [CmekConfig][google.cloud.discoveryengine.v1beta.CmekConfig], regardless of
            +     * whether or not it exists, a PERMISSION_DENIED error is returned.
            +     * 
            + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.GetCmekConfigRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.GetCmekConfigRequest) + private static final com.google.cloud.discoveryengine.v1beta.GetCmekConfigRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.discoveryengine.v1beta.GetCmekConfigRequest(); + } + + public static com.google.cloud.discoveryengine.v1beta.GetCmekConfigRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetCmekConfigRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.GetCmekConfigRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/GetCmekConfigRequestOrBuilder.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/GetCmekConfigRequestOrBuilder.java new file mode 100644 index 000000000000..0d27186d28bb --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/GetCmekConfigRequestOrBuilder.java @@ -0,0 +1,72 @@ +/* + * 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/cloud/discoveryengine/v1beta/cmek_config_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.discoveryengine.v1beta; + +@com.google.protobuf.Generated +public interface GetCmekConfigRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.GetCmekConfigRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
            +   * Required. Resource name of
            +   * [CmekConfig][google.cloud.discoveryengine.v1beta.CmekConfig], such as
            +   * `projects/*/locations/*/cmekConfig` or
            +   * `projects/*/locations/*/cmekConfigs/*`.
            +   *
            +   * If the caller does not have permission to access the
            +   * [CmekConfig][google.cloud.discoveryengine.v1beta.CmekConfig], regardless of
            +   * whether or not it exists, a PERMISSION_DENIED error is returned.
            +   * 
            + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
            +   * Required. Resource name of
            +   * [CmekConfig][google.cloud.discoveryengine.v1beta.CmekConfig], such as
            +   * `projects/*/locations/*/cmekConfig` or
            +   * `projects/*/locations/*/cmekConfigs/*`.
            +   *
            +   * If the caller does not have permission to access the
            +   * [CmekConfig][google.cloud.discoveryengine.v1beta.CmekConfig], regardless of
            +   * whether or not it exists, a PERMISSION_DENIED error is returned.
            +   * 
            + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/java-oracledatabase/proto-google-cloud-oracledatabase-v1/src/main/java/com/google/cloud/oracledatabase/v1/GetGoldengateDeploymentTypeRequest.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/GetIdentityMappingStoreRequest.java similarity index 66% rename from java-oracledatabase/proto-google-cloud-oracledatabase-v1/src/main/java/com/google/cloud/oracledatabase/v1/GetGoldengateDeploymentTypeRequest.java rename to java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/GetIdentityMappingStoreRequest.java index d4f34d5b82d1..ed95d9d94d09 100644 --- a/java-oracledatabase/proto-google-cloud-oracledatabase-v1/src/main/java/com/google/cloud/oracledatabase/v1/GetGoldengateDeploymentTypeRequest.java +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/GetIdentityMappingStoreRequest.java @@ -15,25 +15,26 @@ */ // Generated by the protocol buffer compiler. DO NOT EDIT! // NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/oracledatabase/v1/goldengate_deployment_type.proto +// source: google/cloud/discoveryengine/v1beta/identity_mapping_store_service.proto // Protobuf Java Version: 4.33.2 -package com.google.cloud.oracledatabase.v1; +package com.google.cloud.discoveryengine.v1beta; /** * * *
            - * Message for getting a GoldengateDeploymentType.
            + * Request message for
            + * [IdentityMappingStoreService.GetIdentityMappingStore][google.cloud.discoveryengine.v1beta.IdentityMappingStoreService.GetIdentityMappingStore]
              * 
            * - * Protobuf type {@code google.cloud.oracledatabase.v1.GetGoldengateDeploymentTypeRequest} + * Protobuf type {@code google.cloud.discoveryengine.v1beta.GetIdentityMappingStoreRequest} */ @com.google.protobuf.Generated -public final class GetGoldengateDeploymentTypeRequest extends com.google.protobuf.GeneratedMessage +public final class GetIdentityMappingStoreRequest extends com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:google.cloud.oracledatabase.v1.GetGoldengateDeploymentTypeRequest) - GetGoldengateDeploymentTypeRequestOrBuilder { + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.GetIdentityMappingStoreRequest) + GetIdentityMappingStoreRequestOrBuilder { private static final long serialVersionUID = 0L; static { @@ -43,32 +44,31 @@ public final class GetGoldengateDeploymentTypeRequest extends com.google.protobu /* minor= */ 33, /* patch= */ 2, /* suffix= */ "", - "GetGoldengateDeploymentTypeRequest"); + "GetIdentityMappingStoreRequest"); } - // Use GetGoldengateDeploymentTypeRequest.newBuilder() to construct. - private GetGoldengateDeploymentTypeRequest( - com.google.protobuf.GeneratedMessage.Builder builder) { + // Use GetIdentityMappingStoreRequest.newBuilder() to construct. + private GetIdentityMappingStoreRequest(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } - private GetGoldengateDeploymentTypeRequest() { + private GetIdentityMappingStoreRequest() { name_ = ""; } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.oracledatabase.v1.GoldengateDeploymentTypeProto - .internal_static_google_cloud_oracledatabase_v1_GetGoldengateDeploymentTypeRequest_descriptor; + return com.google.cloud.discoveryengine.v1beta.IdentityMappingStoreServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_GetIdentityMappingStoreRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.oracledatabase.v1.GoldengateDeploymentTypeProto - .internal_static_google_cloud_oracledatabase_v1_GetGoldengateDeploymentTypeRequest_fieldAccessorTable + return com.google.cloud.discoveryengine.v1beta.IdentityMappingStoreServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_GetIdentityMappingStoreRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.oracledatabase.v1.GetGoldengateDeploymentTypeRequest.class, - com.google.cloud.oracledatabase.v1.GetGoldengateDeploymentTypeRequest.Builder.class); + com.google.cloud.discoveryengine.v1beta.GetIdentityMappingStoreRequest.class, + com.google.cloud.discoveryengine.v1beta.GetIdentityMappingStoreRequest.Builder.class); } public static final int NAME_FIELD_NUMBER = 1; @@ -80,9 +80,9 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * *
            -   * Required. The name of the GoldengateDeploymentType to retrieve.
            +   * Required. The name of the Identity Mapping Store to get.
                * Format:
            -   * projects/{project}/locations/{location}/goldengateDeploymentTypes/{goldengate_deployment_type}
            +   * `projects/{project}/locations/{location}/identityMappingStores/{identityMappingStore}`
                * 
            * * @@ -108,9 +108,9 @@ public java.lang.String getName() { * * *
            -   * Required. The name of the GoldengateDeploymentType to retrieve.
            +   * Required. The name of the Identity Mapping Store to get.
                * Format:
            -   * projects/{project}/locations/{location}/goldengateDeploymentTypes/{goldengate_deployment_type}
            +   * `projects/{project}/locations/{location}/identityMappingStores/{identityMappingStore}`
                * 
            * * @@ -171,11 +171,11 @@ public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } - if (!(obj instanceof com.google.cloud.oracledatabase.v1.GetGoldengateDeploymentTypeRequest)) { + if (!(obj instanceof com.google.cloud.discoveryengine.v1beta.GetIdentityMappingStoreRequest)) { return super.equals(obj); } - com.google.cloud.oracledatabase.v1.GetGoldengateDeploymentTypeRequest other = - (com.google.cloud.oracledatabase.v1.GetGoldengateDeploymentTypeRequest) obj; + com.google.cloud.discoveryengine.v1beta.GetIdentityMappingStoreRequest other = + (com.google.cloud.discoveryengine.v1beta.GetIdentityMappingStoreRequest) obj; if (!getName().equals(other.getName())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; @@ -196,59 +196,59 @@ public int hashCode() { return hash; } - public static com.google.cloud.oracledatabase.v1.GetGoldengateDeploymentTypeRequest parseFrom( + public static com.google.cloud.discoveryengine.v1beta.GetIdentityMappingStoreRequest parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.oracledatabase.v1.GetGoldengateDeploymentTypeRequest parseFrom( + public static com.google.cloud.discoveryengine.v1beta.GetIdentityMappingStoreRequest 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.oracledatabase.v1.GetGoldengateDeploymentTypeRequest parseFrom( + public static com.google.cloud.discoveryengine.v1beta.GetIdentityMappingStoreRequest parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.oracledatabase.v1.GetGoldengateDeploymentTypeRequest parseFrom( + public static com.google.cloud.discoveryengine.v1beta.GetIdentityMappingStoreRequest 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.oracledatabase.v1.GetGoldengateDeploymentTypeRequest parseFrom( + public static com.google.cloud.discoveryengine.v1beta.GetIdentityMappingStoreRequest parseFrom( byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.oracledatabase.v1.GetGoldengateDeploymentTypeRequest parseFrom( + public static com.google.cloud.discoveryengine.v1beta.GetIdentityMappingStoreRequest parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.oracledatabase.v1.GetGoldengateDeploymentTypeRequest parseFrom( + public static com.google.cloud.discoveryengine.v1beta.GetIdentityMappingStoreRequest parseFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } - public static com.google.cloud.oracledatabase.v1.GetGoldengateDeploymentTypeRequest parseFrom( + public static com.google.cloud.discoveryengine.v1beta.GetIdentityMappingStoreRequest 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.oracledatabase.v1.GetGoldengateDeploymentTypeRequest + public static com.google.cloud.discoveryengine.v1beta.GetIdentityMappingStoreRequest parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } - public static com.google.cloud.oracledatabase.v1.GetGoldengateDeploymentTypeRequest + public static com.google.cloud.discoveryengine.v1beta.GetIdentityMappingStoreRequest parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -256,12 +256,12 @@ public static com.google.cloud.oracledatabase.v1.GetGoldengateDeploymentTypeRequ PARSER, input, extensionRegistry); } - public static com.google.cloud.oracledatabase.v1.GetGoldengateDeploymentTypeRequest parseFrom( + public static com.google.cloud.discoveryengine.v1beta.GetIdentityMappingStoreRequest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } - public static com.google.cloud.oracledatabase.v1.GetGoldengateDeploymentTypeRequest parseFrom( + public static com.google.cloud.discoveryengine.v1beta.GetIdentityMappingStoreRequest parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -279,7 +279,7 @@ public static Builder newBuilder() { } public static Builder newBuilder( - com.google.cloud.oracledatabase.v1.GetGoldengateDeploymentTypeRequest prototype) { + com.google.cloud.discoveryengine.v1beta.GetIdentityMappingStoreRequest prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @@ -298,32 +298,33 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.Builder * * *
            -   * Message for getting a GoldengateDeploymentType.
            +   * Request message for
            +   * [IdentityMappingStoreService.GetIdentityMappingStore][google.cloud.discoveryengine.v1beta.IdentityMappingStoreService.GetIdentityMappingStore]
                * 
            * - * Protobuf type {@code google.cloud.oracledatabase.v1.GetGoldengateDeploymentTypeRequest} + * Protobuf type {@code google.cloud.discoveryengine.v1beta.GetIdentityMappingStoreRequest} */ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.oracledatabase.v1.GetGoldengateDeploymentTypeRequest) - com.google.cloud.oracledatabase.v1.GetGoldengateDeploymentTypeRequestOrBuilder { + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.GetIdentityMappingStoreRequest) + com.google.cloud.discoveryengine.v1beta.GetIdentityMappingStoreRequestOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.oracledatabase.v1.GoldengateDeploymentTypeProto - .internal_static_google_cloud_oracledatabase_v1_GetGoldengateDeploymentTypeRequest_descriptor; + return com.google.cloud.discoveryengine.v1beta.IdentityMappingStoreServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_GetIdentityMappingStoreRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.google.cloud.oracledatabase.v1.GoldengateDeploymentTypeProto - .internal_static_google_cloud_oracledatabase_v1_GetGoldengateDeploymentTypeRequest_fieldAccessorTable + return com.google.cloud.discoveryengine.v1beta.IdentityMappingStoreServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_GetIdentityMappingStoreRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.oracledatabase.v1.GetGoldengateDeploymentTypeRequest.class, - com.google.cloud.oracledatabase.v1.GetGoldengateDeploymentTypeRequest.Builder.class); + com.google.cloud.discoveryengine.v1beta.GetIdentityMappingStoreRequest.class, + com.google.cloud.discoveryengine.v1beta.GetIdentityMappingStoreRequest.Builder.class); } // Construct using - // com.google.cloud.oracledatabase.v1.GetGoldengateDeploymentTypeRequest.newBuilder() + // com.google.cloud.discoveryengine.v1beta.GetIdentityMappingStoreRequest.newBuilder() private Builder() {} private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { @@ -340,20 +341,21 @@ public Builder clear() { @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.oracledatabase.v1.GoldengateDeploymentTypeProto - .internal_static_google_cloud_oracledatabase_v1_GetGoldengateDeploymentTypeRequest_descriptor; + return com.google.cloud.discoveryengine.v1beta.IdentityMappingStoreServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_GetIdentityMappingStoreRequest_descriptor; } @java.lang.Override - public com.google.cloud.oracledatabase.v1.GetGoldengateDeploymentTypeRequest + public com.google.cloud.discoveryengine.v1beta.GetIdentityMappingStoreRequest getDefaultInstanceForType() { - return com.google.cloud.oracledatabase.v1.GetGoldengateDeploymentTypeRequest + return com.google.cloud.discoveryengine.v1beta.GetIdentityMappingStoreRequest .getDefaultInstance(); } @java.lang.Override - public com.google.cloud.oracledatabase.v1.GetGoldengateDeploymentTypeRequest build() { - com.google.cloud.oracledatabase.v1.GetGoldengateDeploymentTypeRequest result = buildPartial(); + public com.google.cloud.discoveryengine.v1beta.GetIdentityMappingStoreRequest build() { + com.google.cloud.discoveryengine.v1beta.GetIdentityMappingStoreRequest result = + buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } @@ -361,9 +363,9 @@ public com.google.cloud.oracledatabase.v1.GetGoldengateDeploymentTypeRequest bui } @java.lang.Override - public com.google.cloud.oracledatabase.v1.GetGoldengateDeploymentTypeRequest buildPartial() { - com.google.cloud.oracledatabase.v1.GetGoldengateDeploymentTypeRequest result = - new com.google.cloud.oracledatabase.v1.GetGoldengateDeploymentTypeRequest(this); + public com.google.cloud.discoveryengine.v1beta.GetIdentityMappingStoreRequest buildPartial() { + com.google.cloud.discoveryengine.v1beta.GetIdentityMappingStoreRequest result = + new com.google.cloud.discoveryengine.v1beta.GetIdentityMappingStoreRequest(this); if (bitField0_ != 0) { buildPartial0(result); } @@ -372,7 +374,7 @@ public com.google.cloud.oracledatabase.v1.GetGoldengateDeploymentTypeRequest bui } private void buildPartial0( - com.google.cloud.oracledatabase.v1.GetGoldengateDeploymentTypeRequest result) { + com.google.cloud.discoveryengine.v1beta.GetIdentityMappingStoreRequest result) { int from_bitField0_ = bitField0_; if (((from_bitField0_ & 0x00000001) != 0)) { result.name_ = name_; @@ -381,9 +383,9 @@ private void buildPartial0( @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.oracledatabase.v1.GetGoldengateDeploymentTypeRequest) { + if (other instanceof com.google.cloud.discoveryengine.v1beta.GetIdentityMappingStoreRequest) { return mergeFrom( - (com.google.cloud.oracledatabase.v1.GetGoldengateDeploymentTypeRequest) other); + (com.google.cloud.discoveryengine.v1beta.GetIdentityMappingStoreRequest) other); } else { super.mergeFrom(other); return this; @@ -391,9 +393,9 @@ public Builder mergeFrom(com.google.protobuf.Message other) { } public Builder mergeFrom( - com.google.cloud.oracledatabase.v1.GetGoldengateDeploymentTypeRequest other) { + com.google.cloud.discoveryengine.v1beta.GetIdentityMappingStoreRequest other) { if (other - == com.google.cloud.oracledatabase.v1.GetGoldengateDeploymentTypeRequest + == com.google.cloud.discoveryengine.v1beta.GetIdentityMappingStoreRequest .getDefaultInstance()) return this; if (!other.getName().isEmpty()) { name_ = other.name_; @@ -457,9 +459,9 @@ public Builder mergeFrom( * * *
            -     * Required. The name of the GoldengateDeploymentType to retrieve.
            +     * Required. The name of the Identity Mapping Store to get.
                  * Format:
            -     * projects/{project}/locations/{location}/goldengateDeploymentTypes/{goldengate_deployment_type}
            +     * `projects/{project}/locations/{location}/identityMappingStores/{identityMappingStore}`
                  * 
            * * @@ -484,9 +486,9 @@ public java.lang.String getName() { * * *
            -     * Required. The name of the GoldengateDeploymentType to retrieve.
            +     * Required. The name of the Identity Mapping Store to get.
                  * Format:
            -     * projects/{project}/locations/{location}/goldengateDeploymentTypes/{goldengate_deployment_type}
            +     * `projects/{project}/locations/{location}/identityMappingStores/{identityMappingStore}`
                  * 
            * * @@ -511,9 +513,9 @@ public com.google.protobuf.ByteString getNameBytes() { * * *
            -     * Required. The name of the GoldengateDeploymentType to retrieve.
            +     * Required. The name of the Identity Mapping Store to get.
                  * Format:
            -     * projects/{project}/locations/{location}/goldengateDeploymentTypes/{goldengate_deployment_type}
            +     * `projects/{project}/locations/{location}/identityMappingStores/{identityMappingStore}`
                  * 
            * * @@ -537,9 +539,9 @@ public Builder setName(java.lang.String value) { * * *
            -     * Required. The name of the GoldengateDeploymentType to retrieve.
            +     * Required. The name of the Identity Mapping Store to get.
                  * Format:
            -     * projects/{project}/locations/{location}/goldengateDeploymentTypes/{goldengate_deployment_type}
            +     * `projects/{project}/locations/{location}/identityMappingStores/{identityMappingStore}`
                  * 
            * * @@ -559,9 +561,9 @@ public Builder clearName() { * * *
            -     * Required. The name of the GoldengateDeploymentType to retrieve.
            +     * Required. The name of the Identity Mapping Store to get.
                  * Format:
            -     * projects/{project}/locations/{location}/goldengateDeploymentTypes/{goldengate_deployment_type}
            +     * `projects/{project}/locations/{location}/identityMappingStores/{identityMappingStore}`
                  * 
            * * @@ -582,26 +584,26 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { return this; } - // @@protoc_insertion_point(builder_scope:google.cloud.oracledatabase.v1.GetGoldengateDeploymentTypeRequest) + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.GetIdentityMappingStoreRequest) } - // @@protoc_insertion_point(class_scope:google.cloud.oracledatabase.v1.GetGoldengateDeploymentTypeRequest) - private static final com.google.cloud.oracledatabase.v1.GetGoldengateDeploymentTypeRequest + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.GetIdentityMappingStoreRequest) + private static final com.google.cloud.discoveryengine.v1beta.GetIdentityMappingStoreRequest DEFAULT_INSTANCE; static { - DEFAULT_INSTANCE = new com.google.cloud.oracledatabase.v1.GetGoldengateDeploymentTypeRequest(); + DEFAULT_INSTANCE = new com.google.cloud.discoveryengine.v1beta.GetIdentityMappingStoreRequest(); } - public static com.google.cloud.oracledatabase.v1.GetGoldengateDeploymentTypeRequest + public static com.google.cloud.discoveryengine.v1beta.GetIdentityMappingStoreRequest getDefaultInstance() { return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { @java.lang.Override - public GetGoldengateDeploymentTypeRequest parsePartialFrom( + public GetIdentityMappingStoreRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { @@ -620,17 +622,17 @@ public GetGoldengateDeploymentTypeRequest parsePartialFrom( } }; - public static com.google.protobuf.Parser parser() { + public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override - public com.google.protobuf.Parser getParserForType() { + public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override - public com.google.cloud.oracledatabase.v1.GetGoldengateDeploymentTypeRequest + public com.google.cloud.discoveryengine.v1beta.GetIdentityMappingStoreRequest getDefaultInstanceForType() { return DEFAULT_INSTANCE; } diff --git a/java-oracledatabase/proto-google-cloud-oracledatabase-v1/src/main/java/com/google/cloud/oracledatabase/v1/GetGoldengateDeploymentVersionRequestOrBuilder.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/GetIdentityMappingStoreRequestOrBuilder.java similarity index 67% rename from java-oracledatabase/proto-google-cloud-oracledatabase-v1/src/main/java/com/google/cloud/oracledatabase/v1/GetGoldengateDeploymentVersionRequestOrBuilder.java rename to java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/GetIdentityMappingStoreRequestOrBuilder.java index 0386e61bfb46..81d40b1a640e 100644 --- a/java-oracledatabase/proto-google-cloud-oracledatabase-v1/src/main/java/com/google/cloud/oracledatabase/v1/GetGoldengateDeploymentVersionRequestOrBuilder.java +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/GetIdentityMappingStoreRequestOrBuilder.java @@ -15,24 +15,24 @@ */ // Generated by the protocol buffer compiler. DO NOT EDIT! // NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/oracledatabase/v1/goldengate_deployment_version.proto +// source: google/cloud/discoveryengine/v1beta/identity_mapping_store_service.proto // Protobuf Java Version: 4.33.2 -package com.google.cloud.oracledatabase.v1; +package com.google.cloud.discoveryengine.v1beta; @com.google.protobuf.Generated -public interface GetGoldengateDeploymentVersionRequestOrBuilder +public interface GetIdentityMappingStoreRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.oracledatabase.v1.GetGoldengateDeploymentVersionRequest) + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.GetIdentityMappingStoreRequest) com.google.protobuf.MessageOrBuilder { /** * * *
            -   * Required. The name of the GoldengateDeploymentVersion to retrieve.
            +   * Required. The name of the Identity Mapping Store to get.
                * Format:
            -   * projects/{project}/locations/{location}/goldengateDeploymentVersions/{goldengate_deployment_version}
            +   * `projects/{project}/locations/{location}/identityMappingStores/{identityMappingStore}`
                * 
            * * @@ -47,9 +47,9 @@ public interface GetGoldengateDeploymentVersionRequestOrBuilder * * *
            -   * Required. The name of the GoldengateDeploymentVersion to retrieve.
            +   * Required. The name of the Identity Mapping Store to get.
                * Format:
            -   * projects/{project}/locations/{location}/goldengateDeploymentVersions/{goldengate_deployment_version}
            +   * `projects/{project}/locations/{location}/identityMappingStores/{identityMappingStore}`
                * 
            * * diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/GetLicenseConfigRequest.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/GetLicenseConfigRequest.java new file mode 100644 index 000000000000..3a61a34b0bec --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/GetLicenseConfigRequest.java @@ -0,0 +1,699 @@ +/* + * 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/cloud/discoveryengine/v1beta/license_config_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.discoveryengine.v1beta; + +/** + * + * + *
            + * Request message for
            + * [LicenseConfigService.GetLicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfigService.GetLicenseConfig]
            + * method.
            + * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.GetLicenseConfigRequest} + */ +@com.google.protobuf.Generated +public final class GetLicenseConfigRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.GetLicenseConfigRequest) + GetLicenseConfigRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "GetLicenseConfigRequest"); + } + + // Use GetLicenseConfigRequest.newBuilder() to construct. + private GetLicenseConfigRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private GetLicenseConfigRequest() { + name_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.LicenseConfigServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_GetLicenseConfigRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.LicenseConfigServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_GetLicenseConfigRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.GetLicenseConfigRequest.class, + com.google.cloud.discoveryengine.v1beta.GetLicenseConfigRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
            +   * Required. Full resource name of
            +   * [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig], such as
            +   * `projects/{project}/locations/{location}/licenseConfigs/*`.
            +   *
            +   * If the caller does not have permission to access the
            +   * [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig],
            +   * regardless of whether or not it exists, a PERMISSION_DENIED error is
            +   * returned.
            +   *
            +   * If the requested
            +   * [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig] does not
            +   * exist, a NOT_FOUND error is returned.
            +   * 
            + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + 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(); + name_ = s; + return s; + } + } + + /** + * + * + *
            +   * Required. Full resource name of
            +   * [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig], such as
            +   * `projects/{project}/locations/{location}/licenseConfigs/*`.
            +   *
            +   * If the caller does not have permission to access the
            +   * [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig],
            +   * regardless of whether or not it exists, a PERMISSION_DENIED error is
            +   * returned.
            +   *
            +   * If the requested
            +   * [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig] does not
            +   * exist, a NOT_FOUND error is returned.
            +   * 
            + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = 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 { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + 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(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + 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.discoveryengine.v1beta.GetLicenseConfigRequest)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1beta.GetLicenseConfigRequest other = + (com.google.cloud.discoveryengine.v1beta.GetLicenseConfigRequest) obj; + + if (!getName().equals(other.getName())) 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) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1beta.GetLicenseConfigRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.GetLicenseConfigRequest 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.discoveryengine.v1beta.GetLicenseConfigRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.GetLicenseConfigRequest 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.discoveryengine.v1beta.GetLicenseConfigRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.GetLicenseConfigRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1beta.GetLicenseConfigRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.GetLicenseConfigRequest 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.discoveryengine.v1beta.GetLicenseConfigRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.GetLicenseConfigRequest 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.discoveryengine.v1beta.GetLicenseConfigRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.GetLicenseConfigRequest 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.discoveryengine.v1beta.GetLicenseConfigRequest 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
            +   * [LicenseConfigService.GetLicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfigService.GetLicenseConfig]
            +   * method.
            +   * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.GetLicenseConfigRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.GetLicenseConfigRequest) + com.google.cloud.discoveryengine.v1beta.GetLicenseConfigRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.LicenseConfigServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_GetLicenseConfigRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.LicenseConfigServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_GetLicenseConfigRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.GetLicenseConfigRequest.class, + com.google.cloud.discoveryengine.v1beta.GetLicenseConfigRequest.Builder.class); + } + + // Construct using com.google.cloud.discoveryengine.v1beta.GetLicenseConfigRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1beta.LicenseConfigServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_GetLicenseConfigRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.GetLicenseConfigRequest + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1beta.GetLicenseConfigRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.GetLicenseConfigRequest build() { + com.google.cloud.discoveryengine.v1beta.GetLicenseConfigRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.GetLicenseConfigRequest buildPartial() { + com.google.cloud.discoveryengine.v1beta.GetLicenseConfigRequest result = + new com.google.cloud.discoveryengine.v1beta.GetLicenseConfigRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.discoveryengine.v1beta.GetLicenseConfigRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.discoveryengine.v1beta.GetLicenseConfigRequest) { + return mergeFrom((com.google.cloud.discoveryengine.v1beta.GetLicenseConfigRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1beta.GetLicenseConfigRequest other) { + if (other + == com.google.cloud.discoveryengine.v1beta.GetLicenseConfigRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + + /** + * + * + *
            +     * Required. Full resource name of
            +     * [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig], such as
            +     * `projects/{project}/locations/{location}/licenseConfigs/*`.
            +     *
            +     * If the caller does not have permission to access the
            +     * [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig],
            +     * regardless of whether or not it exists, a PERMISSION_DENIED error is
            +     * returned.
            +     *
            +     * If the requested
            +     * [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig] does not
            +     * exist, a NOT_FOUND error is returned.
            +     * 
            + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
            +     * Required. Full resource name of
            +     * [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig], such as
            +     * `projects/{project}/locations/{location}/licenseConfigs/*`.
            +     *
            +     * If the caller does not have permission to access the
            +     * [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig],
            +     * regardless of whether or not it exists, a PERMISSION_DENIED error is
            +     * returned.
            +     *
            +     * If the requested
            +     * [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig] does not
            +     * exist, a NOT_FOUND error is returned.
            +     * 
            + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
            +     * Required. Full resource name of
            +     * [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig], such as
            +     * `projects/{project}/locations/{location}/licenseConfigs/*`.
            +     *
            +     * If the caller does not have permission to access the
            +     * [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig],
            +     * regardless of whether or not it exists, a PERMISSION_DENIED error is
            +     * returned.
            +     *
            +     * If the requested
            +     * [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig] does not
            +     * exist, a NOT_FOUND error is returned.
            +     * 
            + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Required. Full resource name of
            +     * [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig], such as
            +     * `projects/{project}/locations/{location}/licenseConfigs/*`.
            +     *
            +     * If the caller does not have permission to access the
            +     * [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig],
            +     * regardless of whether or not it exists, a PERMISSION_DENIED error is
            +     * returned.
            +     *
            +     * If the requested
            +     * [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig] does not
            +     * exist, a NOT_FOUND error is returned.
            +     * 
            + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
            +     * Required. Full resource name of
            +     * [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig], such as
            +     * `projects/{project}/locations/{location}/licenseConfigs/*`.
            +     *
            +     * If the caller does not have permission to access the
            +     * [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig],
            +     * regardless of whether or not it exists, a PERMISSION_DENIED error is
            +     * returned.
            +     *
            +     * If the requested
            +     * [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig] does not
            +     * exist, a NOT_FOUND error is returned.
            +     * 
            + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.GetLicenseConfigRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.GetLicenseConfigRequest) + private static final com.google.cloud.discoveryengine.v1beta.GetLicenseConfigRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.discoveryengine.v1beta.GetLicenseConfigRequest(); + } + + public static com.google.cloud.discoveryengine.v1beta.GetLicenseConfigRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetLicenseConfigRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.GetLicenseConfigRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/GetLicenseConfigRequestOrBuilder.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/GetLicenseConfigRequestOrBuilder.java new file mode 100644 index 000000000000..a46c42a3901c --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/GetLicenseConfigRequestOrBuilder.java @@ -0,0 +1,80 @@ +/* + * 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/cloud/discoveryengine/v1beta/license_config_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.discoveryengine.v1beta; + +@com.google.protobuf.Generated +public interface GetLicenseConfigRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.GetLicenseConfigRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
            +   * Required. Full resource name of
            +   * [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig], such as
            +   * `projects/{project}/locations/{location}/licenseConfigs/*`.
            +   *
            +   * If the caller does not have permission to access the
            +   * [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig],
            +   * regardless of whether or not it exists, a PERMISSION_DENIED error is
            +   * returned.
            +   *
            +   * If the requested
            +   * [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig] does not
            +   * exist, a NOT_FOUND error is returned.
            +   * 
            + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
            +   * Required. Full resource name of
            +   * [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig], such as
            +   * `projects/{project}/locations/{location}/licenseConfigs/*`.
            +   *
            +   * If the caller does not have permission to access the
            +   * [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig],
            +   * regardless of whether or not it exists, a PERMISSION_DENIED error is
            +   * returned.
            +   *
            +   * If the requested
            +   * [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig] does not
            +   * exist, a NOT_FOUND error is returned.
            +   * 
            + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/GetUserStoreRequest.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/GetUserStoreRequest.java new file mode 100644 index 000000000000..5864f59ec1cc --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/GetUserStoreRequest.java @@ -0,0 +1,627 @@ +/* + * 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/cloud/discoveryengine/v1beta/user_store_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.discoveryengine.v1beta; + +/** + * + * + *
            + * Request message for
            + * [UserStoreService.GetUserStore][google.cloud.discoveryengine.v1beta.UserStoreService.GetUserStore]
            + * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.GetUserStoreRequest} + */ +@com.google.protobuf.Generated +public final class GetUserStoreRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.GetUserStoreRequest) + GetUserStoreRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "GetUserStoreRequest"); + } + + // Use GetUserStoreRequest.newBuilder() to construct. + private GetUserStoreRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private GetUserStoreRequest() { + name_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.UserStoreServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_GetUserStoreRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.UserStoreServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_GetUserStoreRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.GetUserStoreRequest.class, + com.google.cloud.discoveryengine.v1beta.GetUserStoreRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
            +   * Required. The name of the User Store to get.
            +   * Format:
            +   * `projects/{project}/locations/{location}/userStores/{user_store_id}`
            +   * 
            + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + 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(); + name_ = s; + return s; + } + } + + /** + * + * + *
            +   * Required. The name of the User Store to get.
            +   * Format:
            +   * `projects/{project}/locations/{location}/userStores/{user_store_id}`
            +   * 
            + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = 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 { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + 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(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + 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.discoveryengine.v1beta.GetUserStoreRequest)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1beta.GetUserStoreRequest other = + (com.google.cloud.discoveryengine.v1beta.GetUserStoreRequest) obj; + + if (!getName().equals(other.getName())) 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) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1beta.GetUserStoreRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.GetUserStoreRequest 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.discoveryengine.v1beta.GetUserStoreRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.GetUserStoreRequest 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.discoveryengine.v1beta.GetUserStoreRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.GetUserStoreRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1beta.GetUserStoreRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.GetUserStoreRequest 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.discoveryengine.v1beta.GetUserStoreRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.GetUserStoreRequest 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.discoveryengine.v1beta.GetUserStoreRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.GetUserStoreRequest 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.discoveryengine.v1beta.GetUserStoreRequest 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
            +   * [UserStoreService.GetUserStore][google.cloud.discoveryengine.v1beta.UserStoreService.GetUserStore]
            +   * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.GetUserStoreRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.GetUserStoreRequest) + com.google.cloud.discoveryengine.v1beta.GetUserStoreRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.UserStoreServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_GetUserStoreRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.UserStoreServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_GetUserStoreRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.GetUserStoreRequest.class, + com.google.cloud.discoveryengine.v1beta.GetUserStoreRequest.Builder.class); + } + + // Construct using com.google.cloud.discoveryengine.v1beta.GetUserStoreRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1beta.UserStoreServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_GetUserStoreRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.GetUserStoreRequest getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1beta.GetUserStoreRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.GetUserStoreRequest build() { + com.google.cloud.discoveryengine.v1beta.GetUserStoreRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.GetUserStoreRequest buildPartial() { + com.google.cloud.discoveryengine.v1beta.GetUserStoreRequest result = + new com.google.cloud.discoveryengine.v1beta.GetUserStoreRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.discoveryengine.v1beta.GetUserStoreRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.discoveryengine.v1beta.GetUserStoreRequest) { + return mergeFrom((com.google.cloud.discoveryengine.v1beta.GetUserStoreRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.discoveryengine.v1beta.GetUserStoreRequest other) { + if (other == com.google.cloud.discoveryengine.v1beta.GetUserStoreRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + + /** + * + * + *
            +     * Required. The name of the User Store to get.
            +     * Format:
            +     * `projects/{project}/locations/{location}/userStores/{user_store_id}`
            +     * 
            + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
            +     * Required. The name of the User Store to get.
            +     * Format:
            +     * `projects/{project}/locations/{location}/userStores/{user_store_id}`
            +     * 
            + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
            +     * Required. The name of the User Store to get.
            +     * Format:
            +     * `projects/{project}/locations/{location}/userStores/{user_store_id}`
            +     * 
            + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Required. The name of the User Store to get.
            +     * Format:
            +     * `projects/{project}/locations/{location}/userStores/{user_store_id}`
            +     * 
            + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
            +     * Required. The name of the User Store to get.
            +     * Format:
            +     * `projects/{project}/locations/{location}/userStores/{user_store_id}`
            +     * 
            + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.GetUserStoreRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.GetUserStoreRequest) + private static final com.google.cloud.discoveryengine.v1beta.GetUserStoreRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.discoveryengine.v1beta.GetUserStoreRequest(); + } + + public static com.google.cloud.discoveryengine.v1beta.GetUserStoreRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetUserStoreRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.GetUserStoreRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-oracledatabase/proto-google-cloud-oracledatabase-v1/src/main/java/com/google/cloud/oracledatabase/v1/GetGoldengateConnectionTypeRequestOrBuilder.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/GetUserStoreRequestOrBuilder.java similarity index 68% rename from java-oracledatabase/proto-google-cloud-oracledatabase-v1/src/main/java/com/google/cloud/oracledatabase/v1/GetGoldengateConnectionTypeRequestOrBuilder.java rename to java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/GetUserStoreRequestOrBuilder.java index 6deb871d525f..3f2e01ff2561 100644 --- a/java-oracledatabase/proto-google-cloud-oracledatabase-v1/src/main/java/com/google/cloud/oracledatabase/v1/GetGoldengateConnectionTypeRequestOrBuilder.java +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/GetUserStoreRequestOrBuilder.java @@ -15,23 +15,24 @@ */ // Generated by the protocol buffer compiler. DO NOT EDIT! // NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/oracledatabase/v1/goldengate_connection_type.proto +// source: google/cloud/discoveryengine/v1beta/user_store_service.proto // Protobuf Java Version: 4.33.2 -package com.google.cloud.oracledatabase.v1; +package com.google.cloud.discoveryengine.v1beta; @com.google.protobuf.Generated -public interface GetGoldengateConnectionTypeRequestOrBuilder +public interface GetUserStoreRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.oracledatabase.v1.GetGoldengateConnectionTypeRequest) + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.GetUserStoreRequest) com.google.protobuf.MessageOrBuilder { /** * * *
            -   * Required. Name of the resource in the format:
            -   * projects/{project}/locations/{location}/goldengateConnectionTypes/{goldengate_connection_type}
            +   * Required. The name of the User Store to get.
            +   * Format:
            +   * `projects/{project}/locations/{location}/userStores/{user_store_id}`
                * 
            * * @@ -46,8 +47,9 @@ public interface GetGoldengateConnectionTypeRequestOrBuilder * * *
            -   * Required. Name of the resource in the format:
            -   * projects/{project}/locations/{location}/goldengateConnectionTypes/{goldengate_connection_type}
            +   * Required. The name of the User Store to get.
            +   * Format:
            +   * `projects/{project}/locations/{location}/userStores/{user_store_id}`
                * 
            * * diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/GroundedGenerationServiceProto.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/GroundedGenerationServiceProto.java index 0a7c03e1f318..55e9e0f60880 100644 --- a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/GroundedGenerationServiceProto.java +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/GroundedGenerationServiceProto.java @@ -84,6 +84,10 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_discoveryengine_v1beta_GenerateGroundedContentRequest_GroundingSource_GoogleSearchSource_descriptor; static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_cloud_discoveryengine_v1beta_GenerateGroundedContentRequest_GroundingSource_GoogleSearchSource_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1beta_GenerateGroundedContentRequest_GroundingSource_EnterpriseWebRetrievalSource_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1beta_GenerateGroundedContentRequest_GroundingSource_EnterpriseWebRetrievalSource_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_discoveryengine_v1beta_GenerateGroundedContentRequest_GroundingSpec_descriptor; static final com.google.protobuf.GeneratedMessage.FieldAccessorTable @@ -124,6 +128,22 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_discoveryengine_v1beta_GenerateGroundedContentResponse_Candidate_GroundingMetadata_GroundingSupport_descriptor; static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_cloud_discoveryengine_v1beta_GenerateGroundedContentResponse_Candidate_GroundingMetadata_GroundingSupport_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1beta_GenerateGroundedContentResponse_Candidate_GroundingMetadata_ImageMetadata_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1beta_GenerateGroundedContentResponse_Candidate_GroundingMetadata_ImageMetadata_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1beta_GenerateGroundedContentResponse_Candidate_GroundingMetadata_ImageMetadata_WebsiteInfo_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1beta_GenerateGroundedContentResponse_Candidate_GroundingMetadata_ImageMetadata_WebsiteInfo_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1beta_GenerateGroundedContentResponse_Candidate_GroundingMetadata_ImageMetadata_Image_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1beta_GenerateGroundedContentResponse_Candidate_GroundingMetadata_ImageMetadata_Image_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1beta_GenerateGroundedContentResponse_Candidate_GroundingMetadata_VideoMetadata_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1beta_GenerateGroundedContentResponse_Candidate_GroundingMetadata_VideoMetadata_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_discoveryengine_v1beta_CheckGroundingSpec_descriptor; static final com.google.protobuf.GeneratedMessage.FieldAccessorTable @@ -148,6 +168,14 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_discoveryengine_v1beta_CheckGroundingResponse_Claim_descriptor; static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_cloud_discoveryengine_v1beta_CheckGroundingResponse_Claim_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1beta_CitationMetadata_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1beta_CitationMetadata_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1beta_Citation_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1beta_Citation_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { return descriptor; @@ -162,72 +190,82 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "cloud.discoveryengine.v1beta\032\034google/api" + "/annotations.proto\032\027google/api/client.pr" + "oto\032\037google/api/field_behavior.proto\032\031go" - + "ogle/api/resource.proto\0323google/cloud/discoveryengine/v1beta/grounding.proto\"\235\001\n" + + "ogle/api/resource.proto\0323google/cloud/di" + + "scoveryengine/v1beta/grounding.proto\032\026google/type/date.proto\"\235\001\n" + "\031GroundedGenerationContent\022\014\n" + "\004role\030\001 \001(\t\022R\n" - + "\005parts\030\002 \003(\0132C.google.cloud.discovery" - + "engine.v1beta.GroundedGenerationContent.Part\032\036\n" + + "\005parts\030\002 \003(\0132" + + "C.google.cloud.discoveryengine.v1beta.GroundedGenerationContent.Part\032\036\n" + "\004Part\022\016\n" + "\004text\030\001 \001(\tH\000B\006\n" - + "\004data\"\202\024\n" + + "\004data\"\214\032\n" + "\036GenerateGroundedContentRequest\022A\n" + "\010location\030\001 \001(\tB/\340A\002\372A)\n" + "\'discoveryengine.googleapis.com/Location\022Z\n" - + "\022system_instruction\030\005" - + " \001(\0132>.google.cloud.discoveryengine.v1beta.GroundedGenerationContent\022P\n" - + "\010contents\030\002" - + " \003(\0132>.google.cloud.discoveryengine.v1beta.GroundedGenerationContent\022k\n" - + "\017generation_spec\030\003 \001(\0132R.google.cloud.discove" - + "ryengine.v1beta.GenerateGroundedContentRequest.GenerationSpec\022i\n" - + "\016grounding_spec\030\004 \001(\0132Q.google.cloud.discoveryengine.v1b" - + "eta.GenerateGroundedContentRequest.GroundingSpec\022h\n" - + "\013user_labels\030\006 \003(\0132S.google.c" - + "loud.discoveryengine.v1beta.GenerateGroundedContentRequest.UserLabelsEntry\032\277\002\n" + + "\022system_instruction\030\005 \001(\0132>.google." + + "cloud.discoveryengine.v1beta.GroundedGenerationContent\022P\n" + + "\010contents\030\002 \003(\0132>.googl" + + "e.cloud.discoveryengine.v1beta.GroundedGenerationContent\022k\n" + + "\017generation_spec\030\003 \001(\0132R.google.cloud.discoveryengine.v1beta." + + "GenerateGroundedContentRequest.GenerationSpec\022i\n" + + "\016grounding_spec\030\004 \001(\0132Q.google.c" + + "loud.discoveryengine.v1beta.GenerateGroundedContentRequest.GroundingSpec\022h\n" + + "\013user_labels\030\006 \003(\0132S.google.cloud.discoveryen" + + "gine.v1beta.GenerateGroundedContentRequest.UserLabelsEntry\032\204\005\n" + "\016GenerationSpec\022\020\n" + "\010model_id\030\003 \001(\t\022\025\n\r" + "language_code\030\002 \001(\t\022\030\n" + "\013temperature\030\004 \001(\002H\000\210\001\001\022\022\n" + "\005top_p\030\005 \001(\002H\001\210\001\001\022\022\n" + "\005top_k\030\007 \001(\005H\002\210\001\001\022\036\n" - + "\021frequency_penalty\030\010 \001(\002H\003\210\001\001\022\035\n" - + "\020presence_penalty\030\t \001(\002H\004\210\001\001\022\036\n" + + "\021frequency_penalty\030\010 \001(\002H\003\210\001\001\022\021\n" + + "\004seed\030\014 \001(\005H\004\210\001\001\022\035\n" + + "\020presence_penalty\030\t \001(\002H\005\210\001\001\022\036\n" + "\021max_output_tokens\030\n" - + " \001(\005H\005\210\001\001B\016\n" + + " \001(\005H\006\210\001\001\022\234\001\n" + + "\036provisioned_throughput_setting\030\r" + + " \001(\0162o.google.cloud.discoveryengine.v1beta.GenerateGroundedConten" + + "tRequest.GenerationSpec.ProvisionedThroughputSettingB\003\340A\001\"\207\001\n" + + "\034ProvisionedThroughputSetting\022.\n" + + "*PROVISIONED_THROUGHPUT_SETTING_UNSPECIFIED\020\000\022\037\n" + + "\033PROVISIONED_THROUGHPUT_ONLY\020\001\022\026\n" + + "\022PAY_AS_YOU_GO_ONLY\020\002B\016\n" + "\014_temperatureB\010\n" + "\006_top_pB\010\n" + "\006_top_kB\024\n" - + "\022_frequency_penaltyB\023\n" + + "\022_frequency_penaltyB\007\n" + + "\005_seedB\023\n" + "\021_presence_penaltyB\024\n" + "\022_max_output_tokens\032\304\003\n" + "\035DynamicRetrievalConfiguration\022\216\001\n" - + "\tpredictor\030\001 \001(\0132{.google.cloud.discoveryengin" - + "e.v1beta.GenerateGroundedContentRequest." - + "DynamicRetrievalConfiguration.DynamicRetrievalPredictor\032\221\002\n" + + "\tpredictor\030\001 \001(\0132{.google.cloud.discoveryengine.v1beta.Ge" + + "nerateGroundedContentRequest.DynamicRetr" + + "ievalConfiguration.DynamicRetrievalPredictor\032\221\002\n" + "\031DynamicRetrievalPredictor\022\225\001\n" - + "\007version\030\001 \001(\0162\203\001.google.cloud." - + "discoveryengine.v1beta.GenerateGroundedC" - + "ontentRequest.DynamicRetrievalConfiguration.DynamicRetrievalPredictor.Version\022\026\n" + + "\007version\030\001 \001(\0162\203\001.google.cloud.discoveryen" + + "gine.v1beta.GenerateGroundedContentReque" + + "st.DynamicRetrievalConfiguration.DynamicRetrievalPredictor.Version\022\026\n" + "\tthreshold\030\002 \001(\002H\000\210\001\001\"6\n" + "\007Version\022\027\n" + "\023VERSION_UNSPECIFIED\020\000\022\022\n" - + "\016V1_INDEPENDENT\020\001B\014\n" - + "\n" - + "_threshold\032\357\007\n" + + "\016V1_INDEPENDENT\020\001B\014\n\n" + + "_threshold\032\264\013\n" + "\017GroundingSource\022y\n\r" - + "inline_source\030\001 \001(\0132`.google.cloud.discoverye" - + "ngine.v1beta.GenerateGroundedContentRequest.GroundingSource.InlineSourceH\000\022y\n\r" - + "search_source\030\002 \001(\0132`.google.cloud.discove" + + "inline_source\030\001 \001(\0132`.google.cloud.discoveryengine.v1bet" + + "a.GenerateGroundedContentRequest.GroundingSource.InlineSourceH\000\022y\n\r" + + "search_source\030\002 \001(\0132`.google.cloud.discoveryengine.v1" + + "beta.GenerateGroundedContentRequest.GroundingSource.SearchSourceH\000\022\206\001\n" + + "\024google_search_source\030\003 \001(\0132f.google.cloud.discove" + "ryengine.v1beta.GenerateGroundedContentR" - + "equest.GroundingSource.SearchSourceH\000\022\206\001\n" - + "\024google_search_source\030\003 \001(\0132f.google.cl" - + "oud.discoveryengine.v1beta.GenerateGroun" - + "dedContentRequest.GroundingSource.GoogleSearchSourceH\000\032\225\002\n" + + "equest.GroundingSource.GoogleSearchSourceH\000\022\233\001\n" + + "\037enterprise_web_retrieval_source\030\010" + + " \001(\0132p.google.cloud.discoveryengine.v1beta.GenerateGroundedContentRequest.Groun" + + "dingSource.EnterpriseWebRetrievalSourceH\000\032\225\002\n" + "\014InlineSource\022K\n" - + "\017grounding_facts\030\001" - + " \003(\01322.google.cloud.discoveryengine.v1beta.GroundingFact\022\204\001\n\n" - + "attributes\030\002 \003(\0132p.google.cloud.discoveryengine" - + ".v1beta.GenerateGroundedContentRequest.G" - + "roundingSource.InlineSource.AttributesEntry\0321\n" + + "\017grounding_facts\030\001 " + + "\003(\01322.google.cloud.discoveryengine.v1beta.GroundingFact\022\204\001\n\n" + + "attributes\030\002 \003(\0132p.google.cloud.discoveryengine.v1beta.Gener" + + "ateGroundedContentRequest.GroundingSource.InlineSource.AttributesEntry\0321\n" + "\017AttributesEntry\022\013\n" + "\003key\030\001 \001(\t\022\r\n" + "\005value\030\002 \001(\t:\0028\001\032\230\001\n" @@ -236,50 +274,60 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + ",discoveryengine.googleapis.com/ServingConfig\022\030\n" + "\020max_result_count\030\002 \001(\005\022\016\n" + "\006filter\030\003 \001(\t\022\023\n" - + "\013safe_search\030\005 \001(\010\032\237\001\n" + + "\013safe_search\030\005 \001(\010\032\242\002\n" + "\022GoogleSearchSource\022\210\001\n" - + "\030dynamic_retrieval_config\030\002 \001(\0132a.google.clo" - + "ud.discoveryengine.v1beta.GenerateGround" - + "edContentRequest.DynamicRetrievalConfigurationB\003\340A\001B\010\n" + + "\030dynamic_retrieval_config\030\002 \001(\0132a.google.cloud.discoverye" + + "ngine.v1beta.GenerateGroundedContentRequ" + + "est.DynamicRetrievalConfigurationB\003\340A\001\022\034\n" + + "\017exclude_domains\030\005 \003(\tB\003\340A\001\022c\n" + + "\023blocking_confidence\030\006 \001(\0162A.google.cloud.discove" + + "ryengine.v1beta.Citation.PhishBlockThresholdB\003\340A\001\032\241\001\n" + + "\034EnterpriseWebRetrievalSource\022\034\n" + + "\017exclude_domains\030\001 \003(\tB\003\340A\001\022c\n" + + "\023blocking_confidence\030\002 \001(\0162A.google.cloud.dis" + + "coveryengine.v1beta.Citation.PhishBlockThresholdB\003\340A\001B\010\n" + "\006source\032\177\n\r" + "GroundingSpec\022n\n" - + "\021grounding_sources\030\001 \003(\0132S.google.cloud" - + ".discoveryengine.v1beta.GenerateGroundedContentRequest.GroundingSource\0321\n" + + "\021grounding_sources\030\001 \003(\0132S.google.clo" + + "ud.discoveryengine.v1beta.GenerateGroundedContentRequest.GroundingSource\0321\n" + "\017UserLabelsEntry\022\013\n" + "\003key\030\001 \001(\t\022\r\n" - + "\005value\030\002 \001(\t:\0028\001\"\230\020\n" - + "\037GenerateGroundedContentResponse\022b\n" - + "\n" - + "candidates\030\001 \003(\0132N.google.cloud.discove" - + "ryengine.v1beta.GenerateGroundedContentResponse.Candidate\032\220\017\n" + + "\005value\030\002 \001(\t:\0028\001\"\360\026\n" + + "\037GenerateGroundedContentResponse\022b\n\n" + + "candidates\030\001 \003(\0132N.google.cloud.disco" + + "veryengine.v1beta.GenerateGroundedContentResponse.Candidate\032\350\025\n" + "\tCandidate\022\r\n" + "\005index\030\001 \001(\005\022O\n" - + "\007content\030\002 \001(\0132>.google.cloud.d" - + "iscoveryengine.v1beta.GroundedGenerationContent\022\034\n" + + "\007content\030\002 \001(\0132>.google.cloud" + + ".discoveryengine.v1beta.GroundedGenerationContent\022\034\n" + "\017grounding_score\030\003 \001(\002H\000\210\001\001\022|\n" - + "\022grounding_metadata\030\004 \001(\0132`.google.cloud" - + ".discoveryengine.v1beta.GenerateGrounded" - + "ContentResponse.Candidate.GroundingMetadata\032\362\014\n" + + "\022grounding_metadata\030\004 \001(\0132`.google.clo" + + "ud.discoveryengine.v1beta.GenerateGround" + + "edContentResponse.Candidate.GroundingMetadata\032\312\023\n" + "\021GroundingMetadata\022\216\001\n" - + "\022retrieval_metadata\030\005 \003(\0132r.google.cloud.discoverye" - + "ngine.v1beta.GenerateGroundedContentResp" - + "onse.Candidate.GroundingMetadata.RetrievalMetadata\022F\n" - + "\016support_chunks\030\001 \003(\0132..goo" - + "gle.cloud.discoveryengine.v1beta.FactChunk\022\032\n" + + "\022retrieval_metadata\030\005 \003(\0132r.google.cloud.discover" + + "yengine.v1beta.GenerateGroundedContentRe" + + "sponse.Candidate.GroundingMetadata.RetrievalMetadata\022F\n" + + "\016support_chunks\030\001 \003(\0132..g" + + "oogle.cloud.discoveryengine.v1beta.FactChunk\022\032\n" + "\022web_search_queries\030\003 \003(\t\022\215\001\n" - + "\022search_entry_point\030\004 \001(\0132q.google.cloud.disco" - + "veryengine.v1beta.GenerateGroundedConten" - + "tResponse.Candidate.GroundingMetadata.SearchEntryPoint\022\214\001\n" - + "\021grounding_support\030\002 \003(\0132q.google.cloud.discoveryengine.v1beta" - + ".GenerateGroundedContentResponse.Candida" - + "te.GroundingMetadata.GroundingSupport\032\257\003\n" + + "\022search_entry_point\030\004 \001(\0132q.google.cloud.dis" + + "coveryengine.v1beta.GenerateGroundedCont" + + "entResponse.Candidate.GroundingMetadata.SearchEntryPoint\022\214\001\n" + + "\021grounding_support\030\002 \003(\0132q.google.cloud.discoveryengine.v1be" + + "ta.GenerateGroundedContentResponse.Candidate.GroundingMetadata.GroundingSupport\022~\n" + + "\006images\030\t \003(\0132n.google.cloud.discovery" + + "engine.v1beta.GenerateGroundedContentRes" + + "ponse.Candidate.GroundingMetadata.ImageMetadata\022~\n" + + "\006videos\030\013 \003(\0132n.google.cloud.discoveryengine.v1beta.GenerateGroundedCo" + + "ntentResponse.Candidate.GroundingMetadata.VideoMetadata\032\257\003\n" + "\021RetrievalMetadata\022\211\001\n" - + "\006source\030\001 \001(\0162y.google.cloud.discoveryengine.v1beta.Gener" - + "ateGroundedContentResponse.Candidate.Gro" - + "undingMetadata.RetrievalMetadata.Source\022\235\001\n" - + "\032dynamic_retrieval_metadata\030\002 \001(\0132y.g" - + "oogle.cloud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.Gro" - + "undingMetadata.DynamicRetrievalMetadata\"n\n" + + "\006source\030\001 \001(\0162y.google.cloud.discoverye" + + "ngine.v1beta.GenerateGroundedContentResp" + + "onse.Candidate.GroundingMetadata.RetrievalMetadata.Source\022\235\001\n" + + "\032dynamic_retrieval_metadata\030\002 \001(\0132y.google.cloud.discoverye" + + "ngine.v1beta.GenerateGroundedContentResp" + + "onse.Candidate.GroundingMetadata.DynamicRetrievalMetadata\"n\n" + "\006Source\022\026\n" + "\022SOURCE_UNSPECIFIED\020\000\022\024\n" + "\020VERTEX_AI_SEARCH\020\001\022\021\n\r" @@ -287,17 +335,19 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\016INLINE_CONTENT\020\002\022\017\n" + "\013GOOGLE_MAPS\020\004\032\274\001\n" + "\030DynamicRetrievalMetadata\022\237\001\n" - + "\022predictor_metadata\030\001 \001(\0132\202\001.google.cloud.discoveryengin" - + "e.v1beta.GenerateGroundedContentResponse" - + ".Candidate.GroundingMetadata.DynamicRetrievalPredictorMetadata\032\242\002\n" + + "\022predictor_metadata\030\001 \001(\0132\202\001.google.cl" + + "oud.discoveryengine.v1beta.GenerateGroundedContentResponse.Candidate.GroundingMe" + + "tadata.DynamicRetrievalPredictorMetadata\032\242\002\n" + "!DynamicRetrievalPredictorMetadata\022\234\001\n" - + "\007version\030\001 \001(\0162\212\001.google.cloud.discoveryengine.v1beta.Ge" - + "nerateGroundedContentResponse.Candidate." - + "GroundingMetadata.DynamicRetrievalPredictorMetadata.Version\022\027\n\n" + + "\007version\030\001 \001(\0162\212\001.google.cloud.discove" + + "ryengine.v1beta.GenerateGroundedContentR" + + "esponse.Candidate.GroundingMetadata.DynamicRetrievalPredictorMetadata.Version\022\027\n" + + "\n" + "prediction\030\002 \001(\002H\000\210\001\001\"6\n" + "\007Version\022\027\n" + "\023VERSION_UNSPECIFIED\020\000\022\022\n" - + "\016V1_INDEPENDENT\020\001B\r\n" + + "\016V1_INDEPENDENT\020\001B\r" + + "\n" + "\013_prediction\032>\n" + "\020SearchEntryPoint\022\030\n" + "\020rendered_content\030\001 \001(\t\022\020\n" @@ -306,65 +356,107 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "claim_text\030\001 \001(\t\022\035\n" + "\025support_chunk_indices\030\003 \003(\005\022\032\n\r" + "support_score\030\002 \001(\002H\000\210\001\001B\020\n" - + "\016_support_scoreB\022\n" - + "\020_grounding_score\"L\n" + + "\016_support_score\032\247\004\n\r" + + "ImageMetadata\022\203\001\n" + + "\005image\030\001 \001(\0132t.google.cloud.discoveryengine.v1beta.GenerateGroun" + + "dedContentResponse.Candidate.GroundingMetadata.ImageMetadata.Image\022\207\001\n" + + "\tthumbnail\030\002 \001(\0132t.google.cloud.discoveryengine.v1" + + "beta.GenerateGroundedContentResponse.Can" + + "didate.GroundingMetadata.ImageMetadata.Image\022\212\001\n" + + "\006source\030\003 \001(\0132z.google.cloud.dis" + + "coveryengine.v1beta.GenerateGroundedCont" + + "entResponse.Candidate.GroundingMetadata.ImageMetadata.WebsiteInfo\032D\n" + + "\013WebsiteInfo\022\013\n" + + "\003uri\030\001 \001(\t\022\r\n" + + "\005title\030\002 \001(\t\022\031\n" + + "\021site_display_name\030\003 \001(\t\0323\n" + + "\005Image\022\013\n" + + "\003uri\030\001 \001(\t\022\r\n" + + "\005width\030\002 \001(\005\022\016\n" + + "\006height\030\003 \001(\005\032,\n\r" + + "VideoMetadata\022\033\n" + + "\023youtube_external_id\030\001 \001(\tB\022\n" + + "\020_grounding_score\"\220\001\n" + "\022CheckGroundingSpec\022\037\n" - + "\022citation_threshold\030\001 \001(\001H\000\210\001\001B\025\n" - + "\023_citation_threshold\"\253\003\n" + + "\022citation_threshold\030\001 \001(\001H\000\210\001\001\022%\n" + + "\030enable_claim_level_score\030\004 \001(\010H\001\210\001\001B\025\n" + + "\023_citation_thresholdB\033\n" + + "\031_enable_claim_level_score\"\253\003\n" + "\025CheckGroundingRequest\022P\n" + "\020grounding_config\030\001 \001(\tB6\340A\002\372A0\n" + ".discoveryengine.googleapis.com/GroundingConfig\022\030\n" + "\020answer_candidate\030\002 \001(\t\022A\n" + "\005facts\030\003 \003(\01322.google.cloud.discoveryengine.v1beta.GroundingFact\022O\n" - + "\016grounding_spec\030\004" - + " \001(\01327.google.cloud.discoveryengine.v1beta.CheckGroundingSpec\022_\n" - + "\013user_labels\030\005 \003(\0132J.google.cloud.discove" - + "ryengine.v1beta.CheckGroundingRequest.UserLabelsEntry\0321\n" + + "\016grounding_spec\030\004 \001(\01327.google.clou" + + "d.discoveryengine.v1beta.CheckGroundingSpec\022_\n" + + "\013user_labels\030\005 \003(\0132J.google.cloud." + + "discoveryengine.v1beta.CheckGroundingRequest.UserLabelsEntry\0321\n" + "\017UserLabelsEntry\022\013\n" + "\003key\030\001 \001(\t\022\r\n" - + "\005value\030\002 \001(\t:\0028\001\"\274\004\n" + + "\005value\030\002 \001(\t:\0028\001\"\332\004\n" + "\026CheckGroundingResponse\022\032\n\r" + "support_score\030\001 \001(\002H\000\210\001\001\022D\n" + "\014cited_chunks\030\003" + " \003(\0132..google.cloud.discoveryengine.v1beta.FactChunk\022h\n" - + "\013cited_facts\030\006 \003(\0132S.google.cloud.discoveryengin" - + "e.v1beta.CheckGroundingResponse.CheckGroundingFactChunk\022Q\n" - + "\006claims\030\004 \003(\0132A.google" - + ".cloud.discoveryengine.v1beta.CheckGroundingResponse.Claim\032-\n" + + "\013cited_facts\030\006 \003(\0132S.google.cloud.discove" + + "ryengine.v1beta.CheckGroundingResponse.CheckGroundingFactChunk\022Q\n" + + "\006claims\030\004 \003(\0132A" + + ".google.cloud.discoveryengine.v1beta.CheckGroundingResponse.Claim\032-\n" + "\027CheckGroundingFactChunk\022\022\n\n" - + "chunk_text\030\001 \001(\t\032\301\001\n" + + "chunk_text\030\001 \001(\t\032\337\001\n" + "\005Claim\022\026\n" + "\tstart_pos\030\001 \001(\005H\000\210\001\001\022\024\n" + "\007end_pos\030\002 \001(\005H\001\210\001\001\022\022\n\n" + "claim_text\030\003 \001(\t\022\030\n" + "\020citation_indices\030\004 \003(\005\022%\n" - + "\030grounding_check_required\030\006 \001(\010H\002\210\001\001B\014\n\n" + + "\030grounding_check_required\030\006 \001(\010H\002\210\001\001\022\022\n" + + "\005score\030\007 \001(\001H\003\210\001\001B\014\n\n" + "_start_posB\n\n" + "\010_end_posB\033\n" - + "\031_grounding_check_requiredB\020\n" - + "\016_support_score2\314\006\n" + + "\031_grounding_check_requiredB\010\n" + + "\006_scoreB\020\n" + + "\016_support_score\"Y\n" + + "\020CitationMetadata\022E\n" + + "\tcitations\030\001 \003(\0132-.go" + + "ogle.cloud.discoveryengine.v1beta.CitationB\003\340A\003\"\222\003\n" + + "\010Citation\022\030\n" + + "\013start_index\030\001 \001(\005B\003\340A\003\022\026\n" + + "\tend_index\030\002 \001(\005B\003\340A\003\022\020\n" + + "\003uri\030\003 \001(\tB\003\340A\003\022\022\n" + + "\005title\030\004 \001(\tB\003\340A\003\022\024\n" + + "\007license\030\005 \001(\tB\003\340A\003\0220\n" + + "\020publication_date\030\006 \001(\0132\021.google.type.DateB\003\340A\003\"\345\001\n" + + "\023PhishBlockThreshold\022%\n" + + "!PHISH_BLOCK_THRESHOLD_UNSPECIFIED\020\000\022\027\n" + + "\023BLOCK_LOW_AND_ABOVE\020\036\022\032\n" + + "\026BLOCK_MEDIUM_AND_ABOVE\020(\022\030\n" + + "\024BLOCK_HIGH_AND_ABOVE\0202\022\032\n" + + "\026BLOCK_HIGHER_AND_ABOVE\0207\022\035\n" + + "\031BLOCK_VERY_HIGH_AND_ABOVE\020<\022\035\n" + + "\031BLOCK_ONLY_EXTREMELY_HIGH\020d2\312\007\n" + "\031GroundedGenerationService\022\202\002\n" - + "\035StreamGenerateGroundedContent\022C.google.cloud.d" - + "iscoveryengine.v1beta.GenerateGroundedContentRequest\032D.google.cloud.discoveryeng" - + "ine.v1beta.GenerateGroundedContentRespon" - + "se\"R\202\323\344\223\002L\"G/v1beta/{location=projects/*" - + "/locations/*}:streamGenerateGroundedContent:\001*(\0010\001\022\362\001\n" - + "\027GenerateGroundedContent\022C.google.cloud.discoveryengine.v1beta.Gen" - + "erateGroundedContentRequest\032D.google.cloud.discoveryengine.v1beta.GenerateGround" - + "edContentResponse\"L\202\323\344\223\002F\"A/v1beta/{loca" - + "tion=projects/*/locations/*}:generateGroundedContent:\001*\022\340\001\n" - + "\016CheckGrounding\022:.google.cloud.discoveryengine.v1beta.CheckGr" - + "oundingRequest\032;.google.cloud.discoverye" - + "ngine.v1beta.CheckGroundingResponse\"U\202\323\344" - + "\223\002O\"J/v1beta/{grounding_config=projects/" - + "*/locations/*/groundingConfigs/*}:check:" - + "\001*\032R\312A\036discoveryengine.googleapis.com\322A." - + "https://www.googleapis.com/auth/cloud-platformB\245\002\n" - + "\'com.google.cloud.discoveryengine.v1betaB\036GroundedGenerationServicePro" - + "toP\001ZQcloud.google.com/go/discoveryengine/apiv1beta/discoveryenginepb;discoverye" - + "nginepb\242\002\017DISCOVERYENGINE\252\002#Google.Cloud" - + ".DiscoveryEngine.V1Beta\312\002#Google\\Cloud\\D" - + "iscoveryEngine\\V1beta\352\002&Google::Cloud::DiscoveryEngine::V1betab\006proto3" + + "\035StreamGenerateGroundedContent\022C.google.cloud.discoveryengine.v1beta.Gener" + + "ateGroundedContentRequest\032D.google.cloud.discoveryengine.v1beta.GenerateGrounded" + + "ContentResponse\"R\202\323\344\223\002L\"G/v1beta/{locati" + + "on=projects/*/locations/*}:streamGenerateGroundedContent:\001*(\0010\001\022\362\001\n" + + "\027GenerateGroundedContent\022C.google.cloud.discoveryengi" + + "ne.v1beta.GenerateGroundedContentRequest\032D.google.cloud.discoveryengine.v1beta.G" + + "enerateGroundedContentResponse\"L\202\323\344\223\002F\"A" + + "/v1beta/{location=projects/*/locations/*}:generateGroundedContent:\001*\022\340\001\n" + + "\016CheckGrounding\022:.google.cloud.discoveryengine.v" + + "1beta.CheckGroundingRequest\032;.google.cloud.discoveryengine.v1beta.CheckGrounding" + + "Response\"U\202\323\344\223\002O\"J/v1beta/{grounding_con" + + "fig=projects/*/locations/*/groundingConf" + + "igs/*}:check:\001*\032\317\001\312A\036discoveryengine.goo" + + "gleapis.com\322A\252\001https://www.googleapis.co" + + "m/auth/cloud-platform,https://www.googleapis.com/auth/discoveryengine.readwrite," + + "https://www.googleapis.com/auth/discoveryengine.serving.readwriteB\245\002\n" + + "\'com.google.cloud.discoveryengine.v1betaB\036GroundedG" + + "enerationServiceProtoP\001ZQcloud.google.com/go/discoveryengine/apiv1beta/discovery" + + "enginepb;discoveryenginepb\242\002\017DISCOVERYEN" + + "GINE\252\002#Google.Cloud.DiscoveryEngine.V1Be" + + "ta\312\002#Google\\Cloud\\DiscoveryEngine\\V1beta" + + "\352\002&Google::Cloud::DiscoveryEngine::V1betab\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -375,6 +467,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.api.FieldBehaviorProto.getDescriptor(), com.google.api.ResourceProto.getDescriptor(), com.google.cloud.discoveryengine.v1beta.GroundingProto.getDescriptor(), + com.google.type.DateProto.getDescriptor(), }); internal_static_google_cloud_discoveryengine_v1beta_GroundedGenerationContent_descriptor = getDescriptor().getMessageType(0); @@ -419,8 +512,10 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "TopP", "TopK", "FrequencyPenalty", + "Seed", "PresencePenalty", "MaxOutputTokens", + "ProvisionedThroughputSetting", }); internal_static_google_cloud_discoveryengine_v1beta_GenerateGroundedContentRequest_DynamicRetrievalConfiguration_descriptor = internal_static_google_cloud_discoveryengine_v1beta_GenerateGroundedContentRequest_descriptor @@ -447,7 +542,11 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_cloud_discoveryengine_v1beta_GenerateGroundedContentRequest_GroundingSource_descriptor, new java.lang.String[] { - "InlineSource", "SearchSource", "GoogleSearchSource", "Source", + "InlineSource", + "SearchSource", + "GoogleSearchSource", + "EnterpriseWebRetrievalSource", + "Source", }); internal_static_google_cloud_discoveryengine_v1beta_GenerateGroundedContentRequest_GroundingSource_InlineSource_descriptor = internal_static_google_cloud_discoveryengine_v1beta_GenerateGroundedContentRequest_GroundingSource_descriptor @@ -483,7 +582,16 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_cloud_discoveryengine_v1beta_GenerateGroundedContentRequest_GroundingSource_GoogleSearchSource_descriptor, new java.lang.String[] { - "DynamicRetrievalConfig", + "DynamicRetrievalConfig", "ExcludeDomains", "BlockingConfidence", + }); + internal_static_google_cloud_discoveryengine_v1beta_GenerateGroundedContentRequest_GroundingSource_EnterpriseWebRetrievalSource_descriptor = + internal_static_google_cloud_discoveryengine_v1beta_GenerateGroundedContentRequest_GroundingSource_descriptor + .getNestedType(3); + internal_static_google_cloud_discoveryengine_v1beta_GenerateGroundedContentRequest_GroundingSource_EnterpriseWebRetrievalSource_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1beta_GenerateGroundedContentRequest_GroundingSource_EnterpriseWebRetrievalSource_descriptor, + new java.lang.String[] { + "ExcludeDomains", "BlockingConfidence", }); internal_static_google_cloud_discoveryengine_v1beta_GenerateGroundedContentRequest_GroundingSpec_descriptor = internal_static_google_cloud_discoveryengine_v1beta_GenerateGroundedContentRequest_descriptor @@ -532,6 +640,8 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "WebSearchQueries", "SearchEntryPoint", "GroundingSupport", + "Images", + "Videos", }); internal_static_google_cloud_discoveryengine_v1beta_GenerateGroundedContentResponse_Candidate_GroundingMetadata_RetrievalMetadata_descriptor = internal_static_google_cloud_discoveryengine_v1beta_GenerateGroundedContentResponse_Candidate_GroundingMetadata_descriptor @@ -578,13 +688,49 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "ClaimText", "SupportChunkIndices", "SupportScore", }); + internal_static_google_cloud_discoveryengine_v1beta_GenerateGroundedContentResponse_Candidate_GroundingMetadata_ImageMetadata_descriptor = + internal_static_google_cloud_discoveryengine_v1beta_GenerateGroundedContentResponse_Candidate_GroundingMetadata_descriptor + .getNestedType(5); + internal_static_google_cloud_discoveryengine_v1beta_GenerateGroundedContentResponse_Candidate_GroundingMetadata_ImageMetadata_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1beta_GenerateGroundedContentResponse_Candidate_GroundingMetadata_ImageMetadata_descriptor, + new java.lang.String[] { + "Image", "Thumbnail", "Source", + }); + internal_static_google_cloud_discoveryengine_v1beta_GenerateGroundedContentResponse_Candidate_GroundingMetadata_ImageMetadata_WebsiteInfo_descriptor = + internal_static_google_cloud_discoveryengine_v1beta_GenerateGroundedContentResponse_Candidate_GroundingMetadata_ImageMetadata_descriptor + .getNestedType(0); + internal_static_google_cloud_discoveryengine_v1beta_GenerateGroundedContentResponse_Candidate_GroundingMetadata_ImageMetadata_WebsiteInfo_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1beta_GenerateGroundedContentResponse_Candidate_GroundingMetadata_ImageMetadata_WebsiteInfo_descriptor, + new java.lang.String[] { + "Uri", "Title", "SiteDisplayName", + }); + internal_static_google_cloud_discoveryengine_v1beta_GenerateGroundedContentResponse_Candidate_GroundingMetadata_ImageMetadata_Image_descriptor = + internal_static_google_cloud_discoveryengine_v1beta_GenerateGroundedContentResponse_Candidate_GroundingMetadata_ImageMetadata_descriptor + .getNestedType(1); + internal_static_google_cloud_discoveryengine_v1beta_GenerateGroundedContentResponse_Candidate_GroundingMetadata_ImageMetadata_Image_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1beta_GenerateGroundedContentResponse_Candidate_GroundingMetadata_ImageMetadata_Image_descriptor, + new java.lang.String[] { + "Uri", "Width", "Height", + }); + internal_static_google_cloud_discoveryengine_v1beta_GenerateGroundedContentResponse_Candidate_GroundingMetadata_VideoMetadata_descriptor = + internal_static_google_cloud_discoveryengine_v1beta_GenerateGroundedContentResponse_Candidate_GroundingMetadata_descriptor + .getNestedType(6); + internal_static_google_cloud_discoveryengine_v1beta_GenerateGroundedContentResponse_Candidate_GroundingMetadata_VideoMetadata_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1beta_GenerateGroundedContentResponse_Candidate_GroundingMetadata_VideoMetadata_descriptor, + new java.lang.String[] { + "YoutubeExternalId", + }); internal_static_google_cloud_discoveryengine_v1beta_CheckGroundingSpec_descriptor = getDescriptor().getMessageType(3); internal_static_google_cloud_discoveryengine_v1beta_CheckGroundingSpec_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_cloud_discoveryengine_v1beta_CheckGroundingSpec_descriptor, new java.lang.String[] { - "CitationThreshold", + "CitationThreshold", "EnableClaimLevelScore", }); internal_static_google_cloud_discoveryengine_v1beta_CheckGroundingRequest_descriptor = getDescriptor().getMessageType(4); @@ -627,7 +773,28 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_cloud_discoveryengine_v1beta_CheckGroundingResponse_Claim_descriptor, new java.lang.String[] { - "StartPos", "EndPos", "ClaimText", "CitationIndices", "GroundingCheckRequired", + "StartPos", + "EndPos", + "ClaimText", + "CitationIndices", + "GroundingCheckRequired", + "Score", + }); + internal_static_google_cloud_discoveryengine_v1beta_CitationMetadata_descriptor = + getDescriptor().getMessageType(6); + internal_static_google_cloud_discoveryengine_v1beta_CitationMetadata_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1beta_CitationMetadata_descriptor, + new java.lang.String[] { + "Citations", + }); + internal_static_google_cloud_discoveryengine_v1beta_Citation_descriptor = + getDescriptor().getMessageType(7); + internal_static_google_cloud_discoveryengine_v1beta_Citation_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1beta_Citation_descriptor, + new java.lang.String[] { + "StartIndex", "EndIndex", "Uri", "Title", "License", "PublicationDate", }); descriptor.resolveAllFeaturesImmutable(); com.google.api.AnnotationsProto.getDescriptor(); @@ -635,6 +802,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.api.FieldBehaviorProto.getDescriptor(); com.google.api.ResourceProto.getDescriptor(); com.google.cloud.discoveryengine.v1beta.GroundingProto.getDescriptor(); + com.google.type.DateProto.getDescriptor(); com.google.protobuf.ExtensionRegistry registry = com.google.protobuf.ExtensionRegistry.newInstance(); registry.add(com.google.api.ClientProto.defaultHost); diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/GroundingProto.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/GroundingProto.java index 1511fc6b9861..d8874823097a 100644 --- a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/GroundingProto.java +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/GroundingProto.java @@ -84,22 +84,25 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "ryengine.v1beta.GroundingFact.AttributesEntry\0321\n" + "\017AttributesEntry\022\013\n" + "\003key\030\001 \001(\t\022\r\n" - + "\005value\030\002 \001(\t:\0028\001\"\322\001\n" + + "\005value\030\002 \001(\t:\0028\001\"\376\001\n" + "\tFactChunk\022\022\n\n" + "chunk_text\030\001 \001(\t\022\016\n" + "\006source\030\002 \001(\t\022\r\n" + "\005index\030\004 \001(\005\022[\n" + "\017source_metadata\030\003 \003(\0132B.google.clou" - + "d.discoveryengine.v1beta.FactChunk.SourceMetadataEntry\0325\n" + + "d.discoveryengine.v1beta.FactChunk.SourceMetadataEntry\022\013\n" + + "\003uri\030\005 \001(\t\022\r\n" + + "\005title\030\006 \001(\t\022\016\n" + + "\006domain\030\007 \001(\t\0325\n" + "\023SourceMetadataEntry\022\013\n" + "\003key\030\001 \001(\t\022\r\n" + "\005value\030\002 \001(\t:\0028\001B\225\002\n" - + "\'com.google.cloud.discoveryengine.v1betaB\016Groun" - + "dingProtoP\001ZQcloud.google.com/go/discoveryengine/apiv1beta/discoveryenginepb;dis" - + "coveryenginepb\242\002\017DISCOVERYENGINE\252\002#Googl" - + "e.Cloud.DiscoveryEngine.V1Beta\312\002#Google\\" - + "Cloud\\DiscoveryEngine\\V1beta\352\002&Google::C" - + "loud::DiscoveryEngine::V1betab\006proto3" + + "\'com.google.cloud.discoveryengine.v1betaB\016G" + + "roundingProtoP\001ZQcloud.google.com/go/discoveryengine/apiv1beta/discoveryenginepb" + + ";discoveryenginepb\242\002\017DISCOVERYENGINE\252\002#G" + + "oogle.Cloud.DiscoveryEngine.V1Beta\312\002#Goo" + + "gle\\Cloud\\DiscoveryEngine\\V1beta\352\002&Googl" + + "e::Cloud::DiscoveryEngine::V1betab\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -139,7 +142,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_cloud_discoveryengine_v1beta_FactChunk_descriptor, new java.lang.String[] { - "ChunkText", "Source", "Index", "SourceMetadata", + "ChunkText", "Source", "Index", "SourceMetadata", "Uri", "Title", "Domain", }); internal_static_google_cloud_discoveryengine_v1beta_FactChunk_SourceMetadataEntry_descriptor = internal_static_google_cloud_discoveryengine_v1beta_FactChunk_descriptor.getNestedType(0); diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/HarmCategory.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/HarmCategory.java new file mode 100644 index 000000000000..e9ee6e7914e4 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/HarmCategory.java @@ -0,0 +1,262 @@ +/* + * 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/cloud/discoveryengine/v1beta/safety.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.discoveryengine.v1beta; + +/** + * + * + *
            + * Harm categories that will block the content.
            + * 
            + * + * Protobuf enum {@code google.cloud.discoveryengine.v1beta.HarmCategory} + */ +@com.google.protobuf.Generated +public enum HarmCategory implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
            +   * The harm category is unspecified.
            +   * 
            + * + * HARM_CATEGORY_UNSPECIFIED = 0; + */ + HARM_CATEGORY_UNSPECIFIED(0), + /** + * + * + *
            +   * The harm category is hate speech.
            +   * 
            + * + * HARM_CATEGORY_HATE_SPEECH = 1; + */ + HARM_CATEGORY_HATE_SPEECH(1), + /** + * + * + *
            +   * The harm category is dangerous content.
            +   * 
            + * + * HARM_CATEGORY_DANGEROUS_CONTENT = 2; + */ + HARM_CATEGORY_DANGEROUS_CONTENT(2), + /** + * + * + *
            +   * The harm category is harassment.
            +   * 
            + * + * HARM_CATEGORY_HARASSMENT = 3; + */ + HARM_CATEGORY_HARASSMENT(3), + /** + * + * + *
            +   * The harm category is sexually explicit content.
            +   * 
            + * + * HARM_CATEGORY_SEXUALLY_EXPLICIT = 4; + */ + HARM_CATEGORY_SEXUALLY_EXPLICIT(4), + /** + * + * + *
            +   * The harm category is civic integrity.
            +   * 
            + * + * HARM_CATEGORY_CIVIC_INTEGRITY = 5; + */ + HARM_CATEGORY_CIVIC_INTEGRITY(5), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "HarmCategory"); + } + + /** + * + * + *
            +   * The harm category is unspecified.
            +   * 
            + * + * HARM_CATEGORY_UNSPECIFIED = 0; + */ + public static final int HARM_CATEGORY_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
            +   * The harm category is hate speech.
            +   * 
            + * + * HARM_CATEGORY_HATE_SPEECH = 1; + */ + public static final int HARM_CATEGORY_HATE_SPEECH_VALUE = 1; + + /** + * + * + *
            +   * The harm category is dangerous content.
            +   * 
            + * + * HARM_CATEGORY_DANGEROUS_CONTENT = 2; + */ + public static final int HARM_CATEGORY_DANGEROUS_CONTENT_VALUE = 2; + + /** + * + * + *
            +   * The harm category is harassment.
            +   * 
            + * + * HARM_CATEGORY_HARASSMENT = 3; + */ + public static final int HARM_CATEGORY_HARASSMENT_VALUE = 3; + + /** + * + * + *
            +   * The harm category is sexually explicit content.
            +   * 
            + * + * HARM_CATEGORY_SEXUALLY_EXPLICIT = 4; + */ + public static final int HARM_CATEGORY_SEXUALLY_EXPLICIT_VALUE = 4; + + /** + * + * + *
            +   * The harm category is civic integrity.
            +   * 
            + * + * HARM_CATEGORY_CIVIC_INTEGRITY = 5; + */ + public static final int HARM_CATEGORY_CIVIC_INTEGRITY_VALUE = 5; + + 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 HarmCategory 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 HarmCategory forNumber(int value) { + switch (value) { + case 0: + return HARM_CATEGORY_UNSPECIFIED; + case 1: + return HARM_CATEGORY_HATE_SPEECH; + case 2: + return HARM_CATEGORY_DANGEROUS_CONTENT; + case 3: + return HARM_CATEGORY_HARASSMENT; + case 4: + return HARM_CATEGORY_SEXUALLY_EXPLICIT; + case 5: + return HARM_CATEGORY_CIVIC_INTEGRITY; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public HarmCategory findValueByNumber(int number) { + return HarmCategory.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.SafetyProto.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final HarmCategory[] VALUES = values(); + + public static HarmCategory valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private HarmCategory(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.discoveryengine.v1beta.HarmCategory) +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/HealthcareFhirConfig.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/HealthcareFhirConfig.java new file mode 100644 index 000000000000..6313cc97e21a --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/HealthcareFhirConfig.java @@ -0,0 +1,1011 @@ +/* + * 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/cloud/discoveryengine/v1beta/common.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.discoveryengine.v1beta; + +/** + * + * + *
            + * Config to data store for `HEALTHCARE_FHIR` vertical.
            + * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.HealthcareFhirConfig} + */ +@com.google.protobuf.Generated +public final class HealthcareFhirConfig extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.HealthcareFhirConfig) + HealthcareFhirConfigOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "HealthcareFhirConfig"); + } + + // Use HealthcareFhirConfig.newBuilder() to construct. + private HealthcareFhirConfig(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private HealthcareFhirConfig() { + initialFilterGroups_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.CommonProto + .internal_static_google_cloud_discoveryengine_v1beta_HealthcareFhirConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.CommonProto + .internal_static_google_cloud_discoveryengine_v1beta_HealthcareFhirConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.HealthcareFhirConfig.class, + com.google.cloud.discoveryengine.v1beta.HealthcareFhirConfig.Builder.class); + } + + public static final int ENABLE_CONFIGURABLE_SCHEMA_FIELD_NUMBER = 1; + private boolean enableConfigurableSchema_ = false; + + /** + * + * + *
            +   * Whether to enable configurable schema for `HEALTHCARE_FHIR` vertical.
            +   *
            +   * If set to `true`, the predefined healthcare fhir schema can be extended
            +   * for more customized searching and filtering.
            +   * 
            + * + * bool enable_configurable_schema = 1; + * + * @return The enableConfigurableSchema. + */ + @java.lang.Override + public boolean getEnableConfigurableSchema() { + return enableConfigurableSchema_; + } + + public static final int ENABLE_STATIC_INDEXING_FOR_BATCH_INGESTION_FIELD_NUMBER = 2; + private boolean enableStaticIndexingForBatchIngestion_ = false; + + /** + * + * + *
            +   * Whether to enable static indexing for `HEALTHCARE_FHIR` batch
            +   * ingestion.
            +   *
            +   * If set to `true`, the batch ingestion will be processed in a static
            +   * indexing mode which is slower but more capable of handling larger
            +   * volume.
            +   * 
            + * + * bool enable_static_indexing_for_batch_ingestion = 2; + * + * @return The enableStaticIndexingForBatchIngestion. + */ + @java.lang.Override + public boolean getEnableStaticIndexingForBatchIngestion() { + return enableStaticIndexingForBatchIngestion_; + } + + public static final int INITIAL_FILTER_GROUPS_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList initialFilterGroups_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + /** + * + * + *
            +   * Optional. Names of the Group resources to use as a basis for the initial
            +   * patient filter, in format
            +   * `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/fhirStores/{fhir_store_id}/fhir/Group/{group_id}`.
            +   * The filter group must be a FHIR resource name of
            +   * type Group, and the filter will be constructed from the direct members of
            +   * the group which are Patient resources.
            +   * 
            + * + * repeated string initial_filter_groups = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the initialFilterGroups. + */ + public com.google.protobuf.ProtocolStringList getInitialFilterGroupsList() { + return initialFilterGroups_; + } + + /** + * + * + *
            +   * Optional. Names of the Group resources to use as a basis for the initial
            +   * patient filter, in format
            +   * `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/fhirStores/{fhir_store_id}/fhir/Group/{group_id}`.
            +   * The filter group must be a FHIR resource name of
            +   * type Group, and the filter will be constructed from the direct members of
            +   * the group which are Patient resources.
            +   * 
            + * + * repeated string initial_filter_groups = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The count of initialFilterGroups. + */ + public int getInitialFilterGroupsCount() { + return initialFilterGroups_.size(); + } + + /** + * + * + *
            +   * Optional. Names of the Group resources to use as a basis for the initial
            +   * patient filter, in format
            +   * `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/fhirStores/{fhir_store_id}/fhir/Group/{group_id}`.
            +   * The filter group must be a FHIR resource name of
            +   * type Group, and the filter will be constructed from the direct members of
            +   * the group which are Patient resources.
            +   * 
            + * + * repeated string initial_filter_groups = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the element to return. + * @return The initialFilterGroups at the given index. + */ + public java.lang.String getInitialFilterGroups(int index) { + return initialFilterGroups_.get(index); + } + + /** + * + * + *
            +   * Optional. Names of the Group resources to use as a basis for the initial
            +   * patient filter, in format
            +   * `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/fhirStores/{fhir_store_id}/fhir/Group/{group_id}`.
            +   * The filter group must be a FHIR resource name of
            +   * type Group, and the filter will be constructed from the direct members of
            +   * the group which are Patient resources.
            +   * 
            + * + * repeated string initial_filter_groups = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the value to return. + * @return The bytes of the initialFilterGroups at the given index. + */ + public com.google.protobuf.ByteString getInitialFilterGroupsBytes(int index) { + return initialFilterGroups_.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 (enableConfigurableSchema_ != false) { + output.writeBool(1, enableConfigurableSchema_); + } + if (enableStaticIndexingForBatchIngestion_ != false) { + output.writeBool(2, enableStaticIndexingForBatchIngestion_); + } + for (int i = 0; i < initialFilterGroups_.size(); i++) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, initialFilterGroups_.getRaw(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (enableConfigurableSchema_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(1, enableConfigurableSchema_); + } + if (enableStaticIndexingForBatchIngestion_ != false) { + size += + com.google.protobuf.CodedOutputStream.computeBoolSize( + 2, enableStaticIndexingForBatchIngestion_); + } + { + int dataSize = 0; + for (int i = 0; i < initialFilterGroups_.size(); i++) { + dataSize += computeStringSizeNoTag(initialFilterGroups_.getRaw(i)); + } + size += dataSize; + size += 1 * getInitialFilterGroupsList().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.discoveryengine.v1beta.HealthcareFhirConfig)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1beta.HealthcareFhirConfig other = + (com.google.cloud.discoveryengine.v1beta.HealthcareFhirConfig) obj; + + if (getEnableConfigurableSchema() != other.getEnableConfigurableSchema()) return false; + if (getEnableStaticIndexingForBatchIngestion() + != other.getEnableStaticIndexingForBatchIngestion()) return false; + if (!getInitialFilterGroupsList().equals(other.getInitialFilterGroupsList())) 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) + ENABLE_CONFIGURABLE_SCHEMA_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getEnableConfigurableSchema()); + hash = (37 * hash) + ENABLE_STATIC_INDEXING_FOR_BATCH_INGESTION_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashBoolean(getEnableStaticIndexingForBatchIngestion()); + if (getInitialFilterGroupsCount() > 0) { + hash = (37 * hash) + INITIAL_FILTER_GROUPS_FIELD_NUMBER; + hash = (53 * hash) + getInitialFilterGroupsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1beta.HealthcareFhirConfig parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.HealthcareFhirConfig 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.discoveryengine.v1beta.HealthcareFhirConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.HealthcareFhirConfig 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.discoveryengine.v1beta.HealthcareFhirConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.HealthcareFhirConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1beta.HealthcareFhirConfig parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.HealthcareFhirConfig 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.discoveryengine.v1beta.HealthcareFhirConfig parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.HealthcareFhirConfig 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.discoveryengine.v1beta.HealthcareFhirConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.HealthcareFhirConfig 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.discoveryengine.v1beta.HealthcareFhirConfig 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; + } + + /** + * + * + *
            +   * Config to data store for `HEALTHCARE_FHIR` vertical.
            +   * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.HealthcareFhirConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.HealthcareFhirConfig) + com.google.cloud.discoveryengine.v1beta.HealthcareFhirConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.CommonProto + .internal_static_google_cloud_discoveryengine_v1beta_HealthcareFhirConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.CommonProto + .internal_static_google_cloud_discoveryengine_v1beta_HealthcareFhirConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.HealthcareFhirConfig.class, + com.google.cloud.discoveryengine.v1beta.HealthcareFhirConfig.Builder.class); + } + + // Construct using com.google.cloud.discoveryengine.v1beta.HealthcareFhirConfig.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + enableConfigurableSchema_ = false; + enableStaticIndexingForBatchIngestion_ = false; + initialFilterGroups_ = com.google.protobuf.LazyStringArrayList.emptyList(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1beta.CommonProto + .internal_static_google_cloud_discoveryengine_v1beta_HealthcareFhirConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.HealthcareFhirConfig + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1beta.HealthcareFhirConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.HealthcareFhirConfig build() { + com.google.cloud.discoveryengine.v1beta.HealthcareFhirConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.HealthcareFhirConfig buildPartial() { + com.google.cloud.discoveryengine.v1beta.HealthcareFhirConfig result = + new com.google.cloud.discoveryengine.v1beta.HealthcareFhirConfig(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.discoveryengine.v1beta.HealthcareFhirConfig result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.enableConfigurableSchema_ = enableConfigurableSchema_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.enableStaticIndexingForBatchIngestion_ = enableStaticIndexingForBatchIngestion_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + initialFilterGroups_.makeImmutable(); + result.initialFilterGroups_ = initialFilterGroups_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.discoveryengine.v1beta.HealthcareFhirConfig) { + return mergeFrom((com.google.cloud.discoveryengine.v1beta.HealthcareFhirConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.discoveryengine.v1beta.HealthcareFhirConfig other) { + if (other + == com.google.cloud.discoveryengine.v1beta.HealthcareFhirConfig.getDefaultInstance()) + return this; + if (other.getEnableConfigurableSchema() != false) { + setEnableConfigurableSchema(other.getEnableConfigurableSchema()); + } + if (other.getEnableStaticIndexingForBatchIngestion() != false) { + setEnableStaticIndexingForBatchIngestion(other.getEnableStaticIndexingForBatchIngestion()); + } + if (!other.initialFilterGroups_.isEmpty()) { + if (initialFilterGroups_.isEmpty()) { + initialFilterGroups_ = other.initialFilterGroups_; + bitField0_ |= 0x00000004; + } else { + ensureInitialFilterGroupsIsMutable(); + initialFilterGroups_.addAll(other.initialFilterGroups_); + } + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + enableConfigurableSchema_ = input.readBool(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 16: + { + enableStaticIndexingForBatchIngestion_ = input.readBool(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureInitialFilterGroupsIsMutable(); + initialFilterGroups_.add(s); + break; + } // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private boolean enableConfigurableSchema_; + + /** + * + * + *
            +     * Whether to enable configurable schema for `HEALTHCARE_FHIR` vertical.
            +     *
            +     * If set to `true`, the predefined healthcare fhir schema can be extended
            +     * for more customized searching and filtering.
            +     * 
            + * + * bool enable_configurable_schema = 1; + * + * @return The enableConfigurableSchema. + */ + @java.lang.Override + public boolean getEnableConfigurableSchema() { + return enableConfigurableSchema_; + } + + /** + * + * + *
            +     * Whether to enable configurable schema for `HEALTHCARE_FHIR` vertical.
            +     *
            +     * If set to `true`, the predefined healthcare fhir schema can be extended
            +     * for more customized searching and filtering.
            +     * 
            + * + * bool enable_configurable_schema = 1; + * + * @param value The enableConfigurableSchema to set. + * @return This builder for chaining. + */ + public Builder setEnableConfigurableSchema(boolean value) { + + enableConfigurableSchema_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Whether to enable configurable schema for `HEALTHCARE_FHIR` vertical.
            +     *
            +     * If set to `true`, the predefined healthcare fhir schema can be extended
            +     * for more customized searching and filtering.
            +     * 
            + * + * bool enable_configurable_schema = 1; + * + * @return This builder for chaining. + */ + public Builder clearEnableConfigurableSchema() { + bitField0_ = (bitField0_ & ~0x00000001); + enableConfigurableSchema_ = false; + onChanged(); + return this; + } + + private boolean enableStaticIndexingForBatchIngestion_; + + /** + * + * + *
            +     * Whether to enable static indexing for `HEALTHCARE_FHIR` batch
            +     * ingestion.
            +     *
            +     * If set to `true`, the batch ingestion will be processed in a static
            +     * indexing mode which is slower but more capable of handling larger
            +     * volume.
            +     * 
            + * + * bool enable_static_indexing_for_batch_ingestion = 2; + * + * @return The enableStaticIndexingForBatchIngestion. + */ + @java.lang.Override + public boolean getEnableStaticIndexingForBatchIngestion() { + return enableStaticIndexingForBatchIngestion_; + } + + /** + * + * + *
            +     * Whether to enable static indexing for `HEALTHCARE_FHIR` batch
            +     * ingestion.
            +     *
            +     * If set to `true`, the batch ingestion will be processed in a static
            +     * indexing mode which is slower but more capable of handling larger
            +     * volume.
            +     * 
            + * + * bool enable_static_indexing_for_batch_ingestion = 2; + * + * @param value The enableStaticIndexingForBatchIngestion to set. + * @return This builder for chaining. + */ + public Builder setEnableStaticIndexingForBatchIngestion(boolean value) { + + enableStaticIndexingForBatchIngestion_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Whether to enable static indexing for `HEALTHCARE_FHIR` batch
            +     * ingestion.
            +     *
            +     * If set to `true`, the batch ingestion will be processed in a static
            +     * indexing mode which is slower but more capable of handling larger
            +     * volume.
            +     * 
            + * + * bool enable_static_indexing_for_batch_ingestion = 2; + * + * @return This builder for chaining. + */ + public Builder clearEnableStaticIndexingForBatchIngestion() { + bitField0_ = (bitField0_ & ~0x00000002); + enableStaticIndexingForBatchIngestion_ = false; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList initialFilterGroups_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureInitialFilterGroupsIsMutable() { + if (!initialFilterGroups_.isModifiable()) { + initialFilterGroups_ = new com.google.protobuf.LazyStringArrayList(initialFilterGroups_); + } + bitField0_ |= 0x00000004; + } + + /** + * + * + *
            +     * Optional. Names of the Group resources to use as a basis for the initial
            +     * patient filter, in format
            +     * `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/fhirStores/{fhir_store_id}/fhir/Group/{group_id}`.
            +     * The filter group must be a FHIR resource name of
            +     * type Group, and the filter will be constructed from the direct members of
            +     * the group which are Patient resources.
            +     * 
            + * + * repeated string initial_filter_groups = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the initialFilterGroups. + */ + public com.google.protobuf.ProtocolStringList getInitialFilterGroupsList() { + initialFilterGroups_.makeImmutable(); + return initialFilterGroups_; + } + + /** + * + * + *
            +     * Optional. Names of the Group resources to use as a basis for the initial
            +     * patient filter, in format
            +     * `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/fhirStores/{fhir_store_id}/fhir/Group/{group_id}`.
            +     * The filter group must be a FHIR resource name of
            +     * type Group, and the filter will be constructed from the direct members of
            +     * the group which are Patient resources.
            +     * 
            + * + * repeated string initial_filter_groups = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The count of initialFilterGroups. + */ + public int getInitialFilterGroupsCount() { + return initialFilterGroups_.size(); + } + + /** + * + * + *
            +     * Optional. Names of the Group resources to use as a basis for the initial
            +     * patient filter, in format
            +     * `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/fhirStores/{fhir_store_id}/fhir/Group/{group_id}`.
            +     * The filter group must be a FHIR resource name of
            +     * type Group, and the filter will be constructed from the direct members of
            +     * the group which are Patient resources.
            +     * 
            + * + * repeated string initial_filter_groups = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the element to return. + * @return The initialFilterGroups at the given index. + */ + public java.lang.String getInitialFilterGroups(int index) { + return initialFilterGroups_.get(index); + } + + /** + * + * + *
            +     * Optional. Names of the Group resources to use as a basis for the initial
            +     * patient filter, in format
            +     * `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/fhirStores/{fhir_store_id}/fhir/Group/{group_id}`.
            +     * The filter group must be a FHIR resource name of
            +     * type Group, and the filter will be constructed from the direct members of
            +     * the group which are Patient resources.
            +     * 
            + * + * repeated string initial_filter_groups = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the value to return. + * @return The bytes of the initialFilterGroups at the given index. + */ + public com.google.protobuf.ByteString getInitialFilterGroupsBytes(int index) { + return initialFilterGroups_.getByteString(index); + } + + /** + * + * + *
            +     * Optional. Names of the Group resources to use as a basis for the initial
            +     * patient filter, in format
            +     * `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/fhirStores/{fhir_store_id}/fhir/Group/{group_id}`.
            +     * The filter group must be a FHIR resource name of
            +     * type Group, and the filter will be constructed from the direct members of
            +     * the group which are Patient resources.
            +     * 
            + * + * repeated string initial_filter_groups = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index to set the value at. + * @param value The initialFilterGroups to set. + * @return This builder for chaining. + */ + public Builder setInitialFilterGroups(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureInitialFilterGroupsIsMutable(); + initialFilterGroups_.set(index, value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Optional. Names of the Group resources to use as a basis for the initial
            +     * patient filter, in format
            +     * `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/fhirStores/{fhir_store_id}/fhir/Group/{group_id}`.
            +     * The filter group must be a FHIR resource name of
            +     * type Group, and the filter will be constructed from the direct members of
            +     * the group which are Patient resources.
            +     * 
            + * + * repeated string initial_filter_groups = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The initialFilterGroups to add. + * @return This builder for chaining. + */ + public Builder addInitialFilterGroups(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureInitialFilterGroupsIsMutable(); + initialFilterGroups_.add(value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Optional. Names of the Group resources to use as a basis for the initial
            +     * patient filter, in format
            +     * `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/fhirStores/{fhir_store_id}/fhir/Group/{group_id}`.
            +     * The filter group must be a FHIR resource name of
            +     * type Group, and the filter will be constructed from the direct members of
            +     * the group which are Patient resources.
            +     * 
            + * + * repeated string initial_filter_groups = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param values The initialFilterGroups to add. + * @return This builder for chaining. + */ + public Builder addAllInitialFilterGroups(java.lang.Iterable values) { + ensureInitialFilterGroupsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, initialFilterGroups_); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Optional. Names of the Group resources to use as a basis for the initial
            +     * patient filter, in format
            +     * `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/fhirStores/{fhir_store_id}/fhir/Group/{group_id}`.
            +     * The filter group must be a FHIR resource name of
            +     * type Group, and the filter will be constructed from the direct members of
            +     * the group which are Patient resources.
            +     * 
            + * + * repeated string initial_filter_groups = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearInitialFilterGroups() { + initialFilterGroups_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + ; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Optional. Names of the Group resources to use as a basis for the initial
            +     * patient filter, in format
            +     * `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/fhirStores/{fhir_store_id}/fhir/Group/{group_id}`.
            +     * The filter group must be a FHIR resource name of
            +     * type Group, and the filter will be constructed from the direct members of
            +     * the group which are Patient resources.
            +     * 
            + * + * repeated string initial_filter_groups = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The bytes of the initialFilterGroups to add. + * @return This builder for chaining. + */ + public Builder addInitialFilterGroupsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureInitialFilterGroupsIsMutable(); + initialFilterGroups_.add(value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.HealthcareFhirConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.HealthcareFhirConfig) + private static final com.google.cloud.discoveryengine.v1beta.HealthcareFhirConfig + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.discoveryengine.v1beta.HealthcareFhirConfig(); + } + + public static com.google.cloud.discoveryengine.v1beta.HealthcareFhirConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public HealthcareFhirConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.HealthcareFhirConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/HealthcareFhirConfigOrBuilder.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/HealthcareFhirConfigOrBuilder.java new file mode 100644 index 000000000000..d87c5016a867 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/HealthcareFhirConfigOrBuilder.java @@ -0,0 +1,140 @@ +/* + * 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/cloud/discoveryengine/v1beta/common.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.discoveryengine.v1beta; + +@com.google.protobuf.Generated +public interface HealthcareFhirConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.HealthcareFhirConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
            +   * Whether to enable configurable schema for `HEALTHCARE_FHIR` vertical.
            +   *
            +   * If set to `true`, the predefined healthcare fhir schema can be extended
            +   * for more customized searching and filtering.
            +   * 
            + * + * bool enable_configurable_schema = 1; + * + * @return The enableConfigurableSchema. + */ + boolean getEnableConfigurableSchema(); + + /** + * + * + *
            +   * Whether to enable static indexing for `HEALTHCARE_FHIR` batch
            +   * ingestion.
            +   *
            +   * If set to `true`, the batch ingestion will be processed in a static
            +   * indexing mode which is slower but more capable of handling larger
            +   * volume.
            +   * 
            + * + * bool enable_static_indexing_for_batch_ingestion = 2; + * + * @return The enableStaticIndexingForBatchIngestion. + */ + boolean getEnableStaticIndexingForBatchIngestion(); + + /** + * + * + *
            +   * Optional. Names of the Group resources to use as a basis for the initial
            +   * patient filter, in format
            +   * `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/fhirStores/{fhir_store_id}/fhir/Group/{group_id}`.
            +   * The filter group must be a FHIR resource name of
            +   * type Group, and the filter will be constructed from the direct members of
            +   * the group which are Patient resources.
            +   * 
            + * + * repeated string initial_filter_groups = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the initialFilterGroups. + */ + java.util.List getInitialFilterGroupsList(); + + /** + * + * + *
            +   * Optional. Names of the Group resources to use as a basis for the initial
            +   * patient filter, in format
            +   * `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/fhirStores/{fhir_store_id}/fhir/Group/{group_id}`.
            +   * The filter group must be a FHIR resource name of
            +   * type Group, and the filter will be constructed from the direct members of
            +   * the group which are Patient resources.
            +   * 
            + * + * repeated string initial_filter_groups = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The count of initialFilterGroups. + */ + int getInitialFilterGroupsCount(); + + /** + * + * + *
            +   * Optional. Names of the Group resources to use as a basis for the initial
            +   * patient filter, in format
            +   * `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/fhirStores/{fhir_store_id}/fhir/Group/{group_id}`.
            +   * The filter group must be a FHIR resource name of
            +   * type Group, and the filter will be constructed from the direct members of
            +   * the group which are Patient resources.
            +   * 
            + * + * repeated string initial_filter_groups = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the element to return. + * @return The initialFilterGroups at the given index. + */ + java.lang.String getInitialFilterGroups(int index); + + /** + * + * + *
            +   * Optional. Names of the Group resources to use as a basis for the initial
            +   * patient filter, in format
            +   * `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/fhirStores/{fhir_store_id}/fhir/Group/{group_id}`.
            +   * The filter group must be a FHIR resource name of
            +   * type Group, and the filter will be constructed from the direct members of
            +   * the group which are Patient resources.
            +   * 
            + * + * repeated string initial_filter_groups = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the value to return. + * @return The bytes of the initialFilterGroups at the given index. + */ + com.google.protobuf.ByteString getInitialFilterGroupsBytes(int index); +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/IdentityMappingEntry.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/IdentityMappingEntry.java new file mode 100644 index 000000000000..eed3200db99f --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/IdentityMappingEntry.java @@ -0,0 +1,1437 @@ +/* + * 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/cloud/discoveryengine/v1beta/identity_mapping_store.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.discoveryengine.v1beta; + +/** + * + * + *
            + * Identity Mapping Entry that maps an external identity to an internal
            + * identity.
            + * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.IdentityMappingEntry} + */ +@com.google.protobuf.Generated +public final class IdentityMappingEntry extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.IdentityMappingEntry) + IdentityMappingEntryOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "IdentityMappingEntry"); + } + + // Use IdentityMappingEntry.newBuilder() to construct. + private IdentityMappingEntry(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private IdentityMappingEntry() { + externalIdentity_ = ""; + externalIdentityName_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.IdentityMappingStoreProto + .internal_static_google_cloud_discoveryengine_v1beta_IdentityMappingEntry_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.IdentityMappingStoreProto + .internal_static_google_cloud_discoveryengine_v1beta_IdentityMappingEntry_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.IdentityMappingEntry.class, + com.google.cloud.discoveryengine.v1beta.IdentityMappingEntry.Builder.class); + } + + private int identityProviderIdCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object identityProviderId_; + + public enum IdentityProviderIdCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + USER_ID(2), + GROUP_ID(3), + IDENTITYPROVIDERID_NOT_SET(0); + private final int value; + + private IdentityProviderIdCase(int value) { + this.value = value; + } + + /** + * @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 IdentityProviderIdCase valueOf(int value) { + return forNumber(value); + } + + public static IdentityProviderIdCase forNumber(int value) { + switch (value) { + case 2: + return USER_ID; + case 3: + return GROUP_ID; + case 0: + return IDENTITYPROVIDERID_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public IdentityProviderIdCase getIdentityProviderIdCase() { + return IdentityProviderIdCase.forNumber(identityProviderIdCase_); + } + + public static final int USER_ID_FIELD_NUMBER = 2; + + /** + * + * + *
            +   * User identifier.
            +   * For Google Workspace user account, user_id should be the google workspace
            +   * user email.
            +   * For non-google identity provider, user_id is the mapped user identifier
            +   * configured during the workforcepool config.
            +   * 
            + * + * string user_id = 2; + * + * @return Whether the userId field is set. + */ + public boolean hasUserId() { + return identityProviderIdCase_ == 2; + } + + /** + * + * + *
            +   * User identifier.
            +   * For Google Workspace user account, user_id should be the google workspace
            +   * user email.
            +   * For non-google identity provider, user_id is the mapped user identifier
            +   * configured during the workforcepool config.
            +   * 
            + * + * string user_id = 2; + * + * @return The userId. + */ + public java.lang.String getUserId() { + java.lang.Object ref = ""; + if (identityProviderIdCase_ == 2) { + ref = identityProviderId_; + } + 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(); + if (identityProviderIdCase_ == 2) { + identityProviderId_ = s; + } + return s; + } + } + + /** + * + * + *
            +   * User identifier.
            +   * For Google Workspace user account, user_id should be the google workspace
            +   * user email.
            +   * For non-google identity provider, user_id is the mapped user identifier
            +   * configured during the workforcepool config.
            +   * 
            + * + * string user_id = 2; + * + * @return The bytes for userId. + */ + public com.google.protobuf.ByteString getUserIdBytes() { + java.lang.Object ref = ""; + if (identityProviderIdCase_ == 2) { + ref = identityProviderId_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (identityProviderIdCase_ == 2) { + identityProviderId_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int GROUP_ID_FIELD_NUMBER = 3; + + /** + * + * + *
            +   * Group identifier.
            +   * For Google Workspace user account, group_id should be the google
            +   * workspace group email.
            +   * For non-google identity provider, group_id is the mapped group identifier
            +   * configured during the workforcepool config.
            +   * 
            + * + * string group_id = 3; + * + * @return Whether the groupId field is set. + */ + public boolean hasGroupId() { + return identityProviderIdCase_ == 3; + } + + /** + * + * + *
            +   * Group identifier.
            +   * For Google Workspace user account, group_id should be the google
            +   * workspace group email.
            +   * For non-google identity provider, group_id is the mapped group identifier
            +   * configured during the workforcepool config.
            +   * 
            + * + * string group_id = 3; + * + * @return The groupId. + */ + public java.lang.String getGroupId() { + java.lang.Object ref = ""; + if (identityProviderIdCase_ == 3) { + ref = identityProviderId_; + } + 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(); + if (identityProviderIdCase_ == 3) { + identityProviderId_ = s; + } + return s; + } + } + + /** + * + * + *
            +   * Group identifier.
            +   * For Google Workspace user account, group_id should be the google
            +   * workspace group email.
            +   * For non-google identity provider, group_id is the mapped group identifier
            +   * configured during the workforcepool config.
            +   * 
            + * + * string group_id = 3; + * + * @return The bytes for groupId. + */ + public com.google.protobuf.ByteString getGroupIdBytes() { + java.lang.Object ref = ""; + if (identityProviderIdCase_ == 3) { + ref = identityProviderId_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (identityProviderIdCase_ == 3) { + identityProviderId_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int EXTERNAL_IDENTITY_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object externalIdentity_ = ""; + + /** + * + * + *
            +   * Required. Identity outside the customer identity provider.
            +   * The length limit of external identity will be of 100 characters.
            +   * 
            + * + * string external_identity = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The externalIdentity. + */ + @java.lang.Override + public java.lang.String getExternalIdentity() { + java.lang.Object ref = externalIdentity_; + 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(); + externalIdentity_ = s; + return s; + } + } + + /** + * + * + *
            +   * Required. Identity outside the customer identity provider.
            +   * The length limit of external identity will be of 100 characters.
            +   * 
            + * + * string external_identity = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for externalIdentity. + */ + @java.lang.Override + public com.google.protobuf.ByteString getExternalIdentityBytes() { + java.lang.Object ref = externalIdentity_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + externalIdentity_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int EXTERNAL_IDENTITY_NAME_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object externalIdentityName_ = ""; + + /** + * + * + *
            +   * Optional. The name of the external identity.
            +   * 
            + * + * string external_identity_name = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The externalIdentityName. + */ + @java.lang.Override + public java.lang.String getExternalIdentityName() { + java.lang.Object ref = externalIdentityName_; + 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(); + externalIdentityName_ = s; + return s; + } + } + + /** + * + * + *
            +   * Optional. The name of the external identity.
            +   * 
            + * + * string external_identity_name = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for externalIdentityName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getExternalIdentityNameBytes() { + java.lang.Object ref = externalIdentityName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + externalIdentityName_ = 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 { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(externalIdentity_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, externalIdentity_); + } + if (identityProviderIdCase_ == 2) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, identityProviderId_); + } + if (identityProviderIdCase_ == 3) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, identityProviderId_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(externalIdentityName_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, externalIdentityName_); + } + 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(externalIdentity_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, externalIdentity_); + } + if (identityProviderIdCase_ == 2) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, identityProviderId_); + } + if (identityProviderIdCase_ == 3) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, identityProviderId_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(externalIdentityName_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, externalIdentityName_); + } + 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.discoveryengine.v1beta.IdentityMappingEntry)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1beta.IdentityMappingEntry other = + (com.google.cloud.discoveryengine.v1beta.IdentityMappingEntry) obj; + + if (!getExternalIdentity().equals(other.getExternalIdentity())) return false; + if (!getExternalIdentityName().equals(other.getExternalIdentityName())) return false; + if (!getIdentityProviderIdCase().equals(other.getIdentityProviderIdCase())) return false; + switch (identityProviderIdCase_) { + case 2: + if (!getUserId().equals(other.getUserId())) return false; + break; + case 3: + if (!getGroupId().equals(other.getGroupId())) return false; + break; + case 0: + default: + } + 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) + EXTERNAL_IDENTITY_FIELD_NUMBER; + hash = (53 * hash) + getExternalIdentity().hashCode(); + hash = (37 * hash) + EXTERNAL_IDENTITY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getExternalIdentityName().hashCode(); + switch (identityProviderIdCase_) { + case 2: + hash = (37 * hash) + USER_ID_FIELD_NUMBER; + hash = (53 * hash) + getUserId().hashCode(); + break; + case 3: + hash = (37 * hash) + GROUP_ID_FIELD_NUMBER; + hash = (53 * hash) + getGroupId().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1beta.IdentityMappingEntry parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.IdentityMappingEntry 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.discoveryengine.v1beta.IdentityMappingEntry parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.IdentityMappingEntry 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.discoveryengine.v1beta.IdentityMappingEntry parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.IdentityMappingEntry parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1beta.IdentityMappingEntry parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.IdentityMappingEntry 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.discoveryengine.v1beta.IdentityMappingEntry parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.IdentityMappingEntry 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.discoveryengine.v1beta.IdentityMappingEntry parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.IdentityMappingEntry 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.discoveryengine.v1beta.IdentityMappingEntry 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; + } + + /** + * + * + *
            +   * Identity Mapping Entry that maps an external identity to an internal
            +   * identity.
            +   * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.IdentityMappingEntry} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.IdentityMappingEntry) + com.google.cloud.discoveryengine.v1beta.IdentityMappingEntryOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.IdentityMappingStoreProto + .internal_static_google_cloud_discoveryengine_v1beta_IdentityMappingEntry_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.IdentityMappingStoreProto + .internal_static_google_cloud_discoveryengine_v1beta_IdentityMappingEntry_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.IdentityMappingEntry.class, + com.google.cloud.discoveryengine.v1beta.IdentityMappingEntry.Builder.class); + } + + // Construct using com.google.cloud.discoveryengine.v1beta.IdentityMappingEntry.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + externalIdentity_ = ""; + externalIdentityName_ = ""; + identityProviderIdCase_ = 0; + identityProviderId_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1beta.IdentityMappingStoreProto + .internal_static_google_cloud_discoveryengine_v1beta_IdentityMappingEntry_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.IdentityMappingEntry + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1beta.IdentityMappingEntry.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.IdentityMappingEntry build() { + com.google.cloud.discoveryengine.v1beta.IdentityMappingEntry result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.IdentityMappingEntry buildPartial() { + com.google.cloud.discoveryengine.v1beta.IdentityMappingEntry result = + new com.google.cloud.discoveryengine.v1beta.IdentityMappingEntry(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.discoveryengine.v1beta.IdentityMappingEntry result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.externalIdentity_ = externalIdentity_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.externalIdentityName_ = externalIdentityName_; + } + } + + private void buildPartialOneofs( + com.google.cloud.discoveryengine.v1beta.IdentityMappingEntry result) { + result.identityProviderIdCase_ = identityProviderIdCase_; + result.identityProviderId_ = this.identityProviderId_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.discoveryengine.v1beta.IdentityMappingEntry) { + return mergeFrom((com.google.cloud.discoveryengine.v1beta.IdentityMappingEntry) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.discoveryengine.v1beta.IdentityMappingEntry other) { + if (other + == com.google.cloud.discoveryengine.v1beta.IdentityMappingEntry.getDefaultInstance()) + return this; + if (!other.getExternalIdentity().isEmpty()) { + externalIdentity_ = other.externalIdentity_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getExternalIdentityName().isEmpty()) { + externalIdentityName_ = other.externalIdentityName_; + bitField0_ |= 0x00000008; + onChanged(); + } + switch (other.getIdentityProviderIdCase()) { + case USER_ID: + { + identityProviderIdCase_ = 2; + identityProviderId_ = other.identityProviderId_; + onChanged(); + break; + } + case GROUP_ID: + { + identityProviderIdCase_ = 3; + identityProviderId_ = other.identityProviderId_; + onChanged(); + break; + } + case IDENTITYPROVIDERID_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + externalIdentity_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 10 + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + identityProviderIdCase_ = 2; + identityProviderId_ = s; + break; + } // case 18 + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + identityProviderIdCase_ = 3; + identityProviderId_ = s; + break; + } // case 26 + case 34: + { + externalIdentityName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int identityProviderIdCase_ = 0; + private java.lang.Object identityProviderId_; + + public IdentityProviderIdCase getIdentityProviderIdCase() { + return IdentityProviderIdCase.forNumber(identityProviderIdCase_); + } + + public Builder clearIdentityProviderId() { + identityProviderIdCase_ = 0; + identityProviderId_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + /** + * + * + *
            +     * User identifier.
            +     * For Google Workspace user account, user_id should be the google workspace
            +     * user email.
            +     * For non-google identity provider, user_id is the mapped user identifier
            +     * configured during the workforcepool config.
            +     * 
            + * + * string user_id = 2; + * + * @return Whether the userId field is set. + */ + @java.lang.Override + public boolean hasUserId() { + return identityProviderIdCase_ == 2; + } + + /** + * + * + *
            +     * User identifier.
            +     * For Google Workspace user account, user_id should be the google workspace
            +     * user email.
            +     * For non-google identity provider, user_id is the mapped user identifier
            +     * configured during the workforcepool config.
            +     * 
            + * + * string user_id = 2; + * + * @return The userId. + */ + @java.lang.Override + public java.lang.String getUserId() { + java.lang.Object ref = ""; + if (identityProviderIdCase_ == 2) { + ref = identityProviderId_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (identityProviderIdCase_ == 2) { + identityProviderId_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
            +     * User identifier.
            +     * For Google Workspace user account, user_id should be the google workspace
            +     * user email.
            +     * For non-google identity provider, user_id is the mapped user identifier
            +     * configured during the workforcepool config.
            +     * 
            + * + * string user_id = 2; + * + * @return The bytes for userId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getUserIdBytes() { + java.lang.Object ref = ""; + if (identityProviderIdCase_ == 2) { + ref = identityProviderId_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (identityProviderIdCase_ == 2) { + identityProviderId_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
            +     * User identifier.
            +     * For Google Workspace user account, user_id should be the google workspace
            +     * user email.
            +     * For non-google identity provider, user_id is the mapped user identifier
            +     * configured during the workforcepool config.
            +     * 
            + * + * string user_id = 2; + * + * @param value The userId to set. + * @return This builder for chaining. + */ + public Builder setUserId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + identityProviderIdCase_ = 2; + identityProviderId_ = value; + onChanged(); + return this; + } + + /** + * + * + *
            +     * User identifier.
            +     * For Google Workspace user account, user_id should be the google workspace
            +     * user email.
            +     * For non-google identity provider, user_id is the mapped user identifier
            +     * configured during the workforcepool config.
            +     * 
            + * + * string user_id = 2; + * + * @return This builder for chaining. + */ + public Builder clearUserId() { + if (identityProviderIdCase_ == 2) { + identityProviderIdCase_ = 0; + identityProviderId_ = null; + onChanged(); + } + return this; + } + + /** + * + * + *
            +     * User identifier.
            +     * For Google Workspace user account, user_id should be the google workspace
            +     * user email.
            +     * For non-google identity provider, user_id is the mapped user identifier
            +     * configured during the workforcepool config.
            +     * 
            + * + * string user_id = 2; + * + * @param value The bytes for userId to set. + * @return This builder for chaining. + */ + public Builder setUserIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + identityProviderIdCase_ = 2; + identityProviderId_ = value; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Group identifier.
            +     * For Google Workspace user account, group_id should be the google
            +     * workspace group email.
            +     * For non-google identity provider, group_id is the mapped group identifier
            +     * configured during the workforcepool config.
            +     * 
            + * + * string group_id = 3; + * + * @return Whether the groupId field is set. + */ + @java.lang.Override + public boolean hasGroupId() { + return identityProviderIdCase_ == 3; + } + + /** + * + * + *
            +     * Group identifier.
            +     * For Google Workspace user account, group_id should be the google
            +     * workspace group email.
            +     * For non-google identity provider, group_id is the mapped group identifier
            +     * configured during the workforcepool config.
            +     * 
            + * + * string group_id = 3; + * + * @return The groupId. + */ + @java.lang.Override + public java.lang.String getGroupId() { + java.lang.Object ref = ""; + if (identityProviderIdCase_ == 3) { + ref = identityProviderId_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (identityProviderIdCase_ == 3) { + identityProviderId_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
            +     * Group identifier.
            +     * For Google Workspace user account, group_id should be the google
            +     * workspace group email.
            +     * For non-google identity provider, group_id is the mapped group identifier
            +     * configured during the workforcepool config.
            +     * 
            + * + * string group_id = 3; + * + * @return The bytes for groupId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getGroupIdBytes() { + java.lang.Object ref = ""; + if (identityProviderIdCase_ == 3) { + ref = identityProviderId_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (identityProviderIdCase_ == 3) { + identityProviderId_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
            +     * Group identifier.
            +     * For Google Workspace user account, group_id should be the google
            +     * workspace group email.
            +     * For non-google identity provider, group_id is the mapped group identifier
            +     * configured during the workforcepool config.
            +     * 
            + * + * string group_id = 3; + * + * @param value The groupId to set. + * @return This builder for chaining. + */ + public Builder setGroupId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + identityProviderIdCase_ = 3; + identityProviderId_ = value; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Group identifier.
            +     * For Google Workspace user account, group_id should be the google
            +     * workspace group email.
            +     * For non-google identity provider, group_id is the mapped group identifier
            +     * configured during the workforcepool config.
            +     * 
            + * + * string group_id = 3; + * + * @return This builder for chaining. + */ + public Builder clearGroupId() { + if (identityProviderIdCase_ == 3) { + identityProviderIdCase_ = 0; + identityProviderId_ = null; + onChanged(); + } + return this; + } + + /** + * + * + *
            +     * Group identifier.
            +     * For Google Workspace user account, group_id should be the google
            +     * workspace group email.
            +     * For non-google identity provider, group_id is the mapped group identifier
            +     * configured during the workforcepool config.
            +     * 
            + * + * string group_id = 3; + * + * @param value The bytes for groupId to set. + * @return This builder for chaining. + */ + public Builder setGroupIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + identityProviderIdCase_ = 3; + identityProviderId_ = value; + onChanged(); + return this; + } + + private java.lang.Object externalIdentity_ = ""; + + /** + * + * + *
            +     * Required. Identity outside the customer identity provider.
            +     * The length limit of external identity will be of 100 characters.
            +     * 
            + * + * string external_identity = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The externalIdentity. + */ + public java.lang.String getExternalIdentity() { + java.lang.Object ref = externalIdentity_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + externalIdentity_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
            +     * Required. Identity outside the customer identity provider.
            +     * The length limit of external identity will be of 100 characters.
            +     * 
            + * + * string external_identity = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for externalIdentity. + */ + public com.google.protobuf.ByteString getExternalIdentityBytes() { + java.lang.Object ref = externalIdentity_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + externalIdentity_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
            +     * Required. Identity outside the customer identity provider.
            +     * The length limit of external identity will be of 100 characters.
            +     * 
            + * + * string external_identity = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The externalIdentity to set. + * @return This builder for chaining. + */ + public Builder setExternalIdentity(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + externalIdentity_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Required. Identity outside the customer identity provider.
            +     * The length limit of external identity will be of 100 characters.
            +     * 
            + * + * string external_identity = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearExternalIdentity() { + externalIdentity_ = getDefaultInstance().getExternalIdentity(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
            +     * Required. Identity outside the customer identity provider.
            +     * The length limit of external identity will be of 100 characters.
            +     * 
            + * + * string external_identity = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for externalIdentity to set. + * @return This builder for chaining. + */ + public Builder setExternalIdentityBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + externalIdentity_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object externalIdentityName_ = ""; + + /** + * + * + *
            +     * Optional. The name of the external identity.
            +     * 
            + * + * string external_identity_name = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The externalIdentityName. + */ + public java.lang.String getExternalIdentityName() { + java.lang.Object ref = externalIdentityName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + externalIdentityName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
            +     * Optional. The name of the external identity.
            +     * 
            + * + * string external_identity_name = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for externalIdentityName. + */ + public com.google.protobuf.ByteString getExternalIdentityNameBytes() { + java.lang.Object ref = externalIdentityName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + externalIdentityName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
            +     * Optional. The name of the external identity.
            +     * 
            + * + * string external_identity_name = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The externalIdentityName to set. + * @return This builder for chaining. + */ + public Builder setExternalIdentityName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + externalIdentityName_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Optional. The name of the external identity.
            +     * 
            + * + * string external_identity_name = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearExternalIdentityName() { + externalIdentityName_ = getDefaultInstance().getExternalIdentityName(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + + /** + * + * + *
            +     * Optional. The name of the external identity.
            +     * 
            + * + * string external_identity_name = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for externalIdentityName to set. + * @return This builder for chaining. + */ + public Builder setExternalIdentityNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + externalIdentityName_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.IdentityMappingEntry) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.IdentityMappingEntry) + private static final com.google.cloud.discoveryengine.v1beta.IdentityMappingEntry + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.discoveryengine.v1beta.IdentityMappingEntry(); + } + + public static com.google.cloud.discoveryengine.v1beta.IdentityMappingEntry getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public IdentityMappingEntry parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.IdentityMappingEntry getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/IdentityMappingEntryOperationMetadata.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/IdentityMappingEntryOperationMetadata.java new file mode 100644 index 000000000000..f1c8611bb4fb --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/IdentityMappingEntryOperationMetadata.java @@ -0,0 +1,730 @@ +/* + * 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/cloud/discoveryengine/v1beta/identity_mapping_store_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.discoveryengine.v1beta; + +/** + * + * + *
            + * IdentityMappingEntry LongRunningOperation metadata for
            + * [IdentityMappingStoreService.ImportIdentityMappings][google.cloud.discoveryengine.v1beta.IdentityMappingStoreService.ImportIdentityMappings]
            + * and
            + * [IdentityMappingStoreService.PurgeIdentityMappings][google.cloud.discoveryengine.v1beta.IdentityMappingStoreService.PurgeIdentityMappings]
            + * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.IdentityMappingEntryOperationMetadata} + */ +@com.google.protobuf.Generated +public final class IdentityMappingEntryOperationMetadata + extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.IdentityMappingEntryOperationMetadata) + IdentityMappingEntryOperationMetadataOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "IdentityMappingEntryOperationMetadata"); + } + + // Use IdentityMappingEntryOperationMetadata.newBuilder() to construct. + private IdentityMappingEntryOperationMetadata( + com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private IdentityMappingEntryOperationMetadata() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.IdentityMappingStoreServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_IdentityMappingEntryOperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.IdentityMappingStoreServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_IdentityMappingEntryOperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.IdentityMappingEntryOperationMetadata.class, + com.google.cloud.discoveryengine.v1beta.IdentityMappingEntryOperationMetadata.Builder + .class); + } + + public static final int SUCCESS_COUNT_FIELD_NUMBER = 1; + private long successCount_ = 0L; + + /** + * + * + *
            +   * The number of IdentityMappingEntries that were successfully processed.
            +   * 
            + * + * int64 success_count = 1; + * + * @return The successCount. + */ + @java.lang.Override + public long getSuccessCount() { + return successCount_; + } + + public static final int FAILURE_COUNT_FIELD_NUMBER = 2; + private long failureCount_ = 0L; + + /** + * + * + *
            +   * The number of IdentityMappingEntries that failed to be processed.
            +   * 
            + * + * int64 failure_count = 2; + * + * @return The failureCount. + */ + @java.lang.Override + public long getFailureCount() { + return failureCount_; + } + + public static final int TOTAL_COUNT_FIELD_NUMBER = 3; + private long totalCount_ = 0L; + + /** + * + * + *
            +   * The total number of IdentityMappingEntries that were processed.
            +   * 
            + * + * int64 total_count = 3; + * + * @return The totalCount. + */ + @java.lang.Override + public long getTotalCount() { + return totalCount_; + } + + 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 (successCount_ != 0L) { + output.writeInt64(1, successCount_); + } + if (failureCount_ != 0L) { + output.writeInt64(2, failureCount_); + } + if (totalCount_ != 0L) { + output.writeInt64(3, totalCount_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (successCount_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(1, successCount_); + } + if (failureCount_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(2, failureCount_); + } + if (totalCount_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(3, totalCount_); + } + 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.discoveryengine.v1beta.IdentityMappingEntryOperationMetadata)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1beta.IdentityMappingEntryOperationMetadata other = + (com.google.cloud.discoveryengine.v1beta.IdentityMappingEntryOperationMetadata) obj; + + if (getSuccessCount() != other.getSuccessCount()) return false; + if (getFailureCount() != other.getFailureCount()) return false; + if (getTotalCount() != other.getTotalCount()) 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) + SUCCESS_COUNT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getSuccessCount()); + hash = (37 * hash) + FAILURE_COUNT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getFailureCount()); + hash = (37 * hash) + TOTAL_COUNT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getTotalCount()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1beta.IdentityMappingEntryOperationMetadata + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.IdentityMappingEntryOperationMetadata + 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.discoveryengine.v1beta.IdentityMappingEntryOperationMetadata + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.IdentityMappingEntryOperationMetadata + 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.discoveryengine.v1beta.IdentityMappingEntryOperationMetadata + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.IdentityMappingEntryOperationMetadata + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1beta.IdentityMappingEntryOperationMetadata + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.IdentityMappingEntryOperationMetadata + 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.discoveryengine.v1beta.IdentityMappingEntryOperationMetadata + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.IdentityMappingEntryOperationMetadata + 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.discoveryengine.v1beta.IdentityMappingEntryOperationMetadata + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.IdentityMappingEntryOperationMetadata + 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.discoveryengine.v1beta.IdentityMappingEntryOperationMetadata 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; + } + + /** + * + * + *
            +   * IdentityMappingEntry LongRunningOperation metadata for
            +   * [IdentityMappingStoreService.ImportIdentityMappings][google.cloud.discoveryengine.v1beta.IdentityMappingStoreService.ImportIdentityMappings]
            +   * and
            +   * [IdentityMappingStoreService.PurgeIdentityMappings][google.cloud.discoveryengine.v1beta.IdentityMappingStoreService.PurgeIdentityMappings]
            +   * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.IdentityMappingEntryOperationMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.IdentityMappingEntryOperationMetadata) + com.google.cloud.discoveryengine.v1beta.IdentityMappingEntryOperationMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.IdentityMappingStoreServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_IdentityMappingEntryOperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.IdentityMappingStoreServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_IdentityMappingEntryOperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.IdentityMappingEntryOperationMetadata.class, + com.google.cloud.discoveryengine.v1beta.IdentityMappingEntryOperationMetadata.Builder + .class); + } + + // Construct using + // com.google.cloud.discoveryengine.v1beta.IdentityMappingEntryOperationMetadata.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + successCount_ = 0L; + failureCount_ = 0L; + totalCount_ = 0L; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1beta.IdentityMappingStoreServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_IdentityMappingEntryOperationMetadata_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.IdentityMappingEntryOperationMetadata + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1beta.IdentityMappingEntryOperationMetadata + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.IdentityMappingEntryOperationMetadata build() { + com.google.cloud.discoveryengine.v1beta.IdentityMappingEntryOperationMetadata result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.IdentityMappingEntryOperationMetadata + buildPartial() { + com.google.cloud.discoveryengine.v1beta.IdentityMappingEntryOperationMetadata result = + new com.google.cloud.discoveryengine.v1beta.IdentityMappingEntryOperationMetadata(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.discoveryengine.v1beta.IdentityMappingEntryOperationMetadata result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.successCount_ = successCount_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.failureCount_ = failureCount_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.totalCount_ = totalCount_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.discoveryengine.v1beta.IdentityMappingEntryOperationMetadata) { + return mergeFrom( + (com.google.cloud.discoveryengine.v1beta.IdentityMappingEntryOperationMetadata) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1beta.IdentityMappingEntryOperationMetadata other) { + if (other + == com.google.cloud.discoveryengine.v1beta.IdentityMappingEntryOperationMetadata + .getDefaultInstance()) return this; + if (other.getSuccessCount() != 0L) { + setSuccessCount(other.getSuccessCount()); + } + if (other.getFailureCount() != 0L) { + setFailureCount(other.getFailureCount()); + } + if (other.getTotalCount() != 0L) { + setTotalCount(other.getTotalCount()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + successCount_ = input.readInt64(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 16: + { + failureCount_ = input.readInt64(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 24: + { + totalCount_ = input.readInt64(); + bitField0_ |= 0x00000004; + break; + } // case 24 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private long successCount_; + + /** + * + * + *
            +     * The number of IdentityMappingEntries that were successfully processed.
            +     * 
            + * + * int64 success_count = 1; + * + * @return The successCount. + */ + @java.lang.Override + public long getSuccessCount() { + return successCount_; + } + + /** + * + * + *
            +     * The number of IdentityMappingEntries that were successfully processed.
            +     * 
            + * + * int64 success_count = 1; + * + * @param value The successCount to set. + * @return This builder for chaining. + */ + public Builder setSuccessCount(long value) { + + successCount_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
            +     * The number of IdentityMappingEntries that were successfully processed.
            +     * 
            + * + * int64 success_count = 1; + * + * @return This builder for chaining. + */ + public Builder clearSuccessCount() { + bitField0_ = (bitField0_ & ~0x00000001); + successCount_ = 0L; + onChanged(); + return this; + } + + private long failureCount_; + + /** + * + * + *
            +     * The number of IdentityMappingEntries that failed to be processed.
            +     * 
            + * + * int64 failure_count = 2; + * + * @return The failureCount. + */ + @java.lang.Override + public long getFailureCount() { + return failureCount_; + } + + /** + * + * + *
            +     * The number of IdentityMappingEntries that failed to be processed.
            +     * 
            + * + * int64 failure_count = 2; + * + * @param value The failureCount to set. + * @return This builder for chaining. + */ + public Builder setFailureCount(long value) { + + failureCount_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
            +     * The number of IdentityMappingEntries that failed to be processed.
            +     * 
            + * + * int64 failure_count = 2; + * + * @return This builder for chaining. + */ + public Builder clearFailureCount() { + bitField0_ = (bitField0_ & ~0x00000002); + failureCount_ = 0L; + onChanged(); + return this; + } + + private long totalCount_; + + /** + * + * + *
            +     * The total number of IdentityMappingEntries that were processed.
            +     * 
            + * + * int64 total_count = 3; + * + * @return The totalCount. + */ + @java.lang.Override + public long getTotalCount() { + return totalCount_; + } + + /** + * + * + *
            +     * The total number of IdentityMappingEntries that were processed.
            +     * 
            + * + * int64 total_count = 3; + * + * @param value The totalCount to set. + * @return This builder for chaining. + */ + public Builder setTotalCount(long value) { + + totalCount_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
            +     * The total number of IdentityMappingEntries that were processed.
            +     * 
            + * + * int64 total_count = 3; + * + * @return This builder for chaining. + */ + public Builder clearTotalCount() { + bitField0_ = (bitField0_ & ~0x00000004); + totalCount_ = 0L; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.IdentityMappingEntryOperationMetadata) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.IdentityMappingEntryOperationMetadata) + private static final com.google.cloud.discoveryengine.v1beta.IdentityMappingEntryOperationMetadata + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.discoveryengine.v1beta.IdentityMappingEntryOperationMetadata(); + } + + public static com.google.cloud.discoveryengine.v1beta.IdentityMappingEntryOperationMetadata + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public IdentityMappingEntryOperationMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.IdentityMappingEntryOperationMetadata + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/IdentityMappingEntryOperationMetadataOrBuilder.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/IdentityMappingEntryOperationMetadataOrBuilder.java new file mode 100644 index 000000000000..e40ccd5aaa0f --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/IdentityMappingEntryOperationMetadataOrBuilder.java @@ -0,0 +1,67 @@ +/* + * 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/cloud/discoveryengine/v1beta/identity_mapping_store_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.discoveryengine.v1beta; + +@com.google.protobuf.Generated +public interface IdentityMappingEntryOperationMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.IdentityMappingEntryOperationMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
            +   * The number of IdentityMappingEntries that were successfully processed.
            +   * 
            + * + * int64 success_count = 1; + * + * @return The successCount. + */ + long getSuccessCount(); + + /** + * + * + *
            +   * The number of IdentityMappingEntries that failed to be processed.
            +   * 
            + * + * int64 failure_count = 2; + * + * @return The failureCount. + */ + long getFailureCount(); + + /** + * + * + *
            +   * The total number of IdentityMappingEntries that were processed.
            +   * 
            + * + * int64 total_count = 3; + * + * @return The totalCount. + */ + long getTotalCount(); +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/IdentityMappingEntryOrBuilder.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/IdentityMappingEntryOrBuilder.java new file mode 100644 index 000000000000..264a544a0f21 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/IdentityMappingEntryOrBuilder.java @@ -0,0 +1,187 @@ +/* + * 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/cloud/discoveryengine/v1beta/identity_mapping_store.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.discoveryengine.v1beta; + +@com.google.protobuf.Generated +public interface IdentityMappingEntryOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.IdentityMappingEntry) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
            +   * User identifier.
            +   * For Google Workspace user account, user_id should be the google workspace
            +   * user email.
            +   * For non-google identity provider, user_id is the mapped user identifier
            +   * configured during the workforcepool config.
            +   * 
            + * + * string user_id = 2; + * + * @return Whether the userId field is set. + */ + boolean hasUserId(); + + /** + * + * + *
            +   * User identifier.
            +   * For Google Workspace user account, user_id should be the google workspace
            +   * user email.
            +   * For non-google identity provider, user_id is the mapped user identifier
            +   * configured during the workforcepool config.
            +   * 
            + * + * string user_id = 2; + * + * @return The userId. + */ + java.lang.String getUserId(); + + /** + * + * + *
            +   * User identifier.
            +   * For Google Workspace user account, user_id should be the google workspace
            +   * user email.
            +   * For non-google identity provider, user_id is the mapped user identifier
            +   * configured during the workforcepool config.
            +   * 
            + * + * string user_id = 2; + * + * @return The bytes for userId. + */ + com.google.protobuf.ByteString getUserIdBytes(); + + /** + * + * + *
            +   * Group identifier.
            +   * For Google Workspace user account, group_id should be the google
            +   * workspace group email.
            +   * For non-google identity provider, group_id is the mapped group identifier
            +   * configured during the workforcepool config.
            +   * 
            + * + * string group_id = 3; + * + * @return Whether the groupId field is set. + */ + boolean hasGroupId(); + + /** + * + * + *
            +   * Group identifier.
            +   * For Google Workspace user account, group_id should be the google
            +   * workspace group email.
            +   * For non-google identity provider, group_id is the mapped group identifier
            +   * configured during the workforcepool config.
            +   * 
            + * + * string group_id = 3; + * + * @return The groupId. + */ + java.lang.String getGroupId(); + + /** + * + * + *
            +   * Group identifier.
            +   * For Google Workspace user account, group_id should be the google
            +   * workspace group email.
            +   * For non-google identity provider, group_id is the mapped group identifier
            +   * configured during the workforcepool config.
            +   * 
            + * + * string group_id = 3; + * + * @return The bytes for groupId. + */ + com.google.protobuf.ByteString getGroupIdBytes(); + + /** + * + * + *
            +   * Required. Identity outside the customer identity provider.
            +   * The length limit of external identity will be of 100 characters.
            +   * 
            + * + * string external_identity = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The externalIdentity. + */ + java.lang.String getExternalIdentity(); + + /** + * + * + *
            +   * Required. Identity outside the customer identity provider.
            +   * The length limit of external identity will be of 100 characters.
            +   * 
            + * + * string external_identity = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for externalIdentity. + */ + com.google.protobuf.ByteString getExternalIdentityBytes(); + + /** + * + * + *
            +   * Optional. The name of the external identity.
            +   * 
            + * + * string external_identity_name = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The externalIdentityName. + */ + java.lang.String getExternalIdentityName(); + + /** + * + * + *
            +   * Optional. The name of the external identity.
            +   * 
            + * + * string external_identity_name = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for externalIdentityName. + */ + com.google.protobuf.ByteString getExternalIdentityNameBytes(); + + com.google.cloud.discoveryengine.v1beta.IdentityMappingEntry.IdentityProviderIdCase + getIdentityProviderIdCase(); +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/IdentityMappingStore.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/IdentityMappingStore.java new file mode 100644 index 000000000000..34f432edfc71 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/IdentityMappingStore.java @@ -0,0 +1,1185 @@ +/* + * 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/cloud/discoveryengine/v1beta/identity_mapping_store.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.discoveryengine.v1beta; + +/** + * + * + *
            + * Identity Mapping Store which contains Identity Mapping Entries.
            + * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.IdentityMappingStore} + */ +@com.google.protobuf.Generated +public final class IdentityMappingStore extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.IdentityMappingStore) + IdentityMappingStoreOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "IdentityMappingStore"); + } + + // Use IdentityMappingStore.newBuilder() to construct. + private IdentityMappingStore(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private IdentityMappingStore() { + name_ = ""; + kmsKeyName_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.IdentityMappingStoreProto + .internal_static_google_cloud_discoveryengine_v1beta_IdentityMappingStore_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.IdentityMappingStoreProto + .internal_static_google_cloud_discoveryengine_v1beta_IdentityMappingStore_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.IdentityMappingStore.class, + com.google.cloud.discoveryengine.v1beta.IdentityMappingStore.Builder.class); + } + + private int bitField0_; + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
            +   * Immutable. The full resource name of the identity mapping store.
            +   * Format:
            +   * `projects/{project}/locations/{location}/identityMappingStores/{identity_mapping_store}`.
            +   * This field must be a UTF-8 encoded string with a length limit of 1024
            +   * characters.
            +   * 
            + * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + 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(); + name_ = s; + return s; + } + } + + /** + * + * + *
            +   * Immutable. The full resource name of the identity mapping store.
            +   * Format:
            +   * `projects/{project}/locations/{location}/identityMappingStores/{identity_mapping_store}`.
            +   * This field must be a UTF-8 encoded string with a length limit of 1024
            +   * characters.
            +   * 
            + * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int KMS_KEY_NAME_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object kmsKeyName_ = ""; + + /** + * + * + *
            +   * Input only. The KMS key to be used to protect this Identity Mapping Store
            +   * at creation time.
            +   *
            +   * Must be set for requests that need to comply with CMEK Org Policy
            +   * protections.
            +   *
            +   * If this field is set and processed successfully, the Identity Mapping Store
            +   * will be protected by the KMS key, as indicated in the cmek_config field.
            +   * 
            + * + * string kms_key_name = 3 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * @return The kmsKeyName. + */ + @java.lang.Override + public java.lang.String getKmsKeyName() { + java.lang.Object ref = kmsKeyName_; + 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(); + kmsKeyName_ = s; + return s; + } + } + + /** + * + * + *
            +   * Input only. The KMS key to be used to protect this Identity Mapping Store
            +   * at creation time.
            +   *
            +   * Must be set for requests that need to comply with CMEK Org Policy
            +   * protections.
            +   *
            +   * If this field is set and processed successfully, the Identity Mapping Store
            +   * will be protected by the KMS key, as indicated in the cmek_config field.
            +   * 
            + * + * string kms_key_name = 3 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * @return The bytes for kmsKeyName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getKmsKeyNameBytes() { + java.lang.Object ref = kmsKeyName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + kmsKeyName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CMEK_CONFIG_FIELD_NUMBER = 4; + private com.google.cloud.discoveryengine.v1beta.CmekConfig cmekConfig_; + + /** + * + * + *
            +   * Output only. CMEK-related information for the Identity Mapping Store.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.CmekConfig cmek_config = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the cmekConfig field is set. + */ + @java.lang.Override + public boolean hasCmekConfig() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
            +   * Output only. CMEK-related information for the Identity Mapping Store.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.CmekConfig cmek_config = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The cmekConfig. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.CmekConfig getCmekConfig() { + return cmekConfig_ == null + ? com.google.cloud.discoveryengine.v1beta.CmekConfig.getDefaultInstance() + : cmekConfig_; + } + + /** + * + * + *
            +   * Output only. CMEK-related information for the Identity Mapping Store.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.CmekConfig cmek_config = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.CmekConfigOrBuilder getCmekConfigOrBuilder() { + return cmekConfig_ == null + ? com.google.cloud.discoveryengine.v1beta.CmekConfig.getDefaultInstance() + : cmekConfig_; + } + + 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(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(kmsKeyName_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, kmsKeyName_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(4, getCmekConfig()); + } + 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(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(kmsKeyName_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, kmsKeyName_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getCmekConfig()); + } + 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.discoveryengine.v1beta.IdentityMappingStore)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1beta.IdentityMappingStore other = + (com.google.cloud.discoveryengine.v1beta.IdentityMappingStore) obj; + + if (!getName().equals(other.getName())) return false; + if (!getKmsKeyName().equals(other.getKmsKeyName())) return false; + if (hasCmekConfig() != other.hasCmekConfig()) return false; + if (hasCmekConfig()) { + if (!getCmekConfig().equals(other.getCmekConfig())) 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) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + KMS_KEY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getKmsKeyName().hashCode(); + if (hasCmekConfig()) { + hash = (37 * hash) + CMEK_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getCmekConfig().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1beta.IdentityMappingStore parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.IdentityMappingStore 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.discoveryengine.v1beta.IdentityMappingStore parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.IdentityMappingStore 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.discoveryengine.v1beta.IdentityMappingStore parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.IdentityMappingStore parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1beta.IdentityMappingStore parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.IdentityMappingStore 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.discoveryengine.v1beta.IdentityMappingStore parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.IdentityMappingStore 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.discoveryengine.v1beta.IdentityMappingStore parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.IdentityMappingStore 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.discoveryengine.v1beta.IdentityMappingStore 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; + } + + /** + * + * + *
            +   * Identity Mapping Store which contains Identity Mapping Entries.
            +   * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.IdentityMappingStore} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.IdentityMappingStore) + com.google.cloud.discoveryengine.v1beta.IdentityMappingStoreOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.IdentityMappingStoreProto + .internal_static_google_cloud_discoveryengine_v1beta_IdentityMappingStore_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.IdentityMappingStoreProto + .internal_static_google_cloud_discoveryengine_v1beta_IdentityMappingStore_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.IdentityMappingStore.class, + com.google.cloud.discoveryengine.v1beta.IdentityMappingStore.Builder.class); + } + + // Construct using com.google.cloud.discoveryengine.v1beta.IdentityMappingStore.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetCmekConfigFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + kmsKeyName_ = ""; + cmekConfig_ = null; + if (cmekConfigBuilder_ != null) { + cmekConfigBuilder_.dispose(); + cmekConfigBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1beta.IdentityMappingStoreProto + .internal_static_google_cloud_discoveryengine_v1beta_IdentityMappingStore_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.IdentityMappingStore + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1beta.IdentityMappingStore.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.IdentityMappingStore build() { + com.google.cloud.discoveryengine.v1beta.IdentityMappingStore result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.IdentityMappingStore buildPartial() { + com.google.cloud.discoveryengine.v1beta.IdentityMappingStore result = + new com.google.cloud.discoveryengine.v1beta.IdentityMappingStore(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.discoveryengine.v1beta.IdentityMappingStore result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.kmsKeyName_ = kmsKeyName_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.cmekConfig_ = cmekConfigBuilder_ == null ? cmekConfig_ : cmekConfigBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.discoveryengine.v1beta.IdentityMappingStore) { + return mergeFrom((com.google.cloud.discoveryengine.v1beta.IdentityMappingStore) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.discoveryengine.v1beta.IdentityMappingStore other) { + if (other + == com.google.cloud.discoveryengine.v1beta.IdentityMappingStore.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getKmsKeyName().isEmpty()) { + kmsKeyName_ = other.kmsKeyName_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasCmekConfig()) { + mergeCmekConfig(other.getCmekConfig()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 26: + { + kmsKeyName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 26 + case 34: + { + input.readMessage( + internalGetCmekConfigFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + + /** + * + * + *
            +     * Immutable. The full resource name of the identity mapping store.
            +     * Format:
            +     * `projects/{project}/locations/{location}/identityMappingStores/{identity_mapping_store}`.
            +     * This field must be a UTF-8 encoded string with a length limit of 1024
            +     * characters.
            +     * 
            + * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
            +     * Immutable. The full resource name of the identity mapping store.
            +     * Format:
            +     * `projects/{project}/locations/{location}/identityMappingStores/{identity_mapping_store}`.
            +     * This field must be a UTF-8 encoded string with a length limit of 1024
            +     * characters.
            +     * 
            + * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
            +     * Immutable. The full resource name of the identity mapping store.
            +     * Format:
            +     * `projects/{project}/locations/{location}/identityMappingStores/{identity_mapping_store}`.
            +     * This field must be a UTF-8 encoded string with a length limit of 1024
            +     * characters.
            +     * 
            + * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Immutable. The full resource name of the identity mapping store.
            +     * Format:
            +     * `projects/{project}/locations/{location}/identityMappingStores/{identity_mapping_store}`.
            +     * This field must be a UTF-8 encoded string with a length limit of 1024
            +     * characters.
            +     * 
            + * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
            +     * Immutable. The full resource name of the identity mapping store.
            +     * Format:
            +     * `projects/{project}/locations/{location}/identityMappingStores/{identity_mapping_store}`.
            +     * This field must be a UTF-8 encoded string with a length limit of 1024
            +     * characters.
            +     * 
            + * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object kmsKeyName_ = ""; + + /** + * + * + *
            +     * Input only. The KMS key to be used to protect this Identity Mapping Store
            +     * at creation time.
            +     *
            +     * Must be set for requests that need to comply with CMEK Org Policy
            +     * protections.
            +     *
            +     * If this field is set and processed successfully, the Identity Mapping Store
            +     * will be protected by the KMS key, as indicated in the cmek_config field.
            +     * 
            + * + * string kms_key_name = 3 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * @return The kmsKeyName. + */ + public java.lang.String getKmsKeyName() { + java.lang.Object ref = kmsKeyName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + kmsKeyName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
            +     * Input only. The KMS key to be used to protect this Identity Mapping Store
            +     * at creation time.
            +     *
            +     * Must be set for requests that need to comply with CMEK Org Policy
            +     * protections.
            +     *
            +     * If this field is set and processed successfully, the Identity Mapping Store
            +     * will be protected by the KMS key, as indicated in the cmek_config field.
            +     * 
            + * + * string kms_key_name = 3 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * @return The bytes for kmsKeyName. + */ + public com.google.protobuf.ByteString getKmsKeyNameBytes() { + java.lang.Object ref = kmsKeyName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + kmsKeyName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
            +     * Input only. The KMS key to be used to protect this Identity Mapping Store
            +     * at creation time.
            +     *
            +     * Must be set for requests that need to comply with CMEK Org Policy
            +     * protections.
            +     *
            +     * If this field is set and processed successfully, the Identity Mapping Store
            +     * will be protected by the KMS key, as indicated in the cmek_config field.
            +     * 
            + * + * string kms_key_name = 3 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * @param value The kmsKeyName to set. + * @return This builder for chaining. + */ + public Builder setKmsKeyName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + kmsKeyName_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Input only. The KMS key to be used to protect this Identity Mapping Store
            +     * at creation time.
            +     *
            +     * Must be set for requests that need to comply with CMEK Org Policy
            +     * protections.
            +     *
            +     * If this field is set and processed successfully, the Identity Mapping Store
            +     * will be protected by the KMS key, as indicated in the cmek_config field.
            +     * 
            + * + * string kms_key_name = 3 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearKmsKeyName() { + kmsKeyName_ = getDefaultInstance().getKmsKeyName(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
            +     * Input only. The KMS key to be used to protect this Identity Mapping Store
            +     * at creation time.
            +     *
            +     * Must be set for requests that need to comply with CMEK Org Policy
            +     * protections.
            +     *
            +     * If this field is set and processed successfully, the Identity Mapping Store
            +     * will be protected by the KMS key, as indicated in the cmek_config field.
            +     * 
            + * + * string kms_key_name = 3 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * @param value The bytes for kmsKeyName to set. + * @return This builder for chaining. + */ + public Builder setKmsKeyNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + kmsKeyName_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.cloud.discoveryengine.v1beta.CmekConfig cmekConfig_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.CmekConfig, + com.google.cloud.discoveryengine.v1beta.CmekConfig.Builder, + com.google.cloud.discoveryengine.v1beta.CmekConfigOrBuilder> + cmekConfigBuilder_; + + /** + * + * + *
            +     * Output only. CMEK-related information for the Identity Mapping Store.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.CmekConfig cmek_config = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the cmekConfig field is set. + */ + public boolean hasCmekConfig() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
            +     * Output only. CMEK-related information for the Identity Mapping Store.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.CmekConfig cmek_config = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The cmekConfig. + */ + public com.google.cloud.discoveryengine.v1beta.CmekConfig getCmekConfig() { + if (cmekConfigBuilder_ == null) { + return cmekConfig_ == null + ? com.google.cloud.discoveryengine.v1beta.CmekConfig.getDefaultInstance() + : cmekConfig_; + } else { + return cmekConfigBuilder_.getMessage(); + } + } + + /** + * + * + *
            +     * Output only. CMEK-related information for the Identity Mapping Store.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.CmekConfig cmek_config = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCmekConfig(com.google.cloud.discoveryengine.v1beta.CmekConfig value) { + if (cmekConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + cmekConfig_ = value; + } else { + cmekConfigBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Output only. CMEK-related information for the Identity Mapping Store.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.CmekConfig cmek_config = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCmekConfig( + com.google.cloud.discoveryengine.v1beta.CmekConfig.Builder builderForValue) { + if (cmekConfigBuilder_ == null) { + cmekConfig_ = builderForValue.build(); + } else { + cmekConfigBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Output only. CMEK-related information for the Identity Mapping Store.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.CmekConfig cmek_config = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCmekConfig(com.google.cloud.discoveryengine.v1beta.CmekConfig value) { + if (cmekConfigBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && cmekConfig_ != null + && cmekConfig_ + != com.google.cloud.discoveryengine.v1beta.CmekConfig.getDefaultInstance()) { + getCmekConfigBuilder().mergeFrom(value); + } else { + cmekConfig_ = value; + } + } else { + cmekConfigBuilder_.mergeFrom(value); + } + if (cmekConfig_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + + /** + * + * + *
            +     * Output only. CMEK-related information for the Identity Mapping Store.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.CmekConfig cmek_config = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCmekConfig() { + bitField0_ = (bitField0_ & ~0x00000004); + cmekConfig_ = null; + if (cmekConfigBuilder_ != null) { + cmekConfigBuilder_.dispose(); + cmekConfigBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
            +     * Output only. CMEK-related information for the Identity Mapping Store.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.CmekConfig cmek_config = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.discoveryengine.v1beta.CmekConfig.Builder getCmekConfigBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return internalGetCmekConfigFieldBuilder().getBuilder(); + } + + /** + * + * + *
            +     * Output only. CMEK-related information for the Identity Mapping Store.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.CmekConfig cmek_config = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.discoveryengine.v1beta.CmekConfigOrBuilder getCmekConfigOrBuilder() { + if (cmekConfigBuilder_ != null) { + return cmekConfigBuilder_.getMessageOrBuilder(); + } else { + return cmekConfig_ == null + ? com.google.cloud.discoveryengine.v1beta.CmekConfig.getDefaultInstance() + : cmekConfig_; + } + } + + /** + * + * + *
            +     * Output only. CMEK-related information for the Identity Mapping Store.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.CmekConfig cmek_config = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.CmekConfig, + com.google.cloud.discoveryengine.v1beta.CmekConfig.Builder, + com.google.cloud.discoveryengine.v1beta.CmekConfigOrBuilder> + internalGetCmekConfigFieldBuilder() { + if (cmekConfigBuilder_ == null) { + cmekConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.CmekConfig, + com.google.cloud.discoveryengine.v1beta.CmekConfig.Builder, + com.google.cloud.discoveryengine.v1beta.CmekConfigOrBuilder>( + getCmekConfig(), getParentForChildren(), isClean()); + cmekConfig_ = null; + } + return cmekConfigBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.IdentityMappingStore) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.IdentityMappingStore) + private static final com.google.cloud.discoveryengine.v1beta.IdentityMappingStore + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.discoveryengine.v1beta.IdentityMappingStore(); + } + + public static com.google.cloud.discoveryengine.v1beta.IdentityMappingStore getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public IdentityMappingStore parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.IdentityMappingStore getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/IdentityMappingStoreName.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/IdentityMappingStoreName.java new file mode 100644 index 000000000000..689a06b377f6 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/IdentityMappingStoreName.java @@ -0,0 +1,232 @@ +/* + * 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.discoveryengine.v1beta; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class IdentityMappingStoreName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_IDENTITY_MAPPING_STORE = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/identityMappingStores/{identity_mapping_store}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + private final String identityMappingStore; + + @Deprecated + protected IdentityMappingStoreName() { + project = null; + location = null; + identityMappingStore = null; + } + + private IdentityMappingStoreName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + identityMappingStore = Preconditions.checkNotNull(builder.getIdentityMappingStore()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getIdentityMappingStore() { + return identityMappingStore; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static IdentityMappingStoreName of( + String project, String location, String identityMappingStore) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setIdentityMappingStore(identityMappingStore) + .build(); + } + + public static String format(String project, String location, String identityMappingStore) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setIdentityMappingStore(identityMappingStore) + .build() + .toString(); + } + + public static IdentityMappingStoreName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_IDENTITY_MAPPING_STORE.validatedMatch( + formattedString, "IdentityMappingStoreName.parse: formattedString not in valid format"); + return of( + matchMap.get("project"), matchMap.get("location"), matchMap.get("identity_mapping_store")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (IdentityMappingStoreName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_IDENTITY_MAPPING_STORE.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (project != null) { + fieldMapBuilder.put("project", project); + } + if (location != null) { + fieldMapBuilder.put("location", location); + } + if (identityMappingStore != null) { + fieldMapBuilder.put("identity_mapping_store", identityMappingStore); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_IDENTITY_MAPPING_STORE.instantiate( + "project", project, "location", location, "identity_mapping_store", identityMappingStore); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null && getClass() == o.getClass()) { + IdentityMappingStoreName that = ((IdentityMappingStoreName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.identityMappingStore, that.identityMappingStore); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(location); + h *= 1000003; + h ^= Objects.hashCode(identityMappingStore); + return h; + } + + /** + * Builder for + * projects/{project}/locations/{location}/identityMappingStores/{identity_mapping_store}. + */ + public static class Builder { + private String project; + private String location; + private String identityMappingStore; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getIdentityMappingStore() { + return identityMappingStore; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setIdentityMappingStore(String identityMappingStore) { + this.identityMappingStore = identityMappingStore; + return this; + } + + private Builder(IdentityMappingStoreName identityMappingStoreName) { + this.project = identityMappingStoreName.project; + this.location = identityMappingStoreName.location; + this.identityMappingStore = identityMappingStoreName.identityMappingStore; + } + + public IdentityMappingStoreName build() { + return new IdentityMappingStoreName(this); + } + } +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/IdentityMappingStoreOrBuilder.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/IdentityMappingStoreOrBuilder.java new file mode 100644 index 000000000000..bd5f11f9db34 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/IdentityMappingStoreOrBuilder.java @@ -0,0 +1,145 @@ +/* + * 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/cloud/discoveryengine/v1beta/identity_mapping_store.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.discoveryengine.v1beta; + +@com.google.protobuf.Generated +public interface IdentityMappingStoreOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.IdentityMappingStore) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
            +   * Immutable. The full resource name of the identity mapping store.
            +   * Format:
            +   * `projects/{project}/locations/{location}/identityMappingStores/{identity_mapping_store}`.
            +   * This field must be a UTF-8 encoded string with a length limit of 1024
            +   * characters.
            +   * 
            + * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
            +   * Immutable. The full resource name of the identity mapping store.
            +   * Format:
            +   * `projects/{project}/locations/{location}/identityMappingStores/{identity_mapping_store}`.
            +   * This field must be a UTF-8 encoded string with a length limit of 1024
            +   * characters.
            +   * 
            + * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
            +   * Input only. The KMS key to be used to protect this Identity Mapping Store
            +   * at creation time.
            +   *
            +   * Must be set for requests that need to comply with CMEK Org Policy
            +   * protections.
            +   *
            +   * If this field is set and processed successfully, the Identity Mapping Store
            +   * will be protected by the KMS key, as indicated in the cmek_config field.
            +   * 
            + * + * string kms_key_name = 3 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * @return The kmsKeyName. + */ + java.lang.String getKmsKeyName(); + + /** + * + * + *
            +   * Input only. The KMS key to be used to protect this Identity Mapping Store
            +   * at creation time.
            +   *
            +   * Must be set for requests that need to comply with CMEK Org Policy
            +   * protections.
            +   *
            +   * If this field is set and processed successfully, the Identity Mapping Store
            +   * will be protected by the KMS key, as indicated in the cmek_config field.
            +   * 
            + * + * string kms_key_name = 3 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * @return The bytes for kmsKeyName. + */ + com.google.protobuf.ByteString getKmsKeyNameBytes(); + + /** + * + * + *
            +   * Output only. CMEK-related information for the Identity Mapping Store.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.CmekConfig cmek_config = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the cmekConfig field is set. + */ + boolean hasCmekConfig(); + + /** + * + * + *
            +   * Output only. CMEK-related information for the Identity Mapping Store.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.CmekConfig cmek_config = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The cmekConfig. + */ + com.google.cloud.discoveryengine.v1beta.CmekConfig getCmekConfig(); + + /** + * + * + *
            +   * Output only. CMEK-related information for the Identity Mapping Store.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.CmekConfig cmek_config = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.discoveryengine.v1beta.CmekConfigOrBuilder getCmekConfigOrBuilder(); +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/IdentityMappingStoreProto.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/IdentityMappingStoreProto.java new file mode 100644 index 000000000000..3a8b2111ecb9 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/IdentityMappingStoreProto.java @@ -0,0 +1,123 @@ +/* + * 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/cloud/discoveryengine/v1beta/identity_mapping_store.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.discoveryengine.v1beta; + +@com.google.protobuf.Generated +public final class IdentityMappingStoreProto extends com.google.protobuf.GeneratedFile { + private IdentityMappingStoreProto() {} + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "IdentityMappingStoreProto"); + } + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1beta_IdentityMappingStore_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1beta_IdentityMappingStore_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1beta_IdentityMappingEntry_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1beta_IdentityMappingEntry_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n@google/cloud/discoveryengine/v1beta/id" + + "entity_mapping_store.proto\022#google.cloud" + + ".discoveryengine.v1beta\032\037google/api/fiel" + + "d_behavior.proto\032\031google/api/resource.pr" + + "oto\032=google/cloud/discoveryengine/v1beta" + + "/cmek_config_service.proto\"\243\002\n\024IdentityM" + + "appingStore\022\021\n\004name\030\001 \001(\tB\003\340A\005\022\031\n\014kms_ke" + + "y_name\030\003 \001(\tB\003\340A\004\022I\n\013cmek_config\030\004 \001(\0132/" + + ".google.cloud.discoveryengine.v1beta.Cme" + + "kConfigB\003\340A\003:\221\001\352A\215\001\n3discoveryengine.goo" + + "gleapis.com/IdentityMappingStore\022Vprojec" + + "ts/{project}/locations/{location}/identi" + + "tyMappingStores/{identity_mapping_store}" + + "\"\232\001\n\024IdentityMappingEntry\022\021\n\007user_id\030\002 \001" + + "(\tH\000\022\022\n\010group_id\030\003 \001(\tH\000\022\036\n\021external_ide" + + "ntity\030\001 \001(\tB\003\340A\002\022#\n\026external_identity_na" + + "me\030\004 \001(\tB\003\340A\001B\026\n\024identity_provider_idB\240\002" + + "\n\'com.google.cloud.discoveryengine.v1bet" + + "aB\031IdentityMappingStoreProtoP\001ZQcloud.go" + + "ogle.com/go/discoveryengine/apiv1beta/di" + + "scoveryenginepb;discoveryenginepb\242\002\017DISC" + + "OVERYENGINE\252\002#Google.Cloud.DiscoveryEngi" + + "ne.V1Beta\312\002#Google\\Cloud\\DiscoveryEngine" + + "\\V1beta\352\002&Google::Cloud::DiscoveryEngine" + + "::V1betab\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.ResourceProto.getDescriptor(), + com.google.cloud.discoveryengine.v1beta.CmekConfigServiceProto.getDescriptor(), + }); + internal_static_google_cloud_discoveryengine_v1beta_IdentityMappingStore_descriptor = + getDescriptor().getMessageType(0); + internal_static_google_cloud_discoveryengine_v1beta_IdentityMappingStore_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1beta_IdentityMappingStore_descriptor, + new java.lang.String[] { + "Name", "KmsKeyName", "CmekConfig", + }); + internal_static_google_cloud_discoveryengine_v1beta_IdentityMappingEntry_descriptor = + getDescriptor().getMessageType(1); + internal_static_google_cloud_discoveryengine_v1beta_IdentityMappingEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1beta_IdentityMappingEntry_descriptor, + new java.lang.String[] { + "UserId", "GroupId", "ExternalIdentity", "ExternalIdentityName", "IdentityProviderId", + }); + descriptor.resolveAllFeaturesImmutable(); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + com.google.cloud.discoveryengine.v1beta.CmekConfigServiceProto.getDescriptor(); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.ResourceProto.resource); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/IdentityMappingStoreServiceProto.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/IdentityMappingStoreServiceProto.java new file mode 100644 index 000000000000..1bbb3826eeb1 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/IdentityMappingStoreServiceProto.java @@ -0,0 +1,400 @@ +/* + * 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/cloud/discoveryengine/v1beta/identity_mapping_store_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.discoveryengine.v1beta; + +@com.google.protobuf.Generated +public final class IdentityMappingStoreServiceProto extends com.google.protobuf.GeneratedFile { + private IdentityMappingStoreServiceProto() {} + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "IdentityMappingStoreServiceProto"); + } + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1beta_CreateIdentityMappingStoreRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1beta_CreateIdentityMappingStoreRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1beta_GetIdentityMappingStoreRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1beta_GetIdentityMappingStoreRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1beta_DeleteIdentityMappingStoreRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1beta_DeleteIdentityMappingStoreRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1beta_ImportIdentityMappingsRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1beta_ImportIdentityMappingsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1beta_ImportIdentityMappingsRequest_InlineSource_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1beta_ImportIdentityMappingsRequest_InlineSource_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1beta_ImportIdentityMappingsResponse_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1beta_ImportIdentityMappingsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1beta_PurgeIdentityMappingsRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1beta_PurgeIdentityMappingsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1beta_PurgeIdentityMappingsRequest_InlineSource_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1beta_PurgeIdentityMappingsRequest_InlineSource_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1beta_ListIdentityMappingsRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1beta_ListIdentityMappingsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1beta_ListIdentityMappingsResponse_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1beta_ListIdentityMappingsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1beta_ListIdentityMappingStoresRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1beta_ListIdentityMappingStoresRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1beta_ListIdentityMappingStoresResponse_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1beta_ListIdentityMappingStoresResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1beta_IdentityMappingEntryOperationMetadata_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1beta_IdentityMappingEntryOperationMetadata_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1beta_DeleteIdentityMappingStoreMetadata_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1beta_DeleteIdentityMappingStoreMetadata_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\nHgoogle/cloud/discoveryengine/v1beta/id" + + "entity_mapping_store_service.proto\022#goog" + + "le.cloud.discoveryengine.v1beta\032\034google/" + + "api/annotations.proto\032\027google/api/client" + + ".proto\032\037google/api/field_behavior.proto\032" + + "\031google/api/resource.proto\032@google/cloud" + + "/discoveryengine/v1beta/identity_mapping" + + "_store.proto\032#google/longrunning/operati" + + "ons.proto\032\033google/protobuf/empty.proto\032\037" + + "google/protobuf/timestamp.proto\032\027google/" + + "rpc/status.proto\"\340\002\n!CreateIdentityMappi" + + "ngStoreRequest\022J\n\020cmek_config_name\030\005 \001(\t" + + "B.\372A+\n)discoveryengine.googleapis.com/Cm" + + "ekConfigH\000\022\026\n\014disable_cmek\030\006 \001(\010H\000\022?\n\006pa" + + "rent\030\001 \001(\tB/\340A\002\372A)\n\'discoveryengine.goog" + + "leapis.com/Location\022&\n\031identity_mapping_" + + "store_id\030\002 \001(\tB\003\340A\002\022^\n\026identity_mapping_" + + "store\030\003 \001(\01329.google.cloud.discoveryengi" + + "ne.v1beta.IdentityMappingStoreB\003\340A\002B\016\n\014c" + + "mek_options\"k\n\036GetIdentityMappingStoreRe" + + "quest\022I\n\004name\030\001 \001(\tB;\340A\002\372A5\n3discoveryen" + + "gine.googleapis.com/IdentityMappingStore" + + "\"n\n!DeleteIdentityMappingStoreRequest\022I\n" + + "\004name\030\001 \001(\tB;\340A\002\372A5\n3discoveryengine.goo" + + "gleapis.com/IdentityMappingStore\"\335\002\n\035Imp" + + "ortIdentityMappingsRequest\022h\n\rinline_sou" + + "rce\030\002 \001(\0132O.google.cloud.discoveryengine" + + ".v1beta.ImportIdentityMappingsRequest.In" + + "lineSourceH\000\022[\n\026identity_mapping_store\030\001" + + " \001(\tB;\340A\002\372A5\n3discoveryengine.googleapis" + + ".com/IdentityMappingStore\032k\n\014InlineSourc" + + "e\022[\n\030identity_mapping_entries\030\001 \003(\01329.go" + + "ogle.cloud.discoveryengine.v1beta.Identi" + + "tyMappingEntryB\010\n\006source\"K\n\036ImportIdenti" + + "tyMappingsResponse\022)\n\rerror_samples\030\001 \003(" + + "\0132\022.google.rpc.Status\"\211\003\n\034PurgeIdentityM" + + "appingsRequest\022g\n\rinline_source\030\002 \001(\0132N." + + "google.cloud.discoveryengine.v1beta.Purg" + + "eIdentityMappingsRequest.InlineSourceH\000\022" + + "[\n\026identity_mapping_store\030\001 \001(\tB;\340A\002\372A5\n" + + "3discoveryengine.googleapis.com/Identity" + + "MappingStore\022\016\n\006filter\030\003 \001(\t\022\022\n\005force\030\004 " + + "\001(\010H\001\210\001\001\032k\n\014InlineSource\022[\n\030identity_map" + + "ping_entries\030\001 \003(\01329.google.cloud.discov" + + "eryengine.v1beta.IdentityMappingEntryB\010\n" + + "\006sourceB\010\n\006_force\"\241\001\n\033ListIdentityMappin" + + "gsRequest\022[\n\026identity_mapping_store\030\001 \001(" + + "\tB;\340A\002\372A5\n3discoveryengine.googleapis.co" + + "m/IdentityMappingStore\022\021\n\tpage_size\030\002 \001(" + + "\005\022\022\n\npage_token\030\003 \001(\t\"\224\001\n\034ListIdentityMa" + + "ppingsResponse\022[\n\030identity_mapping_entri" + + "es\030\001 \003(\01329.google.cloud.discoveryengine." + + "v1beta.IdentityMappingEntry\022\027\n\017next_page" + + "_token\030\002 \001(\t\"\212\001\n ListIdentityMappingStor" + + "esRequest\022?\n\006parent\030\001 \001(\tB/\340A\002\372A)\n\'disco" + + "veryengine.googleapis.com/Location\022\021\n\tpa" + + "ge_size\030\002 \001(\005\022\022\n\npage_token\030\003 \001(\t\"\230\001\n!Li" + + "stIdentityMappingStoresResponse\022Z\n\027ident" + + "ity_mapping_stores\030\001 \003(\01329.google.cloud." + + "discoveryengine.v1beta.IdentityMappingSt" + + "ore\022\027\n\017next_page_token\030\002 \001(\t\"j\n%Identity" + + "MappingEntryOperationMetadata\022\025\n\rsuccess" + + "_count\030\001 \001(\003\022\025\n\rfailure_count\030\002 \001(\003\022\023\n\013t" + + "otal_count\030\003 \001(\003\"\206\001\n\"DeleteIdentityMappi" + + "ngStoreMetadata\022/\n\013create_time\030\001 \001(\0132\032.g" + + "oogle.protobuf.Timestamp\022/\n\013update_time\030" + + "\002 \001(\0132\032.google.protobuf.Timestamp2\256\022\n\033Id" + + "entityMappingStoreService\022\271\002\n\032CreateIden" + + "tityMappingStore\022F.google.cloud.discover" + + "yengine.v1beta.CreateIdentityMappingStor" + + "eRequest\0329.google.cloud.discoveryengine." + + "v1beta.IdentityMappingStore\"\227\001\332A7parent," + + "identity_mapping_store,identity_mapping_" + + "store_id\202\323\344\223\002W\"=/v1beta/{parent=projects" + + "/*/locations/*}/identityMappingStores:\026i" + + "dentity_mapping_store\022\347\001\n\027GetIdentityMap" + + "pingStore\022C.google.cloud.discoveryengine" + + ".v1beta.GetIdentityMappingStoreRequest\0329" + + ".google.cloud.discoveryengine.v1beta.Ide" + + "ntityMappingStore\"L\332A\004name\202\323\344\223\002?\022=/v1bet" + + "a/{name=projects/*/locations/*/identityM" + + "appingStores/*}\022\264\002\n\032DeleteIdentityMappin" + + "gStore\022F.google.cloud.discoveryengine.v1" + + "beta.DeleteIdentityMappingStoreRequest\032\035" + + ".google.longrunning.Operation\"\256\001\312A_\n\025goo" + + "gle.protobuf.Empty\022Fgoogle.cloud.discove" + + "ryengine.v1beta.DeleteIdentityMappingSto" + + "reMetadata\332A\004name\202\323\344\223\002?*=/v1beta/{name=p" + + "rojects/*/locations/*/identityMappingSto" + + "res/*}\022\202\003\n\026ImportIdentityMappings\022B.goog" + + "le.cloud.discoveryengine.v1beta.ImportId" + + "entityMappingsRequest\032\035.google.longrunni" + + "ng.Operation\"\204\002\312A\217\001\nBgoogle.cloud.discov" + + "eryengine.v1beta.ImportIdentityMappingsR" + + "esponse\022Igoogle.cloud.discoveryengine.v1" + + "beta.IdentityMappingEntryOperationMetada" + + "ta\202\323\344\223\002k\"f/v1beta/{identity_mapping_stor" + + "e=projects/*/locations/*/identityMapping" + + "Stores/*}:importIdentityMappings:\001*\022\321\002\n\025" + + "PurgeIdentityMappings\022A.google.cloud.dis" + + "coveryengine.v1beta.PurgeIdentityMapping" + + "sRequest\032\035.google.longrunning.Operation\"" + + "\325\001\312Ab\n\025google.protobuf.Empty\022Igoogle.clo" + + "ud.discoveryengine.v1beta.IdentityMappin" + + "gEntryOperationMetadata\202\323\344\223\002j\"e/v1beta/{" + + "identity_mapping_store=projects/*/locati" + + "ons/*/identityMappingStores/*}:purgeIden" + + "tityMappings:\001*\022\211\002\n\024ListIdentityMappings" + + "\022@.google.cloud.discoveryengine.v1beta.L" + + "istIdentityMappingsRequest\032A.google.clou" + + "d.discoveryengine.v1beta.ListIdentityMap" + + "pingsResponse\"l\202\323\344\223\002f\022d/v1beta/{identity" + + "_mapping_store=projects/*/locations/*/id" + + "entityMappingStores/*}:listIdentityMappi" + + "ngs\022\372\001\n\031ListIdentityMappingStores\022E.goog" + + "le.cloud.discoveryengine.v1beta.ListIden" + + "tityMappingStoresRequest\032F.google.cloud." + + "discoveryengine.v1beta.ListIdentityMappi" + + "ngStoresResponse\"N\332A\006parent\202\323\344\223\002?\022=/v1be" + + "ta/{parent=projects/*/locations/*}/ident" + + "ityMappingStores\032\317\001\312A\036discoveryengine.go" + + "ogleapis.com\322A\252\001https://www.googleapis.c" + + "om/auth/cloud-platform,https://www.googl" + + "eapis.com/auth/discoveryengine.readwrite" + + ",https://www.googleapis.com/auth/discove" + + "ryengine.serving.readwriteB\247\002\n\'com.googl" + + "e.cloud.discoveryengine.v1betaB Identity" + + "MappingStoreServiceProtoP\001ZQcloud.google" + + ".com/go/discoveryengine/apiv1beta/discov" + + "eryenginepb;discoveryenginepb\242\002\017DISCOVER" + + "YENGINE\252\002#Google.Cloud.DiscoveryEngine.V" + + "1Beta\312\002#Google\\Cloud\\DiscoveryEngine\\V1b" + + "eta\352\002&Google::Cloud::DiscoveryEngine::V1" + + "betab\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.AnnotationsProto.getDescriptor(), + com.google.api.ClientProto.getDescriptor(), + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.ResourceProto.getDescriptor(), + com.google.cloud.discoveryengine.v1beta.IdentityMappingStoreProto.getDescriptor(), + com.google.longrunning.OperationsProto.getDescriptor(), + com.google.protobuf.EmptyProto.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), + com.google.rpc.StatusProto.getDescriptor(), + }); + internal_static_google_cloud_discoveryengine_v1beta_CreateIdentityMappingStoreRequest_descriptor = + getDescriptor().getMessageType(0); + internal_static_google_cloud_discoveryengine_v1beta_CreateIdentityMappingStoreRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1beta_CreateIdentityMappingStoreRequest_descriptor, + new java.lang.String[] { + "CmekConfigName", + "DisableCmek", + "Parent", + "IdentityMappingStoreId", + "IdentityMappingStore", + "CmekOptions", + }); + internal_static_google_cloud_discoveryengine_v1beta_GetIdentityMappingStoreRequest_descriptor = + getDescriptor().getMessageType(1); + internal_static_google_cloud_discoveryengine_v1beta_GetIdentityMappingStoreRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1beta_GetIdentityMappingStoreRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_discoveryengine_v1beta_DeleteIdentityMappingStoreRequest_descriptor = + getDescriptor().getMessageType(2); + internal_static_google_cloud_discoveryengine_v1beta_DeleteIdentityMappingStoreRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1beta_DeleteIdentityMappingStoreRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_discoveryengine_v1beta_ImportIdentityMappingsRequest_descriptor = + getDescriptor().getMessageType(3); + internal_static_google_cloud_discoveryengine_v1beta_ImportIdentityMappingsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1beta_ImportIdentityMappingsRequest_descriptor, + new java.lang.String[] { + "InlineSource", "IdentityMappingStore", "Source", + }); + internal_static_google_cloud_discoveryengine_v1beta_ImportIdentityMappingsRequest_InlineSource_descriptor = + internal_static_google_cloud_discoveryengine_v1beta_ImportIdentityMappingsRequest_descriptor + .getNestedType(0); + internal_static_google_cloud_discoveryengine_v1beta_ImportIdentityMappingsRequest_InlineSource_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1beta_ImportIdentityMappingsRequest_InlineSource_descriptor, + new java.lang.String[] { + "IdentityMappingEntries", + }); + internal_static_google_cloud_discoveryengine_v1beta_ImportIdentityMappingsResponse_descriptor = + getDescriptor().getMessageType(4); + internal_static_google_cloud_discoveryengine_v1beta_ImportIdentityMappingsResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1beta_ImportIdentityMappingsResponse_descriptor, + new java.lang.String[] { + "ErrorSamples", + }); + internal_static_google_cloud_discoveryengine_v1beta_PurgeIdentityMappingsRequest_descriptor = + getDescriptor().getMessageType(5); + internal_static_google_cloud_discoveryengine_v1beta_PurgeIdentityMappingsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1beta_PurgeIdentityMappingsRequest_descriptor, + new java.lang.String[] { + "InlineSource", "IdentityMappingStore", "Filter", "Force", "Source", + }); + internal_static_google_cloud_discoveryengine_v1beta_PurgeIdentityMappingsRequest_InlineSource_descriptor = + internal_static_google_cloud_discoveryengine_v1beta_PurgeIdentityMappingsRequest_descriptor + .getNestedType(0); + internal_static_google_cloud_discoveryengine_v1beta_PurgeIdentityMappingsRequest_InlineSource_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1beta_PurgeIdentityMappingsRequest_InlineSource_descriptor, + new java.lang.String[] { + "IdentityMappingEntries", + }); + internal_static_google_cloud_discoveryengine_v1beta_ListIdentityMappingsRequest_descriptor = + getDescriptor().getMessageType(6); + internal_static_google_cloud_discoveryengine_v1beta_ListIdentityMappingsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1beta_ListIdentityMappingsRequest_descriptor, + new java.lang.String[] { + "IdentityMappingStore", "PageSize", "PageToken", + }); + internal_static_google_cloud_discoveryengine_v1beta_ListIdentityMappingsResponse_descriptor = + getDescriptor().getMessageType(7); + internal_static_google_cloud_discoveryengine_v1beta_ListIdentityMappingsResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1beta_ListIdentityMappingsResponse_descriptor, + new java.lang.String[] { + "IdentityMappingEntries", "NextPageToken", + }); + internal_static_google_cloud_discoveryengine_v1beta_ListIdentityMappingStoresRequest_descriptor = + getDescriptor().getMessageType(8); + internal_static_google_cloud_discoveryengine_v1beta_ListIdentityMappingStoresRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1beta_ListIdentityMappingStoresRequest_descriptor, + new java.lang.String[] { + "Parent", "PageSize", "PageToken", + }); + internal_static_google_cloud_discoveryengine_v1beta_ListIdentityMappingStoresResponse_descriptor = + getDescriptor().getMessageType(9); + internal_static_google_cloud_discoveryengine_v1beta_ListIdentityMappingStoresResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1beta_ListIdentityMappingStoresResponse_descriptor, + new java.lang.String[] { + "IdentityMappingStores", "NextPageToken", + }); + internal_static_google_cloud_discoveryengine_v1beta_IdentityMappingEntryOperationMetadata_descriptor = + getDescriptor().getMessageType(10); + internal_static_google_cloud_discoveryengine_v1beta_IdentityMappingEntryOperationMetadata_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1beta_IdentityMappingEntryOperationMetadata_descriptor, + new java.lang.String[] { + "SuccessCount", "FailureCount", "TotalCount", + }); + internal_static_google_cloud_discoveryengine_v1beta_DeleteIdentityMappingStoreMetadata_descriptor = + getDescriptor().getMessageType(11); + internal_static_google_cloud_discoveryengine_v1beta_DeleteIdentityMappingStoreMetadata_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1beta_DeleteIdentityMappingStoreMetadata_descriptor, + new java.lang.String[] { + "CreateTime", "UpdateTime", + }); + descriptor.resolveAllFeaturesImmutable(); + com.google.api.AnnotationsProto.getDescriptor(); + com.google.api.ClientProto.getDescriptor(); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + com.google.cloud.discoveryengine.v1beta.IdentityMappingStoreProto.getDescriptor(); + com.google.longrunning.OperationsProto.getDescriptor(); + com.google.protobuf.EmptyProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); + com.google.rpc.StatusProto.getDescriptor(); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.ClientProto.defaultHost); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.AnnotationsProto.http); + registry.add(com.google.api.ClientProto.methodSignature); + registry.add(com.google.api.ClientProto.oauthScopes); + registry.add(com.google.api.ResourceProto.resourceReference); + registry.add(com.google.longrunning.OperationsProto.operationInfo); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/IdpConfig.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/IdpConfig.java new file mode 100644 index 000000000000..1bac95d677c8 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/IdpConfig.java @@ -0,0 +1,1698 @@ +/* + * 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/cloud/discoveryengine/v1beta/common.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.discoveryengine.v1beta; + +/** + * + * + *
            + * Identity Provider Config.
            + * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.IdpConfig} + */ +@com.google.protobuf.Generated +public final class IdpConfig extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.IdpConfig) + IdpConfigOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "IdpConfig"); + } + + // Use IdpConfig.newBuilder() to construct. + private IdpConfig(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private IdpConfig() { + idpType_ = 0; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.CommonProto + .internal_static_google_cloud_discoveryengine_v1beta_IdpConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.CommonProto + .internal_static_google_cloud_discoveryengine_v1beta_IdpConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.IdpConfig.class, + com.google.cloud.discoveryengine.v1beta.IdpConfig.Builder.class); + } + + /** + * + * + *
            +   * Identity Provider Type.
            +   * 
            + * + * Protobuf enum {@code google.cloud.discoveryengine.v1beta.IdpConfig.IdpType} + */ + public enum IdpType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
            +     * Default value. ACL search not enabled.
            +     * 
            + * + * IDP_TYPE_UNSPECIFIED = 0; + */ + IDP_TYPE_UNSPECIFIED(0), + /** + * + * + *
            +     * Google 1P provider.
            +     * 
            + * + * GSUITE = 1; + */ + GSUITE(1), + /** + * + * + *
            +     * Third party provider.
            +     * 
            + * + * THIRD_PARTY = 2; + */ + THIRD_PARTY(2), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "IdpType"); + } + + /** + * + * + *
            +     * Default value. ACL search not enabled.
            +     * 
            + * + * IDP_TYPE_UNSPECIFIED = 0; + */ + public static final int IDP_TYPE_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
            +     * Google 1P provider.
            +     * 
            + * + * GSUITE = 1; + */ + public static final int GSUITE_VALUE = 1; + + /** + * + * + *
            +     * Third party provider.
            +     * 
            + * + * THIRD_PARTY = 2; + */ + public static final int THIRD_PARTY_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 IdpType 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 IdpType forNumber(int value) { + switch (value) { + case 0: + return IDP_TYPE_UNSPECIFIED; + case 1: + return GSUITE; + case 2: + return THIRD_PARTY; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public IdpType findValueByNumber(int number) { + return IdpType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.IdpConfig.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final IdpType[] VALUES = values(); + + public static IdpType valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private IdpType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.discoveryengine.v1beta.IdpConfig.IdpType) + } + + public interface ExternalIdpConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.IdpConfig.ExternalIdpConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
            +     * Workforce pool name.
            +     * Example: "locations/global/workforcePools/pool_id"
            +     * 
            + * + * string workforce_pool_name = 1; + * + * @return The workforcePoolName. + */ + java.lang.String getWorkforcePoolName(); + + /** + * + * + *
            +     * Workforce pool name.
            +     * Example: "locations/global/workforcePools/pool_id"
            +     * 
            + * + * string workforce_pool_name = 1; + * + * @return The bytes for workforcePoolName. + */ + com.google.protobuf.ByteString getWorkforcePoolNameBytes(); + } + + /** + * + * + *
            +   * Third party IDP Config.
            +   * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.IdpConfig.ExternalIdpConfig} + */ + public static final class ExternalIdpConfig extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.IdpConfig.ExternalIdpConfig) + ExternalIdpConfigOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ExternalIdpConfig"); + } + + // Use ExternalIdpConfig.newBuilder() to construct. + private ExternalIdpConfig(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ExternalIdpConfig() { + workforcePoolName_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.CommonProto + .internal_static_google_cloud_discoveryengine_v1beta_IdpConfig_ExternalIdpConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.CommonProto + .internal_static_google_cloud_discoveryengine_v1beta_IdpConfig_ExternalIdpConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.IdpConfig.ExternalIdpConfig.class, + com.google.cloud.discoveryengine.v1beta.IdpConfig.ExternalIdpConfig.Builder.class); + } + + public static final int WORKFORCE_POOL_NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object workforcePoolName_ = ""; + + /** + * + * + *
            +     * Workforce pool name.
            +     * Example: "locations/global/workforcePools/pool_id"
            +     * 
            + * + * string workforce_pool_name = 1; + * + * @return The workforcePoolName. + */ + @java.lang.Override + public java.lang.String getWorkforcePoolName() { + java.lang.Object ref = workforcePoolName_; + 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(); + workforcePoolName_ = s; + return s; + } + } + + /** + * + * + *
            +     * Workforce pool name.
            +     * Example: "locations/global/workforcePools/pool_id"
            +     * 
            + * + * string workforce_pool_name = 1; + * + * @return The bytes for workforcePoolName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getWorkforcePoolNameBytes() { + java.lang.Object ref = workforcePoolName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + workforcePoolName_ = 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 { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(workforcePoolName_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, workforcePoolName_); + } + 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(workforcePoolName_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, workforcePoolName_); + } + 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.discoveryengine.v1beta.IdpConfig.ExternalIdpConfig)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1beta.IdpConfig.ExternalIdpConfig other = + (com.google.cloud.discoveryengine.v1beta.IdpConfig.ExternalIdpConfig) obj; + + if (!getWorkforcePoolName().equals(other.getWorkforcePoolName())) 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) + WORKFORCE_POOL_NAME_FIELD_NUMBER; + hash = (53 * hash) + getWorkforcePoolName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1beta.IdpConfig.ExternalIdpConfig parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.IdpConfig.ExternalIdpConfig 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.discoveryengine.v1beta.IdpConfig.ExternalIdpConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.IdpConfig.ExternalIdpConfig 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.discoveryengine.v1beta.IdpConfig.ExternalIdpConfig parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.IdpConfig.ExternalIdpConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1beta.IdpConfig.ExternalIdpConfig parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.IdpConfig.ExternalIdpConfig 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.discoveryengine.v1beta.IdpConfig.ExternalIdpConfig + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.IdpConfig.ExternalIdpConfig + 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.discoveryengine.v1beta.IdpConfig.ExternalIdpConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.IdpConfig.ExternalIdpConfig 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.discoveryengine.v1beta.IdpConfig.ExternalIdpConfig 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; + } + + /** + * + * + *
            +     * Third party IDP Config.
            +     * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.IdpConfig.ExternalIdpConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.IdpConfig.ExternalIdpConfig) + com.google.cloud.discoveryengine.v1beta.IdpConfig.ExternalIdpConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.CommonProto + .internal_static_google_cloud_discoveryengine_v1beta_IdpConfig_ExternalIdpConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.CommonProto + .internal_static_google_cloud_discoveryengine_v1beta_IdpConfig_ExternalIdpConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.IdpConfig.ExternalIdpConfig.class, + com.google.cloud.discoveryengine.v1beta.IdpConfig.ExternalIdpConfig.Builder.class); + } + + // Construct using + // com.google.cloud.discoveryengine.v1beta.IdpConfig.ExternalIdpConfig.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + workforcePoolName_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1beta.CommonProto + .internal_static_google_cloud_discoveryengine_v1beta_IdpConfig_ExternalIdpConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.IdpConfig.ExternalIdpConfig + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1beta.IdpConfig.ExternalIdpConfig + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.IdpConfig.ExternalIdpConfig build() { + com.google.cloud.discoveryengine.v1beta.IdpConfig.ExternalIdpConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.IdpConfig.ExternalIdpConfig buildPartial() { + com.google.cloud.discoveryengine.v1beta.IdpConfig.ExternalIdpConfig result = + new com.google.cloud.discoveryengine.v1beta.IdpConfig.ExternalIdpConfig(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.discoveryengine.v1beta.IdpConfig.ExternalIdpConfig result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.workforcePoolName_ = workforcePoolName_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.discoveryengine.v1beta.IdpConfig.ExternalIdpConfig) { + return mergeFrom( + (com.google.cloud.discoveryengine.v1beta.IdpConfig.ExternalIdpConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1beta.IdpConfig.ExternalIdpConfig other) { + if (other + == com.google.cloud.discoveryengine.v1beta.IdpConfig.ExternalIdpConfig + .getDefaultInstance()) return this; + if (!other.getWorkforcePoolName().isEmpty()) { + workforcePoolName_ = other.workforcePoolName_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + workforcePoolName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object workforcePoolName_ = ""; + + /** + * + * + *
            +       * Workforce pool name.
            +       * Example: "locations/global/workforcePools/pool_id"
            +       * 
            + * + * string workforce_pool_name = 1; + * + * @return The workforcePoolName. + */ + public java.lang.String getWorkforcePoolName() { + java.lang.Object ref = workforcePoolName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + workforcePoolName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
            +       * Workforce pool name.
            +       * Example: "locations/global/workforcePools/pool_id"
            +       * 
            + * + * string workforce_pool_name = 1; + * + * @return The bytes for workforcePoolName. + */ + public com.google.protobuf.ByteString getWorkforcePoolNameBytes() { + java.lang.Object ref = workforcePoolName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + workforcePoolName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
            +       * Workforce pool name.
            +       * Example: "locations/global/workforcePools/pool_id"
            +       * 
            + * + * string workforce_pool_name = 1; + * + * @param value The workforcePoolName to set. + * @return This builder for chaining. + */ + public Builder setWorkforcePoolName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + workforcePoolName_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
            +       * Workforce pool name.
            +       * Example: "locations/global/workforcePools/pool_id"
            +       * 
            + * + * string workforce_pool_name = 1; + * + * @return This builder for chaining. + */ + public Builder clearWorkforcePoolName() { + workforcePoolName_ = getDefaultInstance().getWorkforcePoolName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
            +       * Workforce pool name.
            +       * Example: "locations/global/workforcePools/pool_id"
            +       * 
            + * + * string workforce_pool_name = 1; + * + * @param value The bytes for workforcePoolName to set. + * @return This builder for chaining. + */ + public Builder setWorkforcePoolNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + workforcePoolName_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.IdpConfig.ExternalIdpConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.IdpConfig.ExternalIdpConfig) + private static final com.google.cloud.discoveryengine.v1beta.IdpConfig.ExternalIdpConfig + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.discoveryengine.v1beta.IdpConfig.ExternalIdpConfig(); + } + + public static com.google.cloud.discoveryengine.v1beta.IdpConfig.ExternalIdpConfig + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ExternalIdpConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.IdpConfig.ExternalIdpConfig + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int bitField0_; + public static final int IDP_TYPE_FIELD_NUMBER = 1; + private int idpType_ = 0; + + /** + * + * + *
            +   * Identity provider type configured.
            +   * 
            + * + * .google.cloud.discoveryengine.v1beta.IdpConfig.IdpType idp_type = 1; + * + * @return The enum numeric value on the wire for idpType. + */ + @java.lang.Override + public int getIdpTypeValue() { + return idpType_; + } + + /** + * + * + *
            +   * Identity provider type configured.
            +   * 
            + * + * .google.cloud.discoveryengine.v1beta.IdpConfig.IdpType idp_type = 1; + * + * @return The idpType. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.IdpConfig.IdpType getIdpType() { + com.google.cloud.discoveryengine.v1beta.IdpConfig.IdpType result = + com.google.cloud.discoveryengine.v1beta.IdpConfig.IdpType.forNumber(idpType_); + return result == null + ? com.google.cloud.discoveryengine.v1beta.IdpConfig.IdpType.UNRECOGNIZED + : result; + } + + public static final int EXTERNAL_IDP_CONFIG_FIELD_NUMBER = 2; + private com.google.cloud.discoveryengine.v1beta.IdpConfig.ExternalIdpConfig externalIdpConfig_; + + /** + * + * + *
            +   * External Identity provider config.
            +   * 
            + * + * .google.cloud.discoveryengine.v1beta.IdpConfig.ExternalIdpConfig external_idp_config = 2; + * + * + * @return Whether the externalIdpConfig field is set. + */ + @java.lang.Override + public boolean hasExternalIdpConfig() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
            +   * External Identity provider config.
            +   * 
            + * + * .google.cloud.discoveryengine.v1beta.IdpConfig.ExternalIdpConfig external_idp_config = 2; + * + * + * @return The externalIdpConfig. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.IdpConfig.ExternalIdpConfig + getExternalIdpConfig() { + return externalIdpConfig_ == null + ? com.google.cloud.discoveryengine.v1beta.IdpConfig.ExternalIdpConfig.getDefaultInstance() + : externalIdpConfig_; + } + + /** + * + * + *
            +   * External Identity provider config.
            +   * 
            + * + * .google.cloud.discoveryengine.v1beta.IdpConfig.ExternalIdpConfig external_idp_config = 2; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.IdpConfig.ExternalIdpConfigOrBuilder + getExternalIdpConfigOrBuilder() { + return externalIdpConfig_ == null + ? com.google.cloud.discoveryengine.v1beta.IdpConfig.ExternalIdpConfig.getDefaultInstance() + : externalIdpConfig_; + } + + 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 (idpType_ + != com.google.cloud.discoveryengine.v1beta.IdpConfig.IdpType.IDP_TYPE_UNSPECIFIED + .getNumber()) { + output.writeEnum(1, idpType_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getExternalIdpConfig()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (idpType_ + != com.google.cloud.discoveryengine.v1beta.IdpConfig.IdpType.IDP_TYPE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, idpType_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getExternalIdpConfig()); + } + 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.discoveryengine.v1beta.IdpConfig)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1beta.IdpConfig other = + (com.google.cloud.discoveryengine.v1beta.IdpConfig) obj; + + if (idpType_ != other.idpType_) return false; + if (hasExternalIdpConfig() != other.hasExternalIdpConfig()) return false; + if (hasExternalIdpConfig()) { + if (!getExternalIdpConfig().equals(other.getExternalIdpConfig())) 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) + IDP_TYPE_FIELD_NUMBER; + hash = (53 * hash) + idpType_; + if (hasExternalIdpConfig()) { + hash = (37 * hash) + EXTERNAL_IDP_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getExternalIdpConfig().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1beta.IdpConfig parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.IdpConfig 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.discoveryengine.v1beta.IdpConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.IdpConfig 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.discoveryengine.v1beta.IdpConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.IdpConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1beta.IdpConfig parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.IdpConfig 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.discoveryengine.v1beta.IdpConfig parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.IdpConfig 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.discoveryengine.v1beta.IdpConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.IdpConfig 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.discoveryengine.v1beta.IdpConfig 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; + } + + /** + * + * + *
            +   * Identity Provider Config.
            +   * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.IdpConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.IdpConfig) + com.google.cloud.discoveryengine.v1beta.IdpConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.CommonProto + .internal_static_google_cloud_discoveryengine_v1beta_IdpConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.CommonProto + .internal_static_google_cloud_discoveryengine_v1beta_IdpConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.IdpConfig.class, + com.google.cloud.discoveryengine.v1beta.IdpConfig.Builder.class); + } + + // Construct using com.google.cloud.discoveryengine.v1beta.IdpConfig.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetExternalIdpConfigFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + idpType_ = 0; + externalIdpConfig_ = null; + if (externalIdpConfigBuilder_ != null) { + externalIdpConfigBuilder_.dispose(); + externalIdpConfigBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1beta.CommonProto + .internal_static_google_cloud_discoveryengine_v1beta_IdpConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.IdpConfig getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1beta.IdpConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.IdpConfig build() { + com.google.cloud.discoveryengine.v1beta.IdpConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.IdpConfig buildPartial() { + com.google.cloud.discoveryengine.v1beta.IdpConfig result = + new com.google.cloud.discoveryengine.v1beta.IdpConfig(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.discoveryengine.v1beta.IdpConfig result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.idpType_ = idpType_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.externalIdpConfig_ = + externalIdpConfigBuilder_ == null + ? externalIdpConfig_ + : externalIdpConfigBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.discoveryengine.v1beta.IdpConfig) { + return mergeFrom((com.google.cloud.discoveryengine.v1beta.IdpConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.discoveryengine.v1beta.IdpConfig other) { + if (other == com.google.cloud.discoveryengine.v1beta.IdpConfig.getDefaultInstance()) + return this; + if (other.idpType_ != 0) { + setIdpTypeValue(other.getIdpTypeValue()); + } + if (other.hasExternalIdpConfig()) { + mergeExternalIdpConfig(other.getExternalIdpConfig()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + idpType_ = input.readEnum(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 18: + { + input.readMessage( + internalGetExternalIdpConfigFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private int idpType_ = 0; + + /** + * + * + *
            +     * Identity provider type configured.
            +     * 
            + * + * .google.cloud.discoveryengine.v1beta.IdpConfig.IdpType idp_type = 1; + * + * @return The enum numeric value on the wire for idpType. + */ + @java.lang.Override + public int getIdpTypeValue() { + return idpType_; + } + + /** + * + * + *
            +     * Identity provider type configured.
            +     * 
            + * + * .google.cloud.discoveryengine.v1beta.IdpConfig.IdpType idp_type = 1; + * + * @param value The enum numeric value on the wire for idpType to set. + * @return This builder for chaining. + */ + public Builder setIdpTypeValue(int value) { + idpType_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Identity provider type configured.
            +     * 
            + * + * .google.cloud.discoveryengine.v1beta.IdpConfig.IdpType idp_type = 1; + * + * @return The idpType. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.IdpConfig.IdpType getIdpType() { + com.google.cloud.discoveryengine.v1beta.IdpConfig.IdpType result = + com.google.cloud.discoveryengine.v1beta.IdpConfig.IdpType.forNumber(idpType_); + return result == null + ? com.google.cloud.discoveryengine.v1beta.IdpConfig.IdpType.UNRECOGNIZED + : result; + } + + /** + * + * + *
            +     * Identity provider type configured.
            +     * 
            + * + * .google.cloud.discoveryengine.v1beta.IdpConfig.IdpType idp_type = 1; + * + * @param value The idpType to set. + * @return This builder for chaining. + */ + public Builder setIdpType(com.google.cloud.discoveryengine.v1beta.IdpConfig.IdpType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + idpType_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
            +     * Identity provider type configured.
            +     * 
            + * + * .google.cloud.discoveryengine.v1beta.IdpConfig.IdpType idp_type = 1; + * + * @return This builder for chaining. + */ + public Builder clearIdpType() { + bitField0_ = (bitField0_ & ~0x00000001); + idpType_ = 0; + onChanged(); + return this; + } + + private com.google.cloud.discoveryengine.v1beta.IdpConfig.ExternalIdpConfig externalIdpConfig_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.IdpConfig.ExternalIdpConfig, + com.google.cloud.discoveryengine.v1beta.IdpConfig.ExternalIdpConfig.Builder, + com.google.cloud.discoveryengine.v1beta.IdpConfig.ExternalIdpConfigOrBuilder> + externalIdpConfigBuilder_; + + /** + * + * + *
            +     * External Identity provider config.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.IdpConfig.ExternalIdpConfig external_idp_config = 2; + * + * + * @return Whether the externalIdpConfig field is set. + */ + public boolean hasExternalIdpConfig() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
            +     * External Identity provider config.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.IdpConfig.ExternalIdpConfig external_idp_config = 2; + * + * + * @return The externalIdpConfig. + */ + public com.google.cloud.discoveryengine.v1beta.IdpConfig.ExternalIdpConfig + getExternalIdpConfig() { + if (externalIdpConfigBuilder_ == null) { + return externalIdpConfig_ == null + ? com.google.cloud.discoveryengine.v1beta.IdpConfig.ExternalIdpConfig + .getDefaultInstance() + : externalIdpConfig_; + } else { + return externalIdpConfigBuilder_.getMessage(); + } + } + + /** + * + * + *
            +     * External Identity provider config.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.IdpConfig.ExternalIdpConfig external_idp_config = 2; + * + */ + public Builder setExternalIdpConfig( + com.google.cloud.discoveryengine.v1beta.IdpConfig.ExternalIdpConfig value) { + if (externalIdpConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + externalIdpConfig_ = value; + } else { + externalIdpConfigBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
            +     * External Identity provider config.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.IdpConfig.ExternalIdpConfig external_idp_config = 2; + * + */ + public Builder setExternalIdpConfig( + com.google.cloud.discoveryengine.v1beta.IdpConfig.ExternalIdpConfig.Builder + builderForValue) { + if (externalIdpConfigBuilder_ == null) { + externalIdpConfig_ = builderForValue.build(); + } else { + externalIdpConfigBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
            +     * External Identity provider config.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.IdpConfig.ExternalIdpConfig external_idp_config = 2; + * + */ + public Builder mergeExternalIdpConfig( + com.google.cloud.discoveryengine.v1beta.IdpConfig.ExternalIdpConfig value) { + if (externalIdpConfigBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && externalIdpConfig_ != null + && externalIdpConfig_ + != com.google.cloud.discoveryengine.v1beta.IdpConfig.ExternalIdpConfig + .getDefaultInstance()) { + getExternalIdpConfigBuilder().mergeFrom(value); + } else { + externalIdpConfig_ = value; + } + } else { + externalIdpConfigBuilder_.mergeFrom(value); + } + if (externalIdpConfig_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** + * + * + *
            +     * External Identity provider config.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.IdpConfig.ExternalIdpConfig external_idp_config = 2; + * + */ + public Builder clearExternalIdpConfig() { + bitField0_ = (bitField0_ & ~0x00000002); + externalIdpConfig_ = null; + if (externalIdpConfigBuilder_ != null) { + externalIdpConfigBuilder_.dispose(); + externalIdpConfigBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
            +     * External Identity provider config.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.IdpConfig.ExternalIdpConfig external_idp_config = 2; + * + */ + public com.google.cloud.discoveryengine.v1beta.IdpConfig.ExternalIdpConfig.Builder + getExternalIdpConfigBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return internalGetExternalIdpConfigFieldBuilder().getBuilder(); + } + + /** + * + * + *
            +     * External Identity provider config.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.IdpConfig.ExternalIdpConfig external_idp_config = 2; + * + */ + public com.google.cloud.discoveryengine.v1beta.IdpConfig.ExternalIdpConfigOrBuilder + getExternalIdpConfigOrBuilder() { + if (externalIdpConfigBuilder_ != null) { + return externalIdpConfigBuilder_.getMessageOrBuilder(); + } else { + return externalIdpConfig_ == null + ? com.google.cloud.discoveryengine.v1beta.IdpConfig.ExternalIdpConfig + .getDefaultInstance() + : externalIdpConfig_; + } + } + + /** + * + * + *
            +     * External Identity provider config.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.IdpConfig.ExternalIdpConfig external_idp_config = 2; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.IdpConfig.ExternalIdpConfig, + com.google.cloud.discoveryengine.v1beta.IdpConfig.ExternalIdpConfig.Builder, + com.google.cloud.discoveryengine.v1beta.IdpConfig.ExternalIdpConfigOrBuilder> + internalGetExternalIdpConfigFieldBuilder() { + if (externalIdpConfigBuilder_ == null) { + externalIdpConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.IdpConfig.ExternalIdpConfig, + com.google.cloud.discoveryengine.v1beta.IdpConfig.ExternalIdpConfig.Builder, + com.google.cloud.discoveryengine.v1beta.IdpConfig.ExternalIdpConfigOrBuilder>( + getExternalIdpConfig(), getParentForChildren(), isClean()); + externalIdpConfig_ = null; + } + return externalIdpConfigBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.IdpConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.IdpConfig) + private static final com.google.cloud.discoveryengine.v1beta.IdpConfig DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.discoveryengine.v1beta.IdpConfig(); + } + + public static com.google.cloud.discoveryengine.v1beta.IdpConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public IdpConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.IdpConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/IdpConfigOrBuilder.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/IdpConfigOrBuilder.java new file mode 100644 index 000000000000..50f549030c2b --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/IdpConfigOrBuilder.java @@ -0,0 +1,95 @@ +/* + * 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/cloud/discoveryengine/v1beta/common.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.discoveryengine.v1beta; + +@com.google.protobuf.Generated +public interface IdpConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.IdpConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
            +   * Identity provider type configured.
            +   * 
            + * + * .google.cloud.discoveryengine.v1beta.IdpConfig.IdpType idp_type = 1; + * + * @return The enum numeric value on the wire for idpType. + */ + int getIdpTypeValue(); + + /** + * + * + *
            +   * Identity provider type configured.
            +   * 
            + * + * .google.cloud.discoveryengine.v1beta.IdpConfig.IdpType idp_type = 1; + * + * @return The idpType. + */ + com.google.cloud.discoveryengine.v1beta.IdpConfig.IdpType getIdpType(); + + /** + * + * + *
            +   * External Identity provider config.
            +   * 
            + * + * .google.cloud.discoveryengine.v1beta.IdpConfig.ExternalIdpConfig external_idp_config = 2; + * + * + * @return Whether the externalIdpConfig field is set. + */ + boolean hasExternalIdpConfig(); + + /** + * + * + *
            +   * External Identity provider config.
            +   * 
            + * + * .google.cloud.discoveryengine.v1beta.IdpConfig.ExternalIdpConfig external_idp_config = 2; + * + * + * @return The externalIdpConfig. + */ + com.google.cloud.discoveryengine.v1beta.IdpConfig.ExternalIdpConfig getExternalIdpConfig(); + + /** + * + * + *
            +   * External Identity provider config.
            +   * 
            + * + * .google.cloud.discoveryengine.v1beta.IdpConfig.ExternalIdpConfig external_idp_config = 2; + * + */ + com.google.cloud.discoveryengine.v1beta.IdpConfig.ExternalIdpConfigOrBuilder + getExternalIdpConfigOrBuilder(); +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ImportConfigProto.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ImportConfigProto.java index 9c45659fe08f..7b8dc8832a3a 100644 --- a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ImportConfigProto.java +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ImportConfigProto.java @@ -248,12 +248,13 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\013instance_id\030\002 \001(\tB\003\340A\002\022\025\n" + "\010table_id\030\003 \001(\tB\003\340A\002\022S\n" + "\020bigtable_options\030\004" - + " \001(\01324.google.cloud.discoveryengine.v1beta.BigtableOptionsB\003\340A\002\"\203\001\n" + + " \001(\01324.google.cloud.discoveryengine.v1beta.BigtableOptionsB\003\340A\002\"\266\001\n" + "\017FhirStoreSource\022?\n\n" + "fhir_store\030\001 \001(\tB+\340A\002\372A%\n" + "#healthcare.googleapis.com/FhirStore\022\027\n" + "\017gcs_staging_dir\030\002 \001(\t\022\026\n" - + "\016resource_types\030\003 \003(\t\"\231\001\n" + + "\016resource_types\030\003 \003(\t\0221\n" + + "$update_from_latest_predefined_schema\030\004 \001(\010B\003\340A\001\"\231\001\n" + "\016CloudSqlSource\022\022\n\n" + "project_id\030\001 \001(\t\022\030\n" + "\013instance_id\030\002 \001(\tB\003\340A\002\022\030\n" @@ -277,30 +278,31 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "gcs_prefix\030\001 \001(\tH\000B\r\n" + "\013destination\"\207\004\n" + "\027ImportUserEventsRequest\022b\n\r" - + "inline_source\030\002 \001(\0132I.google.c" - + "loud.discoveryengine.v1beta.ImportUserEventsRequest.InlineSourceH\000\022D\n\n" + + "inline_source\030\002 \001(\013" + + "2I.google.cloud.discoveryengine.v1beta.ImportUserEventsRequest.InlineSourceH\000\022D\n" + + "\n" + "gcs_source\030\003" + " \001(\0132..google.cloud.discoveryengine.v1beta.GcsSourceH\000\022N\n" - + "\017bigquery_source\030\004 \001(" - + "\01323.google.cloud.discoveryengine.v1beta.BigQuerySourceH\000\022@\n" + + "\017bigquery_source\030\004" + + " \001(\01323.google.cloud.discoveryengine.v1beta.BigQuerySourceH\000\022@\n" + "\006parent\030\001 \001(\tB0\340A\002\372A*\n" + "(discoveryengine.googleapis.com/DataStore\022L\n" - + "\014error_config\030\005 \001(\01326.google.cloud." - + "discoveryengine.v1beta.ImportErrorConfig\032X\n" + + "\014error_config\030\005 \001(\01326.go" + + "ogle.cloud.discoveryengine.v1beta.ImportErrorConfig\032X\n" + "\014InlineSource\022H\n" - + "\013user_events\030\001 \003(\0132.." - + "google.cloud.discoveryengine.v1beta.UserEventB\003\340A\002B\010\n" + + "\013user_events\030\001" + + " \003(\0132..google.cloud.discoveryengine.v1beta.UserEventB\003\340A\002B\010\n" + "\006source\"\317\001\n" + "\030ImportUserEventsResponse\022)\n\r" + "error_samples\030\001 \003(\0132\022.google.rpc.Status\022L\n" - + "\014error_config\030\002 \001(\01326.goo" - + "gle.cloud.discoveryengine.v1beta.ImportErrorConfig\022\033\n" + + "\014error_config\030\002" + + " \001(\01326.google.cloud.discoveryengine.v1beta.ImportErrorConfig\022\033\n" + "\023joined_events_count\030\003 \001(\003\022\035\n" - + "\025unjoined_events_count\030\004 \001(\003\"\252\001\n" + + "\025unjoined_events_count\030\004 \001(\003\"\257\001\n" + "\030ImportUserEventsMetadata\022/\n" - + "\013create_time\030\001 \001(\0132\032.google.protobuf.Timestamp\022/\n" - + "\013update_time\030\002 \001(\0132\032.google.protobuf.Timestamp\022\025\n" - + "\r" + + "\013create_time\030\001 \001(\0132\032.google.protobuf.Timestamp\0224\n" + + "\013update_time\030\002" + + " \001(\0132\032.google.protobuf.TimestampB\003\340A\003\022\025\n\r" + "success_count\030\003 \001(\003\022\025\n\r" + "failure_count\030\004 \001(\003\"\276\001\n" + "\027ImportDocumentsMetadata\022/\n" @@ -308,38 +310,39 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\013update_time\030\002 \001(\0132\032.google.protobuf.Timestamp\022\025\n\r" + "success_count\030\003 \001(\003\022\025\n\r" + "failure_count\030\004 \001(\003\022\023\n" - + "\013total_count\030\005 \001(\003\"\203\n\n" + + "\013total_count\030\005 \001(\003\"\247\n\n" + "\026ImportDocumentsRequest\022a\n\r" - + "inline_source\030\002 \001(\0132H.google.cloud.discoveryengine.v1" - + "beta.ImportDocumentsRequest.InlineSourceH\000\022D\n\n" - + "gcs_source\030\003" - + " \001(\0132..google.cloud.discoveryengine.v1beta.GcsSourceH\000\022N\n" - + "\017bigquery_source\030\004" - + " \001(\01323.google.cloud.discoveryengine.v1beta.BigQuerySourceH\000\022Q\n" + + "inline_source\030\002 \001(\0132H.google.cloud.di" + + "scoveryengine.v1beta.ImportDocumentsRequest.InlineSourceH\000\022D\n\n" + + "gcs_source\030\003 \001(\0132." + + ".google.cloud.discoveryengine.v1beta.GcsSourceH\000\022N\n" + + "\017bigquery_source\030\004 \001(\01323.goog" + + "le.cloud.discoveryengine.v1beta.BigQuerySourceH\000\022Q\n" + "\021fhir_store_source\030\n" + " \001(\01324.google.cloud.discoveryengine.v1beta.FhirStoreSourceH\000\022L\n" - + "\016spanner_source\030\013" - + " \001(\01322.google.cloud.discoveryengine.v1beta.SpannerSourceH\000\022O\n" - + "\020cloud_sql_source\030\014" - + " \001(\01323.google.cloud.discoveryengine.v1beta.CloudSqlSourceH\000\022P\n" + + "\016spanner_source\030\013 \001(\01322.go" + + "ogle.cloud.discoveryengine.v1beta.SpannerSourceH\000\022O\n" + + "\020cloud_sql_source\030\014 \001(\01323.go" + + "ogle.cloud.discoveryengine.v1beta.CloudSqlSourceH\000\022P\n" + "\020firestore_source\030\r" + " \001(\01324.google.cloud.discoveryengine.v1beta.FirestoreSourceH\000\022M\n" - + "\017alloy_db_source\030\016" - + " \001(\01322.google.cloud.discoveryengine.v1beta.AlloyDbSourceH\000\022N\n" - + "\017bigtable_source\030\017" - + " \001(\01323.google.cloud.discoveryengine.v1beta.BigtableSourceH\000\022=\n" + + "\017alloy_db_source\030\016 \001(\01322." + + "google.cloud.discoveryengine.v1beta.AlloyDbSourceH\000\022N\n" + + "\017bigtable_source\030\017 \001(\01323.g" + + "oogle.cloud.discoveryengine.v1beta.BigtableSourceH\000\022=\n" + "\006parent\030\001 \001(\tB-\340A\002\372A\'\n" + "%discoveryengine.googleapis.com/Branch\022L\n" - + "\014error_config\030\005 \001(\013" - + "26.google.cloud.discoveryengine.v1beta.ImportErrorConfig\022k\n" - + "\023reconciliation_mode\030\006 \001(\0162N.google.cloud.discoveryengine.v1b" - + "eta.ImportDocumentsRequest.ReconciliationMode\022/\n" + + "\014error_config\030\005" + + " \001(\01326.google.cloud.discoveryengine.v1beta.ImportErrorConfig\022k\n" + + "\023reconciliation_mode\030\006 \001(\0162N.google.cloud.dis" + + "coveryengine.v1beta.ImportDocumentsRequest.ReconciliationMode\022/\n" + "\013update_mask\030\007 \001(\0132\032.google.protobuf.FieldMask\022\031\n" + "\021auto_generate_ids\030\010 \001(\010\022\020\n" - + "\010id_field\030\t \001(\t\032U\n" + + "\010id_field\030\t \001(\t\022\"\n" + + "\025force_refresh_content\030\020 \001(\010B\003\340A\001\032U\n" + "\014InlineSource\022E\n" - + "\tdocuments\030\001" - + " \003(\0132-.google.cloud.discoveryengine.v1beta.DocumentB\003\340A\002\"T\n" + + "\tdocuments\030\001 \003(\0132-.google.clou" + + "d.discoveryengine.v1beta.DocumentB\003\340A\002\"T\n" + "\022ReconciliationMode\022#\n" + "\037RECONCILIATION_MODE_UNSPECIFIED\020\000\022\017\n" + "\013INCREMENTAL\020\001\022\010\n" @@ -347,18 +350,18 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\006source\"\222\001\n" + "\027ImportDocumentsResponse\022)\n\r" + "error_samples\030\001 \003(\0132\022.google.rpc.Status\022L\n" - + "\014error_config\030\002" - + " \001(\01326.google.cloud.discoveryengine.v1beta.ImportErrorConfig\"\221\003\n" + + "\014error_config\030\002 \001(\01326.google.clo" + + "ud.discoveryengine.v1beta.ImportErrorConfig\"\221\003\n" + "&ImportSuggestionDenyListEntriesRequest\022q\n\r" - + "inline_source\030\002 \001(\0132X.google.cloud.discove" - + "ryengine.v1beta.ImportSuggestionDenyListEntriesRequest.InlineSourceH\000\022D\n\n" + + "inline_source\030\002 \001(\0132X.google.cloud.discoveryengine.v1beta.ImportSugges" + + "tionDenyListEntriesRequest.InlineSourceH\000\022D\n\n" + "gcs_source\030\003" + " \001(\0132..google.cloud.discoveryengine.v1beta.GcsSourceH\000\022@\n" + "\006parent\030\001 \001(\tB0\340A\002\372A*\n" + "(discoveryengine.googleapis.com/DataStore\032b\n" + "\014InlineSource\022R\n" - + "\007entries\030\001 \003(\0132<" - + ".google.cloud.discoveryengine.v1beta.SuggestionDenyListEntryB\003\340A\002B\010\n" + + "\007entries\030\001" + + " \003(\0132<.google.cloud.discoveryengine.v1beta.SuggestionDenyListEntryB\003\340A\002B\010\n" + "\006source\"\222\001\n" + "\'ImportSuggestionDenyListEntriesResponse\022)\n\r" + "error_samples\030\001 \003(\0132\022.google.rpc.Status\022\036\n" @@ -368,60 +371,60 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\013create_time\030\001 \001(\0132\032.google.protobuf.Timestamp\022/\n" + "\013update_time\030\002 \001(\0132\032.google.protobuf.Timestamp\"\250\004\n" + "\"ImportCompletionSuggestionsRequest\022m\n\r" - + "inline_source\030\002 \001(\0132T.google.cl" - + "oud.discoveryengine.v1beta.ImportCompletionSuggestionsRequest.InlineSourceH\000\022D\n\n" - + "gcs_source\030\003" - + " \001(\0132..google.cloud.discoveryengine.v1beta.GcsSourceH\000\022N\n" - + "\017bigquery_source\030\004" - + " \001(\01323.google.cloud.discoveryengine.v1beta.BigQuerySourceH\000\022@\n" + + "inline_source\030\002 \001(\0132T.google.cloud.discoveryengine.v1beta.I" + + "mportCompletionSuggestionsRequest.InlineSourceH\000\022D\n\n" + + "gcs_source\030\003 \001(\0132..google.cl" + + "oud.discoveryengine.v1beta.GcsSourceH\000\022N\n" + + "\017bigquery_source\030\004 \001(\01323.google.cloud.d" + + "iscoveryengine.v1beta.BigQuerySourceH\000\022@\n" + "\006parent\030\001 \001(\tB0\340A\002\372A*\n" + "(discoveryengine.googleapis.com/DataStore\022L\n" - + "\014error_config\030\005 \001(\01326.goo" - + "gle.cloud.discoveryengine.v1beta.ImportErrorConfig\032c\n" + + "\014error_config\030\005" + + " \001(\01326.google.cloud.discoveryengine.v1beta.ImportErrorConfig\032c\n" + "\014InlineSource\022S\n" - + "\013suggestions\030\001" - + " \003(\01329.google.cloud.discoveryengine.v1beta.CompletionSuggestionB\003\340A\002B\010\n" + + "\013suggestions\030\001 \003(\01329.google.cloud.disco" + + "veryengine.v1beta.CompletionSuggestionB\003\340A\002B\010\n" + "\006source\"\236\001\n" + "#ImportCompletionSuggestionsResponse\022)\n\r" + "error_samples\030\001 \003(\0132\022.google.rpc.Status\022L\n" - + "\014error_config\030\002 \001(\01326.google.clou" - + "d.discoveryengine.v1beta.ImportErrorConfig\"\265\001\n" + + "\014error_config\030\002 \001(\01326" + + ".google.cloud.discoveryengine.v1beta.ImportErrorConfig\"\265\001\n" + "#ImportCompletionSuggestionsMetadata\022/\n" + "\013create_time\030\001 \001(\0132\032.google.protobuf.Timestamp\022/\n" + "\013update_time\030\002 \001(\0132\032.google.protobuf.Timestamp\022\025\n\r" + "success_count\030\003 \001(\003\022\025\n\r" + "failure_count\030\004 \001(\003\"\227\004\n" + "\032ImportSampleQueriesRequest\022e\n\r" - + "inline_source\030\002 \001(\0132L.google.cloud.discoveryengine.v1beta.I" - + "mportSampleQueriesRequest.InlineSourceH\000\022D\n\n" - + "gcs_source\030\003" - + " \001(\0132..google.cloud.discoveryengine.v1beta.GcsSourceH\000\022N\n" - + "\017bigquery_source\030\004" - + " \001(\01323.google.cloud.discoveryengine.v1beta.BigQuerySourceH\000\022E\n" + + "inline_source\030\002 \001(\0132L.google.cloud.discoveryeng" + + "ine.v1beta.ImportSampleQueriesRequest.InlineSourceH\000\022D\n\n" + + "gcs_source\030\003 \001(\0132..googl" + + "e.cloud.discoveryengine.v1beta.GcsSourceH\000\022N\n" + + "\017bigquery_source\030\004 \001(\01323.google.clo" + + "ud.discoveryengine.v1beta.BigQuerySourceH\000\022E\n" + "\006parent\030\001 \001(\tB5\340A\002\372A/\n" + "-discoveryengine.googleapis.com/SampleQuerySet\022L\n" - + "\014error_config\030\005 " - + "\001(\01326.google.cloud.discoveryengine.v1beta.ImportErrorConfig\032]\n" + + "\014error_config\030\005" + + " \001(\01326.google.cloud.discoveryengine.v1beta.ImportErrorConfig\032]\n" + "\014InlineSource\022M\n" - + "\016sample_queries\030\001" - + " \003(\01320.google.cloud.discoveryengine.v1beta.SampleQueryB\003\340A\002B\010\n" + + "\016sample_queries\030\001 \003(\01320.google" + + ".cloud.discoveryengine.v1beta.SampleQueryB\003\340A\002B\010\n" + "\006source\"\226\001\n" + "\033ImportSampleQueriesResponse\022)\n\r" + "error_samples\030\001 \003(\0132\022.google.rpc.Status\022L\n" - + "\014error_config\030\002 \001(\01326.google.cloud.dis" - + "coveryengine.v1beta.ImportErrorConfig\"\302\001\n" + + "\014error_config\030\002 \001(\01326.goog" + + "le.cloud.discoveryengine.v1beta.ImportErrorConfig\"\302\001\n" + "\033ImportSampleQueriesMetadata\022/\n" + "\013create_time\030\001 \001(\0132\032.google.protobuf.Timestamp\022/\n" + "\013update_time\030\002 \001(\0132\032.google.protobuf.Timestamp\022\025\n\r" + "success_count\030\003 \001(\003\022\025\n\r" + "failure_count\030\004 \001(\003\022\023\n" + "\013total_count\030\005 \001(\003B\230\002\n" - + "\'com.google.cloud.discoveryengine.v1betaB\021" - + "ImportConfigProtoP\001ZQcloud.google.com/go/discoveryengine/apiv1beta/discoveryengi" - + "nepb;discoveryenginepb\242\002\017DISCOVERYENGINE" - + "\252\002#Google.Cloud.DiscoveryEngine.V1Beta\312\002" - + "#Google\\Cloud\\DiscoveryEngine\\V1beta\352\002&G" - + "oogle::Cloud::DiscoveryEngine::V1betab\006proto3" + + "\'com.google.cloud.discoveryengine.v1betaB\021ImportConfigProtoP\001ZQcloud.g" + + "oogle.com/go/discoveryengine/apiv1beta/d" + + "iscoveryenginepb;discoveryenginepb\242\002\017DIS" + + "COVERYENGINE\252\002#Google.Cloud.DiscoveryEng" + + "ine.V1Beta\312\002#Google\\Cloud\\DiscoveryEngin" + + "e\\V1beta\352\002&Google::Cloud::DiscoveryEngine::V1betab\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -517,7 +520,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_cloud_discoveryengine_v1beta_FhirStoreSource_descriptor, new java.lang.String[] { - "FhirStore", "GcsStagingDir", "ResourceTypes", + "FhirStore", "GcsStagingDir", "ResourceTypes", "UpdateFromLatestPredefinedSchema", }); internal_static_google_cloud_discoveryengine_v1beta_CloudSqlSource_descriptor = getDescriptor().getMessageType(6); @@ -613,6 +616,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "UpdateMask", "AutoGenerateIds", "IdField", + "ForceRefreshContent", "Source", }); internal_static_google_cloud_discoveryengine_v1beta_ImportDocumentsRequest_InlineSource_descriptor = diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ImportDocumentsRequest.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ImportDocumentsRequest.java index 9e05fa99764d..2b4a4940e16e 100644 --- a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ImportDocumentsRequest.java +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ImportDocumentsRequest.java @@ -110,6 +110,9 @@ public enum ReconciliationMode implements com.google.protobuf.ProtocolMessageEnu *
                  * Calculates diff and replaces the entire document dataset. Existing
                  * documents may be deleted if they are not present in the source location.
            +     * When using this mode, there won't be any downtime on the dataset
            +     * targeted. Any document that should remain unchanged or that should be
            +     * updated will continue serving while the operation is running.
                  * 
            * * FULL = 2; @@ -156,6 +159,9 @@ public enum ReconciliationMode implements com.google.protobuf.ProtocolMessageEnu *
                  * Calculates diff and replaces the entire document dataset. Existing
                  * documents may be deleted if they are not present in the source location.
            +     * When using this mode, there won't be any downtime on the dataset
            +     * targeted. Any document that should remain unchanged or that should be
            +     * updated will continue serving while the operation is running.
                  * 
            * * FULL = 2; @@ -2236,7 +2242,6 @@ public boolean getAutoGenerateIds() { * must be `custom` or `csv`. Otherwise, an INVALID_ARGUMENT error is thrown. * * [SpannerSource][google.cloud.discoveryengine.v1beta.SpannerSource]. * * [CloudSqlSource][google.cloud.discoveryengine.v1beta.CloudSqlSource]. - * * [FirestoreSource][google.cloud.discoveryengine.v1beta.FirestoreSource]. * * [BigtableSource][google.cloud.discoveryengine.v1beta.BigtableSource]. * * @@ -2293,7 +2298,6 @@ public java.lang.String getIdField() { * must be `custom` or `csv`. Otherwise, an INVALID_ARGUMENT error is thrown. * * [SpannerSource][google.cloud.discoveryengine.v1beta.SpannerSource]. * * [CloudSqlSource][google.cloud.discoveryengine.v1beta.CloudSqlSource]. - * * [FirestoreSource][google.cloud.discoveryengine.v1beta.FirestoreSource]. * * [BigtableSource][google.cloud.discoveryengine.v1beta.BigtableSource]. * * @@ -2314,6 +2318,29 @@ public com.google.protobuf.ByteString getIdFieldBytes() { } } + public static final int FORCE_REFRESH_CONTENT_FIELD_NUMBER = 16; + private boolean forceRefreshContent_ = false; + + /** + * + * + *
            +   * Optional. Whether to force refresh the unstructured content of the
            +   * documents.
            +   *
            +   * If set to `true`, the content part of the documents will be refreshed
            +   * regardless of the update status of the referencing content.
            +   * 
            + * + * bool force_refresh_content = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The forceRefreshContent. + */ + @java.lang.Override + public boolean getForceRefreshContent() { + return forceRefreshContent_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -2377,6 +2404,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (sourceCase_ == 15) { output.writeMessage(15, (com.google.cloud.discoveryengine.v1beta.BigtableSource) source_); } + if (forceRefreshContent_ != false) { + output.writeBool(16, forceRefreshContent_); + } getUnknownFields().writeTo(output); } @@ -2454,6 +2484,9 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 15, (com.google.cloud.discoveryengine.v1beta.BigtableSource) source_); } + if (forceRefreshContent_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(16, forceRefreshContent_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -2482,6 +2515,7 @@ public boolean equals(final java.lang.Object obj) { } if (getAutoGenerateIds() != other.getAutoGenerateIds()) return false; if (!getIdField().equals(other.getIdField())) return false; + if (getForceRefreshContent() != other.getForceRefreshContent()) return false; if (!getSourceCase().equals(other.getSourceCase())) return false; switch (sourceCase_) { case 2: @@ -2541,6 +2575,8 @@ public int hashCode() { hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getAutoGenerateIds()); hash = (37 * hash) + ID_FIELD_FIELD_NUMBER; hash = (53 * hash) + getIdField().hashCode(); + hash = (37 * hash) + FORCE_REFRESH_CONTENT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getForceRefreshContent()); switch (sourceCase_) { case 2: hash = (37 * hash) + INLINE_SOURCE_FIELD_NUMBER; @@ -2773,6 +2809,7 @@ public Builder clear() { } autoGenerateIds_ = false; idField_ = ""; + forceRefreshContent_ = false; sourceCase_ = 0; source_ = null; return this; @@ -2836,6 +2873,9 @@ private void buildPartial0( if (((from_bitField0_ & 0x00004000) != 0)) { result.idField_ = idField_; } + if (((from_bitField0_ & 0x00008000) != 0)) { + result.forceRefreshContent_ = forceRefreshContent_; + } result.bitField0_ |= to_bitField0_; } @@ -2908,6 +2948,9 @@ public Builder mergeFrom(com.google.cloud.discoveryengine.v1beta.ImportDocuments bitField0_ |= 0x00004000; onChanged(); } + if (other.getForceRefreshContent() != false) { + setForceRefreshContent(other.getForceRefreshContent()); + } switch (other.getSourceCase()) { case INLINE_SOURCE: { @@ -3086,6 +3129,12 @@ public Builder mergeFrom( sourceCase_ = 15; break; } // case 122 + case 128: + { + forceRefreshContent_ = input.readBool(); + bitField0_ |= 0x00008000; + break; + } // case 128 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -5964,7 +6013,6 @@ public Builder clearAutoGenerateIds() { * must be `custom` or `csv`. Otherwise, an INVALID_ARGUMENT error is thrown. * * [SpannerSource][google.cloud.discoveryengine.v1beta.SpannerSource]. * * [CloudSqlSource][google.cloud.discoveryengine.v1beta.CloudSqlSource]. - * * [FirestoreSource][google.cloud.discoveryengine.v1beta.FirestoreSource]. * * [BigtableSource][google.cloud.discoveryengine.v1beta.BigtableSource]. * * @@ -6020,7 +6068,6 @@ public java.lang.String getIdField() { * must be `custom` or `csv`. Otherwise, an INVALID_ARGUMENT error is thrown. * * [SpannerSource][google.cloud.discoveryengine.v1beta.SpannerSource]. * * [CloudSqlSource][google.cloud.discoveryengine.v1beta.CloudSqlSource]. - * * [FirestoreSource][google.cloud.discoveryengine.v1beta.FirestoreSource]. * * [BigtableSource][google.cloud.discoveryengine.v1beta.BigtableSource]. * * @@ -6076,7 +6123,6 @@ public com.google.protobuf.ByteString getIdFieldBytes() { * must be `custom` or `csv`. Otherwise, an INVALID_ARGUMENT error is thrown. * * [SpannerSource][google.cloud.discoveryengine.v1beta.SpannerSource]. * * [CloudSqlSource][google.cloud.discoveryengine.v1beta.CloudSqlSource]. - * * [FirestoreSource][google.cloud.discoveryengine.v1beta.FirestoreSource]. * * [BigtableSource][google.cloud.discoveryengine.v1beta.BigtableSource]. * * @@ -6131,7 +6177,6 @@ public Builder setIdField(java.lang.String value) { * must be `custom` or `csv`. Otherwise, an INVALID_ARGUMENT error is thrown. * * [SpannerSource][google.cloud.discoveryengine.v1beta.SpannerSource]. * * [CloudSqlSource][google.cloud.discoveryengine.v1beta.CloudSqlSource]. - * * [FirestoreSource][google.cloud.discoveryengine.v1beta.FirestoreSource]. * * [BigtableSource][google.cloud.discoveryengine.v1beta.BigtableSource]. * * @@ -6182,7 +6227,6 @@ public Builder clearIdField() { * must be `custom` or `csv`. Otherwise, an INVALID_ARGUMENT error is thrown. * * [SpannerSource][google.cloud.discoveryengine.v1beta.SpannerSource]. * * [CloudSqlSource][google.cloud.discoveryengine.v1beta.CloudSqlSource]. - * * [FirestoreSource][google.cloud.discoveryengine.v1beta.FirestoreSource]. * * [BigtableSource][google.cloud.discoveryengine.v1beta.BigtableSource]. * * @@ -6202,6 +6246,74 @@ public Builder setIdFieldBytes(com.google.protobuf.ByteString value) { return this; } + private boolean forceRefreshContent_; + + /** + * + * + *
            +     * Optional. Whether to force refresh the unstructured content of the
            +     * documents.
            +     *
            +     * If set to `true`, the content part of the documents will be refreshed
            +     * regardless of the update status of the referencing content.
            +     * 
            + * + * bool force_refresh_content = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The forceRefreshContent. + */ + @java.lang.Override + public boolean getForceRefreshContent() { + return forceRefreshContent_; + } + + /** + * + * + *
            +     * Optional. Whether to force refresh the unstructured content of the
            +     * documents.
            +     *
            +     * If set to `true`, the content part of the documents will be refreshed
            +     * regardless of the update status of the referencing content.
            +     * 
            + * + * bool force_refresh_content = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The forceRefreshContent to set. + * @return This builder for chaining. + */ + public Builder setForceRefreshContent(boolean value) { + + forceRefreshContent_ = value; + bitField0_ |= 0x00008000; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Optional. Whether to force refresh the unstructured content of the
            +     * documents.
            +     *
            +     * If set to `true`, the content part of the documents will be refreshed
            +     * regardless of the update status of the referencing content.
            +     * 
            + * + * bool force_refresh_content = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearForceRefreshContent() { + bitField0_ = (bitField0_ & ~0x00008000); + forceRefreshContent_ = false; + onChanged(); + return this; + } + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.ImportDocumentsRequest) } diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ImportDocumentsRequestOrBuilder.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ImportDocumentsRequestOrBuilder.java index c8c736d040af..63f273cbbe79 100644 --- a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ImportDocumentsRequestOrBuilder.java +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ImportDocumentsRequestOrBuilder.java @@ -585,7 +585,6 @@ public interface ImportDocumentsRequestOrBuilder * must be `custom` or `csv`. Otherwise, an INVALID_ARGUMENT error is thrown. * * [SpannerSource][google.cloud.discoveryengine.v1beta.SpannerSource]. * * [CloudSqlSource][google.cloud.discoveryengine.v1beta.CloudSqlSource]. - * * [FirestoreSource][google.cloud.discoveryengine.v1beta.FirestoreSource]. * * [BigtableSource][google.cloud.discoveryengine.v1beta.BigtableSource]. * * @@ -631,7 +630,6 @@ public interface ImportDocumentsRequestOrBuilder * must be `custom` or `csv`. Otherwise, an INVALID_ARGUMENT error is thrown. * * [SpannerSource][google.cloud.discoveryengine.v1beta.SpannerSource]. * * [CloudSqlSource][google.cloud.discoveryengine.v1beta.CloudSqlSource]. - * * [FirestoreSource][google.cloud.discoveryengine.v1beta.FirestoreSource]. * * [BigtableSource][google.cloud.discoveryengine.v1beta.BigtableSource]. * * @@ -641,5 +639,22 @@ public interface ImportDocumentsRequestOrBuilder */ com.google.protobuf.ByteString getIdFieldBytes(); + /** + * + * + *
            +   * Optional. Whether to force refresh the unstructured content of the
            +   * documents.
            +   *
            +   * If set to `true`, the content part of the documents will be refreshed
            +   * regardless of the update status of the referencing content.
            +   * 
            + * + * bool force_refresh_content = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The forceRefreshContent. + */ + boolean getForceRefreshContent(); + com.google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.SourceCase getSourceCase(); } diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ImportIdentityMappingsRequest.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ImportIdentityMappingsRequest.java new file mode 100644 index 000000000000..547f9c89c119 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ImportIdentityMappingsRequest.java @@ -0,0 +1,2185 @@ +/* + * 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/cloud/discoveryengine/v1beta/identity_mapping_store_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.discoveryengine.v1beta; + +/** + * + * + *
            + * Request message for
            + * [IdentityMappingStoreService.ImportIdentityMappings][google.cloud.discoveryengine.v1beta.IdentityMappingStoreService.ImportIdentityMappings]
            + * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.ImportIdentityMappingsRequest} + */ +@com.google.protobuf.Generated +public final class ImportIdentityMappingsRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.ImportIdentityMappingsRequest) + ImportIdentityMappingsRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ImportIdentityMappingsRequest"); + } + + // Use ImportIdentityMappingsRequest.newBuilder() to construct. + private ImportIdentityMappingsRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ImportIdentityMappingsRequest() { + identityMappingStore_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.IdentityMappingStoreServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_ImportIdentityMappingsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.IdentityMappingStoreServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_ImportIdentityMappingsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.ImportIdentityMappingsRequest.class, + com.google.cloud.discoveryengine.v1beta.ImportIdentityMappingsRequest.Builder.class); + } + + public interface InlineSourceOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.ImportIdentityMappingsRequest.InlineSource) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
            +     * A maximum of 10000 entries can be imported at one time
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.IdentityMappingEntry identity_mapping_entries = 1; + * + */ + java.util.List + getIdentityMappingEntriesList(); + + /** + * + * + *
            +     * A maximum of 10000 entries can be imported at one time
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.IdentityMappingEntry identity_mapping_entries = 1; + * + */ + com.google.cloud.discoveryengine.v1beta.IdentityMappingEntry getIdentityMappingEntries( + int index); + + /** + * + * + *
            +     * A maximum of 10000 entries can be imported at one time
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.IdentityMappingEntry identity_mapping_entries = 1; + * + */ + int getIdentityMappingEntriesCount(); + + /** + * + * + *
            +     * A maximum of 10000 entries can be imported at one time
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.IdentityMappingEntry identity_mapping_entries = 1; + * + */ + java.util.List + getIdentityMappingEntriesOrBuilderList(); + + /** + * + * + *
            +     * A maximum of 10000 entries can be imported at one time
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.IdentityMappingEntry identity_mapping_entries = 1; + * + */ + com.google.cloud.discoveryengine.v1beta.IdentityMappingEntryOrBuilder + getIdentityMappingEntriesOrBuilder(int index); + } + + /** + * + * + *
            +   * The inline source to import identity mapping entries from.
            +   * 
            + * + * Protobuf type {@code + * google.cloud.discoveryengine.v1beta.ImportIdentityMappingsRequest.InlineSource} + */ + public static final class InlineSource extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.ImportIdentityMappingsRequest.InlineSource) + InlineSourceOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "InlineSource"); + } + + // Use InlineSource.newBuilder() to construct. + private InlineSource(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private InlineSource() { + identityMappingEntries_ = java.util.Collections.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.IdentityMappingStoreServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_ImportIdentityMappingsRequest_InlineSource_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.IdentityMappingStoreServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_ImportIdentityMappingsRequest_InlineSource_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.ImportIdentityMappingsRequest.InlineSource + .class, + com.google.cloud.discoveryengine.v1beta.ImportIdentityMappingsRequest.InlineSource + .Builder.class); + } + + public static final int IDENTITY_MAPPING_ENTRIES_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List + identityMappingEntries_; + + /** + * + * + *
            +     * A maximum of 10000 entries can be imported at one time
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.IdentityMappingEntry identity_mapping_entries = 1; + * + */ + @java.lang.Override + public java.util.List + getIdentityMappingEntriesList() { + return identityMappingEntries_; + } + + /** + * + * + *
            +     * A maximum of 10000 entries can be imported at one time
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.IdentityMappingEntry identity_mapping_entries = 1; + * + */ + @java.lang.Override + public java.util.List< + ? extends com.google.cloud.discoveryengine.v1beta.IdentityMappingEntryOrBuilder> + getIdentityMappingEntriesOrBuilderList() { + return identityMappingEntries_; + } + + /** + * + * + *
            +     * A maximum of 10000 entries can be imported at one time
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.IdentityMappingEntry identity_mapping_entries = 1; + * + */ + @java.lang.Override + public int getIdentityMappingEntriesCount() { + return identityMappingEntries_.size(); + } + + /** + * + * + *
            +     * A maximum of 10000 entries can be imported at one time
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.IdentityMappingEntry identity_mapping_entries = 1; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.IdentityMappingEntry getIdentityMappingEntries( + int index) { + return identityMappingEntries_.get(index); + } + + /** + * + * + *
            +     * A maximum of 10000 entries can be imported at one time
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.IdentityMappingEntry identity_mapping_entries = 1; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.IdentityMappingEntryOrBuilder + getIdentityMappingEntriesOrBuilder(int index) { + return identityMappingEntries_.get(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 { + for (int i = 0; i < identityMappingEntries_.size(); i++) { + output.writeMessage(1, identityMappingEntries_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < identityMappingEntries_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 1, identityMappingEntries_.get(i)); + } + 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.discoveryengine.v1beta.ImportIdentityMappingsRequest.InlineSource)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1beta.ImportIdentityMappingsRequest.InlineSource other = + (com.google.cloud.discoveryengine.v1beta.ImportIdentityMappingsRequest.InlineSource) obj; + + if (!getIdentityMappingEntriesList().equals(other.getIdentityMappingEntriesList())) + 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 (getIdentityMappingEntriesCount() > 0) { + hash = (37 * hash) + IDENTITY_MAPPING_ENTRIES_FIELD_NUMBER; + hash = (53 * hash) + getIdentityMappingEntriesList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1beta.ImportIdentityMappingsRequest.InlineSource + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.ImportIdentityMappingsRequest.InlineSource + 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.discoveryengine.v1beta.ImportIdentityMappingsRequest.InlineSource + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.ImportIdentityMappingsRequest.InlineSource + 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.discoveryengine.v1beta.ImportIdentityMappingsRequest.InlineSource + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.ImportIdentityMappingsRequest.InlineSource + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1beta.ImportIdentityMappingsRequest.InlineSource + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.ImportIdentityMappingsRequest.InlineSource + 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.discoveryengine.v1beta.ImportIdentityMappingsRequest.InlineSource + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.ImportIdentityMappingsRequest.InlineSource + 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.discoveryengine.v1beta.ImportIdentityMappingsRequest.InlineSource + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.ImportIdentityMappingsRequest.InlineSource + 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.discoveryengine.v1beta.ImportIdentityMappingsRequest.InlineSource + 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; + } + + /** + * + * + *
            +     * The inline source to import identity mapping entries from.
            +     * 
            + * + * Protobuf type {@code + * google.cloud.discoveryengine.v1beta.ImportIdentityMappingsRequest.InlineSource} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.ImportIdentityMappingsRequest.InlineSource) + com.google.cloud.discoveryengine.v1beta.ImportIdentityMappingsRequest + .InlineSourceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.IdentityMappingStoreServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_ImportIdentityMappingsRequest_InlineSource_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.IdentityMappingStoreServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_ImportIdentityMappingsRequest_InlineSource_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.ImportIdentityMappingsRequest.InlineSource + .class, + com.google.cloud.discoveryengine.v1beta.ImportIdentityMappingsRequest.InlineSource + .Builder.class); + } + + // Construct using + // com.google.cloud.discoveryengine.v1beta.ImportIdentityMappingsRequest.InlineSource.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (identityMappingEntriesBuilder_ == null) { + identityMappingEntries_ = java.util.Collections.emptyList(); + } else { + identityMappingEntries_ = null; + identityMappingEntriesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1beta.IdentityMappingStoreServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_ImportIdentityMappingsRequest_InlineSource_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.ImportIdentityMappingsRequest.InlineSource + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1beta.ImportIdentityMappingsRequest.InlineSource + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.ImportIdentityMappingsRequest.InlineSource + build() { + com.google.cloud.discoveryengine.v1beta.ImportIdentityMappingsRequest.InlineSource result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.ImportIdentityMappingsRequest.InlineSource + buildPartial() { + com.google.cloud.discoveryengine.v1beta.ImportIdentityMappingsRequest.InlineSource result = + new com.google.cloud.discoveryengine.v1beta.ImportIdentityMappingsRequest.InlineSource( + this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.discoveryengine.v1beta.ImportIdentityMappingsRequest.InlineSource + result) { + if (identityMappingEntriesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + identityMappingEntries_ = + java.util.Collections.unmodifiableList(identityMappingEntries_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.identityMappingEntries_ = identityMappingEntries_; + } else { + result.identityMappingEntries_ = identityMappingEntriesBuilder_.build(); + } + } + + private void buildPartial0( + com.google.cloud.discoveryengine.v1beta.ImportIdentityMappingsRequest.InlineSource + result) { + int from_bitField0_ = bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.discoveryengine.v1beta.ImportIdentityMappingsRequest.InlineSource) { + return mergeFrom( + (com.google.cloud.discoveryengine.v1beta.ImportIdentityMappingsRequest.InlineSource) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1beta.ImportIdentityMappingsRequest.InlineSource + other) { + if (other + == com.google.cloud.discoveryengine.v1beta.ImportIdentityMappingsRequest.InlineSource + .getDefaultInstance()) return this; + if (identityMappingEntriesBuilder_ == null) { + if (!other.identityMappingEntries_.isEmpty()) { + if (identityMappingEntries_.isEmpty()) { + identityMappingEntries_ = other.identityMappingEntries_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureIdentityMappingEntriesIsMutable(); + identityMappingEntries_.addAll(other.identityMappingEntries_); + } + onChanged(); + } + } else { + if (!other.identityMappingEntries_.isEmpty()) { + if (identityMappingEntriesBuilder_.isEmpty()) { + identityMappingEntriesBuilder_.dispose(); + identityMappingEntriesBuilder_ = null; + identityMappingEntries_ = other.identityMappingEntries_; + bitField0_ = (bitField0_ & ~0x00000001); + identityMappingEntriesBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetIdentityMappingEntriesFieldBuilder() + : null; + } else { + identityMappingEntriesBuilder_.addAllMessages(other.identityMappingEntries_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.discoveryengine.v1beta.IdentityMappingEntry m = + input.readMessage( + com.google.cloud.discoveryengine.v1beta.IdentityMappingEntry.parser(), + extensionRegistry); + if (identityMappingEntriesBuilder_ == null) { + ensureIdentityMappingEntriesIsMutable(); + identityMappingEntries_.add(m); + } else { + identityMappingEntriesBuilder_.addMessage(m); + } + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List + identityMappingEntries_ = java.util.Collections.emptyList(); + + private void ensureIdentityMappingEntriesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + identityMappingEntries_ = + new java.util.ArrayList( + identityMappingEntries_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.discoveryengine.v1beta.IdentityMappingEntry, + com.google.cloud.discoveryengine.v1beta.IdentityMappingEntry.Builder, + com.google.cloud.discoveryengine.v1beta.IdentityMappingEntryOrBuilder> + identityMappingEntriesBuilder_; + + /** + * + * + *
            +       * A maximum of 10000 entries can be imported at one time
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.IdentityMappingEntry identity_mapping_entries = 1; + * + */ + public java.util.List + getIdentityMappingEntriesList() { + if (identityMappingEntriesBuilder_ == null) { + return java.util.Collections.unmodifiableList(identityMappingEntries_); + } else { + return identityMappingEntriesBuilder_.getMessageList(); + } + } + + /** + * + * + *
            +       * A maximum of 10000 entries can be imported at one time
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.IdentityMappingEntry identity_mapping_entries = 1; + * + */ + public int getIdentityMappingEntriesCount() { + if (identityMappingEntriesBuilder_ == null) { + return identityMappingEntries_.size(); + } else { + return identityMappingEntriesBuilder_.getCount(); + } + } + + /** + * + * + *
            +       * A maximum of 10000 entries can be imported at one time
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.IdentityMappingEntry identity_mapping_entries = 1; + * + */ + public com.google.cloud.discoveryengine.v1beta.IdentityMappingEntry getIdentityMappingEntries( + int index) { + if (identityMappingEntriesBuilder_ == null) { + return identityMappingEntries_.get(index); + } else { + return identityMappingEntriesBuilder_.getMessage(index); + } + } + + /** + * + * + *
            +       * A maximum of 10000 entries can be imported at one time
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.IdentityMappingEntry identity_mapping_entries = 1; + * + */ + public Builder setIdentityMappingEntries( + int index, com.google.cloud.discoveryengine.v1beta.IdentityMappingEntry value) { + if (identityMappingEntriesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureIdentityMappingEntriesIsMutable(); + identityMappingEntries_.set(index, value); + onChanged(); + } else { + identityMappingEntriesBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
            +       * A maximum of 10000 entries can be imported at one time
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.IdentityMappingEntry identity_mapping_entries = 1; + * + */ + public Builder setIdentityMappingEntries( + int index, + com.google.cloud.discoveryengine.v1beta.IdentityMappingEntry.Builder builderForValue) { + if (identityMappingEntriesBuilder_ == null) { + ensureIdentityMappingEntriesIsMutable(); + identityMappingEntries_.set(index, builderForValue.build()); + onChanged(); + } else { + identityMappingEntriesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
            +       * A maximum of 10000 entries can be imported at one time
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.IdentityMappingEntry identity_mapping_entries = 1; + * + */ + public Builder addIdentityMappingEntries( + com.google.cloud.discoveryengine.v1beta.IdentityMappingEntry value) { + if (identityMappingEntriesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureIdentityMappingEntriesIsMutable(); + identityMappingEntries_.add(value); + onChanged(); + } else { + identityMappingEntriesBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
            +       * A maximum of 10000 entries can be imported at one time
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.IdentityMappingEntry identity_mapping_entries = 1; + * + */ + public Builder addIdentityMappingEntries( + int index, com.google.cloud.discoveryengine.v1beta.IdentityMappingEntry value) { + if (identityMappingEntriesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureIdentityMappingEntriesIsMutable(); + identityMappingEntries_.add(index, value); + onChanged(); + } else { + identityMappingEntriesBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
            +       * A maximum of 10000 entries can be imported at one time
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.IdentityMappingEntry identity_mapping_entries = 1; + * + */ + public Builder addIdentityMappingEntries( + com.google.cloud.discoveryengine.v1beta.IdentityMappingEntry.Builder builderForValue) { + if (identityMappingEntriesBuilder_ == null) { + ensureIdentityMappingEntriesIsMutable(); + identityMappingEntries_.add(builderForValue.build()); + onChanged(); + } else { + identityMappingEntriesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
            +       * A maximum of 10000 entries can be imported at one time
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.IdentityMappingEntry identity_mapping_entries = 1; + * + */ + public Builder addIdentityMappingEntries( + int index, + com.google.cloud.discoveryengine.v1beta.IdentityMappingEntry.Builder builderForValue) { + if (identityMappingEntriesBuilder_ == null) { + ensureIdentityMappingEntriesIsMutable(); + identityMappingEntries_.add(index, builderForValue.build()); + onChanged(); + } else { + identityMappingEntriesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
            +       * A maximum of 10000 entries can be imported at one time
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.IdentityMappingEntry identity_mapping_entries = 1; + * + */ + public Builder addAllIdentityMappingEntries( + java.lang.Iterable + values) { + if (identityMappingEntriesBuilder_ == null) { + ensureIdentityMappingEntriesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, identityMappingEntries_); + onChanged(); + } else { + identityMappingEntriesBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
            +       * A maximum of 10000 entries can be imported at one time
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.IdentityMappingEntry identity_mapping_entries = 1; + * + */ + public Builder clearIdentityMappingEntries() { + if (identityMappingEntriesBuilder_ == null) { + identityMappingEntries_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + identityMappingEntriesBuilder_.clear(); + } + return this; + } + + /** + * + * + *
            +       * A maximum of 10000 entries can be imported at one time
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.IdentityMappingEntry identity_mapping_entries = 1; + * + */ + public Builder removeIdentityMappingEntries(int index) { + if (identityMappingEntriesBuilder_ == null) { + ensureIdentityMappingEntriesIsMutable(); + identityMappingEntries_.remove(index); + onChanged(); + } else { + identityMappingEntriesBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
            +       * A maximum of 10000 entries can be imported at one time
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.IdentityMappingEntry identity_mapping_entries = 1; + * + */ + public com.google.cloud.discoveryengine.v1beta.IdentityMappingEntry.Builder + getIdentityMappingEntriesBuilder(int index) { + return internalGetIdentityMappingEntriesFieldBuilder().getBuilder(index); + } + + /** + * + * + *
            +       * A maximum of 10000 entries can be imported at one time
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.IdentityMappingEntry identity_mapping_entries = 1; + * + */ + public com.google.cloud.discoveryengine.v1beta.IdentityMappingEntryOrBuilder + getIdentityMappingEntriesOrBuilder(int index) { + if (identityMappingEntriesBuilder_ == null) { + return identityMappingEntries_.get(index); + } else { + return identityMappingEntriesBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
            +       * A maximum of 10000 entries can be imported at one time
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.IdentityMappingEntry identity_mapping_entries = 1; + * + */ + public java.util.List< + ? extends com.google.cloud.discoveryengine.v1beta.IdentityMappingEntryOrBuilder> + getIdentityMappingEntriesOrBuilderList() { + if (identityMappingEntriesBuilder_ != null) { + return identityMappingEntriesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(identityMappingEntries_); + } + } + + /** + * + * + *
            +       * A maximum of 10000 entries can be imported at one time
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.IdentityMappingEntry identity_mapping_entries = 1; + * + */ + public com.google.cloud.discoveryengine.v1beta.IdentityMappingEntry.Builder + addIdentityMappingEntriesBuilder() { + return internalGetIdentityMappingEntriesFieldBuilder() + .addBuilder( + com.google.cloud.discoveryengine.v1beta.IdentityMappingEntry.getDefaultInstance()); + } + + /** + * + * + *
            +       * A maximum of 10000 entries can be imported at one time
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.IdentityMappingEntry identity_mapping_entries = 1; + * + */ + public com.google.cloud.discoveryengine.v1beta.IdentityMappingEntry.Builder + addIdentityMappingEntriesBuilder(int index) { + return internalGetIdentityMappingEntriesFieldBuilder() + .addBuilder( + index, + com.google.cloud.discoveryengine.v1beta.IdentityMappingEntry.getDefaultInstance()); + } + + /** + * + * + *
            +       * A maximum of 10000 entries can be imported at one time
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.IdentityMappingEntry identity_mapping_entries = 1; + * + */ + public java.util.List + getIdentityMappingEntriesBuilderList() { + return internalGetIdentityMappingEntriesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.discoveryengine.v1beta.IdentityMappingEntry, + com.google.cloud.discoveryengine.v1beta.IdentityMappingEntry.Builder, + com.google.cloud.discoveryengine.v1beta.IdentityMappingEntryOrBuilder> + internalGetIdentityMappingEntriesFieldBuilder() { + if (identityMappingEntriesBuilder_ == null) { + identityMappingEntriesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.discoveryengine.v1beta.IdentityMappingEntry, + com.google.cloud.discoveryengine.v1beta.IdentityMappingEntry.Builder, + com.google.cloud.discoveryengine.v1beta.IdentityMappingEntryOrBuilder>( + identityMappingEntries_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + identityMappingEntries_ = null; + } + return identityMappingEntriesBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.ImportIdentityMappingsRequest.InlineSource) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.ImportIdentityMappingsRequest.InlineSource) + private static final com.google.cloud.discoveryengine.v1beta.ImportIdentityMappingsRequest + .InlineSource + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.discoveryengine.v1beta.ImportIdentityMappingsRequest.InlineSource(); + } + + public static com.google.cloud.discoveryengine.v1beta.ImportIdentityMappingsRequest.InlineSource + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public InlineSource parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.ImportIdentityMappingsRequest.InlineSource + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int sourceCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object source_; + + public enum SourceCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + INLINE_SOURCE(2), + SOURCE_NOT_SET(0); + private final int value; + + private SourceCase(int value) { + this.value = value; + } + + /** + * @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 SourceCase valueOf(int value) { + return forNumber(value); + } + + public static SourceCase forNumber(int value) { + switch (value) { + case 2: + return INLINE_SOURCE; + case 0: + return SOURCE_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public SourceCase getSourceCase() { + return SourceCase.forNumber(sourceCase_); + } + + public static final int INLINE_SOURCE_FIELD_NUMBER = 2; + + /** + * + * + *
            +   * The inline source to import identity mapping entries from.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.ImportIdentityMappingsRequest.InlineSource inline_source = 2; + * + * + * @return Whether the inlineSource field is set. + */ + @java.lang.Override + public boolean hasInlineSource() { + return sourceCase_ == 2; + } + + /** + * + * + *
            +   * The inline source to import identity mapping entries from.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.ImportIdentityMappingsRequest.InlineSource inline_source = 2; + * + * + * @return The inlineSource. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.ImportIdentityMappingsRequest.InlineSource + getInlineSource() { + if (sourceCase_ == 2) { + return (com.google.cloud.discoveryengine.v1beta.ImportIdentityMappingsRequest.InlineSource) + source_; + } + return com.google.cloud.discoveryengine.v1beta.ImportIdentityMappingsRequest.InlineSource + .getDefaultInstance(); + } + + /** + * + * + *
            +   * The inline source to import identity mapping entries from.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.ImportIdentityMappingsRequest.InlineSource inline_source = 2; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.ImportIdentityMappingsRequest.InlineSourceOrBuilder + getInlineSourceOrBuilder() { + if (sourceCase_ == 2) { + return (com.google.cloud.discoveryengine.v1beta.ImportIdentityMappingsRequest.InlineSource) + source_; + } + return com.google.cloud.discoveryengine.v1beta.ImportIdentityMappingsRequest.InlineSource + .getDefaultInstance(); + } + + public static final int IDENTITY_MAPPING_STORE_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object identityMappingStore_ = ""; + + /** + * + * + *
            +   * Required. The name of the Identity Mapping Store to import Identity Mapping
            +   * Entries to. Format:
            +   * `projects/{project}/locations/{location}/identityMappingStores/{identityMappingStore}`
            +   * 
            + * + * + * string identity_mapping_store = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The identityMappingStore. + */ + @java.lang.Override + public java.lang.String getIdentityMappingStore() { + java.lang.Object ref = identityMappingStore_; + 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(); + identityMappingStore_ = s; + return s; + } + } + + /** + * + * + *
            +   * Required. The name of the Identity Mapping Store to import Identity Mapping
            +   * Entries to. Format:
            +   * `projects/{project}/locations/{location}/identityMappingStores/{identityMappingStore}`
            +   * 
            + * + * + * string identity_mapping_store = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for identityMappingStore. + */ + @java.lang.Override + public com.google.protobuf.ByteString getIdentityMappingStoreBytes() { + java.lang.Object ref = identityMappingStore_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + identityMappingStore_ = 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 { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(identityMappingStore_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, identityMappingStore_); + } + if (sourceCase_ == 2) { + output.writeMessage( + 2, + (com.google.cloud.discoveryengine.v1beta.ImportIdentityMappingsRequest.InlineSource) + source_); + } + 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(identityMappingStore_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, identityMappingStore_); + } + if (sourceCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, + (com.google.cloud.discoveryengine.v1beta.ImportIdentityMappingsRequest.InlineSource) + source_); + } + 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.discoveryengine.v1beta.ImportIdentityMappingsRequest)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1beta.ImportIdentityMappingsRequest other = + (com.google.cloud.discoveryengine.v1beta.ImportIdentityMappingsRequest) obj; + + if (!getIdentityMappingStore().equals(other.getIdentityMappingStore())) return false; + if (!getSourceCase().equals(other.getSourceCase())) return false; + switch (sourceCase_) { + case 2: + if (!getInlineSource().equals(other.getInlineSource())) return false; + break; + case 0: + default: + } + 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) + IDENTITY_MAPPING_STORE_FIELD_NUMBER; + hash = (53 * hash) + getIdentityMappingStore().hashCode(); + switch (sourceCase_) { + case 2: + hash = (37 * hash) + INLINE_SOURCE_FIELD_NUMBER; + hash = (53 * hash) + getInlineSource().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1beta.ImportIdentityMappingsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.ImportIdentityMappingsRequest 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.discoveryengine.v1beta.ImportIdentityMappingsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.ImportIdentityMappingsRequest 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.discoveryengine.v1beta.ImportIdentityMappingsRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.ImportIdentityMappingsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1beta.ImportIdentityMappingsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.ImportIdentityMappingsRequest 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.discoveryengine.v1beta.ImportIdentityMappingsRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.ImportIdentityMappingsRequest + 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.discoveryengine.v1beta.ImportIdentityMappingsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.ImportIdentityMappingsRequest 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.discoveryengine.v1beta.ImportIdentityMappingsRequest 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
            +   * [IdentityMappingStoreService.ImportIdentityMappings][google.cloud.discoveryengine.v1beta.IdentityMappingStoreService.ImportIdentityMappings]
            +   * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.ImportIdentityMappingsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.ImportIdentityMappingsRequest) + com.google.cloud.discoveryengine.v1beta.ImportIdentityMappingsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.IdentityMappingStoreServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_ImportIdentityMappingsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.IdentityMappingStoreServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_ImportIdentityMappingsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.ImportIdentityMappingsRequest.class, + com.google.cloud.discoveryengine.v1beta.ImportIdentityMappingsRequest.Builder.class); + } + + // Construct using + // com.google.cloud.discoveryengine.v1beta.ImportIdentityMappingsRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (inlineSourceBuilder_ != null) { + inlineSourceBuilder_.clear(); + } + identityMappingStore_ = ""; + sourceCase_ = 0; + source_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1beta.IdentityMappingStoreServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_ImportIdentityMappingsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.ImportIdentityMappingsRequest + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1beta.ImportIdentityMappingsRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.ImportIdentityMappingsRequest build() { + com.google.cloud.discoveryengine.v1beta.ImportIdentityMappingsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.ImportIdentityMappingsRequest buildPartial() { + com.google.cloud.discoveryengine.v1beta.ImportIdentityMappingsRequest result = + new com.google.cloud.discoveryengine.v1beta.ImportIdentityMappingsRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.discoveryengine.v1beta.ImportIdentityMappingsRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.identityMappingStore_ = identityMappingStore_; + } + } + + private void buildPartialOneofs( + com.google.cloud.discoveryengine.v1beta.ImportIdentityMappingsRequest result) { + result.sourceCase_ = sourceCase_; + result.source_ = this.source_; + if (sourceCase_ == 2 && inlineSourceBuilder_ != null) { + result.source_ = inlineSourceBuilder_.build(); + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.discoveryengine.v1beta.ImportIdentityMappingsRequest) { + return mergeFrom( + (com.google.cloud.discoveryengine.v1beta.ImportIdentityMappingsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1beta.ImportIdentityMappingsRequest other) { + if (other + == com.google.cloud.discoveryengine.v1beta.ImportIdentityMappingsRequest + .getDefaultInstance()) return this; + if (!other.getIdentityMappingStore().isEmpty()) { + identityMappingStore_ = other.identityMappingStore_; + bitField0_ |= 0x00000002; + onChanged(); + } + switch (other.getSourceCase()) { + case INLINE_SOURCE: + { + mergeInlineSource(other.getInlineSource()); + break; + } + case SOURCE_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + identityMappingStore_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 10 + case 18: + { + input.readMessage( + internalGetInlineSourceFieldBuilder().getBuilder(), extensionRegistry); + sourceCase_ = 2; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int sourceCase_ = 0; + private java.lang.Object source_; + + public SourceCase getSourceCase() { + return SourceCase.forNumber(sourceCase_); + } + + public Builder clearSource() { + sourceCase_ = 0; + source_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.ImportIdentityMappingsRequest.InlineSource, + com.google.cloud.discoveryengine.v1beta.ImportIdentityMappingsRequest.InlineSource + .Builder, + com.google.cloud.discoveryengine.v1beta.ImportIdentityMappingsRequest + .InlineSourceOrBuilder> + inlineSourceBuilder_; + + /** + * + * + *
            +     * The inline source to import identity mapping entries from.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.ImportIdentityMappingsRequest.InlineSource inline_source = 2; + * + * + * @return Whether the inlineSource field is set. + */ + @java.lang.Override + public boolean hasInlineSource() { + return sourceCase_ == 2; + } + + /** + * + * + *
            +     * The inline source to import identity mapping entries from.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.ImportIdentityMappingsRequest.InlineSource inline_source = 2; + * + * + * @return The inlineSource. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.ImportIdentityMappingsRequest.InlineSource + getInlineSource() { + if (inlineSourceBuilder_ == null) { + if (sourceCase_ == 2) { + return (com.google.cloud.discoveryengine.v1beta.ImportIdentityMappingsRequest + .InlineSource) + source_; + } + return com.google.cloud.discoveryengine.v1beta.ImportIdentityMappingsRequest.InlineSource + .getDefaultInstance(); + } else { + if (sourceCase_ == 2) { + return inlineSourceBuilder_.getMessage(); + } + return com.google.cloud.discoveryengine.v1beta.ImportIdentityMappingsRequest.InlineSource + .getDefaultInstance(); + } + } + + /** + * + * + *
            +     * The inline source to import identity mapping entries from.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.ImportIdentityMappingsRequest.InlineSource inline_source = 2; + * + */ + public Builder setInlineSource( + com.google.cloud.discoveryengine.v1beta.ImportIdentityMappingsRequest.InlineSource value) { + if (inlineSourceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + source_ = value; + onChanged(); + } else { + inlineSourceBuilder_.setMessage(value); + } + sourceCase_ = 2; + return this; + } + + /** + * + * + *
            +     * The inline source to import identity mapping entries from.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.ImportIdentityMappingsRequest.InlineSource inline_source = 2; + * + */ + public Builder setInlineSource( + com.google.cloud.discoveryengine.v1beta.ImportIdentityMappingsRequest.InlineSource.Builder + builderForValue) { + if (inlineSourceBuilder_ == null) { + source_ = builderForValue.build(); + onChanged(); + } else { + inlineSourceBuilder_.setMessage(builderForValue.build()); + } + sourceCase_ = 2; + return this; + } + + /** + * + * + *
            +     * The inline source to import identity mapping entries from.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.ImportIdentityMappingsRequest.InlineSource inline_source = 2; + * + */ + public Builder mergeInlineSource( + com.google.cloud.discoveryengine.v1beta.ImportIdentityMappingsRequest.InlineSource value) { + if (inlineSourceBuilder_ == null) { + if (sourceCase_ == 2 + && source_ + != com.google.cloud.discoveryengine.v1beta.ImportIdentityMappingsRequest + .InlineSource.getDefaultInstance()) { + source_ = + com.google.cloud.discoveryengine.v1beta.ImportIdentityMappingsRequest.InlineSource + .newBuilder( + (com.google.cloud.discoveryengine.v1beta.ImportIdentityMappingsRequest + .InlineSource) + source_) + .mergeFrom(value) + .buildPartial(); + } else { + source_ = value; + } + onChanged(); + } else { + if (sourceCase_ == 2) { + inlineSourceBuilder_.mergeFrom(value); + } else { + inlineSourceBuilder_.setMessage(value); + } + } + sourceCase_ = 2; + return this; + } + + /** + * + * + *
            +     * The inline source to import identity mapping entries from.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.ImportIdentityMappingsRequest.InlineSource inline_source = 2; + * + */ + public Builder clearInlineSource() { + if (inlineSourceBuilder_ == null) { + if (sourceCase_ == 2) { + sourceCase_ = 0; + source_ = null; + onChanged(); + } + } else { + if (sourceCase_ == 2) { + sourceCase_ = 0; + source_ = null; + } + inlineSourceBuilder_.clear(); + } + return this; + } + + /** + * + * + *
            +     * The inline source to import identity mapping entries from.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.ImportIdentityMappingsRequest.InlineSource inline_source = 2; + * + */ + public com.google.cloud.discoveryengine.v1beta.ImportIdentityMappingsRequest.InlineSource + .Builder + getInlineSourceBuilder() { + return internalGetInlineSourceFieldBuilder().getBuilder(); + } + + /** + * + * + *
            +     * The inline source to import identity mapping entries from.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.ImportIdentityMappingsRequest.InlineSource inline_source = 2; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.ImportIdentityMappingsRequest + .InlineSourceOrBuilder + getInlineSourceOrBuilder() { + if ((sourceCase_ == 2) && (inlineSourceBuilder_ != null)) { + return inlineSourceBuilder_.getMessageOrBuilder(); + } else { + if (sourceCase_ == 2) { + return (com.google.cloud.discoveryengine.v1beta.ImportIdentityMappingsRequest + .InlineSource) + source_; + } + return com.google.cloud.discoveryengine.v1beta.ImportIdentityMappingsRequest.InlineSource + .getDefaultInstance(); + } + } + + /** + * + * + *
            +     * The inline source to import identity mapping entries from.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.ImportIdentityMappingsRequest.InlineSource inline_source = 2; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.ImportIdentityMappingsRequest.InlineSource, + com.google.cloud.discoveryengine.v1beta.ImportIdentityMappingsRequest.InlineSource + .Builder, + com.google.cloud.discoveryengine.v1beta.ImportIdentityMappingsRequest + .InlineSourceOrBuilder> + internalGetInlineSourceFieldBuilder() { + if (inlineSourceBuilder_ == null) { + if (!(sourceCase_ == 2)) { + source_ = + com.google.cloud.discoveryengine.v1beta.ImportIdentityMappingsRequest.InlineSource + .getDefaultInstance(); + } + inlineSourceBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.ImportIdentityMappingsRequest.InlineSource, + com.google.cloud.discoveryengine.v1beta.ImportIdentityMappingsRequest.InlineSource + .Builder, + com.google.cloud.discoveryengine.v1beta.ImportIdentityMappingsRequest + .InlineSourceOrBuilder>( + (com.google.cloud.discoveryengine.v1beta.ImportIdentityMappingsRequest.InlineSource) + source_, + getParentForChildren(), + isClean()); + source_ = null; + } + sourceCase_ = 2; + onChanged(); + return inlineSourceBuilder_; + } + + private java.lang.Object identityMappingStore_ = ""; + + /** + * + * + *
            +     * Required. The name of the Identity Mapping Store to import Identity Mapping
            +     * Entries to. Format:
            +     * `projects/{project}/locations/{location}/identityMappingStores/{identityMappingStore}`
            +     * 
            + * + * + * string identity_mapping_store = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The identityMappingStore. + */ + public java.lang.String getIdentityMappingStore() { + java.lang.Object ref = identityMappingStore_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + identityMappingStore_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
            +     * Required. The name of the Identity Mapping Store to import Identity Mapping
            +     * Entries to. Format:
            +     * `projects/{project}/locations/{location}/identityMappingStores/{identityMappingStore}`
            +     * 
            + * + * + * string identity_mapping_store = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for identityMappingStore. + */ + public com.google.protobuf.ByteString getIdentityMappingStoreBytes() { + java.lang.Object ref = identityMappingStore_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + identityMappingStore_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
            +     * Required. The name of the Identity Mapping Store to import Identity Mapping
            +     * Entries to. Format:
            +     * `projects/{project}/locations/{location}/identityMappingStores/{identityMappingStore}`
            +     * 
            + * + * + * string identity_mapping_store = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The identityMappingStore to set. + * @return This builder for chaining. + */ + public Builder setIdentityMappingStore(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + identityMappingStore_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Required. The name of the Identity Mapping Store to import Identity Mapping
            +     * Entries to. Format:
            +     * `projects/{project}/locations/{location}/identityMappingStores/{identityMappingStore}`
            +     * 
            + * + * + * string identity_mapping_store = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearIdentityMappingStore() { + identityMappingStore_ = getDefaultInstance().getIdentityMappingStore(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
            +     * Required. The name of the Identity Mapping Store to import Identity Mapping
            +     * Entries to. Format:
            +     * `projects/{project}/locations/{location}/identityMappingStores/{identityMappingStore}`
            +     * 
            + * + * + * string identity_mapping_store = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for identityMappingStore to set. + * @return This builder for chaining. + */ + public Builder setIdentityMappingStoreBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + identityMappingStore_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.ImportIdentityMappingsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.ImportIdentityMappingsRequest) + private static final com.google.cloud.discoveryengine.v1beta.ImportIdentityMappingsRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.discoveryengine.v1beta.ImportIdentityMappingsRequest(); + } + + public static com.google.cloud.discoveryengine.v1beta.ImportIdentityMappingsRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ImportIdentityMappingsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.ImportIdentityMappingsRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ImportIdentityMappingsRequestOrBuilder.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ImportIdentityMappingsRequestOrBuilder.java new file mode 100644 index 000000000000..b079e652e210 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ImportIdentityMappingsRequestOrBuilder.java @@ -0,0 +1,109 @@ +/* + * 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/cloud/discoveryengine/v1beta/identity_mapping_store_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.discoveryengine.v1beta; + +@com.google.protobuf.Generated +public interface ImportIdentityMappingsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.ImportIdentityMappingsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
            +   * The inline source to import identity mapping entries from.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.ImportIdentityMappingsRequest.InlineSource inline_source = 2; + * + * + * @return Whether the inlineSource field is set. + */ + boolean hasInlineSource(); + + /** + * + * + *
            +   * The inline source to import identity mapping entries from.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.ImportIdentityMappingsRequest.InlineSource inline_source = 2; + * + * + * @return The inlineSource. + */ + com.google.cloud.discoveryengine.v1beta.ImportIdentityMappingsRequest.InlineSource + getInlineSource(); + + /** + * + * + *
            +   * The inline source to import identity mapping entries from.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.ImportIdentityMappingsRequest.InlineSource inline_source = 2; + * + */ + com.google.cloud.discoveryengine.v1beta.ImportIdentityMappingsRequest.InlineSourceOrBuilder + getInlineSourceOrBuilder(); + + /** + * + * + *
            +   * Required. The name of the Identity Mapping Store to import Identity Mapping
            +   * Entries to. Format:
            +   * `projects/{project}/locations/{location}/identityMappingStores/{identityMappingStore}`
            +   * 
            + * + * + * string identity_mapping_store = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The identityMappingStore. + */ + java.lang.String getIdentityMappingStore(); + + /** + * + * + *
            +   * Required. The name of the Identity Mapping Store to import Identity Mapping
            +   * Entries to. Format:
            +   * `projects/{project}/locations/{location}/identityMappingStores/{identityMappingStore}`
            +   * 
            + * + * + * string identity_mapping_store = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for identityMappingStore. + */ + com.google.protobuf.ByteString getIdentityMappingStoreBytes(); + + com.google.cloud.discoveryengine.v1beta.ImportIdentityMappingsRequest.SourceCase getSourceCase(); +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ImportIdentityMappingsResponse.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ImportIdentityMappingsResponse.java new file mode 100644 index 000000000000..527c9276fd89 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ImportIdentityMappingsResponse.java @@ -0,0 +1,925 @@ +/* + * 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/cloud/discoveryengine/v1beta/identity_mapping_store_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.discoveryengine.v1beta; + +/** + * + * + *
            + * Response message for
            + * [IdentityMappingStoreService.ImportIdentityMappings][google.cloud.discoveryengine.v1beta.IdentityMappingStoreService.ImportIdentityMappings]
            + * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.ImportIdentityMappingsResponse} + */ +@com.google.protobuf.Generated +public final class ImportIdentityMappingsResponse extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.ImportIdentityMappingsResponse) + ImportIdentityMappingsResponseOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ImportIdentityMappingsResponse"); + } + + // Use ImportIdentityMappingsResponse.newBuilder() to construct. + private ImportIdentityMappingsResponse(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ImportIdentityMappingsResponse() { + errorSamples_ = java.util.Collections.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.IdentityMappingStoreServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_ImportIdentityMappingsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.IdentityMappingStoreServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_ImportIdentityMappingsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.ImportIdentityMappingsResponse.class, + com.google.cloud.discoveryengine.v1beta.ImportIdentityMappingsResponse.Builder.class); + } + + public static final int ERROR_SAMPLES_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List errorSamples_; + + /** + * + * + *
            +   * A sample of errors encountered while processing the request.
            +   * 
            + * + * repeated .google.rpc.Status error_samples = 1; + */ + @java.lang.Override + public java.util.List getErrorSamplesList() { + return errorSamples_; + } + + /** + * + * + *
            +   * A sample of errors encountered while processing the request.
            +   * 
            + * + * repeated .google.rpc.Status error_samples = 1; + */ + @java.lang.Override + public java.util.List getErrorSamplesOrBuilderList() { + return errorSamples_; + } + + /** + * + * + *
            +   * A sample of errors encountered while processing the request.
            +   * 
            + * + * repeated .google.rpc.Status error_samples = 1; + */ + @java.lang.Override + public int getErrorSamplesCount() { + return errorSamples_.size(); + } + + /** + * + * + *
            +   * A sample of errors encountered while processing the request.
            +   * 
            + * + * repeated .google.rpc.Status error_samples = 1; + */ + @java.lang.Override + public com.google.rpc.Status getErrorSamples(int index) { + return errorSamples_.get(index); + } + + /** + * + * + *
            +   * A sample of errors encountered while processing the request.
            +   * 
            + * + * repeated .google.rpc.Status error_samples = 1; + */ + @java.lang.Override + public com.google.rpc.StatusOrBuilder getErrorSamplesOrBuilder(int index) { + return errorSamples_.get(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 { + for (int i = 0; i < errorSamples_.size(); i++) { + output.writeMessage(1, errorSamples_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < errorSamples_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, errorSamples_.get(i)); + } + 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.discoveryengine.v1beta.ImportIdentityMappingsResponse)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1beta.ImportIdentityMappingsResponse other = + (com.google.cloud.discoveryengine.v1beta.ImportIdentityMappingsResponse) obj; + + if (!getErrorSamplesList().equals(other.getErrorSamplesList())) 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 (getErrorSamplesCount() > 0) { + hash = (37 * hash) + ERROR_SAMPLES_FIELD_NUMBER; + hash = (53 * hash) + getErrorSamplesList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1beta.ImportIdentityMappingsResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.ImportIdentityMappingsResponse 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.discoveryengine.v1beta.ImportIdentityMappingsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.ImportIdentityMappingsResponse 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.discoveryengine.v1beta.ImportIdentityMappingsResponse parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.ImportIdentityMappingsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1beta.ImportIdentityMappingsResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.ImportIdentityMappingsResponse 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.discoveryengine.v1beta.ImportIdentityMappingsResponse + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.ImportIdentityMappingsResponse + 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.discoveryengine.v1beta.ImportIdentityMappingsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.ImportIdentityMappingsResponse 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.discoveryengine.v1beta.ImportIdentityMappingsResponse 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
            +   * [IdentityMappingStoreService.ImportIdentityMappings][google.cloud.discoveryengine.v1beta.IdentityMappingStoreService.ImportIdentityMappings]
            +   * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.ImportIdentityMappingsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.ImportIdentityMappingsResponse) + com.google.cloud.discoveryengine.v1beta.ImportIdentityMappingsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.IdentityMappingStoreServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_ImportIdentityMappingsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.IdentityMappingStoreServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_ImportIdentityMappingsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.ImportIdentityMappingsResponse.class, + com.google.cloud.discoveryengine.v1beta.ImportIdentityMappingsResponse.Builder.class); + } + + // Construct using + // com.google.cloud.discoveryengine.v1beta.ImportIdentityMappingsResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (errorSamplesBuilder_ == null) { + errorSamples_ = java.util.Collections.emptyList(); + } else { + errorSamples_ = null; + errorSamplesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1beta.IdentityMappingStoreServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_ImportIdentityMappingsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.ImportIdentityMappingsResponse + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1beta.ImportIdentityMappingsResponse + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.ImportIdentityMappingsResponse build() { + com.google.cloud.discoveryengine.v1beta.ImportIdentityMappingsResponse result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.ImportIdentityMappingsResponse buildPartial() { + com.google.cloud.discoveryengine.v1beta.ImportIdentityMappingsResponse result = + new com.google.cloud.discoveryengine.v1beta.ImportIdentityMappingsResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.discoveryengine.v1beta.ImportIdentityMappingsResponse result) { + if (errorSamplesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + errorSamples_ = java.util.Collections.unmodifiableList(errorSamples_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.errorSamples_ = errorSamples_; + } else { + result.errorSamples_ = errorSamplesBuilder_.build(); + } + } + + private void buildPartial0( + com.google.cloud.discoveryengine.v1beta.ImportIdentityMappingsResponse result) { + int from_bitField0_ = bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.discoveryengine.v1beta.ImportIdentityMappingsResponse) { + return mergeFrom( + (com.google.cloud.discoveryengine.v1beta.ImportIdentityMappingsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1beta.ImportIdentityMappingsResponse other) { + if (other + == com.google.cloud.discoveryengine.v1beta.ImportIdentityMappingsResponse + .getDefaultInstance()) return this; + if (errorSamplesBuilder_ == null) { + if (!other.errorSamples_.isEmpty()) { + if (errorSamples_.isEmpty()) { + errorSamples_ = other.errorSamples_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureErrorSamplesIsMutable(); + errorSamples_.addAll(other.errorSamples_); + } + onChanged(); + } + } else { + if (!other.errorSamples_.isEmpty()) { + if (errorSamplesBuilder_.isEmpty()) { + errorSamplesBuilder_.dispose(); + errorSamplesBuilder_ = null; + errorSamples_ = other.errorSamples_; + bitField0_ = (bitField0_ & ~0x00000001); + errorSamplesBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetErrorSamplesFieldBuilder() + : null; + } else { + errorSamplesBuilder_.addAllMessages(other.errorSamples_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.rpc.Status m = + input.readMessage(com.google.rpc.Status.parser(), extensionRegistry); + if (errorSamplesBuilder_ == null) { + ensureErrorSamplesIsMutable(); + errorSamples_.add(m); + } else { + errorSamplesBuilder_.addMessage(m); + } + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List errorSamples_ = java.util.Collections.emptyList(); + + private void ensureErrorSamplesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + errorSamples_ = new java.util.ArrayList(errorSamples_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> + errorSamplesBuilder_; + + /** + * + * + *
            +     * A sample of errors encountered while processing the request.
            +     * 
            + * + * repeated .google.rpc.Status error_samples = 1; + */ + public java.util.List getErrorSamplesList() { + if (errorSamplesBuilder_ == null) { + return java.util.Collections.unmodifiableList(errorSamples_); + } else { + return errorSamplesBuilder_.getMessageList(); + } + } + + /** + * + * + *
            +     * A sample of errors encountered while processing the request.
            +     * 
            + * + * repeated .google.rpc.Status error_samples = 1; + */ + public int getErrorSamplesCount() { + if (errorSamplesBuilder_ == null) { + return errorSamples_.size(); + } else { + return errorSamplesBuilder_.getCount(); + } + } + + /** + * + * + *
            +     * A sample of errors encountered while processing the request.
            +     * 
            + * + * repeated .google.rpc.Status error_samples = 1; + */ + public com.google.rpc.Status getErrorSamples(int index) { + if (errorSamplesBuilder_ == null) { + return errorSamples_.get(index); + } else { + return errorSamplesBuilder_.getMessage(index); + } + } + + /** + * + * + *
            +     * A sample of errors encountered while processing the request.
            +     * 
            + * + * repeated .google.rpc.Status error_samples = 1; + */ + public Builder setErrorSamples(int index, com.google.rpc.Status value) { + if (errorSamplesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureErrorSamplesIsMutable(); + errorSamples_.set(index, value); + onChanged(); + } else { + errorSamplesBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
            +     * A sample of errors encountered while processing the request.
            +     * 
            + * + * repeated .google.rpc.Status error_samples = 1; + */ + public Builder setErrorSamples(int index, com.google.rpc.Status.Builder builderForValue) { + if (errorSamplesBuilder_ == null) { + ensureErrorSamplesIsMutable(); + errorSamples_.set(index, builderForValue.build()); + onChanged(); + } else { + errorSamplesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
            +     * A sample of errors encountered while processing the request.
            +     * 
            + * + * repeated .google.rpc.Status error_samples = 1; + */ + public Builder addErrorSamples(com.google.rpc.Status value) { + if (errorSamplesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureErrorSamplesIsMutable(); + errorSamples_.add(value); + onChanged(); + } else { + errorSamplesBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
            +     * A sample of errors encountered while processing the request.
            +     * 
            + * + * repeated .google.rpc.Status error_samples = 1; + */ + public Builder addErrorSamples(int index, com.google.rpc.Status value) { + if (errorSamplesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureErrorSamplesIsMutable(); + errorSamples_.add(index, value); + onChanged(); + } else { + errorSamplesBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
            +     * A sample of errors encountered while processing the request.
            +     * 
            + * + * repeated .google.rpc.Status error_samples = 1; + */ + public Builder addErrorSamples(com.google.rpc.Status.Builder builderForValue) { + if (errorSamplesBuilder_ == null) { + ensureErrorSamplesIsMutable(); + errorSamples_.add(builderForValue.build()); + onChanged(); + } else { + errorSamplesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
            +     * A sample of errors encountered while processing the request.
            +     * 
            + * + * repeated .google.rpc.Status error_samples = 1; + */ + public Builder addErrorSamples(int index, com.google.rpc.Status.Builder builderForValue) { + if (errorSamplesBuilder_ == null) { + ensureErrorSamplesIsMutable(); + errorSamples_.add(index, builderForValue.build()); + onChanged(); + } else { + errorSamplesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
            +     * A sample of errors encountered while processing the request.
            +     * 
            + * + * repeated .google.rpc.Status error_samples = 1; + */ + public Builder addAllErrorSamples(java.lang.Iterable values) { + if (errorSamplesBuilder_ == null) { + ensureErrorSamplesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, errorSamples_); + onChanged(); + } else { + errorSamplesBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
            +     * A sample of errors encountered while processing the request.
            +     * 
            + * + * repeated .google.rpc.Status error_samples = 1; + */ + public Builder clearErrorSamples() { + if (errorSamplesBuilder_ == null) { + errorSamples_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + errorSamplesBuilder_.clear(); + } + return this; + } + + /** + * + * + *
            +     * A sample of errors encountered while processing the request.
            +     * 
            + * + * repeated .google.rpc.Status error_samples = 1; + */ + public Builder removeErrorSamples(int index) { + if (errorSamplesBuilder_ == null) { + ensureErrorSamplesIsMutable(); + errorSamples_.remove(index); + onChanged(); + } else { + errorSamplesBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
            +     * A sample of errors encountered while processing the request.
            +     * 
            + * + * repeated .google.rpc.Status error_samples = 1; + */ + public com.google.rpc.Status.Builder getErrorSamplesBuilder(int index) { + return internalGetErrorSamplesFieldBuilder().getBuilder(index); + } + + /** + * + * + *
            +     * A sample of errors encountered while processing the request.
            +     * 
            + * + * repeated .google.rpc.Status error_samples = 1; + */ + public com.google.rpc.StatusOrBuilder getErrorSamplesOrBuilder(int index) { + if (errorSamplesBuilder_ == null) { + return errorSamples_.get(index); + } else { + return errorSamplesBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
            +     * A sample of errors encountered while processing the request.
            +     * 
            + * + * repeated .google.rpc.Status error_samples = 1; + */ + public java.util.List getErrorSamplesOrBuilderList() { + if (errorSamplesBuilder_ != null) { + return errorSamplesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(errorSamples_); + } + } + + /** + * + * + *
            +     * A sample of errors encountered while processing the request.
            +     * 
            + * + * repeated .google.rpc.Status error_samples = 1; + */ + public com.google.rpc.Status.Builder addErrorSamplesBuilder() { + return internalGetErrorSamplesFieldBuilder() + .addBuilder(com.google.rpc.Status.getDefaultInstance()); + } + + /** + * + * + *
            +     * A sample of errors encountered while processing the request.
            +     * 
            + * + * repeated .google.rpc.Status error_samples = 1; + */ + public com.google.rpc.Status.Builder addErrorSamplesBuilder(int index) { + return internalGetErrorSamplesFieldBuilder() + .addBuilder(index, com.google.rpc.Status.getDefaultInstance()); + } + + /** + * + * + *
            +     * A sample of errors encountered while processing the request.
            +     * 
            + * + * repeated .google.rpc.Status error_samples = 1; + */ + public java.util.List getErrorSamplesBuilderList() { + return internalGetErrorSamplesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> + internalGetErrorSamplesFieldBuilder() { + if (errorSamplesBuilder_ == null) { + errorSamplesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.rpc.Status, + com.google.rpc.Status.Builder, + com.google.rpc.StatusOrBuilder>( + errorSamples_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + errorSamples_ = null; + } + return errorSamplesBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.ImportIdentityMappingsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.ImportIdentityMappingsResponse) + private static final com.google.cloud.discoveryengine.v1beta.ImportIdentityMappingsResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.discoveryengine.v1beta.ImportIdentityMappingsResponse(); + } + + public static com.google.cloud.discoveryengine.v1beta.ImportIdentityMappingsResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ImportIdentityMappingsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.ImportIdentityMappingsResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ImportIdentityMappingsResponseOrBuilder.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ImportIdentityMappingsResponseOrBuilder.java new file mode 100644 index 000000000000..9866f4f30985 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ImportIdentityMappingsResponseOrBuilder.java @@ -0,0 +1,83 @@ +/* + * 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/cloud/discoveryengine/v1beta/identity_mapping_store_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.discoveryengine.v1beta; + +@com.google.protobuf.Generated +public interface ImportIdentityMappingsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.ImportIdentityMappingsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
            +   * A sample of errors encountered while processing the request.
            +   * 
            + * + * repeated .google.rpc.Status error_samples = 1; + */ + java.util.List getErrorSamplesList(); + + /** + * + * + *
            +   * A sample of errors encountered while processing the request.
            +   * 
            + * + * repeated .google.rpc.Status error_samples = 1; + */ + com.google.rpc.Status getErrorSamples(int index); + + /** + * + * + *
            +   * A sample of errors encountered while processing the request.
            +   * 
            + * + * repeated .google.rpc.Status error_samples = 1; + */ + int getErrorSamplesCount(); + + /** + * + * + *
            +   * A sample of errors encountered while processing the request.
            +   * 
            + * + * repeated .google.rpc.Status error_samples = 1; + */ + java.util.List getErrorSamplesOrBuilderList(); + + /** + * + * + *
            +   * A sample of errors encountered while processing the request.
            +   * 
            + * + * repeated .google.rpc.Status error_samples = 1; + */ + com.google.rpc.StatusOrBuilder getErrorSamplesOrBuilder(int index); +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ImportUserEventsMetadata.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ImportUserEventsMetadata.java index a336fa6dc697..3e13cc90ec3a 100644 --- a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ImportUserEventsMetadata.java +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ImportUserEventsMetadata.java @@ -126,11 +126,12 @@ public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { * * *
            -   * Operation last update time. If the operation is done, this is also the
            -   * finish time.
            +   * Output only. Operation last update time. If the operation is done, this is
            +   * also the finish time.
                * 
            * - * .google.protobuf.Timestamp update_time = 2; + * .google.protobuf.Timestamp update_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * * * @return Whether the updateTime field is set. */ @@ -143,11 +144,12 @@ public boolean hasUpdateTime() { * * *
            -   * Operation last update time. If the operation is done, this is also the
            -   * finish time.
            +   * Output only. Operation last update time. If the operation is done, this is
            +   * also the finish time.
                * 
            * - * .google.protobuf.Timestamp update_time = 2; + * .google.protobuf.Timestamp update_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * * * @return The updateTime. */ @@ -160,11 +162,12 @@ public com.google.protobuf.Timestamp getUpdateTime() { * * *
            -   * Operation last update time. If the operation is done, this is also the
            -   * finish time.
            +   * Output only. Operation last update time. If the operation is done, this is
            +   * also the finish time.
                * 
            * - * .google.protobuf.Timestamp update_time = 2; + * .google.protobuf.Timestamp update_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ @java.lang.Override public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { @@ -828,11 +831,13 @@ public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { * * *
            -     * Operation last update time. If the operation is done, this is also the
            -     * finish time.
            +     * Output only. Operation last update time. If the operation is done, this is
            +     * also the finish time.
                  * 
            * - * .google.protobuf.Timestamp update_time = 2; + * + * .google.protobuf.Timestamp update_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * * * @return Whether the updateTime field is set. */ @@ -844,11 +849,13 @@ public boolean hasUpdateTime() { * * *
            -     * Operation last update time. If the operation is done, this is also the
            -     * finish time.
            +     * Output only. Operation last update time. If the operation is done, this is
            +     * also the finish time.
                  * 
            * - * .google.protobuf.Timestamp update_time = 2; + * + * .google.protobuf.Timestamp update_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * * * @return The updateTime. */ @@ -866,11 +873,13 @@ public com.google.protobuf.Timestamp getUpdateTime() { * * *
            -     * Operation last update time. If the operation is done, this is also the
            -     * finish time.
            +     * Output only. Operation last update time. If the operation is done, this is
            +     * also the finish time.
                  * 
            * - * .google.protobuf.Timestamp update_time = 2; + * + * .google.protobuf.Timestamp update_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ public Builder setUpdateTime(com.google.protobuf.Timestamp value) { if (updateTimeBuilder_ == null) { @@ -890,11 +899,13 @@ public Builder setUpdateTime(com.google.protobuf.Timestamp value) { * * *
            -     * Operation last update time. If the operation is done, this is also the
            -     * finish time.
            +     * Output only. Operation last update time. If the operation is done, this is
            +     * also the finish time.
                  * 
            * - * .google.protobuf.Timestamp update_time = 2; + * + * .google.protobuf.Timestamp update_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { if (updateTimeBuilder_ == null) { @@ -911,11 +922,13 @@ public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForVal * * *
            -     * Operation last update time. If the operation is done, this is also the
            -     * finish time.
            +     * Output only. Operation last update time. If the operation is done, this is
            +     * also the finish time.
                  * 
            * - * .google.protobuf.Timestamp update_time = 2; + * + * .google.protobuf.Timestamp update_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { if (updateTimeBuilder_ == null) { @@ -940,11 +953,13 @@ public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { * * *
            -     * Operation last update time. If the operation is done, this is also the
            -     * finish time.
            +     * Output only. Operation last update time. If the operation is done, this is
            +     * also the finish time.
                  * 
            * - * .google.protobuf.Timestamp update_time = 2; + * + * .google.protobuf.Timestamp update_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ public Builder clearUpdateTime() { bitField0_ = (bitField0_ & ~0x00000002); @@ -961,11 +976,13 @@ public Builder clearUpdateTime() { * * *
            -     * Operation last update time. If the operation is done, this is also the
            -     * finish time.
            +     * Output only. Operation last update time. If the operation is done, this is
            +     * also the finish time.
                  * 
            * - * .google.protobuf.Timestamp update_time = 2; + * + * .google.protobuf.Timestamp update_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { bitField0_ |= 0x00000002; @@ -977,11 +994,13 @@ public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { * * *
            -     * Operation last update time. If the operation is done, this is also the
            -     * finish time.
            +     * Output only. Operation last update time. If the operation is done, this is
            +     * also the finish time.
                  * 
            * - * .google.protobuf.Timestamp update_time = 2; + * + * .google.protobuf.Timestamp update_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { if (updateTimeBuilder_ != null) { @@ -997,11 +1016,13 @@ public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { * * *
            -     * Operation last update time. If the operation is done, this is also the
            -     * finish time.
            +     * Output only. Operation last update time. If the operation is done, this is
            +     * also the finish time.
                  * 
            * - * .google.protobuf.Timestamp update_time = 2; + * + * .google.protobuf.Timestamp update_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ImportUserEventsMetadataOrBuilder.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ImportUserEventsMetadataOrBuilder.java index dcd16524a817..d285e2ca3bc4 100644 --- a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ImportUserEventsMetadataOrBuilder.java +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ImportUserEventsMetadataOrBuilder.java @@ -67,11 +67,12 @@ public interface ImportUserEventsMetadataOrBuilder * * *
            -   * Operation last update time. If the operation is done, this is also the
            -   * finish time.
            +   * Output only. Operation last update time. If the operation is done, this is
            +   * also the finish time.
                * 
            * - * .google.protobuf.Timestamp update_time = 2; + * .google.protobuf.Timestamp update_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * * * @return Whether the updateTime field is set. */ @@ -81,11 +82,12 @@ public interface ImportUserEventsMetadataOrBuilder * * *
            -   * Operation last update time. If the operation is done, this is also the
            -   * finish time.
            +   * Output only. Operation last update time. If the operation is done, this is
            +   * also the finish time.
                * 
            * - * .google.protobuf.Timestamp update_time = 2; + * .google.protobuf.Timestamp update_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * * * @return The updateTime. */ @@ -95,11 +97,12 @@ public interface ImportUserEventsMetadataOrBuilder * * *
            -   * Operation last update time. If the operation is done, this is also the
            -   * finish time.
            +   * Output only. Operation last update time. If the operation is done, this is
            +   * also the finish time.
                * 
            * - * .google.protobuf.Timestamp update_time = 2; + * .google.protobuf.Timestamp update_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/LicenseConfig.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/LicenseConfig.java new file mode 100644 index 000000000000..e8f58e3f0219 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/LicenseConfig.java @@ -0,0 +1,2766 @@ +/* + * 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/cloud/discoveryengine/v1beta/license_config.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.discoveryengine.v1beta; + +/** + * + * + *
            + * Information about users' licenses.
            + * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.LicenseConfig} + */ +@com.google.protobuf.Generated +public final class LicenseConfig extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.LicenseConfig) + LicenseConfigOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "LicenseConfig"); + } + + // Use LicenseConfig.newBuilder() to construct. + private LicenseConfig(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private LicenseConfig() { + name_ = ""; + subscriptionTier_ = 0; + state_ = 0; + subscriptionTerm_ = 0; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.LicenseConfigProto + .internal_static_google_cloud_discoveryengine_v1beta_LicenseConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.LicenseConfigProto + .internal_static_google_cloud_discoveryengine_v1beta_LicenseConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.LicenseConfig.class, + com.google.cloud.discoveryengine.v1beta.LicenseConfig.Builder.class); + } + + /** + * + * + *
            +   * License config state enumeration.
            +   * 
            + * + * Protobuf enum {@code google.cloud.discoveryengine.v1beta.LicenseConfig.State} + */ + public enum State implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
            +     * Default value. The license config does not exist.
            +     * 
            + * + * STATE_UNSPECIFIED = 0; + */ + STATE_UNSPECIFIED(0), + /** + * + * + *
            +     * The license config is effective and being used.
            +     * 
            + * + * ACTIVE = 1; + */ + ACTIVE(1), + /** + * + * + *
            +     * The license config has expired.
            +     * 
            + * + * EXPIRED = 2; + */ + EXPIRED(2), + /** + * + * + *
            +     * The license config has not started yet, and its start date is in the
            +     * future.
            +     * 
            + * + * NOT_STARTED = 3; + */ + NOT_STARTED(3), + /** + * + * + *
            +     * This is when a sub license config has returned all its seats back to
            +     * BillingAccountLicenseConfig that it belongs to.
            +     * Similar to EXPIRED.
            +     * 
            + * + * WITHDRAWN = 4; + */ + WITHDRAWN(4), + /** + * + * + *
            +     * The license config is terminated earlier than the expiration date and it
            +     * is deactivating. The customer will still have access in this state. It
            +     * will be converted to EXPIRED after the deactivating period ends (14 days)
            +     * or when the end date is reached, whichever comes first.
            +     * 
            + * + * DEACTIVATING = 5; + */ + DEACTIVATING(5), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "State"); + } + + /** + * + * + *
            +     * Default value. The license config does not exist.
            +     * 
            + * + * STATE_UNSPECIFIED = 0; + */ + public static final int STATE_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
            +     * The license config is effective and being used.
            +     * 
            + * + * ACTIVE = 1; + */ + public static final int ACTIVE_VALUE = 1; + + /** + * + * + *
            +     * The license config has expired.
            +     * 
            + * + * EXPIRED = 2; + */ + public static final int EXPIRED_VALUE = 2; + + /** + * + * + *
            +     * The license config has not started yet, and its start date is in the
            +     * future.
            +     * 
            + * + * NOT_STARTED = 3; + */ + public static final int NOT_STARTED_VALUE = 3; + + /** + * + * + *
            +     * This is when a sub license config has returned all its seats back to
            +     * BillingAccountLicenseConfig that it belongs to.
            +     * Similar to EXPIRED.
            +     * 
            + * + * WITHDRAWN = 4; + */ + public static final int WITHDRAWN_VALUE = 4; + + /** + * + * + *
            +     * The license config is terminated earlier than the expiration date and it
            +     * is deactivating. The customer will still have access in this state. It
            +     * will be converted to EXPIRED after the deactivating period ends (14 days)
            +     * or when the end date is reached, whichever comes first.
            +     * 
            + * + * DEACTIVATING = 5; + */ + public static final int DEACTIVATING_VALUE = 5; + + 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 State 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 State forNumber(int value) { + switch (value) { + case 0: + return STATE_UNSPECIFIED; + case 1: + return ACTIVE; + case 2: + return EXPIRED; + case 3: + return NOT_STARTED; + case 4: + return WITHDRAWN; + case 5: + return DEACTIVATING; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public State findValueByNumber(int number) { + return State.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.LicenseConfig.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final State[] VALUES = values(); + + public static State valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private State(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.discoveryengine.v1beta.LicenseConfig.State) + } + + private int bitField0_; + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
            +   * Immutable. Identifier. The fully qualified resource name of the license
            +   * config. Format:
            +   * `projects/{project}/locations/{location}/licenseConfigs/{license_config}`
            +   * 
            + * + * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = IDENTIFIER]; + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + 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(); + name_ = s; + return s; + } + } + + /** + * + * + *
            +   * Immutable. Identifier. The fully qualified resource name of the license
            +   * config. Format:
            +   * `projects/{project}/locations/{location}/licenseConfigs/{license_config}`
            +   * 
            + * + * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = IDENTIFIER]; + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LICENSE_COUNT_FIELD_NUMBER = 2; + private long licenseCount_ = 0L; + + /** + * + * + *
            +   * Required. Number of licenses purchased.
            +   * 
            + * + * int64 license_count = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The licenseCount. + */ + @java.lang.Override + public long getLicenseCount() { + return licenseCount_; + } + + public static final int SUBSCRIPTION_TIER_FIELD_NUMBER = 3; + private int subscriptionTier_ = 0; + + /** + * + * + *
            +   * Required. Subscription tier information for the license config.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SubscriptionTier subscription_tier = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for subscriptionTier. + */ + @java.lang.Override + public int getSubscriptionTierValue() { + return subscriptionTier_; + } + + /** + * + * + *
            +   * Required. Subscription tier information for the license config.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SubscriptionTier subscription_tier = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The subscriptionTier. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.SubscriptionTier getSubscriptionTier() { + com.google.cloud.discoveryengine.v1beta.SubscriptionTier result = + com.google.cloud.discoveryengine.v1beta.SubscriptionTier.forNumber(subscriptionTier_); + return result == null + ? com.google.cloud.discoveryengine.v1beta.SubscriptionTier.UNRECOGNIZED + : result; + } + + public static final int STATE_FIELD_NUMBER = 4; + private int state_ = 0; + + /** + * + * + *
            +   * Output only. The state of the license config.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.LicenseConfig.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + + /** + * + * + *
            +   * Output only. The state of the license config.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.LicenseConfig.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.LicenseConfig.State getState() { + com.google.cloud.discoveryengine.v1beta.LicenseConfig.State result = + com.google.cloud.discoveryengine.v1beta.LicenseConfig.State.forNumber(state_); + return result == null + ? com.google.cloud.discoveryengine.v1beta.LicenseConfig.State.UNRECOGNIZED + : result; + } + + public static final int AUTO_RENEW_FIELD_NUMBER = 5; + private boolean autoRenew_ = false; + + /** + * + * + *
            +   * Optional. Whether the license config should be auto renewed when it reaches
            +   * the end date.
            +   * 
            + * + * bool auto_renew = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The autoRenew. + */ + @java.lang.Override + public boolean getAutoRenew() { + return autoRenew_; + } + + public static final int START_DATE_FIELD_NUMBER = 6; + private com.google.type.Date startDate_; + + /** + * + * + *
            +   * Required. The start date.
            +   * 
            + * + * .google.type.Date start_date = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * @return Whether the startDate field is set. + */ + @java.lang.Override + public boolean hasStartDate() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
            +   * Required. The start date.
            +   * 
            + * + * .google.type.Date start_date = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The startDate. + */ + @java.lang.Override + public com.google.type.Date getStartDate() { + return startDate_ == null ? com.google.type.Date.getDefaultInstance() : startDate_; + } + + /** + * + * + *
            +   * Required. The start date.
            +   * 
            + * + * .google.type.Date start_date = 6 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public com.google.type.DateOrBuilder getStartDateOrBuilder() { + return startDate_ == null ? com.google.type.Date.getDefaultInstance() : startDate_; + } + + public static final int END_DATE_FIELD_NUMBER = 7; + private com.google.type.Date endDate_; + + /** + * + * + *
            +   * Optional. The planed end date.
            +   * 
            + * + * .google.type.Date end_date = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the endDate field is set. + */ + @java.lang.Override + public boolean hasEndDate() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
            +   * Optional. The planed end date.
            +   * 
            + * + * .google.type.Date end_date = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The endDate. + */ + @java.lang.Override + public com.google.type.Date getEndDate() { + return endDate_ == null ? com.google.type.Date.getDefaultInstance() : endDate_; + } + + /** + * + * + *
            +   * Optional. The planed end date.
            +   * 
            + * + * .google.type.Date end_date = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public com.google.type.DateOrBuilder getEndDateOrBuilder() { + return endDate_ == null ? com.google.type.Date.getDefaultInstance() : endDate_; + } + + public static final int SUBSCRIPTION_TERM_FIELD_NUMBER = 8; + private int subscriptionTerm_ = 0; + + /** + * + * + *
            +   * Required. Subscription term.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SubscriptionTerm subscription_term = 8 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for subscriptionTerm. + */ + @java.lang.Override + public int getSubscriptionTermValue() { + return subscriptionTerm_; + } + + /** + * + * + *
            +   * Required. Subscription term.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SubscriptionTerm subscription_term = 8 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The subscriptionTerm. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.SubscriptionTerm getSubscriptionTerm() { + com.google.cloud.discoveryengine.v1beta.SubscriptionTerm result = + com.google.cloud.discoveryengine.v1beta.SubscriptionTerm.forNumber(subscriptionTerm_); + return result == null + ? com.google.cloud.discoveryengine.v1beta.SubscriptionTerm.UNRECOGNIZED + : result; + } + + public static final int FREE_TRIAL_FIELD_NUMBER = 9; + private boolean freeTrial_ = false; + + /** + * + * + *
            +   * Optional. Whether the license config is for free trial.
            +   * 
            + * + * bool free_trial = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The freeTrial. + */ + @java.lang.Override + public boolean getFreeTrial() { + return freeTrial_; + } + + public static final int GEMINI_BUNDLE_FIELD_NUMBER = 11; + private boolean geminiBundle_ = false; + + /** + * + * + *
            +   * Output only. Whether the license config is for Gemini bundle.
            +   * 
            + * + * bool gemini_bundle = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The geminiBundle. + */ + @java.lang.Override + public boolean getGeminiBundle() { + return geminiBundle_; + } + + public static final int EARLY_TERMINATED_FIELD_NUMBER = 12; + private boolean earlyTerminated_ = false; + + /** + * + * + *
            +   * Output only. Indication of whether the subscription is terminated earlier
            +   * than the expiration date. This is usually terminated by pipeline once the
            +   * subscription gets terminated from subsv3.
            +   * 
            + * + * bool early_terminated = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The earlyTerminated. + */ + @java.lang.Override + public boolean getEarlyTerminated() { + return earlyTerminated_; + } + + public static final int EARLY_TERMINATION_DATE_FIELD_NUMBER = 13; + private com.google.type.Date earlyTerminationDate_; + + /** + * + * + *
            +   * Output only. The date when the subscription is terminated earlier than the
            +   * expiration date.
            +   * 
            + * + * + * .google.type.Date early_termination_date = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the earlyTerminationDate field is set. + */ + @java.lang.Override + public boolean hasEarlyTerminationDate() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
            +   * Output only. The date when the subscription is terminated earlier than the
            +   * expiration date.
            +   * 
            + * + * + * .google.type.Date early_termination_date = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The earlyTerminationDate. + */ + @java.lang.Override + public com.google.type.Date getEarlyTerminationDate() { + return earlyTerminationDate_ == null + ? com.google.type.Date.getDefaultInstance() + : earlyTerminationDate_; + } + + /** + * + * + *
            +   * Output only. The date when the subscription is terminated earlier than the
            +   * expiration date.
            +   * 
            + * + * + * .google.type.Date early_termination_date = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.type.DateOrBuilder getEarlyTerminationDateOrBuilder() { + return earlyTerminationDate_ == null + ? com.google.type.Date.getDefaultInstance() + : earlyTerminationDate_; + } + + 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(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + if (licenseCount_ != 0L) { + output.writeInt64(2, licenseCount_); + } + if (subscriptionTier_ + != com.google.cloud.discoveryengine.v1beta.SubscriptionTier.SUBSCRIPTION_TIER_UNSPECIFIED + .getNumber()) { + output.writeEnum(3, subscriptionTier_); + } + if (state_ + != com.google.cloud.discoveryengine.v1beta.LicenseConfig.State.STATE_UNSPECIFIED + .getNumber()) { + output.writeEnum(4, state_); + } + if (autoRenew_ != false) { + output.writeBool(5, autoRenew_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(6, getStartDate()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(7, getEndDate()); + } + if (subscriptionTerm_ + != com.google.cloud.discoveryengine.v1beta.SubscriptionTerm.SUBSCRIPTION_TERM_UNSPECIFIED + .getNumber()) { + output.writeEnum(8, subscriptionTerm_); + } + if (freeTrial_ != false) { + output.writeBool(9, freeTrial_); + } + if (geminiBundle_ != false) { + output.writeBool(11, geminiBundle_); + } + if (earlyTerminated_ != false) { + output.writeBool(12, earlyTerminated_); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeMessage(13, getEarlyTerminationDate()); + } + 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(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + if (licenseCount_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(2, licenseCount_); + } + if (subscriptionTier_ + != com.google.cloud.discoveryengine.v1beta.SubscriptionTier.SUBSCRIPTION_TIER_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(3, subscriptionTier_); + } + if (state_ + != com.google.cloud.discoveryengine.v1beta.LicenseConfig.State.STATE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(4, state_); + } + if (autoRenew_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(5, autoRenew_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getStartDate()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getEndDate()); + } + if (subscriptionTerm_ + != com.google.cloud.discoveryengine.v1beta.SubscriptionTerm.SUBSCRIPTION_TERM_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(8, subscriptionTerm_); + } + if (freeTrial_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(9, freeTrial_); + } + if (geminiBundle_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(11, geminiBundle_); + } + if (earlyTerminated_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(12, earlyTerminated_); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(13, getEarlyTerminationDate()); + } + 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.discoveryengine.v1beta.LicenseConfig)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1beta.LicenseConfig other = + (com.google.cloud.discoveryengine.v1beta.LicenseConfig) obj; + + if (!getName().equals(other.getName())) return false; + if (getLicenseCount() != other.getLicenseCount()) return false; + if (subscriptionTier_ != other.subscriptionTier_) return false; + if (state_ != other.state_) return false; + if (getAutoRenew() != other.getAutoRenew()) return false; + if (hasStartDate() != other.hasStartDate()) return false; + if (hasStartDate()) { + if (!getStartDate().equals(other.getStartDate())) return false; + } + if (hasEndDate() != other.hasEndDate()) return false; + if (hasEndDate()) { + if (!getEndDate().equals(other.getEndDate())) return false; + } + if (subscriptionTerm_ != other.subscriptionTerm_) return false; + if (getFreeTrial() != other.getFreeTrial()) return false; + if (getGeminiBundle() != other.getGeminiBundle()) return false; + if (getEarlyTerminated() != other.getEarlyTerminated()) return false; + if (hasEarlyTerminationDate() != other.hasEarlyTerminationDate()) return false; + if (hasEarlyTerminationDate()) { + if (!getEarlyTerminationDate().equals(other.getEarlyTerminationDate())) 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) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + LICENSE_COUNT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getLicenseCount()); + hash = (37 * hash) + SUBSCRIPTION_TIER_FIELD_NUMBER; + hash = (53 * hash) + subscriptionTier_; + hash = (37 * hash) + STATE_FIELD_NUMBER; + hash = (53 * hash) + state_; + hash = (37 * hash) + AUTO_RENEW_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getAutoRenew()); + if (hasStartDate()) { + hash = (37 * hash) + START_DATE_FIELD_NUMBER; + hash = (53 * hash) + getStartDate().hashCode(); + } + if (hasEndDate()) { + hash = (37 * hash) + END_DATE_FIELD_NUMBER; + hash = (53 * hash) + getEndDate().hashCode(); + } + hash = (37 * hash) + SUBSCRIPTION_TERM_FIELD_NUMBER; + hash = (53 * hash) + subscriptionTerm_; + hash = (37 * hash) + FREE_TRIAL_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getFreeTrial()); + hash = (37 * hash) + GEMINI_BUNDLE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getGeminiBundle()); + hash = (37 * hash) + EARLY_TERMINATED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getEarlyTerminated()); + if (hasEarlyTerminationDate()) { + hash = (37 * hash) + EARLY_TERMINATION_DATE_FIELD_NUMBER; + hash = (53 * hash) + getEarlyTerminationDate().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1beta.LicenseConfig parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.LicenseConfig 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.discoveryengine.v1beta.LicenseConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.LicenseConfig 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.discoveryengine.v1beta.LicenseConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.LicenseConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1beta.LicenseConfig parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.LicenseConfig 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.discoveryengine.v1beta.LicenseConfig parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.LicenseConfig 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.discoveryengine.v1beta.LicenseConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.LicenseConfig 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.discoveryengine.v1beta.LicenseConfig 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; + } + + /** + * + * + *
            +   * Information about users' licenses.
            +   * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.LicenseConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.LicenseConfig) + com.google.cloud.discoveryengine.v1beta.LicenseConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.LicenseConfigProto + .internal_static_google_cloud_discoveryengine_v1beta_LicenseConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.LicenseConfigProto + .internal_static_google_cloud_discoveryengine_v1beta_LicenseConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.LicenseConfig.class, + com.google.cloud.discoveryengine.v1beta.LicenseConfig.Builder.class); + } + + // Construct using com.google.cloud.discoveryengine.v1beta.LicenseConfig.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetStartDateFieldBuilder(); + internalGetEndDateFieldBuilder(); + internalGetEarlyTerminationDateFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + licenseCount_ = 0L; + subscriptionTier_ = 0; + state_ = 0; + autoRenew_ = false; + startDate_ = null; + if (startDateBuilder_ != null) { + startDateBuilder_.dispose(); + startDateBuilder_ = null; + } + endDate_ = null; + if (endDateBuilder_ != null) { + endDateBuilder_.dispose(); + endDateBuilder_ = null; + } + subscriptionTerm_ = 0; + freeTrial_ = false; + geminiBundle_ = false; + earlyTerminated_ = false; + earlyTerminationDate_ = null; + if (earlyTerminationDateBuilder_ != null) { + earlyTerminationDateBuilder_.dispose(); + earlyTerminationDateBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1beta.LicenseConfigProto + .internal_static_google_cloud_discoveryengine_v1beta_LicenseConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.LicenseConfig getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1beta.LicenseConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.LicenseConfig build() { + com.google.cloud.discoveryengine.v1beta.LicenseConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.LicenseConfig buildPartial() { + com.google.cloud.discoveryengine.v1beta.LicenseConfig result = + new com.google.cloud.discoveryengine.v1beta.LicenseConfig(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.discoveryengine.v1beta.LicenseConfig result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.licenseCount_ = licenseCount_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.subscriptionTier_ = subscriptionTier_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.state_ = state_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.autoRenew_ = autoRenew_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000020) != 0)) { + result.startDate_ = startDateBuilder_ == null ? startDate_ : startDateBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.endDate_ = endDateBuilder_ == null ? endDate_ : endDateBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.subscriptionTerm_ = subscriptionTerm_; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.freeTrial_ = freeTrial_; + } + if (((from_bitField0_ & 0x00000200) != 0)) { + result.geminiBundle_ = geminiBundle_; + } + if (((from_bitField0_ & 0x00000400) != 0)) { + result.earlyTerminated_ = earlyTerminated_; + } + if (((from_bitField0_ & 0x00000800) != 0)) { + result.earlyTerminationDate_ = + earlyTerminationDateBuilder_ == null + ? earlyTerminationDate_ + : earlyTerminationDateBuilder_.build(); + to_bitField0_ |= 0x00000004; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.discoveryengine.v1beta.LicenseConfig) { + return mergeFrom((com.google.cloud.discoveryengine.v1beta.LicenseConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.discoveryengine.v1beta.LicenseConfig other) { + if (other == com.google.cloud.discoveryengine.v1beta.LicenseConfig.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getLicenseCount() != 0L) { + setLicenseCount(other.getLicenseCount()); + } + if (other.subscriptionTier_ != 0) { + setSubscriptionTierValue(other.getSubscriptionTierValue()); + } + if (other.state_ != 0) { + setStateValue(other.getStateValue()); + } + if (other.getAutoRenew() != false) { + setAutoRenew(other.getAutoRenew()); + } + if (other.hasStartDate()) { + mergeStartDate(other.getStartDate()); + } + if (other.hasEndDate()) { + mergeEndDate(other.getEndDate()); + } + if (other.subscriptionTerm_ != 0) { + setSubscriptionTermValue(other.getSubscriptionTermValue()); + } + if (other.getFreeTrial() != false) { + setFreeTrial(other.getFreeTrial()); + } + if (other.getGeminiBundle() != false) { + setGeminiBundle(other.getGeminiBundle()); + } + if (other.getEarlyTerminated() != false) { + setEarlyTerminated(other.getEarlyTerminated()); + } + if (other.hasEarlyTerminationDate()) { + mergeEarlyTerminationDate(other.getEarlyTerminationDate()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + licenseCount_ = input.readInt64(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 24: + { + subscriptionTier_ = input.readEnum(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 32: + { + state_ = input.readEnum(); + bitField0_ |= 0x00000008; + break; + } // case 32 + case 40: + { + autoRenew_ = input.readBool(); + bitField0_ |= 0x00000010; + break; + } // case 40 + case 50: + { + input.readMessage( + internalGetStartDateFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 50 + case 58: + { + input.readMessage(internalGetEndDateFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000040; + break; + } // case 58 + case 64: + { + subscriptionTerm_ = input.readEnum(); + bitField0_ |= 0x00000080; + break; + } // case 64 + case 72: + { + freeTrial_ = input.readBool(); + bitField0_ |= 0x00000100; + break; + } // case 72 + case 88: + { + geminiBundle_ = input.readBool(); + bitField0_ |= 0x00000200; + break; + } // case 88 + case 96: + { + earlyTerminated_ = input.readBool(); + bitField0_ |= 0x00000400; + break; + } // case 96 + case 106: + { + input.readMessage( + internalGetEarlyTerminationDateFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000800; + break; + } // case 106 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + + /** + * + * + *
            +     * Immutable. Identifier. The fully qualified resource name of the license
            +     * config. Format:
            +     * `projects/{project}/locations/{location}/licenseConfigs/{license_config}`
            +     * 
            + * + * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = IDENTIFIER]; + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
            +     * Immutable. Identifier. The fully qualified resource name of the license
            +     * config. Format:
            +     * `projects/{project}/locations/{location}/licenseConfigs/{license_config}`
            +     * 
            + * + * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = IDENTIFIER]; + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
            +     * Immutable. Identifier. The fully qualified resource name of the license
            +     * config. Format:
            +     * `projects/{project}/locations/{location}/licenseConfigs/{license_config}`
            +     * 
            + * + * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = IDENTIFIER]; + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Immutable. Identifier. The fully qualified resource name of the license
            +     * config. Format:
            +     * `projects/{project}/locations/{location}/licenseConfigs/{license_config}`
            +     * 
            + * + * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = IDENTIFIER]; + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
            +     * Immutable. Identifier. The fully qualified resource name of the license
            +     * config. Format:
            +     * `projects/{project}/locations/{location}/licenseConfigs/{license_config}`
            +     * 
            + * + * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = IDENTIFIER]; + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private long licenseCount_; + + /** + * + * + *
            +     * Required. Number of licenses purchased.
            +     * 
            + * + * int64 license_count = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The licenseCount. + */ + @java.lang.Override + public long getLicenseCount() { + return licenseCount_; + } + + /** + * + * + *
            +     * Required. Number of licenses purchased.
            +     * 
            + * + * int64 license_count = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The licenseCount to set. + * @return This builder for chaining. + */ + public Builder setLicenseCount(long value) { + + licenseCount_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Required. Number of licenses purchased.
            +     * 
            + * + * int64 license_count = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearLicenseCount() { + bitField0_ = (bitField0_ & ~0x00000002); + licenseCount_ = 0L; + onChanged(); + return this; + } + + private int subscriptionTier_ = 0; + + /** + * + * + *
            +     * Required. Subscription tier information for the license config.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SubscriptionTier subscription_tier = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for subscriptionTier. + */ + @java.lang.Override + public int getSubscriptionTierValue() { + return subscriptionTier_; + } + + /** + * + * + *
            +     * Required. Subscription tier information for the license config.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SubscriptionTier subscription_tier = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The enum numeric value on the wire for subscriptionTier to set. + * @return This builder for chaining. + */ + public Builder setSubscriptionTierValue(int value) { + subscriptionTier_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Required. Subscription tier information for the license config.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SubscriptionTier subscription_tier = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The subscriptionTier. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.SubscriptionTier getSubscriptionTier() { + com.google.cloud.discoveryengine.v1beta.SubscriptionTier result = + com.google.cloud.discoveryengine.v1beta.SubscriptionTier.forNumber(subscriptionTier_); + return result == null + ? com.google.cloud.discoveryengine.v1beta.SubscriptionTier.UNRECOGNIZED + : result; + } + + /** + * + * + *
            +     * Required. Subscription tier information for the license config.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SubscriptionTier subscription_tier = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The subscriptionTier to set. + * @return This builder for chaining. + */ + public Builder setSubscriptionTier( + com.google.cloud.discoveryengine.v1beta.SubscriptionTier value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000004; + subscriptionTier_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
            +     * Required. Subscription tier information for the license config.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SubscriptionTier subscription_tier = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return This builder for chaining. + */ + public Builder clearSubscriptionTier() { + bitField0_ = (bitField0_ & ~0x00000004); + subscriptionTier_ = 0; + onChanged(); + return this; + } + + private int state_ = 0; + + /** + * + * + *
            +     * Output only. The state of the license config.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.LicenseConfig.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + + /** + * + * + *
            +     * Output only. The state of the license config.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.LicenseConfig.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The enum numeric value on the wire for state to set. + * @return This builder for chaining. + */ + public Builder setStateValue(int value) { + state_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Output only. The state of the license config.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.LicenseConfig.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.LicenseConfig.State getState() { + com.google.cloud.discoveryengine.v1beta.LicenseConfig.State result = + com.google.cloud.discoveryengine.v1beta.LicenseConfig.State.forNumber(state_); + return result == null + ? com.google.cloud.discoveryengine.v1beta.LicenseConfig.State.UNRECOGNIZED + : result; + } + + /** + * + * + *
            +     * Output only. The state of the license config.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.LicenseConfig.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The state to set. + * @return This builder for chaining. + */ + public Builder setState(com.google.cloud.discoveryengine.v1beta.LicenseConfig.State value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000008; + state_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
            +     * Output only. The state of the license config.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.LicenseConfig.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearState() { + bitField0_ = (bitField0_ & ~0x00000008); + state_ = 0; + onChanged(); + return this; + } + + private boolean autoRenew_; + + /** + * + * + *
            +     * Optional. Whether the license config should be auto renewed when it reaches
            +     * the end date.
            +     * 
            + * + * bool auto_renew = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The autoRenew. + */ + @java.lang.Override + public boolean getAutoRenew() { + return autoRenew_; + } + + /** + * + * + *
            +     * Optional. Whether the license config should be auto renewed when it reaches
            +     * the end date.
            +     * 
            + * + * bool auto_renew = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The autoRenew to set. + * @return This builder for chaining. + */ + public Builder setAutoRenew(boolean value) { + + autoRenew_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Optional. Whether the license config should be auto renewed when it reaches
            +     * the end date.
            +     * 
            + * + * bool auto_renew = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearAutoRenew() { + bitField0_ = (bitField0_ & ~0x00000010); + autoRenew_ = false; + onChanged(); + return this; + } + + private com.google.type.Date startDate_; + private com.google.protobuf.SingleFieldBuilder< + com.google.type.Date, com.google.type.Date.Builder, com.google.type.DateOrBuilder> + startDateBuilder_; + + /** + * + * + *
            +     * Required. The start date.
            +     * 
            + * + * .google.type.Date start_date = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * @return Whether the startDate field is set. + */ + public boolean hasStartDate() { + return ((bitField0_ & 0x00000020) != 0); + } + + /** + * + * + *
            +     * Required. The start date.
            +     * 
            + * + * .google.type.Date start_date = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The startDate. + */ + public com.google.type.Date getStartDate() { + if (startDateBuilder_ == null) { + return startDate_ == null ? com.google.type.Date.getDefaultInstance() : startDate_; + } else { + return startDateBuilder_.getMessage(); + } + } + + /** + * + * + *
            +     * Required. The start date.
            +     * 
            + * + * .google.type.Date start_date = 6 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setStartDate(com.google.type.Date value) { + if (startDateBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + startDate_ = value; + } else { + startDateBuilder_.setMessage(value); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Required. The start date.
            +     * 
            + * + * .google.type.Date start_date = 6 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setStartDate(com.google.type.Date.Builder builderForValue) { + if (startDateBuilder_ == null) { + startDate_ = builderForValue.build(); + } else { + startDateBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Required. The start date.
            +     * 
            + * + * .google.type.Date start_date = 6 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder mergeStartDate(com.google.type.Date value) { + if (startDateBuilder_ == null) { + if (((bitField0_ & 0x00000020) != 0) + && startDate_ != null + && startDate_ != com.google.type.Date.getDefaultInstance()) { + getStartDateBuilder().mergeFrom(value); + } else { + startDate_ = value; + } + } else { + startDateBuilder_.mergeFrom(value); + } + if (startDate_ != null) { + bitField0_ |= 0x00000020; + onChanged(); + } + return this; + } + + /** + * + * + *
            +     * Required. The start date.
            +     * 
            + * + * .google.type.Date start_date = 6 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder clearStartDate() { + bitField0_ = (bitField0_ & ~0x00000020); + startDate_ = null; + if (startDateBuilder_ != null) { + startDateBuilder_.dispose(); + startDateBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
            +     * Required. The start date.
            +     * 
            + * + * .google.type.Date start_date = 6 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.type.Date.Builder getStartDateBuilder() { + bitField0_ |= 0x00000020; + onChanged(); + return internalGetStartDateFieldBuilder().getBuilder(); + } + + /** + * + * + *
            +     * Required. The start date.
            +     * 
            + * + * .google.type.Date start_date = 6 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.type.DateOrBuilder getStartDateOrBuilder() { + if (startDateBuilder_ != null) { + return startDateBuilder_.getMessageOrBuilder(); + } else { + return startDate_ == null ? com.google.type.Date.getDefaultInstance() : startDate_; + } + } + + /** + * + * + *
            +     * Required. The start date.
            +     * 
            + * + * .google.type.Date start_date = 6 [(.google.api.field_behavior) = REQUIRED]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.type.Date, com.google.type.Date.Builder, com.google.type.DateOrBuilder> + internalGetStartDateFieldBuilder() { + if (startDateBuilder_ == null) { + startDateBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.type.Date, com.google.type.Date.Builder, com.google.type.DateOrBuilder>( + getStartDate(), getParentForChildren(), isClean()); + startDate_ = null; + } + return startDateBuilder_; + } + + private com.google.type.Date endDate_; + private com.google.protobuf.SingleFieldBuilder< + com.google.type.Date, com.google.type.Date.Builder, com.google.type.DateOrBuilder> + endDateBuilder_; + + /** + * + * + *
            +     * Optional. The planed end date.
            +     * 
            + * + * .google.type.Date end_date = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the endDate field is set. + */ + public boolean hasEndDate() { + return ((bitField0_ & 0x00000040) != 0); + } + + /** + * + * + *
            +     * Optional. The planed end date.
            +     * 
            + * + * .google.type.Date end_date = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The endDate. + */ + public com.google.type.Date getEndDate() { + if (endDateBuilder_ == null) { + return endDate_ == null ? com.google.type.Date.getDefaultInstance() : endDate_; + } else { + return endDateBuilder_.getMessage(); + } + } + + /** + * + * + *
            +     * Optional. The planed end date.
            +     * 
            + * + * .google.type.Date end_date = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder setEndDate(com.google.type.Date value) { + if (endDateBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + endDate_ = value; + } else { + endDateBuilder_.setMessage(value); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Optional. The planed end date.
            +     * 
            + * + * .google.type.Date end_date = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder setEndDate(com.google.type.Date.Builder builderForValue) { + if (endDateBuilder_ == null) { + endDate_ = builderForValue.build(); + } else { + endDateBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Optional. The planed end date.
            +     * 
            + * + * .google.type.Date end_date = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder mergeEndDate(com.google.type.Date value) { + if (endDateBuilder_ == null) { + if (((bitField0_ & 0x00000040) != 0) + && endDate_ != null + && endDate_ != com.google.type.Date.getDefaultInstance()) { + getEndDateBuilder().mergeFrom(value); + } else { + endDate_ = value; + } + } else { + endDateBuilder_.mergeFrom(value); + } + if (endDate_ != null) { + bitField0_ |= 0x00000040; + onChanged(); + } + return this; + } + + /** + * + * + *
            +     * Optional. The planed end date.
            +     * 
            + * + * .google.type.Date end_date = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder clearEndDate() { + bitField0_ = (bitField0_ & ~0x00000040); + endDate_ = null; + if (endDateBuilder_ != null) { + endDateBuilder_.dispose(); + endDateBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
            +     * Optional. The planed end date.
            +     * 
            + * + * .google.type.Date end_date = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + public com.google.type.Date.Builder getEndDateBuilder() { + bitField0_ |= 0x00000040; + onChanged(); + return internalGetEndDateFieldBuilder().getBuilder(); + } + + /** + * + * + *
            +     * Optional. The planed end date.
            +     * 
            + * + * .google.type.Date end_date = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + public com.google.type.DateOrBuilder getEndDateOrBuilder() { + if (endDateBuilder_ != null) { + return endDateBuilder_.getMessageOrBuilder(); + } else { + return endDate_ == null ? com.google.type.Date.getDefaultInstance() : endDate_; + } + } + + /** + * + * + *
            +     * Optional. The planed end date.
            +     * 
            + * + * .google.type.Date end_date = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.type.Date, com.google.type.Date.Builder, com.google.type.DateOrBuilder> + internalGetEndDateFieldBuilder() { + if (endDateBuilder_ == null) { + endDateBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.type.Date, com.google.type.Date.Builder, com.google.type.DateOrBuilder>( + getEndDate(), getParentForChildren(), isClean()); + endDate_ = null; + } + return endDateBuilder_; + } + + private int subscriptionTerm_ = 0; + + /** + * + * + *
            +     * Required. Subscription term.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SubscriptionTerm subscription_term = 8 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for subscriptionTerm. + */ + @java.lang.Override + public int getSubscriptionTermValue() { + return subscriptionTerm_; + } + + /** + * + * + *
            +     * Required. Subscription term.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SubscriptionTerm subscription_term = 8 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The enum numeric value on the wire for subscriptionTerm to set. + * @return This builder for chaining. + */ + public Builder setSubscriptionTermValue(int value) { + subscriptionTerm_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Required. Subscription term.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SubscriptionTerm subscription_term = 8 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The subscriptionTerm. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.SubscriptionTerm getSubscriptionTerm() { + com.google.cloud.discoveryengine.v1beta.SubscriptionTerm result = + com.google.cloud.discoveryengine.v1beta.SubscriptionTerm.forNumber(subscriptionTerm_); + return result == null + ? com.google.cloud.discoveryengine.v1beta.SubscriptionTerm.UNRECOGNIZED + : result; + } + + /** + * + * + *
            +     * Required. Subscription term.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SubscriptionTerm subscription_term = 8 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The subscriptionTerm to set. + * @return This builder for chaining. + */ + public Builder setSubscriptionTerm( + com.google.cloud.discoveryengine.v1beta.SubscriptionTerm value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000080; + subscriptionTerm_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
            +     * Required. Subscription term.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SubscriptionTerm subscription_term = 8 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return This builder for chaining. + */ + public Builder clearSubscriptionTerm() { + bitField0_ = (bitField0_ & ~0x00000080); + subscriptionTerm_ = 0; + onChanged(); + return this; + } + + private boolean freeTrial_; + + /** + * + * + *
            +     * Optional. Whether the license config is for free trial.
            +     * 
            + * + * bool free_trial = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The freeTrial. + */ + @java.lang.Override + public boolean getFreeTrial() { + return freeTrial_; + } + + /** + * + * + *
            +     * Optional. Whether the license config is for free trial.
            +     * 
            + * + * bool free_trial = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The freeTrial to set. + * @return This builder for chaining. + */ + public Builder setFreeTrial(boolean value) { + + freeTrial_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Optional. Whether the license config is for free trial.
            +     * 
            + * + * bool free_trial = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearFreeTrial() { + bitField0_ = (bitField0_ & ~0x00000100); + freeTrial_ = false; + onChanged(); + return this; + } + + private boolean geminiBundle_; + + /** + * + * + *
            +     * Output only. Whether the license config is for Gemini bundle.
            +     * 
            + * + * bool gemini_bundle = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The geminiBundle. + */ + @java.lang.Override + public boolean getGeminiBundle() { + return geminiBundle_; + } + + /** + * + * + *
            +     * Output only. Whether the license config is for Gemini bundle.
            +     * 
            + * + * bool gemini_bundle = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The geminiBundle to set. + * @return This builder for chaining. + */ + public Builder setGeminiBundle(boolean value) { + + geminiBundle_ = value; + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Output only. Whether the license config is for Gemini bundle.
            +     * 
            + * + * bool gemini_bundle = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearGeminiBundle() { + bitField0_ = (bitField0_ & ~0x00000200); + geminiBundle_ = false; + onChanged(); + return this; + } + + private boolean earlyTerminated_; + + /** + * + * + *
            +     * Output only. Indication of whether the subscription is terminated earlier
            +     * than the expiration date. This is usually terminated by pipeline once the
            +     * subscription gets terminated from subsv3.
            +     * 
            + * + * bool early_terminated = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The earlyTerminated. + */ + @java.lang.Override + public boolean getEarlyTerminated() { + return earlyTerminated_; + } + + /** + * + * + *
            +     * Output only. Indication of whether the subscription is terminated earlier
            +     * than the expiration date. This is usually terminated by pipeline once the
            +     * subscription gets terminated from subsv3.
            +     * 
            + * + * bool early_terminated = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The earlyTerminated to set. + * @return This builder for chaining. + */ + public Builder setEarlyTerminated(boolean value) { + + earlyTerminated_ = value; + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Output only. Indication of whether the subscription is terminated earlier
            +     * than the expiration date. This is usually terminated by pipeline once the
            +     * subscription gets terminated from subsv3.
            +     * 
            + * + * bool early_terminated = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearEarlyTerminated() { + bitField0_ = (bitField0_ & ~0x00000400); + earlyTerminated_ = false; + onChanged(); + return this; + } + + private com.google.type.Date earlyTerminationDate_; + private com.google.protobuf.SingleFieldBuilder< + com.google.type.Date, com.google.type.Date.Builder, com.google.type.DateOrBuilder> + earlyTerminationDateBuilder_; + + /** + * + * + *
            +     * Output only. The date when the subscription is terminated earlier than the
            +     * expiration date.
            +     * 
            + * + * + * .google.type.Date early_termination_date = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the earlyTerminationDate field is set. + */ + public boolean hasEarlyTerminationDate() { + return ((bitField0_ & 0x00000800) != 0); + } + + /** + * + * + *
            +     * Output only. The date when the subscription is terminated earlier than the
            +     * expiration date.
            +     * 
            + * + * + * .google.type.Date early_termination_date = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The earlyTerminationDate. + */ + public com.google.type.Date getEarlyTerminationDate() { + if (earlyTerminationDateBuilder_ == null) { + return earlyTerminationDate_ == null + ? com.google.type.Date.getDefaultInstance() + : earlyTerminationDate_; + } else { + return earlyTerminationDateBuilder_.getMessage(); + } + } + + /** + * + * + *
            +     * Output only. The date when the subscription is terminated earlier than the
            +     * expiration date.
            +     * 
            + * + * + * .google.type.Date early_termination_date = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setEarlyTerminationDate(com.google.type.Date value) { + if (earlyTerminationDateBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + earlyTerminationDate_ = value; + } else { + earlyTerminationDateBuilder_.setMessage(value); + } + bitField0_ |= 0x00000800; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Output only. The date when the subscription is terminated earlier than the
            +     * expiration date.
            +     * 
            + * + * + * .google.type.Date early_termination_date = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setEarlyTerminationDate(com.google.type.Date.Builder builderForValue) { + if (earlyTerminationDateBuilder_ == null) { + earlyTerminationDate_ = builderForValue.build(); + } else { + earlyTerminationDateBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000800; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Output only. The date when the subscription is terminated earlier than the
            +     * expiration date.
            +     * 
            + * + * + * .google.type.Date early_termination_date = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeEarlyTerminationDate(com.google.type.Date value) { + if (earlyTerminationDateBuilder_ == null) { + if (((bitField0_ & 0x00000800) != 0) + && earlyTerminationDate_ != null + && earlyTerminationDate_ != com.google.type.Date.getDefaultInstance()) { + getEarlyTerminationDateBuilder().mergeFrom(value); + } else { + earlyTerminationDate_ = value; + } + } else { + earlyTerminationDateBuilder_.mergeFrom(value); + } + if (earlyTerminationDate_ != null) { + bitField0_ |= 0x00000800; + onChanged(); + } + return this; + } + + /** + * + * + *
            +     * Output only. The date when the subscription is terminated earlier than the
            +     * expiration date.
            +     * 
            + * + * + * .google.type.Date early_termination_date = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearEarlyTerminationDate() { + bitField0_ = (bitField0_ & ~0x00000800); + earlyTerminationDate_ = null; + if (earlyTerminationDateBuilder_ != null) { + earlyTerminationDateBuilder_.dispose(); + earlyTerminationDateBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
            +     * Output only. The date when the subscription is terminated earlier than the
            +     * expiration date.
            +     * 
            + * + * + * .google.type.Date early_termination_date = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.type.Date.Builder getEarlyTerminationDateBuilder() { + bitField0_ |= 0x00000800; + onChanged(); + return internalGetEarlyTerminationDateFieldBuilder().getBuilder(); + } + + /** + * + * + *
            +     * Output only. The date when the subscription is terminated earlier than the
            +     * expiration date.
            +     * 
            + * + * + * .google.type.Date early_termination_date = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.type.DateOrBuilder getEarlyTerminationDateOrBuilder() { + if (earlyTerminationDateBuilder_ != null) { + return earlyTerminationDateBuilder_.getMessageOrBuilder(); + } else { + return earlyTerminationDate_ == null + ? com.google.type.Date.getDefaultInstance() + : earlyTerminationDate_; + } + } + + /** + * + * + *
            +     * Output only. The date when the subscription is terminated earlier than the
            +     * expiration date.
            +     * 
            + * + * + * .google.type.Date early_termination_date = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.type.Date, com.google.type.Date.Builder, com.google.type.DateOrBuilder> + internalGetEarlyTerminationDateFieldBuilder() { + if (earlyTerminationDateBuilder_ == null) { + earlyTerminationDateBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.type.Date, com.google.type.Date.Builder, com.google.type.DateOrBuilder>( + getEarlyTerminationDate(), getParentForChildren(), isClean()); + earlyTerminationDate_ = null; + } + return earlyTerminationDateBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.LicenseConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.LicenseConfig) + private static final com.google.cloud.discoveryengine.v1beta.LicenseConfig DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.discoveryengine.v1beta.LicenseConfig(); + } + + public static com.google.cloud.discoveryengine.v1beta.LicenseConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public LicenseConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.LicenseConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/LicenseConfigName.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/LicenseConfigName.java new file mode 100644 index 000000000000..1b5f55122089 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/LicenseConfigName.java @@ -0,0 +1,227 @@ +/* + * 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.discoveryengine.v1beta; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class LicenseConfigName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_LICENSE_CONFIG = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/licenseConfigs/{license_config}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + private final String licenseConfig; + + @Deprecated + protected LicenseConfigName() { + project = null; + location = null; + licenseConfig = null; + } + + private LicenseConfigName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + licenseConfig = Preconditions.checkNotNull(builder.getLicenseConfig()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getLicenseConfig() { + return licenseConfig; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static LicenseConfigName of(String project, String location, String licenseConfig) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setLicenseConfig(licenseConfig) + .build(); + } + + public static String format(String project, String location, String licenseConfig) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setLicenseConfig(licenseConfig) + .build() + .toString(); + } + + public static LicenseConfigName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_LICENSE_CONFIG.validatedMatch( + formattedString, "LicenseConfigName.parse: formattedString not in valid format"); + return of(matchMap.get("project"), matchMap.get("location"), matchMap.get("license_config")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (LicenseConfigName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_LICENSE_CONFIG.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (project != null) { + fieldMapBuilder.put("project", project); + } + if (location != null) { + fieldMapBuilder.put("location", location); + } + if (licenseConfig != null) { + fieldMapBuilder.put("license_config", licenseConfig); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_LICENSE_CONFIG.instantiate( + "project", project, "location", location, "license_config", licenseConfig); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null && getClass() == o.getClass()) { + LicenseConfigName that = ((LicenseConfigName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.licenseConfig, that.licenseConfig); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(location); + h *= 1000003; + h ^= Objects.hashCode(licenseConfig); + return h; + } + + /** Builder for projects/{project}/locations/{location}/licenseConfigs/{license_config}. */ + public static class Builder { + private String project; + private String location; + private String licenseConfig; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getLicenseConfig() { + return licenseConfig; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setLicenseConfig(String licenseConfig) { + this.licenseConfig = licenseConfig; + return this; + } + + private Builder(LicenseConfigName licenseConfigName) { + this.project = licenseConfigName.project; + this.location = licenseConfigName.location; + this.licenseConfig = licenseConfigName.licenseConfig; + } + + public LicenseConfigName build() { + return new LicenseConfigName(this); + } + } +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/LicenseConfigOrBuilder.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/LicenseConfigOrBuilder.java new file mode 100644 index 000000000000..03ef18178c40 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/LicenseConfigOrBuilder.java @@ -0,0 +1,340 @@ +/* + * 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/cloud/discoveryengine/v1beta/license_config.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.discoveryengine.v1beta; + +@com.google.protobuf.Generated +public interface LicenseConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.LicenseConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
            +   * Immutable. Identifier. The fully qualified resource name of the license
            +   * config. Format:
            +   * `projects/{project}/locations/{location}/licenseConfigs/{license_config}`
            +   * 
            + * + * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = IDENTIFIER]; + * + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
            +   * Immutable. Identifier. The fully qualified resource name of the license
            +   * config. Format:
            +   * `projects/{project}/locations/{location}/licenseConfigs/{license_config}`
            +   * 
            + * + * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = IDENTIFIER]; + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
            +   * Required. Number of licenses purchased.
            +   * 
            + * + * int64 license_count = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The licenseCount. + */ + long getLicenseCount(); + + /** + * + * + *
            +   * Required. Subscription tier information for the license config.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SubscriptionTier subscription_tier = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for subscriptionTier. + */ + int getSubscriptionTierValue(); + + /** + * + * + *
            +   * Required. Subscription tier information for the license config.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SubscriptionTier subscription_tier = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The subscriptionTier. + */ + com.google.cloud.discoveryengine.v1beta.SubscriptionTier getSubscriptionTier(); + + /** + * + * + *
            +   * Output only. The state of the license config.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.LicenseConfig.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + int getStateValue(); + + /** + * + * + *
            +   * Output only. The state of the license config.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.LicenseConfig.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + com.google.cloud.discoveryengine.v1beta.LicenseConfig.State getState(); + + /** + * + * + *
            +   * Optional. Whether the license config should be auto renewed when it reaches
            +   * the end date.
            +   * 
            + * + * bool auto_renew = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The autoRenew. + */ + boolean getAutoRenew(); + + /** + * + * + *
            +   * Required. The start date.
            +   * 
            + * + * .google.type.Date start_date = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * @return Whether the startDate field is set. + */ + boolean hasStartDate(); + + /** + * + * + *
            +   * Required. The start date.
            +   * 
            + * + * .google.type.Date start_date = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The startDate. + */ + com.google.type.Date getStartDate(); + + /** + * + * + *
            +   * Required. The start date.
            +   * 
            + * + * .google.type.Date start_date = 6 [(.google.api.field_behavior) = REQUIRED]; + */ + com.google.type.DateOrBuilder getStartDateOrBuilder(); + + /** + * + * + *
            +   * Optional. The planed end date.
            +   * 
            + * + * .google.type.Date end_date = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the endDate field is set. + */ + boolean hasEndDate(); + + /** + * + * + *
            +   * Optional. The planed end date.
            +   * 
            + * + * .google.type.Date end_date = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The endDate. + */ + com.google.type.Date getEndDate(); + + /** + * + * + *
            +   * Optional. The planed end date.
            +   * 
            + * + * .google.type.Date end_date = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + com.google.type.DateOrBuilder getEndDateOrBuilder(); + + /** + * + * + *
            +   * Required. Subscription term.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SubscriptionTerm subscription_term = 8 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for subscriptionTerm. + */ + int getSubscriptionTermValue(); + + /** + * + * + *
            +   * Required. Subscription term.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SubscriptionTerm subscription_term = 8 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The subscriptionTerm. + */ + com.google.cloud.discoveryengine.v1beta.SubscriptionTerm getSubscriptionTerm(); + + /** + * + * + *
            +   * Optional. Whether the license config is for free trial.
            +   * 
            + * + * bool free_trial = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The freeTrial. + */ + boolean getFreeTrial(); + + /** + * + * + *
            +   * Output only. Whether the license config is for Gemini bundle.
            +   * 
            + * + * bool gemini_bundle = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The geminiBundle. + */ + boolean getGeminiBundle(); + + /** + * + * + *
            +   * Output only. Indication of whether the subscription is terminated earlier
            +   * than the expiration date. This is usually terminated by pipeline once the
            +   * subscription gets terminated from subsv3.
            +   * 
            + * + * bool early_terminated = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The earlyTerminated. + */ + boolean getEarlyTerminated(); + + /** + * + * + *
            +   * Output only. The date when the subscription is terminated earlier than the
            +   * expiration date.
            +   * 
            + * + * + * .google.type.Date early_termination_date = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the earlyTerminationDate field is set. + */ + boolean hasEarlyTerminationDate(); + + /** + * + * + *
            +   * Output only. The date when the subscription is terminated earlier than the
            +   * expiration date.
            +   * 
            + * + * + * .google.type.Date early_termination_date = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The earlyTerminationDate. + */ + com.google.type.Date getEarlyTerminationDate(); + + /** + * + * + *
            +   * Output only. The date when the subscription is terminated earlier than the
            +   * expiration date.
            +   * 
            + * + * + * .google.type.Date early_termination_date = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.type.DateOrBuilder getEarlyTerminationDateOrBuilder(); +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/LicenseConfigProto.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/LicenseConfigProto.java new file mode 100644 index 000000000000..c0e1b9e1d493 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/LicenseConfigProto.java @@ -0,0 +1,138 @@ +/* + * 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/cloud/discoveryengine/v1beta/license_config.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.discoveryengine.v1beta; + +@com.google.protobuf.Generated +public final class LicenseConfigProto extends com.google.protobuf.GeneratedFile { + private LicenseConfigProto() {} + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "LicenseConfigProto"); + } + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1beta_LicenseConfig_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1beta_LicenseConfig_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n" + + "8google/cloud/discoveryengine/v1beta/license_config.proto\022#google.cloud.discove" + + "ryengine.v1beta\032\037google/api/field_behavi" + + "or.proto\032\031google/api/resource.proto\0320goo" + + "gle/cloud/discoveryengine/v1beta/common.proto\032\026google/type/date.proto\"\300\006\n\r" + + "LicenseConfig\022\024\n" + + "\004name\030\001 \001(\tB\006\340A\005\340A\010\022\032\n\r" + + "license_count\030\002 \001(\003B\003\340A\002\022U\n" + + "\021subscription_tier\030\003" + + " \001(\01625.google.cloud.discoveryengine.v1beta.SubscriptionTierB\003\340A\002\022L\n" + + "\005state\030\004 \001(\0162" + + "8.google.cloud.discoveryengine.v1beta.LicenseConfig.StateB\003\340A\003\022\027\n\n" + + "auto_renew\030\005 \001(\010B\003\340A\001\022*\n\n" + + "start_date\030\006 \001(\0132\021.google.type.DateB\003\340A\002\022(\n" + + "\010end_date\030\007 \001(\0132\021.google.type.DateB\003\340A\001\022U\n" + + "\021subscription_term\030\010 \001(\016" + + "25.google.cloud.discoveryengine.v1beta.SubscriptionTermB\003\340A\002\022\027\n\n" + + "free_trial\030\t \001(\010B\003\340A\001\022\032\n\r" + + "gemini_bundle\030\013 \001(\010B\003\340A\003\022\035\n" + + "\020early_terminated\030\014 \001(\010B\003\340A\003\0226\n" + + "\026early_termination_date\030\r" + + " \001(\0132\021.google.type.DateB\003\340A\003\"i\n" + + "\005State\022\025\n" + + "\021STATE_UNSPECIFIED\020\000\022\n\n" + + "\006ACTIVE\020\001\022\013\n" + + "\007EXPIRED\020\002\022\017\n" + + "\013NOT_STARTED\020\003\022\r\n" + + "\tWITHDRAWN\020\004\022\020\n" + + "\014DEACTIVATING\020\005:\232\001\352A\226\001\n" + + ",discoveryengine.googleapis.com/LicenseConfig" + + "\022Gprojects/{project}/locations/{location" + + "}/licenseConfigs/{license_config}*\016licenseConfigs2\r" + + "licenseConfigB\231\002\n" + + "\'com.google.cloud.discoveryengine.v1betaB\022LicenseCon" + + "figProtoP\001ZQcloud.google.com/go/discoveryengine/apiv1beta/discoveryenginepb;disc" + + "overyenginepb\242\002\017DISCOVERYENGINE\252\002#Google" + + ".Cloud.DiscoveryEngine.V1Beta\312\002#Google\\C" + + "loud\\DiscoveryEngine\\V1beta\352\002&Google::Cl" + + "oud::DiscoveryEngine::V1betab\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.ResourceProto.getDescriptor(), + com.google.cloud.discoveryengine.v1beta.CommonProto.getDescriptor(), + com.google.type.DateProto.getDescriptor(), + }); + internal_static_google_cloud_discoveryengine_v1beta_LicenseConfig_descriptor = + getDescriptor().getMessageType(0); + internal_static_google_cloud_discoveryengine_v1beta_LicenseConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1beta_LicenseConfig_descriptor, + new java.lang.String[] { + "Name", + "LicenseCount", + "SubscriptionTier", + "State", + "AutoRenew", + "StartDate", + "EndDate", + "SubscriptionTerm", + "FreeTrial", + "GeminiBundle", + "EarlyTerminated", + "EarlyTerminationDate", + }); + descriptor.resolveAllFeaturesImmutable(); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + com.google.cloud.discoveryengine.v1beta.CommonProto.getDescriptor(); + com.google.type.DateProto.getDescriptor(); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.ResourceProto.resource); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/LicenseConfigServiceProto.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/LicenseConfigServiceProto.java new file mode 100644 index 000000000000..db37f95ba878 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/LicenseConfigServiceProto.java @@ -0,0 +1,289 @@ +/* + * 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/cloud/discoveryengine/v1beta/license_config_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.discoveryengine.v1beta; + +@com.google.protobuf.Generated +public final class LicenseConfigServiceProto extends com.google.protobuf.GeneratedFile { + private LicenseConfigServiceProto() {} + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "LicenseConfigServiceProto"); + } + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1beta_CreateLicenseConfigRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1beta_CreateLicenseConfigRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1beta_UpdateLicenseConfigRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1beta_UpdateLicenseConfigRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1beta_GetLicenseConfigRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1beta_GetLicenseConfigRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1beta_ListLicenseConfigsRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1beta_ListLicenseConfigsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1beta_ListLicenseConfigsResponse_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1beta_ListLicenseConfigsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1beta_DistributeLicenseConfigRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1beta_DistributeLicenseConfigRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1beta_DistributeLicenseConfigResponse_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1beta_DistributeLicenseConfigResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1beta_RetractLicenseConfigRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1beta_RetractLicenseConfigRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1beta_RetractLicenseConfigResponse_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1beta_RetractLicenseConfigResponse_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n" + + "@google/cloud/discoveryengine/v1beta/license_config_service.proto\022#google.cloud" + + ".discoveryengine.v1beta\032\034google/api/anno" + + "tations.proto\032\027google/api/client.proto\032\037" + + "google/api/field_behavior.proto\032\031google/" + + "api/resource.proto\0328google/cloud/discoveryengine/v1beta/license_config.proto\032" + + " google/protobuf/field_mask.proto\"\316\001\n" + + "\032CreateLicenseConfigRequest\022?\n" + + "\006parent\030\001 \001(\tB/\340A\002\372A)\n" + + "\'discoveryengine.googleapis.com/Location\022O\n" + + "\016license_config\030\002 \001(\01322.google." + + "cloud.discoveryengine.v1beta.LicenseConfigB\003\340A\002\022\036\n" + + "\021license_config_id\030\003 \001(\tB\003\340A\001\"\243\001\n" + + "\032UpdateLicenseConfigRequest\022O\n" + + "\016license_config\030\001" + + " \001(\01322.google.cloud.discoveryengine.v1beta.LicenseConfigB\003\340A\002\0224\n" + + "\013update_mask\030\002 \001(\0132\032.google.protobuf.FieldMaskB\003\340A\001\"]\n" + + "\027GetLicenseConfigRequest\022B\n" + + "\004name\030\001 \001(\tB4\340A\002\372A.\n" + + ",discoveryengine.googleapis.com/LicenseConfig\"\242\001\n" + + "\031ListLicenseConfigsRequest\022?\n" + + "\006parent\030\001 \001(\tB/\340A\002\372A)\n" + + "\'discoveryengine.googleapis.com/Location\022\026\n" + + "\tpage_size\030\002 \001(\005B\003\340A\001\022\027\n\n" + + "page_token\030\003 \001(\tB\003\340A\001\022\023\n" + + "\006filter\030\004 \001(\tB\003\340A\001\"\202\001\n" + + "\032ListLicenseConfigsResponse\022K\n" + + "\017license_configs\030\001 \003(" + + "\01322.google.cloud.discoveryengine.v1beta.LicenseConfig\022\027\n" + + "\017next_page_token\030\002 \001(\t\"\374\001\n" + + "\036DistributeLicenseConfigRequest\022j\n" + + "\036billing_account_license_config\030\001 \001(\tBB\340A\002\372A<\n" + + ":discoveryengine.googleapis.com/BillingAccountLicenseConfig\022\033\n" + + "\016project_number\030\002 \001(\003B\003\340A\002\022\025\n" + + "\010location\030\003 \001(\tB\003\340A\002\022\032\n\r" + + "license_count\030\004 \001(\003B\003\340A\002\022\036\n" + + "\021license_config_id\030\005 \001(\tB\003\340A\001\"m\n" + + "\037DistributeLicenseConfigResponse\022J\n" + + "\016license_config\030\001 \001(\01322.googl" + + "e.cloud.discoveryengine.v1beta.LicenseConfig\"\216\002\n" + + "\033RetractLicenseConfigRequest\022j\n" + + "\036billing_account_license_config\030\001 \001(\tBB\340A\002\372A<\n" + + ":discoveryengine.googleapis.com/BillingAccountLicenseConfig\022L\n" + + "\016license_config\030\002 \001(\tB4\340A\002\372A.\n" + + ",discoveryengine.googleapis.com/LicenseConfig\022\031\n" + + "\014full_retract\030\003 \001(\010B\003\340A\001\022\032\n\r" + + "license_count\030\004 \001(\003B\003\340A\001\"j\n" + + "\034RetractLicenseConfigResponse\022J\n" + + "\016license_config\030\001" + + " \001(\01322.google.cloud.discoveryengine.v1beta.LicenseConfig2\213\017\n" + + "\024LicenseConfigService\022\204\002\n" + + "\023CreateLicenseConfig\022?.google.cloud.discoveryengine.v1beta.CreateL" + + "icenseConfigRequest\0322.google.cloud.disco" + + "veryengine.v1beta.LicenseConfig\"x\332A\'pare" + + "nt,license_config,license_config_id\202\323\344\223\002" + + "H\"6/v1beta/{parent=projects/*/locations/*}/licenseConfigs:\016license_config\022\206\002\n" + + "\023UpdateLicenseConfig\022?.google.cloud.discove" + + "ryengine.v1beta.UpdateLicenseConfigRequest\0322.google.cloud.discoveryengine.v1beta" + + ".LicenseConfig\"z\332A\032license_config,update" + + "_mask\202\323\344\223\002W2E/v1beta/{license_config.nam" + + "e=projects/*/locations/*/licenseConfigs/*}:\016license_config\022\313\001\n" + + "\020GetLicenseConfig\022<.google.cloud.discoveryengine.v1beta.Ge" + + "tLicenseConfigRequest\0322.google.cloud.dis" + + "coveryengine.v1beta.LicenseConfig\"E\332A\004na" + + "me\202\323\344\223\0028\0226/v1beta/{name=projects/*/locations/*/licenseConfigs/*}\022\336\001\n" + + "\022ListLicenseConfigs\022>.google.cloud.discoveryengine.v" + + "1beta.ListLicenseConfigsRequest\032?.google.cloud.discoveryengine.v1beta.ListLicens" + + "eConfigsResponse\"G\332A\006parent\202\323\344\223\0028\0226/v1be" + + "ta/{parent=projects/*/locations/*}/licenseConfigs\022\374\002\n" + + "\027DistributeLicenseConfig\022C.google.cloud.discoveryengine.v1beta.Dist" + + "ributeLicenseConfigRequest\032D.google.cloud.discoveryengine.v1beta.DistributeLicen" + + "seConfigResponse\"\325\001\332AVbilling_account_li" + + "cense_config,project_number,location,lic" + + "ense_count,license_config_id\202\323\344\223\002v\"q/v1b" + + "eta/{billing_account_license_config=bill" + + "ingAccounts/*/billingAccountLicenseConfigs/*}:distributeLicenseConfig:\001*\022\342\002\n" + + "\024RetractLicenseConfig\022@.google.cloud.discove" + + "ryengine.v1beta.RetractLicenseConfigRequest\032A.google.cloud.discoveryengine.v1bet" + + "a.RetractLicenseConfigResponse\"\304\001\332AHbill" + + "ing_account_license_config,license_confi" + + "g,full_retract,license_count\202\323\344\223\002s\"n/v1b" + + "eta/{billing_account_license_config=billingAccounts/*/billingAccountLicenseConfi" + + "gs/*}:retractLicenseConfig:\001*\032\317\001\312A\036disco" + + "veryengine.googleapis.com\322A\252\001https://www" + + ".googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/discoveryeng" + + "ine.readwrite,https://www.googleapis.com" + + "/auth/discoveryengine.serving.readwriteB\240\002\n" + + "\'com.google.cloud.discoveryengine.v1betaB\031LicenseConfigServiceProtoP\001ZQcloud." + + "google.com/go/discoveryengine/apiv1beta/" + + "discoveryenginepb;discoveryenginepb\242\002\017DI" + + "SCOVERYENGINE\252\002#Google.Cloud.DiscoveryEn" + + "gine.V1Beta\312\002#Google\\Cloud\\DiscoveryEngi" + + "ne\\V1beta\352\002&Google::Cloud::DiscoveryEngine::V1betab\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.AnnotationsProto.getDescriptor(), + com.google.api.ClientProto.getDescriptor(), + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.ResourceProto.getDescriptor(), + com.google.cloud.discoveryengine.v1beta.LicenseConfigProto.getDescriptor(), + com.google.protobuf.FieldMaskProto.getDescriptor(), + }); + internal_static_google_cloud_discoveryengine_v1beta_CreateLicenseConfigRequest_descriptor = + getDescriptor().getMessageType(0); + internal_static_google_cloud_discoveryengine_v1beta_CreateLicenseConfigRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1beta_CreateLicenseConfigRequest_descriptor, + new java.lang.String[] { + "Parent", "LicenseConfig", "LicenseConfigId", + }); + internal_static_google_cloud_discoveryengine_v1beta_UpdateLicenseConfigRequest_descriptor = + getDescriptor().getMessageType(1); + internal_static_google_cloud_discoveryengine_v1beta_UpdateLicenseConfigRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1beta_UpdateLicenseConfigRequest_descriptor, + new java.lang.String[] { + "LicenseConfig", "UpdateMask", + }); + internal_static_google_cloud_discoveryengine_v1beta_GetLicenseConfigRequest_descriptor = + getDescriptor().getMessageType(2); + internal_static_google_cloud_discoveryengine_v1beta_GetLicenseConfigRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1beta_GetLicenseConfigRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_discoveryengine_v1beta_ListLicenseConfigsRequest_descriptor = + getDescriptor().getMessageType(3); + internal_static_google_cloud_discoveryengine_v1beta_ListLicenseConfigsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1beta_ListLicenseConfigsRequest_descriptor, + new java.lang.String[] { + "Parent", "PageSize", "PageToken", "Filter", + }); + internal_static_google_cloud_discoveryengine_v1beta_ListLicenseConfigsResponse_descriptor = + getDescriptor().getMessageType(4); + internal_static_google_cloud_discoveryengine_v1beta_ListLicenseConfigsResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1beta_ListLicenseConfigsResponse_descriptor, + new java.lang.String[] { + "LicenseConfigs", "NextPageToken", + }); + internal_static_google_cloud_discoveryengine_v1beta_DistributeLicenseConfigRequest_descriptor = + getDescriptor().getMessageType(5); + internal_static_google_cloud_discoveryengine_v1beta_DistributeLicenseConfigRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1beta_DistributeLicenseConfigRequest_descriptor, + new java.lang.String[] { + "BillingAccountLicenseConfig", + "ProjectNumber", + "Location", + "LicenseCount", + "LicenseConfigId", + }); + internal_static_google_cloud_discoveryengine_v1beta_DistributeLicenseConfigResponse_descriptor = + getDescriptor().getMessageType(6); + internal_static_google_cloud_discoveryengine_v1beta_DistributeLicenseConfigResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1beta_DistributeLicenseConfigResponse_descriptor, + new java.lang.String[] { + "LicenseConfig", + }); + internal_static_google_cloud_discoveryengine_v1beta_RetractLicenseConfigRequest_descriptor = + getDescriptor().getMessageType(7); + internal_static_google_cloud_discoveryengine_v1beta_RetractLicenseConfigRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1beta_RetractLicenseConfigRequest_descriptor, + new java.lang.String[] { + "BillingAccountLicenseConfig", "LicenseConfig", "FullRetract", "LicenseCount", + }); + internal_static_google_cloud_discoveryengine_v1beta_RetractLicenseConfigResponse_descriptor = + getDescriptor().getMessageType(8); + internal_static_google_cloud_discoveryengine_v1beta_RetractLicenseConfigResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1beta_RetractLicenseConfigResponse_descriptor, + new java.lang.String[] { + "LicenseConfig", + }); + descriptor.resolveAllFeaturesImmutable(); + com.google.api.AnnotationsProto.getDescriptor(); + com.google.api.ClientProto.getDescriptor(); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + com.google.cloud.discoveryengine.v1beta.LicenseConfigProto.getDescriptor(); + com.google.protobuf.FieldMaskProto.getDescriptor(); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.ClientProto.defaultHost); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.AnnotationsProto.http); + registry.add(com.google.api.ClientProto.methodSignature); + registry.add(com.google.api.ClientProto.oauthScopes); + registry.add(com.google.api.ResourceProto.resourceReference); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/LicenseConfigUsageStats.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/LicenseConfigUsageStats.java new file mode 100644 index 000000000000..7f37fa914c31 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/LicenseConfigUsageStats.java @@ -0,0 +1,701 @@ +/* + * 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/cloud/discoveryengine/v1beta/user_license.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.discoveryengine.v1beta; + +/** + * + * + *
            + * Stats about users' licenses.
            + * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.LicenseConfigUsageStats} + */ +@com.google.protobuf.Generated +public final class LicenseConfigUsageStats extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.LicenseConfigUsageStats) + LicenseConfigUsageStatsOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "LicenseConfigUsageStats"); + } + + // Use LicenseConfigUsageStats.newBuilder() to construct. + private LicenseConfigUsageStats(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private LicenseConfigUsageStats() { + licenseConfig_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.UserLicenseProto + .internal_static_google_cloud_discoveryengine_v1beta_LicenseConfigUsageStats_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.UserLicenseProto + .internal_static_google_cloud_discoveryengine_v1beta_LicenseConfigUsageStats_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.LicenseConfigUsageStats.class, + com.google.cloud.discoveryengine.v1beta.LicenseConfigUsageStats.Builder.class); + } + + public static final int LICENSE_CONFIG_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object licenseConfig_ = ""; + + /** + * + * + *
            +   * Required. The LicenseConfig name.
            +   * 
            + * + * string license_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The licenseConfig. + */ + @java.lang.Override + public java.lang.String getLicenseConfig() { + java.lang.Object ref = licenseConfig_; + 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(); + licenseConfig_ = s; + return s; + } + } + + /** + * + * + *
            +   * Required. The LicenseConfig name.
            +   * 
            + * + * string license_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for licenseConfig. + */ + @java.lang.Override + public com.google.protobuf.ByteString getLicenseConfigBytes() { + java.lang.Object ref = licenseConfig_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + licenseConfig_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int USED_LICENSE_COUNT_FIELD_NUMBER = 2; + private long usedLicenseCount_ = 0L; + + /** + * + * + *
            +   * Required. The number of licenses used.
            +   * 
            + * + * int64 used_license_count = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The usedLicenseCount. + */ + @java.lang.Override + public long getUsedLicenseCount() { + return usedLicenseCount_; + } + + 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(licenseConfig_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, licenseConfig_); + } + if (usedLicenseCount_ != 0L) { + output.writeInt64(2, usedLicenseCount_); + } + 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(licenseConfig_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, licenseConfig_); + } + if (usedLicenseCount_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(2, usedLicenseCount_); + } + 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.discoveryengine.v1beta.LicenseConfigUsageStats)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1beta.LicenseConfigUsageStats other = + (com.google.cloud.discoveryengine.v1beta.LicenseConfigUsageStats) obj; + + if (!getLicenseConfig().equals(other.getLicenseConfig())) return false; + if (getUsedLicenseCount() != other.getUsedLicenseCount()) 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) + LICENSE_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getLicenseConfig().hashCode(); + hash = (37 * hash) + USED_LICENSE_COUNT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getUsedLicenseCount()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1beta.LicenseConfigUsageStats parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.LicenseConfigUsageStats 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.discoveryengine.v1beta.LicenseConfigUsageStats parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.LicenseConfigUsageStats 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.discoveryengine.v1beta.LicenseConfigUsageStats parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.LicenseConfigUsageStats parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1beta.LicenseConfigUsageStats parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.LicenseConfigUsageStats 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.discoveryengine.v1beta.LicenseConfigUsageStats parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.LicenseConfigUsageStats 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.discoveryengine.v1beta.LicenseConfigUsageStats parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.LicenseConfigUsageStats 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.discoveryengine.v1beta.LicenseConfigUsageStats 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; + } + + /** + * + * + *
            +   * Stats about users' licenses.
            +   * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.LicenseConfigUsageStats} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.LicenseConfigUsageStats) + com.google.cloud.discoveryengine.v1beta.LicenseConfigUsageStatsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.UserLicenseProto + .internal_static_google_cloud_discoveryengine_v1beta_LicenseConfigUsageStats_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.UserLicenseProto + .internal_static_google_cloud_discoveryengine_v1beta_LicenseConfigUsageStats_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.LicenseConfigUsageStats.class, + com.google.cloud.discoveryengine.v1beta.LicenseConfigUsageStats.Builder.class); + } + + // Construct using com.google.cloud.discoveryengine.v1beta.LicenseConfigUsageStats.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + licenseConfig_ = ""; + usedLicenseCount_ = 0L; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1beta.UserLicenseProto + .internal_static_google_cloud_discoveryengine_v1beta_LicenseConfigUsageStats_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.LicenseConfigUsageStats + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1beta.LicenseConfigUsageStats.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.LicenseConfigUsageStats build() { + com.google.cloud.discoveryengine.v1beta.LicenseConfigUsageStats result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.LicenseConfigUsageStats buildPartial() { + com.google.cloud.discoveryengine.v1beta.LicenseConfigUsageStats result = + new com.google.cloud.discoveryengine.v1beta.LicenseConfigUsageStats(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.discoveryengine.v1beta.LicenseConfigUsageStats result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.licenseConfig_ = licenseConfig_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.usedLicenseCount_ = usedLicenseCount_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.discoveryengine.v1beta.LicenseConfigUsageStats) { + return mergeFrom((com.google.cloud.discoveryengine.v1beta.LicenseConfigUsageStats) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1beta.LicenseConfigUsageStats other) { + if (other + == com.google.cloud.discoveryengine.v1beta.LicenseConfigUsageStats.getDefaultInstance()) + return this; + if (!other.getLicenseConfig().isEmpty()) { + licenseConfig_ = other.licenseConfig_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getUsedLicenseCount() != 0L) { + setUsedLicenseCount(other.getUsedLicenseCount()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + licenseConfig_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + usedLicenseCount_ = input.readInt64(); + bitField0_ |= 0x00000002; + break; + } // case 16 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object licenseConfig_ = ""; + + /** + * + * + *
            +     * Required. The LicenseConfig name.
            +     * 
            + * + * string license_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The licenseConfig. + */ + public java.lang.String getLicenseConfig() { + java.lang.Object ref = licenseConfig_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + licenseConfig_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
            +     * Required. The LicenseConfig name.
            +     * 
            + * + * string license_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for licenseConfig. + */ + public com.google.protobuf.ByteString getLicenseConfigBytes() { + java.lang.Object ref = licenseConfig_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + licenseConfig_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
            +     * Required. The LicenseConfig name.
            +     * 
            + * + * string license_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The licenseConfig to set. + * @return This builder for chaining. + */ + public Builder setLicenseConfig(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + licenseConfig_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Required. The LicenseConfig name.
            +     * 
            + * + * string license_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearLicenseConfig() { + licenseConfig_ = getDefaultInstance().getLicenseConfig(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
            +     * Required. The LicenseConfig name.
            +     * 
            + * + * string license_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for licenseConfig to set. + * @return This builder for chaining. + */ + public Builder setLicenseConfigBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + licenseConfig_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private long usedLicenseCount_; + + /** + * + * + *
            +     * Required. The number of licenses used.
            +     * 
            + * + * int64 used_license_count = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The usedLicenseCount. + */ + @java.lang.Override + public long getUsedLicenseCount() { + return usedLicenseCount_; + } + + /** + * + * + *
            +     * Required. The number of licenses used.
            +     * 
            + * + * int64 used_license_count = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The usedLicenseCount to set. + * @return This builder for chaining. + */ + public Builder setUsedLicenseCount(long value) { + + usedLicenseCount_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Required. The number of licenses used.
            +     * 
            + * + * int64 used_license_count = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearUsedLicenseCount() { + bitField0_ = (bitField0_ & ~0x00000002); + usedLicenseCount_ = 0L; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.LicenseConfigUsageStats) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.LicenseConfigUsageStats) + private static final com.google.cloud.discoveryengine.v1beta.LicenseConfigUsageStats + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.discoveryengine.v1beta.LicenseConfigUsageStats(); + } + + public static com.google.cloud.discoveryengine.v1beta.LicenseConfigUsageStats + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public LicenseConfigUsageStats parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.LicenseConfigUsageStats + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/LicenseConfigUsageStatsOrBuilder.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/LicenseConfigUsageStatsOrBuilder.java new file mode 100644 index 000000000000..bb9cc4947df6 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/LicenseConfigUsageStatsOrBuilder.java @@ -0,0 +1,67 @@ +/* + * 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/cloud/discoveryengine/v1beta/user_license.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.discoveryengine.v1beta; + +@com.google.protobuf.Generated +public interface LicenseConfigUsageStatsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.LicenseConfigUsageStats) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
            +   * Required. The LicenseConfig name.
            +   * 
            + * + * string license_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The licenseConfig. + */ + java.lang.String getLicenseConfig(); + + /** + * + * + *
            +   * Required. The LicenseConfig name.
            +   * 
            + * + * string license_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for licenseConfig. + */ + com.google.protobuf.ByteString getLicenseConfigBytes(); + + /** + * + * + *
            +   * Required. The number of licenses used.
            +   * 
            + * + * int64 used_license_count = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The usedLicenseCount. + */ + long getUsedLicenseCount(); +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ListAssistantsRequest.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ListAssistantsRequest.java new file mode 100644 index 000000000000..362e863ea62c --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ListAssistantsRequest.java @@ -0,0 +1,987 @@ +/* + * 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/cloud/discoveryengine/v1beta/assistant_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.discoveryengine.v1beta; + +/** + * + * + *
            + * Request message for the
            + * [AssistantService.ListAssistants][google.cloud.discoveryengine.v1beta.AssistantService.ListAssistants]
            + * method.
            + * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.ListAssistantsRequest} + */ +@com.google.protobuf.Generated +public final class ListAssistantsRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.ListAssistantsRequest) + ListAssistantsRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ListAssistantsRequest"); + } + + // Use ListAssistantsRequest.newBuilder() to construct. + private ListAssistantsRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ListAssistantsRequest() { + parent_ = ""; + pageToken_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.AssistantServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_ListAssistantsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.AssistantServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_ListAssistantsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.ListAssistantsRequest.class, + com.google.cloud.discoveryengine.v1beta.ListAssistantsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + + /** + * + * + *
            +   * Required. The parent resource name.
            +   * Format:
            +   * `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}`
            +   * 
            + * + * + * 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 parent resource name.
            +   * Format:
            +   * `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}`
            +   * 
            + * + * + * 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 PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_ = 0; + + /** + * + * + *
            +   * Maximum number of
            +   * [Assistant][google.cloud.discoveryengine.v1beta.Assistant]s to return. If
            +   * unspecified, defaults to 100. The maximum allowed value is 1000; anything
            +   * above that will be coerced down to 1000.
            +   * 
            + * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object pageToken_ = ""; + + /** + * + * + *
            +   * A page token
            +   * [ListAssistantsResponse.next_page_token][google.cloud.discoveryengine.v1beta.ListAssistantsResponse.next_page_token],
            +   * received from a previous
            +   * [AssistantService.ListAssistants][google.cloud.discoveryengine.v1beta.AssistantService.ListAssistants]
            +   * call. Provide this to retrieve the subsequent page.
            +   *
            +   * When paginating, all other parameters provided to
            +   * [ListAssistants][google.cloud.discoveryengine.v1beta.AssistantService.ListAssistants]
            +   * must match the call that provided the page token.
            +   * 
            + * + * string page_token = 3; + * + * @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; + } + } + + /** + * + * + *
            +   * A page token
            +   * [ListAssistantsResponse.next_page_token][google.cloud.discoveryengine.v1beta.ListAssistantsResponse.next_page_token],
            +   * received from a previous
            +   * [AssistantService.ListAssistants][google.cloud.discoveryengine.v1beta.AssistantService.ListAssistants]
            +   * call. Provide this to retrieve the subsequent page.
            +   *
            +   * When paginating, all other parameters provided to
            +   * [ListAssistants][google.cloud.discoveryengine.v1beta.AssistantService.ListAssistants]
            +   * must match the call that provided the page token.
            +   * 
            + * + * string page_token = 3; + * + * @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; + } + } + + 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 (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, pageToken_); + } + 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 (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, pageToken_); + } + 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.discoveryengine.v1beta.ListAssistantsRequest)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1beta.ListAssistantsRequest other = + (com.google.cloud.discoveryengine.v1beta.ListAssistantsRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) 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) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1beta.ListAssistantsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.ListAssistantsRequest 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.discoveryengine.v1beta.ListAssistantsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.ListAssistantsRequest 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.discoveryengine.v1beta.ListAssistantsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.ListAssistantsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1beta.ListAssistantsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.ListAssistantsRequest 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.discoveryengine.v1beta.ListAssistantsRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.ListAssistantsRequest 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.discoveryengine.v1beta.ListAssistantsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.ListAssistantsRequest 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.discoveryengine.v1beta.ListAssistantsRequest 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 the
            +   * [AssistantService.ListAssistants][google.cloud.discoveryengine.v1beta.AssistantService.ListAssistants]
            +   * method.
            +   * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.ListAssistantsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.ListAssistantsRequest) + com.google.cloud.discoveryengine.v1beta.ListAssistantsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.AssistantServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_ListAssistantsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.AssistantServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_ListAssistantsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.ListAssistantsRequest.class, + com.google.cloud.discoveryengine.v1beta.ListAssistantsRequest.Builder.class); + } + + // Construct using com.google.cloud.discoveryengine.v1beta.ListAssistantsRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + pageSize_ = 0; + pageToken_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1beta.AssistantServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_ListAssistantsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.ListAssistantsRequest + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1beta.ListAssistantsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.ListAssistantsRequest build() { + com.google.cloud.discoveryengine.v1beta.ListAssistantsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.ListAssistantsRequest buildPartial() { + com.google.cloud.discoveryengine.v1beta.ListAssistantsRequest result = + new com.google.cloud.discoveryengine.v1beta.ListAssistantsRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.discoveryengine.v1beta.ListAssistantsRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.pageSize_ = pageSize_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.pageToken_ = pageToken_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.discoveryengine.v1beta.ListAssistantsRequest) { + return mergeFrom((com.google.cloud.discoveryengine.v1beta.ListAssistantsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.discoveryengine.v1beta.ListAssistantsRequest other) { + if (other + == com.google.cloud.discoveryengine.v1beta.ListAssistantsRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + bitField0_ |= 0x00000004; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + pageSize_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + + /** + * + * + *
            +     * Required. The parent resource name.
            +     * Format:
            +     * `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}`
            +     * 
            + * + * + * 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 parent resource name.
            +     * Format:
            +     * `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}`
            +     * 
            + * + * + * 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 parent resource name.
            +     * Format:
            +     * `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}`
            +     * 
            + * + * + * 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 parent resource name.
            +     * Format:
            +     * `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}`
            +     * 
            + * + * + * 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 parent resource name.
            +     * Format:
            +     * `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}`
            +     * 
            + * + * + * 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 int pageSize_; + + /** + * + * + *
            +     * Maximum number of
            +     * [Assistant][google.cloud.discoveryengine.v1beta.Assistant]s to return. If
            +     * unspecified, defaults to 100. The maximum allowed value is 1000; anything
            +     * above that will be coerced down to 1000.
            +     * 
            + * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + /** + * + * + *
            +     * Maximum number of
            +     * [Assistant][google.cloud.discoveryengine.v1beta.Assistant]s to return. If
            +     * unspecified, defaults to 100. The maximum allowed value is 1000; anything
            +     * above that will be coerced down to 1000.
            +     * 
            + * + * int32 page_size = 2; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Maximum number of
            +     * [Assistant][google.cloud.discoveryengine.v1beta.Assistant]s to return. If
            +     * unspecified, defaults to 100. The maximum allowed value is 1000; anything
            +     * above that will be coerced down to 1000.
            +     * 
            + * + * int32 page_size = 2; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + bitField0_ = (bitField0_ & ~0x00000002); + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + + /** + * + * + *
            +     * A page token
            +     * [ListAssistantsResponse.next_page_token][google.cloud.discoveryengine.v1beta.ListAssistantsResponse.next_page_token],
            +     * received from a previous
            +     * [AssistantService.ListAssistants][google.cloud.discoveryengine.v1beta.AssistantService.ListAssistants]
            +     * call. Provide this to retrieve the subsequent page.
            +     *
            +     * When paginating, all other parameters provided to
            +     * [ListAssistants][google.cloud.discoveryengine.v1beta.AssistantService.ListAssistants]
            +     * must match the call that provided the page token.
            +     * 
            + * + * string page_token = 3; + * + * @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; + } + } + + /** + * + * + *
            +     * A page token
            +     * [ListAssistantsResponse.next_page_token][google.cloud.discoveryengine.v1beta.ListAssistantsResponse.next_page_token],
            +     * received from a previous
            +     * [AssistantService.ListAssistants][google.cloud.discoveryengine.v1beta.AssistantService.ListAssistants]
            +     * call. Provide this to retrieve the subsequent page.
            +     *
            +     * When paginating, all other parameters provided to
            +     * [ListAssistants][google.cloud.discoveryengine.v1beta.AssistantService.ListAssistants]
            +     * must match the call that provided the page token.
            +     * 
            + * + * string page_token = 3; + * + * @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; + } + } + + /** + * + * + *
            +     * A page token
            +     * [ListAssistantsResponse.next_page_token][google.cloud.discoveryengine.v1beta.ListAssistantsResponse.next_page_token],
            +     * received from a previous
            +     * [AssistantService.ListAssistants][google.cloud.discoveryengine.v1beta.AssistantService.ListAssistants]
            +     * call. Provide this to retrieve the subsequent page.
            +     *
            +     * When paginating, all other parameters provided to
            +     * [ListAssistants][google.cloud.discoveryengine.v1beta.AssistantService.ListAssistants]
            +     * must match the call that provided the page token.
            +     * 
            + * + * string page_token = 3; + * + * @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_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
            +     * A page token
            +     * [ListAssistantsResponse.next_page_token][google.cloud.discoveryengine.v1beta.ListAssistantsResponse.next_page_token],
            +     * received from a previous
            +     * [AssistantService.ListAssistants][google.cloud.discoveryengine.v1beta.AssistantService.ListAssistants]
            +     * call. Provide this to retrieve the subsequent page.
            +     *
            +     * When paginating, all other parameters provided to
            +     * [ListAssistants][google.cloud.discoveryengine.v1beta.AssistantService.ListAssistants]
            +     * must match the call that provided the page token.
            +     * 
            + * + * string page_token = 3; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + pageToken_ = getDefaultInstance().getPageToken(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
            +     * A page token
            +     * [ListAssistantsResponse.next_page_token][google.cloud.discoveryengine.v1beta.ListAssistantsResponse.next_page_token],
            +     * received from a previous
            +     * [AssistantService.ListAssistants][google.cloud.discoveryengine.v1beta.AssistantService.ListAssistants]
            +     * call. Provide this to retrieve the subsequent page.
            +     *
            +     * When paginating, all other parameters provided to
            +     * [ListAssistants][google.cloud.discoveryengine.v1beta.AssistantService.ListAssistants]
            +     * must match the call that provided the page token.
            +     * 
            + * + * string page_token = 3; + * + * @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_ |= 0x00000004; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.ListAssistantsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.ListAssistantsRequest) + private static final com.google.cloud.discoveryengine.v1beta.ListAssistantsRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.discoveryengine.v1beta.ListAssistantsRequest(); + } + + public static com.google.cloud.discoveryengine.v1beta.ListAssistantsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListAssistantsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.ListAssistantsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ListAssistantsRequestOrBuilder.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ListAssistantsRequestOrBuilder.java new file mode 100644 index 000000000000..c3e7b5f34955 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ListAssistantsRequestOrBuilder.java @@ -0,0 +1,120 @@ +/* + * 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/cloud/discoveryengine/v1beta/assistant_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.discoveryengine.v1beta; + +@com.google.protobuf.Generated +public interface ListAssistantsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.ListAssistantsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
            +   * Required. The parent resource name.
            +   * Format:
            +   * `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}`
            +   * 
            + * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + + /** + * + * + *
            +   * Required. The parent resource name.
            +   * Format:
            +   * `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}`
            +   * 
            + * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
            +   * Maximum number of
            +   * [Assistant][google.cloud.discoveryengine.v1beta.Assistant]s to return. If
            +   * unspecified, defaults to 100. The maximum allowed value is 1000; anything
            +   * above that will be coerced down to 1000.
            +   * 
            + * + * int32 page_size = 2; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
            +   * A page token
            +   * [ListAssistantsResponse.next_page_token][google.cloud.discoveryengine.v1beta.ListAssistantsResponse.next_page_token],
            +   * received from a previous
            +   * [AssistantService.ListAssistants][google.cloud.discoveryengine.v1beta.AssistantService.ListAssistants]
            +   * call. Provide this to retrieve the subsequent page.
            +   *
            +   * When paginating, all other parameters provided to
            +   * [ListAssistants][google.cloud.discoveryengine.v1beta.AssistantService.ListAssistants]
            +   * must match the call that provided the page token.
            +   * 
            + * + * string page_token = 3; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + + /** + * + * + *
            +   * A page token
            +   * [ListAssistantsResponse.next_page_token][google.cloud.discoveryengine.v1beta.ListAssistantsResponse.next_page_token],
            +   * received from a previous
            +   * [AssistantService.ListAssistants][google.cloud.discoveryengine.v1beta.AssistantService.ListAssistants]
            +   * call. Provide this to retrieve the subsequent page.
            +   *
            +   * When paginating, all other parameters provided to
            +   * [ListAssistants][google.cloud.discoveryengine.v1beta.AssistantService.ListAssistants]
            +   * must match the call that provided the page token.
            +   * 
            + * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ListAssistantsResponse.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ListAssistantsResponse.java new file mode 100644 index 000000000000..71303e6d64f5 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ListAssistantsResponse.java @@ -0,0 +1,1176 @@ +/* + * 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/cloud/discoveryengine/v1beta/assistant_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.discoveryengine.v1beta; + +/** + * + * + *
            + * Response message for the
            + * [AssistantService.ListAssistants][google.cloud.discoveryengine.v1beta.AssistantService.ListAssistants]
            + * method.
            + * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.ListAssistantsResponse} + */ +@com.google.protobuf.Generated +public final class ListAssistantsResponse extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.ListAssistantsResponse) + ListAssistantsResponseOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ListAssistantsResponse"); + } + + // Use ListAssistantsResponse.newBuilder() to construct. + private ListAssistantsResponse(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ListAssistantsResponse() { + assistants_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.AssistantServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_ListAssistantsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.AssistantServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_ListAssistantsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.ListAssistantsResponse.class, + com.google.cloud.discoveryengine.v1beta.ListAssistantsResponse.Builder.class); + } + + public static final int ASSISTANTS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List assistants_; + + /** + * + * + *
            +   * All the customer's
            +   * [Assistant][google.cloud.discoveryengine.v1beta.Assistant]s.
            +   * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.Assistant assistants = 1; + */ + @java.lang.Override + public java.util.List getAssistantsList() { + return assistants_; + } + + /** + * + * + *
            +   * All the customer's
            +   * [Assistant][google.cloud.discoveryengine.v1beta.Assistant]s.
            +   * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.Assistant assistants = 1; + */ + @java.lang.Override + public java.util.List + getAssistantsOrBuilderList() { + return assistants_; + } + + /** + * + * + *
            +   * All the customer's
            +   * [Assistant][google.cloud.discoveryengine.v1beta.Assistant]s.
            +   * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.Assistant assistants = 1; + */ + @java.lang.Override + public int getAssistantsCount() { + return assistants_.size(); + } + + /** + * + * + *
            +   * All the customer's
            +   * [Assistant][google.cloud.discoveryengine.v1beta.Assistant]s.
            +   * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.Assistant assistants = 1; + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Assistant getAssistants(int index) { + return assistants_.get(index); + } + + /** + * + * + *
            +   * All the customer's
            +   * [Assistant][google.cloud.discoveryengine.v1beta.Assistant]s.
            +   * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.Assistant assistants = 1; + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AssistantOrBuilder getAssistantsOrBuilder( + int index) { + return assistants_.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 sent as
            +   * [ListAssistantsRequest.page_token][google.cloud.discoveryengine.v1beta.ListAssistantsRequest.page_token]
            +   * to retrieve the next page. If this field is omitted, 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 sent as
            +   * [ListAssistantsRequest.page_token][google.cloud.discoveryengine.v1beta.ListAssistantsRequest.page_token]
            +   * to retrieve the next page. If this field is omitted, 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 < assistants_.size(); i++) { + output.writeMessage(1, assistants_.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 < assistants_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, assistants_.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.cloud.discoveryengine.v1beta.ListAssistantsResponse)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1beta.ListAssistantsResponse other = + (com.google.cloud.discoveryengine.v1beta.ListAssistantsResponse) obj; + + if (!getAssistantsList().equals(other.getAssistantsList())) 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 (getAssistantsCount() > 0) { + hash = (37 * hash) + ASSISTANTS_FIELD_NUMBER; + hash = (53 * hash) + getAssistantsList().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.cloud.discoveryengine.v1beta.ListAssistantsResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.ListAssistantsResponse 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.discoveryengine.v1beta.ListAssistantsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.ListAssistantsResponse 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.discoveryengine.v1beta.ListAssistantsResponse parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.ListAssistantsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1beta.ListAssistantsResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.ListAssistantsResponse 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.discoveryengine.v1beta.ListAssistantsResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.ListAssistantsResponse 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.discoveryengine.v1beta.ListAssistantsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.ListAssistantsResponse 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.discoveryengine.v1beta.ListAssistantsResponse 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 the
            +   * [AssistantService.ListAssistants][google.cloud.discoveryengine.v1beta.AssistantService.ListAssistants]
            +   * method.
            +   * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.ListAssistantsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.ListAssistantsResponse) + com.google.cloud.discoveryengine.v1beta.ListAssistantsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.AssistantServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_ListAssistantsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.AssistantServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_ListAssistantsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.ListAssistantsResponse.class, + com.google.cloud.discoveryengine.v1beta.ListAssistantsResponse.Builder.class); + } + + // Construct using com.google.cloud.discoveryengine.v1beta.ListAssistantsResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (assistantsBuilder_ == null) { + assistants_ = java.util.Collections.emptyList(); + } else { + assistants_ = null; + assistantsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + nextPageToken_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1beta.AssistantServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_ListAssistantsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.ListAssistantsResponse + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1beta.ListAssistantsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.ListAssistantsResponse build() { + com.google.cloud.discoveryengine.v1beta.ListAssistantsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.ListAssistantsResponse buildPartial() { + com.google.cloud.discoveryengine.v1beta.ListAssistantsResponse result = + new com.google.cloud.discoveryengine.v1beta.ListAssistantsResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.discoveryengine.v1beta.ListAssistantsResponse result) { + if (assistantsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + assistants_ = java.util.Collections.unmodifiableList(assistants_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.assistants_ = assistants_; + } else { + result.assistants_ = assistantsBuilder_.build(); + } + } + + private void buildPartial0( + com.google.cloud.discoveryengine.v1beta.ListAssistantsResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.nextPageToken_ = nextPageToken_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.discoveryengine.v1beta.ListAssistantsResponse) { + return mergeFrom((com.google.cloud.discoveryengine.v1beta.ListAssistantsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.discoveryengine.v1beta.ListAssistantsResponse other) { + if (other + == com.google.cloud.discoveryengine.v1beta.ListAssistantsResponse.getDefaultInstance()) + return this; + if (assistantsBuilder_ == null) { + if (!other.assistants_.isEmpty()) { + if (assistants_.isEmpty()) { + assistants_ = other.assistants_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureAssistantsIsMutable(); + assistants_.addAll(other.assistants_); + } + onChanged(); + } + } else { + if (!other.assistants_.isEmpty()) { + if (assistantsBuilder_.isEmpty()) { + assistantsBuilder_.dispose(); + assistantsBuilder_ = null; + assistants_ = other.assistants_; + bitField0_ = (bitField0_ & ~0x00000001); + assistantsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetAssistantsFieldBuilder() + : null; + } else { + assistantsBuilder_.addAllMessages(other.assistants_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.discoveryengine.v1beta.Assistant m = + input.readMessage( + com.google.cloud.discoveryengine.v1beta.Assistant.parser(), + extensionRegistry); + if (assistantsBuilder_ == null) { + ensureAssistantsIsMutable(); + assistants_.add(m); + } else { + assistantsBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List assistants_ = + java.util.Collections.emptyList(); + + private void ensureAssistantsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + assistants_ = + new java.util.ArrayList(assistants_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.discoveryengine.v1beta.Assistant, + com.google.cloud.discoveryengine.v1beta.Assistant.Builder, + com.google.cloud.discoveryengine.v1beta.AssistantOrBuilder> + assistantsBuilder_; + + /** + * + * + *
            +     * All the customer's
            +     * [Assistant][google.cloud.discoveryengine.v1beta.Assistant]s.
            +     * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.Assistant assistants = 1; + */ + public java.util.List getAssistantsList() { + if (assistantsBuilder_ == null) { + return java.util.Collections.unmodifiableList(assistants_); + } else { + return assistantsBuilder_.getMessageList(); + } + } + + /** + * + * + *
            +     * All the customer's
            +     * [Assistant][google.cloud.discoveryengine.v1beta.Assistant]s.
            +     * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.Assistant assistants = 1; + */ + public int getAssistantsCount() { + if (assistantsBuilder_ == null) { + return assistants_.size(); + } else { + return assistantsBuilder_.getCount(); + } + } + + /** + * + * + *
            +     * All the customer's
            +     * [Assistant][google.cloud.discoveryengine.v1beta.Assistant]s.
            +     * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.Assistant assistants = 1; + */ + public com.google.cloud.discoveryengine.v1beta.Assistant getAssistants(int index) { + if (assistantsBuilder_ == null) { + return assistants_.get(index); + } else { + return assistantsBuilder_.getMessage(index); + } + } + + /** + * + * + *
            +     * All the customer's
            +     * [Assistant][google.cloud.discoveryengine.v1beta.Assistant]s.
            +     * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.Assistant assistants = 1; + */ + public Builder setAssistants( + int index, com.google.cloud.discoveryengine.v1beta.Assistant value) { + if (assistantsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAssistantsIsMutable(); + assistants_.set(index, value); + onChanged(); + } else { + assistantsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
            +     * All the customer's
            +     * [Assistant][google.cloud.discoveryengine.v1beta.Assistant]s.
            +     * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.Assistant assistants = 1; + */ + public Builder setAssistants( + int index, com.google.cloud.discoveryengine.v1beta.Assistant.Builder builderForValue) { + if (assistantsBuilder_ == null) { + ensureAssistantsIsMutable(); + assistants_.set(index, builderForValue.build()); + onChanged(); + } else { + assistantsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
            +     * All the customer's
            +     * [Assistant][google.cloud.discoveryengine.v1beta.Assistant]s.
            +     * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.Assistant assistants = 1; + */ + public Builder addAssistants(com.google.cloud.discoveryengine.v1beta.Assistant value) { + if (assistantsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAssistantsIsMutable(); + assistants_.add(value); + onChanged(); + } else { + assistantsBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
            +     * All the customer's
            +     * [Assistant][google.cloud.discoveryengine.v1beta.Assistant]s.
            +     * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.Assistant assistants = 1; + */ + public Builder addAssistants( + int index, com.google.cloud.discoveryengine.v1beta.Assistant value) { + if (assistantsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAssistantsIsMutable(); + assistants_.add(index, value); + onChanged(); + } else { + assistantsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
            +     * All the customer's
            +     * [Assistant][google.cloud.discoveryengine.v1beta.Assistant]s.
            +     * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.Assistant assistants = 1; + */ + public Builder addAssistants( + com.google.cloud.discoveryengine.v1beta.Assistant.Builder builderForValue) { + if (assistantsBuilder_ == null) { + ensureAssistantsIsMutable(); + assistants_.add(builderForValue.build()); + onChanged(); + } else { + assistantsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
            +     * All the customer's
            +     * [Assistant][google.cloud.discoveryengine.v1beta.Assistant]s.
            +     * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.Assistant assistants = 1; + */ + public Builder addAssistants( + int index, com.google.cloud.discoveryengine.v1beta.Assistant.Builder builderForValue) { + if (assistantsBuilder_ == null) { + ensureAssistantsIsMutable(); + assistants_.add(index, builderForValue.build()); + onChanged(); + } else { + assistantsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
            +     * All the customer's
            +     * [Assistant][google.cloud.discoveryengine.v1beta.Assistant]s.
            +     * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.Assistant assistants = 1; + */ + public Builder addAllAssistants( + java.lang.Iterable values) { + if (assistantsBuilder_ == null) { + ensureAssistantsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, assistants_); + onChanged(); + } else { + assistantsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
            +     * All the customer's
            +     * [Assistant][google.cloud.discoveryengine.v1beta.Assistant]s.
            +     * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.Assistant assistants = 1; + */ + public Builder clearAssistants() { + if (assistantsBuilder_ == null) { + assistants_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + assistantsBuilder_.clear(); + } + return this; + } + + /** + * + * + *
            +     * All the customer's
            +     * [Assistant][google.cloud.discoveryengine.v1beta.Assistant]s.
            +     * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.Assistant assistants = 1; + */ + public Builder removeAssistants(int index) { + if (assistantsBuilder_ == null) { + ensureAssistantsIsMutable(); + assistants_.remove(index); + onChanged(); + } else { + assistantsBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
            +     * All the customer's
            +     * [Assistant][google.cloud.discoveryengine.v1beta.Assistant]s.
            +     * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.Assistant assistants = 1; + */ + public com.google.cloud.discoveryengine.v1beta.Assistant.Builder getAssistantsBuilder( + int index) { + return internalGetAssistantsFieldBuilder().getBuilder(index); + } + + /** + * + * + *
            +     * All the customer's
            +     * [Assistant][google.cloud.discoveryengine.v1beta.Assistant]s.
            +     * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.Assistant assistants = 1; + */ + public com.google.cloud.discoveryengine.v1beta.AssistantOrBuilder getAssistantsOrBuilder( + int index) { + if (assistantsBuilder_ == null) { + return assistants_.get(index); + } else { + return assistantsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
            +     * All the customer's
            +     * [Assistant][google.cloud.discoveryengine.v1beta.Assistant]s.
            +     * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.Assistant assistants = 1; + */ + public java.util.List + getAssistantsOrBuilderList() { + if (assistantsBuilder_ != null) { + return assistantsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(assistants_); + } + } + + /** + * + * + *
            +     * All the customer's
            +     * [Assistant][google.cloud.discoveryengine.v1beta.Assistant]s.
            +     * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.Assistant assistants = 1; + */ + public com.google.cloud.discoveryengine.v1beta.Assistant.Builder addAssistantsBuilder() { + return internalGetAssistantsFieldBuilder() + .addBuilder(com.google.cloud.discoveryengine.v1beta.Assistant.getDefaultInstance()); + } + + /** + * + * + *
            +     * All the customer's
            +     * [Assistant][google.cloud.discoveryengine.v1beta.Assistant]s.
            +     * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.Assistant assistants = 1; + */ + public com.google.cloud.discoveryengine.v1beta.Assistant.Builder addAssistantsBuilder( + int index) { + return internalGetAssistantsFieldBuilder() + .addBuilder( + index, com.google.cloud.discoveryengine.v1beta.Assistant.getDefaultInstance()); + } + + /** + * + * + *
            +     * All the customer's
            +     * [Assistant][google.cloud.discoveryengine.v1beta.Assistant]s.
            +     * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.Assistant assistants = 1; + */ + public java.util.List + getAssistantsBuilderList() { + return internalGetAssistantsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.discoveryengine.v1beta.Assistant, + com.google.cloud.discoveryengine.v1beta.Assistant.Builder, + com.google.cloud.discoveryengine.v1beta.AssistantOrBuilder> + internalGetAssistantsFieldBuilder() { + if (assistantsBuilder_ == null) { + assistantsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.discoveryengine.v1beta.Assistant, + com.google.cloud.discoveryengine.v1beta.Assistant.Builder, + com.google.cloud.discoveryengine.v1beta.AssistantOrBuilder>( + assistants_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + assistants_ = null; + } + return assistantsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + + /** + * + * + *
            +     * A token that can be sent as
            +     * [ListAssistantsRequest.page_token][google.cloud.discoveryengine.v1beta.ListAssistantsRequest.page_token]
            +     * to retrieve the next page. If this field is omitted, 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 sent as
            +     * [ListAssistantsRequest.page_token][google.cloud.discoveryengine.v1beta.ListAssistantsRequest.page_token]
            +     * to retrieve the next page. If this field is omitted, 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 sent as
            +     * [ListAssistantsRequest.page_token][google.cloud.discoveryengine.v1beta.ListAssistantsRequest.page_token]
            +     * to retrieve the next page. If this field is omitted, 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 sent as
            +     * [ListAssistantsRequest.page_token][google.cloud.discoveryengine.v1beta.ListAssistantsRequest.page_token]
            +     * to retrieve the next page. If this field is omitted, 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 sent as
            +     * [ListAssistantsRequest.page_token][google.cloud.discoveryengine.v1beta.ListAssistantsRequest.page_token]
            +     * to retrieve the next page. If this field is omitted, 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.cloud.discoveryengine.v1beta.ListAssistantsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.ListAssistantsResponse) + private static final com.google.cloud.discoveryengine.v1beta.ListAssistantsResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.discoveryengine.v1beta.ListAssistantsResponse(); + } + + public static com.google.cloud.discoveryengine.v1beta.ListAssistantsResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListAssistantsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.ListAssistantsResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ListAssistantsResponseOrBuilder.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ListAssistantsResponseOrBuilder.java new file mode 100644 index 000000000000..2472e567004d --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ListAssistantsResponseOrBuilder.java @@ -0,0 +1,121 @@ +/* + * 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/cloud/discoveryengine/v1beta/assistant_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.discoveryengine.v1beta; + +@com.google.protobuf.Generated +public interface ListAssistantsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.ListAssistantsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
            +   * All the customer's
            +   * [Assistant][google.cloud.discoveryengine.v1beta.Assistant]s.
            +   * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.Assistant assistants = 1; + */ + java.util.List getAssistantsList(); + + /** + * + * + *
            +   * All the customer's
            +   * [Assistant][google.cloud.discoveryengine.v1beta.Assistant]s.
            +   * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.Assistant assistants = 1; + */ + com.google.cloud.discoveryengine.v1beta.Assistant getAssistants(int index); + + /** + * + * + *
            +   * All the customer's
            +   * [Assistant][google.cloud.discoveryengine.v1beta.Assistant]s.
            +   * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.Assistant assistants = 1; + */ + int getAssistantsCount(); + + /** + * + * + *
            +   * All the customer's
            +   * [Assistant][google.cloud.discoveryengine.v1beta.Assistant]s.
            +   * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.Assistant assistants = 1; + */ + java.util.List + getAssistantsOrBuilderList(); + + /** + * + * + *
            +   * All the customer's
            +   * [Assistant][google.cloud.discoveryengine.v1beta.Assistant]s.
            +   * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.Assistant assistants = 1; + */ + com.google.cloud.discoveryengine.v1beta.AssistantOrBuilder getAssistantsOrBuilder(int index); + + /** + * + * + *
            +   * A token that can be sent as
            +   * [ListAssistantsRequest.page_token][google.cloud.discoveryengine.v1beta.ListAssistantsRequest.page_token]
            +   * to retrieve the next page. If this field is omitted, there are no
            +   * subsequent pages.
            +   * 
            + * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + + /** + * + * + *
            +   * A token that can be sent as
            +   * [ListAssistantsRequest.page_token][google.cloud.discoveryengine.v1beta.ListAssistantsRequest.page_token]
            +   * to retrieve the next page. If this field is omitted, there are no
            +   * subsequent pages.
            +   * 
            + * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ListCmekConfigsRequest.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ListCmekConfigsRequest.java new file mode 100644 index 000000000000..85291790de2b --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ListCmekConfigsRequest.java @@ -0,0 +1,663 @@ +/* + * 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/cloud/discoveryengine/v1beta/cmek_config_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.discoveryengine.v1beta; + +/** + * + * + *
            + * Request message for
            + * [CmekConfigService.ListCmekConfigs][google.cloud.discoveryengine.v1beta.CmekConfigService.ListCmekConfigs]
            + * method.
            + * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.ListCmekConfigsRequest} + */ +@com.google.protobuf.Generated +public final class ListCmekConfigsRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.ListCmekConfigsRequest) + ListCmekConfigsRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ListCmekConfigsRequest"); + } + + // Use ListCmekConfigsRequest.newBuilder() to construct. + private ListCmekConfigsRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ListCmekConfigsRequest() { + parent_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.CmekConfigServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_ListCmekConfigsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.CmekConfigServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_ListCmekConfigsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.ListCmekConfigsRequest.class, + com.google.cloud.discoveryengine.v1beta.ListCmekConfigsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + + /** + * + * + *
            +   * Required. The parent location resource name, such as
            +   * `projects/{project}/locations/{location}`.
            +   *
            +   * If the caller does not have permission to list
            +   * [CmekConfig][google.cloud.discoveryengine.v1beta.CmekConfig]s under this
            +   * location, regardless of whether or not a CmekConfig exists, a
            +   * PERMISSION_DENIED error is returned.
            +   * 
            + * + * + * 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 parent location resource name, such as
            +   * `projects/{project}/locations/{location}`.
            +   *
            +   * If the caller does not have permission to list
            +   * [CmekConfig][google.cloud.discoveryengine.v1beta.CmekConfig]s under this
            +   * location, regardless of whether or not a CmekConfig exists, a
            +   * PERMISSION_DENIED error is returned.
            +   * 
            + * + * + * 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; + } + } + + 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_); + } + 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_); + } + 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.discoveryengine.v1beta.ListCmekConfigsRequest)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1beta.ListCmekConfigsRequest other = + (com.google.cloud.discoveryengine.v1beta.ListCmekConfigsRequest) obj; + + if (!getParent().equals(other.getParent())) 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 = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1beta.ListCmekConfigsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.ListCmekConfigsRequest 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.discoveryengine.v1beta.ListCmekConfigsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.ListCmekConfigsRequest 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.discoveryengine.v1beta.ListCmekConfigsRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.ListCmekConfigsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1beta.ListCmekConfigsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.ListCmekConfigsRequest 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.discoveryengine.v1beta.ListCmekConfigsRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.ListCmekConfigsRequest 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.discoveryengine.v1beta.ListCmekConfigsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.ListCmekConfigsRequest 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.discoveryengine.v1beta.ListCmekConfigsRequest 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
            +   * [CmekConfigService.ListCmekConfigs][google.cloud.discoveryengine.v1beta.CmekConfigService.ListCmekConfigs]
            +   * method.
            +   * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.ListCmekConfigsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.ListCmekConfigsRequest) + com.google.cloud.discoveryengine.v1beta.ListCmekConfigsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.CmekConfigServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_ListCmekConfigsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.CmekConfigServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_ListCmekConfigsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.ListCmekConfigsRequest.class, + com.google.cloud.discoveryengine.v1beta.ListCmekConfigsRequest.Builder.class); + } + + // Construct using com.google.cloud.discoveryengine.v1beta.ListCmekConfigsRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1beta.CmekConfigServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_ListCmekConfigsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.ListCmekConfigsRequest + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1beta.ListCmekConfigsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.ListCmekConfigsRequest build() { + com.google.cloud.discoveryengine.v1beta.ListCmekConfigsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.ListCmekConfigsRequest buildPartial() { + com.google.cloud.discoveryengine.v1beta.ListCmekConfigsRequest result = + new com.google.cloud.discoveryengine.v1beta.ListCmekConfigsRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.discoveryengine.v1beta.ListCmekConfigsRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.discoveryengine.v1beta.ListCmekConfigsRequest) { + return mergeFrom((com.google.cloud.discoveryengine.v1beta.ListCmekConfigsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.discoveryengine.v1beta.ListCmekConfigsRequest other) { + if (other + == com.google.cloud.discoveryengine.v1beta.ListCmekConfigsRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + + /** + * + * + *
            +     * Required. The parent location resource name, such as
            +     * `projects/{project}/locations/{location}`.
            +     *
            +     * If the caller does not have permission to list
            +     * [CmekConfig][google.cloud.discoveryengine.v1beta.CmekConfig]s under this
            +     * location, regardless of whether or not a CmekConfig exists, a
            +     * PERMISSION_DENIED error is returned.
            +     * 
            + * + * + * 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 parent location resource name, such as
            +     * `projects/{project}/locations/{location}`.
            +     *
            +     * If the caller does not have permission to list
            +     * [CmekConfig][google.cloud.discoveryengine.v1beta.CmekConfig]s under this
            +     * location, regardless of whether or not a CmekConfig exists, a
            +     * PERMISSION_DENIED error is returned.
            +     * 
            + * + * + * 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 parent location resource name, such as
            +     * `projects/{project}/locations/{location}`.
            +     *
            +     * If the caller does not have permission to list
            +     * [CmekConfig][google.cloud.discoveryengine.v1beta.CmekConfig]s under this
            +     * location, regardless of whether or not a CmekConfig exists, a
            +     * PERMISSION_DENIED error is returned.
            +     * 
            + * + * + * 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 parent location resource name, such as
            +     * `projects/{project}/locations/{location}`.
            +     *
            +     * If the caller does not have permission to list
            +     * [CmekConfig][google.cloud.discoveryengine.v1beta.CmekConfig]s under this
            +     * location, regardless of whether or not a CmekConfig exists, a
            +     * PERMISSION_DENIED error is returned.
            +     * 
            + * + * + * 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 parent location resource name, such as
            +     * `projects/{project}/locations/{location}`.
            +     *
            +     * If the caller does not have permission to list
            +     * [CmekConfig][google.cloud.discoveryengine.v1beta.CmekConfig]s under this
            +     * location, regardless of whether or not a CmekConfig exists, a
            +     * PERMISSION_DENIED error is returned.
            +     * 
            + * + * + * 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; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.ListCmekConfigsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.ListCmekConfigsRequest) + private static final com.google.cloud.discoveryengine.v1beta.ListCmekConfigsRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.discoveryengine.v1beta.ListCmekConfigsRequest(); + } + + public static com.google.cloud.discoveryengine.v1beta.ListCmekConfigsRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListCmekConfigsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.ListCmekConfigsRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ListCmekConfigsRequestOrBuilder.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ListCmekConfigsRequestOrBuilder.java new file mode 100644 index 000000000000..2a6811978b5c --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ListCmekConfigsRequestOrBuilder.java @@ -0,0 +1,70 @@ +/* + * 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/cloud/discoveryengine/v1beta/cmek_config_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.discoveryengine.v1beta; + +@com.google.protobuf.Generated +public interface ListCmekConfigsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.ListCmekConfigsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
            +   * Required. The parent location resource name, such as
            +   * `projects/{project}/locations/{location}`.
            +   *
            +   * If the caller does not have permission to list
            +   * [CmekConfig][google.cloud.discoveryengine.v1beta.CmekConfig]s under this
            +   * location, regardless of whether or not a CmekConfig exists, a
            +   * PERMISSION_DENIED error is returned.
            +   * 
            + * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + + /** + * + * + *
            +   * Required. The parent location resource name, such as
            +   * `projects/{project}/locations/{location}`.
            +   *
            +   * If the caller does not have permission to list
            +   * [CmekConfig][google.cloud.discoveryengine.v1beta.CmekConfig]s under this
            +   * location, regardless of whether or not a CmekConfig exists, a
            +   * PERMISSION_DENIED error is returned.
            +   * 
            + * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ListCmekConfigsResponse.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ListCmekConfigsResponse.java new file mode 100644 index 000000000000..09cff5f8924d --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ListCmekConfigsResponse.java @@ -0,0 +1,968 @@ +/* + * 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/cloud/discoveryengine/v1beta/cmek_config_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.discoveryengine.v1beta; + +/** + * + * + *
            + * Response message for
            + * [CmekConfigService.ListCmekConfigs][google.cloud.discoveryengine.v1beta.CmekConfigService.ListCmekConfigs]
            + * method.
            + * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.ListCmekConfigsResponse} + */ +@com.google.protobuf.Generated +public final class ListCmekConfigsResponse extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.ListCmekConfigsResponse) + ListCmekConfigsResponseOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ListCmekConfigsResponse"); + } + + // Use ListCmekConfigsResponse.newBuilder() to construct. + private ListCmekConfigsResponse(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ListCmekConfigsResponse() { + cmekConfigs_ = java.util.Collections.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.CmekConfigServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_ListCmekConfigsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.CmekConfigServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_ListCmekConfigsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.ListCmekConfigsResponse.class, + com.google.cloud.discoveryengine.v1beta.ListCmekConfigsResponse.Builder.class); + } + + public static final int CMEK_CONFIGS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List cmekConfigs_; + + /** + * + * + *
            +   * All the customer's
            +   * [CmekConfig][google.cloud.discoveryengine.v1beta.CmekConfig]s.
            +   * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.CmekConfig cmek_configs = 1; + */ + @java.lang.Override + public java.util.List getCmekConfigsList() { + return cmekConfigs_; + } + + /** + * + * + *
            +   * All the customer's
            +   * [CmekConfig][google.cloud.discoveryengine.v1beta.CmekConfig]s.
            +   * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.CmekConfig cmek_configs = 1; + */ + @java.lang.Override + public java.util.List + getCmekConfigsOrBuilderList() { + return cmekConfigs_; + } + + /** + * + * + *
            +   * All the customer's
            +   * [CmekConfig][google.cloud.discoveryengine.v1beta.CmekConfig]s.
            +   * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.CmekConfig cmek_configs = 1; + */ + @java.lang.Override + public int getCmekConfigsCount() { + return cmekConfigs_.size(); + } + + /** + * + * + *
            +   * All the customer's
            +   * [CmekConfig][google.cloud.discoveryengine.v1beta.CmekConfig]s.
            +   * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.CmekConfig cmek_configs = 1; + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.CmekConfig getCmekConfigs(int index) { + return cmekConfigs_.get(index); + } + + /** + * + * + *
            +   * All the customer's
            +   * [CmekConfig][google.cloud.discoveryengine.v1beta.CmekConfig]s.
            +   * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.CmekConfig cmek_configs = 1; + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.CmekConfigOrBuilder getCmekConfigsOrBuilder( + int index) { + return cmekConfigs_.get(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 { + for (int i = 0; i < cmekConfigs_.size(); i++) { + output.writeMessage(1, cmekConfigs_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < cmekConfigs_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, cmekConfigs_.get(i)); + } + 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.discoveryengine.v1beta.ListCmekConfigsResponse)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1beta.ListCmekConfigsResponse other = + (com.google.cloud.discoveryengine.v1beta.ListCmekConfigsResponse) obj; + + if (!getCmekConfigsList().equals(other.getCmekConfigsList())) 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 (getCmekConfigsCount() > 0) { + hash = (37 * hash) + CMEK_CONFIGS_FIELD_NUMBER; + hash = (53 * hash) + getCmekConfigsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1beta.ListCmekConfigsResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.ListCmekConfigsResponse 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.discoveryengine.v1beta.ListCmekConfigsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.ListCmekConfigsResponse 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.discoveryengine.v1beta.ListCmekConfigsResponse parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.ListCmekConfigsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1beta.ListCmekConfigsResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.ListCmekConfigsResponse 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.discoveryengine.v1beta.ListCmekConfigsResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.ListCmekConfigsResponse 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.discoveryengine.v1beta.ListCmekConfigsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.ListCmekConfigsResponse 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.discoveryengine.v1beta.ListCmekConfigsResponse 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
            +   * [CmekConfigService.ListCmekConfigs][google.cloud.discoveryengine.v1beta.CmekConfigService.ListCmekConfigs]
            +   * method.
            +   * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.ListCmekConfigsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.ListCmekConfigsResponse) + com.google.cloud.discoveryengine.v1beta.ListCmekConfigsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.CmekConfigServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_ListCmekConfigsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.CmekConfigServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_ListCmekConfigsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.ListCmekConfigsResponse.class, + com.google.cloud.discoveryengine.v1beta.ListCmekConfigsResponse.Builder.class); + } + + // Construct using com.google.cloud.discoveryengine.v1beta.ListCmekConfigsResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (cmekConfigsBuilder_ == null) { + cmekConfigs_ = java.util.Collections.emptyList(); + } else { + cmekConfigs_ = null; + cmekConfigsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1beta.CmekConfigServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_ListCmekConfigsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.ListCmekConfigsResponse + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1beta.ListCmekConfigsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.ListCmekConfigsResponse build() { + com.google.cloud.discoveryengine.v1beta.ListCmekConfigsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.ListCmekConfigsResponse buildPartial() { + com.google.cloud.discoveryengine.v1beta.ListCmekConfigsResponse result = + new com.google.cloud.discoveryengine.v1beta.ListCmekConfigsResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.discoveryengine.v1beta.ListCmekConfigsResponse result) { + if (cmekConfigsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + cmekConfigs_ = java.util.Collections.unmodifiableList(cmekConfigs_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.cmekConfigs_ = cmekConfigs_; + } else { + result.cmekConfigs_ = cmekConfigsBuilder_.build(); + } + } + + private void buildPartial0( + com.google.cloud.discoveryengine.v1beta.ListCmekConfigsResponse result) { + int from_bitField0_ = bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.discoveryengine.v1beta.ListCmekConfigsResponse) { + return mergeFrom((com.google.cloud.discoveryengine.v1beta.ListCmekConfigsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1beta.ListCmekConfigsResponse other) { + if (other + == com.google.cloud.discoveryengine.v1beta.ListCmekConfigsResponse.getDefaultInstance()) + return this; + if (cmekConfigsBuilder_ == null) { + if (!other.cmekConfigs_.isEmpty()) { + if (cmekConfigs_.isEmpty()) { + cmekConfigs_ = other.cmekConfigs_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureCmekConfigsIsMutable(); + cmekConfigs_.addAll(other.cmekConfigs_); + } + onChanged(); + } + } else { + if (!other.cmekConfigs_.isEmpty()) { + if (cmekConfigsBuilder_.isEmpty()) { + cmekConfigsBuilder_.dispose(); + cmekConfigsBuilder_ = null; + cmekConfigs_ = other.cmekConfigs_; + bitField0_ = (bitField0_ & ~0x00000001); + cmekConfigsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetCmekConfigsFieldBuilder() + : null; + } else { + cmekConfigsBuilder_.addAllMessages(other.cmekConfigs_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.discoveryengine.v1beta.CmekConfig m = + input.readMessage( + com.google.cloud.discoveryengine.v1beta.CmekConfig.parser(), + extensionRegistry); + if (cmekConfigsBuilder_ == null) { + ensureCmekConfigsIsMutable(); + cmekConfigs_.add(m); + } else { + cmekConfigsBuilder_.addMessage(m); + } + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List cmekConfigs_ = + java.util.Collections.emptyList(); + + private void ensureCmekConfigsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + cmekConfigs_ = + new java.util.ArrayList( + cmekConfigs_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.discoveryengine.v1beta.CmekConfig, + com.google.cloud.discoveryengine.v1beta.CmekConfig.Builder, + com.google.cloud.discoveryengine.v1beta.CmekConfigOrBuilder> + cmekConfigsBuilder_; + + /** + * + * + *
            +     * All the customer's
            +     * [CmekConfig][google.cloud.discoveryengine.v1beta.CmekConfig]s.
            +     * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.CmekConfig cmek_configs = 1; + */ + public java.util.List getCmekConfigsList() { + if (cmekConfigsBuilder_ == null) { + return java.util.Collections.unmodifiableList(cmekConfigs_); + } else { + return cmekConfigsBuilder_.getMessageList(); + } + } + + /** + * + * + *
            +     * All the customer's
            +     * [CmekConfig][google.cloud.discoveryengine.v1beta.CmekConfig]s.
            +     * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.CmekConfig cmek_configs = 1; + */ + public int getCmekConfigsCount() { + if (cmekConfigsBuilder_ == null) { + return cmekConfigs_.size(); + } else { + return cmekConfigsBuilder_.getCount(); + } + } + + /** + * + * + *
            +     * All the customer's
            +     * [CmekConfig][google.cloud.discoveryengine.v1beta.CmekConfig]s.
            +     * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.CmekConfig cmek_configs = 1; + */ + public com.google.cloud.discoveryengine.v1beta.CmekConfig getCmekConfigs(int index) { + if (cmekConfigsBuilder_ == null) { + return cmekConfigs_.get(index); + } else { + return cmekConfigsBuilder_.getMessage(index); + } + } + + /** + * + * + *
            +     * All the customer's
            +     * [CmekConfig][google.cloud.discoveryengine.v1beta.CmekConfig]s.
            +     * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.CmekConfig cmek_configs = 1; + */ + public Builder setCmekConfigs( + int index, com.google.cloud.discoveryengine.v1beta.CmekConfig value) { + if (cmekConfigsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCmekConfigsIsMutable(); + cmekConfigs_.set(index, value); + onChanged(); + } else { + cmekConfigsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
            +     * All the customer's
            +     * [CmekConfig][google.cloud.discoveryengine.v1beta.CmekConfig]s.
            +     * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.CmekConfig cmek_configs = 1; + */ + public Builder setCmekConfigs( + int index, com.google.cloud.discoveryengine.v1beta.CmekConfig.Builder builderForValue) { + if (cmekConfigsBuilder_ == null) { + ensureCmekConfigsIsMutable(); + cmekConfigs_.set(index, builderForValue.build()); + onChanged(); + } else { + cmekConfigsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
            +     * All the customer's
            +     * [CmekConfig][google.cloud.discoveryengine.v1beta.CmekConfig]s.
            +     * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.CmekConfig cmek_configs = 1; + */ + public Builder addCmekConfigs(com.google.cloud.discoveryengine.v1beta.CmekConfig value) { + if (cmekConfigsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCmekConfigsIsMutable(); + cmekConfigs_.add(value); + onChanged(); + } else { + cmekConfigsBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
            +     * All the customer's
            +     * [CmekConfig][google.cloud.discoveryengine.v1beta.CmekConfig]s.
            +     * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.CmekConfig cmek_configs = 1; + */ + public Builder addCmekConfigs( + int index, com.google.cloud.discoveryengine.v1beta.CmekConfig value) { + if (cmekConfigsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCmekConfigsIsMutable(); + cmekConfigs_.add(index, value); + onChanged(); + } else { + cmekConfigsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
            +     * All the customer's
            +     * [CmekConfig][google.cloud.discoveryengine.v1beta.CmekConfig]s.
            +     * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.CmekConfig cmek_configs = 1; + */ + public Builder addCmekConfigs( + com.google.cloud.discoveryengine.v1beta.CmekConfig.Builder builderForValue) { + if (cmekConfigsBuilder_ == null) { + ensureCmekConfigsIsMutable(); + cmekConfigs_.add(builderForValue.build()); + onChanged(); + } else { + cmekConfigsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
            +     * All the customer's
            +     * [CmekConfig][google.cloud.discoveryengine.v1beta.CmekConfig]s.
            +     * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.CmekConfig cmek_configs = 1; + */ + public Builder addCmekConfigs( + int index, com.google.cloud.discoveryengine.v1beta.CmekConfig.Builder builderForValue) { + if (cmekConfigsBuilder_ == null) { + ensureCmekConfigsIsMutable(); + cmekConfigs_.add(index, builderForValue.build()); + onChanged(); + } else { + cmekConfigsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
            +     * All the customer's
            +     * [CmekConfig][google.cloud.discoveryengine.v1beta.CmekConfig]s.
            +     * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.CmekConfig cmek_configs = 1; + */ + public Builder addAllCmekConfigs( + java.lang.Iterable values) { + if (cmekConfigsBuilder_ == null) { + ensureCmekConfigsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, cmekConfigs_); + onChanged(); + } else { + cmekConfigsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
            +     * All the customer's
            +     * [CmekConfig][google.cloud.discoveryengine.v1beta.CmekConfig]s.
            +     * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.CmekConfig cmek_configs = 1; + */ + public Builder clearCmekConfigs() { + if (cmekConfigsBuilder_ == null) { + cmekConfigs_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + cmekConfigsBuilder_.clear(); + } + return this; + } + + /** + * + * + *
            +     * All the customer's
            +     * [CmekConfig][google.cloud.discoveryengine.v1beta.CmekConfig]s.
            +     * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.CmekConfig cmek_configs = 1; + */ + public Builder removeCmekConfigs(int index) { + if (cmekConfigsBuilder_ == null) { + ensureCmekConfigsIsMutable(); + cmekConfigs_.remove(index); + onChanged(); + } else { + cmekConfigsBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
            +     * All the customer's
            +     * [CmekConfig][google.cloud.discoveryengine.v1beta.CmekConfig]s.
            +     * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.CmekConfig cmek_configs = 1; + */ + public com.google.cloud.discoveryengine.v1beta.CmekConfig.Builder getCmekConfigsBuilder( + int index) { + return internalGetCmekConfigsFieldBuilder().getBuilder(index); + } + + /** + * + * + *
            +     * All the customer's
            +     * [CmekConfig][google.cloud.discoveryengine.v1beta.CmekConfig]s.
            +     * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.CmekConfig cmek_configs = 1; + */ + public com.google.cloud.discoveryengine.v1beta.CmekConfigOrBuilder getCmekConfigsOrBuilder( + int index) { + if (cmekConfigsBuilder_ == null) { + return cmekConfigs_.get(index); + } else { + return cmekConfigsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
            +     * All the customer's
            +     * [CmekConfig][google.cloud.discoveryengine.v1beta.CmekConfig]s.
            +     * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.CmekConfig cmek_configs = 1; + */ + public java.util.List + getCmekConfigsOrBuilderList() { + if (cmekConfigsBuilder_ != null) { + return cmekConfigsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(cmekConfigs_); + } + } + + /** + * + * + *
            +     * All the customer's
            +     * [CmekConfig][google.cloud.discoveryengine.v1beta.CmekConfig]s.
            +     * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.CmekConfig cmek_configs = 1; + */ + public com.google.cloud.discoveryengine.v1beta.CmekConfig.Builder addCmekConfigsBuilder() { + return internalGetCmekConfigsFieldBuilder() + .addBuilder(com.google.cloud.discoveryengine.v1beta.CmekConfig.getDefaultInstance()); + } + + /** + * + * + *
            +     * All the customer's
            +     * [CmekConfig][google.cloud.discoveryengine.v1beta.CmekConfig]s.
            +     * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.CmekConfig cmek_configs = 1; + */ + public com.google.cloud.discoveryengine.v1beta.CmekConfig.Builder addCmekConfigsBuilder( + int index) { + return internalGetCmekConfigsFieldBuilder() + .addBuilder( + index, com.google.cloud.discoveryengine.v1beta.CmekConfig.getDefaultInstance()); + } + + /** + * + * + *
            +     * All the customer's
            +     * [CmekConfig][google.cloud.discoveryengine.v1beta.CmekConfig]s.
            +     * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.CmekConfig cmek_configs = 1; + */ + public java.util.List + getCmekConfigsBuilderList() { + return internalGetCmekConfigsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.discoveryengine.v1beta.CmekConfig, + com.google.cloud.discoveryengine.v1beta.CmekConfig.Builder, + com.google.cloud.discoveryengine.v1beta.CmekConfigOrBuilder> + internalGetCmekConfigsFieldBuilder() { + if (cmekConfigsBuilder_ == null) { + cmekConfigsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.discoveryengine.v1beta.CmekConfig, + com.google.cloud.discoveryengine.v1beta.CmekConfig.Builder, + com.google.cloud.discoveryengine.v1beta.CmekConfigOrBuilder>( + cmekConfigs_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + cmekConfigs_ = null; + } + return cmekConfigsBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.ListCmekConfigsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.ListCmekConfigsResponse) + private static final com.google.cloud.discoveryengine.v1beta.ListCmekConfigsResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.discoveryengine.v1beta.ListCmekConfigsResponse(); + } + + public static com.google.cloud.discoveryengine.v1beta.ListCmekConfigsResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListCmekConfigsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.ListCmekConfigsResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ListCmekConfigsResponseOrBuilder.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ListCmekConfigsResponseOrBuilder.java new file mode 100644 index 000000000000..77726fd65ec6 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ListCmekConfigsResponseOrBuilder.java @@ -0,0 +1,89 @@ +/* + * 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/cloud/discoveryengine/v1beta/cmek_config_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.discoveryengine.v1beta; + +@com.google.protobuf.Generated +public interface ListCmekConfigsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.ListCmekConfigsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
            +   * All the customer's
            +   * [CmekConfig][google.cloud.discoveryengine.v1beta.CmekConfig]s.
            +   * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.CmekConfig cmek_configs = 1; + */ + java.util.List getCmekConfigsList(); + + /** + * + * + *
            +   * All the customer's
            +   * [CmekConfig][google.cloud.discoveryengine.v1beta.CmekConfig]s.
            +   * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.CmekConfig cmek_configs = 1; + */ + com.google.cloud.discoveryengine.v1beta.CmekConfig getCmekConfigs(int index); + + /** + * + * + *
            +   * All the customer's
            +   * [CmekConfig][google.cloud.discoveryengine.v1beta.CmekConfig]s.
            +   * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.CmekConfig cmek_configs = 1; + */ + int getCmekConfigsCount(); + + /** + * + * + *
            +   * All the customer's
            +   * [CmekConfig][google.cloud.discoveryengine.v1beta.CmekConfig]s.
            +   * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.CmekConfig cmek_configs = 1; + */ + java.util.List + getCmekConfigsOrBuilderList(); + + /** + * + * + *
            +   * All the customer's
            +   * [CmekConfig][google.cloud.discoveryengine.v1beta.CmekConfig]s.
            +   * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.CmekConfig cmek_configs = 1; + */ + com.google.cloud.discoveryengine.v1beta.CmekConfigOrBuilder getCmekConfigsOrBuilder(int index); +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ListEvaluationResultsRequest.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ListEvaluationResultsRequest.java index 23856b96ac12..49bbb84241a8 100644 --- a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ListEvaluationResultsRequest.java +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ListEvaluationResultsRequest.java @@ -85,9 +85,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * Required. The evaluation resource name, such as * `projects/{project}/locations/{location}/evaluations/{evaluation}`. * - * If the caller does not have permission to list [EvaluationResult][] - * under this evaluation, regardless of whether or not this evaluation - * set exists, a `PERMISSION_DENIED` error is returned. + * If the caller does not have permission to list + * [ListEvaluationResultsResponse.EvaluationResult][google.cloud.discoveryengine.v1beta.ListEvaluationResultsResponse.EvaluationResult] + * under this evaluation, regardless of whether or not this evaluation set + * exists, a `PERMISSION_DENIED` error is returned. * * * @@ -116,9 +117,10 @@ public java.lang.String getEvaluation() { * Required. The evaluation resource name, such as * `projects/{project}/locations/{location}/evaluations/{evaluation}`. * - * If the caller does not have permission to list [EvaluationResult][] - * under this evaluation, regardless of whether or not this evaluation - * set exists, a `PERMISSION_DENIED` error is returned. + * If the caller does not have permission to list + * [ListEvaluationResultsResponse.EvaluationResult][google.cloud.discoveryengine.v1beta.ListEvaluationResultsResponse.EvaluationResult] + * under this evaluation, regardless of whether or not this evaluation set + * exists, a `PERMISSION_DENIED` error is returned. * * * @@ -147,14 +149,15 @@ public com.google.protobuf.ByteString getEvaluationBytes() { * * *
            -   * Maximum number of [EvaluationResult][] to return. If unspecified,
            -   * defaults to 100. The maximum allowed value is 1000. Values above 1000 will
            -   * be coerced to 1000.
            +   * Optional. Maximum number of
            +   * [ListEvaluationResultsResponse.EvaluationResult][google.cloud.discoveryengine.v1beta.ListEvaluationResultsResponse.EvaluationResult]
            +   * to return. If unspecified, defaults to 100. The maximum allowed value is
            +   * 1000. Values above 1000 will be coerced to 1000.
                *
                * If this field is negative, an `INVALID_ARGUMENT` error is returned.
                * 
            * - * int32 page_size = 2; + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return The pageSize. */ @@ -172,7 +175,7 @@ public int getPageSize() { * * *
            -   * A page token
            +   * Optional. A page token
                * [ListEvaluationResultsResponse.next_page_token][google.cloud.discoveryengine.v1beta.ListEvaluationResultsResponse.next_page_token],
                * received from a previous
                * [EvaluationService.ListEvaluationResults][google.cloud.discoveryengine.v1beta.EvaluationService.ListEvaluationResults]
            @@ -184,7 +187,7 @@ public int getPageSize() {
                * `INVALID_ARGUMENT` error is returned.
                * 
            * - * string page_token = 3; + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @return The pageToken. */ @@ -205,7 +208,7 @@ public java.lang.String getPageToken() { * * *
            -   * A page token
            +   * Optional. A page token
                * [ListEvaluationResultsResponse.next_page_token][google.cloud.discoveryengine.v1beta.ListEvaluationResultsResponse.next_page_token],
                * received from a previous
                * [EvaluationService.ListEvaluationResults][google.cloud.discoveryengine.v1beta.EvaluationService.ListEvaluationResults]
            @@ -217,7 +220,7 @@ public java.lang.String getPageToken() {
                * `INVALID_ARGUMENT` error is returned.
                * 
            * - * string page_token = 3; + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for pageToken. */ @@ -610,9 +613,10 @@ public Builder mergeFrom( * Required. The evaluation resource name, such as * `projects/{project}/locations/{location}/evaluations/{evaluation}`. * - * If the caller does not have permission to list [EvaluationResult][] - * under this evaluation, regardless of whether or not this evaluation - * set exists, a `PERMISSION_DENIED` error is returned. + * If the caller does not have permission to list + * [ListEvaluationResultsResponse.EvaluationResult][google.cloud.discoveryengine.v1beta.ListEvaluationResultsResponse.EvaluationResult] + * under this evaluation, regardless of whether or not this evaluation set + * exists, a `PERMISSION_DENIED` error is returned. * * * @@ -640,9 +644,10 @@ public java.lang.String getEvaluation() { * Required. The evaluation resource name, such as * `projects/{project}/locations/{location}/evaluations/{evaluation}`. * - * If the caller does not have permission to list [EvaluationResult][] - * under this evaluation, regardless of whether or not this evaluation - * set exists, a `PERMISSION_DENIED` error is returned. + * If the caller does not have permission to list + * [ListEvaluationResultsResponse.EvaluationResult][google.cloud.discoveryengine.v1beta.ListEvaluationResultsResponse.EvaluationResult] + * under this evaluation, regardless of whether or not this evaluation set + * exists, a `PERMISSION_DENIED` error is returned. * * * @@ -670,9 +675,10 @@ public com.google.protobuf.ByteString getEvaluationBytes() { * Required. The evaluation resource name, such as * `projects/{project}/locations/{location}/evaluations/{evaluation}`. * - * If the caller does not have permission to list [EvaluationResult][] - * under this evaluation, regardless of whether or not this evaluation - * set exists, a `PERMISSION_DENIED` error is returned. + * If the caller does not have permission to list + * [ListEvaluationResultsResponse.EvaluationResult][google.cloud.discoveryengine.v1beta.ListEvaluationResultsResponse.EvaluationResult] + * under this evaluation, regardless of whether or not this evaluation set + * exists, a `PERMISSION_DENIED` error is returned. * * * @@ -699,9 +705,10 @@ public Builder setEvaluation(java.lang.String value) { * Required. The evaluation resource name, such as * `projects/{project}/locations/{location}/evaluations/{evaluation}`. * - * If the caller does not have permission to list [EvaluationResult][] - * under this evaluation, regardless of whether or not this evaluation - * set exists, a `PERMISSION_DENIED` error is returned. + * If the caller does not have permission to list + * [ListEvaluationResultsResponse.EvaluationResult][google.cloud.discoveryengine.v1beta.ListEvaluationResultsResponse.EvaluationResult] + * under this evaluation, regardless of whether or not this evaluation set + * exists, a `PERMISSION_DENIED` error is returned. * * * @@ -724,9 +731,10 @@ public Builder clearEvaluation() { * Required. The evaluation resource name, such as * `projects/{project}/locations/{location}/evaluations/{evaluation}`. * - * If the caller does not have permission to list [EvaluationResult][] - * under this evaluation, regardless of whether or not this evaluation - * set exists, a `PERMISSION_DENIED` error is returned. + * If the caller does not have permission to list + * [ListEvaluationResultsResponse.EvaluationResult][google.cloud.discoveryengine.v1beta.ListEvaluationResultsResponse.EvaluationResult] + * under this evaluation, regardless of whether or not this evaluation set + * exists, a `PERMISSION_DENIED` error is returned. * * * @@ -753,14 +761,15 @@ public Builder setEvaluationBytes(com.google.protobuf.ByteString value) { * * *
            -     * Maximum number of [EvaluationResult][] to return. If unspecified,
            -     * defaults to 100. The maximum allowed value is 1000. Values above 1000 will
            -     * be coerced to 1000.
            +     * Optional. Maximum number of
            +     * [ListEvaluationResultsResponse.EvaluationResult][google.cloud.discoveryengine.v1beta.ListEvaluationResultsResponse.EvaluationResult]
            +     * to return. If unspecified, defaults to 100. The maximum allowed value is
            +     * 1000. Values above 1000 will be coerced to 1000.
                  *
                  * If this field is negative, an `INVALID_ARGUMENT` error is returned.
                  * 
            * - * int32 page_size = 2; + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return The pageSize. */ @@ -773,14 +782,15 @@ public int getPageSize() { * * *
            -     * Maximum number of [EvaluationResult][] to return. If unspecified,
            -     * defaults to 100. The maximum allowed value is 1000. Values above 1000 will
            -     * be coerced to 1000.
            +     * Optional. Maximum number of
            +     * [ListEvaluationResultsResponse.EvaluationResult][google.cloud.discoveryengine.v1beta.ListEvaluationResultsResponse.EvaluationResult]
            +     * to return. If unspecified, defaults to 100. The maximum allowed value is
            +     * 1000. Values above 1000 will be coerced to 1000.
                  *
                  * If this field is negative, an `INVALID_ARGUMENT` error is returned.
                  * 
            * - * int32 page_size = 2; + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The pageSize to set. * @return This builder for chaining. @@ -797,14 +807,15 @@ public Builder setPageSize(int value) { * * *
            -     * Maximum number of [EvaluationResult][] to return. If unspecified,
            -     * defaults to 100. The maximum allowed value is 1000. Values above 1000 will
            -     * be coerced to 1000.
            +     * Optional. Maximum number of
            +     * [ListEvaluationResultsResponse.EvaluationResult][google.cloud.discoveryengine.v1beta.ListEvaluationResultsResponse.EvaluationResult]
            +     * to return. If unspecified, defaults to 100. The maximum allowed value is
            +     * 1000. Values above 1000 will be coerced to 1000.
                  *
                  * If this field is negative, an `INVALID_ARGUMENT` error is returned.
                  * 
            * - * int32 page_size = 2; + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return This builder for chaining. */ @@ -821,7 +832,7 @@ public Builder clearPageSize() { * * *
            -     * A page token
            +     * Optional. A page token
                  * [ListEvaluationResultsResponse.next_page_token][google.cloud.discoveryengine.v1beta.ListEvaluationResultsResponse.next_page_token],
                  * received from a previous
                  * [EvaluationService.ListEvaluationResults][google.cloud.discoveryengine.v1beta.EvaluationService.ListEvaluationResults]
            @@ -833,7 +844,7 @@ public Builder clearPageSize() {
                  * `INVALID_ARGUMENT` error is returned.
                  * 
            * - * string page_token = 3; + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @return The pageToken. */ @@ -853,7 +864,7 @@ public java.lang.String getPageToken() { * * *
            -     * A page token
            +     * Optional. A page token
                  * [ListEvaluationResultsResponse.next_page_token][google.cloud.discoveryengine.v1beta.ListEvaluationResultsResponse.next_page_token],
                  * received from a previous
                  * [EvaluationService.ListEvaluationResults][google.cloud.discoveryengine.v1beta.EvaluationService.ListEvaluationResults]
            @@ -865,7 +876,7 @@ public java.lang.String getPageToken() {
                  * `INVALID_ARGUMENT` error is returned.
                  * 
            * - * string page_token = 3; + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for pageToken. */ @@ -885,7 +896,7 @@ public com.google.protobuf.ByteString getPageTokenBytes() { * * *
            -     * A page token
            +     * Optional. A page token
                  * [ListEvaluationResultsResponse.next_page_token][google.cloud.discoveryengine.v1beta.ListEvaluationResultsResponse.next_page_token],
                  * received from a previous
                  * [EvaluationService.ListEvaluationResults][google.cloud.discoveryengine.v1beta.EvaluationService.ListEvaluationResults]
            @@ -897,7 +908,7 @@ public com.google.protobuf.ByteString getPageTokenBytes() {
                  * `INVALID_ARGUMENT` error is returned.
                  * 
            * - * string page_token = 3; + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The pageToken to set. * @return This builder for chaining. @@ -916,7 +927,7 @@ public Builder setPageToken(java.lang.String value) { * * *
            -     * A page token
            +     * Optional. A page token
                  * [ListEvaluationResultsResponse.next_page_token][google.cloud.discoveryengine.v1beta.ListEvaluationResultsResponse.next_page_token],
                  * received from a previous
                  * [EvaluationService.ListEvaluationResults][google.cloud.discoveryengine.v1beta.EvaluationService.ListEvaluationResults]
            @@ -928,7 +939,7 @@ public Builder setPageToken(java.lang.String value) {
                  * `INVALID_ARGUMENT` error is returned.
                  * 
            * - * string page_token = 3; + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @return This builder for chaining. */ @@ -943,7 +954,7 @@ public Builder clearPageToken() { * * *
            -     * A page token
            +     * Optional. A page token
                  * [ListEvaluationResultsResponse.next_page_token][google.cloud.discoveryengine.v1beta.ListEvaluationResultsResponse.next_page_token],
                  * received from a previous
                  * [EvaluationService.ListEvaluationResults][google.cloud.discoveryengine.v1beta.EvaluationService.ListEvaluationResults]
            @@ -955,7 +966,7 @@ public Builder clearPageToken() {
                  * `INVALID_ARGUMENT` error is returned.
                  * 
            * - * string page_token = 3; + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The bytes for pageToken to set. * @return This builder for chaining. diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ListEvaluationResultsRequestOrBuilder.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ListEvaluationResultsRequestOrBuilder.java index d5a616cbd902..1988e653426e 100644 --- a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ListEvaluationResultsRequestOrBuilder.java +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ListEvaluationResultsRequestOrBuilder.java @@ -33,9 +33,10 @@ public interface ListEvaluationResultsRequestOrBuilder * Required. The evaluation resource name, such as * `projects/{project}/locations/{location}/evaluations/{evaluation}`. * - * If the caller does not have permission to list [EvaluationResult][] - * under this evaluation, regardless of whether or not this evaluation - * set exists, a `PERMISSION_DENIED` error is returned. + * If the caller does not have permission to list + * [ListEvaluationResultsResponse.EvaluationResult][google.cloud.discoveryengine.v1beta.ListEvaluationResultsResponse.EvaluationResult] + * under this evaluation, regardless of whether or not this evaluation set + * exists, a `PERMISSION_DENIED` error is returned. * * * @@ -53,9 +54,10 @@ public interface ListEvaluationResultsRequestOrBuilder * Required. The evaluation resource name, such as * `projects/{project}/locations/{location}/evaluations/{evaluation}`. * - * If the caller does not have permission to list [EvaluationResult][] - * under this evaluation, regardless of whether or not this evaluation - * set exists, a `PERMISSION_DENIED` error is returned. + * If the caller does not have permission to list + * [ListEvaluationResultsResponse.EvaluationResult][google.cloud.discoveryengine.v1beta.ListEvaluationResultsResponse.EvaluationResult] + * under this evaluation, regardless of whether or not this evaluation set + * exists, a `PERMISSION_DENIED` error is returned. * * * @@ -70,14 +72,15 @@ public interface ListEvaluationResultsRequestOrBuilder * * *
            -   * Maximum number of [EvaluationResult][] to return. If unspecified,
            -   * defaults to 100. The maximum allowed value is 1000. Values above 1000 will
            -   * be coerced to 1000.
            +   * Optional. Maximum number of
            +   * [ListEvaluationResultsResponse.EvaluationResult][google.cloud.discoveryengine.v1beta.ListEvaluationResultsResponse.EvaluationResult]
            +   * to return. If unspecified, defaults to 100. The maximum allowed value is
            +   * 1000. Values above 1000 will be coerced to 1000.
                *
                * If this field is negative, an `INVALID_ARGUMENT` error is returned.
                * 
            * - * int32 page_size = 2; + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return The pageSize. */ @@ -87,7 +90,7 @@ public interface ListEvaluationResultsRequestOrBuilder * * *
            -   * A page token
            +   * Optional. A page token
                * [ListEvaluationResultsResponse.next_page_token][google.cloud.discoveryengine.v1beta.ListEvaluationResultsResponse.next_page_token],
                * received from a previous
                * [EvaluationService.ListEvaluationResults][google.cloud.discoveryengine.v1beta.EvaluationService.ListEvaluationResults]
            @@ -99,7 +102,7 @@ public interface ListEvaluationResultsRequestOrBuilder
                * `INVALID_ARGUMENT` error is returned.
                * 
            * - * string page_token = 3; + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @return The pageToken. */ @@ -109,7 +112,7 @@ public interface ListEvaluationResultsRequestOrBuilder * * *
            -   * A page token
            +   * Optional. A page token
                * [ListEvaluationResultsResponse.next_page_token][google.cloud.discoveryengine.v1beta.ListEvaluationResultsResponse.next_page_token],
                * received from a previous
                * [EvaluationService.ListEvaluationResults][google.cloud.discoveryengine.v1beta.EvaluationService.ListEvaluationResults]
            @@ -121,7 +124,7 @@ public interface ListEvaluationResultsRequestOrBuilder
                * `INVALID_ARGUMENT` error is returned.
                * 
            * - * string page_token = 3; + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for pageToken. */ diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ListEvaluationResultsResponse.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ListEvaluationResultsResponse.java index 44ae2253a5e3..66583165a3e3 100644 --- a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ListEvaluationResultsResponse.java +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ListEvaluationResultsResponse.java @@ -1297,8 +1297,8 @@ public com.google.protobuf.Parser getParserForType() { * * *
            -   * The
            -   * [EvaluationResult][google.cloud.discoveryengine.v1beta.ListEvaluationResultsResponse.EvaluationResult]s.
            +   * The evaluation results for the
            +   * [SampleQuery][google.cloud.discoveryengine.v1beta.SampleQuery]s.
                * 
            * * @@ -1316,8 +1316,8 @@ public com.google.protobuf.Parser getParserForType() { * * *
            -   * The
            -   * [EvaluationResult][google.cloud.discoveryengine.v1beta.ListEvaluationResultsResponse.EvaluationResult]s.
            +   * The evaluation results for the
            +   * [SampleQuery][google.cloud.discoveryengine.v1beta.SampleQuery]s.
                * 
            * * @@ -1337,8 +1337,8 @@ public com.google.protobuf.Parser getParserForType() { * * *
            -   * The
            -   * [EvaluationResult][google.cloud.discoveryengine.v1beta.ListEvaluationResultsResponse.EvaluationResult]s.
            +   * The evaluation results for the
            +   * [SampleQuery][google.cloud.discoveryengine.v1beta.SampleQuery]s.
                * 
            * * @@ -1354,8 +1354,8 @@ public int getEvaluationResultsCount() { * * *
            -   * The
            -   * [EvaluationResult][google.cloud.discoveryengine.v1beta.ListEvaluationResultsResponse.EvaluationResult]s.
            +   * The evaluation results for the
            +   * [SampleQuery][google.cloud.discoveryengine.v1beta.SampleQuery]s.
                * 
            * * @@ -1372,8 +1372,8 @@ public int getEvaluationResultsCount() { * * *
            -   * The
            -   * [EvaluationResult][google.cloud.discoveryengine.v1beta.ListEvaluationResultsResponse.EvaluationResult]s.
            +   * The evaluation results for the
            +   * [SampleQuery][google.cloud.discoveryengine.v1beta.SampleQuery]s.
                * 
            * * @@ -1870,8 +1870,8 @@ private void ensureEvaluationResultsIsMutable() { * * *
            -     * The
            -     * [EvaluationResult][google.cloud.discoveryengine.v1beta.ListEvaluationResultsResponse.EvaluationResult]s.
            +     * The evaluation results for the
            +     * [SampleQuery][google.cloud.discoveryengine.v1beta.SampleQuery]s.
                  * 
            * * @@ -1892,8 +1892,8 @@ private void ensureEvaluationResultsIsMutable() { * * *
            -     * The
            -     * [EvaluationResult][google.cloud.discoveryengine.v1beta.ListEvaluationResultsResponse.EvaluationResult]s.
            +     * The evaluation results for the
            +     * [SampleQuery][google.cloud.discoveryengine.v1beta.SampleQuery]s.
                  * 
            * * @@ -1912,8 +1912,8 @@ public int getEvaluationResultsCount() { * * *
            -     * The
            -     * [EvaluationResult][google.cloud.discoveryengine.v1beta.ListEvaluationResultsResponse.EvaluationResult]s.
            +     * The evaluation results for the
            +     * [SampleQuery][google.cloud.discoveryengine.v1beta.SampleQuery]s.
                  * 
            * * @@ -1933,8 +1933,8 @@ public int getEvaluationResultsCount() { * * *
            -     * The
            -     * [EvaluationResult][google.cloud.discoveryengine.v1beta.ListEvaluationResultsResponse.EvaluationResult]s.
            +     * The evaluation results for the
            +     * [SampleQuery][google.cloud.discoveryengine.v1beta.SampleQuery]s.
                  * 
            * * @@ -1962,8 +1962,8 @@ public Builder setEvaluationResults( * * *
            -     * The
            -     * [EvaluationResult][google.cloud.discoveryengine.v1beta.ListEvaluationResultsResponse.EvaluationResult]s.
            +     * The evaluation results for the
            +     * [SampleQuery][google.cloud.discoveryengine.v1beta.SampleQuery]s.
                  * 
            * * @@ -1989,8 +1989,8 @@ public Builder setEvaluationResults( * * *
            -     * The
            -     * [EvaluationResult][google.cloud.discoveryengine.v1beta.ListEvaluationResultsResponse.EvaluationResult]s.
            +     * The evaluation results for the
            +     * [SampleQuery][google.cloud.discoveryengine.v1beta.SampleQuery]s.
                  * 
            * * @@ -2017,8 +2017,8 @@ public Builder addEvaluationResults( * * *
            -     * The
            -     * [EvaluationResult][google.cloud.discoveryengine.v1beta.ListEvaluationResultsResponse.EvaluationResult]s.
            +     * The evaluation results for the
            +     * [SampleQuery][google.cloud.discoveryengine.v1beta.SampleQuery]s.
                  * 
            * * @@ -2046,8 +2046,8 @@ public Builder addEvaluationResults( * * *
            -     * The
            -     * [EvaluationResult][google.cloud.discoveryengine.v1beta.ListEvaluationResultsResponse.EvaluationResult]s.
            +     * The evaluation results for the
            +     * [SampleQuery][google.cloud.discoveryengine.v1beta.SampleQuery]s.
                  * 
            * * @@ -2072,8 +2072,8 @@ public Builder addEvaluationResults( * * *
            -     * The
            -     * [EvaluationResult][google.cloud.discoveryengine.v1beta.ListEvaluationResultsResponse.EvaluationResult]s.
            +     * The evaluation results for the
            +     * [SampleQuery][google.cloud.discoveryengine.v1beta.SampleQuery]s.
                  * 
            * * @@ -2099,8 +2099,8 @@ public Builder addEvaluationResults( * * *
            -     * The
            -     * [EvaluationResult][google.cloud.discoveryengine.v1beta.ListEvaluationResultsResponse.EvaluationResult]s.
            +     * The evaluation results for the
            +     * [SampleQuery][google.cloud.discoveryengine.v1beta.SampleQuery]s.
                  * 
            * * @@ -2127,8 +2127,8 @@ public Builder addAllEvaluationResults( * * *
            -     * The
            -     * [EvaluationResult][google.cloud.discoveryengine.v1beta.ListEvaluationResultsResponse.EvaluationResult]s.
            +     * The evaluation results for the
            +     * [SampleQuery][google.cloud.discoveryengine.v1beta.SampleQuery]s.
                  * 
            * * @@ -2150,8 +2150,8 @@ public Builder clearEvaluationResults() { * * *
            -     * The
            -     * [EvaluationResult][google.cloud.discoveryengine.v1beta.ListEvaluationResultsResponse.EvaluationResult]s.
            +     * The evaluation results for the
            +     * [SampleQuery][google.cloud.discoveryengine.v1beta.SampleQuery]s.
                  * 
            * * @@ -2173,8 +2173,8 @@ public Builder removeEvaluationResults(int index) { * * *
            -     * The
            -     * [EvaluationResult][google.cloud.discoveryengine.v1beta.ListEvaluationResultsResponse.EvaluationResult]s.
            +     * The evaluation results for the
            +     * [SampleQuery][google.cloud.discoveryengine.v1beta.SampleQuery]s.
                  * 
            * * @@ -2191,8 +2191,8 @@ public Builder removeEvaluationResults(int index) { * * *
            -     * The
            -     * [EvaluationResult][google.cloud.discoveryengine.v1beta.ListEvaluationResultsResponse.EvaluationResult]s.
            +     * The evaluation results for the
            +     * [SampleQuery][google.cloud.discoveryengine.v1beta.SampleQuery]s.
                  * 
            * * @@ -2213,8 +2213,8 @@ public Builder removeEvaluationResults(int index) { * * *
            -     * The
            -     * [EvaluationResult][google.cloud.discoveryengine.v1beta.ListEvaluationResultsResponse.EvaluationResult]s.
            +     * The evaluation results for the
            +     * [SampleQuery][google.cloud.discoveryengine.v1beta.SampleQuery]s.
                  * 
            * * @@ -2237,8 +2237,8 @@ public Builder removeEvaluationResults(int index) { * * *
            -     * The
            -     * [EvaluationResult][google.cloud.discoveryengine.v1beta.ListEvaluationResultsResponse.EvaluationResult]s.
            +     * The evaluation results for the
            +     * [SampleQuery][google.cloud.discoveryengine.v1beta.SampleQuery]s.
                  * 
            * * @@ -2258,8 +2258,8 @@ public Builder removeEvaluationResults(int index) { * * *
            -     * The
            -     * [EvaluationResult][google.cloud.discoveryengine.v1beta.ListEvaluationResultsResponse.EvaluationResult]s.
            +     * The evaluation results for the
            +     * [SampleQuery][google.cloud.discoveryengine.v1beta.SampleQuery]s.
                  * 
            * * @@ -2280,8 +2280,8 @@ public Builder removeEvaluationResults(int index) { * * *
            -     * The
            -     * [EvaluationResult][google.cloud.discoveryengine.v1beta.ListEvaluationResultsResponse.EvaluationResult]s.
            +     * The evaluation results for the
            +     * [SampleQuery][google.cloud.discoveryengine.v1beta.SampleQuery]s.
                  * 
            * * diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ListEvaluationResultsResponseOrBuilder.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ListEvaluationResultsResponseOrBuilder.java index d111e0e73df6..2b01f062f656 100644 --- a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ListEvaluationResultsResponseOrBuilder.java +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ListEvaluationResultsResponseOrBuilder.java @@ -30,8 +30,8 @@ public interface ListEvaluationResultsResponseOrBuilder * * *
            -   * The
            -   * [EvaluationResult][google.cloud.discoveryengine.v1beta.ListEvaluationResultsResponse.EvaluationResult]s.
            +   * The evaluation results for the
            +   * [SampleQuery][google.cloud.discoveryengine.v1beta.SampleQuery]s.
                * 
            * * @@ -46,8 +46,8 @@ public interface ListEvaluationResultsResponseOrBuilder * * *
            -   * The
            -   * [EvaluationResult][google.cloud.discoveryengine.v1beta.ListEvaluationResultsResponse.EvaluationResult]s.
            +   * The evaluation results for the
            +   * [SampleQuery][google.cloud.discoveryengine.v1beta.SampleQuery]s.
                * 
            * * @@ -61,8 +61,8 @@ public interface ListEvaluationResultsResponseOrBuilder * * *
            -   * The
            -   * [EvaluationResult][google.cloud.discoveryengine.v1beta.ListEvaluationResultsResponse.EvaluationResult]s.
            +   * The evaluation results for the
            +   * [SampleQuery][google.cloud.discoveryengine.v1beta.SampleQuery]s.
                * 
            * * @@ -75,8 +75,8 @@ public interface ListEvaluationResultsResponseOrBuilder * * *
            -   * The
            -   * [EvaluationResult][google.cloud.discoveryengine.v1beta.ListEvaluationResultsResponse.EvaluationResult]s.
            +   * The evaluation results for the
            +   * [SampleQuery][google.cloud.discoveryengine.v1beta.SampleQuery]s.
                * 
            * * @@ -93,8 +93,8 @@ public interface ListEvaluationResultsResponseOrBuilder * * *
            -   * The
            -   * [EvaluationResult][google.cloud.discoveryengine.v1beta.ListEvaluationResultsResponse.EvaluationResult]s.
            +   * The evaluation results for the
            +   * [SampleQuery][google.cloud.discoveryengine.v1beta.SampleQuery]s.
                * 
            * * diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ListEvaluationsRequest.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ListEvaluationsRequest.java index 4b4eaf22a619..c2f4b538e11a 100644 --- a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ListEvaluationsRequest.java +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ListEvaluationsRequest.java @@ -149,7 +149,7 @@ public com.google.protobuf.ByteString getParentBytes() { * * *
            -   * Maximum number of
            +   * Optional. Maximum number of
                * [Evaluation][google.cloud.discoveryengine.v1beta.Evaluation]s to return. If
                * unspecified, defaults to 100. The maximum allowed value is 1000. Values
                * above 1000 will be coerced to 1000.
            @@ -157,7 +157,7 @@ public com.google.protobuf.ByteString getParentBytes() {
                * If this field is negative, an `INVALID_ARGUMENT` error is returned.
                * 
            * - * int32 page_size = 2; + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return The pageSize. */ @@ -175,7 +175,7 @@ public int getPageSize() { * * *
            -   * A page token
            +   * Optional. A page token
                * [ListEvaluationsResponse.next_page_token][google.cloud.discoveryengine.v1beta.ListEvaluationsResponse.next_page_token],
                * received from a previous
                * [EvaluationService.ListEvaluations][google.cloud.discoveryengine.v1beta.EvaluationService.ListEvaluations]
            @@ -187,7 +187,7 @@ public int getPageSize() {
                * `INVALID_ARGUMENT` error is returned.
                * 
            * - * string page_token = 3; + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @return The pageToken. */ @@ -208,7 +208,7 @@ public java.lang.String getPageToken() { * * *
            -   * A page token
            +   * Optional. A page token
                * [ListEvaluationsResponse.next_page_token][google.cloud.discoveryengine.v1beta.ListEvaluationsResponse.next_page_token],
                * received from a previous
                * [EvaluationService.ListEvaluations][google.cloud.discoveryengine.v1beta.EvaluationService.ListEvaluations]
            @@ -220,7 +220,7 @@ public java.lang.String getPageToken() {
                * `INVALID_ARGUMENT` error is returned.
                * 
            * - * string page_token = 3; + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for pageToken. */ @@ -756,7 +756,7 @@ public Builder setParentBytes(com.google.protobuf.ByteString value) { * * *
            -     * Maximum number of
            +     * Optional. Maximum number of
                  * [Evaluation][google.cloud.discoveryengine.v1beta.Evaluation]s to return. If
                  * unspecified, defaults to 100. The maximum allowed value is 1000. Values
                  * above 1000 will be coerced to 1000.
            @@ -764,7 +764,7 @@ public Builder setParentBytes(com.google.protobuf.ByteString value) {
                  * If this field is negative, an `INVALID_ARGUMENT` error is returned.
                  * 
            * - * int32 page_size = 2; + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return The pageSize. */ @@ -777,7 +777,7 @@ public int getPageSize() { * * *
            -     * Maximum number of
            +     * Optional. Maximum number of
                  * [Evaluation][google.cloud.discoveryengine.v1beta.Evaluation]s to return. If
                  * unspecified, defaults to 100. The maximum allowed value is 1000. Values
                  * above 1000 will be coerced to 1000.
            @@ -785,7 +785,7 @@ public int getPageSize() {
                  * If this field is negative, an `INVALID_ARGUMENT` error is returned.
                  * 
            * - * int32 page_size = 2; + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The pageSize to set. * @return This builder for chaining. @@ -802,7 +802,7 @@ public Builder setPageSize(int value) { * * *
            -     * Maximum number of
            +     * Optional. Maximum number of
                  * [Evaluation][google.cloud.discoveryengine.v1beta.Evaluation]s to return. If
                  * unspecified, defaults to 100. The maximum allowed value is 1000. Values
                  * above 1000 will be coerced to 1000.
            @@ -810,7 +810,7 @@ public Builder setPageSize(int value) {
                  * If this field is negative, an `INVALID_ARGUMENT` error is returned.
                  * 
            * - * int32 page_size = 2; + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return This builder for chaining. */ @@ -827,7 +827,7 @@ public Builder clearPageSize() { * * *
            -     * A page token
            +     * Optional. A page token
                  * [ListEvaluationsResponse.next_page_token][google.cloud.discoveryengine.v1beta.ListEvaluationsResponse.next_page_token],
                  * received from a previous
                  * [EvaluationService.ListEvaluations][google.cloud.discoveryengine.v1beta.EvaluationService.ListEvaluations]
            @@ -839,7 +839,7 @@ public Builder clearPageSize() {
                  * `INVALID_ARGUMENT` error is returned.
                  * 
            * - * string page_token = 3; + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @return The pageToken. */ @@ -859,7 +859,7 @@ public java.lang.String getPageToken() { * * *
            -     * A page token
            +     * Optional. A page token
                  * [ListEvaluationsResponse.next_page_token][google.cloud.discoveryengine.v1beta.ListEvaluationsResponse.next_page_token],
                  * received from a previous
                  * [EvaluationService.ListEvaluations][google.cloud.discoveryengine.v1beta.EvaluationService.ListEvaluations]
            @@ -871,7 +871,7 @@ public java.lang.String getPageToken() {
                  * `INVALID_ARGUMENT` error is returned.
                  * 
            * - * string page_token = 3; + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for pageToken. */ @@ -891,7 +891,7 @@ public com.google.protobuf.ByteString getPageTokenBytes() { * * *
            -     * A page token
            +     * Optional. A page token
                  * [ListEvaluationsResponse.next_page_token][google.cloud.discoveryengine.v1beta.ListEvaluationsResponse.next_page_token],
                  * received from a previous
                  * [EvaluationService.ListEvaluations][google.cloud.discoveryengine.v1beta.EvaluationService.ListEvaluations]
            @@ -903,7 +903,7 @@ public com.google.protobuf.ByteString getPageTokenBytes() {
                  * `INVALID_ARGUMENT` error is returned.
                  * 
            * - * string page_token = 3; + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The pageToken to set. * @return This builder for chaining. @@ -922,7 +922,7 @@ public Builder setPageToken(java.lang.String value) { * * *
            -     * A page token
            +     * Optional. A page token
                  * [ListEvaluationsResponse.next_page_token][google.cloud.discoveryengine.v1beta.ListEvaluationsResponse.next_page_token],
                  * received from a previous
                  * [EvaluationService.ListEvaluations][google.cloud.discoveryengine.v1beta.EvaluationService.ListEvaluations]
            @@ -934,7 +934,7 @@ public Builder setPageToken(java.lang.String value) {
                  * `INVALID_ARGUMENT` error is returned.
                  * 
            * - * string page_token = 3; + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @return This builder for chaining. */ @@ -949,7 +949,7 @@ public Builder clearPageToken() { * * *
            -     * A page token
            +     * Optional. A page token
                  * [ListEvaluationsResponse.next_page_token][google.cloud.discoveryengine.v1beta.ListEvaluationsResponse.next_page_token],
                  * received from a previous
                  * [EvaluationService.ListEvaluations][google.cloud.discoveryengine.v1beta.EvaluationService.ListEvaluations]
            @@ -961,7 +961,7 @@ public Builder clearPageToken() {
                  * `INVALID_ARGUMENT` error is returned.
                  * 
            * - * string page_token = 3; + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The bytes for pageToken to set. * @return This builder for chaining. diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ListEvaluationsRequestOrBuilder.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ListEvaluationsRequestOrBuilder.java index bde3f56e4c90..16e1bd542b7b 100644 --- a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ListEvaluationsRequestOrBuilder.java +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ListEvaluationsRequestOrBuilder.java @@ -72,7 +72,7 @@ public interface ListEvaluationsRequestOrBuilder * * *
            -   * Maximum number of
            +   * Optional. Maximum number of
                * [Evaluation][google.cloud.discoveryengine.v1beta.Evaluation]s to return. If
                * unspecified, defaults to 100. The maximum allowed value is 1000. Values
                * above 1000 will be coerced to 1000.
            @@ -80,7 +80,7 @@ public interface ListEvaluationsRequestOrBuilder
                * If this field is negative, an `INVALID_ARGUMENT` error is returned.
                * 
            * - * int32 page_size = 2; + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return The pageSize. */ @@ -90,7 +90,7 @@ public interface ListEvaluationsRequestOrBuilder * * *
            -   * A page token
            +   * Optional. A page token
                * [ListEvaluationsResponse.next_page_token][google.cloud.discoveryengine.v1beta.ListEvaluationsResponse.next_page_token],
                * received from a previous
                * [EvaluationService.ListEvaluations][google.cloud.discoveryengine.v1beta.EvaluationService.ListEvaluations]
            @@ -102,7 +102,7 @@ public interface ListEvaluationsRequestOrBuilder
                * `INVALID_ARGUMENT` error is returned.
                * 
            * - * string page_token = 3; + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @return The pageToken. */ @@ -112,7 +112,7 @@ public interface ListEvaluationsRequestOrBuilder * * *
            -   * A page token
            +   * Optional. A page token
                * [ListEvaluationsResponse.next_page_token][google.cloud.discoveryengine.v1beta.ListEvaluationsResponse.next_page_token],
                * received from a previous
                * [EvaluationService.ListEvaluations][google.cloud.discoveryengine.v1beta.EvaluationService.ListEvaluations]
            @@ -124,7 +124,7 @@ public interface ListEvaluationsRequestOrBuilder
                * `INVALID_ARGUMENT` error is returned.
                * 
            * - * string page_token = 3; + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for pageToken. */ diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ListIdentityMappingStoresRequest.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ListIdentityMappingStoresRequest.java new file mode 100644 index 000000000000..e613a58ebd51 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ListIdentityMappingStoresRequest.java @@ -0,0 +1,973 @@ +/* + * 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/cloud/discoveryengine/v1beta/identity_mapping_store_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.discoveryengine.v1beta; + +/** + * + * + *
            + * Request message for
            + * [IdentityMappingStoreService.ListIdentityMappingStores][google.cloud.discoveryengine.v1beta.IdentityMappingStoreService.ListIdentityMappingStores]
            + * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.ListIdentityMappingStoresRequest} + */ +@com.google.protobuf.Generated +public final class ListIdentityMappingStoresRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.ListIdentityMappingStoresRequest) + ListIdentityMappingStoresRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ListIdentityMappingStoresRequest"); + } + + // Use ListIdentityMappingStoresRequest.newBuilder() to construct. + private ListIdentityMappingStoresRequest( + com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ListIdentityMappingStoresRequest() { + parent_ = ""; + pageToken_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.IdentityMappingStoreServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_ListIdentityMappingStoresRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.IdentityMappingStoreServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_ListIdentityMappingStoresRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.ListIdentityMappingStoresRequest.class, + com.google.cloud.discoveryengine.v1beta.ListIdentityMappingStoresRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + + /** + * + * + *
            +   * Required. The parent of the Identity Mapping Stores to list.
            +   * Format:
            +   * `projects/{project}/locations/{location}`.
            +   * 
            + * + * + * 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 parent of the Identity Mapping Stores to list.
            +   * Format:
            +   * `projects/{project}/locations/{location}`.
            +   * 
            + * + * + * 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 PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_ = 0; + + /** + * + * + *
            +   * Maximum number of IdentityMappingStores to return. If unspecified, defaults
            +   * to 100. The maximum allowed value is 1000. Values above 1000 will be
            +   * coerced to 1000.
            +   * 
            + * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object pageToken_ = ""; + + /** + * + * + *
            +   * A page token, received from a previous `ListIdentityMappingStores` call.
            +   * Provide this to retrieve the subsequent page.
            +   *
            +   * When paginating, all other parameters provided to
            +   * `ListIdentityMappingStores` must match the call that provided the page
            +   * token.
            +   * 
            + * + * string page_token = 3; + * + * @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; + } + } + + /** + * + * + *
            +   * A page token, received from a previous `ListIdentityMappingStores` call.
            +   * Provide this to retrieve the subsequent page.
            +   *
            +   * When paginating, all other parameters provided to
            +   * `ListIdentityMappingStores` must match the call that provided the page
            +   * token.
            +   * 
            + * + * string page_token = 3; + * + * @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; + } + } + + 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 (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, pageToken_); + } + 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 (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, pageToken_); + } + 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.discoveryengine.v1beta.ListIdentityMappingStoresRequest)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1beta.ListIdentityMappingStoresRequest other = + (com.google.cloud.discoveryengine.v1beta.ListIdentityMappingStoresRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) 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) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1beta.ListIdentityMappingStoresRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.ListIdentityMappingStoresRequest 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.discoveryengine.v1beta.ListIdentityMappingStoresRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.ListIdentityMappingStoresRequest 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.discoveryengine.v1beta.ListIdentityMappingStoresRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.ListIdentityMappingStoresRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1beta.ListIdentityMappingStoresRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.ListIdentityMappingStoresRequest 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.discoveryengine.v1beta.ListIdentityMappingStoresRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.ListIdentityMappingStoresRequest + 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.discoveryengine.v1beta.ListIdentityMappingStoresRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.ListIdentityMappingStoresRequest 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.discoveryengine.v1beta.ListIdentityMappingStoresRequest 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
            +   * [IdentityMappingStoreService.ListIdentityMappingStores][google.cloud.discoveryengine.v1beta.IdentityMappingStoreService.ListIdentityMappingStores]
            +   * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.ListIdentityMappingStoresRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.ListIdentityMappingStoresRequest) + com.google.cloud.discoveryengine.v1beta.ListIdentityMappingStoresRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.IdentityMappingStoreServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_ListIdentityMappingStoresRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.IdentityMappingStoreServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_ListIdentityMappingStoresRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.ListIdentityMappingStoresRequest.class, + com.google.cloud.discoveryengine.v1beta.ListIdentityMappingStoresRequest.Builder + .class); + } + + // Construct using + // com.google.cloud.discoveryengine.v1beta.ListIdentityMappingStoresRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + pageSize_ = 0; + pageToken_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1beta.IdentityMappingStoreServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_ListIdentityMappingStoresRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.ListIdentityMappingStoresRequest + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1beta.ListIdentityMappingStoresRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.ListIdentityMappingStoresRequest build() { + com.google.cloud.discoveryengine.v1beta.ListIdentityMappingStoresRequest result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.ListIdentityMappingStoresRequest buildPartial() { + com.google.cloud.discoveryengine.v1beta.ListIdentityMappingStoresRequest result = + new com.google.cloud.discoveryengine.v1beta.ListIdentityMappingStoresRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.discoveryengine.v1beta.ListIdentityMappingStoresRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.pageSize_ = pageSize_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.pageToken_ = pageToken_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.cloud.discoveryengine.v1beta.ListIdentityMappingStoresRequest) { + return mergeFrom( + (com.google.cloud.discoveryengine.v1beta.ListIdentityMappingStoresRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1beta.ListIdentityMappingStoresRequest other) { + if (other + == com.google.cloud.discoveryengine.v1beta.ListIdentityMappingStoresRequest + .getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + bitField0_ |= 0x00000004; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + pageSize_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + + /** + * + * + *
            +     * Required. The parent of the Identity Mapping Stores to list.
            +     * Format:
            +     * `projects/{project}/locations/{location}`.
            +     * 
            + * + * + * 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 parent of the Identity Mapping Stores to list.
            +     * Format:
            +     * `projects/{project}/locations/{location}`.
            +     * 
            + * + * + * 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 parent of the Identity Mapping Stores to list.
            +     * Format:
            +     * `projects/{project}/locations/{location}`.
            +     * 
            + * + * + * 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 parent of the Identity Mapping Stores to list.
            +     * Format:
            +     * `projects/{project}/locations/{location}`.
            +     * 
            + * + * + * 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 parent of the Identity Mapping Stores to list.
            +     * Format:
            +     * `projects/{project}/locations/{location}`.
            +     * 
            + * + * + * 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 int pageSize_; + + /** + * + * + *
            +     * Maximum number of IdentityMappingStores to return. If unspecified, defaults
            +     * to 100. The maximum allowed value is 1000. Values above 1000 will be
            +     * coerced to 1000.
            +     * 
            + * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + /** + * + * + *
            +     * Maximum number of IdentityMappingStores to return. If unspecified, defaults
            +     * to 100. The maximum allowed value is 1000. Values above 1000 will be
            +     * coerced to 1000.
            +     * 
            + * + * int32 page_size = 2; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Maximum number of IdentityMappingStores to return. If unspecified, defaults
            +     * to 100. The maximum allowed value is 1000. Values above 1000 will be
            +     * coerced to 1000.
            +     * 
            + * + * int32 page_size = 2; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + bitField0_ = (bitField0_ & ~0x00000002); + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + + /** + * + * + *
            +     * A page token, received from a previous `ListIdentityMappingStores` call.
            +     * Provide this to retrieve the subsequent page.
            +     *
            +     * When paginating, all other parameters provided to
            +     * `ListIdentityMappingStores` must match the call that provided the page
            +     * token.
            +     * 
            + * + * string page_token = 3; + * + * @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; + } + } + + /** + * + * + *
            +     * A page token, received from a previous `ListIdentityMappingStores` call.
            +     * Provide this to retrieve the subsequent page.
            +     *
            +     * When paginating, all other parameters provided to
            +     * `ListIdentityMappingStores` must match the call that provided the page
            +     * token.
            +     * 
            + * + * string page_token = 3; + * + * @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; + } + } + + /** + * + * + *
            +     * A page token, received from a previous `ListIdentityMappingStores` call.
            +     * Provide this to retrieve the subsequent page.
            +     *
            +     * When paginating, all other parameters provided to
            +     * `ListIdentityMappingStores` must match the call that provided the page
            +     * token.
            +     * 
            + * + * string page_token = 3; + * + * @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_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
            +     * A page token, received from a previous `ListIdentityMappingStores` call.
            +     * Provide this to retrieve the subsequent page.
            +     *
            +     * When paginating, all other parameters provided to
            +     * `ListIdentityMappingStores` must match the call that provided the page
            +     * token.
            +     * 
            + * + * string page_token = 3; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + pageToken_ = getDefaultInstance().getPageToken(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
            +     * A page token, received from a previous `ListIdentityMappingStores` call.
            +     * Provide this to retrieve the subsequent page.
            +     *
            +     * When paginating, all other parameters provided to
            +     * `ListIdentityMappingStores` must match the call that provided the page
            +     * token.
            +     * 
            + * + * string page_token = 3; + * + * @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_ |= 0x00000004; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.ListIdentityMappingStoresRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.ListIdentityMappingStoresRequest) + private static final com.google.cloud.discoveryengine.v1beta.ListIdentityMappingStoresRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.discoveryengine.v1beta.ListIdentityMappingStoresRequest(); + } + + public static com.google.cloud.discoveryengine.v1beta.ListIdentityMappingStoresRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListIdentityMappingStoresRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.ListIdentityMappingStoresRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ListIdentityMappingStoresRequestOrBuilder.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ListIdentityMappingStoresRequestOrBuilder.java new file mode 100644 index 000000000000..c75ef99a6651 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ListIdentityMappingStoresRequestOrBuilder.java @@ -0,0 +1,113 @@ +/* + * 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/cloud/discoveryengine/v1beta/identity_mapping_store_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.discoveryengine.v1beta; + +@com.google.protobuf.Generated +public interface ListIdentityMappingStoresRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.ListIdentityMappingStoresRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
            +   * Required. The parent of the Identity Mapping Stores to list.
            +   * Format:
            +   * `projects/{project}/locations/{location}`.
            +   * 
            + * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + + /** + * + * + *
            +   * Required. The parent of the Identity Mapping Stores to list.
            +   * Format:
            +   * `projects/{project}/locations/{location}`.
            +   * 
            + * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
            +   * Maximum number of IdentityMappingStores to return. If unspecified, defaults
            +   * to 100. The maximum allowed value is 1000. Values above 1000 will be
            +   * coerced to 1000.
            +   * 
            + * + * int32 page_size = 2; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
            +   * A page token, received from a previous `ListIdentityMappingStores` call.
            +   * Provide this to retrieve the subsequent page.
            +   *
            +   * When paginating, all other parameters provided to
            +   * `ListIdentityMappingStores` must match the call that provided the page
            +   * token.
            +   * 
            + * + * string page_token = 3; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + + /** + * + * + *
            +   * A page token, received from a previous `ListIdentityMappingStores` call.
            +   * Provide this to retrieve the subsequent page.
            +   *
            +   * When paginating, all other parameters provided to
            +   * `ListIdentityMappingStores` must match the call that provided the page
            +   * token.
            +   * 
            + * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ListIdentityMappingStoresResponse.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ListIdentityMappingStoresResponse.java new file mode 100644 index 000000000000..ec30911d7392 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ListIdentityMappingStoresResponse.java @@ -0,0 +1,1216 @@ +/* + * 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/cloud/discoveryengine/v1beta/identity_mapping_store_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.discoveryengine.v1beta; + +/** + * + * + *
            + * Response message for
            + * [IdentityMappingStoreService.ListIdentityMappingStores][google.cloud.discoveryengine.v1beta.IdentityMappingStoreService.ListIdentityMappingStores]
            + * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.ListIdentityMappingStoresResponse} + */ +@com.google.protobuf.Generated +public final class ListIdentityMappingStoresResponse extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.ListIdentityMappingStoresResponse) + ListIdentityMappingStoresResponseOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ListIdentityMappingStoresResponse"); + } + + // Use ListIdentityMappingStoresResponse.newBuilder() to construct. + private ListIdentityMappingStoresResponse( + com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ListIdentityMappingStoresResponse() { + identityMappingStores_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.IdentityMappingStoreServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_ListIdentityMappingStoresResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.IdentityMappingStoreServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_ListIdentityMappingStoresResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.ListIdentityMappingStoresResponse.class, + com.google.cloud.discoveryengine.v1beta.ListIdentityMappingStoresResponse.Builder + .class); + } + + public static final int IDENTITY_MAPPING_STORES_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List + identityMappingStores_; + + /** + * + * + *
            +   * The Identity Mapping Stores.
            +   * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.IdentityMappingStore identity_mapping_stores = 1; + * + */ + @java.lang.Override + public java.util.List + getIdentityMappingStoresList() { + return identityMappingStores_; + } + + /** + * + * + *
            +   * The Identity Mapping Stores.
            +   * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.IdentityMappingStore identity_mapping_stores = 1; + * + */ + @java.lang.Override + public java.util.List< + ? extends com.google.cloud.discoveryengine.v1beta.IdentityMappingStoreOrBuilder> + getIdentityMappingStoresOrBuilderList() { + return identityMappingStores_; + } + + /** + * + * + *
            +   * The Identity Mapping Stores.
            +   * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.IdentityMappingStore identity_mapping_stores = 1; + * + */ + @java.lang.Override + public int getIdentityMappingStoresCount() { + return identityMappingStores_.size(); + } + + /** + * + * + *
            +   * The Identity Mapping Stores.
            +   * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.IdentityMappingStore identity_mapping_stores = 1; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.IdentityMappingStore getIdentityMappingStores( + int index) { + return identityMappingStores_.get(index); + } + + /** + * + * + *
            +   * The Identity Mapping Stores.
            +   * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.IdentityMappingStore identity_mapping_stores = 1; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.IdentityMappingStoreOrBuilder + getIdentityMappingStoresOrBuilder(int index) { + return identityMappingStores_.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 sent as `page_token` to retrieve the next page. If this
            +   * field is omitted, 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 sent as `page_token` to retrieve the next page. If this
            +   * field is omitted, 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 < identityMappingStores_.size(); i++) { + output.writeMessage(1, identityMappingStores_.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 < identityMappingStores_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 1, identityMappingStores_.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.cloud.discoveryengine.v1beta.ListIdentityMappingStoresResponse)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1beta.ListIdentityMappingStoresResponse other = + (com.google.cloud.discoveryengine.v1beta.ListIdentityMappingStoresResponse) obj; + + if (!getIdentityMappingStoresList().equals(other.getIdentityMappingStoresList())) 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 (getIdentityMappingStoresCount() > 0) { + hash = (37 * hash) + IDENTITY_MAPPING_STORES_FIELD_NUMBER; + hash = (53 * hash) + getIdentityMappingStoresList().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.cloud.discoveryengine.v1beta.ListIdentityMappingStoresResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.ListIdentityMappingStoresResponse 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.discoveryengine.v1beta.ListIdentityMappingStoresResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.ListIdentityMappingStoresResponse 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.discoveryengine.v1beta.ListIdentityMappingStoresResponse parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.ListIdentityMappingStoresResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1beta.ListIdentityMappingStoresResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.ListIdentityMappingStoresResponse 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.discoveryengine.v1beta.ListIdentityMappingStoresResponse + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.ListIdentityMappingStoresResponse + 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.discoveryengine.v1beta.ListIdentityMappingStoresResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.ListIdentityMappingStoresResponse 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.discoveryengine.v1beta.ListIdentityMappingStoresResponse 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
            +   * [IdentityMappingStoreService.ListIdentityMappingStores][google.cloud.discoveryengine.v1beta.IdentityMappingStoreService.ListIdentityMappingStores]
            +   * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.ListIdentityMappingStoresResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.ListIdentityMappingStoresResponse) + com.google.cloud.discoveryengine.v1beta.ListIdentityMappingStoresResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.IdentityMappingStoreServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_ListIdentityMappingStoresResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.IdentityMappingStoreServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_ListIdentityMappingStoresResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.ListIdentityMappingStoresResponse.class, + com.google.cloud.discoveryengine.v1beta.ListIdentityMappingStoresResponse.Builder + .class); + } + + // Construct using + // com.google.cloud.discoveryengine.v1beta.ListIdentityMappingStoresResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (identityMappingStoresBuilder_ == null) { + identityMappingStores_ = java.util.Collections.emptyList(); + } else { + identityMappingStores_ = null; + identityMappingStoresBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + nextPageToken_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1beta.IdentityMappingStoreServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_ListIdentityMappingStoresResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.ListIdentityMappingStoresResponse + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1beta.ListIdentityMappingStoresResponse + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.ListIdentityMappingStoresResponse build() { + com.google.cloud.discoveryengine.v1beta.ListIdentityMappingStoresResponse result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.ListIdentityMappingStoresResponse + buildPartial() { + com.google.cloud.discoveryengine.v1beta.ListIdentityMappingStoresResponse result = + new com.google.cloud.discoveryengine.v1beta.ListIdentityMappingStoresResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.discoveryengine.v1beta.ListIdentityMappingStoresResponse result) { + if (identityMappingStoresBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + identityMappingStores_ = java.util.Collections.unmodifiableList(identityMappingStores_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.identityMappingStores_ = identityMappingStores_; + } else { + result.identityMappingStores_ = identityMappingStoresBuilder_.build(); + } + } + + private void buildPartial0( + com.google.cloud.discoveryengine.v1beta.ListIdentityMappingStoresResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.nextPageToken_ = nextPageToken_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.cloud.discoveryengine.v1beta.ListIdentityMappingStoresResponse) { + return mergeFrom( + (com.google.cloud.discoveryengine.v1beta.ListIdentityMappingStoresResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1beta.ListIdentityMappingStoresResponse other) { + if (other + == com.google.cloud.discoveryengine.v1beta.ListIdentityMappingStoresResponse + .getDefaultInstance()) return this; + if (identityMappingStoresBuilder_ == null) { + if (!other.identityMappingStores_.isEmpty()) { + if (identityMappingStores_.isEmpty()) { + identityMappingStores_ = other.identityMappingStores_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureIdentityMappingStoresIsMutable(); + identityMappingStores_.addAll(other.identityMappingStores_); + } + onChanged(); + } + } else { + if (!other.identityMappingStores_.isEmpty()) { + if (identityMappingStoresBuilder_.isEmpty()) { + identityMappingStoresBuilder_.dispose(); + identityMappingStoresBuilder_ = null; + identityMappingStores_ = other.identityMappingStores_; + bitField0_ = (bitField0_ & ~0x00000001); + identityMappingStoresBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetIdentityMappingStoresFieldBuilder() + : null; + } else { + identityMappingStoresBuilder_.addAllMessages(other.identityMappingStores_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.discoveryengine.v1beta.IdentityMappingStore m = + input.readMessage( + com.google.cloud.discoveryengine.v1beta.IdentityMappingStore.parser(), + extensionRegistry); + if (identityMappingStoresBuilder_ == null) { + ensureIdentityMappingStoresIsMutable(); + identityMappingStores_.add(m); + } else { + identityMappingStoresBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List + identityMappingStores_ = java.util.Collections.emptyList(); + + private void ensureIdentityMappingStoresIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + identityMappingStores_ = + new java.util.ArrayList( + identityMappingStores_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.discoveryengine.v1beta.IdentityMappingStore, + com.google.cloud.discoveryengine.v1beta.IdentityMappingStore.Builder, + com.google.cloud.discoveryengine.v1beta.IdentityMappingStoreOrBuilder> + identityMappingStoresBuilder_; + + /** + * + * + *
            +     * The Identity Mapping Stores.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.IdentityMappingStore identity_mapping_stores = 1; + * + */ + public java.util.List + getIdentityMappingStoresList() { + if (identityMappingStoresBuilder_ == null) { + return java.util.Collections.unmodifiableList(identityMappingStores_); + } else { + return identityMappingStoresBuilder_.getMessageList(); + } + } + + /** + * + * + *
            +     * The Identity Mapping Stores.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.IdentityMappingStore identity_mapping_stores = 1; + * + */ + public int getIdentityMappingStoresCount() { + if (identityMappingStoresBuilder_ == null) { + return identityMappingStores_.size(); + } else { + return identityMappingStoresBuilder_.getCount(); + } + } + + /** + * + * + *
            +     * The Identity Mapping Stores.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.IdentityMappingStore identity_mapping_stores = 1; + * + */ + public com.google.cloud.discoveryengine.v1beta.IdentityMappingStore getIdentityMappingStores( + int index) { + if (identityMappingStoresBuilder_ == null) { + return identityMappingStores_.get(index); + } else { + return identityMappingStoresBuilder_.getMessage(index); + } + } + + /** + * + * + *
            +     * The Identity Mapping Stores.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.IdentityMappingStore identity_mapping_stores = 1; + * + */ + public Builder setIdentityMappingStores( + int index, com.google.cloud.discoveryengine.v1beta.IdentityMappingStore value) { + if (identityMappingStoresBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureIdentityMappingStoresIsMutable(); + identityMappingStores_.set(index, value); + onChanged(); + } else { + identityMappingStoresBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
            +     * The Identity Mapping Stores.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.IdentityMappingStore identity_mapping_stores = 1; + * + */ + public Builder setIdentityMappingStores( + int index, + com.google.cloud.discoveryengine.v1beta.IdentityMappingStore.Builder builderForValue) { + if (identityMappingStoresBuilder_ == null) { + ensureIdentityMappingStoresIsMutable(); + identityMappingStores_.set(index, builderForValue.build()); + onChanged(); + } else { + identityMappingStoresBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
            +     * The Identity Mapping Stores.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.IdentityMappingStore identity_mapping_stores = 1; + * + */ + public Builder addIdentityMappingStores( + com.google.cloud.discoveryengine.v1beta.IdentityMappingStore value) { + if (identityMappingStoresBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureIdentityMappingStoresIsMutable(); + identityMappingStores_.add(value); + onChanged(); + } else { + identityMappingStoresBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
            +     * The Identity Mapping Stores.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.IdentityMappingStore identity_mapping_stores = 1; + * + */ + public Builder addIdentityMappingStores( + int index, com.google.cloud.discoveryengine.v1beta.IdentityMappingStore value) { + if (identityMappingStoresBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureIdentityMappingStoresIsMutable(); + identityMappingStores_.add(index, value); + onChanged(); + } else { + identityMappingStoresBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
            +     * The Identity Mapping Stores.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.IdentityMappingStore identity_mapping_stores = 1; + * + */ + public Builder addIdentityMappingStores( + com.google.cloud.discoveryengine.v1beta.IdentityMappingStore.Builder builderForValue) { + if (identityMappingStoresBuilder_ == null) { + ensureIdentityMappingStoresIsMutable(); + identityMappingStores_.add(builderForValue.build()); + onChanged(); + } else { + identityMappingStoresBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
            +     * The Identity Mapping Stores.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.IdentityMappingStore identity_mapping_stores = 1; + * + */ + public Builder addIdentityMappingStores( + int index, + com.google.cloud.discoveryengine.v1beta.IdentityMappingStore.Builder builderForValue) { + if (identityMappingStoresBuilder_ == null) { + ensureIdentityMappingStoresIsMutable(); + identityMappingStores_.add(index, builderForValue.build()); + onChanged(); + } else { + identityMappingStoresBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
            +     * The Identity Mapping Stores.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.IdentityMappingStore identity_mapping_stores = 1; + * + */ + public Builder addAllIdentityMappingStores( + java.lang.Iterable + values) { + if (identityMappingStoresBuilder_ == null) { + ensureIdentityMappingStoresIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, identityMappingStores_); + onChanged(); + } else { + identityMappingStoresBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
            +     * The Identity Mapping Stores.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.IdentityMappingStore identity_mapping_stores = 1; + * + */ + public Builder clearIdentityMappingStores() { + if (identityMappingStoresBuilder_ == null) { + identityMappingStores_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + identityMappingStoresBuilder_.clear(); + } + return this; + } + + /** + * + * + *
            +     * The Identity Mapping Stores.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.IdentityMappingStore identity_mapping_stores = 1; + * + */ + public Builder removeIdentityMappingStores(int index) { + if (identityMappingStoresBuilder_ == null) { + ensureIdentityMappingStoresIsMutable(); + identityMappingStores_.remove(index); + onChanged(); + } else { + identityMappingStoresBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
            +     * The Identity Mapping Stores.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.IdentityMappingStore identity_mapping_stores = 1; + * + */ + public com.google.cloud.discoveryengine.v1beta.IdentityMappingStore.Builder + getIdentityMappingStoresBuilder(int index) { + return internalGetIdentityMappingStoresFieldBuilder().getBuilder(index); + } + + /** + * + * + *
            +     * The Identity Mapping Stores.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.IdentityMappingStore identity_mapping_stores = 1; + * + */ + public com.google.cloud.discoveryengine.v1beta.IdentityMappingStoreOrBuilder + getIdentityMappingStoresOrBuilder(int index) { + if (identityMappingStoresBuilder_ == null) { + return identityMappingStores_.get(index); + } else { + return identityMappingStoresBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
            +     * The Identity Mapping Stores.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.IdentityMappingStore identity_mapping_stores = 1; + * + */ + public java.util.List< + ? extends com.google.cloud.discoveryengine.v1beta.IdentityMappingStoreOrBuilder> + getIdentityMappingStoresOrBuilderList() { + if (identityMappingStoresBuilder_ != null) { + return identityMappingStoresBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(identityMappingStores_); + } + } + + /** + * + * + *
            +     * The Identity Mapping Stores.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.IdentityMappingStore identity_mapping_stores = 1; + * + */ + public com.google.cloud.discoveryengine.v1beta.IdentityMappingStore.Builder + addIdentityMappingStoresBuilder() { + return internalGetIdentityMappingStoresFieldBuilder() + .addBuilder( + com.google.cloud.discoveryengine.v1beta.IdentityMappingStore.getDefaultInstance()); + } + + /** + * + * + *
            +     * The Identity Mapping Stores.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.IdentityMappingStore identity_mapping_stores = 1; + * + */ + public com.google.cloud.discoveryengine.v1beta.IdentityMappingStore.Builder + addIdentityMappingStoresBuilder(int index) { + return internalGetIdentityMappingStoresFieldBuilder() + .addBuilder( + index, + com.google.cloud.discoveryengine.v1beta.IdentityMappingStore.getDefaultInstance()); + } + + /** + * + * + *
            +     * The Identity Mapping Stores.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.IdentityMappingStore identity_mapping_stores = 1; + * + */ + public java.util.List + getIdentityMappingStoresBuilderList() { + return internalGetIdentityMappingStoresFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.discoveryengine.v1beta.IdentityMappingStore, + com.google.cloud.discoveryengine.v1beta.IdentityMappingStore.Builder, + com.google.cloud.discoveryengine.v1beta.IdentityMappingStoreOrBuilder> + internalGetIdentityMappingStoresFieldBuilder() { + if (identityMappingStoresBuilder_ == null) { + identityMappingStoresBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.discoveryengine.v1beta.IdentityMappingStore, + com.google.cloud.discoveryengine.v1beta.IdentityMappingStore.Builder, + com.google.cloud.discoveryengine.v1beta.IdentityMappingStoreOrBuilder>( + identityMappingStores_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + identityMappingStores_ = null; + } + return identityMappingStoresBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + + /** + * + * + *
            +     * A token that can be sent as `page_token` to retrieve the next page. If this
            +     * field is omitted, 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 sent as `page_token` to retrieve the next page. If this
            +     * field is omitted, 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 sent as `page_token` to retrieve the next page. If this
            +     * field is omitted, 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 sent as `page_token` to retrieve the next page. If this
            +     * field is omitted, 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 sent as `page_token` to retrieve the next page. If this
            +     * field is omitted, 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.cloud.discoveryengine.v1beta.ListIdentityMappingStoresResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.ListIdentityMappingStoresResponse) + private static final com.google.cloud.discoveryengine.v1beta.ListIdentityMappingStoresResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.discoveryengine.v1beta.ListIdentityMappingStoresResponse(); + } + + public static com.google.cloud.discoveryengine.v1beta.ListIdentityMappingStoresResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListIdentityMappingStoresResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.ListIdentityMappingStoresResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ListIdentityMappingStoresResponseOrBuilder.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ListIdentityMappingStoresResponseOrBuilder.java new file mode 100644 index 000000000000..dfaa742207c3 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ListIdentityMappingStoresResponseOrBuilder.java @@ -0,0 +1,124 @@ +/* + * 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/cloud/discoveryengine/v1beta/identity_mapping_store_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.discoveryengine.v1beta; + +@com.google.protobuf.Generated +public interface ListIdentityMappingStoresResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.ListIdentityMappingStoresResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
            +   * The Identity Mapping Stores.
            +   * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.IdentityMappingStore identity_mapping_stores = 1; + * + */ + java.util.List + getIdentityMappingStoresList(); + + /** + * + * + *
            +   * The Identity Mapping Stores.
            +   * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.IdentityMappingStore identity_mapping_stores = 1; + * + */ + com.google.cloud.discoveryengine.v1beta.IdentityMappingStore getIdentityMappingStores(int index); + + /** + * + * + *
            +   * The Identity Mapping Stores.
            +   * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.IdentityMappingStore identity_mapping_stores = 1; + * + */ + int getIdentityMappingStoresCount(); + + /** + * + * + *
            +   * The Identity Mapping Stores.
            +   * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.IdentityMappingStore identity_mapping_stores = 1; + * + */ + java.util.List + getIdentityMappingStoresOrBuilderList(); + + /** + * + * + *
            +   * The Identity Mapping Stores.
            +   * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.IdentityMappingStore identity_mapping_stores = 1; + * + */ + com.google.cloud.discoveryengine.v1beta.IdentityMappingStoreOrBuilder + getIdentityMappingStoresOrBuilder(int index); + + /** + * + * + *
            +   * A token that can be sent as `page_token` to retrieve the next page. If this
            +   * field is omitted, there are no subsequent pages.
            +   * 
            + * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + + /** + * + * + *
            +   * A token that can be sent as `page_token` to retrieve the next page. If this
            +   * field is omitted, there are no subsequent pages.
            +   * 
            + * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ListIdentityMappingsRequest.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ListIdentityMappingsRequest.java new file mode 100644 index 000000000000..1d84a5c23505 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ListIdentityMappingsRequest.java @@ -0,0 +1,967 @@ +/* + * 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/cloud/discoveryengine/v1beta/identity_mapping_store_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.discoveryengine.v1beta; + +/** + * + * + *
            + * Request message for
            + * [IdentityMappingStoreService.ListIdentityMappings][google.cloud.discoveryengine.v1beta.IdentityMappingStoreService.ListIdentityMappings]
            + * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.ListIdentityMappingsRequest} + */ +@com.google.protobuf.Generated +public final class ListIdentityMappingsRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.ListIdentityMappingsRequest) + ListIdentityMappingsRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ListIdentityMappingsRequest"); + } + + // Use ListIdentityMappingsRequest.newBuilder() to construct. + private ListIdentityMappingsRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ListIdentityMappingsRequest() { + identityMappingStore_ = ""; + pageToken_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.IdentityMappingStoreServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_ListIdentityMappingsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.IdentityMappingStoreServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_ListIdentityMappingsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.ListIdentityMappingsRequest.class, + com.google.cloud.discoveryengine.v1beta.ListIdentityMappingsRequest.Builder.class); + } + + public static final int IDENTITY_MAPPING_STORE_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object identityMappingStore_ = ""; + + /** + * + * + *
            +   * Required. The name of the Identity Mapping Store to list Identity Mapping
            +   * Entries in. Format:
            +   * `projects/{project}/locations/{location}/identityMappingStores/{identityMappingStore}`
            +   * 
            + * + * + * string identity_mapping_store = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The identityMappingStore. + */ + @java.lang.Override + public java.lang.String getIdentityMappingStore() { + java.lang.Object ref = identityMappingStore_; + 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(); + identityMappingStore_ = s; + return s; + } + } + + /** + * + * + *
            +   * Required. The name of the Identity Mapping Store to list Identity Mapping
            +   * Entries in. Format:
            +   * `projects/{project}/locations/{location}/identityMappingStores/{identityMappingStore}`
            +   * 
            + * + * + * string identity_mapping_store = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for identityMappingStore. + */ + @java.lang.Override + public com.google.protobuf.ByteString getIdentityMappingStoreBytes() { + java.lang.Object ref = identityMappingStore_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + identityMappingStore_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_ = 0; + + /** + * + * + *
            +   * Maximum number of IdentityMappings to return. If unspecified, defaults
            +   * to 2000. The maximum allowed value is 10000. Values above 10000 will be
            +   * coerced to 10000.
            +   * 
            + * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object pageToken_ = ""; + + /** + * + * + *
            +   * A page token, received from a previous `ListIdentityMappings` call.
            +   * Provide this to retrieve the subsequent page.
            +   *
            +   * When paginating, all other parameters provided to
            +   * `ListIdentityMappings` must match the call that provided the page
            +   * token.
            +   * 
            + * + * string page_token = 3; + * + * @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; + } + } + + /** + * + * + *
            +   * A page token, received from a previous `ListIdentityMappings` call.
            +   * Provide this to retrieve the subsequent page.
            +   *
            +   * When paginating, all other parameters provided to
            +   * `ListIdentityMappings` must match the call that provided the page
            +   * token.
            +   * 
            + * + * string page_token = 3; + * + * @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; + } + } + + 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(identityMappingStore_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, identityMappingStore_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, pageToken_); + } + 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(identityMappingStore_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, identityMappingStore_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, pageToken_); + } + 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.discoveryengine.v1beta.ListIdentityMappingsRequest)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1beta.ListIdentityMappingsRequest other = + (com.google.cloud.discoveryengine.v1beta.ListIdentityMappingsRequest) obj; + + if (!getIdentityMappingStore().equals(other.getIdentityMappingStore())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) 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) + IDENTITY_MAPPING_STORE_FIELD_NUMBER; + hash = (53 * hash) + getIdentityMappingStore().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 = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1beta.ListIdentityMappingsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.ListIdentityMappingsRequest 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.discoveryengine.v1beta.ListIdentityMappingsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.ListIdentityMappingsRequest 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.discoveryengine.v1beta.ListIdentityMappingsRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.ListIdentityMappingsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1beta.ListIdentityMappingsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.ListIdentityMappingsRequest 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.discoveryengine.v1beta.ListIdentityMappingsRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.ListIdentityMappingsRequest + 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.discoveryengine.v1beta.ListIdentityMappingsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.ListIdentityMappingsRequest 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.discoveryengine.v1beta.ListIdentityMappingsRequest 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
            +   * [IdentityMappingStoreService.ListIdentityMappings][google.cloud.discoveryengine.v1beta.IdentityMappingStoreService.ListIdentityMappings]
            +   * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.ListIdentityMappingsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.ListIdentityMappingsRequest) + com.google.cloud.discoveryengine.v1beta.ListIdentityMappingsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.IdentityMappingStoreServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_ListIdentityMappingsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.IdentityMappingStoreServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_ListIdentityMappingsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.ListIdentityMappingsRequest.class, + com.google.cloud.discoveryengine.v1beta.ListIdentityMappingsRequest.Builder.class); + } + + // Construct using + // com.google.cloud.discoveryengine.v1beta.ListIdentityMappingsRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + identityMappingStore_ = ""; + pageSize_ = 0; + pageToken_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1beta.IdentityMappingStoreServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_ListIdentityMappingsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.ListIdentityMappingsRequest + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1beta.ListIdentityMappingsRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.ListIdentityMappingsRequest build() { + com.google.cloud.discoveryengine.v1beta.ListIdentityMappingsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.ListIdentityMappingsRequest buildPartial() { + com.google.cloud.discoveryengine.v1beta.ListIdentityMappingsRequest result = + new com.google.cloud.discoveryengine.v1beta.ListIdentityMappingsRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.discoveryengine.v1beta.ListIdentityMappingsRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.identityMappingStore_ = identityMappingStore_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.pageSize_ = pageSize_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.pageToken_ = pageToken_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.discoveryengine.v1beta.ListIdentityMappingsRequest) { + return mergeFrom( + (com.google.cloud.discoveryengine.v1beta.ListIdentityMappingsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1beta.ListIdentityMappingsRequest other) { + if (other + == com.google.cloud.discoveryengine.v1beta.ListIdentityMappingsRequest + .getDefaultInstance()) return this; + if (!other.getIdentityMappingStore().isEmpty()) { + identityMappingStore_ = other.identityMappingStore_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + bitField0_ |= 0x00000004; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + identityMappingStore_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + pageSize_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object identityMappingStore_ = ""; + + /** + * + * + *
            +     * Required. The name of the Identity Mapping Store to list Identity Mapping
            +     * Entries in. Format:
            +     * `projects/{project}/locations/{location}/identityMappingStores/{identityMappingStore}`
            +     * 
            + * + * + * string identity_mapping_store = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The identityMappingStore. + */ + public java.lang.String getIdentityMappingStore() { + java.lang.Object ref = identityMappingStore_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + identityMappingStore_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
            +     * Required. The name of the Identity Mapping Store to list Identity Mapping
            +     * Entries in. Format:
            +     * `projects/{project}/locations/{location}/identityMappingStores/{identityMappingStore}`
            +     * 
            + * + * + * string identity_mapping_store = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for identityMappingStore. + */ + public com.google.protobuf.ByteString getIdentityMappingStoreBytes() { + java.lang.Object ref = identityMappingStore_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + identityMappingStore_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
            +     * Required. The name of the Identity Mapping Store to list Identity Mapping
            +     * Entries in. Format:
            +     * `projects/{project}/locations/{location}/identityMappingStores/{identityMappingStore}`
            +     * 
            + * + * + * string identity_mapping_store = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The identityMappingStore to set. + * @return This builder for chaining. + */ + public Builder setIdentityMappingStore(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + identityMappingStore_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Required. The name of the Identity Mapping Store to list Identity Mapping
            +     * Entries in. Format:
            +     * `projects/{project}/locations/{location}/identityMappingStores/{identityMappingStore}`
            +     * 
            + * + * + * string identity_mapping_store = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearIdentityMappingStore() { + identityMappingStore_ = getDefaultInstance().getIdentityMappingStore(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
            +     * Required. The name of the Identity Mapping Store to list Identity Mapping
            +     * Entries in. Format:
            +     * `projects/{project}/locations/{location}/identityMappingStores/{identityMappingStore}`
            +     * 
            + * + * + * string identity_mapping_store = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for identityMappingStore to set. + * @return This builder for chaining. + */ + public Builder setIdentityMappingStoreBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + identityMappingStore_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int pageSize_; + + /** + * + * + *
            +     * Maximum number of IdentityMappings to return. If unspecified, defaults
            +     * to 2000. The maximum allowed value is 10000. Values above 10000 will be
            +     * coerced to 10000.
            +     * 
            + * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + /** + * + * + *
            +     * Maximum number of IdentityMappings to return. If unspecified, defaults
            +     * to 2000. The maximum allowed value is 10000. Values above 10000 will be
            +     * coerced to 10000.
            +     * 
            + * + * int32 page_size = 2; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Maximum number of IdentityMappings to return. If unspecified, defaults
            +     * to 2000. The maximum allowed value is 10000. Values above 10000 will be
            +     * coerced to 10000.
            +     * 
            + * + * int32 page_size = 2; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + bitField0_ = (bitField0_ & ~0x00000002); + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + + /** + * + * + *
            +     * A page token, received from a previous `ListIdentityMappings` call.
            +     * Provide this to retrieve the subsequent page.
            +     *
            +     * When paginating, all other parameters provided to
            +     * `ListIdentityMappings` must match the call that provided the page
            +     * token.
            +     * 
            + * + * string page_token = 3; + * + * @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; + } + } + + /** + * + * + *
            +     * A page token, received from a previous `ListIdentityMappings` call.
            +     * Provide this to retrieve the subsequent page.
            +     *
            +     * When paginating, all other parameters provided to
            +     * `ListIdentityMappings` must match the call that provided the page
            +     * token.
            +     * 
            + * + * string page_token = 3; + * + * @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; + } + } + + /** + * + * + *
            +     * A page token, received from a previous `ListIdentityMappings` call.
            +     * Provide this to retrieve the subsequent page.
            +     *
            +     * When paginating, all other parameters provided to
            +     * `ListIdentityMappings` must match the call that provided the page
            +     * token.
            +     * 
            + * + * string page_token = 3; + * + * @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_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
            +     * A page token, received from a previous `ListIdentityMappings` call.
            +     * Provide this to retrieve the subsequent page.
            +     *
            +     * When paginating, all other parameters provided to
            +     * `ListIdentityMappings` must match the call that provided the page
            +     * token.
            +     * 
            + * + * string page_token = 3; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + pageToken_ = getDefaultInstance().getPageToken(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
            +     * A page token, received from a previous `ListIdentityMappings` call.
            +     * Provide this to retrieve the subsequent page.
            +     *
            +     * When paginating, all other parameters provided to
            +     * `ListIdentityMappings` must match the call that provided the page
            +     * token.
            +     * 
            + * + * string page_token = 3; + * + * @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_ |= 0x00000004; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.ListIdentityMappingsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.ListIdentityMappingsRequest) + private static final com.google.cloud.discoveryengine.v1beta.ListIdentityMappingsRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.discoveryengine.v1beta.ListIdentityMappingsRequest(); + } + + public static com.google.cloud.discoveryengine.v1beta.ListIdentityMappingsRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListIdentityMappingsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.ListIdentityMappingsRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ListIdentityMappingsRequestOrBuilder.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ListIdentityMappingsRequestOrBuilder.java new file mode 100644 index 000000000000..768073971575 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ListIdentityMappingsRequestOrBuilder.java @@ -0,0 +1,113 @@ +/* + * 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/cloud/discoveryengine/v1beta/identity_mapping_store_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.discoveryengine.v1beta; + +@com.google.protobuf.Generated +public interface ListIdentityMappingsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.ListIdentityMappingsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
            +   * Required. The name of the Identity Mapping Store to list Identity Mapping
            +   * Entries in. Format:
            +   * `projects/{project}/locations/{location}/identityMappingStores/{identityMappingStore}`
            +   * 
            + * + * + * string identity_mapping_store = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The identityMappingStore. + */ + java.lang.String getIdentityMappingStore(); + + /** + * + * + *
            +   * Required. The name of the Identity Mapping Store to list Identity Mapping
            +   * Entries in. Format:
            +   * `projects/{project}/locations/{location}/identityMappingStores/{identityMappingStore}`
            +   * 
            + * + * + * string identity_mapping_store = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for identityMappingStore. + */ + com.google.protobuf.ByteString getIdentityMappingStoreBytes(); + + /** + * + * + *
            +   * Maximum number of IdentityMappings to return. If unspecified, defaults
            +   * to 2000. The maximum allowed value is 10000. Values above 10000 will be
            +   * coerced to 10000.
            +   * 
            + * + * int32 page_size = 2; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
            +   * A page token, received from a previous `ListIdentityMappings` call.
            +   * Provide this to retrieve the subsequent page.
            +   *
            +   * When paginating, all other parameters provided to
            +   * `ListIdentityMappings` must match the call that provided the page
            +   * token.
            +   * 
            + * + * string page_token = 3; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + + /** + * + * + *
            +   * A page token, received from a previous `ListIdentityMappings` call.
            +   * Provide this to retrieve the subsequent page.
            +   *
            +   * When paginating, all other parameters provided to
            +   * `ListIdentityMappings` must match the call that provided the page
            +   * token.
            +   * 
            + * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ListIdentityMappingsResponse.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ListIdentityMappingsResponse.java new file mode 100644 index 000000000000..2852664bc5ab --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ListIdentityMappingsResponse.java @@ -0,0 +1,1209 @@ +/* + * 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/cloud/discoveryengine/v1beta/identity_mapping_store_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.discoveryengine.v1beta; + +/** + * + * + *
            + * Response message for
            + * [IdentityMappingStoreService.ListIdentityMappings][google.cloud.discoveryengine.v1beta.IdentityMappingStoreService.ListIdentityMappings]
            + * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.ListIdentityMappingsResponse} + */ +@com.google.protobuf.Generated +public final class ListIdentityMappingsResponse extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.ListIdentityMappingsResponse) + ListIdentityMappingsResponseOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ListIdentityMappingsResponse"); + } + + // Use ListIdentityMappingsResponse.newBuilder() to construct. + private ListIdentityMappingsResponse(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ListIdentityMappingsResponse() { + identityMappingEntries_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.IdentityMappingStoreServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_ListIdentityMappingsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.IdentityMappingStoreServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_ListIdentityMappingsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.ListIdentityMappingsResponse.class, + com.google.cloud.discoveryengine.v1beta.ListIdentityMappingsResponse.Builder.class); + } + + public static final int IDENTITY_MAPPING_ENTRIES_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List + identityMappingEntries_; + + /** + * + * + *
            +   * The Identity Mapping Entries.
            +   * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.IdentityMappingEntry identity_mapping_entries = 1; + * + */ + @java.lang.Override + public java.util.List + getIdentityMappingEntriesList() { + return identityMappingEntries_; + } + + /** + * + * + *
            +   * The Identity Mapping Entries.
            +   * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.IdentityMappingEntry identity_mapping_entries = 1; + * + */ + @java.lang.Override + public java.util.List< + ? extends com.google.cloud.discoveryengine.v1beta.IdentityMappingEntryOrBuilder> + getIdentityMappingEntriesOrBuilderList() { + return identityMappingEntries_; + } + + /** + * + * + *
            +   * The Identity Mapping Entries.
            +   * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.IdentityMappingEntry identity_mapping_entries = 1; + * + */ + @java.lang.Override + public int getIdentityMappingEntriesCount() { + return identityMappingEntries_.size(); + } + + /** + * + * + *
            +   * The Identity Mapping Entries.
            +   * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.IdentityMappingEntry identity_mapping_entries = 1; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.IdentityMappingEntry getIdentityMappingEntries( + int index) { + return identityMappingEntries_.get(index); + } + + /** + * + * + *
            +   * The Identity Mapping Entries.
            +   * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.IdentityMappingEntry identity_mapping_entries = 1; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.IdentityMappingEntryOrBuilder + getIdentityMappingEntriesOrBuilder(int index) { + return identityMappingEntries_.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 sent as `page_token` to retrieve the next page. If this
            +   * field is omitted, 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 sent as `page_token` to retrieve the next page. If this
            +   * field is omitted, 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 < identityMappingEntries_.size(); i++) { + output.writeMessage(1, identityMappingEntries_.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 < identityMappingEntries_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 1, identityMappingEntries_.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.cloud.discoveryengine.v1beta.ListIdentityMappingsResponse)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1beta.ListIdentityMappingsResponse other = + (com.google.cloud.discoveryengine.v1beta.ListIdentityMappingsResponse) obj; + + if (!getIdentityMappingEntriesList().equals(other.getIdentityMappingEntriesList())) + 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 (getIdentityMappingEntriesCount() > 0) { + hash = (37 * hash) + IDENTITY_MAPPING_ENTRIES_FIELD_NUMBER; + hash = (53 * hash) + getIdentityMappingEntriesList().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.cloud.discoveryengine.v1beta.ListIdentityMappingsResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.ListIdentityMappingsResponse 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.discoveryengine.v1beta.ListIdentityMappingsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.ListIdentityMappingsResponse 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.discoveryengine.v1beta.ListIdentityMappingsResponse parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.ListIdentityMappingsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1beta.ListIdentityMappingsResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.ListIdentityMappingsResponse 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.discoveryengine.v1beta.ListIdentityMappingsResponse + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.ListIdentityMappingsResponse + 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.discoveryengine.v1beta.ListIdentityMappingsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.ListIdentityMappingsResponse 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.discoveryengine.v1beta.ListIdentityMappingsResponse 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
            +   * [IdentityMappingStoreService.ListIdentityMappings][google.cloud.discoveryengine.v1beta.IdentityMappingStoreService.ListIdentityMappings]
            +   * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.ListIdentityMappingsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.ListIdentityMappingsResponse) + com.google.cloud.discoveryengine.v1beta.ListIdentityMappingsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.IdentityMappingStoreServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_ListIdentityMappingsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.IdentityMappingStoreServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_ListIdentityMappingsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.ListIdentityMappingsResponse.class, + com.google.cloud.discoveryengine.v1beta.ListIdentityMappingsResponse.Builder.class); + } + + // Construct using + // com.google.cloud.discoveryengine.v1beta.ListIdentityMappingsResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (identityMappingEntriesBuilder_ == null) { + identityMappingEntries_ = java.util.Collections.emptyList(); + } else { + identityMappingEntries_ = null; + identityMappingEntriesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + nextPageToken_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1beta.IdentityMappingStoreServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_ListIdentityMappingsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.ListIdentityMappingsResponse + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1beta.ListIdentityMappingsResponse + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.ListIdentityMappingsResponse build() { + com.google.cloud.discoveryengine.v1beta.ListIdentityMappingsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.ListIdentityMappingsResponse buildPartial() { + com.google.cloud.discoveryengine.v1beta.ListIdentityMappingsResponse result = + new com.google.cloud.discoveryengine.v1beta.ListIdentityMappingsResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.discoveryengine.v1beta.ListIdentityMappingsResponse result) { + if (identityMappingEntriesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + identityMappingEntries_ = java.util.Collections.unmodifiableList(identityMappingEntries_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.identityMappingEntries_ = identityMappingEntries_; + } else { + result.identityMappingEntries_ = identityMappingEntriesBuilder_.build(); + } + } + + private void buildPartial0( + com.google.cloud.discoveryengine.v1beta.ListIdentityMappingsResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.nextPageToken_ = nextPageToken_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.discoveryengine.v1beta.ListIdentityMappingsResponse) { + return mergeFrom( + (com.google.cloud.discoveryengine.v1beta.ListIdentityMappingsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1beta.ListIdentityMappingsResponse other) { + if (other + == com.google.cloud.discoveryengine.v1beta.ListIdentityMappingsResponse + .getDefaultInstance()) return this; + if (identityMappingEntriesBuilder_ == null) { + if (!other.identityMappingEntries_.isEmpty()) { + if (identityMappingEntries_.isEmpty()) { + identityMappingEntries_ = other.identityMappingEntries_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureIdentityMappingEntriesIsMutable(); + identityMappingEntries_.addAll(other.identityMappingEntries_); + } + onChanged(); + } + } else { + if (!other.identityMappingEntries_.isEmpty()) { + if (identityMappingEntriesBuilder_.isEmpty()) { + identityMappingEntriesBuilder_.dispose(); + identityMappingEntriesBuilder_ = null; + identityMappingEntries_ = other.identityMappingEntries_; + bitField0_ = (bitField0_ & ~0x00000001); + identityMappingEntriesBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetIdentityMappingEntriesFieldBuilder() + : null; + } else { + identityMappingEntriesBuilder_.addAllMessages(other.identityMappingEntries_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.discoveryengine.v1beta.IdentityMappingEntry m = + input.readMessage( + com.google.cloud.discoveryengine.v1beta.IdentityMappingEntry.parser(), + extensionRegistry); + if (identityMappingEntriesBuilder_ == null) { + ensureIdentityMappingEntriesIsMutable(); + identityMappingEntries_.add(m); + } else { + identityMappingEntriesBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List + identityMappingEntries_ = java.util.Collections.emptyList(); + + private void ensureIdentityMappingEntriesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + identityMappingEntries_ = + new java.util.ArrayList( + identityMappingEntries_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.discoveryengine.v1beta.IdentityMappingEntry, + com.google.cloud.discoveryengine.v1beta.IdentityMappingEntry.Builder, + com.google.cloud.discoveryengine.v1beta.IdentityMappingEntryOrBuilder> + identityMappingEntriesBuilder_; + + /** + * + * + *
            +     * The Identity Mapping Entries.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.IdentityMappingEntry identity_mapping_entries = 1; + * + */ + public java.util.List + getIdentityMappingEntriesList() { + if (identityMappingEntriesBuilder_ == null) { + return java.util.Collections.unmodifiableList(identityMappingEntries_); + } else { + return identityMappingEntriesBuilder_.getMessageList(); + } + } + + /** + * + * + *
            +     * The Identity Mapping Entries.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.IdentityMappingEntry identity_mapping_entries = 1; + * + */ + public int getIdentityMappingEntriesCount() { + if (identityMappingEntriesBuilder_ == null) { + return identityMappingEntries_.size(); + } else { + return identityMappingEntriesBuilder_.getCount(); + } + } + + /** + * + * + *
            +     * The Identity Mapping Entries.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.IdentityMappingEntry identity_mapping_entries = 1; + * + */ + public com.google.cloud.discoveryengine.v1beta.IdentityMappingEntry getIdentityMappingEntries( + int index) { + if (identityMappingEntriesBuilder_ == null) { + return identityMappingEntries_.get(index); + } else { + return identityMappingEntriesBuilder_.getMessage(index); + } + } + + /** + * + * + *
            +     * The Identity Mapping Entries.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.IdentityMappingEntry identity_mapping_entries = 1; + * + */ + public Builder setIdentityMappingEntries( + int index, com.google.cloud.discoveryengine.v1beta.IdentityMappingEntry value) { + if (identityMappingEntriesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureIdentityMappingEntriesIsMutable(); + identityMappingEntries_.set(index, value); + onChanged(); + } else { + identityMappingEntriesBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
            +     * The Identity Mapping Entries.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.IdentityMappingEntry identity_mapping_entries = 1; + * + */ + public Builder setIdentityMappingEntries( + int index, + com.google.cloud.discoveryengine.v1beta.IdentityMappingEntry.Builder builderForValue) { + if (identityMappingEntriesBuilder_ == null) { + ensureIdentityMappingEntriesIsMutable(); + identityMappingEntries_.set(index, builderForValue.build()); + onChanged(); + } else { + identityMappingEntriesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
            +     * The Identity Mapping Entries.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.IdentityMappingEntry identity_mapping_entries = 1; + * + */ + public Builder addIdentityMappingEntries( + com.google.cloud.discoveryengine.v1beta.IdentityMappingEntry value) { + if (identityMappingEntriesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureIdentityMappingEntriesIsMutable(); + identityMappingEntries_.add(value); + onChanged(); + } else { + identityMappingEntriesBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
            +     * The Identity Mapping Entries.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.IdentityMappingEntry identity_mapping_entries = 1; + * + */ + public Builder addIdentityMappingEntries( + int index, com.google.cloud.discoveryengine.v1beta.IdentityMappingEntry value) { + if (identityMappingEntriesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureIdentityMappingEntriesIsMutable(); + identityMappingEntries_.add(index, value); + onChanged(); + } else { + identityMappingEntriesBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
            +     * The Identity Mapping Entries.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.IdentityMappingEntry identity_mapping_entries = 1; + * + */ + public Builder addIdentityMappingEntries( + com.google.cloud.discoveryengine.v1beta.IdentityMappingEntry.Builder builderForValue) { + if (identityMappingEntriesBuilder_ == null) { + ensureIdentityMappingEntriesIsMutable(); + identityMappingEntries_.add(builderForValue.build()); + onChanged(); + } else { + identityMappingEntriesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
            +     * The Identity Mapping Entries.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.IdentityMappingEntry identity_mapping_entries = 1; + * + */ + public Builder addIdentityMappingEntries( + int index, + com.google.cloud.discoveryengine.v1beta.IdentityMappingEntry.Builder builderForValue) { + if (identityMappingEntriesBuilder_ == null) { + ensureIdentityMappingEntriesIsMutable(); + identityMappingEntries_.add(index, builderForValue.build()); + onChanged(); + } else { + identityMappingEntriesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
            +     * The Identity Mapping Entries.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.IdentityMappingEntry identity_mapping_entries = 1; + * + */ + public Builder addAllIdentityMappingEntries( + java.lang.Iterable + values) { + if (identityMappingEntriesBuilder_ == null) { + ensureIdentityMappingEntriesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, identityMappingEntries_); + onChanged(); + } else { + identityMappingEntriesBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
            +     * The Identity Mapping Entries.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.IdentityMappingEntry identity_mapping_entries = 1; + * + */ + public Builder clearIdentityMappingEntries() { + if (identityMappingEntriesBuilder_ == null) { + identityMappingEntries_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + identityMappingEntriesBuilder_.clear(); + } + return this; + } + + /** + * + * + *
            +     * The Identity Mapping Entries.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.IdentityMappingEntry identity_mapping_entries = 1; + * + */ + public Builder removeIdentityMappingEntries(int index) { + if (identityMappingEntriesBuilder_ == null) { + ensureIdentityMappingEntriesIsMutable(); + identityMappingEntries_.remove(index); + onChanged(); + } else { + identityMappingEntriesBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
            +     * The Identity Mapping Entries.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.IdentityMappingEntry identity_mapping_entries = 1; + * + */ + public com.google.cloud.discoveryengine.v1beta.IdentityMappingEntry.Builder + getIdentityMappingEntriesBuilder(int index) { + return internalGetIdentityMappingEntriesFieldBuilder().getBuilder(index); + } + + /** + * + * + *
            +     * The Identity Mapping Entries.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.IdentityMappingEntry identity_mapping_entries = 1; + * + */ + public com.google.cloud.discoveryengine.v1beta.IdentityMappingEntryOrBuilder + getIdentityMappingEntriesOrBuilder(int index) { + if (identityMappingEntriesBuilder_ == null) { + return identityMappingEntries_.get(index); + } else { + return identityMappingEntriesBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
            +     * The Identity Mapping Entries.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.IdentityMappingEntry identity_mapping_entries = 1; + * + */ + public java.util.List< + ? extends com.google.cloud.discoveryengine.v1beta.IdentityMappingEntryOrBuilder> + getIdentityMappingEntriesOrBuilderList() { + if (identityMappingEntriesBuilder_ != null) { + return identityMappingEntriesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(identityMappingEntries_); + } + } + + /** + * + * + *
            +     * The Identity Mapping Entries.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.IdentityMappingEntry identity_mapping_entries = 1; + * + */ + public com.google.cloud.discoveryengine.v1beta.IdentityMappingEntry.Builder + addIdentityMappingEntriesBuilder() { + return internalGetIdentityMappingEntriesFieldBuilder() + .addBuilder( + com.google.cloud.discoveryengine.v1beta.IdentityMappingEntry.getDefaultInstance()); + } + + /** + * + * + *
            +     * The Identity Mapping Entries.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.IdentityMappingEntry identity_mapping_entries = 1; + * + */ + public com.google.cloud.discoveryengine.v1beta.IdentityMappingEntry.Builder + addIdentityMappingEntriesBuilder(int index) { + return internalGetIdentityMappingEntriesFieldBuilder() + .addBuilder( + index, + com.google.cloud.discoveryengine.v1beta.IdentityMappingEntry.getDefaultInstance()); + } + + /** + * + * + *
            +     * The Identity Mapping Entries.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.IdentityMappingEntry identity_mapping_entries = 1; + * + */ + public java.util.List + getIdentityMappingEntriesBuilderList() { + return internalGetIdentityMappingEntriesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.discoveryengine.v1beta.IdentityMappingEntry, + com.google.cloud.discoveryengine.v1beta.IdentityMappingEntry.Builder, + com.google.cloud.discoveryengine.v1beta.IdentityMappingEntryOrBuilder> + internalGetIdentityMappingEntriesFieldBuilder() { + if (identityMappingEntriesBuilder_ == null) { + identityMappingEntriesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.discoveryengine.v1beta.IdentityMappingEntry, + com.google.cloud.discoveryengine.v1beta.IdentityMappingEntry.Builder, + com.google.cloud.discoveryengine.v1beta.IdentityMappingEntryOrBuilder>( + identityMappingEntries_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + identityMappingEntries_ = null; + } + return identityMappingEntriesBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + + /** + * + * + *
            +     * A token that can be sent as `page_token` to retrieve the next page. If this
            +     * field is omitted, 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 sent as `page_token` to retrieve the next page. If this
            +     * field is omitted, 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 sent as `page_token` to retrieve the next page. If this
            +     * field is omitted, 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 sent as `page_token` to retrieve the next page. If this
            +     * field is omitted, 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 sent as `page_token` to retrieve the next page. If this
            +     * field is omitted, 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.cloud.discoveryengine.v1beta.ListIdentityMappingsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.ListIdentityMappingsResponse) + private static final com.google.cloud.discoveryengine.v1beta.ListIdentityMappingsResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.discoveryengine.v1beta.ListIdentityMappingsResponse(); + } + + public static com.google.cloud.discoveryengine.v1beta.ListIdentityMappingsResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListIdentityMappingsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.ListIdentityMappingsResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ListIdentityMappingsResponseOrBuilder.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ListIdentityMappingsResponseOrBuilder.java new file mode 100644 index 000000000000..a8d6484d5a71 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ListIdentityMappingsResponseOrBuilder.java @@ -0,0 +1,124 @@ +/* + * 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/cloud/discoveryengine/v1beta/identity_mapping_store_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.discoveryengine.v1beta; + +@com.google.protobuf.Generated +public interface ListIdentityMappingsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.ListIdentityMappingsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
            +   * The Identity Mapping Entries.
            +   * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.IdentityMappingEntry identity_mapping_entries = 1; + * + */ + java.util.List + getIdentityMappingEntriesList(); + + /** + * + * + *
            +   * The Identity Mapping Entries.
            +   * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.IdentityMappingEntry identity_mapping_entries = 1; + * + */ + com.google.cloud.discoveryengine.v1beta.IdentityMappingEntry getIdentityMappingEntries(int index); + + /** + * + * + *
            +   * The Identity Mapping Entries.
            +   * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.IdentityMappingEntry identity_mapping_entries = 1; + * + */ + int getIdentityMappingEntriesCount(); + + /** + * + * + *
            +   * The Identity Mapping Entries.
            +   * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.IdentityMappingEntry identity_mapping_entries = 1; + * + */ + java.util.List + getIdentityMappingEntriesOrBuilderList(); + + /** + * + * + *
            +   * The Identity Mapping Entries.
            +   * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.IdentityMappingEntry identity_mapping_entries = 1; + * + */ + com.google.cloud.discoveryengine.v1beta.IdentityMappingEntryOrBuilder + getIdentityMappingEntriesOrBuilder(int index); + + /** + * + * + *
            +   * A token that can be sent as `page_token` to retrieve the next page. If this
            +   * field is omitted, there are no subsequent pages.
            +   * 
            + * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + + /** + * + * + *
            +   * A token that can be sent as `page_token` to retrieve the next page. If this
            +   * field is omitted, there are no subsequent pages.
            +   * 
            + * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ListLicenseConfigsRequest.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ListLicenseConfigsRequest.java new file mode 100644 index 000000000000..c88d93997a11 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ListLicenseConfigsRequest.java @@ -0,0 +1,1197 @@ +/* + * 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/cloud/discoveryengine/v1beta/license_config_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.discoveryengine.v1beta; + +/** + * + * + *
            + * Request message for
            + * [LicenseConfigService.ListLicenseConfigs][google.cloud.discoveryengine.v1beta.LicenseConfigService.ListLicenseConfigs]
            + * method.
            + * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.ListLicenseConfigsRequest} + */ +@com.google.protobuf.Generated +public final class ListLicenseConfigsRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.ListLicenseConfigsRequest) + ListLicenseConfigsRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ListLicenseConfigsRequest"); + } + + // Use ListLicenseConfigsRequest.newBuilder() to construct. + private ListLicenseConfigsRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ListLicenseConfigsRequest() { + parent_ = ""; + pageToken_ = ""; + filter_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.LicenseConfigServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_ListLicenseConfigsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.LicenseConfigServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_ListLicenseConfigsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.ListLicenseConfigsRequest.class, + com.google.cloud.discoveryengine.v1beta.ListLicenseConfigsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + + /** + * + * + *
            +   * Required. The parent branch resource name, such as
            +   * `projects/{project}/locations/{location}`.
            +   * 
            + * + * + * 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 parent branch resource name, such as
            +   * `projects/{project}/locations/{location}`.
            +   * 
            + * + * + * 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 PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_ = 0; + + /** + * + * + *
            +   * Optional. Not supported.
            +   * 
            + * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object pageToken_ = ""; + + /** + * + * + *
            +   * Optional. Not supported.
            +   * 
            + * + * string page_token = 3 [(.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. Not supported.
            +   * 
            + * + * string page_token = 3 [(.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 FILTER_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object filter_ = ""; + + /** + * + * + *
            +   * Optional. The filter to apply to the list results.
            +   *
            +   * The supported fields are:
            +   *
            +   * * `subscription_tier`
            +   * * `state`
            +   *
            +   * Examples:
            +   *
            +   * * `subscription_tier=SUBSCRIPTION_TIER_SEARCH,state=ACTIVE` - Lists all
            +   * active search license configs.
            +   * * `state=ACTIVE` - Lists all active license configs.
            +   *
            +   * The filter string should be a comma-separated list of field=value pairs.
            +   * 
            + * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
            +   * Optional. The filter to apply to the list results.
            +   *
            +   * The supported fields are:
            +   *
            +   * * `subscription_tier`
            +   * * `state`
            +   *
            +   * Examples:
            +   *
            +   * * `subscription_tier=SUBSCRIPTION_TIER_SEARCH,state=ACTIVE` - Lists all
            +   * active search license configs.
            +   * * `state=ACTIVE` - Lists all active license configs.
            +   *
            +   * The filter string should be a comma-separated list of field=value pairs.
            +   * 
            + * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + 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 (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(filter_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, filter_); + } + 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 (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(filter_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, filter_); + } + 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.discoveryengine.v1beta.ListLicenseConfigsRequest)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1beta.ListLicenseConfigsRequest other = + (com.google.cloud.discoveryengine.v1beta.ListLicenseConfigsRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (!getFilter().equals(other.getFilter())) 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) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (37 * hash) + FILTER_FIELD_NUMBER; + hash = (53 * hash) + getFilter().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1beta.ListLicenseConfigsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.ListLicenseConfigsRequest 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.discoveryengine.v1beta.ListLicenseConfigsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.ListLicenseConfigsRequest 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.discoveryengine.v1beta.ListLicenseConfigsRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.ListLicenseConfigsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1beta.ListLicenseConfigsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.ListLicenseConfigsRequest 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.discoveryengine.v1beta.ListLicenseConfigsRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.ListLicenseConfigsRequest + 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.discoveryengine.v1beta.ListLicenseConfigsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.ListLicenseConfigsRequest 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.discoveryengine.v1beta.ListLicenseConfigsRequest 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
            +   * [LicenseConfigService.ListLicenseConfigs][google.cloud.discoveryengine.v1beta.LicenseConfigService.ListLicenseConfigs]
            +   * method.
            +   * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.ListLicenseConfigsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.ListLicenseConfigsRequest) + com.google.cloud.discoveryengine.v1beta.ListLicenseConfigsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.LicenseConfigServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_ListLicenseConfigsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.LicenseConfigServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_ListLicenseConfigsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.ListLicenseConfigsRequest.class, + com.google.cloud.discoveryengine.v1beta.ListLicenseConfigsRequest.Builder.class); + } + + // Construct using + // com.google.cloud.discoveryengine.v1beta.ListLicenseConfigsRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + pageSize_ = 0; + pageToken_ = ""; + filter_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1beta.LicenseConfigServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_ListLicenseConfigsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.ListLicenseConfigsRequest + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1beta.ListLicenseConfigsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.ListLicenseConfigsRequest build() { + com.google.cloud.discoveryengine.v1beta.ListLicenseConfigsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.ListLicenseConfigsRequest buildPartial() { + com.google.cloud.discoveryengine.v1beta.ListLicenseConfigsRequest result = + new com.google.cloud.discoveryengine.v1beta.ListLicenseConfigsRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.discoveryengine.v1beta.ListLicenseConfigsRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.pageSize_ = pageSize_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.pageToken_ = pageToken_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.filter_ = filter_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.discoveryengine.v1beta.ListLicenseConfigsRequest) { + return mergeFrom((com.google.cloud.discoveryengine.v1beta.ListLicenseConfigsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1beta.ListLicenseConfigsRequest other) { + if (other + == com.google.cloud.discoveryengine.v1beta.ListLicenseConfigsRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getFilter().isEmpty()) { + filter_ = other.filter_; + bitField0_ |= 0x00000008; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + pageSize_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + + /** + * + * + *
            +     * Required. The parent branch resource name, such as
            +     * `projects/{project}/locations/{location}`.
            +     * 
            + * + * + * 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 parent branch resource name, such as
            +     * `projects/{project}/locations/{location}`.
            +     * 
            + * + * + * 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 parent branch resource name, such as
            +     * `projects/{project}/locations/{location}`.
            +     * 
            + * + * + * 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 parent branch resource name, such as
            +     * `projects/{project}/locations/{location}`.
            +     * 
            + * + * + * 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 parent branch resource name, such as
            +     * `projects/{project}/locations/{location}`.
            +     * 
            + * + * + * 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 int pageSize_; + + /** + * + * + *
            +     * Optional. Not supported.
            +     * 
            + * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + /** + * + * + *
            +     * Optional. Not supported.
            +     * 
            + * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Optional. Not supported.
            +     * 
            + * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + bitField0_ = (bitField0_ & ~0x00000002); + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + + /** + * + * + *
            +     * Optional. Not supported.
            +     * 
            + * + * string page_token = 3 [(.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. Not supported.
            +     * 
            + * + * string page_token = 3 [(.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. Not supported.
            +     * 
            + * + * string page_token = 3 [(.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_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Optional. Not supported.
            +     * 
            + * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + pageToken_ = getDefaultInstance().getPageToken(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
            +     * Optional. Not supported.
            +     * 
            + * + * string page_token = 3 [(.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_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object filter_ = ""; + + /** + * + * + *
            +     * Optional. The filter to apply to the list results.
            +     *
            +     * The supported fields are:
            +     *
            +     * * `subscription_tier`
            +     * * `state`
            +     *
            +     * Examples:
            +     *
            +     * * `subscription_tier=SUBSCRIPTION_TIER_SEARCH,state=ACTIVE` - Lists all
            +     * active search license configs.
            +     * * `state=ACTIVE` - Lists all active license configs.
            +     *
            +     * The filter string should be a comma-separated list of field=value pairs.
            +     * 
            + * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
            +     * Optional. The filter to apply to the list results.
            +     *
            +     * The supported fields are:
            +     *
            +     * * `subscription_tier`
            +     * * `state`
            +     *
            +     * Examples:
            +     *
            +     * * `subscription_tier=SUBSCRIPTION_TIER_SEARCH,state=ACTIVE` - Lists all
            +     * active search license configs.
            +     * * `state=ACTIVE` - Lists all active license configs.
            +     *
            +     * The filter string should be a comma-separated list of field=value pairs.
            +     * 
            + * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
            +     * Optional. The filter to apply to the list results.
            +     *
            +     * The supported fields are:
            +     *
            +     * * `subscription_tier`
            +     * * `state`
            +     *
            +     * Examples:
            +     *
            +     * * `subscription_tier=SUBSCRIPTION_TIER_SEARCH,state=ACTIVE` - Lists all
            +     * active search license configs.
            +     * * `state=ACTIVE` - Lists all active license configs.
            +     *
            +     * The filter string should be a comma-separated list of field=value pairs.
            +     * 
            + * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Optional. The filter to apply to the list results.
            +     *
            +     * The supported fields are:
            +     *
            +     * * `subscription_tier`
            +     * * `state`
            +     *
            +     * Examples:
            +     *
            +     * * `subscription_tier=SUBSCRIPTION_TIER_SEARCH,state=ACTIVE` - Lists all
            +     * active search license configs.
            +     * * `state=ACTIVE` - Lists all active license configs.
            +     *
            +     * The filter string should be a comma-separated list of field=value pairs.
            +     * 
            + * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearFilter() { + filter_ = getDefaultInstance().getFilter(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + + /** + * + * + *
            +     * Optional. The filter to apply to the list results.
            +     *
            +     * The supported fields are:
            +     *
            +     * * `subscription_tier`
            +     * * `state`
            +     *
            +     * Examples:
            +     *
            +     * * `subscription_tier=SUBSCRIPTION_TIER_SEARCH,state=ACTIVE` - Lists all
            +     * active search license configs.
            +     * * `state=ACTIVE` - Lists all active license configs.
            +     *
            +     * The filter string should be a comma-separated list of field=value pairs.
            +     * 
            + * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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_ |= 0x00000008; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.ListLicenseConfigsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.ListLicenseConfigsRequest) + private static final com.google.cloud.discoveryengine.v1beta.ListLicenseConfigsRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.discoveryengine.v1beta.ListLicenseConfigsRequest(); + } + + public static com.google.cloud.discoveryengine.v1beta.ListLicenseConfigsRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListLicenseConfigsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.ListLicenseConfigsRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ListLicenseConfigsRequestOrBuilder.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ListLicenseConfigsRequestOrBuilder.java new file mode 100644 index 000000000000..d737e2b82b40 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ListLicenseConfigsRequestOrBuilder.java @@ -0,0 +1,151 @@ +/* + * 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/cloud/discoveryengine/v1beta/license_config_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.discoveryengine.v1beta; + +@com.google.protobuf.Generated +public interface ListLicenseConfigsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.ListLicenseConfigsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
            +   * Required. The parent branch resource name, such as
            +   * `projects/{project}/locations/{location}`.
            +   * 
            + * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + + /** + * + * + *
            +   * Required. The parent branch resource name, such as
            +   * `projects/{project}/locations/{location}`.
            +   * 
            + * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
            +   * Optional. Not supported.
            +   * 
            + * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
            +   * Optional. Not supported.
            +   * 
            + * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + + /** + * + * + *
            +   * Optional. Not supported.
            +   * 
            + * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
            +   * Optional. The filter to apply to the list results.
            +   *
            +   * The supported fields are:
            +   *
            +   * * `subscription_tier`
            +   * * `state`
            +   *
            +   * Examples:
            +   *
            +   * * `subscription_tier=SUBSCRIPTION_TIER_SEARCH,state=ACTIVE` - Lists all
            +   * active search license configs.
            +   * * `state=ACTIVE` - Lists all active license configs.
            +   *
            +   * The filter string should be a comma-separated list of field=value pairs.
            +   * 
            + * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The filter. + */ + java.lang.String getFilter(); + + /** + * + * + *
            +   * Optional. The filter to apply to the list results.
            +   *
            +   * The supported fields are:
            +   *
            +   * * `subscription_tier`
            +   * * `state`
            +   *
            +   * Examples:
            +   *
            +   * * `subscription_tier=SUBSCRIPTION_TIER_SEARCH,state=ACTIVE` - Lists all
            +   * active search license configs.
            +   * * `state=ACTIVE` - Lists all active license configs.
            +   *
            +   * The filter string should be a comma-separated list of field=value pairs.
            +   * 
            + * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for filter. + */ + com.google.protobuf.ByteString getFilterBytes(); +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ListLicenseConfigsResponse.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ListLicenseConfigsResponse.java new file mode 100644 index 000000000000..4ab9e48a6c35 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ListLicenseConfigsResponse.java @@ -0,0 +1,1168 @@ +/* + * 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/cloud/discoveryengine/v1beta/license_config_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.discoveryengine.v1beta; + +/** + * + * + *
            + * Response message for
            + * [LicenseConfigService.ListLicenseConfigs][google.cloud.discoveryengine.v1beta.LicenseConfigService.ListLicenseConfigs]
            + * method.
            + * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.ListLicenseConfigsResponse} + */ +@com.google.protobuf.Generated +public final class ListLicenseConfigsResponse extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.ListLicenseConfigsResponse) + ListLicenseConfigsResponseOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ListLicenseConfigsResponse"); + } + + // Use ListLicenseConfigsResponse.newBuilder() to construct. + private ListLicenseConfigsResponse(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ListLicenseConfigsResponse() { + licenseConfigs_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.LicenseConfigServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_ListLicenseConfigsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.LicenseConfigServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_ListLicenseConfigsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.ListLicenseConfigsResponse.class, + com.google.cloud.discoveryengine.v1beta.ListLicenseConfigsResponse.Builder.class); + } + + public static final int LICENSE_CONFIGS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List licenseConfigs_; + + /** + * + * + *
            +   * All the customer's
            +   * [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig]s.
            +   * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.LicenseConfig license_configs = 1; + */ + @java.lang.Override + public java.util.List + getLicenseConfigsList() { + return licenseConfigs_; + } + + /** + * + * + *
            +   * All the customer's
            +   * [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig]s.
            +   * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.LicenseConfig license_configs = 1; + */ + @java.lang.Override + public java.util.List + getLicenseConfigsOrBuilderList() { + return licenseConfigs_; + } + + /** + * + * + *
            +   * All the customer's
            +   * [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig]s.
            +   * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.LicenseConfig license_configs = 1; + */ + @java.lang.Override + public int getLicenseConfigsCount() { + return licenseConfigs_.size(); + } + + /** + * + * + *
            +   * All the customer's
            +   * [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig]s.
            +   * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.LicenseConfig license_configs = 1; + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.LicenseConfig getLicenseConfigs(int index) { + return licenseConfigs_.get(index); + } + + /** + * + * + *
            +   * All the customer's
            +   * [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig]s.
            +   * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.LicenseConfig license_configs = 1; + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.LicenseConfigOrBuilder getLicenseConfigsOrBuilder( + int index) { + return licenseConfigs_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object nextPageToken_ = ""; + + /** + * + * + *
            +   * Not supported.
            +   * 
            + * + * 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; + } + } + + /** + * + * + *
            +   * Not supported.
            +   * 
            + * + * 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 < licenseConfigs_.size(); i++) { + output.writeMessage(1, licenseConfigs_.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 < licenseConfigs_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, licenseConfigs_.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.cloud.discoveryengine.v1beta.ListLicenseConfigsResponse)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1beta.ListLicenseConfigsResponse other = + (com.google.cloud.discoveryengine.v1beta.ListLicenseConfigsResponse) obj; + + if (!getLicenseConfigsList().equals(other.getLicenseConfigsList())) 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 (getLicenseConfigsCount() > 0) { + hash = (37 * hash) + LICENSE_CONFIGS_FIELD_NUMBER; + hash = (53 * hash) + getLicenseConfigsList().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.cloud.discoveryengine.v1beta.ListLicenseConfigsResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.ListLicenseConfigsResponse 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.discoveryengine.v1beta.ListLicenseConfigsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.ListLicenseConfigsResponse 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.discoveryengine.v1beta.ListLicenseConfigsResponse parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.ListLicenseConfigsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1beta.ListLicenseConfigsResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.ListLicenseConfigsResponse 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.discoveryengine.v1beta.ListLicenseConfigsResponse + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.ListLicenseConfigsResponse + 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.discoveryengine.v1beta.ListLicenseConfigsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.ListLicenseConfigsResponse 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.discoveryengine.v1beta.ListLicenseConfigsResponse 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
            +   * [LicenseConfigService.ListLicenseConfigs][google.cloud.discoveryengine.v1beta.LicenseConfigService.ListLicenseConfigs]
            +   * method.
            +   * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.ListLicenseConfigsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.ListLicenseConfigsResponse) + com.google.cloud.discoveryengine.v1beta.ListLicenseConfigsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.LicenseConfigServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_ListLicenseConfigsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.LicenseConfigServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_ListLicenseConfigsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.ListLicenseConfigsResponse.class, + com.google.cloud.discoveryengine.v1beta.ListLicenseConfigsResponse.Builder.class); + } + + // Construct using + // com.google.cloud.discoveryengine.v1beta.ListLicenseConfigsResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (licenseConfigsBuilder_ == null) { + licenseConfigs_ = java.util.Collections.emptyList(); + } else { + licenseConfigs_ = null; + licenseConfigsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + nextPageToken_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1beta.LicenseConfigServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_ListLicenseConfigsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.ListLicenseConfigsResponse + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1beta.ListLicenseConfigsResponse + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.ListLicenseConfigsResponse build() { + com.google.cloud.discoveryengine.v1beta.ListLicenseConfigsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.ListLicenseConfigsResponse buildPartial() { + com.google.cloud.discoveryengine.v1beta.ListLicenseConfigsResponse result = + new com.google.cloud.discoveryengine.v1beta.ListLicenseConfigsResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.discoveryengine.v1beta.ListLicenseConfigsResponse result) { + if (licenseConfigsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + licenseConfigs_ = java.util.Collections.unmodifiableList(licenseConfigs_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.licenseConfigs_ = licenseConfigs_; + } else { + result.licenseConfigs_ = licenseConfigsBuilder_.build(); + } + } + + private void buildPartial0( + com.google.cloud.discoveryengine.v1beta.ListLicenseConfigsResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.nextPageToken_ = nextPageToken_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.discoveryengine.v1beta.ListLicenseConfigsResponse) { + return mergeFrom( + (com.google.cloud.discoveryengine.v1beta.ListLicenseConfigsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1beta.ListLicenseConfigsResponse other) { + if (other + == com.google.cloud.discoveryengine.v1beta.ListLicenseConfigsResponse + .getDefaultInstance()) return this; + if (licenseConfigsBuilder_ == null) { + if (!other.licenseConfigs_.isEmpty()) { + if (licenseConfigs_.isEmpty()) { + licenseConfigs_ = other.licenseConfigs_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureLicenseConfigsIsMutable(); + licenseConfigs_.addAll(other.licenseConfigs_); + } + onChanged(); + } + } else { + if (!other.licenseConfigs_.isEmpty()) { + if (licenseConfigsBuilder_.isEmpty()) { + licenseConfigsBuilder_.dispose(); + licenseConfigsBuilder_ = null; + licenseConfigs_ = other.licenseConfigs_; + bitField0_ = (bitField0_ & ~0x00000001); + licenseConfigsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetLicenseConfigsFieldBuilder() + : null; + } else { + licenseConfigsBuilder_.addAllMessages(other.licenseConfigs_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.discoveryengine.v1beta.LicenseConfig m = + input.readMessage( + com.google.cloud.discoveryengine.v1beta.LicenseConfig.parser(), + extensionRegistry); + if (licenseConfigsBuilder_ == null) { + ensureLicenseConfigsIsMutable(); + licenseConfigs_.add(m); + } else { + licenseConfigsBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List licenseConfigs_ = + java.util.Collections.emptyList(); + + private void ensureLicenseConfigsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + licenseConfigs_ = + new java.util.ArrayList( + licenseConfigs_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.discoveryengine.v1beta.LicenseConfig, + com.google.cloud.discoveryengine.v1beta.LicenseConfig.Builder, + com.google.cloud.discoveryengine.v1beta.LicenseConfigOrBuilder> + licenseConfigsBuilder_; + + /** + * + * + *
            +     * All the customer's
            +     * [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig]s.
            +     * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.LicenseConfig license_configs = 1; + */ + public java.util.List + getLicenseConfigsList() { + if (licenseConfigsBuilder_ == null) { + return java.util.Collections.unmodifiableList(licenseConfigs_); + } else { + return licenseConfigsBuilder_.getMessageList(); + } + } + + /** + * + * + *
            +     * All the customer's
            +     * [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig]s.
            +     * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.LicenseConfig license_configs = 1; + */ + public int getLicenseConfigsCount() { + if (licenseConfigsBuilder_ == null) { + return licenseConfigs_.size(); + } else { + return licenseConfigsBuilder_.getCount(); + } + } + + /** + * + * + *
            +     * All the customer's
            +     * [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig]s.
            +     * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.LicenseConfig license_configs = 1; + */ + public com.google.cloud.discoveryengine.v1beta.LicenseConfig getLicenseConfigs(int index) { + if (licenseConfigsBuilder_ == null) { + return licenseConfigs_.get(index); + } else { + return licenseConfigsBuilder_.getMessage(index); + } + } + + /** + * + * + *
            +     * All the customer's
            +     * [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig]s.
            +     * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.LicenseConfig license_configs = 1; + */ + public Builder setLicenseConfigs( + int index, com.google.cloud.discoveryengine.v1beta.LicenseConfig value) { + if (licenseConfigsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLicenseConfigsIsMutable(); + licenseConfigs_.set(index, value); + onChanged(); + } else { + licenseConfigsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
            +     * All the customer's
            +     * [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig]s.
            +     * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.LicenseConfig license_configs = 1; + */ + public Builder setLicenseConfigs( + int index, com.google.cloud.discoveryengine.v1beta.LicenseConfig.Builder builderForValue) { + if (licenseConfigsBuilder_ == null) { + ensureLicenseConfigsIsMutable(); + licenseConfigs_.set(index, builderForValue.build()); + onChanged(); + } else { + licenseConfigsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
            +     * All the customer's
            +     * [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig]s.
            +     * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.LicenseConfig license_configs = 1; + */ + public Builder addLicenseConfigs(com.google.cloud.discoveryengine.v1beta.LicenseConfig value) { + if (licenseConfigsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLicenseConfigsIsMutable(); + licenseConfigs_.add(value); + onChanged(); + } else { + licenseConfigsBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
            +     * All the customer's
            +     * [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig]s.
            +     * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.LicenseConfig license_configs = 1; + */ + public Builder addLicenseConfigs( + int index, com.google.cloud.discoveryengine.v1beta.LicenseConfig value) { + if (licenseConfigsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLicenseConfigsIsMutable(); + licenseConfigs_.add(index, value); + onChanged(); + } else { + licenseConfigsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
            +     * All the customer's
            +     * [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig]s.
            +     * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.LicenseConfig license_configs = 1; + */ + public Builder addLicenseConfigs( + com.google.cloud.discoveryengine.v1beta.LicenseConfig.Builder builderForValue) { + if (licenseConfigsBuilder_ == null) { + ensureLicenseConfigsIsMutable(); + licenseConfigs_.add(builderForValue.build()); + onChanged(); + } else { + licenseConfigsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
            +     * All the customer's
            +     * [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig]s.
            +     * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.LicenseConfig license_configs = 1; + */ + public Builder addLicenseConfigs( + int index, com.google.cloud.discoveryengine.v1beta.LicenseConfig.Builder builderForValue) { + if (licenseConfigsBuilder_ == null) { + ensureLicenseConfigsIsMutable(); + licenseConfigs_.add(index, builderForValue.build()); + onChanged(); + } else { + licenseConfigsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
            +     * All the customer's
            +     * [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig]s.
            +     * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.LicenseConfig license_configs = 1; + */ + public Builder addAllLicenseConfigs( + java.lang.Iterable + values) { + if (licenseConfigsBuilder_ == null) { + ensureLicenseConfigsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, licenseConfigs_); + onChanged(); + } else { + licenseConfigsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
            +     * All the customer's
            +     * [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig]s.
            +     * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.LicenseConfig license_configs = 1; + */ + public Builder clearLicenseConfigs() { + if (licenseConfigsBuilder_ == null) { + licenseConfigs_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + licenseConfigsBuilder_.clear(); + } + return this; + } + + /** + * + * + *
            +     * All the customer's
            +     * [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig]s.
            +     * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.LicenseConfig license_configs = 1; + */ + public Builder removeLicenseConfigs(int index) { + if (licenseConfigsBuilder_ == null) { + ensureLicenseConfigsIsMutable(); + licenseConfigs_.remove(index); + onChanged(); + } else { + licenseConfigsBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
            +     * All the customer's
            +     * [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig]s.
            +     * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.LicenseConfig license_configs = 1; + */ + public com.google.cloud.discoveryengine.v1beta.LicenseConfig.Builder getLicenseConfigsBuilder( + int index) { + return internalGetLicenseConfigsFieldBuilder().getBuilder(index); + } + + /** + * + * + *
            +     * All the customer's
            +     * [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig]s.
            +     * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.LicenseConfig license_configs = 1; + */ + public com.google.cloud.discoveryengine.v1beta.LicenseConfigOrBuilder + getLicenseConfigsOrBuilder(int index) { + if (licenseConfigsBuilder_ == null) { + return licenseConfigs_.get(index); + } else { + return licenseConfigsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
            +     * All the customer's
            +     * [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig]s.
            +     * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.LicenseConfig license_configs = 1; + */ + public java.util.List + getLicenseConfigsOrBuilderList() { + if (licenseConfigsBuilder_ != null) { + return licenseConfigsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(licenseConfigs_); + } + } + + /** + * + * + *
            +     * All the customer's
            +     * [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig]s.
            +     * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.LicenseConfig license_configs = 1; + */ + public com.google.cloud.discoveryengine.v1beta.LicenseConfig.Builder + addLicenseConfigsBuilder() { + return internalGetLicenseConfigsFieldBuilder() + .addBuilder(com.google.cloud.discoveryengine.v1beta.LicenseConfig.getDefaultInstance()); + } + + /** + * + * + *
            +     * All the customer's
            +     * [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig]s.
            +     * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.LicenseConfig license_configs = 1; + */ + public com.google.cloud.discoveryengine.v1beta.LicenseConfig.Builder addLicenseConfigsBuilder( + int index) { + return internalGetLicenseConfigsFieldBuilder() + .addBuilder( + index, com.google.cloud.discoveryengine.v1beta.LicenseConfig.getDefaultInstance()); + } + + /** + * + * + *
            +     * All the customer's
            +     * [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig]s.
            +     * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.LicenseConfig license_configs = 1; + */ + public java.util.List + getLicenseConfigsBuilderList() { + return internalGetLicenseConfigsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.discoveryengine.v1beta.LicenseConfig, + com.google.cloud.discoveryengine.v1beta.LicenseConfig.Builder, + com.google.cloud.discoveryengine.v1beta.LicenseConfigOrBuilder> + internalGetLicenseConfigsFieldBuilder() { + if (licenseConfigsBuilder_ == null) { + licenseConfigsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.discoveryengine.v1beta.LicenseConfig, + com.google.cloud.discoveryengine.v1beta.LicenseConfig.Builder, + com.google.cloud.discoveryengine.v1beta.LicenseConfigOrBuilder>( + licenseConfigs_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + licenseConfigs_ = null; + } + return licenseConfigsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + + /** + * + * + *
            +     * Not supported.
            +     * 
            + * + * 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; + } + } + + /** + * + * + *
            +     * Not supported.
            +     * 
            + * + * 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; + } + } + + /** + * + * + *
            +     * Not supported.
            +     * 
            + * + * 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; + } + + /** + * + * + *
            +     * Not supported.
            +     * 
            + * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + nextPageToken_ = getDefaultInstance().getNextPageToken(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
            +     * Not supported.
            +     * 
            + * + * 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.cloud.discoveryengine.v1beta.ListLicenseConfigsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.ListLicenseConfigsResponse) + private static final com.google.cloud.discoveryengine.v1beta.ListLicenseConfigsResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.discoveryengine.v1beta.ListLicenseConfigsResponse(); + } + + public static com.google.cloud.discoveryengine.v1beta.ListLicenseConfigsResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListLicenseConfigsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.ListLicenseConfigsResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ListLicenseConfigsResponseOrBuilder.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ListLicenseConfigsResponseOrBuilder.java new file mode 100644 index 000000000000..bd5c377a1eec --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ListLicenseConfigsResponseOrBuilder.java @@ -0,0 +1,116 @@ +/* + * 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/cloud/discoveryengine/v1beta/license_config_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.discoveryengine.v1beta; + +@com.google.protobuf.Generated +public interface ListLicenseConfigsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.ListLicenseConfigsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
            +   * All the customer's
            +   * [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig]s.
            +   * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.LicenseConfig license_configs = 1; + */ + java.util.List getLicenseConfigsList(); + + /** + * + * + *
            +   * All the customer's
            +   * [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig]s.
            +   * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.LicenseConfig license_configs = 1; + */ + com.google.cloud.discoveryengine.v1beta.LicenseConfig getLicenseConfigs(int index); + + /** + * + * + *
            +   * All the customer's
            +   * [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig]s.
            +   * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.LicenseConfig license_configs = 1; + */ + int getLicenseConfigsCount(); + + /** + * + * + *
            +   * All the customer's
            +   * [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig]s.
            +   * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.LicenseConfig license_configs = 1; + */ + java.util.List + getLicenseConfigsOrBuilderList(); + + /** + * + * + *
            +   * All the customer's
            +   * [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig]s.
            +   * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.LicenseConfig license_configs = 1; + */ + com.google.cloud.discoveryengine.v1beta.LicenseConfigOrBuilder getLicenseConfigsOrBuilder( + int index); + + /** + * + * + *
            +   * Not supported.
            +   * 
            + * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + + /** + * + * + *
            +   * Not supported.
            +   * 
            + * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ListLicenseConfigsUsageStatsRequest.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ListLicenseConfigsUsageStatsRequest.java new file mode 100644 index 000000000000..bbfac12ebc83 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ListLicenseConfigsUsageStatsRequest.java @@ -0,0 +1,646 @@ +/* + * 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/cloud/discoveryengine/v1beta/user_license_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.discoveryengine.v1beta; + +/** + * + * + *
            + * Request message for
            + * [UserLicenseService.ListLicenseConfigsUsageStats][google.cloud.discoveryengine.v1beta.UserLicenseService.ListLicenseConfigsUsageStats]
            + * method.
            + * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.ListLicenseConfigsUsageStatsRequest} + */ +@com.google.protobuf.Generated +public final class ListLicenseConfigsUsageStatsRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.ListLicenseConfigsUsageStatsRequest) + ListLicenseConfigsUsageStatsRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ListLicenseConfigsUsageStatsRequest"); + } + + // Use ListLicenseConfigsUsageStatsRequest.newBuilder() to construct. + private ListLicenseConfigsUsageStatsRequest( + com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ListLicenseConfigsUsageStatsRequest() { + parent_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.UserLicenseServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_ListLicenseConfigsUsageStatsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.UserLicenseServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_ListLicenseConfigsUsageStatsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.ListLicenseConfigsUsageStatsRequest.class, + com.google.cloud.discoveryengine.v1beta.ListLicenseConfigsUsageStatsRequest.Builder + .class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + + /** + * + * + *
            +   * Required. The parent branch resource name, such as
            +   * `projects/{project}/locations/{location}/userStores/{user_store_id}`.
            +   * 
            + * + * + * 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 parent branch resource name, such as
            +   * `projects/{project}/locations/{location}/userStores/{user_store_id}`.
            +   * 
            + * + * + * 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; + } + } + + 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_); + } + 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_); + } + 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.discoveryengine.v1beta.ListLicenseConfigsUsageStatsRequest)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1beta.ListLicenseConfigsUsageStatsRequest other = + (com.google.cloud.discoveryengine.v1beta.ListLicenseConfigsUsageStatsRequest) obj; + + if (!getParent().equals(other.getParent())) 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 = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1beta.ListLicenseConfigsUsageStatsRequest + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.ListLicenseConfigsUsageStatsRequest + 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.discoveryengine.v1beta.ListLicenseConfigsUsageStatsRequest + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.ListLicenseConfigsUsageStatsRequest + 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.discoveryengine.v1beta.ListLicenseConfigsUsageStatsRequest + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.ListLicenseConfigsUsageStatsRequest + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1beta.ListLicenseConfigsUsageStatsRequest + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.ListLicenseConfigsUsageStatsRequest + 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.discoveryengine.v1beta.ListLicenseConfigsUsageStatsRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.ListLicenseConfigsUsageStatsRequest + 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.discoveryengine.v1beta.ListLicenseConfigsUsageStatsRequest + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.ListLicenseConfigsUsageStatsRequest + 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.discoveryengine.v1beta.ListLicenseConfigsUsageStatsRequest 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
            +   * [UserLicenseService.ListLicenseConfigsUsageStats][google.cloud.discoveryengine.v1beta.UserLicenseService.ListLicenseConfigsUsageStats]
            +   * method.
            +   * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.ListLicenseConfigsUsageStatsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.ListLicenseConfigsUsageStatsRequest) + com.google.cloud.discoveryengine.v1beta.ListLicenseConfigsUsageStatsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.UserLicenseServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_ListLicenseConfigsUsageStatsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.UserLicenseServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_ListLicenseConfigsUsageStatsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.ListLicenseConfigsUsageStatsRequest.class, + com.google.cloud.discoveryengine.v1beta.ListLicenseConfigsUsageStatsRequest.Builder + .class); + } + + // Construct using + // com.google.cloud.discoveryengine.v1beta.ListLicenseConfigsUsageStatsRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1beta.UserLicenseServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_ListLicenseConfigsUsageStatsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.ListLicenseConfigsUsageStatsRequest + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1beta.ListLicenseConfigsUsageStatsRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.ListLicenseConfigsUsageStatsRequest build() { + com.google.cloud.discoveryengine.v1beta.ListLicenseConfigsUsageStatsRequest result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.ListLicenseConfigsUsageStatsRequest + buildPartial() { + com.google.cloud.discoveryengine.v1beta.ListLicenseConfigsUsageStatsRequest result = + new com.google.cloud.discoveryengine.v1beta.ListLicenseConfigsUsageStatsRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.discoveryengine.v1beta.ListLicenseConfigsUsageStatsRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.cloud.discoveryengine.v1beta.ListLicenseConfigsUsageStatsRequest) { + return mergeFrom( + (com.google.cloud.discoveryengine.v1beta.ListLicenseConfigsUsageStatsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1beta.ListLicenseConfigsUsageStatsRequest other) { + if (other + == com.google.cloud.discoveryengine.v1beta.ListLicenseConfigsUsageStatsRequest + .getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + + /** + * + * + *
            +     * Required. The parent branch resource name, such as
            +     * `projects/{project}/locations/{location}/userStores/{user_store_id}`.
            +     * 
            + * + * + * 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 parent branch resource name, such as
            +     * `projects/{project}/locations/{location}/userStores/{user_store_id}`.
            +     * 
            + * + * + * 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 parent branch resource name, such as
            +     * `projects/{project}/locations/{location}/userStores/{user_store_id}`.
            +     * 
            + * + * + * 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 parent branch resource name, such as
            +     * `projects/{project}/locations/{location}/userStores/{user_store_id}`.
            +     * 
            + * + * + * 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 parent branch resource name, such as
            +     * `projects/{project}/locations/{location}/userStores/{user_store_id}`.
            +     * 
            + * + * + * 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; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.ListLicenseConfigsUsageStatsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.ListLicenseConfigsUsageStatsRequest) + private static final com.google.cloud.discoveryengine.v1beta.ListLicenseConfigsUsageStatsRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.discoveryengine.v1beta.ListLicenseConfigsUsageStatsRequest(); + } + + public static com.google.cloud.discoveryengine.v1beta.ListLicenseConfigsUsageStatsRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListLicenseConfigsUsageStatsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.ListLicenseConfigsUsageStatsRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ListLicenseConfigsUsageStatsRequestOrBuilder.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ListLicenseConfigsUsageStatsRequestOrBuilder.java new file mode 100644 index 000000000000..742e7a32d8bc --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ListLicenseConfigsUsageStatsRequestOrBuilder.java @@ -0,0 +1,60 @@ +/* + * 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/cloud/discoveryengine/v1beta/user_license_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.discoveryengine.v1beta; + +@com.google.protobuf.Generated +public interface ListLicenseConfigsUsageStatsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.ListLicenseConfigsUsageStatsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
            +   * Required. The parent branch resource name, such as
            +   * `projects/{project}/locations/{location}/userStores/{user_store_id}`.
            +   * 
            + * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + + /** + * + * + *
            +   * Required. The parent branch resource name, such as
            +   * `projects/{project}/locations/{location}/userStores/{user_store_id}`.
            +   * 
            + * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ListLicenseConfigsUsageStatsResponse.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ListLicenseConfigsUsageStatsResponse.java new file mode 100644 index 000000000000..6c477e33ca2c --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ListLicenseConfigsUsageStatsResponse.java @@ -0,0 +1,1054 @@ +/* + * 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/cloud/discoveryengine/v1beta/user_license_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.discoveryengine.v1beta; + +/** + * + * + *
            + * Response message for
            + * [UserLicenseService.ListLicenseConfigsUsageStats][google.cloud.discoveryengine.v1beta.UserLicenseService.ListLicenseConfigsUsageStats]
            + * method.
            + * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.ListLicenseConfigsUsageStatsResponse} + */ +@com.google.protobuf.Generated +public final class ListLicenseConfigsUsageStatsResponse extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.ListLicenseConfigsUsageStatsResponse) + ListLicenseConfigsUsageStatsResponseOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ListLicenseConfigsUsageStatsResponse"); + } + + // Use ListLicenseConfigsUsageStatsResponse.newBuilder() to construct. + private ListLicenseConfigsUsageStatsResponse( + com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ListLicenseConfigsUsageStatsResponse() { + licenseConfigUsageStats_ = java.util.Collections.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.UserLicenseServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_ListLicenseConfigsUsageStatsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.UserLicenseServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_ListLicenseConfigsUsageStatsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.ListLicenseConfigsUsageStatsResponse.class, + com.google.cloud.discoveryengine.v1beta.ListLicenseConfigsUsageStatsResponse.Builder + .class); + } + + public static final int LICENSE_CONFIG_USAGE_STATS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List + licenseConfigUsageStats_; + + /** + * + * + *
            +   * All the customer's
            +   * [LicenseConfigUsageStats][google.cloud.discoveryengine.v1beta.LicenseConfigUsageStats].
            +   * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.LicenseConfigUsageStats license_config_usage_stats = 1; + * + */ + @java.lang.Override + public java.util.List + getLicenseConfigUsageStatsList() { + return licenseConfigUsageStats_; + } + + /** + * + * + *
            +   * All the customer's
            +   * [LicenseConfigUsageStats][google.cloud.discoveryengine.v1beta.LicenseConfigUsageStats].
            +   * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.LicenseConfigUsageStats license_config_usage_stats = 1; + * + */ + @java.lang.Override + public java.util.List< + ? extends com.google.cloud.discoveryengine.v1beta.LicenseConfigUsageStatsOrBuilder> + getLicenseConfigUsageStatsOrBuilderList() { + return licenseConfigUsageStats_; + } + + /** + * + * + *
            +   * All the customer's
            +   * [LicenseConfigUsageStats][google.cloud.discoveryengine.v1beta.LicenseConfigUsageStats].
            +   * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.LicenseConfigUsageStats license_config_usage_stats = 1; + * + */ + @java.lang.Override + public int getLicenseConfigUsageStatsCount() { + return licenseConfigUsageStats_.size(); + } + + /** + * + * + *
            +   * All the customer's
            +   * [LicenseConfigUsageStats][google.cloud.discoveryengine.v1beta.LicenseConfigUsageStats].
            +   * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.LicenseConfigUsageStats license_config_usage_stats = 1; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.LicenseConfigUsageStats getLicenseConfigUsageStats( + int index) { + return licenseConfigUsageStats_.get(index); + } + + /** + * + * + *
            +   * All the customer's
            +   * [LicenseConfigUsageStats][google.cloud.discoveryengine.v1beta.LicenseConfigUsageStats].
            +   * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.LicenseConfigUsageStats license_config_usage_stats = 1; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.LicenseConfigUsageStatsOrBuilder + getLicenseConfigUsageStatsOrBuilder(int index) { + return licenseConfigUsageStats_.get(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 { + for (int i = 0; i < licenseConfigUsageStats_.size(); i++) { + output.writeMessage(1, licenseConfigUsageStats_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < licenseConfigUsageStats_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 1, licenseConfigUsageStats_.get(i)); + } + 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.discoveryengine.v1beta.ListLicenseConfigsUsageStatsResponse)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1beta.ListLicenseConfigsUsageStatsResponse other = + (com.google.cloud.discoveryengine.v1beta.ListLicenseConfigsUsageStatsResponse) obj; + + if (!getLicenseConfigUsageStatsList().equals(other.getLicenseConfigUsageStatsList())) + 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 (getLicenseConfigUsageStatsCount() > 0) { + hash = (37 * hash) + LICENSE_CONFIG_USAGE_STATS_FIELD_NUMBER; + hash = (53 * hash) + getLicenseConfigUsageStatsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1beta.ListLicenseConfigsUsageStatsResponse + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.ListLicenseConfigsUsageStatsResponse + 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.discoveryengine.v1beta.ListLicenseConfigsUsageStatsResponse + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.ListLicenseConfigsUsageStatsResponse + 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.discoveryengine.v1beta.ListLicenseConfigsUsageStatsResponse + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.ListLicenseConfigsUsageStatsResponse + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1beta.ListLicenseConfigsUsageStatsResponse + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.ListLicenseConfigsUsageStatsResponse + 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.discoveryengine.v1beta.ListLicenseConfigsUsageStatsResponse + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.ListLicenseConfigsUsageStatsResponse + 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.discoveryengine.v1beta.ListLicenseConfigsUsageStatsResponse + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.ListLicenseConfigsUsageStatsResponse + 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.discoveryengine.v1beta.ListLicenseConfigsUsageStatsResponse 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
            +   * [UserLicenseService.ListLicenseConfigsUsageStats][google.cloud.discoveryengine.v1beta.UserLicenseService.ListLicenseConfigsUsageStats]
            +   * method.
            +   * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.ListLicenseConfigsUsageStatsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.ListLicenseConfigsUsageStatsResponse) + com.google.cloud.discoveryengine.v1beta.ListLicenseConfigsUsageStatsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.UserLicenseServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_ListLicenseConfigsUsageStatsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.UserLicenseServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_ListLicenseConfigsUsageStatsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.ListLicenseConfigsUsageStatsResponse.class, + com.google.cloud.discoveryengine.v1beta.ListLicenseConfigsUsageStatsResponse.Builder + .class); + } + + // Construct using + // com.google.cloud.discoveryengine.v1beta.ListLicenseConfigsUsageStatsResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (licenseConfigUsageStatsBuilder_ == null) { + licenseConfigUsageStats_ = java.util.Collections.emptyList(); + } else { + licenseConfigUsageStats_ = null; + licenseConfigUsageStatsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1beta.UserLicenseServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_ListLicenseConfigsUsageStatsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.ListLicenseConfigsUsageStatsResponse + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1beta.ListLicenseConfigsUsageStatsResponse + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.ListLicenseConfigsUsageStatsResponse build() { + com.google.cloud.discoveryengine.v1beta.ListLicenseConfigsUsageStatsResponse result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.ListLicenseConfigsUsageStatsResponse + buildPartial() { + com.google.cloud.discoveryengine.v1beta.ListLicenseConfigsUsageStatsResponse result = + new com.google.cloud.discoveryengine.v1beta.ListLicenseConfigsUsageStatsResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.discoveryengine.v1beta.ListLicenseConfigsUsageStatsResponse result) { + if (licenseConfigUsageStatsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + licenseConfigUsageStats_ = + java.util.Collections.unmodifiableList(licenseConfigUsageStats_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.licenseConfigUsageStats_ = licenseConfigUsageStats_; + } else { + result.licenseConfigUsageStats_ = licenseConfigUsageStatsBuilder_.build(); + } + } + + private void buildPartial0( + com.google.cloud.discoveryengine.v1beta.ListLicenseConfigsUsageStatsResponse result) { + int from_bitField0_ = bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.cloud.discoveryengine.v1beta.ListLicenseConfigsUsageStatsResponse) { + return mergeFrom( + (com.google.cloud.discoveryengine.v1beta.ListLicenseConfigsUsageStatsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1beta.ListLicenseConfigsUsageStatsResponse other) { + if (other + == com.google.cloud.discoveryengine.v1beta.ListLicenseConfigsUsageStatsResponse + .getDefaultInstance()) return this; + if (licenseConfigUsageStatsBuilder_ == null) { + if (!other.licenseConfigUsageStats_.isEmpty()) { + if (licenseConfigUsageStats_.isEmpty()) { + licenseConfigUsageStats_ = other.licenseConfigUsageStats_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureLicenseConfigUsageStatsIsMutable(); + licenseConfigUsageStats_.addAll(other.licenseConfigUsageStats_); + } + onChanged(); + } + } else { + if (!other.licenseConfigUsageStats_.isEmpty()) { + if (licenseConfigUsageStatsBuilder_.isEmpty()) { + licenseConfigUsageStatsBuilder_.dispose(); + licenseConfigUsageStatsBuilder_ = null; + licenseConfigUsageStats_ = other.licenseConfigUsageStats_; + bitField0_ = (bitField0_ & ~0x00000001); + licenseConfigUsageStatsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetLicenseConfigUsageStatsFieldBuilder() + : null; + } else { + licenseConfigUsageStatsBuilder_.addAllMessages(other.licenseConfigUsageStats_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.discoveryengine.v1beta.LicenseConfigUsageStats m = + input.readMessage( + com.google.cloud.discoveryengine.v1beta.LicenseConfigUsageStats.parser(), + extensionRegistry); + if (licenseConfigUsageStatsBuilder_ == null) { + ensureLicenseConfigUsageStatsIsMutable(); + licenseConfigUsageStats_.add(m); + } else { + licenseConfigUsageStatsBuilder_.addMessage(m); + } + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List + licenseConfigUsageStats_ = java.util.Collections.emptyList(); + + private void ensureLicenseConfigUsageStatsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + licenseConfigUsageStats_ = + new java.util.ArrayList< + com.google.cloud.discoveryengine.v1beta.LicenseConfigUsageStats>( + licenseConfigUsageStats_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.discoveryengine.v1beta.LicenseConfigUsageStats, + com.google.cloud.discoveryengine.v1beta.LicenseConfigUsageStats.Builder, + com.google.cloud.discoveryengine.v1beta.LicenseConfigUsageStatsOrBuilder> + licenseConfigUsageStatsBuilder_; + + /** + * + * + *
            +     * All the customer's
            +     * [LicenseConfigUsageStats][google.cloud.discoveryengine.v1beta.LicenseConfigUsageStats].
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.LicenseConfigUsageStats license_config_usage_stats = 1; + * + */ + public java.util.List + getLicenseConfigUsageStatsList() { + if (licenseConfigUsageStatsBuilder_ == null) { + return java.util.Collections.unmodifiableList(licenseConfigUsageStats_); + } else { + return licenseConfigUsageStatsBuilder_.getMessageList(); + } + } + + /** + * + * + *
            +     * All the customer's
            +     * [LicenseConfigUsageStats][google.cloud.discoveryengine.v1beta.LicenseConfigUsageStats].
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.LicenseConfigUsageStats license_config_usage_stats = 1; + * + */ + public int getLicenseConfigUsageStatsCount() { + if (licenseConfigUsageStatsBuilder_ == null) { + return licenseConfigUsageStats_.size(); + } else { + return licenseConfigUsageStatsBuilder_.getCount(); + } + } + + /** + * + * + *
            +     * All the customer's
            +     * [LicenseConfigUsageStats][google.cloud.discoveryengine.v1beta.LicenseConfigUsageStats].
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.LicenseConfigUsageStats license_config_usage_stats = 1; + * + */ + public com.google.cloud.discoveryengine.v1beta.LicenseConfigUsageStats + getLicenseConfigUsageStats(int index) { + if (licenseConfigUsageStatsBuilder_ == null) { + return licenseConfigUsageStats_.get(index); + } else { + return licenseConfigUsageStatsBuilder_.getMessage(index); + } + } + + /** + * + * + *
            +     * All the customer's
            +     * [LicenseConfigUsageStats][google.cloud.discoveryengine.v1beta.LicenseConfigUsageStats].
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.LicenseConfigUsageStats license_config_usage_stats = 1; + * + */ + public Builder setLicenseConfigUsageStats( + int index, com.google.cloud.discoveryengine.v1beta.LicenseConfigUsageStats value) { + if (licenseConfigUsageStatsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLicenseConfigUsageStatsIsMutable(); + licenseConfigUsageStats_.set(index, value); + onChanged(); + } else { + licenseConfigUsageStatsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
            +     * All the customer's
            +     * [LicenseConfigUsageStats][google.cloud.discoveryengine.v1beta.LicenseConfigUsageStats].
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.LicenseConfigUsageStats license_config_usage_stats = 1; + * + */ + public Builder setLicenseConfigUsageStats( + int index, + com.google.cloud.discoveryengine.v1beta.LicenseConfigUsageStats.Builder builderForValue) { + if (licenseConfigUsageStatsBuilder_ == null) { + ensureLicenseConfigUsageStatsIsMutable(); + licenseConfigUsageStats_.set(index, builderForValue.build()); + onChanged(); + } else { + licenseConfigUsageStatsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
            +     * All the customer's
            +     * [LicenseConfigUsageStats][google.cloud.discoveryengine.v1beta.LicenseConfigUsageStats].
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.LicenseConfigUsageStats license_config_usage_stats = 1; + * + */ + public Builder addLicenseConfigUsageStats( + com.google.cloud.discoveryengine.v1beta.LicenseConfigUsageStats value) { + if (licenseConfigUsageStatsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLicenseConfigUsageStatsIsMutable(); + licenseConfigUsageStats_.add(value); + onChanged(); + } else { + licenseConfigUsageStatsBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
            +     * All the customer's
            +     * [LicenseConfigUsageStats][google.cloud.discoveryengine.v1beta.LicenseConfigUsageStats].
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.LicenseConfigUsageStats license_config_usage_stats = 1; + * + */ + public Builder addLicenseConfigUsageStats( + int index, com.google.cloud.discoveryengine.v1beta.LicenseConfigUsageStats value) { + if (licenseConfigUsageStatsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLicenseConfigUsageStatsIsMutable(); + licenseConfigUsageStats_.add(index, value); + onChanged(); + } else { + licenseConfigUsageStatsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
            +     * All the customer's
            +     * [LicenseConfigUsageStats][google.cloud.discoveryengine.v1beta.LicenseConfigUsageStats].
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.LicenseConfigUsageStats license_config_usage_stats = 1; + * + */ + public Builder addLicenseConfigUsageStats( + com.google.cloud.discoveryengine.v1beta.LicenseConfigUsageStats.Builder builderForValue) { + if (licenseConfigUsageStatsBuilder_ == null) { + ensureLicenseConfigUsageStatsIsMutable(); + licenseConfigUsageStats_.add(builderForValue.build()); + onChanged(); + } else { + licenseConfigUsageStatsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
            +     * All the customer's
            +     * [LicenseConfigUsageStats][google.cloud.discoveryengine.v1beta.LicenseConfigUsageStats].
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.LicenseConfigUsageStats license_config_usage_stats = 1; + * + */ + public Builder addLicenseConfigUsageStats( + int index, + com.google.cloud.discoveryengine.v1beta.LicenseConfigUsageStats.Builder builderForValue) { + if (licenseConfigUsageStatsBuilder_ == null) { + ensureLicenseConfigUsageStatsIsMutable(); + licenseConfigUsageStats_.add(index, builderForValue.build()); + onChanged(); + } else { + licenseConfigUsageStatsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
            +     * All the customer's
            +     * [LicenseConfigUsageStats][google.cloud.discoveryengine.v1beta.LicenseConfigUsageStats].
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.LicenseConfigUsageStats license_config_usage_stats = 1; + * + */ + public Builder addAllLicenseConfigUsageStats( + java.lang.Iterable< + ? extends com.google.cloud.discoveryengine.v1beta.LicenseConfigUsageStats> + values) { + if (licenseConfigUsageStatsBuilder_ == null) { + ensureLicenseConfigUsageStatsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, licenseConfigUsageStats_); + onChanged(); + } else { + licenseConfigUsageStatsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
            +     * All the customer's
            +     * [LicenseConfigUsageStats][google.cloud.discoveryengine.v1beta.LicenseConfigUsageStats].
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.LicenseConfigUsageStats license_config_usage_stats = 1; + * + */ + public Builder clearLicenseConfigUsageStats() { + if (licenseConfigUsageStatsBuilder_ == null) { + licenseConfigUsageStats_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + licenseConfigUsageStatsBuilder_.clear(); + } + return this; + } + + /** + * + * + *
            +     * All the customer's
            +     * [LicenseConfigUsageStats][google.cloud.discoveryengine.v1beta.LicenseConfigUsageStats].
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.LicenseConfigUsageStats license_config_usage_stats = 1; + * + */ + public Builder removeLicenseConfigUsageStats(int index) { + if (licenseConfigUsageStatsBuilder_ == null) { + ensureLicenseConfigUsageStatsIsMutable(); + licenseConfigUsageStats_.remove(index); + onChanged(); + } else { + licenseConfigUsageStatsBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
            +     * All the customer's
            +     * [LicenseConfigUsageStats][google.cloud.discoveryengine.v1beta.LicenseConfigUsageStats].
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.LicenseConfigUsageStats license_config_usage_stats = 1; + * + */ + public com.google.cloud.discoveryengine.v1beta.LicenseConfigUsageStats.Builder + getLicenseConfigUsageStatsBuilder(int index) { + return internalGetLicenseConfigUsageStatsFieldBuilder().getBuilder(index); + } + + /** + * + * + *
            +     * All the customer's
            +     * [LicenseConfigUsageStats][google.cloud.discoveryengine.v1beta.LicenseConfigUsageStats].
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.LicenseConfigUsageStats license_config_usage_stats = 1; + * + */ + public com.google.cloud.discoveryengine.v1beta.LicenseConfigUsageStatsOrBuilder + getLicenseConfigUsageStatsOrBuilder(int index) { + if (licenseConfigUsageStatsBuilder_ == null) { + return licenseConfigUsageStats_.get(index); + } else { + return licenseConfigUsageStatsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
            +     * All the customer's
            +     * [LicenseConfigUsageStats][google.cloud.discoveryengine.v1beta.LicenseConfigUsageStats].
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.LicenseConfigUsageStats license_config_usage_stats = 1; + * + */ + public java.util.List< + ? extends com.google.cloud.discoveryengine.v1beta.LicenseConfigUsageStatsOrBuilder> + getLicenseConfigUsageStatsOrBuilderList() { + if (licenseConfigUsageStatsBuilder_ != null) { + return licenseConfigUsageStatsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(licenseConfigUsageStats_); + } + } + + /** + * + * + *
            +     * All the customer's
            +     * [LicenseConfigUsageStats][google.cloud.discoveryengine.v1beta.LicenseConfigUsageStats].
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.LicenseConfigUsageStats license_config_usage_stats = 1; + * + */ + public com.google.cloud.discoveryengine.v1beta.LicenseConfigUsageStats.Builder + addLicenseConfigUsageStatsBuilder() { + return internalGetLicenseConfigUsageStatsFieldBuilder() + .addBuilder( + com.google.cloud.discoveryengine.v1beta.LicenseConfigUsageStats.getDefaultInstance()); + } + + /** + * + * + *
            +     * All the customer's
            +     * [LicenseConfigUsageStats][google.cloud.discoveryengine.v1beta.LicenseConfigUsageStats].
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.LicenseConfigUsageStats license_config_usage_stats = 1; + * + */ + public com.google.cloud.discoveryengine.v1beta.LicenseConfigUsageStats.Builder + addLicenseConfigUsageStatsBuilder(int index) { + return internalGetLicenseConfigUsageStatsFieldBuilder() + .addBuilder( + index, + com.google.cloud.discoveryengine.v1beta.LicenseConfigUsageStats.getDefaultInstance()); + } + + /** + * + * + *
            +     * All the customer's
            +     * [LicenseConfigUsageStats][google.cloud.discoveryengine.v1beta.LicenseConfigUsageStats].
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.LicenseConfigUsageStats license_config_usage_stats = 1; + * + */ + public java.util.List + getLicenseConfigUsageStatsBuilderList() { + return internalGetLicenseConfigUsageStatsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.discoveryengine.v1beta.LicenseConfigUsageStats, + com.google.cloud.discoveryengine.v1beta.LicenseConfigUsageStats.Builder, + com.google.cloud.discoveryengine.v1beta.LicenseConfigUsageStatsOrBuilder> + internalGetLicenseConfigUsageStatsFieldBuilder() { + if (licenseConfigUsageStatsBuilder_ == null) { + licenseConfigUsageStatsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.discoveryengine.v1beta.LicenseConfigUsageStats, + com.google.cloud.discoveryengine.v1beta.LicenseConfigUsageStats.Builder, + com.google.cloud.discoveryengine.v1beta.LicenseConfigUsageStatsOrBuilder>( + licenseConfigUsageStats_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + licenseConfigUsageStats_ = null; + } + return licenseConfigUsageStatsBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.ListLicenseConfigsUsageStatsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.ListLicenseConfigsUsageStatsResponse) + private static final com.google.cloud.discoveryengine.v1beta.ListLicenseConfigsUsageStatsResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.discoveryengine.v1beta.ListLicenseConfigsUsageStatsResponse(); + } + + public static com.google.cloud.discoveryengine.v1beta.ListLicenseConfigsUsageStatsResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListLicenseConfigsUsageStatsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.ListLicenseConfigsUsageStatsResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ListLicenseConfigsUsageStatsResponseOrBuilder.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ListLicenseConfigsUsageStatsResponseOrBuilder.java new file mode 100644 index 000000000000..a09a389a05b5 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ListLicenseConfigsUsageStatsResponseOrBuilder.java @@ -0,0 +1,102 @@ +/* + * 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/cloud/discoveryengine/v1beta/user_license_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.discoveryengine.v1beta; + +@com.google.protobuf.Generated +public interface ListLicenseConfigsUsageStatsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.ListLicenseConfigsUsageStatsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
            +   * All the customer's
            +   * [LicenseConfigUsageStats][google.cloud.discoveryengine.v1beta.LicenseConfigUsageStats].
            +   * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.LicenseConfigUsageStats license_config_usage_stats = 1; + * + */ + java.util.List + getLicenseConfigUsageStatsList(); + + /** + * + * + *
            +   * All the customer's
            +   * [LicenseConfigUsageStats][google.cloud.discoveryengine.v1beta.LicenseConfigUsageStats].
            +   * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.LicenseConfigUsageStats license_config_usage_stats = 1; + * + */ + com.google.cloud.discoveryengine.v1beta.LicenseConfigUsageStats getLicenseConfigUsageStats( + int index); + + /** + * + * + *
            +   * All the customer's
            +   * [LicenseConfigUsageStats][google.cloud.discoveryengine.v1beta.LicenseConfigUsageStats].
            +   * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.LicenseConfigUsageStats license_config_usage_stats = 1; + * + */ + int getLicenseConfigUsageStatsCount(); + + /** + * + * + *
            +   * All the customer's
            +   * [LicenseConfigUsageStats][google.cloud.discoveryengine.v1beta.LicenseConfigUsageStats].
            +   * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.LicenseConfigUsageStats license_config_usage_stats = 1; + * + */ + java.util.List + getLicenseConfigUsageStatsOrBuilderList(); + + /** + * + * + *
            +   * All the customer's
            +   * [LicenseConfigUsageStats][google.cloud.discoveryengine.v1beta.LicenseConfigUsageStats].
            +   * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.LicenseConfigUsageStats license_config_usage_stats = 1; + * + */ + com.google.cloud.discoveryengine.v1beta.LicenseConfigUsageStatsOrBuilder + getLicenseConfigUsageStatsOrBuilder(int index); +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ListSessionsRequest.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ListSessionsRequest.java index 2adbbeadee29..43a349caed15 100644 --- a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ListSessionsRequest.java +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ListSessionsRequest.java @@ -217,7 +217,9 @@ public com.google.protobuf.ByteString getPageTokenBytes() { * *
                * A comma-separated list of fields to filter by, in EBNF grammar.
            +   *
                * The supported fields are:
            +   *
                * * `user_pseudo_id`
                * * `state`
                * * `display_name`
            @@ -226,13 +228,18 @@ public com.google.protobuf.ByteString getPageTokenBytes() {
                * * `labels`
                * * `create_time`
                * * `update_time`
            +   * * `collaborative_project`
                *
                * Examples:
            -   * "user_pseudo_id = some_id"
            -   * "display_name = \"some_name\""
            -   * "starred = true"
            -   * "is_pinned=true AND (NOT labels:hidden)"
            -   * "create_time > \"1970-01-01T12:00:00Z\""
            +   *
            +   * * `user_pseudo_id = some_id`
            +   * * `display_name = "some_name"`
            +   * * `starred = true`
            +   * * `is_pinned=true AND (NOT labels:hidden)`
            +   * * `create_time > "1970-01-01T12:00:00Z"`
            +   * * `collaborative_project =
            +   * "projects/123/locations/global/collections/default_collection/engines/"
            +   * "default_engine/collaborative_projects/cp1"`
                * 
            * * string filter = 4; @@ -257,7 +264,9 @@ public java.lang.String getFilter() { * *
                * A comma-separated list of fields to filter by, in EBNF grammar.
            +   *
                * The supported fields are:
            +   *
                * * `user_pseudo_id`
                * * `state`
                * * `display_name`
            @@ -266,13 +275,18 @@ public java.lang.String getFilter() {
                * * `labels`
                * * `create_time`
                * * `update_time`
            +   * * `collaborative_project`
                *
                * Examples:
            -   * "user_pseudo_id = some_id"
            -   * "display_name = \"some_name\""
            -   * "starred = true"
            -   * "is_pinned=true AND (NOT labels:hidden)"
            -   * "create_time > \"1970-01-01T12:00:00Z\""
            +   *
            +   * * `user_pseudo_id = some_id`
            +   * * `display_name = "some_name"`
            +   * * `starred = true`
            +   * * `is_pinned=true AND (NOT labels:hidden)`
            +   * * `create_time > "1970-01-01T12:00:00Z"`
            +   * * `collaborative_project =
            +   * "projects/123/locations/global/collections/default_collection/engines/"
            +   * "default_engine/collaborative_projects/cp1"`
                * 
            * * string filter = 4; @@ -303,18 +317,20 @@ public com.google.protobuf.ByteString getFilterBytes() { *
                * A comma-separated list of fields to order by, sorted in ascending order.
                * Use "desc" after a field name for descending.
            +   *
                * Supported fields:
                *
                * * `update_time`
                * * `create_time`
                * * `session_name`
                * * `is_pinned`
            +   * * `display_name`
                *
                * Example:
                *
            -   * * "update_time desc"
            -   * * "create_time"
            -   * * "is_pinned desc,update_time desc": list sessions by is_pinned first, then
            +   * * `update_time desc`
            +   * * `create_time`
            +   * * `is_pinned desc,update_time desc`: list sessions by is_pinned first, then
                * by update_time.
                * 
            * @@ -341,18 +357,20 @@ public java.lang.String getOrderBy() { *
                * A comma-separated list of fields to order by, sorted in ascending order.
                * Use "desc" after a field name for descending.
            +   *
                * Supported fields:
                *
                * * `update_time`
                * * `create_time`
                * * `session_name`
                * * `is_pinned`
            +   * * `display_name`
                *
                * Example:
                *
            -   * * "update_time desc"
            -   * * "create_time"
            -   * * "is_pinned desc,update_time desc": list sessions by is_pinned first, then
            +   * * `update_time desc`
            +   * * `create_time`
            +   * * `is_pinned desc,update_time desc`: list sessions by is_pinned first, then
                * by update_time.
                * 
            * @@ -1086,7 +1104,9 @@ public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { * *
                  * A comma-separated list of fields to filter by, in EBNF grammar.
            +     *
                  * The supported fields are:
            +     *
                  * * `user_pseudo_id`
                  * * `state`
                  * * `display_name`
            @@ -1095,13 +1115,18 @@ public Builder setPageTokenBytes(com.google.protobuf.ByteString value) {
                  * * `labels`
                  * * `create_time`
                  * * `update_time`
            +     * * `collaborative_project`
                  *
                  * Examples:
            -     * "user_pseudo_id = some_id"
            -     * "display_name = \"some_name\""
            -     * "starred = true"
            -     * "is_pinned=true AND (NOT labels:hidden)"
            -     * "create_time > \"1970-01-01T12:00:00Z\""
            +     *
            +     * * `user_pseudo_id = some_id`
            +     * * `display_name = "some_name"`
            +     * * `starred = true`
            +     * * `is_pinned=true AND (NOT labels:hidden)`
            +     * * `create_time > "1970-01-01T12:00:00Z"`
            +     * * `collaborative_project =
            +     * "projects/123/locations/global/collections/default_collection/engines/"
            +     * "default_engine/collaborative_projects/cp1"`
                  * 
            * * string filter = 4; @@ -1125,7 +1150,9 @@ public java.lang.String getFilter() { * *
                  * A comma-separated list of fields to filter by, in EBNF grammar.
            +     *
                  * The supported fields are:
            +     *
                  * * `user_pseudo_id`
                  * * `state`
                  * * `display_name`
            @@ -1134,13 +1161,18 @@ public java.lang.String getFilter() {
                  * * `labels`
                  * * `create_time`
                  * * `update_time`
            +     * * `collaborative_project`
                  *
                  * Examples:
            -     * "user_pseudo_id = some_id"
            -     * "display_name = \"some_name\""
            -     * "starred = true"
            -     * "is_pinned=true AND (NOT labels:hidden)"
            -     * "create_time > \"1970-01-01T12:00:00Z\""
            +     *
            +     * * `user_pseudo_id = some_id`
            +     * * `display_name = "some_name"`
            +     * * `starred = true`
            +     * * `is_pinned=true AND (NOT labels:hidden)`
            +     * * `create_time > "1970-01-01T12:00:00Z"`
            +     * * `collaborative_project =
            +     * "projects/123/locations/global/collections/default_collection/engines/"
            +     * "default_engine/collaborative_projects/cp1"`
                  * 
            * * string filter = 4; @@ -1164,7 +1196,9 @@ public com.google.protobuf.ByteString getFilterBytes() { * *
                  * A comma-separated list of fields to filter by, in EBNF grammar.
            +     *
                  * The supported fields are:
            +     *
                  * * `user_pseudo_id`
                  * * `state`
                  * * `display_name`
            @@ -1173,13 +1207,18 @@ public com.google.protobuf.ByteString getFilterBytes() {
                  * * `labels`
                  * * `create_time`
                  * * `update_time`
            +     * * `collaborative_project`
                  *
                  * Examples:
            -     * "user_pseudo_id = some_id"
            -     * "display_name = \"some_name\""
            -     * "starred = true"
            -     * "is_pinned=true AND (NOT labels:hidden)"
            -     * "create_time > \"1970-01-01T12:00:00Z\""
            +     *
            +     * * `user_pseudo_id = some_id`
            +     * * `display_name = "some_name"`
            +     * * `starred = true`
            +     * * `is_pinned=true AND (NOT labels:hidden)`
            +     * * `create_time > "1970-01-01T12:00:00Z"`
            +     * * `collaborative_project =
            +     * "projects/123/locations/global/collections/default_collection/engines/"
            +     * "default_engine/collaborative_projects/cp1"`
                  * 
            * * string filter = 4; @@ -1202,7 +1241,9 @@ public Builder setFilter(java.lang.String value) { * *
                  * A comma-separated list of fields to filter by, in EBNF grammar.
            +     *
                  * The supported fields are:
            +     *
                  * * `user_pseudo_id`
                  * * `state`
                  * * `display_name`
            @@ -1211,13 +1252,18 @@ public Builder setFilter(java.lang.String value) {
                  * * `labels`
                  * * `create_time`
                  * * `update_time`
            +     * * `collaborative_project`
                  *
                  * Examples:
            -     * "user_pseudo_id = some_id"
            -     * "display_name = \"some_name\""
            -     * "starred = true"
            -     * "is_pinned=true AND (NOT labels:hidden)"
            -     * "create_time > \"1970-01-01T12:00:00Z\""
            +     *
            +     * * `user_pseudo_id = some_id`
            +     * * `display_name = "some_name"`
            +     * * `starred = true`
            +     * * `is_pinned=true AND (NOT labels:hidden)`
            +     * * `create_time > "1970-01-01T12:00:00Z"`
            +     * * `collaborative_project =
            +     * "projects/123/locations/global/collections/default_collection/engines/"
            +     * "default_engine/collaborative_projects/cp1"`
                  * 
            * * string filter = 4; @@ -1236,7 +1282,9 @@ public Builder clearFilter() { * *
                  * A comma-separated list of fields to filter by, in EBNF grammar.
            +     *
                  * The supported fields are:
            +     *
                  * * `user_pseudo_id`
                  * * `state`
                  * * `display_name`
            @@ -1245,13 +1293,18 @@ public Builder clearFilter() {
                  * * `labels`
                  * * `create_time`
                  * * `update_time`
            +     * * `collaborative_project`
                  *
                  * Examples:
            -     * "user_pseudo_id = some_id"
            -     * "display_name = \"some_name\""
            -     * "starred = true"
            -     * "is_pinned=true AND (NOT labels:hidden)"
            -     * "create_time > \"1970-01-01T12:00:00Z\""
            +     *
            +     * * `user_pseudo_id = some_id`
            +     * * `display_name = "some_name"`
            +     * * `starred = true`
            +     * * `is_pinned=true AND (NOT labels:hidden)`
            +     * * `create_time > "1970-01-01T12:00:00Z"`
            +     * * `collaborative_project =
            +     * "projects/123/locations/global/collections/default_collection/engines/"
            +     * "default_engine/collaborative_projects/cp1"`
                  * 
            * * string filter = 4; @@ -1278,18 +1331,20 @@ public Builder setFilterBytes(com.google.protobuf.ByteString value) { *
                  * A comma-separated list of fields to order by, sorted in ascending order.
                  * Use "desc" after a field name for descending.
            +     *
                  * Supported fields:
                  *
                  * * `update_time`
                  * * `create_time`
                  * * `session_name`
                  * * `is_pinned`
            +     * * `display_name`
                  *
                  * Example:
                  *
            -     * * "update_time desc"
            -     * * "create_time"
            -     * * "is_pinned desc,update_time desc": list sessions by is_pinned first, then
            +     * * `update_time desc`
            +     * * `create_time`
            +     * * `is_pinned desc,update_time desc`: list sessions by is_pinned first, then
                  * by update_time.
                  * 
            * @@ -1315,18 +1370,20 @@ public java.lang.String getOrderBy() { *
                  * A comma-separated list of fields to order by, sorted in ascending order.
                  * Use "desc" after a field name for descending.
            +     *
                  * Supported fields:
                  *
                  * * `update_time`
                  * * `create_time`
                  * * `session_name`
                  * * `is_pinned`
            +     * * `display_name`
                  *
                  * Example:
                  *
            -     * * "update_time desc"
            -     * * "create_time"
            -     * * "is_pinned desc,update_time desc": list sessions by is_pinned first, then
            +     * * `update_time desc`
            +     * * `create_time`
            +     * * `is_pinned desc,update_time desc`: list sessions by is_pinned first, then
                  * by update_time.
                  * 
            * @@ -1352,18 +1409,20 @@ public com.google.protobuf.ByteString getOrderByBytes() { *
                  * A comma-separated list of fields to order by, sorted in ascending order.
                  * Use "desc" after a field name for descending.
            +     *
                  * Supported fields:
                  *
                  * * `update_time`
                  * * `create_time`
                  * * `session_name`
                  * * `is_pinned`
            +     * * `display_name`
                  *
                  * Example:
                  *
            -     * * "update_time desc"
            -     * * "create_time"
            -     * * "is_pinned desc,update_time desc": list sessions by is_pinned first, then
            +     * * `update_time desc`
            +     * * `create_time`
            +     * * `is_pinned desc,update_time desc`: list sessions by is_pinned first, then
                  * by update_time.
                  * 
            * @@ -1388,18 +1447,20 @@ public Builder setOrderBy(java.lang.String value) { *
                  * A comma-separated list of fields to order by, sorted in ascending order.
                  * Use "desc" after a field name for descending.
            +     *
                  * Supported fields:
                  *
                  * * `update_time`
                  * * `create_time`
                  * * `session_name`
                  * * `is_pinned`
            +     * * `display_name`
                  *
                  * Example:
                  *
            -     * * "update_time desc"
            -     * * "create_time"
            -     * * "is_pinned desc,update_time desc": list sessions by is_pinned first, then
            +     * * `update_time desc`
            +     * * `create_time`
            +     * * `is_pinned desc,update_time desc`: list sessions by is_pinned first, then
                  * by update_time.
                  * 
            * @@ -1420,18 +1481,20 @@ public Builder clearOrderBy() { *
                  * A comma-separated list of fields to order by, sorted in ascending order.
                  * Use "desc" after a field name for descending.
            +     *
                  * Supported fields:
                  *
                  * * `update_time`
                  * * `create_time`
                  * * `session_name`
                  * * `is_pinned`
            +     * * `display_name`
                  *
                  * Example:
                  *
            -     * * "update_time desc"
            -     * * "create_time"
            -     * * "is_pinned desc,update_time desc": list sessions by is_pinned first, then
            +     * * `update_time desc`
            +     * * `create_time`
            +     * * `is_pinned desc,update_time desc`: list sessions by is_pinned first, then
                  * by update_time.
                  * 
            * diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ListSessionsRequestOrBuilder.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ListSessionsRequestOrBuilder.java index 46c9dedc6a6b..68ff4241f99e 100644 --- a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ListSessionsRequestOrBuilder.java +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ListSessionsRequestOrBuilder.java @@ -105,7 +105,9 @@ public interface ListSessionsRequestOrBuilder * *
                * A comma-separated list of fields to filter by, in EBNF grammar.
            +   *
                * The supported fields are:
            +   *
                * * `user_pseudo_id`
                * * `state`
                * * `display_name`
            @@ -114,13 +116,18 @@ public interface ListSessionsRequestOrBuilder
                * * `labels`
                * * `create_time`
                * * `update_time`
            +   * * `collaborative_project`
                *
                * Examples:
            -   * "user_pseudo_id = some_id"
            -   * "display_name = \"some_name\""
            -   * "starred = true"
            -   * "is_pinned=true AND (NOT labels:hidden)"
            -   * "create_time > \"1970-01-01T12:00:00Z\""
            +   *
            +   * * `user_pseudo_id = some_id`
            +   * * `display_name = "some_name"`
            +   * * `starred = true`
            +   * * `is_pinned=true AND (NOT labels:hidden)`
            +   * * `create_time > "1970-01-01T12:00:00Z"`
            +   * * `collaborative_project =
            +   * "projects/123/locations/global/collections/default_collection/engines/"
            +   * "default_engine/collaborative_projects/cp1"`
                * 
            * * string filter = 4; @@ -134,7 +141,9 @@ public interface ListSessionsRequestOrBuilder * *
                * A comma-separated list of fields to filter by, in EBNF grammar.
            +   *
                * The supported fields are:
            +   *
                * * `user_pseudo_id`
                * * `state`
                * * `display_name`
            @@ -143,13 +152,18 @@ public interface ListSessionsRequestOrBuilder
                * * `labels`
                * * `create_time`
                * * `update_time`
            +   * * `collaborative_project`
                *
                * Examples:
            -   * "user_pseudo_id = some_id"
            -   * "display_name = \"some_name\""
            -   * "starred = true"
            -   * "is_pinned=true AND (NOT labels:hidden)"
            -   * "create_time > \"1970-01-01T12:00:00Z\""
            +   *
            +   * * `user_pseudo_id = some_id`
            +   * * `display_name = "some_name"`
            +   * * `starred = true`
            +   * * `is_pinned=true AND (NOT labels:hidden)`
            +   * * `create_time > "1970-01-01T12:00:00Z"`
            +   * * `collaborative_project =
            +   * "projects/123/locations/global/collections/default_collection/engines/"
            +   * "default_engine/collaborative_projects/cp1"`
                * 
            * * string filter = 4; @@ -164,18 +178,20 @@ public interface ListSessionsRequestOrBuilder *
                * A comma-separated list of fields to order by, sorted in ascending order.
                * Use "desc" after a field name for descending.
            +   *
                * Supported fields:
                *
                * * `update_time`
                * * `create_time`
                * * `session_name`
                * * `is_pinned`
            +   * * `display_name`
                *
                * Example:
                *
            -   * * "update_time desc"
            -   * * "create_time"
            -   * * "is_pinned desc,update_time desc": list sessions by is_pinned first, then
            +   * * `update_time desc`
            +   * * `create_time`
            +   * * `is_pinned desc,update_time desc`: list sessions by is_pinned first, then
                * by update_time.
                * 
            * @@ -191,18 +207,20 @@ public interface ListSessionsRequestOrBuilder *
                * A comma-separated list of fields to order by, sorted in ascending order.
                * Use "desc" after a field name for descending.
            +   *
                * Supported fields:
                *
                * * `update_time`
                * * `create_time`
                * * `session_name`
                * * `is_pinned`
            +   * * `display_name`
                *
                * Example:
                *
            -   * * "update_time desc"
            -   * * "create_time"
            -   * * "is_pinned desc,update_time desc": list sessions by is_pinned first, then
            +   * * `update_time desc`
            +   * * `create_time`
            +   * * `is_pinned desc,update_time desc`: list sessions by is_pinned first, then
                * by update_time.
                * 
            * diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ListUserLicensesRequest.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ListUserLicensesRequest.java new file mode 100644 index 000000000000..4d87466d2feb --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ListUserLicensesRequest.java @@ -0,0 +1,1566 @@ +/* + * 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/cloud/discoveryengine/v1beta/user_license_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.discoveryengine.v1beta; + +/** + * + * + *
            + * Request message for
            + * [UserLicenseService.ListUserLicenses][google.cloud.discoveryengine.v1beta.UserLicenseService.ListUserLicenses].
            + * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.ListUserLicensesRequest} + */ +@com.google.protobuf.Generated +public final class ListUserLicensesRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.ListUserLicensesRequest) + ListUserLicensesRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ListUserLicensesRequest"); + } + + // Use ListUserLicensesRequest.newBuilder() to construct. + private ListUserLicensesRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ListUserLicensesRequest() { + parent_ = ""; + pageToken_ = ""; + filter_ = ""; + orderBy_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.UserLicenseServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_ListUserLicensesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.UserLicenseServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_ListUserLicensesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.ListUserLicensesRequest.class, + com.google.cloud.discoveryengine.v1beta.ListUserLicensesRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + + /** + * + * + *
            +   * Required. The parent
            +   * [UserStore][google.cloud.discoveryengine.v1beta.UserStore] resource name,
            +   * format:
            +   * `projects/{project}/locations/{location}/userStores/{user_store_id}`.
            +   * 
            + * + * + * 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 parent
            +   * [UserStore][google.cloud.discoveryengine.v1beta.UserStore] resource name,
            +   * format:
            +   * `projects/{project}/locations/{location}/userStores/{user_store_id}`.
            +   * 
            + * + * + * 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 PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_ = 0; + + /** + * + * + *
            +   * Optional. Requested page size. Server may return fewer items than
            +   * requested. If unspecified, defaults to 10. The maximum value is 50; values
            +   * above 50 will be coerced to 50.
            +   *
            +   * If this field is negative, an INVALID_ARGUMENT error is returned.
            +   * 
            + * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object pageToken_ = ""; + + /** + * + * + *
            +   * Optional. A page token, received from a previous `ListUserLicenses` call.
            +   * Provide this to retrieve the subsequent page.
            +   *
            +   * When paginating, all other parameters provided to `ListUserLicenses`
            +   * must match the call that provided the page token.
            +   * 
            + * + * string page_token = 3 [(.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 page token, received from a previous `ListUserLicenses` call.
            +   * Provide this to retrieve the subsequent page.
            +   *
            +   * When paginating, all other parameters provided to `ListUserLicenses`
            +   * must match the call that provided the page token.
            +   * 
            + * + * string page_token = 3 [(.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 FILTER_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object filter_ = ""; + + /** + * + * + *
            +   * Optional. Filter for the list request.
            +   *
            +   * Supported fields:
            +   *
            +   * * `license_assignment_state`
            +   * * `user_principal`
            +   * *
            +   * Examples:
            +   *
            +   * * `license_assignment_state = ASSIGNED` to list assigned user licenses.
            +   * * `license_assignment_state = NO_LICENSE` to list not licensed users.
            +   * * `license_assignment_state = NO_LICENSE_ATTEMPTED_LOGIN` to list users
            +   * who attempted login but no license assigned.
            +   * * `license_assignment_state != NO_LICENSE_ATTEMPTED_LOGIN` to filter
            +   * out users who attempted login but no license assigned.
            +   * * `user_principal = user1@example.com` to list user license for
            +   * `user1@example.com`.
            +   * 
            + * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
            +   * Optional. Filter for the list request.
            +   *
            +   * Supported fields:
            +   *
            +   * * `license_assignment_state`
            +   * * `user_principal`
            +   * *
            +   * Examples:
            +   *
            +   * * `license_assignment_state = ASSIGNED` to list assigned user licenses.
            +   * * `license_assignment_state = NO_LICENSE` to list not licensed users.
            +   * * `license_assignment_state = NO_LICENSE_ATTEMPTED_LOGIN` to list users
            +   * who attempted login but no license assigned.
            +   * * `license_assignment_state != NO_LICENSE_ATTEMPTED_LOGIN` to filter
            +   * out users who attempted login but no license assigned.
            +   * * `user_principal = user1@example.com` to list user license for
            +   * `user1@example.com`.
            +   * 
            + * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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 ORDER_BY_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object orderBy_ = ""; + + /** + * + * + *
            +   * Optional. The order in which the
            +   * [UserLicense][google.cloud.discoveryengine.v1beta.UserLicense]s are listed.
            +   * The value must be a comma-separated list of fields. Default sorting order
            +   * is ascending. To specify descending order for a field, append a " desc"
            +   * suffix. Redundant space characters in the syntax are insignificant.
            +   *
            +   * Supported fields (only `user_principal` is supported for now):
            +   *
            +   * * `user_principal`
            +   *
            +   * If not set, the default ordering is by `user_principal`.
            +   *
            +   * Examples:
            +   *
            +   * * `user_principal` to order by `user_principal` in ascending order.
            +   * * `user_principal desc` to order by `user_principal` in descending order.
            +   * 
            + * + * 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. The order in which the
            +   * [UserLicense][google.cloud.discoveryengine.v1beta.UserLicense]s are listed.
            +   * The value must be a comma-separated list of fields. Default sorting order
            +   * is ascending. To specify descending order for a field, append a " desc"
            +   * suffix. Redundant space characters in the syntax are insignificant.
            +   *
            +   * Supported fields (only `user_principal` is supported for now):
            +   *
            +   * * `user_principal`
            +   *
            +   * If not set, the default ordering is by `user_principal`.
            +   *
            +   * Examples:
            +   *
            +   * * `user_principal` to order by `user_principal` in ascending order.
            +   * * `user_principal desc` to order by `user_principal` in descending order.
            +   * 
            + * + * 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; + } + } + + 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 (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(filter_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, filter_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(orderBy_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 5, orderBy_); + } + 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 (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(filter_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, filter_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(orderBy_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(5, orderBy_); + } + 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.discoveryengine.v1beta.ListUserLicensesRequest)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1beta.ListUserLicensesRequest other = + (com.google.cloud.discoveryengine.v1beta.ListUserLicensesRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (!getFilter().equals(other.getFilter())) return false; + if (!getOrderBy().equals(other.getOrderBy())) 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) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (37 * hash) + FILTER_FIELD_NUMBER; + hash = (53 * hash) + getFilter().hashCode(); + hash = (37 * hash) + ORDER_BY_FIELD_NUMBER; + hash = (53 * hash) + getOrderBy().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1beta.ListUserLicensesRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.ListUserLicensesRequest 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.discoveryengine.v1beta.ListUserLicensesRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.ListUserLicensesRequest 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.discoveryengine.v1beta.ListUserLicensesRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.ListUserLicensesRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1beta.ListUserLicensesRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.ListUserLicensesRequest 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.discoveryengine.v1beta.ListUserLicensesRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.ListUserLicensesRequest 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.discoveryengine.v1beta.ListUserLicensesRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.ListUserLicensesRequest 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.discoveryengine.v1beta.ListUserLicensesRequest 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
            +   * [UserLicenseService.ListUserLicenses][google.cloud.discoveryengine.v1beta.UserLicenseService.ListUserLicenses].
            +   * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.ListUserLicensesRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.ListUserLicensesRequest) + com.google.cloud.discoveryengine.v1beta.ListUserLicensesRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.UserLicenseServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_ListUserLicensesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.UserLicenseServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_ListUserLicensesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.ListUserLicensesRequest.class, + com.google.cloud.discoveryengine.v1beta.ListUserLicensesRequest.Builder.class); + } + + // Construct using com.google.cloud.discoveryengine.v1beta.ListUserLicensesRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + pageSize_ = 0; + pageToken_ = ""; + filter_ = ""; + orderBy_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1beta.UserLicenseServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_ListUserLicensesRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.ListUserLicensesRequest + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1beta.ListUserLicensesRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.ListUserLicensesRequest build() { + com.google.cloud.discoveryengine.v1beta.ListUserLicensesRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.ListUserLicensesRequest buildPartial() { + com.google.cloud.discoveryengine.v1beta.ListUserLicensesRequest result = + new com.google.cloud.discoveryengine.v1beta.ListUserLicensesRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.discoveryengine.v1beta.ListUserLicensesRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.pageSize_ = pageSize_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.pageToken_ = pageToken_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.filter_ = filter_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.orderBy_ = orderBy_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.discoveryengine.v1beta.ListUserLicensesRequest) { + return mergeFrom((com.google.cloud.discoveryengine.v1beta.ListUserLicensesRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1beta.ListUserLicensesRequest other) { + if (other + == com.google.cloud.discoveryengine.v1beta.ListUserLicensesRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getFilter().isEmpty()) { + filter_ = other.filter_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (!other.getOrderBy().isEmpty()) { + orderBy_ = other.orderBy_; + bitField0_ |= 0x00000010; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + pageSize_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + + /** + * + * + *
            +     * Required. The parent
            +     * [UserStore][google.cloud.discoveryengine.v1beta.UserStore] resource name,
            +     * format:
            +     * `projects/{project}/locations/{location}/userStores/{user_store_id}`.
            +     * 
            + * + * + * 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 parent
            +     * [UserStore][google.cloud.discoveryengine.v1beta.UserStore] resource name,
            +     * format:
            +     * `projects/{project}/locations/{location}/userStores/{user_store_id}`.
            +     * 
            + * + * + * 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 parent
            +     * [UserStore][google.cloud.discoveryengine.v1beta.UserStore] resource name,
            +     * format:
            +     * `projects/{project}/locations/{location}/userStores/{user_store_id}`.
            +     * 
            + * + * + * 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 parent
            +     * [UserStore][google.cloud.discoveryengine.v1beta.UserStore] resource name,
            +     * format:
            +     * `projects/{project}/locations/{location}/userStores/{user_store_id}`.
            +     * 
            + * + * + * 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 parent
            +     * [UserStore][google.cloud.discoveryengine.v1beta.UserStore] resource name,
            +     * format:
            +     * `projects/{project}/locations/{location}/userStores/{user_store_id}`.
            +     * 
            + * + * + * 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 int pageSize_; + + /** + * + * + *
            +     * Optional. Requested page size. Server may return fewer items than
            +     * requested. If unspecified, defaults to 10. The maximum value is 50; values
            +     * above 50 will be coerced to 50.
            +     *
            +     * If this field is negative, an INVALID_ARGUMENT error is returned.
            +     * 
            + * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + /** + * + * + *
            +     * Optional. Requested page size. Server may return fewer items than
            +     * requested. If unspecified, defaults to 10. The maximum value is 50; values
            +     * above 50 will be coerced to 50.
            +     *
            +     * If this field is negative, an INVALID_ARGUMENT error is returned.
            +     * 
            + * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Optional. Requested page size. Server may return fewer items than
            +     * requested. If unspecified, defaults to 10. The maximum value is 50; values
            +     * above 50 will be coerced to 50.
            +     *
            +     * If this field is negative, an INVALID_ARGUMENT error is returned.
            +     * 
            + * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + bitField0_ = (bitField0_ & ~0x00000002); + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + + /** + * + * + *
            +     * Optional. A page token, received from a previous `ListUserLicenses` call.
            +     * Provide this to retrieve the subsequent page.
            +     *
            +     * When paginating, all other parameters provided to `ListUserLicenses`
            +     * must match the call that provided the page token.
            +     * 
            + * + * string page_token = 3 [(.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 page token, received from a previous `ListUserLicenses` call.
            +     * Provide this to retrieve the subsequent page.
            +     *
            +     * When paginating, all other parameters provided to `ListUserLicenses`
            +     * must match the call that provided the page token.
            +     * 
            + * + * string page_token = 3 [(.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 page token, received from a previous `ListUserLicenses` call.
            +     * Provide this to retrieve the subsequent page.
            +     *
            +     * When paginating, all other parameters provided to `ListUserLicenses`
            +     * must match the call that provided the page token.
            +     * 
            + * + * string page_token = 3 [(.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_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Optional. A page token, received from a previous `ListUserLicenses` call.
            +     * Provide this to retrieve the subsequent page.
            +     *
            +     * When paginating, all other parameters provided to `ListUserLicenses`
            +     * must match the call that provided the page token.
            +     * 
            + * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + pageToken_ = getDefaultInstance().getPageToken(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
            +     * Optional. A page token, received from a previous `ListUserLicenses` call.
            +     * Provide this to retrieve the subsequent page.
            +     *
            +     * When paginating, all other parameters provided to `ListUserLicenses`
            +     * must match the call that provided the page token.
            +     * 
            + * + * string page_token = 3 [(.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_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object filter_ = ""; + + /** + * + * + *
            +     * Optional. Filter for the list request.
            +     *
            +     * Supported fields:
            +     *
            +     * * `license_assignment_state`
            +     * * `user_principal`
            +     * *
            +     * Examples:
            +     *
            +     * * `license_assignment_state = ASSIGNED` to list assigned user licenses.
            +     * * `license_assignment_state = NO_LICENSE` to list not licensed users.
            +     * * `license_assignment_state = NO_LICENSE_ATTEMPTED_LOGIN` to list users
            +     * who attempted login but no license assigned.
            +     * * `license_assignment_state != NO_LICENSE_ATTEMPTED_LOGIN` to filter
            +     * out users who attempted login but no license assigned.
            +     * * `user_principal = user1@example.com` to list user license for
            +     * `user1@example.com`.
            +     * 
            + * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
            +     * Optional. Filter for the list request.
            +     *
            +     * Supported fields:
            +     *
            +     * * `license_assignment_state`
            +     * * `user_principal`
            +     * *
            +     * Examples:
            +     *
            +     * * `license_assignment_state = ASSIGNED` to list assigned user licenses.
            +     * * `license_assignment_state = NO_LICENSE` to list not licensed users.
            +     * * `license_assignment_state = NO_LICENSE_ATTEMPTED_LOGIN` to list users
            +     * who attempted login but no license assigned.
            +     * * `license_assignment_state != NO_LICENSE_ATTEMPTED_LOGIN` to filter
            +     * out users who attempted login but no license assigned.
            +     * * `user_principal = user1@example.com` to list user license for
            +     * `user1@example.com`.
            +     * 
            + * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
            +     * Optional. Filter for the list request.
            +     *
            +     * Supported fields:
            +     *
            +     * * `license_assignment_state`
            +     * * `user_principal`
            +     * *
            +     * Examples:
            +     *
            +     * * `license_assignment_state = ASSIGNED` to list assigned user licenses.
            +     * * `license_assignment_state = NO_LICENSE` to list not licensed users.
            +     * * `license_assignment_state = NO_LICENSE_ATTEMPTED_LOGIN` to list users
            +     * who attempted login but no license assigned.
            +     * * `license_assignment_state != NO_LICENSE_ATTEMPTED_LOGIN` to filter
            +     * out users who attempted login but no license assigned.
            +     * * `user_principal = user1@example.com` to list user license for
            +     * `user1@example.com`.
            +     * 
            + * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Optional. Filter for the list request.
            +     *
            +     * Supported fields:
            +     *
            +     * * `license_assignment_state`
            +     * * `user_principal`
            +     * *
            +     * Examples:
            +     *
            +     * * `license_assignment_state = ASSIGNED` to list assigned user licenses.
            +     * * `license_assignment_state = NO_LICENSE` to list not licensed users.
            +     * * `license_assignment_state = NO_LICENSE_ATTEMPTED_LOGIN` to list users
            +     * who attempted login but no license assigned.
            +     * * `license_assignment_state != NO_LICENSE_ATTEMPTED_LOGIN` to filter
            +     * out users who attempted login but no license assigned.
            +     * * `user_principal = user1@example.com` to list user license for
            +     * `user1@example.com`.
            +     * 
            + * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearFilter() { + filter_ = getDefaultInstance().getFilter(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + + /** + * + * + *
            +     * Optional. Filter for the list request.
            +     *
            +     * Supported fields:
            +     *
            +     * * `license_assignment_state`
            +     * * `user_principal`
            +     * *
            +     * Examples:
            +     *
            +     * * `license_assignment_state = ASSIGNED` to list assigned user licenses.
            +     * * `license_assignment_state = NO_LICENSE` to list not licensed users.
            +     * * `license_assignment_state = NO_LICENSE_ATTEMPTED_LOGIN` to list users
            +     * who attempted login but no license assigned.
            +     * * `license_assignment_state != NO_LICENSE_ATTEMPTED_LOGIN` to filter
            +     * out users who attempted login but no license assigned.
            +     * * `user_principal = user1@example.com` to list user license for
            +     * `user1@example.com`.
            +     * 
            + * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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_ |= 0x00000008; + onChanged(); + return this; + } + + private java.lang.Object orderBy_ = ""; + + /** + * + * + *
            +     * Optional. The order in which the
            +     * [UserLicense][google.cloud.discoveryengine.v1beta.UserLicense]s are listed.
            +     * The value must be a comma-separated list of fields. Default sorting order
            +     * is ascending. To specify descending order for a field, append a " desc"
            +     * suffix. Redundant space characters in the syntax are insignificant.
            +     *
            +     * Supported fields (only `user_principal` is supported for now):
            +     *
            +     * * `user_principal`
            +     *
            +     * If not set, the default ordering is by `user_principal`.
            +     *
            +     * Examples:
            +     *
            +     * * `user_principal` to order by `user_principal` in ascending order.
            +     * * `user_principal desc` to order by `user_principal` in descending order.
            +     * 
            + * + * 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. The order in which the
            +     * [UserLicense][google.cloud.discoveryengine.v1beta.UserLicense]s are listed.
            +     * The value must be a comma-separated list of fields. Default sorting order
            +     * is ascending. To specify descending order for a field, append a " desc"
            +     * suffix. Redundant space characters in the syntax are insignificant.
            +     *
            +     * Supported fields (only `user_principal` is supported for now):
            +     *
            +     * * `user_principal`
            +     *
            +     * If not set, the default ordering is by `user_principal`.
            +     *
            +     * Examples:
            +     *
            +     * * `user_principal` to order by `user_principal` in ascending order.
            +     * * `user_principal desc` to order by `user_principal` in descending order.
            +     * 
            + * + * 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. The order in which the
            +     * [UserLicense][google.cloud.discoveryengine.v1beta.UserLicense]s are listed.
            +     * The value must be a comma-separated list of fields. Default sorting order
            +     * is ascending. To specify descending order for a field, append a " desc"
            +     * suffix. Redundant space characters in the syntax are insignificant.
            +     *
            +     * Supported fields (only `user_principal` is supported for now):
            +     *
            +     * * `user_principal`
            +     *
            +     * If not set, the default ordering is by `user_principal`.
            +     *
            +     * Examples:
            +     *
            +     * * `user_principal` to order by `user_principal` in ascending order.
            +     * * `user_principal desc` to order by `user_principal` in descending order.
            +     * 
            + * + * 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. The order in which the
            +     * [UserLicense][google.cloud.discoveryengine.v1beta.UserLicense]s are listed.
            +     * The value must be a comma-separated list of fields. Default sorting order
            +     * is ascending. To specify descending order for a field, append a " desc"
            +     * suffix. Redundant space characters in the syntax are insignificant.
            +     *
            +     * Supported fields (only `user_principal` is supported for now):
            +     *
            +     * * `user_principal`
            +     *
            +     * If not set, the default ordering is by `user_principal`.
            +     *
            +     * Examples:
            +     *
            +     * * `user_principal` to order by `user_principal` in ascending order.
            +     * * `user_principal desc` to order by `user_principal` in descending order.
            +     * 
            + * + * 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. The order in which the
            +     * [UserLicense][google.cloud.discoveryengine.v1beta.UserLicense]s are listed.
            +     * The value must be a comma-separated list of fields. Default sorting order
            +     * is ascending. To specify descending order for a field, append a " desc"
            +     * suffix. Redundant space characters in the syntax are insignificant.
            +     *
            +     * Supported fields (only `user_principal` is supported for now):
            +     *
            +     * * `user_principal`
            +     *
            +     * If not set, the default ordering is by `user_principal`.
            +     *
            +     * Examples:
            +     *
            +     * * `user_principal` to order by `user_principal` in ascending order.
            +     * * `user_principal desc` to order by `user_principal` in descending order.
            +     * 
            + * + * 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; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.ListUserLicensesRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.ListUserLicensesRequest) + private static final com.google.cloud.discoveryengine.v1beta.ListUserLicensesRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.discoveryengine.v1beta.ListUserLicensesRequest(); + } + + public static com.google.cloud.discoveryengine.v1beta.ListUserLicensesRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListUserLicensesRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.ListUserLicensesRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ListUserLicensesRequestOrBuilder.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ListUserLicensesRequestOrBuilder.java new file mode 100644 index 000000000000..0e5c15794d3e --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ListUserLicensesRequestOrBuilder.java @@ -0,0 +1,229 @@ +/* + * 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/cloud/discoveryengine/v1beta/user_license_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.discoveryengine.v1beta; + +@com.google.protobuf.Generated +public interface ListUserLicensesRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.ListUserLicensesRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
            +   * Required. The parent
            +   * [UserStore][google.cloud.discoveryengine.v1beta.UserStore] resource name,
            +   * format:
            +   * `projects/{project}/locations/{location}/userStores/{user_store_id}`.
            +   * 
            + * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + + /** + * + * + *
            +   * Required. The parent
            +   * [UserStore][google.cloud.discoveryengine.v1beta.UserStore] resource name,
            +   * format:
            +   * `projects/{project}/locations/{location}/userStores/{user_store_id}`.
            +   * 
            + * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
            +   * Optional. Requested page size. Server may return fewer items than
            +   * requested. If unspecified, defaults to 10. The maximum value is 50; values
            +   * above 50 will be coerced to 50.
            +   *
            +   * If this field is negative, an INVALID_ARGUMENT error is returned.
            +   * 
            + * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
            +   * Optional. A page token, received from a previous `ListUserLicenses` call.
            +   * Provide this to retrieve the subsequent page.
            +   *
            +   * When paginating, all other parameters provided to `ListUserLicenses`
            +   * must match the call that provided the page token.
            +   * 
            + * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + + /** + * + * + *
            +   * Optional. A page token, received from a previous `ListUserLicenses` call.
            +   * Provide this to retrieve the subsequent page.
            +   *
            +   * When paginating, all other parameters provided to `ListUserLicenses`
            +   * must match the call that provided the page token.
            +   * 
            + * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
            +   * Optional. Filter for the list request.
            +   *
            +   * Supported fields:
            +   *
            +   * * `license_assignment_state`
            +   * * `user_principal`
            +   * *
            +   * Examples:
            +   *
            +   * * `license_assignment_state = ASSIGNED` to list assigned user licenses.
            +   * * `license_assignment_state = NO_LICENSE` to list not licensed users.
            +   * * `license_assignment_state = NO_LICENSE_ATTEMPTED_LOGIN` to list users
            +   * who attempted login but no license assigned.
            +   * * `license_assignment_state != NO_LICENSE_ATTEMPTED_LOGIN` to filter
            +   * out users who attempted login but no license assigned.
            +   * * `user_principal = user1@example.com` to list user license for
            +   * `user1@example.com`.
            +   * 
            + * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The filter. + */ + java.lang.String getFilter(); + + /** + * + * + *
            +   * Optional. Filter for the list request.
            +   *
            +   * Supported fields:
            +   *
            +   * * `license_assignment_state`
            +   * * `user_principal`
            +   * *
            +   * Examples:
            +   *
            +   * * `license_assignment_state = ASSIGNED` to list assigned user licenses.
            +   * * `license_assignment_state = NO_LICENSE` to list not licensed users.
            +   * * `license_assignment_state = NO_LICENSE_ATTEMPTED_LOGIN` to list users
            +   * who attempted login but no license assigned.
            +   * * `license_assignment_state != NO_LICENSE_ATTEMPTED_LOGIN` to filter
            +   * out users who attempted login but no license assigned.
            +   * * `user_principal = user1@example.com` to list user license for
            +   * `user1@example.com`.
            +   * 
            + * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for filter. + */ + com.google.protobuf.ByteString getFilterBytes(); + + /** + * + * + *
            +   * Optional. The order in which the
            +   * [UserLicense][google.cloud.discoveryengine.v1beta.UserLicense]s are listed.
            +   * The value must be a comma-separated list of fields. Default sorting order
            +   * is ascending. To specify descending order for a field, append a " desc"
            +   * suffix. Redundant space characters in the syntax are insignificant.
            +   *
            +   * Supported fields (only `user_principal` is supported for now):
            +   *
            +   * * `user_principal`
            +   *
            +   * If not set, the default ordering is by `user_principal`.
            +   *
            +   * Examples:
            +   *
            +   * * `user_principal` to order by `user_principal` in ascending order.
            +   * * `user_principal desc` to order by `user_principal` in descending order.
            +   * 
            + * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The orderBy. + */ + java.lang.String getOrderBy(); + + /** + * + * + *
            +   * Optional. The order in which the
            +   * [UserLicense][google.cloud.discoveryengine.v1beta.UserLicense]s are listed.
            +   * The value must be a comma-separated list of fields. Default sorting order
            +   * is ascending. To specify descending order for a field, append a " desc"
            +   * suffix. Redundant space characters in the syntax are insignificant.
            +   *
            +   * Supported fields (only `user_principal` is supported for now):
            +   *
            +   * * `user_principal`
            +   *
            +   * If not set, the default ordering is by `user_principal`.
            +   *
            +   * Examples:
            +   *
            +   * * `user_principal` to order by `user_principal` in ascending order.
            +   * * `user_principal desc` to order by `user_principal` in descending order.
            +   * 
            + * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for orderBy. + */ + com.google.protobuf.ByteString getOrderByBytes(); +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ListUserLicensesResponse.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ListUserLicensesResponse.java new file mode 100644 index 000000000000..ad3011f6e7af --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ListUserLicensesResponse.java @@ -0,0 +1,1163 @@ +/* + * 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/cloud/discoveryengine/v1beta/user_license_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.discoveryengine.v1beta; + +/** + * + * + *
            + * Response message for
            + * [UserLicenseService.ListUserLicenses][google.cloud.discoveryengine.v1beta.UserLicenseService.ListUserLicenses].
            + * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.ListUserLicensesResponse} + */ +@com.google.protobuf.Generated +public final class ListUserLicensesResponse extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.ListUserLicensesResponse) + ListUserLicensesResponseOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ListUserLicensesResponse"); + } + + // Use ListUserLicensesResponse.newBuilder() to construct. + private ListUserLicensesResponse(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ListUserLicensesResponse() { + userLicenses_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.UserLicenseServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_ListUserLicensesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.UserLicenseServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_ListUserLicensesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.ListUserLicensesResponse.class, + com.google.cloud.discoveryengine.v1beta.ListUserLicensesResponse.Builder.class); + } + + public static final int USER_LICENSES_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List userLicenses_; + + /** + * + * + *
            +   * All the customer's
            +   * [UserLicense][google.cloud.discoveryengine.v1beta.UserLicense]s.
            +   * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.UserLicense user_licenses = 1; + */ + @java.lang.Override + public java.util.List getUserLicensesList() { + return userLicenses_; + } + + /** + * + * + *
            +   * All the customer's
            +   * [UserLicense][google.cloud.discoveryengine.v1beta.UserLicense]s.
            +   * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.UserLicense user_licenses = 1; + */ + @java.lang.Override + public java.util.List + getUserLicensesOrBuilderList() { + return userLicenses_; + } + + /** + * + * + *
            +   * All the customer's
            +   * [UserLicense][google.cloud.discoveryengine.v1beta.UserLicense]s.
            +   * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.UserLicense user_licenses = 1; + */ + @java.lang.Override + public int getUserLicensesCount() { + return userLicenses_.size(); + } + + /** + * + * + *
            +   * All the customer's
            +   * [UserLicense][google.cloud.discoveryengine.v1beta.UserLicense]s.
            +   * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.UserLicense user_licenses = 1; + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.UserLicense getUserLicenses(int index) { + return userLicenses_.get(index); + } + + /** + * + * + *
            +   * All the customer's
            +   * [UserLicense][google.cloud.discoveryengine.v1beta.UserLicense]s.
            +   * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.UserLicense user_licenses = 1; + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.UserLicenseOrBuilder getUserLicensesOrBuilder( + int index) { + return userLicenses_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object nextPageToken_ = ""; + + /** + * + * + *
            +   * A token, which can be sent as `page_token` to retrieve the next page. If
            +   * this field is omitted, 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, which can be sent as `page_token` to retrieve the next page. If
            +   * this field is omitted, 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 < userLicenses_.size(); i++) { + output.writeMessage(1, userLicenses_.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 < userLicenses_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, userLicenses_.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.cloud.discoveryengine.v1beta.ListUserLicensesResponse)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1beta.ListUserLicensesResponse other = + (com.google.cloud.discoveryengine.v1beta.ListUserLicensesResponse) obj; + + if (!getUserLicensesList().equals(other.getUserLicensesList())) 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 (getUserLicensesCount() > 0) { + hash = (37 * hash) + USER_LICENSES_FIELD_NUMBER; + hash = (53 * hash) + getUserLicensesList().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.cloud.discoveryengine.v1beta.ListUserLicensesResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.ListUserLicensesResponse 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.discoveryengine.v1beta.ListUserLicensesResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.ListUserLicensesResponse 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.discoveryengine.v1beta.ListUserLicensesResponse parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.ListUserLicensesResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1beta.ListUserLicensesResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.ListUserLicensesResponse 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.discoveryengine.v1beta.ListUserLicensesResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.ListUserLicensesResponse 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.discoveryengine.v1beta.ListUserLicensesResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.ListUserLicensesResponse 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.discoveryengine.v1beta.ListUserLicensesResponse 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
            +   * [UserLicenseService.ListUserLicenses][google.cloud.discoveryengine.v1beta.UserLicenseService.ListUserLicenses].
            +   * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.ListUserLicensesResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.ListUserLicensesResponse) + com.google.cloud.discoveryengine.v1beta.ListUserLicensesResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.UserLicenseServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_ListUserLicensesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.UserLicenseServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_ListUserLicensesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.ListUserLicensesResponse.class, + com.google.cloud.discoveryengine.v1beta.ListUserLicensesResponse.Builder.class); + } + + // Construct using com.google.cloud.discoveryengine.v1beta.ListUserLicensesResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (userLicensesBuilder_ == null) { + userLicenses_ = java.util.Collections.emptyList(); + } else { + userLicenses_ = null; + userLicensesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + nextPageToken_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1beta.UserLicenseServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_ListUserLicensesResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.ListUserLicensesResponse + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1beta.ListUserLicensesResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.ListUserLicensesResponse build() { + com.google.cloud.discoveryengine.v1beta.ListUserLicensesResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.ListUserLicensesResponse buildPartial() { + com.google.cloud.discoveryengine.v1beta.ListUserLicensesResponse result = + new com.google.cloud.discoveryengine.v1beta.ListUserLicensesResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.discoveryengine.v1beta.ListUserLicensesResponse result) { + if (userLicensesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + userLicenses_ = java.util.Collections.unmodifiableList(userLicenses_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.userLicenses_ = userLicenses_; + } else { + result.userLicenses_ = userLicensesBuilder_.build(); + } + } + + private void buildPartial0( + com.google.cloud.discoveryengine.v1beta.ListUserLicensesResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.nextPageToken_ = nextPageToken_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.discoveryengine.v1beta.ListUserLicensesResponse) { + return mergeFrom((com.google.cloud.discoveryengine.v1beta.ListUserLicensesResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1beta.ListUserLicensesResponse other) { + if (other + == com.google.cloud.discoveryengine.v1beta.ListUserLicensesResponse.getDefaultInstance()) + return this; + if (userLicensesBuilder_ == null) { + if (!other.userLicenses_.isEmpty()) { + if (userLicenses_.isEmpty()) { + userLicenses_ = other.userLicenses_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureUserLicensesIsMutable(); + userLicenses_.addAll(other.userLicenses_); + } + onChanged(); + } + } else { + if (!other.userLicenses_.isEmpty()) { + if (userLicensesBuilder_.isEmpty()) { + userLicensesBuilder_.dispose(); + userLicensesBuilder_ = null; + userLicenses_ = other.userLicenses_; + bitField0_ = (bitField0_ & ~0x00000001); + userLicensesBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetUserLicensesFieldBuilder() + : null; + } else { + userLicensesBuilder_.addAllMessages(other.userLicenses_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.discoveryengine.v1beta.UserLicense m = + input.readMessage( + com.google.cloud.discoveryengine.v1beta.UserLicense.parser(), + extensionRegistry); + if (userLicensesBuilder_ == null) { + ensureUserLicensesIsMutable(); + userLicenses_.add(m); + } else { + userLicensesBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List userLicenses_ = + java.util.Collections.emptyList(); + + private void ensureUserLicensesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + userLicenses_ = + new java.util.ArrayList( + userLicenses_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.discoveryengine.v1beta.UserLicense, + com.google.cloud.discoveryengine.v1beta.UserLicense.Builder, + com.google.cloud.discoveryengine.v1beta.UserLicenseOrBuilder> + userLicensesBuilder_; + + /** + * + * + *
            +     * All the customer's
            +     * [UserLicense][google.cloud.discoveryengine.v1beta.UserLicense]s.
            +     * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.UserLicense user_licenses = 1; + */ + public java.util.List + getUserLicensesList() { + if (userLicensesBuilder_ == null) { + return java.util.Collections.unmodifiableList(userLicenses_); + } else { + return userLicensesBuilder_.getMessageList(); + } + } + + /** + * + * + *
            +     * All the customer's
            +     * [UserLicense][google.cloud.discoveryengine.v1beta.UserLicense]s.
            +     * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.UserLicense user_licenses = 1; + */ + public int getUserLicensesCount() { + if (userLicensesBuilder_ == null) { + return userLicenses_.size(); + } else { + return userLicensesBuilder_.getCount(); + } + } + + /** + * + * + *
            +     * All the customer's
            +     * [UserLicense][google.cloud.discoveryengine.v1beta.UserLicense]s.
            +     * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.UserLicense user_licenses = 1; + */ + public com.google.cloud.discoveryengine.v1beta.UserLicense getUserLicenses(int index) { + if (userLicensesBuilder_ == null) { + return userLicenses_.get(index); + } else { + return userLicensesBuilder_.getMessage(index); + } + } + + /** + * + * + *
            +     * All the customer's
            +     * [UserLicense][google.cloud.discoveryengine.v1beta.UserLicense]s.
            +     * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.UserLicense user_licenses = 1; + */ + public Builder setUserLicenses( + int index, com.google.cloud.discoveryengine.v1beta.UserLicense value) { + if (userLicensesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureUserLicensesIsMutable(); + userLicenses_.set(index, value); + onChanged(); + } else { + userLicensesBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
            +     * All the customer's
            +     * [UserLicense][google.cloud.discoveryengine.v1beta.UserLicense]s.
            +     * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.UserLicense user_licenses = 1; + */ + public Builder setUserLicenses( + int index, com.google.cloud.discoveryengine.v1beta.UserLicense.Builder builderForValue) { + if (userLicensesBuilder_ == null) { + ensureUserLicensesIsMutable(); + userLicenses_.set(index, builderForValue.build()); + onChanged(); + } else { + userLicensesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
            +     * All the customer's
            +     * [UserLicense][google.cloud.discoveryengine.v1beta.UserLicense]s.
            +     * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.UserLicense user_licenses = 1; + */ + public Builder addUserLicenses(com.google.cloud.discoveryengine.v1beta.UserLicense value) { + if (userLicensesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureUserLicensesIsMutable(); + userLicenses_.add(value); + onChanged(); + } else { + userLicensesBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
            +     * All the customer's
            +     * [UserLicense][google.cloud.discoveryengine.v1beta.UserLicense]s.
            +     * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.UserLicense user_licenses = 1; + */ + public Builder addUserLicenses( + int index, com.google.cloud.discoveryengine.v1beta.UserLicense value) { + if (userLicensesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureUserLicensesIsMutable(); + userLicenses_.add(index, value); + onChanged(); + } else { + userLicensesBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
            +     * All the customer's
            +     * [UserLicense][google.cloud.discoveryengine.v1beta.UserLicense]s.
            +     * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.UserLicense user_licenses = 1; + */ + public Builder addUserLicenses( + com.google.cloud.discoveryengine.v1beta.UserLicense.Builder builderForValue) { + if (userLicensesBuilder_ == null) { + ensureUserLicensesIsMutable(); + userLicenses_.add(builderForValue.build()); + onChanged(); + } else { + userLicensesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
            +     * All the customer's
            +     * [UserLicense][google.cloud.discoveryengine.v1beta.UserLicense]s.
            +     * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.UserLicense user_licenses = 1; + */ + public Builder addUserLicenses( + int index, com.google.cloud.discoveryengine.v1beta.UserLicense.Builder builderForValue) { + if (userLicensesBuilder_ == null) { + ensureUserLicensesIsMutable(); + userLicenses_.add(index, builderForValue.build()); + onChanged(); + } else { + userLicensesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
            +     * All the customer's
            +     * [UserLicense][google.cloud.discoveryengine.v1beta.UserLicense]s.
            +     * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.UserLicense user_licenses = 1; + */ + public Builder addAllUserLicenses( + java.lang.Iterable values) { + if (userLicensesBuilder_ == null) { + ensureUserLicensesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, userLicenses_); + onChanged(); + } else { + userLicensesBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
            +     * All the customer's
            +     * [UserLicense][google.cloud.discoveryengine.v1beta.UserLicense]s.
            +     * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.UserLicense user_licenses = 1; + */ + public Builder clearUserLicenses() { + if (userLicensesBuilder_ == null) { + userLicenses_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + userLicensesBuilder_.clear(); + } + return this; + } + + /** + * + * + *
            +     * All the customer's
            +     * [UserLicense][google.cloud.discoveryengine.v1beta.UserLicense]s.
            +     * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.UserLicense user_licenses = 1; + */ + public Builder removeUserLicenses(int index) { + if (userLicensesBuilder_ == null) { + ensureUserLicensesIsMutable(); + userLicenses_.remove(index); + onChanged(); + } else { + userLicensesBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
            +     * All the customer's
            +     * [UserLicense][google.cloud.discoveryengine.v1beta.UserLicense]s.
            +     * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.UserLicense user_licenses = 1; + */ + public com.google.cloud.discoveryengine.v1beta.UserLicense.Builder getUserLicensesBuilder( + int index) { + return internalGetUserLicensesFieldBuilder().getBuilder(index); + } + + /** + * + * + *
            +     * All the customer's
            +     * [UserLicense][google.cloud.discoveryengine.v1beta.UserLicense]s.
            +     * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.UserLicense user_licenses = 1; + */ + public com.google.cloud.discoveryengine.v1beta.UserLicenseOrBuilder getUserLicensesOrBuilder( + int index) { + if (userLicensesBuilder_ == null) { + return userLicenses_.get(index); + } else { + return userLicensesBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
            +     * All the customer's
            +     * [UserLicense][google.cloud.discoveryengine.v1beta.UserLicense]s.
            +     * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.UserLicense user_licenses = 1; + */ + public java.util.List + getUserLicensesOrBuilderList() { + if (userLicensesBuilder_ != null) { + return userLicensesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(userLicenses_); + } + } + + /** + * + * + *
            +     * All the customer's
            +     * [UserLicense][google.cloud.discoveryengine.v1beta.UserLicense]s.
            +     * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.UserLicense user_licenses = 1; + */ + public com.google.cloud.discoveryengine.v1beta.UserLicense.Builder addUserLicensesBuilder() { + return internalGetUserLicensesFieldBuilder() + .addBuilder(com.google.cloud.discoveryengine.v1beta.UserLicense.getDefaultInstance()); + } + + /** + * + * + *
            +     * All the customer's
            +     * [UserLicense][google.cloud.discoveryengine.v1beta.UserLicense]s.
            +     * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.UserLicense user_licenses = 1; + */ + public com.google.cloud.discoveryengine.v1beta.UserLicense.Builder addUserLicensesBuilder( + int index) { + return internalGetUserLicensesFieldBuilder() + .addBuilder( + index, com.google.cloud.discoveryengine.v1beta.UserLicense.getDefaultInstance()); + } + + /** + * + * + *
            +     * All the customer's
            +     * [UserLicense][google.cloud.discoveryengine.v1beta.UserLicense]s.
            +     * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.UserLicense user_licenses = 1; + */ + public java.util.List + getUserLicensesBuilderList() { + return internalGetUserLicensesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.discoveryengine.v1beta.UserLicense, + com.google.cloud.discoveryengine.v1beta.UserLicense.Builder, + com.google.cloud.discoveryengine.v1beta.UserLicenseOrBuilder> + internalGetUserLicensesFieldBuilder() { + if (userLicensesBuilder_ == null) { + userLicensesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.discoveryengine.v1beta.UserLicense, + com.google.cloud.discoveryengine.v1beta.UserLicense.Builder, + com.google.cloud.discoveryengine.v1beta.UserLicenseOrBuilder>( + userLicenses_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + userLicenses_ = null; + } + return userLicensesBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + + /** + * + * + *
            +     * A token, which can be sent as `page_token` to retrieve the next page. If
            +     * this field is omitted, 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, which can be sent as `page_token` to retrieve the next page. If
            +     * this field is omitted, 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, which can be sent as `page_token` to retrieve the next page. If
            +     * this field is omitted, 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, which can be sent as `page_token` to retrieve the next page. If
            +     * this field is omitted, 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, which can be sent as `page_token` to retrieve the next page. If
            +     * this field is omitted, 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.cloud.discoveryengine.v1beta.ListUserLicensesResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.ListUserLicensesResponse) + private static final com.google.cloud.discoveryengine.v1beta.ListUserLicensesResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.discoveryengine.v1beta.ListUserLicensesResponse(); + } + + public static com.google.cloud.discoveryengine.v1beta.ListUserLicensesResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListUserLicensesResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.ListUserLicensesResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ListUserLicensesResponseOrBuilder.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ListUserLicensesResponseOrBuilder.java new file mode 100644 index 000000000000..8f18a7f0e5be --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ListUserLicensesResponseOrBuilder.java @@ -0,0 +1,117 @@ +/* + * 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/cloud/discoveryengine/v1beta/user_license_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.discoveryengine.v1beta; + +@com.google.protobuf.Generated +public interface ListUserLicensesResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.ListUserLicensesResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
            +   * All the customer's
            +   * [UserLicense][google.cloud.discoveryengine.v1beta.UserLicense]s.
            +   * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.UserLicense user_licenses = 1; + */ + java.util.List getUserLicensesList(); + + /** + * + * + *
            +   * All the customer's
            +   * [UserLicense][google.cloud.discoveryengine.v1beta.UserLicense]s.
            +   * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.UserLicense user_licenses = 1; + */ + com.google.cloud.discoveryengine.v1beta.UserLicense getUserLicenses(int index); + + /** + * + * + *
            +   * All the customer's
            +   * [UserLicense][google.cloud.discoveryengine.v1beta.UserLicense]s.
            +   * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.UserLicense user_licenses = 1; + */ + int getUserLicensesCount(); + + /** + * + * + *
            +   * All the customer's
            +   * [UserLicense][google.cloud.discoveryengine.v1beta.UserLicense]s.
            +   * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.UserLicense user_licenses = 1; + */ + java.util.List + getUserLicensesOrBuilderList(); + + /** + * + * + *
            +   * All the customer's
            +   * [UserLicense][google.cloud.discoveryengine.v1beta.UserLicense]s.
            +   * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.UserLicense user_licenses = 1; + */ + com.google.cloud.discoveryengine.v1beta.UserLicenseOrBuilder getUserLicensesOrBuilder(int index); + + /** + * + * + *
            +   * A token, which can be sent as `page_token` to retrieve the next page. If
            +   * this field is omitted, there are no subsequent pages.
            +   * 
            + * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + + /** + * + * + *
            +   * A token, which can be sent as `page_token` to retrieve the next page. If
            +   * this field is omitted, there are no subsequent pages.
            +   * 
            + * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/LoggingProto.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/LoggingProto.java new file mode 100644 index 000000000000..95f1a5f762aa --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/LoggingProto.java @@ -0,0 +1,97 @@ +/* + * 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/cloud/discoveryengine/v1beta/logging.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.discoveryengine.v1beta; + +@com.google.protobuf.Generated +public final class LoggingProto extends com.google.protobuf.GeneratedFile { + private LoggingProto() {} + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "LoggingProto"); + } + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1beta_ObservabilityConfig_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1beta_ObservabilityConfig_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n1google/cloud/discoveryengine/v1beta/lo" + + "gging.proto\022#google.cloud.discoveryengin" + + "e.v1beta\032\037google/api/field_behavior.prot" + + "o\032\031google/api/resource.proto\"a\n\023Observab" + + "ilityConfig\022\"\n\025observability_enabled\030\001 \001" + + "(\010B\003\340A\001\022&\n\031sensitive_logging_enabled\030\002 \001" + + "(\010B\003\340A\001B\223\002\n\'com.google.cloud.discoveryen" + + "gine.v1betaB\014LoggingProtoP\001ZQcloud.googl" + + "e.com/go/discoveryengine/apiv1beta/disco" + + "veryenginepb;discoveryenginepb\242\002\017DISCOVE" + + "RYENGINE\252\002#Google.Cloud.DiscoveryEngine." + + "V1Beta\312\002#Google\\Cloud\\DiscoveryEngine\\V1" + + "beta\352\002&Google::Cloud::DiscoveryEngine::V" + + "1betab\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.ResourceProto.getDescriptor(), + }); + internal_static_google_cloud_discoveryengine_v1beta_ObservabilityConfig_descriptor = + getDescriptor().getMessageType(0); + internal_static_google_cloud_discoveryengine_v1beta_ObservabilityConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1beta_ObservabilityConfig_descriptor, + new java.lang.String[] { + "ObservabilityEnabled", "SensitiveLoggingEnabled", + }); + descriptor.resolveAllFeaturesImmutable(); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ObservabilityConfig.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ObservabilityConfig.java new file mode 100644 index 000000000000..58b3e0198fe7 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ObservabilityConfig.java @@ -0,0 +1,609 @@ +/* + * 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/cloud/discoveryengine/v1beta/logging.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.discoveryengine.v1beta; + +/** + * + * + *
            + * Observability config for a resource.
            + * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.ObservabilityConfig} + */ +@com.google.protobuf.Generated +public final class ObservabilityConfig extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.ObservabilityConfig) + ObservabilityConfigOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ObservabilityConfig"); + } + + // Use ObservabilityConfig.newBuilder() to construct. + private ObservabilityConfig(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ObservabilityConfig() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.LoggingProto + .internal_static_google_cloud_discoveryengine_v1beta_ObservabilityConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.LoggingProto + .internal_static_google_cloud_discoveryengine_v1beta_ObservabilityConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.ObservabilityConfig.class, + com.google.cloud.discoveryengine.v1beta.ObservabilityConfig.Builder.class); + } + + public static final int OBSERVABILITY_ENABLED_FIELD_NUMBER = 1; + private boolean observabilityEnabled_ = false; + + /** + * + * + *
            +   * Optional. Enables observability. If `false`, all other flags are ignored.
            +   * 
            + * + * bool observability_enabled = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The observabilityEnabled. + */ + @java.lang.Override + public boolean getObservabilityEnabled() { + return observabilityEnabled_; + } + + public static final int SENSITIVE_LOGGING_ENABLED_FIELD_NUMBER = 2; + private boolean sensitiveLoggingEnabled_ = false; + + /** + * + * + *
            +   * Optional. Enables sensitive logging. Sensitive logging includes customer
            +   * core content (e.g. prompts, responses). If `false`, will sanitize all
            +   * sensitive fields.
            +   * 
            + * + * bool sensitive_logging_enabled = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The sensitiveLoggingEnabled. + */ + @java.lang.Override + public boolean getSensitiveLoggingEnabled() { + return sensitiveLoggingEnabled_; + } + + 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 (observabilityEnabled_ != false) { + output.writeBool(1, observabilityEnabled_); + } + if (sensitiveLoggingEnabled_ != false) { + output.writeBool(2, sensitiveLoggingEnabled_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (observabilityEnabled_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(1, observabilityEnabled_); + } + if (sensitiveLoggingEnabled_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, sensitiveLoggingEnabled_); + } + 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.discoveryengine.v1beta.ObservabilityConfig)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1beta.ObservabilityConfig other = + (com.google.cloud.discoveryengine.v1beta.ObservabilityConfig) obj; + + if (getObservabilityEnabled() != other.getObservabilityEnabled()) return false; + if (getSensitiveLoggingEnabled() != other.getSensitiveLoggingEnabled()) 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) + OBSERVABILITY_ENABLED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getObservabilityEnabled()); + hash = (37 * hash) + SENSITIVE_LOGGING_ENABLED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getSensitiveLoggingEnabled()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1beta.ObservabilityConfig parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.ObservabilityConfig 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.discoveryengine.v1beta.ObservabilityConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.ObservabilityConfig 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.discoveryengine.v1beta.ObservabilityConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.ObservabilityConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1beta.ObservabilityConfig parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.ObservabilityConfig 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.discoveryengine.v1beta.ObservabilityConfig parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.ObservabilityConfig 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.discoveryengine.v1beta.ObservabilityConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.ObservabilityConfig 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.discoveryengine.v1beta.ObservabilityConfig 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; + } + + /** + * + * + *
            +   * Observability config for a resource.
            +   * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.ObservabilityConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.ObservabilityConfig) + com.google.cloud.discoveryengine.v1beta.ObservabilityConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.LoggingProto + .internal_static_google_cloud_discoveryengine_v1beta_ObservabilityConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.LoggingProto + .internal_static_google_cloud_discoveryengine_v1beta_ObservabilityConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.ObservabilityConfig.class, + com.google.cloud.discoveryengine.v1beta.ObservabilityConfig.Builder.class); + } + + // Construct using com.google.cloud.discoveryengine.v1beta.ObservabilityConfig.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + observabilityEnabled_ = false; + sensitiveLoggingEnabled_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1beta.LoggingProto + .internal_static_google_cloud_discoveryengine_v1beta_ObservabilityConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.ObservabilityConfig getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1beta.ObservabilityConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.ObservabilityConfig build() { + com.google.cloud.discoveryengine.v1beta.ObservabilityConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.ObservabilityConfig buildPartial() { + com.google.cloud.discoveryengine.v1beta.ObservabilityConfig result = + new com.google.cloud.discoveryengine.v1beta.ObservabilityConfig(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.discoveryengine.v1beta.ObservabilityConfig result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.observabilityEnabled_ = observabilityEnabled_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.sensitiveLoggingEnabled_ = sensitiveLoggingEnabled_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.discoveryengine.v1beta.ObservabilityConfig) { + return mergeFrom((com.google.cloud.discoveryengine.v1beta.ObservabilityConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.discoveryengine.v1beta.ObservabilityConfig other) { + if (other == com.google.cloud.discoveryengine.v1beta.ObservabilityConfig.getDefaultInstance()) + return this; + if (other.getObservabilityEnabled() != false) { + setObservabilityEnabled(other.getObservabilityEnabled()); + } + if (other.getSensitiveLoggingEnabled() != false) { + setSensitiveLoggingEnabled(other.getSensitiveLoggingEnabled()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + observabilityEnabled_ = input.readBool(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 16: + { + sensitiveLoggingEnabled_ = input.readBool(); + bitField0_ |= 0x00000002; + break; + } // case 16 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private boolean observabilityEnabled_; + + /** + * + * + *
            +     * Optional. Enables observability. If `false`, all other flags are ignored.
            +     * 
            + * + * bool observability_enabled = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The observabilityEnabled. + */ + @java.lang.Override + public boolean getObservabilityEnabled() { + return observabilityEnabled_; + } + + /** + * + * + *
            +     * Optional. Enables observability. If `false`, all other flags are ignored.
            +     * 
            + * + * bool observability_enabled = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The observabilityEnabled to set. + * @return This builder for chaining. + */ + public Builder setObservabilityEnabled(boolean value) { + + observabilityEnabled_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Optional. Enables observability. If `false`, all other flags are ignored.
            +     * 
            + * + * bool observability_enabled = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearObservabilityEnabled() { + bitField0_ = (bitField0_ & ~0x00000001); + observabilityEnabled_ = false; + onChanged(); + return this; + } + + private boolean sensitiveLoggingEnabled_; + + /** + * + * + *
            +     * Optional. Enables sensitive logging. Sensitive logging includes customer
            +     * core content (e.g. prompts, responses). If `false`, will sanitize all
            +     * sensitive fields.
            +     * 
            + * + * bool sensitive_logging_enabled = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The sensitiveLoggingEnabled. + */ + @java.lang.Override + public boolean getSensitiveLoggingEnabled() { + return sensitiveLoggingEnabled_; + } + + /** + * + * + *
            +     * Optional. Enables sensitive logging. Sensitive logging includes customer
            +     * core content (e.g. prompts, responses). If `false`, will sanitize all
            +     * sensitive fields.
            +     * 
            + * + * bool sensitive_logging_enabled = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The sensitiveLoggingEnabled to set. + * @return This builder for chaining. + */ + public Builder setSensitiveLoggingEnabled(boolean value) { + + sensitiveLoggingEnabled_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Optional. Enables sensitive logging. Sensitive logging includes customer
            +     * core content (e.g. prompts, responses). If `false`, will sanitize all
            +     * sensitive fields.
            +     * 
            + * + * bool sensitive_logging_enabled = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearSensitiveLoggingEnabled() { + bitField0_ = (bitField0_ & ~0x00000002); + sensitiveLoggingEnabled_ = false; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.ObservabilityConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.ObservabilityConfig) + private static final com.google.cloud.discoveryengine.v1beta.ObservabilityConfig DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.discoveryengine.v1beta.ObservabilityConfig(); + } + + public static com.google.cloud.discoveryengine.v1beta.ObservabilityConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ObservabilityConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.ObservabilityConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ObservabilityConfigOrBuilder.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ObservabilityConfigOrBuilder.java new file mode 100644 index 000000000000..595505c1ab9c --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ObservabilityConfigOrBuilder.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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/discoveryengine/v1beta/logging.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.discoveryengine.v1beta; + +@com.google.protobuf.Generated +public interface ObservabilityConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.ObservabilityConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
            +   * Optional. Enables observability. If `false`, all other flags are ignored.
            +   * 
            + * + * bool observability_enabled = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The observabilityEnabled. + */ + boolean getObservabilityEnabled(); + + /** + * + * + *
            +   * Optional. Enables sensitive logging. Sensitive logging includes customer
            +   * core content (e.g. prompts, responses). If `false`, will sanitize all
            +   * sensitive fields.
            +   * 
            + * + * bool sensitive_logging_enabled = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The sensitiveLoggingEnabled. + */ + boolean getSensitiveLoggingEnabled(); +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/Principal.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/Principal.java new file mode 100644 index 000000000000..9755ef1bcbaf --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/Principal.java @@ -0,0 +1,1294 @@ +/* + * 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/cloud/discoveryengine/v1beta/common.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.discoveryengine.v1beta; + +/** + * + * + *
            + * Principal identifier of a user or a group.
            + * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.Principal} + */ +@com.google.protobuf.Generated +public final class Principal extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.Principal) + PrincipalOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Principal"); + } + + // Use Principal.newBuilder() to construct. + private Principal(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private Principal() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.CommonProto + .internal_static_google_cloud_discoveryengine_v1beta_Principal_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.CommonProto + .internal_static_google_cloud_discoveryengine_v1beta_Principal_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.Principal.class, + com.google.cloud.discoveryengine.v1beta.Principal.Builder.class); + } + + private int principalCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object principal_; + + public enum PrincipalCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + USER_ID(1), + GROUP_ID(2), + EXTERNAL_ENTITY_ID(3), + PRINCIPAL_NOT_SET(0); + private final int value; + + private PrincipalCase(int value) { + this.value = value; + } + + /** + * @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 PrincipalCase valueOf(int value) { + return forNumber(value); + } + + public static PrincipalCase forNumber(int value) { + switch (value) { + case 1: + return USER_ID; + case 2: + return GROUP_ID; + case 3: + return EXTERNAL_ENTITY_ID; + case 0: + return PRINCIPAL_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public PrincipalCase getPrincipalCase() { + return PrincipalCase.forNumber(principalCase_); + } + + public static final int USER_ID_FIELD_NUMBER = 1; + + /** + * + * + *
            +   * User identifier.
            +   * For Google Workspace user account, user_id should be the google workspace
            +   * user email.
            +   * For non-google identity provider user account, user_id is the mapped user
            +   * identifier configured during the workforcepool config.
            +   * 
            + * + * string user_id = 1; + * + * @return Whether the userId field is set. + */ + public boolean hasUserId() { + return principalCase_ == 1; + } + + /** + * + * + *
            +   * User identifier.
            +   * For Google Workspace user account, user_id should be the google workspace
            +   * user email.
            +   * For non-google identity provider user account, user_id is the mapped user
            +   * identifier configured during the workforcepool config.
            +   * 
            + * + * string user_id = 1; + * + * @return The userId. + */ + public java.lang.String getUserId() { + java.lang.Object ref = ""; + if (principalCase_ == 1) { + ref = principal_; + } + 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(); + if (principalCase_ == 1) { + principal_ = s; + } + return s; + } + } + + /** + * + * + *
            +   * User identifier.
            +   * For Google Workspace user account, user_id should be the google workspace
            +   * user email.
            +   * For non-google identity provider user account, user_id is the mapped user
            +   * identifier configured during the workforcepool config.
            +   * 
            + * + * string user_id = 1; + * + * @return The bytes for userId. + */ + public com.google.protobuf.ByteString getUserIdBytes() { + java.lang.Object ref = ""; + if (principalCase_ == 1) { + ref = principal_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (principalCase_ == 1) { + principal_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int GROUP_ID_FIELD_NUMBER = 2; + + /** + * + * + *
            +   * Group identifier.
            +   * For Google Workspace user account, group_id should be the google
            +   * workspace group email.
            +   * For non-google identity provider user account, group_id is the mapped
            +   * group identifier configured during the workforcepool config.
            +   * 
            + * + * string group_id = 2; + * + * @return Whether the groupId field is set. + */ + public boolean hasGroupId() { + return principalCase_ == 2; + } + + /** + * + * + *
            +   * Group identifier.
            +   * For Google Workspace user account, group_id should be the google
            +   * workspace group email.
            +   * For non-google identity provider user account, group_id is the mapped
            +   * group identifier configured during the workforcepool config.
            +   * 
            + * + * string group_id = 2; + * + * @return The groupId. + */ + public java.lang.String getGroupId() { + java.lang.Object ref = ""; + if (principalCase_ == 2) { + ref = principal_; + } + 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(); + if (principalCase_ == 2) { + principal_ = s; + } + return s; + } + } + + /** + * + * + *
            +   * Group identifier.
            +   * For Google Workspace user account, group_id should be the google
            +   * workspace group email.
            +   * For non-google identity provider user account, group_id is the mapped
            +   * group identifier configured during the workforcepool config.
            +   * 
            + * + * string group_id = 2; + * + * @return The bytes for groupId. + */ + public com.google.protobuf.ByteString getGroupIdBytes() { + java.lang.Object ref = ""; + if (principalCase_ == 2) { + ref = principal_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (principalCase_ == 2) { + principal_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int EXTERNAL_ENTITY_ID_FIELD_NUMBER = 3; + + /** + * + * + *
            +   * For 3P application identities which are not present in the customer
            +   * identity provider.
            +   * 
            + * + * string external_entity_id = 3; + * + * @return Whether the externalEntityId field is set. + */ + public boolean hasExternalEntityId() { + return principalCase_ == 3; + } + + /** + * + * + *
            +   * For 3P application identities which are not present in the customer
            +   * identity provider.
            +   * 
            + * + * string external_entity_id = 3; + * + * @return The externalEntityId. + */ + public java.lang.String getExternalEntityId() { + java.lang.Object ref = ""; + if (principalCase_ == 3) { + ref = principal_; + } + 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(); + if (principalCase_ == 3) { + principal_ = s; + } + return s; + } + } + + /** + * + * + *
            +   * For 3P application identities which are not present in the customer
            +   * identity provider.
            +   * 
            + * + * string external_entity_id = 3; + * + * @return The bytes for externalEntityId. + */ + public com.google.protobuf.ByteString getExternalEntityIdBytes() { + java.lang.Object ref = ""; + if (principalCase_ == 3) { + ref = principal_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (principalCase_ == 3) { + principal_ = 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 { + if (principalCase_ == 1) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, principal_); + } + if (principalCase_ == 2) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, principal_); + } + if (principalCase_ == 3) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, principal_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (principalCase_ == 1) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, principal_); + } + if (principalCase_ == 2) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, principal_); + } + if (principalCase_ == 3) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, principal_); + } + 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.discoveryengine.v1beta.Principal)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1beta.Principal other = + (com.google.cloud.discoveryengine.v1beta.Principal) obj; + + if (!getPrincipalCase().equals(other.getPrincipalCase())) return false; + switch (principalCase_) { + case 1: + if (!getUserId().equals(other.getUserId())) return false; + break; + case 2: + if (!getGroupId().equals(other.getGroupId())) return false; + break; + case 3: + if (!getExternalEntityId().equals(other.getExternalEntityId())) return false; + break; + case 0: + default: + } + 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(); + switch (principalCase_) { + case 1: + hash = (37 * hash) + USER_ID_FIELD_NUMBER; + hash = (53 * hash) + getUserId().hashCode(); + break; + case 2: + hash = (37 * hash) + GROUP_ID_FIELD_NUMBER; + hash = (53 * hash) + getGroupId().hashCode(); + break; + case 3: + hash = (37 * hash) + EXTERNAL_ENTITY_ID_FIELD_NUMBER; + hash = (53 * hash) + getExternalEntityId().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1beta.Principal parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.Principal 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.discoveryengine.v1beta.Principal parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.Principal 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.discoveryengine.v1beta.Principal parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.Principal parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1beta.Principal parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.Principal 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.discoveryengine.v1beta.Principal parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.Principal 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.discoveryengine.v1beta.Principal parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.Principal 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.discoveryengine.v1beta.Principal 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; + } + + /** + * + * + *
            +   * Principal identifier of a user or a group.
            +   * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.Principal} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.Principal) + com.google.cloud.discoveryengine.v1beta.PrincipalOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.CommonProto + .internal_static_google_cloud_discoveryengine_v1beta_Principal_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.CommonProto + .internal_static_google_cloud_discoveryengine_v1beta_Principal_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.Principal.class, + com.google.cloud.discoveryengine.v1beta.Principal.Builder.class); + } + + // Construct using com.google.cloud.discoveryengine.v1beta.Principal.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + principalCase_ = 0; + principal_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1beta.CommonProto + .internal_static_google_cloud_discoveryengine_v1beta_Principal_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Principal getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1beta.Principal.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Principal build() { + com.google.cloud.discoveryengine.v1beta.Principal result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Principal buildPartial() { + com.google.cloud.discoveryengine.v1beta.Principal result = + new com.google.cloud.discoveryengine.v1beta.Principal(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.discoveryengine.v1beta.Principal result) { + int from_bitField0_ = bitField0_; + } + + private void buildPartialOneofs(com.google.cloud.discoveryengine.v1beta.Principal result) { + result.principalCase_ = principalCase_; + result.principal_ = this.principal_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.discoveryengine.v1beta.Principal) { + return mergeFrom((com.google.cloud.discoveryengine.v1beta.Principal) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.discoveryengine.v1beta.Principal other) { + if (other == com.google.cloud.discoveryengine.v1beta.Principal.getDefaultInstance()) + return this; + switch (other.getPrincipalCase()) { + case USER_ID: + { + principalCase_ = 1; + principal_ = other.principal_; + onChanged(); + break; + } + case GROUP_ID: + { + principalCase_ = 2; + principal_ = other.principal_; + onChanged(); + break; + } + case EXTERNAL_ENTITY_ID: + { + principalCase_ = 3; + principal_ = other.principal_; + onChanged(); + break; + } + case PRINCIPAL_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + principalCase_ = 1; + principal_ = s; + break; + } // case 10 + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + principalCase_ = 2; + principal_ = s; + break; + } // case 18 + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + principalCase_ = 3; + principal_ = s; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int principalCase_ = 0; + private java.lang.Object principal_; + + public PrincipalCase getPrincipalCase() { + return PrincipalCase.forNumber(principalCase_); + } + + public Builder clearPrincipal() { + principalCase_ = 0; + principal_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + /** + * + * + *
            +     * User identifier.
            +     * For Google Workspace user account, user_id should be the google workspace
            +     * user email.
            +     * For non-google identity provider user account, user_id is the mapped user
            +     * identifier configured during the workforcepool config.
            +     * 
            + * + * string user_id = 1; + * + * @return Whether the userId field is set. + */ + @java.lang.Override + public boolean hasUserId() { + return principalCase_ == 1; + } + + /** + * + * + *
            +     * User identifier.
            +     * For Google Workspace user account, user_id should be the google workspace
            +     * user email.
            +     * For non-google identity provider user account, user_id is the mapped user
            +     * identifier configured during the workforcepool config.
            +     * 
            + * + * string user_id = 1; + * + * @return The userId. + */ + @java.lang.Override + public java.lang.String getUserId() { + java.lang.Object ref = ""; + if (principalCase_ == 1) { + ref = principal_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (principalCase_ == 1) { + principal_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
            +     * User identifier.
            +     * For Google Workspace user account, user_id should be the google workspace
            +     * user email.
            +     * For non-google identity provider user account, user_id is the mapped user
            +     * identifier configured during the workforcepool config.
            +     * 
            + * + * string user_id = 1; + * + * @return The bytes for userId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getUserIdBytes() { + java.lang.Object ref = ""; + if (principalCase_ == 1) { + ref = principal_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (principalCase_ == 1) { + principal_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
            +     * User identifier.
            +     * For Google Workspace user account, user_id should be the google workspace
            +     * user email.
            +     * For non-google identity provider user account, user_id is the mapped user
            +     * identifier configured during the workforcepool config.
            +     * 
            + * + * string user_id = 1; + * + * @param value The userId to set. + * @return This builder for chaining. + */ + public Builder setUserId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + principalCase_ = 1; + principal_ = value; + onChanged(); + return this; + } + + /** + * + * + *
            +     * User identifier.
            +     * For Google Workspace user account, user_id should be the google workspace
            +     * user email.
            +     * For non-google identity provider user account, user_id is the mapped user
            +     * identifier configured during the workforcepool config.
            +     * 
            + * + * string user_id = 1; + * + * @return This builder for chaining. + */ + public Builder clearUserId() { + if (principalCase_ == 1) { + principalCase_ = 0; + principal_ = null; + onChanged(); + } + return this; + } + + /** + * + * + *
            +     * User identifier.
            +     * For Google Workspace user account, user_id should be the google workspace
            +     * user email.
            +     * For non-google identity provider user account, user_id is the mapped user
            +     * identifier configured during the workforcepool config.
            +     * 
            + * + * string user_id = 1; + * + * @param value The bytes for userId to set. + * @return This builder for chaining. + */ + public Builder setUserIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + principalCase_ = 1; + principal_ = value; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Group identifier.
            +     * For Google Workspace user account, group_id should be the google
            +     * workspace group email.
            +     * For non-google identity provider user account, group_id is the mapped
            +     * group identifier configured during the workforcepool config.
            +     * 
            + * + * string group_id = 2; + * + * @return Whether the groupId field is set. + */ + @java.lang.Override + public boolean hasGroupId() { + return principalCase_ == 2; + } + + /** + * + * + *
            +     * Group identifier.
            +     * For Google Workspace user account, group_id should be the google
            +     * workspace group email.
            +     * For non-google identity provider user account, group_id is the mapped
            +     * group identifier configured during the workforcepool config.
            +     * 
            + * + * string group_id = 2; + * + * @return The groupId. + */ + @java.lang.Override + public java.lang.String getGroupId() { + java.lang.Object ref = ""; + if (principalCase_ == 2) { + ref = principal_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (principalCase_ == 2) { + principal_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
            +     * Group identifier.
            +     * For Google Workspace user account, group_id should be the google
            +     * workspace group email.
            +     * For non-google identity provider user account, group_id is the mapped
            +     * group identifier configured during the workforcepool config.
            +     * 
            + * + * string group_id = 2; + * + * @return The bytes for groupId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getGroupIdBytes() { + java.lang.Object ref = ""; + if (principalCase_ == 2) { + ref = principal_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (principalCase_ == 2) { + principal_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
            +     * Group identifier.
            +     * For Google Workspace user account, group_id should be the google
            +     * workspace group email.
            +     * For non-google identity provider user account, group_id is the mapped
            +     * group identifier configured during the workforcepool config.
            +     * 
            + * + * string group_id = 2; + * + * @param value The groupId to set. + * @return This builder for chaining. + */ + public Builder setGroupId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + principalCase_ = 2; + principal_ = value; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Group identifier.
            +     * For Google Workspace user account, group_id should be the google
            +     * workspace group email.
            +     * For non-google identity provider user account, group_id is the mapped
            +     * group identifier configured during the workforcepool config.
            +     * 
            + * + * string group_id = 2; + * + * @return This builder for chaining. + */ + public Builder clearGroupId() { + if (principalCase_ == 2) { + principalCase_ = 0; + principal_ = null; + onChanged(); + } + return this; + } + + /** + * + * + *
            +     * Group identifier.
            +     * For Google Workspace user account, group_id should be the google
            +     * workspace group email.
            +     * For non-google identity provider user account, group_id is the mapped
            +     * group identifier configured during the workforcepool config.
            +     * 
            + * + * string group_id = 2; + * + * @param value The bytes for groupId to set. + * @return This builder for chaining. + */ + public Builder setGroupIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + principalCase_ = 2; + principal_ = value; + onChanged(); + return this; + } + + /** + * + * + *
            +     * For 3P application identities which are not present in the customer
            +     * identity provider.
            +     * 
            + * + * string external_entity_id = 3; + * + * @return Whether the externalEntityId field is set. + */ + @java.lang.Override + public boolean hasExternalEntityId() { + return principalCase_ == 3; + } + + /** + * + * + *
            +     * For 3P application identities which are not present in the customer
            +     * identity provider.
            +     * 
            + * + * string external_entity_id = 3; + * + * @return The externalEntityId. + */ + @java.lang.Override + public java.lang.String getExternalEntityId() { + java.lang.Object ref = ""; + if (principalCase_ == 3) { + ref = principal_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (principalCase_ == 3) { + principal_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
            +     * For 3P application identities which are not present in the customer
            +     * identity provider.
            +     * 
            + * + * string external_entity_id = 3; + * + * @return The bytes for externalEntityId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getExternalEntityIdBytes() { + java.lang.Object ref = ""; + if (principalCase_ == 3) { + ref = principal_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (principalCase_ == 3) { + principal_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
            +     * For 3P application identities which are not present in the customer
            +     * identity provider.
            +     * 
            + * + * string external_entity_id = 3; + * + * @param value The externalEntityId to set. + * @return This builder for chaining. + */ + public Builder setExternalEntityId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + principalCase_ = 3; + principal_ = value; + onChanged(); + return this; + } + + /** + * + * + *
            +     * For 3P application identities which are not present in the customer
            +     * identity provider.
            +     * 
            + * + * string external_entity_id = 3; + * + * @return This builder for chaining. + */ + public Builder clearExternalEntityId() { + if (principalCase_ == 3) { + principalCase_ = 0; + principal_ = null; + onChanged(); + } + return this; + } + + /** + * + * + *
            +     * For 3P application identities which are not present in the customer
            +     * identity provider.
            +     * 
            + * + * string external_entity_id = 3; + * + * @param value The bytes for externalEntityId to set. + * @return This builder for chaining. + */ + public Builder setExternalEntityIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + principalCase_ = 3; + principal_ = value; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.Principal) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.Principal) + private static final com.google.cloud.discoveryengine.v1beta.Principal DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.discoveryengine.v1beta.Principal(); + } + + public static com.google.cloud.discoveryengine.v1beta.Principal getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Principal parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Principal getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/PrincipalOrBuilder.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/PrincipalOrBuilder.java new file mode 100644 index 000000000000..130e8fd5d9b2 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/PrincipalOrBuilder.java @@ -0,0 +1,174 @@ +/* + * 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/cloud/discoveryengine/v1beta/common.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.discoveryengine.v1beta; + +@com.google.protobuf.Generated +public interface PrincipalOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.Principal) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
            +   * User identifier.
            +   * For Google Workspace user account, user_id should be the google workspace
            +   * user email.
            +   * For non-google identity provider user account, user_id is the mapped user
            +   * identifier configured during the workforcepool config.
            +   * 
            + * + * string user_id = 1; + * + * @return Whether the userId field is set. + */ + boolean hasUserId(); + + /** + * + * + *
            +   * User identifier.
            +   * For Google Workspace user account, user_id should be the google workspace
            +   * user email.
            +   * For non-google identity provider user account, user_id is the mapped user
            +   * identifier configured during the workforcepool config.
            +   * 
            + * + * string user_id = 1; + * + * @return The userId. + */ + java.lang.String getUserId(); + + /** + * + * + *
            +   * User identifier.
            +   * For Google Workspace user account, user_id should be the google workspace
            +   * user email.
            +   * For non-google identity provider user account, user_id is the mapped user
            +   * identifier configured during the workforcepool config.
            +   * 
            + * + * string user_id = 1; + * + * @return The bytes for userId. + */ + com.google.protobuf.ByteString getUserIdBytes(); + + /** + * + * + *
            +   * Group identifier.
            +   * For Google Workspace user account, group_id should be the google
            +   * workspace group email.
            +   * For non-google identity provider user account, group_id is the mapped
            +   * group identifier configured during the workforcepool config.
            +   * 
            + * + * string group_id = 2; + * + * @return Whether the groupId field is set. + */ + boolean hasGroupId(); + + /** + * + * + *
            +   * Group identifier.
            +   * For Google Workspace user account, group_id should be the google
            +   * workspace group email.
            +   * For non-google identity provider user account, group_id is the mapped
            +   * group identifier configured during the workforcepool config.
            +   * 
            + * + * string group_id = 2; + * + * @return The groupId. + */ + java.lang.String getGroupId(); + + /** + * + * + *
            +   * Group identifier.
            +   * For Google Workspace user account, group_id should be the google
            +   * workspace group email.
            +   * For non-google identity provider user account, group_id is the mapped
            +   * group identifier configured during the workforcepool config.
            +   * 
            + * + * string group_id = 2; + * + * @return The bytes for groupId. + */ + com.google.protobuf.ByteString getGroupIdBytes(); + + /** + * + * + *
            +   * For 3P application identities which are not present in the customer
            +   * identity provider.
            +   * 
            + * + * string external_entity_id = 3; + * + * @return Whether the externalEntityId field is set. + */ + boolean hasExternalEntityId(); + + /** + * + * + *
            +   * For 3P application identities which are not present in the customer
            +   * identity provider.
            +   * 
            + * + * string external_entity_id = 3; + * + * @return The externalEntityId. + */ + java.lang.String getExternalEntityId(); + + /** + * + * + *
            +   * For 3P application identities which are not present in the customer
            +   * identity provider.
            +   * 
            + * + * string external_entity_id = 3; + * + * @return The bytes for externalEntityId. + */ + com.google.protobuf.ByteString getExternalEntityIdBytes(); + + com.google.cloud.discoveryengine.v1beta.Principal.PrincipalCase getPrincipalCase(); +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/Project.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/Project.java index dbe55cfe7cde..ec7fff1af227 100644 --- a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/Project.java +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/Project.java @@ -2045,852 +2045,12475 @@ public com.google.protobuf.Parser getParserForType() { } } - private int bitField0_; - public static final int NAME_FIELD_NUMBER = 1; + public interface CustomerProvidedConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig) + com.google.protobuf.MessageOrBuilder { - @SuppressWarnings("serial") - private volatile java.lang.Object name_ = ""; + /** + * + * + *
            +     * Optional. Configuration for NotebookLM settings.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig.NotebooklmConfig notebooklm_config = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the notebooklmConfig field is set. + */ + boolean hasNotebooklmConfig(); - /** - * - * - *
            -   * Output only. Full resource name of the project, for example
            -   * `projects/{project}`.
            -   * Note that when making requests, project number and project id are both
            -   * acceptable, but the server will always respond in project number.
            -   * 
            - * - * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - 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(); - name_ = s; - return s; - } - } + /** + * + * + *
            +     * Optional. Configuration for NotebookLM settings.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig.NotebooklmConfig notebooklm_config = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The notebooklmConfig. + */ + com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig.NotebooklmConfig + getNotebooklmConfig(); - /** - * - * - *
            -   * Output only. Full resource name of the project, for example
            -   * `projects/{project}`.
            -   * Note that when making requests, project number and project id are both
            -   * acceptable, but the server will always respond in project number.
            -   * 
            - * - * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } + /** + * + * + *
            +     * Optional. Configuration for NotebookLM settings.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig.NotebooklmConfig notebooklm_config = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig.NotebooklmConfigOrBuilder + getNotebooklmConfigOrBuilder(); } - public static final int CREATE_TIME_FIELD_NUMBER = 2; - private com.google.protobuf.Timestamp createTime_; - /** * * *
            -   * Output only. The timestamp when this project is created.
            +   * Customer provided configurations.
                * 
            * - * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the createTime field is set. + * Protobuf type {@code google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig} */ - @java.lang.Override - public boolean hasCreateTime() { - return ((bitField0_ & 0x00000001) != 0); - } + public static final class CustomerProvidedConfig extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig) + CustomerProvidedConfigOrBuilder { + private static final long serialVersionUID = 0L; - /** - * - * - *
            -   * Output only. The timestamp when this project is created.
            -   * 
            - * - * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The createTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getCreateTime() { - return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; - } + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "CustomerProvidedConfig"); + } - /** - * - * - *
            -   * Output only. The timestamp when this project is created.
            -   * 
            - * - * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { - return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; - } + // Use CustomerProvidedConfig.newBuilder() to construct. + private CustomerProvidedConfig(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } - public static final int PROVISION_COMPLETION_TIME_FIELD_NUMBER = 3; - private com.google.protobuf.Timestamp provisionCompletionTime_; + private CustomerProvidedConfig() {} - /** - * - * - *
            -   * Output only. The timestamp when this project is successfully provisioned.
            -   * Empty value means this project is still provisioning and is not ready for
            -   * use.
            -   * 
            - * - * - * .google.protobuf.Timestamp provision_completion_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the provisionCompletionTime field is set. - */ - @java.lang.Override - public boolean hasProvisionCompletionTime() { - return ((bitField0_ & 0x00000002) != 0); - } + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.ProjectProto + .internal_static_google_cloud_discoveryengine_v1beta_Project_CustomerProvidedConfig_descriptor; + } - /** - * - * - *
            -   * Output only. The timestamp when this project is successfully provisioned.
            -   * Empty value means this project is still provisioning and is not ready for
            -   * use.
            -   * 
            - * - * - * .google.protobuf.Timestamp provision_completion_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The provisionCompletionTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getProvisionCompletionTime() { - return provisionCompletionTime_ == null - ? com.google.protobuf.Timestamp.getDefaultInstance() - : provisionCompletionTime_; - } + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.ProjectProto + .internal_static_google_cloud_discoveryengine_v1beta_Project_CustomerProvidedConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig.class, + com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig.Builder.class); + } - /** - * - * - *
            -   * Output only. The timestamp when this project is successfully provisioned.
            -   * Empty value means this project is still provisioning and is not ready for
            -   * use.
            -   * 
            - * - * - * .google.protobuf.Timestamp provision_completion_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getProvisionCompletionTimeOrBuilder() { - return provisionCompletionTime_ == null - ? com.google.protobuf.Timestamp.getDefaultInstance() - : provisionCompletionTime_; - } + public interface NotebooklmConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig.NotebooklmConfig) + com.google.protobuf.MessageOrBuilder { - public static final int SERVICE_TERMS_MAP_FIELD_NUMBER = 4; + /** + * + * + *
            +       * Model Armor configuration to be used for sanitizing user prompts and
            +       * LLM responses.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig.NotebooklmConfig.ModelArmorConfig model_armor_config = 1; + * + * + * @return Whether the modelArmorConfig field is set. + */ + boolean hasModelArmorConfig(); - private static final class ServiceTermsMapDefaultEntryHolder { - static final com.google.protobuf.MapEntry< - java.lang.String, com.google.cloud.discoveryengine.v1beta.Project.ServiceTerms> - defaultEntry = - com.google.protobuf.MapEntry - . - newDefaultInstance( - com.google.cloud.discoveryengine.v1beta.ProjectProto - .internal_static_google_cloud_discoveryengine_v1beta_Project_ServiceTermsMapEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.STRING, - "", - com.google.protobuf.WireFormat.FieldType.MESSAGE, - com.google.cloud.discoveryengine.v1beta.Project.ServiceTerms - .getDefaultInstance()); - } + /** + * + * + *
            +       * Model Armor configuration to be used for sanitizing user prompts and
            +       * LLM responses.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig.NotebooklmConfig.ModelArmorConfig model_armor_config = 1; + * + * + * @return The modelArmorConfig. + */ + com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig.NotebooklmConfig + .ModelArmorConfig + getModelArmorConfig(); - @SuppressWarnings("serial") - private com.google.protobuf.MapField< - java.lang.String, com.google.cloud.discoveryengine.v1beta.Project.ServiceTerms> - serviceTermsMap_; + /** + * + * + *
            +       * Model Armor configuration to be used for sanitizing user prompts and
            +       * LLM responses.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig.NotebooklmConfig.ModelArmorConfig model_armor_config = 1; + * + */ + com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig.NotebooklmConfig + .ModelArmorConfigOrBuilder + getModelArmorConfigOrBuilder(); - private com.google.protobuf.MapField< - java.lang.String, com.google.cloud.discoveryengine.v1beta.Project.ServiceTerms> - internalGetServiceTermsMap() { - if (serviceTermsMap_ == null) { - return com.google.protobuf.MapField.emptyMapField( - ServiceTermsMapDefaultEntryHolder.defaultEntry); - } - return serviceTermsMap_; - } + /** + * + * + *
            +       * Optional. Whether to disable the notebook sharing feature for the
            +       * project. Default to false if not specified.
            +       * 
            + * + * bool opt_out_notebook_sharing = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The optOutNotebookSharing. + */ + boolean getOptOutNotebookSharing(); - public int getServiceTermsMapCount() { - return internalGetServiceTermsMap().getMap().size(); - } + /** + * + * + *
            +       * Optional. Specifies the data protection policy for NotebookLM.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig.NotebooklmConfig.DataProtectionPolicy data_protection_policy = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the dataProtectionPolicy field is set. + */ + boolean hasDataProtectionPolicy(); - /** - * - * - *
            -   * Output only. A map of terms of services. The key is the `id` of
            -   * [ServiceTerms][google.cloud.discoveryengine.v1beta.Project.ServiceTerms].
            -   * 
            - * - * - * map<string, .google.cloud.discoveryengine.v1beta.Project.ServiceTerms> service_terms_map = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public boolean containsServiceTermsMap(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - return internalGetServiceTermsMap().getMap().containsKey(key); - } + /** + * + * + *
            +       * Optional. Specifies the data protection policy for NotebookLM.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig.NotebooklmConfig.DataProtectionPolicy data_protection_policy = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The dataProtectionPolicy. + */ + com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig.NotebooklmConfig + .DataProtectionPolicy + getDataProtectionPolicy(); - /** Use {@link #getServiceTermsMapMap()} instead. */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map< - java.lang.String, com.google.cloud.discoveryengine.v1beta.Project.ServiceTerms> - getServiceTermsMap() { - return getServiceTermsMapMap(); - } + /** + * + * + *
            +       * Optional. Specifies the data protection policy for NotebookLM.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig.NotebooklmConfig.DataProtectionPolicy data_protection_policy = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig.NotebooklmConfig + .DataProtectionPolicyOrBuilder + getDataProtectionPolicyOrBuilder(); - /** - * - * - *
            -   * Output only. A map of terms of services. The key is the `id` of
            -   * [ServiceTerms][google.cloud.discoveryengine.v1beta.Project.ServiceTerms].
            -   * 
            - * - * - * map<string, .google.cloud.discoveryengine.v1beta.Project.ServiceTerms> service_terms_map = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public java.util.Map< - java.lang.String, com.google.cloud.discoveryengine.v1beta.Project.ServiceTerms> - getServiceTermsMapMap() { - return internalGetServiceTermsMap().getMap(); - } + /** + * + * + *
            +       * Optional. Observability config for NotebookLM.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.ObservabilityConfig observability_config = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the observabilityConfig field is set. + */ + boolean hasObservabilityConfig(); - /** - * - * - *
            -   * Output only. A map of terms of services. The key is the `id` of
            -   * [ServiceTerms][google.cloud.discoveryengine.v1beta.Project.ServiceTerms].
            -   * 
            - * - * - * map<string, .google.cloud.discoveryengine.v1beta.Project.ServiceTerms> service_terms_map = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public /* nullable */ com.google.cloud.discoveryengine.v1beta.Project.ServiceTerms - getServiceTermsMapOrDefault( - java.lang.String key, - /* nullable */ - com.google.cloud.discoveryengine.v1beta.Project.ServiceTerms defaultValue) { - if (key == null) { - throw new NullPointerException("map key"); - } - java.util.Map - map = internalGetServiceTermsMap().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } + /** + * + * + *
            +       * Optional. Observability config for NotebookLM.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.ObservabilityConfig observability_config = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The observabilityConfig. + */ + com.google.cloud.discoveryengine.v1beta.ObservabilityConfig getObservabilityConfig(); - /** - * - * - *
            -   * Output only. A map of terms of services. The key is the `id` of
            -   * [ServiceTerms][google.cloud.discoveryengine.v1beta.Project.ServiceTerms].
            -   * 
            - * - * - * map<string, .google.cloud.discoveryengine.v1beta.Project.ServiceTerms> service_terms_map = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.Project.ServiceTerms getServiceTermsMapOrThrow( - java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - java.util.Map - map = internalGetServiceTermsMap().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); + /** + * + * + *
            +       * Optional. Observability config for NotebookLM.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.ObservabilityConfig observability_config = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.discoveryengine.v1beta.ObservabilityConfigOrBuilder + getObservabilityConfigOrBuilder(); } - return map.get(key); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + /** + * + * + *
            +     * Configuration for NotebookLM.
            +     * 
            + * + * Protobuf type {@code + * google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig.NotebooklmConfig} + */ + public static final class NotebooklmConfig extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig.NotebooklmConfig) + NotebooklmConfigOrBuilder { + private static final long serialVersionUID = 0L; - memoizedIsInitialized = 1; - return true; - } + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "NotebooklmConfig"); + } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); - } - if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(2, getCreateTime()); - } - if (((bitField0_ & 0x00000002) != 0)) { - output.writeMessage(3, getProvisionCompletionTime()); - } - com.google.protobuf.GeneratedMessage.serializeStringMapTo( - output, internalGetServiceTermsMap(), ServiceTermsMapDefaultEntryHolder.defaultEntry, 4); - getUnknownFields().writeTo(output); - } + // Use NotebooklmConfig.newBuilder() to construct. + private NotebooklmConfig(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; + private NotebooklmConfig() {} - size = 0; - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); - } - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getCreateTime()); - } - if (((bitField0_ & 0x00000002) != 0)) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize(3, getProvisionCompletionTime()); - } - for (java.util.Map.Entry< - java.lang.String, com.google.cloud.discoveryengine.v1beta.Project.ServiceTerms> - entry : internalGetServiceTermsMap().getMap().entrySet()) { - com.google.protobuf.MapEntry< - java.lang.String, com.google.cloud.discoveryengine.v1beta.Project.ServiceTerms> - serviceTermsMap__ = - ServiceTermsMapDefaultEntryHolder.defaultEntry - .newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, serviceTermsMap__); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.ProjectProto + .internal_static_google_cloud_discoveryengine_v1beta_Project_CustomerProvidedConfig_NotebooklmConfig_descriptor; + } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.discoveryengine.v1beta.Project)) { - return super.equals(obj); - } - com.google.cloud.discoveryengine.v1beta.Project other = - (com.google.cloud.discoveryengine.v1beta.Project) obj; + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.ProjectProto + .internal_static_google_cloud_discoveryengine_v1beta_Project_CustomerProvidedConfig_NotebooklmConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig + .NotebooklmConfig.class, + com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig + .NotebooklmConfig.Builder.class); + } + + public interface ModelArmorConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig.NotebooklmConfig.ModelArmorConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
            +         * Optional. The resource name of the Model Armor Template for
            +         * sanitizing user prompts. Format:
            +         * projects/{project}/locations/{location}/templates/{template_id}
            +         * If not specified, no sanitization will be applied to the user prompt.
            +         * 
            + * + * + * string user_prompt_template = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The userPromptTemplate. + */ + java.lang.String getUserPromptTemplate(); + + /** + * + * + *
            +         * Optional. The resource name of the Model Armor Template for
            +         * sanitizing user prompts. Format:
            +         * projects/{project}/locations/{location}/templates/{template_id}
            +         * If not specified, no sanitization will be applied to the user prompt.
            +         * 
            + * + * + * string user_prompt_template = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for userPromptTemplate. + */ + com.google.protobuf.ByteString getUserPromptTemplateBytes(); + + /** + * + * + *
            +         * Optional. The resource name of the Model Armor Template for
            +         * sanitizing LLM responses. Format:
            +         * projects/{project}/locations/{location}/templates/{template_id}
            +         * If not specified, no sanitization will be applied to the LLM
            +         * response.
            +         * 
            + * + * + * string response_template = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The responseTemplate. + */ + java.lang.String getResponseTemplate(); + + /** + * + * + *
            +         * Optional. The resource name of the Model Armor Template for
            +         * sanitizing LLM responses. Format:
            +         * projects/{project}/locations/{location}/templates/{template_id}
            +         * If not specified, no sanitization will be applied to the LLM
            +         * response.
            +         * 
            + * + * + * string response_template = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for responseTemplate. + */ + com.google.protobuf.ByteString getResponseTemplateBytes(); + } - if (!getName().equals(other.getName())) return false; - if (hasCreateTime() != other.hasCreateTime()) return false; - if (hasCreateTime()) { - if (!getCreateTime().equals(other.getCreateTime())) return false; - } - if (hasProvisionCompletionTime() != other.hasProvisionCompletionTime()) return false; - if (hasProvisionCompletionTime()) { - if (!getProvisionCompletionTime().equals(other.getProvisionCompletionTime())) return false; - } - if (!internalGetServiceTermsMap().equals(other.internalGetServiceTermsMap())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } + /** + * + * + *
            +       * Configuration for customer defined Model Armor templates to be used for
            +       * sanitizing user prompts and LLM responses.
            +       * 
            + * + * Protobuf type {@code + * google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig.NotebooklmConfig.ModelArmorConfig} + */ + public static final class ModelArmorConfig extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig.NotebooklmConfig.ModelArmorConfig) + ModelArmorConfigOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ModelArmorConfig"); + } - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - if (hasCreateTime()) { - hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; - hash = (53 * hash) + getCreateTime().hashCode(); - } - if (hasProvisionCompletionTime()) { - hash = (37 * hash) + PROVISION_COMPLETION_TIME_FIELD_NUMBER; - hash = (53 * hash) + getProvisionCompletionTime().hashCode(); - } - if (!internalGetServiceTermsMap().getMap().isEmpty()) { - hash = (37 * hash) + SERVICE_TERMS_MAP_FIELD_NUMBER; - hash = (53 * hash) + internalGetServiceTermsMap().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } + // Use ModelArmorConfig.newBuilder() to construct. + private ModelArmorConfig(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } - public static com.google.cloud.discoveryengine.v1beta.Project parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } + private ModelArmorConfig() { + userPromptTemplate_ = ""; + responseTemplate_ = ""; + } - public static com.google.cloud.discoveryengine.v1beta.Project parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.ProjectProto + .internal_static_google_cloud_discoveryengine_v1beta_Project_CustomerProvidedConfig_NotebooklmConfig_ModelArmorConfig_descriptor; + } - public static com.google.cloud.discoveryengine.v1beta.Project parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.ProjectProto + .internal_static_google_cloud_discoveryengine_v1beta_Project_CustomerProvidedConfig_NotebooklmConfig_ModelArmorConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig + .NotebooklmConfig.ModelArmorConfig.class, + com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig + .NotebooklmConfig.ModelArmorConfig.Builder.class); + } - public static com.google.cloud.discoveryengine.v1beta.Project parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } + public static final int USER_PROMPT_TEMPLATE_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object userPromptTemplate_ = ""; + + /** + * + * + *
            +         * Optional. The resource name of the Model Armor Template for
            +         * sanitizing user prompts. Format:
            +         * projects/{project}/locations/{location}/templates/{template_id}
            +         * If not specified, no sanitization will be applied to the user prompt.
            +         * 
            + * + * + * string user_prompt_template = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The userPromptTemplate. + */ + @java.lang.Override + public java.lang.String getUserPromptTemplate() { + java.lang.Object ref = userPromptTemplate_; + 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(); + userPromptTemplate_ = s; + return s; + } + } - public static com.google.cloud.discoveryengine.v1beta.Project parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } + /** + * + * + *
            +         * Optional. The resource name of the Model Armor Template for
            +         * sanitizing user prompts. Format:
            +         * projects/{project}/locations/{location}/templates/{template_id}
            +         * If not specified, no sanitization will be applied to the user prompt.
            +         * 
            + * + * + * string user_prompt_template = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for userPromptTemplate. + */ + @java.lang.Override + public com.google.protobuf.ByteString getUserPromptTemplateBytes() { + java.lang.Object ref = userPromptTemplate_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + userPromptTemplate_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } - public static com.google.cloud.discoveryengine.v1beta.Project parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } + public static final int RESPONSE_TEMPLATE_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object responseTemplate_ = ""; + + /** + * + * + *
            +         * Optional. The resource name of the Model Armor Template for
            +         * sanitizing LLM responses. Format:
            +         * projects/{project}/locations/{location}/templates/{template_id}
            +         * If not specified, no sanitization will be applied to the LLM
            +         * response.
            +         * 
            + * + * + * string response_template = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The responseTemplate. + */ + @java.lang.Override + public java.lang.String getResponseTemplate() { + java.lang.Object ref = responseTemplate_; + 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(); + responseTemplate_ = s; + return s; + } + } - public static com.google.cloud.discoveryengine.v1beta.Project parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } + /** + * + * + *
            +         * Optional. The resource name of the Model Armor Template for
            +         * sanitizing LLM responses. Format:
            +         * projects/{project}/locations/{location}/templates/{template_id}
            +         * If not specified, no sanitization will be applied to the LLM
            +         * response.
            +         * 
            + * + * + * string response_template = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for responseTemplate. + */ + @java.lang.Override + public com.google.protobuf.ByteString getResponseTemplateBytes() { + java.lang.Object ref = responseTemplate_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + responseTemplate_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } - public static com.google.cloud.discoveryengine.v1beta.Project parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } + private byte memoizedIsInitialized = -1; - public static com.google.cloud.discoveryengine.v1beta.Project parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; - public static com.google.cloud.discoveryengine.v1beta.Project parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } + memoizedIsInitialized = 1; + return true; + } - public static com.google.cloud.discoveryengine.v1beta.Project parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(userPromptTemplate_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, userPromptTemplate_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(responseTemplate_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, responseTemplate_); + } + getUnknownFields().writeTo(output); + } - public static com.google.cloud.discoveryengine.v1beta.Project 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 int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(userPromptTemplate_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, userPromptTemplate_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(responseTemplate_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, responseTemplate_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof + com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig + .NotebooklmConfig.ModelArmorConfig)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig.NotebooklmConfig + .ModelArmorConfig + other = + (com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig + .NotebooklmConfig.ModelArmorConfig) + obj; + + if (!getUserPromptTemplate().equals(other.getUserPromptTemplate())) return false; + if (!getResponseTemplate().equals(other.getResponseTemplate())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } - public static Builder newBuilder(com.google.cloud.discoveryengine.v1beta.Project prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + USER_PROMPT_TEMPLATE_FIELD_NUMBER; + hash = (53 * hash) + getUserPromptTemplate().hashCode(); + hash = (37 * hash) + RESPONSE_TEMPLATE_FIELD_NUMBER; + hash = (53 * hash) + getResponseTemplate().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } + public static com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig + .NotebooklmConfig.ModelArmorConfig + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } + public static com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig + .NotebooklmConfig.ModelArmorConfig + parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - /** - * - * - *
            -   * Metadata and configurations for a Google Cloud project in the service.
            -   * 
            - * - * Protobuf type {@code google.cloud.discoveryengine.v1beta.Project} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.Project) - com.google.cloud.discoveryengine.v1beta.ProjectOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.discoveryengine.v1beta.ProjectProto - .internal_static_google_cloud_discoveryengine_v1beta_Project_descriptor; + public static com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig + .NotebooklmConfig.ModelArmorConfig + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig + .NotebooklmConfig.ModelArmorConfig + 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.discoveryengine.v1beta.Project.CustomerProvidedConfig + .NotebooklmConfig.ModelArmorConfig + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig + .NotebooklmConfig.ModelArmorConfig + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig + .NotebooklmConfig.ModelArmorConfig + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig + .NotebooklmConfig.ModelArmorConfig + 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.discoveryengine.v1beta.Project.CustomerProvidedConfig + .NotebooklmConfig.ModelArmorConfig + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig + .NotebooklmConfig.ModelArmorConfig + 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.discoveryengine.v1beta.Project.CustomerProvidedConfig + .NotebooklmConfig.ModelArmorConfig + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig + .NotebooklmConfig.ModelArmorConfig + 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.discoveryengine.v1beta.Project.CustomerProvidedConfig.NotebooklmConfig + .ModelArmorConfig + 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; + } + + /** + * + * + *
            +         * Configuration for customer defined Model Armor templates to be used for
            +         * sanitizing user prompts and LLM responses.
            +         * 
            + * + * Protobuf type {@code + * google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig.NotebooklmConfig.ModelArmorConfig} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig.NotebooklmConfig.ModelArmorConfig) + com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig.NotebooklmConfig + .ModelArmorConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.ProjectProto + .internal_static_google_cloud_discoveryengine_v1beta_Project_CustomerProvidedConfig_NotebooklmConfig_ModelArmorConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.ProjectProto + .internal_static_google_cloud_discoveryengine_v1beta_Project_CustomerProvidedConfig_NotebooklmConfig_ModelArmorConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig + .NotebooklmConfig.ModelArmorConfig.class, + com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig + .NotebooklmConfig.ModelArmorConfig.Builder.class); + } + + // Construct using + // com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig.NotebooklmConfig.ModelArmorConfig.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + userPromptTemplate_ = ""; + responseTemplate_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1beta.ProjectProto + .internal_static_google_cloud_discoveryengine_v1beta_Project_CustomerProvidedConfig_NotebooklmConfig_ModelArmorConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig + .NotebooklmConfig.ModelArmorConfig + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig + .NotebooklmConfig.ModelArmorConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig + .NotebooklmConfig.ModelArmorConfig + build() { + com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig.NotebooklmConfig + .ModelArmorConfig + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig + .NotebooklmConfig.ModelArmorConfig + buildPartial() { + com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig.NotebooklmConfig + .ModelArmorConfig + result = + new com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig + .NotebooklmConfig.ModelArmorConfig(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig + .NotebooklmConfig.ModelArmorConfig + result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.userPromptTemplate_ = userPromptTemplate_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.responseTemplate_ = responseTemplate_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig + .NotebooklmConfig.ModelArmorConfig) { + return mergeFrom( + (com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig + .NotebooklmConfig.ModelArmorConfig) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig + .NotebooklmConfig.ModelArmorConfig + other) { + if (other + == com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig + .NotebooklmConfig.ModelArmorConfig.getDefaultInstance()) return this; + if (!other.getUserPromptTemplate().isEmpty()) { + userPromptTemplate_ = other.userPromptTemplate_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getResponseTemplate().isEmpty()) { + responseTemplate_ = other.responseTemplate_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + userPromptTemplate_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + responseTemplate_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object userPromptTemplate_ = ""; + + /** + * + * + *
            +           * Optional. The resource name of the Model Armor Template for
            +           * sanitizing user prompts. Format:
            +           * projects/{project}/locations/{location}/templates/{template_id}
            +           * If not specified, no sanitization will be applied to the user prompt.
            +           * 
            + * + * + * string user_prompt_template = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The userPromptTemplate. + */ + public java.lang.String getUserPromptTemplate() { + java.lang.Object ref = userPromptTemplate_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + userPromptTemplate_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
            +           * Optional. The resource name of the Model Armor Template for
            +           * sanitizing user prompts. Format:
            +           * projects/{project}/locations/{location}/templates/{template_id}
            +           * If not specified, no sanitization will be applied to the user prompt.
            +           * 
            + * + * + * string user_prompt_template = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for userPromptTemplate. + */ + public com.google.protobuf.ByteString getUserPromptTemplateBytes() { + java.lang.Object ref = userPromptTemplate_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + userPromptTemplate_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
            +           * Optional. The resource name of the Model Armor Template for
            +           * sanitizing user prompts. Format:
            +           * projects/{project}/locations/{location}/templates/{template_id}
            +           * If not specified, no sanitization will be applied to the user prompt.
            +           * 
            + * + * + * string user_prompt_template = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param value The userPromptTemplate to set. + * @return This builder for chaining. + */ + public Builder setUserPromptTemplate(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + userPromptTemplate_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
            +           * Optional. The resource name of the Model Armor Template for
            +           * sanitizing user prompts. Format:
            +           * projects/{project}/locations/{location}/templates/{template_id}
            +           * If not specified, no sanitization will be applied to the user prompt.
            +           * 
            + * + * + * string user_prompt_template = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearUserPromptTemplate() { + userPromptTemplate_ = getDefaultInstance().getUserPromptTemplate(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
            +           * Optional. The resource name of the Model Armor Template for
            +           * sanitizing user prompts. Format:
            +           * projects/{project}/locations/{location}/templates/{template_id}
            +           * If not specified, no sanitization will be applied to the user prompt.
            +           * 
            + * + * + * string user_prompt_template = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for userPromptTemplate to set. + * @return This builder for chaining. + */ + public Builder setUserPromptTemplateBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + userPromptTemplate_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object responseTemplate_ = ""; + + /** + * + * + *
            +           * Optional. The resource name of the Model Armor Template for
            +           * sanitizing LLM responses. Format:
            +           * projects/{project}/locations/{location}/templates/{template_id}
            +           * If not specified, no sanitization will be applied to the LLM
            +           * response.
            +           * 
            + * + * + * string response_template = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The responseTemplate. + */ + public java.lang.String getResponseTemplate() { + java.lang.Object ref = responseTemplate_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + responseTemplate_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
            +           * Optional. The resource name of the Model Armor Template for
            +           * sanitizing LLM responses. Format:
            +           * projects/{project}/locations/{location}/templates/{template_id}
            +           * If not specified, no sanitization will be applied to the LLM
            +           * response.
            +           * 
            + * + * + * string response_template = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for responseTemplate. + */ + public com.google.protobuf.ByteString getResponseTemplateBytes() { + java.lang.Object ref = responseTemplate_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + responseTemplate_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
            +           * Optional. The resource name of the Model Armor Template for
            +           * sanitizing LLM responses. Format:
            +           * projects/{project}/locations/{location}/templates/{template_id}
            +           * If not specified, no sanitization will be applied to the LLM
            +           * response.
            +           * 
            + * + * + * string response_template = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param value The responseTemplate to set. + * @return This builder for chaining. + */ + public Builder setResponseTemplate(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + responseTemplate_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
            +           * Optional. The resource name of the Model Armor Template for
            +           * sanitizing LLM responses. Format:
            +           * projects/{project}/locations/{location}/templates/{template_id}
            +           * If not specified, no sanitization will be applied to the LLM
            +           * response.
            +           * 
            + * + * + * string response_template = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearResponseTemplate() { + responseTemplate_ = getDefaultInstance().getResponseTemplate(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
            +           * Optional. The resource name of the Model Armor Template for
            +           * sanitizing LLM responses. Format:
            +           * projects/{project}/locations/{location}/templates/{template_id}
            +           * If not specified, no sanitization will be applied to the LLM
            +           * response.
            +           * 
            + * + * + * string response_template = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for responseTemplate to set. + * @return This builder for chaining. + */ + public Builder setResponseTemplateBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + responseTemplate_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig.NotebooklmConfig.ModelArmorConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig.NotebooklmConfig.ModelArmorConfig) + private static final com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig + .NotebooklmConfig.ModelArmorConfig + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig + .NotebooklmConfig.ModelArmorConfig(); + } + + public static com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig + .NotebooklmConfig.ModelArmorConfig + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ModelArmorConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig + .NotebooklmConfig.ModelArmorConfig + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface DataProtectionPolicyOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig.NotebooklmConfig.DataProtectionPolicy) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
            +         * Optional. The sensitive data protection policy.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig.NotebooklmConfig.DataProtectionPolicy.SensitiveDataProtectionPolicy sensitive_data_protection_policy = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the sensitiveDataProtectionPolicy field is set. + */ + boolean hasSensitiveDataProtectionPolicy(); + + /** + * + * + *
            +         * Optional. The sensitive data protection policy.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig.NotebooklmConfig.DataProtectionPolicy.SensitiveDataProtectionPolicy sensitive_data_protection_policy = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The sensitiveDataProtectionPolicy. + */ + com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig.NotebooklmConfig + .DataProtectionPolicy.SensitiveDataProtectionPolicy + getSensitiveDataProtectionPolicy(); + + /** + * + * + *
            +         * Optional. The sensitive data protection policy.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig.NotebooklmConfig.DataProtectionPolicy.SensitiveDataProtectionPolicy sensitive_data_protection_policy = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig.NotebooklmConfig + .DataProtectionPolicy.SensitiveDataProtectionPolicyOrBuilder + getSensitiveDataProtectionPolicyOrBuilder(); + } + + /** + * + * + *
            +       * Data protection policy config for NotebookLM.
            +       * 
            + * + * Protobuf type {@code + * google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig.NotebooklmConfig.DataProtectionPolicy} + */ + public static final class DataProtectionPolicy extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig.NotebooklmConfig.DataProtectionPolicy) + DataProtectionPolicyOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "DataProtectionPolicy"); + } + + // Use DataProtectionPolicy.newBuilder() to construct. + private DataProtectionPolicy(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private DataProtectionPolicy() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.ProjectProto + .internal_static_google_cloud_discoveryengine_v1beta_Project_CustomerProvidedConfig_NotebooklmConfig_DataProtectionPolicy_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.ProjectProto + .internal_static_google_cloud_discoveryengine_v1beta_Project_CustomerProvidedConfig_NotebooklmConfig_DataProtectionPolicy_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig + .NotebooklmConfig.DataProtectionPolicy.class, + com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig + .NotebooklmConfig.DataProtectionPolicy.Builder.class); + } + + public interface SensitiveDataProtectionPolicyOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig.NotebooklmConfig.DataProtectionPolicy.SensitiveDataProtectionPolicy) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
            +           * Optional. The Sensitive Data Protection policy resource name.
            +           * 
            + * + * + * string policy = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The policy. + */ + java.lang.String getPolicy(); + + /** + * + * + *
            +           * Optional. The Sensitive Data Protection policy resource name.
            +           * 
            + * + * + * string policy = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for policy. + */ + com.google.protobuf.ByteString getPolicyBytes(); + } + + /** + * + * + *
            +         * Specifies a Sensitive Data Protection
            +         * (https://cloud.google.com/sensitive-data-protection/docs/sensitive-data-protection-overview)
            +         * policy.
            +         * 
            + * + * Protobuf type {@code + * google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig.NotebooklmConfig.DataProtectionPolicy.SensitiveDataProtectionPolicy} + */ + public static final class SensitiveDataProtectionPolicy + extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig.NotebooklmConfig.DataProtectionPolicy.SensitiveDataProtectionPolicy) + SensitiveDataProtectionPolicyOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "SensitiveDataProtectionPolicy"); + } + + // Use SensitiveDataProtectionPolicy.newBuilder() to construct. + private SensitiveDataProtectionPolicy( + com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private SensitiveDataProtectionPolicy() { + policy_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.ProjectProto + .internal_static_google_cloud_discoveryengine_v1beta_Project_CustomerProvidedConfig_NotebooklmConfig_DataProtectionPolicy_SensitiveDataProtectionPolicy_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.ProjectProto + .internal_static_google_cloud_discoveryengine_v1beta_Project_CustomerProvidedConfig_NotebooklmConfig_DataProtectionPolicy_SensitiveDataProtectionPolicy_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig + .NotebooklmConfig.DataProtectionPolicy.SensitiveDataProtectionPolicy.class, + com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig + .NotebooklmConfig.DataProtectionPolicy.SensitiveDataProtectionPolicy.Builder + .class); + } + + public static final int POLICY_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object policy_ = ""; + + /** + * + * + *
            +           * Optional. The Sensitive Data Protection policy resource name.
            +           * 
            + * + * + * string policy = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The policy. + */ + @java.lang.Override + public java.lang.String getPolicy() { + java.lang.Object ref = policy_; + 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(); + policy_ = s; + return s; + } + } + + /** + * + * + *
            +           * Optional. The Sensitive Data Protection policy resource name.
            +           * 
            + * + * + * string policy = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for policy. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPolicyBytes() { + java.lang.Object ref = policy_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + policy_ = 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 { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(policy_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, policy_); + } + 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(policy_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, policy_); + } + 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.discoveryengine.v1beta.Project.CustomerProvidedConfig + .NotebooklmConfig.DataProtectionPolicy.SensitiveDataProtectionPolicy)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig.NotebooklmConfig + .DataProtectionPolicy.SensitiveDataProtectionPolicy + other = + (com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig + .NotebooklmConfig.DataProtectionPolicy.SensitiveDataProtectionPolicy) + obj; + + if (!getPolicy().equals(other.getPolicy())) 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) + POLICY_FIELD_NUMBER; + hash = (53 * hash) + getPolicy().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig + .NotebooklmConfig.DataProtectionPolicy.SensitiveDataProtectionPolicy + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig + .NotebooklmConfig.DataProtectionPolicy.SensitiveDataProtectionPolicy + 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.discoveryengine.v1beta.Project.CustomerProvidedConfig + .NotebooklmConfig.DataProtectionPolicy.SensitiveDataProtectionPolicy + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig + .NotebooklmConfig.DataProtectionPolicy.SensitiveDataProtectionPolicy + 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.discoveryengine.v1beta.Project.CustomerProvidedConfig + .NotebooklmConfig.DataProtectionPolicy.SensitiveDataProtectionPolicy + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig + .NotebooklmConfig.DataProtectionPolicy.SensitiveDataProtectionPolicy + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig + .NotebooklmConfig.DataProtectionPolicy.SensitiveDataProtectionPolicy + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig + .NotebooklmConfig.DataProtectionPolicy.SensitiveDataProtectionPolicy + 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.discoveryengine.v1beta.Project.CustomerProvidedConfig + .NotebooklmConfig.DataProtectionPolicy.SensitiveDataProtectionPolicy + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig + .NotebooklmConfig.DataProtectionPolicy.SensitiveDataProtectionPolicy + 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.discoveryengine.v1beta.Project.CustomerProvidedConfig + .NotebooklmConfig.DataProtectionPolicy.SensitiveDataProtectionPolicy + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig + .NotebooklmConfig.DataProtectionPolicy.SensitiveDataProtectionPolicy + 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.discoveryengine.v1beta.Project.CustomerProvidedConfig + .NotebooklmConfig.DataProtectionPolicy.SensitiveDataProtectionPolicy + 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; + } + + /** + * + * + *
            +           * Specifies a Sensitive Data Protection
            +           * (https://cloud.google.com/sensitive-data-protection/docs/sensitive-data-protection-overview)
            +           * policy.
            +           * 
            + * + * Protobuf type {@code + * google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig.NotebooklmConfig.DataProtectionPolicy.SensitiveDataProtectionPolicy} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig.NotebooklmConfig.DataProtectionPolicy.SensitiveDataProtectionPolicy) + com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig + .NotebooklmConfig.DataProtectionPolicy.SensitiveDataProtectionPolicyOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.ProjectProto + .internal_static_google_cloud_discoveryengine_v1beta_Project_CustomerProvidedConfig_NotebooklmConfig_DataProtectionPolicy_SensitiveDataProtectionPolicy_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.ProjectProto + .internal_static_google_cloud_discoveryengine_v1beta_Project_CustomerProvidedConfig_NotebooklmConfig_DataProtectionPolicy_SensitiveDataProtectionPolicy_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig + .NotebooklmConfig.DataProtectionPolicy.SensitiveDataProtectionPolicy + .class, + com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig + .NotebooklmConfig.DataProtectionPolicy.SensitiveDataProtectionPolicy + .Builder.class); + } + + // Construct using + // com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig.NotebooklmConfig.DataProtectionPolicy.SensitiveDataProtectionPolicy.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + policy_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1beta.ProjectProto + .internal_static_google_cloud_discoveryengine_v1beta_Project_CustomerProvidedConfig_NotebooklmConfig_DataProtectionPolicy_SensitiveDataProtectionPolicy_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig + .NotebooklmConfig.DataProtectionPolicy.SensitiveDataProtectionPolicy + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig + .NotebooklmConfig.DataProtectionPolicy.SensitiveDataProtectionPolicy + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig + .NotebooklmConfig.DataProtectionPolicy.SensitiveDataProtectionPolicy + build() { + com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig + .NotebooklmConfig.DataProtectionPolicy.SensitiveDataProtectionPolicy + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig + .NotebooklmConfig.DataProtectionPolicy.SensitiveDataProtectionPolicy + buildPartial() { + com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig + .NotebooklmConfig.DataProtectionPolicy.SensitiveDataProtectionPolicy + result = + new com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig + .NotebooklmConfig.DataProtectionPolicy.SensitiveDataProtectionPolicy( + this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig + .NotebooklmConfig.DataProtectionPolicy.SensitiveDataProtectionPolicy + result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.policy_ = policy_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig + .NotebooklmConfig.DataProtectionPolicy.SensitiveDataProtectionPolicy) { + return mergeFrom( + (com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig + .NotebooklmConfig.DataProtectionPolicy.SensitiveDataProtectionPolicy) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig + .NotebooklmConfig.DataProtectionPolicy.SensitiveDataProtectionPolicy + other) { + if (other + == com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig + .NotebooklmConfig.DataProtectionPolicy.SensitiveDataProtectionPolicy + .getDefaultInstance()) return this; + if (!other.getPolicy().isEmpty()) { + policy_ = other.policy_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + policy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object policy_ = ""; + + /** + * + * + *
            +             * Optional. The Sensitive Data Protection policy resource name.
            +             * 
            + * + * + * string policy = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The policy. + */ + public java.lang.String getPolicy() { + java.lang.Object ref = policy_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + policy_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
            +             * Optional. The Sensitive Data Protection policy resource name.
            +             * 
            + * + * + * string policy = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for policy. + */ + public com.google.protobuf.ByteString getPolicyBytes() { + java.lang.Object ref = policy_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + policy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
            +             * Optional. The Sensitive Data Protection policy resource name.
            +             * 
            + * + * + * string policy = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param value The policy to set. + * @return This builder for chaining. + */ + public Builder setPolicy(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + policy_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
            +             * Optional. The Sensitive Data Protection policy resource name.
            +             * 
            + * + * + * string policy = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearPolicy() { + policy_ = getDefaultInstance().getPolicy(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
            +             * Optional. The Sensitive Data Protection policy resource name.
            +             * 
            + * + * + * string policy = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for policy to set. + * @return This builder for chaining. + */ + public Builder setPolicyBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + policy_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig.NotebooklmConfig.DataProtectionPolicy.SensitiveDataProtectionPolicy) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig.NotebooklmConfig.DataProtectionPolicy.SensitiveDataProtectionPolicy) + private static final com.google.cloud.discoveryengine.v1beta.Project + .CustomerProvidedConfig.NotebooklmConfig.DataProtectionPolicy + .SensitiveDataProtectionPolicy + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig + .NotebooklmConfig.DataProtectionPolicy.SensitiveDataProtectionPolicy(); + } + + public static com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig + .NotebooklmConfig.DataProtectionPolicy.SensitiveDataProtectionPolicy + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SensitiveDataProtectionPolicy parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig + .NotebooklmConfig.DataProtectionPolicy.SensitiveDataProtectionPolicy + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int bitField0_; + public static final int SENSITIVE_DATA_PROTECTION_POLICY_FIELD_NUMBER = 1; + private com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig + .NotebooklmConfig.DataProtectionPolicy.SensitiveDataProtectionPolicy + sensitiveDataProtectionPolicy_; + + /** + * + * + *
            +         * Optional. The sensitive data protection policy.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig.NotebooklmConfig.DataProtectionPolicy.SensitiveDataProtectionPolicy sensitive_data_protection_policy = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the sensitiveDataProtectionPolicy field is set. + */ + @java.lang.Override + public boolean hasSensitiveDataProtectionPolicy() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
            +         * Optional. The sensitive data protection policy.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig.NotebooklmConfig.DataProtectionPolicy.SensitiveDataProtectionPolicy sensitive_data_protection_policy = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The sensitiveDataProtectionPolicy. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig + .NotebooklmConfig.DataProtectionPolicy.SensitiveDataProtectionPolicy + getSensitiveDataProtectionPolicy() { + return sensitiveDataProtectionPolicy_ == null + ? com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig + .NotebooklmConfig.DataProtectionPolicy.SensitiveDataProtectionPolicy + .getDefaultInstance() + : sensitiveDataProtectionPolicy_; + } + + /** + * + * + *
            +         * Optional. The sensitive data protection policy.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig.NotebooklmConfig.DataProtectionPolicy.SensitiveDataProtectionPolicy sensitive_data_protection_policy = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig + .NotebooklmConfig.DataProtectionPolicy.SensitiveDataProtectionPolicyOrBuilder + getSensitiveDataProtectionPolicyOrBuilder() { + return sensitiveDataProtectionPolicy_ == null + ? com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig + .NotebooklmConfig.DataProtectionPolicy.SensitiveDataProtectionPolicy + .getDefaultInstance() + : sensitiveDataProtectionPolicy_; + } + + 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, getSensitiveDataProtectionPolicy()); + } + 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, getSensitiveDataProtectionPolicy()); + } + 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.discoveryengine.v1beta.Project.CustomerProvidedConfig + .NotebooklmConfig.DataProtectionPolicy)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig.NotebooklmConfig + .DataProtectionPolicy + other = + (com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig + .NotebooklmConfig.DataProtectionPolicy) + obj; + + if (hasSensitiveDataProtectionPolicy() != other.hasSensitiveDataProtectionPolicy()) + return false; + if (hasSensitiveDataProtectionPolicy()) { + if (!getSensitiveDataProtectionPolicy() + .equals(other.getSensitiveDataProtectionPolicy())) 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 (hasSensitiveDataProtectionPolicy()) { + hash = (37 * hash) + SENSITIVE_DATA_PROTECTION_POLICY_FIELD_NUMBER; + hash = (53 * hash) + getSensitiveDataProtectionPolicy().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig + .NotebooklmConfig.DataProtectionPolicy + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig + .NotebooklmConfig.DataProtectionPolicy + 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.discoveryengine.v1beta.Project.CustomerProvidedConfig + .NotebooklmConfig.DataProtectionPolicy + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig + .NotebooklmConfig.DataProtectionPolicy + 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.discoveryengine.v1beta.Project.CustomerProvidedConfig + .NotebooklmConfig.DataProtectionPolicy + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig + .NotebooklmConfig.DataProtectionPolicy + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig + .NotebooklmConfig.DataProtectionPolicy + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig + .NotebooklmConfig.DataProtectionPolicy + 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.discoveryengine.v1beta.Project.CustomerProvidedConfig + .NotebooklmConfig.DataProtectionPolicy + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig + .NotebooklmConfig.DataProtectionPolicy + 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.discoveryengine.v1beta.Project.CustomerProvidedConfig + .NotebooklmConfig.DataProtectionPolicy + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig + .NotebooklmConfig.DataProtectionPolicy + 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.discoveryengine.v1beta.Project.CustomerProvidedConfig.NotebooklmConfig + .DataProtectionPolicy + 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; + } + + /** + * + * + *
            +         * Data protection policy config for NotebookLM.
            +         * 
            + * + * Protobuf type {@code + * google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig.NotebooklmConfig.DataProtectionPolicy} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig.NotebooklmConfig.DataProtectionPolicy) + com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig.NotebooklmConfig + .DataProtectionPolicyOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.ProjectProto + .internal_static_google_cloud_discoveryengine_v1beta_Project_CustomerProvidedConfig_NotebooklmConfig_DataProtectionPolicy_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.ProjectProto + .internal_static_google_cloud_discoveryengine_v1beta_Project_CustomerProvidedConfig_NotebooklmConfig_DataProtectionPolicy_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig + .NotebooklmConfig.DataProtectionPolicy.class, + com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig + .NotebooklmConfig.DataProtectionPolicy.Builder.class); + } + + // Construct using + // com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig.NotebooklmConfig.DataProtectionPolicy.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetSensitiveDataProtectionPolicyFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + sensitiveDataProtectionPolicy_ = null; + if (sensitiveDataProtectionPolicyBuilder_ != null) { + sensitiveDataProtectionPolicyBuilder_.dispose(); + sensitiveDataProtectionPolicyBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1beta.ProjectProto + .internal_static_google_cloud_discoveryengine_v1beta_Project_CustomerProvidedConfig_NotebooklmConfig_DataProtectionPolicy_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig + .NotebooklmConfig.DataProtectionPolicy + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig + .NotebooklmConfig.DataProtectionPolicy.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig + .NotebooklmConfig.DataProtectionPolicy + build() { + com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig.NotebooklmConfig + .DataProtectionPolicy + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig + .NotebooklmConfig.DataProtectionPolicy + buildPartial() { + com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig.NotebooklmConfig + .DataProtectionPolicy + result = + new com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig + .NotebooklmConfig.DataProtectionPolicy(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig + .NotebooklmConfig.DataProtectionPolicy + result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.sensitiveDataProtectionPolicy_ = + sensitiveDataProtectionPolicyBuilder_ == null + ? sensitiveDataProtectionPolicy_ + : sensitiveDataProtectionPolicyBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig + .NotebooklmConfig.DataProtectionPolicy) { + return mergeFrom( + (com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig + .NotebooklmConfig.DataProtectionPolicy) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig + .NotebooklmConfig.DataProtectionPolicy + other) { + if (other + == com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig + .NotebooklmConfig.DataProtectionPolicy.getDefaultInstance()) return this; + if (other.hasSensitiveDataProtectionPolicy()) { + mergeSensitiveDataProtectionPolicy(other.getSensitiveDataProtectionPolicy()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage( + internalGetSensitiveDataProtectionPolicyFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig + .NotebooklmConfig.DataProtectionPolicy.SensitiveDataProtectionPolicy + sensitiveDataProtectionPolicy_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig + .NotebooklmConfig.DataProtectionPolicy.SensitiveDataProtectionPolicy, + com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig + .NotebooklmConfig.DataProtectionPolicy.SensitiveDataProtectionPolicy.Builder, + com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig + .NotebooklmConfig.DataProtectionPolicy.SensitiveDataProtectionPolicyOrBuilder> + sensitiveDataProtectionPolicyBuilder_; + + /** + * + * + *
            +           * Optional. The sensitive data protection policy.
            +           * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig.NotebooklmConfig.DataProtectionPolicy.SensitiveDataProtectionPolicy sensitive_data_protection_policy = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the sensitiveDataProtectionPolicy field is set. + */ + public boolean hasSensitiveDataProtectionPolicy() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
            +           * Optional. The sensitive data protection policy.
            +           * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig.NotebooklmConfig.DataProtectionPolicy.SensitiveDataProtectionPolicy sensitive_data_protection_policy = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The sensitiveDataProtectionPolicy. + */ + public com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig + .NotebooklmConfig.DataProtectionPolicy.SensitiveDataProtectionPolicy + getSensitiveDataProtectionPolicy() { + if (sensitiveDataProtectionPolicyBuilder_ == null) { + return sensitiveDataProtectionPolicy_ == null + ? com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig + .NotebooklmConfig.DataProtectionPolicy.SensitiveDataProtectionPolicy + .getDefaultInstance() + : sensitiveDataProtectionPolicy_; + } else { + return sensitiveDataProtectionPolicyBuilder_.getMessage(); + } + } + + /** + * + * + *
            +           * Optional. The sensitive data protection policy.
            +           * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig.NotebooklmConfig.DataProtectionPolicy.SensitiveDataProtectionPolicy sensitive_data_protection_policy = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setSensitiveDataProtectionPolicy( + com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig + .NotebooklmConfig.DataProtectionPolicy.SensitiveDataProtectionPolicy + value) { + if (sensitiveDataProtectionPolicyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + sensitiveDataProtectionPolicy_ = value; + } else { + sensitiveDataProtectionPolicyBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
            +           * Optional. The sensitive data protection policy.
            +           * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig.NotebooklmConfig.DataProtectionPolicy.SensitiveDataProtectionPolicy sensitive_data_protection_policy = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setSensitiveDataProtectionPolicy( + com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig + .NotebooklmConfig.DataProtectionPolicy.SensitiveDataProtectionPolicy.Builder + builderForValue) { + if (sensitiveDataProtectionPolicyBuilder_ == null) { + sensitiveDataProtectionPolicy_ = builderForValue.build(); + } else { + sensitiveDataProtectionPolicyBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
            +           * Optional. The sensitive data protection policy.
            +           * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig.NotebooklmConfig.DataProtectionPolicy.SensitiveDataProtectionPolicy sensitive_data_protection_policy = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeSensitiveDataProtectionPolicy( + com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig + .NotebooklmConfig.DataProtectionPolicy.SensitiveDataProtectionPolicy + value) { + if (sensitiveDataProtectionPolicyBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && sensitiveDataProtectionPolicy_ != null + && sensitiveDataProtectionPolicy_ + != com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig + .NotebooklmConfig.DataProtectionPolicy.SensitiveDataProtectionPolicy + .getDefaultInstance()) { + getSensitiveDataProtectionPolicyBuilder().mergeFrom(value); + } else { + sensitiveDataProtectionPolicy_ = value; + } + } else { + sensitiveDataProtectionPolicyBuilder_.mergeFrom(value); + } + if (sensitiveDataProtectionPolicy_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + + /** + * + * + *
            +           * Optional. The sensitive data protection policy.
            +           * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig.NotebooklmConfig.DataProtectionPolicy.SensitiveDataProtectionPolicy sensitive_data_protection_policy = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearSensitiveDataProtectionPolicy() { + bitField0_ = (bitField0_ & ~0x00000001); + sensitiveDataProtectionPolicy_ = null; + if (sensitiveDataProtectionPolicyBuilder_ != null) { + sensitiveDataProtectionPolicyBuilder_.dispose(); + sensitiveDataProtectionPolicyBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
            +           * Optional. The sensitive data protection policy.
            +           * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig.NotebooklmConfig.DataProtectionPolicy.SensitiveDataProtectionPolicy sensitive_data_protection_policy = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig + .NotebooklmConfig.DataProtectionPolicy.SensitiveDataProtectionPolicy.Builder + getSensitiveDataProtectionPolicyBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return internalGetSensitiveDataProtectionPolicyFieldBuilder().getBuilder(); + } + + /** + * + * + *
            +           * Optional. The sensitive data protection policy.
            +           * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig.NotebooklmConfig.DataProtectionPolicy.SensitiveDataProtectionPolicy sensitive_data_protection_policy = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig + .NotebooklmConfig.DataProtectionPolicy.SensitiveDataProtectionPolicyOrBuilder + getSensitiveDataProtectionPolicyOrBuilder() { + if (sensitiveDataProtectionPolicyBuilder_ != null) { + return sensitiveDataProtectionPolicyBuilder_.getMessageOrBuilder(); + } else { + return sensitiveDataProtectionPolicy_ == null + ? com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig + .NotebooklmConfig.DataProtectionPolicy.SensitiveDataProtectionPolicy + .getDefaultInstance() + : sensitiveDataProtectionPolicy_; + } + } + + /** + * + * + *
            +           * Optional. The sensitive data protection policy.
            +           * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig.NotebooklmConfig.DataProtectionPolicy.SensitiveDataProtectionPolicy sensitive_data_protection_policy = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig + .NotebooklmConfig.DataProtectionPolicy.SensitiveDataProtectionPolicy, + com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig + .NotebooklmConfig.DataProtectionPolicy.SensitiveDataProtectionPolicy.Builder, + com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig + .NotebooklmConfig.DataProtectionPolicy.SensitiveDataProtectionPolicyOrBuilder> + internalGetSensitiveDataProtectionPolicyFieldBuilder() { + if (sensitiveDataProtectionPolicyBuilder_ == null) { + sensitiveDataProtectionPolicyBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig + .NotebooklmConfig.DataProtectionPolicy.SensitiveDataProtectionPolicy, + com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig + .NotebooklmConfig.DataProtectionPolicy.SensitiveDataProtectionPolicy + .Builder, + com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig + .NotebooklmConfig.DataProtectionPolicy + .SensitiveDataProtectionPolicyOrBuilder>( + getSensitiveDataProtectionPolicy(), getParentForChildren(), isClean()); + sensitiveDataProtectionPolicy_ = null; + } + return sensitiveDataProtectionPolicyBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig.NotebooklmConfig.DataProtectionPolicy) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig.NotebooklmConfig.DataProtectionPolicy) + private static final com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig + .NotebooklmConfig.DataProtectionPolicy + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig + .NotebooklmConfig.DataProtectionPolicy(); + } + + public static com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig + .NotebooklmConfig.DataProtectionPolicy + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DataProtectionPolicy parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig + .NotebooklmConfig.DataProtectionPolicy + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int bitField0_; + public static final int MODEL_ARMOR_CONFIG_FIELD_NUMBER = 1; + private com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig + .NotebooklmConfig.ModelArmorConfig + modelArmorConfig_; + + /** + * + * + *
            +       * Model Armor configuration to be used for sanitizing user prompts and
            +       * LLM responses.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig.NotebooklmConfig.ModelArmorConfig model_armor_config = 1; + * + * + * @return Whether the modelArmorConfig field is set. + */ + @java.lang.Override + public boolean hasModelArmorConfig() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
            +       * Model Armor configuration to be used for sanitizing user prompts and
            +       * LLM responses.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig.NotebooklmConfig.ModelArmorConfig model_armor_config = 1; + * + * + * @return The modelArmorConfig. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig.NotebooklmConfig + .ModelArmorConfig + getModelArmorConfig() { + return modelArmorConfig_ == null + ? com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig + .NotebooklmConfig.ModelArmorConfig.getDefaultInstance() + : modelArmorConfig_; + } + + /** + * + * + *
            +       * Model Armor configuration to be used for sanitizing user prompts and
            +       * LLM responses.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig.NotebooklmConfig.ModelArmorConfig model_armor_config = 1; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig.NotebooklmConfig + .ModelArmorConfigOrBuilder + getModelArmorConfigOrBuilder() { + return modelArmorConfig_ == null + ? com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig + .NotebooklmConfig.ModelArmorConfig.getDefaultInstance() + : modelArmorConfig_; + } + + public static final int OPT_OUT_NOTEBOOK_SHARING_FIELD_NUMBER = 2; + private boolean optOutNotebookSharing_ = false; + + /** + * + * + *
            +       * Optional. Whether to disable the notebook sharing feature for the
            +       * project. Default to false if not specified.
            +       * 
            + * + * bool opt_out_notebook_sharing = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The optOutNotebookSharing. + */ + @java.lang.Override + public boolean getOptOutNotebookSharing() { + return optOutNotebookSharing_; + } + + public static final int DATA_PROTECTION_POLICY_FIELD_NUMBER = 5; + private com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig + .NotebooklmConfig.DataProtectionPolicy + dataProtectionPolicy_; + + /** + * + * + *
            +       * Optional. Specifies the data protection policy for NotebookLM.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig.NotebooklmConfig.DataProtectionPolicy data_protection_policy = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the dataProtectionPolicy field is set. + */ + @java.lang.Override + public boolean hasDataProtectionPolicy() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
            +       * Optional. Specifies the data protection policy for NotebookLM.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig.NotebooklmConfig.DataProtectionPolicy data_protection_policy = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The dataProtectionPolicy. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig.NotebooklmConfig + .DataProtectionPolicy + getDataProtectionPolicy() { + return dataProtectionPolicy_ == null + ? com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig + .NotebooklmConfig.DataProtectionPolicy.getDefaultInstance() + : dataProtectionPolicy_; + } + + /** + * + * + *
            +       * Optional. Specifies the data protection policy for NotebookLM.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig.NotebooklmConfig.DataProtectionPolicy data_protection_policy = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig.NotebooklmConfig + .DataProtectionPolicyOrBuilder + getDataProtectionPolicyOrBuilder() { + return dataProtectionPolicy_ == null + ? com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig + .NotebooklmConfig.DataProtectionPolicy.getDefaultInstance() + : dataProtectionPolicy_; + } + + public static final int OBSERVABILITY_CONFIG_FIELD_NUMBER = 6; + private com.google.cloud.discoveryengine.v1beta.ObservabilityConfig observabilityConfig_; + + /** + * + * + *
            +       * Optional. Observability config for NotebookLM.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.ObservabilityConfig observability_config = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the observabilityConfig field is set. + */ + @java.lang.Override + public boolean hasObservabilityConfig() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
            +       * Optional. Observability config for NotebookLM.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.ObservabilityConfig observability_config = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The observabilityConfig. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.ObservabilityConfig getObservabilityConfig() { + return observabilityConfig_ == null + ? com.google.cloud.discoveryengine.v1beta.ObservabilityConfig.getDefaultInstance() + : observabilityConfig_; + } + + /** + * + * + *
            +       * Optional. Observability config for NotebookLM.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.ObservabilityConfig observability_config = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.ObservabilityConfigOrBuilder + getObservabilityConfigOrBuilder() { + return observabilityConfig_ == null + ? com.google.cloud.discoveryengine.v1beta.ObservabilityConfig.getDefaultInstance() + : observabilityConfig_; + } + + 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, getModelArmorConfig()); + } + if (optOutNotebookSharing_ != false) { + output.writeBool(2, optOutNotebookSharing_); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(5, getDataProtectionPolicy()); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeMessage(6, getObservabilityConfig()); + } + 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, getModelArmorConfig()); + } + if (optOutNotebookSharing_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, optOutNotebookSharing_); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 5, getDataProtectionPolicy()); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(6, getObservabilityConfig()); + } + 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.discoveryengine.v1beta.Project.CustomerProvidedConfig + .NotebooklmConfig)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig.NotebooklmConfig + other = + (com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig + .NotebooklmConfig) + obj; + + if (hasModelArmorConfig() != other.hasModelArmorConfig()) return false; + if (hasModelArmorConfig()) { + if (!getModelArmorConfig().equals(other.getModelArmorConfig())) return false; + } + if (getOptOutNotebookSharing() != other.getOptOutNotebookSharing()) return false; + if (hasDataProtectionPolicy() != other.hasDataProtectionPolicy()) return false; + if (hasDataProtectionPolicy()) { + if (!getDataProtectionPolicy().equals(other.getDataProtectionPolicy())) return false; + } + if (hasObservabilityConfig() != other.hasObservabilityConfig()) return false; + if (hasObservabilityConfig()) { + if (!getObservabilityConfig().equals(other.getObservabilityConfig())) 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 (hasModelArmorConfig()) { + hash = (37 * hash) + MODEL_ARMOR_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getModelArmorConfig().hashCode(); + } + hash = (37 * hash) + OPT_OUT_NOTEBOOK_SHARING_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getOptOutNotebookSharing()); + if (hasDataProtectionPolicy()) { + hash = (37 * hash) + DATA_PROTECTION_POLICY_FIELD_NUMBER; + hash = (53 * hash) + getDataProtectionPolicy().hashCode(); + } + if (hasObservabilityConfig()) { + hash = (37 * hash) + OBSERVABILITY_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getObservabilityConfig().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig + .NotebooklmConfig + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig + .NotebooklmConfig + 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.discoveryengine.v1beta.Project.CustomerProvidedConfig + .NotebooklmConfig + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig + .NotebooklmConfig + 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.discoveryengine.v1beta.Project.CustomerProvidedConfig + .NotebooklmConfig + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig + .NotebooklmConfig + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig + .NotebooklmConfig + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig + .NotebooklmConfig + 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.discoveryengine.v1beta.Project.CustomerProvidedConfig + .NotebooklmConfig + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig + .NotebooklmConfig + 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.discoveryengine.v1beta.Project.CustomerProvidedConfig + .NotebooklmConfig + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig + .NotebooklmConfig + 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.discoveryengine.v1beta.Project.CustomerProvidedConfig.NotebooklmConfig + 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; + } + + /** + * + * + *
            +       * Configuration for NotebookLM.
            +       * 
            + * + * Protobuf type {@code + * google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig.NotebooklmConfig} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig.NotebooklmConfig) + com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig + .NotebooklmConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.ProjectProto + .internal_static_google_cloud_discoveryengine_v1beta_Project_CustomerProvidedConfig_NotebooklmConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.ProjectProto + .internal_static_google_cloud_discoveryengine_v1beta_Project_CustomerProvidedConfig_NotebooklmConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig + .NotebooklmConfig.class, + com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig + .NotebooklmConfig.Builder.class); + } + + // Construct using + // com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig.NotebooklmConfig.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetModelArmorConfigFieldBuilder(); + internalGetDataProtectionPolicyFieldBuilder(); + internalGetObservabilityConfigFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + modelArmorConfig_ = null; + if (modelArmorConfigBuilder_ != null) { + modelArmorConfigBuilder_.dispose(); + modelArmorConfigBuilder_ = null; + } + optOutNotebookSharing_ = false; + dataProtectionPolicy_ = null; + if (dataProtectionPolicyBuilder_ != null) { + dataProtectionPolicyBuilder_.dispose(); + dataProtectionPolicyBuilder_ = null; + } + observabilityConfig_ = null; + if (observabilityConfigBuilder_ != null) { + observabilityConfigBuilder_.dispose(); + observabilityConfigBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1beta.ProjectProto + .internal_static_google_cloud_discoveryengine_v1beta_Project_CustomerProvidedConfig_NotebooklmConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig + .NotebooklmConfig + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig + .NotebooklmConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig + .NotebooklmConfig + build() { + com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig.NotebooklmConfig + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig + .NotebooklmConfig + buildPartial() { + com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig.NotebooklmConfig + result = + new com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig + .NotebooklmConfig(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig.NotebooklmConfig + result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.modelArmorConfig_ = + modelArmorConfigBuilder_ == null + ? modelArmorConfig_ + : modelArmorConfigBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.optOutNotebookSharing_ = optOutNotebookSharing_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.dataProtectionPolicy_ = + dataProtectionPolicyBuilder_ == null + ? dataProtectionPolicy_ + : dataProtectionPolicyBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.observabilityConfig_ = + observabilityConfigBuilder_ == null + ? observabilityConfig_ + : observabilityConfigBuilder_.build(); + to_bitField0_ |= 0x00000004; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig + .NotebooklmConfig) { + return mergeFrom( + (com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig + .NotebooklmConfig) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig.NotebooklmConfig + other) { + if (other + == com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig + .NotebooklmConfig.getDefaultInstance()) return this; + if (other.hasModelArmorConfig()) { + mergeModelArmorConfig(other.getModelArmorConfig()); + } + if (other.getOptOutNotebookSharing() != false) { + setOptOutNotebookSharing(other.getOptOutNotebookSharing()); + } + if (other.hasDataProtectionPolicy()) { + mergeDataProtectionPolicy(other.getDataProtectionPolicy()); + } + if (other.hasObservabilityConfig()) { + mergeObservabilityConfig(other.getObservabilityConfig()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage( + internalGetModelArmorConfigFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + optOutNotebookSharing_ = input.readBool(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 42: + { + input.readMessage( + internalGetDataProtectionPolicyFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 42 + case 50: + { + input.readMessage( + internalGetObservabilityConfigFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 50 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig + .NotebooklmConfig.ModelArmorConfig + modelArmorConfig_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig + .NotebooklmConfig.ModelArmorConfig, + com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig + .NotebooklmConfig.ModelArmorConfig.Builder, + com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig + .NotebooklmConfig.ModelArmorConfigOrBuilder> + modelArmorConfigBuilder_; + + /** + * + * + *
            +         * Model Armor configuration to be used for sanitizing user prompts and
            +         * LLM responses.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig.NotebooklmConfig.ModelArmorConfig model_armor_config = 1; + * + * + * @return Whether the modelArmorConfig field is set. + */ + public boolean hasModelArmorConfig() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
            +         * Model Armor configuration to be used for sanitizing user prompts and
            +         * LLM responses.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig.NotebooklmConfig.ModelArmorConfig model_armor_config = 1; + * + * + * @return The modelArmorConfig. + */ + public com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig + .NotebooklmConfig.ModelArmorConfig + getModelArmorConfig() { + if (modelArmorConfigBuilder_ == null) { + return modelArmorConfig_ == null + ? com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig + .NotebooklmConfig.ModelArmorConfig.getDefaultInstance() + : modelArmorConfig_; + } else { + return modelArmorConfigBuilder_.getMessage(); + } + } + + /** + * + * + *
            +         * Model Armor configuration to be used for sanitizing user prompts and
            +         * LLM responses.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig.NotebooklmConfig.ModelArmorConfig model_armor_config = 1; + * + */ + public Builder setModelArmorConfig( + com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig.NotebooklmConfig + .ModelArmorConfig + value) { + if (modelArmorConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + modelArmorConfig_ = value; + } else { + modelArmorConfigBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
            +         * Model Armor configuration to be used for sanitizing user prompts and
            +         * LLM responses.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig.NotebooklmConfig.ModelArmorConfig model_armor_config = 1; + * + */ + public Builder setModelArmorConfig( + com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig.NotebooklmConfig + .ModelArmorConfig.Builder + builderForValue) { + if (modelArmorConfigBuilder_ == null) { + modelArmorConfig_ = builderForValue.build(); + } else { + modelArmorConfigBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
            +         * Model Armor configuration to be used for sanitizing user prompts and
            +         * LLM responses.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig.NotebooklmConfig.ModelArmorConfig model_armor_config = 1; + * + */ + public Builder mergeModelArmorConfig( + com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig.NotebooklmConfig + .ModelArmorConfig + value) { + if (modelArmorConfigBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && modelArmorConfig_ != null + && modelArmorConfig_ + != com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig + .NotebooklmConfig.ModelArmorConfig.getDefaultInstance()) { + getModelArmorConfigBuilder().mergeFrom(value); + } else { + modelArmorConfig_ = value; + } + } else { + modelArmorConfigBuilder_.mergeFrom(value); + } + if (modelArmorConfig_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + + /** + * + * + *
            +         * Model Armor configuration to be used for sanitizing user prompts and
            +         * LLM responses.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig.NotebooklmConfig.ModelArmorConfig model_armor_config = 1; + * + */ + public Builder clearModelArmorConfig() { + bitField0_ = (bitField0_ & ~0x00000001); + modelArmorConfig_ = null; + if (modelArmorConfigBuilder_ != null) { + modelArmorConfigBuilder_.dispose(); + modelArmorConfigBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
            +         * Model Armor configuration to be used for sanitizing user prompts and
            +         * LLM responses.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig.NotebooklmConfig.ModelArmorConfig model_armor_config = 1; + * + */ + public com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig + .NotebooklmConfig.ModelArmorConfig.Builder + getModelArmorConfigBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return internalGetModelArmorConfigFieldBuilder().getBuilder(); + } + + /** + * + * + *
            +         * Model Armor configuration to be used for sanitizing user prompts and
            +         * LLM responses.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig.NotebooklmConfig.ModelArmorConfig model_armor_config = 1; + * + */ + public com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig + .NotebooklmConfig.ModelArmorConfigOrBuilder + getModelArmorConfigOrBuilder() { + if (modelArmorConfigBuilder_ != null) { + return modelArmorConfigBuilder_.getMessageOrBuilder(); + } else { + return modelArmorConfig_ == null + ? com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig + .NotebooklmConfig.ModelArmorConfig.getDefaultInstance() + : modelArmorConfig_; + } + } + + /** + * + * + *
            +         * Model Armor configuration to be used for sanitizing user prompts and
            +         * LLM responses.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig.NotebooklmConfig.ModelArmorConfig model_armor_config = 1; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig + .NotebooklmConfig.ModelArmorConfig, + com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig + .NotebooklmConfig.ModelArmorConfig.Builder, + com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig + .NotebooklmConfig.ModelArmorConfigOrBuilder> + internalGetModelArmorConfigFieldBuilder() { + if (modelArmorConfigBuilder_ == null) { + modelArmorConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig + .NotebooklmConfig.ModelArmorConfig, + com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig + .NotebooklmConfig.ModelArmorConfig.Builder, + com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig + .NotebooklmConfig.ModelArmorConfigOrBuilder>( + getModelArmorConfig(), getParentForChildren(), isClean()); + modelArmorConfig_ = null; + } + return modelArmorConfigBuilder_; + } + + private boolean optOutNotebookSharing_; + + /** + * + * + *
            +         * Optional. Whether to disable the notebook sharing feature for the
            +         * project. Default to false if not specified.
            +         * 
            + * + * bool opt_out_notebook_sharing = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The optOutNotebookSharing. + */ + @java.lang.Override + public boolean getOptOutNotebookSharing() { + return optOutNotebookSharing_; + } + + /** + * + * + *
            +         * Optional. Whether to disable the notebook sharing feature for the
            +         * project. Default to false if not specified.
            +         * 
            + * + * bool opt_out_notebook_sharing = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The optOutNotebookSharing to set. + * @return This builder for chaining. + */ + public Builder setOptOutNotebookSharing(boolean value) { + + optOutNotebookSharing_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
            +         * Optional. Whether to disable the notebook sharing feature for the
            +         * project. Default to false if not specified.
            +         * 
            + * + * bool opt_out_notebook_sharing = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearOptOutNotebookSharing() { + bitField0_ = (bitField0_ & ~0x00000002); + optOutNotebookSharing_ = false; + onChanged(); + return this; + } + + private com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig + .NotebooklmConfig.DataProtectionPolicy + dataProtectionPolicy_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig + .NotebooklmConfig.DataProtectionPolicy, + com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig + .NotebooklmConfig.DataProtectionPolicy.Builder, + com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig + .NotebooklmConfig.DataProtectionPolicyOrBuilder> + dataProtectionPolicyBuilder_; + + /** + * + * + *
            +         * Optional. Specifies the data protection policy for NotebookLM.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig.NotebooklmConfig.DataProtectionPolicy data_protection_policy = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the dataProtectionPolicy field is set. + */ + public boolean hasDataProtectionPolicy() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
            +         * Optional. Specifies the data protection policy for NotebookLM.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig.NotebooklmConfig.DataProtectionPolicy data_protection_policy = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The dataProtectionPolicy. + */ + public com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig + .NotebooklmConfig.DataProtectionPolicy + getDataProtectionPolicy() { + if (dataProtectionPolicyBuilder_ == null) { + return dataProtectionPolicy_ == null + ? com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig + .NotebooklmConfig.DataProtectionPolicy.getDefaultInstance() + : dataProtectionPolicy_; + } else { + return dataProtectionPolicyBuilder_.getMessage(); + } + } + + /** + * + * + *
            +         * Optional. Specifies the data protection policy for NotebookLM.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig.NotebooklmConfig.DataProtectionPolicy data_protection_policy = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setDataProtectionPolicy( + com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig.NotebooklmConfig + .DataProtectionPolicy + value) { + if (dataProtectionPolicyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + dataProtectionPolicy_ = value; + } else { + dataProtectionPolicyBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
            +         * Optional. Specifies the data protection policy for NotebookLM.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig.NotebooklmConfig.DataProtectionPolicy data_protection_policy = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setDataProtectionPolicy( + com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig.NotebooklmConfig + .DataProtectionPolicy.Builder + builderForValue) { + if (dataProtectionPolicyBuilder_ == null) { + dataProtectionPolicy_ = builderForValue.build(); + } else { + dataProtectionPolicyBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
            +         * Optional. Specifies the data protection policy for NotebookLM.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig.NotebooklmConfig.DataProtectionPolicy data_protection_policy = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeDataProtectionPolicy( + com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig.NotebooklmConfig + .DataProtectionPolicy + value) { + if (dataProtectionPolicyBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && dataProtectionPolicy_ != null + && dataProtectionPolicy_ + != com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig + .NotebooklmConfig.DataProtectionPolicy.getDefaultInstance()) { + getDataProtectionPolicyBuilder().mergeFrom(value); + } else { + dataProtectionPolicy_ = value; + } + } else { + dataProtectionPolicyBuilder_.mergeFrom(value); + } + if (dataProtectionPolicy_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + + /** + * + * + *
            +         * Optional. Specifies the data protection policy for NotebookLM.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig.NotebooklmConfig.DataProtectionPolicy data_protection_policy = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearDataProtectionPolicy() { + bitField0_ = (bitField0_ & ~0x00000004); + dataProtectionPolicy_ = null; + if (dataProtectionPolicyBuilder_ != null) { + dataProtectionPolicyBuilder_.dispose(); + dataProtectionPolicyBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
            +         * Optional. Specifies the data protection policy for NotebookLM.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig.NotebooklmConfig.DataProtectionPolicy data_protection_policy = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig + .NotebooklmConfig.DataProtectionPolicy.Builder + getDataProtectionPolicyBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return internalGetDataProtectionPolicyFieldBuilder().getBuilder(); + } + + /** + * + * + *
            +         * Optional. Specifies the data protection policy for NotebookLM.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig.NotebooklmConfig.DataProtectionPolicy data_protection_policy = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig + .NotebooklmConfig.DataProtectionPolicyOrBuilder + getDataProtectionPolicyOrBuilder() { + if (dataProtectionPolicyBuilder_ != null) { + return dataProtectionPolicyBuilder_.getMessageOrBuilder(); + } else { + return dataProtectionPolicy_ == null + ? com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig + .NotebooklmConfig.DataProtectionPolicy.getDefaultInstance() + : dataProtectionPolicy_; + } + } + + /** + * + * + *
            +         * Optional. Specifies the data protection policy for NotebookLM.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig.NotebooklmConfig.DataProtectionPolicy data_protection_policy = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig + .NotebooklmConfig.DataProtectionPolicy, + com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig + .NotebooklmConfig.DataProtectionPolicy.Builder, + com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig + .NotebooklmConfig.DataProtectionPolicyOrBuilder> + internalGetDataProtectionPolicyFieldBuilder() { + if (dataProtectionPolicyBuilder_ == null) { + dataProtectionPolicyBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig + .NotebooklmConfig.DataProtectionPolicy, + com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig + .NotebooklmConfig.DataProtectionPolicy.Builder, + com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig + .NotebooklmConfig.DataProtectionPolicyOrBuilder>( + getDataProtectionPolicy(), getParentForChildren(), isClean()); + dataProtectionPolicy_ = null; + } + return dataProtectionPolicyBuilder_; + } + + private com.google.cloud.discoveryengine.v1beta.ObservabilityConfig observabilityConfig_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.ObservabilityConfig, + com.google.cloud.discoveryengine.v1beta.ObservabilityConfig.Builder, + com.google.cloud.discoveryengine.v1beta.ObservabilityConfigOrBuilder> + observabilityConfigBuilder_; + + /** + * + * + *
            +         * Optional. Observability config for NotebookLM.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.ObservabilityConfig observability_config = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the observabilityConfig field is set. + */ + public boolean hasObservabilityConfig() { + return ((bitField0_ & 0x00000008) != 0); + } + + /** + * + * + *
            +         * Optional. Observability config for NotebookLM.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.ObservabilityConfig observability_config = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The observabilityConfig. + */ + public com.google.cloud.discoveryengine.v1beta.ObservabilityConfig + getObservabilityConfig() { + if (observabilityConfigBuilder_ == null) { + return observabilityConfig_ == null + ? com.google.cloud.discoveryengine.v1beta.ObservabilityConfig.getDefaultInstance() + : observabilityConfig_; + } else { + return observabilityConfigBuilder_.getMessage(); + } + } + + /** + * + * + *
            +         * Optional. Observability config for NotebookLM.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.ObservabilityConfig observability_config = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setObservabilityConfig( + com.google.cloud.discoveryengine.v1beta.ObservabilityConfig value) { + if (observabilityConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + observabilityConfig_ = value; + } else { + observabilityConfigBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
            +         * Optional. Observability config for NotebookLM.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.ObservabilityConfig observability_config = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setObservabilityConfig( + com.google.cloud.discoveryengine.v1beta.ObservabilityConfig.Builder builderForValue) { + if (observabilityConfigBuilder_ == null) { + observabilityConfig_ = builderForValue.build(); + } else { + observabilityConfigBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
            +         * Optional. Observability config for NotebookLM.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.ObservabilityConfig observability_config = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeObservabilityConfig( + com.google.cloud.discoveryengine.v1beta.ObservabilityConfig value) { + if (observabilityConfigBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) + && observabilityConfig_ != null + && observabilityConfig_ + != com.google.cloud.discoveryengine.v1beta.ObservabilityConfig + .getDefaultInstance()) { + getObservabilityConfigBuilder().mergeFrom(value); + } else { + observabilityConfig_ = value; + } + } else { + observabilityConfigBuilder_.mergeFrom(value); + } + if (observabilityConfig_ != null) { + bitField0_ |= 0x00000008; + onChanged(); + } + return this; + } + + /** + * + * + *
            +         * Optional. Observability config for NotebookLM.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.ObservabilityConfig observability_config = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearObservabilityConfig() { + bitField0_ = (bitField0_ & ~0x00000008); + observabilityConfig_ = null; + if (observabilityConfigBuilder_ != null) { + observabilityConfigBuilder_.dispose(); + observabilityConfigBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
            +         * Optional. Observability config for NotebookLM.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.ObservabilityConfig observability_config = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.discoveryengine.v1beta.ObservabilityConfig.Builder + getObservabilityConfigBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return internalGetObservabilityConfigFieldBuilder().getBuilder(); + } + + /** + * + * + *
            +         * Optional. Observability config for NotebookLM.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.ObservabilityConfig observability_config = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.discoveryengine.v1beta.ObservabilityConfigOrBuilder + getObservabilityConfigOrBuilder() { + if (observabilityConfigBuilder_ != null) { + return observabilityConfigBuilder_.getMessageOrBuilder(); + } else { + return observabilityConfig_ == null + ? com.google.cloud.discoveryengine.v1beta.ObservabilityConfig.getDefaultInstance() + : observabilityConfig_; + } + } + + /** + * + * + *
            +         * Optional. Observability config for NotebookLM.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.ObservabilityConfig observability_config = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.ObservabilityConfig, + com.google.cloud.discoveryengine.v1beta.ObservabilityConfig.Builder, + com.google.cloud.discoveryengine.v1beta.ObservabilityConfigOrBuilder> + internalGetObservabilityConfigFieldBuilder() { + if (observabilityConfigBuilder_ == null) { + observabilityConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.ObservabilityConfig, + com.google.cloud.discoveryengine.v1beta.ObservabilityConfig.Builder, + com.google.cloud.discoveryengine.v1beta.ObservabilityConfigOrBuilder>( + getObservabilityConfig(), getParentForChildren(), isClean()); + observabilityConfig_ = null; + } + return observabilityConfigBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig.NotebooklmConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig.NotebooklmConfig) + private static final com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig + .NotebooklmConfig + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig + .NotebooklmConfig(); + } + + public static com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig + .NotebooklmConfig + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public NotebooklmConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig.NotebooklmConfig + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int bitField0_; + public static final int NOTEBOOKLM_CONFIG_FIELD_NUMBER = 3; + private com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig.NotebooklmConfig + notebooklmConfig_; + + /** + * + * + *
            +     * Optional. Configuration for NotebookLM settings.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig.NotebooklmConfig notebooklm_config = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the notebooklmConfig field is set. + */ + @java.lang.Override + public boolean hasNotebooklmConfig() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
            +     * Optional. Configuration for NotebookLM settings.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig.NotebooklmConfig notebooklm_config = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The notebooklmConfig. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig.NotebooklmConfig + getNotebooklmConfig() { + return notebooklmConfig_ == null + ? com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig.NotebooklmConfig + .getDefaultInstance() + : notebooklmConfig_; + } + + /** + * + * + *
            +     * Optional. Configuration for NotebookLM settings.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig.NotebooklmConfig notebooklm_config = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig + .NotebooklmConfigOrBuilder + getNotebooklmConfigOrBuilder() { + return notebooklmConfig_ == null + ? com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig.NotebooklmConfig + .getDefaultInstance() + : notebooklmConfig_; + } + + 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(3, getNotebooklmConfig()); + } + 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(3, getNotebooklmConfig()); + } + 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.discoveryengine.v1beta.Project.CustomerProvidedConfig)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig other = + (com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig) obj; + + if (hasNotebooklmConfig() != other.hasNotebooklmConfig()) return false; + if (hasNotebooklmConfig()) { + if (!getNotebooklmConfig().equals(other.getNotebooklmConfig())) 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 (hasNotebooklmConfig()) { + hash = (37 * hash) + NOTEBOOKLM_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getNotebooklmConfig().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig 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.discoveryengine.v1beta.Project.CustomerProvidedConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig 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.discoveryengine.v1beta.Project.CustomerProvidedConfig parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig 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.discoveryengine.v1beta.Project.CustomerProvidedConfig + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig + 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.discoveryengine.v1beta.Project.CustomerProvidedConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig 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.discoveryengine.v1beta.Project.CustomerProvidedConfig 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; + } + + /** + * + * + *
            +     * Customer provided configurations.
            +     * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig) + com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.ProjectProto + .internal_static_google_cloud_discoveryengine_v1beta_Project_CustomerProvidedConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.ProjectProto + .internal_static_google_cloud_discoveryengine_v1beta_Project_CustomerProvidedConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig.class, + com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig.Builder + .class); + } + + // Construct using + // com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetNotebooklmConfigFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + notebooklmConfig_ = null; + if (notebooklmConfigBuilder_ != null) { + notebooklmConfigBuilder_.dispose(); + notebooklmConfigBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1beta.ProjectProto + .internal_static_google_cloud_discoveryengine_v1beta_Project_CustomerProvidedConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig build() { + com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig buildPartial() { + com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig result = + new com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.notebooklmConfig_ = + notebooklmConfigBuilder_ == null + ? notebooklmConfig_ + : notebooklmConfigBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig) { + return mergeFrom( + (com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig other) { + if (other + == com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig + .getDefaultInstance()) return this; + if (other.hasNotebooklmConfig()) { + mergeNotebooklmConfig(other.getNotebooklmConfig()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 26: + { + input.readMessage( + internalGetNotebooklmConfigFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig + .NotebooklmConfig + notebooklmConfig_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig + .NotebooklmConfig, + com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig + .NotebooklmConfig.Builder, + com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig + .NotebooklmConfigOrBuilder> + notebooklmConfigBuilder_; + + /** + * + * + *
            +       * Optional. Configuration for NotebookLM settings.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig.NotebooklmConfig notebooklm_config = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the notebooklmConfig field is set. + */ + public boolean hasNotebooklmConfig() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
            +       * Optional. Configuration for NotebookLM settings.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig.NotebooklmConfig notebooklm_config = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The notebooklmConfig. + */ + public com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig.NotebooklmConfig + getNotebooklmConfig() { + if (notebooklmConfigBuilder_ == null) { + return notebooklmConfig_ == null + ? com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig + .NotebooklmConfig.getDefaultInstance() + : notebooklmConfig_; + } else { + return notebooklmConfigBuilder_.getMessage(); + } + } + + /** + * + * + *
            +       * Optional. Configuration for NotebookLM settings.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig.NotebooklmConfig notebooklm_config = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setNotebooklmConfig( + com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig.NotebooklmConfig + value) { + if (notebooklmConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + notebooklmConfig_ = value; + } else { + notebooklmConfigBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
            +       * Optional. Configuration for NotebookLM settings.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig.NotebooklmConfig notebooklm_config = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setNotebooklmConfig( + com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig.NotebooklmConfig + .Builder + builderForValue) { + if (notebooklmConfigBuilder_ == null) { + notebooklmConfig_ = builderForValue.build(); + } else { + notebooklmConfigBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
            +       * Optional. Configuration for NotebookLM settings.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig.NotebooklmConfig notebooklm_config = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeNotebooklmConfig( + com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig.NotebooklmConfig + value) { + if (notebooklmConfigBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && notebooklmConfig_ != null + && notebooklmConfig_ + != com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig + .NotebooklmConfig.getDefaultInstance()) { + getNotebooklmConfigBuilder().mergeFrom(value); + } else { + notebooklmConfig_ = value; + } + } else { + notebooklmConfigBuilder_.mergeFrom(value); + } + if (notebooklmConfig_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + + /** + * + * + *
            +       * Optional. Configuration for NotebookLM settings.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig.NotebooklmConfig notebooklm_config = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearNotebooklmConfig() { + bitField0_ = (bitField0_ & ~0x00000001); + notebooklmConfig_ = null; + if (notebooklmConfigBuilder_ != null) { + notebooklmConfigBuilder_.dispose(); + notebooklmConfigBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
            +       * Optional. Configuration for NotebookLM settings.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig.NotebooklmConfig notebooklm_config = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig.NotebooklmConfig + .Builder + getNotebooklmConfigBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return internalGetNotebooklmConfigFieldBuilder().getBuilder(); + } + + /** + * + * + *
            +       * Optional. Configuration for NotebookLM settings.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig.NotebooklmConfig notebooklm_config = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig + .NotebooklmConfigOrBuilder + getNotebooklmConfigOrBuilder() { + if (notebooklmConfigBuilder_ != null) { + return notebooklmConfigBuilder_.getMessageOrBuilder(); + } else { + return notebooklmConfig_ == null + ? com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig + .NotebooklmConfig.getDefaultInstance() + : notebooklmConfig_; + } + } + + /** + * + * + *
            +       * Optional. Configuration for NotebookLM settings.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig.NotebooklmConfig notebooklm_config = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig + .NotebooklmConfig, + com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig + .NotebooklmConfig.Builder, + com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig + .NotebooklmConfigOrBuilder> + internalGetNotebooklmConfigFieldBuilder() { + if (notebooklmConfigBuilder_ == null) { + notebooklmConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig + .NotebooklmConfig, + com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig + .NotebooklmConfig.Builder, + com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig + .NotebooklmConfigOrBuilder>( + getNotebooklmConfig(), getParentForChildren(), isClean()); + notebooklmConfig_ = null; + } + return notebooklmConfigBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig) + private static final com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig(); + } + + public static com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CustomerProvidedConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface ConfigurableBillingStatusOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
            +     * Optional. The currently effective Search QPM threshold in queries per
            +     * minute. This is the threshold against which QPM usage is compared for
            +     * overage calculations.
            +     * 
            + * + * int64 effective_search_qpm_threshold = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The effectiveSearchQpmThreshold. + */ + long getEffectiveSearchQpmThreshold(); + + /** + * + * + *
            +     * Optional. The currently effective Indexing Core threshold.
            +     * This is the threshold against which Indexing Core usage is compared
            +     * for overage calculations.
            +     * 
            + * + * int64 effective_indexing_core_threshold = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The effectiveIndexingCoreThreshold. + */ + long getEffectiveIndexingCoreThreshold(); + + /** + * + * + *
            +     * Optional. The start time of the currently active billing subscription.
            +     * 
            + * + * .google.protobuf.Timestamp start_time = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the startTime field is set. + */ + boolean hasStartTime(); + + /** + * + * + *
            +     * Optional. The start time of the currently active billing subscription.
            +     * 
            + * + * .google.protobuf.Timestamp start_time = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The startTime. + */ + com.google.protobuf.Timestamp getStartTime(); + + /** + * + * + *
            +     * Optional. The start time of the currently active billing subscription.
            +     * 
            + * + * .google.protobuf.Timestamp start_time = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder(); + + /** + * + * + *
            +     * Output only. The latest terminate effective time of search qpm and
            +     * indexing core subscriptions.
            +     * 
            + * + * + * .google.protobuf.Timestamp terminate_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the terminateTime field is set. + */ + boolean hasTerminateTime(); + + /** + * + * + *
            +     * Output only. The latest terminate effective time of search qpm and
            +     * indexing core subscriptions.
            +     * 
            + * + * + * .google.protobuf.Timestamp terminate_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The terminateTime. + */ + com.google.protobuf.Timestamp getTerminateTime(); + + /** + * + * + *
            +     * Output only. The latest terminate effective time of search qpm and
            +     * indexing core subscriptions.
            +     * 
            + * + * + * .google.protobuf.Timestamp terminate_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getTerminateTimeOrBuilder(); + + /** + * + * + *
            +     * Output only. The earliest next update time for the search QPM
            +     * subscription threshold. This is based on the next_update_time returned by
            +     * the underlying Cloud Billing Subscription V3 API. This field is populated
            +     * only if an update QPM subscription threshold request is succeeded.
            +     * 
            + * + * + * .google.protobuf.Timestamp search_qpm_threshold_next_update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the searchQpmThresholdNextUpdateTime field is set. + */ + boolean hasSearchQpmThresholdNextUpdateTime(); + + /** + * + * + *
            +     * Output only. The earliest next update time for the search QPM
            +     * subscription threshold. This is based on the next_update_time returned by
            +     * the underlying Cloud Billing Subscription V3 API. This field is populated
            +     * only if an update QPM subscription threshold request is succeeded.
            +     * 
            + * + * + * .google.protobuf.Timestamp search_qpm_threshold_next_update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The searchQpmThresholdNextUpdateTime. + */ + com.google.protobuf.Timestamp getSearchQpmThresholdNextUpdateTime(); + + /** + * + * + *
            +     * Output only. The earliest next update time for the search QPM
            +     * subscription threshold. This is based on the next_update_time returned by
            +     * the underlying Cloud Billing Subscription V3 API. This field is populated
            +     * only if an update QPM subscription threshold request is succeeded.
            +     * 
            + * + * + * .google.protobuf.Timestamp search_qpm_threshold_next_update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getSearchQpmThresholdNextUpdateTimeOrBuilder(); + + /** + * + * + *
            +     * Output only. The earliest next update time for the indexing core
            +     * subscription threshold. This is based on the next_update_time returned by
            +     * the underlying Cloud Billing Subscription V3 API. This field is populated
            +     * only if an update indexing core subscription threshold
            +     * request is succeeded.
            +     * 
            + * + * + * .google.protobuf.Timestamp indexing_core_threshold_next_update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the indexingCoreThresholdNextUpdateTime field is set. + */ + boolean hasIndexingCoreThresholdNextUpdateTime(); + + /** + * + * + *
            +     * Output only. The earliest next update time for the indexing core
            +     * subscription threshold. This is based on the next_update_time returned by
            +     * the underlying Cloud Billing Subscription V3 API. This field is populated
            +     * only if an update indexing core subscription threshold
            +     * request is succeeded.
            +     * 
            + * + * + * .google.protobuf.Timestamp indexing_core_threshold_next_update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The indexingCoreThresholdNextUpdateTime. + */ + com.google.protobuf.Timestamp getIndexingCoreThresholdNextUpdateTime(); + + /** + * + * + *
            +     * Output only. The earliest next update time for the indexing core
            +     * subscription threshold. This is based on the next_update_time returned by
            +     * the underlying Cloud Billing Subscription V3 API. This field is populated
            +     * only if an update indexing core subscription threshold
            +     * request is succeeded.
            +     * 
            + * + * + * .google.protobuf.Timestamp indexing_core_threshold_next_update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getIndexingCoreThresholdNextUpdateTimeOrBuilder(); + + /** + * + * + *
            +     * Output only. The type of update performed in this operation.
            +     * This field is populated in the response of UpdateProject.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus.UpdateType update_type = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for updateType. + */ + int getUpdateTypeValue(); + + /** + * + * + *
            +     * Output only. The type of update performed in this operation.
            +     * This field is populated in the response of UpdateProject.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus.UpdateType update_type = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateType. + */ + com.google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus.UpdateType + getUpdateType(); + + /** + * + * + *
            +     * Output only. Per-model Agent Search TPM subscription status.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus.AgentSearchTokenSubscriptionStatus agent_search_token_subscription_statuses = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.List< + com.google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus + .AgentSearchTokenSubscriptionStatus> + getAgentSearchTokenSubscriptionStatusesList(); + + /** + * + * + *
            +     * Output only. Per-model Agent Search TPM subscription status.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus.AgentSearchTokenSubscriptionStatus agent_search_token_subscription_statuses = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus + .AgentSearchTokenSubscriptionStatus + getAgentSearchTokenSubscriptionStatuses(int index); + + /** + * + * + *
            +     * Output only. Per-model Agent Search TPM subscription status.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus.AgentSearchTokenSubscriptionStatus agent_search_token_subscription_statuses = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + int getAgentSearchTokenSubscriptionStatusesCount(); + + /** + * + * + *
            +     * Output only. Per-model Agent Search TPM subscription status.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus.AgentSearchTokenSubscriptionStatus agent_search_token_subscription_statuses = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.List< + ? extends + com.google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus + .AgentSearchTokenSubscriptionStatusOrBuilder> + getAgentSearchTokenSubscriptionStatusesOrBuilderList(); + + /** + * + * + *
            +     * Output only. Per-model Agent Search TPM subscription status.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus.AgentSearchTokenSubscriptionStatus agent_search_token_subscription_statuses = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus + .AgentSearchTokenSubscriptionStatusOrBuilder + getAgentSearchTokenSubscriptionStatusesOrBuilder(int index); + } + + /** + * + * + *
            +   * Represents the currently effective configurable billing parameters.
            +   * These values are derived from the customer's subscription history stored
            +   * internally and reflect the thresholds actively being used for billing
            +   * purposes at the time of the GetProject call. This includes the start_time
            +   * of the subscription and may differ from the values in
            +   * `customer_provided_config` due to billing rules
            +   * (e.g., scale-downs taking effect only at the start of a new month).
            +   * We also include the update type to indicate the type of update performed on
            +   * the configurable billing configuration in the UpdateProject operation.
            +   * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus} + */ + public static final class ConfigurableBillingStatus extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus) + ConfigurableBillingStatusOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ConfigurableBillingStatus"); + } + + // Use ConfigurableBillingStatus.newBuilder() to construct. + private ConfigurableBillingStatus(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ConfigurableBillingStatus() { + updateType_ = 0; + agentSearchTokenSubscriptionStatuses_ = java.util.Collections.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.ProjectProto + .internal_static_google_cloud_discoveryengine_v1beta_Project_ConfigurableBillingStatus_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.ProjectProto + .internal_static_google_cloud_discoveryengine_v1beta_Project_ConfigurableBillingStatus_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus.class, + com.google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus.Builder + .class); + } + + /** + * + * + *
            +     * The type of update performed on the configurable billing configuration.
            +     * 
            + * + * Protobuf enum {@code + * google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus.UpdateType} + */ + public enum UpdateType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
            +       * Unspecified update type.
            +       * 
            + * + * UPDATE_TYPE_UNSPECIFIED = 0; + */ + UPDATE_TYPE_UNSPECIFIED(0), + /** + * + * + *
            +       * Configurable billing was created/enabled.
            +       * 
            + * + * CREATE = 1; + */ + CREATE(1), + /** + * + * + *
            +       * Configurable billing was deleted/disabled.
            +       * 
            + * + * DELETE = 2; + */ + DELETE(2), + /** + * + * + *
            +       * Subscription was scaled up (thresholds increased).
            +       * 
            + * + * SCALE_UP = 3; + */ + SCALE_UP(3), + /** + * + * + *
            +       * Subscription was scaled down (thresholds decreased).
            +       * 
            + * + * SCALE_DOWN = 4; + */ + SCALE_DOWN(4), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "UpdateType"); + } + + /** + * + * + *
            +       * Unspecified update type.
            +       * 
            + * + * UPDATE_TYPE_UNSPECIFIED = 0; + */ + public static final int UPDATE_TYPE_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
            +       * Configurable billing was created/enabled.
            +       * 
            + * + * CREATE = 1; + */ + public static final int CREATE_VALUE = 1; + + /** + * + * + *
            +       * Configurable billing was deleted/disabled.
            +       * 
            + * + * DELETE = 2; + */ + public static final int DELETE_VALUE = 2; + + /** + * + * + *
            +       * Subscription was scaled up (thresholds increased).
            +       * 
            + * + * SCALE_UP = 3; + */ + public static final int SCALE_UP_VALUE = 3; + + /** + * + * + *
            +       * Subscription was scaled down (thresholds decreased).
            +       * 
            + * + * SCALE_DOWN = 4; + */ + public static final int SCALE_DOWN_VALUE = 4; + + 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 UpdateType 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 UpdateType forNumber(int value) { + switch (value) { + case 0: + return UPDATE_TYPE_UNSPECIFIED; + case 1: + return CREATE; + case 2: + return DELETE; + case 3: + return SCALE_UP; + case 4: + return SCALE_DOWN; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public UpdateType findValueByNumber(int number) { + return UpdateType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus + .getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final UpdateType[] VALUES = values(); + + public static UpdateType valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private UpdateType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus.UpdateType) + } + + public interface AgentSearchTokenSubscriptionStatusOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus.AgentSearchTokenSubscriptionStatus) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
            +       * Output only. The Gemini model version this status corresponds to.
            +       * Matches CoreSubscription.AgentSearchTokenSubscription.model_version (a
            +       * stable Gemini model version from the Gemini Enterprise Agent Platform
            +       * model-versions registry; see
            +       * https://docs.cloud.google.com/gemini-enterprise-agent-platform/models/model-versions#gemini-models).
            +       * 
            + * + * string model_version = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The modelVersion. + */ + java.lang.String getModelVersion(); + + /** + * + * + *
            +       * Output only. The Gemini model version this status corresponds to.
            +       * Matches CoreSubscription.AgentSearchTokenSubscription.model_version (a
            +       * stable Gemini model version from the Gemini Enterprise Agent Platform
            +       * model-versions registry; see
            +       * https://docs.cloud.google.com/gemini-enterprise-agent-platform/models/model-versions#gemini-models).
            +       * 
            + * + * string model_version = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for modelVersion. + */ + com.google.protobuf.ByteString getModelVersionBytes(); + + /** + * + * + *
            +       * Output only. The currently effective TPM threshold. Reflects scale-up
            +       * immediately and scale-down at the next billing cycle, matching
            +       * `effective_search_qpm_threshold` semantics.
            +       * 
            + * + * int64 effective_tpm_threshold = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The effectiveTpmThreshold. + */ + long getEffectiveTpmThreshold(); + + /** + * + * + *
            +       * Output only. The earliest next update time for the TPM subscription
            +       * threshold for this (project, model_version). Populated only after a
            +       * successful update.
            +       * 
            + * + * + * .google.protobuf.Timestamp tpm_threshold_next_update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the tpmThresholdNextUpdateTime field is set. + */ + boolean hasTpmThresholdNextUpdateTime(); + + /** + * + * + *
            +       * Output only. The earliest next update time for the TPM subscription
            +       * threshold for this (project, model_version). Populated only after a
            +       * successful update.
            +       * 
            + * + * + * .google.protobuf.Timestamp tpm_threshold_next_update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The tpmThresholdNextUpdateTime. + */ + com.google.protobuf.Timestamp getTpmThresholdNextUpdateTime(); + + /** + * + * + *
            +       * Output only. The earliest next update time for the TPM subscription
            +       * threshold for this (project, model_version). Populated only after a
            +       * successful update.
            +       * 
            + * + * + * .google.protobuf.Timestamp tpm_threshold_next_update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getTpmThresholdNextUpdateTimeOrBuilder(); + + /** + * + * + *
            +       * Output only. When this (project, model_version) Agent Search TPM
            +       * subscription was first activated. Set once on first activation of this
            +       * model version and never moved by subsequent threshold updates; on
            +       * termination + re-activation a new value is recorded. Does NOT move
            +       * the whole-relationship `start_time` on the enclosing
            +       * ConfigurableBillingStatus, which continues to represent the first
            +       * activation of the overall customer-configurable-pricing
            +       * relationship.
            +       * 
            + * + * + * .google.protobuf.Timestamp start_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the startTime field is set. + */ + boolean hasStartTime(); + + /** + * + * + *
            +       * Output only. When this (project, model_version) Agent Search TPM
            +       * subscription was first activated. Set once on first activation of this
            +       * model version and never moved by subsequent threshold updates; on
            +       * termination + re-activation a new value is recorded. Does NOT move
            +       * the whole-relationship `start_time` on the enclosing
            +       * ConfigurableBillingStatus, which continues to represent the first
            +       * activation of the overall customer-configurable-pricing
            +       * relationship.
            +       * 
            + * + * + * .google.protobuf.Timestamp start_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The startTime. + */ + com.google.protobuf.Timestamp getStartTime(); + + /** + * + * + *
            +       * Output only. When this (project, model_version) Agent Search TPM
            +       * subscription was first activated. Set once on first activation of this
            +       * model version and never moved by subsequent threshold updates; on
            +       * termination + re-activation a new value is recorded. Does NOT move
            +       * the whole-relationship `start_time` on the enclosing
            +       * ConfigurableBillingStatus, which continues to represent the first
            +       * activation of the overall customer-configurable-pricing
            +       * relationship.
            +       * 
            + * + * + * .google.protobuf.Timestamp start_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder(); + + /** + * + * + *
            +       * Output only. If set, the scheduled effective time at which this
            +       * (project, model_version) Agent Search TPM subscription will terminate.
            +       * Populated when the customer removes this entry from
            +       * `core_subscription.agent_search_token_subscriptions[*]`. Does NOT move
            +       * the whole-relationship `terminate_time` on the enclosing
            +       * ConfigurableBillingStatus, which is populated only when the entire
            +       * customer-configurable-pricing relationship is being torn down.
            +       * 
            + * + * + * .google.protobuf.Timestamp terminate_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the terminateTime field is set. + */ + boolean hasTerminateTime(); + + /** + * + * + *
            +       * Output only. If set, the scheduled effective time at which this
            +       * (project, model_version) Agent Search TPM subscription will terminate.
            +       * Populated when the customer removes this entry from
            +       * `core_subscription.agent_search_token_subscriptions[*]`. Does NOT move
            +       * the whole-relationship `terminate_time` on the enclosing
            +       * ConfigurableBillingStatus, which is populated only when the entire
            +       * customer-configurable-pricing relationship is being torn down.
            +       * 
            + * + * + * .google.protobuf.Timestamp terminate_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The terminateTime. + */ + com.google.protobuf.Timestamp getTerminateTime(); + + /** + * + * + *
            +       * Output only. If set, the scheduled effective time at which this
            +       * (project, model_version) Agent Search TPM subscription will terminate.
            +       * Populated when the customer removes this entry from
            +       * `core_subscription.agent_search_token_subscriptions[*]`. Does NOT move
            +       * the whole-relationship `terminate_time` on the enclosing
            +       * ConfigurableBillingStatus, which is populated only when the entire
            +       * customer-configurable-pricing relationship is being torn down.
            +       * 
            + * + * + * .google.protobuf.Timestamp terminate_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getTerminateTimeOrBuilder(); + + /** + * + * + *
            +       * Output only. The type of the most recent update to this (project,
            +       * model_version) subscription, as performed by the most recent
            +       * UpdateProject call. `UPDATE_TYPE_UNSPECIFIED` indicates this
            +       * model_version was not touched by the most recent UpdateProject (its
            +       * `effective_tpm_threshold` reflects an earlier update). The
            +       * whole-relationship `update_type` on the enclosing
            +       * ConfigurableBillingStatus continues to summarize the direction of
            +       * the most recent update across all surfaces in the project (QPM,
            +       * IndexingCore, and Agent Search TPM together).
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus.UpdateType update_type = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for updateType. + */ + int getUpdateTypeValue(); + + /** + * + * + *
            +       * Output only. The type of the most recent update to this (project,
            +       * model_version) subscription, as performed by the most recent
            +       * UpdateProject call. `UPDATE_TYPE_UNSPECIFIED` indicates this
            +       * model_version was not touched by the most recent UpdateProject (its
            +       * `effective_tpm_threshold` reflects an earlier update). The
            +       * whole-relationship `update_type` on the enclosing
            +       * ConfigurableBillingStatus continues to summarize the direction of
            +       * the most recent update across all surfaces in the project (QPM,
            +       * IndexingCore, and Agent Search TPM together).
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus.UpdateType update_type = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateType. + */ + com.google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus.UpdateType + getUpdateType(); + } + + /** + * + * + *
            +     * Per-model Agent Search TPM subscription status. One entry per active
            +     * `core_subscription.agent_search_token_subscriptions[*]` entry in the
            +     * customer-provided config; populated by UpdateProject and GetProject.
            +     *
            +     * The lifecycle scalars on this message (`start_time`, `terminate_time`,
            +     * `update_type`, `tpm_threshold_next_update_time`) are per (project,
            +     * model_version) — siblings of the whole-relationship `start_time` /
            +     * `terminate_time` / `update_type` on the enclosing
            +     * ConfigurableBillingStatus, but scoped to this specific Agent Search
            +     * TPM subscription instead of to the overall customer-configurable-
            +     * pricing relationship. This per-instance granularity is intentional:
            +     * the underlying SubV3 storage is per-(project, model_version), so
            +     * each model has its own activation, termination, and deferred-update
            +     * clock; surfacing that on the response gives customers the granularity
            +     * they need to manage per-model commitments independently. QPM /
            +     * IndexingCore differ — their storage is one row per (project,
            +     * location), so their lifecycle is represented only by the whole-
            +     * relationship scalars on ConfigurableBillingStatus.
            +     * 
            + * + * Protobuf type {@code + * google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus.AgentSearchTokenSubscriptionStatus} + */ + public static final class AgentSearchTokenSubscriptionStatus + extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus.AgentSearchTokenSubscriptionStatus) + AgentSearchTokenSubscriptionStatusOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "AgentSearchTokenSubscriptionStatus"); + } + + // Use AgentSearchTokenSubscriptionStatus.newBuilder() to construct. + private AgentSearchTokenSubscriptionStatus( + com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private AgentSearchTokenSubscriptionStatus() { + modelVersion_ = ""; + updateType_ = 0; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.ProjectProto + .internal_static_google_cloud_discoveryengine_v1beta_Project_ConfigurableBillingStatus_AgentSearchTokenSubscriptionStatus_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.ProjectProto + .internal_static_google_cloud_discoveryengine_v1beta_Project_ConfigurableBillingStatus_AgentSearchTokenSubscriptionStatus_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus + .AgentSearchTokenSubscriptionStatus.class, + com.google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus + .AgentSearchTokenSubscriptionStatus.Builder.class); + } + + private int bitField0_; + public static final int MODEL_VERSION_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object modelVersion_ = ""; + + /** + * + * + *
            +       * Output only. The Gemini model version this status corresponds to.
            +       * Matches CoreSubscription.AgentSearchTokenSubscription.model_version (a
            +       * stable Gemini model version from the Gemini Enterprise Agent Platform
            +       * model-versions registry; see
            +       * https://docs.cloud.google.com/gemini-enterprise-agent-platform/models/model-versions#gemini-models).
            +       * 
            + * + * string model_version = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The modelVersion. + */ + @java.lang.Override + public java.lang.String getModelVersion() { + java.lang.Object ref = modelVersion_; + 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(); + modelVersion_ = s; + return s; + } + } + + /** + * + * + *
            +       * Output only. The Gemini model version this status corresponds to.
            +       * Matches CoreSubscription.AgentSearchTokenSubscription.model_version (a
            +       * stable Gemini model version from the Gemini Enterprise Agent Platform
            +       * model-versions registry; see
            +       * https://docs.cloud.google.com/gemini-enterprise-agent-platform/models/model-versions#gemini-models).
            +       * 
            + * + * string model_version = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for modelVersion. + */ + @java.lang.Override + public com.google.protobuf.ByteString getModelVersionBytes() { + java.lang.Object ref = modelVersion_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + modelVersion_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int EFFECTIVE_TPM_THRESHOLD_FIELD_NUMBER = 2; + private long effectiveTpmThreshold_ = 0L; + + /** + * + * + *
            +       * Output only. The currently effective TPM threshold. Reflects scale-up
            +       * immediately and scale-down at the next billing cycle, matching
            +       * `effective_search_qpm_threshold` semantics.
            +       * 
            + * + * int64 effective_tpm_threshold = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The effectiveTpmThreshold. + */ + @java.lang.Override + public long getEffectiveTpmThreshold() { + return effectiveTpmThreshold_; + } + + public static final int TPM_THRESHOLD_NEXT_UPDATE_TIME_FIELD_NUMBER = 3; + private com.google.protobuf.Timestamp tpmThresholdNextUpdateTime_; + + /** + * + * + *
            +       * Output only. The earliest next update time for the TPM subscription
            +       * threshold for this (project, model_version). Populated only after a
            +       * successful update.
            +       * 
            + * + * + * .google.protobuf.Timestamp tpm_threshold_next_update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the tpmThresholdNextUpdateTime field is set. + */ + @java.lang.Override + public boolean hasTpmThresholdNextUpdateTime() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
            +       * Output only. The earliest next update time for the TPM subscription
            +       * threshold for this (project, model_version). Populated only after a
            +       * successful update.
            +       * 
            + * + * + * .google.protobuf.Timestamp tpm_threshold_next_update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The tpmThresholdNextUpdateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getTpmThresholdNextUpdateTime() { + return tpmThresholdNextUpdateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : tpmThresholdNextUpdateTime_; + } + + /** + * + * + *
            +       * Output only. The earliest next update time for the TPM subscription
            +       * threshold for this (project, model_version). Populated only after a
            +       * successful update.
            +       * 
            + * + * + * .google.protobuf.Timestamp tpm_threshold_next_update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getTpmThresholdNextUpdateTimeOrBuilder() { + return tpmThresholdNextUpdateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : tpmThresholdNextUpdateTime_; + } + + public static final int START_TIME_FIELD_NUMBER = 4; + private com.google.protobuf.Timestamp startTime_; + + /** + * + * + *
            +       * Output only. When this (project, model_version) Agent Search TPM
            +       * subscription was first activated. Set once on first activation of this
            +       * model version and never moved by subsequent threshold updates; on
            +       * termination + re-activation a new value is recorded. Does NOT move
            +       * the whole-relationship `start_time` on the enclosing
            +       * ConfigurableBillingStatus, which continues to represent the first
            +       * activation of the overall customer-configurable-pricing
            +       * relationship.
            +       * 
            + * + * + * .google.protobuf.Timestamp start_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the startTime field is set. + */ + @java.lang.Override + public boolean hasStartTime() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
            +       * Output only. When this (project, model_version) Agent Search TPM
            +       * subscription was first activated. Set once on first activation of this
            +       * model version and never moved by subsequent threshold updates; on
            +       * termination + re-activation a new value is recorded. Does NOT move
            +       * the whole-relationship `start_time` on the enclosing
            +       * ConfigurableBillingStatus, which continues to represent the first
            +       * activation of the overall customer-configurable-pricing
            +       * relationship.
            +       * 
            + * + * + * .google.protobuf.Timestamp start_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The startTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getStartTime() { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } + + /** + * + * + *
            +       * Output only. When this (project, model_version) Agent Search TPM
            +       * subscription was first activated. Set once on first activation of this
            +       * model version and never moved by subsequent threshold updates; on
            +       * termination + re-activation a new value is recorded. Does NOT move
            +       * the whole-relationship `start_time` on the enclosing
            +       * ConfigurableBillingStatus, which continues to represent the first
            +       * activation of the overall customer-configurable-pricing
            +       * relationship.
            +       * 
            + * + * + * .google.protobuf.Timestamp start_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } + + public static final int TERMINATE_TIME_FIELD_NUMBER = 5; + private com.google.protobuf.Timestamp terminateTime_; + + /** + * + * + *
            +       * Output only. If set, the scheduled effective time at which this
            +       * (project, model_version) Agent Search TPM subscription will terminate.
            +       * Populated when the customer removes this entry from
            +       * `core_subscription.agent_search_token_subscriptions[*]`. Does NOT move
            +       * the whole-relationship `terminate_time` on the enclosing
            +       * ConfigurableBillingStatus, which is populated only when the entire
            +       * customer-configurable-pricing relationship is being torn down.
            +       * 
            + * + * + * .google.protobuf.Timestamp terminate_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the terminateTime field is set. + */ + @java.lang.Override + public boolean hasTerminateTime() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
            +       * Output only. If set, the scheduled effective time at which this
            +       * (project, model_version) Agent Search TPM subscription will terminate.
            +       * Populated when the customer removes this entry from
            +       * `core_subscription.agent_search_token_subscriptions[*]`. Does NOT move
            +       * the whole-relationship `terminate_time` on the enclosing
            +       * ConfigurableBillingStatus, which is populated only when the entire
            +       * customer-configurable-pricing relationship is being torn down.
            +       * 
            + * + * + * .google.protobuf.Timestamp terminate_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The terminateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getTerminateTime() { + return terminateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : terminateTime_; + } + + /** + * + * + *
            +       * Output only. If set, the scheduled effective time at which this
            +       * (project, model_version) Agent Search TPM subscription will terminate.
            +       * Populated when the customer removes this entry from
            +       * `core_subscription.agent_search_token_subscriptions[*]`. Does NOT move
            +       * the whole-relationship `terminate_time` on the enclosing
            +       * ConfigurableBillingStatus, which is populated only when the entire
            +       * customer-configurable-pricing relationship is being torn down.
            +       * 
            + * + * + * .google.protobuf.Timestamp terminate_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getTerminateTimeOrBuilder() { + return terminateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : terminateTime_; + } + + public static final int UPDATE_TYPE_FIELD_NUMBER = 6; + private int updateType_ = 0; + + /** + * + * + *
            +       * Output only. The type of the most recent update to this (project,
            +       * model_version) subscription, as performed by the most recent
            +       * UpdateProject call. `UPDATE_TYPE_UNSPECIFIED` indicates this
            +       * model_version was not touched by the most recent UpdateProject (its
            +       * `effective_tpm_threshold` reflects an earlier update). The
            +       * whole-relationship `update_type` on the enclosing
            +       * ConfigurableBillingStatus continues to summarize the direction of
            +       * the most recent update across all surfaces in the project (QPM,
            +       * IndexingCore, and Agent Search TPM together).
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus.UpdateType update_type = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for updateType. + */ + @java.lang.Override + public int getUpdateTypeValue() { + return updateType_; + } + + /** + * + * + *
            +       * Output only. The type of the most recent update to this (project,
            +       * model_version) subscription, as performed by the most recent
            +       * UpdateProject call. `UPDATE_TYPE_UNSPECIFIED` indicates this
            +       * model_version was not touched by the most recent UpdateProject (its
            +       * `effective_tpm_threshold` reflects an earlier update). The
            +       * whole-relationship `update_type` on the enclosing
            +       * ConfigurableBillingStatus continues to summarize the direction of
            +       * the most recent update across all surfaces in the project (QPM,
            +       * IndexingCore, and Agent Search TPM together).
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus.UpdateType update_type = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateType. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus.UpdateType + getUpdateType() { + com.google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus.UpdateType + result = + com.google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus.UpdateType + .forNumber(updateType_); + return result == null + ? com.google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus.UpdateType + .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(modelVersion_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, modelVersion_); + } + if (effectiveTpmThreshold_ != 0L) { + output.writeInt64(2, effectiveTpmThreshold_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(3, getTpmThresholdNextUpdateTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(4, getStartTime()); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeMessage(5, getTerminateTime()); + } + if (updateType_ + != com.google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus.UpdateType + .UPDATE_TYPE_UNSPECIFIED + .getNumber()) { + output.writeEnum(6, updateType_); + } + 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(modelVersion_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, modelVersion_); + } + if (effectiveTpmThreshold_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(2, effectiveTpmThreshold_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 3, getTpmThresholdNextUpdateTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getStartTime()); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getTerminateTime()); + } + if (updateType_ + != com.google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus.UpdateType + .UPDATE_TYPE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(6, updateType_); + } + 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.discoveryengine.v1beta.Project.ConfigurableBillingStatus + .AgentSearchTokenSubscriptionStatus)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus + .AgentSearchTokenSubscriptionStatus + other = + (com.google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus + .AgentSearchTokenSubscriptionStatus) + obj; + + if (!getModelVersion().equals(other.getModelVersion())) return false; + if (getEffectiveTpmThreshold() != other.getEffectiveTpmThreshold()) return false; + if (hasTpmThresholdNextUpdateTime() != other.hasTpmThresholdNextUpdateTime()) return false; + if (hasTpmThresholdNextUpdateTime()) { + if (!getTpmThresholdNextUpdateTime().equals(other.getTpmThresholdNextUpdateTime())) + return false; + } + if (hasStartTime() != other.hasStartTime()) return false; + if (hasStartTime()) { + if (!getStartTime().equals(other.getStartTime())) return false; + } + if (hasTerminateTime() != other.hasTerminateTime()) return false; + if (hasTerminateTime()) { + if (!getTerminateTime().equals(other.getTerminateTime())) return false; + } + if (updateType_ != other.updateType_) 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) + MODEL_VERSION_FIELD_NUMBER; + hash = (53 * hash) + getModelVersion().hashCode(); + hash = (37 * hash) + EFFECTIVE_TPM_THRESHOLD_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getEffectiveTpmThreshold()); + if (hasTpmThresholdNextUpdateTime()) { + hash = (37 * hash) + TPM_THRESHOLD_NEXT_UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getTpmThresholdNextUpdateTime().hashCode(); + } + if (hasStartTime()) { + hash = (37 * hash) + START_TIME_FIELD_NUMBER; + hash = (53 * hash) + getStartTime().hashCode(); + } + if (hasTerminateTime()) { + hash = (37 * hash) + TERMINATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getTerminateTime().hashCode(); + } + hash = (37 * hash) + UPDATE_TYPE_FIELD_NUMBER; + hash = (53 * hash) + updateType_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus + .AgentSearchTokenSubscriptionStatus + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus + .AgentSearchTokenSubscriptionStatus + 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.discoveryengine.v1beta.Project.ConfigurableBillingStatus + .AgentSearchTokenSubscriptionStatus + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus + .AgentSearchTokenSubscriptionStatus + 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.discoveryengine.v1beta.Project.ConfigurableBillingStatus + .AgentSearchTokenSubscriptionStatus + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus + .AgentSearchTokenSubscriptionStatus + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus + .AgentSearchTokenSubscriptionStatus + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus + .AgentSearchTokenSubscriptionStatus + 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.discoveryengine.v1beta.Project.ConfigurableBillingStatus + .AgentSearchTokenSubscriptionStatus + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus + .AgentSearchTokenSubscriptionStatus + 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.discoveryengine.v1beta.Project.ConfigurableBillingStatus + .AgentSearchTokenSubscriptionStatus + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus + .AgentSearchTokenSubscriptionStatus + 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.discoveryengine.v1beta.Project.ConfigurableBillingStatus + .AgentSearchTokenSubscriptionStatus + 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; + } + + /** + * + * + *
            +       * Per-model Agent Search TPM subscription status. One entry per active
            +       * `core_subscription.agent_search_token_subscriptions[*]` entry in the
            +       * customer-provided config; populated by UpdateProject and GetProject.
            +       *
            +       * The lifecycle scalars on this message (`start_time`, `terminate_time`,
            +       * `update_type`, `tpm_threshold_next_update_time`) are per (project,
            +       * model_version) — siblings of the whole-relationship `start_time` /
            +       * `terminate_time` / `update_type` on the enclosing
            +       * ConfigurableBillingStatus, but scoped to this specific Agent Search
            +       * TPM subscription instead of to the overall customer-configurable-
            +       * pricing relationship. This per-instance granularity is intentional:
            +       * the underlying SubV3 storage is per-(project, model_version), so
            +       * each model has its own activation, termination, and deferred-update
            +       * clock; surfacing that on the response gives customers the granularity
            +       * they need to manage per-model commitments independently. QPM /
            +       * IndexingCore differ — their storage is one row per (project,
            +       * location), so their lifecycle is represented only by the whole-
            +       * relationship scalars on ConfigurableBillingStatus.
            +       * 
            + * + * Protobuf type {@code + * google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus.AgentSearchTokenSubscriptionStatus} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus.AgentSearchTokenSubscriptionStatus) + com.google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus + .AgentSearchTokenSubscriptionStatusOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.ProjectProto + .internal_static_google_cloud_discoveryengine_v1beta_Project_ConfigurableBillingStatus_AgentSearchTokenSubscriptionStatus_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.ProjectProto + .internal_static_google_cloud_discoveryengine_v1beta_Project_ConfigurableBillingStatus_AgentSearchTokenSubscriptionStatus_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus + .AgentSearchTokenSubscriptionStatus.class, + com.google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus + .AgentSearchTokenSubscriptionStatus.Builder.class); + } + + // Construct using + // com.google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus.AgentSearchTokenSubscriptionStatus.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetTpmThresholdNextUpdateTimeFieldBuilder(); + internalGetStartTimeFieldBuilder(); + internalGetTerminateTimeFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + modelVersion_ = ""; + effectiveTpmThreshold_ = 0L; + tpmThresholdNextUpdateTime_ = null; + if (tpmThresholdNextUpdateTimeBuilder_ != null) { + tpmThresholdNextUpdateTimeBuilder_.dispose(); + tpmThresholdNextUpdateTimeBuilder_ = null; + } + startTime_ = null; + if (startTimeBuilder_ != null) { + startTimeBuilder_.dispose(); + startTimeBuilder_ = null; + } + terminateTime_ = null; + if (terminateTimeBuilder_ != null) { + terminateTimeBuilder_.dispose(); + terminateTimeBuilder_ = null; + } + updateType_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1beta.ProjectProto + .internal_static_google_cloud_discoveryengine_v1beta_Project_ConfigurableBillingStatus_AgentSearchTokenSubscriptionStatus_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus + .AgentSearchTokenSubscriptionStatus + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus + .AgentSearchTokenSubscriptionStatus.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus + .AgentSearchTokenSubscriptionStatus + build() { + com.google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus + .AgentSearchTokenSubscriptionStatus + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus + .AgentSearchTokenSubscriptionStatus + buildPartial() { + com.google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus + .AgentSearchTokenSubscriptionStatus + result = + new com.google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus + .AgentSearchTokenSubscriptionStatus(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus + .AgentSearchTokenSubscriptionStatus + result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.modelVersion_ = modelVersion_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.effectiveTpmThreshold_ = effectiveTpmThreshold_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.tpmThresholdNextUpdateTime_ = + tpmThresholdNextUpdateTimeBuilder_ == null + ? tpmThresholdNextUpdateTime_ + : tpmThresholdNextUpdateTimeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.startTime_ = startTimeBuilder_ == null ? startTime_ : startTimeBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.terminateTime_ = + terminateTimeBuilder_ == null ? terminateTime_ : terminateTimeBuilder_.build(); + to_bitField0_ |= 0x00000004; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.updateType_ = updateType_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus + .AgentSearchTokenSubscriptionStatus) { + return mergeFrom( + (com.google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus + .AgentSearchTokenSubscriptionStatus) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus + .AgentSearchTokenSubscriptionStatus + other) { + if (other + == com.google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus + .AgentSearchTokenSubscriptionStatus.getDefaultInstance()) return this; + if (!other.getModelVersion().isEmpty()) { + modelVersion_ = other.modelVersion_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getEffectiveTpmThreshold() != 0L) { + setEffectiveTpmThreshold(other.getEffectiveTpmThreshold()); + } + if (other.hasTpmThresholdNextUpdateTime()) { + mergeTpmThresholdNextUpdateTime(other.getTpmThresholdNextUpdateTime()); + } + if (other.hasStartTime()) { + mergeStartTime(other.getStartTime()); + } + if (other.hasTerminateTime()) { + mergeTerminateTime(other.getTerminateTime()); + } + if (other.updateType_ != 0) { + setUpdateTypeValue(other.getUpdateTypeValue()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + modelVersion_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + effectiveTpmThreshold_ = input.readInt64(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: + { + input.readMessage( + internalGetTpmThresholdNextUpdateTimeFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + input.readMessage( + internalGetStartTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + input.readMessage( + internalGetTerminateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 48: + { + updateType_ = input.readEnum(); + bitField0_ |= 0x00000020; + break; + } // case 48 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object modelVersion_ = ""; + + /** + * + * + *
            +         * Output only. The Gemini model version this status corresponds to.
            +         * Matches CoreSubscription.AgentSearchTokenSubscription.model_version (a
            +         * stable Gemini model version from the Gemini Enterprise Agent Platform
            +         * model-versions registry; see
            +         * https://docs.cloud.google.com/gemini-enterprise-agent-platform/models/model-versions#gemini-models).
            +         * 
            + * + * string model_version = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The modelVersion. + */ + public java.lang.String getModelVersion() { + java.lang.Object ref = modelVersion_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + modelVersion_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
            +         * Output only. The Gemini model version this status corresponds to.
            +         * Matches CoreSubscription.AgentSearchTokenSubscription.model_version (a
            +         * stable Gemini model version from the Gemini Enterprise Agent Platform
            +         * model-versions registry; see
            +         * https://docs.cloud.google.com/gemini-enterprise-agent-platform/models/model-versions#gemini-models).
            +         * 
            + * + * string model_version = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for modelVersion. + */ + public com.google.protobuf.ByteString getModelVersionBytes() { + java.lang.Object ref = modelVersion_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + modelVersion_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
            +         * Output only. The Gemini model version this status corresponds to.
            +         * Matches CoreSubscription.AgentSearchTokenSubscription.model_version (a
            +         * stable Gemini model version from the Gemini Enterprise Agent Platform
            +         * model-versions registry; see
            +         * https://docs.cloud.google.com/gemini-enterprise-agent-platform/models/model-versions#gemini-models).
            +         * 
            + * + * string model_version = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The modelVersion to set. + * @return This builder for chaining. + */ + public Builder setModelVersion(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + modelVersion_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
            +         * Output only. The Gemini model version this status corresponds to.
            +         * Matches CoreSubscription.AgentSearchTokenSubscription.model_version (a
            +         * stable Gemini model version from the Gemini Enterprise Agent Platform
            +         * model-versions registry; see
            +         * https://docs.cloud.google.com/gemini-enterprise-agent-platform/models/model-versions#gemini-models).
            +         * 
            + * + * string model_version = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearModelVersion() { + modelVersion_ = getDefaultInstance().getModelVersion(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
            +         * Output only. The Gemini model version this status corresponds to.
            +         * Matches CoreSubscription.AgentSearchTokenSubscription.model_version (a
            +         * stable Gemini model version from the Gemini Enterprise Agent Platform
            +         * model-versions registry; see
            +         * https://docs.cloud.google.com/gemini-enterprise-agent-platform/models/model-versions#gemini-models).
            +         * 
            + * + * string model_version = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for modelVersion to set. + * @return This builder for chaining. + */ + public Builder setModelVersionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + modelVersion_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private long effectiveTpmThreshold_; + + /** + * + * + *
            +         * Output only. The currently effective TPM threshold. Reflects scale-up
            +         * immediately and scale-down at the next billing cycle, matching
            +         * `effective_search_qpm_threshold` semantics.
            +         * 
            + * + * int64 effective_tpm_threshold = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The effectiveTpmThreshold. + */ + @java.lang.Override + public long getEffectiveTpmThreshold() { + return effectiveTpmThreshold_; + } + + /** + * + * + *
            +         * Output only. The currently effective TPM threshold. Reflects scale-up
            +         * immediately and scale-down at the next billing cycle, matching
            +         * `effective_search_qpm_threshold` semantics.
            +         * 
            + * + * int64 effective_tpm_threshold = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The effectiveTpmThreshold to set. + * @return This builder for chaining. + */ + public Builder setEffectiveTpmThreshold(long value) { + + effectiveTpmThreshold_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
            +         * Output only. The currently effective TPM threshold. Reflects scale-up
            +         * immediately and scale-down at the next billing cycle, matching
            +         * `effective_search_qpm_threshold` semantics.
            +         * 
            + * + * int64 effective_tpm_threshold = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearEffectiveTpmThreshold() { + bitField0_ = (bitField0_ & ~0x00000002); + effectiveTpmThreshold_ = 0L; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp tpmThresholdNextUpdateTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + tpmThresholdNextUpdateTimeBuilder_; + + /** + * + * + *
            +         * Output only. The earliest next update time for the TPM subscription
            +         * threshold for this (project, model_version). Populated only after a
            +         * successful update.
            +         * 
            + * + * + * .google.protobuf.Timestamp tpm_threshold_next_update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the tpmThresholdNextUpdateTime field is set. + */ + public boolean hasTpmThresholdNextUpdateTime() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
            +         * Output only. The earliest next update time for the TPM subscription
            +         * threshold for this (project, model_version). Populated only after a
            +         * successful update.
            +         * 
            + * + * + * .google.protobuf.Timestamp tpm_threshold_next_update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The tpmThresholdNextUpdateTime. + */ + public com.google.protobuf.Timestamp getTpmThresholdNextUpdateTime() { + if (tpmThresholdNextUpdateTimeBuilder_ == null) { + return tpmThresholdNextUpdateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : tpmThresholdNextUpdateTime_; + } else { + return tpmThresholdNextUpdateTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
            +         * Output only. The earliest next update time for the TPM subscription
            +         * threshold for this (project, model_version). Populated only after a
            +         * successful update.
            +         * 
            + * + * + * .google.protobuf.Timestamp tpm_threshold_next_update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setTpmThresholdNextUpdateTime(com.google.protobuf.Timestamp value) { + if (tpmThresholdNextUpdateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + tpmThresholdNextUpdateTime_ = value; + } else { + tpmThresholdNextUpdateTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
            +         * Output only. The earliest next update time for the TPM subscription
            +         * threshold for this (project, model_version). Populated only after a
            +         * successful update.
            +         * 
            + * + * + * .google.protobuf.Timestamp tpm_threshold_next_update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setTpmThresholdNextUpdateTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (tpmThresholdNextUpdateTimeBuilder_ == null) { + tpmThresholdNextUpdateTime_ = builderForValue.build(); + } else { + tpmThresholdNextUpdateTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
            +         * Output only. The earliest next update time for the TPM subscription
            +         * threshold for this (project, model_version). Populated only after a
            +         * successful update.
            +         * 
            + * + * + * .google.protobuf.Timestamp tpm_threshold_next_update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeTpmThresholdNextUpdateTime(com.google.protobuf.Timestamp value) { + if (tpmThresholdNextUpdateTimeBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && tpmThresholdNextUpdateTime_ != null + && tpmThresholdNextUpdateTime_ + != com.google.protobuf.Timestamp.getDefaultInstance()) { + getTpmThresholdNextUpdateTimeBuilder().mergeFrom(value); + } else { + tpmThresholdNextUpdateTime_ = value; + } + } else { + tpmThresholdNextUpdateTimeBuilder_.mergeFrom(value); + } + if (tpmThresholdNextUpdateTime_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + + /** + * + * + *
            +         * Output only. The earliest next update time for the TPM subscription
            +         * threshold for this (project, model_version). Populated only after a
            +         * successful update.
            +         * 
            + * + * + * .google.protobuf.Timestamp tpm_threshold_next_update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearTpmThresholdNextUpdateTime() { + bitField0_ = (bitField0_ & ~0x00000004); + tpmThresholdNextUpdateTime_ = null; + if (tpmThresholdNextUpdateTimeBuilder_ != null) { + tpmThresholdNextUpdateTimeBuilder_.dispose(); + tpmThresholdNextUpdateTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
            +         * Output only. The earliest next update time for the TPM subscription
            +         * threshold for this (project, model_version). Populated only after a
            +         * successful update.
            +         * 
            + * + * + * .google.protobuf.Timestamp tpm_threshold_next_update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getTpmThresholdNextUpdateTimeBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return internalGetTpmThresholdNextUpdateTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
            +         * Output only. The earliest next update time for the TPM subscription
            +         * threshold for this (project, model_version). Populated only after a
            +         * successful update.
            +         * 
            + * + * + * .google.protobuf.Timestamp tpm_threshold_next_update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getTpmThresholdNextUpdateTimeOrBuilder() { + if (tpmThresholdNextUpdateTimeBuilder_ != null) { + return tpmThresholdNextUpdateTimeBuilder_.getMessageOrBuilder(); + } else { + return tpmThresholdNextUpdateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : tpmThresholdNextUpdateTime_; + } + } + + /** + * + * + *
            +         * Output only. The earliest next update time for the TPM subscription
            +         * threshold for this (project, model_version). Populated only after a
            +         * successful update.
            +         * 
            + * + * + * .google.protobuf.Timestamp tpm_threshold_next_update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + internalGetTpmThresholdNextUpdateTimeFieldBuilder() { + if (tpmThresholdNextUpdateTimeBuilder_ == null) { + tpmThresholdNextUpdateTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getTpmThresholdNextUpdateTime(), getParentForChildren(), isClean()); + tpmThresholdNextUpdateTime_ = null; + } + return tpmThresholdNextUpdateTimeBuilder_; + } + + private com.google.protobuf.Timestamp startTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + startTimeBuilder_; + + /** + * + * + *
            +         * Output only. When this (project, model_version) Agent Search TPM
            +         * subscription was first activated. Set once on first activation of this
            +         * model version and never moved by subsequent threshold updates; on
            +         * termination + re-activation a new value is recorded. Does NOT move
            +         * the whole-relationship `start_time` on the enclosing
            +         * ConfigurableBillingStatus, which continues to represent the first
            +         * activation of the overall customer-configurable-pricing
            +         * relationship.
            +         * 
            + * + * + * .google.protobuf.Timestamp start_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the startTime field is set. + */ + public boolean hasStartTime() { + return ((bitField0_ & 0x00000008) != 0); + } + + /** + * + * + *
            +         * Output only. When this (project, model_version) Agent Search TPM
            +         * subscription was first activated. Set once on first activation of this
            +         * model version and never moved by subsequent threshold updates; on
            +         * termination + re-activation a new value is recorded. Does NOT move
            +         * the whole-relationship `start_time` on the enclosing
            +         * ConfigurableBillingStatus, which continues to represent the first
            +         * activation of the overall customer-configurable-pricing
            +         * relationship.
            +         * 
            + * + * + * .google.protobuf.Timestamp start_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The startTime. + */ + public com.google.protobuf.Timestamp getStartTime() { + if (startTimeBuilder_ == null) { + return startTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : startTime_; + } else { + return startTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
            +         * Output only. When this (project, model_version) Agent Search TPM
            +         * subscription was first activated. Set once on first activation of this
            +         * model version and never moved by subsequent threshold updates; on
            +         * termination + re-activation a new value is recorded. Does NOT move
            +         * the whole-relationship `start_time` on the enclosing
            +         * ConfigurableBillingStatus, which continues to represent the first
            +         * activation of the overall customer-configurable-pricing
            +         * relationship.
            +         * 
            + * + * + * .google.protobuf.Timestamp start_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setStartTime(com.google.protobuf.Timestamp value) { + if (startTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + startTime_ = value; + } else { + startTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
            +         * Output only. When this (project, model_version) Agent Search TPM
            +         * subscription was first activated. Set once on first activation of this
            +         * model version and never moved by subsequent threshold updates; on
            +         * termination + re-activation a new value is recorded. Does NOT move
            +         * the whole-relationship `start_time` on the enclosing
            +         * ConfigurableBillingStatus, which continues to represent the first
            +         * activation of the overall customer-configurable-pricing
            +         * relationship.
            +         * 
            + * + * + * .google.protobuf.Timestamp start_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setStartTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (startTimeBuilder_ == null) { + startTime_ = builderForValue.build(); + } else { + startTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
            +         * Output only. When this (project, model_version) Agent Search TPM
            +         * subscription was first activated. Set once on first activation of this
            +         * model version and never moved by subsequent threshold updates; on
            +         * termination + re-activation a new value is recorded. Does NOT move
            +         * the whole-relationship `start_time` on the enclosing
            +         * ConfigurableBillingStatus, which continues to represent the first
            +         * activation of the overall customer-configurable-pricing
            +         * relationship.
            +         * 
            + * + * + * .google.protobuf.Timestamp start_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeStartTime(com.google.protobuf.Timestamp value) { + if (startTimeBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) + && startTime_ != null + && startTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getStartTimeBuilder().mergeFrom(value); + } else { + startTime_ = value; + } + } else { + startTimeBuilder_.mergeFrom(value); + } + if (startTime_ != null) { + bitField0_ |= 0x00000008; + onChanged(); + } + return this; + } + + /** + * + * + *
            +         * Output only. When this (project, model_version) Agent Search TPM
            +         * subscription was first activated. Set once on first activation of this
            +         * model version and never moved by subsequent threshold updates; on
            +         * termination + re-activation a new value is recorded. Does NOT move
            +         * the whole-relationship `start_time` on the enclosing
            +         * ConfigurableBillingStatus, which continues to represent the first
            +         * activation of the overall customer-configurable-pricing
            +         * relationship.
            +         * 
            + * + * + * .google.protobuf.Timestamp start_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearStartTime() { + bitField0_ = (bitField0_ & ~0x00000008); + startTime_ = null; + if (startTimeBuilder_ != null) { + startTimeBuilder_.dispose(); + startTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
            +         * Output only. When this (project, model_version) Agent Search TPM
            +         * subscription was first activated. Set once on first activation of this
            +         * model version and never moved by subsequent threshold updates; on
            +         * termination + re-activation a new value is recorded. Does NOT move
            +         * the whole-relationship `start_time` on the enclosing
            +         * ConfigurableBillingStatus, which continues to represent the first
            +         * activation of the overall customer-configurable-pricing
            +         * relationship.
            +         * 
            + * + * + * .google.protobuf.Timestamp start_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getStartTimeBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return internalGetStartTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
            +         * Output only. When this (project, model_version) Agent Search TPM
            +         * subscription was first activated. Set once on first activation of this
            +         * model version and never moved by subsequent threshold updates; on
            +         * termination + re-activation a new value is recorded. Does NOT move
            +         * the whole-relationship `start_time` on the enclosing
            +         * ConfigurableBillingStatus, which continues to represent the first
            +         * activation of the overall customer-configurable-pricing
            +         * relationship.
            +         * 
            + * + * + * .google.protobuf.Timestamp start_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { + if (startTimeBuilder_ != null) { + return startTimeBuilder_.getMessageOrBuilder(); + } else { + return startTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : startTime_; + } + } + + /** + * + * + *
            +         * Output only. When this (project, model_version) Agent Search TPM
            +         * subscription was first activated. Set once on first activation of this
            +         * model version and never moved by subsequent threshold updates; on
            +         * termination + re-activation a new value is recorded. Does NOT move
            +         * the whole-relationship `start_time` on the enclosing
            +         * ConfigurableBillingStatus, which continues to represent the first
            +         * activation of the overall customer-configurable-pricing
            +         * relationship.
            +         * 
            + * + * + * .google.protobuf.Timestamp start_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + internalGetStartTimeFieldBuilder() { + if (startTimeBuilder_ == null) { + startTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getStartTime(), getParentForChildren(), isClean()); + startTime_ = null; + } + return startTimeBuilder_; + } + + private com.google.protobuf.Timestamp terminateTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + terminateTimeBuilder_; + + /** + * + * + *
            +         * Output only. If set, the scheduled effective time at which this
            +         * (project, model_version) Agent Search TPM subscription will terminate.
            +         * Populated when the customer removes this entry from
            +         * `core_subscription.agent_search_token_subscriptions[*]`. Does NOT move
            +         * the whole-relationship `terminate_time` on the enclosing
            +         * ConfigurableBillingStatus, which is populated only when the entire
            +         * customer-configurable-pricing relationship is being torn down.
            +         * 
            + * + * + * .google.protobuf.Timestamp terminate_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the terminateTime field is set. + */ + public boolean hasTerminateTime() { + return ((bitField0_ & 0x00000010) != 0); + } + + /** + * + * + *
            +         * Output only. If set, the scheduled effective time at which this
            +         * (project, model_version) Agent Search TPM subscription will terminate.
            +         * Populated when the customer removes this entry from
            +         * `core_subscription.agent_search_token_subscriptions[*]`. Does NOT move
            +         * the whole-relationship `terminate_time` on the enclosing
            +         * ConfigurableBillingStatus, which is populated only when the entire
            +         * customer-configurable-pricing relationship is being torn down.
            +         * 
            + * + * + * .google.protobuf.Timestamp terminate_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The terminateTime. + */ + public com.google.protobuf.Timestamp getTerminateTime() { + if (terminateTimeBuilder_ == null) { + return terminateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : terminateTime_; + } else { + return terminateTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
            +         * Output only. If set, the scheduled effective time at which this
            +         * (project, model_version) Agent Search TPM subscription will terminate.
            +         * Populated when the customer removes this entry from
            +         * `core_subscription.agent_search_token_subscriptions[*]`. Does NOT move
            +         * the whole-relationship `terminate_time` on the enclosing
            +         * ConfigurableBillingStatus, which is populated only when the entire
            +         * customer-configurable-pricing relationship is being torn down.
            +         * 
            + * + * + * .google.protobuf.Timestamp terminate_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setTerminateTime(com.google.protobuf.Timestamp value) { + if (terminateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + terminateTime_ = value; + } else { + terminateTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
            +         * Output only. If set, the scheduled effective time at which this
            +         * (project, model_version) Agent Search TPM subscription will terminate.
            +         * Populated when the customer removes this entry from
            +         * `core_subscription.agent_search_token_subscriptions[*]`. Does NOT move
            +         * the whole-relationship `terminate_time` on the enclosing
            +         * ConfigurableBillingStatus, which is populated only when the entire
            +         * customer-configurable-pricing relationship is being torn down.
            +         * 
            + * + * + * .google.protobuf.Timestamp terminate_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setTerminateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (terminateTimeBuilder_ == null) { + terminateTime_ = builderForValue.build(); + } else { + terminateTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
            +         * Output only. If set, the scheduled effective time at which this
            +         * (project, model_version) Agent Search TPM subscription will terminate.
            +         * Populated when the customer removes this entry from
            +         * `core_subscription.agent_search_token_subscriptions[*]`. Does NOT move
            +         * the whole-relationship `terminate_time` on the enclosing
            +         * ConfigurableBillingStatus, which is populated only when the entire
            +         * customer-configurable-pricing relationship is being torn down.
            +         * 
            + * + * + * .google.protobuf.Timestamp terminate_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeTerminateTime(com.google.protobuf.Timestamp value) { + if (terminateTimeBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) + && terminateTime_ != null + && terminateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getTerminateTimeBuilder().mergeFrom(value); + } else { + terminateTime_ = value; + } + } else { + terminateTimeBuilder_.mergeFrom(value); + } + if (terminateTime_ != null) { + bitField0_ |= 0x00000010; + onChanged(); + } + return this; + } + + /** + * + * + *
            +         * Output only. If set, the scheduled effective time at which this
            +         * (project, model_version) Agent Search TPM subscription will terminate.
            +         * Populated when the customer removes this entry from
            +         * `core_subscription.agent_search_token_subscriptions[*]`. Does NOT move
            +         * the whole-relationship `terminate_time` on the enclosing
            +         * ConfigurableBillingStatus, which is populated only when the entire
            +         * customer-configurable-pricing relationship is being torn down.
            +         * 
            + * + * + * .google.protobuf.Timestamp terminate_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearTerminateTime() { + bitField0_ = (bitField0_ & ~0x00000010); + terminateTime_ = null; + if (terminateTimeBuilder_ != null) { + terminateTimeBuilder_.dispose(); + terminateTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
            +         * Output only. If set, the scheduled effective time at which this
            +         * (project, model_version) Agent Search TPM subscription will terminate.
            +         * Populated when the customer removes this entry from
            +         * `core_subscription.agent_search_token_subscriptions[*]`. Does NOT move
            +         * the whole-relationship `terminate_time` on the enclosing
            +         * ConfigurableBillingStatus, which is populated only when the entire
            +         * customer-configurable-pricing relationship is being torn down.
            +         * 
            + * + * + * .google.protobuf.Timestamp terminate_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getTerminateTimeBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return internalGetTerminateTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
            +         * Output only. If set, the scheduled effective time at which this
            +         * (project, model_version) Agent Search TPM subscription will terminate.
            +         * Populated when the customer removes this entry from
            +         * `core_subscription.agent_search_token_subscriptions[*]`. Does NOT move
            +         * the whole-relationship `terminate_time` on the enclosing
            +         * ConfigurableBillingStatus, which is populated only when the entire
            +         * customer-configurable-pricing relationship is being torn down.
            +         * 
            + * + * + * .google.protobuf.Timestamp terminate_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getTerminateTimeOrBuilder() { + if (terminateTimeBuilder_ != null) { + return terminateTimeBuilder_.getMessageOrBuilder(); + } else { + return terminateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : terminateTime_; + } + } + + /** + * + * + *
            +         * Output only. If set, the scheduled effective time at which this
            +         * (project, model_version) Agent Search TPM subscription will terminate.
            +         * Populated when the customer removes this entry from
            +         * `core_subscription.agent_search_token_subscriptions[*]`. Does NOT move
            +         * the whole-relationship `terminate_time` on the enclosing
            +         * ConfigurableBillingStatus, which is populated only when the entire
            +         * customer-configurable-pricing relationship is being torn down.
            +         * 
            + * + * + * .google.protobuf.Timestamp terminate_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + internalGetTerminateTimeFieldBuilder() { + if (terminateTimeBuilder_ == null) { + terminateTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getTerminateTime(), getParentForChildren(), isClean()); + terminateTime_ = null; + } + return terminateTimeBuilder_; + } + + private int updateType_ = 0; + + /** + * + * + *
            +         * Output only. The type of the most recent update to this (project,
            +         * model_version) subscription, as performed by the most recent
            +         * UpdateProject call. `UPDATE_TYPE_UNSPECIFIED` indicates this
            +         * model_version was not touched by the most recent UpdateProject (its
            +         * `effective_tpm_threshold` reflects an earlier update). The
            +         * whole-relationship `update_type` on the enclosing
            +         * ConfigurableBillingStatus continues to summarize the direction of
            +         * the most recent update across all surfaces in the project (QPM,
            +         * IndexingCore, and Agent Search TPM together).
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus.UpdateType update_type = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for updateType. + */ + @java.lang.Override + public int getUpdateTypeValue() { + return updateType_; + } + + /** + * + * + *
            +         * Output only. The type of the most recent update to this (project,
            +         * model_version) subscription, as performed by the most recent
            +         * UpdateProject call. `UPDATE_TYPE_UNSPECIFIED` indicates this
            +         * model_version was not touched by the most recent UpdateProject (its
            +         * `effective_tpm_threshold` reflects an earlier update). The
            +         * whole-relationship `update_type` on the enclosing
            +         * ConfigurableBillingStatus continues to summarize the direction of
            +         * the most recent update across all surfaces in the project (QPM,
            +         * IndexingCore, and Agent Search TPM together).
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus.UpdateType update_type = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The enum numeric value on the wire for updateType to set. + * @return This builder for chaining. + */ + public Builder setUpdateTypeValue(int value) { + updateType_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
            +         * Output only. The type of the most recent update to this (project,
            +         * model_version) subscription, as performed by the most recent
            +         * UpdateProject call. `UPDATE_TYPE_UNSPECIFIED` indicates this
            +         * model_version was not touched by the most recent UpdateProject (its
            +         * `effective_tpm_threshold` reflects an earlier update). The
            +         * whole-relationship `update_type` on the enclosing
            +         * ConfigurableBillingStatus continues to summarize the direction of
            +         * the most recent update across all surfaces in the project (QPM,
            +         * IndexingCore, and Agent Search TPM together).
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus.UpdateType update_type = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateType. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus.UpdateType + getUpdateType() { + com.google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus.UpdateType + result = + com.google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus + .UpdateType.forNumber(updateType_); + return result == null + ? com.google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus.UpdateType + .UNRECOGNIZED + : result; + } + + /** + * + * + *
            +         * Output only. The type of the most recent update to this (project,
            +         * model_version) subscription, as performed by the most recent
            +         * UpdateProject call. `UPDATE_TYPE_UNSPECIFIED` indicates this
            +         * model_version was not touched by the most recent UpdateProject (its
            +         * `effective_tpm_threshold` reflects an earlier update). The
            +         * whole-relationship `update_type` on the enclosing
            +         * ConfigurableBillingStatus continues to summarize the direction of
            +         * the most recent update across all surfaces in the project (QPM,
            +         * IndexingCore, and Agent Search TPM together).
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus.UpdateType update_type = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The updateType to set. + * @return This builder for chaining. + */ + public Builder setUpdateType( + com.google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus.UpdateType + value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000020; + updateType_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
            +         * Output only. The type of the most recent update to this (project,
            +         * model_version) subscription, as performed by the most recent
            +         * UpdateProject call. `UPDATE_TYPE_UNSPECIFIED` indicates this
            +         * model_version was not touched by the most recent UpdateProject (its
            +         * `effective_tpm_threshold` reflects an earlier update). The
            +         * whole-relationship `update_type` on the enclosing
            +         * ConfigurableBillingStatus continues to summarize the direction of
            +         * the most recent update across all surfaces in the project (QPM,
            +         * IndexingCore, and Agent Search TPM together).
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus.UpdateType update_type = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearUpdateType() { + bitField0_ = (bitField0_ & ~0x00000020); + updateType_ = 0; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus.AgentSearchTokenSubscriptionStatus) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus.AgentSearchTokenSubscriptionStatus) + private static final com.google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus + .AgentSearchTokenSubscriptionStatus + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus + .AgentSearchTokenSubscriptionStatus(); + } + + public static com.google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus + .AgentSearchTokenSubscriptionStatus + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AgentSearchTokenSubscriptionStatus parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus + .AgentSearchTokenSubscriptionStatus + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int bitField0_; + public static final int EFFECTIVE_SEARCH_QPM_THRESHOLD_FIELD_NUMBER = 1; + private long effectiveSearchQpmThreshold_ = 0L; + + /** + * + * + *
            +     * Optional. The currently effective Search QPM threshold in queries per
            +     * minute. This is the threshold against which QPM usage is compared for
            +     * overage calculations.
            +     * 
            + * + * int64 effective_search_qpm_threshold = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The effectiveSearchQpmThreshold. + */ + @java.lang.Override + public long getEffectiveSearchQpmThreshold() { + return effectiveSearchQpmThreshold_; + } + + public static final int EFFECTIVE_INDEXING_CORE_THRESHOLD_FIELD_NUMBER = 2; + private long effectiveIndexingCoreThreshold_ = 0L; + + /** + * + * + *
            +     * Optional. The currently effective Indexing Core threshold.
            +     * This is the threshold against which Indexing Core usage is compared
            +     * for overage calculations.
            +     * 
            + * + * int64 effective_indexing_core_threshold = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The effectiveIndexingCoreThreshold. + */ + @java.lang.Override + public long getEffectiveIndexingCoreThreshold() { + return effectiveIndexingCoreThreshold_; + } + + public static final int START_TIME_FIELD_NUMBER = 3; + private com.google.protobuf.Timestamp startTime_; + + /** + * + * + *
            +     * Optional. The start time of the currently active billing subscription.
            +     * 
            + * + * .google.protobuf.Timestamp start_time = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the startTime field is set. + */ + @java.lang.Override + public boolean hasStartTime() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
            +     * Optional. The start time of the currently active billing subscription.
            +     * 
            + * + * .google.protobuf.Timestamp start_time = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The startTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getStartTime() { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } + + /** + * + * + *
            +     * Optional. The start time of the currently active billing subscription.
            +     * 
            + * + * .google.protobuf.Timestamp start_time = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } + + public static final int TERMINATE_TIME_FIELD_NUMBER = 4; + private com.google.protobuf.Timestamp terminateTime_; + + /** + * + * + *
            +     * Output only. The latest terminate effective time of search qpm and
            +     * indexing core subscriptions.
            +     * 
            + * + * + * .google.protobuf.Timestamp terminate_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the terminateTime field is set. + */ + @java.lang.Override + public boolean hasTerminateTime() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
            +     * Output only. The latest terminate effective time of search qpm and
            +     * indexing core subscriptions.
            +     * 
            + * + * + * .google.protobuf.Timestamp terminate_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The terminateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getTerminateTime() { + return terminateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : terminateTime_; + } + + /** + * + * + *
            +     * Output only. The latest terminate effective time of search qpm and
            +     * indexing core subscriptions.
            +     * 
            + * + * + * .google.protobuf.Timestamp terminate_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getTerminateTimeOrBuilder() { + return terminateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : terminateTime_; + } + + public static final int SEARCH_QPM_THRESHOLD_NEXT_UPDATE_TIME_FIELD_NUMBER = 5; + private com.google.protobuf.Timestamp searchQpmThresholdNextUpdateTime_; + + /** + * + * + *
            +     * Output only. The earliest next update time for the search QPM
            +     * subscription threshold. This is based on the next_update_time returned by
            +     * the underlying Cloud Billing Subscription V3 API. This field is populated
            +     * only if an update QPM subscription threshold request is succeeded.
            +     * 
            + * + * + * .google.protobuf.Timestamp search_qpm_threshold_next_update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the searchQpmThresholdNextUpdateTime field is set. + */ + @java.lang.Override + public boolean hasSearchQpmThresholdNextUpdateTime() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
            +     * Output only. The earliest next update time for the search QPM
            +     * subscription threshold. This is based on the next_update_time returned by
            +     * the underlying Cloud Billing Subscription V3 API. This field is populated
            +     * only if an update QPM subscription threshold request is succeeded.
            +     * 
            + * + * + * .google.protobuf.Timestamp search_qpm_threshold_next_update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The searchQpmThresholdNextUpdateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getSearchQpmThresholdNextUpdateTime() { + return searchQpmThresholdNextUpdateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : searchQpmThresholdNextUpdateTime_; + } + + /** + * + * + *
            +     * Output only. The earliest next update time for the search QPM
            +     * subscription threshold. This is based on the next_update_time returned by
            +     * the underlying Cloud Billing Subscription V3 API. This field is populated
            +     * only if an update QPM subscription threshold request is succeeded.
            +     * 
            + * + * + * .google.protobuf.Timestamp search_qpm_threshold_next_update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getSearchQpmThresholdNextUpdateTimeOrBuilder() { + return searchQpmThresholdNextUpdateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : searchQpmThresholdNextUpdateTime_; + } + + public static final int INDEXING_CORE_THRESHOLD_NEXT_UPDATE_TIME_FIELD_NUMBER = 6; + private com.google.protobuf.Timestamp indexingCoreThresholdNextUpdateTime_; + + /** + * + * + *
            +     * Output only. The earliest next update time for the indexing core
            +     * subscription threshold. This is based on the next_update_time returned by
            +     * the underlying Cloud Billing Subscription V3 API. This field is populated
            +     * only if an update indexing core subscription threshold
            +     * request is succeeded.
            +     * 
            + * + * + * .google.protobuf.Timestamp indexing_core_threshold_next_update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the indexingCoreThresholdNextUpdateTime field is set. + */ + @java.lang.Override + public boolean hasIndexingCoreThresholdNextUpdateTime() { + return ((bitField0_ & 0x00000008) != 0); + } + + /** + * + * + *
            +     * Output only. The earliest next update time for the indexing core
            +     * subscription threshold. This is based on the next_update_time returned by
            +     * the underlying Cloud Billing Subscription V3 API. This field is populated
            +     * only if an update indexing core subscription threshold
            +     * request is succeeded.
            +     * 
            + * + * + * .google.protobuf.Timestamp indexing_core_threshold_next_update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The indexingCoreThresholdNextUpdateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getIndexingCoreThresholdNextUpdateTime() { + return indexingCoreThresholdNextUpdateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : indexingCoreThresholdNextUpdateTime_; + } + + /** + * + * + *
            +     * Output only. The earliest next update time for the indexing core
            +     * subscription threshold. This is based on the next_update_time returned by
            +     * the underlying Cloud Billing Subscription V3 API. This field is populated
            +     * only if an update indexing core subscription threshold
            +     * request is succeeded.
            +     * 
            + * + * + * .google.protobuf.Timestamp indexing_core_threshold_next_update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder + getIndexingCoreThresholdNextUpdateTimeOrBuilder() { + return indexingCoreThresholdNextUpdateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : indexingCoreThresholdNextUpdateTime_; + } + + public static final int UPDATE_TYPE_FIELD_NUMBER = 7; + private int updateType_ = 0; + + /** + * + * + *
            +     * Output only. The type of update performed in this operation.
            +     * This field is populated in the response of UpdateProject.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus.UpdateType update_type = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for updateType. + */ + @java.lang.Override + public int getUpdateTypeValue() { + return updateType_; + } + + /** + * + * + *
            +     * Output only. The type of update performed in this operation.
            +     * This field is populated in the response of UpdateProject.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus.UpdateType update_type = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateType. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus.UpdateType + getUpdateType() { + com.google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus.UpdateType result = + com.google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus.UpdateType + .forNumber(updateType_); + return result == null + ? com.google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus.UpdateType + .UNRECOGNIZED + : result; + } + + public static final int AGENT_SEARCH_TOKEN_SUBSCRIPTION_STATUSES_FIELD_NUMBER = 8; + + @SuppressWarnings("serial") + private java.util.List< + com.google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus + .AgentSearchTokenSubscriptionStatus> + agentSearchTokenSubscriptionStatuses_; + + /** + * + * + *
            +     * Output only. Per-model Agent Search TPM subscription status.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus.AgentSearchTokenSubscriptionStatus agent_search_token_subscription_statuses = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.List< + com.google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus + .AgentSearchTokenSubscriptionStatus> + getAgentSearchTokenSubscriptionStatusesList() { + return agentSearchTokenSubscriptionStatuses_; + } + + /** + * + * + *
            +     * Output only. Per-model Agent Search TPM subscription status.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus.AgentSearchTokenSubscriptionStatus agent_search_token_subscription_statuses = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.List< + ? extends + com.google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus + .AgentSearchTokenSubscriptionStatusOrBuilder> + getAgentSearchTokenSubscriptionStatusesOrBuilderList() { + return agentSearchTokenSubscriptionStatuses_; + } + + /** + * + * + *
            +     * Output only. Per-model Agent Search TPM subscription status.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus.AgentSearchTokenSubscriptionStatus agent_search_token_subscription_statuses = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public int getAgentSearchTokenSubscriptionStatusesCount() { + return agentSearchTokenSubscriptionStatuses_.size(); + } + + /** + * + * + *
            +     * Output only. Per-model Agent Search TPM subscription status.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus.AgentSearchTokenSubscriptionStatus agent_search_token_subscription_statuses = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus + .AgentSearchTokenSubscriptionStatus + getAgentSearchTokenSubscriptionStatuses(int index) { + return agentSearchTokenSubscriptionStatuses_.get(index); + } + + /** + * + * + *
            +     * Output only. Per-model Agent Search TPM subscription status.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus.AgentSearchTokenSubscriptionStatus agent_search_token_subscription_statuses = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus + .AgentSearchTokenSubscriptionStatusOrBuilder + getAgentSearchTokenSubscriptionStatusesOrBuilder(int index) { + return agentSearchTokenSubscriptionStatuses_.get(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 (effectiveSearchQpmThreshold_ != 0L) { + output.writeInt64(1, effectiveSearchQpmThreshold_); + } + if (effectiveIndexingCoreThreshold_ != 0L) { + output.writeInt64(2, effectiveIndexingCoreThreshold_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(3, getStartTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(4, getTerminateTime()); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeMessage(5, getSearchQpmThresholdNextUpdateTime()); + } + if (((bitField0_ & 0x00000008) != 0)) { + output.writeMessage(6, getIndexingCoreThresholdNextUpdateTime()); + } + if (updateType_ + != com.google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus.UpdateType + .UPDATE_TYPE_UNSPECIFIED + .getNumber()) { + output.writeEnum(7, updateType_); + } + for (int i = 0; i < agentSearchTokenSubscriptionStatuses_.size(); i++) { + output.writeMessage(8, agentSearchTokenSubscriptionStatuses_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (effectiveSearchQpmThreshold_ != 0L) { + size += + com.google.protobuf.CodedOutputStream.computeInt64Size(1, effectiveSearchQpmThreshold_); + } + if (effectiveIndexingCoreThreshold_ != 0L) { + size += + com.google.protobuf.CodedOutputStream.computeInt64Size( + 2, effectiveIndexingCoreThreshold_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getStartTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getTerminateTime()); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 5, getSearchQpmThresholdNextUpdateTime()); + } + if (((bitField0_ & 0x00000008) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 6, getIndexingCoreThresholdNextUpdateTime()); + } + if (updateType_ + != com.google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus.UpdateType + .UPDATE_TYPE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(7, updateType_); + } + for (int i = 0; i < agentSearchTokenSubscriptionStatuses_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 8, agentSearchTokenSubscriptionStatuses_.get(i)); + } + 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.discoveryengine.v1beta.Project.ConfigurableBillingStatus)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus other = + (com.google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus) obj; + + if (getEffectiveSearchQpmThreshold() != other.getEffectiveSearchQpmThreshold()) return false; + if (getEffectiveIndexingCoreThreshold() != other.getEffectiveIndexingCoreThreshold()) + return false; + if (hasStartTime() != other.hasStartTime()) return false; + if (hasStartTime()) { + if (!getStartTime().equals(other.getStartTime())) return false; + } + if (hasTerminateTime() != other.hasTerminateTime()) return false; + if (hasTerminateTime()) { + if (!getTerminateTime().equals(other.getTerminateTime())) return false; + } + if (hasSearchQpmThresholdNextUpdateTime() != other.hasSearchQpmThresholdNextUpdateTime()) + return false; + if (hasSearchQpmThresholdNextUpdateTime()) { + if (!getSearchQpmThresholdNextUpdateTime() + .equals(other.getSearchQpmThresholdNextUpdateTime())) return false; + } + if (hasIndexingCoreThresholdNextUpdateTime() + != other.hasIndexingCoreThresholdNextUpdateTime()) return false; + if (hasIndexingCoreThresholdNextUpdateTime()) { + if (!getIndexingCoreThresholdNextUpdateTime() + .equals(other.getIndexingCoreThresholdNextUpdateTime())) return false; + } + if (updateType_ != other.updateType_) return false; + if (!getAgentSearchTokenSubscriptionStatusesList() + .equals(other.getAgentSearchTokenSubscriptionStatusesList())) 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) + EFFECTIVE_SEARCH_QPM_THRESHOLD_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getEffectiveSearchQpmThreshold()); + hash = (37 * hash) + EFFECTIVE_INDEXING_CORE_THRESHOLD_FIELD_NUMBER; + hash = + (53 * hash) + com.google.protobuf.Internal.hashLong(getEffectiveIndexingCoreThreshold()); + if (hasStartTime()) { + hash = (37 * hash) + START_TIME_FIELD_NUMBER; + hash = (53 * hash) + getStartTime().hashCode(); + } + if (hasTerminateTime()) { + hash = (37 * hash) + TERMINATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getTerminateTime().hashCode(); + } + if (hasSearchQpmThresholdNextUpdateTime()) { + hash = (37 * hash) + SEARCH_QPM_THRESHOLD_NEXT_UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getSearchQpmThresholdNextUpdateTime().hashCode(); + } + if (hasIndexingCoreThresholdNextUpdateTime()) { + hash = (37 * hash) + INDEXING_CORE_THRESHOLD_NEXT_UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getIndexingCoreThresholdNextUpdateTime().hashCode(); + } + hash = (37 * hash) + UPDATE_TYPE_FIELD_NUMBER; + hash = (53 * hash) + updateType_; + if (getAgentSearchTokenSubscriptionStatusesCount() > 0) { + hash = (37 * hash) + AGENT_SEARCH_TOKEN_SUBSCRIPTION_STATUSES_FIELD_NUMBER; + hash = (53 * hash) + getAgentSearchTokenSubscriptionStatusesList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus + 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.discoveryengine.v1beta.Project.ConfigurableBillingStatus + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus + 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.discoveryengine.v1beta.Project.ConfigurableBillingStatus + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus + 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.discoveryengine.v1beta.Project.ConfigurableBillingStatus + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus + 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.discoveryengine.v1beta.Project.ConfigurableBillingStatus + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus + 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.discoveryengine.v1beta.Project.ConfigurableBillingStatus 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; + } + + /** + * + * + *
            +     * Represents the currently effective configurable billing parameters.
            +     * These values are derived from the customer's subscription history stored
            +     * internally and reflect the thresholds actively being used for billing
            +     * purposes at the time of the GetProject call. This includes the start_time
            +     * of the subscription and may differ from the values in
            +     * `customer_provided_config` due to billing rules
            +     * (e.g., scale-downs taking effect only at the start of a new month).
            +     * We also include the update type to indicate the type of update performed on
            +     * the configurable billing configuration in the UpdateProject operation.
            +     * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus) + com.google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatusOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.ProjectProto + .internal_static_google_cloud_discoveryengine_v1beta_Project_ConfigurableBillingStatus_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.ProjectProto + .internal_static_google_cloud_discoveryengine_v1beta_Project_ConfigurableBillingStatus_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus.class, + com.google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus.Builder + .class); + } + + // Construct using + // com.google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetStartTimeFieldBuilder(); + internalGetTerminateTimeFieldBuilder(); + internalGetSearchQpmThresholdNextUpdateTimeFieldBuilder(); + internalGetIndexingCoreThresholdNextUpdateTimeFieldBuilder(); + internalGetAgentSearchTokenSubscriptionStatusesFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + effectiveSearchQpmThreshold_ = 0L; + effectiveIndexingCoreThreshold_ = 0L; + startTime_ = null; + if (startTimeBuilder_ != null) { + startTimeBuilder_.dispose(); + startTimeBuilder_ = null; + } + terminateTime_ = null; + if (terminateTimeBuilder_ != null) { + terminateTimeBuilder_.dispose(); + terminateTimeBuilder_ = null; + } + searchQpmThresholdNextUpdateTime_ = null; + if (searchQpmThresholdNextUpdateTimeBuilder_ != null) { + searchQpmThresholdNextUpdateTimeBuilder_.dispose(); + searchQpmThresholdNextUpdateTimeBuilder_ = null; + } + indexingCoreThresholdNextUpdateTime_ = null; + if (indexingCoreThresholdNextUpdateTimeBuilder_ != null) { + indexingCoreThresholdNextUpdateTimeBuilder_.dispose(); + indexingCoreThresholdNextUpdateTimeBuilder_ = null; + } + updateType_ = 0; + if (agentSearchTokenSubscriptionStatusesBuilder_ == null) { + agentSearchTokenSubscriptionStatuses_ = java.util.Collections.emptyList(); + } else { + agentSearchTokenSubscriptionStatuses_ = null; + agentSearchTokenSubscriptionStatusesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000080); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1beta.ProjectProto + .internal_static_google_cloud_discoveryengine_v1beta_Project_ConfigurableBillingStatus_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus build() { + com.google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus + buildPartial() { + com.google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus result = + new com.google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus result) { + if (agentSearchTokenSubscriptionStatusesBuilder_ == null) { + if (((bitField0_ & 0x00000080) != 0)) { + agentSearchTokenSubscriptionStatuses_ = + java.util.Collections.unmodifiableList(agentSearchTokenSubscriptionStatuses_); + bitField0_ = (bitField0_ & ~0x00000080); + } + result.agentSearchTokenSubscriptionStatuses_ = agentSearchTokenSubscriptionStatuses_; + } else { + result.agentSearchTokenSubscriptionStatuses_ = + agentSearchTokenSubscriptionStatusesBuilder_.build(); + } + } + + private void buildPartial0( + com.google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.effectiveSearchQpmThreshold_ = effectiveSearchQpmThreshold_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.effectiveIndexingCoreThreshold_ = effectiveIndexingCoreThreshold_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.startTime_ = startTimeBuilder_ == null ? startTime_ : startTimeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.terminateTime_ = + terminateTimeBuilder_ == null ? terminateTime_ : terminateTimeBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.searchQpmThresholdNextUpdateTime_ = + searchQpmThresholdNextUpdateTimeBuilder_ == null + ? searchQpmThresholdNextUpdateTime_ + : searchQpmThresholdNextUpdateTimeBuilder_.build(); + to_bitField0_ |= 0x00000004; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.indexingCoreThresholdNextUpdateTime_ = + indexingCoreThresholdNextUpdateTimeBuilder_ == null + ? indexingCoreThresholdNextUpdateTime_ + : indexingCoreThresholdNextUpdateTimeBuilder_.build(); + to_bitField0_ |= 0x00000008; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.updateType_ = updateType_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus) { + return mergeFrom( + (com.google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus other) { + if (other + == com.google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus + .getDefaultInstance()) return this; + if (other.getEffectiveSearchQpmThreshold() != 0L) { + setEffectiveSearchQpmThreshold(other.getEffectiveSearchQpmThreshold()); + } + if (other.getEffectiveIndexingCoreThreshold() != 0L) { + setEffectiveIndexingCoreThreshold(other.getEffectiveIndexingCoreThreshold()); + } + if (other.hasStartTime()) { + mergeStartTime(other.getStartTime()); + } + if (other.hasTerminateTime()) { + mergeTerminateTime(other.getTerminateTime()); + } + if (other.hasSearchQpmThresholdNextUpdateTime()) { + mergeSearchQpmThresholdNextUpdateTime(other.getSearchQpmThresholdNextUpdateTime()); + } + if (other.hasIndexingCoreThresholdNextUpdateTime()) { + mergeIndexingCoreThresholdNextUpdateTime(other.getIndexingCoreThresholdNextUpdateTime()); + } + if (other.updateType_ != 0) { + setUpdateTypeValue(other.getUpdateTypeValue()); + } + if (agentSearchTokenSubscriptionStatusesBuilder_ == null) { + if (!other.agentSearchTokenSubscriptionStatuses_.isEmpty()) { + if (agentSearchTokenSubscriptionStatuses_.isEmpty()) { + agentSearchTokenSubscriptionStatuses_ = other.agentSearchTokenSubscriptionStatuses_; + bitField0_ = (bitField0_ & ~0x00000080); + } else { + ensureAgentSearchTokenSubscriptionStatusesIsMutable(); + agentSearchTokenSubscriptionStatuses_.addAll( + other.agentSearchTokenSubscriptionStatuses_); + } + onChanged(); + } + } else { + if (!other.agentSearchTokenSubscriptionStatuses_.isEmpty()) { + if (agentSearchTokenSubscriptionStatusesBuilder_.isEmpty()) { + agentSearchTokenSubscriptionStatusesBuilder_.dispose(); + agentSearchTokenSubscriptionStatusesBuilder_ = null; + agentSearchTokenSubscriptionStatuses_ = other.agentSearchTokenSubscriptionStatuses_; + bitField0_ = (bitField0_ & ~0x00000080); + agentSearchTokenSubscriptionStatusesBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetAgentSearchTokenSubscriptionStatusesFieldBuilder() + : null; + } else { + agentSearchTokenSubscriptionStatusesBuilder_.addAllMessages( + other.agentSearchTokenSubscriptionStatuses_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + effectiveSearchQpmThreshold_ = input.readInt64(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 16: + { + effectiveIndexingCoreThreshold_ = input.readInt64(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: + { + input.readMessage( + internalGetStartTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + input.readMessage( + internalGetTerminateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + input.readMessage( + internalGetSearchQpmThresholdNextUpdateTimeFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 50: + { + input.readMessage( + internalGetIndexingCoreThresholdNextUpdateTimeFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 50 + case 56: + { + updateType_ = input.readEnum(); + bitField0_ |= 0x00000040; + break; + } // case 56 + case 66: + { + com.google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus + .AgentSearchTokenSubscriptionStatus + m = + input.readMessage( + com.google.cloud.discoveryengine.v1beta.Project + .ConfigurableBillingStatus.AgentSearchTokenSubscriptionStatus + .parser(), + extensionRegistry); + if (agentSearchTokenSubscriptionStatusesBuilder_ == null) { + ensureAgentSearchTokenSubscriptionStatusesIsMutable(); + agentSearchTokenSubscriptionStatuses_.add(m); + } else { + agentSearchTokenSubscriptionStatusesBuilder_.addMessage(m); + } + break; + } // case 66 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private long effectiveSearchQpmThreshold_; + + /** + * + * + *
            +       * Optional. The currently effective Search QPM threshold in queries per
            +       * minute. This is the threshold against which QPM usage is compared for
            +       * overage calculations.
            +       * 
            + * + * int64 effective_search_qpm_threshold = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The effectiveSearchQpmThreshold. + */ + @java.lang.Override + public long getEffectiveSearchQpmThreshold() { + return effectiveSearchQpmThreshold_; + } + + /** + * + * + *
            +       * Optional. The currently effective Search QPM threshold in queries per
            +       * minute. This is the threshold against which QPM usage is compared for
            +       * overage calculations.
            +       * 
            + * + * int64 effective_search_qpm_threshold = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The effectiveSearchQpmThreshold to set. + * @return This builder for chaining. + */ + public Builder setEffectiveSearchQpmThreshold(long value) { + + effectiveSearchQpmThreshold_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
            +       * Optional. The currently effective Search QPM threshold in queries per
            +       * minute. This is the threshold against which QPM usage is compared for
            +       * overage calculations.
            +       * 
            + * + * int64 effective_search_qpm_threshold = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearEffectiveSearchQpmThreshold() { + bitField0_ = (bitField0_ & ~0x00000001); + effectiveSearchQpmThreshold_ = 0L; + onChanged(); + return this; + } + + private long effectiveIndexingCoreThreshold_; + + /** + * + * + *
            +       * Optional. The currently effective Indexing Core threshold.
            +       * This is the threshold against which Indexing Core usage is compared
            +       * for overage calculations.
            +       * 
            + * + * + * int64 effective_indexing_core_threshold = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The effectiveIndexingCoreThreshold. + */ + @java.lang.Override + public long getEffectiveIndexingCoreThreshold() { + return effectiveIndexingCoreThreshold_; + } + + /** + * + * + *
            +       * Optional. The currently effective Indexing Core threshold.
            +       * This is the threshold against which Indexing Core usage is compared
            +       * for overage calculations.
            +       * 
            + * + * + * int64 effective_indexing_core_threshold = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The effectiveIndexingCoreThreshold to set. + * @return This builder for chaining. + */ + public Builder setEffectiveIndexingCoreThreshold(long value) { + + effectiveIndexingCoreThreshold_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
            +       * Optional. The currently effective Indexing Core threshold.
            +       * This is the threshold against which Indexing Core usage is compared
            +       * for overage calculations.
            +       * 
            + * + * + * int64 effective_indexing_core_threshold = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearEffectiveIndexingCoreThreshold() { + bitField0_ = (bitField0_ & ~0x00000002); + effectiveIndexingCoreThreshold_ = 0L; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp startTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + startTimeBuilder_; + + /** + * + * + *
            +       * Optional. The start time of the currently active billing subscription.
            +       * 
            + * + * .google.protobuf.Timestamp start_time = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the startTime field is set. + */ + public boolean hasStartTime() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
            +       * Optional. The start time of the currently active billing subscription.
            +       * 
            + * + * .google.protobuf.Timestamp start_time = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The startTime. + */ + public com.google.protobuf.Timestamp getStartTime() { + if (startTimeBuilder_ == null) { + return startTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : startTime_; + } else { + return startTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
            +       * Optional. The start time of the currently active billing subscription.
            +       * 
            + * + * .google.protobuf.Timestamp start_time = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setStartTime(com.google.protobuf.Timestamp value) { + if (startTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + startTime_ = value; + } else { + startTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
            +       * Optional. The start time of the currently active billing subscription.
            +       * 
            + * + * .google.protobuf.Timestamp start_time = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setStartTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (startTimeBuilder_ == null) { + startTime_ = builderForValue.build(); + } else { + startTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
            +       * Optional. The start time of the currently active billing subscription.
            +       * 
            + * + * .google.protobuf.Timestamp start_time = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeStartTime(com.google.protobuf.Timestamp value) { + if (startTimeBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && startTime_ != null + && startTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getStartTimeBuilder().mergeFrom(value); + } else { + startTime_ = value; + } + } else { + startTimeBuilder_.mergeFrom(value); + } + if (startTime_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + + /** + * + * + *
            +       * Optional. The start time of the currently active billing subscription.
            +       * 
            + * + * .google.protobuf.Timestamp start_time = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearStartTime() { + bitField0_ = (bitField0_ & ~0x00000004); + startTime_ = null; + if (startTimeBuilder_ != null) { + startTimeBuilder_.dispose(); + startTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
            +       * Optional. The start time of the currently active billing subscription.
            +       * 
            + * + * .google.protobuf.Timestamp start_time = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.Timestamp.Builder getStartTimeBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return internalGetStartTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
            +       * Optional. The start time of the currently active billing subscription.
            +       * 
            + * + * .google.protobuf.Timestamp start_time = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { + if (startTimeBuilder_ != null) { + return startTimeBuilder_.getMessageOrBuilder(); + } else { + return startTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : startTime_; + } + } + + /** + * + * + *
            +       * Optional. The start time of the currently active billing subscription.
            +       * 
            + * + * .google.protobuf.Timestamp start_time = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + internalGetStartTimeFieldBuilder() { + if (startTimeBuilder_ == null) { + startTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getStartTime(), getParentForChildren(), isClean()); + startTime_ = null; + } + return startTimeBuilder_; + } + + private com.google.protobuf.Timestamp terminateTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + terminateTimeBuilder_; + + /** + * + * + *
            +       * Output only. The latest terminate effective time of search qpm and
            +       * indexing core subscriptions.
            +       * 
            + * + * + * .google.protobuf.Timestamp terminate_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the terminateTime field is set. + */ + public boolean hasTerminateTime() { + return ((bitField0_ & 0x00000008) != 0); + } + + /** + * + * + *
            +       * Output only. The latest terminate effective time of search qpm and
            +       * indexing core subscriptions.
            +       * 
            + * + * + * .google.protobuf.Timestamp terminate_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The terminateTime. + */ + public com.google.protobuf.Timestamp getTerminateTime() { + if (terminateTimeBuilder_ == null) { + return terminateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : terminateTime_; + } else { + return terminateTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
            +       * Output only. The latest terminate effective time of search qpm and
            +       * indexing core subscriptions.
            +       * 
            + * + * + * .google.protobuf.Timestamp terminate_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setTerminateTime(com.google.protobuf.Timestamp value) { + if (terminateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + terminateTime_ = value; + } else { + terminateTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
            +       * Output only. The latest terminate effective time of search qpm and
            +       * indexing core subscriptions.
            +       * 
            + * + * + * .google.protobuf.Timestamp terminate_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setTerminateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (terminateTimeBuilder_ == null) { + terminateTime_ = builderForValue.build(); + } else { + terminateTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
            +       * Output only. The latest terminate effective time of search qpm and
            +       * indexing core subscriptions.
            +       * 
            + * + * + * .google.protobuf.Timestamp terminate_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeTerminateTime(com.google.protobuf.Timestamp value) { + if (terminateTimeBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) + && terminateTime_ != null + && terminateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getTerminateTimeBuilder().mergeFrom(value); + } else { + terminateTime_ = value; + } + } else { + terminateTimeBuilder_.mergeFrom(value); + } + if (terminateTime_ != null) { + bitField0_ |= 0x00000008; + onChanged(); + } + return this; + } + + /** + * + * + *
            +       * Output only. The latest terminate effective time of search qpm and
            +       * indexing core subscriptions.
            +       * 
            + * + * + * .google.protobuf.Timestamp terminate_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearTerminateTime() { + bitField0_ = (bitField0_ & ~0x00000008); + terminateTime_ = null; + if (terminateTimeBuilder_ != null) { + terminateTimeBuilder_.dispose(); + terminateTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
            +       * Output only. The latest terminate effective time of search qpm and
            +       * indexing core subscriptions.
            +       * 
            + * + * + * .google.protobuf.Timestamp terminate_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getTerminateTimeBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return internalGetTerminateTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
            +       * Output only. The latest terminate effective time of search qpm and
            +       * indexing core subscriptions.
            +       * 
            + * + * + * .google.protobuf.Timestamp terminate_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getTerminateTimeOrBuilder() { + if (terminateTimeBuilder_ != null) { + return terminateTimeBuilder_.getMessageOrBuilder(); + } else { + return terminateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : terminateTime_; + } + } + + /** + * + * + *
            +       * Output only. The latest terminate effective time of search qpm and
            +       * indexing core subscriptions.
            +       * 
            + * + * + * .google.protobuf.Timestamp terminate_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + internalGetTerminateTimeFieldBuilder() { + if (terminateTimeBuilder_ == null) { + terminateTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getTerminateTime(), getParentForChildren(), isClean()); + terminateTime_ = null; + } + return terminateTimeBuilder_; + } + + private com.google.protobuf.Timestamp searchQpmThresholdNextUpdateTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + searchQpmThresholdNextUpdateTimeBuilder_; + + /** + * + * + *
            +       * Output only. The earliest next update time for the search QPM
            +       * subscription threshold. This is based on the next_update_time returned by
            +       * the underlying Cloud Billing Subscription V3 API. This field is populated
            +       * only if an update QPM subscription threshold request is succeeded.
            +       * 
            + * + * + * .google.protobuf.Timestamp search_qpm_threshold_next_update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the searchQpmThresholdNextUpdateTime field is set. + */ + public boolean hasSearchQpmThresholdNextUpdateTime() { + return ((bitField0_ & 0x00000010) != 0); + } + + /** + * + * + *
            +       * Output only. The earliest next update time for the search QPM
            +       * subscription threshold. This is based on the next_update_time returned by
            +       * the underlying Cloud Billing Subscription V3 API. This field is populated
            +       * only if an update QPM subscription threshold request is succeeded.
            +       * 
            + * + * + * .google.protobuf.Timestamp search_qpm_threshold_next_update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The searchQpmThresholdNextUpdateTime. + */ + public com.google.protobuf.Timestamp getSearchQpmThresholdNextUpdateTime() { + if (searchQpmThresholdNextUpdateTimeBuilder_ == null) { + return searchQpmThresholdNextUpdateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : searchQpmThresholdNextUpdateTime_; + } else { + return searchQpmThresholdNextUpdateTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
            +       * Output only. The earliest next update time for the search QPM
            +       * subscription threshold. This is based on the next_update_time returned by
            +       * the underlying Cloud Billing Subscription V3 API. This field is populated
            +       * only if an update QPM subscription threshold request is succeeded.
            +       * 
            + * + * + * .google.protobuf.Timestamp search_qpm_threshold_next_update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setSearchQpmThresholdNextUpdateTime(com.google.protobuf.Timestamp value) { + if (searchQpmThresholdNextUpdateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + searchQpmThresholdNextUpdateTime_ = value; + } else { + searchQpmThresholdNextUpdateTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
            +       * Output only. The earliest next update time for the search QPM
            +       * subscription threshold. This is based on the next_update_time returned by
            +       * the underlying Cloud Billing Subscription V3 API. This field is populated
            +       * only if an update QPM subscription threshold request is succeeded.
            +       * 
            + * + * + * .google.protobuf.Timestamp search_qpm_threshold_next_update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setSearchQpmThresholdNextUpdateTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (searchQpmThresholdNextUpdateTimeBuilder_ == null) { + searchQpmThresholdNextUpdateTime_ = builderForValue.build(); + } else { + searchQpmThresholdNextUpdateTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
            +       * Output only. The earliest next update time for the search QPM
            +       * subscription threshold. This is based on the next_update_time returned by
            +       * the underlying Cloud Billing Subscription V3 API. This field is populated
            +       * only if an update QPM subscription threshold request is succeeded.
            +       * 
            + * + * + * .google.protobuf.Timestamp search_qpm_threshold_next_update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeSearchQpmThresholdNextUpdateTime(com.google.protobuf.Timestamp value) { + if (searchQpmThresholdNextUpdateTimeBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) + && searchQpmThresholdNextUpdateTime_ != null + && searchQpmThresholdNextUpdateTime_ + != com.google.protobuf.Timestamp.getDefaultInstance()) { + getSearchQpmThresholdNextUpdateTimeBuilder().mergeFrom(value); + } else { + searchQpmThresholdNextUpdateTime_ = value; + } + } else { + searchQpmThresholdNextUpdateTimeBuilder_.mergeFrom(value); + } + if (searchQpmThresholdNextUpdateTime_ != null) { + bitField0_ |= 0x00000010; + onChanged(); + } + return this; + } + + /** + * + * + *
            +       * Output only. The earliest next update time for the search QPM
            +       * subscription threshold. This is based on the next_update_time returned by
            +       * the underlying Cloud Billing Subscription V3 API. This field is populated
            +       * only if an update QPM subscription threshold request is succeeded.
            +       * 
            + * + * + * .google.protobuf.Timestamp search_qpm_threshold_next_update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearSearchQpmThresholdNextUpdateTime() { + bitField0_ = (bitField0_ & ~0x00000010); + searchQpmThresholdNextUpdateTime_ = null; + if (searchQpmThresholdNextUpdateTimeBuilder_ != null) { + searchQpmThresholdNextUpdateTimeBuilder_.dispose(); + searchQpmThresholdNextUpdateTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
            +       * Output only. The earliest next update time for the search QPM
            +       * subscription threshold. This is based on the next_update_time returned by
            +       * the underlying Cloud Billing Subscription V3 API. This field is populated
            +       * only if an update QPM subscription threshold request is succeeded.
            +       * 
            + * + * + * .google.protobuf.Timestamp search_qpm_threshold_next_update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getSearchQpmThresholdNextUpdateTimeBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return internalGetSearchQpmThresholdNextUpdateTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
            +       * Output only. The earliest next update time for the search QPM
            +       * subscription threshold. This is based on the next_update_time returned by
            +       * the underlying Cloud Billing Subscription V3 API. This field is populated
            +       * only if an update QPM subscription threshold request is succeeded.
            +       * 
            + * + * + * .google.protobuf.Timestamp search_qpm_threshold_next_update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getSearchQpmThresholdNextUpdateTimeOrBuilder() { + if (searchQpmThresholdNextUpdateTimeBuilder_ != null) { + return searchQpmThresholdNextUpdateTimeBuilder_.getMessageOrBuilder(); + } else { + return searchQpmThresholdNextUpdateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : searchQpmThresholdNextUpdateTime_; + } + } + + /** + * + * + *
            +       * Output only. The earliest next update time for the search QPM
            +       * subscription threshold. This is based on the next_update_time returned by
            +       * the underlying Cloud Billing Subscription V3 API. This field is populated
            +       * only if an update QPM subscription threshold request is succeeded.
            +       * 
            + * + * + * .google.protobuf.Timestamp search_qpm_threshold_next_update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + internalGetSearchQpmThresholdNextUpdateTimeFieldBuilder() { + if (searchQpmThresholdNextUpdateTimeBuilder_ == null) { + searchQpmThresholdNextUpdateTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getSearchQpmThresholdNextUpdateTime(), getParentForChildren(), isClean()); + searchQpmThresholdNextUpdateTime_ = null; + } + return searchQpmThresholdNextUpdateTimeBuilder_; + } + + private com.google.protobuf.Timestamp indexingCoreThresholdNextUpdateTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + indexingCoreThresholdNextUpdateTimeBuilder_; + + /** + * + * + *
            +       * Output only. The earliest next update time for the indexing core
            +       * subscription threshold. This is based on the next_update_time returned by
            +       * the underlying Cloud Billing Subscription V3 API. This field is populated
            +       * only if an update indexing core subscription threshold
            +       * request is succeeded.
            +       * 
            + * + * + * .google.protobuf.Timestamp indexing_core_threshold_next_update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the indexingCoreThresholdNextUpdateTime field is set. + */ + public boolean hasIndexingCoreThresholdNextUpdateTime() { + return ((bitField0_ & 0x00000020) != 0); + } + + /** + * + * + *
            +       * Output only. The earliest next update time for the indexing core
            +       * subscription threshold. This is based on the next_update_time returned by
            +       * the underlying Cloud Billing Subscription V3 API. This field is populated
            +       * only if an update indexing core subscription threshold
            +       * request is succeeded.
            +       * 
            + * + * + * .google.protobuf.Timestamp indexing_core_threshold_next_update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The indexingCoreThresholdNextUpdateTime. + */ + public com.google.protobuf.Timestamp getIndexingCoreThresholdNextUpdateTime() { + if (indexingCoreThresholdNextUpdateTimeBuilder_ == null) { + return indexingCoreThresholdNextUpdateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : indexingCoreThresholdNextUpdateTime_; + } else { + return indexingCoreThresholdNextUpdateTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
            +       * Output only. The earliest next update time for the indexing core
            +       * subscription threshold. This is based on the next_update_time returned by
            +       * the underlying Cloud Billing Subscription V3 API. This field is populated
            +       * only if an update indexing core subscription threshold
            +       * request is succeeded.
            +       * 
            + * + * + * .google.protobuf.Timestamp indexing_core_threshold_next_update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setIndexingCoreThresholdNextUpdateTime(com.google.protobuf.Timestamp value) { + if (indexingCoreThresholdNextUpdateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + indexingCoreThresholdNextUpdateTime_ = value; + } else { + indexingCoreThresholdNextUpdateTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
            +       * Output only. The earliest next update time for the indexing core
            +       * subscription threshold. This is based on the next_update_time returned by
            +       * the underlying Cloud Billing Subscription V3 API. This field is populated
            +       * only if an update indexing core subscription threshold
            +       * request is succeeded.
            +       * 
            + * + * + * .google.protobuf.Timestamp indexing_core_threshold_next_update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setIndexingCoreThresholdNextUpdateTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (indexingCoreThresholdNextUpdateTimeBuilder_ == null) { + indexingCoreThresholdNextUpdateTime_ = builderForValue.build(); + } else { + indexingCoreThresholdNextUpdateTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
            +       * Output only. The earliest next update time for the indexing core
            +       * subscription threshold. This is based on the next_update_time returned by
            +       * the underlying Cloud Billing Subscription V3 API. This field is populated
            +       * only if an update indexing core subscription threshold
            +       * request is succeeded.
            +       * 
            + * + * + * .google.protobuf.Timestamp indexing_core_threshold_next_update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeIndexingCoreThresholdNextUpdateTime(com.google.protobuf.Timestamp value) { + if (indexingCoreThresholdNextUpdateTimeBuilder_ == null) { + if (((bitField0_ & 0x00000020) != 0) + && indexingCoreThresholdNextUpdateTime_ != null + && indexingCoreThresholdNextUpdateTime_ + != com.google.protobuf.Timestamp.getDefaultInstance()) { + getIndexingCoreThresholdNextUpdateTimeBuilder().mergeFrom(value); + } else { + indexingCoreThresholdNextUpdateTime_ = value; + } + } else { + indexingCoreThresholdNextUpdateTimeBuilder_.mergeFrom(value); + } + if (indexingCoreThresholdNextUpdateTime_ != null) { + bitField0_ |= 0x00000020; + onChanged(); + } + return this; + } + + /** + * + * + *
            +       * Output only. The earliest next update time for the indexing core
            +       * subscription threshold. This is based on the next_update_time returned by
            +       * the underlying Cloud Billing Subscription V3 API. This field is populated
            +       * only if an update indexing core subscription threshold
            +       * request is succeeded.
            +       * 
            + * + * + * .google.protobuf.Timestamp indexing_core_threshold_next_update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearIndexingCoreThresholdNextUpdateTime() { + bitField0_ = (bitField0_ & ~0x00000020); + indexingCoreThresholdNextUpdateTime_ = null; + if (indexingCoreThresholdNextUpdateTimeBuilder_ != null) { + indexingCoreThresholdNextUpdateTimeBuilder_.dispose(); + indexingCoreThresholdNextUpdateTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
            +       * Output only. The earliest next update time for the indexing core
            +       * subscription threshold. This is based on the next_update_time returned by
            +       * the underlying Cloud Billing Subscription V3 API. This field is populated
            +       * only if an update indexing core subscription threshold
            +       * request is succeeded.
            +       * 
            + * + * + * .google.protobuf.Timestamp indexing_core_threshold_next_update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getIndexingCoreThresholdNextUpdateTimeBuilder() { + bitField0_ |= 0x00000020; + onChanged(); + return internalGetIndexingCoreThresholdNextUpdateTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
            +       * Output only. The earliest next update time for the indexing core
            +       * subscription threshold. This is based on the next_update_time returned by
            +       * the underlying Cloud Billing Subscription V3 API. This field is populated
            +       * only if an update indexing core subscription threshold
            +       * request is succeeded.
            +       * 
            + * + * + * .google.protobuf.Timestamp indexing_core_threshold_next_update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder + getIndexingCoreThresholdNextUpdateTimeOrBuilder() { + if (indexingCoreThresholdNextUpdateTimeBuilder_ != null) { + return indexingCoreThresholdNextUpdateTimeBuilder_.getMessageOrBuilder(); + } else { + return indexingCoreThresholdNextUpdateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : indexingCoreThresholdNextUpdateTime_; + } + } + + /** + * + * + *
            +       * Output only. The earliest next update time for the indexing core
            +       * subscription threshold. This is based on the next_update_time returned by
            +       * the underlying Cloud Billing Subscription V3 API. This field is populated
            +       * only if an update indexing core subscription threshold
            +       * request is succeeded.
            +       * 
            + * + * + * .google.protobuf.Timestamp indexing_core_threshold_next_update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + internalGetIndexingCoreThresholdNextUpdateTimeFieldBuilder() { + if (indexingCoreThresholdNextUpdateTimeBuilder_ == null) { + indexingCoreThresholdNextUpdateTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getIndexingCoreThresholdNextUpdateTime(), getParentForChildren(), isClean()); + indexingCoreThresholdNextUpdateTime_ = null; + } + return indexingCoreThresholdNextUpdateTimeBuilder_; + } + + private int updateType_ = 0; + + /** + * + * + *
            +       * Output only. The type of update performed in this operation.
            +       * This field is populated in the response of UpdateProject.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus.UpdateType update_type = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for updateType. + */ + @java.lang.Override + public int getUpdateTypeValue() { + return updateType_; + } + + /** + * + * + *
            +       * Output only. The type of update performed in this operation.
            +       * This field is populated in the response of UpdateProject.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus.UpdateType update_type = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The enum numeric value on the wire for updateType to set. + * @return This builder for chaining. + */ + public Builder setUpdateTypeValue(int value) { + updateType_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + /** + * + * + *
            +       * Output only. The type of update performed in this operation.
            +       * This field is populated in the response of UpdateProject.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus.UpdateType update_type = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateType. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus.UpdateType + getUpdateType() { + com.google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus.UpdateType + result = + com.google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus.UpdateType + .forNumber(updateType_); + return result == null + ? com.google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus.UpdateType + .UNRECOGNIZED + : result; + } + + /** + * + * + *
            +       * Output only. The type of update performed in this operation.
            +       * This field is populated in the response of UpdateProject.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus.UpdateType update_type = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The updateType to set. + * @return This builder for chaining. + */ + public Builder setUpdateType( + com.google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus.UpdateType + value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000040; + updateType_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
            +       * Output only. The type of update performed in this operation.
            +       * This field is populated in the response of UpdateProject.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus.UpdateType update_type = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearUpdateType() { + bitField0_ = (bitField0_ & ~0x00000040); + updateType_ = 0; + onChanged(); + return this; + } + + private java.util.List< + com.google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus + .AgentSearchTokenSubscriptionStatus> + agentSearchTokenSubscriptionStatuses_ = java.util.Collections.emptyList(); + + private void ensureAgentSearchTokenSubscriptionStatusesIsMutable() { + if (!((bitField0_ & 0x00000080) != 0)) { + agentSearchTokenSubscriptionStatuses_ = + new java.util.ArrayList< + com.google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus + .AgentSearchTokenSubscriptionStatus>(agentSearchTokenSubscriptionStatuses_); + bitField0_ |= 0x00000080; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus + .AgentSearchTokenSubscriptionStatus, + com.google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus + .AgentSearchTokenSubscriptionStatus.Builder, + com.google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus + .AgentSearchTokenSubscriptionStatusOrBuilder> + agentSearchTokenSubscriptionStatusesBuilder_; + + /** + * + * + *
            +       * Output only. Per-model Agent Search TPM subscription status.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus.AgentSearchTokenSubscriptionStatus agent_search_token_subscription_statuses = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List< + com.google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus + .AgentSearchTokenSubscriptionStatus> + getAgentSearchTokenSubscriptionStatusesList() { + if (agentSearchTokenSubscriptionStatusesBuilder_ == null) { + return java.util.Collections.unmodifiableList(agentSearchTokenSubscriptionStatuses_); + } else { + return agentSearchTokenSubscriptionStatusesBuilder_.getMessageList(); + } + } + + /** + * + * + *
            +       * Output only. Per-model Agent Search TPM subscription status.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus.AgentSearchTokenSubscriptionStatus agent_search_token_subscription_statuses = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public int getAgentSearchTokenSubscriptionStatusesCount() { + if (agentSearchTokenSubscriptionStatusesBuilder_ == null) { + return agentSearchTokenSubscriptionStatuses_.size(); + } else { + return agentSearchTokenSubscriptionStatusesBuilder_.getCount(); + } + } + + /** + * + * + *
            +       * Output only. Per-model Agent Search TPM subscription status.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus.AgentSearchTokenSubscriptionStatus agent_search_token_subscription_statuses = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus + .AgentSearchTokenSubscriptionStatus + getAgentSearchTokenSubscriptionStatuses(int index) { + if (agentSearchTokenSubscriptionStatusesBuilder_ == null) { + return agentSearchTokenSubscriptionStatuses_.get(index); + } else { + return agentSearchTokenSubscriptionStatusesBuilder_.getMessage(index); + } + } + + /** + * + * + *
            +       * Output only. Per-model Agent Search TPM subscription status.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus.AgentSearchTokenSubscriptionStatus agent_search_token_subscription_statuses = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setAgentSearchTokenSubscriptionStatuses( + int index, + com.google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus + .AgentSearchTokenSubscriptionStatus + value) { + if (agentSearchTokenSubscriptionStatusesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAgentSearchTokenSubscriptionStatusesIsMutable(); + agentSearchTokenSubscriptionStatuses_.set(index, value); + onChanged(); + } else { + agentSearchTokenSubscriptionStatusesBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
            +       * Output only. Per-model Agent Search TPM subscription status.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus.AgentSearchTokenSubscriptionStatus agent_search_token_subscription_statuses = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setAgentSearchTokenSubscriptionStatuses( + int index, + com.google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus + .AgentSearchTokenSubscriptionStatus.Builder + builderForValue) { + if (agentSearchTokenSubscriptionStatusesBuilder_ == null) { + ensureAgentSearchTokenSubscriptionStatusesIsMutable(); + agentSearchTokenSubscriptionStatuses_.set(index, builderForValue.build()); + onChanged(); + } else { + agentSearchTokenSubscriptionStatusesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
            +       * Output only. Per-model Agent Search TPM subscription status.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus.AgentSearchTokenSubscriptionStatus agent_search_token_subscription_statuses = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addAgentSearchTokenSubscriptionStatuses( + com.google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus + .AgentSearchTokenSubscriptionStatus + value) { + if (agentSearchTokenSubscriptionStatusesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAgentSearchTokenSubscriptionStatusesIsMutable(); + agentSearchTokenSubscriptionStatuses_.add(value); + onChanged(); + } else { + agentSearchTokenSubscriptionStatusesBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
            +       * Output only. Per-model Agent Search TPM subscription status.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus.AgentSearchTokenSubscriptionStatus agent_search_token_subscription_statuses = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addAgentSearchTokenSubscriptionStatuses( + int index, + com.google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus + .AgentSearchTokenSubscriptionStatus + value) { + if (agentSearchTokenSubscriptionStatusesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAgentSearchTokenSubscriptionStatusesIsMutable(); + agentSearchTokenSubscriptionStatuses_.add(index, value); + onChanged(); + } else { + agentSearchTokenSubscriptionStatusesBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
            +       * Output only. Per-model Agent Search TPM subscription status.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus.AgentSearchTokenSubscriptionStatus agent_search_token_subscription_statuses = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addAgentSearchTokenSubscriptionStatuses( + com.google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus + .AgentSearchTokenSubscriptionStatus.Builder + builderForValue) { + if (agentSearchTokenSubscriptionStatusesBuilder_ == null) { + ensureAgentSearchTokenSubscriptionStatusesIsMutable(); + agentSearchTokenSubscriptionStatuses_.add(builderForValue.build()); + onChanged(); + } else { + agentSearchTokenSubscriptionStatusesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
            +       * Output only. Per-model Agent Search TPM subscription status.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus.AgentSearchTokenSubscriptionStatus agent_search_token_subscription_statuses = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addAgentSearchTokenSubscriptionStatuses( + int index, + com.google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus + .AgentSearchTokenSubscriptionStatus.Builder + builderForValue) { + if (agentSearchTokenSubscriptionStatusesBuilder_ == null) { + ensureAgentSearchTokenSubscriptionStatusesIsMutable(); + agentSearchTokenSubscriptionStatuses_.add(index, builderForValue.build()); + onChanged(); + } else { + agentSearchTokenSubscriptionStatusesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
            +       * Output only. Per-model Agent Search TPM subscription status.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus.AgentSearchTokenSubscriptionStatus agent_search_token_subscription_statuses = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addAllAgentSearchTokenSubscriptionStatuses( + java.lang.Iterable< + ? extends + com.google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus + .AgentSearchTokenSubscriptionStatus> + values) { + if (agentSearchTokenSubscriptionStatusesBuilder_ == null) { + ensureAgentSearchTokenSubscriptionStatusesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, agentSearchTokenSubscriptionStatuses_); + onChanged(); + } else { + agentSearchTokenSubscriptionStatusesBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
            +       * Output only. Per-model Agent Search TPM subscription status.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus.AgentSearchTokenSubscriptionStatus agent_search_token_subscription_statuses = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearAgentSearchTokenSubscriptionStatuses() { + if (agentSearchTokenSubscriptionStatusesBuilder_ == null) { + agentSearchTokenSubscriptionStatuses_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000080); + onChanged(); + } else { + agentSearchTokenSubscriptionStatusesBuilder_.clear(); + } + return this; + } + + /** + * + * + *
            +       * Output only. Per-model Agent Search TPM subscription status.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus.AgentSearchTokenSubscriptionStatus agent_search_token_subscription_statuses = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder removeAgentSearchTokenSubscriptionStatuses(int index) { + if (agentSearchTokenSubscriptionStatusesBuilder_ == null) { + ensureAgentSearchTokenSubscriptionStatusesIsMutable(); + agentSearchTokenSubscriptionStatuses_.remove(index); + onChanged(); + } else { + agentSearchTokenSubscriptionStatusesBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
            +       * Output only. Per-model Agent Search TPM subscription status.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus.AgentSearchTokenSubscriptionStatus agent_search_token_subscription_statuses = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus + .AgentSearchTokenSubscriptionStatus.Builder + getAgentSearchTokenSubscriptionStatusesBuilder(int index) { + return internalGetAgentSearchTokenSubscriptionStatusesFieldBuilder().getBuilder(index); + } + + /** + * + * + *
            +       * Output only. Per-model Agent Search TPM subscription status.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus.AgentSearchTokenSubscriptionStatus agent_search_token_subscription_statuses = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus + .AgentSearchTokenSubscriptionStatusOrBuilder + getAgentSearchTokenSubscriptionStatusesOrBuilder(int index) { + if (agentSearchTokenSubscriptionStatusesBuilder_ == null) { + return agentSearchTokenSubscriptionStatuses_.get(index); + } else { + return agentSearchTokenSubscriptionStatusesBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
            +       * Output only. Per-model Agent Search TPM subscription status.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus.AgentSearchTokenSubscriptionStatus agent_search_token_subscription_statuses = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List< + ? extends + com.google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus + .AgentSearchTokenSubscriptionStatusOrBuilder> + getAgentSearchTokenSubscriptionStatusesOrBuilderList() { + if (agentSearchTokenSubscriptionStatusesBuilder_ != null) { + return agentSearchTokenSubscriptionStatusesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(agentSearchTokenSubscriptionStatuses_); + } + } + + /** + * + * + *
            +       * Output only. Per-model Agent Search TPM subscription status.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus.AgentSearchTokenSubscriptionStatus agent_search_token_subscription_statuses = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus + .AgentSearchTokenSubscriptionStatus.Builder + addAgentSearchTokenSubscriptionStatusesBuilder() { + return internalGetAgentSearchTokenSubscriptionStatusesFieldBuilder() + .addBuilder( + com.google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus + .AgentSearchTokenSubscriptionStatus.getDefaultInstance()); + } + + /** + * + * + *
            +       * Output only. Per-model Agent Search TPM subscription status.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus.AgentSearchTokenSubscriptionStatus agent_search_token_subscription_statuses = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus + .AgentSearchTokenSubscriptionStatus.Builder + addAgentSearchTokenSubscriptionStatusesBuilder(int index) { + return internalGetAgentSearchTokenSubscriptionStatusesFieldBuilder() + .addBuilder( + index, + com.google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus + .AgentSearchTokenSubscriptionStatus.getDefaultInstance()); + } + + /** + * + * + *
            +       * Output only. Per-model Agent Search TPM subscription status.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus.AgentSearchTokenSubscriptionStatus agent_search_token_subscription_statuses = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List< + com.google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus + .AgentSearchTokenSubscriptionStatus.Builder> + getAgentSearchTokenSubscriptionStatusesBuilderList() { + return internalGetAgentSearchTokenSubscriptionStatusesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus + .AgentSearchTokenSubscriptionStatus, + com.google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus + .AgentSearchTokenSubscriptionStatus.Builder, + com.google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus + .AgentSearchTokenSubscriptionStatusOrBuilder> + internalGetAgentSearchTokenSubscriptionStatusesFieldBuilder() { + if (agentSearchTokenSubscriptionStatusesBuilder_ == null) { + agentSearchTokenSubscriptionStatusesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus + .AgentSearchTokenSubscriptionStatus, + com.google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus + .AgentSearchTokenSubscriptionStatus.Builder, + com.google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus + .AgentSearchTokenSubscriptionStatusOrBuilder>( + agentSearchTokenSubscriptionStatuses_, + ((bitField0_ & 0x00000080) != 0), + getParentForChildren(), + isClean()); + agentSearchTokenSubscriptionStatuses_ = null; + } + return agentSearchTokenSubscriptionStatusesBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus) + private static final com.google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus(); + } + + public static com.google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ConfigurableBillingStatus parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int bitField0_; + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
            +   * Output only. Full resource name of the project, for example
            +   * `projects/{project}`.
            +   * Note that when making requests, project number and project id are both
            +   * acceptable, but the server will always respond in project number.
            +   * 
            + * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + 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(); + name_ = s; + return s; + } + } + + /** + * + * + *
            +   * Output only. Full resource name of the project, for example
            +   * `projects/{project}`.
            +   * Note that when making requests, project number and project id are both
            +   * acceptable, but the server will always respond in project number.
            +   * 
            + * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CREATE_TIME_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp createTime_; + + /** + * + * + *
            +   * Output only. The timestamp when this project is created.
            +   * 
            + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
            +   * Output only. The timestamp when this project is created.
            +   * 
            + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + /** + * + * + *
            +   * Output only. The timestamp when this project is created.
            +   * 
            + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + public static final int PROVISION_COMPLETION_TIME_FIELD_NUMBER = 3; + private com.google.protobuf.Timestamp provisionCompletionTime_; + + /** + * + * + *
            +   * Output only. The timestamp when this project is successfully provisioned.
            +   * Empty value means this project is still provisioning and is not ready for
            +   * use.
            +   * 
            + * + * + * .google.protobuf.Timestamp provision_completion_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the provisionCompletionTime field is set. + */ + @java.lang.Override + public boolean hasProvisionCompletionTime() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
            +   * Output only. The timestamp when this project is successfully provisioned.
            +   * Empty value means this project is still provisioning and is not ready for
            +   * use.
            +   * 
            + * + * + * .google.protobuf.Timestamp provision_completion_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The provisionCompletionTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getProvisionCompletionTime() { + return provisionCompletionTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : provisionCompletionTime_; + } + + /** + * + * + *
            +   * Output only. The timestamp when this project is successfully provisioned.
            +   * Empty value means this project is still provisioning and is not ready for
            +   * use.
            +   * 
            + * + * + * .google.protobuf.Timestamp provision_completion_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getProvisionCompletionTimeOrBuilder() { + return provisionCompletionTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : provisionCompletionTime_; + } + + public static final int SERVICE_TERMS_MAP_FIELD_NUMBER = 4; + + private static final class ServiceTermsMapDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, com.google.cloud.discoveryengine.v1beta.Project.ServiceTerms> + defaultEntry = + com.google.protobuf.MapEntry + . + newDefaultInstance( + com.google.cloud.discoveryengine.v1beta.ProjectProto + .internal_static_google_cloud_discoveryengine_v1beta_Project_ServiceTermsMapEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.MESSAGE, + com.google.cloud.discoveryengine.v1beta.Project.ServiceTerms + .getDefaultInstance()); + } + + @SuppressWarnings("serial") + private com.google.protobuf.MapField< + java.lang.String, com.google.cloud.discoveryengine.v1beta.Project.ServiceTerms> + serviceTermsMap_; + + private com.google.protobuf.MapField< + java.lang.String, com.google.cloud.discoveryengine.v1beta.Project.ServiceTerms> + internalGetServiceTermsMap() { + if (serviceTermsMap_ == null) { + return com.google.protobuf.MapField.emptyMapField( + ServiceTermsMapDefaultEntryHolder.defaultEntry); + } + return serviceTermsMap_; + } + + public int getServiceTermsMapCount() { + return internalGetServiceTermsMap().getMap().size(); + } + + /** + * + * + *
            +   * Output only. A map of terms of services. The key is the `id` of
            +   * [ServiceTerms][google.cloud.discoveryengine.v1beta.Project.ServiceTerms].
            +   * 
            + * + * + * map<string, .google.cloud.discoveryengine.v1beta.Project.ServiceTerms> service_terms_map = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public boolean containsServiceTermsMap(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetServiceTermsMap().getMap().containsKey(key); + } + + /** Use {@link #getServiceTermsMapMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map< + java.lang.String, com.google.cloud.discoveryengine.v1beta.Project.ServiceTerms> + getServiceTermsMap() { + return getServiceTermsMapMap(); + } + + /** + * + * + *
            +   * Output only. A map of terms of services. The key is the `id` of
            +   * [ServiceTerms][google.cloud.discoveryengine.v1beta.Project.ServiceTerms].
            +   * 
            + * + * + * map<string, .google.cloud.discoveryengine.v1beta.Project.ServiceTerms> service_terms_map = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.Map< + java.lang.String, com.google.cloud.discoveryengine.v1beta.Project.ServiceTerms> + getServiceTermsMapMap() { + return internalGetServiceTermsMap().getMap(); + } + + /** + * + * + *
            +   * Output only. A map of terms of services. The key is the `id` of
            +   * [ServiceTerms][google.cloud.discoveryengine.v1beta.Project.ServiceTerms].
            +   * 
            + * + * + * map<string, .google.cloud.discoveryengine.v1beta.Project.ServiceTerms> service_terms_map = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public /* nullable */ com.google.cloud.discoveryengine.v1beta.Project.ServiceTerms + getServiceTermsMapOrDefault( + java.lang.String key, + /* nullable */ + com.google.cloud.discoveryengine.v1beta.Project.ServiceTerms defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map + map = internalGetServiceTermsMap().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + + /** + * + * + *
            +   * Output only. A map of terms of services. The key is the `id` of
            +   * [ServiceTerms][google.cloud.discoveryengine.v1beta.Project.ServiceTerms].
            +   * 
            + * + * + * map<string, .google.cloud.discoveryengine.v1beta.Project.ServiceTerms> service_terms_map = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Project.ServiceTerms getServiceTermsMapOrThrow( + java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map + map = internalGetServiceTermsMap().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int CUSTOMER_PROVIDED_CONFIG_FIELD_NUMBER = 6; + private com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig + customerProvidedConfig_; + + /** + * + * + *
            +   * Optional. Customer provided configurations.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig customer_provided_config = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the customerProvidedConfig field is set. + */ + @java.lang.Override + public boolean hasCustomerProvidedConfig() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
            +   * Optional. Customer provided configurations.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig customer_provided_config = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The customerProvidedConfig. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig + getCustomerProvidedConfig() { + return customerProvidedConfig_ == null + ? com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig + .getDefaultInstance() + : customerProvidedConfig_; + } + + /** + * + * + *
            +   * Optional. Customer provided configurations.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig customer_provided_config = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfigOrBuilder + getCustomerProvidedConfigOrBuilder() { + return customerProvidedConfig_ == null + ? com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig + .getDefaultInstance() + : customerProvidedConfig_; + } + + public static final int CONFIGURABLE_BILLING_STATUS_FIELD_NUMBER = 10; + private com.google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus + configurableBillingStatus_; + + /** + * + * + *
            +   * Output only. The current status of the project's configurable billing.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus configurable_billing_status = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the configurableBillingStatus field is set. + */ + @java.lang.Override + public boolean hasConfigurableBillingStatus() { + return ((bitField0_ & 0x00000008) != 0); + } + + /** + * + * + *
            +   * Output only. The current status of the project's configurable billing.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus configurable_billing_status = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The configurableBillingStatus. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus + getConfigurableBillingStatus() { + return configurableBillingStatus_ == null + ? com.google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus + .getDefaultInstance() + : configurableBillingStatus_; + } + + /** + * + * + *
            +   * Output only. The current status of the project's configurable billing.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus configurable_billing_status = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatusOrBuilder + getConfigurableBillingStatusOrBuilder() { + return configurableBillingStatus_ == null + ? com.google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus + .getDefaultInstance() + : configurableBillingStatus_; + } + + 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(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getCreateTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(3, getProvisionCompletionTime()); + } + com.google.protobuf.GeneratedMessage.serializeStringMapTo( + output, internalGetServiceTermsMap(), ServiceTermsMapDefaultEntryHolder.defaultEntry, 4); + if (((bitField0_ & 0x00000004) != 0)) { + output.writeMessage(6, getCustomerProvidedConfig()); + } + if (((bitField0_ & 0x00000008) != 0)) { + output.writeMessage(10, getConfigurableBillingStatus()); + } + 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(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getCreateTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(3, getProvisionCompletionTime()); + } + for (java.util.Map.Entry< + java.lang.String, com.google.cloud.discoveryengine.v1beta.Project.ServiceTerms> + entry : internalGetServiceTermsMap().getMap().entrySet()) { + com.google.protobuf.MapEntry< + java.lang.String, com.google.cloud.discoveryengine.v1beta.Project.ServiceTerms> + serviceTermsMap__ = + ServiceTermsMapDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, serviceTermsMap__); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(6, getCustomerProvidedConfig()); + } + if (((bitField0_ & 0x00000008) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 10, getConfigurableBillingStatus()); + } + 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.discoveryengine.v1beta.Project)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1beta.Project other = + (com.google.cloud.discoveryengine.v1beta.Project) obj; + + if (!getName().equals(other.getName())) return false; + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (hasProvisionCompletionTime() != other.hasProvisionCompletionTime()) return false; + if (hasProvisionCompletionTime()) { + if (!getProvisionCompletionTime().equals(other.getProvisionCompletionTime())) return false; + } + if (!internalGetServiceTermsMap().equals(other.internalGetServiceTermsMap())) return false; + if (hasCustomerProvidedConfig() != other.hasCustomerProvidedConfig()) return false; + if (hasCustomerProvidedConfig()) { + if (!getCustomerProvidedConfig().equals(other.getCustomerProvidedConfig())) return false; + } + if (hasConfigurableBillingStatus() != other.hasConfigurableBillingStatus()) return false; + if (hasConfigurableBillingStatus()) { + if (!getConfigurableBillingStatus().equals(other.getConfigurableBillingStatus())) + 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) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasProvisionCompletionTime()) { + hash = (37 * hash) + PROVISION_COMPLETION_TIME_FIELD_NUMBER; + hash = (53 * hash) + getProvisionCompletionTime().hashCode(); + } + if (!internalGetServiceTermsMap().getMap().isEmpty()) { + hash = (37 * hash) + SERVICE_TERMS_MAP_FIELD_NUMBER; + hash = (53 * hash) + internalGetServiceTermsMap().hashCode(); + } + if (hasCustomerProvidedConfig()) { + hash = (37 * hash) + CUSTOMER_PROVIDED_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getCustomerProvidedConfig().hashCode(); + } + if (hasConfigurableBillingStatus()) { + hash = (37 * hash) + CONFIGURABLE_BILLING_STATUS_FIELD_NUMBER; + hash = (53 * hash) + getConfigurableBillingStatus().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1beta.Project parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.Project 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.discoveryengine.v1beta.Project parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.Project 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.discoveryengine.v1beta.Project parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.Project parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1beta.Project parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.Project 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.discoveryengine.v1beta.Project parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.Project 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.discoveryengine.v1beta.Project parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.Project 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.discoveryengine.v1beta.Project 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; + } + + /** + * + * + *
            +   * Metadata and configurations for a Google Cloud project in the service.
            +   * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.Project} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.Project) + com.google.cloud.discoveryengine.v1beta.ProjectOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.ProjectProto + .internal_static_google_cloud_discoveryengine_v1beta_Project_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 4: + return internalGetServiceTermsMap(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( + int number) { + switch (number) { + case 4: + return internalGetMutableServiceTermsMap(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.ProjectProto + .internal_static_google_cloud_discoveryengine_v1beta_Project_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.Project.class, + com.google.cloud.discoveryengine.v1beta.Project.Builder.class); + } + + // Construct using com.google.cloud.discoveryengine.v1beta.Project.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetCreateTimeFieldBuilder(); + internalGetProvisionCompletionTimeFieldBuilder(); + internalGetCustomerProvidedConfigFieldBuilder(); + internalGetConfigurableBillingStatusFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + provisionCompletionTime_ = null; + if (provisionCompletionTimeBuilder_ != null) { + provisionCompletionTimeBuilder_.dispose(); + provisionCompletionTimeBuilder_ = null; + } + internalGetMutableServiceTermsMap().clear(); + customerProvidedConfig_ = null; + if (customerProvidedConfigBuilder_ != null) { + customerProvidedConfigBuilder_.dispose(); + customerProvidedConfigBuilder_ = null; + } + configurableBillingStatus_ = null; + if (configurableBillingStatusBuilder_ != null) { + configurableBillingStatusBuilder_.dispose(); + configurableBillingStatusBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1beta.ProjectProto + .internal_static_google_cloud_discoveryengine_v1beta_Project_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Project getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1beta.Project.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Project build() { + com.google.cloud.discoveryengine.v1beta.Project result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Project buildPartial() { + com.google.cloud.discoveryengine.v1beta.Project result = + new com.google.cloud.discoveryengine.v1beta.Project(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.discoveryengine.v1beta.Project result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.provisionCompletionTime_ = + provisionCompletionTimeBuilder_ == null + ? provisionCompletionTime_ + : provisionCompletionTimeBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.serviceTermsMap_ = + internalGetServiceTermsMap().build(ServiceTermsMapDefaultEntryHolder.defaultEntry); + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.customerProvidedConfig_ = + customerProvidedConfigBuilder_ == null + ? customerProvidedConfig_ + : customerProvidedConfigBuilder_.build(); + to_bitField0_ |= 0x00000004; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.configurableBillingStatus_ = + configurableBillingStatusBuilder_ == null + ? configurableBillingStatus_ + : configurableBillingStatusBuilder_.build(); + to_bitField0_ |= 0x00000008; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.discoveryengine.v1beta.Project) { + return mergeFrom((com.google.cloud.discoveryengine.v1beta.Project) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.discoveryengine.v1beta.Project other) { + if (other == com.google.cloud.discoveryengine.v1beta.Project.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasProvisionCompletionTime()) { + mergeProvisionCompletionTime(other.getProvisionCompletionTime()); + } + internalGetMutableServiceTermsMap().mergeFrom(other.internalGetServiceTermsMap()); + bitField0_ |= 0x00000008; + if (other.hasCustomerProvidedConfig()) { + mergeCustomerProvidedConfig(other.getCustomerProvidedConfig()); + } + if (other.hasConfigurableBillingStatus()) { + mergeConfigurableBillingStatus(other.getConfigurableBillingStatus()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage( + internalGetCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage( + internalGetProvisionCompletionTimeFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + com.google.protobuf.MapEntry< + java.lang.String, + com.google.cloud.discoveryengine.v1beta.Project.ServiceTerms> + serviceTermsMap__ = + input.readMessage( + ServiceTermsMapDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableServiceTermsMap() + .ensureBuilderMap() + .put(serviceTermsMap__.getKey(), serviceTermsMap__.getValue()); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 50: + { + input.readMessage( + internalGetCustomerProvidedConfigFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 50 + case 82: + { + input.readMessage( + internalGetConfigurableBillingStatusFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 82 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + + /** + * + * + *
            +     * Output only. Full resource name of the project, for example
            +     * `projects/{project}`.
            +     * Note that when making requests, project number and project id are both
            +     * acceptable, but the server will always respond in project number.
            +     * 
            + * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
            +     * Output only. Full resource name of the project, for example
            +     * `projects/{project}`.
            +     * Note that when making requests, project number and project id are both
            +     * acceptable, but the server will always respond in project number.
            +     * 
            + * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
            +     * Output only. Full resource name of the project, for example
            +     * `projects/{project}`.
            +     * Note that when making requests, project number and project id are both
            +     * acceptable, but the server will always respond in project number.
            +     * 
            + * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; } - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( - int number) { - switch (number) { - case 4: - return internalGetServiceTermsMap(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } + /** + * + * + *
            +     * Output only. Full resource name of the project, for example
            +     * `projects/{project}`.
            +     * Note that when making requests, project number and project id are both
            +     * acceptable, but the server will always respond in project number.
            +     * 
            + * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; } - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( - int number) { - switch (number) { - case 4: - return internalGetMutableServiceTermsMap(); - default: - throw new RuntimeException("Invalid map field number: " + number); + /** + * + * + *
            +     * Output only. Full resource name of the project, for example
            +     * `projects/{project}`.
            +     * Note that when making requests, project number and project id are both
            +     * acceptable, but the server will always respond in project number.
            +     * 
            + * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; } - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.discoveryengine.v1beta.ProjectProto - .internal_static_google_cloud_discoveryengine_v1beta_Project_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.discoveryengine.v1beta.Project.class, - com.google.cloud.discoveryengine.v1beta.Project.Builder.class); + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + + /** + * + * + *
            +     * Output only. The timestamp when this project is created.
            +     * 
            + * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000002) != 0); } - // Construct using com.google.cloud.discoveryengine.v1beta.Project.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); + /** + * + * + *
            +     * Output only. The timestamp when this project is created.
            +     * 
            + * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } } - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); + /** + * + * + *
            +     * Output only. The timestamp when this project is created.
            +     * 
            + * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + } else { + createTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - internalGetCreateTimeFieldBuilder(); - internalGetProvisionCompletionTimeFieldBuilder(); + /** + * + * + *
            +     * Output only. The timestamp when this project is created.
            +     * 
            + * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); } + bitField0_ |= 0x00000002; + onChanged(); + return this; } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - name_ = ""; + /** + * + * + *
            +     * Output only. The timestamp when this project is created.
            +     * 
            + * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && createTime_ != null + && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); + } + if (createTime_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** + * + * + *
            +     * Output only. The timestamp when this project is created.
            +     * 
            + * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000002); createTime_ = null; if (createTimeBuilder_ != null) { createTimeBuilder_.dispose(); createTimeBuilder_ = null; } - provisionCompletionTime_ = null; - if (provisionCompletionTimeBuilder_ != null) { - provisionCompletionTimeBuilder_.dispose(); - provisionCompletionTimeBuilder_ = null; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Output only. The timestamp when this project is created.
            +     * 
            + * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return internalGetCreateTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
            +     * Output only. The timestamp when this project is created.
            +     * 
            + * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; } - internalGetMutableServiceTermsMap().clear(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.discoveryengine.v1beta.ProjectProto - .internal_static_google_cloud_discoveryengine_v1beta_Project_descriptor; - } - - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.Project getDefaultInstanceForType() { - return com.google.cloud.discoveryengine.v1beta.Project.getDefaultInstance(); } - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.Project build() { - com.google.cloud.discoveryengine.v1beta.Project result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); + /** + * + * + *
            +     * Output only. The timestamp when this project is created.
            +     * 
            + * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + internalGetCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; } - return result; + return createTimeBuilder_; } - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.Project buildPartial() { - com.google.cloud.discoveryengine.v1beta.Project result = - new com.google.cloud.discoveryengine.v1beta.Project(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } + private com.google.protobuf.Timestamp provisionCompletionTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + provisionCompletionTimeBuilder_; - private void buildPartial0(com.google.cloud.discoveryengine.v1beta.Project result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.name_ = name_; - } - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000002) != 0)) { - result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.provisionCompletionTime_ = - provisionCompletionTimeBuilder_ == null - ? provisionCompletionTime_ - : provisionCompletionTimeBuilder_.build(); - to_bitField0_ |= 0x00000002; - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.serviceTermsMap_ = - internalGetServiceTermsMap().build(ServiceTermsMapDefaultEntryHolder.defaultEntry); - } - result.bitField0_ |= to_bitField0_; + /** + * + * + *
            +     * Output only. The timestamp when this project is successfully provisioned.
            +     * Empty value means this project is still provisioning and is not ready for
            +     * use.
            +     * 
            + * + * + * .google.protobuf.Timestamp provision_completion_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the provisionCompletionTime field is set. + */ + public boolean hasProvisionCompletionTime() { + return ((bitField0_ & 0x00000004) != 0); } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.discoveryengine.v1beta.Project) { - return mergeFrom((com.google.cloud.discoveryengine.v1beta.Project) other); + /** + * + * + *
            +     * Output only. The timestamp when this project is successfully provisioned.
            +     * Empty value means this project is still provisioning and is not ready for
            +     * use.
            +     * 
            + * + * + * .google.protobuf.Timestamp provision_completion_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The provisionCompletionTime. + */ + public com.google.protobuf.Timestamp getProvisionCompletionTime() { + if (provisionCompletionTimeBuilder_ == null) { + return provisionCompletionTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : provisionCompletionTime_; } else { - super.mergeFrom(other); - return this; + return provisionCompletionTimeBuilder_.getMessage(); } } - public Builder mergeFrom(com.google.cloud.discoveryengine.v1beta.Project other) { - if (other == com.google.cloud.discoveryengine.v1beta.Project.getDefaultInstance()) - return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (other.hasCreateTime()) { - mergeCreateTime(other.getCreateTime()); - } - if (other.hasProvisionCompletionTime()) { - mergeProvisionCompletionTime(other.getProvisionCompletionTime()); + /** + * + * + *
            +     * Output only. The timestamp when this project is successfully provisioned.
            +     * Empty value means this project is still provisioning and is not ready for
            +     * use.
            +     * 
            + * + * + * .google.protobuf.Timestamp provision_completion_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setProvisionCompletionTime(com.google.protobuf.Timestamp value) { + if (provisionCompletionTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + provisionCompletionTime_ = value; + } else { + provisionCompletionTimeBuilder_.setMessage(value); } - internalGetMutableServiceTermsMap().mergeFrom(other.internalGetServiceTermsMap()); - bitField0_ |= 0x00000008; - this.mergeUnknownFields(other.getUnknownFields()); + bitField0_ |= 0x00000004; onChanged(); return this; } - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - name_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: - { - input.readMessage( - internalGetCreateTimeFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 26: - { - input.readMessage( - internalGetProvisionCompletionTimeFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000004; - break; - } // case 26 - case 34: - { - com.google.protobuf.MapEntry< - java.lang.String, - com.google.cloud.discoveryengine.v1beta.Project.ServiceTerms> - serviceTermsMap__ = - input.readMessage( - ServiceTermsMapDefaultEntryHolder.defaultEntry.getParserForType(), - extensionRegistry); - internalGetMutableServiceTermsMap() - .ensureBuilderMap() - .put(serviceTermsMap__.getKey(), serviceTermsMap__.getValue()); - bitField0_ |= 0x00000008; - break; - } // case 34 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; - - private java.lang.Object name_ = ""; - /** * * *
            -     * Output only. Full resource name of the project, for example
            -     * `projects/{project}`.
            -     * Note that when making requests, project number and project id are both
            -     * acceptable, but the server will always respond in project number.
            +     * Output only. The timestamp when this project is successfully provisioned.
            +     * Empty value means this project is still provisioning and is not ready for
            +     * use.
                  * 
            * - * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The name. + * + * .google.protobuf.Timestamp provision_completion_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; + public Builder setProvisionCompletionTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (provisionCompletionTimeBuilder_ == null) { + provisionCompletionTime_ = builderForValue.build(); } else { - return (java.lang.String) ref; + provisionCompletionTimeBuilder_.setMessage(builderForValue.build()); } + bitField0_ |= 0x00000004; + onChanged(); + return this; } /** * * *
            -     * Output only. Full resource name of the project, for example
            -     * `projects/{project}`.
            -     * Note that when making requests, project number and project id are both
            -     * acceptable, but the server will always respond in project number.
            +     * Output only. The timestamp when this project is successfully provisioned.
            +     * Empty value means this project is still provisioning and is not ready for
            +     * use.
                  * 
            * - * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for name. + * + * .google.protobuf.Timestamp provision_completion_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ - public com.google.protobuf.ByteString getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - name_ = b; - return b; + public Builder mergeProvisionCompletionTime(com.google.protobuf.Timestamp value) { + if (provisionCompletionTimeBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && provisionCompletionTime_ != null + && provisionCompletionTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getProvisionCompletionTimeBuilder().mergeFrom(value); + } else { + provisionCompletionTime_ = value; + } } else { - return (com.google.protobuf.ByteString) ref; + provisionCompletionTimeBuilder_.mergeFrom(value); + } + if (provisionCompletionTime_ != null) { + bitField0_ |= 0x00000004; + onChanged(); } + return this; } /** * * *
            -     * Output only. Full resource name of the project, for example
            -     * `projects/{project}`.
            -     * Note that when making requests, project number and project id are both
            -     * acceptable, but the server will always respond in project number.
            +     * Output only. The timestamp when this project is successfully provisioned.
            +     * Empty value means this project is still provisioning and is not ready for
            +     * use.
                  * 
            * - * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The name to set. - * @return This builder for chaining. + * + * .google.protobuf.Timestamp provision_completion_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ - public Builder setName(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); + public Builder clearProvisionCompletionTime() { + bitField0_ = (bitField0_ & ~0x00000004); + provisionCompletionTime_ = null; + if (provisionCompletionTimeBuilder_ != null) { + provisionCompletionTimeBuilder_.dispose(); + provisionCompletionTimeBuilder_ = null; } - name_ = value; - bitField0_ |= 0x00000001; onChanged(); return this; } @@ -2899,170 +14522,244 @@ public Builder setName(java.lang.String value) { * * *
            -     * Output only. Full resource name of the project, for example
            -     * `projects/{project}`.
            -     * Note that when making requests, project number and project id are both
            -     * acceptable, but the server will always respond in project number.
            +     * Output only. The timestamp when this project is successfully provisioned.
            +     * Empty value means this project is still provisioning and is not ready for
            +     * use.
                  * 
            * - * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return This builder for chaining. + * + * .google.protobuf.Timestamp provision_completion_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ - public Builder clearName() { - name_ = getDefaultInstance().getName(); - bitField0_ = (bitField0_ & ~0x00000001); + public com.google.protobuf.Timestamp.Builder getProvisionCompletionTimeBuilder() { + bitField0_ |= 0x00000004; onChanged(); - return this; + return internalGetProvisionCompletionTimeFieldBuilder().getBuilder(); } /** * * *
            -     * Output only. Full resource name of the project, for example
            -     * `projects/{project}`.
            -     * Note that when making requests, project number and project id are both
            -     * acceptable, but the server will always respond in project number.
            +     * Output only. The timestamp when this project is successfully provisioned.
            +     * Empty value means this project is still provisioning and is not ready for
            +     * use.
                  * 
            * - * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The bytes for name to set. - * @return This builder for chaining. + * + * .google.protobuf.Timestamp provision_completion_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * */ - public Builder setNameBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); + public com.google.protobuf.TimestampOrBuilder getProvisionCompletionTimeOrBuilder() { + if (provisionCompletionTimeBuilder_ != null) { + return provisionCompletionTimeBuilder_.getMessageOrBuilder(); + } else { + return provisionCompletionTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : provisionCompletionTime_; } - checkByteStringIsUtf8(value); - name_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; } - private com.google.protobuf.Timestamp createTime_; - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - createTimeBuilder_; - /** * * *
            -     * Output only. The timestamp when this project is created.
            +     * Output only. The timestamp when this project is successfully provisioned.
            +     * Empty value means this project is still provisioning and is not ready for
            +     * use.
                  * 
            * * - * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * .google.protobuf.Timestamp provision_completion_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; * - * - * @return Whether the createTime field is set. */ - public boolean hasCreateTime() { - return ((bitField0_ & 0x00000002) != 0); + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + internalGetProvisionCompletionTimeFieldBuilder() { + if (provisionCompletionTimeBuilder_ == null) { + provisionCompletionTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getProvisionCompletionTime(), getParentForChildren(), isClean()); + provisionCompletionTime_ = null; + } + return provisionCompletionTimeBuilder_; + } + + private static final class ServiceTermsMapConverter + implements com.google.protobuf.MapFieldBuilder.Converter< + java.lang.String, + com.google.cloud.discoveryengine.v1beta.Project.ServiceTermsOrBuilder, + com.google.cloud.discoveryengine.v1beta.Project.ServiceTerms> { + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Project.ServiceTerms build( + com.google.cloud.discoveryengine.v1beta.Project.ServiceTermsOrBuilder val) { + if (val instanceof com.google.cloud.discoveryengine.v1beta.Project.ServiceTerms) { + return (com.google.cloud.discoveryengine.v1beta.Project.ServiceTerms) val; + } + return ((com.google.cloud.discoveryengine.v1beta.Project.ServiceTerms.Builder) val).build(); + } + + @java.lang.Override + public com.google.protobuf.MapEntry< + java.lang.String, com.google.cloud.discoveryengine.v1beta.Project.ServiceTerms> + defaultEntry() { + return ServiceTermsMapDefaultEntryHolder.defaultEntry; + } + } + ; + + private static final ServiceTermsMapConverter serviceTermsMapConverter = + new ServiceTermsMapConverter(); + + private com.google.protobuf.MapFieldBuilder< + java.lang.String, + com.google.cloud.discoveryengine.v1beta.Project.ServiceTermsOrBuilder, + com.google.cloud.discoveryengine.v1beta.Project.ServiceTerms, + com.google.cloud.discoveryengine.v1beta.Project.ServiceTerms.Builder> + serviceTermsMap_; + + private com.google.protobuf.MapFieldBuilder< + java.lang.String, + com.google.cloud.discoveryengine.v1beta.Project.ServiceTermsOrBuilder, + com.google.cloud.discoveryengine.v1beta.Project.ServiceTerms, + com.google.cloud.discoveryengine.v1beta.Project.ServiceTerms.Builder> + internalGetServiceTermsMap() { + if (serviceTermsMap_ == null) { + return new com.google.protobuf.MapFieldBuilder<>(serviceTermsMapConverter); + } + return serviceTermsMap_; + } + + private com.google.protobuf.MapFieldBuilder< + java.lang.String, + com.google.cloud.discoveryengine.v1beta.Project.ServiceTermsOrBuilder, + com.google.cloud.discoveryengine.v1beta.Project.ServiceTerms, + com.google.cloud.discoveryengine.v1beta.Project.ServiceTerms.Builder> + internalGetMutableServiceTermsMap() { + if (serviceTermsMap_ == null) { + serviceTermsMap_ = new com.google.protobuf.MapFieldBuilder<>(serviceTermsMapConverter); + } + bitField0_ |= 0x00000008; + onChanged(); + return serviceTermsMap_; + } + + public int getServiceTermsMapCount() { + return internalGetServiceTermsMap().ensureBuilderMap().size(); } /** * * *
            -     * Output only. The timestamp when this project is created.
            +     * Output only. A map of terms of services. The key is the `id` of
            +     * [ServiceTerms][google.cloud.discoveryengine.v1beta.Project.ServiceTerms].
                  * 
            * * - * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * map<string, .google.cloud.discoveryengine.v1beta.Project.ServiceTerms> service_terms_map = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; * - * - * @return The createTime. */ - public com.google.protobuf.Timestamp getCreateTime() { - if (createTimeBuilder_ == null) { - return createTime_ == null - ? com.google.protobuf.Timestamp.getDefaultInstance() - : createTime_; - } else { - return createTimeBuilder_.getMessage(); + @java.lang.Override + public boolean containsServiceTermsMap(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); } + return internalGetServiceTermsMap().ensureBuilderMap().containsKey(key); + } + + /** Use {@link #getServiceTermsMapMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map< + java.lang.String, com.google.cloud.discoveryengine.v1beta.Project.ServiceTerms> + getServiceTermsMap() { + return getServiceTermsMapMap(); } /** * * *
            -     * Output only. The timestamp when this project is created.
            +     * Output only. A map of terms of services. The key is the `id` of
            +     * [ServiceTerms][google.cloud.discoveryengine.v1beta.Project.ServiceTerms].
                  * 
            * * - * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * map<string, .google.cloud.discoveryengine.v1beta.Project.ServiceTerms> service_terms_map = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ - public Builder setCreateTime(com.google.protobuf.Timestamp value) { - if (createTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - createTime_ = value; - } else { - createTimeBuilder_.setMessage(value); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; + @java.lang.Override + public java.util.Map< + java.lang.String, com.google.cloud.discoveryengine.v1beta.Project.ServiceTerms> + getServiceTermsMapMap() { + return internalGetServiceTermsMap().getImmutableMap(); } /** * * *
            -     * Output only. The timestamp when this project is created.
            +     * Output only. A map of terms of services. The key is the `id` of
            +     * [ServiceTerms][google.cloud.discoveryengine.v1beta.Project.ServiceTerms].
                  * 
            * * - * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * map<string, .google.cloud.discoveryengine.v1beta.Project.ServiceTerms> service_terms_map = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ - public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { - if (createTimeBuilder_ == null) { - createTime_ = builderForValue.build(); - } else { - createTimeBuilder_.setMessage(builderForValue.build()); + @java.lang.Override + public /* nullable */ com.google.cloud.discoveryengine.v1beta.Project.ServiceTerms + getServiceTermsMapOrDefault( + java.lang.String key, + /* nullable */ + com.google.cloud.discoveryengine.v1beta.Project.ServiceTerms defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); } - bitField0_ |= 0x00000002; - onChanged(); - return this; + java.util.Map< + java.lang.String, + com.google.cloud.discoveryengine.v1beta.Project.ServiceTermsOrBuilder> + map = internalGetMutableServiceTermsMap().ensureBuilderMap(); + return map.containsKey(key) ? serviceTermsMapConverter.build(map.get(key)) : defaultValue; } /** * * *
            -     * Output only. The timestamp when this project is created.
            +     * Output only. A map of terms of services. The key is the `id` of
            +     * [ServiceTerms][google.cloud.discoveryengine.v1beta.Project.ServiceTerms].
                  * 
            * * - * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * map<string, .google.cloud.discoveryengine.v1beta.Project.ServiceTerms> service_terms_map = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ - public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { - if (createTimeBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0) - && createTime_ != null - && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { - getCreateTimeBuilder().mergeFrom(value); - } else { - createTime_ = value; - } - } else { - createTimeBuilder_.mergeFrom(value); + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Project.ServiceTerms getServiceTermsMapOrThrow( + java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); } - if (createTime_ != null) { - bitField0_ |= 0x00000002; - onChanged(); + java.util.Map< + java.lang.String, + com.google.cloud.discoveryengine.v1beta.Project.ServiceTermsOrBuilder> + map = internalGetMutableServiceTermsMap().ensureBuilderMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); } + return serviceTermsMapConverter.build(map.get(key)); + } + + public Builder clearServiceTermsMap() { + bitField0_ = (bitField0_ & ~0x00000008); + internalGetMutableServiceTermsMap().clear(); return this; } @@ -3070,138 +14767,162 @@ public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { * * *
            -     * Output only. The timestamp when this project is created.
            +     * Output only. A map of terms of services. The key is the `id` of
            +     * [ServiceTerms][google.cloud.discoveryengine.v1beta.Project.ServiceTerms].
                  * 
            * * - * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * map<string, .google.cloud.discoveryengine.v1beta.Project.ServiceTerms> service_terms_map = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ - public Builder clearCreateTime() { - bitField0_ = (bitField0_ & ~0x00000002); - createTime_ = null; - if (createTimeBuilder_ != null) { - createTimeBuilder_.dispose(); - createTimeBuilder_ = null; + public Builder removeServiceTermsMap(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); } - onChanged(); + internalGetMutableServiceTermsMap().ensureBuilderMap().remove(key); return this; } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map< + java.lang.String, com.google.cloud.discoveryengine.v1beta.Project.ServiceTerms> + getMutableServiceTermsMap() { + bitField0_ |= 0x00000008; + return internalGetMutableServiceTermsMap().ensureMessageMap(); + } + /** * * *
            -     * Output only. The timestamp when this project is created.
            +     * Output only. A map of terms of services. The key is the `id` of
            +     * [ServiceTerms][google.cloud.discoveryengine.v1beta.Project.ServiceTerms].
                  * 
            * * - * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * map<string, .google.cloud.discoveryengine.v1beta.Project.ServiceTerms> service_terms_map = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ - public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { - bitField0_ |= 0x00000002; - onChanged(); - return internalGetCreateTimeFieldBuilder().getBuilder(); + public Builder putServiceTermsMap( + java.lang.String key, com.google.cloud.discoveryengine.v1beta.Project.ServiceTerms value) { + if (key == null) { + throw new NullPointerException("map key"); + } + if (value == null) { + throw new NullPointerException("map value"); + } + internalGetMutableServiceTermsMap().ensureBuilderMap().put(key, value); + bitField0_ |= 0x00000008; + return this; } /** * * *
            -     * Output only. The timestamp when this project is created.
            +     * Output only. A map of terms of services. The key is the `id` of
            +     * [ServiceTerms][google.cloud.discoveryengine.v1beta.Project.ServiceTerms].
                  * 
            * * - * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * map<string, .google.cloud.discoveryengine.v1beta.Project.ServiceTerms> service_terms_map = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ - public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { - if (createTimeBuilder_ != null) { - return createTimeBuilder_.getMessageOrBuilder(); - } else { - return createTime_ == null - ? com.google.protobuf.Timestamp.getDefaultInstance() - : createTime_; + public Builder putAllServiceTermsMap( + java.util.Map< + java.lang.String, com.google.cloud.discoveryengine.v1beta.Project.ServiceTerms> + values) { + for (java.util.Map.Entry< + java.lang.String, com.google.cloud.discoveryengine.v1beta.Project.ServiceTerms> + e : values.entrySet()) { + if (e.getKey() == null || e.getValue() == null) { + throw new NullPointerException(); + } } + internalGetMutableServiceTermsMap().ensureBuilderMap().putAll(values); + bitField0_ |= 0x00000008; + return this; } /** * * *
            -     * Output only. The timestamp when this project is created.
            +     * Output only. A map of terms of services. The key is the `id` of
            +     * [ServiceTerms][google.cloud.discoveryengine.v1beta.Project.ServiceTerms].
                  * 
            * * - * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * map<string, .google.cloud.discoveryengine.v1beta.Project.ServiceTerms> service_terms_map = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - internalGetCreateTimeFieldBuilder() { - if (createTimeBuilder_ == null) { - createTimeBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder>( - getCreateTime(), getParentForChildren(), isClean()); - createTime_ = null; + public com.google.cloud.discoveryengine.v1beta.Project.ServiceTerms.Builder + putServiceTermsMapBuilderIfAbsent(java.lang.String key) { + java.util.Map< + java.lang.String, + com.google.cloud.discoveryengine.v1beta.Project.ServiceTermsOrBuilder> + builderMap = internalGetMutableServiceTermsMap().ensureBuilderMap(); + com.google.cloud.discoveryengine.v1beta.Project.ServiceTermsOrBuilder entry = + builderMap.get(key); + if (entry == null) { + entry = com.google.cloud.discoveryengine.v1beta.Project.ServiceTerms.newBuilder(); + builderMap.put(key, entry); } - return createTimeBuilder_; + if (entry instanceof com.google.cloud.discoveryengine.v1beta.Project.ServiceTerms) { + entry = ((com.google.cloud.discoveryengine.v1beta.Project.ServiceTerms) entry).toBuilder(); + builderMap.put(key, entry); + } + return (com.google.cloud.discoveryengine.v1beta.Project.ServiceTerms.Builder) entry; } - private com.google.protobuf.Timestamp provisionCompletionTime_; + private com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig + customerProvidedConfig_; private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - provisionCompletionTimeBuilder_; + com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig, + com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig.Builder, + com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfigOrBuilder> + customerProvidedConfigBuilder_; /** * * *
            -     * Output only. The timestamp when this project is successfully provisioned.
            -     * Empty value means this project is still provisioning and is not ready for
            -     * use.
            +     * Optional. Customer provided configurations.
                  * 
            * * - * .google.protobuf.Timestamp provision_completion_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * .google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig customer_provided_config = 6 [(.google.api.field_behavior) = OPTIONAL]; * * - * @return Whether the provisionCompletionTime field is set. + * @return Whether the customerProvidedConfig field is set. */ - public boolean hasProvisionCompletionTime() { - return ((bitField0_ & 0x00000004) != 0); + public boolean hasCustomerProvidedConfig() { + return ((bitField0_ & 0x00000010) != 0); } /** * * *
            -     * Output only. The timestamp when this project is successfully provisioned.
            -     * Empty value means this project is still provisioning and is not ready for
            -     * use.
            +     * Optional. Customer provided configurations.
                  * 
            * * - * .google.protobuf.Timestamp provision_completion_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * .google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig customer_provided_config = 6 [(.google.api.field_behavior) = OPTIONAL]; * * - * @return The provisionCompletionTime. + * @return The customerProvidedConfig. */ - public com.google.protobuf.Timestamp getProvisionCompletionTime() { - if (provisionCompletionTimeBuilder_ == null) { - return provisionCompletionTime_ == null - ? com.google.protobuf.Timestamp.getDefaultInstance() - : provisionCompletionTime_; + public com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig + getCustomerProvidedConfig() { + if (customerProvidedConfigBuilder_ == null) { + return customerProvidedConfig_ == null + ? com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig + .getDefaultInstance() + : customerProvidedConfig_; } else { - return provisionCompletionTimeBuilder_.getMessage(); + return customerProvidedConfigBuilder_.getMessage(); } } @@ -3209,25 +14930,24 @@ public com.google.protobuf.Timestamp getProvisionCompletionTime() { * * *
            -     * Output only. The timestamp when this project is successfully provisioned.
            -     * Empty value means this project is still provisioning and is not ready for
            -     * use.
            +     * Optional. Customer provided configurations.
                  * 
            * * - * .google.protobuf.Timestamp provision_completion_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * .google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig customer_provided_config = 6 [(.google.api.field_behavior) = OPTIONAL]; * */ - public Builder setProvisionCompletionTime(com.google.protobuf.Timestamp value) { - if (provisionCompletionTimeBuilder_ == null) { + public Builder setCustomerProvidedConfig( + com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig value) { + if (customerProvidedConfigBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - provisionCompletionTime_ = value; + customerProvidedConfig_ = value; } else { - provisionCompletionTimeBuilder_.setMessage(value); + customerProvidedConfigBuilder_.setMessage(value); } - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000010; onChanged(); return this; } @@ -3236,23 +14956,22 @@ public Builder setProvisionCompletionTime(com.google.protobuf.Timestamp value) { * * *
            -     * Output only. The timestamp when this project is successfully provisioned.
            -     * Empty value means this project is still provisioning and is not ready for
            -     * use.
            +     * Optional. Customer provided configurations.
                  * 
            * * - * .google.protobuf.Timestamp provision_completion_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * .google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig customer_provided_config = 6 [(.google.api.field_behavior) = OPTIONAL]; * */ - public Builder setProvisionCompletionTime( - com.google.protobuf.Timestamp.Builder builderForValue) { - if (provisionCompletionTimeBuilder_ == null) { - provisionCompletionTime_ = builderForValue.build(); + public Builder setCustomerProvidedConfig( + com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig.Builder + builderForValue) { + if (customerProvidedConfigBuilder_ == null) { + customerProvidedConfig_ = builderForValue.build(); } else { - provisionCompletionTimeBuilder_.setMessage(builderForValue.build()); + customerProvidedConfigBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000010; onChanged(); return this; } @@ -3261,29 +14980,30 @@ public Builder setProvisionCompletionTime( * * *
            -     * Output only. The timestamp when this project is successfully provisioned.
            -     * Empty value means this project is still provisioning and is not ready for
            -     * use.
            +     * Optional. Customer provided configurations.
                  * 
            * * - * .google.protobuf.Timestamp provision_completion_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * .google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig customer_provided_config = 6 [(.google.api.field_behavior) = OPTIONAL]; * */ - public Builder mergeProvisionCompletionTime(com.google.protobuf.Timestamp value) { - if (provisionCompletionTimeBuilder_ == null) { - if (((bitField0_ & 0x00000004) != 0) - && provisionCompletionTime_ != null - && provisionCompletionTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { - getProvisionCompletionTimeBuilder().mergeFrom(value); + public Builder mergeCustomerProvidedConfig( + com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig value) { + if (customerProvidedConfigBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) + && customerProvidedConfig_ != null + && customerProvidedConfig_ + != com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig + .getDefaultInstance()) { + getCustomerProvidedConfigBuilder().mergeFrom(value); } else { - provisionCompletionTime_ = value; + customerProvidedConfig_ = value; } } else { - provisionCompletionTimeBuilder_.mergeFrom(value); + customerProvidedConfigBuilder_.mergeFrom(value); } - if (provisionCompletionTime_ != null) { - bitField0_ |= 0x00000004; + if (customerProvidedConfig_ != null) { + bitField0_ |= 0x00000010; onChanged(); } return this; @@ -3293,21 +15013,19 @@ public Builder mergeProvisionCompletionTime(com.google.protobuf.Timestamp value) * * *
            -     * Output only. The timestamp when this project is successfully provisioned.
            -     * Empty value means this project is still provisioning and is not ready for
            -     * use.
            -     * 
            - * - * - * .google.protobuf.Timestamp provision_completion_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder clearProvisionCompletionTime() { - bitField0_ = (bitField0_ & ~0x00000004); - provisionCompletionTime_ = null; - if (provisionCompletionTimeBuilder_ != null) { - provisionCompletionTimeBuilder_.dispose(); - provisionCompletionTimeBuilder_ = null; + * Optional. Customer provided configurations. + * + * + * + * .google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig customer_provided_config = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearCustomerProvidedConfig() { + bitField0_ = (bitField0_ & ~0x00000010); + customerProvidedConfig_ = null; + if (customerProvidedConfigBuilder_ != null) { + customerProvidedConfigBuilder_.dispose(); + customerProvidedConfigBuilder_ = null; } onChanged(); return this; @@ -3317,41 +15035,40 @@ public Builder clearProvisionCompletionTime() { * * *
            -     * Output only. The timestamp when this project is successfully provisioned.
            -     * Empty value means this project is still provisioning and is not ready for
            -     * use.
            +     * Optional. Customer provided configurations.
                  * 
            * * - * .google.protobuf.Timestamp provision_completion_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * .google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig customer_provided_config = 6 [(.google.api.field_behavior) = OPTIONAL]; * */ - public com.google.protobuf.Timestamp.Builder getProvisionCompletionTimeBuilder() { - bitField0_ |= 0x00000004; + public com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig.Builder + getCustomerProvidedConfigBuilder() { + bitField0_ |= 0x00000010; onChanged(); - return internalGetProvisionCompletionTimeFieldBuilder().getBuilder(); + return internalGetCustomerProvidedConfigFieldBuilder().getBuilder(); } /** * * *
            -     * Output only. The timestamp when this project is successfully provisioned.
            -     * Empty value means this project is still provisioning and is not ready for
            -     * use.
            +     * Optional. Customer provided configurations.
                  * 
            * * - * .google.protobuf.Timestamp provision_completion_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * .google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig customer_provided_config = 6 [(.google.api.field_behavior) = OPTIONAL]; * */ - public com.google.protobuf.TimestampOrBuilder getProvisionCompletionTimeOrBuilder() { - if (provisionCompletionTimeBuilder_ != null) { - return provisionCompletionTimeBuilder_.getMessageOrBuilder(); + public com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfigOrBuilder + getCustomerProvidedConfigOrBuilder() { + if (customerProvidedConfigBuilder_ != null) { + return customerProvidedConfigBuilder_.getMessageOrBuilder(); } else { - return provisionCompletionTime_ == null - ? com.google.protobuf.Timestamp.getDefaultInstance() - : provisionCompletionTime_; + return customerProvidedConfig_ == null + ? com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig + .getDefaultInstance() + : customerProvidedConfig_; } } @@ -3359,202 +15076,160 @@ public com.google.protobuf.TimestampOrBuilder getProvisionCompletionTimeOrBuilde * * *
            -     * Output only. The timestamp when this project is successfully provisioned.
            -     * Empty value means this project is still provisioning and is not ready for
            -     * use.
            +     * Optional. Customer provided configurations.
                  * 
            * * - * .google.protobuf.Timestamp provision_completion_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * .google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig customer_provided_config = 6 [(.google.api.field_behavior) = OPTIONAL]; * */ private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - internalGetProvisionCompletionTimeFieldBuilder() { - if (provisionCompletionTimeBuilder_ == null) { - provisionCompletionTimeBuilder_ = + com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig, + com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig.Builder, + com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfigOrBuilder> + internalGetCustomerProvidedConfigFieldBuilder() { + if (customerProvidedConfigBuilder_ == null) { + customerProvidedConfigBuilder_ = new com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder>( - getProvisionCompletionTime(), getParentForChildren(), isClean()); - provisionCompletionTime_ = null; - } - return provisionCompletionTimeBuilder_; - } - - private static final class ServiceTermsMapConverter - implements com.google.protobuf.MapFieldBuilder.Converter< - java.lang.String, - com.google.cloud.discoveryengine.v1beta.Project.ServiceTermsOrBuilder, - com.google.cloud.discoveryengine.v1beta.Project.ServiceTerms> { - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.Project.ServiceTerms build( - com.google.cloud.discoveryengine.v1beta.Project.ServiceTermsOrBuilder val) { - if (val instanceof com.google.cloud.discoveryengine.v1beta.Project.ServiceTerms) { - return (com.google.cloud.discoveryengine.v1beta.Project.ServiceTerms) val; - } - return ((com.google.cloud.discoveryengine.v1beta.Project.ServiceTerms.Builder) val).build(); - } - - @java.lang.Override - public com.google.protobuf.MapEntry< - java.lang.String, com.google.cloud.discoveryengine.v1beta.Project.ServiceTerms> - defaultEntry() { - return ServiceTermsMapDefaultEntryHolder.defaultEntry; - } - } - ; - - private static final ServiceTermsMapConverter serviceTermsMapConverter = - new ServiceTermsMapConverter(); - - private com.google.protobuf.MapFieldBuilder< - java.lang.String, - com.google.cloud.discoveryengine.v1beta.Project.ServiceTermsOrBuilder, - com.google.cloud.discoveryengine.v1beta.Project.ServiceTerms, - com.google.cloud.discoveryengine.v1beta.Project.ServiceTerms.Builder> - serviceTermsMap_; - - private com.google.protobuf.MapFieldBuilder< - java.lang.String, - com.google.cloud.discoveryengine.v1beta.Project.ServiceTermsOrBuilder, - com.google.cloud.discoveryengine.v1beta.Project.ServiceTerms, - com.google.cloud.discoveryengine.v1beta.Project.ServiceTerms.Builder> - internalGetServiceTermsMap() { - if (serviceTermsMap_ == null) { - return new com.google.protobuf.MapFieldBuilder<>(serviceTermsMapConverter); + com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig, + com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig.Builder, + com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfigOrBuilder>( + getCustomerProvidedConfig(), getParentForChildren(), isClean()); + customerProvidedConfig_ = null; } - return serviceTermsMap_; + return customerProvidedConfigBuilder_; } - private com.google.protobuf.MapFieldBuilder< - java.lang.String, - com.google.cloud.discoveryengine.v1beta.Project.ServiceTermsOrBuilder, - com.google.cloud.discoveryengine.v1beta.Project.ServiceTerms, - com.google.cloud.discoveryengine.v1beta.Project.ServiceTerms.Builder> - internalGetMutableServiceTermsMap() { - if (serviceTermsMap_ == null) { - serviceTermsMap_ = new com.google.protobuf.MapFieldBuilder<>(serviceTermsMapConverter); - } - bitField0_ |= 0x00000008; - onChanged(); - return serviceTermsMap_; - } + private com.google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus + configurableBillingStatus_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus, + com.google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus.Builder, + com.google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatusOrBuilder> + configurableBillingStatusBuilder_; - public int getServiceTermsMapCount() { - return internalGetServiceTermsMap().ensureBuilderMap().size(); + /** + * + * + *
            +     * Output only. The current status of the project's configurable billing.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus configurable_billing_status = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the configurableBillingStatus field is set. + */ + public boolean hasConfigurableBillingStatus() { + return ((bitField0_ & 0x00000020) != 0); } /** * * *
            -     * Output only. A map of terms of services. The key is the `id` of
            -     * [ServiceTerms][google.cloud.discoveryengine.v1beta.Project.ServiceTerms].
            +     * Output only. The current status of the project's configurable billing.
                  * 
            * * - * map<string, .google.cloud.discoveryengine.v1beta.Project.ServiceTerms> service_terms_map = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * .google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus configurable_billing_status = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; * + * + * @return The configurableBillingStatus. */ - @java.lang.Override - public boolean containsServiceTermsMap(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); + public com.google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus + getConfigurableBillingStatus() { + if (configurableBillingStatusBuilder_ == null) { + return configurableBillingStatus_ == null + ? com.google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus + .getDefaultInstance() + : configurableBillingStatus_; + } else { + return configurableBillingStatusBuilder_.getMessage(); } - return internalGetServiceTermsMap().ensureBuilderMap().containsKey(key); - } - - /** Use {@link #getServiceTermsMapMap()} instead. */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map< - java.lang.String, com.google.cloud.discoveryengine.v1beta.Project.ServiceTerms> - getServiceTermsMap() { - return getServiceTermsMapMap(); } /** * * *
            -     * Output only. A map of terms of services. The key is the `id` of
            -     * [ServiceTerms][google.cloud.discoveryengine.v1beta.Project.ServiceTerms].
            +     * Output only. The current status of the project's configurable billing.
                  * 
            * * - * map<string, .google.cloud.discoveryengine.v1beta.Project.ServiceTerms> service_terms_map = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * .google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus configurable_billing_status = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ - @java.lang.Override - public java.util.Map< - java.lang.String, com.google.cloud.discoveryengine.v1beta.Project.ServiceTerms> - getServiceTermsMapMap() { - return internalGetServiceTermsMap().getImmutableMap(); + public Builder setConfigurableBillingStatus( + com.google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus value) { + if (configurableBillingStatusBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + configurableBillingStatus_ = value; + } else { + configurableBillingStatusBuilder_.setMessage(value); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; } /** * * *
            -     * Output only. A map of terms of services. The key is the `id` of
            -     * [ServiceTerms][google.cloud.discoveryengine.v1beta.Project.ServiceTerms].
            +     * Output only. The current status of the project's configurable billing.
                  * 
            * * - * map<string, .google.cloud.discoveryengine.v1beta.Project.ServiceTerms> service_terms_map = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * .google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus configurable_billing_status = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ - @java.lang.Override - public /* nullable */ com.google.cloud.discoveryengine.v1beta.Project.ServiceTerms - getServiceTermsMapOrDefault( - java.lang.String key, - /* nullable */ - com.google.cloud.discoveryengine.v1beta.Project.ServiceTerms defaultValue) { - if (key == null) { - throw new NullPointerException("map key"); + public Builder setConfigurableBillingStatus( + com.google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus.Builder + builderForValue) { + if (configurableBillingStatusBuilder_ == null) { + configurableBillingStatus_ = builderForValue.build(); + } else { + configurableBillingStatusBuilder_.setMessage(builderForValue.build()); } - java.util.Map< - java.lang.String, - com.google.cloud.discoveryengine.v1beta.Project.ServiceTermsOrBuilder> - map = internalGetMutableServiceTermsMap().ensureBuilderMap(); - return map.containsKey(key) ? serviceTermsMapConverter.build(map.get(key)) : defaultValue; + bitField0_ |= 0x00000020; + onChanged(); + return this; } /** * * *
            -     * Output only. A map of terms of services. The key is the `id` of
            -     * [ServiceTerms][google.cloud.discoveryengine.v1beta.Project.ServiceTerms].
            +     * Output only. The current status of the project's configurable billing.
                  * 
            * * - * map<string, .google.cloud.discoveryengine.v1beta.Project.ServiceTerms> service_terms_map = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * .google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus configurable_billing_status = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.Project.ServiceTerms getServiceTermsMapOrThrow( - java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); + public Builder mergeConfigurableBillingStatus( + com.google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus value) { + if (configurableBillingStatusBuilder_ == null) { + if (((bitField0_ & 0x00000020) != 0) + && configurableBillingStatus_ != null + && configurableBillingStatus_ + != com.google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus + .getDefaultInstance()) { + getConfigurableBillingStatusBuilder().mergeFrom(value); + } else { + configurableBillingStatus_ = value; + } + } else { + configurableBillingStatusBuilder_.mergeFrom(value); } - java.util.Map< - java.lang.String, - com.google.cloud.discoveryengine.v1beta.Project.ServiceTermsOrBuilder> - map = internalGetMutableServiceTermsMap().ensureBuilderMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); + if (configurableBillingStatus_ != null) { + bitField0_ |= 0x00000020; + onChanged(); } - return serviceTermsMapConverter.build(map.get(key)); - } - - public Builder clearServiceTermsMap() { - bitField0_ = (bitField0_ & ~0x00000008); - internalGetMutableServiceTermsMap().clear(); return this; } @@ -3562,113 +15237,91 @@ public Builder clearServiceTermsMap() { * * *
            -     * Output only. A map of terms of services. The key is the `id` of
            -     * [ServiceTerms][google.cloud.discoveryengine.v1beta.Project.ServiceTerms].
            +     * Output only. The current status of the project's configurable billing.
                  * 
            * * - * map<string, .google.cloud.discoveryengine.v1beta.Project.ServiceTerms> service_terms_map = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * .google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus configurable_billing_status = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ - public Builder removeServiceTermsMap(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); + public Builder clearConfigurableBillingStatus() { + bitField0_ = (bitField0_ & ~0x00000020); + configurableBillingStatus_ = null; + if (configurableBillingStatusBuilder_ != null) { + configurableBillingStatusBuilder_.dispose(); + configurableBillingStatusBuilder_ = null; } - internalGetMutableServiceTermsMap().ensureBuilderMap().remove(key); + onChanged(); return this; } - /** Use alternate mutation accessors instead. */ - @java.lang.Deprecated - public java.util.Map< - java.lang.String, com.google.cloud.discoveryengine.v1beta.Project.ServiceTerms> - getMutableServiceTermsMap() { - bitField0_ |= 0x00000008; - return internalGetMutableServiceTermsMap().ensureMessageMap(); - } - /** * * *
            -     * Output only. A map of terms of services. The key is the `id` of
            -     * [ServiceTerms][google.cloud.discoveryengine.v1beta.Project.ServiceTerms].
            +     * Output only. The current status of the project's configurable billing.
                  * 
            * * - * map<string, .google.cloud.discoveryengine.v1beta.Project.ServiceTerms> service_terms_map = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * .google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus configurable_billing_status = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ - public Builder putServiceTermsMap( - java.lang.String key, com.google.cloud.discoveryengine.v1beta.Project.ServiceTerms value) { - if (key == null) { - throw new NullPointerException("map key"); - } - if (value == null) { - throw new NullPointerException("map value"); - } - internalGetMutableServiceTermsMap().ensureBuilderMap().put(key, value); - bitField0_ |= 0x00000008; - return this; + public com.google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus.Builder + getConfigurableBillingStatusBuilder() { + bitField0_ |= 0x00000020; + onChanged(); + return internalGetConfigurableBillingStatusFieldBuilder().getBuilder(); } /** * * *
            -     * Output only. A map of terms of services. The key is the `id` of
            -     * [ServiceTerms][google.cloud.discoveryengine.v1beta.Project.ServiceTerms].
            +     * Output only. The current status of the project's configurable billing.
                  * 
            * * - * map<string, .google.cloud.discoveryengine.v1beta.Project.ServiceTerms> service_terms_map = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * .google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus configurable_billing_status = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ - public Builder putAllServiceTermsMap( - java.util.Map< - java.lang.String, com.google.cloud.discoveryengine.v1beta.Project.ServiceTerms> - values) { - for (java.util.Map.Entry< - java.lang.String, com.google.cloud.discoveryengine.v1beta.Project.ServiceTerms> - e : values.entrySet()) { - if (e.getKey() == null || e.getValue() == null) { - throw new NullPointerException(); - } + public com.google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatusOrBuilder + getConfigurableBillingStatusOrBuilder() { + if (configurableBillingStatusBuilder_ != null) { + return configurableBillingStatusBuilder_.getMessageOrBuilder(); + } else { + return configurableBillingStatus_ == null + ? com.google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus + .getDefaultInstance() + : configurableBillingStatus_; } - internalGetMutableServiceTermsMap().ensureBuilderMap().putAll(values); - bitField0_ |= 0x00000008; - return this; } /** * * *
            -     * Output only. A map of terms of services. The key is the `id` of
            -     * [ServiceTerms][google.cloud.discoveryengine.v1beta.Project.ServiceTerms].
            +     * Output only. The current status of the project's configurable billing.
                  * 
            * * - * map<string, .google.cloud.discoveryengine.v1beta.Project.ServiceTerms> service_terms_map = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * .google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus configurable_billing_status = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ - public com.google.cloud.discoveryengine.v1beta.Project.ServiceTerms.Builder - putServiceTermsMapBuilderIfAbsent(java.lang.String key) { - java.util.Map< - java.lang.String, - com.google.cloud.discoveryengine.v1beta.Project.ServiceTermsOrBuilder> - builderMap = internalGetMutableServiceTermsMap().ensureBuilderMap(); - com.google.cloud.discoveryengine.v1beta.Project.ServiceTermsOrBuilder entry = - builderMap.get(key); - if (entry == null) { - entry = com.google.cloud.discoveryengine.v1beta.Project.ServiceTerms.newBuilder(); - builderMap.put(key, entry); - } - if (entry instanceof com.google.cloud.discoveryengine.v1beta.Project.ServiceTerms) { - entry = ((com.google.cloud.discoveryengine.v1beta.Project.ServiceTerms) entry).toBuilder(); - builderMap.put(key, entry); + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus, + com.google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus.Builder, + com.google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatusOrBuilder> + internalGetConfigurableBillingStatusFieldBuilder() { + if (configurableBillingStatusBuilder_ == null) { + configurableBillingStatusBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus, + com.google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus.Builder, + com.google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatusOrBuilder>( + getConfigurableBillingStatus(), getParentForChildren(), isClean()); + configurableBillingStatus_ = null; } - return (com.google.cloud.discoveryengine.v1beta.Project.ServiceTerms.Builder) entry; + return configurableBillingStatusBuilder_; } // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.Project) diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ProjectOrBuilder.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ProjectOrBuilder.java index 50f79552e8a7..f877d4fed666 100644 --- a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ProjectOrBuilder.java +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ProjectOrBuilder.java @@ -227,4 +227,94 @@ com.google.cloud.discoveryengine.v1beta.Project.ServiceTerms getServiceTermsMapO */ com.google.cloud.discoveryengine.v1beta.Project.ServiceTerms getServiceTermsMapOrThrow( java.lang.String key); + + /** + * + * + *
            +   * Optional. Customer provided configurations.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig customer_provided_config = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the customerProvidedConfig field is set. + */ + boolean hasCustomerProvidedConfig(); + + /** + * + * + *
            +   * Optional. Customer provided configurations.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig customer_provided_config = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The customerProvidedConfig. + */ + com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig + getCustomerProvidedConfig(); + + /** + * + * + *
            +   * Optional. Customer provided configurations.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfig customer_provided_config = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.discoveryengine.v1beta.Project.CustomerProvidedConfigOrBuilder + getCustomerProvidedConfigOrBuilder(); + + /** + * + * + *
            +   * Output only. The current status of the project's configurable billing.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus configurable_billing_status = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the configurableBillingStatus field is set. + */ + boolean hasConfigurableBillingStatus(); + + /** + * + * + *
            +   * Output only. The current status of the project's configurable billing.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus configurable_billing_status = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The configurableBillingStatus. + */ + com.google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus + getConfigurableBillingStatus(); + + /** + * + * + *
            +   * Output only. The current status of the project's configurable billing.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatus configurable_billing_status = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.discoveryengine.v1beta.Project.ConfigurableBillingStatusOrBuilder + getConfigurableBillingStatusOrBuilder(); } diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ProjectProto.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ProjectProto.java index f5a9a574750f..5b103257dfe5 100644 --- a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ProjectProto.java +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ProjectProto.java @@ -48,6 +48,34 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_discoveryengine_v1beta_Project_ServiceTerms_descriptor; static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_cloud_discoveryengine_v1beta_Project_ServiceTerms_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1beta_Project_CustomerProvidedConfig_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1beta_Project_CustomerProvidedConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1beta_Project_CustomerProvidedConfig_NotebooklmConfig_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1beta_Project_CustomerProvidedConfig_NotebooklmConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1beta_Project_CustomerProvidedConfig_NotebooklmConfig_ModelArmorConfig_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1beta_Project_CustomerProvidedConfig_NotebooklmConfig_ModelArmorConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1beta_Project_CustomerProvidedConfig_NotebooklmConfig_DataProtectionPolicy_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1beta_Project_CustomerProvidedConfig_NotebooklmConfig_DataProtectionPolicy_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1beta_Project_CustomerProvidedConfig_NotebooklmConfig_DataProtectionPolicy_SensitiveDataProtectionPolicy_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1beta_Project_CustomerProvidedConfig_NotebooklmConfig_DataProtectionPolicy_SensitiveDataProtectionPolicy_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1beta_Project_ConfigurableBillingStatus_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1beta_Project_ConfigurableBillingStatus_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1beta_Project_ConfigurableBillingStatus_AgentSearchTokenSubscriptionStatus_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1beta_Project_ConfigurableBillingStatus_AgentSearchTokenSubscriptionStatus_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_discoveryengine_v1beta_Project_ServiceTermsMapEntry_descriptor; static final com.google.protobuf.GeneratedMessage.FieldAccessorTable @@ -64,34 +92,96 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "\n1google/cloud/discoveryengine/v1beta/pr" + "oject.proto\022#google.cloud.discoveryengin" + "e.v1beta\032\037google/api/field_behavior.prot" - + "o\032\031google/api/resource.proto\032\037google/pro" - + "tobuf/timestamp.proto\"\351\005\n\007Project\022\021\n\004nam" - + "e\030\001 \001(\tB\003\340A\003\0224\n\013create_time\030\002 \001(\0132\032.goog" - + "le.protobuf.TimestampB\003\340A\003\022B\n\031provision_" - + "completion_time\030\003 \001(\0132\032.google.protobuf." - + "TimestampB\003\340A\003\022a\n\021service_terms_map\030\004 \003(" - + "\0132A.google.cloud.discoveryengine.v1beta." - + "Project.ServiceTermsMapEntryB\003\340A\003\032\271\002\n\014Se" - + "rviceTerms\022\n\n\002id\030\001 \001(\t\022\017\n\007version\030\002 \001(\t\022" - + "N\n\005state\030\004 \001(\0162?.google.cloud.discoverye" - + "ngine.v1beta.Project.ServiceTerms.State\022" - + "/\n\013accept_time\030\005 \001(\0132\032.google.protobuf.T" - + "imestamp\0220\n\014decline_time\030\006 \001(\0132\032.google." - + "protobuf.Timestamp\"Y\n\005State\022\025\n\021STATE_UNS" - + "PECIFIED\020\000\022\022\n\016TERMS_ACCEPTED\020\001\022\021\n\rTERMS_" - + "PENDING\020\002\022\022\n\016TERMS_DECLINED\020\003\032q\n\024Service" - + "TermsMapEntry\022\013\n\003key\030\001 \001(\t\022H\n\005value\030\002 \001(" - + "\01329.google.cloud.discoveryengine.v1beta." - + "Project.ServiceTerms:\0028\001:?\352A<\n&discovery" - + "engine.googleapis.com/Project\022\022projects/" - + "{project}B\223\002\n\'com.google.cloud.discovery" - + "engine.v1betaB\014ProjectProtoP\001ZQcloud.goo" - + "gle.com/go/discoveryengine/apiv1beta/dis" - + "coveryenginepb;discoveryenginepb\242\002\017DISCO" - + "VERYENGINE\252\002#Google.Cloud.DiscoveryEngin" - + "e.V1Beta\312\002#Google\\Cloud\\DiscoveryEngine\\" - + "V1beta\352\002&Google::Cloud::DiscoveryEngine:" - + ":V1betab\006proto3" + + "o\032\031google/api/resource.proto\0321google/clo" + + "ud/discoveryengine/v1beta/logging.proto\032" + + "\037google/protobuf/timestamp.proto\"\344\030\n\007Pro" + + "ject\022\021\n\004name\030\001 \001(\tB\003\340A\003\0224\n\013create_time\030\002" + + " \001(\0132\032.google.protobuf.TimestampB\003\340A\003\022B\n" + + "\031provision_completion_time\030\003 \001(\0132\032.googl" + + "e.protobuf.TimestampB\003\340A\003\022a\n\021service_ter" + + "ms_map\030\004 \003(\0132A.google.cloud.discoveryeng" + + "ine.v1beta.Project.ServiceTermsMapEntryB" + + "\003\340A\003\022j\n\030customer_provided_config\030\006 \001(\0132C" + + ".google.cloud.discoveryengine.v1beta.Pro" + + "ject.CustomerProvidedConfigB\003\340A\001\022p\n\033conf" + + "igurable_billing_status\030\n \001(\0132F.google.c" + + "loud.discoveryengine.v1beta.Project.Conf" + + "igurableBillingStatusB\003\340A\003\032\271\002\n\014ServiceTe" + + "rms\022\n\n\002id\030\001 \001(\t\022\017\n\007version\030\002 \001(\t\022N\n\005stat" + + "e\030\004 \001(\0162?.google.cloud.discoveryengine.v" + + "1beta.Project.ServiceTerms.State\022/\n\013acce" + + "pt_time\030\005 \001(\0132\032.google.protobuf.Timestam" + + "p\0220\n\014decline_time\030\006 \001(\0132\032.google.protobu" + + "f.Timestamp\"Y\n\005State\022\025\n\021STATE_UNSPECIFIE" + + "D\020\000\022\022\n\016TERMS_ACCEPTED\020\001\022\021\n\rTERMS_PENDING" + + "\020\002\022\022\n\016TERMS_DECLINED\020\003\032\220\010\n\026CustomerProvi" + + "dedConfig\022t\n\021notebooklm_config\030\003 \001(\0132T.g" + + "oogle.cloud.discoveryengine.v1beta.Proje" + + "ct.CustomerProvidedConfig.NotebooklmConf" + + "igB\003\340A\001\032\377\006\n\020NotebooklmConfig\022\201\001\n\022model_a" + + "rmor_config\030\001 \001(\0132e.google.cloud.discove" + + "ryengine.v1beta.Project.CustomerProvided" + + "Config.NotebooklmConfig.ModelArmorConfig" + + "\022%\n\030opt_out_notebook_sharing\030\002 \001(\010B\003\340A\001\022" + + "\216\001\n\026data_protection_policy\030\005 \001(\0132i.googl" + + "e.cloud.discoveryengine.v1beta.Project.C" + + "ustomerProvidedConfig.NotebooklmConfig.D" + + "ataProtectionPolicyB\003\340A\001\022[\n\024observabilit" + + "y_config\030\006 \001(\01328.google.cloud.discoverye" + + "ngine.v1beta.ObservabilityConfigB\003\340A\001\032\243\001" + + "\n\020ModelArmorConfig\022H\n\024user_prompt_templa" + + "te\030\001 \001(\tB*\340A\001\372A$\n\"modelarmor.googleapis." + + "com/Template\022E\n\021response_template\030\002 \001(\tB" + + "*\340A\001\372A$\n\"modelarmor.googleapis.com/Templ" + + "ate\032\253\002\n\024DataProtectionPolicy\022\267\001\n sensiti" + + "ve_data_protection_policy\030\001 \001(\0132\207\001.googl" + + "e.cloud.discoveryengine.v1beta.Project.C" + + "ustomerProvidedConfig.NotebooklmConfig.D" + + "ataProtectionPolicy.SensitiveDataProtect" + + "ionPolicyB\003\340A\001\032Y\n\035SensitiveDataProtectio" + + "nPolicy\0228\n\006policy\030\001 \001(\tB(\340A\001\372A\"\n dlp.goo" + + "gleapis.com/ContentPolicy\032\207\t\n\031Configurab" + + "leBillingStatus\022+\n\036effective_search_qpm_" + + "threshold\030\001 \001(\003B\003\340A\001\022.\n!effective_indexi" + + "ng_core_threshold\030\002 \001(\003B\003\340A\001\0223\n\nstart_ti" + + "me\030\003 \001(\0132\032.google.protobuf.TimestampB\003\340A" + + "\001\0227\n\016terminate_time\030\004 \001(\0132\032.google.proto" + + "buf.TimestampB\003\340A\003\022N\n%search_qpm_thresho" + + "ld_next_update_time\030\005 \001(\0132\032.google.proto" + + "buf.TimestampB\003\340A\003\022Q\n(indexing_core_thre" + + "shold_next_update_time\030\006 \001(\0132\032.google.pr" + + "otobuf.TimestampB\003\340A\003\022k\n\013update_type\030\007 \001" + + "(\0162Q.google.cloud.discoveryengine.v1beta" + + ".Project.ConfigurableBillingStatus.Updat" + + "eTypeB\003\340A\003\022\240\001\n(agent_search_token_subscr" + + "iption_statuses\030\010 \003(\0132i.google.cloud.dis" + + "coveryengine.v1beta.Project.Configurable" + + "BillingStatus.AgentSearchTokenSubscripti" + + "onStatusB\003\340A\003\032\212\003\n\"AgentSearchTokenSubscr" + + "iptionStatus\022\032\n\rmodel_version\030\001 \001(\tB\003\340A\003" + + "\022$\n\027effective_tpm_threshold\030\002 \001(\003B\003\340A\003\022G" + + "\n\036tpm_threshold_next_update_time\030\003 \001(\0132\032" + + ".google.protobuf.TimestampB\003\340A\003\0223\n\nstart" + + "_time\030\004 \001(\0132\032.google.protobuf.TimestampB" + + "\003\340A\003\0227\n\016terminate_time\030\005 \001(\0132\032.google.pr" + + "otobuf.TimestampB\003\340A\003\022k\n\013update_type\030\006 \001" + + "(\0162Q.google.cloud.discoveryengine.v1beta" + + ".Project.ConfigurableBillingStatus.Updat" + + "eTypeB\003\340A\003\"_\n\nUpdateType\022\033\n\027UPDATE_TYPE_" + + "UNSPECIFIED\020\000\022\n\n\006CREATE\020\001\022\n\n\006DELETE\020\002\022\014\n" + + "\010SCALE_UP\020\003\022\016\n\nSCALE_DOWN\020\004\032q\n\024ServiceTe" + + "rmsMapEntry\022\013\n\003key\030\001 \001(\t\022H\n\005value\030\002 \001(\0132" + + "9.google.cloud.discoveryengine.v1beta.Pr" + + "oject.ServiceTerms:\0028\001:?\352A<\n&discoveryen" + + "gine.googleapis.com/Project\022\022projects/{p" + + "roject}B\223\002\n\'com.google.cloud.discoveryen" + + "gine.v1betaB\014ProjectProtoP\001ZQcloud.googl" + + "e.com/go/discoveryengine/apiv1beta/disco" + + "veryenginepb;discoveryenginepb\242\002\017DISCOVE" + + "RYENGINE\252\002#Google.Cloud.DiscoveryEngine." + + "V1Beta\312\002#Google\\Cloud\\DiscoveryEngine\\V1" + + "beta\352\002&Google::Cloud::DiscoveryEngine::V" + + "1betab\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -99,6 +189,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.Descriptors.FileDescriptor[] { com.google.api.FieldBehaviorProto.getDescriptor(), com.google.api.ResourceProto.getDescriptor(), + com.google.cloud.discoveryengine.v1beta.LoggingProto.getDescriptor(), com.google.protobuf.TimestampProto.getDescriptor(), }); internal_static_google_cloud_discoveryengine_v1beta_Project_descriptor = @@ -107,7 +198,12 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_cloud_discoveryengine_v1beta_Project_descriptor, new java.lang.String[] { - "Name", "CreateTime", "ProvisionCompletionTime", "ServiceTermsMap", + "Name", + "CreateTime", + "ProvisionCompletionTime", + "ServiceTermsMap", + "CustomerProvidedConfig", + "ConfigurableBillingStatus", }); internal_static_google_cloud_discoveryengine_v1beta_Project_ServiceTerms_descriptor = internal_static_google_cloud_discoveryengine_v1beta_Project_descriptor.getNestedType(0); @@ -117,8 +213,84 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "Id", "Version", "State", "AcceptTime", "DeclineTime", }); - internal_static_google_cloud_discoveryengine_v1beta_Project_ServiceTermsMapEntry_descriptor = + internal_static_google_cloud_discoveryengine_v1beta_Project_CustomerProvidedConfig_descriptor = internal_static_google_cloud_discoveryengine_v1beta_Project_descriptor.getNestedType(1); + internal_static_google_cloud_discoveryengine_v1beta_Project_CustomerProvidedConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1beta_Project_CustomerProvidedConfig_descriptor, + new java.lang.String[] { + "NotebooklmConfig", + }); + internal_static_google_cloud_discoveryengine_v1beta_Project_CustomerProvidedConfig_NotebooklmConfig_descriptor = + internal_static_google_cloud_discoveryengine_v1beta_Project_CustomerProvidedConfig_descriptor + .getNestedType(0); + internal_static_google_cloud_discoveryengine_v1beta_Project_CustomerProvidedConfig_NotebooklmConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1beta_Project_CustomerProvidedConfig_NotebooklmConfig_descriptor, + new java.lang.String[] { + "ModelArmorConfig", + "OptOutNotebookSharing", + "DataProtectionPolicy", + "ObservabilityConfig", + }); + internal_static_google_cloud_discoveryengine_v1beta_Project_CustomerProvidedConfig_NotebooklmConfig_ModelArmorConfig_descriptor = + internal_static_google_cloud_discoveryengine_v1beta_Project_CustomerProvidedConfig_NotebooklmConfig_descriptor + .getNestedType(0); + internal_static_google_cloud_discoveryengine_v1beta_Project_CustomerProvidedConfig_NotebooklmConfig_ModelArmorConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1beta_Project_CustomerProvidedConfig_NotebooklmConfig_ModelArmorConfig_descriptor, + new java.lang.String[] { + "UserPromptTemplate", "ResponseTemplate", + }); + internal_static_google_cloud_discoveryengine_v1beta_Project_CustomerProvidedConfig_NotebooklmConfig_DataProtectionPolicy_descriptor = + internal_static_google_cloud_discoveryengine_v1beta_Project_CustomerProvidedConfig_NotebooklmConfig_descriptor + .getNestedType(1); + internal_static_google_cloud_discoveryengine_v1beta_Project_CustomerProvidedConfig_NotebooklmConfig_DataProtectionPolicy_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1beta_Project_CustomerProvidedConfig_NotebooklmConfig_DataProtectionPolicy_descriptor, + new java.lang.String[] { + "SensitiveDataProtectionPolicy", + }); + internal_static_google_cloud_discoveryengine_v1beta_Project_CustomerProvidedConfig_NotebooklmConfig_DataProtectionPolicy_SensitiveDataProtectionPolicy_descriptor = + internal_static_google_cloud_discoveryengine_v1beta_Project_CustomerProvidedConfig_NotebooklmConfig_DataProtectionPolicy_descriptor + .getNestedType(0); + internal_static_google_cloud_discoveryengine_v1beta_Project_CustomerProvidedConfig_NotebooklmConfig_DataProtectionPolicy_SensitiveDataProtectionPolicy_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1beta_Project_CustomerProvidedConfig_NotebooklmConfig_DataProtectionPolicy_SensitiveDataProtectionPolicy_descriptor, + new java.lang.String[] { + "Policy", + }); + internal_static_google_cloud_discoveryengine_v1beta_Project_ConfigurableBillingStatus_descriptor = + internal_static_google_cloud_discoveryengine_v1beta_Project_descriptor.getNestedType(2); + internal_static_google_cloud_discoveryengine_v1beta_Project_ConfigurableBillingStatus_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1beta_Project_ConfigurableBillingStatus_descriptor, + new java.lang.String[] { + "EffectiveSearchQpmThreshold", + "EffectiveIndexingCoreThreshold", + "StartTime", + "TerminateTime", + "SearchQpmThresholdNextUpdateTime", + "IndexingCoreThresholdNextUpdateTime", + "UpdateType", + "AgentSearchTokenSubscriptionStatuses", + }); + internal_static_google_cloud_discoveryengine_v1beta_Project_ConfigurableBillingStatus_AgentSearchTokenSubscriptionStatus_descriptor = + internal_static_google_cloud_discoveryengine_v1beta_Project_ConfigurableBillingStatus_descriptor + .getNestedType(0); + internal_static_google_cloud_discoveryengine_v1beta_Project_ConfigurableBillingStatus_AgentSearchTokenSubscriptionStatus_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1beta_Project_ConfigurableBillingStatus_AgentSearchTokenSubscriptionStatus_descriptor, + new java.lang.String[] { + "ModelVersion", + "EffectiveTpmThreshold", + "TpmThresholdNextUpdateTime", + "StartTime", + "TerminateTime", + "UpdateType", + }); + internal_static_google_cloud_discoveryengine_v1beta_Project_ServiceTermsMapEntry_descriptor = + internal_static_google_cloud_discoveryengine_v1beta_Project_descriptor.getNestedType(3); internal_static_google_cloud_discoveryengine_v1beta_Project_ServiceTermsMapEntry_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_cloud_discoveryengine_v1beta_Project_ServiceTermsMapEntry_descriptor, @@ -128,11 +300,13 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { descriptor.resolveAllFeaturesImmutable(); com.google.api.FieldBehaviorProto.getDescriptor(); com.google.api.ResourceProto.getDescriptor(); + com.google.cloud.discoveryengine.v1beta.LoggingProto.getDescriptor(); com.google.protobuf.TimestampProto.getDescriptor(); com.google.protobuf.ExtensionRegistry registry = com.google.protobuf.ExtensionRegistry.newInstance(); registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); registry.add(com.google.api.ResourceProto.resource); + registry.add(com.google.api.ResourceProto.resourceReference); com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( descriptor, registry); } diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ProjectServiceProto.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ProjectServiceProto.java index 1f21c75e5fcb..95e541be37e0 100644 --- a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ProjectServiceProto.java +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ProjectServiceProto.java @@ -44,6 +44,10 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_discoveryengine_v1beta_ProvisionProjectRequest_descriptor; static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_cloud_discoveryengine_v1beta_ProvisionProjectRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1beta_ProvisionProjectRequest_SaasParams_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1beta_ProvisionProjectRequest_SaasParams_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_discoveryengine_v1beta_ProvisionProjectMetadata_descriptor; static final com.google.protobuf.GeneratedMessage.FieldAccessorTable @@ -57,36 +61,41 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { static { java.lang.String[] descriptorData = { - "\n9google/cloud/discoveryengine/v1beta/pr" - + "oject_service.proto\022#google.cloud.discov" + "\n" + + "9google/cloud/discoveryengine/v1beta/project_service.proto\022#google.cloud.discov" + "eryengine.v1beta\032\034google/api/annotations" + ".proto\032\027google/api/client.proto\032\037google/" + "api/field_behavior.proto\032\031google/api/res" + "ource.proto\0321google/cloud/discoveryengin" - + "e/v1beta/project.proto\032#google/longrunni" - + "ng/operations.proto\"\240\001\n\027ProvisionProject" - + "Request\022<\n\004name\030\001 \001(\tB.\340A\002\372A(\n&discovery" - + "engine.googleapis.com/Project\022\"\n\025accept_" - + "data_use_terms\030\002 \001(\010B\003\340A\002\022#\n\026data_use_te" - + "rms_version\030\003 \001(\tB\003\340A\002\"\032\n\030ProvisionProje" - + "ctMetadata2\374\002\n\016ProjectService\022\225\002\n\020Provis" - + "ionProject\022<.google.cloud.discoveryengin" - + "e.v1beta.ProvisionProjectRequest\032\035.googl" - + "e.longrunning.Operation\"\243\001\312Ak\n+google.cl" - + "oud.discoveryengine.v1beta.Project\022\n\n" + + "SaasParams\022\033\n" + + "\016accept_biz_qos\030\001 \001(\010B\003\340A\001\022\023\n" + + "\006is_biz\030\002 \001(\010B\003\340A\001\"\032\n" + + "\030ProvisionProjectMetadata2\372\003\n" + + "\016ProjectService\022\225\002\n" + + "\020ProvisionProject\022<.google.cloud.discoveryen" + + "gine.v1beta.ProvisionProjectRequest\032\035.google.longrunning.Operation\"\243\001\312Ak\n" + + "+google.cloud.discoveryengine.v1beta.Project\022 + * Optional. Set to `true` to specify that caller has read and would like to + * give consent to the [Terms for Agent Space quality of service]. + * + * + * bool accept_biz_qos = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The acceptBizQos. + */ + boolean getAcceptBizQos(); + + /** + * + * + *
            +     * Optional. Indicates if the current request is for Biz edition (= true) or
            +     * not
            +     * (= false).
            +     * 
            + * + * bool is_biz = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The isBiz. + */ + boolean getIsBiz(); + } + + /** + * + * + *
            +   * Parameters for Agentspace.
            +   * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.ProvisionProjectRequest.SaasParams} + */ + public static final class SaasParams extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.ProvisionProjectRequest.SaasParams) + SaasParamsOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "SaasParams"); + } + + // Use SaasParams.newBuilder() to construct. + private SaasParams(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private SaasParams() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.ProjectServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_ProvisionProjectRequest_SaasParams_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.ProjectServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_ProvisionProjectRequest_SaasParams_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.ProvisionProjectRequest.SaasParams.class, + com.google.cloud.discoveryengine.v1beta.ProvisionProjectRequest.SaasParams.Builder + .class); + } + + public static final int ACCEPT_BIZ_QOS_FIELD_NUMBER = 1; + private boolean acceptBizQos_ = false; + + /** + * + * + *
            +     * Optional. Set to `true` to specify that caller has read and would like to
            +     * give consent to the [Terms for Agent Space quality of service].
            +     * 
            + * + * bool accept_biz_qos = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The acceptBizQos. + */ + @java.lang.Override + public boolean getAcceptBizQos() { + return acceptBizQos_; + } + + public static final int IS_BIZ_FIELD_NUMBER = 2; + private boolean isBiz_ = false; + + /** + * + * + *
            +     * Optional. Indicates if the current request is for Biz edition (= true) or
            +     * not
            +     * (= false).
            +     * 
            + * + * bool is_biz = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The isBiz. + */ + @java.lang.Override + public boolean getIsBiz() { + return isBiz_; + } + + 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 (acceptBizQos_ != false) { + output.writeBool(1, acceptBizQos_); + } + if (isBiz_ != false) { + output.writeBool(2, isBiz_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (acceptBizQos_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(1, acceptBizQos_); + } + if (isBiz_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, isBiz_); + } + 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.discoveryengine.v1beta.ProvisionProjectRequest.SaasParams)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1beta.ProvisionProjectRequest.SaasParams other = + (com.google.cloud.discoveryengine.v1beta.ProvisionProjectRequest.SaasParams) obj; + + if (getAcceptBizQos() != other.getAcceptBizQos()) return false; + if (getIsBiz() != other.getIsBiz()) 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) + ACCEPT_BIZ_QOS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getAcceptBizQos()); + hash = (37 * hash) + IS_BIZ_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getIsBiz()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1beta.ProvisionProjectRequest.SaasParams + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.ProvisionProjectRequest.SaasParams + 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.discoveryengine.v1beta.ProvisionProjectRequest.SaasParams + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.ProvisionProjectRequest.SaasParams + 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.discoveryengine.v1beta.ProvisionProjectRequest.SaasParams + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.ProvisionProjectRequest.SaasParams + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1beta.ProvisionProjectRequest.SaasParams + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.ProvisionProjectRequest.SaasParams + 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.discoveryengine.v1beta.ProvisionProjectRequest.SaasParams + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.ProvisionProjectRequest.SaasParams + 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.discoveryengine.v1beta.ProvisionProjectRequest.SaasParams + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.ProvisionProjectRequest.SaasParams + 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.discoveryengine.v1beta.ProvisionProjectRequest.SaasParams 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; + } + + /** + * + * + *
            +     * Parameters for Agentspace.
            +     * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.ProvisionProjectRequest.SaasParams} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.ProvisionProjectRequest.SaasParams) + com.google.cloud.discoveryengine.v1beta.ProvisionProjectRequest.SaasParamsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.ProjectServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_ProvisionProjectRequest_SaasParams_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.ProjectServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_ProvisionProjectRequest_SaasParams_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.ProvisionProjectRequest.SaasParams.class, + com.google.cloud.discoveryengine.v1beta.ProvisionProjectRequest.SaasParams.Builder + .class); + } + + // Construct using + // com.google.cloud.discoveryengine.v1beta.ProvisionProjectRequest.SaasParams.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + acceptBizQos_ = false; + isBiz_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1beta.ProjectServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_ProvisionProjectRequest_SaasParams_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.ProvisionProjectRequest.SaasParams + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1beta.ProvisionProjectRequest.SaasParams + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.ProvisionProjectRequest.SaasParams build() { + com.google.cloud.discoveryengine.v1beta.ProvisionProjectRequest.SaasParams result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.ProvisionProjectRequest.SaasParams + buildPartial() { + com.google.cloud.discoveryengine.v1beta.ProvisionProjectRequest.SaasParams result = + new com.google.cloud.discoveryengine.v1beta.ProvisionProjectRequest.SaasParams(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.discoveryengine.v1beta.ProvisionProjectRequest.SaasParams result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.acceptBizQos_ = acceptBizQos_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.isBiz_ = isBiz_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.cloud.discoveryengine.v1beta.ProvisionProjectRequest.SaasParams) { + return mergeFrom( + (com.google.cloud.discoveryengine.v1beta.ProvisionProjectRequest.SaasParams) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1beta.ProvisionProjectRequest.SaasParams other) { + if (other + == com.google.cloud.discoveryengine.v1beta.ProvisionProjectRequest.SaasParams + .getDefaultInstance()) return this; + if (other.getAcceptBizQos() != false) { + setAcceptBizQos(other.getAcceptBizQos()); + } + if (other.getIsBiz() != false) { + setIsBiz(other.getIsBiz()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + acceptBizQos_ = input.readBool(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 16: + { + isBiz_ = input.readBool(); + bitField0_ |= 0x00000002; + break; + } // case 16 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private boolean acceptBizQos_; + + /** + * + * + *
            +       * Optional. Set to `true` to specify that caller has read and would like to
            +       * give consent to the [Terms for Agent Space quality of service].
            +       * 
            + * + * bool accept_biz_qos = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The acceptBizQos. + */ + @java.lang.Override + public boolean getAcceptBizQos() { + return acceptBizQos_; + } + + /** + * + * + *
            +       * Optional. Set to `true` to specify that caller has read and would like to
            +       * give consent to the [Terms for Agent Space quality of service].
            +       * 
            + * + * bool accept_biz_qos = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The acceptBizQos to set. + * @return This builder for chaining. + */ + public Builder setAcceptBizQos(boolean value) { + + acceptBizQos_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
            +       * Optional. Set to `true` to specify that caller has read and would like to
            +       * give consent to the [Terms for Agent Space quality of service].
            +       * 
            + * + * bool accept_biz_qos = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearAcceptBizQos() { + bitField0_ = (bitField0_ & ~0x00000001); + acceptBizQos_ = false; + onChanged(); + return this; + } + + private boolean isBiz_; + + /** + * + * + *
            +       * Optional. Indicates if the current request is for Biz edition (= true) or
            +       * not
            +       * (= false).
            +       * 
            + * + * bool is_biz = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The isBiz. + */ + @java.lang.Override + public boolean getIsBiz() { + return isBiz_; + } + + /** + * + * + *
            +       * Optional. Indicates if the current request is for Biz edition (= true) or
            +       * not
            +       * (= false).
            +       * 
            + * + * bool is_biz = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The isBiz to set. + * @return This builder for chaining. + */ + public Builder setIsBiz(boolean value) { + + isBiz_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
            +       * Optional. Indicates if the current request is for Biz edition (= true) or
            +       * not
            +       * (= false).
            +       * 
            + * + * bool is_biz = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearIsBiz() { + bitField0_ = (bitField0_ & ~0x00000002); + isBiz_ = false; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.ProvisionProjectRequest.SaasParams) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.ProvisionProjectRequest.SaasParams) + private static final com.google.cloud.discoveryengine.v1beta.ProvisionProjectRequest.SaasParams + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.discoveryengine.v1beta.ProvisionProjectRequest.SaasParams(); + } + + public static com.google.cloud.discoveryengine.v1beta.ProvisionProjectRequest.SaasParams + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SaasParams parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.ProvisionProjectRequest.SaasParams + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int bitField0_; public static final int NAME_FIELD_NUMBER = 1; @SuppressWarnings("serial") @@ -216,6 +867,69 @@ public com.google.protobuf.ByteString getDataUseTermsVersionBytes() { } } + public static final int SAAS_PARAMS_FIELD_NUMBER = 4; + private com.google.cloud.discoveryengine.v1beta.ProvisionProjectRequest.SaasParams saasParams_; + + /** + * + * + *
            +   * Optional. Parameters for Agentspace.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.ProvisionProjectRequest.SaasParams saas_params = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the saasParams field is set. + */ + @java.lang.Override + public boolean hasSaasParams() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
            +   * Optional. Parameters for Agentspace.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.ProvisionProjectRequest.SaasParams saas_params = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The saasParams. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.ProvisionProjectRequest.SaasParams + getSaasParams() { + return saasParams_ == null + ? com.google.cloud.discoveryengine.v1beta.ProvisionProjectRequest.SaasParams + .getDefaultInstance() + : saasParams_; + } + + /** + * + * + *
            +   * Optional. Parameters for Agentspace.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.ProvisionProjectRequest.SaasParams saas_params = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.ProvisionProjectRequest.SaasParamsOrBuilder + getSaasParamsOrBuilder() { + return saasParams_ == null + ? com.google.cloud.discoveryengine.v1beta.ProvisionProjectRequest.SaasParams + .getDefaultInstance() + : saasParams_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -239,6 +953,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessage.isStringEmpty(dataUseTermsVersion_)) { com.google.protobuf.GeneratedMessage.writeString(output, 3, dataUseTermsVersion_); } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(4, getSaasParams()); + } getUnknownFields().writeTo(output); } @@ -257,6 +974,9 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessage.isStringEmpty(dataUseTermsVersion_)) { size += com.google.protobuf.GeneratedMessage.computeStringSize(3, dataUseTermsVersion_); } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getSaasParams()); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -276,6 +996,10 @@ public boolean equals(final java.lang.Object obj) { if (!getName().equals(other.getName())) return false; if (getAcceptDataUseTerms() != other.getAcceptDataUseTerms()) return false; if (!getDataUseTermsVersion().equals(other.getDataUseTermsVersion())) return false; + if (hasSaasParams() != other.hasSaasParams()) return false; + if (hasSaasParams()) { + if (!getSaasParams().equals(other.getSaasParams())) return false; + } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -293,6 +1017,10 @@ public int hashCode() { hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getAcceptDataUseTerms()); hash = (37 * hash) + DATA_USE_TERMS_VERSION_FIELD_NUMBER; hash = (53 * hash) + getDataUseTermsVersion().hashCode(); + if (hasSaasParams()) { + hash = (37 * hash) + SAAS_PARAMS_FIELD_NUMBER; + hash = (53 * hash) + getSaasParams().hashCode(); + } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -426,10 +1154,19 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.discoveryengine.v1beta.ProvisionProjectRequest.newBuilder() - private Builder() {} + private Builder() { + maybeForceBuilderInitialization(); + } private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetSaasParamsFieldBuilder(); + } } @java.lang.Override @@ -439,6 +1176,11 @@ public Builder clear() { name_ = ""; acceptDataUseTerms_ = false; dataUseTermsVersion_ = ""; + saasParams_ = null; + if (saasParamsBuilder_ != null) { + saasParamsBuilder_.dispose(); + saasParamsBuilder_ = null; + } return this; } @@ -486,6 +1228,12 @@ private void buildPartial0( if (((from_bitField0_ & 0x00000004) != 0)) { result.dataUseTermsVersion_ = dataUseTermsVersion_; } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000008) != 0)) { + result.saasParams_ = saasParamsBuilder_ == null ? saasParams_ : saasParamsBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; } @java.lang.Override @@ -516,6 +1264,9 @@ public Builder mergeFrom( bitField0_ |= 0x00000004; onChanged(); } + if (other.hasSaasParams()) { + mergeSaasParams(other.getSaasParams()); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -560,6 +1311,13 @@ public Builder mergeFrom( bitField0_ |= 0x00000004; break; } // case 26 + case 34: + { + input.readMessage( + internalGetSaasParamsFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 34 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -903,6 +1661,229 @@ public Builder setDataUseTermsVersionBytes(com.google.protobuf.ByteString value) return this; } + private com.google.cloud.discoveryengine.v1beta.ProvisionProjectRequest.SaasParams saasParams_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.ProvisionProjectRequest.SaasParams, + com.google.cloud.discoveryengine.v1beta.ProvisionProjectRequest.SaasParams.Builder, + com.google.cloud.discoveryengine.v1beta.ProvisionProjectRequest.SaasParamsOrBuilder> + saasParamsBuilder_; + + /** + * + * + *
            +     * Optional. Parameters for Agentspace.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.ProvisionProjectRequest.SaasParams saas_params = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the saasParams field is set. + */ + public boolean hasSaasParams() { + return ((bitField0_ & 0x00000008) != 0); + } + + /** + * + * + *
            +     * Optional. Parameters for Agentspace.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.ProvisionProjectRequest.SaasParams saas_params = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The saasParams. + */ + public com.google.cloud.discoveryengine.v1beta.ProvisionProjectRequest.SaasParams + getSaasParams() { + if (saasParamsBuilder_ == null) { + return saasParams_ == null + ? com.google.cloud.discoveryengine.v1beta.ProvisionProjectRequest.SaasParams + .getDefaultInstance() + : saasParams_; + } else { + return saasParamsBuilder_.getMessage(); + } + } + + /** + * + * + *
            +     * Optional. Parameters for Agentspace.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.ProvisionProjectRequest.SaasParams saas_params = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setSaasParams( + com.google.cloud.discoveryengine.v1beta.ProvisionProjectRequest.SaasParams value) { + if (saasParamsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + saasParams_ = value; + } else { + saasParamsBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Optional. Parameters for Agentspace.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.ProvisionProjectRequest.SaasParams saas_params = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setSaasParams( + com.google.cloud.discoveryengine.v1beta.ProvisionProjectRequest.SaasParams.Builder + builderForValue) { + if (saasParamsBuilder_ == null) { + saasParams_ = builderForValue.build(); + } else { + saasParamsBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Optional. Parameters for Agentspace.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.ProvisionProjectRequest.SaasParams saas_params = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeSaasParams( + com.google.cloud.discoveryengine.v1beta.ProvisionProjectRequest.SaasParams value) { + if (saasParamsBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) + && saasParams_ != null + && saasParams_ + != com.google.cloud.discoveryengine.v1beta.ProvisionProjectRequest.SaasParams + .getDefaultInstance()) { + getSaasParamsBuilder().mergeFrom(value); + } else { + saasParams_ = value; + } + } else { + saasParamsBuilder_.mergeFrom(value); + } + if (saasParams_ != null) { + bitField0_ |= 0x00000008; + onChanged(); + } + return this; + } + + /** + * + * + *
            +     * Optional. Parameters for Agentspace.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.ProvisionProjectRequest.SaasParams saas_params = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearSaasParams() { + bitField0_ = (bitField0_ & ~0x00000008); + saasParams_ = null; + if (saasParamsBuilder_ != null) { + saasParamsBuilder_.dispose(); + saasParamsBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
            +     * Optional. Parameters for Agentspace.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.ProvisionProjectRequest.SaasParams saas_params = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.discoveryengine.v1beta.ProvisionProjectRequest.SaasParams.Builder + getSaasParamsBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return internalGetSaasParamsFieldBuilder().getBuilder(); + } + + /** + * + * + *
            +     * Optional. Parameters for Agentspace.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.ProvisionProjectRequest.SaasParams saas_params = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.discoveryengine.v1beta.ProvisionProjectRequest.SaasParamsOrBuilder + getSaasParamsOrBuilder() { + if (saasParamsBuilder_ != null) { + return saasParamsBuilder_.getMessageOrBuilder(); + } else { + return saasParams_ == null + ? com.google.cloud.discoveryengine.v1beta.ProvisionProjectRequest.SaasParams + .getDefaultInstance() + : saasParams_; + } + } + + /** + * + * + *
            +     * Optional. Parameters for Agentspace.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.ProvisionProjectRequest.SaasParams saas_params = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.ProvisionProjectRequest.SaasParams, + com.google.cloud.discoveryengine.v1beta.ProvisionProjectRequest.SaasParams.Builder, + com.google.cloud.discoveryengine.v1beta.ProvisionProjectRequest.SaasParamsOrBuilder> + internalGetSaasParamsFieldBuilder() { + if (saasParamsBuilder_ == null) { + saasParamsBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.ProvisionProjectRequest.SaasParams, + com.google.cloud.discoveryengine.v1beta.ProvisionProjectRequest.SaasParams.Builder, + com.google.cloud.discoveryengine.v1beta.ProvisionProjectRequest + .SaasParamsOrBuilder>(getSaasParams(), getParentForChildren(), isClean()); + saasParams_ = null; + } + return saasParamsBuilder_; + } + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.ProvisionProjectRequest) } diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ProvisionProjectRequestOrBuilder.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ProvisionProjectRequestOrBuilder.java index 454dba43aa21..7baca2364cbe 100644 --- a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ProvisionProjectRequestOrBuilder.java +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ProvisionProjectRequestOrBuilder.java @@ -108,4 +108,48 @@ public interface ProvisionProjectRequestOrBuilder * @return The bytes for dataUseTermsVersion. */ com.google.protobuf.ByteString getDataUseTermsVersionBytes(); + + /** + * + * + *
            +   * Optional. Parameters for Agentspace.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.ProvisionProjectRequest.SaasParams saas_params = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the saasParams field is set. + */ + boolean hasSaasParams(); + + /** + * + * + *
            +   * Optional. Parameters for Agentspace.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.ProvisionProjectRequest.SaasParams saas_params = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The saasParams. + */ + com.google.cloud.discoveryengine.v1beta.ProvisionProjectRequest.SaasParams getSaasParams(); + + /** + * + * + *
            +   * Optional. Parameters for Agentspace.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.ProvisionProjectRequest.SaasParams saas_params = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.discoveryengine.v1beta.ProvisionProjectRequest.SaasParamsOrBuilder + getSaasParamsOrBuilder(); } diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/PurgeIdentityMappingsRequest.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/PurgeIdentityMappingsRequest.java new file mode 100644 index 000000000000..fdac0da376c0 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/PurgeIdentityMappingsRequest.java @@ -0,0 +1,2651 @@ +/* + * 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/cloud/discoveryengine/v1beta/identity_mapping_store_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.discoveryengine.v1beta; + +/** + * + * + *
            + * Request message for
            + * [IdentityMappingStoreService.PurgeIdentityMappings][google.cloud.discoveryengine.v1beta.IdentityMappingStoreService.PurgeIdentityMappings]
            + * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.PurgeIdentityMappingsRequest} + */ +@com.google.protobuf.Generated +public final class PurgeIdentityMappingsRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.PurgeIdentityMappingsRequest) + PurgeIdentityMappingsRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "PurgeIdentityMappingsRequest"); + } + + // Use PurgeIdentityMappingsRequest.newBuilder() to construct. + private PurgeIdentityMappingsRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private PurgeIdentityMappingsRequest() { + identityMappingStore_ = ""; + filter_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.IdentityMappingStoreServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_PurgeIdentityMappingsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.IdentityMappingStoreServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_PurgeIdentityMappingsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.PurgeIdentityMappingsRequest.class, + com.google.cloud.discoveryengine.v1beta.PurgeIdentityMappingsRequest.Builder.class); + } + + public interface InlineSourceOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.PurgeIdentityMappingsRequest.InlineSource) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
            +     * A maximum of 10000 entries can be purged at one time
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.IdentityMappingEntry identity_mapping_entries = 1; + * + */ + java.util.List + getIdentityMappingEntriesList(); + + /** + * + * + *
            +     * A maximum of 10000 entries can be purged at one time
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.IdentityMappingEntry identity_mapping_entries = 1; + * + */ + com.google.cloud.discoveryengine.v1beta.IdentityMappingEntry getIdentityMappingEntries( + int index); + + /** + * + * + *
            +     * A maximum of 10000 entries can be purged at one time
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.IdentityMappingEntry identity_mapping_entries = 1; + * + */ + int getIdentityMappingEntriesCount(); + + /** + * + * + *
            +     * A maximum of 10000 entries can be purged at one time
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.IdentityMappingEntry identity_mapping_entries = 1; + * + */ + java.util.List + getIdentityMappingEntriesOrBuilderList(); + + /** + * + * + *
            +     * A maximum of 10000 entries can be purged at one time
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.IdentityMappingEntry identity_mapping_entries = 1; + * + */ + com.google.cloud.discoveryengine.v1beta.IdentityMappingEntryOrBuilder + getIdentityMappingEntriesOrBuilder(int index); + } + + /** + * + * + *
            +   * The inline source to purge identity mapping entries from.
            +   * 
            + * + * Protobuf type {@code + * google.cloud.discoveryengine.v1beta.PurgeIdentityMappingsRequest.InlineSource} + */ + public static final class InlineSource extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.PurgeIdentityMappingsRequest.InlineSource) + InlineSourceOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "InlineSource"); + } + + // Use InlineSource.newBuilder() to construct. + private InlineSource(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private InlineSource() { + identityMappingEntries_ = java.util.Collections.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.IdentityMappingStoreServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_PurgeIdentityMappingsRequest_InlineSource_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.IdentityMappingStoreServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_PurgeIdentityMappingsRequest_InlineSource_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.PurgeIdentityMappingsRequest.InlineSource + .class, + com.google.cloud.discoveryengine.v1beta.PurgeIdentityMappingsRequest.InlineSource + .Builder.class); + } + + public static final int IDENTITY_MAPPING_ENTRIES_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List + identityMappingEntries_; + + /** + * + * + *
            +     * A maximum of 10000 entries can be purged at one time
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.IdentityMappingEntry identity_mapping_entries = 1; + * + */ + @java.lang.Override + public java.util.List + getIdentityMappingEntriesList() { + return identityMappingEntries_; + } + + /** + * + * + *
            +     * A maximum of 10000 entries can be purged at one time
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.IdentityMappingEntry identity_mapping_entries = 1; + * + */ + @java.lang.Override + public java.util.List< + ? extends com.google.cloud.discoveryengine.v1beta.IdentityMappingEntryOrBuilder> + getIdentityMappingEntriesOrBuilderList() { + return identityMappingEntries_; + } + + /** + * + * + *
            +     * A maximum of 10000 entries can be purged at one time
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.IdentityMappingEntry identity_mapping_entries = 1; + * + */ + @java.lang.Override + public int getIdentityMappingEntriesCount() { + return identityMappingEntries_.size(); + } + + /** + * + * + *
            +     * A maximum of 10000 entries can be purged at one time
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.IdentityMappingEntry identity_mapping_entries = 1; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.IdentityMappingEntry getIdentityMappingEntries( + int index) { + return identityMappingEntries_.get(index); + } + + /** + * + * + *
            +     * A maximum of 10000 entries can be purged at one time
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.IdentityMappingEntry identity_mapping_entries = 1; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.IdentityMappingEntryOrBuilder + getIdentityMappingEntriesOrBuilder(int index) { + return identityMappingEntries_.get(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 { + for (int i = 0; i < identityMappingEntries_.size(); i++) { + output.writeMessage(1, identityMappingEntries_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < identityMappingEntries_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 1, identityMappingEntries_.get(i)); + } + 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.discoveryengine.v1beta.PurgeIdentityMappingsRequest.InlineSource)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1beta.PurgeIdentityMappingsRequest.InlineSource other = + (com.google.cloud.discoveryengine.v1beta.PurgeIdentityMappingsRequest.InlineSource) obj; + + if (!getIdentityMappingEntriesList().equals(other.getIdentityMappingEntriesList())) + 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 (getIdentityMappingEntriesCount() > 0) { + hash = (37 * hash) + IDENTITY_MAPPING_ENTRIES_FIELD_NUMBER; + hash = (53 * hash) + getIdentityMappingEntriesList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1beta.PurgeIdentityMappingsRequest.InlineSource + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.PurgeIdentityMappingsRequest.InlineSource + 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.discoveryengine.v1beta.PurgeIdentityMappingsRequest.InlineSource + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.PurgeIdentityMappingsRequest.InlineSource + 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.discoveryengine.v1beta.PurgeIdentityMappingsRequest.InlineSource + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.PurgeIdentityMappingsRequest.InlineSource + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1beta.PurgeIdentityMappingsRequest.InlineSource + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.PurgeIdentityMappingsRequest.InlineSource + 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.discoveryengine.v1beta.PurgeIdentityMappingsRequest.InlineSource + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.PurgeIdentityMappingsRequest.InlineSource + 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.discoveryengine.v1beta.PurgeIdentityMappingsRequest.InlineSource + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.PurgeIdentityMappingsRequest.InlineSource + 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.discoveryengine.v1beta.PurgeIdentityMappingsRequest.InlineSource + 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; + } + + /** + * + * + *
            +     * The inline source to purge identity mapping entries from.
            +     * 
            + * + * Protobuf type {@code + * google.cloud.discoveryengine.v1beta.PurgeIdentityMappingsRequest.InlineSource} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.PurgeIdentityMappingsRequest.InlineSource) + com.google.cloud.discoveryengine.v1beta.PurgeIdentityMappingsRequest.InlineSourceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.IdentityMappingStoreServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_PurgeIdentityMappingsRequest_InlineSource_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.IdentityMappingStoreServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_PurgeIdentityMappingsRequest_InlineSource_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.PurgeIdentityMappingsRequest.InlineSource + .class, + com.google.cloud.discoveryengine.v1beta.PurgeIdentityMappingsRequest.InlineSource + .Builder.class); + } + + // Construct using + // com.google.cloud.discoveryengine.v1beta.PurgeIdentityMappingsRequest.InlineSource.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (identityMappingEntriesBuilder_ == null) { + identityMappingEntries_ = java.util.Collections.emptyList(); + } else { + identityMappingEntries_ = null; + identityMappingEntriesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1beta.IdentityMappingStoreServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_PurgeIdentityMappingsRequest_InlineSource_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.PurgeIdentityMappingsRequest.InlineSource + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1beta.PurgeIdentityMappingsRequest.InlineSource + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.PurgeIdentityMappingsRequest.InlineSource + build() { + com.google.cloud.discoveryengine.v1beta.PurgeIdentityMappingsRequest.InlineSource result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.PurgeIdentityMappingsRequest.InlineSource + buildPartial() { + com.google.cloud.discoveryengine.v1beta.PurgeIdentityMappingsRequest.InlineSource result = + new com.google.cloud.discoveryengine.v1beta.PurgeIdentityMappingsRequest.InlineSource( + this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.discoveryengine.v1beta.PurgeIdentityMappingsRequest.InlineSource + result) { + if (identityMappingEntriesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + identityMappingEntries_ = + java.util.Collections.unmodifiableList(identityMappingEntries_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.identityMappingEntries_ = identityMappingEntries_; + } else { + result.identityMappingEntries_ = identityMappingEntriesBuilder_.build(); + } + } + + private void buildPartial0( + com.google.cloud.discoveryengine.v1beta.PurgeIdentityMappingsRequest.InlineSource + result) { + int from_bitField0_ = bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.discoveryengine.v1beta.PurgeIdentityMappingsRequest.InlineSource) { + return mergeFrom( + (com.google.cloud.discoveryengine.v1beta.PurgeIdentityMappingsRequest.InlineSource) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1beta.PurgeIdentityMappingsRequest.InlineSource other) { + if (other + == com.google.cloud.discoveryengine.v1beta.PurgeIdentityMappingsRequest.InlineSource + .getDefaultInstance()) return this; + if (identityMappingEntriesBuilder_ == null) { + if (!other.identityMappingEntries_.isEmpty()) { + if (identityMappingEntries_.isEmpty()) { + identityMappingEntries_ = other.identityMappingEntries_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureIdentityMappingEntriesIsMutable(); + identityMappingEntries_.addAll(other.identityMappingEntries_); + } + onChanged(); + } + } else { + if (!other.identityMappingEntries_.isEmpty()) { + if (identityMappingEntriesBuilder_.isEmpty()) { + identityMappingEntriesBuilder_.dispose(); + identityMappingEntriesBuilder_ = null; + identityMappingEntries_ = other.identityMappingEntries_; + bitField0_ = (bitField0_ & ~0x00000001); + identityMappingEntriesBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetIdentityMappingEntriesFieldBuilder() + : null; + } else { + identityMappingEntriesBuilder_.addAllMessages(other.identityMappingEntries_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.discoveryengine.v1beta.IdentityMappingEntry m = + input.readMessage( + com.google.cloud.discoveryengine.v1beta.IdentityMappingEntry.parser(), + extensionRegistry); + if (identityMappingEntriesBuilder_ == null) { + ensureIdentityMappingEntriesIsMutable(); + identityMappingEntries_.add(m); + } else { + identityMappingEntriesBuilder_.addMessage(m); + } + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List + identityMappingEntries_ = java.util.Collections.emptyList(); + + private void ensureIdentityMappingEntriesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + identityMappingEntries_ = + new java.util.ArrayList( + identityMappingEntries_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.discoveryengine.v1beta.IdentityMappingEntry, + com.google.cloud.discoveryengine.v1beta.IdentityMappingEntry.Builder, + com.google.cloud.discoveryengine.v1beta.IdentityMappingEntryOrBuilder> + identityMappingEntriesBuilder_; + + /** + * + * + *
            +       * A maximum of 10000 entries can be purged at one time
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.IdentityMappingEntry identity_mapping_entries = 1; + * + */ + public java.util.List + getIdentityMappingEntriesList() { + if (identityMappingEntriesBuilder_ == null) { + return java.util.Collections.unmodifiableList(identityMappingEntries_); + } else { + return identityMappingEntriesBuilder_.getMessageList(); + } + } + + /** + * + * + *
            +       * A maximum of 10000 entries can be purged at one time
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.IdentityMappingEntry identity_mapping_entries = 1; + * + */ + public int getIdentityMappingEntriesCount() { + if (identityMappingEntriesBuilder_ == null) { + return identityMappingEntries_.size(); + } else { + return identityMappingEntriesBuilder_.getCount(); + } + } + + /** + * + * + *
            +       * A maximum of 10000 entries can be purged at one time
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.IdentityMappingEntry identity_mapping_entries = 1; + * + */ + public com.google.cloud.discoveryengine.v1beta.IdentityMappingEntry getIdentityMappingEntries( + int index) { + if (identityMappingEntriesBuilder_ == null) { + return identityMappingEntries_.get(index); + } else { + return identityMappingEntriesBuilder_.getMessage(index); + } + } + + /** + * + * + *
            +       * A maximum of 10000 entries can be purged at one time
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.IdentityMappingEntry identity_mapping_entries = 1; + * + */ + public Builder setIdentityMappingEntries( + int index, com.google.cloud.discoveryengine.v1beta.IdentityMappingEntry value) { + if (identityMappingEntriesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureIdentityMappingEntriesIsMutable(); + identityMappingEntries_.set(index, value); + onChanged(); + } else { + identityMappingEntriesBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
            +       * A maximum of 10000 entries can be purged at one time
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.IdentityMappingEntry identity_mapping_entries = 1; + * + */ + public Builder setIdentityMappingEntries( + int index, + com.google.cloud.discoveryengine.v1beta.IdentityMappingEntry.Builder builderForValue) { + if (identityMappingEntriesBuilder_ == null) { + ensureIdentityMappingEntriesIsMutable(); + identityMappingEntries_.set(index, builderForValue.build()); + onChanged(); + } else { + identityMappingEntriesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
            +       * A maximum of 10000 entries can be purged at one time
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.IdentityMappingEntry identity_mapping_entries = 1; + * + */ + public Builder addIdentityMappingEntries( + com.google.cloud.discoveryengine.v1beta.IdentityMappingEntry value) { + if (identityMappingEntriesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureIdentityMappingEntriesIsMutable(); + identityMappingEntries_.add(value); + onChanged(); + } else { + identityMappingEntriesBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
            +       * A maximum of 10000 entries can be purged at one time
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.IdentityMappingEntry identity_mapping_entries = 1; + * + */ + public Builder addIdentityMappingEntries( + int index, com.google.cloud.discoveryengine.v1beta.IdentityMappingEntry value) { + if (identityMappingEntriesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureIdentityMappingEntriesIsMutable(); + identityMappingEntries_.add(index, value); + onChanged(); + } else { + identityMappingEntriesBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
            +       * A maximum of 10000 entries can be purged at one time
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.IdentityMappingEntry identity_mapping_entries = 1; + * + */ + public Builder addIdentityMappingEntries( + com.google.cloud.discoveryengine.v1beta.IdentityMappingEntry.Builder builderForValue) { + if (identityMappingEntriesBuilder_ == null) { + ensureIdentityMappingEntriesIsMutable(); + identityMappingEntries_.add(builderForValue.build()); + onChanged(); + } else { + identityMappingEntriesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
            +       * A maximum of 10000 entries can be purged at one time
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.IdentityMappingEntry identity_mapping_entries = 1; + * + */ + public Builder addIdentityMappingEntries( + int index, + com.google.cloud.discoveryengine.v1beta.IdentityMappingEntry.Builder builderForValue) { + if (identityMappingEntriesBuilder_ == null) { + ensureIdentityMappingEntriesIsMutable(); + identityMappingEntries_.add(index, builderForValue.build()); + onChanged(); + } else { + identityMappingEntriesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
            +       * A maximum of 10000 entries can be purged at one time
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.IdentityMappingEntry identity_mapping_entries = 1; + * + */ + public Builder addAllIdentityMappingEntries( + java.lang.Iterable + values) { + if (identityMappingEntriesBuilder_ == null) { + ensureIdentityMappingEntriesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, identityMappingEntries_); + onChanged(); + } else { + identityMappingEntriesBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
            +       * A maximum of 10000 entries can be purged at one time
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.IdentityMappingEntry identity_mapping_entries = 1; + * + */ + public Builder clearIdentityMappingEntries() { + if (identityMappingEntriesBuilder_ == null) { + identityMappingEntries_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + identityMappingEntriesBuilder_.clear(); + } + return this; + } + + /** + * + * + *
            +       * A maximum of 10000 entries can be purged at one time
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.IdentityMappingEntry identity_mapping_entries = 1; + * + */ + public Builder removeIdentityMappingEntries(int index) { + if (identityMappingEntriesBuilder_ == null) { + ensureIdentityMappingEntriesIsMutable(); + identityMappingEntries_.remove(index); + onChanged(); + } else { + identityMappingEntriesBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
            +       * A maximum of 10000 entries can be purged at one time
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.IdentityMappingEntry identity_mapping_entries = 1; + * + */ + public com.google.cloud.discoveryengine.v1beta.IdentityMappingEntry.Builder + getIdentityMappingEntriesBuilder(int index) { + return internalGetIdentityMappingEntriesFieldBuilder().getBuilder(index); + } + + /** + * + * + *
            +       * A maximum of 10000 entries can be purged at one time
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.IdentityMappingEntry identity_mapping_entries = 1; + * + */ + public com.google.cloud.discoveryengine.v1beta.IdentityMappingEntryOrBuilder + getIdentityMappingEntriesOrBuilder(int index) { + if (identityMappingEntriesBuilder_ == null) { + return identityMappingEntries_.get(index); + } else { + return identityMappingEntriesBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
            +       * A maximum of 10000 entries can be purged at one time
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.IdentityMappingEntry identity_mapping_entries = 1; + * + */ + public java.util.List< + ? extends com.google.cloud.discoveryengine.v1beta.IdentityMappingEntryOrBuilder> + getIdentityMappingEntriesOrBuilderList() { + if (identityMappingEntriesBuilder_ != null) { + return identityMappingEntriesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(identityMappingEntries_); + } + } + + /** + * + * + *
            +       * A maximum of 10000 entries can be purged at one time
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.IdentityMappingEntry identity_mapping_entries = 1; + * + */ + public com.google.cloud.discoveryengine.v1beta.IdentityMappingEntry.Builder + addIdentityMappingEntriesBuilder() { + return internalGetIdentityMappingEntriesFieldBuilder() + .addBuilder( + com.google.cloud.discoveryengine.v1beta.IdentityMappingEntry.getDefaultInstance()); + } + + /** + * + * + *
            +       * A maximum of 10000 entries can be purged at one time
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.IdentityMappingEntry identity_mapping_entries = 1; + * + */ + public com.google.cloud.discoveryengine.v1beta.IdentityMappingEntry.Builder + addIdentityMappingEntriesBuilder(int index) { + return internalGetIdentityMappingEntriesFieldBuilder() + .addBuilder( + index, + com.google.cloud.discoveryengine.v1beta.IdentityMappingEntry.getDefaultInstance()); + } + + /** + * + * + *
            +       * A maximum of 10000 entries can be purged at one time
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.IdentityMappingEntry identity_mapping_entries = 1; + * + */ + public java.util.List + getIdentityMappingEntriesBuilderList() { + return internalGetIdentityMappingEntriesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.discoveryengine.v1beta.IdentityMappingEntry, + com.google.cloud.discoveryengine.v1beta.IdentityMappingEntry.Builder, + com.google.cloud.discoveryengine.v1beta.IdentityMappingEntryOrBuilder> + internalGetIdentityMappingEntriesFieldBuilder() { + if (identityMappingEntriesBuilder_ == null) { + identityMappingEntriesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.discoveryengine.v1beta.IdentityMappingEntry, + com.google.cloud.discoveryengine.v1beta.IdentityMappingEntry.Builder, + com.google.cloud.discoveryengine.v1beta.IdentityMappingEntryOrBuilder>( + identityMappingEntries_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + identityMappingEntries_ = null; + } + return identityMappingEntriesBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.PurgeIdentityMappingsRequest.InlineSource) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.PurgeIdentityMappingsRequest.InlineSource) + private static final com.google.cloud.discoveryengine.v1beta.PurgeIdentityMappingsRequest + .InlineSource + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.discoveryengine.v1beta.PurgeIdentityMappingsRequest.InlineSource(); + } + + public static com.google.cloud.discoveryengine.v1beta.PurgeIdentityMappingsRequest.InlineSource + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public InlineSource parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.PurgeIdentityMappingsRequest.InlineSource + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int bitField0_; + private int sourceCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object source_; + + public enum SourceCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + INLINE_SOURCE(2), + SOURCE_NOT_SET(0); + private final int value; + + private SourceCase(int value) { + this.value = value; + } + + /** + * @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 SourceCase valueOf(int value) { + return forNumber(value); + } + + public static SourceCase forNumber(int value) { + switch (value) { + case 2: + return INLINE_SOURCE; + case 0: + return SOURCE_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public SourceCase getSourceCase() { + return SourceCase.forNumber(sourceCase_); + } + + public static final int INLINE_SOURCE_FIELD_NUMBER = 2; + + /** + * + * + *
            +   * The inline source to purge identity mapping entries from.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.PurgeIdentityMappingsRequest.InlineSource inline_source = 2; + * + * + * @return Whether the inlineSource field is set. + */ + @java.lang.Override + public boolean hasInlineSource() { + return sourceCase_ == 2; + } + + /** + * + * + *
            +   * The inline source to purge identity mapping entries from.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.PurgeIdentityMappingsRequest.InlineSource inline_source = 2; + * + * + * @return The inlineSource. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.PurgeIdentityMappingsRequest.InlineSource + getInlineSource() { + if (sourceCase_ == 2) { + return (com.google.cloud.discoveryengine.v1beta.PurgeIdentityMappingsRequest.InlineSource) + source_; + } + return com.google.cloud.discoveryengine.v1beta.PurgeIdentityMappingsRequest.InlineSource + .getDefaultInstance(); + } + + /** + * + * + *
            +   * The inline source to purge identity mapping entries from.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.PurgeIdentityMappingsRequest.InlineSource inline_source = 2; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.PurgeIdentityMappingsRequest.InlineSourceOrBuilder + getInlineSourceOrBuilder() { + if (sourceCase_ == 2) { + return (com.google.cloud.discoveryengine.v1beta.PurgeIdentityMappingsRequest.InlineSource) + source_; + } + return com.google.cloud.discoveryengine.v1beta.PurgeIdentityMappingsRequest.InlineSource + .getDefaultInstance(); + } + + public static final int IDENTITY_MAPPING_STORE_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object identityMappingStore_ = ""; + + /** + * + * + *
            +   * Required. The name of the Identity Mapping Store to purge Identity Mapping
            +   * Entries from. Format:
            +   * `projects/{project}/locations/{location}/identityMappingStores/{identityMappingStore}`
            +   * 
            + * + * + * string identity_mapping_store = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The identityMappingStore. + */ + @java.lang.Override + public java.lang.String getIdentityMappingStore() { + java.lang.Object ref = identityMappingStore_; + 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(); + identityMappingStore_ = s; + return s; + } + } + + /** + * + * + *
            +   * Required. The name of the Identity Mapping Store to purge Identity Mapping
            +   * Entries from. Format:
            +   * `projects/{project}/locations/{location}/identityMappingStores/{identityMappingStore}`
            +   * 
            + * + * + * string identity_mapping_store = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for identityMappingStore. + */ + @java.lang.Override + public com.google.protobuf.ByteString getIdentityMappingStoreBytes() { + java.lang.Object ref = identityMappingStore_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + identityMappingStore_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FILTER_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object filter_ = ""; + + /** + * + * + *
            +   * Filter matching identity mappings to purge.
            +   * The eligible field for filtering is:
            +   *
            +   * * `update_time`: in ISO 8601 "zulu" format.
            +   * * `external_id`
            +   *
            +   * Examples:
            +   *
            +   * * Deleting all identity mappings updated in a time range:
            +   * `update_time > "2012-04-23T18:25:43.511Z" AND update_time <
            +   * "2012-04-23T18:30:43.511Z"`
            +   * * Deleting all identity mappings for a given external_id:
            +   * `external_id = "id1"`
            +   * * Deleting all identity mappings inside an identity mapping store:
            +   * `*`
            +   *
            +   * The filtering fields are assumed to have an implicit AND.
            +   * Should not be used with source. An error will be thrown, if both are
            +   * provided.
            +   * 
            + * + * string filter = 3; + * + * @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; + } + } + + /** + * + * + *
            +   * Filter matching identity mappings to purge.
            +   * The eligible field for filtering is:
            +   *
            +   * * `update_time`: in ISO 8601 "zulu" format.
            +   * * `external_id`
            +   *
            +   * Examples:
            +   *
            +   * * Deleting all identity mappings updated in a time range:
            +   * `update_time > "2012-04-23T18:25:43.511Z" AND update_time <
            +   * "2012-04-23T18:30:43.511Z"`
            +   * * Deleting all identity mappings for a given external_id:
            +   * `external_id = "id1"`
            +   * * Deleting all identity mappings inside an identity mapping store:
            +   * `*`
            +   *
            +   * The filtering fields are assumed to have an implicit AND.
            +   * Should not be used with source. An error will be thrown, if both are
            +   * provided.
            +   * 
            + * + * string filter = 3; + * + * @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 FORCE_FIELD_NUMBER = 4; + private boolean force_ = false; + + /** + * + * + *
            +   * Actually performs the purge. If `force` is set to false, return the
            +   * expected purge count without deleting any identity mappings. This field is
            +   * only supported for purge with filter. For input source this field is
            +   * ignored and data will be purged regardless of the value of this field.
            +   * 
            + * + * optional bool force = 4; + * + * @return Whether the force field is set. + */ + @java.lang.Override + public boolean hasForce() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
            +   * Actually performs the purge. If `force` is set to false, return the
            +   * expected purge count without deleting any identity mappings. This field is
            +   * only supported for purge with filter. For input source this field is
            +   * ignored and data will be purged regardless of the value of this field.
            +   * 
            + * + * optional bool force = 4; + * + * @return The force. + */ + @java.lang.Override + public boolean getForce() { + return force_; + } + + 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(identityMappingStore_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, identityMappingStore_); + } + if (sourceCase_ == 2) { + output.writeMessage( + 2, + (com.google.cloud.discoveryengine.v1beta.PurgeIdentityMappingsRequest.InlineSource) + source_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(filter_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, filter_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeBool(4, force_); + } + 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(identityMappingStore_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, identityMappingStore_); + } + if (sourceCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, + (com.google.cloud.discoveryengine.v1beta.PurgeIdentityMappingsRequest.InlineSource) + source_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(filter_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, filter_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(4, force_); + } + 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.discoveryengine.v1beta.PurgeIdentityMappingsRequest)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1beta.PurgeIdentityMappingsRequest other = + (com.google.cloud.discoveryengine.v1beta.PurgeIdentityMappingsRequest) obj; + + if (!getIdentityMappingStore().equals(other.getIdentityMappingStore())) return false; + if (!getFilter().equals(other.getFilter())) return false; + if (hasForce() != other.hasForce()) return false; + if (hasForce()) { + if (getForce() != other.getForce()) return false; + } + if (!getSourceCase().equals(other.getSourceCase())) return false; + switch (sourceCase_) { + case 2: + if (!getInlineSource().equals(other.getInlineSource())) return false; + break; + case 0: + default: + } + 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) + IDENTITY_MAPPING_STORE_FIELD_NUMBER; + hash = (53 * hash) + getIdentityMappingStore().hashCode(); + hash = (37 * hash) + FILTER_FIELD_NUMBER; + hash = (53 * hash) + getFilter().hashCode(); + if (hasForce()) { + hash = (37 * hash) + FORCE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getForce()); + } + switch (sourceCase_) { + case 2: + hash = (37 * hash) + INLINE_SOURCE_FIELD_NUMBER; + hash = (53 * hash) + getInlineSource().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1beta.PurgeIdentityMappingsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.PurgeIdentityMappingsRequest 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.discoveryengine.v1beta.PurgeIdentityMappingsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.PurgeIdentityMappingsRequest 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.discoveryengine.v1beta.PurgeIdentityMappingsRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.PurgeIdentityMappingsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1beta.PurgeIdentityMappingsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.PurgeIdentityMappingsRequest 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.discoveryengine.v1beta.PurgeIdentityMappingsRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.PurgeIdentityMappingsRequest + 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.discoveryengine.v1beta.PurgeIdentityMappingsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.PurgeIdentityMappingsRequest 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.discoveryengine.v1beta.PurgeIdentityMappingsRequest 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
            +   * [IdentityMappingStoreService.PurgeIdentityMappings][google.cloud.discoveryengine.v1beta.IdentityMappingStoreService.PurgeIdentityMappings]
            +   * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.PurgeIdentityMappingsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.PurgeIdentityMappingsRequest) + com.google.cloud.discoveryengine.v1beta.PurgeIdentityMappingsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.IdentityMappingStoreServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_PurgeIdentityMappingsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.IdentityMappingStoreServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_PurgeIdentityMappingsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.PurgeIdentityMappingsRequest.class, + com.google.cloud.discoveryengine.v1beta.PurgeIdentityMappingsRequest.Builder.class); + } + + // Construct using + // com.google.cloud.discoveryengine.v1beta.PurgeIdentityMappingsRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (inlineSourceBuilder_ != null) { + inlineSourceBuilder_.clear(); + } + identityMappingStore_ = ""; + filter_ = ""; + force_ = false; + sourceCase_ = 0; + source_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1beta.IdentityMappingStoreServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_PurgeIdentityMappingsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.PurgeIdentityMappingsRequest + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1beta.PurgeIdentityMappingsRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.PurgeIdentityMappingsRequest build() { + com.google.cloud.discoveryengine.v1beta.PurgeIdentityMappingsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.PurgeIdentityMappingsRequest buildPartial() { + com.google.cloud.discoveryengine.v1beta.PurgeIdentityMappingsRequest result = + new com.google.cloud.discoveryengine.v1beta.PurgeIdentityMappingsRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.discoveryengine.v1beta.PurgeIdentityMappingsRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.identityMappingStore_ = identityMappingStore_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.filter_ = filter_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000008) != 0)) { + result.force_ = force_; + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + private void buildPartialOneofs( + com.google.cloud.discoveryengine.v1beta.PurgeIdentityMappingsRequest result) { + result.sourceCase_ = sourceCase_; + result.source_ = this.source_; + if (sourceCase_ == 2 && inlineSourceBuilder_ != null) { + result.source_ = inlineSourceBuilder_.build(); + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.discoveryengine.v1beta.PurgeIdentityMappingsRequest) { + return mergeFrom( + (com.google.cloud.discoveryengine.v1beta.PurgeIdentityMappingsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1beta.PurgeIdentityMappingsRequest other) { + if (other + == com.google.cloud.discoveryengine.v1beta.PurgeIdentityMappingsRequest + .getDefaultInstance()) return this; + if (!other.getIdentityMappingStore().isEmpty()) { + identityMappingStore_ = other.identityMappingStore_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getFilter().isEmpty()) { + filter_ = other.filter_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (other.hasForce()) { + setForce(other.getForce()); + } + switch (other.getSourceCase()) { + case INLINE_SOURCE: + { + mergeInlineSource(other.getInlineSource()); + break; + } + case SOURCE_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + identityMappingStore_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 10 + case 18: + { + input.readMessage( + internalGetInlineSourceFieldBuilder().getBuilder(), extensionRegistry); + sourceCase_ = 2; + break; + } // case 18 + case 26: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 32: + { + force_ = input.readBool(); + bitField0_ |= 0x00000008; + break; + } // case 32 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int sourceCase_ = 0; + private java.lang.Object source_; + + public SourceCase getSourceCase() { + return SourceCase.forNumber(sourceCase_); + } + + public Builder clearSource() { + sourceCase_ = 0; + source_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.PurgeIdentityMappingsRequest.InlineSource, + com.google.cloud.discoveryengine.v1beta.PurgeIdentityMappingsRequest.InlineSource + .Builder, + com.google.cloud.discoveryengine.v1beta.PurgeIdentityMappingsRequest + .InlineSourceOrBuilder> + inlineSourceBuilder_; + + /** + * + * + *
            +     * The inline source to purge identity mapping entries from.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.PurgeIdentityMappingsRequest.InlineSource inline_source = 2; + * + * + * @return Whether the inlineSource field is set. + */ + @java.lang.Override + public boolean hasInlineSource() { + return sourceCase_ == 2; + } + + /** + * + * + *
            +     * The inline source to purge identity mapping entries from.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.PurgeIdentityMappingsRequest.InlineSource inline_source = 2; + * + * + * @return The inlineSource. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.PurgeIdentityMappingsRequest.InlineSource + getInlineSource() { + if (inlineSourceBuilder_ == null) { + if (sourceCase_ == 2) { + return (com.google.cloud.discoveryengine.v1beta.PurgeIdentityMappingsRequest.InlineSource) + source_; + } + return com.google.cloud.discoveryengine.v1beta.PurgeIdentityMappingsRequest.InlineSource + .getDefaultInstance(); + } else { + if (sourceCase_ == 2) { + return inlineSourceBuilder_.getMessage(); + } + return com.google.cloud.discoveryengine.v1beta.PurgeIdentityMappingsRequest.InlineSource + .getDefaultInstance(); + } + } + + /** + * + * + *
            +     * The inline source to purge identity mapping entries from.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.PurgeIdentityMappingsRequest.InlineSource inline_source = 2; + * + */ + public Builder setInlineSource( + com.google.cloud.discoveryengine.v1beta.PurgeIdentityMappingsRequest.InlineSource value) { + if (inlineSourceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + source_ = value; + onChanged(); + } else { + inlineSourceBuilder_.setMessage(value); + } + sourceCase_ = 2; + return this; + } + + /** + * + * + *
            +     * The inline source to purge identity mapping entries from.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.PurgeIdentityMappingsRequest.InlineSource inline_source = 2; + * + */ + public Builder setInlineSource( + com.google.cloud.discoveryengine.v1beta.PurgeIdentityMappingsRequest.InlineSource.Builder + builderForValue) { + if (inlineSourceBuilder_ == null) { + source_ = builderForValue.build(); + onChanged(); + } else { + inlineSourceBuilder_.setMessage(builderForValue.build()); + } + sourceCase_ = 2; + return this; + } + + /** + * + * + *
            +     * The inline source to purge identity mapping entries from.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.PurgeIdentityMappingsRequest.InlineSource inline_source = 2; + * + */ + public Builder mergeInlineSource( + com.google.cloud.discoveryengine.v1beta.PurgeIdentityMappingsRequest.InlineSource value) { + if (inlineSourceBuilder_ == null) { + if (sourceCase_ == 2 + && source_ + != com.google.cloud.discoveryengine.v1beta.PurgeIdentityMappingsRequest.InlineSource + .getDefaultInstance()) { + source_ = + com.google.cloud.discoveryengine.v1beta.PurgeIdentityMappingsRequest.InlineSource + .newBuilder( + (com.google.cloud.discoveryengine.v1beta.PurgeIdentityMappingsRequest + .InlineSource) + source_) + .mergeFrom(value) + .buildPartial(); + } else { + source_ = value; + } + onChanged(); + } else { + if (sourceCase_ == 2) { + inlineSourceBuilder_.mergeFrom(value); + } else { + inlineSourceBuilder_.setMessage(value); + } + } + sourceCase_ = 2; + return this; + } + + /** + * + * + *
            +     * The inline source to purge identity mapping entries from.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.PurgeIdentityMappingsRequest.InlineSource inline_source = 2; + * + */ + public Builder clearInlineSource() { + if (inlineSourceBuilder_ == null) { + if (sourceCase_ == 2) { + sourceCase_ = 0; + source_ = null; + onChanged(); + } + } else { + if (sourceCase_ == 2) { + sourceCase_ = 0; + source_ = null; + } + inlineSourceBuilder_.clear(); + } + return this; + } + + /** + * + * + *
            +     * The inline source to purge identity mapping entries from.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.PurgeIdentityMappingsRequest.InlineSource inline_source = 2; + * + */ + public com.google.cloud.discoveryengine.v1beta.PurgeIdentityMappingsRequest.InlineSource.Builder + getInlineSourceBuilder() { + return internalGetInlineSourceFieldBuilder().getBuilder(); + } + + /** + * + * + *
            +     * The inline source to purge identity mapping entries from.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.PurgeIdentityMappingsRequest.InlineSource inline_source = 2; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.PurgeIdentityMappingsRequest + .InlineSourceOrBuilder + getInlineSourceOrBuilder() { + if ((sourceCase_ == 2) && (inlineSourceBuilder_ != null)) { + return inlineSourceBuilder_.getMessageOrBuilder(); + } else { + if (sourceCase_ == 2) { + return (com.google.cloud.discoveryengine.v1beta.PurgeIdentityMappingsRequest.InlineSource) + source_; + } + return com.google.cloud.discoveryengine.v1beta.PurgeIdentityMappingsRequest.InlineSource + .getDefaultInstance(); + } + } + + /** + * + * + *
            +     * The inline source to purge identity mapping entries from.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.PurgeIdentityMappingsRequest.InlineSource inline_source = 2; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.PurgeIdentityMappingsRequest.InlineSource, + com.google.cloud.discoveryengine.v1beta.PurgeIdentityMappingsRequest.InlineSource + .Builder, + com.google.cloud.discoveryengine.v1beta.PurgeIdentityMappingsRequest + .InlineSourceOrBuilder> + internalGetInlineSourceFieldBuilder() { + if (inlineSourceBuilder_ == null) { + if (!(sourceCase_ == 2)) { + source_ = + com.google.cloud.discoveryengine.v1beta.PurgeIdentityMappingsRequest.InlineSource + .getDefaultInstance(); + } + inlineSourceBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.PurgeIdentityMappingsRequest.InlineSource, + com.google.cloud.discoveryengine.v1beta.PurgeIdentityMappingsRequest.InlineSource + .Builder, + com.google.cloud.discoveryengine.v1beta.PurgeIdentityMappingsRequest + .InlineSourceOrBuilder>( + (com.google.cloud.discoveryengine.v1beta.PurgeIdentityMappingsRequest.InlineSource) + source_, + getParentForChildren(), + isClean()); + source_ = null; + } + sourceCase_ = 2; + onChanged(); + return inlineSourceBuilder_; + } + + private java.lang.Object identityMappingStore_ = ""; + + /** + * + * + *
            +     * Required. The name of the Identity Mapping Store to purge Identity Mapping
            +     * Entries from. Format:
            +     * `projects/{project}/locations/{location}/identityMappingStores/{identityMappingStore}`
            +     * 
            + * + * + * string identity_mapping_store = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The identityMappingStore. + */ + public java.lang.String getIdentityMappingStore() { + java.lang.Object ref = identityMappingStore_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + identityMappingStore_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
            +     * Required. The name of the Identity Mapping Store to purge Identity Mapping
            +     * Entries from. Format:
            +     * `projects/{project}/locations/{location}/identityMappingStores/{identityMappingStore}`
            +     * 
            + * + * + * string identity_mapping_store = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for identityMappingStore. + */ + public com.google.protobuf.ByteString getIdentityMappingStoreBytes() { + java.lang.Object ref = identityMappingStore_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + identityMappingStore_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
            +     * Required. The name of the Identity Mapping Store to purge Identity Mapping
            +     * Entries from. Format:
            +     * `projects/{project}/locations/{location}/identityMappingStores/{identityMappingStore}`
            +     * 
            + * + * + * string identity_mapping_store = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The identityMappingStore to set. + * @return This builder for chaining. + */ + public Builder setIdentityMappingStore(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + identityMappingStore_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Required. The name of the Identity Mapping Store to purge Identity Mapping
            +     * Entries from. Format:
            +     * `projects/{project}/locations/{location}/identityMappingStores/{identityMappingStore}`
            +     * 
            + * + * + * string identity_mapping_store = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearIdentityMappingStore() { + identityMappingStore_ = getDefaultInstance().getIdentityMappingStore(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
            +     * Required. The name of the Identity Mapping Store to purge Identity Mapping
            +     * Entries from. Format:
            +     * `projects/{project}/locations/{location}/identityMappingStores/{identityMappingStore}`
            +     * 
            + * + * + * string identity_mapping_store = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for identityMappingStore to set. + * @return This builder for chaining. + */ + public Builder setIdentityMappingStoreBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + identityMappingStore_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object filter_ = ""; + + /** + * + * + *
            +     * Filter matching identity mappings to purge.
            +     * The eligible field for filtering is:
            +     *
            +     * * `update_time`: in ISO 8601 "zulu" format.
            +     * * `external_id`
            +     *
            +     * Examples:
            +     *
            +     * * Deleting all identity mappings updated in a time range:
            +     * `update_time > "2012-04-23T18:25:43.511Z" AND update_time <
            +     * "2012-04-23T18:30:43.511Z"`
            +     * * Deleting all identity mappings for a given external_id:
            +     * `external_id = "id1"`
            +     * * Deleting all identity mappings inside an identity mapping store:
            +     * `*`
            +     *
            +     * The filtering fields are assumed to have an implicit AND.
            +     * Should not be used with source. An error will be thrown, if both are
            +     * provided.
            +     * 
            + * + * string filter = 3; + * + * @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; + } + } + + /** + * + * + *
            +     * Filter matching identity mappings to purge.
            +     * The eligible field for filtering is:
            +     *
            +     * * `update_time`: in ISO 8601 "zulu" format.
            +     * * `external_id`
            +     *
            +     * Examples:
            +     *
            +     * * Deleting all identity mappings updated in a time range:
            +     * `update_time > "2012-04-23T18:25:43.511Z" AND update_time <
            +     * "2012-04-23T18:30:43.511Z"`
            +     * * Deleting all identity mappings for a given external_id:
            +     * `external_id = "id1"`
            +     * * Deleting all identity mappings inside an identity mapping store:
            +     * `*`
            +     *
            +     * The filtering fields are assumed to have an implicit AND.
            +     * Should not be used with source. An error will be thrown, if both are
            +     * provided.
            +     * 
            + * + * string filter = 3; + * + * @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; + } + } + + /** + * + * + *
            +     * Filter matching identity mappings to purge.
            +     * The eligible field for filtering is:
            +     *
            +     * * `update_time`: in ISO 8601 "zulu" format.
            +     * * `external_id`
            +     *
            +     * Examples:
            +     *
            +     * * Deleting all identity mappings updated in a time range:
            +     * `update_time > "2012-04-23T18:25:43.511Z" AND update_time <
            +     * "2012-04-23T18:30:43.511Z"`
            +     * * Deleting all identity mappings for a given external_id:
            +     * `external_id = "id1"`
            +     * * Deleting all identity mappings inside an identity mapping store:
            +     * `*`
            +     *
            +     * The filtering fields are assumed to have an implicit AND.
            +     * Should not be used with source. An error will be thrown, if both are
            +     * provided.
            +     * 
            + * + * string filter = 3; + * + * @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_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Filter matching identity mappings to purge.
            +     * The eligible field for filtering is:
            +     *
            +     * * `update_time`: in ISO 8601 "zulu" format.
            +     * * `external_id`
            +     *
            +     * Examples:
            +     *
            +     * * Deleting all identity mappings updated in a time range:
            +     * `update_time > "2012-04-23T18:25:43.511Z" AND update_time <
            +     * "2012-04-23T18:30:43.511Z"`
            +     * * Deleting all identity mappings for a given external_id:
            +     * `external_id = "id1"`
            +     * * Deleting all identity mappings inside an identity mapping store:
            +     * `*`
            +     *
            +     * The filtering fields are assumed to have an implicit AND.
            +     * Should not be used with source. An error will be thrown, if both are
            +     * provided.
            +     * 
            + * + * string filter = 3; + * + * @return This builder for chaining. + */ + public Builder clearFilter() { + filter_ = getDefaultInstance().getFilter(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
            +     * Filter matching identity mappings to purge.
            +     * The eligible field for filtering is:
            +     *
            +     * * `update_time`: in ISO 8601 "zulu" format.
            +     * * `external_id`
            +     *
            +     * Examples:
            +     *
            +     * * Deleting all identity mappings updated in a time range:
            +     * `update_time > "2012-04-23T18:25:43.511Z" AND update_time <
            +     * "2012-04-23T18:30:43.511Z"`
            +     * * Deleting all identity mappings for a given external_id:
            +     * `external_id = "id1"`
            +     * * Deleting all identity mappings inside an identity mapping store:
            +     * `*`
            +     *
            +     * The filtering fields are assumed to have an implicit AND.
            +     * Should not be used with source. An error will be thrown, if both are
            +     * provided.
            +     * 
            + * + * string filter = 3; + * + * @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_ |= 0x00000004; + onChanged(); + return this; + } + + private boolean force_; + + /** + * + * + *
            +     * Actually performs the purge. If `force` is set to false, return the
            +     * expected purge count without deleting any identity mappings. This field is
            +     * only supported for purge with filter. For input source this field is
            +     * ignored and data will be purged regardless of the value of this field.
            +     * 
            + * + * optional bool force = 4; + * + * @return Whether the force field is set. + */ + @java.lang.Override + public boolean hasForce() { + return ((bitField0_ & 0x00000008) != 0); + } + + /** + * + * + *
            +     * Actually performs the purge. If `force` is set to false, return the
            +     * expected purge count without deleting any identity mappings. This field is
            +     * only supported for purge with filter. For input source this field is
            +     * ignored and data will be purged regardless of the value of this field.
            +     * 
            + * + * optional bool force = 4; + * + * @return The force. + */ + @java.lang.Override + public boolean getForce() { + return force_; + } + + /** + * + * + *
            +     * Actually performs the purge. If `force` is set to false, return the
            +     * expected purge count without deleting any identity mappings. This field is
            +     * only supported for purge with filter. For input source this field is
            +     * ignored and data will be purged regardless of the value of this field.
            +     * 
            + * + * optional bool force = 4; + * + * @param value The force to set. + * @return This builder for chaining. + */ + public Builder setForce(boolean value) { + + force_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Actually performs the purge. If `force` is set to false, return the
            +     * expected purge count without deleting any identity mappings. This field is
            +     * only supported for purge with filter. For input source this field is
            +     * ignored and data will be purged regardless of the value of this field.
            +     * 
            + * + * optional bool force = 4; + * + * @return This builder for chaining. + */ + public Builder clearForce() { + bitField0_ = (bitField0_ & ~0x00000008); + force_ = false; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.PurgeIdentityMappingsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.PurgeIdentityMappingsRequest) + private static final com.google.cloud.discoveryengine.v1beta.PurgeIdentityMappingsRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.discoveryengine.v1beta.PurgeIdentityMappingsRequest(); + } + + public static com.google.cloud.discoveryengine.v1beta.PurgeIdentityMappingsRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PurgeIdentityMappingsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.PurgeIdentityMappingsRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/PurgeIdentityMappingsRequestOrBuilder.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/PurgeIdentityMappingsRequestOrBuilder.java new file mode 100644 index 000000000000..36f6ce292d56 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/PurgeIdentityMappingsRequestOrBuilder.java @@ -0,0 +1,203 @@ +/* + * 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/cloud/discoveryengine/v1beta/identity_mapping_store_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.discoveryengine.v1beta; + +@com.google.protobuf.Generated +public interface PurgeIdentityMappingsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.PurgeIdentityMappingsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
            +   * The inline source to purge identity mapping entries from.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.PurgeIdentityMappingsRequest.InlineSource inline_source = 2; + * + * + * @return Whether the inlineSource field is set. + */ + boolean hasInlineSource(); + + /** + * + * + *
            +   * The inline source to purge identity mapping entries from.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.PurgeIdentityMappingsRequest.InlineSource inline_source = 2; + * + * + * @return The inlineSource. + */ + com.google.cloud.discoveryengine.v1beta.PurgeIdentityMappingsRequest.InlineSource + getInlineSource(); + + /** + * + * + *
            +   * The inline source to purge identity mapping entries from.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.PurgeIdentityMappingsRequest.InlineSource inline_source = 2; + * + */ + com.google.cloud.discoveryengine.v1beta.PurgeIdentityMappingsRequest.InlineSourceOrBuilder + getInlineSourceOrBuilder(); + + /** + * + * + *
            +   * Required. The name of the Identity Mapping Store to purge Identity Mapping
            +   * Entries from. Format:
            +   * `projects/{project}/locations/{location}/identityMappingStores/{identityMappingStore}`
            +   * 
            + * + * + * string identity_mapping_store = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The identityMappingStore. + */ + java.lang.String getIdentityMappingStore(); + + /** + * + * + *
            +   * Required. The name of the Identity Mapping Store to purge Identity Mapping
            +   * Entries from. Format:
            +   * `projects/{project}/locations/{location}/identityMappingStores/{identityMappingStore}`
            +   * 
            + * + * + * string identity_mapping_store = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for identityMappingStore. + */ + com.google.protobuf.ByteString getIdentityMappingStoreBytes(); + + /** + * + * + *
            +   * Filter matching identity mappings to purge.
            +   * The eligible field for filtering is:
            +   *
            +   * * `update_time`: in ISO 8601 "zulu" format.
            +   * * `external_id`
            +   *
            +   * Examples:
            +   *
            +   * * Deleting all identity mappings updated in a time range:
            +   * `update_time > "2012-04-23T18:25:43.511Z" AND update_time <
            +   * "2012-04-23T18:30:43.511Z"`
            +   * * Deleting all identity mappings for a given external_id:
            +   * `external_id = "id1"`
            +   * * Deleting all identity mappings inside an identity mapping store:
            +   * `*`
            +   *
            +   * The filtering fields are assumed to have an implicit AND.
            +   * Should not be used with source. An error will be thrown, if both are
            +   * provided.
            +   * 
            + * + * string filter = 3; + * + * @return The filter. + */ + java.lang.String getFilter(); + + /** + * + * + *
            +   * Filter matching identity mappings to purge.
            +   * The eligible field for filtering is:
            +   *
            +   * * `update_time`: in ISO 8601 "zulu" format.
            +   * * `external_id`
            +   *
            +   * Examples:
            +   *
            +   * * Deleting all identity mappings updated in a time range:
            +   * `update_time > "2012-04-23T18:25:43.511Z" AND update_time <
            +   * "2012-04-23T18:30:43.511Z"`
            +   * * Deleting all identity mappings for a given external_id:
            +   * `external_id = "id1"`
            +   * * Deleting all identity mappings inside an identity mapping store:
            +   * `*`
            +   *
            +   * The filtering fields are assumed to have an implicit AND.
            +   * Should not be used with source. An error will be thrown, if both are
            +   * provided.
            +   * 
            + * + * string filter = 3; + * + * @return The bytes for filter. + */ + com.google.protobuf.ByteString getFilterBytes(); + + /** + * + * + *
            +   * Actually performs the purge. If `force` is set to false, return the
            +   * expected purge count without deleting any identity mappings. This field is
            +   * only supported for purge with filter. For input source this field is
            +   * ignored and data will be purged regardless of the value of this field.
            +   * 
            + * + * optional bool force = 4; + * + * @return Whether the force field is set. + */ + boolean hasForce(); + + /** + * + * + *
            +   * Actually performs the purge. If `force` is set to false, return the
            +   * expected purge count without deleting any identity mappings. This field is
            +   * only supported for purge with filter. For input source this field is
            +   * ignored and data will be purged regardless of the value of this field.
            +   * 
            + * + * optional bool force = 4; + * + * @return The force. + */ + boolean getForce(); + + com.google.cloud.discoveryengine.v1beta.PurgeIdentityMappingsRequest.SourceCase getSourceCase(); +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/PurgeUserEventsRequest.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/PurgeUserEventsRequest.java index 2f62353bc2f4..221f229384be 100644 --- a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/PurgeUserEventsRequest.java +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/PurgeUserEventsRequest.java @@ -153,16 +153,20 @@ public com.google.protobuf.ByteString getParentBytes() { * * `userId`: Double quoted string. Specifying this will delete all events * associated with a user. * + * Note: This API only supports purging a max range of 30 days. + * * Examples: * * * Deleting all events in a time range: * `eventTime > "2012-04-23T18:25:43.511Z" * eventTime < "2012-04-23T18:30:43.511Z"` - * * Deleting specific eventType: - * `eventType = "search"` - * * Deleting all events for a specific visitor: - * `userPseudoId = "visitor1024"` - * * Deleting all events inside a DataStore: + * * Deleting specific eventType in a time range: + * `eventTime > "2012-04-23T18:25:43.511Z" + * eventTime < "2012-04-23T18:30:43.511Z" eventType = "search"` + * * Deleting all events for a specific visitor in a time range: + * `eventTime > "2012-04-23T18:25:43.511Z" + * eventTime < "2012-04-23T18:30:43.511Z" userPseudoId = "visitor1024"` + * * Deleting the past 30 days of events inside a DataStore: * `*` * * The filtering fields are assumed to have an implicit AND. @@ -201,16 +205,20 @@ public java.lang.String getFilter() { * * `userId`: Double quoted string. Specifying this will delete all events * associated with a user. * + * Note: This API only supports purging a max range of 30 days. + * * Examples: * * * Deleting all events in a time range: * `eventTime > "2012-04-23T18:25:43.511Z" * eventTime < "2012-04-23T18:30:43.511Z"` - * * Deleting specific eventType: - * `eventType = "search"` - * * Deleting all events for a specific visitor: - * `userPseudoId = "visitor1024"` - * * Deleting all events inside a DataStore: + * * Deleting specific eventType in a time range: + * `eventTime > "2012-04-23T18:25:43.511Z" + * eventTime < "2012-04-23T18:30:43.511Z" eventType = "search"` + * * Deleting all events for a specific visitor in a time range: + * `eventTime > "2012-04-23T18:25:43.511Z" + * eventTime < "2012-04-23T18:30:43.511Z" userPseudoId = "visitor1024"` + * * Deleting the past 30 days of events inside a DataStore: * `*` * * The filtering fields are assumed to have an implicit AND. @@ -766,16 +774,20 @@ public Builder setParentBytes(com.google.protobuf.ByteString value) { * * `userId`: Double quoted string. Specifying this will delete all events * associated with a user. * + * Note: This API only supports purging a max range of 30 days. + * * Examples: * * * Deleting all events in a time range: * `eventTime > "2012-04-23T18:25:43.511Z" * eventTime < "2012-04-23T18:30:43.511Z"` - * * Deleting specific eventType: - * `eventType = "search"` - * * Deleting all events for a specific visitor: - * `userPseudoId = "visitor1024"` - * * Deleting all events inside a DataStore: + * * Deleting specific eventType in a time range: + * `eventTime > "2012-04-23T18:25:43.511Z" + * eventTime < "2012-04-23T18:30:43.511Z" eventType = "search"` + * * Deleting all events for a specific visitor in a time range: + * `eventTime > "2012-04-23T18:25:43.511Z" + * eventTime < "2012-04-23T18:30:43.511Z" userPseudoId = "visitor1024"` + * * Deleting the past 30 days of events inside a DataStore: * `*` * * The filtering fields are assumed to have an implicit AND. @@ -813,16 +825,20 @@ public java.lang.String getFilter() { * * `userId`: Double quoted string. Specifying this will delete all events * associated with a user. * + * Note: This API only supports purging a max range of 30 days. + * * Examples: * * * Deleting all events in a time range: * `eventTime > "2012-04-23T18:25:43.511Z" * eventTime < "2012-04-23T18:30:43.511Z"` - * * Deleting specific eventType: - * `eventType = "search"` - * * Deleting all events for a specific visitor: - * `userPseudoId = "visitor1024"` - * * Deleting all events inside a DataStore: + * * Deleting specific eventType in a time range: + * `eventTime > "2012-04-23T18:25:43.511Z" + * eventTime < "2012-04-23T18:30:43.511Z" eventType = "search"` + * * Deleting all events for a specific visitor in a time range: + * `eventTime > "2012-04-23T18:25:43.511Z" + * eventTime < "2012-04-23T18:30:43.511Z" userPseudoId = "visitor1024"` + * * Deleting the past 30 days of events inside a DataStore: * `*` * * The filtering fields are assumed to have an implicit AND. @@ -860,16 +876,20 @@ public com.google.protobuf.ByteString getFilterBytes() { * * `userId`: Double quoted string. Specifying this will delete all events * associated with a user. * + * Note: This API only supports purging a max range of 30 days. + * * Examples: * * * Deleting all events in a time range: * `eventTime > "2012-04-23T18:25:43.511Z" * eventTime < "2012-04-23T18:30:43.511Z"` - * * Deleting specific eventType: - * `eventType = "search"` - * * Deleting all events for a specific visitor: - * `userPseudoId = "visitor1024"` - * * Deleting all events inside a DataStore: + * * Deleting specific eventType in a time range: + * `eventTime > "2012-04-23T18:25:43.511Z" + * eventTime < "2012-04-23T18:30:43.511Z" eventType = "search"` + * * Deleting all events for a specific visitor in a time range: + * `eventTime > "2012-04-23T18:25:43.511Z" + * eventTime < "2012-04-23T18:30:43.511Z" userPseudoId = "visitor1024"` + * * Deleting the past 30 days of events inside a DataStore: * `*` * * The filtering fields are assumed to have an implicit AND. @@ -906,16 +926,20 @@ public Builder setFilter(java.lang.String value) { * * `userId`: Double quoted string. Specifying this will delete all events * associated with a user. * + * Note: This API only supports purging a max range of 30 days. + * * Examples: * * * Deleting all events in a time range: * `eventTime > "2012-04-23T18:25:43.511Z" * eventTime < "2012-04-23T18:30:43.511Z"` - * * Deleting specific eventType: - * `eventType = "search"` - * * Deleting all events for a specific visitor: - * `userPseudoId = "visitor1024"` - * * Deleting all events inside a DataStore: + * * Deleting specific eventType in a time range: + * `eventTime > "2012-04-23T18:25:43.511Z" + * eventTime < "2012-04-23T18:30:43.511Z" eventType = "search"` + * * Deleting all events for a specific visitor in a time range: + * `eventTime > "2012-04-23T18:25:43.511Z" + * eventTime < "2012-04-23T18:30:43.511Z" userPseudoId = "visitor1024"` + * * Deleting the past 30 days of events inside a DataStore: * `*` * * The filtering fields are assumed to have an implicit AND. @@ -948,16 +972,20 @@ public Builder clearFilter() { * * `userId`: Double quoted string. Specifying this will delete all events * associated with a user. * + * Note: This API only supports purging a max range of 30 days. + * * Examples: * * * Deleting all events in a time range: * `eventTime > "2012-04-23T18:25:43.511Z" * eventTime < "2012-04-23T18:30:43.511Z"` - * * Deleting specific eventType: - * `eventType = "search"` - * * Deleting all events for a specific visitor: - * `userPseudoId = "visitor1024"` - * * Deleting all events inside a DataStore: + * * Deleting specific eventType in a time range: + * `eventTime > "2012-04-23T18:25:43.511Z" + * eventTime < "2012-04-23T18:30:43.511Z" eventType = "search"` + * * Deleting all events for a specific visitor in a time range: + * `eventTime > "2012-04-23T18:25:43.511Z" + * eventTime < "2012-04-23T18:30:43.511Z" userPseudoId = "visitor1024"` + * * Deleting the past 30 days of events inside a DataStore: * `*` * * The filtering fields are assumed to have an implicit AND. diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/PurgeUserEventsRequestOrBuilder.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/PurgeUserEventsRequestOrBuilder.java index bf98480cd158..325a202d6a89 100644 --- a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/PurgeUserEventsRequestOrBuilder.java +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/PurgeUserEventsRequestOrBuilder.java @@ -76,16 +76,20 @@ public interface PurgeUserEventsRequestOrBuilder * * `userId`: Double quoted string. Specifying this will delete all events * associated with a user. * + * Note: This API only supports purging a max range of 30 days. + * * Examples: * * * Deleting all events in a time range: * `eventTime > "2012-04-23T18:25:43.511Z" * eventTime < "2012-04-23T18:30:43.511Z"` - * * Deleting specific eventType: - * `eventType = "search"` - * * Deleting all events for a specific visitor: - * `userPseudoId = "visitor1024"` - * * Deleting all events inside a DataStore: + * * Deleting specific eventType in a time range: + * `eventTime > "2012-04-23T18:25:43.511Z" + * eventTime < "2012-04-23T18:30:43.511Z" eventType = "search"` + * * Deleting all events for a specific visitor in a time range: + * `eventTime > "2012-04-23T18:25:43.511Z" + * eventTime < "2012-04-23T18:30:43.511Z" userPseudoId = "visitor1024"` + * * Deleting the past 30 days of events inside a DataStore: * `*` * * The filtering fields are assumed to have an implicit AND. @@ -113,16 +117,20 @@ public interface PurgeUserEventsRequestOrBuilder * * `userId`: Double quoted string. Specifying this will delete all events * associated with a user. * + * Note: This API only supports purging a max range of 30 days. + * * Examples: * * * Deleting all events in a time range: * `eventTime > "2012-04-23T18:25:43.511Z" * eventTime < "2012-04-23T18:30:43.511Z"` - * * Deleting specific eventType: - * `eventType = "search"` - * * Deleting all events for a specific visitor: - * `userPseudoId = "visitor1024"` - * * Deleting all events inside a DataStore: + * * Deleting specific eventType in a time range: + * `eventTime > "2012-04-23T18:25:43.511Z" + * eventTime < "2012-04-23T18:30:43.511Z" eventType = "search"` + * * Deleting all events for a specific visitor in a time range: + * `eventTime > "2012-04-23T18:25:43.511Z" + * eventTime < "2012-04-23T18:30:43.511Z" userPseudoId = "visitor1024"` + * * Deleting the past 30 days of events inside a DataStore: * `*` * * The filtering fields are assumed to have an implicit AND. diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/RankRequest.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/RankRequest.java index eda5fb18cd64..734507e92d28 100644 --- a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/RankRequest.java +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/RankRequest.java @@ -157,7 +157,7 @@ public com.google.protobuf.ByteString getRankingConfigBytes() { *
                * The identifier of the model to use. It is one of:
                *
            -   * * `semantic-ranker-512@latest`: Semantic ranking model with maxiumn input
            +   * * `semantic-ranker-512@latest`: Semantic ranking model with maximum input
                * token size 512.
                *
                * It is set to `semantic-ranker-512@latest` by default if unspecified.
            @@ -186,7 +186,7 @@ public java.lang.String getModel() {
                * 
                * The identifier of the model to use. It is one of:
                *
            -   * * `semantic-ranker-512@latest`: Semantic ranking model with maxiumn input
            +   * * `semantic-ranker-512@latest`: Semantic ranking model with maximum input
                * token size 512.
                *
                * It is set to `semantic-ranker-512@latest` by default if unspecified.
            @@ -291,7 +291,7 @@ public com.google.protobuf.ByteString getQueryBytes() {
                *
                *
                * 
            -   * Required. A list of records to rank. At most 200 records to rank.
            +   * Required. A list of records to rank.
                * 
            * * @@ -307,7 +307,7 @@ public java.util.List get * * *
            -   * Required. A list of records to rank. At most 200 records to rank.
            +   * Required. A list of records to rank.
                * 
            * * @@ -324,7 +324,7 @@ public java.util.List get * * *
            -   * Required. A list of records to rank. At most 200 records to rank.
            +   * Required. A list of records to rank.
                * 
            * * @@ -340,7 +340,7 @@ public int getRecordsCount() { * * *
            -   * Required. A list of records to rank. At most 200 records to rank.
            +   * Required. A list of records to rank.
                * 
            * * @@ -356,7 +356,7 @@ public com.google.cloud.discoveryengine.v1beta.RankingRecord getRecords(int inde * * *
            -   * Required. A list of records to rank. At most 200 records to rank.
            +   * Required. A list of records to rank.
                * 
            * * @@ -1232,7 +1232,7 @@ public Builder setRankingConfigBytes(com.google.protobuf.ByteString value) { *
                  * The identifier of the model to use. It is one of:
                  *
            -     * * `semantic-ranker-512@latest`: Semantic ranking model with maxiumn input
            +     * * `semantic-ranker-512@latest`: Semantic ranking model with maximum input
                  * token size 512.
                  *
                  * It is set to `semantic-ranker-512@latest` by default if unspecified.
            @@ -1260,7 +1260,7 @@ public java.lang.String getModel() {
                  * 
                  * The identifier of the model to use. It is one of:
                  *
            -     * * `semantic-ranker-512@latest`: Semantic ranking model with maxiumn input
            +     * * `semantic-ranker-512@latest`: Semantic ranking model with maximum input
                  * token size 512.
                  *
                  * It is set to `semantic-ranker-512@latest` by default if unspecified.
            @@ -1288,7 +1288,7 @@ public com.google.protobuf.ByteString getModelBytes() {
                  * 
                  * The identifier of the model to use. It is one of:
                  *
            -     * * `semantic-ranker-512@latest`: Semantic ranking model with maxiumn input
            +     * * `semantic-ranker-512@latest`: Semantic ranking model with maximum input
                  * token size 512.
                  *
                  * It is set to `semantic-ranker-512@latest` by default if unspecified.
            @@ -1315,7 +1315,7 @@ public Builder setModel(java.lang.String value) {
                  * 
                  * The identifier of the model to use. It is one of:
                  *
            -     * * `semantic-ranker-512@latest`: Semantic ranking model with maxiumn input
            +     * * `semantic-ranker-512@latest`: Semantic ranking model with maximum input
                  * token size 512.
                  *
                  * It is set to `semantic-ranker-512@latest` by default if unspecified.
            @@ -1338,7 +1338,7 @@ public Builder clearModel() {
                  * 
                  * The identifier of the model to use. It is one of:
                  *
            -     * * `semantic-ranker-512@latest`: Semantic ranking model with maxiumn input
            +     * * `semantic-ranker-512@latest`: Semantic ranking model with maximum input
                  * token size 512.
                  *
                  * It is set to `semantic-ranker-512@latest` by default if unspecified.
            @@ -1552,7 +1552,7 @@ private void ensureRecordsIsMutable() {
                  *
                  *
                  * 
            -     * Required. A list of records to rank. At most 200 records to rank.
            +     * Required. A list of records to rank.
                  * 
            * * @@ -1571,7 +1571,7 @@ public java.util.List get * * *
            -     * Required. A list of records to rank. At most 200 records to rank.
            +     * Required. A list of records to rank.
                  * 
            * * @@ -1590,7 +1590,7 @@ public int getRecordsCount() { * * *
            -     * Required. A list of records to rank. At most 200 records to rank.
            +     * Required. A list of records to rank.
                  * 
            * * @@ -1609,7 +1609,7 @@ public com.google.cloud.discoveryengine.v1beta.RankingRecord getRecords(int inde * * *
            -     * Required. A list of records to rank. At most 200 records to rank.
            +     * Required. A list of records to rank.
                  * 
            * * @@ -1635,7 +1635,7 @@ public Builder setRecords( * * *
            -     * Required. A list of records to rank. At most 200 records to rank.
            +     * Required. A list of records to rank.
                  * 
            * * @@ -1658,7 +1658,7 @@ public Builder setRecords( * * *
            -     * Required. A list of records to rank. At most 200 records to rank.
            +     * Required. A list of records to rank.
                  * 
            * * @@ -1683,7 +1683,7 @@ public Builder addRecords(com.google.cloud.discoveryengine.v1beta.RankingRecord * * *
            -     * Required. A list of records to rank. At most 200 records to rank.
            +     * Required. A list of records to rank.
                  * 
            * * @@ -1709,7 +1709,7 @@ public Builder addRecords( * * *
            -     * Required. A list of records to rank. At most 200 records to rank.
            +     * Required. A list of records to rank.
                  * 
            * * @@ -1732,7 +1732,7 @@ public Builder addRecords( * * *
            -     * Required. A list of records to rank. At most 200 records to rank.
            +     * Required. A list of records to rank.
                  * 
            * * @@ -1755,7 +1755,7 @@ public Builder addRecords( * * *
            -     * Required. A list of records to rank. At most 200 records to rank.
            +     * Required. A list of records to rank.
                  * 
            * * @@ -1779,7 +1779,7 @@ public Builder addAllRecords( * * *
            -     * Required. A list of records to rank. At most 200 records to rank.
            +     * Required. A list of records to rank.
                  * 
            * * @@ -1801,7 +1801,7 @@ public Builder clearRecords() { * * *
            -     * Required. A list of records to rank. At most 200 records to rank.
            +     * Required. A list of records to rank.
                  * 
            * * @@ -1823,7 +1823,7 @@ public Builder removeRecords(int index) { * * *
            -     * Required. A list of records to rank. At most 200 records to rank.
            +     * Required. A list of records to rank.
                  * 
            * * @@ -1839,7 +1839,7 @@ public com.google.cloud.discoveryengine.v1beta.RankingRecord.Builder getRecordsB * * *
            -     * Required. A list of records to rank. At most 200 records to rank.
            +     * Required. A list of records to rank.
                  * 
            * * @@ -1859,7 +1859,7 @@ public com.google.cloud.discoveryengine.v1beta.RankingRecordOrBuilder getRecords * * *
            -     * Required. A list of records to rank. At most 200 records to rank.
            +     * Required. A list of records to rank.
                  * 
            * * @@ -1879,7 +1879,7 @@ public com.google.cloud.discoveryengine.v1beta.RankingRecordOrBuilder getRecords * * *
            -     * Required. A list of records to rank. At most 200 records to rank.
            +     * Required. A list of records to rank.
                  * 
            * * @@ -1895,7 +1895,7 @@ public com.google.cloud.discoveryengine.v1beta.RankingRecord.Builder addRecordsB * * *
            -     * Required. A list of records to rank. At most 200 records to rank.
            +     * Required. A list of records to rank.
                  * 
            * * @@ -1913,7 +1913,7 @@ public com.google.cloud.discoveryengine.v1beta.RankingRecord.Builder addRecordsB * * *
            -     * Required. A list of records to rank. At most 200 records to rank.
            +     * Required. A list of records to rank.
                  * 
            * * diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/RankRequestOrBuilder.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/RankRequestOrBuilder.java index e962496514f6..6f4789b6bc6e 100644 --- a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/RankRequestOrBuilder.java +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/RankRequestOrBuilder.java @@ -64,7 +64,7 @@ public interface RankRequestOrBuilder *
                * The identifier of the model to use. It is one of:
                *
            -   * * `semantic-ranker-512@latest`: Semantic ranking model with maxiumn input
            +   * * `semantic-ranker-512@latest`: Semantic ranking model with maximum input
                * token size 512.
                *
                * It is set to `semantic-ranker-512@latest` by default if unspecified.
            @@ -82,7 +82,7 @@ public interface RankRequestOrBuilder
                * 
                * The identifier of the model to use. It is one of:
                *
            -   * * `semantic-ranker-512@latest`: Semantic ranking model with maxiumn input
            +   * * `semantic-ranker-512@latest`: Semantic ranking model with maximum input
                * token size 512.
                *
                * It is set to `semantic-ranker-512@latest` by default if unspecified.
            @@ -138,7 +138,7 @@ public interface RankRequestOrBuilder
                *
                *
                * 
            -   * Required. A list of records to rank. At most 200 records to rank.
            +   * Required. A list of records to rank.
                * 
            * * @@ -151,7 +151,7 @@ public interface RankRequestOrBuilder * * *
            -   * Required. A list of records to rank. At most 200 records to rank.
            +   * Required. A list of records to rank.
                * 
            * * @@ -164,7 +164,7 @@ public interface RankRequestOrBuilder * * *
            -   * Required. A list of records to rank. At most 200 records to rank.
            +   * Required. A list of records to rank.
                * 
            * * @@ -177,7 +177,7 @@ public interface RankRequestOrBuilder * * *
            -   * Required. A list of records to rank. At most 200 records to rank.
            +   * Required. A list of records to rank.
                * 
            * * @@ -191,7 +191,7 @@ public interface RankRequestOrBuilder * * *
            -   * Required. A list of records to rank. At most 200 records to rank.
            +   * Required. A list of records to rank.
                * 
            * * diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/RankServiceProto.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/RankServiceProto.java index 308715a83f7e..15105cfa426d 100644 --- a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/RankServiceProto.java +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/RankServiceProto.java @@ -91,19 +91,21 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\005value\030\002 \001(\t:\0028\001\"S\n" + "\014RankResponse\022C\n" + "\007records\030\005 \003(\01322.google" - + ".cloud.discoveryengine.v1beta.RankingRecord2\241\002\n" + + ".cloud.discoveryengine.v1beta.RankingRecord2\237\003\n" + "\013RankService\022\275\001\n" + "\004Rank\0220.google.cloud.discoveryengine.v1beta.RankRequest\0321" + ".google.cloud.discoveryengine.v1beta.Ran" + "kResponse\"P\202\323\344\223\002J\"E/v1beta/{ranking_conf" + "ig=projects/*/locations/*/rankingConfigs" - + "/*}:rank:\001*\032R\312A\036discoveryengine.googleap" - + "is.com\322A.https://www.googleapis.com/auth/cloud-platformB\227\002\n" - + "\'com.google.cloud.discoveryengine.v1betaB\020RankServiceProtoP\001Z" - + "Qcloud.google.com/go/discoveryengine/apiv1beta/discoveryenginepb;discoveryengine" - + "pb\242\002\017DISCOVERYENGINE\252\002#Google.Cloud.Disc" - + "overyEngine.V1Beta\312\002#Google\\Cloud\\Discov" - + "eryEngine\\V1beta\352\002&Google::Cloud::DiscoveryEngine::V1betab\006proto3" + + "/*}:rank:\001*\032\317\001\312A\036discoveryengine.googlea" + + "pis.com\322A\252\001https://www.googleapis.com/au" + + "th/cloud-platform,https://www.googleapis.com/auth/discoveryengine.readwrite,http" + + "s://www.googleapis.com/auth/discoveryengine.serving.readwriteB\227\002\n" + + "\'com.google.cloud.discoveryengine.v1betaB\020RankServicePr" + + "otoP\001ZQcloud.google.com/go/discoveryengine/apiv1beta/discoveryenginepb;discovery" + + "enginepb\242\002\017DISCOVERYENGINE\252\002#Google.Clou" + + "d.DiscoveryEngine.V1Beta\312\002#Google\\Cloud\\" + + "DiscoveryEngine\\V1beta\352\002&Google::Cloud::DiscoveryEngine::V1betab\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/RankingRecord.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/RankingRecord.java index bc45e0ff6e68..bb92af3d422e 100644 --- a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/RankingRecord.java +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/RankingRecord.java @@ -257,6 +257,8 @@ public com.google.protobuf.ByteString getContentBytes() { * *
                * The score of this record based on the given query and selected model.
            +   * The score will be rounded to 4 decimal places. If the score is close to 0,
            +   * it will be rounded to 0.00001 to avoid returning unset.
                * 
            * * float score = 4; @@ -1032,6 +1034,8 @@ public Builder setContentBytes(com.google.protobuf.ByteString value) { * *
                  * The score of this record based on the given query and selected model.
            +     * The score will be rounded to 4 decimal places. If the score is close to 0,
            +     * it will be rounded to 0.00001 to avoid returning unset.
                  * 
            * * float score = 4; @@ -1048,6 +1052,8 @@ public float getScore() { * *
                  * The score of this record based on the given query and selected model.
            +     * The score will be rounded to 4 decimal places. If the score is close to 0,
            +     * it will be rounded to 0.00001 to avoid returning unset.
                  * 
            * * float score = 4; @@ -1068,6 +1074,8 @@ public Builder setScore(float value) { * *
                  * The score of this record based on the given query and selected model.
            +     * The score will be rounded to 4 decimal places. If the score is close to 0,
            +     * it will be rounded to 0.00001 to avoid returning unset.
                  * 
            * * float score = 4; diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/RankingRecordOrBuilder.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/RankingRecordOrBuilder.java index 79ce3032d012..a015bc464643 100644 --- a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/RankingRecordOrBuilder.java +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/RankingRecordOrBuilder.java @@ -125,6 +125,8 @@ public interface RankingRecordOrBuilder * *
                * The score of this record based on the given query and selected model.
            +   * The score will be rounded to 4 decimal places. If the score is close to 0,
            +   * it will be rounded to 0.00001 to avoid returning unset.
                * 
            * * float score = 4; diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/RecommendRequest.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/RecommendRequest.java index 419f26f9c0b6..58f759b80e2d 100644 --- a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/RecommendRequest.java +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/RecommendRequest.java @@ -316,9 +316,9 @@ public int getPageSize() { * attribute-based expressions are expected instead of the above described * tag-based syntax. Examples: * - * * (launguage: ANY("en", "es")) AND NOT (categories: ANY("Movie")) + * * (language: ANY("en", "es")) AND NOT (categories: ANY("Movie")) * * (available: true) AND - * (launguage: ANY("en", "es")) OR (categories: ANY("Movie")) + * (language: ANY("en", "es")) OR (categories: ANY("Movie")) * * If your filter blocks all results, the API returns generic * (unfiltered) popular Documents. If you only want results strictly matching @@ -366,9 +366,9 @@ public java.lang.String getFilter() { * attribute-based expressions are expected instead of the above described * tag-based syntax. Examples: * - * * (launguage: ANY("en", "es")) AND NOT (categories: ANY("Movie")) + * * (language: ANY("en", "es")) AND NOT (categories: ANY("Movie")) * * (available: true) AND - * (launguage: ANY("en", "es")) OR (categories: ANY("Movie")) + * (language: ANY("en", "es")) OR (categories: ANY("Movie")) * * If your filter blocks all results, the API returns generic * (unfiltered) popular Documents. If you only want results strictly matching @@ -1944,9 +1944,9 @@ public Builder clearPageSize() { * attribute-based expressions are expected instead of the above described * tag-based syntax. Examples: * - * * (launguage: ANY("en", "es")) AND NOT (categories: ANY("Movie")) + * * (language: ANY("en", "es")) AND NOT (categories: ANY("Movie")) * * (available: true) AND - * (launguage: ANY("en", "es")) OR (categories: ANY("Movie")) + * (language: ANY("en", "es")) OR (categories: ANY("Movie")) * * If your filter blocks all results, the API returns generic * (unfiltered) popular Documents. If you only want results strictly matching @@ -1993,9 +1993,9 @@ public java.lang.String getFilter() { * attribute-based expressions are expected instead of the above described * tag-based syntax. Examples: * - * * (launguage: ANY("en", "es")) AND NOT (categories: ANY("Movie")) + * * (language: ANY("en", "es")) AND NOT (categories: ANY("Movie")) * * (available: true) AND - * (launguage: ANY("en", "es")) OR (categories: ANY("Movie")) + * (language: ANY("en", "es")) OR (categories: ANY("Movie")) * * If your filter blocks all results, the API returns generic * (unfiltered) popular Documents. If you only want results strictly matching @@ -2042,9 +2042,9 @@ public com.google.protobuf.ByteString getFilterBytes() { * attribute-based expressions are expected instead of the above described * tag-based syntax. Examples: * - * * (launguage: ANY("en", "es")) AND NOT (categories: ANY("Movie")) + * * (language: ANY("en", "es")) AND NOT (categories: ANY("Movie")) * * (available: true) AND - * (launguage: ANY("en", "es")) OR (categories: ANY("Movie")) + * (language: ANY("en", "es")) OR (categories: ANY("Movie")) * * If your filter blocks all results, the API returns generic * (unfiltered) popular Documents. If you only want results strictly matching @@ -2090,9 +2090,9 @@ public Builder setFilter(java.lang.String value) { * attribute-based expressions are expected instead of the above described * tag-based syntax. Examples: * - * * (launguage: ANY("en", "es")) AND NOT (categories: ANY("Movie")) + * * (language: ANY("en", "es")) AND NOT (categories: ANY("Movie")) * * (available: true) AND - * (launguage: ANY("en", "es")) OR (categories: ANY("Movie")) + * (language: ANY("en", "es")) OR (categories: ANY("Movie")) * * If your filter blocks all results, the API returns generic * (unfiltered) popular Documents. If you only want results strictly matching @@ -2134,9 +2134,9 @@ public Builder clearFilter() { * attribute-based expressions are expected instead of the above described * tag-based syntax. Examples: * - * * (launguage: ANY("en", "es")) AND NOT (categories: ANY("Movie")) + * * (language: ANY("en", "es")) AND NOT (categories: ANY("Movie")) * * (available: true) AND - * (launguage: ANY("en", "es")) OR (categories: ANY("Movie")) + * (language: ANY("en", "es")) OR (categories: ANY("Movie")) * * If your filter blocks all results, the API returns generic * (unfiltered) popular Documents. If you only want results strictly matching diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/RecommendRequestOrBuilder.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/RecommendRequestOrBuilder.java index 49d07d198be9..1d1886f37e20 100644 --- a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/RecommendRequestOrBuilder.java +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/RecommendRequestOrBuilder.java @@ -202,9 +202,9 @@ public interface RecommendRequestOrBuilder * attribute-based expressions are expected instead of the above described * tag-based syntax. Examples: * - * * (launguage: ANY("en", "es")) AND NOT (categories: ANY("Movie")) + * * (language: ANY("en", "es")) AND NOT (categories: ANY("Movie")) * * (available: true) AND - * (launguage: ANY("en", "es")) OR (categories: ANY("Movie")) + * (language: ANY("en", "es")) OR (categories: ANY("Movie")) * * If your filter blocks all results, the API returns generic * (unfiltered) popular Documents. If you only want results strictly matching @@ -241,9 +241,9 @@ public interface RecommendRequestOrBuilder * attribute-based expressions are expected instead of the above described * tag-based syntax. Examples: * - * * (launguage: ANY("en", "es")) AND NOT (categories: ANY("Movie")) + * * (language: ANY("en", "es")) AND NOT (categories: ANY("Movie")) * * (available: true) AND - * (launguage: ANY("en", "es")) OR (categories: ANY("Movie")) + * (language: ANY("en", "es")) OR (categories: ANY("Movie")) * * If your filter blocks all results, the API returns generic * (unfiltered) popular Documents. If you only want results strictly matching diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/RecommendationServiceProto.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/RecommendationServiceProto.java index 4527ffbe4ce4..8d175f7d338a 100644 --- a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/RecommendationServiceProto.java +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/RecommendationServiceProto.java @@ -111,7 +111,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "onse.RecommendationResult.MetadataEntry\032G\n\r" + "MetadataEntry\022\013\n" + "\003key\030\001 \001(\t\022%\n" - + "\005value\030\002 \001(\0132\026.google.protobuf.Value:\0028\0012\243\004\n" + + "\005value\030\002 \001(\0132\026.google.protobuf.Value:\0028\0012\241\005\n" + "\025RecommendationService\022\265\003\n" + "\tRecommend\0225.google.cloud.discoveryengine.v1beta.Recommend" + "Request\0326.google.cloud.discoveryengine.v" @@ -120,14 +120,16 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "nd:\001*Zj\"e/v1beta/{serving_config=projects/*/locations/*/collections/*/dataStores" + "/*/servingConfigs/*}:recommend:\001*Zg\"b/v1beta/{serving_config=projects/*/location" + "s/*/collections/*/engines/*/servingConfi" - + "gs/*}:recommend:\001*\032R\312A\036discoveryengine.g" - + "oogleapis.com\322A.https://www.googleapis.com/auth/cloud-platformB\241\002\n" - + "\'com.google.cloud.discoveryengine.v1betaB\032Recommendati" - + "onServiceProtoP\001ZQcloud.google.com/go/discoveryengine/apiv1beta/discoveryenginep" - + "b;discoveryenginepb\242\002\017DISCOVERYENGINE\252\002#" - + "Google.Cloud.DiscoveryEngine.V1Beta\312\002#Go" - + "ogle\\Cloud\\DiscoveryEngine\\V1beta\352\002&Goog" - + "le::Cloud::DiscoveryEngine::V1betab\006proto3" + + "gs/*}:recommend:\001*\032\317\001\312A\036discoveryengine." + + "googleapis.com\322A\252\001https://www.googleapis" + + ".com/auth/cloud-platform,https://www.googleapis.com/auth/discoveryengine.readwri" + + "te,https://www.googleapis.com/auth/discoveryengine.serving.readwriteB\241\002\n" + + "\'com.google.cloud.discoveryengine.v1betaB\032Recomm" + + "endationServiceProtoP\001ZQcloud.google.com/go/discoveryengine/apiv1beta/discoverye" + + "nginepb;discoveryenginepb\242\002\017DISCOVERYENG" + + "INE\252\002#Google.Cloud.DiscoveryEngine.V1Bet" + + "a\312\002#Google\\Cloud\\DiscoveryEngine\\V1beta\352" + + "\002&Google::Cloud::DiscoveryEngine::V1betab\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/RecrawlUrisMetadata.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/RecrawlUrisMetadata.java index e28e76f17d3f..392df7a57ae7 100644 --- a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/RecrawlUrisMetadata.java +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/RecrawlUrisMetadata.java @@ -56,6 +56,7 @@ private RecrawlUrisMetadata(com.google.protobuf.GeneratedMessage.Builder buil private RecrawlUrisMetadata() { invalidUris3_ = com.google.protobuf.LazyStringArrayList.emptyList(); + noindexUris11_ = com.google.protobuf.LazyStringArrayList.emptyList(); urisNotMatchingTargetSites9_ = com.google.protobuf.LazyStringArrayList.emptyList(); } @@ -273,6 +274,99 @@ public int getInvalidUrisCount8() { return invalidUrisCount8_; } + public static final int NOINDEX_URIS_FIELD_NUMBER = 11; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList noindexUris11_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + // An alternative name is used for field "noindex_uris" because: + // both repeated field "noindex_uris" and singular field "noindex_uris_count" generate the + // method "getNoindexUrisCount()" + /** + * + * + *
            +   * URIs that have no index meta tag. Sample limited to 1000.
            +   * 
            + * + * repeated string noindex_uris = 11; + * + * @return A list containing the noindexUris. + */ + public com.google.protobuf.ProtocolStringList getNoindexUris11List() { + return noindexUris11_; + } + + /** + * + * + *
            +   * URIs that have no index meta tag. Sample limited to 1000.
            +   * 
            + * + * repeated string noindex_uris = 11; + * + * @return The count of noindexUris. + */ + public int getNoindexUris11Count() { + return noindexUris11_.size(); + } + + /** + * + * + *
            +   * URIs that have no index meta tag. Sample limited to 1000.
            +   * 
            + * + * repeated string noindex_uris = 11; + * + * @param index The index of the element to return. + * @return The noindexUris at the given index. + */ + public java.lang.String getNoindexUris11(int index) { + return noindexUris11_.get(index); + } + + /** + * + * + *
            +   * URIs that have no index meta tag. Sample limited to 1000.
            +   * 
            + * + * repeated string noindex_uris = 11; + * + * @param index The index of the value to return. + * @return The bytes of the noindexUris at the given index. + */ + public com.google.protobuf.ByteString getNoindexUris11Bytes(int index) { + return noindexUris11_.getByteString(index); + } + + public static final int NOINDEX_URIS_COUNT_FIELD_NUMBER = 12; + private int noindexUrisCount12_ = 0; + + // An alternative name is used for field "noindex_uris_count" because: + // both repeated field "noindex_uris" and singular field "noindex_uris_count" generate the + // method "getNoindexUrisCount()" + /** + * + * + *
            +   * Total number of URIs that have no index meta tag.
            +   * 
            + * + * int32 noindex_uris_count = 12; + * + * @return The noindexUrisCount. + */ + @java.lang.Override + public int getNoindexUrisCount12() { + return noindexUrisCount12_; + } + public static final int URIS_NOT_MATCHING_TARGET_SITES_FIELD_NUMBER = 9; @SuppressWarnings("serial") @@ -498,6 +592,12 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (urisNotMatchingTargetSitesCount10_ != 0) { output.writeInt32(10, urisNotMatchingTargetSitesCount10_); } + for (int i = 0; i < noindexUris11_.size(); i++) { + com.google.protobuf.GeneratedMessage.writeString(output, 11, noindexUris11_.getRaw(i)); + } + if (noindexUrisCount12_ != 0) { + output.writeInt32(12, noindexUrisCount12_); + } getUnknownFields().writeTo(output); } @@ -549,6 +649,17 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeInt32Size( 10, urisNotMatchingTargetSitesCount10_); } + { + int dataSize = 0; + for (int i = 0; i < noindexUris11_.size(); i++) { + dataSize += computeStringSizeNoTag(noindexUris11_.getRaw(i)); + } + size += dataSize; + size += 1 * getNoindexUris11List().size(); + } + if (noindexUrisCount12_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(12, noindexUrisCount12_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -575,6 +686,8 @@ public boolean equals(final java.lang.Object obj) { } if (!getInvalidUris3List().equals(other.getInvalidUris3List())) return false; if (getInvalidUrisCount8() != other.getInvalidUrisCount8()) return false; + if (!getNoindexUris11List().equals(other.getNoindexUris11List())) return false; + if (getNoindexUrisCount12() != other.getNoindexUrisCount12()) return false; if (!getUrisNotMatchingTargetSites9List().equals(other.getUrisNotMatchingTargetSites9List())) return false; if (getUrisNotMatchingTargetSitesCount10() != other.getUrisNotMatchingTargetSitesCount10()) @@ -608,6 +721,12 @@ public int hashCode() { } hash = (37 * hash) + INVALID_URIS_COUNT_FIELD_NUMBER; hash = (53 * hash) + getInvalidUrisCount8(); + if (getNoindexUris11Count() > 0) { + hash = (37 * hash) + NOINDEX_URIS_FIELD_NUMBER; + hash = (53 * hash) + getNoindexUris11List().hashCode(); + } + hash = (37 * hash) + NOINDEX_URIS_COUNT_FIELD_NUMBER; + hash = (53 * hash) + getNoindexUrisCount12(); if (getUrisNotMatchingTargetSites9Count() > 0) { hash = (37 * hash) + URIS_NOT_MATCHING_TARGET_SITES_FIELD_NUMBER; hash = (53 * hash) + getUrisNotMatchingTargetSites9List().hashCode(); @@ -788,6 +907,8 @@ public Builder clear() { } invalidUris3_ = com.google.protobuf.LazyStringArrayList.emptyList(); invalidUrisCount8_ = 0; + noindexUris11_ = com.google.protobuf.LazyStringArrayList.emptyList(); + noindexUrisCount12_ = 0; urisNotMatchingTargetSites9_ = com.google.protobuf.LazyStringArrayList.emptyList(); urisNotMatchingTargetSitesCount10_ = 0; validUrisCount_ = 0; @@ -847,22 +968,29 @@ private void buildPartial0(com.google.cloud.discoveryengine.v1beta.RecrawlUrisMe result.invalidUrisCount8_ = invalidUrisCount8_; } if (((from_bitField0_ & 0x00000010) != 0)) { + noindexUris11_.makeImmutable(); + result.noindexUris11_ = noindexUris11_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.noindexUrisCount12_ = noindexUrisCount12_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { urisNotMatchingTargetSites9_.makeImmutable(); result.urisNotMatchingTargetSites9_ = urisNotMatchingTargetSites9_; } - if (((from_bitField0_ & 0x00000020) != 0)) { + if (((from_bitField0_ & 0x00000080) != 0)) { result.urisNotMatchingTargetSitesCount10_ = urisNotMatchingTargetSitesCount10_; } - if (((from_bitField0_ & 0x00000040) != 0)) { + if (((from_bitField0_ & 0x00000100) != 0)) { result.validUrisCount_ = validUrisCount_; } - if (((from_bitField0_ & 0x00000080) != 0)) { + if (((from_bitField0_ & 0x00000200) != 0)) { result.successCount_ = successCount_; } - if (((from_bitField0_ & 0x00000100) != 0)) { + if (((from_bitField0_ & 0x00000400) != 0)) { result.pendingCount_ = pendingCount_; } - if (((from_bitField0_ & 0x00000200) != 0)) { + if (((from_bitField0_ & 0x00000800) != 0)) { result.quotaExceededCount_ = quotaExceededCount_; } result.bitField0_ |= to_bitField0_; @@ -900,10 +1028,23 @@ public Builder mergeFrom(com.google.cloud.discoveryengine.v1beta.RecrawlUrisMeta if (other.getInvalidUrisCount8() != 0) { setInvalidUrisCount8(other.getInvalidUrisCount8()); } + if (!other.noindexUris11_.isEmpty()) { + if (noindexUris11_.isEmpty()) { + noindexUris11_ = other.noindexUris11_; + bitField0_ |= 0x00000010; + } else { + ensureNoindexUris11IsMutable(); + noindexUris11_.addAll(other.noindexUris11_); + } + onChanged(); + } + if (other.getNoindexUrisCount12() != 0) { + setNoindexUrisCount12(other.getNoindexUrisCount12()); + } if (!other.urisNotMatchingTargetSites9_.isEmpty()) { if (urisNotMatchingTargetSites9_.isEmpty()) { urisNotMatchingTargetSites9_ = other.urisNotMatchingTargetSites9_; - bitField0_ |= 0x00000010; + bitField0_ |= 0x00000040; } else { ensureUrisNotMatchingTargetSites9IsMutable(); urisNotMatchingTargetSites9_.addAll(other.urisNotMatchingTargetSites9_); @@ -975,25 +1116,25 @@ public Builder mergeFrom( case 32: { validUrisCount_ = input.readInt32(); - bitField0_ |= 0x00000040; + bitField0_ |= 0x00000100; break; } // case 32 case 40: { successCount_ = input.readInt32(); - bitField0_ |= 0x00000080; + bitField0_ |= 0x00000200; break; } // case 40 case 48: { pendingCount_ = input.readInt32(); - bitField0_ |= 0x00000100; + bitField0_ |= 0x00000400; break; } // case 48 case 56: { quotaExceededCount_ = input.readInt32(); - bitField0_ |= 0x00000200; + bitField0_ |= 0x00000800; break; } // case 56 case 64: @@ -1012,9 +1153,22 @@ public Builder mergeFrom( case 80: { urisNotMatchingTargetSitesCount10_ = input.readInt32(); - bitField0_ |= 0x00000020; + bitField0_ |= 0x00000080; break; } // case 80 + case 90: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureNoindexUris11IsMutable(); + noindexUris11_.add(s); + break; + } // case 90 + case 96: + { + noindexUrisCount12_ = input.readInt32(); + bitField0_ |= 0x00000020; + break; + } // case 96 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -1679,6 +1833,245 @@ public Builder clearInvalidUrisCount8() { return this; } + private com.google.protobuf.LazyStringArrayList noindexUris11_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureNoindexUris11IsMutable() { + if (!noindexUris11_.isModifiable()) { + noindexUris11_ = new com.google.protobuf.LazyStringArrayList(noindexUris11_); + } + bitField0_ |= 0x00000010; + } + + /** + * + * + *
            +     * URIs that have no index meta tag. Sample limited to 1000.
            +     * 
            + * + * repeated string noindex_uris = 11; + * + * @return A list containing the noindexUris. + */ + public com.google.protobuf.ProtocolStringList getNoindexUris11List() { + noindexUris11_.makeImmutable(); + return noindexUris11_; + } + + /** + * + * + *
            +     * URIs that have no index meta tag. Sample limited to 1000.
            +     * 
            + * + * repeated string noindex_uris = 11; + * + * @return The count of noindexUris. + */ + public int getNoindexUris11Count() { + return noindexUris11_.size(); + } + + /** + * + * + *
            +     * URIs that have no index meta tag. Sample limited to 1000.
            +     * 
            + * + * repeated string noindex_uris = 11; + * + * @param index The index of the element to return. + * @return The noindexUris at the given index. + */ + public java.lang.String getNoindexUris11(int index) { + return noindexUris11_.get(index); + } + + /** + * + * + *
            +     * URIs that have no index meta tag. Sample limited to 1000.
            +     * 
            + * + * repeated string noindex_uris = 11; + * + * @param index The index of the value to return. + * @return The bytes of the noindexUris at the given index. + */ + public com.google.protobuf.ByteString getNoindexUris11Bytes(int index) { + return noindexUris11_.getByteString(index); + } + + /** + * + * + *
            +     * URIs that have no index meta tag. Sample limited to 1000.
            +     * 
            + * + * repeated string noindex_uris = 11; + * + * @param index The index to set the value at. + * @param value The noindexUris to set. + * @return This builder for chaining. + */ + public Builder setNoindexUris11(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureNoindexUris11IsMutable(); + noindexUris11_.set(index, value); + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
            +     * URIs that have no index meta tag. Sample limited to 1000.
            +     * 
            + * + * repeated string noindex_uris = 11; + * + * @param value The noindexUris to add. + * @return This builder for chaining. + */ + public Builder addNoindexUris11(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureNoindexUris11IsMutable(); + noindexUris11_.add(value); + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
            +     * URIs that have no index meta tag. Sample limited to 1000.
            +     * 
            + * + * repeated string noindex_uris = 11; + * + * @param values The noindexUris to add. + * @return This builder for chaining. + */ + public Builder addAllNoindexUris11(java.lang.Iterable values) { + ensureNoindexUris11IsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, noindexUris11_); + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
            +     * URIs that have no index meta tag. Sample limited to 1000.
            +     * 
            + * + * repeated string noindex_uris = 11; + * + * @return This builder for chaining. + */ + public Builder clearNoindexUris11() { + noindexUris11_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000010); + ; + onChanged(); + return this; + } + + /** + * + * + *
            +     * URIs that have no index meta tag. Sample limited to 1000.
            +     * 
            + * + * repeated string noindex_uris = 11; + * + * @param value The bytes of the noindexUris to add. + * @return This builder for chaining. + */ + public Builder addNoindexUris11Bytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureNoindexUris11IsMutable(); + noindexUris11_.add(value); + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + private int noindexUrisCount12_; + + /** + * + * + *
            +     * Total number of URIs that have no index meta tag.
            +     * 
            + * + * int32 noindex_uris_count = 12; + * + * @return The noindexUrisCount. + */ + @java.lang.Override + public int getNoindexUrisCount12() { + return noindexUrisCount12_; + } + + /** + * + * + *
            +     * Total number of URIs that have no index meta tag.
            +     * 
            + * + * int32 noindex_uris_count = 12; + * + * @param value The noindexUrisCount to set. + * @return This builder for chaining. + */ + public Builder setNoindexUrisCount12(int value) { + + noindexUrisCount12_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Total number of URIs that have no index meta tag.
            +     * 
            + * + * int32 noindex_uris_count = 12; + * + * @return This builder for chaining. + */ + public Builder clearNoindexUrisCount12() { + bitField0_ = (bitField0_ & ~0x00000020); + noindexUrisCount12_ = 0; + onChanged(); + return this; + } + private com.google.protobuf.LazyStringArrayList urisNotMatchingTargetSites9_ = com.google.protobuf.LazyStringArrayList.emptyList(); @@ -1687,7 +2080,7 @@ private void ensureUrisNotMatchingTargetSites9IsMutable() { urisNotMatchingTargetSites9_ = new com.google.protobuf.LazyStringArrayList(urisNotMatchingTargetSites9_); } - bitField0_ |= 0x00000010; + bitField0_ |= 0x00000040; } /** @@ -1782,7 +2175,7 @@ public Builder setUrisNotMatchingTargetSites9(int index, java.lang.String value) } ensureUrisNotMatchingTargetSites9IsMutable(); urisNotMatchingTargetSites9_.set(index, value); - bitField0_ |= 0x00000010; + bitField0_ |= 0x00000040; onChanged(); return this; } @@ -1807,7 +2200,7 @@ public Builder addUrisNotMatchingTargetSites9(java.lang.String value) { } ensureUrisNotMatchingTargetSites9IsMutable(); urisNotMatchingTargetSites9_.add(value); - bitField0_ |= 0x00000010; + bitField0_ |= 0x00000040; onChanged(); return this; } @@ -1829,7 +2222,7 @@ public Builder addUrisNotMatchingTargetSites9(java.lang.String value) { public Builder addAllUrisNotMatchingTargetSites9(java.lang.Iterable values) { ensureUrisNotMatchingTargetSites9IsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll(values, urisNotMatchingTargetSites9_); - bitField0_ |= 0x00000010; + bitField0_ |= 0x00000040; onChanged(); return this; } @@ -1849,7 +2242,7 @@ public Builder addAllUrisNotMatchingTargetSites9(java.lang.Iterable + * URIs that have no index meta tag. Sample limited to 1000. + *
            + * + * repeated string noindex_uris = 11; + * + * @return A list containing the noindexUris. + */ + java.util.List getNoindexUris11List(); + + /** + * + * + *
            +   * URIs that have no index meta tag. Sample limited to 1000.
            +   * 
            + * + * repeated string noindex_uris = 11; + * + * @return The count of noindexUris. + */ + int getNoindexUris11Count(); + + /** + * + * + *
            +   * URIs that have no index meta tag. Sample limited to 1000.
            +   * 
            + * + * repeated string noindex_uris = 11; + * + * @param index The index of the element to return. + * @return The noindexUris at the given index. + */ + java.lang.String getNoindexUris11(int index); + + /** + * + * + *
            +   * URIs that have no index meta tag. Sample limited to 1000.
            +   * 
            + * + * repeated string noindex_uris = 11; + * + * @param index The index of the value to return. + * @return The bytes of the noindexUris at the given index. + */ + com.google.protobuf.ByteString getNoindexUris11Bytes(int index); + + /** + * + * + *
            +   * Total number of URIs that have no index meta tag.
            +   * 
            + * + * int32 noindex_uris_count = 12; + * + * @return The noindexUrisCount. + */ + int getNoindexUrisCount12(); + /** * * diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/RecrawlUrisRequest.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/RecrawlUrisRequest.java index 47b32f9c84dc..f472c5e008f1 100644 --- a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/RecrawlUrisRequest.java +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/RecrawlUrisRequest.java @@ -226,9 +226,7 @@ public com.google.protobuf.ByteString getUrisBytes(int index) { * * *
            -   * Optional. Full resource name of the [SiteCredential][], such as
            -   * `projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/siteCredentials/*`.
            -   * Only set to crawl private URIs.
            +   * Optional. Credential id to use for crawling.
                * 
            * * string site_credential = 5 [(.google.api.field_behavior) = OPTIONAL]; @@ -252,9 +250,7 @@ public java.lang.String getSiteCredential() { * * *
            -   * Optional. Full resource name of the [SiteCredential][], such as
            -   * `projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/siteCredentials/*`.
            -   * Only set to crawl private URIs.
            +   * Optional. Credential id to use for crawling.
                * 
            * * string site_credential = 5 [(.google.api.field_behavior) = OPTIONAL]; @@ -1001,9 +997,7 @@ public Builder addUrisBytes(com.google.protobuf.ByteString value) { * * *
            -     * Optional. Full resource name of the [SiteCredential][], such as
            -     * `projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/siteCredentials/*`.
            -     * Only set to crawl private URIs.
            +     * Optional. Credential id to use for crawling.
                  * 
            * * string site_credential = 5 [(.google.api.field_behavior) = OPTIONAL]; @@ -1026,9 +1020,7 @@ public java.lang.String getSiteCredential() { * * *
            -     * Optional. Full resource name of the [SiteCredential][], such as
            -     * `projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/siteCredentials/*`.
            -     * Only set to crawl private URIs.
            +     * Optional. Credential id to use for crawling.
                  * 
            * * string site_credential = 5 [(.google.api.field_behavior) = OPTIONAL]; @@ -1051,9 +1043,7 @@ public com.google.protobuf.ByteString getSiteCredentialBytes() { * * *
            -     * Optional. Full resource name of the [SiteCredential][], such as
            -     * `projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/siteCredentials/*`.
            -     * Only set to crawl private URIs.
            +     * Optional. Credential id to use for crawling.
                  * 
            * * string site_credential = 5 [(.google.api.field_behavior) = OPTIONAL]; @@ -1075,9 +1065,7 @@ public Builder setSiteCredential(java.lang.String value) { * * *
            -     * Optional. Full resource name of the [SiteCredential][], such as
            -     * `projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/siteCredentials/*`.
            -     * Only set to crawl private URIs.
            +     * Optional. Credential id to use for crawling.
                  * 
            * * string site_credential = 5 [(.google.api.field_behavior) = OPTIONAL]; @@ -1095,9 +1083,7 @@ public Builder clearSiteCredential() { * * *
            -     * Optional. Full resource name of the [SiteCredential][], such as
            -     * `projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/siteCredentials/*`.
            -     * Only set to crawl private URIs.
            +     * Optional. Credential id to use for crawling.
                  * 
            * * string site_credential = 5 [(.google.api.field_behavior) = OPTIONAL]; diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/RecrawlUrisRequestOrBuilder.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/RecrawlUrisRequestOrBuilder.java index b8915b5e1817..77cea1fd610a 100644 --- a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/RecrawlUrisRequestOrBuilder.java +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/RecrawlUrisRequestOrBuilder.java @@ -132,9 +132,7 @@ public interface RecrawlUrisRequestOrBuilder * * *
            -   * Optional. Full resource name of the [SiteCredential][], such as
            -   * `projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/siteCredentials/*`.
            -   * Only set to crawl private URIs.
            +   * Optional. Credential id to use for crawling.
                * 
            * * string site_credential = 5 [(.google.api.field_behavior) = OPTIONAL]; @@ -147,9 +145,7 @@ public interface RecrawlUrisRequestOrBuilder * * *
            -   * Optional. Full resource name of the [SiteCredential][], such as
            -   * `projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/siteCredentials/*`.
            -   * Only set to crawl private URIs.
            +   * Optional. Credential id to use for crawling.
                * 
            * * string site_credential = 5 [(.google.api.field_behavior) = OPTIONAL]; diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/RemoveSuggestionRequest.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/RemoveSuggestionRequest.java new file mode 100644 index 000000000000..968f467b8ffe --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/RemoveSuggestionRequest.java @@ -0,0 +1,2053 @@ +/* + * 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/cloud/discoveryengine/v1beta/completion_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.discoveryengine.v1beta; + +/** + * + * + *
            + * Request message for
            + * [CompletionService.RemoveSuggestion][google.cloud.discoveryengine.v1beta.CompletionService.RemoveSuggestion]
            + * method.
            + * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.RemoveSuggestionRequest} + */ +@com.google.protobuf.Generated +public final class RemoveSuggestionRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.RemoveSuggestionRequest) + RemoveSuggestionRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "RemoveSuggestionRequest"); + } + + // Use RemoveSuggestionRequest.newBuilder() to construct. + private RemoveSuggestionRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private RemoveSuggestionRequest() { + completionConfig_ = ""; + userPseudoId_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.CompletionServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_RemoveSuggestionRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.CompletionServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_RemoveSuggestionRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.RemoveSuggestionRequest.class, + com.google.cloud.discoveryengine.v1beta.RemoveSuggestionRequest.Builder.class); + } + + private int bitField0_; + private int suggestionCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object suggestion_; + + public enum SuggestionCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + SEARCH_HISTORY_SUGGESTION(2), + REMOVE_ALL_SEARCH_HISTORY_SUGGESTIONS(6), + SUGGESTION_NOT_SET(0); + private final int value; + + private SuggestionCase(int value) { + this.value = value; + } + + /** + * @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 SuggestionCase valueOf(int value) { + return forNumber(value); + } + + public static SuggestionCase forNumber(int value) { + switch (value) { + case 2: + return SEARCH_HISTORY_SUGGESTION; + case 6: + return REMOVE_ALL_SEARCH_HISTORY_SUGGESTIONS; + case 0: + return SUGGESTION_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public SuggestionCase getSuggestionCase() { + return SuggestionCase.forNumber(suggestionCase_); + } + + public static final int SEARCH_HISTORY_SUGGESTION_FIELD_NUMBER = 2; + + /** + * + * + *
            +   * The search history suggestion to be removed.
            +   * 
            + * + * string search_history_suggestion = 2; + * + * @return Whether the searchHistorySuggestion field is set. + */ + public boolean hasSearchHistorySuggestion() { + return suggestionCase_ == 2; + } + + /** + * + * + *
            +   * The search history suggestion to be removed.
            +   * 
            + * + * string search_history_suggestion = 2; + * + * @return The searchHistorySuggestion. + */ + public java.lang.String getSearchHistorySuggestion() { + java.lang.Object ref = ""; + if (suggestionCase_ == 2) { + ref = suggestion_; + } + 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(); + if (suggestionCase_ == 2) { + suggestion_ = s; + } + return s; + } + } + + /** + * + * + *
            +   * The search history suggestion to be removed.
            +   * 
            + * + * string search_history_suggestion = 2; + * + * @return The bytes for searchHistorySuggestion. + */ + public com.google.protobuf.ByteString getSearchHistorySuggestionBytes() { + java.lang.Object ref = ""; + if (suggestionCase_ == 2) { + ref = suggestion_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (suggestionCase_ == 2) { + suggestion_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REMOVE_ALL_SEARCH_HISTORY_SUGGESTIONS_FIELD_NUMBER = 6; + + /** + * + * + *
            +   * Remove all search history suggestions for the user.
            +   * 
            + * + * bool remove_all_search_history_suggestions = 6; + * + * @return Whether the removeAllSearchHistorySuggestions field is set. + */ + @java.lang.Override + public boolean hasRemoveAllSearchHistorySuggestions() { + return suggestionCase_ == 6; + } + + /** + * + * + *
            +   * Remove all search history suggestions for the user.
            +   * 
            + * + * bool remove_all_search_history_suggestions = 6; + * + * @return The removeAllSearchHistorySuggestions. + */ + @java.lang.Override + public boolean getRemoveAllSearchHistorySuggestions() { + if (suggestionCase_ == 6) { + return (java.lang.Boolean) suggestion_; + } + return false; + } + + public static final int COMPLETION_CONFIG_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object completionConfig_ = ""; + + /** + * + * + *
            +   * Required. The completion_config of the parent engine resource name for
            +   * which the search history suggestion is to be removed, such as
            +   * `projects/*/locations/global/collections/default_collection/engines/*/completionConfig`.
            +   * 
            + * + * + * string completion_config = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The completionConfig. + */ + @java.lang.Override + public java.lang.String getCompletionConfig() { + java.lang.Object ref = completionConfig_; + 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(); + completionConfig_ = s; + return s; + } + } + + /** + * + * + *
            +   * Required. The completion_config of the parent engine resource name for
            +   * which the search history suggestion is to be removed, such as
            +   * `projects/*/locations/global/collections/default_collection/engines/*/completionConfig`.
            +   * 
            + * + * + * string completion_config = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for completionConfig. + */ + @java.lang.Override + public com.google.protobuf.ByteString getCompletionConfigBytes() { + java.lang.Object ref = completionConfig_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + completionConfig_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int USER_PSEUDO_ID_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object userPseudoId_ = ""; + + /** + * + * + *
            +   * Required. A unique identifier for tracking visitors. For example, this
            +   * could be implemented with an HTTP cookie, which should be able to uniquely
            +   * identify a visitor on a single device. This unique identifier should not
            +   * change if the visitor logs in or out of the website.
            +   *
            +   * This field should NOT have a fixed value such as `unknown_visitor`.
            +   *
            +   * This should be the same identifier as
            +   * [UserEvent.user_pseudo_id][google.cloud.discoveryengine.v1beta.UserEvent.user_pseudo_id]
            +   * and
            +   * [SearchRequest.user_pseudo_id][google.cloud.discoveryengine.v1beta.SearchRequest.user_pseudo_id].
            +   *
            +   * The field must be a UTF-8 encoded string with a length limit of 128.
            +   * 
            + * + * string user_pseudo_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The userPseudoId. + */ + @java.lang.Override + public java.lang.String getUserPseudoId() { + java.lang.Object ref = userPseudoId_; + 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(); + userPseudoId_ = s; + return s; + } + } + + /** + * + * + *
            +   * Required. A unique identifier for tracking visitors. For example, this
            +   * could be implemented with an HTTP cookie, which should be able to uniquely
            +   * identify a visitor on a single device. This unique identifier should not
            +   * change if the visitor logs in or out of the website.
            +   *
            +   * This field should NOT have a fixed value such as `unknown_visitor`.
            +   *
            +   * This should be the same identifier as
            +   * [UserEvent.user_pseudo_id][google.cloud.discoveryengine.v1beta.UserEvent.user_pseudo_id]
            +   * and
            +   * [SearchRequest.user_pseudo_id][google.cloud.discoveryengine.v1beta.SearchRequest.user_pseudo_id].
            +   *
            +   * The field must be a UTF-8 encoded string with a length limit of 128.
            +   * 
            + * + * string user_pseudo_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for userPseudoId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getUserPseudoIdBytes() { + java.lang.Object ref = userPseudoId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + userPseudoId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int USER_INFO_FIELD_NUMBER = 4; + private com.google.cloud.discoveryengine.v1beta.UserInfo userInfo_; + + /** + * + * + *
            +   * Optional. Information about the end user.
            +   *
            +   * This should be the same identifier information as
            +   * [UserEvent.user_info][google.cloud.discoveryengine.v1beta.UserEvent.user_info]
            +   * and
            +   * [SearchRequest.user_info][google.cloud.discoveryengine.v1beta.SearchRequest.user_info].
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.UserInfo user_info = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the userInfo field is set. + */ + @java.lang.Override + public boolean hasUserInfo() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
            +   * Optional. Information about the end user.
            +   *
            +   * This should be the same identifier information as
            +   * [UserEvent.user_info][google.cloud.discoveryengine.v1beta.UserEvent.user_info]
            +   * and
            +   * [SearchRequest.user_info][google.cloud.discoveryengine.v1beta.SearchRequest.user_info].
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.UserInfo user_info = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The userInfo. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.UserInfo getUserInfo() { + return userInfo_ == null + ? com.google.cloud.discoveryengine.v1beta.UserInfo.getDefaultInstance() + : userInfo_; + } + + /** + * + * + *
            +   * Optional. Information about the end user.
            +   *
            +   * This should be the same identifier information as
            +   * [UserEvent.user_info][google.cloud.discoveryengine.v1beta.UserEvent.user_info]
            +   * and
            +   * [SearchRequest.user_info][google.cloud.discoveryengine.v1beta.SearchRequest.user_info].
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.UserInfo user_info = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.UserInfoOrBuilder getUserInfoOrBuilder() { + return userInfo_ == null + ? com.google.cloud.discoveryengine.v1beta.UserInfo.getDefaultInstance() + : userInfo_; + } + + public static final int REMOVE_TIME_FIELD_NUMBER = 5; + private com.google.protobuf.Timestamp removeTime_; + + /** + * + * + *
            +   * Required. Time at which the suggestion was removed. If not set, the current
            +   * time will be used.
            +   * 
            + * + * .google.protobuf.Timestamp remove_time = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the removeTime field is set. + */ + @java.lang.Override + public boolean hasRemoveTime() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
            +   * Required. Time at which the suggestion was removed. If not set, the current
            +   * time will be used.
            +   * 
            + * + * .google.protobuf.Timestamp remove_time = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The removeTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getRemoveTime() { + return removeTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : removeTime_; + } + + /** + * + * + *
            +   * Required. Time at which the suggestion was removed. If not set, the current
            +   * time will be used.
            +   * 
            + * + * .google.protobuf.Timestamp remove_time = 5 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getRemoveTimeOrBuilder() { + return removeTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : removeTime_; + } + + 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(completionConfig_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, completionConfig_); + } + if (suggestionCase_ == 2) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, suggestion_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(userPseudoId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, userPseudoId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(4, getUserInfo()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(5, getRemoveTime()); + } + if (suggestionCase_ == 6) { + output.writeBool(6, (boolean) ((java.lang.Boolean) suggestion_)); + } + 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(completionConfig_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, completionConfig_); + } + if (suggestionCase_ == 2) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, suggestion_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(userPseudoId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, userPseudoId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getUserInfo()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getRemoveTime()); + } + if (suggestionCase_ == 6) { + size += + com.google.protobuf.CodedOutputStream.computeBoolSize( + 6, (boolean) ((java.lang.Boolean) suggestion_)); + } + 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.discoveryengine.v1beta.RemoveSuggestionRequest)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1beta.RemoveSuggestionRequest other = + (com.google.cloud.discoveryengine.v1beta.RemoveSuggestionRequest) obj; + + if (!getCompletionConfig().equals(other.getCompletionConfig())) return false; + if (!getUserPseudoId().equals(other.getUserPseudoId())) return false; + if (hasUserInfo() != other.hasUserInfo()) return false; + if (hasUserInfo()) { + if (!getUserInfo().equals(other.getUserInfo())) return false; + } + if (hasRemoveTime() != other.hasRemoveTime()) return false; + if (hasRemoveTime()) { + if (!getRemoveTime().equals(other.getRemoveTime())) return false; + } + if (!getSuggestionCase().equals(other.getSuggestionCase())) return false; + switch (suggestionCase_) { + case 2: + if (!getSearchHistorySuggestion().equals(other.getSearchHistorySuggestion())) return false; + break; + case 6: + if (getRemoveAllSearchHistorySuggestions() != other.getRemoveAllSearchHistorySuggestions()) + return false; + break; + case 0: + default: + } + 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) + COMPLETION_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getCompletionConfig().hashCode(); + hash = (37 * hash) + USER_PSEUDO_ID_FIELD_NUMBER; + hash = (53 * hash) + getUserPseudoId().hashCode(); + if (hasUserInfo()) { + hash = (37 * hash) + USER_INFO_FIELD_NUMBER; + hash = (53 * hash) + getUserInfo().hashCode(); + } + if (hasRemoveTime()) { + hash = (37 * hash) + REMOVE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getRemoveTime().hashCode(); + } + switch (suggestionCase_) { + case 2: + hash = (37 * hash) + SEARCH_HISTORY_SUGGESTION_FIELD_NUMBER; + hash = (53 * hash) + getSearchHistorySuggestion().hashCode(); + break; + case 6: + hash = (37 * hash) + REMOVE_ALL_SEARCH_HISTORY_SUGGESTIONS_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashBoolean(getRemoveAllSearchHistorySuggestions()); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1beta.RemoveSuggestionRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.RemoveSuggestionRequest 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.discoveryengine.v1beta.RemoveSuggestionRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.RemoveSuggestionRequest 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.discoveryengine.v1beta.RemoveSuggestionRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.RemoveSuggestionRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1beta.RemoveSuggestionRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.RemoveSuggestionRequest 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.discoveryengine.v1beta.RemoveSuggestionRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.RemoveSuggestionRequest 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.discoveryengine.v1beta.RemoveSuggestionRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.RemoveSuggestionRequest 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.discoveryengine.v1beta.RemoveSuggestionRequest 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
            +   * [CompletionService.RemoveSuggestion][google.cloud.discoveryengine.v1beta.CompletionService.RemoveSuggestion]
            +   * method.
            +   * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.RemoveSuggestionRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.RemoveSuggestionRequest) + com.google.cloud.discoveryengine.v1beta.RemoveSuggestionRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.CompletionServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_RemoveSuggestionRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.CompletionServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_RemoveSuggestionRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.RemoveSuggestionRequest.class, + com.google.cloud.discoveryengine.v1beta.RemoveSuggestionRequest.Builder.class); + } + + // Construct using com.google.cloud.discoveryengine.v1beta.RemoveSuggestionRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetUserInfoFieldBuilder(); + internalGetRemoveTimeFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + completionConfig_ = ""; + userPseudoId_ = ""; + userInfo_ = null; + if (userInfoBuilder_ != null) { + userInfoBuilder_.dispose(); + userInfoBuilder_ = null; + } + removeTime_ = null; + if (removeTimeBuilder_ != null) { + removeTimeBuilder_.dispose(); + removeTimeBuilder_ = null; + } + suggestionCase_ = 0; + suggestion_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1beta.CompletionServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_RemoveSuggestionRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.RemoveSuggestionRequest + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1beta.RemoveSuggestionRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.RemoveSuggestionRequest build() { + com.google.cloud.discoveryengine.v1beta.RemoveSuggestionRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.RemoveSuggestionRequest buildPartial() { + com.google.cloud.discoveryengine.v1beta.RemoveSuggestionRequest result = + new com.google.cloud.discoveryengine.v1beta.RemoveSuggestionRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.discoveryengine.v1beta.RemoveSuggestionRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.completionConfig_ = completionConfig_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.userPseudoId_ = userPseudoId_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000010) != 0)) { + result.userInfo_ = userInfoBuilder_ == null ? userInfo_ : userInfoBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.removeTime_ = removeTimeBuilder_ == null ? removeTime_ : removeTimeBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + result.bitField0_ |= to_bitField0_; + } + + private void buildPartialOneofs( + com.google.cloud.discoveryengine.v1beta.RemoveSuggestionRequest result) { + result.suggestionCase_ = suggestionCase_; + result.suggestion_ = this.suggestion_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.discoveryengine.v1beta.RemoveSuggestionRequest) { + return mergeFrom((com.google.cloud.discoveryengine.v1beta.RemoveSuggestionRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1beta.RemoveSuggestionRequest other) { + if (other + == com.google.cloud.discoveryengine.v1beta.RemoveSuggestionRequest.getDefaultInstance()) + return this; + if (!other.getCompletionConfig().isEmpty()) { + completionConfig_ = other.completionConfig_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getUserPseudoId().isEmpty()) { + userPseudoId_ = other.userPseudoId_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (other.hasUserInfo()) { + mergeUserInfo(other.getUserInfo()); + } + if (other.hasRemoveTime()) { + mergeRemoveTime(other.getRemoveTime()); + } + switch (other.getSuggestionCase()) { + case SEARCH_HISTORY_SUGGESTION: + { + suggestionCase_ = 2; + suggestion_ = other.suggestion_; + onChanged(); + break; + } + case REMOVE_ALL_SEARCH_HISTORY_SUGGESTIONS: + { + setRemoveAllSearchHistorySuggestions(other.getRemoveAllSearchHistorySuggestions()); + break; + } + case SUGGESTION_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + completionConfig_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 10 + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + suggestionCase_ = 2; + suggestion_ = s; + break; + } // case 18 + case 26: + { + userPseudoId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 26 + case 34: + { + input.readMessage( + internalGetUserInfoFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 34 + case 42: + { + input.readMessage( + internalGetRemoveTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 42 + case 48: + { + suggestion_ = input.readBool(); + suggestionCase_ = 6; + break; + } // case 48 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int suggestionCase_ = 0; + private java.lang.Object suggestion_; + + public SuggestionCase getSuggestionCase() { + return SuggestionCase.forNumber(suggestionCase_); + } + + public Builder clearSuggestion() { + suggestionCase_ = 0; + suggestion_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + /** + * + * + *
            +     * The search history suggestion to be removed.
            +     * 
            + * + * string search_history_suggestion = 2; + * + * @return Whether the searchHistorySuggestion field is set. + */ + @java.lang.Override + public boolean hasSearchHistorySuggestion() { + return suggestionCase_ == 2; + } + + /** + * + * + *
            +     * The search history suggestion to be removed.
            +     * 
            + * + * string search_history_suggestion = 2; + * + * @return The searchHistorySuggestion. + */ + @java.lang.Override + public java.lang.String getSearchHistorySuggestion() { + java.lang.Object ref = ""; + if (suggestionCase_ == 2) { + ref = suggestion_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (suggestionCase_ == 2) { + suggestion_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
            +     * The search history suggestion to be removed.
            +     * 
            + * + * string search_history_suggestion = 2; + * + * @return The bytes for searchHistorySuggestion. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSearchHistorySuggestionBytes() { + java.lang.Object ref = ""; + if (suggestionCase_ == 2) { + ref = suggestion_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (suggestionCase_ == 2) { + suggestion_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
            +     * The search history suggestion to be removed.
            +     * 
            + * + * string search_history_suggestion = 2; + * + * @param value The searchHistorySuggestion to set. + * @return This builder for chaining. + */ + public Builder setSearchHistorySuggestion(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + suggestionCase_ = 2; + suggestion_ = value; + onChanged(); + return this; + } + + /** + * + * + *
            +     * The search history suggestion to be removed.
            +     * 
            + * + * string search_history_suggestion = 2; + * + * @return This builder for chaining. + */ + public Builder clearSearchHistorySuggestion() { + if (suggestionCase_ == 2) { + suggestionCase_ = 0; + suggestion_ = null; + onChanged(); + } + return this; + } + + /** + * + * + *
            +     * The search history suggestion to be removed.
            +     * 
            + * + * string search_history_suggestion = 2; + * + * @param value The bytes for searchHistorySuggestion to set. + * @return This builder for chaining. + */ + public Builder setSearchHistorySuggestionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + suggestionCase_ = 2; + suggestion_ = value; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Remove all search history suggestions for the user.
            +     * 
            + * + * bool remove_all_search_history_suggestions = 6; + * + * @return Whether the removeAllSearchHistorySuggestions field is set. + */ + public boolean hasRemoveAllSearchHistorySuggestions() { + return suggestionCase_ == 6; + } + + /** + * + * + *
            +     * Remove all search history suggestions for the user.
            +     * 
            + * + * bool remove_all_search_history_suggestions = 6; + * + * @return The removeAllSearchHistorySuggestions. + */ + public boolean getRemoveAllSearchHistorySuggestions() { + if (suggestionCase_ == 6) { + return (java.lang.Boolean) suggestion_; + } + return false; + } + + /** + * + * + *
            +     * Remove all search history suggestions for the user.
            +     * 
            + * + * bool remove_all_search_history_suggestions = 6; + * + * @param value The removeAllSearchHistorySuggestions to set. + * @return This builder for chaining. + */ + public Builder setRemoveAllSearchHistorySuggestions(boolean value) { + + suggestionCase_ = 6; + suggestion_ = value; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Remove all search history suggestions for the user.
            +     * 
            + * + * bool remove_all_search_history_suggestions = 6; + * + * @return This builder for chaining. + */ + public Builder clearRemoveAllSearchHistorySuggestions() { + if (suggestionCase_ == 6) { + suggestionCase_ = 0; + suggestion_ = null; + onChanged(); + } + return this; + } + + private java.lang.Object completionConfig_ = ""; + + /** + * + * + *
            +     * Required. The completion_config of the parent engine resource name for
            +     * which the search history suggestion is to be removed, such as
            +     * `projects/*/locations/global/collections/default_collection/engines/*/completionConfig`.
            +     * 
            + * + * + * string completion_config = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The completionConfig. + */ + public java.lang.String getCompletionConfig() { + java.lang.Object ref = completionConfig_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + completionConfig_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
            +     * Required. The completion_config of the parent engine resource name for
            +     * which the search history suggestion is to be removed, such as
            +     * `projects/*/locations/global/collections/default_collection/engines/*/completionConfig`.
            +     * 
            + * + * + * string completion_config = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for completionConfig. + */ + public com.google.protobuf.ByteString getCompletionConfigBytes() { + java.lang.Object ref = completionConfig_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + completionConfig_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
            +     * Required. The completion_config of the parent engine resource name for
            +     * which the search history suggestion is to be removed, such as
            +     * `projects/*/locations/global/collections/default_collection/engines/*/completionConfig`.
            +     * 
            + * + * + * string completion_config = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The completionConfig to set. + * @return This builder for chaining. + */ + public Builder setCompletionConfig(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + completionConfig_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Required. The completion_config of the parent engine resource name for
            +     * which the search history suggestion is to be removed, such as
            +     * `projects/*/locations/global/collections/default_collection/engines/*/completionConfig`.
            +     * 
            + * + * + * string completion_config = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearCompletionConfig() { + completionConfig_ = getDefaultInstance().getCompletionConfig(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
            +     * Required. The completion_config of the parent engine resource name for
            +     * which the search history suggestion is to be removed, such as
            +     * `projects/*/locations/global/collections/default_collection/engines/*/completionConfig`.
            +     * 
            + * + * + * string completion_config = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for completionConfig to set. + * @return This builder for chaining. + */ + public Builder setCompletionConfigBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + completionConfig_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object userPseudoId_ = ""; + + /** + * + * + *
            +     * Required. A unique identifier for tracking visitors. For example, this
            +     * could be implemented with an HTTP cookie, which should be able to uniquely
            +     * identify a visitor on a single device. This unique identifier should not
            +     * change if the visitor logs in or out of the website.
            +     *
            +     * This field should NOT have a fixed value such as `unknown_visitor`.
            +     *
            +     * This should be the same identifier as
            +     * [UserEvent.user_pseudo_id][google.cloud.discoveryengine.v1beta.UserEvent.user_pseudo_id]
            +     * and
            +     * [SearchRequest.user_pseudo_id][google.cloud.discoveryengine.v1beta.SearchRequest.user_pseudo_id].
            +     *
            +     * The field must be a UTF-8 encoded string with a length limit of 128.
            +     * 
            + * + * string user_pseudo_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The userPseudoId. + */ + public java.lang.String getUserPseudoId() { + java.lang.Object ref = userPseudoId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + userPseudoId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
            +     * Required. A unique identifier for tracking visitors. For example, this
            +     * could be implemented with an HTTP cookie, which should be able to uniquely
            +     * identify a visitor on a single device. This unique identifier should not
            +     * change if the visitor logs in or out of the website.
            +     *
            +     * This field should NOT have a fixed value such as `unknown_visitor`.
            +     *
            +     * This should be the same identifier as
            +     * [UserEvent.user_pseudo_id][google.cloud.discoveryengine.v1beta.UserEvent.user_pseudo_id]
            +     * and
            +     * [SearchRequest.user_pseudo_id][google.cloud.discoveryengine.v1beta.SearchRequest.user_pseudo_id].
            +     *
            +     * The field must be a UTF-8 encoded string with a length limit of 128.
            +     * 
            + * + * string user_pseudo_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for userPseudoId. + */ + public com.google.protobuf.ByteString getUserPseudoIdBytes() { + java.lang.Object ref = userPseudoId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + userPseudoId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
            +     * Required. A unique identifier for tracking visitors. For example, this
            +     * could be implemented with an HTTP cookie, which should be able to uniquely
            +     * identify a visitor on a single device. This unique identifier should not
            +     * change if the visitor logs in or out of the website.
            +     *
            +     * This field should NOT have a fixed value such as `unknown_visitor`.
            +     *
            +     * This should be the same identifier as
            +     * [UserEvent.user_pseudo_id][google.cloud.discoveryengine.v1beta.UserEvent.user_pseudo_id]
            +     * and
            +     * [SearchRequest.user_pseudo_id][google.cloud.discoveryengine.v1beta.SearchRequest.user_pseudo_id].
            +     *
            +     * The field must be a UTF-8 encoded string with a length limit of 128.
            +     * 
            + * + * string user_pseudo_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The userPseudoId to set. + * @return This builder for chaining. + */ + public Builder setUserPseudoId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + userPseudoId_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Required. A unique identifier for tracking visitors. For example, this
            +     * could be implemented with an HTTP cookie, which should be able to uniquely
            +     * identify a visitor on a single device. This unique identifier should not
            +     * change if the visitor logs in or out of the website.
            +     *
            +     * This field should NOT have a fixed value such as `unknown_visitor`.
            +     *
            +     * This should be the same identifier as
            +     * [UserEvent.user_pseudo_id][google.cloud.discoveryengine.v1beta.UserEvent.user_pseudo_id]
            +     * and
            +     * [SearchRequest.user_pseudo_id][google.cloud.discoveryengine.v1beta.SearchRequest.user_pseudo_id].
            +     *
            +     * The field must be a UTF-8 encoded string with a length limit of 128.
            +     * 
            + * + * string user_pseudo_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearUserPseudoId() { + userPseudoId_ = getDefaultInstance().getUserPseudoId(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + + /** + * + * + *
            +     * Required. A unique identifier for tracking visitors. For example, this
            +     * could be implemented with an HTTP cookie, which should be able to uniquely
            +     * identify a visitor on a single device. This unique identifier should not
            +     * change if the visitor logs in or out of the website.
            +     *
            +     * This field should NOT have a fixed value such as `unknown_visitor`.
            +     *
            +     * This should be the same identifier as
            +     * [UserEvent.user_pseudo_id][google.cloud.discoveryengine.v1beta.UserEvent.user_pseudo_id]
            +     * and
            +     * [SearchRequest.user_pseudo_id][google.cloud.discoveryengine.v1beta.SearchRequest.user_pseudo_id].
            +     *
            +     * The field must be a UTF-8 encoded string with a length limit of 128.
            +     * 
            + * + * string user_pseudo_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for userPseudoId to set. + * @return This builder for chaining. + */ + public Builder setUserPseudoIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + userPseudoId_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private com.google.cloud.discoveryengine.v1beta.UserInfo userInfo_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.UserInfo, + com.google.cloud.discoveryengine.v1beta.UserInfo.Builder, + com.google.cloud.discoveryengine.v1beta.UserInfoOrBuilder> + userInfoBuilder_; + + /** + * + * + *
            +     * Optional. Information about the end user.
            +     *
            +     * This should be the same identifier information as
            +     * [UserEvent.user_info][google.cloud.discoveryengine.v1beta.UserEvent.user_info]
            +     * and
            +     * [SearchRequest.user_info][google.cloud.discoveryengine.v1beta.SearchRequest.user_info].
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.UserInfo user_info = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the userInfo field is set. + */ + public boolean hasUserInfo() { + return ((bitField0_ & 0x00000010) != 0); + } + + /** + * + * + *
            +     * Optional. Information about the end user.
            +     *
            +     * This should be the same identifier information as
            +     * [UserEvent.user_info][google.cloud.discoveryengine.v1beta.UserEvent.user_info]
            +     * and
            +     * [SearchRequest.user_info][google.cloud.discoveryengine.v1beta.SearchRequest.user_info].
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.UserInfo user_info = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The userInfo. + */ + public com.google.cloud.discoveryengine.v1beta.UserInfo getUserInfo() { + if (userInfoBuilder_ == null) { + return userInfo_ == null + ? com.google.cloud.discoveryengine.v1beta.UserInfo.getDefaultInstance() + : userInfo_; + } else { + return userInfoBuilder_.getMessage(); + } + } + + /** + * + * + *
            +     * Optional. Information about the end user.
            +     *
            +     * This should be the same identifier information as
            +     * [UserEvent.user_info][google.cloud.discoveryengine.v1beta.UserEvent.user_info]
            +     * and
            +     * [SearchRequest.user_info][google.cloud.discoveryengine.v1beta.SearchRequest.user_info].
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.UserInfo user_info = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setUserInfo(com.google.cloud.discoveryengine.v1beta.UserInfo value) { + if (userInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + userInfo_ = value; + } else { + userInfoBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Optional. Information about the end user.
            +     *
            +     * This should be the same identifier information as
            +     * [UserEvent.user_info][google.cloud.discoveryengine.v1beta.UserEvent.user_info]
            +     * and
            +     * [SearchRequest.user_info][google.cloud.discoveryengine.v1beta.SearchRequest.user_info].
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.UserInfo user_info = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setUserInfo( + com.google.cloud.discoveryengine.v1beta.UserInfo.Builder builderForValue) { + if (userInfoBuilder_ == null) { + userInfo_ = builderForValue.build(); + } else { + userInfoBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Optional. Information about the end user.
            +     *
            +     * This should be the same identifier information as
            +     * [UserEvent.user_info][google.cloud.discoveryengine.v1beta.UserEvent.user_info]
            +     * and
            +     * [SearchRequest.user_info][google.cloud.discoveryengine.v1beta.SearchRequest.user_info].
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.UserInfo user_info = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeUserInfo(com.google.cloud.discoveryengine.v1beta.UserInfo value) { + if (userInfoBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) + && userInfo_ != null + && userInfo_ != com.google.cloud.discoveryengine.v1beta.UserInfo.getDefaultInstance()) { + getUserInfoBuilder().mergeFrom(value); + } else { + userInfo_ = value; + } + } else { + userInfoBuilder_.mergeFrom(value); + } + if (userInfo_ != null) { + bitField0_ |= 0x00000010; + onChanged(); + } + return this; + } + + /** + * + * + *
            +     * Optional. Information about the end user.
            +     *
            +     * This should be the same identifier information as
            +     * [UserEvent.user_info][google.cloud.discoveryengine.v1beta.UserEvent.user_info]
            +     * and
            +     * [SearchRequest.user_info][google.cloud.discoveryengine.v1beta.SearchRequest.user_info].
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.UserInfo user_info = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearUserInfo() { + bitField0_ = (bitField0_ & ~0x00000010); + userInfo_ = null; + if (userInfoBuilder_ != null) { + userInfoBuilder_.dispose(); + userInfoBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
            +     * Optional. Information about the end user.
            +     *
            +     * This should be the same identifier information as
            +     * [UserEvent.user_info][google.cloud.discoveryengine.v1beta.UserEvent.user_info]
            +     * and
            +     * [SearchRequest.user_info][google.cloud.discoveryengine.v1beta.SearchRequest.user_info].
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.UserInfo user_info = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.discoveryengine.v1beta.UserInfo.Builder getUserInfoBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return internalGetUserInfoFieldBuilder().getBuilder(); + } + + /** + * + * + *
            +     * Optional. Information about the end user.
            +     *
            +     * This should be the same identifier information as
            +     * [UserEvent.user_info][google.cloud.discoveryengine.v1beta.UserEvent.user_info]
            +     * and
            +     * [SearchRequest.user_info][google.cloud.discoveryengine.v1beta.SearchRequest.user_info].
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.UserInfo user_info = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.discoveryengine.v1beta.UserInfoOrBuilder getUserInfoOrBuilder() { + if (userInfoBuilder_ != null) { + return userInfoBuilder_.getMessageOrBuilder(); + } else { + return userInfo_ == null + ? com.google.cloud.discoveryengine.v1beta.UserInfo.getDefaultInstance() + : userInfo_; + } + } + + /** + * + * + *
            +     * Optional. Information about the end user.
            +     *
            +     * This should be the same identifier information as
            +     * [UserEvent.user_info][google.cloud.discoveryengine.v1beta.UserEvent.user_info]
            +     * and
            +     * [SearchRequest.user_info][google.cloud.discoveryengine.v1beta.SearchRequest.user_info].
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.UserInfo user_info = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.UserInfo, + com.google.cloud.discoveryengine.v1beta.UserInfo.Builder, + com.google.cloud.discoveryengine.v1beta.UserInfoOrBuilder> + internalGetUserInfoFieldBuilder() { + if (userInfoBuilder_ == null) { + userInfoBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.UserInfo, + com.google.cloud.discoveryengine.v1beta.UserInfo.Builder, + com.google.cloud.discoveryengine.v1beta.UserInfoOrBuilder>( + getUserInfo(), getParentForChildren(), isClean()); + userInfo_ = null; + } + return userInfoBuilder_; + } + + private com.google.protobuf.Timestamp removeTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + removeTimeBuilder_; + + /** + * + * + *
            +     * Required. Time at which the suggestion was removed. If not set, the current
            +     * time will be used.
            +     * 
            + * + * .google.protobuf.Timestamp remove_time = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the removeTime field is set. + */ + public boolean hasRemoveTime() { + return ((bitField0_ & 0x00000020) != 0); + } + + /** + * + * + *
            +     * Required. Time at which the suggestion was removed. If not set, the current
            +     * time will be used.
            +     * 
            + * + * .google.protobuf.Timestamp remove_time = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The removeTime. + */ + public com.google.protobuf.Timestamp getRemoveTime() { + if (removeTimeBuilder_ == null) { + return removeTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : removeTime_; + } else { + return removeTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
            +     * Required. Time at which the suggestion was removed. If not set, the current
            +     * time will be used.
            +     * 
            + * + * .google.protobuf.Timestamp remove_time = 5 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setRemoveTime(com.google.protobuf.Timestamp value) { + if (removeTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + removeTime_ = value; + } else { + removeTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Required. Time at which the suggestion was removed. If not set, the current
            +     * time will be used.
            +     * 
            + * + * .google.protobuf.Timestamp remove_time = 5 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setRemoveTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (removeTimeBuilder_ == null) { + removeTime_ = builderForValue.build(); + } else { + removeTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Required. Time at which the suggestion was removed. If not set, the current
            +     * time will be used.
            +     * 
            + * + * .google.protobuf.Timestamp remove_time = 5 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeRemoveTime(com.google.protobuf.Timestamp value) { + if (removeTimeBuilder_ == null) { + if (((bitField0_ & 0x00000020) != 0) + && removeTime_ != null + && removeTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getRemoveTimeBuilder().mergeFrom(value); + } else { + removeTime_ = value; + } + } else { + removeTimeBuilder_.mergeFrom(value); + } + if (removeTime_ != null) { + bitField0_ |= 0x00000020; + onChanged(); + } + return this; + } + + /** + * + * + *
            +     * Required. Time at which the suggestion was removed. If not set, the current
            +     * time will be used.
            +     * 
            + * + * .google.protobuf.Timestamp remove_time = 5 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearRemoveTime() { + bitField0_ = (bitField0_ & ~0x00000020); + removeTime_ = null; + if (removeTimeBuilder_ != null) { + removeTimeBuilder_.dispose(); + removeTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
            +     * Required. Time at which the suggestion was removed. If not set, the current
            +     * time will be used.
            +     * 
            + * + * .google.protobuf.Timestamp remove_time = 5 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.Timestamp.Builder getRemoveTimeBuilder() { + bitField0_ |= 0x00000020; + onChanged(); + return internalGetRemoveTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
            +     * Required. Time at which the suggestion was removed. If not set, the current
            +     * time will be used.
            +     * 
            + * + * .google.protobuf.Timestamp remove_time = 5 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.TimestampOrBuilder getRemoveTimeOrBuilder() { + if (removeTimeBuilder_ != null) { + return removeTimeBuilder_.getMessageOrBuilder(); + } else { + return removeTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : removeTime_; + } + } + + /** + * + * + *
            +     * Required. Time at which the suggestion was removed. If not set, the current
            +     * time will be used.
            +     * 
            + * + * .google.protobuf.Timestamp remove_time = 5 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + internalGetRemoveTimeFieldBuilder() { + if (removeTimeBuilder_ == null) { + removeTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getRemoveTime(), getParentForChildren(), isClean()); + removeTime_ = null; + } + return removeTimeBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.RemoveSuggestionRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.RemoveSuggestionRequest) + private static final com.google.cloud.discoveryengine.v1beta.RemoveSuggestionRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.discoveryengine.v1beta.RemoveSuggestionRequest(); + } + + public static com.google.cloud.discoveryengine.v1beta.RemoveSuggestionRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RemoveSuggestionRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.RemoveSuggestionRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/RemoveSuggestionRequestOrBuilder.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/RemoveSuggestionRequestOrBuilder.java new file mode 100644 index 000000000000..ab51b0065b92 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/RemoveSuggestionRequestOrBuilder.java @@ -0,0 +1,281 @@ +/* + * 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/cloud/discoveryengine/v1beta/completion_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.discoveryengine.v1beta; + +@com.google.protobuf.Generated +public interface RemoveSuggestionRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.RemoveSuggestionRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
            +   * The search history suggestion to be removed.
            +   * 
            + * + * string search_history_suggestion = 2; + * + * @return Whether the searchHistorySuggestion field is set. + */ + boolean hasSearchHistorySuggestion(); + + /** + * + * + *
            +   * The search history suggestion to be removed.
            +   * 
            + * + * string search_history_suggestion = 2; + * + * @return The searchHistorySuggestion. + */ + java.lang.String getSearchHistorySuggestion(); + + /** + * + * + *
            +   * The search history suggestion to be removed.
            +   * 
            + * + * string search_history_suggestion = 2; + * + * @return The bytes for searchHistorySuggestion. + */ + com.google.protobuf.ByteString getSearchHistorySuggestionBytes(); + + /** + * + * + *
            +   * Remove all search history suggestions for the user.
            +   * 
            + * + * bool remove_all_search_history_suggestions = 6; + * + * @return Whether the removeAllSearchHistorySuggestions field is set. + */ + boolean hasRemoveAllSearchHistorySuggestions(); + + /** + * + * + *
            +   * Remove all search history suggestions for the user.
            +   * 
            + * + * bool remove_all_search_history_suggestions = 6; + * + * @return The removeAllSearchHistorySuggestions. + */ + boolean getRemoveAllSearchHistorySuggestions(); + + /** + * + * + *
            +   * Required. The completion_config of the parent engine resource name for
            +   * which the search history suggestion is to be removed, such as
            +   * `projects/*/locations/global/collections/default_collection/engines/*/completionConfig`.
            +   * 
            + * + * + * string completion_config = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The completionConfig. + */ + java.lang.String getCompletionConfig(); + + /** + * + * + *
            +   * Required. The completion_config of the parent engine resource name for
            +   * which the search history suggestion is to be removed, such as
            +   * `projects/*/locations/global/collections/default_collection/engines/*/completionConfig`.
            +   * 
            + * + * + * string completion_config = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for completionConfig. + */ + com.google.protobuf.ByteString getCompletionConfigBytes(); + + /** + * + * + *
            +   * Required. A unique identifier for tracking visitors. For example, this
            +   * could be implemented with an HTTP cookie, which should be able to uniquely
            +   * identify a visitor on a single device. This unique identifier should not
            +   * change if the visitor logs in or out of the website.
            +   *
            +   * This field should NOT have a fixed value such as `unknown_visitor`.
            +   *
            +   * This should be the same identifier as
            +   * [UserEvent.user_pseudo_id][google.cloud.discoveryengine.v1beta.UserEvent.user_pseudo_id]
            +   * and
            +   * [SearchRequest.user_pseudo_id][google.cloud.discoveryengine.v1beta.SearchRequest.user_pseudo_id].
            +   *
            +   * The field must be a UTF-8 encoded string with a length limit of 128.
            +   * 
            + * + * string user_pseudo_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The userPseudoId. + */ + java.lang.String getUserPseudoId(); + + /** + * + * + *
            +   * Required. A unique identifier for tracking visitors. For example, this
            +   * could be implemented with an HTTP cookie, which should be able to uniquely
            +   * identify a visitor on a single device. This unique identifier should not
            +   * change if the visitor logs in or out of the website.
            +   *
            +   * This field should NOT have a fixed value such as `unknown_visitor`.
            +   *
            +   * This should be the same identifier as
            +   * [UserEvent.user_pseudo_id][google.cloud.discoveryengine.v1beta.UserEvent.user_pseudo_id]
            +   * and
            +   * [SearchRequest.user_pseudo_id][google.cloud.discoveryengine.v1beta.SearchRequest.user_pseudo_id].
            +   *
            +   * The field must be a UTF-8 encoded string with a length limit of 128.
            +   * 
            + * + * string user_pseudo_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for userPseudoId. + */ + com.google.protobuf.ByteString getUserPseudoIdBytes(); + + /** + * + * + *
            +   * Optional. Information about the end user.
            +   *
            +   * This should be the same identifier information as
            +   * [UserEvent.user_info][google.cloud.discoveryengine.v1beta.UserEvent.user_info]
            +   * and
            +   * [SearchRequest.user_info][google.cloud.discoveryengine.v1beta.SearchRequest.user_info].
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.UserInfo user_info = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the userInfo field is set. + */ + boolean hasUserInfo(); + + /** + * + * + *
            +   * Optional. Information about the end user.
            +   *
            +   * This should be the same identifier information as
            +   * [UserEvent.user_info][google.cloud.discoveryengine.v1beta.UserEvent.user_info]
            +   * and
            +   * [SearchRequest.user_info][google.cloud.discoveryengine.v1beta.SearchRequest.user_info].
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.UserInfo user_info = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The userInfo. + */ + com.google.cloud.discoveryengine.v1beta.UserInfo getUserInfo(); + + /** + * + * + *
            +   * Optional. Information about the end user.
            +   *
            +   * This should be the same identifier information as
            +   * [UserEvent.user_info][google.cloud.discoveryengine.v1beta.UserEvent.user_info]
            +   * and
            +   * [SearchRequest.user_info][google.cloud.discoveryengine.v1beta.SearchRequest.user_info].
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.UserInfo user_info = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.discoveryengine.v1beta.UserInfoOrBuilder getUserInfoOrBuilder(); + + /** + * + * + *
            +   * Required. Time at which the suggestion was removed. If not set, the current
            +   * time will be used.
            +   * 
            + * + * .google.protobuf.Timestamp remove_time = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the removeTime field is set. + */ + boolean hasRemoveTime(); + + /** + * + * + *
            +   * Required. Time at which the suggestion was removed. If not set, the current
            +   * time will be used.
            +   * 
            + * + * .google.protobuf.Timestamp remove_time = 5 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The removeTime. + */ + com.google.protobuf.Timestamp getRemoveTime(); + + /** + * + * + *
            +   * Required. Time at which the suggestion was removed. If not set, the current
            +   * time will be used.
            +   * 
            + * + * .google.protobuf.Timestamp remove_time = 5 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.protobuf.TimestampOrBuilder getRemoveTimeOrBuilder(); + + com.google.cloud.discoveryengine.v1beta.RemoveSuggestionRequest.SuggestionCase + getSuggestionCase(); +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/RemoveSuggestionResponse.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/RemoveSuggestionResponse.java new file mode 100644 index 000000000000..0e70adbb9ea0 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/RemoveSuggestionResponse.java @@ -0,0 +1,407 @@ +/* + * 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/cloud/discoveryengine/v1beta/completion_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.discoveryengine.v1beta; + +/** + * + * + *
            + * Response message for
            + * [CompletionService.RemoveSuggestion][google.cloud.discoveryengine.v1beta.CompletionService.RemoveSuggestion]
            + * method.
            + * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.RemoveSuggestionResponse} + */ +@com.google.protobuf.Generated +public final class RemoveSuggestionResponse extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.RemoveSuggestionResponse) + RemoveSuggestionResponseOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "RemoveSuggestionResponse"); + } + + // Use RemoveSuggestionResponse.newBuilder() to construct. + private RemoveSuggestionResponse(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private RemoveSuggestionResponse() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.CompletionServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_RemoveSuggestionResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.CompletionServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_RemoveSuggestionResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.RemoveSuggestionResponse.class, + com.google.cloud.discoveryengine.v1beta.RemoveSuggestionResponse.Builder.class); + } + + 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 { + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + 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.discoveryengine.v1beta.RemoveSuggestionResponse)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1beta.RemoveSuggestionResponse other = + (com.google.cloud.discoveryengine.v1beta.RemoveSuggestionResponse) obj; + + 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 = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1beta.RemoveSuggestionResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.RemoveSuggestionResponse 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.discoveryengine.v1beta.RemoveSuggestionResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.RemoveSuggestionResponse 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.discoveryengine.v1beta.RemoveSuggestionResponse parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.RemoveSuggestionResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1beta.RemoveSuggestionResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.RemoveSuggestionResponse 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.discoveryengine.v1beta.RemoveSuggestionResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.RemoveSuggestionResponse 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.discoveryengine.v1beta.RemoveSuggestionResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.RemoveSuggestionResponse 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.discoveryengine.v1beta.RemoveSuggestionResponse 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
            +   * [CompletionService.RemoveSuggestion][google.cloud.discoveryengine.v1beta.CompletionService.RemoveSuggestion]
            +   * method.
            +   * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.RemoveSuggestionResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.RemoveSuggestionResponse) + com.google.cloud.discoveryengine.v1beta.RemoveSuggestionResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.CompletionServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_RemoveSuggestionResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.CompletionServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_RemoveSuggestionResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.RemoveSuggestionResponse.class, + com.google.cloud.discoveryengine.v1beta.RemoveSuggestionResponse.Builder.class); + } + + // Construct using com.google.cloud.discoveryengine.v1beta.RemoveSuggestionResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1beta.CompletionServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_RemoveSuggestionResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.RemoveSuggestionResponse + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1beta.RemoveSuggestionResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.RemoveSuggestionResponse build() { + com.google.cloud.discoveryengine.v1beta.RemoveSuggestionResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.RemoveSuggestionResponse buildPartial() { + com.google.cloud.discoveryengine.v1beta.RemoveSuggestionResponse result = + new com.google.cloud.discoveryengine.v1beta.RemoveSuggestionResponse(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.discoveryengine.v1beta.RemoveSuggestionResponse) { + return mergeFrom((com.google.cloud.discoveryengine.v1beta.RemoveSuggestionResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1beta.RemoveSuggestionResponse other) { + if (other + == com.google.cloud.discoveryengine.v1beta.RemoveSuggestionResponse.getDefaultInstance()) + return this; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.RemoveSuggestionResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.RemoveSuggestionResponse) + private static final com.google.cloud.discoveryengine.v1beta.RemoveSuggestionResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.discoveryengine.v1beta.RemoveSuggestionResponse(); + } + + public static com.google.cloud.discoveryengine.v1beta.RemoveSuggestionResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RemoveSuggestionResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.RemoveSuggestionResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/RemoveSuggestionResponseOrBuilder.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/RemoveSuggestionResponseOrBuilder.java new file mode 100644 index 000000000000..b6c1964ef631 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/RemoveSuggestionResponseOrBuilder.java @@ -0,0 +1,27 @@ +/* + * 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/cloud/discoveryengine/v1beta/completion_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.discoveryengine.v1beta; + +@com.google.protobuf.Generated +public interface RemoveSuggestionResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.RemoveSuggestionResponse) + com.google.protobuf.MessageOrBuilder {} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/RetractLicenseConfigRequest.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/RetractLicenseConfigRequest.java new file mode 100644 index 000000000000..3152697dde17 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/RetractLicenseConfigRequest.java @@ -0,0 +1,1082 @@ +/* + * 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/cloud/discoveryengine/v1beta/license_config_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.discoveryengine.v1beta; + +/** + * + * + *
            + * Request message for
            + * [LicenseConfigService.RetractLicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfigService.RetractLicenseConfig]
            + * method.
            + * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.RetractLicenseConfigRequest} + */ +@com.google.protobuf.Generated +public final class RetractLicenseConfigRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.RetractLicenseConfigRequest) + RetractLicenseConfigRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "RetractLicenseConfigRequest"); + } + + // Use RetractLicenseConfigRequest.newBuilder() to construct. + private RetractLicenseConfigRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private RetractLicenseConfigRequest() { + billingAccountLicenseConfig_ = ""; + licenseConfig_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.LicenseConfigServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_RetractLicenseConfigRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.LicenseConfigServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_RetractLicenseConfigRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.RetractLicenseConfigRequest.class, + com.google.cloud.discoveryengine.v1beta.RetractLicenseConfigRequest.Builder.class); + } + + public static final int BILLING_ACCOUNT_LICENSE_CONFIG_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object billingAccountLicenseConfig_ = ""; + + /** + * + * + *
            +   * Required. Full resource name of [BillingAccountLicenseConfig][].
            +   *
            +   * Format:
            +   * `billingAccounts/{billing_account}/billingAccountLicenseConfigs/{billing_account_license_config_id}`.
            +   * 
            + * + * + * string billing_account_license_config = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The billingAccountLicenseConfig. + */ + @java.lang.Override + public java.lang.String getBillingAccountLicenseConfig() { + java.lang.Object ref = billingAccountLicenseConfig_; + 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(); + billingAccountLicenseConfig_ = s; + return s; + } + } + + /** + * + * + *
            +   * Required. Full resource name of [BillingAccountLicenseConfig][].
            +   *
            +   * Format:
            +   * `billingAccounts/{billing_account}/billingAccountLicenseConfigs/{billing_account_license_config_id}`.
            +   * 
            + * + * + * string billing_account_license_config = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for billingAccountLicenseConfig. + */ + @java.lang.Override + public com.google.protobuf.ByteString getBillingAccountLicenseConfigBytes() { + java.lang.Object ref = billingAccountLicenseConfig_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + billingAccountLicenseConfig_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LICENSE_CONFIG_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object licenseConfig_ = ""; + + /** + * + * + *
            +   * Required. Full resource name of
            +   * [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig].
            +   *
            +   * Format:
            +   * `projects/{project}/locations/{location}/licenseConfigs/{license_config_id}`.
            +   * 
            + * + * + * string license_config = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The licenseConfig. + */ + @java.lang.Override + public java.lang.String getLicenseConfig() { + java.lang.Object ref = licenseConfig_; + 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(); + licenseConfig_ = s; + return s; + } + } + + /** + * + * + *
            +   * Required. Full resource name of
            +   * [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig].
            +   *
            +   * Format:
            +   * `projects/{project}/locations/{location}/licenseConfigs/{license_config_id}`.
            +   * 
            + * + * + * string license_config = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for licenseConfig. + */ + @java.lang.Override + public com.google.protobuf.ByteString getLicenseConfigBytes() { + java.lang.Object ref = licenseConfig_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + licenseConfig_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FULL_RETRACT_FIELD_NUMBER = 3; + private boolean fullRetract_ = false; + + /** + * + * + *
            +   * Optional. If set to true, retract the entire license config. Otherwise,
            +   * retract the specified license count.
            +   * 
            + * + * bool full_retract = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The fullRetract. + */ + @java.lang.Override + public boolean getFullRetract() { + return fullRetract_; + } + + public static final int LICENSE_COUNT_FIELD_NUMBER = 4; + private long licenseCount_ = 0L; + + /** + * + * + *
            +   * Optional. The number of licenses to retract. Only used when full_retract is
            +   * false.
            +   * 
            + * + * int64 license_count = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The licenseCount. + */ + @java.lang.Override + public long getLicenseCount() { + return licenseCount_; + } + + 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(billingAccountLicenseConfig_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, billingAccountLicenseConfig_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(licenseConfig_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, licenseConfig_); + } + if (fullRetract_ != false) { + output.writeBool(3, fullRetract_); + } + if (licenseCount_ != 0L) { + output.writeInt64(4, licenseCount_); + } + 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(billingAccountLicenseConfig_)) { + size += + com.google.protobuf.GeneratedMessage.computeStringSize(1, billingAccountLicenseConfig_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(licenseConfig_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, licenseConfig_); + } + if (fullRetract_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, fullRetract_); + } + if (licenseCount_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(4, licenseCount_); + } + 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.discoveryengine.v1beta.RetractLicenseConfigRequest)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1beta.RetractLicenseConfigRequest other = + (com.google.cloud.discoveryengine.v1beta.RetractLicenseConfigRequest) obj; + + if (!getBillingAccountLicenseConfig().equals(other.getBillingAccountLicenseConfig())) + return false; + if (!getLicenseConfig().equals(other.getLicenseConfig())) return false; + if (getFullRetract() != other.getFullRetract()) return false; + if (getLicenseCount() != other.getLicenseCount()) 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) + BILLING_ACCOUNT_LICENSE_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getBillingAccountLicenseConfig().hashCode(); + hash = (37 * hash) + LICENSE_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getLicenseConfig().hashCode(); + hash = (37 * hash) + FULL_RETRACT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getFullRetract()); + hash = (37 * hash) + LICENSE_COUNT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getLicenseCount()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1beta.RetractLicenseConfigRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.RetractLicenseConfigRequest 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.discoveryengine.v1beta.RetractLicenseConfigRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.RetractLicenseConfigRequest 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.discoveryengine.v1beta.RetractLicenseConfigRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.RetractLicenseConfigRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1beta.RetractLicenseConfigRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.RetractLicenseConfigRequest 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.discoveryengine.v1beta.RetractLicenseConfigRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.RetractLicenseConfigRequest + 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.discoveryengine.v1beta.RetractLicenseConfigRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.RetractLicenseConfigRequest 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.discoveryengine.v1beta.RetractLicenseConfigRequest 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
            +   * [LicenseConfigService.RetractLicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfigService.RetractLicenseConfig]
            +   * method.
            +   * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.RetractLicenseConfigRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.RetractLicenseConfigRequest) + com.google.cloud.discoveryengine.v1beta.RetractLicenseConfigRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.LicenseConfigServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_RetractLicenseConfigRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.LicenseConfigServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_RetractLicenseConfigRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.RetractLicenseConfigRequest.class, + com.google.cloud.discoveryengine.v1beta.RetractLicenseConfigRequest.Builder.class); + } + + // Construct using + // com.google.cloud.discoveryengine.v1beta.RetractLicenseConfigRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + billingAccountLicenseConfig_ = ""; + licenseConfig_ = ""; + fullRetract_ = false; + licenseCount_ = 0L; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1beta.LicenseConfigServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_RetractLicenseConfigRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.RetractLicenseConfigRequest + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1beta.RetractLicenseConfigRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.RetractLicenseConfigRequest build() { + com.google.cloud.discoveryengine.v1beta.RetractLicenseConfigRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.RetractLicenseConfigRequest buildPartial() { + com.google.cloud.discoveryengine.v1beta.RetractLicenseConfigRequest result = + new com.google.cloud.discoveryengine.v1beta.RetractLicenseConfigRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.discoveryengine.v1beta.RetractLicenseConfigRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.billingAccountLicenseConfig_ = billingAccountLicenseConfig_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.licenseConfig_ = licenseConfig_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.fullRetract_ = fullRetract_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.licenseCount_ = licenseCount_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.discoveryengine.v1beta.RetractLicenseConfigRequest) { + return mergeFrom( + (com.google.cloud.discoveryengine.v1beta.RetractLicenseConfigRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1beta.RetractLicenseConfigRequest other) { + if (other + == com.google.cloud.discoveryengine.v1beta.RetractLicenseConfigRequest + .getDefaultInstance()) return this; + if (!other.getBillingAccountLicenseConfig().isEmpty()) { + billingAccountLicenseConfig_ = other.billingAccountLicenseConfig_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getLicenseConfig().isEmpty()) { + licenseConfig_ = other.licenseConfig_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.getFullRetract() != false) { + setFullRetract(other.getFullRetract()); + } + if (other.getLicenseCount() != 0L) { + setLicenseCount(other.getLicenseCount()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + billingAccountLicenseConfig_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + licenseConfig_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: + { + fullRetract_ = input.readBool(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 32: + { + licenseCount_ = input.readInt64(); + bitField0_ |= 0x00000008; + break; + } // case 32 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object billingAccountLicenseConfig_ = ""; + + /** + * + * + *
            +     * Required. Full resource name of [BillingAccountLicenseConfig][].
            +     *
            +     * Format:
            +     * `billingAccounts/{billing_account}/billingAccountLicenseConfigs/{billing_account_license_config_id}`.
            +     * 
            + * + * + * string billing_account_license_config = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The billingAccountLicenseConfig. + */ + public java.lang.String getBillingAccountLicenseConfig() { + java.lang.Object ref = billingAccountLicenseConfig_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + billingAccountLicenseConfig_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
            +     * Required. Full resource name of [BillingAccountLicenseConfig][].
            +     *
            +     * Format:
            +     * `billingAccounts/{billing_account}/billingAccountLicenseConfigs/{billing_account_license_config_id}`.
            +     * 
            + * + * + * string billing_account_license_config = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for billingAccountLicenseConfig. + */ + public com.google.protobuf.ByteString getBillingAccountLicenseConfigBytes() { + java.lang.Object ref = billingAccountLicenseConfig_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + billingAccountLicenseConfig_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
            +     * Required. Full resource name of [BillingAccountLicenseConfig][].
            +     *
            +     * Format:
            +     * `billingAccounts/{billing_account}/billingAccountLicenseConfigs/{billing_account_license_config_id}`.
            +     * 
            + * + * + * string billing_account_license_config = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The billingAccountLicenseConfig to set. + * @return This builder for chaining. + */ + public Builder setBillingAccountLicenseConfig(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + billingAccountLicenseConfig_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Required. Full resource name of [BillingAccountLicenseConfig][].
            +     *
            +     * Format:
            +     * `billingAccounts/{billing_account}/billingAccountLicenseConfigs/{billing_account_license_config_id}`.
            +     * 
            + * + * + * string billing_account_license_config = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearBillingAccountLicenseConfig() { + billingAccountLicenseConfig_ = getDefaultInstance().getBillingAccountLicenseConfig(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
            +     * Required. Full resource name of [BillingAccountLicenseConfig][].
            +     *
            +     * Format:
            +     * `billingAccounts/{billing_account}/billingAccountLicenseConfigs/{billing_account_license_config_id}`.
            +     * 
            + * + * + * string billing_account_license_config = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for billingAccountLicenseConfig to set. + * @return This builder for chaining. + */ + public Builder setBillingAccountLicenseConfigBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + billingAccountLicenseConfig_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object licenseConfig_ = ""; + + /** + * + * + *
            +     * Required. Full resource name of
            +     * [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig].
            +     *
            +     * Format:
            +     * `projects/{project}/locations/{location}/licenseConfigs/{license_config_id}`.
            +     * 
            + * + * + * string license_config = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The licenseConfig. + */ + public java.lang.String getLicenseConfig() { + java.lang.Object ref = licenseConfig_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + licenseConfig_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
            +     * Required. Full resource name of
            +     * [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig].
            +     *
            +     * Format:
            +     * `projects/{project}/locations/{location}/licenseConfigs/{license_config_id}`.
            +     * 
            + * + * + * string license_config = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for licenseConfig. + */ + public com.google.protobuf.ByteString getLicenseConfigBytes() { + java.lang.Object ref = licenseConfig_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + licenseConfig_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
            +     * Required. Full resource name of
            +     * [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig].
            +     *
            +     * Format:
            +     * `projects/{project}/locations/{location}/licenseConfigs/{license_config_id}`.
            +     * 
            + * + * + * string license_config = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The licenseConfig to set. + * @return This builder for chaining. + */ + public Builder setLicenseConfig(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + licenseConfig_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Required. Full resource name of
            +     * [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig].
            +     *
            +     * Format:
            +     * `projects/{project}/locations/{location}/licenseConfigs/{license_config_id}`.
            +     * 
            + * + * + * string license_config = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearLicenseConfig() { + licenseConfig_ = getDefaultInstance().getLicenseConfig(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
            +     * Required. Full resource name of
            +     * [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig].
            +     *
            +     * Format:
            +     * `projects/{project}/locations/{location}/licenseConfigs/{license_config_id}`.
            +     * 
            + * + * + * string license_config = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for licenseConfig to set. + * @return This builder for chaining. + */ + public Builder setLicenseConfigBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + licenseConfig_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private boolean fullRetract_; + + /** + * + * + *
            +     * Optional. If set to true, retract the entire license config. Otherwise,
            +     * retract the specified license count.
            +     * 
            + * + * bool full_retract = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The fullRetract. + */ + @java.lang.Override + public boolean getFullRetract() { + return fullRetract_; + } + + /** + * + * + *
            +     * Optional. If set to true, retract the entire license config. Otherwise,
            +     * retract the specified license count.
            +     * 
            + * + * bool full_retract = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The fullRetract to set. + * @return This builder for chaining. + */ + public Builder setFullRetract(boolean value) { + + fullRetract_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Optional. If set to true, retract the entire license config. Otherwise,
            +     * retract the specified license count.
            +     * 
            + * + * bool full_retract = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearFullRetract() { + bitField0_ = (bitField0_ & ~0x00000004); + fullRetract_ = false; + onChanged(); + return this; + } + + private long licenseCount_; + + /** + * + * + *
            +     * Optional. The number of licenses to retract. Only used when full_retract is
            +     * false.
            +     * 
            + * + * int64 license_count = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The licenseCount. + */ + @java.lang.Override + public long getLicenseCount() { + return licenseCount_; + } + + /** + * + * + *
            +     * Optional. The number of licenses to retract. Only used when full_retract is
            +     * false.
            +     * 
            + * + * int64 license_count = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The licenseCount to set. + * @return This builder for chaining. + */ + public Builder setLicenseCount(long value) { + + licenseCount_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Optional. The number of licenses to retract. Only used when full_retract is
            +     * false.
            +     * 
            + * + * int64 license_count = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearLicenseCount() { + bitField0_ = (bitField0_ & ~0x00000008); + licenseCount_ = 0L; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.RetractLicenseConfigRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.RetractLicenseConfigRequest) + private static final com.google.cloud.discoveryengine.v1beta.RetractLicenseConfigRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.discoveryengine.v1beta.RetractLicenseConfigRequest(); + } + + public static com.google.cloud.discoveryengine.v1beta.RetractLicenseConfigRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RetractLicenseConfigRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.RetractLicenseConfigRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/RetractLicenseConfigRequestOrBuilder.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/RetractLicenseConfigRequestOrBuilder.java new file mode 100644 index 000000000000..80b3f73bf0ce --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/RetractLicenseConfigRequestOrBuilder.java @@ -0,0 +1,130 @@ +/* + * 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/cloud/discoveryengine/v1beta/license_config_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.discoveryengine.v1beta; + +@com.google.protobuf.Generated +public interface RetractLicenseConfigRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.RetractLicenseConfigRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
            +   * Required. Full resource name of [BillingAccountLicenseConfig][].
            +   *
            +   * Format:
            +   * `billingAccounts/{billing_account}/billingAccountLicenseConfigs/{billing_account_license_config_id}`.
            +   * 
            + * + * + * string billing_account_license_config = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The billingAccountLicenseConfig. + */ + java.lang.String getBillingAccountLicenseConfig(); + + /** + * + * + *
            +   * Required. Full resource name of [BillingAccountLicenseConfig][].
            +   *
            +   * Format:
            +   * `billingAccounts/{billing_account}/billingAccountLicenseConfigs/{billing_account_license_config_id}`.
            +   * 
            + * + * + * string billing_account_license_config = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for billingAccountLicenseConfig. + */ + com.google.protobuf.ByteString getBillingAccountLicenseConfigBytes(); + + /** + * + * + *
            +   * Required. Full resource name of
            +   * [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig].
            +   *
            +   * Format:
            +   * `projects/{project}/locations/{location}/licenseConfigs/{license_config_id}`.
            +   * 
            + * + * + * string license_config = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The licenseConfig. + */ + java.lang.String getLicenseConfig(); + + /** + * + * + *
            +   * Required. Full resource name of
            +   * [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig].
            +   *
            +   * Format:
            +   * `projects/{project}/locations/{location}/licenseConfigs/{license_config_id}`.
            +   * 
            + * + * + * string license_config = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for licenseConfig. + */ + com.google.protobuf.ByteString getLicenseConfigBytes(); + + /** + * + * + *
            +   * Optional. If set to true, retract the entire license config. Otherwise,
            +   * retract the specified license count.
            +   * 
            + * + * bool full_retract = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The fullRetract. + */ + boolean getFullRetract(); + + /** + * + * + *
            +   * Optional. The number of licenses to retract. Only used when full_retract is
            +   * false.
            +   * 
            + * + * int64 license_count = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The licenseCount. + */ + long getLicenseCount(); +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/RetractLicenseConfigResponse.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/RetractLicenseConfigResponse.java new file mode 100644 index 000000000000..a11e1eb3efd6 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/RetractLicenseConfigResponse.java @@ -0,0 +1,719 @@ +/* + * 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/cloud/discoveryengine/v1beta/license_config_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.discoveryengine.v1beta; + +/** + * + * + *
            + * Response message for
            + * [LicenseConfigService.RetractLicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfigService.RetractLicenseConfig]
            + * method.
            + * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.RetractLicenseConfigResponse} + */ +@com.google.protobuf.Generated +public final class RetractLicenseConfigResponse extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.RetractLicenseConfigResponse) + RetractLicenseConfigResponseOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "RetractLicenseConfigResponse"); + } + + // Use RetractLicenseConfigResponse.newBuilder() to construct. + private RetractLicenseConfigResponse(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private RetractLicenseConfigResponse() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.LicenseConfigServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_RetractLicenseConfigResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.LicenseConfigServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_RetractLicenseConfigResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.RetractLicenseConfigResponse.class, + com.google.cloud.discoveryengine.v1beta.RetractLicenseConfigResponse.Builder.class); + } + + private int bitField0_; + public static final int LICENSE_CONFIG_FIELD_NUMBER = 1; + private com.google.cloud.discoveryengine.v1beta.LicenseConfig licenseConfig_; + + /** + * + * + *
            +   * The updated LicenseConfig.
            +   * 
            + * + * .google.cloud.discoveryengine.v1beta.LicenseConfig license_config = 1; + * + * @return Whether the licenseConfig field is set. + */ + @java.lang.Override + public boolean hasLicenseConfig() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
            +   * The updated LicenseConfig.
            +   * 
            + * + * .google.cloud.discoveryengine.v1beta.LicenseConfig license_config = 1; + * + * @return The licenseConfig. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.LicenseConfig getLicenseConfig() { + return licenseConfig_ == null + ? com.google.cloud.discoveryengine.v1beta.LicenseConfig.getDefaultInstance() + : licenseConfig_; + } + + /** + * + * + *
            +   * The updated LicenseConfig.
            +   * 
            + * + * .google.cloud.discoveryengine.v1beta.LicenseConfig license_config = 1; + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.LicenseConfigOrBuilder + getLicenseConfigOrBuilder() { + return licenseConfig_ == null + ? com.google.cloud.discoveryengine.v1beta.LicenseConfig.getDefaultInstance() + : licenseConfig_; + } + + 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, getLicenseConfig()); + } + 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, getLicenseConfig()); + } + 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.discoveryengine.v1beta.RetractLicenseConfigResponse)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1beta.RetractLicenseConfigResponse other = + (com.google.cloud.discoveryengine.v1beta.RetractLicenseConfigResponse) obj; + + if (hasLicenseConfig() != other.hasLicenseConfig()) return false; + if (hasLicenseConfig()) { + if (!getLicenseConfig().equals(other.getLicenseConfig())) 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 (hasLicenseConfig()) { + hash = (37 * hash) + LICENSE_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getLicenseConfig().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1beta.RetractLicenseConfigResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.RetractLicenseConfigResponse 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.discoveryengine.v1beta.RetractLicenseConfigResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.RetractLicenseConfigResponse 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.discoveryengine.v1beta.RetractLicenseConfigResponse parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.RetractLicenseConfigResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1beta.RetractLicenseConfigResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.RetractLicenseConfigResponse 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.discoveryengine.v1beta.RetractLicenseConfigResponse + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.RetractLicenseConfigResponse + 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.discoveryengine.v1beta.RetractLicenseConfigResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.RetractLicenseConfigResponse 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.discoveryengine.v1beta.RetractLicenseConfigResponse 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
            +   * [LicenseConfigService.RetractLicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfigService.RetractLicenseConfig]
            +   * method.
            +   * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.RetractLicenseConfigResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.RetractLicenseConfigResponse) + com.google.cloud.discoveryengine.v1beta.RetractLicenseConfigResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.LicenseConfigServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_RetractLicenseConfigResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.LicenseConfigServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_RetractLicenseConfigResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.RetractLicenseConfigResponse.class, + com.google.cloud.discoveryengine.v1beta.RetractLicenseConfigResponse.Builder.class); + } + + // Construct using + // com.google.cloud.discoveryengine.v1beta.RetractLicenseConfigResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetLicenseConfigFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + licenseConfig_ = null; + if (licenseConfigBuilder_ != null) { + licenseConfigBuilder_.dispose(); + licenseConfigBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1beta.LicenseConfigServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_RetractLicenseConfigResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.RetractLicenseConfigResponse + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1beta.RetractLicenseConfigResponse + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.RetractLicenseConfigResponse build() { + com.google.cloud.discoveryengine.v1beta.RetractLicenseConfigResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.RetractLicenseConfigResponse buildPartial() { + com.google.cloud.discoveryengine.v1beta.RetractLicenseConfigResponse result = + new com.google.cloud.discoveryengine.v1beta.RetractLicenseConfigResponse(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.discoveryengine.v1beta.RetractLicenseConfigResponse result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.licenseConfig_ = + licenseConfigBuilder_ == null ? licenseConfig_ : licenseConfigBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.discoveryengine.v1beta.RetractLicenseConfigResponse) { + return mergeFrom( + (com.google.cloud.discoveryengine.v1beta.RetractLicenseConfigResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1beta.RetractLicenseConfigResponse other) { + if (other + == com.google.cloud.discoveryengine.v1beta.RetractLicenseConfigResponse + .getDefaultInstance()) return this; + if (other.hasLicenseConfig()) { + mergeLicenseConfig(other.getLicenseConfig()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage( + internalGetLicenseConfigFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.cloud.discoveryengine.v1beta.LicenseConfig licenseConfig_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.LicenseConfig, + com.google.cloud.discoveryengine.v1beta.LicenseConfig.Builder, + com.google.cloud.discoveryengine.v1beta.LicenseConfigOrBuilder> + licenseConfigBuilder_; + + /** + * + * + *
            +     * The updated LicenseConfig.
            +     * 
            + * + * .google.cloud.discoveryengine.v1beta.LicenseConfig license_config = 1; + * + * @return Whether the licenseConfig field is set. + */ + public boolean hasLicenseConfig() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
            +     * The updated LicenseConfig.
            +     * 
            + * + * .google.cloud.discoveryengine.v1beta.LicenseConfig license_config = 1; + * + * @return The licenseConfig. + */ + public com.google.cloud.discoveryengine.v1beta.LicenseConfig getLicenseConfig() { + if (licenseConfigBuilder_ == null) { + return licenseConfig_ == null + ? com.google.cloud.discoveryengine.v1beta.LicenseConfig.getDefaultInstance() + : licenseConfig_; + } else { + return licenseConfigBuilder_.getMessage(); + } + } + + /** + * + * + *
            +     * The updated LicenseConfig.
            +     * 
            + * + * .google.cloud.discoveryengine.v1beta.LicenseConfig license_config = 1; + */ + public Builder setLicenseConfig(com.google.cloud.discoveryengine.v1beta.LicenseConfig value) { + if (licenseConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + licenseConfig_ = value; + } else { + licenseConfigBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
            +     * The updated LicenseConfig.
            +     * 
            + * + * .google.cloud.discoveryengine.v1beta.LicenseConfig license_config = 1; + */ + public Builder setLicenseConfig( + com.google.cloud.discoveryengine.v1beta.LicenseConfig.Builder builderForValue) { + if (licenseConfigBuilder_ == null) { + licenseConfig_ = builderForValue.build(); + } else { + licenseConfigBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
            +     * The updated LicenseConfig.
            +     * 
            + * + * .google.cloud.discoveryengine.v1beta.LicenseConfig license_config = 1; + */ + public Builder mergeLicenseConfig(com.google.cloud.discoveryengine.v1beta.LicenseConfig value) { + if (licenseConfigBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && licenseConfig_ != null + && licenseConfig_ + != com.google.cloud.discoveryengine.v1beta.LicenseConfig.getDefaultInstance()) { + getLicenseConfigBuilder().mergeFrom(value); + } else { + licenseConfig_ = value; + } + } else { + licenseConfigBuilder_.mergeFrom(value); + } + if (licenseConfig_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + + /** + * + * + *
            +     * The updated LicenseConfig.
            +     * 
            + * + * .google.cloud.discoveryengine.v1beta.LicenseConfig license_config = 1; + */ + public Builder clearLicenseConfig() { + bitField0_ = (bitField0_ & ~0x00000001); + licenseConfig_ = null; + if (licenseConfigBuilder_ != null) { + licenseConfigBuilder_.dispose(); + licenseConfigBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
            +     * The updated LicenseConfig.
            +     * 
            + * + * .google.cloud.discoveryengine.v1beta.LicenseConfig license_config = 1; + */ + public com.google.cloud.discoveryengine.v1beta.LicenseConfig.Builder getLicenseConfigBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return internalGetLicenseConfigFieldBuilder().getBuilder(); + } + + /** + * + * + *
            +     * The updated LicenseConfig.
            +     * 
            + * + * .google.cloud.discoveryengine.v1beta.LicenseConfig license_config = 1; + */ + public com.google.cloud.discoveryengine.v1beta.LicenseConfigOrBuilder + getLicenseConfigOrBuilder() { + if (licenseConfigBuilder_ != null) { + return licenseConfigBuilder_.getMessageOrBuilder(); + } else { + return licenseConfig_ == null + ? com.google.cloud.discoveryengine.v1beta.LicenseConfig.getDefaultInstance() + : licenseConfig_; + } + } + + /** + * + * + *
            +     * The updated LicenseConfig.
            +     * 
            + * + * .google.cloud.discoveryengine.v1beta.LicenseConfig license_config = 1; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.LicenseConfig, + com.google.cloud.discoveryengine.v1beta.LicenseConfig.Builder, + com.google.cloud.discoveryengine.v1beta.LicenseConfigOrBuilder> + internalGetLicenseConfigFieldBuilder() { + if (licenseConfigBuilder_ == null) { + licenseConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.LicenseConfig, + com.google.cloud.discoveryengine.v1beta.LicenseConfig.Builder, + com.google.cloud.discoveryengine.v1beta.LicenseConfigOrBuilder>( + getLicenseConfig(), getParentForChildren(), isClean()); + licenseConfig_ = null; + } + return licenseConfigBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.RetractLicenseConfigResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.RetractLicenseConfigResponse) + private static final com.google.cloud.discoveryengine.v1beta.RetractLicenseConfigResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.discoveryengine.v1beta.RetractLicenseConfigResponse(); + } + + public static com.google.cloud.discoveryengine.v1beta.RetractLicenseConfigResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RetractLicenseConfigResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.RetractLicenseConfigResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/RetractLicenseConfigResponseOrBuilder.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/RetractLicenseConfigResponseOrBuilder.java new file mode 100644 index 000000000000..6fd54747ed63 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/RetractLicenseConfigResponseOrBuilder.java @@ -0,0 +1,65 @@ +/* + * 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/cloud/discoveryengine/v1beta/license_config_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.discoveryengine.v1beta; + +@com.google.protobuf.Generated +public interface RetractLicenseConfigResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.RetractLicenseConfigResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
            +   * The updated LicenseConfig.
            +   * 
            + * + * .google.cloud.discoveryengine.v1beta.LicenseConfig license_config = 1; + * + * @return Whether the licenseConfig field is set. + */ + boolean hasLicenseConfig(); + + /** + * + * + *
            +   * The updated LicenseConfig.
            +   * 
            + * + * .google.cloud.discoveryengine.v1beta.LicenseConfig license_config = 1; + * + * @return The licenseConfig. + */ + com.google.cloud.discoveryengine.v1beta.LicenseConfig getLicenseConfig(); + + /** + * + * + *
            +   * The updated LicenseConfig.
            +   * 
            + * + * .google.cloud.discoveryengine.v1beta.LicenseConfig license_config = 1; + */ + com.google.cloud.discoveryengine.v1beta.LicenseConfigOrBuilder getLicenseConfigOrBuilder(); +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/SafetyProto.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/SafetyProto.java new file mode 100644 index 000000000000..1fc5d20104be --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/SafetyProto.java @@ -0,0 +1,118 @@ +/* + * 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/cloud/discoveryengine/v1beta/safety.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.discoveryengine.v1beta; + +@com.google.protobuf.Generated +public final class SafetyProto extends com.google.protobuf.GeneratedFile { + private SafetyProto() {} + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "SafetyProto"); + } + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1beta_SafetyRating_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1beta_SafetyRating_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n" + + "0google/cloud/discoveryengine/v1beta/safety.proto\022#google.cloud.discoveryengine" + + ".v1beta\032\037google/api/field_behavior.proto\"\332\004\n" + + "\014SafetyRating\022H\n" + + "\010category\030\001 \001(\01621.go" + + "ogle.cloud.discoveryengine.v1beta.HarmCategoryB\003\340A\003\022[\n" + + "\013probability\030\002 \001(\0162A.googl" + + "e.cloud.discoveryengine.v1beta.SafetyRating.HarmProbabilityB\003\340A\003\022\036\n" + + "\021probability_score\030\005 \001(\002B\003\340A\003\022U\n" + + "\010severity\030\006 \001(\0162>.goo" + + "gle.cloud.discoveryengine.v1beta.SafetyRating.HarmSeverityB\003\340A\003\022\033\n" + + "\016severity_score\030\007 \001(\002B\003\340A\003\022\024\n" + + "\007blocked\030\003 \001(\010B\003\340A\003\"b\n" + + "\017HarmProbability\022 \n" + + "\034HARM_PROBABILITY_UNSPECIFIED\020\000\022\016\n\n" + + "NEGLIGIBLE\020\001\022\007\n" + + "\003LOW\020\002\022\n\n" + + "\006MEDIUM\020\003\022\010\n" + + "\004HIGH\020\004\"\224\001\n" + + "\014HarmSeverity\022\035\n" + + "\031HARM_SEVERITY_UNSPECIFIED\020\000\022\034\n" + + "\030HARM_SEVERITY_NEGLIGIBLE\020\001\022\025\n" + + "\021HARM_SEVERITY_LOW\020\002\022\030\n" + + "\024HARM_SEVERITY_MEDIUM\020\003\022\026\n" + + "\022HARM_SEVERITY_HIGH\020\004*\327\001\n" + + "\014HarmCategory\022\035\n" + + "\031HARM_CATEGORY_UNSPECIFIED\020\000\022\035\n" + + "\031HARM_CATEGORY_HATE_SPEECH\020\001\022#\n" + + "\037HARM_CATEGORY_DANGEROUS_CONTENT\020\002\022\034\n" + + "\030HARM_CATEGORY_HARASSMENT\020\003\022#\n" + + "\037HARM_CATEGORY_SEXUALLY_EXPLICIT\020\004\022!\n" + + "\035HARM_CATEGORY_CIVIC_INTEGRITY\020\005B\222\002\n" + + "\'com.google.cloud.discoveryengine.v1betaB\013SafetyProto" + + "P\001ZQcloud.google.com/go/discoveryengine/apiv1beta/discoveryenginepb;discoveryeng" + + "inepb\242\002\017DISCOVERYENGINE\252\002#Google.Cloud.D" + + "iscoveryEngine.V1Beta\312\002#Google\\Cloud\\Dis" + + "coveryEngine\\V1beta\352\002&Google::Cloud::DiscoveryEngine::V1betab\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.FieldBehaviorProto.getDescriptor(), + }); + internal_static_google_cloud_discoveryengine_v1beta_SafetyRating_descriptor = + getDescriptor().getMessageType(0); + internal_static_google_cloud_discoveryengine_v1beta_SafetyRating_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1beta_SafetyRating_descriptor, + new java.lang.String[] { + "Category", "Probability", "ProbabilityScore", "Severity", "SeverityScore", "Blocked", + }); + descriptor.resolveAllFeaturesImmutable(); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/SafetyRating.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/SafetyRating.java new file mode 100644 index 000000000000..48fa79cc46e4 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/SafetyRating.java @@ -0,0 +1,1679 @@ +/* + * 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/cloud/discoveryengine/v1beta/safety.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.discoveryengine.v1beta; + +/** + * + * + *
            + * Safety rating corresponding to the generated content.
            + * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.SafetyRating} + */ +@com.google.protobuf.Generated +public final class SafetyRating extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.SafetyRating) + SafetyRatingOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "SafetyRating"); + } + + // Use SafetyRating.newBuilder() to construct. + private SafetyRating(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private SafetyRating() { + category_ = 0; + probability_ = 0; + severity_ = 0; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.SafetyProto + .internal_static_google_cloud_discoveryengine_v1beta_SafetyRating_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.SafetyProto + .internal_static_google_cloud_discoveryengine_v1beta_SafetyRating_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.SafetyRating.class, + com.google.cloud.discoveryengine.v1beta.SafetyRating.Builder.class); + } + + /** + * + * + *
            +   * Harm probability levels in the content.
            +   * 
            + * + * Protobuf enum {@code google.cloud.discoveryengine.v1beta.SafetyRating.HarmProbability} + */ + public enum HarmProbability implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
            +     * Harm probability unspecified.
            +     * 
            + * + * HARM_PROBABILITY_UNSPECIFIED = 0; + */ + HARM_PROBABILITY_UNSPECIFIED(0), + /** + * + * + *
            +     * Negligible level of harm.
            +     * 
            + * + * NEGLIGIBLE = 1; + */ + NEGLIGIBLE(1), + /** + * + * + *
            +     * Low level of harm.
            +     * 
            + * + * LOW = 2; + */ + LOW(2), + /** + * + * + *
            +     * Medium level of harm.
            +     * 
            + * + * MEDIUM = 3; + */ + MEDIUM(3), + /** + * + * + *
            +     * High level of harm.
            +     * 
            + * + * HIGH = 4; + */ + HIGH(4), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "HarmProbability"); + } + + /** + * + * + *
            +     * Harm probability unspecified.
            +     * 
            + * + * HARM_PROBABILITY_UNSPECIFIED = 0; + */ + public static final int HARM_PROBABILITY_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
            +     * Negligible level of harm.
            +     * 
            + * + * NEGLIGIBLE = 1; + */ + public static final int NEGLIGIBLE_VALUE = 1; + + /** + * + * + *
            +     * Low level of harm.
            +     * 
            + * + * LOW = 2; + */ + public static final int LOW_VALUE = 2; + + /** + * + * + *
            +     * Medium level of harm.
            +     * 
            + * + * MEDIUM = 3; + */ + public static final int MEDIUM_VALUE = 3; + + /** + * + * + *
            +     * High level of harm.
            +     * 
            + * + * HIGH = 4; + */ + public static final int HIGH_VALUE = 4; + + 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 HarmProbability 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 HarmProbability forNumber(int value) { + switch (value) { + case 0: + return HARM_PROBABILITY_UNSPECIFIED; + case 1: + return NEGLIGIBLE; + case 2: + return LOW; + case 3: + return MEDIUM; + case 4: + return HIGH; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap + internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public HarmProbability findValueByNumber(int number) { + return HarmProbability.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.SafetyRating.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final HarmProbability[] VALUES = values(); + + public static HarmProbability valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private HarmProbability(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.discoveryengine.v1beta.SafetyRating.HarmProbability) + } + + /** + * + * + *
            +   * Harm severity levels.
            +   * 
            + * + * Protobuf enum {@code google.cloud.discoveryengine.v1beta.SafetyRating.HarmSeverity} + */ + public enum HarmSeverity implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
            +     * Harm severity unspecified.
            +     * 
            + * + * HARM_SEVERITY_UNSPECIFIED = 0; + */ + HARM_SEVERITY_UNSPECIFIED(0), + /** + * + * + *
            +     * Negligible level of harm severity.
            +     * 
            + * + * HARM_SEVERITY_NEGLIGIBLE = 1; + */ + HARM_SEVERITY_NEGLIGIBLE(1), + /** + * + * + *
            +     * Low level of harm severity.
            +     * 
            + * + * HARM_SEVERITY_LOW = 2; + */ + HARM_SEVERITY_LOW(2), + /** + * + * + *
            +     * Medium level of harm severity.
            +     * 
            + * + * HARM_SEVERITY_MEDIUM = 3; + */ + HARM_SEVERITY_MEDIUM(3), + /** + * + * + *
            +     * High level of harm severity.
            +     * 
            + * + * HARM_SEVERITY_HIGH = 4; + */ + HARM_SEVERITY_HIGH(4), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "HarmSeverity"); + } + + /** + * + * + *
            +     * Harm severity unspecified.
            +     * 
            + * + * HARM_SEVERITY_UNSPECIFIED = 0; + */ + public static final int HARM_SEVERITY_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
            +     * Negligible level of harm severity.
            +     * 
            + * + * HARM_SEVERITY_NEGLIGIBLE = 1; + */ + public static final int HARM_SEVERITY_NEGLIGIBLE_VALUE = 1; + + /** + * + * + *
            +     * Low level of harm severity.
            +     * 
            + * + * HARM_SEVERITY_LOW = 2; + */ + public static final int HARM_SEVERITY_LOW_VALUE = 2; + + /** + * + * + *
            +     * Medium level of harm severity.
            +     * 
            + * + * HARM_SEVERITY_MEDIUM = 3; + */ + public static final int HARM_SEVERITY_MEDIUM_VALUE = 3; + + /** + * + * + *
            +     * High level of harm severity.
            +     * 
            + * + * HARM_SEVERITY_HIGH = 4; + */ + public static final int HARM_SEVERITY_HIGH_VALUE = 4; + + 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 HarmSeverity 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 HarmSeverity forNumber(int value) { + switch (value) { + case 0: + return HARM_SEVERITY_UNSPECIFIED; + case 1: + return HARM_SEVERITY_NEGLIGIBLE; + case 2: + return HARM_SEVERITY_LOW; + case 3: + return HARM_SEVERITY_MEDIUM; + case 4: + return HARM_SEVERITY_HIGH; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public HarmSeverity findValueByNumber(int number) { + return HarmSeverity.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.SafetyRating.getDescriptor() + .getEnumTypes() + .get(1); + } + + private static final HarmSeverity[] VALUES = values(); + + public static HarmSeverity valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private HarmSeverity(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.discoveryengine.v1beta.SafetyRating.HarmSeverity) + } + + public static final int CATEGORY_FIELD_NUMBER = 1; + private int category_ = 0; + + /** + * + * + *
            +   * Output only. Harm category.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.HarmCategory category = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for category. + */ + @java.lang.Override + public int getCategoryValue() { + return category_; + } + + /** + * + * + *
            +   * Output only. Harm category.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.HarmCategory category = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The category. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.HarmCategory getCategory() { + com.google.cloud.discoveryengine.v1beta.HarmCategory result = + com.google.cloud.discoveryengine.v1beta.HarmCategory.forNumber(category_); + return result == null + ? com.google.cloud.discoveryengine.v1beta.HarmCategory.UNRECOGNIZED + : result; + } + + public static final int PROBABILITY_FIELD_NUMBER = 2; + private int probability_ = 0; + + /** + * + * + *
            +   * Output only. Harm probability levels in the content.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SafetyRating.HarmProbability probability = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for probability. + */ + @java.lang.Override + public int getProbabilityValue() { + return probability_; + } + + /** + * + * + *
            +   * Output only. Harm probability levels in the content.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SafetyRating.HarmProbability probability = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The probability. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.SafetyRating.HarmProbability getProbability() { + com.google.cloud.discoveryengine.v1beta.SafetyRating.HarmProbability result = + com.google.cloud.discoveryengine.v1beta.SafetyRating.HarmProbability.forNumber( + probability_); + return result == null + ? com.google.cloud.discoveryengine.v1beta.SafetyRating.HarmProbability.UNRECOGNIZED + : result; + } + + public static final int PROBABILITY_SCORE_FIELD_NUMBER = 5; + private float probabilityScore_ = 0F; + + /** + * + * + *
            +   * Output only. Harm probability score.
            +   * 
            + * + * float probability_score = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The probabilityScore. + */ + @java.lang.Override + public float getProbabilityScore() { + return probabilityScore_; + } + + public static final int SEVERITY_FIELD_NUMBER = 6; + private int severity_ = 0; + + /** + * + * + *
            +   * Output only. Harm severity levels in the content.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SafetyRating.HarmSeverity severity = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for severity. + */ + @java.lang.Override + public int getSeverityValue() { + return severity_; + } + + /** + * + * + *
            +   * Output only. Harm severity levels in the content.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SafetyRating.HarmSeverity severity = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The severity. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.SafetyRating.HarmSeverity getSeverity() { + com.google.cloud.discoveryengine.v1beta.SafetyRating.HarmSeverity result = + com.google.cloud.discoveryengine.v1beta.SafetyRating.HarmSeverity.forNumber(severity_); + return result == null + ? com.google.cloud.discoveryengine.v1beta.SafetyRating.HarmSeverity.UNRECOGNIZED + : result; + } + + public static final int SEVERITY_SCORE_FIELD_NUMBER = 7; + private float severityScore_ = 0F; + + /** + * + * + *
            +   * Output only. Harm severity score.
            +   * 
            + * + * float severity_score = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The severityScore. + */ + @java.lang.Override + public float getSeverityScore() { + return severityScore_; + } + + public static final int BLOCKED_FIELD_NUMBER = 3; + private boolean blocked_ = false; + + /** + * + * + *
            +   * Output only. Indicates whether the content was filtered out because of this
            +   * rating.
            +   * 
            + * + * bool blocked = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The blocked. + */ + @java.lang.Override + public boolean getBlocked() { + return blocked_; + } + + 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 (category_ + != com.google.cloud.discoveryengine.v1beta.HarmCategory.HARM_CATEGORY_UNSPECIFIED + .getNumber()) { + output.writeEnum(1, category_); + } + if (probability_ + != com.google.cloud.discoveryengine.v1beta.SafetyRating.HarmProbability + .HARM_PROBABILITY_UNSPECIFIED + .getNumber()) { + output.writeEnum(2, probability_); + } + if (blocked_ != false) { + output.writeBool(3, blocked_); + } + if (java.lang.Float.floatToRawIntBits(probabilityScore_) != 0) { + output.writeFloat(5, probabilityScore_); + } + if (severity_ + != com.google.cloud.discoveryengine.v1beta.SafetyRating.HarmSeverity + .HARM_SEVERITY_UNSPECIFIED + .getNumber()) { + output.writeEnum(6, severity_); + } + if (java.lang.Float.floatToRawIntBits(severityScore_) != 0) { + output.writeFloat(7, severityScore_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (category_ + != com.google.cloud.discoveryengine.v1beta.HarmCategory.HARM_CATEGORY_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, category_); + } + if (probability_ + != com.google.cloud.discoveryengine.v1beta.SafetyRating.HarmProbability + .HARM_PROBABILITY_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, probability_); + } + if (blocked_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, blocked_); + } + if (java.lang.Float.floatToRawIntBits(probabilityScore_) != 0) { + size += com.google.protobuf.CodedOutputStream.computeFloatSize(5, probabilityScore_); + } + if (severity_ + != com.google.cloud.discoveryengine.v1beta.SafetyRating.HarmSeverity + .HARM_SEVERITY_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(6, severity_); + } + if (java.lang.Float.floatToRawIntBits(severityScore_) != 0) { + size += com.google.protobuf.CodedOutputStream.computeFloatSize(7, severityScore_); + } + 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.discoveryengine.v1beta.SafetyRating)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1beta.SafetyRating other = + (com.google.cloud.discoveryengine.v1beta.SafetyRating) obj; + + if (category_ != other.category_) return false; + if (probability_ != other.probability_) return false; + if (java.lang.Float.floatToIntBits(getProbabilityScore()) + != java.lang.Float.floatToIntBits(other.getProbabilityScore())) return false; + if (severity_ != other.severity_) return false; + if (java.lang.Float.floatToIntBits(getSeverityScore()) + != java.lang.Float.floatToIntBits(other.getSeverityScore())) return false; + if (getBlocked() != other.getBlocked()) 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) + CATEGORY_FIELD_NUMBER; + hash = (53 * hash) + category_; + hash = (37 * hash) + PROBABILITY_FIELD_NUMBER; + hash = (53 * hash) + probability_; + hash = (37 * hash) + PROBABILITY_SCORE_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits(getProbabilityScore()); + hash = (37 * hash) + SEVERITY_FIELD_NUMBER; + hash = (53 * hash) + severity_; + hash = (37 * hash) + SEVERITY_SCORE_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits(getSeverityScore()); + hash = (37 * hash) + BLOCKED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getBlocked()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1beta.SafetyRating parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.SafetyRating 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.discoveryengine.v1beta.SafetyRating parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.SafetyRating 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.discoveryengine.v1beta.SafetyRating parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.SafetyRating parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1beta.SafetyRating parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.SafetyRating 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.discoveryengine.v1beta.SafetyRating parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.SafetyRating 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.discoveryengine.v1beta.SafetyRating parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.SafetyRating 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.discoveryengine.v1beta.SafetyRating 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; + } + + /** + * + * + *
            +   * Safety rating corresponding to the generated content.
            +   * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.SafetyRating} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.SafetyRating) + com.google.cloud.discoveryengine.v1beta.SafetyRatingOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.SafetyProto + .internal_static_google_cloud_discoveryengine_v1beta_SafetyRating_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.SafetyProto + .internal_static_google_cloud_discoveryengine_v1beta_SafetyRating_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.SafetyRating.class, + com.google.cloud.discoveryengine.v1beta.SafetyRating.Builder.class); + } + + // Construct using com.google.cloud.discoveryengine.v1beta.SafetyRating.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + category_ = 0; + probability_ = 0; + probabilityScore_ = 0F; + severity_ = 0; + severityScore_ = 0F; + blocked_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1beta.SafetyProto + .internal_static_google_cloud_discoveryengine_v1beta_SafetyRating_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.SafetyRating getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1beta.SafetyRating.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.SafetyRating build() { + com.google.cloud.discoveryengine.v1beta.SafetyRating result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.SafetyRating buildPartial() { + com.google.cloud.discoveryengine.v1beta.SafetyRating result = + new com.google.cloud.discoveryengine.v1beta.SafetyRating(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.discoveryengine.v1beta.SafetyRating result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.category_ = category_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.probability_ = probability_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.probabilityScore_ = probabilityScore_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.severity_ = severity_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.severityScore_ = severityScore_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.blocked_ = blocked_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.discoveryengine.v1beta.SafetyRating) { + return mergeFrom((com.google.cloud.discoveryengine.v1beta.SafetyRating) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.discoveryengine.v1beta.SafetyRating other) { + if (other == com.google.cloud.discoveryengine.v1beta.SafetyRating.getDefaultInstance()) + return this; + if (other.category_ != 0) { + setCategoryValue(other.getCategoryValue()); + } + if (other.probability_ != 0) { + setProbabilityValue(other.getProbabilityValue()); + } + if (java.lang.Float.floatToRawIntBits(other.getProbabilityScore()) != 0) { + setProbabilityScore(other.getProbabilityScore()); + } + if (other.severity_ != 0) { + setSeverityValue(other.getSeverityValue()); + } + if (java.lang.Float.floatToRawIntBits(other.getSeverityScore()) != 0) { + setSeverityScore(other.getSeverityScore()); + } + if (other.getBlocked() != false) { + setBlocked(other.getBlocked()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + category_ = input.readEnum(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 16: + { + probability_ = input.readEnum(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 24: + { + blocked_ = input.readBool(); + bitField0_ |= 0x00000020; + break; + } // case 24 + case 45: + { + probabilityScore_ = input.readFloat(); + bitField0_ |= 0x00000004; + break; + } // case 45 + case 48: + { + severity_ = input.readEnum(); + bitField0_ |= 0x00000008; + break; + } // case 48 + case 61: + { + severityScore_ = input.readFloat(); + bitField0_ |= 0x00000010; + break; + } // case 61 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private int category_ = 0; + + /** + * + * + *
            +     * Output only. Harm category.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.HarmCategory category = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for category. + */ + @java.lang.Override + public int getCategoryValue() { + return category_; + } + + /** + * + * + *
            +     * Output only. Harm category.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.HarmCategory category = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The enum numeric value on the wire for category to set. + * @return This builder for chaining. + */ + public Builder setCategoryValue(int value) { + category_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Output only. Harm category.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.HarmCategory category = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The category. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.HarmCategory getCategory() { + com.google.cloud.discoveryengine.v1beta.HarmCategory result = + com.google.cloud.discoveryengine.v1beta.HarmCategory.forNumber(category_); + return result == null + ? com.google.cloud.discoveryengine.v1beta.HarmCategory.UNRECOGNIZED + : result; + } + + /** + * + * + *
            +     * Output only. Harm category.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.HarmCategory category = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The category to set. + * @return This builder for chaining. + */ + public Builder setCategory(com.google.cloud.discoveryengine.v1beta.HarmCategory value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + category_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
            +     * Output only. Harm category.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.HarmCategory category = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearCategory() { + bitField0_ = (bitField0_ & ~0x00000001); + category_ = 0; + onChanged(); + return this; + } + + private int probability_ = 0; + + /** + * + * + *
            +     * Output only. Harm probability levels in the content.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SafetyRating.HarmProbability probability = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for probability. + */ + @java.lang.Override + public int getProbabilityValue() { + return probability_; + } + + /** + * + * + *
            +     * Output only. Harm probability levels in the content.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SafetyRating.HarmProbability probability = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The enum numeric value on the wire for probability to set. + * @return This builder for chaining. + */ + public Builder setProbabilityValue(int value) { + probability_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Output only. Harm probability levels in the content.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SafetyRating.HarmProbability probability = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The probability. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.SafetyRating.HarmProbability getProbability() { + com.google.cloud.discoveryengine.v1beta.SafetyRating.HarmProbability result = + com.google.cloud.discoveryengine.v1beta.SafetyRating.HarmProbability.forNumber( + probability_); + return result == null + ? com.google.cloud.discoveryengine.v1beta.SafetyRating.HarmProbability.UNRECOGNIZED + : result; + } + + /** + * + * + *
            +     * Output only. Harm probability levels in the content.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SafetyRating.HarmProbability probability = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The probability to set. + * @return This builder for chaining. + */ + public Builder setProbability( + com.google.cloud.discoveryengine.v1beta.SafetyRating.HarmProbability value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + probability_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
            +     * Output only. Harm probability levels in the content.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SafetyRating.HarmProbability probability = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearProbability() { + bitField0_ = (bitField0_ & ~0x00000002); + probability_ = 0; + onChanged(); + return this; + } + + private float probabilityScore_; + + /** + * + * + *
            +     * Output only. Harm probability score.
            +     * 
            + * + * float probability_score = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The probabilityScore. + */ + @java.lang.Override + public float getProbabilityScore() { + return probabilityScore_; + } + + /** + * + * + *
            +     * Output only. Harm probability score.
            +     * 
            + * + * float probability_score = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The probabilityScore to set. + * @return This builder for chaining. + */ + public Builder setProbabilityScore(float value) { + + probabilityScore_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Output only. Harm probability score.
            +     * 
            + * + * float probability_score = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearProbabilityScore() { + bitField0_ = (bitField0_ & ~0x00000004); + probabilityScore_ = 0F; + onChanged(); + return this; + } + + private int severity_ = 0; + + /** + * + * + *
            +     * Output only. Harm severity levels in the content.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SafetyRating.HarmSeverity severity = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for severity. + */ + @java.lang.Override + public int getSeverityValue() { + return severity_; + } + + /** + * + * + *
            +     * Output only. Harm severity levels in the content.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SafetyRating.HarmSeverity severity = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The enum numeric value on the wire for severity to set. + * @return This builder for chaining. + */ + public Builder setSeverityValue(int value) { + severity_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Output only. Harm severity levels in the content.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SafetyRating.HarmSeverity severity = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The severity. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.SafetyRating.HarmSeverity getSeverity() { + com.google.cloud.discoveryengine.v1beta.SafetyRating.HarmSeverity result = + com.google.cloud.discoveryengine.v1beta.SafetyRating.HarmSeverity.forNumber(severity_); + return result == null + ? com.google.cloud.discoveryengine.v1beta.SafetyRating.HarmSeverity.UNRECOGNIZED + : result; + } + + /** + * + * + *
            +     * Output only. Harm severity levels in the content.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SafetyRating.HarmSeverity severity = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The severity to set. + * @return This builder for chaining. + */ + public Builder setSeverity( + com.google.cloud.discoveryengine.v1beta.SafetyRating.HarmSeverity value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000008; + severity_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
            +     * Output only. Harm severity levels in the content.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SafetyRating.HarmSeverity severity = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearSeverity() { + bitField0_ = (bitField0_ & ~0x00000008); + severity_ = 0; + onChanged(); + return this; + } + + private float severityScore_; + + /** + * + * + *
            +     * Output only. Harm severity score.
            +     * 
            + * + * float severity_score = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The severityScore. + */ + @java.lang.Override + public float getSeverityScore() { + return severityScore_; + } + + /** + * + * + *
            +     * Output only. Harm severity score.
            +     * 
            + * + * float severity_score = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The severityScore to set. + * @return This builder for chaining. + */ + public Builder setSeverityScore(float value) { + + severityScore_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Output only. Harm severity score.
            +     * 
            + * + * float severity_score = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearSeverityScore() { + bitField0_ = (bitField0_ & ~0x00000010); + severityScore_ = 0F; + onChanged(); + return this; + } + + private boolean blocked_; + + /** + * + * + *
            +     * Output only. Indicates whether the content was filtered out because of this
            +     * rating.
            +     * 
            + * + * bool blocked = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The blocked. + */ + @java.lang.Override + public boolean getBlocked() { + return blocked_; + } + + /** + * + * + *
            +     * Output only. Indicates whether the content was filtered out because of this
            +     * rating.
            +     * 
            + * + * bool blocked = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The blocked to set. + * @return This builder for chaining. + */ + public Builder setBlocked(boolean value) { + + blocked_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Output only. Indicates whether the content was filtered out because of this
            +     * rating.
            +     * 
            + * + * bool blocked = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearBlocked() { + bitField0_ = (bitField0_ & ~0x00000020); + blocked_ = false; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.SafetyRating) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.SafetyRating) + private static final com.google.cloud.discoveryengine.v1beta.SafetyRating DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.discoveryengine.v1beta.SafetyRating(); + } + + public static com.google.cloud.discoveryengine.v1beta.SafetyRating getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SafetyRating parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.SafetyRating getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/SafetyRatingOrBuilder.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/SafetyRatingOrBuilder.java new file mode 100644 index 000000000000..eacd8d302c5a --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/SafetyRatingOrBuilder.java @@ -0,0 +1,158 @@ +/* + * 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/cloud/discoveryengine/v1beta/safety.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.discoveryengine.v1beta; + +@com.google.protobuf.Generated +public interface SafetyRatingOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.SafetyRating) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
            +   * Output only. Harm category.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.HarmCategory category = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for category. + */ + int getCategoryValue(); + + /** + * + * + *
            +   * Output only. Harm category.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.HarmCategory category = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The category. + */ + com.google.cloud.discoveryengine.v1beta.HarmCategory getCategory(); + + /** + * + * + *
            +   * Output only. Harm probability levels in the content.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SafetyRating.HarmProbability probability = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for probability. + */ + int getProbabilityValue(); + + /** + * + * + *
            +   * Output only. Harm probability levels in the content.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SafetyRating.HarmProbability probability = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The probability. + */ + com.google.cloud.discoveryengine.v1beta.SafetyRating.HarmProbability getProbability(); + + /** + * + * + *
            +   * Output only. Harm probability score.
            +   * 
            + * + * float probability_score = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The probabilityScore. + */ + float getProbabilityScore(); + + /** + * + * + *
            +   * Output only. Harm severity levels in the content.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SafetyRating.HarmSeverity severity = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for severity. + */ + int getSeverityValue(); + + /** + * + * + *
            +   * Output only. Harm severity levels in the content.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SafetyRating.HarmSeverity severity = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The severity. + */ + com.google.cloud.discoveryengine.v1beta.SafetyRating.HarmSeverity getSeverity(); + + /** + * + * + *
            +   * Output only. Harm severity score.
            +   * 
            + * + * float severity_score = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The severityScore. + */ + float getSeverityScore(); + + /** + * + * + *
            +   * Output only. Indicates whether the content was filtered out because of this
            +   * rating.
            +   * 
            + * + * bool blocked = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The blocked. + */ + boolean getBlocked(); +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/SampleQueryServiceProto.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/SampleQueryServiceProto.java index 93e7987dceae..ec74d052c5a1 100644 --- a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/SampleQueryServiceProto.java +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/SampleQueryServiceProto.java @@ -106,7 +106,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\013update_mask\030\002 \001(\0132\032.google.protobuf.FieldMask\"\\\n" + "\030DeleteSampleQueryRequest\022@\n" + "\004name\030\001 \001(\tB2\340A\002\372A,\n" - + "*discoveryengine.googleapis.com/SampleQuery2\353\014\n" + + "*discoveryengine.googleapis.com/SampleQuery2\351\r\n" + "\022SampleQueryService\022\326\001\n" + "\016GetSampleQuery\022:.google.cloud.discoveryengine.v1b" + "eta.GetSampleQueryRequest\0320.google.cloud" @@ -138,13 +138,15 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "iesResponse\022?google.cloud.discoveryengin" + "e.v1beta.ImportSampleQueriesMetadata\202\323\344\223" + "\002S\"N/v1beta/{parent=projects/*/locations/*/sampleQuerySets/*}/sampleQueries:impo" - + "rt:\001*\032R\312A\036discoveryengine.googleapis.com" - + "\322A.https://www.googleapis.com/auth/cloud-platformB\236\002\n" - + "\'com.google.cloud.discoveryengine.v1betaB\027SampleQueryServiceProtoP\001" - + "ZQcloud.google.com/go/discoveryengine/apiv1beta/discoveryenginepb;discoveryengin" - + "epb\242\002\017DISCOVERYENGINE\252\002#Google.Cloud.Dis" - + "coveryEngine.V1Beta\312\002#Google\\Cloud\\Disco" - + "veryEngine\\V1beta\352\002&Google::Cloud::DiscoveryEngine::V1betab\006proto3" + + "rt:\001*\032\317\001\312A\036discoveryengine.googleapis.co" + + "m\322A\252\001https://www.googleapis.com/auth/clo" + + "ud-platform,https://www.googleapis.com/auth/discoveryengine.readwrite,https://ww" + + "w.googleapis.com/auth/discoveryengine.serving.readwriteB\236\002\n" + + "\'com.google.cloud.discoveryengine.v1betaB\027SampleQueryServiceP" + + "rotoP\001ZQcloud.google.com/go/discoveryengine/apiv1beta/discoveryenginepb;discover" + + "yenginepb\242\002\017DISCOVERYENGINE\252\002#Google.Clo" + + "ud.DiscoveryEngine.V1Beta\312\002#Google\\Cloud" + + "\\DiscoveryEngine\\V1beta\352\002&Google::Cloud::DiscoveryEngine::V1betab\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/SampleQuerySetServiceProto.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/SampleQuerySetServiceProto.java index 430cb9ca5546..683335193441 100644 --- a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/SampleQuerySetServiceProto.java +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/SampleQuerySetServiceProto.java @@ -102,7 +102,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\340A\002\022/\n\013update_mask\030\002 \001(\0132\032.google.protob" + "uf.FieldMask\"b\n\033DeleteSampleQuerySetRequ" + "est\022C\n\004name\030\001 \001(\tB5\340A\002\372A/\n-discoveryengi" - + "ne.googleapis.com/SampleQuerySet2\202\n\n\025Sam" + + "ne.googleapis.com/SampleQuerySet2\200\013\n\025Sam" + "pleQuerySetService\022\317\001\n\021GetSampleQuerySet" + "\022=.google.cloud.discoveryengine.v1beta.G" + "etSampleQuerySetRequest\0323.google.cloud.d" @@ -132,17 +132,20 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + ".cloud.discoveryengine.v1beta.DeleteSamp" + "leQuerySetRequest\032\026.google.protobuf.Empt" + "y\"F\332A\004name\202\323\344\223\0029*7/v1beta/{name=projects" - + "/*/locations/*/sampleQuerySets/*}\032R\312A\036di" - + "scoveryengine.googleapis.com\322A.https://w" - + "ww.googleapis.com/auth/cloud-platformB\241\002" - + "\n\'com.google.cloud.discoveryengine.v1bet" - + "aB\032SampleQuerySetServiceProtoP\001ZQcloud.g" - + "oogle.com/go/discoveryengine/apiv1beta/d" - + "iscoveryenginepb;discoveryenginepb\242\002\017DIS" - + "COVERYENGINE\252\002#Google.Cloud.DiscoveryEng" - + "ine.V1Beta\312\002#Google\\Cloud\\DiscoveryEngin" - + "e\\V1beta\352\002&Google::Cloud::DiscoveryEngin" - + "e::V1betab\006proto3" + + "/*/locations/*/sampleQuerySets/*}\032\317\001\312A\036d" + + "iscoveryengine.googleapis.com\322A\252\001https:/" + + "/www.googleapis.com/auth/cloud-platform," + + "https://www.googleapis.com/auth/discover" + + "yengine.readwrite,https://www.googleapis" + + ".com/auth/discoveryengine.serving.readwr" + + "iteB\241\002\n\'com.google.cloud.discoveryengine" + + ".v1betaB\032SampleQuerySetServiceProtoP\001ZQc" + + "loud.google.com/go/discoveryengine/apiv1" + + "beta/discoveryenginepb;discoveryenginepb" + + "\242\002\017DISCOVERYENGINE\252\002#Google.Cloud.Discov" + + "eryEngine.V1Beta\312\002#Google\\Cloud\\Discover" + + "yEngine\\V1beta\352\002&Google::Cloud::Discover" + + "yEngine::V1betab\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/SchemaServiceProto.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/SchemaServiceProto.java index 99a1ece328f8..2843114b01d8 100644 --- a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/SchemaServiceProto.java +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/SchemaServiceProto.java @@ -120,7 +120,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "rotobuf.Timestamp\"x\n\024DeleteSchemaMetadat" + "a\022/\n\013create_time\030\001 \001(\0132\032.google.protobuf" + ".Timestamp\022/\n\013update_time\030\002 \001(\0132\032.google" - + ".protobuf.Timestamp2\211\016\n\rSchemaService\022\214\002" + + ".protobuf.Timestamp2\207\017\n\rSchemaService\022\214\002" + "\n\tGetSchema\0225.google.cloud.discoveryengi" + "ne.v1beta.GetSchemaRequest\032+.google.clou" + "d.discoveryengine.v1beta.Schema\"\232\001\332A\004nam" @@ -163,16 +163,20 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + " + * Promotion proto includes uri and other helping information to display the + * promotion. + *
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.SearchLinkPromotion} + */ +@com.google.protobuf.Generated +public final class SearchLinkPromotion extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.SearchLinkPromotion) + SearchLinkPromotionOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "SearchLinkPromotion"); + } + + // Use SearchLinkPromotion.newBuilder() to construct. + private SearchLinkPromotion(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private SearchLinkPromotion() { + title_ = ""; + uri_ = ""; + document_ = ""; + imageUri_ = ""; + description_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.CommonProto + .internal_static_google_cloud_discoveryengine_v1beta_SearchLinkPromotion_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.CommonProto + .internal_static_google_cloud_discoveryengine_v1beta_SearchLinkPromotion_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.SearchLinkPromotion.class, + com.google.cloud.discoveryengine.v1beta.SearchLinkPromotion.Builder.class); + } + + public static final int TITLE_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object title_ = ""; + + /** + * + * + *
            +   * Required. The title of the promotion.
            +   * Maximum length: 160 characters.
            +   * 
            + * + * string title = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The title. + */ + @java.lang.Override + public java.lang.String getTitle() { + java.lang.Object ref = title_; + 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(); + title_ = s; + return s; + } + } + + /** + * + * + *
            +   * Required. The title of the promotion.
            +   * Maximum length: 160 characters.
            +   * 
            + * + * string title = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for title. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTitleBytes() { + java.lang.Object ref = title_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + title_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int URI_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object uri_ = ""; + + /** + * + * + *
            +   * Optional. The URL for the page the user wants to promote. Must be set for
            +   * site search. For other verticals, this is optional.
            +   * 
            + * + * string uri = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The uri. + */ + @java.lang.Override + public java.lang.String getUri() { + java.lang.Object ref = uri_; + 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(); + uri_ = s; + return s; + } + } + + /** + * + * + *
            +   * Optional. The URL for the page the user wants to promote. Must be set for
            +   * site search. For other verticals, this is optional.
            +   * 
            + * + * string uri = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for uri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getUriBytes() { + java.lang.Object ref = uri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DOCUMENT_FIELD_NUMBER = 6; + + @SuppressWarnings("serial") + private volatile java.lang.Object document_ = ""; + + /** + * + * + *
            +   * Optional. The [Document][google.cloud.discoveryengine.v1beta.Document] the
            +   * user wants to promote. For site search, leave unset and only populate uri.
            +   * Can be set along with uri.
            +   * 
            + * + * + * string document = 6 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The document. + */ + @java.lang.Override + public java.lang.String getDocument() { + java.lang.Object ref = document_; + 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(); + document_ = s; + return s; + } + } + + /** + * + * + *
            +   * Optional. The [Document][google.cloud.discoveryengine.v1beta.Document] the
            +   * user wants to promote. For site search, leave unset and only populate uri.
            +   * Can be set along with uri.
            +   * 
            + * + * + * string document = 6 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for document. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDocumentBytes() { + java.lang.Object ref = document_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + document_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int IMAGE_URI_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object imageUri_ = ""; + + /** + * + * + *
            +   * Optional. The promotion thumbnail image url.
            +   * 
            + * + * string image_uri = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The imageUri. + */ + @java.lang.Override + public java.lang.String getImageUri() { + java.lang.Object ref = imageUri_; + 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(); + imageUri_ = s; + return s; + } + } + + /** + * + * + *
            +   * Optional. The promotion thumbnail image url.
            +   * 
            + * + * string image_uri = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for imageUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getImageUriBytes() { + java.lang.Object ref = imageUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + imageUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DESCRIPTION_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object description_ = ""; + + /** + * + * + *
            +   * Optional. The Promotion description.
            +   * Maximum length: 200 characters.
            +   * 
            + * + * string description = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + java.lang.Object ref = description_; + 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(); + description_ = s; + return s; + } + } + + /** + * + * + *
            +   * Optional. The Promotion description.
            +   * Maximum length: 200 characters.
            +   * 
            + * + * string description = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ENABLED_FIELD_NUMBER = 5; + private boolean enabled_ = false; + + /** + * + * + *
            +   * Optional. The enabled promotion will be returned for any serving configs
            +   * associated with the parent of the control this promotion is attached to.
            +   *
            +   * This flag is used for basic site search only.
            +   * 
            + * + * bool enabled = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The enabled. + */ + @java.lang.Override + public boolean getEnabled() { + return enabled_; + } + + 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(title_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, title_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(uri_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, uri_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(imageUri_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, imageUri_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(description_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, description_); + } + if (enabled_ != false) { + output.writeBool(5, enabled_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(document_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 6, document_); + } + 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(title_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, title_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(uri_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, uri_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(imageUri_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, imageUri_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(description_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, description_); + } + if (enabled_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(5, enabled_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(document_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(6, document_); + } + 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.discoveryengine.v1beta.SearchLinkPromotion)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1beta.SearchLinkPromotion other = + (com.google.cloud.discoveryengine.v1beta.SearchLinkPromotion) obj; + + if (!getTitle().equals(other.getTitle())) return false; + if (!getUri().equals(other.getUri())) return false; + if (!getDocument().equals(other.getDocument())) return false; + if (!getImageUri().equals(other.getImageUri())) return false; + if (!getDescription().equals(other.getDescription())) return false; + if (getEnabled() != other.getEnabled()) 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) + TITLE_FIELD_NUMBER; + hash = (53 * hash) + getTitle().hashCode(); + hash = (37 * hash) + URI_FIELD_NUMBER; + hash = (53 * hash) + getUri().hashCode(); + hash = (37 * hash) + DOCUMENT_FIELD_NUMBER; + hash = (53 * hash) + getDocument().hashCode(); + hash = (37 * hash) + IMAGE_URI_FIELD_NUMBER; + hash = (53 * hash) + getImageUri().hashCode(); + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + hash = (37 * hash) + ENABLED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getEnabled()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1beta.SearchLinkPromotion parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.SearchLinkPromotion 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.discoveryengine.v1beta.SearchLinkPromotion parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.SearchLinkPromotion 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.discoveryengine.v1beta.SearchLinkPromotion parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.SearchLinkPromotion parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1beta.SearchLinkPromotion parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.SearchLinkPromotion 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.discoveryengine.v1beta.SearchLinkPromotion parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.SearchLinkPromotion 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.discoveryengine.v1beta.SearchLinkPromotion parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.SearchLinkPromotion 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.discoveryengine.v1beta.SearchLinkPromotion 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; + } + + /** + * + * + *
            +   * Promotion proto includes uri and other helping information to display the
            +   * promotion.
            +   * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.SearchLinkPromotion} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.SearchLinkPromotion) + com.google.cloud.discoveryengine.v1beta.SearchLinkPromotionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.CommonProto + .internal_static_google_cloud_discoveryengine_v1beta_SearchLinkPromotion_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.CommonProto + .internal_static_google_cloud_discoveryengine_v1beta_SearchLinkPromotion_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.SearchLinkPromotion.class, + com.google.cloud.discoveryengine.v1beta.SearchLinkPromotion.Builder.class); + } + + // Construct using com.google.cloud.discoveryengine.v1beta.SearchLinkPromotion.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + title_ = ""; + uri_ = ""; + document_ = ""; + imageUri_ = ""; + description_ = ""; + enabled_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1beta.CommonProto + .internal_static_google_cloud_discoveryengine_v1beta_SearchLinkPromotion_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.SearchLinkPromotion getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1beta.SearchLinkPromotion.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.SearchLinkPromotion build() { + com.google.cloud.discoveryengine.v1beta.SearchLinkPromotion result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.SearchLinkPromotion buildPartial() { + com.google.cloud.discoveryengine.v1beta.SearchLinkPromotion result = + new com.google.cloud.discoveryengine.v1beta.SearchLinkPromotion(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.discoveryengine.v1beta.SearchLinkPromotion result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.title_ = title_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.uri_ = uri_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.document_ = document_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.imageUri_ = imageUri_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.description_ = description_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.enabled_ = enabled_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.discoveryengine.v1beta.SearchLinkPromotion) { + return mergeFrom((com.google.cloud.discoveryengine.v1beta.SearchLinkPromotion) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.discoveryengine.v1beta.SearchLinkPromotion other) { + if (other == com.google.cloud.discoveryengine.v1beta.SearchLinkPromotion.getDefaultInstance()) + return this; + if (!other.getTitle().isEmpty()) { + title_ = other.title_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getUri().isEmpty()) { + uri_ = other.uri_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getDocument().isEmpty()) { + document_ = other.document_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getImageUri().isEmpty()) { + imageUri_ = other.imageUri_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + bitField0_ |= 0x00000010; + onChanged(); + } + if (other.getEnabled() != false) { + setEnabled(other.getEnabled()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + title_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + uri_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + imageUri_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 26 + case 34: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 34 + case 40: + { + enabled_ = input.readBool(); + bitField0_ |= 0x00000020; + break; + } // case 40 + case 50: + { + document_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 50 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object title_ = ""; + + /** + * + * + *
            +     * Required. The title of the promotion.
            +     * Maximum length: 160 characters.
            +     * 
            + * + * string title = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The title. + */ + public java.lang.String getTitle() { + java.lang.Object ref = title_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + title_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
            +     * Required. The title of the promotion.
            +     * Maximum length: 160 characters.
            +     * 
            + * + * string title = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for title. + */ + public com.google.protobuf.ByteString getTitleBytes() { + java.lang.Object ref = title_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + title_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
            +     * Required. The title of the promotion.
            +     * Maximum length: 160 characters.
            +     * 
            + * + * string title = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The title to set. + * @return This builder for chaining. + */ + public Builder setTitle(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + title_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Required. The title of the promotion.
            +     * Maximum length: 160 characters.
            +     * 
            + * + * string title = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearTitle() { + title_ = getDefaultInstance().getTitle(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
            +     * Required. The title of the promotion.
            +     * Maximum length: 160 characters.
            +     * 
            + * + * string title = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for title to set. + * @return This builder for chaining. + */ + public Builder setTitleBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + title_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object uri_ = ""; + + /** + * + * + *
            +     * Optional. The URL for the page the user wants to promote. Must be set for
            +     * site search. For other verticals, this is optional.
            +     * 
            + * + * string uri = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The uri. + */ + public java.lang.String getUri() { + java.lang.Object ref = uri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
            +     * Optional. The URL for the page the user wants to promote. Must be set for
            +     * site search. For other verticals, this is optional.
            +     * 
            + * + * string uri = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for uri. + */ + public com.google.protobuf.ByteString getUriBytes() { + java.lang.Object ref = uri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
            +     * Optional. The URL for the page the user wants to promote. Must be set for
            +     * site search. For other verticals, this is optional.
            +     * 
            + * + * string uri = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The uri to set. + * @return This builder for chaining. + */ + public Builder setUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + uri_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Optional. The URL for the page the user wants to promote. Must be set for
            +     * site search. For other verticals, this is optional.
            +     * 
            + * + * string uri = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearUri() { + uri_ = getDefaultInstance().getUri(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
            +     * Optional. The URL for the page the user wants to promote. Must be set for
            +     * site search. For other verticals, this is optional.
            +     * 
            + * + * string uri = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for uri to set. + * @return This builder for chaining. + */ + public Builder setUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + uri_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object document_ = ""; + + /** + * + * + *
            +     * Optional. The [Document][google.cloud.discoveryengine.v1beta.Document] the
            +     * user wants to promote. For site search, leave unset and only populate uri.
            +     * Can be set along with uri.
            +     * 
            + * + * + * string document = 6 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The document. + */ + public java.lang.String getDocument() { + java.lang.Object ref = document_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + document_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
            +     * Optional. The [Document][google.cloud.discoveryengine.v1beta.Document] the
            +     * user wants to promote. For site search, leave unset and only populate uri.
            +     * Can be set along with uri.
            +     * 
            + * + * + * string document = 6 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for document. + */ + public com.google.protobuf.ByteString getDocumentBytes() { + java.lang.Object ref = document_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + document_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
            +     * Optional. The [Document][google.cloud.discoveryengine.v1beta.Document] the
            +     * user wants to promote. For site search, leave unset and only populate uri.
            +     * Can be set along with uri.
            +     * 
            + * + * + * string document = 6 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param value The document to set. + * @return This builder for chaining. + */ + public Builder setDocument(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + document_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Optional. The [Document][google.cloud.discoveryengine.v1beta.Document] the
            +     * user wants to promote. For site search, leave unset and only populate uri.
            +     * Can be set along with uri.
            +     * 
            + * + * + * string document = 6 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearDocument() { + document_ = getDefaultInstance().getDocument(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
            +     * Optional. The [Document][google.cloud.discoveryengine.v1beta.Document] the
            +     * user wants to promote. For site search, leave unset and only populate uri.
            +     * Can be set along with uri.
            +     * 
            + * + * + * string document = 6 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for document to set. + * @return This builder for chaining. + */ + public Builder setDocumentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + document_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object imageUri_ = ""; + + /** + * + * + *
            +     * Optional. The promotion thumbnail image url.
            +     * 
            + * + * string image_uri = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The imageUri. + */ + public java.lang.String getImageUri() { + java.lang.Object ref = imageUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + imageUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
            +     * Optional. The promotion thumbnail image url.
            +     * 
            + * + * string image_uri = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for imageUri. + */ + public com.google.protobuf.ByteString getImageUriBytes() { + java.lang.Object ref = imageUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + imageUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
            +     * Optional. The promotion thumbnail image url.
            +     * 
            + * + * string image_uri = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The imageUri to set. + * @return This builder for chaining. + */ + public Builder setImageUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + imageUri_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Optional. The promotion thumbnail image url.
            +     * 
            + * + * string image_uri = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearImageUri() { + imageUri_ = getDefaultInstance().getImageUri(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + + /** + * + * + *
            +     * Optional. The promotion thumbnail image url.
            +     * 
            + * + * string image_uri = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for imageUri to set. + * @return This builder for chaining. + */ + public Builder setImageUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + imageUri_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private java.lang.Object description_ = ""; + + /** + * + * + *
            +     * Optional. The Promotion description.
            +     * Maximum length: 200 characters.
            +     * 
            + * + * string description = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The description. + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
            +     * Optional. The Promotion description.
            +     * Maximum length: 200 characters.
            +     * 
            + * + * string description = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for description. + */ + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
            +     * Optional. The Promotion description.
            +     * Maximum length: 200 characters.
            +     * 
            + * + * string description = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + description_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Optional. The Promotion description.
            +     * Maximum length: 200 characters.
            +     * 
            + * + * string description = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearDescription() { + description_ = getDefaultInstance().getDescription(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + + /** + * + * + *
            +     * Optional. The Promotion description.
            +     * Maximum length: 200 characters.
            +     * 
            + * + * string description = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + description_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + private boolean enabled_; + + /** + * + * + *
            +     * Optional. The enabled promotion will be returned for any serving configs
            +     * associated with the parent of the control this promotion is attached to.
            +     *
            +     * This flag is used for basic site search only.
            +     * 
            + * + * bool enabled = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The enabled. + */ + @java.lang.Override + public boolean getEnabled() { + return enabled_; + } + + /** + * + * + *
            +     * Optional. The enabled promotion will be returned for any serving configs
            +     * associated with the parent of the control this promotion is attached to.
            +     *
            +     * This flag is used for basic site search only.
            +     * 
            + * + * bool enabled = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The enabled to set. + * @return This builder for chaining. + */ + public Builder setEnabled(boolean value) { + + enabled_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Optional. The enabled promotion will be returned for any serving configs
            +     * associated with the parent of the control this promotion is attached to.
            +     *
            +     * This flag is used for basic site search only.
            +     * 
            + * + * bool enabled = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearEnabled() { + bitField0_ = (bitField0_ & ~0x00000020); + enabled_ = false; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.SearchLinkPromotion) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.SearchLinkPromotion) + private static final com.google.cloud.discoveryengine.v1beta.SearchLinkPromotion DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.discoveryengine.v1beta.SearchLinkPromotion(); + } + + public static com.google.cloud.discoveryengine.v1beta.SearchLinkPromotion getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SearchLinkPromotion parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.SearchLinkPromotion getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/SearchLinkPromotionOrBuilder.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/SearchLinkPromotionOrBuilder.java new file mode 100644 index 000000000000..b55137e865f9 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/SearchLinkPromotionOrBuilder.java @@ -0,0 +1,188 @@ +/* + * 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/cloud/discoveryengine/v1beta/common.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.discoveryengine.v1beta; + +@com.google.protobuf.Generated +public interface SearchLinkPromotionOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.SearchLinkPromotion) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
            +   * Required. The title of the promotion.
            +   * Maximum length: 160 characters.
            +   * 
            + * + * string title = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The title. + */ + java.lang.String getTitle(); + + /** + * + * + *
            +   * Required. The title of the promotion.
            +   * Maximum length: 160 characters.
            +   * 
            + * + * string title = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for title. + */ + com.google.protobuf.ByteString getTitleBytes(); + + /** + * + * + *
            +   * Optional. The URL for the page the user wants to promote. Must be set for
            +   * site search. For other verticals, this is optional.
            +   * 
            + * + * string uri = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The uri. + */ + java.lang.String getUri(); + + /** + * + * + *
            +   * Optional. The URL for the page the user wants to promote. Must be set for
            +   * site search. For other verticals, this is optional.
            +   * 
            + * + * string uri = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for uri. + */ + com.google.protobuf.ByteString getUriBytes(); + + /** + * + * + *
            +   * Optional. The [Document][google.cloud.discoveryengine.v1beta.Document] the
            +   * user wants to promote. For site search, leave unset and only populate uri.
            +   * Can be set along with uri.
            +   * 
            + * + * + * string document = 6 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The document. + */ + java.lang.String getDocument(); + + /** + * + * + *
            +   * Optional. The [Document][google.cloud.discoveryengine.v1beta.Document] the
            +   * user wants to promote. For site search, leave unset and only populate uri.
            +   * Can be set along with uri.
            +   * 
            + * + * + * string document = 6 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for document. + */ + com.google.protobuf.ByteString getDocumentBytes(); + + /** + * + * + *
            +   * Optional. The promotion thumbnail image url.
            +   * 
            + * + * string image_uri = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The imageUri. + */ + java.lang.String getImageUri(); + + /** + * + * + *
            +   * Optional. The promotion thumbnail image url.
            +   * 
            + * + * string image_uri = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for imageUri. + */ + com.google.protobuf.ByteString getImageUriBytes(); + + /** + * + * + *
            +   * Optional. The Promotion description.
            +   * Maximum length: 200 characters.
            +   * 
            + * + * string description = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The description. + */ + java.lang.String getDescription(); + + /** + * + * + *
            +   * Optional. The Promotion description.
            +   * Maximum length: 200 characters.
            +   * 
            + * + * string description = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for description. + */ + com.google.protobuf.ByteString getDescriptionBytes(); + + /** + * + * + *
            +   * Optional. The enabled promotion will be returned for any serving configs
            +   * associated with the parent of the control this promotion is attached to.
            +   *
            +   * This flag is used for basic site search only.
            +   * 
            + * + * bool enabled = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The enabled. + */ + boolean getEnabled(); +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/SearchRequest.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/SearchRequest.java index 860fd14c7fdd..7c010dec994b 100644 --- a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/SearchRequest.java +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/SearchRequest.java @@ -57,6 +57,7 @@ private SearchRequest() { servingConfig_ = ""; branch_ = ""; query_ = ""; + pageCategories_ = com.google.protobuf.LazyStringArrayList.emptyList(); pageToken_ = ""; dataStoreSpecs_ = java.util.Collections.emptyList(); filter_ = ""; @@ -68,8 +69,10 @@ private SearchRequest() { userPseudoId_ = ""; rankingExpression_ = ""; rankingExpressionBackend_ = 0; + crowdingSpecs_ = java.util.Collections.emptyList(); session_ = ""; relevanceThreshold_ = 0; + entity_ = ""; } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @@ -105,65 +108,71 @@ protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldRefl * * *
            -   * The relevance threshold of the search results. The higher relevance
            -   * threshold is, the higher relevant results are shown and the less number of
            -   * results are returned.
            +   * The backend to use for the ranking expression evaluation.
                * 
            * - * Protobuf enum {@code google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceThreshold} + * Protobuf enum {@code + * google.cloud.discoveryengine.v1beta.SearchRequest.RankingExpressionBackend} */ - public enum RelevanceThreshold implements com.google.protobuf.ProtocolMessageEnum { + public enum RankingExpressionBackend implements com.google.protobuf.ProtocolMessageEnum { /** * * *
            -     * Default value. In this case, server behavior defaults to Google defined
            -     * threshold.
            +     * Default option for unspecified/unknown values.
                  * 
            * - * RELEVANCE_THRESHOLD_UNSPECIFIED = 0; + * RANKING_EXPRESSION_BACKEND_UNSPECIFIED = 0; */ - RELEVANCE_THRESHOLD_UNSPECIFIED(0), + RANKING_EXPRESSION_BACKEND_UNSPECIFIED(0), /** * * *
            -     * Lowest relevance threshold.
            +     * Deprecated: Use `RANK_BY_EMBEDDING` instead.
            +     * Ranking by custom embedding model, the default way to evaluate the
            +     * ranking expression. Legacy enum option, `RANK_BY_EMBEDDING` should be
            +     * used instead.
                  * 
            * - * LOWEST = 1; + * BYOE = 1 [deprecated = true]; */ - LOWEST(1), + @java.lang.Deprecated + BYOE(1), /** * * *
            -     * Low relevance threshold.
            +     * Deprecated: Use `RANK_BY_FORMULA` instead.
            +     * Ranking by custom formula. Legacy enum option, `RANK_BY_FORMULA` should
            +     * be used instead.
                  * 
            * - * LOW = 2; + * CLEARBOX = 2 [deprecated = true]; */ - LOW(2), + @java.lang.Deprecated + CLEARBOX(2), /** * * *
            -     * Medium relevance threshold.
            +     * Ranking by custom embedding model, the default way to evaluate the
            +     * ranking expression.
                  * 
            * - * MEDIUM = 3; + * RANK_BY_EMBEDDING = 3; */ - MEDIUM(3), + RANK_BY_EMBEDDING(3), /** * * *
            -     * High relevance threshold.
            +     * Ranking by custom formula.
                  * 
            * - * HIGH = 4; + * RANK_BY_FORMULA = 4; */ - HIGH(4), + RANK_BY_FORMULA(4), UNRECOGNIZED(-1), ; @@ -174,64 +183,69 @@ public enum RelevanceThreshold implements com.google.protobuf.ProtocolMessageEnu /* minor= */ 33, /* patch= */ 2, /* suffix= */ "", - "RelevanceThreshold"); + "RankingExpressionBackend"); } /** * * *
            -     * Default value. In this case, server behavior defaults to Google defined
            -     * threshold.
            +     * Default option for unspecified/unknown values.
                  * 
            * - * RELEVANCE_THRESHOLD_UNSPECIFIED = 0; + * RANKING_EXPRESSION_BACKEND_UNSPECIFIED = 0; */ - public static final int RELEVANCE_THRESHOLD_UNSPECIFIED_VALUE = 0; + public static final int RANKING_EXPRESSION_BACKEND_UNSPECIFIED_VALUE = 0; /** * * *
            -     * Lowest relevance threshold.
            +     * Deprecated: Use `RANK_BY_EMBEDDING` instead.
            +     * Ranking by custom embedding model, the default way to evaluate the
            +     * ranking expression. Legacy enum option, `RANK_BY_EMBEDDING` should be
            +     * used instead.
                  * 
            * - * LOWEST = 1; + * BYOE = 1 [deprecated = true]; */ - public static final int LOWEST_VALUE = 1; + @java.lang.Deprecated public static final int BYOE_VALUE = 1; /** * * *
            -     * Low relevance threshold.
            +     * Deprecated: Use `RANK_BY_FORMULA` instead.
            +     * Ranking by custom formula. Legacy enum option, `RANK_BY_FORMULA` should
            +     * be used instead.
                  * 
            * - * LOW = 2; + * CLEARBOX = 2 [deprecated = true]; */ - public static final int LOW_VALUE = 2; + @java.lang.Deprecated public static final int CLEARBOX_VALUE = 2; /** * * *
            -     * Medium relevance threshold.
            +     * Ranking by custom embedding model, the default way to evaluate the
            +     * ranking expression.
                  * 
            * - * MEDIUM = 3; + * RANK_BY_EMBEDDING = 3; */ - public static final int MEDIUM_VALUE = 3; + public static final int RANK_BY_EMBEDDING_VALUE = 3; /** * * *
            -     * High relevance threshold.
            +     * Ranking by custom formula.
                  * 
            * - * HIGH = 4; + * RANK_BY_FORMULA = 4; */ - public static final int HIGH_VALUE = 4; + public static final int RANK_BY_FORMULA_VALUE = 4; public final int getNumber() { if (this == UNRECOGNIZED) { @@ -247,7 +261,7 @@ public final int getNumber() { * @deprecated Use {@link #forNumber(int)} instead. */ @java.lang.Deprecated - public static RelevanceThreshold valueOf(int value) { + public static RankingExpressionBackend valueOf(int value) { return forNumber(value); } @@ -255,33 +269,33 @@ public static RelevanceThreshold valueOf(int value) { * @param value The numeric wire value of the corresponding enum entry. * @return The enum associated with the given numeric wire value. */ - public static RelevanceThreshold forNumber(int value) { + public static RankingExpressionBackend forNumber(int value) { switch (value) { case 0: - return RELEVANCE_THRESHOLD_UNSPECIFIED; + return RANKING_EXPRESSION_BACKEND_UNSPECIFIED; case 1: - return LOWEST; + return BYOE; case 2: - return LOW; + return CLEARBOX; case 3: - return MEDIUM; + return RANK_BY_EMBEDDING; case 4: - return HIGH; + return RANK_BY_FORMULA; default: return null; } } - public static com.google.protobuf.Internal.EnumLiteMap + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { return internalValueMap; } - private static final com.google.protobuf.Internal.EnumLiteMap + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public RelevanceThreshold findValueByNumber(int number) { - return RelevanceThreshold.forNumber(number); + new com.google.protobuf.Internal.EnumLiteMap() { + public RankingExpressionBackend findValueByNumber(int number) { + return RankingExpressionBackend.forNumber(number); } }; @@ -303,9 +317,9 @@ public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { .get(0); } - private static final RelevanceThreshold[] VALUES = values(); + private static final RankingExpressionBackend[] VALUES = values(); - public static RelevanceThreshold valueOf( + public static RankingExpressionBackend valueOf( com.google.protobuf.Descriptors.EnumValueDescriptor desc) { if (desc.getType() != getDescriptor()) { throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); @@ -318,55 +332,76 @@ public static RelevanceThreshold valueOf( private final int value; - private RelevanceThreshold(int value) { + private RankingExpressionBackend(int value) { this.value = value; } - // @@protoc_insertion_point(enum_scope:google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceThreshold) + // @@protoc_insertion_point(enum_scope:google.cloud.discoveryengine.v1beta.SearchRequest.RankingExpressionBackend) } /** * * *
            -   * The backend to use for the ranking expression evaluation.
            +   * The relevance threshold of the search results. The higher relevance
            +   * threshold is, the higher relevant results are shown and the less number of
            +   * results are returned.
                * 
            * - * Protobuf enum {@code - * google.cloud.discoveryengine.v1beta.SearchRequest.RankingExpressionBackend} + * Protobuf enum {@code google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceThreshold} */ - public enum RankingExpressionBackend implements com.google.protobuf.ProtocolMessageEnum { + public enum RelevanceThreshold implements com.google.protobuf.ProtocolMessageEnum { /** * * *
            -     * Default option for unspecified/unknown values.
            +     * Default value. In this case, server behavior defaults to Google defined
            +     * threshold.
                  * 
            * - * RANKING_EXPRESSION_BACKEND_UNSPECIFIED = 0; + * RELEVANCE_THRESHOLD_UNSPECIFIED = 0; */ - RANKING_EXPRESSION_BACKEND_UNSPECIFIED(0), + RELEVANCE_THRESHOLD_UNSPECIFIED(0), /** * * *
            -     * Ranking by custom embedding model, the default way to evaluate the
            -     * ranking expression.
            +     * Lowest relevance threshold.
                  * 
            * - * RANK_BY_EMBEDDING = 3; + * LOWEST = 1; */ - RANK_BY_EMBEDDING(3), + LOWEST(1), /** * * *
            -     * Ranking by custom formula.
            +     * Low relevance threshold.
                  * 
            * - * RANK_BY_FORMULA = 4; + * LOW = 2; */ - RANK_BY_FORMULA(4), + LOW(2), + /** + * + * + *
            +     * Medium relevance threshold.
            +     * 
            + * + * MEDIUM = 3; + */ + MEDIUM(3), + /** + * + * + *
            +     * High relevance threshold.
            +     * 
            + * + * HIGH = 4; + */ + HIGH(4), UNRECOGNIZED(-1), ; @@ -377,42 +412,64 @@ public enum RankingExpressionBackend implements com.google.protobuf.ProtocolMess /* minor= */ 33, /* patch= */ 2, /* suffix= */ "", - "RankingExpressionBackend"); + "RelevanceThreshold"); } /** * * *
            -     * Default option for unspecified/unknown values.
            +     * Default value. In this case, server behavior defaults to Google defined
            +     * threshold.
                  * 
            * - * RANKING_EXPRESSION_BACKEND_UNSPECIFIED = 0; + * RELEVANCE_THRESHOLD_UNSPECIFIED = 0; */ - public static final int RANKING_EXPRESSION_BACKEND_UNSPECIFIED_VALUE = 0; + public static final int RELEVANCE_THRESHOLD_UNSPECIFIED_VALUE = 0; /** * * *
            -     * Ranking by custom embedding model, the default way to evaluate the
            -     * ranking expression.
            +     * Lowest relevance threshold.
                  * 
            * - * RANK_BY_EMBEDDING = 3; + * LOWEST = 1; */ - public static final int RANK_BY_EMBEDDING_VALUE = 3; + public static final int LOWEST_VALUE = 1; /** * * *
            -     * Ranking by custom formula.
            +     * Low relevance threshold.
                  * 
            * - * RANK_BY_FORMULA = 4; + * LOW = 2; */ - public static final int RANK_BY_FORMULA_VALUE = 4; + public static final int LOW_VALUE = 2; + + /** + * + * + *
            +     * Medium relevance threshold.
            +     * 
            + * + * MEDIUM = 3; + */ + public static final int MEDIUM_VALUE = 3; + + /** + * + * + *
            +     * High relevance threshold.
            +     * 
            + * + * HIGH = 4; + */ + public static final int HIGH_VALUE = 4; public final int getNumber() { if (this == UNRECOGNIZED) { @@ -428,7 +485,7 @@ public final int getNumber() { * @deprecated Use {@link #forNumber(int)} instead. */ @java.lang.Deprecated - public static RankingExpressionBackend valueOf(int value) { + public static RelevanceThreshold valueOf(int value) { return forNumber(value); } @@ -436,29 +493,33 @@ public static RankingExpressionBackend valueOf(int value) { * @param value The numeric wire value of the corresponding enum entry. * @return The enum associated with the given numeric wire value. */ - public static RankingExpressionBackend forNumber(int value) { + public static RelevanceThreshold forNumber(int value) { switch (value) { case 0: - return RANKING_EXPRESSION_BACKEND_UNSPECIFIED; + return RELEVANCE_THRESHOLD_UNSPECIFIED; + case 1: + return LOWEST; + case 2: + return LOW; case 3: - return RANK_BY_EMBEDDING; + return MEDIUM; case 4: - return RANK_BY_FORMULA; + return HIGH; default: return null; } } - public static com.google.protobuf.Internal.EnumLiteMap + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { return internalValueMap; } - private static final com.google.protobuf.Internal.EnumLiteMap + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public RankingExpressionBackend findValueByNumber(int number) { - return RankingExpressionBackend.forNumber(number); + new com.google.protobuf.Internal.EnumLiteMap() { + public RelevanceThreshold findValueByNumber(int number) { + return RelevanceThreshold.forNumber(number); } }; @@ -480,9 +541,9 @@ public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { .get(1); } - private static final RankingExpressionBackend[] VALUES = values(); + private static final RelevanceThreshold[] VALUES = values(); - public static RankingExpressionBackend valueOf( + public static RelevanceThreshold valueOf( com.google.protobuf.Descriptors.EnumValueDescriptor desc) { if (desc.getType() != getDescriptor()) { throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); @@ -495,11 +556,11 @@ public static RankingExpressionBackend valueOf( private final int value; - private RankingExpressionBackend(int value) { + private RelevanceThreshold(int value) { this.value = value; } - // @@protoc_insertion_point(enum_scope:google.cloud.discoveryengine.v1beta.SearchRequest.RankingExpressionBackend) + // @@protoc_insertion_point(enum_scope:google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceThreshold) } public interface ImageQueryOrBuilder @@ -1404,6 +1465,56 @@ public interface DataStoreSpecOrBuilder */ com.google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpecOrBuilder getBoostSpecOrBuilder(); + + /** + * + * + *
            +     * Optional. Custom search operators which if specified will be used to
            +     * filter results from workspace data stores. For more information on custom
            +     * search operators, see
            +     * [SearchOperators](https://support.google.com/cloudsearch/answer/6172299).
            +     * 
            + * + * string custom_search_operators = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The customSearchOperators. + */ + java.lang.String getCustomSearchOperators(); + + /** + * + * + *
            +     * Optional. Custom search operators which if specified will be used to
            +     * filter results from workspace data stores. For more information on custom
            +     * search operators, see
            +     * [SearchOperators](https://support.google.com/cloudsearch/answer/6172299).
            +     * 
            + * + * string custom_search_operators = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for customSearchOperators. + */ + com.google.protobuf.ByteString getCustomSearchOperatorsBytes(); + + /** + * + * + *
            +     * Optional. The maximum number of results to retrieve from this data store.
            +     * If not specified, it will use the
            +     * [SearchRequest.num_results_per_data_store][google.cloud.discoveryengine.v1beta.SearchRequest.num_results_per_data_store]
            +     * if provided, otherwise there is no limit. If both this field and
            +     * [SearchRequest.num_results_per_data_store][google.cloud.discoveryengine.v1beta.SearchRequest.num_results_per_data_store]
            +     * are specified, this field will be used.
            +     * 
            + * + * int32 num_results = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The numResults. + */ + int getNumResults(); } /** @@ -1441,6 +1552,7 @@ private DataStoreSpec(com.google.protobuf.GeneratedMessage.Builder builder) { private DataStoreSpec() { dataStore_ = ""; filter_ = ""; + customSearchOperators_ = ""; } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @@ -1647,6 +1759,89 @@ public com.google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec getBoostS : boostSpec_; } + public static final int CUSTOM_SEARCH_OPERATORS_FIELD_NUMBER = 7; + + @SuppressWarnings("serial") + private volatile java.lang.Object customSearchOperators_ = ""; + + /** + * + * + *
            +     * Optional. Custom search operators which if specified will be used to
            +     * filter results from workspace data stores. For more information on custom
            +     * search operators, see
            +     * [SearchOperators](https://support.google.com/cloudsearch/answer/6172299).
            +     * 
            + * + * string custom_search_operators = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The customSearchOperators. + */ + @java.lang.Override + public java.lang.String getCustomSearchOperators() { + java.lang.Object ref = customSearchOperators_; + 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(); + customSearchOperators_ = s; + return s; + } + } + + /** + * + * + *
            +     * Optional. Custom search operators which if specified will be used to
            +     * filter results from workspace data stores. For more information on custom
            +     * search operators, see
            +     * [SearchOperators](https://support.google.com/cloudsearch/answer/6172299).
            +     * 
            + * + * string custom_search_operators = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for customSearchOperators. + */ + @java.lang.Override + public com.google.protobuf.ByteString getCustomSearchOperatorsBytes() { + java.lang.Object ref = customSearchOperators_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + customSearchOperators_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int NUM_RESULTS_FIELD_NUMBER = 9; + private int numResults_ = 0; + + /** + * + * + *
            +     * Optional. The maximum number of results to retrieve from this data store.
            +     * If not specified, it will use the
            +     * [SearchRequest.num_results_per_data_store][google.cloud.discoveryengine.v1beta.SearchRequest.num_results_per_data_store]
            +     * if provided, otherwise there is no limit. If both this field and
            +     * [SearchRequest.num_results_per_data_store][google.cloud.discoveryengine.v1beta.SearchRequest.num_results_per_data_store]
            +     * are specified, this field will be used.
            +     * 
            + * + * int32 num_results = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The numResults. + */ + @java.lang.Override + public int getNumResults() { + return numResults_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -1670,6 +1865,12 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(6, getBoostSpec()); } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(customSearchOperators_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 7, customSearchOperators_); + } + if (numResults_ != 0) { + output.writeInt32(9, numResults_); + } getUnknownFields().writeTo(output); } @@ -1688,6 +1889,12 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getBoostSpec()); } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(customSearchOperators_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(7, customSearchOperators_); + } + if (numResults_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(9, numResults_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -1710,6 +1917,8 @@ public boolean equals(final java.lang.Object obj) { if (hasBoostSpec()) { if (!getBoostSpec().equals(other.getBoostSpec())) return false; } + if (!getCustomSearchOperators().equals(other.getCustomSearchOperators())) return false; + if (getNumResults() != other.getNumResults()) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1729,6 +1938,10 @@ public int hashCode() { hash = (37 * hash) + BOOST_SPEC_FIELD_NUMBER; hash = (53 * hash) + getBoostSpec().hashCode(); } + hash = (37 * hash) + CUSTOM_SEARCH_OPERATORS_FIELD_NUMBER; + hash = (53 * hash) + getCustomSearchOperators().hashCode(); + hash = (37 * hash) + NUM_RESULTS_FIELD_NUMBER; + hash = (53 * hash) + getNumResults(); hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -1890,6 +2103,8 @@ public Builder clear() { boostSpecBuilder_.dispose(); boostSpecBuilder_ = null; } + customSearchOperators_ = ""; + numResults_ = 0; return this; } @@ -1940,6 +2155,12 @@ private void buildPartial0( result.boostSpec_ = boostSpecBuilder_ == null ? boostSpec_ : boostSpecBuilder_.build(); to_bitField0_ |= 0x00000001; } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.customSearchOperators_ = customSearchOperators_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.numResults_ = numResults_; + } result.bitField0_ |= to_bitField0_; } @@ -1972,6 +2193,14 @@ public Builder mergeFrom( if (other.hasBoostSpec()) { mergeBoostSpec(other.getBoostSpec()); } + if (!other.getCustomSearchOperators().isEmpty()) { + customSearchOperators_ = other.customSearchOperators_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (other.getNumResults() != 0) { + setNumResults(other.getNumResults()); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -2017,6 +2246,18 @@ public Builder mergeFrom( bitField0_ |= 0x00000004; break; } // case 50 + case 58: + { + customSearchOperators_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 58 + case 72: + { + numResults_ = input.readInt32(); + bitField0_ |= 0x00000010; + break; + } // case 72 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -2535,6 +2776,203 @@ public Builder clearBoostSpec() { return boostSpecBuilder_; } + private java.lang.Object customSearchOperators_ = ""; + + /** + * + * + *
            +       * Optional. Custom search operators which if specified will be used to
            +       * filter results from workspace data stores. For more information on custom
            +       * search operators, see
            +       * [SearchOperators](https://support.google.com/cloudsearch/answer/6172299).
            +       * 
            + * + * string custom_search_operators = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The customSearchOperators. + */ + public java.lang.String getCustomSearchOperators() { + java.lang.Object ref = customSearchOperators_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + customSearchOperators_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
            +       * Optional. Custom search operators which if specified will be used to
            +       * filter results from workspace data stores. For more information on custom
            +       * search operators, see
            +       * [SearchOperators](https://support.google.com/cloudsearch/answer/6172299).
            +       * 
            + * + * string custom_search_operators = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for customSearchOperators. + */ + public com.google.protobuf.ByteString getCustomSearchOperatorsBytes() { + java.lang.Object ref = customSearchOperators_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + customSearchOperators_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
            +       * Optional. Custom search operators which if specified will be used to
            +       * filter results from workspace data stores. For more information on custom
            +       * search operators, see
            +       * [SearchOperators](https://support.google.com/cloudsearch/answer/6172299).
            +       * 
            + * + * string custom_search_operators = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The customSearchOperators to set. + * @return This builder for chaining. + */ + public Builder setCustomSearchOperators(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + customSearchOperators_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
            +       * Optional. Custom search operators which if specified will be used to
            +       * filter results from workspace data stores. For more information on custom
            +       * search operators, see
            +       * [SearchOperators](https://support.google.com/cloudsearch/answer/6172299).
            +       * 
            + * + * string custom_search_operators = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearCustomSearchOperators() { + customSearchOperators_ = getDefaultInstance().getCustomSearchOperators(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + + /** + * + * + *
            +       * Optional. Custom search operators which if specified will be used to
            +       * filter results from workspace data stores. For more information on custom
            +       * search operators, see
            +       * [SearchOperators](https://support.google.com/cloudsearch/answer/6172299).
            +       * 
            + * + * string custom_search_operators = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for customSearchOperators to set. + * @return This builder for chaining. + */ + public Builder setCustomSearchOperatorsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + customSearchOperators_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private int numResults_; + + /** + * + * + *
            +       * Optional. The maximum number of results to retrieve from this data store.
            +       * If not specified, it will use the
            +       * [SearchRequest.num_results_per_data_store][google.cloud.discoveryengine.v1beta.SearchRequest.num_results_per_data_store]
            +       * if provided, otherwise there is no limit. If both this field and
            +       * [SearchRequest.num_results_per_data_store][google.cloud.discoveryengine.v1beta.SearchRequest.num_results_per_data_store]
            +       * are specified, this field will be used.
            +       * 
            + * + * int32 num_results = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The numResults. + */ + @java.lang.Override + public int getNumResults() { + return numResults_; + } + + /** + * + * + *
            +       * Optional. The maximum number of results to retrieve from this data store.
            +       * If not specified, it will use the
            +       * [SearchRequest.num_results_per_data_store][google.cloud.discoveryengine.v1beta.SearchRequest.num_results_per_data_store]
            +       * if provided, otherwise there is no limit. If both this field and
            +       * [SearchRequest.num_results_per_data_store][google.cloud.discoveryengine.v1beta.SearchRequest.num_results_per_data_store]
            +       * are specified, this field will be used.
            +       * 
            + * + * int32 num_results = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The numResults to set. + * @return This builder for chaining. + */ + public Builder setNumResults(int value) { + + numResults_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
            +       * Optional. The maximum number of results to retrieve from this data store.
            +       * If not specified, it will use the
            +       * [SearchRequest.num_results_per_data_store][google.cloud.discoveryengine.v1beta.SearchRequest.num_results_per_data_store]
            +       * if provided, otherwise there is no limit. If both this field and
            +       * [SearchRequest.num_results_per_data_store][google.cloud.discoveryengine.v1beta.SearchRequest.num_results_per_data_store]
            +       * are specified, this field will be used.
            +       * 
            + * + * int32 num_results = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearNumResults() { + bitField0_ = (bitField0_ & ~0x00000010); + numResults_ = 0; + onChanged(); + return this; + } + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec) } @@ -2665,7 +3103,6 @@ public interface FacetSpecOrBuilder *
                  * List of keys to exclude when faceting.
                  *
            -     *
                  * By default,
                  * [FacetKey.key][google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec.FacetKey.key]
                  * is not excluded from the filter unless it is listed in this field.
            @@ -2705,7 +3142,6 @@ public interface FacetSpecOrBuilder
                  * 
                  * List of keys to exclude when faceting.
                  *
            -     *
                  * By default,
                  * [FacetKey.key][google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec.FacetKey.key]
                  * is not excluded from the filter unless it is listed in this field.
            @@ -2745,7 +3181,6 @@ public interface FacetSpecOrBuilder
                  * 
                  * List of keys to exclude when faceting.
                  *
            -     *
                  * By default,
                  * [FacetKey.key][google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec.FacetKey.key]
                  * is not excluded from the filter unless it is listed in this field.
            @@ -2786,7 +3221,6 @@ public interface FacetSpecOrBuilder
                  * 
                  * List of keys to exclude when faceting.
                  *
            -     *
                  * By default,
                  * [FacetKey.key][google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec.FacetKey.key]
                  * is not excluded from the filter unless it is listed in this field.
            @@ -6033,7 +6467,6 @@ public int getLimit() {
                  * 
                  * List of keys to exclude when faceting.
                  *
            -     *
                  * By default,
                  * [FacetKey.key][google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec.FacetKey.key]
                  * is not excluded from the filter unless it is listed in this field.
            @@ -6075,7 +6508,6 @@ public com.google.protobuf.ProtocolStringList getExcludedFilterKeysList() {
                  * 
                  * List of keys to exclude when faceting.
                  *
            -     *
                  * By default,
                  * [FacetKey.key][google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec.FacetKey.key]
                  * is not excluded from the filter unless it is listed in this field.
            @@ -6117,7 +6549,6 @@ public int getExcludedFilterKeysCount() {
                  * 
                  * List of keys to exclude when faceting.
                  *
            -     *
                  * By default,
                  * [FacetKey.key][google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec.FacetKey.key]
                  * is not excluded from the filter unless it is listed in this field.
            @@ -6160,7 +6591,6 @@ public java.lang.String getExcludedFilterKeys(int index) {
                  * 
                  * List of keys to exclude when faceting.
                  *
            -     *
                  * By default,
                  * [FacetKey.key][google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec.FacetKey.key]
                  * is not excluded from the filter unless it is listed in this field.
            @@ -6978,7 +7408,6 @@ private void ensureExcludedFilterKeysIsMutable() {
                    * 
                    * List of keys to exclude when faceting.
                    *
            -       *
                    * By default,
                    * [FacetKey.key][google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec.FacetKey.key]
                    * is not excluded from the filter unless it is listed in this field.
            @@ -7021,7 +7450,6 @@ public com.google.protobuf.ProtocolStringList getExcludedFilterKeysList() {
                    * 
                    * List of keys to exclude when faceting.
                    *
            -       *
                    * By default,
                    * [FacetKey.key][google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec.FacetKey.key]
                    * is not excluded from the filter unless it is listed in this field.
            @@ -7063,7 +7491,6 @@ public int getExcludedFilterKeysCount() {
                    * 
                    * List of keys to exclude when faceting.
                    *
            -       *
                    * By default,
                    * [FacetKey.key][google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec.FacetKey.key]
                    * is not excluded from the filter unless it is listed in this field.
            @@ -7106,7 +7533,6 @@ public java.lang.String getExcludedFilterKeys(int index) {
                    * 
                    * List of keys to exclude when faceting.
                    *
            -       *
                    * By default,
                    * [FacetKey.key][google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec.FacetKey.key]
                    * is not excluded from the filter unless it is listed in this field.
            @@ -7149,7 +7575,6 @@ public com.google.protobuf.ByteString getExcludedFilterKeysBytes(int index) {
                    * 
                    * List of keys to exclude when faceting.
                    *
            -       *
                    * By default,
                    * [FacetKey.key][google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec.FacetKey.key]
                    * is not excluded from the filter unless it is listed in this field.
            @@ -7200,7 +7625,6 @@ public Builder setExcludedFilterKeys(int index, java.lang.String value) {
                    * 
                    * List of keys to exclude when faceting.
                    *
            -       *
                    * By default,
                    * [FacetKey.key][google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec.FacetKey.key]
                    * is not excluded from the filter unless it is listed in this field.
            @@ -7250,7 +7674,6 @@ public Builder addExcludedFilterKeys(java.lang.String value) {
                    * 
                    * List of keys to exclude when faceting.
                    *
            -       *
                    * By default,
                    * [FacetKey.key][google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec.FacetKey.key]
                    * is not excluded from the filter unless it is listed in this field.
            @@ -7297,7 +7720,6 @@ public Builder addAllExcludedFilterKeys(java.lang.Iterable val
                    * 
                    * List of keys to exclude when faceting.
                    *
            -       *
                    * By default,
                    * [FacetKey.key][google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec.FacetKey.key]
                    * is not excluded from the filter unless it is listed in this field.
            @@ -7343,7 +7765,6 @@ public Builder clearExcludedFilterKeys() {
                    * 
                    * List of keys to exclude when faceting.
                    *
            -       *
                    * By default,
                    * [FacetKey.key][google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec.FacetKey.key]
                    * is not excluded from the filter unless it is listed in this field.
            @@ -7590,7 +8011,7 @@ public interface BoostSpecOrBuilder
                  *
                  * 
                  * Condition boost specifications. If a document matches multiple conditions
            -     * in the specifictions, boost scores from these specifications are all
            +     * in the specifications, boost scores from these specifications are all
                  * applied and combined in a non-linear way. Maximum number of
                  * specifications is 20.
                  * 
            @@ -7608,7 +8029,7 @@ public interface BoostSpecOrBuilder * *
                  * Condition boost specifications. If a document matches multiple conditions
            -     * in the specifictions, boost scores from these specifications are all
            +     * in the specifications, boost scores from these specifications are all
                  * applied and combined in a non-linear way. Maximum number of
                  * specifications is 20.
                  * 
            @@ -7625,7 +8046,7 @@ public interface BoostSpecOrBuilder * *
                  * Condition boost specifications. If a document matches multiple conditions
            -     * in the specifictions, boost scores from these specifications are all
            +     * in the specifications, boost scores from these specifications are all
                  * applied and combined in a non-linear way. Maximum number of
                  * specifications is 20.
                  * 
            @@ -7641,7 +8062,7 @@ public interface BoostSpecOrBuilder * *
                  * Condition boost specifications. If a document matches multiple conditions
            -     * in the specifictions, boost scores from these specifications are all
            +     * in the specifications, boost scores from these specifications are all
                  * applied and combined in a non-linear way. Maximum number of
                  * specifications is 20.
                  * 
            @@ -7661,7 +8082,7 @@ public interface BoostSpecOrBuilder * *
                  * Condition boost specifications. If a document matches multiple conditions
            -     * in the specifictions, boost scores from these specifications are all
            +     * in the specifications, boost scores from these specifications are all
                  * applied and combined in a non-linear way. Maximum number of
                  * specifications is 20.
                  * 
            @@ -12273,7 +12694,7 @@ public com.google.protobuf.Parser getParserForType() { * *
                  * Condition boost specifications. If a document matches multiple conditions
            -     * in the specifictions, boost scores from these specifications are all
            +     * in the specifications, boost scores from these specifications are all
                  * applied and combined in a non-linear way. Maximum number of
                  * specifications is 20.
                  * 
            @@ -12294,7 +12715,7 @@ public com.google.protobuf.Parser getParserForType() { * *
                  * Condition boost specifications. If a document matches multiple conditions
            -     * in the specifictions, boost scores from these specifications are all
            +     * in the specifications, boost scores from these specifications are all
                  * applied and combined in a non-linear way. Maximum number of
                  * specifications is 20.
                  * 
            @@ -12317,7 +12738,7 @@ public com.google.protobuf.Parser getParserForType() { * *
                  * Condition boost specifications. If a document matches multiple conditions
            -     * in the specifictions, boost scores from these specifications are all
            +     * in the specifications, boost scores from these specifications are all
                  * applied and combined in a non-linear way. Maximum number of
                  * specifications is 20.
                  * 
            @@ -12336,7 +12757,7 @@ public int getConditionBoostSpecsCount() { * *
                  * Condition boost specifications. If a document matches multiple conditions
            -     * in the specifictions, boost scores from these specifications are all
            +     * in the specifications, boost scores from these specifications are all
                  * applied and combined in a non-linear way. Maximum number of
                  * specifications is 20.
                  * 
            @@ -12356,7 +12777,7 @@ public int getConditionBoostSpecsCount() { * *
                  * Condition boost specifications. If a document matches multiple conditions
            -     * in the specifictions, boost scores from these specifications are all
            +     * in the specifications, boost scores from these specifications are all
                  * applied and combined in a non-linear way. Maximum number of
                  * specifications is 20.
                  * 
            @@ -12769,7 +13190,7 @@ private void ensureConditionBoostSpecsIsMutable() { * *
                    * Condition boost specifications. If a document matches multiple conditions
            -       * in the specifictions, boost scores from these specifications are all
            +       * in the specifications, boost scores from these specifications are all
                    * applied and combined in a non-linear way. Maximum number of
                    * specifications is 20.
                    * 
            @@ -12793,7 +13214,7 @@ private void ensureConditionBoostSpecsIsMutable() { * *
                    * Condition boost specifications. If a document matches multiple conditions
            -       * in the specifictions, boost scores from these specifications are all
            +       * in the specifications, boost scores from these specifications are all
                    * applied and combined in a non-linear way. Maximum number of
                    * specifications is 20.
                    * 
            @@ -12815,7 +13236,7 @@ public int getConditionBoostSpecsCount() { * *
                    * Condition boost specifications. If a document matches multiple conditions
            -       * in the specifictions, boost scores from these specifications are all
            +       * in the specifications, boost scores from these specifications are all
                    * applied and combined in a non-linear way. Maximum number of
                    * specifications is 20.
                    * 
            @@ -12838,7 +13259,7 @@ public int getConditionBoostSpecsCount() { * *
                    * Condition boost specifications. If a document matches multiple conditions
            -       * in the specifictions, boost scores from these specifications are all
            +       * in the specifications, boost scores from these specifications are all
                    * applied and combined in a non-linear way. Maximum number of
                    * specifications is 20.
                    * 
            @@ -12869,7 +13290,7 @@ public Builder setConditionBoostSpecs( * *
                    * Condition boost specifications. If a document matches multiple conditions
            -       * in the specifictions, boost scores from these specifications are all
            +       * in the specifications, boost scores from these specifications are all
                    * applied and combined in a non-linear way. Maximum number of
                    * specifications is 20.
                    * 
            @@ -12897,7 +13318,7 @@ public Builder setConditionBoostSpecs( * *
                    * Condition boost specifications. If a document matches multiple conditions
            -       * in the specifictions, boost scores from these specifications are all
            +       * in the specifications, boost scores from these specifications are all
                    * applied and combined in a non-linear way. Maximum number of
                    * specifications is 20.
                    * 
            @@ -12927,7 +13348,7 @@ public Builder addConditionBoostSpecs( * *
                    * Condition boost specifications. If a document matches multiple conditions
            -       * in the specifictions, boost scores from these specifications are all
            +       * in the specifications, boost scores from these specifications are all
                    * applied and combined in a non-linear way. Maximum number of
                    * specifications is 20.
                    * 
            @@ -12958,7 +13379,7 @@ public Builder addConditionBoostSpecs( * *
                    * Condition boost specifications. If a document matches multiple conditions
            -       * in the specifictions, boost scores from these specifications are all
            +       * in the specifications, boost scores from these specifications are all
                    * applied and combined in a non-linear way. Maximum number of
                    * specifications is 20.
                    * 
            @@ -12985,7 +13406,7 @@ public Builder addConditionBoostSpecs( * *
                    * Condition boost specifications. If a document matches multiple conditions
            -       * in the specifictions, boost scores from these specifications are all
            +       * in the specifications, boost scores from these specifications are all
                    * applied and combined in a non-linear way. Maximum number of
                    * specifications is 20.
                    * 
            @@ -13013,7 +13434,7 @@ public Builder addConditionBoostSpecs( * *
                    * Condition boost specifications. If a document matches multiple conditions
            -       * in the specifictions, boost scores from these specifications are all
            +       * in the specifications, boost scores from these specifications are all
                    * applied and combined in a non-linear way. Maximum number of
                    * specifications is 20.
                    * 
            @@ -13043,7 +13464,7 @@ public Builder addAllConditionBoostSpecs( * *
                    * Condition boost specifications. If a document matches multiple conditions
            -       * in the specifictions, boost scores from these specifications are all
            +       * in the specifications, boost scores from these specifications are all
                    * applied and combined in a non-linear way. Maximum number of
                    * specifications is 20.
                    * 
            @@ -13068,7 +13489,7 @@ public Builder clearConditionBoostSpecs() { * *
                    * Condition boost specifications. If a document matches multiple conditions
            -       * in the specifictions, boost scores from these specifications are all
            +       * in the specifications, boost scores from these specifications are all
                    * applied and combined in a non-linear way. Maximum number of
                    * specifications is 20.
                    * 
            @@ -13093,7 +13514,7 @@ public Builder removeConditionBoostSpecs(int index) { * *
                    * Condition boost specifications. If a document matches multiple conditions
            -       * in the specifictions, boost scores from these specifications are all
            +       * in the specifications, boost scores from these specifications are all
                    * applied and combined in a non-linear way. Maximum number of
                    * specifications is 20.
                    * 
            @@ -13113,7 +13534,7 @@ public Builder removeConditionBoostSpecs(int index) { * *
                    * Condition boost specifications. If a document matches multiple conditions
            -       * in the specifictions, boost scores from these specifications are all
            +       * in the specifications, boost scores from these specifications are all
                    * applied and combined in a non-linear way. Maximum number of
                    * specifications is 20.
                    * 
            @@ -13137,7 +13558,7 @@ public Builder removeConditionBoostSpecs(int index) { * *
                    * Condition boost specifications. If a document matches multiple conditions
            -       * in the specifictions, boost scores from these specifications are all
            +       * in the specifications, boost scores from these specifications are all
                    * applied and combined in a non-linear way. Maximum number of
                    * specifications is 20.
                    * 
            @@ -13163,7 +13584,7 @@ public Builder removeConditionBoostSpecs(int index) { * *
                    * Condition boost specifications. If a document matches multiple conditions
            -       * in the specifictions, boost scores from these specifications are all
            +       * in the specifications, boost scores from these specifications are all
                    * applied and combined in a non-linear way. Maximum number of
                    * specifications is 20.
                    * 
            @@ -13186,7 +13607,7 @@ public Builder removeConditionBoostSpecs(int index) { * *
                    * Condition boost specifications. If a document matches multiple conditions
            -       * in the specifictions, boost scores from these specifications are all
            +       * in the specifications, boost scores from these specifications are all
                    * applied and combined in a non-linear way. Maximum number of
                    * specifications is 20.
                    * 
            @@ -13210,7 +13631,7 @@ public Builder removeConditionBoostSpecs(int index) { * *
                    * Condition boost specifications. If a document matches multiple conditions
            -       * in the specifictions, boost scores from these specifications are all
            +       * in the specifications, boost scores from these specifications are all
                    * applied and combined in a non-linear way. Maximum number of
                    * specifications is 20.
                    * 
            @@ -15406,7 +15827,8 @@ public enum SearchResultMode implements com.google.protobuf.ProtocolMessageEnum * *
                    * Returns chunks in the search result. Only available if the
            -       * [DataStore.DocumentProcessingConfig.chunking_config][] is specified.
            +       * [DocumentProcessingConfig.chunking_config][google.cloud.discoveryengine.v1beta.DocumentProcessingConfig.chunking_config]
            +       * is specified.
                    * 
            * * CHUNKS = 2; @@ -15452,7 +15874,8 @@ public enum SearchResultMode implements com.google.protobuf.ProtocolMessageEnum * *
                    * Returns chunks in the search result. Only available if the
            -       * [DataStore.DocumentProcessingConfig.chunking_config][] is specified.
            +       * [DocumentProcessingConfig.chunking_config][google.cloud.discoveryengine.v1beta.DocumentProcessingConfig.chunking_config]
            +       * is specified.
                    * 
            * * CHUNKS = 2; @@ -15566,7 +15989,7 @@ public interface SnippetSpecOrBuilder * * @deprecated * google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SnippetSpec.max_snippet_count - * is deprecated. See google/cloud/discoveryengine/v1beta/search_service.proto;l=446 + * is deprecated. See google/cloud/discoveryengine/v1beta/search_service.proto;l=462 * @return The maxSnippetCount. */ @java.lang.Deprecated @@ -15584,7 +16007,7 @@ public interface SnippetSpecOrBuilder * * @deprecated * google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SnippetSpec.reference_only - * is deprecated. See google/cloud/discoveryengine/v1beta/search_service.proto;l=450 + * is deprecated. See google/cloud/discoveryengine/v1beta/search_service.proto;l=466 * @return The referenceOnly. */ @java.lang.Deprecated @@ -15672,7 +16095,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * @deprecated * google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SnippetSpec.max_snippet_count - * is deprecated. See google/cloud/discoveryengine/v1beta/search_service.proto;l=446 + * is deprecated. See google/cloud/discoveryengine/v1beta/search_service.proto;l=462 * @return The maxSnippetCount. */ @java.lang.Override @@ -15696,7 +16119,7 @@ public int getMaxSnippetCount() { * * @deprecated * google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SnippetSpec.reference_only - * is deprecated. See google/cloud/discoveryengine/v1beta/search_service.proto;l=450 + * is deprecated. See google/cloud/discoveryengine/v1beta/search_service.proto;l=466 * @return The referenceOnly. */ @java.lang.Override @@ -16142,7 +16565,7 @@ public Builder mergeFrom( * * @deprecated * google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SnippetSpec.max_snippet_count - * is deprecated. See google/cloud/discoveryengine/v1beta/search_service.proto;l=446 + * is deprecated. See google/cloud/discoveryengine/v1beta/search_service.proto;l=462 * @return The maxSnippetCount. */ @java.lang.Override @@ -16164,7 +16587,7 @@ public int getMaxSnippetCount() { * * @deprecated * google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SnippetSpec.max_snippet_count - * is deprecated. See google/cloud/discoveryengine/v1beta/search_service.proto;l=446 + * is deprecated. See google/cloud/discoveryengine/v1beta/search_service.proto;l=462 * @param value The maxSnippetCount to set. * @return This builder for chaining. */ @@ -16190,7 +16613,7 @@ public Builder setMaxSnippetCount(int value) { * * @deprecated * google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SnippetSpec.max_snippet_count - * is deprecated. See google/cloud/discoveryengine/v1beta/search_service.proto;l=446 + * is deprecated. See google/cloud/discoveryengine/v1beta/search_service.proto;l=462 * @return This builder for chaining. */ @java.lang.Deprecated @@ -16215,7 +16638,7 @@ public Builder clearMaxSnippetCount() { * * @deprecated * google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SnippetSpec.reference_only - * is deprecated. See google/cloud/discoveryengine/v1beta/search_service.proto;l=450 + * is deprecated. See google/cloud/discoveryengine/v1beta/search_service.proto;l=466 * @return The referenceOnly. */ @java.lang.Override @@ -16236,7 +16659,7 @@ public boolean getReferenceOnly() { * * @deprecated * google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SnippetSpec.reference_only - * is deprecated. See google/cloud/discoveryengine/v1beta/search_service.proto;l=450 + * is deprecated. See google/cloud/discoveryengine/v1beta/search_service.proto;l=466 * @param value The referenceOnly to set. * @return This builder for chaining. */ @@ -16261,7 +16684,7 @@ public Builder setReferenceOnly(boolean value) { * * @deprecated * google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SnippetSpec.reference_only - * is deprecated. See google/cloud/discoveryengine/v1beta/search_service.proto;l=450 + * is deprecated. See google/cloud/discoveryengine/v1beta/search_service.proto;l=466 * @return This builder for chaining. */ @java.lang.Deprecated @@ -16535,6 +16958,53 @@ public interface SummarySpecOrBuilder */ boolean getIgnoreJailBreakingQuery(); + /** + * + * + *
            +       * Optional. Multimodal specification.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec.MultiModalSpec multimodal_spec = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the multimodalSpec field is set. + */ + boolean hasMultimodalSpec(); + + /** + * + * + *
            +       * Optional. Multimodal specification.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec.MultiModalSpec multimodal_spec = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The multimodalSpec. + */ + com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec + .MultiModalSpec + getMultimodalSpec(); + + /** + * + * + *
            +       * Optional. Multimodal specification.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec.MultiModalSpec multimodal_spec = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec + .MultiModalSpecOrBuilder + getMultimodalSpecOrBuilder(); + /** * * @@ -16736,54 +17206,60 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { .Builder.class); } - public interface ModelPromptSpecOrBuilder + public interface MultiModalSpecOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec.ModelPromptSpec) + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec.MultiModalSpec) com.google.protobuf.MessageOrBuilder { /** * * *
            -         * Text at the beginning of the prompt that instructs the assistant.
            -         * Examples are available in the user guide.
            +         * Optional. Source of image returned in the answer.
                      * 
            * - * string preamble = 1; + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec.MultiModalSpec.ImageSource image_source = 3 [(.google.api.field_behavior) = OPTIONAL]; + * * - * @return The preamble. + * @return The enum numeric value on the wire for imageSource. */ - java.lang.String getPreamble(); + int getImageSourceValue(); /** * * *
            -         * Text at the beginning of the prompt that instructs the assistant.
            -         * Examples are available in the user guide.
            +         * Optional. Source of image returned in the answer.
                      * 
            * - * string preamble = 1; + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec.MultiModalSpec.ImageSource image_source = 3 [(.google.api.field_behavior) = OPTIONAL]; + * * - * @return The bytes for preamble. + * @return The imageSource. */ - com.google.protobuf.ByteString getPreambleBytes(); + com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec + .MultiModalSpec.ImageSource + getImageSource(); } /** * * *
            -       * Specification of the prompt to use with the model.
            +       * Multimodal specification: Will return an image from specified source.
            +       * If multiple sources are specified, the pick is a quality based
            +       * decision.
                    * 
            * * Protobuf type {@code - * google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec.ModelPromptSpec} + * google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec.MultiModalSpec} */ - public static final class ModelPromptSpec extends com.google.protobuf.GeneratedMessage + public static final class MultiModalSpec extends com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec.ModelPromptSpec) - ModelPromptSpecOrBuilder { + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec.MultiModalSpec) + MultiModalSpecOrBuilder { private static final long serialVersionUID = 0L; static { @@ -16793,88 +17269,286 @@ public static final class ModelPromptSpec extends com.google.protobuf.GeneratedM /* minor= */ 33, /* patch= */ 2, /* suffix= */ "", - "ModelPromptSpec"); + "MultiModalSpec"); } - // Use ModelPromptSpec.newBuilder() to construct. - private ModelPromptSpec(com.google.protobuf.GeneratedMessage.Builder builder) { + // Use MultiModalSpec.newBuilder() to construct. + private MultiModalSpec(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } - private ModelPromptSpec() { - preamble_ = ""; + private MultiModalSpec() { + imageSource_ = 0; } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.discoveryengine.v1beta.SearchServiceProto - .internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_ContentSearchSpec_SummarySpec_ModelPromptSpec_descriptor; + .internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_ContentSearchSpec_SummarySpec_MultiModalSpec_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.discoveryengine.v1beta.SearchServiceProto - .internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_ContentSearchSpec_SummarySpec_ModelPromptSpec_fieldAccessorTable + .internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_ContentSearchSpec_SummarySpec_MultiModalSpec_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec - .SummarySpec.ModelPromptSpec.class, + .SummarySpec.MultiModalSpec.class, com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec - .SummarySpec.ModelPromptSpec.Builder.class); + .SummarySpec.MultiModalSpec.Builder.class); } - public static final int PREAMBLE_FIELD_NUMBER = 1; + /** + * + * + *
            +         * Specifies the image source.
            +         * 
            + * + * Protobuf enum {@code + * google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec.MultiModalSpec.ImageSource} + */ + public enum ImageSource implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
            +           * Unspecified image source (multimodal feature is disabled by
            +           * default).
            +           * 
            + * + * IMAGE_SOURCE_UNSPECIFIED = 0; + */ + IMAGE_SOURCE_UNSPECIFIED(0), + /** + * + * + *
            +           * Behavior when service determines the pick from all available
            +           * sources.
            +           * 
            + * + * ALL_AVAILABLE_SOURCES = 1; + */ + ALL_AVAILABLE_SOURCES(1), + /** + * + * + *
            +           * Includes image from corpus in the answer.
            +           * 
            + * + * CORPUS_IMAGE_ONLY = 2; + */ + CORPUS_IMAGE_ONLY(2), + /** + * + * + *
            +           * Triggers figure generation in the answer.
            +           * 
            + * + * FIGURE_GENERATION_ONLY = 3; + */ + FIGURE_GENERATION_ONLY(3), + UNRECOGNIZED(-1), + ; - @SuppressWarnings("serial") - private volatile java.lang.Object preamble_ = ""; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ImageSource"); + } + + /** + * + * + *
            +           * Unspecified image source (multimodal feature is disabled by
            +           * default).
            +           * 
            + * + * IMAGE_SOURCE_UNSPECIFIED = 0; + */ + public static final int IMAGE_SOURCE_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
            +           * Behavior when service determines the pick from all available
            +           * sources.
            +           * 
            + * + * ALL_AVAILABLE_SOURCES = 1; + */ + public static final int ALL_AVAILABLE_SOURCES_VALUE = 1; + + /** + * + * + *
            +           * Includes image from corpus in the answer.
            +           * 
            + * + * CORPUS_IMAGE_ONLY = 2; + */ + public static final int CORPUS_IMAGE_ONLY_VALUE = 2; + + /** + * + * + *
            +           * Triggers figure generation in the answer.
            +           * 
            + * + * FIGURE_GENERATION_ONLY = 3; + */ + public static final int FIGURE_GENERATION_ONLY_VALUE = 3; + + 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 ImageSource 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 ImageSource forNumber(int value) { + switch (value) { + case 0: + return IMAGE_SOURCE_UNSPECIFIED; + case 1: + return ALL_AVAILABLE_SOURCES; + case 2: + return CORPUS_IMAGE_ONLY; + case 3: + return FIGURE_GENERATION_ONLY; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap + internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public ImageSource findValueByNumber(int number) { + return ImageSource.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec + .SummarySpec.MultiModalSpec.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final ImageSource[] VALUES = values(); + + public static ImageSource valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private ImageSource(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec.MultiModalSpec.ImageSource) + } + + public static final int IMAGE_SOURCE_FIELD_NUMBER = 3; + private int imageSource_ = 0; /** * * *
            -         * Text at the beginning of the prompt that instructs the assistant.
            -         * Examples are available in the user guide.
            +         * Optional. Source of image returned in the answer.
                      * 
            * - * string preamble = 1; + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec.MultiModalSpec.ImageSource image_source = 3 [(.google.api.field_behavior) = OPTIONAL]; + * * - * @return The preamble. + * @return The enum numeric value on the wire for imageSource. */ @java.lang.Override - public java.lang.String getPreamble() { - java.lang.Object ref = preamble_; - 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(); - preamble_ = s; - return s; - } + public int getImageSourceValue() { + return imageSource_; } /** * * *
            -         * Text at the beginning of the prompt that instructs the assistant.
            -         * Examples are available in the user guide.
            +         * Optional. Source of image returned in the answer.
                      * 
            * - * string preamble = 1; + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec.MultiModalSpec.ImageSource image_source = 3 [(.google.api.field_behavior) = OPTIONAL]; + * * - * @return The bytes for preamble. + * @return The imageSource. */ @java.lang.Override - public com.google.protobuf.ByteString getPreambleBytes() { - java.lang.Object ref = preamble_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - preamble_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } + public com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec + .MultiModalSpec.ImageSource + getImageSource() { + com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec + .MultiModalSpec.ImageSource + result = + com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec + .SummarySpec.MultiModalSpec.ImageSource.forNumber(imageSource_); + return result == null + ? com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec + .MultiModalSpec.ImageSource.UNRECOGNIZED + : result; } private byte memoizedIsInitialized = -1; @@ -16892,8 +17566,11 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(preamble_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, preamble_); + if (imageSource_ + != com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec + .MultiModalSpec.ImageSource.IMAGE_SOURCE_UNSPECIFIED + .getNumber()) { + output.writeEnum(3, imageSource_); } getUnknownFields().writeTo(output); } @@ -16904,8 +17581,11 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(preamble_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, preamble_); + if (imageSource_ + != com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec + .MultiModalSpec.ImageSource.IMAGE_SOURCE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(3, imageSource_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -16920,17 +17600,17 @@ public boolean equals(final java.lang.Object obj) { if (!(obj instanceof com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec - .ModelPromptSpec)) { + .MultiModalSpec)) { return super.equals(obj); } com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec - .ModelPromptSpec + .MultiModalSpec other = (com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec - .SummarySpec.ModelPromptSpec) + .SummarySpec.MultiModalSpec) obj; - if (!getPreamble().equals(other.getPreamble())) return false; + if (imageSource_ != other.imageSource_) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -16942,22 +17622,22 @@ public int hashCode() { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + PREAMBLE_FIELD_NUMBER; - hash = (53 * hash) + getPreamble().hashCode(); + hash = (37 * hash) + IMAGE_SOURCE_FIELD_NUMBER; + hash = (53 * hash) + imageSource_; hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } public static com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec - .SummarySpec.ModelPromptSpec + .SummarySpec.MultiModalSpec parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec - .SummarySpec.ModelPromptSpec + .SummarySpec.MultiModalSpec parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) @@ -16966,14 +17646,14 @@ public int hashCode() { } public static com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec - .SummarySpec.ModelPromptSpec + .SummarySpec.MultiModalSpec parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec - .SummarySpec.ModelPromptSpec + .SummarySpec.MultiModalSpec parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) @@ -16982,26 +17662,26 @@ public int hashCode() { } public static com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec - .SummarySpec.ModelPromptSpec + .SummarySpec.MultiModalSpec parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec - .SummarySpec.ModelPromptSpec + .SummarySpec.MultiModalSpec parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec - .SummarySpec.ModelPromptSpec + .SummarySpec.MultiModalSpec parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec - .SummarySpec.ModelPromptSpec + .SummarySpec.MultiModalSpec parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) @@ -17011,13 +17691,13 @@ public int hashCode() { } public static com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec - .SummarySpec.ModelPromptSpec + .SummarySpec.MultiModalSpec parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec - .SummarySpec.ModelPromptSpec + .SummarySpec.MultiModalSpec parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) @@ -17027,13 +17707,13 @@ public int hashCode() { } public static com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec - .SummarySpec.ModelPromptSpec + .SummarySpec.MultiModalSpec parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec - .SummarySpec.ModelPromptSpec + .SummarySpec.MultiModalSpec parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) @@ -17053,7 +17733,7 @@ public static Builder newBuilder() { public static Builder newBuilder( com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec - .ModelPromptSpec + .MultiModalSpec prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @@ -17074,37 +17754,39 @@ protected Builder newBuilderForType( * * *
            -         * Specification of the prompt to use with the model.
            +         * Multimodal specification: Will return an image from specified source.
            +         * If multiple sources are specified, the pick is a quality based
            +         * decision.
                      * 
            * * Protobuf type {@code - * google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec.ModelPromptSpec} + * google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec.MultiModalSpec} */ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec.ModelPromptSpec) + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec.MultiModalSpec) com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec - .ModelPromptSpecOrBuilder { + .MultiModalSpecOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.discoveryengine.v1beta.SearchServiceProto - .internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_ContentSearchSpec_SummarySpec_ModelPromptSpec_descriptor; + .internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_ContentSearchSpec_SummarySpec_MultiModalSpec_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.discoveryengine.v1beta.SearchServiceProto - .internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_ContentSearchSpec_SummarySpec_ModelPromptSpec_fieldAccessorTable + .internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_ContentSearchSpec_SummarySpec_MultiModalSpec_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec - .SummarySpec.ModelPromptSpec.class, + .SummarySpec.MultiModalSpec.class, com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec - .SummarySpec.ModelPromptSpec.Builder.class); + .SummarySpec.MultiModalSpec.Builder.class); } // Construct using - // com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec.ModelPromptSpec.newBuilder() + // com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec.MultiModalSpec.newBuilder() private Builder() {} private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { @@ -17115,30 +17797,30 @@ private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { public Builder clear() { super.clear(); bitField0_ = 0; - preamble_ = ""; + imageSource_ = 0; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.cloud.discoveryengine.v1beta.SearchServiceProto - .internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_ContentSearchSpec_SummarySpec_ModelPromptSpec_descriptor; + .internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_ContentSearchSpec_SummarySpec_MultiModalSpec_descriptor; } @java.lang.Override public com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec - .ModelPromptSpec + .MultiModalSpec getDefaultInstanceForType() { return com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec - .SummarySpec.ModelPromptSpec.getDefaultInstance(); + .SummarySpec.MultiModalSpec.getDefaultInstance(); } @java.lang.Override public com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec - .ModelPromptSpec + .MultiModalSpec build() { com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec - .ModelPromptSpec + .MultiModalSpec result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); @@ -17148,13 +17830,13 @@ public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { @java.lang.Override public com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec - .ModelPromptSpec + .MultiModalSpec buildPartial() { com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec - .ModelPromptSpec + .MultiModalSpec result = new com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec - .SummarySpec.ModelPromptSpec(this); + .SummarySpec.MultiModalSpec(this); if (bitField0_ != 0) { buildPartial0(result); } @@ -17164,11 +17846,11 @@ public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { private void buildPartial0( com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec - .ModelPromptSpec + .MultiModalSpec result) { int from_bitField0_ = bitField0_; if (((from_bitField0_ & 0x00000001) != 0)) { - result.preamble_ = preamble_; + result.imageSource_ = imageSource_; } } @@ -17177,10 +17859,10 @@ public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec - .ModelPromptSpec) { + .MultiModalSpec) { return mergeFrom( (com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec - .SummarySpec.ModelPromptSpec) + .SummarySpec.MultiModalSpec) other); } else { super.mergeFrom(other); @@ -17190,15 +17872,13 @@ public Builder mergeFrom(com.google.protobuf.Message other) { public Builder mergeFrom( com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec - .ModelPromptSpec + .MultiModalSpec other) { if (other == com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec - .SummarySpec.ModelPromptSpec.getDefaultInstance()) return this; - if (!other.getPreamble().isEmpty()) { - preamble_ = other.preamble_; - bitField0_ |= 0x00000001; - onChanged(); + .SummarySpec.MultiModalSpec.getDefaultInstance()) return this; + if (other.imageSource_ != 0) { + setImageSourceValue(other.getImageSourceValue()); } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); @@ -17226,12 +17906,12 @@ public Builder mergeFrom( case 0: done = true; break; - case 10: + case 24: { - preamble_ = input.readStringRequireUtf8(); + imageSource_ = input.readEnum(); bitField0_ |= 0x00000001; break; - } // case 10 + } // case 24 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -17251,94 +17931,98 @@ public Builder mergeFrom( private int bitField0_; - private java.lang.Object preamble_ = ""; + private int imageSource_ = 0; /** * * *
            -           * Text at the beginning of the prompt that instructs the assistant.
            -           * Examples are available in the user guide.
            +           * Optional. Source of image returned in the answer.
                        * 
            * - * string preamble = 1; + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec.MultiModalSpec.ImageSource image_source = 3 [(.google.api.field_behavior) = OPTIONAL]; + * * - * @return The preamble. + * @return The enum numeric value on the wire for imageSource. */ - public java.lang.String getPreamble() { - java.lang.Object ref = preamble_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - preamble_ = s; - return s; - } else { - return (java.lang.String) ref; - } + @java.lang.Override + public int getImageSourceValue() { + return imageSource_; } /** * * *
            -           * Text at the beginning of the prompt that instructs the assistant.
            -           * Examples are available in the user guide.
            +           * Optional. Source of image returned in the answer.
                        * 
            * - * string preamble = 1; + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec.MultiModalSpec.ImageSource image_source = 3 [(.google.api.field_behavior) = OPTIONAL]; + * * - * @return The bytes for preamble. + * @param value The enum numeric value on the wire for imageSource to set. + * @return This builder for chaining. */ - public com.google.protobuf.ByteString getPreambleBytes() { - java.lang.Object ref = preamble_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - preamble_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } + public Builder setImageSourceValue(int value) { + imageSource_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; } /** * * *
            -           * Text at the beginning of the prompt that instructs the assistant.
            -           * Examples are available in the user guide.
            +           * Optional. Source of image returned in the answer.
                        * 
            * - * string preamble = 1; + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec.MultiModalSpec.ImageSource image_source = 3 [(.google.api.field_behavior) = OPTIONAL]; + * * - * @param value The preamble to set. - * @return This builder for chaining. + * @return The imageSource. */ - public Builder setPreamble(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - preamble_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec + .MultiModalSpec.ImageSource + getImageSource() { + com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec + .MultiModalSpec.ImageSource + result = + com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec + .SummarySpec.MultiModalSpec.ImageSource.forNumber(imageSource_); + return result == null + ? com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec + .SummarySpec.MultiModalSpec.ImageSource.UNRECOGNIZED + : result; } /** * * *
            -           * Text at the beginning of the prompt that instructs the assistant.
            -           * Examples are available in the user guide.
            +           * Optional. Source of image returned in the answer.
                        * 
            * - * string preamble = 1; + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec.MultiModalSpec.ImageSource image_source = 3 [(.google.api.field_behavior) = OPTIONAL]; + * * + * @param value The imageSource to set. * @return This builder for chaining. */ - public Builder clearPreamble() { - preamble_ = getDefaultInstance().getPreamble(); - bitField0_ = (bitField0_ & ~0x00000001); + public Builder setImageSource( + com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec + .MultiModalSpec.ImageSource + value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + imageSource_ = value.getNumber(); onChanged(); return this; } @@ -17347,50 +18031,46 @@ public Builder clearPreamble() { * * *
            -           * Text at the beginning of the prompt that instructs the assistant.
            -           * Examples are available in the user guide.
            +           * Optional. Source of image returned in the answer.
                        * 
            * - * string preamble = 1; + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec.MultiModalSpec.ImageSource image_source = 3 [(.google.api.field_behavior) = OPTIONAL]; + * * - * @param value The bytes for preamble to set. * @return This builder for chaining. */ - public Builder setPreambleBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - preamble_ = value; - bitField0_ |= 0x00000001; + public Builder clearImageSource() { + bitField0_ = (bitField0_ & ~0x00000001); + imageSource_ = 0; onChanged(); return this; } - // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec.ModelPromptSpec) + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec.MultiModalSpec) } - // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec.ModelPromptSpec) + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec.MultiModalSpec) private static final com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec - .SummarySpec.ModelPromptSpec + .SummarySpec.MultiModalSpec DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec - .SummarySpec.ModelPromptSpec(); + .SummarySpec.MultiModalSpec(); } public static com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec - .SummarySpec.ModelPromptSpec + .SummarySpec.MultiModalSpec getDefaultInstance() { return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { @java.lang.Override - public ModelPromptSpec parsePartialFrom( + public MultiModalSpec parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { @@ -17410,91 +18090,71 @@ public ModelPromptSpec parsePartialFrom( } }; - public static com.google.protobuf.Parser parser() { + public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override - public com.google.protobuf.Parser getParserForType() { + public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override public com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec - .ModelPromptSpec + .MultiModalSpec getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } - public interface ModelSpecOrBuilder + public interface ModelPromptSpecOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec.ModelSpec) + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec.ModelPromptSpec) com.google.protobuf.MessageOrBuilder { /** * * *
            -         * The model version used to generate the summary.
            -         *
            -         * Supported values are:
            -         *
            -         * * `stable`: string. Default value when no value is specified. Uses a
            -         * generally available, fine-tuned model. For more information, see
            -         * [Answer generation model versions and
            -         * lifecycle](https://cloud.google.com/generative-ai-app-builder/docs/answer-generation-models).
            -         * * `preview`: string. (Public preview) Uses a preview model. For more
            -         * information, see
            -         * [Answer generation model versions and
            -         * lifecycle](https://cloud.google.com/generative-ai-app-builder/docs/answer-generation-models).
            +         * Text at the beginning of the prompt that instructs the assistant.
            +         * Examples are available in the user guide.
                      * 
            * - * string version = 1; + * string preamble = 1; * - * @return The version. + * @return The preamble. */ - java.lang.String getVersion(); + java.lang.String getPreamble(); /** * * *
            -         * The model version used to generate the summary.
            -         *
            -         * Supported values are:
            -         *
            -         * * `stable`: string. Default value when no value is specified. Uses a
            -         * generally available, fine-tuned model. For more information, see
            -         * [Answer generation model versions and
            -         * lifecycle](https://cloud.google.com/generative-ai-app-builder/docs/answer-generation-models).
            -         * * `preview`: string. (Public preview) Uses a preview model. For more
            -         * information, see
            -         * [Answer generation model versions and
            -         * lifecycle](https://cloud.google.com/generative-ai-app-builder/docs/answer-generation-models).
            +         * Text at the beginning of the prompt that instructs the assistant.
            +         * Examples are available in the user guide.
                      * 
            * - * string version = 1; + * string preamble = 1; * - * @return The bytes for version. + * @return The bytes for preamble. */ - com.google.protobuf.ByteString getVersionBytes(); + com.google.protobuf.ByteString getPreambleBytes(); } /** * * *
            -       * Specification of the model.
            +       * Specification of the prompt to use with the model.
                    * 
            * * Protobuf type {@code - * google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec.ModelSpec} + * google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec.ModelPromptSpec} */ - public static final class ModelSpec extends com.google.protobuf.GeneratedMessage + public static final class ModelPromptSpec extends com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec.ModelSpec) - ModelSpecOrBuilder { + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec.ModelPromptSpec) + ModelPromptSpecOrBuilder { private static final long serialVersionUID = 0L; static { @@ -17504,71 +18164,61 @@ public static final class ModelSpec extends com.google.protobuf.GeneratedMessage /* minor= */ 33, /* patch= */ 2, /* suffix= */ "", - "ModelSpec"); + "ModelPromptSpec"); } - // Use ModelSpec.newBuilder() to construct. - private ModelSpec(com.google.protobuf.GeneratedMessage.Builder builder) { + // Use ModelPromptSpec.newBuilder() to construct. + private ModelPromptSpec(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } - private ModelSpec() { - version_ = ""; + private ModelPromptSpec() { + preamble_ = ""; } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.discoveryengine.v1beta.SearchServiceProto - .internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_ContentSearchSpec_SummarySpec_ModelSpec_descriptor; + .internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_ContentSearchSpec_SummarySpec_ModelPromptSpec_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.discoveryengine.v1beta.SearchServiceProto - .internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_ContentSearchSpec_SummarySpec_ModelSpec_fieldAccessorTable + .internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_ContentSearchSpec_SummarySpec_ModelPromptSpec_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec - .SummarySpec.ModelSpec.class, + .SummarySpec.ModelPromptSpec.class, com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec - .SummarySpec.ModelSpec.Builder.class); + .SummarySpec.ModelPromptSpec.Builder.class); } - public static final int VERSION_FIELD_NUMBER = 1; + public static final int PREAMBLE_FIELD_NUMBER = 1; @SuppressWarnings("serial") - private volatile java.lang.Object version_ = ""; + private volatile java.lang.Object preamble_ = ""; /** * * *
            -         * The model version used to generate the summary.
            -         *
            -         * Supported values are:
            -         *
            -         * * `stable`: string. Default value when no value is specified. Uses a
            -         * generally available, fine-tuned model. For more information, see
            -         * [Answer generation model versions and
            -         * lifecycle](https://cloud.google.com/generative-ai-app-builder/docs/answer-generation-models).
            -         * * `preview`: string. (Public preview) Uses a preview model. For more
            -         * information, see
            -         * [Answer generation model versions and
            -         * lifecycle](https://cloud.google.com/generative-ai-app-builder/docs/answer-generation-models).
            +         * Text at the beginning of the prompt that instructs the assistant.
            +         * Examples are available in the user guide.
                      * 
            * - * string version = 1; + * string preamble = 1; * - * @return The version. + * @return The preamble. */ @java.lang.Override - public java.lang.String getVersion() { - java.lang.Object ref = version_; + public java.lang.String getPreamble() { + java.lang.Object ref = preamble_; 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(); - version_ = s; + preamble_ = s; return s; } } @@ -17577,31 +18227,21 @@ public java.lang.String getVersion() { * * *
            -         * The model version used to generate the summary.
            -         *
            -         * Supported values are:
            -         *
            -         * * `stable`: string. Default value when no value is specified. Uses a
            -         * generally available, fine-tuned model. For more information, see
            -         * [Answer generation model versions and
            -         * lifecycle](https://cloud.google.com/generative-ai-app-builder/docs/answer-generation-models).
            -         * * `preview`: string. (Public preview) Uses a preview model. For more
            -         * information, see
            -         * [Answer generation model versions and
            -         * lifecycle](https://cloud.google.com/generative-ai-app-builder/docs/answer-generation-models).
            +         * Text at the beginning of the prompt that instructs the assistant.
            +         * Examples are available in the user guide.
                      * 
            * - * string version = 1; + * string preamble = 1; * - * @return The bytes for version. + * @return The bytes for preamble. */ @java.lang.Override - public com.google.protobuf.ByteString getVersionBytes() { - java.lang.Object ref = version_; + public com.google.protobuf.ByteString getPreambleBytes() { + java.lang.Object ref = preamble_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - version_ = b; + preamble_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; @@ -17623,8 +18263,8 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(version_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, version_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(preamble_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, preamble_); } getUnknownFields().writeTo(output); } @@ -17635,8 +18275,8 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(version_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, version_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(preamble_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, preamble_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -17651,17 +18291,17 @@ public boolean equals(final java.lang.Object obj) { if (!(obj instanceof com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec - .ModelSpec)) { + .ModelPromptSpec)) { return super.equals(obj); } com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec - .ModelSpec + .ModelPromptSpec other = (com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec - .SummarySpec.ModelSpec) + .SummarySpec.ModelPromptSpec) obj; - if (!getVersion().equals(other.getVersion())) return false; + if (!getPreamble().equals(other.getPreamble())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -17673,22 +18313,22 @@ public int hashCode() { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + VERSION_FIELD_NUMBER; - hash = (53 * hash) + getVersion().hashCode(); + hash = (37 * hash) + PREAMBLE_FIELD_NUMBER; + hash = (53 * hash) + getPreamble().hashCode(); hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } public static com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec - .SummarySpec.ModelSpec + .SummarySpec.ModelPromptSpec parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec - .SummarySpec.ModelSpec + .SummarySpec.ModelPromptSpec parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) @@ -17697,14 +18337,14 @@ public int hashCode() { } public static com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec - .SummarySpec.ModelSpec + .SummarySpec.ModelPromptSpec parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec - .SummarySpec.ModelSpec + .SummarySpec.ModelPromptSpec parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) @@ -17713,26 +18353,26 @@ public int hashCode() { } public static com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec - .SummarySpec.ModelSpec + .SummarySpec.ModelPromptSpec parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec - .SummarySpec.ModelSpec + .SummarySpec.ModelPromptSpec parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec - .SummarySpec.ModelSpec + .SummarySpec.ModelPromptSpec parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec - .SummarySpec.ModelSpec + .SummarySpec.ModelPromptSpec parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) @@ -17742,13 +18382,13 @@ public int hashCode() { } public static com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec - .SummarySpec.ModelSpec + .SummarySpec.ModelPromptSpec parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } public static com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec - .SummarySpec.ModelSpec + .SummarySpec.ModelPromptSpec parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) @@ -17758,13 +18398,13 @@ public int hashCode() { } public static com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec - .SummarySpec.ModelSpec + .SummarySpec.ModelPromptSpec parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } public static com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec - .SummarySpec.ModelSpec + .SummarySpec.ModelPromptSpec parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) @@ -17784,7 +18424,7 @@ public static Builder newBuilder() { public static Builder newBuilder( com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec - .ModelSpec + .ModelPromptSpec prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @@ -17805,37 +18445,37 @@ protected Builder newBuilderForType( * * *
            -         * Specification of the model.
            +         * Specification of the prompt to use with the model.
                      * 
            * * Protobuf type {@code - * google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec.ModelSpec} + * google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec.ModelPromptSpec} */ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec.ModelSpec) + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec.ModelPromptSpec) com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec - .ModelSpecOrBuilder { + .ModelPromptSpecOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.discoveryengine.v1beta.SearchServiceProto - .internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_ContentSearchSpec_SummarySpec_ModelSpec_descriptor; + .internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_ContentSearchSpec_SummarySpec_ModelPromptSpec_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.discoveryengine.v1beta.SearchServiceProto - .internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_ContentSearchSpec_SummarySpec_ModelSpec_fieldAccessorTable + .internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_ContentSearchSpec_SummarySpec_ModelPromptSpec_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec - .SummarySpec.ModelSpec.class, + .SummarySpec.ModelPromptSpec.class, com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec - .SummarySpec.ModelSpec.Builder.class); + .SummarySpec.ModelPromptSpec.Builder.class); } // Construct using - // com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec.ModelSpec.newBuilder() + // com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec.ModelPromptSpec.newBuilder() private Builder() {} private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { @@ -17846,30 +18486,30 @@ private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { public Builder clear() { super.clear(); bitField0_ = 0; - version_ = ""; + preamble_ = ""; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.cloud.discoveryengine.v1beta.SearchServiceProto - .internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_ContentSearchSpec_SummarySpec_ModelSpec_descriptor; + .internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_ContentSearchSpec_SummarySpec_ModelPromptSpec_descriptor; } @java.lang.Override public com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec - .ModelSpec + .ModelPromptSpec getDefaultInstanceForType() { return com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec - .SummarySpec.ModelSpec.getDefaultInstance(); + .SummarySpec.ModelPromptSpec.getDefaultInstance(); } @java.lang.Override public com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec - .ModelSpec + .ModelPromptSpec build() { com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec - .ModelSpec + .ModelPromptSpec result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); @@ -17879,13 +18519,13 @@ public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { @java.lang.Override public com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec - .ModelSpec + .ModelPromptSpec buildPartial() { com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec - .ModelSpec + .ModelPromptSpec result = new com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec - .SummarySpec.ModelSpec(this); + .SummarySpec.ModelPromptSpec(this); if (bitField0_ != 0) { buildPartial0(result); } @@ -17895,11 +18535,11 @@ public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { private void buildPartial0( com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec - .ModelSpec + .ModelPromptSpec result) { int from_bitField0_ = bitField0_; if (((from_bitField0_ & 0x00000001) != 0)) { - result.version_ = version_; + result.preamble_ = preamble_; } } @@ -17908,10 +18548,10 @@ public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec - .ModelSpec) { + .ModelPromptSpec) { return mergeFrom( (com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec - .SummarySpec.ModelSpec) + .SummarySpec.ModelPromptSpec) other); } else { super.mergeFrom(other); @@ -17921,13 +18561,13 @@ public Builder mergeFrom(com.google.protobuf.Message other) { public Builder mergeFrom( com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec - .ModelSpec + .ModelPromptSpec other) { if (other == com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec - .SummarySpec.ModelSpec.getDefaultInstance()) return this; - if (!other.getVersion().isEmpty()) { - version_ = other.version_; + .SummarySpec.ModelPromptSpec.getDefaultInstance()) return this; + if (!other.getPreamble().isEmpty()) { + preamble_ = other.preamble_; bitField0_ |= 0x00000001; onChanged(); } @@ -17959,7 +18599,7 @@ public Builder mergeFrom( break; case 10: { - version_ = input.readStringRequireUtf8(); + preamble_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000001; break; } // case 10 @@ -17982,36 +18622,26 @@ public Builder mergeFrom( private int bitField0_; - private java.lang.Object version_ = ""; + private java.lang.Object preamble_ = ""; /** * * *
            -           * The model version used to generate the summary.
            -           *
            -           * Supported values are:
            -           *
            -           * * `stable`: string. Default value when no value is specified. Uses a
            -           * generally available, fine-tuned model. For more information, see
            -           * [Answer generation model versions and
            -           * lifecycle](https://cloud.google.com/generative-ai-app-builder/docs/answer-generation-models).
            -           * * `preview`: string. (Public preview) Uses a preview model. For more
            -           * information, see
            -           * [Answer generation model versions and
            -           * lifecycle](https://cloud.google.com/generative-ai-app-builder/docs/answer-generation-models).
            +           * Text at the beginning of the prompt that instructs the assistant.
            +           * Examples are available in the user guide.
                        * 
            * - * string version = 1; + * string preamble = 1; * - * @return The version. + * @return The preamble. */ - public java.lang.String getVersion() { - java.lang.Object ref = version_; + public java.lang.String getPreamble() { + java.lang.Object ref = preamble_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); - version_ = s; + preamble_ = s; return s; } else { return (java.lang.String) ref; @@ -18022,30 +18652,20 @@ public java.lang.String getVersion() { * * *
            -           * The model version used to generate the summary.
            -           *
            -           * Supported values are:
            -           *
            -           * * `stable`: string. Default value when no value is specified. Uses a
            -           * generally available, fine-tuned model. For more information, see
            -           * [Answer generation model versions and
            -           * lifecycle](https://cloud.google.com/generative-ai-app-builder/docs/answer-generation-models).
            -           * * `preview`: string. (Public preview) Uses a preview model. For more
            -           * information, see
            -           * [Answer generation model versions and
            -           * lifecycle](https://cloud.google.com/generative-ai-app-builder/docs/answer-generation-models).
            +           * Text at the beginning of the prompt that instructs the assistant.
            +           * Examples are available in the user guide.
                        * 
            * - * string version = 1; + * string preamble = 1; * - * @return The bytes for version. + * @return The bytes for preamble. */ - public com.google.protobuf.ByteString getVersionBytes() { - java.lang.Object ref = version_; + public com.google.protobuf.ByteString getPreambleBytes() { + java.lang.Object ref = preamble_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - version_ = b; + preamble_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; @@ -18056,30 +18676,20 @@ public com.google.protobuf.ByteString getVersionBytes() { * * *
            -           * The model version used to generate the summary.
            -           *
            -           * Supported values are:
            -           *
            -           * * `stable`: string. Default value when no value is specified. Uses a
            -           * generally available, fine-tuned model. For more information, see
            -           * [Answer generation model versions and
            -           * lifecycle](https://cloud.google.com/generative-ai-app-builder/docs/answer-generation-models).
            -           * * `preview`: string. (Public preview) Uses a preview model. For more
            -           * information, see
            -           * [Answer generation model versions and
            -           * lifecycle](https://cloud.google.com/generative-ai-app-builder/docs/answer-generation-models).
            +           * Text at the beginning of the prompt that instructs the assistant.
            +           * Examples are available in the user guide.
                        * 
            * - * string version = 1; + * string preamble = 1; * - * @param value The version to set. + * @param value The preamble to set. * @return This builder for chaining. */ - public Builder setVersion(java.lang.String value) { + public Builder setPreamble(java.lang.String value) { if (value == null) { throw new NullPointerException(); } - version_ = value; + preamble_ = value; bitField0_ |= 0x00000001; onChanged(); return this; @@ -18089,26 +18699,16 @@ public Builder setVersion(java.lang.String value) { * * *
            -           * The model version used to generate the summary.
            -           *
            -           * Supported values are:
            -           *
            -           * * `stable`: string. Default value when no value is specified. Uses a
            -           * generally available, fine-tuned model. For more information, see
            -           * [Answer generation model versions and
            -           * lifecycle](https://cloud.google.com/generative-ai-app-builder/docs/answer-generation-models).
            -           * * `preview`: string. (Public preview) Uses a preview model. For more
            -           * information, see
            -           * [Answer generation model versions and
            -           * lifecycle](https://cloud.google.com/generative-ai-app-builder/docs/answer-generation-models).
            +           * Text at the beginning of the prompt that instructs the assistant.
            +           * Examples are available in the user guide.
                        * 
            * - * string version = 1; + * string preamble = 1; * * @return This builder for chaining. */ - public Builder clearVersion() { - version_ = getDefaultInstance().getVersion(); + public Builder clearPreamble() { + preamble_ = getDefaultInstance().getPreamble(); bitField0_ = (bitField0_ & ~0x00000001); onChanged(); return this; @@ -18118,60 +18718,50 @@ public Builder clearVersion() { * * *
            -           * The model version used to generate the summary.
            -           *
            -           * Supported values are:
            -           *
            -           * * `stable`: string. Default value when no value is specified. Uses a
            -           * generally available, fine-tuned model. For more information, see
            -           * [Answer generation model versions and
            -           * lifecycle](https://cloud.google.com/generative-ai-app-builder/docs/answer-generation-models).
            -           * * `preview`: string. (Public preview) Uses a preview model. For more
            -           * information, see
            -           * [Answer generation model versions and
            -           * lifecycle](https://cloud.google.com/generative-ai-app-builder/docs/answer-generation-models).
            +           * Text at the beginning of the prompt that instructs the assistant.
            +           * Examples are available in the user guide.
                        * 
            * - * string version = 1; + * string preamble = 1; * - * @param value The bytes for version to set. + * @param value The bytes for preamble to set. * @return This builder for chaining. */ - public Builder setVersionBytes(com.google.protobuf.ByteString value) { + public Builder setPreambleBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); - version_ = value; + preamble_ = value; bitField0_ |= 0x00000001; onChanged(); return this; } - // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec.ModelSpec) + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec.ModelPromptSpec) } - // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec.ModelSpec) + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec.ModelPromptSpec) private static final com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec - .SummarySpec.ModelSpec + .SummarySpec.ModelPromptSpec DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec - .SummarySpec.ModelSpec(); + .SummarySpec.ModelPromptSpec(); } public static com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec - .SummarySpec.ModelSpec + .SummarySpec.ModelPromptSpec getDefaultInstance() { return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { @java.lang.Override - public ModelSpec parsePartialFrom( + public ModelPromptSpec parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { @@ -18191,2972 +18781,1797 @@ public ModelSpec parsePartialFrom( } }; - public static com.google.protobuf.Parser parser() { + public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override - public com.google.protobuf.Parser getParserForType() { + public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override public com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec - .ModelSpec + .ModelPromptSpec getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } - private int bitField0_; - public static final int SUMMARY_RESULT_COUNT_FIELD_NUMBER = 1; - private int summaryResultCount_ = 0; + public interface ModelSpecOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec.ModelSpec) + com.google.protobuf.MessageOrBuilder { - /** - * - * - *
            -       * The number of top results to generate the summary from. If the number
            -       * of results returned is less than `summaryResultCount`, the summary is
            -       * generated from all of the results.
            -       *
            -       * At most 10 results for documents mode, or 50 for chunks mode, can be
            -       * used to generate a summary. The chunks mode is used when
            -       * [SearchRequest.ContentSearchSpec.search_result_mode][google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.search_result_mode]
            -       * is set to
            -       * [CHUNKS][google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SearchResultMode.CHUNKS].
            -       * 
            - * - * int32 summary_result_count = 1; - * - * @return The summaryResultCount. - */ - @java.lang.Override - public int getSummaryResultCount() { - return summaryResultCount_; - } + /** + * + * + *
            +         * The model version used to generate the summary.
            +         *
            +         * Supported values are:
            +         *
            +         * * `stable`: string. Default value when no value is specified. Uses a
            +         * generally available, fine-tuned model. For more information, see
            +         * [Answer generation model versions and
            +         * lifecycle](https://cloud.google.com/generative-ai-app-builder/docs/answer-generation-models).
            +         * * `preview`: string. (Public preview) Uses a preview model. For more
            +         * information, see
            +         * [Answer generation model versions and
            +         * lifecycle](https://cloud.google.com/generative-ai-app-builder/docs/answer-generation-models).
            +         * 
            + * + * string version = 1; + * + * @return The version. + */ + java.lang.String getVersion(); - public static final int INCLUDE_CITATIONS_FIELD_NUMBER = 2; - private boolean includeCitations_ = false; + /** + * + * + *
            +         * The model version used to generate the summary.
            +         *
            +         * Supported values are:
            +         *
            +         * * `stable`: string. Default value when no value is specified. Uses a
            +         * generally available, fine-tuned model. For more information, see
            +         * [Answer generation model versions and
            +         * lifecycle](https://cloud.google.com/generative-ai-app-builder/docs/answer-generation-models).
            +         * * `preview`: string. (Public preview) Uses a preview model. For more
            +         * information, see
            +         * [Answer generation model versions and
            +         * lifecycle](https://cloud.google.com/generative-ai-app-builder/docs/answer-generation-models).
            +         * 
            + * + * string version = 1; + * + * @return The bytes for version. + */ + com.google.protobuf.ByteString getVersionBytes(); + } /** * * *
            -       * Specifies whether to include citations in the summary. The default
            -       * value is `false`.
            -       *
            -       * When this field is set to `true`, summaries include in-line citation
            -       * numbers.
            -       *
            -       * Example summary including citations:
            -       *
            -       * BigQuery is Google Cloud's fully managed and completely serverless
            -       * enterprise data warehouse [1]. BigQuery supports all data types, works
            -       * across clouds, and has built-in machine learning and business
            -       * intelligence, all within a unified platform [2, 3].
            -       *
            -       * The citation numbers refer to the returned search results and are
            -       * 1-indexed. For example, [1] means that the sentence is attributed to
            -       * the first search result. [2, 3] means that the sentence is attributed
            -       * to both the second and third search results.
            +       * Specification of the model.
                    * 
            * - * bool include_citations = 2; - * - * @return The includeCitations. + * Protobuf type {@code + * google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec.ModelSpec} */ - @java.lang.Override - public boolean getIncludeCitations() { - return includeCitations_; - } + public static final class ModelSpec extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec.ModelSpec) + ModelSpecOrBuilder { + private static final long serialVersionUID = 0L; - public static final int IGNORE_ADVERSARIAL_QUERY_FIELD_NUMBER = 3; - private boolean ignoreAdversarialQuery_ = false; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ModelSpec"); + } - /** - * - * - *
            -       * Specifies whether to filter out adversarial queries. The default value
            -       * is `false`.
            -       *
            -       * Google employs search-query classification to detect adversarial
            -       * queries. No summary is returned if the search query is classified as an
            -       * adversarial query. For example, a user might ask a question regarding
            -       * negative comments about the company or submit a query designed to
            -       * generate unsafe, policy-violating output. If this field is set to
            -       * `true`, we skip generating summaries for adversarial queries and return
            -       * fallback messages instead.
            -       * 
            - * - * bool ignore_adversarial_query = 3; - * - * @return The ignoreAdversarialQuery. - */ - @java.lang.Override - public boolean getIgnoreAdversarialQuery() { - return ignoreAdversarialQuery_; - } + // Use ModelSpec.newBuilder() to construct. + private ModelSpec(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } - public static final int IGNORE_NON_SUMMARY_SEEKING_QUERY_FIELD_NUMBER = 4; - private boolean ignoreNonSummarySeekingQuery_ = false; + private ModelSpec() { + version_ = ""; + } - /** - * - * - *
            -       * Specifies whether to filter out queries that are not summary-seeking.
            -       * The default value is `false`.
            -       *
            -       * Google employs search-query classification to detect summary-seeking
            -       * queries. No summary is returned if the search query is classified as a
            -       * non-summary seeking query. For example, `why is the sky blue` and `Who
            -       * is the best soccer player in the world?` are summary-seeking queries,
            -       * but `SFO airport` and `world cup 2026` are not. They are most likely
            -       * navigational queries. If this field is set to `true`, we skip
            -       * generating summaries for non-summary seeking queries and return
            -       * fallback messages instead.
            -       * 
            - * - * bool ignore_non_summary_seeking_query = 4; - * - * @return The ignoreNonSummarySeekingQuery. - */ - @java.lang.Override - public boolean getIgnoreNonSummarySeekingQuery() { - return ignoreNonSummarySeekingQuery_; - } + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_ContentSearchSpec_SummarySpec_ModelSpec_descriptor; + } - public static final int IGNORE_LOW_RELEVANT_CONTENT_FIELD_NUMBER = 9; - private boolean ignoreLowRelevantContent_ = false; + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_ContentSearchSpec_SummarySpec_ModelSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec + .SummarySpec.ModelSpec.class, + com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec + .SummarySpec.ModelSpec.Builder.class); + } - /** - * - * - *
            -       * Specifies whether to filter out queries that have low relevance. The
            -       * default value is `false`.
            -       *
            -       * If this field is set to `false`, all search results are used regardless
            -       * of relevance to generate answers. If set to `true`, only queries with
            -       * high relevance search results will generate answers.
            -       * 
            - * - * bool ignore_low_relevant_content = 9; - * - * @return The ignoreLowRelevantContent. - */ - @java.lang.Override - public boolean getIgnoreLowRelevantContent() { - return ignoreLowRelevantContent_; - } + public static final int VERSION_FIELD_NUMBER = 1; - public static final int IGNORE_JAIL_BREAKING_QUERY_FIELD_NUMBER = 10; - private boolean ignoreJailBreakingQuery_ = false; + @SuppressWarnings("serial") + private volatile java.lang.Object version_ = ""; - /** - * - * - *
            -       * Optional. Specifies whether to filter out jail-breaking queries. The
            -       * default value is `false`.
            -       *
            -       * Google employs search-query classification to detect jail-breaking
            -       * queries. No summary is returned if the search query is classified as a
            -       * jail-breaking query. A user might add instructions to the query to
            -       * change the tone, style, language, content of the answer, or ask the
            -       * model to act as a different entity, e.g. "Reply in the tone of a
            -       * competing company's CEO". If this field is set to `true`, we skip
            -       * generating summaries for jail-breaking queries and return fallback
            -       * messages instead.
            -       * 
            - * - * bool ignore_jail_breaking_query = 10 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The ignoreJailBreakingQuery. - */ - @java.lang.Override - public boolean getIgnoreJailBreakingQuery() { - return ignoreJailBreakingQuery_; - } + /** + * + * + *
            +         * The model version used to generate the summary.
            +         *
            +         * Supported values are:
            +         *
            +         * * `stable`: string. Default value when no value is specified. Uses a
            +         * generally available, fine-tuned model. For more information, see
            +         * [Answer generation model versions and
            +         * lifecycle](https://cloud.google.com/generative-ai-app-builder/docs/answer-generation-models).
            +         * * `preview`: string. (Public preview) Uses a preview model. For more
            +         * information, see
            +         * [Answer generation model versions and
            +         * lifecycle](https://cloud.google.com/generative-ai-app-builder/docs/answer-generation-models).
            +         * 
            + * + * string version = 1; + * + * @return The version. + */ + @java.lang.Override + public java.lang.String getVersion() { + java.lang.Object ref = version_; + 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(); + version_ = s; + return s; + } + } - public static final int MODEL_PROMPT_SPEC_FIELD_NUMBER = 5; - private com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec - .ModelPromptSpec - modelPromptSpec_; + /** + * + * + *
            +         * The model version used to generate the summary.
            +         *
            +         * Supported values are:
            +         *
            +         * * `stable`: string. Default value when no value is specified. Uses a
            +         * generally available, fine-tuned model. For more information, see
            +         * [Answer generation model versions and
            +         * lifecycle](https://cloud.google.com/generative-ai-app-builder/docs/answer-generation-models).
            +         * * `preview`: string. (Public preview) Uses a preview model. For more
            +         * information, see
            +         * [Answer generation model versions and
            +         * lifecycle](https://cloud.google.com/generative-ai-app-builder/docs/answer-generation-models).
            +         * 
            + * + * string version = 1; + * + * @return The bytes for version. + */ + @java.lang.Override + public com.google.protobuf.ByteString getVersionBytes() { + java.lang.Object ref = version_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + version_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } - /** - * - * - *
            -       * If specified, the spec will be used to modify the prompt provided to
            -       * the LLM.
            -       * 
            - * - * - * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec.ModelPromptSpec model_prompt_spec = 5; - * - * - * @return Whether the modelPromptSpec field is set. - */ - @java.lang.Override - public boolean hasModelPromptSpec() { - return ((bitField0_ & 0x00000001) != 0); - } + private byte memoizedIsInitialized = -1; - /** - * - * - *
            -       * If specified, the spec will be used to modify the prompt provided to
            -       * the LLM.
            -       * 
            - * - * - * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec.ModelPromptSpec model_prompt_spec = 5; - * - * - * @return The modelPromptSpec. - */ - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec - .ModelPromptSpec - getModelPromptSpec() { - return modelPromptSpec_ == null - ? com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec - .ModelPromptSpec.getDefaultInstance() - : modelPromptSpec_; - } + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; - /** - * - * - *
            -       * If specified, the spec will be used to modify the prompt provided to
            -       * the LLM.
            -       * 
            - * - * - * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec.ModelPromptSpec model_prompt_spec = 5; - * - */ - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec - .ModelPromptSpecOrBuilder - getModelPromptSpecOrBuilder() { - return modelPromptSpec_ == null - ? com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec - .ModelPromptSpec.getDefaultInstance() - : modelPromptSpec_; - } - - public static final int LANGUAGE_CODE_FIELD_NUMBER = 6; - - @SuppressWarnings("serial") - private volatile java.lang.Object languageCode_ = ""; - - /** - * - * - *
            -       * Language code for Summary. Use language tags defined by
            -       * [BCP47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt).
            -       * Note: This is an experimental feature.
            -       * 
            - * - * string language_code = 6; - * - * @return The languageCode. - */ - @java.lang.Override - public java.lang.String getLanguageCode() { - java.lang.Object ref = languageCode_; - 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(); - languageCode_ = s; - return s; + memoizedIsInitialized = 1; + return true; } - } - /** - * - * - *
            -       * Language code for Summary. Use language tags defined by
            -       * [BCP47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt).
            -       * Note: This is an experimental feature.
            -       * 
            - * - * string language_code = 6; - * - * @return The bytes for languageCode. - */ - @java.lang.Override - public com.google.protobuf.ByteString getLanguageCodeBytes() { - java.lang.Object ref = languageCode_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - languageCode_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(version_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, version_); + } + getUnknownFields().writeTo(output); } - } - - public static final int MODEL_SPEC_FIELD_NUMBER = 7; - private com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec - .ModelSpec - modelSpec_; - - /** - * - * - *
            -       * If specified, the spec will be used to modify the model specification
            -       * provided to the LLM.
            -       * 
            - * - * - * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec.ModelSpec model_spec = 7; - * - * - * @return Whether the modelSpec field is set. - */ - @java.lang.Override - public boolean hasModelSpec() { - return ((bitField0_ & 0x00000002) != 0); - } - - /** - * - * - *
            -       * If specified, the spec will be used to modify the model specification
            -       * provided to the LLM.
            -       * 
            - * - * - * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec.ModelSpec model_spec = 7; - * - * - * @return The modelSpec. - */ - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec - .ModelSpec - getModelSpec() { - return modelSpec_ == null - ? com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec - .ModelSpec.getDefaultInstance() - : modelSpec_; - } - - /** - * - * - *
            -       * If specified, the spec will be used to modify the model specification
            -       * provided to the LLM.
            -       * 
            - * - * - * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec.ModelSpec model_spec = 7; - * - */ - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec - .ModelSpecOrBuilder - getModelSpecOrBuilder() { - return modelSpec_ == null - ? com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec - .ModelSpec.getDefaultInstance() - : modelSpec_; - } - - public static final int USE_SEMANTIC_CHUNKS_FIELD_NUMBER = 8; - private boolean useSemanticChunks_ = false; - - /** - * - * - *
            -       * If true, answer will be generated from most relevant chunks from top
            -       * search results. This feature will improve summary quality.
            -       * Note that with this feature enabled, not all top search results
            -       * will be referenced and included in the reference list, so the citation
            -       * source index only points to the search results listed in the reference
            -       * list.
            -       * 
            - * - * bool use_semantic_chunks = 8; - * - * @return The useSemanticChunks. - */ - @java.lang.Override - public boolean getUseSemanticChunks() { - return useSemanticChunks_; - } - private byte memoizedIsInitialized = -1; + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(version_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, version_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } - memoizedIsInitialized = 1; - return true; - } + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof + com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec + .ModelSpec)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec + .ModelSpec + other = + (com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec + .SummarySpec.ModelSpec) + obj; - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (summaryResultCount_ != 0) { - output.writeInt32(1, summaryResultCount_); - } - if (includeCitations_ != false) { - output.writeBool(2, includeCitations_); - } - if (ignoreAdversarialQuery_ != false) { - output.writeBool(3, ignoreAdversarialQuery_); - } - if (ignoreNonSummarySeekingQuery_ != false) { - output.writeBool(4, ignoreNonSummarySeekingQuery_); - } - if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(5, getModelPromptSpec()); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(languageCode_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 6, languageCode_); - } - if (((bitField0_ & 0x00000002) != 0)) { - output.writeMessage(7, getModelSpec()); - } - if (useSemanticChunks_ != false) { - output.writeBool(8, useSemanticChunks_); - } - if (ignoreLowRelevantContent_ != false) { - output.writeBool(9, ignoreLowRelevantContent_); - } - if (ignoreJailBreakingQuery_ != false) { - output.writeBool(10, ignoreJailBreakingQuery_); + if (!getVersion().equals(other.getVersion())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; } - getUnknownFields().writeTo(output); - } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + VERSION_FIELD_NUMBER; + hash = (53 * hash) + getVersion().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } - size = 0; - if (summaryResultCount_ != 0) { - size += com.google.protobuf.CodedOutputStream.computeInt32Size(1, summaryResultCount_); + public static com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec + .SummarySpec.ModelSpec + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); } - if (includeCitations_ != false) { - size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, includeCitations_); + + public static com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec + .SummarySpec.ModelSpec + parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); } - if (ignoreAdversarialQuery_ != false) { - size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, ignoreAdversarialQuery_); + + public static com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec + .SummarySpec.ModelSpec + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); } - if (ignoreNonSummarySeekingQuery_ != false) { - size += - com.google.protobuf.CodedOutputStream.computeBoolSize( - 4, ignoreNonSummarySeekingQuery_); + + public static com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec + .SummarySpec.ModelSpec + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); } - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getModelPromptSpec()); + + public static com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec + .SummarySpec.ModelSpec + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(languageCode_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(6, languageCode_); + + public static com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec + .SummarySpec.ModelSpec + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); } - if (((bitField0_ & 0x00000002) != 0)) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getModelSpec()); + + public static com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec + .SummarySpec.ModelSpec + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } - if (useSemanticChunks_ != false) { - size += com.google.protobuf.CodedOutputStream.computeBoolSize(8, useSemanticChunks_); + + public static com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec + .SummarySpec.ModelSpec + parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); } - if (ignoreLowRelevantContent_ != false) { - size += - com.google.protobuf.CodedOutputStream.computeBoolSize(9, ignoreLowRelevantContent_); + + public static com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec + .SummarySpec.ModelSpec + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } - if (ignoreJailBreakingQuery_ != false) { - size += - com.google.protobuf.CodedOutputStream.computeBoolSize(10, ignoreJailBreakingQuery_); + + public static com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec + .SummarySpec.ModelSpec + parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; + public static com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec + .SummarySpec.ModelSpec + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } - if (!(obj - instanceof - com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec)) { - return super.equals(obj); + + public static com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec + .SummarySpec.ModelSpec + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); } - com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec other = - (com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec) - obj; - if (getSummaryResultCount() != other.getSummaryResultCount()) return false; - if (getIncludeCitations() != other.getIncludeCitations()) return false; - if (getIgnoreAdversarialQuery() != other.getIgnoreAdversarialQuery()) return false; - if (getIgnoreNonSummarySeekingQuery() != other.getIgnoreNonSummarySeekingQuery()) - return false; - if (getIgnoreLowRelevantContent() != other.getIgnoreLowRelevantContent()) return false; - if (getIgnoreJailBreakingQuery() != other.getIgnoreJailBreakingQuery()) return false; - if (hasModelPromptSpec() != other.hasModelPromptSpec()) return false; - if (hasModelPromptSpec()) { - if (!getModelPromptSpec().equals(other.getModelPromptSpec())) return false; + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); } - if (!getLanguageCode().equals(other.getLanguageCode())) return false; - if (hasModelSpec() != other.hasModelSpec()) return false; - if (hasModelSpec()) { - if (!getModelSpec().equals(other.getModelSpec())) return false; + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); } - if (getUseSemanticChunks() != other.getUseSemanticChunks()) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; + public static Builder newBuilder( + com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec + .ModelSpec + prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + SUMMARY_RESULT_COUNT_FIELD_NUMBER; - hash = (53 * hash) + getSummaryResultCount(); - hash = (37 * hash) + INCLUDE_CITATIONS_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getIncludeCitations()); - hash = (37 * hash) + IGNORE_ADVERSARIAL_QUERY_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getIgnoreAdversarialQuery()); - hash = (37 * hash) + IGNORE_NON_SUMMARY_SEEKING_QUERY_FIELD_NUMBER; - hash = - (53 * hash) - + com.google.protobuf.Internal.hashBoolean(getIgnoreNonSummarySeekingQuery()); - hash = (37 * hash) + IGNORE_LOW_RELEVANT_CONTENT_FIELD_NUMBER; - hash = - (53 * hash) + com.google.protobuf.Internal.hashBoolean(getIgnoreLowRelevantContent()); - hash = (37 * hash) + IGNORE_JAIL_BREAKING_QUERY_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getIgnoreJailBreakingQuery()); - if (hasModelPromptSpec()) { - hash = (37 * hash) + MODEL_PROMPT_SPEC_FIELD_NUMBER; - hash = (53 * hash) + getModelPromptSpec().hashCode(); + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); } - hash = (37 * hash) + LANGUAGE_CODE_FIELD_NUMBER; - hash = (53 * hash) + getLanguageCode().hashCode(); - if (hasModelSpec()) { - hash = (37 * hash) + MODEL_SPEC_FIELD_NUMBER; - hash = (53 * hash) + getModelSpec().hashCode(); + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; } - hash = (37 * hash) + USE_SEMANTIC_CHUNKS_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getUseSemanticChunks()); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - public static com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec - .SummarySpec - parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } + /** + * + * + *
            +         * Specification of the model.
            +         * 
            + * + * Protobuf type {@code + * google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec.ModelSpec} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec.ModelSpec) + com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec + .ModelSpecOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_ContentSearchSpec_SummarySpec_ModelSpec_descriptor; + } - public static com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec - .SummarySpec - parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_ContentSearchSpec_SummarySpec_ModelSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec + .SummarySpec.ModelSpec.class, + com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec + .SummarySpec.ModelSpec.Builder.class); + } - public static com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec - .SummarySpec - parseFrom(com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } + // Construct using + // com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec.ModelSpec.newBuilder() + private Builder() {} - public static com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec - .SummarySpec - parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } - public static com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec - .SummarySpec - parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + version_ = ""; + return this; + } - public static com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec - .SummarySpec - parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1beta.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_ContentSearchSpec_SummarySpec_ModelSpec_descriptor; + } - public static com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec - .SummarySpec - parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec + .ModelSpec + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec + .SummarySpec.ModelSpec.getDefaultInstance(); + } - public static com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec - .SummarySpec - parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec + .ModelSpec + build() { + com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec + .ModelSpec + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } - public static com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec - .SummarySpec - parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec + .ModelSpec + buildPartial() { + com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec + .ModelSpec + result = + new com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec + .SummarySpec.ModelSpec(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } - public static com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec - .SummarySpec - parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } + private void buildPartial0( + com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec + .ModelSpec + result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.version_ = version_; + } + } - public static com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec - .SummarySpec - parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec + .ModelSpec) { + return mergeFrom( + (com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec + .SummarySpec.ModelSpec) + other); + } else { + super.mergeFrom(other); + return this; + } + } - public static com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec - .SummarySpec - parseFrom( + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec + .ModelSpec + other) { + if (other + == com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec + .SummarySpec.ModelSpec.getDefaultInstance()) return this; + if (!other.getVersion().isEmpty()) { + version_ = other.version_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + version_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } + private int bitField0_; - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } + private java.lang.Object version_ = ""; - public static Builder newBuilder( - com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec - prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } + /** + * + * + *
            +           * The model version used to generate the summary.
            +           *
            +           * Supported values are:
            +           *
            +           * * `stable`: string. Default value when no value is specified. Uses a
            +           * generally available, fine-tuned model. For more information, see
            +           * [Answer generation model versions and
            +           * lifecycle](https://cloud.google.com/generative-ai-app-builder/docs/answer-generation-models).
            +           * * `preview`: string. (Public preview) Uses a preview model. For more
            +           * information, see
            +           * [Answer generation model versions and
            +           * lifecycle](https://cloud.google.com/generative-ai-app-builder/docs/answer-generation-models).
            +           * 
            + * + * string version = 1; + * + * @return The version. + */ + public java.lang.String getVersion() { + java.lang.Object ref = version_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + version_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } + /** + * + * + *
            +           * The model version used to generate the summary.
            +           *
            +           * Supported values are:
            +           *
            +           * * `stable`: string. Default value when no value is specified. Uses a
            +           * generally available, fine-tuned model. For more information, see
            +           * [Answer generation model versions and
            +           * lifecycle](https://cloud.google.com/generative-ai-app-builder/docs/answer-generation-models).
            +           * * `preview`: string. (Public preview) Uses a preview model. For more
            +           * information, see
            +           * [Answer generation model versions and
            +           * lifecycle](https://cloud.google.com/generative-ai-app-builder/docs/answer-generation-models).
            +           * 
            + * + * string version = 1; + * + * @return The bytes for version. + */ + public com.google.protobuf.ByteString getVersionBytes() { + java.lang.Object ref = version_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + version_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } + /** + * + * + *
            +           * The model version used to generate the summary.
            +           *
            +           * Supported values are:
            +           *
            +           * * `stable`: string. Default value when no value is specified. Uses a
            +           * generally available, fine-tuned model. For more information, see
            +           * [Answer generation model versions and
            +           * lifecycle](https://cloud.google.com/generative-ai-app-builder/docs/answer-generation-models).
            +           * * `preview`: string. (Public preview) Uses a preview model. For more
            +           * information, see
            +           * [Answer generation model versions and
            +           * lifecycle](https://cloud.google.com/generative-ai-app-builder/docs/answer-generation-models).
            +           * 
            + * + * string version = 1; + * + * @param value The version to set. + * @return This builder for chaining. + */ + public Builder setVersion(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + version_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } - /** - * - * - *
            -       * A specification for configuring a summary returned in a search
            -       * response.
            -       * 
            - * - * Protobuf type {@code - * google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec} - */ - public static final class Builder - extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec) - com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec - .SummarySpecOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.discoveryengine.v1beta.SearchServiceProto - .internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_ContentSearchSpec_SummarySpec_descriptor; - } + /** + * + * + *
            +           * The model version used to generate the summary.
            +           *
            +           * Supported values are:
            +           *
            +           * * `stable`: string. Default value when no value is specified. Uses a
            +           * generally available, fine-tuned model. For more information, see
            +           * [Answer generation model versions and
            +           * lifecycle](https://cloud.google.com/generative-ai-app-builder/docs/answer-generation-models).
            +           * * `preview`: string. (Public preview) Uses a preview model. For more
            +           * information, see
            +           * [Answer generation model versions and
            +           * lifecycle](https://cloud.google.com/generative-ai-app-builder/docs/answer-generation-models).
            +           * 
            + * + * string version = 1; + * + * @return This builder for chaining. + */ + public Builder clearVersion() { + version_ = getDefaultInstance().getVersion(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.discoveryengine.v1beta.SearchServiceProto - .internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_ContentSearchSpec_SummarySpec_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec - .SummarySpec.class, - com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec - .SummarySpec.Builder.class); - } + /** + * + * + *
            +           * The model version used to generate the summary.
            +           *
            +           * Supported values are:
            +           *
            +           * * `stable`: string. Default value when no value is specified. Uses a
            +           * generally available, fine-tuned model. For more information, see
            +           * [Answer generation model versions and
            +           * lifecycle](https://cloud.google.com/generative-ai-app-builder/docs/answer-generation-models).
            +           * * `preview`: string. (Public preview) Uses a preview model. For more
            +           * information, see
            +           * [Answer generation model versions and
            +           * lifecycle](https://cloud.google.com/generative-ai-app-builder/docs/answer-generation-models).
            +           * 
            + * + * string version = 1; + * + * @param value The bytes for version to set. + * @return This builder for chaining. + */ + public Builder setVersionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + version_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } - // Construct using - // com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec.ModelSpec) } - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec.ModelSpec) + private static final com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec + .SummarySpec.ModelSpec + DEFAULT_INSTANCE; - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - internalGetModelPromptSpecFieldBuilder(); - internalGetModelSpecFieldBuilder(); - } + static { + DEFAULT_INSTANCE = + new com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec + .SummarySpec.ModelSpec(); } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - summaryResultCount_ = 0; - includeCitations_ = false; - ignoreAdversarialQuery_ = false; - ignoreNonSummarySeekingQuery_ = false; - ignoreLowRelevantContent_ = false; - ignoreJailBreakingQuery_ = false; - modelPromptSpec_ = null; - if (modelPromptSpecBuilder_ != null) { - modelPromptSpecBuilder_.dispose(); - modelPromptSpecBuilder_ = null; - } - languageCode_ = ""; - modelSpec_ = null; - if (modelSpecBuilder_ != null) { - modelSpecBuilder_.dispose(); - modelSpecBuilder_ = null; - } - useSemanticChunks_ = false; - return this; + public static com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec + .SummarySpec.ModelSpec + getDefaultInstance() { + return DEFAULT_INSTANCE; } - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.discoveryengine.v1beta.SearchServiceProto - .internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_ContentSearchSpec_SummarySpec_descriptor; - } + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ModelSpec parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec - getDefaultInstanceForType() { - return com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec - .getDefaultInstance(); + public static com.google.protobuf.Parser parser() { + return PARSER; } @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec - build() { - com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec - result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; + public com.google.protobuf.Parser getParserForType() { + return PARSER; } @java.lang.Override public com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec - buildPartial() { - com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec - result = - new com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec - .SummarySpec(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; + .ModelSpec + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; } + } - private void buildPartial0( - com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec - result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.summaryResultCount_ = summaryResultCount_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.includeCitations_ = includeCitations_; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.ignoreAdversarialQuery_ = ignoreAdversarialQuery_; - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.ignoreNonSummarySeekingQuery_ = ignoreNonSummarySeekingQuery_; - } - if (((from_bitField0_ & 0x00000010) != 0)) { - result.ignoreLowRelevantContent_ = ignoreLowRelevantContent_; - } - if (((from_bitField0_ & 0x00000020) != 0)) { - result.ignoreJailBreakingQuery_ = ignoreJailBreakingQuery_; - } - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000040) != 0)) { - result.modelPromptSpec_ = - modelPromptSpecBuilder_ == null - ? modelPromptSpec_ - : modelPromptSpecBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - if (((from_bitField0_ & 0x00000080) != 0)) { - result.languageCode_ = languageCode_; - } - if (((from_bitField0_ & 0x00000100) != 0)) { - result.modelSpec_ = modelSpecBuilder_ == null ? modelSpec_ : modelSpecBuilder_.build(); - to_bitField0_ |= 0x00000002; - } - if (((from_bitField0_ & 0x00000200) != 0)) { - result.useSemanticChunks_ = useSemanticChunks_; - } - result.bitField0_ |= to_bitField0_; - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other - instanceof - com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec) { - return mergeFrom( - (com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec - .SummarySpec) - other); - } else { - super.mergeFrom(other); - return this; - } - } + private int bitField0_; + public static final int SUMMARY_RESULT_COUNT_FIELD_NUMBER = 1; + private int summaryResultCount_ = 0; - public Builder mergeFrom( - com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec - other) { - if (other - == com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec - .getDefaultInstance()) return this; - if (other.getSummaryResultCount() != 0) { - setSummaryResultCount(other.getSummaryResultCount()); - } - if (other.getIncludeCitations() != false) { - setIncludeCitations(other.getIncludeCitations()); - } - if (other.getIgnoreAdversarialQuery() != false) { - setIgnoreAdversarialQuery(other.getIgnoreAdversarialQuery()); - } - if (other.getIgnoreNonSummarySeekingQuery() != false) { - setIgnoreNonSummarySeekingQuery(other.getIgnoreNonSummarySeekingQuery()); - } - if (other.getIgnoreLowRelevantContent() != false) { - setIgnoreLowRelevantContent(other.getIgnoreLowRelevantContent()); - } - if (other.getIgnoreJailBreakingQuery() != false) { - setIgnoreJailBreakingQuery(other.getIgnoreJailBreakingQuery()); - } - if (other.hasModelPromptSpec()) { - mergeModelPromptSpec(other.getModelPromptSpec()); - } - if (!other.getLanguageCode().isEmpty()) { - languageCode_ = other.languageCode_; - bitField0_ |= 0x00000080; - onChanged(); - } - if (other.hasModelSpec()) { - mergeModelSpec(other.getModelSpec()); - } - if (other.getUseSemanticChunks() != false) { - setUseSemanticChunks(other.getUseSemanticChunks()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } + /** + * + * + *
            +       * The number of top results to generate the summary from. If the number
            +       * of results returned is less than `summaryResultCount`, the summary is
            +       * generated from all of the results.
            +       *
            +       * At most 10 results for documents mode, or 50 for chunks mode, can be
            +       * used to generate a summary. The chunks mode is used when
            +       * [SearchRequest.ContentSearchSpec.search_result_mode][google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.search_result_mode]
            +       * is set to
            +       * [CHUNKS][google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SearchResultMode.CHUNKS].
            +       * 
            + * + * int32 summary_result_count = 1; + * + * @return The summaryResultCount. + */ + @java.lang.Override + public int getSummaryResultCount() { + return summaryResultCount_; + } - @java.lang.Override - public final boolean isInitialized() { - return true; - } + public static final int INCLUDE_CITATIONS_FIELD_NUMBER = 2; + private boolean includeCitations_ = false; - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: - { - summaryResultCount_ = input.readInt32(); - bitField0_ |= 0x00000001; - break; - } // case 8 - case 16: - { - includeCitations_ = input.readBool(); - bitField0_ |= 0x00000002; - break; - } // case 16 - case 24: - { - ignoreAdversarialQuery_ = input.readBool(); - bitField0_ |= 0x00000004; - break; - } // case 24 - case 32: - { - ignoreNonSummarySeekingQuery_ = input.readBool(); - bitField0_ |= 0x00000008; - break; - } // case 32 - case 42: - { - input.readMessage( - internalGetModelPromptSpecFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000040; - break; - } // case 42 - case 50: - { - languageCode_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000080; - break; - } // case 50 - case 58: - { - input.readMessage( - internalGetModelSpecFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000100; - break; - } // case 58 - case 64: - { - useSemanticChunks_ = input.readBool(); - bitField0_ |= 0x00000200; - break; - } // case 64 - case 72: - { - ignoreLowRelevantContent_ = input.readBool(); - bitField0_ |= 0x00000010; - break; - } // case 72 - case 80: - { - ignoreJailBreakingQuery_ = input.readBool(); - bitField0_ |= 0x00000020; - break; - } // case 80 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } + /** + * + * + *
            +       * Specifies whether to include citations in the summary. The default
            +       * value is `false`.
            +       *
            +       * When this field is set to `true`, summaries include in-line citation
            +       * numbers.
            +       *
            +       * Example summary including citations:
            +       *
            +       * BigQuery is Google Cloud's fully managed and completely serverless
            +       * enterprise data warehouse [1]. BigQuery supports all data types, works
            +       * across clouds, and has built-in machine learning and business
            +       * intelligence, all within a unified platform [2, 3].
            +       *
            +       * The citation numbers refer to the returned search results and are
            +       * 1-indexed. For example, [1] means that the sentence is attributed to
            +       * the first search result. [2, 3] means that the sentence is attributed
            +       * to both the second and third search results.
            +       * 
            + * + * bool include_citations = 2; + * + * @return The includeCitations. + */ + @java.lang.Override + public boolean getIncludeCitations() { + return includeCitations_; + } - private int bitField0_; + public static final int IGNORE_ADVERSARIAL_QUERY_FIELD_NUMBER = 3; + private boolean ignoreAdversarialQuery_ = false; - private int summaryResultCount_; + /** + * + * + *
            +       * Specifies whether to filter out adversarial queries. The default value
            +       * is `false`.
            +       *
            +       * Google employs search-query classification to detect adversarial
            +       * queries. No summary is returned if the search query is classified as an
            +       * adversarial query. For example, a user might ask a question regarding
            +       * negative comments about the company or submit a query designed to
            +       * generate unsafe, policy-violating output. If this field is set to
            +       * `true`, we skip generating summaries for adversarial queries and return
            +       * fallback messages instead.
            +       * 
            + * + * bool ignore_adversarial_query = 3; + * + * @return The ignoreAdversarialQuery. + */ + @java.lang.Override + public boolean getIgnoreAdversarialQuery() { + return ignoreAdversarialQuery_; + } - /** - * - * - *
            -         * The number of top results to generate the summary from. If the number
            -         * of results returned is less than `summaryResultCount`, the summary is
            -         * generated from all of the results.
            -         *
            -         * At most 10 results for documents mode, or 50 for chunks mode, can be
            -         * used to generate a summary. The chunks mode is used when
            -         * [SearchRequest.ContentSearchSpec.search_result_mode][google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.search_result_mode]
            -         * is set to
            -         * [CHUNKS][google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SearchResultMode.CHUNKS].
            -         * 
            - * - * int32 summary_result_count = 1; - * - * @return The summaryResultCount. - */ - @java.lang.Override - public int getSummaryResultCount() { - return summaryResultCount_; - } + public static final int IGNORE_NON_SUMMARY_SEEKING_QUERY_FIELD_NUMBER = 4; + private boolean ignoreNonSummarySeekingQuery_ = false; - /** - * - * - *
            -         * The number of top results to generate the summary from. If the number
            -         * of results returned is less than `summaryResultCount`, the summary is
            -         * generated from all of the results.
            -         *
            -         * At most 10 results for documents mode, or 50 for chunks mode, can be
            -         * used to generate a summary. The chunks mode is used when
            -         * [SearchRequest.ContentSearchSpec.search_result_mode][google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.search_result_mode]
            -         * is set to
            -         * [CHUNKS][google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SearchResultMode.CHUNKS].
            -         * 
            - * - * int32 summary_result_count = 1; - * - * @param value The summaryResultCount to set. - * @return This builder for chaining. - */ - public Builder setSummaryResultCount(int value) { + /** + * + * + *
            +       * Specifies whether to filter out queries that are not summary-seeking.
            +       * The default value is `false`.
            +       *
            +       * Google employs search-query classification to detect summary-seeking
            +       * queries. No summary is returned if the search query is classified as a
            +       * non-summary seeking query. For example, `why is the sky blue` and `Who
            +       * is the best soccer player in the world?` are summary-seeking queries,
            +       * but `SFO airport` and `world cup 2026` are not. They are most likely
            +       * navigational queries. If this field is set to `true`, we skip
            +       * generating summaries for non-summary seeking queries and return
            +       * fallback messages instead.
            +       * 
            + * + * bool ignore_non_summary_seeking_query = 4; + * + * @return The ignoreNonSummarySeekingQuery. + */ + @java.lang.Override + public boolean getIgnoreNonSummarySeekingQuery() { + return ignoreNonSummarySeekingQuery_; + } - summaryResultCount_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } + public static final int IGNORE_LOW_RELEVANT_CONTENT_FIELD_NUMBER = 9; + private boolean ignoreLowRelevantContent_ = false; - /** - * - * - *
            -         * The number of top results to generate the summary from. If the number
            -         * of results returned is less than `summaryResultCount`, the summary is
            -         * generated from all of the results.
            -         *
            -         * At most 10 results for documents mode, or 50 for chunks mode, can be
            -         * used to generate a summary. The chunks mode is used when
            -         * [SearchRequest.ContentSearchSpec.search_result_mode][google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.search_result_mode]
            -         * is set to
            -         * [CHUNKS][google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SearchResultMode.CHUNKS].
            -         * 
            - * - * int32 summary_result_count = 1; - * - * @return This builder for chaining. - */ - public Builder clearSummaryResultCount() { - bitField0_ = (bitField0_ & ~0x00000001); - summaryResultCount_ = 0; - onChanged(); - return this; - } + /** + * + * + *
            +       * Specifies whether to filter out queries that have low relevance. The
            +       * default value is `false`.
            +       *
            +       * If this field is set to `false`, all search results are used regardless
            +       * of relevance to generate answers. If set to `true`, only queries with
            +       * high relevance search results will generate answers.
            +       * 
            + * + * bool ignore_low_relevant_content = 9; + * + * @return The ignoreLowRelevantContent. + */ + @java.lang.Override + public boolean getIgnoreLowRelevantContent() { + return ignoreLowRelevantContent_; + } - private boolean includeCitations_; + public static final int IGNORE_JAIL_BREAKING_QUERY_FIELD_NUMBER = 10; + private boolean ignoreJailBreakingQuery_ = false; - /** - * - * - *
            -         * Specifies whether to include citations in the summary. The default
            -         * value is `false`.
            -         *
            -         * When this field is set to `true`, summaries include in-line citation
            -         * numbers.
            -         *
            -         * Example summary including citations:
            -         *
            -         * BigQuery is Google Cloud's fully managed and completely serverless
            -         * enterprise data warehouse [1]. BigQuery supports all data types, works
            -         * across clouds, and has built-in machine learning and business
            -         * intelligence, all within a unified platform [2, 3].
            -         *
            -         * The citation numbers refer to the returned search results and are
            -         * 1-indexed. For example, [1] means that the sentence is attributed to
            -         * the first search result. [2, 3] means that the sentence is attributed
            -         * to both the second and third search results.
            -         * 
            - * - * bool include_citations = 2; - * - * @return The includeCitations. - */ - @java.lang.Override - public boolean getIncludeCitations() { - return includeCitations_; - } + /** + * + * + *
            +       * Optional. Specifies whether to filter out jail-breaking queries. The
            +       * default value is `false`.
            +       *
            +       * Google employs search-query classification to detect jail-breaking
            +       * queries. No summary is returned if the search query is classified as a
            +       * jail-breaking query. A user might add instructions to the query to
            +       * change the tone, style, language, content of the answer, or ask the
            +       * model to act as a different entity, e.g. "Reply in the tone of a
            +       * competing company's CEO". If this field is set to `true`, we skip
            +       * generating summaries for jail-breaking queries and return fallback
            +       * messages instead.
            +       * 
            + * + * bool ignore_jail_breaking_query = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The ignoreJailBreakingQuery. + */ + @java.lang.Override + public boolean getIgnoreJailBreakingQuery() { + return ignoreJailBreakingQuery_; + } - /** - * - * - *
            -         * Specifies whether to include citations in the summary. The default
            -         * value is `false`.
            -         *
            -         * When this field is set to `true`, summaries include in-line citation
            -         * numbers.
            -         *
            -         * Example summary including citations:
            -         *
            -         * BigQuery is Google Cloud's fully managed and completely serverless
            -         * enterprise data warehouse [1]. BigQuery supports all data types, works
            -         * across clouds, and has built-in machine learning and business
            -         * intelligence, all within a unified platform [2, 3].
            -         *
            -         * The citation numbers refer to the returned search results and are
            -         * 1-indexed. For example, [1] means that the sentence is attributed to
            -         * the first search result. [2, 3] means that the sentence is attributed
            -         * to both the second and third search results.
            -         * 
            - * - * bool include_citations = 2; - * - * @param value The includeCitations to set. - * @return This builder for chaining. - */ - public Builder setIncludeCitations(boolean value) { + public static final int MULTIMODAL_SPEC_FIELD_NUMBER = 11; + private com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec + .MultiModalSpec + multimodalSpec_; - includeCitations_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } + /** + * + * + *
            +       * Optional. Multimodal specification.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec.MultiModalSpec multimodal_spec = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the multimodalSpec field is set. + */ + @java.lang.Override + public boolean hasMultimodalSpec() { + return ((bitField0_ & 0x00000001) != 0); + } - /** - * - * - *
            -         * Specifies whether to include citations in the summary. The default
            -         * value is `false`.
            -         *
            -         * When this field is set to `true`, summaries include in-line citation
            -         * numbers.
            -         *
            -         * Example summary including citations:
            -         *
            -         * BigQuery is Google Cloud's fully managed and completely serverless
            -         * enterprise data warehouse [1]. BigQuery supports all data types, works
            -         * across clouds, and has built-in machine learning and business
            -         * intelligence, all within a unified platform [2, 3].
            -         *
            -         * The citation numbers refer to the returned search results and are
            -         * 1-indexed. For example, [1] means that the sentence is attributed to
            -         * the first search result. [2, 3] means that the sentence is attributed
            -         * to both the second and third search results.
            -         * 
            - * - * bool include_citations = 2; - * - * @return This builder for chaining. - */ - public Builder clearIncludeCitations() { - bitField0_ = (bitField0_ & ~0x00000002); - includeCitations_ = false; - onChanged(); - return this; - } - - private boolean ignoreAdversarialQuery_; + /** + * + * + *
            +       * Optional. Multimodal specification.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec.MultiModalSpec multimodal_spec = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The multimodalSpec. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec + .MultiModalSpec + getMultimodalSpec() { + return multimodalSpec_ == null + ? com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec + .MultiModalSpec.getDefaultInstance() + : multimodalSpec_; + } - /** - * - * - *
            -         * Specifies whether to filter out adversarial queries. The default value
            -         * is `false`.
            -         *
            -         * Google employs search-query classification to detect adversarial
            -         * queries. No summary is returned if the search query is classified as an
            -         * adversarial query. For example, a user might ask a question regarding
            -         * negative comments about the company or submit a query designed to
            -         * generate unsafe, policy-violating output. If this field is set to
            -         * `true`, we skip generating summaries for adversarial queries and return
            -         * fallback messages instead.
            -         * 
            - * - * bool ignore_adversarial_query = 3; - * - * @return The ignoreAdversarialQuery. - */ - @java.lang.Override - public boolean getIgnoreAdversarialQuery() { - return ignoreAdversarialQuery_; - } + /** + * + * + *
            +       * Optional. Multimodal specification.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec.MultiModalSpec multimodal_spec = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec + .MultiModalSpecOrBuilder + getMultimodalSpecOrBuilder() { + return multimodalSpec_ == null + ? com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec + .MultiModalSpec.getDefaultInstance() + : multimodalSpec_; + } - /** - * - * - *
            -         * Specifies whether to filter out adversarial queries. The default value
            -         * is `false`.
            -         *
            -         * Google employs search-query classification to detect adversarial
            -         * queries. No summary is returned if the search query is classified as an
            -         * adversarial query. For example, a user might ask a question regarding
            -         * negative comments about the company or submit a query designed to
            -         * generate unsafe, policy-violating output. If this field is set to
            -         * `true`, we skip generating summaries for adversarial queries and return
            -         * fallback messages instead.
            -         * 
            - * - * bool ignore_adversarial_query = 3; - * - * @param value The ignoreAdversarialQuery to set. - * @return This builder for chaining. - */ - public Builder setIgnoreAdversarialQuery(boolean value) { + public static final int MODEL_PROMPT_SPEC_FIELD_NUMBER = 5; + private com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec + .ModelPromptSpec + modelPromptSpec_; - ignoreAdversarialQuery_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } + /** + * + * + *
            +       * If specified, the spec will be used to modify the prompt provided to
            +       * the LLM.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec.ModelPromptSpec model_prompt_spec = 5; + * + * + * @return Whether the modelPromptSpec field is set. + */ + @java.lang.Override + public boolean hasModelPromptSpec() { + return ((bitField0_ & 0x00000002) != 0); + } - /** - * - * - *
            -         * Specifies whether to filter out adversarial queries. The default value
            -         * is `false`.
            -         *
            -         * Google employs search-query classification to detect adversarial
            -         * queries. No summary is returned if the search query is classified as an
            -         * adversarial query. For example, a user might ask a question regarding
            -         * negative comments about the company or submit a query designed to
            -         * generate unsafe, policy-violating output. If this field is set to
            -         * `true`, we skip generating summaries for adversarial queries and return
            -         * fallback messages instead.
            -         * 
            - * - * bool ignore_adversarial_query = 3; - * - * @return This builder for chaining. - */ - public Builder clearIgnoreAdversarialQuery() { - bitField0_ = (bitField0_ & ~0x00000004); - ignoreAdversarialQuery_ = false; - onChanged(); - return this; - } + /** + * + * + *
            +       * If specified, the spec will be used to modify the prompt provided to
            +       * the LLM.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec.ModelPromptSpec model_prompt_spec = 5; + * + * + * @return The modelPromptSpec. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec + .ModelPromptSpec + getModelPromptSpec() { + return modelPromptSpec_ == null + ? com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec + .ModelPromptSpec.getDefaultInstance() + : modelPromptSpec_; + } - private boolean ignoreNonSummarySeekingQuery_; + /** + * + * + *
            +       * If specified, the spec will be used to modify the prompt provided to
            +       * the LLM.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec.ModelPromptSpec model_prompt_spec = 5; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec + .ModelPromptSpecOrBuilder + getModelPromptSpecOrBuilder() { + return modelPromptSpec_ == null + ? com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec + .ModelPromptSpec.getDefaultInstance() + : modelPromptSpec_; + } - /** - * - * - *
            -         * Specifies whether to filter out queries that are not summary-seeking.
            -         * The default value is `false`.
            -         *
            -         * Google employs search-query classification to detect summary-seeking
            -         * queries. No summary is returned if the search query is classified as a
            -         * non-summary seeking query. For example, `why is the sky blue` and `Who
            -         * is the best soccer player in the world?` are summary-seeking queries,
            -         * but `SFO airport` and `world cup 2026` are not. They are most likely
            -         * navigational queries. If this field is set to `true`, we skip
            -         * generating summaries for non-summary seeking queries and return
            -         * fallback messages instead.
            -         * 
            - * - * bool ignore_non_summary_seeking_query = 4; - * - * @return The ignoreNonSummarySeekingQuery. - */ - @java.lang.Override - public boolean getIgnoreNonSummarySeekingQuery() { - return ignoreNonSummarySeekingQuery_; - } + public static final int LANGUAGE_CODE_FIELD_NUMBER = 6; - /** - * - * - *
            -         * Specifies whether to filter out queries that are not summary-seeking.
            -         * The default value is `false`.
            -         *
            -         * Google employs search-query classification to detect summary-seeking
            -         * queries. No summary is returned if the search query is classified as a
            -         * non-summary seeking query. For example, `why is the sky blue` and `Who
            -         * is the best soccer player in the world?` are summary-seeking queries,
            -         * but `SFO airport` and `world cup 2026` are not. They are most likely
            -         * navigational queries. If this field is set to `true`, we skip
            -         * generating summaries for non-summary seeking queries and return
            -         * fallback messages instead.
            -         * 
            - * - * bool ignore_non_summary_seeking_query = 4; - * - * @param value The ignoreNonSummarySeekingQuery to set. - * @return This builder for chaining. - */ - public Builder setIgnoreNonSummarySeekingQuery(boolean value) { + @SuppressWarnings("serial") + private volatile java.lang.Object languageCode_ = ""; - ignoreNonSummarySeekingQuery_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; + /** + * + * + *
            +       * Language code for Summary. Use language tags defined by
            +       * [BCP47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt).
            +       * Note: This is an experimental feature.
            +       * 
            + * + * string language_code = 6; + * + * @return The languageCode. + */ + @java.lang.Override + public java.lang.String getLanguageCode() { + java.lang.Object ref = languageCode_; + 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(); + languageCode_ = s; + return s; } + } - /** - * - * - *
            -         * Specifies whether to filter out queries that are not summary-seeking.
            -         * The default value is `false`.
            -         *
            -         * Google employs search-query classification to detect summary-seeking
            -         * queries. No summary is returned if the search query is classified as a
            -         * non-summary seeking query. For example, `why is the sky blue` and `Who
            -         * is the best soccer player in the world?` are summary-seeking queries,
            -         * but `SFO airport` and `world cup 2026` are not. They are most likely
            -         * navigational queries. If this field is set to `true`, we skip
            -         * generating summaries for non-summary seeking queries and return
            -         * fallback messages instead.
            -         * 
            - * - * bool ignore_non_summary_seeking_query = 4; - * - * @return This builder for chaining. - */ - public Builder clearIgnoreNonSummarySeekingQuery() { - bitField0_ = (bitField0_ & ~0x00000008); - ignoreNonSummarySeekingQuery_ = false; - onChanged(); - return this; + /** + * + * + *
            +       * Language code for Summary. Use language tags defined by
            +       * [BCP47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt).
            +       * Note: This is an experimental feature.
            +       * 
            + * + * string language_code = 6; + * + * @return The bytes for languageCode. + */ + @java.lang.Override + public com.google.protobuf.ByteString getLanguageCodeBytes() { + java.lang.Object ref = languageCode_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + languageCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; } + } - private boolean ignoreLowRelevantContent_; + public static final int MODEL_SPEC_FIELD_NUMBER = 7; + private com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec + .ModelSpec + modelSpec_; - /** - * - * - *
            -         * Specifies whether to filter out queries that have low relevance. The
            -         * default value is `false`.
            -         *
            -         * If this field is set to `false`, all search results are used regardless
            -         * of relevance to generate answers. If set to `true`, only queries with
            -         * high relevance search results will generate answers.
            -         * 
            - * - * bool ignore_low_relevant_content = 9; - * - * @return The ignoreLowRelevantContent. - */ - @java.lang.Override - public boolean getIgnoreLowRelevantContent() { - return ignoreLowRelevantContent_; - } + /** + * + * + *
            +       * If specified, the spec will be used to modify the model specification
            +       * provided to the LLM.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec.ModelSpec model_spec = 7; + * + * + * @return Whether the modelSpec field is set. + */ + @java.lang.Override + public boolean hasModelSpec() { + return ((bitField0_ & 0x00000004) != 0); + } - /** - * - * - *
            -         * Specifies whether to filter out queries that have low relevance. The
            -         * default value is `false`.
            -         *
            -         * If this field is set to `false`, all search results are used regardless
            -         * of relevance to generate answers. If set to `true`, only queries with
            -         * high relevance search results will generate answers.
            -         * 
            - * - * bool ignore_low_relevant_content = 9; - * - * @param value The ignoreLowRelevantContent to set. - * @return This builder for chaining. - */ - public Builder setIgnoreLowRelevantContent(boolean value) { + /** + * + * + *
            +       * If specified, the spec will be used to modify the model specification
            +       * provided to the LLM.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec.ModelSpec model_spec = 7; + * + * + * @return The modelSpec. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec + .ModelSpec + getModelSpec() { + return modelSpec_ == null + ? com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec + .ModelSpec.getDefaultInstance() + : modelSpec_; + } - ignoreLowRelevantContent_ = value; - bitField0_ |= 0x00000010; - onChanged(); - return this; - } + /** + * + * + *
            +       * If specified, the spec will be used to modify the model specification
            +       * provided to the LLM.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec.ModelSpec model_spec = 7; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec + .ModelSpecOrBuilder + getModelSpecOrBuilder() { + return modelSpec_ == null + ? com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec + .ModelSpec.getDefaultInstance() + : modelSpec_; + } - /** - * - * - *
            -         * Specifies whether to filter out queries that have low relevance. The
            -         * default value is `false`.
            -         *
            -         * If this field is set to `false`, all search results are used regardless
            -         * of relevance to generate answers. If set to `true`, only queries with
            -         * high relevance search results will generate answers.
            -         * 
            - * - * bool ignore_low_relevant_content = 9; - * - * @return This builder for chaining. - */ - public Builder clearIgnoreLowRelevantContent() { - bitField0_ = (bitField0_ & ~0x00000010); - ignoreLowRelevantContent_ = false; - onChanged(); - return this; - } + public static final int USE_SEMANTIC_CHUNKS_FIELD_NUMBER = 8; + private boolean useSemanticChunks_ = false; - private boolean ignoreJailBreakingQuery_; + /** + * + * + *
            +       * If true, answer will be generated from most relevant chunks from top
            +       * search results. This feature will improve summary quality.
            +       * Note that with this feature enabled, not all top search results
            +       * will be referenced and included in the reference list, so the citation
            +       * source index only points to the search results listed in the reference
            +       * list.
            +       * 
            + * + * bool use_semantic_chunks = 8; + * + * @return The useSemanticChunks. + */ + @java.lang.Override + public boolean getUseSemanticChunks() { + return useSemanticChunks_; + } - /** - * - * - *
            -         * Optional. Specifies whether to filter out jail-breaking queries. The
            -         * default value is `false`.
            -         *
            -         * Google employs search-query classification to detect jail-breaking
            -         * queries. No summary is returned if the search query is classified as a
            -         * jail-breaking query. A user might add instructions to the query to
            -         * change the tone, style, language, content of the answer, or ask the
            -         * model to act as a different entity, e.g. "Reply in the tone of a
            -         * competing company's CEO". If this field is set to `true`, we skip
            -         * generating summaries for jail-breaking queries and return fallback
            -         * messages instead.
            -         * 
            - * - * bool ignore_jail_breaking_query = 10 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The ignoreJailBreakingQuery. - */ - @java.lang.Override - public boolean getIgnoreJailBreakingQuery() { - return ignoreJailBreakingQuery_; - } + private byte memoizedIsInitialized = -1; - /** - * - * - *
            -         * Optional. Specifies whether to filter out jail-breaking queries. The
            -         * default value is `false`.
            -         *
            -         * Google employs search-query classification to detect jail-breaking
            -         * queries. No summary is returned if the search query is classified as a
            -         * jail-breaking query. A user might add instructions to the query to
            -         * change the tone, style, language, content of the answer, or ask the
            -         * model to act as a different entity, e.g. "Reply in the tone of a
            -         * competing company's CEO". If this field is set to `true`, we skip
            -         * generating summaries for jail-breaking queries and return fallback
            -         * messages instead.
            -         * 
            - * - * bool ignore_jail_breaking_query = 10 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @param value The ignoreJailBreakingQuery to set. - * @return This builder for chaining. - */ - public Builder setIgnoreJailBreakingQuery(boolean value) { + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; - ignoreJailBreakingQuery_ = value; - bitField0_ |= 0x00000020; - onChanged(); - return this; - } + memoizedIsInitialized = 1; + return true; + } - /** - * - * - *
            -         * Optional. Specifies whether to filter out jail-breaking queries. The
            -         * default value is `false`.
            -         *
            -         * Google employs search-query classification to detect jail-breaking
            -         * queries. No summary is returned if the search query is classified as a
            -         * jail-breaking query. A user might add instructions to the query to
            -         * change the tone, style, language, content of the answer, or ask the
            -         * model to act as a different entity, e.g. "Reply in the tone of a
            -         * competing company's CEO". If this field is set to `true`, we skip
            -         * generating summaries for jail-breaking queries and return fallback
            -         * messages instead.
            -         * 
            - * - * bool ignore_jail_breaking_query = 10 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return This builder for chaining. - */ - public Builder clearIgnoreJailBreakingQuery() { - bitField0_ = (bitField0_ & ~0x00000020); - ignoreJailBreakingQuery_ = false; - onChanged(); - return this; + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (summaryResultCount_ != 0) { + output.writeInt32(1, summaryResultCount_); } - - private com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec - .ModelPromptSpec - modelPromptSpec_; - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec - .ModelPromptSpec, - com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec - .ModelPromptSpec.Builder, - com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec - .ModelPromptSpecOrBuilder> - modelPromptSpecBuilder_; - - /** - * - * - *
            -         * If specified, the spec will be used to modify the prompt provided to
            -         * the LLM.
            -         * 
            - * - * - * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec.ModelPromptSpec model_prompt_spec = 5; - * - * - * @return Whether the modelPromptSpec field is set. - */ - public boolean hasModelPromptSpec() { - return ((bitField0_ & 0x00000040) != 0); + if (includeCitations_ != false) { + output.writeBool(2, includeCitations_); } - - /** - * - * - *
            -         * If specified, the spec will be used to modify the prompt provided to
            -         * the LLM.
            -         * 
            - * - * - * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec.ModelPromptSpec model_prompt_spec = 5; - * - * - * @return The modelPromptSpec. - */ - public com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec - .ModelPromptSpec - getModelPromptSpec() { - if (modelPromptSpecBuilder_ == null) { - return modelPromptSpec_ == null - ? com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec - .SummarySpec.ModelPromptSpec.getDefaultInstance() - : modelPromptSpec_; - } else { - return modelPromptSpecBuilder_.getMessage(); - } + if (ignoreAdversarialQuery_ != false) { + output.writeBool(3, ignoreAdversarialQuery_); } - - /** - * - * - *
            -         * If specified, the spec will be used to modify the prompt provided to
            -         * the LLM.
            -         * 
            - * - * - * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec.ModelPromptSpec model_prompt_spec = 5; - * - */ - public Builder setModelPromptSpec( - com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec - .ModelPromptSpec - value) { - if (modelPromptSpecBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - modelPromptSpec_ = value; - } else { - modelPromptSpecBuilder_.setMessage(value); - } - bitField0_ |= 0x00000040; - onChanged(); - return this; + if (ignoreNonSummarySeekingQuery_ != false) { + output.writeBool(4, ignoreNonSummarySeekingQuery_); } - - /** - * - * - *
            -         * If specified, the spec will be used to modify the prompt provided to
            -         * the LLM.
            -         * 
            - * - * - * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec.ModelPromptSpec model_prompt_spec = 5; - * - */ - public Builder setModelPromptSpec( - com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec - .ModelPromptSpec.Builder - builderForValue) { - if (modelPromptSpecBuilder_ == null) { - modelPromptSpec_ = builderForValue.build(); - } else { - modelPromptSpecBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000040; - onChanged(); - return this; + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(5, getModelPromptSpec()); } - - /** - * - * - *
            -         * If specified, the spec will be used to modify the prompt provided to
            -         * the LLM.
            -         * 
            - * - * - * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec.ModelPromptSpec model_prompt_spec = 5; - * - */ - public Builder mergeModelPromptSpec( - com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec - .ModelPromptSpec - value) { - if (modelPromptSpecBuilder_ == null) { - if (((bitField0_ & 0x00000040) != 0) - && modelPromptSpec_ != null - && modelPromptSpec_ - != com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec - .SummarySpec.ModelPromptSpec.getDefaultInstance()) { - getModelPromptSpecBuilder().mergeFrom(value); - } else { - modelPromptSpec_ = value; - } - } else { - modelPromptSpecBuilder_.mergeFrom(value); - } - if (modelPromptSpec_ != null) { - bitField0_ |= 0x00000040; - onChanged(); - } - return this; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(languageCode_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 6, languageCode_); } - - /** - * - * - *
            -         * If specified, the spec will be used to modify the prompt provided to
            -         * the LLM.
            -         * 
            - * - * - * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec.ModelPromptSpec model_prompt_spec = 5; - * - */ - public Builder clearModelPromptSpec() { - bitField0_ = (bitField0_ & ~0x00000040); - modelPromptSpec_ = null; - if (modelPromptSpecBuilder_ != null) { - modelPromptSpecBuilder_.dispose(); - modelPromptSpecBuilder_ = null; - } - onChanged(); - return this; + if (((bitField0_ & 0x00000004) != 0)) { + output.writeMessage(7, getModelSpec()); } - - /** - * - * - *
            -         * If specified, the spec will be used to modify the prompt provided to
            -         * the LLM.
            -         * 
            - * - * - * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec.ModelPromptSpec model_prompt_spec = 5; - * - */ - public com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec - .ModelPromptSpec.Builder - getModelPromptSpecBuilder() { - bitField0_ |= 0x00000040; - onChanged(); - return internalGetModelPromptSpecFieldBuilder().getBuilder(); + if (useSemanticChunks_ != false) { + output.writeBool(8, useSemanticChunks_); } - - /** - * - * - *
            -         * If specified, the spec will be used to modify the prompt provided to
            -         * the LLM.
            -         * 
            - * - * - * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec.ModelPromptSpec model_prompt_spec = 5; - * - */ - public com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec - .ModelPromptSpecOrBuilder - getModelPromptSpecOrBuilder() { - if (modelPromptSpecBuilder_ != null) { - return modelPromptSpecBuilder_.getMessageOrBuilder(); - } else { - return modelPromptSpec_ == null - ? com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec - .SummarySpec.ModelPromptSpec.getDefaultInstance() - : modelPromptSpec_; - } + if (ignoreLowRelevantContent_ != false) { + output.writeBool(9, ignoreLowRelevantContent_); } - - /** - * - * - *
            -         * If specified, the spec will be used to modify the prompt provided to
            -         * the LLM.
            -         * 
            - * - * - * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec.ModelPromptSpec model_prompt_spec = 5; - * - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec - .ModelPromptSpec, - com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec - .ModelPromptSpec.Builder, - com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec - .ModelPromptSpecOrBuilder> - internalGetModelPromptSpecFieldBuilder() { - if (modelPromptSpecBuilder_ == null) { - modelPromptSpecBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec - .SummarySpec.ModelPromptSpec, - com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec - .SummarySpec.ModelPromptSpec.Builder, - com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec - .SummarySpec.ModelPromptSpecOrBuilder>( - getModelPromptSpec(), getParentForChildren(), isClean()); - modelPromptSpec_ = null; - } - return modelPromptSpecBuilder_; + if (ignoreJailBreakingQuery_ != false) { + output.writeBool(10, ignoreJailBreakingQuery_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(11, getMultimodalSpec()); } + getUnknownFields().writeTo(output); + } - private java.lang.Object languageCode_ = ""; + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; - /** - * - * - *
            -         * Language code for Summary. Use language tags defined by
            -         * [BCP47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt).
            -         * Note: This is an experimental feature.
            -         * 
            - * - * string language_code = 6; - * - * @return The languageCode. - */ - public java.lang.String getLanguageCode() { - java.lang.Object ref = languageCode_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - languageCode_ = s; - return s; - } else { - return (java.lang.String) ref; - } + size = 0; + if (summaryResultCount_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(1, summaryResultCount_); } - - /** - * - * - *
            -         * Language code for Summary. Use language tags defined by
            -         * [BCP47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt).
            -         * Note: This is an experimental feature.
            -         * 
            - * - * string language_code = 6; - * - * @return The bytes for languageCode. - */ - public com.google.protobuf.ByteString getLanguageCodeBytes() { - java.lang.Object ref = languageCode_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - languageCode_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } + if (includeCitations_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, includeCitations_); } - - /** - * - * - *
            -         * Language code for Summary. Use language tags defined by
            -         * [BCP47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt).
            -         * Note: This is an experimental feature.
            -         * 
            - * - * string language_code = 6; - * - * @param value The languageCode to set. - * @return This builder for chaining. - */ - public Builder setLanguageCode(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - languageCode_ = value; - bitField0_ |= 0x00000080; - onChanged(); - return this; + if (ignoreAdversarialQuery_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, ignoreAdversarialQuery_); } - - /** - * - * - *
            -         * Language code for Summary. Use language tags defined by
            -         * [BCP47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt).
            -         * Note: This is an experimental feature.
            -         * 
            - * - * string language_code = 6; - * - * @return This builder for chaining. - */ - public Builder clearLanguageCode() { - languageCode_ = getDefaultInstance().getLanguageCode(); - bitField0_ = (bitField0_ & ~0x00000080); - onChanged(); - return this; + if (ignoreNonSummarySeekingQuery_ != false) { + size += + com.google.protobuf.CodedOutputStream.computeBoolSize( + 4, ignoreNonSummarySeekingQuery_); } - - /** - * - * - *
            -         * Language code for Summary. Use language tags defined by
            -         * [BCP47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt).
            -         * Note: This is an experimental feature.
            -         * 
            - * - * string language_code = 6; - * - * @param value The bytes for languageCode to set. - * @return This builder for chaining. - */ - public Builder setLanguageCodeBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - languageCode_ = value; - bitField0_ |= 0x00000080; - onChanged(); - return this; + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getModelPromptSpec()); } - - private com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec - .ModelSpec - modelSpec_; - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec - .ModelSpec, - com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec - .ModelSpec.Builder, - com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec - .ModelSpecOrBuilder> - modelSpecBuilder_; - - /** - * - * - *
            -         * If specified, the spec will be used to modify the model specification
            -         * provided to the LLM.
            -         * 
            - * - * - * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec.ModelSpec model_spec = 7; - * - * - * @return Whether the modelSpec field is set. - */ - public boolean hasModelSpec() { - return ((bitField0_ & 0x00000100) != 0); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(languageCode_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(6, languageCode_); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getModelSpec()); + } + if (useSemanticChunks_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(8, useSemanticChunks_); + } + if (ignoreLowRelevantContent_ != false) { + size += + com.google.protobuf.CodedOutputStream.computeBoolSize(9, ignoreLowRelevantContent_); + } + if (ignoreJailBreakingQuery_ != false) { + size += + com.google.protobuf.CodedOutputStream.computeBoolSize(10, ignoreJailBreakingQuery_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(11, getMultimodalSpec()); } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } - /** - * - * - *
            -         * If specified, the spec will be used to modify the model specification
            -         * provided to the LLM.
            -         * 
            - * - * - * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec.ModelSpec model_spec = 7; - * - * - * @return The modelSpec. - */ - public com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec - .ModelSpec - getModelSpec() { - if (modelSpecBuilder_ == null) { - return modelSpec_ == null - ? com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec - .SummarySpec.ModelSpec.getDefaultInstance() - : modelSpec_; - } else { - return modelSpecBuilder_.getMessage(); - } + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; } - - /** - * - * - *
            -         * If specified, the spec will be used to modify the model specification
            -         * provided to the LLM.
            -         * 
            - * - * - * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec.ModelSpec model_spec = 7; - * - */ - public Builder setModelSpec( - com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec - .ModelSpec - value) { - if (modelSpecBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - modelSpec_ = value; - } else { - modelSpecBuilder_.setMessage(value); - } - bitField0_ |= 0x00000100; - onChanged(); - return this; + if (!(obj + instanceof + com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec)) { + return super.equals(obj); } + com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec other = + (com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec) + obj; - /** - * - * - *
            -         * If specified, the spec will be used to modify the model specification
            -         * provided to the LLM.
            -         * 
            - * - * - * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec.ModelSpec model_spec = 7; - * - */ - public Builder setModelSpec( - com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec - .ModelSpec.Builder - builderForValue) { - if (modelSpecBuilder_ == null) { - modelSpec_ = builderForValue.build(); - } else { - modelSpecBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000100; - onChanged(); - return this; + if (getSummaryResultCount() != other.getSummaryResultCount()) return false; + if (getIncludeCitations() != other.getIncludeCitations()) return false; + if (getIgnoreAdversarialQuery() != other.getIgnoreAdversarialQuery()) return false; + if (getIgnoreNonSummarySeekingQuery() != other.getIgnoreNonSummarySeekingQuery()) + return false; + if (getIgnoreLowRelevantContent() != other.getIgnoreLowRelevantContent()) return false; + if (getIgnoreJailBreakingQuery() != other.getIgnoreJailBreakingQuery()) return false; + if (hasMultimodalSpec() != other.hasMultimodalSpec()) return false; + if (hasMultimodalSpec()) { + if (!getMultimodalSpec().equals(other.getMultimodalSpec())) return false; } - - /** - * - * - *
            -         * If specified, the spec will be used to modify the model specification
            -         * provided to the LLM.
            -         * 
            - * - * - * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec.ModelSpec model_spec = 7; - * - */ - public Builder mergeModelSpec( - com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec - .ModelSpec - value) { - if (modelSpecBuilder_ == null) { - if (((bitField0_ & 0x00000100) != 0) - && modelSpec_ != null - && modelSpec_ - != com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec - .SummarySpec.ModelSpec.getDefaultInstance()) { - getModelSpecBuilder().mergeFrom(value); - } else { - modelSpec_ = value; - } - } else { - modelSpecBuilder_.mergeFrom(value); - } - if (modelSpec_ != null) { - bitField0_ |= 0x00000100; - onChanged(); - } - return this; + if (hasModelPromptSpec() != other.hasModelPromptSpec()) return false; + if (hasModelPromptSpec()) { + if (!getModelPromptSpec().equals(other.getModelPromptSpec())) return false; } - - /** - * - * - *
            -         * If specified, the spec will be used to modify the model specification
            -         * provided to the LLM.
            -         * 
            - * - * - * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec.ModelSpec model_spec = 7; - * - */ - public Builder clearModelSpec() { - bitField0_ = (bitField0_ & ~0x00000100); - modelSpec_ = null; - if (modelSpecBuilder_ != null) { - modelSpecBuilder_.dispose(); - modelSpecBuilder_ = null; - } - onChanged(); - return this; + if (!getLanguageCode().equals(other.getLanguageCode())) return false; + if (hasModelSpec() != other.hasModelSpec()) return false; + if (hasModelSpec()) { + if (!getModelSpec().equals(other.getModelSpec())) return false; } + if (getUseSemanticChunks() != other.getUseSemanticChunks()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } - /** - * - * - *
            -         * If specified, the spec will be used to modify the model specification
            -         * provided to the LLM.
            -         * 
            - * - * - * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec.ModelSpec model_spec = 7; - * - */ - public com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec - .ModelSpec.Builder - getModelSpecBuilder() { - bitField0_ |= 0x00000100; - onChanged(); - return internalGetModelSpecFieldBuilder().getBuilder(); + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; } - - /** - * - * - *
            -         * If specified, the spec will be used to modify the model specification
            -         * provided to the LLM.
            -         * 
            - * - * - * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec.ModelSpec model_spec = 7; - * - */ - public com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec - .ModelSpecOrBuilder - getModelSpecOrBuilder() { - if (modelSpecBuilder_ != null) { - return modelSpecBuilder_.getMessageOrBuilder(); - } else { - return modelSpec_ == null - ? com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec - .SummarySpec.ModelSpec.getDefaultInstance() - : modelSpec_; - } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + SUMMARY_RESULT_COUNT_FIELD_NUMBER; + hash = (53 * hash) + getSummaryResultCount(); + hash = (37 * hash) + INCLUDE_CITATIONS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getIncludeCitations()); + hash = (37 * hash) + IGNORE_ADVERSARIAL_QUERY_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getIgnoreAdversarialQuery()); + hash = (37 * hash) + IGNORE_NON_SUMMARY_SEEKING_QUERY_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashBoolean(getIgnoreNonSummarySeekingQuery()); + hash = (37 * hash) + IGNORE_LOW_RELEVANT_CONTENT_FIELD_NUMBER; + hash = + (53 * hash) + com.google.protobuf.Internal.hashBoolean(getIgnoreLowRelevantContent()); + hash = (37 * hash) + IGNORE_JAIL_BREAKING_QUERY_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getIgnoreJailBreakingQuery()); + if (hasMultimodalSpec()) { + hash = (37 * hash) + MULTIMODAL_SPEC_FIELD_NUMBER; + hash = (53 * hash) + getMultimodalSpec().hashCode(); } - - /** - * - * - *
            -         * If specified, the spec will be used to modify the model specification
            -         * provided to the LLM.
            -         * 
            - * - * - * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec.ModelSpec model_spec = 7; - * - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec - .ModelSpec, - com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec - .ModelSpec.Builder, - com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec - .ModelSpecOrBuilder> - internalGetModelSpecFieldBuilder() { - if (modelSpecBuilder_ == null) { - modelSpecBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec - .SummarySpec.ModelSpec, - com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec - .SummarySpec.ModelSpec.Builder, - com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec - .SummarySpec.ModelSpecOrBuilder>( - getModelSpec(), getParentForChildren(), isClean()); - modelSpec_ = null; - } - return modelSpecBuilder_; + if (hasModelPromptSpec()) { + hash = (37 * hash) + MODEL_PROMPT_SPEC_FIELD_NUMBER; + hash = (53 * hash) + getModelPromptSpec().hashCode(); + } + hash = (37 * hash) + LANGUAGE_CODE_FIELD_NUMBER; + hash = (53 * hash) + getLanguageCode().hashCode(); + if (hasModelSpec()) { + hash = (37 * hash) + MODEL_SPEC_FIELD_NUMBER; + hash = (53 * hash) + getModelSpec().hashCode(); } + hash = (37 * hash) + USE_SEMANTIC_CHUNKS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getUseSemanticChunks()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } - private boolean useSemanticChunks_; + public static com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec + .SummarySpec + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - /** - * - * - *
            -         * If true, answer will be generated from most relevant chunks from top
            -         * search results. This feature will improve summary quality.
            -         * Note that with this feature enabled, not all top search results
            -         * will be referenced and included in the reference list, so the citation
            -         * source index only points to the search results listed in the reference
            -         * list.
            -         * 
            - * - * bool use_semantic_chunks = 8; - * - * @return The useSemanticChunks. - */ - @java.lang.Override - public boolean getUseSemanticChunks() { - return useSemanticChunks_; - } + public static com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec + .SummarySpec + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - /** - * - * - *
            -         * If true, answer will be generated from most relevant chunks from top
            -         * search results. This feature will improve summary quality.
            -         * Note that with this feature enabled, not all top search results
            -         * will be referenced and included in the reference list, so the citation
            -         * source index only points to the search results listed in the reference
            -         * list.
            -         * 
            - * - * bool use_semantic_chunks = 8; - * - * @param value The useSemanticChunks to set. - * @return This builder for chaining. - */ - public Builder setUseSemanticChunks(boolean value) { + public static com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec + .SummarySpec + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - useSemanticChunks_ = value; - bitField0_ |= 0x00000200; - onChanged(); - return this; - } + public static com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec + .SummarySpec + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - /** - * - * - *
            -         * If true, answer will be generated from most relevant chunks from top
            -         * search results. This feature will improve summary quality.
            -         * Note that with this feature enabled, not all top search results
            -         * will be referenced and included in the reference list, so the citation
            -         * source index only points to the search results listed in the reference
            -         * list.
            -         * 
            - * - * bool use_semantic_chunks = 8; - * - * @return This builder for chaining. - */ - public Builder clearUseSemanticChunks() { - bitField0_ = (bitField0_ & ~0x00000200); - useSemanticChunks_ = false; - onChanged(); - return this; - } + public static com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec + .SummarySpec + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec) + public static com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec + .SummarySpec + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); } - // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec) - private static final com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec + public static com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec .SummarySpec - DEFAULT_INSTANCE; + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } - static { - DEFAULT_INSTANCE = - new com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec - .SummarySpec(); + public static com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec + .SummarySpec + 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.discoveryengine.v1beta.SearchRequest.ContentSearchSpec .SummarySpec - getDefaultInstance() { - return DEFAULT_INSTANCE; + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public SummarySpec parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException() - .setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; + public static com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec + .SummarySpec + 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.protobuf.Parser parser() { - return PARSER; + public static com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec + .SummarySpec + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec + .SummarySpec + 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 com.google.protobuf.Parser getParserForType() { - return PARSER; + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec + prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); } - } - public interface ExtractiveContentSpecOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.ExtractiveContentSpec) - com.google.protobuf.MessageOrBuilder { + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } /** * * *
            -       * The maximum number of extractive answers returned in each search
            -       * result.
            -       *
            -       * An extractive answer is a verbatim answer extracted from the original
            -       * document, which provides a precise and contextually relevant answer to
            -       * the search query.
            -       *
            -       * If the number of matching answers is less than the
            -       * `max_extractive_answer_count`, return all of the answers. Otherwise,
            -       * return the `max_extractive_answer_count`.
            -       *
            -       * At most five answers are returned for each
            -       * [SearchResult][google.cloud.discoveryengine.v1beta.SearchResponse.SearchResult].
            +       * A specification for configuring a summary returned in a search
            +       * response.
                    * 
            * - * int32 max_extractive_answer_count = 1; - * - * @return The maxExtractiveAnswerCount. + * Protobuf type {@code + * google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec} */ - int getMaxExtractiveAnswerCount(); + public static final class Builder + extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec) + com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec + .SummarySpecOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_ContentSearchSpec_SummarySpec_descriptor; + } - /** - * - * - *
            -       * The max number of extractive segments returned in each search result.
            -       * Only applied if the
            -       * [DataStore][google.cloud.discoveryengine.v1beta.DataStore] is set to
            -       * [DataStore.ContentConfig.CONTENT_REQUIRED][google.cloud.discoveryengine.v1beta.DataStore.ContentConfig.CONTENT_REQUIRED]
            -       * or
            -       * [DataStore.solution_types][google.cloud.discoveryengine.v1beta.DataStore.solution_types]
            -       * is
            -       * [SOLUTION_TYPE_CHAT][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_CHAT].
            -       *
            -       * An extractive segment is a text segment extracted from the original
            -       * document that is relevant to the search query, and, in general, more
            -       * verbose than an extractive answer. The segment could then be used as
            -       * input for LLMs to generate summaries and answers.
            -       *
            -       * If the number of matching segments is less than
            -       * `max_extractive_segment_count`, return all of the segments. Otherwise,
            -       * return the `max_extractive_segment_count`.
            -       * 
            - * - * int32 max_extractive_segment_count = 2; - * - * @return The maxExtractiveSegmentCount. - */ - int getMaxExtractiveSegmentCount(); - - /** - * - * - *
            -       * Specifies whether to return the confidence score from the extractive
            -       * segments in each search result. This feature is available only for new
            -       * or allowlisted data stores. To allowlist your data store,
            -       * contact your Customer Engineer. The default value is `false`.
            -       * 
            - * - * bool return_extractive_segment_score = 3; - * - * @return The returnExtractiveSegmentScore. - */ - boolean getReturnExtractiveSegmentScore(); - - /** - * - * - *
            -       * Specifies whether to also include the adjacent from each selected
            -       * segments.
            -       * Return at most `num_previous_segments` segments before each selected
            -       * segments.
            -       * 
            - * - * int32 num_previous_segments = 4; - * - * @return The numPreviousSegments. - */ - int getNumPreviousSegments(); - - /** - * - * - *
            -       * Return at most `num_next_segments` segments after each selected
            -       * segments.
            -       * 
            - * - * int32 num_next_segments = 5; - * - * @return The numNextSegments. - */ - int getNumNextSegments(); - } - - /** - * - * - *
            -     * A specification for configuring the extractive content in a search
            -     * response.
            -     * 
            - * - * Protobuf type {@code - * google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.ExtractiveContentSpec} - */ - public static final class ExtractiveContentSpec extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.ExtractiveContentSpec) - ExtractiveContentSpecOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "ExtractiveContentSpec"); - } - - // Use ExtractiveContentSpec.newBuilder() to construct. - private ExtractiveContentSpec(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private ExtractiveContentSpec() {} - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.discoveryengine.v1beta.SearchServiceProto - .internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_ContentSearchSpec_ExtractiveContentSpec_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.discoveryengine.v1beta.SearchServiceProto - .internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_ContentSearchSpec_ExtractiveContentSpec_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec - .ExtractiveContentSpec.class, - com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec - .ExtractiveContentSpec.Builder.class); - } - - public static final int MAX_EXTRACTIVE_ANSWER_COUNT_FIELD_NUMBER = 1; - private int maxExtractiveAnswerCount_ = 0; - - /** - * - * - *
            -       * The maximum number of extractive answers returned in each search
            -       * result.
            -       *
            -       * An extractive answer is a verbatim answer extracted from the original
            -       * document, which provides a precise and contextually relevant answer to
            -       * the search query.
            -       *
            -       * If the number of matching answers is less than the
            -       * `max_extractive_answer_count`, return all of the answers. Otherwise,
            -       * return the `max_extractive_answer_count`.
            -       *
            -       * At most five answers are returned for each
            -       * [SearchResult][google.cloud.discoveryengine.v1beta.SearchResponse.SearchResult].
            -       * 
            - * - * int32 max_extractive_answer_count = 1; - * - * @return The maxExtractiveAnswerCount. - */ - @java.lang.Override - public int getMaxExtractiveAnswerCount() { - return maxExtractiveAnswerCount_; - } - - public static final int MAX_EXTRACTIVE_SEGMENT_COUNT_FIELD_NUMBER = 2; - private int maxExtractiveSegmentCount_ = 0; - - /** - * - * - *
            -       * The max number of extractive segments returned in each search result.
            -       * Only applied if the
            -       * [DataStore][google.cloud.discoveryengine.v1beta.DataStore] is set to
            -       * [DataStore.ContentConfig.CONTENT_REQUIRED][google.cloud.discoveryengine.v1beta.DataStore.ContentConfig.CONTENT_REQUIRED]
            -       * or
            -       * [DataStore.solution_types][google.cloud.discoveryengine.v1beta.DataStore.solution_types]
            -       * is
            -       * [SOLUTION_TYPE_CHAT][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_CHAT].
            -       *
            -       * An extractive segment is a text segment extracted from the original
            -       * document that is relevant to the search query, and, in general, more
            -       * verbose than an extractive answer. The segment could then be used as
            -       * input for LLMs to generate summaries and answers.
            -       *
            -       * If the number of matching segments is less than
            -       * `max_extractive_segment_count`, return all of the segments. Otherwise,
            -       * return the `max_extractive_segment_count`.
            -       * 
            - * - * int32 max_extractive_segment_count = 2; - * - * @return The maxExtractiveSegmentCount. - */ - @java.lang.Override - public int getMaxExtractiveSegmentCount() { - return maxExtractiveSegmentCount_; - } - - public static final int RETURN_EXTRACTIVE_SEGMENT_SCORE_FIELD_NUMBER = 3; - private boolean returnExtractiveSegmentScore_ = false; - - /** - * - * - *
            -       * Specifies whether to return the confidence score from the extractive
            -       * segments in each search result. This feature is available only for new
            -       * or allowlisted data stores. To allowlist your data store,
            -       * contact your Customer Engineer. The default value is `false`.
            -       * 
            - * - * bool return_extractive_segment_score = 3; - * - * @return The returnExtractiveSegmentScore. - */ - @java.lang.Override - public boolean getReturnExtractiveSegmentScore() { - return returnExtractiveSegmentScore_; - } - - public static final int NUM_PREVIOUS_SEGMENTS_FIELD_NUMBER = 4; - private int numPreviousSegments_ = 0; - - /** - * - * - *
            -       * Specifies whether to also include the adjacent from each selected
            -       * segments.
            -       * Return at most `num_previous_segments` segments before each selected
            -       * segments.
            -       * 
            - * - * int32 num_previous_segments = 4; - * - * @return The numPreviousSegments. - */ - @java.lang.Override - public int getNumPreviousSegments() { - return numPreviousSegments_; - } - - public static final int NUM_NEXT_SEGMENTS_FIELD_NUMBER = 5; - private int numNextSegments_ = 0; - - /** - * - * - *
            -       * Return at most `num_next_segments` segments after each selected
            -       * segments.
            -       * 
            - * - * int32 num_next_segments = 5; - * - * @return The numNextSegments. - */ - @java.lang.Override - public int getNumNextSegments() { - return numNextSegments_; - } - - 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 + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_ContentSearchSpec_SummarySpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec + .SummarySpec.class, + com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec + .SummarySpec.Builder.class); + } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (maxExtractiveAnswerCount_ != 0) { - output.writeInt32(1, maxExtractiveAnswerCount_); + // Construct using + // com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); } - if (maxExtractiveSegmentCount_ != 0) { - output.writeInt32(2, maxExtractiveSegmentCount_); + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); } - if (returnExtractiveSegmentScore_ != false) { - output.writeBool(3, returnExtractiveSegmentScore_); + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetMultimodalSpecFieldBuilder(); + internalGetModelPromptSpecFieldBuilder(); + internalGetModelSpecFieldBuilder(); + } } - if (numPreviousSegments_ != 0) { - output.writeInt32(4, numPreviousSegments_); + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + summaryResultCount_ = 0; + includeCitations_ = false; + ignoreAdversarialQuery_ = false; + ignoreNonSummarySeekingQuery_ = false; + ignoreLowRelevantContent_ = false; + ignoreJailBreakingQuery_ = false; + multimodalSpec_ = null; + if (multimodalSpecBuilder_ != null) { + multimodalSpecBuilder_.dispose(); + multimodalSpecBuilder_ = null; + } + modelPromptSpec_ = null; + if (modelPromptSpecBuilder_ != null) { + modelPromptSpecBuilder_.dispose(); + modelPromptSpecBuilder_ = null; + } + languageCode_ = ""; + modelSpec_ = null; + if (modelSpecBuilder_ != null) { + modelSpecBuilder_.dispose(); + modelSpecBuilder_ = null; + } + useSemanticChunks_ = false; + return this; } - if (numNextSegments_ != 0) { - output.writeInt32(5, numNextSegments_); + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1beta.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_ContentSearchSpec_SummarySpec_descriptor; } - getUnknownFields().writeTo(output); - } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec + .getDefaultInstance(); + } - size = 0; - if (maxExtractiveAnswerCount_ != 0) { - size += - com.google.protobuf.CodedOutputStream.computeInt32Size(1, maxExtractiveAnswerCount_); + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec + build() { + com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; } - if (maxExtractiveSegmentCount_ != 0) { - size += - com.google.protobuf.CodedOutputStream.computeInt32Size(2, maxExtractiveSegmentCount_); + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec + buildPartial() { + com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec + result = + new com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec + .SummarySpec(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; } - if (returnExtractiveSegmentScore_ != false) { - size += - com.google.protobuf.CodedOutputStream.computeBoolSize( - 3, returnExtractiveSegmentScore_); + + private void buildPartial0( + com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec + result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.summaryResultCount_ = summaryResultCount_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.includeCitations_ = includeCitations_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.ignoreAdversarialQuery_ = ignoreAdversarialQuery_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.ignoreNonSummarySeekingQuery_ = ignoreNonSummarySeekingQuery_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.ignoreLowRelevantContent_ = ignoreLowRelevantContent_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.ignoreJailBreakingQuery_ = ignoreJailBreakingQuery_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000040) != 0)) { + result.multimodalSpec_ = + multimodalSpecBuilder_ == null ? multimodalSpec_ : multimodalSpecBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.modelPromptSpec_ = + modelPromptSpecBuilder_ == null + ? modelPromptSpec_ + : modelPromptSpecBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.languageCode_ = languageCode_; + } + if (((from_bitField0_ & 0x00000200) != 0)) { + result.modelSpec_ = modelSpecBuilder_ == null ? modelSpec_ : modelSpecBuilder_.build(); + to_bitField0_ |= 0x00000004; + } + if (((from_bitField0_ & 0x00000400) != 0)) { + result.useSemanticChunks_ = useSemanticChunks_; + } + result.bitField0_ |= to_bitField0_; } - if (numPreviousSegments_ != 0) { - size += com.google.protobuf.CodedOutputStream.computeInt32Size(4, numPreviousSegments_); + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec) { + return mergeFrom( + (com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec + .SummarySpec) + other); + } else { + super.mergeFrom(other); + return this; + } } - if (numNextSegments_ != 0) { - size += com.google.protobuf.CodedOutputStream.computeInt32Size(5, numNextSegments_); + + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec + other) { + if (other + == com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec + .getDefaultInstance()) return this; + if (other.getSummaryResultCount() != 0) { + setSummaryResultCount(other.getSummaryResultCount()); + } + if (other.getIncludeCitations() != false) { + setIncludeCitations(other.getIncludeCitations()); + } + if (other.getIgnoreAdversarialQuery() != false) { + setIgnoreAdversarialQuery(other.getIgnoreAdversarialQuery()); + } + if (other.getIgnoreNonSummarySeekingQuery() != false) { + setIgnoreNonSummarySeekingQuery(other.getIgnoreNonSummarySeekingQuery()); + } + if (other.getIgnoreLowRelevantContent() != false) { + setIgnoreLowRelevantContent(other.getIgnoreLowRelevantContent()); + } + if (other.getIgnoreJailBreakingQuery() != false) { + setIgnoreJailBreakingQuery(other.getIgnoreJailBreakingQuery()); + } + if (other.hasMultimodalSpec()) { + mergeMultimodalSpec(other.getMultimodalSpec()); + } + if (other.hasModelPromptSpec()) { + mergeModelPromptSpec(other.getModelPromptSpec()); + } + if (!other.getLanguageCode().isEmpty()) { + languageCode_ = other.languageCode_; + bitField0_ |= 0x00000100; + onChanged(); + } + if (other.hasModelSpec()) { + mergeModelSpec(other.getModelSpec()); + } + if (other.getUseSemanticChunks() != false) { + setUseSemanticChunks(other.getUseSemanticChunks()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; } - 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.discoveryengine.v1beta.SearchRequest.ContentSearchSpec - .ExtractiveContentSpec)) { - return super.equals(obj); - } - com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec - .ExtractiveContentSpec - other = - (com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec - .ExtractiveContentSpec) - obj; - - if (getMaxExtractiveAnswerCount() != other.getMaxExtractiveAnswerCount()) return false; - if (getMaxExtractiveSegmentCount() != other.getMaxExtractiveSegmentCount()) return false; - if (getReturnExtractiveSegmentScore() != other.getReturnExtractiveSegmentScore()) - return false; - if (getNumPreviousSegments() != other.getNumPreviousSegments()) return false; - if (getNumNextSegments() != other.getNumNextSegments()) 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) + MAX_EXTRACTIVE_ANSWER_COUNT_FIELD_NUMBER; - hash = (53 * hash) + getMaxExtractiveAnswerCount(); - hash = (37 * hash) + MAX_EXTRACTIVE_SEGMENT_COUNT_FIELD_NUMBER; - hash = (53 * hash) + getMaxExtractiveSegmentCount(); - hash = (37 * hash) + RETURN_EXTRACTIVE_SEGMENT_SCORE_FIELD_NUMBER; - hash = - (53 * hash) - + com.google.protobuf.Internal.hashBoolean(getReturnExtractiveSegmentScore()); - hash = (37 * hash) + NUM_PREVIOUS_SEGMENTS_FIELD_NUMBER; - hash = (53 * hash) + getNumPreviousSegments(); - hash = (37 * hash) + NUM_NEXT_SEGMENTS_FIELD_NUMBER; - hash = (53 * hash) + getNumNextSegments(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec - .ExtractiveContentSpec - parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec - .ExtractiveContentSpec - 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.discoveryengine.v1beta.SearchRequest.ContentSearchSpec - .ExtractiveContentSpec - parseFrom(com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec - .ExtractiveContentSpec - 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.discoveryengine.v1beta.SearchRequest.ContentSearchSpec - .ExtractiveContentSpec - parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec - .ExtractiveContentSpec - parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec - .ExtractiveContentSpec - parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec - .ExtractiveContentSpec - 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.discoveryengine.v1beta.SearchRequest.ContentSearchSpec - .ExtractiveContentSpec - parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec - .ExtractiveContentSpec - 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.discoveryengine.v1beta.SearchRequest.ContentSearchSpec - .ExtractiveContentSpec - parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec - .ExtractiveContentSpec - 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.discoveryengine.v1beta.SearchRequest.ContentSearchSpec - .ExtractiveContentSpec - 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 specification for configuring the extractive content in a search
            -       * response.
            -       * 
            - * - * Protobuf type {@code - * google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.ExtractiveContentSpec} - */ - public static final class Builder - extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.ExtractiveContentSpec) - com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec - .ExtractiveContentSpecOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.discoveryengine.v1beta.SearchServiceProto - .internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_ContentSearchSpec_ExtractiveContentSpec_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.discoveryengine.v1beta.SearchServiceProto - .internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_ContentSearchSpec_ExtractiveContentSpec_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec - .ExtractiveContentSpec.class, - com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec - .ExtractiveContentSpec.Builder.class); - } - - // Construct using - // com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.ExtractiveContentSpec.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - maxExtractiveAnswerCount_ = 0; - maxExtractiveSegmentCount_ = 0; - returnExtractiveSegmentScore_ = false; - numPreviousSegments_ = 0; - numNextSegments_ = 0; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.discoveryengine.v1beta.SearchServiceProto - .internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_ContentSearchSpec_ExtractiveContentSpec_descriptor; - } - - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec - .ExtractiveContentSpec - getDefaultInstanceForType() { - return com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec - .ExtractiveContentSpec.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec - .ExtractiveContentSpec - build() { - com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec - .ExtractiveContentSpec - result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec - .ExtractiveContentSpec - buildPartial() { - com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec - .ExtractiveContentSpec - result = - new com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec - .ExtractiveContentSpec(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0( - com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec - .ExtractiveContentSpec - result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.maxExtractiveAnswerCount_ = maxExtractiveAnswerCount_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.maxExtractiveSegmentCount_ = maxExtractiveSegmentCount_; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.returnExtractiveSegmentScore_ = returnExtractiveSegmentScore_; - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.numPreviousSegments_ = numPreviousSegments_; - } - if (((from_bitField0_ & 0x00000010) != 0)) { - result.numNextSegments_ = numNextSegments_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other - instanceof - com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec - .ExtractiveContentSpec) { - return mergeFrom( - (com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec - .ExtractiveContentSpec) - other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom( - com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec - .ExtractiveContentSpec - other) { - if (other - == com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec - .ExtractiveContentSpec.getDefaultInstance()) return this; - if (other.getMaxExtractiveAnswerCount() != 0) { - setMaxExtractiveAnswerCount(other.getMaxExtractiveAnswerCount()); - } - if (other.getMaxExtractiveSegmentCount() != 0) { - setMaxExtractiveSegmentCount(other.getMaxExtractiveSegmentCount()); - } - if (other.getReturnExtractiveSegmentScore() != false) { - setReturnExtractiveSegmentScore(other.getReturnExtractiveSegmentScore()); - } - if (other.getNumPreviousSegments() != 0) { - setNumPreviousSegments(other.getNumPreviousSegments()); - } - if (other.getNumNextSegments() != 0) { - setNumNextSegments(other.getNumNextSegments()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { + @java.lang.Override + public final boolean isInitialized() { return true; } @@ -21178,34 +20593,73 @@ public Builder mergeFrom( break; case 8: { - maxExtractiveAnswerCount_ = input.readInt32(); + summaryResultCount_ = input.readInt32(); bitField0_ |= 0x00000001; break; } // case 8 case 16: { - maxExtractiveSegmentCount_ = input.readInt32(); + includeCitations_ = input.readBool(); bitField0_ |= 0x00000002; break; } // case 16 case 24: { - returnExtractiveSegmentScore_ = input.readBool(); + ignoreAdversarialQuery_ = input.readBool(); bitField0_ |= 0x00000004; break; } // case 24 case 32: { - numPreviousSegments_ = input.readInt32(); + ignoreNonSummarySeekingQuery_ = input.readBool(); bitField0_ |= 0x00000008; break; } // case 32 - case 40: + case 42: { - numNextSegments_ = input.readInt32(); + input.readMessage( + internalGetModelPromptSpecFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000080; + break; + } // case 42 + case 50: + { + languageCode_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000100; + break; + } // case 50 + case 58: + { + input.readMessage( + internalGetModelSpecFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000200; + break; + } // case 58 + case 64: + { + useSemanticChunks_ = input.readBool(); + bitField0_ |= 0x00000400; + break; + } // case 64 + case 72: + { + ignoreLowRelevantContent_ = input.readBool(); bitField0_ |= 0x00000010; break; - } // case 40 + } // case 72 + case 80: + { + ignoreJailBreakingQuery_ = input.readBool(); + bitField0_ |= 0x00000020; + break; + } // case 80 + case 90: + { + input.readMessage( + internalGetMultimodalSpecFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000040; + break; + } // case 90 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -21225,63 +20679,55 @@ public Builder mergeFrom( private int bitField0_; - private int maxExtractiveAnswerCount_; + private int summaryResultCount_; /** * * *
            -         * The maximum number of extractive answers returned in each search
            -         * result.
            -         *
            -         * An extractive answer is a verbatim answer extracted from the original
            -         * document, which provides a precise and contextually relevant answer to
            -         * the search query.
            -         *
            -         * If the number of matching answers is less than the
            -         * `max_extractive_answer_count`, return all of the answers. Otherwise,
            -         * return the `max_extractive_answer_count`.
            +         * The number of top results to generate the summary from. If the number
            +         * of results returned is less than `summaryResultCount`, the summary is
            +         * generated from all of the results.
                      *
            -         * At most five answers are returned for each
            -         * [SearchResult][google.cloud.discoveryengine.v1beta.SearchResponse.SearchResult].
            +         * At most 10 results for documents mode, or 50 for chunks mode, can be
            +         * used to generate a summary. The chunks mode is used when
            +         * [SearchRequest.ContentSearchSpec.search_result_mode][google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.search_result_mode]
            +         * is set to
            +         * [CHUNKS][google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SearchResultMode.CHUNKS].
                      * 
            * - * int32 max_extractive_answer_count = 1; + * int32 summary_result_count = 1; * - * @return The maxExtractiveAnswerCount. + * @return The summaryResultCount. */ @java.lang.Override - public int getMaxExtractiveAnswerCount() { - return maxExtractiveAnswerCount_; + public int getSummaryResultCount() { + return summaryResultCount_; } /** * * *
            -         * The maximum number of extractive answers returned in each search
            -         * result.
            -         *
            -         * An extractive answer is a verbatim answer extracted from the original
            -         * document, which provides a precise and contextually relevant answer to
            -         * the search query.
            -         *
            -         * If the number of matching answers is less than the
            -         * `max_extractive_answer_count`, return all of the answers. Otherwise,
            -         * return the `max_extractive_answer_count`.
            +         * The number of top results to generate the summary from. If the number
            +         * of results returned is less than `summaryResultCount`, the summary is
            +         * generated from all of the results.
                      *
            -         * At most five answers are returned for each
            -         * [SearchResult][google.cloud.discoveryengine.v1beta.SearchResponse.SearchResult].
            +         * At most 10 results for documents mode, or 50 for chunks mode, can be
            +         * used to generate a summary. The chunks mode is used when
            +         * [SearchRequest.ContentSearchSpec.search_result_mode][google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.search_result_mode]
            +         * is set to
            +         * [CHUNKS][google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SearchResultMode.CHUNKS].
                      * 
            * - * int32 max_extractive_answer_count = 1; + * int32 summary_result_count = 1; * - * @param value The maxExtractiveAnswerCount to set. + * @param value The summaryResultCount to set. * @return This builder for chaining. */ - public Builder setMaxExtractiveAnswerCount(int value) { + public Builder setSummaryResultCount(int value) { - maxExtractiveAnswerCount_ = value; + summaryResultCount_ = value; bitField0_ |= 0x00000001; onChanged(); return this; @@ -21291,97 +20737,93 @@ public Builder setMaxExtractiveAnswerCount(int value) { * * *
            -         * The maximum number of extractive answers returned in each search
            -         * result.
            -         *
            -         * An extractive answer is a verbatim answer extracted from the original
            -         * document, which provides a precise and contextually relevant answer to
            -         * the search query.
            -         *
            -         * If the number of matching answers is less than the
            -         * `max_extractive_answer_count`, return all of the answers. Otherwise,
            -         * return the `max_extractive_answer_count`.
            +         * The number of top results to generate the summary from. If the number
            +         * of results returned is less than `summaryResultCount`, the summary is
            +         * generated from all of the results.
                      *
            -         * At most five answers are returned for each
            -         * [SearchResult][google.cloud.discoveryengine.v1beta.SearchResponse.SearchResult].
            +         * At most 10 results for documents mode, or 50 for chunks mode, can be
            +         * used to generate a summary. The chunks mode is used when
            +         * [SearchRequest.ContentSearchSpec.search_result_mode][google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.search_result_mode]
            +         * is set to
            +         * [CHUNKS][google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SearchResultMode.CHUNKS].
                      * 
            * - * int32 max_extractive_answer_count = 1; + * int32 summary_result_count = 1; * * @return This builder for chaining. */ - public Builder clearMaxExtractiveAnswerCount() { + public Builder clearSummaryResultCount() { bitField0_ = (bitField0_ & ~0x00000001); - maxExtractiveAnswerCount_ = 0; + summaryResultCount_ = 0; onChanged(); return this; } - private int maxExtractiveSegmentCount_; + private boolean includeCitations_; /** * * *
            -         * The max number of extractive segments returned in each search result.
            -         * Only applied if the
            -         * [DataStore][google.cloud.discoveryengine.v1beta.DataStore] is set to
            -         * [DataStore.ContentConfig.CONTENT_REQUIRED][google.cloud.discoveryengine.v1beta.DataStore.ContentConfig.CONTENT_REQUIRED]
            -         * or
            -         * [DataStore.solution_types][google.cloud.discoveryengine.v1beta.DataStore.solution_types]
            -         * is
            -         * [SOLUTION_TYPE_CHAT][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_CHAT].
            +         * Specifies whether to include citations in the summary. The default
            +         * value is `false`.
                      *
            -         * An extractive segment is a text segment extracted from the original
            -         * document that is relevant to the search query, and, in general, more
            -         * verbose than an extractive answer. The segment could then be used as
            -         * input for LLMs to generate summaries and answers.
            +         * When this field is set to `true`, summaries include in-line citation
            +         * numbers.
                      *
            -         * If the number of matching segments is less than
            -         * `max_extractive_segment_count`, return all of the segments. Otherwise,
            -         * return the `max_extractive_segment_count`.
            +         * Example summary including citations:
            +         *
            +         * BigQuery is Google Cloud's fully managed and completely serverless
            +         * enterprise data warehouse [1]. BigQuery supports all data types, works
            +         * across clouds, and has built-in machine learning and business
            +         * intelligence, all within a unified platform [2, 3].
            +         *
            +         * The citation numbers refer to the returned search results and are
            +         * 1-indexed. For example, [1] means that the sentence is attributed to
            +         * the first search result. [2, 3] means that the sentence is attributed
            +         * to both the second and third search results.
                      * 
            * - * int32 max_extractive_segment_count = 2; + * bool include_citations = 2; * - * @return The maxExtractiveSegmentCount. + * @return The includeCitations. */ @java.lang.Override - public int getMaxExtractiveSegmentCount() { - return maxExtractiveSegmentCount_; + public boolean getIncludeCitations() { + return includeCitations_; } /** * * *
            -         * The max number of extractive segments returned in each search result.
            -         * Only applied if the
            -         * [DataStore][google.cloud.discoveryengine.v1beta.DataStore] is set to
            -         * [DataStore.ContentConfig.CONTENT_REQUIRED][google.cloud.discoveryengine.v1beta.DataStore.ContentConfig.CONTENT_REQUIRED]
            -         * or
            -         * [DataStore.solution_types][google.cloud.discoveryengine.v1beta.DataStore.solution_types]
            -         * is
            -         * [SOLUTION_TYPE_CHAT][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_CHAT].
            +         * Specifies whether to include citations in the summary. The default
            +         * value is `false`.
                      *
            -         * An extractive segment is a text segment extracted from the original
            -         * document that is relevant to the search query, and, in general, more
            -         * verbose than an extractive answer. The segment could then be used as
            -         * input for LLMs to generate summaries and answers.
            +         * When this field is set to `true`, summaries include in-line citation
            +         * numbers.
                      *
            -         * If the number of matching segments is less than
            -         * `max_extractive_segment_count`, return all of the segments. Otherwise,
            -         * return the `max_extractive_segment_count`.
            -         * 
            + * Example summary including citations: * - * int32 max_extractive_segment_count = 2; + * BigQuery is Google Cloud's fully managed and completely serverless + * enterprise data warehouse [1]. BigQuery supports all data types, works + * across clouds, and has built-in machine learning and business + * intelligence, all within a unified platform [2, 3]. * - * @param value The maxExtractiveSegmentCount to set. - * @return This builder for chaining. - */ - public Builder setMaxExtractiveSegmentCount(int value) { + * The citation numbers refer to the returned search results and are + * 1-indexed. For example, [1] means that the sentence is attributed to + * the first search result. [2, 3] means that the sentence is attributed + * to both the second and third search results. + *
            + * + * bool include_citations = 2; + * + * @param value The includeCitations to set. + * @return This builder for chaining. + */ + public Builder setIncludeCitations(boolean value) { - maxExtractiveSegmentCount_ = value; + includeCitations_ = value; bitField0_ |= 0x00000002; onChanged(); return this; @@ -21391,75 +20833,87 @@ public Builder setMaxExtractiveSegmentCount(int value) { * * *
            -         * The max number of extractive segments returned in each search result.
            -         * Only applied if the
            -         * [DataStore][google.cloud.discoveryengine.v1beta.DataStore] is set to
            -         * [DataStore.ContentConfig.CONTENT_REQUIRED][google.cloud.discoveryengine.v1beta.DataStore.ContentConfig.CONTENT_REQUIRED]
            -         * or
            -         * [DataStore.solution_types][google.cloud.discoveryengine.v1beta.DataStore.solution_types]
            -         * is
            -         * [SOLUTION_TYPE_CHAT][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_CHAT].
            +         * Specifies whether to include citations in the summary. The default
            +         * value is `false`.
                      *
            -         * An extractive segment is a text segment extracted from the original
            -         * document that is relevant to the search query, and, in general, more
            -         * verbose than an extractive answer. The segment could then be used as
            -         * input for LLMs to generate summaries and answers.
            +         * When this field is set to `true`, summaries include in-line citation
            +         * numbers.
                      *
            -         * If the number of matching segments is less than
            -         * `max_extractive_segment_count`, return all of the segments. Otherwise,
            -         * return the `max_extractive_segment_count`.
            +         * Example summary including citations:
            +         *
            +         * BigQuery is Google Cloud's fully managed and completely serverless
            +         * enterprise data warehouse [1]. BigQuery supports all data types, works
            +         * across clouds, and has built-in machine learning and business
            +         * intelligence, all within a unified platform [2, 3].
            +         *
            +         * The citation numbers refer to the returned search results and are
            +         * 1-indexed. For example, [1] means that the sentence is attributed to
            +         * the first search result. [2, 3] means that the sentence is attributed
            +         * to both the second and third search results.
                      * 
            * - * int32 max_extractive_segment_count = 2; + * bool include_citations = 2; * * @return This builder for chaining. */ - public Builder clearMaxExtractiveSegmentCount() { + public Builder clearIncludeCitations() { bitField0_ = (bitField0_ & ~0x00000002); - maxExtractiveSegmentCount_ = 0; + includeCitations_ = false; onChanged(); return this; } - private boolean returnExtractiveSegmentScore_; + private boolean ignoreAdversarialQuery_; /** * * *
            -         * Specifies whether to return the confidence score from the extractive
            -         * segments in each search result. This feature is available only for new
            -         * or allowlisted data stores. To allowlist your data store,
            -         * contact your Customer Engineer. The default value is `false`.
            +         * Specifies whether to filter out adversarial queries. The default value
            +         * is `false`.
            +         *
            +         * Google employs search-query classification to detect adversarial
            +         * queries. No summary is returned if the search query is classified as an
            +         * adversarial query. For example, a user might ask a question regarding
            +         * negative comments about the company or submit a query designed to
            +         * generate unsafe, policy-violating output. If this field is set to
            +         * `true`, we skip generating summaries for adversarial queries and return
            +         * fallback messages instead.
                      * 
            * - * bool return_extractive_segment_score = 3; + * bool ignore_adversarial_query = 3; * - * @return The returnExtractiveSegmentScore. + * @return The ignoreAdversarialQuery. */ @java.lang.Override - public boolean getReturnExtractiveSegmentScore() { - return returnExtractiveSegmentScore_; + public boolean getIgnoreAdversarialQuery() { + return ignoreAdversarialQuery_; } /** * * *
            -         * Specifies whether to return the confidence score from the extractive
            -         * segments in each search result. This feature is available only for new
            -         * or allowlisted data stores. To allowlist your data store,
            -         * contact your Customer Engineer. The default value is `false`.
            +         * Specifies whether to filter out adversarial queries. The default value
            +         * is `false`.
            +         *
            +         * Google employs search-query classification to detect adversarial
            +         * queries. No summary is returned if the search query is classified as an
            +         * adversarial query. For example, a user might ask a question regarding
            +         * negative comments about the company or submit a query designed to
            +         * generate unsafe, policy-violating output. If this field is set to
            +         * `true`, we skip generating summaries for adversarial queries and return
            +         * fallback messages instead.
                      * 
            * - * bool return_extractive_segment_score = 3; + * bool ignore_adversarial_query = 3; * - * @param value The returnExtractiveSegmentScore to set. + * @param value The ignoreAdversarialQuery to set. * @return This builder for chaining. */ - public Builder setReturnExtractiveSegmentScore(boolean value) { + public Builder setIgnoreAdversarialQuery(boolean value) { - returnExtractiveSegmentScore_ = value; + ignoreAdversarialQuery_ = value; bitField0_ |= 0x00000004; onChanged(); return this; @@ -21469,62 +20923,82 @@ public Builder setReturnExtractiveSegmentScore(boolean value) { * * *
            -         * Specifies whether to return the confidence score from the extractive
            -         * segments in each search result. This feature is available only for new
            -         * or allowlisted data stores. To allowlist your data store,
            -         * contact your Customer Engineer. The default value is `false`.
            +         * Specifies whether to filter out adversarial queries. The default value
            +         * is `false`.
            +         *
            +         * Google employs search-query classification to detect adversarial
            +         * queries. No summary is returned if the search query is classified as an
            +         * adversarial query. For example, a user might ask a question regarding
            +         * negative comments about the company or submit a query designed to
            +         * generate unsafe, policy-violating output. If this field is set to
            +         * `true`, we skip generating summaries for adversarial queries and return
            +         * fallback messages instead.
                      * 
            * - * bool return_extractive_segment_score = 3; + * bool ignore_adversarial_query = 3; * * @return This builder for chaining. */ - public Builder clearReturnExtractiveSegmentScore() { + public Builder clearIgnoreAdversarialQuery() { bitField0_ = (bitField0_ & ~0x00000004); - returnExtractiveSegmentScore_ = false; + ignoreAdversarialQuery_ = false; onChanged(); return this; } - private int numPreviousSegments_; + private boolean ignoreNonSummarySeekingQuery_; /** * * *
            -         * Specifies whether to also include the adjacent from each selected
            -         * segments.
            -         * Return at most `num_previous_segments` segments before each selected
            -         * segments.
            +         * Specifies whether to filter out queries that are not summary-seeking.
            +         * The default value is `false`.
            +         *
            +         * Google employs search-query classification to detect summary-seeking
            +         * queries. No summary is returned if the search query is classified as a
            +         * non-summary seeking query. For example, `why is the sky blue` and `Who
            +         * is the best soccer player in the world?` are summary-seeking queries,
            +         * but `SFO airport` and `world cup 2026` are not. They are most likely
            +         * navigational queries. If this field is set to `true`, we skip
            +         * generating summaries for non-summary seeking queries and return
            +         * fallback messages instead.
                      * 
            * - * int32 num_previous_segments = 4; + * bool ignore_non_summary_seeking_query = 4; * - * @return The numPreviousSegments. + * @return The ignoreNonSummarySeekingQuery. */ @java.lang.Override - public int getNumPreviousSegments() { - return numPreviousSegments_; + public boolean getIgnoreNonSummarySeekingQuery() { + return ignoreNonSummarySeekingQuery_; } /** * * *
            -         * Specifies whether to also include the adjacent from each selected
            -         * segments.
            -         * Return at most `num_previous_segments` segments before each selected
            -         * segments.
            +         * Specifies whether to filter out queries that are not summary-seeking.
            +         * The default value is `false`.
            +         *
            +         * Google employs search-query classification to detect summary-seeking
            +         * queries. No summary is returned if the search query is classified as a
            +         * non-summary seeking query. For example, `why is the sky blue` and `Who
            +         * is the best soccer player in the world?` are summary-seeking queries,
            +         * but `SFO airport` and `world cup 2026` are not. They are most likely
            +         * navigational queries. If this field is set to `true`, we skip
            +         * generating summaries for non-summary seeking queries and return
            +         * fallback messages instead.
                      * 
            * - * int32 num_previous_segments = 4; + * bool ignore_non_summary_seeking_query = 4; * - * @param value The numPreviousSegments to set. + * @param value The ignoreNonSummarySeekingQuery to set. * @return This builder for chaining. */ - public Builder setNumPreviousSegments(int value) { + public Builder setIgnoreNonSummarySeekingQuery(boolean value) { - numPreviousSegments_ = value; + ignoreNonSummarySeekingQuery_ = value; bitField0_ |= 0x00000008; onChanged(); return this; @@ -21534,58 +21008,73 @@ public Builder setNumPreviousSegments(int value) { * * *
            -         * Specifies whether to also include the adjacent from each selected
            -         * segments.
            -         * Return at most `num_previous_segments` segments before each selected
            -         * segments.
            +         * Specifies whether to filter out queries that are not summary-seeking.
            +         * The default value is `false`.
            +         *
            +         * Google employs search-query classification to detect summary-seeking
            +         * queries. No summary is returned if the search query is classified as a
            +         * non-summary seeking query. For example, `why is the sky blue` and `Who
            +         * is the best soccer player in the world?` are summary-seeking queries,
            +         * but `SFO airport` and `world cup 2026` are not. They are most likely
            +         * navigational queries. If this field is set to `true`, we skip
            +         * generating summaries for non-summary seeking queries and return
            +         * fallback messages instead.
                      * 
            * - * int32 num_previous_segments = 4; + * bool ignore_non_summary_seeking_query = 4; * * @return This builder for chaining. */ - public Builder clearNumPreviousSegments() { + public Builder clearIgnoreNonSummarySeekingQuery() { bitField0_ = (bitField0_ & ~0x00000008); - numPreviousSegments_ = 0; + ignoreNonSummarySeekingQuery_ = false; onChanged(); return this; } - private int numNextSegments_; + private boolean ignoreLowRelevantContent_; /** * * *
            -         * Return at most `num_next_segments` segments after each selected
            -         * segments.
            +         * Specifies whether to filter out queries that have low relevance. The
            +         * default value is `false`.
            +         *
            +         * If this field is set to `false`, all search results are used regardless
            +         * of relevance to generate answers. If set to `true`, only queries with
            +         * high relevance search results will generate answers.
                      * 
            * - * int32 num_next_segments = 5; + * bool ignore_low_relevant_content = 9; * - * @return The numNextSegments. + * @return The ignoreLowRelevantContent. */ @java.lang.Override - public int getNumNextSegments() { - return numNextSegments_; + public boolean getIgnoreLowRelevantContent() { + return ignoreLowRelevantContent_; } /** * * *
            -         * Return at most `num_next_segments` segments after each selected
            -         * segments.
            +         * Specifies whether to filter out queries that have low relevance. The
            +         * default value is `false`.
            +         *
            +         * If this field is set to `false`, all search results are used regardless
            +         * of relevance to generate answers. If set to `true`, only queries with
            +         * high relevance search results will generate answers.
                      * 
            * - * int32 num_next_segments = 5; + * bool ignore_low_relevant_content = 9; * - * @param value The numNextSegments to set. + * @param value The ignoreLowRelevantContent to set. * @return This builder for chaining. */ - public Builder setNumNextSegments(int value) { + public Builder setIgnoreLowRelevantContent(boolean value) { - numNextSegments_ = value; + ignoreLowRelevantContent_ = value; bitField0_ |= 0x00000010; onChanged(); return this; @@ -21595,693 +21084,438 @@ public Builder setNumNextSegments(int value) { * * *
            -         * Return at most `num_next_segments` segments after each selected
            -         * segments.
            +         * Specifies whether to filter out queries that have low relevance. The
            +         * default value is `false`.
            +         *
            +         * If this field is set to `false`, all search results are used regardless
            +         * of relevance to generate answers. If set to `true`, only queries with
            +         * high relevance search results will generate answers.
                      * 
            * - * int32 num_next_segments = 5; + * bool ignore_low_relevant_content = 9; * * @return This builder for chaining. */ - public Builder clearNumNextSegments() { + public Builder clearIgnoreLowRelevantContent() { bitField0_ = (bitField0_ & ~0x00000010); - numNextSegments_ = 0; + ignoreLowRelevantContent_ = false; onChanged(); return this; } - // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.ExtractiveContentSpec) - } + private boolean ignoreJailBreakingQuery_; - // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.ExtractiveContentSpec) - private static final com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec - .ExtractiveContentSpec - DEFAULT_INSTANCE; + /** + * + * + *
            +         * Optional. Specifies whether to filter out jail-breaking queries. The
            +         * default value is `false`.
            +         *
            +         * Google employs search-query classification to detect jail-breaking
            +         * queries. No summary is returned if the search query is classified as a
            +         * jail-breaking query. A user might add instructions to the query to
            +         * change the tone, style, language, content of the answer, or ask the
            +         * model to act as a different entity, e.g. "Reply in the tone of a
            +         * competing company's CEO". If this field is set to `true`, we skip
            +         * generating summaries for jail-breaking queries and return fallback
            +         * messages instead.
            +         * 
            + * + * bool ignore_jail_breaking_query = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The ignoreJailBreakingQuery. + */ + @java.lang.Override + public boolean getIgnoreJailBreakingQuery() { + return ignoreJailBreakingQuery_; + } - static { - DEFAULT_INSTANCE = - new com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec - .ExtractiveContentSpec(); - } + /** + * + * + *
            +         * Optional. Specifies whether to filter out jail-breaking queries. The
            +         * default value is `false`.
            +         *
            +         * Google employs search-query classification to detect jail-breaking
            +         * queries. No summary is returned if the search query is classified as a
            +         * jail-breaking query. A user might add instructions to the query to
            +         * change the tone, style, language, content of the answer, or ask the
            +         * model to act as a different entity, e.g. "Reply in the tone of a
            +         * competing company's CEO". If this field is set to `true`, we skip
            +         * generating summaries for jail-breaking queries and return fallback
            +         * messages instead.
            +         * 
            + * + * bool ignore_jail_breaking_query = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The ignoreJailBreakingQuery to set. + * @return This builder for chaining. + */ + public Builder setIgnoreJailBreakingQuery(boolean value) { - public static com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec - .ExtractiveContentSpec - getDefaultInstance() { - return DEFAULT_INSTANCE; - } + ignoreJailBreakingQuery_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ExtractiveContentSpec parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException() - .setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; + /** + * + * + *
            +         * Optional. Specifies whether to filter out jail-breaking queries. The
            +         * default value is `false`.
            +         *
            +         * Google employs search-query classification to detect jail-breaking
            +         * queries. No summary is returned if the search query is classified as a
            +         * jail-breaking query. A user might add instructions to the query to
            +         * change the tone, style, language, content of the answer, or ask the
            +         * model to act as a different entity, e.g. "Reply in the tone of a
            +         * competing company's CEO". If this field is set to `true`, we skip
            +         * generating summaries for jail-breaking queries and return fallback
            +         * messages instead.
            +         * 
            + * + * bool ignore_jail_breaking_query = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearIgnoreJailBreakingQuery() { + bitField0_ = (bitField0_ & ~0x00000020); + ignoreJailBreakingQuery_ = false; + onChanged(); + return this; + } - public static com.google.protobuf.Parser parser() { - return PARSER; - } + private com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec + .MultiModalSpec + multimodalSpec_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec + .MultiModalSpec, + com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec + .MultiModalSpec.Builder, + com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec + .MultiModalSpecOrBuilder> + multimodalSpecBuilder_; - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + /** + * + * + *
            +         * Optional. Multimodal specification.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec.MultiModalSpec multimodal_spec = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the multimodalSpec field is set. + */ + public boolean hasMultimodalSpec() { + return ((bitField0_ & 0x00000040) != 0); + } - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec - .ExtractiveContentSpec - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - } + /** + * + * + *
            +         * Optional. Multimodal specification.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec.MultiModalSpec multimodal_spec = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The multimodalSpec. + */ + public com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec + .MultiModalSpec + getMultimodalSpec() { + if (multimodalSpecBuilder_ == null) { + return multimodalSpec_ == null + ? com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec + .SummarySpec.MultiModalSpec.getDefaultInstance() + : multimodalSpec_; + } else { + return multimodalSpecBuilder_.getMessage(); + } + } - public interface ChunkSpecOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.ChunkSpec) - com.google.protobuf.MessageOrBuilder { + /** + * + * + *
            +         * Optional. Multimodal specification.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec.MultiModalSpec multimodal_spec = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setMultimodalSpec( + com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec + .MultiModalSpec + value) { + if (multimodalSpecBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + multimodalSpec_ = value; + } else { + multimodalSpecBuilder_.setMessage(value); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } - /** - * - * - *
            -       * The number of previous chunks to be returned of the current chunk. The
            -       * maximum allowed value is 3.
            -       * If not specified, no previous chunks will be returned.
            -       * 
            - * - * int32 num_previous_chunks = 1; - * - * @return The numPreviousChunks. - */ - int getNumPreviousChunks(); + /** + * + * + *
            +         * Optional. Multimodal specification.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec.MultiModalSpec multimodal_spec = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setMultimodalSpec( + com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec + .MultiModalSpec.Builder + builderForValue) { + if (multimodalSpecBuilder_ == null) { + multimodalSpec_ = builderForValue.build(); + } else { + multimodalSpecBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } - /** - * - * - *
            -       * The number of next chunks to be returned of the current chunk. The
            -       * maximum allowed value is 3.
            -       * If not specified, no next chunks will be returned.
            -       * 
            - * - * int32 num_next_chunks = 2; - * - * @return The numNextChunks. - */ - int getNumNextChunks(); - } - - /** - * - * - *
            -     * Specifies the chunk spec to be returned from the search response.
            -     * Only available if the
            -     * [SearchRequest.ContentSearchSpec.search_result_mode][google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.search_result_mode]
            -     * is set to
            -     * [CHUNKS][google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SearchResultMode.CHUNKS]
            -     * 
            - * - * Protobuf type {@code - * google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.ChunkSpec} - */ - public static final class ChunkSpec extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.ChunkSpec) - ChunkSpecOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "ChunkSpec"); - } - - // Use ChunkSpec.newBuilder() to construct. - private ChunkSpec(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private ChunkSpec() {} - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.discoveryengine.v1beta.SearchServiceProto - .internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_ContentSearchSpec_ChunkSpec_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.discoveryengine.v1beta.SearchServiceProto - .internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_ContentSearchSpec_ChunkSpec_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.ChunkSpec - .class, - com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.ChunkSpec - .Builder.class); - } - - public static final int NUM_PREVIOUS_CHUNKS_FIELD_NUMBER = 1; - private int numPreviousChunks_ = 0; - - /** - * - * - *
            -       * The number of previous chunks to be returned of the current chunk. The
            -       * maximum allowed value is 3.
            -       * If not specified, no previous chunks will be returned.
            -       * 
            - * - * int32 num_previous_chunks = 1; - * - * @return The numPreviousChunks. - */ - @java.lang.Override - public int getNumPreviousChunks() { - return numPreviousChunks_; - } - - public static final int NUM_NEXT_CHUNKS_FIELD_NUMBER = 2; - private int numNextChunks_ = 0; - - /** - * - * - *
            -       * The number of next chunks to be returned of the current chunk. The
            -       * maximum allowed value is 3.
            -       * If not specified, no next chunks will be returned.
            -       * 
            - * - * int32 num_next_chunks = 2; - * - * @return The numNextChunks. - */ - @java.lang.Override - public int getNumNextChunks() { - return numNextChunks_; - } - - 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 (numPreviousChunks_ != 0) { - output.writeInt32(1, numPreviousChunks_); - } - if (numNextChunks_ != 0) { - output.writeInt32(2, numNextChunks_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (numPreviousChunks_ != 0) { - size += com.google.protobuf.CodedOutputStream.computeInt32Size(1, numPreviousChunks_); - } - if (numNextChunks_ != 0) { - size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, numNextChunks_); - } - 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.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.ChunkSpec)) { - return super.equals(obj); - } - com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.ChunkSpec other = - (com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.ChunkSpec) obj; - - if (getNumPreviousChunks() != other.getNumPreviousChunks()) return false; - if (getNumNextChunks() != other.getNumNextChunks()) 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) + NUM_PREVIOUS_CHUNKS_FIELD_NUMBER; - hash = (53 * hash) + getNumPreviousChunks(); - hash = (37 * hash) + NUM_NEXT_CHUNKS_FIELD_NUMBER; - hash = (53 * hash) + getNumNextChunks(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec - .ChunkSpec - parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec - .ChunkSpec - 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.discoveryengine.v1beta.SearchRequest.ContentSearchSpec - .ChunkSpec - parseFrom(com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec - .ChunkSpec - 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.discoveryengine.v1beta.SearchRequest.ContentSearchSpec - .ChunkSpec - parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec - .ChunkSpec - parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec - .ChunkSpec - parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec - .ChunkSpec - 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.discoveryengine.v1beta.SearchRequest.ContentSearchSpec - .ChunkSpec - parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec - .ChunkSpec - 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.discoveryengine.v1beta.SearchRequest.ContentSearchSpec - .ChunkSpec - parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec - .ChunkSpec - 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.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.ChunkSpec - 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; - } - - /** - * - * - *
            -       * Specifies the chunk spec to be returned from the search response.
            -       * Only available if the
            -       * [SearchRequest.ContentSearchSpec.search_result_mode][google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.search_result_mode]
            -       * is set to
            -       * [CHUNKS][google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SearchResultMode.CHUNKS]
            -       * 
            - * - * Protobuf type {@code - * google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.ChunkSpec} - */ - public static final class Builder - extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.ChunkSpec) - com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec - .ChunkSpecOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.discoveryengine.v1beta.SearchServiceProto - .internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_ContentSearchSpec_ChunkSpec_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.discoveryengine.v1beta.SearchServiceProto - .internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_ContentSearchSpec_ChunkSpec_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.ChunkSpec - .class, - com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.ChunkSpec - .Builder.class); - } - - // Construct using - // com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.ChunkSpec.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - numPreviousChunks_ = 0; - numNextChunks_ = 0; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.discoveryengine.v1beta.SearchServiceProto - .internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_ContentSearchSpec_ChunkSpec_descriptor; - } - - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.ChunkSpec - getDefaultInstanceForType() { - return com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.ChunkSpec - .getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.ChunkSpec - build() { - com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.ChunkSpec result = - buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.ChunkSpec - buildPartial() { - com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.ChunkSpec result = - new com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.ChunkSpec( - this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0( - com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.ChunkSpec - result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.numPreviousChunks_ = numPreviousChunks_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.numNextChunks_ = numNextChunks_; - } - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other - instanceof - com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.ChunkSpec) { - return mergeFrom( - (com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.ChunkSpec) - other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom( - com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.ChunkSpec - other) { - if (other - == com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.ChunkSpec - .getDefaultInstance()) return this; - if (other.getNumPreviousChunks() != 0) { - setNumPreviousChunks(other.getNumPreviousChunks()); - } - if (other.getNumNextChunks() != 0) { - setNumNextChunks(other.getNumNextChunks()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: - { - numPreviousChunks_ = input.readInt32(); - bitField0_ |= 0x00000001; - break; - } // case 8 - case 16: - { - numNextChunks_ = input.readInt32(); - bitField0_ |= 0x00000002; - break; - } // case 16 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; - - private int numPreviousChunks_; + /** + * + * + *
            +         * Optional. Multimodal specification.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec.MultiModalSpec multimodal_spec = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeMultimodalSpec( + com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec + .MultiModalSpec + value) { + if (multimodalSpecBuilder_ == null) { + if (((bitField0_ & 0x00000040) != 0) + && multimodalSpec_ != null + && multimodalSpec_ + != com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec + .SummarySpec.MultiModalSpec.getDefaultInstance()) { + getMultimodalSpecBuilder().mergeFrom(value); + } else { + multimodalSpec_ = value; + } + } else { + multimodalSpecBuilder_.mergeFrom(value); + } + if (multimodalSpec_ != null) { + bitField0_ |= 0x00000040; + onChanged(); + } + return this; + } /** * * *
            -         * The number of previous chunks to be returned of the current chunk. The
            -         * maximum allowed value is 3.
            -         * If not specified, no previous chunks will be returned.
            +         * Optional. Multimodal specification.
                      * 
            * - * int32 num_previous_chunks = 1; - * - * @return The numPreviousChunks. + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec.MultiModalSpec multimodal_spec = 11 [(.google.api.field_behavior) = OPTIONAL]; + * */ - @java.lang.Override - public int getNumPreviousChunks() { - return numPreviousChunks_; + public Builder clearMultimodalSpec() { + bitField0_ = (bitField0_ & ~0x00000040); + multimodalSpec_ = null; + if (multimodalSpecBuilder_ != null) { + multimodalSpecBuilder_.dispose(); + multimodalSpecBuilder_ = null; + } + onChanged(); + return this; } /** * * *
            -         * The number of previous chunks to be returned of the current chunk. The
            -         * maximum allowed value is 3.
            -         * If not specified, no previous chunks will be returned.
            +         * Optional. Multimodal specification.
                      * 
            * - * int32 num_previous_chunks = 1; - * - * @param value The numPreviousChunks to set. - * @return This builder for chaining. + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec.MultiModalSpec multimodal_spec = 11 [(.google.api.field_behavior) = OPTIONAL]; + * */ - public Builder setNumPreviousChunks(int value) { - - numPreviousChunks_ = value; - bitField0_ |= 0x00000001; + public com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec + .MultiModalSpec.Builder + getMultimodalSpecBuilder() { + bitField0_ |= 0x00000040; onChanged(); - return this; + return internalGetMultimodalSpecFieldBuilder().getBuilder(); } /** * * *
            -         * The number of previous chunks to be returned of the current chunk. The
            -         * maximum allowed value is 3.
            -         * If not specified, no previous chunks will be returned.
            +         * Optional. Multimodal specification.
                      * 
            * - * int32 num_previous_chunks = 1; - * - * @return This builder for chaining. + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec.MultiModalSpec multimodal_spec = 11 [(.google.api.field_behavior) = OPTIONAL]; + * */ - public Builder clearNumPreviousChunks() { - bitField0_ = (bitField0_ & ~0x00000001); - numPreviousChunks_ = 0; - onChanged(); - return this; + public com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec + .MultiModalSpecOrBuilder + getMultimodalSpecOrBuilder() { + if (multimodalSpecBuilder_ != null) { + return multimodalSpecBuilder_.getMessageOrBuilder(); + } else { + return multimodalSpec_ == null + ? com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec + .SummarySpec.MultiModalSpec.getDefaultInstance() + : multimodalSpec_; + } } - private int numNextChunks_; - /** * * *
            -         * The number of next chunks to be returned of the current chunk. The
            -         * maximum allowed value is 3.
            -         * If not specified, no next chunks will be returned.
            +         * Optional. Multimodal specification.
                      * 
            * - * int32 num_next_chunks = 2; + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec.MultiModalSpec multimodal_spec = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec + .MultiModalSpec, + com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec + .MultiModalSpec.Builder, + com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec + .MultiModalSpecOrBuilder> + internalGetMultimodalSpecFieldBuilder() { + if (multimodalSpecBuilder_ == null) { + multimodalSpecBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec + .SummarySpec.MultiModalSpec, + com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec + .SummarySpec.MultiModalSpec.Builder, + com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec + .SummarySpec.MultiModalSpecOrBuilder>( + getMultimodalSpec(), getParentForChildren(), isClean()); + multimodalSpec_ = null; + } + return multimodalSpecBuilder_; + } + + private com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec + .ModelPromptSpec + modelPromptSpec_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec + .ModelPromptSpec, + com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec + .ModelPromptSpec.Builder, + com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec + .ModelPromptSpecOrBuilder> + modelPromptSpecBuilder_; + + /** * - * @return The numNextChunks. + * + *
            +         * If specified, the spec will be used to modify the prompt provided to
            +         * the LLM.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec.ModelPromptSpec model_prompt_spec = 5; + * + * + * @return Whether the modelPromptSpec field is set. */ - @java.lang.Override - public int getNumNextChunks() { - return numNextChunks_; + public boolean hasModelPromptSpec() { + return ((bitField0_ & 0x00000080) != 0); } /** * * *
            -         * The number of next chunks to be returned of the current chunk. The
            -         * maximum allowed value is 3.
            -         * If not specified, no next chunks will be returned.
            +         * If specified, the spec will be used to modify the prompt provided to
            +         * the LLM.
                      * 
            * - * int32 num_next_chunks = 2; + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec.ModelPromptSpec model_prompt_spec = 5; + * * - * @param value The numNextChunks to set. - * @return This builder for chaining. + * @return The modelPromptSpec. */ - public Builder setNumNextChunks(int value) { + public com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec + .ModelPromptSpec + getModelPromptSpec() { + if (modelPromptSpecBuilder_ == null) { + return modelPromptSpec_ == null + ? com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec + .SummarySpec.ModelPromptSpec.getDefaultInstance() + : modelPromptSpec_; + } else { + return modelPromptSpecBuilder_.getMessage(); + } + } - numNextChunks_ = value; - bitField0_ |= 0x00000002; + /** + * + * + *
            +         * If specified, the spec will be used to modify the prompt provided to
            +         * the LLM.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec.ModelPromptSpec model_prompt_spec = 5; + * + */ + public Builder setModelPromptSpec( + com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec + .ModelPromptSpec + value) { + if (modelPromptSpecBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + modelPromptSpec_ = value; + } else { + modelPromptSpecBuilder_.setMessage(value); + } + bitField0_ |= 0x00000080; onChanged(); return this; } @@ -22290,1761 +21524,2192 @@ public Builder setNumNextChunks(int value) { * * *
            -         * The number of next chunks to be returned of the current chunk. The
            -         * maximum allowed value is 3.
            -         * If not specified, no next chunks will be returned.
            +         * If specified, the spec will be used to modify the prompt provided to
            +         * the LLM.
                      * 
            * - * int32 num_next_chunks = 2; - * - * @return This builder for chaining. + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec.ModelPromptSpec model_prompt_spec = 5; + * */ - public Builder clearNumNextChunks() { - bitField0_ = (bitField0_ & ~0x00000002); - numNextChunks_ = 0; + public Builder setModelPromptSpec( + com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec + .ModelPromptSpec.Builder + builderForValue) { + if (modelPromptSpecBuilder_ == null) { + modelPromptSpec_ = builderForValue.build(); + } else { + modelPromptSpecBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000080; onChanged(); return this; } - // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.ChunkSpec) - } - - // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.ChunkSpec) - private static final com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec - .ChunkSpec - DEFAULT_INSTANCE; + /** + * + * + *
            +         * If specified, the spec will be used to modify the prompt provided to
            +         * the LLM.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec.ModelPromptSpec model_prompt_spec = 5; + * + */ + public Builder mergeModelPromptSpec( + com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec + .ModelPromptSpec + value) { + if (modelPromptSpecBuilder_ == null) { + if (((bitField0_ & 0x00000080) != 0) + && modelPromptSpec_ != null + && modelPromptSpec_ + != com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec + .SummarySpec.ModelPromptSpec.getDefaultInstance()) { + getModelPromptSpecBuilder().mergeFrom(value); + } else { + modelPromptSpec_ = value; + } + } else { + modelPromptSpecBuilder_.mergeFrom(value); + } + if (modelPromptSpec_ != null) { + bitField0_ |= 0x00000080; + onChanged(); + } + return this; + } - static { - DEFAULT_INSTANCE = - new com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.ChunkSpec(); - } + /** + * + * + *
            +         * If specified, the spec will be used to modify the prompt provided to
            +         * the LLM.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec.ModelPromptSpec model_prompt_spec = 5; + * + */ + public Builder clearModelPromptSpec() { + bitField0_ = (bitField0_ & ~0x00000080); + modelPromptSpec_ = null; + if (modelPromptSpecBuilder_ != null) { + modelPromptSpecBuilder_.dispose(); + modelPromptSpecBuilder_ = null; + } + onChanged(); + return this; + } - public static com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec - .ChunkSpec - getDefaultInstance() { - return DEFAULT_INSTANCE; - } + /** + * + * + *
            +         * If specified, the spec will be used to modify the prompt provided to
            +         * the LLM.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec.ModelPromptSpec model_prompt_spec = 5; + * + */ + public com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec + .ModelPromptSpec.Builder + getModelPromptSpecBuilder() { + bitField0_ |= 0x00000080; + onChanged(); + return internalGetModelPromptSpecFieldBuilder().getBuilder(); + } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ChunkSpec parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException() - .setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; + /** + * + * + *
            +         * If specified, the spec will be used to modify the prompt provided to
            +         * the LLM.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec.ModelPromptSpec model_prompt_spec = 5; + * + */ + public com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec + .ModelPromptSpecOrBuilder + getModelPromptSpecOrBuilder() { + if (modelPromptSpecBuilder_ != null) { + return modelPromptSpecBuilder_.getMessageOrBuilder(); + } else { + return modelPromptSpec_ == null + ? com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec + .SummarySpec.ModelPromptSpec.getDefaultInstance() + : modelPromptSpec_; + } + } - public static com.google.protobuf.Parser parser() { - return PARSER; - } + /** + * + * + *
            +         * If specified, the spec will be used to modify the prompt provided to
            +         * the LLM.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec.ModelPromptSpec model_prompt_spec = 5; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec + .ModelPromptSpec, + com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec + .ModelPromptSpec.Builder, + com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec + .ModelPromptSpecOrBuilder> + internalGetModelPromptSpecFieldBuilder() { + if (modelPromptSpecBuilder_ == null) { + modelPromptSpecBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec + .SummarySpec.ModelPromptSpec, + com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec + .SummarySpec.ModelPromptSpec.Builder, + com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec + .SummarySpec.ModelPromptSpecOrBuilder>( + getModelPromptSpec(), getParentForChildren(), isClean()); + modelPromptSpec_ = null; + } + return modelPromptSpecBuilder_; + } - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + private java.lang.Object languageCode_ = ""; - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.ChunkSpec - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - } + /** + * + * + *
            +         * Language code for Summary. Use language tags defined by
            +         * [BCP47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt).
            +         * Note: This is an experimental feature.
            +         * 
            + * + * string language_code = 6; + * + * @return The languageCode. + */ + public java.lang.String getLanguageCode() { + java.lang.Object ref = languageCode_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + languageCode_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } - private int bitField0_; - public static final int SNIPPET_SPEC_FIELD_NUMBER = 1; - private com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SnippetSpec - snippetSpec_; + /** + * + * + *
            +         * Language code for Summary. Use language tags defined by
            +         * [BCP47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt).
            +         * Note: This is an experimental feature.
            +         * 
            + * + * string language_code = 6; + * + * @return The bytes for languageCode. + */ + public com.google.protobuf.ByteString getLanguageCodeBytes() { + java.lang.Object ref = languageCode_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + languageCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } - /** - * - * - *
            -     * If `snippetSpec` is not specified, snippets are not included in the
            -     * search response.
            -     * 
            - * - * - * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SnippetSpec snippet_spec = 1; - * - * - * @return Whether the snippetSpec field is set. - */ - @java.lang.Override - public boolean hasSnippetSpec() { - return ((bitField0_ & 0x00000001) != 0); - } + /** + * + * + *
            +         * Language code for Summary. Use language tags defined by
            +         * [BCP47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt).
            +         * Note: This is an experimental feature.
            +         * 
            + * + * string language_code = 6; + * + * @param value The languageCode to set. + * @return This builder for chaining. + */ + public Builder setLanguageCode(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + languageCode_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } - /** - * - * - *
            -     * If `snippetSpec` is not specified, snippets are not included in the
            -     * search response.
            -     * 
            - * - * - * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SnippetSpec snippet_spec = 1; - * - * - * @return The snippetSpec. - */ - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SnippetSpec - getSnippetSpec() { - return snippetSpec_ == null - ? com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SnippetSpec - .getDefaultInstance() - : snippetSpec_; - } + /** + * + * + *
            +         * Language code for Summary. Use language tags defined by
            +         * [BCP47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt).
            +         * Note: This is an experimental feature.
            +         * 
            + * + * string language_code = 6; + * + * @return This builder for chaining. + */ + public Builder clearLanguageCode() { + languageCode_ = getDefaultInstance().getLanguageCode(); + bitField0_ = (bitField0_ & ~0x00000100); + onChanged(); + return this; + } - /** - * - * - *
            -     * If `snippetSpec` is not specified, snippets are not included in the
            -     * search response.
            -     * 
            - * - * - * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SnippetSpec snippet_spec = 1; - * - */ - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec - .SnippetSpecOrBuilder - getSnippetSpecOrBuilder() { - return snippetSpec_ == null - ? com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SnippetSpec - .getDefaultInstance() - : snippetSpec_; - } + /** + * + * + *
            +         * Language code for Summary. Use language tags defined by
            +         * [BCP47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt).
            +         * Note: This is an experimental feature.
            +         * 
            + * + * string language_code = 6; + * + * @param value The bytes for languageCode to set. + * @return This builder for chaining. + */ + public Builder setLanguageCodeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + languageCode_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } - public static final int SUMMARY_SPEC_FIELD_NUMBER = 2; - private com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec - summarySpec_; + private com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec + .ModelSpec + modelSpec_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec + .ModelSpec, + com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec + .ModelSpec.Builder, + com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec + .ModelSpecOrBuilder> + modelSpecBuilder_; - /** - * - * - *
            -     * If `summarySpec` is not specified, summaries are not included in the
            -     * search response.
            -     * 
            - * - * - * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec summary_spec = 2; - * - * - * @return Whether the summarySpec field is set. - */ - @java.lang.Override - public boolean hasSummarySpec() { - return ((bitField0_ & 0x00000002) != 0); - } - - /** - * - * - *
            -     * If `summarySpec` is not specified, summaries are not included in the
            -     * search response.
            -     * 
            - * - * - * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec summary_spec = 2; - * - * - * @return The summarySpec. - */ - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec - getSummarySpec() { - return summarySpec_ == null - ? com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec - .getDefaultInstance() - : summarySpec_; - } - - /** - * - * - *
            -     * If `summarySpec` is not specified, summaries are not included in the
            -     * search response.
            -     * 
            - * - * - * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec summary_spec = 2; - * - */ - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec - .SummarySpecOrBuilder - getSummarySpecOrBuilder() { - return summarySpec_ == null - ? com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec - .getDefaultInstance() - : summarySpec_; - } - - public static final int EXTRACTIVE_CONTENT_SPEC_FIELD_NUMBER = 3; - private com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec - .ExtractiveContentSpec - extractiveContentSpec_; + /** + * + * + *
            +         * If specified, the spec will be used to modify the model specification
            +         * provided to the LLM.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec.ModelSpec model_spec = 7; + * + * + * @return Whether the modelSpec field is set. + */ + public boolean hasModelSpec() { + return ((bitField0_ & 0x00000200) != 0); + } - /** - * - * - *
            -     * If there is no extractive_content_spec provided, there will be no
            -     * extractive answer in the search response.
            -     * 
            - * - * - * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.ExtractiveContentSpec extractive_content_spec = 3; - * - * - * @return Whether the extractiveContentSpec field is set. - */ - @java.lang.Override - public boolean hasExtractiveContentSpec() { - return ((bitField0_ & 0x00000004) != 0); - } + /** + * + * + *
            +         * If specified, the spec will be used to modify the model specification
            +         * provided to the LLM.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec.ModelSpec model_spec = 7; + * + * + * @return The modelSpec. + */ + public com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec + .ModelSpec + getModelSpec() { + if (modelSpecBuilder_ == null) { + return modelSpec_ == null + ? com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec + .SummarySpec.ModelSpec.getDefaultInstance() + : modelSpec_; + } else { + return modelSpecBuilder_.getMessage(); + } + } - /** - * - * - *
            -     * If there is no extractive_content_spec provided, there will be no
            -     * extractive answer in the search response.
            -     * 
            - * - * - * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.ExtractiveContentSpec extractive_content_spec = 3; - * - * - * @return The extractiveContentSpec. - */ - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec - .ExtractiveContentSpec - getExtractiveContentSpec() { - return extractiveContentSpec_ == null - ? com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec - .ExtractiveContentSpec.getDefaultInstance() - : extractiveContentSpec_; - } + /** + * + * + *
            +         * If specified, the spec will be used to modify the model specification
            +         * provided to the LLM.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec.ModelSpec model_spec = 7; + * + */ + public Builder setModelSpec( + com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec + .ModelSpec + value) { + if (modelSpecBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + modelSpec_ = value; + } else { + modelSpecBuilder_.setMessage(value); + } + bitField0_ |= 0x00000200; + onChanged(); + return this; + } - /** - * - * - *
            -     * If there is no extractive_content_spec provided, there will be no
            -     * extractive answer in the search response.
            -     * 
            - * - * - * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.ExtractiveContentSpec extractive_content_spec = 3; - * - */ - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec - .ExtractiveContentSpecOrBuilder - getExtractiveContentSpecOrBuilder() { - return extractiveContentSpec_ == null - ? com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec - .ExtractiveContentSpec.getDefaultInstance() - : extractiveContentSpec_; - } + /** + * + * + *
            +         * If specified, the spec will be used to modify the model specification
            +         * provided to the LLM.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec.ModelSpec model_spec = 7; + * + */ + public Builder setModelSpec( + com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec + .ModelSpec.Builder + builderForValue) { + if (modelSpecBuilder_ == null) { + modelSpec_ = builderForValue.build(); + } else { + modelSpecBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000200; + onChanged(); + return this; + } - public static final int SEARCH_RESULT_MODE_FIELD_NUMBER = 4; - private int searchResultMode_ = 0; + /** + * + * + *
            +         * If specified, the spec will be used to modify the model specification
            +         * provided to the LLM.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec.ModelSpec model_spec = 7; + * + */ + public Builder mergeModelSpec( + com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec + .ModelSpec + value) { + if (modelSpecBuilder_ == null) { + if (((bitField0_ & 0x00000200) != 0) + && modelSpec_ != null + && modelSpec_ + != com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec + .SummarySpec.ModelSpec.getDefaultInstance()) { + getModelSpecBuilder().mergeFrom(value); + } else { + modelSpec_ = value; + } + } else { + modelSpecBuilder_.mergeFrom(value); + } + if (modelSpec_ != null) { + bitField0_ |= 0x00000200; + onChanged(); + } + return this; + } - /** - * - * - *
            -     * Specifies the search result mode. If unspecified, the
            -     * search result mode defaults to `DOCUMENTS`.
            -     * 
            - * - * - * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SearchResultMode search_result_mode = 4; - * - * - * @return The enum numeric value on the wire for searchResultMode. - */ - @java.lang.Override - public int getSearchResultModeValue() { - return searchResultMode_; - } + /** + * + * + *
            +         * If specified, the spec will be used to modify the model specification
            +         * provided to the LLM.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec.ModelSpec model_spec = 7; + * + */ + public Builder clearModelSpec() { + bitField0_ = (bitField0_ & ~0x00000200); + modelSpec_ = null; + if (modelSpecBuilder_ != null) { + modelSpecBuilder_.dispose(); + modelSpecBuilder_ = null; + } + onChanged(); + return this; + } - /** - * - * - *
            -     * Specifies the search result mode. If unspecified, the
            -     * search result mode defaults to `DOCUMENTS`.
            -     * 
            - * - * - * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SearchResultMode search_result_mode = 4; - * - * - * @return The searchResultMode. - */ - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SearchResultMode - getSearchResultMode() { - com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SearchResultMode - result = - com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec - .SearchResultMode.forNumber(searchResultMode_); - return result == null - ? com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SearchResultMode - .UNRECOGNIZED - : result; - } + /** + * + * + *
            +         * If specified, the spec will be used to modify the model specification
            +         * provided to the LLM.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec.ModelSpec model_spec = 7; + * + */ + public com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec + .ModelSpec.Builder + getModelSpecBuilder() { + bitField0_ |= 0x00000200; + onChanged(); + return internalGetModelSpecFieldBuilder().getBuilder(); + } - public static final int CHUNK_SPEC_FIELD_NUMBER = 5; - private com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.ChunkSpec - chunkSpec_; + /** + * + * + *
            +         * If specified, the spec will be used to modify the model specification
            +         * provided to the LLM.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec.ModelSpec model_spec = 7; + * + */ + public com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec + .ModelSpecOrBuilder + getModelSpecOrBuilder() { + if (modelSpecBuilder_ != null) { + return modelSpecBuilder_.getMessageOrBuilder(); + } else { + return modelSpec_ == null + ? com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec + .SummarySpec.ModelSpec.getDefaultInstance() + : modelSpec_; + } + } - /** - * - * - *
            -     * Specifies the chunk spec to be returned from the search response.
            -     * Only available if the
            -     * [SearchRequest.ContentSearchSpec.search_result_mode][google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.search_result_mode]
            -     * is set to
            -     * [CHUNKS][google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SearchResultMode.CHUNKS]
            -     * 
            - * - * - * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.ChunkSpec chunk_spec = 5; - * - * - * @return Whether the chunkSpec field is set. - */ - @java.lang.Override - public boolean hasChunkSpec() { - return ((bitField0_ & 0x00000008) != 0); - } + /** + * + * + *
            +         * If specified, the spec will be used to modify the model specification
            +         * provided to the LLM.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec.ModelSpec model_spec = 7; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec + .ModelSpec, + com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec + .ModelSpec.Builder, + com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec + .ModelSpecOrBuilder> + internalGetModelSpecFieldBuilder() { + if (modelSpecBuilder_ == null) { + modelSpecBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec + .SummarySpec.ModelSpec, + com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec + .SummarySpec.ModelSpec.Builder, + com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec + .SummarySpec.ModelSpecOrBuilder>( + getModelSpec(), getParentForChildren(), isClean()); + modelSpec_ = null; + } + return modelSpecBuilder_; + } - /** - * - * - *
            -     * Specifies the chunk spec to be returned from the search response.
            -     * Only available if the
            -     * [SearchRequest.ContentSearchSpec.search_result_mode][google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.search_result_mode]
            -     * is set to
            -     * [CHUNKS][google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SearchResultMode.CHUNKS]
            -     * 
            - * - * - * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.ChunkSpec chunk_spec = 5; - * - * - * @return The chunkSpec. - */ - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.ChunkSpec - getChunkSpec() { - return chunkSpec_ == null - ? com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.ChunkSpec - .getDefaultInstance() - : chunkSpec_; - } + private boolean useSemanticChunks_; - /** - * - * - *
            -     * Specifies the chunk spec to be returned from the search response.
            -     * Only available if the
            -     * [SearchRequest.ContentSearchSpec.search_result_mode][google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.search_result_mode]
            -     * is set to
            -     * [CHUNKS][google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SearchResultMode.CHUNKS]
            -     * 
            - * - * - * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.ChunkSpec chunk_spec = 5; - * - */ - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec - .ChunkSpecOrBuilder - getChunkSpecOrBuilder() { - return chunkSpec_ == null - ? com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.ChunkSpec - .getDefaultInstance() - : chunkSpec_; - } + /** + * + * + *
            +         * If true, answer will be generated from most relevant chunks from top
            +         * search results. This feature will improve summary quality.
            +         * Note that with this feature enabled, not all top search results
            +         * will be referenced and included in the reference list, so the citation
            +         * source index only points to the search results listed in the reference
            +         * list.
            +         * 
            + * + * bool use_semantic_chunks = 8; + * + * @return The useSemanticChunks. + */ + @java.lang.Override + public boolean getUseSemanticChunks() { + return useSemanticChunks_; + } - private byte memoizedIsInitialized = -1; + /** + * + * + *
            +         * If true, answer will be generated from most relevant chunks from top
            +         * search results. This feature will improve summary quality.
            +         * Note that with this feature enabled, not all top search results
            +         * will be referenced and included in the reference list, so the citation
            +         * source index only points to the search results listed in the reference
            +         * list.
            +         * 
            + * + * bool use_semantic_chunks = 8; + * + * @param value The useSemanticChunks to set. + * @return This builder for chaining. + */ + public Builder setUseSemanticChunks(boolean value) { - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + useSemanticChunks_ = value; + bitField0_ |= 0x00000400; + onChanged(); + return this; + } - memoizedIsInitialized = 1; - return true; - } + /** + * + * + *
            +         * If true, answer will be generated from most relevant chunks from top
            +         * search results. This feature will improve summary quality.
            +         * Note that with this feature enabled, not all top search results
            +         * will be referenced and included in the reference list, so the citation
            +         * source index only points to the search results listed in the reference
            +         * list.
            +         * 
            + * + * bool use_semantic_chunks = 8; + * + * @return This builder for chaining. + */ + public Builder clearUseSemanticChunks() { + bitField0_ = (bitField0_ & ~0x00000400); + useSemanticChunks_ = false; + onChanged(); + return this; + } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(1, getSnippetSpec()); - } - if (((bitField0_ & 0x00000002) != 0)) { - output.writeMessage(2, getSummarySpec()); - } - if (((bitField0_ & 0x00000004) != 0)) { - output.writeMessage(3, getExtractiveContentSpec()); - } - if (searchResultMode_ - != com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec - .SearchResultMode.SEARCH_RESULT_MODE_UNSPECIFIED - .getNumber()) { - output.writeEnum(4, searchResultMode_); - } - if (((bitField0_ & 0x00000008) != 0)) { - output.writeMessage(5, getChunkSpec()); + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec) } - getUnknownFields().writeTo(output); - } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec) + private static final com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec + .SummarySpec + DEFAULT_INSTANCE; - size = 0; - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getSnippetSpec()); - } - if (((bitField0_ & 0x00000002) != 0)) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getSummarySpec()); - } - if (((bitField0_ & 0x00000004) != 0)) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize(3, getExtractiveContentSpec()); - } - if (searchResultMode_ - != com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec - .SearchResultMode.SEARCH_RESULT_MODE_UNSPECIFIED - .getNumber()) { - size += com.google.protobuf.CodedOutputStream.computeEnumSize(4, searchResultMode_); - } - if (((bitField0_ & 0x00000008) != 0)) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getChunkSpec()); + static { + DEFAULT_INSTANCE = + new com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec + .SummarySpec(); } - 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.discoveryengine.v1beta.SearchRequest.ContentSearchSpec)) { - return super.equals(obj); + public static com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec + .SummarySpec + getDefaultInstance() { + return DEFAULT_INSTANCE; } - com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec other = - (com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec) obj; - if (hasSnippetSpec() != other.hasSnippetSpec()) return false; - if (hasSnippetSpec()) { - if (!getSnippetSpec().equals(other.getSnippetSpec())) return false; - } - if (hasSummarySpec() != other.hasSummarySpec()) return false; - if (hasSummarySpec()) { - if (!getSummarySpec().equals(other.getSummarySpec())) return false; - } - if (hasExtractiveContentSpec() != other.hasExtractiveContentSpec()) return false; - if (hasExtractiveContentSpec()) { - if (!getExtractiveContentSpec().equals(other.getExtractiveContentSpec())) return false; - } - if (searchResultMode_ != other.searchResultMode_) return false; - if (hasChunkSpec() != other.hasChunkSpec()) return false; - if (hasChunkSpec()) { - if (!getChunkSpec().equals(other.getChunkSpec())) return false; - } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SummarySpec parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasSnippetSpec()) { - hash = (37 * hash) + SNIPPET_SPEC_FIELD_NUMBER; - hash = (53 * hash) + getSnippetSpec().hashCode(); - } - if (hasSummarySpec()) { - hash = (37 * hash) + SUMMARY_SPEC_FIELD_NUMBER; - hash = (53 * hash) + getSummarySpec().hashCode(); - } - if (hasExtractiveContentSpec()) { - hash = (37 * hash) + EXTRACTIVE_CONTENT_SPEC_FIELD_NUMBER; - hash = (53 * hash) + getExtractiveContentSpec().hashCode(); - } - hash = (37 * hash) + SEARCH_RESULT_MODE_FIELD_NUMBER; - hash = (53 * hash) + searchResultMode_; - if (hasChunkSpec()) { - hash = (37 * hash) + CHUNK_SPEC_FIELD_NUMBER; - hash = (53 * hash) + getChunkSpec().hashCode(); + public static com.google.protobuf.Parser parser() { + return PARSER; } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec 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.discoveryengine.v1beta.SearchRequest.ContentSearchSpec parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec 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.discoveryengine.v1beta.SearchRequest.ContentSearchSpec parseFrom( - byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec 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.discoveryengine.v1beta.SearchRequest.ContentSearchSpec - parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } - public static com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec - parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } - public static com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } } - public static com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } + public interface ExtractiveContentSpecOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.ExtractiveContentSpec) + com.google.protobuf.MessageOrBuilder { - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } + /** + * + * + *
            +       * The maximum number of extractive answers returned in each search
            +       * result.
            +       *
            +       * An extractive answer is a verbatim answer extracted from the original
            +       * document, which provides a precise and contextually relevant answer to
            +       * the search query.
            +       *
            +       * If the number of matching answers is less than the
            +       * `max_extractive_answer_count`, return all of the answers. Otherwise,
            +       * return the `max_extractive_answer_count`.
            +       *
            +       * At most five answers are returned for each
            +       * [SearchResult][google.cloud.discoveryengine.v1beta.SearchResponse.SearchResult].
            +       * 
            + * + * int32 max_extractive_answer_count = 1; + * + * @return The maxExtractiveAnswerCount. + */ + int getMaxExtractiveAnswerCount(); - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } + /** + * + * + *
            +       * The max number of extractive segments returned in each search result.
            +       * Only applied if the
            +       * [DataStore][google.cloud.discoveryengine.v1beta.DataStore] is set to
            +       * [DataStore.ContentConfig.CONTENT_REQUIRED][google.cloud.discoveryengine.v1beta.DataStore.ContentConfig.CONTENT_REQUIRED]
            +       * or
            +       * [DataStore.solution_types][google.cloud.discoveryengine.v1beta.DataStore.solution_types]
            +       * is
            +       * [SOLUTION_TYPE_CHAT][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_CHAT].
            +       *
            +       * An extractive segment is a text segment extracted from the original
            +       * document that is relevant to the search query, and, in general, more
            +       * verbose than an extractive answer. The segment could then be used as
            +       * input for LLMs to generate summaries and answers.
            +       *
            +       * If the number of matching segments is less than
            +       * `max_extractive_segment_count`, return all of the segments. Otherwise,
            +       * return the `max_extractive_segment_count`.
            +       * 
            + * + * int32 max_extractive_segment_count = 2; + * + * @return The maxExtractiveSegmentCount. + */ + int getMaxExtractiveSegmentCount(); - public static Builder newBuilder( - com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } + /** + * + * + *
            +       * Specifies whether to return the confidence score from the extractive
            +       * segments in each search result. This feature is available only for new
            +       * or allowlisted data stores. To allowlist your data store,
            +       * contact your Customer Engineer. The default value is `false`.
            +       * 
            + * + * bool return_extractive_segment_score = 3; + * + * @return The returnExtractiveSegmentScore. + */ + boolean getReturnExtractiveSegmentScore(); - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } + /** + * + * + *
            +       * Specifies whether to also include the adjacent from each selected
            +       * segments.
            +       * Return at most `num_previous_segments` segments before each selected
            +       * segments.
            +       * 
            + * + * int32 num_previous_segments = 4; + * + * @return The numPreviousSegments. + */ + int getNumPreviousSegments(); - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; + /** + * + * + *
            +       * Return at most `num_next_segments` segments after each selected
            +       * segments.
            +       * 
            + * + * int32 num_next_segments = 5; + * + * @return The numNextSegments. + */ + int getNumNextSegments(); } /** * * *
            -     * A specification for configuring the behavior of content search.
            +     * A specification for configuring the extractive content in a search
            +     * response.
                  * 
            * - * Protobuf type {@code google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec} + * Protobuf type {@code + * google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.ExtractiveContentSpec} */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + public static final class ExtractiveContentSpec extends com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec) - com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpecOrBuilder { + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.ExtractiveContentSpec) + ExtractiveContentSpecOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ExtractiveContentSpec"); + } + + // Use ExtractiveContentSpec.newBuilder() to construct. + private ExtractiveContentSpec(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ExtractiveContentSpec() {} + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.discoveryengine.v1beta.SearchServiceProto - .internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_ContentSearchSpec_descriptor; + .internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_ContentSearchSpec_ExtractiveContentSpec_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.discoveryengine.v1beta.SearchServiceProto - .internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_ContentSearchSpec_fieldAccessorTable + .internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_ContentSearchSpec_ExtractiveContentSpec_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.class, - com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.Builder - .class); + com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec + .ExtractiveContentSpec.class, + com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec + .ExtractiveContentSpec.Builder.class); } - // Construct using - // com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + public static final int MAX_EXTRACTIVE_ANSWER_COUNT_FIELD_NUMBER = 1; + private int maxExtractiveAnswerCount_ = 0; - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); + /** + * + * + *
            +       * The maximum number of extractive answers returned in each search
            +       * result.
            +       *
            +       * An extractive answer is a verbatim answer extracted from the original
            +       * document, which provides a precise and contextually relevant answer to
            +       * the search query.
            +       *
            +       * If the number of matching answers is less than the
            +       * `max_extractive_answer_count`, return all of the answers. Otherwise,
            +       * return the `max_extractive_answer_count`.
            +       *
            +       * At most five answers are returned for each
            +       * [SearchResult][google.cloud.discoveryengine.v1beta.SearchResponse.SearchResult].
            +       * 
            + * + * int32 max_extractive_answer_count = 1; + * + * @return The maxExtractiveAnswerCount. + */ + @java.lang.Override + public int getMaxExtractiveAnswerCount() { + return maxExtractiveAnswerCount_; } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - internalGetSnippetSpecFieldBuilder(); - internalGetSummarySpecFieldBuilder(); - internalGetExtractiveContentSpecFieldBuilder(); - internalGetChunkSpecFieldBuilder(); - } - } + public static final int MAX_EXTRACTIVE_SEGMENT_COUNT_FIELD_NUMBER = 2; + private int maxExtractiveSegmentCount_ = 0; + /** + * + * + *
            +       * The max number of extractive segments returned in each search result.
            +       * Only applied if the
            +       * [DataStore][google.cloud.discoveryengine.v1beta.DataStore] is set to
            +       * [DataStore.ContentConfig.CONTENT_REQUIRED][google.cloud.discoveryengine.v1beta.DataStore.ContentConfig.CONTENT_REQUIRED]
            +       * or
            +       * [DataStore.solution_types][google.cloud.discoveryengine.v1beta.DataStore.solution_types]
            +       * is
            +       * [SOLUTION_TYPE_CHAT][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_CHAT].
            +       *
            +       * An extractive segment is a text segment extracted from the original
            +       * document that is relevant to the search query, and, in general, more
            +       * verbose than an extractive answer. The segment could then be used as
            +       * input for LLMs to generate summaries and answers.
            +       *
            +       * If the number of matching segments is less than
            +       * `max_extractive_segment_count`, return all of the segments. Otherwise,
            +       * return the `max_extractive_segment_count`.
            +       * 
            + * + * int32 max_extractive_segment_count = 2; + * + * @return The maxExtractiveSegmentCount. + */ @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - snippetSpec_ = null; - if (snippetSpecBuilder_ != null) { - snippetSpecBuilder_.dispose(); - snippetSpecBuilder_ = null; - } - summarySpec_ = null; - if (summarySpecBuilder_ != null) { - summarySpecBuilder_.dispose(); - summarySpecBuilder_ = null; - } - extractiveContentSpec_ = null; - if (extractiveContentSpecBuilder_ != null) { - extractiveContentSpecBuilder_.dispose(); - extractiveContentSpecBuilder_ = null; - } - searchResultMode_ = 0; - chunkSpec_ = null; - if (chunkSpecBuilder_ != null) { - chunkSpecBuilder_.dispose(); - chunkSpecBuilder_ = null; - } - return this; + public int getMaxExtractiveSegmentCount() { + return maxExtractiveSegmentCount_; } - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.discoveryengine.v1beta.SearchServiceProto - .internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_ContentSearchSpec_descriptor; - } + public static final int RETURN_EXTRACTIVE_SEGMENT_SCORE_FIELD_NUMBER = 3; + private boolean returnExtractiveSegmentScore_ = false; + /** + * + * + *
            +       * Specifies whether to return the confidence score from the extractive
            +       * segments in each search result. This feature is available only for new
            +       * or allowlisted data stores. To allowlist your data store,
            +       * contact your Customer Engineer. The default value is `false`.
            +       * 
            + * + * bool return_extractive_segment_score = 3; + * + * @return The returnExtractiveSegmentScore. + */ @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec - getDefaultInstanceForType() { - return com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec - .getDefaultInstance(); + public boolean getReturnExtractiveSegmentScore() { + return returnExtractiveSegmentScore_; } + public static final int NUM_PREVIOUS_SEGMENTS_FIELD_NUMBER = 4; + private int numPreviousSegments_ = 0; + + /** + * + * + *
            +       * Specifies whether to also include the adjacent from each selected
            +       * segments.
            +       * Return at most `num_previous_segments` segments before each selected
            +       * segments.
            +       * 
            + * + * int32 num_previous_segments = 4; + * + * @return The numPreviousSegments. + */ @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec build() { - com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec result = - buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; + public int getNumPreviousSegments() { + return numPreviousSegments_; } + public static final int NUM_NEXT_SEGMENTS_FIELD_NUMBER = 5; + private int numNextSegments_ = 0; + + /** + * + * + *
            +       * Return at most `num_next_segments` segments after each selected
            +       * segments.
            +       * 
            + * + * int32 num_next_segments = 5; + * + * @return The numNextSegments. + */ @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec - buildPartial() { - com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec result = - new com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; + public int getNumNextSegments() { + return numNextSegments_; } - private void buildPartial0( - com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.snippetSpec_ = - snippetSpecBuilder_ == null ? snippetSpec_ : snippetSpecBuilder_.build(); - to_bitField0_ |= 0x00000001; + 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 (maxExtractiveAnswerCount_ != 0) { + output.writeInt32(1, maxExtractiveAnswerCount_); } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.summarySpec_ = - summarySpecBuilder_ == null ? summarySpec_ : summarySpecBuilder_.build(); - to_bitField0_ |= 0x00000002; + if (maxExtractiveSegmentCount_ != 0) { + output.writeInt32(2, maxExtractiveSegmentCount_); } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.extractiveContentSpec_ = - extractiveContentSpecBuilder_ == null - ? extractiveContentSpec_ - : extractiveContentSpecBuilder_.build(); - to_bitField0_ |= 0x00000004; + if (returnExtractiveSegmentScore_ != false) { + output.writeBool(3, returnExtractiveSegmentScore_); } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.searchResultMode_ = searchResultMode_; + if (numPreviousSegments_ != 0) { + output.writeInt32(4, numPreviousSegments_); } - if (((from_bitField0_ & 0x00000010) != 0)) { - result.chunkSpec_ = chunkSpecBuilder_ == null ? chunkSpec_ : chunkSpecBuilder_.build(); - to_bitField0_ |= 0x00000008; + if (numNextSegments_ != 0) { + output.writeInt32(5, numNextSegments_); } - result.bitField0_ |= to_bitField0_; + getUnknownFields().writeTo(output); } @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other - instanceof com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec) { - return mergeFrom( - (com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec) other); - } else { - super.mergeFrom(other); - return this; - } - } + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; - public Builder mergeFrom( - com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec other) { - if (other - == com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec - .getDefaultInstance()) return this; - if (other.hasSnippetSpec()) { - mergeSnippetSpec(other.getSnippetSpec()); + size = 0; + if (maxExtractiveAnswerCount_ != 0) { + size += + com.google.protobuf.CodedOutputStream.computeInt32Size(1, maxExtractiveAnswerCount_); } - if (other.hasSummarySpec()) { - mergeSummarySpec(other.getSummarySpec()); + if (maxExtractiveSegmentCount_ != 0) { + size += + com.google.protobuf.CodedOutputStream.computeInt32Size(2, maxExtractiveSegmentCount_); } - if (other.hasExtractiveContentSpec()) { - mergeExtractiveContentSpec(other.getExtractiveContentSpec()); + if (returnExtractiveSegmentScore_ != false) { + size += + com.google.protobuf.CodedOutputStream.computeBoolSize( + 3, returnExtractiveSegmentScore_); } - if (other.searchResultMode_ != 0) { - setSearchResultModeValue(other.getSearchResultModeValue()); + if (numPreviousSegments_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(4, numPreviousSegments_); } - if (other.hasChunkSpec()) { - mergeChunkSpec(other.getChunkSpec()); + if (numNextSegments_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(5, numNextSegments_); } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; } @java.lang.Override - public final boolean isInitialized() { + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof + com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec + .ExtractiveContentSpec)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec + .ExtractiveContentSpec + other = + (com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec + .ExtractiveContentSpec) + obj; + + if (getMaxExtractiveAnswerCount() != other.getMaxExtractiveAnswerCount()) return false; + if (getMaxExtractiveSegmentCount() != other.getMaxExtractiveSegmentCount()) return false; + if (getReturnExtractiveSegmentScore() != other.getReturnExtractiveSegmentScore()) + return false; + if (getNumPreviousSegments() != other.getNumPreviousSegments()) return false; + if (getNumNextSegments() != other.getNumNextSegments()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - input.readMessage( - internalGetSnippetSpecFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: - { - input.readMessage( - internalGetSummarySpecFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 26: - { - input.readMessage( - internalGetExtractiveContentSpecFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000004; - break; - } // case 26 - case 32: - { - searchResultMode_ = input.readEnum(); - bitField0_ |= 0x00000008; - break; - } // case 32 - case 42: - { - input.readMessage( - internalGetChunkSpecFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000010; - break; - } // case 42 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + MAX_EXTRACTIVE_ANSWER_COUNT_FIELD_NUMBER; + hash = (53 * hash) + getMaxExtractiveAnswerCount(); + hash = (37 * hash) + MAX_EXTRACTIVE_SEGMENT_COUNT_FIELD_NUMBER; + hash = (53 * hash) + getMaxExtractiveSegmentCount(); + hash = (37 * hash) + RETURN_EXTRACTIVE_SEGMENT_SCORE_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashBoolean(getReturnExtractiveSegmentScore()); + hash = (37 * hash) + NUM_PREVIOUS_SEGMENTS_FIELD_NUMBER; + hash = (53 * hash) + getNumPreviousSegments(); + hash = (37 * hash) + NUM_NEXT_SEGMENTS_FIELD_NUMBER; + hash = (53 * hash) + getNumNextSegments(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; } - private int bitField0_; + public static com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec + .ExtractiveContentSpec + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - private com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SnippetSpec - snippetSpec_; - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SnippetSpec, - com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SnippetSpec - .Builder, - com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec - .SnippetSpecOrBuilder> - snippetSpecBuilder_; + public static com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec + .ExtractiveContentSpec + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - /** - * - * - *
            -       * If `snippetSpec` is not specified, snippets are not included in the
            -       * search response.
            -       * 
            - * - * - * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SnippetSpec snippet_spec = 1; - * - * - * @return Whether the snippetSpec field is set. - */ - public boolean hasSnippetSpec() { - return ((bitField0_ & 0x00000001) != 0); + public static com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec + .ExtractiveContentSpec + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); } - /** - * - * - *
            -       * If `snippetSpec` is not specified, snippets are not included in the
            -       * search response.
            -       * 
            - * - * - * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SnippetSpec snippet_spec = 1; - * - * - * @return The snippetSpec. - */ - public com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SnippetSpec - getSnippetSpec() { - if (snippetSpecBuilder_ == null) { - return snippetSpec_ == null - ? com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SnippetSpec - .getDefaultInstance() - : snippetSpec_; - } else { - return snippetSpecBuilder_.getMessage(); - } + public static com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec + .ExtractiveContentSpec + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); } - /** - * - * - *
            -       * If `snippetSpec` is not specified, snippets are not included in the
            -       * search response.
            -       * 
            - * - * - * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SnippetSpec snippet_spec = 1; - * - */ - public Builder setSnippetSpec( - com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SnippetSpec - value) { - if (snippetSpecBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - snippetSpec_ = value; - } else { - snippetSpecBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; + public static com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec + .ExtractiveContentSpec + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); } - /** - * - * - *
            -       * If `snippetSpec` is not specified, snippets are not included in the
            -       * search response.
            -       * 
            - * - * - * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SnippetSpec snippet_spec = 1; - * - */ - public Builder setSnippetSpec( - com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SnippetSpec - .Builder - builderForValue) { - if (snippetSpecBuilder_ == null) { - snippetSpec_ = builderForValue.build(); - } else { - snippetSpecBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; + public static com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec + .ExtractiveContentSpec + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec + .ExtractiveContentSpec + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec + .ExtractiveContentSpec + 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.discoveryengine.v1beta.SearchRequest.ContentSearchSpec + .ExtractiveContentSpec + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec + .ExtractiveContentSpec + 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.discoveryengine.v1beta.SearchRequest.ContentSearchSpec + .ExtractiveContentSpec + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec + .ExtractiveContentSpec + 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.discoveryengine.v1beta.SearchRequest.ContentSearchSpec + .ExtractiveContentSpec + 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; } /** * * *
            -       * If `snippetSpec` is not specified, snippets are not included in the
            -       * search response.
            +       * A specification for configuring the extractive content in a search
            +       * response.
                    * 
            * - * - * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SnippetSpec snippet_spec = 1; - * + * Protobuf type {@code + * google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.ExtractiveContentSpec} */ - public Builder mergeSnippetSpec( - com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SnippetSpec - value) { - if (snippetSpecBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) - && snippetSpec_ != null - && snippetSpec_ - != com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec - .SnippetSpec.getDefaultInstance()) { - getSnippetSpecBuilder().mergeFrom(value); - } else { - snippetSpec_ = value; - } - } else { - snippetSpecBuilder_.mergeFrom(value); - } - if (snippetSpec_ != null) { - bitField0_ |= 0x00000001; - onChanged(); + public static final class Builder + extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.ExtractiveContentSpec) + com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec + .ExtractiveContentSpecOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_ContentSearchSpec_ExtractiveContentSpec_descriptor; } - return this; - } - /** - * - * - *
            -       * If `snippetSpec` is not specified, snippets are not included in the
            -       * search response.
            -       * 
            - * - * - * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SnippetSpec snippet_spec = 1; - * - */ - public Builder clearSnippetSpec() { - bitField0_ = (bitField0_ & ~0x00000001); - snippetSpec_ = null; - if (snippetSpecBuilder_ != null) { - snippetSpecBuilder_.dispose(); - snippetSpecBuilder_ = null; + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_ContentSearchSpec_ExtractiveContentSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec + .ExtractiveContentSpec.class, + com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec + .ExtractiveContentSpec.Builder.class); } - onChanged(); - return this; - } - /** - * - * - *
            -       * If `snippetSpec` is not specified, snippets are not included in the
            -       * search response.
            -       * 
            - * - * - * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SnippetSpec snippet_spec = 1; - * - */ - public com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SnippetSpec - .Builder - getSnippetSpecBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return internalGetSnippetSpecFieldBuilder().getBuilder(); - } + // Construct using + // com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.ExtractiveContentSpec.newBuilder() + private Builder() {} - /** - * - * - *
            -       * If `snippetSpec` is not specified, snippets are not included in the
            -       * search response.
            -       * 
            - * - * - * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SnippetSpec snippet_spec = 1; - * - */ - public com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec - .SnippetSpecOrBuilder - getSnippetSpecOrBuilder() { - if (snippetSpecBuilder_ != null) { - return snippetSpecBuilder_.getMessageOrBuilder(); - } else { - return snippetSpec_ == null - ? com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SnippetSpec - .getDefaultInstance() - : snippetSpec_; + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); } - } - /** - * - * - *
            -       * If `snippetSpec` is not specified, snippets are not included in the
            -       * search response.
            -       * 
            - * - * - * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SnippetSpec snippet_spec = 1; - * - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SnippetSpec, - com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SnippetSpec - .Builder, - com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec - .SnippetSpecOrBuilder> - internalGetSnippetSpecFieldBuilder() { - if (snippetSpecBuilder_ == null) { - snippetSpecBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec - .SnippetSpec, - com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec - .SnippetSpec.Builder, - com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec - .SnippetSpecOrBuilder>(getSnippetSpec(), getParentForChildren(), isClean()); - snippetSpec_ = null; + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + maxExtractiveAnswerCount_ = 0; + maxExtractiveSegmentCount_ = 0; + returnExtractiveSegmentScore_ = false; + numPreviousSegments_ = 0; + numNextSegments_ = 0; + return this; } - return snippetSpecBuilder_; - } - private com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec - summarySpec_; - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec, - com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec - .Builder, - com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec - .SummarySpecOrBuilder> - summarySpecBuilder_; + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1beta.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_ContentSearchSpec_ExtractiveContentSpec_descriptor; + } - /** - * - * - *
            -       * If `summarySpec` is not specified, summaries are not included in the
            -       * search response.
            -       * 
            - * - * - * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec summary_spec = 2; - * - * - * @return Whether the summarySpec field is set. - */ - public boolean hasSummarySpec() { - return ((bitField0_ & 0x00000002) != 0); - } + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec + .ExtractiveContentSpec + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec + .ExtractiveContentSpec.getDefaultInstance(); + } - /** - * - * - *
            -       * If `summarySpec` is not specified, summaries are not included in the
            -       * search response.
            -       * 
            - * - * - * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec summary_spec = 2; - * - * - * @return The summarySpec. - */ - public com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec - getSummarySpec() { - if (summarySpecBuilder_ == null) { - return summarySpec_ == null - ? com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec - .getDefaultInstance() - : summarySpec_; - } else { - return summarySpecBuilder_.getMessage(); + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec + .ExtractiveContentSpec + build() { + com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec + .ExtractiveContentSpec + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; } - } - /** - * - * - *
            -       * If `summarySpec` is not specified, summaries are not included in the
            -       * search response.
            -       * 
            - * - * - * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec summary_spec = 2; - * - */ - public Builder setSummarySpec( - com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec - value) { - if (summarySpecBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec + .ExtractiveContentSpec + buildPartial() { + com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec + .ExtractiveContentSpec + result = + new com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec + .ExtractiveContentSpec(this); + if (bitField0_ != 0) { + buildPartial0(result); } - summarySpec_ = value; - } else { - summarySpecBuilder_.setMessage(value); + onBuilt(); + return result; } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
            -       * If `summarySpec` is not specified, summaries are not included in the
            -       * search response.
            -       * 
            - * - * - * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec summary_spec = 2; - * - */ - public Builder setSummarySpec( - com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec - .Builder - builderForValue) { - if (summarySpecBuilder_ == null) { - summarySpec_ = builderForValue.build(); - } else { - summarySpecBuilder_.setMessage(builderForValue.build()); + private void buildPartial0( + com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec + .ExtractiveContentSpec + result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.maxExtractiveAnswerCount_ = maxExtractiveAnswerCount_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.maxExtractiveSegmentCount_ = maxExtractiveSegmentCount_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.returnExtractiveSegmentScore_ = returnExtractiveSegmentScore_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.numPreviousSegments_ = numPreviousSegments_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.numNextSegments_ = numNextSegments_; + } } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
            -       * If `summarySpec` is not specified, summaries are not included in the
            -       * search response.
            -       * 
            - * - * - * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec summary_spec = 2; - * - */ - public Builder mergeSummarySpec( - com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec - value) { - if (summarySpecBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0) - && summarySpec_ != null - && summarySpec_ - != com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec - .SummarySpec.getDefaultInstance()) { - getSummarySpecBuilder().mergeFrom(value); + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec + .ExtractiveContentSpec) { + return mergeFrom( + (com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec + .ExtractiveContentSpec) + other); } else { - summarySpec_ = value; + super.mergeFrom(other); + return this; } - } else { - summarySpecBuilder_.mergeFrom(value); } - if (summarySpec_ != null) { - bitField0_ |= 0x00000002; + + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec + .ExtractiveContentSpec + other) { + if (other + == com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec + .ExtractiveContentSpec.getDefaultInstance()) return this; + if (other.getMaxExtractiveAnswerCount() != 0) { + setMaxExtractiveAnswerCount(other.getMaxExtractiveAnswerCount()); + } + if (other.getMaxExtractiveSegmentCount() != 0) { + setMaxExtractiveSegmentCount(other.getMaxExtractiveSegmentCount()); + } + if (other.getReturnExtractiveSegmentScore() != false) { + setReturnExtractiveSegmentScore(other.getReturnExtractiveSegmentScore()); + } + if (other.getNumPreviousSegments() != 0) { + setNumPreviousSegments(other.getNumPreviousSegments()); + } + if (other.getNumNextSegments() != 0) { + setNumNextSegments(other.getNumNextSegments()); + } + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); + return this; } - return this; - } - /** - * - * - *
            -       * If `summarySpec` is not specified, summaries are not included in the
            -       * search response.
            -       * 
            - * - * - * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec summary_spec = 2; - * - */ - public Builder clearSummarySpec() { - bitField0_ = (bitField0_ & ~0x00000002); - summarySpec_ = null; - if (summarySpecBuilder_ != null) { - summarySpecBuilder_.dispose(); - summarySpecBuilder_ = null; + @java.lang.Override + public final boolean isInitialized() { + return true; } - onChanged(); - return this; - } - - /** - * - * - *
            -       * If `summarySpec` is not specified, summaries are not included in the
            -       * search response.
            -       * 
            - * - * - * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec summary_spec = 2; - * - */ - public com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec - .Builder - getSummarySpecBuilder() { - bitField0_ |= 0x00000002; - onChanged(); - return internalGetSummarySpecFieldBuilder().getBuilder(); - } - /** - * - * - *
            -       * If `summarySpec` is not specified, summaries are not included in the
            -       * search response.
            -       * 
            - * - * - * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec summary_spec = 2; - * - */ - public com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec - .SummarySpecOrBuilder - getSummarySpecOrBuilder() { - if (summarySpecBuilder_ != null) { - return summarySpecBuilder_.getMessageOrBuilder(); - } else { - return summarySpec_ == null - ? com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec - .getDefaultInstance() - : summarySpec_; + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + maxExtractiveAnswerCount_ = input.readInt32(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 16: + { + maxExtractiveSegmentCount_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 24: + { + returnExtractiveSegmentScore_ = input.readBool(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 32: + { + numPreviousSegments_ = input.readInt32(); + bitField0_ |= 0x00000008; + break; + } // case 32 + case 40: + { + numNextSegments_ = input.readInt32(); + bitField0_ |= 0x00000010; + break; + } // case 40 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; } - } - /** - * - * - *
            -       * If `summarySpec` is not specified, summaries are not included in the
            -       * search response.
            -       * 
            - * - * - * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec summary_spec = 2; - * - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec, - com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec - .Builder, - com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec - .SummarySpecOrBuilder> - internalGetSummarySpecFieldBuilder() { - if (summarySpecBuilder_ == null) { - summarySpecBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec - .SummarySpec, - com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec - .SummarySpec.Builder, - com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec - .SummarySpecOrBuilder>(getSummarySpec(), getParentForChildren(), isClean()); - summarySpec_ = null; + private int bitField0_; + + private int maxExtractiveAnswerCount_; + + /** + * + * + *
            +         * The maximum number of extractive answers returned in each search
            +         * result.
            +         *
            +         * An extractive answer is a verbatim answer extracted from the original
            +         * document, which provides a precise and contextually relevant answer to
            +         * the search query.
            +         *
            +         * If the number of matching answers is less than the
            +         * `max_extractive_answer_count`, return all of the answers. Otherwise,
            +         * return the `max_extractive_answer_count`.
            +         *
            +         * At most five answers are returned for each
            +         * [SearchResult][google.cloud.discoveryengine.v1beta.SearchResponse.SearchResult].
            +         * 
            + * + * int32 max_extractive_answer_count = 1; + * + * @return The maxExtractiveAnswerCount. + */ + @java.lang.Override + public int getMaxExtractiveAnswerCount() { + return maxExtractiveAnswerCount_; } - return summarySpecBuilder_; + + /** + * + * + *
            +         * The maximum number of extractive answers returned in each search
            +         * result.
            +         *
            +         * An extractive answer is a verbatim answer extracted from the original
            +         * document, which provides a precise and contextually relevant answer to
            +         * the search query.
            +         *
            +         * If the number of matching answers is less than the
            +         * `max_extractive_answer_count`, return all of the answers. Otherwise,
            +         * return the `max_extractive_answer_count`.
            +         *
            +         * At most five answers are returned for each
            +         * [SearchResult][google.cloud.discoveryengine.v1beta.SearchResponse.SearchResult].
            +         * 
            + * + * int32 max_extractive_answer_count = 1; + * + * @param value The maxExtractiveAnswerCount to set. + * @return This builder for chaining. + */ + public Builder setMaxExtractiveAnswerCount(int value) { + + maxExtractiveAnswerCount_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
            +         * The maximum number of extractive answers returned in each search
            +         * result.
            +         *
            +         * An extractive answer is a verbatim answer extracted from the original
            +         * document, which provides a precise and contextually relevant answer to
            +         * the search query.
            +         *
            +         * If the number of matching answers is less than the
            +         * `max_extractive_answer_count`, return all of the answers. Otherwise,
            +         * return the `max_extractive_answer_count`.
            +         *
            +         * At most five answers are returned for each
            +         * [SearchResult][google.cloud.discoveryengine.v1beta.SearchResponse.SearchResult].
            +         * 
            + * + * int32 max_extractive_answer_count = 1; + * + * @return This builder for chaining. + */ + public Builder clearMaxExtractiveAnswerCount() { + bitField0_ = (bitField0_ & ~0x00000001); + maxExtractiveAnswerCount_ = 0; + onChanged(); + return this; + } + + private int maxExtractiveSegmentCount_; + + /** + * + * + *
            +         * The max number of extractive segments returned in each search result.
            +         * Only applied if the
            +         * [DataStore][google.cloud.discoveryengine.v1beta.DataStore] is set to
            +         * [DataStore.ContentConfig.CONTENT_REQUIRED][google.cloud.discoveryengine.v1beta.DataStore.ContentConfig.CONTENT_REQUIRED]
            +         * or
            +         * [DataStore.solution_types][google.cloud.discoveryengine.v1beta.DataStore.solution_types]
            +         * is
            +         * [SOLUTION_TYPE_CHAT][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_CHAT].
            +         *
            +         * An extractive segment is a text segment extracted from the original
            +         * document that is relevant to the search query, and, in general, more
            +         * verbose than an extractive answer. The segment could then be used as
            +         * input for LLMs to generate summaries and answers.
            +         *
            +         * If the number of matching segments is less than
            +         * `max_extractive_segment_count`, return all of the segments. Otherwise,
            +         * return the `max_extractive_segment_count`.
            +         * 
            + * + * int32 max_extractive_segment_count = 2; + * + * @return The maxExtractiveSegmentCount. + */ + @java.lang.Override + public int getMaxExtractiveSegmentCount() { + return maxExtractiveSegmentCount_; + } + + /** + * + * + *
            +         * The max number of extractive segments returned in each search result.
            +         * Only applied if the
            +         * [DataStore][google.cloud.discoveryengine.v1beta.DataStore] is set to
            +         * [DataStore.ContentConfig.CONTENT_REQUIRED][google.cloud.discoveryengine.v1beta.DataStore.ContentConfig.CONTENT_REQUIRED]
            +         * or
            +         * [DataStore.solution_types][google.cloud.discoveryengine.v1beta.DataStore.solution_types]
            +         * is
            +         * [SOLUTION_TYPE_CHAT][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_CHAT].
            +         *
            +         * An extractive segment is a text segment extracted from the original
            +         * document that is relevant to the search query, and, in general, more
            +         * verbose than an extractive answer. The segment could then be used as
            +         * input for LLMs to generate summaries and answers.
            +         *
            +         * If the number of matching segments is less than
            +         * `max_extractive_segment_count`, return all of the segments. Otherwise,
            +         * return the `max_extractive_segment_count`.
            +         * 
            + * + * int32 max_extractive_segment_count = 2; + * + * @param value The maxExtractiveSegmentCount to set. + * @return This builder for chaining. + */ + public Builder setMaxExtractiveSegmentCount(int value) { + + maxExtractiveSegmentCount_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
            +         * The max number of extractive segments returned in each search result.
            +         * Only applied if the
            +         * [DataStore][google.cloud.discoveryengine.v1beta.DataStore] is set to
            +         * [DataStore.ContentConfig.CONTENT_REQUIRED][google.cloud.discoveryengine.v1beta.DataStore.ContentConfig.CONTENT_REQUIRED]
            +         * or
            +         * [DataStore.solution_types][google.cloud.discoveryengine.v1beta.DataStore.solution_types]
            +         * is
            +         * [SOLUTION_TYPE_CHAT][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_CHAT].
            +         *
            +         * An extractive segment is a text segment extracted from the original
            +         * document that is relevant to the search query, and, in general, more
            +         * verbose than an extractive answer. The segment could then be used as
            +         * input for LLMs to generate summaries and answers.
            +         *
            +         * If the number of matching segments is less than
            +         * `max_extractive_segment_count`, return all of the segments. Otherwise,
            +         * return the `max_extractive_segment_count`.
            +         * 
            + * + * int32 max_extractive_segment_count = 2; + * + * @return This builder for chaining. + */ + public Builder clearMaxExtractiveSegmentCount() { + bitField0_ = (bitField0_ & ~0x00000002); + maxExtractiveSegmentCount_ = 0; + onChanged(); + return this; + } + + private boolean returnExtractiveSegmentScore_; + + /** + * + * + *
            +         * Specifies whether to return the confidence score from the extractive
            +         * segments in each search result. This feature is available only for new
            +         * or allowlisted data stores. To allowlist your data store,
            +         * contact your Customer Engineer. The default value is `false`.
            +         * 
            + * + * bool return_extractive_segment_score = 3; + * + * @return The returnExtractiveSegmentScore. + */ + @java.lang.Override + public boolean getReturnExtractiveSegmentScore() { + return returnExtractiveSegmentScore_; + } + + /** + * + * + *
            +         * Specifies whether to return the confidence score from the extractive
            +         * segments in each search result. This feature is available only for new
            +         * or allowlisted data stores. To allowlist your data store,
            +         * contact your Customer Engineer. The default value is `false`.
            +         * 
            + * + * bool return_extractive_segment_score = 3; + * + * @param value The returnExtractiveSegmentScore to set. + * @return This builder for chaining. + */ + public Builder setReturnExtractiveSegmentScore(boolean value) { + + returnExtractiveSegmentScore_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
            +         * Specifies whether to return the confidence score from the extractive
            +         * segments in each search result. This feature is available only for new
            +         * or allowlisted data stores. To allowlist your data store,
            +         * contact your Customer Engineer. The default value is `false`.
            +         * 
            + * + * bool return_extractive_segment_score = 3; + * + * @return This builder for chaining. + */ + public Builder clearReturnExtractiveSegmentScore() { + bitField0_ = (bitField0_ & ~0x00000004); + returnExtractiveSegmentScore_ = false; + onChanged(); + return this; + } + + private int numPreviousSegments_; + + /** + * + * + *
            +         * Specifies whether to also include the adjacent from each selected
            +         * segments.
            +         * Return at most `num_previous_segments` segments before each selected
            +         * segments.
            +         * 
            + * + * int32 num_previous_segments = 4; + * + * @return The numPreviousSegments. + */ + @java.lang.Override + public int getNumPreviousSegments() { + return numPreviousSegments_; + } + + /** + * + * + *
            +         * Specifies whether to also include the adjacent from each selected
            +         * segments.
            +         * Return at most `num_previous_segments` segments before each selected
            +         * segments.
            +         * 
            + * + * int32 num_previous_segments = 4; + * + * @param value The numPreviousSegments to set. + * @return This builder for chaining. + */ + public Builder setNumPreviousSegments(int value) { + + numPreviousSegments_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
            +         * Specifies whether to also include the adjacent from each selected
            +         * segments.
            +         * Return at most `num_previous_segments` segments before each selected
            +         * segments.
            +         * 
            + * + * int32 num_previous_segments = 4; + * + * @return This builder for chaining. + */ + public Builder clearNumPreviousSegments() { + bitField0_ = (bitField0_ & ~0x00000008); + numPreviousSegments_ = 0; + onChanged(); + return this; + } + + private int numNextSegments_; + + /** + * + * + *
            +         * Return at most `num_next_segments` segments after each selected
            +         * segments.
            +         * 
            + * + * int32 num_next_segments = 5; + * + * @return The numNextSegments. + */ + @java.lang.Override + public int getNumNextSegments() { + return numNextSegments_; + } + + /** + * + * + *
            +         * Return at most `num_next_segments` segments after each selected
            +         * segments.
            +         * 
            + * + * int32 num_next_segments = 5; + * + * @param value The numNextSegments to set. + * @return This builder for chaining. + */ + public Builder setNumNextSegments(int value) { + + numNextSegments_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
            +         * Return at most `num_next_segments` segments after each selected
            +         * segments.
            +         * 
            + * + * int32 num_next_segments = 5; + * + * @return This builder for chaining. + */ + public Builder clearNumNextSegments() { + bitField0_ = (bitField0_ & ~0x00000010); + numNextSegments_ = 0; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.ExtractiveContentSpec) } - private com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.ExtractiveContentSpec) + private static final com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec .ExtractiveContentSpec - extractiveContentSpec_; - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec - .ExtractiveContentSpec, - com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec - .ExtractiveContentSpec.Builder, - com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec - .ExtractiveContentSpecOrBuilder> - extractiveContentSpecBuilder_; + DEFAULT_INSTANCE; - /** - * - * - *
            -       * If there is no extractive_content_spec provided, there will be no
            -       * extractive answer in the search response.
            -       * 
            - * - * - * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.ExtractiveContentSpec extractive_content_spec = 3; - * - * - * @return Whether the extractiveContentSpec field is set. - */ - public boolean hasExtractiveContentSpec() { - return ((bitField0_ & 0x00000004) != 0); + static { + DEFAULT_INSTANCE = + new com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec + .ExtractiveContentSpec(); + } + + public static com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec + .ExtractiveContentSpec + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ExtractiveContentSpec parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec + .ExtractiveContentSpec + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; } + } + + public interface ChunkSpecOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.ChunkSpec) + com.google.protobuf.MessageOrBuilder { /** * * *
            -       * If there is no extractive_content_spec provided, there will be no
            -       * extractive answer in the search response.
            +       * The number of previous chunks to be returned of the current chunk. The
            +       * maximum allowed value is 3.
            +       * If not specified, no previous chunks will be returned.
                    * 
            * - * - * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.ExtractiveContentSpec extractive_content_spec = 3; - * + * int32 num_previous_chunks = 1; * - * @return The extractiveContentSpec. + * @return The numPreviousChunks. */ - public com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec - .ExtractiveContentSpec - getExtractiveContentSpec() { - if (extractiveContentSpecBuilder_ == null) { - return extractiveContentSpec_ == null - ? com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec - .ExtractiveContentSpec.getDefaultInstance() - : extractiveContentSpec_; - } else { - return extractiveContentSpecBuilder_.getMessage(); - } - } + int getNumPreviousChunks(); /** * * *
            -       * If there is no extractive_content_spec provided, there will be no
            -       * extractive answer in the search response.
            +       * The number of next chunks to be returned of the current chunk. The
            +       * maximum allowed value is 3.
            +       * If not specified, no next chunks will be returned.
                    * 
            * - * - * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.ExtractiveContentSpec extractive_content_spec = 3; - * + * int32 num_next_chunks = 2; + * + * @return The numNextChunks. */ - public Builder setExtractiveContentSpec( - com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec - .ExtractiveContentSpec - value) { - if (extractiveContentSpecBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - extractiveContentSpec_ = value; - } else { - extractiveContentSpecBuilder_.setMessage(value); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; + int getNumNextChunks(); + } + + /** + * + * + *
            +     * Specifies the chunk spec to be returned from the search response.
            +     * Only available if the
            +     * [SearchRequest.ContentSearchSpec.search_result_mode][google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.search_result_mode]
            +     * is set to
            +     * [CHUNKS][google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SearchResultMode.CHUNKS]
            +     * 
            + * + * Protobuf type {@code + * google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.ChunkSpec} + */ + public static final class ChunkSpec extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.ChunkSpec) + ChunkSpecOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ChunkSpec"); + } + + // Use ChunkSpec.newBuilder() to construct. + private ChunkSpec(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ChunkSpec() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_ContentSearchSpec_ChunkSpec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_ContentSearchSpec_ChunkSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.ChunkSpec + .class, + com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.ChunkSpec + .Builder.class); } + public static final int NUM_PREVIOUS_CHUNKS_FIELD_NUMBER = 1; + private int numPreviousChunks_ = 0; + /** * * *
            -       * If there is no extractive_content_spec provided, there will be no
            -       * extractive answer in the search response.
            +       * The number of previous chunks to be returned of the current chunk. The
            +       * maximum allowed value is 3.
            +       * If not specified, no previous chunks will be returned.
                    * 
            * - * - * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.ExtractiveContentSpec extractive_content_spec = 3; - * + * int32 num_previous_chunks = 1; + * + * @return The numPreviousChunks. */ - public Builder setExtractiveContentSpec( - com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec - .ExtractiveContentSpec.Builder - builderForValue) { - if (extractiveContentSpecBuilder_ == null) { - extractiveContentSpec_ = builderForValue.build(); - } else { - extractiveContentSpecBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000004; - onChanged(); - return this; + @java.lang.Override + public int getNumPreviousChunks() { + return numPreviousChunks_; } + public static final int NUM_NEXT_CHUNKS_FIELD_NUMBER = 2; + private int numNextChunks_ = 0; + /** * * *
            -       * If there is no extractive_content_spec provided, there will be no
            -       * extractive answer in the search response.
            +       * The number of next chunks to be returned of the current chunk. The
            +       * maximum allowed value is 3.
            +       * If not specified, no next chunks will be returned.
                    * 
            * - * - * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.ExtractiveContentSpec extractive_content_spec = 3; - * + * int32 num_next_chunks = 2; + * + * @return The numNextChunks. */ - public Builder mergeExtractiveContentSpec( - com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec - .ExtractiveContentSpec - value) { - if (extractiveContentSpecBuilder_ == null) { - if (((bitField0_ & 0x00000004) != 0) - && extractiveContentSpec_ != null - && extractiveContentSpec_ - != com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec - .ExtractiveContentSpec.getDefaultInstance()) { - getExtractiveContentSpecBuilder().mergeFrom(value); - } else { - extractiveContentSpec_ = value; - } - } else { - extractiveContentSpecBuilder_.mergeFrom(value); + @java.lang.Override + public int getNumNextChunks() { + return numNextChunks_; + } + + 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 (numPreviousChunks_ != 0) { + output.writeInt32(1, numPreviousChunks_); } - if (extractiveContentSpec_ != null) { - bitField0_ |= 0x00000004; - onChanged(); + if (numNextChunks_ != 0) { + output.writeInt32(2, numNextChunks_); } - return this; + getUnknownFields().writeTo(output); } - /** - * - * - *
            -       * If there is no extractive_content_spec provided, there will be no
            -       * extractive answer in the search response.
            -       * 
            - * - * - * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.ExtractiveContentSpec extractive_content_spec = 3; - * - */ - public Builder clearExtractiveContentSpec() { - bitField0_ = (bitField0_ & ~0x00000004); - extractiveContentSpec_ = null; - if (extractiveContentSpecBuilder_ != null) { - extractiveContentSpecBuilder_.dispose(); - extractiveContentSpecBuilder_ = null; + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (numPreviousChunks_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(1, numPreviousChunks_); } - onChanged(); - return this; + if (numNextChunks_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, numNextChunks_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; } - /** - * - * - *
            -       * If there is no extractive_content_spec provided, there will be no
            -       * extractive answer in the search response.
            -       * 
            - * - * - * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.ExtractiveContentSpec extractive_content_spec = 3; - * - */ - public com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec - .ExtractiveContentSpec.Builder - getExtractiveContentSpecBuilder() { - bitField0_ |= 0x00000004; - onChanged(); - return internalGetExtractiveContentSpecFieldBuilder().getBuilder(); + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof + com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.ChunkSpec)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.ChunkSpec other = + (com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.ChunkSpec) obj; + + if (getNumPreviousChunks() != other.getNumPreviousChunks()) return false; + if (getNumNextChunks() != other.getNumNextChunks()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; } - /** - * - * - *
            -       * If there is no extractive_content_spec provided, there will be no
            -       * extractive answer in the search response.
            -       * 
            - * - * - * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.ExtractiveContentSpec extractive_content_spec = 3; - * - */ - public com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec - .ExtractiveContentSpecOrBuilder - getExtractiveContentSpecOrBuilder() { - if (extractiveContentSpecBuilder_ != null) { - return extractiveContentSpecBuilder_.getMessageOrBuilder(); - } else { - return extractiveContentSpec_ == null - ? com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec - .ExtractiveContentSpec.getDefaultInstance() - : extractiveContentSpec_; + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NUM_PREVIOUS_CHUNKS_FIELD_NUMBER; + hash = (53 * hash) + getNumPreviousChunks(); + hash = (37 * hash) + NUM_NEXT_CHUNKS_FIELD_NUMBER; + hash = (53 * hash) + getNumNextChunks(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; } - /** - * - * - *
            -       * If there is no extractive_content_spec provided, there will be no
            -       * extractive answer in the search response.
            -       * 
            - * - * - * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.ExtractiveContentSpec extractive_content_spec = 3; - * - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec - .ExtractiveContentSpec, - com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec - .ExtractiveContentSpec.Builder, - com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec - .ExtractiveContentSpecOrBuilder> - internalGetExtractiveContentSpecFieldBuilder() { - if (extractiveContentSpecBuilder_ == null) { - extractiveContentSpecBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec - .ExtractiveContentSpec, - com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec - .ExtractiveContentSpec.Builder, - com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec - .ExtractiveContentSpecOrBuilder>( - getExtractiveContentSpec(), getParentForChildren(), isClean()); - extractiveContentSpec_ = null; - } - return extractiveContentSpecBuilder_; + public static com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec + .ChunkSpec + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); } - private int searchResultMode_ = 0; + public static com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec + .ChunkSpec + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - /** - * - * - *
            -       * Specifies the search result mode. If unspecified, the
            -       * search result mode defaults to `DOCUMENTS`.
            -       * 
            - * - * - * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SearchResultMode search_result_mode = 4; - * - * - * @return The enum numeric value on the wire for searchResultMode. - */ - @java.lang.Override - public int getSearchResultModeValue() { - return searchResultMode_; + public static com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec + .ChunkSpec + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); } - /** - * - * - *
            -       * Specifies the search result mode. If unspecified, the
            -       * search result mode defaults to `DOCUMENTS`.
            -       * 
            - * - * - * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SearchResultMode search_result_mode = 4; - * - * - * @param value The enum numeric value on the wire for searchResultMode to set. - * @return This builder for chaining. - */ - public Builder setSearchResultModeValue(int value) { - searchResultMode_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; + public static com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec + .ChunkSpec + 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.discoveryengine.v1beta.SearchRequest.ContentSearchSpec + .ChunkSpec + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec + .ChunkSpec + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec + .ChunkSpec + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec + .ChunkSpec + 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.discoveryengine.v1beta.SearchRequest.ContentSearchSpec + .ChunkSpec + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec + .ChunkSpec + 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.discoveryengine.v1beta.SearchRequest.ContentSearchSpec + .ChunkSpec + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec + .ChunkSpec + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); } - /** - * - * - *
            -       * Specifies the search result mode. If unspecified, the
            -       * search result mode defaults to `DOCUMENTS`.
            -       * 
            - * - * - * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SearchResultMode search_result_mode = 4; - * - * - * @return The searchResultMode. - */ @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec - .SearchResultMode - getSearchResultMode() { - com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SearchResultMode - result = - com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec - .SearchResultMode.forNumber(searchResultMode_); - return result == null - ? com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec - .SearchResultMode.UNRECOGNIZED - : result; + public Builder newBuilderForType() { + return newBuilder(); } - /** - * - * - *
            -       * Specifies the search result mode. If unspecified, the
            -       * search result mode defaults to `DOCUMENTS`.
            -       * 
            - * - * - * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SearchResultMode search_result_mode = 4; - * - * - * @param value The searchResultMode to set. - * @return This builder for chaining. - */ - public Builder setSearchResultMode( - com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SearchResultMode - value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000008; - searchResultMode_ = value.getNumber(); - onChanged(); - return this; + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); } - /** - * - * - *
            -       * Specifies the search result mode. If unspecified, the
            -       * search result mode defaults to `DOCUMENTS`.
            -       * 
            - * - * - * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SearchResultMode search_result_mode = 4; - * - * - * @return This builder for chaining. - */ - public Builder clearSearchResultMode() { - bitField0_ = (bitField0_ & ~0x00000008); - searchResultMode_ = 0; - onChanged(); - return this; + public static Builder newBuilder( + com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.ChunkSpec + prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } - private com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.ChunkSpec - chunkSpec_; - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.ChunkSpec, - com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.ChunkSpec - .Builder, - com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec - .ChunkSpecOrBuilder> - chunkSpecBuilder_; + @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; + } /** * @@ -24057,1406 +23722,2362 @@ public Builder clearSearchResultMode() { * [CHUNKS][google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SearchResultMode.CHUNKS] *
            * - * - * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.ChunkSpec chunk_spec = 5; - * - * - * @return Whether the chunkSpec field is set. + * Protobuf type {@code + * google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.ChunkSpec} */ - public boolean hasChunkSpec() { - return ((bitField0_ & 0x00000010) != 0); - } + public static final class Builder + extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.ChunkSpec) + com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec + .ChunkSpecOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_ContentSearchSpec_ChunkSpec_descriptor; + } - /** - * - * - *
            -       * Specifies the chunk spec to be returned from the search response.
            -       * Only available if the
            -       * [SearchRequest.ContentSearchSpec.search_result_mode][google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.search_result_mode]
            -       * is set to
            -       * [CHUNKS][google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SearchResultMode.CHUNKS]
            -       * 
            - * - * - * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.ChunkSpec chunk_spec = 5; - * - * - * @return The chunkSpec. - */ - public com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.ChunkSpec - getChunkSpec() { - if (chunkSpecBuilder_ == null) { - return chunkSpec_ == null - ? com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.ChunkSpec - .getDefaultInstance() - : chunkSpec_; - } else { - return chunkSpecBuilder_.getMessage(); + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_ContentSearchSpec_ChunkSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.ChunkSpec + .class, + com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.ChunkSpec + .Builder.class); } - } - /** - * - * - *
            -       * Specifies the chunk spec to be returned from the search response.
            -       * Only available if the
            -       * [SearchRequest.ContentSearchSpec.search_result_mode][google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.search_result_mode]
            -       * is set to
            -       * [CHUNKS][google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SearchResultMode.CHUNKS]
            -       * 
            - * - * - * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.ChunkSpec chunk_spec = 5; - * - */ - public Builder setChunkSpec( - com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.ChunkSpec value) { - if (chunkSpecBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - chunkSpec_ = value; - } else { - chunkSpecBuilder_.setMessage(value); + // Construct using + // com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.ChunkSpec.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); } - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - /** - * - * - *
            -       * Specifies the chunk spec to be returned from the search response.
            -       * Only available if the
            -       * [SearchRequest.ContentSearchSpec.search_result_mode][google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.search_result_mode]
            -       * is set to
            -       * [CHUNKS][google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SearchResultMode.CHUNKS]
            -       * 
            - * - * - * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.ChunkSpec chunk_spec = 5; - * - */ - public Builder setChunkSpec( - com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.ChunkSpec.Builder - builderForValue) { - if (chunkSpecBuilder_ == null) { - chunkSpec_ = builderForValue.build(); - } else { - chunkSpecBuilder_.setMessage(builderForValue.build()); + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + numPreviousChunks_ = 0; + numNextChunks_ = 0; + return this; } - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - /** - * - * - *
            -       * Specifies the chunk spec to be returned from the search response.
            -       * Only available if the
            -       * [SearchRequest.ContentSearchSpec.search_result_mode][google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.search_result_mode]
            -       * is set to
            -       * [CHUNKS][google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SearchResultMode.CHUNKS]
            -       * 
            - * - * - * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.ChunkSpec chunk_spec = 5; - * - */ - public Builder mergeChunkSpec( - com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.ChunkSpec value) { - if (chunkSpecBuilder_ == null) { - if (((bitField0_ & 0x00000010) != 0) - && chunkSpec_ != null - && chunkSpec_ - != com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec - .ChunkSpec.getDefaultInstance()) { - getChunkSpecBuilder().mergeFrom(value); - } else { - chunkSpec_ = value; - } - } else { - chunkSpecBuilder_.mergeFrom(value); + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1beta.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_ContentSearchSpec_ChunkSpec_descriptor; } - if (chunkSpec_ != null) { - bitField0_ |= 0x00000010; - onChanged(); + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.ChunkSpec + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.ChunkSpec + .getDefaultInstance(); } - return this; - } - /** - * - * - *
            -       * Specifies the chunk spec to be returned from the search response.
            -       * Only available if the
            -       * [SearchRequest.ContentSearchSpec.search_result_mode][google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.search_result_mode]
            -       * is set to
            -       * [CHUNKS][google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SearchResultMode.CHUNKS]
            -       * 
            - * - * - * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.ChunkSpec chunk_spec = 5; - * - */ - public Builder clearChunkSpec() { - bitField0_ = (bitField0_ & ~0x00000010); - chunkSpec_ = null; - if (chunkSpecBuilder_ != null) { - chunkSpecBuilder_.dispose(); - chunkSpecBuilder_ = null; + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.ChunkSpec + build() { + com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.ChunkSpec result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; } - onChanged(); - return this; - } - /** - * - * - *
            -       * Specifies the chunk spec to be returned from the search response.
            -       * Only available if the
            -       * [SearchRequest.ContentSearchSpec.search_result_mode][google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.search_result_mode]
            -       * is set to
            -       * [CHUNKS][google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SearchResultMode.CHUNKS]
            -       * 
            - * - * - * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.ChunkSpec chunk_spec = 5; - * - */ - public com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.ChunkSpec - .Builder - getChunkSpecBuilder() { - bitField0_ |= 0x00000010; - onChanged(); - return internalGetChunkSpecFieldBuilder().getBuilder(); - } + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.ChunkSpec + buildPartial() { + com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.ChunkSpec result = + new com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.ChunkSpec( + this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } - /** - * - * - *
            -       * Specifies the chunk spec to be returned from the search response.
            -       * Only available if the
            -       * [SearchRequest.ContentSearchSpec.search_result_mode][google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.search_result_mode]
            -       * is set to
            -       * [CHUNKS][google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SearchResultMode.CHUNKS]
            -       * 
            - * - * - * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.ChunkSpec chunk_spec = 5; - * - */ - public com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec - .ChunkSpecOrBuilder - getChunkSpecOrBuilder() { - if (chunkSpecBuilder_ != null) { - return chunkSpecBuilder_.getMessageOrBuilder(); - } else { - return chunkSpec_ == null - ? com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.ChunkSpec - .getDefaultInstance() - : chunkSpec_; + private void buildPartial0( + com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.ChunkSpec + result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.numPreviousChunks_ = numPreviousChunks_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.numNextChunks_ = numNextChunks_; + } } - } - /** - * - * - *
            -       * Specifies the chunk spec to be returned from the search response.
            -       * Only available if the
            -       * [SearchRequest.ContentSearchSpec.search_result_mode][google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.search_result_mode]
            -       * is set to
            -       * [CHUNKS][google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SearchResultMode.CHUNKS]
            -       * 
            - * - * - * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.ChunkSpec chunk_spec = 5; - * - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.ChunkSpec, - com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.ChunkSpec - .Builder, - com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec - .ChunkSpecOrBuilder> - internalGetChunkSpecFieldBuilder() { - if (chunkSpecBuilder_ == null) { - chunkSpecBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.ChunkSpec, - com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.ChunkSpec - .Builder, - com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec - .ChunkSpecOrBuilder>(getChunkSpec(), getParentForChildren(), isClean()); - chunkSpec_ = null; + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.ChunkSpec) { + return mergeFrom( + (com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.ChunkSpec) + other); + } else { + super.mergeFrom(other); + return this; + } } - return chunkSpecBuilder_; - } - // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec) - } + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.ChunkSpec + other) { + if (other + == com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.ChunkSpec + .getDefaultInstance()) return this; + if (other.getNumPreviousChunks() != 0) { + setNumPreviousChunks(other.getNumPreviousChunks()); + } + if (other.getNumNextChunks() != 0) { + setNumNextChunks(other.getNumNextChunks()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } - // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec) - private static final com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec - DEFAULT_INSTANCE; + @java.lang.Override + public final boolean isInitialized() { + return true; + } - static { - DEFAULT_INSTANCE = - new com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec(); - } + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + numPreviousChunks_ = input.readInt32(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 16: + { + numNextChunks_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } - public static com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec - getDefaultInstance() { - return DEFAULT_INSTANCE; - } + private int bitField0_; - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ContentSearchSpec parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException() - .setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; + private int numPreviousChunks_; - public static com.google.protobuf.Parser parser() { - return PARSER; - } + /** + * + * + *
            +         * The number of previous chunks to be returned of the current chunk. The
            +         * maximum allowed value is 3.
            +         * If not specified, no previous chunks will be returned.
            +         * 
            + * + * int32 num_previous_chunks = 1; + * + * @return The numPreviousChunks. + */ + @java.lang.Override + public int getNumPreviousChunks() { + return numPreviousChunks_; + } - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + /** + * + * + *
            +         * The number of previous chunks to be returned of the current chunk. The
            +         * maximum allowed value is 3.
            +         * If not specified, no previous chunks will be returned.
            +         * 
            + * + * int32 num_previous_chunks = 1; + * + * @param value The numPreviousChunks to set. + * @return This builder for chaining. + */ + public Builder setNumPreviousChunks(int value) { - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - } + numPreviousChunks_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } - public interface EmbeddingSpecOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec) - com.google.protobuf.MessageOrBuilder { + /** + * + * + *
            +         * The number of previous chunks to be returned of the current chunk. The
            +         * maximum allowed value is 3.
            +         * If not specified, no previous chunks will be returned.
            +         * 
            + * + * int32 num_previous_chunks = 1; + * + * @return This builder for chaining. + */ + public Builder clearNumPreviousChunks() { + bitField0_ = (bitField0_ & ~0x00000001); + numPreviousChunks_ = 0; + onChanged(); + return this; + } - /** - * - * - *
            -     * The embedding vector used for retrieval. Limit to 1.
            -     * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector embedding_vectors = 1; - * - */ - java.util.List< - com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector> - getEmbeddingVectorsList(); + private int numNextChunks_; - /** - * - * - *
            -     * The embedding vector used for retrieval. Limit to 1.
            -     * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector embedding_vectors = 1; - * - */ - com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector - getEmbeddingVectors(int index); + /** + * + * + *
            +         * The number of next chunks to be returned of the current chunk. The
            +         * maximum allowed value is 3.
            +         * If not specified, no next chunks will be returned.
            +         * 
            + * + * int32 num_next_chunks = 2; + * + * @return The numNextChunks. + */ + @java.lang.Override + public int getNumNextChunks() { + return numNextChunks_; + } + + /** + * + * + *
            +         * The number of next chunks to be returned of the current chunk. The
            +         * maximum allowed value is 3.
            +         * If not specified, no next chunks will be returned.
            +         * 
            + * + * int32 num_next_chunks = 2; + * + * @param value The numNextChunks to set. + * @return This builder for chaining. + */ + public Builder setNumNextChunks(int value) { + + numNextChunks_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
            +         * The number of next chunks to be returned of the current chunk. The
            +         * maximum allowed value is 3.
            +         * If not specified, no next chunks will be returned.
            +         * 
            + * + * int32 num_next_chunks = 2; + * + * @return This builder for chaining. + */ + public Builder clearNumNextChunks() { + bitField0_ = (bitField0_ & ~0x00000002); + numNextChunks_ = 0; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.ChunkSpec) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.ChunkSpec) + private static final com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec + .ChunkSpec + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.ChunkSpec(); + } + + public static com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec + .ChunkSpec + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ChunkSpec parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.ChunkSpec + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int bitField0_; + public static final int SNIPPET_SPEC_FIELD_NUMBER = 1; + private com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SnippetSpec + snippetSpec_; /** * * *
            -     * The embedding vector used for retrieval. Limit to 1.
            +     * If `snippetSpec` is not specified, snippets are not included in the
            +     * search response.
                  * 
            * * - * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector embedding_vectors = 1; + * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SnippetSpec snippet_spec = 1; * + * + * @return Whether the snippetSpec field is set. */ - int getEmbeddingVectorsCount(); + @java.lang.Override + public boolean hasSnippetSpec() { + return ((bitField0_ & 0x00000001) != 0); + } /** * * *
            -     * The embedding vector used for retrieval. Limit to 1.
            +     * If `snippetSpec` is not specified, snippets are not included in the
            +     * search response.
                  * 
            * * - * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector embedding_vectors = 1; + * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SnippetSpec snippet_spec = 1; * + * + * @return The snippetSpec. */ - java.util.List< - ? extends - com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec - .EmbeddingVectorOrBuilder> - getEmbeddingVectorsOrBuilderList(); + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SnippetSpec + getSnippetSpec() { + return snippetSpec_ == null + ? com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SnippetSpec + .getDefaultInstance() + : snippetSpec_; + } /** * * *
            -     * The embedding vector used for retrieval. Limit to 1.
            +     * If `snippetSpec` is not specified, snippets are not included in the
            +     * search response.
                  * 
            * * - * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector embedding_vectors = 1; + * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SnippetSpec snippet_spec = 1; * */ - com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVectorOrBuilder - getEmbeddingVectorsOrBuilder(int index); - } + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec + .SnippetSpecOrBuilder + getSnippetSpecOrBuilder() { + return snippetSpec_ == null + ? com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SnippetSpec + .getDefaultInstance() + : snippetSpec_; + } - /** - * - * - *
            -   * The specification that uses customized query embedding vector to do
            -   * semantic document retrieval.
            -   * 
            - * - * Protobuf type {@code google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec} - */ - public static final class EmbeddingSpec extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec) - EmbeddingSpecOrBuilder { - private static final long serialVersionUID = 0L; + public static final int SUMMARY_SPEC_FIELD_NUMBER = 2; + private com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec + summarySpec_; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "EmbeddingSpec"); + /** + * + * + *
            +     * If `summarySpec` is not specified, summaries are not included in the
            +     * search response.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec summary_spec = 2; + * + * + * @return Whether the summarySpec field is set. + */ + @java.lang.Override + public boolean hasSummarySpec() { + return ((bitField0_ & 0x00000002) != 0); } - // Use EmbeddingSpec.newBuilder() to construct. - private EmbeddingSpec(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); + /** + * + * + *
            +     * If `summarySpec` is not specified, summaries are not included in the
            +     * search response.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec summary_spec = 2; + * + * + * @return The summarySpec. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec + getSummarySpec() { + return summarySpec_ == null + ? com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec + .getDefaultInstance() + : summarySpec_; } - private EmbeddingSpec() { - embeddingVectors_ = java.util.Collections.emptyList(); + /** + * + * + *
            +     * If `summarySpec` is not specified, summaries are not included in the
            +     * search response.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec summary_spec = 2; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec + .SummarySpecOrBuilder + getSummarySpecOrBuilder() { + return summarySpec_ == null + ? com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec + .getDefaultInstance() + : summarySpec_; } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.discoveryengine.v1beta.SearchServiceProto - .internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_EmbeddingSpec_descriptor; + public static final int EXTRACTIVE_CONTENT_SPEC_FIELD_NUMBER = 3; + private com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec + .ExtractiveContentSpec + extractiveContentSpec_; + + /** + * + * + *
            +     * If there is no extractive_content_spec provided, there will be no
            +     * extractive answer in the search response.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.ExtractiveContentSpec extractive_content_spec = 3; + * + * + * @return Whether the extractiveContentSpec field is set. + */ + @java.lang.Override + public boolean hasExtractiveContentSpec() { + return ((bitField0_ & 0x00000004) != 0); } + /** + * + * + *
            +     * If there is no extractive_content_spec provided, there will be no
            +     * extractive answer in the search response.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.ExtractiveContentSpec extractive_content_spec = 3; + * + * + * @return The extractiveContentSpec. + */ @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.discoveryengine.v1beta.SearchServiceProto - .internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_EmbeddingSpec_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.class, - com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.Builder.class); + public com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec + .ExtractiveContentSpec + getExtractiveContentSpec() { + return extractiveContentSpec_ == null + ? com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec + .ExtractiveContentSpec.getDefaultInstance() + : extractiveContentSpec_; } - public interface EmbeddingVectorOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector) - com.google.protobuf.MessageOrBuilder { + /** + * + * + *
            +     * If there is no extractive_content_spec provided, there will be no
            +     * extractive answer in the search response.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.ExtractiveContentSpec extractive_content_spec = 3; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec + .ExtractiveContentSpecOrBuilder + getExtractiveContentSpecOrBuilder() { + return extractiveContentSpec_ == null + ? com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec + .ExtractiveContentSpec.getDefaultInstance() + : extractiveContentSpec_; + } - /** - * - * - *
            -       * Embedding field path in schema.
            -       * 
            - * - * string field_path = 1; - * - * @return The fieldPath. - */ - java.lang.String getFieldPath(); + public static final int SEARCH_RESULT_MODE_FIELD_NUMBER = 4; + private int searchResultMode_ = 0; - /** - * - * - *
            -       * Embedding field path in schema.
            -       * 
            - * - * string field_path = 1; - * - * @return The bytes for fieldPath. - */ - com.google.protobuf.ByteString getFieldPathBytes(); + /** + * + * + *
            +     * Specifies the search result mode. If unspecified, the
            +     * search result mode defaults to `DOCUMENTS`.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SearchResultMode search_result_mode = 4; + * + * + * @return The enum numeric value on the wire for searchResultMode. + */ + @java.lang.Override + public int getSearchResultModeValue() { + return searchResultMode_; + } - /** - * - * - *
            -       * Query embedding vector.
            -       * 
            - * - * repeated float vector = 2; - * - * @return A list containing the vector. - */ - java.util.List getVectorList(); + /** + * + * + *
            +     * Specifies the search result mode. If unspecified, the
            +     * search result mode defaults to `DOCUMENTS`.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SearchResultMode search_result_mode = 4; + * + * + * @return The searchResultMode. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SearchResultMode + getSearchResultMode() { + com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SearchResultMode + result = + com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec + .SearchResultMode.forNumber(searchResultMode_); + return result == null + ? com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SearchResultMode + .UNRECOGNIZED + : result; + } - /** - * - * - *
            -       * Query embedding vector.
            -       * 
            - * - * repeated float vector = 2; - * - * @return The count of vector. - */ - int getVectorCount(); + public static final int CHUNK_SPEC_FIELD_NUMBER = 5; + private com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.ChunkSpec + chunkSpec_; - /** - * - * - *
            -       * Query embedding vector.
            -       * 
            - * - * repeated float vector = 2; - * - * @param index The index of the element to return. - * @return The vector at the given index. - */ - float getVector(int index); + /** + * + * + *
            +     * Specifies the chunk spec to be returned from the search response.
            +     * Only available if the
            +     * [SearchRequest.ContentSearchSpec.search_result_mode][google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.search_result_mode]
            +     * is set to
            +     * [CHUNKS][google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SearchResultMode.CHUNKS]
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.ChunkSpec chunk_spec = 5; + * + * + * @return Whether the chunkSpec field is set. + */ + @java.lang.Override + public boolean hasChunkSpec() { + return ((bitField0_ & 0x00000008) != 0); } /** * * *
            -     * Embedding vector.
            +     * Specifies the chunk spec to be returned from the search response.
            +     * Only available if the
            +     * [SearchRequest.ContentSearchSpec.search_result_mode][google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.search_result_mode]
            +     * is set to
            +     * [CHUNKS][google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SearchResultMode.CHUNKS]
                  * 
            * - * Protobuf type {@code - * google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector} + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.ChunkSpec chunk_spec = 5; + * + * + * @return The chunkSpec. */ - public static final class EmbeddingVector extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector) - EmbeddingVectorOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "EmbeddingVector"); - } + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.ChunkSpec + getChunkSpec() { + return chunkSpec_ == null + ? com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.ChunkSpec + .getDefaultInstance() + : chunkSpec_; + } - // Use EmbeddingVector.newBuilder() to construct. - private EmbeddingVector(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } + /** + * + * + *
            +     * Specifies the chunk spec to be returned from the search response.
            +     * Only available if the
            +     * [SearchRequest.ContentSearchSpec.search_result_mode][google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.search_result_mode]
            +     * is set to
            +     * [CHUNKS][google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SearchResultMode.CHUNKS]
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.ChunkSpec chunk_spec = 5; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec + .ChunkSpecOrBuilder + getChunkSpecOrBuilder() { + return chunkSpec_ == null + ? com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.ChunkSpec + .getDefaultInstance() + : chunkSpec_; + } - private EmbeddingVector() { - fieldPath_ = ""; - vector_ = emptyFloatList(); + 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, getSnippetSpec()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(2, getSummarySpec()); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeMessage(3, getExtractiveContentSpec()); + } + if (searchResultMode_ + != com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec + .SearchResultMode.SEARCH_RESULT_MODE_UNSPECIFIED + .getNumber()) { + output.writeEnum(4, searchResultMode_); + } + if (((bitField0_ & 0x00000008) != 0)) { + output.writeMessage(5, getChunkSpec()); + } + 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, getSnippetSpec()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getSummarySpec()); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(3, getExtractiveContentSpec()); + } + if (searchResultMode_ + != com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec + .SearchResultMode.SEARCH_RESULT_MODE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(4, searchResultMode_); + } + if (((bitField0_ & 0x00000008) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getChunkSpec()); + } + 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.discoveryengine.v1beta.SearchRequest.ContentSearchSpec)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec other = + (com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec) obj; + + if (hasSnippetSpec() != other.hasSnippetSpec()) return false; + if (hasSnippetSpec()) { + if (!getSnippetSpec().equals(other.getSnippetSpec())) return false; + } + if (hasSummarySpec() != other.hasSummarySpec()) return false; + if (hasSummarySpec()) { + if (!getSummarySpec().equals(other.getSummarySpec())) return false; + } + if (hasExtractiveContentSpec() != other.hasExtractiveContentSpec()) return false; + if (hasExtractiveContentSpec()) { + if (!getExtractiveContentSpec().equals(other.getExtractiveContentSpec())) return false; + } + if (searchResultMode_ != other.searchResultMode_) return false; + if (hasChunkSpec() != other.hasChunkSpec()) return false; + if (hasChunkSpec()) { + if (!getChunkSpec().equals(other.getChunkSpec())) 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 (hasSnippetSpec()) { + hash = (37 * hash) + SNIPPET_SPEC_FIELD_NUMBER; + hash = (53 * hash) + getSnippetSpec().hashCode(); + } + if (hasSummarySpec()) { + hash = (37 * hash) + SUMMARY_SPEC_FIELD_NUMBER; + hash = (53 * hash) + getSummarySpec().hashCode(); + } + if (hasExtractiveContentSpec()) { + hash = (37 * hash) + EXTRACTIVE_CONTENT_SPEC_FIELD_NUMBER; + hash = (53 * hash) + getExtractiveContentSpec().hashCode(); + } + hash = (37 * hash) + SEARCH_RESULT_MODE_FIELD_NUMBER; + hash = (53 * hash) + searchResultMode_; + if (hasChunkSpec()) { + hash = (37 * hash) + CHUNK_SPEC_FIELD_NUMBER; + hash = (53 * hash) + getChunkSpec().hashCode(); } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec 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.discoveryengine.v1beta.SearchRequest.ContentSearchSpec parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec 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.discoveryengine.v1beta.SearchRequest.ContentSearchSpec parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec 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.discoveryengine.v1beta.SearchRequest.ContentSearchSpec + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec + 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.discoveryengine.v1beta.SearchRequest.ContentSearchSpec parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec 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.discoveryengine.v1beta.SearchRequest.ContentSearchSpec 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 specification for configuring the behavior of content search.
            +     * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec) + com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpecOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.discoveryengine.v1beta.SearchServiceProto - .internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_EmbeddingSpec_EmbeddingVector_descriptor; + .internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_ContentSearchSpec_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.discoveryengine.v1beta.SearchServiceProto - .internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_EmbeddingSpec_EmbeddingVector_fieldAccessorTable + .internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_ContentSearchSpec_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector - .class, - com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector - .Builder.class); + com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.class, + com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.Builder + .class); } - public static final int FIELD_PATH_FIELD_NUMBER = 1; + // Construct using + // com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } - @SuppressWarnings("serial") - private volatile java.lang.Object fieldPath_ = ""; + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } - /** - * - * - *
            -       * Embedding field path in schema.
            -       * 
            - * - * string field_path = 1; - * - * @return The fieldPath. - */ - @java.lang.Override - public java.lang.String getFieldPath() { - java.lang.Object ref = fieldPath_; - 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(); - fieldPath_ = s; - return s; + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetSnippetSpecFieldBuilder(); + internalGetSummarySpecFieldBuilder(); + internalGetExtractiveContentSpecFieldBuilder(); + internalGetChunkSpecFieldBuilder(); } } - /** - * - * - *
            -       * Embedding field path in schema.
            -       * 
            - * - * string field_path = 1; - * - * @return The bytes for fieldPath. - */ @java.lang.Override - public com.google.protobuf.ByteString getFieldPathBytes() { - java.lang.Object ref = fieldPath_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - fieldPath_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; + public Builder clear() { + super.clear(); + bitField0_ = 0; + snippetSpec_ = null; + if (snippetSpecBuilder_ != null) { + snippetSpecBuilder_.dispose(); + snippetSpecBuilder_ = null; + } + summarySpec_ = null; + if (summarySpecBuilder_ != null) { + summarySpecBuilder_.dispose(); + summarySpecBuilder_ = null; + } + extractiveContentSpec_ = null; + if (extractiveContentSpecBuilder_ != null) { + extractiveContentSpecBuilder_.dispose(); + extractiveContentSpecBuilder_ = null; + } + searchResultMode_ = 0; + chunkSpec_ = null; + if (chunkSpecBuilder_ != null) { + chunkSpecBuilder_.dispose(); + chunkSpecBuilder_ = null; } + return this; } - public static final int VECTOR_FIELD_NUMBER = 2; - - @SuppressWarnings("serial") - private com.google.protobuf.Internal.FloatList vector_ = emptyFloatList(); - - /** - * - * - *
            -       * Query embedding vector.
            -       * 
            - * - * repeated float vector = 2; - * - * @return A list containing the vector. - */ @java.lang.Override - public java.util.List getVectorList() { - return vector_; + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1beta.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_ContentSearchSpec_descriptor; } - /** - * - * - *
            -       * Query embedding vector.
            -       * 
            - * - * repeated float vector = 2; - * - * @return The count of vector. - */ - public int getVectorCount() { - return vector_.size(); + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec + .getDefaultInstance(); } - /** - * - * - *
            -       * Query embedding vector.
            -       * 
            - * - * repeated float vector = 2; - * - * @param index The index of the element to return. - * @return The vector at the given index. - */ - public float getVector(int index) { - return vector_.getFloat(index); + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec build() { + com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; } - private int vectorMemoizedSerializedSize = -1; - - 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; + public com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec + buildPartial() { + com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec result = + new com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - getSerializedSize(); - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(fieldPath_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, fieldPath_); + private void buildPartial0( + com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.snippetSpec_ = + snippetSpecBuilder_ == null ? snippetSpec_ : snippetSpecBuilder_.build(); + to_bitField0_ |= 0x00000001; } - if (getVectorList().size() > 0) { - output.writeUInt32NoTag(18); - output.writeUInt32NoTag(vectorMemoizedSerializedSize); + if (((from_bitField0_ & 0x00000002) != 0)) { + result.summarySpec_ = + summarySpecBuilder_ == null ? summarySpec_ : summarySpecBuilder_.build(); + to_bitField0_ |= 0x00000002; } - for (int i = 0; i < vector_.size(); i++) { - output.writeFloatNoTag(vector_.getFloat(i)); + if (((from_bitField0_ & 0x00000004) != 0)) { + result.extractiveContentSpec_ = + extractiveContentSpecBuilder_ == null + ? extractiveContentSpec_ + : extractiveContentSpecBuilder_.build(); + to_bitField0_ |= 0x00000004; } - 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(fieldPath_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, fieldPath_); + if (((from_bitField0_ & 0x00000008) != 0)) { + result.searchResultMode_ = searchResultMode_; } - { - int dataSize = 0; - dataSize = 4 * getVectorList().size(); - size += dataSize; - if (!getVectorList().isEmpty()) { - size += 1; - size += com.google.protobuf.CodedOutputStream.computeInt32SizeNoTag(dataSize); - } - vectorMemoizedSerializedSize = dataSize; + if (((from_bitField0_ & 0x00000010) != 0)) { + result.chunkSpec_ = chunkSpecBuilder_ == null ? chunkSpec_ : chunkSpecBuilder_.build(); + to_bitField0_ |= 0x00000008; } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; + result.bitField0_ |= to_bitField0_; } @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj - instanceof - com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector)) { - return super.equals(obj); + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec) { + return mergeFrom( + (com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec) other); + } else { + super.mergeFrom(other); + return this; } - com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector other = - (com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector) - obj; - - if (!getFieldPath().equals(other.getFieldPath())) return false; - if (!getVectorList().equals(other.getVectorList())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; } - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec other) { + if (other + == com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec + .getDefaultInstance()) return this; + if (other.hasSnippetSpec()) { + mergeSnippetSpec(other.getSnippetSpec()); } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + FIELD_PATH_FIELD_NUMBER; - hash = (53 * hash) + getFieldPath().hashCode(); - if (getVectorCount() > 0) { - hash = (37 * hash) + VECTOR_FIELD_NUMBER; - hash = (53 * hash) + getVectorList().hashCode(); + if (other.hasSummarySpec()) { + mergeSummarySpec(other.getSummarySpec()); } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec - .EmbeddingVector - parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); + if (other.hasExtractiveContentSpec()) { + mergeExtractiveContentSpec(other.getExtractiveContentSpec()); + } + if (other.searchResultMode_ != 0) { + setSearchResultModeValue(other.getSearchResultModeValue()); + } + if (other.hasChunkSpec()) { + mergeChunkSpec(other.getChunkSpec()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; } - public static com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec - .EmbeddingVector - parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); + @java.lang.Override + public final boolean isInitialized() { + return true; } - public static com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec - .EmbeddingVector - parseFrom(com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage( + internalGetSnippetSpecFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage( + internalGetSummarySpecFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage( + internalGetExtractiveContentSpecFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 32: + { + searchResultMode_ = input.readEnum(); + bitField0_ |= 0x00000008; + break; + } // case 32 + case 42: + { + input.readMessage( + internalGetChunkSpecFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 42 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; } - public static com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec - .EmbeddingVector - parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } + private int bitField0_; - public static com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec - .EmbeddingVector - parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } + private com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SnippetSpec + snippetSpec_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SnippetSpec, + com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SnippetSpec + .Builder, + com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec + .SnippetSpecOrBuilder> + snippetSpecBuilder_; - public static com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec - .EmbeddingVector - parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); + /** + * + * + *
            +       * If `snippetSpec` is not specified, snippets are not included in the
            +       * search response.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SnippetSpec snippet_spec = 1; + * + * + * @return Whether the snippetSpec field is set. + */ + public boolean hasSnippetSpec() { + return ((bitField0_ & 0x00000001) != 0); } - public static com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec - .EmbeddingVector - parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + /** + * + * + *
            +       * If `snippetSpec` is not specified, snippets are not included in the
            +       * search response.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SnippetSpec snippet_spec = 1; + * + * + * @return The snippetSpec. + */ + public com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SnippetSpec + getSnippetSpec() { + if (snippetSpecBuilder_ == null) { + return snippetSpec_ == null + ? com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SnippetSpec + .getDefaultInstance() + : snippetSpec_; + } else { + return snippetSpecBuilder_.getMessage(); + } } - public static com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec - .EmbeddingVector - parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); + /** + * + * + *
            +       * If `snippetSpec` is not specified, snippets are not included in the
            +       * search response.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SnippetSpec snippet_spec = 1; + * + */ + public Builder setSnippetSpec( + com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SnippetSpec + value) { + if (snippetSpecBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + snippetSpec_ = value; + } else { + snippetSpecBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; } - public static com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec - .EmbeddingVector - parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + /** + * + * + *
            +       * If `snippetSpec` is not specified, snippets are not included in the
            +       * search response.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SnippetSpec snippet_spec = 1; + * + */ + public Builder setSnippetSpec( + com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SnippetSpec + .Builder + builderForValue) { + if (snippetSpecBuilder_ == null) { + snippetSpec_ = builderForValue.build(); + } else { + snippetSpecBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; } - public static com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec - .EmbeddingVector - parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); + /** + * + * + *
            +       * If `snippetSpec` is not specified, snippets are not included in the
            +       * search response.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SnippetSpec snippet_spec = 1; + * + */ + public Builder mergeSnippetSpec( + com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SnippetSpec + value) { + if (snippetSpecBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && snippetSpec_ != null + && snippetSpec_ + != com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec + .SnippetSpec.getDefaultInstance()) { + getSnippetSpecBuilder().mergeFrom(value); + } else { + snippetSpec_ = value; + } + } else { + snippetSpecBuilder_.mergeFrom(value); + } + if (snippetSpec_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; } - public static com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec - .EmbeddingVector - parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + /** + * + * + *
            +       * If `snippetSpec` is not specified, snippets are not included in the
            +       * search response.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SnippetSpec snippet_spec = 1; + * + */ + public Builder clearSnippetSpec() { + bitField0_ = (bitField0_ & ~0x00000001); + snippetSpec_ = null; + if (snippetSpecBuilder_ != null) { + snippetSpecBuilder_.dispose(); + snippetSpecBuilder_ = null; + } + onChanged(); + return this; } - public static com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec - .EmbeddingVector - parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); + /** + * + * + *
            +       * If `snippetSpec` is not specified, snippets are not included in the
            +       * search response.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SnippetSpec snippet_spec = 1; + * + */ + public com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SnippetSpec + .Builder + getSnippetSpecBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return internalGetSnippetSpecFieldBuilder().getBuilder(); } - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); + /** + * + * + *
            +       * If `snippetSpec` is not specified, snippets are not included in the
            +       * search response.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SnippetSpec snippet_spec = 1; + * + */ + public com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec + .SnippetSpecOrBuilder + getSnippetSpecOrBuilder() { + if (snippetSpecBuilder_ != null) { + return snippetSpecBuilder_.getMessageOrBuilder(); + } else { + return snippetSpec_ == null + ? com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SnippetSpec + .getDefaultInstance() + : snippetSpec_; + } } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); + /** + * + * + *
            +       * If `snippetSpec` is not specified, snippets are not included in the
            +       * search response.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SnippetSpec snippet_spec = 1; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SnippetSpec, + com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SnippetSpec + .Builder, + com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec + .SnippetSpecOrBuilder> + internalGetSnippetSpecFieldBuilder() { + if (snippetSpecBuilder_ == null) { + snippetSpecBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec + .SnippetSpec, + com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec + .SnippetSpec.Builder, + com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec + .SnippetSpecOrBuilder>(getSnippetSpec(), getParentForChildren(), isClean()); + snippetSpec_ = null; + } + return snippetSpecBuilder_; } - public static Builder newBuilder( - com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector - prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } + private com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec + summarySpec_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec, + com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec + .Builder, + com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec + .SummarySpecOrBuilder> + summarySpecBuilder_; - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + /** + * + * + *
            +       * If `summarySpec` is not specified, summaries are not included in the
            +       * search response.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec summary_spec = 2; + * + * + * @return Whether the summarySpec field is set. + */ + public boolean hasSummarySpec() { + return ((bitField0_ & 0x00000002) != 0); } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; + /** + * + * + *
            +       * If `summarySpec` is not specified, summaries are not included in the
            +       * search response.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec summary_spec = 2; + * + * + * @return The summarySpec. + */ + public com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec + getSummarySpec() { + if (summarySpecBuilder_ == null) { + return summarySpec_ == null + ? com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec + .getDefaultInstance() + : summarySpec_; + } else { + return summarySpecBuilder_.getMessage(); + } } /** * * *
            -       * Embedding vector.
            +       * If `summarySpec` is not specified, summaries are not included in the
            +       * search response.
                    * 
            * - * Protobuf type {@code - * google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector} + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec summary_spec = 2; + * */ - public static final class Builder - extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector) - com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec - .EmbeddingVectorOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.discoveryengine.v1beta.SearchServiceProto - .internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_EmbeddingSpec_EmbeddingVector_descriptor; + public Builder setSummarySpec( + com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec + value) { + if (summarySpecBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + summarySpec_ = value; + } else { + summarySpecBuilder_.setMessage(value); } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.discoveryengine.v1beta.SearchServiceProto - .internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_EmbeddingSpec_EmbeddingVector_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec - .EmbeddingVector.class, - com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec - .EmbeddingVector.Builder.class); - } - - // Construct using - // com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); + /** + * + * + *
            +       * If `summarySpec` is not specified, summaries are not included in the
            +       * search response.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec summary_spec = 2; + * + */ + public Builder setSummarySpec( + com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec + .Builder + builderForValue) { + if (summarySpecBuilder_ == null) { + summarySpec_ = builderForValue.build(); + } else { + summarySpecBuilder_.setMessage(builderForValue.build()); } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - fieldPath_ = ""; - vector_ = emptyFloatList(); - return this; + /** + * + * + *
            +       * If `summarySpec` is not specified, summaries are not included in the
            +       * search response.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec summary_spec = 2; + * + */ + public Builder mergeSummarySpec( + com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec + value) { + if (summarySpecBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && summarySpec_ != null + && summarySpec_ + != com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec + .SummarySpec.getDefaultInstance()) { + getSummarySpecBuilder().mergeFrom(value); + } else { + summarySpec_ = value; + } + } else { + summarySpecBuilder_.mergeFrom(value); } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.discoveryengine.v1beta.SearchServiceProto - .internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_EmbeddingSpec_EmbeddingVector_descriptor; + if (summarySpec_ != null) { + bitField0_ |= 0x00000002; + onChanged(); } + return this; + } - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector - getDefaultInstanceForType() { - return com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector - .getDefaultInstance(); + /** + * + * + *
            +       * If `summarySpec` is not specified, summaries are not included in the
            +       * search response.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec summary_spec = 2; + * + */ + public Builder clearSummarySpec() { + bitField0_ = (bitField0_ & ~0x00000002); + summarySpec_ = null; + if (summarySpecBuilder_ != null) { + summarySpecBuilder_.dispose(); + summarySpecBuilder_ = null; } + onChanged(); + return this; + } - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector - build() { - com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector - result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } + /** + * + * + *
            +       * If `summarySpec` is not specified, summaries are not included in the
            +       * search response.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec summary_spec = 2; + * + */ + public com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec + .Builder + getSummarySpecBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return internalGetSummarySpecFieldBuilder().getBuilder(); + } - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector - buildPartial() { - com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector - result = - new com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec - .EmbeddingVector(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; + /** + * + * + *
            +       * If `summarySpec` is not specified, summaries are not included in the
            +       * search response.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec summary_spec = 2; + * + */ + public com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec + .SummarySpecOrBuilder + getSummarySpecOrBuilder() { + if (summarySpecBuilder_ != null) { + return summarySpecBuilder_.getMessageOrBuilder(); + } else { + return summarySpec_ == null + ? com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec + .getDefaultInstance() + : summarySpec_; } + } - private void buildPartial0( - com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector - result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.fieldPath_ = fieldPath_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - vector_.makeImmutable(); - result.vector_ = vector_; - } + /** + * + * + *
            +       * If `summarySpec` is not specified, summaries are not included in the
            +       * search response.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec summary_spec = 2; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec, + com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec + .Builder, + com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec + .SummarySpecOrBuilder> + internalGetSummarySpecFieldBuilder() { + if (summarySpecBuilder_ == null) { + summarySpecBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec + .SummarySpec, + com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec + .SummarySpec.Builder, + com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec + .SummarySpecOrBuilder>(getSummarySpec(), getParentForChildren(), isClean()); + summarySpec_ = null; } + return summarySpecBuilder_; + } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other - instanceof - com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector) { - return mergeFrom( - (com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec - .EmbeddingVector) - other); - } else { - super.mergeFrom(other); - return this; - } - } + private com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec + .ExtractiveContentSpec + extractiveContentSpec_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec + .ExtractiveContentSpec, + com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec + .ExtractiveContentSpec.Builder, + com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec + .ExtractiveContentSpecOrBuilder> + extractiveContentSpecBuilder_; - public Builder mergeFrom( - com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector - other) { - if (other - == com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector - .getDefaultInstance()) return this; - if (!other.getFieldPath().isEmpty()) { - fieldPath_ = other.fieldPath_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (!other.vector_.isEmpty()) { - if (vector_.isEmpty()) { - vector_ = other.vector_; - vector_.makeImmutable(); - bitField0_ |= 0x00000002; - } else { - ensureVectorIsMutable(); - vector_.addAll(other.vector_); - } - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } + /** + * + * + *
            +       * If there is no extractive_content_spec provided, there will be no
            +       * extractive answer in the search response.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.ExtractiveContentSpec extractive_content_spec = 3; + * + * + * @return Whether the extractiveContentSpec field is set. + */ + public boolean hasExtractiveContentSpec() { + return ((bitField0_ & 0x00000004) != 0); + } - @java.lang.Override - public final boolean isInitialized() { - return true; + /** + * + * + *
            +       * If there is no extractive_content_spec provided, there will be no
            +       * extractive answer in the search response.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.ExtractiveContentSpec extractive_content_spec = 3; + * + * + * @return The extractiveContentSpec. + */ + public com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec + .ExtractiveContentSpec + getExtractiveContentSpec() { + if (extractiveContentSpecBuilder_ == null) { + return extractiveContentSpec_ == null + ? com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec + .ExtractiveContentSpec.getDefaultInstance() + : extractiveContentSpec_; + } else { + return extractiveContentSpecBuilder_.getMessage(); } + } - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); + /** + * + * + *
            +       * If there is no extractive_content_spec provided, there will be no
            +       * extractive answer in the search response.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.ExtractiveContentSpec extractive_content_spec = 3; + * + */ + public Builder setExtractiveContentSpec( + com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec + .ExtractiveContentSpec + value) { + if (extractiveContentSpecBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - fieldPath_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 21: - { - float v = input.readFloat(); - ensureVectorIsMutable(); - vector_.addFloat(v); - break; - } // case 21 - case 18: - { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - int alloc = length > 4096 ? 4096 : length; - ensureVectorIsMutable(alloc / 4); - while (input.getBytesUntilLimit() > 0) { - vector_.addFloat(input.readFloat()); - } - input.popLimit(limit); - break; - } // case 18 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; + extractiveContentSpec_ = value; + } else { + extractiveContentSpecBuilder_.setMessage(value); } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } - private int bitField0_; - - private java.lang.Object fieldPath_ = ""; - - /** - * - * - *
            -         * Embedding field path in schema.
            -         * 
            - * - * string field_path = 1; - * - * @return The fieldPath. - */ - public java.lang.String getFieldPath() { - java.lang.Object ref = fieldPath_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - fieldPath_ = s; - return s; - } else { - return (java.lang.String) ref; - } + /** + * + * + *
            +       * If there is no extractive_content_spec provided, there will be no
            +       * extractive answer in the search response.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.ExtractiveContentSpec extractive_content_spec = 3; + * + */ + public Builder setExtractiveContentSpec( + com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec + .ExtractiveContentSpec.Builder + builderForValue) { + if (extractiveContentSpecBuilder_ == null) { + extractiveContentSpec_ = builderForValue.build(); + } else { + extractiveContentSpecBuilder_.setMessage(builderForValue.build()); } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } - /** - * - * - *
            -         * Embedding field path in schema.
            -         * 
            - * - * string field_path = 1; - * - * @return The bytes for fieldPath. - */ - public com.google.protobuf.ByteString getFieldPathBytes() { - java.lang.Object ref = fieldPath_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - fieldPath_ = b; - return b; + /** + * + * + *
            +       * If there is no extractive_content_spec provided, there will be no
            +       * extractive answer in the search response.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.ExtractiveContentSpec extractive_content_spec = 3; + * + */ + public Builder mergeExtractiveContentSpec( + com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec + .ExtractiveContentSpec + value) { + if (extractiveContentSpecBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && extractiveContentSpec_ != null + && extractiveContentSpec_ + != com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec + .ExtractiveContentSpec.getDefaultInstance()) { + getExtractiveContentSpecBuilder().mergeFrom(value); } else { - return (com.google.protobuf.ByteString) ref; + extractiveContentSpec_ = value; } + } else { + extractiveContentSpecBuilder_.mergeFrom(value); } - - /** - * - * - *
            -         * Embedding field path in schema.
            -         * 
            - * - * string field_path = 1; - * - * @param value The fieldPath to set. - * @return This builder for chaining. - */ - public Builder setFieldPath(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - fieldPath_ = value; - bitField0_ |= 0x00000001; + if (extractiveContentSpec_ != null) { + bitField0_ |= 0x00000004; onChanged(); - return this; } + return this; + } - /** - * - * - *
            -         * Embedding field path in schema.
            -         * 
            - * - * string field_path = 1; - * - * @return This builder for chaining. - */ - public Builder clearFieldPath() { - fieldPath_ = getDefaultInstance().getFieldPath(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - - /** - * - * - *
            -         * Embedding field path in schema.
            -         * 
            - * - * string field_path = 1; - * - * @param value The bytes for fieldPath to set. - * @return This builder for chaining. - */ - public Builder setFieldPathBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - fieldPath_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private com.google.protobuf.Internal.FloatList vector_ = emptyFloatList(); - - private void ensureVectorIsMutable() { - if (!vector_.isModifiable()) { - vector_ = makeMutableCopy(vector_); - } - bitField0_ |= 0x00000002; - } - - private void ensureVectorIsMutable(int capacity) { - if (!vector_.isModifiable()) { - vector_ = makeMutableCopy(vector_, capacity); - } - bitField0_ |= 0x00000002; - } - - /** - * - * - *
            -         * Query embedding vector.
            -         * 
            - * - * repeated float vector = 2; - * - * @return A list containing the vector. - */ - public java.util.List getVectorList() { - vector_.makeImmutable(); - return vector_; - } - - /** - * - * - *
            -         * Query embedding vector.
            -         * 
            - * - * repeated float vector = 2; - * - * @return The count of vector. - */ - public int getVectorCount() { - return vector_.size(); - } - - /** - * - * - *
            -         * Query embedding vector.
            -         * 
            - * - * repeated float vector = 2; - * - * @param index The index of the element to return. - * @return The vector at the given index. - */ - public float getVector(int index) { - return vector_.getFloat(index); + /** + * + * + *
            +       * If there is no extractive_content_spec provided, there will be no
            +       * extractive answer in the search response.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.ExtractiveContentSpec extractive_content_spec = 3; + * + */ + public Builder clearExtractiveContentSpec() { + bitField0_ = (bitField0_ & ~0x00000004); + extractiveContentSpec_ = null; + if (extractiveContentSpecBuilder_ != null) { + extractiveContentSpecBuilder_.dispose(); + extractiveContentSpecBuilder_ = null; } + onChanged(); + return this; + } - /** - * - * - *
            -         * Query embedding vector.
            -         * 
            - * - * repeated float vector = 2; - * - * @param index The index to set the value at. - * @param value The vector to set. - * @return This builder for chaining. - */ - public Builder setVector(int index, float value) { + /** + * + * + *
            +       * If there is no extractive_content_spec provided, there will be no
            +       * extractive answer in the search response.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.ExtractiveContentSpec extractive_content_spec = 3; + * + */ + public com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec + .ExtractiveContentSpec.Builder + getExtractiveContentSpecBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return internalGetExtractiveContentSpecFieldBuilder().getBuilder(); + } - ensureVectorIsMutable(); - vector_.setFloat(index, value); - bitField0_ |= 0x00000002; - onChanged(); - return this; + /** + * + * + *
            +       * If there is no extractive_content_spec provided, there will be no
            +       * extractive answer in the search response.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.ExtractiveContentSpec extractive_content_spec = 3; + * + */ + public com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec + .ExtractiveContentSpecOrBuilder + getExtractiveContentSpecOrBuilder() { + if (extractiveContentSpecBuilder_ != null) { + return extractiveContentSpecBuilder_.getMessageOrBuilder(); + } else { + return extractiveContentSpec_ == null + ? com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec + .ExtractiveContentSpec.getDefaultInstance() + : extractiveContentSpec_; } + } - /** - * - * - *
            -         * Query embedding vector.
            -         * 
            - * - * repeated float vector = 2; - * - * @param value The vector to add. - * @return This builder for chaining. - */ - public Builder addVector(float value) { - - ensureVectorIsMutable(); - vector_.addFloat(value); - bitField0_ |= 0x00000002; - onChanged(); - return this; + /** + * + * + *
            +       * If there is no extractive_content_spec provided, there will be no
            +       * extractive answer in the search response.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.ExtractiveContentSpec extractive_content_spec = 3; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec + .ExtractiveContentSpec, + com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec + .ExtractiveContentSpec.Builder, + com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec + .ExtractiveContentSpecOrBuilder> + internalGetExtractiveContentSpecFieldBuilder() { + if (extractiveContentSpecBuilder_ == null) { + extractiveContentSpecBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec + .ExtractiveContentSpec, + com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec + .ExtractiveContentSpec.Builder, + com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec + .ExtractiveContentSpecOrBuilder>( + getExtractiveContentSpec(), getParentForChildren(), isClean()); + extractiveContentSpec_ = null; } + return extractiveContentSpecBuilder_; + } - /** - * - * - *
            -         * Query embedding vector.
            -         * 
            - * - * repeated float vector = 2; - * - * @param values The vector to add. - * @return This builder for chaining. - */ - public Builder addAllVector(java.lang.Iterable values) { - ensureVectorIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, vector_); - bitField0_ |= 0x00000002; - onChanged(); - return this; - } + private int searchResultMode_ = 0; - /** - * - * - *
            -         * Query embedding vector.
            -         * 
            - * - * repeated float vector = 2; - * - * @return This builder for chaining. - */ - public Builder clearVector() { - vector_ = emptyFloatList(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } + /** + * + * + *
            +       * Specifies the search result mode. If unspecified, the
            +       * search result mode defaults to `DOCUMENTS`.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SearchResultMode search_result_mode = 4; + * + * + * @return The enum numeric value on the wire for searchResultMode. + */ + @java.lang.Override + public int getSearchResultModeValue() { + return searchResultMode_; + } - // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector) + /** + * + * + *
            +       * Specifies the search result mode. If unspecified, the
            +       * search result mode defaults to `DOCUMENTS`.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SearchResultMode search_result_mode = 4; + * + * + * @param value The enum numeric value on the wire for searchResultMode to set. + * @return This builder for chaining. + */ + public Builder setSearchResultModeValue(int value) { + searchResultMode_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; } - // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector) - private static final com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec - .EmbeddingVector - DEFAULT_INSTANCE; + /** + * + * + *
            +       * Specifies the search result mode. If unspecified, the
            +       * search result mode defaults to `DOCUMENTS`.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SearchResultMode search_result_mode = 4; + * + * + * @return The searchResultMode. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec + .SearchResultMode + getSearchResultMode() { + com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SearchResultMode + result = + com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec + .SearchResultMode.forNumber(searchResultMode_); + return result == null + ? com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec + .SearchResultMode.UNRECOGNIZED + : result; + } - static { - DEFAULT_INSTANCE = - new com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec - .EmbeddingVector(); + /** + * + * + *
            +       * Specifies the search result mode. If unspecified, the
            +       * search result mode defaults to `DOCUMENTS`.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SearchResultMode search_result_mode = 4; + * + * + * @param value The searchResultMode to set. + * @return This builder for chaining. + */ + public Builder setSearchResultMode( + com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SearchResultMode + value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000008; + searchResultMode_ = value.getNumber(); + onChanged(); + return this; } - public static com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec - .EmbeddingVector - getDefaultInstance() { - return DEFAULT_INSTANCE; + /** + * + * + *
            +       * Specifies the search result mode. If unspecified, the
            +       * search result mode defaults to `DOCUMENTS`.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SearchResultMode search_result_mode = 4; + * + * + * @return This builder for chaining. + */ + public Builder clearSearchResultMode() { + bitField0_ = (bitField0_ & ~0x00000008); + searchResultMode_ = 0; + onChanged(); + return this; } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public EmbeddingVector parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException() - .setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; + private com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.ChunkSpec + chunkSpec_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.ChunkSpec, + com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.ChunkSpec + .Builder, + com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec + .ChunkSpecOrBuilder> + chunkSpecBuilder_; - public static com.google.protobuf.Parser parser() { - return PARSER; + /** + * + * + *
            +       * Specifies the chunk spec to be returned from the search response.
            +       * Only available if the
            +       * [SearchRequest.ContentSearchSpec.search_result_mode][google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.search_result_mode]
            +       * is set to
            +       * [CHUNKS][google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SearchResultMode.CHUNKS]
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.ChunkSpec chunk_spec = 5; + * + * + * @return Whether the chunkSpec field is set. + */ + public boolean hasChunkSpec() { + return ((bitField0_ & 0x00000010) != 0); } - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; + /** + * + * + *
            +       * Specifies the chunk spec to be returned from the search response.
            +       * Only available if the
            +       * [SearchRequest.ContentSearchSpec.search_result_mode][google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.search_result_mode]
            +       * is set to
            +       * [CHUNKS][google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SearchResultMode.CHUNKS]
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.ChunkSpec chunk_spec = 5; + * + * + * @return The chunkSpec. + */ + public com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.ChunkSpec + getChunkSpec() { + if (chunkSpecBuilder_ == null) { + return chunkSpec_ == null + ? com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.ChunkSpec + .getDefaultInstance() + : chunkSpec_; + } else { + return chunkSpecBuilder_.getMessage(); + } } - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; + /** + * + * + *
            +       * Specifies the chunk spec to be returned from the search response.
            +       * Only available if the
            +       * [SearchRequest.ContentSearchSpec.search_result_mode][google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.search_result_mode]
            +       * is set to
            +       * [CHUNKS][google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SearchResultMode.CHUNKS]
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.ChunkSpec chunk_spec = 5; + * + */ + public Builder setChunkSpec( + com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.ChunkSpec value) { + if (chunkSpecBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + chunkSpec_ = value; + } else { + chunkSpecBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; } - } - - public static final int EMBEDDING_VECTORS_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private java.util.List< - com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector> - embeddingVectors_; + /** + * + * + *
            +       * Specifies the chunk spec to be returned from the search response.
            +       * Only available if the
            +       * [SearchRequest.ContentSearchSpec.search_result_mode][google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.search_result_mode]
            +       * is set to
            +       * [CHUNKS][google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SearchResultMode.CHUNKS]
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.ChunkSpec chunk_spec = 5; + * + */ + public Builder setChunkSpec( + com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.ChunkSpec.Builder + builderForValue) { + if (chunkSpecBuilder_ == null) { + chunkSpec_ = builderForValue.build(); + } else { + chunkSpecBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
            +       * Specifies the chunk spec to be returned from the search response.
            +       * Only available if the
            +       * [SearchRequest.ContentSearchSpec.search_result_mode][google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.search_result_mode]
            +       * is set to
            +       * [CHUNKS][google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SearchResultMode.CHUNKS]
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.ChunkSpec chunk_spec = 5; + * + */ + public Builder mergeChunkSpec( + com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.ChunkSpec value) { + if (chunkSpecBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) + && chunkSpec_ != null + && chunkSpec_ + != com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec + .ChunkSpec.getDefaultInstance()) { + getChunkSpecBuilder().mergeFrom(value); + } else { + chunkSpec_ = value; + } + } else { + chunkSpecBuilder_.mergeFrom(value); + } + if (chunkSpec_ != null) { + bitField0_ |= 0x00000010; + onChanged(); + } + return this; + } + + /** + * + * + *
            +       * Specifies the chunk spec to be returned from the search response.
            +       * Only available if the
            +       * [SearchRequest.ContentSearchSpec.search_result_mode][google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.search_result_mode]
            +       * is set to
            +       * [CHUNKS][google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SearchResultMode.CHUNKS]
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.ChunkSpec chunk_spec = 5; + * + */ + public Builder clearChunkSpec() { + bitField0_ = (bitField0_ & ~0x00000010); + chunkSpec_ = null; + if (chunkSpecBuilder_ != null) { + chunkSpecBuilder_.dispose(); + chunkSpecBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
            +       * Specifies the chunk spec to be returned from the search response.
            +       * Only available if the
            +       * [SearchRequest.ContentSearchSpec.search_result_mode][google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.search_result_mode]
            +       * is set to
            +       * [CHUNKS][google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SearchResultMode.CHUNKS]
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.ChunkSpec chunk_spec = 5; + * + */ + public com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.ChunkSpec + .Builder + getChunkSpecBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return internalGetChunkSpecFieldBuilder().getBuilder(); + } + + /** + * + * + *
            +       * Specifies the chunk spec to be returned from the search response.
            +       * Only available if the
            +       * [SearchRequest.ContentSearchSpec.search_result_mode][google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.search_result_mode]
            +       * is set to
            +       * [CHUNKS][google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SearchResultMode.CHUNKS]
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.ChunkSpec chunk_spec = 5; + * + */ + public com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec + .ChunkSpecOrBuilder + getChunkSpecOrBuilder() { + if (chunkSpecBuilder_ != null) { + return chunkSpecBuilder_.getMessageOrBuilder(); + } else { + return chunkSpec_ == null + ? com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.ChunkSpec + .getDefaultInstance() + : chunkSpec_; + } + } + + /** + * + * + *
            +       * Specifies the chunk spec to be returned from the search response.
            +       * Only available if the
            +       * [SearchRequest.ContentSearchSpec.search_result_mode][google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.search_result_mode]
            +       * is set to
            +       * [CHUNKS][google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SearchResultMode.CHUNKS]
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.ChunkSpec chunk_spec = 5; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.ChunkSpec, + com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.ChunkSpec + .Builder, + com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec + .ChunkSpecOrBuilder> + internalGetChunkSpecFieldBuilder() { + if (chunkSpecBuilder_ == null) { + chunkSpecBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.ChunkSpec, + com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.ChunkSpec + .Builder, + com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec + .ChunkSpecOrBuilder>(getChunkSpec(), getParentForChildren(), isClean()); + chunkSpec_ = null; + } + return chunkSpecBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec) + private static final com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec(); + } + + public static com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ContentSearchSpec parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface EmbeddingSpecOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec) + com.google.protobuf.MessageOrBuilder { /** * @@ -25469,12 +26090,9 @@ public com.google.protobuf.Parser getParserForType() { * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector embedding_vectors = 1; * */ - @java.lang.Override - public java.util.List< + java.util.List< com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector> - getEmbeddingVectorsList() { - return embeddingVectors_; - } + getEmbeddingVectorsList(); /** * @@ -25487,14 +26105,8 @@ public com.google.protobuf.Parser getParserForType() { * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector embedding_vectors = 1; *
            */ - @java.lang.Override - public java.util.List< - ? extends - com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec - .EmbeddingVectorOrBuilder> - getEmbeddingVectorsOrBuilderList() { - return embeddingVectors_; - } + com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector + getEmbeddingVectors(int index); /** * @@ -25507,10 +26119,7 @@ public com.google.protobuf.Parser getParserForType() { * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector embedding_vectors = 1; * */ - @java.lang.Override - public int getEmbeddingVectorsCount() { - return embeddingVectors_.size(); - } + int getEmbeddingVectorsCount(); /** * @@ -25523,11 +26132,11 @@ public int getEmbeddingVectorsCount() { * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector embedding_vectors = 1; *
            */ - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector - getEmbeddingVectors(int index) { - return embeddingVectors_.get(index); - } + java.util.List< + ? extends + com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec + .EmbeddingVectorOrBuilder> + getEmbeddingVectorsOrBuilderList(); /** * @@ -25540,426 +26149,211 @@ public int getEmbeddingVectorsCount() { * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector embedding_vectors = 1; * */ - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec - .EmbeddingVectorOrBuilder - getEmbeddingVectorsOrBuilder(int index) { - return embeddingVectors_.get(index); - } - - private byte memoizedIsInitialized = -1; + com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVectorOrBuilder + getEmbeddingVectorsOrBuilder(int index); + } - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + /** + * + * + *
            +   * The specification that uses customized query embedding vector to do
            +   * semantic document retrieval.
            +   * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec} + */ + public static final class EmbeddingSpec extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec) + EmbeddingSpecOrBuilder { + private static final long serialVersionUID = 0L; - memoizedIsInitialized = 1; - return true; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "EmbeddingSpec"); } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - for (int i = 0; i < embeddingVectors_.size(); i++) { - output.writeMessage(1, embeddingVectors_.get(i)); - } - getUnknownFields().writeTo(output); + // Use EmbeddingSpec.newBuilder() to construct. + private EmbeddingSpec(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < embeddingVectors_.size(); i++) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize(1, embeddingVectors_.get(i)); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; + private EmbeddingSpec() { + embeddingVectors_ = java.util.Collections.emptyList(); } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec)) { - return super.equals(obj); - } - com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec other = - (com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec) obj; - - if (!getEmbeddingVectorsList().equals(other.getEmbeddingVectorsList())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_EmbeddingSpec_descriptor; } @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getEmbeddingVectorsCount() > 0) { - hash = (37 * hash) + EMBEDDING_VECTORS_FIELD_NUMBER; - hash = (53 * hash) + getEmbeddingVectorsList().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_EmbeddingSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.class, + com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.Builder.class); } - public static com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } + public interface EmbeddingVectorOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector) + com.google.protobuf.MessageOrBuilder { - public static com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } + /** + * + * + *
            +       * Embedding field path in schema.
            +       * 
            + * + * string field_path = 1; + * + * @return The fieldPath. + */ + java.lang.String getFieldPath(); - public static com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } + /** + * + * + *
            +       * Embedding field path in schema.
            +       * 
            + * + * string field_path = 1; + * + * @return The bytes for fieldPath. + */ + com.google.protobuf.ByteString getFieldPathBytes(); - public static com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } + /** + * + * + *
            +       * Query embedding vector.
            +       * 
            + * + * repeated float vector = 2; + * + * @return A list containing the vector. + */ + java.util.List getVectorList(); - public static com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec parseFrom( - byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } + /** + * + * + *
            +       * Query embedding vector.
            +       * 
            + * + * repeated float vector = 2; + * + * @return The count of vector. + */ + int getVectorCount(); - public static com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); + /** + * + * + *
            +       * Query embedding vector.
            +       * 
            + * + * repeated float vector = 2; + * + * @param index The index of the element to return. + * @return The vector at the given index. + */ + float getVector(int index); } - public static com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } + /** + * + * + *
            +     * Embedding vector.
            +     * 
            + * + * Protobuf type {@code + * google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector} + */ + public static final class EmbeddingVector extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector) + EmbeddingVectorOrBuilder { + private static final long serialVersionUID = 0L; - public static com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "EmbeddingVector"); + } - public static com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec - parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } + // Use EmbeddingVector.newBuilder() to construct. + private EmbeddingVector(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } - public static com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec - 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.discoveryengine.v1beta.SearchRequest.EmbeddingSpec parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec 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.discoveryengine.v1beta.SearchRequest.EmbeddingSpec 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; - } + private EmbeddingVector() { + fieldPath_ = ""; + vector_ = emptyFloatList(); + } - /** - * - * - *
            -     * The specification that uses customized query embedding vector to do
            -     * semantic document retrieval.
            -     * 
            - * - * Protobuf type {@code google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec) - com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpecOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.discoveryengine.v1beta.SearchServiceProto - .internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_EmbeddingSpec_descriptor; + .internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_EmbeddingSpec_EmbeddingVector_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.discoveryengine.v1beta.SearchServiceProto - .internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_EmbeddingSpec_fieldAccessorTable + .internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_EmbeddingSpec_EmbeddingVector_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.class, - com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.Builder.class); - } - - // Construct using - // com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - if (embeddingVectorsBuilder_ == null) { - embeddingVectors_ = java.util.Collections.emptyList(); - } else { - embeddingVectors_ = null; - embeddingVectorsBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000001); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.discoveryengine.v1beta.SearchServiceProto - .internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_EmbeddingSpec_descriptor; - } - - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec - getDefaultInstanceForType() { - return com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec - .getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec build() { - com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec buildPartial() { - com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec result = - new com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields( - com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec result) { - if (embeddingVectorsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - embeddingVectors_ = java.util.Collections.unmodifiableList(embeddingVectors_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.embeddingVectors_ = embeddingVectors_; - } else { - result.embeddingVectors_ = embeddingVectorsBuilder_.build(); - } - } - - private void buildPartial0( - com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec result) { - int from_bitField0_ = bitField0_; - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec) { - return mergeFrom( - (com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom( - com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec other) { - if (other - == com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec - .getDefaultInstance()) return this; - if (embeddingVectorsBuilder_ == null) { - if (!other.embeddingVectors_.isEmpty()) { - if (embeddingVectors_.isEmpty()) { - embeddingVectors_ = other.embeddingVectors_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureEmbeddingVectorsIsMutable(); - embeddingVectors_.addAll(other.embeddingVectors_); - } - onChanged(); - } - } else { - if (!other.embeddingVectors_.isEmpty()) { - if (embeddingVectorsBuilder_.isEmpty()) { - embeddingVectorsBuilder_.dispose(); - embeddingVectorsBuilder_ = null; - embeddingVectors_ = other.embeddingVectors_; - bitField0_ = (bitField0_ & ~0x00000001); - embeddingVectorsBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders - ? internalGetEmbeddingVectorsFieldBuilder() - : null; - } else { - embeddingVectorsBuilder_.addAllMessages(other.embeddingVectors_); - } - } - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec - .EmbeddingVector - m = - input.readMessage( - com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec - .EmbeddingVector.parser(), - extensionRegistry); - if (embeddingVectorsBuilder_ == null) { - ensureEmbeddingVectorsIsMutable(); - embeddingVectors_.add(m); - } else { - embeddingVectorsBuilder_.addMessage(m); - } - break; - } // case 10 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; + com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector + .class, + com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector + .Builder.class); } - private int bitField0_; - - private java.util.List< - com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector> - embeddingVectors_ = java.util.Collections.emptyList(); - - private void ensureEmbeddingVectorsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - embeddingVectors_ = - new java.util.ArrayList< - com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec - .EmbeddingVector>(embeddingVectors_); - bitField0_ |= 0x00000001; - } - } + public static final int FIELD_PATH_FIELD_NUMBER = 1; - private com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector, - com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector - .Builder, - com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec - .EmbeddingVectorOrBuilder> - embeddingVectorsBuilder_; + @SuppressWarnings("serial") + private volatile java.lang.Object fieldPath_ = ""; /** * * *
            -       * The embedding vector used for retrieval. Limit to 1.
            +       * Embedding field path in schema.
                    * 
            * - * - * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector embedding_vectors = 1; - * + * string field_path = 1; + * + * @return The fieldPath. */ - public java.util.List< - com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector> - getEmbeddingVectorsList() { - if (embeddingVectorsBuilder_ == null) { - return java.util.Collections.unmodifiableList(embeddingVectors_); + @java.lang.Override + public java.lang.String getFieldPath() { + java.lang.Object ref = fieldPath_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; } else { - return embeddingVectorsBuilder_.getMessageList(); + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + fieldPath_ = s; + return s; } } @@ -25967,956 +26361,905 @@ private void ensureEmbeddingVectorsIsMutable() { * * *
            -       * The embedding vector used for retrieval. Limit to 1.
            +       * Embedding field path in schema.
                    * 
            * - * - * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector embedding_vectors = 1; - * + * string field_path = 1; + * + * @return The bytes for fieldPath. */ - public int getEmbeddingVectorsCount() { - if (embeddingVectorsBuilder_ == null) { - return embeddingVectors_.size(); + @java.lang.Override + public com.google.protobuf.ByteString getFieldPathBytes() { + java.lang.Object ref = fieldPath_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + fieldPath_ = b; + return b; } else { - return embeddingVectorsBuilder_.getCount(); + return (com.google.protobuf.ByteString) ref; } } + public static final int VECTOR_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private com.google.protobuf.Internal.FloatList vector_ = emptyFloatList(); + /** * * *
            -       * The embedding vector used for retrieval. Limit to 1.
            +       * Query embedding vector.
                    * 
            * - * - * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector embedding_vectors = 1; - * + * repeated float vector = 2; + * + * @return A list containing the vector. */ - public com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector - getEmbeddingVectors(int index) { - if (embeddingVectorsBuilder_ == null) { - return embeddingVectors_.get(index); - } else { - return embeddingVectorsBuilder_.getMessage(index); - } + @java.lang.Override + public java.util.List getVectorList() { + return vector_; } /** * * *
            -       * The embedding vector used for retrieval. Limit to 1.
            +       * Query embedding vector.
                    * 
            * - * - * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector embedding_vectors = 1; - * + * repeated float vector = 2; + * + * @return The count of vector. */ - public Builder setEmbeddingVectors( - int index, - com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector - value) { - if (embeddingVectorsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureEmbeddingVectorsIsMutable(); - embeddingVectors_.set(index, value); - onChanged(); - } else { - embeddingVectorsBuilder_.setMessage(index, value); - } - return this; + public int getVectorCount() { + return vector_.size(); } /** * * *
            -       * The embedding vector used for retrieval. Limit to 1.
            +       * Query embedding vector.
                    * 
            * - * - * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector embedding_vectors = 1; - * + * repeated float vector = 2; + * + * @param index The index of the element to return. + * @return The vector at the given index. */ - public Builder setEmbeddingVectors( - int index, - com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector - .Builder - builderForValue) { - if (embeddingVectorsBuilder_ == null) { - ensureEmbeddingVectorsIsMutable(); - embeddingVectors_.set(index, builderForValue.build()); - onChanged(); - } else { - embeddingVectorsBuilder_.setMessage(index, builderForValue.build()); - } - return this; + public float getVector(int index) { + return vector_.getFloat(index); } - /** - * - * - *
            -       * The embedding vector used for retrieval. Limit to 1.
            -       * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector embedding_vectors = 1; - * - */ - public Builder addEmbeddingVectors( - com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector - value) { - if (embeddingVectorsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureEmbeddingVectorsIsMutable(); - embeddingVectors_.add(value); - onChanged(); - } else { - embeddingVectorsBuilder_.addMessage(value); - } - return this; + private int vectorMemoizedSerializedSize = -1; + + 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; } - /** - * - * - *
            -       * The embedding vector used for retrieval. Limit to 1.
            -       * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector embedding_vectors = 1; - * - */ - public Builder addEmbeddingVectors( - int index, - com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector - value) { - if (embeddingVectorsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureEmbeddingVectorsIsMutable(); - embeddingVectors_.add(index, value); - onChanged(); - } else { - embeddingVectorsBuilder_.addMessage(index, value); + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + getSerializedSize(); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(fieldPath_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, fieldPath_); } - return this; + if (getVectorList().size() > 0) { + output.writeUInt32NoTag(18); + output.writeUInt32NoTag(vectorMemoizedSerializedSize); + } + for (int i = 0; i < vector_.size(); i++) { + output.writeFloatNoTag(vector_.getFloat(i)); + } + getUnknownFields().writeTo(output); } - /** - * - * - *
            -       * The embedding vector used for retrieval. Limit to 1.
            -       * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector embedding_vectors = 1; - * - */ - public Builder addEmbeddingVectors( - com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector - .Builder - builderForValue) { - if (embeddingVectorsBuilder_ == null) { - ensureEmbeddingVectorsIsMutable(); - embeddingVectors_.add(builderForValue.build()); - onChanged(); - } else { - embeddingVectorsBuilder_.addMessage(builderForValue.build()); + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(fieldPath_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, fieldPath_); } - return this; + { + int dataSize = 0; + dataSize = 4 * getVectorList().size(); + size += dataSize; + if (!getVectorList().isEmpty()) { + size += 1; + size += com.google.protobuf.CodedOutputStream.computeInt32SizeNoTag(dataSize); + } + vectorMemoizedSerializedSize = dataSize; + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; } - /** - * - * - *
            -       * The embedding vector used for retrieval. Limit to 1.
            -       * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector embedding_vectors = 1; - * - */ - public Builder addEmbeddingVectors( - int index, - com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector - .Builder - builderForValue) { - if (embeddingVectorsBuilder_ == null) { - ensureEmbeddingVectorsIsMutable(); - embeddingVectors_.add(index, builderForValue.build()); - onChanged(); - } else { - embeddingVectorsBuilder_.addMessage(index, builderForValue.build()); + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; } - return this; + if (!(obj + instanceof + com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector other = + (com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector) + obj; + + if (!getFieldPath().equals(other.getFieldPath())) return false; + if (!getVectorList().equals(other.getVectorList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; } - /** - * - * - *
            -       * The embedding vector used for retrieval. Limit to 1.
            -       * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector embedding_vectors = 1; - * - */ - public Builder addAllEmbeddingVectors( - java.lang.Iterable< - ? extends - com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec - .EmbeddingVector> - values) { - if (embeddingVectorsBuilder_ == null) { - ensureEmbeddingVectorsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, embeddingVectors_); - onChanged(); - } else { - embeddingVectorsBuilder_.addAllMessages(values); + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; } - return this; + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + FIELD_PATH_FIELD_NUMBER; + hash = (53 * hash) + getFieldPath().hashCode(); + if (getVectorCount() > 0) { + hash = (37 * hash) + VECTOR_FIELD_NUMBER; + hash = (53 * hash) + getVectorList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; } - /** - * - * - *
            -       * The embedding vector used for retrieval. Limit to 1.
            -       * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector embedding_vectors = 1; - * - */ - public Builder clearEmbeddingVectors() { - if (embeddingVectorsBuilder_ == null) { - embeddingVectors_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - embeddingVectorsBuilder_.clear(); - } - return this; + public static com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec + .EmbeddingVector + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); } - /** - * - * - *
            -       * The embedding vector used for retrieval. Limit to 1.
            -       * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector embedding_vectors = 1; - * - */ - public Builder removeEmbeddingVectors(int index) { - if (embeddingVectorsBuilder_ == null) { - ensureEmbeddingVectorsIsMutable(); - embeddingVectors_.remove(index); - onChanged(); - } else { - embeddingVectorsBuilder_.remove(index); - } - return this; + public static com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec + .EmbeddingVector + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); } - /** - * - * - *
            -       * The embedding vector used for retrieval. Limit to 1.
            -       * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector embedding_vectors = 1; - * - */ - public com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector - .Builder - getEmbeddingVectorsBuilder(int index) { - return internalGetEmbeddingVectorsFieldBuilder().getBuilder(index); + public static com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec + .EmbeddingVector + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); } - /** - * - * - *
            -       * The embedding vector used for retrieval. Limit to 1.
            -       * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector embedding_vectors = 1; - * - */ - public com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec - .EmbeddingVectorOrBuilder - getEmbeddingVectorsOrBuilder(int index) { - if (embeddingVectorsBuilder_ == null) { - return embeddingVectors_.get(index); - } else { - return embeddingVectorsBuilder_.getMessageOrBuilder(index); - } + public static com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec + .EmbeddingVector + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); } - /** - * - * - *
            -       * The embedding vector used for retrieval. Limit to 1.
            -       * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector embedding_vectors = 1; - * - */ - public java.util.List< - ? extends - com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec - .EmbeddingVectorOrBuilder> - getEmbeddingVectorsOrBuilderList() { - if (embeddingVectorsBuilder_ != null) { - return embeddingVectorsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(embeddingVectors_); - } + public static com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec + .EmbeddingVector + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); } - /** - * - * - *
            -       * The embedding vector used for retrieval. Limit to 1.
            -       * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector embedding_vectors = 1; - * - */ - public com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector - .Builder - addEmbeddingVectorsBuilder() { - return internalGetEmbeddingVectorsFieldBuilder() - .addBuilder( - com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector - .getDefaultInstance()); + public static com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec + .EmbeddingVector + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); } - /** - * - * - *
            -       * The embedding vector used for retrieval. Limit to 1.
            -       * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector embedding_vectors = 1; - * - */ - public com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector - .Builder - addEmbeddingVectorsBuilder(int index) { - return internalGetEmbeddingVectorsFieldBuilder() - .addBuilder( - index, - com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector - .getDefaultInstance()); + public static com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec + .EmbeddingVector + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec + .EmbeddingVector + 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.discoveryengine.v1beta.SearchRequest.EmbeddingSpec + .EmbeddingVector + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec + .EmbeddingVector + 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.discoveryengine.v1beta.SearchRequest.EmbeddingSpec + .EmbeddingVector + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec + .EmbeddingVector + 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.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector + 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; } /** * * *
            -       * The embedding vector used for retrieval. Limit to 1.
            +       * Embedding vector.
                    * 
            * - * - * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector embedding_vectors = 1; - * + * Protobuf type {@code + * google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector} */ - public java.util.List< - com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector - .Builder> - getEmbeddingVectorsBuilderList() { - return internalGetEmbeddingVectorsFieldBuilder().getBuilderList(); - } + public static final class Builder + extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector) + com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec + .EmbeddingVectorOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_EmbeddingSpec_EmbeddingVector_descriptor; + } - private com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector, - com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector - .Builder, - com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec - .EmbeddingVectorOrBuilder> - internalGetEmbeddingVectorsFieldBuilder() { - if (embeddingVectorsBuilder_ == null) { - embeddingVectorsBuilder_ = - new com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec - .EmbeddingVector, + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_EmbeddingSpec_EmbeddingVector_fieldAccessorTable + .ensureFieldAccessorsInitialized( com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec - .EmbeddingVector.Builder, + .EmbeddingVector.class, com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec - .EmbeddingVectorOrBuilder>( - embeddingVectors_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - embeddingVectors_ = null; + .EmbeddingVector.Builder.class); } - return embeddingVectorsBuilder_; - } - // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec) - } + // Construct using + // com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector.newBuilder() + private Builder() {} - // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec) - private static final com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec - DEFAULT_INSTANCE; + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } - static { - DEFAULT_INSTANCE = new com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec(); - } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + fieldPath_ = ""; + vector_ = emptyFloatList(); + return this; + } - public static com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec - getDefaultInstance() { - return DEFAULT_INSTANCE; - } + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1beta.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_EmbeddingSpec_EmbeddingVector_descriptor; + } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public EmbeddingSpec parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException() - .setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector + build() { + com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); } - }; + return result; + } - public static com.google.protobuf.Parser parser() { - return PARSER; - } + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector + buildPartial() { + com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector + result = + new com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec + .EmbeddingVector(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + private void buildPartial0( + com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector + result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.fieldPath_ = fieldPath_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + vector_.makeImmutable(); + result.vector_ = vector_; + } + } - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector) { + return mergeFrom( + (com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec + .EmbeddingVector) + other); + } else { + super.mergeFrom(other); + return this; + } + } - public interface NaturalLanguageQueryUnderstandingSpecOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.SearchRequest.NaturalLanguageQueryUnderstandingSpec) - com.google.protobuf.MessageOrBuilder { + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector + other) { + if (other + == com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector + .getDefaultInstance()) return this; + if (!other.getFieldPath().isEmpty()) { + fieldPath_ = other.fieldPath_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.vector_.isEmpty()) { + if (vector_.isEmpty()) { + vector_ = other.vector_; + vector_.makeImmutable(); + bitField0_ |= 0x00000002; + } else { + ensureVectorIsMutable(); + vector_.addAll(other.vector_); + } + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } - /** - * - * - *
            -     * The condition under which filter extraction should occur.
            -     * Default to [Condition.DISABLED][].
            -     * 
            - * - * - * .google.cloud.discoveryengine.v1beta.SearchRequest.NaturalLanguageQueryUnderstandingSpec.FilterExtractionCondition filter_extraction_condition = 1; - * - * - * @return The enum numeric value on the wire for filterExtractionCondition. - */ - int getFilterExtractionConditionValue(); + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + fieldPath_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 21: + { + float v = input.readFloat(); + ensureVectorIsMutable(); + vector_.addFloat(v); + break; + } // case 21 + case 18: + { + int length = input.readRawVarint32(); + int limit = input.pushLimit(length); + int alloc = length > 4096 ? 4096 : length; + ensureVectorIsMutable(alloc / 4); + while (input.getBytesUntilLimit() > 0) { + vector_.addFloat(input.readFloat()); + } + input.popLimit(limit); + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object fieldPath_ = ""; + + /** + * + * + *
            +         * Embedding field path in schema.
            +         * 
            + * + * string field_path = 1; + * + * @return The fieldPath. + */ + public java.lang.String getFieldPath() { + java.lang.Object ref = fieldPath_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + fieldPath_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
            +         * Embedding field path in schema.
            +         * 
            + * + * string field_path = 1; + * + * @return The bytes for fieldPath. + */ + public com.google.protobuf.ByteString getFieldPathBytes() { + java.lang.Object ref = fieldPath_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + fieldPath_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
            +         * Embedding field path in schema.
            +         * 
            + * + * string field_path = 1; + * + * @param value The fieldPath to set. + * @return This builder for chaining. + */ + public Builder setFieldPath(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + fieldPath_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
            +         * Embedding field path in schema.
            +         * 
            + * + * string field_path = 1; + * + * @return This builder for chaining. + */ + public Builder clearFieldPath() { + fieldPath_ = getDefaultInstance().getFieldPath(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
            +         * Embedding field path in schema.
            +         * 
            + * + * string field_path = 1; + * + * @param value The bytes for fieldPath to set. + * @return This builder for chaining. + */ + public Builder setFieldPathBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + fieldPath_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.Internal.FloatList vector_ = emptyFloatList(); + + private void ensureVectorIsMutable() { + if (!vector_.isModifiable()) { + vector_ = makeMutableCopy(vector_); + } + bitField0_ |= 0x00000002; + } + + private void ensureVectorIsMutable(int capacity) { + if (!vector_.isModifiable()) { + vector_ = makeMutableCopy(vector_, capacity); + } + bitField0_ |= 0x00000002; + } + + /** + * + * + *
            +         * Query embedding vector.
            +         * 
            + * + * repeated float vector = 2; + * + * @return A list containing the vector. + */ + public java.util.List getVectorList() { + vector_.makeImmutable(); + return vector_; + } + + /** + * + * + *
            +         * Query embedding vector.
            +         * 
            + * + * repeated float vector = 2; + * + * @return The count of vector. + */ + public int getVectorCount() { + return vector_.size(); + } + + /** + * + * + *
            +         * Query embedding vector.
            +         * 
            + * + * repeated float vector = 2; + * + * @param index The index of the element to return. + * @return The vector at the given index. + */ + public float getVector(int index) { + return vector_.getFloat(index); + } + + /** + * + * + *
            +         * Query embedding vector.
            +         * 
            + * + * repeated float vector = 2; + * + * @param index The index to set the value at. + * @param value The vector to set. + * @return This builder for chaining. + */ + public Builder setVector(int index, float value) { + + ensureVectorIsMutable(); + vector_.setFloat(index, value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
            +         * Query embedding vector.
            +         * 
            + * + * repeated float vector = 2; + * + * @param value The vector to add. + * @return This builder for chaining. + */ + public Builder addVector(float value) { + + ensureVectorIsMutable(); + vector_.addFloat(value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
            +         * Query embedding vector.
            +         * 
            + * + * repeated float vector = 2; + * + * @param values The vector to add. + * @return This builder for chaining. + */ + public Builder addAllVector(java.lang.Iterable values) { + ensureVectorIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, vector_); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
            +         * Query embedding vector.
            +         * 
            + * + * repeated float vector = 2; + * + * @return This builder for chaining. + */ + public Builder clearVector() { + vector_ = emptyFloatList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector) + private static final com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec + .EmbeddingVector + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec + .EmbeddingVector(); + } + + public static com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec + .EmbeddingVector + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public EmbeddingVector parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int EMBEDDING_VECTORS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List< + com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector> + embeddingVectors_; /** * * *
            -     * The condition under which filter extraction should occur.
            -     * Default to [Condition.DISABLED][].
            +     * The embedding vector used for retrieval. Limit to 1.
                  * 
            * * - * .google.cloud.discoveryengine.v1beta.SearchRequest.NaturalLanguageQueryUnderstandingSpec.FilterExtractionCondition filter_extraction_condition = 1; + * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector embedding_vectors = 1; * - * - * @return The filterExtractionCondition. */ - com.google.cloud.discoveryengine.v1beta.SearchRequest.NaturalLanguageQueryUnderstandingSpec - .FilterExtractionCondition - getFilterExtractionCondition(); + @java.lang.Override + public java.util.List< + com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector> + getEmbeddingVectorsList() { + return embeddingVectors_; + } /** * * *
            -     * Field names used for location-based filtering, where geolocation filters
            -     * are detected in natural language search queries.
            -     * Only valid when the FilterExtractionCondition is set to `ENABLED`.
            -     *
            -     * If this field is set, it overrides the field names set in
            -     * [ServingConfig.geo_search_query_detection_field_names][google.cloud.discoveryengine.v1beta.ServingConfig.geo_search_query_detection_field_names].
            +     * The embedding vector used for retrieval. Limit to 1.
                  * 
            * - * repeated string geo_search_query_detection_field_names = 2; - * - * @return A list containing the geoSearchQueryDetectionFieldNames. + * + * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector embedding_vectors = 1; + * */ - java.util.List getGeoSearchQueryDetectionFieldNamesList(); + @java.lang.Override + public java.util.List< + ? extends + com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec + .EmbeddingVectorOrBuilder> + getEmbeddingVectorsOrBuilderList() { + return embeddingVectors_; + } /** * * *
            -     * Field names used for location-based filtering, where geolocation filters
            -     * are detected in natural language search queries.
            -     * Only valid when the FilterExtractionCondition is set to `ENABLED`.
            -     *
            -     * If this field is set, it overrides the field names set in
            -     * [ServingConfig.geo_search_query_detection_field_names][google.cloud.discoveryengine.v1beta.ServingConfig.geo_search_query_detection_field_names].
            +     * The embedding vector used for retrieval. Limit to 1.
                  * 
            * - * repeated string geo_search_query_detection_field_names = 2; - * - * @return The count of geoSearchQueryDetectionFieldNames. + * + * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector embedding_vectors = 1; + * */ - int getGeoSearchQueryDetectionFieldNamesCount(); + @java.lang.Override + public int getEmbeddingVectorsCount() { + return embeddingVectors_.size(); + } /** * * *
            -     * Field names used for location-based filtering, where geolocation filters
            -     * are detected in natural language search queries.
            -     * Only valid when the FilterExtractionCondition is set to `ENABLED`.
            -     *
            -     * If this field is set, it overrides the field names set in
            -     * [ServingConfig.geo_search_query_detection_field_names][google.cloud.discoveryengine.v1beta.ServingConfig.geo_search_query_detection_field_names].
            +     * The embedding vector used for retrieval. Limit to 1.
                  * 
            * - * repeated string geo_search_query_detection_field_names = 2; - * - * @param index The index of the element to return. - * @return The geoSearchQueryDetectionFieldNames at the given index. + * + * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector embedding_vectors = 1; + * */ - java.lang.String getGeoSearchQueryDetectionFieldNames(int index); + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector + getEmbeddingVectors(int index) { + return embeddingVectors_.get(index); + } /** * * *
            -     * Field names used for location-based filtering, where geolocation filters
            -     * are detected in natural language search queries.
            -     * Only valid when the FilterExtractionCondition is set to `ENABLED`.
            -     *
            -     * If this field is set, it overrides the field names set in
            -     * [ServingConfig.geo_search_query_detection_field_names][google.cloud.discoveryengine.v1beta.ServingConfig.geo_search_query_detection_field_names].
            +     * The embedding vector used for retrieval. Limit to 1.
                  * 
            * - * repeated string geo_search_query_detection_field_names = 2; - * - * @param index The index of the value to return. - * @return The bytes of the geoSearchQueryDetectionFieldNames at the given index. + * + * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector embedding_vectors = 1; + * */ - com.google.protobuf.ByteString getGeoSearchQueryDetectionFieldNamesBytes(int index); - } - - /** - * - * - *
            -   * Specification to enable natural language understanding capabilities for
            -   * search requests.
            -   * 
            - * - * Protobuf type {@code - * google.cloud.discoveryengine.v1beta.SearchRequest.NaturalLanguageQueryUnderstandingSpec} - */ - public static final class NaturalLanguageQueryUnderstandingSpec - extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.SearchRequest.NaturalLanguageQueryUnderstandingSpec) - NaturalLanguageQueryUnderstandingSpecOrBuilder { - private static final long serialVersionUID = 0L; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "NaturalLanguageQueryUnderstandingSpec"); - } - - // Use NaturalLanguageQueryUnderstandingSpec.newBuilder() to construct. - private NaturalLanguageQueryUnderstandingSpec( - com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - - private NaturalLanguageQueryUnderstandingSpec() { - filterExtractionCondition_ = 0; - geoSearchQueryDetectionFieldNames_ = com.google.protobuf.LazyStringArrayList.emptyList(); - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.discoveryengine.v1beta.SearchServiceProto - .internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_NaturalLanguageQueryUnderstandingSpec_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.discoveryengine.v1beta.SearchServiceProto - .internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_NaturalLanguageQueryUnderstandingSpec_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.discoveryengine.v1beta.SearchRequest - .NaturalLanguageQueryUnderstandingSpec.class, - com.google.cloud.discoveryengine.v1beta.SearchRequest - .NaturalLanguageQueryUnderstandingSpec.Builder.class); - } - - /** - * - * - *
            -     * Enum describing under which condition filter extraction should occur.
            -     * 
            - * - * Protobuf enum {@code - * google.cloud.discoveryengine.v1beta.SearchRequest.NaturalLanguageQueryUnderstandingSpec.FilterExtractionCondition} - */ - public enum FilterExtractionCondition implements com.google.protobuf.ProtocolMessageEnum { - /** - * - * - *
            -       * Server behavior defaults to [Condition.DISABLED][].
            -       * 
            - * - * CONDITION_UNSPECIFIED = 0; - */ - CONDITION_UNSPECIFIED(0), - /** - * - * - *
            -       * Disables NL filter extraction.
            -       * 
            - * - * DISABLED = 1; - */ - DISABLED(1), - /** - * - * - *
            -       * Enables NL filter extraction.
            -       * 
            - * - * ENABLED = 2; - */ - ENABLED(2), - UNRECOGNIZED(-1), - ; - - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "FilterExtractionCondition"); - } - - /** - * - * - *
            -       * Server behavior defaults to [Condition.DISABLED][].
            -       * 
            - * - * CONDITION_UNSPECIFIED = 0; - */ - public static final int CONDITION_UNSPECIFIED_VALUE = 0; - - /** - * - * - *
            -       * Disables NL filter extraction.
            -       * 
            - * - * DISABLED = 1; - */ - public static final int DISABLED_VALUE = 1; - - /** - * - * - *
            -       * Enables NL filter extraction.
            -       * 
            - * - * ENABLED = 2; - */ - public static final int ENABLED_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 FilterExtractionCondition 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 FilterExtractionCondition forNumber(int value) { - switch (value) { - case 0: - return CONDITION_UNSPECIFIED; - case 1: - return DISABLED; - case 2: - return ENABLED; - default: - return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - - private static final com.google.protobuf.Internal.EnumLiteMap - internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public FilterExtractionCondition findValueByNumber(int number) { - return FilterExtractionCondition.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - - public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { - return getDescriptor(); - } - - public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { - return com.google.cloud.discoveryengine.v1beta.SearchRequest - .NaturalLanguageQueryUnderstandingSpec.getDescriptor() - .getEnumTypes() - .get(0); - } - - private static final FilterExtractionCondition[] VALUES = values(); - - public static FilterExtractionCondition valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private FilterExtractionCondition(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.cloud.discoveryengine.v1beta.SearchRequest.NaturalLanguageQueryUnderstandingSpec.FilterExtractionCondition) - } - - public static final int FILTER_EXTRACTION_CONDITION_FIELD_NUMBER = 1; - private int filterExtractionCondition_ = 0; - - /** - * - * - *
            -     * The condition under which filter extraction should occur.
            -     * Default to [Condition.DISABLED][].
            -     * 
            - * - * - * .google.cloud.discoveryengine.v1beta.SearchRequest.NaturalLanguageQueryUnderstandingSpec.FilterExtractionCondition filter_extraction_condition = 1; - * - * - * @return The enum numeric value on the wire for filterExtractionCondition. - */ - @java.lang.Override - public int getFilterExtractionConditionValue() { - return filterExtractionCondition_; - } - - /** - * - * - *
            -     * The condition under which filter extraction should occur.
            -     * Default to [Condition.DISABLED][].
            -     * 
            - * - * - * .google.cloud.discoveryengine.v1beta.SearchRequest.NaturalLanguageQueryUnderstandingSpec.FilterExtractionCondition filter_extraction_condition = 1; - * - * - * @return The filterExtractionCondition. - */ - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.SearchRequest - .NaturalLanguageQueryUnderstandingSpec.FilterExtractionCondition - getFilterExtractionCondition() { - com.google.cloud.discoveryengine.v1beta.SearchRequest.NaturalLanguageQueryUnderstandingSpec - .FilterExtractionCondition - result = - com.google.cloud.discoveryengine.v1beta.SearchRequest - .NaturalLanguageQueryUnderstandingSpec.FilterExtractionCondition.forNumber( - filterExtractionCondition_); - return result == null - ? com.google.cloud.discoveryengine.v1beta.SearchRequest - .NaturalLanguageQueryUnderstandingSpec.FilterExtractionCondition.UNRECOGNIZED - : result; - } - - public static final int GEO_SEARCH_QUERY_DETECTION_FIELD_NAMES_FIELD_NUMBER = 2; - - @SuppressWarnings("serial") - private com.google.protobuf.LazyStringArrayList geoSearchQueryDetectionFieldNames_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - - /** - * - * - *
            -     * Field names used for location-based filtering, where geolocation filters
            -     * are detected in natural language search queries.
            -     * Only valid when the FilterExtractionCondition is set to `ENABLED`.
            -     *
            -     * If this field is set, it overrides the field names set in
            -     * [ServingConfig.geo_search_query_detection_field_names][google.cloud.discoveryengine.v1beta.ServingConfig.geo_search_query_detection_field_names].
            -     * 
            - * - * repeated string geo_search_query_detection_field_names = 2; - * - * @return A list containing the geoSearchQueryDetectionFieldNames. - */ - public com.google.protobuf.ProtocolStringList getGeoSearchQueryDetectionFieldNamesList() { - return geoSearchQueryDetectionFieldNames_; - } - - /** - * - * - *
            -     * Field names used for location-based filtering, where geolocation filters
            -     * are detected in natural language search queries.
            -     * Only valid when the FilterExtractionCondition is set to `ENABLED`.
            -     *
            -     * If this field is set, it overrides the field names set in
            -     * [ServingConfig.geo_search_query_detection_field_names][google.cloud.discoveryengine.v1beta.ServingConfig.geo_search_query_detection_field_names].
            -     * 
            - * - * repeated string geo_search_query_detection_field_names = 2; - * - * @return The count of geoSearchQueryDetectionFieldNames. - */ - public int getGeoSearchQueryDetectionFieldNamesCount() { - return geoSearchQueryDetectionFieldNames_.size(); - } - - /** - * - * - *
            -     * Field names used for location-based filtering, where geolocation filters
            -     * are detected in natural language search queries.
            -     * Only valid when the FilterExtractionCondition is set to `ENABLED`.
            -     *
            -     * If this field is set, it overrides the field names set in
            -     * [ServingConfig.geo_search_query_detection_field_names][google.cloud.discoveryengine.v1beta.ServingConfig.geo_search_query_detection_field_names].
            -     * 
            - * - * repeated string geo_search_query_detection_field_names = 2; - * - * @param index The index of the element to return. - * @return The geoSearchQueryDetectionFieldNames at the given index. - */ - public java.lang.String getGeoSearchQueryDetectionFieldNames(int index) { - return geoSearchQueryDetectionFieldNames_.get(index); - } - - /** - * - * - *
            -     * Field names used for location-based filtering, where geolocation filters
            -     * are detected in natural language search queries.
            -     * Only valid when the FilterExtractionCondition is set to `ENABLED`.
            -     *
            -     * If this field is set, it overrides the field names set in
            -     * [ServingConfig.geo_search_query_detection_field_names][google.cloud.discoveryengine.v1beta.ServingConfig.geo_search_query_detection_field_names].
            -     * 
            - * - * repeated string geo_search_query_detection_field_names = 2; - * - * @param index The index of the value to return. - * @return The bytes of the geoSearchQueryDetectionFieldNames at the given index. - */ - public com.google.protobuf.ByteString getGeoSearchQueryDetectionFieldNamesBytes(int index) { - return geoSearchQueryDetectionFieldNames_.getByteString(index); + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec + .EmbeddingVectorOrBuilder + getEmbeddingVectorsOrBuilder(int index) { + return embeddingVectors_.get(index); } private byte memoizedIsInitialized = -1; @@ -26933,15 +27276,8 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (filterExtractionCondition_ - != com.google.cloud.discoveryengine.v1beta.SearchRequest - .NaturalLanguageQueryUnderstandingSpec.FilterExtractionCondition.CONDITION_UNSPECIFIED - .getNumber()) { - output.writeEnum(1, filterExtractionCondition_); - } - for (int i = 0; i < geoSearchQueryDetectionFieldNames_.size(); i++) { - com.google.protobuf.GeneratedMessage.writeString( - output, 2, geoSearchQueryDetectionFieldNames_.getRaw(i)); + for (int i = 0; i < embeddingVectors_.size(); i++) { + output.writeMessage(1, embeddingVectors_.get(i)); } getUnknownFields().writeTo(output); } @@ -26952,20 +27288,9 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (filterExtractionCondition_ - != com.google.cloud.discoveryengine.v1beta.SearchRequest - .NaturalLanguageQueryUnderstandingSpec.FilterExtractionCondition.CONDITION_UNSPECIFIED - .getNumber()) { + for (int i = 0; i < embeddingVectors_.size(); i++) { size += - com.google.protobuf.CodedOutputStream.computeEnumSize(1, filterExtractionCondition_); - } - { - int dataSize = 0; - for (int i = 0; i < geoSearchQueryDetectionFieldNames_.size(); i++) { - dataSize += computeStringSizeNoTag(geoSearchQueryDetectionFieldNames_.getRaw(i)); - } - size += dataSize; - size += 1 * getGeoSearchQueryDetectionFieldNamesList().size(); + com.google.protobuf.CodedOutputStream.computeMessageSize(1, embeddingVectors_.get(i)); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -26977,21 +27302,13 @@ public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } - if (!(obj - instanceof - com.google.cloud.discoveryengine.v1beta.SearchRequest - .NaturalLanguageQueryUnderstandingSpec)) { + if (!(obj instanceof com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec)) { return super.equals(obj); } - com.google.cloud.discoveryengine.v1beta.SearchRequest.NaturalLanguageQueryUnderstandingSpec - other = - (com.google.cloud.discoveryengine.v1beta.SearchRequest - .NaturalLanguageQueryUnderstandingSpec) - obj; + com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec other = + (com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec) obj; - if (filterExtractionCondition_ != other.filterExtractionCondition_) return false; - if (!getGeoSearchQueryDetectionFieldNamesList() - .equals(other.getGeoSearchQueryDetectionFieldNamesList())) return false; + if (!getEmbeddingVectorsList().equals(other.getEmbeddingVectorsList())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -27003,84 +27320,68 @@ public int hashCode() { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + FILTER_EXTRACTION_CONDITION_FIELD_NUMBER; - hash = (53 * hash) + filterExtractionCondition_; - if (getGeoSearchQueryDetectionFieldNamesCount() > 0) { - hash = (37 * hash) + GEO_SEARCH_QUERY_DETECTION_FIELD_NAMES_FIELD_NUMBER; - hash = (53 * hash) + getGeoSearchQueryDetectionFieldNamesList().hashCode(); + if (getEmbeddingVectorsCount() > 0) { + hash = (37 * hash) + EMBEDDING_VECTORS_FIELD_NUMBER; + hash = (53 * hash) + getEmbeddingVectorsList().hashCode(); } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } - public static com.google.cloud.discoveryengine.v1beta.SearchRequest - .NaturalLanguageQueryUnderstandingSpec - parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { + public static com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.discoveryengine.v1beta.SearchRequest - .NaturalLanguageQueryUnderstandingSpec - parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { + public static com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec 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.discoveryengine.v1beta.SearchRequest - .NaturalLanguageQueryUnderstandingSpec - parseFrom(com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { + public static com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.discoveryengine.v1beta.SearchRequest - .NaturalLanguageQueryUnderstandingSpec - parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { + public static com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec 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.discoveryengine.v1beta.SearchRequest - .NaturalLanguageQueryUnderstandingSpec - parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + public static com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.discoveryengine.v1beta.SearchRequest - .NaturalLanguageQueryUnderstandingSpec - parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { + public static com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.discoveryengine.v1beta.SearchRequest - .NaturalLanguageQueryUnderstandingSpec - parseFrom(java.io.InputStream input) throws java.io.IOException { + public static com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec parseFrom( + java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } - public static com.google.cloud.discoveryengine.v1beta.SearchRequest - .NaturalLanguageQueryUnderstandingSpec - parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { + public static com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec 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.discoveryengine.v1beta.SearchRequest - .NaturalLanguageQueryUnderstandingSpec + public static com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } - public static com.google.cloud.discoveryengine.v1beta.SearchRequest - .NaturalLanguageQueryUnderstandingSpec + public static com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -27088,18 +27389,15 @@ public int hashCode() { PARSER, input, extensionRegistry); } - public static com.google.cloud.discoveryengine.v1beta.SearchRequest - .NaturalLanguageQueryUnderstandingSpec - parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + public static com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } - public static com.google.cloud.discoveryengine.v1beta.SearchRequest - .NaturalLanguageQueryUnderstandingSpec - parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { + public static com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -27114,8 +27412,7 @@ public static Builder newBuilder() { } public static Builder newBuilder( - com.google.cloud.discoveryengine.v1beta.SearchRequest.NaturalLanguageQueryUnderstandingSpec - prototype) { + com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @@ -27134,37 +27431,33 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.Builder * * *
            -     * Specification to enable natural language understanding capabilities for
            -     * search requests.
            +     * The specification that uses customized query embedding vector to do
            +     * semantic document retrieval.
                  * 
            * - * Protobuf type {@code - * google.cloud.discoveryengine.v1beta.SearchRequest.NaturalLanguageQueryUnderstandingSpec} + * Protobuf type {@code google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec} */ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.SearchRequest.NaturalLanguageQueryUnderstandingSpec) - com.google.cloud.discoveryengine.v1beta.SearchRequest - .NaturalLanguageQueryUnderstandingSpecOrBuilder { + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec) + com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpecOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.discoveryengine.v1beta.SearchServiceProto - .internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_NaturalLanguageQueryUnderstandingSpec_descriptor; + .internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_EmbeddingSpec_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.discoveryengine.v1beta.SearchServiceProto - .internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_NaturalLanguageQueryUnderstandingSpec_fieldAccessorTable + .internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_EmbeddingSpec_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.discoveryengine.v1beta.SearchRequest - .NaturalLanguageQueryUnderstandingSpec.class, - com.google.cloud.discoveryengine.v1beta.SearchRequest - .NaturalLanguageQueryUnderstandingSpec.Builder.class); + com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.class, + com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.Builder.class); } // Construct using - // com.google.cloud.discoveryengine.v1beta.SearchRequest.NaturalLanguageQueryUnderstandingSpec.newBuilder() + // com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.newBuilder() private Builder() {} private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { @@ -27175,31 +27468,32 @@ private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { public Builder clear() { super.clear(); bitField0_ = 0; - filterExtractionCondition_ = 0; - geoSearchQueryDetectionFieldNames_ = com.google.protobuf.LazyStringArrayList.emptyList(); + if (embeddingVectorsBuilder_ == null) { + embeddingVectors_ = java.util.Collections.emptyList(); + } else { + embeddingVectors_ = null; + embeddingVectorsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.cloud.discoveryengine.v1beta.SearchServiceProto - .internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_NaturalLanguageQueryUnderstandingSpec_descriptor; + .internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_EmbeddingSpec_descriptor; } @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.SearchRequest - .NaturalLanguageQueryUnderstandingSpec + public com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec getDefaultInstanceForType() { - return com.google.cloud.discoveryengine.v1beta.SearchRequest - .NaturalLanguageQueryUnderstandingSpec.getDefaultInstance(); + return com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec + .getDefaultInstance(); } @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.SearchRequest - .NaturalLanguageQueryUnderstandingSpec - build() { - com.google.cloud.discoveryengine.v1beta.SearchRequest.NaturalLanguageQueryUnderstandingSpec - result = buildPartial(); + public com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec build() { + com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } @@ -27207,13 +27501,10 @@ public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { } @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.SearchRequest - .NaturalLanguageQueryUnderstandingSpec - buildPartial() { - com.google.cloud.discoveryengine.v1beta.SearchRequest.NaturalLanguageQueryUnderstandingSpec - result = - new com.google.cloud.discoveryengine.v1beta.SearchRequest - .NaturalLanguageQueryUnderstandingSpec(this); + public com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec buildPartial() { + com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec result = + new com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec(this); + buildPartialRepeatedFields(result); if (bitField0_ != 0) { buildPartial0(result); } @@ -27221,30 +27512,29 @@ public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return result; } + private void buildPartialRepeatedFields( + com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec result) { + if (embeddingVectorsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + embeddingVectors_ = java.util.Collections.unmodifiableList(embeddingVectors_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.embeddingVectors_ = embeddingVectors_; + } else { + result.embeddingVectors_ = embeddingVectorsBuilder_.build(); + } + } + private void buildPartial0( - com.google.cloud.discoveryengine.v1beta.SearchRequest - .NaturalLanguageQueryUnderstandingSpec - result) { + com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec result) { int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.filterExtractionCondition_ = filterExtractionCondition_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - geoSearchQueryDetectionFieldNames_.makeImmutable(); - result.geoSearchQueryDetectionFieldNames_ = geoSearchQueryDetectionFieldNames_; - } } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { - if (other - instanceof - com.google.cloud.discoveryengine.v1beta.SearchRequest - .NaturalLanguageQueryUnderstandingSpec) { + if (other instanceof com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec) { return mergeFrom( - (com.google.cloud.discoveryengine.v1beta.SearchRequest - .NaturalLanguageQueryUnderstandingSpec) - other); + (com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec) other); } else { super.mergeFrom(other); return this; @@ -27252,24 +27542,36 @@ public Builder mergeFrom(com.google.protobuf.Message other) { } public Builder mergeFrom( - com.google.cloud.discoveryengine.v1beta.SearchRequest - .NaturalLanguageQueryUnderstandingSpec - other) { + com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec other) { if (other - == com.google.cloud.discoveryengine.v1beta.SearchRequest - .NaturalLanguageQueryUnderstandingSpec.getDefaultInstance()) return this; - if (other.filterExtractionCondition_ != 0) { - setFilterExtractionConditionValue(other.getFilterExtractionConditionValue()); - } - if (!other.geoSearchQueryDetectionFieldNames_.isEmpty()) { - if (geoSearchQueryDetectionFieldNames_.isEmpty()) { - geoSearchQueryDetectionFieldNames_ = other.geoSearchQueryDetectionFieldNames_; - bitField0_ |= 0x00000002; - } else { - ensureGeoSearchQueryDetectionFieldNamesIsMutable(); - geoSearchQueryDetectionFieldNames_.addAll(other.geoSearchQueryDetectionFieldNames_); + == com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec + .getDefaultInstance()) return this; + if (embeddingVectorsBuilder_ == null) { + if (!other.embeddingVectors_.isEmpty()) { + if (embeddingVectors_.isEmpty()) { + embeddingVectors_ = other.embeddingVectors_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureEmbeddingVectorsIsMutable(); + embeddingVectors_.addAll(other.embeddingVectors_); + } + onChanged(); + } + } else { + if (!other.embeddingVectors_.isEmpty()) { + if (embeddingVectorsBuilder_.isEmpty()) { + embeddingVectorsBuilder_.dispose(); + embeddingVectorsBuilder_ = null; + embeddingVectors_ = other.embeddingVectors_; + bitField0_ = (bitField0_ & ~0x00000001); + embeddingVectorsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetEmbeddingVectorsFieldBuilder() + : null; + } else { + embeddingVectorsBuilder_.addAllMessages(other.embeddingVectors_); + } } - onChanged(); } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); @@ -27297,19 +27599,23 @@ public Builder mergeFrom( case 0: done = true; break; - case 8: - { - filterExtractionCondition_ = input.readEnum(); - bitField0_ |= 0x00000001; - break; - } // case 8 - case 18: + case 10: { - java.lang.String s = input.readStringRequireUtf8(); - ensureGeoSearchQueryDetectionFieldNamesIsMutable(); - geoSearchQueryDetectionFieldNames_.add(s); + com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec + .EmbeddingVector + m = + input.readMessage( + com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec + .EmbeddingVector.parser(), + extensionRegistry); + if (embeddingVectorsBuilder_ == null) { + ensureEmbeddingVectorsIsMutable(); + embeddingVectors_.add(m); + } else { + embeddingVectorsBuilder_.addMessage(m); + } break; - } // case 18 + } // case 10 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -27329,104 +27635,113 @@ public Builder mergeFrom( private int bitField0_; - private int filterExtractionCondition_ = 0; + private java.util.List< + com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector> + embeddingVectors_ = java.util.Collections.emptyList(); + + private void ensureEmbeddingVectorsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + embeddingVectors_ = + new java.util.ArrayList< + com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec + .EmbeddingVector>(embeddingVectors_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector, + com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector + .Builder, + com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec + .EmbeddingVectorOrBuilder> + embeddingVectorsBuilder_; /** * * *
            -       * The condition under which filter extraction should occur.
            -       * Default to [Condition.DISABLED][].
            +       * The embedding vector used for retrieval. Limit to 1.
                    * 
            * * - * .google.cloud.discoveryengine.v1beta.SearchRequest.NaturalLanguageQueryUnderstandingSpec.FilterExtractionCondition filter_extraction_condition = 1; + * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector embedding_vectors = 1; * - * - * @return The enum numeric value on the wire for filterExtractionCondition. */ - @java.lang.Override - public int getFilterExtractionConditionValue() { - return filterExtractionCondition_; + public java.util.List< + com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector> + getEmbeddingVectorsList() { + if (embeddingVectorsBuilder_ == null) { + return java.util.Collections.unmodifiableList(embeddingVectors_); + } else { + return embeddingVectorsBuilder_.getMessageList(); + } } /** * * *
            -       * The condition under which filter extraction should occur.
            -       * Default to [Condition.DISABLED][].
            +       * The embedding vector used for retrieval. Limit to 1.
                    * 
            * * - * .google.cloud.discoveryengine.v1beta.SearchRequest.NaturalLanguageQueryUnderstandingSpec.FilterExtractionCondition filter_extraction_condition = 1; + * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector embedding_vectors = 1; * - * - * @param value The enum numeric value on the wire for filterExtractionCondition to set. - * @return This builder for chaining. */ - public Builder setFilterExtractionConditionValue(int value) { - filterExtractionCondition_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; + public int getEmbeddingVectorsCount() { + if (embeddingVectorsBuilder_ == null) { + return embeddingVectors_.size(); + } else { + return embeddingVectorsBuilder_.getCount(); + } } /** * * *
            -       * The condition under which filter extraction should occur.
            -       * Default to [Condition.DISABLED][].
            +       * The embedding vector used for retrieval. Limit to 1.
                    * 
            * * - * .google.cloud.discoveryengine.v1beta.SearchRequest.NaturalLanguageQueryUnderstandingSpec.FilterExtractionCondition filter_extraction_condition = 1; + * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector embedding_vectors = 1; * - * - * @return The filterExtractionCondition. */ - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.SearchRequest - .NaturalLanguageQueryUnderstandingSpec.FilterExtractionCondition - getFilterExtractionCondition() { - com.google.cloud.discoveryengine.v1beta.SearchRequest.NaturalLanguageQueryUnderstandingSpec - .FilterExtractionCondition - result = - com.google.cloud.discoveryengine.v1beta.SearchRequest - .NaturalLanguageQueryUnderstandingSpec.FilterExtractionCondition.forNumber( - filterExtractionCondition_); - return result == null - ? com.google.cloud.discoveryengine.v1beta.SearchRequest - .NaturalLanguageQueryUnderstandingSpec.FilterExtractionCondition.UNRECOGNIZED - : result; + public com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector + getEmbeddingVectors(int index) { + if (embeddingVectorsBuilder_ == null) { + return embeddingVectors_.get(index); + } else { + return embeddingVectorsBuilder_.getMessage(index); + } } /** * * *
            -       * The condition under which filter extraction should occur.
            -       * Default to [Condition.DISABLED][].
            +       * The embedding vector used for retrieval. Limit to 1.
                    * 
            * * - * .google.cloud.discoveryengine.v1beta.SearchRequest.NaturalLanguageQueryUnderstandingSpec.FilterExtractionCondition filter_extraction_condition = 1; + * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector embedding_vectors = 1; * - * - * @param value The filterExtractionCondition to set. - * @return This builder for chaining. */ - public Builder setFilterExtractionCondition( - com.google.cloud.discoveryengine.v1beta.SearchRequest - .NaturalLanguageQueryUnderstandingSpec.FilterExtractionCondition + public Builder setEmbeddingVectors( + int index, + com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector value) { - if (value == null) { - throw new NullPointerException(); + if (embeddingVectorsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEmbeddingVectorsIsMutable(); + embeddingVectors_.set(index, value); + onChanged(); + } else { + embeddingVectorsBuilder_.setMessage(index, value); } - bitField0_ |= 0x00000001; - filterExtractionCondition_ = value.getNumber(); - onChanged(); return this; } @@ -27434,143 +27749,158 @@ public Builder setFilterExtractionCondition( * * *
            -       * The condition under which filter extraction should occur.
            -       * Default to [Condition.DISABLED][].
            +       * The embedding vector used for retrieval. Limit to 1.
                    * 
            * * - * .google.cloud.discoveryengine.v1beta.SearchRequest.NaturalLanguageQueryUnderstandingSpec.FilterExtractionCondition filter_extraction_condition = 1; + * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector embedding_vectors = 1; * - * - * @return This builder for chaining. */ - public Builder clearFilterExtractionCondition() { - bitField0_ = (bitField0_ & ~0x00000001); - filterExtractionCondition_ = 0; - onChanged(); - return this; - } - - private com.google.protobuf.LazyStringArrayList geoSearchQueryDetectionFieldNames_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - - private void ensureGeoSearchQueryDetectionFieldNamesIsMutable() { - if (!geoSearchQueryDetectionFieldNames_.isModifiable()) { - geoSearchQueryDetectionFieldNames_ = - new com.google.protobuf.LazyStringArrayList(geoSearchQueryDetectionFieldNames_); + public Builder setEmbeddingVectors( + int index, + com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector + .Builder + builderForValue) { + if (embeddingVectorsBuilder_ == null) { + ensureEmbeddingVectorsIsMutable(); + embeddingVectors_.set(index, builderForValue.build()); + onChanged(); + } else { + embeddingVectorsBuilder_.setMessage(index, builderForValue.build()); } - bitField0_ |= 0x00000002; + return this; } /** * * *
            -       * Field names used for location-based filtering, where geolocation filters
            -       * are detected in natural language search queries.
            -       * Only valid when the FilterExtractionCondition is set to `ENABLED`.
            -       *
            -       * If this field is set, it overrides the field names set in
            -       * [ServingConfig.geo_search_query_detection_field_names][google.cloud.discoveryengine.v1beta.ServingConfig.geo_search_query_detection_field_names].
            +       * The embedding vector used for retrieval. Limit to 1.
                    * 
            * - * repeated string geo_search_query_detection_field_names = 2; - * - * @return A list containing the geoSearchQueryDetectionFieldNames. + * + * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector embedding_vectors = 1; + * */ - public com.google.protobuf.ProtocolStringList getGeoSearchQueryDetectionFieldNamesList() { - geoSearchQueryDetectionFieldNames_.makeImmutable(); - return geoSearchQueryDetectionFieldNames_; + public Builder addEmbeddingVectors( + com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector + value) { + if (embeddingVectorsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEmbeddingVectorsIsMutable(); + embeddingVectors_.add(value); + onChanged(); + } else { + embeddingVectorsBuilder_.addMessage(value); + } + return this; } /** * * *
            -       * Field names used for location-based filtering, where geolocation filters
            -       * are detected in natural language search queries.
            -       * Only valid when the FilterExtractionCondition is set to `ENABLED`.
            -       *
            -       * If this field is set, it overrides the field names set in
            -       * [ServingConfig.geo_search_query_detection_field_names][google.cloud.discoveryengine.v1beta.ServingConfig.geo_search_query_detection_field_names].
            +       * The embedding vector used for retrieval. Limit to 1.
                    * 
            * - * repeated string geo_search_query_detection_field_names = 2; - * - * @return The count of geoSearchQueryDetectionFieldNames. + * + * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector embedding_vectors = 1; + * */ - public int getGeoSearchQueryDetectionFieldNamesCount() { - return geoSearchQueryDetectionFieldNames_.size(); + public Builder addEmbeddingVectors( + int index, + com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector + value) { + if (embeddingVectorsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEmbeddingVectorsIsMutable(); + embeddingVectors_.add(index, value); + onChanged(); + } else { + embeddingVectorsBuilder_.addMessage(index, value); + } + return this; } /** * * *
            -       * Field names used for location-based filtering, where geolocation filters
            -       * are detected in natural language search queries.
            -       * Only valid when the FilterExtractionCondition is set to `ENABLED`.
            -       *
            -       * If this field is set, it overrides the field names set in
            -       * [ServingConfig.geo_search_query_detection_field_names][google.cloud.discoveryengine.v1beta.ServingConfig.geo_search_query_detection_field_names].
            +       * The embedding vector used for retrieval. Limit to 1.
                    * 
            * - * repeated string geo_search_query_detection_field_names = 2; - * - * @param index The index of the element to return. - * @return The geoSearchQueryDetectionFieldNames at the given index. + * + * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector embedding_vectors = 1; + * */ - public java.lang.String getGeoSearchQueryDetectionFieldNames(int index) { - return geoSearchQueryDetectionFieldNames_.get(index); + public Builder addEmbeddingVectors( + com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector + .Builder + builderForValue) { + if (embeddingVectorsBuilder_ == null) { + ensureEmbeddingVectorsIsMutable(); + embeddingVectors_.add(builderForValue.build()); + onChanged(); + } else { + embeddingVectorsBuilder_.addMessage(builderForValue.build()); + } + return this; } /** * * *
            -       * Field names used for location-based filtering, where geolocation filters
            -       * are detected in natural language search queries.
            -       * Only valid when the FilterExtractionCondition is set to `ENABLED`.
            -       *
            -       * If this field is set, it overrides the field names set in
            -       * [ServingConfig.geo_search_query_detection_field_names][google.cloud.discoveryengine.v1beta.ServingConfig.geo_search_query_detection_field_names].
            +       * The embedding vector used for retrieval. Limit to 1.
                    * 
            * - * repeated string geo_search_query_detection_field_names = 2; - * - * @param index The index of the value to return. - * @return The bytes of the geoSearchQueryDetectionFieldNames at the given index. + * + * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector embedding_vectors = 1; + * */ - public com.google.protobuf.ByteString getGeoSearchQueryDetectionFieldNamesBytes(int index) { - return geoSearchQueryDetectionFieldNames_.getByteString(index); + public Builder addEmbeddingVectors( + int index, + com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector + .Builder + builderForValue) { + if (embeddingVectorsBuilder_ == null) { + ensureEmbeddingVectorsIsMutable(); + embeddingVectors_.add(index, builderForValue.build()); + onChanged(); + } else { + embeddingVectorsBuilder_.addMessage(index, builderForValue.build()); + } + return this; } /** * * *
            -       * Field names used for location-based filtering, where geolocation filters
            -       * are detected in natural language search queries.
            -       * Only valid when the FilterExtractionCondition is set to `ENABLED`.
            -       *
            -       * If this field is set, it overrides the field names set in
            -       * [ServingConfig.geo_search_query_detection_field_names][google.cloud.discoveryengine.v1beta.ServingConfig.geo_search_query_detection_field_names].
            +       * The embedding vector used for retrieval. Limit to 1.
                    * 
            * - * repeated string geo_search_query_detection_field_names = 2; - * - * @param index The index to set the value at. - * @param value The geoSearchQueryDetectionFieldNames to set. - * @return This builder for chaining. + * + * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector embedding_vectors = 1; + * */ - public Builder setGeoSearchQueryDetectionFieldNames(int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); + public Builder addAllEmbeddingVectors( + java.lang.Iterable< + ? extends + com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec + .EmbeddingVector> + values) { + if (embeddingVectorsBuilder_ == null) { + ensureEmbeddingVectorsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, embeddingVectors_); + onChanged(); + } else { + embeddingVectorsBuilder_.addAllMessages(values); } - ensureGeoSearchQueryDetectionFieldNamesIsMutable(); - geoSearchQueryDetectionFieldNames_.set(index, value); - bitField0_ |= 0x00000002; - onChanged(); return this; } @@ -27578,27 +27908,21 @@ public Builder setGeoSearchQueryDetectionFieldNames(int index, java.lang.String * * *
            -       * Field names used for location-based filtering, where geolocation filters
            -       * are detected in natural language search queries.
            -       * Only valid when the FilterExtractionCondition is set to `ENABLED`.
            -       *
            -       * If this field is set, it overrides the field names set in
            -       * [ServingConfig.geo_search_query_detection_field_names][google.cloud.discoveryengine.v1beta.ServingConfig.geo_search_query_detection_field_names].
            +       * The embedding vector used for retrieval. Limit to 1.
                    * 
            * - * repeated string geo_search_query_detection_field_names = 2; - * - * @param value The geoSearchQueryDetectionFieldNames to add. - * @return This builder for chaining. + * + * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector embedding_vectors = 1; + * */ - public Builder addGeoSearchQueryDetectionFieldNames(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); + public Builder clearEmbeddingVectors() { + if (embeddingVectorsBuilder_ == null) { + embeddingVectors_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + embeddingVectorsBuilder_.clear(); } - ensureGeoSearchQueryDetectionFieldNamesIsMutable(); - geoSearchQueryDetectionFieldNames_.add(value); - bitField0_ |= 0x00000002; - onChanged(); return this; } @@ -27606,26 +27930,21 @@ public Builder addGeoSearchQueryDetectionFieldNames(java.lang.String value) { * * *
            -       * Field names used for location-based filtering, where geolocation filters
            -       * are detected in natural language search queries.
            -       * Only valid when the FilterExtractionCondition is set to `ENABLED`.
            -       *
            -       * If this field is set, it overrides the field names set in
            -       * [ServingConfig.geo_search_query_detection_field_names][google.cloud.discoveryengine.v1beta.ServingConfig.geo_search_query_detection_field_names].
            +       * The embedding vector used for retrieval. Limit to 1.
                    * 
            * - * repeated string geo_search_query_detection_field_names = 2; - * - * @param values The geoSearchQueryDetectionFieldNames to add. - * @return This builder for chaining. + * + * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector embedding_vectors = 1; + * */ - public Builder addAllGeoSearchQueryDetectionFieldNames( - java.lang.Iterable values) { - ensureGeoSearchQueryDetectionFieldNamesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, geoSearchQueryDetectionFieldNames_); - bitField0_ |= 0x00000002; - onChanged(); + public Builder removeEmbeddingVectors(int index) { + if (embeddingVectorsBuilder_ == null) { + ensureEmbeddingVectorsIsMutable(); + embeddingVectors_.remove(index); + onChanged(); + } else { + embeddingVectorsBuilder_.remove(index); + } return this; } @@ -27633,80 +27952,167 @@ public Builder addAllGeoSearchQueryDetectionFieldNames( * * *
            -       * Field names used for location-based filtering, where geolocation filters
            -       * are detected in natural language search queries.
            -       * Only valid when the FilterExtractionCondition is set to `ENABLED`.
            -       *
            -       * If this field is set, it overrides the field names set in
            -       * [ServingConfig.geo_search_query_detection_field_names][google.cloud.discoveryengine.v1beta.ServingConfig.geo_search_query_detection_field_names].
            +       * The embedding vector used for retrieval. Limit to 1.
                    * 
            * - * repeated string geo_search_query_detection_field_names = 2; - * - * @return This builder for chaining. + * + * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector embedding_vectors = 1; + * */ - public Builder clearGeoSearchQueryDetectionFieldNames() { - geoSearchQueryDetectionFieldNames_ = com.google.protobuf.LazyStringArrayList.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - ; - onChanged(); - return this; + public com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector + .Builder + getEmbeddingVectorsBuilder(int index) { + return internalGetEmbeddingVectorsFieldBuilder().getBuilder(index); } /** * * *
            -       * Field names used for location-based filtering, where geolocation filters
            -       * are detected in natural language search queries.
            -       * Only valid when the FilterExtractionCondition is set to `ENABLED`.
            -       *
            -       * If this field is set, it overrides the field names set in
            -       * [ServingConfig.geo_search_query_detection_field_names][google.cloud.discoveryengine.v1beta.ServingConfig.geo_search_query_detection_field_names].
            +       * The embedding vector used for retrieval. Limit to 1.
                    * 
            * - * repeated string geo_search_query_detection_field_names = 2; - * - * @param value The bytes of the geoSearchQueryDetectionFieldNames to add. - * @return This builder for chaining. + * + * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector embedding_vectors = 1; + * */ - public Builder addGeoSearchQueryDetectionFieldNamesBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); + public com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec + .EmbeddingVectorOrBuilder + getEmbeddingVectorsOrBuilder(int index) { + if (embeddingVectorsBuilder_ == null) { + return embeddingVectors_.get(index); + } else { + return embeddingVectorsBuilder_.getMessageOrBuilder(index); } - checkByteStringIsUtf8(value); - ensureGeoSearchQueryDetectionFieldNamesIsMutable(); - geoSearchQueryDetectionFieldNames_.add(value); - bitField0_ |= 0x00000002; - onChanged(); - return this; } - // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.SearchRequest.NaturalLanguageQueryUnderstandingSpec) - } - - // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.SearchRequest.NaturalLanguageQueryUnderstandingSpec) - private static final com.google.cloud.discoveryengine.v1beta.SearchRequest - .NaturalLanguageQueryUnderstandingSpec - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = - new com.google.cloud.discoveryengine.v1beta.SearchRequest - .NaturalLanguageQueryUnderstandingSpec(); + /** + * + * + *
            +       * The embedding vector used for retrieval. Limit to 1.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector embedding_vectors = 1; + * + */ + public java.util.List< + ? extends + com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec + .EmbeddingVectorOrBuilder> + getEmbeddingVectorsOrBuilderList() { + if (embeddingVectorsBuilder_ != null) { + return embeddingVectorsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(embeddingVectors_); + } + } + + /** + * + * + *
            +       * The embedding vector used for retrieval. Limit to 1.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector embedding_vectors = 1; + * + */ + public com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector + .Builder + addEmbeddingVectorsBuilder() { + return internalGetEmbeddingVectorsFieldBuilder() + .addBuilder( + com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector + .getDefaultInstance()); + } + + /** + * + * + *
            +       * The embedding vector used for retrieval. Limit to 1.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector embedding_vectors = 1; + * + */ + public com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector + .Builder + addEmbeddingVectorsBuilder(int index) { + return internalGetEmbeddingVectorsFieldBuilder() + .addBuilder( + index, + com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector + .getDefaultInstance()); + } + + /** + * + * + *
            +       * The embedding vector used for retrieval. Limit to 1.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector embedding_vectors = 1; + * + */ + public java.util.List< + com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector + .Builder> + getEmbeddingVectorsBuilderList() { + return internalGetEmbeddingVectorsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector, + com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector + .Builder, + com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec + .EmbeddingVectorOrBuilder> + internalGetEmbeddingVectorsFieldBuilder() { + if (embeddingVectorsBuilder_ == null) { + embeddingVectorsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec + .EmbeddingVector, + com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec + .EmbeddingVector.Builder, + com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec + .EmbeddingVectorOrBuilder>( + embeddingVectors_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + embeddingVectors_ = null; + } + return embeddingVectorsBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec) } - public static com.google.cloud.discoveryengine.v1beta.SearchRequest - .NaturalLanguageQueryUnderstandingSpec + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec) + private static final com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec(); + } + + public static com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec getDefaultInstance() { return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { @java.lang.Override - public NaturalLanguageQueryUnderstandingSpec parsePartialFrom( + public EmbeddingSpec parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { @@ -27726,77 +28132,276 @@ public NaturalLanguageQueryUnderstandingSpec parsePartialFrom( } }; - public static com.google.protobuf.Parser parser() { + public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override - public com.google.protobuf.Parser getParserForType() { + public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.SearchRequest - .NaturalLanguageQueryUnderstandingSpec + public com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } - public interface SearchAsYouTypeSpecOrBuilder + public interface NaturalLanguageQueryUnderstandingSpecOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec) + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.SearchRequest.NaturalLanguageQueryUnderstandingSpec) com.google.protobuf.MessageOrBuilder { /** * * *
            -     * The condition under which search as you type should occur.
            -     * Default to
            -     * [Condition.DISABLED][google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec.Condition.DISABLED].
            +     * The condition under which filter extraction should occur.
            +     * Server behavior defaults to `DISABLED`.
                  * 
            * * - * .google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec.Condition condition = 1; + * .google.cloud.discoveryengine.v1beta.SearchRequest.NaturalLanguageQueryUnderstandingSpec.FilterExtractionCondition filter_extraction_condition = 1; * * - * @return The enum numeric value on the wire for condition. + * @return The enum numeric value on the wire for filterExtractionCondition. */ - int getConditionValue(); + int getFilterExtractionConditionValue(); /** * * *
            -     * The condition under which search as you type should occur.
            -     * Default to
            -     * [Condition.DISABLED][google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec.Condition.DISABLED].
            +     * The condition under which filter extraction should occur.
            +     * Server behavior defaults to `DISABLED`.
                  * 
            * * - * .google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec.Condition condition = 1; + * .google.cloud.discoveryengine.v1beta.SearchRequest.NaturalLanguageQueryUnderstandingSpec.FilterExtractionCondition filter_extraction_condition = 1; * * - * @return The condition. + * @return The filterExtractionCondition. */ - com.google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec.Condition - getCondition(); + com.google.cloud.discoveryengine.v1beta.SearchRequest.NaturalLanguageQueryUnderstandingSpec + .FilterExtractionCondition + getFilterExtractionCondition(); + + /** + * + * + *
            +     * Field names used for location-based filtering, where geolocation filters
            +     * are detected in natural language search queries.
            +     * Only valid when the FilterExtractionCondition is set to `ENABLED`.
            +     * 
            + * + * repeated string geo_search_query_detection_field_names = 2; + * + * @return A list containing the geoSearchQueryDetectionFieldNames. + */ + java.util.List getGeoSearchQueryDetectionFieldNamesList(); + + /** + * + * + *
            +     * Field names used for location-based filtering, where geolocation filters
            +     * are detected in natural language search queries.
            +     * Only valid when the FilterExtractionCondition is set to `ENABLED`.
            +     * 
            + * + * repeated string geo_search_query_detection_field_names = 2; + * + * @return The count of geoSearchQueryDetectionFieldNames. + */ + int getGeoSearchQueryDetectionFieldNamesCount(); + + /** + * + * + *
            +     * Field names used for location-based filtering, where geolocation filters
            +     * are detected in natural language search queries.
            +     * Only valid when the FilterExtractionCondition is set to `ENABLED`.
            +     * 
            + * + * repeated string geo_search_query_detection_field_names = 2; + * + * @param index The index of the element to return. + * @return The geoSearchQueryDetectionFieldNames at the given index. + */ + java.lang.String getGeoSearchQueryDetectionFieldNames(int index); + + /** + * + * + *
            +     * Field names used for location-based filtering, where geolocation filters
            +     * are detected in natural language search queries.
            +     * Only valid when the FilterExtractionCondition is set to `ENABLED`.
            +     * 
            + * + * repeated string geo_search_query_detection_field_names = 2; + * + * @param index The index of the value to return. + * @return The bytes of the geoSearchQueryDetectionFieldNames at the given index. + */ + com.google.protobuf.ByteString getGeoSearchQueryDetectionFieldNamesBytes(int index); + + /** + * + * + *
            +     * Optional. Controls behavior of how extracted filters are applied to the
            +     * search. The default behavior depends on the request. For single datastore
            +     * structured search, the default is `HARD_FILTER`. For multi-datastore
            +     * search, the default behavior is `SOFT_BOOST`.
            +     * Location-based filters are always applied as hard filters, and the
            +     * `SOFT_BOOST` setting will not affect them.
            +     * This field is only used if
            +     * [SearchRequest.NaturalLanguageQueryUnderstandingSpec.FilterExtractionCondition][google.cloud.discoveryengine.v1beta.SearchRequest.NaturalLanguageQueryUnderstandingSpec.FilterExtractionCondition]
            +     * is set to
            +     * [FilterExtractionCondition.ENABLED][google.cloud.discoveryengine.v1beta.SearchRequest.NaturalLanguageQueryUnderstandingSpec.FilterExtractionCondition.ENABLED].
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.NaturalLanguageQueryUnderstandingSpec.ExtractedFilterBehavior extracted_filter_behavior = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for extractedFilterBehavior. + */ + int getExtractedFilterBehaviorValue(); + + /** + * + * + *
            +     * Optional. Controls behavior of how extracted filters are applied to the
            +     * search. The default behavior depends on the request. For single datastore
            +     * structured search, the default is `HARD_FILTER`. For multi-datastore
            +     * search, the default behavior is `SOFT_BOOST`.
            +     * Location-based filters are always applied as hard filters, and the
            +     * `SOFT_BOOST` setting will not affect them.
            +     * This field is only used if
            +     * [SearchRequest.NaturalLanguageQueryUnderstandingSpec.FilterExtractionCondition][google.cloud.discoveryengine.v1beta.SearchRequest.NaturalLanguageQueryUnderstandingSpec.FilterExtractionCondition]
            +     * is set to
            +     * [FilterExtractionCondition.ENABLED][google.cloud.discoveryengine.v1beta.SearchRequest.NaturalLanguageQueryUnderstandingSpec.FilterExtractionCondition.ENABLED].
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.NaturalLanguageQueryUnderstandingSpec.ExtractedFilterBehavior extracted_filter_behavior = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The extractedFilterBehavior. + */ + com.google.cloud.discoveryengine.v1beta.SearchRequest.NaturalLanguageQueryUnderstandingSpec + .ExtractedFilterBehavior + getExtractedFilterBehavior(); + + /** + * + * + *
            +     * Optional. Allowlist of fields that can be used for natural language
            +     * filter extraction. By default, if this is unspecified, all indexable
            +     * fields are eligible for natural language filter extraction (but are not
            +     * guaranteed to be used). If any fields are specified in
            +     * allowed_field_names, only the fields that are both marked as indexable in
            +     * the schema and specified in the allowlist will be eligible for natural
            +     * language filter extraction. Note: for multi-datastore search, this is not
            +     * yet supported, and will be ignored.
            +     * 
            + * + * repeated string allowed_field_names = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the allowedFieldNames. + */ + java.util.List getAllowedFieldNamesList(); + + /** + * + * + *
            +     * Optional. Allowlist of fields that can be used for natural language
            +     * filter extraction. By default, if this is unspecified, all indexable
            +     * fields are eligible for natural language filter extraction (but are not
            +     * guaranteed to be used). If any fields are specified in
            +     * allowed_field_names, only the fields that are both marked as indexable in
            +     * the schema and specified in the allowlist will be eligible for natural
            +     * language filter extraction. Note: for multi-datastore search, this is not
            +     * yet supported, and will be ignored.
            +     * 
            + * + * repeated string allowed_field_names = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The count of allowedFieldNames. + */ + int getAllowedFieldNamesCount(); + + /** + * + * + *
            +     * Optional. Allowlist of fields that can be used for natural language
            +     * filter extraction. By default, if this is unspecified, all indexable
            +     * fields are eligible for natural language filter extraction (but are not
            +     * guaranteed to be used). If any fields are specified in
            +     * allowed_field_names, only the fields that are both marked as indexable in
            +     * the schema and specified in the allowlist will be eligible for natural
            +     * language filter extraction. Note: for multi-datastore search, this is not
            +     * yet supported, and will be ignored.
            +     * 
            + * + * repeated string allowed_field_names = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the element to return. + * @return The allowedFieldNames at the given index. + */ + java.lang.String getAllowedFieldNames(int index); + + /** + * + * + *
            +     * Optional. Allowlist of fields that can be used for natural language
            +     * filter extraction. By default, if this is unspecified, all indexable
            +     * fields are eligible for natural language filter extraction (but are not
            +     * guaranteed to be used). If any fields are specified in
            +     * allowed_field_names, only the fields that are both marked as indexable in
            +     * the schema and specified in the allowlist will be eligible for natural
            +     * language filter extraction. Note: for multi-datastore search, this is not
            +     * yet supported, and will be ignored.
            +     * 
            + * + * repeated string allowed_field_names = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the value to return. + * @return The bytes of the allowedFieldNames at the given index. + */ + com.google.protobuf.ByteString getAllowedFieldNamesBytes(int index); } /** * * *
            -   * Specification for search as you type in search requests.
            +   * Specification to enable natural language understanding capabilities for
            +   * search requests.
                * 
            * - * Protobuf type {@code google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec} + * Protobuf type {@code + * google.cloud.discoveryengine.v1beta.SearchRequest.NaturalLanguageQueryUnderstandingSpec} */ - public static final class SearchAsYouTypeSpec extends com.google.protobuf.GeneratedMessage + public static final class NaturalLanguageQueryUnderstandingSpec + extends com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec) - SearchAsYouTypeSpecOrBuilder { + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.SearchRequest.NaturalLanguageQueryUnderstandingSpec) + NaturalLanguageQueryUnderstandingSpecOrBuilder { private static final long serialVersionUID = 0L; static { @@ -27806,51 +28411,55 @@ public static final class SearchAsYouTypeSpec extends com.google.protobuf.Genera /* minor= */ 33, /* patch= */ 2, /* suffix= */ "", - "SearchAsYouTypeSpec"); + "NaturalLanguageQueryUnderstandingSpec"); } - // Use SearchAsYouTypeSpec.newBuilder() to construct. - private SearchAsYouTypeSpec(com.google.protobuf.GeneratedMessage.Builder builder) { + // Use NaturalLanguageQueryUnderstandingSpec.newBuilder() to construct. + private NaturalLanguageQueryUnderstandingSpec( + com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } - private SearchAsYouTypeSpec() { - condition_ = 0; + private NaturalLanguageQueryUnderstandingSpec() { + filterExtractionCondition_ = 0; + geoSearchQueryDetectionFieldNames_ = com.google.protobuf.LazyStringArrayList.emptyList(); + extractedFilterBehavior_ = 0; + allowedFieldNames_ = com.google.protobuf.LazyStringArrayList.emptyList(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.discoveryengine.v1beta.SearchServiceProto - .internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_SearchAsYouTypeSpec_descriptor; + .internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_NaturalLanguageQueryUnderstandingSpec_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.discoveryengine.v1beta.SearchServiceProto - .internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_SearchAsYouTypeSpec_fieldAccessorTable + .internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_NaturalLanguageQueryUnderstandingSpec_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec.class, - com.google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec.Builder - .class); + com.google.cloud.discoveryengine.v1beta.SearchRequest + .NaturalLanguageQueryUnderstandingSpec.class, + com.google.cloud.discoveryengine.v1beta.SearchRequest + .NaturalLanguageQueryUnderstandingSpec.Builder.class); } /** * * *
            -     * Enum describing under which condition search as you type should occur.
            +     * Enum describing under which condition filter extraction should occur.
                  * 
            * * Protobuf enum {@code - * google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec.Condition} + * google.cloud.discoveryengine.v1beta.SearchRequest.NaturalLanguageQueryUnderstandingSpec.FilterExtractionCondition} */ - public enum Condition implements com.google.protobuf.ProtocolMessageEnum { + public enum FilterExtractionCondition implements com.google.protobuf.ProtocolMessageEnum { /** * * *
            -       * Server behavior defaults to
            -       * [Condition.DISABLED][google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec.Condition.DISABLED].
            +       * Server behavior defaults to `DISABLED`.
                    * 
            * * CONDITION_UNSPECIFIED = 0; @@ -27860,7 +28469,7 @@ public enum Condition implements com.google.protobuf.ProtocolMessageEnum { * * *
            -       * Disables Search As You Type.
            +       * Disables NL filter extraction.
                    * 
            * * DISABLED = 1; @@ -27870,23 +28479,12 @@ public enum Condition implements com.google.protobuf.ProtocolMessageEnum { * * *
            -       * Enables Search As You Type.
            +       * Enables NL filter extraction.
                    * 
            * * ENABLED = 2; */ ENABLED(2), - /** - * - * - *
            -       * Automatic switching between search-as-you-type and standard search
            -       * modes, ideal for single-API implementations (e.g., debouncing).
            -       * 
            - * - * AUTO = 3; - */ - AUTO(3), UNRECOGNIZED(-1), ; @@ -27897,15 +28495,14 @@ public enum Condition implements com.google.protobuf.ProtocolMessageEnum { /* minor= */ 33, /* patch= */ 2, /* suffix= */ "", - "Condition"); + "FilterExtractionCondition"); } /** * * *
            -       * Server behavior defaults to
            -       * [Condition.DISABLED][google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec.Condition.DISABLED].
            +       * Server behavior defaults to `DISABLED`.
                    * 
            * * CONDITION_UNSPECIFIED = 0; @@ -27916,7 +28513,7 @@ public enum Condition implements com.google.protobuf.ProtocolMessageEnum { * * *
            -       * Disables Search As You Type.
            +       * Disables NL filter extraction.
                    * 
            * * DISABLED = 1; @@ -27927,25 +28524,13 @@ public enum Condition implements com.google.protobuf.ProtocolMessageEnum { * * *
            -       * Enables Search As You Type.
            +       * Enables NL filter extraction.
                    * 
            * * ENABLED = 2; */ public static final int ENABLED_VALUE = 2; - /** - * - * - *
            -       * Automatic switching between search-as-you-type and standard search
            -       * modes, ideal for single-API implementations (e.g., debouncing).
            -       * 
            - * - * AUTO = 3; - */ - public static final int AUTO_VALUE = 3; - public final int getNumber() { if (this == UNRECOGNIZED) { throw new java.lang.IllegalArgumentException( @@ -27960,7 +28545,7 @@ public final int getNumber() { * @deprecated Use {@link #forNumber(int)} instead. */ @java.lang.Deprecated - public static Condition valueOf(int value) { + public static FilterExtractionCondition valueOf(int value) { return forNumber(value); } @@ -27968,7 +28553,7 @@ public static Condition valueOf(int value) { * @param value The numeric wire value of the corresponding enum entry. * @return The enum associated with the given numeric wire value. */ - public static Condition forNumber(int value) { + public static FilterExtractionCondition forNumber(int value) { switch (value) { case 0: return CONDITION_UNSPECIFIED; @@ -27976,23 +28561,23 @@ public static Condition forNumber(int value) { return DISABLED; case 2: return ENABLED; - case 3: - return AUTO; default: return null; } } - public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { return internalValueMap; } - private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public Condition findValueByNumber(int number) { - return Condition.forNumber(number); - } - }; + private static final com.google.protobuf.Internal.EnumLiteMap + internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public FilterExtractionCondition findValueByNumber(int number) { + return FilterExtractionCondition.forNumber(number); + } + }; public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { if (this == UNRECOGNIZED) { @@ -28007,15 +28592,16 @@ public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType } public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { - return com.google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec - .getDescriptor() + return com.google.cloud.discoveryengine.v1beta.SearchRequest + .NaturalLanguageQueryUnderstandingSpec.getDescriptor() .getEnumTypes() .get(0); } - private static final Condition[] VALUES = values(); + private static final FilterExtractionCondition[] VALUES = values(); - public static Condition valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + public static FilterExtractionCondition valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { if (desc.getType() != getDescriptor()) { throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); } @@ -28027,82 +28613,530 @@ public static Condition valueOf(com.google.protobuf.Descriptors.EnumValueDescrip private final int value; - private Condition(int value) { + private FilterExtractionCondition(int value) { this.value = value; } - // @@protoc_insertion_point(enum_scope:google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec.Condition) + // @@protoc_insertion_point(enum_scope:google.cloud.discoveryengine.v1beta.SearchRequest.NaturalLanguageQueryUnderstandingSpec.FilterExtractionCondition) } - public static final int CONDITION_FIELD_NUMBER = 1; - private int condition_ = 0; - /** * * *
            -     * The condition under which search as you type should occur.
            -     * Default to
            -     * [Condition.DISABLED][google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec.Condition.DISABLED].
            +     * Enum describing how extracted filters are applied to the search.
                  * 
            * - * - * .google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec.Condition condition = 1; - * - * - * @return The enum numeric value on the wire for condition. + * Protobuf enum {@code + * google.cloud.discoveryengine.v1beta.SearchRequest.NaturalLanguageQueryUnderstandingSpec.ExtractedFilterBehavior} */ - @java.lang.Override - public int getConditionValue() { - return condition_; - } + public enum ExtractedFilterBehavior implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
            +       * `EXTRACTED_FILTER_BEHAVIOR_UNSPECIFIED` will use the default behavior
            +       * for extracted filters. For single datastore search, the default is to
            +       * apply as hard filters. For multi-datastore search, the default is to
            +       * apply as soft boosts.
            +       * 
            + * + * EXTRACTED_FILTER_BEHAVIOR_UNSPECIFIED = 0; + */ + EXTRACTED_FILTER_BEHAVIOR_UNSPECIFIED(0), + /** + * + * + *
            +       * Applies all extracted filters as hard filters on the results. Results
            +       * that do not pass the extracted filters will not be returned in the
            +       * result set.
            +       * 
            + * + * HARD_FILTER = 1; + */ + HARD_FILTER(1), + /** + * + * + *
            +       * Applies all extracted filters as soft boosts. Results that pass the
            +       * filters will be boosted up to higher ranks in the result set.
            +       * 
            + * + * SOFT_BOOST = 2; + */ + SOFT_BOOST(2), + UNRECOGNIZED(-1), + ; - /** - * - * - *
            -     * The condition under which search as you type should occur.
            -     * Default to
            -     * [Condition.DISABLED][google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec.Condition.DISABLED].
            -     * 
            - * - * - * .google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec.Condition condition = 1; - * - * - * @return The condition. - */ - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec.Condition - getCondition() { - com.google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec.Condition result = - com.google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec.Condition - .forNumber(condition_); - return result == null - ? com.google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec.Condition - .UNRECOGNIZED - : result; - } + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ExtractedFilterBehavior"); + } - private byte memoizedIsInitialized = -1; + /** + * + * + *
            +       * `EXTRACTED_FILTER_BEHAVIOR_UNSPECIFIED` will use the default behavior
            +       * for extracted filters. For single datastore search, the default is to
            +       * apply as hard filters. For multi-datastore search, the default is to
            +       * apply as soft boosts.
            +       * 
            + * + * EXTRACTED_FILTER_BEHAVIOR_UNSPECIFIED = 0; + */ + public static final int EXTRACTED_FILTER_BEHAVIOR_UNSPECIFIED_VALUE = 0; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + /** + * + * + *
            +       * Applies all extracted filters as hard filters on the results. Results
            +       * that do not pass the extracted filters will not be returned in the
            +       * result set.
            +       * 
            + * + * HARD_FILTER = 1; + */ + public static final int HARD_FILTER_VALUE = 1; - memoizedIsInitialized = 1; - return true; - } + /** + * + * + *
            +       * Applies all extracted filters as soft boosts. Results that pass the
            +       * filters will be boosted up to higher ranks in the result set.
            +       * 
            + * + * SOFT_BOOST = 2; + */ + public static final int SOFT_BOOST_VALUE = 2; - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (condition_ - != com.google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec.Condition - .CONDITION_UNSPECIFIED - .getNumber()) { - output.writeEnum(1, condition_); + 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 ExtractedFilterBehavior 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 ExtractedFilterBehavior forNumber(int value) { + switch (value) { + case 0: + return EXTRACTED_FILTER_BEHAVIOR_UNSPECIFIED; + case 1: + return HARD_FILTER; + case 2: + return SOFT_BOOST; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap + internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public ExtractedFilterBehavior findValueByNumber(int number) { + return ExtractedFilterBehavior.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.SearchRequest + .NaturalLanguageQueryUnderstandingSpec.getDescriptor() + .getEnumTypes() + .get(1); + } + + private static final ExtractedFilterBehavior[] VALUES = values(); + + public static ExtractedFilterBehavior valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private ExtractedFilterBehavior(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.discoveryengine.v1beta.SearchRequest.NaturalLanguageQueryUnderstandingSpec.ExtractedFilterBehavior) + } + + public static final int FILTER_EXTRACTION_CONDITION_FIELD_NUMBER = 1; + private int filterExtractionCondition_ = 0; + + /** + * + * + *
            +     * The condition under which filter extraction should occur.
            +     * Server behavior defaults to `DISABLED`.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.NaturalLanguageQueryUnderstandingSpec.FilterExtractionCondition filter_extraction_condition = 1; + * + * + * @return The enum numeric value on the wire for filterExtractionCondition. + */ + @java.lang.Override + public int getFilterExtractionConditionValue() { + return filterExtractionCondition_; + } + + /** + * + * + *
            +     * The condition under which filter extraction should occur.
            +     * Server behavior defaults to `DISABLED`.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.NaturalLanguageQueryUnderstandingSpec.FilterExtractionCondition filter_extraction_condition = 1; + * + * + * @return The filterExtractionCondition. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.SearchRequest + .NaturalLanguageQueryUnderstandingSpec.FilterExtractionCondition + getFilterExtractionCondition() { + com.google.cloud.discoveryengine.v1beta.SearchRequest.NaturalLanguageQueryUnderstandingSpec + .FilterExtractionCondition + result = + com.google.cloud.discoveryengine.v1beta.SearchRequest + .NaturalLanguageQueryUnderstandingSpec.FilterExtractionCondition.forNumber( + filterExtractionCondition_); + return result == null + ? com.google.cloud.discoveryengine.v1beta.SearchRequest + .NaturalLanguageQueryUnderstandingSpec.FilterExtractionCondition.UNRECOGNIZED + : result; + } + + public static final int GEO_SEARCH_QUERY_DETECTION_FIELD_NAMES_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList geoSearchQueryDetectionFieldNames_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + /** + * + * + *
            +     * Field names used for location-based filtering, where geolocation filters
            +     * are detected in natural language search queries.
            +     * Only valid when the FilterExtractionCondition is set to `ENABLED`.
            +     * 
            + * + * repeated string geo_search_query_detection_field_names = 2; + * + * @return A list containing the geoSearchQueryDetectionFieldNames. + */ + public com.google.protobuf.ProtocolStringList getGeoSearchQueryDetectionFieldNamesList() { + return geoSearchQueryDetectionFieldNames_; + } + + /** + * + * + *
            +     * Field names used for location-based filtering, where geolocation filters
            +     * are detected in natural language search queries.
            +     * Only valid when the FilterExtractionCondition is set to `ENABLED`.
            +     * 
            + * + * repeated string geo_search_query_detection_field_names = 2; + * + * @return The count of geoSearchQueryDetectionFieldNames. + */ + public int getGeoSearchQueryDetectionFieldNamesCount() { + return geoSearchQueryDetectionFieldNames_.size(); + } + + /** + * + * + *
            +     * Field names used for location-based filtering, where geolocation filters
            +     * are detected in natural language search queries.
            +     * Only valid when the FilterExtractionCondition is set to `ENABLED`.
            +     * 
            + * + * repeated string geo_search_query_detection_field_names = 2; + * + * @param index The index of the element to return. + * @return The geoSearchQueryDetectionFieldNames at the given index. + */ + public java.lang.String getGeoSearchQueryDetectionFieldNames(int index) { + return geoSearchQueryDetectionFieldNames_.get(index); + } + + /** + * + * + *
            +     * Field names used for location-based filtering, where geolocation filters
            +     * are detected in natural language search queries.
            +     * Only valid when the FilterExtractionCondition is set to `ENABLED`.
            +     * 
            + * + * repeated string geo_search_query_detection_field_names = 2; + * + * @param index The index of the value to return. + * @return The bytes of the geoSearchQueryDetectionFieldNames at the given index. + */ + public com.google.protobuf.ByteString getGeoSearchQueryDetectionFieldNamesBytes(int index) { + return geoSearchQueryDetectionFieldNames_.getByteString(index); + } + + public static final int EXTRACTED_FILTER_BEHAVIOR_FIELD_NUMBER = 3; + private int extractedFilterBehavior_ = 0; + + /** + * + * + *
            +     * Optional. Controls behavior of how extracted filters are applied to the
            +     * search. The default behavior depends on the request. For single datastore
            +     * structured search, the default is `HARD_FILTER`. For multi-datastore
            +     * search, the default behavior is `SOFT_BOOST`.
            +     * Location-based filters are always applied as hard filters, and the
            +     * `SOFT_BOOST` setting will not affect them.
            +     * This field is only used if
            +     * [SearchRequest.NaturalLanguageQueryUnderstandingSpec.FilterExtractionCondition][google.cloud.discoveryengine.v1beta.SearchRequest.NaturalLanguageQueryUnderstandingSpec.FilterExtractionCondition]
            +     * is set to
            +     * [FilterExtractionCondition.ENABLED][google.cloud.discoveryengine.v1beta.SearchRequest.NaturalLanguageQueryUnderstandingSpec.FilterExtractionCondition.ENABLED].
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.NaturalLanguageQueryUnderstandingSpec.ExtractedFilterBehavior extracted_filter_behavior = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for extractedFilterBehavior. + */ + @java.lang.Override + public int getExtractedFilterBehaviorValue() { + return extractedFilterBehavior_; + } + + /** + * + * + *
            +     * Optional. Controls behavior of how extracted filters are applied to the
            +     * search. The default behavior depends on the request. For single datastore
            +     * structured search, the default is `HARD_FILTER`. For multi-datastore
            +     * search, the default behavior is `SOFT_BOOST`.
            +     * Location-based filters are always applied as hard filters, and the
            +     * `SOFT_BOOST` setting will not affect them.
            +     * This field is only used if
            +     * [SearchRequest.NaturalLanguageQueryUnderstandingSpec.FilterExtractionCondition][google.cloud.discoveryengine.v1beta.SearchRequest.NaturalLanguageQueryUnderstandingSpec.FilterExtractionCondition]
            +     * is set to
            +     * [FilterExtractionCondition.ENABLED][google.cloud.discoveryengine.v1beta.SearchRequest.NaturalLanguageQueryUnderstandingSpec.FilterExtractionCondition.ENABLED].
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.NaturalLanguageQueryUnderstandingSpec.ExtractedFilterBehavior extracted_filter_behavior = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The extractedFilterBehavior. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.SearchRequest + .NaturalLanguageQueryUnderstandingSpec.ExtractedFilterBehavior + getExtractedFilterBehavior() { + com.google.cloud.discoveryengine.v1beta.SearchRequest.NaturalLanguageQueryUnderstandingSpec + .ExtractedFilterBehavior + result = + com.google.cloud.discoveryengine.v1beta.SearchRequest + .NaturalLanguageQueryUnderstandingSpec.ExtractedFilterBehavior.forNumber( + extractedFilterBehavior_); + return result == null + ? com.google.cloud.discoveryengine.v1beta.SearchRequest + .NaturalLanguageQueryUnderstandingSpec.ExtractedFilterBehavior.UNRECOGNIZED + : result; + } + + public static final int ALLOWED_FIELD_NAMES_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList allowedFieldNames_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + /** + * + * + *
            +     * Optional. Allowlist of fields that can be used for natural language
            +     * filter extraction. By default, if this is unspecified, all indexable
            +     * fields are eligible for natural language filter extraction (but are not
            +     * guaranteed to be used). If any fields are specified in
            +     * allowed_field_names, only the fields that are both marked as indexable in
            +     * the schema and specified in the allowlist will be eligible for natural
            +     * language filter extraction. Note: for multi-datastore search, this is not
            +     * yet supported, and will be ignored.
            +     * 
            + * + * repeated string allowed_field_names = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the allowedFieldNames. + */ + public com.google.protobuf.ProtocolStringList getAllowedFieldNamesList() { + return allowedFieldNames_; + } + + /** + * + * + *
            +     * Optional. Allowlist of fields that can be used for natural language
            +     * filter extraction. By default, if this is unspecified, all indexable
            +     * fields are eligible for natural language filter extraction (but are not
            +     * guaranteed to be used). If any fields are specified in
            +     * allowed_field_names, only the fields that are both marked as indexable in
            +     * the schema and specified in the allowlist will be eligible for natural
            +     * language filter extraction. Note: for multi-datastore search, this is not
            +     * yet supported, and will be ignored.
            +     * 
            + * + * repeated string allowed_field_names = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The count of allowedFieldNames. + */ + public int getAllowedFieldNamesCount() { + return allowedFieldNames_.size(); + } + + /** + * + * + *
            +     * Optional. Allowlist of fields that can be used for natural language
            +     * filter extraction. By default, if this is unspecified, all indexable
            +     * fields are eligible for natural language filter extraction (but are not
            +     * guaranteed to be used). If any fields are specified in
            +     * allowed_field_names, only the fields that are both marked as indexable in
            +     * the schema and specified in the allowlist will be eligible for natural
            +     * language filter extraction. Note: for multi-datastore search, this is not
            +     * yet supported, and will be ignored.
            +     * 
            + * + * repeated string allowed_field_names = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the element to return. + * @return The allowedFieldNames at the given index. + */ + public java.lang.String getAllowedFieldNames(int index) { + return allowedFieldNames_.get(index); + } + + /** + * + * + *
            +     * Optional. Allowlist of fields that can be used for natural language
            +     * filter extraction. By default, if this is unspecified, all indexable
            +     * fields are eligible for natural language filter extraction (but are not
            +     * guaranteed to be used). If any fields are specified in
            +     * allowed_field_names, only the fields that are both marked as indexable in
            +     * the schema and specified in the allowlist will be eligible for natural
            +     * language filter extraction. Note: for multi-datastore search, this is not
            +     * yet supported, and will be ignored.
            +     * 
            + * + * repeated string allowed_field_names = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the value to return. + * @return The bytes of the allowedFieldNames at the given index. + */ + public com.google.protobuf.ByteString getAllowedFieldNamesBytes(int index) { + return allowedFieldNames_.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 (filterExtractionCondition_ + != com.google.cloud.discoveryengine.v1beta.SearchRequest + .NaturalLanguageQueryUnderstandingSpec.FilterExtractionCondition.CONDITION_UNSPECIFIED + .getNumber()) { + output.writeEnum(1, filterExtractionCondition_); + } + for (int i = 0; i < geoSearchQueryDetectionFieldNames_.size(); i++) { + com.google.protobuf.GeneratedMessage.writeString( + output, 2, geoSearchQueryDetectionFieldNames_.getRaw(i)); + } + if (extractedFilterBehavior_ + != com.google.cloud.discoveryengine.v1beta.SearchRequest + .NaturalLanguageQueryUnderstandingSpec.ExtractedFilterBehavior + .EXTRACTED_FILTER_BEHAVIOR_UNSPECIFIED + .getNumber()) { + output.writeEnum(3, extractedFilterBehavior_); + } + for (int i = 0; i < allowedFieldNames_.size(); i++) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, allowedFieldNames_.getRaw(i)); } getUnknownFields().writeTo(output); } @@ -28113,11 +29147,35 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (condition_ - != com.google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec.Condition - .CONDITION_UNSPECIFIED + if (filterExtractionCondition_ + != com.google.cloud.discoveryengine.v1beta.SearchRequest + .NaturalLanguageQueryUnderstandingSpec.FilterExtractionCondition.CONDITION_UNSPECIFIED .getNumber()) { - size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, condition_); + size += + com.google.protobuf.CodedOutputStream.computeEnumSize(1, filterExtractionCondition_); + } + { + int dataSize = 0; + for (int i = 0; i < geoSearchQueryDetectionFieldNames_.size(); i++) { + dataSize += computeStringSizeNoTag(geoSearchQueryDetectionFieldNames_.getRaw(i)); + } + size += dataSize; + size += 1 * getGeoSearchQueryDetectionFieldNamesList().size(); + } + if (extractedFilterBehavior_ + != com.google.cloud.discoveryengine.v1beta.SearchRequest + .NaturalLanguageQueryUnderstandingSpec.ExtractedFilterBehavior + .EXTRACTED_FILTER_BEHAVIOR_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(3, extractedFilterBehavior_); + } + { + int dataSize = 0; + for (int i = 0; i < allowedFieldNames_.size(); i++) { + dataSize += computeStringSizeNoTag(allowedFieldNames_.getRaw(i)); + } + size += dataSize; + size += 1 * getAllowedFieldNamesList().size(); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -28130,13 +29188,22 @@ public boolean equals(final java.lang.Object obj) { return true; } if (!(obj - instanceof com.google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec)) { + instanceof + com.google.cloud.discoveryengine.v1beta.SearchRequest + .NaturalLanguageQueryUnderstandingSpec)) { return super.equals(obj); } - com.google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec other = - (com.google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec) obj; + com.google.cloud.discoveryengine.v1beta.SearchRequest.NaturalLanguageQueryUnderstandingSpec + other = + (com.google.cloud.discoveryengine.v1beta.SearchRequest + .NaturalLanguageQueryUnderstandingSpec) + obj; - if (condition_ != other.condition_) return false; + if (filterExtractionCondition_ != other.filterExtractionCondition_) return false; + if (!getGeoSearchQueryDetectionFieldNamesList() + .equals(other.getGeoSearchQueryDetectionFieldNamesList())) return false; + if (extractedFilterBehavior_ != other.extractedFilterBehavior_) return false; + if (!getAllowedFieldNamesList().equals(other.getAllowedFieldNamesList())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -28148,33 +29215,47 @@ public int hashCode() { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + CONDITION_FIELD_NUMBER; - hash = (53 * hash) + condition_; + hash = (37 * hash) + FILTER_EXTRACTION_CONDITION_FIELD_NUMBER; + hash = (53 * hash) + filterExtractionCondition_; + if (getGeoSearchQueryDetectionFieldNamesCount() > 0) { + hash = (37 * hash) + GEO_SEARCH_QUERY_DETECTION_FIELD_NAMES_FIELD_NUMBER; + hash = (53 * hash) + getGeoSearchQueryDetectionFieldNamesList().hashCode(); + } + hash = (37 * hash) + EXTRACTED_FILTER_BEHAVIOR_FIELD_NUMBER; + hash = (53 * hash) + extractedFilterBehavior_; + if (getAllowedFieldNamesCount() > 0) { + hash = (37 * hash) + ALLOWED_FIELD_NAMES_FIELD_NUMBER; + hash = (53 * hash) + getAllowedFieldNamesList().hashCode(); + } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } - public static com.google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec + public static com.google.cloud.discoveryengine.v1beta.SearchRequest + .NaturalLanguageQueryUnderstandingSpec parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec + public static com.google.cloud.discoveryengine.v1beta.SearchRequest + .NaturalLanguageQueryUnderstandingSpec 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.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec + public static com.google.cloud.discoveryengine.v1beta.SearchRequest + .NaturalLanguageQueryUnderstandingSpec parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec + public static com.google.cloud.discoveryengine.v1beta.SearchRequest + .NaturalLanguageQueryUnderstandingSpec parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) @@ -28182,23 +29263,27 @@ public int hashCode() { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec + public static com.google.cloud.discoveryengine.v1beta.SearchRequest + .NaturalLanguageQueryUnderstandingSpec parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec + public static com.google.cloud.discoveryengine.v1beta.SearchRequest + .NaturalLanguageQueryUnderstandingSpec parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec + public static com.google.cloud.discoveryengine.v1beta.SearchRequest + .NaturalLanguageQueryUnderstandingSpec parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } - public static com.google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec + public static com.google.cloud.discoveryengine.v1beta.SearchRequest + .NaturalLanguageQueryUnderstandingSpec parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -28206,12 +29291,14 @@ public int hashCode() { PARSER, input, extensionRegistry); } - public static com.google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec + public static com.google.cloud.discoveryengine.v1beta.SearchRequest + .NaturalLanguageQueryUnderstandingSpec parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } - public static com.google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec + public static com.google.cloud.discoveryengine.v1beta.SearchRequest + .NaturalLanguageQueryUnderstandingSpec parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -28219,12 +29306,14 @@ public int hashCode() { PARSER, input, extensionRegistry); } - public static com.google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec + public static com.google.cloud.discoveryengine.v1beta.SearchRequest + .NaturalLanguageQueryUnderstandingSpec parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } - public static com.google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec + public static com.google.cloud.discoveryengine.v1beta.SearchRequest + .NaturalLanguageQueryUnderstandingSpec parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) @@ -28243,7 +29332,8 @@ public static Builder newBuilder() { } public static Builder newBuilder( - com.google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec prototype) { + com.google.cloud.discoveryengine.v1beta.SearchRequest.NaturalLanguageQueryUnderstandingSpec + prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @@ -28262,33 +29352,37 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.Builder * * *
            -     * Specification for search as you type in search requests.
            +     * Specification to enable natural language understanding capabilities for
            +     * search requests.
                  * 
            * - * Protobuf type {@code google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec} + * Protobuf type {@code + * google.cloud.discoveryengine.v1beta.SearchRequest.NaturalLanguageQueryUnderstandingSpec} */ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec) - com.google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpecOrBuilder { + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.SearchRequest.NaturalLanguageQueryUnderstandingSpec) + com.google.cloud.discoveryengine.v1beta.SearchRequest + .NaturalLanguageQueryUnderstandingSpecOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.discoveryengine.v1beta.SearchServiceProto - .internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_SearchAsYouTypeSpec_descriptor; + .internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_NaturalLanguageQueryUnderstandingSpec_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.discoveryengine.v1beta.SearchServiceProto - .internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_SearchAsYouTypeSpec_fieldAccessorTable + .internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_NaturalLanguageQueryUnderstandingSpec_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec.class, - com.google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec.Builder - .class); + com.google.cloud.discoveryengine.v1beta.SearchRequest + .NaturalLanguageQueryUnderstandingSpec.class, + com.google.cloud.discoveryengine.v1beta.SearchRequest + .NaturalLanguageQueryUnderstandingSpec.Builder.class); } // Construct using - // com.google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec.newBuilder() + // com.google.cloud.discoveryengine.v1beta.SearchRequest.NaturalLanguageQueryUnderstandingSpec.newBuilder() private Builder() {} private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { @@ -28299,27 +29393,33 @@ private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { public Builder clear() { super.clear(); bitField0_ = 0; - condition_ = 0; + filterExtractionCondition_ = 0; + geoSearchQueryDetectionFieldNames_ = com.google.protobuf.LazyStringArrayList.emptyList(); + extractedFilterBehavior_ = 0; + allowedFieldNames_ = com.google.protobuf.LazyStringArrayList.emptyList(); return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.cloud.discoveryengine.v1beta.SearchServiceProto - .internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_SearchAsYouTypeSpec_descriptor; + .internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_NaturalLanguageQueryUnderstandingSpec_descriptor; } @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec + public com.google.cloud.discoveryengine.v1beta.SearchRequest + .NaturalLanguageQueryUnderstandingSpec getDefaultInstanceForType() { - return com.google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec - .getDefaultInstance(); + return com.google.cloud.discoveryengine.v1beta.SearchRequest + .NaturalLanguageQueryUnderstandingSpec.getDefaultInstance(); } @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec build() { - com.google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec result = - buildPartial(); + public com.google.cloud.discoveryengine.v1beta.SearchRequest + .NaturalLanguageQueryUnderstandingSpec + build() { + com.google.cloud.discoveryengine.v1beta.SearchRequest.NaturalLanguageQueryUnderstandingSpec + result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } @@ -28327,10 +29427,13 @@ public com.google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec } @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec + public com.google.cloud.discoveryengine.v1beta.SearchRequest + .NaturalLanguageQueryUnderstandingSpec buildPartial() { - com.google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec result = - new com.google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec(this); + com.google.cloud.discoveryengine.v1beta.SearchRequest.NaturalLanguageQueryUnderstandingSpec + result = + new com.google.cloud.discoveryengine.v1beta.SearchRequest + .NaturalLanguageQueryUnderstandingSpec(this); if (bitField0_ != 0) { buildPartial0(result); } @@ -28339,19 +29442,36 @@ public com.google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec } private void buildPartial0( - com.google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec result) { + com.google.cloud.discoveryengine.v1beta.SearchRequest + .NaturalLanguageQueryUnderstandingSpec + result) { int from_bitField0_ = bitField0_; if (((from_bitField0_ & 0x00000001) != 0)) { - result.condition_ = condition_; + result.filterExtractionCondition_ = filterExtractionCondition_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + geoSearchQueryDetectionFieldNames_.makeImmutable(); + result.geoSearchQueryDetectionFieldNames_ = geoSearchQueryDetectionFieldNames_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.extractedFilterBehavior_ = extractedFilterBehavior_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + allowedFieldNames_.makeImmutable(); + result.allowedFieldNames_ = allowedFieldNames_; } } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other - instanceof com.google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec) { + instanceof + com.google.cloud.discoveryengine.v1beta.SearchRequest + .NaturalLanguageQueryUnderstandingSpec) { return mergeFrom( - (com.google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec) other); + (com.google.cloud.discoveryengine.v1beta.SearchRequest + .NaturalLanguageQueryUnderstandingSpec) + other); } else { super.mergeFrom(other); return this; @@ -28359,12 +29479,37 @@ public Builder mergeFrom(com.google.protobuf.Message other) { } public Builder mergeFrom( - com.google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec other) { + com.google.cloud.discoveryengine.v1beta.SearchRequest + .NaturalLanguageQueryUnderstandingSpec + other) { if (other - == com.google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec - .getDefaultInstance()) return this; - if (other.condition_ != 0) { - setConditionValue(other.getConditionValue()); + == com.google.cloud.discoveryengine.v1beta.SearchRequest + .NaturalLanguageQueryUnderstandingSpec.getDefaultInstance()) return this; + if (other.filterExtractionCondition_ != 0) { + setFilterExtractionConditionValue(other.getFilterExtractionConditionValue()); + } + if (!other.geoSearchQueryDetectionFieldNames_.isEmpty()) { + if (geoSearchQueryDetectionFieldNames_.isEmpty()) { + geoSearchQueryDetectionFieldNames_ = other.geoSearchQueryDetectionFieldNames_; + bitField0_ |= 0x00000002; + } else { + ensureGeoSearchQueryDetectionFieldNamesIsMutable(); + geoSearchQueryDetectionFieldNames_.addAll(other.geoSearchQueryDetectionFieldNames_); + } + onChanged(); + } + if (other.extractedFilterBehavior_ != 0) { + setExtractedFilterBehaviorValue(other.getExtractedFilterBehaviorValue()); + } + if (!other.allowedFieldNames_.isEmpty()) { + if (allowedFieldNames_.isEmpty()) { + allowedFieldNames_ = other.allowedFieldNames_; + bitField0_ |= 0x00000008; + } else { + ensureAllowedFieldNamesIsMutable(); + allowedFieldNames_.addAll(other.allowedFieldNames_); + } + onChanged(); } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); @@ -28394,16 +29539,36 @@ public Builder mergeFrom( break; case 8: { - condition_ = input.readEnum(); + filterExtractionCondition_ = input.readEnum(); bitField0_ |= 0x00000001; break; } // case 8 - default: + case 18: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; + java.lang.String s = input.readStringRequireUtf8(); + ensureGeoSearchQueryDetectionFieldNamesIsMutable(); + geoSearchQueryDetectionFieldNames_.add(s); + break; + } // case 18 + case 24: + { + extractedFilterBehavior_ = input.readEnum(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureAllowedFieldNamesIsMutable(); + allowedFieldNames_.add(s); + break; + } // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; } // default: } // switch (tag) } // while (!done) @@ -28417,46 +29582,44 @@ public Builder mergeFrom( private int bitField0_; - private int condition_ = 0; + private int filterExtractionCondition_ = 0; /** * * *
            -       * The condition under which search as you type should occur.
            -       * Default to
            -       * [Condition.DISABLED][google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec.Condition.DISABLED].
            +       * The condition under which filter extraction should occur.
            +       * Server behavior defaults to `DISABLED`.
                    * 
            * * - * .google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec.Condition condition = 1; + * .google.cloud.discoveryengine.v1beta.SearchRequest.NaturalLanguageQueryUnderstandingSpec.FilterExtractionCondition filter_extraction_condition = 1; * * - * @return The enum numeric value on the wire for condition. + * @return The enum numeric value on the wire for filterExtractionCondition. */ @java.lang.Override - public int getConditionValue() { - return condition_; + public int getFilterExtractionConditionValue() { + return filterExtractionCondition_; } /** * * *
            -       * The condition under which search as you type should occur.
            -       * Default to
            -       * [Condition.DISABLED][google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec.Condition.DISABLED].
            +       * The condition under which filter extraction should occur.
            +       * Server behavior defaults to `DISABLED`.
                    * 
            * * - * .google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec.Condition condition = 1; + * .google.cloud.discoveryengine.v1beta.SearchRequest.NaturalLanguageQueryUnderstandingSpec.FilterExtractionCondition filter_extraction_condition = 1; * * - * @param value The enum numeric value on the wire for condition to set. + * @param value The enum numeric value on the wire for filterExtractionCondition to set. * @return This builder for chaining. */ - public Builder setConditionValue(int value) { - condition_ = value; + public Builder setFilterExtractionConditionValue(int value) { + filterExtractionCondition_ = value; bitField0_ |= 0x00000001; onChanged(); return this; @@ -28466,26 +29629,29 @@ public Builder setConditionValue(int value) { * * *
            -       * The condition under which search as you type should occur.
            -       * Default to
            -       * [Condition.DISABLED][google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec.Condition.DISABLED].
            +       * The condition under which filter extraction should occur.
            +       * Server behavior defaults to `DISABLED`.
                    * 
            * * - * .google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec.Condition condition = 1; + * .google.cloud.discoveryengine.v1beta.SearchRequest.NaturalLanguageQueryUnderstandingSpec.FilterExtractionCondition filter_extraction_condition = 1; * * - * @return The condition. + * @return The filterExtractionCondition. */ @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec.Condition - getCondition() { - com.google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec.Condition result = - com.google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec.Condition - .forNumber(condition_); + public com.google.cloud.discoveryengine.v1beta.SearchRequest + .NaturalLanguageQueryUnderstandingSpec.FilterExtractionCondition + getFilterExtractionCondition() { + com.google.cloud.discoveryengine.v1beta.SearchRequest.NaturalLanguageQueryUnderstandingSpec + .FilterExtractionCondition + result = + com.google.cloud.discoveryengine.v1beta.SearchRequest + .NaturalLanguageQueryUnderstandingSpec.FilterExtractionCondition.forNumber( + filterExtractionCondition_); return result == null - ? com.google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec.Condition - .UNRECOGNIZED + ? com.google.cloud.discoveryengine.v1beta.SearchRequest + .NaturalLanguageQueryUnderstandingSpec.FilterExtractionCondition.UNRECOGNIZED : result; } @@ -28493,26 +29659,26 @@ public Builder setConditionValue(int value) { * * *
            -       * The condition under which search as you type should occur.
            -       * Default to
            -       * [Condition.DISABLED][google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec.Condition.DISABLED].
            +       * The condition under which filter extraction should occur.
            +       * Server behavior defaults to `DISABLED`.
                    * 
            * * - * .google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec.Condition condition = 1; + * .google.cloud.discoveryengine.v1beta.SearchRequest.NaturalLanguageQueryUnderstandingSpec.FilterExtractionCondition filter_extraction_condition = 1; * * - * @param value The condition to set. + * @param value The filterExtractionCondition to set. * @return This builder for chaining. */ - public Builder setCondition( - com.google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec.Condition + public Builder setFilterExtractionCondition( + com.google.cloud.discoveryengine.v1beta.SearchRequest + .NaturalLanguageQueryUnderstandingSpec.FilterExtractionCondition value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000001; - condition_ = value.getNumber(); + filterExtractionCondition_ = value.getNumber(); onChanged(); return this; } @@ -28521,535 +29687,1174 @@ public Builder setCondition( * * *
            -       * The condition under which search as you type should occur.
            -       * Default to
            -       * [Condition.DISABLED][google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec.Condition.DISABLED].
            +       * The condition under which filter extraction should occur.
            +       * Server behavior defaults to `DISABLED`.
                    * 
            * * - * .google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec.Condition condition = 1; + * .google.cloud.discoveryengine.v1beta.SearchRequest.NaturalLanguageQueryUnderstandingSpec.FilterExtractionCondition filter_extraction_condition = 1; * * * @return This builder for chaining. */ - public Builder clearCondition() { + public Builder clearFilterExtractionCondition() { bitField0_ = (bitField0_ & ~0x00000001); - condition_ = 0; + filterExtractionCondition_ = 0; onChanged(); return this; } - // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec) - } - - // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec) - private static final com.google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = - new com.google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec(); - } - - public static com.google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec - getDefaultInstance() { - return DEFAULT_INSTANCE; - } + private com.google.protobuf.LazyStringArrayList geoSearchQueryDetectionFieldNames_ = + com.google.protobuf.LazyStringArrayList.emptyList(); - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public SearchAsYouTypeSpec parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException() - .setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; + private void ensureGeoSearchQueryDetectionFieldNamesIsMutable() { + if (!geoSearchQueryDetectionFieldNames_.isModifiable()) { + geoSearchQueryDetectionFieldNames_ = + new com.google.protobuf.LazyStringArrayList(geoSearchQueryDetectionFieldNames_); + } + bitField0_ |= 0x00000002; + } - public static com.google.protobuf.Parser parser() { - return PARSER; - } + /** + * + * + *
            +       * Field names used for location-based filtering, where geolocation filters
            +       * are detected in natural language search queries.
            +       * Only valid when the FilterExtractionCondition is set to `ENABLED`.
            +       * 
            + * + * repeated string geo_search_query_detection_field_names = 2; + * + * @return A list containing the geoSearchQueryDetectionFieldNames. + */ + public com.google.protobuf.ProtocolStringList getGeoSearchQueryDetectionFieldNamesList() { + geoSearchQueryDetectionFieldNames_.makeImmutable(); + return geoSearchQueryDetectionFieldNames_; + } - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + /** + * + * + *
            +       * Field names used for location-based filtering, where geolocation filters
            +       * are detected in natural language search queries.
            +       * Only valid when the FilterExtractionCondition is set to `ENABLED`.
            +       * 
            + * + * repeated string geo_search_query_detection_field_names = 2; + * + * @return The count of geoSearchQueryDetectionFieldNames. + */ + public int getGeoSearchQueryDetectionFieldNamesCount() { + return geoSearchQueryDetectionFieldNames_.size(); + } - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - } + /** + * + * + *
            +       * Field names used for location-based filtering, where geolocation filters
            +       * are detected in natural language search queries.
            +       * Only valid when the FilterExtractionCondition is set to `ENABLED`.
            +       * 
            + * + * repeated string geo_search_query_detection_field_names = 2; + * + * @param index The index of the element to return. + * @return The geoSearchQueryDetectionFieldNames at the given index. + */ + public java.lang.String getGeoSearchQueryDetectionFieldNames(int index) { + return geoSearchQueryDetectionFieldNames_.get(index); + } - public interface SessionSpecOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.SearchRequest.SessionSpec) - com.google.protobuf.MessageOrBuilder { + /** + * + * + *
            +       * Field names used for location-based filtering, where geolocation filters
            +       * are detected in natural language search queries.
            +       * Only valid when the FilterExtractionCondition is set to `ENABLED`.
            +       * 
            + * + * repeated string geo_search_query_detection_field_names = 2; + * + * @param index The index of the value to return. + * @return The bytes of the geoSearchQueryDetectionFieldNames at the given index. + */ + public com.google.protobuf.ByteString getGeoSearchQueryDetectionFieldNamesBytes(int index) { + return geoSearchQueryDetectionFieldNames_.getByteString(index); + } - /** - * - * - *
            -     * If set, the search result gets stored to the "turn" specified by this
            -     * query ID.
            -     *
            -     * Example: Let's say the session looks like this:
            -     * session {
            -     * name: ".../sessions/xxx"
            -     * turns {
            -     * query { text: "What is foo?" query_id: ".../questions/yyy" }
            -     * answer: "Foo is ..."
            -     * }
            -     * turns {
            -     * query { text: "How about bar then?" query_id: ".../questions/zzz" }
            -     * }
            -     * }
            -     *
            -     * The user can call /search API with a request like this:
            -     *
            -     * session: ".../sessions/xxx"
            -     * session_spec { query_id: ".../questions/zzz" }
            -     *
            -     * Then, the API stores the search result, associated with the last turn.
            -     * The stored search result can be used by a subsequent /answer API call
            -     * (with the session ID and the query ID specified). Also, it is possible
            -     * to call /search and /answer in parallel with the same session ID & query
            -     * ID.
            -     * 
            - * - * string query_id = 1; - * - * @return The queryId. - */ - java.lang.String getQueryId(); + /** + * + * + *
            +       * Field names used for location-based filtering, where geolocation filters
            +       * are detected in natural language search queries.
            +       * Only valid when the FilterExtractionCondition is set to `ENABLED`.
            +       * 
            + * + * repeated string geo_search_query_detection_field_names = 2; + * + * @param index The index to set the value at. + * @param value The geoSearchQueryDetectionFieldNames to set. + * @return This builder for chaining. + */ + public Builder setGeoSearchQueryDetectionFieldNames(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureGeoSearchQueryDetectionFieldNamesIsMutable(); + geoSearchQueryDetectionFieldNames_.set(index, value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } - /** - * - * - *
            -     * If set, the search result gets stored to the "turn" specified by this
            -     * query ID.
            -     *
            -     * Example: Let's say the session looks like this:
            -     * session {
            -     * name: ".../sessions/xxx"
            -     * turns {
            -     * query { text: "What is foo?" query_id: ".../questions/yyy" }
            -     * answer: "Foo is ..."
            -     * }
            -     * turns {
            -     * query { text: "How about bar then?" query_id: ".../questions/zzz" }
            -     * }
            -     * }
            -     *
            -     * The user can call /search API with a request like this:
            -     *
            -     * session: ".../sessions/xxx"
            -     * session_spec { query_id: ".../questions/zzz" }
            -     *
            -     * Then, the API stores the search result, associated with the last turn.
            -     * The stored search result can be used by a subsequent /answer API call
            -     * (with the session ID and the query ID specified). Also, it is possible
            -     * to call /search and /answer in parallel with the same session ID & query
            -     * ID.
            -     * 
            - * - * string query_id = 1; - * - * @return The bytes for queryId. - */ - com.google.protobuf.ByteString getQueryIdBytes(); + /** + * + * + *
            +       * Field names used for location-based filtering, where geolocation filters
            +       * are detected in natural language search queries.
            +       * Only valid when the FilterExtractionCondition is set to `ENABLED`.
            +       * 
            + * + * repeated string geo_search_query_detection_field_names = 2; + * + * @param value The geoSearchQueryDetectionFieldNames to add. + * @return This builder for chaining. + */ + public Builder addGeoSearchQueryDetectionFieldNames(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureGeoSearchQueryDetectionFieldNamesIsMutable(); + geoSearchQueryDetectionFieldNames_.add(value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } - /** - * - * - *
            -     * The number of top search results to persist. The persisted search results
            -     * can be used for the subsequent /answer api call.
            -     *
            -     * This field is simliar to the `summary_result_count` field in
            -     * [SearchRequest.ContentSearchSpec.SummarySpec.summary_result_count][google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec.summary_result_count].
            -     *
            -     * At most 10 results for documents mode, or 50 for chunks mode.
            -     * 
            - * - * optional int32 search_result_persistence_count = 2; - * - * @return Whether the searchResultPersistenceCount field is set. - */ - boolean hasSearchResultPersistenceCount(); + /** + * + * + *
            +       * Field names used for location-based filtering, where geolocation filters
            +       * are detected in natural language search queries.
            +       * Only valid when the FilterExtractionCondition is set to `ENABLED`.
            +       * 
            + * + * repeated string geo_search_query_detection_field_names = 2; + * + * @param values The geoSearchQueryDetectionFieldNames to add. + * @return This builder for chaining. + */ + public Builder addAllGeoSearchQueryDetectionFieldNames( + java.lang.Iterable values) { + ensureGeoSearchQueryDetectionFieldNamesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, geoSearchQueryDetectionFieldNames_); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } - /** - * - * - *
            -     * The number of top search results to persist. The persisted search results
            -     * can be used for the subsequent /answer api call.
            -     *
            -     * This field is simliar to the `summary_result_count` field in
            -     * [SearchRequest.ContentSearchSpec.SummarySpec.summary_result_count][google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec.summary_result_count].
            -     *
            -     * At most 10 results for documents mode, or 50 for chunks mode.
            -     * 
            - * - * optional int32 search_result_persistence_count = 2; - * - * @return The searchResultPersistenceCount. - */ - int getSearchResultPersistenceCount(); - } + /** + * + * + *
            +       * Field names used for location-based filtering, where geolocation filters
            +       * are detected in natural language search queries.
            +       * Only valid when the FilterExtractionCondition is set to `ENABLED`.
            +       * 
            + * + * repeated string geo_search_query_detection_field_names = 2; + * + * @return This builder for chaining. + */ + public Builder clearGeoSearchQueryDetectionFieldNames() { + geoSearchQueryDetectionFieldNames_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + ; + onChanged(); + return this; + } - /** - * - * - *
            -   * Session specification.
            -   *
            -   * Multi-turn Search feature is currently at private GA stage. Please use
            -   * v1alpha or v1beta version instead before we launch this feature to public
            -   * GA. Or ask for allowlisting through Google Support team.
            -   * 
            - * - * Protobuf type {@code google.cloud.discoveryengine.v1beta.SearchRequest.SessionSpec} - */ - public static final class SessionSpec extends com.google.protobuf.GeneratedMessage - implements - // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.SearchRequest.SessionSpec) - SessionSpecOrBuilder { - private static final long serialVersionUID = 0L; + /** + * + * + *
            +       * Field names used for location-based filtering, where geolocation filters
            +       * are detected in natural language search queries.
            +       * Only valid when the FilterExtractionCondition is set to `ENABLED`.
            +       * 
            + * + * repeated string geo_search_query_detection_field_names = 2; + * + * @param value The bytes of the geoSearchQueryDetectionFieldNames to add. + * @return This builder for chaining. + */ + public Builder addGeoSearchQueryDetectionFieldNamesBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureGeoSearchQueryDetectionFieldNamesIsMutable(); + geoSearchQueryDetectionFieldNames_.add(value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 2, - /* suffix= */ "", - "SessionSpec"); - } + private int extractedFilterBehavior_ = 0; - // Use SessionSpec.newBuilder() to construct. - private SessionSpec(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } + /** + * + * + *
            +       * Optional. Controls behavior of how extracted filters are applied to the
            +       * search. The default behavior depends on the request. For single datastore
            +       * structured search, the default is `HARD_FILTER`. For multi-datastore
            +       * search, the default behavior is `SOFT_BOOST`.
            +       * Location-based filters are always applied as hard filters, and the
            +       * `SOFT_BOOST` setting will not affect them.
            +       * This field is only used if
            +       * [SearchRequest.NaturalLanguageQueryUnderstandingSpec.FilterExtractionCondition][google.cloud.discoveryengine.v1beta.SearchRequest.NaturalLanguageQueryUnderstandingSpec.FilterExtractionCondition]
            +       * is set to
            +       * [FilterExtractionCondition.ENABLED][google.cloud.discoveryengine.v1beta.SearchRequest.NaturalLanguageQueryUnderstandingSpec.FilterExtractionCondition.ENABLED].
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.NaturalLanguageQueryUnderstandingSpec.ExtractedFilterBehavior extracted_filter_behavior = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for extractedFilterBehavior. + */ + @java.lang.Override + public int getExtractedFilterBehaviorValue() { + return extractedFilterBehavior_; + } - private SessionSpec() { - queryId_ = ""; - } + /** + * + * + *
            +       * Optional. Controls behavior of how extracted filters are applied to the
            +       * search. The default behavior depends on the request. For single datastore
            +       * structured search, the default is `HARD_FILTER`. For multi-datastore
            +       * search, the default behavior is `SOFT_BOOST`.
            +       * Location-based filters are always applied as hard filters, and the
            +       * `SOFT_BOOST` setting will not affect them.
            +       * This field is only used if
            +       * [SearchRequest.NaturalLanguageQueryUnderstandingSpec.FilterExtractionCondition][google.cloud.discoveryengine.v1beta.SearchRequest.NaturalLanguageQueryUnderstandingSpec.FilterExtractionCondition]
            +       * is set to
            +       * [FilterExtractionCondition.ENABLED][google.cloud.discoveryengine.v1beta.SearchRequest.NaturalLanguageQueryUnderstandingSpec.FilterExtractionCondition.ENABLED].
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.NaturalLanguageQueryUnderstandingSpec.ExtractedFilterBehavior extracted_filter_behavior = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The enum numeric value on the wire for extractedFilterBehavior to set. + * @return This builder for chaining. + */ + public Builder setExtractedFilterBehaviorValue(int value) { + extractedFilterBehavior_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.discoveryengine.v1beta.SearchServiceProto - .internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_SessionSpec_descriptor; + /** + * + * + *
            +       * Optional. Controls behavior of how extracted filters are applied to the
            +       * search. The default behavior depends on the request. For single datastore
            +       * structured search, the default is `HARD_FILTER`. For multi-datastore
            +       * search, the default behavior is `SOFT_BOOST`.
            +       * Location-based filters are always applied as hard filters, and the
            +       * `SOFT_BOOST` setting will not affect them.
            +       * This field is only used if
            +       * [SearchRequest.NaturalLanguageQueryUnderstandingSpec.FilterExtractionCondition][google.cloud.discoveryengine.v1beta.SearchRequest.NaturalLanguageQueryUnderstandingSpec.FilterExtractionCondition]
            +       * is set to
            +       * [FilterExtractionCondition.ENABLED][google.cloud.discoveryengine.v1beta.SearchRequest.NaturalLanguageQueryUnderstandingSpec.FilterExtractionCondition.ENABLED].
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.NaturalLanguageQueryUnderstandingSpec.ExtractedFilterBehavior extracted_filter_behavior = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The extractedFilterBehavior. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.SearchRequest + .NaturalLanguageQueryUnderstandingSpec.ExtractedFilterBehavior + getExtractedFilterBehavior() { + com.google.cloud.discoveryengine.v1beta.SearchRequest.NaturalLanguageQueryUnderstandingSpec + .ExtractedFilterBehavior + result = + com.google.cloud.discoveryengine.v1beta.SearchRequest + .NaturalLanguageQueryUnderstandingSpec.ExtractedFilterBehavior.forNumber( + extractedFilterBehavior_); + return result == null + ? com.google.cloud.discoveryengine.v1beta.SearchRequest + .NaturalLanguageQueryUnderstandingSpec.ExtractedFilterBehavior.UNRECOGNIZED + : result; + } + + /** + * + * + *
            +       * Optional. Controls behavior of how extracted filters are applied to the
            +       * search. The default behavior depends on the request. For single datastore
            +       * structured search, the default is `HARD_FILTER`. For multi-datastore
            +       * search, the default behavior is `SOFT_BOOST`.
            +       * Location-based filters are always applied as hard filters, and the
            +       * `SOFT_BOOST` setting will not affect them.
            +       * This field is only used if
            +       * [SearchRequest.NaturalLanguageQueryUnderstandingSpec.FilterExtractionCondition][google.cloud.discoveryengine.v1beta.SearchRequest.NaturalLanguageQueryUnderstandingSpec.FilterExtractionCondition]
            +       * is set to
            +       * [FilterExtractionCondition.ENABLED][google.cloud.discoveryengine.v1beta.SearchRequest.NaturalLanguageQueryUnderstandingSpec.FilterExtractionCondition.ENABLED].
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.NaturalLanguageQueryUnderstandingSpec.ExtractedFilterBehavior extracted_filter_behavior = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The extractedFilterBehavior to set. + * @return This builder for chaining. + */ + public Builder setExtractedFilterBehavior( + com.google.cloud.discoveryengine.v1beta.SearchRequest + .NaturalLanguageQueryUnderstandingSpec.ExtractedFilterBehavior + value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000004; + extractedFilterBehavior_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
            +       * Optional. Controls behavior of how extracted filters are applied to the
            +       * search. The default behavior depends on the request. For single datastore
            +       * structured search, the default is `HARD_FILTER`. For multi-datastore
            +       * search, the default behavior is `SOFT_BOOST`.
            +       * Location-based filters are always applied as hard filters, and the
            +       * `SOFT_BOOST` setting will not affect them.
            +       * This field is only used if
            +       * [SearchRequest.NaturalLanguageQueryUnderstandingSpec.FilterExtractionCondition][google.cloud.discoveryengine.v1beta.SearchRequest.NaturalLanguageQueryUnderstandingSpec.FilterExtractionCondition]
            +       * is set to
            +       * [FilterExtractionCondition.ENABLED][google.cloud.discoveryengine.v1beta.SearchRequest.NaturalLanguageQueryUnderstandingSpec.FilterExtractionCondition.ENABLED].
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.NaturalLanguageQueryUnderstandingSpec.ExtractedFilterBehavior extracted_filter_behavior = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearExtractedFilterBehavior() { + bitField0_ = (bitField0_ & ~0x00000004); + extractedFilterBehavior_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList allowedFieldNames_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureAllowedFieldNamesIsMutable() { + if (!allowedFieldNames_.isModifiable()) { + allowedFieldNames_ = new com.google.protobuf.LazyStringArrayList(allowedFieldNames_); + } + bitField0_ |= 0x00000008; + } + + /** + * + * + *
            +       * Optional. Allowlist of fields that can be used for natural language
            +       * filter extraction. By default, if this is unspecified, all indexable
            +       * fields are eligible for natural language filter extraction (but are not
            +       * guaranteed to be used). If any fields are specified in
            +       * allowed_field_names, only the fields that are both marked as indexable in
            +       * the schema and specified in the allowlist will be eligible for natural
            +       * language filter extraction. Note: for multi-datastore search, this is not
            +       * yet supported, and will be ignored.
            +       * 
            + * + * repeated string allowed_field_names = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the allowedFieldNames. + */ + public com.google.protobuf.ProtocolStringList getAllowedFieldNamesList() { + allowedFieldNames_.makeImmutable(); + return allowedFieldNames_; + } + + /** + * + * + *
            +       * Optional. Allowlist of fields that can be used for natural language
            +       * filter extraction. By default, if this is unspecified, all indexable
            +       * fields are eligible for natural language filter extraction (but are not
            +       * guaranteed to be used). If any fields are specified in
            +       * allowed_field_names, only the fields that are both marked as indexable in
            +       * the schema and specified in the allowlist will be eligible for natural
            +       * language filter extraction. Note: for multi-datastore search, this is not
            +       * yet supported, and will be ignored.
            +       * 
            + * + * repeated string allowed_field_names = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The count of allowedFieldNames. + */ + public int getAllowedFieldNamesCount() { + return allowedFieldNames_.size(); + } + + /** + * + * + *
            +       * Optional. Allowlist of fields that can be used for natural language
            +       * filter extraction. By default, if this is unspecified, all indexable
            +       * fields are eligible for natural language filter extraction (but are not
            +       * guaranteed to be used). If any fields are specified in
            +       * allowed_field_names, only the fields that are both marked as indexable in
            +       * the schema and specified in the allowlist will be eligible for natural
            +       * language filter extraction. Note: for multi-datastore search, this is not
            +       * yet supported, and will be ignored.
            +       * 
            + * + * repeated string allowed_field_names = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the element to return. + * @return The allowedFieldNames at the given index. + */ + public java.lang.String getAllowedFieldNames(int index) { + return allowedFieldNames_.get(index); + } + + /** + * + * + *
            +       * Optional. Allowlist of fields that can be used for natural language
            +       * filter extraction. By default, if this is unspecified, all indexable
            +       * fields are eligible for natural language filter extraction (but are not
            +       * guaranteed to be used). If any fields are specified in
            +       * allowed_field_names, only the fields that are both marked as indexable in
            +       * the schema and specified in the allowlist will be eligible for natural
            +       * language filter extraction. Note: for multi-datastore search, this is not
            +       * yet supported, and will be ignored.
            +       * 
            + * + * repeated string allowed_field_names = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the value to return. + * @return The bytes of the allowedFieldNames at the given index. + */ + public com.google.protobuf.ByteString getAllowedFieldNamesBytes(int index) { + return allowedFieldNames_.getByteString(index); + } + + /** + * + * + *
            +       * Optional. Allowlist of fields that can be used for natural language
            +       * filter extraction. By default, if this is unspecified, all indexable
            +       * fields are eligible for natural language filter extraction (but are not
            +       * guaranteed to be used). If any fields are specified in
            +       * allowed_field_names, only the fields that are both marked as indexable in
            +       * the schema and specified in the allowlist will be eligible for natural
            +       * language filter extraction. Note: for multi-datastore search, this is not
            +       * yet supported, and will be ignored.
            +       * 
            + * + * repeated string allowed_field_names = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index to set the value at. + * @param value The allowedFieldNames to set. + * @return This builder for chaining. + */ + public Builder setAllowedFieldNames(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureAllowedFieldNamesIsMutable(); + allowedFieldNames_.set(index, value); + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
            +       * Optional. Allowlist of fields that can be used for natural language
            +       * filter extraction. By default, if this is unspecified, all indexable
            +       * fields are eligible for natural language filter extraction (but are not
            +       * guaranteed to be used). If any fields are specified in
            +       * allowed_field_names, only the fields that are both marked as indexable in
            +       * the schema and specified in the allowlist will be eligible for natural
            +       * language filter extraction. Note: for multi-datastore search, this is not
            +       * yet supported, and will be ignored.
            +       * 
            + * + * repeated string allowed_field_names = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The allowedFieldNames to add. + * @return This builder for chaining. + */ + public Builder addAllowedFieldNames(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureAllowedFieldNamesIsMutable(); + allowedFieldNames_.add(value); + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
            +       * Optional. Allowlist of fields that can be used for natural language
            +       * filter extraction. By default, if this is unspecified, all indexable
            +       * fields are eligible for natural language filter extraction (but are not
            +       * guaranteed to be used). If any fields are specified in
            +       * allowed_field_names, only the fields that are both marked as indexable in
            +       * the schema and specified in the allowlist will be eligible for natural
            +       * language filter extraction. Note: for multi-datastore search, this is not
            +       * yet supported, and will be ignored.
            +       * 
            + * + * repeated string allowed_field_names = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param values The allowedFieldNames to add. + * @return This builder for chaining. + */ + public Builder addAllAllowedFieldNames(java.lang.Iterable values) { + ensureAllowedFieldNamesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, allowedFieldNames_); + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
            +       * Optional. Allowlist of fields that can be used for natural language
            +       * filter extraction. By default, if this is unspecified, all indexable
            +       * fields are eligible for natural language filter extraction (but are not
            +       * guaranteed to be used). If any fields are specified in
            +       * allowed_field_names, only the fields that are both marked as indexable in
            +       * the schema and specified in the allowlist will be eligible for natural
            +       * language filter extraction. Note: for multi-datastore search, this is not
            +       * yet supported, and will be ignored.
            +       * 
            + * + * repeated string allowed_field_names = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearAllowedFieldNames() { + allowedFieldNames_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + ; + onChanged(); + return this; + } + + /** + * + * + *
            +       * Optional. Allowlist of fields that can be used for natural language
            +       * filter extraction. By default, if this is unspecified, all indexable
            +       * fields are eligible for natural language filter extraction (but are not
            +       * guaranteed to be used). If any fields are specified in
            +       * allowed_field_names, only the fields that are both marked as indexable in
            +       * the schema and specified in the allowlist will be eligible for natural
            +       * language filter extraction. Note: for multi-datastore search, this is not
            +       * yet supported, and will be ignored.
            +       * 
            + * + * repeated string allowed_field_names = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The bytes of the allowedFieldNames to add. + * @return This builder for chaining. + */ + public Builder addAllowedFieldNamesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureAllowedFieldNamesIsMutable(); + allowedFieldNames_.add(value); + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.SearchRequest.NaturalLanguageQueryUnderstandingSpec) } - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.discoveryengine.v1beta.SearchServiceProto - .internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_SessionSpec_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.discoveryengine.v1beta.SearchRequest.SessionSpec.class, - com.google.cloud.discoveryengine.v1beta.SearchRequest.SessionSpec.Builder.class); + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.SearchRequest.NaturalLanguageQueryUnderstandingSpec) + private static final com.google.cloud.discoveryengine.v1beta.SearchRequest + .NaturalLanguageQueryUnderstandingSpec + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.discoveryengine.v1beta.SearchRequest + .NaturalLanguageQueryUnderstandingSpec(); } - private int bitField0_; - public static final int QUERY_ID_FIELD_NUMBER = 1; + public static com.google.cloud.discoveryengine.v1beta.SearchRequest + .NaturalLanguageQueryUnderstandingSpec + getDefaultInstance() { + return DEFAULT_INSTANCE; + } - @SuppressWarnings("serial") - private volatile java.lang.Object queryId_ = ""; + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public NaturalLanguageQueryUnderstandingSpec parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } - /** - * - * - *
            -     * If set, the search result gets stored to the "turn" specified by this
            -     * query ID.
            -     *
            -     * Example: Let's say the session looks like this:
            -     * session {
            -     * name: ".../sessions/xxx"
            -     * turns {
            -     * query { text: "What is foo?" query_id: ".../questions/yyy" }
            -     * answer: "Foo is ..."
            -     * }
            -     * turns {
            -     * query { text: "How about bar then?" query_id: ".../questions/zzz" }
            -     * }
            -     * }
            -     *
            -     * The user can call /search API with a request like this:
            -     *
            -     * session: ".../sessions/xxx"
            -     * session_spec { query_id: ".../questions/zzz" }
            -     *
            -     * Then, the API stores the search result, associated with the last turn.
            -     * The stored search result can be used by a subsequent /answer API call
            -     * (with the session ID and the query ID specified). Also, it is possible
            -     * to call /search and /answer in parallel with the same session ID & query
            -     * ID.
            -     * 
            - * - * string query_id = 1; - * - * @return The queryId. - */ @java.lang.Override - public java.lang.String getQueryId() { - java.lang.Object ref = queryId_; - 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(); - queryId_ = s; - return s; - } + public com.google.protobuf.Parser getParserForType() { + return PARSER; } - /** - * - * - *
            -     * If set, the search result gets stored to the "turn" specified by this
            -     * query ID.
            -     *
            -     * Example: Let's say the session looks like this:
            -     * session {
            -     * name: ".../sessions/xxx"
            -     * turns {
            -     * query { text: "What is foo?" query_id: ".../questions/yyy" }
            -     * answer: "Foo is ..."
            -     * }
            -     * turns {
            -     * query { text: "How about bar then?" query_id: ".../questions/zzz" }
            -     * }
            -     * }
            -     *
            -     * The user can call /search API with a request like this:
            -     *
            -     * session: ".../sessions/xxx"
            -     * session_spec { query_id: ".../questions/zzz" }
            -     *
            -     * Then, the API stores the search result, associated with the last turn.
            -     * The stored search result can be used by a subsequent /answer API call
            -     * (with the session ID and the query ID specified). Also, it is possible
            -     * to call /search and /answer in parallel with the same session ID & query
            -     * ID.
            -     * 
            - * - * string query_id = 1; - * - * @return The bytes for queryId. - */ @java.lang.Override - public com.google.protobuf.ByteString getQueryIdBytes() { - java.lang.Object ref = queryId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - queryId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } + public com.google.cloud.discoveryengine.v1beta.SearchRequest + .NaturalLanguageQueryUnderstandingSpec + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; } + } - public static final int SEARCH_RESULT_PERSISTENCE_COUNT_FIELD_NUMBER = 2; - private int searchResultPersistenceCount_ = 0; + public interface SearchAsYouTypeSpecOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec) + com.google.protobuf.MessageOrBuilder { /** * * *
            -     * The number of top search results to persist. The persisted search results
            -     * can be used for the subsequent /answer api call.
            -     *
            -     * This field is simliar to the `summary_result_count` field in
            -     * [SearchRequest.ContentSearchSpec.SummarySpec.summary_result_count][google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec.summary_result_count].
            -     *
            -     * At most 10 results for documents mode, or 50 for chunks mode.
            +     * The condition under which search as you type should occur.
            +     * Default to
            +     * [Condition.DISABLED][google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec.Condition.DISABLED].
                  * 
            * - * optional int32 search_result_persistence_count = 2; + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec.Condition condition = 1; + * * - * @return Whether the searchResultPersistenceCount field is set. + * @return The enum numeric value on the wire for condition. */ - @java.lang.Override - public boolean hasSearchResultPersistenceCount() { - return ((bitField0_ & 0x00000001) != 0); - } + int getConditionValue(); /** * * *
            -     * The number of top search results to persist. The persisted search results
            -     * can be used for the subsequent /answer api call.
            -     *
            -     * This field is simliar to the `summary_result_count` field in
            -     * [SearchRequest.ContentSearchSpec.SummarySpec.summary_result_count][google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec.summary_result_count].
            -     *
            -     * At most 10 results for documents mode, or 50 for chunks mode.
            +     * The condition under which search as you type should occur.
            +     * Default to
            +     * [Condition.DISABLED][google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec.Condition.DISABLED].
                  * 
            * - * optional int32 search_result_persistence_count = 2; + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec.Condition condition = 1; + * * - * @return The searchResultPersistenceCount. + * @return The condition. */ - @java.lang.Override - public int getSearchResultPersistenceCount() { - return searchResultPersistenceCount_; - } - - private byte memoizedIsInitialized = -1; + com.google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec.Condition + getCondition(); + } - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + /** + * + * + *
            +   * Specification for search as you type in search requests.
            +   * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec} + */ + public static final class SearchAsYouTypeSpec extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec) + SearchAsYouTypeSpecOrBuilder { + private static final long serialVersionUID = 0L; - memoizedIsInitialized = 1; - return true; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "SearchAsYouTypeSpec"); } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(queryId_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, queryId_); - } - if (((bitField0_ & 0x00000001) != 0)) { - output.writeInt32(2, searchResultPersistenceCount_); - } - getUnknownFields().writeTo(output); + // Use SearchAsYouTypeSpec.newBuilder() to construct. + private SearchAsYouTypeSpec(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(queryId_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, queryId_); - } - if (((bitField0_ & 0x00000001) != 0)) { - size += - com.google.protobuf.CodedOutputStream.computeInt32Size( - 2, searchResultPersistenceCount_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; + private SearchAsYouTypeSpec() { + condition_ = 0; } - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.discoveryengine.v1beta.SearchRequest.SessionSpec)) { - return super.equals(obj); - } - com.google.cloud.discoveryengine.v1beta.SearchRequest.SessionSpec other = - (com.google.cloud.discoveryengine.v1beta.SearchRequest.SessionSpec) obj; - - if (!getQueryId().equals(other.getQueryId())) return false; - if (hasSearchResultPersistenceCount() != other.hasSearchResultPersistenceCount()) - return false; - if (hasSearchResultPersistenceCount()) { - if (getSearchResultPersistenceCount() != other.getSearchResultPersistenceCount()) - return false; - } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_SearchAsYouTypeSpec_descriptor; } @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + QUERY_ID_FIELD_NUMBER; - hash = (53 * hash) + getQueryId().hashCode(); - if (hasSearchResultPersistenceCount()) { - hash = (37 * hash) + SEARCH_RESULT_PERSISTENCE_COUNT_FIELD_NUMBER; - hash = (53 * hash) + getSearchResultPersistenceCount(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.discoveryengine.v1beta.SearchRequest.SessionSpec parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_SearchAsYouTypeSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec.class, + com.google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec.Builder + .class); } - public static com.google.cloud.discoveryengine.v1beta.SearchRequest.SessionSpec parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { + /** + * + * + *
            +     * Enum describing under which condition search as you type should occur.
            +     * 
            + * + * Protobuf enum {@code + * google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec.Condition} + */ + public enum Condition implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
            +       * Server behavior defaults to
            +       * [Condition.DISABLED][google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec.Condition.DISABLED].
            +       * 
            + * + * CONDITION_UNSPECIFIED = 0; + */ + CONDITION_UNSPECIFIED(0), + /** + * + * + *
            +       * Disables Search As You Type.
            +       * 
            + * + * DISABLED = 1; + */ + DISABLED(1), + /** + * + * + *
            +       * Enables Search As You Type.
            +       * 
            + * + * ENABLED = 2; + */ + ENABLED(2), + /** + * + * + *
            +       * Automatic switching between search-as-you-type and standard search
            +       * modes, ideal for single-API implementations (e.g., debouncing).
            +       * 
            + * + * AUTO = 3; + */ + AUTO(3), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Condition"); + } + + /** + * + * + *
            +       * Server behavior defaults to
            +       * [Condition.DISABLED][google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec.Condition.DISABLED].
            +       * 
            + * + * CONDITION_UNSPECIFIED = 0; + */ + public static final int CONDITION_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
            +       * Disables Search As You Type.
            +       * 
            + * + * DISABLED = 1; + */ + public static final int DISABLED_VALUE = 1; + + /** + * + * + *
            +       * Enables Search As You Type.
            +       * 
            + * + * ENABLED = 2; + */ + public static final int ENABLED_VALUE = 2; + + /** + * + * + *
            +       * Automatic switching between search-as-you-type and standard search
            +       * modes, ideal for single-API implementations (e.g., debouncing).
            +       * 
            + * + * AUTO = 3; + */ + public static final int AUTO_VALUE = 3; + + 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 Condition 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 Condition forNumber(int value) { + switch (value) { + case 0: + return CONDITION_UNSPECIFIED; + case 1: + return DISABLED; + case 2: + return ENABLED; + case 3: + return AUTO; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public Condition findValueByNumber(int number) { + return Condition.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec + .getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final Condition[] VALUES = values(); + + public static Condition valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private Condition(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec.Condition) + } + + public static final int CONDITION_FIELD_NUMBER = 1; + private int condition_ = 0; + + /** + * + * + *
            +     * The condition under which search as you type should occur.
            +     * Default to
            +     * [Condition.DISABLED][google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec.Condition.DISABLED].
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec.Condition condition = 1; + * + * + * @return The enum numeric value on the wire for condition. + */ + @java.lang.Override + public int getConditionValue() { + return condition_; + } + + /** + * + * + *
            +     * The condition under which search as you type should occur.
            +     * Default to
            +     * [Condition.DISABLED][google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec.Condition.DISABLED].
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec.Condition condition = 1; + * + * + * @return The condition. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec.Condition + getCondition() { + com.google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec.Condition result = + com.google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec.Condition + .forNumber(condition_); + return result == null + ? com.google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec.Condition + .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 (condition_ + != com.google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec.Condition + .CONDITION_UNSPECIFIED + .getNumber()) { + output.writeEnum(1, condition_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (condition_ + != com.google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec.Condition + .CONDITION_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, condition_); + } + 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.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec other = + (com.google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec) obj; + + if (condition_ != other.condition_) 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) + CONDITION_FIELD_NUMBER; + hash = (53 * hash) + condition_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec + 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.discoveryengine.v1beta.SearchRequest.SessionSpec parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { + public static com.google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.discoveryengine.v1beta.SearchRequest.SessionSpec parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { + public static com.google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec + 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.discoveryengine.v1beta.SearchRequest.SessionSpec parseFrom( - byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + public static com.google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.discoveryengine.v1beta.SearchRequest.SessionSpec parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { + public static com.google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.discoveryengine.v1beta.SearchRequest.SessionSpec parseFrom( - java.io.InputStream input) throws java.io.IOException { + public static com.google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec + parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } - public static com.google.cloud.discoveryengine.v1beta.SearchRequest.SessionSpec parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { + public static com.google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec + 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.discoveryengine.v1beta.SearchRequest.SessionSpec + public static com.google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } - public static com.google.cloud.discoveryengine.v1beta.SearchRequest.SessionSpec + public static com.google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -29057,15 +30862,16 @@ public static com.google.cloud.discoveryengine.v1beta.SearchRequest.SessionSpec PARSER, input, extensionRegistry); } - public static com.google.cloud.discoveryengine.v1beta.SearchRequest.SessionSpec parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { + public static com.google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } - public static com.google.cloud.discoveryengine.v1beta.SearchRequest.SessionSpec parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { + public static com.google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -29080,7 +30886,7 @@ public static Builder newBuilder() { } public static Builder newBuilder( - com.google.cloud.discoveryengine.v1beta.SearchRequest.SessionSpec prototype) { + com.google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @@ -29099,36 +30905,33 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.Builder * * *
            -     * Session specification.
            -     *
            -     * Multi-turn Search feature is currently at private GA stage. Please use
            -     * v1alpha or v1beta version instead before we launch this feature to public
            -     * GA. Or ask for allowlisting through Google Support team.
            +     * Specification for search as you type in search requests.
                  * 
            * - * Protobuf type {@code google.cloud.discoveryengine.v1beta.SearchRequest.SessionSpec} + * Protobuf type {@code google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec} */ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.SearchRequest.SessionSpec) - com.google.cloud.discoveryengine.v1beta.SearchRequest.SessionSpecOrBuilder { + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec) + com.google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpecOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.discoveryengine.v1beta.SearchServiceProto - .internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_SessionSpec_descriptor; + .internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_SearchAsYouTypeSpec_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.discoveryengine.v1beta.SearchServiceProto - .internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_SessionSpec_fieldAccessorTable + .internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_SearchAsYouTypeSpec_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.discoveryengine.v1beta.SearchRequest.SessionSpec.class, - com.google.cloud.discoveryengine.v1beta.SearchRequest.SessionSpec.Builder.class); + com.google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec.class, + com.google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec.Builder + .class); } // Construct using - // com.google.cloud.discoveryengine.v1beta.SearchRequest.SessionSpec.newBuilder() + // com.google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec.newBuilder() private Builder() {} private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { @@ -29139,27 +30942,27 @@ private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { public Builder clear() { super.clear(); bitField0_ = 0; - queryId_ = ""; - searchResultPersistenceCount_ = 0; + condition_ = 0; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.cloud.discoveryengine.v1beta.SearchServiceProto - .internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_SessionSpec_descriptor; + .internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_SearchAsYouTypeSpec_descriptor; } @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.SearchRequest.SessionSpec + public com.google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec getDefaultInstanceForType() { - return com.google.cloud.discoveryengine.v1beta.SearchRequest.SessionSpec + return com.google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec .getDefaultInstance(); } @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.SearchRequest.SessionSpec build() { - com.google.cloud.discoveryengine.v1beta.SearchRequest.SessionSpec result = buildPartial(); + public com.google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec build() { + com.google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec result = + buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } @@ -29167,9 +30970,10 @@ public com.google.cloud.discoveryengine.v1beta.SearchRequest.SessionSpec build() } @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.SearchRequest.SessionSpec buildPartial() { - com.google.cloud.discoveryengine.v1beta.SearchRequest.SessionSpec result = - new com.google.cloud.discoveryengine.v1beta.SearchRequest.SessionSpec(this); + public com.google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec + buildPartial() { + com.google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec result = + new com.google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec(this); if (bitField0_ != 0) { buildPartial0(result); } @@ -29178,24 +30982,19 @@ public com.google.cloud.discoveryengine.v1beta.SearchRequest.SessionSpec buildPa } private void buildPartial0( - com.google.cloud.discoveryengine.v1beta.SearchRequest.SessionSpec result) { + com.google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec result) { int from_bitField0_ = bitField0_; if (((from_bitField0_ & 0x00000001) != 0)) { - result.queryId_ = queryId_; - } - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000002) != 0)) { - result.searchResultPersistenceCount_ = searchResultPersistenceCount_; - to_bitField0_ |= 0x00000001; + result.condition_ = condition_; } - result.bitField0_ |= to_bitField0_; } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.discoveryengine.v1beta.SearchRequest.SessionSpec) { + if (other + instanceof com.google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec) { return mergeFrom( - (com.google.cloud.discoveryengine.v1beta.SearchRequest.SessionSpec) other); + (com.google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec) other); } else { super.mergeFrom(other); return this; @@ -29203,17 +31002,12 @@ public Builder mergeFrom(com.google.protobuf.Message other) { } public Builder mergeFrom( - com.google.cloud.discoveryengine.v1beta.SearchRequest.SessionSpec other) { + com.google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec other) { if (other - == com.google.cloud.discoveryengine.v1beta.SearchRequest.SessionSpec + == com.google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec .getDefaultInstance()) return this; - if (!other.getQueryId().isEmpty()) { - queryId_ = other.queryId_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (other.hasSearchResultPersistenceCount()) { - setSearchResultPersistenceCount(other.getSearchResultPersistenceCount()); + if (other.condition_ != 0) { + setConditionValue(other.getConditionValue()); } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); @@ -29241,18 +31035,12 @@ public Builder mergeFrom( case 0: done = true; break; - case 10: + case 8: { - queryId_ = input.readStringRequireUtf8(); + condition_ = input.readEnum(); bitField0_ |= 0x00000001; break; - } // case 10 - case 16: - { - searchResultPersistenceCount_ = input.readInt32(); - bitField0_ |= 0x00000002; - break; - } // case 16 + } // case 8 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -29272,143 +31060,46 @@ public Builder mergeFrom( private int bitField0_; - private java.lang.Object queryId_ = ""; + private int condition_ = 0; /** * * *
            -       * If set, the search result gets stored to the "turn" specified by this
            -       * query ID.
            +       * The condition under which search as you type should occur.
            +       * Default to
            +       * [Condition.DISABLED][google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec.Condition.DISABLED].
            +       * 
            * - * Example: Let's say the session looks like this: - * session { - * name: ".../sessions/xxx" - * turns { - * query { text: "What is foo?" query_id: ".../questions/yyy" } - * answer: "Foo is ..." - * } - * turns { - * query { text: "How about bar then?" query_id: ".../questions/zzz" } - * } - * } + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec.Condition condition = 1; + * * - * The user can call /search API with a request like this: + * @return The enum numeric value on the wire for condition. + */ + @java.lang.Override + public int getConditionValue() { + return condition_; + } + + /** * - * session: ".../sessions/xxx" - * session_spec { query_id: ".../questions/zzz" } * - * Then, the API stores the search result, associated with the last turn. - * The stored search result can be used by a subsequent /answer API call - * (with the session ID and the query ID specified). Also, it is possible - * to call /search and /answer in parallel with the same session ID & query - * ID. + *
            +       * The condition under which search as you type should occur.
            +       * Default to
            +       * [Condition.DISABLED][google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec.Condition.DISABLED].
                    * 
            * - * string query_id = 1; - * - * @return The queryId. - */ - public java.lang.String getQueryId() { - java.lang.Object ref = queryId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - queryId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - - /** - * - * - *
            -       * If set, the search result gets stored to the "turn" specified by this
            -       * query ID.
            -       *
            -       * Example: Let's say the session looks like this:
            -       * session {
            -       * name: ".../sessions/xxx"
            -       * turns {
            -       * query { text: "What is foo?" query_id: ".../questions/yyy" }
            -       * answer: "Foo is ..."
            -       * }
            -       * turns {
            -       * query { text: "How about bar then?" query_id: ".../questions/zzz" }
            -       * }
            -       * }
            -       *
            -       * The user can call /search API with a request like this:
            -       *
            -       * session: ".../sessions/xxx"
            -       * session_spec { query_id: ".../questions/zzz" }
            -       *
            -       * Then, the API stores the search result, associated with the last turn.
            -       * The stored search result can be used by a subsequent /answer API call
            -       * (with the session ID and the query ID specified). Also, it is possible
            -       * to call /search and /answer in parallel with the same session ID & query
            -       * ID.
            -       * 
            - * - * string query_id = 1; - * - * @return The bytes for queryId. - */ - public com.google.protobuf.ByteString getQueryIdBytes() { - java.lang.Object ref = queryId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - queryId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - /** - * - * - *
            -       * If set, the search result gets stored to the "turn" specified by this
            -       * query ID.
            -       *
            -       * Example: Let's say the session looks like this:
            -       * session {
            -       * name: ".../sessions/xxx"
            -       * turns {
            -       * query { text: "What is foo?" query_id: ".../questions/yyy" }
            -       * answer: "Foo is ..."
            -       * }
            -       * turns {
            -       * query { text: "How about bar then?" query_id: ".../questions/zzz" }
            -       * }
            -       * }
            -       *
            -       * The user can call /search API with a request like this:
            -       *
            -       * session: ".../sessions/xxx"
            -       * session_spec { query_id: ".../questions/zzz" }
            -       *
            -       * Then, the API stores the search result, associated with the last turn.
            -       * The stored search result can be used by a subsequent /answer API call
            -       * (with the session ID and the query ID specified). Also, it is possible
            -       * to call /search and /answer in parallel with the same session ID & query
            -       * ID.
            -       * 
            - * - * string query_id = 1; + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec.Condition condition = 1; + * * - * @param value The queryId to set. + * @param value The enum numeric value on the wire for condition to set. * @return This builder for chaining. */ - public Builder setQueryId(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - queryId_ = value; + public Builder setConditionValue(int value) { + condition_ = value; bitField0_ |= 0x00000001; onChanged(); return this; @@ -29418,159 +31109,53 @@ public Builder setQueryId(java.lang.String value) { * * *
            -       * If set, the search result gets stored to the "turn" specified by this
            -       * query ID.
            -       *
            -       * Example: Let's say the session looks like this:
            -       * session {
            -       * name: ".../sessions/xxx"
            -       * turns {
            -       * query { text: "What is foo?" query_id: ".../questions/yyy" }
            -       * answer: "Foo is ..."
            -       * }
            -       * turns {
            -       * query { text: "How about bar then?" query_id: ".../questions/zzz" }
            -       * }
            -       * }
            -       *
            -       * The user can call /search API with a request like this:
            -       *
            -       * session: ".../sessions/xxx"
            -       * session_spec { query_id: ".../questions/zzz" }
            -       *
            -       * Then, the API stores the search result, associated with the last turn.
            -       * The stored search result can be used by a subsequent /answer API call
            -       * (with the session ID and the query ID specified). Also, it is possible
            -       * to call /search and /answer in parallel with the same session ID & query
            -       * ID.
            +       * The condition under which search as you type should occur.
            +       * Default to
            +       * [Condition.DISABLED][google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec.Condition.DISABLED].
                    * 
            * - * string query_id = 1; + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec.Condition condition = 1; + * * - * @return This builder for chaining. + * @return The condition. */ - public Builder clearQueryId() { - queryId_ = getDefaultInstance().getQueryId(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec.Condition + getCondition() { + com.google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec.Condition result = + com.google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec.Condition + .forNumber(condition_); + return result == null + ? com.google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec.Condition + .UNRECOGNIZED + : result; } /** * * *
            -       * If set, the search result gets stored to the "turn" specified by this
            -       * query ID.
            -       *
            -       * Example: Let's say the session looks like this:
            -       * session {
            -       * name: ".../sessions/xxx"
            -       * turns {
            -       * query { text: "What is foo?" query_id: ".../questions/yyy" }
            -       * answer: "Foo is ..."
            -       * }
            -       * turns {
            -       * query { text: "How about bar then?" query_id: ".../questions/zzz" }
            -       * }
            -       * }
            -       *
            -       * The user can call /search API with a request like this:
            -       *
            -       * session: ".../sessions/xxx"
            -       * session_spec { query_id: ".../questions/zzz" }
            -       *
            -       * Then, the API stores the search result, associated with the last turn.
            -       * The stored search result can be used by a subsequent /answer API call
            -       * (with the session ID and the query ID specified). Also, it is possible
            -       * to call /search and /answer in parallel with the same session ID & query
            -       * ID.
            +       * The condition under which search as you type should occur.
            +       * Default to
            +       * [Condition.DISABLED][google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec.Condition.DISABLED].
                    * 
            * - * string query_id = 1; + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec.Condition condition = 1; + * * - * @param value The bytes for queryId to set. + * @param value The condition to set. * @return This builder for chaining. */ - public Builder setQueryIdBytes(com.google.protobuf.ByteString value) { + public Builder setCondition( + com.google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec.Condition + value) { if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - queryId_ = value; bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private int searchResultPersistenceCount_; - - /** - * - * - *
            -       * The number of top search results to persist. The persisted search results
            -       * can be used for the subsequent /answer api call.
            -       *
            -       * This field is simliar to the `summary_result_count` field in
            -       * [SearchRequest.ContentSearchSpec.SummarySpec.summary_result_count][google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec.summary_result_count].
            -       *
            -       * At most 10 results for documents mode, or 50 for chunks mode.
            -       * 
            - * - * optional int32 search_result_persistence_count = 2; - * - * @return Whether the searchResultPersistenceCount field is set. - */ - @java.lang.Override - public boolean hasSearchResultPersistenceCount() { - return ((bitField0_ & 0x00000002) != 0); - } - - /** - * - * - *
            -       * The number of top search results to persist. The persisted search results
            -       * can be used for the subsequent /answer api call.
            -       *
            -       * This field is simliar to the `summary_result_count` field in
            -       * [SearchRequest.ContentSearchSpec.SummarySpec.summary_result_count][google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec.summary_result_count].
            -       *
            -       * At most 10 results for documents mode, or 50 for chunks mode.
            -       * 
            - * - * optional int32 search_result_persistence_count = 2; - * - * @return The searchResultPersistenceCount. - */ - @java.lang.Override - public int getSearchResultPersistenceCount() { - return searchResultPersistenceCount_; - } - - /** - * - * - *
            -       * The number of top search results to persist. The persisted search results
            -       * can be used for the subsequent /answer api call.
            -       *
            -       * This field is simliar to the `summary_result_count` field in
            -       * [SearchRequest.ContentSearchSpec.SummarySpec.summary_result_count][google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec.summary_result_count].
            -       *
            -       * At most 10 results for documents mode, or 50 for chunks mode.
            -       * 
            - * - * optional int32 search_result_persistence_count = 2; - * - * @param value The searchResultPersistenceCount to set. - * @return This builder for chaining. - */ - public Builder setSearchResultPersistenceCount(int value) { - - searchResultPersistenceCount_ = value; - bitField0_ |= 0x00000002; + condition_ = value.getNumber(); onChanged(); return this; } @@ -29579,46 +31164,45 @@ public Builder setSearchResultPersistenceCount(int value) { * * *
            -       * The number of top search results to persist. The persisted search results
            -       * can be used for the subsequent /answer api call.
            -       *
            -       * This field is simliar to the `summary_result_count` field in
            -       * [SearchRequest.ContentSearchSpec.SummarySpec.summary_result_count][google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec.summary_result_count].
            -       *
            -       * At most 10 results for documents mode, or 50 for chunks mode.
            +       * The condition under which search as you type should occur.
            +       * Default to
            +       * [Condition.DISABLED][google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec.Condition.DISABLED].
                    * 
            * - * optional int32 search_result_persistence_count = 2; + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec.Condition condition = 1; + * * * @return This builder for chaining. */ - public Builder clearSearchResultPersistenceCount() { - bitField0_ = (bitField0_ & ~0x00000002); - searchResultPersistenceCount_ = 0; + public Builder clearCondition() { + bitField0_ = (bitField0_ & ~0x00000001); + condition_ = 0; onChanged(); return this; } - // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.SearchRequest.SessionSpec) + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec) } - // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.SearchRequest.SessionSpec) - private static final com.google.cloud.discoveryengine.v1beta.SearchRequest.SessionSpec + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec) + private static final com.google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec DEFAULT_INSTANCE; static { - DEFAULT_INSTANCE = new com.google.cloud.discoveryengine.v1beta.SearchRequest.SessionSpec(); + DEFAULT_INSTANCE = + new com.google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec(); } - public static com.google.cloud.discoveryengine.v1beta.SearchRequest.SessionSpec + public static com.google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec getDefaultInstance() { return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { @java.lang.Override - public SessionSpec parsePartialFrom( + public SearchAsYouTypeSpec parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { @@ -29638,73 +31222,72 @@ public SessionSpec parsePartialFrom( } }; - public static com.google.protobuf.Parser parser() { + public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override - public com.google.protobuf.Parser getParserForType() { + public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.SearchRequest.SessionSpec + public com.google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } - public interface PersonalizationSpecOrBuilder + public interface DisplaySpecOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec) + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.SearchRequest.DisplaySpec) com.google.protobuf.MessageOrBuilder { /** * * *
            -     * The personalization mode of the search request.
            -     * Defaults to
            -     * [Mode.AUTO][google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec.Mode.AUTO].
            +     * The condition under which match highlighting should occur.
                  * 
            * - * .google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec.Mode mode = 1; + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.DisplaySpec.MatchHighlightingCondition match_highlighting_condition = 1; * * - * @return The enum numeric value on the wire for mode. + * @return The enum numeric value on the wire for matchHighlightingCondition. */ - int getModeValue(); + int getMatchHighlightingConditionValue(); /** * * *
            -     * The personalization mode of the search request.
            -     * Defaults to
            -     * [Mode.AUTO][google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec.Mode.AUTO].
            +     * The condition under which match highlighting should occur.
                  * 
            * - * .google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec.Mode mode = 1; + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.DisplaySpec.MatchHighlightingCondition match_highlighting_condition = 1; * * - * @return The mode. + * @return The matchHighlightingCondition. */ - com.google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec.Mode getMode(); + com.google.cloud.discoveryengine.v1beta.SearchRequest.DisplaySpec.MatchHighlightingCondition + getMatchHighlightingCondition(); } /** * * *
            -   * The specification for personalization.
            +   * Specifies features for display, like match highlighting.
                * 
            * - * Protobuf type {@code google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec} + * Protobuf type {@code google.cloud.discoveryengine.v1beta.SearchRequest.DisplaySpec} */ - public static final class PersonalizationSpec extends com.google.protobuf.GeneratedMessage + public static final class DisplaySpec extends com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec) - PersonalizationSpecOrBuilder { + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.SearchRequest.DisplaySpec) + DisplaySpecOrBuilder { private static final long serialVersionUID = 0L; static { @@ -29714,76 +31297,74 @@ public static final class PersonalizationSpec extends com.google.protobuf.Genera /* minor= */ 33, /* patch= */ 2, /* suffix= */ "", - "PersonalizationSpec"); + "DisplaySpec"); } - // Use PersonalizationSpec.newBuilder() to construct. - private PersonalizationSpec(com.google.protobuf.GeneratedMessage.Builder builder) { + // Use DisplaySpec.newBuilder() to construct. + private DisplaySpec(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } - private PersonalizationSpec() { - mode_ = 0; + private DisplaySpec() { + matchHighlightingCondition_ = 0; } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.discoveryengine.v1beta.SearchServiceProto - .internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_PersonalizationSpec_descriptor; + .internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_DisplaySpec_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.discoveryengine.v1beta.SearchServiceProto - .internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_PersonalizationSpec_fieldAccessorTable + .internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_DisplaySpec_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec.class, - com.google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec.Builder - .class); + com.google.cloud.discoveryengine.v1beta.SearchRequest.DisplaySpec.class, + com.google.cloud.discoveryengine.v1beta.SearchRequest.DisplaySpec.Builder.class); } /** * * *
            -     * The personalization mode of each search request.
            +     * Enum describing under which condition match highlighting should occur.
                  * 
            * * Protobuf enum {@code - * google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec.Mode} + * google.cloud.discoveryengine.v1beta.SearchRequest.DisplaySpec.MatchHighlightingCondition} */ - public enum Mode implements com.google.protobuf.ProtocolMessageEnum { + public enum MatchHighlightingCondition implements com.google.protobuf.ProtocolMessageEnum { /** * * *
            -       * Default value. In this case, server behavior defaults to
            -       * [Mode.AUTO][google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec.Mode.AUTO].
            +       * Server behavior is the same as `MATCH_HIGHLIGHTING_DISABLED`.
                    * 
            * - * MODE_UNSPECIFIED = 0; + * MATCH_HIGHLIGHTING_CONDITION_UNSPECIFIED = 0; */ - MODE_UNSPECIFIED(0), + MATCH_HIGHLIGHTING_CONDITION_UNSPECIFIED(0), /** * * *
            -       * Personalization is enabled if data quality requirements are met.
            +       * Disables match highlighting on all documents.
                    * 
            * - * AUTO = 1; + * MATCH_HIGHLIGHTING_DISABLED = 1; */ - AUTO(1), + MATCH_HIGHLIGHTING_DISABLED(1), /** * * *
            -       * Disable personalization.
            +       * Enables match highlighting on all documents.
                    * 
            * - * DISABLED = 2; + * MATCH_HIGHLIGHTING_ENABLED = 2; */ - DISABLED(2), + MATCH_HIGHLIGHTING_ENABLED(2), UNRECOGNIZED(-1), ; @@ -29794,42 +31375,41 @@ public enum Mode implements com.google.protobuf.ProtocolMessageEnum { /* minor= */ 33, /* patch= */ 2, /* suffix= */ "", - "Mode"); + "MatchHighlightingCondition"); } /** * * *
            -       * Default value. In this case, server behavior defaults to
            -       * [Mode.AUTO][google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec.Mode.AUTO].
            +       * Server behavior is the same as `MATCH_HIGHLIGHTING_DISABLED`.
                    * 
            * - * MODE_UNSPECIFIED = 0; + * MATCH_HIGHLIGHTING_CONDITION_UNSPECIFIED = 0; */ - public static final int MODE_UNSPECIFIED_VALUE = 0; + public static final int MATCH_HIGHLIGHTING_CONDITION_UNSPECIFIED_VALUE = 0; /** * * *
            -       * Personalization is enabled if data quality requirements are met.
            +       * Disables match highlighting on all documents.
                    * 
            * - * AUTO = 1; + * MATCH_HIGHLIGHTING_DISABLED = 1; */ - public static final int AUTO_VALUE = 1; + public static final int MATCH_HIGHLIGHTING_DISABLED_VALUE = 1; /** * * *
            -       * Disable personalization.
            +       * Enables match highlighting on all documents.
                    * 
            * - * DISABLED = 2; + * MATCH_HIGHLIGHTING_ENABLED = 2; */ - public static final int DISABLED_VALUE = 2; + public static final int MATCH_HIGHLIGHTING_ENABLED_VALUE = 2; public final int getNumber() { if (this == UNRECOGNIZED) { @@ -29845,7 +31425,7 @@ public final int getNumber() { * @deprecated Use {@link #forNumber(int)} instead. */ @java.lang.Deprecated - public static Mode valueOf(int value) { + public static MatchHighlightingCondition valueOf(int value) { return forNumber(value); } @@ -29853,29 +31433,31 @@ public static Mode valueOf(int value) { * @param value The numeric wire value of the corresponding enum entry. * @return The enum associated with the given numeric wire value. */ - public static Mode forNumber(int value) { + public static MatchHighlightingCondition forNumber(int value) { switch (value) { case 0: - return MODE_UNSPECIFIED; + return MATCH_HIGHLIGHTING_CONDITION_UNSPECIFIED; case 1: - return AUTO; + return MATCH_HIGHLIGHTING_DISABLED; case 2: - return DISABLED; + return MATCH_HIGHLIGHTING_ENABLED; default: return null; } } - public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { return internalValueMap; } - private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public Mode findValueByNumber(int number) { - return Mode.forNumber(number); - } - }; + private static final com.google.protobuf.Internal.EnumLiteMap + internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public MatchHighlightingCondition findValueByNumber(int number) { + return MatchHighlightingCondition.forNumber(number); + } + }; public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { if (this == UNRECOGNIZED) { @@ -29890,15 +31472,15 @@ public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType } public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { - return com.google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec - .getDescriptor() + return com.google.cloud.discoveryengine.v1beta.SearchRequest.DisplaySpec.getDescriptor() .getEnumTypes() .get(0); } - private static final Mode[] VALUES = values(); + private static final MatchHighlightingCondition[] VALUES = values(); - public static Mode valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + public static MatchHighlightingCondition valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { if (desc.getType() != getDescriptor()) { throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); } @@ -29910,58 +31492,58 @@ public static Mode valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor d private final int value; - private Mode(int value) { + private MatchHighlightingCondition(int value) { this.value = value; } - // @@protoc_insertion_point(enum_scope:google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec.Mode) + // @@protoc_insertion_point(enum_scope:google.cloud.discoveryengine.v1beta.SearchRequest.DisplaySpec.MatchHighlightingCondition) } - public static final int MODE_FIELD_NUMBER = 1; - private int mode_ = 0; + public static final int MATCH_HIGHLIGHTING_CONDITION_FIELD_NUMBER = 1; + private int matchHighlightingCondition_ = 0; /** * * *
            -     * The personalization mode of the search request.
            -     * Defaults to
            -     * [Mode.AUTO][google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec.Mode.AUTO].
            +     * The condition under which match highlighting should occur.
                  * 
            * - * .google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec.Mode mode = 1; + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.DisplaySpec.MatchHighlightingCondition match_highlighting_condition = 1; * * - * @return The enum numeric value on the wire for mode. + * @return The enum numeric value on the wire for matchHighlightingCondition. */ @java.lang.Override - public int getModeValue() { - return mode_; + public int getMatchHighlightingConditionValue() { + return matchHighlightingCondition_; } /** * * *
            -     * The personalization mode of the search request.
            -     * Defaults to
            -     * [Mode.AUTO][google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec.Mode.AUTO].
            +     * The condition under which match highlighting should occur.
                  * 
            * - * .google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec.Mode mode = 1; + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.DisplaySpec.MatchHighlightingCondition match_highlighting_condition = 1; * * - * @return The mode. + * @return The matchHighlightingCondition. */ @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec.Mode - getMode() { - com.google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec.Mode result = - com.google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec.Mode.forNumber( - mode_); + public com.google.cloud.discoveryengine.v1beta.SearchRequest.DisplaySpec + .MatchHighlightingCondition + getMatchHighlightingCondition() { + com.google.cloud.discoveryengine.v1beta.SearchRequest.DisplaySpec.MatchHighlightingCondition + result = + com.google.cloud.discoveryengine.v1beta.SearchRequest.DisplaySpec + .MatchHighlightingCondition.forNumber(matchHighlightingCondition_); return result == null - ? com.google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec.Mode - .UNRECOGNIZED + ? com.google.cloud.discoveryengine.v1beta.SearchRequest.DisplaySpec + .MatchHighlightingCondition.UNRECOGNIZED : result; } @@ -29979,11 +31561,11 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (mode_ - != com.google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec.Mode - .MODE_UNSPECIFIED + if (matchHighlightingCondition_ + != com.google.cloud.discoveryengine.v1beta.SearchRequest.DisplaySpec + .MatchHighlightingCondition.MATCH_HIGHLIGHTING_CONDITION_UNSPECIFIED .getNumber()) { - output.writeEnum(1, mode_); + output.writeEnum(1, matchHighlightingCondition_); } getUnknownFields().writeTo(output); } @@ -29994,11 +31576,12 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (mode_ - != com.google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec.Mode - .MODE_UNSPECIFIED + if (matchHighlightingCondition_ + != com.google.cloud.discoveryengine.v1beta.SearchRequest.DisplaySpec + .MatchHighlightingCondition.MATCH_HIGHLIGHTING_CONDITION_UNSPECIFIED .getNumber()) { - size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, mode_); + size += + com.google.protobuf.CodedOutputStream.computeEnumSize(1, matchHighlightingCondition_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -30010,14 +31593,13 @@ public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } - if (!(obj - instanceof com.google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec)) { + if (!(obj instanceof com.google.cloud.discoveryengine.v1beta.SearchRequest.DisplaySpec)) { return super.equals(obj); } - com.google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec other = - (com.google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec) obj; + com.google.cloud.discoveryengine.v1beta.SearchRequest.DisplaySpec other = + (com.google.cloud.discoveryengine.v1beta.SearchRequest.DisplaySpec) obj; - if (mode_ != other.mode_) return false; + if (matchHighlightingCondition_ != other.matchHighlightingCondition_) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -30029,70 +31611,66 @@ public int hashCode() { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + MODE_FIELD_NUMBER; - hash = (53 * hash) + mode_; + hash = (37 * hash) + MATCH_HIGHLIGHTING_CONDITION_FIELD_NUMBER; + hash = (53 * hash) + matchHighlightingCondition_; hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } - public static com.google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec - parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { + public static com.google.cloud.discoveryengine.v1beta.SearchRequest.DisplaySpec parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec - parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { + public static com.google.cloud.discoveryengine.v1beta.SearchRequest.DisplaySpec 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.discoveryengine.v1beta.SearchRequest.PersonalizationSpec - parseFrom(com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { + public static com.google.cloud.discoveryengine.v1beta.SearchRequest.DisplaySpec parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec - parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { + public static com.google.cloud.discoveryengine.v1beta.SearchRequest.DisplaySpec 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.discoveryengine.v1beta.SearchRequest.PersonalizationSpec - parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + public static com.google.cloud.discoveryengine.v1beta.SearchRequest.DisplaySpec parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec - parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { + public static com.google.cloud.discoveryengine.v1beta.SearchRequest.DisplaySpec parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec - parseFrom(java.io.InputStream input) throws java.io.IOException { + public static com.google.cloud.discoveryengine.v1beta.SearchRequest.DisplaySpec parseFrom( + java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } - public static com.google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec - parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { + public static com.google.cloud.discoveryengine.v1beta.SearchRequest.DisplaySpec 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.discoveryengine.v1beta.SearchRequest.PersonalizationSpec + public static com.google.cloud.discoveryengine.v1beta.SearchRequest.DisplaySpec parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); } - public static com.google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec + public static com.google.cloud.discoveryengine.v1beta.SearchRequest.DisplaySpec parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -30100,16 +31678,15 @@ public int hashCode() { PARSER, input, extensionRegistry); } - public static com.google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec - parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + public static com.google.cloud.discoveryengine.v1beta.SearchRequest.DisplaySpec parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } - public static com.google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec - parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { + public static com.google.cloud.discoveryengine.v1beta.SearchRequest.DisplaySpec parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { return com.google.protobuf.GeneratedMessage.parseWithIOException( PARSER, input, extensionRegistry); } @@ -30124,7 +31701,7 @@ public static Builder newBuilder() { } public static Builder newBuilder( - com.google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec prototype) { + com.google.cloud.discoveryengine.v1beta.SearchRequest.DisplaySpec prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @@ -30143,33 +31720,32 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.Builder * * *
            -     * The specification for personalization.
            +     * Specifies features for display, like match highlighting.
                  * 
            * - * Protobuf type {@code google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec} + * Protobuf type {@code google.cloud.discoveryengine.v1beta.SearchRequest.DisplaySpec} */ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec) - com.google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpecOrBuilder { + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.SearchRequest.DisplaySpec) + com.google.cloud.discoveryengine.v1beta.SearchRequest.DisplaySpecOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.discoveryengine.v1beta.SearchServiceProto - .internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_PersonalizationSpec_descriptor; + .internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_DisplaySpec_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.discoveryengine.v1beta.SearchServiceProto - .internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_PersonalizationSpec_fieldAccessorTable + .internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_DisplaySpec_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec.class, - com.google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec.Builder - .class); + com.google.cloud.discoveryengine.v1beta.SearchRequest.DisplaySpec.class, + com.google.cloud.discoveryengine.v1beta.SearchRequest.DisplaySpec.Builder.class); } // Construct using - // com.google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec.newBuilder() + // com.google.cloud.discoveryengine.v1beta.SearchRequest.DisplaySpec.newBuilder() private Builder() {} private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { @@ -30180,27 +31756,26 @@ private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { public Builder clear() { super.clear(); bitField0_ = 0; - mode_ = 0; + matchHighlightingCondition_ = 0; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.cloud.discoveryengine.v1beta.SearchServiceProto - .internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_PersonalizationSpec_descriptor; + .internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_DisplaySpec_descriptor; } @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec + public com.google.cloud.discoveryengine.v1beta.SearchRequest.DisplaySpec getDefaultInstanceForType() { - return com.google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec + return com.google.cloud.discoveryengine.v1beta.SearchRequest.DisplaySpec .getDefaultInstance(); } @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec build() { - com.google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec result = - buildPartial(); + public com.google.cloud.discoveryengine.v1beta.SearchRequest.DisplaySpec build() { + com.google.cloud.discoveryengine.v1beta.SearchRequest.DisplaySpec result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } @@ -30208,10 +31783,9 @@ public com.google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec } @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec - buildPartial() { - com.google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec result = - new com.google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec(this); + public com.google.cloud.discoveryengine.v1beta.SearchRequest.DisplaySpec buildPartial() { + com.google.cloud.discoveryengine.v1beta.SearchRequest.DisplaySpec result = + new com.google.cloud.discoveryengine.v1beta.SearchRequest.DisplaySpec(this); if (bitField0_ != 0) { buildPartial0(result); } @@ -30220,19 +31794,18 @@ public com.google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec } private void buildPartial0( - com.google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec result) { + com.google.cloud.discoveryengine.v1beta.SearchRequest.DisplaySpec result) { int from_bitField0_ = bitField0_; if (((from_bitField0_ & 0x00000001) != 0)) { - result.mode_ = mode_; + result.matchHighlightingCondition_ = matchHighlightingCondition_; } } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { - if (other - instanceof com.google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec) { + if (other instanceof com.google.cloud.discoveryengine.v1beta.SearchRequest.DisplaySpec) { return mergeFrom( - (com.google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec) other); + (com.google.cloud.discoveryengine.v1beta.SearchRequest.DisplaySpec) other); } else { super.mergeFrom(other); return this; @@ -30240,12 +31813,12 @@ public Builder mergeFrom(com.google.protobuf.Message other) { } public Builder mergeFrom( - com.google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec other) { + com.google.cloud.discoveryengine.v1beta.SearchRequest.DisplaySpec other) { if (other - == com.google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec + == com.google.cloud.discoveryengine.v1beta.SearchRequest.DisplaySpec .getDefaultInstance()) return this; - if (other.mode_ != 0) { - setModeValue(other.getModeValue()); + if (other.matchHighlightingCondition_ != 0) { + setMatchHighlightingConditionValue(other.getMatchHighlightingConditionValue()); } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); @@ -30275,7 +31848,7 @@ public Builder mergeFrom( break; case 8: { - mode_ = input.readEnum(); + matchHighlightingCondition_ = input.readEnum(); bitField0_ |= 0x00000001; break; } // case 8 @@ -30298,44 +31871,42 @@ public Builder mergeFrom( private int bitField0_; - private int mode_ = 0; + private int matchHighlightingCondition_ = 0; /** * * *
            -       * The personalization mode of the search request.
            -       * Defaults to
            -       * [Mode.AUTO][google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec.Mode.AUTO].
            +       * The condition under which match highlighting should occur.
                    * 
            * - * .google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec.Mode mode = 1; + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.DisplaySpec.MatchHighlightingCondition match_highlighting_condition = 1; * * - * @return The enum numeric value on the wire for mode. + * @return The enum numeric value on the wire for matchHighlightingCondition. */ @java.lang.Override - public int getModeValue() { - return mode_; + public int getMatchHighlightingConditionValue() { + return matchHighlightingCondition_; } /** * * *
            -       * The personalization mode of the search request.
            -       * Defaults to
            -       * [Mode.AUTO][google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec.Mode.AUTO].
            +       * The condition under which match highlighting should occur.
                    * 
            * - * .google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec.Mode mode = 1; + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.DisplaySpec.MatchHighlightingCondition match_highlighting_condition = 1; * * - * @param value The enum numeric value on the wire for mode to set. + * @param value The enum numeric value on the wire for matchHighlightingCondition to set. * @return This builder for chaining. */ - public Builder setModeValue(int value) { - mode_ = value; + public Builder setMatchHighlightingConditionValue(int value) { + matchHighlightingCondition_ = value; bitField0_ |= 0x00000001; onChanged(); return this; @@ -30345,25 +31916,26 @@ public Builder setModeValue(int value) { * * *
            -       * The personalization mode of the search request.
            -       * Defaults to
            -       * [Mode.AUTO][google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec.Mode.AUTO].
            +       * The condition under which match highlighting should occur.
                    * 
            * - * .google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec.Mode mode = 1; + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.DisplaySpec.MatchHighlightingCondition match_highlighting_condition = 1; * * - * @return The mode. + * @return The matchHighlightingCondition. */ @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec.Mode - getMode() { - com.google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec.Mode result = - com.google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec.Mode - .forNumber(mode_); + public com.google.cloud.discoveryengine.v1beta.SearchRequest.DisplaySpec + .MatchHighlightingCondition + getMatchHighlightingCondition() { + com.google.cloud.discoveryengine.v1beta.SearchRequest.DisplaySpec.MatchHighlightingCondition + result = + com.google.cloud.discoveryengine.v1beta.SearchRequest.DisplaySpec + .MatchHighlightingCondition.forNumber(matchHighlightingCondition_); return result == null - ? com.google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec.Mode - .UNRECOGNIZED + ? com.google.cloud.discoveryengine.v1beta.SearchRequest.DisplaySpec + .MatchHighlightingCondition.UNRECOGNIZED : result; } @@ -30371,24 +31943,25 @@ public Builder setModeValue(int value) { * * *
            -       * The personalization mode of the search request.
            -       * Defaults to
            -       * [Mode.AUTO][google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec.Mode.AUTO].
            +       * The condition under which match highlighting should occur.
                    * 
            * - * .google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec.Mode mode = 1; + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.DisplaySpec.MatchHighlightingCondition match_highlighting_condition = 1; * * - * @param value The mode to set. + * @param value The matchHighlightingCondition to set. * @return This builder for chaining. */ - public Builder setMode( - com.google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec.Mode value) { + public Builder setMatchHighlightingCondition( + com.google.cloud.discoveryengine.v1beta.SearchRequest.DisplaySpec + .MatchHighlightingCondition + value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000001; - mode_ = value.getNumber(); + matchHighlightingCondition_ = value.getNumber(); onChanged(); return this; } @@ -30397,44 +31970,42 @@ public Builder setMode( * * *
            -       * The personalization mode of the search request.
            -       * Defaults to
            -       * [Mode.AUTO][google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec.Mode.AUTO].
            +       * The condition under which match highlighting should occur.
                    * 
            * - * .google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec.Mode mode = 1; + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.DisplaySpec.MatchHighlightingCondition match_highlighting_condition = 1; * * * @return This builder for chaining. */ - public Builder clearMode() { + public Builder clearMatchHighlightingCondition() { bitField0_ = (bitField0_ & ~0x00000001); - mode_ = 0; + matchHighlightingCondition_ = 0; onChanged(); return this; } - // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec) + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.SearchRequest.DisplaySpec) } - // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec) - private static final com.google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.SearchRequest.DisplaySpec) + private static final com.google.cloud.discoveryengine.v1beta.SearchRequest.DisplaySpec DEFAULT_INSTANCE; static { - DEFAULT_INSTANCE = - new com.google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec(); + DEFAULT_INSTANCE = new com.google.cloud.discoveryengine.v1beta.SearchRequest.DisplaySpec(); } - public static com.google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec + public static com.google.cloud.discoveryengine.v1beta.SearchRequest.DisplaySpec getDefaultInstance() { return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { @java.lang.Override - public PersonalizationSpec parsePartialFrom( + public DisplaySpec parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { @@ -30454,3919 +32025,14310 @@ public PersonalizationSpec parsePartialFrom( } }; - public static com.google.protobuf.Parser parser() { + public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override - public com.google.protobuf.Parser getParserForType() { + public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec + public com.google.cloud.discoveryengine.v1beta.SearchRequest.DisplaySpec getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } - private int bitField0_; - public static final int SERVING_CONFIG_FIELD_NUMBER = 1; + public interface CrowdingSpecOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.SearchRequest.CrowdingSpec) + com.google.protobuf.MessageOrBuilder { - @SuppressWarnings("serial") - private volatile java.lang.Object servingConfig_ = ""; + /** + * + * + *
            +     * The field to use for crowding. Documents can be crowded by a field in the
            +     * [Document][google.cloud.discoveryengine.v1beta.Document] object. Crowding
            +     * field is case sensitive.
            +     * 
            + * + * string field = 1; + * + * @return The field. + */ + java.lang.String getField(); - /** - * - * - *
            -   * Required. The resource name of the Search serving config, such as
            -   * `projects/*/locations/global/collections/default_collection/engines/*/servingConfigs/default_serving_config`,
            -   * or
            -   * `projects/*/locations/global/collections/default_collection/dataStores/default_data_store/servingConfigs/default_serving_config`.
            -   * This field is used to identify the serving configuration name, set
            -   * of models used to make the search.
            -   * 
            - * - * - * string serving_config = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The servingConfig. - */ - @java.lang.Override - public java.lang.String getServingConfig() { - java.lang.Object ref = servingConfig_; - 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(); - servingConfig_ = s; - return s; - } + /** + * + * + *
            +     * The field to use for crowding. Documents can be crowded by a field in the
            +     * [Document][google.cloud.discoveryengine.v1beta.Document] object. Crowding
            +     * field is case sensitive.
            +     * 
            + * + * string field = 1; + * + * @return The bytes for field. + */ + com.google.protobuf.ByteString getFieldBytes(); + + /** + * + * + *
            +     * The maximum number of documents to keep per value of the field. Once
            +     * there are at least max_count previous results which contain the same
            +     * value for the given field (according to the order specified in
            +     * `order_by`), later results with the same value are "crowded away".
            +     * If not specified, the default value is 1.
            +     * 
            + * + * int32 max_count = 2; + * + * @return The maxCount. + */ + int getMaxCount(); + + /** + * + * + *
            +     * Mode to use for documents that are crowded away.
            +     * 
            + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.CrowdingSpec.Mode mode = 3; + * + * @return The enum numeric value on the wire for mode. + */ + int getModeValue(); + + /** + * + * + *
            +     * Mode to use for documents that are crowded away.
            +     * 
            + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.CrowdingSpec.Mode mode = 3; + * + * @return The mode. + */ + com.google.cloud.discoveryengine.v1beta.SearchRequest.CrowdingSpec.Mode getMode(); } /** * * *
            -   * Required. The resource name of the Search serving config, such as
            -   * `projects/*/locations/global/collections/default_collection/engines/*/servingConfigs/default_serving_config`,
            -   * or
            -   * `projects/*/locations/global/collections/default_collection/dataStores/default_data_store/servingConfigs/default_serving_config`.
            -   * This field is used to identify the serving configuration name, set
            -   * of models used to make the search.
            +   * Specification for crowding. Crowding improves the diversity of search
            +   * results by limiting the number of results that share the same field value.
            +   * For example, crowding on the color field with a max_count of 3 and mode
            +   * DROP_CROWDED_RESULTS will return at most 3 results with the same color
            +   * across all pages.
                * 
            * - * - * string serving_config = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for servingConfig. + * Protobuf type {@code google.cloud.discoveryengine.v1beta.SearchRequest.CrowdingSpec} */ - @java.lang.Override - public com.google.protobuf.ByteString getServingConfigBytes() { - java.lang.Object ref = servingConfig_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - servingConfig_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; + public static final class CrowdingSpec extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.SearchRequest.CrowdingSpec) + CrowdingSpecOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "CrowdingSpec"); } - } - public static final int BRANCH_FIELD_NUMBER = 2; + // Use CrowdingSpec.newBuilder() to construct. + private CrowdingSpec(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } - @SuppressWarnings("serial") - private volatile java.lang.Object branch_ = ""; + private CrowdingSpec() { + field_ = ""; + mode_ = 0; + } - /** - * - * - *
            -   * The branch resource name, such as
            -   * `projects/*/locations/global/collections/default_collection/dataStores/default_data_store/branches/0`.
            -   *
            -   * Use `default_branch` as the branch ID or leave this field empty, to search
            -   * documents under the default branch.
            -   * 
            - * - * string branch = 2 [(.google.api.resource_reference) = { ... } - * - * @return The branch. - */ - @java.lang.Override - public java.lang.String getBranch() { - java.lang.Object ref = branch_; - 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(); - branch_ = s; - return s; + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_CrowdingSpec_descriptor; } - } - /** - * - * - *
            -   * The branch resource name, such as
            -   * `projects/*/locations/global/collections/default_collection/dataStores/default_data_store/branches/0`.
            -   *
            -   * Use `default_branch` as the branch ID or leave this field empty, to search
            -   * documents under the default branch.
            -   * 
            - * - * string branch = 2 [(.google.api.resource_reference) = { ... } - * - * @return The bytes for branch. - */ - @java.lang.Override - public com.google.protobuf.ByteString getBranchBytes() { - java.lang.Object ref = branch_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - branch_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_CrowdingSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.SearchRequest.CrowdingSpec.class, + com.google.cloud.discoveryengine.v1beta.SearchRequest.CrowdingSpec.Builder.class); } - } - public static final int QUERY_FIELD_NUMBER = 3; + /** + * + * + *
            +     * Enum describing the mode to use for documents that are crowded away.
            +     * They can be dropped or demoted to the later pages.
            +     * 
            + * + * Protobuf enum {@code google.cloud.discoveryengine.v1beta.SearchRequest.CrowdingSpec.Mode} + */ + public enum Mode implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
            +       * Unspecified crowding mode. In this case, server behavior defaults to
            +       * [Mode.DROP_CROWDED_RESULTS][google.cloud.discoveryengine.v1beta.SearchRequest.CrowdingSpec.Mode.DROP_CROWDED_RESULTS].
            +       * 
            + * + * MODE_UNSPECIFIED = 0; + */ + MODE_UNSPECIFIED(0), + /** + * + * + *
            +       * Drop crowded results.
            +       * 
            + * + * DROP_CROWDED_RESULTS = 1; + */ + DROP_CROWDED_RESULTS(1), + /** + * + * + *
            +       * Demote crowded results to the later pages.
            +       * 
            + * + * DEMOTE_CROWDED_RESULTS_TO_END = 2; + */ + DEMOTE_CROWDED_RESULTS_TO_END(2), + UNRECOGNIZED(-1), + ; - @SuppressWarnings("serial") - private volatile java.lang.Object query_ = ""; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Mode"); + } - /** - * - * - *
            -   * Raw search query.
            -   * 
            - * - * string query = 3; - * - * @return The query. - */ - @java.lang.Override - public java.lang.String getQuery() { - java.lang.Object ref = query_; - 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(); - query_ = s; - return s; - } - } + /** + * + * + *
            +       * Unspecified crowding mode. In this case, server behavior defaults to
            +       * [Mode.DROP_CROWDED_RESULTS][google.cloud.discoveryengine.v1beta.SearchRequest.CrowdingSpec.Mode.DROP_CROWDED_RESULTS].
            +       * 
            + * + * MODE_UNSPECIFIED = 0; + */ + public static final int MODE_UNSPECIFIED_VALUE = 0; - /** - * - * - *
            -   * Raw search query.
            -   * 
            - * - * string query = 3; - * - * @return The bytes for query. - */ - @java.lang.Override - public com.google.protobuf.ByteString getQueryBytes() { - java.lang.Object ref = query_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - query_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } + /** + * + * + *
            +       * Drop crowded results.
            +       * 
            + * + * DROP_CROWDED_RESULTS = 1; + */ + public static final int DROP_CROWDED_RESULTS_VALUE = 1; - public static final int IMAGE_QUERY_FIELD_NUMBER = 19; - private com.google.cloud.discoveryengine.v1beta.SearchRequest.ImageQuery imageQuery_; + /** + * + * + *
            +       * Demote crowded results to the later pages.
            +       * 
            + * + * DEMOTE_CROWDED_RESULTS_TO_END = 2; + */ + public static final int DEMOTE_CROWDED_RESULTS_TO_END_VALUE = 2; - /** - * - * - *
            -   * Raw image query.
            -   * 
            - * - * .google.cloud.discoveryengine.v1beta.SearchRequest.ImageQuery image_query = 19; - * - * @return Whether the imageQuery field is set. - */ - @java.lang.Override - public boolean hasImageQuery() { - return ((bitField0_ & 0x00000001) != 0); - } + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } - /** - * - * - *
            -   * Raw image query.
            -   * 
            - * - * .google.cloud.discoveryengine.v1beta.SearchRequest.ImageQuery image_query = 19; - * - * @return The imageQuery. - */ - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.SearchRequest.ImageQuery getImageQuery() { - return imageQuery_ == null - ? com.google.cloud.discoveryengine.v1beta.SearchRequest.ImageQuery.getDefaultInstance() - : imageQuery_; - } + /** + * @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 Mode valueOf(int value) { + return forNumber(value); + } - /** - * - * - *
            -   * Raw image query.
            -   * 
            - * - * .google.cloud.discoveryengine.v1beta.SearchRequest.ImageQuery image_query = 19; - */ - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.SearchRequest.ImageQueryOrBuilder - getImageQueryOrBuilder() { - return imageQuery_ == null - ? com.google.cloud.discoveryengine.v1beta.SearchRequest.ImageQuery.getDefaultInstance() - : imageQuery_; - } + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static Mode forNumber(int value) { + switch (value) { + case 0: + return MODE_UNSPECIFIED; + case 1: + return DROP_CROWDED_RESULTS; + case 2: + return DEMOTE_CROWDED_RESULTS_TO_END; + default: + return null; + } + } - public static final int PAGE_SIZE_FIELD_NUMBER = 4; - private int pageSize_ = 0; + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } - /** - * - * - *
            -   * Maximum number of [Document][google.cloud.discoveryengine.v1beta.Document]s
            -   * to return. The maximum allowed value depends on the data type. Values above
            -   * the maximum value are coerced to the maximum value.
            -   *
            -   * * Websites with basic indexing: Default `10`, Maximum `25`.
            -   * * Websites with advanced indexing: Default `25`, Maximum `50`.
            -   * * Other: Default `50`, Maximum `100`.
            -   *
            -   * If this field is negative, an  `INVALID_ARGUMENT` is returned.
            -   * 
            - * - * int32 page_size = 4; - * - * @return The pageSize. - */ - @java.lang.Override - public int getPageSize() { - return pageSize_; - } + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public Mode findValueByNumber(int number) { + return Mode.forNumber(number); + } + }; - public static final int PAGE_TOKEN_FIELD_NUMBER = 5; + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } - @SuppressWarnings("serial") - private volatile java.lang.Object pageToken_ = ""; + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } - /** - * - * - *
            -   * A page token received from a previous
            -   * [SearchService.Search][google.cloud.discoveryengine.v1beta.SearchService.Search]
            -   * call. Provide this to retrieve the subsequent page.
            -   *
            -   * When paginating, all other parameters provided to
            -   * [SearchService.Search][google.cloud.discoveryengine.v1beta.SearchService.Search]
            -   * must match the call that provided the page token. Otherwise, an
            -   * `INVALID_ARGUMENT`  error is returned.
            -   * 
            - * - * string page_token = 5; - * - * @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; - } - } + public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.SearchRequest.CrowdingSpec.getDescriptor() + .getEnumTypes() + .get(0); + } - /** - * - * - *
            -   * A page token received from a previous
            -   * [SearchService.Search][google.cloud.discoveryengine.v1beta.SearchService.Search]
            -   * call. Provide this to retrieve the subsequent page.
            -   *
            -   * When paginating, all other parameters provided to
            -   * [SearchService.Search][google.cloud.discoveryengine.v1beta.SearchService.Search]
            -   * must match the call that provided the page token. Otherwise, an
            -   * `INVALID_ARGUMENT`  error is returned.
            -   * 
            - * - * string page_token = 5; - * - * @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 OFFSET_FIELD_NUMBER = 6; - private int offset_ = 0; - - /** - * - * - *
            -   * A 0-indexed integer that specifies the current offset (that is, starting
            -   * result location, amongst the
            -   * [Document][google.cloud.discoveryengine.v1beta.Document]s deemed by the API
            -   * as relevant) in search results. This field is only considered if
            -   * [page_token][google.cloud.discoveryengine.v1beta.SearchRequest.page_token]
            -   * is unset.
            -   *
            -   * If this field is negative, an  `INVALID_ARGUMENT`  is returned.
            -   * 
            - * - * int32 offset = 6; - * - * @return The offset. - */ - @java.lang.Override - public int getOffset() { - return offset_; - } + private static final Mode[] VALUES = values(); - public static final int ONE_BOX_PAGE_SIZE_FIELD_NUMBER = 47; - private int oneBoxPageSize_ = 0; + public static Mode valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } - /** - * - * - *
            -   * The maximum number of results to return for OneBox.
            -   * This applies to each OneBox type individually.
            -   * Default number is 10.
            -   * 
            - * - * int32 one_box_page_size = 47; - * - * @return The oneBoxPageSize. - */ - @java.lang.Override - public int getOneBoxPageSize() { - return oneBoxPageSize_; - } + private final int value; - public static final int DATA_STORE_SPECS_FIELD_NUMBER = 32; + private Mode(int value) { + this.value = value; + } - @SuppressWarnings("serial") - private java.util.List - dataStoreSpecs_; + // @@protoc_insertion_point(enum_scope:google.cloud.discoveryengine.v1beta.SearchRequest.CrowdingSpec.Mode) + } - /** - * - * - *
            -   * Specs defining dataStores to filter on in a search call and configurations
            -   * for those dataStores. This is only considered for engines with multiple
            -   * dataStores use case. For single dataStore within an engine, they should
            -   * use the specs at the top level.
            -   * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec data_store_specs = 32; - * - */ - @java.lang.Override - public java.util.List - getDataStoreSpecsList() { - return dataStoreSpecs_; - } + public static final int FIELD_FIELD_NUMBER = 1; - /** - * - * - *
            -   * Specs defining dataStores to filter on in a search call and configurations
            -   * for those dataStores. This is only considered for engines with multiple
            -   * dataStores use case. For single dataStore within an engine, they should
            -   * use the specs at the top level.
            -   * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec data_store_specs = 32; - * - */ - @java.lang.Override - public java.util.List< - ? extends com.google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpecOrBuilder> - getDataStoreSpecsOrBuilderList() { - return dataStoreSpecs_; - } + @SuppressWarnings("serial") + private volatile java.lang.Object field_ = ""; - /** - * - * - *
            -   * Specs defining dataStores to filter on in a search call and configurations
            -   * for those dataStores. This is only considered for engines with multiple
            -   * dataStores use case. For single dataStore within an engine, they should
            -   * use the specs at the top level.
            -   * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec data_store_specs = 32; - * - */ - @java.lang.Override - public int getDataStoreSpecsCount() { - return dataStoreSpecs_.size(); - } + /** + * + * + *
            +     * The field to use for crowding. Documents can be crowded by a field in the
            +     * [Document][google.cloud.discoveryengine.v1beta.Document] object. Crowding
            +     * field is case sensitive.
            +     * 
            + * + * string field = 1; + * + * @return The field. + */ + @java.lang.Override + public java.lang.String getField() { + java.lang.Object ref = field_; + 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(); + field_ = s; + return s; + } + } - /** - * - * - *
            -   * Specs defining dataStores to filter on in a search call and configurations
            -   * for those dataStores. This is only considered for engines with multiple
            -   * dataStores use case. For single dataStore within an engine, they should
            -   * use the specs at the top level.
            -   * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec data_store_specs = 32; - * - */ - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec getDataStoreSpecs( - int index) { - return dataStoreSpecs_.get(index); - } + /** + * + * + *
            +     * The field to use for crowding. Documents can be crowded by a field in the
            +     * [Document][google.cloud.discoveryengine.v1beta.Document] object. Crowding
            +     * field is case sensitive.
            +     * 
            + * + * string field = 1; + * + * @return The bytes for field. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFieldBytes() { + java.lang.Object ref = field_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + field_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } - /** - * - * - *
            -   * Specs defining dataStores to filter on in a search call and configurations
            -   * for those dataStores. This is only considered for engines with multiple
            -   * dataStores use case. For single dataStore within an engine, they should
            -   * use the specs at the top level.
            -   * 
            - * - * - * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec data_store_specs = 32; - * - */ - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpecOrBuilder - getDataStoreSpecsOrBuilder(int index) { - return dataStoreSpecs_.get(index); - } + public static final int MAX_COUNT_FIELD_NUMBER = 2; + private int maxCount_ = 0; - public static final int FILTER_FIELD_NUMBER = 7; + /** + * + * + *
            +     * The maximum number of documents to keep per value of the field. Once
            +     * there are at least max_count previous results which contain the same
            +     * value for the given field (according to the order specified in
            +     * `order_by`), later results with the same value are "crowded away".
            +     * If not specified, the default value is 1.
            +     * 
            + * + * int32 max_count = 2; + * + * @return The maxCount. + */ + @java.lang.Override + public int getMaxCount() { + return maxCount_; + } - @SuppressWarnings("serial") - private volatile java.lang.Object filter_ = ""; + public static final int MODE_FIELD_NUMBER = 3; + private int mode_ = 0; - /** - * - * - *
            -   * The filter syntax consists of an expression language for constructing a
            -   * predicate from one or more fields of the documents being filtered. Filter
            -   * expression is case-sensitive.
            -   *
            -   * If this field is unrecognizable, an  `INVALID_ARGUMENT`  is returned.
            -   *
            -   * Filtering in Vertex AI Search is done by mapping the LHS filter key to a
            -   * key property defined in the Vertex AI Search backend -- this mapping is
            -   * defined by the customer in their schema. For example a media customer might
            -   * have a field 'name' in their schema. In this case the filter would look
            -   * like this: filter --> name:'ANY("king kong")'
            -   *
            -   * For more information about filtering including syntax and filter
            -   * operators, see
            -   * [Filter](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata)
            -   * 
            - * - * string filter = 7; - * - * @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; + /** + * + * + *
            +     * Mode to use for documents that are crowded away.
            +     * 
            + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.CrowdingSpec.Mode mode = 3; + * + * @return The enum numeric value on the wire for mode. + */ + @java.lang.Override + public int getModeValue() { + return mode_; } - } - /** - * - * - *
            -   * The filter syntax consists of an expression language for constructing a
            -   * predicate from one or more fields of the documents being filtered. Filter
            -   * expression is case-sensitive.
            -   *
            -   * If this field is unrecognizable, an  `INVALID_ARGUMENT`  is returned.
            -   *
            -   * Filtering in Vertex AI Search is done by mapping the LHS filter key to a
            -   * key property defined in the Vertex AI Search backend -- this mapping is
            -   * defined by the customer in their schema. For example a media customer might
            -   * have a field 'name' in their schema. In this case the filter would look
            -   * like this: filter --> name:'ANY("king kong")'
            -   *
            -   * For more information about filtering including syntax and filter
            -   * operators, see
            -   * [Filter](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata)
            -   * 
            - * - * string filter = 7; - * - * @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; + /** + * + * + *
            +     * Mode to use for documents that are crowded away.
            +     * 
            + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.CrowdingSpec.Mode mode = 3; + * + * @return The mode. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.SearchRequest.CrowdingSpec.Mode getMode() { + com.google.cloud.discoveryengine.v1beta.SearchRequest.CrowdingSpec.Mode result = + com.google.cloud.discoveryengine.v1beta.SearchRequest.CrowdingSpec.Mode.forNumber(mode_); + return result == null + ? com.google.cloud.discoveryengine.v1beta.SearchRequest.CrowdingSpec.Mode.UNRECOGNIZED + : result; } - } - public static final int CANONICAL_FILTER_FIELD_NUMBER = 29; + private byte memoizedIsInitialized = -1; - @SuppressWarnings("serial") - private volatile java.lang.Object canonicalFilter_ = ""; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; - /** - * - * - *
            -   * The default filter that is applied when a user performs a search without
            -   * checking any filters on the search page.
            -   *
            -   * The filter applied to every search request when quality improvement such as
            -   * query expansion is needed. In the case a query does not have a sufficient
            -   * amount of results this filter will be used to determine whether or not to
            -   * enable the query expansion flow. The original filter will still be used for
            -   * the query expanded search.
            -   * This field is strongly recommended to achieve high search quality.
            -   *
            -   * For more information about filter syntax, see
            -   * [SearchRequest.filter][google.cloud.discoveryengine.v1beta.SearchRequest.filter].
            -   * 
            - * - * string canonical_filter = 29; - * - * @return The canonicalFilter. - */ - @java.lang.Override - public java.lang.String getCanonicalFilter() { - java.lang.Object ref = canonicalFilter_; - 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(); - canonicalFilter_ = s; - return s; + memoizedIsInitialized = 1; + return true; } - } - /** - * - * - *
            -   * The default filter that is applied when a user performs a search without
            -   * checking any filters on the search page.
            -   *
            -   * The filter applied to every search request when quality improvement such as
            -   * query expansion is needed. In the case a query does not have a sufficient
            -   * amount of results this filter will be used to determine whether or not to
            -   * enable the query expansion flow. The original filter will still be used for
            -   * the query expanded search.
            -   * This field is strongly recommended to achieve high search quality.
            -   *
            -   * For more information about filter syntax, see
            -   * [SearchRequest.filter][google.cloud.discoveryengine.v1beta.SearchRequest.filter].
            -   * 
            - * - * string canonical_filter = 29; - * - * @return The bytes for canonicalFilter. - */ - @java.lang.Override - public com.google.protobuf.ByteString getCanonicalFilterBytes() { - java.lang.Object ref = canonicalFilter_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - canonicalFilter_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(field_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, field_); + } + if (maxCount_ != 0) { + output.writeInt32(2, maxCount_); + } + if (mode_ + != com.google.cloud.discoveryengine.v1beta.SearchRequest.CrowdingSpec.Mode + .MODE_UNSPECIFIED + .getNumber()) { + output.writeEnum(3, mode_); + } + getUnknownFields().writeTo(output); } - } - public static final int ORDER_BY_FIELD_NUMBER = 8; + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; - @SuppressWarnings("serial") - private volatile java.lang.Object orderBy_ = ""; + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(field_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, field_); + } + if (maxCount_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, maxCount_); + } + if (mode_ + != com.google.cloud.discoveryengine.v1beta.SearchRequest.CrowdingSpec.Mode + .MODE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(3, mode_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } - /** - * - * - *
            -   * The order in which documents are returned. Documents can be ordered by
            -   * a field in an [Document][google.cloud.discoveryengine.v1beta.Document]
            -   * object. Leave it unset if ordered by relevance. `order_by` expression is
            -   * case-sensitive.
            -   *
            -   * For more information on ordering the website search results, see
            -   * [Order web search
            -   * results](https://cloud.google.com/generative-ai-app-builder/docs/order-web-search-results).
            -   * For more information on ordering the healthcare search results, see
            -   * [Order healthcare search
            -   * results](https://cloud.google.com/generative-ai-app-builder/docs/order-hc-results).
            -   * If this field is unrecognizable, an `INVALID_ARGUMENT` is returned.
            -   * 
            - * - * string order_by = 8; - * - * @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; + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.discoveryengine.v1beta.SearchRequest.CrowdingSpec)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1beta.SearchRequest.CrowdingSpec other = + (com.google.cloud.discoveryengine.v1beta.SearchRequest.CrowdingSpec) obj; + + if (!getField().equals(other.getField())) return false; + if (getMaxCount() != other.getMaxCount()) return false; + if (mode_ != other.mode_) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; } - } - /** - * - * - *
            -   * The order in which documents are returned. Documents can be ordered by
            -   * a field in an [Document][google.cloud.discoveryengine.v1beta.Document]
            -   * object. Leave it unset if ordered by relevance. `order_by` expression is
            -   * case-sensitive.
            -   *
            -   * For more information on ordering the website search results, see
            -   * [Order web search
            -   * results](https://cloud.google.com/generative-ai-app-builder/docs/order-web-search-results).
            -   * For more information on ordering the healthcare search results, see
            -   * [Order healthcare search
            -   * results](https://cloud.google.com/generative-ai-app-builder/docs/order-hc-results).
            -   * If this field is unrecognizable, an `INVALID_ARGUMENT` is returned.
            -   * 
            - * - * string order_by = 8; - * - * @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; + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + FIELD_FIELD_NUMBER; + hash = (53 * hash) + getField().hashCode(); + hash = (37 * hash) + MAX_COUNT_FIELD_NUMBER; + hash = (53 * hash) + getMaxCount(); + hash = (37 * hash) + MODE_FIELD_NUMBER; + hash = (53 * hash) + mode_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; } - } - public static final int USER_INFO_FIELD_NUMBER = 21; - private com.google.cloud.discoveryengine.v1beta.UserInfo userInfo_; + public static com.google.cloud.discoveryengine.v1beta.SearchRequest.CrowdingSpec parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - /** - * - * - *
            -   * Information about the end user.
            -   * Highly recommended for analytics.
            -   * [UserInfo.user_agent][google.cloud.discoveryengine.v1beta.UserInfo.user_agent]
            -   * is used to deduce `device_type` for analytics.
            -   * 
            - * - * .google.cloud.discoveryengine.v1beta.UserInfo user_info = 21; - * - * @return Whether the userInfo field is set. - */ - @java.lang.Override - public boolean hasUserInfo() { - return ((bitField0_ & 0x00000002) != 0); - } + public static com.google.cloud.discoveryengine.v1beta.SearchRequest.CrowdingSpec parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - /** - * - * - *
            -   * Information about the end user.
            -   * Highly recommended for analytics.
            -   * [UserInfo.user_agent][google.cloud.discoveryengine.v1beta.UserInfo.user_agent]
            -   * is used to deduce `device_type` for analytics.
            -   * 
            - * - * .google.cloud.discoveryengine.v1beta.UserInfo user_info = 21; - * - * @return The userInfo. - */ - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.UserInfo getUserInfo() { - return userInfo_ == null - ? com.google.cloud.discoveryengine.v1beta.UserInfo.getDefaultInstance() - : userInfo_; - } + public static com.google.cloud.discoveryengine.v1beta.SearchRequest.CrowdingSpec parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - /** - * - * - *
            -   * Information about the end user.
            -   * Highly recommended for analytics.
            -   * [UserInfo.user_agent][google.cloud.discoveryengine.v1beta.UserInfo.user_agent]
            -   * is used to deduce `device_type` for analytics.
            -   * 
            - * - * .google.cloud.discoveryengine.v1beta.UserInfo user_info = 21; - */ - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.UserInfoOrBuilder getUserInfoOrBuilder() { - return userInfo_ == null - ? com.google.cloud.discoveryengine.v1beta.UserInfo.getDefaultInstance() - : userInfo_; - } + public static com.google.cloud.discoveryengine.v1beta.SearchRequest.CrowdingSpec parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - public static final int LANGUAGE_CODE_FIELD_NUMBER = 35; + public static com.google.cloud.discoveryengine.v1beta.SearchRequest.CrowdingSpec parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - @SuppressWarnings("serial") - private volatile java.lang.Object languageCode_ = ""; + public static com.google.cloud.discoveryengine.v1beta.SearchRequest.CrowdingSpec parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - /** - * - * - *
            -   * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
            -   * information, see [Standard
            -   * fields](https://cloud.google.com/apis/design/standard_fields). This field
            -   * helps to better interpret the query. If a value isn't specified, the query
            -   * language code is automatically detected, which may not be accurate.
            -   * 
            - * - * string language_code = 35; - * - * @return The languageCode. - */ - @java.lang.Override - public java.lang.String getLanguageCode() { - java.lang.Object ref = languageCode_; - 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(); - languageCode_ = s; - return s; + public static com.google.cloud.discoveryengine.v1beta.SearchRequest.CrowdingSpec parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } - } - /** - * - * - *
            -   * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
            -   * information, see [Standard
            -   * fields](https://cloud.google.com/apis/design/standard_fields). This field
            -   * helps to better interpret the query. If a value isn't specified, the query
            -   * language code is automatically detected, which may not be accurate.
            -   * 
            - * - * string language_code = 35; - * - * @return The bytes for languageCode. - */ - @java.lang.Override - public com.google.protobuf.ByteString getLanguageCodeBytes() { - java.lang.Object ref = languageCode_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - languageCode_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; + public static com.google.cloud.discoveryengine.v1beta.SearchRequest.CrowdingSpec 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 final int REGION_CODE_FIELD_NUMBER = 36; + public static com.google.cloud.discoveryengine.v1beta.SearchRequest.CrowdingSpec + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } - @SuppressWarnings("serial") - private volatile java.lang.Object regionCode_ = ""; + public static com.google.cloud.discoveryengine.v1beta.SearchRequest.CrowdingSpec + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } - /** - * - * - *
            -   * The Unicode country/region code (CLDR) of a location, such as "US" and
            -   * "419". For more information, see [Standard
            -   * fields](https://cloud.google.com/apis/design/standard_fields). If set,
            -   * then results will be boosted based on the region_code provided.
            -   * 
            - * - * string region_code = 36; - * - * @return The regionCode. - */ - @java.lang.Override - public java.lang.String getRegionCode() { - java.lang.Object ref = regionCode_; - 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(); - regionCode_ = s; - return s; + public static com.google.cloud.discoveryengine.v1beta.SearchRequest.CrowdingSpec parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } - } - /** - * - * - *
            -   * The Unicode country/region code (CLDR) of a location, such as "US" and
            -   * "419". For more information, see [Standard
            -   * fields](https://cloud.google.com/apis/design/standard_fields). If set,
            -   * then results will be boosted based on the region_code provided.
            -   * 
            - * - * string region_code = 36; - * - * @return The bytes for regionCode. - */ - @java.lang.Override - public com.google.protobuf.ByteString getRegionCodeBytes() { - java.lang.Object ref = regionCode_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - regionCode_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; + public static com.google.cloud.discoveryengine.v1beta.SearchRequest.CrowdingSpec parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); } - } - public static final int FACET_SPECS_FIELD_NUMBER = 9; + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } - @SuppressWarnings("serial") - private java.util.List - facetSpecs_; + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } - /** - * - * - *
            -   * Facet specifications for faceted search. If empty, no facets are returned.
            -   *
            -   * A maximum of 100 values are allowed. Otherwise, an  `INVALID_ARGUMENT`
            -   * error is returned.
            -   * 
            - * - * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec facet_specs = 9; - * - */ - @java.lang.Override - public java.util.List - getFacetSpecsList() { - return facetSpecs_; - } + public static Builder newBuilder( + com.google.cloud.discoveryengine.v1beta.SearchRequest.CrowdingSpec prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } - /** - * - * - *
            -   * Facet specifications for faceted search. If empty, no facets are returned.
            -   *
            -   * A maximum of 100 values are allowed. Otherwise, an  `INVALID_ARGUMENT`
            -   * error is returned.
            -   * 
            - * - * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec facet_specs = 9; - * - */ - @java.lang.Override - public java.util.List< - ? extends com.google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpecOrBuilder> - getFacetSpecsOrBuilderList() { - return facetSpecs_; - } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } - /** - * - * - *
            -   * Facet specifications for faceted search. If empty, no facets are returned.
            -   *
            -   * A maximum of 100 values are allowed. Otherwise, an  `INVALID_ARGUMENT`
            -   * error is returned.
            -   * 
            - * - * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec facet_specs = 9; - * - */ - @java.lang.Override - public int getFacetSpecsCount() { - return facetSpecs_.size(); - } + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } - /** - * - * - *
            -   * Facet specifications for faceted search. If empty, no facets are returned.
            -   *
            -   * A maximum of 100 values are allowed. Otherwise, an  `INVALID_ARGUMENT`
            -   * error is returned.
            -   * 
            - * - * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec facet_specs = 9; - * - */ - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec getFacetSpecs(int index) { - return facetSpecs_.get(index); - } + /** + * + * + *
            +     * Specification for crowding. Crowding improves the diversity of search
            +     * results by limiting the number of results that share the same field value.
            +     * For example, crowding on the color field with a max_count of 3 and mode
            +     * DROP_CROWDED_RESULTS will return at most 3 results with the same color
            +     * across all pages.
            +     * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.SearchRequest.CrowdingSpec} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.SearchRequest.CrowdingSpec) + com.google.cloud.discoveryengine.v1beta.SearchRequest.CrowdingSpecOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_CrowdingSpec_descriptor; + } - /** - * - * - *
            -   * Facet specifications for faceted search. If empty, no facets are returned.
            -   *
            -   * A maximum of 100 values are allowed. Otherwise, an  `INVALID_ARGUMENT`
            -   * error is returned.
            -   * 
            - * - * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec facet_specs = 9; - * - */ - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpecOrBuilder - getFacetSpecsOrBuilder(int index) { - return facetSpecs_.get(index); - } + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_CrowdingSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.SearchRequest.CrowdingSpec.class, + com.google.cloud.discoveryengine.v1beta.SearchRequest.CrowdingSpec.Builder.class); + } - public static final int BOOST_SPEC_FIELD_NUMBER = 10; - private com.google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec boostSpec_; + // Construct using + // com.google.cloud.discoveryengine.v1beta.SearchRequest.CrowdingSpec.newBuilder() + private Builder() {} - /** - * - * - *
            -   * Boost specification to boost certain documents.
            -   * For more information on boosting, see
            -   * [Boosting](https://cloud.google.com/generative-ai-app-builder/docs/boost-search-results)
            -   * 
            - * - * .google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec boost_spec = 10; - * - * @return Whether the boostSpec field is set. - */ - @java.lang.Override - public boolean hasBoostSpec() { - return ((bitField0_ & 0x00000004) != 0); - } + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } - /** - * - * - *
            -   * Boost specification to boost certain documents.
            -   * For more information on boosting, see
            -   * [Boosting](https://cloud.google.com/generative-ai-app-builder/docs/boost-search-results)
            -   * 
            - * - * .google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec boost_spec = 10; - * - * @return The boostSpec. - */ - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec getBoostSpec() { - return boostSpec_ == null - ? com.google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec.getDefaultInstance() - : boostSpec_; - } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + field_ = ""; + maxCount_ = 0; + mode_ = 0; + return this; + } - /** - * - * - *
            -   * Boost specification to boost certain documents.
            -   * For more information on boosting, see
            -   * [Boosting](https://cloud.google.com/generative-ai-app-builder/docs/boost-search-results)
            -   * 
            - * - * .google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec boost_spec = 10; - */ - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpecOrBuilder - getBoostSpecOrBuilder() { - return boostSpec_ == null - ? com.google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec.getDefaultInstance() - : boostSpec_; - } + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1beta.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_CrowdingSpec_descriptor; + } - public static final int PARAMS_FIELD_NUMBER = 11; + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.SearchRequest.CrowdingSpec + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1beta.SearchRequest.CrowdingSpec + .getDefaultInstance(); + } - private static final class ParamsDefaultEntryHolder { - static final com.google.protobuf.MapEntry - defaultEntry = - com.google.protobuf.MapEntry - .newDefaultInstance( - com.google.cloud.discoveryengine.v1beta.SearchServiceProto - .internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_ParamsEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.STRING, - "", - com.google.protobuf.WireFormat.FieldType.MESSAGE, - com.google.protobuf.Value.getDefaultInstance()); - } + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.SearchRequest.CrowdingSpec build() { + com.google.cloud.discoveryengine.v1beta.SearchRequest.CrowdingSpec result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } - @SuppressWarnings("serial") - private com.google.protobuf.MapField params_; + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.SearchRequest.CrowdingSpec buildPartial() { + com.google.cloud.discoveryengine.v1beta.SearchRequest.CrowdingSpec result = + new com.google.cloud.discoveryengine.v1beta.SearchRequest.CrowdingSpec(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } - private com.google.protobuf.MapField - internalGetParams() { - if (params_ == null) { - return com.google.protobuf.MapField.emptyMapField(ParamsDefaultEntryHolder.defaultEntry); - } - return params_; - } + private void buildPartial0( + com.google.cloud.discoveryengine.v1beta.SearchRequest.CrowdingSpec result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.field_ = field_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.maxCount_ = maxCount_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.mode_ = mode_; + } + } - public int getParamsCount() { - return internalGetParams().getMap().size(); - } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.discoveryengine.v1beta.SearchRequest.CrowdingSpec) { + return mergeFrom( + (com.google.cloud.discoveryengine.v1beta.SearchRequest.CrowdingSpec) other); + } else { + super.mergeFrom(other); + return this; + } + } - /** - * - * - *
            -   * Additional search parameters.
            -   *
            -   * For public website search only, supported values are:
            -   *
            -   * * `user_country_code`: string. Default empty. If set to non-empty, results
            -   * are restricted or boosted based on the location provided.
            -   * For example, `user_country_code: "au"`
            -   *
            -   * For available codes see [Country
            -   * Codes](https://developers.google.com/custom-search/docs/json_api_reference#countryCodes)
            -   *
            -   * * `search_type`: double. Default empty. Enables non-webpage searching
            -   * depending on the value. The only valid non-default value is 1,
            -   * which enables image searching.
            -   * For example, `search_type: 1`
            -   * 
            - * - * map<string, .google.protobuf.Value> params = 11; - */ - @java.lang.Override - public boolean containsParams(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - return internalGetParams().getMap().containsKey(key); - } + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1beta.SearchRequest.CrowdingSpec other) { + if (other + == com.google.cloud.discoveryengine.v1beta.SearchRequest.CrowdingSpec + .getDefaultInstance()) return this; + if (!other.getField().isEmpty()) { + field_ = other.field_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getMaxCount() != 0) { + setMaxCount(other.getMaxCount()); + } + if (other.mode_ != 0) { + setModeValue(other.getModeValue()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } - /** Use {@link #getParamsMap()} instead. */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getParams() { - return getParamsMap(); - } - - /** - * - * - *
            -   * Additional search parameters.
            -   *
            -   * For public website search only, supported values are:
            -   *
            -   * * `user_country_code`: string. Default empty. If set to non-empty, results
            -   * are restricted or boosted based on the location provided.
            -   * For example, `user_country_code: "au"`
            -   *
            -   * For available codes see [Country
            -   * Codes](https://developers.google.com/custom-search/docs/json_api_reference#countryCodes)
            -   *
            -   * * `search_type`: double. Default empty. Enables non-webpage searching
            -   * depending on the value. The only valid non-default value is 1,
            -   * which enables image searching.
            -   * For example, `search_type: 1`
            -   * 
            - * - * map<string, .google.protobuf.Value> params = 11; - */ - @java.lang.Override - public java.util.Map getParamsMap() { - return internalGetParams().getMap(); - } + @java.lang.Override + public final boolean isInitialized() { + return true; + } - /** - * - * - *
            -   * Additional search parameters.
            -   *
            -   * For public website search only, supported values are:
            -   *
            -   * * `user_country_code`: string. Default empty. If set to non-empty, results
            -   * are restricted or boosted based on the location provided.
            -   * For example, `user_country_code: "au"`
            -   *
            -   * For available codes see [Country
            -   * Codes](https://developers.google.com/custom-search/docs/json_api_reference#countryCodes)
            -   *
            -   * * `search_type`: double. Default empty. Enables non-webpage searching
            -   * depending on the value. The only valid non-default value is 1,
            -   * which enables image searching.
            -   * For example, `search_type: 1`
            -   * 
            - * - * map<string, .google.protobuf.Value> params = 11; - */ - @java.lang.Override - public /* nullable */ com.google.protobuf.Value getParamsOrDefault( - java.lang.String key, - /* nullable */ - com.google.protobuf.Value defaultValue) { - if (key == null) { - throw new NullPointerException("map key"); - } - java.util.Map map = internalGetParams().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + field_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + maxCount_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 24: + { + mode_ = input.readEnum(); + bitField0_ |= 0x00000004; + break; + } // case 24 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } - /** - * - * - *
            -   * Additional search parameters.
            -   *
            -   * For public website search only, supported values are:
            -   *
            -   * * `user_country_code`: string. Default empty. If set to non-empty, results
            -   * are restricted or boosted based on the location provided.
            -   * For example, `user_country_code: "au"`
            -   *
            -   * For available codes see [Country
            -   * Codes](https://developers.google.com/custom-search/docs/json_api_reference#countryCodes)
            -   *
            -   * * `search_type`: double. Default empty. Enables non-webpage searching
            -   * depending on the value. The only valid non-default value is 1,
            -   * which enables image searching.
            -   * For example, `search_type: 1`
            -   * 
            - * - * map<string, .google.protobuf.Value> params = 11; - */ - @java.lang.Override - public com.google.protobuf.Value getParamsOrThrow(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - java.util.Map map = internalGetParams().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } + private int bitField0_; - public static final int QUERY_EXPANSION_SPEC_FIELD_NUMBER = 13; - private com.google.cloud.discoveryengine.v1beta.SearchRequest.QueryExpansionSpec - queryExpansionSpec_; + private java.lang.Object field_ = ""; - /** - * - * - *
            -   * The query expansion specification that specifies the conditions under which
            -   * query expansion occurs.
            -   * 
            - * - * - * .google.cloud.discoveryengine.v1beta.SearchRequest.QueryExpansionSpec query_expansion_spec = 13; - * - * - * @return Whether the queryExpansionSpec field is set. - */ - @java.lang.Override - public boolean hasQueryExpansionSpec() { - return ((bitField0_ & 0x00000008) != 0); - } + /** + * + * + *
            +       * The field to use for crowding. Documents can be crowded by a field in the
            +       * [Document][google.cloud.discoveryengine.v1beta.Document] object. Crowding
            +       * field is case sensitive.
            +       * 
            + * + * string field = 1; + * + * @return The field. + */ + public java.lang.String getField() { + java.lang.Object ref = field_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + field_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } - /** - * - * - *
            -   * The query expansion specification that specifies the conditions under which
            -   * query expansion occurs.
            -   * 
            - * - * - * .google.cloud.discoveryengine.v1beta.SearchRequest.QueryExpansionSpec query_expansion_spec = 13; - * - * - * @return The queryExpansionSpec. - */ - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.SearchRequest.QueryExpansionSpec - getQueryExpansionSpec() { - return queryExpansionSpec_ == null - ? com.google.cloud.discoveryengine.v1beta.SearchRequest.QueryExpansionSpec - .getDefaultInstance() - : queryExpansionSpec_; - } + /** + * + * + *
            +       * The field to use for crowding. Documents can be crowded by a field in the
            +       * [Document][google.cloud.discoveryengine.v1beta.Document] object. Crowding
            +       * field is case sensitive.
            +       * 
            + * + * string field = 1; + * + * @return The bytes for field. + */ + public com.google.protobuf.ByteString getFieldBytes() { + java.lang.Object ref = field_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + field_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } - /** - * - * - *
            -   * The query expansion specification that specifies the conditions under which
            -   * query expansion occurs.
            -   * 
            - * - * - * .google.cloud.discoveryengine.v1beta.SearchRequest.QueryExpansionSpec query_expansion_spec = 13; - * - */ - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.SearchRequest.QueryExpansionSpecOrBuilder - getQueryExpansionSpecOrBuilder() { - return queryExpansionSpec_ == null - ? com.google.cloud.discoveryengine.v1beta.SearchRequest.QueryExpansionSpec - .getDefaultInstance() - : queryExpansionSpec_; - } + /** + * + * + *
            +       * The field to use for crowding. Documents can be crowded by a field in the
            +       * [Document][google.cloud.discoveryengine.v1beta.Document] object. Crowding
            +       * field is case sensitive.
            +       * 
            + * + * string field = 1; + * + * @param value The field to set. + * @return This builder for chaining. + */ + public Builder setField(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + field_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } - public static final int SPELL_CORRECTION_SPEC_FIELD_NUMBER = 14; - private com.google.cloud.discoveryengine.v1beta.SearchRequest.SpellCorrectionSpec - spellCorrectionSpec_; + /** + * + * + *
            +       * The field to use for crowding. Documents can be crowded by a field in the
            +       * [Document][google.cloud.discoveryengine.v1beta.Document] object. Crowding
            +       * field is case sensitive.
            +       * 
            + * + * string field = 1; + * + * @return This builder for chaining. + */ + public Builder clearField() { + field_ = getDefaultInstance().getField(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } - /** - * - * - *
            -   * The spell correction specification that specifies the mode under
            -   * which spell correction takes effect.
            -   * 
            - * - * - * .google.cloud.discoveryengine.v1beta.SearchRequest.SpellCorrectionSpec spell_correction_spec = 14; - * - * - * @return Whether the spellCorrectionSpec field is set. - */ - @java.lang.Override - public boolean hasSpellCorrectionSpec() { - return ((bitField0_ & 0x00000010) != 0); - } + /** + * + * + *
            +       * The field to use for crowding. Documents can be crowded by a field in the
            +       * [Document][google.cloud.discoveryengine.v1beta.Document] object. Crowding
            +       * field is case sensitive.
            +       * 
            + * + * string field = 1; + * + * @param value The bytes for field to set. + * @return This builder for chaining. + */ + public Builder setFieldBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + field_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } - /** - * - * - *
            -   * The spell correction specification that specifies the mode under
            -   * which spell correction takes effect.
            -   * 
            - * - * - * .google.cloud.discoveryengine.v1beta.SearchRequest.SpellCorrectionSpec spell_correction_spec = 14; - * - * - * @return The spellCorrectionSpec. - */ - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.SearchRequest.SpellCorrectionSpec - getSpellCorrectionSpec() { - return spellCorrectionSpec_ == null - ? com.google.cloud.discoveryengine.v1beta.SearchRequest.SpellCorrectionSpec - .getDefaultInstance() - : spellCorrectionSpec_; - } + private int maxCount_; - /** - * - * - *
            -   * The spell correction specification that specifies the mode under
            -   * which spell correction takes effect.
            -   * 
            - * - * - * .google.cloud.discoveryengine.v1beta.SearchRequest.SpellCorrectionSpec spell_correction_spec = 14; - * - */ - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.SearchRequest.SpellCorrectionSpecOrBuilder - getSpellCorrectionSpecOrBuilder() { - return spellCorrectionSpec_ == null - ? com.google.cloud.discoveryengine.v1beta.SearchRequest.SpellCorrectionSpec - .getDefaultInstance() - : spellCorrectionSpec_; - } + /** + * + * + *
            +       * The maximum number of documents to keep per value of the field. Once
            +       * there are at least max_count previous results which contain the same
            +       * value for the given field (according to the order specified in
            +       * `order_by`), later results with the same value are "crowded away".
            +       * If not specified, the default value is 1.
            +       * 
            + * + * int32 max_count = 2; + * + * @return The maxCount. + */ + @java.lang.Override + public int getMaxCount() { + return maxCount_; + } - public static final int USER_PSEUDO_ID_FIELD_NUMBER = 15; + /** + * + * + *
            +       * The maximum number of documents to keep per value of the field. Once
            +       * there are at least max_count previous results which contain the same
            +       * value for the given field (according to the order specified in
            +       * `order_by`), later results with the same value are "crowded away".
            +       * If not specified, the default value is 1.
            +       * 
            + * + * int32 max_count = 2; + * + * @param value The maxCount to set. + * @return This builder for chaining. + */ + public Builder setMaxCount(int value) { - @SuppressWarnings("serial") - private volatile java.lang.Object userPseudoId_ = ""; + maxCount_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } - /** - * - * - *
            -   * A unique identifier for tracking visitors. For example, this could be
            -   * implemented with an HTTP cookie, which should be able to uniquely identify
            -   * a visitor on a single device. This unique identifier should not change if
            -   * the visitor logs in or out of the website.
            -   *
            -   * This field should NOT have a fixed value such as `unknown_visitor`.
            -   *
            -   * This should be the same identifier as
            -   * [UserEvent.user_pseudo_id][google.cloud.discoveryengine.v1beta.UserEvent.user_pseudo_id]
            -   * and
            -   * [CompleteQueryRequest.user_pseudo_id][google.cloud.discoveryengine.v1beta.CompleteQueryRequest.user_pseudo_id]
            -   *
            -   * The field must be a UTF-8 encoded string with a length limit of 128
            -   * characters. Otherwise, an  `INVALID_ARGUMENT`  error is returned.
            -   * 
            - * - * string user_pseudo_id = 15; - * - * @return The userPseudoId. - */ - @java.lang.Override - public java.lang.String getUserPseudoId() { - java.lang.Object ref = userPseudoId_; - 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(); - userPseudoId_ = s; - return s; - } - } + /** + * + * + *
            +       * The maximum number of documents to keep per value of the field. Once
            +       * there are at least max_count previous results which contain the same
            +       * value for the given field (according to the order specified in
            +       * `order_by`), later results with the same value are "crowded away".
            +       * If not specified, the default value is 1.
            +       * 
            + * + * int32 max_count = 2; + * + * @return This builder for chaining. + */ + public Builder clearMaxCount() { + bitField0_ = (bitField0_ & ~0x00000002); + maxCount_ = 0; + onChanged(); + return this; + } - /** - * - * - *
            -   * A unique identifier for tracking visitors. For example, this could be
            -   * implemented with an HTTP cookie, which should be able to uniquely identify
            -   * a visitor on a single device. This unique identifier should not change if
            -   * the visitor logs in or out of the website.
            -   *
            -   * This field should NOT have a fixed value such as `unknown_visitor`.
            -   *
            -   * This should be the same identifier as
            -   * [UserEvent.user_pseudo_id][google.cloud.discoveryengine.v1beta.UserEvent.user_pseudo_id]
            -   * and
            -   * [CompleteQueryRequest.user_pseudo_id][google.cloud.discoveryengine.v1beta.CompleteQueryRequest.user_pseudo_id]
            -   *
            -   * The field must be a UTF-8 encoded string with a length limit of 128
            -   * characters. Otherwise, an  `INVALID_ARGUMENT`  error is returned.
            -   * 
            - * - * string user_pseudo_id = 15; - * - * @return The bytes for userPseudoId. - */ - @java.lang.Override - public com.google.protobuf.ByteString getUserPseudoIdBytes() { - java.lang.Object ref = userPseudoId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - userPseudoId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } + private int mode_ = 0; - public static final int CONTENT_SEARCH_SPEC_FIELD_NUMBER = 24; - private com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec - contentSearchSpec_; + /** + * + * + *
            +       * Mode to use for documents that are crowded away.
            +       * 
            + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.CrowdingSpec.Mode mode = 3; + * + * @return The enum numeric value on the wire for mode. + */ + @java.lang.Override + public int getModeValue() { + return mode_; + } - /** - * - * - *
            -   * A specification for configuring the behavior of content search.
            -   * 
            - * - * - * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec content_search_spec = 24; - * - * - * @return Whether the contentSearchSpec field is set. - */ - @java.lang.Override - public boolean hasContentSearchSpec() { - return ((bitField0_ & 0x00000020) != 0); - } + /** + * + * + *
            +       * Mode to use for documents that are crowded away.
            +       * 
            + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.CrowdingSpec.Mode mode = 3; + * + * @param value The enum numeric value on the wire for mode to set. + * @return This builder for chaining. + */ + public Builder setModeValue(int value) { + mode_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } - /** - * - * - *
            -   * A specification for configuring the behavior of content search.
            -   * 
            - * - * - * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec content_search_spec = 24; - * - * - * @return The contentSearchSpec. - */ - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec - getContentSearchSpec() { - return contentSearchSpec_ == null - ? com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec - .getDefaultInstance() - : contentSearchSpec_; - } + /** + * + * + *
            +       * Mode to use for documents that are crowded away.
            +       * 
            + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.CrowdingSpec.Mode mode = 3; + * + * @return The mode. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.SearchRequest.CrowdingSpec.Mode getMode() { + com.google.cloud.discoveryengine.v1beta.SearchRequest.CrowdingSpec.Mode result = + com.google.cloud.discoveryengine.v1beta.SearchRequest.CrowdingSpec.Mode.forNumber( + mode_); + return result == null + ? com.google.cloud.discoveryengine.v1beta.SearchRequest.CrowdingSpec.Mode.UNRECOGNIZED + : result; + } - /** - * - * - *
            -   * A specification for configuring the behavior of content search.
            -   * 
            - * - * - * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec content_search_spec = 24; - * - */ - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpecOrBuilder - getContentSearchSpecOrBuilder() { - return contentSearchSpec_ == null - ? com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec - .getDefaultInstance() - : contentSearchSpec_; - } + /** + * + * + *
            +       * Mode to use for documents that are crowded away.
            +       * 
            + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.CrowdingSpec.Mode mode = 3; + * + * @param value The mode to set. + * @return This builder for chaining. + */ + public Builder setMode( + com.google.cloud.discoveryengine.v1beta.SearchRequest.CrowdingSpec.Mode value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000004; + mode_ = value.getNumber(); + onChanged(); + return this; + } - public static final int EMBEDDING_SPEC_FIELD_NUMBER = 23; - private com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec embeddingSpec_; + /** + * + * + *
            +       * Mode to use for documents that are crowded away.
            +       * 
            + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.CrowdingSpec.Mode mode = 3; + * + * @return This builder for chaining. + */ + public Builder clearMode() { + bitField0_ = (bitField0_ & ~0x00000004); + mode_ = 0; + onChanged(); + return this; + } - /** - * - * - *
            -   * Uses the provided embedding to do additional semantic document retrieval.
            -   * The retrieval is based on the dot product of
            -   * [SearchRequest.EmbeddingSpec.EmbeddingVector.vector][google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector.vector]
            -   * and the document embedding that is provided in
            -   * [SearchRequest.EmbeddingSpec.EmbeddingVector.field_path][google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector.field_path].
            -   *
            -   * If
            -   * [SearchRequest.EmbeddingSpec.EmbeddingVector.field_path][google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector.field_path]
            -   * is not provided, it will use
            -   * [ServingConfig.EmbeddingConfig.field_path][google.cloud.discoveryengine.v1beta.ServingConfig.embedding_config].
            -   * 
            - * - * .google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec embedding_spec = 23; - * - * - * @return Whether the embeddingSpec field is set. - */ - @java.lang.Override - public boolean hasEmbeddingSpec() { - return ((bitField0_ & 0x00000040) != 0); + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.SearchRequest.CrowdingSpec) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.SearchRequest.CrowdingSpec) + private static final com.google.cloud.discoveryengine.v1beta.SearchRequest.CrowdingSpec + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.discoveryengine.v1beta.SearchRequest.CrowdingSpec(); + } + + public static com.google.cloud.discoveryengine.v1beta.SearchRequest.CrowdingSpec + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CrowdingSpec parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.SearchRequest.CrowdingSpec + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } } - /** - * - * - *
            -   * Uses the provided embedding to do additional semantic document retrieval.
            -   * The retrieval is based on the dot product of
            -   * [SearchRequest.EmbeddingSpec.EmbeddingVector.vector][google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector.vector]
            -   * and the document embedding that is provided in
            -   * [SearchRequest.EmbeddingSpec.EmbeddingVector.field_path][google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector.field_path].
            -   *
            -   * If
            -   * [SearchRequest.EmbeddingSpec.EmbeddingVector.field_path][google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector.field_path]
            -   * is not provided, it will use
            -   * [ServingConfig.EmbeddingConfig.field_path][google.cloud.discoveryengine.v1beta.ServingConfig.embedding_config].
            -   * 
            - * - * .google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec embedding_spec = 23; - * - * - * @return The embeddingSpec. - */ - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec getEmbeddingSpec() { - return embeddingSpec_ == null - ? com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.getDefaultInstance() - : embeddingSpec_; + public interface SessionSpecOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.SearchRequest.SessionSpec) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
            +     * If set, the search result gets stored to the "turn" specified by this
            +     * query ID.
            +     *
            +     * Example: Let's say the session looks like this:
            +     * session {
            +     * name: ".../sessions/xxx"
            +     * turns {
            +     * query { text: "What is foo?" query_id: ".../questions/yyy" }
            +     * answer: "Foo is ..."
            +     * }
            +     * turns {
            +     * query { text: "How about bar then?" query_id: ".../questions/zzz" }
            +     * }
            +     * }
            +     *
            +     * The user can call /search API with a request like this:
            +     *
            +     * session: ".../sessions/xxx"
            +     * session_spec { query_id: ".../questions/zzz" }
            +     *
            +     * Then, the API stores the search result, associated with the last turn.
            +     * The stored search result can be used by a subsequent /answer API call
            +     * (with the session ID and the query ID specified). Also, it is possible
            +     * to call /search and /answer in parallel with the same session ID & query
            +     * ID.
            +     * 
            + * + * string query_id = 1; + * + * @return The queryId. + */ + java.lang.String getQueryId(); + + /** + * + * + *
            +     * If set, the search result gets stored to the "turn" specified by this
            +     * query ID.
            +     *
            +     * Example: Let's say the session looks like this:
            +     * session {
            +     * name: ".../sessions/xxx"
            +     * turns {
            +     * query { text: "What is foo?" query_id: ".../questions/yyy" }
            +     * answer: "Foo is ..."
            +     * }
            +     * turns {
            +     * query { text: "How about bar then?" query_id: ".../questions/zzz" }
            +     * }
            +     * }
            +     *
            +     * The user can call /search API with a request like this:
            +     *
            +     * session: ".../sessions/xxx"
            +     * session_spec { query_id: ".../questions/zzz" }
            +     *
            +     * Then, the API stores the search result, associated with the last turn.
            +     * The stored search result can be used by a subsequent /answer API call
            +     * (with the session ID and the query ID specified). Also, it is possible
            +     * to call /search and /answer in parallel with the same session ID & query
            +     * ID.
            +     * 
            + * + * string query_id = 1; + * + * @return The bytes for queryId. + */ + com.google.protobuf.ByteString getQueryIdBytes(); + + /** + * + * + *
            +     * The number of top search results to persist. The persisted search results
            +     * can be used for the subsequent /answer api call.
            +     *
            +     * This field is similar to the `summary_result_count` field in
            +     * [SearchRequest.ContentSearchSpec.SummarySpec.summary_result_count][google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec.summary_result_count].
            +     *
            +     * At most 10 results for documents mode, or 50 for chunks mode.
            +     * 
            + * + * optional int32 search_result_persistence_count = 2; + * + * @return Whether the searchResultPersistenceCount field is set. + */ + boolean hasSearchResultPersistenceCount(); + + /** + * + * + *
            +     * The number of top search results to persist. The persisted search results
            +     * can be used for the subsequent /answer api call.
            +     *
            +     * This field is similar to the `summary_result_count` field in
            +     * [SearchRequest.ContentSearchSpec.SummarySpec.summary_result_count][google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec.summary_result_count].
            +     *
            +     * At most 10 results for documents mode, or 50 for chunks mode.
            +     * 
            + * + * optional int32 search_result_persistence_count = 2; + * + * @return The searchResultPersistenceCount. + */ + int getSearchResultPersistenceCount(); } /** * * *
            -   * Uses the provided embedding to do additional semantic document retrieval.
            -   * The retrieval is based on the dot product of
            -   * [SearchRequest.EmbeddingSpec.EmbeddingVector.vector][google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector.vector]
            -   * and the document embedding that is provided in
            -   * [SearchRequest.EmbeddingSpec.EmbeddingVector.field_path][google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector.field_path].
            -   *
            -   * If
            -   * [SearchRequest.EmbeddingSpec.EmbeddingVector.field_path][google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector.field_path]
            -   * is not provided, it will use
            -   * [ServingConfig.EmbeddingConfig.field_path][google.cloud.discoveryengine.v1beta.ServingConfig.embedding_config].
            +   * Session specification.
                * 
            * - * .google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec embedding_spec = 23; - * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.SearchRequest.SessionSpec} */ - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpecOrBuilder - getEmbeddingSpecOrBuilder() { - return embeddingSpec_ == null - ? com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.getDefaultInstance() - : embeddingSpec_; - } + public static final class SessionSpec extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.SearchRequest.SessionSpec) + SessionSpecOrBuilder { + private static final long serialVersionUID = 0L; - public static final int RANKING_EXPRESSION_FIELD_NUMBER = 26; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "SessionSpec"); + } - @SuppressWarnings("serial") - private volatile java.lang.Object rankingExpression_ = ""; + // Use SessionSpec.newBuilder() to construct. + private SessionSpec(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } - /** - * - * - *
            -   * The ranking expression controls the customized ranking on retrieval
            -   * documents. This overrides
            -   * [ServingConfig.ranking_expression][google.cloud.discoveryengine.v1beta.ServingConfig.ranking_expression].
            -   * The syntax and supported features depend on the
            -   * `ranking_expression_backend` value. If `ranking_expression_backend` is not
            -   * provided, it defaults to `RANK_BY_EMBEDDING`.
            -   *
            -   * If
            -   * [ranking_expression_backend][google.cloud.discoveryengine.v1beta.SearchRequest.ranking_expression_backend]
            -   * is not provided or set to `RANK_BY_EMBEDDING`, it should be a single
            -   * function or multiple functions that are joined by "+".
            -   *
            -   * * ranking_expression = function, { " + ", function };
            -   *
            -   * Supported functions:
            -   *
            -   * * double * relevance_score
            -   * * double * dotProduct(embedding_field_path)
            -   *
            -   * Function variables:
            -   *
            -   * * `relevance_score`: pre-defined keywords, used for measure relevance
            -   * between query and document.
            -   * * `embedding_field_path`: the document embedding field
            -   * used with query embedding vector.
            -   * * `dotProduct`: embedding function between `embedding_field_path` and
            -   * query embedding vector.
            -   *
            -   * Example ranking expression:
            -   *
            -   * If document has an embedding field doc_embedding, the ranking expression
            -   * could be `0.5 * relevance_score + 0.3 * dotProduct(doc_embedding)`.
            -   *
            -   * If
            -   * [ranking_expression_backend][google.cloud.discoveryengine.v1beta.SearchRequest.ranking_expression_backend]
            -   * is set to `RANK_BY_FORMULA`, the following expression types (and
            -   * combinations of those chained using + or
            -   * * operators) are supported:
            -   *
            -   * * `double`
            -   * * `signal`
            -   * * `log(signal)`
            -   * * `exp(signal)`
            -   * * `rr(signal, double > 0)`  -- reciprocal rank transformation with second
            -   * argument being a denominator constant.
            -   * * `is_nan(signal)` -- returns 0 if signal is NaN, 1 otherwise.
            -   * * `fill_nan(signal1, signal2 | double)` -- if signal1 is NaN, returns
            -   * signal2 | double, else returns signal1.
            -   *
            -   * Here are a few examples of ranking formulas that use the supported
            -   * ranking expression types:
            -   *
            -   * - `0.2 * semantic_similarity_score + 0.8 * log(keyword_similarity_score)`
            -   * -- mostly rank by the logarithm of `keyword_similarity_score` with slight
            -   * `semantic_smilarity_score` adjustment.
            -   * - `0.2 * exp(fill_nan(semantic_similarity_score, 0)) + 0.3 *
            -   * is_nan(keyword_similarity_score)` -- rank by the exponent of
            -   * `semantic_similarity_score` filling the value with 0 if it's NaN, also
            -   * add constant 0.3 adjustment to the final score if
            -   * `semantic_similarity_score` is NaN.
            -   * - `0.2 * rr(semantic_similarity_score, 16) + 0.8 *
            -   * rr(keyword_similarity_score, 16)` -- mostly rank by the reciprocal rank
            -   * of `keyword_similarity_score` with slight adjustment of reciprocal rank
            -   * of `semantic_smilarity_score`.
            -   *
            -   * The following signals are supported:
            -   *
            -   * * `semantic_similarity_score`: semantic similarity adjustment that is
            -   * calculated using the embeddings generated by a proprietary Google model.
            -   * This score determines how semantically similar a search query is to a
            -   * document.
            -   * * `keyword_similarity_score`: keyword match adjustment uses the Best
            -   * Match 25 (BM25) ranking function. This score is calculated using a
            -   * probabilistic model to estimate the probability that a document is
            -   * relevant to a given query.
            -   * * `relevance_score`: semantic relevance adjustment that uses a
            -   * proprietary Google model to determine the meaning and intent behind a
            -   * user's query in context with the content in the documents.
            -   * * `pctr_rank`: predicted conversion rate adjustment as a rank use
            -   * predicted Click-through rate (pCTR) to gauge the relevance and
            -   * attractiveness of a search result from a user's perspective. A higher
            -   * pCTR suggests that the result is more likely to satisfy the user's query
            -   * and intent, making it a valuable signal for ranking.
            -   * * `freshness_rank`: freshness adjustment as a rank
            -   * * `document_age`: The time in hours elapsed since the document was last
            -   * updated, a floating-point number (e.g., 0.25 means 15 minutes).
            -   * * `topicality_rank`: topicality adjustment as a rank. Uses proprietary
            -   * Google model to determine the keyword-based overlap between the query and
            -   * the document.
            -   * * `base_rank`: the default rank of the result
            -   * 
            - * - * string ranking_expression = 26; - * - * @return The rankingExpression. - */ - @java.lang.Override - public java.lang.String getRankingExpression() { - java.lang.Object ref = rankingExpression_; - 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(); - rankingExpression_ = s; - return s; + private SessionSpec() { + queryId_ = ""; } - } - /** - * - * - *
            -   * The ranking expression controls the customized ranking on retrieval
            -   * documents. This overrides
            -   * [ServingConfig.ranking_expression][google.cloud.discoveryengine.v1beta.ServingConfig.ranking_expression].
            -   * The syntax and supported features depend on the
            -   * `ranking_expression_backend` value. If `ranking_expression_backend` is not
            -   * provided, it defaults to `RANK_BY_EMBEDDING`.
            -   *
            -   * If
            -   * [ranking_expression_backend][google.cloud.discoveryengine.v1beta.SearchRequest.ranking_expression_backend]
            -   * is not provided or set to `RANK_BY_EMBEDDING`, it should be a single
            -   * function or multiple functions that are joined by "+".
            -   *
            -   * * ranking_expression = function, { " + ", function };
            -   *
            -   * Supported functions:
            -   *
            -   * * double * relevance_score
            -   * * double * dotProduct(embedding_field_path)
            -   *
            -   * Function variables:
            -   *
            -   * * `relevance_score`: pre-defined keywords, used for measure relevance
            -   * between query and document.
            -   * * `embedding_field_path`: the document embedding field
            -   * used with query embedding vector.
            -   * * `dotProduct`: embedding function between `embedding_field_path` and
            -   * query embedding vector.
            -   *
            -   * Example ranking expression:
            -   *
            -   * If document has an embedding field doc_embedding, the ranking expression
            -   * could be `0.5 * relevance_score + 0.3 * dotProduct(doc_embedding)`.
            -   *
            -   * If
            -   * [ranking_expression_backend][google.cloud.discoveryengine.v1beta.SearchRequest.ranking_expression_backend]
            -   * is set to `RANK_BY_FORMULA`, the following expression types (and
            -   * combinations of those chained using + or
            -   * * operators) are supported:
            -   *
            -   * * `double`
            -   * * `signal`
            -   * * `log(signal)`
            -   * * `exp(signal)`
            -   * * `rr(signal, double > 0)`  -- reciprocal rank transformation with second
            -   * argument being a denominator constant.
            -   * * `is_nan(signal)` -- returns 0 if signal is NaN, 1 otherwise.
            -   * * `fill_nan(signal1, signal2 | double)` -- if signal1 is NaN, returns
            -   * signal2 | double, else returns signal1.
            -   *
            -   * Here are a few examples of ranking formulas that use the supported
            -   * ranking expression types:
            -   *
            -   * - `0.2 * semantic_similarity_score + 0.8 * log(keyword_similarity_score)`
            -   * -- mostly rank by the logarithm of `keyword_similarity_score` with slight
            -   * `semantic_smilarity_score` adjustment.
            -   * - `0.2 * exp(fill_nan(semantic_similarity_score, 0)) + 0.3 *
            -   * is_nan(keyword_similarity_score)` -- rank by the exponent of
            -   * `semantic_similarity_score` filling the value with 0 if it's NaN, also
            -   * add constant 0.3 adjustment to the final score if
            -   * `semantic_similarity_score` is NaN.
            -   * - `0.2 * rr(semantic_similarity_score, 16) + 0.8 *
            -   * rr(keyword_similarity_score, 16)` -- mostly rank by the reciprocal rank
            -   * of `keyword_similarity_score` with slight adjustment of reciprocal rank
            -   * of `semantic_smilarity_score`.
            -   *
            -   * The following signals are supported:
            -   *
            -   * * `semantic_similarity_score`: semantic similarity adjustment that is
            -   * calculated using the embeddings generated by a proprietary Google model.
            -   * This score determines how semantically similar a search query is to a
            -   * document.
            -   * * `keyword_similarity_score`: keyword match adjustment uses the Best
            -   * Match 25 (BM25) ranking function. This score is calculated using a
            -   * probabilistic model to estimate the probability that a document is
            -   * relevant to a given query.
            -   * * `relevance_score`: semantic relevance adjustment that uses a
            -   * proprietary Google model to determine the meaning and intent behind a
            -   * user's query in context with the content in the documents.
            -   * * `pctr_rank`: predicted conversion rate adjustment as a rank use
            -   * predicted Click-through rate (pCTR) to gauge the relevance and
            -   * attractiveness of a search result from a user's perspective. A higher
            -   * pCTR suggests that the result is more likely to satisfy the user's query
            -   * and intent, making it a valuable signal for ranking.
            -   * * `freshness_rank`: freshness adjustment as a rank
            -   * * `document_age`: The time in hours elapsed since the document was last
            -   * updated, a floating-point number (e.g., 0.25 means 15 minutes).
            -   * * `topicality_rank`: topicality adjustment as a rank. Uses proprietary
            -   * Google model to determine the keyword-based overlap between the query and
            -   * the document.
            -   * * `base_rank`: the default rank of the result
            -   * 
            - * - * string ranking_expression = 26; - * - * @return The bytes for rankingExpression. - */ - @java.lang.Override - public com.google.protobuf.ByteString getRankingExpressionBytes() { - java.lang.Object ref = rankingExpression_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - rankingExpression_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_SessionSpec_descriptor; } - } - - public static final int RANKING_EXPRESSION_BACKEND_FIELD_NUMBER = 53; - private int rankingExpressionBackend_ = 0; - /** - * - * - *
            -   * The backend to use for the ranking expression evaluation.
            -   * 
            - * - * - * .google.cloud.discoveryengine.v1beta.SearchRequest.RankingExpressionBackend ranking_expression_backend = 53 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The enum numeric value on the wire for rankingExpressionBackend. - */ - @java.lang.Override - public int getRankingExpressionBackendValue() { - return rankingExpressionBackend_; - } + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_SessionSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.SearchRequest.SessionSpec.class, + com.google.cloud.discoveryengine.v1beta.SearchRequest.SessionSpec.Builder.class); + } - /** - * - * - *
            -   * The backend to use for the ranking expression evaluation.
            -   * 
            - * - * - * .google.cloud.discoveryengine.v1beta.SearchRequest.RankingExpressionBackend ranking_expression_backend = 53 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The rankingExpressionBackend. - */ - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.SearchRequest.RankingExpressionBackend - getRankingExpressionBackend() { - com.google.cloud.discoveryengine.v1beta.SearchRequest.RankingExpressionBackend result = - com.google.cloud.discoveryengine.v1beta.SearchRequest.RankingExpressionBackend.forNumber( - rankingExpressionBackend_); - return result == null - ? com.google.cloud.discoveryengine.v1beta.SearchRequest.RankingExpressionBackend - .UNRECOGNIZED - : result; - } + private int bitField0_; + public static final int QUERY_ID_FIELD_NUMBER = 1; - public static final int SAFE_SEARCH_FIELD_NUMBER = 20; - private boolean safeSearch_ = false; + @SuppressWarnings("serial") + private volatile java.lang.Object queryId_ = ""; - /** - * - * - *
            -   * Whether to turn on safe search. This is only supported for
            -   * website search.
            -   * 
            - * - * bool safe_search = 20; - * - * @return The safeSearch. - */ - @java.lang.Override - public boolean getSafeSearch() { - return safeSearch_; - } + /** + * + * + *
            +     * If set, the search result gets stored to the "turn" specified by this
            +     * query ID.
            +     *
            +     * Example: Let's say the session looks like this:
            +     * session {
            +     * name: ".../sessions/xxx"
            +     * turns {
            +     * query { text: "What is foo?" query_id: ".../questions/yyy" }
            +     * answer: "Foo is ..."
            +     * }
            +     * turns {
            +     * query { text: "How about bar then?" query_id: ".../questions/zzz" }
            +     * }
            +     * }
            +     *
            +     * The user can call /search API with a request like this:
            +     *
            +     * session: ".../sessions/xxx"
            +     * session_spec { query_id: ".../questions/zzz" }
            +     *
            +     * Then, the API stores the search result, associated with the last turn.
            +     * The stored search result can be used by a subsequent /answer API call
            +     * (with the session ID and the query ID specified). Also, it is possible
            +     * to call /search and /answer in parallel with the same session ID & query
            +     * ID.
            +     * 
            + * + * string query_id = 1; + * + * @return The queryId. + */ + @java.lang.Override + public java.lang.String getQueryId() { + java.lang.Object ref = queryId_; + 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(); + queryId_ = s; + return s; + } + } - public static final int USER_LABELS_FIELD_NUMBER = 22; + /** + * + * + *
            +     * If set, the search result gets stored to the "turn" specified by this
            +     * query ID.
            +     *
            +     * Example: Let's say the session looks like this:
            +     * session {
            +     * name: ".../sessions/xxx"
            +     * turns {
            +     * query { text: "What is foo?" query_id: ".../questions/yyy" }
            +     * answer: "Foo is ..."
            +     * }
            +     * turns {
            +     * query { text: "How about bar then?" query_id: ".../questions/zzz" }
            +     * }
            +     * }
            +     *
            +     * The user can call /search API with a request like this:
            +     *
            +     * session: ".../sessions/xxx"
            +     * session_spec { query_id: ".../questions/zzz" }
            +     *
            +     * Then, the API stores the search result, associated with the last turn.
            +     * The stored search result can be used by a subsequent /answer API call
            +     * (with the session ID and the query ID specified). Also, it is possible
            +     * to call /search and /answer in parallel with the same session ID & query
            +     * ID.
            +     * 
            + * + * string query_id = 1; + * + * @return The bytes for queryId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getQueryIdBytes() { + java.lang.Object ref = queryId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + queryId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } - private static final class UserLabelsDefaultEntryHolder { - static final com.google.protobuf.MapEntry defaultEntry = - com.google.protobuf.MapEntry.newDefaultInstance( - com.google.cloud.discoveryengine.v1beta.SearchServiceProto - .internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_UserLabelsEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.STRING, - "", - com.google.protobuf.WireFormat.FieldType.STRING, - ""); - } + public static final int SEARCH_RESULT_PERSISTENCE_COUNT_FIELD_NUMBER = 2; + private int searchResultPersistenceCount_ = 0; - @SuppressWarnings("serial") - private com.google.protobuf.MapField userLabels_; + /** + * + * + *
            +     * The number of top search results to persist. The persisted search results
            +     * can be used for the subsequent /answer api call.
            +     *
            +     * This field is similar to the `summary_result_count` field in
            +     * [SearchRequest.ContentSearchSpec.SummarySpec.summary_result_count][google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec.summary_result_count].
            +     *
            +     * At most 10 results for documents mode, or 50 for chunks mode.
            +     * 
            + * + * optional int32 search_result_persistence_count = 2; + * + * @return Whether the searchResultPersistenceCount field is set. + */ + @java.lang.Override + public boolean hasSearchResultPersistenceCount() { + return ((bitField0_ & 0x00000001) != 0); + } - private com.google.protobuf.MapField internalGetUserLabels() { - if (userLabels_ == null) { - return com.google.protobuf.MapField.emptyMapField(UserLabelsDefaultEntryHolder.defaultEntry); + /** + * + * + *
            +     * The number of top search results to persist. The persisted search results
            +     * can be used for the subsequent /answer api call.
            +     *
            +     * This field is similar to the `summary_result_count` field in
            +     * [SearchRequest.ContentSearchSpec.SummarySpec.summary_result_count][google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec.summary_result_count].
            +     *
            +     * At most 10 results for documents mode, or 50 for chunks mode.
            +     * 
            + * + * optional int32 search_result_persistence_count = 2; + * + * @return The searchResultPersistenceCount. + */ + @java.lang.Override + public int getSearchResultPersistenceCount() { + return searchResultPersistenceCount_; } - return userLabels_; - } - public int getUserLabelsCount() { - return internalGetUserLabels().getMap().size(); - } + private byte memoizedIsInitialized = -1; - /** - * - * - *
            -   * The user labels applied to a resource must meet the following requirements:
            -   *
            -   * * Each resource can have multiple labels, up to a maximum of 64.
            -   * * Each label must be a key-value pair.
            -   * * Keys have a minimum length of 1 character and a maximum length of 63
            -   * characters and cannot be empty. Values can be empty and have a maximum
            -   * length of 63 characters.
            -   * * Keys and values can contain only lowercase letters, numeric characters,
            -   * underscores, and dashes. All characters must use UTF-8 encoding, and
            -   * international characters are allowed.
            -   * * The key portion of a label must be unique. However, you can use the same
            -   * key with multiple resources.
            -   * * Keys must start with a lowercase letter or international character.
            -   *
            -   * See [Google Cloud
            -   * Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
            -   * for more details.
            -   * 
            - * - * map<string, string> user_labels = 22; - */ - @java.lang.Override - public boolean containsUserLabels(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; } - return internalGetUserLabels().getMap().containsKey(key); - } - /** Use {@link #getUserLabelsMap()} instead. */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getUserLabels() { - return getUserLabelsMap(); - } + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(queryId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, queryId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeInt32(2, searchResultPersistenceCount_); + } + getUnknownFields().writeTo(output); + } - /** - * - * - *
            -   * The user labels applied to a resource must meet the following requirements:
            -   *
            -   * * Each resource can have multiple labels, up to a maximum of 64.
            -   * * Each label must be a key-value pair.
            -   * * Keys have a minimum length of 1 character and a maximum length of 63
            -   * characters and cannot be empty. Values can be empty and have a maximum
            -   * length of 63 characters.
            -   * * Keys and values can contain only lowercase letters, numeric characters,
            -   * underscores, and dashes. All characters must use UTF-8 encoding, and
            -   * international characters are allowed.
            -   * * The key portion of a label must be unique. However, you can use the same
            -   * key with multiple resources.
            -   * * Keys must start with a lowercase letter or international character.
            -   *
            -   * See [Google Cloud
            -   * Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
            -   * for more details.
            -   * 
            - * - * map<string, string> user_labels = 22; - */ - @java.lang.Override - public java.util.Map getUserLabelsMap() { - return internalGetUserLabels().getMap(); - } + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; - /** - * - * - *
            -   * The user labels applied to a resource must meet the following requirements:
            -   *
            -   * * Each resource can have multiple labels, up to a maximum of 64.
            -   * * Each label must be a key-value pair.
            -   * * Keys have a minimum length of 1 character and a maximum length of 63
            -   * characters and cannot be empty. Values can be empty and have a maximum
            -   * length of 63 characters.
            -   * * Keys and values can contain only lowercase letters, numeric characters,
            -   * underscores, and dashes. All characters must use UTF-8 encoding, and
            -   * international characters are allowed.
            -   * * The key portion of a label must be unique. However, you can use the same
            -   * key with multiple resources.
            -   * * Keys must start with a lowercase letter or international character.
            -   *
            -   * See [Google Cloud
            -   * Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
            -   * for more details.
            -   * 
            - * - * map<string, string> user_labels = 22; - */ - @java.lang.Override - public /* nullable */ java.lang.String getUserLabelsOrDefault( - java.lang.String key, - /* nullable */ - java.lang.String defaultValue) { - if (key == null) { - throw new NullPointerException("map key"); + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(queryId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, queryId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeInt32Size( + 2, searchResultPersistenceCount_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; } - java.util.Map map = internalGetUserLabels().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * - * - *
            -   * The user labels applied to a resource must meet the following requirements:
            -   *
            -   * * Each resource can have multiple labels, up to a maximum of 64.
            -   * * Each label must be a key-value pair.
            -   * * Keys have a minimum length of 1 character and a maximum length of 63
            -   * characters and cannot be empty. Values can be empty and have a maximum
            -   * length of 63 characters.
            -   * * Keys and values can contain only lowercase letters, numeric characters,
            -   * underscores, and dashes. All characters must use UTF-8 encoding, and
            -   * international characters are allowed.
            -   * * The key portion of a label must be unique. However, you can use the same
            -   * key with multiple resources.
            -   * * Keys must start with a lowercase letter or international character.
            -   *
            -   * See [Google Cloud
            -   * Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
            -   * for more details.
            -   * 
            - * - * map<string, string> user_labels = 22; - */ - @java.lang.Override - public java.lang.String getUserLabelsOrThrow(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.discoveryengine.v1beta.SearchRequest.SessionSpec)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1beta.SearchRequest.SessionSpec other = + (com.google.cloud.discoveryengine.v1beta.SearchRequest.SessionSpec) obj; + + if (!getQueryId().equals(other.getQueryId())) return false; + if (hasSearchResultPersistenceCount() != other.hasSearchResultPersistenceCount()) + return false; + if (hasSearchResultPersistenceCount()) { + if (getSearchResultPersistenceCount() != other.getSearchResultPersistenceCount()) + return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; } - java.util.Map map = internalGetUserLabels().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + QUERY_ID_FIELD_NUMBER; + hash = (53 * hash) + getQueryId().hashCode(); + if (hasSearchResultPersistenceCount()) { + hash = (37 * hash) + SEARCH_RESULT_PERSISTENCE_COUNT_FIELD_NUMBER; + hash = (53 * hash) + getSearchResultPersistenceCount(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; } - return map.get(key); - } - public static final int NATURAL_LANGUAGE_QUERY_UNDERSTANDING_SPEC_FIELD_NUMBER = 28; - private com.google.cloud.discoveryengine.v1beta.SearchRequest - .NaturalLanguageQueryUnderstandingSpec - naturalLanguageQueryUnderstandingSpec_; + public static com.google.cloud.discoveryengine.v1beta.SearchRequest.SessionSpec parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - /** - * - * - *
            -   * If `naturalLanguageQueryUnderstandingSpec` is not specified, no additional
            -   * natural language query understanding will be done.
            -   * 
            - * - * - * .google.cloud.discoveryengine.v1beta.SearchRequest.NaturalLanguageQueryUnderstandingSpec natural_language_query_understanding_spec = 28; - * - * - * @return Whether the naturalLanguageQueryUnderstandingSpec field is set. - */ - @java.lang.Override - public boolean hasNaturalLanguageQueryUnderstandingSpec() { - return ((bitField0_ & 0x00000080) != 0); - } + public static com.google.cloud.discoveryengine.v1beta.SearchRequest.SessionSpec parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - /** - * - * - *
            -   * If `naturalLanguageQueryUnderstandingSpec` is not specified, no additional
            -   * natural language query understanding will be done.
            -   * 
            - * - * - * .google.cloud.discoveryengine.v1beta.SearchRequest.NaturalLanguageQueryUnderstandingSpec natural_language_query_understanding_spec = 28; - * - * - * @return The naturalLanguageQueryUnderstandingSpec. - */ - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.SearchRequest.NaturalLanguageQueryUnderstandingSpec - getNaturalLanguageQueryUnderstandingSpec() { - return naturalLanguageQueryUnderstandingSpec_ == null - ? com.google.cloud.discoveryengine.v1beta.SearchRequest - .NaturalLanguageQueryUnderstandingSpec.getDefaultInstance() - : naturalLanguageQueryUnderstandingSpec_; - } - - /** - * - * - *
            -   * If `naturalLanguageQueryUnderstandingSpec` is not specified, no additional
            -   * natural language query understanding will be done.
            -   * 
            - * - * - * .google.cloud.discoveryengine.v1beta.SearchRequest.NaturalLanguageQueryUnderstandingSpec natural_language_query_understanding_spec = 28; - * - */ - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.SearchRequest - .NaturalLanguageQueryUnderstandingSpecOrBuilder - getNaturalLanguageQueryUnderstandingSpecOrBuilder() { - return naturalLanguageQueryUnderstandingSpec_ == null - ? com.google.cloud.discoveryengine.v1beta.SearchRequest - .NaturalLanguageQueryUnderstandingSpec.getDefaultInstance() - : naturalLanguageQueryUnderstandingSpec_; - } + public static com.google.cloud.discoveryengine.v1beta.SearchRequest.SessionSpec parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - public static final int SEARCH_AS_YOU_TYPE_SPEC_FIELD_NUMBER = 31; - private com.google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec - searchAsYouTypeSpec_; + public static com.google.cloud.discoveryengine.v1beta.SearchRequest.SessionSpec parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - /** - * - * - *
            -   * Search as you type configuration. Only supported for the
            -   * [IndustryVertical.MEDIA][google.cloud.discoveryengine.v1beta.IndustryVertical.MEDIA]
            -   * vertical.
            -   * 
            - * - * - * .google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec search_as_you_type_spec = 31; - * - * - * @return Whether the searchAsYouTypeSpec field is set. - */ - @java.lang.Override - public boolean hasSearchAsYouTypeSpec() { - return ((bitField0_ & 0x00000100) != 0); - } + public static com.google.cloud.discoveryengine.v1beta.SearchRequest.SessionSpec parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - /** - * - * - *
            -   * Search as you type configuration. Only supported for the
            -   * [IndustryVertical.MEDIA][google.cloud.discoveryengine.v1beta.IndustryVertical.MEDIA]
            -   * vertical.
            -   * 
            - * - * - * .google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec search_as_you_type_spec = 31; - * - * - * @return The searchAsYouTypeSpec. - */ - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec - getSearchAsYouTypeSpec() { - return searchAsYouTypeSpec_ == null - ? com.google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec - .getDefaultInstance() - : searchAsYouTypeSpec_; - } + public static com.google.cloud.discoveryengine.v1beta.SearchRequest.SessionSpec parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - /** - * - * - *
            -   * Search as you type configuration. Only supported for the
            -   * [IndustryVertical.MEDIA][google.cloud.discoveryengine.v1beta.IndustryVertical.MEDIA]
            -   * vertical.
            -   * 
            - * - * - * .google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec search_as_you_type_spec = 31; - * - */ - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpecOrBuilder - getSearchAsYouTypeSpecOrBuilder() { - return searchAsYouTypeSpec_ == null - ? com.google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec - .getDefaultInstance() - : searchAsYouTypeSpec_; - } + public static com.google.cloud.discoveryengine.v1beta.SearchRequest.SessionSpec parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } - public static final int SESSION_FIELD_NUMBER = 41; + public static com.google.cloud.discoveryengine.v1beta.SearchRequest.SessionSpec parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } - @SuppressWarnings("serial") - private volatile java.lang.Object session_ = ""; + public static com.google.cloud.discoveryengine.v1beta.SearchRequest.SessionSpec + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } - /** - * - * - *
            -   * The session resource name. Optional.
            -   *
            -   * Session allows users to do multi-turn /search API calls or coordination
            -   * between /search API calls and /answer API calls.
            -   *
            -   * Example #1 (multi-turn /search API calls):
            -   * Call /search API with the session ID generated in the first call.
            -   * Here, the previous search query gets considered in query
            -   * standing. I.e., if the first query is "How did Alphabet do in 2022?"
            -   * and the current query is "How about 2023?", the current query will
            -   * be interpreted as "How did Alphabet do in 2023?".
            -   *
            -   * Example #2 (coordination between /search API calls and /answer API calls):
            -   * Call /answer API with the session ID generated in the first call.
            -   * Here, the answer generation happens in the context of the search
            -   * results from the first search call.
            -   *
            -   * Multi-turn Search feature is currently at private GA stage. Please use
            -   * v1alpha or v1beta version instead before we launch this feature to public
            -   * GA. Or ask for allowlisting through Google Support team.
            -   * 
            - * - * string session = 41 [(.google.api.resource_reference) = { ... } - * - * @return The session. - */ - @java.lang.Override - public java.lang.String getSession() { - java.lang.Object ref = session_; - 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(); - session_ = s; - return s; + public static com.google.cloud.discoveryengine.v1beta.SearchRequest.SessionSpec + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); } - } - /** - * - * - *
            -   * The session resource name. Optional.
            -   *
            -   * Session allows users to do multi-turn /search API calls or coordination
            -   * between /search API calls and /answer API calls.
            -   *
            -   * Example #1 (multi-turn /search API calls):
            -   * Call /search API with the session ID generated in the first call.
            -   * Here, the previous search query gets considered in query
            -   * standing. I.e., if the first query is "How did Alphabet do in 2022?"
            -   * and the current query is "How about 2023?", the current query will
            -   * be interpreted as "How did Alphabet do in 2023?".
            -   *
            -   * Example #2 (coordination between /search API calls and /answer API calls):
            -   * Call /answer API with the session ID generated in the first call.
            -   * Here, the answer generation happens in the context of the search
            -   * results from the first search call.
            -   *
            -   * Multi-turn Search feature is currently at private GA stage. Please use
            -   * v1alpha or v1beta version instead before we launch this feature to public
            -   * GA. Or ask for allowlisting through Google Support team.
            -   * 
            - * - * string session = 41 [(.google.api.resource_reference) = { ... } - * - * @return The bytes for session. - */ - @java.lang.Override - public com.google.protobuf.ByteString getSessionBytes() { - java.lang.Object ref = session_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - session_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; + public static com.google.cloud.discoveryengine.v1beta.SearchRequest.SessionSpec parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); } - } - public static final int SESSION_SPEC_FIELD_NUMBER = 42; - private com.google.cloud.discoveryengine.v1beta.SearchRequest.SessionSpec sessionSpec_; + public static com.google.cloud.discoveryengine.v1beta.SearchRequest.SessionSpec parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } - /** - * - * - *
            -   * Session specification.
            -   *
            -   * Can be used only when `session` is set.
            -   * 
            - * - * .google.cloud.discoveryengine.v1beta.SearchRequest.SessionSpec session_spec = 42; - * - * @return Whether the sessionSpec field is set. - */ - @java.lang.Override - public boolean hasSessionSpec() { - return ((bitField0_ & 0x00000200) != 0); - } + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } - /** - * - * - *
            -   * Session specification.
            -   *
            -   * Can be used only when `session` is set.
            -   * 
            - * - * .google.cloud.discoveryengine.v1beta.SearchRequest.SessionSpec session_spec = 42; - * - * @return The sessionSpec. - */ - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.SearchRequest.SessionSpec getSessionSpec() { - return sessionSpec_ == null - ? com.google.cloud.discoveryengine.v1beta.SearchRequest.SessionSpec.getDefaultInstance() - : sessionSpec_; - } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } - /** - * - * - *
            -   * Session specification.
            -   *
            -   * Can be used only when `session` is set.
            -   * 
            - * - * .google.cloud.discoveryengine.v1beta.SearchRequest.SessionSpec session_spec = 42; - */ - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.SearchRequest.SessionSpecOrBuilder - getSessionSpecOrBuilder() { - return sessionSpec_ == null - ? com.google.cloud.discoveryengine.v1beta.SearchRequest.SessionSpec.getDefaultInstance() - : sessionSpec_; - } + public static Builder newBuilder( + com.google.cloud.discoveryengine.v1beta.SearchRequest.SessionSpec prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } - public static final int RELEVANCE_THRESHOLD_FIELD_NUMBER = 44; - private int relevanceThreshold_ = 0; + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } - /** - * - * - *
            -   * The relevance threshold of the search results.
            -   *
            -   * Default to Google defined threshold, leveraging a balance of
            -   * precision and recall to deliver both highly accurate results and
            -   * comprehensive coverage of relevant information.
            -   * 
            - * - * - * .google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceThreshold relevance_threshold = 44; - * - * - * @return The enum numeric value on the wire for relevanceThreshold. - */ - @java.lang.Override - public int getRelevanceThresholdValue() { - return relevanceThreshold_; - } + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } - /** - * - * - *
            -   * The relevance threshold of the search results.
            -   *
            -   * Default to Google defined threshold, leveraging a balance of
            -   * precision and recall to deliver both highly accurate results and
            -   * comprehensive coverage of relevant information.
            -   * 
            - * - * - * .google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceThreshold relevance_threshold = 44; - * - * - * @return The relevanceThreshold. - */ - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceThreshold - getRelevanceThreshold() { - com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceThreshold result = - com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceThreshold.forNumber( - relevanceThreshold_); - return result == null - ? com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceThreshold.UNRECOGNIZED - : result; - } + /** + * + * + *
            +     * Session specification.
            +     * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.SearchRequest.SessionSpec} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.SearchRequest.SessionSpec) + com.google.cloud.discoveryengine.v1beta.SearchRequest.SessionSpecOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_SessionSpec_descriptor; + } - public static final int PERSONALIZATION_SPEC_FIELD_NUMBER = 46; - private com.google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec - personalizationSpec_; + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_SessionSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.SearchRequest.SessionSpec.class, + com.google.cloud.discoveryengine.v1beta.SearchRequest.SessionSpec.Builder.class); + } - /** - * - * - *
            -   * The specification for personalization.
            -   *
            -   * Notice that if both
            -   * [ServingConfig.personalization_spec][google.cloud.discoveryengine.v1beta.ServingConfig.personalization_spec]
            -   * and
            -   * [SearchRequest.personalization_spec][google.cloud.discoveryengine.v1beta.SearchRequest.personalization_spec]
            -   * are set,
            -   * [SearchRequest.personalization_spec][google.cloud.discoveryengine.v1beta.SearchRequest.personalization_spec]
            -   * overrides
            -   * [ServingConfig.personalization_spec][google.cloud.discoveryengine.v1beta.ServingConfig.personalization_spec].
            -   * 
            - * - * - * .google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec personalization_spec = 46; - * - * - * @return Whether the personalizationSpec field is set. - */ - @java.lang.Override - public boolean hasPersonalizationSpec() { - return ((bitField0_ & 0x00000400) != 0); - } + // Construct using + // com.google.cloud.discoveryengine.v1beta.SearchRequest.SessionSpec.newBuilder() + private Builder() {} - /** - * - * - *
            -   * The specification for personalization.
            -   *
            -   * Notice that if both
            -   * [ServingConfig.personalization_spec][google.cloud.discoveryengine.v1beta.ServingConfig.personalization_spec]
            -   * and
            -   * [SearchRequest.personalization_spec][google.cloud.discoveryengine.v1beta.SearchRequest.personalization_spec]
            -   * are set,
            -   * [SearchRequest.personalization_spec][google.cloud.discoveryengine.v1beta.SearchRequest.personalization_spec]
            -   * overrides
            -   * [ServingConfig.personalization_spec][google.cloud.discoveryengine.v1beta.ServingConfig.personalization_spec].
            -   * 
            - * - * - * .google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec personalization_spec = 46; - * - * - * @return The personalizationSpec. - */ - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec - getPersonalizationSpec() { - return personalizationSpec_ == null - ? com.google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec - .getDefaultInstance() - : personalizationSpec_; - } + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } - /** - * - * - *
            -   * The specification for personalization.
            -   *
            -   * Notice that if both
            -   * [ServingConfig.personalization_spec][google.cloud.discoveryengine.v1beta.ServingConfig.personalization_spec]
            -   * and
            -   * [SearchRequest.personalization_spec][google.cloud.discoveryengine.v1beta.SearchRequest.personalization_spec]
            -   * are set,
            -   * [SearchRequest.personalization_spec][google.cloud.discoveryengine.v1beta.SearchRequest.personalization_spec]
            -   * overrides
            -   * [ServingConfig.personalization_spec][google.cloud.discoveryengine.v1beta.ServingConfig.personalization_spec].
            -   * 
            - * - * - * .google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec personalization_spec = 46; - * - */ - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpecOrBuilder - getPersonalizationSpecOrBuilder() { - return personalizationSpec_ == null - ? com.google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec - .getDefaultInstance() - : personalizationSpec_; - } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + queryId_ = ""; + searchResultPersistenceCount_ = 0; + return this; + } - private byte memoizedIsInitialized = -1; + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1beta.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_SessionSpec_descriptor; + } - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.SearchRequest.SessionSpec + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1beta.SearchRequest.SessionSpec + .getDefaultInstance(); + } - memoizedIsInitialized = 1; - return true; - } + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.SearchRequest.SessionSpec build() { + com.google.cloud.discoveryengine.v1beta.SearchRequest.SessionSpec result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(servingConfig_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, servingConfig_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(branch_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 2, branch_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(query_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 3, query_); - } - if (pageSize_ != 0) { - output.writeInt32(4, pageSize_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 5, pageToken_); - } - if (offset_ != 0) { - output.writeInt32(6, offset_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(filter_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 7, filter_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(orderBy_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 8, orderBy_); + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.SearchRequest.SessionSpec buildPartial() { + com.google.cloud.discoveryengine.v1beta.SearchRequest.SessionSpec result = + new com.google.cloud.discoveryengine.v1beta.SearchRequest.SessionSpec(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.discoveryengine.v1beta.SearchRequest.SessionSpec result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.queryId_ = queryId_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.searchResultPersistenceCount_ = searchResultPersistenceCount_; + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.discoveryengine.v1beta.SearchRequest.SessionSpec) { + return mergeFrom( + (com.google.cloud.discoveryengine.v1beta.SearchRequest.SessionSpec) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1beta.SearchRequest.SessionSpec other) { + if (other + == com.google.cloud.discoveryengine.v1beta.SearchRequest.SessionSpec + .getDefaultInstance()) return this; + if (!other.getQueryId().isEmpty()) { + queryId_ = other.queryId_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasSearchResultPersistenceCount()) { + setSearchResultPersistenceCount(other.getSearchResultPersistenceCount()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + queryId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + searchResultPersistenceCount_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object queryId_ = ""; + + /** + * + * + *
            +       * If set, the search result gets stored to the "turn" specified by this
            +       * query ID.
            +       *
            +       * Example: Let's say the session looks like this:
            +       * session {
            +       * name: ".../sessions/xxx"
            +       * turns {
            +       * query { text: "What is foo?" query_id: ".../questions/yyy" }
            +       * answer: "Foo is ..."
            +       * }
            +       * turns {
            +       * query { text: "How about bar then?" query_id: ".../questions/zzz" }
            +       * }
            +       * }
            +       *
            +       * The user can call /search API with a request like this:
            +       *
            +       * session: ".../sessions/xxx"
            +       * session_spec { query_id: ".../questions/zzz" }
            +       *
            +       * Then, the API stores the search result, associated with the last turn.
            +       * The stored search result can be used by a subsequent /answer API call
            +       * (with the session ID and the query ID specified). Also, it is possible
            +       * to call /search and /answer in parallel with the same session ID & query
            +       * ID.
            +       * 
            + * + * string query_id = 1; + * + * @return The queryId. + */ + public java.lang.String getQueryId() { + java.lang.Object ref = queryId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + queryId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
            +       * If set, the search result gets stored to the "turn" specified by this
            +       * query ID.
            +       *
            +       * Example: Let's say the session looks like this:
            +       * session {
            +       * name: ".../sessions/xxx"
            +       * turns {
            +       * query { text: "What is foo?" query_id: ".../questions/yyy" }
            +       * answer: "Foo is ..."
            +       * }
            +       * turns {
            +       * query { text: "How about bar then?" query_id: ".../questions/zzz" }
            +       * }
            +       * }
            +       *
            +       * The user can call /search API with a request like this:
            +       *
            +       * session: ".../sessions/xxx"
            +       * session_spec { query_id: ".../questions/zzz" }
            +       *
            +       * Then, the API stores the search result, associated with the last turn.
            +       * The stored search result can be used by a subsequent /answer API call
            +       * (with the session ID and the query ID specified). Also, it is possible
            +       * to call /search and /answer in parallel with the same session ID & query
            +       * ID.
            +       * 
            + * + * string query_id = 1; + * + * @return The bytes for queryId. + */ + public com.google.protobuf.ByteString getQueryIdBytes() { + java.lang.Object ref = queryId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + queryId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
            +       * If set, the search result gets stored to the "turn" specified by this
            +       * query ID.
            +       *
            +       * Example: Let's say the session looks like this:
            +       * session {
            +       * name: ".../sessions/xxx"
            +       * turns {
            +       * query { text: "What is foo?" query_id: ".../questions/yyy" }
            +       * answer: "Foo is ..."
            +       * }
            +       * turns {
            +       * query { text: "How about bar then?" query_id: ".../questions/zzz" }
            +       * }
            +       * }
            +       *
            +       * The user can call /search API with a request like this:
            +       *
            +       * session: ".../sessions/xxx"
            +       * session_spec { query_id: ".../questions/zzz" }
            +       *
            +       * Then, the API stores the search result, associated with the last turn.
            +       * The stored search result can be used by a subsequent /answer API call
            +       * (with the session ID and the query ID specified). Also, it is possible
            +       * to call /search and /answer in parallel with the same session ID & query
            +       * ID.
            +       * 
            + * + * string query_id = 1; + * + * @param value The queryId to set. + * @return This builder for chaining. + */ + public Builder setQueryId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + queryId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
            +       * If set, the search result gets stored to the "turn" specified by this
            +       * query ID.
            +       *
            +       * Example: Let's say the session looks like this:
            +       * session {
            +       * name: ".../sessions/xxx"
            +       * turns {
            +       * query { text: "What is foo?" query_id: ".../questions/yyy" }
            +       * answer: "Foo is ..."
            +       * }
            +       * turns {
            +       * query { text: "How about bar then?" query_id: ".../questions/zzz" }
            +       * }
            +       * }
            +       *
            +       * The user can call /search API with a request like this:
            +       *
            +       * session: ".../sessions/xxx"
            +       * session_spec { query_id: ".../questions/zzz" }
            +       *
            +       * Then, the API stores the search result, associated with the last turn.
            +       * The stored search result can be used by a subsequent /answer API call
            +       * (with the session ID and the query ID specified). Also, it is possible
            +       * to call /search and /answer in parallel with the same session ID & query
            +       * ID.
            +       * 
            + * + * string query_id = 1; + * + * @return This builder for chaining. + */ + public Builder clearQueryId() { + queryId_ = getDefaultInstance().getQueryId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
            +       * If set, the search result gets stored to the "turn" specified by this
            +       * query ID.
            +       *
            +       * Example: Let's say the session looks like this:
            +       * session {
            +       * name: ".../sessions/xxx"
            +       * turns {
            +       * query { text: "What is foo?" query_id: ".../questions/yyy" }
            +       * answer: "Foo is ..."
            +       * }
            +       * turns {
            +       * query { text: "How about bar then?" query_id: ".../questions/zzz" }
            +       * }
            +       * }
            +       *
            +       * The user can call /search API with a request like this:
            +       *
            +       * session: ".../sessions/xxx"
            +       * session_spec { query_id: ".../questions/zzz" }
            +       *
            +       * Then, the API stores the search result, associated with the last turn.
            +       * The stored search result can be used by a subsequent /answer API call
            +       * (with the session ID and the query ID specified). Also, it is possible
            +       * to call /search and /answer in parallel with the same session ID & query
            +       * ID.
            +       * 
            + * + * string query_id = 1; + * + * @param value The bytes for queryId to set. + * @return This builder for chaining. + */ + public Builder setQueryIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + queryId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int searchResultPersistenceCount_; + + /** + * + * + *
            +       * The number of top search results to persist. The persisted search results
            +       * can be used for the subsequent /answer api call.
            +       *
            +       * This field is similar to the `summary_result_count` field in
            +       * [SearchRequest.ContentSearchSpec.SummarySpec.summary_result_count][google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec.summary_result_count].
            +       *
            +       * At most 10 results for documents mode, or 50 for chunks mode.
            +       * 
            + * + * optional int32 search_result_persistence_count = 2; + * + * @return Whether the searchResultPersistenceCount field is set. + */ + @java.lang.Override + public boolean hasSearchResultPersistenceCount() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
            +       * The number of top search results to persist. The persisted search results
            +       * can be used for the subsequent /answer api call.
            +       *
            +       * This field is similar to the `summary_result_count` field in
            +       * [SearchRequest.ContentSearchSpec.SummarySpec.summary_result_count][google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec.summary_result_count].
            +       *
            +       * At most 10 results for documents mode, or 50 for chunks mode.
            +       * 
            + * + * optional int32 search_result_persistence_count = 2; + * + * @return The searchResultPersistenceCount. + */ + @java.lang.Override + public int getSearchResultPersistenceCount() { + return searchResultPersistenceCount_; + } + + /** + * + * + *
            +       * The number of top search results to persist. The persisted search results
            +       * can be used for the subsequent /answer api call.
            +       *
            +       * This field is similar to the `summary_result_count` field in
            +       * [SearchRequest.ContentSearchSpec.SummarySpec.summary_result_count][google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec.summary_result_count].
            +       *
            +       * At most 10 results for documents mode, or 50 for chunks mode.
            +       * 
            + * + * optional int32 search_result_persistence_count = 2; + * + * @param value The searchResultPersistenceCount to set. + * @return This builder for chaining. + */ + public Builder setSearchResultPersistenceCount(int value) { + + searchResultPersistenceCount_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
            +       * The number of top search results to persist. The persisted search results
            +       * can be used for the subsequent /answer api call.
            +       *
            +       * This field is similar to the `summary_result_count` field in
            +       * [SearchRequest.ContentSearchSpec.SummarySpec.summary_result_count][google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec.summary_result_count].
            +       *
            +       * At most 10 results for documents mode, or 50 for chunks mode.
            +       * 
            + * + * optional int32 search_result_persistence_count = 2; + * + * @return This builder for chaining. + */ + public Builder clearSearchResultPersistenceCount() { + bitField0_ = (bitField0_ & ~0x00000002); + searchResultPersistenceCount_ = 0; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.SearchRequest.SessionSpec) } - for (int i = 0; i < facetSpecs_.size(); i++) { - output.writeMessage(9, facetSpecs_.get(i)); + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.SearchRequest.SessionSpec) + private static final com.google.cloud.discoveryengine.v1beta.SearchRequest.SessionSpec + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.discoveryengine.v1beta.SearchRequest.SessionSpec(); } - if (((bitField0_ & 0x00000004) != 0)) { - output.writeMessage(10, getBoostSpec()); + + public static com.google.cloud.discoveryengine.v1beta.SearchRequest.SessionSpec + getDefaultInstance() { + return DEFAULT_INSTANCE; } - com.google.protobuf.GeneratedMessage.serializeStringMapTo( - output, internalGetParams(), ParamsDefaultEntryHolder.defaultEntry, 11); - if (((bitField0_ & 0x00000008) != 0)) { - output.writeMessage(13, getQueryExpansionSpec()); + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SessionSpec parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; } - if (((bitField0_ & 0x00000010) != 0)) { - output.writeMessage(14, getSpellCorrectionSpec()); + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(userPseudoId_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 15, userPseudoId_); + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.SearchRequest.SessionSpec + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; } - if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(19, getImageQuery()); + } + + public interface RelevanceFilterSpecOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceFilterSpec) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
            +     * Optional. Relevance filtering threshold specification for keyword search.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceFilterSpec.RelevanceThresholdSpec keyword_search_threshold = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the keywordSearchThreshold field is set. + */ + boolean hasKeywordSearchThreshold(); + + /** + * + * + *
            +     * Optional. Relevance filtering threshold specification for keyword search.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceFilterSpec.RelevanceThresholdSpec keyword_search_threshold = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The keywordSearchThreshold. + */ + com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceFilterSpec.RelevanceThresholdSpec + getKeywordSearchThreshold(); + + /** + * + * + *
            +     * Optional. Relevance filtering threshold specification for keyword search.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceFilterSpec.RelevanceThresholdSpec keyword_search_threshold = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceFilterSpec + .RelevanceThresholdSpecOrBuilder + getKeywordSearchThresholdOrBuilder(); + + /** + * + * + *
            +     * Optional. Relevance filtering threshold specification for semantic
            +     * search.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceFilterSpec.RelevanceThresholdSpec semantic_search_threshold = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the semanticSearchThreshold field is set. + */ + boolean hasSemanticSearchThreshold(); + + /** + * + * + *
            +     * Optional. Relevance filtering threshold specification for semantic
            +     * search.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceFilterSpec.RelevanceThresholdSpec semantic_search_threshold = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The semanticSearchThreshold. + */ + com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceFilterSpec.RelevanceThresholdSpec + getSemanticSearchThreshold(); + + /** + * + * + *
            +     * Optional. Relevance filtering threshold specification for semantic
            +     * search.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceFilterSpec.RelevanceThresholdSpec semantic_search_threshold = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceFilterSpec + .RelevanceThresholdSpecOrBuilder + getSemanticSearchThresholdOrBuilder(); + } + + /** + * + * + *
            +   * Relevance filtering specification.
            +   * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceFilterSpec} + */ + public static final class RelevanceFilterSpec extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceFilterSpec) + RelevanceFilterSpecOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "RelevanceFilterSpec"); + } + + // Use RelevanceFilterSpec.newBuilder() to construct. + private RelevanceFilterSpec(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private RelevanceFilterSpec() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_RelevanceFilterSpec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_RelevanceFilterSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceFilterSpec.class, + com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceFilterSpec.Builder + .class); + } + + public interface RelevanceThresholdSpecOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceFilterSpec.RelevanceThresholdSpec) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
            +       * Pre-defined relevance threshold for the sub-search.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceThreshold relevance_threshold = 1; + * + * + * @return Whether the relevanceThreshold field is set. + */ + boolean hasRelevanceThreshold(); + + /** + * + * + *
            +       * Pre-defined relevance threshold for the sub-search.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceThreshold relevance_threshold = 1; + * + * + * @return The enum numeric value on the wire for relevanceThreshold. + */ + int getRelevanceThresholdValue(); + + /** + * + * + *
            +       * Pre-defined relevance threshold for the sub-search.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceThreshold relevance_threshold = 1; + * + * + * @return The relevanceThreshold. + */ + com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceThreshold + getRelevanceThreshold(); + + /** + * + * + *
            +       * Custom relevance threshold for the sub-search.
            +       * The value must be in [0.0, 1.0].
            +       * 
            + * + * float semantic_relevance_threshold = 2; + * + * @return Whether the semanticRelevanceThreshold field is set. + */ + boolean hasSemanticRelevanceThreshold(); + + /** + * + * + *
            +       * Custom relevance threshold for the sub-search.
            +       * The value must be in [0.0, 1.0].
            +       * 
            + * + * float semantic_relevance_threshold = 2; + * + * @return The semanticRelevanceThreshold. + */ + float getSemanticRelevanceThreshold(); + + com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceFilterSpec + .RelevanceThresholdSpec.RelevanceThresholdSpecCase + getRelevanceThresholdSpecCase(); + } + + /** + * + * + *
            +     * Specification for relevance filtering on a specific sub-search.
            +     * 
            + * + * Protobuf type {@code + * google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceFilterSpec.RelevanceThresholdSpec} + */ + public static final class RelevanceThresholdSpec extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceFilterSpec.RelevanceThresholdSpec) + RelevanceThresholdSpecOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "RelevanceThresholdSpec"); + } + + // Use RelevanceThresholdSpec.newBuilder() to construct. + private RelevanceThresholdSpec(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private RelevanceThresholdSpec() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_RelevanceFilterSpec_RelevanceThresholdSpec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_RelevanceFilterSpec_RelevanceThresholdSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceFilterSpec + .RelevanceThresholdSpec.class, + com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceFilterSpec + .RelevanceThresholdSpec.Builder.class); + } + + private int relevanceThresholdSpecCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object relevanceThresholdSpec_; + + public enum RelevanceThresholdSpecCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + RELEVANCE_THRESHOLD(1), + SEMANTIC_RELEVANCE_THRESHOLD(2), + RELEVANCETHRESHOLDSPEC_NOT_SET(0); + private final int value; + + private RelevanceThresholdSpecCase(int value) { + this.value = value; + } + + /** + * @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 RelevanceThresholdSpecCase valueOf(int value) { + return forNumber(value); + } + + public static RelevanceThresholdSpecCase forNumber(int value) { + switch (value) { + case 1: + return RELEVANCE_THRESHOLD; + case 2: + return SEMANTIC_RELEVANCE_THRESHOLD; + case 0: + return RELEVANCETHRESHOLDSPEC_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public RelevanceThresholdSpecCase getRelevanceThresholdSpecCase() { + return RelevanceThresholdSpecCase.forNumber(relevanceThresholdSpecCase_); + } + + public static final int RELEVANCE_THRESHOLD_FIELD_NUMBER = 1; + + /** + * + * + *
            +       * Pre-defined relevance threshold for the sub-search.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceThreshold relevance_threshold = 1; + * + * + * @return Whether the relevanceThreshold field is set. + */ + public boolean hasRelevanceThreshold() { + return relevanceThresholdSpecCase_ == 1; + } + + /** + * + * + *
            +       * Pre-defined relevance threshold for the sub-search.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceThreshold relevance_threshold = 1; + * + * + * @return The enum numeric value on the wire for relevanceThreshold. + */ + public int getRelevanceThresholdValue() { + if (relevanceThresholdSpecCase_ == 1) { + return (java.lang.Integer) relevanceThresholdSpec_; + } + return 0; + } + + /** + * + * + *
            +       * Pre-defined relevance threshold for the sub-search.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceThreshold relevance_threshold = 1; + * + * + * @return The relevanceThreshold. + */ + public com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceThreshold + getRelevanceThreshold() { + if (relevanceThresholdSpecCase_ == 1) { + com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceThreshold result = + com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceThreshold.forNumber( + (java.lang.Integer) relevanceThresholdSpec_); + return result == null + ? com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceThreshold + .UNRECOGNIZED + : result; + } + return com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceThreshold + .RELEVANCE_THRESHOLD_UNSPECIFIED; + } + + public static final int SEMANTIC_RELEVANCE_THRESHOLD_FIELD_NUMBER = 2; + + /** + * + * + *
            +       * Custom relevance threshold for the sub-search.
            +       * The value must be in [0.0, 1.0].
            +       * 
            + * + * float semantic_relevance_threshold = 2; + * + * @return Whether the semanticRelevanceThreshold field is set. + */ + @java.lang.Override + public boolean hasSemanticRelevanceThreshold() { + return relevanceThresholdSpecCase_ == 2; + } + + /** + * + * + *
            +       * Custom relevance threshold for the sub-search.
            +       * The value must be in [0.0, 1.0].
            +       * 
            + * + * float semantic_relevance_threshold = 2; + * + * @return The semanticRelevanceThreshold. + */ + @java.lang.Override + public float getSemanticRelevanceThreshold() { + if (relevanceThresholdSpecCase_ == 2) { + return (java.lang.Float) relevanceThresholdSpec_; + } + return 0F; + } + + 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 (relevanceThresholdSpecCase_ == 1) { + output.writeEnum(1, ((java.lang.Integer) relevanceThresholdSpec_)); + } + if (relevanceThresholdSpecCase_ == 2) { + output.writeFloat(2, (float) ((java.lang.Float) relevanceThresholdSpec_)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (relevanceThresholdSpecCase_ == 1) { + size += + com.google.protobuf.CodedOutputStream.computeEnumSize( + 1, ((java.lang.Integer) relevanceThresholdSpec_)); + } + if (relevanceThresholdSpecCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeFloatSize( + 2, (float) ((java.lang.Float) relevanceThresholdSpec_)); + } + 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.discoveryengine.v1beta.SearchRequest.RelevanceFilterSpec + .RelevanceThresholdSpec)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceFilterSpec + .RelevanceThresholdSpec + other = + (com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceFilterSpec + .RelevanceThresholdSpec) + obj; + + if (!getRelevanceThresholdSpecCase().equals(other.getRelevanceThresholdSpecCase())) + return false; + switch (relevanceThresholdSpecCase_) { + case 1: + if (getRelevanceThresholdValue() != other.getRelevanceThresholdValue()) return false; + break; + case 2: + if (java.lang.Float.floatToIntBits(getSemanticRelevanceThreshold()) + != java.lang.Float.floatToIntBits(other.getSemanticRelevanceThreshold())) + return false; + break; + case 0: + default: + } + 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(); + switch (relevanceThresholdSpecCase_) { + case 1: + hash = (37 * hash) + RELEVANCE_THRESHOLD_FIELD_NUMBER; + hash = (53 * hash) + getRelevanceThresholdValue(); + break; + case 2: + hash = (37 * hash) + SEMANTIC_RELEVANCE_THRESHOLD_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits(getSemanticRelevanceThreshold()); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceFilterSpec + .RelevanceThresholdSpec + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceFilterSpec + .RelevanceThresholdSpec + 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.discoveryengine.v1beta.SearchRequest.RelevanceFilterSpec + .RelevanceThresholdSpec + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceFilterSpec + .RelevanceThresholdSpec + 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.discoveryengine.v1beta.SearchRequest.RelevanceFilterSpec + .RelevanceThresholdSpec + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceFilterSpec + .RelevanceThresholdSpec + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceFilterSpec + .RelevanceThresholdSpec + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceFilterSpec + .RelevanceThresholdSpec + 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.discoveryengine.v1beta.SearchRequest.RelevanceFilterSpec + .RelevanceThresholdSpec + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceFilterSpec + .RelevanceThresholdSpec + 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.discoveryengine.v1beta.SearchRequest.RelevanceFilterSpec + .RelevanceThresholdSpec + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceFilterSpec + .RelevanceThresholdSpec + 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.discoveryengine.v1beta.SearchRequest.RelevanceFilterSpec + .RelevanceThresholdSpec + 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; + } + + /** + * + * + *
            +       * Specification for relevance filtering on a specific sub-search.
            +       * 
            + * + * Protobuf type {@code + * google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceFilterSpec.RelevanceThresholdSpec} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceFilterSpec.RelevanceThresholdSpec) + com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceFilterSpec + .RelevanceThresholdSpecOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_RelevanceFilterSpec_RelevanceThresholdSpec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_RelevanceFilterSpec_RelevanceThresholdSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceFilterSpec + .RelevanceThresholdSpec.class, + com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceFilterSpec + .RelevanceThresholdSpec.Builder.class); + } + + // Construct using + // com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceFilterSpec.RelevanceThresholdSpec.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + relevanceThresholdSpecCase_ = 0; + relevanceThresholdSpec_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1beta.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_RelevanceFilterSpec_RelevanceThresholdSpec_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceFilterSpec + .RelevanceThresholdSpec + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceFilterSpec + .RelevanceThresholdSpec.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceFilterSpec + .RelevanceThresholdSpec + build() { + com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceFilterSpec + .RelevanceThresholdSpec + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceFilterSpec + .RelevanceThresholdSpec + buildPartial() { + com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceFilterSpec + .RelevanceThresholdSpec + result = + new com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceFilterSpec + .RelevanceThresholdSpec(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceFilterSpec + .RelevanceThresholdSpec + result) { + int from_bitField0_ = bitField0_; + } + + private void buildPartialOneofs( + com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceFilterSpec + .RelevanceThresholdSpec + result) { + result.relevanceThresholdSpecCase_ = relevanceThresholdSpecCase_; + result.relevanceThresholdSpec_ = this.relevanceThresholdSpec_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceFilterSpec + .RelevanceThresholdSpec) { + return mergeFrom( + (com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceFilterSpec + .RelevanceThresholdSpec) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceFilterSpec + .RelevanceThresholdSpec + other) { + if (other + == com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceFilterSpec + .RelevanceThresholdSpec.getDefaultInstance()) return this; + switch (other.getRelevanceThresholdSpecCase()) { + case RELEVANCE_THRESHOLD: + { + setRelevanceThresholdValue(other.getRelevanceThresholdValue()); + break; + } + case SEMANTIC_RELEVANCE_THRESHOLD: + { + setSemanticRelevanceThreshold(other.getSemanticRelevanceThreshold()); + break; + } + case RELEVANCETHRESHOLDSPEC_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + int rawValue = input.readEnum(); + relevanceThresholdSpecCase_ = 1; + relevanceThresholdSpec_ = rawValue; + break; + } // case 8 + case 21: + { + relevanceThresholdSpec_ = input.readFloat(); + relevanceThresholdSpecCase_ = 2; + break; + } // case 21 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int relevanceThresholdSpecCase_ = 0; + private java.lang.Object relevanceThresholdSpec_; + + public RelevanceThresholdSpecCase getRelevanceThresholdSpecCase() { + return RelevanceThresholdSpecCase.forNumber(relevanceThresholdSpecCase_); + } + + public Builder clearRelevanceThresholdSpec() { + relevanceThresholdSpecCase_ = 0; + relevanceThresholdSpec_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + /** + * + * + *
            +         * Pre-defined relevance threshold for the sub-search.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceThreshold relevance_threshold = 1; + * + * + * @return Whether the relevanceThreshold field is set. + */ + @java.lang.Override + public boolean hasRelevanceThreshold() { + return relevanceThresholdSpecCase_ == 1; + } + + /** + * + * + *
            +         * Pre-defined relevance threshold for the sub-search.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceThreshold relevance_threshold = 1; + * + * + * @return The enum numeric value on the wire for relevanceThreshold. + */ + @java.lang.Override + public int getRelevanceThresholdValue() { + if (relevanceThresholdSpecCase_ == 1) { + return ((java.lang.Integer) relevanceThresholdSpec_).intValue(); + } + return 0; + } + + /** + * + * + *
            +         * Pre-defined relevance threshold for the sub-search.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceThreshold relevance_threshold = 1; + * + * + * @param value The enum numeric value on the wire for relevanceThreshold to set. + * @return This builder for chaining. + */ + public Builder setRelevanceThresholdValue(int value) { + relevanceThresholdSpecCase_ = 1; + relevanceThresholdSpec_ = value; + onChanged(); + return this; + } + + /** + * + * + *
            +         * Pre-defined relevance threshold for the sub-search.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceThreshold relevance_threshold = 1; + * + * + * @return The relevanceThreshold. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceThreshold + getRelevanceThreshold() { + if (relevanceThresholdSpecCase_ == 1) { + com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceThreshold result = + com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceThreshold.forNumber( + (java.lang.Integer) relevanceThresholdSpec_); + return result == null + ? com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceThreshold + .UNRECOGNIZED + : result; + } + return com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceThreshold + .RELEVANCE_THRESHOLD_UNSPECIFIED; + } + + /** + * + * + *
            +         * Pre-defined relevance threshold for the sub-search.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceThreshold relevance_threshold = 1; + * + * + * @param value The relevanceThreshold to set. + * @return This builder for chaining. + */ + public Builder setRelevanceThreshold( + com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceThreshold value) { + if (value == null) { + throw new NullPointerException(); + } + relevanceThresholdSpecCase_ = 1; + relevanceThresholdSpec_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
            +         * Pre-defined relevance threshold for the sub-search.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceThreshold relevance_threshold = 1; + * + * + * @return This builder for chaining. + */ + public Builder clearRelevanceThreshold() { + if (relevanceThresholdSpecCase_ == 1) { + relevanceThresholdSpecCase_ = 0; + relevanceThresholdSpec_ = null; + onChanged(); + } + return this; + } + + /** + * + * + *
            +         * Custom relevance threshold for the sub-search.
            +         * The value must be in [0.0, 1.0].
            +         * 
            + * + * float semantic_relevance_threshold = 2; + * + * @return Whether the semanticRelevanceThreshold field is set. + */ + public boolean hasSemanticRelevanceThreshold() { + return relevanceThresholdSpecCase_ == 2; + } + + /** + * + * + *
            +         * Custom relevance threshold for the sub-search.
            +         * The value must be in [0.0, 1.0].
            +         * 
            + * + * float semantic_relevance_threshold = 2; + * + * @return The semanticRelevanceThreshold. + */ + public float getSemanticRelevanceThreshold() { + if (relevanceThresholdSpecCase_ == 2) { + return (java.lang.Float) relevanceThresholdSpec_; + } + return 0F; + } + + /** + * + * + *
            +         * Custom relevance threshold for the sub-search.
            +         * The value must be in [0.0, 1.0].
            +         * 
            + * + * float semantic_relevance_threshold = 2; + * + * @param value The semanticRelevanceThreshold to set. + * @return This builder for chaining. + */ + public Builder setSemanticRelevanceThreshold(float value) { + + relevanceThresholdSpecCase_ = 2; + relevanceThresholdSpec_ = value; + onChanged(); + return this; + } + + /** + * + * + *
            +         * Custom relevance threshold for the sub-search.
            +         * The value must be in [0.0, 1.0].
            +         * 
            + * + * float semantic_relevance_threshold = 2; + * + * @return This builder for chaining. + */ + public Builder clearSemanticRelevanceThreshold() { + if (relevanceThresholdSpecCase_ == 2) { + relevanceThresholdSpecCase_ = 0; + relevanceThresholdSpec_ = null; + onChanged(); + } + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceFilterSpec.RelevanceThresholdSpec) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceFilterSpec.RelevanceThresholdSpec) + private static final com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceFilterSpec + .RelevanceThresholdSpec + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceFilterSpec + .RelevanceThresholdSpec(); + } + + public static com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceFilterSpec + .RelevanceThresholdSpec + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RelevanceThresholdSpec parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceFilterSpec + .RelevanceThresholdSpec + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int bitField0_; + public static final int KEYWORD_SEARCH_THRESHOLD_FIELD_NUMBER = 1; + private com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceFilterSpec + .RelevanceThresholdSpec + keywordSearchThreshold_; + + /** + * + * + *
            +     * Optional. Relevance filtering threshold specification for keyword search.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceFilterSpec.RelevanceThresholdSpec keyword_search_threshold = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the keywordSearchThreshold field is set. + */ + @java.lang.Override + public boolean hasKeywordSearchThreshold() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
            +     * Optional. Relevance filtering threshold specification for keyword search.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceFilterSpec.RelevanceThresholdSpec keyword_search_threshold = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The keywordSearchThreshold. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceFilterSpec + .RelevanceThresholdSpec + getKeywordSearchThreshold() { + return keywordSearchThreshold_ == null + ? com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceFilterSpec + .RelevanceThresholdSpec.getDefaultInstance() + : keywordSearchThreshold_; + } + + /** + * + * + *
            +     * Optional. Relevance filtering threshold specification for keyword search.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceFilterSpec.RelevanceThresholdSpec keyword_search_threshold = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceFilterSpec + .RelevanceThresholdSpecOrBuilder + getKeywordSearchThresholdOrBuilder() { + return keywordSearchThreshold_ == null + ? com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceFilterSpec + .RelevanceThresholdSpec.getDefaultInstance() + : keywordSearchThreshold_; + } + + public static final int SEMANTIC_SEARCH_THRESHOLD_FIELD_NUMBER = 2; + private com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceFilterSpec + .RelevanceThresholdSpec + semanticSearchThreshold_; + + /** + * + * + *
            +     * Optional. Relevance filtering threshold specification for semantic
            +     * search.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceFilterSpec.RelevanceThresholdSpec semantic_search_threshold = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the semanticSearchThreshold field is set. + */ + @java.lang.Override + public boolean hasSemanticSearchThreshold() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
            +     * Optional. Relevance filtering threshold specification for semantic
            +     * search.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceFilterSpec.RelevanceThresholdSpec semantic_search_threshold = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The semanticSearchThreshold. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceFilterSpec + .RelevanceThresholdSpec + getSemanticSearchThreshold() { + return semanticSearchThreshold_ == null + ? com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceFilterSpec + .RelevanceThresholdSpec.getDefaultInstance() + : semanticSearchThreshold_; + } + + /** + * + * + *
            +     * Optional. Relevance filtering threshold specification for semantic
            +     * search.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceFilterSpec.RelevanceThresholdSpec semantic_search_threshold = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceFilterSpec + .RelevanceThresholdSpecOrBuilder + getSemanticSearchThresholdOrBuilder() { + return semanticSearchThreshold_ == null + ? com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceFilterSpec + .RelevanceThresholdSpec.getDefaultInstance() + : semanticSearchThreshold_; + } + + 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, getKeywordSearchThreshold()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(2, getSemanticSearchThreshold()); + } + 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, getKeywordSearchThreshold()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, getSemanticSearchThreshold()); + } + 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.discoveryengine.v1beta.SearchRequest.RelevanceFilterSpec)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceFilterSpec other = + (com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceFilterSpec) obj; + + if (hasKeywordSearchThreshold() != other.hasKeywordSearchThreshold()) return false; + if (hasKeywordSearchThreshold()) { + if (!getKeywordSearchThreshold().equals(other.getKeywordSearchThreshold())) return false; + } + if (hasSemanticSearchThreshold() != other.hasSemanticSearchThreshold()) return false; + if (hasSemanticSearchThreshold()) { + if (!getSemanticSearchThreshold().equals(other.getSemanticSearchThreshold())) 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 (hasKeywordSearchThreshold()) { + hash = (37 * hash) + KEYWORD_SEARCH_THRESHOLD_FIELD_NUMBER; + hash = (53 * hash) + getKeywordSearchThreshold().hashCode(); + } + if (hasSemanticSearchThreshold()) { + hash = (37 * hash) + SEMANTIC_SEARCH_THRESHOLD_FIELD_NUMBER; + hash = (53 * hash) + getSemanticSearchThreshold().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceFilterSpec + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceFilterSpec + 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.discoveryengine.v1beta.SearchRequest.RelevanceFilterSpec + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceFilterSpec + 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.discoveryengine.v1beta.SearchRequest.RelevanceFilterSpec + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceFilterSpec + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceFilterSpec + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceFilterSpec + 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.discoveryengine.v1beta.SearchRequest.RelevanceFilterSpec + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceFilterSpec + 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.discoveryengine.v1beta.SearchRequest.RelevanceFilterSpec + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceFilterSpec + 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.discoveryengine.v1beta.SearchRequest.RelevanceFilterSpec 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; + } + + /** + * + * + *
            +     * Relevance filtering specification.
            +     * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceFilterSpec} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceFilterSpec) + com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceFilterSpecOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_RelevanceFilterSpec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_RelevanceFilterSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceFilterSpec.class, + com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceFilterSpec.Builder + .class); + } + + // Construct using + // com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceFilterSpec.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetKeywordSearchThresholdFieldBuilder(); + internalGetSemanticSearchThresholdFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + keywordSearchThreshold_ = null; + if (keywordSearchThresholdBuilder_ != null) { + keywordSearchThresholdBuilder_.dispose(); + keywordSearchThresholdBuilder_ = null; + } + semanticSearchThreshold_ = null; + if (semanticSearchThresholdBuilder_ != null) { + semanticSearchThresholdBuilder_.dispose(); + semanticSearchThresholdBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1beta.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_RelevanceFilterSpec_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceFilterSpec + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceFilterSpec + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceFilterSpec build() { + com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceFilterSpec result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceFilterSpec + buildPartial() { + com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceFilterSpec result = + new com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceFilterSpec(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceFilterSpec result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.keywordSearchThreshold_ = + keywordSearchThresholdBuilder_ == null + ? keywordSearchThreshold_ + : keywordSearchThresholdBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.semanticSearchThreshold_ = + semanticSearchThresholdBuilder_ == null + ? semanticSearchThreshold_ + : semanticSearchThresholdBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceFilterSpec) { + return mergeFrom( + (com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceFilterSpec) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceFilterSpec other) { + if (other + == com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceFilterSpec + .getDefaultInstance()) return this; + if (other.hasKeywordSearchThreshold()) { + mergeKeywordSearchThreshold(other.getKeywordSearchThreshold()); + } + if (other.hasSemanticSearchThreshold()) { + mergeSemanticSearchThreshold(other.getSemanticSearchThreshold()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage( + internalGetKeywordSearchThresholdFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage( + internalGetSemanticSearchThresholdFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceFilterSpec + .RelevanceThresholdSpec + keywordSearchThreshold_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceFilterSpec + .RelevanceThresholdSpec, + com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceFilterSpec + .RelevanceThresholdSpec.Builder, + com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceFilterSpec + .RelevanceThresholdSpecOrBuilder> + keywordSearchThresholdBuilder_; + + /** + * + * + *
            +       * Optional. Relevance filtering threshold specification for keyword search.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceFilterSpec.RelevanceThresholdSpec keyword_search_threshold = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the keywordSearchThreshold field is set. + */ + public boolean hasKeywordSearchThreshold() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
            +       * Optional. Relevance filtering threshold specification for keyword search.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceFilterSpec.RelevanceThresholdSpec keyword_search_threshold = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The keywordSearchThreshold. + */ + public com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceFilterSpec + .RelevanceThresholdSpec + getKeywordSearchThreshold() { + if (keywordSearchThresholdBuilder_ == null) { + return keywordSearchThreshold_ == null + ? com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceFilterSpec + .RelevanceThresholdSpec.getDefaultInstance() + : keywordSearchThreshold_; + } else { + return keywordSearchThresholdBuilder_.getMessage(); + } + } + + /** + * + * + *
            +       * Optional. Relevance filtering threshold specification for keyword search.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceFilterSpec.RelevanceThresholdSpec keyword_search_threshold = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setKeywordSearchThreshold( + com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceFilterSpec + .RelevanceThresholdSpec + value) { + if (keywordSearchThresholdBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + keywordSearchThreshold_ = value; + } else { + keywordSearchThresholdBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
            +       * Optional. Relevance filtering threshold specification for keyword search.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceFilterSpec.RelevanceThresholdSpec keyword_search_threshold = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setKeywordSearchThreshold( + com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceFilterSpec + .RelevanceThresholdSpec.Builder + builderForValue) { + if (keywordSearchThresholdBuilder_ == null) { + keywordSearchThreshold_ = builderForValue.build(); + } else { + keywordSearchThresholdBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
            +       * Optional. Relevance filtering threshold specification for keyword search.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceFilterSpec.RelevanceThresholdSpec keyword_search_threshold = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeKeywordSearchThreshold( + com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceFilterSpec + .RelevanceThresholdSpec + value) { + if (keywordSearchThresholdBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && keywordSearchThreshold_ != null + && keywordSearchThreshold_ + != com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceFilterSpec + .RelevanceThresholdSpec.getDefaultInstance()) { + getKeywordSearchThresholdBuilder().mergeFrom(value); + } else { + keywordSearchThreshold_ = value; + } + } else { + keywordSearchThresholdBuilder_.mergeFrom(value); + } + if (keywordSearchThreshold_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + + /** + * + * + *
            +       * Optional. Relevance filtering threshold specification for keyword search.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceFilterSpec.RelevanceThresholdSpec keyword_search_threshold = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearKeywordSearchThreshold() { + bitField0_ = (bitField0_ & ~0x00000001); + keywordSearchThreshold_ = null; + if (keywordSearchThresholdBuilder_ != null) { + keywordSearchThresholdBuilder_.dispose(); + keywordSearchThresholdBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
            +       * Optional. Relevance filtering threshold specification for keyword search.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceFilterSpec.RelevanceThresholdSpec keyword_search_threshold = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceFilterSpec + .RelevanceThresholdSpec.Builder + getKeywordSearchThresholdBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return internalGetKeywordSearchThresholdFieldBuilder().getBuilder(); + } + + /** + * + * + *
            +       * Optional. Relevance filtering threshold specification for keyword search.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceFilterSpec.RelevanceThresholdSpec keyword_search_threshold = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceFilterSpec + .RelevanceThresholdSpecOrBuilder + getKeywordSearchThresholdOrBuilder() { + if (keywordSearchThresholdBuilder_ != null) { + return keywordSearchThresholdBuilder_.getMessageOrBuilder(); + } else { + return keywordSearchThreshold_ == null + ? com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceFilterSpec + .RelevanceThresholdSpec.getDefaultInstance() + : keywordSearchThreshold_; + } + } + + /** + * + * + *
            +       * Optional. Relevance filtering threshold specification for keyword search.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceFilterSpec.RelevanceThresholdSpec keyword_search_threshold = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceFilterSpec + .RelevanceThresholdSpec, + com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceFilterSpec + .RelevanceThresholdSpec.Builder, + com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceFilterSpec + .RelevanceThresholdSpecOrBuilder> + internalGetKeywordSearchThresholdFieldBuilder() { + if (keywordSearchThresholdBuilder_ == null) { + keywordSearchThresholdBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceFilterSpec + .RelevanceThresholdSpec, + com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceFilterSpec + .RelevanceThresholdSpec.Builder, + com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceFilterSpec + .RelevanceThresholdSpecOrBuilder>( + getKeywordSearchThreshold(), getParentForChildren(), isClean()); + keywordSearchThreshold_ = null; + } + return keywordSearchThresholdBuilder_; + } + + private com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceFilterSpec + .RelevanceThresholdSpec + semanticSearchThreshold_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceFilterSpec + .RelevanceThresholdSpec, + com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceFilterSpec + .RelevanceThresholdSpec.Builder, + com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceFilterSpec + .RelevanceThresholdSpecOrBuilder> + semanticSearchThresholdBuilder_; + + /** + * + * + *
            +       * Optional. Relevance filtering threshold specification for semantic
            +       * search.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceFilterSpec.RelevanceThresholdSpec semantic_search_threshold = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the semanticSearchThreshold field is set. + */ + public boolean hasSemanticSearchThreshold() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
            +       * Optional. Relevance filtering threshold specification for semantic
            +       * search.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceFilterSpec.RelevanceThresholdSpec semantic_search_threshold = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The semanticSearchThreshold. + */ + public com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceFilterSpec + .RelevanceThresholdSpec + getSemanticSearchThreshold() { + if (semanticSearchThresholdBuilder_ == null) { + return semanticSearchThreshold_ == null + ? com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceFilterSpec + .RelevanceThresholdSpec.getDefaultInstance() + : semanticSearchThreshold_; + } else { + return semanticSearchThresholdBuilder_.getMessage(); + } + } + + /** + * + * + *
            +       * Optional. Relevance filtering threshold specification for semantic
            +       * search.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceFilterSpec.RelevanceThresholdSpec semantic_search_threshold = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setSemanticSearchThreshold( + com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceFilterSpec + .RelevanceThresholdSpec + value) { + if (semanticSearchThresholdBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + semanticSearchThreshold_ = value; + } else { + semanticSearchThresholdBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
            +       * Optional. Relevance filtering threshold specification for semantic
            +       * search.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceFilterSpec.RelevanceThresholdSpec semantic_search_threshold = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setSemanticSearchThreshold( + com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceFilterSpec + .RelevanceThresholdSpec.Builder + builderForValue) { + if (semanticSearchThresholdBuilder_ == null) { + semanticSearchThreshold_ = builderForValue.build(); + } else { + semanticSearchThresholdBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
            +       * Optional. Relevance filtering threshold specification for semantic
            +       * search.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceFilterSpec.RelevanceThresholdSpec semantic_search_threshold = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeSemanticSearchThreshold( + com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceFilterSpec + .RelevanceThresholdSpec + value) { + if (semanticSearchThresholdBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && semanticSearchThreshold_ != null + && semanticSearchThreshold_ + != com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceFilterSpec + .RelevanceThresholdSpec.getDefaultInstance()) { + getSemanticSearchThresholdBuilder().mergeFrom(value); + } else { + semanticSearchThreshold_ = value; + } + } else { + semanticSearchThresholdBuilder_.mergeFrom(value); + } + if (semanticSearchThreshold_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** + * + * + *
            +       * Optional. Relevance filtering threshold specification for semantic
            +       * search.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceFilterSpec.RelevanceThresholdSpec semantic_search_threshold = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearSemanticSearchThreshold() { + bitField0_ = (bitField0_ & ~0x00000002); + semanticSearchThreshold_ = null; + if (semanticSearchThresholdBuilder_ != null) { + semanticSearchThresholdBuilder_.dispose(); + semanticSearchThresholdBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
            +       * Optional. Relevance filtering threshold specification for semantic
            +       * search.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceFilterSpec.RelevanceThresholdSpec semantic_search_threshold = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceFilterSpec + .RelevanceThresholdSpec.Builder + getSemanticSearchThresholdBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return internalGetSemanticSearchThresholdFieldBuilder().getBuilder(); + } + + /** + * + * + *
            +       * Optional. Relevance filtering threshold specification for semantic
            +       * search.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceFilterSpec.RelevanceThresholdSpec semantic_search_threshold = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceFilterSpec + .RelevanceThresholdSpecOrBuilder + getSemanticSearchThresholdOrBuilder() { + if (semanticSearchThresholdBuilder_ != null) { + return semanticSearchThresholdBuilder_.getMessageOrBuilder(); + } else { + return semanticSearchThreshold_ == null + ? com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceFilterSpec + .RelevanceThresholdSpec.getDefaultInstance() + : semanticSearchThreshold_; + } + } + + /** + * + * + *
            +       * Optional. Relevance filtering threshold specification for semantic
            +       * search.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceFilterSpec.RelevanceThresholdSpec semantic_search_threshold = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceFilterSpec + .RelevanceThresholdSpec, + com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceFilterSpec + .RelevanceThresholdSpec.Builder, + com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceFilterSpec + .RelevanceThresholdSpecOrBuilder> + internalGetSemanticSearchThresholdFieldBuilder() { + if (semanticSearchThresholdBuilder_ == null) { + semanticSearchThresholdBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceFilterSpec + .RelevanceThresholdSpec, + com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceFilterSpec + .RelevanceThresholdSpec.Builder, + com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceFilterSpec + .RelevanceThresholdSpecOrBuilder>( + getSemanticSearchThreshold(), getParentForChildren(), isClean()); + semanticSearchThreshold_ = null; + } + return semanticSearchThresholdBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceFilterSpec) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceFilterSpec) + private static final com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceFilterSpec + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceFilterSpec(); + } + + public static com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceFilterSpec + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RelevanceFilterSpec parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceFilterSpec + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface PersonalizationSpecOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
            +     * The personalization mode of the search request.
            +     * Defaults to
            +     * [Mode.AUTO][google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec.Mode.AUTO].
            +     * 
            + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec.Mode mode = 1; + * + * + * @return The enum numeric value on the wire for mode. + */ + int getModeValue(); + + /** + * + * + *
            +     * The personalization mode of the search request.
            +     * Defaults to
            +     * [Mode.AUTO][google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec.Mode.AUTO].
            +     * 
            + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec.Mode mode = 1; + * + * + * @return The mode. + */ + com.google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec.Mode getMode(); + } + + /** + * + * + *
            +   * The specification for personalization.
            +   * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec} + */ + public static final class PersonalizationSpec extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec) + PersonalizationSpecOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "PersonalizationSpec"); + } + + // Use PersonalizationSpec.newBuilder() to construct. + private PersonalizationSpec(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private PersonalizationSpec() { + mode_ = 0; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_PersonalizationSpec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_PersonalizationSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec.class, + com.google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec.Builder + .class); + } + + /** + * + * + *
            +     * The personalization mode of each search request.
            +     * 
            + * + * Protobuf enum {@code + * google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec.Mode} + */ + public enum Mode implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
            +       * Default value. In this case, server behavior defaults to
            +       * [Mode.AUTO][google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec.Mode.AUTO].
            +       * 
            + * + * MODE_UNSPECIFIED = 0; + */ + MODE_UNSPECIFIED(0), + /** + * + * + *
            +       * Personalization is enabled if data quality requirements are met.
            +       * 
            + * + * AUTO = 1; + */ + AUTO(1), + /** + * + * + *
            +       * Disable personalization.
            +       * 
            + * + * DISABLED = 2; + */ + DISABLED(2), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Mode"); + } + + /** + * + * + *
            +       * Default value. In this case, server behavior defaults to
            +       * [Mode.AUTO][google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec.Mode.AUTO].
            +       * 
            + * + * MODE_UNSPECIFIED = 0; + */ + public static final int MODE_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
            +       * Personalization is enabled if data quality requirements are met.
            +       * 
            + * + * AUTO = 1; + */ + public static final int AUTO_VALUE = 1; + + /** + * + * + *
            +       * Disable personalization.
            +       * 
            + * + * DISABLED = 2; + */ + public static final int DISABLED_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 Mode 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 Mode forNumber(int value) { + switch (value) { + case 0: + return MODE_UNSPECIFIED; + case 1: + return AUTO; + case 2: + return DISABLED; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public Mode findValueByNumber(int number) { + return Mode.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec + .getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final Mode[] VALUES = values(); + + public static Mode valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private Mode(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec.Mode) + } + + public static final int MODE_FIELD_NUMBER = 1; + private int mode_ = 0; + + /** + * + * + *
            +     * The personalization mode of the search request.
            +     * Defaults to
            +     * [Mode.AUTO][google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec.Mode.AUTO].
            +     * 
            + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec.Mode mode = 1; + * + * + * @return The enum numeric value on the wire for mode. + */ + @java.lang.Override + public int getModeValue() { + return mode_; + } + + /** + * + * + *
            +     * The personalization mode of the search request.
            +     * Defaults to
            +     * [Mode.AUTO][google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec.Mode.AUTO].
            +     * 
            + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec.Mode mode = 1; + * + * + * @return The mode. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec.Mode + getMode() { + com.google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec.Mode result = + com.google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec.Mode.forNumber( + mode_); + return result == null + ? com.google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec.Mode + .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 (mode_ + != com.google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec.Mode + .MODE_UNSPECIFIED + .getNumber()) { + output.writeEnum(1, mode_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (mode_ + != com.google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec.Mode + .MODE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, mode_); + } + 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.discoveryengine.v1beta.SearchRequest.PersonalizationSpec)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec other = + (com.google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec) obj; + + if (mode_ != other.mode_) 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) + MODE_FIELD_NUMBER; + hash = (53 * hash) + mode_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec + 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.discoveryengine.v1beta.SearchRequest.PersonalizationSpec + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec + 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.discoveryengine.v1beta.SearchRequest.PersonalizationSpec + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec + 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.discoveryengine.v1beta.SearchRequest.PersonalizationSpec + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec + 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.discoveryengine.v1beta.SearchRequest.PersonalizationSpec + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec + 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.discoveryengine.v1beta.SearchRequest.PersonalizationSpec 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; + } + + /** + * + * + *
            +     * The specification for personalization.
            +     * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec) + com.google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpecOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_PersonalizationSpec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_PersonalizationSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec.class, + com.google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec.Builder + .class); + } + + // Construct using + // com.google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + mode_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1beta.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_PersonalizationSpec_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec build() { + com.google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec + buildPartial() { + com.google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec result = + new com.google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.mode_ = mode_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec) { + return mergeFrom( + (com.google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec other) { + if (other + == com.google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec + .getDefaultInstance()) return this; + if (other.mode_ != 0) { + setModeValue(other.getModeValue()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + mode_ = input.readEnum(); + bitField0_ |= 0x00000001; + break; + } // case 8 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private int mode_ = 0; + + /** + * + * + *
            +       * The personalization mode of the search request.
            +       * Defaults to
            +       * [Mode.AUTO][google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec.Mode.AUTO].
            +       * 
            + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec.Mode mode = 1; + * + * + * @return The enum numeric value on the wire for mode. + */ + @java.lang.Override + public int getModeValue() { + return mode_; + } + + /** + * + * + *
            +       * The personalization mode of the search request.
            +       * Defaults to
            +       * [Mode.AUTO][google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec.Mode.AUTO].
            +       * 
            + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec.Mode mode = 1; + * + * + * @param value The enum numeric value on the wire for mode to set. + * @return This builder for chaining. + */ + public Builder setModeValue(int value) { + mode_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
            +       * The personalization mode of the search request.
            +       * Defaults to
            +       * [Mode.AUTO][google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec.Mode.AUTO].
            +       * 
            + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec.Mode mode = 1; + * + * + * @return The mode. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec.Mode + getMode() { + com.google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec.Mode result = + com.google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec.Mode + .forNumber(mode_); + return result == null + ? com.google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec.Mode + .UNRECOGNIZED + : result; + } + + /** + * + * + *
            +       * The personalization mode of the search request.
            +       * Defaults to
            +       * [Mode.AUTO][google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec.Mode.AUTO].
            +       * 
            + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec.Mode mode = 1; + * + * + * @param value The mode to set. + * @return This builder for chaining. + */ + public Builder setMode( + com.google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec.Mode value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + mode_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
            +       * The personalization mode of the search request.
            +       * Defaults to
            +       * [Mode.AUTO][google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec.Mode.AUTO].
            +       * 
            + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec.Mode mode = 1; + * + * + * @return This builder for chaining. + */ + public Builder clearMode() { + bitField0_ = (bitField0_ & ~0x00000001); + mode_ = 0; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec) + private static final com.google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec(); + } + + public static com.google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PersonalizationSpec parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface RelevanceScoreSpecOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceScoreSpec) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
            +     * Optional. Whether to return the relevance score for search results.
            +     * The higher the score, the more relevant the document is to the query.
            +     * 
            + * + * bool return_relevance_score = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The returnRelevanceScore. + */ + boolean getReturnRelevanceScore(); + } + + /** + * + * + *
            +   * The specification for returning the document relevance score.
            +   * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceScoreSpec} + */ + public static final class RelevanceScoreSpec extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceScoreSpec) + RelevanceScoreSpecOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "RelevanceScoreSpec"); + } + + // Use RelevanceScoreSpec.newBuilder() to construct. + private RelevanceScoreSpec(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private RelevanceScoreSpec() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_RelevanceScoreSpec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_RelevanceScoreSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceScoreSpec.class, + com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceScoreSpec.Builder + .class); + } + + public static final int RETURN_RELEVANCE_SCORE_FIELD_NUMBER = 1; + private boolean returnRelevanceScore_ = false; + + /** + * + * + *
            +     * Optional. Whether to return the relevance score for search results.
            +     * The higher the score, the more relevant the document is to the query.
            +     * 
            + * + * bool return_relevance_score = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The returnRelevanceScore. + */ + @java.lang.Override + public boolean getReturnRelevanceScore() { + return returnRelevanceScore_; + } + + 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 (returnRelevanceScore_ != false) { + output.writeBool(1, returnRelevanceScore_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (returnRelevanceScore_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(1, returnRelevanceScore_); + } + 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.discoveryengine.v1beta.SearchRequest.RelevanceScoreSpec)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceScoreSpec other = + (com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceScoreSpec) obj; + + if (getReturnRelevanceScore() != other.getReturnRelevanceScore()) 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) + RETURN_RELEVANCE_SCORE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getReturnRelevanceScore()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceScoreSpec + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceScoreSpec + 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.discoveryengine.v1beta.SearchRequest.RelevanceScoreSpec + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceScoreSpec + 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.discoveryengine.v1beta.SearchRequest.RelevanceScoreSpec + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceScoreSpec + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceScoreSpec + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceScoreSpec + 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.discoveryengine.v1beta.SearchRequest.RelevanceScoreSpec + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceScoreSpec + 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.discoveryengine.v1beta.SearchRequest.RelevanceScoreSpec + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceScoreSpec + 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.discoveryengine.v1beta.SearchRequest.RelevanceScoreSpec 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; + } + + /** + * + * + *
            +     * The specification for returning the document relevance score.
            +     * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceScoreSpec} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceScoreSpec) + com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceScoreSpecOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_RelevanceScoreSpec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_RelevanceScoreSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceScoreSpec.class, + com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceScoreSpec.Builder + .class); + } + + // Construct using + // com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceScoreSpec.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + returnRelevanceScore_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1beta.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_RelevanceScoreSpec_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceScoreSpec + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceScoreSpec + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceScoreSpec build() { + com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceScoreSpec result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceScoreSpec + buildPartial() { + com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceScoreSpec result = + new com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceScoreSpec(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceScoreSpec result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.returnRelevanceScore_ = returnRelevanceScore_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceScoreSpec) { + return mergeFrom( + (com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceScoreSpec) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceScoreSpec other) { + if (other + == com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceScoreSpec + .getDefaultInstance()) return this; + if (other.getReturnRelevanceScore() != false) { + setReturnRelevanceScore(other.getReturnRelevanceScore()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + returnRelevanceScore_ = input.readBool(); + bitField0_ |= 0x00000001; + break; + } // case 8 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private boolean returnRelevanceScore_; + + /** + * + * + *
            +       * Optional. Whether to return the relevance score for search results.
            +       * The higher the score, the more relevant the document is to the query.
            +       * 
            + * + * bool return_relevance_score = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The returnRelevanceScore. + */ + @java.lang.Override + public boolean getReturnRelevanceScore() { + return returnRelevanceScore_; + } + + /** + * + * + *
            +       * Optional. Whether to return the relevance score for search results.
            +       * The higher the score, the more relevant the document is to the query.
            +       * 
            + * + * bool return_relevance_score = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The returnRelevanceScore to set. + * @return This builder for chaining. + */ + public Builder setReturnRelevanceScore(boolean value) { + + returnRelevanceScore_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
            +       * Optional. Whether to return the relevance score for search results.
            +       * The higher the score, the more relevant the document is to the query.
            +       * 
            + * + * bool return_relevance_score = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearReturnRelevanceScore() { + bitField0_ = (bitField0_ & ~0x00000001); + returnRelevanceScore_ = false; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceScoreSpec) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceScoreSpec) + private static final com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceScoreSpec + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceScoreSpec(); + } + + public static com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceScoreSpec + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RelevanceScoreSpec parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceScoreSpec + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface SearchAddonSpecOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.SearchRequest.SearchAddonSpec) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
            +     * Optional. If true, semantic add-on is disabled. Semantic add-on includes
            +     * embeddings and jetstream.
            +     * 
            + * + * bool disable_semantic_add_on = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The disableSemanticAddOn. + */ + boolean getDisableSemanticAddOn(); + + /** + * + * + *
            +     * Optional. If true, disables event re-ranking and personalization to
            +     * optimize KPIs & personalize results.
            +     * 
            + * + * bool disable_kpi_personalization_add_on = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The disableKpiPersonalizationAddOn. + */ + boolean getDisableKpiPersonalizationAddOn(); + + /** + * + * + *
            +     * Optional. If true, generative answer add-on is disabled. Generative
            +     * answer add-on includes natural language to filters and simple answers.
            +     * 
            + * + * bool disable_generative_answer_add_on = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The disableGenerativeAnswerAddOn. + */ + boolean getDisableGenerativeAnswerAddOn(); + } + + /** + * + * + *
            +   * SearchAddonSpec is used to disable add-ons for search as per new
            +   * repricing model. By default if the SearchAddonSpec is not specified, we
            +   * consider that the customer wants to enable them wherever applicable.
            +   * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.SearchRequest.SearchAddonSpec} + */ + public static final class SearchAddonSpec extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.SearchRequest.SearchAddonSpec) + SearchAddonSpecOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "SearchAddonSpec"); + } + + // Use SearchAddonSpec.newBuilder() to construct. + private SearchAddonSpec(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private SearchAddonSpec() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_SearchAddonSpec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_SearchAddonSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.SearchRequest.SearchAddonSpec.class, + com.google.cloud.discoveryengine.v1beta.SearchRequest.SearchAddonSpec.Builder.class); + } + + public static final int DISABLE_SEMANTIC_ADD_ON_FIELD_NUMBER = 1; + private boolean disableSemanticAddOn_ = false; + + /** + * + * + *
            +     * Optional. If true, semantic add-on is disabled. Semantic add-on includes
            +     * embeddings and jetstream.
            +     * 
            + * + * bool disable_semantic_add_on = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The disableSemanticAddOn. + */ + @java.lang.Override + public boolean getDisableSemanticAddOn() { + return disableSemanticAddOn_; + } + + public static final int DISABLE_KPI_PERSONALIZATION_ADD_ON_FIELD_NUMBER = 2; + private boolean disableKpiPersonalizationAddOn_ = false; + + /** + * + * + *
            +     * Optional. If true, disables event re-ranking and personalization to
            +     * optimize KPIs & personalize results.
            +     * 
            + * + * bool disable_kpi_personalization_add_on = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The disableKpiPersonalizationAddOn. + */ + @java.lang.Override + public boolean getDisableKpiPersonalizationAddOn() { + return disableKpiPersonalizationAddOn_; + } + + public static final int DISABLE_GENERATIVE_ANSWER_ADD_ON_FIELD_NUMBER = 3; + private boolean disableGenerativeAnswerAddOn_ = false; + + /** + * + * + *
            +     * Optional. If true, generative answer add-on is disabled. Generative
            +     * answer add-on includes natural language to filters and simple answers.
            +     * 
            + * + * bool disable_generative_answer_add_on = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The disableGenerativeAnswerAddOn. + */ + @java.lang.Override + public boolean getDisableGenerativeAnswerAddOn() { + return disableGenerativeAnswerAddOn_; + } + + 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 (disableSemanticAddOn_ != false) { + output.writeBool(1, disableSemanticAddOn_); + } + if (disableKpiPersonalizationAddOn_ != false) { + output.writeBool(2, disableKpiPersonalizationAddOn_); + } + if (disableGenerativeAnswerAddOn_ != false) { + output.writeBool(3, disableGenerativeAnswerAddOn_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (disableSemanticAddOn_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(1, disableSemanticAddOn_); + } + if (disableKpiPersonalizationAddOn_ != false) { + size += + com.google.protobuf.CodedOutputStream.computeBoolSize( + 2, disableKpiPersonalizationAddOn_); + } + if (disableGenerativeAnswerAddOn_ != false) { + size += + com.google.protobuf.CodedOutputStream.computeBoolSize(3, disableGenerativeAnswerAddOn_); + } + 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.discoveryengine.v1beta.SearchRequest.SearchAddonSpec)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1beta.SearchRequest.SearchAddonSpec other = + (com.google.cloud.discoveryengine.v1beta.SearchRequest.SearchAddonSpec) obj; + + if (getDisableSemanticAddOn() != other.getDisableSemanticAddOn()) return false; + if (getDisableKpiPersonalizationAddOn() != other.getDisableKpiPersonalizationAddOn()) + return false; + if (getDisableGenerativeAnswerAddOn() != other.getDisableGenerativeAnswerAddOn()) + 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) + DISABLE_SEMANTIC_ADD_ON_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getDisableSemanticAddOn()); + hash = (37 * hash) + DISABLE_KPI_PERSONALIZATION_ADD_ON_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashBoolean(getDisableKpiPersonalizationAddOn()); + hash = (37 * hash) + DISABLE_GENERATIVE_ANSWER_ADD_ON_FIELD_NUMBER; + hash = + (53 * hash) + com.google.protobuf.Internal.hashBoolean(getDisableGenerativeAnswerAddOn()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1beta.SearchRequest.SearchAddonSpec parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.SearchRequest.SearchAddonSpec 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.discoveryengine.v1beta.SearchRequest.SearchAddonSpec parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.SearchRequest.SearchAddonSpec 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.discoveryengine.v1beta.SearchRequest.SearchAddonSpec parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.SearchRequest.SearchAddonSpec parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1beta.SearchRequest.SearchAddonSpec parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.SearchRequest.SearchAddonSpec 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.discoveryengine.v1beta.SearchRequest.SearchAddonSpec + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.SearchRequest.SearchAddonSpec + 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.discoveryengine.v1beta.SearchRequest.SearchAddonSpec parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.SearchRequest.SearchAddonSpec 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.discoveryengine.v1beta.SearchRequest.SearchAddonSpec 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; + } + + /** + * + * + *
            +     * SearchAddonSpec is used to disable add-ons for search as per new
            +     * repricing model. By default if the SearchAddonSpec is not specified, we
            +     * consider that the customer wants to enable them wherever applicable.
            +     * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.SearchRequest.SearchAddonSpec} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.SearchRequest.SearchAddonSpec) + com.google.cloud.discoveryengine.v1beta.SearchRequest.SearchAddonSpecOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_SearchAddonSpec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_SearchAddonSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.SearchRequest.SearchAddonSpec.class, + com.google.cloud.discoveryengine.v1beta.SearchRequest.SearchAddonSpec.Builder + .class); + } + + // Construct using + // com.google.cloud.discoveryengine.v1beta.SearchRequest.SearchAddonSpec.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + disableSemanticAddOn_ = false; + disableKpiPersonalizationAddOn_ = false; + disableGenerativeAnswerAddOn_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1beta.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_SearchAddonSpec_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.SearchRequest.SearchAddonSpec + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1beta.SearchRequest.SearchAddonSpec + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.SearchRequest.SearchAddonSpec build() { + com.google.cloud.discoveryengine.v1beta.SearchRequest.SearchAddonSpec result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.SearchRequest.SearchAddonSpec buildPartial() { + com.google.cloud.discoveryengine.v1beta.SearchRequest.SearchAddonSpec result = + new com.google.cloud.discoveryengine.v1beta.SearchRequest.SearchAddonSpec(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.discoveryengine.v1beta.SearchRequest.SearchAddonSpec result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.disableSemanticAddOn_ = disableSemanticAddOn_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.disableKpiPersonalizationAddOn_ = disableKpiPersonalizationAddOn_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.disableGenerativeAnswerAddOn_ = disableGenerativeAnswerAddOn_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.cloud.discoveryengine.v1beta.SearchRequest.SearchAddonSpec) { + return mergeFrom( + (com.google.cloud.discoveryengine.v1beta.SearchRequest.SearchAddonSpec) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1beta.SearchRequest.SearchAddonSpec other) { + if (other + == com.google.cloud.discoveryengine.v1beta.SearchRequest.SearchAddonSpec + .getDefaultInstance()) return this; + if (other.getDisableSemanticAddOn() != false) { + setDisableSemanticAddOn(other.getDisableSemanticAddOn()); + } + if (other.getDisableKpiPersonalizationAddOn() != false) { + setDisableKpiPersonalizationAddOn(other.getDisableKpiPersonalizationAddOn()); + } + if (other.getDisableGenerativeAnswerAddOn() != false) { + setDisableGenerativeAnswerAddOn(other.getDisableGenerativeAnswerAddOn()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + disableSemanticAddOn_ = input.readBool(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 16: + { + disableKpiPersonalizationAddOn_ = input.readBool(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 24: + { + disableGenerativeAnswerAddOn_ = input.readBool(); + bitField0_ |= 0x00000004; + break; + } // case 24 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private boolean disableSemanticAddOn_; + + /** + * + * + *
            +       * Optional. If true, semantic add-on is disabled. Semantic add-on includes
            +       * embeddings and jetstream.
            +       * 
            + * + * bool disable_semantic_add_on = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The disableSemanticAddOn. + */ + @java.lang.Override + public boolean getDisableSemanticAddOn() { + return disableSemanticAddOn_; + } + + /** + * + * + *
            +       * Optional. If true, semantic add-on is disabled. Semantic add-on includes
            +       * embeddings and jetstream.
            +       * 
            + * + * bool disable_semantic_add_on = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The disableSemanticAddOn to set. + * @return This builder for chaining. + */ + public Builder setDisableSemanticAddOn(boolean value) { + + disableSemanticAddOn_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
            +       * Optional. If true, semantic add-on is disabled. Semantic add-on includes
            +       * embeddings and jetstream.
            +       * 
            + * + * bool disable_semantic_add_on = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearDisableSemanticAddOn() { + bitField0_ = (bitField0_ & ~0x00000001); + disableSemanticAddOn_ = false; + onChanged(); + return this; + } + + private boolean disableKpiPersonalizationAddOn_; + + /** + * + * + *
            +       * Optional. If true, disables event re-ranking and personalization to
            +       * optimize KPIs & personalize results.
            +       * 
            + * + * + * bool disable_kpi_personalization_add_on = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The disableKpiPersonalizationAddOn. + */ + @java.lang.Override + public boolean getDisableKpiPersonalizationAddOn() { + return disableKpiPersonalizationAddOn_; + } + + /** + * + * + *
            +       * Optional. If true, disables event re-ranking and personalization to
            +       * optimize KPIs & personalize results.
            +       * 
            + * + * + * bool disable_kpi_personalization_add_on = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The disableKpiPersonalizationAddOn to set. + * @return This builder for chaining. + */ + public Builder setDisableKpiPersonalizationAddOn(boolean value) { + + disableKpiPersonalizationAddOn_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
            +       * Optional. If true, disables event re-ranking and personalization to
            +       * optimize KPIs & personalize results.
            +       * 
            + * + * + * bool disable_kpi_personalization_add_on = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearDisableKpiPersonalizationAddOn() { + bitField0_ = (bitField0_ & ~0x00000002); + disableKpiPersonalizationAddOn_ = false; + onChanged(); + return this; + } + + private boolean disableGenerativeAnswerAddOn_; + + /** + * + * + *
            +       * Optional. If true, generative answer add-on is disabled. Generative
            +       * answer add-on includes natural language to filters and simple answers.
            +       * 
            + * + * bool disable_generative_answer_add_on = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The disableGenerativeAnswerAddOn. + */ + @java.lang.Override + public boolean getDisableGenerativeAnswerAddOn() { + return disableGenerativeAnswerAddOn_; + } + + /** + * + * + *
            +       * Optional. If true, generative answer add-on is disabled. Generative
            +       * answer add-on includes natural language to filters and simple answers.
            +       * 
            + * + * bool disable_generative_answer_add_on = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The disableGenerativeAnswerAddOn to set. + * @return This builder for chaining. + */ + public Builder setDisableGenerativeAnswerAddOn(boolean value) { + + disableGenerativeAnswerAddOn_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
            +       * Optional. If true, generative answer add-on is disabled. Generative
            +       * answer add-on includes natural language to filters and simple answers.
            +       * 
            + * + * bool disable_generative_answer_add_on = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearDisableGenerativeAnswerAddOn() { + bitField0_ = (bitField0_ & ~0x00000004); + disableGenerativeAnswerAddOn_ = false; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.SearchRequest.SearchAddonSpec) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.SearchRequest.SearchAddonSpec) + private static final com.google.cloud.discoveryengine.v1beta.SearchRequest.SearchAddonSpec + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.discoveryengine.v1beta.SearchRequest.SearchAddonSpec(); + } + + public static com.google.cloud.discoveryengine.v1beta.SearchRequest.SearchAddonSpec + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SearchAddonSpec parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.SearchRequest.SearchAddonSpec + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface CustomRankingParamsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.SearchRequest.CustomRankingParams) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
            +     * Optional. A list of ranking expressions (see `ranking_expression` for the
            +     * syntax documentation) to evaluate. The evaluation results will be
            +     * returned in
            +     * `SearchResponse.SearchResult.rank_signals.precomputed_expression_values`
            +     * field.
            +     * 
            + * + * + * repeated string expressions_to_precompute = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the expressionsToPrecompute. + */ + java.util.List getExpressionsToPrecomputeList(); + + /** + * + * + *
            +     * Optional. A list of ranking expressions (see `ranking_expression` for the
            +     * syntax documentation) to evaluate. The evaluation results will be
            +     * returned in
            +     * `SearchResponse.SearchResult.rank_signals.precomputed_expression_values`
            +     * field.
            +     * 
            + * + * + * repeated string expressions_to_precompute = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The count of expressionsToPrecompute. + */ + int getExpressionsToPrecomputeCount(); + + /** + * + * + *
            +     * Optional. A list of ranking expressions (see `ranking_expression` for the
            +     * syntax documentation) to evaluate. The evaluation results will be
            +     * returned in
            +     * `SearchResponse.SearchResult.rank_signals.precomputed_expression_values`
            +     * field.
            +     * 
            + * + * + * repeated string expressions_to_precompute = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the element to return. + * @return The expressionsToPrecompute at the given index. + */ + java.lang.String getExpressionsToPrecompute(int index); + + /** + * + * + *
            +     * Optional. A list of ranking expressions (see `ranking_expression` for the
            +     * syntax documentation) to evaluate. The evaluation results will be
            +     * returned in
            +     * `SearchResponse.SearchResult.rank_signals.precomputed_expression_values`
            +     * field.
            +     * 
            + * + * + * repeated string expressions_to_precompute = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the value to return. + * @return The bytes of the expressionsToPrecompute at the given index. + */ + com.google.protobuf.ByteString getExpressionsToPrecomputeBytes(int index); + } + + /** + * + * + *
            +   * Configuration parameters for the Custom Ranking feature.
            +   * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.SearchRequest.CustomRankingParams} + */ + public static final class CustomRankingParams extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.SearchRequest.CustomRankingParams) + CustomRankingParamsOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "CustomRankingParams"); + } + + // Use CustomRankingParams.newBuilder() to construct. + private CustomRankingParams(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private CustomRankingParams() { + expressionsToPrecompute_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_CustomRankingParams_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_CustomRankingParams_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.SearchRequest.CustomRankingParams.class, + com.google.cloud.discoveryengine.v1beta.SearchRequest.CustomRankingParams.Builder + .class); + } + + public static final int EXPRESSIONS_TO_PRECOMPUTE_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList expressionsToPrecompute_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + /** + * + * + *
            +     * Optional. A list of ranking expressions (see `ranking_expression` for the
            +     * syntax documentation) to evaluate. The evaluation results will be
            +     * returned in
            +     * `SearchResponse.SearchResult.rank_signals.precomputed_expression_values`
            +     * field.
            +     * 
            + * + * + * repeated string expressions_to_precompute = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the expressionsToPrecompute. + */ + public com.google.protobuf.ProtocolStringList getExpressionsToPrecomputeList() { + return expressionsToPrecompute_; + } + + /** + * + * + *
            +     * Optional. A list of ranking expressions (see `ranking_expression` for the
            +     * syntax documentation) to evaluate. The evaluation results will be
            +     * returned in
            +     * `SearchResponse.SearchResult.rank_signals.precomputed_expression_values`
            +     * field.
            +     * 
            + * + * + * repeated string expressions_to_precompute = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The count of expressionsToPrecompute. + */ + public int getExpressionsToPrecomputeCount() { + return expressionsToPrecompute_.size(); + } + + /** + * + * + *
            +     * Optional. A list of ranking expressions (see `ranking_expression` for the
            +     * syntax documentation) to evaluate. The evaluation results will be
            +     * returned in
            +     * `SearchResponse.SearchResult.rank_signals.precomputed_expression_values`
            +     * field.
            +     * 
            + * + * + * repeated string expressions_to_precompute = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the element to return. + * @return The expressionsToPrecompute at the given index. + */ + public java.lang.String getExpressionsToPrecompute(int index) { + return expressionsToPrecompute_.get(index); + } + + /** + * + * + *
            +     * Optional. A list of ranking expressions (see `ranking_expression` for the
            +     * syntax documentation) to evaluate. The evaluation results will be
            +     * returned in
            +     * `SearchResponse.SearchResult.rank_signals.precomputed_expression_values`
            +     * field.
            +     * 
            + * + * + * repeated string expressions_to_precompute = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the value to return. + * @return The bytes of the expressionsToPrecompute at the given index. + */ + public com.google.protobuf.ByteString getExpressionsToPrecomputeBytes(int index) { + return expressionsToPrecompute_.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 { + for (int i = 0; i < expressionsToPrecompute_.size(); i++) { + com.google.protobuf.GeneratedMessage.writeString( + output, 1, expressionsToPrecompute_.getRaw(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + { + int dataSize = 0; + for (int i = 0; i < expressionsToPrecompute_.size(); i++) { + dataSize += computeStringSizeNoTag(expressionsToPrecompute_.getRaw(i)); + } + size += dataSize; + size += 1 * getExpressionsToPrecomputeList().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.discoveryengine.v1beta.SearchRequest.CustomRankingParams)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1beta.SearchRequest.CustomRankingParams other = + (com.google.cloud.discoveryengine.v1beta.SearchRequest.CustomRankingParams) obj; + + if (!getExpressionsToPrecomputeList().equals(other.getExpressionsToPrecomputeList())) + 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 (getExpressionsToPrecomputeCount() > 0) { + hash = (37 * hash) + EXPRESSIONS_TO_PRECOMPUTE_FIELD_NUMBER; + hash = (53 * hash) + getExpressionsToPrecomputeList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1beta.SearchRequest.CustomRankingParams + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.SearchRequest.CustomRankingParams + 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.discoveryengine.v1beta.SearchRequest.CustomRankingParams + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.SearchRequest.CustomRankingParams + 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.discoveryengine.v1beta.SearchRequest.CustomRankingParams + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.SearchRequest.CustomRankingParams + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1beta.SearchRequest.CustomRankingParams + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.SearchRequest.CustomRankingParams + 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.discoveryengine.v1beta.SearchRequest.CustomRankingParams + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.SearchRequest.CustomRankingParams + 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.discoveryengine.v1beta.SearchRequest.CustomRankingParams + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.SearchRequest.CustomRankingParams + 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.discoveryengine.v1beta.SearchRequest.CustomRankingParams 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; + } + + /** + * + * + *
            +     * Configuration parameters for the Custom Ranking feature.
            +     * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.SearchRequest.CustomRankingParams} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.SearchRequest.CustomRankingParams) + com.google.cloud.discoveryengine.v1beta.SearchRequest.CustomRankingParamsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_CustomRankingParams_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_CustomRankingParams_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.SearchRequest.CustomRankingParams.class, + com.google.cloud.discoveryengine.v1beta.SearchRequest.CustomRankingParams.Builder + .class); + } + + // Construct using + // com.google.cloud.discoveryengine.v1beta.SearchRequest.CustomRankingParams.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + expressionsToPrecompute_ = com.google.protobuf.LazyStringArrayList.emptyList(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1beta.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_CustomRankingParams_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.SearchRequest.CustomRankingParams + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1beta.SearchRequest.CustomRankingParams + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.SearchRequest.CustomRankingParams build() { + com.google.cloud.discoveryengine.v1beta.SearchRequest.CustomRankingParams result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.SearchRequest.CustomRankingParams + buildPartial() { + com.google.cloud.discoveryengine.v1beta.SearchRequest.CustomRankingParams result = + new com.google.cloud.discoveryengine.v1beta.SearchRequest.CustomRankingParams(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.discoveryengine.v1beta.SearchRequest.CustomRankingParams result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + expressionsToPrecompute_.makeImmutable(); + result.expressionsToPrecompute_ = expressionsToPrecompute_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.cloud.discoveryengine.v1beta.SearchRequest.CustomRankingParams) { + return mergeFrom( + (com.google.cloud.discoveryengine.v1beta.SearchRequest.CustomRankingParams) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1beta.SearchRequest.CustomRankingParams other) { + if (other + == com.google.cloud.discoveryengine.v1beta.SearchRequest.CustomRankingParams + .getDefaultInstance()) return this; + if (!other.expressionsToPrecompute_.isEmpty()) { + if (expressionsToPrecompute_.isEmpty()) { + expressionsToPrecompute_ = other.expressionsToPrecompute_; + bitField0_ |= 0x00000001; + } else { + ensureExpressionsToPrecomputeIsMutable(); + expressionsToPrecompute_.addAll(other.expressionsToPrecompute_); + } + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureExpressionsToPrecomputeIsMutable(); + expressionsToPrecompute_.add(s); + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.protobuf.LazyStringArrayList expressionsToPrecompute_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureExpressionsToPrecomputeIsMutable() { + if (!expressionsToPrecompute_.isModifiable()) { + expressionsToPrecompute_ = + new com.google.protobuf.LazyStringArrayList(expressionsToPrecompute_); + } + bitField0_ |= 0x00000001; + } + + /** + * + * + *
            +       * Optional. A list of ranking expressions (see `ranking_expression` for the
            +       * syntax documentation) to evaluate. The evaluation results will be
            +       * returned in
            +       * `SearchResponse.SearchResult.rank_signals.precomputed_expression_values`
            +       * field.
            +       * 
            + * + * + * repeated string expressions_to_precompute = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the expressionsToPrecompute. + */ + public com.google.protobuf.ProtocolStringList getExpressionsToPrecomputeList() { + expressionsToPrecompute_.makeImmutable(); + return expressionsToPrecompute_; + } + + /** + * + * + *
            +       * Optional. A list of ranking expressions (see `ranking_expression` for the
            +       * syntax documentation) to evaluate. The evaluation results will be
            +       * returned in
            +       * `SearchResponse.SearchResult.rank_signals.precomputed_expression_values`
            +       * field.
            +       * 
            + * + * + * repeated string expressions_to_precompute = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The count of expressionsToPrecompute. + */ + public int getExpressionsToPrecomputeCount() { + return expressionsToPrecompute_.size(); + } + + /** + * + * + *
            +       * Optional. A list of ranking expressions (see `ranking_expression` for the
            +       * syntax documentation) to evaluate. The evaluation results will be
            +       * returned in
            +       * `SearchResponse.SearchResult.rank_signals.precomputed_expression_values`
            +       * field.
            +       * 
            + * + * + * repeated string expressions_to_precompute = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the element to return. + * @return The expressionsToPrecompute at the given index. + */ + public java.lang.String getExpressionsToPrecompute(int index) { + return expressionsToPrecompute_.get(index); + } + + /** + * + * + *
            +       * Optional. A list of ranking expressions (see `ranking_expression` for the
            +       * syntax documentation) to evaluate. The evaluation results will be
            +       * returned in
            +       * `SearchResponse.SearchResult.rank_signals.precomputed_expression_values`
            +       * field.
            +       * 
            + * + * + * repeated string expressions_to_precompute = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the value to return. + * @return The bytes of the expressionsToPrecompute at the given index. + */ + public com.google.protobuf.ByteString getExpressionsToPrecomputeBytes(int index) { + return expressionsToPrecompute_.getByteString(index); + } + + /** + * + * + *
            +       * Optional. A list of ranking expressions (see `ranking_expression` for the
            +       * syntax documentation) to evaluate. The evaluation results will be
            +       * returned in
            +       * `SearchResponse.SearchResult.rank_signals.precomputed_expression_values`
            +       * field.
            +       * 
            + * + * + * repeated string expressions_to_precompute = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index to set the value at. + * @param value The expressionsToPrecompute to set. + * @return This builder for chaining. + */ + public Builder setExpressionsToPrecompute(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureExpressionsToPrecomputeIsMutable(); + expressionsToPrecompute_.set(index, value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
            +       * Optional. A list of ranking expressions (see `ranking_expression` for the
            +       * syntax documentation) to evaluate. The evaluation results will be
            +       * returned in
            +       * `SearchResponse.SearchResult.rank_signals.precomputed_expression_values`
            +       * field.
            +       * 
            + * + * + * repeated string expressions_to_precompute = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The expressionsToPrecompute to add. + * @return This builder for chaining. + */ + public Builder addExpressionsToPrecompute(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureExpressionsToPrecomputeIsMutable(); + expressionsToPrecompute_.add(value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
            +       * Optional. A list of ranking expressions (see `ranking_expression` for the
            +       * syntax documentation) to evaluate. The evaluation results will be
            +       * returned in
            +       * `SearchResponse.SearchResult.rank_signals.precomputed_expression_values`
            +       * field.
            +       * 
            + * + * + * repeated string expressions_to_precompute = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param values The expressionsToPrecompute to add. + * @return This builder for chaining. + */ + public Builder addAllExpressionsToPrecompute(java.lang.Iterable values) { + ensureExpressionsToPrecomputeIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, expressionsToPrecompute_); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
            +       * Optional. A list of ranking expressions (see `ranking_expression` for the
            +       * syntax documentation) to evaluate. The evaluation results will be
            +       * returned in
            +       * `SearchResponse.SearchResult.rank_signals.precomputed_expression_values`
            +       * field.
            +       * 
            + * + * + * repeated string expressions_to_precompute = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearExpressionsToPrecompute() { + expressionsToPrecompute_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + ; + onChanged(); + return this; + } + + /** + * + * + *
            +       * Optional. A list of ranking expressions (see `ranking_expression` for the
            +       * syntax documentation) to evaluate. The evaluation results will be
            +       * returned in
            +       * `SearchResponse.SearchResult.rank_signals.precomputed_expression_values`
            +       * field.
            +       * 
            + * + * + * repeated string expressions_to_precompute = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The bytes of the expressionsToPrecompute to add. + * @return This builder for chaining. + */ + public Builder addExpressionsToPrecomputeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureExpressionsToPrecomputeIsMutable(); + expressionsToPrecompute_.add(value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.SearchRequest.CustomRankingParams) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.SearchRequest.CustomRankingParams) + private static final com.google.cloud.discoveryengine.v1beta.SearchRequest.CustomRankingParams + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.discoveryengine.v1beta.SearchRequest.CustomRankingParams(); + } + + public static com.google.cloud.discoveryengine.v1beta.SearchRequest.CustomRankingParams + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CustomRankingParams parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.SearchRequest.CustomRankingParams + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int bitField0_; + public static final int SERVING_CONFIG_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object servingConfig_ = ""; + + /** + * + * + *
            +   * Required. The resource name of the Search serving config, such as
            +   * `projects/*/locations/global/collections/default_collection/engines/*/servingConfigs/default_serving_config`,
            +   * or
            +   * `projects/*/locations/global/collections/default_collection/dataStores/default_data_store/servingConfigs/default_serving_config`.
            +   * This field is used to identify the serving configuration name, set
            +   * of models used to make the search.
            +   * 
            + * + * + * string serving_config = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The servingConfig. + */ + @java.lang.Override + public java.lang.String getServingConfig() { + java.lang.Object ref = servingConfig_; + 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(); + servingConfig_ = s; + return s; + } + } + + /** + * + * + *
            +   * Required. The resource name of the Search serving config, such as
            +   * `projects/*/locations/global/collections/default_collection/engines/*/servingConfigs/default_serving_config`,
            +   * or
            +   * `projects/*/locations/global/collections/default_collection/dataStores/default_data_store/servingConfigs/default_serving_config`.
            +   * This field is used to identify the serving configuration name, set
            +   * of models used to make the search.
            +   * 
            + * + * + * string serving_config = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for servingConfig. + */ + @java.lang.Override + public com.google.protobuf.ByteString getServingConfigBytes() { + java.lang.Object ref = servingConfig_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + servingConfig_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int BRANCH_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object branch_ = ""; + + /** + * + * + *
            +   * The branch resource name, such as
            +   * `projects/*/locations/global/collections/default_collection/dataStores/default_data_store/branches/0`.
            +   *
            +   * Use `default_branch` as the branch ID or leave this field empty, to search
            +   * documents under the default branch.
            +   * 
            + * + * string branch = 2 [(.google.api.resource_reference) = { ... } + * + * @return The branch. + */ + @java.lang.Override + public java.lang.String getBranch() { + java.lang.Object ref = branch_; + 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(); + branch_ = s; + return s; + } + } + + /** + * + * + *
            +   * The branch resource name, such as
            +   * `projects/*/locations/global/collections/default_collection/dataStores/default_data_store/branches/0`.
            +   *
            +   * Use `default_branch` as the branch ID or leave this field empty, to search
            +   * documents under the default branch.
            +   * 
            + * + * string branch = 2 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for branch. + */ + @java.lang.Override + public com.google.protobuf.ByteString getBranchBytes() { + java.lang.Object ref = branch_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + branch_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int QUERY_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object query_ = ""; + + /** + * + * + *
            +   * Raw search query.
            +   * 
            + * + * string query = 3; + * + * @return The query. + */ + @java.lang.Override + public java.lang.String getQuery() { + java.lang.Object ref = query_; + 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(); + query_ = s; + return s; + } + } + + /** + * + * + *
            +   * Raw search query.
            +   * 
            + * + * string query = 3; + * + * @return The bytes for query. + */ + @java.lang.Override + public com.google.protobuf.ByteString getQueryBytes() { + java.lang.Object ref = query_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + query_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_CATEGORIES_FIELD_NUMBER = 63; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList pageCategories_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + /** + * + * + *
            +   * Optional. The categories associated with a category page. Must be set for
            +   * category navigation queries to achieve good search quality. The format
            +   * should be the same as
            +   * [PageInfo.page_category][google.cloud.discoveryengine.v1beta.PageInfo.page_category].
            +   * This field is the equivalent of the query for browse (navigation) queries.
            +   * It's used by the browse model when the query is empty.
            +   *
            +   * If the field is empty, it will not be used by the browse model.
            +   * If the field contains more than one element, only the first element will
            +   * be used.
            +   *
            +   * To represent full path of a category, use '>' character to separate
            +   * different hierarchies. If '>' is part of the category name, replace it with
            +   * other character(s).
            +   * For example, `Graphics Cards > RTX>4090 > Founders Edition` where "RTX >
            +   * 4090" represents one level, can be rewritten as `Graphics Cards > RTX_4090
            +   * > Founders Edition`
            +   * 
            + * + * repeated string page_categories = 63 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the pageCategories. + */ + public com.google.protobuf.ProtocolStringList getPageCategoriesList() { + return pageCategories_; + } + + /** + * + * + *
            +   * Optional. The categories associated with a category page. Must be set for
            +   * category navigation queries to achieve good search quality. The format
            +   * should be the same as
            +   * [PageInfo.page_category][google.cloud.discoveryengine.v1beta.PageInfo.page_category].
            +   * This field is the equivalent of the query for browse (navigation) queries.
            +   * It's used by the browse model when the query is empty.
            +   *
            +   * If the field is empty, it will not be used by the browse model.
            +   * If the field contains more than one element, only the first element will
            +   * be used.
            +   *
            +   * To represent full path of a category, use '>' character to separate
            +   * different hierarchies. If '>' is part of the category name, replace it with
            +   * other character(s).
            +   * For example, `Graphics Cards > RTX>4090 > Founders Edition` where "RTX >
            +   * 4090" represents one level, can be rewritten as `Graphics Cards > RTX_4090
            +   * > Founders Edition`
            +   * 
            + * + * repeated string page_categories = 63 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of pageCategories. + */ + public int getPageCategoriesCount() { + return pageCategories_.size(); + } + + /** + * + * + *
            +   * Optional. The categories associated with a category page. Must be set for
            +   * category navigation queries to achieve good search quality. The format
            +   * should be the same as
            +   * [PageInfo.page_category][google.cloud.discoveryengine.v1beta.PageInfo.page_category].
            +   * This field is the equivalent of the query for browse (navigation) queries.
            +   * It's used by the browse model when the query is empty.
            +   *
            +   * If the field is empty, it will not be used by the browse model.
            +   * If the field contains more than one element, only the first element will
            +   * be used.
            +   *
            +   * To represent full path of a category, use '>' character to separate
            +   * different hierarchies. If '>' is part of the category name, replace it with
            +   * other character(s).
            +   * For example, `Graphics Cards > RTX>4090 > Founders Edition` where "RTX >
            +   * 4090" represents one level, can be rewritten as `Graphics Cards > RTX_4090
            +   * > Founders Edition`
            +   * 
            + * + * repeated string page_categories = 63 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The pageCategories at the given index. + */ + public java.lang.String getPageCategories(int index) { + return pageCategories_.get(index); + } + + /** + * + * + *
            +   * Optional. The categories associated with a category page. Must be set for
            +   * category navigation queries to achieve good search quality. The format
            +   * should be the same as
            +   * [PageInfo.page_category][google.cloud.discoveryengine.v1beta.PageInfo.page_category].
            +   * This field is the equivalent of the query for browse (navigation) queries.
            +   * It's used by the browse model when the query is empty.
            +   *
            +   * If the field is empty, it will not be used by the browse model.
            +   * If the field contains more than one element, only the first element will
            +   * be used.
            +   *
            +   * To represent full path of a category, use '>' character to separate
            +   * different hierarchies. If '>' is part of the category name, replace it with
            +   * other character(s).
            +   * For example, `Graphics Cards > RTX>4090 > Founders Edition` where "RTX >
            +   * 4090" represents one level, can be rewritten as `Graphics Cards > RTX_4090
            +   * > Founders Edition`
            +   * 
            + * + * repeated string page_categories = 63 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the pageCategories at the given index. + */ + public com.google.protobuf.ByteString getPageCategoriesBytes(int index) { + return pageCategories_.getByteString(index); + } + + public static final int IMAGE_QUERY_FIELD_NUMBER = 19; + private com.google.cloud.discoveryengine.v1beta.SearchRequest.ImageQuery imageQuery_; + + /** + * + * + *
            +   * Raw image query.
            +   * 
            + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.ImageQuery image_query = 19; + * + * @return Whether the imageQuery field is set. + */ + @java.lang.Override + public boolean hasImageQuery() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
            +   * Raw image query.
            +   * 
            + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.ImageQuery image_query = 19; + * + * @return The imageQuery. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.SearchRequest.ImageQuery getImageQuery() { + return imageQuery_ == null + ? com.google.cloud.discoveryengine.v1beta.SearchRequest.ImageQuery.getDefaultInstance() + : imageQuery_; + } + + /** + * + * + *
            +   * Raw image query.
            +   * 
            + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.ImageQuery image_query = 19; + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.SearchRequest.ImageQueryOrBuilder + getImageQueryOrBuilder() { + return imageQuery_ == null + ? com.google.cloud.discoveryengine.v1beta.SearchRequest.ImageQuery.getDefaultInstance() + : imageQuery_; + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 4; + private int pageSize_ = 0; + + /** + * + * + *
            +   * Maximum number of [Document][google.cloud.discoveryengine.v1beta.Document]s
            +   * to return. The maximum allowed value depends on the data type. Values above
            +   * the maximum value are coerced to the maximum value.
            +   *
            +   * * Websites with basic indexing: Default `10`, Maximum `25`.
            +   * * Websites with advanced indexing: Default `25`, Maximum `50`.
            +   * * Other: Default `50`, Maximum `100`.
            +   *
            +   * If this field is negative, an  `INVALID_ARGUMENT` is returned.
            +   * 
            + * + * int32 page_size = 4; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object pageToken_ = ""; + + /** + * + * + *
            +   * A page token received from a previous
            +   * [SearchService.Search][google.cloud.discoveryengine.v1beta.SearchService.Search]
            +   * call. Provide this to retrieve the subsequent page.
            +   *
            +   * When paginating, all other parameters provided to
            +   * [SearchService.Search][google.cloud.discoveryengine.v1beta.SearchService.Search]
            +   * must match the call that provided the page token. Otherwise, an
            +   * `INVALID_ARGUMENT`  error is returned.
            +   * 
            + * + * string page_token = 5; + * + * @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; + } + } + + /** + * + * + *
            +   * A page token received from a previous
            +   * [SearchService.Search][google.cloud.discoveryengine.v1beta.SearchService.Search]
            +   * call. Provide this to retrieve the subsequent page.
            +   *
            +   * When paginating, all other parameters provided to
            +   * [SearchService.Search][google.cloud.discoveryengine.v1beta.SearchService.Search]
            +   * must match the call that provided the page token. Otherwise, an
            +   * `INVALID_ARGUMENT`  error is returned.
            +   * 
            + * + * string page_token = 5; + * + * @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 OFFSET_FIELD_NUMBER = 6; + private int offset_ = 0; + + /** + * + * + *
            +   * A 0-indexed integer that specifies the current offset (that is, starting
            +   * result location, amongst the
            +   * [Document][google.cloud.discoveryengine.v1beta.Document]s deemed by the API
            +   * as relevant) in search results. This field is only considered if
            +   * [page_token][google.cloud.discoveryengine.v1beta.SearchRequest.page_token]
            +   * is unset.
            +   *
            +   * If this field is negative, an  `INVALID_ARGUMENT`  is returned.
            +   *
            +   * A large offset may be capped to a reasonable threshold.
            +   * 
            + * + * int32 offset = 6; + * + * @return The offset. + */ + @java.lang.Override + public int getOffset() { + return offset_; + } + + public static final int ONE_BOX_PAGE_SIZE_FIELD_NUMBER = 47; + private int oneBoxPageSize_ = 0; + + /** + * + * + *
            +   * The maximum number of results to return for OneBox.
            +   * This applies to each OneBox type individually.
            +   * Default number is 10.
            +   * 
            + * + * int32 one_box_page_size = 47; + * + * @return The oneBoxPageSize. + */ + @java.lang.Override + public int getOneBoxPageSize() { + return oneBoxPageSize_; + } + + public static final int DATA_STORE_SPECS_FIELD_NUMBER = 32; + + @SuppressWarnings("serial") + private java.util.List + dataStoreSpecs_; + + /** + * + * + *
            +   * Specifications that define the specific
            +   * [DataStore][google.cloud.discoveryengine.v1beta.DataStore]s to be searched,
            +   * along with configurations for those data stores. This is only considered
            +   * for [Engine][google.cloud.discoveryengine.v1beta.Engine]s with multiple
            +   * data stores. For engines with a single data store, the specs directly under
            +   * [SearchRequest][google.cloud.discoveryengine.v1beta.SearchRequest] should
            +   * be used.
            +   * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec data_store_specs = 32; + * + */ + @java.lang.Override + public java.util.List + getDataStoreSpecsList() { + return dataStoreSpecs_; + } + + /** + * + * + *
            +   * Specifications that define the specific
            +   * [DataStore][google.cloud.discoveryengine.v1beta.DataStore]s to be searched,
            +   * along with configurations for those data stores. This is only considered
            +   * for [Engine][google.cloud.discoveryengine.v1beta.Engine]s with multiple
            +   * data stores. For engines with a single data store, the specs directly under
            +   * [SearchRequest][google.cloud.discoveryengine.v1beta.SearchRequest] should
            +   * be used.
            +   * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec data_store_specs = 32; + * + */ + @java.lang.Override + public java.util.List< + ? extends com.google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpecOrBuilder> + getDataStoreSpecsOrBuilderList() { + return dataStoreSpecs_; + } + + /** + * + * + *
            +   * Specifications that define the specific
            +   * [DataStore][google.cloud.discoveryengine.v1beta.DataStore]s to be searched,
            +   * along with configurations for those data stores. This is only considered
            +   * for [Engine][google.cloud.discoveryengine.v1beta.Engine]s with multiple
            +   * data stores. For engines with a single data store, the specs directly under
            +   * [SearchRequest][google.cloud.discoveryengine.v1beta.SearchRequest] should
            +   * be used.
            +   * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec data_store_specs = 32; + * + */ + @java.lang.Override + public int getDataStoreSpecsCount() { + return dataStoreSpecs_.size(); + } + + /** + * + * + *
            +   * Specifications that define the specific
            +   * [DataStore][google.cloud.discoveryengine.v1beta.DataStore]s to be searched,
            +   * along with configurations for those data stores. This is only considered
            +   * for [Engine][google.cloud.discoveryengine.v1beta.Engine]s with multiple
            +   * data stores. For engines with a single data store, the specs directly under
            +   * [SearchRequest][google.cloud.discoveryengine.v1beta.SearchRequest] should
            +   * be used.
            +   * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec data_store_specs = 32; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec getDataStoreSpecs( + int index) { + return dataStoreSpecs_.get(index); + } + + /** + * + * + *
            +   * Specifications that define the specific
            +   * [DataStore][google.cloud.discoveryengine.v1beta.DataStore]s to be searched,
            +   * along with configurations for those data stores. This is only considered
            +   * for [Engine][google.cloud.discoveryengine.v1beta.Engine]s with multiple
            +   * data stores. For engines with a single data store, the specs directly under
            +   * [SearchRequest][google.cloud.discoveryengine.v1beta.SearchRequest] should
            +   * be used.
            +   * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec data_store_specs = 32; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpecOrBuilder + getDataStoreSpecsOrBuilder(int index) { + return dataStoreSpecs_.get(index); + } + + public static final int NUM_RESULTS_PER_DATA_STORE_FIELD_NUMBER = 65; + private int numResultsPerDataStore_ = 0; + + /** + * + * + *
            +   * Optional. The maximum number of results to retrieve from each data store.
            +   * If not specified, it will use the
            +   * [SearchRequest.DataStoreSpec.num_results][google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec.num_results]
            +   * if provided, otherwise there is no limit.
            +   * 
            + * + * int32 num_results_per_data_store = 65 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The numResultsPerDataStore. + */ + @java.lang.Override + public int getNumResultsPerDataStore() { + return numResultsPerDataStore_; + } + + public static final int FILTER_FIELD_NUMBER = 7; + + @SuppressWarnings("serial") + private volatile java.lang.Object filter_ = ""; + + /** + * + * + *
            +   * The filter syntax consists of an expression language for constructing a
            +   * predicate from one or more fields of the documents being filtered. Filter
            +   * expression is case-sensitive.
            +   *
            +   * If this field is unrecognizable, an  `INVALID_ARGUMENT`  is returned.
            +   *
            +   * Filtering in Vertex AI Search is done by mapping the LHS filter key to a
            +   * key property defined in the Vertex AI Search backend -- this mapping is
            +   * defined by the customer in their schema. For example a media customer might
            +   * have a field 'name' in their schema. In this case the filter would look
            +   * like this: filter --> name:'ANY("king kong")'
            +   *
            +   * For more information about filtering including syntax and filter
            +   * operators, see
            +   * [Filter](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata)
            +   * 
            + * + * string filter = 7; + * + * @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; + } + } + + /** + * + * + *
            +   * The filter syntax consists of an expression language for constructing a
            +   * predicate from one or more fields of the documents being filtered. Filter
            +   * expression is case-sensitive.
            +   *
            +   * If this field is unrecognizable, an  `INVALID_ARGUMENT`  is returned.
            +   *
            +   * Filtering in Vertex AI Search is done by mapping the LHS filter key to a
            +   * key property defined in the Vertex AI Search backend -- this mapping is
            +   * defined by the customer in their schema. For example a media customer might
            +   * have a field 'name' in their schema. In this case the filter would look
            +   * like this: filter --> name:'ANY("king kong")'
            +   *
            +   * For more information about filtering including syntax and filter
            +   * operators, see
            +   * [Filter](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata)
            +   * 
            + * + * string filter = 7; + * + * @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 CANONICAL_FILTER_FIELD_NUMBER = 29; + + @SuppressWarnings("serial") + private volatile java.lang.Object canonicalFilter_ = ""; + + /** + * + * + *
            +   * The default filter that is applied when a user performs a search without
            +   * checking any filters on the search page.
            +   *
            +   * The filter applied to every search request when quality improvement such as
            +   * query expansion is needed. In the case a query does not have a sufficient
            +   * amount of results this filter will be used to determine whether or not to
            +   * enable the query expansion flow. The original filter will still be used for
            +   * the query expanded search.
            +   * This field is strongly recommended to achieve high search quality.
            +   *
            +   * For more information about filter syntax, see
            +   * [SearchRequest.filter][google.cloud.discoveryengine.v1beta.SearchRequest.filter].
            +   * 
            + * + * string canonical_filter = 29; + * + * @return The canonicalFilter. + */ + @java.lang.Override + public java.lang.String getCanonicalFilter() { + java.lang.Object ref = canonicalFilter_; + 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(); + canonicalFilter_ = s; + return s; + } + } + + /** + * + * + *
            +   * The default filter that is applied when a user performs a search without
            +   * checking any filters on the search page.
            +   *
            +   * The filter applied to every search request when quality improvement such as
            +   * query expansion is needed. In the case a query does not have a sufficient
            +   * amount of results this filter will be used to determine whether or not to
            +   * enable the query expansion flow. The original filter will still be used for
            +   * the query expanded search.
            +   * This field is strongly recommended to achieve high search quality.
            +   *
            +   * For more information about filter syntax, see
            +   * [SearchRequest.filter][google.cloud.discoveryengine.v1beta.SearchRequest.filter].
            +   * 
            + * + * string canonical_filter = 29; + * + * @return The bytes for canonicalFilter. + */ + @java.lang.Override + public com.google.protobuf.ByteString getCanonicalFilterBytes() { + java.lang.Object ref = canonicalFilter_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + canonicalFilter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ORDER_BY_FIELD_NUMBER = 8; + + @SuppressWarnings("serial") + private volatile java.lang.Object orderBy_ = ""; + + /** + * + * + *
            +   * The order in which documents are returned. Documents can be ordered by
            +   * a field in an [Document][google.cloud.discoveryengine.v1beta.Document]
            +   * object. Leave it unset if ordered by relevance. `order_by` expression is
            +   * case-sensitive.
            +   *
            +   * For more information on ordering the website search results, see
            +   * [Order web search
            +   * results](https://cloud.google.com/generative-ai-app-builder/docs/order-web-search-results).
            +   * For more information on ordering the healthcare search results, see
            +   * [Order healthcare search
            +   * results](https://cloud.google.com/generative-ai-app-builder/docs/order-hc-results).
            +   * If this field is unrecognizable, an `INVALID_ARGUMENT` is returned.
            +   * 
            + * + * string order_by = 8; + * + * @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; + } + } + + /** + * + * + *
            +   * The order in which documents are returned. Documents can be ordered by
            +   * a field in an [Document][google.cloud.discoveryengine.v1beta.Document]
            +   * object. Leave it unset if ordered by relevance. `order_by` expression is
            +   * case-sensitive.
            +   *
            +   * For more information on ordering the website search results, see
            +   * [Order web search
            +   * results](https://cloud.google.com/generative-ai-app-builder/docs/order-web-search-results).
            +   * For more information on ordering the healthcare search results, see
            +   * [Order healthcare search
            +   * results](https://cloud.google.com/generative-ai-app-builder/docs/order-hc-results).
            +   * If this field is unrecognizable, an `INVALID_ARGUMENT` is returned.
            +   * 
            + * + * string order_by = 8; + * + * @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 USER_INFO_FIELD_NUMBER = 21; + private com.google.cloud.discoveryengine.v1beta.UserInfo userInfo_; + + /** + * + * + *
            +   * Information about the end user.
            +   * Highly recommended for analytics and personalization.
            +   * [UserInfo.user_agent][google.cloud.discoveryengine.v1beta.UserInfo.user_agent]
            +   * is used to deduce `device_type` for analytics.
            +   * 
            + * + * .google.cloud.discoveryengine.v1beta.UserInfo user_info = 21; + * + * @return Whether the userInfo field is set. + */ + @java.lang.Override + public boolean hasUserInfo() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
            +   * Information about the end user.
            +   * Highly recommended for analytics and personalization.
            +   * [UserInfo.user_agent][google.cloud.discoveryengine.v1beta.UserInfo.user_agent]
            +   * is used to deduce `device_type` for analytics.
            +   * 
            + * + * .google.cloud.discoveryengine.v1beta.UserInfo user_info = 21; + * + * @return The userInfo. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.UserInfo getUserInfo() { + return userInfo_ == null + ? com.google.cloud.discoveryengine.v1beta.UserInfo.getDefaultInstance() + : userInfo_; + } + + /** + * + * + *
            +   * Information about the end user.
            +   * Highly recommended for analytics and personalization.
            +   * [UserInfo.user_agent][google.cloud.discoveryengine.v1beta.UserInfo.user_agent]
            +   * is used to deduce `device_type` for analytics.
            +   * 
            + * + * .google.cloud.discoveryengine.v1beta.UserInfo user_info = 21; + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.UserInfoOrBuilder getUserInfoOrBuilder() { + return userInfo_ == null + ? com.google.cloud.discoveryengine.v1beta.UserInfo.getDefaultInstance() + : userInfo_; + } + + public static final int LANGUAGE_CODE_FIELD_NUMBER = 35; + + @SuppressWarnings("serial") + private volatile java.lang.Object languageCode_ = ""; + + /** + * + * + *
            +   * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
            +   * information, see [Standard
            +   * fields](https://cloud.google.com/apis/design/standard_fields). This field
            +   * helps to better interpret the query. If a value isn't specified, the query
            +   * language code is automatically detected, which may not be accurate.
            +   * 
            + * + * string language_code = 35; + * + * @return The languageCode. + */ + @java.lang.Override + public java.lang.String getLanguageCode() { + java.lang.Object ref = languageCode_; + 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(); + languageCode_ = s; + return s; + } + } + + /** + * + * + *
            +   * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
            +   * information, see [Standard
            +   * fields](https://cloud.google.com/apis/design/standard_fields). This field
            +   * helps to better interpret the query. If a value isn't specified, the query
            +   * language code is automatically detected, which may not be accurate.
            +   * 
            + * + * string language_code = 35; + * + * @return The bytes for languageCode. + */ + @java.lang.Override + public com.google.protobuf.ByteString getLanguageCodeBytes() { + java.lang.Object ref = languageCode_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + languageCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REGION_CODE_FIELD_NUMBER = 36; + + @SuppressWarnings("serial") + private volatile java.lang.Object regionCode_ = ""; + + /** + * + * + *
            +   * The Unicode country/region code (CLDR) of a location, such as "US" and
            +   * "419". For more information, see [Standard
            +   * fields](https://cloud.google.com/apis/design/standard_fields). If set,
            +   * then results will be boosted based on the region_code provided.
            +   * 
            + * + * string region_code = 36; + * + * @return The regionCode. + */ + @java.lang.Override + public java.lang.String getRegionCode() { + java.lang.Object ref = regionCode_; + 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(); + regionCode_ = s; + return s; + } + } + + /** + * + * + *
            +   * The Unicode country/region code (CLDR) of a location, such as "US" and
            +   * "419". For more information, see [Standard
            +   * fields](https://cloud.google.com/apis/design/standard_fields). If set,
            +   * then results will be boosted based on the region_code provided.
            +   * 
            + * + * string region_code = 36; + * + * @return The bytes for regionCode. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRegionCodeBytes() { + java.lang.Object ref = regionCode_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + regionCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FACET_SPECS_FIELD_NUMBER = 9; + + @SuppressWarnings("serial") + private java.util.List + facetSpecs_; + + /** + * + * + *
            +   * Facet specifications for faceted search. If empty, no facets are returned.
            +   *
            +   * A maximum of 100 values are allowed. Otherwise, an  `INVALID_ARGUMENT`
            +   * error is returned.
            +   * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec facet_specs = 9; + * + */ + @java.lang.Override + public java.util.List + getFacetSpecsList() { + return facetSpecs_; + } + + /** + * + * + *
            +   * Facet specifications for faceted search. If empty, no facets are returned.
            +   *
            +   * A maximum of 100 values are allowed. Otherwise, an  `INVALID_ARGUMENT`
            +   * error is returned.
            +   * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec facet_specs = 9; + * + */ + @java.lang.Override + public java.util.List< + ? extends com.google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpecOrBuilder> + getFacetSpecsOrBuilderList() { + return facetSpecs_; + } + + /** + * + * + *
            +   * Facet specifications for faceted search. If empty, no facets are returned.
            +   *
            +   * A maximum of 100 values are allowed. Otherwise, an  `INVALID_ARGUMENT`
            +   * error is returned.
            +   * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec facet_specs = 9; + * + */ + @java.lang.Override + public int getFacetSpecsCount() { + return facetSpecs_.size(); + } + + /** + * + * + *
            +   * Facet specifications for faceted search. If empty, no facets are returned.
            +   *
            +   * A maximum of 100 values are allowed. Otherwise, an  `INVALID_ARGUMENT`
            +   * error is returned.
            +   * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec facet_specs = 9; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec getFacetSpecs(int index) { + return facetSpecs_.get(index); + } + + /** + * + * + *
            +   * Facet specifications for faceted search. If empty, no facets are returned.
            +   *
            +   * A maximum of 100 values are allowed. Otherwise, an  `INVALID_ARGUMENT`
            +   * error is returned.
            +   * 
            + * + * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec facet_specs = 9; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpecOrBuilder + getFacetSpecsOrBuilder(int index) { + return facetSpecs_.get(index); + } + + public static final int BOOST_SPEC_FIELD_NUMBER = 10; + private com.google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec boostSpec_; + + /** + * + * + *
            +   * Boost specification to boost certain documents.
            +   * For more information on boosting, see
            +   * [Boosting](https://cloud.google.com/generative-ai-app-builder/docs/boost-search-results)
            +   * 
            + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec boost_spec = 10; + * + * @return Whether the boostSpec field is set. + */ + @java.lang.Override + public boolean hasBoostSpec() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
            +   * Boost specification to boost certain documents.
            +   * For more information on boosting, see
            +   * [Boosting](https://cloud.google.com/generative-ai-app-builder/docs/boost-search-results)
            +   * 
            + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec boost_spec = 10; + * + * @return The boostSpec. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec getBoostSpec() { + return boostSpec_ == null + ? com.google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec.getDefaultInstance() + : boostSpec_; + } + + /** + * + * + *
            +   * Boost specification to boost certain documents.
            +   * For more information on boosting, see
            +   * [Boosting](https://cloud.google.com/generative-ai-app-builder/docs/boost-search-results)
            +   * 
            + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec boost_spec = 10; + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpecOrBuilder + getBoostSpecOrBuilder() { + return boostSpec_ == null + ? com.google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec.getDefaultInstance() + : boostSpec_; + } + + public static final int PARAMS_FIELD_NUMBER = 11; + + private static final class ParamsDefaultEntryHolder { + static final com.google.protobuf.MapEntry + defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + com.google.cloud.discoveryengine.v1beta.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_ParamsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.MESSAGE, + com.google.protobuf.Value.getDefaultInstance()); + } + + @SuppressWarnings("serial") + private com.google.protobuf.MapField params_; + + private com.google.protobuf.MapField + internalGetParams() { + if (params_ == null) { + return com.google.protobuf.MapField.emptyMapField(ParamsDefaultEntryHolder.defaultEntry); + } + return params_; + } + + public int getParamsCount() { + return internalGetParams().getMap().size(); + } + + /** + * + * + *
            +   * Additional search parameters.
            +   *
            +   * For public website search only, supported values are:
            +   *
            +   * * `user_country_code`: string. Default empty. If set to non-empty, results
            +   * are restricted or boosted based on the location provided.
            +   * For example, `user_country_code: "au"`
            +   *
            +   * For available codes see [Country
            +   * Codes](https://developers.google.com/custom-search/docs/json_api_reference#countryCodes)
            +   *
            +   * * `search_type`: double. Default empty. Enables non-webpage searching
            +   * depending on the value. The only valid non-default value is 1,
            +   * which enables image searching.
            +   * For example, `search_type: 1`
            +   * 
            + * + * map<string, .google.protobuf.Value> params = 11; + */ + @java.lang.Override + public boolean containsParams(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetParams().getMap().containsKey(key); + } + + /** Use {@link #getParamsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getParams() { + return getParamsMap(); + } + + /** + * + * + *
            +   * Additional search parameters.
            +   *
            +   * For public website search only, supported values are:
            +   *
            +   * * `user_country_code`: string. Default empty. If set to non-empty, results
            +   * are restricted or boosted based on the location provided.
            +   * For example, `user_country_code: "au"`
            +   *
            +   * For available codes see [Country
            +   * Codes](https://developers.google.com/custom-search/docs/json_api_reference#countryCodes)
            +   *
            +   * * `search_type`: double. Default empty. Enables non-webpage searching
            +   * depending on the value. The only valid non-default value is 1,
            +   * which enables image searching.
            +   * For example, `search_type: 1`
            +   * 
            + * + * map<string, .google.protobuf.Value> params = 11; + */ + @java.lang.Override + public java.util.Map getParamsMap() { + return internalGetParams().getMap(); + } + + /** + * + * + *
            +   * Additional search parameters.
            +   *
            +   * For public website search only, supported values are:
            +   *
            +   * * `user_country_code`: string. Default empty. If set to non-empty, results
            +   * are restricted or boosted based on the location provided.
            +   * For example, `user_country_code: "au"`
            +   *
            +   * For available codes see [Country
            +   * Codes](https://developers.google.com/custom-search/docs/json_api_reference#countryCodes)
            +   *
            +   * * `search_type`: double. Default empty. Enables non-webpage searching
            +   * depending on the value. The only valid non-default value is 1,
            +   * which enables image searching.
            +   * For example, `search_type: 1`
            +   * 
            + * + * map<string, .google.protobuf.Value> params = 11; + */ + @java.lang.Override + public /* nullable */ com.google.protobuf.Value getParamsOrDefault( + java.lang.String key, + /* nullable */ + com.google.protobuf.Value defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetParams().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + + /** + * + * + *
            +   * Additional search parameters.
            +   *
            +   * For public website search only, supported values are:
            +   *
            +   * * `user_country_code`: string. Default empty. If set to non-empty, results
            +   * are restricted or boosted based on the location provided.
            +   * For example, `user_country_code: "au"`
            +   *
            +   * For available codes see [Country
            +   * Codes](https://developers.google.com/custom-search/docs/json_api_reference#countryCodes)
            +   *
            +   * * `search_type`: double. Default empty. Enables non-webpage searching
            +   * depending on the value. The only valid non-default value is 1,
            +   * which enables image searching.
            +   * For example, `search_type: 1`
            +   * 
            + * + * map<string, .google.protobuf.Value> params = 11; + */ + @java.lang.Override + public com.google.protobuf.Value getParamsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetParams().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int QUERY_EXPANSION_SPEC_FIELD_NUMBER = 13; + private com.google.cloud.discoveryengine.v1beta.SearchRequest.QueryExpansionSpec + queryExpansionSpec_; + + /** + * + * + *
            +   * The query expansion specification that specifies the conditions under which
            +   * query expansion occurs.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.QueryExpansionSpec query_expansion_spec = 13; + * + * + * @return Whether the queryExpansionSpec field is set. + */ + @java.lang.Override + public boolean hasQueryExpansionSpec() { + return ((bitField0_ & 0x00000008) != 0); + } + + /** + * + * + *
            +   * The query expansion specification that specifies the conditions under which
            +   * query expansion occurs.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.QueryExpansionSpec query_expansion_spec = 13; + * + * + * @return The queryExpansionSpec. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.SearchRequest.QueryExpansionSpec + getQueryExpansionSpec() { + return queryExpansionSpec_ == null + ? com.google.cloud.discoveryengine.v1beta.SearchRequest.QueryExpansionSpec + .getDefaultInstance() + : queryExpansionSpec_; + } + + /** + * + * + *
            +   * The query expansion specification that specifies the conditions under which
            +   * query expansion occurs.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.QueryExpansionSpec query_expansion_spec = 13; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.SearchRequest.QueryExpansionSpecOrBuilder + getQueryExpansionSpecOrBuilder() { + return queryExpansionSpec_ == null + ? com.google.cloud.discoveryengine.v1beta.SearchRequest.QueryExpansionSpec + .getDefaultInstance() + : queryExpansionSpec_; + } + + public static final int SPELL_CORRECTION_SPEC_FIELD_NUMBER = 14; + private com.google.cloud.discoveryengine.v1beta.SearchRequest.SpellCorrectionSpec + spellCorrectionSpec_; + + /** + * + * + *
            +   * The spell correction specification that specifies the mode under
            +   * which spell correction takes effect.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.SpellCorrectionSpec spell_correction_spec = 14; + * + * + * @return Whether the spellCorrectionSpec field is set. + */ + @java.lang.Override + public boolean hasSpellCorrectionSpec() { + return ((bitField0_ & 0x00000010) != 0); + } + + /** + * + * + *
            +   * The spell correction specification that specifies the mode under
            +   * which spell correction takes effect.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.SpellCorrectionSpec spell_correction_spec = 14; + * + * + * @return The spellCorrectionSpec. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.SearchRequest.SpellCorrectionSpec + getSpellCorrectionSpec() { + return spellCorrectionSpec_ == null + ? com.google.cloud.discoveryengine.v1beta.SearchRequest.SpellCorrectionSpec + .getDefaultInstance() + : spellCorrectionSpec_; + } + + /** + * + * + *
            +   * The spell correction specification that specifies the mode under
            +   * which spell correction takes effect.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.SpellCorrectionSpec spell_correction_spec = 14; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.SearchRequest.SpellCorrectionSpecOrBuilder + getSpellCorrectionSpecOrBuilder() { + return spellCorrectionSpec_ == null + ? com.google.cloud.discoveryengine.v1beta.SearchRequest.SpellCorrectionSpec + .getDefaultInstance() + : spellCorrectionSpec_; + } + + public static final int USER_PSEUDO_ID_FIELD_NUMBER = 15; + + @SuppressWarnings("serial") + private volatile java.lang.Object userPseudoId_ = ""; + + /** + * + * + *
            +   * Optional. A unique identifier for tracking visitors. For example, this
            +   * could be implemented with an HTTP cookie, which should be able to uniquely
            +   * identify a visitor on a single device. This unique identifier should not
            +   * change if the visitor logs in or out of the website.
            +   *
            +   * This field should NOT have a fixed value such as `unknown_visitor`.
            +   *
            +   * This should be the same identifier as
            +   * [UserEvent.user_pseudo_id][google.cloud.discoveryengine.v1beta.UserEvent.user_pseudo_id]
            +   * and
            +   * [CompleteQueryRequest.user_pseudo_id][google.cloud.discoveryengine.v1beta.CompleteQueryRequest.user_pseudo_id]
            +   *
            +   * The field must be a UTF-8 encoded string with a length limit of 128
            +   * characters. Otherwise, an  `INVALID_ARGUMENT`  error is returned.
            +   * 
            + * + * string user_pseudo_id = 15 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The userPseudoId. + */ + @java.lang.Override + public java.lang.String getUserPseudoId() { + java.lang.Object ref = userPseudoId_; + 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(); + userPseudoId_ = s; + return s; + } + } + + /** + * + * + *
            +   * Optional. A unique identifier for tracking visitors. For example, this
            +   * could be implemented with an HTTP cookie, which should be able to uniquely
            +   * identify a visitor on a single device. This unique identifier should not
            +   * change if the visitor logs in or out of the website.
            +   *
            +   * This field should NOT have a fixed value such as `unknown_visitor`.
            +   *
            +   * This should be the same identifier as
            +   * [UserEvent.user_pseudo_id][google.cloud.discoveryengine.v1beta.UserEvent.user_pseudo_id]
            +   * and
            +   * [CompleteQueryRequest.user_pseudo_id][google.cloud.discoveryengine.v1beta.CompleteQueryRequest.user_pseudo_id]
            +   *
            +   * The field must be a UTF-8 encoded string with a length limit of 128
            +   * characters. Otherwise, an  `INVALID_ARGUMENT`  error is returned.
            +   * 
            + * + * string user_pseudo_id = 15 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for userPseudoId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getUserPseudoIdBytes() { + java.lang.Object ref = userPseudoId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + userPseudoId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CONTENT_SEARCH_SPEC_FIELD_NUMBER = 24; + private com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec + contentSearchSpec_; + + /** + * + * + *
            +   * A specification for configuring the behavior of content search.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec content_search_spec = 24; + * + * + * @return Whether the contentSearchSpec field is set. + */ + @java.lang.Override + public boolean hasContentSearchSpec() { + return ((bitField0_ & 0x00000020) != 0); + } + + /** + * + * + *
            +   * A specification for configuring the behavior of content search.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec content_search_spec = 24; + * + * + * @return The contentSearchSpec. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec + getContentSearchSpec() { + return contentSearchSpec_ == null + ? com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec + .getDefaultInstance() + : contentSearchSpec_; + } + + /** + * + * + *
            +   * A specification for configuring the behavior of content search.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec content_search_spec = 24; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpecOrBuilder + getContentSearchSpecOrBuilder() { + return contentSearchSpec_ == null + ? com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec + .getDefaultInstance() + : contentSearchSpec_; + } + + public static final int EMBEDDING_SPEC_FIELD_NUMBER = 23; + private com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec embeddingSpec_; + + /** + * + * + *
            +   * Uses the provided embedding to do additional semantic document retrieval.
            +   * The retrieval is based on the dot product of
            +   * [SearchRequest.EmbeddingSpec.EmbeddingVector.vector][google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector.vector]
            +   * and the document embedding that is provided in
            +   * [SearchRequest.EmbeddingSpec.EmbeddingVector.field_path][google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector.field_path].
            +   *
            +   * If
            +   * [SearchRequest.EmbeddingSpec.EmbeddingVector.field_path][google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector.field_path]
            +   * is not provided, it will use
            +   * [ServingConfig.EmbeddingConfig.field_path][google.cloud.discoveryengine.v1beta.ServingConfig.embedding_config].
            +   * 
            + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec embedding_spec = 23; + * + * + * @return Whether the embeddingSpec field is set. + */ + @java.lang.Override + public boolean hasEmbeddingSpec() { + return ((bitField0_ & 0x00000040) != 0); + } + + /** + * + * + *
            +   * Uses the provided embedding to do additional semantic document retrieval.
            +   * The retrieval is based on the dot product of
            +   * [SearchRequest.EmbeddingSpec.EmbeddingVector.vector][google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector.vector]
            +   * and the document embedding that is provided in
            +   * [SearchRequest.EmbeddingSpec.EmbeddingVector.field_path][google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector.field_path].
            +   *
            +   * If
            +   * [SearchRequest.EmbeddingSpec.EmbeddingVector.field_path][google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector.field_path]
            +   * is not provided, it will use
            +   * [ServingConfig.EmbeddingConfig.field_path][google.cloud.discoveryengine.v1beta.ServingConfig.embedding_config].
            +   * 
            + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec embedding_spec = 23; + * + * + * @return The embeddingSpec. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec getEmbeddingSpec() { + return embeddingSpec_ == null + ? com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.getDefaultInstance() + : embeddingSpec_; + } + + /** + * + * + *
            +   * Uses the provided embedding to do additional semantic document retrieval.
            +   * The retrieval is based on the dot product of
            +   * [SearchRequest.EmbeddingSpec.EmbeddingVector.vector][google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector.vector]
            +   * and the document embedding that is provided in
            +   * [SearchRequest.EmbeddingSpec.EmbeddingVector.field_path][google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector.field_path].
            +   *
            +   * If
            +   * [SearchRequest.EmbeddingSpec.EmbeddingVector.field_path][google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector.field_path]
            +   * is not provided, it will use
            +   * [ServingConfig.EmbeddingConfig.field_path][google.cloud.discoveryengine.v1beta.ServingConfig.embedding_config].
            +   * 
            + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec embedding_spec = 23; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpecOrBuilder + getEmbeddingSpecOrBuilder() { + return embeddingSpec_ == null + ? com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.getDefaultInstance() + : embeddingSpec_; + } + + public static final int RANKING_EXPRESSION_FIELD_NUMBER = 26; + + @SuppressWarnings("serial") + private volatile java.lang.Object rankingExpression_ = ""; + + /** + * + * + *
            +   * Optional. The ranking expression controls the customized ranking on
            +   * retrieval documents. This overrides
            +   * [ServingConfig.ranking_expression][google.cloud.discoveryengine.v1beta.ServingConfig.ranking_expression].
            +   * The syntax and supported features depend on the
            +   * `ranking_expression_backend` value. If `ranking_expression_backend` is not
            +   * provided, it defaults to `RANK_BY_EMBEDDING`.
            +   *
            +   * If
            +   * [ranking_expression_backend][google.cloud.discoveryengine.v1beta.SearchRequest.ranking_expression_backend]
            +   * is not provided or set to `RANK_BY_EMBEDDING`, it should be a single
            +   * function or multiple functions that are joined by "+".
            +   *
            +   * * ranking_expression = function, { " + ", function };
            +   *
            +   * Supported functions:
            +   *
            +   * * double * relevance_score
            +   * * double * dotProduct(embedding_field_path)
            +   *
            +   * Function variables:
            +   *
            +   * * `relevance_score`: pre-defined keywords, used for measure relevance
            +   * between query and document.
            +   * * `embedding_field_path`: the document embedding field
            +   * used with query embedding vector.
            +   * * `dotProduct`: embedding function between `embedding_field_path` and
            +   * query embedding vector.
            +   *
            +   * Example ranking expression:
            +   *
            +   * If document has an embedding field doc_embedding, the ranking expression
            +   * could be `0.5 * relevance_score + 0.3 * dotProduct(doc_embedding)`.
            +   *
            +   * If
            +   * [ranking_expression_backend][google.cloud.discoveryengine.v1beta.SearchRequest.ranking_expression_backend]
            +   * is set to `RANK_BY_FORMULA`, the following expression types (and
            +   * combinations of those chained using + or
            +   * * operators) are supported:
            +   *
            +   * * `double`
            +   * * `signal`
            +   * * `log(signal)`
            +   * * `exp(signal)`
            +   * * `rr(signal, double > 0)`  -- reciprocal rank transformation with second
            +   * argument being a denominator constant.
            +   * * `is_nan(signal)` -- returns 0 if signal is NaN, 1 otherwise.
            +   * * `fill_nan(signal1, signal2 | double)` -- if signal1 is NaN, returns
            +   * signal2 | double, else returns signal1.
            +   *
            +   * Here are a few examples of ranking formulas that use the supported
            +   * ranking expression types:
            +   *
            +   * - `0.2 * semantic_similarity_score + 0.8 * log(keyword_similarity_score)`
            +   * -- mostly rank by the logarithm of `keyword_similarity_score` with slight
            +   * `semantic_smilarity_score` adjustment.
            +   * - `0.2 * exp(fill_nan(semantic_similarity_score, 0)) + 0.3 *
            +   * is_nan(keyword_similarity_score)` -- rank by the exponent of
            +   * `semantic_similarity_score` filling the value with 0 if it's NaN, also
            +   * add constant 0.3 adjustment to the final score if
            +   * `semantic_similarity_score` is NaN.
            +   * - `0.2 * rr(semantic_similarity_score, 16) + 0.8 *
            +   * rr(keyword_similarity_score, 16)` -- mostly rank by the reciprocal rank
            +   * of `keyword_similarity_score` with slight adjustment of reciprocal rank
            +   * of `semantic_smilarity_score`.
            +   *
            +   * The following signals are supported:
            +   *
            +   * * `semantic_similarity_score`: semantic similarity adjustment that is
            +   * calculated using the embeddings generated by a proprietary Google model.
            +   * This score determines how semantically similar a search query is to a
            +   * document.
            +   * * `keyword_similarity_score`: keyword match adjustment uses the Best
            +   * Match 25 (BM25) ranking function. This score is calculated using a
            +   * probabilistic model to estimate the probability that a document is
            +   * relevant to a given query.
            +   * * `relevance_score`: semantic relevance adjustment that uses a
            +   * proprietary Google model to determine the meaning and intent behind a
            +   * user's query in context with the content in the documents.
            +   * * `pctr_rank`: predicted conversion rate adjustment as a rank use
            +   * predicted Click-through rate (pCTR) to gauge the relevance and
            +   * attractiveness of a search result from a user's perspective. A higher
            +   * pCTR suggests that the result is more likely to satisfy the user's query
            +   * and intent, making it a valuable signal for ranking.
            +   * * `freshness_rank`: freshness adjustment as a rank
            +   * * `document_age`: The time in hours elapsed since the document was last
            +   * updated, a floating-point number (e.g., 0.25 means 15 minutes).
            +   * * `topicality_rank`: topicality adjustment as a rank. Uses proprietary
            +   * Google model to determine the keyword-based overlap between the query and
            +   * the document.
            +   * * `base_rank`: the default rank of the result
            +   * * `media_actor_match`: whether the media actor matches the query
            +   * * `media_director_match`: whether the media director matches the query
            +   * * `media_genre_match`: whether the media genre matches the query
            +   * * `media_language_match`: whether the media language matches the query
            +   * * `media_title_match`: whether the media title matches the query
            +   * * `media_prefix_similarity_rank`: prefix similarity rank for media
            +   * results
            +   * * `media_semantic_similarity_rank`: semantic similarity rank for media
            +   * results
            +   * 
            + * + * string ranking_expression = 26 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The rankingExpression. + */ + @java.lang.Override + public java.lang.String getRankingExpression() { + java.lang.Object ref = rankingExpression_; + 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(); + rankingExpression_ = s; + return s; + } + } + + /** + * + * + *
            +   * Optional. The ranking expression controls the customized ranking on
            +   * retrieval documents. This overrides
            +   * [ServingConfig.ranking_expression][google.cloud.discoveryengine.v1beta.ServingConfig.ranking_expression].
            +   * The syntax and supported features depend on the
            +   * `ranking_expression_backend` value. If `ranking_expression_backend` is not
            +   * provided, it defaults to `RANK_BY_EMBEDDING`.
            +   *
            +   * If
            +   * [ranking_expression_backend][google.cloud.discoveryengine.v1beta.SearchRequest.ranking_expression_backend]
            +   * is not provided or set to `RANK_BY_EMBEDDING`, it should be a single
            +   * function or multiple functions that are joined by "+".
            +   *
            +   * * ranking_expression = function, { " + ", function };
            +   *
            +   * Supported functions:
            +   *
            +   * * double * relevance_score
            +   * * double * dotProduct(embedding_field_path)
            +   *
            +   * Function variables:
            +   *
            +   * * `relevance_score`: pre-defined keywords, used for measure relevance
            +   * between query and document.
            +   * * `embedding_field_path`: the document embedding field
            +   * used with query embedding vector.
            +   * * `dotProduct`: embedding function between `embedding_field_path` and
            +   * query embedding vector.
            +   *
            +   * Example ranking expression:
            +   *
            +   * If document has an embedding field doc_embedding, the ranking expression
            +   * could be `0.5 * relevance_score + 0.3 * dotProduct(doc_embedding)`.
            +   *
            +   * If
            +   * [ranking_expression_backend][google.cloud.discoveryengine.v1beta.SearchRequest.ranking_expression_backend]
            +   * is set to `RANK_BY_FORMULA`, the following expression types (and
            +   * combinations of those chained using + or
            +   * * operators) are supported:
            +   *
            +   * * `double`
            +   * * `signal`
            +   * * `log(signal)`
            +   * * `exp(signal)`
            +   * * `rr(signal, double > 0)`  -- reciprocal rank transformation with second
            +   * argument being a denominator constant.
            +   * * `is_nan(signal)` -- returns 0 if signal is NaN, 1 otherwise.
            +   * * `fill_nan(signal1, signal2 | double)` -- if signal1 is NaN, returns
            +   * signal2 | double, else returns signal1.
            +   *
            +   * Here are a few examples of ranking formulas that use the supported
            +   * ranking expression types:
            +   *
            +   * - `0.2 * semantic_similarity_score + 0.8 * log(keyword_similarity_score)`
            +   * -- mostly rank by the logarithm of `keyword_similarity_score` with slight
            +   * `semantic_smilarity_score` adjustment.
            +   * - `0.2 * exp(fill_nan(semantic_similarity_score, 0)) + 0.3 *
            +   * is_nan(keyword_similarity_score)` -- rank by the exponent of
            +   * `semantic_similarity_score` filling the value with 0 if it's NaN, also
            +   * add constant 0.3 adjustment to the final score if
            +   * `semantic_similarity_score` is NaN.
            +   * - `0.2 * rr(semantic_similarity_score, 16) + 0.8 *
            +   * rr(keyword_similarity_score, 16)` -- mostly rank by the reciprocal rank
            +   * of `keyword_similarity_score` with slight adjustment of reciprocal rank
            +   * of `semantic_smilarity_score`.
            +   *
            +   * The following signals are supported:
            +   *
            +   * * `semantic_similarity_score`: semantic similarity adjustment that is
            +   * calculated using the embeddings generated by a proprietary Google model.
            +   * This score determines how semantically similar a search query is to a
            +   * document.
            +   * * `keyword_similarity_score`: keyword match adjustment uses the Best
            +   * Match 25 (BM25) ranking function. This score is calculated using a
            +   * probabilistic model to estimate the probability that a document is
            +   * relevant to a given query.
            +   * * `relevance_score`: semantic relevance adjustment that uses a
            +   * proprietary Google model to determine the meaning and intent behind a
            +   * user's query in context with the content in the documents.
            +   * * `pctr_rank`: predicted conversion rate adjustment as a rank use
            +   * predicted Click-through rate (pCTR) to gauge the relevance and
            +   * attractiveness of a search result from a user's perspective. A higher
            +   * pCTR suggests that the result is more likely to satisfy the user's query
            +   * and intent, making it a valuable signal for ranking.
            +   * * `freshness_rank`: freshness adjustment as a rank
            +   * * `document_age`: The time in hours elapsed since the document was last
            +   * updated, a floating-point number (e.g., 0.25 means 15 minutes).
            +   * * `topicality_rank`: topicality adjustment as a rank. Uses proprietary
            +   * Google model to determine the keyword-based overlap between the query and
            +   * the document.
            +   * * `base_rank`: the default rank of the result
            +   * * `media_actor_match`: whether the media actor matches the query
            +   * * `media_director_match`: whether the media director matches the query
            +   * * `media_genre_match`: whether the media genre matches the query
            +   * * `media_language_match`: whether the media language matches the query
            +   * * `media_title_match`: whether the media title matches the query
            +   * * `media_prefix_similarity_rank`: prefix similarity rank for media
            +   * results
            +   * * `media_semantic_similarity_rank`: semantic similarity rank for media
            +   * results
            +   * 
            + * + * string ranking_expression = 26 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for rankingExpression. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRankingExpressionBytes() { + java.lang.Object ref = rankingExpression_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + rankingExpression_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int RANKING_EXPRESSION_BACKEND_FIELD_NUMBER = 53; + private int rankingExpressionBackend_ = 0; + + /** + * + * + *
            +   * Optional. The backend to use for the ranking expression evaluation.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.RankingExpressionBackend ranking_expression_backend = 53 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for rankingExpressionBackend. + */ + @java.lang.Override + public int getRankingExpressionBackendValue() { + return rankingExpressionBackend_; + } + + /** + * + * + *
            +   * Optional. The backend to use for the ranking expression evaluation.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.RankingExpressionBackend ranking_expression_backend = 53 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The rankingExpressionBackend. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.SearchRequest.RankingExpressionBackend + getRankingExpressionBackend() { + com.google.cloud.discoveryengine.v1beta.SearchRequest.RankingExpressionBackend result = + com.google.cloud.discoveryengine.v1beta.SearchRequest.RankingExpressionBackend.forNumber( + rankingExpressionBackend_); + return result == null + ? com.google.cloud.discoveryengine.v1beta.SearchRequest.RankingExpressionBackend + .UNRECOGNIZED + : result; + } + + public static final int SAFE_SEARCH_FIELD_NUMBER = 20; + private boolean safeSearch_ = false; + + /** + * + * + *
            +   * Whether to turn on safe search. This is only supported for
            +   * website search.
            +   * 
            + * + * bool safe_search = 20; + * + * @return The safeSearch. + */ + @java.lang.Override + public boolean getSafeSearch() { + return safeSearch_; + } + + public static final int USER_LABELS_FIELD_NUMBER = 22; + + private static final class UserLabelsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.discoveryengine.v1beta.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_UserLabelsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + @SuppressWarnings("serial") + private com.google.protobuf.MapField userLabels_; + + private com.google.protobuf.MapField internalGetUserLabels() { + if (userLabels_ == null) { + return com.google.protobuf.MapField.emptyMapField(UserLabelsDefaultEntryHolder.defaultEntry); + } + return userLabels_; + } + + public int getUserLabelsCount() { + return internalGetUserLabels().getMap().size(); + } + + /** + * + * + *
            +   * The user labels applied to a resource must meet the following requirements:
            +   *
            +   * * Each resource can have multiple labels, up to a maximum of 64.
            +   * * Each label must be a key-value pair.
            +   * * Keys have a minimum length of 1 character and a maximum length of 63
            +   * characters and cannot be empty. Values can be empty and have a maximum
            +   * length of 63 characters.
            +   * * Keys and values can contain only lowercase letters, numeric characters,
            +   * underscores, and dashes. All characters must use UTF-8 encoding, and
            +   * international characters are allowed.
            +   * * The key portion of a label must be unique. However, you can use the same
            +   * key with multiple resources.
            +   * * Keys must start with a lowercase letter or international character.
            +   *
            +   * See [Google Cloud
            +   * Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
            +   * for more details.
            +   * 
            + * + * map<string, string> user_labels = 22; + */ + @java.lang.Override + public boolean containsUserLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetUserLabels().getMap().containsKey(key); + } + + /** Use {@link #getUserLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getUserLabels() { + return getUserLabelsMap(); + } + + /** + * + * + *
            +   * The user labels applied to a resource must meet the following requirements:
            +   *
            +   * * Each resource can have multiple labels, up to a maximum of 64.
            +   * * Each label must be a key-value pair.
            +   * * Keys have a minimum length of 1 character and a maximum length of 63
            +   * characters and cannot be empty. Values can be empty and have a maximum
            +   * length of 63 characters.
            +   * * Keys and values can contain only lowercase letters, numeric characters,
            +   * underscores, and dashes. All characters must use UTF-8 encoding, and
            +   * international characters are allowed.
            +   * * The key portion of a label must be unique. However, you can use the same
            +   * key with multiple resources.
            +   * * Keys must start with a lowercase letter or international character.
            +   *
            +   * See [Google Cloud
            +   * Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
            +   * for more details.
            +   * 
            + * + * map<string, string> user_labels = 22; + */ + @java.lang.Override + public java.util.Map getUserLabelsMap() { + return internalGetUserLabels().getMap(); + } + + /** + * + * + *
            +   * The user labels applied to a resource must meet the following requirements:
            +   *
            +   * * Each resource can have multiple labels, up to a maximum of 64.
            +   * * Each label must be a key-value pair.
            +   * * Keys have a minimum length of 1 character and a maximum length of 63
            +   * characters and cannot be empty. Values can be empty and have a maximum
            +   * length of 63 characters.
            +   * * Keys and values can contain only lowercase letters, numeric characters,
            +   * underscores, and dashes. All characters must use UTF-8 encoding, and
            +   * international characters are allowed.
            +   * * The key portion of a label must be unique. However, you can use the same
            +   * key with multiple resources.
            +   * * Keys must start with a lowercase letter or international character.
            +   *
            +   * See [Google Cloud
            +   * Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
            +   * for more details.
            +   * 
            + * + * map<string, string> user_labels = 22; + */ + @java.lang.Override + public /* nullable */ java.lang.String getUserLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetUserLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + + /** + * + * + *
            +   * The user labels applied to a resource must meet the following requirements:
            +   *
            +   * * Each resource can have multiple labels, up to a maximum of 64.
            +   * * Each label must be a key-value pair.
            +   * * Keys have a minimum length of 1 character and a maximum length of 63
            +   * characters and cannot be empty. Values can be empty and have a maximum
            +   * length of 63 characters.
            +   * * Keys and values can contain only lowercase letters, numeric characters,
            +   * underscores, and dashes. All characters must use UTF-8 encoding, and
            +   * international characters are allowed.
            +   * * The key portion of a label must be unique. However, you can use the same
            +   * key with multiple resources.
            +   * * Keys must start with a lowercase letter or international character.
            +   *
            +   * See [Google Cloud
            +   * Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
            +   * for more details.
            +   * 
            + * + * map<string, string> user_labels = 22; + */ + @java.lang.Override + public java.lang.String getUserLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetUserLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int NATURAL_LANGUAGE_QUERY_UNDERSTANDING_SPEC_FIELD_NUMBER = 28; + private com.google.cloud.discoveryengine.v1beta.SearchRequest + .NaturalLanguageQueryUnderstandingSpec + naturalLanguageQueryUnderstandingSpec_; + + /** + * + * + *
            +   * Optional. Config for natural language query understanding capabilities,
            +   * such as extracting structured field filters from the query. Refer to [this
            +   * documentation](https://cloud.google.com/generative-ai-app-builder/docs/natural-language-queries)
            +   * for more information.
            +   * If `naturalLanguageQueryUnderstandingSpec` is not specified, no additional
            +   * natural language query understanding will be done.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.NaturalLanguageQueryUnderstandingSpec natural_language_query_understanding_spec = 28 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the naturalLanguageQueryUnderstandingSpec field is set. + */ + @java.lang.Override + public boolean hasNaturalLanguageQueryUnderstandingSpec() { + return ((bitField0_ & 0x00000080) != 0); + } + + /** + * + * + *
            +   * Optional. Config for natural language query understanding capabilities,
            +   * such as extracting structured field filters from the query. Refer to [this
            +   * documentation](https://cloud.google.com/generative-ai-app-builder/docs/natural-language-queries)
            +   * for more information.
            +   * If `naturalLanguageQueryUnderstandingSpec` is not specified, no additional
            +   * natural language query understanding will be done.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.NaturalLanguageQueryUnderstandingSpec natural_language_query_understanding_spec = 28 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The naturalLanguageQueryUnderstandingSpec. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.SearchRequest.NaturalLanguageQueryUnderstandingSpec + getNaturalLanguageQueryUnderstandingSpec() { + return naturalLanguageQueryUnderstandingSpec_ == null + ? com.google.cloud.discoveryengine.v1beta.SearchRequest + .NaturalLanguageQueryUnderstandingSpec.getDefaultInstance() + : naturalLanguageQueryUnderstandingSpec_; + } + + /** + * + * + *
            +   * Optional. Config for natural language query understanding capabilities,
            +   * such as extracting structured field filters from the query. Refer to [this
            +   * documentation](https://cloud.google.com/generative-ai-app-builder/docs/natural-language-queries)
            +   * for more information.
            +   * If `naturalLanguageQueryUnderstandingSpec` is not specified, no additional
            +   * natural language query understanding will be done.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.NaturalLanguageQueryUnderstandingSpec natural_language_query_understanding_spec = 28 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.SearchRequest + .NaturalLanguageQueryUnderstandingSpecOrBuilder + getNaturalLanguageQueryUnderstandingSpecOrBuilder() { + return naturalLanguageQueryUnderstandingSpec_ == null + ? com.google.cloud.discoveryengine.v1beta.SearchRequest + .NaturalLanguageQueryUnderstandingSpec.getDefaultInstance() + : naturalLanguageQueryUnderstandingSpec_; + } + + public static final int SEARCH_AS_YOU_TYPE_SPEC_FIELD_NUMBER = 31; + private com.google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec + searchAsYouTypeSpec_; + + /** + * + * + *
            +   * Search as you type configuration. Only supported for the
            +   * [IndustryVertical.MEDIA][google.cloud.discoveryengine.v1beta.IndustryVertical.MEDIA]
            +   * vertical.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec search_as_you_type_spec = 31; + * + * + * @return Whether the searchAsYouTypeSpec field is set. + */ + @java.lang.Override + public boolean hasSearchAsYouTypeSpec() { + return ((bitField0_ & 0x00000100) != 0); + } + + /** + * + * + *
            +   * Search as you type configuration. Only supported for the
            +   * [IndustryVertical.MEDIA][google.cloud.discoveryengine.v1beta.IndustryVertical.MEDIA]
            +   * vertical.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec search_as_you_type_spec = 31; + * + * + * @return The searchAsYouTypeSpec. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec + getSearchAsYouTypeSpec() { + return searchAsYouTypeSpec_ == null + ? com.google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec + .getDefaultInstance() + : searchAsYouTypeSpec_; + } + + /** + * + * + *
            +   * Search as you type configuration. Only supported for the
            +   * [IndustryVertical.MEDIA][google.cloud.discoveryengine.v1beta.IndustryVertical.MEDIA]
            +   * vertical.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec search_as_you_type_spec = 31; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpecOrBuilder + getSearchAsYouTypeSpecOrBuilder() { + return searchAsYouTypeSpec_ == null + ? com.google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec + .getDefaultInstance() + : searchAsYouTypeSpec_; + } + + public static final int DISPLAY_SPEC_FIELD_NUMBER = 38; + private com.google.cloud.discoveryengine.v1beta.SearchRequest.DisplaySpec displaySpec_; + + /** + * + * + *
            +   * Optional. Config for display feature, like match highlighting on search
            +   * results.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.DisplaySpec display_spec = 38 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the displaySpec field is set. + */ + @java.lang.Override + public boolean hasDisplaySpec() { + return ((bitField0_ & 0x00000200) != 0); + } + + /** + * + * + *
            +   * Optional. Config for display feature, like match highlighting on search
            +   * results.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.DisplaySpec display_spec = 38 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The displaySpec. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.SearchRequest.DisplaySpec getDisplaySpec() { + return displaySpec_ == null + ? com.google.cloud.discoveryengine.v1beta.SearchRequest.DisplaySpec.getDefaultInstance() + : displaySpec_; + } + + /** + * + * + *
            +   * Optional. Config for display feature, like match highlighting on search
            +   * results.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.DisplaySpec display_spec = 38 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.SearchRequest.DisplaySpecOrBuilder + getDisplaySpecOrBuilder() { + return displaySpec_ == null + ? com.google.cloud.discoveryengine.v1beta.SearchRequest.DisplaySpec.getDefaultInstance() + : displaySpec_; + } + + public static final int CROWDING_SPECS_FIELD_NUMBER = 40; + + @SuppressWarnings("serial") + private java.util.List + crowdingSpecs_; + + /** + * + * + *
            +   * Optional. Crowding specifications for improving result diversity.
            +   * If multiple CrowdingSpecs are specified, crowding will be evaluated on
            +   * each unique combination of the `field` values, and max_count will be the
            +   * maximum value of `max_count` across all CrowdingSpecs.
            +   * For example, if the first CrowdingSpec has `field` = "color" and
            +   * `max_count` = 3, and the second CrowdingSpec has `field` = "size" and
            +   * `max_count` = 2, then after 3 documents that share the same color AND size
            +   * have been returned, subsequent ones should be
            +   * removed or demoted.
            +   * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.CrowdingSpec crowding_specs = 40 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List + getCrowdingSpecsList() { + return crowdingSpecs_; + } + + /** + * + * + *
            +   * Optional. Crowding specifications for improving result diversity.
            +   * If multiple CrowdingSpecs are specified, crowding will be evaluated on
            +   * each unique combination of the `field` values, and max_count will be the
            +   * maximum value of `max_count` across all CrowdingSpecs.
            +   * For example, if the first CrowdingSpec has `field` = "color" and
            +   * `max_count` = 3, and the second CrowdingSpec has `field` = "size" and
            +   * `max_count` = 2, then after 3 documents that share the same color AND size
            +   * have been returned, subsequent ones should be
            +   * removed or demoted.
            +   * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.CrowdingSpec crowding_specs = 40 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List< + ? extends com.google.cloud.discoveryengine.v1beta.SearchRequest.CrowdingSpecOrBuilder> + getCrowdingSpecsOrBuilderList() { + return crowdingSpecs_; + } + + /** + * + * + *
            +   * Optional. Crowding specifications for improving result diversity.
            +   * If multiple CrowdingSpecs are specified, crowding will be evaluated on
            +   * each unique combination of the `field` values, and max_count will be the
            +   * maximum value of `max_count` across all CrowdingSpecs.
            +   * For example, if the first CrowdingSpec has `field` = "color" and
            +   * `max_count` = 3, and the second CrowdingSpec has `field` = "size" and
            +   * `max_count` = 2, then after 3 documents that share the same color AND size
            +   * have been returned, subsequent ones should be
            +   * removed or demoted.
            +   * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.CrowdingSpec crowding_specs = 40 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public int getCrowdingSpecsCount() { + return crowdingSpecs_.size(); + } + + /** + * + * + *
            +   * Optional. Crowding specifications for improving result diversity.
            +   * If multiple CrowdingSpecs are specified, crowding will be evaluated on
            +   * each unique combination of the `field` values, and max_count will be the
            +   * maximum value of `max_count` across all CrowdingSpecs.
            +   * For example, if the first CrowdingSpec has `field` = "color" and
            +   * `max_count` = 3, and the second CrowdingSpec has `field` = "size" and
            +   * `max_count` = 2, then after 3 documents that share the same color AND size
            +   * have been returned, subsequent ones should be
            +   * removed or demoted.
            +   * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.CrowdingSpec crowding_specs = 40 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.SearchRequest.CrowdingSpec getCrowdingSpecs( + int index) { + return crowdingSpecs_.get(index); + } + + /** + * + * + *
            +   * Optional. Crowding specifications for improving result diversity.
            +   * If multiple CrowdingSpecs are specified, crowding will be evaluated on
            +   * each unique combination of the `field` values, and max_count will be the
            +   * maximum value of `max_count` across all CrowdingSpecs.
            +   * For example, if the first CrowdingSpec has `field` = "color" and
            +   * `max_count` = 3, and the second CrowdingSpec has `field` = "size" and
            +   * `max_count` = 2, then after 3 documents that share the same color AND size
            +   * have been returned, subsequent ones should be
            +   * removed or demoted.
            +   * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.CrowdingSpec crowding_specs = 40 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.SearchRequest.CrowdingSpecOrBuilder + getCrowdingSpecsOrBuilder(int index) { + return crowdingSpecs_.get(index); + } + + public static final int SESSION_FIELD_NUMBER = 41; + + @SuppressWarnings("serial") + private volatile java.lang.Object session_ = ""; + + /** + * + * + *
            +   * The session resource name. Optional.
            +   *
            +   * Session allows users to do multi-turn /search API calls or coordination
            +   * between /search API calls and /answer API calls.
            +   *
            +   * Example #1 (multi-turn /search API calls):
            +   * Call /search API with the session ID generated in the first call.
            +   * Here, the previous search query gets considered in query
            +   * standing. I.e., if the first query is "How did Alphabet do in 2022?"
            +   * and the current query is "How about 2023?", the current query will
            +   * be interpreted as "How did Alphabet do in 2023?".
            +   *
            +   * Example #2 (coordination between /search API calls and /answer API calls):
            +   * Call /answer API with the session ID generated in the first call.
            +   * Here, the answer generation happens in the context of the search
            +   * results from the first search call.
            +   * 
            + * + * string session = 41 [(.google.api.resource_reference) = { ... } + * + * @return The session. + */ + @java.lang.Override + public java.lang.String getSession() { + java.lang.Object ref = session_; + 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(); + session_ = s; + return s; + } + } + + /** + * + * + *
            +   * The session resource name. Optional.
            +   *
            +   * Session allows users to do multi-turn /search API calls or coordination
            +   * between /search API calls and /answer API calls.
            +   *
            +   * Example #1 (multi-turn /search API calls):
            +   * Call /search API with the session ID generated in the first call.
            +   * Here, the previous search query gets considered in query
            +   * standing. I.e., if the first query is "How did Alphabet do in 2022?"
            +   * and the current query is "How about 2023?", the current query will
            +   * be interpreted as "How did Alphabet do in 2023?".
            +   *
            +   * Example #2 (coordination between /search API calls and /answer API calls):
            +   * Call /answer API with the session ID generated in the first call.
            +   * Here, the answer generation happens in the context of the search
            +   * results from the first search call.
            +   * 
            + * + * string session = 41 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for session. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSessionBytes() { + java.lang.Object ref = session_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + session_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SESSION_SPEC_FIELD_NUMBER = 42; + private com.google.cloud.discoveryengine.v1beta.SearchRequest.SessionSpec sessionSpec_; + + /** + * + * + *
            +   * Session specification.
            +   *
            +   * Can be used only when `session` is set.
            +   * 
            + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.SessionSpec session_spec = 42; + * + * @return Whether the sessionSpec field is set. + */ + @java.lang.Override + public boolean hasSessionSpec() { + return ((bitField0_ & 0x00000400) != 0); + } + + /** + * + * + *
            +   * Session specification.
            +   *
            +   * Can be used only when `session` is set.
            +   * 
            + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.SessionSpec session_spec = 42; + * + * @return The sessionSpec. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.SearchRequest.SessionSpec getSessionSpec() { + return sessionSpec_ == null + ? com.google.cloud.discoveryengine.v1beta.SearchRequest.SessionSpec.getDefaultInstance() + : sessionSpec_; + } + + /** + * + * + *
            +   * Session specification.
            +   *
            +   * Can be used only when `session` is set.
            +   * 
            + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.SessionSpec session_spec = 42; + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.SearchRequest.SessionSpecOrBuilder + getSessionSpecOrBuilder() { + return sessionSpec_ == null + ? com.google.cloud.discoveryengine.v1beta.SearchRequest.SessionSpec.getDefaultInstance() + : sessionSpec_; + } + + public static final int RELEVANCE_THRESHOLD_FIELD_NUMBER = 44; + private int relevanceThreshold_ = 0; + + /** + * + * + *
            +   * The global relevance threshold of the search results.
            +   *
            +   * Defaults to Google defined threshold, leveraging a balance of
            +   * precision and recall to deliver both highly accurate results and
            +   * comprehensive coverage of relevant information.
            +   *
            +   * If more granular relevance filtering is required, use the
            +   * `relevance_filter_spec` instead.
            +   *
            +   * This feature is not supported for healthcare search.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceThreshold relevance_threshold = 44; + * + * + * @return The enum numeric value on the wire for relevanceThreshold. + */ + @java.lang.Override + public int getRelevanceThresholdValue() { + return relevanceThreshold_; + } + + /** + * + * + *
            +   * The global relevance threshold of the search results.
            +   *
            +   * Defaults to Google defined threshold, leveraging a balance of
            +   * precision and recall to deliver both highly accurate results and
            +   * comprehensive coverage of relevant information.
            +   *
            +   * If more granular relevance filtering is required, use the
            +   * `relevance_filter_spec` instead.
            +   *
            +   * This feature is not supported for healthcare search.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceThreshold relevance_threshold = 44; + * + * + * @return The relevanceThreshold. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceThreshold + getRelevanceThreshold() { + com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceThreshold result = + com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceThreshold.forNumber( + relevanceThreshold_); + return result == null + ? com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceThreshold.UNRECOGNIZED + : result; + } + + public static final int RELEVANCE_FILTER_SPEC_FIELD_NUMBER = 86; + private com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceFilterSpec + relevanceFilterSpec_; + + /** + * + * + *
            +   * Optional. The granular relevance filtering specification.
            +   *
            +   * If not specified, the global `relevance_threshold` will be used for all
            +   * sub-searches. If specified, this overrides the global
            +   * `relevance_threshold` to use thresholds on a per sub-search basis.
            +   *
            +   * This feature is currently supported only for custom and site search.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceFilterSpec relevance_filter_spec = 86 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the relevanceFilterSpec field is set. + */ + @java.lang.Override + public boolean hasRelevanceFilterSpec() { + return ((bitField0_ & 0x00000800) != 0); + } + + /** + * + * + *
            +   * Optional. The granular relevance filtering specification.
            +   *
            +   * If not specified, the global `relevance_threshold` will be used for all
            +   * sub-searches. If specified, this overrides the global
            +   * `relevance_threshold` to use thresholds on a per sub-search basis.
            +   *
            +   * This feature is currently supported only for custom and site search.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceFilterSpec relevance_filter_spec = 86 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The relevanceFilterSpec. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceFilterSpec + getRelevanceFilterSpec() { + return relevanceFilterSpec_ == null + ? com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceFilterSpec + .getDefaultInstance() + : relevanceFilterSpec_; + } + + /** + * + * + *
            +   * Optional. The granular relevance filtering specification.
            +   *
            +   * If not specified, the global `relevance_threshold` will be used for all
            +   * sub-searches. If specified, this overrides the global
            +   * `relevance_threshold` to use thresholds on a per sub-search basis.
            +   *
            +   * This feature is currently supported only for custom and site search.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceFilterSpec relevance_filter_spec = 86 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceFilterSpecOrBuilder + getRelevanceFilterSpecOrBuilder() { + return relevanceFilterSpec_ == null + ? com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceFilterSpec + .getDefaultInstance() + : relevanceFilterSpec_; + } + + public static final int PERSONALIZATION_SPEC_FIELD_NUMBER = 46; + private com.google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec + personalizationSpec_; + + /** + * + * + *
            +   * The specification for personalization.
            +   *
            +   * Notice that if both
            +   * [ServingConfig.personalization_spec][google.cloud.discoveryengine.v1beta.ServingConfig.personalization_spec]
            +   * and
            +   * [SearchRequest.personalization_spec][google.cloud.discoveryengine.v1beta.SearchRequest.personalization_spec]
            +   * are set,
            +   * [SearchRequest.personalization_spec][google.cloud.discoveryengine.v1beta.SearchRequest.personalization_spec]
            +   * overrides
            +   * [ServingConfig.personalization_spec][google.cloud.discoveryengine.v1beta.ServingConfig.personalization_spec].
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec personalization_spec = 46; + * + * + * @return Whether the personalizationSpec field is set. + */ + @java.lang.Override + public boolean hasPersonalizationSpec() { + return ((bitField0_ & 0x00001000) != 0); + } + + /** + * + * + *
            +   * The specification for personalization.
            +   *
            +   * Notice that if both
            +   * [ServingConfig.personalization_spec][google.cloud.discoveryengine.v1beta.ServingConfig.personalization_spec]
            +   * and
            +   * [SearchRequest.personalization_spec][google.cloud.discoveryengine.v1beta.SearchRequest.personalization_spec]
            +   * are set,
            +   * [SearchRequest.personalization_spec][google.cloud.discoveryengine.v1beta.SearchRequest.personalization_spec]
            +   * overrides
            +   * [ServingConfig.personalization_spec][google.cloud.discoveryengine.v1beta.ServingConfig.personalization_spec].
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec personalization_spec = 46; + * + * + * @return The personalizationSpec. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec + getPersonalizationSpec() { + return personalizationSpec_ == null + ? com.google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec + .getDefaultInstance() + : personalizationSpec_; + } + + /** + * + * + *
            +   * The specification for personalization.
            +   *
            +   * Notice that if both
            +   * [ServingConfig.personalization_spec][google.cloud.discoveryengine.v1beta.ServingConfig.personalization_spec]
            +   * and
            +   * [SearchRequest.personalization_spec][google.cloud.discoveryengine.v1beta.SearchRequest.personalization_spec]
            +   * are set,
            +   * [SearchRequest.personalization_spec][google.cloud.discoveryengine.v1beta.SearchRequest.personalization_spec]
            +   * overrides
            +   * [ServingConfig.personalization_spec][google.cloud.discoveryengine.v1beta.ServingConfig.personalization_spec].
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec personalization_spec = 46; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpecOrBuilder + getPersonalizationSpecOrBuilder() { + return personalizationSpec_ == null + ? com.google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec + .getDefaultInstance() + : personalizationSpec_; + } + + public static final int RELEVANCE_SCORE_SPEC_FIELD_NUMBER = 52; + private com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceScoreSpec + relevanceScoreSpec_; + + /** + * + * + *
            +   * Optional. The specification for returning the relevance score.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceScoreSpec relevance_score_spec = 52 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the relevanceScoreSpec field is set. + */ + @java.lang.Override + public boolean hasRelevanceScoreSpec() { + return ((bitField0_ & 0x00002000) != 0); + } + + /** + * + * + *
            +   * Optional. The specification for returning the relevance score.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceScoreSpec relevance_score_spec = 52 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The relevanceScoreSpec. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceScoreSpec + getRelevanceScoreSpec() { + return relevanceScoreSpec_ == null + ? com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceScoreSpec + .getDefaultInstance() + : relevanceScoreSpec_; + } + + /** + * + * + *
            +   * Optional. The specification for returning the relevance score.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceScoreSpec relevance_score_spec = 52 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceScoreSpecOrBuilder + getRelevanceScoreSpecOrBuilder() { + return relevanceScoreSpec_ == null + ? com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceScoreSpec + .getDefaultInstance() + : relevanceScoreSpec_; + } + + public static final int SEARCH_ADDON_SPEC_FIELD_NUMBER = 62; + private com.google.cloud.discoveryengine.v1beta.SearchRequest.SearchAddonSpec searchAddonSpec_; + + /** + * + * + *
            +   * Optional. SearchAddonSpec is used to disable add-ons for search as per new
            +   * repricing model.
            +   * This field is only supported for search requests.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.SearchAddonSpec search_addon_spec = 62 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the searchAddonSpec field is set. + */ + @java.lang.Override + public boolean hasSearchAddonSpec() { + return ((bitField0_ & 0x00004000) != 0); + } + + /** + * + * + *
            +   * Optional. SearchAddonSpec is used to disable add-ons for search as per new
            +   * repricing model.
            +   * This field is only supported for search requests.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.SearchAddonSpec search_addon_spec = 62 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The searchAddonSpec. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.SearchRequest.SearchAddonSpec + getSearchAddonSpec() { + return searchAddonSpec_ == null + ? com.google.cloud.discoveryengine.v1beta.SearchRequest.SearchAddonSpec.getDefaultInstance() + : searchAddonSpec_; + } + + /** + * + * + *
            +   * Optional. SearchAddonSpec is used to disable add-ons for search as per new
            +   * repricing model.
            +   * This field is only supported for search requests.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.SearchAddonSpec search_addon_spec = 62 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.SearchRequest.SearchAddonSpecOrBuilder + getSearchAddonSpecOrBuilder() { + return searchAddonSpec_ == null + ? com.google.cloud.discoveryengine.v1beta.SearchRequest.SearchAddonSpec.getDefaultInstance() + : searchAddonSpec_; + } + + public static final int CUSTOM_RANKING_PARAMS_FIELD_NUMBER = 64; + private com.google.cloud.discoveryengine.v1beta.SearchRequest.CustomRankingParams + customRankingParams_; + + /** + * + * + *
            +   * Optional. Optional configuration for the Custom Ranking feature.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.CustomRankingParams custom_ranking_params = 64 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the customRankingParams field is set. + */ + @java.lang.Override + public boolean hasCustomRankingParams() { + return ((bitField0_ & 0x00008000) != 0); + } + + /** + * + * + *
            +   * Optional. Optional configuration for the Custom Ranking feature.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.CustomRankingParams custom_ranking_params = 64 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The customRankingParams. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.SearchRequest.CustomRankingParams + getCustomRankingParams() { + return customRankingParams_ == null + ? com.google.cloud.discoveryengine.v1beta.SearchRequest.CustomRankingParams + .getDefaultInstance() + : customRankingParams_; + } + + /** + * + * + *
            +   * Optional. Optional configuration for the Custom Ranking feature.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.CustomRankingParams custom_ranking_params = 64 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.SearchRequest.CustomRankingParamsOrBuilder + getCustomRankingParamsOrBuilder() { + return customRankingParams_ == null + ? com.google.cloud.discoveryengine.v1beta.SearchRequest.CustomRankingParams + .getDefaultInstance() + : customRankingParams_; + } + + public static final int ENTITY_FIELD_NUMBER = 66; + + @SuppressWarnings("serial") + private volatile java.lang.Object entity_ = ""; + + /** + * + * + *
            +   * Optional. The entity for customers that may run multiple different
            +   * entities, domains, sites or regions, for example, "Google US", "Google
            +   * Ads", "Waymo", "google.com", "youtube.com", etc. If this is set, it should
            +   * be exactly matched with
            +   * [UserEvent.entity][google.cloud.discoveryengine.v1beta.UserEvent.entity] to
            +   * get search results boosted by entity.
            +   * 
            + * + * string entity = 66 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The entity. + */ + @java.lang.Override + public java.lang.String getEntity() { + java.lang.Object ref = entity_; + 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(); + entity_ = s; + return s; + } + } + + /** + * + * + *
            +   * Optional. The entity for customers that may run multiple different
            +   * entities, domains, sites or regions, for example, "Google US", "Google
            +   * Ads", "Waymo", "google.com", "youtube.com", etc. If this is set, it should
            +   * be exactly matched with
            +   * [UserEvent.entity][google.cloud.discoveryengine.v1beta.UserEvent.entity] to
            +   * get search results boosted by entity.
            +   * 
            + * + * string entity = 66 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for entity. + */ + @java.lang.Override + public com.google.protobuf.ByteString getEntityBytes() { + java.lang.Object ref = entity_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + entity_ = 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 { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(servingConfig_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, servingConfig_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(branch_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, branch_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(query_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, query_); + } + if (pageSize_ != 0) { + output.writeInt32(4, pageSize_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 5, pageToken_); + } + if (offset_ != 0) { + output.writeInt32(6, offset_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(filter_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 7, filter_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(orderBy_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 8, orderBy_); + } + for (int i = 0; i < facetSpecs_.size(); i++) { + output.writeMessage(9, facetSpecs_.get(i)); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeMessage(10, getBoostSpec()); + } + com.google.protobuf.GeneratedMessage.serializeStringMapTo( + output, internalGetParams(), ParamsDefaultEntryHolder.defaultEntry, 11); + if (((bitField0_ & 0x00000008) != 0)) { + output.writeMessage(13, getQueryExpansionSpec()); + } + if (((bitField0_ & 0x00000010) != 0)) { + output.writeMessage(14, getSpellCorrectionSpec()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(userPseudoId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 15, userPseudoId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(19, getImageQuery()); + } + if (safeSearch_ != false) { + output.writeBool(20, safeSearch_); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(21, getUserInfo()); + } + com.google.protobuf.GeneratedMessage.serializeStringMapTo( + output, internalGetUserLabels(), UserLabelsDefaultEntryHolder.defaultEntry, 22); + if (((bitField0_ & 0x00000040) != 0)) { + output.writeMessage(23, getEmbeddingSpec()); + } + if (((bitField0_ & 0x00000020) != 0)) { + output.writeMessage(24, getContentSearchSpec()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(rankingExpression_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 26, rankingExpression_); + } + if (((bitField0_ & 0x00000080) != 0)) { + output.writeMessage(28, getNaturalLanguageQueryUnderstandingSpec()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(canonicalFilter_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 29, canonicalFilter_); + } + if (((bitField0_ & 0x00000100) != 0)) { + output.writeMessage(31, getSearchAsYouTypeSpec()); + } + for (int i = 0; i < dataStoreSpecs_.size(); i++) { + output.writeMessage(32, dataStoreSpecs_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(languageCode_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 35, languageCode_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(regionCode_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 36, regionCode_); + } + if (((bitField0_ & 0x00000200) != 0)) { + output.writeMessage(38, getDisplaySpec()); + } + for (int i = 0; i < crowdingSpecs_.size(); i++) { + output.writeMessage(40, crowdingSpecs_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(session_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 41, session_); + } + if (((bitField0_ & 0x00000400) != 0)) { + output.writeMessage(42, getSessionSpec()); + } + if (relevanceThreshold_ + != com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceThreshold + .RELEVANCE_THRESHOLD_UNSPECIFIED + .getNumber()) { + output.writeEnum(44, relevanceThreshold_); + } + if (((bitField0_ & 0x00001000) != 0)) { + output.writeMessage(46, getPersonalizationSpec()); + } + if (oneBoxPageSize_ != 0) { + output.writeInt32(47, oneBoxPageSize_); + } + if (((bitField0_ & 0x00002000) != 0)) { + output.writeMessage(52, getRelevanceScoreSpec()); + } + if (rankingExpressionBackend_ + != com.google.cloud.discoveryengine.v1beta.SearchRequest.RankingExpressionBackend + .RANKING_EXPRESSION_BACKEND_UNSPECIFIED + .getNumber()) { + output.writeEnum(53, rankingExpressionBackend_); + } + if (((bitField0_ & 0x00004000) != 0)) { + output.writeMessage(62, getSearchAddonSpec()); + } + for (int i = 0; i < pageCategories_.size(); i++) { + com.google.protobuf.GeneratedMessage.writeString(output, 63, pageCategories_.getRaw(i)); + } + if (((bitField0_ & 0x00008000) != 0)) { + output.writeMessage(64, getCustomRankingParams()); + } + if (numResultsPerDataStore_ != 0) { + output.writeInt32(65, numResultsPerDataStore_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(entity_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 66, entity_); + } + if (((bitField0_ & 0x00000800) != 0)) { + output.writeMessage(86, getRelevanceFilterSpec()); + } + 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(servingConfig_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, servingConfig_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(branch_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, branch_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(query_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, query_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(4, pageSize_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(5, pageToken_); + } + if (offset_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(6, offset_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(filter_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(7, filter_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(orderBy_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(8, orderBy_); + } + for (int i = 0; i < facetSpecs_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(9, facetSpecs_.get(i)); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(10, getBoostSpec()); + } + for (java.util.Map.Entry entry : + internalGetParams().getMap().entrySet()) { + com.google.protobuf.MapEntry params__ = + ParamsDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(11, params__); + } + if (((bitField0_ & 0x00000008) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(13, getQueryExpansionSpec()); + } + if (((bitField0_ & 0x00000010) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(14, getSpellCorrectionSpec()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(userPseudoId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(15, userPseudoId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(19, getImageQuery()); + } + if (safeSearch_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(20, safeSearch_); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(21, getUserInfo()); + } + for (java.util.Map.Entry entry : + internalGetUserLabels().getMap().entrySet()) { + com.google.protobuf.MapEntry userLabels__ = + UserLabelsDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(22, userLabels__); + } + if (((bitField0_ & 0x00000040) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(23, getEmbeddingSpec()); + } + if (((bitField0_ & 0x00000020) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(24, getContentSearchSpec()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(rankingExpression_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(26, rankingExpression_); + } + if (((bitField0_ & 0x00000080) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 28, getNaturalLanguageQueryUnderstandingSpec()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(canonicalFilter_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(29, canonicalFilter_); + } + if (((bitField0_ & 0x00000100) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(31, getSearchAsYouTypeSpec()); + } + for (int i = 0; i < dataStoreSpecs_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(32, dataStoreSpecs_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(languageCode_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(35, languageCode_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(regionCode_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(36, regionCode_); + } + if (((bitField0_ & 0x00000200) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(38, getDisplaySpec()); + } + for (int i = 0; i < crowdingSpecs_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(40, crowdingSpecs_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(session_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(41, session_); + } + if (((bitField0_ & 0x00000400) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(42, getSessionSpec()); + } + if (relevanceThreshold_ + != com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceThreshold + .RELEVANCE_THRESHOLD_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(44, relevanceThreshold_); + } + if (((bitField0_ & 0x00001000) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(46, getPersonalizationSpec()); + } + if (oneBoxPageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(47, oneBoxPageSize_); + } + if (((bitField0_ & 0x00002000) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(52, getRelevanceScoreSpec()); + } + if (rankingExpressionBackend_ + != com.google.cloud.discoveryengine.v1beta.SearchRequest.RankingExpressionBackend + .RANKING_EXPRESSION_BACKEND_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(53, rankingExpressionBackend_); + } + if (((bitField0_ & 0x00004000) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(62, getSearchAddonSpec()); + } + { + int dataSize = 0; + for (int i = 0; i < pageCategories_.size(); i++) { + dataSize += computeStringSizeNoTag(pageCategories_.getRaw(i)); + } + size += dataSize; + size += 2 * getPageCategoriesList().size(); + } + if (((bitField0_ & 0x00008000) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(64, getCustomRankingParams()); + } + if (numResultsPerDataStore_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(65, numResultsPerDataStore_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(entity_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(66, entity_); + } + if (((bitField0_ & 0x00000800) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(86, getRelevanceFilterSpec()); + } + 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.discoveryengine.v1beta.SearchRequest)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1beta.SearchRequest other = + (com.google.cloud.discoveryengine.v1beta.SearchRequest) obj; + + if (!getServingConfig().equals(other.getServingConfig())) return false; + if (!getBranch().equals(other.getBranch())) return false; + if (!getQuery().equals(other.getQuery())) return false; + if (!getPageCategoriesList().equals(other.getPageCategoriesList())) return false; + if (hasImageQuery() != other.hasImageQuery()) return false; + if (hasImageQuery()) { + if (!getImageQuery().equals(other.getImageQuery())) return false; + } + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (getOffset() != other.getOffset()) return false; + if (getOneBoxPageSize() != other.getOneBoxPageSize()) return false; + if (!getDataStoreSpecsList().equals(other.getDataStoreSpecsList())) return false; + if (getNumResultsPerDataStore() != other.getNumResultsPerDataStore()) return false; + if (!getFilter().equals(other.getFilter())) return false; + if (!getCanonicalFilter().equals(other.getCanonicalFilter())) return false; + if (!getOrderBy().equals(other.getOrderBy())) return false; + if (hasUserInfo() != other.hasUserInfo()) return false; + if (hasUserInfo()) { + if (!getUserInfo().equals(other.getUserInfo())) return false; + } + if (!getLanguageCode().equals(other.getLanguageCode())) return false; + if (!getRegionCode().equals(other.getRegionCode())) return false; + if (!getFacetSpecsList().equals(other.getFacetSpecsList())) return false; + if (hasBoostSpec() != other.hasBoostSpec()) return false; + if (hasBoostSpec()) { + if (!getBoostSpec().equals(other.getBoostSpec())) return false; + } + if (!internalGetParams().equals(other.internalGetParams())) return false; + if (hasQueryExpansionSpec() != other.hasQueryExpansionSpec()) return false; + if (hasQueryExpansionSpec()) { + if (!getQueryExpansionSpec().equals(other.getQueryExpansionSpec())) return false; + } + if (hasSpellCorrectionSpec() != other.hasSpellCorrectionSpec()) return false; + if (hasSpellCorrectionSpec()) { + if (!getSpellCorrectionSpec().equals(other.getSpellCorrectionSpec())) return false; + } + if (!getUserPseudoId().equals(other.getUserPseudoId())) return false; + if (hasContentSearchSpec() != other.hasContentSearchSpec()) return false; + if (hasContentSearchSpec()) { + if (!getContentSearchSpec().equals(other.getContentSearchSpec())) return false; + } + if (hasEmbeddingSpec() != other.hasEmbeddingSpec()) return false; + if (hasEmbeddingSpec()) { + if (!getEmbeddingSpec().equals(other.getEmbeddingSpec())) return false; + } + if (!getRankingExpression().equals(other.getRankingExpression())) return false; + if (rankingExpressionBackend_ != other.rankingExpressionBackend_) return false; + if (getSafeSearch() != other.getSafeSearch()) return false; + if (!internalGetUserLabels().equals(other.internalGetUserLabels())) return false; + if (hasNaturalLanguageQueryUnderstandingSpec() + != other.hasNaturalLanguageQueryUnderstandingSpec()) return false; + if (hasNaturalLanguageQueryUnderstandingSpec()) { + if (!getNaturalLanguageQueryUnderstandingSpec() + .equals(other.getNaturalLanguageQueryUnderstandingSpec())) return false; + } + if (hasSearchAsYouTypeSpec() != other.hasSearchAsYouTypeSpec()) return false; + if (hasSearchAsYouTypeSpec()) { + if (!getSearchAsYouTypeSpec().equals(other.getSearchAsYouTypeSpec())) return false; + } + if (hasDisplaySpec() != other.hasDisplaySpec()) return false; + if (hasDisplaySpec()) { + if (!getDisplaySpec().equals(other.getDisplaySpec())) return false; + } + if (!getCrowdingSpecsList().equals(other.getCrowdingSpecsList())) return false; + if (!getSession().equals(other.getSession())) return false; + if (hasSessionSpec() != other.hasSessionSpec()) return false; + if (hasSessionSpec()) { + if (!getSessionSpec().equals(other.getSessionSpec())) return false; + } + if (relevanceThreshold_ != other.relevanceThreshold_) return false; + if (hasRelevanceFilterSpec() != other.hasRelevanceFilterSpec()) return false; + if (hasRelevanceFilterSpec()) { + if (!getRelevanceFilterSpec().equals(other.getRelevanceFilterSpec())) return false; + } + if (hasPersonalizationSpec() != other.hasPersonalizationSpec()) return false; + if (hasPersonalizationSpec()) { + if (!getPersonalizationSpec().equals(other.getPersonalizationSpec())) return false; + } + if (hasRelevanceScoreSpec() != other.hasRelevanceScoreSpec()) return false; + if (hasRelevanceScoreSpec()) { + if (!getRelevanceScoreSpec().equals(other.getRelevanceScoreSpec())) return false; + } + if (hasSearchAddonSpec() != other.hasSearchAddonSpec()) return false; + if (hasSearchAddonSpec()) { + if (!getSearchAddonSpec().equals(other.getSearchAddonSpec())) return false; + } + if (hasCustomRankingParams() != other.hasCustomRankingParams()) return false; + if (hasCustomRankingParams()) { + if (!getCustomRankingParams().equals(other.getCustomRankingParams())) return false; + } + if (!getEntity().equals(other.getEntity())) 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) + SERVING_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getServingConfig().hashCode(); + hash = (37 * hash) + BRANCH_FIELD_NUMBER; + hash = (53 * hash) + getBranch().hashCode(); + hash = (37 * hash) + QUERY_FIELD_NUMBER; + hash = (53 * hash) + getQuery().hashCode(); + if (getPageCategoriesCount() > 0) { + hash = (37 * hash) + PAGE_CATEGORIES_FIELD_NUMBER; + hash = (53 * hash) + getPageCategoriesList().hashCode(); + } + if (hasImageQuery()) { + hash = (37 * hash) + IMAGE_QUERY_FIELD_NUMBER; + hash = (53 * hash) + getImageQuery().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) + OFFSET_FIELD_NUMBER; + hash = (53 * hash) + getOffset(); + hash = (37 * hash) + ONE_BOX_PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getOneBoxPageSize(); + if (getDataStoreSpecsCount() > 0) { + hash = (37 * hash) + DATA_STORE_SPECS_FIELD_NUMBER; + hash = (53 * hash) + getDataStoreSpecsList().hashCode(); + } + hash = (37 * hash) + NUM_RESULTS_PER_DATA_STORE_FIELD_NUMBER; + hash = (53 * hash) + getNumResultsPerDataStore(); + hash = (37 * hash) + FILTER_FIELD_NUMBER; + hash = (53 * hash) + getFilter().hashCode(); + hash = (37 * hash) + CANONICAL_FILTER_FIELD_NUMBER; + hash = (53 * hash) + getCanonicalFilter().hashCode(); + hash = (37 * hash) + ORDER_BY_FIELD_NUMBER; + hash = (53 * hash) + getOrderBy().hashCode(); + if (hasUserInfo()) { + hash = (37 * hash) + USER_INFO_FIELD_NUMBER; + hash = (53 * hash) + getUserInfo().hashCode(); + } + hash = (37 * hash) + LANGUAGE_CODE_FIELD_NUMBER; + hash = (53 * hash) + getLanguageCode().hashCode(); + hash = (37 * hash) + REGION_CODE_FIELD_NUMBER; + hash = (53 * hash) + getRegionCode().hashCode(); + if (getFacetSpecsCount() > 0) { + hash = (37 * hash) + FACET_SPECS_FIELD_NUMBER; + hash = (53 * hash) + getFacetSpecsList().hashCode(); + } + if (hasBoostSpec()) { + hash = (37 * hash) + BOOST_SPEC_FIELD_NUMBER; + hash = (53 * hash) + getBoostSpec().hashCode(); } - if (safeSearch_ != false) { - output.writeBool(20, safeSearch_); + if (!internalGetParams().getMap().isEmpty()) { + hash = (37 * hash) + PARAMS_FIELD_NUMBER; + hash = (53 * hash) + internalGetParams().hashCode(); } - if (((bitField0_ & 0x00000002) != 0)) { - output.writeMessage(21, getUserInfo()); + if (hasQueryExpansionSpec()) { + hash = (37 * hash) + QUERY_EXPANSION_SPEC_FIELD_NUMBER; + hash = (53 * hash) + getQueryExpansionSpec().hashCode(); } - com.google.protobuf.GeneratedMessage.serializeStringMapTo( - output, internalGetUserLabels(), UserLabelsDefaultEntryHolder.defaultEntry, 22); - if (((bitField0_ & 0x00000040) != 0)) { - output.writeMessage(23, getEmbeddingSpec()); + if (hasSpellCorrectionSpec()) { + hash = (37 * hash) + SPELL_CORRECTION_SPEC_FIELD_NUMBER; + hash = (53 * hash) + getSpellCorrectionSpec().hashCode(); } - if (((bitField0_ & 0x00000020) != 0)) { - output.writeMessage(24, getContentSearchSpec()); + hash = (37 * hash) + USER_PSEUDO_ID_FIELD_NUMBER; + hash = (53 * hash) + getUserPseudoId().hashCode(); + if (hasContentSearchSpec()) { + hash = (37 * hash) + CONTENT_SEARCH_SPEC_FIELD_NUMBER; + hash = (53 * hash) + getContentSearchSpec().hashCode(); } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(rankingExpression_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 26, rankingExpression_); + if (hasEmbeddingSpec()) { + hash = (37 * hash) + EMBEDDING_SPEC_FIELD_NUMBER; + hash = (53 * hash) + getEmbeddingSpec().hashCode(); } - if (((bitField0_ & 0x00000080) != 0)) { - output.writeMessage(28, getNaturalLanguageQueryUnderstandingSpec()); + hash = (37 * hash) + RANKING_EXPRESSION_FIELD_NUMBER; + hash = (53 * hash) + getRankingExpression().hashCode(); + hash = (37 * hash) + RANKING_EXPRESSION_BACKEND_FIELD_NUMBER; + hash = (53 * hash) + rankingExpressionBackend_; + hash = (37 * hash) + SAFE_SEARCH_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getSafeSearch()); + if (!internalGetUserLabels().getMap().isEmpty()) { + hash = (37 * hash) + USER_LABELS_FIELD_NUMBER; + hash = (53 * hash) + internalGetUserLabels().hashCode(); } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(canonicalFilter_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 29, canonicalFilter_); + if (hasNaturalLanguageQueryUnderstandingSpec()) { + hash = (37 * hash) + NATURAL_LANGUAGE_QUERY_UNDERSTANDING_SPEC_FIELD_NUMBER; + hash = (53 * hash) + getNaturalLanguageQueryUnderstandingSpec().hashCode(); } - if (((bitField0_ & 0x00000100) != 0)) { - output.writeMessage(31, getSearchAsYouTypeSpec()); + if (hasSearchAsYouTypeSpec()) { + hash = (37 * hash) + SEARCH_AS_YOU_TYPE_SPEC_FIELD_NUMBER; + hash = (53 * hash) + getSearchAsYouTypeSpec().hashCode(); } - for (int i = 0; i < dataStoreSpecs_.size(); i++) { - output.writeMessage(32, dataStoreSpecs_.get(i)); + if (hasDisplaySpec()) { + hash = (37 * hash) + DISPLAY_SPEC_FIELD_NUMBER; + hash = (53 * hash) + getDisplaySpec().hashCode(); } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(languageCode_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 35, languageCode_); + if (getCrowdingSpecsCount() > 0) { + hash = (37 * hash) + CROWDING_SPECS_FIELD_NUMBER; + hash = (53 * hash) + getCrowdingSpecsList().hashCode(); } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(regionCode_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 36, regionCode_); + hash = (37 * hash) + SESSION_FIELD_NUMBER; + hash = (53 * hash) + getSession().hashCode(); + if (hasSessionSpec()) { + hash = (37 * hash) + SESSION_SPEC_FIELD_NUMBER; + hash = (53 * hash) + getSessionSpec().hashCode(); } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(session_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 41, session_); + hash = (37 * hash) + RELEVANCE_THRESHOLD_FIELD_NUMBER; + hash = (53 * hash) + relevanceThreshold_; + if (hasRelevanceFilterSpec()) { + hash = (37 * hash) + RELEVANCE_FILTER_SPEC_FIELD_NUMBER; + hash = (53 * hash) + getRelevanceFilterSpec().hashCode(); + } + if (hasPersonalizationSpec()) { + hash = (37 * hash) + PERSONALIZATION_SPEC_FIELD_NUMBER; + hash = (53 * hash) + getPersonalizationSpec().hashCode(); + } + if (hasRelevanceScoreSpec()) { + hash = (37 * hash) + RELEVANCE_SCORE_SPEC_FIELD_NUMBER; + hash = (53 * hash) + getRelevanceScoreSpec().hashCode(); + } + if (hasSearchAddonSpec()) { + hash = (37 * hash) + SEARCH_ADDON_SPEC_FIELD_NUMBER; + hash = (53 * hash) + getSearchAddonSpec().hashCode(); + } + if (hasCustomRankingParams()) { + hash = (37 * hash) + CUSTOM_RANKING_PARAMS_FIELD_NUMBER; + hash = (53 * hash) + getCustomRankingParams().hashCode(); + } + hash = (37 * hash) + ENTITY_FIELD_NUMBER; + hash = (53 * hash) + getEntity().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1beta.SearchRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.SearchRequest 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.discoveryengine.v1beta.SearchRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.SearchRequest 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.discoveryengine.v1beta.SearchRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.SearchRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1beta.SearchRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.SearchRequest 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.discoveryengine.v1beta.SearchRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.SearchRequest 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.discoveryengine.v1beta.SearchRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.SearchRequest 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.discoveryengine.v1beta.SearchRequest 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
            +   * [SearchService.Search][google.cloud.discoveryengine.v1beta.SearchService.Search]
            +   * method.
            +   * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.SearchRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.SearchRequest) + com.google.cloud.discoveryengine.v1beta.SearchRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 11: + return internalGetParams(); + case 22: + return internalGetUserLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( + int number) { + switch (number) { + case 11: + return internalGetMutableParams(); + case 22: + return internalGetMutableUserLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.SearchRequest.class, + com.google.cloud.discoveryengine.v1beta.SearchRequest.Builder.class); + } + + // Construct using com.google.cloud.discoveryengine.v1beta.SearchRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetImageQueryFieldBuilder(); + internalGetDataStoreSpecsFieldBuilder(); + internalGetUserInfoFieldBuilder(); + internalGetFacetSpecsFieldBuilder(); + internalGetBoostSpecFieldBuilder(); + internalGetQueryExpansionSpecFieldBuilder(); + internalGetSpellCorrectionSpecFieldBuilder(); + internalGetContentSearchSpecFieldBuilder(); + internalGetEmbeddingSpecFieldBuilder(); + internalGetNaturalLanguageQueryUnderstandingSpecFieldBuilder(); + internalGetSearchAsYouTypeSpecFieldBuilder(); + internalGetDisplaySpecFieldBuilder(); + internalGetCrowdingSpecsFieldBuilder(); + internalGetSessionSpecFieldBuilder(); + internalGetRelevanceFilterSpecFieldBuilder(); + internalGetPersonalizationSpecFieldBuilder(); + internalGetRelevanceScoreSpecFieldBuilder(); + internalGetSearchAddonSpecFieldBuilder(); + internalGetCustomRankingParamsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + bitField1_ = 0; + servingConfig_ = ""; + branch_ = ""; + query_ = ""; + pageCategories_ = com.google.protobuf.LazyStringArrayList.emptyList(); + imageQuery_ = null; + if (imageQueryBuilder_ != null) { + imageQueryBuilder_.dispose(); + imageQueryBuilder_ = null; + } + pageSize_ = 0; + pageToken_ = ""; + offset_ = 0; + oneBoxPageSize_ = 0; + if (dataStoreSpecsBuilder_ == null) { + dataStoreSpecs_ = java.util.Collections.emptyList(); + } else { + dataStoreSpecs_ = null; + dataStoreSpecsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000200); + numResultsPerDataStore_ = 0; + filter_ = ""; + canonicalFilter_ = ""; + orderBy_ = ""; + userInfo_ = null; + if (userInfoBuilder_ != null) { + userInfoBuilder_.dispose(); + userInfoBuilder_ = null; + } + languageCode_ = ""; + regionCode_ = ""; + if (facetSpecsBuilder_ == null) { + facetSpecs_ = java.util.Collections.emptyList(); + } else { + facetSpecs_ = null; + facetSpecsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00020000); + boostSpec_ = null; + if (boostSpecBuilder_ != null) { + boostSpecBuilder_.dispose(); + boostSpecBuilder_ = null; + } + internalGetMutableParams().clear(); + queryExpansionSpec_ = null; + if (queryExpansionSpecBuilder_ != null) { + queryExpansionSpecBuilder_.dispose(); + queryExpansionSpecBuilder_ = null; + } + spellCorrectionSpec_ = null; + if (spellCorrectionSpecBuilder_ != null) { + spellCorrectionSpecBuilder_.dispose(); + spellCorrectionSpecBuilder_ = null; + } + userPseudoId_ = ""; + contentSearchSpec_ = null; + if (contentSearchSpecBuilder_ != null) { + contentSearchSpecBuilder_.dispose(); + contentSearchSpecBuilder_ = null; + } + embeddingSpec_ = null; + if (embeddingSpecBuilder_ != null) { + embeddingSpecBuilder_.dispose(); + embeddingSpecBuilder_ = null; + } + rankingExpression_ = ""; + rankingExpressionBackend_ = 0; + safeSearch_ = false; + internalGetMutableUserLabels().clear(); + naturalLanguageQueryUnderstandingSpec_ = null; + if (naturalLanguageQueryUnderstandingSpecBuilder_ != null) { + naturalLanguageQueryUnderstandingSpecBuilder_.dispose(); + naturalLanguageQueryUnderstandingSpecBuilder_ = null; + } + searchAsYouTypeSpec_ = null; + if (searchAsYouTypeSpecBuilder_ != null) { + searchAsYouTypeSpecBuilder_.dispose(); + searchAsYouTypeSpecBuilder_ = null; + } + displaySpec_ = null; + if (displaySpecBuilder_ != null) { + displaySpecBuilder_.dispose(); + displaySpecBuilder_ = null; + } + if (crowdingSpecsBuilder_ == null) { + crowdingSpecs_ = java.util.Collections.emptyList(); + } else { + crowdingSpecs_ = null; + crowdingSpecsBuilder_.clear(); + } + bitField1_ = (bitField1_ & ~0x00000001); + session_ = ""; + sessionSpec_ = null; + if (sessionSpecBuilder_ != null) { + sessionSpecBuilder_.dispose(); + sessionSpecBuilder_ = null; + } + relevanceThreshold_ = 0; + relevanceFilterSpec_ = null; + if (relevanceFilterSpecBuilder_ != null) { + relevanceFilterSpecBuilder_.dispose(); + relevanceFilterSpecBuilder_ = null; + } + personalizationSpec_ = null; + if (personalizationSpecBuilder_ != null) { + personalizationSpecBuilder_.dispose(); + personalizationSpecBuilder_ = null; + } + relevanceScoreSpec_ = null; + if (relevanceScoreSpecBuilder_ != null) { + relevanceScoreSpecBuilder_.dispose(); + relevanceScoreSpecBuilder_ = null; + } + searchAddonSpec_ = null; + if (searchAddonSpecBuilder_ != null) { + searchAddonSpecBuilder_.dispose(); + searchAddonSpecBuilder_ = null; + } + customRankingParams_ = null; + if (customRankingParamsBuilder_ != null) { + customRankingParamsBuilder_.dispose(); + customRankingParamsBuilder_ = null; + } + entity_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1beta.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.SearchRequest getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1beta.SearchRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.SearchRequest build() { + com.google.cloud.discoveryengine.v1beta.SearchRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.SearchRequest buildPartial() { + com.google.cloud.discoveryengine.v1beta.SearchRequest result = + new com.google.cloud.discoveryengine.v1beta.SearchRequest(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + if (bitField1_ != 0) { + buildPartial1(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.discoveryengine.v1beta.SearchRequest result) { + if (dataStoreSpecsBuilder_ == null) { + if (((bitField0_ & 0x00000200) != 0)) { + dataStoreSpecs_ = java.util.Collections.unmodifiableList(dataStoreSpecs_); + bitField0_ = (bitField0_ & ~0x00000200); + } + result.dataStoreSpecs_ = dataStoreSpecs_; + } else { + result.dataStoreSpecs_ = dataStoreSpecsBuilder_.build(); + } + if (facetSpecsBuilder_ == null) { + if (((bitField0_ & 0x00020000) != 0)) { + facetSpecs_ = java.util.Collections.unmodifiableList(facetSpecs_); + bitField0_ = (bitField0_ & ~0x00020000); + } + result.facetSpecs_ = facetSpecs_; + } else { + result.facetSpecs_ = facetSpecsBuilder_.build(); + } + if (crowdingSpecsBuilder_ == null) { + if (((bitField1_ & 0x00000001) != 0)) { + crowdingSpecs_ = java.util.Collections.unmodifiableList(crowdingSpecs_); + bitField1_ = (bitField1_ & ~0x00000001); + } + result.crowdingSpecs_ = crowdingSpecs_; + } else { + result.crowdingSpecs_ = crowdingSpecsBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.discoveryengine.v1beta.SearchRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.servingConfig_ = servingConfig_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.branch_ = branch_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.query_ = query_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + pageCategories_.makeImmutable(); + result.pageCategories_ = pageCategories_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000010) != 0)) { + result.imageQuery_ = imageQueryBuilder_ == null ? imageQuery_ : imageQueryBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.pageSize_ = pageSize_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.pageToken_ = pageToken_; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.offset_ = offset_; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.oneBoxPageSize_ = oneBoxPageSize_; + } + if (((from_bitField0_ & 0x00000400) != 0)) { + result.numResultsPerDataStore_ = numResultsPerDataStore_; + } + if (((from_bitField0_ & 0x00000800) != 0)) { + result.filter_ = filter_; + } + if (((from_bitField0_ & 0x00001000) != 0)) { + result.canonicalFilter_ = canonicalFilter_; + } + if (((from_bitField0_ & 0x00002000) != 0)) { + result.orderBy_ = orderBy_; + } + if (((from_bitField0_ & 0x00004000) != 0)) { + result.userInfo_ = userInfoBuilder_ == null ? userInfo_ : userInfoBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00008000) != 0)) { + result.languageCode_ = languageCode_; + } + if (((from_bitField0_ & 0x00010000) != 0)) { + result.regionCode_ = regionCode_; + } + if (((from_bitField0_ & 0x00040000) != 0)) { + result.boostSpec_ = boostSpecBuilder_ == null ? boostSpec_ : boostSpecBuilder_.build(); + to_bitField0_ |= 0x00000004; + } + if (((from_bitField0_ & 0x00080000) != 0)) { + result.params_ = internalGetParams().build(ParamsDefaultEntryHolder.defaultEntry); + } + if (((from_bitField0_ & 0x00100000) != 0)) { + result.queryExpansionSpec_ = + queryExpansionSpecBuilder_ == null + ? queryExpansionSpec_ + : queryExpansionSpecBuilder_.build(); + to_bitField0_ |= 0x00000008; + } + if (((from_bitField0_ & 0x00200000) != 0)) { + result.spellCorrectionSpec_ = + spellCorrectionSpecBuilder_ == null + ? spellCorrectionSpec_ + : spellCorrectionSpecBuilder_.build(); + to_bitField0_ |= 0x00000010; + } + if (((from_bitField0_ & 0x00400000) != 0)) { + result.userPseudoId_ = userPseudoId_; + } + if (((from_bitField0_ & 0x00800000) != 0)) { + result.contentSearchSpec_ = + contentSearchSpecBuilder_ == null + ? contentSearchSpec_ + : contentSearchSpecBuilder_.build(); + to_bitField0_ |= 0x00000020; + } + if (((from_bitField0_ & 0x01000000) != 0)) { + result.embeddingSpec_ = + embeddingSpecBuilder_ == null ? embeddingSpec_ : embeddingSpecBuilder_.build(); + to_bitField0_ |= 0x00000040; + } + if (((from_bitField0_ & 0x02000000) != 0)) { + result.rankingExpression_ = rankingExpression_; + } + if (((from_bitField0_ & 0x04000000) != 0)) { + result.rankingExpressionBackend_ = rankingExpressionBackend_; + } + if (((from_bitField0_ & 0x08000000) != 0)) { + result.safeSearch_ = safeSearch_; + } + if (((from_bitField0_ & 0x10000000) != 0)) { + result.userLabels_ = internalGetUserLabels(); + result.userLabels_.makeImmutable(); + } + if (((from_bitField0_ & 0x20000000) != 0)) { + result.naturalLanguageQueryUnderstandingSpec_ = + naturalLanguageQueryUnderstandingSpecBuilder_ == null + ? naturalLanguageQueryUnderstandingSpec_ + : naturalLanguageQueryUnderstandingSpecBuilder_.build(); + to_bitField0_ |= 0x00000080; + } + if (((from_bitField0_ & 0x40000000) != 0)) { + result.searchAsYouTypeSpec_ = + searchAsYouTypeSpecBuilder_ == null + ? searchAsYouTypeSpec_ + : searchAsYouTypeSpecBuilder_.build(); + to_bitField0_ |= 0x00000100; + } + if (((from_bitField0_ & 0x80000000) != 0)) { + result.displaySpec_ = + displaySpecBuilder_ == null ? displaySpec_ : displaySpecBuilder_.build(); + to_bitField0_ |= 0x00000200; + } + result.bitField0_ |= to_bitField0_; } - if (((bitField0_ & 0x00000200) != 0)) { - output.writeMessage(42, getSessionSpec()); + + private void buildPartial1(com.google.cloud.discoveryengine.v1beta.SearchRequest result) { + int from_bitField1_ = bitField1_; + if (((from_bitField1_ & 0x00000002) != 0)) { + result.session_ = session_; + } + int to_bitField0_ = 0; + if (((from_bitField1_ & 0x00000004) != 0)) { + result.sessionSpec_ = + sessionSpecBuilder_ == null ? sessionSpec_ : sessionSpecBuilder_.build(); + to_bitField0_ |= 0x00000400; + } + if (((from_bitField1_ & 0x00000008) != 0)) { + result.relevanceThreshold_ = relevanceThreshold_; + } + if (((from_bitField1_ & 0x00000010) != 0)) { + result.relevanceFilterSpec_ = + relevanceFilterSpecBuilder_ == null + ? relevanceFilterSpec_ + : relevanceFilterSpecBuilder_.build(); + to_bitField0_ |= 0x00000800; + } + if (((from_bitField1_ & 0x00000020) != 0)) { + result.personalizationSpec_ = + personalizationSpecBuilder_ == null + ? personalizationSpec_ + : personalizationSpecBuilder_.build(); + to_bitField0_ |= 0x00001000; + } + if (((from_bitField1_ & 0x00000040) != 0)) { + result.relevanceScoreSpec_ = + relevanceScoreSpecBuilder_ == null + ? relevanceScoreSpec_ + : relevanceScoreSpecBuilder_.build(); + to_bitField0_ |= 0x00002000; + } + if (((from_bitField1_ & 0x00000080) != 0)) { + result.searchAddonSpec_ = + searchAddonSpecBuilder_ == null ? searchAddonSpec_ : searchAddonSpecBuilder_.build(); + to_bitField0_ |= 0x00004000; + } + if (((from_bitField1_ & 0x00000100) != 0)) { + result.customRankingParams_ = + customRankingParamsBuilder_ == null + ? customRankingParams_ + : customRankingParamsBuilder_.build(); + to_bitField0_ |= 0x00008000; + } + if (((from_bitField1_ & 0x00000200) != 0)) { + result.entity_ = entity_; + } + result.bitField0_ |= to_bitField0_; } - if (relevanceThreshold_ - != com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceThreshold - .RELEVANCE_THRESHOLD_UNSPECIFIED - .getNumber()) { - output.writeEnum(44, relevanceThreshold_); + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.discoveryengine.v1beta.SearchRequest) { + return mergeFrom((com.google.cloud.discoveryengine.v1beta.SearchRequest) other); + } else { + super.mergeFrom(other); + return this; + } } - if (((bitField0_ & 0x00000400) != 0)) { - output.writeMessage(46, getPersonalizationSpec()); + + public Builder mergeFrom(com.google.cloud.discoveryengine.v1beta.SearchRequest other) { + if (other == com.google.cloud.discoveryengine.v1beta.SearchRequest.getDefaultInstance()) + return this; + if (!other.getServingConfig().isEmpty()) { + servingConfig_ = other.servingConfig_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getBranch().isEmpty()) { + branch_ = other.branch_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getQuery().isEmpty()) { + query_ = other.query_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.pageCategories_.isEmpty()) { + if (pageCategories_.isEmpty()) { + pageCategories_ = other.pageCategories_; + bitField0_ |= 0x00000008; + } else { + ensurePageCategoriesIsMutable(); + pageCategories_.addAll(other.pageCategories_); + } + onChanged(); + } + if (other.hasImageQuery()) { + mergeImageQuery(other.getImageQuery()); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + bitField0_ |= 0x00000040; + onChanged(); + } + if (other.getOffset() != 0) { + setOffset(other.getOffset()); + } + if (other.getOneBoxPageSize() != 0) { + setOneBoxPageSize(other.getOneBoxPageSize()); + } + if (dataStoreSpecsBuilder_ == null) { + if (!other.dataStoreSpecs_.isEmpty()) { + if (dataStoreSpecs_.isEmpty()) { + dataStoreSpecs_ = other.dataStoreSpecs_; + bitField0_ = (bitField0_ & ~0x00000200); + } else { + ensureDataStoreSpecsIsMutable(); + dataStoreSpecs_.addAll(other.dataStoreSpecs_); + } + onChanged(); + } + } else { + if (!other.dataStoreSpecs_.isEmpty()) { + if (dataStoreSpecsBuilder_.isEmpty()) { + dataStoreSpecsBuilder_.dispose(); + dataStoreSpecsBuilder_ = null; + dataStoreSpecs_ = other.dataStoreSpecs_; + bitField0_ = (bitField0_ & ~0x00000200); + dataStoreSpecsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetDataStoreSpecsFieldBuilder() + : null; + } else { + dataStoreSpecsBuilder_.addAllMessages(other.dataStoreSpecs_); + } + } + } + if (other.getNumResultsPerDataStore() != 0) { + setNumResultsPerDataStore(other.getNumResultsPerDataStore()); + } + if (!other.getFilter().isEmpty()) { + filter_ = other.filter_; + bitField0_ |= 0x00000800; + onChanged(); + } + if (!other.getCanonicalFilter().isEmpty()) { + canonicalFilter_ = other.canonicalFilter_; + bitField0_ |= 0x00001000; + onChanged(); + } + if (!other.getOrderBy().isEmpty()) { + orderBy_ = other.orderBy_; + bitField0_ |= 0x00002000; + onChanged(); + } + if (other.hasUserInfo()) { + mergeUserInfo(other.getUserInfo()); + } + if (!other.getLanguageCode().isEmpty()) { + languageCode_ = other.languageCode_; + bitField0_ |= 0x00008000; + onChanged(); + } + if (!other.getRegionCode().isEmpty()) { + regionCode_ = other.regionCode_; + bitField0_ |= 0x00010000; + onChanged(); + } + if (facetSpecsBuilder_ == null) { + if (!other.facetSpecs_.isEmpty()) { + if (facetSpecs_.isEmpty()) { + facetSpecs_ = other.facetSpecs_; + bitField0_ = (bitField0_ & ~0x00020000); + } else { + ensureFacetSpecsIsMutable(); + facetSpecs_.addAll(other.facetSpecs_); + } + onChanged(); + } + } else { + if (!other.facetSpecs_.isEmpty()) { + if (facetSpecsBuilder_.isEmpty()) { + facetSpecsBuilder_.dispose(); + facetSpecsBuilder_ = null; + facetSpecs_ = other.facetSpecs_; + bitField0_ = (bitField0_ & ~0x00020000); + facetSpecsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetFacetSpecsFieldBuilder() + : null; + } else { + facetSpecsBuilder_.addAllMessages(other.facetSpecs_); + } + } + } + if (other.hasBoostSpec()) { + mergeBoostSpec(other.getBoostSpec()); + } + internalGetMutableParams().mergeFrom(other.internalGetParams()); + bitField0_ |= 0x00080000; + if (other.hasQueryExpansionSpec()) { + mergeQueryExpansionSpec(other.getQueryExpansionSpec()); + } + if (other.hasSpellCorrectionSpec()) { + mergeSpellCorrectionSpec(other.getSpellCorrectionSpec()); + } + if (!other.getUserPseudoId().isEmpty()) { + userPseudoId_ = other.userPseudoId_; + bitField0_ |= 0x00400000; + onChanged(); + } + if (other.hasContentSearchSpec()) { + mergeContentSearchSpec(other.getContentSearchSpec()); + } + if (other.hasEmbeddingSpec()) { + mergeEmbeddingSpec(other.getEmbeddingSpec()); + } + if (!other.getRankingExpression().isEmpty()) { + rankingExpression_ = other.rankingExpression_; + bitField0_ |= 0x02000000; + onChanged(); + } + if (other.rankingExpressionBackend_ != 0) { + setRankingExpressionBackendValue(other.getRankingExpressionBackendValue()); + } + if (other.getSafeSearch() != false) { + setSafeSearch(other.getSafeSearch()); + } + internalGetMutableUserLabels().mergeFrom(other.internalGetUserLabels()); + bitField0_ |= 0x10000000; + if (other.hasNaturalLanguageQueryUnderstandingSpec()) { + mergeNaturalLanguageQueryUnderstandingSpec( + other.getNaturalLanguageQueryUnderstandingSpec()); + } + if (other.hasSearchAsYouTypeSpec()) { + mergeSearchAsYouTypeSpec(other.getSearchAsYouTypeSpec()); + } + if (other.hasDisplaySpec()) { + mergeDisplaySpec(other.getDisplaySpec()); + } + if (crowdingSpecsBuilder_ == null) { + if (!other.crowdingSpecs_.isEmpty()) { + if (crowdingSpecs_.isEmpty()) { + crowdingSpecs_ = other.crowdingSpecs_; + bitField1_ = (bitField1_ & ~0x00000001); + } else { + ensureCrowdingSpecsIsMutable(); + crowdingSpecs_.addAll(other.crowdingSpecs_); + } + onChanged(); + } + } else { + if (!other.crowdingSpecs_.isEmpty()) { + if (crowdingSpecsBuilder_.isEmpty()) { + crowdingSpecsBuilder_.dispose(); + crowdingSpecsBuilder_ = null; + crowdingSpecs_ = other.crowdingSpecs_; + bitField1_ = (bitField1_ & ~0x00000001); + crowdingSpecsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetCrowdingSpecsFieldBuilder() + : null; + } else { + crowdingSpecsBuilder_.addAllMessages(other.crowdingSpecs_); + } + } + } + if (!other.getSession().isEmpty()) { + session_ = other.session_; + bitField1_ |= 0x00000002; + onChanged(); + } + if (other.hasSessionSpec()) { + mergeSessionSpec(other.getSessionSpec()); + } + if (other.relevanceThreshold_ != 0) { + setRelevanceThresholdValue(other.getRelevanceThresholdValue()); + } + if (other.hasRelevanceFilterSpec()) { + mergeRelevanceFilterSpec(other.getRelevanceFilterSpec()); + } + if (other.hasPersonalizationSpec()) { + mergePersonalizationSpec(other.getPersonalizationSpec()); + } + if (other.hasRelevanceScoreSpec()) { + mergeRelevanceScoreSpec(other.getRelevanceScoreSpec()); + } + if (other.hasSearchAddonSpec()) { + mergeSearchAddonSpec(other.getSearchAddonSpec()); + } + if (other.hasCustomRankingParams()) { + mergeCustomRankingParams(other.getCustomRankingParams()); + } + if (!other.getEntity().isEmpty()) { + entity_ = other.entity_; + bitField1_ |= 0x00000200; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; } - if (oneBoxPageSize_ != 0) { - output.writeInt32(47, oneBoxPageSize_); + + @java.lang.Override + public final boolean isInitialized() { + return true; } - if (rankingExpressionBackend_ - != com.google.cloud.discoveryengine.v1beta.SearchRequest.RankingExpressionBackend - .RANKING_EXPRESSION_BACKEND_UNSPECIFIED - .getNumber()) { - output.writeEnum(53, rankingExpressionBackend_); + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + servingConfig_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + branch_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + query_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 32: + { + pageSize_ = input.readInt32(); + bitField0_ |= 0x00000020; + break; + } // case 32 + case 42: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000040; + break; + } // case 42 + case 48: + { + offset_ = input.readInt32(); + bitField0_ |= 0x00000080; + break; + } // case 48 + case 58: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000800; + break; + } // case 58 + case 66: + { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00002000; + break; + } // case 66 + case 74: + { + com.google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec m = + input.readMessage( + com.google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec.parser(), + extensionRegistry); + if (facetSpecsBuilder_ == null) { + ensureFacetSpecsIsMutable(); + facetSpecs_.add(m); + } else { + facetSpecsBuilder_.addMessage(m); + } + break; + } // case 74 + case 82: + { + input.readMessage( + internalGetBoostSpecFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00040000; + break; + } // case 82 + case 90: + { + com.google.protobuf.MapEntry params__ = + input.readMessage( + ParamsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableParams() + .ensureBuilderMap() + .put(params__.getKey(), params__.getValue()); + bitField0_ |= 0x00080000; + break; + } // case 90 + case 106: + { + input.readMessage( + internalGetQueryExpansionSpecFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00100000; + break; + } // case 106 + case 114: + { + input.readMessage( + internalGetSpellCorrectionSpecFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00200000; + break; + } // case 114 + case 122: + { + userPseudoId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00400000; + break; + } // case 122 + case 154: + { + input.readMessage( + internalGetImageQueryFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 154 + case 160: + { + safeSearch_ = input.readBool(); + bitField0_ |= 0x08000000; + break; + } // case 160 + case 170: + { + input.readMessage( + internalGetUserInfoFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00004000; + break; + } // case 170 + case 178: + { + com.google.protobuf.MapEntry userLabels__ = + input.readMessage( + UserLabelsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableUserLabels() + .getMutableMap() + .put(userLabels__.getKey(), userLabels__.getValue()); + bitField0_ |= 0x10000000; + break; + } // case 178 + case 186: + { + input.readMessage( + internalGetEmbeddingSpecFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x01000000; + break; + } // case 186 + case 194: + { + input.readMessage( + internalGetContentSearchSpecFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00800000; + break; + } // case 194 + case 210: + { + rankingExpression_ = input.readStringRequireUtf8(); + bitField0_ |= 0x02000000; + break; + } // case 210 + case 226: + { + input.readMessage( + internalGetNaturalLanguageQueryUnderstandingSpecFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x20000000; + break; + } // case 226 + case 234: + { + canonicalFilter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00001000; + break; + } // case 234 + case 250: + { + input.readMessage( + internalGetSearchAsYouTypeSpecFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x40000000; + break; + } // case 250 + case 258: + { + com.google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec m = + input.readMessage( + com.google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec + .parser(), + extensionRegistry); + if (dataStoreSpecsBuilder_ == null) { + ensureDataStoreSpecsIsMutable(); + dataStoreSpecs_.add(m); + } else { + dataStoreSpecsBuilder_.addMessage(m); + } + break; + } // case 258 + case 282: + { + languageCode_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00008000; + break; + } // case 282 + case 290: + { + regionCode_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00010000; + break; + } // case 290 + case 306: + { + input.readMessage( + internalGetDisplaySpecFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x80000000; + break; + } // case 306 + case 322: + { + com.google.cloud.discoveryengine.v1beta.SearchRequest.CrowdingSpec m = + input.readMessage( + com.google.cloud.discoveryengine.v1beta.SearchRequest.CrowdingSpec.parser(), + extensionRegistry); + if (crowdingSpecsBuilder_ == null) { + ensureCrowdingSpecsIsMutable(); + crowdingSpecs_.add(m); + } else { + crowdingSpecsBuilder_.addMessage(m); + } + break; + } // case 322 + case 330: + { + session_ = input.readStringRequireUtf8(); + bitField1_ |= 0x00000002; + break; + } // case 330 + case 338: + { + input.readMessage( + internalGetSessionSpecFieldBuilder().getBuilder(), extensionRegistry); + bitField1_ |= 0x00000004; + break; + } // case 338 + case 352: + { + relevanceThreshold_ = input.readEnum(); + bitField1_ |= 0x00000008; + break; + } // case 352 + case 370: + { + input.readMessage( + internalGetPersonalizationSpecFieldBuilder().getBuilder(), extensionRegistry); + bitField1_ |= 0x00000020; + break; + } // case 370 + case 376: + { + oneBoxPageSize_ = input.readInt32(); + bitField0_ |= 0x00000100; + break; + } // case 376 + case 418: + { + input.readMessage( + internalGetRelevanceScoreSpecFieldBuilder().getBuilder(), extensionRegistry); + bitField1_ |= 0x00000040; + break; + } // case 418 + case 424: + { + rankingExpressionBackend_ = input.readEnum(); + bitField0_ |= 0x04000000; + break; + } // case 424 + case 498: + { + input.readMessage( + internalGetSearchAddonSpecFieldBuilder().getBuilder(), extensionRegistry); + bitField1_ |= 0x00000080; + break; + } // case 498 + case 506: + { + java.lang.String s = input.readStringRequireUtf8(); + ensurePageCategoriesIsMutable(); + pageCategories_.add(s); + break; + } // case 506 + case 514: + { + input.readMessage( + internalGetCustomRankingParamsFieldBuilder().getBuilder(), extensionRegistry); + bitField1_ |= 0x00000100; + break; + } // case 514 + case 520: + { + numResultsPerDataStore_ = input.readInt32(); + bitField0_ |= 0x00000400; + break; + } // case 520 + case 530: + { + entity_ = input.readStringRequireUtf8(); + bitField1_ |= 0x00000200; + break; + } // case 530 + case 690: + { + input.readMessage( + internalGetRelevanceFilterSpecFieldBuilder().getBuilder(), extensionRegistry); + bitField1_ |= 0x00000010; + break; + } // case 690 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; } - getUnknownFields().writeTo(output); - } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; + private int bitField0_; + private int bitField1_; - size = 0; - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(servingConfig_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, servingConfig_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(branch_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(2, branch_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(query_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(3, query_); - } - if (pageSize_ != 0) { - size += com.google.protobuf.CodedOutputStream.computeInt32Size(4, pageSize_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(5, pageToken_); - } - if (offset_ != 0) { - size += com.google.protobuf.CodedOutputStream.computeInt32Size(6, offset_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(filter_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(7, filter_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(orderBy_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(8, orderBy_); - } - for (int i = 0; i < facetSpecs_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(9, facetSpecs_.get(i)); - } - if (((bitField0_ & 0x00000004) != 0)) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(10, getBoostSpec()); - } - for (java.util.Map.Entry entry : - internalGetParams().getMap().entrySet()) { - com.google.protobuf.MapEntry params__ = - ParamsDefaultEntryHolder.defaultEntry - .newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream.computeMessageSize(11, params__); - } - if (((bitField0_ & 0x00000008) != 0)) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(13, getQueryExpansionSpec()); - } - if (((bitField0_ & 0x00000010) != 0)) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize(14, getSpellCorrectionSpec()); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(userPseudoId_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(15, userPseudoId_); - } - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(19, getImageQuery()); - } - if (safeSearch_ != false) { - size += com.google.protobuf.CodedOutputStream.computeBoolSize(20, safeSearch_); - } - if (((bitField0_ & 0x00000002) != 0)) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(21, getUserInfo()); - } - for (java.util.Map.Entry entry : - internalGetUserLabels().getMap().entrySet()) { - com.google.protobuf.MapEntry userLabels__ = - UserLabelsDefaultEntryHolder.defaultEntry - .newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream.computeMessageSize(22, userLabels__); - } - if (((bitField0_ & 0x00000040) != 0)) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(23, getEmbeddingSpec()); - } - if (((bitField0_ & 0x00000020) != 0)) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(24, getContentSearchSpec()); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(rankingExpression_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(26, rankingExpression_); - } - if (((bitField0_ & 0x00000080) != 0)) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 28, getNaturalLanguageQueryUnderstandingSpec()); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(canonicalFilter_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(29, canonicalFilter_); - } - if (((bitField0_ & 0x00000100) != 0)) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize(31, getSearchAsYouTypeSpec()); - } - for (int i = 0; i < dataStoreSpecs_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(32, dataStoreSpecs_.get(i)); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(languageCode_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(35, languageCode_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(regionCode_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(36, regionCode_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(session_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(41, session_); - } - if (((bitField0_ & 0x00000200) != 0)) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(42, getSessionSpec()); - } - if (relevanceThreshold_ - != com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceThreshold - .RELEVANCE_THRESHOLD_UNSPECIFIED - .getNumber()) { - size += com.google.protobuf.CodedOutputStream.computeEnumSize(44, relevanceThreshold_); - } - if (((bitField0_ & 0x00000400) != 0)) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize(46, getPersonalizationSpec()); - } - if (oneBoxPageSize_ != 0) { - size += com.google.protobuf.CodedOutputStream.computeInt32Size(47, oneBoxPageSize_); - } - if (rankingExpressionBackend_ - != com.google.cloud.discoveryengine.v1beta.SearchRequest.RankingExpressionBackend - .RANKING_EXPRESSION_BACKEND_UNSPECIFIED - .getNumber()) { - size += com.google.protobuf.CodedOutputStream.computeEnumSize(53, rankingExpressionBackend_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } + private java.lang.Object servingConfig_ = ""; - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.discoveryengine.v1beta.SearchRequest)) { - return super.equals(obj); + /** + * + * + *
            +     * Required. The resource name of the Search serving config, such as
            +     * `projects/*/locations/global/collections/default_collection/engines/*/servingConfigs/default_serving_config`,
            +     * or
            +     * `projects/*/locations/global/collections/default_collection/dataStores/default_data_store/servingConfigs/default_serving_config`.
            +     * This field is used to identify the serving configuration name, set
            +     * of models used to make the search.
            +     * 
            + * + * + * string serving_config = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The servingConfig. + */ + public java.lang.String getServingConfig() { + java.lang.Object ref = servingConfig_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + servingConfig_ = s; + return s; + } else { + return (java.lang.String) ref; + } } - com.google.cloud.discoveryengine.v1beta.SearchRequest other = - (com.google.cloud.discoveryengine.v1beta.SearchRequest) obj; - if (!getServingConfig().equals(other.getServingConfig())) return false; - if (!getBranch().equals(other.getBranch())) return false; - if (!getQuery().equals(other.getQuery())) return false; - if (hasImageQuery() != other.hasImageQuery()) return false; - if (hasImageQuery()) { - if (!getImageQuery().equals(other.getImageQuery())) return false; - } - if (getPageSize() != other.getPageSize()) return false; - if (!getPageToken().equals(other.getPageToken())) return false; - if (getOffset() != other.getOffset()) return false; - if (getOneBoxPageSize() != other.getOneBoxPageSize()) return false; - if (!getDataStoreSpecsList().equals(other.getDataStoreSpecsList())) return false; - if (!getFilter().equals(other.getFilter())) return false; - if (!getCanonicalFilter().equals(other.getCanonicalFilter())) return false; - if (!getOrderBy().equals(other.getOrderBy())) return false; - if (hasUserInfo() != other.hasUserInfo()) return false; - if (hasUserInfo()) { - if (!getUserInfo().equals(other.getUserInfo())) return false; - } - if (!getLanguageCode().equals(other.getLanguageCode())) return false; - if (!getRegionCode().equals(other.getRegionCode())) return false; - if (!getFacetSpecsList().equals(other.getFacetSpecsList())) return false; - if (hasBoostSpec() != other.hasBoostSpec()) return false; - if (hasBoostSpec()) { - if (!getBoostSpec().equals(other.getBoostSpec())) return false; + /** + * + * + *
            +     * Required. The resource name of the Search serving config, such as
            +     * `projects/*/locations/global/collections/default_collection/engines/*/servingConfigs/default_serving_config`,
            +     * or
            +     * `projects/*/locations/global/collections/default_collection/dataStores/default_data_store/servingConfigs/default_serving_config`.
            +     * This field is used to identify the serving configuration name, set
            +     * of models used to make the search.
            +     * 
            + * + * + * string serving_config = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for servingConfig. + */ + public com.google.protobuf.ByteString getServingConfigBytes() { + java.lang.Object ref = servingConfig_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + servingConfig_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } } - if (!internalGetParams().equals(other.internalGetParams())) return false; - if (hasQueryExpansionSpec() != other.hasQueryExpansionSpec()) return false; - if (hasQueryExpansionSpec()) { - if (!getQueryExpansionSpec().equals(other.getQueryExpansionSpec())) return false; + + /** + * + * + *
            +     * Required. The resource name of the Search serving config, such as
            +     * `projects/*/locations/global/collections/default_collection/engines/*/servingConfigs/default_serving_config`,
            +     * or
            +     * `projects/*/locations/global/collections/default_collection/dataStores/default_data_store/servingConfigs/default_serving_config`.
            +     * This field is used to identify the serving configuration name, set
            +     * of models used to make the search.
            +     * 
            + * + * + * string serving_config = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The servingConfig to set. + * @return This builder for chaining. + */ + public Builder setServingConfig(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + servingConfig_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; } - if (hasSpellCorrectionSpec() != other.hasSpellCorrectionSpec()) return false; - if (hasSpellCorrectionSpec()) { - if (!getSpellCorrectionSpec().equals(other.getSpellCorrectionSpec())) return false; + + /** + * + * + *
            +     * Required. The resource name of the Search serving config, such as
            +     * `projects/*/locations/global/collections/default_collection/engines/*/servingConfigs/default_serving_config`,
            +     * or
            +     * `projects/*/locations/global/collections/default_collection/dataStores/default_data_store/servingConfigs/default_serving_config`.
            +     * This field is used to identify the serving configuration name, set
            +     * of models used to make the search.
            +     * 
            + * + * + * string serving_config = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearServingConfig() { + servingConfig_ = getDefaultInstance().getServingConfig(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; } - if (!getUserPseudoId().equals(other.getUserPseudoId())) return false; - if (hasContentSearchSpec() != other.hasContentSearchSpec()) return false; - if (hasContentSearchSpec()) { - if (!getContentSearchSpec().equals(other.getContentSearchSpec())) return false; + + /** + * + * + *
            +     * Required. The resource name of the Search serving config, such as
            +     * `projects/*/locations/global/collections/default_collection/engines/*/servingConfigs/default_serving_config`,
            +     * or
            +     * `projects/*/locations/global/collections/default_collection/dataStores/default_data_store/servingConfigs/default_serving_config`.
            +     * This field is used to identify the serving configuration name, set
            +     * of models used to make the search.
            +     * 
            + * + * + * string serving_config = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for servingConfig to set. + * @return This builder for chaining. + */ + public Builder setServingConfigBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + servingConfig_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; } - if (hasEmbeddingSpec() != other.hasEmbeddingSpec()) return false; - if (hasEmbeddingSpec()) { - if (!getEmbeddingSpec().equals(other.getEmbeddingSpec())) return false; + + private java.lang.Object branch_ = ""; + + /** + * + * + *
            +     * The branch resource name, such as
            +     * `projects/*/locations/global/collections/default_collection/dataStores/default_data_store/branches/0`.
            +     *
            +     * Use `default_branch` as the branch ID or leave this field empty, to search
            +     * documents under the default branch.
            +     * 
            + * + * string branch = 2 [(.google.api.resource_reference) = { ... } + * + * @return The branch. + */ + public java.lang.String getBranch() { + java.lang.Object ref = branch_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + branch_ = s; + return s; + } else { + return (java.lang.String) ref; + } } - if (!getRankingExpression().equals(other.getRankingExpression())) return false; - if (rankingExpressionBackend_ != other.rankingExpressionBackend_) return false; - if (getSafeSearch() != other.getSafeSearch()) return false; - if (!internalGetUserLabels().equals(other.internalGetUserLabels())) return false; - if (hasNaturalLanguageQueryUnderstandingSpec() - != other.hasNaturalLanguageQueryUnderstandingSpec()) return false; - if (hasNaturalLanguageQueryUnderstandingSpec()) { - if (!getNaturalLanguageQueryUnderstandingSpec() - .equals(other.getNaturalLanguageQueryUnderstandingSpec())) return false; + + /** + * + * + *
            +     * The branch resource name, such as
            +     * `projects/*/locations/global/collections/default_collection/dataStores/default_data_store/branches/0`.
            +     *
            +     * Use `default_branch` as the branch ID or leave this field empty, to search
            +     * documents under the default branch.
            +     * 
            + * + * string branch = 2 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for branch. + */ + public com.google.protobuf.ByteString getBranchBytes() { + java.lang.Object ref = branch_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + branch_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } } - if (hasSearchAsYouTypeSpec() != other.hasSearchAsYouTypeSpec()) return false; - if (hasSearchAsYouTypeSpec()) { - if (!getSearchAsYouTypeSpec().equals(other.getSearchAsYouTypeSpec())) return false; + + /** + * + * + *
            +     * The branch resource name, such as
            +     * `projects/*/locations/global/collections/default_collection/dataStores/default_data_store/branches/0`.
            +     *
            +     * Use `default_branch` as the branch ID or leave this field empty, to search
            +     * documents under the default branch.
            +     * 
            + * + * string branch = 2 [(.google.api.resource_reference) = { ... } + * + * @param value The branch to set. + * @return This builder for chaining. + */ + public Builder setBranch(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + branch_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; } - if (!getSession().equals(other.getSession())) return false; - if (hasSessionSpec() != other.hasSessionSpec()) return false; - if (hasSessionSpec()) { - if (!getSessionSpec().equals(other.getSessionSpec())) return false; + + /** + * + * + *
            +     * The branch resource name, such as
            +     * `projects/*/locations/global/collections/default_collection/dataStores/default_data_store/branches/0`.
            +     *
            +     * Use `default_branch` as the branch ID or leave this field empty, to search
            +     * documents under the default branch.
            +     * 
            + * + * string branch = 2 [(.google.api.resource_reference) = { ... } + * + * @return This builder for chaining. + */ + public Builder clearBranch() { + branch_ = getDefaultInstance().getBranch(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; } - if (relevanceThreshold_ != other.relevanceThreshold_) return false; - if (hasPersonalizationSpec() != other.hasPersonalizationSpec()) return false; - if (hasPersonalizationSpec()) { - if (!getPersonalizationSpec().equals(other.getPersonalizationSpec())) return false; + + /** + * + * + *
            +     * The branch resource name, such as
            +     * `projects/*/locations/global/collections/default_collection/dataStores/default_data_store/branches/0`.
            +     *
            +     * Use `default_branch` as the branch ID or leave this field empty, to search
            +     * documents under the default branch.
            +     * 
            + * + * string branch = 2 [(.google.api.resource_reference) = { ... } + * + * @param value The bytes for branch to set. + * @return This builder for chaining. + */ + public Builder setBranchBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + branch_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; } - 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) + SERVING_CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getServingConfig().hashCode(); - hash = (37 * hash) + BRANCH_FIELD_NUMBER; - hash = (53 * hash) + getBranch().hashCode(); - hash = (37 * hash) + QUERY_FIELD_NUMBER; - hash = (53 * hash) + getQuery().hashCode(); - if (hasImageQuery()) { - hash = (37 * hash) + IMAGE_QUERY_FIELD_NUMBER; - hash = (53 * hash) + getImageQuery().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) + OFFSET_FIELD_NUMBER; - hash = (53 * hash) + getOffset(); - hash = (37 * hash) + ONE_BOX_PAGE_SIZE_FIELD_NUMBER; - hash = (53 * hash) + getOneBoxPageSize(); - if (getDataStoreSpecsCount() > 0) { - hash = (37 * hash) + DATA_STORE_SPECS_FIELD_NUMBER; - hash = (53 * hash) + getDataStoreSpecsList().hashCode(); + private java.lang.Object query_ = ""; + + /** + * + * + *
            +     * Raw search query.
            +     * 
            + * + * string query = 3; + * + * @return The query. + */ + public java.lang.String getQuery() { + java.lang.Object ref = query_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + query_ = s; + return s; + } else { + return (java.lang.String) ref; + } } - hash = (37 * hash) + FILTER_FIELD_NUMBER; - hash = (53 * hash) + getFilter().hashCode(); - hash = (37 * hash) + CANONICAL_FILTER_FIELD_NUMBER; - hash = (53 * hash) + getCanonicalFilter().hashCode(); - hash = (37 * hash) + ORDER_BY_FIELD_NUMBER; - hash = (53 * hash) + getOrderBy().hashCode(); - if (hasUserInfo()) { - hash = (37 * hash) + USER_INFO_FIELD_NUMBER; - hash = (53 * hash) + getUserInfo().hashCode(); + + /** + * + * + *
            +     * Raw search query.
            +     * 
            + * + * string query = 3; + * + * @return The bytes for query. + */ + public com.google.protobuf.ByteString getQueryBytes() { + java.lang.Object ref = query_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + query_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } } - hash = (37 * hash) + LANGUAGE_CODE_FIELD_NUMBER; - hash = (53 * hash) + getLanguageCode().hashCode(); - hash = (37 * hash) + REGION_CODE_FIELD_NUMBER; - hash = (53 * hash) + getRegionCode().hashCode(); - if (getFacetSpecsCount() > 0) { - hash = (37 * hash) + FACET_SPECS_FIELD_NUMBER; - hash = (53 * hash) + getFacetSpecsList().hashCode(); + + /** + * + * + *
            +     * Raw search query.
            +     * 
            + * + * string query = 3; + * + * @param value The query to set. + * @return This builder for chaining. + */ + public Builder setQuery(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + query_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; } - if (hasBoostSpec()) { - hash = (37 * hash) + BOOST_SPEC_FIELD_NUMBER; - hash = (53 * hash) + getBoostSpec().hashCode(); + + /** + * + * + *
            +     * Raw search query.
            +     * 
            + * + * string query = 3; + * + * @return This builder for chaining. + */ + public Builder clearQuery() { + query_ = getDefaultInstance().getQuery(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; } - if (!internalGetParams().getMap().isEmpty()) { - hash = (37 * hash) + PARAMS_FIELD_NUMBER; - hash = (53 * hash) + internalGetParams().hashCode(); + + /** + * + * + *
            +     * Raw search query.
            +     * 
            + * + * string query = 3; + * + * @param value The bytes for query to set. + * @return This builder for chaining. + */ + public Builder setQueryBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + query_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; } - if (hasQueryExpansionSpec()) { - hash = (37 * hash) + QUERY_EXPANSION_SPEC_FIELD_NUMBER; - hash = (53 * hash) + getQueryExpansionSpec().hashCode(); + + private com.google.protobuf.LazyStringArrayList pageCategories_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensurePageCategoriesIsMutable() { + if (!pageCategories_.isModifiable()) { + pageCategories_ = new com.google.protobuf.LazyStringArrayList(pageCategories_); + } + bitField0_ |= 0x00000008; } - if (hasSpellCorrectionSpec()) { - hash = (37 * hash) + SPELL_CORRECTION_SPEC_FIELD_NUMBER; - hash = (53 * hash) + getSpellCorrectionSpec().hashCode(); + + /** + * + * + *
            +     * Optional. The categories associated with a category page. Must be set for
            +     * category navigation queries to achieve good search quality. The format
            +     * should be the same as
            +     * [PageInfo.page_category][google.cloud.discoveryengine.v1beta.PageInfo.page_category].
            +     * This field is the equivalent of the query for browse (navigation) queries.
            +     * It's used by the browse model when the query is empty.
            +     *
            +     * If the field is empty, it will not be used by the browse model.
            +     * If the field contains more than one element, only the first element will
            +     * be used.
            +     *
            +     * To represent full path of a category, use '>' character to separate
            +     * different hierarchies. If '>' is part of the category name, replace it with
            +     * other character(s).
            +     * For example, `Graphics Cards > RTX>4090 > Founders Edition` where "RTX >
            +     * 4090" represents one level, can be rewritten as `Graphics Cards > RTX_4090
            +     * > Founders Edition`
            +     * 
            + * + * repeated string page_categories = 63 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the pageCategories. + */ + public com.google.protobuf.ProtocolStringList getPageCategoriesList() { + pageCategories_.makeImmutable(); + return pageCategories_; } - hash = (37 * hash) + USER_PSEUDO_ID_FIELD_NUMBER; - hash = (53 * hash) + getUserPseudoId().hashCode(); - if (hasContentSearchSpec()) { - hash = (37 * hash) + CONTENT_SEARCH_SPEC_FIELD_NUMBER; - hash = (53 * hash) + getContentSearchSpec().hashCode(); + + /** + * + * + *
            +     * Optional. The categories associated with a category page. Must be set for
            +     * category navigation queries to achieve good search quality. The format
            +     * should be the same as
            +     * [PageInfo.page_category][google.cloud.discoveryengine.v1beta.PageInfo.page_category].
            +     * This field is the equivalent of the query for browse (navigation) queries.
            +     * It's used by the browse model when the query is empty.
            +     *
            +     * If the field is empty, it will not be used by the browse model.
            +     * If the field contains more than one element, only the first element will
            +     * be used.
            +     *
            +     * To represent full path of a category, use '>' character to separate
            +     * different hierarchies. If '>' is part of the category name, replace it with
            +     * other character(s).
            +     * For example, `Graphics Cards > RTX>4090 > Founders Edition` where "RTX >
            +     * 4090" represents one level, can be rewritten as `Graphics Cards > RTX_4090
            +     * > Founders Edition`
            +     * 
            + * + * repeated string page_categories = 63 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of pageCategories. + */ + public int getPageCategoriesCount() { + return pageCategories_.size(); } - if (hasEmbeddingSpec()) { - hash = (37 * hash) + EMBEDDING_SPEC_FIELD_NUMBER; - hash = (53 * hash) + getEmbeddingSpec().hashCode(); + + /** + * + * + *
            +     * Optional. The categories associated with a category page. Must be set for
            +     * category navigation queries to achieve good search quality. The format
            +     * should be the same as
            +     * [PageInfo.page_category][google.cloud.discoveryengine.v1beta.PageInfo.page_category].
            +     * This field is the equivalent of the query for browse (navigation) queries.
            +     * It's used by the browse model when the query is empty.
            +     *
            +     * If the field is empty, it will not be used by the browse model.
            +     * If the field contains more than one element, only the first element will
            +     * be used.
            +     *
            +     * To represent full path of a category, use '>' character to separate
            +     * different hierarchies. If '>' is part of the category name, replace it with
            +     * other character(s).
            +     * For example, `Graphics Cards > RTX>4090 > Founders Edition` where "RTX >
            +     * 4090" represents one level, can be rewritten as `Graphics Cards > RTX_4090
            +     * > Founders Edition`
            +     * 
            + * + * repeated string page_categories = 63 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The pageCategories at the given index. + */ + public java.lang.String getPageCategories(int index) { + return pageCategories_.get(index); } - hash = (37 * hash) + RANKING_EXPRESSION_FIELD_NUMBER; - hash = (53 * hash) + getRankingExpression().hashCode(); - hash = (37 * hash) + RANKING_EXPRESSION_BACKEND_FIELD_NUMBER; - hash = (53 * hash) + rankingExpressionBackend_; - hash = (37 * hash) + SAFE_SEARCH_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getSafeSearch()); - if (!internalGetUserLabels().getMap().isEmpty()) { - hash = (37 * hash) + USER_LABELS_FIELD_NUMBER; - hash = (53 * hash) + internalGetUserLabels().hashCode(); + + /** + * + * + *
            +     * Optional. The categories associated with a category page. Must be set for
            +     * category navigation queries to achieve good search quality. The format
            +     * should be the same as
            +     * [PageInfo.page_category][google.cloud.discoveryengine.v1beta.PageInfo.page_category].
            +     * This field is the equivalent of the query for browse (navigation) queries.
            +     * It's used by the browse model when the query is empty.
            +     *
            +     * If the field is empty, it will not be used by the browse model.
            +     * If the field contains more than one element, only the first element will
            +     * be used.
            +     *
            +     * To represent full path of a category, use '>' character to separate
            +     * different hierarchies. If '>' is part of the category name, replace it with
            +     * other character(s).
            +     * For example, `Graphics Cards > RTX>4090 > Founders Edition` where "RTX >
            +     * 4090" represents one level, can be rewritten as `Graphics Cards > RTX_4090
            +     * > Founders Edition`
            +     * 
            + * + * repeated string page_categories = 63 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the pageCategories at the given index. + */ + public com.google.protobuf.ByteString getPageCategoriesBytes(int index) { + return pageCategories_.getByteString(index); } - if (hasNaturalLanguageQueryUnderstandingSpec()) { - hash = (37 * hash) + NATURAL_LANGUAGE_QUERY_UNDERSTANDING_SPEC_FIELD_NUMBER; - hash = (53 * hash) + getNaturalLanguageQueryUnderstandingSpec().hashCode(); + + /** + * + * + *
            +     * Optional. The categories associated with a category page. Must be set for
            +     * category navigation queries to achieve good search quality. The format
            +     * should be the same as
            +     * [PageInfo.page_category][google.cloud.discoveryengine.v1beta.PageInfo.page_category].
            +     * This field is the equivalent of the query for browse (navigation) queries.
            +     * It's used by the browse model when the query is empty.
            +     *
            +     * If the field is empty, it will not be used by the browse model.
            +     * If the field contains more than one element, only the first element will
            +     * be used.
            +     *
            +     * To represent full path of a category, use '>' character to separate
            +     * different hierarchies. If '>' is part of the category name, replace it with
            +     * other character(s).
            +     * For example, `Graphics Cards > RTX>4090 > Founders Edition` where "RTX >
            +     * 4090" represents one level, can be rewritten as `Graphics Cards > RTX_4090
            +     * > Founders Edition`
            +     * 
            + * + * repeated string page_categories = 63 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index to set the value at. + * @param value The pageCategories to set. + * @return This builder for chaining. + */ + public Builder setPageCategories(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensurePageCategoriesIsMutable(); + pageCategories_.set(index, value); + bitField0_ |= 0x00000008; + onChanged(); + return this; } - if (hasSearchAsYouTypeSpec()) { - hash = (37 * hash) + SEARCH_AS_YOU_TYPE_SPEC_FIELD_NUMBER; - hash = (53 * hash) + getSearchAsYouTypeSpec().hashCode(); + + /** + * + * + *
            +     * Optional. The categories associated with a category page. Must be set for
            +     * category navigation queries to achieve good search quality. The format
            +     * should be the same as
            +     * [PageInfo.page_category][google.cloud.discoveryengine.v1beta.PageInfo.page_category].
            +     * This field is the equivalent of the query for browse (navigation) queries.
            +     * It's used by the browse model when the query is empty.
            +     *
            +     * If the field is empty, it will not be used by the browse model.
            +     * If the field contains more than one element, only the first element will
            +     * be used.
            +     *
            +     * To represent full path of a category, use '>' character to separate
            +     * different hierarchies. If '>' is part of the category name, replace it with
            +     * other character(s).
            +     * For example, `Graphics Cards > RTX>4090 > Founders Edition` where "RTX >
            +     * 4090" represents one level, can be rewritten as `Graphics Cards > RTX_4090
            +     * > Founders Edition`
            +     * 
            + * + * repeated string page_categories = 63 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pageCategories to add. + * @return This builder for chaining. + */ + public Builder addPageCategories(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensurePageCategoriesIsMutable(); + pageCategories_.add(value); + bitField0_ |= 0x00000008; + onChanged(); + return this; } - hash = (37 * hash) + SESSION_FIELD_NUMBER; - hash = (53 * hash) + getSession().hashCode(); - if (hasSessionSpec()) { - hash = (37 * hash) + SESSION_SPEC_FIELD_NUMBER; - hash = (53 * hash) + getSessionSpec().hashCode(); + + /** + * + * + *
            +     * Optional. The categories associated with a category page. Must be set for
            +     * category navigation queries to achieve good search quality. The format
            +     * should be the same as
            +     * [PageInfo.page_category][google.cloud.discoveryengine.v1beta.PageInfo.page_category].
            +     * This field is the equivalent of the query for browse (navigation) queries.
            +     * It's used by the browse model when the query is empty.
            +     *
            +     * If the field is empty, it will not be used by the browse model.
            +     * If the field contains more than one element, only the first element will
            +     * be used.
            +     *
            +     * To represent full path of a category, use '>' character to separate
            +     * different hierarchies. If '>' is part of the category name, replace it with
            +     * other character(s).
            +     * For example, `Graphics Cards > RTX>4090 > Founders Edition` where "RTX >
            +     * 4090" represents one level, can be rewritten as `Graphics Cards > RTX_4090
            +     * > Founders Edition`
            +     * 
            + * + * repeated string page_categories = 63 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param values The pageCategories to add. + * @return This builder for chaining. + */ + public Builder addAllPageCategories(java.lang.Iterable values) { + ensurePageCategoriesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, pageCategories_); + bitField0_ |= 0x00000008; + onChanged(); + return this; } - hash = (37 * hash) + RELEVANCE_THRESHOLD_FIELD_NUMBER; - hash = (53 * hash) + relevanceThreshold_; - if (hasPersonalizationSpec()) { - hash = (37 * hash) + PERSONALIZATION_SPEC_FIELD_NUMBER; - hash = (53 * hash) + getPersonalizationSpec().hashCode(); + + /** + * + * + *
            +     * Optional. The categories associated with a category page. Must be set for
            +     * category navigation queries to achieve good search quality. The format
            +     * should be the same as
            +     * [PageInfo.page_category][google.cloud.discoveryengine.v1beta.PageInfo.page_category].
            +     * This field is the equivalent of the query for browse (navigation) queries.
            +     * It's used by the browse model when the query is empty.
            +     *
            +     * If the field is empty, it will not be used by the browse model.
            +     * If the field contains more than one element, only the first element will
            +     * be used.
            +     *
            +     * To represent full path of a category, use '>' character to separate
            +     * different hierarchies. If '>' is part of the category name, replace it with
            +     * other character(s).
            +     * For example, `Graphics Cards > RTX>4090 > Founders Edition` where "RTX >
            +     * 4090" represents one level, can be rewritten as `Graphics Cards > RTX_4090
            +     * > Founders Edition`
            +     * 
            + * + * repeated string page_categories = 63 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageCategories() { + pageCategories_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + ; + onChanged(); + return this; } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - public static com.google.cloud.discoveryengine.v1beta.SearchRequest parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } + /** + * + * + *
            +     * Optional. The categories associated with a category page. Must be set for
            +     * category navigation queries to achieve good search quality. The format
            +     * should be the same as
            +     * [PageInfo.page_category][google.cloud.discoveryengine.v1beta.PageInfo.page_category].
            +     * This field is the equivalent of the query for browse (navigation) queries.
            +     * It's used by the browse model when the query is empty.
            +     *
            +     * If the field is empty, it will not be used by the browse model.
            +     * If the field contains more than one element, only the first element will
            +     * be used.
            +     *
            +     * To represent full path of a category, use '>' character to separate
            +     * different hierarchies. If '>' is part of the category name, replace it with
            +     * other character(s).
            +     * For example, `Graphics Cards > RTX>4090 > Founders Edition` where "RTX >
            +     * 4090" represents one level, can be rewritten as `Graphics Cards > RTX_4090
            +     * > Founders Edition`
            +     * 
            + * + * repeated string page_categories = 63 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes of the pageCategories to add. + * @return This builder for chaining. + */ + public Builder addPageCategoriesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensurePageCategoriesIsMutable(); + pageCategories_.add(value); + bitField0_ |= 0x00000008; + onChanged(); + return this; + } - public static com.google.cloud.discoveryengine.v1beta.SearchRequest parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } + private com.google.cloud.discoveryengine.v1beta.SearchRequest.ImageQuery imageQuery_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.SearchRequest.ImageQuery, + com.google.cloud.discoveryengine.v1beta.SearchRequest.ImageQuery.Builder, + com.google.cloud.discoveryengine.v1beta.SearchRequest.ImageQueryOrBuilder> + imageQueryBuilder_; - public static com.google.cloud.discoveryengine.v1beta.SearchRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } + /** + * + * + *
            +     * Raw image query.
            +     * 
            + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.ImageQuery image_query = 19; + * + * @return Whether the imageQuery field is set. + */ + public boolean hasImageQuery() { + return ((bitField0_ & 0x00000010) != 0); + } - public static com.google.cloud.discoveryengine.v1beta.SearchRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } + /** + * + * + *
            +     * Raw image query.
            +     * 
            + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.ImageQuery image_query = 19; + * + * @return The imageQuery. + */ + public com.google.cloud.discoveryengine.v1beta.SearchRequest.ImageQuery getImageQuery() { + if (imageQueryBuilder_ == null) { + return imageQuery_ == null + ? com.google.cloud.discoveryengine.v1beta.SearchRequest.ImageQuery.getDefaultInstance() + : imageQuery_; + } else { + return imageQueryBuilder_.getMessage(); + } + } - public static com.google.cloud.discoveryengine.v1beta.SearchRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } + /** + * + * + *
            +     * Raw image query.
            +     * 
            + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.ImageQuery image_query = 19; + */ + public Builder setImageQuery( + com.google.cloud.discoveryengine.v1beta.SearchRequest.ImageQuery value) { + if (imageQueryBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + imageQuery_ = value; + } else { + imageQueryBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } - public static com.google.cloud.discoveryengine.v1beta.SearchRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } + /** + * + * + *
            +     * Raw image query.
            +     * 
            + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.ImageQuery image_query = 19; + */ + public Builder setImageQuery( + com.google.cloud.discoveryengine.v1beta.SearchRequest.ImageQuery.Builder builderForValue) { + if (imageQueryBuilder_ == null) { + imageQuery_ = builderForValue.build(); + } else { + imageQueryBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } - public static com.google.cloud.discoveryengine.v1beta.SearchRequest parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } + /** + * + * + *
            +     * Raw image query.
            +     * 
            + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.ImageQuery image_query = 19; + */ + public Builder mergeImageQuery( + com.google.cloud.discoveryengine.v1beta.SearchRequest.ImageQuery value) { + if (imageQueryBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) + && imageQuery_ != null + && imageQuery_ + != com.google.cloud.discoveryengine.v1beta.SearchRequest.ImageQuery + .getDefaultInstance()) { + getImageQueryBuilder().mergeFrom(value); + } else { + imageQuery_ = value; + } + } else { + imageQueryBuilder_.mergeFrom(value); + } + if (imageQuery_ != null) { + bitField0_ |= 0x00000010; + onChanged(); + } + return this; + } - public static com.google.cloud.discoveryengine.v1beta.SearchRequest parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } + /** + * + * + *
            +     * Raw image query.
            +     * 
            + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.ImageQuery image_query = 19; + */ + public Builder clearImageQuery() { + bitField0_ = (bitField0_ & ~0x00000010); + imageQuery_ = null; + if (imageQueryBuilder_ != null) { + imageQueryBuilder_.dispose(); + imageQueryBuilder_ = null; + } + onChanged(); + return this; + } - public static com.google.cloud.discoveryengine.v1beta.SearchRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); - } + /** + * + * + *
            +     * Raw image query.
            +     * 
            + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.ImageQuery image_query = 19; + */ + public com.google.cloud.discoveryengine.v1beta.SearchRequest.ImageQuery.Builder + getImageQueryBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return internalGetImageQueryFieldBuilder().getBuilder(); + } - public static com.google.cloud.discoveryengine.v1beta.SearchRequest parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } + /** + * + * + *
            +     * Raw image query.
            +     * 
            + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.ImageQuery image_query = 19; + */ + public com.google.cloud.discoveryengine.v1beta.SearchRequest.ImageQueryOrBuilder + getImageQueryOrBuilder() { + if (imageQueryBuilder_ != null) { + return imageQueryBuilder_.getMessageOrBuilder(); + } else { + return imageQuery_ == null + ? com.google.cloud.discoveryengine.v1beta.SearchRequest.ImageQuery.getDefaultInstance() + : imageQuery_; + } + } - public static com.google.cloud.discoveryengine.v1beta.SearchRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); - } + /** + * + * + *
            +     * Raw image query.
            +     * 
            + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.ImageQuery image_query = 19; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.SearchRequest.ImageQuery, + com.google.cloud.discoveryengine.v1beta.SearchRequest.ImageQuery.Builder, + com.google.cloud.discoveryengine.v1beta.SearchRequest.ImageQueryOrBuilder> + internalGetImageQueryFieldBuilder() { + if (imageQueryBuilder_ == null) { + imageQueryBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.SearchRequest.ImageQuery, + com.google.cloud.discoveryengine.v1beta.SearchRequest.ImageQuery.Builder, + com.google.cloud.discoveryengine.v1beta.SearchRequest.ImageQueryOrBuilder>( + getImageQuery(), getParentForChildren(), isClean()); + imageQuery_ = null; + } + return imageQueryBuilder_; + } - public static com.google.cloud.discoveryengine.v1beta.SearchRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage.parseWithIOException( - PARSER, input, extensionRegistry); - } + private int pageSize_; - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } + /** + * + * + *
            +     * Maximum number of [Document][google.cloud.discoveryengine.v1beta.Document]s
            +     * to return. The maximum allowed value depends on the data type. Values above
            +     * the maximum value are coerced to the maximum value.
            +     *
            +     * * Websites with basic indexing: Default `10`, Maximum `25`.
            +     * * Websites with advanced indexing: Default `25`, Maximum `50`.
            +     * * Other: Default `50`, Maximum `100`.
            +     *
            +     * If this field is negative, an  `INVALID_ARGUMENT` is returned.
            +     * 
            + * + * int32 page_size = 4; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } + /** + * + * + *
            +     * Maximum number of [Document][google.cloud.discoveryengine.v1beta.Document]s
            +     * to return. The maximum allowed value depends on the data type. Values above
            +     * the maximum value are coerced to the maximum value.
            +     *
            +     * * Websites with basic indexing: Default `10`, Maximum `25`.
            +     * * Websites with advanced indexing: Default `25`, Maximum `50`.
            +     * * Other: Default `50`, Maximum `100`.
            +     *
            +     * If this field is negative, an  `INVALID_ARGUMENT` is returned.
            +     * 
            + * + * int32 page_size = 4; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { - public static Builder newBuilder( - com.google.cloud.discoveryengine.v1beta.SearchRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } + pageSize_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } + /** + * + * + *
            +     * Maximum number of [Document][google.cloud.discoveryengine.v1beta.Document]s
            +     * to return. The maximum allowed value depends on the data type. Values above
            +     * the maximum value are coerced to the maximum value.
            +     *
            +     * * Websites with basic indexing: Default `10`, Maximum `25`.
            +     * * Websites with advanced indexing: Default `25`, Maximum `50`.
            +     * * Other: Default `50`, Maximum `100`.
            +     *
            +     * If this field is negative, an  `INVALID_ARGUMENT` is returned.
            +     * 
            + * + * int32 page_size = 4; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + bitField0_ = (bitField0_ & ~0x00000020); + pageSize_ = 0; + onChanged(); + return this; + } - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } + private java.lang.Object pageToken_ = ""; - /** - * - * - *
            -   * Request message for
            -   * [SearchService.Search][google.cloud.discoveryengine.v1beta.SearchService.Search]
            -   * method.
            -   * 
            - * - * Protobuf type {@code google.cloud.discoveryengine.v1beta.SearchRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.SearchRequest) - com.google.cloud.discoveryengine.v1beta.SearchRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.discoveryengine.v1beta.SearchServiceProto - .internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_descriptor; + /** + * + * + *
            +     * A page token received from a previous
            +     * [SearchService.Search][google.cloud.discoveryengine.v1beta.SearchService.Search]
            +     * call. Provide this to retrieve the subsequent page.
            +     *
            +     * When paginating, all other parameters provided to
            +     * [SearchService.Search][google.cloud.discoveryengine.v1beta.SearchService.Search]
            +     * must match the call that provided the page token. Otherwise, an
            +     * `INVALID_ARGUMENT`  error is returned.
            +     * 
            + * + * string page_token = 5; + * + * @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; + } } - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( - int number) { - switch (number) { - case 11: - return internalGetParams(); - case 22: - return internalGetUserLabels(); - default: - throw new RuntimeException("Invalid map field number: " + number); + /** + * + * + *
            +     * A page token received from a previous
            +     * [SearchService.Search][google.cloud.discoveryengine.v1beta.SearchService.Search]
            +     * call. Provide this to retrieve the subsequent page.
            +     *
            +     * When paginating, all other parameters provided to
            +     * [SearchService.Search][google.cloud.discoveryengine.v1beta.SearchService.Search]
            +     * must match the call that provided the page token. Otherwise, an
            +     * `INVALID_ARGUMENT`  error is returned.
            +     * 
            + * + * string page_token = 5; + * + * @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; } } - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( - int number) { - switch (number) { - case 11: - return internalGetMutableParams(); - case 22: - return internalGetMutableUserLabels(); - default: - throw new RuntimeException("Invalid map field number: " + number); + /** + * + * + *
            +     * A page token received from a previous
            +     * [SearchService.Search][google.cloud.discoveryengine.v1beta.SearchService.Search]
            +     * call. Provide this to retrieve the subsequent page.
            +     *
            +     * When paginating, all other parameters provided to
            +     * [SearchService.Search][google.cloud.discoveryengine.v1beta.SearchService.Search]
            +     * must match the call that provided the page token. Otherwise, an
            +     * `INVALID_ARGUMENT`  error is returned.
            +     * 
            + * + * string page_token = 5; + * + * @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_ |= 0x00000040; + onChanged(); + return this; } - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.discoveryengine.v1beta.SearchServiceProto - .internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.discoveryengine.v1beta.SearchRequest.class, - com.google.cloud.discoveryengine.v1beta.SearchRequest.Builder.class); + /** + * + * + *
            +     * A page token received from a previous
            +     * [SearchService.Search][google.cloud.discoveryengine.v1beta.SearchService.Search]
            +     * call. Provide this to retrieve the subsequent page.
            +     *
            +     * When paginating, all other parameters provided to
            +     * [SearchService.Search][google.cloud.discoveryengine.v1beta.SearchService.Search]
            +     * must match the call that provided the page token. Otherwise, an
            +     * `INVALID_ARGUMENT`  error is returned.
            +     * 
            + * + * string page_token = 5; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + pageToken_ = getDefaultInstance().getPageToken(); + bitField0_ = (bitField0_ & ~0x00000040); + onChanged(); + return this; } - // Construct using com.google.cloud.discoveryengine.v1beta.SearchRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); + /** + * + * + *
            +     * A page token received from a previous
            +     * [SearchService.Search][google.cloud.discoveryengine.v1beta.SearchService.Search]
            +     * call. Provide this to retrieve the subsequent page.
            +     *
            +     * When paginating, all other parameters provided to
            +     * [SearchService.Search][google.cloud.discoveryengine.v1beta.SearchService.Search]
            +     * must match the call that provided the page token. Otherwise, an
            +     * `INVALID_ARGUMENT`  error is returned.
            +     * 
            + * + * string page_token = 5; + * + * @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_ |= 0x00000040; + onChanged(); + return this; } - private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } + private int offset_; - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - internalGetImageQueryFieldBuilder(); - internalGetDataStoreSpecsFieldBuilder(); - internalGetUserInfoFieldBuilder(); - internalGetFacetSpecsFieldBuilder(); - internalGetBoostSpecFieldBuilder(); - internalGetQueryExpansionSpecFieldBuilder(); - internalGetSpellCorrectionSpecFieldBuilder(); - internalGetContentSearchSpecFieldBuilder(); - internalGetEmbeddingSpecFieldBuilder(); - internalGetNaturalLanguageQueryUnderstandingSpecFieldBuilder(); - internalGetSearchAsYouTypeSpecFieldBuilder(); - internalGetSessionSpecFieldBuilder(); - internalGetPersonalizationSpecFieldBuilder(); - } + /** + * + * + *
            +     * A 0-indexed integer that specifies the current offset (that is, starting
            +     * result location, amongst the
            +     * [Document][google.cloud.discoveryengine.v1beta.Document]s deemed by the API
            +     * as relevant) in search results. This field is only considered if
            +     * [page_token][google.cloud.discoveryengine.v1beta.SearchRequest.page_token]
            +     * is unset.
            +     *
            +     * If this field is negative, an  `INVALID_ARGUMENT`  is returned.
            +     *
            +     * A large offset may be capped to a reasonable threshold.
            +     * 
            + * + * int32 offset = 6; + * + * @return The offset. + */ + @java.lang.Override + public int getOffset() { + return offset_; } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - bitField1_ = 0; - servingConfig_ = ""; - branch_ = ""; - query_ = ""; - imageQuery_ = null; - if (imageQueryBuilder_ != null) { - imageQueryBuilder_.dispose(); - imageQueryBuilder_ = null; - } - pageSize_ = 0; - pageToken_ = ""; - offset_ = 0; - oneBoxPageSize_ = 0; - if (dataStoreSpecsBuilder_ == null) { - dataStoreSpecs_ = java.util.Collections.emptyList(); - } else { - dataStoreSpecs_ = null; - dataStoreSpecsBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000100); - filter_ = ""; - canonicalFilter_ = ""; - orderBy_ = ""; - userInfo_ = null; - if (userInfoBuilder_ != null) { - userInfoBuilder_.dispose(); - userInfoBuilder_ = null; - } - languageCode_ = ""; - regionCode_ = ""; - if (facetSpecsBuilder_ == null) { - facetSpecs_ = java.util.Collections.emptyList(); - } else { - facetSpecs_ = null; - facetSpecsBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00008000); - boostSpec_ = null; - if (boostSpecBuilder_ != null) { - boostSpecBuilder_.dispose(); - boostSpecBuilder_ = null; - } - internalGetMutableParams().clear(); - queryExpansionSpec_ = null; - if (queryExpansionSpecBuilder_ != null) { - queryExpansionSpecBuilder_.dispose(); - queryExpansionSpecBuilder_ = null; - } - spellCorrectionSpec_ = null; - if (spellCorrectionSpecBuilder_ != null) { - spellCorrectionSpecBuilder_.dispose(); - spellCorrectionSpecBuilder_ = null; - } - userPseudoId_ = ""; - contentSearchSpec_ = null; - if (contentSearchSpecBuilder_ != null) { - contentSearchSpecBuilder_.dispose(); - contentSearchSpecBuilder_ = null; - } - embeddingSpec_ = null; - if (embeddingSpecBuilder_ != null) { - embeddingSpecBuilder_.dispose(); - embeddingSpecBuilder_ = null; - } - rankingExpression_ = ""; - rankingExpressionBackend_ = 0; - safeSearch_ = false; - internalGetMutableUserLabels().clear(); - naturalLanguageQueryUnderstandingSpec_ = null; - if (naturalLanguageQueryUnderstandingSpecBuilder_ != null) { - naturalLanguageQueryUnderstandingSpecBuilder_.dispose(); - naturalLanguageQueryUnderstandingSpecBuilder_ = null; - } - searchAsYouTypeSpec_ = null; - if (searchAsYouTypeSpecBuilder_ != null) { - searchAsYouTypeSpecBuilder_.dispose(); - searchAsYouTypeSpecBuilder_ = null; - } - session_ = ""; - sessionSpec_ = null; - if (sessionSpecBuilder_ != null) { - sessionSpecBuilder_.dispose(); - sessionSpecBuilder_ = null; - } - relevanceThreshold_ = 0; - personalizationSpec_ = null; - if (personalizationSpecBuilder_ != null) { - personalizationSpecBuilder_.dispose(); - personalizationSpecBuilder_ = null; - } + /** + * + * + *
            +     * A 0-indexed integer that specifies the current offset (that is, starting
            +     * result location, amongst the
            +     * [Document][google.cloud.discoveryengine.v1beta.Document]s deemed by the API
            +     * as relevant) in search results. This field is only considered if
            +     * [page_token][google.cloud.discoveryengine.v1beta.SearchRequest.page_token]
            +     * is unset.
            +     *
            +     * If this field is negative, an  `INVALID_ARGUMENT`  is returned.
            +     *
            +     * A large offset may be capped to a reasonable threshold.
            +     * 
            + * + * int32 offset = 6; + * + * @param value The offset to set. + * @return This builder for chaining. + */ + public Builder setOffset(int value) { + + offset_ = value; + bitField0_ |= 0x00000080; + onChanged(); return this; } - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.discoveryengine.v1beta.SearchServiceProto - .internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_descriptor; + /** + * + * + *
            +     * A 0-indexed integer that specifies the current offset (that is, starting
            +     * result location, amongst the
            +     * [Document][google.cloud.discoveryengine.v1beta.Document]s deemed by the API
            +     * as relevant) in search results. This field is only considered if
            +     * [page_token][google.cloud.discoveryengine.v1beta.SearchRequest.page_token]
            +     * is unset.
            +     *
            +     * If this field is negative, an  `INVALID_ARGUMENT`  is returned.
            +     *
            +     * A large offset may be capped to a reasonable threshold.
            +     * 
            + * + * int32 offset = 6; + * + * @return This builder for chaining. + */ + public Builder clearOffset() { + bitField0_ = (bitField0_ & ~0x00000080); + offset_ = 0; + onChanged(); + return this; } + private int oneBoxPageSize_; + + /** + * + * + *
            +     * The maximum number of results to return for OneBox.
            +     * This applies to each OneBox type individually.
            +     * Default number is 10.
            +     * 
            + * + * int32 one_box_page_size = 47; + * + * @return The oneBoxPageSize. + */ @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.SearchRequest getDefaultInstanceForType() { - return com.google.cloud.discoveryengine.v1beta.SearchRequest.getDefaultInstance(); + public int getOneBoxPageSize() { + return oneBoxPageSize_; } - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.SearchRequest build() { - com.google.cloud.discoveryengine.v1beta.SearchRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; + /** + * + * + *
            +     * The maximum number of results to return for OneBox.
            +     * This applies to each OneBox type individually.
            +     * Default number is 10.
            +     * 
            + * + * int32 one_box_page_size = 47; + * + * @param value The oneBoxPageSize to set. + * @return This builder for chaining. + */ + public Builder setOneBoxPageSize(int value) { + + oneBoxPageSize_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; } - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.SearchRequest buildPartial() { - com.google.cloud.discoveryengine.v1beta.SearchRequest result = - new com.google.cloud.discoveryengine.v1beta.SearchRequest(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { - buildPartial0(result); - } - if (bitField1_ != 0) { - buildPartial1(result); - } - onBuilt(); - return result; + /** + * + * + *
            +     * The maximum number of results to return for OneBox.
            +     * This applies to each OneBox type individually.
            +     * Default number is 10.
            +     * 
            + * + * int32 one_box_page_size = 47; + * + * @return This builder for chaining. + */ + public Builder clearOneBoxPageSize() { + bitField0_ = (bitField0_ & ~0x00000100); + oneBoxPageSize_ = 0; + onChanged(); + return this; } - private void buildPartialRepeatedFields( - com.google.cloud.discoveryengine.v1beta.SearchRequest result) { - if (dataStoreSpecsBuilder_ == null) { - if (((bitField0_ & 0x00000100) != 0)) { - dataStoreSpecs_ = java.util.Collections.unmodifiableList(dataStoreSpecs_); - bitField0_ = (bitField0_ & ~0x00000100); - } - result.dataStoreSpecs_ = dataStoreSpecs_; - } else { - result.dataStoreSpecs_ = dataStoreSpecsBuilder_.build(); - } - if (facetSpecsBuilder_ == null) { - if (((bitField0_ & 0x00008000) != 0)) { - facetSpecs_ = java.util.Collections.unmodifiableList(facetSpecs_); - bitField0_ = (bitField0_ & ~0x00008000); - } - result.facetSpecs_ = facetSpecs_; - } else { - result.facetSpecs_ = facetSpecsBuilder_.build(); + private java.util.List + dataStoreSpecs_ = java.util.Collections.emptyList(); + + private void ensureDataStoreSpecsIsMutable() { + if (!((bitField0_ & 0x00000200) != 0)) { + dataStoreSpecs_ = + new java.util.ArrayList< + com.google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec>( + dataStoreSpecs_); + bitField0_ |= 0x00000200; } } - private void buildPartial0(com.google.cloud.discoveryengine.v1beta.SearchRequest result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.servingConfig_ = servingConfig_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.branch_ = branch_; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.query_ = query_; - } - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000008) != 0)) { - result.imageQuery_ = imageQueryBuilder_ == null ? imageQuery_ : imageQueryBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - if (((from_bitField0_ & 0x00000010) != 0)) { - result.pageSize_ = pageSize_; - } - if (((from_bitField0_ & 0x00000020) != 0)) { - result.pageToken_ = pageToken_; - } - if (((from_bitField0_ & 0x00000040) != 0)) { - result.offset_ = offset_; - } - if (((from_bitField0_ & 0x00000080) != 0)) { - result.oneBoxPageSize_ = oneBoxPageSize_; - } - if (((from_bitField0_ & 0x00000200) != 0)) { - result.filter_ = filter_; - } - if (((from_bitField0_ & 0x00000400) != 0)) { - result.canonicalFilter_ = canonicalFilter_; - } - if (((from_bitField0_ & 0x00000800) != 0)) { - result.orderBy_ = orderBy_; - } - if (((from_bitField0_ & 0x00001000) != 0)) { - result.userInfo_ = userInfoBuilder_ == null ? userInfo_ : userInfoBuilder_.build(); - to_bitField0_ |= 0x00000002; - } - if (((from_bitField0_ & 0x00002000) != 0)) { - result.languageCode_ = languageCode_; - } - if (((from_bitField0_ & 0x00004000) != 0)) { - result.regionCode_ = regionCode_; - } - if (((from_bitField0_ & 0x00010000) != 0)) { - result.boostSpec_ = boostSpecBuilder_ == null ? boostSpec_ : boostSpecBuilder_.build(); - to_bitField0_ |= 0x00000004; - } - if (((from_bitField0_ & 0x00020000) != 0)) { - result.params_ = internalGetParams().build(ParamsDefaultEntryHolder.defaultEntry); - } - if (((from_bitField0_ & 0x00040000) != 0)) { - result.queryExpansionSpec_ = - queryExpansionSpecBuilder_ == null - ? queryExpansionSpec_ - : queryExpansionSpecBuilder_.build(); - to_bitField0_ |= 0x00000008; - } - if (((from_bitField0_ & 0x00080000) != 0)) { - result.spellCorrectionSpec_ = - spellCorrectionSpecBuilder_ == null - ? spellCorrectionSpec_ - : spellCorrectionSpecBuilder_.build(); - to_bitField0_ |= 0x00000010; - } - if (((from_bitField0_ & 0x00100000) != 0)) { - result.userPseudoId_ = userPseudoId_; - } - if (((from_bitField0_ & 0x00200000) != 0)) { - result.contentSearchSpec_ = - contentSearchSpecBuilder_ == null - ? contentSearchSpec_ - : contentSearchSpecBuilder_.build(); - to_bitField0_ |= 0x00000020; - } - if (((from_bitField0_ & 0x00400000) != 0)) { - result.embeddingSpec_ = - embeddingSpecBuilder_ == null ? embeddingSpec_ : embeddingSpecBuilder_.build(); - to_bitField0_ |= 0x00000040; - } - if (((from_bitField0_ & 0x00800000) != 0)) { - result.rankingExpression_ = rankingExpression_; - } - if (((from_bitField0_ & 0x01000000) != 0)) { - result.rankingExpressionBackend_ = rankingExpressionBackend_; - } - if (((from_bitField0_ & 0x02000000) != 0)) { - result.safeSearch_ = safeSearch_; - } - if (((from_bitField0_ & 0x04000000) != 0)) { - result.userLabels_ = internalGetUserLabels(); - result.userLabels_.makeImmutable(); - } - if (((from_bitField0_ & 0x08000000) != 0)) { - result.naturalLanguageQueryUnderstandingSpec_ = - naturalLanguageQueryUnderstandingSpecBuilder_ == null - ? naturalLanguageQueryUnderstandingSpec_ - : naturalLanguageQueryUnderstandingSpecBuilder_.build(); - to_bitField0_ |= 0x00000080; - } - if (((from_bitField0_ & 0x10000000) != 0)) { - result.searchAsYouTypeSpec_ = - searchAsYouTypeSpecBuilder_ == null - ? searchAsYouTypeSpec_ - : searchAsYouTypeSpecBuilder_.build(); - to_bitField0_ |= 0x00000100; - } - if (((from_bitField0_ & 0x20000000) != 0)) { - result.session_ = session_; - } - if (((from_bitField0_ & 0x40000000) != 0)) { - result.sessionSpec_ = - sessionSpecBuilder_ == null ? sessionSpec_ : sessionSpecBuilder_.build(); - to_bitField0_ |= 0x00000200; - } - if (((from_bitField0_ & 0x80000000) != 0)) { - result.relevanceThreshold_ = relevanceThreshold_; + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec, + com.google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec.Builder, + com.google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpecOrBuilder> + dataStoreSpecsBuilder_; + + /** + * + * + *
            +     * Specifications that define the specific
            +     * [DataStore][google.cloud.discoveryengine.v1beta.DataStore]s to be searched,
            +     * along with configurations for those data stores. This is only considered
            +     * for [Engine][google.cloud.discoveryengine.v1beta.Engine]s with multiple
            +     * data stores. For engines with a single data store, the specs directly under
            +     * [SearchRequest][google.cloud.discoveryengine.v1beta.SearchRequest] should
            +     * be used.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec data_store_specs = 32; + * + */ + public java.util.List + getDataStoreSpecsList() { + if (dataStoreSpecsBuilder_ == null) { + return java.util.Collections.unmodifiableList(dataStoreSpecs_); + } else { + return dataStoreSpecsBuilder_.getMessageList(); } - result.bitField0_ |= to_bitField0_; } - private void buildPartial1(com.google.cloud.discoveryengine.v1beta.SearchRequest result) { - int from_bitField1_ = bitField1_; - int to_bitField0_ = 0; - if (((from_bitField1_ & 0x00000001) != 0)) { - result.personalizationSpec_ = - personalizationSpecBuilder_ == null - ? personalizationSpec_ - : personalizationSpecBuilder_.build(); - to_bitField0_ |= 0x00000400; + /** + * + * + *
            +     * Specifications that define the specific
            +     * [DataStore][google.cloud.discoveryengine.v1beta.DataStore]s to be searched,
            +     * along with configurations for those data stores. This is only considered
            +     * for [Engine][google.cloud.discoveryengine.v1beta.Engine]s with multiple
            +     * data stores. For engines with a single data store, the specs directly under
            +     * [SearchRequest][google.cloud.discoveryengine.v1beta.SearchRequest] should
            +     * be used.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec data_store_specs = 32; + * + */ + public int getDataStoreSpecsCount() { + if (dataStoreSpecsBuilder_ == null) { + return dataStoreSpecs_.size(); + } else { + return dataStoreSpecsBuilder_.getCount(); } - result.bitField0_ |= to_bitField0_; } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.discoveryengine.v1beta.SearchRequest) { - return mergeFrom((com.google.cloud.discoveryengine.v1beta.SearchRequest) other); + /** + * + * + *
            +     * Specifications that define the specific
            +     * [DataStore][google.cloud.discoveryengine.v1beta.DataStore]s to be searched,
            +     * along with configurations for those data stores. This is only considered
            +     * for [Engine][google.cloud.discoveryengine.v1beta.Engine]s with multiple
            +     * data stores. For engines with a single data store, the specs directly under
            +     * [SearchRequest][google.cloud.discoveryengine.v1beta.SearchRequest] should
            +     * be used.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec data_store_specs = 32; + * + */ + public com.google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec getDataStoreSpecs( + int index) { + if (dataStoreSpecsBuilder_ == null) { + return dataStoreSpecs_.get(index); } else { - super.mergeFrom(other); - return this; + return dataStoreSpecsBuilder_.getMessage(index); } } - public Builder mergeFrom(com.google.cloud.discoveryengine.v1beta.SearchRequest other) { - if (other == com.google.cloud.discoveryengine.v1beta.SearchRequest.getDefaultInstance()) - return this; - if (!other.getServingConfig().isEmpty()) { - servingConfig_ = other.servingConfig_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (!other.getBranch().isEmpty()) { - branch_ = other.branch_; - bitField0_ |= 0x00000002; - onChanged(); - } - if (!other.getQuery().isEmpty()) { - query_ = other.query_; - bitField0_ |= 0x00000004; - onChanged(); - } - if (other.hasImageQuery()) { - mergeImageQuery(other.getImageQuery()); - } - if (other.getPageSize() != 0) { - setPageSize(other.getPageSize()); - } - if (!other.getPageToken().isEmpty()) { - pageToken_ = other.pageToken_; - bitField0_ |= 0x00000020; - onChanged(); - } - if (other.getOffset() != 0) { - setOffset(other.getOffset()); - } - if (other.getOneBoxPageSize() != 0) { - setOneBoxPageSize(other.getOneBoxPageSize()); - } + /** + * + * + *
            +     * Specifications that define the specific
            +     * [DataStore][google.cloud.discoveryengine.v1beta.DataStore]s to be searched,
            +     * along with configurations for those data stores. This is only considered
            +     * for [Engine][google.cloud.discoveryengine.v1beta.Engine]s with multiple
            +     * data stores. For engines with a single data store, the specs directly under
            +     * [SearchRequest][google.cloud.discoveryengine.v1beta.SearchRequest] should
            +     * be used.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec data_store_specs = 32; + * + */ + public Builder setDataStoreSpecs( + int index, com.google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec value) { if (dataStoreSpecsBuilder_ == null) { - if (!other.dataStoreSpecs_.isEmpty()) { - if (dataStoreSpecs_.isEmpty()) { - dataStoreSpecs_ = other.dataStoreSpecs_; - bitField0_ = (bitField0_ & ~0x00000100); - } else { - ensureDataStoreSpecsIsMutable(); - dataStoreSpecs_.addAll(other.dataStoreSpecs_); - } - onChanged(); - } - } else { - if (!other.dataStoreSpecs_.isEmpty()) { - if (dataStoreSpecsBuilder_.isEmpty()) { - dataStoreSpecsBuilder_.dispose(); - dataStoreSpecsBuilder_ = null; - dataStoreSpecs_ = other.dataStoreSpecs_; - bitField0_ = (bitField0_ & ~0x00000100); - dataStoreSpecsBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders - ? internalGetDataStoreSpecsFieldBuilder() - : null; - } else { - dataStoreSpecsBuilder_.addAllMessages(other.dataStoreSpecs_); - } + if (value == null) { + throw new NullPointerException(); } - } - if (!other.getFilter().isEmpty()) { - filter_ = other.filter_; - bitField0_ |= 0x00000200; - onChanged(); - } - if (!other.getCanonicalFilter().isEmpty()) { - canonicalFilter_ = other.canonicalFilter_; - bitField0_ |= 0x00000400; - onChanged(); - } - if (!other.getOrderBy().isEmpty()) { - orderBy_ = other.orderBy_; - bitField0_ |= 0x00000800; - onChanged(); - } - if (other.hasUserInfo()) { - mergeUserInfo(other.getUserInfo()); - } - if (!other.getLanguageCode().isEmpty()) { - languageCode_ = other.languageCode_; - bitField0_ |= 0x00002000; - onChanged(); - } - if (!other.getRegionCode().isEmpty()) { - regionCode_ = other.regionCode_; - bitField0_ |= 0x00004000; + ensureDataStoreSpecsIsMutable(); + dataStoreSpecs_.set(index, value); onChanged(); - } - if (facetSpecsBuilder_ == null) { - if (!other.facetSpecs_.isEmpty()) { - if (facetSpecs_.isEmpty()) { - facetSpecs_ = other.facetSpecs_; - bitField0_ = (bitField0_ & ~0x00008000); - } else { - ensureFacetSpecsIsMutable(); - facetSpecs_.addAll(other.facetSpecs_); - } - onChanged(); - } } else { - if (!other.facetSpecs_.isEmpty()) { - if (facetSpecsBuilder_.isEmpty()) { - facetSpecsBuilder_.dispose(); - facetSpecsBuilder_ = null; - facetSpecs_ = other.facetSpecs_; - bitField0_ = (bitField0_ & ~0x00008000); - facetSpecsBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders - ? internalGetFacetSpecsFieldBuilder() - : null; - } else { - facetSpecsBuilder_.addAllMessages(other.facetSpecs_); - } - } - } - if (other.hasBoostSpec()) { - mergeBoostSpec(other.getBoostSpec()); - } - internalGetMutableParams().mergeFrom(other.internalGetParams()); - bitField0_ |= 0x00020000; - if (other.hasQueryExpansionSpec()) { - mergeQueryExpansionSpec(other.getQueryExpansionSpec()); - } - if (other.hasSpellCorrectionSpec()) { - mergeSpellCorrectionSpec(other.getSpellCorrectionSpec()); + dataStoreSpecsBuilder_.setMessage(index, value); } - if (!other.getUserPseudoId().isEmpty()) { - userPseudoId_ = other.userPseudoId_; - bitField0_ |= 0x00100000; + return this; + } + + /** + * + * + *
            +     * Specifications that define the specific
            +     * [DataStore][google.cloud.discoveryengine.v1beta.DataStore]s to be searched,
            +     * along with configurations for those data stores. This is only considered
            +     * for [Engine][google.cloud.discoveryengine.v1beta.Engine]s with multiple
            +     * data stores. For engines with a single data store, the specs directly under
            +     * [SearchRequest][google.cloud.discoveryengine.v1beta.SearchRequest] should
            +     * be used.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec data_store_specs = 32; + * + */ + public Builder setDataStoreSpecs( + int index, + com.google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec.Builder + builderForValue) { + if (dataStoreSpecsBuilder_ == null) { + ensureDataStoreSpecsIsMutable(); + dataStoreSpecs_.set(index, builderForValue.build()); onChanged(); + } else { + dataStoreSpecsBuilder_.setMessage(index, builderForValue.build()); } - if (other.hasContentSearchSpec()) { - mergeContentSearchSpec(other.getContentSearchSpec()); - } - if (other.hasEmbeddingSpec()) { - mergeEmbeddingSpec(other.getEmbeddingSpec()); - } - if (!other.getRankingExpression().isEmpty()) { - rankingExpression_ = other.rankingExpression_; - bitField0_ |= 0x00800000; + return this; + } + + /** + * + * + *
            +     * Specifications that define the specific
            +     * [DataStore][google.cloud.discoveryengine.v1beta.DataStore]s to be searched,
            +     * along with configurations for those data stores. This is only considered
            +     * for [Engine][google.cloud.discoveryengine.v1beta.Engine]s with multiple
            +     * data stores. For engines with a single data store, the specs directly under
            +     * [SearchRequest][google.cloud.discoveryengine.v1beta.SearchRequest] should
            +     * be used.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec data_store_specs = 32; + * + */ + public Builder addDataStoreSpecs( + com.google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec value) { + if (dataStoreSpecsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDataStoreSpecsIsMutable(); + dataStoreSpecs_.add(value); onChanged(); + } else { + dataStoreSpecsBuilder_.addMessage(value); } - if (other.rankingExpressionBackend_ != 0) { - setRankingExpressionBackendValue(other.getRankingExpressionBackendValue()); - } - if (other.getSafeSearch() != false) { - setSafeSearch(other.getSafeSearch()); - } - internalGetMutableUserLabels().mergeFrom(other.internalGetUserLabels()); - bitField0_ |= 0x04000000; - if (other.hasNaturalLanguageQueryUnderstandingSpec()) { - mergeNaturalLanguageQueryUnderstandingSpec( - other.getNaturalLanguageQueryUnderstandingSpec()); + return this; + } + + /** + * + * + *
            +     * Specifications that define the specific
            +     * [DataStore][google.cloud.discoveryengine.v1beta.DataStore]s to be searched,
            +     * along with configurations for those data stores. This is only considered
            +     * for [Engine][google.cloud.discoveryengine.v1beta.Engine]s with multiple
            +     * data stores. For engines with a single data store, the specs directly under
            +     * [SearchRequest][google.cloud.discoveryengine.v1beta.SearchRequest] should
            +     * be used.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec data_store_specs = 32; + * + */ + public Builder addDataStoreSpecs( + int index, com.google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec value) { + if (dataStoreSpecsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDataStoreSpecsIsMutable(); + dataStoreSpecs_.add(index, value); + onChanged(); + } else { + dataStoreSpecsBuilder_.addMessage(index, value); } - if (other.hasSearchAsYouTypeSpec()) { - mergeSearchAsYouTypeSpec(other.getSearchAsYouTypeSpec()); + return this; + } + + /** + * + * + *
            +     * Specifications that define the specific
            +     * [DataStore][google.cloud.discoveryengine.v1beta.DataStore]s to be searched,
            +     * along with configurations for those data stores. This is only considered
            +     * for [Engine][google.cloud.discoveryengine.v1beta.Engine]s with multiple
            +     * data stores. For engines with a single data store, the specs directly under
            +     * [SearchRequest][google.cloud.discoveryengine.v1beta.SearchRequest] should
            +     * be used.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec data_store_specs = 32; + * + */ + public Builder addDataStoreSpecs( + com.google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec.Builder + builderForValue) { + if (dataStoreSpecsBuilder_ == null) { + ensureDataStoreSpecsIsMutable(); + dataStoreSpecs_.add(builderForValue.build()); + onChanged(); + } else { + dataStoreSpecsBuilder_.addMessage(builderForValue.build()); } - if (!other.getSession().isEmpty()) { - session_ = other.session_; - bitField0_ |= 0x20000000; + return this; + } + + /** + * + * + *
            +     * Specifications that define the specific
            +     * [DataStore][google.cloud.discoveryengine.v1beta.DataStore]s to be searched,
            +     * along with configurations for those data stores. This is only considered
            +     * for [Engine][google.cloud.discoveryengine.v1beta.Engine]s with multiple
            +     * data stores. For engines with a single data store, the specs directly under
            +     * [SearchRequest][google.cloud.discoveryengine.v1beta.SearchRequest] should
            +     * be used.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec data_store_specs = 32; + * + */ + public Builder addDataStoreSpecs( + int index, + com.google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec.Builder + builderForValue) { + if (dataStoreSpecsBuilder_ == null) { + ensureDataStoreSpecsIsMutable(); + dataStoreSpecs_.add(index, builderForValue.build()); onChanged(); + } else { + dataStoreSpecsBuilder_.addMessage(index, builderForValue.build()); } - if (other.hasSessionSpec()) { - mergeSessionSpec(other.getSessionSpec()); + return this; + } + + /** + * + * + *
            +     * Specifications that define the specific
            +     * [DataStore][google.cloud.discoveryengine.v1beta.DataStore]s to be searched,
            +     * along with configurations for those data stores. This is only considered
            +     * for [Engine][google.cloud.discoveryengine.v1beta.Engine]s with multiple
            +     * data stores. For engines with a single data store, the specs directly under
            +     * [SearchRequest][google.cloud.discoveryengine.v1beta.SearchRequest] should
            +     * be used.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec data_store_specs = 32; + * + */ + public Builder addAllDataStoreSpecs( + java.lang.Iterable< + ? extends com.google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec> + values) { + if (dataStoreSpecsBuilder_ == null) { + ensureDataStoreSpecsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, dataStoreSpecs_); + onChanged(); + } else { + dataStoreSpecsBuilder_.addAllMessages(values); } - if (other.relevanceThreshold_ != 0) { - setRelevanceThresholdValue(other.getRelevanceThresholdValue()); + return this; + } + + /** + * + * + *
            +     * Specifications that define the specific
            +     * [DataStore][google.cloud.discoveryengine.v1beta.DataStore]s to be searched,
            +     * along with configurations for those data stores. This is only considered
            +     * for [Engine][google.cloud.discoveryengine.v1beta.Engine]s with multiple
            +     * data stores. For engines with a single data store, the specs directly under
            +     * [SearchRequest][google.cloud.discoveryengine.v1beta.SearchRequest] should
            +     * be used.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec data_store_specs = 32; + * + */ + public Builder clearDataStoreSpecs() { + if (dataStoreSpecsBuilder_ == null) { + dataStoreSpecs_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000200); + onChanged(); + } else { + dataStoreSpecsBuilder_.clear(); } - if (other.hasPersonalizationSpec()) { - mergePersonalizationSpec(other.getPersonalizationSpec()); + return this; + } + + /** + * + * + *
            +     * Specifications that define the specific
            +     * [DataStore][google.cloud.discoveryengine.v1beta.DataStore]s to be searched,
            +     * along with configurations for those data stores. This is only considered
            +     * for [Engine][google.cloud.discoveryengine.v1beta.Engine]s with multiple
            +     * data stores. For engines with a single data store, the specs directly under
            +     * [SearchRequest][google.cloud.discoveryengine.v1beta.SearchRequest] should
            +     * be used.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec data_store_specs = 32; + * + */ + public Builder removeDataStoreSpecs(int index) { + if (dataStoreSpecsBuilder_ == null) { + ensureDataStoreSpecsIsMutable(); + dataStoreSpecs_.remove(index); + onChanged(); + } else { + dataStoreSpecsBuilder_.remove(index); } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); return this; } - @java.lang.Override - public final boolean isInitialized() { - return true; + /** + * + * + *
            +     * Specifications that define the specific
            +     * [DataStore][google.cloud.discoveryengine.v1beta.DataStore]s to be searched,
            +     * along with configurations for those data stores. This is only considered
            +     * for [Engine][google.cloud.discoveryengine.v1beta.Engine]s with multiple
            +     * data stores. For engines with a single data store, the specs directly under
            +     * [SearchRequest][google.cloud.discoveryengine.v1beta.SearchRequest] should
            +     * be used.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec data_store_specs = 32; + * + */ + public com.google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec.Builder + getDataStoreSpecsBuilder(int index) { + return internalGetDataStoreSpecsFieldBuilder().getBuilder(index); } - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); + /** + * + * + *
            +     * Specifications that define the specific
            +     * [DataStore][google.cloud.discoveryengine.v1beta.DataStore]s to be searched,
            +     * along with configurations for those data stores. This is only considered
            +     * for [Engine][google.cloud.discoveryengine.v1beta.Engine]s with multiple
            +     * data stores. For engines with a single data store, the specs directly under
            +     * [SearchRequest][google.cloud.discoveryengine.v1beta.SearchRequest] should
            +     * be used.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec data_store_specs = 32; + * + */ + public com.google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpecOrBuilder + getDataStoreSpecsOrBuilder(int index) { + if (dataStoreSpecsBuilder_ == null) { + return dataStoreSpecs_.get(index); + } else { + return dataStoreSpecsBuilder_.getMessageOrBuilder(index); } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - servingConfig_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: - { - branch_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 26: - { - query_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - break; - } // case 26 - case 32: - { - pageSize_ = input.readInt32(); - bitField0_ |= 0x00000010; - break; - } // case 32 - case 42: - { - pageToken_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000020; - break; - } // case 42 - case 48: - { - offset_ = input.readInt32(); - bitField0_ |= 0x00000040; - break; - } // case 48 - case 58: - { - filter_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000200; - break; - } // case 58 - case 66: - { - orderBy_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000800; - break; - } // case 66 - case 74: - { - com.google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec m = - input.readMessage( - com.google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec.parser(), - extensionRegistry); - if (facetSpecsBuilder_ == null) { - ensureFacetSpecsIsMutable(); - facetSpecs_.add(m); - } else { - facetSpecsBuilder_.addMessage(m); - } - break; - } // case 74 - case 82: - { - input.readMessage( - internalGetBoostSpecFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00010000; - break; - } // case 82 - case 90: - { - com.google.protobuf.MapEntry params__ = - input.readMessage( - ParamsDefaultEntryHolder.defaultEntry.getParserForType(), - extensionRegistry); - internalGetMutableParams() - .ensureBuilderMap() - .put(params__.getKey(), params__.getValue()); - bitField0_ |= 0x00020000; - break; - } // case 90 - case 106: - { - input.readMessage( - internalGetQueryExpansionSpecFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00040000; - break; - } // case 106 - case 114: - { - input.readMessage( - internalGetSpellCorrectionSpecFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00080000; - break; - } // case 114 - case 122: - { - userPseudoId_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00100000; - break; - } // case 122 - case 154: - { - input.readMessage( - internalGetImageQueryFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000008; - break; - } // case 154 - case 160: - { - safeSearch_ = input.readBool(); - bitField0_ |= 0x02000000; - break; - } // case 160 - case 170: - { - input.readMessage( - internalGetUserInfoFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00001000; - break; - } // case 170 - case 178: - { - com.google.protobuf.MapEntry userLabels__ = - input.readMessage( - UserLabelsDefaultEntryHolder.defaultEntry.getParserForType(), - extensionRegistry); - internalGetMutableUserLabels() - .getMutableMap() - .put(userLabels__.getKey(), userLabels__.getValue()); - bitField0_ |= 0x04000000; - break; - } // case 178 - case 186: - { - input.readMessage( - internalGetEmbeddingSpecFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00400000; - break; - } // case 186 - case 194: - { - input.readMessage( - internalGetContentSearchSpecFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00200000; - break; - } // case 194 - case 210: - { - rankingExpression_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00800000; - break; - } // case 210 - case 226: - { - input.readMessage( - internalGetNaturalLanguageQueryUnderstandingSpecFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x08000000; - break; - } // case 226 - case 234: - { - canonicalFilter_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000400; - break; - } // case 234 - case 250: - { - input.readMessage( - internalGetSearchAsYouTypeSpecFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x10000000; - break; - } // case 250 - case 258: - { - com.google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec m = - input.readMessage( - com.google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec - .parser(), - extensionRegistry); - if (dataStoreSpecsBuilder_ == null) { - ensureDataStoreSpecsIsMutable(); - dataStoreSpecs_.add(m); - } else { - dataStoreSpecsBuilder_.addMessage(m); - } - break; - } // case 258 - case 282: - { - languageCode_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00002000; - break; - } // case 282 - case 290: - { - regionCode_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00004000; - break; - } // case 290 - case 330: - { - session_ = input.readStringRequireUtf8(); - bitField0_ |= 0x20000000; - break; - } // case 330 - case 338: - { - input.readMessage( - internalGetSessionSpecFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x40000000; - break; - } // case 338 - case 352: - { - relevanceThreshold_ = input.readEnum(); - bitField0_ |= 0x80000000; - break; - } // case 352 - case 370: - { - input.readMessage( - internalGetPersonalizationSpecFieldBuilder().getBuilder(), extensionRegistry); - bitField1_ |= 0x00000001; - break; - } // case 370 - case 376: - { - oneBoxPageSize_ = input.readInt32(); - bitField0_ |= 0x00000080; - break; - } // case 376 - case 424: - { - rankingExpressionBackend_ = input.readEnum(); - bitField0_ |= 0x01000000; - break; - } // case 424 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally + } + + /** + * + * + *
            +     * Specifications that define the specific
            +     * [DataStore][google.cloud.discoveryengine.v1beta.DataStore]s to be searched,
            +     * along with configurations for those data stores. This is only considered
            +     * for [Engine][google.cloud.discoveryengine.v1beta.Engine]s with multiple
            +     * data stores. For engines with a single data store, the specs directly under
            +     * [SearchRequest][google.cloud.discoveryengine.v1beta.SearchRequest] should
            +     * be used.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec data_store_specs = 32; + * + */ + public java.util.List< + ? extends com.google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpecOrBuilder> + getDataStoreSpecsOrBuilderList() { + if (dataStoreSpecsBuilder_ != null) { + return dataStoreSpecsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(dataStoreSpecs_); + } + } + + /** + * + * + *
            +     * Specifications that define the specific
            +     * [DataStore][google.cloud.discoveryengine.v1beta.DataStore]s to be searched,
            +     * along with configurations for those data stores. This is only considered
            +     * for [Engine][google.cloud.discoveryengine.v1beta.Engine]s with multiple
            +     * data stores. For engines with a single data store, the specs directly under
            +     * [SearchRequest][google.cloud.discoveryengine.v1beta.SearchRequest] should
            +     * be used.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec data_store_specs = 32; + * + */ + public com.google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec.Builder + addDataStoreSpecsBuilder() { + return internalGetDataStoreSpecsFieldBuilder() + .addBuilder( + com.google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec + .getDefaultInstance()); + } + + /** + * + * + *
            +     * Specifications that define the specific
            +     * [DataStore][google.cloud.discoveryengine.v1beta.DataStore]s to be searched,
            +     * along with configurations for those data stores. This is only considered
            +     * for [Engine][google.cloud.discoveryengine.v1beta.Engine]s with multiple
            +     * data stores. For engines with a single data store, the specs directly under
            +     * [SearchRequest][google.cloud.discoveryengine.v1beta.SearchRequest] should
            +     * be used.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec data_store_specs = 32; + * + */ + public com.google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec.Builder + addDataStoreSpecsBuilder(int index) { + return internalGetDataStoreSpecsFieldBuilder() + .addBuilder( + index, + com.google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec + .getDefaultInstance()); + } + + /** + * + * + *
            +     * Specifications that define the specific
            +     * [DataStore][google.cloud.discoveryengine.v1beta.DataStore]s to be searched,
            +     * along with configurations for those data stores. This is only considered
            +     * for [Engine][google.cloud.discoveryengine.v1beta.Engine]s with multiple
            +     * data stores. For engines with a single data store, the specs directly under
            +     * [SearchRequest][google.cloud.discoveryengine.v1beta.SearchRequest] should
            +     * be used.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec data_store_specs = 32; + * + */ + public java.util.List< + com.google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec.Builder> + getDataStoreSpecsBuilderList() { + return internalGetDataStoreSpecsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec, + com.google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec.Builder, + com.google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpecOrBuilder> + internalGetDataStoreSpecsFieldBuilder() { + if (dataStoreSpecsBuilder_ == null) { + dataStoreSpecsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec, + com.google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec.Builder, + com.google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpecOrBuilder>( + dataStoreSpecs_, + ((bitField0_ & 0x00000200) != 0), + getParentForChildren(), + isClean()); + dataStoreSpecs_ = null; + } + return dataStoreSpecsBuilder_; + } + + private int numResultsPerDataStore_; + + /** + * + * + *
            +     * Optional. The maximum number of results to retrieve from each data store.
            +     * If not specified, it will use the
            +     * [SearchRequest.DataStoreSpec.num_results][google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec.num_results]
            +     * if provided, otherwise there is no limit.
            +     * 
            + * + * int32 num_results_per_data_store = 65 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The numResultsPerDataStore. + */ + @java.lang.Override + public int getNumResultsPerDataStore() { + return numResultsPerDataStore_; + } + + /** + * + * + *
            +     * Optional. The maximum number of results to retrieve from each data store.
            +     * If not specified, it will use the
            +     * [SearchRequest.DataStoreSpec.num_results][google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec.num_results]
            +     * if provided, otherwise there is no limit.
            +     * 
            + * + * int32 num_results_per_data_store = 65 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The numResultsPerDataStore to set. + * @return This builder for chaining. + */ + public Builder setNumResultsPerDataStore(int value) { + + numResultsPerDataStore_ = value; + bitField0_ |= 0x00000400; + onChanged(); return this; } - private int bitField0_; - private int bitField1_; + /** + * + * + *
            +     * Optional. The maximum number of results to retrieve from each data store.
            +     * If not specified, it will use the
            +     * [SearchRequest.DataStoreSpec.num_results][google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec.num_results]
            +     * if provided, otherwise there is no limit.
            +     * 
            + * + * int32 num_results_per_data_store = 65 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearNumResultsPerDataStore() { + bitField0_ = (bitField0_ & ~0x00000400); + numResultsPerDataStore_ = 0; + onChanged(); + return this; + } - private java.lang.Object servingConfig_ = ""; + private java.lang.Object filter_ = ""; /** * * *
            -     * Required. The resource name of the Search serving config, such as
            -     * `projects/*/locations/global/collections/default_collection/engines/*/servingConfigs/default_serving_config`,
            -     * or
            -     * `projects/*/locations/global/collections/default_collection/dataStores/default_data_store/servingConfigs/default_serving_config`.
            -     * This field is used to identify the serving configuration name, set
            -     * of models used to make the search.
            +     * The filter syntax consists of an expression language for constructing a
            +     * predicate from one or more fields of the documents being filtered. Filter
            +     * expression is case-sensitive.
            +     *
            +     * If this field is unrecognizable, an  `INVALID_ARGUMENT`  is returned.
            +     *
            +     * Filtering in Vertex AI Search is done by mapping the LHS filter key to a
            +     * key property defined in the Vertex AI Search backend -- this mapping is
            +     * defined by the customer in their schema. For example a media customer might
            +     * have a field 'name' in their schema. In this case the filter would look
            +     * like this: filter --> name:'ANY("king kong")'
            +     *
            +     * For more information about filtering including syntax and filter
            +     * operators, see
            +     * [Filter](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata)
                  * 
            * - * - * string serving_config = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * + * string filter = 7; * - * @return The servingConfig. + * @return The filter. */ - public java.lang.String getServingConfig() { - java.lang.Object ref = servingConfig_; + 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(); - servingConfig_ = s; + filter_ = s; return s; } else { return (java.lang.String) ref; @@ -34377,26 +46339,33 @@ public java.lang.String getServingConfig() { * * *
            -     * Required. The resource name of the Search serving config, such as
            -     * `projects/*/locations/global/collections/default_collection/engines/*/servingConfigs/default_serving_config`,
            -     * or
            -     * `projects/*/locations/global/collections/default_collection/dataStores/default_data_store/servingConfigs/default_serving_config`.
            -     * This field is used to identify the serving configuration name, set
            -     * of models used to make the search.
            +     * The filter syntax consists of an expression language for constructing a
            +     * predicate from one or more fields of the documents being filtered. Filter
            +     * expression is case-sensitive.
            +     *
            +     * If this field is unrecognizable, an  `INVALID_ARGUMENT`  is returned.
            +     *
            +     * Filtering in Vertex AI Search is done by mapping the LHS filter key to a
            +     * key property defined in the Vertex AI Search backend -- this mapping is
            +     * defined by the customer in their schema. For example a media customer might
            +     * have a field 'name' in their schema. In this case the filter would look
            +     * like this: filter --> name:'ANY("king kong")'
            +     *
            +     * For more information about filtering including syntax and filter
            +     * operators, see
            +     * [Filter](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata)
                  * 
            * - * - * string serving_config = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * + * string filter = 7; * - * @return The bytes for servingConfig. + * @return The bytes for filter. */ - public com.google.protobuf.ByteString getServingConfigBytes() { - java.lang.Object ref = servingConfig_; + 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); - servingConfig_ = b; + filter_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; @@ -34407,27 +46376,34 @@ public com.google.protobuf.ByteString getServingConfigBytes() { * * *
            -     * Required. The resource name of the Search serving config, such as
            -     * `projects/*/locations/global/collections/default_collection/engines/*/servingConfigs/default_serving_config`,
            -     * or
            -     * `projects/*/locations/global/collections/default_collection/dataStores/default_data_store/servingConfigs/default_serving_config`.
            -     * This field is used to identify the serving configuration name, set
            -     * of models used to make the search.
            +     * The filter syntax consists of an expression language for constructing a
            +     * predicate from one or more fields of the documents being filtered. Filter
            +     * expression is case-sensitive.
            +     *
            +     * If this field is unrecognizable, an  `INVALID_ARGUMENT`  is returned.
            +     *
            +     * Filtering in Vertex AI Search is done by mapping the LHS filter key to a
            +     * key property defined in the Vertex AI Search backend -- this mapping is
            +     * defined by the customer in their schema. For example a media customer might
            +     * have a field 'name' in their schema. In this case the filter would look
            +     * like this: filter --> name:'ANY("king kong")'
            +     *
            +     * For more information about filtering including syntax and filter
            +     * operators, see
            +     * [Filter](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata)
                  * 
            * - * - * string serving_config = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * + * string filter = 7; * - * @param value The servingConfig to set. + * @param value The filter to set. * @return This builder for chaining. */ - public Builder setServingConfig(java.lang.String value) { + public Builder setFilter(java.lang.String value) { if (value == null) { throw new NullPointerException(); } - servingConfig_ = value; - bitField0_ |= 0x00000001; + filter_ = value; + bitField0_ |= 0x00000800; onChanged(); return this; } @@ -34436,23 +46412,30 @@ public Builder setServingConfig(java.lang.String value) { * * *
            -     * Required. The resource name of the Search serving config, such as
            -     * `projects/*/locations/global/collections/default_collection/engines/*/servingConfigs/default_serving_config`,
            -     * or
            -     * `projects/*/locations/global/collections/default_collection/dataStores/default_data_store/servingConfigs/default_serving_config`.
            -     * This field is used to identify the serving configuration name, set
            -     * of models used to make the search.
            +     * The filter syntax consists of an expression language for constructing a
            +     * predicate from one or more fields of the documents being filtered. Filter
            +     * expression is case-sensitive.
            +     *
            +     * If this field is unrecognizable, an  `INVALID_ARGUMENT`  is returned.
            +     *
            +     * Filtering in Vertex AI Search is done by mapping the LHS filter key to a
            +     * key property defined in the Vertex AI Search backend -- this mapping is
            +     * defined by the customer in their schema. For example a media customer might
            +     * have a field 'name' in their schema. In this case the filter would look
            +     * like this: filter --> name:'ANY("king kong")'
            +     *
            +     * For more information about filtering including syntax and filter
            +     * operators, see
            +     * [Filter](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata)
                  * 
            * - * - * string serving_config = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * + * string filter = 7; * * @return This builder for chaining. */ - public Builder clearServingConfig() { - servingConfig_ = getDefaultInstance().getServingConfig(); - bitField0_ = (bitField0_ & ~0x00000001); + public Builder clearFilter() { + filter_ = getDefaultInstance().getFilter(); + bitField0_ = (bitField0_ & ~0x00000800); onChanged(); return this; } @@ -34461,55 +46444,69 @@ public Builder clearServingConfig() { * * *
            -     * Required. The resource name of the Search serving config, such as
            -     * `projects/*/locations/global/collections/default_collection/engines/*/servingConfigs/default_serving_config`,
            -     * or
            -     * `projects/*/locations/global/collections/default_collection/dataStores/default_data_store/servingConfigs/default_serving_config`.
            -     * This field is used to identify the serving configuration name, set
            -     * of models used to make the search.
            +     * The filter syntax consists of an expression language for constructing a
            +     * predicate from one or more fields of the documents being filtered. Filter
            +     * expression is case-sensitive.
            +     *
            +     * If this field is unrecognizable, an  `INVALID_ARGUMENT`  is returned.
            +     *
            +     * Filtering in Vertex AI Search is done by mapping the LHS filter key to a
            +     * key property defined in the Vertex AI Search backend -- this mapping is
            +     * defined by the customer in their schema. For example a media customer might
            +     * have a field 'name' in their schema. In this case the filter would look
            +     * like this: filter --> name:'ANY("king kong")'
            +     *
            +     * For more information about filtering including syntax and filter
            +     * operators, see
            +     * [Filter](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata)
                  * 
            * - * - * string serving_config = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * + * string filter = 7; * - * @param value The bytes for servingConfig to set. + * @param value The bytes for filter to set. * @return This builder for chaining. */ - public Builder setServingConfigBytes(com.google.protobuf.ByteString value) { + public Builder setFilterBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); - servingConfig_ = value; - bitField0_ |= 0x00000001; + filter_ = value; + bitField0_ |= 0x00000800; onChanged(); return this; } - private java.lang.Object branch_ = ""; + private java.lang.Object canonicalFilter_ = ""; /** * * *
            -     * The branch resource name, such as
            -     * `projects/*/locations/global/collections/default_collection/dataStores/default_data_store/branches/0`.
            +     * The default filter that is applied when a user performs a search without
            +     * checking any filters on the search page.
                  *
            -     * Use `default_branch` as the branch ID or leave this field empty, to search
            -     * documents under the default branch.
            +     * The filter applied to every search request when quality improvement such as
            +     * query expansion is needed. In the case a query does not have a sufficient
            +     * amount of results this filter will be used to determine whether or not to
            +     * enable the query expansion flow. The original filter will still be used for
            +     * the query expanded search.
            +     * This field is strongly recommended to achieve high search quality.
            +     *
            +     * For more information about filter syntax, see
            +     * [SearchRequest.filter][google.cloud.discoveryengine.v1beta.SearchRequest.filter].
                  * 
            * - * string branch = 2 [(.google.api.resource_reference) = { ... } + * string canonical_filter = 29; * - * @return The branch. + * @return The canonicalFilter. */ - public java.lang.String getBranch() { - java.lang.Object ref = branch_; + public java.lang.String getCanonicalFilter() { + java.lang.Object ref = canonicalFilter_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); - branch_ = s; + canonicalFilter_ = s; return s; } else { return (java.lang.String) ref; @@ -34520,23 +46517,30 @@ public java.lang.String getBranch() { * * *
            -     * The branch resource name, such as
            -     * `projects/*/locations/global/collections/default_collection/dataStores/default_data_store/branches/0`.
            +     * The default filter that is applied when a user performs a search without
            +     * checking any filters on the search page.
                  *
            -     * Use `default_branch` as the branch ID or leave this field empty, to search
            -     * documents under the default branch.
            +     * The filter applied to every search request when quality improvement such as
            +     * query expansion is needed. In the case a query does not have a sufficient
            +     * amount of results this filter will be used to determine whether or not to
            +     * enable the query expansion flow. The original filter will still be used for
            +     * the query expanded search.
            +     * This field is strongly recommended to achieve high search quality.
            +     *
            +     * For more information about filter syntax, see
            +     * [SearchRequest.filter][google.cloud.discoveryengine.v1beta.SearchRequest.filter].
                  * 
            * - * string branch = 2 [(.google.api.resource_reference) = { ... } + * string canonical_filter = 29; * - * @return The bytes for branch. + * @return The bytes for canonicalFilter. */ - public com.google.protobuf.ByteString getBranchBytes() { - java.lang.Object ref = branch_; + public com.google.protobuf.ByteString getCanonicalFilterBytes() { + java.lang.Object ref = canonicalFilter_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - branch_ = b; + canonicalFilter_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; @@ -34547,24 +46551,31 @@ public com.google.protobuf.ByteString getBranchBytes() { * * *
            -     * The branch resource name, such as
            -     * `projects/*/locations/global/collections/default_collection/dataStores/default_data_store/branches/0`.
            +     * The default filter that is applied when a user performs a search without
            +     * checking any filters on the search page.
                  *
            -     * Use `default_branch` as the branch ID or leave this field empty, to search
            -     * documents under the default branch.
            +     * The filter applied to every search request when quality improvement such as
            +     * query expansion is needed. In the case a query does not have a sufficient
            +     * amount of results this filter will be used to determine whether or not to
            +     * enable the query expansion flow. The original filter will still be used for
            +     * the query expanded search.
            +     * This field is strongly recommended to achieve high search quality.
            +     *
            +     * For more information about filter syntax, see
            +     * [SearchRequest.filter][google.cloud.discoveryengine.v1beta.SearchRequest.filter].
                  * 
            * - * string branch = 2 [(.google.api.resource_reference) = { ... } + * string canonical_filter = 29; * - * @param value The branch to set. + * @param value The canonicalFilter to set. * @return This builder for chaining. */ - public Builder setBranch(java.lang.String value) { + public Builder setCanonicalFilter(java.lang.String value) { if (value == null) { throw new NullPointerException(); } - branch_ = value; - bitField0_ |= 0x00000002; + canonicalFilter_ = value; + bitField0_ |= 0x00001000; onChanged(); return this; } @@ -34573,20 +46584,27 @@ public Builder setBranch(java.lang.String value) { * * *
            -     * The branch resource name, such as
            -     * `projects/*/locations/global/collections/default_collection/dataStores/default_data_store/branches/0`.
            +     * The default filter that is applied when a user performs a search without
            +     * checking any filters on the search page.
                  *
            -     * Use `default_branch` as the branch ID or leave this field empty, to search
            -     * documents under the default branch.
            +     * The filter applied to every search request when quality improvement such as
            +     * query expansion is needed. In the case a query does not have a sufficient
            +     * amount of results this filter will be used to determine whether or not to
            +     * enable the query expansion flow. The original filter will still be used for
            +     * the query expanded search.
            +     * This field is strongly recommended to achieve high search quality.
            +     *
            +     * For more information about filter syntax, see
            +     * [SearchRequest.filter][google.cloud.discoveryengine.v1beta.SearchRequest.filter].
                  * 
            * - * string branch = 2 [(.google.api.resource_reference) = { ... } + * string canonical_filter = 29; * * @return This builder for chaining. */ - public Builder clearBranch() { - branch_ = getDefaultInstance().getBranch(); - bitField0_ = (bitField0_ & ~0x00000002); + public Builder clearCanonicalFilter() { + canonicalFilter_ = getDefaultInstance().getCanonicalFilter(); + bitField0_ = (bitField0_ & ~0x00001000); onChanged(); return this; } @@ -34595,48 +46613,66 @@ public Builder clearBranch() { * * *
            -     * The branch resource name, such as
            -     * `projects/*/locations/global/collections/default_collection/dataStores/default_data_store/branches/0`.
            +     * The default filter that is applied when a user performs a search without
            +     * checking any filters on the search page.
                  *
            -     * Use `default_branch` as the branch ID or leave this field empty, to search
            -     * documents under the default branch.
            +     * The filter applied to every search request when quality improvement such as
            +     * query expansion is needed. In the case a query does not have a sufficient
            +     * amount of results this filter will be used to determine whether or not to
            +     * enable the query expansion flow. The original filter will still be used for
            +     * the query expanded search.
            +     * This field is strongly recommended to achieve high search quality.
            +     *
            +     * For more information about filter syntax, see
            +     * [SearchRequest.filter][google.cloud.discoveryengine.v1beta.SearchRequest.filter].
                  * 
            * - * string branch = 2 [(.google.api.resource_reference) = { ... } + * string canonical_filter = 29; * - * @param value The bytes for branch to set. + * @param value The bytes for canonicalFilter to set. * @return This builder for chaining. */ - public Builder setBranchBytes(com.google.protobuf.ByteString value) { + public Builder setCanonicalFilterBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); - branch_ = value; - bitField0_ |= 0x00000002; + canonicalFilter_ = value; + bitField0_ |= 0x00001000; onChanged(); return this; } - private java.lang.Object query_ = ""; + private java.lang.Object orderBy_ = ""; /** * * *
            -     * Raw search query.
            +     * The order in which documents are returned. Documents can be ordered by
            +     * a field in an [Document][google.cloud.discoveryengine.v1beta.Document]
            +     * object. Leave it unset if ordered by relevance. `order_by` expression is
            +     * case-sensitive.
            +     *
            +     * For more information on ordering the website search results, see
            +     * [Order web search
            +     * results](https://cloud.google.com/generative-ai-app-builder/docs/order-web-search-results).
            +     * For more information on ordering the healthcare search results, see
            +     * [Order healthcare search
            +     * results](https://cloud.google.com/generative-ai-app-builder/docs/order-hc-results).
            +     * If this field is unrecognizable, an `INVALID_ARGUMENT` is returned.
                  * 
            * - * string query = 3; + * string order_by = 8; * - * @return The query. + * @return The orderBy. */ - public java.lang.String getQuery() { - java.lang.Object ref = query_; + 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(); - query_ = s; + orderBy_ = s; return s; } else { return (java.lang.String) ref; @@ -34647,19 +46683,30 @@ public java.lang.String getQuery() { * * *
            -     * Raw search query.
            +     * The order in which documents are returned. Documents can be ordered by
            +     * a field in an [Document][google.cloud.discoveryengine.v1beta.Document]
            +     * object. Leave it unset if ordered by relevance. `order_by` expression is
            +     * case-sensitive.
            +     *
            +     * For more information on ordering the website search results, see
            +     * [Order web search
            +     * results](https://cloud.google.com/generative-ai-app-builder/docs/order-web-search-results).
            +     * For more information on ordering the healthcare search results, see
            +     * [Order healthcare search
            +     * results](https://cloud.google.com/generative-ai-app-builder/docs/order-hc-results).
            +     * If this field is unrecognizable, an `INVALID_ARGUMENT` is returned.
                  * 
            * - * string query = 3; + * string order_by = 8; * - * @return The bytes for query. + * @return The bytes for orderBy. */ - public com.google.protobuf.ByteString getQueryBytes() { - java.lang.Object ref = query_; + 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); - query_ = b; + orderBy_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; @@ -34670,20 +46717,31 @@ public com.google.protobuf.ByteString getQueryBytes() { * * *
            -     * Raw search query.
            +     * The order in which documents are returned. Documents can be ordered by
            +     * a field in an [Document][google.cloud.discoveryengine.v1beta.Document]
            +     * object. Leave it unset if ordered by relevance. `order_by` expression is
            +     * case-sensitive.
            +     *
            +     * For more information on ordering the website search results, see
            +     * [Order web search
            +     * results](https://cloud.google.com/generative-ai-app-builder/docs/order-web-search-results).
            +     * For more information on ordering the healthcare search results, see
            +     * [Order healthcare search
            +     * results](https://cloud.google.com/generative-ai-app-builder/docs/order-hc-results).
            +     * If this field is unrecognizable, an `INVALID_ARGUMENT` is returned.
                  * 
            * - * string query = 3; + * string order_by = 8; * - * @param value The query to set. + * @param value The orderBy to set. * @return This builder for chaining. */ - public Builder setQuery(java.lang.String value) { + public Builder setOrderBy(java.lang.String value) { if (value == null) { throw new NullPointerException(); } - query_ = value; - bitField0_ |= 0x00000004; + orderBy_ = value; + bitField0_ |= 0x00002000; onChanged(); return this; } @@ -34692,16 +46750,27 @@ public Builder setQuery(java.lang.String value) { * * *
            -     * Raw search query.
            +     * The order in which documents are returned. Documents can be ordered by
            +     * a field in an [Document][google.cloud.discoveryengine.v1beta.Document]
            +     * object. Leave it unset if ordered by relevance. `order_by` expression is
            +     * case-sensitive.
            +     *
            +     * For more information on ordering the website search results, see
            +     * [Order web search
            +     * results](https://cloud.google.com/generative-ai-app-builder/docs/order-web-search-results).
            +     * For more information on ordering the healthcare search results, see
            +     * [Order healthcare search
            +     * results](https://cloud.google.com/generative-ai-app-builder/docs/order-hc-results).
            +     * If this field is unrecognizable, an `INVALID_ARGUMENT` is returned.
                  * 
            * - * string query = 3; + * string order_by = 8; * * @return This builder for chaining. */ - public Builder clearQuery() { - query_ = getDefaultInstance().getQuery(); - bitField0_ = (bitField0_ & ~0x00000004); + public Builder clearOrderBy() { + orderBy_ = getDefaultInstance().getOrderBy(); + bitField0_ = (bitField0_ & ~0x00002000); onChanged(); return this; } @@ -34710,65 +46779,82 @@ public Builder clearQuery() { * * *
            -     * Raw search query.
            +     * The order in which documents are returned. Documents can be ordered by
            +     * a field in an [Document][google.cloud.discoveryengine.v1beta.Document]
            +     * object. Leave it unset if ordered by relevance. `order_by` expression is
            +     * case-sensitive.
            +     *
            +     * For more information on ordering the website search results, see
            +     * [Order web search
            +     * results](https://cloud.google.com/generative-ai-app-builder/docs/order-web-search-results).
            +     * For more information on ordering the healthcare search results, see
            +     * [Order healthcare search
            +     * results](https://cloud.google.com/generative-ai-app-builder/docs/order-hc-results).
            +     * If this field is unrecognizable, an `INVALID_ARGUMENT` is returned.
                  * 
            * - * string query = 3; + * string order_by = 8; * - * @param value The bytes for query to set. + * @param value The bytes for orderBy to set. * @return This builder for chaining. */ - public Builder setQueryBytes(com.google.protobuf.ByteString value) { + public Builder setOrderByBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); - query_ = value; - bitField0_ |= 0x00000004; + orderBy_ = value; + bitField0_ |= 0x00002000; onChanged(); return this; } - private com.google.cloud.discoveryengine.v1beta.SearchRequest.ImageQuery imageQuery_; + private com.google.cloud.discoveryengine.v1beta.UserInfo userInfo_; private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.discoveryengine.v1beta.SearchRequest.ImageQuery, - com.google.cloud.discoveryengine.v1beta.SearchRequest.ImageQuery.Builder, - com.google.cloud.discoveryengine.v1beta.SearchRequest.ImageQueryOrBuilder> - imageQueryBuilder_; + com.google.cloud.discoveryengine.v1beta.UserInfo, + com.google.cloud.discoveryengine.v1beta.UserInfo.Builder, + com.google.cloud.discoveryengine.v1beta.UserInfoOrBuilder> + userInfoBuilder_; /** * * *
            -     * Raw image query.
            +     * Information about the end user.
            +     * Highly recommended for analytics and personalization.
            +     * [UserInfo.user_agent][google.cloud.discoveryengine.v1beta.UserInfo.user_agent]
            +     * is used to deduce `device_type` for analytics.
                  * 
            * - * .google.cloud.discoveryengine.v1beta.SearchRequest.ImageQuery image_query = 19; + * .google.cloud.discoveryengine.v1beta.UserInfo user_info = 21; * - * @return Whether the imageQuery field is set. + * @return Whether the userInfo field is set. */ - public boolean hasImageQuery() { - return ((bitField0_ & 0x00000008) != 0); + public boolean hasUserInfo() { + return ((bitField0_ & 0x00004000) != 0); } /** * * *
            -     * Raw image query.
            +     * Information about the end user.
            +     * Highly recommended for analytics and personalization.
            +     * [UserInfo.user_agent][google.cloud.discoveryengine.v1beta.UserInfo.user_agent]
            +     * is used to deduce `device_type` for analytics.
                  * 
            * - * .google.cloud.discoveryengine.v1beta.SearchRequest.ImageQuery image_query = 19; + * .google.cloud.discoveryengine.v1beta.UserInfo user_info = 21; * - * @return The imageQuery. - */ - public com.google.cloud.discoveryengine.v1beta.SearchRequest.ImageQuery getImageQuery() { - if (imageQueryBuilder_ == null) { - return imageQuery_ == null - ? com.google.cloud.discoveryengine.v1beta.SearchRequest.ImageQuery.getDefaultInstance() - : imageQuery_; + * @return The userInfo. + */ + public com.google.cloud.discoveryengine.v1beta.UserInfo getUserInfo() { + if (userInfoBuilder_ == null) { + return userInfo_ == null + ? com.google.cloud.discoveryengine.v1beta.UserInfo.getDefaultInstance() + : userInfo_; } else { - return imageQueryBuilder_.getMessage(); + return userInfoBuilder_.getMessage(); } } @@ -34776,22 +46862,24 @@ public com.google.cloud.discoveryengine.v1beta.SearchRequest.ImageQuery getImage * * *
            -     * Raw image query.
            +     * Information about the end user.
            +     * Highly recommended for analytics and personalization.
            +     * [UserInfo.user_agent][google.cloud.discoveryengine.v1beta.UserInfo.user_agent]
            +     * is used to deduce `device_type` for analytics.
                  * 
            * - * .google.cloud.discoveryengine.v1beta.SearchRequest.ImageQuery image_query = 19; + * .google.cloud.discoveryengine.v1beta.UserInfo user_info = 21; */ - public Builder setImageQuery( - com.google.cloud.discoveryengine.v1beta.SearchRequest.ImageQuery value) { - if (imageQueryBuilder_ == null) { + public Builder setUserInfo(com.google.cloud.discoveryengine.v1beta.UserInfo value) { + if (userInfoBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - imageQuery_ = value; + userInfo_ = value; } else { - imageQueryBuilder_.setMessage(value); + userInfoBuilder_.setMessage(value); } - bitField0_ |= 0x00000008; + bitField0_ |= 0x00004000; onChanged(); return this; } @@ -34800,19 +46888,22 @@ public Builder setImageQuery( * * *
            -     * Raw image query.
            +     * Information about the end user.
            +     * Highly recommended for analytics and personalization.
            +     * [UserInfo.user_agent][google.cloud.discoveryengine.v1beta.UserInfo.user_agent]
            +     * is used to deduce `device_type` for analytics.
                  * 
            * - * .google.cloud.discoveryengine.v1beta.SearchRequest.ImageQuery image_query = 19; + * .google.cloud.discoveryengine.v1beta.UserInfo user_info = 21; */ - public Builder setImageQuery( - com.google.cloud.discoveryengine.v1beta.SearchRequest.ImageQuery.Builder builderForValue) { - if (imageQueryBuilder_ == null) { - imageQuery_ = builderForValue.build(); + public Builder setUserInfo( + com.google.cloud.discoveryengine.v1beta.UserInfo.Builder builderForValue) { + if (userInfoBuilder_ == null) { + userInfo_ = builderForValue.build(); } else { - imageQueryBuilder_.setMessage(builderForValue.build()); + userInfoBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00000008; + bitField0_ |= 0x00004000; onChanged(); return this; } @@ -34821,28 +46912,28 @@ public Builder setImageQuery( * * *
            -     * Raw image query.
            +     * Information about the end user.
            +     * Highly recommended for analytics and personalization.
            +     * [UserInfo.user_agent][google.cloud.discoveryengine.v1beta.UserInfo.user_agent]
            +     * is used to deduce `device_type` for analytics.
                  * 
            * - * .google.cloud.discoveryengine.v1beta.SearchRequest.ImageQuery image_query = 19; + * .google.cloud.discoveryengine.v1beta.UserInfo user_info = 21; */ - public Builder mergeImageQuery( - com.google.cloud.discoveryengine.v1beta.SearchRequest.ImageQuery value) { - if (imageQueryBuilder_ == null) { - if (((bitField0_ & 0x00000008) != 0) - && imageQuery_ != null - && imageQuery_ - != com.google.cloud.discoveryengine.v1beta.SearchRequest.ImageQuery - .getDefaultInstance()) { - getImageQueryBuilder().mergeFrom(value); + public Builder mergeUserInfo(com.google.cloud.discoveryengine.v1beta.UserInfo value) { + if (userInfoBuilder_ == null) { + if (((bitField0_ & 0x00004000) != 0) + && userInfo_ != null + && userInfo_ != com.google.cloud.discoveryengine.v1beta.UserInfo.getDefaultInstance()) { + getUserInfoBuilder().mergeFrom(value); } else { - imageQuery_ = value; + userInfo_ = value; } } else { - imageQueryBuilder_.mergeFrom(value); + userInfoBuilder_.mergeFrom(value); } - if (imageQuery_ != null) { - bitField0_ |= 0x00000008; + if (userInfo_ != null) { + bitField0_ |= 0x00004000; onChanged(); } return this; @@ -34852,17 +46943,20 @@ public Builder mergeImageQuery( * * *
            -     * Raw image query.
            +     * Information about the end user.
            +     * Highly recommended for analytics and personalization.
            +     * [UserInfo.user_agent][google.cloud.discoveryengine.v1beta.UserInfo.user_agent]
            +     * is used to deduce `device_type` for analytics.
                  * 
            * - * .google.cloud.discoveryengine.v1beta.SearchRequest.ImageQuery image_query = 19; + * .google.cloud.discoveryengine.v1beta.UserInfo user_info = 21; */ - public Builder clearImageQuery() { - bitField0_ = (bitField0_ & ~0x00000008); - imageQuery_ = null; - if (imageQueryBuilder_ != null) { - imageQueryBuilder_.dispose(); - imageQueryBuilder_ = null; + public Builder clearUserInfo() { + bitField0_ = (bitField0_ & ~0x00004000); + userInfo_ = null; + if (userInfoBuilder_ != null) { + userInfoBuilder_.dispose(); + userInfoBuilder_ = null; } onChanged(); return this; @@ -34872,35 +46966,39 @@ public Builder clearImageQuery() { * * *
            -     * Raw image query.
            +     * Information about the end user.
            +     * Highly recommended for analytics and personalization.
            +     * [UserInfo.user_agent][google.cloud.discoveryengine.v1beta.UserInfo.user_agent]
            +     * is used to deduce `device_type` for analytics.
                  * 
            * - * .google.cloud.discoveryengine.v1beta.SearchRequest.ImageQuery image_query = 19; + * .google.cloud.discoveryengine.v1beta.UserInfo user_info = 21; */ - public com.google.cloud.discoveryengine.v1beta.SearchRequest.ImageQuery.Builder - getImageQueryBuilder() { - bitField0_ |= 0x00000008; + public com.google.cloud.discoveryengine.v1beta.UserInfo.Builder getUserInfoBuilder() { + bitField0_ |= 0x00004000; onChanged(); - return internalGetImageQueryFieldBuilder().getBuilder(); + return internalGetUserInfoFieldBuilder().getBuilder(); } /** * * *
            -     * Raw image query.
            +     * Information about the end user.
            +     * Highly recommended for analytics and personalization.
            +     * [UserInfo.user_agent][google.cloud.discoveryengine.v1beta.UserInfo.user_agent]
            +     * is used to deduce `device_type` for analytics.
                  * 
            * - * .google.cloud.discoveryengine.v1beta.SearchRequest.ImageQuery image_query = 19; + * .google.cloud.discoveryengine.v1beta.UserInfo user_info = 21; */ - public com.google.cloud.discoveryengine.v1beta.SearchRequest.ImageQueryOrBuilder - getImageQueryOrBuilder() { - if (imageQueryBuilder_ != null) { - return imageQueryBuilder_.getMessageOrBuilder(); + public com.google.cloud.discoveryengine.v1beta.UserInfoOrBuilder getUserInfoOrBuilder() { + if (userInfoBuilder_ != null) { + return userInfoBuilder_.getMessageOrBuilder(); } else { - return imageQuery_ == null - ? com.google.cloud.discoveryengine.v1beta.SearchRequest.ImageQuery.getDefaultInstance() - : imageQuery_; + return userInfo_ == null + ? com.google.cloud.discoveryengine.v1beta.UserInfo.getDefaultInstance() + : userInfo_; } } @@ -34908,134 +47006,54 @@ public Builder clearImageQuery() { * * *
            -     * Raw image query.
            +     * Information about the end user.
            +     * Highly recommended for analytics and personalization.
            +     * [UserInfo.user_agent][google.cloud.discoveryengine.v1beta.UserInfo.user_agent]
            +     * is used to deduce `device_type` for analytics.
                  * 
            * - * .google.cloud.discoveryengine.v1beta.SearchRequest.ImageQuery image_query = 19; + * .google.cloud.discoveryengine.v1beta.UserInfo user_info = 21; */ private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.discoveryengine.v1beta.SearchRequest.ImageQuery, - com.google.cloud.discoveryengine.v1beta.SearchRequest.ImageQuery.Builder, - com.google.cloud.discoveryengine.v1beta.SearchRequest.ImageQueryOrBuilder> - internalGetImageQueryFieldBuilder() { - if (imageQueryBuilder_ == null) { - imageQueryBuilder_ = + com.google.cloud.discoveryengine.v1beta.UserInfo, + com.google.cloud.discoveryengine.v1beta.UserInfo.Builder, + com.google.cloud.discoveryengine.v1beta.UserInfoOrBuilder> + internalGetUserInfoFieldBuilder() { + if (userInfoBuilder_ == null) { + userInfoBuilder_ = new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.discoveryengine.v1beta.SearchRequest.ImageQuery, - com.google.cloud.discoveryengine.v1beta.SearchRequest.ImageQuery.Builder, - com.google.cloud.discoveryengine.v1beta.SearchRequest.ImageQueryOrBuilder>( - getImageQuery(), getParentForChildren(), isClean()); - imageQuery_ = null; + com.google.cloud.discoveryengine.v1beta.UserInfo, + com.google.cloud.discoveryengine.v1beta.UserInfo.Builder, + com.google.cloud.discoveryengine.v1beta.UserInfoOrBuilder>( + getUserInfo(), getParentForChildren(), isClean()); + userInfo_ = null; } - return imageQueryBuilder_; - } - - private int pageSize_; - - /** - * - * - *
            -     * Maximum number of [Document][google.cloud.discoveryengine.v1beta.Document]s
            -     * to return. The maximum allowed value depends on the data type. Values above
            -     * the maximum value are coerced to the maximum value.
            -     *
            -     * * Websites with basic indexing: Default `10`, Maximum `25`.
            -     * * Websites with advanced indexing: Default `25`, Maximum `50`.
            -     * * Other: Default `50`, Maximum `100`.
            -     *
            -     * If this field is negative, an  `INVALID_ARGUMENT` is returned.
            -     * 
            - * - * int32 page_size = 4; - * - * @return The pageSize. - */ - @java.lang.Override - public int getPageSize() { - return pageSize_; - } - - /** - * - * - *
            -     * Maximum number of [Document][google.cloud.discoveryengine.v1beta.Document]s
            -     * to return. The maximum allowed value depends on the data type. Values above
            -     * the maximum value are coerced to the maximum value.
            -     *
            -     * * Websites with basic indexing: Default `10`, Maximum `25`.
            -     * * Websites with advanced indexing: Default `25`, Maximum `50`.
            -     * * Other: Default `50`, Maximum `100`.
            -     *
            -     * If this field is negative, an  `INVALID_ARGUMENT` is returned.
            -     * 
            - * - * int32 page_size = 4; - * - * @param value The pageSize to set. - * @return This builder for chaining. - */ - public Builder setPageSize(int value) { - - pageSize_ = value; - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - - /** - * - * - *
            -     * Maximum number of [Document][google.cloud.discoveryengine.v1beta.Document]s
            -     * to return. The maximum allowed value depends on the data type. Values above
            -     * the maximum value are coerced to the maximum value.
            -     *
            -     * * Websites with basic indexing: Default `10`, Maximum `25`.
            -     * * Websites with advanced indexing: Default `25`, Maximum `50`.
            -     * * Other: Default `50`, Maximum `100`.
            -     *
            -     * If this field is negative, an  `INVALID_ARGUMENT` is returned.
            -     * 
            - * - * int32 page_size = 4; - * - * @return This builder for chaining. - */ - public Builder clearPageSize() { - bitField0_ = (bitField0_ & ~0x00000010); - pageSize_ = 0; - onChanged(); - return this; + return userInfoBuilder_; } - private java.lang.Object pageToken_ = ""; + private java.lang.Object languageCode_ = ""; /** * * *
            -     * A page token received from a previous
            -     * [SearchService.Search][google.cloud.discoveryengine.v1beta.SearchService.Search]
            -     * call. Provide this to retrieve the subsequent page.
            -     *
            -     * When paginating, all other parameters provided to
            -     * [SearchService.Search][google.cloud.discoveryengine.v1beta.SearchService.Search]
            -     * must match the call that provided the page token. Otherwise, an
            -     * `INVALID_ARGUMENT`  error is returned.
            +     * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
            +     * information, see [Standard
            +     * fields](https://cloud.google.com/apis/design/standard_fields). This field
            +     * helps to better interpret the query. If a value isn't specified, the query
            +     * language code is automatically detected, which may not be accurate.
                  * 
            * - * string page_token = 5; + * string language_code = 35; * - * @return The pageToken. + * @return The languageCode. */ - public java.lang.String getPageToken() { - java.lang.Object ref = pageToken_; + public java.lang.String getLanguageCode() { + java.lang.Object ref = languageCode_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); - pageToken_ = s; + languageCode_ = s; return s; } else { return (java.lang.String) ref; @@ -35046,26 +47064,23 @@ public java.lang.String getPageToken() { * * *
            -     * A page token received from a previous
            -     * [SearchService.Search][google.cloud.discoveryengine.v1beta.SearchService.Search]
            -     * call. Provide this to retrieve the subsequent page.
            -     *
            -     * When paginating, all other parameters provided to
            -     * [SearchService.Search][google.cloud.discoveryengine.v1beta.SearchService.Search]
            -     * must match the call that provided the page token. Otherwise, an
            -     * `INVALID_ARGUMENT`  error is returned.
            +     * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
            +     * information, see [Standard
            +     * fields](https://cloud.google.com/apis/design/standard_fields). This field
            +     * helps to better interpret the query. If a value isn't specified, the query
            +     * language code is automatically detected, which may not be accurate.
                  * 
            * - * string page_token = 5; + * string language_code = 35; * - * @return The bytes for pageToken. + * @return The bytes for languageCode. */ - public com.google.protobuf.ByteString getPageTokenBytes() { - java.lang.Object ref = pageToken_; + public com.google.protobuf.ByteString getLanguageCodeBytes() { + java.lang.Object ref = languageCode_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - pageToken_ = b; + languageCode_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; @@ -35076,27 +47091,24 @@ public com.google.protobuf.ByteString getPageTokenBytes() { * * *
            -     * A page token received from a previous
            -     * [SearchService.Search][google.cloud.discoveryengine.v1beta.SearchService.Search]
            -     * call. Provide this to retrieve the subsequent page.
            -     *
            -     * When paginating, all other parameters provided to
            -     * [SearchService.Search][google.cloud.discoveryengine.v1beta.SearchService.Search]
            -     * must match the call that provided the page token. Otherwise, an
            -     * `INVALID_ARGUMENT`  error is returned.
            +     * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
            +     * information, see [Standard
            +     * fields](https://cloud.google.com/apis/design/standard_fields). This field
            +     * helps to better interpret the query. If a value isn't specified, the query
            +     * language code is automatically detected, which may not be accurate.
                  * 
            * - * string page_token = 5; + * string language_code = 35; * - * @param value The pageToken to set. + * @param value The languageCode to set. * @return This builder for chaining. */ - public Builder setPageToken(java.lang.String value) { + public Builder setLanguageCode(java.lang.String value) { if (value == null) { throw new NullPointerException(); } - pageToken_ = value; - bitField0_ |= 0x00000020; + languageCode_ = value; + bitField0_ |= 0x00008000; onChanged(); return this; } @@ -35105,23 +47117,20 @@ public Builder setPageToken(java.lang.String value) { * * *
            -     * A page token received from a previous
            -     * [SearchService.Search][google.cloud.discoveryengine.v1beta.SearchService.Search]
            -     * call. Provide this to retrieve the subsequent page.
            -     *
            -     * When paginating, all other parameters provided to
            -     * [SearchService.Search][google.cloud.discoveryengine.v1beta.SearchService.Search]
            -     * must match the call that provided the page token. Otherwise, an
            -     * `INVALID_ARGUMENT`  error is returned.
            +     * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
            +     * information, see [Standard
            +     * fields](https://cloud.google.com/apis/design/standard_fields). This field
            +     * helps to better interpret the query. If a value isn't specified, the query
            +     * language code is automatically detected, which may not be accurate.
                  * 
            * - * string page_token = 5; + * string language_code = 35; * * @return This builder for chaining. */ - public Builder clearPageToken() { - pageToken_ = getDefaultInstance().getPageToken(); - bitField0_ = (bitField0_ & ~0x00000020); + public Builder clearLanguageCode() { + languageCode_ = getDefaultInstance().getLanguageCode(); + bitField0_ = (bitField0_ & ~0x00008000); onChanged(); return this; } @@ -35130,147 +47139,125 @@ public Builder clearPageToken() { * * *
            -     * A page token received from a previous
            -     * [SearchService.Search][google.cloud.discoveryengine.v1beta.SearchService.Search]
            -     * call. Provide this to retrieve the subsequent page.
            -     *
            -     * When paginating, all other parameters provided to
            -     * [SearchService.Search][google.cloud.discoveryengine.v1beta.SearchService.Search]
            -     * must match the call that provided the page token. Otherwise, an
            -     * `INVALID_ARGUMENT`  error is returned.
            +     * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
            +     * information, see [Standard
            +     * fields](https://cloud.google.com/apis/design/standard_fields). This field
            +     * helps to better interpret the query. If a value isn't specified, the query
            +     * language code is automatically detected, which may not be accurate.
                  * 
            * - * string page_token = 5; + * string language_code = 35; * - * @param value The bytes for pageToken to set. + * @param value The bytes for languageCode to set. * @return This builder for chaining. */ - public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + public Builder setLanguageCodeBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); - pageToken_ = value; - bitField0_ |= 0x00000020; + languageCode_ = value; + bitField0_ |= 0x00008000; onChanged(); return this; } - private int offset_; + private java.lang.Object regionCode_ = ""; /** * * *
            -     * A 0-indexed integer that specifies the current offset (that is, starting
            -     * result location, amongst the
            -     * [Document][google.cloud.discoveryengine.v1beta.Document]s deemed by the API
            -     * as relevant) in search results. This field is only considered if
            -     * [page_token][google.cloud.discoveryengine.v1beta.SearchRequest.page_token]
            -     * is unset.
            -     *
            -     * If this field is negative, an  `INVALID_ARGUMENT`  is returned.
            +     * The Unicode country/region code (CLDR) of a location, such as "US" and
            +     * "419". For more information, see [Standard
            +     * fields](https://cloud.google.com/apis/design/standard_fields). If set,
            +     * then results will be boosted based on the region_code provided.
                  * 
            * - * int32 offset = 6; + * string region_code = 36; * - * @return The offset. + * @return The regionCode. */ - @java.lang.Override - public int getOffset() { - return offset_; + public java.lang.String getRegionCode() { + java.lang.Object ref = regionCode_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + regionCode_ = s; + return s; + } else { + return (java.lang.String) ref; + } } /** * * *
            -     * A 0-indexed integer that specifies the current offset (that is, starting
            -     * result location, amongst the
            -     * [Document][google.cloud.discoveryengine.v1beta.Document]s deemed by the API
            -     * as relevant) in search results. This field is only considered if
            -     * [page_token][google.cloud.discoveryengine.v1beta.SearchRequest.page_token]
            -     * is unset.
            -     *
            -     * If this field is negative, an  `INVALID_ARGUMENT`  is returned.
            +     * The Unicode country/region code (CLDR) of a location, such as "US" and
            +     * "419". For more information, see [Standard
            +     * fields](https://cloud.google.com/apis/design/standard_fields). If set,
            +     * then results will be boosted based on the region_code provided.
                  * 
            * - * int32 offset = 6; + * string region_code = 36; * - * @param value The offset to set. - * @return This builder for chaining. + * @return The bytes for regionCode. */ - public Builder setOffset(int value) { - - offset_ = value; - bitField0_ |= 0x00000040; - onChanged(); - return this; + public com.google.protobuf.ByteString getRegionCodeBytes() { + java.lang.Object ref = regionCode_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + regionCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } } /** * * *
            -     * A 0-indexed integer that specifies the current offset (that is, starting
            -     * result location, amongst the
            -     * [Document][google.cloud.discoveryengine.v1beta.Document]s deemed by the API
            -     * as relevant) in search results. This field is only considered if
            -     * [page_token][google.cloud.discoveryengine.v1beta.SearchRequest.page_token]
            -     * is unset.
            -     *
            -     * If this field is negative, an  `INVALID_ARGUMENT`  is returned.
            +     * The Unicode country/region code (CLDR) of a location, such as "US" and
            +     * "419". For more information, see [Standard
            +     * fields](https://cloud.google.com/apis/design/standard_fields). If set,
            +     * then results will be boosted based on the region_code provided.
                  * 
            * - * int32 offset = 6; + * string region_code = 36; * + * @param value The regionCode to set. * @return This builder for chaining. */ - public Builder clearOffset() { - bitField0_ = (bitField0_ & ~0x00000040); - offset_ = 0; + public Builder setRegionCode(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + regionCode_ = value; + bitField0_ |= 0x00010000; onChanged(); return this; } - private int oneBoxPageSize_; - - /** - * - * - *
            -     * The maximum number of results to return for OneBox.
            -     * This applies to each OneBox type individually.
            -     * Default number is 10.
            -     * 
            - * - * int32 one_box_page_size = 47; - * - * @return The oneBoxPageSize. - */ - @java.lang.Override - public int getOneBoxPageSize() { - return oneBoxPageSize_; - } - /** * * *
            -     * The maximum number of results to return for OneBox.
            -     * This applies to each OneBox type individually.
            -     * Default number is 10.
            +     * The Unicode country/region code (CLDR) of a location, such as "US" and
            +     * "419". For more information, see [Standard
            +     * fields](https://cloud.google.com/apis/design/standard_fields). If set,
            +     * then results will be boosted based on the region_code provided.
                  * 
            * - * int32 one_box_page_size = 47; + * string region_code = 36; * - * @param value The oneBoxPageSize to set. * @return This builder for chaining. */ - public Builder setOneBoxPageSize(int value) { - - oneBoxPageSize_ = value; - bitField0_ |= 0x00000080; + public Builder clearRegionCode() { + regionCode_ = getDefaultInstance().getRegionCode(); + bitField0_ = (bitField0_ & ~0x00010000); onChanged(); return this; } @@ -35279,61 +47266,65 @@ public Builder setOneBoxPageSize(int value) { * * *
            -     * The maximum number of results to return for OneBox.
            -     * This applies to each OneBox type individually.
            -     * Default number is 10.
            +     * The Unicode country/region code (CLDR) of a location, such as "US" and
            +     * "419". For more information, see [Standard
            +     * fields](https://cloud.google.com/apis/design/standard_fields). If set,
            +     * then results will be boosted based on the region_code provided.
                  * 
            * - * int32 one_box_page_size = 47; + * string region_code = 36; * + * @param value The bytes for regionCode to set. * @return This builder for chaining. */ - public Builder clearOneBoxPageSize() { - bitField0_ = (bitField0_ & ~0x00000080); - oneBoxPageSize_ = 0; + public Builder setRegionCodeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + regionCode_ = value; + bitField0_ |= 0x00010000; onChanged(); return this; } - private java.util.List - dataStoreSpecs_ = java.util.Collections.emptyList(); + private java.util.List + facetSpecs_ = java.util.Collections.emptyList(); - private void ensureDataStoreSpecsIsMutable() { - if (!((bitField0_ & 0x00000100) != 0)) { - dataStoreSpecs_ = + private void ensureFacetSpecsIsMutable() { + if (!((bitField0_ & 0x00020000) != 0)) { + facetSpecs_ = new java.util.ArrayList< - com.google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec>( - dataStoreSpecs_); - bitField0_ |= 0x00000100; + com.google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec>(facetSpecs_); + bitField0_ |= 0x00020000; } } private com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec, - com.google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec.Builder, - com.google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpecOrBuilder> - dataStoreSpecsBuilder_; + com.google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec, + com.google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec.Builder, + com.google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpecOrBuilder> + facetSpecsBuilder_; /** * * *
            -     * Specs defining dataStores to filter on in a search call and configurations
            -     * for those dataStores. This is only considered for engines with multiple
            -     * dataStores use case. For single dataStore within an engine, they should
            -     * use the specs at the top level.
            +     * Facet specifications for faceted search. If empty, no facets are returned.
            +     *
            +     * A maximum of 100 values are allowed. Otherwise, an  `INVALID_ARGUMENT`
            +     * error is returned.
                  * 
            * - * - * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec data_store_specs = 32; + * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec facet_specs = 9; * */ - public java.util.List - getDataStoreSpecsList() { - if (dataStoreSpecsBuilder_ == null) { - return java.util.Collections.unmodifiableList(dataStoreSpecs_); + public java.util.List + getFacetSpecsList() { + if (facetSpecsBuilder_ == null) { + return java.util.Collections.unmodifiableList(facetSpecs_); } else { - return dataStoreSpecsBuilder_.getMessageList(); + return facetSpecsBuilder_.getMessageList(); } } @@ -35341,21 +47332,20 @@ private void ensureDataStoreSpecsIsMutable() { * * *
            -     * Specs defining dataStores to filter on in a search call and configurations
            -     * for those dataStores. This is only considered for engines with multiple
            -     * dataStores use case. For single dataStore within an engine, they should
            -     * use the specs at the top level.
            +     * Facet specifications for faceted search. If empty, no facets are returned.
            +     *
            +     * A maximum of 100 values are allowed. Otherwise, an  `INVALID_ARGUMENT`
            +     * error is returned.
                  * 
            * - * - * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec data_store_specs = 32; + * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec facet_specs = 9; * */ - public int getDataStoreSpecsCount() { - if (dataStoreSpecsBuilder_ == null) { - return dataStoreSpecs_.size(); + public int getFacetSpecsCount() { + if (facetSpecsBuilder_ == null) { + return facetSpecs_.size(); } else { - return dataStoreSpecsBuilder_.getCount(); + return facetSpecsBuilder_.getCount(); } } @@ -35363,22 +47353,21 @@ public int getDataStoreSpecsCount() { * * *
            -     * Specs defining dataStores to filter on in a search call and configurations
            -     * for those dataStores. This is only considered for engines with multiple
            -     * dataStores use case. For single dataStore within an engine, they should
            -     * use the specs at the top level.
            +     * Facet specifications for faceted search. If empty, no facets are returned.
            +     *
            +     * A maximum of 100 values are allowed. Otherwise, an  `INVALID_ARGUMENT`
            +     * error is returned.
                  * 
            * - * - * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec data_store_specs = 32; + * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec facet_specs = 9; * */ - public com.google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec getDataStoreSpecs( + public com.google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec getFacetSpecs( int index) { - if (dataStoreSpecsBuilder_ == null) { - return dataStoreSpecs_.get(index); + if (facetSpecsBuilder_ == null) { + return facetSpecs_.get(index); } else { - return dataStoreSpecsBuilder_.getMessage(index); + return facetSpecsBuilder_.getMessage(index); } } @@ -35386,27 +47375,26 @@ public com.google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec getDa * * *
            -     * Specs defining dataStores to filter on in a search call and configurations
            -     * for those dataStores. This is only considered for engines with multiple
            -     * dataStores use case. For single dataStore within an engine, they should
            -     * use the specs at the top level.
            +     * Facet specifications for faceted search. If empty, no facets are returned.
            +     *
            +     * A maximum of 100 values are allowed. Otherwise, an  `INVALID_ARGUMENT`
            +     * error is returned.
                  * 
            * - * - * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec data_store_specs = 32; + * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec facet_specs = 9; * */ - public Builder setDataStoreSpecs( - int index, com.google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec value) { - if (dataStoreSpecsBuilder_ == null) { + public Builder setFacetSpecs( + int index, com.google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec value) { + if (facetSpecsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - ensureDataStoreSpecsIsMutable(); - dataStoreSpecs_.set(index, value); + ensureFacetSpecsIsMutable(); + facetSpecs_.set(index, value); onChanged(); } else { - dataStoreSpecsBuilder_.setMessage(index, value); + facetSpecsBuilder_.setMessage(index, value); } return this; } @@ -35415,26 +47403,24 @@ public Builder setDataStoreSpecs( * * *
            -     * Specs defining dataStores to filter on in a search call and configurations
            -     * for those dataStores. This is only considered for engines with multiple
            -     * dataStores use case. For single dataStore within an engine, they should
            -     * use the specs at the top level.
            +     * Facet specifications for faceted search. If empty, no facets are returned.
            +     *
            +     * A maximum of 100 values are allowed. Otherwise, an  `INVALID_ARGUMENT`
            +     * error is returned.
                  * 
            * - * - * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec data_store_specs = 32; + * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec facet_specs = 9; * */ - public Builder setDataStoreSpecs( + public Builder setFacetSpecs( int index, - com.google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec.Builder - builderForValue) { - if (dataStoreSpecsBuilder_ == null) { - ensureDataStoreSpecsIsMutable(); - dataStoreSpecs_.set(index, builderForValue.build()); + com.google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec.Builder builderForValue) { + if (facetSpecsBuilder_ == null) { + ensureFacetSpecsIsMutable(); + facetSpecs_.set(index, builderForValue.build()); onChanged(); } else { - dataStoreSpecsBuilder_.setMessage(index, builderForValue.build()); + facetSpecsBuilder_.setMessage(index, builderForValue.build()); } return this; } @@ -35443,27 +47429,26 @@ public Builder setDataStoreSpecs( * * *
            -     * Specs defining dataStores to filter on in a search call and configurations
            -     * for those dataStores. This is only considered for engines with multiple
            -     * dataStores use case. For single dataStore within an engine, they should
            -     * use the specs at the top level.
            +     * Facet specifications for faceted search. If empty, no facets are returned.
            +     *
            +     * A maximum of 100 values are allowed. Otherwise, an  `INVALID_ARGUMENT`
            +     * error is returned.
                  * 
            * - * - * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec data_store_specs = 32; + * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec facet_specs = 9; * */ - public Builder addDataStoreSpecs( - com.google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec value) { - if (dataStoreSpecsBuilder_ == null) { + public Builder addFacetSpecs( + com.google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec value) { + if (facetSpecsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - ensureDataStoreSpecsIsMutable(); - dataStoreSpecs_.add(value); + ensureFacetSpecsIsMutable(); + facetSpecs_.add(value); onChanged(); } else { - dataStoreSpecsBuilder_.addMessage(value); + facetSpecsBuilder_.addMessage(value); } return this; } @@ -35472,27 +47457,26 @@ public Builder addDataStoreSpecs( * * *
            -     * Specs defining dataStores to filter on in a search call and configurations
            -     * for those dataStores. This is only considered for engines with multiple
            -     * dataStores use case. For single dataStore within an engine, they should
            -     * use the specs at the top level.
            +     * Facet specifications for faceted search. If empty, no facets are returned.
            +     *
            +     * A maximum of 100 values are allowed. Otherwise, an  `INVALID_ARGUMENT`
            +     * error is returned.
                  * 
            * - * - * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec data_store_specs = 32; + * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec facet_specs = 9; * */ - public Builder addDataStoreSpecs( - int index, com.google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec value) { - if (dataStoreSpecsBuilder_ == null) { + public Builder addFacetSpecs( + int index, com.google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec value) { + if (facetSpecsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - ensureDataStoreSpecsIsMutable(); - dataStoreSpecs_.add(index, value); + ensureFacetSpecsIsMutable(); + facetSpecs_.add(index, value); onChanged(); } else { - dataStoreSpecsBuilder_.addMessage(index, value); + facetSpecsBuilder_.addMessage(index, value); } return this; } @@ -35501,25 +47485,23 @@ public Builder addDataStoreSpecs( * * *
            -     * Specs defining dataStores to filter on in a search call and configurations
            -     * for those dataStores. This is only considered for engines with multiple
            -     * dataStores use case. For single dataStore within an engine, they should
            -     * use the specs at the top level.
            +     * Facet specifications for faceted search. If empty, no facets are returned.
            +     *
            +     * A maximum of 100 values are allowed. Otherwise, an  `INVALID_ARGUMENT`
            +     * error is returned.
                  * 
            * - * - * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec data_store_specs = 32; + * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec facet_specs = 9; * */ - public Builder addDataStoreSpecs( - com.google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec.Builder - builderForValue) { - if (dataStoreSpecsBuilder_ == null) { - ensureDataStoreSpecsIsMutable(); - dataStoreSpecs_.add(builderForValue.build()); + public Builder addFacetSpecs( + com.google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec.Builder builderForValue) { + if (facetSpecsBuilder_ == null) { + ensureFacetSpecsIsMutable(); + facetSpecs_.add(builderForValue.build()); onChanged(); } else { - dataStoreSpecsBuilder_.addMessage(builderForValue.build()); + facetSpecsBuilder_.addMessage(builderForValue.build()); } return this; } @@ -35528,26 +47510,24 @@ public Builder addDataStoreSpecs( * * *
            -     * Specs defining dataStores to filter on in a search call and configurations
            -     * for those dataStores. This is only considered for engines with multiple
            -     * dataStores use case. For single dataStore within an engine, they should
            -     * use the specs at the top level.
            +     * Facet specifications for faceted search. If empty, no facets are returned.
            +     *
            +     * A maximum of 100 values are allowed. Otherwise, an  `INVALID_ARGUMENT`
            +     * error is returned.
                  * 
            * - * - * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec data_store_specs = 32; + * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec facet_specs = 9; * */ - public Builder addDataStoreSpecs( + public Builder addFacetSpecs( int index, - com.google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec.Builder - builderForValue) { - if (dataStoreSpecsBuilder_ == null) { - ensureDataStoreSpecsIsMutable(); - dataStoreSpecs_.add(index, builderForValue.build()); + com.google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec.Builder builderForValue) { + if (facetSpecsBuilder_ == null) { + ensureFacetSpecsIsMutable(); + facetSpecs_.add(index, builderForValue.build()); onChanged(); } else { - dataStoreSpecsBuilder_.addMessage(index, builderForValue.build()); + facetSpecsBuilder_.addMessage(index, builderForValue.build()); } return this; } @@ -35556,26 +47536,25 @@ public Builder addDataStoreSpecs( * * *
            -     * Specs defining dataStores to filter on in a search call and configurations
            -     * for those dataStores. This is only considered for engines with multiple
            -     * dataStores use case. For single dataStore within an engine, they should
            -     * use the specs at the top level.
            +     * Facet specifications for faceted search. If empty, no facets are returned.
            +     *
            +     * A maximum of 100 values are allowed. Otherwise, an  `INVALID_ARGUMENT`
            +     * error is returned.
                  * 
            * - * - * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec data_store_specs = 32; + * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec facet_specs = 9; * */ - public Builder addAllDataStoreSpecs( + public Builder addAllFacetSpecs( java.lang.Iterable< - ? extends com.google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec> + ? extends com.google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec> values) { - if (dataStoreSpecsBuilder_ == null) { - ensureDataStoreSpecsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, dataStoreSpecs_); + if (facetSpecsBuilder_ == null) { + ensureFacetSpecsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, facetSpecs_); onChanged(); } else { - dataStoreSpecsBuilder_.addAllMessages(values); + facetSpecsBuilder_.addAllMessages(values); } return this; } @@ -35584,23 +47563,22 @@ public Builder addAllDataStoreSpecs( * * *
            -     * Specs defining dataStores to filter on in a search call and configurations
            -     * for those dataStores. This is only considered for engines with multiple
            -     * dataStores use case. For single dataStore within an engine, they should
            -     * use the specs at the top level.
            +     * Facet specifications for faceted search. If empty, no facets are returned.
            +     *
            +     * A maximum of 100 values are allowed. Otherwise, an  `INVALID_ARGUMENT`
            +     * error is returned.
                  * 
            * - * - * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec data_store_specs = 32; + * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec facet_specs = 9; * */ - public Builder clearDataStoreSpecs() { - if (dataStoreSpecsBuilder_ == null) { - dataStoreSpecs_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000100); + public Builder clearFacetSpecs() { + if (facetSpecsBuilder_ == null) { + facetSpecs_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00020000); onChanged(); } else { - dataStoreSpecsBuilder_.clear(); + facetSpecsBuilder_.clear(); } return this; } @@ -35609,23 +47587,22 @@ public Builder clearDataStoreSpecs() { * * *
            -     * Specs defining dataStores to filter on in a search call and configurations
            -     * for those dataStores. This is only considered for engines with multiple
            -     * dataStores use case. For single dataStore within an engine, they should
            -     * use the specs at the top level.
            +     * Facet specifications for faceted search. If empty, no facets are returned.
            +     *
            +     * A maximum of 100 values are allowed. Otherwise, an  `INVALID_ARGUMENT`
            +     * error is returned.
                  * 
            * - * - * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec data_store_specs = 32; + * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec facet_specs = 9; * */ - public Builder removeDataStoreSpecs(int index) { - if (dataStoreSpecsBuilder_ == null) { - ensureDataStoreSpecsIsMutable(); - dataStoreSpecs_.remove(index); + public Builder removeFacetSpecs(int index) { + if (facetSpecsBuilder_ == null) { + ensureFacetSpecsIsMutable(); + facetSpecs_.remove(index); onChanged(); } else { - dataStoreSpecsBuilder_.remove(index); + facetSpecsBuilder_.remove(index); } return this; } @@ -35634,41 +47611,39 @@ public Builder removeDataStoreSpecs(int index) { * * *
            -     * Specs defining dataStores to filter on in a search call and configurations
            -     * for those dataStores. This is only considered for engines with multiple
            -     * dataStores use case. For single dataStore within an engine, they should
            -     * use the specs at the top level.
            +     * Facet specifications for faceted search. If empty, no facets are returned.
            +     *
            +     * A maximum of 100 values are allowed. Otherwise, an  `INVALID_ARGUMENT`
            +     * error is returned.
                  * 
            * - * - * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec data_store_specs = 32; + * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec facet_specs = 9; * */ - public com.google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec.Builder - getDataStoreSpecsBuilder(int index) { - return internalGetDataStoreSpecsFieldBuilder().getBuilder(index); + public com.google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec.Builder + getFacetSpecsBuilder(int index) { + return internalGetFacetSpecsFieldBuilder().getBuilder(index); } /** * * *
            -     * Specs defining dataStores to filter on in a search call and configurations
            -     * for those dataStores. This is only considered for engines with multiple
            -     * dataStores use case. For single dataStore within an engine, they should
            -     * use the specs at the top level.
            +     * Facet specifications for faceted search. If empty, no facets are returned.
            +     *
            +     * A maximum of 100 values are allowed. Otherwise, an  `INVALID_ARGUMENT`
            +     * error is returned.
                  * 
            * - * - * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec data_store_specs = 32; + * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec facet_specs = 9; * */ - public com.google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpecOrBuilder - getDataStoreSpecsOrBuilder(int index) { - if (dataStoreSpecsBuilder_ == null) { - return dataStoreSpecs_.get(index); + public com.google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpecOrBuilder + getFacetSpecsOrBuilder(int index) { + if (facetSpecsBuilder_ == null) { + return facetSpecs_.get(index); } else { - return dataStoreSpecsBuilder_.getMessageOrBuilder(index); + return facetSpecsBuilder_.getMessageOrBuilder(index); } } @@ -35676,23 +47651,22 @@ public Builder removeDataStoreSpecs(int index) { * * *
            -     * Specs defining dataStores to filter on in a search call and configurations
            -     * for those dataStores. This is only considered for engines with multiple
            -     * dataStores use case. For single dataStore within an engine, they should
            -     * use the specs at the top level.
            +     * Facet specifications for faceted search. If empty, no facets are returned.
            +     *
            +     * A maximum of 100 values are allowed. Otherwise, an  `INVALID_ARGUMENT`
            +     * error is returned.
                  * 
            * - * - * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec data_store_specs = 32; + * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec facet_specs = 9; * */ public java.util.List< - ? extends com.google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpecOrBuilder> - getDataStoreSpecsOrBuilderList() { - if (dataStoreSpecsBuilder_ != null) { - return dataStoreSpecsBuilder_.getMessageOrBuilderList(); + ? extends com.google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpecOrBuilder> + getFacetSpecsOrBuilderList() { + if (facetSpecsBuilder_ != null) { + return facetSpecsBuilder_.getMessageOrBuilderList(); } else { - return java.util.Collections.unmodifiableList(dataStoreSpecs_); + return java.util.Collections.unmodifiableList(facetSpecs_); } } @@ -35700,301 +47674,122 @@ public Builder removeDataStoreSpecs(int index) { * * *
            -     * Specs defining dataStores to filter on in a search call and configurations
            -     * for those dataStores. This is only considered for engines with multiple
            -     * dataStores use case. For single dataStore within an engine, they should
            -     * use the specs at the top level.
            +     * Facet specifications for faceted search. If empty, no facets are returned.
            +     *
            +     * A maximum of 100 values are allowed. Otherwise, an  `INVALID_ARGUMENT`
            +     * error is returned.
                  * 
            * - * - * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec data_store_specs = 32; + * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec facet_specs = 9; * */ - public com.google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec.Builder - addDataStoreSpecsBuilder() { - return internalGetDataStoreSpecsFieldBuilder() + public com.google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec.Builder + addFacetSpecsBuilder() { + return internalGetFacetSpecsFieldBuilder() .addBuilder( - com.google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec - .getDefaultInstance()); + com.google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec.getDefaultInstance()); } /** * * *
            -     * Specs defining dataStores to filter on in a search call and configurations
            -     * for those dataStores. This is only considered for engines with multiple
            -     * dataStores use case. For single dataStore within an engine, they should
            -     * use the specs at the top level.
            +     * Facet specifications for faceted search. If empty, no facets are returned.
            +     *
            +     * A maximum of 100 values are allowed. Otherwise, an  `INVALID_ARGUMENT`
            +     * error is returned.
                  * 
            * - * - * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec data_store_specs = 32; + * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec facet_specs = 9; * */ - public com.google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec.Builder - addDataStoreSpecsBuilder(int index) { - return internalGetDataStoreSpecsFieldBuilder() + public com.google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec.Builder + addFacetSpecsBuilder(int index) { + return internalGetFacetSpecsFieldBuilder() .addBuilder( index, - com.google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec - .getDefaultInstance()); + com.google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec.getDefaultInstance()); } /** * * *
            -     * Specs defining dataStores to filter on in a search call and configurations
            -     * for those dataStores. This is only considered for engines with multiple
            -     * dataStores use case. For single dataStore within an engine, they should
            -     * use the specs at the top level.
            +     * Facet specifications for faceted search. If empty, no facets are returned.
            +     *
            +     * A maximum of 100 values are allowed. Otherwise, an  `INVALID_ARGUMENT`
            +     * error is returned.
                  * 
            * - * - * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec data_store_specs = 32; + * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec facet_specs = 9; * */ - public java.util.List< - com.google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec.Builder> - getDataStoreSpecsBuilderList() { - return internalGetDataStoreSpecsFieldBuilder().getBuilderList(); + public java.util.List + getFacetSpecsBuilderList() { + return internalGetFacetSpecsFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec, - com.google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec.Builder, - com.google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpecOrBuilder> - internalGetDataStoreSpecsFieldBuilder() { - if (dataStoreSpecsBuilder_ == null) { - dataStoreSpecsBuilder_ = + com.google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec, + com.google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec.Builder, + com.google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpecOrBuilder> + internalGetFacetSpecsFieldBuilder() { + if (facetSpecsBuilder_ == null) { + facetSpecsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec, - com.google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec.Builder, - com.google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpecOrBuilder>( - dataStoreSpecs_, - ((bitField0_ & 0x00000100) != 0), - getParentForChildren(), - isClean()); - dataStoreSpecs_ = null; - } - return dataStoreSpecsBuilder_; - } - - private java.lang.Object filter_ = ""; - - /** - * - * - *
            -     * The filter syntax consists of an expression language for constructing a
            -     * predicate from one or more fields of the documents being filtered. Filter
            -     * expression is case-sensitive.
            -     *
            -     * If this field is unrecognizable, an  `INVALID_ARGUMENT`  is returned.
            -     *
            -     * Filtering in Vertex AI Search is done by mapping the LHS filter key to a
            -     * key property defined in the Vertex AI Search backend -- this mapping is
            -     * defined by the customer in their schema. For example a media customer might
            -     * have a field 'name' in their schema. In this case the filter would look
            -     * like this: filter --> name:'ANY("king kong")'
            -     *
            -     * For more information about filtering including syntax and filter
            -     * operators, see
            -     * [Filter](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata)
            -     * 
            - * - * string filter = 7; - * - * @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; - } - } - - /** - * - * - *
            -     * The filter syntax consists of an expression language for constructing a
            -     * predicate from one or more fields of the documents being filtered. Filter
            -     * expression is case-sensitive.
            -     *
            -     * If this field is unrecognizable, an  `INVALID_ARGUMENT`  is returned.
            -     *
            -     * Filtering in Vertex AI Search is done by mapping the LHS filter key to a
            -     * key property defined in the Vertex AI Search backend -- this mapping is
            -     * defined by the customer in their schema. For example a media customer might
            -     * have a field 'name' in their schema. In this case the filter would look
            -     * like this: filter --> name:'ANY("king kong")'
            -     *
            -     * For more information about filtering including syntax and filter
            -     * operators, see
            -     * [Filter](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata)
            -     * 
            - * - * string filter = 7; - * - * @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; - } - } - - /** - * - * - *
            -     * The filter syntax consists of an expression language for constructing a
            -     * predicate from one or more fields of the documents being filtered. Filter
            -     * expression is case-sensitive.
            -     *
            -     * If this field is unrecognizable, an  `INVALID_ARGUMENT`  is returned.
            -     *
            -     * Filtering in Vertex AI Search is done by mapping the LHS filter key to a
            -     * key property defined in the Vertex AI Search backend -- this mapping is
            -     * defined by the customer in their schema. For example a media customer might
            -     * have a field 'name' in their schema. In this case the filter would look
            -     * like this: filter --> name:'ANY("king kong")'
            -     *
            -     * For more information about filtering including syntax and filter
            -     * operators, see
            -     * [Filter](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata)
            -     * 
            - * - * string filter = 7; - * - * @param value The filter to set. - * @return This builder for chaining. - */ - public Builder setFilter(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); + com.google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec, + com.google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec.Builder, + com.google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpecOrBuilder>( + facetSpecs_, ((bitField0_ & 0x00020000) != 0), getParentForChildren(), isClean()); + facetSpecs_ = null; } - filter_ = value; - bitField0_ |= 0x00000200; - onChanged(); - return this; + return facetSpecsBuilder_; } - /** - * - * - *
            -     * The filter syntax consists of an expression language for constructing a
            -     * predicate from one or more fields of the documents being filtered. Filter
            -     * expression is case-sensitive.
            -     *
            -     * If this field is unrecognizable, an  `INVALID_ARGUMENT`  is returned.
            -     *
            -     * Filtering in Vertex AI Search is done by mapping the LHS filter key to a
            -     * key property defined in the Vertex AI Search backend -- this mapping is
            -     * defined by the customer in their schema. For example a media customer might
            -     * have a field 'name' in their schema. In this case the filter would look
            -     * like this: filter --> name:'ANY("king kong")'
            -     *
            -     * For more information about filtering including syntax and filter
            -     * operators, see
            -     * [Filter](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata)
            -     * 
            - * - * string filter = 7; - * - * @return This builder for chaining. - */ - public Builder clearFilter() { - filter_ = getDefaultInstance().getFilter(); - bitField0_ = (bitField0_ & ~0x00000200); - onChanged(); - return this; - } + private com.google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec boostSpec_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec, + com.google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec.Builder, + com.google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpecOrBuilder> + boostSpecBuilder_; /** * * *
            -     * The filter syntax consists of an expression language for constructing a
            -     * predicate from one or more fields of the documents being filtered. Filter
            -     * expression is case-sensitive.
            -     *
            -     * If this field is unrecognizable, an  `INVALID_ARGUMENT`  is returned.
            -     *
            -     * Filtering in Vertex AI Search is done by mapping the LHS filter key to a
            -     * key property defined in the Vertex AI Search backend -- this mapping is
            -     * defined by the customer in their schema. For example a media customer might
            -     * have a field 'name' in their schema. In this case the filter would look
            -     * like this: filter --> name:'ANY("king kong")'
            -     *
            -     * For more information about filtering including syntax and filter
            -     * operators, see
            -     * [Filter](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata)
            +     * Boost specification to boost certain documents.
            +     * For more information on boosting, see
            +     * [Boosting](https://cloud.google.com/generative-ai-app-builder/docs/boost-search-results)
                  * 
            * - * string filter = 7; + * .google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec boost_spec = 10; * - * @param value The bytes for filter to set. - * @return This builder for chaining. + * @return Whether the boostSpec field is set. */ - public Builder setFilterBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - filter_ = value; - bitField0_ |= 0x00000200; - onChanged(); - return this; + public boolean hasBoostSpec() { + return ((bitField0_ & 0x00040000) != 0); } - private java.lang.Object canonicalFilter_ = ""; - /** * * *
            -     * The default filter that is applied when a user performs a search without
            -     * checking any filters on the search page.
            -     *
            -     * The filter applied to every search request when quality improvement such as
            -     * query expansion is needed. In the case a query does not have a sufficient
            -     * amount of results this filter will be used to determine whether or not to
            -     * enable the query expansion flow. The original filter will still be used for
            -     * the query expanded search.
            -     * This field is strongly recommended to achieve high search quality.
            -     *
            -     * For more information about filter syntax, see
            -     * [SearchRequest.filter][google.cloud.discoveryengine.v1beta.SearchRequest.filter].
            +     * Boost specification to boost certain documents.
            +     * For more information on boosting, see
            +     * [Boosting](https://cloud.google.com/generative-ai-app-builder/docs/boost-search-results)
                  * 
            * - * string canonical_filter = 29; + * .google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec boost_spec = 10; * - * @return The canonicalFilter. + * @return The boostSpec. */ - public java.lang.String getCanonicalFilter() { - java.lang.Object ref = canonicalFilter_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - canonicalFilter_ = s; - return s; + public com.google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec getBoostSpec() { + if (boostSpecBuilder_ == null) { + return boostSpec_ == null + ? com.google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec.getDefaultInstance() + : boostSpec_; } else { - return (java.lang.String) ref; + return boostSpecBuilder_.getMessage(); } } @@ -36002,65 +47797,47 @@ public java.lang.String getCanonicalFilter() { * * *
            -     * The default filter that is applied when a user performs a search without
            -     * checking any filters on the search page.
            -     *
            -     * The filter applied to every search request when quality improvement such as
            -     * query expansion is needed. In the case a query does not have a sufficient
            -     * amount of results this filter will be used to determine whether or not to
            -     * enable the query expansion flow. The original filter will still be used for
            -     * the query expanded search.
            -     * This field is strongly recommended to achieve high search quality.
            -     *
            -     * For more information about filter syntax, see
            -     * [SearchRequest.filter][google.cloud.discoveryengine.v1beta.SearchRequest.filter].
            +     * Boost specification to boost certain documents.
            +     * For more information on boosting, see
            +     * [Boosting](https://cloud.google.com/generative-ai-app-builder/docs/boost-search-results)
                  * 
            * - * string canonical_filter = 29; - * - * @return The bytes for canonicalFilter. + * .google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec boost_spec = 10; */ - public com.google.protobuf.ByteString getCanonicalFilterBytes() { - java.lang.Object ref = canonicalFilter_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - canonicalFilter_ = b; - return b; + public Builder setBoostSpec( + com.google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec value) { + if (boostSpecBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + boostSpec_ = value; } else { - return (com.google.protobuf.ByteString) ref; + boostSpecBuilder_.setMessage(value); } + bitField0_ |= 0x00040000; + onChanged(); + return this; } /** * * *
            -     * The default filter that is applied when a user performs a search without
            -     * checking any filters on the search page.
            -     *
            -     * The filter applied to every search request when quality improvement such as
            -     * query expansion is needed. In the case a query does not have a sufficient
            -     * amount of results this filter will be used to determine whether or not to
            -     * enable the query expansion flow. The original filter will still be used for
            -     * the query expanded search.
            -     * This field is strongly recommended to achieve high search quality.
            -     *
            -     * For more information about filter syntax, see
            -     * [SearchRequest.filter][google.cloud.discoveryengine.v1beta.SearchRequest.filter].
            +     * Boost specification to boost certain documents.
            +     * For more information on boosting, see
            +     * [Boosting](https://cloud.google.com/generative-ai-app-builder/docs/boost-search-results)
                  * 
            * - * string canonical_filter = 29; - * - * @param value The canonicalFilter to set. - * @return This builder for chaining. + * .google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec boost_spec = 10; */ - public Builder setCanonicalFilter(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); + public Builder setBoostSpec( + com.google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec.Builder builderForValue) { + if (boostSpecBuilder_ == null) { + boostSpec_ = builderForValue.build(); + } else { + boostSpecBuilder_.setMessage(builderForValue.build()); } - canonicalFilter_ = value; - bitField0_ |= 0x00000400; + bitField0_ |= 0x00040000; onChanged(); return this; } @@ -36069,28 +47846,32 @@ public Builder setCanonicalFilter(java.lang.String value) { * * *
            -     * The default filter that is applied when a user performs a search without
            -     * checking any filters on the search page.
            -     *
            -     * The filter applied to every search request when quality improvement such as
            -     * query expansion is needed. In the case a query does not have a sufficient
            -     * amount of results this filter will be used to determine whether or not to
            -     * enable the query expansion flow. The original filter will still be used for
            -     * the query expanded search.
            -     * This field is strongly recommended to achieve high search quality.
            -     *
            -     * For more information about filter syntax, see
            -     * [SearchRequest.filter][google.cloud.discoveryengine.v1beta.SearchRequest.filter].
            +     * Boost specification to boost certain documents.
            +     * For more information on boosting, see
            +     * [Boosting](https://cloud.google.com/generative-ai-app-builder/docs/boost-search-results)
                  * 
            * - * string canonical_filter = 29; - * - * @return This builder for chaining. + * .google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec boost_spec = 10; */ - public Builder clearCanonicalFilter() { - canonicalFilter_ = getDefaultInstance().getCanonicalFilter(); - bitField0_ = (bitField0_ & ~0x00000400); - onChanged(); + public Builder mergeBoostSpec( + com.google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec value) { + if (boostSpecBuilder_ == null) { + if (((bitField0_ & 0x00040000) != 0) + && boostSpec_ != null + && boostSpec_ + != com.google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec + .getDefaultInstance()) { + getBoostSpecBuilder().mergeFrom(value); + } else { + boostSpec_ = value; + } + } else { + boostSpecBuilder_.mergeFrom(value); + } + if (boostSpec_ != null) { + bitField0_ |= 0x00040000; + onChanged(); + } return this; } @@ -36098,103 +47879,61 @@ public Builder clearCanonicalFilter() { * * *
            -     * The default filter that is applied when a user performs a search without
            -     * checking any filters on the search page.
            -     *
            -     * The filter applied to every search request when quality improvement such as
            -     * query expansion is needed. In the case a query does not have a sufficient
            -     * amount of results this filter will be used to determine whether or not to
            -     * enable the query expansion flow. The original filter will still be used for
            -     * the query expanded search.
            -     * This field is strongly recommended to achieve high search quality.
            -     *
            -     * For more information about filter syntax, see
            -     * [SearchRequest.filter][google.cloud.discoveryengine.v1beta.SearchRequest.filter].
            +     * Boost specification to boost certain documents.
            +     * For more information on boosting, see
            +     * [Boosting](https://cloud.google.com/generative-ai-app-builder/docs/boost-search-results)
                  * 
            * - * string canonical_filter = 29; - * - * @param value The bytes for canonicalFilter to set. - * @return This builder for chaining. + * .google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec boost_spec = 10; */ - public Builder setCanonicalFilterBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); + public Builder clearBoostSpec() { + bitField0_ = (bitField0_ & ~0x00040000); + boostSpec_ = null; + if (boostSpecBuilder_ != null) { + boostSpecBuilder_.dispose(); + boostSpecBuilder_ = null; } - checkByteStringIsUtf8(value); - canonicalFilter_ = value; - bitField0_ |= 0x00000400; onChanged(); return this; } - private java.lang.Object orderBy_ = ""; - /** * * *
            -     * The order in which documents are returned. Documents can be ordered by
            -     * a field in an [Document][google.cloud.discoveryengine.v1beta.Document]
            -     * object. Leave it unset if ordered by relevance. `order_by` expression is
            -     * case-sensitive.
            -     *
            -     * For more information on ordering the website search results, see
            -     * [Order web search
            -     * results](https://cloud.google.com/generative-ai-app-builder/docs/order-web-search-results).
            -     * For more information on ordering the healthcare search results, see
            -     * [Order healthcare search
            -     * results](https://cloud.google.com/generative-ai-app-builder/docs/order-hc-results).
            -     * If this field is unrecognizable, an `INVALID_ARGUMENT` is returned.
            +     * Boost specification to boost certain documents.
            +     * For more information on boosting, see
            +     * [Boosting](https://cloud.google.com/generative-ai-app-builder/docs/boost-search-results)
                  * 
            * - * string order_by = 8; - * - * @return The orderBy. + * .google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec boost_spec = 10; */ - 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; - } + public com.google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec.Builder + getBoostSpecBuilder() { + bitField0_ |= 0x00040000; + onChanged(); + return internalGetBoostSpecFieldBuilder().getBuilder(); } /** * * *
            -     * The order in which documents are returned. Documents can be ordered by
            -     * a field in an [Document][google.cloud.discoveryengine.v1beta.Document]
            -     * object. Leave it unset if ordered by relevance. `order_by` expression is
            -     * case-sensitive.
            -     *
            -     * For more information on ordering the website search results, see
            -     * [Order web search
            -     * results](https://cloud.google.com/generative-ai-app-builder/docs/order-web-search-results).
            -     * For more information on ordering the healthcare search results, see
            -     * [Order healthcare search
            -     * results](https://cloud.google.com/generative-ai-app-builder/docs/order-hc-results).
            -     * If this field is unrecognizable, an `INVALID_ARGUMENT` is returned.
            +     * Boost specification to boost certain documents.
            +     * For more information on boosting, see
            +     * [Boosting](https://cloud.google.com/generative-ai-app-builder/docs/boost-search-results)
                  * 
            * - * string order_by = 8; - * - * @return The bytes for orderBy. + * .google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec boost_spec = 10; */ - 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; + public com.google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpecOrBuilder + getBoostSpecOrBuilder() { + if (boostSpecBuilder_ != null) { + return boostSpecBuilder_.getMessageOrBuilder(); } else { - return (com.google.protobuf.ByteString) ref; + return boostSpec_ == null + ? com.google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec.getDefaultInstance() + : boostSpec_; } } @@ -36202,194 +47941,302 @@ public com.google.protobuf.ByteString getOrderByBytes() { * * *
            -     * The order in which documents are returned. Documents can be ordered by
            -     * a field in an [Document][google.cloud.discoveryengine.v1beta.Document]
            -     * object. Leave it unset if ordered by relevance. `order_by` expression is
            -     * case-sensitive.
            -     *
            -     * For more information on ordering the website search results, see
            -     * [Order web search
            -     * results](https://cloud.google.com/generative-ai-app-builder/docs/order-web-search-results).
            -     * For more information on ordering the healthcare search results, see
            -     * [Order healthcare search
            -     * results](https://cloud.google.com/generative-ai-app-builder/docs/order-hc-results).
            -     * If this field is unrecognizable, an `INVALID_ARGUMENT` is returned.
            +     * Boost specification to boost certain documents.
            +     * For more information on boosting, see
            +     * [Boosting](https://cloud.google.com/generative-ai-app-builder/docs/boost-search-results)
                  * 
            * - * string order_by = 8; - * - * @param value The orderBy to set. - * @return This builder for chaining. + * .google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec boost_spec = 10; */ - public Builder setOrderBy(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec, + com.google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec.Builder, + com.google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpecOrBuilder> + internalGetBoostSpecFieldBuilder() { + if (boostSpecBuilder_ == null) { + boostSpecBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec, + com.google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec.Builder, + com.google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpecOrBuilder>( + getBoostSpec(), getParentForChildren(), isClean()); + boostSpec_ = null; } - orderBy_ = value; - bitField0_ |= 0x00000800; + return boostSpecBuilder_; + } + + private static final class ParamsConverter + implements com.google.protobuf.MapFieldBuilder.Converter< + java.lang.String, com.google.protobuf.ValueOrBuilder, com.google.protobuf.Value> { + @java.lang.Override + public com.google.protobuf.Value build(com.google.protobuf.ValueOrBuilder val) { + if (val instanceof com.google.protobuf.Value) { + return (com.google.protobuf.Value) val; + } + return ((com.google.protobuf.Value.Builder) val).build(); + } + + @java.lang.Override + public com.google.protobuf.MapEntry + defaultEntry() { + return ParamsDefaultEntryHolder.defaultEntry; + } + } + ; + + private static final ParamsConverter paramsConverter = new ParamsConverter(); + + private com.google.protobuf.MapFieldBuilder< + java.lang.String, + com.google.protobuf.ValueOrBuilder, + com.google.protobuf.Value, + com.google.protobuf.Value.Builder> + params_; + + private com.google.protobuf.MapFieldBuilder< + java.lang.String, + com.google.protobuf.ValueOrBuilder, + com.google.protobuf.Value, + com.google.protobuf.Value.Builder> + internalGetParams() { + if (params_ == null) { + return new com.google.protobuf.MapFieldBuilder<>(paramsConverter); + } + return params_; + } + + private com.google.protobuf.MapFieldBuilder< + java.lang.String, + com.google.protobuf.ValueOrBuilder, + com.google.protobuf.Value, + com.google.protobuf.Value.Builder> + internalGetMutableParams() { + if (params_ == null) { + params_ = new com.google.protobuf.MapFieldBuilder<>(paramsConverter); + } + bitField0_ |= 0x00080000; onChanged(); - return this; + return params_; + } + + public int getParamsCount() { + return internalGetParams().ensureBuilderMap().size(); } /** * * *
            -     * The order in which documents are returned. Documents can be ordered by
            -     * a field in an [Document][google.cloud.discoveryengine.v1beta.Document]
            -     * object. Leave it unset if ordered by relevance. `order_by` expression is
            -     * case-sensitive.
            +     * Additional search parameters.
                  *
            -     * For more information on ordering the website search results, see
            -     * [Order web search
            -     * results](https://cloud.google.com/generative-ai-app-builder/docs/order-web-search-results).
            -     * For more information on ordering the healthcare search results, see
            -     * [Order healthcare search
            -     * results](https://cloud.google.com/generative-ai-app-builder/docs/order-hc-results).
            -     * If this field is unrecognizable, an `INVALID_ARGUMENT` is returned.
            -     * 
            + * For public website search only, supported values are: * - * string order_by = 8; + * * `user_country_code`: string. Default empty. If set to non-empty, results + * are restricted or boosted based on the location provided. + * For example, `user_country_code: "au"` * - * @return This builder for chaining. + * For available codes see [Country + * Codes](https://developers.google.com/custom-search/docs/json_api_reference#countryCodes) + * + * * `search_type`: double. Default empty. Enables non-webpage searching + * depending on the value. The only valid non-default value is 1, + * which enables image searching. + * For example, `search_type: 1` + *
            + * + * map<string, .google.protobuf.Value> params = 11; */ - public Builder clearOrderBy() { - orderBy_ = getDefaultInstance().getOrderBy(); - bitField0_ = (bitField0_ & ~0x00000800); - onChanged(); - return this; + @java.lang.Override + public boolean containsParams(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetParams().ensureBuilderMap().containsKey(key); + } + + /** Use {@link #getParamsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getParams() { + return getParamsMap(); } /** * * *
            -     * The order in which documents are returned. Documents can be ordered by
            -     * a field in an [Document][google.cloud.discoveryengine.v1beta.Document]
            -     * object. Leave it unset if ordered by relevance. `order_by` expression is
            -     * case-sensitive.
            +     * Additional search parameters.
                  *
            -     * For more information on ordering the website search results, see
            -     * [Order web search
            -     * results](https://cloud.google.com/generative-ai-app-builder/docs/order-web-search-results).
            -     * For more information on ordering the healthcare search results, see
            -     * [Order healthcare search
            -     * results](https://cloud.google.com/generative-ai-app-builder/docs/order-hc-results).
            -     * If this field is unrecognizable, an `INVALID_ARGUMENT` is returned.
            -     * 
            + * For public website search only, supported values are: * - * string order_by = 8; + * * `user_country_code`: string. Default empty. If set to non-empty, results + * are restricted or boosted based on the location provided. + * For example, `user_country_code: "au"` * - * @param value The bytes for orderBy to set. - * @return This builder for chaining. + * For available codes see [Country + * Codes](https://developers.google.com/custom-search/docs/json_api_reference#countryCodes) + * + * * `search_type`: double. Default empty. Enables non-webpage searching + * depending on the value. The only valid non-default value is 1, + * which enables image searching. + * For example, `search_type: 1` + *
            + * + * map<string, .google.protobuf.Value> params = 11; */ - public Builder setOrderByBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - orderBy_ = value; - bitField0_ |= 0x00000800; - onChanged(); - return this; + @java.lang.Override + public java.util.Map getParamsMap() { + return internalGetParams().getImmutableMap(); } - private com.google.cloud.discoveryengine.v1beta.UserInfo userInfo_; - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.discoveryengine.v1beta.UserInfo, - com.google.cloud.discoveryengine.v1beta.UserInfo.Builder, - com.google.cloud.discoveryengine.v1beta.UserInfoOrBuilder> - userInfoBuilder_; - /** * * *
            -     * Information about the end user.
            -     * Highly recommended for analytics.
            -     * [UserInfo.user_agent][google.cloud.discoveryengine.v1beta.UserInfo.user_agent]
            -     * is used to deduce `device_type` for analytics.
            -     * 
            + * Additional search parameters. * - * .google.cloud.discoveryengine.v1beta.UserInfo user_info = 21; + * For public website search only, supported values are: * - * @return Whether the userInfo field is set. + * * `user_country_code`: string. Default empty. If set to non-empty, results + * are restricted or boosted based on the location provided. + * For example, `user_country_code: "au"` + * + * For available codes see [Country + * Codes](https://developers.google.com/custom-search/docs/json_api_reference#countryCodes) + * + * * `search_type`: double. Default empty. Enables non-webpage searching + * depending on the value. The only valid non-default value is 1, + * which enables image searching. + * For example, `search_type: 1` + *
            + * + * map<string, .google.protobuf.Value> params = 11; */ - public boolean hasUserInfo() { - return ((bitField0_ & 0x00001000) != 0); + @java.lang.Override + public /* nullable */ com.google.protobuf.Value getParamsOrDefault( + java.lang.String key, + /* nullable */ + com.google.protobuf.Value defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = + internalGetMutableParams().ensureBuilderMap(); + return map.containsKey(key) ? paramsConverter.build(map.get(key)) : defaultValue; } /** * * *
            -     * Information about the end user.
            -     * Highly recommended for analytics.
            -     * [UserInfo.user_agent][google.cloud.discoveryengine.v1beta.UserInfo.user_agent]
            -     * is used to deduce `device_type` for analytics.
            -     * 
            + * Additional search parameters. * - * .google.cloud.discoveryengine.v1beta.UserInfo user_info = 21; + * For public website search only, supported values are: * - * @return The userInfo. + * * `user_country_code`: string. Default empty. If set to non-empty, results + * are restricted or boosted based on the location provided. + * For example, `user_country_code: "au"` + * + * For available codes see [Country + * Codes](https://developers.google.com/custom-search/docs/json_api_reference#countryCodes) + * + * * `search_type`: double. Default empty. Enables non-webpage searching + * depending on the value. The only valid non-default value is 1, + * which enables image searching. + * For example, `search_type: 1` + *
            + * + * map<string, .google.protobuf.Value> params = 11; */ - public com.google.cloud.discoveryengine.v1beta.UserInfo getUserInfo() { - if (userInfoBuilder_ == null) { - return userInfo_ == null - ? com.google.cloud.discoveryengine.v1beta.UserInfo.getDefaultInstance() - : userInfo_; - } else { - return userInfoBuilder_.getMessage(); + @java.lang.Override + public com.google.protobuf.Value getParamsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = + internalGetMutableParams().ensureBuilderMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); } + return paramsConverter.build(map.get(key)); + } + + public Builder clearParams() { + bitField0_ = (bitField0_ & ~0x00080000); + internalGetMutableParams().clear(); + return this; } /** * * *
            -     * Information about the end user.
            -     * Highly recommended for analytics.
            -     * [UserInfo.user_agent][google.cloud.discoveryengine.v1beta.UserInfo.user_agent]
            -     * is used to deduce `device_type` for analytics.
            +     * Additional search parameters.
            +     *
            +     * For public website search only, supported values are:
            +     *
            +     * * `user_country_code`: string. Default empty. If set to non-empty, results
            +     * are restricted or boosted based on the location provided.
            +     * For example, `user_country_code: "au"`
            +     *
            +     * For available codes see [Country
            +     * Codes](https://developers.google.com/custom-search/docs/json_api_reference#countryCodes)
            +     *
            +     * * `search_type`: double. Default empty. Enables non-webpage searching
            +     * depending on the value. The only valid non-default value is 1,
            +     * which enables image searching.
            +     * For example, `search_type: 1`
                  * 
            * - * .google.cloud.discoveryengine.v1beta.UserInfo user_info = 21; + * map<string, .google.protobuf.Value> params = 11; */ - public Builder setUserInfo(com.google.cloud.discoveryengine.v1beta.UserInfo value) { - if (userInfoBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - userInfo_ = value; - } else { - userInfoBuilder_.setMessage(value); + public Builder removeParams(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); } - bitField0_ |= 0x00001000; - onChanged(); + internalGetMutableParams().ensureBuilderMap().remove(key); return this; } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableParams() { + bitField0_ |= 0x00080000; + return internalGetMutableParams().ensureMessageMap(); + } + /** * * *
            -     * Information about the end user.
            -     * Highly recommended for analytics.
            -     * [UserInfo.user_agent][google.cloud.discoveryengine.v1beta.UserInfo.user_agent]
            -     * is used to deduce `device_type` for analytics.
            +     * Additional search parameters.
            +     *
            +     * For public website search only, supported values are:
            +     *
            +     * * `user_country_code`: string. Default empty. If set to non-empty, results
            +     * are restricted or boosted based on the location provided.
            +     * For example, `user_country_code: "au"`
            +     *
            +     * For available codes see [Country
            +     * Codes](https://developers.google.com/custom-search/docs/json_api_reference#countryCodes)
            +     *
            +     * * `search_type`: double. Default empty. Enables non-webpage searching
            +     * depending on the value. The only valid non-default value is 1,
            +     * which enables image searching.
            +     * For example, `search_type: 1`
                  * 
            * - * .google.cloud.discoveryengine.v1beta.UserInfo user_info = 21; + * map<string, .google.protobuf.Value> params = 11; */ - public Builder setUserInfo( - com.google.cloud.discoveryengine.v1beta.UserInfo.Builder builderForValue) { - if (userInfoBuilder_ == null) { - userInfo_ = builderForValue.build(); - } else { - userInfoBuilder_.setMessage(builderForValue.build()); + public Builder putParams(java.lang.String key, com.google.protobuf.Value value) { + if (key == null) { + throw new NullPointerException("map key"); } - bitField0_ |= 0x00001000; - onChanged(); + if (value == null) { + throw new NullPointerException("map value"); + } + internalGetMutableParams().ensureBuilderMap().put(key, value); + bitField0_ |= 0x00080000; return this; } @@ -36397,30 +48244,33 @@ public Builder setUserInfo( * * *
            -     * Information about the end user.
            -     * Highly recommended for analytics.
            -     * [UserInfo.user_agent][google.cloud.discoveryengine.v1beta.UserInfo.user_agent]
            -     * is used to deduce `device_type` for analytics.
            +     * Additional search parameters.
            +     *
            +     * For public website search only, supported values are:
            +     *
            +     * * `user_country_code`: string. Default empty. If set to non-empty, results
            +     * are restricted or boosted based on the location provided.
            +     * For example, `user_country_code: "au"`
            +     *
            +     * For available codes see [Country
            +     * Codes](https://developers.google.com/custom-search/docs/json_api_reference#countryCodes)
            +     *
            +     * * `search_type`: double. Default empty. Enables non-webpage searching
            +     * depending on the value. The only valid non-default value is 1,
            +     * which enables image searching.
            +     * For example, `search_type: 1`
                  * 
            * - * .google.cloud.discoveryengine.v1beta.UserInfo user_info = 21; + * map<string, .google.protobuf.Value> params = 11; */ - public Builder mergeUserInfo(com.google.cloud.discoveryengine.v1beta.UserInfo value) { - if (userInfoBuilder_ == null) { - if (((bitField0_ & 0x00001000) != 0) - && userInfo_ != null - && userInfo_ != com.google.cloud.discoveryengine.v1beta.UserInfo.getDefaultInstance()) { - getUserInfoBuilder().mergeFrom(value); - } else { - userInfo_ = value; + public Builder putAllParams(java.util.Map values) { + for (java.util.Map.Entry e : values.entrySet()) { + if (e.getKey() == null || e.getValue() == null) { + throw new NullPointerException(); } - } else { - userInfoBuilder_.mergeFrom(value); - } - if (userInfo_ != null) { - bitField0_ |= 0x00001000; - onChanged(); } + internalGetMutableParams().ensureBuilderMap().putAll(values); + bitField0_ |= 0x00080000; return this; } @@ -36428,62 +48278,89 @@ public Builder mergeUserInfo(com.google.cloud.discoveryengine.v1beta.UserInfo va * * *
            -     * Information about the end user.
            -     * Highly recommended for analytics.
            -     * [UserInfo.user_agent][google.cloud.discoveryengine.v1beta.UserInfo.user_agent]
            -     * is used to deduce `device_type` for analytics.
            +     * Additional search parameters.
            +     *
            +     * For public website search only, supported values are:
            +     *
            +     * * `user_country_code`: string. Default empty. If set to non-empty, results
            +     * are restricted or boosted based on the location provided.
            +     * For example, `user_country_code: "au"`
            +     *
            +     * For available codes see [Country
            +     * Codes](https://developers.google.com/custom-search/docs/json_api_reference#countryCodes)
            +     *
            +     * * `search_type`: double. Default empty. Enables non-webpage searching
            +     * depending on the value. The only valid non-default value is 1,
            +     * which enables image searching.
            +     * For example, `search_type: 1`
                  * 
            * - * .google.cloud.discoveryengine.v1beta.UserInfo user_info = 21; + * map<string, .google.protobuf.Value> params = 11; */ - public Builder clearUserInfo() { - bitField0_ = (bitField0_ & ~0x00001000); - userInfo_ = null; - if (userInfoBuilder_ != null) { - userInfoBuilder_.dispose(); - userInfoBuilder_ = null; + public com.google.protobuf.Value.Builder putParamsBuilderIfAbsent(java.lang.String key) { + java.util.Map builderMap = + internalGetMutableParams().ensureBuilderMap(); + com.google.protobuf.ValueOrBuilder entry = builderMap.get(key); + if (entry == null) { + entry = com.google.protobuf.Value.newBuilder(); + builderMap.put(key, entry); } - onChanged(); - return this; + if (entry instanceof com.google.protobuf.Value) { + entry = ((com.google.protobuf.Value) entry).toBuilder(); + builderMap.put(key, entry); + } + return (com.google.protobuf.Value.Builder) entry; } + private com.google.cloud.discoveryengine.v1beta.SearchRequest.QueryExpansionSpec + queryExpansionSpec_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.SearchRequest.QueryExpansionSpec, + com.google.cloud.discoveryengine.v1beta.SearchRequest.QueryExpansionSpec.Builder, + com.google.cloud.discoveryengine.v1beta.SearchRequest.QueryExpansionSpecOrBuilder> + queryExpansionSpecBuilder_; + /** * * *
            -     * Information about the end user.
            -     * Highly recommended for analytics.
            -     * [UserInfo.user_agent][google.cloud.discoveryengine.v1beta.UserInfo.user_agent]
            -     * is used to deduce `device_type` for analytics.
            +     * The query expansion specification that specifies the conditions under which
            +     * query expansion occurs.
                  * 
            * - * .google.cloud.discoveryengine.v1beta.UserInfo user_info = 21; + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.QueryExpansionSpec query_expansion_spec = 13; + * + * + * @return Whether the queryExpansionSpec field is set. */ - public com.google.cloud.discoveryengine.v1beta.UserInfo.Builder getUserInfoBuilder() { - bitField0_ |= 0x00001000; - onChanged(); - return internalGetUserInfoFieldBuilder().getBuilder(); + public boolean hasQueryExpansionSpec() { + return ((bitField0_ & 0x00100000) != 0); } /** * * *
            -     * Information about the end user.
            -     * Highly recommended for analytics.
            -     * [UserInfo.user_agent][google.cloud.discoveryengine.v1beta.UserInfo.user_agent]
            -     * is used to deduce `device_type` for analytics.
            +     * The query expansion specification that specifies the conditions under which
            +     * query expansion occurs.
                  * 
            * - * .google.cloud.discoveryengine.v1beta.UserInfo user_info = 21; + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.QueryExpansionSpec query_expansion_spec = 13; + * + * + * @return The queryExpansionSpec. */ - public com.google.cloud.discoveryengine.v1beta.UserInfoOrBuilder getUserInfoOrBuilder() { - if (userInfoBuilder_ != null) { - return userInfoBuilder_.getMessageOrBuilder(); + public com.google.cloud.discoveryengine.v1beta.SearchRequest.QueryExpansionSpec + getQueryExpansionSpec() { + if (queryExpansionSpecBuilder_ == null) { + return queryExpansionSpec_ == null + ? com.google.cloud.discoveryengine.v1beta.SearchRequest.QueryExpansionSpec + .getDefaultInstance() + : queryExpansionSpec_; } else { - return userInfo_ == null - ? com.google.cloud.discoveryengine.v1beta.UserInfo.getDefaultInstance() - : userInfo_; + return queryExpansionSpecBuilder_.getMessage(); } } @@ -36491,109 +48368,107 @@ public com.google.cloud.discoveryengine.v1beta.UserInfoOrBuilder getUserInfoOrBu * * *
            -     * Information about the end user.
            -     * Highly recommended for analytics.
            -     * [UserInfo.user_agent][google.cloud.discoveryengine.v1beta.UserInfo.user_agent]
            -     * is used to deduce `device_type` for analytics.
            +     * The query expansion specification that specifies the conditions under which
            +     * query expansion occurs.
                  * 
            * - * .google.cloud.discoveryengine.v1beta.UserInfo user_info = 21; + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.QueryExpansionSpec query_expansion_spec = 13; + * */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.discoveryengine.v1beta.UserInfo, - com.google.cloud.discoveryengine.v1beta.UserInfo.Builder, - com.google.cloud.discoveryengine.v1beta.UserInfoOrBuilder> - internalGetUserInfoFieldBuilder() { - if (userInfoBuilder_ == null) { - userInfoBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.discoveryengine.v1beta.UserInfo, - com.google.cloud.discoveryengine.v1beta.UserInfo.Builder, - com.google.cloud.discoveryengine.v1beta.UserInfoOrBuilder>( - getUserInfo(), getParentForChildren(), isClean()); - userInfo_ = null; + public Builder setQueryExpansionSpec( + com.google.cloud.discoveryengine.v1beta.SearchRequest.QueryExpansionSpec value) { + if (queryExpansionSpecBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + queryExpansionSpec_ = value; + } else { + queryExpansionSpecBuilder_.setMessage(value); } - return userInfoBuilder_; + bitField0_ |= 0x00100000; + onChanged(); + return this; } - private java.lang.Object languageCode_ = ""; - /** * * *
            -     * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
            -     * information, see [Standard
            -     * fields](https://cloud.google.com/apis/design/standard_fields). This field
            -     * helps to better interpret the query. If a value isn't specified, the query
            -     * language code is automatically detected, which may not be accurate.
            +     * The query expansion specification that specifies the conditions under which
            +     * query expansion occurs.
                  * 
            * - * string language_code = 35; - * - * @return The languageCode. + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.QueryExpansionSpec query_expansion_spec = 13; + * */ - public java.lang.String getLanguageCode() { - java.lang.Object ref = languageCode_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - languageCode_ = s; - return s; + public Builder setQueryExpansionSpec( + com.google.cloud.discoveryengine.v1beta.SearchRequest.QueryExpansionSpec.Builder + builderForValue) { + if (queryExpansionSpecBuilder_ == null) { + queryExpansionSpec_ = builderForValue.build(); } else { - return (java.lang.String) ref; + queryExpansionSpecBuilder_.setMessage(builderForValue.build()); } + bitField0_ |= 0x00100000; + onChanged(); + return this; } /** * * *
            -     * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
            -     * information, see [Standard
            -     * fields](https://cloud.google.com/apis/design/standard_fields). This field
            -     * helps to better interpret the query. If a value isn't specified, the query
            -     * language code is automatically detected, which may not be accurate.
            +     * The query expansion specification that specifies the conditions under which
            +     * query expansion occurs.
                  * 
            * - * string language_code = 35; - * - * @return The bytes for languageCode. + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.QueryExpansionSpec query_expansion_spec = 13; + * */ - public com.google.protobuf.ByteString getLanguageCodeBytes() { - java.lang.Object ref = languageCode_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - languageCode_ = b; - return b; + public Builder mergeQueryExpansionSpec( + com.google.cloud.discoveryengine.v1beta.SearchRequest.QueryExpansionSpec value) { + if (queryExpansionSpecBuilder_ == null) { + if (((bitField0_ & 0x00100000) != 0) + && queryExpansionSpec_ != null + && queryExpansionSpec_ + != com.google.cloud.discoveryengine.v1beta.SearchRequest.QueryExpansionSpec + .getDefaultInstance()) { + getQueryExpansionSpecBuilder().mergeFrom(value); + } else { + queryExpansionSpec_ = value; + } } else { - return (com.google.protobuf.ByteString) ref; + queryExpansionSpecBuilder_.mergeFrom(value); } + if (queryExpansionSpec_ != null) { + bitField0_ |= 0x00100000; + onChanged(); + } + return this; } /** * * *
            -     * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
            -     * information, see [Standard
            -     * fields](https://cloud.google.com/apis/design/standard_fields). This field
            -     * helps to better interpret the query. If a value isn't specified, the query
            -     * language code is automatically detected, which may not be accurate.
            +     * The query expansion specification that specifies the conditions under which
            +     * query expansion occurs.
                  * 
            * - * string language_code = 35; - * - * @param value The languageCode to set. - * @return This builder for chaining. + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.QueryExpansionSpec query_expansion_spec = 13; + * */ - public Builder setLanguageCode(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); + public Builder clearQueryExpansionSpec() { + bitField0_ = (bitField0_ & ~0x00100000); + queryExpansionSpec_ = null; + if (queryExpansionSpecBuilder_ != null) { + queryExpansionSpecBuilder_.dispose(); + queryExpansionSpecBuilder_ = null; } - languageCode_ = value; - bitField0_ |= 0x00002000; onChanged(); return this; } @@ -36602,147 +48477,149 @@ public Builder setLanguageCode(java.lang.String value) { * * *
            -     * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
            -     * information, see [Standard
            -     * fields](https://cloud.google.com/apis/design/standard_fields). This field
            -     * helps to better interpret the query. If a value isn't specified, the query
            -     * language code is automatically detected, which may not be accurate.
            +     * The query expansion specification that specifies the conditions under which
            +     * query expansion occurs.
                  * 
            * - * string language_code = 35; - * - * @return This builder for chaining. + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.QueryExpansionSpec query_expansion_spec = 13; + * */ - public Builder clearLanguageCode() { - languageCode_ = getDefaultInstance().getLanguageCode(); - bitField0_ = (bitField0_ & ~0x00002000); + public com.google.cloud.discoveryengine.v1beta.SearchRequest.QueryExpansionSpec.Builder + getQueryExpansionSpecBuilder() { + bitField0_ |= 0x00100000; onChanged(); - return this; + return internalGetQueryExpansionSpecFieldBuilder().getBuilder(); } /** * * *
            -     * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
            -     * information, see [Standard
            -     * fields](https://cloud.google.com/apis/design/standard_fields). This field
            -     * helps to better interpret the query. If a value isn't specified, the query
            -     * language code is automatically detected, which may not be accurate.
            +     * The query expansion specification that specifies the conditions under which
            +     * query expansion occurs.
                  * 
            * - * string language_code = 35; - * - * @param value The bytes for languageCode to set. - * @return This builder for chaining. + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.QueryExpansionSpec query_expansion_spec = 13; + * */ - public Builder setLanguageCodeBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); + public com.google.cloud.discoveryengine.v1beta.SearchRequest.QueryExpansionSpecOrBuilder + getQueryExpansionSpecOrBuilder() { + if (queryExpansionSpecBuilder_ != null) { + return queryExpansionSpecBuilder_.getMessageOrBuilder(); + } else { + return queryExpansionSpec_ == null + ? com.google.cloud.discoveryengine.v1beta.SearchRequest.QueryExpansionSpec + .getDefaultInstance() + : queryExpansionSpec_; } - checkByteStringIsUtf8(value); - languageCode_ = value; - bitField0_ |= 0x00002000; - onChanged(); - return this; } - private java.lang.Object regionCode_ = ""; - /** * * *
            -     * The Unicode country/region code (CLDR) of a location, such as "US" and
            -     * "419". For more information, see [Standard
            -     * fields](https://cloud.google.com/apis/design/standard_fields). If set,
            -     * then results will be boosted based on the region_code provided.
            +     * The query expansion specification that specifies the conditions under which
            +     * query expansion occurs.
                  * 
            * - * string region_code = 36; - * - * @return The regionCode. + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.QueryExpansionSpec query_expansion_spec = 13; + * */ - public java.lang.String getRegionCode() { - java.lang.Object ref = regionCode_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - regionCode_ = s; - return s; - } else { - return (java.lang.String) ref; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.SearchRequest.QueryExpansionSpec, + com.google.cloud.discoveryengine.v1beta.SearchRequest.QueryExpansionSpec.Builder, + com.google.cloud.discoveryengine.v1beta.SearchRequest.QueryExpansionSpecOrBuilder> + internalGetQueryExpansionSpecFieldBuilder() { + if (queryExpansionSpecBuilder_ == null) { + queryExpansionSpecBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.SearchRequest.QueryExpansionSpec, + com.google.cloud.discoveryengine.v1beta.SearchRequest.QueryExpansionSpec.Builder, + com.google.cloud.discoveryengine.v1beta.SearchRequest.QueryExpansionSpecOrBuilder>( + getQueryExpansionSpec(), getParentForChildren(), isClean()); + queryExpansionSpec_ = null; } + return queryExpansionSpecBuilder_; } + private com.google.cloud.discoveryengine.v1beta.SearchRequest.SpellCorrectionSpec + spellCorrectionSpec_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.SearchRequest.SpellCorrectionSpec, + com.google.cloud.discoveryengine.v1beta.SearchRequest.SpellCorrectionSpec.Builder, + com.google.cloud.discoveryengine.v1beta.SearchRequest.SpellCorrectionSpecOrBuilder> + spellCorrectionSpecBuilder_; + /** * * *
            -     * The Unicode country/region code (CLDR) of a location, such as "US" and
            -     * "419". For more information, see [Standard
            -     * fields](https://cloud.google.com/apis/design/standard_fields). If set,
            -     * then results will be boosted based on the region_code provided.
            +     * The spell correction specification that specifies the mode under
            +     * which spell correction takes effect.
                  * 
            * - * string region_code = 36; + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.SpellCorrectionSpec spell_correction_spec = 14; + * * - * @return The bytes for regionCode. + * @return Whether the spellCorrectionSpec field is set. */ - public com.google.protobuf.ByteString getRegionCodeBytes() { - java.lang.Object ref = regionCode_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - regionCode_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } + public boolean hasSpellCorrectionSpec() { + return ((bitField0_ & 0x00200000) != 0); } /** * * *
            -     * The Unicode country/region code (CLDR) of a location, such as "US" and
            -     * "419". For more information, see [Standard
            -     * fields](https://cloud.google.com/apis/design/standard_fields). If set,
            -     * then results will be boosted based on the region_code provided.
            +     * The spell correction specification that specifies the mode under
            +     * which spell correction takes effect.
                  * 
            * - * string region_code = 36; + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.SpellCorrectionSpec spell_correction_spec = 14; + * * - * @param value The regionCode to set. - * @return This builder for chaining. + * @return The spellCorrectionSpec. */ - public Builder setRegionCode(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); + public com.google.cloud.discoveryengine.v1beta.SearchRequest.SpellCorrectionSpec + getSpellCorrectionSpec() { + if (spellCorrectionSpecBuilder_ == null) { + return spellCorrectionSpec_ == null + ? com.google.cloud.discoveryengine.v1beta.SearchRequest.SpellCorrectionSpec + .getDefaultInstance() + : spellCorrectionSpec_; + } else { + return spellCorrectionSpecBuilder_.getMessage(); } - regionCode_ = value; - bitField0_ |= 0x00004000; - onChanged(); - return this; } /** * * *
            -     * The Unicode country/region code (CLDR) of a location, such as "US" and
            -     * "419". For more information, see [Standard
            -     * fields](https://cloud.google.com/apis/design/standard_fields). If set,
            -     * then results will be boosted based on the region_code provided.
            +     * The spell correction specification that specifies the mode under
            +     * which spell correction takes effect.
                  * 
            * - * string region_code = 36; - * - * @return This builder for chaining. + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.SpellCorrectionSpec spell_correction_spec = 14; + * */ - public Builder clearRegionCode() { - regionCode_ = getDefaultInstance().getRegionCode(); - bitField0_ = (bitField0_ & ~0x00004000); + public Builder setSpellCorrectionSpec( + com.google.cloud.discoveryengine.v1beta.SearchRequest.SpellCorrectionSpec value) { + if (spellCorrectionSpecBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + spellCorrectionSpec_ = value; + } else { + spellCorrectionSpecBuilder_.setMessage(value); + } + bitField0_ |= 0x00200000; onChanged(); return this; } @@ -36751,243 +48628,262 @@ public Builder clearRegionCode() { * * *
            -     * The Unicode country/region code (CLDR) of a location, such as "US" and
            -     * "419". For more information, see [Standard
            -     * fields](https://cloud.google.com/apis/design/standard_fields). If set,
            -     * then results will be boosted based on the region_code provided.
            +     * The spell correction specification that specifies the mode under
            +     * which spell correction takes effect.
                  * 
            * - * string region_code = 36; - * - * @param value The bytes for regionCode to set. - * @return This builder for chaining. + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.SpellCorrectionSpec spell_correction_spec = 14; + * */ - public Builder setRegionCodeBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); + public Builder setSpellCorrectionSpec( + com.google.cloud.discoveryengine.v1beta.SearchRequest.SpellCorrectionSpec.Builder + builderForValue) { + if (spellCorrectionSpecBuilder_ == null) { + spellCorrectionSpec_ = builderForValue.build(); + } else { + spellCorrectionSpecBuilder_.setMessage(builderForValue.build()); } - checkByteStringIsUtf8(value); - regionCode_ = value; - bitField0_ |= 0x00004000; + bitField0_ |= 0x00200000; onChanged(); return this; } - private java.util.List - facetSpecs_ = java.util.Collections.emptyList(); - - private void ensureFacetSpecsIsMutable() { - if (!((bitField0_ & 0x00008000) != 0)) { - facetSpecs_ = - new java.util.ArrayList< - com.google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec>(facetSpecs_); - bitField0_ |= 0x00008000; - } - } - - private com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec, - com.google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec.Builder, - com.google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpecOrBuilder> - facetSpecsBuilder_; - /** * * *
            -     * Facet specifications for faceted search. If empty, no facets are returned.
            -     *
            -     * A maximum of 100 values are allowed. Otherwise, an  `INVALID_ARGUMENT`
            -     * error is returned.
            +     * The spell correction specification that specifies the mode under
            +     * which spell correction takes effect.
                  * 
            * - * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec facet_specs = 9; + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.SpellCorrectionSpec spell_correction_spec = 14; * */ - public java.util.List - getFacetSpecsList() { - if (facetSpecsBuilder_ == null) { - return java.util.Collections.unmodifiableList(facetSpecs_); + public Builder mergeSpellCorrectionSpec( + com.google.cloud.discoveryengine.v1beta.SearchRequest.SpellCorrectionSpec value) { + if (spellCorrectionSpecBuilder_ == null) { + if (((bitField0_ & 0x00200000) != 0) + && spellCorrectionSpec_ != null + && spellCorrectionSpec_ + != com.google.cloud.discoveryengine.v1beta.SearchRequest.SpellCorrectionSpec + .getDefaultInstance()) { + getSpellCorrectionSpecBuilder().mergeFrom(value); + } else { + spellCorrectionSpec_ = value; + } } else { - return facetSpecsBuilder_.getMessageList(); + spellCorrectionSpecBuilder_.mergeFrom(value); + } + if (spellCorrectionSpec_ != null) { + bitField0_ |= 0x00200000; + onChanged(); } + return this; } /** * * *
            -     * Facet specifications for faceted search. If empty, no facets are returned.
            -     *
            -     * A maximum of 100 values are allowed. Otherwise, an  `INVALID_ARGUMENT`
            -     * error is returned.
            +     * The spell correction specification that specifies the mode under
            +     * which spell correction takes effect.
                  * 
            * - * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec facet_specs = 9; + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.SpellCorrectionSpec spell_correction_spec = 14; * */ - public int getFacetSpecsCount() { - if (facetSpecsBuilder_ == null) { - return facetSpecs_.size(); - } else { - return facetSpecsBuilder_.getCount(); + public Builder clearSpellCorrectionSpec() { + bitField0_ = (bitField0_ & ~0x00200000); + spellCorrectionSpec_ = null; + if (spellCorrectionSpecBuilder_ != null) { + spellCorrectionSpecBuilder_.dispose(); + spellCorrectionSpecBuilder_ = null; } + onChanged(); + return this; } /** * * *
            -     * Facet specifications for faceted search. If empty, no facets are returned.
            -     *
            -     * A maximum of 100 values are allowed. Otherwise, an  `INVALID_ARGUMENT`
            -     * error is returned.
            +     * The spell correction specification that specifies the mode under
            +     * which spell correction takes effect.
                  * 
            * - * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec facet_specs = 9; + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.SpellCorrectionSpec spell_correction_spec = 14; * */ - public com.google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec getFacetSpecs( - int index) { - if (facetSpecsBuilder_ == null) { - return facetSpecs_.get(index); - } else { - return facetSpecsBuilder_.getMessage(index); - } + public com.google.cloud.discoveryengine.v1beta.SearchRequest.SpellCorrectionSpec.Builder + getSpellCorrectionSpecBuilder() { + bitField0_ |= 0x00200000; + onChanged(); + return internalGetSpellCorrectionSpecFieldBuilder().getBuilder(); } /** * * *
            -     * Facet specifications for faceted search. If empty, no facets are returned.
            -     *
            -     * A maximum of 100 values are allowed. Otherwise, an  `INVALID_ARGUMENT`
            -     * error is returned.
            +     * The spell correction specification that specifies the mode under
            +     * which spell correction takes effect.
                  * 
            * - * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec facet_specs = 9; + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.SpellCorrectionSpec spell_correction_spec = 14; * */ - public Builder setFacetSpecs( - int index, com.google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec value) { - if (facetSpecsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureFacetSpecsIsMutable(); - facetSpecs_.set(index, value); - onChanged(); + public com.google.cloud.discoveryengine.v1beta.SearchRequest.SpellCorrectionSpecOrBuilder + getSpellCorrectionSpecOrBuilder() { + if (spellCorrectionSpecBuilder_ != null) { + return spellCorrectionSpecBuilder_.getMessageOrBuilder(); } else { - facetSpecsBuilder_.setMessage(index, value); + return spellCorrectionSpec_ == null + ? com.google.cloud.discoveryengine.v1beta.SearchRequest.SpellCorrectionSpec + .getDefaultInstance() + : spellCorrectionSpec_; } - return this; } /** * * *
            -     * Facet specifications for faceted search. If empty, no facets are returned.
            -     *
            -     * A maximum of 100 values are allowed. Otherwise, an  `INVALID_ARGUMENT`
            -     * error is returned.
            +     * The spell correction specification that specifies the mode under
            +     * which spell correction takes effect.
                  * 
            * - * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec facet_specs = 9; + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.SpellCorrectionSpec spell_correction_spec = 14; * */ - public Builder setFacetSpecs( - int index, - com.google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec.Builder builderForValue) { - if (facetSpecsBuilder_ == null) { - ensureFacetSpecsIsMutable(); - facetSpecs_.set(index, builderForValue.build()); - onChanged(); - } else { - facetSpecsBuilder_.setMessage(index, builderForValue.build()); + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.SearchRequest.SpellCorrectionSpec, + com.google.cloud.discoveryengine.v1beta.SearchRequest.SpellCorrectionSpec.Builder, + com.google.cloud.discoveryengine.v1beta.SearchRequest.SpellCorrectionSpecOrBuilder> + internalGetSpellCorrectionSpecFieldBuilder() { + if (spellCorrectionSpecBuilder_ == null) { + spellCorrectionSpecBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.SearchRequest.SpellCorrectionSpec, + com.google.cloud.discoveryengine.v1beta.SearchRequest.SpellCorrectionSpec.Builder, + com.google.cloud.discoveryengine.v1beta.SearchRequest.SpellCorrectionSpecOrBuilder>( + getSpellCorrectionSpec(), getParentForChildren(), isClean()); + spellCorrectionSpec_ = null; } - return this; + return spellCorrectionSpecBuilder_; } + private java.lang.Object userPseudoId_ = ""; + /** * * *
            -     * Facet specifications for faceted search. If empty, no facets are returned.
            +     * Optional. A unique identifier for tracking visitors. For example, this
            +     * could be implemented with an HTTP cookie, which should be able to uniquely
            +     * identify a visitor on a single device. This unique identifier should not
            +     * change if the visitor logs in or out of the website.
                  *
            -     * A maximum of 100 values are allowed. Otherwise, an  `INVALID_ARGUMENT`
            -     * error is returned.
            +     * This field should NOT have a fixed value such as `unknown_visitor`.
            +     *
            +     * This should be the same identifier as
            +     * [UserEvent.user_pseudo_id][google.cloud.discoveryengine.v1beta.UserEvent.user_pseudo_id]
            +     * and
            +     * [CompleteQueryRequest.user_pseudo_id][google.cloud.discoveryengine.v1beta.CompleteQueryRequest.user_pseudo_id]
            +     *
            +     * The field must be a UTF-8 encoded string with a length limit of 128
            +     * characters. Otherwise, an  `INVALID_ARGUMENT`  error is returned.
                  * 
            * - * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec facet_specs = 9; - * + * string user_pseudo_id = 15 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The userPseudoId. */ - public Builder addFacetSpecs( - com.google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec value) { - if (facetSpecsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureFacetSpecsIsMutable(); - facetSpecs_.add(value); - onChanged(); + public java.lang.String getUserPseudoId() { + java.lang.Object ref = userPseudoId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + userPseudoId_ = s; + return s; } else { - facetSpecsBuilder_.addMessage(value); + return (java.lang.String) ref; } - return this; } /** * * *
            -     * Facet specifications for faceted search. If empty, no facets are returned.
            +     * Optional. A unique identifier for tracking visitors. For example, this
            +     * could be implemented with an HTTP cookie, which should be able to uniquely
            +     * identify a visitor on a single device. This unique identifier should not
            +     * change if the visitor logs in or out of the website.
                  *
            -     * A maximum of 100 values are allowed. Otherwise, an  `INVALID_ARGUMENT`
            -     * error is returned.
            +     * This field should NOT have a fixed value such as `unknown_visitor`.
            +     *
            +     * This should be the same identifier as
            +     * [UserEvent.user_pseudo_id][google.cloud.discoveryengine.v1beta.UserEvent.user_pseudo_id]
            +     * and
            +     * [CompleteQueryRequest.user_pseudo_id][google.cloud.discoveryengine.v1beta.CompleteQueryRequest.user_pseudo_id]
            +     *
            +     * The field must be a UTF-8 encoded string with a length limit of 128
            +     * characters. Otherwise, an  `INVALID_ARGUMENT`  error is returned.
                  * 
            * - * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec facet_specs = 9; - * + * string user_pseudo_id = 15 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for userPseudoId. */ - public Builder addFacetSpecs( - int index, com.google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec value) { - if (facetSpecsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureFacetSpecsIsMutable(); - facetSpecs_.add(index, value); - onChanged(); + public com.google.protobuf.ByteString getUserPseudoIdBytes() { + java.lang.Object ref = userPseudoId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + userPseudoId_ = b; + return b; } else { - facetSpecsBuilder_.addMessage(index, value); + return (com.google.protobuf.ByteString) ref; } - return this; } /** * * *
            -     * Facet specifications for faceted search. If empty, no facets are returned.
            +     * Optional. A unique identifier for tracking visitors. For example, this
            +     * could be implemented with an HTTP cookie, which should be able to uniquely
            +     * identify a visitor on a single device. This unique identifier should not
            +     * change if the visitor logs in or out of the website.
                  *
            -     * A maximum of 100 values are allowed. Otherwise, an  `INVALID_ARGUMENT`
            -     * error is returned.
            +     * This field should NOT have a fixed value such as `unknown_visitor`.
            +     *
            +     * This should be the same identifier as
            +     * [UserEvent.user_pseudo_id][google.cloud.discoveryengine.v1beta.UserEvent.user_pseudo_id]
            +     * and
            +     * [CompleteQueryRequest.user_pseudo_id][google.cloud.discoveryengine.v1beta.CompleteQueryRequest.user_pseudo_id]
            +     *
            +     * The field must be a UTF-8 encoded string with a length limit of 128
            +     * characters. Otherwise, an  `INVALID_ARGUMENT`  error is returned.
                  * 
            * - * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec facet_specs = 9; - * + * string user_pseudo_id = 15 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The userPseudoId to set. + * @return This builder for chaining. */ - public Builder addFacetSpecs( - com.google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec.Builder builderForValue) { - if (facetSpecsBuilder_ == null) { - ensureFacetSpecsIsMutable(); - facetSpecs_.add(builderForValue.build()); - onChanged(); - } else { - facetSpecsBuilder_.addMessage(builderForValue.build()); + public Builder setUserPseudoId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); } + userPseudoId_ = value; + bitField0_ |= 0x00400000; + onChanged(); return this; } @@ -36995,25 +48891,30 @@ public Builder addFacetSpecs( * * *
            -     * Facet specifications for faceted search. If empty, no facets are returned.
            +     * Optional. A unique identifier for tracking visitors. For example, this
            +     * could be implemented with an HTTP cookie, which should be able to uniquely
            +     * identify a visitor on a single device. This unique identifier should not
            +     * change if the visitor logs in or out of the website.
                  *
            -     * A maximum of 100 values are allowed. Otherwise, an  `INVALID_ARGUMENT`
            -     * error is returned.
            +     * This field should NOT have a fixed value such as `unknown_visitor`.
            +     *
            +     * This should be the same identifier as
            +     * [UserEvent.user_pseudo_id][google.cloud.discoveryengine.v1beta.UserEvent.user_pseudo_id]
            +     * and
            +     * [CompleteQueryRequest.user_pseudo_id][google.cloud.discoveryengine.v1beta.CompleteQueryRequest.user_pseudo_id]
            +     *
            +     * The field must be a UTF-8 encoded string with a length limit of 128
            +     * characters. Otherwise, an  `INVALID_ARGUMENT`  error is returned.
                  * 
            * - * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec facet_specs = 9; - * + * string user_pseudo_id = 15 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. */ - public Builder addFacetSpecs( - int index, - com.google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec.Builder builderForValue) { - if (facetSpecsBuilder_ == null) { - ensureFacetSpecsIsMutable(); - facetSpecs_.add(index, builderForValue.build()); - onChanged(); - } else { - facetSpecsBuilder_.addMessage(index, builderForValue.build()); - } + public Builder clearUserPseudoId() { + userPseudoId_ = getDefaultInstance().getUserPseudoId(); + bitField0_ = (bitField0_ & ~0x00400000); + onChanged(); return this; } @@ -37021,74 +48922,111 @@ public Builder addFacetSpecs( * * *
            -     * Facet specifications for faceted search. If empty, no facets are returned.
            +     * Optional. A unique identifier for tracking visitors. For example, this
            +     * could be implemented with an HTTP cookie, which should be able to uniquely
            +     * identify a visitor on a single device. This unique identifier should not
            +     * change if the visitor logs in or out of the website.
                  *
            -     * A maximum of 100 values are allowed. Otherwise, an  `INVALID_ARGUMENT`
            -     * error is returned.
            +     * This field should NOT have a fixed value such as `unknown_visitor`.
            +     *
            +     * This should be the same identifier as
            +     * [UserEvent.user_pseudo_id][google.cloud.discoveryengine.v1beta.UserEvent.user_pseudo_id]
            +     * and
            +     * [CompleteQueryRequest.user_pseudo_id][google.cloud.discoveryengine.v1beta.CompleteQueryRequest.user_pseudo_id]
            +     *
            +     * The field must be a UTF-8 encoded string with a length limit of 128
            +     * characters. Otherwise, an  `INVALID_ARGUMENT`  error is returned.
                  * 
            * - * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec facet_specs = 9; - * + * string user_pseudo_id = 15 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for userPseudoId to set. + * @return This builder for chaining. */ - public Builder addAllFacetSpecs( - java.lang.Iterable< - ? extends com.google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec> - values) { - if (facetSpecsBuilder_ == null) { - ensureFacetSpecsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, facetSpecs_); - onChanged(); - } else { - facetSpecsBuilder_.addAllMessages(values); + public Builder setUserPseudoIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); } + checkByteStringIsUtf8(value); + userPseudoId_ = value; + bitField0_ |= 0x00400000; + onChanged(); return this; } + private com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec + contentSearchSpec_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec, + com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.Builder, + com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpecOrBuilder> + contentSearchSpecBuilder_; + /** * * *
            -     * Facet specifications for faceted search. If empty, no facets are returned.
            +     * A specification for configuring the behavior of content search.
            +     * 
            * - * A maximum of 100 values are allowed. Otherwise, an `INVALID_ARGUMENT` - * error is returned. + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec content_search_spec = 24; + * + * + * @return Whether the contentSearchSpec field is set. + */ + public boolean hasContentSearchSpec() { + return ((bitField0_ & 0x00800000) != 0); + } + + /** + * + * + *
            +     * A specification for configuring the behavior of content search.
                  * 
            * - * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec facet_specs = 9; + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec content_search_spec = 24; * + * + * @return The contentSearchSpec. */ - public Builder clearFacetSpecs() { - if (facetSpecsBuilder_ == null) { - facetSpecs_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00008000); - onChanged(); + public com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec + getContentSearchSpec() { + if (contentSearchSpecBuilder_ == null) { + return contentSearchSpec_ == null + ? com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec + .getDefaultInstance() + : contentSearchSpec_; } else { - facetSpecsBuilder_.clear(); + return contentSearchSpecBuilder_.getMessage(); } - return this; } /** * * *
            -     * Facet specifications for faceted search. If empty, no facets are returned.
            -     *
            -     * A maximum of 100 values are allowed. Otherwise, an  `INVALID_ARGUMENT`
            -     * error is returned.
            +     * A specification for configuring the behavior of content search.
                  * 
            * - * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec facet_specs = 9; + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec content_search_spec = 24; * */ - public Builder removeFacetSpecs(int index) { - if (facetSpecsBuilder_ == null) { - ensureFacetSpecsIsMutable(); - facetSpecs_.remove(index); - onChanged(); + public Builder setContentSearchSpec( + com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec value) { + if (contentSearchSpecBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + contentSearchSpec_ = value; } else { - facetSpecsBuilder_.remove(index); + contentSearchSpecBuilder_.setMessage(value); } + bitField0_ |= 0x00800000; + onChanged(); return this; } @@ -37096,185 +49034,211 @@ public Builder removeFacetSpecs(int index) { * * *
            -     * Facet specifications for faceted search. If empty, no facets are returned.
            -     *
            -     * A maximum of 100 values are allowed. Otherwise, an  `INVALID_ARGUMENT`
            -     * error is returned.
            +     * A specification for configuring the behavior of content search.
                  * 
            * - * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec facet_specs = 9; + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec content_search_spec = 24; * */ - public com.google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec.Builder - getFacetSpecsBuilder(int index) { - return internalGetFacetSpecsFieldBuilder().getBuilder(index); + public Builder setContentSearchSpec( + com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.Builder + builderForValue) { + if (contentSearchSpecBuilder_ == null) { + contentSearchSpec_ = builderForValue.build(); + } else { + contentSearchSpecBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00800000; + onChanged(); + return this; } /** * * *
            -     * Facet specifications for faceted search. If empty, no facets are returned.
            -     *
            -     * A maximum of 100 values are allowed. Otherwise, an  `INVALID_ARGUMENT`
            -     * error is returned.
            +     * A specification for configuring the behavior of content search.
                  * 
            * - * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec facet_specs = 9; + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec content_search_spec = 24; * */ - public com.google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpecOrBuilder - getFacetSpecsOrBuilder(int index) { - if (facetSpecsBuilder_ == null) { - return facetSpecs_.get(index); + public Builder mergeContentSearchSpec( + com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec value) { + if (contentSearchSpecBuilder_ == null) { + if (((bitField0_ & 0x00800000) != 0) + && contentSearchSpec_ != null + && contentSearchSpec_ + != com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec + .getDefaultInstance()) { + getContentSearchSpecBuilder().mergeFrom(value); + } else { + contentSearchSpec_ = value; + } } else { - return facetSpecsBuilder_.getMessageOrBuilder(index); + contentSearchSpecBuilder_.mergeFrom(value); + } + if (contentSearchSpec_ != null) { + bitField0_ |= 0x00800000; + onChanged(); } + return this; } /** * * *
            -     * Facet specifications for faceted search. If empty, no facets are returned.
            -     *
            -     * A maximum of 100 values are allowed. Otherwise, an  `INVALID_ARGUMENT`
            -     * error is returned.
            +     * A specification for configuring the behavior of content search.
                  * 
            * - * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec facet_specs = 9; + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec content_search_spec = 24; * */ - public java.util.List< - ? extends com.google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpecOrBuilder> - getFacetSpecsOrBuilderList() { - if (facetSpecsBuilder_ != null) { - return facetSpecsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(facetSpecs_); + public Builder clearContentSearchSpec() { + bitField0_ = (bitField0_ & ~0x00800000); + contentSearchSpec_ = null; + if (contentSearchSpecBuilder_ != null) { + contentSearchSpecBuilder_.dispose(); + contentSearchSpecBuilder_ = null; } + onChanged(); + return this; } /** * * *
            -     * Facet specifications for faceted search. If empty, no facets are returned.
            -     *
            -     * A maximum of 100 values are allowed. Otherwise, an  `INVALID_ARGUMENT`
            -     * error is returned.
            +     * A specification for configuring the behavior of content search.
                  * 
            * - * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec facet_specs = 9; + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec content_search_spec = 24; * - */ - public com.google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec.Builder - addFacetSpecsBuilder() { - return internalGetFacetSpecsFieldBuilder() - .addBuilder( - com.google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec.getDefaultInstance()); + */ + public com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.Builder + getContentSearchSpecBuilder() { + bitField0_ |= 0x00800000; + onChanged(); + return internalGetContentSearchSpecFieldBuilder().getBuilder(); } /** * * *
            -     * Facet specifications for faceted search. If empty, no facets are returned.
            -     *
            -     * A maximum of 100 values are allowed. Otherwise, an  `INVALID_ARGUMENT`
            -     * error is returned.
            +     * A specification for configuring the behavior of content search.
                  * 
            * - * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec facet_specs = 9; + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec content_search_spec = 24; * */ - public com.google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec.Builder - addFacetSpecsBuilder(int index) { - return internalGetFacetSpecsFieldBuilder() - .addBuilder( - index, - com.google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec.getDefaultInstance()); + public com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpecOrBuilder + getContentSearchSpecOrBuilder() { + if (contentSearchSpecBuilder_ != null) { + return contentSearchSpecBuilder_.getMessageOrBuilder(); + } else { + return contentSearchSpec_ == null + ? com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec + .getDefaultInstance() + : contentSearchSpec_; + } } /** * * *
            -     * Facet specifications for faceted search. If empty, no facets are returned.
            -     *
            -     * A maximum of 100 values are allowed. Otherwise, an  `INVALID_ARGUMENT`
            -     * error is returned.
            +     * A specification for configuring the behavior of content search.
                  * 
            * - * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec facet_specs = 9; + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec content_search_spec = 24; * */ - public java.util.List - getFacetSpecsBuilderList() { - return internalGetFacetSpecsFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec, - com.google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec.Builder, - com.google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpecOrBuilder> - internalGetFacetSpecsFieldBuilder() { - if (facetSpecsBuilder_ == null) { - facetSpecsBuilder_ = - new com.google.protobuf.RepeatedFieldBuilder< - com.google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec, - com.google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec.Builder, - com.google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpecOrBuilder>( - facetSpecs_, ((bitField0_ & 0x00008000) != 0), getParentForChildren(), isClean()); - facetSpecs_ = null; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec, + com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.Builder, + com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpecOrBuilder> + internalGetContentSearchSpecFieldBuilder() { + if (contentSearchSpecBuilder_ == null) { + contentSearchSpecBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec, + com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.Builder, + com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpecOrBuilder>( + getContentSearchSpec(), getParentForChildren(), isClean()); + contentSearchSpec_ = null; } - return facetSpecsBuilder_; + return contentSearchSpecBuilder_; } - private com.google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec boostSpec_; + private com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec embeddingSpec_; private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec, - com.google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec.Builder, - com.google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpecOrBuilder> - boostSpecBuilder_; + com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec, + com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.Builder, + com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpecOrBuilder> + embeddingSpecBuilder_; /** * * *
            -     * Boost specification to boost certain documents.
            -     * For more information on boosting, see
            -     * [Boosting](https://cloud.google.com/generative-ai-app-builder/docs/boost-search-results)
            +     * Uses the provided embedding to do additional semantic document retrieval.
            +     * The retrieval is based on the dot product of
            +     * [SearchRequest.EmbeddingSpec.EmbeddingVector.vector][google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector.vector]
            +     * and the document embedding that is provided in
            +     * [SearchRequest.EmbeddingSpec.EmbeddingVector.field_path][google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector.field_path].
            +     *
            +     * If
            +     * [SearchRequest.EmbeddingSpec.EmbeddingVector.field_path][google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector.field_path]
            +     * is not provided, it will use
            +     * [ServingConfig.EmbeddingConfig.field_path][google.cloud.discoveryengine.v1beta.ServingConfig.embedding_config].
                  * 
            * - * .google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec boost_spec = 10; + * .google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec embedding_spec = 23; + * * - * @return Whether the boostSpec field is set. + * @return Whether the embeddingSpec field is set. */ - public boolean hasBoostSpec() { - return ((bitField0_ & 0x00010000) != 0); + public boolean hasEmbeddingSpec() { + return ((bitField0_ & 0x01000000) != 0); } /** * * *
            -     * Boost specification to boost certain documents.
            -     * For more information on boosting, see
            -     * [Boosting](https://cloud.google.com/generative-ai-app-builder/docs/boost-search-results)
            +     * Uses the provided embedding to do additional semantic document retrieval.
            +     * The retrieval is based on the dot product of
            +     * [SearchRequest.EmbeddingSpec.EmbeddingVector.vector][google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector.vector]
            +     * and the document embedding that is provided in
            +     * [SearchRequest.EmbeddingSpec.EmbeddingVector.field_path][google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector.field_path].
            +     *
            +     * If
            +     * [SearchRequest.EmbeddingSpec.EmbeddingVector.field_path][google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector.field_path]
            +     * is not provided, it will use
            +     * [ServingConfig.EmbeddingConfig.field_path][google.cloud.discoveryengine.v1beta.ServingConfig.embedding_config].
                  * 
            * - * .google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec boost_spec = 10; + * .google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec embedding_spec = 23; + * * - * @return The boostSpec. + * @return The embeddingSpec. */ - public com.google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec getBoostSpec() { - if (boostSpecBuilder_ == null) { - return boostSpec_ == null - ? com.google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec.getDefaultInstance() - : boostSpec_; + public com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec getEmbeddingSpec() { + if (embeddingSpecBuilder_ == null) { + return embeddingSpec_ == null + ? com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec + .getDefaultInstance() + : embeddingSpec_; } else { - return boostSpecBuilder_.getMessage(); + return embeddingSpecBuilder_.getMessage(); } } @@ -37282,24 +49246,32 @@ public com.google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec getBoostS * * *
            -     * Boost specification to boost certain documents.
            -     * For more information on boosting, see
            -     * [Boosting](https://cloud.google.com/generative-ai-app-builder/docs/boost-search-results)
            +     * Uses the provided embedding to do additional semantic document retrieval.
            +     * The retrieval is based on the dot product of
            +     * [SearchRequest.EmbeddingSpec.EmbeddingVector.vector][google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector.vector]
            +     * and the document embedding that is provided in
            +     * [SearchRequest.EmbeddingSpec.EmbeddingVector.field_path][google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector.field_path].
            +     *
            +     * If
            +     * [SearchRequest.EmbeddingSpec.EmbeddingVector.field_path][google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector.field_path]
            +     * is not provided, it will use
            +     * [ServingConfig.EmbeddingConfig.field_path][google.cloud.discoveryengine.v1beta.ServingConfig.embedding_config].
                  * 
            * - * .google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec boost_spec = 10; + * .google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec embedding_spec = 23; + * */ - public Builder setBoostSpec( - com.google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec value) { - if (boostSpecBuilder_ == null) { + public Builder setEmbeddingSpec( + com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec value) { + if (embeddingSpecBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - boostSpec_ = value; + embeddingSpec_ = value; } else { - boostSpecBuilder_.setMessage(value); + embeddingSpecBuilder_.setMessage(value); } - bitField0_ |= 0x00010000; + bitField0_ |= 0x01000000; onChanged(); return this; } @@ -37308,21 +49280,30 @@ public Builder setBoostSpec( * * *
            -     * Boost specification to boost certain documents.
            -     * For more information on boosting, see
            -     * [Boosting](https://cloud.google.com/generative-ai-app-builder/docs/boost-search-results)
            +     * Uses the provided embedding to do additional semantic document retrieval.
            +     * The retrieval is based on the dot product of
            +     * [SearchRequest.EmbeddingSpec.EmbeddingVector.vector][google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector.vector]
            +     * and the document embedding that is provided in
            +     * [SearchRequest.EmbeddingSpec.EmbeddingVector.field_path][google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector.field_path].
            +     *
            +     * If
            +     * [SearchRequest.EmbeddingSpec.EmbeddingVector.field_path][google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector.field_path]
            +     * is not provided, it will use
            +     * [ServingConfig.EmbeddingConfig.field_path][google.cloud.discoveryengine.v1beta.ServingConfig.embedding_config].
                  * 
            * - * .google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec boost_spec = 10; + * .google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec embedding_spec = 23; + * */ - public Builder setBoostSpec( - com.google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec.Builder builderForValue) { - if (boostSpecBuilder_ == null) { - boostSpec_ = builderForValue.build(); + public Builder setEmbeddingSpec( + com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.Builder + builderForValue) { + if (embeddingSpecBuilder_ == null) { + embeddingSpec_ = builderForValue.build(); } else { - boostSpecBuilder_.setMessage(builderForValue.build()); + embeddingSpecBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00010000; + bitField0_ |= 0x01000000; onChanged(); return this; } @@ -37331,30 +49312,38 @@ public Builder setBoostSpec( * * *
            -     * Boost specification to boost certain documents.
            -     * For more information on boosting, see
            -     * [Boosting](https://cloud.google.com/generative-ai-app-builder/docs/boost-search-results)
            +     * Uses the provided embedding to do additional semantic document retrieval.
            +     * The retrieval is based on the dot product of
            +     * [SearchRequest.EmbeddingSpec.EmbeddingVector.vector][google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector.vector]
            +     * and the document embedding that is provided in
            +     * [SearchRequest.EmbeddingSpec.EmbeddingVector.field_path][google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector.field_path].
            +     *
            +     * If
            +     * [SearchRequest.EmbeddingSpec.EmbeddingVector.field_path][google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector.field_path]
            +     * is not provided, it will use
            +     * [ServingConfig.EmbeddingConfig.field_path][google.cloud.discoveryengine.v1beta.ServingConfig.embedding_config].
                  * 
            * - * .google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec boost_spec = 10; + * .google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec embedding_spec = 23; + * */ - public Builder mergeBoostSpec( - com.google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec value) { - if (boostSpecBuilder_ == null) { - if (((bitField0_ & 0x00010000) != 0) - && boostSpec_ != null - && boostSpec_ - != com.google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec + public Builder mergeEmbeddingSpec( + com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec value) { + if (embeddingSpecBuilder_ == null) { + if (((bitField0_ & 0x01000000) != 0) + && embeddingSpec_ != null + && embeddingSpec_ + != com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec .getDefaultInstance()) { - getBoostSpecBuilder().mergeFrom(value); + getEmbeddingSpecBuilder().mergeFrom(value); } else { - boostSpec_ = value; + embeddingSpec_ = value; } } else { - boostSpecBuilder_.mergeFrom(value); + embeddingSpecBuilder_.mergeFrom(value); } - if (boostSpec_ != null) { - bitField0_ |= 0x00010000; + if (embeddingSpec_ != null) { + bitField0_ |= 0x01000000; onChanged(); } return this; @@ -37364,19 +49353,27 @@ public Builder mergeBoostSpec( * * *
            -     * Boost specification to boost certain documents.
            -     * For more information on boosting, see
            -     * [Boosting](https://cloud.google.com/generative-ai-app-builder/docs/boost-search-results)
            +     * Uses the provided embedding to do additional semantic document retrieval.
            +     * The retrieval is based on the dot product of
            +     * [SearchRequest.EmbeddingSpec.EmbeddingVector.vector][google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector.vector]
            +     * and the document embedding that is provided in
            +     * [SearchRequest.EmbeddingSpec.EmbeddingVector.field_path][google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector.field_path].
            +     *
            +     * If
            +     * [SearchRequest.EmbeddingSpec.EmbeddingVector.field_path][google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector.field_path]
            +     * is not provided, it will use
            +     * [ServingConfig.EmbeddingConfig.field_path][google.cloud.discoveryengine.v1beta.ServingConfig.embedding_config].
                  * 
            * - * .google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec boost_spec = 10; + * .google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec embedding_spec = 23; + * */ - public Builder clearBoostSpec() { - bitField0_ = (bitField0_ & ~0x00010000); - boostSpec_ = null; - if (boostSpecBuilder_ != null) { - boostSpecBuilder_.dispose(); - boostSpecBuilder_ = null; + public Builder clearEmbeddingSpec() { + bitField0_ = (bitField0_ & ~0x01000000); + embeddingSpec_ = null; + if (embeddingSpecBuilder_ != null) { + embeddingSpecBuilder_.dispose(); + embeddingSpecBuilder_ = null; } onChanged(); return this; @@ -37386,39 +49383,56 @@ public Builder clearBoostSpec() { * * *
            -     * Boost specification to boost certain documents.
            -     * For more information on boosting, see
            -     * [Boosting](https://cloud.google.com/generative-ai-app-builder/docs/boost-search-results)
            +     * Uses the provided embedding to do additional semantic document retrieval.
            +     * The retrieval is based on the dot product of
            +     * [SearchRequest.EmbeddingSpec.EmbeddingVector.vector][google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector.vector]
            +     * and the document embedding that is provided in
            +     * [SearchRequest.EmbeddingSpec.EmbeddingVector.field_path][google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector.field_path].
            +     *
            +     * If
            +     * [SearchRequest.EmbeddingSpec.EmbeddingVector.field_path][google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector.field_path]
            +     * is not provided, it will use
            +     * [ServingConfig.EmbeddingConfig.field_path][google.cloud.discoveryengine.v1beta.ServingConfig.embedding_config].
                  * 
            * - * .google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec boost_spec = 10; + * .google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec embedding_spec = 23; + * */ - public com.google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec.Builder - getBoostSpecBuilder() { - bitField0_ |= 0x00010000; + public com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.Builder + getEmbeddingSpecBuilder() { + bitField0_ |= 0x01000000; onChanged(); - return internalGetBoostSpecFieldBuilder().getBuilder(); + return internalGetEmbeddingSpecFieldBuilder().getBuilder(); } /** * * *
            -     * Boost specification to boost certain documents.
            -     * For more information on boosting, see
            -     * [Boosting](https://cloud.google.com/generative-ai-app-builder/docs/boost-search-results)
            +     * Uses the provided embedding to do additional semantic document retrieval.
            +     * The retrieval is based on the dot product of
            +     * [SearchRequest.EmbeddingSpec.EmbeddingVector.vector][google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector.vector]
            +     * and the document embedding that is provided in
            +     * [SearchRequest.EmbeddingSpec.EmbeddingVector.field_path][google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector.field_path].
            +     *
            +     * If
            +     * [SearchRequest.EmbeddingSpec.EmbeddingVector.field_path][google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector.field_path]
            +     * is not provided, it will use
            +     * [ServingConfig.EmbeddingConfig.field_path][google.cloud.discoveryengine.v1beta.ServingConfig.embedding_config].
                  * 
            * - * .google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec boost_spec = 10; + * .google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec embedding_spec = 23; + * */ - public com.google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpecOrBuilder - getBoostSpecOrBuilder() { - if (boostSpecBuilder_ != null) { - return boostSpecBuilder_.getMessageOrBuilder(); + public com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpecOrBuilder + getEmbeddingSpecOrBuilder() { + if (embeddingSpecBuilder_ != null) { + return embeddingSpecBuilder_.getMessageOrBuilder(); } else { - return boostSpec_ == null - ? com.google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec.getDefaultInstance() - : boostSpec_; + return embeddingSpec_ == null + ? com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec + .getDefaultInstance() + : embeddingSpec_; } } @@ -37426,336 +49440,399 @@ public Builder clearBoostSpec() { * * *
            -     * Boost specification to boost certain documents.
            -     * For more information on boosting, see
            -     * [Boosting](https://cloud.google.com/generative-ai-app-builder/docs/boost-search-results)
            +     * Uses the provided embedding to do additional semantic document retrieval.
            +     * The retrieval is based on the dot product of
            +     * [SearchRequest.EmbeddingSpec.EmbeddingVector.vector][google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector.vector]
            +     * and the document embedding that is provided in
            +     * [SearchRequest.EmbeddingSpec.EmbeddingVector.field_path][google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector.field_path].
            +     *
            +     * If
            +     * [SearchRequest.EmbeddingSpec.EmbeddingVector.field_path][google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector.field_path]
            +     * is not provided, it will use
            +     * [ServingConfig.EmbeddingConfig.field_path][google.cloud.discoveryengine.v1beta.ServingConfig.embedding_config].
                  * 
            * - * .google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec boost_spec = 10; + * .google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec embedding_spec = 23; + * */ private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec, - com.google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec.Builder, - com.google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpecOrBuilder> - internalGetBoostSpecFieldBuilder() { - if (boostSpecBuilder_ == null) { - boostSpecBuilder_ = + com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec, + com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.Builder, + com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpecOrBuilder> + internalGetEmbeddingSpecFieldBuilder() { + if (embeddingSpecBuilder_ == null) { + embeddingSpecBuilder_ = new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec, - com.google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec.Builder, - com.google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpecOrBuilder>( - getBoostSpec(), getParentForChildren(), isClean()); - boostSpec_ = null; - } - return boostSpecBuilder_; - } - - private static final class ParamsConverter - implements com.google.protobuf.MapFieldBuilder.Converter< - java.lang.String, com.google.protobuf.ValueOrBuilder, com.google.protobuf.Value> { - @java.lang.Override - public com.google.protobuf.Value build(com.google.protobuf.ValueOrBuilder val) { - if (val instanceof com.google.protobuf.Value) { - return (com.google.protobuf.Value) val; - } - return ((com.google.protobuf.Value.Builder) val).build(); - } - - @java.lang.Override - public com.google.protobuf.MapEntry - defaultEntry() { - return ParamsDefaultEntryHolder.defaultEntry; - } - } - ; - - private static final ParamsConverter paramsConverter = new ParamsConverter(); - - private com.google.protobuf.MapFieldBuilder< - java.lang.String, - com.google.protobuf.ValueOrBuilder, - com.google.protobuf.Value, - com.google.protobuf.Value.Builder> - params_; - - private com.google.protobuf.MapFieldBuilder< - java.lang.String, - com.google.protobuf.ValueOrBuilder, - com.google.protobuf.Value, - com.google.protobuf.Value.Builder> - internalGetParams() { - if (params_ == null) { - return new com.google.protobuf.MapFieldBuilder<>(paramsConverter); - } - return params_; - } - - private com.google.protobuf.MapFieldBuilder< - java.lang.String, - com.google.protobuf.ValueOrBuilder, - com.google.protobuf.Value, - com.google.protobuf.Value.Builder> - internalGetMutableParams() { - if (params_ == null) { - params_ = new com.google.protobuf.MapFieldBuilder<>(paramsConverter); + com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec, + com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.Builder, + com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpecOrBuilder>( + getEmbeddingSpec(), getParentForChildren(), isClean()); + embeddingSpec_ = null; } - bitField0_ |= 0x00020000; - onChanged(); - return params_; + return embeddingSpecBuilder_; } - public int getParamsCount() { - return internalGetParams().ensureBuilderMap().size(); - } + private java.lang.Object rankingExpression_ = ""; /** * * *
            -     * Additional search parameters.
            +     * Optional. The ranking expression controls the customized ranking on
            +     * retrieval documents. This overrides
            +     * [ServingConfig.ranking_expression][google.cloud.discoveryengine.v1beta.ServingConfig.ranking_expression].
            +     * The syntax and supported features depend on the
            +     * `ranking_expression_backend` value. If `ranking_expression_backend` is not
            +     * provided, it defaults to `RANK_BY_EMBEDDING`.
                  *
            -     * For public website search only, supported values are:
            +     * If
            +     * [ranking_expression_backend][google.cloud.discoveryengine.v1beta.SearchRequest.ranking_expression_backend]
            +     * is not provided or set to `RANK_BY_EMBEDDING`, it should be a single
            +     * function or multiple functions that are joined by "+".
                  *
            -     * * `user_country_code`: string. Default empty. If set to non-empty, results
            -     * are restricted or boosted based on the location provided.
            -     * For example, `user_country_code: "au"`
            +     * * ranking_expression = function, { " + ", function };
                  *
            -     * For available codes see [Country
            -     * Codes](https://developers.google.com/custom-search/docs/json_api_reference#countryCodes)
            +     * Supported functions:
                  *
            -     * * `search_type`: double. Default empty. Enables non-webpage searching
            -     * depending on the value. The only valid non-default value is 1,
            -     * which enables image searching.
            -     * For example, `search_type: 1`
            +     * * double * relevance_score
            +     * * double * dotProduct(embedding_field_path)
            +     *
            +     * Function variables:
            +     *
            +     * * `relevance_score`: pre-defined keywords, used for measure relevance
            +     * between query and document.
            +     * * `embedding_field_path`: the document embedding field
            +     * used with query embedding vector.
            +     * * `dotProduct`: embedding function between `embedding_field_path` and
            +     * query embedding vector.
            +     *
            +     * Example ranking expression:
            +     *
            +     * If document has an embedding field doc_embedding, the ranking expression
            +     * could be `0.5 * relevance_score + 0.3 * dotProduct(doc_embedding)`.
            +     *
            +     * If
            +     * [ranking_expression_backend][google.cloud.discoveryengine.v1beta.SearchRequest.ranking_expression_backend]
            +     * is set to `RANK_BY_FORMULA`, the following expression types (and
            +     * combinations of those chained using + or
            +     * * operators) are supported:
            +     *
            +     * * `double`
            +     * * `signal`
            +     * * `log(signal)`
            +     * * `exp(signal)`
            +     * * `rr(signal, double > 0)`  -- reciprocal rank transformation with second
            +     * argument being a denominator constant.
            +     * * `is_nan(signal)` -- returns 0 if signal is NaN, 1 otherwise.
            +     * * `fill_nan(signal1, signal2 | double)` -- if signal1 is NaN, returns
            +     * signal2 | double, else returns signal1.
            +     *
            +     * Here are a few examples of ranking formulas that use the supported
            +     * ranking expression types:
            +     *
            +     * - `0.2 * semantic_similarity_score + 0.8 * log(keyword_similarity_score)`
            +     * -- mostly rank by the logarithm of `keyword_similarity_score` with slight
            +     * `semantic_smilarity_score` adjustment.
            +     * - `0.2 * exp(fill_nan(semantic_similarity_score, 0)) + 0.3 *
            +     * is_nan(keyword_similarity_score)` -- rank by the exponent of
            +     * `semantic_similarity_score` filling the value with 0 if it's NaN, also
            +     * add constant 0.3 adjustment to the final score if
            +     * `semantic_similarity_score` is NaN.
            +     * - `0.2 * rr(semantic_similarity_score, 16) + 0.8 *
            +     * rr(keyword_similarity_score, 16)` -- mostly rank by the reciprocal rank
            +     * of `keyword_similarity_score` with slight adjustment of reciprocal rank
            +     * of `semantic_smilarity_score`.
            +     *
            +     * The following signals are supported:
            +     *
            +     * * `semantic_similarity_score`: semantic similarity adjustment that is
            +     * calculated using the embeddings generated by a proprietary Google model.
            +     * This score determines how semantically similar a search query is to a
            +     * document.
            +     * * `keyword_similarity_score`: keyword match adjustment uses the Best
            +     * Match 25 (BM25) ranking function. This score is calculated using a
            +     * probabilistic model to estimate the probability that a document is
            +     * relevant to a given query.
            +     * * `relevance_score`: semantic relevance adjustment that uses a
            +     * proprietary Google model to determine the meaning and intent behind a
            +     * user's query in context with the content in the documents.
            +     * * `pctr_rank`: predicted conversion rate adjustment as a rank use
            +     * predicted Click-through rate (pCTR) to gauge the relevance and
            +     * attractiveness of a search result from a user's perspective. A higher
            +     * pCTR suggests that the result is more likely to satisfy the user's query
            +     * and intent, making it a valuable signal for ranking.
            +     * * `freshness_rank`: freshness adjustment as a rank
            +     * * `document_age`: The time in hours elapsed since the document was last
            +     * updated, a floating-point number (e.g., 0.25 means 15 minutes).
            +     * * `topicality_rank`: topicality adjustment as a rank. Uses proprietary
            +     * Google model to determine the keyword-based overlap between the query and
            +     * the document.
            +     * * `base_rank`: the default rank of the result
            +     * * `media_actor_match`: whether the media actor matches the query
            +     * * `media_director_match`: whether the media director matches the query
            +     * * `media_genre_match`: whether the media genre matches the query
            +     * * `media_language_match`: whether the media language matches the query
            +     * * `media_title_match`: whether the media title matches the query
            +     * * `media_prefix_similarity_rank`: prefix similarity rank for media
            +     * results
            +     * * `media_semantic_similarity_rank`: semantic similarity rank for media
            +     * results
                  * 
            * - * map<string, .google.protobuf.Value> params = 11; + * string ranking_expression = 26 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The rankingExpression. */ - @java.lang.Override - public boolean containsParams(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); + public java.lang.String getRankingExpression() { + java.lang.Object ref = rankingExpression_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + rankingExpression_ = s; + return s; + } else { + return (java.lang.String) ref; } - return internalGetParams().ensureBuilderMap().containsKey(key); - } - - /** Use {@link #getParamsMap()} instead. */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getParams() { - return getParamsMap(); } /** * * *
            -     * Additional search parameters.
            -     *
            -     * For public website search only, supported values are:
            -     *
            -     * * `user_country_code`: string. Default empty. If set to non-empty, results
            -     * are restricted or boosted based on the location provided.
            -     * For example, `user_country_code: "au"`
            -     *
            -     * For available codes see [Country
            -     * Codes](https://developers.google.com/custom-search/docs/json_api_reference#countryCodes)
            -     *
            -     * * `search_type`: double. Default empty. Enables non-webpage searching
            -     * depending on the value. The only valid non-default value is 1,
            -     * which enables image searching.
            -     * For example, `search_type: 1`
            -     * 
            + * Optional. The ranking expression controls the customized ranking on + * retrieval documents. This overrides + * [ServingConfig.ranking_expression][google.cloud.discoveryengine.v1beta.ServingConfig.ranking_expression]. + * The syntax and supported features depend on the + * `ranking_expression_backend` value. If `ranking_expression_backend` is not + * provided, it defaults to `RANK_BY_EMBEDDING`. * - * map<string, .google.protobuf.Value> params = 11; - */ - @java.lang.Override - public java.util.Map getParamsMap() { - return internalGetParams().getImmutableMap(); - } - - /** + * If + * [ranking_expression_backend][google.cloud.discoveryengine.v1beta.SearchRequest.ranking_expression_backend] + * is not provided or set to `RANK_BY_EMBEDDING`, it should be a single + * function or multiple functions that are joined by "+". * + * * ranking_expression = function, { " + ", function }; * - *
            -     * Additional search parameters.
            +     * Supported functions:
                  *
            -     * For public website search only, supported values are:
            +     * * double * relevance_score
            +     * * double * dotProduct(embedding_field_path)
                  *
            -     * * `user_country_code`: string. Default empty. If set to non-empty, results
            -     * are restricted or boosted based on the location provided.
            -     * For example, `user_country_code: "au"`
            +     * Function variables:
                  *
            -     * For available codes see [Country
            -     * Codes](https://developers.google.com/custom-search/docs/json_api_reference#countryCodes)
            +     * * `relevance_score`: pre-defined keywords, used for measure relevance
            +     * between query and document.
            +     * * `embedding_field_path`: the document embedding field
            +     * used with query embedding vector.
            +     * * `dotProduct`: embedding function between `embedding_field_path` and
            +     * query embedding vector.
                  *
            -     * * `search_type`: double. Default empty. Enables non-webpage searching
            -     * depending on the value. The only valid non-default value is 1,
            -     * which enables image searching.
            -     * For example, `search_type: 1`
            -     * 
            + * Example ranking expression: * - * map<string, .google.protobuf.Value> params = 11; - */ - @java.lang.Override - public /* nullable */ com.google.protobuf.Value getParamsOrDefault( - java.lang.String key, - /* nullable */ - com.google.protobuf.Value defaultValue) { - if (key == null) { - throw new NullPointerException("map key"); - } - java.util.Map map = - internalGetMutableParams().ensureBuilderMap(); - return map.containsKey(key) ? paramsConverter.build(map.get(key)) : defaultValue; - } - - /** + * If document has an embedding field doc_embedding, the ranking expression + * could be `0.5 * relevance_score + 0.3 * dotProduct(doc_embedding)`. * + * If + * [ranking_expression_backend][google.cloud.discoveryengine.v1beta.SearchRequest.ranking_expression_backend] + * is set to `RANK_BY_FORMULA`, the following expression types (and + * combinations of those chained using + or + * * operators) are supported: * - *
            -     * Additional search parameters.
            +     * * `double`
            +     * * `signal`
            +     * * `log(signal)`
            +     * * `exp(signal)`
            +     * * `rr(signal, double > 0)`  -- reciprocal rank transformation with second
            +     * argument being a denominator constant.
            +     * * `is_nan(signal)` -- returns 0 if signal is NaN, 1 otherwise.
            +     * * `fill_nan(signal1, signal2 | double)` -- if signal1 is NaN, returns
            +     * signal2 | double, else returns signal1.
                  *
            -     * For public website search only, supported values are:
            +     * Here are a few examples of ranking formulas that use the supported
            +     * ranking expression types:
                  *
            -     * * `user_country_code`: string. Default empty. If set to non-empty, results
            -     * are restricted or boosted based on the location provided.
            -     * For example, `user_country_code: "au"`
            +     * - `0.2 * semantic_similarity_score + 0.8 * log(keyword_similarity_score)`
            +     * -- mostly rank by the logarithm of `keyword_similarity_score` with slight
            +     * `semantic_smilarity_score` adjustment.
            +     * - `0.2 * exp(fill_nan(semantic_similarity_score, 0)) + 0.3 *
            +     * is_nan(keyword_similarity_score)` -- rank by the exponent of
            +     * `semantic_similarity_score` filling the value with 0 if it's NaN, also
            +     * add constant 0.3 adjustment to the final score if
            +     * `semantic_similarity_score` is NaN.
            +     * - `0.2 * rr(semantic_similarity_score, 16) + 0.8 *
            +     * rr(keyword_similarity_score, 16)` -- mostly rank by the reciprocal rank
            +     * of `keyword_similarity_score` with slight adjustment of reciprocal rank
            +     * of `semantic_smilarity_score`.
                  *
            -     * For available codes see [Country
            -     * Codes](https://developers.google.com/custom-search/docs/json_api_reference#countryCodes)
            +     * The following signals are supported:
                  *
            -     * * `search_type`: double. Default empty. Enables non-webpage searching
            -     * depending on the value. The only valid non-default value is 1,
            -     * which enables image searching.
            -     * For example, `search_type: 1`
            +     * * `semantic_similarity_score`: semantic similarity adjustment that is
            +     * calculated using the embeddings generated by a proprietary Google model.
            +     * This score determines how semantically similar a search query is to a
            +     * document.
            +     * * `keyword_similarity_score`: keyword match adjustment uses the Best
            +     * Match 25 (BM25) ranking function. This score is calculated using a
            +     * probabilistic model to estimate the probability that a document is
            +     * relevant to a given query.
            +     * * `relevance_score`: semantic relevance adjustment that uses a
            +     * proprietary Google model to determine the meaning and intent behind a
            +     * user's query in context with the content in the documents.
            +     * * `pctr_rank`: predicted conversion rate adjustment as a rank use
            +     * predicted Click-through rate (pCTR) to gauge the relevance and
            +     * attractiveness of a search result from a user's perspective. A higher
            +     * pCTR suggests that the result is more likely to satisfy the user's query
            +     * and intent, making it a valuable signal for ranking.
            +     * * `freshness_rank`: freshness adjustment as a rank
            +     * * `document_age`: The time in hours elapsed since the document was last
            +     * updated, a floating-point number (e.g., 0.25 means 15 minutes).
            +     * * `topicality_rank`: topicality adjustment as a rank. Uses proprietary
            +     * Google model to determine the keyword-based overlap between the query and
            +     * the document.
            +     * * `base_rank`: the default rank of the result
            +     * * `media_actor_match`: whether the media actor matches the query
            +     * * `media_director_match`: whether the media director matches the query
            +     * * `media_genre_match`: whether the media genre matches the query
            +     * * `media_language_match`: whether the media language matches the query
            +     * * `media_title_match`: whether the media title matches the query
            +     * * `media_prefix_similarity_rank`: prefix similarity rank for media
            +     * results
            +     * * `media_semantic_similarity_rank`: semantic similarity rank for media
            +     * results
                  * 
            * - * map<string, .google.protobuf.Value> params = 11; + * string ranking_expression = 26 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for rankingExpression. */ - @java.lang.Override - public com.google.protobuf.Value getParamsOrThrow(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - java.util.Map map = - internalGetMutableParams().ensureBuilderMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); + public com.google.protobuf.ByteString getRankingExpressionBytes() { + java.lang.Object ref = rankingExpression_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + rankingExpression_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; } - return paramsConverter.build(map.get(key)); - } - - public Builder clearParams() { - bitField0_ = (bitField0_ & ~0x00020000); - internalGetMutableParams().clear(); - return this; } /** * * *
            -     * Additional search parameters.
            -     *
            -     * For public website search only, supported values are:
            -     *
            -     * * `user_country_code`: string. Default empty. If set to non-empty, results
            -     * are restricted or boosted based on the location provided.
            -     * For example, `user_country_code: "au"`
            -     *
            -     * For available codes see [Country
            -     * Codes](https://developers.google.com/custom-search/docs/json_api_reference#countryCodes)
            -     *
            -     * * `search_type`: double. Default empty. Enables non-webpage searching
            -     * depending on the value. The only valid non-default value is 1,
            -     * which enables image searching.
            -     * For example, `search_type: 1`
            -     * 
            + * Optional. The ranking expression controls the customized ranking on + * retrieval documents. This overrides + * [ServingConfig.ranking_expression][google.cloud.discoveryengine.v1beta.ServingConfig.ranking_expression]. + * The syntax and supported features depend on the + * `ranking_expression_backend` value. If `ranking_expression_backend` is not + * provided, it defaults to `RANK_BY_EMBEDDING`. * - * map<string, .google.protobuf.Value> params = 11; - */ - public Builder removeParams(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - internalGetMutableParams().ensureBuilderMap().remove(key); - return this; - } - - /** Use alternate mutation accessors instead. */ - @java.lang.Deprecated - public java.util.Map getMutableParams() { - bitField0_ |= 0x00020000; - return internalGetMutableParams().ensureMessageMap(); - } - - /** + * If + * [ranking_expression_backend][google.cloud.discoveryengine.v1beta.SearchRequest.ranking_expression_backend] + * is not provided or set to `RANK_BY_EMBEDDING`, it should be a single + * function or multiple functions that are joined by "+". * + * * ranking_expression = function, { " + ", function }; * - *
            -     * Additional search parameters.
            +     * Supported functions:
                  *
            -     * For public website search only, supported values are:
            +     * * double * relevance_score
            +     * * double * dotProduct(embedding_field_path)
                  *
            -     * * `user_country_code`: string. Default empty. If set to non-empty, results
            -     * are restricted or boosted based on the location provided.
            -     * For example, `user_country_code: "au"`
            +     * Function variables:
                  *
            -     * For available codes see [Country
            -     * Codes](https://developers.google.com/custom-search/docs/json_api_reference#countryCodes)
            +     * * `relevance_score`: pre-defined keywords, used for measure relevance
            +     * between query and document.
            +     * * `embedding_field_path`: the document embedding field
            +     * used with query embedding vector.
            +     * * `dotProduct`: embedding function between `embedding_field_path` and
            +     * query embedding vector.
                  *
            -     * * `search_type`: double. Default empty. Enables non-webpage searching
            -     * depending on the value. The only valid non-default value is 1,
            -     * which enables image searching.
            -     * For example, `search_type: 1`
            -     * 
            + * Example ranking expression: * - * map<string, .google.protobuf.Value> params = 11; - */ - public Builder putParams(java.lang.String key, com.google.protobuf.Value value) { - if (key == null) { - throw new NullPointerException("map key"); - } - if (value == null) { - throw new NullPointerException("map value"); - } - internalGetMutableParams().ensureBuilderMap().put(key, value); - bitField0_ |= 0x00020000; - return this; - } - - /** + * If document has an embedding field doc_embedding, the ranking expression + * could be `0.5 * relevance_score + 0.3 * dotProduct(doc_embedding)`. * + * If + * [ranking_expression_backend][google.cloud.discoveryengine.v1beta.SearchRequest.ranking_expression_backend] + * is set to `RANK_BY_FORMULA`, the following expression types (and + * combinations of those chained using + or + * * operators) are supported: * - *
            -     * Additional search parameters.
            +     * * `double`
            +     * * `signal`
            +     * * `log(signal)`
            +     * * `exp(signal)`
            +     * * `rr(signal, double > 0)`  -- reciprocal rank transformation with second
            +     * argument being a denominator constant.
            +     * * `is_nan(signal)` -- returns 0 if signal is NaN, 1 otherwise.
            +     * * `fill_nan(signal1, signal2 | double)` -- if signal1 is NaN, returns
            +     * signal2 | double, else returns signal1.
                  *
            -     * For public website search only, supported values are:
            +     * Here are a few examples of ranking formulas that use the supported
            +     * ranking expression types:
                  *
            -     * * `user_country_code`: string. Default empty. If set to non-empty, results
            -     * are restricted or boosted based on the location provided.
            -     * For example, `user_country_code: "au"`
            +     * - `0.2 * semantic_similarity_score + 0.8 * log(keyword_similarity_score)`
            +     * -- mostly rank by the logarithm of `keyword_similarity_score` with slight
            +     * `semantic_smilarity_score` adjustment.
            +     * - `0.2 * exp(fill_nan(semantic_similarity_score, 0)) + 0.3 *
            +     * is_nan(keyword_similarity_score)` -- rank by the exponent of
            +     * `semantic_similarity_score` filling the value with 0 if it's NaN, also
            +     * add constant 0.3 adjustment to the final score if
            +     * `semantic_similarity_score` is NaN.
            +     * - `0.2 * rr(semantic_similarity_score, 16) + 0.8 *
            +     * rr(keyword_similarity_score, 16)` -- mostly rank by the reciprocal rank
            +     * of `keyword_similarity_score` with slight adjustment of reciprocal rank
            +     * of `semantic_smilarity_score`.
                  *
            -     * For available codes see [Country
            -     * Codes](https://developers.google.com/custom-search/docs/json_api_reference#countryCodes)
            +     * The following signals are supported:
                  *
            -     * * `search_type`: double. Default empty. Enables non-webpage searching
            -     * depending on the value. The only valid non-default value is 1,
            -     * which enables image searching.
            -     * For example, `search_type: 1`
            +     * * `semantic_similarity_score`: semantic similarity adjustment that is
            +     * calculated using the embeddings generated by a proprietary Google model.
            +     * This score determines how semantically similar a search query is to a
            +     * document.
            +     * * `keyword_similarity_score`: keyword match adjustment uses the Best
            +     * Match 25 (BM25) ranking function. This score is calculated using a
            +     * probabilistic model to estimate the probability that a document is
            +     * relevant to a given query.
            +     * * `relevance_score`: semantic relevance adjustment that uses a
            +     * proprietary Google model to determine the meaning and intent behind a
            +     * user's query in context with the content in the documents.
            +     * * `pctr_rank`: predicted conversion rate adjustment as a rank use
            +     * predicted Click-through rate (pCTR) to gauge the relevance and
            +     * attractiveness of a search result from a user's perspective. A higher
            +     * pCTR suggests that the result is more likely to satisfy the user's query
            +     * and intent, making it a valuable signal for ranking.
            +     * * `freshness_rank`: freshness adjustment as a rank
            +     * * `document_age`: The time in hours elapsed since the document was last
            +     * updated, a floating-point number (e.g., 0.25 means 15 minutes).
            +     * * `topicality_rank`: topicality adjustment as a rank. Uses proprietary
            +     * Google model to determine the keyword-based overlap between the query and
            +     * the document.
            +     * * `base_rank`: the default rank of the result
            +     * * `media_actor_match`: whether the media actor matches the query
            +     * * `media_director_match`: whether the media director matches the query
            +     * * `media_genre_match`: whether the media genre matches the query
            +     * * `media_language_match`: whether the media language matches the query
            +     * * `media_title_match`: whether the media title matches the query
            +     * * `media_prefix_similarity_rank`: prefix similarity rank for media
            +     * results
            +     * * `media_semantic_similarity_rank`: semantic similarity rank for media
            +     * results
                  * 
            * - * map<string, .google.protobuf.Value> params = 11; + * string ranking_expression = 26 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The rankingExpression to set. + * @return This builder for chaining. */ - public Builder putAllParams(java.util.Map values) { - for (java.util.Map.Entry e : values.entrySet()) { - if (e.getKey() == null || e.getValue() == null) { - throw new NullPointerException(); - } + public Builder setRankingExpression(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); } - internalGetMutableParams().ensureBuilderMap().putAll(values); - bitField0_ |= 0x00020000; + rankingExpression_ = value; + bitField0_ |= 0x02000000; + onChanged(); return this; } @@ -37763,140 +49840,114 @@ public Builder putAllParams(java.util.Map - * Additional search parameters. - * - * For public website search only, supported values are: - * - * * `user_country_code`: string. Default empty. If set to non-empty, results - * are restricted or boosted based on the location provided. - * For example, `user_country_code: "au"` - * - * For available codes see [Country - * Codes](https://developers.google.com/custom-search/docs/json_api_reference#countryCodes) - * - * * `search_type`: double. Default empty. Enables non-webpage searching - * depending on the value. The only valid non-default value is 1, - * which enables image searching. - * For example, `search_type: 1` - *
            + * Optional. The ranking expression controls the customized ranking on + * retrieval documents. This overrides + * [ServingConfig.ranking_expression][google.cloud.discoveryengine.v1beta.ServingConfig.ranking_expression]. + * The syntax and supported features depend on the + * `ranking_expression_backend` value. If `ranking_expression_backend` is not + * provided, it defaults to `RANK_BY_EMBEDDING`. * - * map<string, .google.protobuf.Value> params = 11; - */ - public com.google.protobuf.Value.Builder putParamsBuilderIfAbsent(java.lang.String key) { - java.util.Map builderMap = - internalGetMutableParams().ensureBuilderMap(); - com.google.protobuf.ValueOrBuilder entry = builderMap.get(key); - if (entry == null) { - entry = com.google.protobuf.Value.newBuilder(); - builderMap.put(key, entry); - } - if (entry instanceof com.google.protobuf.Value) { - entry = ((com.google.protobuf.Value) entry).toBuilder(); - builderMap.put(key, entry); - } - return (com.google.protobuf.Value.Builder) entry; - } - - private com.google.cloud.discoveryengine.v1beta.SearchRequest.QueryExpansionSpec - queryExpansionSpec_; - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.discoveryengine.v1beta.SearchRequest.QueryExpansionSpec, - com.google.cloud.discoveryengine.v1beta.SearchRequest.QueryExpansionSpec.Builder, - com.google.cloud.discoveryengine.v1beta.SearchRequest.QueryExpansionSpecOrBuilder> - queryExpansionSpecBuilder_; - - /** + * If + * [ranking_expression_backend][google.cloud.discoveryengine.v1beta.SearchRequest.ranking_expression_backend] + * is not provided or set to `RANK_BY_EMBEDDING`, it should be a single + * function or multiple functions that are joined by "+". * + * * ranking_expression = function, { " + ", function }; * - *
            -     * The query expansion specification that specifies the conditions under which
            -     * query expansion occurs.
            -     * 
            + * Supported functions: * - * - * .google.cloud.discoveryengine.v1beta.SearchRequest.QueryExpansionSpec query_expansion_spec = 13; - * + * * double * relevance_score + * * double * dotProduct(embedding_field_path) * - * @return Whether the queryExpansionSpec field is set. - */ - public boolean hasQueryExpansionSpec() { - return ((bitField0_ & 0x00040000) != 0); - } - - /** + * Function variables: * + * * `relevance_score`: pre-defined keywords, used for measure relevance + * between query and document. + * * `embedding_field_path`: the document embedding field + * used with query embedding vector. + * * `dotProduct`: embedding function between `embedding_field_path` and + * query embedding vector. * - *
            -     * The query expansion specification that specifies the conditions under which
            -     * query expansion occurs.
            -     * 
            + * Example ranking expression: * - * - * .google.cloud.discoveryengine.v1beta.SearchRequest.QueryExpansionSpec query_expansion_spec = 13; - * + * If document has an embedding field doc_embedding, the ranking expression + * could be `0.5 * relevance_score + 0.3 * dotProduct(doc_embedding)`. * - * @return The queryExpansionSpec. - */ - public com.google.cloud.discoveryengine.v1beta.SearchRequest.QueryExpansionSpec - getQueryExpansionSpec() { - if (queryExpansionSpecBuilder_ == null) { - return queryExpansionSpec_ == null - ? com.google.cloud.discoveryengine.v1beta.SearchRequest.QueryExpansionSpec - .getDefaultInstance() - : queryExpansionSpec_; - } else { - return queryExpansionSpecBuilder_.getMessage(); - } - } - - /** + * If + * [ranking_expression_backend][google.cloud.discoveryengine.v1beta.SearchRequest.ranking_expression_backend] + * is set to `RANK_BY_FORMULA`, the following expression types (and + * combinations of those chained using + or + * * operators) are supported: * + * * `double` + * * `signal` + * * `log(signal)` + * * `exp(signal)` + * * `rr(signal, double > 0)` -- reciprocal rank transformation with second + * argument being a denominator constant. + * * `is_nan(signal)` -- returns 0 if signal is NaN, 1 otherwise. + * * `fill_nan(signal1, signal2 | double)` -- if signal1 is NaN, returns + * signal2 | double, else returns signal1. * - *
            -     * The query expansion specification that specifies the conditions under which
            -     * query expansion occurs.
            -     * 
            + * Here are a few examples of ranking formulas that use the supported + * ranking expression types: * - * - * .google.cloud.discoveryengine.v1beta.SearchRequest.QueryExpansionSpec query_expansion_spec = 13; - * - */ - public Builder setQueryExpansionSpec( - com.google.cloud.discoveryengine.v1beta.SearchRequest.QueryExpansionSpec value) { - if (queryExpansionSpecBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - queryExpansionSpec_ = value; - } else { - queryExpansionSpecBuilder_.setMessage(value); - } - bitField0_ |= 0x00040000; - onChanged(); - return this; - } - - /** + * - `0.2 * semantic_similarity_score + 0.8 * log(keyword_similarity_score)` + * -- mostly rank by the logarithm of `keyword_similarity_score` with slight + * `semantic_smilarity_score` adjustment. + * - `0.2 * exp(fill_nan(semantic_similarity_score, 0)) + 0.3 * + * is_nan(keyword_similarity_score)` -- rank by the exponent of + * `semantic_similarity_score` filling the value with 0 if it's NaN, also + * add constant 0.3 adjustment to the final score if + * `semantic_similarity_score` is NaN. + * - `0.2 * rr(semantic_similarity_score, 16) + 0.8 * + * rr(keyword_similarity_score, 16)` -- mostly rank by the reciprocal rank + * of `keyword_similarity_score` with slight adjustment of reciprocal rank + * of `semantic_smilarity_score`. * + * The following signals are supported: * - *
            -     * The query expansion specification that specifies the conditions under which
            -     * query expansion occurs.
            +     * * `semantic_similarity_score`: semantic similarity adjustment that is
            +     * calculated using the embeddings generated by a proprietary Google model.
            +     * This score determines how semantically similar a search query is to a
            +     * document.
            +     * * `keyword_similarity_score`: keyword match adjustment uses the Best
            +     * Match 25 (BM25) ranking function. This score is calculated using a
            +     * probabilistic model to estimate the probability that a document is
            +     * relevant to a given query.
            +     * * `relevance_score`: semantic relevance adjustment that uses a
            +     * proprietary Google model to determine the meaning and intent behind a
            +     * user's query in context with the content in the documents.
            +     * * `pctr_rank`: predicted conversion rate adjustment as a rank use
            +     * predicted Click-through rate (pCTR) to gauge the relevance and
            +     * attractiveness of a search result from a user's perspective. A higher
            +     * pCTR suggests that the result is more likely to satisfy the user's query
            +     * and intent, making it a valuable signal for ranking.
            +     * * `freshness_rank`: freshness adjustment as a rank
            +     * * `document_age`: The time in hours elapsed since the document was last
            +     * updated, a floating-point number (e.g., 0.25 means 15 minutes).
            +     * * `topicality_rank`: topicality adjustment as a rank. Uses proprietary
            +     * Google model to determine the keyword-based overlap between the query and
            +     * the document.
            +     * * `base_rank`: the default rank of the result
            +     * * `media_actor_match`: whether the media actor matches the query
            +     * * `media_director_match`: whether the media director matches the query
            +     * * `media_genre_match`: whether the media genre matches the query
            +     * * `media_language_match`: whether the media language matches the query
            +     * * `media_title_match`: whether the media title matches the query
            +     * * `media_prefix_similarity_rank`: prefix similarity rank for media
            +     * results
            +     * * `media_semantic_similarity_rank`: semantic similarity rank for media
            +     * results
                  * 
            * - * - * .google.cloud.discoveryengine.v1beta.SearchRequest.QueryExpansionSpec query_expansion_spec = 13; - * + * string ranking_expression = 26 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. */ - public Builder setQueryExpansionSpec( - com.google.cloud.discoveryengine.v1beta.SearchRequest.QueryExpansionSpec.Builder - builderForValue) { - if (queryExpansionSpecBuilder_ == null) { - queryExpansionSpec_ = builderForValue.build(); - } else { - queryExpansionSpecBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00040000; + public Builder clearRankingExpression() { + rankingExpression_ = getDefaultInstance().getRankingExpression(); + bitField0_ = (bitField0_ & ~0x02000000); onChanged(); return this; } @@ -37905,206 +49956,210 @@ public Builder setQueryExpansionSpec( * * *
            -     * The query expansion specification that specifies the conditions under which
            -     * query expansion occurs.
            -     * 
            + * Optional. The ranking expression controls the customized ranking on + * retrieval documents. This overrides + * [ServingConfig.ranking_expression][google.cloud.discoveryengine.v1beta.ServingConfig.ranking_expression]. + * The syntax and supported features depend on the + * `ranking_expression_backend` value. If `ranking_expression_backend` is not + * provided, it defaults to `RANK_BY_EMBEDDING`. * - * - * .google.cloud.discoveryengine.v1beta.SearchRequest.QueryExpansionSpec query_expansion_spec = 13; - * - */ - public Builder mergeQueryExpansionSpec( - com.google.cloud.discoveryengine.v1beta.SearchRequest.QueryExpansionSpec value) { - if (queryExpansionSpecBuilder_ == null) { - if (((bitField0_ & 0x00040000) != 0) - && queryExpansionSpec_ != null - && queryExpansionSpec_ - != com.google.cloud.discoveryengine.v1beta.SearchRequest.QueryExpansionSpec - .getDefaultInstance()) { - getQueryExpansionSpecBuilder().mergeFrom(value); - } else { - queryExpansionSpec_ = value; - } - } else { - queryExpansionSpecBuilder_.mergeFrom(value); - } - if (queryExpansionSpec_ != null) { - bitField0_ |= 0x00040000; - onChanged(); - } - return this; - } - - /** + * If + * [ranking_expression_backend][google.cloud.discoveryengine.v1beta.SearchRequest.ranking_expression_backend] + * is not provided or set to `RANK_BY_EMBEDDING`, it should be a single + * function or multiple functions that are joined by "+". + * + * * ranking_expression = function, { " + ", function }; * + * Supported functions: * - *
            -     * The query expansion specification that specifies the conditions under which
            -     * query expansion occurs.
            -     * 
            + * * double * relevance_score + * * double * dotProduct(embedding_field_path) * - * - * .google.cloud.discoveryengine.v1beta.SearchRequest.QueryExpansionSpec query_expansion_spec = 13; - * - */ - public Builder clearQueryExpansionSpec() { - bitField0_ = (bitField0_ & ~0x00040000); - queryExpansionSpec_ = null; - if (queryExpansionSpecBuilder_ != null) { - queryExpansionSpecBuilder_.dispose(); - queryExpansionSpecBuilder_ = null; - } - onChanged(); - return this; - } - - /** + * Function variables: * + * * `relevance_score`: pre-defined keywords, used for measure relevance + * between query and document. + * * `embedding_field_path`: the document embedding field + * used with query embedding vector. + * * `dotProduct`: embedding function between `embedding_field_path` and + * query embedding vector. * - *
            -     * The query expansion specification that specifies the conditions under which
            -     * query expansion occurs.
            -     * 
            + * Example ranking expression: * - * - * .google.cloud.discoveryengine.v1beta.SearchRequest.QueryExpansionSpec query_expansion_spec = 13; - * - */ - public com.google.cloud.discoveryengine.v1beta.SearchRequest.QueryExpansionSpec.Builder - getQueryExpansionSpecBuilder() { - bitField0_ |= 0x00040000; - onChanged(); - return internalGetQueryExpansionSpecFieldBuilder().getBuilder(); - } - - /** + * If document has an embedding field doc_embedding, the ranking expression + * could be `0.5 * relevance_score + 0.3 * dotProduct(doc_embedding)`. * + * If + * [ranking_expression_backend][google.cloud.discoveryengine.v1beta.SearchRequest.ranking_expression_backend] + * is set to `RANK_BY_FORMULA`, the following expression types (and + * combinations of those chained using + or + * * operators) are supported: * - *
            -     * The query expansion specification that specifies the conditions under which
            -     * query expansion occurs.
            +     * * `double`
            +     * * `signal`
            +     * * `log(signal)`
            +     * * `exp(signal)`
            +     * * `rr(signal, double > 0)`  -- reciprocal rank transformation with second
            +     * argument being a denominator constant.
            +     * * `is_nan(signal)` -- returns 0 if signal is NaN, 1 otherwise.
            +     * * `fill_nan(signal1, signal2 | double)` -- if signal1 is NaN, returns
            +     * signal2 | double, else returns signal1.
            +     *
            +     * Here are a few examples of ranking formulas that use the supported
            +     * ranking expression types:
            +     *
            +     * - `0.2 * semantic_similarity_score + 0.8 * log(keyword_similarity_score)`
            +     * -- mostly rank by the logarithm of `keyword_similarity_score` with slight
            +     * `semantic_smilarity_score` adjustment.
            +     * - `0.2 * exp(fill_nan(semantic_similarity_score, 0)) + 0.3 *
            +     * is_nan(keyword_similarity_score)` -- rank by the exponent of
            +     * `semantic_similarity_score` filling the value with 0 if it's NaN, also
            +     * add constant 0.3 adjustment to the final score if
            +     * `semantic_similarity_score` is NaN.
            +     * - `0.2 * rr(semantic_similarity_score, 16) + 0.8 *
            +     * rr(keyword_similarity_score, 16)` -- mostly rank by the reciprocal rank
            +     * of `keyword_similarity_score` with slight adjustment of reciprocal rank
            +     * of `semantic_smilarity_score`.
            +     *
            +     * The following signals are supported:
            +     *
            +     * * `semantic_similarity_score`: semantic similarity adjustment that is
            +     * calculated using the embeddings generated by a proprietary Google model.
            +     * This score determines how semantically similar a search query is to a
            +     * document.
            +     * * `keyword_similarity_score`: keyword match adjustment uses the Best
            +     * Match 25 (BM25) ranking function. This score is calculated using a
            +     * probabilistic model to estimate the probability that a document is
            +     * relevant to a given query.
            +     * * `relevance_score`: semantic relevance adjustment that uses a
            +     * proprietary Google model to determine the meaning and intent behind a
            +     * user's query in context with the content in the documents.
            +     * * `pctr_rank`: predicted conversion rate adjustment as a rank use
            +     * predicted Click-through rate (pCTR) to gauge the relevance and
            +     * attractiveness of a search result from a user's perspective. A higher
            +     * pCTR suggests that the result is more likely to satisfy the user's query
            +     * and intent, making it a valuable signal for ranking.
            +     * * `freshness_rank`: freshness adjustment as a rank
            +     * * `document_age`: The time in hours elapsed since the document was last
            +     * updated, a floating-point number (e.g., 0.25 means 15 minutes).
            +     * * `topicality_rank`: topicality adjustment as a rank. Uses proprietary
            +     * Google model to determine the keyword-based overlap between the query and
            +     * the document.
            +     * * `base_rank`: the default rank of the result
            +     * * `media_actor_match`: whether the media actor matches the query
            +     * * `media_director_match`: whether the media director matches the query
            +     * * `media_genre_match`: whether the media genre matches the query
            +     * * `media_language_match`: whether the media language matches the query
            +     * * `media_title_match`: whether the media title matches the query
            +     * * `media_prefix_similarity_rank`: prefix similarity rank for media
            +     * results
            +     * * `media_semantic_similarity_rank`: semantic similarity rank for media
            +     * results
                  * 
            * - * - * .google.cloud.discoveryengine.v1beta.SearchRequest.QueryExpansionSpec query_expansion_spec = 13; - * + * string ranking_expression = 26 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for rankingExpression to set. + * @return This builder for chaining. */ - public com.google.cloud.discoveryengine.v1beta.SearchRequest.QueryExpansionSpecOrBuilder - getQueryExpansionSpecOrBuilder() { - if (queryExpansionSpecBuilder_ != null) { - return queryExpansionSpecBuilder_.getMessageOrBuilder(); - } else { - return queryExpansionSpec_ == null - ? com.google.cloud.discoveryengine.v1beta.SearchRequest.QueryExpansionSpec - .getDefaultInstance() - : queryExpansionSpec_; + public Builder setRankingExpressionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); } + checkByteStringIsUtf8(value); + rankingExpression_ = value; + bitField0_ |= 0x02000000; + onChanged(); + return this; } + private int rankingExpressionBackend_ = 0; + /** * * *
            -     * The query expansion specification that specifies the conditions under which
            -     * query expansion occurs.
            +     * Optional. The backend to use for the ranking expression evaluation.
                  * 
            * * - * .google.cloud.discoveryengine.v1beta.SearchRequest.QueryExpansionSpec query_expansion_spec = 13; + * .google.cloud.discoveryengine.v1beta.SearchRequest.RankingExpressionBackend ranking_expression_backend = 53 [(.google.api.field_behavior) = OPTIONAL]; * + * + * @return The enum numeric value on the wire for rankingExpressionBackend. */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.discoveryengine.v1beta.SearchRequest.QueryExpansionSpec, - com.google.cloud.discoveryengine.v1beta.SearchRequest.QueryExpansionSpec.Builder, - com.google.cloud.discoveryengine.v1beta.SearchRequest.QueryExpansionSpecOrBuilder> - internalGetQueryExpansionSpecFieldBuilder() { - if (queryExpansionSpecBuilder_ == null) { - queryExpansionSpecBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.discoveryengine.v1beta.SearchRequest.QueryExpansionSpec, - com.google.cloud.discoveryengine.v1beta.SearchRequest.QueryExpansionSpec.Builder, - com.google.cloud.discoveryengine.v1beta.SearchRequest.QueryExpansionSpecOrBuilder>( - getQueryExpansionSpec(), getParentForChildren(), isClean()); - queryExpansionSpec_ = null; - } - return queryExpansionSpecBuilder_; + @java.lang.Override + public int getRankingExpressionBackendValue() { + return rankingExpressionBackend_; } - private com.google.cloud.discoveryengine.v1beta.SearchRequest.SpellCorrectionSpec - spellCorrectionSpec_; - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.discoveryengine.v1beta.SearchRequest.SpellCorrectionSpec, - com.google.cloud.discoveryengine.v1beta.SearchRequest.SpellCorrectionSpec.Builder, - com.google.cloud.discoveryengine.v1beta.SearchRequest.SpellCorrectionSpecOrBuilder> - spellCorrectionSpecBuilder_; - /** * * *
            -     * The spell correction specification that specifies the mode under
            -     * which spell correction takes effect.
            +     * Optional. The backend to use for the ranking expression evaluation.
                  * 
            * * - * .google.cloud.discoveryengine.v1beta.SearchRequest.SpellCorrectionSpec spell_correction_spec = 14; + * .google.cloud.discoveryengine.v1beta.SearchRequest.RankingExpressionBackend ranking_expression_backend = 53 [(.google.api.field_behavior) = OPTIONAL]; * * - * @return Whether the spellCorrectionSpec field is set. + * @param value The enum numeric value on the wire for rankingExpressionBackend to set. + * @return This builder for chaining. */ - public boolean hasSpellCorrectionSpec() { - return ((bitField0_ & 0x00080000) != 0); + public Builder setRankingExpressionBackendValue(int value) { + rankingExpressionBackend_ = value; + bitField0_ |= 0x04000000; + onChanged(); + return this; } /** * * *
            -     * The spell correction specification that specifies the mode under
            -     * which spell correction takes effect.
            +     * Optional. The backend to use for the ranking expression evaluation.
                  * 
            * * - * .google.cloud.discoveryengine.v1beta.SearchRequest.SpellCorrectionSpec spell_correction_spec = 14; + * .google.cloud.discoveryengine.v1beta.SearchRequest.RankingExpressionBackend ranking_expression_backend = 53 [(.google.api.field_behavior) = OPTIONAL]; * * - * @return The spellCorrectionSpec. + * @return The rankingExpressionBackend. */ - public com.google.cloud.discoveryengine.v1beta.SearchRequest.SpellCorrectionSpec - getSpellCorrectionSpec() { - if (spellCorrectionSpecBuilder_ == null) { - return spellCorrectionSpec_ == null - ? com.google.cloud.discoveryengine.v1beta.SearchRequest.SpellCorrectionSpec - .getDefaultInstance() - : spellCorrectionSpec_; - } else { - return spellCorrectionSpecBuilder_.getMessage(); - } + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.SearchRequest.RankingExpressionBackend + getRankingExpressionBackend() { + com.google.cloud.discoveryengine.v1beta.SearchRequest.RankingExpressionBackend result = + com.google.cloud.discoveryengine.v1beta.SearchRequest.RankingExpressionBackend.forNumber( + rankingExpressionBackend_); + return result == null + ? com.google.cloud.discoveryengine.v1beta.SearchRequest.RankingExpressionBackend + .UNRECOGNIZED + : result; } /** * * *
            -     * The spell correction specification that specifies the mode under
            -     * which spell correction takes effect.
            +     * Optional. The backend to use for the ranking expression evaluation.
                  * 
            * * - * .google.cloud.discoveryengine.v1beta.SearchRequest.SpellCorrectionSpec spell_correction_spec = 14; + * .google.cloud.discoveryengine.v1beta.SearchRequest.RankingExpressionBackend ranking_expression_backend = 53 [(.google.api.field_behavior) = OPTIONAL]; * + * + * @param value The rankingExpressionBackend to set. + * @return This builder for chaining. */ - public Builder setSpellCorrectionSpec( - com.google.cloud.discoveryengine.v1beta.SearchRequest.SpellCorrectionSpec value) { - if (spellCorrectionSpecBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - spellCorrectionSpec_ = value; - } else { - spellCorrectionSpecBuilder_.setMessage(value); + public Builder setRankingExpressionBackend( + com.google.cloud.discoveryengine.v1beta.SearchRequest.RankingExpressionBackend value) { + if (value == null) { + throw new NullPointerException(); } - bitField0_ |= 0x00080000; + bitField0_ |= 0x04000000; + rankingExpressionBackend_ = value.getNumber(); onChanged(); return this; } @@ -38113,80 +50168,58 @@ public Builder setSpellCorrectionSpec( * * *
            -     * The spell correction specification that specifies the mode under
            -     * which spell correction takes effect.
            +     * Optional. The backend to use for the ranking expression evaluation.
                  * 
            * * - * .google.cloud.discoveryengine.v1beta.SearchRequest.SpellCorrectionSpec spell_correction_spec = 14; + * .google.cloud.discoveryengine.v1beta.SearchRequest.RankingExpressionBackend ranking_expression_backend = 53 [(.google.api.field_behavior) = OPTIONAL]; * + * + * @return This builder for chaining. */ - public Builder setSpellCorrectionSpec( - com.google.cloud.discoveryengine.v1beta.SearchRequest.SpellCorrectionSpec.Builder - builderForValue) { - if (spellCorrectionSpecBuilder_ == null) { - spellCorrectionSpec_ = builderForValue.build(); - } else { - spellCorrectionSpecBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00080000; + public Builder clearRankingExpressionBackend() { + bitField0_ = (bitField0_ & ~0x04000000); + rankingExpressionBackend_ = 0; onChanged(); return this; } + private boolean safeSearch_; + /** * * *
            -     * The spell correction specification that specifies the mode under
            -     * which spell correction takes effect.
            +     * Whether to turn on safe search. This is only supported for
            +     * website search.
                  * 
            * - * - * .google.cloud.discoveryengine.v1beta.SearchRequest.SpellCorrectionSpec spell_correction_spec = 14; - * + * bool safe_search = 20; + * + * @return The safeSearch. */ - public Builder mergeSpellCorrectionSpec( - com.google.cloud.discoveryengine.v1beta.SearchRequest.SpellCorrectionSpec value) { - if (spellCorrectionSpecBuilder_ == null) { - if (((bitField0_ & 0x00080000) != 0) - && spellCorrectionSpec_ != null - && spellCorrectionSpec_ - != com.google.cloud.discoveryengine.v1beta.SearchRequest.SpellCorrectionSpec - .getDefaultInstance()) { - getSpellCorrectionSpecBuilder().mergeFrom(value); - } else { - spellCorrectionSpec_ = value; - } - } else { - spellCorrectionSpecBuilder_.mergeFrom(value); - } - if (spellCorrectionSpec_ != null) { - bitField0_ |= 0x00080000; - onChanged(); - } - return this; + @java.lang.Override + public boolean getSafeSearch() { + return safeSearch_; } /** * * *
            -     * The spell correction specification that specifies the mode under
            -     * which spell correction takes effect.
            +     * Whether to turn on safe search. This is only supported for
            +     * website search.
                  * 
            * - * - * .google.cloud.discoveryengine.v1beta.SearchRequest.SpellCorrectionSpec spell_correction_spec = 14; - * + * bool safe_search = 20; + * + * @param value The safeSearch to set. + * @return This builder for chaining. */ - public Builder clearSpellCorrectionSpec() { - bitField0_ = (bitField0_ & ~0x00080000); - spellCorrectionSpec_ = null; - if (spellCorrectionSpecBuilder_ != null) { - spellCorrectionSpecBuilder_.dispose(); - spellCorrectionSpecBuilder_ = null; - } + public Builder setSafeSearch(boolean value) { + + safeSearch_ = value; + bitField0_ |= 0x08000000; onChanged(); return this; } @@ -38195,211 +50228,274 @@ public Builder clearSpellCorrectionSpec() { * * *
            -     * The spell correction specification that specifies the mode under
            -     * which spell correction takes effect.
            +     * Whether to turn on safe search. This is only supported for
            +     * website search.
                  * 
            * - * - * .google.cloud.discoveryengine.v1beta.SearchRequest.SpellCorrectionSpec spell_correction_spec = 14; - * + * bool safe_search = 20; + * + * @return This builder for chaining. */ - public com.google.cloud.discoveryengine.v1beta.SearchRequest.SpellCorrectionSpec.Builder - getSpellCorrectionSpecBuilder() { - bitField0_ |= 0x00080000; + public Builder clearSafeSearch() { + bitField0_ = (bitField0_ & ~0x08000000); + safeSearch_ = false; onChanged(); - return internalGetSpellCorrectionSpecFieldBuilder().getBuilder(); + return this; + } + + private com.google.protobuf.MapField userLabels_; + + private com.google.protobuf.MapField + internalGetUserLabels() { + if (userLabels_ == null) { + return com.google.protobuf.MapField.emptyMapField( + UserLabelsDefaultEntryHolder.defaultEntry); + } + return userLabels_; + } + + private com.google.protobuf.MapField + internalGetMutableUserLabels() { + if (userLabels_ == null) { + userLabels_ = + com.google.protobuf.MapField.newMapField(UserLabelsDefaultEntryHolder.defaultEntry); + } + if (!userLabels_.isMutable()) { + userLabels_ = userLabels_.copy(); + } + bitField0_ |= 0x10000000; + onChanged(); + return userLabels_; + } + + public int getUserLabelsCount() { + return internalGetUserLabels().getMap().size(); } /** * * *
            -     * The spell correction specification that specifies the mode under
            -     * which spell correction takes effect.
            +     * The user labels applied to a resource must meet the following requirements:
            +     *
            +     * * Each resource can have multiple labels, up to a maximum of 64.
            +     * * Each label must be a key-value pair.
            +     * * Keys have a minimum length of 1 character and a maximum length of 63
            +     * characters and cannot be empty. Values can be empty and have a maximum
            +     * length of 63 characters.
            +     * * Keys and values can contain only lowercase letters, numeric characters,
            +     * underscores, and dashes. All characters must use UTF-8 encoding, and
            +     * international characters are allowed.
            +     * * The key portion of a label must be unique. However, you can use the same
            +     * key with multiple resources.
            +     * * Keys must start with a lowercase letter or international character.
            +     *
            +     * See [Google Cloud
            +     * Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
            +     * for more details.
                  * 
            * - * - * .google.cloud.discoveryengine.v1beta.SearchRequest.SpellCorrectionSpec spell_correction_spec = 14; - * + * map<string, string> user_labels = 22; */ - public com.google.cloud.discoveryengine.v1beta.SearchRequest.SpellCorrectionSpecOrBuilder - getSpellCorrectionSpecOrBuilder() { - if (spellCorrectionSpecBuilder_ != null) { - return spellCorrectionSpecBuilder_.getMessageOrBuilder(); - } else { - return spellCorrectionSpec_ == null - ? com.google.cloud.discoveryengine.v1beta.SearchRequest.SpellCorrectionSpec - .getDefaultInstance() - : spellCorrectionSpec_; + @java.lang.Override + public boolean containsUserLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); } + return internalGetUserLabels().getMap().containsKey(key); + } + + /** Use {@link #getUserLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getUserLabels() { + return getUserLabelsMap(); } /** * * *
            -     * The spell correction specification that specifies the mode under
            -     * which spell correction takes effect.
            +     * The user labels applied to a resource must meet the following requirements:
            +     *
            +     * * Each resource can have multiple labels, up to a maximum of 64.
            +     * * Each label must be a key-value pair.
            +     * * Keys have a minimum length of 1 character and a maximum length of 63
            +     * characters and cannot be empty. Values can be empty and have a maximum
            +     * length of 63 characters.
            +     * * Keys and values can contain only lowercase letters, numeric characters,
            +     * underscores, and dashes. All characters must use UTF-8 encoding, and
            +     * international characters are allowed.
            +     * * The key portion of a label must be unique. However, you can use the same
            +     * key with multiple resources.
            +     * * Keys must start with a lowercase letter or international character.
            +     *
            +     * See [Google Cloud
            +     * Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
            +     * for more details.
                  * 
            * - * - * .google.cloud.discoveryengine.v1beta.SearchRequest.SpellCorrectionSpec spell_correction_spec = 14; - * + * map<string, string> user_labels = 22; */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.discoveryengine.v1beta.SearchRequest.SpellCorrectionSpec, - com.google.cloud.discoveryengine.v1beta.SearchRequest.SpellCorrectionSpec.Builder, - com.google.cloud.discoveryengine.v1beta.SearchRequest.SpellCorrectionSpecOrBuilder> - internalGetSpellCorrectionSpecFieldBuilder() { - if (spellCorrectionSpecBuilder_ == null) { - spellCorrectionSpecBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.discoveryengine.v1beta.SearchRequest.SpellCorrectionSpec, - com.google.cloud.discoveryengine.v1beta.SearchRequest.SpellCorrectionSpec.Builder, - com.google.cloud.discoveryengine.v1beta.SearchRequest.SpellCorrectionSpecOrBuilder>( - getSpellCorrectionSpec(), getParentForChildren(), isClean()); - spellCorrectionSpec_ = null; - } - return spellCorrectionSpecBuilder_; + @java.lang.Override + public java.util.Map getUserLabelsMap() { + return internalGetUserLabels().getMap(); } - private java.lang.Object userPseudoId_ = ""; - /** * * *
            -     * A unique identifier for tracking visitors. For example, this could be
            -     * implemented with an HTTP cookie, which should be able to uniquely identify
            -     * a visitor on a single device. This unique identifier should not change if
            -     * the visitor logs in or out of the website.
            -     *
            -     * This field should NOT have a fixed value such as `unknown_visitor`.
            +     * The user labels applied to a resource must meet the following requirements:
                  *
            -     * This should be the same identifier as
            -     * [UserEvent.user_pseudo_id][google.cloud.discoveryengine.v1beta.UserEvent.user_pseudo_id]
            -     * and
            -     * [CompleteQueryRequest.user_pseudo_id][google.cloud.discoveryengine.v1beta.CompleteQueryRequest.user_pseudo_id]
            +     * * Each resource can have multiple labels, up to a maximum of 64.
            +     * * Each label must be a key-value pair.
            +     * * Keys have a minimum length of 1 character and a maximum length of 63
            +     * characters and cannot be empty. Values can be empty and have a maximum
            +     * length of 63 characters.
            +     * * Keys and values can contain only lowercase letters, numeric characters,
            +     * underscores, and dashes. All characters must use UTF-8 encoding, and
            +     * international characters are allowed.
            +     * * The key portion of a label must be unique. However, you can use the same
            +     * key with multiple resources.
            +     * * Keys must start with a lowercase letter or international character.
                  *
            -     * The field must be a UTF-8 encoded string with a length limit of 128
            -     * characters. Otherwise, an  `INVALID_ARGUMENT`  error is returned.
            +     * See [Google Cloud
            +     * Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
            +     * for more details.
                  * 
            * - * string user_pseudo_id = 15; - * - * @return The userPseudoId. + * map<string, string> user_labels = 22; */ - public java.lang.String getUserPseudoId() { - java.lang.Object ref = userPseudoId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - userPseudoId_ = s; - return s; - } else { - return (java.lang.String) ref; + @java.lang.Override + public /* nullable */ java.lang.String getUserLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); } + java.util.Map map = internalGetUserLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; } /** * * *
            -     * A unique identifier for tracking visitors. For example, this could be
            -     * implemented with an HTTP cookie, which should be able to uniquely identify
            -     * a visitor on a single device. This unique identifier should not change if
            -     * the visitor logs in or out of the website.
            -     *
            -     * This field should NOT have a fixed value such as `unknown_visitor`.
            +     * The user labels applied to a resource must meet the following requirements:
                  *
            -     * This should be the same identifier as
            -     * [UserEvent.user_pseudo_id][google.cloud.discoveryengine.v1beta.UserEvent.user_pseudo_id]
            -     * and
            -     * [CompleteQueryRequest.user_pseudo_id][google.cloud.discoveryengine.v1beta.CompleteQueryRequest.user_pseudo_id]
            +     * * Each resource can have multiple labels, up to a maximum of 64.
            +     * * Each label must be a key-value pair.
            +     * * Keys have a minimum length of 1 character and a maximum length of 63
            +     * characters and cannot be empty. Values can be empty and have a maximum
            +     * length of 63 characters.
            +     * * Keys and values can contain only lowercase letters, numeric characters,
            +     * underscores, and dashes. All characters must use UTF-8 encoding, and
            +     * international characters are allowed.
            +     * * The key portion of a label must be unique. However, you can use the same
            +     * key with multiple resources.
            +     * * Keys must start with a lowercase letter or international character.
                  *
            -     * The field must be a UTF-8 encoded string with a length limit of 128
            -     * characters. Otherwise, an  `INVALID_ARGUMENT`  error is returned.
            +     * See [Google Cloud
            +     * Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
            +     * for more details.
                  * 
            * - * string user_pseudo_id = 15; - * - * @return The bytes for userPseudoId. + * map<string, string> user_labels = 22; */ - public com.google.protobuf.ByteString getUserPseudoIdBytes() { - java.lang.Object ref = userPseudoId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - userPseudoId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; + @java.lang.Override + public java.lang.String getUserLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetUserLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); } + return map.get(key); + } + + public Builder clearUserLabels() { + bitField0_ = (bitField0_ & ~0x10000000); + internalGetMutableUserLabels().getMutableMap().clear(); + return this; } /** * * *
            -     * A unique identifier for tracking visitors. For example, this could be
            -     * implemented with an HTTP cookie, which should be able to uniquely identify
            -     * a visitor on a single device. This unique identifier should not change if
            -     * the visitor logs in or out of the website.
            -     *
            -     * This field should NOT have a fixed value such as `unknown_visitor`.
            +     * The user labels applied to a resource must meet the following requirements:
                  *
            -     * This should be the same identifier as
            -     * [UserEvent.user_pseudo_id][google.cloud.discoveryengine.v1beta.UserEvent.user_pseudo_id]
            -     * and
            -     * [CompleteQueryRequest.user_pseudo_id][google.cloud.discoveryengine.v1beta.CompleteQueryRequest.user_pseudo_id]
            +     * * Each resource can have multiple labels, up to a maximum of 64.
            +     * * Each label must be a key-value pair.
            +     * * Keys have a minimum length of 1 character and a maximum length of 63
            +     * characters and cannot be empty. Values can be empty and have a maximum
            +     * length of 63 characters.
            +     * * Keys and values can contain only lowercase letters, numeric characters,
            +     * underscores, and dashes. All characters must use UTF-8 encoding, and
            +     * international characters are allowed.
            +     * * The key portion of a label must be unique. However, you can use the same
            +     * key with multiple resources.
            +     * * Keys must start with a lowercase letter or international character.
                  *
            -     * The field must be a UTF-8 encoded string with a length limit of 128
            -     * characters. Otherwise, an  `INVALID_ARGUMENT`  error is returned.
            +     * See [Google Cloud
            +     * Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
            +     * for more details.
                  * 
            * - * string user_pseudo_id = 15; - * - * @param value The userPseudoId to set. - * @return This builder for chaining. + * map<string, string> user_labels = 22; */ - public Builder setUserPseudoId(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); + public Builder removeUserLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); } - userPseudoId_ = value; - bitField0_ |= 0x00100000; - onChanged(); + internalGetMutableUserLabels().getMutableMap().remove(key); return this; } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableUserLabels() { + bitField0_ |= 0x10000000; + return internalGetMutableUserLabels().getMutableMap(); + } + /** * * *
            -     * A unique identifier for tracking visitors. For example, this could be
            -     * implemented with an HTTP cookie, which should be able to uniquely identify
            -     * a visitor on a single device. This unique identifier should not change if
            -     * the visitor logs in or out of the website.
            -     *
            -     * This field should NOT have a fixed value such as `unknown_visitor`.
            +     * The user labels applied to a resource must meet the following requirements:
                  *
            -     * This should be the same identifier as
            -     * [UserEvent.user_pseudo_id][google.cloud.discoveryengine.v1beta.UserEvent.user_pseudo_id]
            -     * and
            -     * [CompleteQueryRequest.user_pseudo_id][google.cloud.discoveryengine.v1beta.CompleteQueryRequest.user_pseudo_id]
            +     * * Each resource can have multiple labels, up to a maximum of 64.
            +     * * Each label must be a key-value pair.
            +     * * Keys have a minimum length of 1 character and a maximum length of 63
            +     * characters and cannot be empty. Values can be empty and have a maximum
            +     * length of 63 characters.
            +     * * Keys and values can contain only lowercase letters, numeric characters,
            +     * underscores, and dashes. All characters must use UTF-8 encoding, and
            +     * international characters are allowed.
            +     * * The key portion of a label must be unique. However, you can use the same
            +     * key with multiple resources.
            +     * * Keys must start with a lowercase letter or international character.
                  *
            -     * The field must be a UTF-8 encoded string with a length limit of 128
            -     * characters. Otherwise, an  `INVALID_ARGUMENT`  error is returned.
            +     * See [Google Cloud
            +     * Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
            +     * for more details.
                  * 
            * - * string user_pseudo_id = 15; - * - * @return This builder for chaining. + * map<string, string> user_labels = 22; */ - public Builder clearUserPseudoId() { - userPseudoId_ = getDefaultInstance().getUserPseudoId(); - bitField0_ = (bitField0_ & ~0x00100000); - onChanged(); + public Builder putUserLabels(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new NullPointerException("map key"); + } + if (value == null) { + throw new NullPointerException("map value"); + } + internalGetMutableUserLabels().getMutableMap().put(key, value); + bitField0_ |= 0x10000000; return this; } @@ -38407,85 +50503,95 @@ public Builder clearUserPseudoId() { * * *
            -     * A unique identifier for tracking visitors. For example, this could be
            -     * implemented with an HTTP cookie, which should be able to uniquely identify
            -     * a visitor on a single device. This unique identifier should not change if
            -     * the visitor logs in or out of the website.
            -     *
            -     * This field should NOT have a fixed value such as `unknown_visitor`.
            +     * The user labels applied to a resource must meet the following requirements:
                  *
            -     * This should be the same identifier as
            -     * [UserEvent.user_pseudo_id][google.cloud.discoveryengine.v1beta.UserEvent.user_pseudo_id]
            -     * and
            -     * [CompleteQueryRequest.user_pseudo_id][google.cloud.discoveryengine.v1beta.CompleteQueryRequest.user_pseudo_id]
            +     * * Each resource can have multiple labels, up to a maximum of 64.
            +     * * Each label must be a key-value pair.
            +     * * Keys have a minimum length of 1 character and a maximum length of 63
            +     * characters and cannot be empty. Values can be empty and have a maximum
            +     * length of 63 characters.
            +     * * Keys and values can contain only lowercase letters, numeric characters,
            +     * underscores, and dashes. All characters must use UTF-8 encoding, and
            +     * international characters are allowed.
            +     * * The key portion of a label must be unique. However, you can use the same
            +     * key with multiple resources.
            +     * * Keys must start with a lowercase letter or international character.
                  *
            -     * The field must be a UTF-8 encoded string with a length limit of 128
            -     * characters. Otherwise, an  `INVALID_ARGUMENT`  error is returned.
            +     * See [Google Cloud
            +     * Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
            +     * for more details.
                  * 
            * - * string user_pseudo_id = 15; - * - * @param value The bytes for userPseudoId to set. - * @return This builder for chaining. + * map<string, string> user_labels = 22; */ - public Builder setUserPseudoIdBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - userPseudoId_ = value; - bitField0_ |= 0x00100000; - onChanged(); + public Builder putAllUserLabels(java.util.Map values) { + internalGetMutableUserLabels().getMutableMap().putAll(values); + bitField0_ |= 0x10000000; return this; } - private com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec - contentSearchSpec_; + private com.google.cloud.discoveryengine.v1beta.SearchRequest + .NaturalLanguageQueryUnderstandingSpec + naturalLanguageQueryUnderstandingSpec_; private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec, - com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.Builder, - com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpecOrBuilder> - contentSearchSpecBuilder_; + com.google.cloud.discoveryengine.v1beta.SearchRequest + .NaturalLanguageQueryUnderstandingSpec, + com.google.cloud.discoveryengine.v1beta.SearchRequest + .NaturalLanguageQueryUnderstandingSpec.Builder, + com.google.cloud.discoveryengine.v1beta.SearchRequest + .NaturalLanguageQueryUnderstandingSpecOrBuilder> + naturalLanguageQueryUnderstandingSpecBuilder_; /** * * *
            -     * A specification for configuring the behavior of content search.
            +     * Optional. Config for natural language query understanding capabilities,
            +     * such as extracting structured field filters from the query. Refer to [this
            +     * documentation](https://cloud.google.com/generative-ai-app-builder/docs/natural-language-queries)
            +     * for more information.
            +     * If `naturalLanguageQueryUnderstandingSpec` is not specified, no additional
            +     * natural language query understanding will be done.
                  * 
            * * - * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec content_search_spec = 24; + * .google.cloud.discoveryengine.v1beta.SearchRequest.NaturalLanguageQueryUnderstandingSpec natural_language_query_understanding_spec = 28 [(.google.api.field_behavior) = OPTIONAL]; * * - * @return Whether the contentSearchSpec field is set. + * @return Whether the naturalLanguageQueryUnderstandingSpec field is set. */ - public boolean hasContentSearchSpec() { - return ((bitField0_ & 0x00200000) != 0); + public boolean hasNaturalLanguageQueryUnderstandingSpec() { + return ((bitField0_ & 0x20000000) != 0); } /** * * *
            -     * A specification for configuring the behavior of content search.
            +     * Optional. Config for natural language query understanding capabilities,
            +     * such as extracting structured field filters from the query. Refer to [this
            +     * documentation](https://cloud.google.com/generative-ai-app-builder/docs/natural-language-queries)
            +     * for more information.
            +     * If `naturalLanguageQueryUnderstandingSpec` is not specified, no additional
            +     * natural language query understanding will be done.
                  * 
            * * - * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec content_search_spec = 24; + * .google.cloud.discoveryengine.v1beta.SearchRequest.NaturalLanguageQueryUnderstandingSpec natural_language_query_understanding_spec = 28 [(.google.api.field_behavior) = OPTIONAL]; * * - * @return The contentSearchSpec. + * @return The naturalLanguageQueryUnderstandingSpec. */ - public com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec - getContentSearchSpec() { - if (contentSearchSpecBuilder_ == null) { - return contentSearchSpec_ == null - ? com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec - .getDefaultInstance() - : contentSearchSpec_; + public com.google.cloud.discoveryengine.v1beta.SearchRequest + .NaturalLanguageQueryUnderstandingSpec + getNaturalLanguageQueryUnderstandingSpec() { + if (naturalLanguageQueryUnderstandingSpecBuilder_ == null) { + return naturalLanguageQueryUnderstandingSpec_ == null + ? com.google.cloud.discoveryengine.v1beta.SearchRequest + .NaturalLanguageQueryUnderstandingSpec.getDefaultInstance() + : naturalLanguageQueryUnderstandingSpec_; } else { - return contentSearchSpecBuilder_.getMessage(); + return naturalLanguageQueryUnderstandingSpecBuilder_.getMessage(); } } @@ -38493,24 +50599,30 @@ public boolean hasContentSearchSpec() { * * *
            -     * A specification for configuring the behavior of content search.
            +     * Optional. Config for natural language query understanding capabilities,
            +     * such as extracting structured field filters from the query. Refer to [this
            +     * documentation](https://cloud.google.com/generative-ai-app-builder/docs/natural-language-queries)
            +     * for more information.
            +     * If `naturalLanguageQueryUnderstandingSpec` is not specified, no additional
            +     * natural language query understanding will be done.
                  * 
            * * - * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec content_search_spec = 24; + * .google.cloud.discoveryengine.v1beta.SearchRequest.NaturalLanguageQueryUnderstandingSpec natural_language_query_understanding_spec = 28 [(.google.api.field_behavior) = OPTIONAL]; * */ - public Builder setContentSearchSpec( - com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec value) { - if (contentSearchSpecBuilder_ == null) { + public Builder setNaturalLanguageQueryUnderstandingSpec( + com.google.cloud.discoveryengine.v1beta.SearchRequest.NaturalLanguageQueryUnderstandingSpec + value) { + if (naturalLanguageQueryUnderstandingSpecBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - contentSearchSpec_ = value; + naturalLanguageQueryUnderstandingSpec_ = value; } else { - contentSearchSpecBuilder_.setMessage(value); + naturalLanguageQueryUnderstandingSpecBuilder_.setMessage(value); } - bitField0_ |= 0x00200000; + bitField0_ |= 0x20000000; onChanged(); return this; } @@ -38519,22 +50631,28 @@ public Builder setContentSearchSpec( * * *
            -     * A specification for configuring the behavior of content search.
            +     * Optional. Config for natural language query understanding capabilities,
            +     * such as extracting structured field filters from the query. Refer to [this
            +     * documentation](https://cloud.google.com/generative-ai-app-builder/docs/natural-language-queries)
            +     * for more information.
            +     * If `naturalLanguageQueryUnderstandingSpec` is not specified, no additional
            +     * natural language query understanding will be done.
                  * 
            * * - * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec content_search_spec = 24; + * .google.cloud.discoveryengine.v1beta.SearchRequest.NaturalLanguageQueryUnderstandingSpec natural_language_query_understanding_spec = 28 [(.google.api.field_behavior) = OPTIONAL]; * */ - public Builder setContentSearchSpec( - com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.Builder + public Builder setNaturalLanguageQueryUnderstandingSpec( + com.google.cloud.discoveryengine.v1beta.SearchRequest.NaturalLanguageQueryUnderstandingSpec + .Builder builderForValue) { - if (contentSearchSpecBuilder_ == null) { - contentSearchSpec_ = builderForValue.build(); + if (naturalLanguageQueryUnderstandingSpecBuilder_ == null) { + naturalLanguageQueryUnderstandingSpec_ = builderForValue.build(); } else { - contentSearchSpecBuilder_.setMessage(builderForValue.build()); + naturalLanguageQueryUnderstandingSpecBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00200000; + bitField0_ |= 0x20000000; onChanged(); return this; } @@ -38543,30 +50661,36 @@ public Builder setContentSearchSpec( * * *
            -     * A specification for configuring the behavior of content search.
            +     * Optional. Config for natural language query understanding capabilities,
            +     * such as extracting structured field filters from the query. Refer to [this
            +     * documentation](https://cloud.google.com/generative-ai-app-builder/docs/natural-language-queries)
            +     * for more information.
            +     * If `naturalLanguageQueryUnderstandingSpec` is not specified, no additional
            +     * natural language query understanding will be done.
                  * 
            * * - * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec content_search_spec = 24; + * .google.cloud.discoveryengine.v1beta.SearchRequest.NaturalLanguageQueryUnderstandingSpec natural_language_query_understanding_spec = 28 [(.google.api.field_behavior) = OPTIONAL]; * */ - public Builder mergeContentSearchSpec( - com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec value) { - if (contentSearchSpecBuilder_ == null) { - if (((bitField0_ & 0x00200000) != 0) - && contentSearchSpec_ != null - && contentSearchSpec_ - != com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec - .getDefaultInstance()) { - getContentSearchSpecBuilder().mergeFrom(value); + public Builder mergeNaturalLanguageQueryUnderstandingSpec( + com.google.cloud.discoveryengine.v1beta.SearchRequest.NaturalLanguageQueryUnderstandingSpec + value) { + if (naturalLanguageQueryUnderstandingSpecBuilder_ == null) { + if (((bitField0_ & 0x20000000) != 0) + && naturalLanguageQueryUnderstandingSpec_ != null + && naturalLanguageQueryUnderstandingSpec_ + != com.google.cloud.discoveryengine.v1beta.SearchRequest + .NaturalLanguageQueryUnderstandingSpec.getDefaultInstance()) { + getNaturalLanguageQueryUnderstandingSpecBuilder().mergeFrom(value); } else { - contentSearchSpec_ = value; + naturalLanguageQueryUnderstandingSpec_ = value; } } else { - contentSearchSpecBuilder_.mergeFrom(value); + naturalLanguageQueryUnderstandingSpecBuilder_.mergeFrom(value); } - if (contentSearchSpec_ != null) { - bitField0_ |= 0x00200000; + if (naturalLanguageQueryUnderstandingSpec_ != null) { + bitField0_ |= 0x20000000; onChanged(); } return this; @@ -38576,19 +50700,24 @@ public Builder mergeContentSearchSpec( * * *
            -     * A specification for configuring the behavior of content search.
            +     * Optional. Config for natural language query understanding capabilities,
            +     * such as extracting structured field filters from the query. Refer to [this
            +     * documentation](https://cloud.google.com/generative-ai-app-builder/docs/natural-language-queries)
            +     * for more information.
            +     * If `naturalLanguageQueryUnderstandingSpec` is not specified, no additional
            +     * natural language query understanding will be done.
                  * 
            * * - * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec content_search_spec = 24; + * .google.cloud.discoveryengine.v1beta.SearchRequest.NaturalLanguageQueryUnderstandingSpec natural_language_query_understanding_spec = 28 [(.google.api.field_behavior) = OPTIONAL]; * */ - public Builder clearContentSearchSpec() { - bitField0_ = (bitField0_ & ~0x00200000); - contentSearchSpec_ = null; - if (contentSearchSpecBuilder_ != null) { - contentSearchSpecBuilder_.dispose(); - contentSearchSpecBuilder_ = null; + public Builder clearNaturalLanguageQueryUnderstandingSpec() { + bitField0_ = (bitField0_ & ~0x20000000); + naturalLanguageQueryUnderstandingSpec_ = null; + if (naturalLanguageQueryUnderstandingSpecBuilder_ != null) { + naturalLanguageQueryUnderstandingSpecBuilder_.dispose(); + naturalLanguageQueryUnderstandingSpecBuilder_ = null; } onChanged(); return this; @@ -38598,40 +50727,52 @@ public Builder clearContentSearchSpec() { * * *
            -     * A specification for configuring the behavior of content search.
            +     * Optional. Config for natural language query understanding capabilities,
            +     * such as extracting structured field filters from the query. Refer to [this
            +     * documentation](https://cloud.google.com/generative-ai-app-builder/docs/natural-language-queries)
            +     * for more information.
            +     * If `naturalLanguageQueryUnderstandingSpec` is not specified, no additional
            +     * natural language query understanding will be done.
                  * 
            * * - * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec content_search_spec = 24; + * .google.cloud.discoveryengine.v1beta.SearchRequest.NaturalLanguageQueryUnderstandingSpec natural_language_query_understanding_spec = 28 [(.google.api.field_behavior) = OPTIONAL]; * */ - public com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.Builder - getContentSearchSpecBuilder() { - bitField0_ |= 0x00200000; + public com.google.cloud.discoveryengine.v1beta.SearchRequest + .NaturalLanguageQueryUnderstandingSpec.Builder + getNaturalLanguageQueryUnderstandingSpecBuilder() { + bitField0_ |= 0x20000000; onChanged(); - return internalGetContentSearchSpecFieldBuilder().getBuilder(); + return internalGetNaturalLanguageQueryUnderstandingSpecFieldBuilder().getBuilder(); } /** * * *
            -     * A specification for configuring the behavior of content search.
            +     * Optional. Config for natural language query understanding capabilities,
            +     * such as extracting structured field filters from the query. Refer to [this
            +     * documentation](https://cloud.google.com/generative-ai-app-builder/docs/natural-language-queries)
            +     * for more information.
            +     * If `naturalLanguageQueryUnderstandingSpec` is not specified, no additional
            +     * natural language query understanding will be done.
                  * 
            * * - * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec content_search_spec = 24; + * .google.cloud.discoveryengine.v1beta.SearchRequest.NaturalLanguageQueryUnderstandingSpec natural_language_query_understanding_spec = 28 [(.google.api.field_behavior) = OPTIONAL]; * */ - public com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpecOrBuilder - getContentSearchSpecOrBuilder() { - if (contentSearchSpecBuilder_ != null) { - return contentSearchSpecBuilder_.getMessageOrBuilder(); + public com.google.cloud.discoveryengine.v1beta.SearchRequest + .NaturalLanguageQueryUnderstandingSpecOrBuilder + getNaturalLanguageQueryUnderstandingSpecOrBuilder() { + if (naturalLanguageQueryUnderstandingSpecBuilder_ != null) { + return naturalLanguageQueryUnderstandingSpecBuilder_.getMessageOrBuilder(); } else { - return contentSearchSpec_ == null - ? com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec - .getDefaultInstance() - : contentSearchSpec_; + return naturalLanguageQueryUnderstandingSpec_ == null + ? com.google.cloud.discoveryengine.v1beta.SearchRequest + .NaturalLanguageQueryUnderstandingSpec.getDefaultInstance() + : naturalLanguageQueryUnderstandingSpec_; } } @@ -38639,91 +50780,92 @@ public Builder clearContentSearchSpec() { * * *
            -     * A specification for configuring the behavior of content search.
            +     * Optional. Config for natural language query understanding capabilities,
            +     * such as extracting structured field filters from the query. Refer to [this
            +     * documentation](https://cloud.google.com/generative-ai-app-builder/docs/natural-language-queries)
            +     * for more information.
            +     * If `naturalLanguageQueryUnderstandingSpec` is not specified, no additional
            +     * natural language query understanding will be done.
                  * 
            * * - * .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec content_search_spec = 24; + * .google.cloud.discoveryengine.v1beta.SearchRequest.NaturalLanguageQueryUnderstandingSpec natural_language_query_understanding_spec = 28 [(.google.api.field_behavior) = OPTIONAL]; * */ private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec, - com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.Builder, - com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpecOrBuilder> - internalGetContentSearchSpecFieldBuilder() { - if (contentSearchSpecBuilder_ == null) { - contentSearchSpecBuilder_ = + com.google.cloud.discoveryengine.v1beta.SearchRequest + .NaturalLanguageQueryUnderstandingSpec, + com.google.cloud.discoveryengine.v1beta.SearchRequest + .NaturalLanguageQueryUnderstandingSpec.Builder, + com.google.cloud.discoveryengine.v1beta.SearchRequest + .NaturalLanguageQueryUnderstandingSpecOrBuilder> + internalGetNaturalLanguageQueryUnderstandingSpecFieldBuilder() { + if (naturalLanguageQueryUnderstandingSpecBuilder_ == null) { + naturalLanguageQueryUnderstandingSpecBuilder_ = new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec, - com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.Builder, - com.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpecOrBuilder>( - getContentSearchSpec(), getParentForChildren(), isClean()); - contentSearchSpec_ = null; + com.google.cloud.discoveryengine.v1beta.SearchRequest + .NaturalLanguageQueryUnderstandingSpec, + com.google.cloud.discoveryengine.v1beta.SearchRequest + .NaturalLanguageQueryUnderstandingSpec.Builder, + com.google.cloud.discoveryengine.v1beta.SearchRequest + .NaturalLanguageQueryUnderstandingSpecOrBuilder>( + getNaturalLanguageQueryUnderstandingSpec(), getParentForChildren(), isClean()); + naturalLanguageQueryUnderstandingSpec_ = null; } - return contentSearchSpecBuilder_; + return naturalLanguageQueryUnderstandingSpecBuilder_; } - private com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec embeddingSpec_; + private com.google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec + searchAsYouTypeSpec_; private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec, - com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.Builder, - com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpecOrBuilder> - embeddingSpecBuilder_; + com.google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec, + com.google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec.Builder, + com.google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpecOrBuilder> + searchAsYouTypeSpecBuilder_; /** * * *
            -     * Uses the provided embedding to do additional semantic document retrieval.
            -     * The retrieval is based on the dot product of
            -     * [SearchRequest.EmbeddingSpec.EmbeddingVector.vector][google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector.vector]
            -     * and the document embedding that is provided in
            -     * [SearchRequest.EmbeddingSpec.EmbeddingVector.field_path][google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector.field_path].
            -     *
            -     * If
            -     * [SearchRequest.EmbeddingSpec.EmbeddingVector.field_path][google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector.field_path]
            -     * is not provided, it will use
            -     * [ServingConfig.EmbeddingConfig.field_path][google.cloud.discoveryengine.v1beta.ServingConfig.embedding_config].
            +     * Search as you type configuration. Only supported for the
            +     * [IndustryVertical.MEDIA][google.cloud.discoveryengine.v1beta.IndustryVertical.MEDIA]
            +     * vertical.
                  * 
            * - * .google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec embedding_spec = 23; + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec search_as_you_type_spec = 31; * * - * @return Whether the embeddingSpec field is set. + * @return Whether the searchAsYouTypeSpec field is set. */ - public boolean hasEmbeddingSpec() { - return ((bitField0_ & 0x00400000) != 0); + public boolean hasSearchAsYouTypeSpec() { + return ((bitField0_ & 0x40000000) != 0); } /** * * *
            -     * Uses the provided embedding to do additional semantic document retrieval.
            -     * The retrieval is based on the dot product of
            -     * [SearchRequest.EmbeddingSpec.EmbeddingVector.vector][google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector.vector]
            -     * and the document embedding that is provided in
            -     * [SearchRequest.EmbeddingSpec.EmbeddingVector.field_path][google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector.field_path].
            -     *
            -     * If
            -     * [SearchRequest.EmbeddingSpec.EmbeddingVector.field_path][google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector.field_path]
            -     * is not provided, it will use
            -     * [ServingConfig.EmbeddingConfig.field_path][google.cloud.discoveryengine.v1beta.ServingConfig.embedding_config].
            +     * Search as you type configuration. Only supported for the
            +     * [IndustryVertical.MEDIA][google.cloud.discoveryengine.v1beta.IndustryVertical.MEDIA]
            +     * vertical.
                  * 
            * - * .google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec embedding_spec = 23; + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec search_as_you_type_spec = 31; * * - * @return The embeddingSpec. + * @return The searchAsYouTypeSpec. */ - public com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec getEmbeddingSpec() { - if (embeddingSpecBuilder_ == null) { - return embeddingSpec_ == null - ? com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec + public com.google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec + getSearchAsYouTypeSpec() { + if (searchAsYouTypeSpecBuilder_ == null) { + return searchAsYouTypeSpec_ == null + ? com.google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec .getDefaultInstance() - : embeddingSpec_; + : searchAsYouTypeSpec_; } else { - return embeddingSpecBuilder_.getMessage(); + return searchAsYouTypeSpecBuilder_.getMessage(); } } @@ -38731,32 +50873,26 @@ public com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec getEm * * *
            -     * Uses the provided embedding to do additional semantic document retrieval.
            -     * The retrieval is based on the dot product of
            -     * [SearchRequest.EmbeddingSpec.EmbeddingVector.vector][google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector.vector]
            -     * and the document embedding that is provided in
            -     * [SearchRequest.EmbeddingSpec.EmbeddingVector.field_path][google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector.field_path].
            -     *
            -     * If
            -     * [SearchRequest.EmbeddingSpec.EmbeddingVector.field_path][google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector.field_path]
            -     * is not provided, it will use
            -     * [ServingConfig.EmbeddingConfig.field_path][google.cloud.discoveryengine.v1beta.ServingConfig.embedding_config].
            +     * Search as you type configuration. Only supported for the
            +     * [IndustryVertical.MEDIA][google.cloud.discoveryengine.v1beta.IndustryVertical.MEDIA]
            +     * vertical.
                  * 
            * - * .google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec embedding_spec = 23; + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec search_as_you_type_spec = 31; * */ - public Builder setEmbeddingSpec( - com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec value) { - if (embeddingSpecBuilder_ == null) { + public Builder setSearchAsYouTypeSpec( + com.google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec value) { + if (searchAsYouTypeSpecBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - embeddingSpec_ = value; + searchAsYouTypeSpec_ = value; } else { - embeddingSpecBuilder_.setMessage(value); + searchAsYouTypeSpecBuilder_.setMessage(value); } - bitField0_ |= 0x00400000; + bitField0_ |= 0x40000000; onChanged(); return this; } @@ -38765,30 +50901,24 @@ public Builder setEmbeddingSpec( * * *
            -     * Uses the provided embedding to do additional semantic document retrieval.
            -     * The retrieval is based on the dot product of
            -     * [SearchRequest.EmbeddingSpec.EmbeddingVector.vector][google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector.vector]
            -     * and the document embedding that is provided in
            -     * [SearchRequest.EmbeddingSpec.EmbeddingVector.field_path][google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector.field_path].
            -     *
            -     * If
            -     * [SearchRequest.EmbeddingSpec.EmbeddingVector.field_path][google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector.field_path]
            -     * is not provided, it will use
            -     * [ServingConfig.EmbeddingConfig.field_path][google.cloud.discoveryengine.v1beta.ServingConfig.embedding_config].
            +     * Search as you type configuration. Only supported for the
            +     * [IndustryVertical.MEDIA][google.cloud.discoveryengine.v1beta.IndustryVertical.MEDIA]
            +     * vertical.
                  * 
            * - * .google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec embedding_spec = 23; + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec search_as_you_type_spec = 31; * */ - public Builder setEmbeddingSpec( - com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.Builder + public Builder setSearchAsYouTypeSpec( + com.google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec.Builder builderForValue) { - if (embeddingSpecBuilder_ == null) { - embeddingSpec_ = builderForValue.build(); + if (searchAsYouTypeSpecBuilder_ == null) { + searchAsYouTypeSpec_ = builderForValue.build(); } else { - embeddingSpecBuilder_.setMessage(builderForValue.build()); + searchAsYouTypeSpecBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00400000; + bitField0_ |= 0x40000000; onChanged(); return this; } @@ -38797,38 +50927,32 @@ public Builder setEmbeddingSpec( * * *
            -     * Uses the provided embedding to do additional semantic document retrieval.
            -     * The retrieval is based on the dot product of
            -     * [SearchRequest.EmbeddingSpec.EmbeddingVector.vector][google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector.vector]
            -     * and the document embedding that is provided in
            -     * [SearchRequest.EmbeddingSpec.EmbeddingVector.field_path][google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector.field_path].
            -     *
            -     * If
            -     * [SearchRequest.EmbeddingSpec.EmbeddingVector.field_path][google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector.field_path]
            -     * is not provided, it will use
            -     * [ServingConfig.EmbeddingConfig.field_path][google.cloud.discoveryengine.v1beta.ServingConfig.embedding_config].
            +     * Search as you type configuration. Only supported for the
            +     * [IndustryVertical.MEDIA][google.cloud.discoveryengine.v1beta.IndustryVertical.MEDIA]
            +     * vertical.
                  * 
            * - * .google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec embedding_spec = 23; + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec search_as_you_type_spec = 31; * */ - public Builder mergeEmbeddingSpec( - com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec value) { - if (embeddingSpecBuilder_ == null) { - if (((bitField0_ & 0x00400000) != 0) - && embeddingSpec_ != null - && embeddingSpec_ - != com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec + public Builder mergeSearchAsYouTypeSpec( + com.google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec value) { + if (searchAsYouTypeSpecBuilder_ == null) { + if (((bitField0_ & 0x40000000) != 0) + && searchAsYouTypeSpec_ != null + && searchAsYouTypeSpec_ + != com.google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec .getDefaultInstance()) { - getEmbeddingSpecBuilder().mergeFrom(value); + getSearchAsYouTypeSpecBuilder().mergeFrom(value); } else { - embeddingSpec_ = value; + searchAsYouTypeSpec_ = value; } } else { - embeddingSpecBuilder_.mergeFrom(value); + searchAsYouTypeSpecBuilder_.mergeFrom(value); } - if (embeddingSpec_ != null) { - bitField0_ |= 0x00400000; + if (searchAsYouTypeSpec_ != null) { + bitField0_ |= 0x40000000; onChanged(); } return this; @@ -38838,27 +50962,21 @@ public Builder mergeEmbeddingSpec( * * *
            -     * Uses the provided embedding to do additional semantic document retrieval.
            -     * The retrieval is based on the dot product of
            -     * [SearchRequest.EmbeddingSpec.EmbeddingVector.vector][google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector.vector]
            -     * and the document embedding that is provided in
            -     * [SearchRequest.EmbeddingSpec.EmbeddingVector.field_path][google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector.field_path].
            -     *
            -     * If
            -     * [SearchRequest.EmbeddingSpec.EmbeddingVector.field_path][google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector.field_path]
            -     * is not provided, it will use
            -     * [ServingConfig.EmbeddingConfig.field_path][google.cloud.discoveryengine.v1beta.ServingConfig.embedding_config].
            +     * Search as you type configuration. Only supported for the
            +     * [IndustryVertical.MEDIA][google.cloud.discoveryengine.v1beta.IndustryVertical.MEDIA]
            +     * vertical.
                  * 
            * - * .google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec embedding_spec = 23; + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec search_as_you_type_spec = 31; * */ - public Builder clearEmbeddingSpec() { - bitField0_ = (bitField0_ & ~0x00400000); - embeddingSpec_ = null; - if (embeddingSpecBuilder_ != null) { - embeddingSpecBuilder_.dispose(); - embeddingSpecBuilder_ = null; + public Builder clearSearchAsYouTypeSpec() { + bitField0_ = (bitField0_ & ~0x40000000); + searchAsYouTypeSpec_ = null; + if (searchAsYouTypeSpecBuilder_ != null) { + searchAsYouTypeSpecBuilder_.dispose(); + searchAsYouTypeSpecBuilder_ = null; } onChanged(); return this; @@ -38868,56 +50986,44 @@ public Builder clearEmbeddingSpec() { * * *
            -     * Uses the provided embedding to do additional semantic document retrieval.
            -     * The retrieval is based on the dot product of
            -     * [SearchRequest.EmbeddingSpec.EmbeddingVector.vector][google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector.vector]
            -     * and the document embedding that is provided in
            -     * [SearchRequest.EmbeddingSpec.EmbeddingVector.field_path][google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector.field_path].
            -     *
            -     * If
            -     * [SearchRequest.EmbeddingSpec.EmbeddingVector.field_path][google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector.field_path]
            -     * is not provided, it will use
            -     * [ServingConfig.EmbeddingConfig.field_path][google.cloud.discoveryengine.v1beta.ServingConfig.embedding_config].
            +     * Search as you type configuration. Only supported for the
            +     * [IndustryVertical.MEDIA][google.cloud.discoveryengine.v1beta.IndustryVertical.MEDIA]
            +     * vertical.
                  * 
            * - * .google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec embedding_spec = 23; + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec search_as_you_type_spec = 31; * */ - public com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.Builder - getEmbeddingSpecBuilder() { - bitField0_ |= 0x00400000; + public com.google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec.Builder + getSearchAsYouTypeSpecBuilder() { + bitField0_ |= 0x40000000; onChanged(); - return internalGetEmbeddingSpecFieldBuilder().getBuilder(); + return internalGetSearchAsYouTypeSpecFieldBuilder().getBuilder(); } /** * * *
            -     * Uses the provided embedding to do additional semantic document retrieval.
            -     * The retrieval is based on the dot product of
            -     * [SearchRequest.EmbeddingSpec.EmbeddingVector.vector][google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector.vector]
            -     * and the document embedding that is provided in
            -     * [SearchRequest.EmbeddingSpec.EmbeddingVector.field_path][google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector.field_path].
            -     *
            -     * If
            -     * [SearchRequest.EmbeddingSpec.EmbeddingVector.field_path][google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector.field_path]
            -     * is not provided, it will use
            -     * [ServingConfig.EmbeddingConfig.field_path][google.cloud.discoveryengine.v1beta.ServingConfig.embedding_config].
            +     * Search as you type configuration. Only supported for the
            +     * [IndustryVertical.MEDIA][google.cloud.discoveryengine.v1beta.IndustryVertical.MEDIA]
            +     * vertical.
                  * 
            * - * .google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec embedding_spec = 23; + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec search_as_you_type_spec = 31; * */ - public com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpecOrBuilder - getEmbeddingSpecOrBuilder() { - if (embeddingSpecBuilder_ != null) { - return embeddingSpecBuilder_.getMessageOrBuilder(); + public com.google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpecOrBuilder + getSearchAsYouTypeSpecOrBuilder() { + if (searchAsYouTypeSpecBuilder_ != null) { + return searchAsYouTypeSpecBuilder_.getMessageOrBuilder(); } else { - return embeddingSpec_ == null - ? com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec + return searchAsYouTypeSpec_ == null + ? com.google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec .getDefaultInstance() - : embeddingSpec_; + : searchAsYouTypeSpec_; } } @@ -38925,149 +51031,78 @@ public Builder clearEmbeddingSpec() { * * *
            -     * Uses the provided embedding to do additional semantic document retrieval.
            -     * The retrieval is based on the dot product of
            -     * [SearchRequest.EmbeddingSpec.EmbeddingVector.vector][google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector.vector]
            -     * and the document embedding that is provided in
            -     * [SearchRequest.EmbeddingSpec.EmbeddingVector.field_path][google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector.field_path].
            -     *
            -     * If
            -     * [SearchRequest.EmbeddingSpec.EmbeddingVector.field_path][google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector.field_path]
            -     * is not provided, it will use
            -     * [ServingConfig.EmbeddingConfig.field_path][google.cloud.discoveryengine.v1beta.ServingConfig.embedding_config].
            +     * Search as you type configuration. Only supported for the
            +     * [IndustryVertical.MEDIA][google.cloud.discoveryengine.v1beta.IndustryVertical.MEDIA]
            +     * vertical.
                  * 
            * - * .google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec embedding_spec = 23; + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec search_as_you_type_spec = 31; * */ private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec, - com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.Builder, - com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpecOrBuilder> - internalGetEmbeddingSpecFieldBuilder() { - if (embeddingSpecBuilder_ == null) { - embeddingSpecBuilder_ = + com.google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec, + com.google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec.Builder, + com.google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpecOrBuilder> + internalGetSearchAsYouTypeSpecFieldBuilder() { + if (searchAsYouTypeSpecBuilder_ == null) { + searchAsYouTypeSpecBuilder_ = new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec, - com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.Builder, - com.google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpecOrBuilder>( - getEmbeddingSpec(), getParentForChildren(), isClean()); - embeddingSpec_ = null; + com.google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec, + com.google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec.Builder, + com.google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpecOrBuilder>( + getSearchAsYouTypeSpec(), getParentForChildren(), isClean()); + searchAsYouTypeSpec_ = null; } - return embeddingSpecBuilder_; + return searchAsYouTypeSpecBuilder_; } - private java.lang.Object rankingExpression_ = ""; + private com.google.cloud.discoveryengine.v1beta.SearchRequest.DisplaySpec displaySpec_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.SearchRequest.DisplaySpec, + com.google.cloud.discoveryengine.v1beta.SearchRequest.DisplaySpec.Builder, + com.google.cloud.discoveryengine.v1beta.SearchRequest.DisplaySpecOrBuilder> + displaySpecBuilder_; /** * * *
            -     * The ranking expression controls the customized ranking on retrieval
            -     * documents. This overrides
            -     * [ServingConfig.ranking_expression][google.cloud.discoveryengine.v1beta.ServingConfig.ranking_expression].
            -     * The syntax and supported features depend on the
            -     * `ranking_expression_backend` value. If `ranking_expression_backend` is not
            -     * provided, it defaults to `RANK_BY_EMBEDDING`.
            -     *
            -     * If
            -     * [ranking_expression_backend][google.cloud.discoveryengine.v1beta.SearchRequest.ranking_expression_backend]
            -     * is not provided or set to `RANK_BY_EMBEDDING`, it should be a single
            -     * function or multiple functions that are joined by "+".
            -     *
            -     * * ranking_expression = function, { " + ", function };
            -     *
            -     * Supported functions:
            -     *
            -     * * double * relevance_score
            -     * * double * dotProduct(embedding_field_path)
            -     *
            -     * Function variables:
            -     *
            -     * * `relevance_score`: pre-defined keywords, used for measure relevance
            -     * between query and document.
            -     * * `embedding_field_path`: the document embedding field
            -     * used with query embedding vector.
            -     * * `dotProduct`: embedding function between `embedding_field_path` and
            -     * query embedding vector.
            -     *
            -     * Example ranking expression:
            -     *
            -     * If document has an embedding field doc_embedding, the ranking expression
            -     * could be `0.5 * relevance_score + 0.3 * dotProduct(doc_embedding)`.
            -     *
            -     * If
            -     * [ranking_expression_backend][google.cloud.discoveryengine.v1beta.SearchRequest.ranking_expression_backend]
            -     * is set to `RANK_BY_FORMULA`, the following expression types (and
            -     * combinations of those chained using + or
            -     * * operators) are supported:
            -     *
            -     * * `double`
            -     * * `signal`
            -     * * `log(signal)`
            -     * * `exp(signal)`
            -     * * `rr(signal, double > 0)`  -- reciprocal rank transformation with second
            -     * argument being a denominator constant.
            -     * * `is_nan(signal)` -- returns 0 if signal is NaN, 1 otherwise.
            -     * * `fill_nan(signal1, signal2 | double)` -- if signal1 is NaN, returns
            -     * signal2 | double, else returns signal1.
            +     * Optional. Config for display feature, like match highlighting on search
            +     * results.
            +     * 
            * - * Here are a few examples of ranking formulas that use the supported - * ranking expression types: + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.DisplaySpec display_spec = 38 [(.google.api.field_behavior) = OPTIONAL]; + * * - * - `0.2 * semantic_similarity_score + 0.8 * log(keyword_similarity_score)` - * -- mostly rank by the logarithm of `keyword_similarity_score` with slight - * `semantic_smilarity_score` adjustment. - * - `0.2 * exp(fill_nan(semantic_similarity_score, 0)) + 0.3 * - * is_nan(keyword_similarity_score)` -- rank by the exponent of - * `semantic_similarity_score` filling the value with 0 if it's NaN, also - * add constant 0.3 adjustment to the final score if - * `semantic_similarity_score` is NaN. - * - `0.2 * rr(semantic_similarity_score, 16) + 0.8 * - * rr(keyword_similarity_score, 16)` -- mostly rank by the reciprocal rank - * of `keyword_similarity_score` with slight adjustment of reciprocal rank - * of `semantic_smilarity_score`. + * @return Whether the displaySpec field is set. + */ + public boolean hasDisplaySpec() { + return ((bitField0_ & 0x80000000) != 0); + } + + /** * - * The following signals are supported: * - * * `semantic_similarity_score`: semantic similarity adjustment that is - * calculated using the embeddings generated by a proprietary Google model. - * This score determines how semantically similar a search query is to a - * document. - * * `keyword_similarity_score`: keyword match adjustment uses the Best - * Match 25 (BM25) ranking function. This score is calculated using a - * probabilistic model to estimate the probability that a document is - * relevant to a given query. - * * `relevance_score`: semantic relevance adjustment that uses a - * proprietary Google model to determine the meaning and intent behind a - * user's query in context with the content in the documents. - * * `pctr_rank`: predicted conversion rate adjustment as a rank use - * predicted Click-through rate (pCTR) to gauge the relevance and - * attractiveness of a search result from a user's perspective. A higher - * pCTR suggests that the result is more likely to satisfy the user's query - * and intent, making it a valuable signal for ranking. - * * `freshness_rank`: freshness adjustment as a rank - * * `document_age`: The time in hours elapsed since the document was last - * updated, a floating-point number (e.g., 0.25 means 15 minutes). - * * `topicality_rank`: topicality adjustment as a rank. Uses proprietary - * Google model to determine the keyword-based overlap between the query and - * the document. - * * `base_rank`: the default rank of the result + *
            +     * Optional. Config for display feature, like match highlighting on search
            +     * results.
                  * 
            * - * string ranking_expression = 26; + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.DisplaySpec display_spec = 38 [(.google.api.field_behavior) = OPTIONAL]; + * * - * @return The rankingExpression. + * @return The displaySpec. */ - public java.lang.String getRankingExpression() { - java.lang.Object ref = rankingExpression_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - rankingExpression_ = s; - return s; + public com.google.cloud.discoveryengine.v1beta.SearchRequest.DisplaySpec getDisplaySpec() { + if (displaySpecBuilder_ == null) { + return displaySpec_ == null + ? com.google.cloud.discoveryengine.v1beta.SearchRequest.DisplaySpec.getDefaultInstance() + : displaySpec_; } else { - return (java.lang.String) ref; + return displaySpecBuilder_.getMessage(); } } @@ -39075,329 +51110,380 @@ public java.lang.String getRankingExpression() { * * *
            -     * The ranking expression controls the customized ranking on retrieval
            -     * documents. This overrides
            -     * [ServingConfig.ranking_expression][google.cloud.discoveryengine.v1beta.ServingConfig.ranking_expression].
            -     * The syntax and supported features depend on the
            -     * `ranking_expression_backend` value. If `ranking_expression_backend` is not
            -     * provided, it defaults to `RANK_BY_EMBEDDING`.
            -     *
            -     * If
            -     * [ranking_expression_backend][google.cloud.discoveryengine.v1beta.SearchRequest.ranking_expression_backend]
            -     * is not provided or set to `RANK_BY_EMBEDDING`, it should be a single
            -     * function or multiple functions that are joined by "+".
            -     *
            -     * * ranking_expression = function, { " + ", function };
            -     *
            -     * Supported functions:
            -     *
            -     * * double * relevance_score
            -     * * double * dotProduct(embedding_field_path)
            -     *
            -     * Function variables:
            -     *
            -     * * `relevance_score`: pre-defined keywords, used for measure relevance
            -     * between query and document.
            -     * * `embedding_field_path`: the document embedding field
            -     * used with query embedding vector.
            -     * * `dotProduct`: embedding function between `embedding_field_path` and
            -     * query embedding vector.
            -     *
            -     * Example ranking expression:
            -     *
            -     * If document has an embedding field doc_embedding, the ranking expression
            -     * could be `0.5 * relevance_score + 0.3 * dotProduct(doc_embedding)`.
            -     *
            -     * If
            -     * [ranking_expression_backend][google.cloud.discoveryengine.v1beta.SearchRequest.ranking_expression_backend]
            -     * is set to `RANK_BY_FORMULA`, the following expression types (and
            -     * combinations of those chained using + or
            -     * * operators) are supported:
            -     *
            -     * * `double`
            -     * * `signal`
            -     * * `log(signal)`
            -     * * `exp(signal)`
            -     * * `rr(signal, double > 0)`  -- reciprocal rank transformation with second
            -     * argument being a denominator constant.
            -     * * `is_nan(signal)` -- returns 0 if signal is NaN, 1 otherwise.
            -     * * `fill_nan(signal1, signal2 | double)` -- if signal1 is NaN, returns
            -     * signal2 | double, else returns signal1.
            -     *
            -     * Here are a few examples of ranking formulas that use the supported
            -     * ranking expression types:
            -     *
            -     * - `0.2 * semantic_similarity_score + 0.8 * log(keyword_similarity_score)`
            -     * -- mostly rank by the logarithm of `keyword_similarity_score` with slight
            -     * `semantic_smilarity_score` adjustment.
            -     * - `0.2 * exp(fill_nan(semantic_similarity_score, 0)) + 0.3 *
            -     * is_nan(keyword_similarity_score)` -- rank by the exponent of
            -     * `semantic_similarity_score` filling the value with 0 if it's NaN, also
            -     * add constant 0.3 adjustment to the final score if
            -     * `semantic_similarity_score` is NaN.
            -     * - `0.2 * rr(semantic_similarity_score, 16) + 0.8 *
            -     * rr(keyword_similarity_score, 16)` -- mostly rank by the reciprocal rank
            -     * of `keyword_similarity_score` with slight adjustment of reciprocal rank
            -     * of `semantic_smilarity_score`.
            -     *
            -     * The following signals are supported:
            -     *
            -     * * `semantic_similarity_score`: semantic similarity adjustment that is
            -     * calculated using the embeddings generated by a proprietary Google model.
            -     * This score determines how semantically similar a search query is to a
            -     * document.
            -     * * `keyword_similarity_score`: keyword match adjustment uses the Best
            -     * Match 25 (BM25) ranking function. This score is calculated using a
            -     * probabilistic model to estimate the probability that a document is
            -     * relevant to a given query.
            -     * * `relevance_score`: semantic relevance adjustment that uses a
            -     * proprietary Google model to determine the meaning and intent behind a
            -     * user's query in context with the content in the documents.
            -     * * `pctr_rank`: predicted conversion rate adjustment as a rank use
            -     * predicted Click-through rate (pCTR) to gauge the relevance and
            -     * attractiveness of a search result from a user's perspective. A higher
            -     * pCTR suggests that the result is more likely to satisfy the user's query
            -     * and intent, making it a valuable signal for ranking.
            -     * * `freshness_rank`: freshness adjustment as a rank
            -     * * `document_age`: The time in hours elapsed since the document was last
            -     * updated, a floating-point number (e.g., 0.25 means 15 minutes).
            -     * * `topicality_rank`: topicality adjustment as a rank. Uses proprietary
            -     * Google model to determine the keyword-based overlap between the query and
            -     * the document.
            -     * * `base_rank`: the default rank of the result
            +     * Optional. Config for display feature, like match highlighting on search
            +     * results.
                  * 
            * - * string ranking_expression = 26; - * - * @return The bytes for rankingExpression. + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.DisplaySpec display_spec = 38 [(.google.api.field_behavior) = OPTIONAL]; + * */ - public com.google.protobuf.ByteString getRankingExpressionBytes() { - java.lang.Object ref = rankingExpression_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - rankingExpression_ = b; - return b; + public Builder setDisplaySpec( + com.google.cloud.discoveryengine.v1beta.SearchRequest.DisplaySpec value) { + if (displaySpecBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + displaySpec_ = value; } else { - return (com.google.protobuf.ByteString) ref; + displaySpecBuilder_.setMessage(value); } + bitField0_ |= 0x80000000; + onChanged(); + return this; } /** * * *
            -     * The ranking expression controls the customized ranking on retrieval
            -     * documents. This overrides
            -     * [ServingConfig.ranking_expression][google.cloud.discoveryengine.v1beta.ServingConfig.ranking_expression].
            -     * The syntax and supported features depend on the
            -     * `ranking_expression_backend` value. If `ranking_expression_backend` is not
            -     * provided, it defaults to `RANK_BY_EMBEDDING`.
            -     *
            -     * If
            -     * [ranking_expression_backend][google.cloud.discoveryengine.v1beta.SearchRequest.ranking_expression_backend]
            -     * is not provided or set to `RANK_BY_EMBEDDING`, it should be a single
            -     * function or multiple functions that are joined by "+".
            -     *
            -     * * ranking_expression = function, { " + ", function };
            +     * Optional. Config for display feature, like match highlighting on search
            +     * results.
            +     * 
            * - * Supported functions: + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.DisplaySpec display_spec = 38 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setDisplaySpec( + com.google.cloud.discoveryengine.v1beta.SearchRequest.DisplaySpec.Builder builderForValue) { + if (displaySpecBuilder_ == null) { + displaySpec_ = builderForValue.build(); + } else { + displaySpecBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x80000000; + onChanged(); + return this; + } + + /** * - * * double * relevance_score - * * double * dotProduct(embedding_field_path) * - * Function variables: + *
            +     * Optional. Config for display feature, like match highlighting on search
            +     * results.
            +     * 
            * - * * `relevance_score`: pre-defined keywords, used for measure relevance - * between query and document. - * * `embedding_field_path`: the document embedding field - * used with query embedding vector. - * * `dotProduct`: embedding function between `embedding_field_path` and - * query embedding vector. + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.DisplaySpec display_spec = 38 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeDisplaySpec( + com.google.cloud.discoveryengine.v1beta.SearchRequest.DisplaySpec value) { + if (displaySpecBuilder_ == null) { + if (((bitField0_ & 0x80000000) != 0) + && displaySpec_ != null + && displaySpec_ + != com.google.cloud.discoveryengine.v1beta.SearchRequest.DisplaySpec + .getDefaultInstance()) { + getDisplaySpecBuilder().mergeFrom(value); + } else { + displaySpec_ = value; + } + } else { + displaySpecBuilder_.mergeFrom(value); + } + if (displaySpec_ != null) { + bitField0_ |= 0x80000000; + onChanged(); + } + return this; + } + + /** * - * Example ranking expression: * - * If document has an embedding field doc_embedding, the ranking expression - * could be `0.5 * relevance_score + 0.3 * dotProduct(doc_embedding)`. + *
            +     * Optional. Config for display feature, like match highlighting on search
            +     * results.
            +     * 
            * - * If - * [ranking_expression_backend][google.cloud.discoveryengine.v1beta.SearchRequest.ranking_expression_backend] - * is set to `RANK_BY_FORMULA`, the following expression types (and - * combinations of those chained using + or - * * operators) are supported: + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.DisplaySpec display_spec = 38 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearDisplaySpec() { + bitField0_ = (bitField0_ & ~0x80000000); + displaySpec_ = null; + if (displaySpecBuilder_ != null) { + displaySpecBuilder_.dispose(); + displaySpecBuilder_ = null; + } + onChanged(); + return this; + } + + /** * - * * `double` - * * `signal` - * * `log(signal)` - * * `exp(signal)` - * * `rr(signal, double > 0)` -- reciprocal rank transformation with second - * argument being a denominator constant. - * * `is_nan(signal)` -- returns 0 if signal is NaN, 1 otherwise. - * * `fill_nan(signal1, signal2 | double)` -- if signal1 is NaN, returns - * signal2 | double, else returns signal1. * - * Here are a few examples of ranking formulas that use the supported - * ranking expression types: + *
            +     * Optional. Config for display feature, like match highlighting on search
            +     * results.
            +     * 
            * - * - `0.2 * semantic_similarity_score + 0.8 * log(keyword_similarity_score)` - * -- mostly rank by the logarithm of `keyword_similarity_score` with slight - * `semantic_smilarity_score` adjustment. - * - `0.2 * exp(fill_nan(semantic_similarity_score, 0)) + 0.3 * - * is_nan(keyword_similarity_score)` -- rank by the exponent of - * `semantic_similarity_score` filling the value with 0 if it's NaN, also - * add constant 0.3 adjustment to the final score if - * `semantic_similarity_score` is NaN. - * - `0.2 * rr(semantic_similarity_score, 16) + 0.8 * - * rr(keyword_similarity_score, 16)` -- mostly rank by the reciprocal rank - * of `keyword_similarity_score` with slight adjustment of reciprocal rank - * of `semantic_smilarity_score`. + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.DisplaySpec display_spec = 38 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.discoveryengine.v1beta.SearchRequest.DisplaySpec.Builder + getDisplaySpecBuilder() { + bitField0_ |= 0x80000000; + onChanged(); + return internalGetDisplaySpecFieldBuilder().getBuilder(); + } + + /** * - * The following signals are supported: * - * * `semantic_similarity_score`: semantic similarity adjustment that is - * calculated using the embeddings generated by a proprietary Google model. - * This score determines how semantically similar a search query is to a - * document. - * * `keyword_similarity_score`: keyword match adjustment uses the Best - * Match 25 (BM25) ranking function. This score is calculated using a - * probabilistic model to estimate the probability that a document is - * relevant to a given query. - * * `relevance_score`: semantic relevance adjustment that uses a - * proprietary Google model to determine the meaning and intent behind a - * user's query in context with the content in the documents. - * * `pctr_rank`: predicted conversion rate adjustment as a rank use - * predicted Click-through rate (pCTR) to gauge the relevance and - * attractiveness of a search result from a user's perspective. A higher - * pCTR suggests that the result is more likely to satisfy the user's query - * and intent, making it a valuable signal for ranking. - * * `freshness_rank`: freshness adjustment as a rank - * * `document_age`: The time in hours elapsed since the document was last - * updated, a floating-point number (e.g., 0.25 means 15 minutes). - * * `topicality_rank`: topicality adjustment as a rank. Uses proprietary - * Google model to determine the keyword-based overlap between the query and - * the document. - * * `base_rank`: the default rank of the result + *
            +     * Optional. Config for display feature, like match highlighting on search
            +     * results.
                  * 
            * - * string ranking_expression = 26; + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.DisplaySpec display_spec = 38 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.discoveryengine.v1beta.SearchRequest.DisplaySpecOrBuilder + getDisplaySpecOrBuilder() { + if (displaySpecBuilder_ != null) { + return displaySpecBuilder_.getMessageOrBuilder(); + } else { + return displaySpec_ == null + ? com.google.cloud.discoveryengine.v1beta.SearchRequest.DisplaySpec.getDefaultInstance() + : displaySpec_; + } + } + + /** + * * - * @param value The rankingExpression to set. - * @return This builder for chaining. + *
            +     * Optional. Config for display feature, like match highlighting on search
            +     * results.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.DisplaySpec display_spec = 38 [(.google.api.field_behavior) = OPTIONAL]; + * */ - public Builder setRankingExpression(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.SearchRequest.DisplaySpec, + com.google.cloud.discoveryengine.v1beta.SearchRequest.DisplaySpec.Builder, + com.google.cloud.discoveryengine.v1beta.SearchRequest.DisplaySpecOrBuilder> + internalGetDisplaySpecFieldBuilder() { + if (displaySpecBuilder_ == null) { + displaySpecBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.SearchRequest.DisplaySpec, + com.google.cloud.discoveryengine.v1beta.SearchRequest.DisplaySpec.Builder, + com.google.cloud.discoveryengine.v1beta.SearchRequest.DisplaySpecOrBuilder>( + getDisplaySpec(), getParentForChildren(), isClean()); + displaySpec_ = null; + } + return displaySpecBuilder_; + } + + private java.util.List + crowdingSpecs_ = java.util.Collections.emptyList(); + + private void ensureCrowdingSpecsIsMutable() { + if (!((bitField1_ & 0x00000001) != 0)) { + crowdingSpecs_ = + new java.util.ArrayList< + com.google.cloud.discoveryengine.v1beta.SearchRequest.CrowdingSpec>(crowdingSpecs_); + bitField1_ |= 0x00000001; } - rankingExpression_ = value; - bitField0_ |= 0x00800000; - onChanged(); - return this; } + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.discoveryengine.v1beta.SearchRequest.CrowdingSpec, + com.google.cloud.discoveryengine.v1beta.SearchRequest.CrowdingSpec.Builder, + com.google.cloud.discoveryengine.v1beta.SearchRequest.CrowdingSpecOrBuilder> + crowdingSpecsBuilder_; + /** * * *
            -     * The ranking expression controls the customized ranking on retrieval
            -     * documents. This overrides
            -     * [ServingConfig.ranking_expression][google.cloud.discoveryengine.v1beta.ServingConfig.ranking_expression].
            -     * The syntax and supported features depend on the
            -     * `ranking_expression_backend` value. If `ranking_expression_backend` is not
            -     * provided, it defaults to `RANK_BY_EMBEDDING`.
            +     * Optional. Crowding specifications for improving result diversity.
            +     * If multiple CrowdingSpecs are specified, crowding will be evaluated on
            +     * each unique combination of the `field` values, and max_count will be the
            +     * maximum value of `max_count` across all CrowdingSpecs.
            +     * For example, if the first CrowdingSpec has `field` = "color" and
            +     * `max_count` = 3, and the second CrowdingSpec has `field` = "size" and
            +     * `max_count` = 2, then after 3 documents that share the same color AND size
            +     * have been returned, subsequent ones should be
            +     * removed or demoted.
            +     * 
            * - * If - * [ranking_expression_backend][google.cloud.discoveryengine.v1beta.SearchRequest.ranking_expression_backend] - * is not provided or set to `RANK_BY_EMBEDDING`, it should be a single - * function or multiple functions that are joined by "+". + * + * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.CrowdingSpec crowding_specs = 40 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getCrowdingSpecsList() { + if (crowdingSpecsBuilder_ == null) { + return java.util.Collections.unmodifiableList(crowdingSpecs_); + } else { + return crowdingSpecsBuilder_.getMessageList(); + } + } + + /** * - * * ranking_expression = function, { " + ", function }; * - * Supported functions: + *
            +     * Optional. Crowding specifications for improving result diversity.
            +     * If multiple CrowdingSpecs are specified, crowding will be evaluated on
            +     * each unique combination of the `field` values, and max_count will be the
            +     * maximum value of `max_count` across all CrowdingSpecs.
            +     * For example, if the first CrowdingSpec has `field` = "color" and
            +     * `max_count` = 3, and the second CrowdingSpec has `field` = "size" and
            +     * `max_count` = 2, then after 3 documents that share the same color AND size
            +     * have been returned, subsequent ones should be
            +     * removed or demoted.
            +     * 
            * - * * double * relevance_score - * * double * dotProduct(embedding_field_path) + * + * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.CrowdingSpec crowding_specs = 40 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public int getCrowdingSpecsCount() { + if (crowdingSpecsBuilder_ == null) { + return crowdingSpecs_.size(); + } else { + return crowdingSpecsBuilder_.getCount(); + } + } + + /** * - * Function variables: * - * * `relevance_score`: pre-defined keywords, used for measure relevance - * between query and document. - * * `embedding_field_path`: the document embedding field - * used with query embedding vector. - * * `dotProduct`: embedding function between `embedding_field_path` and - * query embedding vector. + *
            +     * Optional. Crowding specifications for improving result diversity.
            +     * If multiple CrowdingSpecs are specified, crowding will be evaluated on
            +     * each unique combination of the `field` values, and max_count will be the
            +     * maximum value of `max_count` across all CrowdingSpecs.
            +     * For example, if the first CrowdingSpec has `field` = "color" and
            +     * `max_count` = 3, and the second CrowdingSpec has `field` = "size" and
            +     * `max_count` = 2, then after 3 documents that share the same color AND size
            +     * have been returned, subsequent ones should be
            +     * removed or demoted.
            +     * 
            * - * Example ranking expression: + * + * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.CrowdingSpec crowding_specs = 40 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.discoveryengine.v1beta.SearchRequest.CrowdingSpec getCrowdingSpecs( + int index) { + if (crowdingSpecsBuilder_ == null) { + return crowdingSpecs_.get(index); + } else { + return crowdingSpecsBuilder_.getMessage(index); + } + } + + /** * - * If document has an embedding field doc_embedding, the ranking expression - * could be `0.5 * relevance_score + 0.3 * dotProduct(doc_embedding)`. * - * If - * [ranking_expression_backend][google.cloud.discoveryengine.v1beta.SearchRequest.ranking_expression_backend] - * is set to `RANK_BY_FORMULA`, the following expression types (and - * combinations of those chained using + or - * * operators) are supported: + *
            +     * Optional. Crowding specifications for improving result diversity.
            +     * If multiple CrowdingSpecs are specified, crowding will be evaluated on
            +     * each unique combination of the `field` values, and max_count will be the
            +     * maximum value of `max_count` across all CrowdingSpecs.
            +     * For example, if the first CrowdingSpec has `field` = "color" and
            +     * `max_count` = 3, and the second CrowdingSpec has `field` = "size" and
            +     * `max_count` = 2, then after 3 documents that share the same color AND size
            +     * have been returned, subsequent ones should be
            +     * removed or demoted.
            +     * 
            * - * * `double` - * * `signal` - * * `log(signal)` - * * `exp(signal)` - * * `rr(signal, double > 0)` -- reciprocal rank transformation with second - * argument being a denominator constant. - * * `is_nan(signal)` -- returns 0 if signal is NaN, 1 otherwise. - * * `fill_nan(signal1, signal2 | double)` -- if signal1 is NaN, returns - * signal2 | double, else returns signal1. + * + * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.CrowdingSpec crowding_specs = 40 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setCrowdingSpecs( + int index, com.google.cloud.discoveryengine.v1beta.SearchRequest.CrowdingSpec value) { + if (crowdingSpecsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCrowdingSpecsIsMutable(); + crowdingSpecs_.set(index, value); + onChanged(); + } else { + crowdingSpecsBuilder_.setMessage(index, value); + } + return this; + } + + /** * - * Here are a few examples of ranking formulas that use the supported - * ranking expression types: * - * - `0.2 * semantic_similarity_score + 0.8 * log(keyword_similarity_score)` - * -- mostly rank by the logarithm of `keyword_similarity_score` with slight - * `semantic_smilarity_score` adjustment. - * - `0.2 * exp(fill_nan(semantic_similarity_score, 0)) + 0.3 * - * is_nan(keyword_similarity_score)` -- rank by the exponent of - * `semantic_similarity_score` filling the value with 0 if it's NaN, also - * add constant 0.3 adjustment to the final score if - * `semantic_similarity_score` is NaN. - * - `0.2 * rr(semantic_similarity_score, 16) + 0.8 * - * rr(keyword_similarity_score, 16)` -- mostly rank by the reciprocal rank - * of `keyword_similarity_score` with slight adjustment of reciprocal rank - * of `semantic_smilarity_score`. + *
            +     * Optional. Crowding specifications for improving result diversity.
            +     * If multiple CrowdingSpecs are specified, crowding will be evaluated on
            +     * each unique combination of the `field` values, and max_count will be the
            +     * maximum value of `max_count` across all CrowdingSpecs.
            +     * For example, if the first CrowdingSpec has `field` = "color" and
            +     * `max_count` = 3, and the second CrowdingSpec has `field` = "size" and
            +     * `max_count` = 2, then after 3 documents that share the same color AND size
            +     * have been returned, subsequent ones should be
            +     * removed or demoted.
            +     * 
            * - * The following signals are supported: + * + * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.CrowdingSpec crowding_specs = 40 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setCrowdingSpecs( + int index, + com.google.cloud.discoveryengine.v1beta.SearchRequest.CrowdingSpec.Builder + builderForValue) { + if (crowdingSpecsBuilder_ == null) { + ensureCrowdingSpecsIsMutable(); + crowdingSpecs_.set(index, builderForValue.build()); + onChanged(); + } else { + crowdingSpecsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** * - * * `semantic_similarity_score`: semantic similarity adjustment that is - * calculated using the embeddings generated by a proprietary Google model. - * This score determines how semantically similar a search query is to a - * document. - * * `keyword_similarity_score`: keyword match adjustment uses the Best - * Match 25 (BM25) ranking function. This score is calculated using a - * probabilistic model to estimate the probability that a document is - * relevant to a given query. - * * `relevance_score`: semantic relevance adjustment that uses a - * proprietary Google model to determine the meaning and intent behind a - * user's query in context with the content in the documents. - * * `pctr_rank`: predicted conversion rate adjustment as a rank use - * predicted Click-through rate (pCTR) to gauge the relevance and - * attractiveness of a search result from a user's perspective. A higher - * pCTR suggests that the result is more likely to satisfy the user's query - * and intent, making it a valuable signal for ranking. - * * `freshness_rank`: freshness adjustment as a rank - * * `document_age`: The time in hours elapsed since the document was last - * updated, a floating-point number (e.g., 0.25 means 15 minutes). - * * `topicality_rank`: topicality adjustment as a rank. Uses proprietary - * Google model to determine the keyword-based overlap between the query and - * the document. - * * `base_rank`: the default rank of the result - *
            * - * string ranking_expression = 26; + *
            +     * Optional. Crowding specifications for improving result diversity.
            +     * If multiple CrowdingSpecs are specified, crowding will be evaluated on
            +     * each unique combination of the `field` values, and max_count will be the
            +     * maximum value of `max_count` across all CrowdingSpecs.
            +     * For example, if the first CrowdingSpec has `field` = "color" and
            +     * `max_count` = 3, and the second CrowdingSpec has `field` = "size" and
            +     * `max_count` = 2, then after 3 documents that share the same color AND size
            +     * have been returned, subsequent ones should be
            +     * removed or demoted.
            +     * 
            * - * @return This builder for chaining. + * + * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.CrowdingSpec crowding_specs = 40 [(.google.api.field_behavior) = OPTIONAL]; + * */ - public Builder clearRankingExpression() { - rankingExpression_ = getDefaultInstance().getRankingExpression(); - bitField0_ = (bitField0_ & ~0x00800000); - onChanged(); + public Builder addCrowdingSpecs( + com.google.cloud.discoveryengine.v1beta.SearchRequest.CrowdingSpec value) { + if (crowdingSpecsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCrowdingSpecsIsMutable(); + crowdingSpecs_.add(value); + onChanged(); + } else { + crowdingSpecsBuilder_.addMessage(value); + } return this; } @@ -39405,261 +51491,486 @@ public Builder clearRankingExpression() { * * *
            -     * The ranking expression controls the customized ranking on retrieval
            -     * documents. This overrides
            -     * [ServingConfig.ranking_expression][google.cloud.discoveryengine.v1beta.ServingConfig.ranking_expression].
            -     * The syntax and supported features depend on the
            -     * `ranking_expression_backend` value. If `ranking_expression_backend` is not
            -     * provided, it defaults to `RANK_BY_EMBEDDING`.
            +     * Optional. Crowding specifications for improving result diversity.
            +     * If multiple CrowdingSpecs are specified, crowding will be evaluated on
            +     * each unique combination of the `field` values, and max_count will be the
            +     * maximum value of `max_count` across all CrowdingSpecs.
            +     * For example, if the first CrowdingSpec has `field` = "color" and
            +     * `max_count` = 3, and the second CrowdingSpec has `field` = "size" and
            +     * `max_count` = 2, then after 3 documents that share the same color AND size
            +     * have been returned, subsequent ones should be
            +     * removed or demoted.
            +     * 
            * - * If - * [ranking_expression_backend][google.cloud.discoveryengine.v1beta.SearchRequest.ranking_expression_backend] - * is not provided or set to `RANK_BY_EMBEDDING`, it should be a single - * function or multiple functions that are joined by "+". + * + * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.CrowdingSpec crowding_specs = 40 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addCrowdingSpecs( + int index, com.google.cloud.discoveryengine.v1beta.SearchRequest.CrowdingSpec value) { + if (crowdingSpecsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCrowdingSpecsIsMutable(); + crowdingSpecs_.add(index, value); + onChanged(); + } else { + crowdingSpecsBuilder_.addMessage(index, value); + } + return this; + } + + /** * - * * ranking_expression = function, { " + ", function }; * - * Supported functions: + *
            +     * Optional. Crowding specifications for improving result diversity.
            +     * If multiple CrowdingSpecs are specified, crowding will be evaluated on
            +     * each unique combination of the `field` values, and max_count will be the
            +     * maximum value of `max_count` across all CrowdingSpecs.
            +     * For example, if the first CrowdingSpec has `field` = "color" and
            +     * `max_count` = 3, and the second CrowdingSpec has `field` = "size" and
            +     * `max_count` = 2, then after 3 documents that share the same color AND size
            +     * have been returned, subsequent ones should be
            +     * removed or demoted.
            +     * 
            * - * * double * relevance_score - * * double * dotProduct(embedding_field_path) + * + * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.CrowdingSpec crowding_specs = 40 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addCrowdingSpecs( + com.google.cloud.discoveryengine.v1beta.SearchRequest.CrowdingSpec.Builder + builderForValue) { + if (crowdingSpecsBuilder_ == null) { + ensureCrowdingSpecsIsMutable(); + crowdingSpecs_.add(builderForValue.build()); + onChanged(); + } else { + crowdingSpecsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** * - * Function variables: * - * * `relevance_score`: pre-defined keywords, used for measure relevance - * between query and document. - * * `embedding_field_path`: the document embedding field - * used with query embedding vector. - * * `dotProduct`: embedding function between `embedding_field_path` and - * query embedding vector. + *
            +     * Optional. Crowding specifications for improving result diversity.
            +     * If multiple CrowdingSpecs are specified, crowding will be evaluated on
            +     * each unique combination of the `field` values, and max_count will be the
            +     * maximum value of `max_count` across all CrowdingSpecs.
            +     * For example, if the first CrowdingSpec has `field` = "color" and
            +     * `max_count` = 3, and the second CrowdingSpec has `field` = "size" and
            +     * `max_count` = 2, then after 3 documents that share the same color AND size
            +     * have been returned, subsequent ones should be
            +     * removed or demoted.
            +     * 
            * - * Example ranking expression: + * + * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.CrowdingSpec crowding_specs = 40 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addCrowdingSpecs( + int index, + com.google.cloud.discoveryengine.v1beta.SearchRequest.CrowdingSpec.Builder + builderForValue) { + if (crowdingSpecsBuilder_ == null) { + ensureCrowdingSpecsIsMutable(); + crowdingSpecs_.add(index, builderForValue.build()); + onChanged(); + } else { + crowdingSpecsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** * - * If document has an embedding field doc_embedding, the ranking expression - * could be `0.5 * relevance_score + 0.3 * dotProduct(doc_embedding)`. * - * If - * [ranking_expression_backend][google.cloud.discoveryengine.v1beta.SearchRequest.ranking_expression_backend] - * is set to `RANK_BY_FORMULA`, the following expression types (and - * combinations of those chained using + or - * * operators) are supported: + *
            +     * Optional. Crowding specifications for improving result diversity.
            +     * If multiple CrowdingSpecs are specified, crowding will be evaluated on
            +     * each unique combination of the `field` values, and max_count will be the
            +     * maximum value of `max_count` across all CrowdingSpecs.
            +     * For example, if the first CrowdingSpec has `field` = "color" and
            +     * `max_count` = 3, and the second CrowdingSpec has `field` = "size" and
            +     * `max_count` = 2, then after 3 documents that share the same color AND size
            +     * have been returned, subsequent ones should be
            +     * removed or demoted.
            +     * 
            * - * * `double` - * * `signal` - * * `log(signal)` - * * `exp(signal)` - * * `rr(signal, double > 0)` -- reciprocal rank transformation with second - * argument being a denominator constant. - * * `is_nan(signal)` -- returns 0 if signal is NaN, 1 otherwise. - * * `fill_nan(signal1, signal2 | double)` -- if signal1 is NaN, returns - * signal2 | double, else returns signal1. + * + * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.CrowdingSpec crowding_specs = 40 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addAllCrowdingSpecs( + java.lang.Iterable< + ? extends com.google.cloud.discoveryengine.v1beta.SearchRequest.CrowdingSpec> + values) { + if (crowdingSpecsBuilder_ == null) { + ensureCrowdingSpecsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, crowdingSpecs_); + onChanged(); + } else { + crowdingSpecsBuilder_.addAllMessages(values); + } + return this; + } + + /** * - * Here are a few examples of ranking formulas that use the supported - * ranking expression types: * - * - `0.2 * semantic_similarity_score + 0.8 * log(keyword_similarity_score)` - * -- mostly rank by the logarithm of `keyword_similarity_score` with slight - * `semantic_smilarity_score` adjustment. - * - `0.2 * exp(fill_nan(semantic_similarity_score, 0)) + 0.3 * - * is_nan(keyword_similarity_score)` -- rank by the exponent of - * `semantic_similarity_score` filling the value with 0 if it's NaN, also - * add constant 0.3 adjustment to the final score if - * `semantic_similarity_score` is NaN. - * - `0.2 * rr(semantic_similarity_score, 16) + 0.8 * - * rr(keyword_similarity_score, 16)` -- mostly rank by the reciprocal rank - * of `keyword_similarity_score` with slight adjustment of reciprocal rank - * of `semantic_smilarity_score`. + *
            +     * Optional. Crowding specifications for improving result diversity.
            +     * If multiple CrowdingSpecs are specified, crowding will be evaluated on
            +     * each unique combination of the `field` values, and max_count will be the
            +     * maximum value of `max_count` across all CrowdingSpecs.
            +     * For example, if the first CrowdingSpec has `field` = "color" and
            +     * `max_count` = 3, and the second CrowdingSpec has `field` = "size" and
            +     * `max_count` = 2, then after 3 documents that share the same color AND size
            +     * have been returned, subsequent ones should be
            +     * removed or demoted.
            +     * 
            * - * The following signals are supported: + * + * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.CrowdingSpec crowding_specs = 40 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearCrowdingSpecs() { + if (crowdingSpecsBuilder_ == null) { + crowdingSpecs_ = java.util.Collections.emptyList(); + bitField1_ = (bitField1_ & ~0x00000001); + onChanged(); + } else { + crowdingSpecsBuilder_.clear(); + } + return this; + } + + /** * - * * `semantic_similarity_score`: semantic similarity adjustment that is - * calculated using the embeddings generated by a proprietary Google model. - * This score determines how semantically similar a search query is to a - * document. - * * `keyword_similarity_score`: keyword match adjustment uses the Best - * Match 25 (BM25) ranking function. This score is calculated using a - * probabilistic model to estimate the probability that a document is - * relevant to a given query. - * * `relevance_score`: semantic relevance adjustment that uses a - * proprietary Google model to determine the meaning and intent behind a - * user's query in context with the content in the documents. - * * `pctr_rank`: predicted conversion rate adjustment as a rank use - * predicted Click-through rate (pCTR) to gauge the relevance and - * attractiveness of a search result from a user's perspective. A higher - * pCTR suggests that the result is more likely to satisfy the user's query - * and intent, making it a valuable signal for ranking. - * * `freshness_rank`: freshness adjustment as a rank - * * `document_age`: The time in hours elapsed since the document was last - * updated, a floating-point number (e.g., 0.25 means 15 minutes). - * * `topicality_rank`: topicality adjustment as a rank. Uses proprietary - * Google model to determine the keyword-based overlap between the query and - * the document. - * * `base_rank`: the default rank of the result - *
            * - * string ranking_expression = 26; + *
            +     * Optional. Crowding specifications for improving result diversity.
            +     * If multiple CrowdingSpecs are specified, crowding will be evaluated on
            +     * each unique combination of the `field` values, and max_count will be the
            +     * maximum value of `max_count` across all CrowdingSpecs.
            +     * For example, if the first CrowdingSpec has `field` = "color" and
            +     * `max_count` = 3, and the second CrowdingSpec has `field` = "size" and
            +     * `max_count` = 2, then after 3 documents that share the same color AND size
            +     * have been returned, subsequent ones should be
            +     * removed or demoted.
            +     * 
            * - * @param value The bytes for rankingExpression to set. - * @return This builder for chaining. + * + * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.CrowdingSpec crowding_specs = 40 [(.google.api.field_behavior) = OPTIONAL]; + * */ - public Builder setRankingExpressionBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); + public Builder removeCrowdingSpecs(int index) { + if (crowdingSpecsBuilder_ == null) { + ensureCrowdingSpecsIsMutable(); + crowdingSpecs_.remove(index); + onChanged(); + } else { + crowdingSpecsBuilder_.remove(index); } - checkByteStringIsUtf8(value); - rankingExpression_ = value; - bitField0_ |= 0x00800000; - onChanged(); return this; } - private int rankingExpressionBackend_ = 0; - /** * * *
            -     * The backend to use for the ranking expression evaluation.
            +     * Optional. Crowding specifications for improving result diversity.
            +     * If multiple CrowdingSpecs are specified, crowding will be evaluated on
            +     * each unique combination of the `field` values, and max_count will be the
            +     * maximum value of `max_count` across all CrowdingSpecs.
            +     * For example, if the first CrowdingSpec has `field` = "color" and
            +     * `max_count` = 3, and the second CrowdingSpec has `field` = "size" and
            +     * `max_count` = 2, then after 3 documents that share the same color AND size
            +     * have been returned, subsequent ones should be
            +     * removed or demoted.
                  * 
            * * - * .google.cloud.discoveryengine.v1beta.SearchRequest.RankingExpressionBackend ranking_expression_backend = 53 [(.google.api.field_behavior) = OPTIONAL]; + * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.CrowdingSpec crowding_specs = 40 [(.google.api.field_behavior) = OPTIONAL]; * - * - * @return The enum numeric value on the wire for rankingExpressionBackend. */ - @java.lang.Override - public int getRankingExpressionBackendValue() { - return rankingExpressionBackend_; + public com.google.cloud.discoveryengine.v1beta.SearchRequest.CrowdingSpec.Builder + getCrowdingSpecsBuilder(int index) { + return internalGetCrowdingSpecsFieldBuilder().getBuilder(index); } /** * * *
            -     * The backend to use for the ranking expression evaluation.
            +     * Optional. Crowding specifications for improving result diversity.
            +     * If multiple CrowdingSpecs are specified, crowding will be evaluated on
            +     * each unique combination of the `field` values, and max_count will be the
            +     * maximum value of `max_count` across all CrowdingSpecs.
            +     * For example, if the first CrowdingSpec has `field` = "color" and
            +     * `max_count` = 3, and the second CrowdingSpec has `field` = "size" and
            +     * `max_count` = 2, then after 3 documents that share the same color AND size
            +     * have been returned, subsequent ones should be
            +     * removed or demoted.
                  * 
            * * - * .google.cloud.discoveryengine.v1beta.SearchRequest.RankingExpressionBackend ranking_expression_backend = 53 [(.google.api.field_behavior) = OPTIONAL]; + * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.CrowdingSpec crowding_specs = 40 [(.google.api.field_behavior) = OPTIONAL]; * - * - * @param value The enum numeric value on the wire for rankingExpressionBackend to set. - * @return This builder for chaining. */ - public Builder setRankingExpressionBackendValue(int value) { - rankingExpressionBackend_ = value; - bitField0_ |= 0x01000000; - onChanged(); - return this; + public com.google.cloud.discoveryengine.v1beta.SearchRequest.CrowdingSpecOrBuilder + getCrowdingSpecsOrBuilder(int index) { + if (crowdingSpecsBuilder_ == null) { + return crowdingSpecs_.get(index); + } else { + return crowdingSpecsBuilder_.getMessageOrBuilder(index); + } } /** * * *
            -     * The backend to use for the ranking expression evaluation.
            +     * Optional. Crowding specifications for improving result diversity.
            +     * If multiple CrowdingSpecs are specified, crowding will be evaluated on
            +     * each unique combination of the `field` values, and max_count will be the
            +     * maximum value of `max_count` across all CrowdingSpecs.
            +     * For example, if the first CrowdingSpec has `field` = "color" and
            +     * `max_count` = 3, and the second CrowdingSpec has `field` = "size" and
            +     * `max_count` = 2, then after 3 documents that share the same color AND size
            +     * have been returned, subsequent ones should be
            +     * removed or demoted.
                  * 
            * * - * .google.cloud.discoveryengine.v1beta.SearchRequest.RankingExpressionBackend ranking_expression_backend = 53 [(.google.api.field_behavior) = OPTIONAL]; + * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.CrowdingSpec crowding_specs = 40 [(.google.api.field_behavior) = OPTIONAL]; * - * - * @return The rankingExpressionBackend. */ - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.SearchRequest.RankingExpressionBackend - getRankingExpressionBackend() { - com.google.cloud.discoveryengine.v1beta.SearchRequest.RankingExpressionBackend result = - com.google.cloud.discoveryengine.v1beta.SearchRequest.RankingExpressionBackend.forNumber( - rankingExpressionBackend_); - return result == null - ? com.google.cloud.discoveryengine.v1beta.SearchRequest.RankingExpressionBackend - .UNRECOGNIZED - : result; + public java.util.List< + ? extends com.google.cloud.discoveryengine.v1beta.SearchRequest.CrowdingSpecOrBuilder> + getCrowdingSpecsOrBuilderList() { + if (crowdingSpecsBuilder_ != null) { + return crowdingSpecsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(crowdingSpecs_); + } } /** * * *
            -     * The backend to use for the ranking expression evaluation.
            +     * Optional. Crowding specifications for improving result diversity.
            +     * If multiple CrowdingSpecs are specified, crowding will be evaluated on
            +     * each unique combination of the `field` values, and max_count will be the
            +     * maximum value of `max_count` across all CrowdingSpecs.
            +     * For example, if the first CrowdingSpec has `field` = "color" and
            +     * `max_count` = 3, and the second CrowdingSpec has `field` = "size" and
            +     * `max_count` = 2, then after 3 documents that share the same color AND size
            +     * have been returned, subsequent ones should be
            +     * removed or demoted.
                  * 
            * * - * .google.cloud.discoveryengine.v1beta.SearchRequest.RankingExpressionBackend ranking_expression_backend = 53 [(.google.api.field_behavior) = OPTIONAL]; + * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.CrowdingSpec crowding_specs = 40 [(.google.api.field_behavior) = OPTIONAL]; * - * - * @param value The rankingExpressionBackend to set. - * @return This builder for chaining. */ - public Builder setRankingExpressionBackend( - com.google.cloud.discoveryengine.v1beta.SearchRequest.RankingExpressionBackend value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x01000000; - rankingExpressionBackend_ = value.getNumber(); - onChanged(); - return this; + public com.google.cloud.discoveryengine.v1beta.SearchRequest.CrowdingSpec.Builder + addCrowdingSpecsBuilder() { + return internalGetCrowdingSpecsFieldBuilder() + .addBuilder( + com.google.cloud.discoveryengine.v1beta.SearchRequest.CrowdingSpec + .getDefaultInstance()); } /** * * *
            -     * The backend to use for the ranking expression evaluation.
            +     * Optional. Crowding specifications for improving result diversity.
            +     * If multiple CrowdingSpecs are specified, crowding will be evaluated on
            +     * each unique combination of the `field` values, and max_count will be the
            +     * maximum value of `max_count` across all CrowdingSpecs.
            +     * For example, if the first CrowdingSpec has `field` = "color" and
            +     * `max_count` = 3, and the second CrowdingSpec has `field` = "size" and
            +     * `max_count` = 2, then after 3 documents that share the same color AND size
            +     * have been returned, subsequent ones should be
            +     * removed or demoted.
                  * 
            * * - * .google.cloud.discoveryengine.v1beta.SearchRequest.RankingExpressionBackend ranking_expression_backend = 53 [(.google.api.field_behavior) = OPTIONAL]; + * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.CrowdingSpec crowding_specs = 40 [(.google.api.field_behavior) = OPTIONAL]; * + */ + public com.google.cloud.discoveryengine.v1beta.SearchRequest.CrowdingSpec.Builder + addCrowdingSpecsBuilder(int index) { + return internalGetCrowdingSpecsFieldBuilder() + .addBuilder( + index, + com.google.cloud.discoveryengine.v1beta.SearchRequest.CrowdingSpec + .getDefaultInstance()); + } + + /** * - * @return This builder for chaining. + * + *
            +     * Optional. Crowding specifications for improving result diversity.
            +     * If multiple CrowdingSpecs are specified, crowding will be evaluated on
            +     * each unique combination of the `field` values, and max_count will be the
            +     * maximum value of `max_count` across all CrowdingSpecs.
            +     * For example, if the first CrowdingSpec has `field` = "color" and
            +     * `max_count` = 3, and the second CrowdingSpec has `field` = "size" and
            +     * `max_count` = 2, then after 3 documents that share the same color AND size
            +     * have been returned, subsequent ones should be
            +     * removed or demoted.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.CrowdingSpec crowding_specs = 40 [(.google.api.field_behavior) = OPTIONAL]; + * */ - public Builder clearRankingExpressionBackend() { - bitField0_ = (bitField0_ & ~0x01000000); - rankingExpressionBackend_ = 0; - onChanged(); - return this; + public java.util.List< + com.google.cloud.discoveryengine.v1beta.SearchRequest.CrowdingSpec.Builder> + getCrowdingSpecsBuilderList() { + return internalGetCrowdingSpecsFieldBuilder().getBuilderList(); } - private boolean safeSearch_; + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.discoveryengine.v1beta.SearchRequest.CrowdingSpec, + com.google.cloud.discoveryengine.v1beta.SearchRequest.CrowdingSpec.Builder, + com.google.cloud.discoveryengine.v1beta.SearchRequest.CrowdingSpecOrBuilder> + internalGetCrowdingSpecsFieldBuilder() { + if (crowdingSpecsBuilder_ == null) { + crowdingSpecsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.discoveryengine.v1beta.SearchRequest.CrowdingSpec, + com.google.cloud.discoveryengine.v1beta.SearchRequest.CrowdingSpec.Builder, + com.google.cloud.discoveryengine.v1beta.SearchRequest.CrowdingSpecOrBuilder>( + crowdingSpecs_, + ((bitField1_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + crowdingSpecs_ = null; + } + return crowdingSpecsBuilder_; + } + + private java.lang.Object session_ = ""; /** * * *
            -     * Whether to turn on safe search. This is only supported for
            -     * website search.
            +     * The session resource name. Optional.
            +     *
            +     * Session allows users to do multi-turn /search API calls or coordination
            +     * between /search API calls and /answer API calls.
            +     *
            +     * Example #1 (multi-turn /search API calls):
            +     * Call /search API with the session ID generated in the first call.
            +     * Here, the previous search query gets considered in query
            +     * standing. I.e., if the first query is "How did Alphabet do in 2022?"
            +     * and the current query is "How about 2023?", the current query will
            +     * be interpreted as "How did Alphabet do in 2023?".
            +     *
            +     * Example #2 (coordination between /search API calls and /answer API calls):
            +     * Call /answer API with the session ID generated in the first call.
            +     * Here, the answer generation happens in the context of the search
            +     * results from the first search call.
                  * 
            * - * bool safe_search = 20; + * string session = 41 [(.google.api.resource_reference) = { ... } * - * @return The safeSearch. + * @return The session. */ - @java.lang.Override - public boolean getSafeSearch() { - return safeSearch_; + public java.lang.String getSession() { + java.lang.Object ref = session_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + session_ = s; + return s; + } else { + return (java.lang.String) ref; + } } /** * * *
            -     * Whether to turn on safe search. This is only supported for
            -     * website search.
            +     * The session resource name. Optional.
            +     *
            +     * Session allows users to do multi-turn /search API calls or coordination
            +     * between /search API calls and /answer API calls.
            +     *
            +     * Example #1 (multi-turn /search API calls):
            +     * Call /search API with the session ID generated in the first call.
            +     * Here, the previous search query gets considered in query
            +     * standing. I.e., if the first query is "How did Alphabet do in 2022?"
            +     * and the current query is "How about 2023?", the current query will
            +     * be interpreted as "How did Alphabet do in 2023?".
            +     *
            +     * Example #2 (coordination between /search API calls and /answer API calls):
            +     * Call /answer API with the session ID generated in the first call.
            +     * Here, the answer generation happens in the context of the search
            +     * results from the first search call.
                  * 
            * - * bool safe_search = 20; + * string session = 41 [(.google.api.resource_reference) = { ... } * - * @param value The safeSearch to set. - * @return This builder for chaining. + * @return The bytes for session. */ - public Builder setSafeSearch(boolean value) { + public com.google.protobuf.ByteString getSessionBytes() { + java.lang.Object ref = session_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + session_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } - safeSearch_ = value; - bitField0_ |= 0x02000000; + /** + * + * + *
            +     * The session resource name. Optional.
            +     *
            +     * Session allows users to do multi-turn /search API calls or coordination
            +     * between /search API calls and /answer API calls.
            +     *
            +     * Example #1 (multi-turn /search API calls):
            +     * Call /search API with the session ID generated in the first call.
            +     * Here, the previous search query gets considered in query
            +     * standing. I.e., if the first query is "How did Alphabet do in 2022?"
            +     * and the current query is "How about 2023?", the current query will
            +     * be interpreted as "How did Alphabet do in 2023?".
            +     *
            +     * Example #2 (coordination between /search API calls and /answer API calls):
            +     * Call /answer API with the session ID generated in the first call.
            +     * Here, the answer generation happens in the context of the search
            +     * results from the first search call.
            +     * 
            + * + * string session = 41 [(.google.api.resource_reference) = { ... } + * + * @param value The session to set. + * @return This builder for chaining. + */ + public Builder setSession(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + session_ = value; + bitField1_ |= 0x00000002; onChanged(); return this; } @@ -39668,197 +51979,146 @@ public Builder setSafeSearch(boolean value) { * * *
            -     * Whether to turn on safe search. This is only supported for
            -     * website search.
            +     * The session resource name. Optional.
            +     *
            +     * Session allows users to do multi-turn /search API calls or coordination
            +     * between /search API calls and /answer API calls.
            +     *
            +     * Example #1 (multi-turn /search API calls):
            +     * Call /search API with the session ID generated in the first call.
            +     * Here, the previous search query gets considered in query
            +     * standing. I.e., if the first query is "How did Alphabet do in 2022?"
            +     * and the current query is "How about 2023?", the current query will
            +     * be interpreted as "How did Alphabet do in 2023?".
            +     *
            +     * Example #2 (coordination between /search API calls and /answer API calls):
            +     * Call /answer API with the session ID generated in the first call.
            +     * Here, the answer generation happens in the context of the search
            +     * results from the first search call.
                  * 
            * - * bool safe_search = 20; + * string session = 41 [(.google.api.resource_reference) = { ... } * * @return This builder for chaining. */ - public Builder clearSafeSearch() { - bitField0_ = (bitField0_ & ~0x02000000); - safeSearch_ = false; + public Builder clearSession() { + session_ = getDefaultInstance().getSession(); + bitField1_ = (bitField1_ & ~0x00000002); onChanged(); return this; } - private com.google.protobuf.MapField userLabels_; - - private com.google.protobuf.MapField - internalGetUserLabels() { - if (userLabels_ == null) { - return com.google.protobuf.MapField.emptyMapField( - UserLabelsDefaultEntryHolder.defaultEntry); - } - return userLabels_; - } - - private com.google.protobuf.MapField - internalGetMutableUserLabels() { - if (userLabels_ == null) { - userLabels_ = - com.google.protobuf.MapField.newMapField(UserLabelsDefaultEntryHolder.defaultEntry); - } - if (!userLabels_.isMutable()) { - userLabels_ = userLabels_.copy(); - } - bitField0_ |= 0x04000000; - onChanged(); - return userLabels_; - } - - public int getUserLabelsCount() { - return internalGetUserLabels().getMap().size(); - } - /** * * *
            -     * The user labels applied to a resource must meet the following requirements:
            +     * The session resource name. Optional.
                  *
            -     * * Each resource can have multiple labels, up to a maximum of 64.
            -     * * Each label must be a key-value pair.
            -     * * Keys have a minimum length of 1 character and a maximum length of 63
            -     * characters and cannot be empty. Values can be empty and have a maximum
            -     * length of 63 characters.
            -     * * Keys and values can contain only lowercase letters, numeric characters,
            -     * underscores, and dashes. All characters must use UTF-8 encoding, and
            -     * international characters are allowed.
            -     * * The key portion of a label must be unique. However, you can use the same
            -     * key with multiple resources.
            -     * * Keys must start with a lowercase letter or international character.
            +     * Session allows users to do multi-turn /search API calls or coordination
            +     * between /search API calls and /answer API calls.
                  *
            -     * See [Google Cloud
            -     * Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
            -     * for more details.
            +     * Example #1 (multi-turn /search API calls):
            +     * Call /search API with the session ID generated in the first call.
            +     * Here, the previous search query gets considered in query
            +     * standing. I.e., if the first query is "How did Alphabet do in 2022?"
            +     * and the current query is "How about 2023?", the current query will
            +     * be interpreted as "How did Alphabet do in 2023?".
            +     *
            +     * Example #2 (coordination between /search API calls and /answer API calls):
            +     * Call /answer API with the session ID generated in the first call.
            +     * Here, the answer generation happens in the context of the search
            +     * results from the first search call.
                  * 
            * - * map<string, string> user_labels = 22; + * string session = 41 [(.google.api.resource_reference) = { ... } + * + * @param value The bytes for session to set. + * @return This builder for chaining. */ - @java.lang.Override - public boolean containsUserLabels(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); + public Builder setSessionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); } - return internalGetUserLabels().getMap().containsKey(key); + checkByteStringIsUtf8(value); + session_ = value; + bitField1_ |= 0x00000002; + onChanged(); + return this; } - /** Use {@link #getUserLabelsMap()} instead. */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getUserLabels() { - return getUserLabelsMap(); - } + private com.google.cloud.discoveryengine.v1beta.SearchRequest.SessionSpec sessionSpec_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.SearchRequest.SessionSpec, + com.google.cloud.discoveryengine.v1beta.SearchRequest.SessionSpec.Builder, + com.google.cloud.discoveryengine.v1beta.SearchRequest.SessionSpecOrBuilder> + sessionSpecBuilder_; /** * * *
            -     * The user labels applied to a resource must meet the following requirements:
            -     *
            -     * * Each resource can have multiple labels, up to a maximum of 64.
            -     * * Each label must be a key-value pair.
            -     * * Keys have a minimum length of 1 character and a maximum length of 63
            -     * characters and cannot be empty. Values can be empty and have a maximum
            -     * length of 63 characters.
            -     * * Keys and values can contain only lowercase letters, numeric characters,
            -     * underscores, and dashes. All characters must use UTF-8 encoding, and
            -     * international characters are allowed.
            -     * * The key portion of a label must be unique. However, you can use the same
            -     * key with multiple resources.
            -     * * Keys must start with a lowercase letter or international character.
            +     * Session specification.
                  *
            -     * See [Google Cloud
            -     * Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
            -     * for more details.
            +     * Can be used only when `session` is set.
                  * 
            * - * map<string, string> user_labels = 22; + * .google.cloud.discoveryengine.v1beta.SearchRequest.SessionSpec session_spec = 42; + * + * + * @return Whether the sessionSpec field is set. */ - @java.lang.Override - public java.util.Map getUserLabelsMap() { - return internalGetUserLabels().getMap(); + public boolean hasSessionSpec() { + return ((bitField1_ & 0x00000004) != 0); } /** * * *
            -     * The user labels applied to a resource must meet the following requirements:
            -     *
            -     * * Each resource can have multiple labels, up to a maximum of 64.
            -     * * Each label must be a key-value pair.
            -     * * Keys have a minimum length of 1 character and a maximum length of 63
            -     * characters and cannot be empty. Values can be empty and have a maximum
            -     * length of 63 characters.
            -     * * Keys and values can contain only lowercase letters, numeric characters,
            -     * underscores, and dashes. All characters must use UTF-8 encoding, and
            -     * international characters are allowed.
            -     * * The key portion of a label must be unique. However, you can use the same
            -     * key with multiple resources.
            -     * * Keys must start with a lowercase letter or international character.
            +     * Session specification.
                  *
            -     * See [Google Cloud
            -     * Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
            -     * for more details.
            +     * Can be used only when `session` is set.
                  * 
            * - * map<string, string> user_labels = 22; + * .google.cloud.discoveryengine.v1beta.SearchRequest.SessionSpec session_spec = 42; + * + * + * @return The sessionSpec. */ - @java.lang.Override - public /* nullable */ java.lang.String getUserLabelsOrDefault( - java.lang.String key, - /* nullable */ - java.lang.String defaultValue) { - if (key == null) { - throw new NullPointerException("map key"); + public com.google.cloud.discoveryengine.v1beta.SearchRequest.SessionSpec getSessionSpec() { + if (sessionSpecBuilder_ == null) { + return sessionSpec_ == null + ? com.google.cloud.discoveryengine.v1beta.SearchRequest.SessionSpec.getDefaultInstance() + : sessionSpec_; + } else { + return sessionSpecBuilder_.getMessage(); } - java.util.Map map = internalGetUserLabels().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; } /** * * *
            -     * The user labels applied to a resource must meet the following requirements:
            -     *
            -     * * Each resource can have multiple labels, up to a maximum of 64.
            -     * * Each label must be a key-value pair.
            -     * * Keys have a minimum length of 1 character and a maximum length of 63
            -     * characters and cannot be empty. Values can be empty and have a maximum
            -     * length of 63 characters.
            -     * * Keys and values can contain only lowercase letters, numeric characters,
            -     * underscores, and dashes. All characters must use UTF-8 encoding, and
            -     * international characters are allowed.
            -     * * The key portion of a label must be unique. However, you can use the same
            -     * key with multiple resources.
            -     * * Keys must start with a lowercase letter or international character.
            +     * Session specification.
                  *
            -     * See [Google Cloud
            -     * Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
            -     * for more details.
            +     * Can be used only when `session` is set.
                  * 
            * - * map<string, string> user_labels = 22; + * .google.cloud.discoveryengine.v1beta.SearchRequest.SessionSpec session_spec = 42; + * */ - @java.lang.Override - public java.lang.String getUserLabelsOrThrow(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - java.util.Map map = internalGetUserLabels().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); + public Builder setSessionSpec( + com.google.cloud.discoveryengine.v1beta.SearchRequest.SessionSpec value) { + if (sessionSpecBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + sessionSpec_ = value; + } else { + sessionSpecBuilder_.setMessage(value); } - return map.get(key); - } - - public Builder clearUserLabels() { - bitField0_ = (bitField0_ & ~0x04000000); - internalGetMutableUserLabels().getMutableMap().clear(); + bitField1_ |= 0x00000004; + onChanged(); return this; } @@ -39866,76 +52126,57 @@ public Builder clearUserLabels() { * * *
            -     * The user labels applied to a resource must meet the following requirements:
            -     *
            -     * * Each resource can have multiple labels, up to a maximum of 64.
            -     * * Each label must be a key-value pair.
            -     * * Keys have a minimum length of 1 character and a maximum length of 63
            -     * characters and cannot be empty. Values can be empty and have a maximum
            -     * length of 63 characters.
            -     * * Keys and values can contain only lowercase letters, numeric characters,
            -     * underscores, and dashes. All characters must use UTF-8 encoding, and
            -     * international characters are allowed.
            -     * * The key portion of a label must be unique. However, you can use the same
            -     * key with multiple resources.
            -     * * Keys must start with a lowercase letter or international character.
            +     * Session specification.
                  *
            -     * See [Google Cloud
            -     * Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
            -     * for more details.
            +     * Can be used only when `session` is set.
                  * 
            * - * map<string, string> user_labels = 22; + * .google.cloud.discoveryengine.v1beta.SearchRequest.SessionSpec session_spec = 42; + * */ - public Builder removeUserLabels(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); + public Builder setSessionSpec( + com.google.cloud.discoveryengine.v1beta.SearchRequest.SessionSpec.Builder builderForValue) { + if (sessionSpecBuilder_ == null) { + sessionSpec_ = builderForValue.build(); + } else { + sessionSpecBuilder_.setMessage(builderForValue.build()); } - internalGetMutableUserLabels().getMutableMap().remove(key); + bitField1_ |= 0x00000004; + onChanged(); return this; } - /** Use alternate mutation accessors instead. */ - @java.lang.Deprecated - public java.util.Map getMutableUserLabels() { - bitField0_ |= 0x04000000; - return internalGetMutableUserLabels().getMutableMap(); - } - /** * * *
            -     * The user labels applied to a resource must meet the following requirements:
            -     *
            -     * * Each resource can have multiple labels, up to a maximum of 64.
            -     * * Each label must be a key-value pair.
            -     * * Keys have a minimum length of 1 character and a maximum length of 63
            -     * characters and cannot be empty. Values can be empty and have a maximum
            -     * length of 63 characters.
            -     * * Keys and values can contain only lowercase letters, numeric characters,
            -     * underscores, and dashes. All characters must use UTF-8 encoding, and
            -     * international characters are allowed.
            -     * * The key portion of a label must be unique. However, you can use the same
            -     * key with multiple resources.
            -     * * Keys must start with a lowercase letter or international character.
            +     * Session specification.
                  *
            -     * See [Google Cloud
            -     * Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
            -     * for more details.
            +     * Can be used only when `session` is set.
                  * 
            * - * map<string, string> user_labels = 22; + * .google.cloud.discoveryengine.v1beta.SearchRequest.SessionSpec session_spec = 42; + * */ - public Builder putUserLabels(java.lang.String key, java.lang.String value) { - if (key == null) { - throw new NullPointerException("map key"); + public Builder mergeSessionSpec( + com.google.cloud.discoveryengine.v1beta.SearchRequest.SessionSpec value) { + if (sessionSpecBuilder_ == null) { + if (((bitField1_ & 0x00000004) != 0) + && sessionSpec_ != null + && sessionSpec_ + != com.google.cloud.discoveryengine.v1beta.SearchRequest.SessionSpec + .getDefaultInstance()) { + getSessionSpecBuilder().mergeFrom(value); + } else { + sessionSpec_ = value; + } + } else { + sessionSpecBuilder_.mergeFrom(value); } - if (value == null) { - throw new NullPointerException("map value"); + if (sessionSpec_ != null) { + bitField1_ |= 0x00000004; + onChanged(); } - internalGetMutableUserLabels().getMutableMap().put(key, value); - bitField0_ |= 0x04000000; return this; } @@ -39943,87 +52184,64 @@ public Builder putUserLabels(java.lang.String key, java.lang.String value) { * * *
            -     * The user labels applied to a resource must meet the following requirements:
            -     *
            -     * * Each resource can have multiple labels, up to a maximum of 64.
            -     * * Each label must be a key-value pair.
            -     * * Keys have a minimum length of 1 character and a maximum length of 63
            -     * characters and cannot be empty. Values can be empty and have a maximum
            -     * length of 63 characters.
            -     * * Keys and values can contain only lowercase letters, numeric characters,
            -     * underscores, and dashes. All characters must use UTF-8 encoding, and
            -     * international characters are allowed.
            -     * * The key portion of a label must be unique. However, you can use the same
            -     * key with multiple resources.
            -     * * Keys must start with a lowercase letter or international character.
            +     * Session specification.
                  *
            -     * See [Google Cloud
            -     * Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
            -     * for more details.
            +     * Can be used only when `session` is set.
                  * 
            * - * map<string, string> user_labels = 22; + * .google.cloud.discoveryengine.v1beta.SearchRequest.SessionSpec session_spec = 42; + * */ - public Builder putAllUserLabels(java.util.Map values) { - internalGetMutableUserLabels().getMutableMap().putAll(values); - bitField0_ |= 0x04000000; + public Builder clearSessionSpec() { + bitField1_ = (bitField1_ & ~0x00000004); + sessionSpec_ = null; + if (sessionSpecBuilder_ != null) { + sessionSpecBuilder_.dispose(); + sessionSpecBuilder_ = null; + } + onChanged(); return this; } - private com.google.cloud.discoveryengine.v1beta.SearchRequest - .NaturalLanguageQueryUnderstandingSpec - naturalLanguageQueryUnderstandingSpec_; - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.discoveryengine.v1beta.SearchRequest - .NaturalLanguageQueryUnderstandingSpec, - com.google.cloud.discoveryengine.v1beta.SearchRequest - .NaturalLanguageQueryUnderstandingSpec.Builder, - com.google.cloud.discoveryengine.v1beta.SearchRequest - .NaturalLanguageQueryUnderstandingSpecOrBuilder> - naturalLanguageQueryUnderstandingSpecBuilder_; - /** * * *
            -     * If `naturalLanguageQueryUnderstandingSpec` is not specified, no additional
            -     * natural language query understanding will be done.
            +     * Session specification.
            +     *
            +     * Can be used only when `session` is set.
                  * 
            * - * - * .google.cloud.discoveryengine.v1beta.SearchRequest.NaturalLanguageQueryUnderstandingSpec natural_language_query_understanding_spec = 28; + * .google.cloud.discoveryengine.v1beta.SearchRequest.SessionSpec session_spec = 42; * - * - * @return Whether the naturalLanguageQueryUnderstandingSpec field is set. */ - public boolean hasNaturalLanguageQueryUnderstandingSpec() { - return ((bitField0_ & 0x08000000) != 0); + public com.google.cloud.discoveryengine.v1beta.SearchRequest.SessionSpec.Builder + getSessionSpecBuilder() { + bitField1_ |= 0x00000004; + onChanged(); + return internalGetSessionSpecFieldBuilder().getBuilder(); } /** * * *
            -     * If `naturalLanguageQueryUnderstandingSpec` is not specified, no additional
            -     * natural language query understanding will be done.
            +     * Session specification.
            +     *
            +     * Can be used only when `session` is set.
                  * 
            * - * - * .google.cloud.discoveryengine.v1beta.SearchRequest.NaturalLanguageQueryUnderstandingSpec natural_language_query_understanding_spec = 28; + * .google.cloud.discoveryengine.v1beta.SearchRequest.SessionSpec session_spec = 42; * - * - * @return The naturalLanguageQueryUnderstandingSpec. */ - public com.google.cloud.discoveryengine.v1beta.SearchRequest - .NaturalLanguageQueryUnderstandingSpec - getNaturalLanguageQueryUnderstandingSpec() { - if (naturalLanguageQueryUnderstandingSpecBuilder_ == null) { - return naturalLanguageQueryUnderstandingSpec_ == null - ? com.google.cloud.discoveryengine.v1beta.SearchRequest - .NaturalLanguageQueryUnderstandingSpec.getDefaultInstance() - : naturalLanguageQueryUnderstandingSpec_; + public com.google.cloud.discoveryengine.v1beta.SearchRequest.SessionSpecOrBuilder + getSessionSpecOrBuilder() { + if (sessionSpecBuilder_ != null) { + return sessionSpecBuilder_.getMessageOrBuilder(); } else { - return naturalLanguageQueryUnderstandingSpecBuilder_.getMessage(); + return sessionSpec_ == null + ? com.google.cloud.discoveryengine.v1beta.SearchRequest.SessionSpec.getDefaultInstance() + : sessionSpec_; } } @@ -40031,110 +52249,86 @@ public boolean hasNaturalLanguageQueryUnderstandingSpec() { * * *
            -     * If `naturalLanguageQueryUnderstandingSpec` is not specified, no additional
            -     * natural language query understanding will be done.
            +     * Session specification.
            +     *
            +     * Can be used only when `session` is set.
                  * 
            * - * - * .google.cloud.discoveryengine.v1beta.SearchRequest.NaturalLanguageQueryUnderstandingSpec natural_language_query_understanding_spec = 28; + * .google.cloud.discoveryengine.v1beta.SearchRequest.SessionSpec session_spec = 42; * */ - public Builder setNaturalLanguageQueryUnderstandingSpec( - com.google.cloud.discoveryengine.v1beta.SearchRequest.NaturalLanguageQueryUnderstandingSpec - value) { - if (naturalLanguageQueryUnderstandingSpecBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - naturalLanguageQueryUnderstandingSpec_ = value; - } else { - naturalLanguageQueryUnderstandingSpecBuilder_.setMessage(value); + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.SearchRequest.SessionSpec, + com.google.cloud.discoveryengine.v1beta.SearchRequest.SessionSpec.Builder, + com.google.cloud.discoveryengine.v1beta.SearchRequest.SessionSpecOrBuilder> + internalGetSessionSpecFieldBuilder() { + if (sessionSpecBuilder_ == null) { + sessionSpecBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.SearchRequest.SessionSpec, + com.google.cloud.discoveryengine.v1beta.SearchRequest.SessionSpec.Builder, + com.google.cloud.discoveryengine.v1beta.SearchRequest.SessionSpecOrBuilder>( + getSessionSpec(), getParentForChildren(), isClean()); + sessionSpec_ = null; } - bitField0_ |= 0x08000000; - onChanged(); - return this; + return sessionSpecBuilder_; } + private int relevanceThreshold_ = 0; + /** * * *
            -     * If `naturalLanguageQueryUnderstandingSpec` is not specified, no additional
            -     * natural language query understanding will be done.
            -     * 
            + * The global relevance threshold of the search results. * - * - * .google.cloud.discoveryengine.v1beta.SearchRequest.NaturalLanguageQueryUnderstandingSpec natural_language_query_understanding_spec = 28; - * - */ - public Builder setNaturalLanguageQueryUnderstandingSpec( - com.google.cloud.discoveryengine.v1beta.SearchRequest.NaturalLanguageQueryUnderstandingSpec - .Builder - builderForValue) { - if (naturalLanguageQueryUnderstandingSpecBuilder_ == null) { - naturalLanguageQueryUnderstandingSpec_ = builderForValue.build(); - } else { - naturalLanguageQueryUnderstandingSpecBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x08000000; - onChanged(); - return this; - } - - /** + * Defaults to Google defined threshold, leveraging a balance of + * precision and recall to deliver both highly accurate results and + * comprehensive coverage of relevant information. * + * If more granular relevance filtering is required, use the + * `relevance_filter_spec` instead. * - *
            -     * If `naturalLanguageQueryUnderstandingSpec` is not specified, no additional
            -     * natural language query understanding will be done.
            +     * This feature is not supported for healthcare search.
                  * 
            * * - * .google.cloud.discoveryengine.v1beta.SearchRequest.NaturalLanguageQueryUnderstandingSpec natural_language_query_understanding_spec = 28; + * .google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceThreshold relevance_threshold = 44; * + * + * @return The enum numeric value on the wire for relevanceThreshold. */ - public Builder mergeNaturalLanguageQueryUnderstandingSpec( - com.google.cloud.discoveryengine.v1beta.SearchRequest.NaturalLanguageQueryUnderstandingSpec - value) { - if (naturalLanguageQueryUnderstandingSpecBuilder_ == null) { - if (((bitField0_ & 0x08000000) != 0) - && naturalLanguageQueryUnderstandingSpec_ != null - && naturalLanguageQueryUnderstandingSpec_ - != com.google.cloud.discoveryengine.v1beta.SearchRequest - .NaturalLanguageQueryUnderstandingSpec.getDefaultInstance()) { - getNaturalLanguageQueryUnderstandingSpecBuilder().mergeFrom(value); - } else { - naturalLanguageQueryUnderstandingSpec_ = value; - } - } else { - naturalLanguageQueryUnderstandingSpecBuilder_.mergeFrom(value); - } - if (naturalLanguageQueryUnderstandingSpec_ != null) { - bitField0_ |= 0x08000000; - onChanged(); - } - return this; + @java.lang.Override + public int getRelevanceThresholdValue() { + return relevanceThreshold_; } /** * * *
            -     * If `naturalLanguageQueryUnderstandingSpec` is not specified, no additional
            -     * natural language query understanding will be done.
            +     * The global relevance threshold of the search results.
            +     *
            +     * Defaults to Google defined threshold, leveraging a balance of
            +     * precision and recall to deliver both highly accurate results and
            +     * comprehensive coverage of relevant information.
            +     *
            +     * If more granular relevance filtering is required, use the
            +     * `relevance_filter_spec` instead.
            +     *
            +     * This feature is not supported for healthcare search.
                  * 
            * * - * .google.cloud.discoveryengine.v1beta.SearchRequest.NaturalLanguageQueryUnderstandingSpec natural_language_query_understanding_spec = 28; + * .google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceThreshold relevance_threshold = 44; * + * + * @param value The enum numeric value on the wire for relevanceThreshold to set. + * @return This builder for chaining. */ - public Builder clearNaturalLanguageQueryUnderstandingSpec() { - bitField0_ = (bitField0_ & ~0x08000000); - naturalLanguageQueryUnderstandingSpec_ = null; - if (naturalLanguageQueryUnderstandingSpecBuilder_ != null) { - naturalLanguageQueryUnderstandingSpecBuilder_.dispose(); - naturalLanguageQueryUnderstandingSpecBuilder_ = null; - } + public Builder setRelevanceThresholdValue(int value) { + relevanceThreshold_ = value; + bitField1_ |= 0x00000008; onChanged(); return this; } @@ -40143,133 +52337,157 @@ public Builder clearNaturalLanguageQueryUnderstandingSpec() { * * *
            -     * If `naturalLanguageQueryUnderstandingSpec` is not specified, no additional
            -     * natural language query understanding will be done.
            +     * The global relevance threshold of the search results.
            +     *
            +     * Defaults to Google defined threshold, leveraging a balance of
            +     * precision and recall to deliver both highly accurate results and
            +     * comprehensive coverage of relevant information.
            +     *
            +     * If more granular relevance filtering is required, use the
            +     * `relevance_filter_spec` instead.
            +     *
            +     * This feature is not supported for healthcare search.
                  * 
            * * - * .google.cloud.discoveryengine.v1beta.SearchRequest.NaturalLanguageQueryUnderstandingSpec natural_language_query_understanding_spec = 28; + * .google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceThreshold relevance_threshold = 44; * - */ - public com.google.cloud.discoveryengine.v1beta.SearchRequest - .NaturalLanguageQueryUnderstandingSpec.Builder - getNaturalLanguageQueryUnderstandingSpecBuilder() { - bitField0_ |= 0x08000000; - onChanged(); - return internalGetNaturalLanguageQueryUnderstandingSpecFieldBuilder().getBuilder(); + * + * @return The relevanceThreshold. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceThreshold + getRelevanceThreshold() { + com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceThreshold result = + com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceThreshold.forNumber( + relevanceThreshold_); + return result == null + ? com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceThreshold.UNRECOGNIZED + : result; } /** * * *
            -     * If `naturalLanguageQueryUnderstandingSpec` is not specified, no additional
            -     * natural language query understanding will be done.
            +     * The global relevance threshold of the search results.
            +     *
            +     * Defaults to Google defined threshold, leveraging a balance of
            +     * precision and recall to deliver both highly accurate results and
            +     * comprehensive coverage of relevant information.
            +     *
            +     * If more granular relevance filtering is required, use the
            +     * `relevance_filter_spec` instead.
            +     *
            +     * This feature is not supported for healthcare search.
                  * 
            * * - * .google.cloud.discoveryengine.v1beta.SearchRequest.NaturalLanguageQueryUnderstandingSpec natural_language_query_understanding_spec = 28; + * .google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceThreshold relevance_threshold = 44; * + * + * @param value The relevanceThreshold to set. + * @return This builder for chaining. */ - public com.google.cloud.discoveryengine.v1beta.SearchRequest - .NaturalLanguageQueryUnderstandingSpecOrBuilder - getNaturalLanguageQueryUnderstandingSpecOrBuilder() { - if (naturalLanguageQueryUnderstandingSpecBuilder_ != null) { - return naturalLanguageQueryUnderstandingSpecBuilder_.getMessageOrBuilder(); - } else { - return naturalLanguageQueryUnderstandingSpec_ == null - ? com.google.cloud.discoveryengine.v1beta.SearchRequest - .NaturalLanguageQueryUnderstandingSpec.getDefaultInstance() - : naturalLanguageQueryUnderstandingSpec_; + public Builder setRelevanceThreshold( + com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceThreshold value) { + if (value == null) { + throw new NullPointerException(); } + bitField1_ |= 0x00000008; + relevanceThreshold_ = value.getNumber(); + onChanged(); + return this; } /** * * *
            -     * If `naturalLanguageQueryUnderstandingSpec` is not specified, no additional
            -     * natural language query understanding will be done.
            +     * The global relevance threshold of the search results.
            +     *
            +     * Defaults to Google defined threshold, leveraging a balance of
            +     * precision and recall to deliver both highly accurate results and
            +     * comprehensive coverage of relevant information.
            +     *
            +     * If more granular relevance filtering is required, use the
            +     * `relevance_filter_spec` instead.
            +     *
            +     * This feature is not supported for healthcare search.
                  * 
            * * - * .google.cloud.discoveryengine.v1beta.SearchRequest.NaturalLanguageQueryUnderstandingSpec natural_language_query_understanding_spec = 28; + * .google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceThreshold relevance_threshold = 44; * + * + * @return This builder for chaining. */ - private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.discoveryengine.v1beta.SearchRequest - .NaturalLanguageQueryUnderstandingSpec, - com.google.cloud.discoveryengine.v1beta.SearchRequest - .NaturalLanguageQueryUnderstandingSpec.Builder, - com.google.cloud.discoveryengine.v1beta.SearchRequest - .NaturalLanguageQueryUnderstandingSpecOrBuilder> - internalGetNaturalLanguageQueryUnderstandingSpecFieldBuilder() { - if (naturalLanguageQueryUnderstandingSpecBuilder_ == null) { - naturalLanguageQueryUnderstandingSpecBuilder_ = - new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.discoveryengine.v1beta.SearchRequest - .NaturalLanguageQueryUnderstandingSpec, - com.google.cloud.discoveryengine.v1beta.SearchRequest - .NaturalLanguageQueryUnderstandingSpec.Builder, - com.google.cloud.discoveryengine.v1beta.SearchRequest - .NaturalLanguageQueryUnderstandingSpecOrBuilder>( - getNaturalLanguageQueryUnderstandingSpec(), getParentForChildren(), isClean()); - naturalLanguageQueryUnderstandingSpec_ = null; - } - return naturalLanguageQueryUnderstandingSpecBuilder_; + public Builder clearRelevanceThreshold() { + bitField1_ = (bitField1_ & ~0x00000008); + relevanceThreshold_ = 0; + onChanged(); + return this; } - private com.google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec - searchAsYouTypeSpec_; + private com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceFilterSpec + relevanceFilterSpec_; private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec, - com.google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec.Builder, - com.google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpecOrBuilder> - searchAsYouTypeSpecBuilder_; + com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceFilterSpec, + com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceFilterSpec.Builder, + com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceFilterSpecOrBuilder> + relevanceFilterSpecBuilder_; /** * * *
            -     * Search as you type configuration. Only supported for the
            -     * [IndustryVertical.MEDIA][google.cloud.discoveryengine.v1beta.IndustryVertical.MEDIA]
            -     * vertical.
            +     * Optional. The granular relevance filtering specification.
            +     *
            +     * If not specified, the global `relevance_threshold` will be used for all
            +     * sub-searches. If specified, this overrides the global
            +     * `relevance_threshold` to use thresholds on a per sub-search basis.
            +     *
            +     * This feature is currently supported only for custom and site search.
                  * 
            * * - * .google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec search_as_you_type_spec = 31; + * .google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceFilterSpec relevance_filter_spec = 86 [(.google.api.field_behavior) = OPTIONAL]; * * - * @return Whether the searchAsYouTypeSpec field is set. + * @return Whether the relevanceFilterSpec field is set. */ - public boolean hasSearchAsYouTypeSpec() { - return ((bitField0_ & 0x10000000) != 0); + public boolean hasRelevanceFilterSpec() { + return ((bitField1_ & 0x00000010) != 0); } /** * * *
            -     * Search as you type configuration. Only supported for the
            -     * [IndustryVertical.MEDIA][google.cloud.discoveryengine.v1beta.IndustryVertical.MEDIA]
            -     * vertical.
            +     * Optional. The granular relevance filtering specification.
            +     *
            +     * If not specified, the global `relevance_threshold` will be used for all
            +     * sub-searches. If specified, this overrides the global
            +     * `relevance_threshold` to use thresholds on a per sub-search basis.
            +     *
            +     * This feature is currently supported only for custom and site search.
                  * 
            * * - * .google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec search_as_you_type_spec = 31; + * .google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceFilterSpec relevance_filter_spec = 86 [(.google.api.field_behavior) = OPTIONAL]; * * - * @return The searchAsYouTypeSpec. + * @return The relevanceFilterSpec. */ - public com.google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec - getSearchAsYouTypeSpec() { - if (searchAsYouTypeSpecBuilder_ == null) { - return searchAsYouTypeSpec_ == null - ? com.google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec + public com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceFilterSpec + getRelevanceFilterSpec() { + if (relevanceFilterSpecBuilder_ == null) { + return relevanceFilterSpec_ == null + ? com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceFilterSpec .getDefaultInstance() - : searchAsYouTypeSpec_; + : relevanceFilterSpec_; } else { - return searchAsYouTypeSpecBuilder_.getMessage(); + return relevanceFilterSpecBuilder_.getMessage(); } } @@ -40277,26 +52495,30 @@ public boolean hasSearchAsYouTypeSpec() { * * *
            -     * Search as you type configuration. Only supported for the
            -     * [IndustryVertical.MEDIA][google.cloud.discoveryengine.v1beta.IndustryVertical.MEDIA]
            -     * vertical.
            +     * Optional. The granular relevance filtering specification.
            +     *
            +     * If not specified, the global `relevance_threshold` will be used for all
            +     * sub-searches. If specified, this overrides the global
            +     * `relevance_threshold` to use thresholds on a per sub-search basis.
            +     *
            +     * This feature is currently supported only for custom and site search.
                  * 
            * * - * .google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec search_as_you_type_spec = 31; + * .google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceFilterSpec relevance_filter_spec = 86 [(.google.api.field_behavior) = OPTIONAL]; * */ - public Builder setSearchAsYouTypeSpec( - com.google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec value) { - if (searchAsYouTypeSpecBuilder_ == null) { + public Builder setRelevanceFilterSpec( + com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceFilterSpec value) { + if (relevanceFilterSpecBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - searchAsYouTypeSpec_ = value; + relevanceFilterSpec_ = value; } else { - searchAsYouTypeSpecBuilder_.setMessage(value); + relevanceFilterSpecBuilder_.setMessage(value); } - bitField0_ |= 0x10000000; + bitField1_ |= 0x00000010; onChanged(); return this; } @@ -40305,24 +52527,28 @@ public Builder setSearchAsYouTypeSpec( * * *
            -     * Search as you type configuration. Only supported for the
            -     * [IndustryVertical.MEDIA][google.cloud.discoveryengine.v1beta.IndustryVertical.MEDIA]
            -     * vertical.
            +     * Optional. The granular relevance filtering specification.
            +     *
            +     * If not specified, the global `relevance_threshold` will be used for all
            +     * sub-searches. If specified, this overrides the global
            +     * `relevance_threshold` to use thresholds on a per sub-search basis.
            +     *
            +     * This feature is currently supported only for custom and site search.
                  * 
            * * - * .google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec search_as_you_type_spec = 31; + * .google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceFilterSpec relevance_filter_spec = 86 [(.google.api.field_behavior) = OPTIONAL]; * */ - public Builder setSearchAsYouTypeSpec( - com.google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec.Builder + public Builder setRelevanceFilterSpec( + com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceFilterSpec.Builder builderForValue) { - if (searchAsYouTypeSpecBuilder_ == null) { - searchAsYouTypeSpec_ = builderForValue.build(); + if (relevanceFilterSpecBuilder_ == null) { + relevanceFilterSpec_ = builderForValue.build(); } else { - searchAsYouTypeSpecBuilder_.setMessage(builderForValue.build()); + relevanceFilterSpecBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x10000000; + bitField1_ |= 0x00000010; onChanged(); return this; } @@ -40331,32 +52557,36 @@ public Builder setSearchAsYouTypeSpec( * * *
            -     * Search as you type configuration. Only supported for the
            -     * [IndustryVertical.MEDIA][google.cloud.discoveryengine.v1beta.IndustryVertical.MEDIA]
            -     * vertical.
            +     * Optional. The granular relevance filtering specification.
            +     *
            +     * If not specified, the global `relevance_threshold` will be used for all
            +     * sub-searches. If specified, this overrides the global
            +     * `relevance_threshold` to use thresholds on a per sub-search basis.
            +     *
            +     * This feature is currently supported only for custom and site search.
                  * 
            * * - * .google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec search_as_you_type_spec = 31; + * .google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceFilterSpec relevance_filter_spec = 86 [(.google.api.field_behavior) = OPTIONAL]; * */ - public Builder mergeSearchAsYouTypeSpec( - com.google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec value) { - if (searchAsYouTypeSpecBuilder_ == null) { - if (((bitField0_ & 0x10000000) != 0) - && searchAsYouTypeSpec_ != null - && searchAsYouTypeSpec_ - != com.google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec + public Builder mergeRelevanceFilterSpec( + com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceFilterSpec value) { + if (relevanceFilterSpecBuilder_ == null) { + if (((bitField1_ & 0x00000010) != 0) + && relevanceFilterSpec_ != null + && relevanceFilterSpec_ + != com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceFilterSpec .getDefaultInstance()) { - getSearchAsYouTypeSpecBuilder().mergeFrom(value); + getRelevanceFilterSpecBuilder().mergeFrom(value); } else { - searchAsYouTypeSpec_ = value; + relevanceFilterSpec_ = value; } } else { - searchAsYouTypeSpecBuilder_.mergeFrom(value); + relevanceFilterSpecBuilder_.mergeFrom(value); } - if (searchAsYouTypeSpec_ != null) { - bitField0_ |= 0x10000000; + if (relevanceFilterSpec_ != null) { + bitField1_ |= 0x00000010; onChanged(); } return this; @@ -40366,21 +52596,25 @@ public Builder mergeSearchAsYouTypeSpec( * * *
            -     * Search as you type configuration. Only supported for the
            -     * [IndustryVertical.MEDIA][google.cloud.discoveryengine.v1beta.IndustryVertical.MEDIA]
            -     * vertical.
            +     * Optional. The granular relevance filtering specification.
            +     *
            +     * If not specified, the global `relevance_threshold` will be used for all
            +     * sub-searches. If specified, this overrides the global
            +     * `relevance_threshold` to use thresholds on a per sub-search basis.
            +     *
            +     * This feature is currently supported only for custom and site search.
                  * 
            * * - * .google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec search_as_you_type_spec = 31; + * .google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceFilterSpec relevance_filter_spec = 86 [(.google.api.field_behavior) = OPTIONAL]; * */ - public Builder clearSearchAsYouTypeSpec() { - bitField0_ = (bitField0_ & ~0x10000000); - searchAsYouTypeSpec_ = null; - if (searchAsYouTypeSpecBuilder_ != null) { - searchAsYouTypeSpecBuilder_.dispose(); - searchAsYouTypeSpecBuilder_ = null; + public Builder clearRelevanceFilterSpec() { + bitField1_ = (bitField1_ & ~0x00000010); + relevanceFilterSpec_ = null; + if (relevanceFilterSpecBuilder_ != null) { + relevanceFilterSpecBuilder_.dispose(); + relevanceFilterSpecBuilder_ = null; } onChanged(); return this; @@ -40390,44 +52624,52 @@ public Builder clearSearchAsYouTypeSpec() { * * *
            -     * Search as you type configuration. Only supported for the
            -     * [IndustryVertical.MEDIA][google.cloud.discoveryengine.v1beta.IndustryVertical.MEDIA]
            -     * vertical.
            +     * Optional. The granular relevance filtering specification.
            +     *
            +     * If not specified, the global `relevance_threshold` will be used for all
            +     * sub-searches. If specified, this overrides the global
            +     * `relevance_threshold` to use thresholds on a per sub-search basis.
            +     *
            +     * This feature is currently supported only for custom and site search.
                  * 
            * * - * .google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec search_as_you_type_spec = 31; + * .google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceFilterSpec relevance_filter_spec = 86 [(.google.api.field_behavior) = OPTIONAL]; * */ - public com.google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec.Builder - getSearchAsYouTypeSpecBuilder() { - bitField0_ |= 0x10000000; + public com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceFilterSpec.Builder + getRelevanceFilterSpecBuilder() { + bitField1_ |= 0x00000010; onChanged(); - return internalGetSearchAsYouTypeSpecFieldBuilder().getBuilder(); + return internalGetRelevanceFilterSpecFieldBuilder().getBuilder(); } /** * * *
            -     * Search as you type configuration. Only supported for the
            -     * [IndustryVertical.MEDIA][google.cloud.discoveryengine.v1beta.IndustryVertical.MEDIA]
            -     * vertical.
            +     * Optional. The granular relevance filtering specification.
            +     *
            +     * If not specified, the global `relevance_threshold` will be used for all
            +     * sub-searches. If specified, this overrides the global
            +     * `relevance_threshold` to use thresholds on a per sub-search basis.
            +     *
            +     * This feature is currently supported only for custom and site search.
                  * 
            * * - * .google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec search_as_you_type_spec = 31; + * .google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceFilterSpec relevance_filter_spec = 86 [(.google.api.field_behavior) = OPTIONAL]; * */ - public com.google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpecOrBuilder - getSearchAsYouTypeSpecOrBuilder() { - if (searchAsYouTypeSpecBuilder_ != null) { - return searchAsYouTypeSpecBuilder_.getMessageOrBuilder(); + public com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceFilterSpecOrBuilder + getRelevanceFilterSpecOrBuilder() { + if (relevanceFilterSpecBuilder_ != null) { + return relevanceFilterSpecBuilder_.getMessageOrBuilder(); } else { - return searchAsYouTypeSpec_ == null - ? com.google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec + return relevanceFilterSpec_ == null + ? com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceFilterSpec .getDefaultInstance() - : searchAsYouTypeSpec_; + : relevanceFilterSpec_; } } @@ -40435,73 +52677,101 @@ public Builder clearSearchAsYouTypeSpec() { * * *
            -     * Search as you type configuration. Only supported for the
            -     * [IndustryVertical.MEDIA][google.cloud.discoveryengine.v1beta.IndustryVertical.MEDIA]
            -     * vertical.
            +     * Optional. The granular relevance filtering specification.
            +     *
            +     * If not specified, the global `relevance_threshold` will be used for all
            +     * sub-searches. If specified, this overrides the global
            +     * `relevance_threshold` to use thresholds on a per sub-search basis.
            +     *
            +     * This feature is currently supported only for custom and site search.
                  * 
            * * - * .google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec search_as_you_type_spec = 31; + * .google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceFilterSpec relevance_filter_spec = 86 [(.google.api.field_behavior) = OPTIONAL]; * */ private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec, - com.google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec.Builder, - com.google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpecOrBuilder> - internalGetSearchAsYouTypeSpecFieldBuilder() { - if (searchAsYouTypeSpecBuilder_ == null) { - searchAsYouTypeSpecBuilder_ = + com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceFilterSpec, + com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceFilterSpec.Builder, + com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceFilterSpecOrBuilder> + internalGetRelevanceFilterSpecFieldBuilder() { + if (relevanceFilterSpecBuilder_ == null) { + relevanceFilterSpecBuilder_ = new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec, - com.google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec.Builder, - com.google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpecOrBuilder>( - getSearchAsYouTypeSpec(), getParentForChildren(), isClean()); - searchAsYouTypeSpec_ = null; + com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceFilterSpec, + com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceFilterSpec.Builder, + com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceFilterSpecOrBuilder>( + getRelevanceFilterSpec(), getParentForChildren(), isClean()); + relevanceFilterSpec_ = null; } - return searchAsYouTypeSpecBuilder_; + return relevanceFilterSpecBuilder_; } - private java.lang.Object session_ = ""; + private com.google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec + personalizationSpec_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec, + com.google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec.Builder, + com.google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpecOrBuilder> + personalizationSpecBuilder_; /** * * *
            -     * The session resource name. Optional.
            +     * The specification for personalization.
                  *
            -     * Session allows users to do multi-turn /search API calls or coordination
            -     * between /search API calls and /answer API calls.
            +     * Notice that if both
            +     * [ServingConfig.personalization_spec][google.cloud.discoveryengine.v1beta.ServingConfig.personalization_spec]
            +     * and
            +     * [SearchRequest.personalization_spec][google.cloud.discoveryengine.v1beta.SearchRequest.personalization_spec]
            +     * are set,
            +     * [SearchRequest.personalization_spec][google.cloud.discoveryengine.v1beta.SearchRequest.personalization_spec]
            +     * overrides
            +     * [ServingConfig.personalization_spec][google.cloud.discoveryengine.v1beta.ServingConfig.personalization_spec].
            +     * 
            * - * Example #1 (multi-turn /search API calls): - * Call /search API with the session ID generated in the first call. - * Here, the previous search query gets considered in query - * standing. I.e., if the first query is "How did Alphabet do in 2022?" - * and the current query is "How about 2023?", the current query will - * be interpreted as "How did Alphabet do in 2023?". + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec personalization_spec = 46; + * * - * Example #2 (coordination between /search API calls and /answer API calls): - * Call /answer API with the session ID generated in the first call. - * Here, the answer generation happens in the context of the search - * results from the first search call. + * @return Whether the personalizationSpec field is set. + */ + public boolean hasPersonalizationSpec() { + return ((bitField1_ & 0x00000020) != 0); + } + + /** + * + * + *
            +     * The specification for personalization.
                  *
            -     * Multi-turn Search feature is currently at private GA stage. Please use
            -     * v1alpha or v1beta version instead before we launch this feature to public
            -     * GA. Or ask for allowlisting through Google Support team.
            +     * Notice that if both
            +     * [ServingConfig.personalization_spec][google.cloud.discoveryengine.v1beta.ServingConfig.personalization_spec]
            +     * and
            +     * [SearchRequest.personalization_spec][google.cloud.discoveryengine.v1beta.SearchRequest.personalization_spec]
            +     * are set,
            +     * [SearchRequest.personalization_spec][google.cloud.discoveryengine.v1beta.SearchRequest.personalization_spec]
            +     * overrides
            +     * [ServingConfig.personalization_spec][google.cloud.discoveryengine.v1beta.ServingConfig.personalization_spec].
                  * 
            * - * string session = 41 [(.google.api.resource_reference) = { ... } + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec personalization_spec = 46; + * * - * @return The session. + * @return The personalizationSpec. */ - public java.lang.String getSession() { - java.lang.Object ref = session_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - session_ = s; - return s; + public com.google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec + getPersonalizationSpec() { + if (personalizationSpecBuilder_ == null) { + return personalizationSpec_ == null + ? com.google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec + .getDefaultInstance() + : personalizationSpec_; } else { - return (java.lang.String) ref; + return personalizationSpecBuilder_.getMessage(); } } @@ -40509,81 +52779,139 @@ public java.lang.String getSession() { * * *
            -     * The session resource name. Optional.
            +     * The specification for personalization.
                  *
            -     * Session allows users to do multi-turn /search API calls or coordination
            -     * between /search API calls and /answer API calls.
            +     * Notice that if both
            +     * [ServingConfig.personalization_spec][google.cloud.discoveryengine.v1beta.ServingConfig.personalization_spec]
            +     * and
            +     * [SearchRequest.personalization_spec][google.cloud.discoveryengine.v1beta.SearchRequest.personalization_spec]
            +     * are set,
            +     * [SearchRequest.personalization_spec][google.cloud.discoveryengine.v1beta.SearchRequest.personalization_spec]
            +     * overrides
            +     * [ServingConfig.personalization_spec][google.cloud.discoveryengine.v1beta.ServingConfig.personalization_spec].
            +     * 
            * - * Example #1 (multi-turn /search API calls): - * Call /search API with the session ID generated in the first call. - * Here, the previous search query gets considered in query - * standing. I.e., if the first query is "How did Alphabet do in 2022?" - * and the current query is "How about 2023?", the current query will - * be interpreted as "How did Alphabet do in 2023?". + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec personalization_spec = 46; + * + */ + public Builder setPersonalizationSpec( + com.google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec value) { + if (personalizationSpecBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + personalizationSpec_ = value; + } else { + personalizationSpecBuilder_.setMessage(value); + } + bitField1_ |= 0x00000020; + onChanged(); + return this; + } + + /** * - * Example #2 (coordination between /search API calls and /answer API calls): - * Call /answer API with the session ID generated in the first call. - * Here, the answer generation happens in the context of the search - * results from the first search call. * - * Multi-turn Search feature is currently at private GA stage. Please use - * v1alpha or v1beta version instead before we launch this feature to public - * GA. Or ask for allowlisting through Google Support team. - *
            + *
            +     * The specification for personalization.
                  *
            -     * string session = 41 [(.google.api.resource_reference) = { ... }
            +     * Notice that if both
            +     * [ServingConfig.personalization_spec][google.cloud.discoveryengine.v1beta.ServingConfig.personalization_spec]
            +     * and
            +     * [SearchRequest.personalization_spec][google.cloud.discoveryengine.v1beta.SearchRequest.personalization_spec]
            +     * are set,
            +     * [SearchRequest.personalization_spec][google.cloud.discoveryengine.v1beta.SearchRequest.personalization_spec]
            +     * overrides
            +     * [ServingConfig.personalization_spec][google.cloud.discoveryengine.v1beta.ServingConfig.personalization_spec].
            +     * 
            * - * @return The bytes for session. + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec personalization_spec = 46; + * */ - public com.google.protobuf.ByteString getSessionBytes() { - java.lang.Object ref = session_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - session_ = b; - return b; + public Builder setPersonalizationSpec( + com.google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec.Builder + builderForValue) { + if (personalizationSpecBuilder_ == null) { + personalizationSpec_ = builderForValue.build(); } else { - return (com.google.protobuf.ByteString) ref; + personalizationSpecBuilder_.setMessage(builderForValue.build()); } + bitField1_ |= 0x00000020; + onChanged(); + return this; } /** * * *
            -     * The session resource name. Optional.
            +     * The specification for personalization.
                  *
            -     * Session allows users to do multi-turn /search API calls or coordination
            -     * between /search API calls and /answer API calls.
            +     * Notice that if both
            +     * [ServingConfig.personalization_spec][google.cloud.discoveryengine.v1beta.ServingConfig.personalization_spec]
            +     * and
            +     * [SearchRequest.personalization_spec][google.cloud.discoveryengine.v1beta.SearchRequest.personalization_spec]
            +     * are set,
            +     * [SearchRequest.personalization_spec][google.cloud.discoveryengine.v1beta.SearchRequest.personalization_spec]
            +     * overrides
            +     * [ServingConfig.personalization_spec][google.cloud.discoveryengine.v1beta.ServingConfig.personalization_spec].
            +     * 
            * - * Example #1 (multi-turn /search API calls): - * Call /search API with the session ID generated in the first call. - * Here, the previous search query gets considered in query - * standing. I.e., if the first query is "How did Alphabet do in 2022?" - * and the current query is "How about 2023?", the current query will - * be interpreted as "How did Alphabet do in 2023?". + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec personalization_spec = 46; + * + */ + public Builder mergePersonalizationSpec( + com.google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec value) { + if (personalizationSpecBuilder_ == null) { + if (((bitField1_ & 0x00000020) != 0) + && personalizationSpec_ != null + && personalizationSpec_ + != com.google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec + .getDefaultInstance()) { + getPersonalizationSpecBuilder().mergeFrom(value); + } else { + personalizationSpec_ = value; + } + } else { + personalizationSpecBuilder_.mergeFrom(value); + } + if (personalizationSpec_ != null) { + bitField1_ |= 0x00000020; + onChanged(); + } + return this; + } + + /** * - * Example #2 (coordination between /search API calls and /answer API calls): - * Call /answer API with the session ID generated in the first call. - * Here, the answer generation happens in the context of the search - * results from the first search call. * - * Multi-turn Search feature is currently at private GA stage. Please use - * v1alpha or v1beta version instead before we launch this feature to public - * GA. Or ask for allowlisting through Google Support team. - *
            + *
            +     * The specification for personalization.
                  *
            -     * string session = 41 [(.google.api.resource_reference) = { ... }
            +     * Notice that if both
            +     * [ServingConfig.personalization_spec][google.cloud.discoveryengine.v1beta.ServingConfig.personalization_spec]
            +     * and
            +     * [SearchRequest.personalization_spec][google.cloud.discoveryengine.v1beta.SearchRequest.personalization_spec]
            +     * are set,
            +     * [SearchRequest.personalization_spec][google.cloud.discoveryengine.v1beta.SearchRequest.personalization_spec]
            +     * overrides
            +     * [ServingConfig.personalization_spec][google.cloud.discoveryengine.v1beta.ServingConfig.personalization_spec].
            +     * 
            * - * @param value The session to set. - * @return This builder for chaining. + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec personalization_spec = 46; + * */ - public Builder setSession(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); + public Builder clearPersonalizationSpec() { + bitField1_ = (bitField1_ & ~0x00000020); + personalizationSpec_ = null; + if (personalizationSpecBuilder_ != null) { + personalizationSpecBuilder_.dispose(); + personalizationSpecBuilder_ = null; } - session_ = value; - bitField0_ |= 0x20000000; onChanged(); return this; } @@ -40592,127 +52920,145 @@ public Builder setSession(java.lang.String value) { * * *
            -     * The session resource name. Optional.
            -     *
            -     * Session allows users to do multi-turn /search API calls or coordination
            -     * between /search API calls and /answer API calls.
            -     *
            -     * Example #1 (multi-turn /search API calls):
            -     * Call /search API with the session ID generated in the first call.
            -     * Here, the previous search query gets considered in query
            -     * standing. I.e., if the first query is "How did Alphabet do in 2022?"
            -     * and the current query is "How about 2023?", the current query will
            -     * be interpreted as "How did Alphabet do in 2023?".
            -     *
            -     * Example #2 (coordination between /search API calls and /answer API calls):
            -     * Call /answer API with the session ID generated in the first call.
            -     * Here, the answer generation happens in the context of the search
            -     * results from the first search call.
            +     * The specification for personalization.
                  *
            -     * Multi-turn Search feature is currently at private GA stage. Please use
            -     * v1alpha or v1beta version instead before we launch this feature to public
            -     * GA. Or ask for allowlisting through Google Support team.
            +     * Notice that if both
            +     * [ServingConfig.personalization_spec][google.cloud.discoveryengine.v1beta.ServingConfig.personalization_spec]
            +     * and
            +     * [SearchRequest.personalization_spec][google.cloud.discoveryengine.v1beta.SearchRequest.personalization_spec]
            +     * are set,
            +     * [SearchRequest.personalization_spec][google.cloud.discoveryengine.v1beta.SearchRequest.personalization_spec]
            +     * overrides
            +     * [ServingConfig.personalization_spec][google.cloud.discoveryengine.v1beta.ServingConfig.personalization_spec].
                  * 
            * - * string session = 41 [(.google.api.resource_reference) = { ... } - * - * @return This builder for chaining. + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec personalization_spec = 46; + * */ - public Builder clearSession() { - session_ = getDefaultInstance().getSession(); - bitField0_ = (bitField0_ & ~0x20000000); + public com.google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec.Builder + getPersonalizationSpecBuilder() { + bitField1_ |= 0x00000020; onChanged(); - return this; + return internalGetPersonalizationSpecFieldBuilder().getBuilder(); } /** * * *
            -     * The session resource name. Optional.
            +     * The specification for personalization.
                  *
            -     * Session allows users to do multi-turn /search API calls or coordination
            -     * between /search API calls and /answer API calls.
            +     * Notice that if both
            +     * [ServingConfig.personalization_spec][google.cloud.discoveryengine.v1beta.ServingConfig.personalization_spec]
            +     * and
            +     * [SearchRequest.personalization_spec][google.cloud.discoveryengine.v1beta.SearchRequest.personalization_spec]
            +     * are set,
            +     * [SearchRequest.personalization_spec][google.cloud.discoveryengine.v1beta.SearchRequest.personalization_spec]
            +     * overrides
            +     * [ServingConfig.personalization_spec][google.cloud.discoveryengine.v1beta.ServingConfig.personalization_spec].
            +     * 
            * - * Example #1 (multi-turn /search API calls): - * Call /search API with the session ID generated in the first call. - * Here, the previous search query gets considered in query - * standing. I.e., if the first query is "How did Alphabet do in 2022?" - * and the current query is "How about 2023?", the current query will - * be interpreted as "How did Alphabet do in 2023?". + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec personalization_spec = 46; + * + */ + public com.google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpecOrBuilder + getPersonalizationSpecOrBuilder() { + if (personalizationSpecBuilder_ != null) { + return personalizationSpecBuilder_.getMessageOrBuilder(); + } else { + return personalizationSpec_ == null + ? com.google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec + .getDefaultInstance() + : personalizationSpec_; + } + } + + /** * - * Example #2 (coordination between /search API calls and /answer API calls): - * Call /answer API with the session ID generated in the first call. - * Here, the answer generation happens in the context of the search - * results from the first search call. * - * Multi-turn Search feature is currently at private GA stage. Please use - * v1alpha or v1beta version instead before we launch this feature to public - * GA. Or ask for allowlisting through Google Support team. - *
            + *
            +     * The specification for personalization.
                  *
            -     * string session = 41 [(.google.api.resource_reference) = { ... }
            +     * Notice that if both
            +     * [ServingConfig.personalization_spec][google.cloud.discoveryengine.v1beta.ServingConfig.personalization_spec]
            +     * and
            +     * [SearchRequest.personalization_spec][google.cloud.discoveryengine.v1beta.SearchRequest.personalization_spec]
            +     * are set,
            +     * [SearchRequest.personalization_spec][google.cloud.discoveryengine.v1beta.SearchRequest.personalization_spec]
            +     * overrides
            +     * [ServingConfig.personalization_spec][google.cloud.discoveryengine.v1beta.ServingConfig.personalization_spec].
            +     * 
            * - * @param value The bytes for session to set. - * @return This builder for chaining. + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec personalization_spec = 46; + * */ - public Builder setSessionBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec, + com.google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec.Builder, + com.google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpecOrBuilder> + internalGetPersonalizationSpecFieldBuilder() { + if (personalizationSpecBuilder_ == null) { + personalizationSpecBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec, + com.google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec.Builder, + com.google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpecOrBuilder>( + getPersonalizationSpec(), getParentForChildren(), isClean()); + personalizationSpec_ = null; } - checkByteStringIsUtf8(value); - session_ = value; - bitField0_ |= 0x20000000; - onChanged(); - return this; + return personalizationSpecBuilder_; } - private com.google.cloud.discoveryengine.v1beta.SearchRequest.SessionSpec sessionSpec_; + private com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceScoreSpec + relevanceScoreSpec_; private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.discoveryengine.v1beta.SearchRequest.SessionSpec, - com.google.cloud.discoveryengine.v1beta.SearchRequest.SessionSpec.Builder, - com.google.cloud.discoveryengine.v1beta.SearchRequest.SessionSpecOrBuilder> - sessionSpecBuilder_; + com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceScoreSpec, + com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceScoreSpec.Builder, + com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceScoreSpecOrBuilder> + relevanceScoreSpecBuilder_; /** * * *
            -     * Session specification.
            -     *
            -     * Can be used only when `session` is set.
            +     * Optional. The specification for returning the relevance score.
                  * 
            * - * .google.cloud.discoveryengine.v1beta.SearchRequest.SessionSpec session_spec = 42; + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceScoreSpec relevance_score_spec = 52 [(.google.api.field_behavior) = OPTIONAL]; * * - * @return Whether the sessionSpec field is set. + * @return Whether the relevanceScoreSpec field is set. */ - public boolean hasSessionSpec() { - return ((bitField0_ & 0x40000000) != 0); + public boolean hasRelevanceScoreSpec() { + return ((bitField1_ & 0x00000040) != 0); } /** * * *
            -     * Session specification.
            -     *
            -     * Can be used only when `session` is set.
            +     * Optional. The specification for returning the relevance score.
                  * 
            * - * .google.cloud.discoveryengine.v1beta.SearchRequest.SessionSpec session_spec = 42; + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceScoreSpec relevance_score_spec = 52 [(.google.api.field_behavior) = OPTIONAL]; * * - * @return The sessionSpec. + * @return The relevanceScoreSpec. */ - public com.google.cloud.discoveryengine.v1beta.SearchRequest.SessionSpec getSessionSpec() { - if (sessionSpecBuilder_ == null) { - return sessionSpec_ == null - ? com.google.cloud.discoveryengine.v1beta.SearchRequest.SessionSpec.getDefaultInstance() - : sessionSpec_; + public com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceScoreSpec + getRelevanceScoreSpec() { + if (relevanceScoreSpecBuilder_ == null) { + return relevanceScoreSpec_ == null + ? com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceScoreSpec + .getDefaultInstance() + : relevanceScoreSpec_; } else { - return sessionSpecBuilder_.getMessage(); + return relevanceScoreSpecBuilder_.getMessage(); } } @@ -40720,25 +53066,24 @@ public com.google.cloud.discoveryengine.v1beta.SearchRequest.SessionSpec getSess * * *
            -     * Session specification.
            -     *
            -     * Can be used only when `session` is set.
            +     * Optional. The specification for returning the relevance score.
                  * 
            * - * .google.cloud.discoveryengine.v1beta.SearchRequest.SessionSpec session_spec = 42; + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceScoreSpec relevance_score_spec = 52 [(.google.api.field_behavior) = OPTIONAL]; * */ - public Builder setSessionSpec( - com.google.cloud.discoveryengine.v1beta.SearchRequest.SessionSpec value) { - if (sessionSpecBuilder_ == null) { + public Builder setRelevanceScoreSpec( + com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceScoreSpec value) { + if (relevanceScoreSpecBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - sessionSpec_ = value; + relevanceScoreSpec_ = value; } else { - sessionSpecBuilder_.setMessage(value); + relevanceScoreSpecBuilder_.setMessage(value); } - bitField0_ |= 0x40000000; + bitField1_ |= 0x00000040; onChanged(); return this; } @@ -40747,22 +53092,22 @@ public Builder setSessionSpec( * * *
            -     * Session specification.
            -     *
            -     * Can be used only when `session` is set.
            +     * Optional. The specification for returning the relevance score.
                  * 
            * - * .google.cloud.discoveryengine.v1beta.SearchRequest.SessionSpec session_spec = 42; + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceScoreSpec relevance_score_spec = 52 [(.google.api.field_behavior) = OPTIONAL]; * */ - public Builder setSessionSpec( - com.google.cloud.discoveryengine.v1beta.SearchRequest.SessionSpec.Builder builderForValue) { - if (sessionSpecBuilder_ == null) { - sessionSpec_ = builderForValue.build(); + public Builder setRelevanceScoreSpec( + com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceScoreSpec.Builder + builderForValue) { + if (relevanceScoreSpecBuilder_ == null) { + relevanceScoreSpec_ = builderForValue.build(); } else { - sessionSpecBuilder_.setMessage(builderForValue.build()); + relevanceScoreSpecBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x40000000; + bitField1_ |= 0x00000040; onChanged(); return this; } @@ -40771,31 +53116,30 @@ public Builder setSessionSpec( * * *
            -     * Session specification.
            -     *
            -     * Can be used only when `session` is set.
            +     * Optional. The specification for returning the relevance score.
                  * 
            * - * .google.cloud.discoveryengine.v1beta.SearchRequest.SessionSpec session_spec = 42; + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceScoreSpec relevance_score_spec = 52 [(.google.api.field_behavior) = OPTIONAL]; * */ - public Builder mergeSessionSpec( - com.google.cloud.discoveryengine.v1beta.SearchRequest.SessionSpec value) { - if (sessionSpecBuilder_ == null) { - if (((bitField0_ & 0x40000000) != 0) - && sessionSpec_ != null - && sessionSpec_ - != com.google.cloud.discoveryengine.v1beta.SearchRequest.SessionSpec + public Builder mergeRelevanceScoreSpec( + com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceScoreSpec value) { + if (relevanceScoreSpecBuilder_ == null) { + if (((bitField1_ & 0x00000040) != 0) + && relevanceScoreSpec_ != null + && relevanceScoreSpec_ + != com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceScoreSpec .getDefaultInstance()) { - getSessionSpecBuilder().mergeFrom(value); + getRelevanceScoreSpecBuilder().mergeFrom(value); } else { - sessionSpec_ = value; + relevanceScoreSpec_ = value; } } else { - sessionSpecBuilder_.mergeFrom(value); + relevanceScoreSpecBuilder_.mergeFrom(value); } - if (sessionSpec_ != null) { - bitField0_ |= 0x40000000; + if (relevanceScoreSpec_ != null) { + bitField1_ |= 0x00000040; onChanged(); } return this; @@ -40805,20 +53149,19 @@ public Builder mergeSessionSpec( * * *
            -     * Session specification.
            -     *
            -     * Can be used only when `session` is set.
            +     * Optional. The specification for returning the relevance score.
                  * 
            * - * .google.cloud.discoveryengine.v1beta.SearchRequest.SessionSpec session_spec = 42; + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceScoreSpec relevance_score_spec = 52 [(.google.api.field_behavior) = OPTIONAL]; * */ - public Builder clearSessionSpec() { - bitField0_ = (bitField0_ & ~0x40000000); - sessionSpec_ = null; - if (sessionSpecBuilder_ != null) { - sessionSpecBuilder_.dispose(); - sessionSpecBuilder_ = null; + public Builder clearRelevanceScoreSpec() { + bitField1_ = (bitField1_ & ~0x00000040); + relevanceScoreSpec_ = null; + if (relevanceScoreSpecBuilder_ != null) { + relevanceScoreSpecBuilder_.dispose(); + relevanceScoreSpecBuilder_ = null; } onChanged(); return this; @@ -40828,41 +53171,40 @@ public Builder clearSessionSpec() { * * *
            -     * Session specification.
            -     *
            -     * Can be used only when `session` is set.
            +     * Optional. The specification for returning the relevance score.
                  * 
            * - * .google.cloud.discoveryengine.v1beta.SearchRequest.SessionSpec session_spec = 42; + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceScoreSpec relevance_score_spec = 52 [(.google.api.field_behavior) = OPTIONAL]; * */ - public com.google.cloud.discoveryengine.v1beta.SearchRequest.SessionSpec.Builder - getSessionSpecBuilder() { - bitField0_ |= 0x40000000; + public com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceScoreSpec.Builder + getRelevanceScoreSpecBuilder() { + bitField1_ |= 0x00000040; onChanged(); - return internalGetSessionSpecFieldBuilder().getBuilder(); + return internalGetRelevanceScoreSpecFieldBuilder().getBuilder(); } /** * * *
            -     * Session specification.
            -     *
            -     * Can be used only when `session` is set.
            +     * Optional. The specification for returning the relevance score.
                  * 
            * - * .google.cloud.discoveryengine.v1beta.SearchRequest.SessionSpec session_spec = 42; + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceScoreSpec relevance_score_spec = 52 [(.google.api.field_behavior) = OPTIONAL]; * */ - public com.google.cloud.discoveryengine.v1beta.SearchRequest.SessionSpecOrBuilder - getSessionSpecOrBuilder() { - if (sessionSpecBuilder_ != null) { - return sessionSpecBuilder_.getMessageOrBuilder(); + public com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceScoreSpecOrBuilder + getRelevanceScoreSpecOrBuilder() { + if (relevanceScoreSpecBuilder_ != null) { + return relevanceScoreSpecBuilder_.getMessageOrBuilder(); } else { - return sessionSpec_ == null - ? com.google.cloud.discoveryengine.v1beta.SearchRequest.SessionSpec.getDefaultInstance() - : sessionSpec_; + return relevanceScoreSpec_ == null + ? com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceScoreSpec + .getDefaultInstance() + : relevanceScoreSpec_; } } @@ -40870,76 +53212,107 @@ public Builder clearSessionSpec() { * * *
            -     * Session specification.
            -     *
            -     * Can be used only when `session` is set.
            +     * Optional. The specification for returning the relevance score.
                  * 
            * - * .google.cloud.discoveryengine.v1beta.SearchRequest.SessionSpec session_spec = 42; + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceScoreSpec relevance_score_spec = 52 [(.google.api.field_behavior) = OPTIONAL]; * */ private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.discoveryengine.v1beta.SearchRequest.SessionSpec, - com.google.cloud.discoveryengine.v1beta.SearchRequest.SessionSpec.Builder, - com.google.cloud.discoveryengine.v1beta.SearchRequest.SessionSpecOrBuilder> - internalGetSessionSpecFieldBuilder() { - if (sessionSpecBuilder_ == null) { - sessionSpecBuilder_ = + com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceScoreSpec, + com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceScoreSpec.Builder, + com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceScoreSpecOrBuilder> + internalGetRelevanceScoreSpecFieldBuilder() { + if (relevanceScoreSpecBuilder_ == null) { + relevanceScoreSpecBuilder_ = new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.discoveryengine.v1beta.SearchRequest.SessionSpec, - com.google.cloud.discoveryengine.v1beta.SearchRequest.SessionSpec.Builder, - com.google.cloud.discoveryengine.v1beta.SearchRequest.SessionSpecOrBuilder>( - getSessionSpec(), getParentForChildren(), isClean()); - sessionSpec_ = null; + com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceScoreSpec, + com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceScoreSpec.Builder, + com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceScoreSpecOrBuilder>( + getRelevanceScoreSpec(), getParentForChildren(), isClean()); + relevanceScoreSpec_ = null; } - return sessionSpecBuilder_; + return relevanceScoreSpecBuilder_; } - private int relevanceThreshold_ = 0; + private com.google.cloud.discoveryengine.v1beta.SearchRequest.SearchAddonSpec searchAddonSpec_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.SearchRequest.SearchAddonSpec, + com.google.cloud.discoveryengine.v1beta.SearchRequest.SearchAddonSpec.Builder, + com.google.cloud.discoveryengine.v1beta.SearchRequest.SearchAddonSpecOrBuilder> + searchAddonSpecBuilder_; /** * * *
            -     * The relevance threshold of the search results.
            -     *
            -     * Default to Google defined threshold, leveraging a balance of
            -     * precision and recall to deliver both highly accurate results and
            -     * comprehensive coverage of relevant information.
            +     * Optional. SearchAddonSpec is used to disable add-ons for search as per new
            +     * repricing model.
            +     * This field is only supported for search requests.
                  * 
            * * - * .google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceThreshold relevance_threshold = 44; + * .google.cloud.discoveryengine.v1beta.SearchRequest.SearchAddonSpec search_addon_spec = 62 [(.google.api.field_behavior) = OPTIONAL]; * * - * @return The enum numeric value on the wire for relevanceThreshold. + * @return Whether the searchAddonSpec field is set. */ - @java.lang.Override - public int getRelevanceThresholdValue() { - return relevanceThreshold_; + public boolean hasSearchAddonSpec() { + return ((bitField1_ & 0x00000080) != 0); } /** * * *
            -     * The relevance threshold of the search results.
            -     *
            -     * Default to Google defined threshold, leveraging a balance of
            -     * precision and recall to deliver both highly accurate results and
            -     * comprehensive coverage of relevant information.
            +     * Optional. SearchAddonSpec is used to disable add-ons for search as per new
            +     * repricing model.
            +     * This field is only supported for search requests.
                  * 
            * * - * .google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceThreshold relevance_threshold = 44; + * .google.cloud.discoveryengine.v1beta.SearchRequest.SearchAddonSpec search_addon_spec = 62 [(.google.api.field_behavior) = OPTIONAL]; * * - * @param value The enum numeric value on the wire for relevanceThreshold to set. - * @return This builder for chaining. + * @return The searchAddonSpec. */ - public Builder setRelevanceThresholdValue(int value) { - relevanceThreshold_ = value; - bitField0_ |= 0x80000000; + public com.google.cloud.discoveryengine.v1beta.SearchRequest.SearchAddonSpec + getSearchAddonSpec() { + if (searchAddonSpecBuilder_ == null) { + return searchAddonSpec_ == null + ? com.google.cloud.discoveryengine.v1beta.SearchRequest.SearchAddonSpec + .getDefaultInstance() + : searchAddonSpec_; + } else { + return searchAddonSpecBuilder_.getMessage(); + } + } + + /** + * + * + *
            +     * Optional. SearchAddonSpec is used to disable add-ons for search as per new
            +     * repricing model.
            +     * This field is only supported for search requests.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.SearchAddonSpec search_addon_spec = 62 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setSearchAddonSpec( + com.google.cloud.discoveryengine.v1beta.SearchRequest.SearchAddonSpec value) { + if (searchAddonSpecBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + searchAddonSpec_ = value; + } else { + searchAddonSpecBuilder_.setMessage(value); + } + bitField1_ |= 0x00000080; onChanged(); return this; } @@ -40948,55 +53321,83 @@ public Builder setRelevanceThresholdValue(int value) { * * *
            -     * The relevance threshold of the search results.
            -     *
            -     * Default to Google defined threshold, leveraging a balance of
            -     * precision and recall to deliver both highly accurate results and
            -     * comprehensive coverage of relevant information.
            +     * Optional. SearchAddonSpec is used to disable add-ons for search as per new
            +     * repricing model.
            +     * This field is only supported for search requests.
                  * 
            * * - * .google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceThreshold relevance_threshold = 44; + * .google.cloud.discoveryengine.v1beta.SearchRequest.SearchAddonSpec search_addon_spec = 62 [(.google.api.field_behavior) = OPTIONAL]; * - * - * @return The relevanceThreshold. */ - @java.lang.Override - public com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceThreshold - getRelevanceThreshold() { - com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceThreshold result = - com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceThreshold.forNumber( - relevanceThreshold_); - return result == null - ? com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceThreshold.UNRECOGNIZED - : result; + public Builder setSearchAddonSpec( + com.google.cloud.discoveryengine.v1beta.SearchRequest.SearchAddonSpec.Builder + builderForValue) { + if (searchAddonSpecBuilder_ == null) { + searchAddonSpec_ = builderForValue.build(); + } else { + searchAddonSpecBuilder_.setMessage(builderForValue.build()); + } + bitField1_ |= 0x00000080; + onChanged(); + return this; } /** * * *
            -     * The relevance threshold of the search results.
            -     *
            -     * Default to Google defined threshold, leveraging a balance of
            -     * precision and recall to deliver both highly accurate results and
            -     * comprehensive coverage of relevant information.
            +     * Optional. SearchAddonSpec is used to disable add-ons for search as per new
            +     * repricing model.
            +     * This field is only supported for search requests.
                  * 
            * * - * .google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceThreshold relevance_threshold = 44; + * .google.cloud.discoveryengine.v1beta.SearchRequest.SearchAddonSpec search_addon_spec = 62 [(.google.api.field_behavior) = OPTIONAL]; * + */ + public Builder mergeSearchAddonSpec( + com.google.cloud.discoveryengine.v1beta.SearchRequest.SearchAddonSpec value) { + if (searchAddonSpecBuilder_ == null) { + if (((bitField1_ & 0x00000080) != 0) + && searchAddonSpec_ != null + && searchAddonSpec_ + != com.google.cloud.discoveryengine.v1beta.SearchRequest.SearchAddonSpec + .getDefaultInstance()) { + getSearchAddonSpecBuilder().mergeFrom(value); + } else { + searchAddonSpec_ = value; + } + } else { + searchAddonSpecBuilder_.mergeFrom(value); + } + if (searchAddonSpec_ != null) { + bitField1_ |= 0x00000080; + onChanged(); + } + return this; + } + + /** * - * @param value The relevanceThreshold to set. - * @return This builder for chaining. + * + *
            +     * Optional. SearchAddonSpec is used to disable add-ons for search as per new
            +     * repricing model.
            +     * This field is only supported for search requests.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.SearchAddonSpec search_addon_spec = 62 [(.google.api.field_behavior) = OPTIONAL]; + * */ - public Builder setRelevanceThreshold( - com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceThreshold value) { - if (value == null) { - throw new NullPointerException(); + public Builder clearSearchAddonSpec() { + bitField1_ = (bitField1_ & ~0x00000080); + searchAddonSpec_ = null; + if (searchAddonSpecBuilder_ != null) { + searchAddonSpecBuilder_.dispose(); + searchAddonSpecBuilder_ = null; } - bitField0_ |= 0x80000000; - relevanceThreshold_ = value.getNumber(); onChanged(); return this; } @@ -41005,91 +53406,124 @@ public Builder setRelevanceThreshold( * * *
            -     * The relevance threshold of the search results.
            +     * Optional. SearchAddonSpec is used to disable add-ons for search as per new
            +     * repricing model.
            +     * This field is only supported for search requests.
            +     * 
            * - * Default to Google defined threshold, leveraging a balance of - * precision and recall to deliver both highly accurate results and - * comprehensive coverage of relevant information. + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.SearchAddonSpec search_addon_spec = 62 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.discoveryengine.v1beta.SearchRequest.SearchAddonSpec.Builder + getSearchAddonSpecBuilder() { + bitField1_ |= 0x00000080; + onChanged(); + return internalGetSearchAddonSpecFieldBuilder().getBuilder(); + } + + /** + * + * + *
            +     * Optional. SearchAddonSpec is used to disable add-ons for search as per new
            +     * repricing model.
            +     * This field is only supported for search requests.
                  * 
            * * - * .google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceThreshold relevance_threshold = 44; + * .google.cloud.discoveryengine.v1beta.SearchRequest.SearchAddonSpec search_addon_spec = 62 [(.google.api.field_behavior) = OPTIONAL]; * + */ + public com.google.cloud.discoveryengine.v1beta.SearchRequest.SearchAddonSpecOrBuilder + getSearchAddonSpecOrBuilder() { + if (searchAddonSpecBuilder_ != null) { + return searchAddonSpecBuilder_.getMessageOrBuilder(); + } else { + return searchAddonSpec_ == null + ? com.google.cloud.discoveryengine.v1beta.SearchRequest.SearchAddonSpec + .getDefaultInstance() + : searchAddonSpec_; + } + } + + /** * - * @return This builder for chaining. + * + *
            +     * Optional. SearchAddonSpec is used to disable add-ons for search as per new
            +     * repricing model.
            +     * This field is only supported for search requests.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.SearchAddonSpec search_addon_spec = 62 [(.google.api.field_behavior) = OPTIONAL]; + * */ - public Builder clearRelevanceThreshold() { - bitField0_ = (bitField0_ & ~0x80000000); - relevanceThreshold_ = 0; - onChanged(); - return this; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.SearchRequest.SearchAddonSpec, + com.google.cloud.discoveryengine.v1beta.SearchRequest.SearchAddonSpec.Builder, + com.google.cloud.discoveryengine.v1beta.SearchRequest.SearchAddonSpecOrBuilder> + internalGetSearchAddonSpecFieldBuilder() { + if (searchAddonSpecBuilder_ == null) { + searchAddonSpecBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.SearchRequest.SearchAddonSpec, + com.google.cloud.discoveryengine.v1beta.SearchRequest.SearchAddonSpec.Builder, + com.google.cloud.discoveryengine.v1beta.SearchRequest.SearchAddonSpecOrBuilder>( + getSearchAddonSpec(), getParentForChildren(), isClean()); + searchAddonSpec_ = null; + } + return searchAddonSpecBuilder_; } - private com.google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec - personalizationSpec_; + private com.google.cloud.discoveryengine.v1beta.SearchRequest.CustomRankingParams + customRankingParams_; private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec, - com.google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec.Builder, - com.google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpecOrBuilder> - personalizationSpecBuilder_; + com.google.cloud.discoveryengine.v1beta.SearchRequest.CustomRankingParams, + com.google.cloud.discoveryengine.v1beta.SearchRequest.CustomRankingParams.Builder, + com.google.cloud.discoveryengine.v1beta.SearchRequest.CustomRankingParamsOrBuilder> + customRankingParamsBuilder_; /** * * *
            -     * The specification for personalization.
            -     *
            -     * Notice that if both
            -     * [ServingConfig.personalization_spec][google.cloud.discoveryengine.v1beta.ServingConfig.personalization_spec]
            -     * and
            -     * [SearchRequest.personalization_spec][google.cloud.discoveryengine.v1beta.SearchRequest.personalization_spec]
            -     * are set,
            -     * [SearchRequest.personalization_spec][google.cloud.discoveryengine.v1beta.SearchRequest.personalization_spec]
            -     * overrides
            -     * [ServingConfig.personalization_spec][google.cloud.discoveryengine.v1beta.ServingConfig.personalization_spec].
            +     * Optional. Optional configuration for the Custom Ranking feature.
                  * 
            * * - * .google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec personalization_spec = 46; + * .google.cloud.discoveryengine.v1beta.SearchRequest.CustomRankingParams custom_ranking_params = 64 [(.google.api.field_behavior) = OPTIONAL]; * * - * @return Whether the personalizationSpec field is set. + * @return Whether the customRankingParams field is set. */ - public boolean hasPersonalizationSpec() { - return ((bitField1_ & 0x00000001) != 0); + public boolean hasCustomRankingParams() { + return ((bitField1_ & 0x00000100) != 0); } /** * * *
            -     * The specification for personalization.
            -     *
            -     * Notice that if both
            -     * [ServingConfig.personalization_spec][google.cloud.discoveryengine.v1beta.ServingConfig.personalization_spec]
            -     * and
            -     * [SearchRequest.personalization_spec][google.cloud.discoveryengine.v1beta.SearchRequest.personalization_spec]
            -     * are set,
            -     * [SearchRequest.personalization_spec][google.cloud.discoveryengine.v1beta.SearchRequest.personalization_spec]
            -     * overrides
            -     * [ServingConfig.personalization_spec][google.cloud.discoveryengine.v1beta.ServingConfig.personalization_spec].
            +     * Optional. Optional configuration for the Custom Ranking feature.
                  * 
            * * - * .google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec personalization_spec = 46; + * .google.cloud.discoveryengine.v1beta.SearchRequest.CustomRankingParams custom_ranking_params = 64 [(.google.api.field_behavior) = OPTIONAL]; * * - * @return The personalizationSpec. + * @return The customRankingParams. */ - public com.google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec - getPersonalizationSpec() { - if (personalizationSpecBuilder_ == null) { - return personalizationSpec_ == null - ? com.google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec + public com.google.cloud.discoveryengine.v1beta.SearchRequest.CustomRankingParams + getCustomRankingParams() { + if (customRankingParamsBuilder_ == null) { + return customRankingParams_ == null + ? com.google.cloud.discoveryengine.v1beta.SearchRequest.CustomRankingParams .getDefaultInstance() - : personalizationSpec_; + : customRankingParams_; } else { - return personalizationSpecBuilder_.getMessage(); + return customRankingParamsBuilder_.getMessage(); } } @@ -41097,33 +53531,24 @@ public boolean hasPersonalizationSpec() { * * *
            -     * The specification for personalization.
            -     *
            -     * Notice that if both
            -     * [ServingConfig.personalization_spec][google.cloud.discoveryengine.v1beta.ServingConfig.personalization_spec]
            -     * and
            -     * [SearchRequest.personalization_spec][google.cloud.discoveryengine.v1beta.SearchRequest.personalization_spec]
            -     * are set,
            -     * [SearchRequest.personalization_spec][google.cloud.discoveryengine.v1beta.SearchRequest.personalization_spec]
            -     * overrides
            -     * [ServingConfig.personalization_spec][google.cloud.discoveryengine.v1beta.ServingConfig.personalization_spec].
            +     * Optional. Optional configuration for the Custom Ranking feature.
                  * 
            * * - * .google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec personalization_spec = 46; + * .google.cloud.discoveryengine.v1beta.SearchRequest.CustomRankingParams custom_ranking_params = 64 [(.google.api.field_behavior) = OPTIONAL]; * */ - public Builder setPersonalizationSpec( - com.google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec value) { - if (personalizationSpecBuilder_ == null) { + public Builder setCustomRankingParams( + com.google.cloud.discoveryengine.v1beta.SearchRequest.CustomRankingParams value) { + if (customRankingParamsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - personalizationSpec_ = value; + customRankingParams_ = value; } else { - personalizationSpecBuilder_.setMessage(value); + customRankingParamsBuilder_.setMessage(value); } - bitField1_ |= 0x00000001; + bitField1_ |= 0x00000100; onChanged(); return this; } @@ -41132,31 +53557,22 @@ public Builder setPersonalizationSpec( * * *
            -     * The specification for personalization.
            -     *
            -     * Notice that if both
            -     * [ServingConfig.personalization_spec][google.cloud.discoveryengine.v1beta.ServingConfig.personalization_spec]
            -     * and
            -     * [SearchRequest.personalization_spec][google.cloud.discoveryengine.v1beta.SearchRequest.personalization_spec]
            -     * are set,
            -     * [SearchRequest.personalization_spec][google.cloud.discoveryengine.v1beta.SearchRequest.personalization_spec]
            -     * overrides
            -     * [ServingConfig.personalization_spec][google.cloud.discoveryengine.v1beta.ServingConfig.personalization_spec].
            +     * Optional. Optional configuration for the Custom Ranking feature.
                  * 
            * * - * .google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec personalization_spec = 46; + * .google.cloud.discoveryengine.v1beta.SearchRequest.CustomRankingParams custom_ranking_params = 64 [(.google.api.field_behavior) = OPTIONAL]; * */ - public Builder setPersonalizationSpec( - com.google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec.Builder + public Builder setCustomRankingParams( + com.google.cloud.discoveryengine.v1beta.SearchRequest.CustomRankingParams.Builder builderForValue) { - if (personalizationSpecBuilder_ == null) { - personalizationSpec_ = builderForValue.build(); + if (customRankingParamsBuilder_ == null) { + customRankingParams_ = builderForValue.build(); } else { - personalizationSpecBuilder_.setMessage(builderForValue.build()); + customRankingParamsBuilder_.setMessage(builderForValue.build()); } - bitField1_ |= 0x00000001; + bitField1_ |= 0x00000100; onChanged(); return this; } @@ -41165,39 +53581,30 @@ public Builder setPersonalizationSpec( * * *
            -     * The specification for personalization.
            -     *
            -     * Notice that if both
            -     * [ServingConfig.personalization_spec][google.cloud.discoveryengine.v1beta.ServingConfig.personalization_spec]
            -     * and
            -     * [SearchRequest.personalization_spec][google.cloud.discoveryengine.v1beta.SearchRequest.personalization_spec]
            -     * are set,
            -     * [SearchRequest.personalization_spec][google.cloud.discoveryengine.v1beta.SearchRequest.personalization_spec]
            -     * overrides
            -     * [ServingConfig.personalization_spec][google.cloud.discoveryengine.v1beta.ServingConfig.personalization_spec].
            +     * Optional. Optional configuration for the Custom Ranking feature.
                  * 
            * * - * .google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec personalization_spec = 46; + * .google.cloud.discoveryengine.v1beta.SearchRequest.CustomRankingParams custom_ranking_params = 64 [(.google.api.field_behavior) = OPTIONAL]; * */ - public Builder mergePersonalizationSpec( - com.google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec value) { - if (personalizationSpecBuilder_ == null) { - if (((bitField1_ & 0x00000001) != 0) - && personalizationSpec_ != null - && personalizationSpec_ - != com.google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec + public Builder mergeCustomRankingParams( + com.google.cloud.discoveryengine.v1beta.SearchRequest.CustomRankingParams value) { + if (customRankingParamsBuilder_ == null) { + if (((bitField1_ & 0x00000100) != 0) + && customRankingParams_ != null + && customRankingParams_ + != com.google.cloud.discoveryengine.v1beta.SearchRequest.CustomRankingParams .getDefaultInstance()) { - getPersonalizationSpecBuilder().mergeFrom(value); + getCustomRankingParamsBuilder().mergeFrom(value); } else { - personalizationSpec_ = value; + customRankingParams_ = value; } } else { - personalizationSpecBuilder_.mergeFrom(value); + customRankingParamsBuilder_.mergeFrom(value); } - if (personalizationSpec_ != null) { - bitField1_ |= 0x00000001; + if (customRankingParams_ != null) { + bitField1_ |= 0x00000100; onChanged(); } return this; @@ -41207,28 +53614,19 @@ public Builder mergePersonalizationSpec( * * *
            -     * The specification for personalization.
            -     *
            -     * Notice that if both
            -     * [ServingConfig.personalization_spec][google.cloud.discoveryengine.v1beta.ServingConfig.personalization_spec]
            -     * and
            -     * [SearchRequest.personalization_spec][google.cloud.discoveryengine.v1beta.SearchRequest.personalization_spec]
            -     * are set,
            -     * [SearchRequest.personalization_spec][google.cloud.discoveryengine.v1beta.SearchRequest.personalization_spec]
            -     * overrides
            -     * [ServingConfig.personalization_spec][google.cloud.discoveryengine.v1beta.ServingConfig.personalization_spec].
            +     * Optional. Optional configuration for the Custom Ranking feature.
                  * 
            * * - * .google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec personalization_spec = 46; + * .google.cloud.discoveryengine.v1beta.SearchRequest.CustomRankingParams custom_ranking_params = 64 [(.google.api.field_behavior) = OPTIONAL]; * */ - public Builder clearPersonalizationSpec() { - bitField1_ = (bitField1_ & ~0x00000001); - personalizationSpec_ = null; - if (personalizationSpecBuilder_ != null) { - personalizationSpecBuilder_.dispose(); - personalizationSpecBuilder_ = null; + public Builder clearCustomRankingParams() { + bitField1_ = (bitField1_ & ~0x00000100); + customRankingParams_ = null; + if (customRankingParamsBuilder_ != null) { + customRankingParamsBuilder_.dispose(); + customRankingParamsBuilder_ = null; } onChanged(); return this; @@ -41238,58 +53636,40 @@ public Builder clearPersonalizationSpec() { * * *
            -     * The specification for personalization.
            -     *
            -     * Notice that if both
            -     * [ServingConfig.personalization_spec][google.cloud.discoveryengine.v1beta.ServingConfig.personalization_spec]
            -     * and
            -     * [SearchRequest.personalization_spec][google.cloud.discoveryengine.v1beta.SearchRequest.personalization_spec]
            -     * are set,
            -     * [SearchRequest.personalization_spec][google.cloud.discoveryengine.v1beta.SearchRequest.personalization_spec]
            -     * overrides
            -     * [ServingConfig.personalization_spec][google.cloud.discoveryengine.v1beta.ServingConfig.personalization_spec].
            +     * Optional. Optional configuration for the Custom Ranking feature.
                  * 
            * * - * .google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec personalization_spec = 46; + * .google.cloud.discoveryengine.v1beta.SearchRequest.CustomRankingParams custom_ranking_params = 64 [(.google.api.field_behavior) = OPTIONAL]; * */ - public com.google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec.Builder - getPersonalizationSpecBuilder() { - bitField1_ |= 0x00000001; + public com.google.cloud.discoveryengine.v1beta.SearchRequest.CustomRankingParams.Builder + getCustomRankingParamsBuilder() { + bitField1_ |= 0x00000100; onChanged(); - return internalGetPersonalizationSpecFieldBuilder().getBuilder(); + return internalGetCustomRankingParamsFieldBuilder().getBuilder(); } /** * * *
            -     * The specification for personalization.
            -     *
            -     * Notice that if both
            -     * [ServingConfig.personalization_spec][google.cloud.discoveryengine.v1beta.ServingConfig.personalization_spec]
            -     * and
            -     * [SearchRequest.personalization_spec][google.cloud.discoveryengine.v1beta.SearchRequest.personalization_spec]
            -     * are set,
            -     * [SearchRequest.personalization_spec][google.cloud.discoveryengine.v1beta.SearchRequest.personalization_spec]
            -     * overrides
            -     * [ServingConfig.personalization_spec][google.cloud.discoveryengine.v1beta.ServingConfig.personalization_spec].
            +     * Optional. Optional configuration for the Custom Ranking feature.
                  * 
            * * - * .google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec personalization_spec = 46; + * .google.cloud.discoveryengine.v1beta.SearchRequest.CustomRankingParams custom_ranking_params = 64 [(.google.api.field_behavior) = OPTIONAL]; * */ - public com.google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpecOrBuilder - getPersonalizationSpecOrBuilder() { - if (personalizationSpecBuilder_ != null) { - return personalizationSpecBuilder_.getMessageOrBuilder(); + public com.google.cloud.discoveryengine.v1beta.SearchRequest.CustomRankingParamsOrBuilder + getCustomRankingParamsOrBuilder() { + if (customRankingParamsBuilder_ != null) { + return customRankingParamsBuilder_.getMessageOrBuilder(); } else { - return personalizationSpec_ == null - ? com.google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec + return customRankingParams_ == null + ? com.google.cloud.discoveryengine.v1beta.SearchRequest.CustomRankingParams .getDefaultInstance() - : personalizationSpec_; + : customRankingParams_; } } @@ -41297,37 +53677,164 @@ public Builder clearPersonalizationSpec() { * * *
            -     * The specification for personalization.
            -     *
            -     * Notice that if both
            -     * [ServingConfig.personalization_spec][google.cloud.discoveryengine.v1beta.ServingConfig.personalization_spec]
            -     * and
            -     * [SearchRequest.personalization_spec][google.cloud.discoveryengine.v1beta.SearchRequest.personalization_spec]
            -     * are set,
            -     * [SearchRequest.personalization_spec][google.cloud.discoveryengine.v1beta.SearchRequest.personalization_spec]
            -     * overrides
            -     * [ServingConfig.personalization_spec][google.cloud.discoveryengine.v1beta.ServingConfig.personalization_spec].
            +     * Optional. Optional configuration for the Custom Ranking feature.
                  * 
            * * - * .google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec personalization_spec = 46; + * .google.cloud.discoveryengine.v1beta.SearchRequest.CustomRankingParams custom_ranking_params = 64 [(.google.api.field_behavior) = OPTIONAL]; * */ private com.google.protobuf.SingleFieldBuilder< - com.google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec, - com.google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec.Builder, - com.google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpecOrBuilder> - internalGetPersonalizationSpecFieldBuilder() { - if (personalizationSpecBuilder_ == null) { - personalizationSpecBuilder_ = + com.google.cloud.discoveryengine.v1beta.SearchRequest.CustomRankingParams, + com.google.cloud.discoveryengine.v1beta.SearchRequest.CustomRankingParams.Builder, + com.google.cloud.discoveryengine.v1beta.SearchRequest.CustomRankingParamsOrBuilder> + internalGetCustomRankingParamsFieldBuilder() { + if (customRankingParamsBuilder_ == null) { + customRankingParamsBuilder_ = new com.google.protobuf.SingleFieldBuilder< - com.google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec, - com.google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec.Builder, - com.google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpecOrBuilder>( - getPersonalizationSpec(), getParentForChildren(), isClean()); - personalizationSpec_ = null; + com.google.cloud.discoveryengine.v1beta.SearchRequest.CustomRankingParams, + com.google.cloud.discoveryengine.v1beta.SearchRequest.CustomRankingParams.Builder, + com.google.cloud.discoveryengine.v1beta.SearchRequest.CustomRankingParamsOrBuilder>( + getCustomRankingParams(), getParentForChildren(), isClean()); + customRankingParams_ = null; } - return personalizationSpecBuilder_; + return customRankingParamsBuilder_; + } + + private java.lang.Object entity_ = ""; + + /** + * + * + *
            +     * Optional. The entity for customers that may run multiple different
            +     * entities, domains, sites or regions, for example, "Google US", "Google
            +     * Ads", "Waymo", "google.com", "youtube.com", etc. If this is set, it should
            +     * be exactly matched with
            +     * [UserEvent.entity][google.cloud.discoveryengine.v1beta.UserEvent.entity] to
            +     * get search results boosted by entity.
            +     * 
            + * + * string entity = 66 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The entity. + */ + public java.lang.String getEntity() { + java.lang.Object ref = entity_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + entity_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
            +     * Optional. The entity for customers that may run multiple different
            +     * entities, domains, sites or regions, for example, "Google US", "Google
            +     * Ads", "Waymo", "google.com", "youtube.com", etc. If this is set, it should
            +     * be exactly matched with
            +     * [UserEvent.entity][google.cloud.discoveryengine.v1beta.UserEvent.entity] to
            +     * get search results boosted by entity.
            +     * 
            + * + * string entity = 66 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for entity. + */ + public com.google.protobuf.ByteString getEntityBytes() { + java.lang.Object ref = entity_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + entity_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
            +     * Optional. The entity for customers that may run multiple different
            +     * entities, domains, sites or regions, for example, "Google US", "Google
            +     * Ads", "Waymo", "google.com", "youtube.com", etc. If this is set, it should
            +     * be exactly matched with
            +     * [UserEvent.entity][google.cloud.discoveryengine.v1beta.UserEvent.entity] to
            +     * get search results boosted by entity.
            +     * 
            + * + * string entity = 66 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The entity to set. + * @return This builder for chaining. + */ + public Builder setEntity(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + entity_ = value; + bitField1_ |= 0x00000200; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Optional. The entity for customers that may run multiple different
            +     * entities, domains, sites or regions, for example, "Google US", "Google
            +     * Ads", "Waymo", "google.com", "youtube.com", etc. If this is set, it should
            +     * be exactly matched with
            +     * [UserEvent.entity][google.cloud.discoveryengine.v1beta.UserEvent.entity] to
            +     * get search results boosted by entity.
            +     * 
            + * + * string entity = 66 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearEntity() { + entity_ = getDefaultInstance().getEntity(); + bitField1_ = (bitField1_ & ~0x00000200); + onChanged(); + return this; + } + + /** + * + * + *
            +     * Optional. The entity for customers that may run multiple different
            +     * entities, domains, sites or regions, for example, "Google US", "Google
            +     * Ads", "Waymo", "google.com", "youtube.com", etc. If this is set, it should
            +     * be exactly matched with
            +     * [UserEvent.entity][google.cloud.discoveryengine.v1beta.UserEvent.entity] to
            +     * get search results boosted by entity.
            +     * 
            + * + * string entity = 66 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for entity to set. + * @return This builder for chaining. + */ + public Builder setEntityBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + entity_ = value; + bitField1_ |= 0x00000200; + onChanged(); + return this; } // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.SearchRequest) diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/SearchRequestOrBuilder.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/SearchRequestOrBuilder.java index 26f2ae05760b..c1cb864da016 100644 --- a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/SearchRequestOrBuilder.java +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/SearchRequestOrBuilder.java @@ -126,6 +126,124 @@ public interface SearchRequestOrBuilder */ com.google.protobuf.ByteString getQueryBytes(); + /** + * + * + *
            +   * Optional. The categories associated with a category page. Must be set for
            +   * category navigation queries to achieve good search quality. The format
            +   * should be the same as
            +   * [PageInfo.page_category][google.cloud.discoveryengine.v1beta.PageInfo.page_category].
            +   * This field is the equivalent of the query for browse (navigation) queries.
            +   * It's used by the browse model when the query is empty.
            +   *
            +   * If the field is empty, it will not be used by the browse model.
            +   * If the field contains more than one element, only the first element will
            +   * be used.
            +   *
            +   * To represent full path of a category, use '>' character to separate
            +   * different hierarchies. If '>' is part of the category name, replace it with
            +   * other character(s).
            +   * For example, `Graphics Cards > RTX>4090 > Founders Edition` where "RTX >
            +   * 4090" represents one level, can be rewritten as `Graphics Cards > RTX_4090
            +   * > Founders Edition`
            +   * 
            + * + * repeated string page_categories = 63 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the pageCategories. + */ + java.util.List getPageCategoriesList(); + + /** + * + * + *
            +   * Optional. The categories associated with a category page. Must be set for
            +   * category navigation queries to achieve good search quality. The format
            +   * should be the same as
            +   * [PageInfo.page_category][google.cloud.discoveryengine.v1beta.PageInfo.page_category].
            +   * This field is the equivalent of the query for browse (navigation) queries.
            +   * It's used by the browse model when the query is empty.
            +   *
            +   * If the field is empty, it will not be used by the browse model.
            +   * If the field contains more than one element, only the first element will
            +   * be used.
            +   *
            +   * To represent full path of a category, use '>' character to separate
            +   * different hierarchies. If '>' is part of the category name, replace it with
            +   * other character(s).
            +   * For example, `Graphics Cards > RTX>4090 > Founders Edition` where "RTX >
            +   * 4090" represents one level, can be rewritten as `Graphics Cards > RTX_4090
            +   * > Founders Edition`
            +   * 
            + * + * repeated string page_categories = 63 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of pageCategories. + */ + int getPageCategoriesCount(); + + /** + * + * + *
            +   * Optional. The categories associated with a category page. Must be set for
            +   * category navigation queries to achieve good search quality. The format
            +   * should be the same as
            +   * [PageInfo.page_category][google.cloud.discoveryengine.v1beta.PageInfo.page_category].
            +   * This field is the equivalent of the query for browse (navigation) queries.
            +   * It's used by the browse model when the query is empty.
            +   *
            +   * If the field is empty, it will not be used by the browse model.
            +   * If the field contains more than one element, only the first element will
            +   * be used.
            +   *
            +   * To represent full path of a category, use '>' character to separate
            +   * different hierarchies. If '>' is part of the category name, replace it with
            +   * other character(s).
            +   * For example, `Graphics Cards > RTX>4090 > Founders Edition` where "RTX >
            +   * 4090" represents one level, can be rewritten as `Graphics Cards > RTX_4090
            +   * > Founders Edition`
            +   * 
            + * + * repeated string page_categories = 63 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The pageCategories at the given index. + */ + java.lang.String getPageCategories(int index); + + /** + * + * + *
            +   * Optional. The categories associated with a category page. Must be set for
            +   * category navigation queries to achieve good search quality. The format
            +   * should be the same as
            +   * [PageInfo.page_category][google.cloud.discoveryengine.v1beta.PageInfo.page_category].
            +   * This field is the equivalent of the query for browse (navigation) queries.
            +   * It's used by the browse model when the query is empty.
            +   *
            +   * If the field is empty, it will not be used by the browse model.
            +   * If the field contains more than one element, only the first element will
            +   * be used.
            +   *
            +   * To represent full path of a category, use '>' character to separate
            +   * different hierarchies. If '>' is part of the category name, replace it with
            +   * other character(s).
            +   * For example, `Graphics Cards > RTX>4090 > Founders Edition` where "RTX >
            +   * 4090" represents one level, can be rewritten as `Graphics Cards > RTX_4090
            +   * > Founders Edition`
            +   * 
            + * + * repeated string page_categories = 63 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the pageCategories at the given index. + */ + com.google.protobuf.ByteString getPageCategoriesBytes(int index); + /** * * @@ -237,6 +355,8 @@ public interface SearchRequestOrBuilder * is unset. * * If this field is negative, an `INVALID_ARGUMENT` is returned. + * + * A large offset may be capped to a reasonable threshold. *
            * * int32 offset = 6; @@ -264,10 +384,13 @@ public interface SearchRequestOrBuilder * * *
            -   * Specs defining dataStores to filter on in a search call and configurations
            -   * for those dataStores. This is only considered for engines with multiple
            -   * dataStores use case. For single dataStore within an engine, they should
            -   * use the specs at the top level.
            +   * Specifications that define the specific
            +   * [DataStore][google.cloud.discoveryengine.v1beta.DataStore]s to be searched,
            +   * along with configurations for those data stores. This is only considered
            +   * for [Engine][google.cloud.discoveryengine.v1beta.Engine]s with multiple
            +   * data stores. For engines with a single data store, the specs directly under
            +   * [SearchRequest][google.cloud.discoveryengine.v1beta.SearchRequest] should
            +   * be used.
                * 
            * * @@ -281,10 +404,13 @@ public interface SearchRequestOrBuilder * * *
            -   * Specs defining dataStores to filter on in a search call and configurations
            -   * for those dataStores. This is only considered for engines with multiple
            -   * dataStores use case. For single dataStore within an engine, they should
            -   * use the specs at the top level.
            +   * Specifications that define the specific
            +   * [DataStore][google.cloud.discoveryengine.v1beta.DataStore]s to be searched,
            +   * along with configurations for those data stores. This is only considered
            +   * for [Engine][google.cloud.discoveryengine.v1beta.Engine]s with multiple
            +   * data stores. For engines with a single data store, the specs directly under
            +   * [SearchRequest][google.cloud.discoveryengine.v1beta.SearchRequest] should
            +   * be used.
                * 
            * * @@ -297,10 +423,13 @@ public interface SearchRequestOrBuilder * * *
            -   * Specs defining dataStores to filter on in a search call and configurations
            -   * for those dataStores. This is only considered for engines with multiple
            -   * dataStores use case. For single dataStore within an engine, they should
            -   * use the specs at the top level.
            +   * Specifications that define the specific
            +   * [DataStore][google.cloud.discoveryengine.v1beta.DataStore]s to be searched,
            +   * along with configurations for those data stores. This is only considered
            +   * for [Engine][google.cloud.discoveryengine.v1beta.Engine]s with multiple
            +   * data stores. For engines with a single data store, the specs directly under
            +   * [SearchRequest][google.cloud.discoveryengine.v1beta.SearchRequest] should
            +   * be used.
                * 
            * * @@ -313,10 +442,13 @@ public interface SearchRequestOrBuilder * * *
            -   * Specs defining dataStores to filter on in a search call and configurations
            -   * for those dataStores. This is only considered for engines with multiple
            -   * dataStores use case. For single dataStore within an engine, they should
            -   * use the specs at the top level.
            +   * Specifications that define the specific
            +   * [DataStore][google.cloud.discoveryengine.v1beta.DataStore]s to be searched,
            +   * along with configurations for those data stores. This is only considered
            +   * for [Engine][google.cloud.discoveryengine.v1beta.Engine]s with multiple
            +   * data stores. For engines with a single data store, the specs directly under
            +   * [SearchRequest][google.cloud.discoveryengine.v1beta.SearchRequest] should
            +   * be used.
                * 
            * * @@ -331,10 +463,13 @@ public interface SearchRequestOrBuilder * * *
            -   * Specs defining dataStores to filter on in a search call and configurations
            -   * for those dataStores. This is only considered for engines with multiple
            -   * dataStores use case. For single dataStore within an engine, they should
            -   * use the specs at the top level.
            +   * Specifications that define the specific
            +   * [DataStore][google.cloud.discoveryengine.v1beta.DataStore]s to be searched,
            +   * along with configurations for those data stores. This is only considered
            +   * for [Engine][google.cloud.discoveryengine.v1beta.Engine]s with multiple
            +   * data stores. For engines with a single data store, the specs directly under
            +   * [SearchRequest][google.cloud.discoveryengine.v1beta.SearchRequest] should
            +   * be used.
                * 
            * * @@ -344,6 +479,22 @@ public interface SearchRequestOrBuilder com.google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpecOrBuilder getDataStoreSpecsOrBuilder(int index); + /** + * + * + *
            +   * Optional. The maximum number of results to retrieve from each data store.
            +   * If not specified, it will use the
            +   * [SearchRequest.DataStoreSpec.num_results][google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec.num_results]
            +   * if provided, otherwise there is no limit.
            +   * 
            + * + * int32 num_results_per_data_store = 65 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The numResultsPerDataStore. + */ + int getNumResultsPerDataStore(); + /** * * @@ -499,7 +650,7 @@ public interface SearchRequestOrBuilder * *
                * Information about the end user.
            -   * Highly recommended for analytics.
            +   * Highly recommended for analytics and personalization.
                * [UserInfo.user_agent][google.cloud.discoveryengine.v1beta.UserInfo.user_agent]
                * is used to deduce `device_type` for analytics.
                * 
            @@ -515,7 +666,7 @@ public interface SearchRequestOrBuilder * *
                * Information about the end user.
            -   * Highly recommended for analytics.
            +   * Highly recommended for analytics and personalization.
                * [UserInfo.user_agent][google.cloud.discoveryengine.v1beta.UserInfo.user_agent]
                * is used to deduce `device_type` for analytics.
                * 
            @@ -531,7 +682,7 @@ public interface SearchRequestOrBuilder * *
                * Information about the end user.
            -   * Highly recommended for analytics.
            +   * Highly recommended for analytics and personalization.
                * [UserInfo.user_agent][google.cloud.discoveryengine.v1beta.UserInfo.user_agent]
                * is used to deduce `device_type` for analytics.
                * 
            @@ -959,10 +1110,10 @@ com.google.protobuf.Value getParamsOrDefault( * * *
            -   * A unique identifier for tracking visitors. For example, this could be
            -   * implemented with an HTTP cookie, which should be able to uniquely identify
            -   * a visitor on a single device. This unique identifier should not change if
            -   * the visitor logs in or out of the website.
            +   * Optional. A unique identifier for tracking visitors. For example, this
            +   * could be implemented with an HTTP cookie, which should be able to uniquely
            +   * identify a visitor on a single device. This unique identifier should not
            +   * change if the visitor logs in or out of the website.
                *
                * This field should NOT have a fixed value such as `unknown_visitor`.
                *
            @@ -975,7 +1126,7 @@ com.google.protobuf.Value getParamsOrDefault(
                * characters. Otherwise, an  `INVALID_ARGUMENT`  error is returned.
                * 
            * - * string user_pseudo_id = 15; + * string user_pseudo_id = 15 [(.google.api.field_behavior) = OPTIONAL]; * * @return The userPseudoId. */ @@ -985,10 +1136,10 @@ com.google.protobuf.Value getParamsOrDefault( * * *
            -   * A unique identifier for tracking visitors. For example, this could be
            -   * implemented with an HTTP cookie, which should be able to uniquely identify
            -   * a visitor on a single device. This unique identifier should not change if
            -   * the visitor logs in or out of the website.
            +   * Optional. A unique identifier for tracking visitors. For example, this
            +   * could be implemented with an HTTP cookie, which should be able to uniquely
            +   * identify a visitor on a single device. This unique identifier should not
            +   * change if the visitor logs in or out of the website.
                *
                * This field should NOT have a fixed value such as `unknown_visitor`.
                *
            @@ -1001,7 +1152,7 @@ com.google.protobuf.Value getParamsOrDefault(
                * characters. Otherwise, an  `INVALID_ARGUMENT`  error is returned.
                * 
            * - * string user_pseudo_id = 15; + * string user_pseudo_id = 15 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for userPseudoId. */ @@ -1123,8 +1274,8 @@ com.google.protobuf.Value getParamsOrDefault( * * *
            -   * The ranking expression controls the customized ranking on retrieval
            -   * documents. This overrides
            +   * Optional. The ranking expression controls the customized ranking on
            +   * retrieval documents. This overrides
                * [ServingConfig.ranking_expression][google.cloud.discoveryengine.v1beta.ServingConfig.ranking_expression].
                * The syntax and supported features depend on the
                * `ranking_expression_backend` value. If `ranking_expression_backend` is not
            @@ -1213,9 +1364,18 @@ com.google.protobuf.Value getParamsOrDefault(
                * Google model to determine the keyword-based overlap between the query and
                * the document.
                * * `base_rank`: the default rank of the result
            +   * * `media_actor_match`: whether the media actor matches the query
            +   * * `media_director_match`: whether the media director matches the query
            +   * * `media_genre_match`: whether the media genre matches the query
            +   * * `media_language_match`: whether the media language matches the query
            +   * * `media_title_match`: whether the media title matches the query
            +   * * `media_prefix_similarity_rank`: prefix similarity rank for media
            +   * results
            +   * * `media_semantic_similarity_rank`: semantic similarity rank for media
            +   * results
                * 
            * - * string ranking_expression = 26; + * string ranking_expression = 26 [(.google.api.field_behavior) = OPTIONAL]; * * @return The rankingExpression. */ @@ -1225,8 +1385,8 @@ com.google.protobuf.Value getParamsOrDefault( * * *
            -   * The ranking expression controls the customized ranking on retrieval
            -   * documents. This overrides
            +   * Optional. The ranking expression controls the customized ranking on
            +   * retrieval documents. This overrides
                * [ServingConfig.ranking_expression][google.cloud.discoveryengine.v1beta.ServingConfig.ranking_expression].
                * The syntax and supported features depend on the
                * `ranking_expression_backend` value. If `ranking_expression_backend` is not
            @@ -1315,9 +1475,18 @@ com.google.protobuf.Value getParamsOrDefault(
                * Google model to determine the keyword-based overlap between the query and
                * the document.
                * * `base_rank`: the default rank of the result
            +   * * `media_actor_match`: whether the media actor matches the query
            +   * * `media_director_match`: whether the media director matches the query
            +   * * `media_genre_match`: whether the media genre matches the query
            +   * * `media_language_match`: whether the media language matches the query
            +   * * `media_title_match`: whether the media title matches the query
            +   * * `media_prefix_similarity_rank`: prefix similarity rank for media
            +   * results
            +   * * `media_semantic_similarity_rank`: semantic similarity rank for media
            +   * results
                * 
            * - * string ranking_expression = 26; + * string ranking_expression = 26 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for rankingExpression. */ @@ -1327,7 +1496,7 @@ com.google.protobuf.Value getParamsOrDefault( * * *
            -   * The backend to use for the ranking expression evaluation.
            +   * Optional. The backend to use for the ranking expression evaluation.
                * 
            * * @@ -1342,7 +1511,7 @@ com.google.protobuf.Value getParamsOrDefault( * * *
            -   * The backend to use for the ranking expression evaluation.
            +   * Optional. The backend to use for the ranking expression evaluation.
                * 
            * * @@ -1515,12 +1684,16 @@ java.lang.String getUserLabelsOrDefault( * * *
            +   * Optional. Config for natural language query understanding capabilities,
            +   * such as extracting structured field filters from the query. Refer to [this
            +   * documentation](https://cloud.google.com/generative-ai-app-builder/docs/natural-language-queries)
            +   * for more information.
                * If `naturalLanguageQueryUnderstandingSpec` is not specified, no additional
                * natural language query understanding will be done.
                * 
            * * - * .google.cloud.discoveryengine.v1beta.SearchRequest.NaturalLanguageQueryUnderstandingSpec natural_language_query_understanding_spec = 28; + * .google.cloud.discoveryengine.v1beta.SearchRequest.NaturalLanguageQueryUnderstandingSpec natural_language_query_understanding_spec = 28 [(.google.api.field_behavior) = OPTIONAL]; * * * @return Whether the naturalLanguageQueryUnderstandingSpec field is set. @@ -1531,12 +1704,16 @@ java.lang.String getUserLabelsOrDefault( * * *
            +   * Optional. Config for natural language query understanding capabilities,
            +   * such as extracting structured field filters from the query. Refer to [this
            +   * documentation](https://cloud.google.com/generative-ai-app-builder/docs/natural-language-queries)
            +   * for more information.
                * If `naturalLanguageQueryUnderstandingSpec` is not specified, no additional
                * natural language query understanding will be done.
                * 
            * * - * .google.cloud.discoveryengine.v1beta.SearchRequest.NaturalLanguageQueryUnderstandingSpec natural_language_query_understanding_spec = 28; + * .google.cloud.discoveryengine.v1beta.SearchRequest.NaturalLanguageQueryUnderstandingSpec natural_language_query_understanding_spec = 28 [(.google.api.field_behavior) = OPTIONAL]; * * * @return The naturalLanguageQueryUnderstandingSpec. @@ -1548,12 +1725,16 @@ java.lang.String getUserLabelsOrDefault( * * *
            +   * Optional. Config for natural language query understanding capabilities,
            +   * such as extracting structured field filters from the query. Refer to [this
            +   * documentation](https://cloud.google.com/generative-ai-app-builder/docs/natural-language-queries)
            +   * for more information.
                * If `naturalLanguageQueryUnderstandingSpec` is not specified, no additional
                * natural language query understanding will be done.
                * 
            * * - * .google.cloud.discoveryengine.v1beta.SearchRequest.NaturalLanguageQueryUnderstandingSpec natural_language_query_understanding_spec = 28; + * .google.cloud.discoveryengine.v1beta.SearchRequest.NaturalLanguageQueryUnderstandingSpec natural_language_query_understanding_spec = 28 [(.google.api.field_behavior) = OPTIONAL]; * */ com.google.cloud.discoveryengine.v1beta.SearchRequest @@ -1611,6 +1792,162 @@ java.lang.String getUserLabelsOrDefault( com.google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpecOrBuilder getSearchAsYouTypeSpecOrBuilder(); + /** + * + * + *
            +   * Optional. Config for display feature, like match highlighting on search
            +   * results.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.DisplaySpec display_spec = 38 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the displaySpec field is set. + */ + boolean hasDisplaySpec(); + + /** + * + * + *
            +   * Optional. Config for display feature, like match highlighting on search
            +   * results.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.DisplaySpec display_spec = 38 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The displaySpec. + */ + com.google.cloud.discoveryengine.v1beta.SearchRequest.DisplaySpec getDisplaySpec(); + + /** + * + * + *
            +   * Optional. Config for display feature, like match highlighting on search
            +   * results.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.DisplaySpec display_spec = 38 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.discoveryengine.v1beta.SearchRequest.DisplaySpecOrBuilder + getDisplaySpecOrBuilder(); + + /** + * + * + *
            +   * Optional. Crowding specifications for improving result diversity.
            +   * If multiple CrowdingSpecs are specified, crowding will be evaluated on
            +   * each unique combination of the `field` values, and max_count will be the
            +   * maximum value of `max_count` across all CrowdingSpecs.
            +   * For example, if the first CrowdingSpec has `field` = "color" and
            +   * `max_count` = 3, and the second CrowdingSpec has `field` = "size" and
            +   * `max_count` = 2, then after 3 documents that share the same color AND size
            +   * have been returned, subsequent ones should be
            +   * removed or demoted.
            +   * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.CrowdingSpec crowding_specs = 40 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List + getCrowdingSpecsList(); + + /** + * + * + *
            +   * Optional. Crowding specifications for improving result diversity.
            +   * If multiple CrowdingSpecs are specified, crowding will be evaluated on
            +   * each unique combination of the `field` values, and max_count will be the
            +   * maximum value of `max_count` across all CrowdingSpecs.
            +   * For example, if the first CrowdingSpec has `field` = "color" and
            +   * `max_count` = 3, and the second CrowdingSpec has `field` = "size" and
            +   * `max_count` = 2, then after 3 documents that share the same color AND size
            +   * have been returned, subsequent ones should be
            +   * removed or demoted.
            +   * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.CrowdingSpec crowding_specs = 40 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.discoveryengine.v1beta.SearchRequest.CrowdingSpec getCrowdingSpecs(int index); + + /** + * + * + *
            +   * Optional. Crowding specifications for improving result diversity.
            +   * If multiple CrowdingSpecs are specified, crowding will be evaluated on
            +   * each unique combination of the `field` values, and max_count will be the
            +   * maximum value of `max_count` across all CrowdingSpecs.
            +   * For example, if the first CrowdingSpec has `field` = "color" and
            +   * `max_count` = 3, and the second CrowdingSpec has `field` = "size" and
            +   * `max_count` = 2, then after 3 documents that share the same color AND size
            +   * have been returned, subsequent ones should be
            +   * removed or demoted.
            +   * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.CrowdingSpec crowding_specs = 40 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + int getCrowdingSpecsCount(); + + /** + * + * + *
            +   * Optional. Crowding specifications for improving result diversity.
            +   * If multiple CrowdingSpecs are specified, crowding will be evaluated on
            +   * each unique combination of the `field` values, and max_count will be the
            +   * maximum value of `max_count` across all CrowdingSpecs.
            +   * For example, if the first CrowdingSpec has `field` = "color" and
            +   * `max_count` = 3, and the second CrowdingSpec has `field` = "size" and
            +   * `max_count` = 2, then after 3 documents that share the same color AND size
            +   * have been returned, subsequent ones should be
            +   * removed or demoted.
            +   * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.CrowdingSpec crowding_specs = 40 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List< + ? extends com.google.cloud.discoveryengine.v1beta.SearchRequest.CrowdingSpecOrBuilder> + getCrowdingSpecsOrBuilderList(); + + /** + * + * + *
            +   * Optional. Crowding specifications for improving result diversity.
            +   * If multiple CrowdingSpecs are specified, crowding will be evaluated on
            +   * each unique combination of the `field` values, and max_count will be the
            +   * maximum value of `max_count` across all CrowdingSpecs.
            +   * For example, if the first CrowdingSpec has `field` = "color" and
            +   * `max_count` = 3, and the second CrowdingSpec has `field` = "size" and
            +   * `max_count` = 2, then after 3 documents that share the same color AND size
            +   * have been returned, subsequent ones should be
            +   * removed or demoted.
            +   * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.CrowdingSpec crowding_specs = 40 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.discoveryengine.v1beta.SearchRequest.CrowdingSpecOrBuilder + getCrowdingSpecsOrBuilder(int index); + /** * * @@ -1631,10 +1968,6 @@ java.lang.String getUserLabelsOrDefault( * Call /answer API with the session ID generated in the first call. * Here, the answer generation happens in the context of the search * results from the first search call. - * - * Multi-turn Search feature is currently at private GA stage. Please use - * v1alpha or v1beta version instead before we launch this feature to public - * GA. Or ask for allowlisting through Google Support team. *
            * * string session = 41 [(.google.api.resource_reference) = { ... } @@ -1663,10 +1996,6 @@ java.lang.String getUserLabelsOrDefault( * Call /answer API with the session ID generated in the first call. * Here, the answer generation happens in the context of the search * results from the first search call. - * - * Multi-turn Search feature is currently at private GA stage. Please use - * v1alpha or v1beta version instead before we launch this feature to public - * GA. Or ask for allowlisting through Google Support team. *
            * * string session = 41 [(.google.api.resource_reference) = { ... } @@ -1723,11 +2052,16 @@ java.lang.String getUserLabelsOrDefault( * * *
            -   * The relevance threshold of the search results.
            +   * The global relevance threshold of the search results.
                *
            -   * Default to Google defined threshold, leveraging a balance of
            +   * Defaults to Google defined threshold, leveraging a balance of
                * precision and recall to deliver both highly accurate results and
                * comprehensive coverage of relevant information.
            +   *
            +   * If more granular relevance filtering is required, use the
            +   * `relevance_filter_spec` instead.
            +   *
            +   * This feature is not supported for healthcare search.
                * 
            * * @@ -1742,11 +2076,16 @@ java.lang.String getUserLabelsOrDefault( * * *
            -   * The relevance threshold of the search results.
            +   * The global relevance threshold of the search results.
                *
            -   * Default to Google defined threshold, leveraging a balance of
            +   * Defaults to Google defined threshold, leveraging a balance of
                * precision and recall to deliver both highly accurate results and
                * comprehensive coverage of relevant information.
            +   *
            +   * If more granular relevance filtering is required, use the
            +   * `relevance_filter_spec` instead.
            +   *
            +   * This feature is not supported for healthcare search.
                * 
            * * @@ -1757,6 +2096,69 @@ java.lang.String getUserLabelsOrDefault( */ com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceThreshold getRelevanceThreshold(); + /** + * + * + *
            +   * Optional. The granular relevance filtering specification.
            +   *
            +   * If not specified, the global `relevance_threshold` will be used for all
            +   * sub-searches. If specified, this overrides the global
            +   * `relevance_threshold` to use thresholds on a per sub-search basis.
            +   *
            +   * This feature is currently supported only for custom and site search.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceFilterSpec relevance_filter_spec = 86 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the relevanceFilterSpec field is set. + */ + boolean hasRelevanceFilterSpec(); + + /** + * + * + *
            +   * Optional. The granular relevance filtering specification.
            +   *
            +   * If not specified, the global `relevance_threshold` will be used for all
            +   * sub-searches. If specified, this overrides the global
            +   * `relevance_threshold` to use thresholds on a per sub-search basis.
            +   *
            +   * This feature is currently supported only for custom and site search.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceFilterSpec relevance_filter_spec = 86 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The relevanceFilterSpec. + */ + com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceFilterSpec + getRelevanceFilterSpec(); + + /** + * + * + *
            +   * Optional. The granular relevance filtering specification.
            +   *
            +   * If not specified, the global `relevance_threshold` will be used for all
            +   * sub-searches. If specified, this overrides the global
            +   * `relevance_threshold` to use thresholds on a per sub-search basis.
            +   *
            +   * This feature is currently supported only for custom and site search.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceFilterSpec relevance_filter_spec = 86 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceFilterSpecOrBuilder + getRelevanceFilterSpecOrBuilder(); + /** * * @@ -1828,4 +2230,179 @@ java.lang.String getUserLabelsOrDefault( */ com.google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpecOrBuilder getPersonalizationSpecOrBuilder(); + + /** + * + * + *
            +   * Optional. The specification for returning the relevance score.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceScoreSpec relevance_score_spec = 52 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the relevanceScoreSpec field is set. + */ + boolean hasRelevanceScoreSpec(); + + /** + * + * + *
            +   * Optional. The specification for returning the relevance score.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceScoreSpec relevance_score_spec = 52 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The relevanceScoreSpec. + */ + com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceScoreSpec getRelevanceScoreSpec(); + + /** + * + * + *
            +   * Optional. The specification for returning the relevance score.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceScoreSpec relevance_score_spec = 52 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceScoreSpecOrBuilder + getRelevanceScoreSpecOrBuilder(); + + /** + * + * + *
            +   * Optional. SearchAddonSpec is used to disable add-ons for search as per new
            +   * repricing model.
            +   * This field is only supported for search requests.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.SearchAddonSpec search_addon_spec = 62 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the searchAddonSpec field is set. + */ + boolean hasSearchAddonSpec(); + + /** + * + * + *
            +   * Optional. SearchAddonSpec is used to disable add-ons for search as per new
            +   * repricing model.
            +   * This field is only supported for search requests.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.SearchAddonSpec search_addon_spec = 62 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The searchAddonSpec. + */ + com.google.cloud.discoveryengine.v1beta.SearchRequest.SearchAddonSpec getSearchAddonSpec(); + + /** + * + * + *
            +   * Optional. SearchAddonSpec is used to disable add-ons for search as per new
            +   * repricing model.
            +   * This field is only supported for search requests.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.SearchAddonSpec search_addon_spec = 62 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.discoveryengine.v1beta.SearchRequest.SearchAddonSpecOrBuilder + getSearchAddonSpecOrBuilder(); + + /** + * + * + *
            +   * Optional. Optional configuration for the Custom Ranking feature.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.CustomRankingParams custom_ranking_params = 64 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the customRankingParams field is set. + */ + boolean hasCustomRankingParams(); + + /** + * + * + *
            +   * Optional. Optional configuration for the Custom Ranking feature.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.CustomRankingParams custom_ranking_params = 64 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The customRankingParams. + */ + com.google.cloud.discoveryengine.v1beta.SearchRequest.CustomRankingParams + getCustomRankingParams(); + + /** + * + * + *
            +   * Optional. Optional configuration for the Custom Ranking feature.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchRequest.CustomRankingParams custom_ranking_params = 64 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.discoveryengine.v1beta.SearchRequest.CustomRankingParamsOrBuilder + getCustomRankingParamsOrBuilder(); + + /** + * + * + *
            +   * Optional. The entity for customers that may run multiple different
            +   * entities, domains, sites or regions, for example, "Google US", "Google
            +   * Ads", "Waymo", "google.com", "youtube.com", etc. If this is set, it should
            +   * be exactly matched with
            +   * [UserEvent.entity][google.cloud.discoveryengine.v1beta.UserEvent.entity] to
            +   * get search results boosted by entity.
            +   * 
            + * + * string entity = 66 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The entity. + */ + java.lang.String getEntity(); + + /** + * + * + *
            +   * Optional. The entity for customers that may run multiple different
            +   * entities, domains, sites or regions, for example, "Google US", "Google
            +   * Ads", "Waymo", "google.com", "youtube.com", etc. If this is set, it should
            +   * be exactly matched with
            +   * [UserEvent.entity][google.cloud.discoveryengine.v1beta.UserEvent.entity] to
            +   * get search results boosted by entity.
            +   * 
            + * + * string entity = 66 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for entity. + */ + com.google.protobuf.ByteString getEntityBytes(); } diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/SearchResponse.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/SearchResponse.java index 7564a5432660..c3ce69ed4639 100644 --- a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/SearchResponse.java +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/SearchResponse.java @@ -60,9 +60,12 @@ private SearchResponse() { redirectUri_ = ""; nextPageToken_ = ""; correctedQuery_ = ""; + suggestedQuery_ = ""; appliedControls_ = com.google.protobuf.LazyStringArrayList.emptyList(); geoSearchDebugInfo_ = java.util.Collections.emptyList(); oneBoxResults_ = java.util.Collections.emptyList(); + searchLinkPromotions_ = java.util.Collections.emptyList(); + semanticState_ = 0; } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @@ -80,6 +83,177 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { com.google.cloud.discoveryengine.v1beta.SearchResponse.Builder.class); } + /** + * + * + *
            +   * Semantic state of the search response.
            +   * 
            + * + * Protobuf enum {@code google.cloud.discoveryengine.v1beta.SearchResponse.SemanticState} + */ + public enum SemanticState implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
            +     * Default value. Should not be used.
            +     * 
            + * + * SEMANTIC_STATE_UNSPECIFIED = 0; + */ + SEMANTIC_STATE_UNSPECIFIED(0), + /** + * + * + *
            +     * Semantic search was disabled for this search response.
            +     * 
            + * + * DISABLED = 1; + */ + DISABLED(1), + /** + * + * + *
            +     * Semantic search was enabled for this search response.
            +     * 
            + * + * ENABLED = 2; + */ + ENABLED(2), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "SemanticState"); + } + + /** + * + * + *
            +     * Default value. Should not be used.
            +     * 
            + * + * SEMANTIC_STATE_UNSPECIFIED = 0; + */ + public static final int SEMANTIC_STATE_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
            +     * Semantic search was disabled for this search response.
            +     * 
            + * + * DISABLED = 1; + */ + public static final int DISABLED_VALUE = 1; + + /** + * + * + *
            +     * Semantic search was enabled for this search response.
            +     * 
            + * + * ENABLED = 2; + */ + public static final int ENABLED_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 SemanticState 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 SemanticState forNumber(int value) { + switch (value) { + case 0: + return SEMANTIC_STATE_UNSPECIFIED; + case 1: + return DISABLED; + case 2: + return ENABLED; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public SemanticState findValueByNumber(int number) { + return SemanticState.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.SearchResponse.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final SemanticState[] VALUES = values(); + + public static SemanticState valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private SemanticState(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.discoveryengine.v1beta.SearchResponse.SemanticState) + } + public interface SearchResultOrBuilder extends // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.SearchResponse.SearchResult) @@ -203,10 +377,11 @@ public interface SearchResultOrBuilder * * *
            -     * Google provided available scores.
            +     * Output only. Google provided available scores.
                  * 
            * - * map<string, .google.cloud.discoveryengine.v1beta.DoubleList> model_scores = 4; + * + * map<string, .google.cloud.discoveryengine.v1beta.DoubleList> model_scores = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ int getModelScoresCount(); @@ -215,10 +390,11 @@ public interface SearchResultOrBuilder * * *
            -     * Google provided available scores.
            +     * Output only. Google provided available scores.
                  * 
            * - * map<string, .google.cloud.discoveryengine.v1beta.DoubleList> model_scores = 4; + * + * map<string, .google.cloud.discoveryengine.v1beta.DoubleList> model_scores = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ boolean containsModelScores(java.lang.String key); @@ -232,10 +408,11 @@ public interface SearchResultOrBuilder * * *
            -     * Google provided available scores.
            +     * Output only. Google provided available scores.
                  * 
            * - * map<string, .google.cloud.discoveryengine.v1beta.DoubleList> model_scores = 4; + * + * map<string, .google.cloud.discoveryengine.v1beta.DoubleList> model_scores = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ java.util.Map @@ -245,10 +422,11 @@ public interface SearchResultOrBuilder * * *
            -     * Google provided available scores.
            +     * Output only. Google provided available scores.
                  * 
            * - * map<string, .google.cloud.discoveryengine.v1beta.DoubleList> model_scores = 4; + * + * map<string, .google.cloud.discoveryengine.v1beta.DoubleList> model_scores = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ /* nullable */ @@ -261,10 +439,11 @@ com.google.cloud.discoveryengine.v1beta.DoubleList getModelScoresOrDefault( * * *
            -     * Google provided available scores.
            +     * Output only. Google provided available scores.
                  * 
            * - * map<string, .google.cloud.discoveryengine.v1beta.DoubleList> model_scores = 4; + * + * map<string, .google.cloud.discoveryengine.v1beta.DoubleList> model_scores = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ com.google.cloud.discoveryengine.v1beta.DoubleList getModelScoresOrThrow(java.lang.String key); @@ -273,7 +452,7 @@ com.google.cloud.discoveryengine.v1beta.DoubleList getModelScoresOrDefault( * * *
            -     * A set of ranking signals associated with the result.
            +     * Optional. A set of ranking signals associated with the result.
                  * 
            * * @@ -288,7 +467,7 @@ com.google.cloud.discoveryengine.v1beta.DoubleList getModelScoresOrDefault( * * *
            -     * A set of ranking signals associated with the result.
            +     * Optional. A set of ranking signals associated with the result.
                  * 
            * * @@ -304,7 +483,7 @@ com.google.cloud.discoveryengine.v1beta.DoubleList getModelScoresOrDefault( * * *
            -     * A set of ranking signals associated with the result.
            +     * Optional. A set of ranking signals associated with the result.
                  * 
            * * @@ -385,7 +564,7 @@ public interface RankSignalsOrBuilder * * *
            -       * Keyword matching adjustment.
            +       * Optional. Keyword matching adjustment.
                    * 
            * * @@ -400,7 +579,7 @@ public interface RankSignalsOrBuilder * * *
            -       * Keyword matching adjustment.
            +       * Optional. Keyword matching adjustment.
                    * 
            * * @@ -415,7 +594,7 @@ public interface RankSignalsOrBuilder * * *
            -       * Semantic relevance adjustment.
            +       * Optional. Semantic relevance adjustment.
                    * 
            * * optional float relevance_score = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -428,7 +607,7 @@ public interface RankSignalsOrBuilder * * *
            -       * Semantic relevance adjustment.
            +       * Optional. Semantic relevance adjustment.
                    * 
            * * optional float relevance_score = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -441,7 +620,7 @@ public interface RankSignalsOrBuilder * * *
            -       * Semantic similarity adjustment.
            +       * Optional. Semantic similarity adjustment.
                    * 
            * * @@ -456,7 +635,7 @@ public interface RankSignalsOrBuilder * * *
            -       * Semantic similarity adjustment.
            +       * Optional. Semantic similarity adjustment.
                    * 
            * * @@ -471,7 +650,7 @@ public interface RankSignalsOrBuilder * * *
            -       * Predicted conversion rate adjustment as a rank.
            +       * Optional. Predicted conversion rate adjustment as a rank.
                    * 
            * * optional float pctr_rank = 4 [(.google.api.field_behavior) = OPTIONAL]; @@ -484,7 +663,7 @@ public interface RankSignalsOrBuilder * * *
            -       * Predicted conversion rate adjustment as a rank.
            +       * Optional. Predicted conversion rate adjustment as a rank.
                    * 
            * * optional float pctr_rank = 4 [(.google.api.field_behavior) = OPTIONAL]; @@ -497,7 +676,7 @@ public interface RankSignalsOrBuilder * * *
            -       * Topicality adjustment as a rank.
            +       * Optional. Topicality adjustment as a rank.
                    * 
            * * optional float topicality_rank = 6 [(.google.api.field_behavior) = OPTIONAL]; @@ -510,7 +689,7 @@ public interface RankSignalsOrBuilder * * *
            -       * Topicality adjustment as a rank.
            +       * Optional. Topicality adjustment as a rank.
                    * 
            * * optional float topicality_rank = 6 [(.google.api.field_behavior) = OPTIONAL]; @@ -523,7 +702,7 @@ public interface RankSignalsOrBuilder * * *
            -       * Age of the document in hours.
            +       * Optional. Age of the document in hours.
                    * 
            * * optional float document_age = 7 [(.google.api.field_behavior) = OPTIONAL]; @@ -536,7 +715,7 @@ public interface RankSignalsOrBuilder * * *
            -       * Age of the document in hours.
            +       * Optional. Age of the document in hours.
                    * 
            * * optional float document_age = 7 [(.google.api.field_behavior) = OPTIONAL]; @@ -549,7 +728,7 @@ public interface RankSignalsOrBuilder * * *
            -       * Combined custom boosts for a doc.
            +       * Optional. Combined custom boosts for a doc.
                    * 
            * * optional float boosting_factor = 8 [(.google.api.field_behavior) = OPTIONAL]; @@ -562,7 +741,7 @@ public interface RankSignalsOrBuilder * * *
            -       * Combined custom boosts for a doc.
            +       * Optional. Combined custom boosts for a doc.
                    * 
            * * optional float boosting_factor = 8 [(.google.api.field_behavior) = OPTIONAL]; @@ -575,7 +754,7 @@ public interface RankSignalsOrBuilder * * *
            -       * The default rank of the result.
            +       * Optional. The default rank of the result.
                    * 
            * * float default_rank = 32 [(.google.api.field_behavior) = OPTIONAL]; @@ -588,7 +767,7 @@ public interface RankSignalsOrBuilder * * *
            -       * A list of custom clearbox signals.
            +       * Optional. A list of custom clearbox signals.
                    * 
            * * @@ -604,7 +783,7 @@ public interface RankSignalsOrBuilder * * *
            -       * A list of custom clearbox signals.
            +       * Optional. A list of custom clearbox signals.
                    * 
            * * @@ -618,7 +797,7 @@ public interface RankSignalsOrBuilder * * *
            -       * A list of custom clearbox signals.
            +       * Optional. A list of custom clearbox signals.
                    * 
            * * @@ -631,7 +810,7 @@ public interface RankSignalsOrBuilder * * *
            -       * A list of custom clearbox signals.
            +       * Optional. A list of custom clearbox signals.
                    * 
            * * @@ -648,7 +827,7 @@ public interface RankSignalsOrBuilder * * *
            -       * A list of custom clearbox signals.
            +       * Optional. A list of custom clearbox signals.
                    * 
            * * @@ -658,6 +837,58 @@ public interface RankSignalsOrBuilder com.google.cloud.discoveryengine.v1beta.SearchResponse.SearchResult.RankSignals .CustomSignalOrBuilder getCustomSignalsOrBuilder(int index); + + /** + * + * + *
            +       * Optional. A list of precomputed expression results for a given
            +       * document, in the same order as requested in
            +       * `SearchRequest.custom_ranking_params.expressions_to_precompute`.
            +       * 
            + * + * + * repeated float precomputed_expression_values = 34 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the precomputedExpressionValues. + */ + java.util.List getPrecomputedExpressionValuesList(); + + /** + * + * + *
            +       * Optional. A list of precomputed expression results for a given
            +       * document, in the same order as requested in
            +       * `SearchRequest.custom_ranking_params.expressions_to_precompute`.
            +       * 
            + * + * + * repeated float precomputed_expression_values = 34 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The count of precomputedExpressionValues. + */ + int getPrecomputedExpressionValuesCount(); + + /** + * + * + *
            +       * Optional. A list of precomputed expression results for a given
            +       * document, in the same order as requested in
            +       * `SearchRequest.custom_ranking_params.expressions_to_precompute`.
            +       * 
            + * + * + * repeated float precomputed_expression_values = 34 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the element to return. + * @return The precomputedExpressionValues at the given index. + */ + float getPrecomputedExpressionValues(int index); } /** @@ -693,6 +924,7 @@ private RankSignals(com.google.protobuf.GeneratedMessage.Builder builder) { private RankSignals() { customSignals_ = java.util.Collections.emptyList(); + precomputedExpressionValues_ = emptyFloatList(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @@ -721,7 +953,7 @@ public interface CustomSignalOrBuilder * * *
            -         * Name of the signal.
            +         * Optional. Name of the signal.
                      * 
            * * string name = 1 [(.google.api.field_behavior) = OPTIONAL]; @@ -734,7 +966,7 @@ public interface CustomSignalOrBuilder * * *
            -         * Name of the signal.
            +         * Optional. Name of the signal.
                      * 
            * * string name = 1 [(.google.api.field_behavior) = OPTIONAL]; @@ -747,7 +979,8 @@ public interface CustomSignalOrBuilder * * *
            -         * Float value representing the ranking signal (e.g. 1.25 for BM25).
            +         * Optional. Float value representing the ranking signal (e.g. 1.25 for
            +         * BM25).
                      * 
            * * float value = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -818,7 +1051,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * *
            -         * Name of the signal.
            +         * Optional. Name of the signal.
                      * 
            * * string name = 1 [(.google.api.field_behavior) = OPTIONAL]; @@ -842,7 +1075,7 @@ public java.lang.String getName() { * * *
            -         * Name of the signal.
            +         * Optional. Name of the signal.
                      * 
            * * string name = 1 [(.google.api.field_behavior) = OPTIONAL]; @@ -869,7 +1102,8 @@ public com.google.protobuf.ByteString getNameBytes() { * * *
            -         * Float value representing the ranking signal (e.g. 1.25 for BM25).
            +         * Optional. Float value representing the ranking signal (e.g. 1.25 for
            +         * BM25).
                      * 
            * * float value = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -1284,7 +1518,7 @@ public Builder mergeFrom( * * *
            -           * Name of the signal.
            +           * Optional. Name of the signal.
                        * 
            * * string name = 1 [(.google.api.field_behavior) = OPTIONAL]; @@ -1307,7 +1541,7 @@ public java.lang.String getName() { * * *
            -           * Name of the signal.
            +           * Optional. Name of the signal.
                        * 
            * * string name = 1 [(.google.api.field_behavior) = OPTIONAL]; @@ -1330,7 +1564,7 @@ public com.google.protobuf.ByteString getNameBytes() { * * *
            -           * Name of the signal.
            +           * Optional. Name of the signal.
                        * 
            * * string name = 1 [(.google.api.field_behavior) = OPTIONAL]; @@ -1352,7 +1586,7 @@ public Builder setName(java.lang.String value) { * * *
            -           * Name of the signal.
            +           * Optional. Name of the signal.
                        * 
            * * string name = 1 [(.google.api.field_behavior) = OPTIONAL]; @@ -1370,7 +1604,7 @@ public Builder clearName() { * * *
            -           * Name of the signal.
            +           * Optional. Name of the signal.
                        * 
            * * string name = 1 [(.google.api.field_behavior) = OPTIONAL]; @@ -1395,7 +1629,8 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { * * *
            -           * Float value representing the ranking signal (e.g. 1.25 for BM25).
            +           * Optional. Float value representing the ranking signal (e.g. 1.25 for
            +           * BM25).
                        * 
            * * float value = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -1411,7 +1646,8 @@ public float getValue() { * * *
            -           * Float value representing the ranking signal (e.g. 1.25 for BM25).
            +           * Optional. Float value representing the ranking signal (e.g. 1.25 for
            +           * BM25).
                        * 
            * * float value = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -1431,7 +1667,8 @@ public Builder setValue(float value) { * * *
            -           * Float value representing the ranking signal (e.g. 1.25 for BM25).
            +           * Optional. Float value representing the ranking signal (e.g. 1.25 for
            +           * BM25).
                        * 
            * * float value = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -1513,7 +1750,7 @@ public com.google.protobuf.Parser getParserForType() { * * *
            -       * Keyword matching adjustment.
            +       * Optional. Keyword matching adjustment.
                    * 
            * * @@ -1531,7 +1768,7 @@ public boolean hasKeywordSimilarityScore() { * * *
            -       * Keyword matching adjustment.
            +       * Optional. Keyword matching adjustment.
                    * 
            * * @@ -1552,7 +1789,7 @@ public float getKeywordSimilarityScore() { * * *
            -       * Semantic relevance adjustment.
            +       * Optional. Semantic relevance adjustment.
                    * 
            * * optional float relevance_score = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -1568,7 +1805,7 @@ public boolean hasRelevanceScore() { * * *
            -       * Semantic relevance adjustment.
            +       * Optional. Semantic relevance adjustment.
                    * 
            * * optional float relevance_score = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -1587,7 +1824,7 @@ public float getRelevanceScore() { * * *
            -       * Semantic similarity adjustment.
            +       * Optional. Semantic similarity adjustment.
                    * 
            * * @@ -1605,7 +1842,7 @@ public boolean hasSemanticSimilarityScore() { * * *
            -       * Semantic similarity adjustment.
            +       * Optional. Semantic similarity adjustment.
                    * 
            * * @@ -1626,7 +1863,7 @@ public float getSemanticSimilarityScore() { * * *
            -       * Predicted conversion rate adjustment as a rank.
            +       * Optional. Predicted conversion rate adjustment as a rank.
                    * 
            * * optional float pctr_rank = 4 [(.google.api.field_behavior) = OPTIONAL]; @@ -1642,7 +1879,7 @@ public boolean hasPctrRank() { * * *
            -       * Predicted conversion rate adjustment as a rank.
            +       * Optional. Predicted conversion rate adjustment as a rank.
                    * 
            * * optional float pctr_rank = 4 [(.google.api.field_behavior) = OPTIONAL]; @@ -1661,7 +1898,7 @@ public float getPctrRank() { * * *
            -       * Topicality adjustment as a rank.
            +       * Optional. Topicality adjustment as a rank.
                    * 
            * * optional float topicality_rank = 6 [(.google.api.field_behavior) = OPTIONAL]; @@ -1677,7 +1914,7 @@ public boolean hasTopicalityRank() { * * *
            -       * Topicality adjustment as a rank.
            +       * Optional. Topicality adjustment as a rank.
                    * 
            * * optional float topicality_rank = 6 [(.google.api.field_behavior) = OPTIONAL]; @@ -1696,7 +1933,7 @@ public float getTopicalityRank() { * * *
            -       * Age of the document in hours.
            +       * Optional. Age of the document in hours.
                    * 
            * * optional float document_age = 7 [(.google.api.field_behavior) = OPTIONAL]; @@ -1712,7 +1949,7 @@ public boolean hasDocumentAge() { * * *
            -       * Age of the document in hours.
            +       * Optional. Age of the document in hours.
                    * 
            * * optional float document_age = 7 [(.google.api.field_behavior) = OPTIONAL]; @@ -1731,7 +1968,7 @@ public float getDocumentAge() { * * *
            -       * Combined custom boosts for a doc.
            +       * Optional. Combined custom boosts for a doc.
                    * 
            * * optional float boosting_factor = 8 [(.google.api.field_behavior) = OPTIONAL]; @@ -1747,7 +1984,7 @@ public boolean hasBoostingFactor() { * * *
            -       * Combined custom boosts for a doc.
            +       * Optional. Combined custom boosts for a doc.
                    * 
            * * optional float boosting_factor = 8 [(.google.api.field_behavior) = OPTIONAL]; @@ -1766,7 +2003,7 @@ public float getBoostingFactor() { * * *
            -       * The default rank of the result.
            +       * Optional. The default rank of the result.
                    * 
            * * float default_rank = 32 [(.google.api.field_behavior) = OPTIONAL]; @@ -1790,7 +2027,7 @@ public float getDefaultRank() { * * *
            -       * A list of custom clearbox signals.
            +       * Optional. A list of custom clearbox signals.
                    * 
            * * @@ -1809,7 +2046,7 @@ public float getDefaultRank() { * * *
            -       * A list of custom clearbox signals.
            +       * Optional. A list of custom clearbox signals.
                    * 
            * * @@ -1829,7 +2066,7 @@ public float getDefaultRank() { * * *
            -       * A list of custom clearbox signals.
            +       * Optional. A list of custom clearbox signals.
                    * 
            * * @@ -1845,7 +2082,7 @@ public int getCustomSignalsCount() { * * *
            -       * A list of custom clearbox signals.
            +       * Optional. A list of custom clearbox signals.
                    * 
            * * @@ -1863,7 +2100,7 @@ public int getCustomSignalsCount() { * * *
            -       * A list of custom clearbox signals.
            +       * Optional. A list of custom clearbox signals.
                    * 
            * * @@ -1877,6 +2114,73 @@ public int getCustomSignalsCount() { return customSignals_.get(index); } + public static final int PRECOMPUTED_EXPRESSION_VALUES_FIELD_NUMBER = 34; + + @SuppressWarnings("serial") + private com.google.protobuf.Internal.FloatList precomputedExpressionValues_ = + emptyFloatList(); + + /** + * + * + *
            +       * Optional. A list of precomputed expression results for a given
            +       * document, in the same order as requested in
            +       * `SearchRequest.custom_ranking_params.expressions_to_precompute`.
            +       * 
            + * + * + * repeated float precomputed_expression_values = 34 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the precomputedExpressionValues. + */ + @java.lang.Override + public java.util.List getPrecomputedExpressionValuesList() { + return precomputedExpressionValues_; + } + + /** + * + * + *
            +       * Optional. A list of precomputed expression results for a given
            +       * document, in the same order as requested in
            +       * `SearchRequest.custom_ranking_params.expressions_to_precompute`.
            +       * 
            + * + * + * repeated float precomputed_expression_values = 34 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The count of precomputedExpressionValues. + */ + public int getPrecomputedExpressionValuesCount() { + return precomputedExpressionValues_.size(); + } + + /** + * + * + *
            +       * Optional. A list of precomputed expression results for a given
            +       * document, in the same order as requested in
            +       * `SearchRequest.custom_ranking_params.expressions_to_precompute`.
            +       * 
            + * + * + * repeated float precomputed_expression_values = 34 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the element to return. + * @return The precomputedExpressionValues at the given index. + */ + public float getPrecomputedExpressionValues(int index) { + return precomputedExpressionValues_.getFloat(index); + } + + private int precomputedExpressionValuesMemoizedSerializedSize = -1; + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -1891,6 +2195,7 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + getSerializedSize(); if (((bitField0_ & 0x00000001) != 0)) { output.writeFloat(1, keywordSimilarityScore_); } @@ -1918,6 +2223,13 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < customSignals_.size(); i++) { output.writeMessage(33, customSignals_.get(i)); } + if (getPrecomputedExpressionValuesList().size() > 0) { + output.writeUInt32NoTag(274); + output.writeUInt32NoTag(precomputedExpressionValuesMemoizedSerializedSize); + } + for (int i = 0; i < precomputedExpressionValues_.size(); i++) { + output.writeFloatNoTag(precomputedExpressionValues_.getFloat(i)); + } getUnknownFields().writeTo(output); } @@ -1957,6 +2269,16 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeMessageSize(33, customSignals_.get(i)); } + { + int dataSize = 0; + dataSize = 4 * getPrecomputedExpressionValuesList().size(); + size += dataSize; + if (!getPrecomputedExpressionValuesList().isEmpty()) { + size += 2; + size += com.google.protobuf.CodedOutputStream.computeInt32SizeNoTag(dataSize); + } + precomputedExpressionValuesMemoizedSerializedSize = dataSize; + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -2013,6 +2335,8 @@ public boolean equals(final java.lang.Object obj) { if (java.lang.Float.floatToIntBits(getDefaultRank()) != java.lang.Float.floatToIntBits(other.getDefaultRank())) return false; if (!getCustomSignalsList().equals(other.getCustomSignalsList())) return false; + if (!getPrecomputedExpressionValuesList() + .equals(other.getPrecomputedExpressionValuesList())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -2058,6 +2382,10 @@ public int hashCode() { hash = (37 * hash) + CUSTOM_SIGNALS_FIELD_NUMBER; hash = (53 * hash) + getCustomSignalsList().hashCode(); } + if (getPrecomputedExpressionValuesCount() > 0) { + hash = (37 * hash) + PRECOMPUTED_EXPRESSION_VALUES_FIELD_NUMBER; + hash = (53 * hash) + getPrecomputedExpressionValuesList().hashCode(); + } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -2229,6 +2557,7 @@ public Builder clear() { customSignalsBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000100); + precomputedExpressionValues_ = emptyFloatList(); return this; } @@ -2320,6 +2649,10 @@ private void buildPartial0( if (((from_bitField0_ & 0x00000080) != 0)) { result.defaultRank_ = defaultRank_; } + if (((from_bitField0_ & 0x00000200) != 0)) { + precomputedExpressionValues_.makeImmutable(); + result.precomputedExpressionValues_ = precomputedExpressionValues_; + } result.bitField0_ |= to_bitField0_; } @@ -2393,6 +2726,17 @@ public Builder mergeFrom( } } } + if (!other.precomputedExpressionValues_.isEmpty()) { + if (precomputedExpressionValues_.isEmpty()) { + precomputedExpressionValues_ = other.precomputedExpressionValues_; + precomputedExpressionValues_.makeImmutable(); + bitField0_ |= 0x00000200; + } else { + ensurePrecomputedExpressionValuesIsMutable(); + precomputedExpressionValues_.addAll(other.precomputedExpressionValues_); + } + onChanged(); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -2484,6 +2828,25 @@ public Builder mergeFrom( } break; } // case 266 + case 277: + { + float v = input.readFloat(); + ensurePrecomputedExpressionValuesIsMutable(); + precomputedExpressionValues_.addFloat(v); + break; + } // case 277 + case 274: + { + int length = input.readRawVarint32(); + int limit = input.pushLimit(length); + int alloc = length > 4096 ? 4096 : length; + ensurePrecomputedExpressionValuesIsMutable(alloc / 4); + while (input.getBytesUntilLimit() > 0) { + precomputedExpressionValues_.addFloat(input.readFloat()); + } + input.popLimit(limit); + break; + } // case 274 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -2509,7 +2872,7 @@ public Builder mergeFrom( * * *
            -         * Keyword matching adjustment.
            +         * Optional. Keyword matching adjustment.
                      * 
            * * @@ -2527,7 +2890,7 @@ public boolean hasKeywordSimilarityScore() { * * *
            -         * Keyword matching adjustment.
            +         * Optional. Keyword matching adjustment.
                      * 
            * * @@ -2545,7 +2908,7 @@ public float getKeywordSimilarityScore() { * * *
            -         * Keyword matching adjustment.
            +         * Optional. Keyword matching adjustment.
                      * 
            * * @@ -2567,7 +2930,7 @@ public Builder setKeywordSimilarityScore(float value) { * * *
            -         * Keyword matching adjustment.
            +         * Optional. Keyword matching adjustment.
                      * 
            * * @@ -2589,7 +2952,7 @@ public Builder clearKeywordSimilarityScore() { * * *
            -         * Semantic relevance adjustment.
            +         * Optional. Semantic relevance adjustment.
                      * 
            * * optional float relevance_score = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -2606,7 +2969,7 @@ public boolean hasRelevanceScore() { * * *
            -         * Semantic relevance adjustment.
            +         * Optional. Semantic relevance adjustment.
                      * 
            * * optional float relevance_score = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -2623,7 +2986,7 @@ public float getRelevanceScore() { * * *
            -         * Semantic relevance adjustment.
            +         * Optional. Semantic relevance adjustment.
                      * 
            * * optional float relevance_score = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -2644,7 +3007,7 @@ public Builder setRelevanceScore(float value) { * * *
            -         * Semantic relevance adjustment.
            +         * Optional. Semantic relevance adjustment.
                      * 
            * * optional float relevance_score = 2 [(.google.api.field_behavior) = OPTIONAL]; @@ -2665,7 +3028,7 @@ public Builder clearRelevanceScore() { * * *
            -         * Semantic similarity adjustment.
            +         * Optional. Semantic similarity adjustment.
                      * 
            * * @@ -2683,7 +3046,7 @@ public boolean hasSemanticSimilarityScore() { * * *
            -         * Semantic similarity adjustment.
            +         * Optional. Semantic similarity adjustment.
                      * 
            * * @@ -2701,7 +3064,7 @@ public float getSemanticSimilarityScore() { * * *
            -         * Semantic similarity adjustment.
            +         * Optional. Semantic similarity adjustment.
                      * 
            * * @@ -2723,7 +3086,7 @@ public Builder setSemanticSimilarityScore(float value) { * * *
            -         * Semantic similarity adjustment.
            +         * Optional. Semantic similarity adjustment.
                      * 
            * * @@ -2745,7 +3108,7 @@ public Builder clearSemanticSimilarityScore() { * * *
            -         * Predicted conversion rate adjustment as a rank.
            +         * Optional. Predicted conversion rate adjustment as a rank.
                      * 
            * * optional float pctr_rank = 4 [(.google.api.field_behavior) = OPTIONAL]; @@ -2761,7 +3124,7 @@ public boolean hasPctrRank() { * * *
            -         * Predicted conversion rate adjustment as a rank.
            +         * Optional. Predicted conversion rate adjustment as a rank.
                      * 
            * * optional float pctr_rank = 4 [(.google.api.field_behavior) = OPTIONAL]; @@ -2777,7 +3140,7 @@ public float getPctrRank() { * * *
            -         * Predicted conversion rate adjustment as a rank.
            +         * Optional. Predicted conversion rate adjustment as a rank.
                      * 
            * * optional float pctr_rank = 4 [(.google.api.field_behavior) = OPTIONAL]; @@ -2797,7 +3160,7 @@ public Builder setPctrRank(float value) { * * *
            -         * Predicted conversion rate adjustment as a rank.
            +         * Optional. Predicted conversion rate adjustment as a rank.
                      * 
            * * optional float pctr_rank = 4 [(.google.api.field_behavior) = OPTIONAL]; @@ -2817,7 +3180,7 @@ public Builder clearPctrRank() { * * *
            -         * Topicality adjustment as a rank.
            +         * Optional. Topicality adjustment as a rank.
                      * 
            * * optional float topicality_rank = 6 [(.google.api.field_behavior) = OPTIONAL]; @@ -2834,7 +3197,7 @@ public boolean hasTopicalityRank() { * * *
            -         * Topicality adjustment as a rank.
            +         * Optional. Topicality adjustment as a rank.
                      * 
            * * optional float topicality_rank = 6 [(.google.api.field_behavior) = OPTIONAL]; @@ -2851,7 +3214,7 @@ public float getTopicalityRank() { * * *
            -         * Topicality adjustment as a rank.
            +         * Optional. Topicality adjustment as a rank.
                      * 
            * * optional float topicality_rank = 6 [(.google.api.field_behavior) = OPTIONAL]; @@ -2872,7 +3235,7 @@ public Builder setTopicalityRank(float value) { * * *
            -         * Topicality adjustment as a rank.
            +         * Optional. Topicality adjustment as a rank.
                      * 
            * * optional float topicality_rank = 6 [(.google.api.field_behavior) = OPTIONAL]; @@ -2893,7 +3256,7 @@ public Builder clearTopicalityRank() { * * *
            -         * Age of the document in hours.
            +         * Optional. Age of the document in hours.
                      * 
            * * optional float document_age = 7 [(.google.api.field_behavior) = OPTIONAL]; @@ -2909,7 +3272,7 @@ public boolean hasDocumentAge() { * * *
            -         * Age of the document in hours.
            +         * Optional. Age of the document in hours.
                      * 
            * * optional float document_age = 7 [(.google.api.field_behavior) = OPTIONAL]; @@ -2925,7 +3288,7 @@ public float getDocumentAge() { * * *
            -         * Age of the document in hours.
            +         * Optional. Age of the document in hours.
                      * 
            * * optional float document_age = 7 [(.google.api.field_behavior) = OPTIONAL]; @@ -2945,7 +3308,7 @@ public Builder setDocumentAge(float value) { * * *
            -         * Age of the document in hours.
            +         * Optional. Age of the document in hours.
                      * 
            * * optional float document_age = 7 [(.google.api.field_behavior) = OPTIONAL]; @@ -2965,7 +3328,7 @@ public Builder clearDocumentAge() { * * *
            -         * Combined custom boosts for a doc.
            +         * Optional. Combined custom boosts for a doc.
                      * 
            * * optional float boosting_factor = 8 [(.google.api.field_behavior) = OPTIONAL]; @@ -2982,7 +3345,7 @@ public boolean hasBoostingFactor() { * * *
            -         * Combined custom boosts for a doc.
            +         * Optional. Combined custom boosts for a doc.
                      * 
            * * optional float boosting_factor = 8 [(.google.api.field_behavior) = OPTIONAL]; @@ -2999,7 +3362,7 @@ public float getBoostingFactor() { * * *
            -         * Combined custom boosts for a doc.
            +         * Optional. Combined custom boosts for a doc.
                      * 
            * * optional float boosting_factor = 8 [(.google.api.field_behavior) = OPTIONAL]; @@ -3020,7 +3383,7 @@ public Builder setBoostingFactor(float value) { * * *
            -         * Combined custom boosts for a doc.
            +         * Optional. Combined custom boosts for a doc.
                      * 
            * * optional float boosting_factor = 8 [(.google.api.field_behavior) = OPTIONAL]; @@ -3041,7 +3404,7 @@ public Builder clearBoostingFactor() { * * *
            -         * The default rank of the result.
            +         * Optional. The default rank of the result.
                      * 
            * * float default_rank = 32 [(.google.api.field_behavior) = OPTIONAL]; @@ -3057,7 +3420,7 @@ public float getDefaultRank() { * * *
            -         * The default rank of the result.
            +         * Optional. The default rank of the result.
                      * 
            * * float default_rank = 32 [(.google.api.field_behavior) = OPTIONAL]; @@ -3077,7 +3440,7 @@ public Builder setDefaultRank(float value) { * * *
            -         * The default rank of the result.
            +         * Optional. The default rank of the result.
                      * 
            * * float default_rank = 32 [(.google.api.field_behavior) = OPTIONAL]; @@ -3119,7 +3482,7 @@ private void ensureCustomSignalsIsMutable() { * * *
            -         * A list of custom clearbox signals.
            +         * Optional. A list of custom clearbox signals.
                      * 
            * * @@ -3141,7 +3504,7 @@ private void ensureCustomSignalsIsMutable() { * * *
            -         * A list of custom clearbox signals.
            +         * Optional. A list of custom clearbox signals.
                      * 
            * * @@ -3160,7 +3523,7 @@ public int getCustomSignalsCount() { * * *
            -         * A list of custom clearbox signals.
            +         * Optional. A list of custom clearbox signals.
                      * 
            * * @@ -3181,7 +3544,7 @@ public int getCustomSignalsCount() { * * *
            -         * A list of custom clearbox signals.
            +         * Optional. A list of custom clearbox signals.
                      * 
            * * @@ -3210,7 +3573,7 @@ public Builder setCustomSignals( * * *
            -         * A list of custom clearbox signals.
            +         * Optional. A list of custom clearbox signals.
                      * 
            * * @@ -3236,7 +3599,7 @@ public Builder setCustomSignals( * * *
            -         * A list of custom clearbox signals.
            +         * Optional. A list of custom clearbox signals.
                      * 
            * * @@ -3264,7 +3627,7 @@ public Builder addCustomSignals( * * *
            -         * A list of custom clearbox signals.
            +         * Optional. A list of custom clearbox signals.
                      * 
            * * @@ -3293,7 +3656,7 @@ public Builder addCustomSignals( * * *
            -         * A list of custom clearbox signals.
            +         * Optional. A list of custom clearbox signals.
                      * 
            * * @@ -3318,7 +3681,7 @@ public Builder addCustomSignals( * * *
            -         * A list of custom clearbox signals.
            +         * Optional. A list of custom clearbox signals.
                      * 
            * * @@ -3344,7 +3707,7 @@ public Builder addCustomSignals( * * *
            -         * A list of custom clearbox signals.
            +         * Optional. A list of custom clearbox signals.
                      * 
            * * @@ -3371,7 +3734,7 @@ public Builder addAllCustomSignals( * * *
            -         * A list of custom clearbox signals.
            +         * Optional. A list of custom clearbox signals.
                      * 
            * * @@ -3393,7 +3756,7 @@ public Builder clearCustomSignals() { * * *
            -         * A list of custom clearbox signals.
            +         * Optional. A list of custom clearbox signals.
                      * 
            * * @@ -3415,7 +3778,7 @@ public Builder removeCustomSignals(int index) { * * *
            -         * A list of custom clearbox signals.
            +         * Optional. A list of custom clearbox signals.
                      * 
            * * @@ -3432,7 +3795,7 @@ public Builder removeCustomSignals(int index) { * * *
            -         * A list of custom clearbox signals.
            +         * Optional. A list of custom clearbox signals.
                      * 
            * * @@ -3453,7 +3816,7 @@ public Builder removeCustomSignals(int index) { * * *
            -         * A list of custom clearbox signals.
            +         * Optional. A list of custom clearbox signals.
                      * 
            * * @@ -3476,7 +3839,7 @@ public Builder removeCustomSignals(int index) { * * *
            -         * A list of custom clearbox signals.
            +         * Optional. A list of custom clearbox signals.
                      * 
            * * @@ -3496,7 +3859,7 @@ public Builder removeCustomSignals(int index) { * * *
            -         * A list of custom clearbox signals.
            +         * Optional. A list of custom clearbox signals.
                      * 
            * * @@ -3517,7 +3880,7 @@ public Builder removeCustomSignals(int index) { * * *
            -         * A list of custom clearbox signals.
            +         * Optional. A list of custom clearbox signals.
                      * 
            * * @@ -3557,6 +3920,181 @@ public Builder removeCustomSignals(int index) { return customSignalsBuilder_; } + private com.google.protobuf.Internal.FloatList precomputedExpressionValues_ = + emptyFloatList(); + + private void ensurePrecomputedExpressionValuesIsMutable() { + if (!precomputedExpressionValues_.isModifiable()) { + precomputedExpressionValues_ = makeMutableCopy(precomputedExpressionValues_); + } + bitField0_ |= 0x00000200; + } + + private void ensurePrecomputedExpressionValuesIsMutable(int capacity) { + if (!precomputedExpressionValues_.isModifiable()) { + precomputedExpressionValues_ = makeMutableCopy(precomputedExpressionValues_, capacity); + } + bitField0_ |= 0x00000200; + } + + /** + * + * + *
            +         * Optional. A list of precomputed expression results for a given
            +         * document, in the same order as requested in
            +         * `SearchRequest.custom_ranking_params.expressions_to_precompute`.
            +         * 
            + * + * + * repeated float precomputed_expression_values = 34 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the precomputedExpressionValues. + */ + public java.util.List getPrecomputedExpressionValuesList() { + precomputedExpressionValues_.makeImmutable(); + return precomputedExpressionValues_; + } + + /** + * + * + *
            +         * Optional. A list of precomputed expression results for a given
            +         * document, in the same order as requested in
            +         * `SearchRequest.custom_ranking_params.expressions_to_precompute`.
            +         * 
            + * + * + * repeated float precomputed_expression_values = 34 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The count of precomputedExpressionValues. + */ + public int getPrecomputedExpressionValuesCount() { + return precomputedExpressionValues_.size(); + } + + /** + * + * + *
            +         * Optional. A list of precomputed expression results for a given
            +         * document, in the same order as requested in
            +         * `SearchRequest.custom_ranking_params.expressions_to_precompute`.
            +         * 
            + * + * + * repeated float precomputed_expression_values = 34 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the element to return. + * @return The precomputedExpressionValues at the given index. + */ + public float getPrecomputedExpressionValues(int index) { + return precomputedExpressionValues_.getFloat(index); + } + + /** + * + * + *
            +         * Optional. A list of precomputed expression results for a given
            +         * document, in the same order as requested in
            +         * `SearchRequest.custom_ranking_params.expressions_to_precompute`.
            +         * 
            + * + * + * repeated float precomputed_expression_values = 34 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index to set the value at. + * @param value The precomputedExpressionValues to set. + * @return This builder for chaining. + */ + public Builder setPrecomputedExpressionValues(int index, float value) { + + ensurePrecomputedExpressionValuesIsMutable(); + precomputedExpressionValues_.setFloat(index, value); + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + + /** + * + * + *
            +         * Optional. A list of precomputed expression results for a given
            +         * document, in the same order as requested in
            +         * `SearchRequest.custom_ranking_params.expressions_to_precompute`.
            +         * 
            + * + * + * repeated float precomputed_expression_values = 34 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The precomputedExpressionValues to add. + * @return This builder for chaining. + */ + public Builder addPrecomputedExpressionValues(float value) { + + ensurePrecomputedExpressionValuesIsMutable(); + precomputedExpressionValues_.addFloat(value); + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + + /** + * + * + *
            +         * Optional. A list of precomputed expression results for a given
            +         * document, in the same order as requested in
            +         * `SearchRequest.custom_ranking_params.expressions_to_precompute`.
            +         * 
            + * + * + * repeated float precomputed_expression_values = 34 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param values The precomputedExpressionValues to add. + * @return This builder for chaining. + */ + public Builder addAllPrecomputedExpressionValues( + java.lang.Iterable values) { + ensurePrecomputedExpressionValuesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, precomputedExpressionValues_); + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + + /** + * + * + *
            +         * Optional. A list of precomputed expression results for a given
            +         * document, in the same order as requested in
            +         * `SearchRequest.custom_ranking_params.expressions_to_precompute`.
            +         * 
            + * + * + * repeated float precomputed_expression_values = 34 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearPrecomputedExpressionValues() { + precomputedExpressionValues_ = emptyFloatList(); + bitField0_ = (bitField0_ & ~0x00000200); + onChanged(); + return this; + } + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.SearchResponse.SearchResult.RankSignals) } @@ -3828,10 +4366,11 @@ public int getModelScoresCount() { * * *
            -     * Google provided available scores.
            +     * Output only. Google provided available scores.
                  * 
            * - * map<string, .google.cloud.discoveryengine.v1beta.DoubleList> model_scores = 4; + * + * map<string, .google.cloud.discoveryengine.v1beta.DoubleList> model_scores = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ @java.lang.Override @@ -3854,10 +4393,11 @@ public boolean containsModelScores(java.lang.String key) { * * *
            -     * Google provided available scores.
            +     * Output only. Google provided available scores.
                  * 
            * - * map<string, .google.cloud.discoveryengine.v1beta.DoubleList> model_scores = 4; + * + * map<string, .google.cloud.discoveryengine.v1beta.DoubleList> model_scores = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ @java.lang.Override @@ -3870,10 +4410,11 @@ public boolean containsModelScores(java.lang.String key) { * * *
            -     * Google provided available scores.
            +     * Output only. Google provided available scores.
                  * 
            * - * map<string, .google.cloud.discoveryengine.v1beta.DoubleList> model_scores = 4; + * + * map<string, .google.cloud.discoveryengine.v1beta.DoubleList> model_scores = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ @java.lang.Override @@ -3894,10 +4435,11 @@ public boolean containsModelScores(java.lang.String key) { * * *
            -     * Google provided available scores.
            +     * Output only. Google provided available scores.
                  * 
            * - * map<string, .google.cloud.discoveryengine.v1beta.DoubleList> model_scores = 4; + * + * map<string, .google.cloud.discoveryengine.v1beta.DoubleList> model_scores = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ @java.lang.Override @@ -3922,7 +4464,7 @@ public com.google.cloud.discoveryengine.v1beta.DoubleList getModelScoresOrThrow( * * *
            -     * A set of ranking signals associated with the result.
            +     * Optional. A set of ranking signals associated with the result.
                  * 
            * * @@ -3940,7 +4482,7 @@ public boolean hasRankSignals() { * * *
            -     * A set of ranking signals associated with the result.
            +     * Optional. A set of ranking signals associated with the result.
                  * 
            * * @@ -3962,7 +4504,7 @@ public boolean hasRankSignals() { * * *
            -     * A set of ranking signals associated with the result.
            +     * Optional. A set of ranking signals associated with the result.
                  * 
            * * @@ -5080,10 +5622,11 @@ public int getModelScoresCount() { * * *
            -       * Google provided available scores.
            +       * Output only. Google provided available scores.
                    * 
            * - * map<string, .google.cloud.discoveryengine.v1beta.DoubleList> model_scores = 4; + * + * map<string, .google.cloud.discoveryengine.v1beta.DoubleList> model_scores = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ @java.lang.Override @@ -5106,10 +5649,11 @@ public boolean containsModelScores(java.lang.String key) { * * *
            -       * Google provided available scores.
            +       * Output only. Google provided available scores.
                    * 
            * - * map<string, .google.cloud.discoveryengine.v1beta.DoubleList> model_scores = 4; + * + * map<string, .google.cloud.discoveryengine.v1beta.DoubleList> model_scores = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ @java.lang.Override @@ -5122,10 +5666,11 @@ public boolean containsModelScores(java.lang.String key) { * * *
            -       * Google provided available scores.
            +       * Output only. Google provided available scores.
                    * 
            * - * map<string, .google.cloud.discoveryengine.v1beta.DoubleList> model_scores = 4; + * + * map<string, .google.cloud.discoveryengine.v1beta.DoubleList> model_scores = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ @java.lang.Override @@ -5146,10 +5691,11 @@ public boolean containsModelScores(java.lang.String key) { * * *
            -       * Google provided available scores.
            +       * Output only. Google provided available scores.
                    * 
            * - * map<string, .google.cloud.discoveryengine.v1beta.DoubleList> model_scores = 4; + * + * map<string, .google.cloud.discoveryengine.v1beta.DoubleList> model_scores = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ @java.lang.Override @@ -5176,10 +5722,11 @@ public Builder clearModelScores() { * * *
            -       * Google provided available scores.
            +       * Output only. Google provided available scores.
                    * 
            * - * map<string, .google.cloud.discoveryengine.v1beta.DoubleList> model_scores = 4; + * + * map<string, .google.cloud.discoveryengine.v1beta.DoubleList> model_scores = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ public Builder removeModelScores(java.lang.String key) { @@ -5202,10 +5749,11 @@ public Builder removeModelScores(java.lang.String key) { * * *
            -       * Google provided available scores.
            +       * Output only. Google provided available scores.
                    * 
            * - * map<string, .google.cloud.discoveryengine.v1beta.DoubleList> model_scores = 4; + * + * map<string, .google.cloud.discoveryengine.v1beta.DoubleList> model_scores = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ public Builder putModelScores( @@ -5225,10 +5773,11 @@ public Builder putModelScores( * * *
            -       * Google provided available scores.
            +       * Output only. Google provided available scores.
                    * 
            * - * map<string, .google.cloud.discoveryengine.v1beta.DoubleList> model_scores = 4; + * + * map<string, .google.cloud.discoveryengine.v1beta.DoubleList> model_scores = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ public Builder putAllModelScores( @@ -5250,10 +5799,11 @@ public Builder putAllModelScores( * * *
            -       * Google provided available scores.
            +       * Output only. Google provided available scores.
                    * 
            * - * map<string, .google.cloud.discoveryengine.v1beta.DoubleList> model_scores = 4; + * + * map<string, .google.cloud.discoveryengine.v1beta.DoubleList> model_scores = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ public com.google.cloud.discoveryengine.v1beta.DoubleList.Builder @@ -5286,7 +5836,7 @@ public Builder putAllModelScores( * * *
            -       * A set of ranking signals associated with the result.
            +       * Optional. A set of ranking signals associated with the result.
                    * 
            * * @@ -5303,7 +5853,7 @@ public boolean hasRankSignals() { * * *
            -       * A set of ranking signals associated with the result.
            +       * Optional. A set of ranking signals associated with the result.
                    * 
            * * @@ -5328,7 +5878,7 @@ public boolean hasRankSignals() { * * *
            -       * A set of ranking signals associated with the result.
            +       * Optional. A set of ranking signals associated with the result.
                    * 
            * * @@ -5354,7 +5904,7 @@ public Builder setRankSignals( * * *
            -       * A set of ranking signals associated with the result.
            +       * Optional. A set of ranking signals associated with the result.
                    * 
            * * @@ -5378,7 +5928,7 @@ public Builder setRankSignals( * * *
            -       * A set of ranking signals associated with the result.
            +       * Optional. A set of ranking signals associated with the result.
                    * 
            * * @@ -5411,7 +5961,7 @@ public Builder mergeRankSignals( * * *
            -       * A set of ranking signals associated with the result.
            +       * Optional. A set of ranking signals associated with the result.
                    * 
            * * @@ -5433,7 +5983,7 @@ public Builder clearRankSignals() { * * *
            -       * A set of ranking signals associated with the result.
            +       * Optional. A set of ranking signals associated with the result.
                    * 
            * * @@ -5451,7 +6001,7 @@ public Builder clearRankSignals() { * * *
            -       * A set of ranking signals associated with the result.
            +       * Optional. A set of ranking signals associated with the result.
                    * 
            * * @@ -5475,7 +6025,7 @@ public Builder clearRankSignals() { * * *
            -       * A set of ranking signals associated with the result.
            +       * Optional. A set of ranking signals associated with the result.
                    * 
            * * @@ -11011,6 +11561,18 @@ public enum SummarySkippedReason implements com.google.protobuf.ProtocolMessageE * NON_SUMMARY_SEEKING_QUERY_IGNORED_V2 = 9; */ NON_SUMMARY_SEEKING_QUERY_IGNORED_V2(9), + /** + * + * + *
            +       * The time out case.
            +       *
            +       * Google skips the summary if the time out.
            +       * 
            + * + * TIME_OUT = 10; + */ + TIME_OUT(10), UNRECOGNIZED(-1), ; @@ -11168,6 +11730,19 @@ public enum SummarySkippedReason implements com.google.protobuf.ProtocolMessageE */ public static final int NON_SUMMARY_SEEKING_QUERY_IGNORED_V2_VALUE = 9; + /** + * + * + *
            +       * The time out case.
            +       *
            +       * Google skips the summary if the time out.
            +       * 
            + * + * TIME_OUT = 10; + */ + public static final int TIME_OUT_VALUE = 10; + public final int getNumber() { if (this == UNRECOGNIZED) { throw new java.lang.IllegalArgumentException( @@ -11212,6 +11787,8 @@ public static SummarySkippedReason forNumber(int value) { return CUSTOMER_POLICY_VIOLATION; case 9: return NON_SUMMARY_SEEKING_QUERY_IGNORED_V2; + case 10: + return TIME_OUT; default: return null; } @@ -15639,6 +16216,52 @@ public interface ChunkContentOrBuilder * @return The bytes for pageIdentifier. */ com.google.protobuf.ByteString getPageIdentifierBytes(); + + /** + * + * + *
            +         * Output only. Stores indexes of blobattachments linked to this chunk.
            +         * 
            + * + * + * repeated int64 blob_attachment_indexes = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return A list containing the blobAttachmentIndexes. + */ + java.util.List getBlobAttachmentIndexesList(); + + /** + * + * + *
            +         * Output only. Stores indexes of blobattachments linked to this chunk.
            +         * 
            + * + * + * repeated int64 blob_attachment_indexes = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The count of blobAttachmentIndexes. + */ + int getBlobAttachmentIndexesCount(); + + /** + * + * + *
            +         * Output only. Stores indexes of blobattachments linked to this chunk.
            +         * 
            + * + * + * repeated int64 blob_attachment_indexes = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index of the element to return. + * @return The blobAttachmentIndexes at the given index. + */ + long getBlobAttachmentIndexes(int index); } /** @@ -15675,6 +16298,7 @@ private ChunkContent(com.google.protobuf.GeneratedMessage.Builder builder) { private ChunkContent() { content_ = ""; pageIdentifier_ = ""; + blobAttachmentIndexes_ = emptyLongList(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @@ -15800,6 +16424,66 @@ public com.google.protobuf.ByteString getPageIdentifierBytes() { } } + public static final int BLOB_ATTACHMENT_INDEXES_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private com.google.protobuf.Internal.LongList blobAttachmentIndexes_ = emptyLongList(); + + /** + * + * + *
            +         * Output only. Stores indexes of blobattachments linked to this chunk.
            +         * 
            + * + * + * repeated int64 blob_attachment_indexes = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return A list containing the blobAttachmentIndexes. + */ + @java.lang.Override + public java.util.List getBlobAttachmentIndexesList() { + return blobAttachmentIndexes_; + } + + /** + * + * + *
            +         * Output only. Stores indexes of blobattachments linked to this chunk.
            +         * 
            + * + * + * repeated int64 blob_attachment_indexes = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The count of blobAttachmentIndexes. + */ + public int getBlobAttachmentIndexesCount() { + return blobAttachmentIndexes_.size(); + } + + /** + * + * + *
            +         * Output only. Stores indexes of blobattachments linked to this chunk.
            +         * 
            + * + * + * repeated int64 blob_attachment_indexes = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index of the element to return. + * @return The blobAttachmentIndexes at the given index. + */ + public long getBlobAttachmentIndexes(int index) { + return blobAttachmentIndexes_.getLong(index); + } + + private int blobAttachmentIndexesMemoizedSerializedSize = -1; + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -15815,12 +16499,20 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + getSerializedSize(); if (!com.google.protobuf.GeneratedMessage.isStringEmpty(content_)) { com.google.protobuf.GeneratedMessage.writeString(output, 1, content_); } if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageIdentifier_)) { com.google.protobuf.GeneratedMessage.writeString(output, 2, pageIdentifier_); } + if (getBlobAttachmentIndexesList().size() > 0) { + output.writeUInt32NoTag(34); + output.writeUInt32NoTag(blobAttachmentIndexesMemoizedSerializedSize); + } + for (int i = 0; i < blobAttachmentIndexes_.size(); i++) { + output.writeInt64NoTag(blobAttachmentIndexes_.getLong(i)); + } getUnknownFields().writeTo(output); } @@ -15836,6 +16528,20 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageIdentifier_)) { size += com.google.protobuf.GeneratedMessage.computeStringSize(2, pageIdentifier_); } + { + int dataSize = 0; + for (int i = 0; i < blobAttachmentIndexes_.size(); i++) { + dataSize += + com.google.protobuf.CodedOutputStream.computeInt64SizeNoTag( + blobAttachmentIndexes_.getLong(i)); + } + size += dataSize; + if (!getBlobAttachmentIndexesList().isEmpty()) { + size += 1; + size += com.google.protobuf.CodedOutputStream.computeInt32SizeNoTag(dataSize); + } + blobAttachmentIndexesMemoizedSerializedSize = dataSize; + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -15860,6 +16566,8 @@ public boolean equals(final java.lang.Object obj) { if (!getContent().equals(other.getContent())) return false; if (!getPageIdentifier().equals(other.getPageIdentifier())) return false; + if (!getBlobAttachmentIndexesList().equals(other.getBlobAttachmentIndexesList())) + return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -15875,6 +16583,10 @@ public int hashCode() { hash = (53 * hash) + getContent().hashCode(); hash = (37 * hash) + PAGE_IDENTIFIER_FIELD_NUMBER; hash = (53 * hash) + getPageIdentifier().hashCode(); + if (getBlobAttachmentIndexesCount() > 0) { + hash = (37 * hash) + BLOB_ATTACHMENT_INDEXES_FIELD_NUMBER; + hash = (53 * hash) + getBlobAttachmentIndexesList().hashCode(); + } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -16047,6 +16759,7 @@ public Builder clear() { bitField0_ = 0; content_ = ""; pageIdentifier_ = ""; + blobAttachmentIndexes_ = emptyLongList(); return this; } @@ -16101,6 +16814,10 @@ private void buildPartial0( if (((from_bitField0_ & 0x00000002) != 0)) { result.pageIdentifier_ = pageIdentifier_; } + if (((from_bitField0_ & 0x00000004) != 0)) { + blobAttachmentIndexes_.makeImmutable(); + result.blobAttachmentIndexes_ = blobAttachmentIndexes_; + } } @java.lang.Override @@ -16135,6 +16852,17 @@ public Builder mergeFrom( bitField0_ |= 0x00000002; onChanged(); } + if (!other.blobAttachmentIndexes_.isEmpty()) { + if (blobAttachmentIndexes_.isEmpty()) { + blobAttachmentIndexes_ = other.blobAttachmentIndexes_; + blobAttachmentIndexes_.makeImmutable(); + bitField0_ |= 0x00000004; + } else { + ensureBlobAttachmentIndexesIsMutable(); + blobAttachmentIndexes_.addAll(other.blobAttachmentIndexes_); + } + onChanged(); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -16173,6 +16901,24 @@ public Builder mergeFrom( bitField0_ |= 0x00000002; break; } // case 18 + case 32: + { + long v = input.readInt64(); + ensureBlobAttachmentIndexesIsMutable(); + blobAttachmentIndexes_.addLong(v); + break; + } // case 32 + case 34: + { + int length = input.readRawVarint32(); + int limit = input.pushLimit(length); + ensureBlobAttachmentIndexesIsMutable(); + while (input.getBytesUntilLimit() > 0) { + blobAttachmentIndexes_.addLong(input.readInt64()); + } + input.popLimit(limit); + break; + } // case 34 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -16414,6 +17160,158 @@ public Builder setPageIdentifierBytes(com.google.protobuf.ByteString value) { return this; } + private com.google.protobuf.Internal.LongList blobAttachmentIndexes_ = emptyLongList(); + + private void ensureBlobAttachmentIndexesIsMutable() { + if (!blobAttachmentIndexes_.isModifiable()) { + blobAttachmentIndexes_ = makeMutableCopy(blobAttachmentIndexes_); + } + bitField0_ |= 0x00000004; + } + + /** + * + * + *
            +           * Output only. Stores indexes of blobattachments linked to this chunk.
            +           * 
            + * + * + * repeated int64 blob_attachment_indexes = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return A list containing the blobAttachmentIndexes. + */ + public java.util.List getBlobAttachmentIndexesList() { + blobAttachmentIndexes_.makeImmutable(); + return blobAttachmentIndexes_; + } + + /** + * + * + *
            +           * Output only. Stores indexes of blobattachments linked to this chunk.
            +           * 
            + * + * + * repeated int64 blob_attachment_indexes = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The count of blobAttachmentIndexes. + */ + public int getBlobAttachmentIndexesCount() { + return blobAttachmentIndexes_.size(); + } + + /** + * + * + *
            +           * Output only. Stores indexes of blobattachments linked to this chunk.
            +           * 
            + * + * + * repeated int64 blob_attachment_indexes = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index of the element to return. + * @return The blobAttachmentIndexes at the given index. + */ + public long getBlobAttachmentIndexes(int index) { + return blobAttachmentIndexes_.getLong(index); + } + + /** + * + * + *
            +           * Output only. Stores indexes of blobattachments linked to this chunk.
            +           * 
            + * + * + * repeated int64 blob_attachment_indexes = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index to set the value at. + * @param value The blobAttachmentIndexes to set. + * @return This builder for chaining. + */ + public Builder setBlobAttachmentIndexes(int index, long value) { + + ensureBlobAttachmentIndexesIsMutable(); + blobAttachmentIndexes_.setLong(index, value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
            +           * Output only. Stores indexes of blobattachments linked to this chunk.
            +           * 
            + * + * + * repeated int64 blob_attachment_indexes = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The blobAttachmentIndexes to add. + * @return This builder for chaining. + */ + public Builder addBlobAttachmentIndexes(long value) { + + ensureBlobAttachmentIndexesIsMutable(); + blobAttachmentIndexes_.addLong(value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
            +           * Output only. Stores indexes of blobattachments linked to this chunk.
            +           * 
            + * + * + * repeated int64 blob_attachment_indexes = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param values The blobAttachmentIndexes to add. + * @return This builder for chaining. + */ + public Builder addAllBlobAttachmentIndexes( + java.lang.Iterable values) { + ensureBlobAttachmentIndexesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, blobAttachmentIndexes_); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
            +           * Output only. Stores indexes of blobattachments linked to this chunk.
            +           * 
            + * + * + * repeated int64 blob_attachment_indexes = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearBlobAttachmentIndexes() { + blobAttachmentIndexes_ = emptyLongList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.SearchResponse.Summary.Reference.ChunkContent) } @@ -18079,168 +18977,101 @@ public com.google.protobuf.Parser getParserForType() { } } - public interface SummaryWithMetadataOrBuilder + public interface BlobAttachmentOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.SearchResponse.Summary.SummaryWithMetadata) + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.SearchResponse.Summary.BlobAttachment) com.google.protobuf.MessageOrBuilder { /** * * *
            -       * Summary text with no citation information.
            -       * 
            - * - * string summary = 1; - * - * @return The summary. - */ - java.lang.String getSummary(); - - /** - * - * - *
            -       * Summary text with no citation information.
            -       * 
            - * - * string summary = 1; - * - * @return The bytes for summary. - */ - com.google.protobuf.ByteString getSummaryBytes(); - - /** - * - * - *
            -       * Citation metadata for given summary.
            +       * Output only. The blob data.
                    * 
            * * - * .google.cloud.discoveryengine.v1beta.SearchResponse.Summary.CitationMetadata citation_metadata = 2; + * .google.cloud.discoveryengine.v1beta.SearchResponse.Summary.BlobAttachment.Blob data = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * - * @return Whether the citationMetadata field is set. + * @return Whether the data field is set. */ - boolean hasCitationMetadata(); + boolean hasData(); /** * * *
            -       * Citation metadata for given summary.
            +       * Output only. The blob data.
                    * 
            * * - * .google.cloud.discoveryengine.v1beta.SearchResponse.Summary.CitationMetadata citation_metadata = 2; + * .google.cloud.discoveryengine.v1beta.SearchResponse.Summary.BlobAttachment.Blob data = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * - * @return The citationMetadata. - */ - com.google.cloud.discoveryengine.v1beta.SearchResponse.Summary.CitationMetadata - getCitationMetadata(); - - /** - * - * - *
            -       * Citation metadata for given summary.
            -       * 
            - * - * - * .google.cloud.discoveryengine.v1beta.SearchResponse.Summary.CitationMetadata citation_metadata = 2; - * + * @return The data. */ - com.google.cloud.discoveryengine.v1beta.SearchResponse.Summary.CitationMetadataOrBuilder - getCitationMetadataOrBuilder(); + com.google.cloud.discoveryengine.v1beta.SearchResponse.Summary.BlobAttachment.Blob getData(); /** * * *
            -       * Document References.
            +       * Output only. The blob data.
                    * 
            * * - * repeated .google.cloud.discoveryengine.v1beta.SearchResponse.Summary.Reference references = 3; + * .google.cloud.discoveryengine.v1beta.SearchResponse.Summary.BlobAttachment.Blob data = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ - java.util.List - getReferencesList(); + com.google.cloud.discoveryengine.v1beta.SearchResponse.Summary.BlobAttachment.BlobOrBuilder + getDataOrBuilder(); /** * * *
            -       * Document References.
            +       * Output only. The attribution type of the blob.
                    * 
            * * - * repeated .google.cloud.discoveryengine.v1beta.SearchResponse.Summary.Reference references = 3; + * .google.cloud.discoveryengine.v1beta.SearchResponse.Summary.BlobAttachment.AttributionType attribution_type = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; * - */ - com.google.cloud.discoveryengine.v1beta.SearchResponse.Summary.Reference getReferences( - int index); - - /** - * - * - *
            -       * Document References.
            -       * 
            * - * - * repeated .google.cloud.discoveryengine.v1beta.SearchResponse.Summary.Reference references = 3; - * + * @return The enum numeric value on the wire for attributionType. */ - int getReferencesCount(); + int getAttributionTypeValue(); /** * * *
            -       * Document References.
            +       * Output only. The attribution type of the blob.
                    * 
            * * - * repeated .google.cloud.discoveryengine.v1beta.SearchResponse.Summary.Reference references = 3; + * .google.cloud.discoveryengine.v1beta.SearchResponse.Summary.BlobAttachment.AttributionType attribution_type = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; * - */ - java.util.List< - ? extends - com.google.cloud.discoveryengine.v1beta.SearchResponse.Summary.ReferenceOrBuilder> - getReferencesOrBuilderList(); - - /** - * - * - *
            -       * Document References.
            -       * 
            * - * - * repeated .google.cloud.discoveryengine.v1beta.SearchResponse.Summary.Reference references = 3; - * + * @return The attributionType. */ - com.google.cloud.discoveryengine.v1beta.SearchResponse.Summary.ReferenceOrBuilder - getReferencesOrBuilder(int index); + com.google.cloud.discoveryengine.v1beta.SearchResponse.Summary.BlobAttachment.AttributionType + getAttributionType(); } /** * * *
            -     * Summary with metadata information.
            +     * Stores binarydata attached to text answer, e.g. image, video, audio, etc.
                  * 
            * * Protobuf type {@code - * google.cloud.discoveryengine.v1beta.SearchResponse.Summary.SummaryWithMetadata} + * google.cloud.discoveryengine.v1beta.SearchResponse.Summary.BlobAttachment} */ - public static final class SummaryWithMetadata extends com.google.protobuf.GeneratedMessage + public static final class BlobAttachment extends com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.SearchResponse.Summary.SummaryWithMetadata) - SummaryWithMetadataOrBuilder { + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.SearchResponse.Summary.BlobAttachment) + BlobAttachmentOrBuilder { private static final long serialVersionUID = 0L; static { @@ -18250,92 +19081,2236 @@ public static final class SummaryWithMetadata extends com.google.protobuf.Genera /* minor= */ 33, /* patch= */ 2, /* suffix= */ "", - "SummaryWithMetadata"); + "BlobAttachment"); } - // Use SummaryWithMetadata.newBuilder() to construct. - private SummaryWithMetadata(com.google.protobuf.GeneratedMessage.Builder builder) { + // Use BlobAttachment.newBuilder() to construct. + private BlobAttachment(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } - private SummaryWithMetadata() { - summary_ = ""; - references_ = java.util.Collections.emptyList(); + private BlobAttachment() { + attributionType_ = 0; } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.discoveryengine.v1beta.SearchServiceProto - .internal_static_google_cloud_discoveryengine_v1beta_SearchResponse_Summary_SummaryWithMetadata_descriptor; + .internal_static_google_cloud_discoveryengine_v1beta_SearchResponse_Summary_BlobAttachment_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.discoveryengine.v1beta.SearchServiceProto - .internal_static_google_cloud_discoveryengine_v1beta_SearchResponse_Summary_SummaryWithMetadata_fieldAccessorTable + .internal_static_google_cloud_discoveryengine_v1beta_SearchResponse_Summary_BlobAttachment_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.discoveryengine.v1beta.SearchResponse.Summary.SummaryWithMetadata - .class, - com.google.cloud.discoveryengine.v1beta.SearchResponse.Summary.SummaryWithMetadata + com.google.cloud.discoveryengine.v1beta.SearchResponse.Summary.BlobAttachment.class, + com.google.cloud.discoveryengine.v1beta.SearchResponse.Summary.BlobAttachment .Builder.class); } - private int bitField0_; - public static final int SUMMARY_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object summary_ = ""; - /** * * *
            -       * Summary text with no citation information.
            +       * Defines the attribution type of the blob.
                    * 
            * - * string summary = 1; - * - * @return The summary. + * Protobuf enum {@code + * google.cloud.discoveryengine.v1beta.SearchResponse.Summary.BlobAttachment.AttributionType} */ - @java.lang.Override - public java.lang.String getSummary() { - java.lang.Object ref = summary_; - 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(); - summary_ = s; - return s; + public enum AttributionType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
            +         * Unspecified attribution type.
            +         * 
            + * + * ATTRIBUTION_TYPE_UNSPECIFIED = 0; + */ + ATTRIBUTION_TYPE_UNSPECIFIED(0), + /** + * + * + *
            +         * The attachment data is from the corpus.
            +         * 
            + * + * CORPUS = 1; + */ + CORPUS(1), + /** + * + * + *
            +         * The attachment data is generated by the model through code
            +         * generation.
            +         * 
            + * + * GENERATED = 2; + */ + GENERATED(2), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "AttributionType"); + } + + /** + * + * + *
            +         * Unspecified attribution type.
            +         * 
            + * + * ATTRIBUTION_TYPE_UNSPECIFIED = 0; + */ + public static final int ATTRIBUTION_TYPE_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
            +         * The attachment data is from the corpus.
            +         * 
            + * + * CORPUS = 1; + */ + public static final int CORPUS_VALUE = 1; + + /** + * + * + *
            +         * The attachment data is generated by the model through code
            +         * generation.
            +         * 
            + * + * GENERATED = 2; + */ + public static final int GENERATED_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 AttributionType 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 AttributionType forNumber(int value) { + switch (value) { + case 0: + return ATTRIBUTION_TYPE_UNSPECIFIED; + case 1: + return CORPUS; + case 2: + return GENERATED; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap + internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public AttributionType findValueByNumber(int number) { + return AttributionType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.SearchResponse.Summary.BlobAttachment + .getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final AttributionType[] VALUES = values(); + + public static AttributionType valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private AttributionType(int value) { + this.value = value; } + + // @@protoc_insertion_point(enum_scope:google.cloud.discoveryengine.v1beta.SearchResponse.Summary.BlobAttachment.AttributionType) + } + + public interface BlobOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.SearchResponse.Summary.BlobAttachment.Blob) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
            +         * Output only. The media type (MIME type) of the generated data.
            +         * 
            + * + * string mime_type = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The mimeType. + */ + java.lang.String getMimeType(); + + /** + * + * + *
            +         * Output only. The media type (MIME type) of the generated data.
            +         * 
            + * + * string mime_type = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for mimeType. + */ + com.google.protobuf.ByteString getMimeTypeBytes(); + + /** + * + * + *
            +         * Output only. Raw bytes.
            +         * 
            + * + * bytes data = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The data. + */ + com.google.protobuf.ByteString getData(); } /** * * *
            -       * Summary text with no citation information.
            +       * Stores type and data of the blob.
                    * 
            * - * string summary = 1; - * - * @return The bytes for summary. + * Protobuf type {@code + * google.cloud.discoveryengine.v1beta.SearchResponse.Summary.BlobAttachment.Blob} */ - @java.lang.Override - public com.google.protobuf.ByteString getSummaryBytes() { - java.lang.Object ref = summary_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - summary_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } + public static final class Blob extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.SearchResponse.Summary.BlobAttachment.Blob) + BlobOrBuilder { + private static final long serialVersionUID = 0L; - public static final int CITATION_METADATA_FIELD_NUMBER = 2; - private com.google.cloud.discoveryengine.v1beta.SearchResponse.Summary.CitationMetadata + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Blob"); + } + + // Use Blob.newBuilder() to construct. + private Blob(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private Blob() { + mimeType_ = ""; + data_ = com.google.protobuf.ByteString.EMPTY; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_SearchResponse_Summary_BlobAttachment_Blob_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_SearchResponse_Summary_BlobAttachment_Blob_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.SearchResponse.Summary.BlobAttachment.Blob + .class, + com.google.cloud.discoveryengine.v1beta.SearchResponse.Summary.BlobAttachment.Blob + .Builder.class); + } + + public static final int MIME_TYPE_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object mimeType_ = ""; + + /** + * + * + *
            +         * Output only. The media type (MIME type) of the generated data.
            +         * 
            + * + * string mime_type = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The mimeType. + */ + @java.lang.Override + public java.lang.String getMimeType() { + java.lang.Object ref = mimeType_; + 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(); + mimeType_ = s; + return s; + } + } + + /** + * + * + *
            +         * Output only. The media type (MIME type) of the generated data.
            +         * 
            + * + * string mime_type = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for mimeType. + */ + @java.lang.Override + public com.google.protobuf.ByteString getMimeTypeBytes() { + java.lang.Object ref = mimeType_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + mimeType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DATA_FIELD_NUMBER = 2; + private com.google.protobuf.ByteString data_ = com.google.protobuf.ByteString.EMPTY; + + /** + * + * + *
            +         * Output only. Raw bytes.
            +         * 
            + * + * bytes data = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The data. + */ + @java.lang.Override + public com.google.protobuf.ByteString getData() { + return data_; + } + + 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(mimeType_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, mimeType_); + } + if (!data_.isEmpty()) { + output.writeBytes(2, data_); + } + 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(mimeType_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, mimeType_); + } + if (!data_.isEmpty()) { + size += com.google.protobuf.CodedOutputStream.computeBytesSize(2, data_); + } + 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.discoveryengine.v1beta.SearchResponse.Summary.BlobAttachment.Blob)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1beta.SearchResponse.Summary.BlobAttachment.Blob other = + (com.google.cloud.discoveryengine.v1beta.SearchResponse.Summary.BlobAttachment.Blob) + obj; + + if (!getMimeType().equals(other.getMimeType())) return false; + if (!getData().equals(other.getData())) 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) + MIME_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getMimeType().hashCode(); + hash = (37 * hash) + DATA_FIELD_NUMBER; + hash = (53 * hash) + getData().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1beta.SearchResponse.Summary.BlobAttachment + .Blob + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.SearchResponse.Summary.BlobAttachment + .Blob + 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.discoveryengine.v1beta.SearchResponse.Summary.BlobAttachment + .Blob + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.SearchResponse.Summary.BlobAttachment + .Blob + 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.discoveryengine.v1beta.SearchResponse.Summary.BlobAttachment + .Blob + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.SearchResponse.Summary.BlobAttachment + .Blob + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1beta.SearchResponse.Summary.BlobAttachment + .Blob + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.SearchResponse.Summary.BlobAttachment + .Blob + 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.discoveryengine.v1beta.SearchResponse.Summary.BlobAttachment + .Blob + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.SearchResponse.Summary.BlobAttachment + .Blob + 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.discoveryengine.v1beta.SearchResponse.Summary.BlobAttachment + .Blob + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.SearchResponse.Summary.BlobAttachment + .Blob + 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.discoveryengine.v1beta.SearchResponse.Summary.BlobAttachment.Blob + 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; + } + + /** + * + * + *
            +         * Stores type and data of the blob.
            +         * 
            + * + * Protobuf type {@code + * google.cloud.discoveryengine.v1beta.SearchResponse.Summary.BlobAttachment.Blob} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.SearchResponse.Summary.BlobAttachment.Blob) + com.google.cloud.discoveryengine.v1beta.SearchResponse.Summary.BlobAttachment + .BlobOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_SearchResponse_Summary_BlobAttachment_Blob_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_SearchResponse_Summary_BlobAttachment_Blob_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.SearchResponse.Summary.BlobAttachment + .Blob.class, + com.google.cloud.discoveryengine.v1beta.SearchResponse.Summary.BlobAttachment + .Blob.Builder.class); + } + + // Construct using + // com.google.cloud.discoveryengine.v1beta.SearchResponse.Summary.BlobAttachment.Blob.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + mimeType_ = ""; + data_ = com.google.protobuf.ByteString.EMPTY; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1beta.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_SearchResponse_Summary_BlobAttachment_Blob_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.SearchResponse.Summary.BlobAttachment.Blob + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1beta.SearchResponse.Summary.BlobAttachment + .Blob.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.SearchResponse.Summary.BlobAttachment.Blob + build() { + com.google.cloud.discoveryengine.v1beta.SearchResponse.Summary.BlobAttachment.Blob + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.SearchResponse.Summary.BlobAttachment.Blob + buildPartial() { + com.google.cloud.discoveryengine.v1beta.SearchResponse.Summary.BlobAttachment.Blob + result = + new com.google.cloud.discoveryengine.v1beta.SearchResponse.Summary + .BlobAttachment.Blob(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.discoveryengine.v1beta.SearchResponse.Summary.BlobAttachment.Blob + result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.mimeType_ = mimeType_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.data_ = data_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.discoveryengine.v1beta.SearchResponse.Summary.BlobAttachment + .Blob) { + return mergeFrom( + (com.google.cloud.discoveryengine.v1beta.SearchResponse.Summary.BlobAttachment + .Blob) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1beta.SearchResponse.Summary.BlobAttachment.Blob + other) { + if (other + == com.google.cloud.discoveryengine.v1beta.SearchResponse.Summary.BlobAttachment + .Blob.getDefaultInstance()) return this; + if (!other.getMimeType().isEmpty()) { + mimeType_ = other.mimeType_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getData().isEmpty()) { + setData(other.getData()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + mimeType_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + data_ = input.readBytes(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object mimeType_ = ""; + + /** + * + * + *
            +           * Output only. The media type (MIME type) of the generated data.
            +           * 
            + * + * string mime_type = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The mimeType. + */ + public java.lang.String getMimeType() { + java.lang.Object ref = mimeType_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + mimeType_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
            +           * Output only. The media type (MIME type) of the generated data.
            +           * 
            + * + * string mime_type = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for mimeType. + */ + public com.google.protobuf.ByteString getMimeTypeBytes() { + java.lang.Object ref = mimeType_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + mimeType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
            +           * Output only. The media type (MIME type) of the generated data.
            +           * 
            + * + * string mime_type = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The mimeType to set. + * @return This builder for chaining. + */ + public Builder setMimeType(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + mimeType_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
            +           * Output only. The media type (MIME type) of the generated data.
            +           * 
            + * + * string mime_type = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearMimeType() { + mimeType_ = getDefaultInstance().getMimeType(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
            +           * Output only. The media type (MIME type) of the generated data.
            +           * 
            + * + * string mime_type = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for mimeType to set. + * @return This builder for chaining. + */ + public Builder setMimeTypeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + mimeType_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.ByteString data_ = com.google.protobuf.ByteString.EMPTY; + + /** + * + * + *
            +           * Output only. Raw bytes.
            +           * 
            + * + * bytes data = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The data. + */ + @java.lang.Override + public com.google.protobuf.ByteString getData() { + return data_; + } + + /** + * + * + *
            +           * Output only. Raw bytes.
            +           * 
            + * + * bytes data = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The data to set. + * @return This builder for chaining. + */ + public Builder setData(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + data_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
            +           * Output only. Raw bytes.
            +           * 
            + * + * bytes data = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearData() { + bitField0_ = (bitField0_ & ~0x00000002); + data_ = getDefaultInstance().getData(); + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.SearchResponse.Summary.BlobAttachment.Blob) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.SearchResponse.Summary.BlobAttachment.Blob) + private static final com.google.cloud.discoveryengine.v1beta.SearchResponse.Summary + .BlobAttachment.Blob + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.discoveryengine.v1beta.SearchResponse.Summary.BlobAttachment + .Blob(); + } + + public static com.google.cloud.discoveryengine.v1beta.SearchResponse.Summary.BlobAttachment + .Blob + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Blob parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.SearchResponse.Summary.BlobAttachment.Blob + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int bitField0_; + public static final int DATA_FIELD_NUMBER = 1; + private com.google.cloud.discoveryengine.v1beta.SearchResponse.Summary.BlobAttachment.Blob + data_; + + /** + * + * + *
            +       * Output only. The blob data.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchResponse.Summary.BlobAttachment.Blob data = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the data field is set. + */ + @java.lang.Override + public boolean hasData() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
            +       * Output only. The blob data.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchResponse.Summary.BlobAttachment.Blob data = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The data. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.SearchResponse.Summary.BlobAttachment.Blob + getData() { + return data_ == null + ? com.google.cloud.discoveryengine.v1beta.SearchResponse.Summary.BlobAttachment.Blob + .getDefaultInstance() + : data_; + } + + /** + * + * + *
            +       * Output only. The blob data.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchResponse.Summary.BlobAttachment.Blob data = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.SearchResponse.Summary.BlobAttachment + .BlobOrBuilder + getDataOrBuilder() { + return data_ == null + ? com.google.cloud.discoveryengine.v1beta.SearchResponse.Summary.BlobAttachment.Blob + .getDefaultInstance() + : data_; + } + + public static final int ATTRIBUTION_TYPE_FIELD_NUMBER = 2; + private int attributionType_ = 0; + + /** + * + * + *
            +       * Output only. The attribution type of the blob.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchResponse.Summary.BlobAttachment.AttributionType attribution_type = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for attributionType. + */ + @java.lang.Override + public int getAttributionTypeValue() { + return attributionType_; + } + + /** + * + * + *
            +       * Output only. The attribution type of the blob.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchResponse.Summary.BlobAttachment.AttributionType attribution_type = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The attributionType. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.SearchResponse.Summary.BlobAttachment + .AttributionType + getAttributionType() { + com.google.cloud.discoveryengine.v1beta.SearchResponse.Summary.BlobAttachment + .AttributionType + result = + com.google.cloud.discoveryengine.v1beta.SearchResponse.Summary.BlobAttachment + .AttributionType.forNumber(attributionType_); + return result == null + ? com.google.cloud.discoveryengine.v1beta.SearchResponse.Summary.BlobAttachment + .AttributionType.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, getData()); + } + if (attributionType_ + != com.google.cloud.discoveryengine.v1beta.SearchResponse.Summary.BlobAttachment + .AttributionType.ATTRIBUTION_TYPE_UNSPECIFIED + .getNumber()) { + output.writeEnum(2, attributionType_); + } + 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, getData()); + } + if (attributionType_ + != com.google.cloud.discoveryengine.v1beta.SearchResponse.Summary.BlobAttachment + .AttributionType.ATTRIBUTION_TYPE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, attributionType_); + } + 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.discoveryengine.v1beta.SearchResponse.Summary.BlobAttachment)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1beta.SearchResponse.Summary.BlobAttachment other = + (com.google.cloud.discoveryengine.v1beta.SearchResponse.Summary.BlobAttachment) obj; + + if (hasData() != other.hasData()) return false; + if (hasData()) { + if (!getData().equals(other.getData())) return false; + } + if (attributionType_ != other.attributionType_) 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 (hasData()) { + hash = (37 * hash) + DATA_FIELD_NUMBER; + hash = (53 * hash) + getData().hashCode(); + } + hash = (37 * hash) + ATTRIBUTION_TYPE_FIELD_NUMBER; + hash = (53 * hash) + attributionType_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1beta.SearchResponse.Summary.BlobAttachment + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.SearchResponse.Summary.BlobAttachment + 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.discoveryengine.v1beta.SearchResponse.Summary.BlobAttachment + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.SearchResponse.Summary.BlobAttachment + 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.discoveryengine.v1beta.SearchResponse.Summary.BlobAttachment + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.SearchResponse.Summary.BlobAttachment + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1beta.SearchResponse.Summary.BlobAttachment + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.SearchResponse.Summary.BlobAttachment + 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.discoveryengine.v1beta.SearchResponse.Summary.BlobAttachment + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.SearchResponse.Summary.BlobAttachment + 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.discoveryengine.v1beta.SearchResponse.Summary.BlobAttachment + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.SearchResponse.Summary.BlobAttachment + 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.discoveryengine.v1beta.SearchResponse.Summary.BlobAttachment 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; + } + + /** + * + * + *
            +       * Stores binarydata attached to text answer, e.g. image, video, audio, etc.
            +       * 
            + * + * Protobuf type {@code + * google.cloud.discoveryengine.v1beta.SearchResponse.Summary.BlobAttachment} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.SearchResponse.Summary.BlobAttachment) + com.google.cloud.discoveryengine.v1beta.SearchResponse.Summary.BlobAttachmentOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_SearchResponse_Summary_BlobAttachment_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_SearchResponse_Summary_BlobAttachment_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.SearchResponse.Summary.BlobAttachment + .class, + com.google.cloud.discoveryengine.v1beta.SearchResponse.Summary.BlobAttachment + .Builder.class); + } + + // Construct using + // com.google.cloud.discoveryengine.v1beta.SearchResponse.Summary.BlobAttachment.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetDataFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + data_ = null; + if (dataBuilder_ != null) { + dataBuilder_.dispose(); + dataBuilder_ = null; + } + attributionType_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1beta.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_SearchResponse_Summary_BlobAttachment_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.SearchResponse.Summary.BlobAttachment + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1beta.SearchResponse.Summary.BlobAttachment + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.SearchResponse.Summary.BlobAttachment + build() { + com.google.cloud.discoveryengine.v1beta.SearchResponse.Summary.BlobAttachment result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.SearchResponse.Summary.BlobAttachment + buildPartial() { + com.google.cloud.discoveryengine.v1beta.SearchResponse.Summary.BlobAttachment result = + new com.google.cloud.discoveryengine.v1beta.SearchResponse.Summary.BlobAttachment( + this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.discoveryengine.v1beta.SearchResponse.Summary.BlobAttachment result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.data_ = dataBuilder_ == null ? data_ : dataBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.attributionType_ = attributionType_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.discoveryengine.v1beta.SearchResponse.Summary.BlobAttachment) { + return mergeFrom( + (com.google.cloud.discoveryengine.v1beta.SearchResponse.Summary.BlobAttachment) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1beta.SearchResponse.Summary.BlobAttachment other) { + if (other + == com.google.cloud.discoveryengine.v1beta.SearchResponse.Summary.BlobAttachment + .getDefaultInstance()) return this; + if (other.hasData()) { + mergeData(other.getData()); + } + if (other.attributionType_ != 0) { + setAttributionTypeValue(other.getAttributionTypeValue()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage( + internalGetDataFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + attributionType_ = input.readEnum(); + bitField0_ |= 0x00000002; + break; + } // case 16 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.cloud.discoveryengine.v1beta.SearchResponse.Summary.BlobAttachment.Blob + data_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.SearchResponse.Summary.BlobAttachment.Blob, + com.google.cloud.discoveryengine.v1beta.SearchResponse.Summary.BlobAttachment.Blob + .Builder, + com.google.cloud.discoveryengine.v1beta.SearchResponse.Summary.BlobAttachment + .BlobOrBuilder> + dataBuilder_; + + /** + * + * + *
            +         * Output only. The blob data.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchResponse.Summary.BlobAttachment.Blob data = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the data field is set. + */ + public boolean hasData() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
            +         * Output only. The blob data.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchResponse.Summary.BlobAttachment.Blob data = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The data. + */ + public com.google.cloud.discoveryengine.v1beta.SearchResponse.Summary.BlobAttachment.Blob + getData() { + if (dataBuilder_ == null) { + return data_ == null + ? com.google.cloud.discoveryengine.v1beta.SearchResponse.Summary.BlobAttachment.Blob + .getDefaultInstance() + : data_; + } else { + return dataBuilder_.getMessage(); + } + } + + /** + * + * + *
            +         * Output only. The blob data.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchResponse.Summary.BlobAttachment.Blob data = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setData( + com.google.cloud.discoveryengine.v1beta.SearchResponse.Summary.BlobAttachment.Blob + value) { + if (dataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + data_ = value; + } else { + dataBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
            +         * Output only. The blob data.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchResponse.Summary.BlobAttachment.Blob data = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setData( + com.google.cloud.discoveryengine.v1beta.SearchResponse.Summary.BlobAttachment.Blob + .Builder + builderForValue) { + if (dataBuilder_ == null) { + data_ = builderForValue.build(); + } else { + dataBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
            +         * Output only. The blob data.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchResponse.Summary.BlobAttachment.Blob data = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeData( + com.google.cloud.discoveryengine.v1beta.SearchResponse.Summary.BlobAttachment.Blob + value) { + if (dataBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && data_ != null + && data_ + != com.google.cloud.discoveryengine.v1beta.SearchResponse.Summary.BlobAttachment + .Blob.getDefaultInstance()) { + getDataBuilder().mergeFrom(value); + } else { + data_ = value; + } + } else { + dataBuilder_.mergeFrom(value); + } + if (data_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + + /** + * + * + *
            +         * Output only. The blob data.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchResponse.Summary.BlobAttachment.Blob data = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearData() { + bitField0_ = (bitField0_ & ~0x00000001); + data_ = null; + if (dataBuilder_ != null) { + dataBuilder_.dispose(); + dataBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
            +         * Output only. The blob data.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchResponse.Summary.BlobAttachment.Blob data = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.discoveryengine.v1beta.SearchResponse.Summary.BlobAttachment.Blob + .Builder + getDataBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return internalGetDataFieldBuilder().getBuilder(); + } + + /** + * + * + *
            +         * Output only. The blob data.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchResponse.Summary.BlobAttachment.Blob data = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.discoveryengine.v1beta.SearchResponse.Summary.BlobAttachment + .BlobOrBuilder + getDataOrBuilder() { + if (dataBuilder_ != null) { + return dataBuilder_.getMessageOrBuilder(); + } else { + return data_ == null + ? com.google.cloud.discoveryengine.v1beta.SearchResponse.Summary.BlobAttachment.Blob + .getDefaultInstance() + : data_; + } + } + + /** + * + * + *
            +         * Output only. The blob data.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchResponse.Summary.BlobAttachment.Blob data = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.SearchResponse.Summary.BlobAttachment.Blob, + com.google.cloud.discoveryengine.v1beta.SearchResponse.Summary.BlobAttachment.Blob + .Builder, + com.google.cloud.discoveryengine.v1beta.SearchResponse.Summary.BlobAttachment + .BlobOrBuilder> + internalGetDataFieldBuilder() { + if (dataBuilder_ == null) { + dataBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.SearchResponse.Summary.BlobAttachment + .Blob, + com.google.cloud.discoveryengine.v1beta.SearchResponse.Summary.BlobAttachment + .Blob.Builder, + com.google.cloud.discoveryengine.v1beta.SearchResponse.Summary.BlobAttachment + .BlobOrBuilder>(getData(), getParentForChildren(), isClean()); + data_ = null; + } + return dataBuilder_; + } + + private int attributionType_ = 0; + + /** + * + * + *
            +         * Output only. The attribution type of the blob.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchResponse.Summary.BlobAttachment.AttributionType attribution_type = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for attributionType. + */ + @java.lang.Override + public int getAttributionTypeValue() { + return attributionType_; + } + + /** + * + * + *
            +         * Output only. The attribution type of the blob.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchResponse.Summary.BlobAttachment.AttributionType attribution_type = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The enum numeric value on the wire for attributionType to set. + * @return This builder for chaining. + */ + public Builder setAttributionTypeValue(int value) { + attributionType_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
            +         * Output only. The attribution type of the blob.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchResponse.Summary.BlobAttachment.AttributionType attribution_type = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The attributionType. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.SearchResponse.Summary.BlobAttachment + .AttributionType + getAttributionType() { + com.google.cloud.discoveryengine.v1beta.SearchResponse.Summary.BlobAttachment + .AttributionType + result = + com.google.cloud.discoveryengine.v1beta.SearchResponse.Summary.BlobAttachment + .AttributionType.forNumber(attributionType_); + return result == null + ? com.google.cloud.discoveryengine.v1beta.SearchResponse.Summary.BlobAttachment + .AttributionType.UNRECOGNIZED + : result; + } + + /** + * + * + *
            +         * Output only. The attribution type of the blob.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchResponse.Summary.BlobAttachment.AttributionType attribution_type = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The attributionType to set. + * @return This builder for chaining. + */ + public Builder setAttributionType( + com.google.cloud.discoveryengine.v1beta.SearchResponse.Summary.BlobAttachment + .AttributionType + value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + attributionType_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
            +         * Output only. The attribution type of the blob.
            +         * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchResponse.Summary.BlobAttachment.AttributionType attribution_type = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearAttributionType() { + bitField0_ = (bitField0_ & ~0x00000002); + attributionType_ = 0; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.SearchResponse.Summary.BlobAttachment) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.SearchResponse.Summary.BlobAttachment) + private static final com.google.cloud.discoveryengine.v1beta.SearchResponse.Summary + .BlobAttachment + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.discoveryengine.v1beta.SearchResponse.Summary.BlobAttachment(); + } + + public static com.google.cloud.discoveryengine.v1beta.SearchResponse.Summary.BlobAttachment + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BlobAttachment parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.SearchResponse.Summary.BlobAttachment + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface SummaryWithMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.SearchResponse.Summary.SummaryWithMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
            +       * Summary text with no citation information.
            +       * 
            + * + * string summary = 1; + * + * @return The summary. + */ + java.lang.String getSummary(); + + /** + * + * + *
            +       * Summary text with no citation information.
            +       * 
            + * + * string summary = 1; + * + * @return The bytes for summary. + */ + com.google.protobuf.ByteString getSummaryBytes(); + + /** + * + * + *
            +       * Citation metadata for given summary.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchResponse.Summary.CitationMetadata citation_metadata = 2; + * + * + * @return Whether the citationMetadata field is set. + */ + boolean hasCitationMetadata(); + + /** + * + * + *
            +       * Citation metadata for given summary.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchResponse.Summary.CitationMetadata citation_metadata = 2; + * + * + * @return The citationMetadata. + */ + com.google.cloud.discoveryengine.v1beta.SearchResponse.Summary.CitationMetadata + getCitationMetadata(); + + /** + * + * + *
            +       * Citation metadata for given summary.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchResponse.Summary.CitationMetadata citation_metadata = 2; + * + */ + com.google.cloud.discoveryengine.v1beta.SearchResponse.Summary.CitationMetadataOrBuilder + getCitationMetadataOrBuilder(); + + /** + * + * + *
            +       * Document References.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.SearchResponse.Summary.Reference references = 3; + * + */ + java.util.List + getReferencesList(); + + /** + * + * + *
            +       * Document References.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.SearchResponse.Summary.Reference references = 3; + * + */ + com.google.cloud.discoveryengine.v1beta.SearchResponse.Summary.Reference getReferences( + int index); + + /** + * + * + *
            +       * Document References.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.SearchResponse.Summary.Reference references = 3; + * + */ + int getReferencesCount(); + + /** + * + * + *
            +       * Document References.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.SearchResponse.Summary.Reference references = 3; + * + */ + java.util.List< + ? extends + com.google.cloud.discoveryengine.v1beta.SearchResponse.Summary.ReferenceOrBuilder> + getReferencesOrBuilderList(); + + /** + * + * + *
            +       * Document References.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.SearchResponse.Summary.Reference references = 3; + * + */ + com.google.cloud.discoveryengine.v1beta.SearchResponse.Summary.ReferenceOrBuilder + getReferencesOrBuilder(int index); + + /** + * + * + *
            +       * Output only. Store multimodal data for answer enhancement.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.SearchResponse.Summary.BlobAttachment blob_attachments = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.List + getBlobAttachmentsList(); + + /** + * + * + *
            +       * Output only. Store multimodal data for answer enhancement.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.SearchResponse.Summary.BlobAttachment blob_attachments = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.discoveryengine.v1beta.SearchResponse.Summary.BlobAttachment + getBlobAttachments(int index); + + /** + * + * + *
            +       * Output only. Store multimodal data for answer enhancement.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.SearchResponse.Summary.BlobAttachment blob_attachments = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + int getBlobAttachmentsCount(); + + /** + * + * + *
            +       * Output only. Store multimodal data for answer enhancement.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.SearchResponse.Summary.BlobAttachment blob_attachments = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.List< + ? extends + com.google.cloud.discoveryengine.v1beta.SearchResponse.Summary + .BlobAttachmentOrBuilder> + getBlobAttachmentsOrBuilderList(); + + /** + * + * + *
            +       * Output only. Store multimodal data for answer enhancement.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.SearchResponse.Summary.BlobAttachment blob_attachments = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.discoveryengine.v1beta.SearchResponse.Summary.BlobAttachmentOrBuilder + getBlobAttachmentsOrBuilder(int index); + } + + /** + * + * + *
            +     * Summary with metadata information.
            +     * 
            + * + * Protobuf type {@code + * google.cloud.discoveryengine.v1beta.SearchResponse.Summary.SummaryWithMetadata} + */ + public static final class SummaryWithMetadata extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.SearchResponse.Summary.SummaryWithMetadata) + SummaryWithMetadataOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "SummaryWithMetadata"); + } + + // Use SummaryWithMetadata.newBuilder() to construct. + private SummaryWithMetadata(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private SummaryWithMetadata() { + summary_ = ""; + references_ = java.util.Collections.emptyList(); + blobAttachments_ = java.util.Collections.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_SearchResponse_Summary_SummaryWithMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.SearchServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_SearchResponse_Summary_SummaryWithMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.SearchResponse.Summary.SummaryWithMetadata + .class, + com.google.cloud.discoveryengine.v1beta.SearchResponse.Summary.SummaryWithMetadata + .Builder.class); + } + + private int bitField0_; + public static final int SUMMARY_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object summary_ = ""; + + /** + * + * + *
            +       * Summary text with no citation information.
            +       * 
            + * + * string summary = 1; + * + * @return The summary. + */ + @java.lang.Override + public java.lang.String getSummary() { + java.lang.Object ref = summary_; + 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(); + summary_ = s; + return s; + } + } + + /** + * + * + *
            +       * Summary text with no citation information.
            +       * 
            + * + * string summary = 1; + * + * @return The bytes for summary. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSummaryBytes() { + java.lang.Object ref = summary_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + summary_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CITATION_METADATA_FIELD_NUMBER = 2; + private com.google.cloud.discoveryengine.v1beta.SearchResponse.Summary.CitationMetadata citationMetadata_; /** @@ -18493,6 +21468,101 @@ public com.google.cloud.discoveryengine.v1beta.SearchResponse.Summary.Reference return references_.get(index); } + public static final int BLOB_ATTACHMENTS_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private java.util.List< + com.google.cloud.discoveryengine.v1beta.SearchResponse.Summary.BlobAttachment> + blobAttachments_; + + /** + * + * + *
            +       * Output only. Store multimodal data for answer enhancement.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.SearchResponse.Summary.BlobAttachment blob_attachments = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.List< + com.google.cloud.discoveryengine.v1beta.SearchResponse.Summary.BlobAttachment> + getBlobAttachmentsList() { + return blobAttachments_; + } + + /** + * + * + *
            +       * Output only. Store multimodal data for answer enhancement.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.SearchResponse.Summary.BlobAttachment blob_attachments = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.List< + ? extends + com.google.cloud.discoveryengine.v1beta.SearchResponse.Summary + .BlobAttachmentOrBuilder> + getBlobAttachmentsOrBuilderList() { + return blobAttachments_; + } + + /** + * + * + *
            +       * Output only. Store multimodal data for answer enhancement.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.SearchResponse.Summary.BlobAttachment blob_attachments = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public int getBlobAttachmentsCount() { + return blobAttachments_.size(); + } + + /** + * + * + *
            +       * Output only. Store multimodal data for answer enhancement.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.SearchResponse.Summary.BlobAttachment blob_attachments = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.SearchResponse.Summary.BlobAttachment + getBlobAttachments(int index) { + return blobAttachments_.get(index); + } + + /** + * + * + *
            +       * Output only. Store multimodal data for answer enhancement.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.SearchResponse.Summary.BlobAttachment blob_attachments = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.SearchResponse.Summary.BlobAttachmentOrBuilder + getBlobAttachmentsOrBuilder(int index) { + return blobAttachments_.get(index); + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -18516,6 +21586,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < references_.size(); i++) { output.writeMessage(3, references_.get(i)); } + for (int i = 0; i < blobAttachments_.size(); i++) { + output.writeMessage(4, blobAttachments_.get(i)); + } getUnknownFields().writeTo(output); } @@ -18535,6 +21608,10 @@ public int getSerializedSize() { for (int i = 0; i < references_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, references_.get(i)); } + for (int i = 0; i < blobAttachments_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(4, blobAttachments_.get(i)); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -18560,6 +21637,7 @@ public boolean equals(final java.lang.Object obj) { if (!getCitationMetadata().equals(other.getCitationMetadata())) return false; } if (!getReferencesList().equals(other.getReferencesList())) return false; + if (!getBlobAttachmentsList().equals(other.getBlobAttachmentsList())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -18581,6 +21659,10 @@ public int hashCode() { hash = (37 * hash) + REFERENCES_FIELD_NUMBER; hash = (53 * hash) + getReferencesList().hashCode(); } + if (getBlobAttachmentsCount() > 0) { + hash = (37 * hash) + BLOB_ATTACHMENTS_FIELD_NUMBER; + hash = (53 * hash) + getBlobAttachmentsList().hashCode(); + } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -18753,6 +21835,7 @@ private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { internalGetCitationMetadataFieldBuilder(); internalGetReferencesFieldBuilder(); + internalGetBlobAttachmentsFieldBuilder(); } } @@ -18773,6 +21856,13 @@ public Builder clear() { referencesBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000004); + if (blobAttachmentsBuilder_ == null) { + blobAttachments_ = java.util.Collections.emptyList(); + } else { + blobAttachments_ = null; + blobAttachmentsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000008); return this; } @@ -18827,6 +21917,15 @@ private void buildPartialRepeatedFields( } else { result.references_ = referencesBuilder_.build(); } + if (blobAttachmentsBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0)) { + blobAttachments_ = java.util.Collections.unmodifiableList(blobAttachments_); + bitField0_ = (bitField0_ & ~0x00000008); + } + result.blobAttachments_ = blobAttachments_; + } else { + result.blobAttachments_ = blobAttachmentsBuilder_.build(); + } } private void buildPartial0( @@ -18902,6 +22001,33 @@ public Builder mergeFrom( } } } + if (blobAttachmentsBuilder_ == null) { + if (!other.blobAttachments_.isEmpty()) { + if (blobAttachments_.isEmpty()) { + blobAttachments_ = other.blobAttachments_; + bitField0_ = (bitField0_ & ~0x00000008); + } else { + ensureBlobAttachmentsIsMutable(); + blobAttachments_.addAll(other.blobAttachments_); + } + onChanged(); + } + } else { + if (!other.blobAttachments_.isEmpty()) { + if (blobAttachmentsBuilder_.isEmpty()) { + blobAttachmentsBuilder_.dispose(); + blobAttachmentsBuilder_ = null; + blobAttachments_ = other.blobAttachments_; + bitField0_ = (bitField0_ & ~0x00000008); + blobAttachmentsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetBlobAttachmentsFieldBuilder() + : null; + } else { + blobAttachmentsBuilder_.addAllMessages(other.blobAttachments_); + } + } + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -18956,6 +22082,22 @@ public Builder mergeFrom( } break; } // case 26 + case 34: + { + com.google.cloud.discoveryengine.v1beta.SearchResponse.Summary.BlobAttachment + m = + input.readMessage( + com.google.cloud.discoveryengine.v1beta.SearchResponse.Summary + .BlobAttachment.parser(), + extensionRegistry); + if (blobAttachmentsBuilder_ == null) { + ensureBlobAttachmentsIsMutable(); + blobAttachments_.add(m); + } else { + blobAttachmentsBuilder_.addMessage(m); + } + break; + } // case 34 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -19759,6 +22901,454 @@ public Builder removeReferences(int index) { return referencesBuilder_; } + private java.util.List< + com.google.cloud.discoveryengine.v1beta.SearchResponse.Summary.BlobAttachment> + blobAttachments_ = java.util.Collections.emptyList(); + + private void ensureBlobAttachmentsIsMutable() { + if (!((bitField0_ & 0x00000008) != 0)) { + blobAttachments_ = + new java.util.ArrayList< + com.google.cloud.discoveryengine.v1beta.SearchResponse.Summary.BlobAttachment>( + blobAttachments_); + bitField0_ |= 0x00000008; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.discoveryengine.v1beta.SearchResponse.Summary.BlobAttachment, + com.google.cloud.discoveryengine.v1beta.SearchResponse.Summary.BlobAttachment + .Builder, + com.google.cloud.discoveryengine.v1beta.SearchResponse.Summary + .BlobAttachmentOrBuilder> + blobAttachmentsBuilder_; + + /** + * + * + *
            +         * Output only. Store multimodal data for answer enhancement.
            +         * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.SearchResponse.Summary.BlobAttachment blob_attachments = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List< + com.google.cloud.discoveryengine.v1beta.SearchResponse.Summary.BlobAttachment> + getBlobAttachmentsList() { + if (blobAttachmentsBuilder_ == null) { + return java.util.Collections.unmodifiableList(blobAttachments_); + } else { + return blobAttachmentsBuilder_.getMessageList(); + } + } + + /** + * + * + *
            +         * Output only. Store multimodal data for answer enhancement.
            +         * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.SearchResponse.Summary.BlobAttachment blob_attachments = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public int getBlobAttachmentsCount() { + if (blobAttachmentsBuilder_ == null) { + return blobAttachments_.size(); + } else { + return blobAttachmentsBuilder_.getCount(); + } + } + + /** + * + * + *
            +         * Output only. Store multimodal data for answer enhancement.
            +         * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.SearchResponse.Summary.BlobAttachment blob_attachments = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.discoveryengine.v1beta.SearchResponse.Summary.BlobAttachment + getBlobAttachments(int index) { + if (blobAttachmentsBuilder_ == null) { + return blobAttachments_.get(index); + } else { + return blobAttachmentsBuilder_.getMessage(index); + } + } + + /** + * + * + *
            +         * Output only. Store multimodal data for answer enhancement.
            +         * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.SearchResponse.Summary.BlobAttachment blob_attachments = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setBlobAttachments( + int index, + com.google.cloud.discoveryengine.v1beta.SearchResponse.Summary.BlobAttachment value) { + if (blobAttachmentsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBlobAttachmentsIsMutable(); + blobAttachments_.set(index, value); + onChanged(); + } else { + blobAttachmentsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
            +         * Output only. Store multimodal data for answer enhancement.
            +         * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.SearchResponse.Summary.BlobAttachment blob_attachments = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setBlobAttachments( + int index, + com.google.cloud.discoveryengine.v1beta.SearchResponse.Summary.BlobAttachment.Builder + builderForValue) { + if (blobAttachmentsBuilder_ == null) { + ensureBlobAttachmentsIsMutable(); + blobAttachments_.set(index, builderForValue.build()); + onChanged(); + } else { + blobAttachmentsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
            +         * Output only. Store multimodal data for answer enhancement.
            +         * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.SearchResponse.Summary.BlobAttachment blob_attachments = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addBlobAttachments( + com.google.cloud.discoveryengine.v1beta.SearchResponse.Summary.BlobAttachment value) { + if (blobAttachmentsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBlobAttachmentsIsMutable(); + blobAttachments_.add(value); + onChanged(); + } else { + blobAttachmentsBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
            +         * Output only. Store multimodal data for answer enhancement.
            +         * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.SearchResponse.Summary.BlobAttachment blob_attachments = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addBlobAttachments( + int index, + com.google.cloud.discoveryengine.v1beta.SearchResponse.Summary.BlobAttachment value) { + if (blobAttachmentsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBlobAttachmentsIsMutable(); + blobAttachments_.add(index, value); + onChanged(); + } else { + blobAttachmentsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
            +         * Output only. Store multimodal data for answer enhancement.
            +         * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.SearchResponse.Summary.BlobAttachment blob_attachments = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addBlobAttachments( + com.google.cloud.discoveryengine.v1beta.SearchResponse.Summary.BlobAttachment.Builder + builderForValue) { + if (blobAttachmentsBuilder_ == null) { + ensureBlobAttachmentsIsMutable(); + blobAttachments_.add(builderForValue.build()); + onChanged(); + } else { + blobAttachmentsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
            +         * Output only. Store multimodal data for answer enhancement.
            +         * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.SearchResponse.Summary.BlobAttachment blob_attachments = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addBlobAttachments( + int index, + com.google.cloud.discoveryengine.v1beta.SearchResponse.Summary.BlobAttachment.Builder + builderForValue) { + if (blobAttachmentsBuilder_ == null) { + ensureBlobAttachmentsIsMutable(); + blobAttachments_.add(index, builderForValue.build()); + onChanged(); + } else { + blobAttachmentsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
            +         * Output only. Store multimodal data for answer enhancement.
            +         * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.SearchResponse.Summary.BlobAttachment blob_attachments = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addAllBlobAttachments( + java.lang.Iterable< + ? extends + com.google.cloud.discoveryengine.v1beta.SearchResponse.Summary + .BlobAttachment> + values) { + if (blobAttachmentsBuilder_ == null) { + ensureBlobAttachmentsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, blobAttachments_); + onChanged(); + } else { + blobAttachmentsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
            +         * Output only. Store multimodal data for answer enhancement.
            +         * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.SearchResponse.Summary.BlobAttachment blob_attachments = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearBlobAttachments() { + if (blobAttachmentsBuilder_ == null) { + blobAttachments_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + } else { + blobAttachmentsBuilder_.clear(); + } + return this; + } + + /** + * + * + *
            +         * Output only. Store multimodal data for answer enhancement.
            +         * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.SearchResponse.Summary.BlobAttachment blob_attachments = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder removeBlobAttachments(int index) { + if (blobAttachmentsBuilder_ == null) { + ensureBlobAttachmentsIsMutable(); + blobAttachments_.remove(index); + onChanged(); + } else { + blobAttachmentsBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
            +         * Output only. Store multimodal data for answer enhancement.
            +         * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.SearchResponse.Summary.BlobAttachment blob_attachments = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.discoveryengine.v1beta.SearchResponse.Summary.BlobAttachment.Builder + getBlobAttachmentsBuilder(int index) { + return internalGetBlobAttachmentsFieldBuilder().getBuilder(index); + } + + /** + * + * + *
            +         * Output only. Store multimodal data for answer enhancement.
            +         * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.SearchResponse.Summary.BlobAttachment blob_attachments = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.discoveryengine.v1beta.SearchResponse.Summary + .BlobAttachmentOrBuilder + getBlobAttachmentsOrBuilder(int index) { + if (blobAttachmentsBuilder_ == null) { + return blobAttachments_.get(index); + } else { + return blobAttachmentsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
            +         * Output only. Store multimodal data for answer enhancement.
            +         * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.SearchResponse.Summary.BlobAttachment blob_attachments = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List< + ? extends + com.google.cloud.discoveryengine.v1beta.SearchResponse.Summary + .BlobAttachmentOrBuilder> + getBlobAttachmentsOrBuilderList() { + if (blobAttachmentsBuilder_ != null) { + return blobAttachmentsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(blobAttachments_); + } + } + + /** + * + * + *
            +         * Output only. Store multimodal data for answer enhancement.
            +         * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.SearchResponse.Summary.BlobAttachment blob_attachments = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.discoveryengine.v1beta.SearchResponse.Summary.BlobAttachment.Builder + addBlobAttachmentsBuilder() { + return internalGetBlobAttachmentsFieldBuilder() + .addBuilder( + com.google.cloud.discoveryengine.v1beta.SearchResponse.Summary.BlobAttachment + .getDefaultInstance()); + } + + /** + * + * + *
            +         * Output only. Store multimodal data for answer enhancement.
            +         * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.SearchResponse.Summary.BlobAttachment blob_attachments = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.discoveryengine.v1beta.SearchResponse.Summary.BlobAttachment.Builder + addBlobAttachmentsBuilder(int index) { + return internalGetBlobAttachmentsFieldBuilder() + .addBuilder( + index, + com.google.cloud.discoveryengine.v1beta.SearchResponse.Summary.BlobAttachment + .getDefaultInstance()); + } + + /** + * + * + *
            +         * Output only. Store multimodal data for answer enhancement.
            +         * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.SearchResponse.Summary.BlobAttachment blob_attachments = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List< + com.google.cloud.discoveryengine.v1beta.SearchResponse.Summary.BlobAttachment + .Builder> + getBlobAttachmentsBuilderList() { + return internalGetBlobAttachmentsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.discoveryengine.v1beta.SearchResponse.Summary.BlobAttachment, + com.google.cloud.discoveryengine.v1beta.SearchResponse.Summary.BlobAttachment + .Builder, + com.google.cloud.discoveryengine.v1beta.SearchResponse.Summary + .BlobAttachmentOrBuilder> + internalGetBlobAttachmentsFieldBuilder() { + if (blobAttachmentsBuilder_ == null) { + blobAttachmentsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.discoveryengine.v1beta.SearchResponse.Summary.BlobAttachment, + com.google.cloud.discoveryengine.v1beta.SearchResponse.Summary.BlobAttachment + .Builder, + com.google.cloud.discoveryengine.v1beta.SearchResponse.Summary + .BlobAttachmentOrBuilder>( + blobAttachments_, + ((bitField0_ & 0x00000008) != 0), + getParentForChildren(), + isClean()); + blobAttachments_ = null; + } + return blobAttachmentsBuilder_; + } + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.SearchResponse.Summary.SummaryWithMetadata) } @@ -23076,6 +26666,60 @@ public interface NaturalLanguageQueryUnderstandingInfoOrBuilder */ com.google.protobuf.ByteString getRewrittenQueryBytes(); + /** + * + * + *
            +     * The classified intents from the input query.
            +     * 
            + * + * repeated string classified_intents = 5; + * + * @return A list containing the classifiedIntents. + */ + java.util.List getClassifiedIntentsList(); + + /** + * + * + *
            +     * The classified intents from the input query.
            +     * 
            + * + * repeated string classified_intents = 5; + * + * @return The count of classifiedIntents. + */ + int getClassifiedIntentsCount(); + + /** + * + * + *
            +     * The classified intents from the input query.
            +     * 
            + * + * repeated string classified_intents = 5; + * + * @param index The index of the element to return. + * @return The classifiedIntents at the given index. + */ + java.lang.String getClassifiedIntents(int index); + + /** + * + * + *
            +     * The classified intents from the input query.
            +     * 
            + * + * repeated string classified_intents = 5; + * + * @param index The index of the value to return. + * @return The bytes of the classifiedIntents at the given index. + */ + com.google.protobuf.ByteString getClassifiedIntentsBytes(int index); + /** * * @@ -23164,6 +26808,7 @@ private NaturalLanguageQueryUnderstandingInfo( private NaturalLanguageQueryUnderstandingInfo() { extractedFilters_ = ""; rewrittenQuery_ = ""; + classifiedIntents_ = com.google.protobuf.LazyStringArrayList.emptyList(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @@ -33663,6 +37308,74 @@ public com.google.protobuf.ByteString getRewrittenQueryBytes() { } } + public static final int CLASSIFIED_INTENTS_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList classifiedIntents_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + /** + * + * + *
            +     * The classified intents from the input query.
            +     * 
            + * + * repeated string classified_intents = 5; + * + * @return A list containing the classifiedIntents. + */ + public com.google.protobuf.ProtocolStringList getClassifiedIntentsList() { + return classifiedIntents_; + } + + /** + * + * + *
            +     * The classified intents from the input query.
            +     * 
            + * + * repeated string classified_intents = 5; + * + * @return The count of classifiedIntents. + */ + public int getClassifiedIntentsCount() { + return classifiedIntents_.size(); + } + + /** + * + * + *
            +     * The classified intents from the input query.
            +     * 
            + * + * repeated string classified_intents = 5; + * + * @param index The index of the element to return. + * @return The classifiedIntents at the given index. + */ + public java.lang.String getClassifiedIntents(int index) { + return classifiedIntents_.get(index); + } + + /** + * + * + *
            +     * The classified intents from the input query.
            +     * 
            + * + * repeated string classified_intents = 5; + * + * @param index The index of the value to return. + * @return The bytes of the classifiedIntents at the given index. + */ + public com.google.protobuf.ByteString getClassifiedIntentsBytes(int index) { + return classifiedIntents_.getByteString(index); + } + public static final int STRUCTURED_EXTRACTED_FILTER_FIELD_NUMBER = 3; private com.google.cloud.discoveryengine.v1beta.SearchResponse .NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter @@ -33756,6 +37469,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(3, getStructuredExtractedFilter()); } + for (int i = 0; i < classifiedIntents_.size(); i++) { + com.google.protobuf.GeneratedMessage.writeString(output, 5, classifiedIntents_.getRaw(i)); + } getUnknownFields().writeTo(output); } @@ -33776,6 +37492,14 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 3, getStructuredExtractedFilter()); } + { + int dataSize = 0; + for (int i = 0; i < classifiedIntents_.size(); i++) { + dataSize += computeStringSizeNoTag(classifiedIntents_.getRaw(i)); + } + size += dataSize; + size += 1 * getClassifiedIntentsList().size(); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -33800,6 +37524,7 @@ public boolean equals(final java.lang.Object obj) { if (!getExtractedFilters().equals(other.getExtractedFilters())) return false; if (!getRewrittenQuery().equals(other.getRewrittenQuery())) return false; + if (!getClassifiedIntentsList().equals(other.getClassifiedIntentsList())) return false; if (hasStructuredExtractedFilter() != other.hasStructuredExtractedFilter()) return false; if (hasStructuredExtractedFilter()) { if (!getStructuredExtractedFilter().equals(other.getStructuredExtractedFilter())) @@ -33820,6 +37545,10 @@ public int hashCode() { hash = (53 * hash) + getExtractedFilters().hashCode(); hash = (37 * hash) + REWRITTEN_QUERY_FIELD_NUMBER; hash = (53 * hash) + getRewrittenQuery().hashCode(); + if (getClassifiedIntentsCount() > 0) { + hash = (37 * hash) + CLASSIFIED_INTENTS_FIELD_NUMBER; + hash = (53 * hash) + getClassifiedIntentsList().hashCode(); + } if (hasStructuredExtractedFilter()) { hash = (37 * hash) + STRUCTURED_EXTRACTED_FILTER_FIELD_NUMBER; hash = (53 * hash) + getStructuredExtractedFilter().hashCode(); @@ -34001,6 +37730,7 @@ public Builder clear() { bitField0_ = 0; extractedFilters_ = ""; rewrittenQuery_ = ""; + classifiedIntents_ = com.google.protobuf.LazyStringArrayList.emptyList(); structuredExtractedFilter_ = null; if (structuredExtractedFilterBuilder_ != null) { structuredExtractedFilterBuilder_.dispose(); @@ -34061,8 +37791,12 @@ private void buildPartial0( if (((from_bitField0_ & 0x00000002) != 0)) { result.rewrittenQuery_ = rewrittenQuery_; } - int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000004) != 0)) { + classifiedIntents_.makeImmutable(); + result.classifiedIntents_ = classifiedIntents_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000008) != 0)) { result.structuredExtractedFilter_ = structuredExtractedFilterBuilder_ == null ? structuredExtractedFilter_ @@ -34105,6 +37839,16 @@ public Builder mergeFrom( bitField0_ |= 0x00000002; onChanged(); } + if (!other.classifiedIntents_.isEmpty()) { + if (classifiedIntents_.isEmpty()) { + classifiedIntents_ = other.classifiedIntents_; + bitField0_ |= 0x00000004; + } else { + ensureClassifiedIntentsIsMutable(); + classifiedIntents_.addAll(other.classifiedIntents_); + } + onChanged(); + } if (other.hasStructuredExtractedFilter()) { mergeStructuredExtractedFilter(other.getStructuredExtractedFilter()); } @@ -34151,9 +37895,16 @@ public Builder mergeFrom( input.readMessage( internalGetStructuredExtractedFilterFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000008; break; } // case 26 + case 42: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureClassifiedIntentsIsMutable(); + classifiedIntents_.add(s); + break; + } // case 42 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -34395,6 +38146,189 @@ public Builder setRewrittenQueryBytes(com.google.protobuf.ByteString value) { return this; } + private com.google.protobuf.LazyStringArrayList classifiedIntents_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureClassifiedIntentsIsMutable() { + if (!classifiedIntents_.isModifiable()) { + classifiedIntents_ = new com.google.protobuf.LazyStringArrayList(classifiedIntents_); + } + bitField0_ |= 0x00000004; + } + + /** + * + * + *
            +       * The classified intents from the input query.
            +       * 
            + * + * repeated string classified_intents = 5; + * + * @return A list containing the classifiedIntents. + */ + public com.google.protobuf.ProtocolStringList getClassifiedIntentsList() { + classifiedIntents_.makeImmutable(); + return classifiedIntents_; + } + + /** + * + * + *
            +       * The classified intents from the input query.
            +       * 
            + * + * repeated string classified_intents = 5; + * + * @return The count of classifiedIntents. + */ + public int getClassifiedIntentsCount() { + return classifiedIntents_.size(); + } + + /** + * + * + *
            +       * The classified intents from the input query.
            +       * 
            + * + * repeated string classified_intents = 5; + * + * @param index The index of the element to return. + * @return The classifiedIntents at the given index. + */ + public java.lang.String getClassifiedIntents(int index) { + return classifiedIntents_.get(index); + } + + /** + * + * + *
            +       * The classified intents from the input query.
            +       * 
            + * + * repeated string classified_intents = 5; + * + * @param index The index of the value to return. + * @return The bytes of the classifiedIntents at the given index. + */ + public com.google.protobuf.ByteString getClassifiedIntentsBytes(int index) { + return classifiedIntents_.getByteString(index); + } + + /** + * + * + *
            +       * The classified intents from the input query.
            +       * 
            + * + * repeated string classified_intents = 5; + * + * @param index The index to set the value at. + * @param value The classifiedIntents to set. + * @return This builder for chaining. + */ + public Builder setClassifiedIntents(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureClassifiedIntentsIsMutable(); + classifiedIntents_.set(index, value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
            +       * The classified intents from the input query.
            +       * 
            + * + * repeated string classified_intents = 5; + * + * @param value The classifiedIntents to add. + * @return This builder for chaining. + */ + public Builder addClassifiedIntents(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureClassifiedIntentsIsMutable(); + classifiedIntents_.add(value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
            +       * The classified intents from the input query.
            +       * 
            + * + * repeated string classified_intents = 5; + * + * @param values The classifiedIntents to add. + * @return This builder for chaining. + */ + public Builder addAllClassifiedIntents(java.lang.Iterable values) { + ensureClassifiedIntentsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, classifiedIntents_); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
            +       * The classified intents from the input query.
            +       * 
            + * + * repeated string classified_intents = 5; + * + * @return This builder for chaining. + */ + public Builder clearClassifiedIntents() { + classifiedIntents_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + ; + onChanged(); + return this; + } + + /** + * + * + *
            +       * The classified intents from the input query.
            +       * 
            + * + * repeated string classified_intents = 5; + * + * @param value The bytes of the classifiedIntents to add. + * @return This builder for chaining. + */ + public Builder addClassifiedIntentsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureClassifiedIntentsIsMutable(); + classifiedIntents_.add(value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + private com.google.cloud.discoveryengine.v1beta.SearchResponse .NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter structuredExtractedFilter_; @@ -34422,7 +38356,7 @@ public Builder setRewrittenQueryBytes(com.google.protobuf.ByteString value) { * @return Whether the structuredExtractedFilter field is set. */ public boolean hasStructuredExtractedFilter() { - return ((bitField0_ & 0x00000004) != 0); + return ((bitField0_ & 0x00000008) != 0); } /** @@ -34477,7 +38411,7 @@ public Builder setStructuredExtractedFilter( } else { structuredExtractedFilterBuilder_.setMessage(value); } - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000008; onChanged(); return this; } @@ -34503,7 +38437,7 @@ public Builder setStructuredExtractedFilter( } else { structuredExtractedFilterBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000008; onChanged(); return this; } @@ -34525,7 +38459,7 @@ public Builder mergeStructuredExtractedFilter( .NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter value) { if (structuredExtractedFilterBuilder_ == null) { - if (((bitField0_ & 0x00000004) != 0) + if (((bitField0_ & 0x00000008) != 0) && structuredExtractedFilter_ != null && structuredExtractedFilter_ != com.google.cloud.discoveryengine.v1beta.SearchResponse @@ -34539,7 +38473,7 @@ public Builder mergeStructuredExtractedFilter( structuredExtractedFilterBuilder_.mergeFrom(value); } if (structuredExtractedFilter_ != null) { - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000008; onChanged(); } return this; @@ -34558,7 +38492,7 @@ public Builder mergeStructuredExtractedFilter( *
            */ public Builder clearStructuredExtractedFilter() { - bitField0_ = (bitField0_ & ~0x00000004); + bitField0_ = (bitField0_ & ~0x00000008); structuredExtractedFilter_ = null; if (structuredExtractedFilterBuilder_ != null) { structuredExtractedFilterBuilder_.dispose(); @@ -34583,7 +38517,7 @@ public Builder clearStructuredExtractedFilter() { public com.google.cloud.discoveryengine.v1beta.SearchResponse .NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter.Builder getStructuredExtractedFilterBuilder() { - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000008; onChanged(); return internalGetStructuredExtractedFilterFieldBuilder().getBuilder(); } @@ -37616,6 +41550,67 @@ public com.google.protobuf.ByteString getCorrectedQueryBytes() { } } + public static final int SUGGESTED_QUERY_FIELD_NUMBER = 24; + + @SuppressWarnings("serial") + private volatile java.lang.Object suggestedQuery_ = ""; + + /** + * + * + *
            +   * Corrected query with low confidence, AKA did you mean query.
            +   * Compared with corrected_query, this field is set when SpellCorrector
            +   * returned a response, but FPR(full page replacement) is not triggered
            +   * because the corrction is of low confidence(eg, reversed because there are
            +   * matches of the original query in document corpus).
            +   * 
            + * + * string suggested_query = 24; + * + * @return The suggestedQuery. + */ + @java.lang.Override + public java.lang.String getSuggestedQuery() { + java.lang.Object ref = suggestedQuery_; + 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(); + suggestedQuery_ = s; + return s; + } + } + + /** + * + * + *
            +   * Corrected query with low confidence, AKA did you mean query.
            +   * Compared with corrected_query, this field is set when SpellCorrector
            +   * returned a response, but FPR(full page replacement) is not triggered
            +   * because the corrction is of low confidence(eg, reversed because there are
            +   * matches of the original query in document corpus).
            +   * 
            + * + * string suggested_query = 24; + * + * @return The bytes for suggestedQuery. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSuggestedQueryBytes() { + java.lang.Object ref = suggestedQuery_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + suggestedQuery_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + public static final int SUMMARY_FIELD_NUMBER = 9; private com.google.cloud.discoveryengine.v1beta.SearchResponse.Summary summary_; @@ -37882,11 +41877,12 @@ public boolean hasQueryExpansionInfo() { * * *
            -   * Natural language query understanding information for the returned results.
            +   * Output only. Natural language query understanding information for the
            +   * returned results.
                * 
            * * - * .google.cloud.discoveryengine.v1beta.SearchResponse.NaturalLanguageQueryUnderstandingInfo natural_language_query_understanding_info = 15; + * .google.cloud.discoveryengine.v1beta.SearchResponse.NaturalLanguageQueryUnderstandingInfo natural_language_query_understanding_info = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * * @return Whether the naturalLanguageQueryUnderstandingInfo field is set. @@ -37900,11 +41896,12 @@ public boolean hasNaturalLanguageQueryUnderstandingInfo() { * * *
            -   * Natural language query understanding information for the returned results.
            +   * Output only. Natural language query understanding information for the
            +   * returned results.
                * 
            * * - * .google.cloud.discoveryengine.v1beta.SearchResponse.NaturalLanguageQueryUnderstandingInfo natural_language_query_understanding_info = 15; + * .google.cloud.discoveryengine.v1beta.SearchResponse.NaturalLanguageQueryUnderstandingInfo natural_language_query_understanding_info = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * * @return The naturalLanguageQueryUnderstandingInfo. @@ -37923,11 +41920,12 @@ public boolean hasNaturalLanguageQueryUnderstandingInfo() { * * *
            -   * Natural language query understanding information for the returned results.
            +   * Output only. Natural language query understanding information for the
            +   * returned results.
                * 
            * * - * .google.cloud.discoveryengine.v1beta.SearchResponse.NaturalLanguageQueryUnderstandingInfo natural_language_query_understanding_info = 15; + * .google.cloud.discoveryengine.v1beta.SearchResponse.NaturalLanguageQueryUnderstandingInfo natural_language_query_understanding_info = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ @java.lang.Override @@ -38102,6 +42100,141 @@ public com.google.cloud.discoveryengine.v1beta.SearchResponse.OneBoxResult getOn return oneBoxResults_.get(index); } + public static final int SEARCH_LINK_PROMOTIONS_FIELD_NUMBER = 23; + + @SuppressWarnings("serial") + private java.util.List + searchLinkPromotions_; + + /** + * + * + *
            +   * Promotions for site search.
            +   * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.SearchLinkPromotion search_link_promotions = 23; + * + */ + @java.lang.Override + public java.util.List + getSearchLinkPromotionsList() { + return searchLinkPromotions_; + } + + /** + * + * + *
            +   * Promotions for site search.
            +   * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.SearchLinkPromotion search_link_promotions = 23; + * + */ + @java.lang.Override + public java.util.List< + ? extends com.google.cloud.discoveryengine.v1beta.SearchLinkPromotionOrBuilder> + getSearchLinkPromotionsOrBuilderList() { + return searchLinkPromotions_; + } + + /** + * + * + *
            +   * Promotions for site search.
            +   * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.SearchLinkPromotion search_link_promotions = 23; + * + */ + @java.lang.Override + public int getSearchLinkPromotionsCount() { + return searchLinkPromotions_.size(); + } + + /** + * + * + *
            +   * Promotions for site search.
            +   * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.SearchLinkPromotion search_link_promotions = 23; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.SearchLinkPromotion getSearchLinkPromotions( + int index) { + return searchLinkPromotions_.get(index); + } + + /** + * + * + *
            +   * Promotions for site search.
            +   * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.SearchLinkPromotion search_link_promotions = 23; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.SearchLinkPromotionOrBuilder + getSearchLinkPromotionsOrBuilder(int index) { + return searchLinkPromotions_.get(index); + } + + public static final int SEMANTIC_STATE_FIELD_NUMBER = 36; + private int semanticState_ = 0; + + /** + * + * + *
            +   * Output only. Indicates the semantic state of the search response.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchResponse.SemanticState semantic_state = 36 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for semanticState. + */ + @java.lang.Override + public int getSemanticStateValue() { + return semanticState_; + } + + /** + * + * + *
            +   * Output only. Indicates the semantic state of the search response.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchResponse.SemanticState semantic_state = 36 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The semanticState. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.SearchResponse.SemanticState getSemanticState() { + com.google.cloud.discoveryengine.v1beta.SearchResponse.SemanticState result = + com.google.cloud.discoveryengine.v1beta.SearchResponse.SemanticState.forNumber( + semanticState_); + return result == null + ? com.google.cloud.discoveryengine.v1beta.SearchResponse.SemanticState.UNRECOGNIZED + : result; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -38161,6 +42294,18 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < oneBoxResults_.size(); i++) { output.writeMessage(20, oneBoxResults_.get(i)); } + for (int i = 0; i < searchLinkPromotions_.size(); i++) { + output.writeMessage(23, searchLinkPromotions_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(suggestedQuery_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 24, suggestedQuery_); + } + if (semanticState_ + != com.google.cloud.discoveryengine.v1beta.SearchResponse.SemanticState + .SEMANTIC_STATE_UNSPECIFIED + .getNumber()) { + output.writeEnum(36, semanticState_); + } getUnknownFields().writeTo(output); } @@ -38223,6 +42368,20 @@ public int getSerializedSize() { for (int i = 0; i < oneBoxResults_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(20, oneBoxResults_.get(i)); } + for (int i = 0; i < searchLinkPromotions_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 23, searchLinkPromotions_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(suggestedQuery_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(24, suggestedQuery_); + } + if (semanticState_ + != com.google.cloud.discoveryengine.v1beta.SearchResponse.SemanticState + .SEMANTIC_STATE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(36, semanticState_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -38250,6 +42409,7 @@ public boolean equals(final java.lang.Object obj) { if (!getRedirectUri().equals(other.getRedirectUri())) return false; if (!getNextPageToken().equals(other.getNextPageToken())) return false; if (!getCorrectedQuery().equals(other.getCorrectedQuery())) return false; + if (!getSuggestedQuery().equals(other.getSuggestedQuery())) return false; if (hasSummary() != other.hasSummary()) return false; if (hasSummary()) { if (!getSummary().equals(other.getSummary())) return false; @@ -38271,6 +42431,8 @@ public boolean equals(final java.lang.Object obj) { if (!getSessionInfo().equals(other.getSessionInfo())) return false; } if (!getOneBoxResultsList().equals(other.getOneBoxResultsList())) return false; + if (!getSearchLinkPromotionsList().equals(other.getSearchLinkPromotionsList())) return false; + if (semanticState_ != other.semanticState_) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -38304,6 +42466,8 @@ public int hashCode() { hash = (53 * hash) + getNextPageToken().hashCode(); hash = (37 * hash) + CORRECTED_QUERY_FIELD_NUMBER; hash = (53 * hash) + getCorrectedQuery().hashCode(); + hash = (37 * hash) + SUGGESTED_QUERY_FIELD_NUMBER; + hash = (53 * hash) + getSuggestedQuery().hashCode(); if (hasSummary()) { hash = (37 * hash) + SUMMARY_FIELD_NUMBER; hash = (53 * hash) + getSummary().hashCode(); @@ -38332,6 +42496,12 @@ public int hashCode() { hash = (37 * hash) + ONE_BOX_RESULTS_FIELD_NUMBER; hash = (53 * hash) + getOneBoxResultsList().hashCode(); } + if (getSearchLinkPromotionsCount() > 0) { + hash = (37 * hash) + SEARCH_LINK_PROMOTIONS_FIELD_NUMBER; + hash = (53 * hash) + getSearchLinkPromotionsList().hashCode(); + } + hash = (37 * hash) + SEMANTIC_STATE_FIELD_NUMBER; + hash = (53 * hash) + semanticState_; hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -38485,6 +42655,7 @@ private void maybeForceBuilderInitialization() { internalGetNaturalLanguageQueryUnderstandingInfoFieldBuilder(); internalGetSessionInfoFieldBuilder(); internalGetOneBoxResultsFieldBuilder(); + internalGetSearchLinkPromotionsFieldBuilder(); } } @@ -38516,6 +42687,7 @@ public Builder clear() { redirectUri_ = ""; nextPageToken_ = ""; correctedQuery_ = ""; + suggestedQuery_ = ""; summary_ = null; if (summaryBuilder_ != null) { summaryBuilder_.dispose(); @@ -38528,7 +42700,7 @@ public Builder clear() { geoSearchDebugInfo_ = null; geoSearchDebugInfoBuilder_.clear(); } - bitField0_ = (bitField0_ & ~0x00000400); + bitField0_ = (bitField0_ & ~0x00000800); queryExpansionInfo_ = null; if (queryExpansionInfoBuilder_ != null) { queryExpansionInfoBuilder_.dispose(); @@ -38550,7 +42722,15 @@ public Builder clear() { oneBoxResults_ = null; oneBoxResultsBuilder_.clear(); } - bitField0_ = (bitField0_ & ~0x00004000); + bitField0_ = (bitField0_ & ~0x00008000); + if (searchLinkPromotionsBuilder_ == null) { + searchLinkPromotions_ = java.util.Collections.emptyList(); + } else { + searchLinkPromotions_ = null; + searchLinkPromotionsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00010000); + semanticState_ = 0; return this; } @@ -38607,23 +42787,32 @@ private void buildPartialRepeatedFields( result.facets_ = facetsBuilder_.build(); } if (geoSearchDebugInfoBuilder_ == null) { - if (((bitField0_ & 0x00000400) != 0)) { + if (((bitField0_ & 0x00000800) != 0)) { geoSearchDebugInfo_ = java.util.Collections.unmodifiableList(geoSearchDebugInfo_); - bitField0_ = (bitField0_ & ~0x00000400); + bitField0_ = (bitField0_ & ~0x00000800); } result.geoSearchDebugInfo_ = geoSearchDebugInfo_; } else { result.geoSearchDebugInfo_ = geoSearchDebugInfoBuilder_.build(); } if (oneBoxResultsBuilder_ == null) { - if (((bitField0_ & 0x00004000) != 0)) { + if (((bitField0_ & 0x00008000) != 0)) { oneBoxResults_ = java.util.Collections.unmodifiableList(oneBoxResults_); - bitField0_ = (bitField0_ & ~0x00004000); + bitField0_ = (bitField0_ & ~0x00008000); } result.oneBoxResults_ = oneBoxResults_; } else { result.oneBoxResults_ = oneBoxResultsBuilder_.build(); } + if (searchLinkPromotionsBuilder_ == null) { + if (((bitField0_ & 0x00010000) != 0)) { + searchLinkPromotions_ = java.util.Collections.unmodifiableList(searchLinkPromotions_); + bitField0_ = (bitField0_ & ~0x00010000); + } + result.searchLinkPromotions_ = searchLinkPromotions_; + } else { + result.searchLinkPromotions_ = searchLinkPromotionsBuilder_.build(); + } } private void buildPartial0(com.google.cloud.discoveryengine.v1beta.SearchResponse result) { @@ -38652,32 +42841,38 @@ private void buildPartial0(com.google.cloud.discoveryengine.v1beta.SearchRespons result.correctedQuery_ = correctedQuery_; } if (((from_bitField0_ & 0x00000100) != 0)) { + result.suggestedQuery_ = suggestedQuery_; + } + if (((from_bitField0_ & 0x00000200) != 0)) { result.summary_ = summaryBuilder_ == null ? summary_ : summaryBuilder_.build(); to_bitField0_ |= 0x00000002; } - if (((from_bitField0_ & 0x00000200) != 0)) { + if (((from_bitField0_ & 0x00000400) != 0)) { appliedControls_.makeImmutable(); result.appliedControls_ = appliedControls_; } - if (((from_bitField0_ & 0x00000800) != 0)) { + if (((from_bitField0_ & 0x00001000) != 0)) { result.queryExpansionInfo_ = queryExpansionInfoBuilder_ == null ? queryExpansionInfo_ : queryExpansionInfoBuilder_.build(); to_bitField0_ |= 0x00000004; } - if (((from_bitField0_ & 0x00001000) != 0)) { + if (((from_bitField0_ & 0x00002000) != 0)) { result.naturalLanguageQueryUnderstandingInfo_ = naturalLanguageQueryUnderstandingInfoBuilder_ == null ? naturalLanguageQueryUnderstandingInfo_ : naturalLanguageQueryUnderstandingInfoBuilder_.build(); to_bitField0_ |= 0x00000008; } - if (((from_bitField0_ & 0x00002000) != 0)) { + if (((from_bitField0_ & 0x00004000) != 0)) { result.sessionInfo_ = sessionInfoBuilder_ == null ? sessionInfo_ : sessionInfoBuilder_.build(); to_bitField0_ |= 0x00000010; } + if (((from_bitField0_ & 0x00020000) != 0)) { + result.semanticState_ = semanticState_; + } result.bitField0_ |= to_bitField0_; } @@ -38774,13 +42969,18 @@ public Builder mergeFrom(com.google.cloud.discoveryengine.v1beta.SearchResponse bitField0_ |= 0x00000080; onChanged(); } + if (!other.getSuggestedQuery().isEmpty()) { + suggestedQuery_ = other.suggestedQuery_; + bitField0_ |= 0x00000100; + onChanged(); + } if (other.hasSummary()) { mergeSummary(other.getSummary()); } if (!other.appliedControls_.isEmpty()) { if (appliedControls_.isEmpty()) { appliedControls_ = other.appliedControls_; - bitField0_ |= 0x00000200; + bitField0_ |= 0x00000400; } else { ensureAppliedControlsIsMutable(); appliedControls_.addAll(other.appliedControls_); @@ -38791,7 +42991,7 @@ public Builder mergeFrom(com.google.cloud.discoveryengine.v1beta.SearchResponse if (!other.geoSearchDebugInfo_.isEmpty()) { if (geoSearchDebugInfo_.isEmpty()) { geoSearchDebugInfo_ = other.geoSearchDebugInfo_; - bitField0_ = (bitField0_ & ~0x00000400); + bitField0_ = (bitField0_ & ~0x00000800); } else { ensureGeoSearchDebugInfoIsMutable(); geoSearchDebugInfo_.addAll(other.geoSearchDebugInfo_); @@ -38804,7 +43004,7 @@ public Builder mergeFrom(com.google.cloud.discoveryengine.v1beta.SearchResponse geoSearchDebugInfoBuilder_.dispose(); geoSearchDebugInfoBuilder_ = null; geoSearchDebugInfo_ = other.geoSearchDebugInfo_; - bitField0_ = (bitField0_ & ~0x00000400); + bitField0_ = (bitField0_ & ~0x00000800); geoSearchDebugInfoBuilder_ = com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? internalGetGeoSearchDebugInfoFieldBuilder() @@ -38828,7 +43028,7 @@ public Builder mergeFrom(com.google.cloud.discoveryengine.v1beta.SearchResponse if (!other.oneBoxResults_.isEmpty()) { if (oneBoxResults_.isEmpty()) { oneBoxResults_ = other.oneBoxResults_; - bitField0_ = (bitField0_ & ~0x00004000); + bitField0_ = (bitField0_ & ~0x00008000); } else { ensureOneBoxResultsIsMutable(); oneBoxResults_.addAll(other.oneBoxResults_); @@ -38841,7 +43041,7 @@ public Builder mergeFrom(com.google.cloud.discoveryengine.v1beta.SearchResponse oneBoxResultsBuilder_.dispose(); oneBoxResultsBuilder_ = null; oneBoxResults_ = other.oneBoxResults_; - bitField0_ = (bitField0_ & ~0x00004000); + bitField0_ = (bitField0_ & ~0x00008000); oneBoxResultsBuilder_ = com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? internalGetOneBoxResultsFieldBuilder() @@ -38851,6 +43051,36 @@ public Builder mergeFrom(com.google.cloud.discoveryengine.v1beta.SearchResponse } } } + if (searchLinkPromotionsBuilder_ == null) { + if (!other.searchLinkPromotions_.isEmpty()) { + if (searchLinkPromotions_.isEmpty()) { + searchLinkPromotions_ = other.searchLinkPromotions_; + bitField0_ = (bitField0_ & ~0x00010000); + } else { + ensureSearchLinkPromotionsIsMutable(); + searchLinkPromotions_.addAll(other.searchLinkPromotions_); + } + onChanged(); + } + } else { + if (!other.searchLinkPromotions_.isEmpty()) { + if (searchLinkPromotionsBuilder_.isEmpty()) { + searchLinkPromotionsBuilder_.dispose(); + searchLinkPromotionsBuilder_ = null; + searchLinkPromotions_ = other.searchLinkPromotions_; + bitField0_ = (bitField0_ & ~0x00010000); + searchLinkPromotionsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetSearchLinkPromotionsFieldBuilder() + : null; + } else { + searchLinkPromotionsBuilder_.addAllMessages(other.searchLinkPromotions_); + } + } + } + if (other.semanticState_ != 0) { + setSemanticStateValue(other.getSemanticStateValue()); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -38940,7 +43170,7 @@ public Builder mergeFrom( case 74: { input.readMessage(internalGetSummaryFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000100; + bitField0_ |= 0x00000200; break; } // case 74 case 82: @@ -38960,7 +43190,7 @@ public Builder mergeFrom( { input.readMessage( internalGetQueryExpansionInfoFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000800; + bitField0_ |= 0x00001000; break; } // case 114 case 122: @@ -38968,7 +43198,7 @@ public Builder mergeFrom( input.readMessage( internalGetNaturalLanguageQueryUnderstandingInfoFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00001000; + bitField0_ |= 0x00002000; break; } // case 122 case 130: @@ -38990,7 +43220,7 @@ public Builder mergeFrom( { input.readMessage( internalGetSessionInfoFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00002000; + bitField0_ |= 0x00004000; break; } // case 154 case 162: @@ -39008,6 +43238,32 @@ public Builder mergeFrom( } break; } // case 162 + case 186: + { + com.google.cloud.discoveryengine.v1beta.SearchLinkPromotion m = + input.readMessage( + com.google.cloud.discoveryengine.v1beta.SearchLinkPromotion.parser(), + extensionRegistry); + if (searchLinkPromotionsBuilder_ == null) { + ensureSearchLinkPromotionsIsMutable(); + searchLinkPromotions_.add(m); + } else { + searchLinkPromotionsBuilder_.addMessage(m); + } + break; + } // case 186 + case 194: + { + suggestedQuery_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000100; + break; + } // case 194 + case 288: + { + semanticState_ = input.readEnum(); + bitField0_ |= 0x00020000; + break; + } // case 288 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -40628,6 +44884,137 @@ public Builder setCorrectedQueryBytes(com.google.protobuf.ByteString value) { return this; } + private java.lang.Object suggestedQuery_ = ""; + + /** + * + * + *
            +     * Corrected query with low confidence, AKA did you mean query.
            +     * Compared with corrected_query, this field is set when SpellCorrector
            +     * returned a response, but FPR(full page replacement) is not triggered
            +     * because the corrction is of low confidence(eg, reversed because there are
            +     * matches of the original query in document corpus).
            +     * 
            + * + * string suggested_query = 24; + * + * @return The suggestedQuery. + */ + public java.lang.String getSuggestedQuery() { + java.lang.Object ref = suggestedQuery_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + suggestedQuery_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
            +     * Corrected query with low confidence, AKA did you mean query.
            +     * Compared with corrected_query, this field is set when SpellCorrector
            +     * returned a response, but FPR(full page replacement) is not triggered
            +     * because the corrction is of low confidence(eg, reversed because there are
            +     * matches of the original query in document corpus).
            +     * 
            + * + * string suggested_query = 24; + * + * @return The bytes for suggestedQuery. + */ + public com.google.protobuf.ByteString getSuggestedQueryBytes() { + java.lang.Object ref = suggestedQuery_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + suggestedQuery_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
            +     * Corrected query with low confidence, AKA did you mean query.
            +     * Compared with corrected_query, this field is set when SpellCorrector
            +     * returned a response, but FPR(full page replacement) is not triggered
            +     * because the corrction is of low confidence(eg, reversed because there are
            +     * matches of the original query in document corpus).
            +     * 
            + * + * string suggested_query = 24; + * + * @param value The suggestedQuery to set. + * @return This builder for chaining. + */ + public Builder setSuggestedQuery(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + suggestedQuery_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Corrected query with low confidence, AKA did you mean query.
            +     * Compared with corrected_query, this field is set when SpellCorrector
            +     * returned a response, but FPR(full page replacement) is not triggered
            +     * because the corrction is of low confidence(eg, reversed because there are
            +     * matches of the original query in document corpus).
            +     * 
            + * + * string suggested_query = 24; + * + * @return This builder for chaining. + */ + public Builder clearSuggestedQuery() { + suggestedQuery_ = getDefaultInstance().getSuggestedQuery(); + bitField0_ = (bitField0_ & ~0x00000100); + onChanged(); + return this; + } + + /** + * + * + *
            +     * Corrected query with low confidence, AKA did you mean query.
            +     * Compared with corrected_query, this field is set when SpellCorrector
            +     * returned a response, but FPR(full page replacement) is not triggered
            +     * because the corrction is of low confidence(eg, reversed because there are
            +     * matches of the original query in document corpus).
            +     * 
            + * + * string suggested_query = 24; + * + * @param value The bytes for suggestedQuery to set. + * @return This builder for chaining. + */ + public Builder setSuggestedQueryBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + suggestedQuery_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + private com.google.cloud.discoveryengine.v1beta.SearchResponse.Summary summary_; private com.google.protobuf.SingleFieldBuilder< com.google.cloud.discoveryengine.v1beta.SearchResponse.Summary, @@ -40650,7 +45037,7 @@ public Builder setCorrectedQueryBytes(com.google.protobuf.ByteString value) { * @return Whether the summary field is set. */ public boolean hasSummary() { - return ((bitField0_ & 0x00000100) != 0); + return ((bitField0_ & 0x00000200) != 0); } /** @@ -40699,7 +45086,7 @@ public Builder setSummary( } else { summaryBuilder_.setMessage(value); } - bitField0_ |= 0x00000100; + bitField0_ |= 0x00000200; onChanged(); return this; } @@ -40723,7 +45110,7 @@ public Builder setSummary( } else { summaryBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00000100; + bitField0_ |= 0x00000200; onChanged(); return this; } @@ -40743,7 +45130,7 @@ public Builder setSummary( public Builder mergeSummary( com.google.cloud.discoveryengine.v1beta.SearchResponse.Summary value) { if (summaryBuilder_ == null) { - if (((bitField0_ & 0x00000100) != 0) + if (((bitField0_ & 0x00000200) != 0) && summary_ != null && summary_ != com.google.cloud.discoveryengine.v1beta.SearchResponse.Summary @@ -40756,7 +45143,7 @@ public Builder mergeSummary( summaryBuilder_.mergeFrom(value); } if (summary_ != null) { - bitField0_ |= 0x00000100; + bitField0_ |= 0x00000200; onChanged(); } return this; @@ -40775,7 +45162,7 @@ public Builder mergeSummary( * .google.cloud.discoveryengine.v1beta.SearchResponse.Summary summary = 9; */ public Builder clearSummary() { - bitField0_ = (bitField0_ & ~0x00000100); + bitField0_ = (bitField0_ & ~0x00000200); summary_ = null; if (summaryBuilder_ != null) { summaryBuilder_.dispose(); @@ -40799,7 +45186,7 @@ public Builder clearSummary() { */ public com.google.cloud.discoveryengine.v1beta.SearchResponse.Summary.Builder getSummaryBuilder() { - bitField0_ |= 0x00000100; + bitField0_ |= 0x00000200; onChanged(); return internalGetSummaryFieldBuilder().getBuilder(); } @@ -40863,7 +45250,7 @@ private void ensureAppliedControlsIsMutable() { if (!appliedControls_.isModifiable()) { appliedControls_ = new com.google.protobuf.LazyStringArrayList(appliedControls_); } - bitField0_ |= 0x00000200; + bitField0_ |= 0x00000400; } /** @@ -40948,7 +45335,7 @@ public Builder setAppliedControls(int index, java.lang.String value) { } ensureAppliedControlsIsMutable(); appliedControls_.set(index, value); - bitField0_ |= 0x00000200; + bitField0_ |= 0x00000400; onChanged(); return this; } @@ -40971,7 +45358,7 @@ public Builder addAppliedControls(java.lang.String value) { } ensureAppliedControlsIsMutable(); appliedControls_.add(value); - bitField0_ |= 0x00000200; + bitField0_ |= 0x00000400; onChanged(); return this; } @@ -40991,7 +45378,7 @@ public Builder addAppliedControls(java.lang.String value) { public Builder addAllAppliedControls(java.lang.Iterable values) { ensureAppliedControlsIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll(values, appliedControls_); - bitField0_ |= 0x00000200; + bitField0_ |= 0x00000400; onChanged(); return this; } @@ -41009,7 +45396,7 @@ public Builder addAllAppliedControls(java.lang.Iterable values */ public Builder clearAppliedControls() { appliedControls_ = com.google.protobuf.LazyStringArrayList.emptyList(); - bitField0_ = (bitField0_ & ~0x00000200); + bitField0_ = (bitField0_ & ~0x00000400); ; onChanged(); return this; @@ -41034,7 +45421,7 @@ public Builder addAppliedControlsBytes(com.google.protobuf.ByteString value) { checkByteStringIsUtf8(value); ensureAppliedControlsIsMutable(); appliedControls_.add(value); - bitField0_ |= 0x00000200; + bitField0_ |= 0x00000400; onChanged(); return this; } @@ -41044,12 +45431,12 @@ public Builder addAppliedControlsBytes(com.google.protobuf.ByteString value) { geoSearchDebugInfo_ = java.util.Collections.emptyList(); private void ensureGeoSearchDebugInfoIsMutable() { - if (!((bitField0_ & 0x00000400) != 0)) { + if (!((bitField0_ & 0x00000800) != 0)) { geoSearchDebugInfo_ = new java.util.ArrayList< com.google.cloud.discoveryengine.v1beta.SearchResponse.GeoSearchDebugInfo>( geoSearchDebugInfo_); - bitField0_ |= 0x00000400; + bitField0_ |= 0x00000800; } } @@ -41245,7 +45632,7 @@ public Builder addAllGeoSearchDebugInfo( public Builder clearGeoSearchDebugInfo() { if (geoSearchDebugInfoBuilder_ == null) { geoSearchDebugInfo_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000400); + bitField0_ = (bitField0_ & ~0x00000800); onChanged(); } else { geoSearchDebugInfoBuilder_.clear(); @@ -41359,7 +45746,7 @@ public Builder removeGeoSearchDebugInfo(int index) { com.google.cloud.discoveryengine.v1beta.SearchResponse.GeoSearchDebugInfo.Builder, com.google.cloud.discoveryengine.v1beta.SearchResponse.GeoSearchDebugInfoOrBuilder>( geoSearchDebugInfo_, - ((bitField0_ & 0x00000400) != 0), + ((bitField0_ & 0x00000800) != 0), getParentForChildren(), isClean()); geoSearchDebugInfo_ = null; @@ -41389,7 +45776,7 @@ public Builder removeGeoSearchDebugInfo(int index) { * @return Whether the queryExpansionInfo field is set. */ public boolean hasQueryExpansionInfo() { - return ((bitField0_ & 0x00000800) != 0); + return ((bitField0_ & 0x00001000) != 0); } /** @@ -41438,7 +45825,7 @@ public Builder setQueryExpansionInfo( } else { queryExpansionInfoBuilder_.setMessage(value); } - bitField0_ |= 0x00000800; + bitField0_ |= 0x00001000; onChanged(); return this; } @@ -41462,7 +45849,7 @@ public Builder setQueryExpansionInfo( } else { queryExpansionInfoBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00000800; + bitField0_ |= 0x00001000; onChanged(); return this; } @@ -41481,7 +45868,7 @@ public Builder setQueryExpansionInfo( public Builder mergeQueryExpansionInfo( com.google.cloud.discoveryengine.v1beta.SearchResponse.QueryExpansionInfo value) { if (queryExpansionInfoBuilder_ == null) { - if (((bitField0_ & 0x00000800) != 0) + if (((bitField0_ & 0x00001000) != 0) && queryExpansionInfo_ != null && queryExpansionInfo_ != com.google.cloud.discoveryengine.v1beta.SearchResponse.QueryExpansionInfo @@ -41494,7 +45881,7 @@ public Builder mergeQueryExpansionInfo( queryExpansionInfoBuilder_.mergeFrom(value); } if (queryExpansionInfo_ != null) { - bitField0_ |= 0x00000800; + bitField0_ |= 0x00001000; onChanged(); } return this; @@ -41512,7 +45899,7 @@ public Builder mergeQueryExpansionInfo( *
            */ public Builder clearQueryExpansionInfo() { - bitField0_ = (bitField0_ & ~0x00000800); + bitField0_ = (bitField0_ & ~0x00001000); queryExpansionInfo_ = null; if (queryExpansionInfoBuilder_ != null) { queryExpansionInfoBuilder_.dispose(); @@ -41535,7 +45922,7 @@ public Builder clearQueryExpansionInfo() { */ public com.google.cloud.discoveryengine.v1beta.SearchResponse.QueryExpansionInfo.Builder getQueryExpansionInfoBuilder() { - bitField0_ |= 0x00000800; + bitField0_ |= 0x00001000; onChanged(); return internalGetQueryExpansionInfoFieldBuilder().getBuilder(); } @@ -41607,28 +45994,30 @@ public Builder clearQueryExpansionInfo() { * * *
            -     * Natural language query understanding information for the returned results.
            +     * Output only. Natural language query understanding information for the
            +     * returned results.
                  * 
            * * - * .google.cloud.discoveryengine.v1beta.SearchResponse.NaturalLanguageQueryUnderstandingInfo natural_language_query_understanding_info = 15; + * .google.cloud.discoveryengine.v1beta.SearchResponse.NaturalLanguageQueryUnderstandingInfo natural_language_query_understanding_info = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * * @return Whether the naturalLanguageQueryUnderstandingInfo field is set. */ public boolean hasNaturalLanguageQueryUnderstandingInfo() { - return ((bitField0_ & 0x00001000) != 0); + return ((bitField0_ & 0x00002000) != 0); } /** * * *
            -     * Natural language query understanding information for the returned results.
            +     * Output only. Natural language query understanding information for the
            +     * returned results.
                  * 
            * * - * .google.cloud.discoveryengine.v1beta.SearchResponse.NaturalLanguageQueryUnderstandingInfo natural_language_query_understanding_info = 15; + * .google.cloud.discoveryengine.v1beta.SearchResponse.NaturalLanguageQueryUnderstandingInfo natural_language_query_understanding_info = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * * @return The naturalLanguageQueryUnderstandingInfo. @@ -41650,11 +46039,12 @@ public boolean hasNaturalLanguageQueryUnderstandingInfo() { * * *
            -     * Natural language query understanding information for the returned results.
            +     * Output only. Natural language query understanding information for the
            +     * returned results.
                  * 
            * * - * .google.cloud.discoveryengine.v1beta.SearchResponse.NaturalLanguageQueryUnderstandingInfo natural_language_query_understanding_info = 15; + * .google.cloud.discoveryengine.v1beta.SearchResponse.NaturalLanguageQueryUnderstandingInfo natural_language_query_understanding_info = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ public Builder setNaturalLanguageQueryUnderstandingInfo( @@ -41668,7 +46058,7 @@ public Builder setNaturalLanguageQueryUnderstandingInfo( } else { naturalLanguageQueryUnderstandingInfoBuilder_.setMessage(value); } - bitField0_ |= 0x00001000; + bitField0_ |= 0x00002000; onChanged(); return this; } @@ -41677,11 +46067,12 @@ public Builder setNaturalLanguageQueryUnderstandingInfo( * * *
            -     * Natural language query understanding information for the returned results.
            +     * Output only. Natural language query understanding information for the
            +     * returned results.
                  * 
            * * - * .google.cloud.discoveryengine.v1beta.SearchResponse.NaturalLanguageQueryUnderstandingInfo natural_language_query_understanding_info = 15; + * .google.cloud.discoveryengine.v1beta.SearchResponse.NaturalLanguageQueryUnderstandingInfo natural_language_query_understanding_info = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ public Builder setNaturalLanguageQueryUnderstandingInfo( @@ -41693,7 +46084,7 @@ public Builder setNaturalLanguageQueryUnderstandingInfo( } else { naturalLanguageQueryUnderstandingInfoBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00001000; + bitField0_ |= 0x00002000; onChanged(); return this; } @@ -41702,18 +46093,19 @@ public Builder setNaturalLanguageQueryUnderstandingInfo( * * *
            -     * Natural language query understanding information for the returned results.
            +     * Output only. Natural language query understanding information for the
            +     * returned results.
                  * 
            * * - * .google.cloud.discoveryengine.v1beta.SearchResponse.NaturalLanguageQueryUnderstandingInfo natural_language_query_understanding_info = 15; + * .google.cloud.discoveryengine.v1beta.SearchResponse.NaturalLanguageQueryUnderstandingInfo natural_language_query_understanding_info = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ public Builder mergeNaturalLanguageQueryUnderstandingInfo( com.google.cloud.discoveryengine.v1beta.SearchResponse.NaturalLanguageQueryUnderstandingInfo value) { if (naturalLanguageQueryUnderstandingInfoBuilder_ == null) { - if (((bitField0_ & 0x00001000) != 0) + if (((bitField0_ & 0x00002000) != 0) && naturalLanguageQueryUnderstandingInfo_ != null && naturalLanguageQueryUnderstandingInfo_ != com.google.cloud.discoveryengine.v1beta.SearchResponse @@ -41726,7 +46118,7 @@ public Builder mergeNaturalLanguageQueryUnderstandingInfo( naturalLanguageQueryUnderstandingInfoBuilder_.mergeFrom(value); } if (naturalLanguageQueryUnderstandingInfo_ != null) { - bitField0_ |= 0x00001000; + bitField0_ |= 0x00002000; onChanged(); } return this; @@ -41736,15 +46128,16 @@ public Builder mergeNaturalLanguageQueryUnderstandingInfo( * * *
            -     * Natural language query understanding information for the returned results.
            +     * Output only. Natural language query understanding information for the
            +     * returned results.
                  * 
            * * - * .google.cloud.discoveryengine.v1beta.SearchResponse.NaturalLanguageQueryUnderstandingInfo natural_language_query_understanding_info = 15; + * .google.cloud.discoveryengine.v1beta.SearchResponse.NaturalLanguageQueryUnderstandingInfo natural_language_query_understanding_info = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ public Builder clearNaturalLanguageQueryUnderstandingInfo() { - bitField0_ = (bitField0_ & ~0x00001000); + bitField0_ = (bitField0_ & ~0x00002000); naturalLanguageQueryUnderstandingInfo_ = null; if (naturalLanguageQueryUnderstandingInfoBuilder_ != null) { naturalLanguageQueryUnderstandingInfoBuilder_.dispose(); @@ -41758,17 +46151,18 @@ public Builder clearNaturalLanguageQueryUnderstandingInfo() { * * *
            -     * Natural language query understanding information for the returned results.
            +     * Output only. Natural language query understanding information for the
            +     * returned results.
                  * 
            * * - * .google.cloud.discoveryengine.v1beta.SearchResponse.NaturalLanguageQueryUnderstandingInfo natural_language_query_understanding_info = 15; + * .google.cloud.discoveryengine.v1beta.SearchResponse.NaturalLanguageQueryUnderstandingInfo natural_language_query_understanding_info = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ public com.google.cloud.discoveryengine.v1beta.SearchResponse .NaturalLanguageQueryUnderstandingInfo.Builder getNaturalLanguageQueryUnderstandingInfoBuilder() { - bitField0_ |= 0x00001000; + bitField0_ |= 0x00002000; onChanged(); return internalGetNaturalLanguageQueryUnderstandingInfoFieldBuilder().getBuilder(); } @@ -41777,11 +46171,12 @@ public Builder clearNaturalLanguageQueryUnderstandingInfo() { * * *
            -     * Natural language query understanding information for the returned results.
            +     * Output only. Natural language query understanding information for the
            +     * returned results.
                  * 
            * * - * .google.cloud.discoveryengine.v1beta.SearchResponse.NaturalLanguageQueryUnderstandingInfo natural_language_query_understanding_info = 15; + * .google.cloud.discoveryengine.v1beta.SearchResponse.NaturalLanguageQueryUnderstandingInfo natural_language_query_understanding_info = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ public com.google.cloud.discoveryengine.v1beta.SearchResponse @@ -41801,11 +46196,12 @@ public Builder clearNaturalLanguageQueryUnderstandingInfo() { * * *
            -     * Natural language query understanding information for the returned results.
            +     * Output only. Natural language query understanding information for the
            +     * returned results.
                  * 
            * * - * .google.cloud.discoveryengine.v1beta.SearchResponse.NaturalLanguageQueryUnderstandingInfo natural_language_query_understanding_info = 15; + * .google.cloud.discoveryengine.v1beta.SearchResponse.NaturalLanguageQueryUnderstandingInfo natural_language_query_understanding_info = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ private com.google.protobuf.SingleFieldBuilder< @@ -41855,7 +46251,7 @@ public Builder clearNaturalLanguageQueryUnderstandingInfo() { * @return Whether the sessionInfo field is set. */ public boolean hasSessionInfo() { - return ((bitField0_ & 0x00002000) != 0); + return ((bitField0_ & 0x00004000) != 0); } /** @@ -41909,7 +46305,7 @@ public Builder setSessionInfo( } else { sessionInfoBuilder_.setMessage(value); } - bitField0_ |= 0x00002000; + bitField0_ |= 0x00004000; onChanged(); return this; } @@ -41936,7 +46332,7 @@ public Builder setSessionInfo( } else { sessionInfoBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00002000; + bitField0_ |= 0x00004000; onChanged(); return this; } @@ -41958,7 +46354,7 @@ public Builder setSessionInfo( public Builder mergeSessionInfo( com.google.cloud.discoveryengine.v1beta.SearchResponse.SessionInfo value) { if (sessionInfoBuilder_ == null) { - if (((bitField0_ & 0x00002000) != 0) + if (((bitField0_ & 0x00004000) != 0) && sessionInfo_ != null && sessionInfo_ != com.google.cloud.discoveryengine.v1beta.SearchResponse.SessionInfo @@ -41971,7 +46367,7 @@ public Builder mergeSessionInfo( sessionInfoBuilder_.mergeFrom(value); } if (sessionInfo_ != null) { - bitField0_ |= 0x00002000; + bitField0_ |= 0x00004000; onChanged(); } return this; @@ -41992,7 +46388,7 @@ public Builder mergeSessionInfo( *
            */ public Builder clearSessionInfo() { - bitField0_ = (bitField0_ & ~0x00002000); + bitField0_ = (bitField0_ & ~0x00004000); sessionInfo_ = null; if (sessionInfoBuilder_ != null) { sessionInfoBuilder_.dispose(); @@ -42018,7 +46414,7 @@ public Builder clearSessionInfo() { */ public com.google.cloud.discoveryengine.v1beta.SearchResponse.SessionInfo.Builder getSessionInfoBuilder() { - bitField0_ |= 0x00002000; + bitField0_ |= 0x00004000; onChanged(); return internalGetSessionInfoFieldBuilder().getBuilder(); } @@ -42084,12 +46480,12 @@ public Builder clearSessionInfo() { oneBoxResults_ = java.util.Collections.emptyList(); private void ensureOneBoxResultsIsMutable() { - if (!((bitField0_ & 0x00004000) != 0)) { + if (!((bitField0_ & 0x00008000) != 0)) { oneBoxResults_ = new java.util.ArrayList< com.google.cloud.discoveryengine.v1beta.SearchResponse.OneBoxResult>( oneBoxResults_); - bitField0_ |= 0x00004000; + bitField0_ |= 0x00008000; } } @@ -42360,7 +46756,7 @@ public Builder addAllOneBoxResults( public Builder clearOneBoxResults() { if (oneBoxResultsBuilder_ == null) { oneBoxResults_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00004000); + bitField0_ = (bitField0_ & ~0x00008000); onChanged(); } else { oneBoxResultsBuilder_.clear(); @@ -42522,7 +46918,7 @@ public Builder removeOneBoxResults(int index) { com.google.cloud.discoveryengine.v1beta.SearchResponse.OneBoxResult.Builder, com.google.cloud.discoveryengine.v1beta.SearchResponse.OneBoxResultOrBuilder>( oneBoxResults_, - ((bitField0_ & 0x00004000) != 0), + ((bitField0_ & 0x00008000) != 0), getParentForChildren(), isClean()); oneBoxResults_ = null; @@ -42530,6 +46926,539 @@ public Builder removeOneBoxResults(int index) { return oneBoxResultsBuilder_; } + private java.util.List + searchLinkPromotions_ = java.util.Collections.emptyList(); + + private void ensureSearchLinkPromotionsIsMutable() { + if (!((bitField0_ & 0x00010000) != 0)) { + searchLinkPromotions_ = + new java.util.ArrayList( + searchLinkPromotions_); + bitField0_ |= 0x00010000; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.discoveryengine.v1beta.SearchLinkPromotion, + com.google.cloud.discoveryengine.v1beta.SearchLinkPromotion.Builder, + com.google.cloud.discoveryengine.v1beta.SearchLinkPromotionOrBuilder> + searchLinkPromotionsBuilder_; + + /** + * + * + *
            +     * Promotions for site search.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.SearchLinkPromotion search_link_promotions = 23; + * + */ + public java.util.List + getSearchLinkPromotionsList() { + if (searchLinkPromotionsBuilder_ == null) { + return java.util.Collections.unmodifiableList(searchLinkPromotions_); + } else { + return searchLinkPromotionsBuilder_.getMessageList(); + } + } + + /** + * + * + *
            +     * Promotions for site search.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.SearchLinkPromotion search_link_promotions = 23; + * + */ + public int getSearchLinkPromotionsCount() { + if (searchLinkPromotionsBuilder_ == null) { + return searchLinkPromotions_.size(); + } else { + return searchLinkPromotionsBuilder_.getCount(); + } + } + + /** + * + * + *
            +     * Promotions for site search.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.SearchLinkPromotion search_link_promotions = 23; + * + */ + public com.google.cloud.discoveryengine.v1beta.SearchLinkPromotion getSearchLinkPromotions( + int index) { + if (searchLinkPromotionsBuilder_ == null) { + return searchLinkPromotions_.get(index); + } else { + return searchLinkPromotionsBuilder_.getMessage(index); + } + } + + /** + * + * + *
            +     * Promotions for site search.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.SearchLinkPromotion search_link_promotions = 23; + * + */ + public Builder setSearchLinkPromotions( + int index, com.google.cloud.discoveryengine.v1beta.SearchLinkPromotion value) { + if (searchLinkPromotionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSearchLinkPromotionsIsMutable(); + searchLinkPromotions_.set(index, value); + onChanged(); + } else { + searchLinkPromotionsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
            +     * Promotions for site search.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.SearchLinkPromotion search_link_promotions = 23; + * + */ + public Builder setSearchLinkPromotions( + int index, + com.google.cloud.discoveryengine.v1beta.SearchLinkPromotion.Builder builderForValue) { + if (searchLinkPromotionsBuilder_ == null) { + ensureSearchLinkPromotionsIsMutable(); + searchLinkPromotions_.set(index, builderForValue.build()); + onChanged(); + } else { + searchLinkPromotionsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
            +     * Promotions for site search.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.SearchLinkPromotion search_link_promotions = 23; + * + */ + public Builder addSearchLinkPromotions( + com.google.cloud.discoveryengine.v1beta.SearchLinkPromotion value) { + if (searchLinkPromotionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSearchLinkPromotionsIsMutable(); + searchLinkPromotions_.add(value); + onChanged(); + } else { + searchLinkPromotionsBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
            +     * Promotions for site search.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.SearchLinkPromotion search_link_promotions = 23; + * + */ + public Builder addSearchLinkPromotions( + int index, com.google.cloud.discoveryengine.v1beta.SearchLinkPromotion value) { + if (searchLinkPromotionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSearchLinkPromotionsIsMutable(); + searchLinkPromotions_.add(index, value); + onChanged(); + } else { + searchLinkPromotionsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
            +     * Promotions for site search.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.SearchLinkPromotion search_link_promotions = 23; + * + */ + public Builder addSearchLinkPromotions( + com.google.cloud.discoveryengine.v1beta.SearchLinkPromotion.Builder builderForValue) { + if (searchLinkPromotionsBuilder_ == null) { + ensureSearchLinkPromotionsIsMutable(); + searchLinkPromotions_.add(builderForValue.build()); + onChanged(); + } else { + searchLinkPromotionsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
            +     * Promotions for site search.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.SearchLinkPromotion search_link_promotions = 23; + * + */ + public Builder addSearchLinkPromotions( + int index, + com.google.cloud.discoveryengine.v1beta.SearchLinkPromotion.Builder builderForValue) { + if (searchLinkPromotionsBuilder_ == null) { + ensureSearchLinkPromotionsIsMutable(); + searchLinkPromotions_.add(index, builderForValue.build()); + onChanged(); + } else { + searchLinkPromotionsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
            +     * Promotions for site search.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.SearchLinkPromotion search_link_promotions = 23; + * + */ + public Builder addAllSearchLinkPromotions( + java.lang.Iterable + values) { + if (searchLinkPromotionsBuilder_ == null) { + ensureSearchLinkPromotionsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, searchLinkPromotions_); + onChanged(); + } else { + searchLinkPromotionsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
            +     * Promotions for site search.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.SearchLinkPromotion search_link_promotions = 23; + * + */ + public Builder clearSearchLinkPromotions() { + if (searchLinkPromotionsBuilder_ == null) { + searchLinkPromotions_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00010000); + onChanged(); + } else { + searchLinkPromotionsBuilder_.clear(); + } + return this; + } + + /** + * + * + *
            +     * Promotions for site search.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.SearchLinkPromotion search_link_promotions = 23; + * + */ + public Builder removeSearchLinkPromotions(int index) { + if (searchLinkPromotionsBuilder_ == null) { + ensureSearchLinkPromotionsIsMutable(); + searchLinkPromotions_.remove(index); + onChanged(); + } else { + searchLinkPromotionsBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
            +     * Promotions for site search.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.SearchLinkPromotion search_link_promotions = 23; + * + */ + public com.google.cloud.discoveryengine.v1beta.SearchLinkPromotion.Builder + getSearchLinkPromotionsBuilder(int index) { + return internalGetSearchLinkPromotionsFieldBuilder().getBuilder(index); + } + + /** + * + * + *
            +     * Promotions for site search.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.SearchLinkPromotion search_link_promotions = 23; + * + */ + public com.google.cloud.discoveryengine.v1beta.SearchLinkPromotionOrBuilder + getSearchLinkPromotionsOrBuilder(int index) { + if (searchLinkPromotionsBuilder_ == null) { + return searchLinkPromotions_.get(index); + } else { + return searchLinkPromotionsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
            +     * Promotions for site search.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.SearchLinkPromotion search_link_promotions = 23; + * + */ + public java.util.List< + ? extends com.google.cloud.discoveryengine.v1beta.SearchLinkPromotionOrBuilder> + getSearchLinkPromotionsOrBuilderList() { + if (searchLinkPromotionsBuilder_ != null) { + return searchLinkPromotionsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(searchLinkPromotions_); + } + } + + /** + * + * + *
            +     * Promotions for site search.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.SearchLinkPromotion search_link_promotions = 23; + * + */ + public com.google.cloud.discoveryengine.v1beta.SearchLinkPromotion.Builder + addSearchLinkPromotionsBuilder() { + return internalGetSearchLinkPromotionsFieldBuilder() + .addBuilder( + com.google.cloud.discoveryengine.v1beta.SearchLinkPromotion.getDefaultInstance()); + } + + /** + * + * + *
            +     * Promotions for site search.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.SearchLinkPromotion search_link_promotions = 23; + * + */ + public com.google.cloud.discoveryengine.v1beta.SearchLinkPromotion.Builder + addSearchLinkPromotionsBuilder(int index) { + return internalGetSearchLinkPromotionsFieldBuilder() + .addBuilder( + index, + com.google.cloud.discoveryengine.v1beta.SearchLinkPromotion.getDefaultInstance()); + } + + /** + * + * + *
            +     * Promotions for site search.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.SearchLinkPromotion search_link_promotions = 23; + * + */ + public java.util.List + getSearchLinkPromotionsBuilderList() { + return internalGetSearchLinkPromotionsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.discoveryengine.v1beta.SearchLinkPromotion, + com.google.cloud.discoveryengine.v1beta.SearchLinkPromotion.Builder, + com.google.cloud.discoveryengine.v1beta.SearchLinkPromotionOrBuilder> + internalGetSearchLinkPromotionsFieldBuilder() { + if (searchLinkPromotionsBuilder_ == null) { + searchLinkPromotionsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.discoveryengine.v1beta.SearchLinkPromotion, + com.google.cloud.discoveryengine.v1beta.SearchLinkPromotion.Builder, + com.google.cloud.discoveryengine.v1beta.SearchLinkPromotionOrBuilder>( + searchLinkPromotions_, + ((bitField0_ & 0x00010000) != 0), + getParentForChildren(), + isClean()); + searchLinkPromotions_ = null; + } + return searchLinkPromotionsBuilder_; + } + + private int semanticState_ = 0; + + /** + * + * + *
            +     * Output only. Indicates the semantic state of the search response.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchResponse.SemanticState semantic_state = 36 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for semanticState. + */ + @java.lang.Override + public int getSemanticStateValue() { + return semanticState_; + } + + /** + * + * + *
            +     * Output only. Indicates the semantic state of the search response.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchResponse.SemanticState semantic_state = 36 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The enum numeric value on the wire for semanticState to set. + * @return This builder for chaining. + */ + public Builder setSemanticStateValue(int value) { + semanticState_ = value; + bitField0_ |= 0x00020000; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Output only. Indicates the semantic state of the search response.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchResponse.SemanticState semantic_state = 36 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The semanticState. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.SearchResponse.SemanticState getSemanticState() { + com.google.cloud.discoveryengine.v1beta.SearchResponse.SemanticState result = + com.google.cloud.discoveryengine.v1beta.SearchResponse.SemanticState.forNumber( + semanticState_); + return result == null + ? com.google.cloud.discoveryengine.v1beta.SearchResponse.SemanticState.UNRECOGNIZED + : result; + } + + /** + * + * + *
            +     * Output only. Indicates the semantic state of the search response.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchResponse.SemanticState semantic_state = 36 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The semanticState to set. + * @return This builder for chaining. + */ + public Builder setSemanticState( + com.google.cloud.discoveryengine.v1beta.SearchResponse.SemanticState value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00020000; + semanticState_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
            +     * Output only. Indicates the semantic state of the search response.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchResponse.SemanticState semantic_state = 36 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearSemanticState() { + bitField0_ = (bitField0_ & ~0x00020000); + semanticState_ = 0; + onChanged(); + return this; + } + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.SearchResponse) } diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/SearchResponseOrBuilder.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/SearchResponseOrBuilder.java index e96d461d1a66..b8846e95385e 100644 --- a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/SearchResponseOrBuilder.java +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/SearchResponseOrBuilder.java @@ -341,6 +341,40 @@ com.google.cloud.discoveryengine.v1beta.SearchResponse.FacetOrBuilder getFacetsO */ com.google.protobuf.ByteString getCorrectedQueryBytes(); + /** + * + * + *
            +   * Corrected query with low confidence, AKA did you mean query.
            +   * Compared with corrected_query, this field is set when SpellCorrector
            +   * returned a response, but FPR(full page replacement) is not triggered
            +   * because the corrction is of low confidence(eg, reversed because there are
            +   * matches of the original query in document corpus).
            +   * 
            + * + * string suggested_query = 24; + * + * @return The suggestedQuery. + */ + java.lang.String getSuggestedQuery(); + + /** + * + * + *
            +   * Corrected query with low confidence, AKA did you mean query.
            +   * Compared with corrected_query, this field is set when SpellCorrector
            +   * returned a response, but FPR(full page replacement) is not triggered
            +   * because the corrction is of low confidence(eg, reversed because there are
            +   * matches of the original query in document corpus).
            +   * 
            + * + * string suggested_query = 24; + * + * @return The bytes for suggestedQuery. + */ + com.google.protobuf.ByteString getSuggestedQueryBytes(); + /** * * @@ -530,11 +564,12 @@ com.google.cloud.discoveryengine.v1beta.SearchResponse.GeoSearchDebugInfo getGeo * * *
            -   * Natural language query understanding information for the returned results.
            +   * Output only. Natural language query understanding information for the
            +   * returned results.
                * 
            * * - * .google.cloud.discoveryengine.v1beta.SearchResponse.NaturalLanguageQueryUnderstandingInfo natural_language_query_understanding_info = 15; + * .google.cloud.discoveryengine.v1beta.SearchResponse.NaturalLanguageQueryUnderstandingInfo natural_language_query_understanding_info = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * * @return Whether the naturalLanguageQueryUnderstandingInfo field is set. @@ -545,11 +580,12 @@ com.google.cloud.discoveryengine.v1beta.SearchResponse.GeoSearchDebugInfo getGeo * * *
            -   * Natural language query understanding information for the returned results.
            +   * Output only. Natural language query understanding information for the
            +   * returned results.
                * 
            * * - * .google.cloud.discoveryengine.v1beta.SearchResponse.NaturalLanguageQueryUnderstandingInfo natural_language_query_understanding_info = 15; + * .google.cloud.discoveryengine.v1beta.SearchResponse.NaturalLanguageQueryUnderstandingInfo natural_language_query_understanding_info = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * * @return The naturalLanguageQueryUnderstandingInfo. @@ -561,11 +597,12 @@ com.google.cloud.discoveryengine.v1beta.SearchResponse.GeoSearchDebugInfo getGeo * * *
            -   * Natural language query understanding information for the returned results.
            +   * Output only. Natural language query understanding information for the
            +   * returned results.
                * 
            * * - * .google.cloud.discoveryengine.v1beta.SearchResponse.NaturalLanguageQueryUnderstandingInfo natural_language_query_understanding_info = 15; + * .google.cloud.discoveryengine.v1beta.SearchResponse.NaturalLanguageQueryUnderstandingInfo natural_language_query_understanding_info = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ com.google.cloud.discoveryengine.v1beta.SearchResponse @@ -695,4 +732,102 @@ com.google.cloud.discoveryengine.v1beta.SearchResponse.GeoSearchDebugInfo getGeo */ com.google.cloud.discoveryengine.v1beta.SearchResponse.OneBoxResultOrBuilder getOneBoxResultsOrBuilder(int index); + + /** + * + * + *
            +   * Promotions for site search.
            +   * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.SearchLinkPromotion search_link_promotions = 23; + * + */ + java.util.List + getSearchLinkPromotionsList(); + + /** + * + * + *
            +   * Promotions for site search.
            +   * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.SearchLinkPromotion search_link_promotions = 23; + * + */ + com.google.cloud.discoveryengine.v1beta.SearchLinkPromotion getSearchLinkPromotions(int index); + + /** + * + * + *
            +   * Promotions for site search.
            +   * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.SearchLinkPromotion search_link_promotions = 23; + * + */ + int getSearchLinkPromotionsCount(); + + /** + * + * + *
            +   * Promotions for site search.
            +   * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.SearchLinkPromotion search_link_promotions = 23; + * + */ + java.util.List + getSearchLinkPromotionsOrBuilderList(); + + /** + * + * + *
            +   * Promotions for site search.
            +   * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.SearchLinkPromotion search_link_promotions = 23; + * + */ + com.google.cloud.discoveryengine.v1beta.SearchLinkPromotionOrBuilder + getSearchLinkPromotionsOrBuilder(int index); + + /** + * + * + *
            +   * Output only. Indicates the semantic state of the search response.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchResponse.SemanticState semantic_state = 36 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for semanticState. + */ + int getSemanticStateValue(); + + /** + * + * + *
            +   * Output only. Indicates the semantic state of the search response.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.SearchResponse.SemanticState semantic_state = 36 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The semanticState. + */ + com.google.cloud.discoveryengine.v1beta.SearchResponse.SemanticState getSemanticState(); } diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/SearchServiceProto.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/SearchServiceProto.java index e5f1f58b8fde..ea37b48b30e8 100644 --- a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/SearchServiceProto.java +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/SearchServiceProto.java @@ -96,6 +96,10 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_ContentSearchSpec_SummarySpec_descriptor; static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_ContentSearchSpec_SummarySpec_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_ContentSearchSpec_SummarySpec_MultiModalSpec_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_ContentSearchSpec_SummarySpec_MultiModalSpec_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_ContentSearchSpec_SummarySpec_ModelPromptSpec_descriptor; static final com.google.protobuf.GeneratedMessage.FieldAccessorTable @@ -128,14 +132,42 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_SearchAsYouTypeSpec_descriptor; static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_SearchAsYouTypeSpec_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_DisplaySpec_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_DisplaySpec_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_CrowdingSpec_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_CrowdingSpec_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_SessionSpec_descriptor; static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_SessionSpec_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_RelevanceFilterSpec_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_RelevanceFilterSpec_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_RelevanceFilterSpec_RelevanceThresholdSpec_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_RelevanceFilterSpec_RelevanceThresholdSpec_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_PersonalizationSpec_descriptor; static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_PersonalizationSpec_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_RelevanceScoreSpec_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_RelevanceScoreSpec_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_SearchAddonSpec_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_SearchAddonSpec_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_CustomRankingParams_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_CustomRankingParams_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_ParamsEntry_descriptor; static final com.google.protobuf.GeneratedMessage.FieldAccessorTable @@ -152,10 +184,6 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_discoveryengine_v1beta_SearchResponse_SearchResult_descriptor; static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_cloud_discoveryengine_v1beta_SearchResponse_SearchResult_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_discoveryengine_v1beta_SearchResponse_SearchResult_ModelScoresEntry_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_discoveryengine_v1beta_SearchResponse_SearchResult_ModelScoresEntry_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_discoveryengine_v1beta_SearchResponse_SearchResult_RankSignals_descriptor; static final com.google.protobuf.GeneratedMessage.FieldAccessorTable @@ -164,6 +192,10 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_discoveryengine_v1beta_SearchResponse_SearchResult_RankSignals_CustomSignal_descriptor; static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_cloud_discoveryengine_v1beta_SearchResponse_SearchResult_RankSignals_CustomSignal_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1beta_SearchResponse_SearchResult_ModelScoresEntry_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1beta_SearchResponse_SearchResult_ModelScoresEntry_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_discoveryengine_v1beta_SearchResponse_Facet_descriptor; static final com.google.protobuf.GeneratedMessage.FieldAccessorTable @@ -208,6 +240,14 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_discoveryengine_v1beta_SearchResponse_Summary_Reference_ChunkContent_descriptor; static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_cloud_discoveryengine_v1beta_SearchResponse_Summary_Reference_ChunkContent_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1beta_SearchResponse_Summary_BlobAttachment_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1beta_SearchResponse_Summary_BlobAttachment_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1beta_SearchResponse_Summary_BlobAttachment_Blob_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1beta_SearchResponse_Summary_BlobAttachment_Blob_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_discoveryengine_v1beta_SearchResponse_Summary_SummaryWithMetadata_descriptor; static final com.google.protobuf.GeneratedMessage.FieldAccessorTable @@ -276,21 +316,23 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "pi/field_behavior.proto\032\031google/api/reso" + "urce.proto\032/google/cloud/discoveryengine/v1beta/chunk.proto\0320google/cloud/discov" + "eryengine/v1beta/common.proto\0322google/cl" - + "oud/discoveryengine/v1beta/document.proto\032\034google/protobuf/struct.proto\"\2327\n\r" + + "oud/discoveryengine/v1beta/document.proto\032\034google/protobuf/struct.proto\"\364L\n\r" + "SearchRequest\022L\n" + "\016serving_config\030\001 \001(\tB4\340A\002\372A.\n" + ",discoveryengine.googleapis.com/ServingConfig\022:\n" + "\006branch\030\002 \001(\tB*\372A\'\n" + "%discoveryengine.googleapis.com/Branch\022\r\n" - + "\005query\030\003 \001(\t\022R\n" - + "\013image_query\030\023 \001(\0132=.google.cloud.d" - + "iscoveryengine.v1beta.SearchRequest.ImageQuery\022\021\n" + + "\005query\030\003 \001(\t\022\034\n" + + "\017page_categories\030? \003(\tB\003\340A\001\022R\n" + + "\013image_query\030\023" + + " \001(\0132=.google.cloud.discoveryengine.v1beta.SearchRequest.ImageQuery\022\021\n" + "\tpage_size\030\004 \001(\005\022\022\n\n" + "page_token\030\005 \001(\t\022\016\n" + "\006offset\030\006 \001(\005\022\031\n" + "\021one_box_page_size\030/ \001(\005\022Z\n" - + "\020data_store_specs\030 \003(\0132@.goo" - + "gle.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec\022\016\n" + + "\020data_store_specs\030 \003(\0132@.google.cloud." + + "discoveryengine.v1beta.SearchRequest.DataStoreSpec\022\'\n" + + "\032num_results_per_data_store\030A \001(\005B\003\340A\001\022\016\n" + "\006filter\030\007 \001(\t\022\030\n" + "\020canonical_filter\030\035 \001(\t\022\020\n" + "\010order_by\030\010 \001(\t\022@\n" @@ -298,54 +340,69 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + " \001(\0132-.google.cloud.discoveryengine.v1beta.UserInfo\022\025\n\r" + "language_code\030# \001(\t\022\023\n" + "\013region_code\030$ \001(\t\022Q\n" - + "\013facet_specs\030\t" - + " \003(\0132<.google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec\022P\n\n" + + "\013facet_specs\030\t \003" + + "(\0132<.google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec\022P\n\n" + "boost_spec\030\n" + " \001(\0132<.google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec\022N\n" - + "\006params\030\013" - + " \003(\0132>.google.cloud.discoveryengine.v1beta.SearchRequest.ParamsEntry\022c\n" + + "\006params\030\013 \003" + + "(\0132>.google.cloud.discoveryengine.v1beta.SearchRequest.ParamsEntry\022c\n" + "\024query_expansion_spec\030\r" - + " \001(\0132E.google.cloud" - + ".discoveryengine.v1beta.SearchRequest.QueryExpansionSpec\022e\n" - + "\025spell_correction_spec\030\016 \001(\0132F.google.cloud.discoveryengine.v" - + "1beta.SearchRequest.SpellCorrectionSpec\022\026\n" - + "\016user_pseudo_id\030\017 \001(\t\022a\n" - + "\023content_search_spec\030\030 \001(\0132D.google.cloud.discoveryeng" - + "ine.v1beta.SearchRequest.ContentSearchSpec\022X\n" - + "\016embedding_spec\030\027 \001(\0132@.google.clou" - + "d.discoveryengine.v1beta.SearchRequest.EmbeddingSpec\022\032\n" - + "\022ranking_expression\030\032 \001(\t\022t\n" - + "\032ranking_expression_backend\0305 \001(\0162K.g" - + "oogle.cloud.discoveryengine.v1beta.Searc" - + "hRequest.RankingExpressionBackendB\003\340A\001\022\023\n" + + " \001(\0132E.google.cloud.discover" + + "yengine.v1beta.SearchRequest.QueryExpansionSpec\022e\n" + + "\025spell_correction_spec\030\016 \001(\0132F" + + ".google.cloud.discoveryengine.v1beta.SearchRequest.SpellCorrectionSpec\022\033\n" + + "\016user_pseudo_id\030\017 \001(\tB\003\340A\001\022a\n" + + "\023content_search_spec\030\030 \001(\0132D.google.cloud.discoveryengine." + + "v1beta.SearchRequest.ContentSearchSpec\022X\n" + + "\016embedding_spec\030\027 \001(\0132@.google.cloud.di" + + "scoveryengine.v1beta.SearchRequest.EmbeddingSpec\022\037\n" + + "\022ranking_expression\030\032 \001(\tB\003\340A\001\022t\n" + + "\032ranking_expression_backend\0305 \001(\0162K." + + "google.cloud.discoveryengine.v1beta.Sear" + + "chRequest.RankingExpressionBackendB\003\340A\001\022\023\n" + "\013safe_search\030\024 \001(\010\022W\n" - + "\013user_labels\030\026 \003(\013" - + "2B.google.cloud.discoveryengine.v1beta.SearchRequest.UserLabelsEntry\022\213\001\n" - + ")natural_language_query_understanding_spec\030\034 \001(\013" - + "2X.google.cloud.discoveryengine.v1beta.S" - + "earchRequest.NaturalLanguageQueryUnderstandingSpec\022g\n" - + "\027search_as_you_type_spec\030\037 " - + "\001(\0132F.google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec\022<\n" + + "\013user_labels\030\026 \003(" + + "\0132B.google.cloud.discoveryengine.v1beta.SearchRequest.UserLabelsEntry\022\220\001\n" + + ")natural_language_query_understanding_spec\030\034 \001(" + + "\0132X.google.cloud.discoveryengine.v1beta." + + "SearchRequest.NaturalLanguageQueryUnderstandingSpecB\003\340A\001\022g\n" + + "\027search_as_you_type_spec\030\037 \001(\0132F.google.cloud.discoveryengine" + + ".v1beta.SearchRequest.SearchAsYouTypeSpec\022Y\n" + + "\014display_spec\030& \001(\0132>.google.cloud.d" + + "iscoveryengine.v1beta.SearchRequest.DisplaySpecB\003\340A\001\022\\\n" + + "\016crowding_specs\030( \003(\0132?.g" + + "oogle.cloud.discoveryengine.v1beta.SearchRequest.CrowdingSpecB\003\340A\001\022<\n" + "\007session\030) \001(\tB+\372A(\n" + "&discoveryengine.googleapis.com/Session\022T\n" - + "\014session_spec\030* \001(\0132" - + ">.google.cloud.discoveryengine.v1beta.SearchRequest.SessionSpec\022b\n" - + "\023relevance_threshold\030, \001(\0162E.google.cloud.discoveryeng" - + "ine.v1beta.SearchRequest.RelevanceThreshold\022d\n" - + "\024personalization_spec\030. \001(\0132F.goog" - + "le.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec\032,\n\n" + + "\014session_spec\030* \001(\0132>.google." + + "cloud.discoveryengine.v1beta.SearchRequest.SessionSpec\022b\n" + + "\023relevance_threshold\030, " + + "\001(\0162E.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceThreshold\022j\n" + + "\025relevance_filter_spec\030V \001(\0132F.google.cloud" + + ".discoveryengine.v1beta.SearchRequest.RelevanceFilterSpecB\003\340A\001\022d\n" + + "\024personalization_spec\030. \001(\0132F.google.cloud.discoveryeng" + + "ine.v1beta.SearchRequest.PersonalizationSpec\022h\n" + + "\024relevance_score_spec\0304 \001(\0132E.goo" + + "gle.cloud.discoveryengine.v1beta.SearchRequest.RelevanceScoreSpecB\003\340A\001\022b\n" + + "\021search_addon_spec\030> \001(\0132B.google.cloud.discove" + + "ryengine.v1beta.SearchRequest.SearchAddonSpecB\003\340A\001\022j\n" + + "\025custom_ranking_params\030@ \001(\0132F.google.cloud.discoveryengine.v1beta." + + "SearchRequest.CustomRankingParamsB\003\340A\001\022\023\n" + + "\006entity\030B \001(\tB\003\340A\001\032,\n\n" + "ImageQuery\022\025\n" + "\013image_bytes\030\001 \001(\tH\000B\007\n" - + "\005image\032\301\001\n\r" + + "\005image\032\201\002\n\r" + "DataStoreSpec\022D\n\n" + "data_store\030\001 \001(\tB0\340A\002\372A*\n" + "(discoveryengine.googleapis.com/DataStore\022\023\n" + "\006filter\030\005 \001(\tB\003\340A\001\022U\n\n" - + "boost_spec\030\006 \001(\013" - + "2<.google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpecB\003\340A\001\032\204\003\n" + + "boost_spec\030\006 \001(\0132<.goo" + + "gle.cloud.discoveryengine.v1beta.SearchRequest.BoostSpecB\003\340A\001\022$\n" + + "\027custom_search_operators\030\007 \001(\tB\003\340A\001\022\030\n" + + "\013num_results\030\t \001(\005B\003\340A\001\032\204\003\n" + "\tFacetSpec\022]\n" - + "\tfacet_key\030\001 \001(\0132E.google.cloud.disc" - + "overyengine.v1beta.SearchRequest.FacetSpec.FacetKeyB\003\340A\002\022\r\n" + + "\tfacet_key\030\001 \001(\0132E" + + ".google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec.FacetKeyB\003\340A\002\022\r\n" + "\005limit\030\002 \001(\005\022\034\n" + "\024excluded_filter_keys\030\003 \003(\t\022\037\n" + "\027enable_dynamic_position\030\004 \001(\010\032\311\001\n" @@ -358,23 +415,24 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\020case_insensitive\030\006 \001(\010\022\020\n" + "\010order_by\030\007 \001(\t\032\320\007\n" + "\tBoostSpec\022n\n" - + "\025condition_boost_specs\030\001 \003(\0132O.google.cloud.d" - + "iscoveryengine.v1beta.SearchRequest.BoostSpec.ConditionBoostSpec\032\322\006\n" + + "\025condition_boost_specs\030\001 \003(\0132O.google.cloud.discoveryengine.v1beta." + + "SearchRequest.BoostSpec.ConditionBoostSpec\032\322\006\n" + "\022ConditionBoostSpec\022\021\n" + "\tcondition\030\001 \001(\t\022\r\n" + "\005boost\030\002 \001(\002\022|\n" - + "\022boost_control_spec\030\003 \001(\0132`.google.c" - + "loud.discoveryengine.v1beta.SearchReques" - + "t.BoostSpec.ConditionBoostSpec.BoostControlSpec\032\233\005\n" + + "\022boost_control_spec\030\003 \001(\0132`.google.cloud.discoveryengine.v" + + "1beta.SearchRequest.BoostSpec.ConditionBoostSpec.BoostControlSpec\032\233\005\n" + "\020BoostControlSpec\022\022\n\n" + "field_name\030\001 \001(\t\022\206\001\n" - + "\016attribute_type\030\002 \001(\0162n.google.cloud.discoveryengine.v1beta.SearchRe" - + "quest.BoostSpec.ConditionBoostSpec.BoostControlSpec.AttributeType\022\216\001\n" - + "\022interpolation_type\030\003 \001(\0162r.google.cloud.discoverye" - + "ngine.v1beta.SearchRequest.BoostSpec.Con" - + "ditionBoostSpec.BoostControlSpec.InterpolationType\022\205\001\n" - + "\016control_points\030\004 \003(\0132m.google.cloud.discoveryengine.v1beta.Search" - + "Request.BoostSpec.ConditionBoostSpec.BoostControlSpec.ControlPoint\032=\n" + + "\016attribute_type\030\002 \001(\0162n.google.cloud.discoveryengi" + + "ne.v1beta.SearchRequest.BoostSpec.Condit" + + "ionBoostSpec.BoostControlSpec.AttributeType\022\216\001\n" + + "\022interpolation_type\030\003 \001(\0162r.googl" + + "e.cloud.discoveryengine.v1beta.SearchReq" + + "uest.BoostSpec.ConditionBoostSpec.BoostControlSpec.InterpolationType\022\205\001\n" + + "\016control_points\030\004 \003(\0132m.google.cloud.discoveryen" + + "gine.v1beta.SearchRequest.BoostSpec.Cond" + + "itionBoostSpec.BoostControlSpec.ControlPoint\032=\n" + "\014ControlPoint\022\027\n" + "\017attribute_value\030\001 \001(\t\022\024\n" + "\014boost_amount\030\002 \001(\002\"M\n\r" @@ -386,35 +444,37 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\036INTERPOLATION_TYPE_UNSPECIFIED\020\000\022\n\n" + "\006LINEAR\020\001\032\330\001\n" + "\022QueryExpansionSpec\022b\n" - + "\tcondition\030\001 \001(\0162O.google.cloud.discoveryengine.v1beta.Se" - + "archRequest.QueryExpansionSpec.Condition\022\036\n" + + "\tcondition\030\001 \001(\0162O.google.cloud.discove" + + "ryengine.v1beta.SearchRequest.QueryExpansionSpec.Condition\022\036\n" + "\026pin_unexpanded_results\030\002 \001(\010\">\n" + "\tCondition\022\031\n" + "\025CONDITION_UNSPECIFIED\020\000\022\014\n" + "\010DISABLED\020\001\022\010\n" + "\004AUTO\020\002\032\255\001\n" + "\023SpellCorrectionSpec\022Y\n" - + "\004mode\030\001 \001(\0162K.google.cloud.discoverye" - + "ngine.v1beta.SearchRequest.SpellCorrectionSpec.Mode\";\n" + + "\004mode\030\001 \001(\0162K.googl" + + "e.cloud.discoveryengine.v1beta.SearchRequest.SpellCorrectionSpec.Mode\";\n" + "\004Mode\022\024\n" + "\020MODE_UNSPECIFIED\020\000\022\023\n" + "\017SUGGESTION_ONLY\020\001\022\010\n" - + "\004AUTO\020\002\032\276\014\n" + + "\004AUTO\020\002\032\324\017\n" + "\021ContentSearchSpec\022f\n" - + "\014snippet_spec\030\001 \001(\0132P.google.cloud.discoveryengine.v1beta.Searc" - + "hRequest.ContentSearchSpec.SnippetSpec\022f\n" - + "\014summary_spec\030\002 \001(\0132P.google.cloud.disc" - + "overyengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec\022{\n" - + "\027extractive_content_spec\030\003 \001(\0132Z.google.cloud.discovery" - + "engine.v1beta.SearchRequest.ContentSearchSpec.ExtractiveContentSpec\022q\n" - + "\022search_result_mode\030\004 \001(\0162U.google.cloud.discovery" - + "engine.v1beta.SearchRequest.ContentSearchSpec.SearchResultMode\022b\n\n" - + "chunk_spec\030\005 \001(\0132N.google.cloud.discoveryengine.v1beta" - + ".SearchRequest.ContentSearchSpec.ChunkSpec\032`\n" + + "\014snippet_spec\030\001 \001(\0132P.google.cloud.discoverye" + + "ngine.v1beta.SearchRequest.ContentSearchSpec.SnippetSpec\022f\n" + + "\014summary_spec\030\002 \001(\0132P.google.cloud.discoveryengine.v1beta.Sea" + + "rchRequest.ContentSearchSpec.SummarySpec\022{\n" + + "\027extractive_content_spec\030\003 \001(\0132Z.goog" + + "le.cloud.discoveryengine.v1beta.SearchRe" + + "quest.ContentSearchSpec.ExtractiveContentSpec\022q\n" + + "\022search_result_mode\030\004 \001(\0162U.goog" + + "le.cloud.discoveryengine.v1beta.SearchRe" + + "quest.ContentSearchSpec.SearchResultMode\022b\n\n" + + "chunk_spec\030\005 \001(\0132N.google.cloud.disc" + + "overyengine.v1beta.SearchRequest.ContentSearchSpec.ChunkSpec\032`\n" + "\013SnippetSpec\022\035\n" + "\021max_snippet_count\030\001 \001(\005B\002\030\001\022\032\n" + "\016reference_only\030\002 \001(\010B\002\030\001\022\026\n" - + "\016return_snippet\030\003 \001(\010\032\304\004\n" + + "\016return_snippet\030\003 \001(\010\032\332\007\n" + "\013SummarySpec\022\034\n" + "\024summary_result_count\030\001 \001(\005\022\031\n" + "\021include_citations\030\002 \001(\010\022 \n" @@ -422,13 +482,24 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + " ignore_non_summary_seeking_query\030\004 \001(\010\022#\n" + "\033ignore_low_relevant_content\030\t \001(\010\022\'\n" + "\032ignore_jail_breaking_query\030\n" - + " \001(\010B\003\340A\001\022{\n" - + "\021model_prompt_spec\030\005 \001(\0132`.google.cloud.discoveryengine.v1beta.SearchR" - + "equest.ContentSearchSpec.SummarySpec.ModelPromptSpec\022\025\n\r" + + " \001(\010B\003\340A\001\022}\n" + + "\017multimodal_spec\030\013 \001(\0132_.google.cloud.discoveryengin" + + "e.v1beta.SearchRequest.ContentSearchSpec.SummarySpec.MultiModalSpecB\003\340A\001\022{\n" + + "\021model_prompt_spec\030\005 \001(\0132`.google.cloud.disco" + + "veryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec.ModelPromptSpec\022\025\n" + + "\r" + "language_code\030\006 \001(\t\022n\n\n" - + "model_spec\030\007 \001(\0132Z.google.cloud.discovery" - + "engine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec.ModelSpec\022\033\n" - + "\023use_semantic_chunks\030\010 \001(\010\032#\n" + + "model_spec\030\007 \001(\0132Z.google.cloud.discoveryengine.v1beta.S" + + "earchRequest.ContentSearchSpec.SummarySpec.ModelSpec\022\033\n" + + "\023use_semantic_chunks\030\010 \001(\010\032\224\002\n" + + "\016MultiModalSpec\022\206\001\n" + + "\014image_source\030\003 \001(\0162k.google.cloud.discoveryengine.v1bet" + + "a.SearchRequest.ContentSearchSpec.SummarySpec.MultiModalSpec.ImageSourceB\003\340A\001\"y\n" + + "\013ImageSource\022\034\n" + + "\030IMAGE_SOURCE_UNSPECIFIED\020\000\022\031\n" + + "\025ALL_AVAILABLE_SOURCES\020\001\022\025\n" + + "\021CORPUS_IMAGE_ONLY\020\002\022\032\n" + + "\026FIGURE_GENERATION_ONLY\020\003\032#\n" + "\017ModelPromptSpec\022\020\n" + "\010preamble\030\001 \001(\t\032\034\n" + "\tModelSpec\022\017\n" @@ -447,93 +518,143 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\tDOCUMENTS\020\001\022\n\n" + "\006CHUNKS\020\002\032\263\001\n\r" + "EmbeddingSpec\022k\n" - + "\021embedding_vectors\030\001 \003(\0132P.google.cloud.discoveryengine.v1beta.Sea" - + "rchRequest.EmbeddingSpec.EmbeddingVector\0325\n" + + "\021embedding_vectors\030\001 \003(\0132P.google.cloud.di" + + "scoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector\0325\n" + "\017EmbeddingVector\022\022\n\n" + "field_path\030\001 \001(\t\022\016\n" - + "\006vector\030\002 \003(\002\032\304\002\n" + + "\006vector\030\002 \003(\002\032\350\004\n" + "%NaturalLanguageQueryUnderstandingSpec\022\227\001\n" - + "\033filter_extraction_condition\030\001 \001(\0162r.google.cloud.discovery" - + "engine.v1beta.SearchRequest.NaturalLangu" - + "ageQueryUnderstandingSpec.FilterExtractionCondition\022.\n" - + "&geo_search_query_detection_field_names\030\002 \003(\t\"Q\n" + + "\033filter_extraction_condition\030\001 \001(\0162" + + "r.google.cloud.discoveryengine.v1beta.Se" + + "archRequest.NaturalLanguageQueryUnderstandingSpec.FilterExtractionCondition\022.\n" + + "&geo_search_query_detection_field_names\030\002 \003(\t\022\230\001\n" + + "\031extracted_filter_behavior\030\003 \001(\0162" + + "p.google.cloud.discoveryengine.v1beta.Se" + + "archRequest.NaturalLanguageQueryUnderstandingSpec.ExtractedFilterBehaviorB\003\340A\001\022" + + " \n" + + "\023allowed_field_names\030\004 \003(\tB\003\340A\001\"Q\n" + "\031FilterExtractionCondition\022\031\n" + "\025CONDITION_UNSPECIFIED\020\000\022\014\n" + "\010DISABLED\020\001\022\013\n" - + "\007ENABLED\020\002\032\307\001\n" + + "\007ENABLED\020\002\"e\n" + + "\027ExtractedFilterBehavior\022)\n" + + "%EXTRACTED_FILTER_BEHAVIOR_UNSPECIFIED\020\000\022\017\n" + + "\013HARD_FILTER\020\001\022\016\n\n" + + "SOFT_BOOST\020\002\032\307\001\n" + "\023SearchAsYouTypeSpec\022c\n" - + "\tcondition\030\001 \001(\0162P.google.cloud" - + ".discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec.Condition\"K\n" + + "\tcondition\030\001 \001(\0162P.google.cloud.dis" + + "coveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec.Condition\"K\n" + "\tCondition\022\031\n" + "\025CONDITION_UNSPECIFIED\020\000\022\014\n" + "\010DISABLED\020\001\022\013\n" + "\007ENABLED\020\002\022\010\n" - + "\004AUTO\020\003\032q\n" + + "\004AUTO\020\003\032\234\002\n" + + "\013DisplaySpec\022\177\n" + + "\034match_highlighting_condition\030\001 \001(\0162Y.goo" + + "gle.cloud.discoveryengine.v1beta.SearchR" + + "equest.DisplaySpec.MatchHighlightingCondition\"\213\001\n" + + "\032MatchHighlightingCondition\022,\n" + + "(MATCH_HIGHLIGHTING_CONDITION_UNSPECIFIED\020\000\022\037\n" + + "\033MATCH_HIGHLIGHTING_DISABLED\020\001\022\036\n" + + "\032MATCH_HIGHLIGHTING_ENABLED\020\002\032\337\001\n" + + "\014CrowdingSpec\022\r\n" + + "\005field\030\001 \001(\t\022\021\n" + + "\tmax_count\030\002 \001(\005\022R\n" + + "\004mode\030\003 \001(\0162D.google.cloud.discoveryeng" + + "ine.v1beta.SearchRequest.CrowdingSpec.Mode\"Y\n" + + "\004Mode\022\024\n" + + "\020MODE_UNSPECIFIED\020\000\022\030\n" + + "\024DROP_CROWDED_RESULTS\020\001\022!\n" + + "\035DEMOTE_CROWDED_RESULTS_TO_END\020\002\032q\n" + "\013SessionSpec\022\020\n" + "\010query_id\030\001 \001(\t\022,\n" + "\037search_result_persistence_count\030\002 \001(\005H\000\210\001\001B\"\n" - + " _search_result_persistence_count\032\246\001\n" + + " _search_result_persistence_count\032\351\003\n" + + "\023RelevanceFilterSpec\022\204\001\n" + + "\030keyword_search_threshold\030\001 \001(\0132].google.clo" + + "ud.discoveryengine.v1beta.SearchRequest." + + "RelevanceFilterSpec.RelevanceThresholdSpecB\003\340A\001\022\205\001\n" + + "\031semantic_search_threshold\030\002 \001(\0132].google.cloud.discoveryengine.v1bet" + + "a.SearchRequest.RelevanceFilterSpec.RelevanceThresholdSpecB\003\340A\001\032\302\001\n" + + "\026RelevanceThresholdSpec\022d\n" + + "\023relevance_threshold\030\001 \001(\0162" + + "E.google.cloud.discoveryengine.v1beta.SearchRequest.RelevanceThresholdH\000\022&\n" + + "\034semantic_relevance_threshold\030\002 \001(\002H\000B\032\n" + + "\030relevance_threshold_spec\032\246\001\n" + "\023PersonalizationSpec\022Y\n" - + "\004mode\030\001 \001(\0162K.google.cloud.discove" - + "ryengine.v1beta.SearchRequest.PersonalizationSpec.Mode\"4\n" + + "\004mode\030\001 \001(\0162K.google.cloud.discov" + + "eryengine.v1beta.SearchRequest.PersonalizationSpec.Mode\"4\n" + "\004Mode\022\024\n" + "\020MODE_UNSPECIFIED\020\000\022\010\n" + "\004AUTO\020\001\022\014\n" - + "\010DISABLED\020\002\032E\n" + + "\010DISABLED\020\002\0329\n" + + "\022RelevanceScoreSpec\022#\n" + + "\026return_relevance_score\030\001 \001(\010B\003\340A\001\032\227\001\n" + + "\017SearchAddonSpec\022$\n" + + "\027disable_semantic_add_on\030\001 \001(\010B\003\340A\001\022/\n" + + "\"disable_kpi_personalization_add_on\030\002 \001(\010B\003\340A\001\022-\n" + + " disable_generative_answer_add_on\030\003 \001(\010B\003\340A\001\032=\n" + + "\023CustomRankingParams\022&\n" + + "\031expressions_to_precompute\030\001 \003(\tB\003\340A\001\032E\n" + "\013ParamsEntry\022\013\n" + "\003key\030\001 \001(\t\022%\n" + "\005value\030\002 \001(\0132\026.google.protobuf.Value:\0028\001\0321\n" + "\017UserLabelsEntry\022\013\n" + "\003key\030\001 \001(\t\022\r\n" - + "\005value\030\002 \001(\t:\0028\001\"d\n" + + "\005value\030\002 \001(\t:\0028\001\"\222\001\n" + + "\030RankingExpressionBackend\022*\n" + + "&RANKING_EXPRESSION_BACKEND_UNSPECIFIED\020\000\022\014\n" + + "\004BYOE\020\001\032\002\010\001\022\020\n" + + "\010CLEARBOX\020\002\032\002\010\001\022\025\n" + + "\021RANK_BY_EMBEDDING\020\003\022\023\n" + + "\017RANK_BY_FORMULA\020\004\"d\n" + "\022RelevanceThreshold\022#\n" + "\037RELEVANCE_THRESHOLD_UNSPECIFIED\020\000\022\n\n" + "\006LOWEST\020\001\022\007\n" + "\003LOW\020\002\022\n\n" + "\006MEDIUM\020\003\022\010\n" - + "\004HIGH\020\004\"~\n" - + "\030RankingExpressionBackend\022*\n" - + "&RANKING_EXPRESSION_BACKEND_UNSPECIFIED\020\000\022\025\n" - + "\021RANK_BY_EMBEDDING\020\003\022\023\n" - + "\017RANK_BY_FORMULA\020\004\"\004\010\001\020\001\"\004\010\002\020\002\"\3715\n" + + "\004HIGH\020\004\"\370<\n" + "\016SearchResponse\022Q\n" - + "\007results\030\001 \003(\0132@.google.cloud.discover" - + "yengine.v1beta.SearchResponse.SearchResult\022I\n" - + "\006facets\030\002" - + " \003(\01329.google.cloud.discoveryengine.v1beta.SearchResponse.Facet\022d\n" - + "\024guided_search_result\030\010 \001(\0132F.google.clo" - + "ud.discoveryengine.v1beta.SearchResponse.GuidedSearchResult\022\022\n\n" + + "\007results\030\001 \003(\0132@.goo" + + "gle.cloud.discoveryengine.v1beta.SearchResponse.SearchResult\022I\n" + + "\006facets\030\002 \003(\01329.g" + + "oogle.cloud.discoveryengine.v1beta.SearchResponse.Facet\022d\n" + + "\024guided_search_result\030\010" + + " \001(\0132F.google.cloud.discoveryengine.v1beta.SearchResponse.GuidedSearchResult\022\022\n" + + "\n" + "total_size\030\003 \001(\005\022\031\n" + "\021attribution_token\030\004 \001(\t\022\024\n" + "\014redirect_uri\030\014 \001(\t\022\027\n" + "\017next_page_token\030\005 \001(\t\022\027\n" - + "\017corrected_query\030\007 \001(\t\022L\n" - + "\007summary\030\t \001(\0132;.go" - + "ogle.cloud.discoveryengine.v1beta.SearchResponse.Summary\022\030\n" + + "\017corrected_query\030\007 \001(\t\022\027\n" + + "\017suggested_query\030\030 \001(\t\022L\n" + + "\007summary\030\t \001(\0132;" + + ".google.cloud.discoveryengine.v1beta.SearchResponse.Summary\022\030\n" + "\020applied_controls\030\n" + " \003(\t\022e\n" - + "\025geo_search_debug_info\030\020 \003(\0132F.goog" - + "le.cloud.discoveryengine.v1beta.SearchResponse.GeoSearchDebugInfo\022d\n" - + "\024query_expansion_info\030\016 \001(\0132F.google.cloud.discovery" - + "engine.v1beta.SearchResponse.QueryExpansionInfo\022\214\001\n" - + ")natural_language_query_understanding_info\030\017 \001(\0132Y.google.cloud.disco" - + "veryengine.v1beta.SearchResponse.NaturalLanguageQueryUnderstandingInfo\022U\n" - + "\014session_info\030\023" - + " \001(\0132?.google.cloud.discoveryengine.v1beta.SearchResponse.SessionInfo\022Y\n" - + "\017one_box_results\030\024 \003(\0132@.google.cloud.di" - + "scoveryengine.v1beta.SearchResponse.OneBoxResult\032\302\010\n" + + "\025geo_search_debug_info\030\020 \003(\0132F.g" + + "oogle.cloud.discoveryengine.v1beta.SearchResponse.GeoSearchDebugInfo\022d\n" + + "\024query_expansion_info\030\016 \001(\0132F.google.cloud.discov" + + "eryengine.v1beta.SearchResponse.QueryExpansionInfo\022\221\001\n" + + ")natural_language_query_understanding_info\030\017 \001(\0132Y.google.cloud.di" + + "scoveryengine.v1beta.SearchResponse.Natu" + + "ralLanguageQueryUnderstandingInfoB\003\340A\003\022U\n" + + "\014session_info\030\023 \001(\0132?.google.cloud.disc" + + "overyengine.v1beta.SearchResponse.SessionInfo\022Y\n" + + "\017one_box_results\030\024 \003(\0132@.google." + + "cloud.discoveryengine.v1beta.SearchResponse.OneBoxResult\022X\n" + + "\026search_link_promotions\030\027" + + " \003(\01328.google.cloud.discoveryengine.v1beta.SearchLinkPromotion\022^\n" + + "\016semantic_state\030$ \001(\0162A.google.cloud.discoveryengin" + + "e.v1beta.SearchResponse.SemanticStateB\003\340A\003\032\355\010\n" + "\014SearchResult\022\n\n" + "\002id\030\001 \001(\t\022?\n" + "\010document\030\002 \001(\0132-.google.cloud.discoveryengine.v1beta.Document\0229\n" - + "\005chunk\030\022 \001(\0132*.google.cloud.discoveryengine.v1beta.Chunk\022g\n" - + "\014model_scores\030\004 \003(\0132Q.google.cloud.d" - + "iscoveryengine.v1beta.SearchResponse.SearchResult.ModelScoresEntry\022g\n" - + "\014rank_signals\030\007 \001(\0132L.google.cloud.discoveryengine." - + "v1beta.SearchResponse.SearchResult.RankSignalsB\003\340A\001\032c\n" - + "\020ModelScoresEntry\022\013\n" - + "\003key\030\001 \001(\t\022>\n" - + "\005value\030\002" - + " \001(\0132/.google.cloud.discoveryengine.v1beta.DoubleList:\0028\001\032\362\004\n" + + "\005chunk\030\022 \001(\0132*.google.cloud.discoveryengine.v1beta.Chunk\022l\n" + + "\014model_scores\030\004 \003(\0132Q.google.cloud.discove" + + "ryengine.v1beta.SearchResponse.SearchResult.ModelScoresEntryB\003\340A\003\022g\n" + + "\014rank_signals\030\007 \001(\0132L.google.cloud.discoveryengine.v" + + "1beta.SearchResponse.SearchResult.RankSignalsB\003\340A\001\032\230\005\n" + "\013RankSignals\022*\n" + "\030keyword_similarity_score\030\001 \001(\002B\003\340A\001H\000\210\001\001\022!\n" + "\017relevance_score\030\002 \001(\002B\003\340A\001H\001\210\001\001\022+\n" @@ -544,8 +665,9 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\014document_age\030\007 \001(\002B\003\340A\001H\005\210\001\001\022!\n" + "\017boosting_factor\030\010 \001(\002B\003\340A\001H\006\210\001\001\022\031\n" + "\014default_rank\030 \001(\002B\003\340A\001\022v\n" - + "\016custom_signals\030! \003(\0132Y.google.cloud.discoveryengine.v1beta.SearchR" - + "esponse.SearchResult.RankSignals.CustomSignalB\003\340A\001\0325\n" + + "\016custom_signals\030! \003(\0132Y.google.cloud.discoveryeng" + + "ine.v1beta.SearchResponse.SearchResult.RankSignals.CustomSignalB\003\340A\001\022*\n" + + "\035precomputed_expression_values\030\" \003(\002B\003\340A\001\0325\n" + "\014CustomSignal\022\021\n" + "\004name\030\001 \001(\tB\003\340A\001\022\022\n" + "\005value\030\002 \001(\002B\003\340A\001B\033\n" @@ -555,62 +677,82 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "_pctr_rankB\022\n" + "\020_topicality_rankB\017\n\r" + "_document_ageB\022\n" - + "\020_boosting_factorJ\004\010\005\020\006\032\201\002\n" + + "\020_boosting_factor\032c\n" + + "\020ModelScoresEntry\022\013\n" + + "\003key\030\001 \001(\t\022>\n" + + "\005value\030\002" + + " \001(\0132/.google.cloud.discoveryengine.v1beta.DoubleList:\0028\001\032\201\002\n" + "\005Facet\022\013\n" + "\003key\030\001 \001(\t\022T\n" - + "\006values\030\002 \003(\0132D.google.cloud.disc" - + "overyengine.v1beta.SearchResponse.Facet.FacetValue\022\025\n\r" + + "\006values\030\002 \003(\0132D.google.cloud.discove" + + "ryengine.v1beta.SearchResponse.Facet.FacetValue\022\025\n\r" + "dynamic_facet\030\003 \001(\010\032~\n\n" + "FacetValue\022\017\n" + "\005value\030\001 \001(\tH\000\022A\n" - + "\010interval\030\002 \001" - + "(\0132-.google.cloud.discoveryengine.v1beta.IntervalH\000\022\r\n" + + "\010interval\030\002 \001(\0132" + + "-.google.cloud.discoveryengine.v1beta.IntervalH\000\022\r\n" + "\005count\030\003 \001(\003B\r\n" + "\013facet_value\032\363\001\n" + "\022GuidedSearchResult\022y\n" - + "\025refinement_attributes\030\001 \003(\0132Z.google.cloud.discovery" - + "engine.v1beta.SearchResponse.GuidedSearchResult.RefinementAttribute\022\033\n" + + "\025refinement_attributes\030\001 \003(\0132Z.google.cloud.discoveryeng" + + "ine.v1beta.SearchResponse.GuidedSearchResult.RefinementAttribute\022\033\n" + "\023follow_up_questions\030\002 \003(\t\032E\n" + "\023RefinementAttribute\022\025\n\r" + "attribute_key\030\001 \001(\t\022\027\n" - + "\017attribute_value\030\002 \001(\t\032\263\014\n" + + "\017attribute_value\030\002 \001(\t\032\307\020\n" + "\007Summary\022\024\n" + "\014summary_text\030\001 \001(\t\022q\n" - + "\027summary_skipped_reasons\030\002 \003(\0162P.goo" - + "gle.cloud.discoveryengine.v1beta.SearchResponse.Summary.SummarySkippedReason\022g\n" - + "\021safety_attributes\030\003 \001(\0132L.google.cloud.d" - + "iscoveryengine.v1beta.SearchResponse.Summary.SafetyAttributes\022n\n" - + "\025summary_with_metadata\030\004 \001(\0132O.google.cloud.discoveryeng" - + "ine.v1beta.SearchResponse.Summary.SummaryWithMetadata\0326\n" + + "\027summary_skipped_reasons\030\002 \003(\0162P.google" + + ".cloud.discoveryengine.v1beta.SearchResponse.Summary.SummarySkippedReason\022g\n" + + "\021safety_attributes\030\003 \001(\0132L.google.cloud.disc" + + "overyengine.v1beta.SearchResponse.Summary.SafetyAttributes\022n\n" + + "\025summary_with_metadata\030\004 \001(\0132O.google.cloud.discoveryengine" + + ".v1beta.SearchResponse.Summary.SummaryWithMetadata\0326\n" + "\020SafetyAttributes\022\022\n\n" + "categories\030\001 \003(\t\022\016\n" + "\006scores\030\002 \003(\002\032k\n" + "\020CitationMetadata\022W\n" - + "\tcitations\030\001 \003(\0132D.google.cl" - + "oud.discoveryengine.v1beta.SearchResponse.Summary.Citation\032\217\001\n" + + "\tcitations\030\001 \003(\0132D.google.cloud" + + ".discoveryengine.v1beta.SearchResponse.Summary.Citation\032\217\001\n" + "\010Citation\022\023\n" + "\013start_index\030\001 \001(\003\022\021\n" + "\tend_index\030\002 \001(\003\022[\n" - + "\007sources\030\003 \003(\0132J.google.cloud.discoveryengine." - + "v1beta.SearchResponse.Summary.CitationSource\032)\n" + + "\007sources\030\003 \003(\0132J.google.cloud.discoveryengine.v1b" + + "eta.SearchResponse.Summary.CitationSource\032)\n" + "\016CitationSource\022\027\n" - + "\017reference_index\030\004 \001(\003\032\220\002\n" + + "\017reference_index\030\004 \001(\003\032\266\002\n" + "\tReference\022\r\n" + "\005title\030\001 \001(\t\022A\n" + "\010document\030\002 \001(\tB/\340A\002\372A)\n" + "\'discoveryengine.googleapis.com/Document\022\013\n" + "\003uri\030\003 \001(\t\022j\n" - + "\016chunk_contents\030\004 \003(\0132R.google.cloud.disc" - + "overyengine.v1beta.SearchResponse.Summary.Reference.ChunkContent\0328\n" + + "\016chunk_contents\030\004 \003(\0132R.google.cloud.discove" + + "ryengine.v1beta.SearchResponse.Summary.Reference.ChunkContent\032^\n" + "\014ChunkContent\022\017\n" + "\007content\030\001 \001(\t\022\027\n" - + "\017page_identifier\030\002 \001(\t\032\352\001\n" + + "\017page_identifier\030\002 \001(\t\022$\n" + + "\027blob_attachment_indexes\030\004 \003(\003B\003\340A\003\032\362\002\n" + + "\016BlobAttachment\022b\n" + + "\004data\030\001 \001(\0132O.google." + + "cloud.discoveryengine.v1beta.SearchResponse.Summary.BlobAttachment.BlobB\003\340A\003\022y\n" + + "\020attribution_type\030\002 \001(\0162Z.google.cloud.di" + + "scoveryengine.v1beta.SearchResponse.Summ" + + "ary.BlobAttachment.AttributionTypeB\003\340A\003\0321\n" + + "\004Blob\022\026\n" + + "\tmime_type\030\001 \001(\tB\003\340A\003\022\021\n" + + "\004data\030\002 \001(\014B\003\340A\003\"N\n" + + "\017AttributionType\022 \n" + + "\034ATTRIBUTION_TYPE_UNSPECIFIED\020\000\022\n\n" + + "\006CORPUS\020\001\022\r\n" + + "\tGENERATED\020\002\032\325\002\n" + "\023SummaryWithMetadata\022\017\n" + "\007summary\030\001 \001(\t\022g\n" - + "\021citation_metadata\030\002 \001(\0132L.google." - + "cloud.discoveryengine.v1beta.SearchResponse.Summary.CitationMetadata\022Y\n\n" - + "references\030\003 \003(\0132E.google.cloud.discoveryengine." - + "v1beta.SearchResponse.Summary.Reference\"\343\002\n" + + "\021citation_metadata\030\002 \001(\0132L" + + ".google.cloud.discoveryengine.v1beta.SearchResponse.Summary.CitationMetadata\022Y\n\n" + + "references\030\003 \003(\0132E.google.cloud.discover" + + "yengine.v1beta.SearchResponse.Summary.Reference\022i\n" + + "\020blob_attachments\030\004 \003(\0132J.goog" + + "le.cloud.discoveryengine.v1beta.SearchResponse.Summary.BlobAttachmentB\003\340A\003\"\361\002\n" + "\024SummarySkippedReason\022&\n" + "\"SUMMARY_SKIPPED_REASON_UNSPECIFIED\020\000\022\035\n" + "\031ADVERSARIAL_QUERY_IGNORED\020\001\022%\n" @@ -621,34 +763,35 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\023NO_RELEVANT_CONTENT\020\006\022\037\n" + "\033JAIL_BREAKING_QUERY_IGNORED\020\007\022\035\n" + "\031CUSTOMER_POLICY_VIOLATION\020\010\022(\n" - + "$NON_SUMMARY_SEEKING_QUERY_IGNORED_V2\020\t\032K\n" + + "$NON_SUMMARY_SEEKING_QUERY_IGNORED_V2\020\t\022\014\n" + + "\010TIME_OUT\020\n" + + "\032K\n" + "\022GeoSearchDebugInfo\022\036\n" + "\026original_address_query\030\001 \001(\t\022\025\n\r" + "error_message\030\002 \001(\t\032I\n" + "\022QueryExpansionInfo\022\026\n" + "\016expanded_query\030\001 \001(\010\022\033\n" - + "\023pinned_result_count\030\002 \001(\003\032\201\021\n" + + "\023pinned_result_count\030\002 \001(\003\032\235\021\n" + "%NaturalLanguageQueryUnderstandingInfo\022\031\n" + "\021extracted_filters\030\001 \001(\t\022\027\n" - + "\017rewritten_query\030\002 \001(\t\022\230\001\n" - + "\033structured_extracted_filter\030\003 \001(" - + "\0132s.google.cloud.discoveryengine.v1beta.SearchResponse.NaturalLanguageQueryUnder" - + "standingInfo.StructuredExtractedFilter\032\210\017\n" + + "\017rewritten_query\030\002 \001(\t\022\032\n" + + "\022classified_intents\030\005 \003(\t\022\230\001\n" + + "\033structured_extracted_filter\030\003 \001(\0132s" + + ".google.cloud.discoveryengine.v1beta.Sea" + + "rchResponse.NaturalLanguageQueryUnderstandingInfo.StructuredExtractedFilter\032\210\017\n" + "\031StructuredExtractedFilter\022\222\001\n\n" - + "expression\030\001 \001(\0132~.google.cloud.discoveryengine" - + ".v1beta.SearchResponse.NaturalLanguageQu" - + "eryUnderstandingInfo.StructuredExtractedFilter.Expression\032M\n" - + "\020StringConstraint\022\022\n" - + "\n" + + "expression\030\001 \001(\0132~.google.cloud.discoveryengine.v1" + + "beta.SearchResponse.NaturalLanguageQuery" + + "UnderstandingInfo.StructuredExtractedFilter.Expression\032M\n" + + "\020StringConstraint\022\022\n\n" + "field_name\030\001 \001(\t\022\016\n" + "\006values\030\002 \003(\t\022\025\n\r" + "query_segment\030\003 \001(\t\032\372\002\n" - + "\020NumberConstraint\022\022\n" - + "\n" + + "\020NumberConstraint\022\022\n\n" + "field_name\030\001 \001(\t\022\244\001\n\n" - + "comparison\030\002 \001(\0162\217\001.google.cloud.discoveryengine.v1beta.Se" - + "archResponse.NaturalLanguageQueryUnderst" - + "andingInfo.StructuredExtractedFilter.NumberConstraint.Comparison\022\r\n" + + "comparison\030\002 \001(\0162\217\001.g", + "oogle.cloud.discoveryengine.v1beta.SearchResponse.NaturalLanguageQueryUnderstand" + + "ingInfo.StructuredExtractedFilter.NumberConstraint.Comparison\022\r\n" + "\005value\030\003 \001(\001\022\025\n\r" + "query_segment\030\004 \001(\t\"\204\001\n\n" + "Comparison\022\032\n" @@ -665,66 +808,73 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\tlongitude\030\005 \001(\001\022\030\n" + "\020radius_in_meters\030\003 \001(\002\032\245\001\n\r" + "AndExpression\022\223\001\n" - + "\013expressions\030\001 \003(\0132~.google.cloud.discoveryengine.v1beta" - + ".SearchResponse.NaturalLanguageQueryUnde" - + "rstandingInfo.StructuredExtractedFilter.Expression\032\244\001\n" + + "\013expressions\030\001 \003(\0132~.google.cloud.discoveryengine.v1beta.Se" + + "archResponse.NaturalLanguageQueryUnderst" + + "andingInfo.StructuredExtractedFilter.Expression\032\244\001\n" + "\014OrExpression\022\223\001\n" - + "\013expressions\030\001 \003(\0132~.google.cloud.discoveryengine" - + ".v1beta.SearchResponse.NaturalLanguageQu" - + "eryUnderstandingInfo.StructuredExtractedFilter.Expression\032\275\006\n\n" + + "\013expressions\030\001 \003(\0132~.google.cloud.discoveryengine.v1" + + "beta.SearchResponse.NaturalLanguageQuery" + + "UnderstandingInfo.StructuredExtractedFilter.Expression\032\275\006\n\n" + "Expression\022\242\001\n" - + "\021string_constraint\030\001 \001(\0132\204\001.google.cloud.dis" - + "coveryengine.v1beta.SearchResponse.NaturalLanguageQueryUnderstandingInfo.Structu" - + "redExtractedFilter.StringConstraintH\000\022\242\001\n" - + "\021number_constraint\030\002 \001(\0132\204\001.google.clou" + + "\021string_constraint\030\001 \001(\0132\204\001.google.cloud.discov" + + "eryengine.v1beta.SearchResponse.NaturalL" + + "anguageQueryUnderstandingInfo.StructuredExtractedFilter.StringConstraintH\000\022\242\001\n" + + "\021number_constraint\030\002 \001(\0132\204\001.google.cloud.d" + + "iscoveryengine.v1beta.SearchResponse.NaturalLanguageQueryUnderstandingInfo.Struc" + + "turedExtractedFilter.NumberConstraintH\000\022\254\001\n" + + "\026geolocation_constraint\030\003 \001(\0132\211\001.goog" + + "le.cloud.discoveryengine.v1beta.SearchResponse.NaturalLanguageQueryUnderstanding" + + "Info.StructuredExtractedFilter.GeolocationConstraintH\000\022\226\001\n" + + "\010and_expr\030\004 \001(\0132\201\001.google.cloud.discoveryengine.v1beta.SearchR" + + "esponse.NaturalLanguageQueryUnderstandin" + + "gInfo.StructuredExtractedFilter.AndExpressionH\000\022\224\001\n" + + "\007or_expr\030\005 \001(\0132\200\001.google.clou" + "d.discoveryengine.v1beta.SearchResponse.NaturalLanguageQueryUnderstandingInfo.St" - + "ructuredExtractedFilter.NumberConstraintH\000\022\254\001\n" - + "\026geolocation_constraint\030\003 \001(\0132\211\001.g" - + "oogle.cloud.discoveryengine.v1beta.SearchResponse.NaturalLanguageQueryUnderstand" - + "ingInfo.StructuredExtractedFilter.GeolocationConstraintH\000\022\226\001\n" - + "\010and_expr\030\004 \001(\0132\201\001.google.cloud.discoveryengine.v1beta.Sear" - + "chResponse.NaturalLanguageQueryUnderstan" - + "dingInfo.StructuredExtractedFilter.AndExpressionH\000\022\224\001\n" - + "\007or_expr\030\005 \001(\0132\200\001.google.c" - + "loud.discoveryengine.v1beta.SearchResponse.NaturalLanguageQueryUnderstandingInfo" - + ".StructuredExtractedFilter.OrExpressionH\000B\006\n" + + "ructuredExtractedFilter.OrExpressionH\000B\006\n" + "\004expr\032-\n" + "\013SessionInfo\022\014\n" + "\004name\030\001 \001(\t\022\020\n" + "\010query_id\030\002 \001(\t\032\265\002\n" + "\014OneBoxResult\022a\n" - + "\014one_box_type\030\001 \001(\0162K.google.cloud.discovery" - + "engine.v1beta.SearchResponse.OneBoxResult.OneBoxType\022X\n" - + "\016search_results\030\002 \003(\0132@.g" - + "oogle.cloud.discoveryengine.v1beta.SearchResponse.SearchResult\"h\n\n" + + "\014one_box_type\030\001 \001(\0162K.google.cloud.discoveryeng" + + "ine.v1beta.SearchResponse.OneBoxResult.OneBoxType\022X\n" + + "\016search_results\030\002 \003(\0132@.goog" + + "le.cloud.discoveryengine.v1beta.SearchResponse.SearchResult\"h\n\n" + "OneBoxType\022\034\n" + "\030ONE_BOX_TYPE_UNSPECIFIED\020\000\022\n\n" + "\006PEOPLE\020\001\022\020\n" + "\014ORGANIZATION\020\002\022\t\n" + "\005SLACK\020\003\022\023\n" - + "\017KNOWLEDGE_GRAPH\020\0042\277\007\n\r" + + "\017KNOWLEDGE_GRAPH\020\004\"J\n\r" + + "SemanticState\022\036\n" + + "\032SEMANTIC_STATE_UNSPECIFIED\020\000\022\014\n" + + "\010DISABLED\020\001\022\013\n" + + "\007ENABLED\020\0022\376\010\n\r" + "SearchService\022\243\003\n" - + "\006Search\0222.google.cloud.discoveryengine.v1beta.Sear" - + "chRequest\0323.google.cloud.discoveryengine" - + ".v1beta.SearchResponse\"\257\002\202\323\344\223\002\250\002\"T/v1bet" - + "a/{serving_config=projects/*/locations/*/dataStores/*/servingConfigs/*}:search:\001" - + "*Zg\"b/v1beta/{serving_config=projects/*/locations/*/collections/*/dataStores/*/s" - + "ervingConfigs/*}:search:\001*Zd\"_/v1beta/{serving_config=projects/*/locations/*/col" - + "lections/*/engines/*/servingConfigs/*}:search:\001*\022\263\003\n\n" - + "SearchLite\0222.google.cloud.discoveryengine.v1beta.SearchRequest\0323.go" - + "ogle.cloud.discoveryengine.v1beta.Search" - + "Response\"\273\002\202\323\344\223\002\264\002\"X/v1beta/{serving_con" - + "fig=projects/*/locations/*/dataStores/*/servingConfigs/*}:searchLite:\001*Zk\"f/v1be" - + "ta/{serving_config=projects/*/locations/*/collections/*/dataStores/*/servingConf" - + "igs/*}:searchLite:\001*Zh\"c/v1beta/{serving_config=projects/*/locations/*/collectio" - + "ns/*/engines/*/servingConfigs/*}:searchL" - + "ite:\001*\032R\312A\036discoveryengine.googleapis.co" - + "m\322A.https://www.googleapis.com/auth/cloud-platformB\231\002\n" - + "\'com.google.cloud.discoveryengine.v1betaB\022SearchServiceProtoP\001ZQcl" - + "oud.google.com/go/discoveryengine/apiv1beta/discoveryenginepb;discoveryenginepb\242" - + "\002\017DISCOVERYENGINE\252\002#Google.Cloud.Discove" - + "ryEngine.V1Beta\312\002#Google\\Cloud\\Discovery" - + "Engine\\V1beta\352\002&Google::Cloud::DiscoveryEngine::V1betab\006proto3" + + "\006Search\0222.google.cloud.discoveryengine.v1beta.SearchReque" + + "st\0323.google.cloud.discoveryengine.v1beta" + + ".SearchResponse\"\257\002\202\323\344\223\002\250\002\"T/v1beta/{serv" + + "ing_config=projects/*/locations/*/dataStores/*/servingConfigs/*}:search:\001*Zg\"b/v" + + "1beta/{serving_config=projects/*/locations/*/collections/*/dataStores/*/servingC" + + "onfigs/*}:search:\001*Zd\"_/v1beta/{serving_config=projects/*/locations/*/collection" + + "s/*/engines/*/servingConfigs/*}:search:\001*\022\263\003\n\n" + + "SearchLite\0222.google.cloud.discoveryengine.v1beta.SearchRequest\0323.google.cl" + + "oud.discoveryengine.v1beta.SearchRespons" + + "e\"\273\002\202\323\344\223\002\264\002\"X/v1beta/{serving_config=pro" + + "jects/*/locations/*/dataStores/*/servingConfigs/*}:searchLite:\001*Zk\"f/v1beta/{ser" + + "ving_config=projects/*/locations/*/collections/*/dataStores/*/servingConfigs/*}:" + + "searchLite:\001*Zh\"c/v1beta/{serving_config=projects/*/locations/*/collections/*/en" + + "gines/*/servingConfigs/*}:searchLite:\001*\032" + + "\220\002\312A\036discoveryengine.googleapis.com\322A\353\001h" + + "ttps://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/di" + + "scoveryengine.assist.readwrite,https://www.googleapis.com/auth/discoveryengine.r" + + "eadwrite,https://www.googleapis.com/auth/discoveryengine.serving.readwriteB\231\002\n" + + "\'com.google.cloud.discoveryengine.v1betaB\022" + + "SearchServiceProtoP\001ZQcloud.google.com/go/discoveryengine/apiv1beta/discoveryeng" + + "inepb;discoveryenginepb\242\002\017DISCOVERYENGIN" + + "E\252\002#Google.Cloud.DiscoveryEngine.V1Beta\312" + + "\002#Google\\Cloud\\DiscoveryEngine\\V1beta\352\002&" + + "Google::Cloud::DiscoveryEngine::V1betab\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -748,12 +898,14 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "ServingConfig", "Branch", "Query", + "PageCategories", "ImageQuery", "PageSize", "PageToken", "Offset", "OneBoxPageSize", "DataStoreSpecs", + "NumResultsPerDataStore", "Filter", "CanonicalFilter", "OrderBy", @@ -774,10 +926,17 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "UserLabels", "NaturalLanguageQueryUnderstandingSpec", "SearchAsYouTypeSpec", + "DisplaySpec", + "CrowdingSpecs", "Session", "SessionSpec", "RelevanceThreshold", + "RelevanceFilterSpec", "PersonalizationSpec", + "RelevanceScoreSpec", + "SearchAddonSpec", + "CustomRankingParams", + "Entity", }); internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_ImageQuery_descriptor = internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_descriptor.getNestedType( @@ -795,7 +954,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_DataStoreSpec_descriptor, new java.lang.String[] { - "DataStore", "Filter", "BoostSpec", + "DataStore", "Filter", "BoostSpec", "CustomSearchOperators", "NumResults", }); internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_FacetSpec_descriptor = internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_descriptor.getNestedType( @@ -910,14 +1069,24 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "IgnoreNonSummarySeekingQuery", "IgnoreLowRelevantContent", "IgnoreJailBreakingQuery", + "MultimodalSpec", "ModelPromptSpec", "LanguageCode", "ModelSpec", "UseSemanticChunks", }); - internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_ContentSearchSpec_SummarySpec_ModelPromptSpec_descriptor = + internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_ContentSearchSpec_SummarySpec_MultiModalSpec_descriptor = internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_ContentSearchSpec_SummarySpec_descriptor .getNestedType(0); + internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_ContentSearchSpec_SummarySpec_MultiModalSpec_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_ContentSearchSpec_SummarySpec_MultiModalSpec_descriptor, + new java.lang.String[] { + "ImageSource", + }); + internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_ContentSearchSpec_SummarySpec_ModelPromptSpec_descriptor = + internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_ContentSearchSpec_SummarySpec_descriptor + .getNestedType(1); internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_ContentSearchSpec_SummarySpec_ModelPromptSpec_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_ContentSearchSpec_SummarySpec_ModelPromptSpec_descriptor, @@ -926,7 +1095,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { }); internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_ContentSearchSpec_SummarySpec_ModelSpec_descriptor = internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_ContentSearchSpec_SummarySpec_descriptor - .getNestedType(1); + .getNestedType(2); internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_ContentSearchSpec_SummarySpec_ModelSpec_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_ContentSearchSpec_SummarySpec_ModelSpec_descriptor, @@ -980,7 +1149,10 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_NaturalLanguageQueryUnderstandingSpec_descriptor, new java.lang.String[] { - "FilterExtractionCondition", "GeoSearchQueryDetectionFieldNames", + "FilterExtractionCondition", + "GeoSearchQueryDetectionFieldNames", + "ExtractedFilterBehavior", + "AllowedFieldNames", }); internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_SearchAsYouTypeSpec_descriptor = internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_descriptor.getNestedType( @@ -991,27 +1163,92 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "Condition", }); - internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_SessionSpec_descriptor = + internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_DisplaySpec_descriptor = internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_descriptor.getNestedType( 10); + internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_DisplaySpec_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_DisplaySpec_descriptor, + new java.lang.String[] { + "MatchHighlightingCondition", + }); + internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_CrowdingSpec_descriptor = + internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_descriptor.getNestedType( + 11); + internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_CrowdingSpec_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_CrowdingSpec_descriptor, + new java.lang.String[] { + "Field", "MaxCount", "Mode", + }); + internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_SessionSpec_descriptor = + internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_descriptor.getNestedType( + 12); internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_SessionSpec_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_SessionSpec_descriptor, new java.lang.String[] { "QueryId", "SearchResultPersistenceCount", }); + internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_RelevanceFilterSpec_descriptor = + internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_descriptor.getNestedType( + 13); + internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_RelevanceFilterSpec_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_RelevanceFilterSpec_descriptor, + new java.lang.String[] { + "KeywordSearchThreshold", "SemanticSearchThreshold", + }); + internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_RelevanceFilterSpec_RelevanceThresholdSpec_descriptor = + internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_RelevanceFilterSpec_descriptor + .getNestedType(0); + internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_RelevanceFilterSpec_RelevanceThresholdSpec_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_RelevanceFilterSpec_RelevanceThresholdSpec_descriptor, + new java.lang.String[] { + "RelevanceThreshold", "SemanticRelevanceThreshold", "RelevanceThresholdSpec", + }); internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_PersonalizationSpec_descriptor = internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_descriptor.getNestedType( - 11); + 14); internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_PersonalizationSpec_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_PersonalizationSpec_descriptor, new java.lang.String[] { "Mode", }); + internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_RelevanceScoreSpec_descriptor = + internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_descriptor.getNestedType( + 15); + internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_RelevanceScoreSpec_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_RelevanceScoreSpec_descriptor, + new java.lang.String[] { + "ReturnRelevanceScore", + }); + internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_SearchAddonSpec_descriptor = + internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_descriptor.getNestedType( + 16); + internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_SearchAddonSpec_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_SearchAddonSpec_descriptor, + new java.lang.String[] { + "DisableSemanticAddOn", + "DisableKpiPersonalizationAddOn", + "DisableGenerativeAnswerAddOn", + }); + internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_CustomRankingParams_descriptor = + internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_descriptor.getNestedType( + 17); + internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_CustomRankingParams_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_CustomRankingParams_descriptor, + new java.lang.String[] { + "ExpressionsToPrecompute", + }); internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_ParamsEntry_descriptor = internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_descriptor.getNestedType( - 12); + 18); internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_ParamsEntry_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_ParamsEntry_descriptor, @@ -1020,7 +1257,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { }); internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_UserLabelsEntry_descriptor = internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_descriptor.getNestedType( - 13); + 19); internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_UserLabelsEntry_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_cloud_discoveryengine_v1beta_SearchRequest_UserLabelsEntry_descriptor, @@ -1041,6 +1278,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "RedirectUri", "NextPageToken", "CorrectedQuery", + "SuggestedQuery", "Summary", "AppliedControls", "GeoSearchDebugInfo", @@ -1048,6 +1286,8 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "NaturalLanguageQueryUnderstandingInfo", "SessionInfo", "OneBoxResults", + "SearchLinkPromotions", + "SemanticState", }); internal_static_google_cloud_discoveryengine_v1beta_SearchResponse_SearchResult_descriptor = internal_static_google_cloud_discoveryengine_v1beta_SearchResponse_descriptor.getNestedType( @@ -1058,18 +1298,9 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "Id", "Document", "Chunk", "ModelScores", "RankSignals", }); - internal_static_google_cloud_discoveryengine_v1beta_SearchResponse_SearchResult_ModelScoresEntry_descriptor = - internal_static_google_cloud_discoveryengine_v1beta_SearchResponse_SearchResult_descriptor - .getNestedType(0); - internal_static_google_cloud_discoveryengine_v1beta_SearchResponse_SearchResult_ModelScoresEntry_fieldAccessorTable = - new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_cloud_discoveryengine_v1beta_SearchResponse_SearchResult_ModelScoresEntry_descriptor, - new java.lang.String[] { - "Key", "Value", - }); internal_static_google_cloud_discoveryengine_v1beta_SearchResponse_SearchResult_RankSignals_descriptor = internal_static_google_cloud_discoveryengine_v1beta_SearchResponse_SearchResult_descriptor - .getNestedType(1); + .getNestedType(0); internal_static_google_cloud_discoveryengine_v1beta_SearchResponse_SearchResult_RankSignals_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_cloud_discoveryengine_v1beta_SearchResponse_SearchResult_RankSignals_descriptor, @@ -1083,6 +1314,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "BoostingFactor", "DefaultRank", "CustomSignals", + "PrecomputedExpressionValues", }); internal_static_google_cloud_discoveryengine_v1beta_SearchResponse_SearchResult_RankSignals_CustomSignal_descriptor = internal_static_google_cloud_discoveryengine_v1beta_SearchResponse_SearchResult_RankSignals_descriptor @@ -1093,6 +1325,15 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "Name", "Value", }); + internal_static_google_cloud_discoveryengine_v1beta_SearchResponse_SearchResult_ModelScoresEntry_descriptor = + internal_static_google_cloud_discoveryengine_v1beta_SearchResponse_SearchResult_descriptor + .getNestedType(1); + internal_static_google_cloud_discoveryengine_v1beta_SearchResponse_SearchResult_ModelScoresEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1beta_SearchResponse_SearchResult_ModelScoresEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); internal_static_google_cloud_discoveryengine_v1beta_SearchResponse_Facet_descriptor = internal_static_google_cloud_discoveryengine_v1beta_SearchResponse_descriptor.getNestedType( 1); @@ -1190,16 +1431,34 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_cloud_discoveryengine_v1beta_SearchResponse_Summary_Reference_ChunkContent_descriptor, new java.lang.String[] { - "Content", "PageIdentifier", + "Content", "PageIdentifier", "BlobAttachmentIndexes", }); - internal_static_google_cloud_discoveryengine_v1beta_SearchResponse_Summary_SummaryWithMetadata_descriptor = + internal_static_google_cloud_discoveryengine_v1beta_SearchResponse_Summary_BlobAttachment_descriptor = internal_static_google_cloud_discoveryengine_v1beta_SearchResponse_Summary_descriptor .getNestedType(5); + internal_static_google_cloud_discoveryengine_v1beta_SearchResponse_Summary_BlobAttachment_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1beta_SearchResponse_Summary_BlobAttachment_descriptor, + new java.lang.String[] { + "Data", "AttributionType", + }); + internal_static_google_cloud_discoveryengine_v1beta_SearchResponse_Summary_BlobAttachment_Blob_descriptor = + internal_static_google_cloud_discoveryengine_v1beta_SearchResponse_Summary_BlobAttachment_descriptor + .getNestedType(0); + internal_static_google_cloud_discoveryengine_v1beta_SearchResponse_Summary_BlobAttachment_Blob_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1beta_SearchResponse_Summary_BlobAttachment_Blob_descriptor, + new java.lang.String[] { + "MimeType", "Data", + }); + internal_static_google_cloud_discoveryengine_v1beta_SearchResponse_Summary_SummaryWithMetadata_descriptor = + internal_static_google_cloud_discoveryengine_v1beta_SearchResponse_Summary_descriptor + .getNestedType(6); internal_static_google_cloud_discoveryengine_v1beta_SearchResponse_Summary_SummaryWithMetadata_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_cloud_discoveryengine_v1beta_SearchResponse_Summary_SummaryWithMetadata_descriptor, new java.lang.String[] { - "Summary", "CitationMetadata", "References", + "Summary", "CitationMetadata", "References", "BlobAttachments", }); internal_static_google_cloud_discoveryengine_v1beta_SearchResponse_GeoSearchDebugInfo_descriptor = internal_static_google_cloud_discoveryengine_v1beta_SearchResponse_descriptor.getNestedType( @@ -1226,7 +1485,10 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_cloud_discoveryengine_v1beta_SearchResponse_NaturalLanguageQueryUnderstandingInfo_descriptor, new java.lang.String[] { - "ExtractedFilters", "RewrittenQuery", "StructuredExtractedFilter", + "ExtractedFilters", + "RewrittenQuery", + "ClassifiedIntents", + "StructuredExtractedFilter", }); internal_static_google_cloud_discoveryengine_v1beta_SearchResponse_NaturalLanguageQueryUnderstandingInfo_StructuredExtractedFilter_descriptor = internal_static_google_cloud_discoveryengine_v1beta_SearchResponse_NaturalLanguageQueryUnderstandingInfo_descriptor diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/SearchTuningServiceProto.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/SearchTuningServiceProto.java index 7803165aedc7..f4b3ed94e1d0 100644 --- a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/SearchTuningServiceProto.java +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/SearchTuningServiceProto.java @@ -115,7 +115,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + " \001(\t\022\r\n\005value\030\002 \001(\001:\0028\001\"|\n\030TrainCustomMo" + "delMetadata\022/\n\013create_time\030\001 \001(\0132\032.googl" + "e.protobuf.Timestamp\022/\n\013update_time\030\002 \001(" - + "\0132\032.google.protobuf.Timestamp2\256\005\n\023Search" + + "\0132\032.google.protobuf.Timestamp2\254\006\n\023Search" + "TuningService\022\323\002\n\020TrainCustomModel\022<.goo" + "gle.cloud.discoveryengine.v1beta.TrainCu" + "stomModelRequest\032\035.google.longrunning.Op" @@ -130,17 +130,20 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + ".google.cloud.discoveryengine.v1beta.Lis" + "tCustomModelsResponse\"[\202\323\344\223\002U\022S/v1beta/{" + "data_store=projects/*/locations/*/collec" - + "tions/*/dataStores/*}/customModels\032R\312A\036d" - + "iscoveryengine.googleapis.com\322A.https://" - + "www.googleapis.com/auth/cloud-platformB\237" - + "\002\n\'com.google.cloud.discoveryengine.v1be" - + "taB\030SearchTuningServiceProtoP\001ZQcloud.go" - + "ogle.com/go/discoveryengine/apiv1beta/di" - + "scoveryenginepb;discoveryenginepb\242\002\017DISC" - + "OVERYENGINE\252\002#Google.Cloud.DiscoveryEngi" - + "ne.V1Beta\312\002#Google\\Cloud\\DiscoveryEngine" - + "\\V1beta\352\002&Google::Cloud::DiscoveryEngine" - + "::V1betab\006proto3" + + "tions/*/dataStores/*}/customModels\032\317\001\312A\036" + + "discoveryengine.googleapis.com\322A\252\001https:" + + "//www.googleapis.com/auth/cloud-platform" + + ",https://www.googleapis.com/auth/discove" + + "ryengine.readwrite,https://www.googleapi" + + "s.com/auth/discoveryengine.serving.readw" + + "riteB\237\002\n\'com.google.cloud.discoveryengin" + + "e.v1betaB\030SearchTuningServiceProtoP\001ZQcl" + + "oud.google.com/go/discoveryengine/apiv1b" + + "eta/discoveryenginepb;discoveryenginepb\242" + + "\002\017DISCOVERYENGINE\252\002#Google.Cloud.Discove" + + "ryEngine.V1Beta\312\002#Google\\Cloud\\Discovery" + + "Engine\\V1beta\352\002&Google::Cloud::Discovery" + + "Engine::V1betab\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ServingConfig.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ServingConfig.java index 01a8889df39d..b72ec4d0a3b5 100644 --- a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ServingConfig.java +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ServingConfig.java @@ -69,6 +69,7 @@ private ServingConfig() { dissociateControlIds_ = com.google.protobuf.LazyStringArrayList.emptyList(); replacementControlIds_ = com.google.protobuf.LazyStringArrayList.emptyList(); ignoreControlIds_ = com.google.protobuf.LazyStringArrayList.emptyList(); + promoteControlIds_ = com.google.protobuf.LazyStringArrayList.emptyList(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @@ -2850,9 +2851,8 @@ public com.google.cloud.discoveryengine.v1beta.EmbeddingConfig getEmbeddingConfi * The ranking expression controls the customized ranking on retrieval * documents. To leverage this, document embedding is required. The ranking * expression setting in ServingConfig applies to all search requests served - * by the serving config. However, if - * [SearchRequest.ranking_expression][google.cloud.discoveryengine.v1beta.SearchRequest.ranking_expression] - * is specified, it overrides the ServingConfig ranking expression. + * by the serving config. However, if `SearchRequest.ranking_expression` is + * specified, it overrides the ServingConfig ranking expression. * * The ranking expression is a single function or multiple functions that are * joined by "+". @@ -2903,9 +2903,8 @@ public java.lang.String getRankingExpression() { * The ranking expression controls the customized ranking on retrieval * documents. To leverage this, document embedding is required. The ranking * expression setting in ServingConfig applies to all search requests served - * by the serving config. However, if - * [SearchRequest.ranking_expression][google.cloud.discoveryengine.v1beta.SearchRequest.ranking_expression] - * is specified, it overrides the ServingConfig ranking expression. + * by the serving config. However, if `SearchRequest.ranking_expression` is + * specified, it overrides the ServingConfig ranking expression. * * The ranking expression is a single function or multiple functions that are * joined by "+". @@ -3769,6 +3768,82 @@ public com.google.protobuf.ByteString getIgnoreControlIdsBytes(int index) { return ignoreControlIds_.getByteString(index); } + public static final int PROMOTE_CONTROL_IDS_FIELD_NUMBER = 26; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList promoteControlIds_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + /** + * + * + *
            +   * Condition promote specifications.
            +   *
            +   * Maximum number of specifications is 100.
            +   * 
            + * + * repeated string promote_control_ids = 26; + * + * @return A list containing the promoteControlIds. + */ + public com.google.protobuf.ProtocolStringList getPromoteControlIdsList() { + return promoteControlIds_; + } + + /** + * + * + *
            +   * Condition promote specifications.
            +   *
            +   * Maximum number of specifications is 100.
            +   * 
            + * + * repeated string promote_control_ids = 26; + * + * @return The count of promoteControlIds. + */ + public int getPromoteControlIdsCount() { + return promoteControlIds_.size(); + } + + /** + * + * + *
            +   * Condition promote specifications.
            +   *
            +   * Maximum number of specifications is 100.
            +   * 
            + * + * repeated string promote_control_ids = 26; + * + * @param index The index of the element to return. + * @return The promoteControlIds at the given index. + */ + public java.lang.String getPromoteControlIds(int index) { + return promoteControlIds_.get(index); + } + + /** + * + * + *
            +   * Condition promote specifications.
            +   *
            +   * Maximum number of specifications is 100.
            +   * 
            + * + * repeated string promote_control_ids = 26; + * + * @param index The index of the value to return. + * @return The bytes of the promoteControlIds at the given index. + */ + public com.google.protobuf.ByteString getPromoteControlIdsBytes(int index) { + return promoteControlIds_.getByteString(index); + } + public static final int PERSONALIZATION_SPEC_FIELD_NUMBER = 25; private com.google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec personalizationSpec_; @@ -3860,6 +3935,66 @@ public boolean hasPersonalizationSpec() { : personalizationSpec_; } + public static final int ANSWER_GENERATION_SPEC_FIELD_NUMBER = 27; + private com.google.cloud.discoveryengine.v1beta.AnswerGenerationSpec answerGenerationSpec_; + + /** + * + * + *
            +   * Optional. The specification for answer generation.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AnswerGenerationSpec answer_generation_spec = 27 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the answerGenerationSpec field is set. + */ + @java.lang.Override + public boolean hasAnswerGenerationSpec() { + return ((bitField0_ & 0x00000010) != 0); + } + + /** + * + * + *
            +   * Optional. The specification for answer generation.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AnswerGenerationSpec answer_generation_spec = 27 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The answerGenerationSpec. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AnswerGenerationSpec getAnswerGenerationSpec() { + return answerGenerationSpec_ == null + ? com.google.cloud.discoveryengine.v1beta.AnswerGenerationSpec.getDefaultInstance() + : answerGenerationSpec_; + } + + /** + * + * + *
            +   * Optional. The specification for answer generation.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AnswerGenerationSpec answer_generation_spec = 27 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AnswerGenerationSpecOrBuilder + getAnswerGenerationSpecOrBuilder() { + return answerGenerationSpec_ == null + ? com.google.cloud.discoveryengine.v1beta.AnswerGenerationSpec.getDefaultInstance() + : answerGenerationSpec_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -3941,6 +4076,12 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000008) != 0)) { output.writeMessage(25, getPersonalizationSpec()); } + for (int i = 0; i < promoteControlIds_.size(); i++) { + com.google.protobuf.GeneratedMessage.writeString(output, 26, promoteControlIds_.getRaw(i)); + } + if (((bitField0_ & 0x00000010) != 0)) { + output.writeMessage(27, getAnswerGenerationSpec()); + } getUnknownFields().writeTo(output); } @@ -4060,6 +4201,18 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeMessageSize(25, getPersonalizationSpec()); } + { + int dataSize = 0; + for (int i = 0; i < promoteControlIds_.size(); i++) { + dataSize += computeStringSizeNoTag(promoteControlIds_.getRaw(i)); + } + size += dataSize; + size += 2 * getPromoteControlIdsList().size(); + } + if (((bitField0_ & 0x00000010) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(27, getAnswerGenerationSpec()); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -4103,10 +4256,15 @@ public boolean equals(final java.lang.Object obj) { if (!getDissociateControlIdsList().equals(other.getDissociateControlIdsList())) return false; if (!getReplacementControlIdsList().equals(other.getReplacementControlIdsList())) return false; if (!getIgnoreControlIdsList().equals(other.getIgnoreControlIdsList())) return false; + if (!getPromoteControlIdsList().equals(other.getPromoteControlIdsList())) return false; if (hasPersonalizationSpec() != other.hasPersonalizationSpec()) return false; if (hasPersonalizationSpec()) { if (!getPersonalizationSpec().equals(other.getPersonalizationSpec())) return false; } + if (hasAnswerGenerationSpec() != other.hasAnswerGenerationSpec()) return false; + if (hasAnswerGenerationSpec()) { + if (!getAnswerGenerationSpec().equals(other.getAnswerGenerationSpec())) return false; + } if (!getVerticalConfigCase().equals(other.getVerticalConfigCase())) return false; switch (verticalConfigCase_) { case 7: @@ -4185,10 +4343,18 @@ public int hashCode() { hash = (37 * hash) + IGNORE_CONTROL_IDS_FIELD_NUMBER; hash = (53 * hash) + getIgnoreControlIdsList().hashCode(); } + if (getPromoteControlIdsCount() > 0) { + hash = (37 * hash) + PROMOTE_CONTROL_IDS_FIELD_NUMBER; + hash = (53 * hash) + getPromoteControlIdsList().hashCode(); + } if (hasPersonalizationSpec()) { hash = (37 * hash) + PERSONALIZATION_SPEC_FIELD_NUMBER; hash = (53 * hash) + getPersonalizationSpec().hashCode(); } + if (hasAnswerGenerationSpec()) { + hash = (37 * hash) + ANSWER_GENERATION_SPEC_FIELD_NUMBER; + hash = (53 * hash) + getAnswerGenerationSpec().hashCode(); + } switch (verticalConfigCase_) { case 7: hash = (37 * hash) + MEDIA_CONFIG_FIELD_NUMBER; @@ -4350,6 +4516,7 @@ private void maybeForceBuilderInitialization() { internalGetCreateTimeFieldBuilder(); internalGetUpdateTimeFieldBuilder(); internalGetPersonalizationSpecFieldBuilder(); + internalGetAnswerGenerationSpecFieldBuilder(); } } @@ -4392,11 +4559,17 @@ public Builder clear() { dissociateControlIds_ = com.google.protobuf.LazyStringArrayList.emptyList(); replacementControlIds_ = com.google.protobuf.LazyStringArrayList.emptyList(); ignoreControlIds_ = com.google.protobuf.LazyStringArrayList.emptyList(); + promoteControlIds_ = com.google.protobuf.LazyStringArrayList.emptyList(); personalizationSpec_ = null; if (personalizationSpecBuilder_ != null) { personalizationSpecBuilder_.dispose(); personalizationSpecBuilder_ = null; } + answerGenerationSpec_ = null; + if (answerGenerationSpecBuilder_ != null) { + answerGenerationSpecBuilder_.dispose(); + answerGenerationSpecBuilder_ = null; + } verticalConfigCase_ = 0; verticalConfig_ = null; return this; @@ -4501,12 +4674,23 @@ private void buildPartial0(com.google.cloud.discoveryengine.v1beta.ServingConfig result.ignoreControlIds_ = ignoreControlIds_; } if (((from_bitField0_ & 0x00080000) != 0)) { + promoteControlIds_.makeImmutable(); + result.promoteControlIds_ = promoteControlIds_; + } + if (((from_bitField0_ & 0x00100000) != 0)) { result.personalizationSpec_ = personalizationSpecBuilder_ == null ? personalizationSpec_ : personalizationSpecBuilder_.build(); to_bitField0_ |= 0x00000008; } + if (((from_bitField0_ & 0x00200000) != 0)) { + result.answerGenerationSpec_ = + answerGenerationSpecBuilder_ == null + ? answerGenerationSpec_ + : answerGenerationSpecBuilder_.build(); + to_bitField0_ |= 0x00000010; + } result.bitField0_ |= to_bitField0_; } @@ -4651,9 +4835,22 @@ public Builder mergeFrom(com.google.cloud.discoveryengine.v1beta.ServingConfig o } onChanged(); } + if (!other.promoteControlIds_.isEmpty()) { + if (promoteControlIds_.isEmpty()) { + promoteControlIds_ = other.promoteControlIds_; + bitField0_ |= 0x00080000; + } else { + ensurePromoteControlIdsIsMutable(); + promoteControlIds_.addAll(other.promoteControlIds_); + } + onChanged(); + } if (other.hasPersonalizationSpec()) { mergePersonalizationSpec(other.getPersonalizationSpec()); } + if (other.hasAnswerGenerationSpec()) { + mergeAnswerGenerationSpec(other.getAnswerGenerationSpec()); + } switch (other.getVerticalConfigCase()) { case MEDIA_CONFIG: { @@ -4827,9 +5024,23 @@ public Builder mergeFrom( { input.readMessage( internalGetPersonalizationSpecFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00080000; + bitField0_ |= 0x00100000; break; } // case 202 + case 210: + { + java.lang.String s = input.readStringRequireUtf8(); + ensurePromoteControlIdsIsMutable(); + promoteControlIds_.add(s); + break; + } // case 210 + case 218: + { + input.readMessage( + internalGetAnswerGenerationSpecFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00200000; + break; + } // case 218 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -6287,9 +6498,8 @@ public Builder clearEmbeddingConfig() { * The ranking expression controls the customized ranking on retrieval * documents. To leverage this, document embedding is required. The ranking * expression setting in ServingConfig applies to all search requests served - * by the serving config. However, if - * [SearchRequest.ranking_expression][google.cloud.discoveryengine.v1beta.SearchRequest.ranking_expression] - * is specified, it overrides the ServingConfig ranking expression. + * by the serving config. However, if `SearchRequest.ranking_expression` is + * specified, it overrides the ServingConfig ranking expression. * * The ranking expression is a single function or multiple functions that are * joined by "+". @@ -6339,9 +6549,8 @@ public java.lang.String getRankingExpression() { * The ranking expression controls the customized ranking on retrieval * documents. To leverage this, document embedding is required. The ranking * expression setting in ServingConfig applies to all search requests served - * by the serving config. However, if - * [SearchRequest.ranking_expression][google.cloud.discoveryengine.v1beta.SearchRequest.ranking_expression] - * is specified, it overrides the ServingConfig ranking expression. + * by the serving config. However, if `SearchRequest.ranking_expression` is + * specified, it overrides the ServingConfig ranking expression. * * The ranking expression is a single function or multiple functions that are * joined by "+". @@ -6391,9 +6600,8 @@ public com.google.protobuf.ByteString getRankingExpressionBytes() { * The ranking expression controls the customized ranking on retrieval * documents. To leverage this, document embedding is required. The ranking * expression setting in ServingConfig applies to all search requests served - * by the serving config. However, if - * [SearchRequest.ranking_expression][google.cloud.discoveryengine.v1beta.SearchRequest.ranking_expression] - * is specified, it overrides the ServingConfig ranking expression. + * by the serving config. However, if `SearchRequest.ranking_expression` is + * specified, it overrides the ServingConfig ranking expression. * * The ranking expression is a single function or multiple functions that are * joined by "+". @@ -6442,9 +6650,8 @@ public Builder setRankingExpression(java.lang.String value) { * The ranking expression controls the customized ranking on retrieval * documents. To leverage this, document embedding is required. The ranking * expression setting in ServingConfig applies to all search requests served - * by the serving config. However, if - * [SearchRequest.ranking_expression][google.cloud.discoveryengine.v1beta.SearchRequest.ranking_expression] - * is specified, it overrides the ServingConfig ranking expression. + * by the serving config. However, if `SearchRequest.ranking_expression` is + * specified, it overrides the ServingConfig ranking expression. * * The ranking expression is a single function or multiple functions that are * joined by "+". @@ -6489,9 +6696,8 @@ public Builder clearRankingExpression() { * The ranking expression controls the customized ranking on retrieval * documents. To leverage this, document embedding is required. The ranking * expression setting in ServingConfig applies to all search requests served - * by the serving config. However, if - * [SearchRequest.ranking_expression][google.cloud.discoveryengine.v1beta.SearchRequest.ranking_expression] - * is specified, it overrides the ServingConfig ranking expression. + * by the serving config. However, if `SearchRequest.ranking_expression` is + * specified, it overrides the ServingConfig ranking expression. * * The ranking expression is a single function or multiple functions that are * joined by "+". @@ -8811,6 +9017,207 @@ public Builder addIgnoreControlIdsBytes(com.google.protobuf.ByteString value) { return this; } + private com.google.protobuf.LazyStringArrayList promoteControlIds_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensurePromoteControlIdsIsMutable() { + if (!promoteControlIds_.isModifiable()) { + promoteControlIds_ = new com.google.protobuf.LazyStringArrayList(promoteControlIds_); + } + bitField0_ |= 0x00080000; + } + + /** + * + * + *
            +     * Condition promote specifications.
            +     *
            +     * Maximum number of specifications is 100.
            +     * 
            + * + * repeated string promote_control_ids = 26; + * + * @return A list containing the promoteControlIds. + */ + public com.google.protobuf.ProtocolStringList getPromoteControlIdsList() { + promoteControlIds_.makeImmutable(); + return promoteControlIds_; + } + + /** + * + * + *
            +     * Condition promote specifications.
            +     *
            +     * Maximum number of specifications is 100.
            +     * 
            + * + * repeated string promote_control_ids = 26; + * + * @return The count of promoteControlIds. + */ + public int getPromoteControlIdsCount() { + return promoteControlIds_.size(); + } + + /** + * + * + *
            +     * Condition promote specifications.
            +     *
            +     * Maximum number of specifications is 100.
            +     * 
            + * + * repeated string promote_control_ids = 26; + * + * @param index The index of the element to return. + * @return The promoteControlIds at the given index. + */ + public java.lang.String getPromoteControlIds(int index) { + return promoteControlIds_.get(index); + } + + /** + * + * + *
            +     * Condition promote specifications.
            +     *
            +     * Maximum number of specifications is 100.
            +     * 
            + * + * repeated string promote_control_ids = 26; + * + * @param index The index of the value to return. + * @return The bytes of the promoteControlIds at the given index. + */ + public com.google.protobuf.ByteString getPromoteControlIdsBytes(int index) { + return promoteControlIds_.getByteString(index); + } + + /** + * + * + *
            +     * Condition promote specifications.
            +     *
            +     * Maximum number of specifications is 100.
            +     * 
            + * + * repeated string promote_control_ids = 26; + * + * @param index The index to set the value at. + * @param value The promoteControlIds to set. + * @return This builder for chaining. + */ + public Builder setPromoteControlIds(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensurePromoteControlIdsIsMutable(); + promoteControlIds_.set(index, value); + bitField0_ |= 0x00080000; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Condition promote specifications.
            +     *
            +     * Maximum number of specifications is 100.
            +     * 
            + * + * repeated string promote_control_ids = 26; + * + * @param value The promoteControlIds to add. + * @return This builder for chaining. + */ + public Builder addPromoteControlIds(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensurePromoteControlIdsIsMutable(); + promoteControlIds_.add(value); + bitField0_ |= 0x00080000; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Condition promote specifications.
            +     *
            +     * Maximum number of specifications is 100.
            +     * 
            + * + * repeated string promote_control_ids = 26; + * + * @param values The promoteControlIds to add. + * @return This builder for chaining. + */ + public Builder addAllPromoteControlIds(java.lang.Iterable values) { + ensurePromoteControlIdsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, promoteControlIds_); + bitField0_ |= 0x00080000; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Condition promote specifications.
            +     *
            +     * Maximum number of specifications is 100.
            +     * 
            + * + * repeated string promote_control_ids = 26; + * + * @return This builder for chaining. + */ + public Builder clearPromoteControlIds() { + promoteControlIds_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00080000); + ; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Condition promote specifications.
            +     *
            +     * Maximum number of specifications is 100.
            +     * 
            + * + * repeated string promote_control_ids = 26; + * + * @param value The bytes of the promoteControlIds to add. + * @return This builder for chaining. + */ + public Builder addPromoteControlIdsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensurePromoteControlIdsIsMutable(); + promoteControlIds_.add(value); + bitField0_ |= 0x00080000; + onChanged(); + return this; + } + private com.google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec personalizationSpec_; private com.google.protobuf.SingleFieldBuilder< @@ -8842,7 +9249,7 @@ public Builder addIgnoreControlIdsBytes(com.google.protobuf.ByteString value) { * @return Whether the personalizationSpec field is set. */ public boolean hasPersonalizationSpec() { - return ((bitField0_ & 0x00080000) != 0); + return ((bitField0_ & 0x00100000) != 0); } /** @@ -8909,7 +9316,7 @@ public Builder setPersonalizationSpec( } else { personalizationSpecBuilder_.setMessage(value); } - bitField0_ |= 0x00080000; + bitField0_ |= 0x00100000; onChanged(); return this; } @@ -8942,7 +9349,7 @@ public Builder setPersonalizationSpec( } else { personalizationSpecBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00080000; + bitField0_ |= 0x00100000; onChanged(); return this; } @@ -8970,7 +9377,7 @@ public Builder setPersonalizationSpec( public Builder mergePersonalizationSpec( com.google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec value) { if (personalizationSpecBuilder_ == null) { - if (((bitField0_ & 0x00080000) != 0) + if (((bitField0_ & 0x00100000) != 0) && personalizationSpec_ != null && personalizationSpec_ != com.google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec @@ -8983,7 +9390,7 @@ public Builder mergePersonalizationSpec( personalizationSpecBuilder_.mergeFrom(value); } if (personalizationSpec_ != null) { - bitField0_ |= 0x00080000; + bitField0_ |= 0x00100000; onChanged(); } return this; @@ -9010,7 +9417,7 @@ public Builder mergePersonalizationSpec( * */ public Builder clearPersonalizationSpec() { - bitField0_ = (bitField0_ & ~0x00080000); + bitField0_ = (bitField0_ & ~0x00100000); personalizationSpec_ = null; if (personalizationSpecBuilder_ != null) { personalizationSpecBuilder_.dispose(); @@ -9042,7 +9449,7 @@ public Builder clearPersonalizationSpec() { */ public com.google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpec.Builder getPersonalizationSpecBuilder() { - bitField0_ |= 0x00080000; + bitField0_ |= 0x00100000; onChanged(); return internalGetPersonalizationSpecFieldBuilder().getBuilder(); } @@ -9116,6 +9523,225 @@ public Builder clearPersonalizationSpec() { return personalizationSpecBuilder_; } + private com.google.cloud.discoveryengine.v1beta.AnswerGenerationSpec answerGenerationSpec_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.AnswerGenerationSpec, + com.google.cloud.discoveryengine.v1beta.AnswerGenerationSpec.Builder, + com.google.cloud.discoveryengine.v1beta.AnswerGenerationSpecOrBuilder> + answerGenerationSpecBuilder_; + + /** + * + * + *
            +     * Optional. The specification for answer generation.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AnswerGenerationSpec answer_generation_spec = 27 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the answerGenerationSpec field is set. + */ + public boolean hasAnswerGenerationSpec() { + return ((bitField0_ & 0x00200000) != 0); + } + + /** + * + * + *
            +     * Optional. The specification for answer generation.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AnswerGenerationSpec answer_generation_spec = 27 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The answerGenerationSpec. + */ + public com.google.cloud.discoveryengine.v1beta.AnswerGenerationSpec getAnswerGenerationSpec() { + if (answerGenerationSpecBuilder_ == null) { + return answerGenerationSpec_ == null + ? com.google.cloud.discoveryengine.v1beta.AnswerGenerationSpec.getDefaultInstance() + : answerGenerationSpec_; + } else { + return answerGenerationSpecBuilder_.getMessage(); + } + } + + /** + * + * + *
            +     * Optional. The specification for answer generation.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AnswerGenerationSpec answer_generation_spec = 27 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setAnswerGenerationSpec( + com.google.cloud.discoveryengine.v1beta.AnswerGenerationSpec value) { + if (answerGenerationSpecBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + answerGenerationSpec_ = value; + } else { + answerGenerationSpecBuilder_.setMessage(value); + } + bitField0_ |= 0x00200000; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Optional. The specification for answer generation.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AnswerGenerationSpec answer_generation_spec = 27 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setAnswerGenerationSpec( + com.google.cloud.discoveryengine.v1beta.AnswerGenerationSpec.Builder builderForValue) { + if (answerGenerationSpecBuilder_ == null) { + answerGenerationSpec_ = builderForValue.build(); + } else { + answerGenerationSpecBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00200000; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Optional. The specification for answer generation.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AnswerGenerationSpec answer_generation_spec = 27 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeAnswerGenerationSpec( + com.google.cloud.discoveryengine.v1beta.AnswerGenerationSpec value) { + if (answerGenerationSpecBuilder_ == null) { + if (((bitField0_ & 0x00200000) != 0) + && answerGenerationSpec_ != null + && answerGenerationSpec_ + != com.google.cloud.discoveryengine.v1beta.AnswerGenerationSpec + .getDefaultInstance()) { + getAnswerGenerationSpecBuilder().mergeFrom(value); + } else { + answerGenerationSpec_ = value; + } + } else { + answerGenerationSpecBuilder_.mergeFrom(value); + } + if (answerGenerationSpec_ != null) { + bitField0_ |= 0x00200000; + onChanged(); + } + return this; + } + + /** + * + * + *
            +     * Optional. The specification for answer generation.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AnswerGenerationSpec answer_generation_spec = 27 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearAnswerGenerationSpec() { + bitField0_ = (bitField0_ & ~0x00200000); + answerGenerationSpec_ = null; + if (answerGenerationSpecBuilder_ != null) { + answerGenerationSpecBuilder_.dispose(); + answerGenerationSpecBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
            +     * Optional. The specification for answer generation.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AnswerGenerationSpec answer_generation_spec = 27 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.discoveryengine.v1beta.AnswerGenerationSpec.Builder + getAnswerGenerationSpecBuilder() { + bitField0_ |= 0x00200000; + onChanged(); + return internalGetAnswerGenerationSpecFieldBuilder().getBuilder(); + } + + /** + * + * + *
            +     * Optional. The specification for answer generation.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AnswerGenerationSpec answer_generation_spec = 27 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.discoveryengine.v1beta.AnswerGenerationSpecOrBuilder + getAnswerGenerationSpecOrBuilder() { + if (answerGenerationSpecBuilder_ != null) { + return answerGenerationSpecBuilder_.getMessageOrBuilder(); + } else { + return answerGenerationSpec_ == null + ? com.google.cloud.discoveryengine.v1beta.AnswerGenerationSpec.getDefaultInstance() + : answerGenerationSpec_; + } + } + + /** + * + * + *
            +     * Optional. The specification for answer generation.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AnswerGenerationSpec answer_generation_spec = 27 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.AnswerGenerationSpec, + com.google.cloud.discoveryengine.v1beta.AnswerGenerationSpec.Builder, + com.google.cloud.discoveryengine.v1beta.AnswerGenerationSpecOrBuilder> + internalGetAnswerGenerationSpecFieldBuilder() { + if (answerGenerationSpecBuilder_ == null) { + answerGenerationSpecBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.AnswerGenerationSpec, + com.google.cloud.discoveryengine.v1beta.AnswerGenerationSpec.Builder, + com.google.cloud.discoveryengine.v1beta.AnswerGenerationSpecOrBuilder>( + getAnswerGenerationSpec(), getParentForChildren(), isClean()); + answerGenerationSpec_ = null; + } + return answerGenerationSpecBuilder_; + } + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.ServingConfig) } diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ServingConfigOrBuilder.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ServingConfigOrBuilder.java index 937a8cf5ccda..e997415881eb 100644 --- a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ServingConfigOrBuilder.java +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ServingConfigOrBuilder.java @@ -355,9 +355,8 @@ public interface ServingConfigOrBuilder * The ranking expression controls the customized ranking on retrieval * documents. To leverage this, document embedding is required. The ranking * expression setting in ServingConfig applies to all search requests served - * by the serving config. However, if - * [SearchRequest.ranking_expression][google.cloud.discoveryengine.v1beta.SearchRequest.ranking_expression] - * is specified, it overrides the ServingConfig ranking expression. + * by the serving config. However, if `SearchRequest.ranking_expression` is + * specified, it overrides the ServingConfig ranking expression. * * The ranking expression is a single function or multiple functions that are * joined by "+". @@ -397,9 +396,8 @@ public interface ServingConfigOrBuilder * The ranking expression controls the customized ranking on retrieval * documents. To leverage this, document embedding is required. The ranking * expression setting in ServingConfig applies to all search requests served - * by the serving config. However, if - * [SearchRequest.ranking_expression][google.cloud.discoveryengine.v1beta.SearchRequest.ranking_expression] - * is specified, it overrides the ServingConfig ranking expression. + * by the serving config. However, if `SearchRequest.ranking_expression` is + * specified, it overrides the ServingConfig ranking expression. * * The ranking expression is a single function or multiple functions that are * joined by "+". @@ -1116,6 +1114,68 @@ public interface ServingConfigOrBuilder */ com.google.protobuf.ByteString getIgnoreControlIdsBytes(int index); + /** + * + * + *
            +   * Condition promote specifications.
            +   *
            +   * Maximum number of specifications is 100.
            +   * 
            + * + * repeated string promote_control_ids = 26; + * + * @return A list containing the promoteControlIds. + */ + java.util.List getPromoteControlIdsList(); + + /** + * + * + *
            +   * Condition promote specifications.
            +   *
            +   * Maximum number of specifications is 100.
            +   * 
            + * + * repeated string promote_control_ids = 26; + * + * @return The count of promoteControlIds. + */ + int getPromoteControlIdsCount(); + + /** + * + * + *
            +   * Condition promote specifications.
            +   *
            +   * Maximum number of specifications is 100.
            +   * 
            + * + * repeated string promote_control_ids = 26; + * + * @param index The index of the element to return. + * @return The promoteControlIds at the given index. + */ + java.lang.String getPromoteControlIds(int index); + + /** + * + * + *
            +   * Condition promote specifications.
            +   *
            +   * Maximum number of specifications is 100.
            +   * 
            + * + * repeated string promote_control_ids = 26; + * + * @param index The index of the value to return. + * @return The bytes of the promoteControlIds at the given index. + */ + com.google.protobuf.ByteString getPromoteControlIdsBytes(int index); + /** * * @@ -1188,5 +1248,49 @@ public interface ServingConfigOrBuilder com.google.cloud.discoveryengine.v1beta.SearchRequest.PersonalizationSpecOrBuilder getPersonalizationSpecOrBuilder(); + /** + * + * + *
            +   * Optional. The specification for answer generation.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AnswerGenerationSpec answer_generation_spec = 27 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the answerGenerationSpec field is set. + */ + boolean hasAnswerGenerationSpec(); + + /** + * + * + *
            +   * Optional. The specification for answer generation.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AnswerGenerationSpec answer_generation_spec = 27 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The answerGenerationSpec. + */ + com.google.cloud.discoveryengine.v1beta.AnswerGenerationSpec getAnswerGenerationSpec(); + + /** + * + * + *
            +   * Optional. The specification for answer generation.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AnswerGenerationSpec answer_generation_spec = 27 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.discoveryengine.v1beta.AnswerGenerationSpecOrBuilder + getAnswerGenerationSpecOrBuilder(); + com.google.cloud.discoveryengine.v1beta.ServingConfig.VerticalConfigCase getVerticalConfigCase(); } diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ServingConfigProto.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ServingConfigProto.java index 629c608b41f3..8905045afcd8 100644 --- a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ServingConfigProto.java +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ServingConfigProto.java @@ -52,6 +52,14 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_discoveryengine_v1beta_ServingConfig_GenericConfig_descriptor; static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_cloud_discoveryengine_v1beta_ServingConfig_GenericConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1beta_AnswerGenerationSpec_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1beta_AnswerGenerationSpec_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1beta_AnswerGenerationSpec_UserDefinedClassifierSpec_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1beta_AnswerGenerationSpec_UserDefinedClassifierSpec_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { return descriptor; @@ -61,64 +69,77 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { static { java.lang.String[] descriptorData = { - "\n8google/cloud/discoveryengine/v1beta/se" - + "rving_config.proto\022#google.cloud.discove" + "\n" + + "8google/cloud/discoveryengine/v1beta/serving_config.proto\022#google.cloud.discove" + "ryengine.v1beta\032\037google/api/field_behavi" + "or.proto\032\031google/api/resource.proto\0320goo" - + "gle/cloud/discoveryengine/v1beta/common." - + "proto\0328google/cloud/discoveryengine/v1be" - + "ta/search_service.proto\032\037google/protobuf" - + "/timestamp.proto\"\245\r\n\rServingConfig\022V\n\014me" - + "dia_config\030\007 \001(\0132>.google.cloud.discover" - + "yengine.v1beta.ServingConfig.MediaConfig" - + "H\000\022Z\n\016generic_config\030\n \001(\0132@.google.clou" - + "d.discoveryengine.v1beta.ServingConfig.G" - + "enericConfigH\000\022\021\n\004name\030\001 \001(\tB\003\340A\005\022\031\n\014dis" - + "play_name\030\002 \001(\tB\003\340A\002\022P\n\rsolution_type\030\003 " - + "\001(\01621.google.cloud.discoveryengine.v1bet" - + "a.SolutionTypeB\006\340A\002\340A\005\022\020\n\010model_id\030\004 \001(\t" - + "\022\027\n\017diversity_level\030\005 \001(\t\022N\n\020embedding_c" - + "onfig\030\024 \001(\01324.google.cloud.discoveryengi" - + "ne.v1beta.EmbeddingConfig\022\032\n\022ranking_exp" - + "ression\030\025 \001(\t\0224\n\013create_time\030\010 \001(\0132\032.goo" - + "gle.protobuf.TimestampB\003\340A\003\0224\n\013update_ti" - + "me\030\t \001(\0132\032.google.protobuf.TimestampB\003\340A" - + "\003\022\032\n\022filter_control_ids\030\013 \003(\t\022\031\n\021boost_c" - + "ontrol_ids\030\014 \003(\t\022\034\n\024redirect_control_ids" - + "\030\016 \003(\t\022\034\n\024synonyms_control_ids\030\017 \003(\t\022#\n\033" - + "oneway_synonyms_control_ids\030\020 \003(\t\022\036\n\026dis" - + "sociate_control_ids\030\021 \003(\t\022\037\n\027replacement" - + "_control_ids\030\022 \003(\t\022\032\n\022ignore_control_ids" - + "\030\023 \003(\t\022d\n\024personalization_spec\030\031 \001(\0132F.g" - + "oogle.cloud.discoveryengine.v1beta.Searc" - + "hRequest.PersonalizationSpec\032\367\001\n\013MediaCo" - + "nfig\022.\n$content_watched_percentage_thres" - + "hold\030\002 \001(\002H\000\022+\n!content_watched_seconds_" - + "threshold\030\005 \001(\002H\000\022\033\n\023demotion_event_type" - + "\030\001 \001(\t\022-\n demote_content_watched_past_da" - + "ys\030% \001(\005B\003\340A\001\022%\n\035content_freshness_cutof" - + "f_days\030\004 \001(\005B\030\n\026demote_content_watched\032r" - + "\n\rGenericConfig\022a\n\023content_search_spec\030\001" - + " \001(\0132D.google.cloud.discoveryengine.v1be" - + "ta.SearchRequest.ContentSearchSpec:\200\003\352A\374" - + "\002\n,discoveryengine.googleapis.com/Servin" - + "gConfig\022_projects/{project}/locations/{l" - + "ocation}/dataStores/{data_store}/serving" - + "Configs/{serving_config}\022xprojects/{proj" - + "ect}/locations/{location}/collections/{c" - + "ollection}/dataStores/{data_store}/servi" - + "ngConfigs/{serving_config}\022qprojects/{pr" - + "oject}/locations/{location}/collections/" - + "{collection}/engines/{engine}/servingCon" - + "figs/{serving_config}B\021\n\017vertical_config" - + "B\231\002\n\'com.google.cloud.discoveryengine.v1" - + "betaB\022ServingConfigProtoP\001ZQcloud.google" - + ".com/go/discoveryengine/apiv1beta/discov" - + "eryenginepb;discoveryenginepb\242\002\017DISCOVER" - + "YENGINE\252\002#Google.Cloud.DiscoveryEngine.V" - + "1Beta\312\002#Google\\Cloud\\DiscoveryEngine\\V1b" - + "eta\352\002&Google::Cloud::DiscoveryEngine::V1" - + "betab\006proto3" + + "gle/cloud/discoveryengine/v1beta/common.proto\0328google/cloud/discoveryengine/v1be" + + "ta/search_service.proto\032\037google/protobuf/timestamp.proto\"\242\016\n\r" + + "ServingConfig\022V\n" + + "\014media_config\030\007 \001(\0132>.google.cloud.discover" + + "yengine.v1beta.ServingConfig.MediaConfigH\000\022Z\n" + + "\016generic_config\030\n" + + " \001(\0132@.google.clou" + + "d.discoveryengine.v1beta.ServingConfig.GenericConfigH\000\022\021\n" + + "\004name\030\001 \001(\tB\003\340A\005\022\031\n" + + "\014display_name\030\002 \001(\tB\003\340A\002\022P\n\r" + + "solution_type\030\003 " + + "\001(\01621.google.cloud.discoveryengine.v1beta.SolutionTypeB\006\340A\002\340A\005\022\020\n" + + "\010model_id\030\004 \001(\t\022\027\n" + + "\017diversity_level\030\005 \001(\t\022N\n" + + "\020embedding_config\030\024" + + " \001(\01324.google.cloud.discoveryengine.v1beta.EmbeddingConfig\022\032\n" + + "\022ranking_expression\030\025 \001(\t\0224\n" + + "\013create_time\030\010 \001(\0132\032.google.protobuf.TimestampB\003\340A\003\0224\n" + + "\013update_time\030\t \001(\0132\032.google.protobuf.TimestampB\003\340A\003\022\032\n" + + "\022filter_control_ids\030\013 \003(\t\022\031\n" + + "\021boost_control_ids\030\014 \003(\t\022\034\n" + + "\024redirect_control_ids\030\016 \003(\t\022\034\n" + + "\024synonyms_control_ids\030\017 \003(\t\022#\n" + + "\033oneway_synonyms_control_ids\030\020 \003(\t\022\036\n" + + "\026dissociate_control_ids\030\021 \003(\t\022\037\n" + + "\027replacement_control_ids\030\022 \003(\t\022\032\n" + + "\022ignore_control_ids\030\023 \003(\t\022\033\n" + + "\023promote_control_ids\030\032 \003(\t\022d\n" + + "\024personalization_spec\030\031 \001(\0132F.google.cloud" + + ".discoveryengine.v1beta.SearchRequest.PersonalizationSpec\022^\n" + + "\026answer_generation_spec\030\033" + + " \001(\01329.google.cloud.discoveryengine.v1beta.AnswerGenerationSpecB\003\340A\001\032\367\001\n" + + "\013MediaConfig\022.\n" + + "$content_watched_percentage_threshold\030\002 \001(\002H\000\022+\n" + + "!content_watched_seconds_threshold\030\005 \001(\002H\000\022\033\n" + + "\023demotion_event_type\030\001 \001(\t\022-\n" + + " demote_content_watched_past_days\030% \001(\005B\003\340A\001\022%\n" + + "\035content_freshness_cutoff_days\030\004 \001(\005B\030\n" + + "\026demote_content_watched\032r\n\r" + + "GenericConfig\022a\n" + + "\023content_search_spec\030\001 \001(\0132D.google.cloud.discoveryengine" + + ".v1beta.SearchRequest.ContentSearchSpec:\200\003\352A\374\002\n" + + ",discoveryengine.googleapis.com/ServingConfig\022_projects/{project}/locatio" + + "ns/{location}/dataStores/{data_store}/servingConfigs/{serving_config}\022xprojects/" + + "{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/" + + "servingConfigs/{serving_config}\022qprojects/{project}/locations/{location}/collect" + + "ions/{collection}/engines/{engine}/servingConfigs/{serving_config}B\021\n" + + "\017vertical_config\"\376\002\n" + + "\024AnswerGenerationSpec\022~\n" + + "\034user_defined_classifier_spec\030\001 \001(\0132S.google.cl" + + "oud.discoveryengine.v1beta.AnswerGenerat" + + "ionSpec.UserDefinedClassifierSpecB\003\340A\001\032\345\001\n" + + "\031UserDefinedClassifierSpec\022+\n" + + "\036enable_user_defined_classifier\030\001 \001(\010B\003\340A\001\022\025\n" + + "\010preamble\030\002 \001(\tB\003\340A\001\022\025\n" + + "\010model_id\030\003 \001(\tB\003\340A\001\022\030\n" + + "\013task_marker\030\004 \001(\tB\003\340A\001\022\022\n" + + "\005top_p\030\005 \001(\001B\003\340A\001\022\022\n" + + "\005top_k\030\006 \001(\003B\003\340A\001\022\030\n" + + "\013temperature\030\007 \001(\001B\003\340A\001\022\021\n" + + "\004seed\030\010 \001(\005B\003\340A\001B\231\002\n" + + "\'com.google.cloud.discoveryengine.v1betaB\022Serv" + + "ingConfigProtoP\001ZQcloud.google.com/go/discoveryengine/apiv1beta/discoveryenginep" + + "b;discoveryenginepb\242\002\017DISCOVERYENGINE\252\002#" + + "Google.Cloud.DiscoveryEngine.V1Beta\312\002#Go" + + "ogle\\Cloud\\DiscoveryEngine\\V1beta\352\002&Goog" + + "le::Cloud::DiscoveryEngine::V1betab\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -155,7 +176,9 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "DissociateControlIds", "ReplacementControlIds", "IgnoreControlIds", + "PromoteControlIds", "PersonalizationSpec", + "AnswerGenerationSpec", "VerticalConfig", }); internal_static_google_cloud_discoveryengine_v1beta_ServingConfig_MediaConfig_descriptor = @@ -181,6 +204,30 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "ContentSearchSpec", }); + internal_static_google_cloud_discoveryengine_v1beta_AnswerGenerationSpec_descriptor = + getDescriptor().getMessageType(1); + internal_static_google_cloud_discoveryengine_v1beta_AnswerGenerationSpec_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1beta_AnswerGenerationSpec_descriptor, + new java.lang.String[] { + "UserDefinedClassifierSpec", + }); + internal_static_google_cloud_discoveryengine_v1beta_AnswerGenerationSpec_UserDefinedClassifierSpec_descriptor = + internal_static_google_cloud_discoveryengine_v1beta_AnswerGenerationSpec_descriptor + .getNestedType(0); + internal_static_google_cloud_discoveryengine_v1beta_AnswerGenerationSpec_UserDefinedClassifierSpec_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1beta_AnswerGenerationSpec_UserDefinedClassifierSpec_descriptor, + new java.lang.String[] { + "EnableUserDefinedClassifier", + "Preamble", + "ModelId", + "TaskMarker", + "TopP", + "TopK", + "Temperature", + "Seed", + }); descriptor.resolveAllFeaturesImmutable(); com.google.api.FieldBehaviorProto.getDescriptor(); com.google.api.ResourceProto.getDescriptor(); diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ServingConfigServiceProto.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ServingConfigServiceProto.java index 0a794e5da91f..93e2b3b5acd6 100644 --- a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ServingConfigServiceProto.java +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/ServingConfigServiceProto.java @@ -40,10 +40,18 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1beta_CreateServingConfigRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1beta_CreateServingConfigRequest_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_discoveryengine_v1beta_UpdateServingConfigRequest_descriptor; static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_cloud_discoveryengine_v1beta_UpdateServingConfigRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1beta_DeleteServingConfigRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1beta_DeleteServingConfigRequest_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_discoveryengine_v1beta_GetServingConfigRequest_descriptor; static final com.google.protobuf.GeneratedMessage.FieldAccessorTable @@ -65,59 +73,103 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { static { java.lang.String[] descriptorData = { - "\n" - + "@google/cloud/discoveryengine/v1beta/serving_config_service.proto\022#google.cloud" + "\n@google/cloud/discoveryengine/v1beta/se" + + "rving_config_service.proto\022#google.cloud" + ".discoveryengine.v1beta\032\034google/api/anno" + "tations.proto\032\027google/api/client.proto\032\037" + "google/api/field_behavior.proto\032\031google/" - + "api/resource.proto\0328google/cloud/discoveryengine/v1beta/serving_config.proto\032" - + " google/protobuf/field_mask.proto\"\236\001\n" - + "\032UpdateServingConfigRequest\022O\n" - + "\016serving_config\030\001" - + " \001(\01322.google.cloud.discoveryengine.v1beta.ServingConfigB\003\340A\002\022/\n" - + "\013update_mask\030\002 \001(\0132\032.google.protobuf.FieldMask\"]\n" - + "\027GetServingConfigRequest\022B\n" - + "\004name\030\001 \001(\tB4\340A\002\372A.\n" - + ",discoveryengine.googleapis.com/ServingConfig\"\222\001\n" - + "\031ListServingConfigsRequest\022D\n" - + "\006parent\030\001 \001(" - + "\tB4\340A\002\372A.\022,discoveryengine.googleapis.com/ServingConfig\022\026\n" - + "\tpage_size\030\002 \001(\005B\003\340A\001\022\027\n\n" - + "page_token\030\003 \001(\tB\003\340A\001\"\202\001\n" - + "\032ListServingConfigsResponse\022K\n" - + "\017serving_configs\030\001" - + " \003(\01322.google.cloud.discoveryengine.v1beta.ServingConfig\022\027\n" - + "\017next_page_token\030\002 \001(\t2\202\013\n" - + "\024ServingConfigService\022\372\003\n" - + "\023UpdateServingConfig\022?.google.cloud.discove" - + "ryengine.v1beta.UpdateServingConfigRequest\0322.google.cloud.discoveryengine.v1beta" - + ".ServingConfig\"\355\002\332A\032serving_config,updat" - + "e_mask\202\323\344\223\002\311\0022R/v1beta/{serving_config.n" - + "ame=projects/*/locations/*/dataStores/*/servingConfigs/*}:\016serving_configZr2`/v1" - + "beta/{serving_config.name=projects/*/locations/*/collections/*/dataStores/*/serv" - + "ingConfigs/*}:\016serving_configZo2]/v1beta/{serving_config.name=projects/*/locatio" - + "ns/*/collections/*/engines/*/servingConfigs/*}:\016serving_config\022\201\003\n" - + "\020GetServingConfig\022<.google.cloud.discoveryengine.v1bet" - + "a.GetServingConfigRequest\0322.google.cloud" - + ".discoveryengine.v1beta.ServingConfig\"\372\001" - + "\332A\004name\202\323\344\223\002\354\001\022C/v1beta/{name=projects/*" - + "/locations/*/dataStores/*/servingConfigs/*}ZS\022Q/v1beta/{name=projects/*/location" - + "s/*/collections/*/dataStores/*/servingConfigs/*}ZP\022N/v1beta/{name=projects/*/loc" - + "ations/*/collections/*/engines/*/servingConfigs/*}\022\224\003\n" - + "\022ListServingConfigs\022>.google.cloud.discoveryengine.v1beta.ListServ" - + "ingConfigsRequest\032?.google.cloud.discoveryengine.v1beta.ListServingConfigsRespon" - + "se\"\374\001\332A\006parent\202\323\344\223\002\354\001\022C/v1beta/{parent=p" - + "rojects/*/locations/*/dataStores/*}/servingConfigsZS\022Q/v1beta/{parent=projects/*" - + "/locations/*/collections/*/dataStores/*}/servingConfigsZP\022N/v1beta/{parent=proje" - + "cts/*/locations/*/collections/*/engines/" - + "*}/servingConfigs\032R\312A\036discoveryengine.go" - + "ogleapis.com\322A.https://www.googleapis.com/auth/cloud-platformB\240\002\n" - + "\'com.google.cloud.discoveryengine.v1betaB\031ServingConfig" - + "ServiceProtoP\001ZQcloud.google.com/go/discoveryengine/apiv1beta/discoveryenginepb;" - + "discoveryenginepb\242\002\017DISCOVERYENGINE\252\002#Go" - + "ogle.Cloud.DiscoveryEngine.V1Beta\312\002#Goog" - + "le\\Cloud\\DiscoveryEngine\\V1beta\352\002&Google" - + "::Cloud::DiscoveryEngine::V1betab\006proto3" + + "api/resource.proto\0328google/cloud/discove" + + "ryengine/v1beta/serving_config.proto\032\033go" + + "ogle/protobuf/empty.proto\032 google/protob" + + "uf/field_mask.proto\"\323\001\n\032CreateServingCon" + + "figRequest\022D\n\006parent\030\001 \001(\tB4\340A\002\372A.\022,disc" + + "overyengine.googleapis.com/ServingConfig" + + "\022O\n\016serving_config\030\002 \001(\01322.google.cloud." + + "discoveryengine.v1beta.ServingConfigB\003\340A" + + "\002\022\036\n\021serving_config_id\030\003 \001(\tB\003\340A\002\"\236\001\n\032Up" + + "dateServingConfigRequest\022O\n\016serving_conf" + + "ig\030\001 \001(\01322.google.cloud.discoveryengine." + + "v1beta.ServingConfigB\003\340A\002\022/\n\013update_mask" + + "\030\002 \001(\0132\032.google.protobuf.FieldMask\"`\n\032De" + + "leteServingConfigRequest\022B\n\004name\030\001 \001(\tB4" + + "\340A\002\372A.\n,discoveryengine.googleapis.com/S" + + "ervingConfig\"]\n\027GetServingConfigRequest\022" + + "B\n\004name\030\001 \001(\tB4\340A\002\372A.\n,discoveryengine.g" + + "oogleapis.com/ServingConfig\"\222\001\n\031ListServ" + + "ingConfigsRequest\022D\n\006parent\030\001 \001(\tB4\340A\002\372A" + + ".\022,discoveryengine.googleapis.com/Servin" + + "gConfig\022\026\n\tpage_size\030\002 \001(\005B\003\340A\001\022\027\n\npage_" + + "token\030\003 \001(\tB\003\340A\001\"\202\001\n\032ListServingConfigsR" + + "esponse\022K\n\017serving_configs\030\001 \003(\01322.googl" + + "e.cloud.discoveryengine.v1beta.ServingCo" + + "nfig\022\027\n\017next_page_token\030\002 \001(\t2\313\022\n\024Servin" + + "gConfigService\022\332\003\n\023CreateServingConfig\022?" + + ".google.cloud.discoveryengine.v1beta.Cre" + + "ateServingConfigRequest\0322.google.cloud.d" + + "iscoveryengine.v1beta.ServingConfig\"\315\002\332A" + + "\'parent,serving_config,serving_config_id" + + "\202\323\344\223\002\234\002\"C/v1beta/{parent=projects/*/loca" + + "tions/*/dataStores/*}/servingConfigs:\016se" + + "rving_configZc\"Q/v1beta/{parent=projects" + + "/*/locations/*/collections/*/dataStores/" + + "*}/servingConfigs:\016serving_configZ`\"N/v1" + + "beta/{parent=projects/*/locations/*/coll" + + "ections/*/engines/*}/servingConfigs:\016ser" + + "ving_config\022\353\002\n\023DeleteServingConfig\022?.go" + + "ogle.cloud.discoveryengine.v1beta.Delete" + + "ServingConfigRequest\032\026.google.protobuf.E" + + "mpty\"\372\001\332A\004name\202\323\344\223\002\354\001*C/v1beta/{name=pro" + + "jects/*/locations/*/dataStores/*/serving" + + "Configs/*}ZS*Q/v1beta/{name=projects/*/l" + + "ocations/*/collections/*/dataStores/*/se" + + "rvingConfigs/*}ZP*N/v1beta/{name=project" + + "s/*/locations/*/collections/*/engines/*/" + + "servingConfigs/*}\022\372\003\n\023UpdateServingConfi" + + "g\022?.google.cloud.discoveryengine.v1beta." + + "UpdateServingConfigRequest\0322.google.clou" + + "d.discoveryengine.v1beta.ServingConfig\"\355" + + "\002\332A\032serving_config,update_mask\202\323\344\223\002\311\0022R/" + + "v1beta/{serving_config.name=projects/*/l" + + "ocations/*/dataStores/*/servingConfigs/*" + + "}:\016serving_configZr2`/v1beta/{serving_co" + + "nfig.name=projects/*/locations/*/collect" + + "ions/*/dataStores/*/servingConfigs/*}:\016s" + + "erving_configZo2]/v1beta/{serving_config" + + ".name=projects/*/locations/*/collections" + + "/*/engines/*/servingConfigs/*}:\016serving_" + + "config\022\201\003\n\020GetServingConfig\022<.google.clo" + + "ud.discoveryengine.v1beta.GetServingConf" + + "igRequest\0322.google.cloud.discoveryengine" + + ".v1beta.ServingConfig\"\372\001\332A\004name\202\323\344\223\002\354\001\022C" + + "/v1beta/{name=projects/*/locations/*/dat" + + "aStores/*/servingConfigs/*}ZS\022Q/v1beta/{" + + "name=projects/*/locations/*/collections/" + + "*/dataStores/*/servingConfigs/*}ZP\022N/v1b" + + "eta/{name=projects/*/locations/*/collect" + + "ions/*/engines/*/servingConfigs/*}\022\224\003\n\022L" + + "istServingConfigs\022>.google.cloud.discove" + + "ryengine.v1beta.ListServingConfigsReques" + + "t\032?.google.cloud.discoveryengine.v1beta." + + "ListServingConfigsResponse\"\374\001\332A\006parent\202\323" + + "\344\223\002\354\001\022C/v1beta/{parent=projects/*/locati" + + "ons/*/dataStores/*}/servingConfigsZS\022Q/v" + + "1beta/{parent=projects/*/locations/*/col" + + "lections/*/dataStores/*}/servingConfigsZ" + + "P\022N/v1beta/{parent=projects/*/locations/" + + "*/collections/*/engines/*}/servingConfig" + + "s\032\317\001\312A\036discoveryengine.googleapis.com\322A\252" + + "\001https://www.googleapis.com/auth/cloud-p" + + "latform,https://www.googleapis.com/auth/" + + "discoveryengine.readwrite,https://www.go" + + "ogleapis.com/auth/discoveryengine.servin" + + "g.readwriteB\240\002\n\'com.google.cloud.discove" + + "ryengine.v1betaB\031ServingConfigServicePro" + + "toP\001ZQcloud.google.com/go/discoveryengin" + + "e/apiv1beta/discoveryenginepb;discoverye" + + "nginepb\242\002\017DISCOVERYENGINE\252\002#Google.Cloud" + + ".DiscoveryEngine.V1Beta\312\002#Google\\Cloud\\D" + + "iscoveryEngine\\V1beta\352\002&Google::Cloud::D" + + "iscoveryEngine::V1betab\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -128,18 +180,35 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.api.FieldBehaviorProto.getDescriptor(), com.google.api.ResourceProto.getDescriptor(), com.google.cloud.discoveryengine.v1beta.ServingConfigProto.getDescriptor(), + com.google.protobuf.EmptyProto.getDescriptor(), com.google.protobuf.FieldMaskProto.getDescriptor(), }); - internal_static_google_cloud_discoveryengine_v1beta_UpdateServingConfigRequest_descriptor = + internal_static_google_cloud_discoveryengine_v1beta_CreateServingConfigRequest_descriptor = getDescriptor().getMessageType(0); + internal_static_google_cloud_discoveryengine_v1beta_CreateServingConfigRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1beta_CreateServingConfigRequest_descriptor, + new java.lang.String[] { + "Parent", "ServingConfig", "ServingConfigId", + }); + internal_static_google_cloud_discoveryengine_v1beta_UpdateServingConfigRequest_descriptor = + getDescriptor().getMessageType(1); internal_static_google_cloud_discoveryengine_v1beta_UpdateServingConfigRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_cloud_discoveryengine_v1beta_UpdateServingConfigRequest_descriptor, new java.lang.String[] { "ServingConfig", "UpdateMask", }); + internal_static_google_cloud_discoveryengine_v1beta_DeleteServingConfigRequest_descriptor = + getDescriptor().getMessageType(2); + internal_static_google_cloud_discoveryengine_v1beta_DeleteServingConfigRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1beta_DeleteServingConfigRequest_descriptor, + new java.lang.String[] { + "Name", + }); internal_static_google_cloud_discoveryengine_v1beta_GetServingConfigRequest_descriptor = - getDescriptor().getMessageType(1); + getDescriptor().getMessageType(3); internal_static_google_cloud_discoveryengine_v1beta_GetServingConfigRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_cloud_discoveryengine_v1beta_GetServingConfigRequest_descriptor, @@ -147,7 +216,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", }); internal_static_google_cloud_discoveryengine_v1beta_ListServingConfigsRequest_descriptor = - getDescriptor().getMessageType(2); + getDescriptor().getMessageType(4); internal_static_google_cloud_discoveryengine_v1beta_ListServingConfigsRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_cloud_discoveryengine_v1beta_ListServingConfigsRequest_descriptor, @@ -155,7 +224,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Parent", "PageSize", "PageToken", }); internal_static_google_cloud_discoveryengine_v1beta_ListServingConfigsResponse_descriptor = - getDescriptor().getMessageType(3); + getDescriptor().getMessageType(5); internal_static_google_cloud_discoveryengine_v1beta_ListServingConfigsResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_cloud_discoveryengine_v1beta_ListServingConfigsResponse_descriptor, @@ -168,6 +237,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.api.FieldBehaviorProto.getDescriptor(); com.google.api.ResourceProto.getDescriptor(); com.google.cloud.discoveryengine.v1beta.ServingConfigProto.getDescriptor(); + com.google.protobuf.EmptyProto.getDescriptor(); com.google.protobuf.FieldMaskProto.getDescriptor(); com.google.protobuf.ExtensionRegistry registry = com.google.protobuf.ExtensionRegistry.newInstance(); diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/Session.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/Session.java index c2f8769481e6..27152649083e 100644 --- a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/Session.java +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/Session.java @@ -57,6 +57,8 @@ private Session() { state_ = 0; userPseudoId_ = ""; turns_ = java.util.Collections.emptyList(); + labels_ = com.google.protobuf.LazyStringArrayList.emptyList(); + pendingAsyncAssistOperationId_ = ""; } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @@ -365,6 +367,65 @@ public interface TurnOrBuilder */ com.google.cloud.discoveryengine.v1beta.AnswerOrBuilder getDetailedAnswerOrBuilder(); + /** + * + * + *
            +     * Output only. In
            +     * [ConversationalSearchService.GetSession][google.cloud.discoveryengine.v1beta.ConversationalSearchService.GetSession]
            +     * API, if
            +     * [GetSessionRequest.include_answer_details][google.cloud.discoveryengine.v1beta.GetSessionRequest.include_answer_details]
            +     * is set to true, this field will be populated when getting assistant
            +     * session.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AssistAnswer detailed_assist_answer = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the detailedAssistAnswer field is set. + */ + boolean hasDetailedAssistAnswer(); + + /** + * + * + *
            +     * Output only. In
            +     * [ConversationalSearchService.GetSession][google.cloud.discoveryengine.v1beta.ConversationalSearchService.GetSession]
            +     * API, if
            +     * [GetSessionRequest.include_answer_details][google.cloud.discoveryengine.v1beta.GetSessionRequest.include_answer_details]
            +     * is set to true, this field will be populated when getting assistant
            +     * session.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AssistAnswer detailed_assist_answer = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The detailedAssistAnswer. + */ + com.google.cloud.discoveryengine.v1beta.AssistAnswer getDetailedAssistAnswer(); + + /** + * + * + *
            +     * Output only. In
            +     * [ConversationalSearchService.GetSession][google.cloud.discoveryengine.v1beta.ConversationalSearchService.GetSession]
            +     * API, if
            +     * [GetSessionRequest.include_answer_details][google.cloud.discoveryengine.v1beta.GetSessionRequest.include_answer_details]
            +     * is set to true, this field will be populated when getting assistant
            +     * session.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AssistAnswer detailed_assist_answer = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.discoveryengine.v1beta.AssistAnswerOrBuilder + getDetailedAssistAnswerOrBuilder(); + /** * * @@ -447,6 +508,19 @@ java.lang.String getQueryConfigOrDefault( * */ java.lang.String getQueryConfigOrThrow(java.lang.String key); + + /** + * + * + *
            +     * Optional. Indicates whether this turn is a live turn.
            +     * 
            + * + * bool live = 20 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The live. + */ + boolean getLive(); } /** @@ -711,6 +785,81 @@ public com.google.cloud.discoveryengine.v1beta.AnswerOrBuilder getDetailedAnswer : detailedAnswer_; } + public static final int DETAILED_ASSIST_ANSWER_FIELD_NUMBER = 8; + private com.google.cloud.discoveryengine.v1beta.AssistAnswer detailedAssistAnswer_; + + /** + * + * + *
            +     * Output only. In
            +     * [ConversationalSearchService.GetSession][google.cloud.discoveryengine.v1beta.ConversationalSearchService.GetSession]
            +     * API, if
            +     * [GetSessionRequest.include_answer_details][google.cloud.discoveryengine.v1beta.GetSessionRequest.include_answer_details]
            +     * is set to true, this field will be populated when getting assistant
            +     * session.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AssistAnswer detailed_assist_answer = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the detailedAssistAnswer field is set. + */ + @java.lang.Override + public boolean hasDetailedAssistAnswer() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
            +     * Output only. In
            +     * [ConversationalSearchService.GetSession][google.cloud.discoveryengine.v1beta.ConversationalSearchService.GetSession]
            +     * API, if
            +     * [GetSessionRequest.include_answer_details][google.cloud.discoveryengine.v1beta.GetSessionRequest.include_answer_details]
            +     * is set to true, this field will be populated when getting assistant
            +     * session.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AssistAnswer detailed_assist_answer = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The detailedAssistAnswer. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AssistAnswer getDetailedAssistAnswer() { + return detailedAssistAnswer_ == null + ? com.google.cloud.discoveryengine.v1beta.AssistAnswer.getDefaultInstance() + : detailedAssistAnswer_; + } + + /** + * + * + *
            +     * Output only. In
            +     * [ConversationalSearchService.GetSession][google.cloud.discoveryengine.v1beta.ConversationalSearchService.GetSession]
            +     * API, if
            +     * [GetSessionRequest.include_answer_details][google.cloud.discoveryengine.v1beta.GetSessionRequest.include_answer_details]
            +     * is set to true, this field will be populated when getting assistant
            +     * session.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AssistAnswer detailed_assist_answer = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AssistAnswerOrBuilder + getDetailedAssistAnswerOrBuilder() { + return detailedAssistAnswer_ == null + ? com.google.cloud.discoveryengine.v1beta.AssistAnswer.getDefaultInstance() + : detailedAssistAnswer_; + } + public static final int QUERY_CONFIG_FIELD_NUMBER = 16; private static final class QueryConfigDefaultEntryHolder { @@ -836,6 +985,25 @@ public java.lang.String getQueryConfigOrThrow(java.lang.String key) { return map.get(key); } + public static final int LIVE_FIELD_NUMBER = 20; + private boolean live_ = false; + + /** + * + * + *
            +     * Optional. Indicates whether this turn is a live turn.
            +     * 
            + * + * bool live = 20 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The live. + */ + @java.lang.Override + public boolean getLive() { + return live_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -859,8 +1027,14 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000002) != 0)) { output.writeMessage(7, getDetailedAnswer()); } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeMessage(8, getDetailedAssistAnswer()); + } com.google.protobuf.GeneratedMessage.serializeStringMapTo( output, internalGetQueryConfig(), QueryConfigDefaultEntryHolder.defaultEntry, 16); + if (live_ != false) { + output.writeBool(20, live_); + } getUnknownFields().writeTo(output); } @@ -879,6 +1053,10 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000002) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getDetailedAnswer()); } + if (((bitField0_ & 0x00000004) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(8, getDetailedAssistAnswer()); + } for (java.util.Map.Entry entry : internalGetQueryConfig().getMap().entrySet()) { com.google.protobuf.MapEntry queryConfig__ = @@ -889,6 +1067,9 @@ public int getSerializedSize() { .build(); size += com.google.protobuf.CodedOutputStream.computeMessageSize(16, queryConfig__); } + if (live_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(20, live_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -914,7 +1095,12 @@ public boolean equals(final java.lang.Object obj) { if (hasDetailedAnswer()) { if (!getDetailedAnswer().equals(other.getDetailedAnswer())) return false; } + if (hasDetailedAssistAnswer() != other.hasDetailedAssistAnswer()) return false; + if (hasDetailedAssistAnswer()) { + if (!getDetailedAssistAnswer().equals(other.getDetailedAssistAnswer())) return false; + } if (!internalGetQueryConfig().equals(other.internalGetQueryConfig())) return false; + if (getLive() != other.getLive()) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -936,10 +1122,16 @@ public int hashCode() { hash = (37 * hash) + DETAILED_ANSWER_FIELD_NUMBER; hash = (53 * hash) + getDetailedAnswer().hashCode(); } + if (hasDetailedAssistAnswer()) { + hash = (37 * hash) + DETAILED_ASSIST_ANSWER_FIELD_NUMBER; + hash = (53 * hash) + getDetailedAssistAnswer().hashCode(); + } if (!internalGetQueryConfig().getMap().isEmpty()) { hash = (37 * hash) + QUERY_CONFIG_FIELD_NUMBER; hash = (53 * hash) + internalGetQueryConfig().hashCode(); } + hash = (37 * hash) + LIVE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getLive()); hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -1107,6 +1299,7 @@ private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { internalGetQueryFieldBuilder(); internalGetDetailedAnswerFieldBuilder(); + internalGetDetailedAssistAnswerFieldBuilder(); } } @@ -1125,7 +1318,13 @@ public Builder clear() { detailedAnswerBuilder_.dispose(); detailedAnswerBuilder_ = null; } + detailedAssistAnswer_ = null; + if (detailedAssistAnswerBuilder_ != null) { + detailedAssistAnswerBuilder_.dispose(); + detailedAssistAnswerBuilder_ = null; + } internalGetMutableQueryConfig().clear(); + live_ = false; return this; } @@ -1176,9 +1375,19 @@ private void buildPartial0(com.google.cloud.discoveryengine.v1beta.Session.Turn to_bitField0_ |= 0x00000002; } if (((from_bitField0_ & 0x00000008) != 0)) { + result.detailedAssistAnswer_ = + detailedAssistAnswerBuilder_ == null + ? detailedAssistAnswer_ + : detailedAssistAnswerBuilder_.build(); + to_bitField0_ |= 0x00000004; + } + if (((from_bitField0_ & 0x00000010) != 0)) { result.queryConfig_ = internalGetQueryConfig(); result.queryConfig_.makeImmutable(); } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.live_ = live_; + } result.bitField0_ |= to_bitField0_; } @@ -1206,8 +1415,14 @@ public Builder mergeFrom(com.google.cloud.discoveryengine.v1beta.Session.Turn ot if (other.hasDetailedAnswer()) { mergeDetailedAnswer(other.getDetailedAnswer()); } + if (other.hasDetailedAssistAnswer()) { + mergeDetailedAssistAnswer(other.getDetailedAssistAnswer()); + } internalGetMutableQueryConfig().mergeFrom(other.internalGetQueryConfig()); - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000010; + if (other.getLive() != false) { + setLive(other.getLive()); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -1253,6 +1468,14 @@ public Builder mergeFrom( bitField0_ |= 0x00000004; break; } // case 58 + case 66: + { + input.readMessage( + internalGetDetailedAssistAnswerFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 66 case 130: { com.google.protobuf.MapEntry queryConfig__ = @@ -1262,9 +1485,15 @@ public Builder mergeFrom( internalGetMutableQueryConfig() .getMutableMap() .put(queryConfig__.getKey(), queryConfig__.getValue()); - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000010; break; } // case 130 + case 160: + { + live_ = input.readBool(); + bitField0_ |= 0x00000020; + break; + } // case 160 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -1901,137 +2130,400 @@ public com.google.cloud.discoveryengine.v1beta.AnswerOrBuilder getDetailedAnswer return detailedAnswerBuilder_; } - private com.google.protobuf.MapField queryConfig_; - - private com.google.protobuf.MapField - internalGetQueryConfig() { - if (queryConfig_ == null) { - return com.google.protobuf.MapField.emptyMapField( - QueryConfigDefaultEntryHolder.defaultEntry); - } - return queryConfig_; - } - - private com.google.protobuf.MapField - internalGetMutableQueryConfig() { - if (queryConfig_ == null) { - queryConfig_ = - com.google.protobuf.MapField.newMapField(QueryConfigDefaultEntryHolder.defaultEntry); - } - if (!queryConfig_.isMutable()) { - queryConfig_ = queryConfig_.copy(); - } - bitField0_ |= 0x00000008; - onChanged(); - return queryConfig_; - } - - public int getQueryConfigCount() { - return internalGetQueryConfig().getMap().size(); - } + private com.google.cloud.discoveryengine.v1beta.AssistAnswer detailedAssistAnswer_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.AssistAnswer, + com.google.cloud.discoveryengine.v1beta.AssistAnswer.Builder, + com.google.cloud.discoveryengine.v1beta.AssistAnswerOrBuilder> + detailedAssistAnswerBuilder_; /** * * *
            -       * Optional. Represents metadata related to the query config, for example
            -       * LLM model and version used, model parameters (temperature, grounding
            -       * parameters, etc.). The prefix "google." is reserved for Google-developed
            -       * functionality.
            +       * Output only. In
            +       * [ConversationalSearchService.GetSession][google.cloud.discoveryengine.v1beta.ConversationalSearchService.GetSession]
            +       * API, if
            +       * [GetSessionRequest.include_answer_details][google.cloud.discoveryengine.v1beta.GetSessionRequest.include_answer_details]
            +       * is set to true, this field will be populated when getting assistant
            +       * session.
                    * 
            * * - * map<string, string> query_config = 16 [(.google.api.field_behavior) = OPTIONAL]; + * .google.cloud.discoveryengine.v1beta.AssistAnswer detailed_assist_answer = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; * + * + * @return Whether the detailedAssistAnswer field is set. */ - @java.lang.Override - public boolean containsQueryConfig(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - return internalGetQueryConfig().getMap().containsKey(key); - } - - /** Use {@link #getQueryConfigMap()} instead. */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getQueryConfig() { - return getQueryConfigMap(); + public boolean hasDetailedAssistAnswer() { + return ((bitField0_ & 0x00000008) != 0); } /** * * *
            -       * Optional. Represents metadata related to the query config, for example
            -       * LLM model and version used, model parameters (temperature, grounding
            -       * parameters, etc.). The prefix "google." is reserved for Google-developed
            -       * functionality.
            +       * Output only. In
            +       * [ConversationalSearchService.GetSession][google.cloud.discoveryengine.v1beta.ConversationalSearchService.GetSession]
            +       * API, if
            +       * [GetSessionRequest.include_answer_details][google.cloud.discoveryengine.v1beta.GetSessionRequest.include_answer_details]
            +       * is set to true, this field will be populated when getting assistant
            +       * session.
                    * 
            * * - * map<string, string> query_config = 16 [(.google.api.field_behavior) = OPTIONAL]; + * .google.cloud.discoveryengine.v1beta.AssistAnswer detailed_assist_answer = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; * + * + * @return The detailedAssistAnswer. */ - @java.lang.Override - public java.util.Map getQueryConfigMap() { - return internalGetQueryConfig().getMap(); + public com.google.cloud.discoveryengine.v1beta.AssistAnswer getDetailedAssistAnswer() { + if (detailedAssistAnswerBuilder_ == null) { + return detailedAssistAnswer_ == null + ? com.google.cloud.discoveryengine.v1beta.AssistAnswer.getDefaultInstance() + : detailedAssistAnswer_; + } else { + return detailedAssistAnswerBuilder_.getMessage(); + } } /** * * *
            -       * Optional. Represents metadata related to the query config, for example
            -       * LLM model and version used, model parameters (temperature, grounding
            -       * parameters, etc.). The prefix "google." is reserved for Google-developed
            -       * functionality.
            +       * Output only. In
            +       * [ConversationalSearchService.GetSession][google.cloud.discoveryengine.v1beta.ConversationalSearchService.GetSession]
            +       * API, if
            +       * [GetSessionRequest.include_answer_details][google.cloud.discoveryengine.v1beta.GetSessionRequest.include_answer_details]
            +       * is set to true, this field will be populated when getting assistant
            +       * session.
                    * 
            * * - * map<string, string> query_config = 16 [(.google.api.field_behavior) = OPTIONAL]; + * .google.cloud.discoveryengine.v1beta.AssistAnswer detailed_assist_answer = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ - @java.lang.Override - public /* nullable */ java.lang.String getQueryConfigOrDefault( - java.lang.String key, - /* nullable */ - java.lang.String defaultValue) { - if (key == null) { - throw new NullPointerException("map key"); + public Builder setDetailedAssistAnswer( + com.google.cloud.discoveryengine.v1beta.AssistAnswer value) { + if (detailedAssistAnswerBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + detailedAssistAnswer_ = value; + } else { + detailedAssistAnswerBuilder_.setMessage(value); } - java.util.Map map = internalGetQueryConfig().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; + bitField0_ |= 0x00000008; + onChanged(); + return this; } /** * * *
            -       * Optional. Represents metadata related to the query config, for example
            -       * LLM model and version used, model parameters (temperature, grounding
            -       * parameters, etc.). The prefix "google." is reserved for Google-developed
            -       * functionality.
            +       * Output only. In
            +       * [ConversationalSearchService.GetSession][google.cloud.discoveryengine.v1beta.ConversationalSearchService.GetSession]
            +       * API, if
            +       * [GetSessionRequest.include_answer_details][google.cloud.discoveryengine.v1beta.GetSessionRequest.include_answer_details]
            +       * is set to true, this field will be populated when getting assistant
            +       * session.
                    * 
            * * - * map<string, string> query_config = 16 [(.google.api.field_behavior) = OPTIONAL]; + * .google.cloud.discoveryengine.v1beta.AssistAnswer detailed_assist_answer = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ - @java.lang.Override - public java.lang.String getQueryConfigOrThrow(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - java.util.Map map = internalGetQueryConfig().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); + public Builder setDetailedAssistAnswer( + com.google.cloud.discoveryengine.v1beta.AssistAnswer.Builder builderForValue) { + if (detailedAssistAnswerBuilder_ == null) { + detailedAssistAnswer_ = builderForValue.build(); + } else { + detailedAssistAnswerBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
            +       * Output only. In
            +       * [ConversationalSearchService.GetSession][google.cloud.discoveryengine.v1beta.ConversationalSearchService.GetSession]
            +       * API, if
            +       * [GetSessionRequest.include_answer_details][google.cloud.discoveryengine.v1beta.GetSessionRequest.include_answer_details]
            +       * is set to true, this field will be populated when getting assistant
            +       * session.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AssistAnswer detailed_assist_answer = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeDetailedAssistAnswer( + com.google.cloud.discoveryengine.v1beta.AssistAnswer value) { + if (detailedAssistAnswerBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) + && detailedAssistAnswer_ != null + && detailedAssistAnswer_ + != com.google.cloud.discoveryengine.v1beta.AssistAnswer.getDefaultInstance()) { + getDetailedAssistAnswerBuilder().mergeFrom(value); + } else { + detailedAssistAnswer_ = value; + } + } else { + detailedAssistAnswerBuilder_.mergeFrom(value); + } + if (detailedAssistAnswer_ != null) { + bitField0_ |= 0x00000008; + onChanged(); + } + return this; + } + + /** + * + * + *
            +       * Output only. In
            +       * [ConversationalSearchService.GetSession][google.cloud.discoveryengine.v1beta.ConversationalSearchService.GetSession]
            +       * API, if
            +       * [GetSessionRequest.include_answer_details][google.cloud.discoveryengine.v1beta.GetSessionRequest.include_answer_details]
            +       * is set to true, this field will be populated when getting assistant
            +       * session.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AssistAnswer detailed_assist_answer = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearDetailedAssistAnswer() { + bitField0_ = (bitField0_ & ~0x00000008); + detailedAssistAnswer_ = null; + if (detailedAssistAnswerBuilder_ != null) { + detailedAssistAnswerBuilder_.dispose(); + detailedAssistAnswerBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
            +       * Output only. In
            +       * [ConversationalSearchService.GetSession][google.cloud.discoveryengine.v1beta.ConversationalSearchService.GetSession]
            +       * API, if
            +       * [GetSessionRequest.include_answer_details][google.cloud.discoveryengine.v1beta.GetSessionRequest.include_answer_details]
            +       * is set to true, this field will be populated when getting assistant
            +       * session.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AssistAnswer detailed_assist_answer = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.discoveryengine.v1beta.AssistAnswer.Builder + getDetailedAssistAnswerBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return internalGetDetailedAssistAnswerFieldBuilder().getBuilder(); + } + + /** + * + * + *
            +       * Output only. In
            +       * [ConversationalSearchService.GetSession][google.cloud.discoveryengine.v1beta.ConversationalSearchService.GetSession]
            +       * API, if
            +       * [GetSessionRequest.include_answer_details][google.cloud.discoveryengine.v1beta.GetSessionRequest.include_answer_details]
            +       * is set to true, this field will be populated when getting assistant
            +       * session.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AssistAnswer detailed_assist_answer = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.discoveryengine.v1beta.AssistAnswerOrBuilder + getDetailedAssistAnswerOrBuilder() { + if (detailedAssistAnswerBuilder_ != null) { + return detailedAssistAnswerBuilder_.getMessageOrBuilder(); + } else { + return detailedAssistAnswer_ == null + ? com.google.cloud.discoveryengine.v1beta.AssistAnswer.getDefaultInstance() + : detailedAssistAnswer_; + } + } + + /** + * + * + *
            +       * Output only. In
            +       * [ConversationalSearchService.GetSession][google.cloud.discoveryengine.v1beta.ConversationalSearchService.GetSession]
            +       * API, if
            +       * [GetSessionRequest.include_answer_details][google.cloud.discoveryengine.v1beta.GetSessionRequest.include_answer_details]
            +       * is set to true, this field will be populated when getting assistant
            +       * session.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AssistAnswer detailed_assist_answer = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.AssistAnswer, + com.google.cloud.discoveryengine.v1beta.AssistAnswer.Builder, + com.google.cloud.discoveryengine.v1beta.AssistAnswerOrBuilder> + internalGetDetailedAssistAnswerFieldBuilder() { + if (detailedAssistAnswerBuilder_ == null) { + detailedAssistAnswerBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.AssistAnswer, + com.google.cloud.discoveryengine.v1beta.AssistAnswer.Builder, + com.google.cloud.discoveryengine.v1beta.AssistAnswerOrBuilder>( + getDetailedAssistAnswer(), getParentForChildren(), isClean()); + detailedAssistAnswer_ = null; + } + return detailedAssistAnswerBuilder_; + } + + private com.google.protobuf.MapField queryConfig_; + + private com.google.protobuf.MapField + internalGetQueryConfig() { + if (queryConfig_ == null) { + return com.google.protobuf.MapField.emptyMapField( + QueryConfigDefaultEntryHolder.defaultEntry); + } + return queryConfig_; + } + + private com.google.protobuf.MapField + internalGetMutableQueryConfig() { + if (queryConfig_ == null) { + queryConfig_ = + com.google.protobuf.MapField.newMapField(QueryConfigDefaultEntryHolder.defaultEntry); + } + if (!queryConfig_.isMutable()) { + queryConfig_ = queryConfig_.copy(); + } + bitField0_ |= 0x00000010; + onChanged(); + return queryConfig_; + } + + public int getQueryConfigCount() { + return internalGetQueryConfig().getMap().size(); + } + + /** + * + * + *
            +       * Optional. Represents metadata related to the query config, for example
            +       * LLM model and version used, model parameters (temperature, grounding
            +       * parameters, etc.). The prefix "google." is reserved for Google-developed
            +       * functionality.
            +       * 
            + * + * + * map<string, string> query_config = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public boolean containsQueryConfig(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetQueryConfig().getMap().containsKey(key); + } + + /** Use {@link #getQueryConfigMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getQueryConfig() { + return getQueryConfigMap(); + } + + /** + * + * + *
            +       * Optional. Represents metadata related to the query config, for example
            +       * LLM model and version used, model parameters (temperature, grounding
            +       * parameters, etc.). The prefix "google." is reserved for Google-developed
            +       * functionality.
            +       * 
            + * + * + * map<string, string> query_config = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.Map getQueryConfigMap() { + return internalGetQueryConfig().getMap(); + } + + /** + * + * + *
            +       * Optional. Represents metadata related to the query config, for example
            +       * LLM model and version used, model parameters (temperature, grounding
            +       * parameters, etc.). The prefix "google." is reserved for Google-developed
            +       * functionality.
            +       * 
            + * + * + * map<string, string> query_config = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public /* nullable */ java.lang.String getQueryConfigOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetQueryConfig().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + + /** + * + * + *
            +       * Optional. Represents metadata related to the query config, for example
            +       * LLM model and version used, model parameters (temperature, grounding
            +       * parameters, etc.). The prefix "google." is reserved for Google-developed
            +       * functionality.
            +       * 
            + * + * + * map<string, string> query_config = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.lang.String getQueryConfigOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetQueryConfig().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); } return map.get(key); } public Builder clearQueryConfig() { - bitField0_ = (bitField0_ & ~0x00000008); + bitField0_ = (bitField0_ & ~0x00000010); internalGetMutableQueryConfig().getMutableMap().clear(); return this; } @@ -2061,7 +2553,7 @@ public Builder removeQueryConfig(java.lang.String key) { /** Use alternate mutation accessors instead. */ @java.lang.Deprecated public java.util.Map getMutableQueryConfig() { - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000010; return internalGetMutableQueryConfig().getMutableMap(); } @@ -2087,7 +2579,7 @@ public Builder putQueryConfig(java.lang.String key, java.lang.String value) { throw new NullPointerException("map value"); } internalGetMutableQueryConfig().getMutableMap().put(key, value); - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000010; return this; } @@ -2107,7 +2599,63 @@ public Builder putQueryConfig(java.lang.String key, java.lang.String value) { */ public Builder putAllQueryConfig(java.util.Map values) { internalGetMutableQueryConfig().getMutableMap().putAll(values); - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000010; + return this; + } + + private boolean live_; + + /** + * + * + *
            +       * Optional. Indicates whether this turn is a live turn.
            +       * 
            + * + * bool live = 20 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The live. + */ + @java.lang.Override + public boolean getLive() { + return live_; + } + + /** + * + * + *
            +       * Optional. Indicates whether this turn is a live turn.
            +       * 
            + * + * bool live = 20 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The live to set. + * @return This builder for chaining. + */ + public Builder setLive(boolean value) { + + live_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
            +       * Optional. Indicates whether this turn is a live turn.
            +       * 
            + * + * bool live = 20 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearLive() { + bitField0_ = (bitField0_ & ~0x00000020); + live_ = false; + onChanged(); return this; } @@ -2447,6 +2995,78 @@ public com.google.cloud.discoveryengine.v1beta.Session.TurnOrBuilder getTurnsOrB return turns_.get(index); } + public static final int LABELS_FIELD_NUMBER = 9; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList labels_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + /** + * + * + *
            +   * Optional. The labels for the session.
            +   * Can be set as filter in ListSessionsRequest.
            +   * 
            + * + * repeated string labels = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the labels. + */ + public com.google.protobuf.ProtocolStringList getLabelsList() { + return labels_; + } + + /** + * + * + *
            +   * Optional. The labels for the session.
            +   * Can be set as filter in ListSessionsRequest.
            +   * 
            + * + * repeated string labels = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of labels. + */ + public int getLabelsCount() { + return labels_.size(); + } + + /** + * + * + *
            +   * Optional. The labels for the session.
            +   * Can be set as filter in ListSessionsRequest.
            +   * 
            + * + * repeated string labels = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The labels at the given index. + */ + public java.lang.String getLabels(int index) { + return labels_.get(index); + } + + /** + * + * + *
            +   * Optional. The labels for the session.
            +   * Can be set as filter in ListSessionsRequest.
            +   * 
            + * + * repeated string labels = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the labels at the given index. + */ + public com.google.protobuf.ByteString getLabelsBytes(int index) { + return labels_.getByteString(index); + } + public static final int START_TIME_FIELD_NUMBER = 5; private com.google.protobuf.Timestamp startTime_; @@ -2571,6 +3191,69 @@ public boolean getIsPinned() { return isPinned_; } + public static final int PENDING_ASYNC_ASSIST_OPERATION_ID_FIELD_NUMBER = 22; + + @SuppressWarnings("serial") + private volatile java.lang.Object pendingAsyncAssistOperationId_ = ""; + + /** + * + * + *
            +   * Output only. Full resource name of an in-progress AsyncAssist operation for
            +   * this session, e.g.
            +   * `projects/*/locations/*/collections/*/engines/*/sessions/*/operations/*`.
            +   * Set when the operation starts and cleared when it finishes.
            +   * 
            + * + * + * string pending_async_assist_operation_id = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The pendingAsyncAssistOperationId. + */ + @java.lang.Override + public java.lang.String getPendingAsyncAssistOperationId() { + java.lang.Object ref = pendingAsyncAssistOperationId_; + 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(); + pendingAsyncAssistOperationId_ = s; + return s; + } + } + + /** + * + * + *
            +   * Output only. Full resource name of an in-progress AsyncAssist operation for
            +   * this session, e.g.
            +   * `projects/*/locations/*/collections/*/engines/*/sessions/*/operations/*`.
            +   * Set when the operation starts and cleared when it finishes.
            +   * 
            + * + * + * string pending_async_assist_operation_id = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The bytes for pendingAsyncAssistOperationId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPendingAsyncAssistOperationIdBytes() { + java.lang.Object ref = pendingAsyncAssistOperationId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pendingAsyncAssistOperationId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -2610,6 +3293,12 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (isPinned_ != false) { output.writeBool(8, isPinned_); } + for (int i = 0; i < labels_.size(); i++) { + com.google.protobuf.GeneratedMessage.writeString(output, 9, labels_.getRaw(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pendingAsyncAssistOperationId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 22, pendingAsyncAssistOperationId_); + } getUnknownFields().writeTo(output); } @@ -2644,6 +3333,19 @@ public int getSerializedSize() { if (isPinned_ != false) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(8, isPinned_); } + { + int dataSize = 0; + for (int i = 0; i < labels_.size(); i++) { + dataSize += computeStringSizeNoTag(labels_.getRaw(i)); + } + size += dataSize; + size += 1 * getLabelsList().size(); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pendingAsyncAssistOperationId_)) { + size += + com.google.protobuf.GeneratedMessage.computeStringSize( + 22, pendingAsyncAssistOperationId_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -2665,6 +3367,7 @@ public boolean equals(final java.lang.Object obj) { if (state_ != other.state_) return false; if (!getUserPseudoId().equals(other.getUserPseudoId())) return false; if (!getTurnsList().equals(other.getTurnsList())) return false; + if (!getLabelsList().equals(other.getLabelsList())) return false; if (hasStartTime() != other.hasStartTime()) return false; if (hasStartTime()) { if (!getStartTime().equals(other.getStartTime())) return false; @@ -2674,6 +3377,8 @@ public boolean equals(final java.lang.Object obj) { if (!getEndTime().equals(other.getEndTime())) return false; } if (getIsPinned() != other.getIsPinned()) return false; + if (!getPendingAsyncAssistOperationId().equals(other.getPendingAsyncAssistOperationId())) + return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -2697,6 +3402,10 @@ public int hashCode() { hash = (37 * hash) + TURNS_FIELD_NUMBER; hash = (53 * hash) + getTurnsList().hashCode(); } + if (getLabelsCount() > 0) { + hash = (37 * hash) + LABELS_FIELD_NUMBER; + hash = (53 * hash) + getLabelsList().hashCode(); + } if (hasStartTime()) { hash = (37 * hash) + START_TIME_FIELD_NUMBER; hash = (53 * hash) + getStartTime().hashCode(); @@ -2707,6 +3416,8 @@ public int hashCode() { } hash = (37 * hash) + IS_PINNED_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getIsPinned()); + hash = (37 * hash) + PENDING_ASYNC_ASSIST_OPERATION_ID_FIELD_NUMBER; + hash = (53 * hash) + getPendingAsyncAssistOperationId().hashCode(); hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -2869,6 +3580,7 @@ public Builder clear() { turnsBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000010); + labels_ = com.google.protobuf.LazyStringArrayList.emptyList(); startTime_ = null; if (startTimeBuilder_ != null) { startTimeBuilder_.dispose(); @@ -2880,6 +3592,7 @@ public Builder clear() { endTimeBuilder_ = null; } isPinned_ = false; + pendingAsyncAssistOperationId_ = ""; return this; } @@ -2942,18 +3655,25 @@ private void buildPartial0(com.google.cloud.discoveryengine.v1beta.Session resul if (((from_bitField0_ & 0x00000008) != 0)) { result.userPseudoId_ = userPseudoId_; } - int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000020) != 0)) { + labels_.makeImmutable(); + result.labels_ = labels_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000040) != 0)) { result.startTime_ = startTimeBuilder_ == null ? startTime_ : startTimeBuilder_.build(); to_bitField0_ |= 0x00000001; } - if (((from_bitField0_ & 0x00000040) != 0)) { + if (((from_bitField0_ & 0x00000080) != 0)) { result.endTime_ = endTimeBuilder_ == null ? endTime_ : endTimeBuilder_.build(); to_bitField0_ |= 0x00000002; } - if (((from_bitField0_ & 0x00000080) != 0)) { + if (((from_bitField0_ & 0x00000100) != 0)) { result.isPinned_ = isPinned_; } + if (((from_bitField0_ & 0x00000200) != 0)) { + result.pendingAsyncAssistOperationId_ = pendingAsyncAssistOperationId_; + } result.bitField0_ |= to_bitField0_; } @@ -3015,6 +3735,16 @@ public Builder mergeFrom(com.google.cloud.discoveryengine.v1beta.Session other) } } } + if (!other.labels_.isEmpty()) { + if (labels_.isEmpty()) { + labels_ = other.labels_; + bitField0_ |= 0x00000020; + } else { + ensureLabelsIsMutable(); + labels_.addAll(other.labels_); + } + onChanged(); + } if (other.hasStartTime()) { mergeStartTime(other.getStartTime()); } @@ -3024,6 +3754,11 @@ public Builder mergeFrom(com.google.cloud.discoveryengine.v1beta.Session other) if (other.getIsPinned() != false) { setIsPinned(other.getIsPinned()); } + if (!other.getPendingAsyncAssistOperationId().isEmpty()) { + pendingAsyncAssistOperationId_ = other.pendingAsyncAssistOperationId_; + bitField0_ |= 0x00000200; + onChanged(); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -3086,13 +3821,13 @@ public Builder mergeFrom( { input.readMessage( internalGetStartTimeFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000020; + bitField0_ |= 0x00000040; break; } // case 42 case 50: { input.readMessage(internalGetEndTimeFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000040; + bitField0_ |= 0x00000080; break; } // case 50 case 58: @@ -3104,9 +3839,22 @@ public Builder mergeFrom( case 64: { isPinned_ = input.readBool(); - bitField0_ |= 0x00000080; + bitField0_ |= 0x00000100; break; } // case 64 + case 74: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureLabelsIsMutable(); + labels_.add(s); + break; + } // case 74 + case 178: + { + pendingAsyncAssistOperationId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000200; + break; + } // case 178 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -3946,6 +4694,198 @@ public com.google.cloud.discoveryengine.v1beta.Session.Turn.Builder addTurnsBuil return turnsBuilder_; } + private com.google.protobuf.LazyStringArrayList labels_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureLabelsIsMutable() { + if (!labels_.isModifiable()) { + labels_ = new com.google.protobuf.LazyStringArrayList(labels_); + } + bitField0_ |= 0x00000020; + } + + /** + * + * + *
            +     * Optional. The labels for the session.
            +     * Can be set as filter in ListSessionsRequest.
            +     * 
            + * + * repeated string labels = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the labels. + */ + public com.google.protobuf.ProtocolStringList getLabelsList() { + labels_.makeImmutable(); + return labels_; + } + + /** + * + * + *
            +     * Optional. The labels for the session.
            +     * Can be set as filter in ListSessionsRequest.
            +     * 
            + * + * repeated string labels = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of labels. + */ + public int getLabelsCount() { + return labels_.size(); + } + + /** + * + * + *
            +     * Optional. The labels for the session.
            +     * Can be set as filter in ListSessionsRequest.
            +     * 
            + * + * repeated string labels = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The labels at the given index. + */ + public java.lang.String getLabels(int index) { + return labels_.get(index); + } + + /** + * + * + *
            +     * Optional. The labels for the session.
            +     * Can be set as filter in ListSessionsRequest.
            +     * 
            + * + * repeated string labels = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the labels at the given index. + */ + public com.google.protobuf.ByteString getLabelsBytes(int index) { + return labels_.getByteString(index); + } + + /** + * + * + *
            +     * Optional. The labels for the session.
            +     * Can be set as filter in ListSessionsRequest.
            +     * 
            + * + * repeated string labels = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index to set the value at. + * @param value The labels to set. + * @return This builder for chaining. + */ + public Builder setLabels(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureLabelsIsMutable(); + labels_.set(index, value); + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Optional. The labels for the session.
            +     * Can be set as filter in ListSessionsRequest.
            +     * 
            + * + * repeated string labels = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The labels to add. + * @return This builder for chaining. + */ + public Builder addLabels(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureLabelsIsMutable(); + labels_.add(value); + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Optional. The labels for the session.
            +     * Can be set as filter in ListSessionsRequest.
            +     * 
            + * + * repeated string labels = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param values The labels to add. + * @return This builder for chaining. + */ + public Builder addAllLabels(java.lang.Iterable values) { + ensureLabelsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, labels_); + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Optional. The labels for the session.
            +     * Can be set as filter in ListSessionsRequest.
            +     * 
            + * + * repeated string labels = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearLabels() { + labels_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000020); + ; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Optional. The labels for the session.
            +     * Can be set as filter in ListSessionsRequest.
            +     * 
            + * + * repeated string labels = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes of the labels to add. + * @return This builder for chaining. + */ + public Builder addLabelsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureLabelsIsMutable(); + labels_.add(value); + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + private com.google.protobuf.Timestamp startTime_; private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Timestamp, @@ -3966,7 +4906,7 @@ public com.google.cloud.discoveryengine.v1beta.Session.Turn.Builder addTurnsBuil * @return Whether the startTime field is set. */ public boolean hasStartTime() { - return ((bitField0_ & 0x00000020) != 0); + return ((bitField0_ & 0x00000040) != 0); } /** @@ -4008,7 +4948,7 @@ public Builder setStartTime(com.google.protobuf.Timestamp value) { } else { startTimeBuilder_.setMessage(value); } - bitField0_ |= 0x00000020; + bitField0_ |= 0x00000040; onChanged(); return this; } @@ -4029,7 +4969,7 @@ public Builder setStartTime(com.google.protobuf.Timestamp.Builder builderForValu } else { startTimeBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00000020; + bitField0_ |= 0x00000040; onChanged(); return this; } @@ -4046,7 +4986,7 @@ public Builder setStartTime(com.google.protobuf.Timestamp.Builder builderForValu */ public Builder mergeStartTime(com.google.protobuf.Timestamp value) { if (startTimeBuilder_ == null) { - if (((bitField0_ & 0x00000020) != 0) + if (((bitField0_ & 0x00000040) != 0) && startTime_ != null && startTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { getStartTimeBuilder().mergeFrom(value); @@ -4057,7 +4997,7 @@ public Builder mergeStartTime(com.google.protobuf.Timestamp value) { startTimeBuilder_.mergeFrom(value); } if (startTime_ != null) { - bitField0_ |= 0x00000020; + bitField0_ |= 0x00000040; onChanged(); } return this; @@ -4074,7 +5014,7 @@ public Builder mergeStartTime(com.google.protobuf.Timestamp value) { * */ public Builder clearStartTime() { - bitField0_ = (bitField0_ & ~0x00000020); + bitField0_ = (bitField0_ & ~0x00000040); startTime_ = null; if (startTimeBuilder_ != null) { startTimeBuilder_.dispose(); @@ -4095,7 +5035,7 @@ public Builder clearStartTime() { * */ public com.google.protobuf.Timestamp.Builder getStartTimeBuilder() { - bitField0_ |= 0x00000020; + bitField0_ |= 0x00000040; onChanged(); return internalGetStartTimeFieldBuilder().getBuilder(); } @@ -4165,7 +5105,7 @@ public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { * @return Whether the endTime field is set. */ public boolean hasEndTime() { - return ((bitField0_ & 0x00000040) != 0); + return ((bitField0_ & 0x00000080) != 0); } /** @@ -4207,7 +5147,7 @@ public Builder setEndTime(com.google.protobuf.Timestamp value) { } else { endTimeBuilder_.setMessage(value); } - bitField0_ |= 0x00000040; + bitField0_ |= 0x00000080; onChanged(); return this; } @@ -4228,7 +5168,7 @@ public Builder setEndTime(com.google.protobuf.Timestamp.Builder builderForValue) } else { endTimeBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00000040; + bitField0_ |= 0x00000080; onChanged(); return this; } @@ -4245,7 +5185,7 @@ public Builder setEndTime(com.google.protobuf.Timestamp.Builder builderForValue) */ public Builder mergeEndTime(com.google.protobuf.Timestamp value) { if (endTimeBuilder_ == null) { - if (((bitField0_ & 0x00000040) != 0) + if (((bitField0_ & 0x00000080) != 0) && endTime_ != null && endTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { getEndTimeBuilder().mergeFrom(value); @@ -4256,7 +5196,7 @@ public Builder mergeEndTime(com.google.protobuf.Timestamp value) { endTimeBuilder_.mergeFrom(value); } if (endTime_ != null) { - bitField0_ |= 0x00000040; + bitField0_ |= 0x00000080; onChanged(); } return this; @@ -4273,7 +5213,7 @@ public Builder mergeEndTime(com.google.protobuf.Timestamp value) { * */ public Builder clearEndTime() { - bitField0_ = (bitField0_ & ~0x00000040); + bitField0_ = (bitField0_ & ~0x00000080); endTime_ = null; if (endTimeBuilder_ != null) { endTimeBuilder_.dispose(); @@ -4294,7 +5234,7 @@ public Builder clearEndTime() { * */ public com.google.protobuf.Timestamp.Builder getEndTimeBuilder() { - bitField0_ |= 0x00000040; + bitField0_ |= 0x00000080; onChanged(); return internalGetEndTimeFieldBuilder().getBuilder(); } @@ -4379,7 +5319,7 @@ public boolean getIsPinned() { public Builder setIsPinned(boolean value) { isPinned_ = value; - bitField0_ |= 0x00000080; + bitField0_ |= 0x00000100; onChanged(); return this; } @@ -4397,12 +5337,148 @@ public Builder setIsPinned(boolean value) { * @return This builder for chaining. */ public Builder clearIsPinned() { - bitField0_ = (bitField0_ & ~0x00000080); + bitField0_ = (bitField0_ & ~0x00000100); isPinned_ = false; onChanged(); return this; } + private java.lang.Object pendingAsyncAssistOperationId_ = ""; + + /** + * + * + *
            +     * Output only. Full resource name of an in-progress AsyncAssist operation for
            +     * this session, e.g.
            +     * `projects/*/locations/*/collections/*/engines/*/sessions/*/operations/*`.
            +     * Set when the operation starts and cleared when it finishes.
            +     * 
            + * + * + * string pending_async_assist_operation_id = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The pendingAsyncAssistOperationId. + */ + public java.lang.String getPendingAsyncAssistOperationId() { + java.lang.Object ref = pendingAsyncAssistOperationId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pendingAsyncAssistOperationId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
            +     * Output only. Full resource name of an in-progress AsyncAssist operation for
            +     * this session, e.g.
            +     * `projects/*/locations/*/collections/*/engines/*/sessions/*/operations/*`.
            +     * Set when the operation starts and cleared when it finishes.
            +     * 
            + * + * + * string pending_async_assist_operation_id = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The bytes for pendingAsyncAssistOperationId. + */ + public com.google.protobuf.ByteString getPendingAsyncAssistOperationIdBytes() { + java.lang.Object ref = pendingAsyncAssistOperationId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pendingAsyncAssistOperationId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
            +     * Output only. Full resource name of an in-progress AsyncAssist operation for
            +     * this session, e.g.
            +     * `projects/*/locations/*/collections/*/engines/*/sessions/*/operations/*`.
            +     * Set when the operation starts and cleared when it finishes.
            +     * 
            + * + * + * string pending_async_assist_operation_id = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The pendingAsyncAssistOperationId to set. + * @return This builder for chaining. + */ + public Builder setPendingAsyncAssistOperationId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + pendingAsyncAssistOperationId_ = value; + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Output only. Full resource name of an in-progress AsyncAssist operation for
            +     * this session, e.g.
            +     * `projects/*/locations/*/collections/*/engines/*/sessions/*/operations/*`.
            +     * Set when the operation starts and cleared when it finishes.
            +     * 
            + * + * + * string pending_async_assist_operation_id = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearPendingAsyncAssistOperationId() { + pendingAsyncAssistOperationId_ = getDefaultInstance().getPendingAsyncAssistOperationId(); + bitField0_ = (bitField0_ & ~0x00000200); + onChanged(); + return this; + } + + /** + * + * + *
            +     * Output only. Full resource name of an in-progress AsyncAssist operation for
            +     * this session, e.g.
            +     * `projects/*/locations/*/collections/*/engines/*/sessions/*/operations/*`.
            +     * Set when the operation starts and cleared when it finishes.
            +     * 
            + * + * + * string pending_async_assist_operation_id = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The bytes for pendingAsyncAssistOperationId to set. + * @return This builder for chaining. + */ + public Builder setPendingAsyncAssistOperationIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + pendingAsyncAssistOperationId_ = value; + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.Session) } diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/SessionName.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/SessionName.java index 929c59ebb37f..99d846895a22 100644 --- a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/SessionName.java +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/SessionName.java @@ -39,6 +39,10 @@ public class SessionName implements ResourceName { private static final PathTemplate PROJECT_LOCATION_COLLECTION_ENGINE_SESSION = PathTemplate.createWithoutUrlEncoding( "projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/sessions/{session}"); + private static final PathTemplate + PROJECT_LOCATION_COLLECTION_ENGINE_COLLABORATIVE_PROJECT_SESSION = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/collaborativeProjects/{collaborative_project}/sessions/{session}"); private volatile Map fieldValuesMap; private PathTemplate pathTemplate; private String fixedValue; @@ -48,6 +52,7 @@ public class SessionName implements ResourceName { private final String session; private final String collection; private final String engine; + private final String collaborativeProject; @Deprecated protected SessionName() { @@ -57,6 +62,7 @@ protected SessionName() { session = null; collection = null; engine = null; + collaborativeProject = null; } private SessionName(Builder builder) { @@ -66,6 +72,7 @@ private SessionName(Builder builder) { session = Preconditions.checkNotNull(builder.getSession()); collection = null; engine = null; + collaborativeProject = null; pathTemplate = PROJECT_LOCATION_DATA_STORE_SESSION; } @@ -76,6 +83,7 @@ private SessionName(ProjectLocationCollectionDataStoreSessionBuilder builder) { dataStore = Preconditions.checkNotNull(builder.getDataStore()); session = Preconditions.checkNotNull(builder.getSession()); engine = null; + collaborativeProject = null; pathTemplate = PROJECT_LOCATION_COLLECTION_DATA_STORE_SESSION; } @@ -86,9 +94,21 @@ private SessionName(ProjectLocationCollectionEngineSessionBuilder builder) { engine = Preconditions.checkNotNull(builder.getEngine()); session = Preconditions.checkNotNull(builder.getSession()); dataStore = null; + collaborativeProject = null; pathTemplate = PROJECT_LOCATION_COLLECTION_ENGINE_SESSION; } + private SessionName(ProjectLocationCollectionEngineCollaborativeProjectSessionBuilder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + collection = Preconditions.checkNotNull(builder.getCollection()); + engine = Preconditions.checkNotNull(builder.getEngine()); + collaborativeProject = Preconditions.checkNotNull(builder.getCollaborativeProject()); + session = Preconditions.checkNotNull(builder.getSession()); + dataStore = null; + pathTemplate = PROJECT_LOCATION_COLLECTION_ENGINE_COLLABORATIVE_PROJECT_SESSION; + } + public String getProject() { return project; } @@ -113,6 +133,10 @@ public String getEngine() { return engine; } + public String getCollaborativeProject() { + return collaborativeProject; + } + public static Builder newBuilder() { return new Builder(); } @@ -131,6 +155,11 @@ public static Builder newProjectLocationDataStoreSessionBuilder() { return new ProjectLocationCollectionEngineSessionBuilder(); } + public static ProjectLocationCollectionEngineCollaborativeProjectSessionBuilder + newProjectLocationCollectionEngineCollaborativeProjectSessionBuilder() { + return new ProjectLocationCollectionEngineCollaborativeProjectSessionBuilder(); + } + public Builder toBuilder() { return new Builder(this); } @@ -176,6 +205,23 @@ public static SessionName ofProjectLocationCollectionEngineSessionName( .build(); } + public static SessionName ofProjectLocationCollectionEngineCollaborativeProjectSessionName( + String project, + String location, + String collection, + String engine, + String collaborativeProject, + String session) { + return newProjectLocationCollectionEngineCollaborativeProjectSessionBuilder() + .setProject(project) + .setLocation(location) + .setCollection(collection) + .setEngine(engine) + .setCollaborativeProject(collaborativeProject) + .setSession(session) + .build(); + } + public static String format(String project, String location, String dataStore, String session) { return newBuilder() .setProject(project) @@ -221,6 +267,24 @@ public static String formatProjectLocationCollectionEngineSessionName( .toString(); } + public static String formatProjectLocationCollectionEngineCollaborativeProjectSessionName( + String project, + String location, + String collection, + String engine, + String collaborativeProject, + String session) { + return newProjectLocationCollectionEngineCollaborativeProjectSessionBuilder() + .setProject(project) + .setLocation(location) + .setCollection(collection) + .setEngine(engine) + .setCollaborativeProject(collaborativeProject) + .setSession(session) + .build() + .toString(); + } + public static SessionName parse(String formattedString) { if (formattedString.isEmpty()) { return null; @@ -250,6 +314,17 @@ public static SessionName parse(String formattedString) { matchMap.get("collection"), matchMap.get("engine"), matchMap.get("session")); + } else if (PROJECT_LOCATION_COLLECTION_ENGINE_COLLABORATIVE_PROJECT_SESSION.matches( + formattedString)) { + Map matchMap = + PROJECT_LOCATION_COLLECTION_ENGINE_COLLABORATIVE_PROJECT_SESSION.match(formattedString); + return ofProjectLocationCollectionEngineCollaborativeProjectSessionName( + matchMap.get("project"), + matchMap.get("location"), + matchMap.get("collection"), + matchMap.get("engine"), + matchMap.get("collaborative_project"), + matchMap.get("session")); } throw new ValidationException("SessionName.parse: formattedString not in valid format"); } @@ -277,7 +352,9 @@ public static List toStringList(List values) { public static boolean isParsableFrom(String formattedString) { return PROJECT_LOCATION_DATA_STORE_SESSION.matches(formattedString) || PROJECT_LOCATION_COLLECTION_DATA_STORE_SESSION.matches(formattedString) - || PROJECT_LOCATION_COLLECTION_ENGINE_SESSION.matches(formattedString); + || PROJECT_LOCATION_COLLECTION_ENGINE_SESSION.matches(formattedString) + || PROJECT_LOCATION_COLLECTION_ENGINE_COLLABORATIVE_PROJECT_SESSION.matches( + formattedString); } @Override @@ -304,6 +381,9 @@ public Map getFieldValuesMap() { if (engine != null) { fieldMapBuilder.put("engine", engine); } + if (collaborativeProject != null) { + fieldMapBuilder.put("collaborative_project", collaborativeProject); + } fieldValuesMap = fieldMapBuilder.build(); } } @@ -332,7 +412,8 @@ public boolean equals(Object o) { && Objects.equals(this.dataStore, that.dataStore) && Objects.equals(this.session, that.session) && Objects.equals(this.collection, that.collection) - && Objects.equals(this.engine, that.engine); + && Objects.equals(this.engine, that.engine) + && Objects.equals(this.collaborativeProject, that.collaborativeProject); } return false; } @@ -354,6 +435,8 @@ public int hashCode() { h ^= Objects.hashCode(collection); h *= 1000003; h ^= Objects.hashCode(engine); + h *= 1000003; + h ^= Objects.hashCode(collaborativeProject); return h; } @@ -545,4 +628,83 @@ public SessionName build() { return new SessionName(this); } } + + /** + * Builder for + * projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/collaborativeProjects/{collaborative_project}/sessions/{session}. + */ + public static class ProjectLocationCollectionEngineCollaborativeProjectSessionBuilder { + private String project; + private String location; + private String collection; + private String engine; + private String collaborativeProject; + private String session; + + protected ProjectLocationCollectionEngineCollaborativeProjectSessionBuilder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getCollection() { + return collection; + } + + public String getEngine() { + return engine; + } + + public String getCollaborativeProject() { + return collaborativeProject; + } + + public String getSession() { + return session; + } + + public ProjectLocationCollectionEngineCollaborativeProjectSessionBuilder setProject( + String project) { + this.project = project; + return this; + } + + public ProjectLocationCollectionEngineCollaborativeProjectSessionBuilder setLocation( + String location) { + this.location = location; + return this; + } + + public ProjectLocationCollectionEngineCollaborativeProjectSessionBuilder setCollection( + String collection) { + this.collection = collection; + return this; + } + + public ProjectLocationCollectionEngineCollaborativeProjectSessionBuilder setEngine( + String engine) { + this.engine = engine; + return this; + } + + public ProjectLocationCollectionEngineCollaborativeProjectSessionBuilder + setCollaborativeProject(String collaborativeProject) { + this.collaborativeProject = collaborativeProject; + return this; + } + + public ProjectLocationCollectionEngineCollaborativeProjectSessionBuilder setSession( + String session) { + this.session = session; + return this; + } + + public SessionName build() { + return new SessionName(this); + } + } } diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/SessionOrBuilder.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/SessionOrBuilder.java index 27dabd263cbe..f280f60b5d13 100644 --- a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/SessionOrBuilder.java +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/SessionOrBuilder.java @@ -194,6 +194,64 @@ public interface SessionOrBuilder */ com.google.cloud.discoveryengine.v1beta.Session.TurnOrBuilder getTurnsOrBuilder(int index); + /** + * + * + *
            +   * Optional. The labels for the session.
            +   * Can be set as filter in ListSessionsRequest.
            +   * 
            + * + * repeated string labels = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the labels. + */ + java.util.List getLabelsList(); + + /** + * + * + *
            +   * Optional. The labels for the session.
            +   * Can be set as filter in ListSessionsRequest.
            +   * 
            + * + * repeated string labels = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of labels. + */ + int getLabelsCount(); + + /** + * + * + *
            +   * Optional. The labels for the session.
            +   * Can be set as filter in ListSessionsRequest.
            +   * 
            + * + * repeated string labels = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The labels at the given index. + */ + java.lang.String getLabels(int index); + + /** + * + * + *
            +   * Optional. The labels for the session.
            +   * Can be set as filter in ListSessionsRequest.
            +   * 
            + * + * repeated string labels = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the labels at the given index. + */ + com.google.protobuf.ByteString getLabelsBytes(int index); + /** * * @@ -287,4 +345,40 @@ public interface SessionOrBuilder * @return The isPinned. */ boolean getIsPinned(); + + /** + * + * + *
            +   * Output only. Full resource name of an in-progress AsyncAssist operation for
            +   * this session, e.g.
            +   * `projects/*/locations/*/collections/*/engines/*/sessions/*/operations/*`.
            +   * Set when the operation starts and cleared when it finishes.
            +   * 
            + * + * + * string pending_async_assist_operation_id = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The pendingAsyncAssistOperationId. + */ + java.lang.String getPendingAsyncAssistOperationId(); + + /** + * + * + *
            +   * Output only. Full resource name of an in-progress AsyncAssist operation for
            +   * this session, e.g.
            +   * `projects/*/locations/*/collections/*/engines/*/sessions/*/operations/*`.
            +   * Set when the operation starts and cleared when it finishes.
            +   * 
            + * + * + * string pending_async_assist_operation_id = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The bytes for pendingAsyncAssistOperationId. + */ + com.google.protobuf.ByteString getPendingAsyncAssistOperationIdBytes(); } diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/SessionProto.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/SessionProto.java index 62355f328f26..f4e7f8467e6a 100644 --- a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/SessionProto.java +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/SessionProto.java @@ -69,48 +69,56 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "1google/cloud/discoveryengine/v1beta/session.proto\022#google.cloud.discoveryengin" + "e.v1beta\032\037google/api/field_behavior.prot" + "o\032\031google/api/resource.proto\0320google/clo" - + "ud/discoveryengine/v1beta/answer.proto\032\037google/protobuf/timestamp.proto\"\324\010\n" + + "ud/discoveryengine/v1beta/answer.proto\0327google/cloud/discoveryengine/v1beta/assi" + + "st_answer.proto\032\037google/protobuf/timestamp.proto\"\231\013\n" + "\007Session\022\021\n" + "\004name\030\001 \001(\tB\003\340A\005\022\031\n" + "\014display_name\030\007 \001(\tB\003\340A\001\022A\n" - + "\005state\030\002" - + " \001(\01622.google.cloud.discoveryengine.v1beta.Session.State\022\026\n" + + "\005state\030\002 \001(" + + "\01622.google.cloud.discoveryengine.v1beta.Session.State\022\026\n" + "\016user_pseudo_id\030\003 \001(\t\022@\n" - + "\005turns\030\004 \003(\01321.go" - + "ogle.cloud.discoveryengine.v1beta.Session.Turn\0223\n\n" + + "\005turns\030\004" + + " \003(\01321.google.cloud.discoveryengine.v1beta.Session.Turn\022\023\n" + + "\006labels\030\t \003(\tB\003\340A\001\0223\n\n" + "start_time\030\005 \001(\0132\032.google.protobuf.TimestampB\003\340A\003\0221\n" + "\010end_time\030\006 \001(\0132\032.google.protobuf.TimestampB\003\340A\003\022\026\n" - + "\tis_pinned\030\010 \001(\010B\003\340A\001\032\343\002\n" + + "\tis_pinned\030\010 \001(\010B\003\340A\001\022.\n" + + "!pending_async_assist_operation_id\030\026 \001(\tB\003\340A\003\032\316\003\n" + "\004Turn\022>\n" - + "\005query\030\001 \001(\0132*" - + ".google.cloud.discoveryengine.v1beta.QueryB\003\340A\001\022=\n" + + "\005query\030\001" + + " \001(\0132*.google.cloud.discoveryengine.v1beta.QueryB\003\340A\001\022=\n" + "\006answer\030\002 \001(\tB-\340A\001\372A\'\n" + "%discoveryengine.googleapis.com/Answer\022I\n" + "\017detailed_answer\030\007" - + " \001(\0132+.google.cloud.discoveryengine.v1beta.AnswerB\003\340A\003\022]\n" - + "\014query_config\030\020 \003(\0132B.google.cloud.discoveryengine.v" - + "1beta.Session.Turn.QueryConfigEntryB\003\340A\001\0322\n" + + " \001(\0132+.google.cloud.discoveryengine.v1beta.AnswerB\003\340A\003\022V\n" + + "\026detailed_assist_answer\030\010 \001(\01321.google.cloud.d" + + "iscoveryengine.v1beta.AssistAnswerB\003\340A\003\022]\n" + + "\014query_config\030\020 \003(\0132B.google.cloud.dis" + + "coveryengine.v1beta.Session.Turn.QueryConfigEntryB\003\340A\001\022\021\n" + + "\004live\030\024 \001(\010B\003\340A\001\0322\n" + "\020QueryConfigEntry\022\013\n" + "\003key\030\001 \001(\t\022\r\n" + "\005value\030\002 \001(\t:\0028\001\"/\n" + "\005State\022\025\n" + "\021STATE_UNSPECIFIED\020\000\022\017\n" - + "\013IN_PROGRESS\020\001:\346\002\352A\342\002\n" - + "&discoveryengine.googleapis.com/Session\022Rprojects/{" - + "project}/locations/{location}/dataStores/{data_store}/sessions/{session}\022kprojec" - + "ts/{project}/locations/{location}/collections/{collection}/dataStores/{data_stor" - + "e}/sessions/{session}\022dprojects/{project}/locations/{location}/collections/{coll" - + "ection}/engines/{engine}/sessions/{session}*\010sessions2\007session\"9\n" + + "\013IN_PROGRESS\020\001:\373\003\352A\367\003\n" + + "&discoveryengine.googleapis.com/Session\022Rprojects/{project" + + "}/locations/{location}/dataStores/{data_store}/sessions/{session}\022kprojects/{pro" + + "ject}/locations/{location}/collections/{collection}/dataStores/{data_store}/sess" + + "ions/{session}\022dprojects/{project}/locations/{location}/collections/{collection}" + + "/engines/{engine}/sessions/{session}\022\222\001p" + + "rojects/{project}/locations/{location}/collections/{collection}/engines/{engine}" + + "/collaborativeProjects/{collaborative_pr" + + "oject}/sessions/{session}*\010sessions2\007session\"9\n" + "\005Query\022\016\n" + "\004text\030\002 \001(\tH\000\022\025\n" + "\010query_id\030\001 \001(\tB\003\340A\003B\t\n" + "\007contentB\223\002\n" - + "\'com.google.cloud.discoveryengine.v1betaB\014SessionProtoP\001ZQcloud.google.com/" - + "go/discoveryengine/apiv1beta/discoveryen" - + "ginepb;discoveryenginepb\242\002\017DISCOVERYENGI" - + "NE\252\002#Google.Cloud.DiscoveryEngine.V1Beta" - + "\312\002#Google\\Cloud\\DiscoveryEngine\\V1beta\352\002" - + "&Google::Cloud::DiscoveryEngine::V1betab\006proto3" + + "\'com.google.cloud.discoveryengine.v1betaB\014SessionProt" + + "oP\001ZQcloud.google.com/go/discoveryengine/apiv1beta/discoveryenginepb;discoveryen" + + "ginepb\242\002\017DISCOVERYENGINE\252\002#Google.Cloud." + + "DiscoveryEngine.V1Beta\312\002#Google\\Cloud\\Di" + + "scoveryEngine\\V1beta\352\002&Google::Cloud::DiscoveryEngine::V1betab\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -119,6 +127,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.api.FieldBehaviorProto.getDescriptor(), com.google.api.ResourceProto.getDescriptor(), com.google.cloud.discoveryengine.v1beta.AnswerProto.getDescriptor(), + com.google.cloud.discoveryengine.v1beta.AssistAnswerProto.getDescriptor(), com.google.protobuf.TimestampProto.getDescriptor(), }); internal_static_google_cloud_discoveryengine_v1beta_Session_descriptor = @@ -132,9 +141,11 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "State", "UserPseudoId", "Turns", + "Labels", "StartTime", "EndTime", "IsPinned", + "PendingAsyncAssistOperationId", }); internal_static_google_cloud_discoveryengine_v1beta_Session_Turn_descriptor = internal_static_google_cloud_discoveryengine_v1beta_Session_descriptor.getNestedType(0); @@ -142,7 +153,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_cloud_discoveryengine_v1beta_Session_Turn_descriptor, new java.lang.String[] { - "Query", "Answer", "DetailedAnswer", "QueryConfig", + "Query", "Answer", "DetailedAnswer", "DetailedAssistAnswer", "QueryConfig", "Live", }); internal_static_google_cloud_discoveryengine_v1beta_Session_Turn_QueryConfigEntry_descriptor = internal_static_google_cloud_discoveryengine_v1beta_Session_Turn_descriptor.getNestedType( @@ -165,6 +176,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.api.FieldBehaviorProto.getDescriptor(); com.google.api.ResourceProto.getDescriptor(); com.google.cloud.discoveryengine.v1beta.AnswerProto.getDescriptor(); + com.google.cloud.discoveryengine.v1beta.AssistAnswerProto.getDescriptor(); com.google.protobuf.TimestampProto.getDescriptor(); com.google.protobuf.ExtensionRegistry registry = com.google.protobuf.ExtensionRegistry.newInstance(); diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/SessionServiceProto.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/SessionServiceProto.java index c4db60f5e95a..089ea2c1c5bc 100644 --- a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/SessionServiceProto.java +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/SessionServiceProto.java @@ -57,7 +57,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "e/v1beta/conversational_search_service.p" + "roto\0321google/cloud/discoveryengine/v1bet" + "a/session.proto\032\033google/protobuf/empty.p" - + "roto2\272\017\n\016SessionService\022\210\003\n\rCreateSessio" + + "roto2\371\020\n\016SessionService\022\210\003\n\rCreateSessio" + "n\0229.google.cloud.discoveryengine.v1beta." + "CreateSessionRequest\032,.google.cloud.disc" + "overyengine.v1beta.Session\"\215\002\332A\016parent,s" @@ -104,16 +104,21 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "arent=projects/*/locations/*/collections" + "/*/dataStores/*}/sessionsZJ\022H/v1beta/{pa" + "rent=projects/*/locations/*/collections/" - + "*/engines/*}/sessions\032R\312A\036discoveryengin" - + "e.googleapis.com\322A.https://www.googleapi" - + "s.com/auth/cloud-platformB\232\002\n\'com.google" - + ".cloud.discoveryengine.v1betaB\023SessionSe" - + "rviceProtoP\001ZQcloud.google.com/go/discov" - + "eryengine/apiv1beta/discoveryenginepb;di" - + "scoveryenginepb\242\002\017DISCOVERYENGINE\252\002#Goog" - + "le.Cloud.DiscoveryEngine.V1Beta\312\002#Google" - + "\\Cloud\\DiscoveryEngine\\V1beta\352\002&Google::" - + "Cloud::DiscoveryEngine::V1betab\006proto3" + + "*/engines/*}/sessions\032\220\002\312A\036discoveryengi" + + "ne.googleapis.com\322A\353\001https://www.googlea" + + "pis.com/auth/cloud-platform,https://www." + + "googleapis.com/auth/discoveryengine.assi" + + "st.readwrite,https://www.googleapis.com/" + + "auth/discoveryengine.readwrite,https://w" + + "ww.googleapis.com/auth/discoveryengine.s" + + "erving.readwriteB\232\002\n\'com.google.cloud.di" + + "scoveryengine.v1betaB\023SessionServiceProt" + + "oP\001ZQcloud.google.com/go/discoveryengine" + + "/apiv1beta/discoveryenginepb;discoveryen" + + "ginepb\242\002\017DISCOVERYENGINE\252\002#Google.Cloud." + + "DiscoveryEngine.V1Beta\312\002#Google\\Cloud\\Di" + + "scoveryEngine\\V1beta\352\002&Google::Cloud::Di" + + "scoveryEngine::V1betab\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/SingleRegionKey.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/SingleRegionKey.java new file mode 100644 index 000000000000..d5467c239802 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/SingleRegionKey.java @@ -0,0 +1,625 @@ +/* + * 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/cloud/discoveryengine/v1beta/cmek_config_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.discoveryengine.v1beta; + +/** + * + * + *
            + * Metadata for single-regional CMEKs.
            + * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.SingleRegionKey} + */ +@com.google.protobuf.Generated +public final class SingleRegionKey extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.SingleRegionKey) + SingleRegionKeyOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "SingleRegionKey"); + } + + // Use SingleRegionKey.newBuilder() to construct. + private SingleRegionKey(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private SingleRegionKey() { + kmsKey_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.CmekConfigServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_SingleRegionKey_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.CmekConfigServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_SingleRegionKey_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.SingleRegionKey.class, + com.google.cloud.discoveryengine.v1beta.SingleRegionKey.Builder.class); + } + + public static final int KMS_KEY_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object kmsKey_ = ""; + + /** + * + * + *
            +   * Required. Single-regional kms key resource name which will be used to
            +   * encrypt resources
            +   * `projects/{project}/locations/{location}/keyRings/{keyRing}/cryptoKeys/{keyId}`.
            +   * 
            + * + * + * string kms_key = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The kmsKey. + */ + @java.lang.Override + public java.lang.String getKmsKey() { + java.lang.Object ref = kmsKey_; + 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(); + kmsKey_ = s; + return s; + } + } + + /** + * + * + *
            +   * Required. Single-regional kms key resource name which will be used to
            +   * encrypt resources
            +   * `projects/{project}/locations/{location}/keyRings/{keyRing}/cryptoKeys/{keyId}`.
            +   * 
            + * + * + * string kms_key = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for kmsKey. + */ + @java.lang.Override + public com.google.protobuf.ByteString getKmsKeyBytes() { + java.lang.Object ref = kmsKey_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + kmsKey_ = 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 { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(kmsKey_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, kmsKey_); + } + 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(kmsKey_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, kmsKey_); + } + 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.discoveryengine.v1beta.SingleRegionKey)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1beta.SingleRegionKey other = + (com.google.cloud.discoveryengine.v1beta.SingleRegionKey) obj; + + if (!getKmsKey().equals(other.getKmsKey())) 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) + KMS_KEY_FIELD_NUMBER; + hash = (53 * hash) + getKmsKey().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1beta.SingleRegionKey parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.SingleRegionKey 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.discoveryengine.v1beta.SingleRegionKey parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.SingleRegionKey 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.discoveryengine.v1beta.SingleRegionKey parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.SingleRegionKey parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1beta.SingleRegionKey parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.SingleRegionKey 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.discoveryengine.v1beta.SingleRegionKey parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.SingleRegionKey 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.discoveryengine.v1beta.SingleRegionKey parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.SingleRegionKey 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.discoveryengine.v1beta.SingleRegionKey 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; + } + + /** + * + * + *
            +   * Metadata for single-regional CMEKs.
            +   * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.SingleRegionKey} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.SingleRegionKey) + com.google.cloud.discoveryengine.v1beta.SingleRegionKeyOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.CmekConfigServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_SingleRegionKey_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.CmekConfigServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_SingleRegionKey_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.SingleRegionKey.class, + com.google.cloud.discoveryengine.v1beta.SingleRegionKey.Builder.class); + } + + // Construct using com.google.cloud.discoveryengine.v1beta.SingleRegionKey.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + kmsKey_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1beta.CmekConfigServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_SingleRegionKey_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.SingleRegionKey getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1beta.SingleRegionKey.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.SingleRegionKey build() { + com.google.cloud.discoveryengine.v1beta.SingleRegionKey result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.SingleRegionKey buildPartial() { + com.google.cloud.discoveryengine.v1beta.SingleRegionKey result = + new com.google.cloud.discoveryengine.v1beta.SingleRegionKey(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.discoveryengine.v1beta.SingleRegionKey result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.kmsKey_ = kmsKey_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.discoveryengine.v1beta.SingleRegionKey) { + return mergeFrom((com.google.cloud.discoveryengine.v1beta.SingleRegionKey) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.discoveryengine.v1beta.SingleRegionKey other) { + if (other == com.google.cloud.discoveryengine.v1beta.SingleRegionKey.getDefaultInstance()) + return this; + if (!other.getKmsKey().isEmpty()) { + kmsKey_ = other.kmsKey_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + kmsKey_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object kmsKey_ = ""; + + /** + * + * + *
            +     * Required. Single-regional kms key resource name which will be used to
            +     * encrypt resources
            +     * `projects/{project}/locations/{location}/keyRings/{keyRing}/cryptoKeys/{keyId}`.
            +     * 
            + * + * + * string kms_key = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The kmsKey. + */ + public java.lang.String getKmsKey() { + java.lang.Object ref = kmsKey_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + kmsKey_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
            +     * Required. Single-regional kms key resource name which will be used to
            +     * encrypt resources
            +     * `projects/{project}/locations/{location}/keyRings/{keyRing}/cryptoKeys/{keyId}`.
            +     * 
            + * + * + * string kms_key = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for kmsKey. + */ + public com.google.protobuf.ByteString getKmsKeyBytes() { + java.lang.Object ref = kmsKey_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + kmsKey_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
            +     * Required. Single-regional kms key resource name which will be used to
            +     * encrypt resources
            +     * `projects/{project}/locations/{location}/keyRings/{keyRing}/cryptoKeys/{keyId}`.
            +     * 
            + * + * + * string kms_key = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The kmsKey to set. + * @return This builder for chaining. + */ + public Builder setKmsKey(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + kmsKey_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Required. Single-regional kms key resource name which will be used to
            +     * encrypt resources
            +     * `projects/{project}/locations/{location}/keyRings/{keyRing}/cryptoKeys/{keyId}`.
            +     * 
            + * + * + * string kms_key = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearKmsKey() { + kmsKey_ = getDefaultInstance().getKmsKey(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
            +     * Required. Single-regional kms key resource name which will be used to
            +     * encrypt resources
            +     * `projects/{project}/locations/{location}/keyRings/{keyRing}/cryptoKeys/{keyId}`.
            +     * 
            + * + * + * string kms_key = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for kmsKey to set. + * @return This builder for chaining. + */ + public Builder setKmsKeyBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + kmsKey_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.SingleRegionKey) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.SingleRegionKey) + private static final com.google.cloud.discoveryengine.v1beta.SingleRegionKey DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.discoveryengine.v1beta.SingleRegionKey(); + } + + public static com.google.cloud.discoveryengine.v1beta.SingleRegionKey getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SingleRegionKey parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.SingleRegionKey getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/SingleRegionKeyOrBuilder.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/SingleRegionKeyOrBuilder.java new file mode 100644 index 000000000000..f22d2b5a94e3 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/SingleRegionKeyOrBuilder.java @@ -0,0 +1,62 @@ +/* + * 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/cloud/discoveryengine/v1beta/cmek_config_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.discoveryengine.v1beta; + +@com.google.protobuf.Generated +public interface SingleRegionKeyOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.SingleRegionKey) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
            +   * Required. Single-regional kms key resource name which will be used to
            +   * encrypt resources
            +   * `projects/{project}/locations/{location}/keyRings/{keyRing}/cryptoKeys/{keyId}`.
            +   * 
            + * + * + * string kms_key = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The kmsKey. + */ + java.lang.String getKmsKey(); + + /** + * + * + *
            +   * Required. Single-regional kms key resource name which will be used to
            +   * encrypt resources
            +   * `projects/{project}/locations/{location}/keyRings/{keyRing}/cryptoKeys/{keyId}`.
            +   * 
            + * + * + * string kms_key = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for kmsKey. + */ + com.google.protobuf.ByteString getKmsKeyBytes(); +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/SiteSearchEngineProto.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/SiteSearchEngineProto.java index 664447fcb139..965d0eed8fa6 100644 --- a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/SiteSearchEngineProto.java +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/SiteSearchEngineProto.java @@ -82,13 +82,13 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "/discoveryengine.googleapis.com/SiteSearchEng" + "ine\022Pprojects/{project}/locations/{location}/dataStores/{data_store}/siteSearchE" + "ngine\022iprojects/{project}/locations/{loc" - + "ation}/collections/{collection}/dataStores/{data_store}/siteSearchEngine\"\252\t\n\n" + + "ation}/collections/{collection}/dataStores/{data_store}/siteSearchEngine\"\313\t\n\n" + "TargetSite\022\021\n" + "\004name\030\001 \001(\tB\003\340A\003\022$\n" + "\024provided_uri_pattern\030\002 \001(\tB\006\340A\002\340A\004\022B\n" + "\004type\030\003 \001(\01624" + ".google.cloud.discoveryengine.v1beta.TargetSite.Type\022\030\n" - + "\013exact_match\030\006 \001(\010B\003\340A\004\022\"\n" + + "\013exact_match\030\006 \001(\010B\003\340A\005\022\"\n" + "\025generated_uri_pattern\030\004 \001(\tB\003\340A\003\022\034\n" + "\017root_domain_uri\030\n" + " \001(\tB\003\340A\003\022^\n" @@ -108,21 +108,23 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\004Type\022\024\n" + "\020TYPE_UNSPECIFIED\020\000\022\013\n" + "\007INCLUDE\020\001\022\013\n" - + "\007EXCLUDE\020\002\"g\n" + + "\007EXCLUDE\020\002\"\207\001\n" + "\016IndexingStatus\022\037\n" + "\033INDEXING_STATUS_UNSPECIFIED\020\000\022\013\n" + "\007PENDING\020\001\022\n\n" + "\006FAILED\020\002\022\r\n" + "\tSUCCEEDED\020\003\022\014\n" - + "\010DELETING\020\004:\241\002\352A\235\002\n" - + ")discoveryengine.googleapis.com/TargetSite\022jprojects/{p" - + "roject}/locations/{location}/dataStores/{data_store}/siteSearchEngine/targetSite" - + "s/{target_site}\022\203\001projects/{project}/loc" - + "ations/{location}/collections/{collectio" - + "n}/dataStores/{data_store}/siteSearchEngine/targetSites/{target_site}\"\247\002\n" + + "\010DELETING\020\004\022\017\n" + + "\013CANCELLABLE\020\005\022\r\n" + + "\tCANCELLED\020\006:\241\002\352A\235\002\n" + + ")discoveryengine.googleapis.com/TargetSite\022jprojects/{project}" + + "/locations/{location}/dataStores/{data_store}/siteSearchEngine/targetSites/{targ" + + "et_site}\022\203\001projects/{project}/locations/" + + "{location}/collections/{collection}/data" + + "Stores/{data_store}/siteSearchEngine/targetSites/{target_site}\"\247\002\n" + "\024SiteVerificationInfo\022p\n" - + "\027site_verification_state\030\001 \001(\0162O.google.cloud.discoveryengine.v" - + "1beta.SiteVerificationInfo.SiteVerificationState\022/\n" + + "\027site_verification_state\030\001 \001(\0162O.google.cloud.discoveryengine.v1beta.S" + + "iteVerificationInfo.SiteVerificationState\022/\n" + "\013verify_time\030\002 \001(\0132\032.google.protobuf.Timestamp\"l\n" + "\025SiteVerificationState\022\'\n" + "#SITE_VERIFICATION_STATE_UNSPECIFIED\020\000\022\014\n" @@ -134,17 +136,17 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\004name\030\001 \001(\tB\003\340A\003\0224\n" + "\013create_time\030\003" + " \001(\0132\032.google.protobuf.TimestampB\003\340A\003:\217\002\352A\213\002\n" - + "&discoveryengine.googleapis.com/Sitemap\022cproj" - + "ects/{project}/locations/{location}/dataStores/{data_store}/siteSearchEngine/sit" - + "emaps/{sitemap}\022|projects/{project}/locations/{location}/collections/{collection" - + "}/dataStores/{data_store}/siteSearchEngine/sitemaps/{sitemap}B\006\n" + + "&discoveryengine.googleapis.com/Sitemap\022cprojects/{p" + + "roject}/locations/{location}/dataStores/{data_store}/siteSearchEngine/sitemaps/{" + + "sitemap}\022|projects/{project}/locations/{location}/collections/{collection}/dataS" + + "tores/{data_store}/siteSearchEngine/sitemaps/{sitemap}B\006\n" + "\004feedB\234\002\n" - + "\'com.google.cloud.discoveryengine.v1betaB\025SiteS" - + "earchEngineProtoP\001ZQcloud.google.com/go/discoveryengine/apiv1beta/discoveryengin" - + "epb;discoveryenginepb\242\002\017DISCOVERYENGINE\252" - + "\002#Google.Cloud.DiscoveryEngine.V1Beta\312\002#" - + "Google\\Cloud\\DiscoveryEngine\\V1beta\352\002&Go" - + "ogle::Cloud::DiscoveryEngine::V1betab\006proto3" + + "\'com.google.cloud.discoveryengine.v1betaB\025SiteSearchEn" + + "gineProtoP\001ZQcloud.google.com/go/discoveryengine/apiv1beta/discoveryenginepb;dis" + + "coveryenginepb\242\002\017DISCOVERYENGINE\252\002#Googl" + + "e.Cloud.DiscoveryEngine.V1Beta\312\002#Google\\" + + "Cloud\\DiscoveryEngine\\V1beta\352\002&Google::C" + + "loud::DiscoveryEngine::V1betab\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/SiteSearchEngineServiceProto.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/SiteSearchEngineServiceProto.java index 261978c8156e..b9e7261910c9 100644 --- a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/SiteSearchEngineServiceProto.java +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/SiteSearchEngineServiceProto.java @@ -309,185 +309,192 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "Info.FailureReason.CorpusType\022\025\n\rerror_m" + "essage\030\002 \001(\t\"B\n\nCorpusType\022\033\n\027CORPUS_TYP" + "E_UNSPECIFIED\020\000\022\013\n\007DESKTOP\020\001\022\n\n\006MOBILE\020\002" - + "\"\345\002\n\023RecrawlUrisMetadata\022/\n\013create_time\030" + + "\"\227\003\n\023RecrawlUrisMetadata\022/\n\013create_time\030" + "\001 \001(\0132\032.google.protobuf.Timestamp\022/\n\013upd" + "ate_time\030\002 \001(\0132\032.google.protobuf.Timesta" + "mp\022\024\n\014invalid_uris\030\003 \003(\t\022\032\n\022invalid_uris" - + "_count\030\010 \001(\005\022&\n\036uris_not_matching_target" - + "_sites\030\t \003(\t\022,\n$uris_not_matching_target" - + "_sites_count\030\n \001(\005\022\030\n\020valid_uris_count\030\004" - + " \001(\005\022\025\n\rsuccess_count\030\005 \001(\005\022\025\n\rpending_c" - + "ount\030\006 \001(\005\022\034\n\024quota_exceeded_count\030\007 \001(\005" - + "\"h\n\035BatchVerifyTargetSitesRequest\022G\n\006par" - + "ent\030\001 \001(\tB7\340A\002\372A1\n/discoveryengine.googl" - + "eapis.com/SiteSearchEngine\" \n\036BatchVerif" - + "yTargetSitesResponse\"\202\001\n\036BatchVerifyTarg" - + "etSitesMetadata\022/\n\013create_time\030\001 \001(\0132\032.g" - + "oogle.protobuf.Timestamp\022/\n\013update_time\030" - + "\002 \001(\0132\032.google.protobuf.Timestamp\"\242\001\n$Fe" - + "tchDomainVerificationStatusRequest\022S\n\022si" - + "te_search_engine\030\001 \001(\tB7\340A\002\372A1\n/discover" - + "yengine.googleapis.com/SiteSearchEngine\022" - + "\021\n\tpage_size\030\002 \001(\005\022\022\n\npage_token\030\003 \001(\t\"\233" - + "\001\n%FetchDomainVerificationStatusResponse" - + "\022E\n\014target_sites\030\001 \003(\0132/.google.cloud.di" - + "scoveryengine.v1beta.TargetSite\022\027\n\017next_" - + "page_token\030\002 \001(\t\022\022\n\ntotal_size\030\003 \001(\0052\2600\n" - + "\027SiteSearchEngineService\022\270\002\n\023GetSiteSear" - + "chEngine\022?.google.cloud.discoveryengine." - + "v1beta.GetSiteSearchEngineRequest\0325.goog" - + "le.cloud.discoveryengine.v1beta.SiteSear" - + "chEngine\"\250\001\332A\004name\202\323\344\223\002\232\001\022C/v1beta/{name" - + "=projects/*/locations/*/dataStores/*/sit" - + "eSearchEngine}ZS\022Q/v1beta/{name=projects" - + "/*/locations/*/collections/*/dataStores/" - + "*/siteSearchEngine}\022\317\003\n\020CreateTargetSite" - + "\022<.google.cloud.discoveryengine.v1beta.C" - + "reateTargetSiteRequest\032\035.google.longrunn" - + "ing.Operation\"\335\002\312An\n.google.cloud.discov" - + "eryengine.v1beta.TargetSite\022SOLUTION_TYPE_GENERATIVE_CHAT = 4; */ SOLUTION_TYPE_GENERATIVE_CHAT(4), + /** + * + * + *
            +   * Used for AI Mode.
            +   * 
            + * + * SOLUTION_TYPE_AI_MODE = 5; + */ + SOLUTION_TYPE_AI_MODE(5), UNRECOGNIZED(-1), ; @@ -153,6 +163,17 @@ public enum SolutionType implements com.google.protobuf.ProtocolMessageEnum { */ public static final int SOLUTION_TYPE_GENERATIVE_CHAT_VALUE = 4; + /** + * + * + *
            +   * Used for AI Mode.
            +   * 
            + * + * SOLUTION_TYPE_AI_MODE = 5; + */ + public static final int SOLUTION_TYPE_AI_MODE_VALUE = 5; + public final int getNumber() { if (this == UNRECOGNIZED) { throw new java.lang.IllegalArgumentException( @@ -187,6 +208,8 @@ public static SolutionType forNumber(int value) { return SOLUTION_TYPE_CHAT; case 4: return SOLUTION_TYPE_GENERATIVE_CHAT; + case 5: + return SOLUTION_TYPE_AI_MODE; default: return null; } diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/StreamAssistRequest.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/StreamAssistRequest.java new file mode 100644 index 000000000000..b02ff9b2a4d8 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/StreamAssistRequest.java @@ -0,0 +1,7848 @@ +/* + * 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/cloud/discoveryengine/v1beta/assistant_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.discoveryengine.v1beta; + +/** + * + * + *
            + * Request for the
            + * [AssistantService.StreamAssist][google.cloud.discoveryengine.v1beta.AssistantService.StreamAssist]
            + * method.
            + * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.StreamAssistRequest} + */ +@com.google.protobuf.Generated +public final class StreamAssistRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.StreamAssistRequest) + StreamAssistRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "StreamAssistRequest"); + } + + // Use StreamAssistRequest.newBuilder() to construct. + private StreamAssistRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private StreamAssistRequest() { + name_ = ""; + session_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.AssistantServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_StreamAssistRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.AssistantServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_StreamAssistRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.class, + com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.Builder.class); + } + + public interface ToolsSpecOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
            +     * Optional. Specification of the Vertex AI Search tool.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec.VertexAiSearchSpec vertex_ai_search_spec = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the vertexAiSearchSpec field is set. + */ + boolean hasVertexAiSearchSpec(); + + /** + * + * + *
            +     * Optional. Specification of the Vertex AI Search tool.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec.VertexAiSearchSpec vertex_ai_search_spec = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The vertexAiSearchSpec. + */ + com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec.VertexAiSearchSpec + getVertexAiSearchSpec(); + + /** + * + * + *
            +     * Optional. Specification of the Vertex AI Search tool.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec.VertexAiSearchSpec vertex_ai_search_spec = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec + .VertexAiSearchSpecOrBuilder + getVertexAiSearchSpecOrBuilder(); + + /** + * + * + *
            +     * Optional. Specification of the web grounding tool.
            +     * If field is present, enables grounding with web search. Works only if
            +     * [Assistant.web_grounding_type][google.cloud.discoveryengine.v1beta.Assistant.web_grounding_type]
            +     * is
            +     * [WEB_GROUNDING_TYPE_GOOGLE_SEARCH][google.cloud.discoveryengine.v1beta.Assistant.WebGroundingType.WEB_GROUNDING_TYPE_GOOGLE_SEARCH]
            +     * or
            +     * [WEB_GROUNDING_TYPE_ENTERPRISE_WEB_SEARCH][google.cloud.discoveryengine.v1beta.Assistant.WebGroundingType.WEB_GROUNDING_TYPE_ENTERPRISE_WEB_SEARCH].
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec.WebGroundingSpec web_grounding_spec = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the webGroundingSpec field is set. + */ + boolean hasWebGroundingSpec(); + + /** + * + * + *
            +     * Optional. Specification of the web grounding tool.
            +     * If field is present, enables grounding with web search. Works only if
            +     * [Assistant.web_grounding_type][google.cloud.discoveryengine.v1beta.Assistant.web_grounding_type]
            +     * is
            +     * [WEB_GROUNDING_TYPE_GOOGLE_SEARCH][google.cloud.discoveryengine.v1beta.Assistant.WebGroundingType.WEB_GROUNDING_TYPE_GOOGLE_SEARCH]
            +     * or
            +     * [WEB_GROUNDING_TYPE_ENTERPRISE_WEB_SEARCH][google.cloud.discoveryengine.v1beta.Assistant.WebGroundingType.WEB_GROUNDING_TYPE_ENTERPRISE_WEB_SEARCH].
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec.WebGroundingSpec web_grounding_spec = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The webGroundingSpec. + */ + com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec.WebGroundingSpec + getWebGroundingSpec(); + + /** + * + * + *
            +     * Optional. Specification of the web grounding tool.
            +     * If field is present, enables grounding with web search. Works only if
            +     * [Assistant.web_grounding_type][google.cloud.discoveryengine.v1beta.Assistant.web_grounding_type]
            +     * is
            +     * [WEB_GROUNDING_TYPE_GOOGLE_SEARCH][google.cloud.discoveryengine.v1beta.Assistant.WebGroundingType.WEB_GROUNDING_TYPE_GOOGLE_SEARCH]
            +     * or
            +     * [WEB_GROUNDING_TYPE_ENTERPRISE_WEB_SEARCH][google.cloud.discoveryengine.v1beta.Assistant.WebGroundingType.WEB_GROUNDING_TYPE_ENTERPRISE_WEB_SEARCH].
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec.WebGroundingSpec web_grounding_spec = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec.WebGroundingSpecOrBuilder + getWebGroundingSpecOrBuilder(); + + /** + * + * + *
            +     * Optional. Specification of the image generation tool.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec.ImageGenerationSpec image_generation_spec = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the imageGenerationSpec field is set. + */ + boolean hasImageGenerationSpec(); + + /** + * + * + *
            +     * Optional. Specification of the image generation tool.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec.ImageGenerationSpec image_generation_spec = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The imageGenerationSpec. + */ + com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec.ImageGenerationSpec + getImageGenerationSpec(); + + /** + * + * + *
            +     * Optional. Specification of the image generation tool.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec.ImageGenerationSpec image_generation_spec = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec + .ImageGenerationSpecOrBuilder + getImageGenerationSpecOrBuilder(); + + /** + * + * + *
            +     * Optional. Specification of the video generation tool.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec.VideoGenerationSpec video_generation_spec = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the videoGenerationSpec field is set. + */ + boolean hasVideoGenerationSpec(); + + /** + * + * + *
            +     * Optional. Specification of the video generation tool.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec.VideoGenerationSpec video_generation_spec = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The videoGenerationSpec. + */ + com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec.VideoGenerationSpec + getVideoGenerationSpec(); + + /** + * + * + *
            +     * Optional. Specification of the video generation tool.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec.VideoGenerationSpec video_generation_spec = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec + .VideoGenerationSpecOrBuilder + getVideoGenerationSpecOrBuilder(); + } + + /** + * + * + *
            +   * Specification of tools that are used to serve the request.
            +   * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec} + */ + public static final class ToolsSpec extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec) + ToolsSpecOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ToolsSpec"); + } + + // Use ToolsSpec.newBuilder() to construct. + private ToolsSpec(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ToolsSpec() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.AssistantServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_StreamAssistRequest_ToolsSpec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.AssistantServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_StreamAssistRequest_ToolsSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec.class, + com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec.Builder.class); + } + + public interface VertexAiSearchSpecOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec.VertexAiSearchSpec) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
            +       * Optional. Specs defining
            +       * [DataStore][google.cloud.discoveryengine.v1beta.DataStore]s to filter
            +       * on in a search call and configurations for those data stores. This is
            +       * only considered for
            +       * [Engine][google.cloud.discoveryengine.v1beta.Engine]s with multiple
            +       * data stores.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec data_store_specs = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List + getDataStoreSpecsList(); + + /** + * + * + *
            +       * Optional. Specs defining
            +       * [DataStore][google.cloud.discoveryengine.v1beta.DataStore]s to filter
            +       * on in a search call and configurations for those data stores. This is
            +       * only considered for
            +       * [Engine][google.cloud.discoveryengine.v1beta.Engine]s with multiple
            +       * data stores.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec data_store_specs = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec getDataStoreSpecs( + int index); + + /** + * + * + *
            +       * Optional. Specs defining
            +       * [DataStore][google.cloud.discoveryengine.v1beta.DataStore]s to filter
            +       * on in a search call and configurations for those data stores. This is
            +       * only considered for
            +       * [Engine][google.cloud.discoveryengine.v1beta.Engine]s with multiple
            +       * data stores.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec data_store_specs = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + int getDataStoreSpecsCount(); + + /** + * + * + *
            +       * Optional. Specs defining
            +       * [DataStore][google.cloud.discoveryengine.v1beta.DataStore]s to filter
            +       * on in a search call and configurations for those data stores. This is
            +       * only considered for
            +       * [Engine][google.cloud.discoveryengine.v1beta.Engine]s with multiple
            +       * data stores.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec data_store_specs = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List< + ? extends + com.google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpecOrBuilder> + getDataStoreSpecsOrBuilderList(); + + /** + * + * + *
            +       * Optional. Specs defining
            +       * [DataStore][google.cloud.discoveryengine.v1beta.DataStore]s to filter
            +       * on in a search call and configurations for those data stores. This is
            +       * only considered for
            +       * [Engine][google.cloud.discoveryengine.v1beta.Engine]s with multiple
            +       * data stores.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec data_store_specs = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpecOrBuilder + getDataStoreSpecsOrBuilder(int index); + + /** + * + * + *
            +       * Optional. The filter syntax consists of an expression language for
            +       * constructing a predicate from one or more fields of the documents being
            +       * filtered. Filter expression is case-sensitive.
            +       *
            +       * If this field is unrecognizable, an  `INVALID_ARGUMENT`  is returned.
            +       *
            +       * Filtering in Vertex AI Search is done by mapping the LHS filter key to
            +       * a key property defined in the Vertex AI Search backend -- this mapping
            +       * is defined by the customer in their schema. For example a media
            +       * customer might have a field 'name' in their schema. In this case the
            +       * filter would look like this: filter --> name:'ANY("king kong")'
            +       *
            +       * For more information about filtering including syntax and filter
            +       * operators, see
            +       * [Filter](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata)
            +       * 
            + * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The filter. + */ + java.lang.String getFilter(); + + /** + * + * + *
            +       * Optional. The filter syntax consists of an expression language for
            +       * constructing a predicate from one or more fields of the documents being
            +       * filtered. Filter expression is case-sensitive.
            +       *
            +       * If this field is unrecognizable, an  `INVALID_ARGUMENT`  is returned.
            +       *
            +       * Filtering in Vertex AI Search is done by mapping the LHS filter key to
            +       * a key property defined in the Vertex AI Search backend -- this mapping
            +       * is defined by the customer in their schema. For example a media
            +       * customer might have a field 'name' in their schema. In this case the
            +       * filter would look like this: filter --> name:'ANY("king kong")'
            +       *
            +       * For more information about filtering including syntax and filter
            +       * operators, see
            +       * [Filter](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata)
            +       * 
            + * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for filter. + */ + com.google.protobuf.ByteString getFilterBytes(); + } + + /** + * + * + *
            +     * Specification of the Vertex AI Search tool.
            +     * 
            + * + * Protobuf type {@code + * google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec.VertexAiSearchSpec} + */ + public static final class VertexAiSearchSpec extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec.VertexAiSearchSpec) + VertexAiSearchSpecOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "VertexAiSearchSpec"); + } + + // Use VertexAiSearchSpec.newBuilder() to construct. + private VertexAiSearchSpec(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private VertexAiSearchSpec() { + dataStoreSpecs_ = java.util.Collections.emptyList(); + filter_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.AssistantServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_StreamAssistRequest_ToolsSpec_VertexAiSearchSpec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.AssistantServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_StreamAssistRequest_ToolsSpec_VertexAiSearchSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec + .VertexAiSearchSpec.class, + com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec + .VertexAiSearchSpec.Builder.class); + } + + public static final int DATA_STORE_SPECS_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private java.util.List + dataStoreSpecs_; + + /** + * + * + *
            +       * Optional. Specs defining
            +       * [DataStore][google.cloud.discoveryengine.v1beta.DataStore]s to filter
            +       * on in a search call and configurations for those data stores. This is
            +       * only considered for
            +       * [Engine][google.cloud.discoveryengine.v1beta.Engine]s with multiple
            +       * data stores.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec data_store_specs = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List + getDataStoreSpecsList() { + return dataStoreSpecs_; + } + + /** + * + * + *
            +       * Optional. Specs defining
            +       * [DataStore][google.cloud.discoveryengine.v1beta.DataStore]s to filter
            +       * on in a search call and configurations for those data stores. This is
            +       * only considered for
            +       * [Engine][google.cloud.discoveryengine.v1beta.Engine]s with multiple
            +       * data stores.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec data_store_specs = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List< + ? extends + com.google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpecOrBuilder> + getDataStoreSpecsOrBuilderList() { + return dataStoreSpecs_; + } + + /** + * + * + *
            +       * Optional. Specs defining
            +       * [DataStore][google.cloud.discoveryengine.v1beta.DataStore]s to filter
            +       * on in a search call and configurations for those data stores. This is
            +       * only considered for
            +       * [Engine][google.cloud.discoveryengine.v1beta.Engine]s with multiple
            +       * data stores.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec data_store_specs = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public int getDataStoreSpecsCount() { + return dataStoreSpecs_.size(); + } + + /** + * + * + *
            +       * Optional. Specs defining
            +       * [DataStore][google.cloud.discoveryengine.v1beta.DataStore]s to filter
            +       * on in a search call and configurations for those data stores. This is
            +       * only considered for
            +       * [Engine][google.cloud.discoveryengine.v1beta.Engine]s with multiple
            +       * data stores.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec data_store_specs = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec getDataStoreSpecs( + int index) { + return dataStoreSpecs_.get(index); + } + + /** + * + * + *
            +       * Optional. Specs defining
            +       * [DataStore][google.cloud.discoveryengine.v1beta.DataStore]s to filter
            +       * on in a search call and configurations for those data stores. This is
            +       * only considered for
            +       * [Engine][google.cloud.discoveryengine.v1beta.Engine]s with multiple
            +       * data stores.
            +       * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec data_store_specs = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpecOrBuilder + getDataStoreSpecsOrBuilder(int index) { + return dataStoreSpecs_.get(index); + } + + public static final int FILTER_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object filter_ = ""; + + /** + * + * + *
            +       * Optional. The filter syntax consists of an expression language for
            +       * constructing a predicate from one or more fields of the documents being
            +       * filtered. Filter expression is case-sensitive.
            +       *
            +       * If this field is unrecognizable, an  `INVALID_ARGUMENT`  is returned.
            +       *
            +       * Filtering in Vertex AI Search is done by mapping the LHS filter key to
            +       * a key property defined in the Vertex AI Search backend -- this mapping
            +       * is defined by the customer in their schema. For example a media
            +       * customer might have a field 'name' in their schema. In this case the
            +       * filter would look like this: filter --> name:'ANY("king kong")'
            +       *
            +       * For more information about filtering including syntax and filter
            +       * operators, see
            +       * [Filter](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata)
            +       * 
            + * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
            +       * Optional. The filter syntax consists of an expression language for
            +       * constructing a predicate from one or more fields of the documents being
            +       * filtered. Filter expression is case-sensitive.
            +       *
            +       * If this field is unrecognizable, an  `INVALID_ARGUMENT`  is returned.
            +       *
            +       * Filtering in Vertex AI Search is done by mapping the LHS filter key to
            +       * a key property defined in the Vertex AI Search backend -- this mapping
            +       * is defined by the customer in their schema. For example a media
            +       * customer might have a field 'name' in their schema. In this case the
            +       * filter would look like this: filter --> name:'ANY("king kong")'
            +       *
            +       * For more information about filtering including syntax and filter
            +       * operators, see
            +       * [Filter](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata)
            +       * 
            + * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + 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 < dataStoreSpecs_.size(); i++) { + output.writeMessage(2, dataStoreSpecs_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(filter_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, filter_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < dataStoreSpecs_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(2, dataStoreSpecs_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(filter_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, filter_); + } + 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.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec + .VertexAiSearchSpec)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec.VertexAiSearchSpec + other = + (com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec + .VertexAiSearchSpec) + obj; + + if (!getDataStoreSpecsList().equals(other.getDataStoreSpecsList())) return false; + if (!getFilter().equals(other.getFilter())) 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 (getDataStoreSpecsCount() > 0) { + hash = (37 * hash) + DATA_STORE_SPECS_FIELD_NUMBER; + hash = (53 * hash) + getDataStoreSpecsList().hashCode(); + } + hash = (37 * hash) + FILTER_FIELD_NUMBER; + hash = (53 * hash) + getFilter().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec + .VertexAiSearchSpec + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec + .VertexAiSearchSpec + 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.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec + .VertexAiSearchSpec + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec + .VertexAiSearchSpec + 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.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec + .VertexAiSearchSpec + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec + .VertexAiSearchSpec + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec + .VertexAiSearchSpec + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec + .VertexAiSearchSpec + 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.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec + .VertexAiSearchSpec + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec + .VertexAiSearchSpec + 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.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec + .VertexAiSearchSpec + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec + .VertexAiSearchSpec + 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.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec.VertexAiSearchSpec + 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; + } + + /** + * + * + *
            +       * Specification of the Vertex AI Search tool.
            +       * 
            + * + * Protobuf type {@code + * google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec.VertexAiSearchSpec} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec.VertexAiSearchSpec) + com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec + .VertexAiSearchSpecOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.AssistantServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_StreamAssistRequest_ToolsSpec_VertexAiSearchSpec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.AssistantServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_StreamAssistRequest_ToolsSpec_VertexAiSearchSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec + .VertexAiSearchSpec.class, + com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec + .VertexAiSearchSpec.Builder.class); + } + + // Construct using + // com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec.VertexAiSearchSpec.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (dataStoreSpecsBuilder_ == null) { + dataStoreSpecs_ = java.util.Collections.emptyList(); + } else { + dataStoreSpecs_ = null; + dataStoreSpecsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + filter_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1beta.AssistantServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_StreamAssistRequest_ToolsSpec_VertexAiSearchSpec_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec + .VertexAiSearchSpec + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec + .VertexAiSearchSpec.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec + .VertexAiSearchSpec + build() { + com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec.VertexAiSearchSpec + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec + .VertexAiSearchSpec + buildPartial() { + com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec.VertexAiSearchSpec + result = + new com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec + .VertexAiSearchSpec(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec.VertexAiSearchSpec + result) { + if (dataStoreSpecsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + dataStoreSpecs_ = java.util.Collections.unmodifiableList(dataStoreSpecs_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.dataStoreSpecs_ = dataStoreSpecs_; + } else { + result.dataStoreSpecs_ = dataStoreSpecsBuilder_.build(); + } + } + + private void buildPartial0( + com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec.VertexAiSearchSpec + result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.filter_ = filter_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec + .VertexAiSearchSpec) { + return mergeFrom( + (com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec + .VertexAiSearchSpec) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec.VertexAiSearchSpec + other) { + if (other + == com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec + .VertexAiSearchSpec.getDefaultInstance()) return this; + if (dataStoreSpecsBuilder_ == null) { + if (!other.dataStoreSpecs_.isEmpty()) { + if (dataStoreSpecs_.isEmpty()) { + dataStoreSpecs_ = other.dataStoreSpecs_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureDataStoreSpecsIsMutable(); + dataStoreSpecs_.addAll(other.dataStoreSpecs_); + } + onChanged(); + } + } else { + if (!other.dataStoreSpecs_.isEmpty()) { + if (dataStoreSpecsBuilder_.isEmpty()) { + dataStoreSpecsBuilder_.dispose(); + dataStoreSpecsBuilder_ = null; + dataStoreSpecs_ = other.dataStoreSpecs_; + bitField0_ = (bitField0_ & ~0x00000001); + dataStoreSpecsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetDataStoreSpecsFieldBuilder() + : null; + } else { + dataStoreSpecsBuilder_.addAllMessages(other.dataStoreSpecs_); + } + } + } + if (!other.getFilter().isEmpty()) { + filter_ = other.filter_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 18: + { + com.google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec m = + input.readMessage( + com.google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec + .parser(), + extensionRegistry); + if (dataStoreSpecsBuilder_ == null) { + ensureDataStoreSpecsIsMutable(); + dataStoreSpecs_.add(m); + } else { + dataStoreSpecsBuilder_.addMessage(m); + } + break; + } // case 18 + case 34: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List + dataStoreSpecs_ = java.util.Collections.emptyList(); + + private void ensureDataStoreSpecsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + dataStoreSpecs_ = + new java.util.ArrayList< + com.google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec>( + dataStoreSpecs_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec, + com.google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec.Builder, + com.google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpecOrBuilder> + dataStoreSpecsBuilder_; + + /** + * + * + *
            +         * Optional. Specs defining
            +         * [DataStore][google.cloud.discoveryengine.v1beta.DataStore]s to filter
            +         * on in a search call and configurations for those data stores. This is
            +         * only considered for
            +         * [Engine][google.cloud.discoveryengine.v1beta.Engine]s with multiple
            +         * data stores.
            +         * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec data_store_specs = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getDataStoreSpecsList() { + if (dataStoreSpecsBuilder_ == null) { + return java.util.Collections.unmodifiableList(dataStoreSpecs_); + } else { + return dataStoreSpecsBuilder_.getMessageList(); + } + } + + /** + * + * + *
            +         * Optional. Specs defining
            +         * [DataStore][google.cloud.discoveryengine.v1beta.DataStore]s to filter
            +         * on in a search call and configurations for those data stores. This is
            +         * only considered for
            +         * [Engine][google.cloud.discoveryengine.v1beta.Engine]s with multiple
            +         * data stores.
            +         * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec data_store_specs = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public int getDataStoreSpecsCount() { + if (dataStoreSpecsBuilder_ == null) { + return dataStoreSpecs_.size(); + } else { + return dataStoreSpecsBuilder_.getCount(); + } + } + + /** + * + * + *
            +         * Optional. Specs defining
            +         * [DataStore][google.cloud.discoveryengine.v1beta.DataStore]s to filter
            +         * on in a search call and configurations for those data stores. This is
            +         * only considered for
            +         * [Engine][google.cloud.discoveryengine.v1beta.Engine]s with multiple
            +         * data stores.
            +         * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec data_store_specs = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec + getDataStoreSpecs(int index) { + if (dataStoreSpecsBuilder_ == null) { + return dataStoreSpecs_.get(index); + } else { + return dataStoreSpecsBuilder_.getMessage(index); + } + } + + /** + * + * + *
            +         * Optional. Specs defining
            +         * [DataStore][google.cloud.discoveryengine.v1beta.DataStore]s to filter
            +         * on in a search call and configurations for those data stores. This is
            +         * only considered for
            +         * [Engine][google.cloud.discoveryengine.v1beta.Engine]s with multiple
            +         * data stores.
            +         * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec data_store_specs = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setDataStoreSpecs( + int index, com.google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec value) { + if (dataStoreSpecsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDataStoreSpecsIsMutable(); + dataStoreSpecs_.set(index, value); + onChanged(); + } else { + dataStoreSpecsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
            +         * Optional. Specs defining
            +         * [DataStore][google.cloud.discoveryengine.v1beta.DataStore]s to filter
            +         * on in a search call and configurations for those data stores. This is
            +         * only considered for
            +         * [Engine][google.cloud.discoveryengine.v1beta.Engine]s with multiple
            +         * data stores.
            +         * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec data_store_specs = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setDataStoreSpecs( + int index, + com.google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec.Builder + builderForValue) { + if (dataStoreSpecsBuilder_ == null) { + ensureDataStoreSpecsIsMutable(); + dataStoreSpecs_.set(index, builderForValue.build()); + onChanged(); + } else { + dataStoreSpecsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
            +         * Optional. Specs defining
            +         * [DataStore][google.cloud.discoveryengine.v1beta.DataStore]s to filter
            +         * on in a search call and configurations for those data stores. This is
            +         * only considered for
            +         * [Engine][google.cloud.discoveryengine.v1beta.Engine]s with multiple
            +         * data stores.
            +         * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec data_store_specs = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addDataStoreSpecs( + com.google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec value) { + if (dataStoreSpecsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDataStoreSpecsIsMutable(); + dataStoreSpecs_.add(value); + onChanged(); + } else { + dataStoreSpecsBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
            +         * Optional. Specs defining
            +         * [DataStore][google.cloud.discoveryengine.v1beta.DataStore]s to filter
            +         * on in a search call and configurations for those data stores. This is
            +         * only considered for
            +         * [Engine][google.cloud.discoveryengine.v1beta.Engine]s with multiple
            +         * data stores.
            +         * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec data_store_specs = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addDataStoreSpecs( + int index, com.google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec value) { + if (dataStoreSpecsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDataStoreSpecsIsMutable(); + dataStoreSpecs_.add(index, value); + onChanged(); + } else { + dataStoreSpecsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
            +         * Optional. Specs defining
            +         * [DataStore][google.cloud.discoveryengine.v1beta.DataStore]s to filter
            +         * on in a search call and configurations for those data stores. This is
            +         * only considered for
            +         * [Engine][google.cloud.discoveryengine.v1beta.Engine]s with multiple
            +         * data stores.
            +         * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec data_store_specs = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addDataStoreSpecs( + com.google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec.Builder + builderForValue) { + if (dataStoreSpecsBuilder_ == null) { + ensureDataStoreSpecsIsMutable(); + dataStoreSpecs_.add(builderForValue.build()); + onChanged(); + } else { + dataStoreSpecsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
            +         * Optional. Specs defining
            +         * [DataStore][google.cloud.discoveryengine.v1beta.DataStore]s to filter
            +         * on in a search call and configurations for those data stores. This is
            +         * only considered for
            +         * [Engine][google.cloud.discoveryengine.v1beta.Engine]s with multiple
            +         * data stores.
            +         * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec data_store_specs = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addDataStoreSpecs( + int index, + com.google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec.Builder + builderForValue) { + if (dataStoreSpecsBuilder_ == null) { + ensureDataStoreSpecsIsMutable(); + dataStoreSpecs_.add(index, builderForValue.build()); + onChanged(); + } else { + dataStoreSpecsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
            +         * Optional. Specs defining
            +         * [DataStore][google.cloud.discoveryengine.v1beta.DataStore]s to filter
            +         * on in a search call and configurations for those data stores. This is
            +         * only considered for
            +         * [Engine][google.cloud.discoveryengine.v1beta.Engine]s with multiple
            +         * data stores.
            +         * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec data_store_specs = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addAllDataStoreSpecs( + java.lang.Iterable< + ? extends com.google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec> + values) { + if (dataStoreSpecsBuilder_ == null) { + ensureDataStoreSpecsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, dataStoreSpecs_); + onChanged(); + } else { + dataStoreSpecsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
            +         * Optional. Specs defining
            +         * [DataStore][google.cloud.discoveryengine.v1beta.DataStore]s to filter
            +         * on in a search call and configurations for those data stores. This is
            +         * only considered for
            +         * [Engine][google.cloud.discoveryengine.v1beta.Engine]s with multiple
            +         * data stores.
            +         * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec data_store_specs = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearDataStoreSpecs() { + if (dataStoreSpecsBuilder_ == null) { + dataStoreSpecs_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + dataStoreSpecsBuilder_.clear(); + } + return this; + } + + /** + * + * + *
            +         * Optional. Specs defining
            +         * [DataStore][google.cloud.discoveryengine.v1beta.DataStore]s to filter
            +         * on in a search call and configurations for those data stores. This is
            +         * only considered for
            +         * [Engine][google.cloud.discoveryengine.v1beta.Engine]s with multiple
            +         * data stores.
            +         * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec data_store_specs = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder removeDataStoreSpecs(int index) { + if (dataStoreSpecsBuilder_ == null) { + ensureDataStoreSpecsIsMutable(); + dataStoreSpecs_.remove(index); + onChanged(); + } else { + dataStoreSpecsBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
            +         * Optional. Specs defining
            +         * [DataStore][google.cloud.discoveryengine.v1beta.DataStore]s to filter
            +         * on in a search call and configurations for those data stores. This is
            +         * only considered for
            +         * [Engine][google.cloud.discoveryengine.v1beta.Engine]s with multiple
            +         * data stores.
            +         * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec data_store_specs = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec.Builder + getDataStoreSpecsBuilder(int index) { + return internalGetDataStoreSpecsFieldBuilder().getBuilder(index); + } + + /** + * + * + *
            +         * Optional. Specs defining
            +         * [DataStore][google.cloud.discoveryengine.v1beta.DataStore]s to filter
            +         * on in a search call and configurations for those data stores. This is
            +         * only considered for
            +         * [Engine][google.cloud.discoveryengine.v1beta.Engine]s with multiple
            +         * data stores.
            +         * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec data_store_specs = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpecOrBuilder + getDataStoreSpecsOrBuilder(int index) { + if (dataStoreSpecsBuilder_ == null) { + return dataStoreSpecs_.get(index); + } else { + return dataStoreSpecsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
            +         * Optional. Specs defining
            +         * [DataStore][google.cloud.discoveryengine.v1beta.DataStore]s to filter
            +         * on in a search call and configurations for those data stores. This is
            +         * only considered for
            +         * [Engine][google.cloud.discoveryengine.v1beta.Engine]s with multiple
            +         * data stores.
            +         * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec data_store_specs = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List< + ? extends + com.google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpecOrBuilder> + getDataStoreSpecsOrBuilderList() { + if (dataStoreSpecsBuilder_ != null) { + return dataStoreSpecsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(dataStoreSpecs_); + } + } + + /** + * + * + *
            +         * Optional. Specs defining
            +         * [DataStore][google.cloud.discoveryengine.v1beta.DataStore]s to filter
            +         * on in a search call and configurations for those data stores. This is
            +         * only considered for
            +         * [Engine][google.cloud.discoveryengine.v1beta.Engine]s with multiple
            +         * data stores.
            +         * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec data_store_specs = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec.Builder + addDataStoreSpecsBuilder() { + return internalGetDataStoreSpecsFieldBuilder() + .addBuilder( + com.google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec + .getDefaultInstance()); + } + + /** + * + * + *
            +         * Optional. Specs defining
            +         * [DataStore][google.cloud.discoveryengine.v1beta.DataStore]s to filter
            +         * on in a search call and configurations for those data stores. This is
            +         * only considered for
            +         * [Engine][google.cloud.discoveryengine.v1beta.Engine]s with multiple
            +         * data stores.
            +         * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec data_store_specs = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec.Builder + addDataStoreSpecsBuilder(int index) { + return internalGetDataStoreSpecsFieldBuilder() + .addBuilder( + index, + com.google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec + .getDefaultInstance()); + } + + /** + * + * + *
            +         * Optional. Specs defining
            +         * [DataStore][google.cloud.discoveryengine.v1beta.DataStore]s to filter
            +         * on in a search call and configurations for those data stores. This is
            +         * only considered for
            +         * [Engine][google.cloud.discoveryengine.v1beta.Engine]s with multiple
            +         * data stores.
            +         * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec data_store_specs = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List< + com.google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec.Builder> + getDataStoreSpecsBuilderList() { + return internalGetDataStoreSpecsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec, + com.google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec.Builder, + com.google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpecOrBuilder> + internalGetDataStoreSpecsFieldBuilder() { + if (dataStoreSpecsBuilder_ == null) { + dataStoreSpecsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec, + com.google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec.Builder, + com.google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpecOrBuilder>( + dataStoreSpecs_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + dataStoreSpecs_ = null; + } + return dataStoreSpecsBuilder_; + } + + private java.lang.Object filter_ = ""; + + /** + * + * + *
            +         * Optional. The filter syntax consists of an expression language for
            +         * constructing a predicate from one or more fields of the documents being
            +         * filtered. Filter expression is case-sensitive.
            +         *
            +         * If this field is unrecognizable, an  `INVALID_ARGUMENT`  is returned.
            +         *
            +         * Filtering in Vertex AI Search is done by mapping the LHS filter key to
            +         * a key property defined in the Vertex AI Search backend -- this mapping
            +         * is defined by the customer in their schema. For example a media
            +         * customer might have a field 'name' in their schema. In this case the
            +         * filter would look like this: filter --> name:'ANY("king kong")'
            +         *
            +         * For more information about filtering including syntax and filter
            +         * operators, see
            +         * [Filter](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata)
            +         * 
            + * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
            +         * Optional. The filter syntax consists of an expression language for
            +         * constructing a predicate from one or more fields of the documents being
            +         * filtered. Filter expression is case-sensitive.
            +         *
            +         * If this field is unrecognizable, an  `INVALID_ARGUMENT`  is returned.
            +         *
            +         * Filtering in Vertex AI Search is done by mapping the LHS filter key to
            +         * a key property defined in the Vertex AI Search backend -- this mapping
            +         * is defined by the customer in their schema. For example a media
            +         * customer might have a field 'name' in their schema. In this case the
            +         * filter would look like this: filter --> name:'ANY("king kong")'
            +         *
            +         * For more information about filtering including syntax and filter
            +         * operators, see
            +         * [Filter](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata)
            +         * 
            + * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
            +         * Optional. The filter syntax consists of an expression language for
            +         * constructing a predicate from one or more fields of the documents being
            +         * filtered. Filter expression is case-sensitive.
            +         *
            +         * If this field is unrecognizable, an  `INVALID_ARGUMENT`  is returned.
            +         *
            +         * Filtering in Vertex AI Search is done by mapping the LHS filter key to
            +         * a key property defined in the Vertex AI Search backend -- this mapping
            +         * is defined by the customer in their schema. For example a media
            +         * customer might have a field 'name' in their schema. In this case the
            +         * filter would look like this: filter --> name:'ANY("king kong")'
            +         *
            +         * For more information about filtering including syntax and filter
            +         * operators, see
            +         * [Filter](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata)
            +         * 
            + * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + + /** + * + * + *
            +         * Optional. The filter syntax consists of an expression language for
            +         * constructing a predicate from one or more fields of the documents being
            +         * filtered. Filter expression is case-sensitive.
            +         *
            +         * If this field is unrecognizable, an  `INVALID_ARGUMENT`  is returned.
            +         *
            +         * Filtering in Vertex AI Search is done by mapping the LHS filter key to
            +         * a key property defined in the Vertex AI Search backend -- this mapping
            +         * is defined by the customer in their schema. For example a media
            +         * customer might have a field 'name' in their schema. In this case the
            +         * filter would look like this: filter --> name:'ANY("king kong")'
            +         *
            +         * For more information about filtering including syntax and filter
            +         * operators, see
            +         * [Filter](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata)
            +         * 
            + * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearFilter() { + filter_ = getDefaultInstance().getFilter(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
            +         * Optional. The filter syntax consists of an expression language for
            +         * constructing a predicate from one or more fields of the documents being
            +         * filtered. Filter expression is case-sensitive.
            +         *
            +         * If this field is unrecognizable, an  `INVALID_ARGUMENT`  is returned.
            +         *
            +         * Filtering in Vertex AI Search is done by mapping the LHS filter key to
            +         * a key property defined in the Vertex AI Search backend -- this mapping
            +         * is defined by the customer in their schema. For example a media
            +         * customer might have a field 'name' in their schema. In this case the
            +         * filter would look like this: filter --> name:'ANY("king kong")'
            +         *
            +         * For more information about filtering including syntax and filter
            +         * operators, see
            +         * [Filter](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata)
            +         * 
            + * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec.VertexAiSearchSpec) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec.VertexAiSearchSpec) + private static final com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec + .VertexAiSearchSpec + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec + .VertexAiSearchSpec(); + } + + public static com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec + .VertexAiSearchSpec + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public VertexAiSearchSpec parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec + .VertexAiSearchSpec + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface WebGroundingSpecOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec.WebGroundingSpec) + com.google.protobuf.MessageOrBuilder {} + + /** + * + * + *
            +     * Specification of the web grounding tool.
            +     * 
            + * + * Protobuf type {@code + * google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec.WebGroundingSpec} + */ + public static final class WebGroundingSpec extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec.WebGroundingSpec) + WebGroundingSpecOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "WebGroundingSpec"); + } + + // Use WebGroundingSpec.newBuilder() to construct. + private WebGroundingSpec(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private WebGroundingSpec() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.AssistantServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_StreamAssistRequest_ToolsSpec_WebGroundingSpec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.AssistantServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_StreamAssistRequest_ToolsSpec_WebGroundingSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec + .WebGroundingSpec.class, + com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec + .WebGroundingSpec.Builder.class); + } + + 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 { + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + 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.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec + .WebGroundingSpec)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec.WebGroundingSpec + other = + (com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec + .WebGroundingSpec) + obj; + + 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 = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec + .WebGroundingSpec + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec + .WebGroundingSpec + 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.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec + .WebGroundingSpec + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec + .WebGroundingSpec + 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.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec + .WebGroundingSpec + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec + .WebGroundingSpec + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec + .WebGroundingSpec + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec + .WebGroundingSpec + 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.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec + .WebGroundingSpec + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec + .WebGroundingSpec + 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.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec + .WebGroundingSpec + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec + .WebGroundingSpec + 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.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec.WebGroundingSpec + 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; + } + + /** + * + * + *
            +       * Specification of the web grounding tool.
            +       * 
            + * + * Protobuf type {@code + * google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec.WebGroundingSpec} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec.WebGroundingSpec) + com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec + .WebGroundingSpecOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.AssistantServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_StreamAssistRequest_ToolsSpec_WebGroundingSpec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.AssistantServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_StreamAssistRequest_ToolsSpec_WebGroundingSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec + .WebGroundingSpec.class, + com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec + .WebGroundingSpec.Builder.class); + } + + // Construct using + // com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec.WebGroundingSpec.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1beta.AssistantServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_StreamAssistRequest_ToolsSpec_WebGroundingSpec_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec + .WebGroundingSpec + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec + .WebGroundingSpec.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec + .WebGroundingSpec + build() { + com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec.WebGroundingSpec + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec + .WebGroundingSpec + buildPartial() { + com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec.WebGroundingSpec + result = + new com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec + .WebGroundingSpec(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec + .WebGroundingSpec) { + return mergeFrom( + (com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec + .WebGroundingSpec) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec.WebGroundingSpec + other) { + if (other + == com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec + .WebGroundingSpec.getDefaultInstance()) return this; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec.WebGroundingSpec) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec.WebGroundingSpec) + private static final com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec + .WebGroundingSpec + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec + .WebGroundingSpec(); + } + + public static com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec + .WebGroundingSpec + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public WebGroundingSpec parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec.WebGroundingSpec + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface ImageGenerationSpecOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec.ImageGenerationSpec) + com.google.protobuf.MessageOrBuilder {} + + /** + * + * + *
            +     * Specification of the image generation tool.
            +     * 
            + * + * Protobuf type {@code + * google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec.ImageGenerationSpec} + */ + public static final class ImageGenerationSpec extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec.ImageGenerationSpec) + ImageGenerationSpecOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ImageGenerationSpec"); + } + + // Use ImageGenerationSpec.newBuilder() to construct. + private ImageGenerationSpec(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ImageGenerationSpec() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.AssistantServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_StreamAssistRequest_ToolsSpec_ImageGenerationSpec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.AssistantServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_StreamAssistRequest_ToolsSpec_ImageGenerationSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec + .ImageGenerationSpec.class, + com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec + .ImageGenerationSpec.Builder.class); + } + + 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 { + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + 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.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec + .ImageGenerationSpec)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec.ImageGenerationSpec + other = + (com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec + .ImageGenerationSpec) + obj; + + 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 = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec + .ImageGenerationSpec + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec + .ImageGenerationSpec + 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.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec + .ImageGenerationSpec + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec + .ImageGenerationSpec + 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.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec + .ImageGenerationSpec + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec + .ImageGenerationSpec + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec + .ImageGenerationSpec + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec + .ImageGenerationSpec + 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.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec + .ImageGenerationSpec + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec + .ImageGenerationSpec + 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.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec + .ImageGenerationSpec + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec + .ImageGenerationSpec + 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.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec.ImageGenerationSpec + 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; + } + + /** + * + * + *
            +       * Specification of the image generation tool.
            +       * 
            + * + * Protobuf type {@code + * google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec.ImageGenerationSpec} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec.ImageGenerationSpec) + com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec + .ImageGenerationSpecOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.AssistantServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_StreamAssistRequest_ToolsSpec_ImageGenerationSpec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.AssistantServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_StreamAssistRequest_ToolsSpec_ImageGenerationSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec + .ImageGenerationSpec.class, + com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec + .ImageGenerationSpec.Builder.class); + } + + // Construct using + // com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec.ImageGenerationSpec.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1beta.AssistantServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_StreamAssistRequest_ToolsSpec_ImageGenerationSpec_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec + .ImageGenerationSpec + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec + .ImageGenerationSpec.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec + .ImageGenerationSpec + build() { + com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec.ImageGenerationSpec + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec + .ImageGenerationSpec + buildPartial() { + com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec.ImageGenerationSpec + result = + new com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec + .ImageGenerationSpec(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec + .ImageGenerationSpec) { + return mergeFrom( + (com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec + .ImageGenerationSpec) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec + .ImageGenerationSpec + other) { + if (other + == com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec + .ImageGenerationSpec.getDefaultInstance()) return this; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec.ImageGenerationSpec) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec.ImageGenerationSpec) + private static final com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec + .ImageGenerationSpec + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec + .ImageGenerationSpec(); + } + + public static com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec + .ImageGenerationSpec + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ImageGenerationSpec parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec + .ImageGenerationSpec + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface VideoGenerationSpecOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec.VideoGenerationSpec) + com.google.protobuf.MessageOrBuilder {} + + /** + * + * + *
            +     * Specification of the video generation tool.
            +     * 
            + * + * Protobuf type {@code + * google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec.VideoGenerationSpec} + */ + public static final class VideoGenerationSpec extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec.VideoGenerationSpec) + VideoGenerationSpecOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "VideoGenerationSpec"); + } + + // Use VideoGenerationSpec.newBuilder() to construct. + private VideoGenerationSpec(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private VideoGenerationSpec() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.AssistantServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_StreamAssistRequest_ToolsSpec_VideoGenerationSpec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.AssistantServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_StreamAssistRequest_ToolsSpec_VideoGenerationSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec + .VideoGenerationSpec.class, + com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec + .VideoGenerationSpec.Builder.class); + } + + 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 { + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + 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.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec + .VideoGenerationSpec)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec.VideoGenerationSpec + other = + (com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec + .VideoGenerationSpec) + obj; + + 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 = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec + .VideoGenerationSpec + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec + .VideoGenerationSpec + 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.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec + .VideoGenerationSpec + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec + .VideoGenerationSpec + 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.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec + .VideoGenerationSpec + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec + .VideoGenerationSpec + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec + .VideoGenerationSpec + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec + .VideoGenerationSpec + 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.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec + .VideoGenerationSpec + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec + .VideoGenerationSpec + 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.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec + .VideoGenerationSpec + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec + .VideoGenerationSpec + 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.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec.VideoGenerationSpec + 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; + } + + /** + * + * + *
            +       * Specification of the video generation tool.
            +       * 
            + * + * Protobuf type {@code + * google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec.VideoGenerationSpec} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec.VideoGenerationSpec) + com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec + .VideoGenerationSpecOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.AssistantServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_StreamAssistRequest_ToolsSpec_VideoGenerationSpec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.AssistantServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_StreamAssistRequest_ToolsSpec_VideoGenerationSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec + .VideoGenerationSpec.class, + com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec + .VideoGenerationSpec.Builder.class); + } + + // Construct using + // com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec.VideoGenerationSpec.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1beta.AssistantServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_StreamAssistRequest_ToolsSpec_VideoGenerationSpec_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec + .VideoGenerationSpec + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec + .VideoGenerationSpec.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec + .VideoGenerationSpec + build() { + com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec.VideoGenerationSpec + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec + .VideoGenerationSpec + buildPartial() { + com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec.VideoGenerationSpec + result = + new com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec + .VideoGenerationSpec(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec + .VideoGenerationSpec) { + return mergeFrom( + (com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec + .VideoGenerationSpec) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec + .VideoGenerationSpec + other) { + if (other + == com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec + .VideoGenerationSpec.getDefaultInstance()) return this; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec.VideoGenerationSpec) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec.VideoGenerationSpec) + private static final com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec + .VideoGenerationSpec + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec + .VideoGenerationSpec(); + } + + public static com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec + .VideoGenerationSpec + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public VideoGenerationSpec parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec + .VideoGenerationSpec + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int bitField0_; + public static final int VERTEX_AI_SEARCH_SPEC_FIELD_NUMBER = 1; + private com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec.VertexAiSearchSpec + vertexAiSearchSpec_; + + /** + * + * + *
            +     * Optional. Specification of the Vertex AI Search tool.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec.VertexAiSearchSpec vertex_ai_search_spec = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the vertexAiSearchSpec field is set. + */ + @java.lang.Override + public boolean hasVertexAiSearchSpec() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
            +     * Optional. Specification of the Vertex AI Search tool.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec.VertexAiSearchSpec vertex_ai_search_spec = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The vertexAiSearchSpec. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec.VertexAiSearchSpec + getVertexAiSearchSpec() { + return vertexAiSearchSpec_ == null + ? com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec.VertexAiSearchSpec + .getDefaultInstance() + : vertexAiSearchSpec_; + } + + /** + * + * + *
            +     * Optional. Specification of the Vertex AI Search tool.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec.VertexAiSearchSpec vertex_ai_search_spec = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec + .VertexAiSearchSpecOrBuilder + getVertexAiSearchSpecOrBuilder() { + return vertexAiSearchSpec_ == null + ? com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec.VertexAiSearchSpec + .getDefaultInstance() + : vertexAiSearchSpec_; + } + + public static final int WEB_GROUNDING_SPEC_FIELD_NUMBER = 2; + private com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec.WebGroundingSpec + webGroundingSpec_; + + /** + * + * + *
            +     * Optional. Specification of the web grounding tool.
            +     * If field is present, enables grounding with web search. Works only if
            +     * [Assistant.web_grounding_type][google.cloud.discoveryengine.v1beta.Assistant.web_grounding_type]
            +     * is
            +     * [WEB_GROUNDING_TYPE_GOOGLE_SEARCH][google.cloud.discoveryengine.v1beta.Assistant.WebGroundingType.WEB_GROUNDING_TYPE_GOOGLE_SEARCH]
            +     * or
            +     * [WEB_GROUNDING_TYPE_ENTERPRISE_WEB_SEARCH][google.cloud.discoveryengine.v1beta.Assistant.WebGroundingType.WEB_GROUNDING_TYPE_ENTERPRISE_WEB_SEARCH].
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec.WebGroundingSpec web_grounding_spec = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the webGroundingSpec field is set. + */ + @java.lang.Override + public boolean hasWebGroundingSpec() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
            +     * Optional. Specification of the web grounding tool.
            +     * If field is present, enables grounding with web search. Works only if
            +     * [Assistant.web_grounding_type][google.cloud.discoveryengine.v1beta.Assistant.web_grounding_type]
            +     * is
            +     * [WEB_GROUNDING_TYPE_GOOGLE_SEARCH][google.cloud.discoveryengine.v1beta.Assistant.WebGroundingType.WEB_GROUNDING_TYPE_GOOGLE_SEARCH]
            +     * or
            +     * [WEB_GROUNDING_TYPE_ENTERPRISE_WEB_SEARCH][google.cloud.discoveryengine.v1beta.Assistant.WebGroundingType.WEB_GROUNDING_TYPE_ENTERPRISE_WEB_SEARCH].
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec.WebGroundingSpec web_grounding_spec = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The webGroundingSpec. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec.WebGroundingSpec + getWebGroundingSpec() { + return webGroundingSpec_ == null + ? com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec.WebGroundingSpec + .getDefaultInstance() + : webGroundingSpec_; + } + + /** + * + * + *
            +     * Optional. Specification of the web grounding tool.
            +     * If field is present, enables grounding with web search. Works only if
            +     * [Assistant.web_grounding_type][google.cloud.discoveryengine.v1beta.Assistant.web_grounding_type]
            +     * is
            +     * [WEB_GROUNDING_TYPE_GOOGLE_SEARCH][google.cloud.discoveryengine.v1beta.Assistant.WebGroundingType.WEB_GROUNDING_TYPE_GOOGLE_SEARCH]
            +     * or
            +     * [WEB_GROUNDING_TYPE_ENTERPRISE_WEB_SEARCH][google.cloud.discoveryengine.v1beta.Assistant.WebGroundingType.WEB_GROUNDING_TYPE_ENTERPRISE_WEB_SEARCH].
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec.WebGroundingSpec web_grounding_spec = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec + .WebGroundingSpecOrBuilder + getWebGroundingSpecOrBuilder() { + return webGroundingSpec_ == null + ? com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec.WebGroundingSpec + .getDefaultInstance() + : webGroundingSpec_; + } + + public static final int IMAGE_GENERATION_SPEC_FIELD_NUMBER = 3; + private com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec + .ImageGenerationSpec + imageGenerationSpec_; + + /** + * + * + *
            +     * Optional. Specification of the image generation tool.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec.ImageGenerationSpec image_generation_spec = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the imageGenerationSpec field is set. + */ + @java.lang.Override + public boolean hasImageGenerationSpec() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
            +     * Optional. Specification of the image generation tool.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec.ImageGenerationSpec image_generation_spec = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The imageGenerationSpec. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec.ImageGenerationSpec + getImageGenerationSpec() { + return imageGenerationSpec_ == null + ? com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec + .ImageGenerationSpec.getDefaultInstance() + : imageGenerationSpec_; + } + + /** + * + * + *
            +     * Optional. Specification of the image generation tool.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec.ImageGenerationSpec image_generation_spec = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec + .ImageGenerationSpecOrBuilder + getImageGenerationSpecOrBuilder() { + return imageGenerationSpec_ == null + ? com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec + .ImageGenerationSpec.getDefaultInstance() + : imageGenerationSpec_; + } + + public static final int VIDEO_GENERATION_SPEC_FIELD_NUMBER = 4; + private com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec + .VideoGenerationSpec + videoGenerationSpec_; + + /** + * + * + *
            +     * Optional. Specification of the video generation tool.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec.VideoGenerationSpec video_generation_spec = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the videoGenerationSpec field is set. + */ + @java.lang.Override + public boolean hasVideoGenerationSpec() { + return ((bitField0_ & 0x00000008) != 0); + } + + /** + * + * + *
            +     * Optional. Specification of the video generation tool.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec.VideoGenerationSpec video_generation_spec = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The videoGenerationSpec. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec.VideoGenerationSpec + getVideoGenerationSpec() { + return videoGenerationSpec_ == null + ? com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec + .VideoGenerationSpec.getDefaultInstance() + : videoGenerationSpec_; + } + + /** + * + * + *
            +     * Optional. Specification of the video generation tool.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec.VideoGenerationSpec video_generation_spec = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec + .VideoGenerationSpecOrBuilder + getVideoGenerationSpecOrBuilder() { + return videoGenerationSpec_ == null + ? com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec + .VideoGenerationSpec.getDefaultInstance() + : videoGenerationSpec_; + } + + 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, getVertexAiSearchSpec()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(2, getWebGroundingSpec()); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeMessage(3, getImageGenerationSpec()); + } + if (((bitField0_ & 0x00000008) != 0)) { + output.writeMessage(4, getVideoGenerationSpec()); + } + 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, getVertexAiSearchSpec()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getWebGroundingSpec()); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(3, getImageGenerationSpec()); + } + if (((bitField0_ & 0x00000008) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(4, getVideoGenerationSpec()); + } + 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.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec other = + (com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec) obj; + + if (hasVertexAiSearchSpec() != other.hasVertexAiSearchSpec()) return false; + if (hasVertexAiSearchSpec()) { + if (!getVertexAiSearchSpec().equals(other.getVertexAiSearchSpec())) return false; + } + if (hasWebGroundingSpec() != other.hasWebGroundingSpec()) return false; + if (hasWebGroundingSpec()) { + if (!getWebGroundingSpec().equals(other.getWebGroundingSpec())) return false; + } + if (hasImageGenerationSpec() != other.hasImageGenerationSpec()) return false; + if (hasImageGenerationSpec()) { + if (!getImageGenerationSpec().equals(other.getImageGenerationSpec())) return false; + } + if (hasVideoGenerationSpec() != other.hasVideoGenerationSpec()) return false; + if (hasVideoGenerationSpec()) { + if (!getVideoGenerationSpec().equals(other.getVideoGenerationSpec())) 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 (hasVertexAiSearchSpec()) { + hash = (37 * hash) + VERTEX_AI_SEARCH_SPEC_FIELD_NUMBER; + hash = (53 * hash) + getVertexAiSearchSpec().hashCode(); + } + if (hasWebGroundingSpec()) { + hash = (37 * hash) + WEB_GROUNDING_SPEC_FIELD_NUMBER; + hash = (53 * hash) + getWebGroundingSpec().hashCode(); + } + if (hasImageGenerationSpec()) { + hash = (37 * hash) + IMAGE_GENERATION_SPEC_FIELD_NUMBER; + hash = (53 * hash) + getImageGenerationSpec().hashCode(); + } + if (hasVideoGenerationSpec()) { + hash = (37 * hash) + VIDEO_GENERATION_SPEC_FIELD_NUMBER; + hash = (53 * hash) + getVideoGenerationSpec().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec 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.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec 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.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec 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.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec + 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.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec 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.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec 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; + } + + /** + * + * + *
            +     * Specification of tools that are used to serve the request.
            +     * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec) + com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpecOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.AssistantServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_StreamAssistRequest_ToolsSpec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.AssistantServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_StreamAssistRequest_ToolsSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec.class, + com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec.Builder + .class); + } + + // Construct using + // com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetVertexAiSearchSpecFieldBuilder(); + internalGetWebGroundingSpecFieldBuilder(); + internalGetImageGenerationSpecFieldBuilder(); + internalGetVideoGenerationSpecFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + vertexAiSearchSpec_ = null; + if (vertexAiSearchSpecBuilder_ != null) { + vertexAiSearchSpecBuilder_.dispose(); + vertexAiSearchSpecBuilder_ = null; + } + webGroundingSpec_ = null; + if (webGroundingSpecBuilder_ != null) { + webGroundingSpecBuilder_.dispose(); + webGroundingSpecBuilder_ = null; + } + imageGenerationSpec_ = null; + if (imageGenerationSpecBuilder_ != null) { + imageGenerationSpecBuilder_.dispose(); + imageGenerationSpecBuilder_ = null; + } + videoGenerationSpec_ = null; + if (videoGenerationSpecBuilder_ != null) { + videoGenerationSpecBuilder_.dispose(); + videoGenerationSpecBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1beta.AssistantServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_StreamAssistRequest_ToolsSpec_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec build() { + com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec buildPartial() { + com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec result = + new com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.vertexAiSearchSpec_ = + vertexAiSearchSpecBuilder_ == null + ? vertexAiSearchSpec_ + : vertexAiSearchSpecBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.webGroundingSpec_ = + webGroundingSpecBuilder_ == null + ? webGroundingSpec_ + : webGroundingSpecBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.imageGenerationSpec_ = + imageGenerationSpecBuilder_ == null + ? imageGenerationSpec_ + : imageGenerationSpecBuilder_.build(); + to_bitField0_ |= 0x00000004; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.videoGenerationSpec_ = + videoGenerationSpecBuilder_ == null + ? videoGenerationSpec_ + : videoGenerationSpecBuilder_.build(); + to_bitField0_ |= 0x00000008; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec) { + return mergeFrom( + (com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec other) { + if (other + == com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec + .getDefaultInstance()) return this; + if (other.hasVertexAiSearchSpec()) { + mergeVertexAiSearchSpec(other.getVertexAiSearchSpec()); + } + if (other.hasWebGroundingSpec()) { + mergeWebGroundingSpec(other.getWebGroundingSpec()); + } + if (other.hasImageGenerationSpec()) { + mergeImageGenerationSpec(other.getImageGenerationSpec()); + } + if (other.hasVideoGenerationSpec()) { + mergeVideoGenerationSpec(other.getVideoGenerationSpec()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage( + internalGetVertexAiSearchSpecFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage( + internalGetWebGroundingSpecFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage( + internalGetImageGenerationSpecFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + input.readMessage( + internalGetVideoGenerationSpecFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec + .VertexAiSearchSpec + vertexAiSearchSpec_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec + .VertexAiSearchSpec, + com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec + .VertexAiSearchSpec.Builder, + com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec + .VertexAiSearchSpecOrBuilder> + vertexAiSearchSpecBuilder_; + + /** + * + * + *
            +       * Optional. Specification of the Vertex AI Search tool.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec.VertexAiSearchSpec vertex_ai_search_spec = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the vertexAiSearchSpec field is set. + */ + public boolean hasVertexAiSearchSpec() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
            +       * Optional. Specification of the Vertex AI Search tool.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec.VertexAiSearchSpec vertex_ai_search_spec = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The vertexAiSearchSpec. + */ + public com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec + .VertexAiSearchSpec + getVertexAiSearchSpec() { + if (vertexAiSearchSpecBuilder_ == null) { + return vertexAiSearchSpec_ == null + ? com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec + .VertexAiSearchSpec.getDefaultInstance() + : vertexAiSearchSpec_; + } else { + return vertexAiSearchSpecBuilder_.getMessage(); + } + } + + /** + * + * + *
            +       * Optional. Specification of the Vertex AI Search tool.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec.VertexAiSearchSpec vertex_ai_search_spec = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setVertexAiSearchSpec( + com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec.VertexAiSearchSpec + value) { + if (vertexAiSearchSpecBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + vertexAiSearchSpec_ = value; + } else { + vertexAiSearchSpecBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
            +       * Optional. Specification of the Vertex AI Search tool.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec.VertexAiSearchSpec vertex_ai_search_spec = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setVertexAiSearchSpec( + com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec.VertexAiSearchSpec + .Builder + builderForValue) { + if (vertexAiSearchSpecBuilder_ == null) { + vertexAiSearchSpec_ = builderForValue.build(); + } else { + vertexAiSearchSpecBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
            +       * Optional. Specification of the Vertex AI Search tool.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec.VertexAiSearchSpec vertex_ai_search_spec = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeVertexAiSearchSpec( + com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec.VertexAiSearchSpec + value) { + if (vertexAiSearchSpecBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && vertexAiSearchSpec_ != null + && vertexAiSearchSpec_ + != com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec + .VertexAiSearchSpec.getDefaultInstance()) { + getVertexAiSearchSpecBuilder().mergeFrom(value); + } else { + vertexAiSearchSpec_ = value; + } + } else { + vertexAiSearchSpecBuilder_.mergeFrom(value); + } + if (vertexAiSearchSpec_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + + /** + * + * + *
            +       * Optional. Specification of the Vertex AI Search tool.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec.VertexAiSearchSpec vertex_ai_search_spec = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearVertexAiSearchSpec() { + bitField0_ = (bitField0_ & ~0x00000001); + vertexAiSearchSpec_ = null; + if (vertexAiSearchSpecBuilder_ != null) { + vertexAiSearchSpecBuilder_.dispose(); + vertexAiSearchSpecBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
            +       * Optional. Specification of the Vertex AI Search tool.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec.VertexAiSearchSpec vertex_ai_search_spec = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec + .VertexAiSearchSpec.Builder + getVertexAiSearchSpecBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return internalGetVertexAiSearchSpecFieldBuilder().getBuilder(); + } + + /** + * + * + *
            +       * Optional. Specification of the Vertex AI Search tool.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec.VertexAiSearchSpec vertex_ai_search_spec = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec + .VertexAiSearchSpecOrBuilder + getVertexAiSearchSpecOrBuilder() { + if (vertexAiSearchSpecBuilder_ != null) { + return vertexAiSearchSpecBuilder_.getMessageOrBuilder(); + } else { + return vertexAiSearchSpec_ == null + ? com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec + .VertexAiSearchSpec.getDefaultInstance() + : vertexAiSearchSpec_; + } + } + + /** + * + * + *
            +       * Optional. Specification of the Vertex AI Search tool.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec.VertexAiSearchSpec vertex_ai_search_spec = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec + .VertexAiSearchSpec, + com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec + .VertexAiSearchSpec.Builder, + com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec + .VertexAiSearchSpecOrBuilder> + internalGetVertexAiSearchSpecFieldBuilder() { + if (vertexAiSearchSpecBuilder_ == null) { + vertexAiSearchSpecBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec + .VertexAiSearchSpec, + com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec + .VertexAiSearchSpec.Builder, + com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec + .VertexAiSearchSpecOrBuilder>( + getVertexAiSearchSpec(), getParentForChildren(), isClean()); + vertexAiSearchSpec_ = null; + } + return vertexAiSearchSpecBuilder_; + } + + private com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec.WebGroundingSpec + webGroundingSpec_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec + .WebGroundingSpec, + com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec.WebGroundingSpec + .Builder, + com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec + .WebGroundingSpecOrBuilder> + webGroundingSpecBuilder_; + + /** + * + * + *
            +       * Optional. Specification of the web grounding tool.
            +       * If field is present, enables grounding with web search. Works only if
            +       * [Assistant.web_grounding_type][google.cloud.discoveryengine.v1beta.Assistant.web_grounding_type]
            +       * is
            +       * [WEB_GROUNDING_TYPE_GOOGLE_SEARCH][google.cloud.discoveryengine.v1beta.Assistant.WebGroundingType.WEB_GROUNDING_TYPE_GOOGLE_SEARCH]
            +       * or
            +       * [WEB_GROUNDING_TYPE_ENTERPRISE_WEB_SEARCH][google.cloud.discoveryengine.v1beta.Assistant.WebGroundingType.WEB_GROUNDING_TYPE_ENTERPRISE_WEB_SEARCH].
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec.WebGroundingSpec web_grounding_spec = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the webGroundingSpec field is set. + */ + public boolean hasWebGroundingSpec() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
            +       * Optional. Specification of the web grounding tool.
            +       * If field is present, enables grounding with web search. Works only if
            +       * [Assistant.web_grounding_type][google.cloud.discoveryengine.v1beta.Assistant.web_grounding_type]
            +       * is
            +       * [WEB_GROUNDING_TYPE_GOOGLE_SEARCH][google.cloud.discoveryengine.v1beta.Assistant.WebGroundingType.WEB_GROUNDING_TYPE_GOOGLE_SEARCH]
            +       * or
            +       * [WEB_GROUNDING_TYPE_ENTERPRISE_WEB_SEARCH][google.cloud.discoveryengine.v1beta.Assistant.WebGroundingType.WEB_GROUNDING_TYPE_ENTERPRISE_WEB_SEARCH].
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec.WebGroundingSpec web_grounding_spec = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The webGroundingSpec. + */ + public com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec.WebGroundingSpec + getWebGroundingSpec() { + if (webGroundingSpecBuilder_ == null) { + return webGroundingSpec_ == null + ? com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec + .WebGroundingSpec.getDefaultInstance() + : webGroundingSpec_; + } else { + return webGroundingSpecBuilder_.getMessage(); + } + } + + /** + * + * + *
            +       * Optional. Specification of the web grounding tool.
            +       * If field is present, enables grounding with web search. Works only if
            +       * [Assistant.web_grounding_type][google.cloud.discoveryengine.v1beta.Assistant.web_grounding_type]
            +       * is
            +       * [WEB_GROUNDING_TYPE_GOOGLE_SEARCH][google.cloud.discoveryengine.v1beta.Assistant.WebGroundingType.WEB_GROUNDING_TYPE_GOOGLE_SEARCH]
            +       * or
            +       * [WEB_GROUNDING_TYPE_ENTERPRISE_WEB_SEARCH][google.cloud.discoveryengine.v1beta.Assistant.WebGroundingType.WEB_GROUNDING_TYPE_ENTERPRISE_WEB_SEARCH].
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec.WebGroundingSpec web_grounding_spec = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setWebGroundingSpec( + com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec.WebGroundingSpec + value) { + if (webGroundingSpecBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + webGroundingSpec_ = value; + } else { + webGroundingSpecBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
            +       * Optional. Specification of the web grounding tool.
            +       * If field is present, enables grounding with web search. Works only if
            +       * [Assistant.web_grounding_type][google.cloud.discoveryengine.v1beta.Assistant.web_grounding_type]
            +       * is
            +       * [WEB_GROUNDING_TYPE_GOOGLE_SEARCH][google.cloud.discoveryengine.v1beta.Assistant.WebGroundingType.WEB_GROUNDING_TYPE_GOOGLE_SEARCH]
            +       * or
            +       * [WEB_GROUNDING_TYPE_ENTERPRISE_WEB_SEARCH][google.cloud.discoveryengine.v1beta.Assistant.WebGroundingType.WEB_GROUNDING_TYPE_ENTERPRISE_WEB_SEARCH].
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec.WebGroundingSpec web_grounding_spec = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setWebGroundingSpec( + com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec.WebGroundingSpec + .Builder + builderForValue) { + if (webGroundingSpecBuilder_ == null) { + webGroundingSpec_ = builderForValue.build(); + } else { + webGroundingSpecBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
            +       * Optional. Specification of the web grounding tool.
            +       * If field is present, enables grounding with web search. Works only if
            +       * [Assistant.web_grounding_type][google.cloud.discoveryengine.v1beta.Assistant.web_grounding_type]
            +       * is
            +       * [WEB_GROUNDING_TYPE_GOOGLE_SEARCH][google.cloud.discoveryengine.v1beta.Assistant.WebGroundingType.WEB_GROUNDING_TYPE_GOOGLE_SEARCH]
            +       * or
            +       * [WEB_GROUNDING_TYPE_ENTERPRISE_WEB_SEARCH][google.cloud.discoveryengine.v1beta.Assistant.WebGroundingType.WEB_GROUNDING_TYPE_ENTERPRISE_WEB_SEARCH].
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec.WebGroundingSpec web_grounding_spec = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeWebGroundingSpec( + com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec.WebGroundingSpec + value) { + if (webGroundingSpecBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && webGroundingSpec_ != null + && webGroundingSpec_ + != com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec + .WebGroundingSpec.getDefaultInstance()) { + getWebGroundingSpecBuilder().mergeFrom(value); + } else { + webGroundingSpec_ = value; + } + } else { + webGroundingSpecBuilder_.mergeFrom(value); + } + if (webGroundingSpec_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** + * + * + *
            +       * Optional. Specification of the web grounding tool.
            +       * If field is present, enables grounding with web search. Works only if
            +       * [Assistant.web_grounding_type][google.cloud.discoveryengine.v1beta.Assistant.web_grounding_type]
            +       * is
            +       * [WEB_GROUNDING_TYPE_GOOGLE_SEARCH][google.cloud.discoveryengine.v1beta.Assistant.WebGroundingType.WEB_GROUNDING_TYPE_GOOGLE_SEARCH]
            +       * or
            +       * [WEB_GROUNDING_TYPE_ENTERPRISE_WEB_SEARCH][google.cloud.discoveryengine.v1beta.Assistant.WebGroundingType.WEB_GROUNDING_TYPE_ENTERPRISE_WEB_SEARCH].
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec.WebGroundingSpec web_grounding_spec = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearWebGroundingSpec() { + bitField0_ = (bitField0_ & ~0x00000002); + webGroundingSpec_ = null; + if (webGroundingSpecBuilder_ != null) { + webGroundingSpecBuilder_.dispose(); + webGroundingSpecBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
            +       * Optional. Specification of the web grounding tool.
            +       * If field is present, enables grounding with web search. Works only if
            +       * [Assistant.web_grounding_type][google.cloud.discoveryengine.v1beta.Assistant.web_grounding_type]
            +       * is
            +       * [WEB_GROUNDING_TYPE_GOOGLE_SEARCH][google.cloud.discoveryengine.v1beta.Assistant.WebGroundingType.WEB_GROUNDING_TYPE_GOOGLE_SEARCH]
            +       * or
            +       * [WEB_GROUNDING_TYPE_ENTERPRISE_WEB_SEARCH][google.cloud.discoveryengine.v1beta.Assistant.WebGroundingType.WEB_GROUNDING_TYPE_ENTERPRISE_WEB_SEARCH].
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec.WebGroundingSpec web_grounding_spec = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec.WebGroundingSpec + .Builder + getWebGroundingSpecBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return internalGetWebGroundingSpecFieldBuilder().getBuilder(); + } + + /** + * + * + *
            +       * Optional. Specification of the web grounding tool.
            +       * If field is present, enables grounding with web search. Works only if
            +       * [Assistant.web_grounding_type][google.cloud.discoveryengine.v1beta.Assistant.web_grounding_type]
            +       * is
            +       * [WEB_GROUNDING_TYPE_GOOGLE_SEARCH][google.cloud.discoveryengine.v1beta.Assistant.WebGroundingType.WEB_GROUNDING_TYPE_GOOGLE_SEARCH]
            +       * or
            +       * [WEB_GROUNDING_TYPE_ENTERPRISE_WEB_SEARCH][google.cloud.discoveryengine.v1beta.Assistant.WebGroundingType.WEB_GROUNDING_TYPE_ENTERPRISE_WEB_SEARCH].
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec.WebGroundingSpec web_grounding_spec = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec + .WebGroundingSpecOrBuilder + getWebGroundingSpecOrBuilder() { + if (webGroundingSpecBuilder_ != null) { + return webGroundingSpecBuilder_.getMessageOrBuilder(); + } else { + return webGroundingSpec_ == null + ? com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec + .WebGroundingSpec.getDefaultInstance() + : webGroundingSpec_; + } + } + + /** + * + * + *
            +       * Optional. Specification of the web grounding tool.
            +       * If field is present, enables grounding with web search. Works only if
            +       * [Assistant.web_grounding_type][google.cloud.discoveryengine.v1beta.Assistant.web_grounding_type]
            +       * is
            +       * [WEB_GROUNDING_TYPE_GOOGLE_SEARCH][google.cloud.discoveryengine.v1beta.Assistant.WebGroundingType.WEB_GROUNDING_TYPE_GOOGLE_SEARCH]
            +       * or
            +       * [WEB_GROUNDING_TYPE_ENTERPRISE_WEB_SEARCH][google.cloud.discoveryengine.v1beta.Assistant.WebGroundingType.WEB_GROUNDING_TYPE_ENTERPRISE_WEB_SEARCH].
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec.WebGroundingSpec web_grounding_spec = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec + .WebGroundingSpec, + com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec.WebGroundingSpec + .Builder, + com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec + .WebGroundingSpecOrBuilder> + internalGetWebGroundingSpecFieldBuilder() { + if (webGroundingSpecBuilder_ == null) { + webGroundingSpecBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec + .WebGroundingSpec, + com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec + .WebGroundingSpec.Builder, + com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec + .WebGroundingSpecOrBuilder>( + getWebGroundingSpec(), getParentForChildren(), isClean()); + webGroundingSpec_ = null; + } + return webGroundingSpecBuilder_; + } + + private com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec + .ImageGenerationSpec + imageGenerationSpec_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec + .ImageGenerationSpec, + com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec + .ImageGenerationSpec.Builder, + com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec + .ImageGenerationSpecOrBuilder> + imageGenerationSpecBuilder_; + + /** + * + * + *
            +       * Optional. Specification of the image generation tool.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec.ImageGenerationSpec image_generation_spec = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the imageGenerationSpec field is set. + */ + public boolean hasImageGenerationSpec() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
            +       * Optional. Specification of the image generation tool.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec.ImageGenerationSpec image_generation_spec = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The imageGenerationSpec. + */ + public com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec + .ImageGenerationSpec + getImageGenerationSpec() { + if (imageGenerationSpecBuilder_ == null) { + return imageGenerationSpec_ == null + ? com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec + .ImageGenerationSpec.getDefaultInstance() + : imageGenerationSpec_; + } else { + return imageGenerationSpecBuilder_.getMessage(); + } + } + + /** + * + * + *
            +       * Optional. Specification of the image generation tool.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec.ImageGenerationSpec image_generation_spec = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setImageGenerationSpec( + com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec.ImageGenerationSpec + value) { + if (imageGenerationSpecBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + imageGenerationSpec_ = value; + } else { + imageGenerationSpecBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
            +       * Optional. Specification of the image generation tool.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec.ImageGenerationSpec image_generation_spec = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setImageGenerationSpec( + com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec.ImageGenerationSpec + .Builder + builderForValue) { + if (imageGenerationSpecBuilder_ == null) { + imageGenerationSpec_ = builderForValue.build(); + } else { + imageGenerationSpecBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
            +       * Optional. Specification of the image generation tool.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec.ImageGenerationSpec image_generation_spec = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeImageGenerationSpec( + com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec.ImageGenerationSpec + value) { + if (imageGenerationSpecBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && imageGenerationSpec_ != null + && imageGenerationSpec_ + != com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec + .ImageGenerationSpec.getDefaultInstance()) { + getImageGenerationSpecBuilder().mergeFrom(value); + } else { + imageGenerationSpec_ = value; + } + } else { + imageGenerationSpecBuilder_.mergeFrom(value); + } + if (imageGenerationSpec_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + + /** + * + * + *
            +       * Optional. Specification of the image generation tool.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec.ImageGenerationSpec image_generation_spec = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearImageGenerationSpec() { + bitField0_ = (bitField0_ & ~0x00000004); + imageGenerationSpec_ = null; + if (imageGenerationSpecBuilder_ != null) { + imageGenerationSpecBuilder_.dispose(); + imageGenerationSpecBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
            +       * Optional. Specification of the image generation tool.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec.ImageGenerationSpec image_generation_spec = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec + .ImageGenerationSpec.Builder + getImageGenerationSpecBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return internalGetImageGenerationSpecFieldBuilder().getBuilder(); + } + + /** + * + * + *
            +       * Optional. Specification of the image generation tool.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec.ImageGenerationSpec image_generation_spec = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec + .ImageGenerationSpecOrBuilder + getImageGenerationSpecOrBuilder() { + if (imageGenerationSpecBuilder_ != null) { + return imageGenerationSpecBuilder_.getMessageOrBuilder(); + } else { + return imageGenerationSpec_ == null + ? com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec + .ImageGenerationSpec.getDefaultInstance() + : imageGenerationSpec_; + } + } + + /** + * + * + *
            +       * Optional. Specification of the image generation tool.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec.ImageGenerationSpec image_generation_spec = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec + .ImageGenerationSpec, + com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec + .ImageGenerationSpec.Builder, + com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec + .ImageGenerationSpecOrBuilder> + internalGetImageGenerationSpecFieldBuilder() { + if (imageGenerationSpecBuilder_ == null) { + imageGenerationSpecBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec + .ImageGenerationSpec, + com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec + .ImageGenerationSpec.Builder, + com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec + .ImageGenerationSpecOrBuilder>( + getImageGenerationSpec(), getParentForChildren(), isClean()); + imageGenerationSpec_ = null; + } + return imageGenerationSpecBuilder_; + } + + private com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec + .VideoGenerationSpec + videoGenerationSpec_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec + .VideoGenerationSpec, + com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec + .VideoGenerationSpec.Builder, + com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec + .VideoGenerationSpecOrBuilder> + videoGenerationSpecBuilder_; + + /** + * + * + *
            +       * Optional. Specification of the video generation tool.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec.VideoGenerationSpec video_generation_spec = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the videoGenerationSpec field is set. + */ + public boolean hasVideoGenerationSpec() { + return ((bitField0_ & 0x00000008) != 0); + } + + /** + * + * + *
            +       * Optional. Specification of the video generation tool.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec.VideoGenerationSpec video_generation_spec = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The videoGenerationSpec. + */ + public com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec + .VideoGenerationSpec + getVideoGenerationSpec() { + if (videoGenerationSpecBuilder_ == null) { + return videoGenerationSpec_ == null + ? com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec + .VideoGenerationSpec.getDefaultInstance() + : videoGenerationSpec_; + } else { + return videoGenerationSpecBuilder_.getMessage(); + } + } + + /** + * + * + *
            +       * Optional. Specification of the video generation tool.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec.VideoGenerationSpec video_generation_spec = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setVideoGenerationSpec( + com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec.VideoGenerationSpec + value) { + if (videoGenerationSpecBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + videoGenerationSpec_ = value; + } else { + videoGenerationSpecBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
            +       * Optional. Specification of the video generation tool.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec.VideoGenerationSpec video_generation_spec = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setVideoGenerationSpec( + com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec.VideoGenerationSpec + .Builder + builderForValue) { + if (videoGenerationSpecBuilder_ == null) { + videoGenerationSpec_ = builderForValue.build(); + } else { + videoGenerationSpecBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
            +       * Optional. Specification of the video generation tool.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec.VideoGenerationSpec video_generation_spec = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeVideoGenerationSpec( + com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec.VideoGenerationSpec + value) { + if (videoGenerationSpecBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) + && videoGenerationSpec_ != null + && videoGenerationSpec_ + != com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec + .VideoGenerationSpec.getDefaultInstance()) { + getVideoGenerationSpecBuilder().mergeFrom(value); + } else { + videoGenerationSpec_ = value; + } + } else { + videoGenerationSpecBuilder_.mergeFrom(value); + } + if (videoGenerationSpec_ != null) { + bitField0_ |= 0x00000008; + onChanged(); + } + return this; + } + + /** + * + * + *
            +       * Optional. Specification of the video generation tool.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec.VideoGenerationSpec video_generation_spec = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearVideoGenerationSpec() { + bitField0_ = (bitField0_ & ~0x00000008); + videoGenerationSpec_ = null; + if (videoGenerationSpecBuilder_ != null) { + videoGenerationSpecBuilder_.dispose(); + videoGenerationSpecBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
            +       * Optional. Specification of the video generation tool.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec.VideoGenerationSpec video_generation_spec = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec + .VideoGenerationSpec.Builder + getVideoGenerationSpecBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return internalGetVideoGenerationSpecFieldBuilder().getBuilder(); + } + + /** + * + * + *
            +       * Optional. Specification of the video generation tool.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec.VideoGenerationSpec video_generation_spec = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec + .VideoGenerationSpecOrBuilder + getVideoGenerationSpecOrBuilder() { + if (videoGenerationSpecBuilder_ != null) { + return videoGenerationSpecBuilder_.getMessageOrBuilder(); + } else { + return videoGenerationSpec_ == null + ? com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec + .VideoGenerationSpec.getDefaultInstance() + : videoGenerationSpec_; + } + } + + /** + * + * + *
            +       * Optional. Specification of the video generation tool.
            +       * 
            + * + * + * .google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec.VideoGenerationSpec video_generation_spec = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec + .VideoGenerationSpec, + com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec + .VideoGenerationSpec.Builder, + com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec + .VideoGenerationSpecOrBuilder> + internalGetVideoGenerationSpecFieldBuilder() { + if (videoGenerationSpecBuilder_ == null) { + videoGenerationSpecBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec + .VideoGenerationSpec, + com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec + .VideoGenerationSpec.Builder, + com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec + .VideoGenerationSpecOrBuilder>( + getVideoGenerationSpec(), getParentForChildren(), isClean()); + videoGenerationSpec_ = null; + } + return videoGenerationSpecBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec) + private static final com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec(); + } + + public static com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ToolsSpec parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface GenerationSpecOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.StreamAssistRequest.GenerationSpec) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
            +     * Optional. The Vertex AI model_id used for the generative model. If not
            +     * set, the default Assistant model will be used.
            +     * 
            + * + * string model_id = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The modelId. + */ + java.lang.String getModelId(); + + /** + * + * + *
            +     * Optional. The Vertex AI model_id used for the generative model. If not
            +     * set, the default Assistant model will be used.
            +     * 
            + * + * string model_id = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for modelId. + */ + com.google.protobuf.ByteString getModelIdBytes(); + } + + /** + * + * + *
            +   * Assistant generation specification for the request.
            +   * This allows to override the default generation configuration at the engine
            +   * level.
            +   * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.StreamAssistRequest.GenerationSpec} + */ + public static final class GenerationSpec extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.StreamAssistRequest.GenerationSpec) + GenerationSpecOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "GenerationSpec"); + } + + // Use GenerationSpec.newBuilder() to construct. + private GenerationSpec(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private GenerationSpec() { + modelId_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.AssistantServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_StreamAssistRequest_GenerationSpec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.AssistantServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_StreamAssistRequest_GenerationSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.GenerationSpec.class, + com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.GenerationSpec.Builder + .class); + } + + public static final int MODEL_ID_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object modelId_ = ""; + + /** + * + * + *
            +     * Optional. The Vertex AI model_id used for the generative model. If not
            +     * set, the default Assistant model will be used.
            +     * 
            + * + * string model_id = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The modelId. + */ + @java.lang.Override + public java.lang.String getModelId() { + java.lang.Object ref = modelId_; + 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(); + modelId_ = s; + return s; + } + } + + /** + * + * + *
            +     * Optional. The Vertex AI model_id used for the generative model. If not
            +     * set, the default Assistant model will be used.
            +     * 
            + * + * string model_id = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for modelId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getModelIdBytes() { + java.lang.Object ref = modelId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + modelId_ = 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 { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(modelId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, modelId_); + } + 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(modelId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, modelId_); + } + 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.discoveryengine.v1beta.StreamAssistRequest.GenerationSpec)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.GenerationSpec other = + (com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.GenerationSpec) obj; + + if (!getModelId().equals(other.getModelId())) 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) + MODEL_ID_FIELD_NUMBER; + hash = (53 * hash) + getModelId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.GenerationSpec + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.GenerationSpec + 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.discoveryengine.v1beta.StreamAssistRequest.GenerationSpec + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.GenerationSpec + 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.discoveryengine.v1beta.StreamAssistRequest.GenerationSpec + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.GenerationSpec + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.GenerationSpec + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.GenerationSpec + 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.discoveryengine.v1beta.StreamAssistRequest.GenerationSpec + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.GenerationSpec + 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.discoveryengine.v1beta.StreamAssistRequest.GenerationSpec + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.GenerationSpec + 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.discoveryengine.v1beta.StreamAssistRequest.GenerationSpec 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; + } + + /** + * + * + *
            +     * Assistant generation specification for the request.
            +     * This allows to override the default generation configuration at the engine
            +     * level.
            +     * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.StreamAssistRequest.GenerationSpec} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.StreamAssistRequest.GenerationSpec) + com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.GenerationSpecOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.AssistantServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_StreamAssistRequest_GenerationSpec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.AssistantServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_StreamAssistRequest_GenerationSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.GenerationSpec.class, + com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.GenerationSpec.Builder + .class); + } + + // Construct using + // com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.GenerationSpec.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + modelId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1beta.AssistantServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_StreamAssistRequest_GenerationSpec_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.GenerationSpec + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.GenerationSpec + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.GenerationSpec build() { + com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.GenerationSpec result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.GenerationSpec + buildPartial() { + com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.GenerationSpec result = + new com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.GenerationSpec(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.GenerationSpec result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.modelId_ = modelId_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.GenerationSpec) { + return mergeFrom( + (com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.GenerationSpec) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.GenerationSpec other) { + if (other + == com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.GenerationSpec + .getDefaultInstance()) return this; + if (!other.getModelId().isEmpty()) { + modelId_ = other.modelId_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + modelId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object modelId_ = ""; + + /** + * + * + *
            +       * Optional. The Vertex AI model_id used for the generative model. If not
            +       * set, the default Assistant model will be used.
            +       * 
            + * + * string model_id = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The modelId. + */ + public java.lang.String getModelId() { + java.lang.Object ref = modelId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + modelId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
            +       * Optional. The Vertex AI model_id used for the generative model. If not
            +       * set, the default Assistant model will be used.
            +       * 
            + * + * string model_id = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for modelId. + */ + public com.google.protobuf.ByteString getModelIdBytes() { + java.lang.Object ref = modelId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + modelId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
            +       * Optional. The Vertex AI model_id used for the generative model. If not
            +       * set, the default Assistant model will be used.
            +       * 
            + * + * string model_id = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The modelId to set. + * @return This builder for chaining. + */ + public Builder setModelId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + modelId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
            +       * Optional. The Vertex AI model_id used for the generative model. If not
            +       * set, the default Assistant model will be used.
            +       * 
            + * + * string model_id = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearModelId() { + modelId_ = getDefaultInstance().getModelId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
            +       * Optional. The Vertex AI model_id used for the generative model. If not
            +       * set, the default Assistant model will be used.
            +       * 
            + * + * string model_id = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for modelId to set. + * @return This builder for chaining. + */ + public Builder setModelIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + modelId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.StreamAssistRequest.GenerationSpec) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.StreamAssistRequest.GenerationSpec) + private static final com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.GenerationSpec + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.GenerationSpec(); + } + + public static com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.GenerationSpec + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GenerationSpec parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.GenerationSpec + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int bitField0_; + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
            +   * Required. The resource name of the
            +   * [Assistant][google.cloud.discoveryengine.v1beta.Assistant]. Format:
            +   * `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/assistants/{assistant}`
            +   * 
            + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + 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(); + name_ = s; + return s; + } + } + + /** + * + * + *
            +   * Required. The resource name of the
            +   * [Assistant][google.cloud.discoveryengine.v1beta.Assistant]. Format:
            +   * `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/assistants/{assistant}`
            +   * 
            + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int QUERY_FIELD_NUMBER = 2; + private com.google.cloud.discoveryengine.v1beta.Query query_; + + /** + * + * + *
            +   * Optional. Current user query.
            +   *
            +   * Empty query is only supported if `file_ids` are provided. In this case, the
            +   * answer will be generated based on those context files.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Query query = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the query field is set. + */ + @java.lang.Override + public boolean hasQuery() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
            +   * Optional. Current user query.
            +   *
            +   * Empty query is only supported if `file_ids` are provided. In this case, the
            +   * answer will be generated based on those context files.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Query query = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The query. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Query getQuery() { + return query_ == null + ? com.google.cloud.discoveryengine.v1beta.Query.getDefaultInstance() + : query_; + } + + /** + * + * + *
            +   * Optional. Current user query.
            +   *
            +   * Empty query is only supported if `file_ids` are provided. In this case, the
            +   * answer will be generated based on those context files.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Query query = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.QueryOrBuilder getQueryOrBuilder() { + return query_ == null + ? com.google.cloud.discoveryengine.v1beta.Query.getDefaultInstance() + : query_; + } + + public static final int SESSION_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object session_ = ""; + + /** + * + * + *
            +   * Optional. The session to use for the request. If specified, the assistant
            +   * has access to the session history, and the query and the answer are stored
            +   * there.
            +   *
            +   * If `-` is specified as the session ID, or it is left empty, then a new
            +   * session is created with an automatically generated ID.
            +   *
            +   * Format:
            +   * `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/sessions/{session}`
            +   * 
            + * + * + * string session = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The session. + */ + @java.lang.Override + public java.lang.String getSession() { + java.lang.Object ref = session_; + 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(); + session_ = s; + return s; + } + } + + /** + * + * + *
            +   * Optional. The session to use for the request. If specified, the assistant
            +   * has access to the session history, and the query and the answer are stored
            +   * there.
            +   *
            +   * If `-` is specified as the session ID, or it is left empty, then a new
            +   * session is created with an automatically generated ID.
            +   *
            +   * Format:
            +   * `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/sessions/{session}`
            +   * 
            + * + * + * string session = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for session. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSessionBytes() { + java.lang.Object ref = session_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + session_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int USER_METADATA_FIELD_NUMBER = 6; + private com.google.cloud.discoveryengine.v1beta.AssistUserMetadata userMetadata_; + + /** + * + * + *
            +   * Optional. Information about the user initiating the query.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AssistUserMetadata user_metadata = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the userMetadata field is set. + */ + @java.lang.Override + public boolean hasUserMetadata() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
            +   * Optional. Information about the user initiating the query.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AssistUserMetadata user_metadata = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The userMetadata. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AssistUserMetadata getUserMetadata() { + return userMetadata_ == null + ? com.google.cloud.discoveryengine.v1beta.AssistUserMetadata.getDefaultInstance() + : userMetadata_; + } + + /** + * + * + *
            +   * Optional. Information about the user initiating the query.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AssistUserMetadata user_metadata = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AssistUserMetadataOrBuilder + getUserMetadataOrBuilder() { + return userMetadata_ == null + ? com.google.cloud.discoveryengine.v1beta.AssistUserMetadata.getDefaultInstance() + : userMetadata_; + } + + public static final int TOOLS_SPEC_FIELD_NUMBER = 18; + private com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec toolsSpec_; + + /** + * + * + *
            +   * Optional. Specification of tools that are used to serve the request.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec tools_spec = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the toolsSpec field is set. + */ + @java.lang.Override + public boolean hasToolsSpec() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
            +   * Optional. Specification of tools that are used to serve the request.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec tools_spec = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The toolsSpec. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec getToolsSpec() { + return toolsSpec_ == null + ? com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec.getDefaultInstance() + : toolsSpec_; + } + + /** + * + * + *
            +   * Optional. Specification of tools that are used to serve the request.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec tools_spec = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpecOrBuilder + getToolsSpecOrBuilder() { + return toolsSpec_ == null + ? com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec.getDefaultInstance() + : toolsSpec_; + } + + public static final int GENERATION_SPEC_FIELD_NUMBER = 19; + private com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.GenerationSpec + generationSpec_; + + /** + * + * + *
            +   * Optional. Specification of the generation configuration for the request.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.StreamAssistRequest.GenerationSpec generation_spec = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the generationSpec field is set. + */ + @java.lang.Override + public boolean hasGenerationSpec() { + return ((bitField0_ & 0x00000008) != 0); + } + + /** + * + * + *
            +   * Optional. Specification of the generation configuration for the request.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.StreamAssistRequest.GenerationSpec generation_spec = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The generationSpec. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.GenerationSpec + getGenerationSpec() { + return generationSpec_ == null + ? com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.GenerationSpec + .getDefaultInstance() + : generationSpec_; + } + + /** + * + * + *
            +   * Optional. Specification of the generation configuration for the request.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.StreamAssistRequest.GenerationSpec generation_spec = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.GenerationSpecOrBuilder + getGenerationSpecOrBuilder() { + return generationSpec_ == null + ? com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.GenerationSpec + .getDefaultInstance() + : generationSpec_; + } + + 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(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getQuery()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(session_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, session_); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(6, getUserMetadata()); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeMessage(18, getToolsSpec()); + } + if (((bitField0_ & 0x00000008) != 0)) { + output.writeMessage(19, getGenerationSpec()); + } + 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(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getQuery()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(session_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, session_); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getUserMetadata()); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(18, getToolsSpec()); + } + if (((bitField0_ & 0x00000008) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(19, getGenerationSpec()); + } + 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.discoveryengine.v1beta.StreamAssistRequest)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1beta.StreamAssistRequest other = + (com.google.cloud.discoveryengine.v1beta.StreamAssistRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (hasQuery() != other.hasQuery()) return false; + if (hasQuery()) { + if (!getQuery().equals(other.getQuery())) return false; + } + if (!getSession().equals(other.getSession())) return false; + if (hasUserMetadata() != other.hasUserMetadata()) return false; + if (hasUserMetadata()) { + if (!getUserMetadata().equals(other.getUserMetadata())) return false; + } + if (hasToolsSpec() != other.hasToolsSpec()) return false; + if (hasToolsSpec()) { + if (!getToolsSpec().equals(other.getToolsSpec())) return false; + } + if (hasGenerationSpec() != other.hasGenerationSpec()) return false; + if (hasGenerationSpec()) { + if (!getGenerationSpec().equals(other.getGenerationSpec())) 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) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (hasQuery()) { + hash = (37 * hash) + QUERY_FIELD_NUMBER; + hash = (53 * hash) + getQuery().hashCode(); + } + hash = (37 * hash) + SESSION_FIELD_NUMBER; + hash = (53 * hash) + getSession().hashCode(); + if (hasUserMetadata()) { + hash = (37 * hash) + USER_METADATA_FIELD_NUMBER; + hash = (53 * hash) + getUserMetadata().hashCode(); + } + if (hasToolsSpec()) { + hash = (37 * hash) + TOOLS_SPEC_FIELD_NUMBER; + hash = (53 * hash) + getToolsSpec().hashCode(); + } + if (hasGenerationSpec()) { + hash = (37 * hash) + GENERATION_SPEC_FIELD_NUMBER; + hash = (53 * hash) + getGenerationSpec().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1beta.StreamAssistRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.StreamAssistRequest 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.discoveryengine.v1beta.StreamAssistRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.StreamAssistRequest 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.discoveryengine.v1beta.StreamAssistRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.StreamAssistRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1beta.StreamAssistRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.StreamAssistRequest 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.discoveryengine.v1beta.StreamAssistRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.StreamAssistRequest 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.discoveryengine.v1beta.StreamAssistRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.StreamAssistRequest 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.discoveryengine.v1beta.StreamAssistRequest 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 for the
            +   * [AssistantService.StreamAssist][google.cloud.discoveryengine.v1beta.AssistantService.StreamAssist]
            +   * method.
            +   * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.StreamAssistRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.StreamAssistRequest) + com.google.cloud.discoveryengine.v1beta.StreamAssistRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.AssistantServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_StreamAssistRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.AssistantServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_StreamAssistRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.class, + com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.Builder.class); + } + + // Construct using com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetQueryFieldBuilder(); + internalGetUserMetadataFieldBuilder(); + internalGetToolsSpecFieldBuilder(); + internalGetGenerationSpecFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + query_ = null; + if (queryBuilder_ != null) { + queryBuilder_.dispose(); + queryBuilder_ = null; + } + session_ = ""; + userMetadata_ = null; + if (userMetadataBuilder_ != null) { + userMetadataBuilder_.dispose(); + userMetadataBuilder_ = null; + } + toolsSpec_ = null; + if (toolsSpecBuilder_ != null) { + toolsSpecBuilder_.dispose(); + toolsSpecBuilder_ = null; + } + generationSpec_ = null; + if (generationSpecBuilder_ != null) { + generationSpecBuilder_.dispose(); + generationSpecBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1beta.AssistantServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_StreamAssistRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.StreamAssistRequest getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.StreamAssistRequest build() { + com.google.cloud.discoveryengine.v1beta.StreamAssistRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.StreamAssistRequest buildPartial() { + com.google.cloud.discoveryengine.v1beta.StreamAssistRequest result = + new com.google.cloud.discoveryengine.v1beta.StreamAssistRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.discoveryengine.v1beta.StreamAssistRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.query_ = queryBuilder_ == null ? query_ : queryBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.session_ = session_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.userMetadata_ = + userMetadataBuilder_ == null ? userMetadata_ : userMetadataBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.toolsSpec_ = toolsSpecBuilder_ == null ? toolsSpec_ : toolsSpecBuilder_.build(); + to_bitField0_ |= 0x00000004; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.generationSpec_ = + generationSpecBuilder_ == null ? generationSpec_ : generationSpecBuilder_.build(); + to_bitField0_ |= 0x00000008; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.discoveryengine.v1beta.StreamAssistRequest) { + return mergeFrom((com.google.cloud.discoveryengine.v1beta.StreamAssistRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.discoveryengine.v1beta.StreamAssistRequest other) { + if (other == com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasQuery()) { + mergeQuery(other.getQuery()); + } + if (!other.getSession().isEmpty()) { + session_ = other.session_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (other.hasUserMetadata()) { + mergeUserMetadata(other.getUserMetadata()); + } + if (other.hasToolsSpec()) { + mergeToolsSpec(other.getToolsSpec()); + } + if (other.hasGenerationSpec()) { + mergeGenerationSpec(other.getGenerationSpec()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(internalGetQueryFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + session_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 50: + { + input.readMessage( + internalGetUserMetadataFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 50 + case 146: + { + input.readMessage( + internalGetToolsSpecFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 146 + case 154: + { + input.readMessage( + internalGetGenerationSpecFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 154 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + + /** + * + * + *
            +     * Required. The resource name of the
            +     * [Assistant][google.cloud.discoveryengine.v1beta.Assistant]. Format:
            +     * `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/assistants/{assistant}`
            +     * 
            + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
            +     * Required. The resource name of the
            +     * [Assistant][google.cloud.discoveryengine.v1beta.Assistant]. Format:
            +     * `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/assistants/{assistant}`
            +     * 
            + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
            +     * Required. The resource name of the
            +     * [Assistant][google.cloud.discoveryengine.v1beta.Assistant]. Format:
            +     * `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/assistants/{assistant}`
            +     * 
            + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Required. The resource name of the
            +     * [Assistant][google.cloud.discoveryengine.v1beta.Assistant]. Format:
            +     * `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/assistants/{assistant}`
            +     * 
            + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
            +     * Required. The resource name of the
            +     * [Assistant][google.cloud.discoveryengine.v1beta.Assistant]. Format:
            +     * `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/assistants/{assistant}`
            +     * 
            + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.cloud.discoveryengine.v1beta.Query query_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.Query, + com.google.cloud.discoveryengine.v1beta.Query.Builder, + com.google.cloud.discoveryengine.v1beta.QueryOrBuilder> + queryBuilder_; + + /** + * + * + *
            +     * Optional. Current user query.
            +     *
            +     * Empty query is only supported if `file_ids` are provided. In this case, the
            +     * answer will be generated based on those context files.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Query query = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the query field is set. + */ + public boolean hasQuery() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
            +     * Optional. Current user query.
            +     *
            +     * Empty query is only supported if `file_ids` are provided. In this case, the
            +     * answer will be generated based on those context files.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Query query = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The query. + */ + public com.google.cloud.discoveryengine.v1beta.Query getQuery() { + if (queryBuilder_ == null) { + return query_ == null + ? com.google.cloud.discoveryengine.v1beta.Query.getDefaultInstance() + : query_; + } else { + return queryBuilder_.getMessage(); + } + } + + /** + * + * + *
            +     * Optional. Current user query.
            +     *
            +     * Empty query is only supported if `file_ids` are provided. In this case, the
            +     * answer will be generated based on those context files.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Query query = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setQuery(com.google.cloud.discoveryengine.v1beta.Query value) { + if (queryBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + query_ = value; + } else { + queryBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Optional. Current user query.
            +     *
            +     * Empty query is only supported if `file_ids` are provided. In this case, the
            +     * answer will be generated based on those context files.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Query query = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setQuery(com.google.cloud.discoveryengine.v1beta.Query.Builder builderForValue) { + if (queryBuilder_ == null) { + query_ = builderForValue.build(); + } else { + queryBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Optional. Current user query.
            +     *
            +     * Empty query is only supported if `file_ids` are provided. In this case, the
            +     * answer will be generated based on those context files.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Query query = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeQuery(com.google.cloud.discoveryengine.v1beta.Query value) { + if (queryBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && query_ != null + && query_ != com.google.cloud.discoveryengine.v1beta.Query.getDefaultInstance()) { + getQueryBuilder().mergeFrom(value); + } else { + query_ = value; + } + } else { + queryBuilder_.mergeFrom(value); + } + if (query_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** + * + * + *
            +     * Optional. Current user query.
            +     *
            +     * Empty query is only supported if `file_ids` are provided. In this case, the
            +     * answer will be generated based on those context files.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Query query = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearQuery() { + bitField0_ = (bitField0_ & ~0x00000002); + query_ = null; + if (queryBuilder_ != null) { + queryBuilder_.dispose(); + queryBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
            +     * Optional. Current user query.
            +     *
            +     * Empty query is only supported if `file_ids` are provided. In this case, the
            +     * answer will be generated based on those context files.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Query query = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.discoveryengine.v1beta.Query.Builder getQueryBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return internalGetQueryFieldBuilder().getBuilder(); + } + + /** + * + * + *
            +     * Optional. Current user query.
            +     *
            +     * Empty query is only supported if `file_ids` are provided. In this case, the
            +     * answer will be generated based on those context files.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Query query = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.discoveryengine.v1beta.QueryOrBuilder getQueryOrBuilder() { + if (queryBuilder_ != null) { + return queryBuilder_.getMessageOrBuilder(); + } else { + return query_ == null + ? com.google.cloud.discoveryengine.v1beta.Query.getDefaultInstance() + : query_; + } + } + + /** + * + * + *
            +     * Optional. Current user query.
            +     *
            +     * Empty query is only supported if `file_ids` are provided. In this case, the
            +     * answer will be generated based on those context files.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Query query = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.Query, + com.google.cloud.discoveryengine.v1beta.Query.Builder, + com.google.cloud.discoveryengine.v1beta.QueryOrBuilder> + internalGetQueryFieldBuilder() { + if (queryBuilder_ == null) { + queryBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.Query, + com.google.cloud.discoveryengine.v1beta.Query.Builder, + com.google.cloud.discoveryengine.v1beta.QueryOrBuilder>( + getQuery(), getParentForChildren(), isClean()); + query_ = null; + } + return queryBuilder_; + } + + private java.lang.Object session_ = ""; + + /** + * + * + *
            +     * Optional. The session to use for the request. If specified, the assistant
            +     * has access to the session history, and the query and the answer are stored
            +     * there.
            +     *
            +     * If `-` is specified as the session ID, or it is left empty, then a new
            +     * session is created with an automatically generated ID.
            +     *
            +     * Format:
            +     * `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/sessions/{session}`
            +     * 
            + * + * + * string session = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The session. + */ + public java.lang.String getSession() { + java.lang.Object ref = session_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + session_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
            +     * Optional. The session to use for the request. If specified, the assistant
            +     * has access to the session history, and the query and the answer are stored
            +     * there.
            +     *
            +     * If `-` is specified as the session ID, or it is left empty, then a new
            +     * session is created with an automatically generated ID.
            +     *
            +     * Format:
            +     * `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/sessions/{session}`
            +     * 
            + * + * + * string session = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for session. + */ + public com.google.protobuf.ByteString getSessionBytes() { + java.lang.Object ref = session_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + session_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
            +     * Optional. The session to use for the request. If specified, the assistant
            +     * has access to the session history, and the query and the answer are stored
            +     * there.
            +     *
            +     * If `-` is specified as the session ID, or it is left empty, then a new
            +     * session is created with an automatically generated ID.
            +     *
            +     * Format:
            +     * `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/sessions/{session}`
            +     * 
            + * + * + * string session = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param value The session to set. + * @return This builder for chaining. + */ + public Builder setSession(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + session_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Optional. The session to use for the request. If specified, the assistant
            +     * has access to the session history, and the query and the answer are stored
            +     * there.
            +     *
            +     * If `-` is specified as the session ID, or it is left empty, then a new
            +     * session is created with an automatically generated ID.
            +     *
            +     * Format:
            +     * `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/sessions/{session}`
            +     * 
            + * + * + * string session = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearSession() { + session_ = getDefaultInstance().getSession(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
            +     * Optional. The session to use for the request. If specified, the assistant
            +     * has access to the session history, and the query and the answer are stored
            +     * there.
            +     *
            +     * If `-` is specified as the session ID, or it is left empty, then a new
            +     * session is created with an automatically generated ID.
            +     *
            +     * Format:
            +     * `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/sessions/{session}`
            +     * 
            + * + * + * string session = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for session to set. + * @return This builder for chaining. + */ + public Builder setSessionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + session_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private com.google.cloud.discoveryengine.v1beta.AssistUserMetadata userMetadata_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.AssistUserMetadata, + com.google.cloud.discoveryengine.v1beta.AssistUserMetadata.Builder, + com.google.cloud.discoveryengine.v1beta.AssistUserMetadataOrBuilder> + userMetadataBuilder_; + + /** + * + * + *
            +     * Optional. Information about the user initiating the query.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AssistUserMetadata user_metadata = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the userMetadata field is set. + */ + public boolean hasUserMetadata() { + return ((bitField0_ & 0x00000008) != 0); + } + + /** + * + * + *
            +     * Optional. Information about the user initiating the query.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AssistUserMetadata user_metadata = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The userMetadata. + */ + public com.google.cloud.discoveryengine.v1beta.AssistUserMetadata getUserMetadata() { + if (userMetadataBuilder_ == null) { + return userMetadata_ == null + ? com.google.cloud.discoveryengine.v1beta.AssistUserMetadata.getDefaultInstance() + : userMetadata_; + } else { + return userMetadataBuilder_.getMessage(); + } + } + + /** + * + * + *
            +     * Optional. Information about the user initiating the query.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AssistUserMetadata user_metadata = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setUserMetadata( + com.google.cloud.discoveryengine.v1beta.AssistUserMetadata value) { + if (userMetadataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + userMetadata_ = value; + } else { + userMetadataBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Optional. Information about the user initiating the query.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AssistUserMetadata user_metadata = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setUserMetadata( + com.google.cloud.discoveryengine.v1beta.AssistUserMetadata.Builder builderForValue) { + if (userMetadataBuilder_ == null) { + userMetadata_ = builderForValue.build(); + } else { + userMetadataBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Optional. Information about the user initiating the query.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AssistUserMetadata user_metadata = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeUserMetadata( + com.google.cloud.discoveryengine.v1beta.AssistUserMetadata value) { + if (userMetadataBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) + && userMetadata_ != null + && userMetadata_ + != com.google.cloud.discoveryengine.v1beta.AssistUserMetadata + .getDefaultInstance()) { + getUserMetadataBuilder().mergeFrom(value); + } else { + userMetadata_ = value; + } + } else { + userMetadataBuilder_.mergeFrom(value); + } + if (userMetadata_ != null) { + bitField0_ |= 0x00000008; + onChanged(); + } + return this; + } + + /** + * + * + *
            +     * Optional. Information about the user initiating the query.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AssistUserMetadata user_metadata = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearUserMetadata() { + bitField0_ = (bitField0_ & ~0x00000008); + userMetadata_ = null; + if (userMetadataBuilder_ != null) { + userMetadataBuilder_.dispose(); + userMetadataBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
            +     * Optional. Information about the user initiating the query.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AssistUserMetadata user_metadata = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.discoveryengine.v1beta.AssistUserMetadata.Builder + getUserMetadataBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return internalGetUserMetadataFieldBuilder().getBuilder(); + } + + /** + * + * + *
            +     * Optional. Information about the user initiating the query.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AssistUserMetadata user_metadata = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.discoveryengine.v1beta.AssistUserMetadataOrBuilder + getUserMetadataOrBuilder() { + if (userMetadataBuilder_ != null) { + return userMetadataBuilder_.getMessageOrBuilder(); + } else { + return userMetadata_ == null + ? com.google.cloud.discoveryengine.v1beta.AssistUserMetadata.getDefaultInstance() + : userMetadata_; + } + } + + /** + * + * + *
            +     * Optional. Information about the user initiating the query.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AssistUserMetadata user_metadata = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.AssistUserMetadata, + com.google.cloud.discoveryengine.v1beta.AssistUserMetadata.Builder, + com.google.cloud.discoveryengine.v1beta.AssistUserMetadataOrBuilder> + internalGetUserMetadataFieldBuilder() { + if (userMetadataBuilder_ == null) { + userMetadataBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.AssistUserMetadata, + com.google.cloud.discoveryengine.v1beta.AssistUserMetadata.Builder, + com.google.cloud.discoveryengine.v1beta.AssistUserMetadataOrBuilder>( + getUserMetadata(), getParentForChildren(), isClean()); + userMetadata_ = null; + } + return userMetadataBuilder_; + } + + private com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec toolsSpec_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec, + com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec.Builder, + com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpecOrBuilder> + toolsSpecBuilder_; + + /** + * + * + *
            +     * Optional. Specification of tools that are used to serve the request.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec tools_spec = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the toolsSpec field is set. + */ + public boolean hasToolsSpec() { + return ((bitField0_ & 0x00000010) != 0); + } + + /** + * + * + *
            +     * Optional. Specification of tools that are used to serve the request.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec tools_spec = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The toolsSpec. + */ + public com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec getToolsSpec() { + if (toolsSpecBuilder_ == null) { + return toolsSpec_ == null + ? com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec + .getDefaultInstance() + : toolsSpec_; + } else { + return toolsSpecBuilder_.getMessage(); + } + } + + /** + * + * + *
            +     * Optional. Specification of tools that are used to serve the request.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec tools_spec = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setToolsSpec( + com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec value) { + if (toolsSpecBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + toolsSpec_ = value; + } else { + toolsSpecBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Optional. Specification of tools that are used to serve the request.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec tools_spec = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setToolsSpec( + com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec.Builder + builderForValue) { + if (toolsSpecBuilder_ == null) { + toolsSpec_ = builderForValue.build(); + } else { + toolsSpecBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Optional. Specification of tools that are used to serve the request.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec tools_spec = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeToolsSpec( + com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec value) { + if (toolsSpecBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) + && toolsSpec_ != null + && toolsSpec_ + != com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec + .getDefaultInstance()) { + getToolsSpecBuilder().mergeFrom(value); + } else { + toolsSpec_ = value; + } + } else { + toolsSpecBuilder_.mergeFrom(value); + } + if (toolsSpec_ != null) { + bitField0_ |= 0x00000010; + onChanged(); + } + return this; + } + + /** + * + * + *
            +     * Optional. Specification of tools that are used to serve the request.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec tools_spec = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearToolsSpec() { + bitField0_ = (bitField0_ & ~0x00000010); + toolsSpec_ = null; + if (toolsSpecBuilder_ != null) { + toolsSpecBuilder_.dispose(); + toolsSpecBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
            +     * Optional. Specification of tools that are used to serve the request.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec tools_spec = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec.Builder + getToolsSpecBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return internalGetToolsSpecFieldBuilder().getBuilder(); + } + + /** + * + * + *
            +     * Optional. Specification of tools that are used to serve the request.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec tools_spec = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpecOrBuilder + getToolsSpecOrBuilder() { + if (toolsSpecBuilder_ != null) { + return toolsSpecBuilder_.getMessageOrBuilder(); + } else { + return toolsSpec_ == null + ? com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec + .getDefaultInstance() + : toolsSpec_; + } + } + + /** + * + * + *
            +     * Optional. Specification of tools that are used to serve the request.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec tools_spec = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec, + com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec.Builder, + com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpecOrBuilder> + internalGetToolsSpecFieldBuilder() { + if (toolsSpecBuilder_ == null) { + toolsSpecBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec, + com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec.Builder, + com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpecOrBuilder>( + getToolsSpec(), getParentForChildren(), isClean()); + toolsSpec_ = null; + } + return toolsSpecBuilder_; + } + + private com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.GenerationSpec + generationSpec_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.GenerationSpec, + com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.GenerationSpec.Builder, + com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.GenerationSpecOrBuilder> + generationSpecBuilder_; + + /** + * + * + *
            +     * Optional. Specification of the generation configuration for the request.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.StreamAssistRequest.GenerationSpec generation_spec = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the generationSpec field is set. + */ + public boolean hasGenerationSpec() { + return ((bitField0_ & 0x00000020) != 0); + } + + /** + * + * + *
            +     * Optional. Specification of the generation configuration for the request.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.StreamAssistRequest.GenerationSpec generation_spec = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The generationSpec. + */ + public com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.GenerationSpec + getGenerationSpec() { + if (generationSpecBuilder_ == null) { + return generationSpec_ == null + ? com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.GenerationSpec + .getDefaultInstance() + : generationSpec_; + } else { + return generationSpecBuilder_.getMessage(); + } + } + + /** + * + * + *
            +     * Optional. Specification of the generation configuration for the request.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.StreamAssistRequest.GenerationSpec generation_spec = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setGenerationSpec( + com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.GenerationSpec value) { + if (generationSpecBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + generationSpec_ = value; + } else { + generationSpecBuilder_.setMessage(value); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Optional. Specification of the generation configuration for the request.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.StreamAssistRequest.GenerationSpec generation_spec = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setGenerationSpec( + com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.GenerationSpec.Builder + builderForValue) { + if (generationSpecBuilder_ == null) { + generationSpec_ = builderForValue.build(); + } else { + generationSpecBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Optional. Specification of the generation configuration for the request.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.StreamAssistRequest.GenerationSpec generation_spec = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeGenerationSpec( + com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.GenerationSpec value) { + if (generationSpecBuilder_ == null) { + if (((bitField0_ & 0x00000020) != 0) + && generationSpec_ != null + && generationSpec_ + != com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.GenerationSpec + .getDefaultInstance()) { + getGenerationSpecBuilder().mergeFrom(value); + } else { + generationSpec_ = value; + } + } else { + generationSpecBuilder_.mergeFrom(value); + } + if (generationSpec_ != null) { + bitField0_ |= 0x00000020; + onChanged(); + } + return this; + } + + /** + * + * + *
            +     * Optional. Specification of the generation configuration for the request.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.StreamAssistRequest.GenerationSpec generation_spec = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearGenerationSpec() { + bitField0_ = (bitField0_ & ~0x00000020); + generationSpec_ = null; + if (generationSpecBuilder_ != null) { + generationSpecBuilder_.dispose(); + generationSpecBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
            +     * Optional. Specification of the generation configuration for the request.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.StreamAssistRequest.GenerationSpec generation_spec = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.GenerationSpec.Builder + getGenerationSpecBuilder() { + bitField0_ |= 0x00000020; + onChanged(); + return internalGetGenerationSpecFieldBuilder().getBuilder(); + } + + /** + * + * + *
            +     * Optional. Specification of the generation configuration for the request.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.StreamAssistRequest.GenerationSpec generation_spec = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.GenerationSpecOrBuilder + getGenerationSpecOrBuilder() { + if (generationSpecBuilder_ != null) { + return generationSpecBuilder_.getMessageOrBuilder(); + } else { + return generationSpec_ == null + ? com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.GenerationSpec + .getDefaultInstance() + : generationSpec_; + } + } + + /** + * + * + *
            +     * Optional. Specification of the generation configuration for the request.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.StreamAssistRequest.GenerationSpec generation_spec = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.GenerationSpec, + com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.GenerationSpec.Builder, + com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.GenerationSpecOrBuilder> + internalGetGenerationSpecFieldBuilder() { + if (generationSpecBuilder_ == null) { + generationSpecBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.GenerationSpec, + com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.GenerationSpec.Builder, + com.google.cloud.discoveryengine.v1beta.StreamAssistRequest + .GenerationSpecOrBuilder>( + getGenerationSpec(), getParentForChildren(), isClean()); + generationSpec_ = null; + } + return generationSpecBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.StreamAssistRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.StreamAssistRequest) + private static final com.google.cloud.discoveryengine.v1beta.StreamAssistRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.discoveryengine.v1beta.StreamAssistRequest(); + } + + public static com.google.cloud.discoveryengine.v1beta.StreamAssistRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public StreamAssistRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.StreamAssistRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/StreamAssistRequestOrBuilder.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/StreamAssistRequestOrBuilder.java new file mode 100644 index 000000000000..0bc4faf18e3b --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/StreamAssistRequestOrBuilder.java @@ -0,0 +1,291 @@ +/* + * 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/cloud/discoveryengine/v1beta/assistant_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.discoveryengine.v1beta; + +@com.google.protobuf.Generated +public interface StreamAssistRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.StreamAssistRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
            +   * Required. The resource name of the
            +   * [Assistant][google.cloud.discoveryengine.v1beta.Assistant]. Format:
            +   * `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/assistants/{assistant}`
            +   * 
            + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
            +   * Required. The resource name of the
            +   * [Assistant][google.cloud.discoveryengine.v1beta.Assistant]. Format:
            +   * `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/assistants/{assistant}`
            +   * 
            + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
            +   * Optional. Current user query.
            +   *
            +   * Empty query is only supported if `file_ids` are provided. In this case, the
            +   * answer will be generated based on those context files.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Query query = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the query field is set. + */ + boolean hasQuery(); + + /** + * + * + *
            +   * Optional. Current user query.
            +   *
            +   * Empty query is only supported if `file_ids` are provided. In this case, the
            +   * answer will be generated based on those context files.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Query query = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The query. + */ + com.google.cloud.discoveryengine.v1beta.Query getQuery(); + + /** + * + * + *
            +   * Optional. Current user query.
            +   *
            +   * Empty query is only supported if `file_ids` are provided. In this case, the
            +   * answer will be generated based on those context files.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Query query = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.discoveryengine.v1beta.QueryOrBuilder getQueryOrBuilder(); + + /** + * + * + *
            +   * Optional. The session to use for the request. If specified, the assistant
            +   * has access to the session history, and the query and the answer are stored
            +   * there.
            +   *
            +   * If `-` is specified as the session ID, or it is left empty, then a new
            +   * session is created with an automatically generated ID.
            +   *
            +   * Format:
            +   * `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/sessions/{session}`
            +   * 
            + * + * + * string session = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The session. + */ + java.lang.String getSession(); + + /** + * + * + *
            +   * Optional. The session to use for the request. If specified, the assistant
            +   * has access to the session history, and the query and the answer are stored
            +   * there.
            +   *
            +   * If `-` is specified as the session ID, or it is left empty, then a new
            +   * session is created with an automatically generated ID.
            +   *
            +   * Format:
            +   * `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/sessions/{session}`
            +   * 
            + * + * + * string session = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for session. + */ + com.google.protobuf.ByteString getSessionBytes(); + + /** + * + * + *
            +   * Optional. Information about the user initiating the query.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AssistUserMetadata user_metadata = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the userMetadata field is set. + */ + boolean hasUserMetadata(); + + /** + * + * + *
            +   * Optional. Information about the user initiating the query.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AssistUserMetadata user_metadata = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The userMetadata. + */ + com.google.cloud.discoveryengine.v1beta.AssistUserMetadata getUserMetadata(); + + /** + * + * + *
            +   * Optional. Information about the user initiating the query.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.AssistUserMetadata user_metadata = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.discoveryengine.v1beta.AssistUserMetadataOrBuilder getUserMetadataOrBuilder(); + + /** + * + * + *
            +   * Optional. Specification of tools that are used to serve the request.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec tools_spec = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the toolsSpec field is set. + */ + boolean hasToolsSpec(); + + /** + * + * + *
            +   * Optional. Specification of tools that are used to serve the request.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec tools_spec = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The toolsSpec. + */ + com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec getToolsSpec(); + + /** + * + * + *
            +   * Optional. Specification of tools that are used to serve the request.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec tools_spec = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpecOrBuilder + getToolsSpecOrBuilder(); + + /** + * + * + *
            +   * Optional. Specification of the generation configuration for the request.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.StreamAssistRequest.GenerationSpec generation_spec = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the generationSpec field is set. + */ + boolean hasGenerationSpec(); + + /** + * + * + *
            +   * Optional. Specification of the generation configuration for the request.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.StreamAssistRequest.GenerationSpec generation_spec = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The generationSpec. + */ + com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.GenerationSpec getGenerationSpec(); + + /** + * + * + *
            +   * Optional. Specification of the generation configuration for the request.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.StreamAssistRequest.GenerationSpec generation_spec = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.discoveryengine.v1beta.StreamAssistRequest.GenerationSpecOrBuilder + getGenerationSpecOrBuilder(); +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/StreamAssistResponse.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/StreamAssistResponse.java new file mode 100644 index 000000000000..eb1c1ff74050 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/StreamAssistResponse.java @@ -0,0 +1,3863 @@ +/* + * 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/cloud/discoveryengine/v1beta/assistant_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.discoveryengine.v1beta; + +/** + * + * + *
            + * Response for the
            + * [AssistantService.StreamAssist][google.cloud.discoveryengine.v1beta.AssistantService.StreamAssist]
            + * method.
            + * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.StreamAssistResponse} + */ +@com.google.protobuf.Generated +public final class StreamAssistResponse extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.StreamAssistResponse) + StreamAssistResponseOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "StreamAssistResponse"); + } + + // Use StreamAssistResponse.newBuilder() to construct. + private StreamAssistResponse(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private StreamAssistResponse() { + assistToken_ = ""; + invocationTools_ = com.google.protobuf.LazyStringArrayList.emptyList(); + invokedSkills_ = java.util.Collections.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.AssistantServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_StreamAssistResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.AssistantServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_StreamAssistResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.StreamAssistResponse.class, + com.google.cloud.discoveryengine.v1beta.StreamAssistResponse.Builder.class); + } + + public interface SessionInfoOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.StreamAssistResponse.SessionInfo) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
            +     * Name of the newly generated or continued session.
            +     *
            +     * Format:
            +     * `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/sessions/{session}`.
            +     * 
            + * + * string session = 1 [(.google.api.resource_reference) = { ... } + * + * @return The session. + */ + java.lang.String getSession(); + + /** + * + * + *
            +     * Name of the newly generated or continued session.
            +     *
            +     * Format:
            +     * `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/sessions/{session}`.
            +     * 
            + * + * string session = 1 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for session. + */ + com.google.protobuf.ByteString getSessionBytes(); + } + + /** + * + * + *
            +   * Information about the session.
            +   * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.StreamAssistResponse.SessionInfo} + */ + public static final class SessionInfo extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.StreamAssistResponse.SessionInfo) + SessionInfoOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "SessionInfo"); + } + + // Use SessionInfo.newBuilder() to construct. + private SessionInfo(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private SessionInfo() { + session_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.AssistantServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_StreamAssistResponse_SessionInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.AssistantServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_StreamAssistResponse_SessionInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.StreamAssistResponse.SessionInfo.class, + com.google.cloud.discoveryengine.v1beta.StreamAssistResponse.SessionInfo.Builder + .class); + } + + public static final int SESSION_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object session_ = ""; + + /** + * + * + *
            +     * Name of the newly generated or continued session.
            +     *
            +     * Format:
            +     * `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/sessions/{session}`.
            +     * 
            + * + * string session = 1 [(.google.api.resource_reference) = { ... } + * + * @return The session. + */ + @java.lang.Override + public java.lang.String getSession() { + java.lang.Object ref = session_; + 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(); + session_ = s; + return s; + } + } + + /** + * + * + *
            +     * Name of the newly generated or continued session.
            +     *
            +     * Format:
            +     * `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/sessions/{session}`.
            +     * 
            + * + * string session = 1 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for session. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSessionBytes() { + java.lang.Object ref = session_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + session_ = 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 { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(session_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, session_); + } + 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(session_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, session_); + } + 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.discoveryengine.v1beta.StreamAssistResponse.SessionInfo)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1beta.StreamAssistResponse.SessionInfo other = + (com.google.cloud.discoveryengine.v1beta.StreamAssistResponse.SessionInfo) obj; + + if (!getSession().equals(other.getSession())) 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) + SESSION_FIELD_NUMBER; + hash = (53 * hash) + getSession().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1beta.StreamAssistResponse.SessionInfo + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.StreamAssistResponse.SessionInfo + 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.discoveryengine.v1beta.StreamAssistResponse.SessionInfo + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.StreamAssistResponse.SessionInfo + 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.discoveryengine.v1beta.StreamAssistResponse.SessionInfo + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.StreamAssistResponse.SessionInfo + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1beta.StreamAssistResponse.SessionInfo + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.StreamAssistResponse.SessionInfo + 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.discoveryengine.v1beta.StreamAssistResponse.SessionInfo + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.StreamAssistResponse.SessionInfo + 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.discoveryengine.v1beta.StreamAssistResponse.SessionInfo + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.StreamAssistResponse.SessionInfo + 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.discoveryengine.v1beta.StreamAssistResponse.SessionInfo 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; + } + + /** + * + * + *
            +     * Information about the session.
            +     * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.StreamAssistResponse.SessionInfo} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.StreamAssistResponse.SessionInfo) + com.google.cloud.discoveryengine.v1beta.StreamAssistResponse.SessionInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.AssistantServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_StreamAssistResponse_SessionInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.AssistantServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_StreamAssistResponse_SessionInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.StreamAssistResponse.SessionInfo.class, + com.google.cloud.discoveryengine.v1beta.StreamAssistResponse.SessionInfo.Builder + .class); + } + + // Construct using + // com.google.cloud.discoveryengine.v1beta.StreamAssistResponse.SessionInfo.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + session_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1beta.AssistantServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_StreamAssistResponse_SessionInfo_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.StreamAssistResponse.SessionInfo + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1beta.StreamAssistResponse.SessionInfo + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.StreamAssistResponse.SessionInfo build() { + com.google.cloud.discoveryengine.v1beta.StreamAssistResponse.SessionInfo result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.StreamAssistResponse.SessionInfo + buildPartial() { + com.google.cloud.discoveryengine.v1beta.StreamAssistResponse.SessionInfo result = + new com.google.cloud.discoveryengine.v1beta.StreamAssistResponse.SessionInfo(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.discoveryengine.v1beta.StreamAssistResponse.SessionInfo result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.session_ = session_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.cloud.discoveryengine.v1beta.StreamAssistResponse.SessionInfo) { + return mergeFrom( + (com.google.cloud.discoveryengine.v1beta.StreamAssistResponse.SessionInfo) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1beta.StreamAssistResponse.SessionInfo other) { + if (other + == com.google.cloud.discoveryengine.v1beta.StreamAssistResponse.SessionInfo + .getDefaultInstance()) return this; + if (!other.getSession().isEmpty()) { + session_ = other.session_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + session_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object session_ = ""; + + /** + * + * + *
            +       * Name of the newly generated or continued session.
            +       *
            +       * Format:
            +       * `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/sessions/{session}`.
            +       * 
            + * + * string session = 1 [(.google.api.resource_reference) = { ... } + * + * @return The session. + */ + public java.lang.String getSession() { + java.lang.Object ref = session_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + session_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
            +       * Name of the newly generated or continued session.
            +       *
            +       * Format:
            +       * `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/sessions/{session}`.
            +       * 
            + * + * string session = 1 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for session. + */ + public com.google.protobuf.ByteString getSessionBytes() { + java.lang.Object ref = session_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + session_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
            +       * Name of the newly generated or continued session.
            +       *
            +       * Format:
            +       * `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/sessions/{session}`.
            +       * 
            + * + * string session = 1 [(.google.api.resource_reference) = { ... } + * + * @param value The session to set. + * @return This builder for chaining. + */ + public Builder setSession(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + session_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
            +       * Name of the newly generated or continued session.
            +       *
            +       * Format:
            +       * `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/sessions/{session}`.
            +       * 
            + * + * string session = 1 [(.google.api.resource_reference) = { ... } + * + * @return This builder for chaining. + */ + public Builder clearSession() { + session_ = getDefaultInstance().getSession(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
            +       * Name of the newly generated or continued session.
            +       *
            +       * Format:
            +       * `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/sessions/{session}`.
            +       * 
            + * + * string session = 1 [(.google.api.resource_reference) = { ... } + * + * @param value The bytes for session to set. + * @return This builder for chaining. + */ + public Builder setSessionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + session_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.StreamAssistResponse.SessionInfo) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.StreamAssistResponse.SessionInfo) + private static final com.google.cloud.discoveryengine.v1beta.StreamAssistResponse.SessionInfo + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.discoveryengine.v1beta.StreamAssistResponse.SessionInfo(); + } + + public static com.google.cloud.discoveryengine.v1beta.StreamAssistResponse.SessionInfo + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SessionInfo parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.StreamAssistResponse.SessionInfo + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface InvokedSkillOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.StreamAssistResponse.InvokedSkill) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
            +     * The resource name of the skill.
            +     * 
            + * + * string name = 1; + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
            +     * The resource name of the skill.
            +     * 
            + * + * string name = 1; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
            +     * The display name of the skill.
            +     * 
            + * + * string display_name = 2; + * + * @return The displayName. + */ + java.lang.String getDisplayName(); + + /** + * + * + *
            +     * The display name of the skill.
            +     * 
            + * + * string display_name = 2; + * + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString getDisplayNameBytes(); + } + + /** + * + * + *
            +   * Represents a skill used during the assist call.
            +   * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.StreamAssistResponse.InvokedSkill} + */ + public static final class InvokedSkill extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.StreamAssistResponse.InvokedSkill) + InvokedSkillOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "InvokedSkill"); + } + + // Use InvokedSkill.newBuilder() to construct. + private InvokedSkill(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private InvokedSkill() { + name_ = ""; + displayName_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.AssistantServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_StreamAssistResponse_InvokedSkill_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.AssistantServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_StreamAssistResponse_InvokedSkill_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.StreamAssistResponse.InvokedSkill.class, + com.google.cloud.discoveryengine.v1beta.StreamAssistResponse.InvokedSkill.Builder + .class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
            +     * The resource name of the skill.
            +     * 
            + * + * string name = 1; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + 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(); + name_ = s; + return s; + } + } + + /** + * + * + *
            +     * The resource name of the skill.
            +     * 
            + * + * string name = 1; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DISPLAY_NAME_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object displayName_ = ""; + + /** + * + * + *
            +     * The display name of the skill.
            +     * 
            + * + * string display_name = 2; + * + * @return The displayName. + */ + @java.lang.Override + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + 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(); + displayName_ = s; + return s; + } + } + + /** + * + * + *
            +     * The display name of the skill.
            +     * 
            + * + * string display_name = 2; + * + * @return The bytes for displayName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = 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 { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(displayName_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, displayName_); + } + 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(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(displayName_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, displayName_); + } + 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.discoveryengine.v1beta.StreamAssistResponse.InvokedSkill)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1beta.StreamAssistResponse.InvokedSkill other = + (com.google.cloud.discoveryengine.v1beta.StreamAssistResponse.InvokedSkill) obj; + + if (!getName().equals(other.getName())) return false; + if (!getDisplayName().equals(other.getDisplayName())) 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) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1beta.StreamAssistResponse.InvokedSkill + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.StreamAssistResponse.InvokedSkill + 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.discoveryengine.v1beta.StreamAssistResponse.InvokedSkill + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.StreamAssistResponse.InvokedSkill + 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.discoveryengine.v1beta.StreamAssistResponse.InvokedSkill + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.StreamAssistResponse.InvokedSkill + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1beta.StreamAssistResponse.InvokedSkill + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.StreamAssistResponse.InvokedSkill + 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.discoveryengine.v1beta.StreamAssistResponse.InvokedSkill + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.StreamAssistResponse.InvokedSkill + 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.discoveryengine.v1beta.StreamAssistResponse.InvokedSkill + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.StreamAssistResponse.InvokedSkill + 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.discoveryengine.v1beta.StreamAssistResponse.InvokedSkill 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; + } + + /** + * + * + *
            +     * Represents a skill used during the assist call.
            +     * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.StreamAssistResponse.InvokedSkill} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.StreamAssistResponse.InvokedSkill) + com.google.cloud.discoveryengine.v1beta.StreamAssistResponse.InvokedSkillOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.AssistantServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_StreamAssistResponse_InvokedSkill_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.AssistantServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_StreamAssistResponse_InvokedSkill_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.StreamAssistResponse.InvokedSkill.class, + com.google.cloud.discoveryengine.v1beta.StreamAssistResponse.InvokedSkill.Builder + .class); + } + + // Construct using + // com.google.cloud.discoveryengine.v1beta.StreamAssistResponse.InvokedSkill.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + displayName_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1beta.AssistantServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_StreamAssistResponse_InvokedSkill_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.StreamAssistResponse.InvokedSkill + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1beta.StreamAssistResponse.InvokedSkill + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.StreamAssistResponse.InvokedSkill build() { + com.google.cloud.discoveryengine.v1beta.StreamAssistResponse.InvokedSkill result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.StreamAssistResponse.InvokedSkill + buildPartial() { + com.google.cloud.discoveryengine.v1beta.StreamAssistResponse.InvokedSkill result = + new com.google.cloud.discoveryengine.v1beta.StreamAssistResponse.InvokedSkill(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.discoveryengine.v1beta.StreamAssistResponse.InvokedSkill result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.displayName_ = displayName_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.cloud.discoveryengine.v1beta.StreamAssistResponse.InvokedSkill) { + return mergeFrom( + (com.google.cloud.discoveryengine.v1beta.StreamAssistResponse.InvokedSkill) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1beta.StreamAssistResponse.InvokedSkill other) { + if (other + == com.google.cloud.discoveryengine.v1beta.StreamAssistResponse.InvokedSkill + .getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + displayName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + + /** + * + * + *
            +       * The resource name of the skill.
            +       * 
            + * + * string name = 1; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
            +       * The resource name of the skill.
            +       * 
            + * + * string name = 1; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
            +       * The resource name of the skill.
            +       * 
            + * + * string name = 1; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
            +       * The resource name of the skill.
            +       * 
            + * + * string name = 1; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
            +       * The resource name of the skill.
            +       * 
            + * + * string name = 1; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object displayName_ = ""; + + /** + * + * + *
            +       * The display name of the skill.
            +       * 
            + * + * string display_name = 2; + * + * @return The displayName. + */ + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
            +       * The display name of the skill.
            +       * 
            + * + * string display_name = 2; + * + * @return The bytes for displayName. + */ + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
            +       * The display name of the skill.
            +       * 
            + * + * string display_name = 2; + * + * @param value The displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + displayName_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
            +       * The display name of the skill.
            +       * 
            + * + * string display_name = 2; + * + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + displayName_ = getDefaultInstance().getDisplayName(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
            +       * The display name of the skill.
            +       * 
            + * + * string display_name = 2; + * + * @param value The bytes for displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + displayName_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.StreamAssistResponse.InvokedSkill) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.StreamAssistResponse.InvokedSkill) + private static final com.google.cloud.discoveryengine.v1beta.StreamAssistResponse.InvokedSkill + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.discoveryengine.v1beta.StreamAssistResponse.InvokedSkill(); + } + + public static com.google.cloud.discoveryengine.v1beta.StreamAssistResponse.InvokedSkill + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public InvokedSkill parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.StreamAssistResponse.InvokedSkill + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int bitField0_; + public static final int ANSWER_FIELD_NUMBER = 1; + private com.google.cloud.discoveryengine.v1beta.AssistAnswer answer_; + + /** + * + * + *
            +   * Assist answer resource object containing parts of the assistant's final
            +   * answer for the user's query.
            +   *
            +   * Not present if the current response doesn't add anything to previously
            +   * sent
            +   * [AssistAnswer.replies][google.cloud.discoveryengine.v1beta.AssistAnswer.replies].
            +   *
            +   * Observe
            +   * [AssistAnswer.state][google.cloud.discoveryengine.v1beta.AssistAnswer.state]
            +   * to see if more parts are to be expected. While the state is `IN_PROGRESS`,
            +   * the
            +   * [AssistAnswer.replies][google.cloud.discoveryengine.v1beta.AssistAnswer.replies]
            +   * field in each response will contain replies (reply fragments) to be
            +   * appended to the ones received in previous responses.
            +   * [AssistAnswer.name][google.cloud.discoveryengine.v1beta.AssistAnswer.name]
            +   * won't be filled.
            +   *
            +   * If the state is `SUCCEEDED`, `FAILED` or `SKIPPED`, the response
            +   * is the last response and
            +   * [AssistAnswer.name][google.cloud.discoveryengine.v1beta.AssistAnswer.name]
            +   * will have a value.
            +   * 
            + * + * .google.cloud.discoveryengine.v1beta.AssistAnswer answer = 1; + * + * @return Whether the answer field is set. + */ + @java.lang.Override + public boolean hasAnswer() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
            +   * Assist answer resource object containing parts of the assistant's final
            +   * answer for the user's query.
            +   *
            +   * Not present if the current response doesn't add anything to previously
            +   * sent
            +   * [AssistAnswer.replies][google.cloud.discoveryengine.v1beta.AssistAnswer.replies].
            +   *
            +   * Observe
            +   * [AssistAnswer.state][google.cloud.discoveryengine.v1beta.AssistAnswer.state]
            +   * to see if more parts are to be expected. While the state is `IN_PROGRESS`,
            +   * the
            +   * [AssistAnswer.replies][google.cloud.discoveryengine.v1beta.AssistAnswer.replies]
            +   * field in each response will contain replies (reply fragments) to be
            +   * appended to the ones received in previous responses.
            +   * [AssistAnswer.name][google.cloud.discoveryengine.v1beta.AssistAnswer.name]
            +   * won't be filled.
            +   *
            +   * If the state is `SUCCEEDED`, `FAILED` or `SKIPPED`, the response
            +   * is the last response and
            +   * [AssistAnswer.name][google.cloud.discoveryengine.v1beta.AssistAnswer.name]
            +   * will have a value.
            +   * 
            + * + * .google.cloud.discoveryengine.v1beta.AssistAnswer answer = 1; + * + * @return The answer. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AssistAnswer getAnswer() { + return answer_ == null + ? com.google.cloud.discoveryengine.v1beta.AssistAnswer.getDefaultInstance() + : answer_; + } + + /** + * + * + *
            +   * Assist answer resource object containing parts of the assistant's final
            +   * answer for the user's query.
            +   *
            +   * Not present if the current response doesn't add anything to previously
            +   * sent
            +   * [AssistAnswer.replies][google.cloud.discoveryengine.v1beta.AssistAnswer.replies].
            +   *
            +   * Observe
            +   * [AssistAnswer.state][google.cloud.discoveryengine.v1beta.AssistAnswer.state]
            +   * to see if more parts are to be expected. While the state is `IN_PROGRESS`,
            +   * the
            +   * [AssistAnswer.replies][google.cloud.discoveryengine.v1beta.AssistAnswer.replies]
            +   * field in each response will contain replies (reply fragments) to be
            +   * appended to the ones received in previous responses.
            +   * [AssistAnswer.name][google.cloud.discoveryengine.v1beta.AssistAnswer.name]
            +   * won't be filled.
            +   *
            +   * If the state is `SUCCEEDED`, `FAILED` or `SKIPPED`, the response
            +   * is the last response and
            +   * [AssistAnswer.name][google.cloud.discoveryengine.v1beta.AssistAnswer.name]
            +   * will have a value.
            +   * 
            + * + * .google.cloud.discoveryengine.v1beta.AssistAnswer answer = 1; + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AssistAnswerOrBuilder getAnswerOrBuilder() { + return answer_ == null + ? com.google.cloud.discoveryengine.v1beta.AssistAnswer.getDefaultInstance() + : answer_; + } + + public static final int SESSION_INFO_FIELD_NUMBER = 2; + private com.google.cloud.discoveryengine.v1beta.StreamAssistResponse.SessionInfo sessionInfo_; + + /** + * + * + *
            +   * Session information. Only included in the final StreamAssistResponse of the
            +   * response stream.
            +   * 
            + * + * .google.cloud.discoveryengine.v1beta.StreamAssistResponse.SessionInfo session_info = 2; + * + * + * @return Whether the sessionInfo field is set. + */ + @java.lang.Override + public boolean hasSessionInfo() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
            +   * Session information. Only included in the final StreamAssistResponse of the
            +   * response stream.
            +   * 
            + * + * .google.cloud.discoveryengine.v1beta.StreamAssistResponse.SessionInfo session_info = 2; + * + * + * @return The sessionInfo. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.StreamAssistResponse.SessionInfo getSessionInfo() { + return sessionInfo_ == null + ? com.google.cloud.discoveryengine.v1beta.StreamAssistResponse.SessionInfo + .getDefaultInstance() + : sessionInfo_; + } + + /** + * + * + *
            +   * Session information. Only included in the final StreamAssistResponse of the
            +   * response stream.
            +   * 
            + * + * .google.cloud.discoveryengine.v1beta.StreamAssistResponse.SessionInfo session_info = 2; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.StreamAssistResponse.SessionInfoOrBuilder + getSessionInfoOrBuilder() { + return sessionInfo_ == null + ? com.google.cloud.discoveryengine.v1beta.StreamAssistResponse.SessionInfo + .getDefaultInstance() + : sessionInfo_; + } + + public static final int ASSIST_TOKEN_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object assistToken_ = ""; + + /** + * + * + *
            +   * A global unique ID that identifies the current pair of request and stream
            +   * of responses. Used for feedback and support.
            +   * 
            + * + * string assist_token = 4; + * + * @return The assistToken. + */ + @java.lang.Override + public java.lang.String getAssistToken() { + java.lang.Object ref = assistToken_; + 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(); + assistToken_ = s; + return s; + } + } + + /** + * + * + *
            +   * A global unique ID that identifies the current pair of request and stream
            +   * of responses. Used for feedback and support.
            +   * 
            + * + * string assist_token = 4; + * + * @return The bytes for assistToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getAssistTokenBytes() { + java.lang.Object ref = assistToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + assistToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int INVOCATION_TOOLS_FIELD_NUMBER = 8; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList invocationTools_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + /** + * + * + *
            +   * The tool names of the tools that were invoked.
            +   * 
            + * + * repeated string invocation_tools = 8; + * + * @return A list containing the invocationTools. + */ + public com.google.protobuf.ProtocolStringList getInvocationToolsList() { + return invocationTools_; + } + + /** + * + * + *
            +   * The tool names of the tools that were invoked.
            +   * 
            + * + * repeated string invocation_tools = 8; + * + * @return The count of invocationTools. + */ + public int getInvocationToolsCount() { + return invocationTools_.size(); + } + + /** + * + * + *
            +   * The tool names of the tools that were invoked.
            +   * 
            + * + * repeated string invocation_tools = 8; + * + * @param index The index of the element to return. + * @return The invocationTools at the given index. + */ + public java.lang.String getInvocationTools(int index) { + return invocationTools_.get(index); + } + + /** + * + * + *
            +   * The tool names of the tools that were invoked.
            +   * 
            + * + * repeated string invocation_tools = 8; + * + * @param index The index of the value to return. + * @return The bytes of the invocationTools at the given index. + */ + public com.google.protobuf.ByteString getInvocationToolsBytes(int index) { + return invocationTools_.getByteString(index); + } + + public static final int INVOKED_SKILLS_FIELD_NUMBER = 10; + + @SuppressWarnings("serial") + private java.util.List + invokedSkills_; + + /** + * + * + *
            +   * The skills executed during the turn.
            +   * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.StreamAssistResponse.InvokedSkill invoked_skills = 10; + * + */ + @java.lang.Override + public java.util.List + getInvokedSkillsList() { + return invokedSkills_; + } + + /** + * + * + *
            +   * The skills executed during the turn.
            +   * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.StreamAssistResponse.InvokedSkill invoked_skills = 10; + * + */ + @java.lang.Override + public java.util.List< + ? extends + com.google.cloud.discoveryengine.v1beta.StreamAssistResponse.InvokedSkillOrBuilder> + getInvokedSkillsOrBuilderList() { + return invokedSkills_; + } + + /** + * + * + *
            +   * The skills executed during the turn.
            +   * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.StreamAssistResponse.InvokedSkill invoked_skills = 10; + * + */ + @java.lang.Override + public int getInvokedSkillsCount() { + return invokedSkills_.size(); + } + + /** + * + * + *
            +   * The skills executed during the turn.
            +   * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.StreamAssistResponse.InvokedSkill invoked_skills = 10; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.StreamAssistResponse.InvokedSkill getInvokedSkills( + int index) { + return invokedSkills_.get(index); + } + + /** + * + * + *
            +   * The skills executed during the turn.
            +   * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.StreamAssistResponse.InvokedSkill invoked_skills = 10; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.StreamAssistResponse.InvokedSkillOrBuilder + getInvokedSkillsOrBuilder(int index) { + return invokedSkills_.get(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, getAnswer()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(2, getSessionInfo()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(assistToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, assistToken_); + } + for (int i = 0; i < invocationTools_.size(); i++) { + com.google.protobuf.GeneratedMessage.writeString(output, 8, invocationTools_.getRaw(i)); + } + for (int i = 0; i < invokedSkills_.size(); i++) { + output.writeMessage(10, invokedSkills_.get(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, getAnswer()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getSessionInfo()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(assistToken_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, assistToken_); + } + { + int dataSize = 0; + for (int i = 0; i < invocationTools_.size(); i++) { + dataSize += computeStringSizeNoTag(invocationTools_.getRaw(i)); + } + size += dataSize; + size += 1 * getInvocationToolsList().size(); + } + for (int i = 0; i < invokedSkills_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(10, invokedSkills_.get(i)); + } + 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.discoveryengine.v1beta.StreamAssistResponse)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1beta.StreamAssistResponse other = + (com.google.cloud.discoveryengine.v1beta.StreamAssistResponse) obj; + + if (hasAnswer() != other.hasAnswer()) return false; + if (hasAnswer()) { + if (!getAnswer().equals(other.getAnswer())) return false; + } + if (hasSessionInfo() != other.hasSessionInfo()) return false; + if (hasSessionInfo()) { + if (!getSessionInfo().equals(other.getSessionInfo())) return false; + } + if (!getAssistToken().equals(other.getAssistToken())) return false; + if (!getInvocationToolsList().equals(other.getInvocationToolsList())) return false; + if (!getInvokedSkillsList().equals(other.getInvokedSkillsList())) 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 (hasAnswer()) { + hash = (37 * hash) + ANSWER_FIELD_NUMBER; + hash = (53 * hash) + getAnswer().hashCode(); + } + if (hasSessionInfo()) { + hash = (37 * hash) + SESSION_INFO_FIELD_NUMBER; + hash = (53 * hash) + getSessionInfo().hashCode(); + } + hash = (37 * hash) + ASSIST_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getAssistToken().hashCode(); + if (getInvocationToolsCount() > 0) { + hash = (37 * hash) + INVOCATION_TOOLS_FIELD_NUMBER; + hash = (53 * hash) + getInvocationToolsList().hashCode(); + } + if (getInvokedSkillsCount() > 0) { + hash = (37 * hash) + INVOKED_SKILLS_FIELD_NUMBER; + hash = (53 * hash) + getInvokedSkillsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1beta.StreamAssistResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.StreamAssistResponse 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.discoveryengine.v1beta.StreamAssistResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.StreamAssistResponse 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.discoveryengine.v1beta.StreamAssistResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.StreamAssistResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1beta.StreamAssistResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.StreamAssistResponse 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.discoveryengine.v1beta.StreamAssistResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.StreamAssistResponse 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.discoveryengine.v1beta.StreamAssistResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.StreamAssistResponse 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.discoveryengine.v1beta.StreamAssistResponse 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 for the
            +   * [AssistantService.StreamAssist][google.cloud.discoveryengine.v1beta.AssistantService.StreamAssist]
            +   * method.
            +   * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.StreamAssistResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.StreamAssistResponse) + com.google.cloud.discoveryengine.v1beta.StreamAssistResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.AssistantServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_StreamAssistResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.AssistantServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_StreamAssistResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.StreamAssistResponse.class, + com.google.cloud.discoveryengine.v1beta.StreamAssistResponse.Builder.class); + } + + // Construct using com.google.cloud.discoveryengine.v1beta.StreamAssistResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetAnswerFieldBuilder(); + internalGetSessionInfoFieldBuilder(); + internalGetInvokedSkillsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + answer_ = null; + if (answerBuilder_ != null) { + answerBuilder_.dispose(); + answerBuilder_ = null; + } + sessionInfo_ = null; + if (sessionInfoBuilder_ != null) { + sessionInfoBuilder_.dispose(); + sessionInfoBuilder_ = null; + } + assistToken_ = ""; + invocationTools_ = com.google.protobuf.LazyStringArrayList.emptyList(); + if (invokedSkillsBuilder_ == null) { + invokedSkills_ = java.util.Collections.emptyList(); + } else { + invokedSkills_ = null; + invokedSkillsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000010); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1beta.AssistantServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_StreamAssistResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.StreamAssistResponse + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1beta.StreamAssistResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.StreamAssistResponse build() { + com.google.cloud.discoveryengine.v1beta.StreamAssistResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.StreamAssistResponse buildPartial() { + com.google.cloud.discoveryengine.v1beta.StreamAssistResponse result = + new com.google.cloud.discoveryengine.v1beta.StreamAssistResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.discoveryengine.v1beta.StreamAssistResponse result) { + if (invokedSkillsBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0)) { + invokedSkills_ = java.util.Collections.unmodifiableList(invokedSkills_); + bitField0_ = (bitField0_ & ~0x00000010); + } + result.invokedSkills_ = invokedSkills_; + } else { + result.invokedSkills_ = invokedSkillsBuilder_.build(); + } + } + + private void buildPartial0( + com.google.cloud.discoveryengine.v1beta.StreamAssistResponse result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.answer_ = answerBuilder_ == null ? answer_ : answerBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.sessionInfo_ = + sessionInfoBuilder_ == null ? sessionInfo_ : sessionInfoBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.assistToken_ = assistToken_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + invocationTools_.makeImmutable(); + result.invocationTools_ = invocationTools_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.discoveryengine.v1beta.StreamAssistResponse) { + return mergeFrom((com.google.cloud.discoveryengine.v1beta.StreamAssistResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.discoveryengine.v1beta.StreamAssistResponse other) { + if (other + == com.google.cloud.discoveryengine.v1beta.StreamAssistResponse.getDefaultInstance()) + return this; + if (other.hasAnswer()) { + mergeAnswer(other.getAnswer()); + } + if (other.hasSessionInfo()) { + mergeSessionInfo(other.getSessionInfo()); + } + if (!other.getAssistToken().isEmpty()) { + assistToken_ = other.assistToken_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.invocationTools_.isEmpty()) { + if (invocationTools_.isEmpty()) { + invocationTools_ = other.invocationTools_; + bitField0_ |= 0x00000008; + } else { + ensureInvocationToolsIsMutable(); + invocationTools_.addAll(other.invocationTools_); + } + onChanged(); + } + if (invokedSkillsBuilder_ == null) { + if (!other.invokedSkills_.isEmpty()) { + if (invokedSkills_.isEmpty()) { + invokedSkills_ = other.invokedSkills_; + bitField0_ = (bitField0_ & ~0x00000010); + } else { + ensureInvokedSkillsIsMutable(); + invokedSkills_.addAll(other.invokedSkills_); + } + onChanged(); + } + } else { + if (!other.invokedSkills_.isEmpty()) { + if (invokedSkillsBuilder_.isEmpty()) { + invokedSkillsBuilder_.dispose(); + invokedSkillsBuilder_ = null; + invokedSkills_ = other.invokedSkills_; + bitField0_ = (bitField0_ & ~0x00000010); + invokedSkillsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetInvokedSkillsFieldBuilder() + : null; + } else { + invokedSkillsBuilder_.addAllMessages(other.invokedSkills_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(internalGetAnswerFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage( + internalGetSessionInfoFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 34: + { + assistToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 34 + case 66: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureInvocationToolsIsMutable(); + invocationTools_.add(s); + break; + } // case 66 + case 82: + { + com.google.cloud.discoveryengine.v1beta.StreamAssistResponse.InvokedSkill m = + input.readMessage( + com.google.cloud.discoveryengine.v1beta.StreamAssistResponse.InvokedSkill + .parser(), + extensionRegistry); + if (invokedSkillsBuilder_ == null) { + ensureInvokedSkillsIsMutable(); + invokedSkills_.add(m); + } else { + invokedSkillsBuilder_.addMessage(m); + } + break; + } // case 82 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.cloud.discoveryengine.v1beta.AssistAnswer answer_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.AssistAnswer, + com.google.cloud.discoveryengine.v1beta.AssistAnswer.Builder, + com.google.cloud.discoveryengine.v1beta.AssistAnswerOrBuilder> + answerBuilder_; + + /** + * + * + *
            +     * Assist answer resource object containing parts of the assistant's final
            +     * answer for the user's query.
            +     *
            +     * Not present if the current response doesn't add anything to previously
            +     * sent
            +     * [AssistAnswer.replies][google.cloud.discoveryengine.v1beta.AssistAnswer.replies].
            +     *
            +     * Observe
            +     * [AssistAnswer.state][google.cloud.discoveryengine.v1beta.AssistAnswer.state]
            +     * to see if more parts are to be expected. While the state is `IN_PROGRESS`,
            +     * the
            +     * [AssistAnswer.replies][google.cloud.discoveryengine.v1beta.AssistAnswer.replies]
            +     * field in each response will contain replies (reply fragments) to be
            +     * appended to the ones received in previous responses.
            +     * [AssistAnswer.name][google.cloud.discoveryengine.v1beta.AssistAnswer.name]
            +     * won't be filled.
            +     *
            +     * If the state is `SUCCEEDED`, `FAILED` or `SKIPPED`, the response
            +     * is the last response and
            +     * [AssistAnswer.name][google.cloud.discoveryengine.v1beta.AssistAnswer.name]
            +     * will have a value.
            +     * 
            + * + * .google.cloud.discoveryengine.v1beta.AssistAnswer answer = 1; + * + * @return Whether the answer field is set. + */ + public boolean hasAnswer() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
            +     * Assist answer resource object containing parts of the assistant's final
            +     * answer for the user's query.
            +     *
            +     * Not present if the current response doesn't add anything to previously
            +     * sent
            +     * [AssistAnswer.replies][google.cloud.discoveryengine.v1beta.AssistAnswer.replies].
            +     *
            +     * Observe
            +     * [AssistAnswer.state][google.cloud.discoveryengine.v1beta.AssistAnswer.state]
            +     * to see if more parts are to be expected. While the state is `IN_PROGRESS`,
            +     * the
            +     * [AssistAnswer.replies][google.cloud.discoveryengine.v1beta.AssistAnswer.replies]
            +     * field in each response will contain replies (reply fragments) to be
            +     * appended to the ones received in previous responses.
            +     * [AssistAnswer.name][google.cloud.discoveryengine.v1beta.AssistAnswer.name]
            +     * won't be filled.
            +     *
            +     * If the state is `SUCCEEDED`, `FAILED` or `SKIPPED`, the response
            +     * is the last response and
            +     * [AssistAnswer.name][google.cloud.discoveryengine.v1beta.AssistAnswer.name]
            +     * will have a value.
            +     * 
            + * + * .google.cloud.discoveryengine.v1beta.AssistAnswer answer = 1; + * + * @return The answer. + */ + public com.google.cloud.discoveryengine.v1beta.AssistAnswer getAnswer() { + if (answerBuilder_ == null) { + return answer_ == null + ? com.google.cloud.discoveryengine.v1beta.AssistAnswer.getDefaultInstance() + : answer_; + } else { + return answerBuilder_.getMessage(); + } + } + + /** + * + * + *
            +     * Assist answer resource object containing parts of the assistant's final
            +     * answer for the user's query.
            +     *
            +     * Not present if the current response doesn't add anything to previously
            +     * sent
            +     * [AssistAnswer.replies][google.cloud.discoveryengine.v1beta.AssistAnswer.replies].
            +     *
            +     * Observe
            +     * [AssistAnswer.state][google.cloud.discoveryengine.v1beta.AssistAnswer.state]
            +     * to see if more parts are to be expected. While the state is `IN_PROGRESS`,
            +     * the
            +     * [AssistAnswer.replies][google.cloud.discoveryengine.v1beta.AssistAnswer.replies]
            +     * field in each response will contain replies (reply fragments) to be
            +     * appended to the ones received in previous responses.
            +     * [AssistAnswer.name][google.cloud.discoveryengine.v1beta.AssistAnswer.name]
            +     * won't be filled.
            +     *
            +     * If the state is `SUCCEEDED`, `FAILED` or `SKIPPED`, the response
            +     * is the last response and
            +     * [AssistAnswer.name][google.cloud.discoveryengine.v1beta.AssistAnswer.name]
            +     * will have a value.
            +     * 
            + * + * .google.cloud.discoveryengine.v1beta.AssistAnswer answer = 1; + */ + public Builder setAnswer(com.google.cloud.discoveryengine.v1beta.AssistAnswer value) { + if (answerBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + answer_ = value; + } else { + answerBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Assist answer resource object containing parts of the assistant's final
            +     * answer for the user's query.
            +     *
            +     * Not present if the current response doesn't add anything to previously
            +     * sent
            +     * [AssistAnswer.replies][google.cloud.discoveryengine.v1beta.AssistAnswer.replies].
            +     *
            +     * Observe
            +     * [AssistAnswer.state][google.cloud.discoveryengine.v1beta.AssistAnswer.state]
            +     * to see if more parts are to be expected. While the state is `IN_PROGRESS`,
            +     * the
            +     * [AssistAnswer.replies][google.cloud.discoveryengine.v1beta.AssistAnswer.replies]
            +     * field in each response will contain replies (reply fragments) to be
            +     * appended to the ones received in previous responses.
            +     * [AssistAnswer.name][google.cloud.discoveryengine.v1beta.AssistAnswer.name]
            +     * won't be filled.
            +     *
            +     * If the state is `SUCCEEDED`, `FAILED` or `SKIPPED`, the response
            +     * is the last response and
            +     * [AssistAnswer.name][google.cloud.discoveryengine.v1beta.AssistAnswer.name]
            +     * will have a value.
            +     * 
            + * + * .google.cloud.discoveryengine.v1beta.AssistAnswer answer = 1; + */ + public Builder setAnswer( + com.google.cloud.discoveryengine.v1beta.AssistAnswer.Builder builderForValue) { + if (answerBuilder_ == null) { + answer_ = builderForValue.build(); + } else { + answerBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Assist answer resource object containing parts of the assistant's final
            +     * answer for the user's query.
            +     *
            +     * Not present if the current response doesn't add anything to previously
            +     * sent
            +     * [AssistAnswer.replies][google.cloud.discoveryengine.v1beta.AssistAnswer.replies].
            +     *
            +     * Observe
            +     * [AssistAnswer.state][google.cloud.discoveryengine.v1beta.AssistAnswer.state]
            +     * to see if more parts are to be expected. While the state is `IN_PROGRESS`,
            +     * the
            +     * [AssistAnswer.replies][google.cloud.discoveryengine.v1beta.AssistAnswer.replies]
            +     * field in each response will contain replies (reply fragments) to be
            +     * appended to the ones received in previous responses.
            +     * [AssistAnswer.name][google.cloud.discoveryengine.v1beta.AssistAnswer.name]
            +     * won't be filled.
            +     *
            +     * If the state is `SUCCEEDED`, `FAILED` or `SKIPPED`, the response
            +     * is the last response and
            +     * [AssistAnswer.name][google.cloud.discoveryengine.v1beta.AssistAnswer.name]
            +     * will have a value.
            +     * 
            + * + * .google.cloud.discoveryengine.v1beta.AssistAnswer answer = 1; + */ + public Builder mergeAnswer(com.google.cloud.discoveryengine.v1beta.AssistAnswer value) { + if (answerBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && answer_ != null + && answer_ + != com.google.cloud.discoveryengine.v1beta.AssistAnswer.getDefaultInstance()) { + getAnswerBuilder().mergeFrom(value); + } else { + answer_ = value; + } + } else { + answerBuilder_.mergeFrom(value); + } + if (answer_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + + /** + * + * + *
            +     * Assist answer resource object containing parts of the assistant's final
            +     * answer for the user's query.
            +     *
            +     * Not present if the current response doesn't add anything to previously
            +     * sent
            +     * [AssistAnswer.replies][google.cloud.discoveryengine.v1beta.AssistAnswer.replies].
            +     *
            +     * Observe
            +     * [AssistAnswer.state][google.cloud.discoveryengine.v1beta.AssistAnswer.state]
            +     * to see if more parts are to be expected. While the state is `IN_PROGRESS`,
            +     * the
            +     * [AssistAnswer.replies][google.cloud.discoveryengine.v1beta.AssistAnswer.replies]
            +     * field in each response will contain replies (reply fragments) to be
            +     * appended to the ones received in previous responses.
            +     * [AssistAnswer.name][google.cloud.discoveryengine.v1beta.AssistAnswer.name]
            +     * won't be filled.
            +     *
            +     * If the state is `SUCCEEDED`, `FAILED` or `SKIPPED`, the response
            +     * is the last response and
            +     * [AssistAnswer.name][google.cloud.discoveryengine.v1beta.AssistAnswer.name]
            +     * will have a value.
            +     * 
            + * + * .google.cloud.discoveryengine.v1beta.AssistAnswer answer = 1; + */ + public Builder clearAnswer() { + bitField0_ = (bitField0_ & ~0x00000001); + answer_ = null; + if (answerBuilder_ != null) { + answerBuilder_.dispose(); + answerBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
            +     * Assist answer resource object containing parts of the assistant's final
            +     * answer for the user's query.
            +     *
            +     * Not present if the current response doesn't add anything to previously
            +     * sent
            +     * [AssistAnswer.replies][google.cloud.discoveryengine.v1beta.AssistAnswer.replies].
            +     *
            +     * Observe
            +     * [AssistAnswer.state][google.cloud.discoveryengine.v1beta.AssistAnswer.state]
            +     * to see if more parts are to be expected. While the state is `IN_PROGRESS`,
            +     * the
            +     * [AssistAnswer.replies][google.cloud.discoveryengine.v1beta.AssistAnswer.replies]
            +     * field in each response will contain replies (reply fragments) to be
            +     * appended to the ones received in previous responses.
            +     * [AssistAnswer.name][google.cloud.discoveryengine.v1beta.AssistAnswer.name]
            +     * won't be filled.
            +     *
            +     * If the state is `SUCCEEDED`, `FAILED` or `SKIPPED`, the response
            +     * is the last response and
            +     * [AssistAnswer.name][google.cloud.discoveryengine.v1beta.AssistAnswer.name]
            +     * will have a value.
            +     * 
            + * + * .google.cloud.discoveryengine.v1beta.AssistAnswer answer = 1; + */ + public com.google.cloud.discoveryengine.v1beta.AssistAnswer.Builder getAnswerBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return internalGetAnswerFieldBuilder().getBuilder(); + } + + /** + * + * + *
            +     * Assist answer resource object containing parts of the assistant's final
            +     * answer for the user's query.
            +     *
            +     * Not present if the current response doesn't add anything to previously
            +     * sent
            +     * [AssistAnswer.replies][google.cloud.discoveryengine.v1beta.AssistAnswer.replies].
            +     *
            +     * Observe
            +     * [AssistAnswer.state][google.cloud.discoveryengine.v1beta.AssistAnswer.state]
            +     * to see if more parts are to be expected. While the state is `IN_PROGRESS`,
            +     * the
            +     * [AssistAnswer.replies][google.cloud.discoveryengine.v1beta.AssistAnswer.replies]
            +     * field in each response will contain replies (reply fragments) to be
            +     * appended to the ones received in previous responses.
            +     * [AssistAnswer.name][google.cloud.discoveryengine.v1beta.AssistAnswer.name]
            +     * won't be filled.
            +     *
            +     * If the state is `SUCCEEDED`, `FAILED` or `SKIPPED`, the response
            +     * is the last response and
            +     * [AssistAnswer.name][google.cloud.discoveryengine.v1beta.AssistAnswer.name]
            +     * will have a value.
            +     * 
            + * + * .google.cloud.discoveryengine.v1beta.AssistAnswer answer = 1; + */ + public com.google.cloud.discoveryengine.v1beta.AssistAnswerOrBuilder getAnswerOrBuilder() { + if (answerBuilder_ != null) { + return answerBuilder_.getMessageOrBuilder(); + } else { + return answer_ == null + ? com.google.cloud.discoveryengine.v1beta.AssistAnswer.getDefaultInstance() + : answer_; + } + } + + /** + * + * + *
            +     * Assist answer resource object containing parts of the assistant's final
            +     * answer for the user's query.
            +     *
            +     * Not present if the current response doesn't add anything to previously
            +     * sent
            +     * [AssistAnswer.replies][google.cloud.discoveryengine.v1beta.AssistAnswer.replies].
            +     *
            +     * Observe
            +     * [AssistAnswer.state][google.cloud.discoveryengine.v1beta.AssistAnswer.state]
            +     * to see if more parts are to be expected. While the state is `IN_PROGRESS`,
            +     * the
            +     * [AssistAnswer.replies][google.cloud.discoveryengine.v1beta.AssistAnswer.replies]
            +     * field in each response will contain replies (reply fragments) to be
            +     * appended to the ones received in previous responses.
            +     * [AssistAnswer.name][google.cloud.discoveryengine.v1beta.AssistAnswer.name]
            +     * won't be filled.
            +     *
            +     * If the state is `SUCCEEDED`, `FAILED` or `SKIPPED`, the response
            +     * is the last response and
            +     * [AssistAnswer.name][google.cloud.discoveryengine.v1beta.AssistAnswer.name]
            +     * will have a value.
            +     * 
            + * + * .google.cloud.discoveryengine.v1beta.AssistAnswer answer = 1; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.AssistAnswer, + com.google.cloud.discoveryengine.v1beta.AssistAnswer.Builder, + com.google.cloud.discoveryengine.v1beta.AssistAnswerOrBuilder> + internalGetAnswerFieldBuilder() { + if (answerBuilder_ == null) { + answerBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.AssistAnswer, + com.google.cloud.discoveryengine.v1beta.AssistAnswer.Builder, + com.google.cloud.discoveryengine.v1beta.AssistAnswerOrBuilder>( + getAnswer(), getParentForChildren(), isClean()); + answer_ = null; + } + return answerBuilder_; + } + + private com.google.cloud.discoveryengine.v1beta.StreamAssistResponse.SessionInfo sessionInfo_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.StreamAssistResponse.SessionInfo, + com.google.cloud.discoveryengine.v1beta.StreamAssistResponse.SessionInfo.Builder, + com.google.cloud.discoveryengine.v1beta.StreamAssistResponse.SessionInfoOrBuilder> + sessionInfoBuilder_; + + /** + * + * + *
            +     * Session information. Only included in the final StreamAssistResponse of the
            +     * response stream.
            +     * 
            + * + * .google.cloud.discoveryengine.v1beta.StreamAssistResponse.SessionInfo session_info = 2; + * + * + * @return Whether the sessionInfo field is set. + */ + public boolean hasSessionInfo() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
            +     * Session information. Only included in the final StreamAssistResponse of the
            +     * response stream.
            +     * 
            + * + * .google.cloud.discoveryengine.v1beta.StreamAssistResponse.SessionInfo session_info = 2; + * + * + * @return The sessionInfo. + */ + public com.google.cloud.discoveryengine.v1beta.StreamAssistResponse.SessionInfo + getSessionInfo() { + if (sessionInfoBuilder_ == null) { + return sessionInfo_ == null + ? com.google.cloud.discoveryengine.v1beta.StreamAssistResponse.SessionInfo + .getDefaultInstance() + : sessionInfo_; + } else { + return sessionInfoBuilder_.getMessage(); + } + } + + /** + * + * + *
            +     * Session information. Only included in the final StreamAssistResponse of the
            +     * response stream.
            +     * 
            + * + * .google.cloud.discoveryengine.v1beta.StreamAssistResponse.SessionInfo session_info = 2; + * + */ + public Builder setSessionInfo( + com.google.cloud.discoveryengine.v1beta.StreamAssistResponse.SessionInfo value) { + if (sessionInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + sessionInfo_ = value; + } else { + sessionInfoBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Session information. Only included in the final StreamAssistResponse of the
            +     * response stream.
            +     * 
            + * + * .google.cloud.discoveryengine.v1beta.StreamAssistResponse.SessionInfo session_info = 2; + * + */ + public Builder setSessionInfo( + com.google.cloud.discoveryengine.v1beta.StreamAssistResponse.SessionInfo.Builder + builderForValue) { + if (sessionInfoBuilder_ == null) { + sessionInfo_ = builderForValue.build(); + } else { + sessionInfoBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Session information. Only included in the final StreamAssistResponse of the
            +     * response stream.
            +     * 
            + * + * .google.cloud.discoveryengine.v1beta.StreamAssistResponse.SessionInfo session_info = 2; + * + */ + public Builder mergeSessionInfo( + com.google.cloud.discoveryengine.v1beta.StreamAssistResponse.SessionInfo value) { + if (sessionInfoBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && sessionInfo_ != null + && sessionInfo_ + != com.google.cloud.discoveryengine.v1beta.StreamAssistResponse.SessionInfo + .getDefaultInstance()) { + getSessionInfoBuilder().mergeFrom(value); + } else { + sessionInfo_ = value; + } + } else { + sessionInfoBuilder_.mergeFrom(value); + } + if (sessionInfo_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** + * + * + *
            +     * Session information. Only included in the final StreamAssistResponse of the
            +     * response stream.
            +     * 
            + * + * .google.cloud.discoveryengine.v1beta.StreamAssistResponse.SessionInfo session_info = 2; + * + */ + public Builder clearSessionInfo() { + bitField0_ = (bitField0_ & ~0x00000002); + sessionInfo_ = null; + if (sessionInfoBuilder_ != null) { + sessionInfoBuilder_.dispose(); + sessionInfoBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
            +     * Session information. Only included in the final StreamAssistResponse of the
            +     * response stream.
            +     * 
            + * + * .google.cloud.discoveryengine.v1beta.StreamAssistResponse.SessionInfo session_info = 2; + * + */ + public com.google.cloud.discoveryengine.v1beta.StreamAssistResponse.SessionInfo.Builder + getSessionInfoBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return internalGetSessionInfoFieldBuilder().getBuilder(); + } + + /** + * + * + *
            +     * Session information. Only included in the final StreamAssistResponse of the
            +     * response stream.
            +     * 
            + * + * .google.cloud.discoveryengine.v1beta.StreamAssistResponse.SessionInfo session_info = 2; + * + */ + public com.google.cloud.discoveryengine.v1beta.StreamAssistResponse.SessionInfoOrBuilder + getSessionInfoOrBuilder() { + if (sessionInfoBuilder_ != null) { + return sessionInfoBuilder_.getMessageOrBuilder(); + } else { + return sessionInfo_ == null + ? com.google.cloud.discoveryengine.v1beta.StreamAssistResponse.SessionInfo + .getDefaultInstance() + : sessionInfo_; + } + } + + /** + * + * + *
            +     * Session information. Only included in the final StreamAssistResponse of the
            +     * response stream.
            +     * 
            + * + * .google.cloud.discoveryengine.v1beta.StreamAssistResponse.SessionInfo session_info = 2; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.StreamAssistResponse.SessionInfo, + com.google.cloud.discoveryengine.v1beta.StreamAssistResponse.SessionInfo.Builder, + com.google.cloud.discoveryengine.v1beta.StreamAssistResponse.SessionInfoOrBuilder> + internalGetSessionInfoFieldBuilder() { + if (sessionInfoBuilder_ == null) { + sessionInfoBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.StreamAssistResponse.SessionInfo, + com.google.cloud.discoveryengine.v1beta.StreamAssistResponse.SessionInfo.Builder, + com.google.cloud.discoveryengine.v1beta.StreamAssistResponse.SessionInfoOrBuilder>( + getSessionInfo(), getParentForChildren(), isClean()); + sessionInfo_ = null; + } + return sessionInfoBuilder_; + } + + private java.lang.Object assistToken_ = ""; + + /** + * + * + *
            +     * A global unique ID that identifies the current pair of request and stream
            +     * of responses. Used for feedback and support.
            +     * 
            + * + * string assist_token = 4; + * + * @return The assistToken. + */ + public java.lang.String getAssistToken() { + java.lang.Object ref = assistToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + assistToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
            +     * A global unique ID that identifies the current pair of request and stream
            +     * of responses. Used for feedback and support.
            +     * 
            + * + * string assist_token = 4; + * + * @return The bytes for assistToken. + */ + public com.google.protobuf.ByteString getAssistTokenBytes() { + java.lang.Object ref = assistToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + assistToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
            +     * A global unique ID that identifies the current pair of request and stream
            +     * of responses. Used for feedback and support.
            +     * 
            + * + * string assist_token = 4; + * + * @param value The assistToken to set. + * @return This builder for chaining. + */ + public Builder setAssistToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + assistToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
            +     * A global unique ID that identifies the current pair of request and stream
            +     * of responses. Used for feedback and support.
            +     * 
            + * + * string assist_token = 4; + * + * @return This builder for chaining. + */ + public Builder clearAssistToken() { + assistToken_ = getDefaultInstance().getAssistToken(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
            +     * A global unique ID that identifies the current pair of request and stream
            +     * of responses. Used for feedback and support.
            +     * 
            + * + * string assist_token = 4; + * + * @param value The bytes for assistToken to set. + * @return This builder for chaining. + */ + public Builder setAssistTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + assistToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList invocationTools_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureInvocationToolsIsMutable() { + if (!invocationTools_.isModifiable()) { + invocationTools_ = new com.google.protobuf.LazyStringArrayList(invocationTools_); + } + bitField0_ |= 0x00000008; + } + + /** + * + * + *
            +     * The tool names of the tools that were invoked.
            +     * 
            + * + * repeated string invocation_tools = 8; + * + * @return A list containing the invocationTools. + */ + public com.google.protobuf.ProtocolStringList getInvocationToolsList() { + invocationTools_.makeImmutable(); + return invocationTools_; + } + + /** + * + * + *
            +     * The tool names of the tools that were invoked.
            +     * 
            + * + * repeated string invocation_tools = 8; + * + * @return The count of invocationTools. + */ + public int getInvocationToolsCount() { + return invocationTools_.size(); + } + + /** + * + * + *
            +     * The tool names of the tools that were invoked.
            +     * 
            + * + * repeated string invocation_tools = 8; + * + * @param index The index of the element to return. + * @return The invocationTools at the given index. + */ + public java.lang.String getInvocationTools(int index) { + return invocationTools_.get(index); + } + + /** + * + * + *
            +     * The tool names of the tools that were invoked.
            +     * 
            + * + * repeated string invocation_tools = 8; + * + * @param index The index of the value to return. + * @return The bytes of the invocationTools at the given index. + */ + public com.google.protobuf.ByteString getInvocationToolsBytes(int index) { + return invocationTools_.getByteString(index); + } + + /** + * + * + *
            +     * The tool names of the tools that were invoked.
            +     * 
            + * + * repeated string invocation_tools = 8; + * + * @param index The index to set the value at. + * @param value The invocationTools to set. + * @return This builder for chaining. + */ + public Builder setInvocationTools(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureInvocationToolsIsMutable(); + invocationTools_.set(index, value); + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
            +     * The tool names of the tools that were invoked.
            +     * 
            + * + * repeated string invocation_tools = 8; + * + * @param value The invocationTools to add. + * @return This builder for chaining. + */ + public Builder addInvocationTools(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureInvocationToolsIsMutable(); + invocationTools_.add(value); + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
            +     * The tool names of the tools that were invoked.
            +     * 
            + * + * repeated string invocation_tools = 8; + * + * @param values The invocationTools to add. + * @return This builder for chaining. + */ + public Builder addAllInvocationTools(java.lang.Iterable values) { + ensureInvocationToolsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, invocationTools_); + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
            +     * The tool names of the tools that were invoked.
            +     * 
            + * + * repeated string invocation_tools = 8; + * + * @return This builder for chaining. + */ + public Builder clearInvocationTools() { + invocationTools_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + ; + onChanged(); + return this; + } + + /** + * + * + *
            +     * The tool names of the tools that were invoked.
            +     * 
            + * + * repeated string invocation_tools = 8; + * + * @param value The bytes of the invocationTools to add. + * @return This builder for chaining. + */ + public Builder addInvocationToolsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureInvocationToolsIsMutable(); + invocationTools_.add(value); + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private java.util.List< + com.google.cloud.discoveryengine.v1beta.StreamAssistResponse.InvokedSkill> + invokedSkills_ = java.util.Collections.emptyList(); + + private void ensureInvokedSkillsIsMutable() { + if (!((bitField0_ & 0x00000010) != 0)) { + invokedSkills_ = + new java.util.ArrayList< + com.google.cloud.discoveryengine.v1beta.StreamAssistResponse.InvokedSkill>( + invokedSkills_); + bitField0_ |= 0x00000010; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.discoveryengine.v1beta.StreamAssistResponse.InvokedSkill, + com.google.cloud.discoveryengine.v1beta.StreamAssistResponse.InvokedSkill.Builder, + com.google.cloud.discoveryengine.v1beta.StreamAssistResponse.InvokedSkillOrBuilder> + invokedSkillsBuilder_; + + /** + * + * + *
            +     * The skills executed during the turn.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.StreamAssistResponse.InvokedSkill invoked_skills = 10; + * + */ + public java.util.List + getInvokedSkillsList() { + if (invokedSkillsBuilder_ == null) { + return java.util.Collections.unmodifiableList(invokedSkills_); + } else { + return invokedSkillsBuilder_.getMessageList(); + } + } + + /** + * + * + *
            +     * The skills executed during the turn.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.StreamAssistResponse.InvokedSkill invoked_skills = 10; + * + */ + public int getInvokedSkillsCount() { + if (invokedSkillsBuilder_ == null) { + return invokedSkills_.size(); + } else { + return invokedSkillsBuilder_.getCount(); + } + } + + /** + * + * + *
            +     * The skills executed during the turn.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.StreamAssistResponse.InvokedSkill invoked_skills = 10; + * + */ + public com.google.cloud.discoveryengine.v1beta.StreamAssistResponse.InvokedSkill + getInvokedSkills(int index) { + if (invokedSkillsBuilder_ == null) { + return invokedSkills_.get(index); + } else { + return invokedSkillsBuilder_.getMessage(index); + } + } + + /** + * + * + *
            +     * The skills executed during the turn.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.StreamAssistResponse.InvokedSkill invoked_skills = 10; + * + */ + public Builder setInvokedSkills( + int index, + com.google.cloud.discoveryengine.v1beta.StreamAssistResponse.InvokedSkill value) { + if (invokedSkillsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureInvokedSkillsIsMutable(); + invokedSkills_.set(index, value); + onChanged(); + } else { + invokedSkillsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
            +     * The skills executed during the turn.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.StreamAssistResponse.InvokedSkill invoked_skills = 10; + * + */ + public Builder setInvokedSkills( + int index, + com.google.cloud.discoveryengine.v1beta.StreamAssistResponse.InvokedSkill.Builder + builderForValue) { + if (invokedSkillsBuilder_ == null) { + ensureInvokedSkillsIsMutable(); + invokedSkills_.set(index, builderForValue.build()); + onChanged(); + } else { + invokedSkillsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
            +     * The skills executed during the turn.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.StreamAssistResponse.InvokedSkill invoked_skills = 10; + * + */ + public Builder addInvokedSkills( + com.google.cloud.discoveryengine.v1beta.StreamAssistResponse.InvokedSkill value) { + if (invokedSkillsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureInvokedSkillsIsMutable(); + invokedSkills_.add(value); + onChanged(); + } else { + invokedSkillsBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
            +     * The skills executed during the turn.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.StreamAssistResponse.InvokedSkill invoked_skills = 10; + * + */ + public Builder addInvokedSkills( + int index, + com.google.cloud.discoveryengine.v1beta.StreamAssistResponse.InvokedSkill value) { + if (invokedSkillsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureInvokedSkillsIsMutable(); + invokedSkills_.add(index, value); + onChanged(); + } else { + invokedSkillsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
            +     * The skills executed during the turn.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.StreamAssistResponse.InvokedSkill invoked_skills = 10; + * + */ + public Builder addInvokedSkills( + com.google.cloud.discoveryengine.v1beta.StreamAssistResponse.InvokedSkill.Builder + builderForValue) { + if (invokedSkillsBuilder_ == null) { + ensureInvokedSkillsIsMutable(); + invokedSkills_.add(builderForValue.build()); + onChanged(); + } else { + invokedSkillsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
            +     * The skills executed during the turn.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.StreamAssistResponse.InvokedSkill invoked_skills = 10; + * + */ + public Builder addInvokedSkills( + int index, + com.google.cloud.discoveryengine.v1beta.StreamAssistResponse.InvokedSkill.Builder + builderForValue) { + if (invokedSkillsBuilder_ == null) { + ensureInvokedSkillsIsMutable(); + invokedSkills_.add(index, builderForValue.build()); + onChanged(); + } else { + invokedSkillsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
            +     * The skills executed during the turn.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.StreamAssistResponse.InvokedSkill invoked_skills = 10; + * + */ + public Builder addAllInvokedSkills( + java.lang.Iterable< + ? extends com.google.cloud.discoveryengine.v1beta.StreamAssistResponse.InvokedSkill> + values) { + if (invokedSkillsBuilder_ == null) { + ensureInvokedSkillsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, invokedSkills_); + onChanged(); + } else { + invokedSkillsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
            +     * The skills executed during the turn.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.StreamAssistResponse.InvokedSkill invoked_skills = 10; + * + */ + public Builder clearInvokedSkills() { + if (invokedSkillsBuilder_ == null) { + invokedSkills_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + } else { + invokedSkillsBuilder_.clear(); + } + return this; + } + + /** + * + * + *
            +     * The skills executed during the turn.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.StreamAssistResponse.InvokedSkill invoked_skills = 10; + * + */ + public Builder removeInvokedSkills(int index) { + if (invokedSkillsBuilder_ == null) { + ensureInvokedSkillsIsMutable(); + invokedSkills_.remove(index); + onChanged(); + } else { + invokedSkillsBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
            +     * The skills executed during the turn.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.StreamAssistResponse.InvokedSkill invoked_skills = 10; + * + */ + public com.google.cloud.discoveryengine.v1beta.StreamAssistResponse.InvokedSkill.Builder + getInvokedSkillsBuilder(int index) { + return internalGetInvokedSkillsFieldBuilder().getBuilder(index); + } + + /** + * + * + *
            +     * The skills executed during the turn.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.StreamAssistResponse.InvokedSkill invoked_skills = 10; + * + */ + public com.google.cloud.discoveryengine.v1beta.StreamAssistResponse.InvokedSkillOrBuilder + getInvokedSkillsOrBuilder(int index) { + if (invokedSkillsBuilder_ == null) { + return invokedSkills_.get(index); + } else { + return invokedSkillsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
            +     * The skills executed during the turn.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.StreamAssistResponse.InvokedSkill invoked_skills = 10; + * + */ + public java.util.List< + ? extends + com.google.cloud.discoveryengine.v1beta.StreamAssistResponse.InvokedSkillOrBuilder> + getInvokedSkillsOrBuilderList() { + if (invokedSkillsBuilder_ != null) { + return invokedSkillsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(invokedSkills_); + } + } + + /** + * + * + *
            +     * The skills executed during the turn.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.StreamAssistResponse.InvokedSkill invoked_skills = 10; + * + */ + public com.google.cloud.discoveryengine.v1beta.StreamAssistResponse.InvokedSkill.Builder + addInvokedSkillsBuilder() { + return internalGetInvokedSkillsFieldBuilder() + .addBuilder( + com.google.cloud.discoveryengine.v1beta.StreamAssistResponse.InvokedSkill + .getDefaultInstance()); + } + + /** + * + * + *
            +     * The skills executed during the turn.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.StreamAssistResponse.InvokedSkill invoked_skills = 10; + * + */ + public com.google.cloud.discoveryengine.v1beta.StreamAssistResponse.InvokedSkill.Builder + addInvokedSkillsBuilder(int index) { + return internalGetInvokedSkillsFieldBuilder() + .addBuilder( + index, + com.google.cloud.discoveryengine.v1beta.StreamAssistResponse.InvokedSkill + .getDefaultInstance()); + } + + /** + * + * + *
            +     * The skills executed during the turn.
            +     * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.StreamAssistResponse.InvokedSkill invoked_skills = 10; + * + */ + public java.util.List< + com.google.cloud.discoveryengine.v1beta.StreamAssistResponse.InvokedSkill.Builder> + getInvokedSkillsBuilderList() { + return internalGetInvokedSkillsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.discoveryengine.v1beta.StreamAssistResponse.InvokedSkill, + com.google.cloud.discoveryengine.v1beta.StreamAssistResponse.InvokedSkill.Builder, + com.google.cloud.discoveryengine.v1beta.StreamAssistResponse.InvokedSkillOrBuilder> + internalGetInvokedSkillsFieldBuilder() { + if (invokedSkillsBuilder_ == null) { + invokedSkillsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.discoveryengine.v1beta.StreamAssistResponse.InvokedSkill, + com.google.cloud.discoveryengine.v1beta.StreamAssistResponse.InvokedSkill.Builder, + com.google.cloud.discoveryengine.v1beta.StreamAssistResponse.InvokedSkillOrBuilder>( + invokedSkills_, + ((bitField0_ & 0x00000010) != 0), + getParentForChildren(), + isClean()); + invokedSkills_ = null; + } + return invokedSkillsBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.StreamAssistResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.StreamAssistResponse) + private static final com.google.cloud.discoveryengine.v1beta.StreamAssistResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.discoveryengine.v1beta.StreamAssistResponse(); + } + + public static com.google.cloud.discoveryengine.v1beta.StreamAssistResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public StreamAssistResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.StreamAssistResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/StreamAssistResponseOrBuilder.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/StreamAssistResponseOrBuilder.java new file mode 100644 index 000000000000..0f25078c398f --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/StreamAssistResponseOrBuilder.java @@ -0,0 +1,322 @@ +/* + * 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/cloud/discoveryengine/v1beta/assistant_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.discoveryengine.v1beta; + +@com.google.protobuf.Generated +public interface StreamAssistResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.StreamAssistResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
            +   * Assist answer resource object containing parts of the assistant's final
            +   * answer for the user's query.
            +   *
            +   * Not present if the current response doesn't add anything to previously
            +   * sent
            +   * [AssistAnswer.replies][google.cloud.discoveryengine.v1beta.AssistAnswer.replies].
            +   *
            +   * Observe
            +   * [AssistAnswer.state][google.cloud.discoveryengine.v1beta.AssistAnswer.state]
            +   * to see if more parts are to be expected. While the state is `IN_PROGRESS`,
            +   * the
            +   * [AssistAnswer.replies][google.cloud.discoveryengine.v1beta.AssistAnswer.replies]
            +   * field in each response will contain replies (reply fragments) to be
            +   * appended to the ones received in previous responses.
            +   * [AssistAnswer.name][google.cloud.discoveryengine.v1beta.AssistAnswer.name]
            +   * won't be filled.
            +   *
            +   * If the state is `SUCCEEDED`, `FAILED` or `SKIPPED`, the response
            +   * is the last response and
            +   * [AssistAnswer.name][google.cloud.discoveryengine.v1beta.AssistAnswer.name]
            +   * will have a value.
            +   * 
            + * + * .google.cloud.discoveryengine.v1beta.AssistAnswer answer = 1; + * + * @return Whether the answer field is set. + */ + boolean hasAnswer(); + + /** + * + * + *
            +   * Assist answer resource object containing parts of the assistant's final
            +   * answer for the user's query.
            +   *
            +   * Not present if the current response doesn't add anything to previously
            +   * sent
            +   * [AssistAnswer.replies][google.cloud.discoveryengine.v1beta.AssistAnswer.replies].
            +   *
            +   * Observe
            +   * [AssistAnswer.state][google.cloud.discoveryengine.v1beta.AssistAnswer.state]
            +   * to see if more parts are to be expected. While the state is `IN_PROGRESS`,
            +   * the
            +   * [AssistAnswer.replies][google.cloud.discoveryengine.v1beta.AssistAnswer.replies]
            +   * field in each response will contain replies (reply fragments) to be
            +   * appended to the ones received in previous responses.
            +   * [AssistAnswer.name][google.cloud.discoveryengine.v1beta.AssistAnswer.name]
            +   * won't be filled.
            +   *
            +   * If the state is `SUCCEEDED`, `FAILED` or `SKIPPED`, the response
            +   * is the last response and
            +   * [AssistAnswer.name][google.cloud.discoveryengine.v1beta.AssistAnswer.name]
            +   * will have a value.
            +   * 
            + * + * .google.cloud.discoveryengine.v1beta.AssistAnswer answer = 1; + * + * @return The answer. + */ + com.google.cloud.discoveryengine.v1beta.AssistAnswer getAnswer(); + + /** + * + * + *
            +   * Assist answer resource object containing parts of the assistant's final
            +   * answer for the user's query.
            +   *
            +   * Not present if the current response doesn't add anything to previously
            +   * sent
            +   * [AssistAnswer.replies][google.cloud.discoveryengine.v1beta.AssistAnswer.replies].
            +   *
            +   * Observe
            +   * [AssistAnswer.state][google.cloud.discoveryengine.v1beta.AssistAnswer.state]
            +   * to see if more parts are to be expected. While the state is `IN_PROGRESS`,
            +   * the
            +   * [AssistAnswer.replies][google.cloud.discoveryengine.v1beta.AssistAnswer.replies]
            +   * field in each response will contain replies (reply fragments) to be
            +   * appended to the ones received in previous responses.
            +   * [AssistAnswer.name][google.cloud.discoveryengine.v1beta.AssistAnswer.name]
            +   * won't be filled.
            +   *
            +   * If the state is `SUCCEEDED`, `FAILED` or `SKIPPED`, the response
            +   * is the last response and
            +   * [AssistAnswer.name][google.cloud.discoveryengine.v1beta.AssistAnswer.name]
            +   * will have a value.
            +   * 
            + * + * .google.cloud.discoveryengine.v1beta.AssistAnswer answer = 1; + */ + com.google.cloud.discoveryengine.v1beta.AssistAnswerOrBuilder getAnswerOrBuilder(); + + /** + * + * + *
            +   * Session information. Only included in the final StreamAssistResponse of the
            +   * response stream.
            +   * 
            + * + * .google.cloud.discoveryengine.v1beta.StreamAssistResponse.SessionInfo session_info = 2; + * + * + * @return Whether the sessionInfo field is set. + */ + boolean hasSessionInfo(); + + /** + * + * + *
            +   * Session information. Only included in the final StreamAssistResponse of the
            +   * response stream.
            +   * 
            + * + * .google.cloud.discoveryengine.v1beta.StreamAssistResponse.SessionInfo session_info = 2; + * + * + * @return The sessionInfo. + */ + com.google.cloud.discoveryengine.v1beta.StreamAssistResponse.SessionInfo getSessionInfo(); + + /** + * + * + *
            +   * Session information. Only included in the final StreamAssistResponse of the
            +   * response stream.
            +   * 
            + * + * .google.cloud.discoveryengine.v1beta.StreamAssistResponse.SessionInfo session_info = 2; + * + */ + com.google.cloud.discoveryengine.v1beta.StreamAssistResponse.SessionInfoOrBuilder + getSessionInfoOrBuilder(); + + /** + * + * + *
            +   * A global unique ID that identifies the current pair of request and stream
            +   * of responses. Used for feedback and support.
            +   * 
            + * + * string assist_token = 4; + * + * @return The assistToken. + */ + java.lang.String getAssistToken(); + + /** + * + * + *
            +   * A global unique ID that identifies the current pair of request and stream
            +   * of responses. Used for feedback and support.
            +   * 
            + * + * string assist_token = 4; + * + * @return The bytes for assistToken. + */ + com.google.protobuf.ByteString getAssistTokenBytes(); + + /** + * + * + *
            +   * The tool names of the tools that were invoked.
            +   * 
            + * + * repeated string invocation_tools = 8; + * + * @return A list containing the invocationTools. + */ + java.util.List getInvocationToolsList(); + + /** + * + * + *
            +   * The tool names of the tools that were invoked.
            +   * 
            + * + * repeated string invocation_tools = 8; + * + * @return The count of invocationTools. + */ + int getInvocationToolsCount(); + + /** + * + * + *
            +   * The tool names of the tools that were invoked.
            +   * 
            + * + * repeated string invocation_tools = 8; + * + * @param index The index of the element to return. + * @return The invocationTools at the given index. + */ + java.lang.String getInvocationTools(int index); + + /** + * + * + *
            +   * The tool names of the tools that were invoked.
            +   * 
            + * + * repeated string invocation_tools = 8; + * + * @param index The index of the value to return. + * @return The bytes of the invocationTools at the given index. + */ + com.google.protobuf.ByteString getInvocationToolsBytes(int index); + + /** + * + * + *
            +   * The skills executed during the turn.
            +   * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.StreamAssistResponse.InvokedSkill invoked_skills = 10; + * + */ + java.util.List + getInvokedSkillsList(); + + /** + * + * + *
            +   * The skills executed during the turn.
            +   * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.StreamAssistResponse.InvokedSkill invoked_skills = 10; + * + */ + com.google.cloud.discoveryengine.v1beta.StreamAssistResponse.InvokedSkill getInvokedSkills( + int index); + + /** + * + * + *
            +   * The skills executed during the turn.
            +   * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.StreamAssistResponse.InvokedSkill invoked_skills = 10; + * + */ + int getInvokedSkillsCount(); + + /** + * + * + *
            +   * The skills executed during the turn.
            +   * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.StreamAssistResponse.InvokedSkill invoked_skills = 10; + * + */ + java.util.List< + ? extends + com.google.cloud.discoveryengine.v1beta.StreamAssistResponse.InvokedSkillOrBuilder> + getInvokedSkillsOrBuilderList(); + + /** + * + * + *
            +   * The skills executed during the turn.
            +   * 
            + * + * + * repeated .google.cloud.discoveryengine.v1beta.StreamAssistResponse.InvokedSkill invoked_skills = 10; + * + */ + com.google.cloud.discoveryengine.v1beta.StreamAssistResponse.InvokedSkillOrBuilder + getInvokedSkillsOrBuilder(int index); +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/SubscriptionTerm.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/SubscriptionTerm.java new file mode 100644 index 000000000000..150f8717b889 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/SubscriptionTerm.java @@ -0,0 +1,239 @@ +/* + * 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/cloud/discoveryengine/v1beta/common.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.discoveryengine.v1beta; + +/** + * + * + *
            + * Subscription term.
            + * 
            + * + * Protobuf enum {@code google.cloud.discoveryengine.v1beta.SubscriptionTerm} + */ +@com.google.protobuf.Generated +public enum SubscriptionTerm implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
            +   * Default value, do not use.
            +   * 
            + * + * SUBSCRIPTION_TERM_UNSPECIFIED = 0; + */ + SUBSCRIPTION_TERM_UNSPECIFIED(0), + /** + * + * + *
            +   * 1 month.
            +   * 
            + * + * SUBSCRIPTION_TERM_ONE_MONTH = 1; + */ + SUBSCRIPTION_TERM_ONE_MONTH(1), + /** + * + * + *
            +   * 1 year.
            +   * 
            + * + * SUBSCRIPTION_TERM_ONE_YEAR = 2; + */ + SUBSCRIPTION_TERM_ONE_YEAR(2), + /** + * + * + *
            +   * 3 years.
            +   * 
            + * + * SUBSCRIPTION_TERM_THREE_YEARS = 3; + */ + SUBSCRIPTION_TERM_THREE_YEARS(3), + /** + * + * + *
            +   * Custom term. Must set the end_date.
            +   * 
            + * + * SUBSCRIPTION_TERM_CUSTOM = 6; + */ + SUBSCRIPTION_TERM_CUSTOM(6), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "SubscriptionTerm"); + } + + /** + * + * + *
            +   * Default value, do not use.
            +   * 
            + * + * SUBSCRIPTION_TERM_UNSPECIFIED = 0; + */ + public static final int SUBSCRIPTION_TERM_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
            +   * 1 month.
            +   * 
            + * + * SUBSCRIPTION_TERM_ONE_MONTH = 1; + */ + public static final int SUBSCRIPTION_TERM_ONE_MONTH_VALUE = 1; + + /** + * + * + *
            +   * 1 year.
            +   * 
            + * + * SUBSCRIPTION_TERM_ONE_YEAR = 2; + */ + public static final int SUBSCRIPTION_TERM_ONE_YEAR_VALUE = 2; + + /** + * + * + *
            +   * 3 years.
            +   * 
            + * + * SUBSCRIPTION_TERM_THREE_YEARS = 3; + */ + public static final int SUBSCRIPTION_TERM_THREE_YEARS_VALUE = 3; + + /** + * + * + *
            +   * Custom term. Must set the end_date.
            +   * 
            + * + * SUBSCRIPTION_TERM_CUSTOM = 6; + */ + public static final int SUBSCRIPTION_TERM_CUSTOM_VALUE = 6; + + 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 SubscriptionTerm 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 SubscriptionTerm forNumber(int value) { + switch (value) { + case 0: + return SUBSCRIPTION_TERM_UNSPECIFIED; + case 1: + return SUBSCRIPTION_TERM_ONE_MONTH; + case 2: + return SUBSCRIPTION_TERM_ONE_YEAR; + case 3: + return SUBSCRIPTION_TERM_THREE_YEARS; + case 6: + return SUBSCRIPTION_TERM_CUSTOM; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public SubscriptionTerm findValueByNumber(int number) { + return SubscriptionTerm.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.CommonProto.getDescriptor() + .getEnumTypes() + .get(6); + } + + private static final SubscriptionTerm[] VALUES = values(); + + public static SubscriptionTerm valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private SubscriptionTerm(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.discoveryengine.v1beta.SubscriptionTerm) +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/SubscriptionTier.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/SubscriptionTier.java new file mode 100644 index 000000000000..9ea0669aba1f --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/SubscriptionTier.java @@ -0,0 +1,450 @@ +/* + * 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/cloud/discoveryengine/v1beta/common.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.discoveryengine.v1beta; + +/** + * + * + *
            + * Subscription tier information.
            + * 
            + * + * Protobuf enum {@code google.cloud.discoveryengine.v1beta.SubscriptionTier} + */ +@com.google.protobuf.Generated +public enum SubscriptionTier implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
            +   * Default value.
            +   * 
            + * + * SUBSCRIPTION_TIER_UNSPECIFIED = 0; + */ + SUBSCRIPTION_TIER_UNSPECIFIED(0), + /** + * + * + *
            +   * Search tier.
            +   * Search tier can access Vertex AI Search features and NotebookLM features.
            +   * 
            + * + * SUBSCRIPTION_TIER_SEARCH = 1; + */ + SUBSCRIPTION_TIER_SEARCH(1), + /** + * + * + *
            +   * Gemini Enterprise Plus tier.
            +   * 
            + * + * SUBSCRIPTION_TIER_SEARCH_AND_ASSISTANT = 2; + */ + SUBSCRIPTION_TIER_SEARCH_AND_ASSISTANT(2), + /** + * + * + *
            +   * NotebookLM tier.
            +   * NotebookLM is a subscription tier can only access NotebookLM features.
            +   * 
            + * + * SUBSCRIPTION_TIER_NOTEBOOK_LM = 3; + */ + SUBSCRIPTION_TIER_NOTEBOOK_LM(3), + /** + * + * + *
            +   * Gemini Frontline worker tier.
            +   * 
            + * + * SUBSCRIPTION_TIER_FRONTLINE_WORKER = 4; + */ + SUBSCRIPTION_TIER_FRONTLINE_WORKER(4), + /** + * + * + *
            +   * Gemini Business Starter tier.
            +   * 
            + * + * SUBSCRIPTION_TIER_AGENTSPACE_STARTER = 10; + */ + SUBSCRIPTION_TIER_AGENTSPACE_STARTER(10), + /** + * + * + *
            +   * Gemini Business tier.
            +   * 
            + * + * SUBSCRIPTION_TIER_AGENTSPACE_BUSINESS = 6; + */ + SUBSCRIPTION_TIER_AGENTSPACE_BUSINESS(6), + /** + * + * + *
            +   * Gemini Enterprise Standard tier.
            +   * 
            + * + * SUBSCRIPTION_TIER_ENTERPRISE = 7; + */ + SUBSCRIPTION_TIER_ENTERPRISE(7), + /** + * + * + *
            +   * Gemini Enterprise Standard tier for emerging markets.
            +   * 
            + * + * SUBSCRIPTION_TIER_ENTERPRISE_EMERGING = 15; + */ + SUBSCRIPTION_TIER_ENTERPRISE_EMERGING(15), + /** + * + * + *
            +   * Gemini Enterprise EDU tier.
            +   * 
            + * + * SUBSCRIPTION_TIER_EDU = 8; + */ + SUBSCRIPTION_TIER_EDU(8), + /** + * + * + *
            +   * Gemini Enterprise EDU Pro tier.
            +   * 
            + * + * SUBSCRIPTION_TIER_EDU_PRO = 9; + */ + SUBSCRIPTION_TIER_EDU_PRO(9), + /** + * + * + *
            +   * Gemini Enterprise EDU tier for emerging market only.
            +   * 
            + * + * SUBSCRIPTION_TIER_EDU_EMERGING = 11; + */ + SUBSCRIPTION_TIER_EDU_EMERGING(11), + /** + * + * + *
            +   * Gemini Enterprise EDU Pro tier for emerging market.
            +   * 
            + * + * SUBSCRIPTION_TIER_EDU_PRO_EMERGING = 12; + */ + SUBSCRIPTION_TIER_EDU_PRO_EMERGING(12), + /** + * + * + *
            +   * Gemini Frontline Starter tier.
            +   * 
            + * + * SUBSCRIPTION_TIER_FRONTLINE_STARTER = 13; + */ + SUBSCRIPTION_TIER_FRONTLINE_STARTER(13), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "SubscriptionTier"); + } + + /** + * + * + *
            +   * Default value.
            +   * 
            + * + * SUBSCRIPTION_TIER_UNSPECIFIED = 0; + */ + public static final int SUBSCRIPTION_TIER_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
            +   * Search tier.
            +   * Search tier can access Vertex AI Search features and NotebookLM features.
            +   * 
            + * + * SUBSCRIPTION_TIER_SEARCH = 1; + */ + public static final int SUBSCRIPTION_TIER_SEARCH_VALUE = 1; + + /** + * + * + *
            +   * Gemini Enterprise Plus tier.
            +   * 
            + * + * SUBSCRIPTION_TIER_SEARCH_AND_ASSISTANT = 2; + */ + public static final int SUBSCRIPTION_TIER_SEARCH_AND_ASSISTANT_VALUE = 2; + + /** + * + * + *
            +   * NotebookLM tier.
            +   * NotebookLM is a subscription tier can only access NotebookLM features.
            +   * 
            + * + * SUBSCRIPTION_TIER_NOTEBOOK_LM = 3; + */ + public static final int SUBSCRIPTION_TIER_NOTEBOOK_LM_VALUE = 3; + + /** + * + * + *
            +   * Gemini Frontline worker tier.
            +   * 
            + * + * SUBSCRIPTION_TIER_FRONTLINE_WORKER = 4; + */ + public static final int SUBSCRIPTION_TIER_FRONTLINE_WORKER_VALUE = 4; + + /** + * + * + *
            +   * Gemini Business Starter tier.
            +   * 
            + * + * SUBSCRIPTION_TIER_AGENTSPACE_STARTER = 10; + */ + public static final int SUBSCRIPTION_TIER_AGENTSPACE_STARTER_VALUE = 10; + + /** + * + * + *
            +   * Gemini Business tier.
            +   * 
            + * + * SUBSCRIPTION_TIER_AGENTSPACE_BUSINESS = 6; + */ + public static final int SUBSCRIPTION_TIER_AGENTSPACE_BUSINESS_VALUE = 6; + + /** + * + * + *
            +   * Gemini Enterprise Standard tier.
            +   * 
            + * + * SUBSCRIPTION_TIER_ENTERPRISE = 7; + */ + public static final int SUBSCRIPTION_TIER_ENTERPRISE_VALUE = 7; + + /** + * + * + *
            +   * Gemini Enterprise Standard tier for emerging markets.
            +   * 
            + * + * SUBSCRIPTION_TIER_ENTERPRISE_EMERGING = 15; + */ + public static final int SUBSCRIPTION_TIER_ENTERPRISE_EMERGING_VALUE = 15; + + /** + * + * + *
            +   * Gemini Enterprise EDU tier.
            +   * 
            + * + * SUBSCRIPTION_TIER_EDU = 8; + */ + public static final int SUBSCRIPTION_TIER_EDU_VALUE = 8; + + /** + * + * + *
            +   * Gemini Enterprise EDU Pro tier.
            +   * 
            + * + * SUBSCRIPTION_TIER_EDU_PRO = 9; + */ + public static final int SUBSCRIPTION_TIER_EDU_PRO_VALUE = 9; + + /** + * + * + *
            +   * Gemini Enterprise EDU tier for emerging market only.
            +   * 
            + * + * SUBSCRIPTION_TIER_EDU_EMERGING = 11; + */ + public static final int SUBSCRIPTION_TIER_EDU_EMERGING_VALUE = 11; + + /** + * + * + *
            +   * Gemini Enterprise EDU Pro tier for emerging market.
            +   * 
            + * + * SUBSCRIPTION_TIER_EDU_PRO_EMERGING = 12; + */ + public static final int SUBSCRIPTION_TIER_EDU_PRO_EMERGING_VALUE = 12; + + /** + * + * + *
            +   * Gemini Frontline Starter tier.
            +   * 
            + * + * SUBSCRIPTION_TIER_FRONTLINE_STARTER = 13; + */ + public static final int SUBSCRIPTION_TIER_FRONTLINE_STARTER_VALUE = 13; + + 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 SubscriptionTier 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 SubscriptionTier forNumber(int value) { + switch (value) { + case 0: + return SUBSCRIPTION_TIER_UNSPECIFIED; + case 1: + return SUBSCRIPTION_TIER_SEARCH; + case 2: + return SUBSCRIPTION_TIER_SEARCH_AND_ASSISTANT; + case 3: + return SUBSCRIPTION_TIER_NOTEBOOK_LM; + case 4: + return SUBSCRIPTION_TIER_FRONTLINE_WORKER; + case 10: + return SUBSCRIPTION_TIER_AGENTSPACE_STARTER; + case 6: + return SUBSCRIPTION_TIER_AGENTSPACE_BUSINESS; + case 7: + return SUBSCRIPTION_TIER_ENTERPRISE; + case 15: + return SUBSCRIPTION_TIER_ENTERPRISE_EMERGING; + case 8: + return SUBSCRIPTION_TIER_EDU; + case 9: + return SUBSCRIPTION_TIER_EDU_PRO; + case 11: + return SUBSCRIPTION_TIER_EDU_EMERGING; + case 12: + return SUBSCRIPTION_TIER_EDU_PRO_EMERGING; + case 13: + return SUBSCRIPTION_TIER_FRONTLINE_STARTER; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public SubscriptionTier findValueByNumber(int number) { + return SubscriptionTier.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.CommonProto.getDescriptor() + .getEnumTypes() + .get(5); + } + + private static final SubscriptionTier[] VALUES = values(); + + public static SubscriptionTier valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private SubscriptionTier(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.discoveryengine.v1beta.SubscriptionTier) +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/TargetSite.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/TargetSite.java index 496ac1429756..e26973f17b75 100644 --- a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/TargetSite.java +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/TargetSite.java @@ -312,6 +312,26 @@ public enum IndexingStatus implements com.google.protobuf.ProtocolMessageEnum { * DELETING = 4; */ DELETING(4), + /** + * + * + *
            +     * The target site change is pending but cancellable.
            +     * 
            + * + * CANCELLABLE = 5; + */ + CANCELLABLE(5), + /** + * + * + *
            +     * The target site change is cancelled.
            +     * 
            + * + * CANCELLED = 6; + */ + CANCELLED(6), UNRECOGNIZED(-1), ; @@ -384,6 +404,28 @@ public enum IndexingStatus implements com.google.protobuf.ProtocolMessageEnum { */ public static final int DELETING_VALUE = 4; + /** + * + * + *
            +     * The target site change is pending but cancellable.
            +     * 
            + * + * CANCELLABLE = 5; + */ + public static final int CANCELLABLE_VALUE = 5; + + /** + * + * + *
            +     * The target site change is cancelled.
            +     * 
            + * + * CANCELLED = 6; + */ + public static final int CANCELLED_VALUE = 6; + public final int getNumber() { if (this == UNRECOGNIZED) { throw new java.lang.IllegalArgumentException( @@ -418,6 +460,10 @@ public static IndexingStatus forNumber(int value) { return SUCCEEDED; case 4: return DELETING; + case 5: + return CANCELLABLE; + case 6: + return CANCELLED; default: return null; } @@ -2078,15 +2124,15 @@ public com.google.cloud.discoveryengine.v1beta.TargetSite.Type getType() { * * *
            -   * Input only. If set to false, a uri_pattern is generated to include all
            -   * pages whose address contains the provided_uri_pattern. If set to true, an
            +   * Immutable. If set to false, a uri_pattern is generated to include all pages
            +   * whose address contains the provided_uri_pattern. If set to true, an
                * uri_pattern is generated to try to be an exact match of the
                * provided_uri_pattern or just the specific page if the provided_uri_pattern
                * is a specific one. provided_uri_pattern is always normalized to
                * generate the URI pattern to be used by the search engine.
                * 
            * - * bool exact_match = 6 [(.google.api.field_behavior) = INPUT_ONLY]; + * bool exact_match = 6 [(.google.api.field_behavior) = IMMUTABLE]; * * @return The exactMatch. */ @@ -3345,15 +3391,15 @@ public Builder clearType() { * * *
            -     * Input only. If set to false, a uri_pattern is generated to include all
            -     * pages whose address contains the provided_uri_pattern. If set to true, an
            +     * Immutable. If set to false, a uri_pattern is generated to include all pages
            +     * whose address contains the provided_uri_pattern. If set to true, an
                  * uri_pattern is generated to try to be an exact match of the
                  * provided_uri_pattern or just the specific page if the provided_uri_pattern
                  * is a specific one. provided_uri_pattern is always normalized to
                  * generate the URI pattern to be used by the search engine.
                  * 
            * - * bool exact_match = 6 [(.google.api.field_behavior) = INPUT_ONLY]; + * bool exact_match = 6 [(.google.api.field_behavior) = IMMUTABLE]; * * @return The exactMatch. */ @@ -3366,15 +3412,15 @@ public boolean getExactMatch() { * * *
            -     * Input only. If set to false, a uri_pattern is generated to include all
            -     * pages whose address contains the provided_uri_pattern. If set to true, an
            +     * Immutable. If set to false, a uri_pattern is generated to include all pages
            +     * whose address contains the provided_uri_pattern. If set to true, an
                  * uri_pattern is generated to try to be an exact match of the
                  * provided_uri_pattern or just the specific page if the provided_uri_pattern
                  * is a specific one. provided_uri_pattern is always normalized to
                  * generate the URI pattern to be used by the search engine.
                  * 
            * - * bool exact_match = 6 [(.google.api.field_behavior) = INPUT_ONLY]; + * bool exact_match = 6 [(.google.api.field_behavior) = IMMUTABLE]; * * @param value The exactMatch to set. * @return This builder for chaining. @@ -3391,15 +3437,15 @@ public Builder setExactMatch(boolean value) { * * *
            -     * Input only. If set to false, a uri_pattern is generated to include all
            -     * pages whose address contains the provided_uri_pattern. If set to true, an
            +     * Immutable. If set to false, a uri_pattern is generated to include all pages
            +     * whose address contains the provided_uri_pattern. If set to true, an
                  * uri_pattern is generated to try to be an exact match of the
                  * provided_uri_pattern or just the specific page if the provided_uri_pattern
                  * is a specific one. provided_uri_pattern is always normalized to
                  * generate the URI pattern to be used by the search engine.
                  * 
            * - * bool exact_match = 6 [(.google.api.field_behavior) = INPUT_ONLY]; + * bool exact_match = 6 [(.google.api.field_behavior) = IMMUTABLE]; * * @return This builder for chaining. */ diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/TargetSiteOrBuilder.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/TargetSiteOrBuilder.java index d7b1af637a60..abc9be149ebf 100644 --- a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/TargetSiteOrBuilder.java +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/TargetSiteOrBuilder.java @@ -120,15 +120,15 @@ public interface TargetSiteOrBuilder * * *
            -   * Input only. If set to false, a uri_pattern is generated to include all
            -   * pages whose address contains the provided_uri_pattern. If set to true, an
            +   * Immutable. If set to false, a uri_pattern is generated to include all pages
            +   * whose address contains the provided_uri_pattern. If set to true, an
                * uri_pattern is generated to try to be an exact match of the
                * provided_uri_pattern or just the specific page if the provided_uri_pattern
                * is a specific one. provided_uri_pattern is always normalized to
                * generate the URI pattern to be used by the search engine.
                * 
            * - * bool exact_match = 6 [(.google.api.field_behavior) = INPUT_ONLY]; + * bool exact_match = 6 [(.google.api.field_behavior) = IMMUTABLE]; * * @return The exactMatch. */ diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/UpdateAclConfigRequest.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/UpdateAclConfigRequest.java new file mode 100644 index 000000000000..528d867f8356 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/UpdateAclConfigRequest.java @@ -0,0 +1,659 @@ +/* + * 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/cloud/discoveryengine/v1beta/acl_config_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.discoveryengine.v1beta; + +/** + * + * + *
            + * Request message for UpdateAclConfig method.
            + * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.UpdateAclConfigRequest} + */ +@com.google.protobuf.Generated +public final class UpdateAclConfigRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.UpdateAclConfigRequest) + UpdateAclConfigRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "UpdateAclConfigRequest"); + } + + // Use UpdateAclConfigRequest.newBuilder() to construct. + private UpdateAclConfigRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private UpdateAclConfigRequest() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.AclConfigServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_UpdateAclConfigRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.AclConfigServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_UpdateAclConfigRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.UpdateAclConfigRequest.class, + com.google.cloud.discoveryengine.v1beta.UpdateAclConfigRequest.Builder.class); + } + + private int bitField0_; + public static final int ACL_CONFIG_FIELD_NUMBER = 1; + private com.google.cloud.discoveryengine.v1beta.AclConfig aclConfig_; + + /** + * + * .google.cloud.discoveryengine.v1beta.AclConfig acl_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the aclConfig field is set. + */ + @java.lang.Override + public boolean hasAclConfig() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * .google.cloud.discoveryengine.v1beta.AclConfig acl_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The aclConfig. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AclConfig getAclConfig() { + return aclConfig_ == null + ? com.google.cloud.discoveryengine.v1beta.AclConfig.getDefaultInstance() + : aclConfig_; + } + + /** + * + * .google.cloud.discoveryengine.v1beta.AclConfig acl_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AclConfigOrBuilder getAclConfigOrBuilder() { + return aclConfig_ == null + ? com.google.cloud.discoveryengine.v1beta.AclConfig.getDefaultInstance() + : aclConfig_; + } + + 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, getAclConfig()); + } + 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, getAclConfig()); + } + 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.discoveryengine.v1beta.UpdateAclConfigRequest)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1beta.UpdateAclConfigRequest other = + (com.google.cloud.discoveryengine.v1beta.UpdateAclConfigRequest) obj; + + if (hasAclConfig() != other.hasAclConfig()) return false; + if (hasAclConfig()) { + if (!getAclConfig().equals(other.getAclConfig())) 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 (hasAclConfig()) { + hash = (37 * hash) + ACL_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getAclConfig().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1beta.UpdateAclConfigRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.UpdateAclConfigRequest 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.discoveryengine.v1beta.UpdateAclConfigRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.UpdateAclConfigRequest 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.discoveryengine.v1beta.UpdateAclConfigRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.UpdateAclConfigRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1beta.UpdateAclConfigRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.UpdateAclConfigRequest 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.discoveryengine.v1beta.UpdateAclConfigRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.UpdateAclConfigRequest 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.discoveryengine.v1beta.UpdateAclConfigRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.UpdateAclConfigRequest 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.discoveryengine.v1beta.UpdateAclConfigRequest 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 UpdateAclConfig method.
            +   * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.UpdateAclConfigRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.UpdateAclConfigRequest) + com.google.cloud.discoveryengine.v1beta.UpdateAclConfigRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.AclConfigServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_UpdateAclConfigRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.AclConfigServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_UpdateAclConfigRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.UpdateAclConfigRequest.class, + com.google.cloud.discoveryengine.v1beta.UpdateAclConfigRequest.Builder.class); + } + + // Construct using com.google.cloud.discoveryengine.v1beta.UpdateAclConfigRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetAclConfigFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + aclConfig_ = null; + if (aclConfigBuilder_ != null) { + aclConfigBuilder_.dispose(); + aclConfigBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1beta.AclConfigServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_UpdateAclConfigRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.UpdateAclConfigRequest + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1beta.UpdateAclConfigRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.UpdateAclConfigRequest build() { + com.google.cloud.discoveryengine.v1beta.UpdateAclConfigRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.UpdateAclConfigRequest buildPartial() { + com.google.cloud.discoveryengine.v1beta.UpdateAclConfigRequest result = + new com.google.cloud.discoveryengine.v1beta.UpdateAclConfigRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.discoveryengine.v1beta.UpdateAclConfigRequest result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.aclConfig_ = aclConfigBuilder_ == null ? aclConfig_ : aclConfigBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.discoveryengine.v1beta.UpdateAclConfigRequest) { + return mergeFrom((com.google.cloud.discoveryengine.v1beta.UpdateAclConfigRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.discoveryengine.v1beta.UpdateAclConfigRequest other) { + if (other + == com.google.cloud.discoveryengine.v1beta.UpdateAclConfigRequest.getDefaultInstance()) + return this; + if (other.hasAclConfig()) { + mergeAclConfig(other.getAclConfig()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage( + internalGetAclConfigFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.cloud.discoveryengine.v1beta.AclConfig aclConfig_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.AclConfig, + com.google.cloud.discoveryengine.v1beta.AclConfig.Builder, + com.google.cloud.discoveryengine.v1beta.AclConfigOrBuilder> + aclConfigBuilder_; + + /** + * + * .google.cloud.discoveryengine.v1beta.AclConfig acl_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the aclConfig field is set. + */ + public boolean hasAclConfig() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * .google.cloud.discoveryengine.v1beta.AclConfig acl_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The aclConfig. + */ + public com.google.cloud.discoveryengine.v1beta.AclConfig getAclConfig() { + if (aclConfigBuilder_ == null) { + return aclConfig_ == null + ? com.google.cloud.discoveryengine.v1beta.AclConfig.getDefaultInstance() + : aclConfig_; + } else { + return aclConfigBuilder_.getMessage(); + } + } + + /** + * + * .google.cloud.discoveryengine.v1beta.AclConfig acl_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setAclConfig(com.google.cloud.discoveryengine.v1beta.AclConfig value) { + if (aclConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + aclConfig_ = value; + } else { + aclConfigBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * .google.cloud.discoveryengine.v1beta.AclConfig acl_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setAclConfig( + com.google.cloud.discoveryengine.v1beta.AclConfig.Builder builderForValue) { + if (aclConfigBuilder_ == null) { + aclConfig_ = builderForValue.build(); + } else { + aclConfigBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * .google.cloud.discoveryengine.v1beta.AclConfig acl_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeAclConfig(com.google.cloud.discoveryengine.v1beta.AclConfig value) { + if (aclConfigBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && aclConfig_ != null + && aclConfig_ + != com.google.cloud.discoveryengine.v1beta.AclConfig.getDefaultInstance()) { + getAclConfigBuilder().mergeFrom(value); + } else { + aclConfig_ = value; + } + } else { + aclConfigBuilder_.mergeFrom(value); + } + if (aclConfig_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + + /** + * + * .google.cloud.discoveryengine.v1beta.AclConfig acl_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearAclConfig() { + bitField0_ = (bitField0_ & ~0x00000001); + aclConfig_ = null; + if (aclConfigBuilder_ != null) { + aclConfigBuilder_.dispose(); + aclConfigBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * .google.cloud.discoveryengine.v1beta.AclConfig acl_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.discoveryengine.v1beta.AclConfig.Builder getAclConfigBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return internalGetAclConfigFieldBuilder().getBuilder(); + } + + /** + * + * .google.cloud.discoveryengine.v1beta.AclConfig acl_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.discoveryengine.v1beta.AclConfigOrBuilder getAclConfigOrBuilder() { + if (aclConfigBuilder_ != null) { + return aclConfigBuilder_.getMessageOrBuilder(); + } else { + return aclConfig_ == null + ? com.google.cloud.discoveryengine.v1beta.AclConfig.getDefaultInstance() + : aclConfig_; + } + } + + /** + * + * .google.cloud.discoveryengine.v1beta.AclConfig acl_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.AclConfig, + com.google.cloud.discoveryengine.v1beta.AclConfig.Builder, + com.google.cloud.discoveryengine.v1beta.AclConfigOrBuilder> + internalGetAclConfigFieldBuilder() { + if (aclConfigBuilder_ == null) { + aclConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.AclConfig, + com.google.cloud.discoveryengine.v1beta.AclConfig.Builder, + com.google.cloud.discoveryengine.v1beta.AclConfigOrBuilder>( + getAclConfig(), getParentForChildren(), isClean()); + aclConfig_ = null; + } + return aclConfigBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.UpdateAclConfigRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.UpdateAclConfigRequest) + private static final com.google.cloud.discoveryengine.v1beta.UpdateAclConfigRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.discoveryengine.v1beta.UpdateAclConfigRequest(); + } + + public static com.google.cloud.discoveryengine.v1beta.UpdateAclConfigRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateAclConfigRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.UpdateAclConfigRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/UpdateAclConfigRequestOrBuilder.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/UpdateAclConfigRequestOrBuilder.java new file mode 100644 index 000000000000..a44918d03a08 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/UpdateAclConfigRequestOrBuilder.java @@ -0,0 +1,53 @@ +/* + * 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/cloud/discoveryengine/v1beta/acl_config_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.discoveryengine.v1beta; + +@com.google.protobuf.Generated +public interface UpdateAclConfigRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.UpdateAclConfigRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * .google.cloud.discoveryengine.v1beta.AclConfig acl_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the aclConfig field is set. + */ + boolean hasAclConfig(); + + /** + * + * .google.cloud.discoveryengine.v1beta.AclConfig acl_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The aclConfig. + */ + com.google.cloud.discoveryengine.v1beta.AclConfig getAclConfig(); + + /** + * + * .google.cloud.discoveryengine.v1beta.AclConfig acl_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.discoveryengine.v1beta.AclConfigOrBuilder getAclConfigOrBuilder(); +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/UpdateAssistantRequest.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/UpdateAssistantRequest.java new file mode 100644 index 000000000000..c253b838ff5d --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/UpdateAssistantRequest.java @@ -0,0 +1,1180 @@ +/* + * 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/cloud/discoveryengine/v1beta/assistant_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.discoveryengine.v1beta; + +/** + * + * + *
            + * Request message for the
            + * [AssistantService.UpdateAssistant][google.cloud.discoveryengine.v1beta.AssistantService.UpdateAssistant]
            + * method.
            + * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.UpdateAssistantRequest} + */ +@com.google.protobuf.Generated +public final class UpdateAssistantRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.UpdateAssistantRequest) + UpdateAssistantRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "UpdateAssistantRequest"); + } + + // Use UpdateAssistantRequest.newBuilder() to construct. + private UpdateAssistantRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private UpdateAssistantRequest() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.AssistantServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_UpdateAssistantRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.AssistantServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_UpdateAssistantRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.UpdateAssistantRequest.class, + com.google.cloud.discoveryengine.v1beta.UpdateAssistantRequest.Builder.class); + } + + private int bitField0_; + public static final int ASSISTANT_FIELD_NUMBER = 1; + private com.google.cloud.discoveryengine.v1beta.Assistant assistant_; + + /** + * + * + *
            +   * Required. The [Assistant][google.cloud.discoveryengine.v1beta.Assistant] to
            +   * update.
            +   *
            +   * The [Assistant][google.cloud.discoveryengine.v1beta.Assistant]'s `name`
            +   * field is used to identify the
            +   * [Assistant][google.cloud.discoveryengine.v1beta.Assistant] to update.
            +   * Format:
            +   * `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/assistants/{assistant}`
            +   *
            +   * If the caller does not have permission to update the
            +   * [Assistant][google.cloud.discoveryengine.v1beta.Assistant], regardless of
            +   * whether or not it exists, a PERMISSION_DENIED error is returned.
            +   *
            +   * If the [Assistant][google.cloud.discoveryengine.v1beta.Assistant] to update
            +   * does not exist, a NOT_FOUND error is returned.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Assistant assistant = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the assistant field is set. + */ + @java.lang.Override + public boolean hasAssistant() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
            +   * Required. The [Assistant][google.cloud.discoveryengine.v1beta.Assistant] to
            +   * update.
            +   *
            +   * The [Assistant][google.cloud.discoveryengine.v1beta.Assistant]'s `name`
            +   * field is used to identify the
            +   * [Assistant][google.cloud.discoveryengine.v1beta.Assistant] to update.
            +   * Format:
            +   * `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/assistants/{assistant}`
            +   *
            +   * If the caller does not have permission to update the
            +   * [Assistant][google.cloud.discoveryengine.v1beta.Assistant], regardless of
            +   * whether or not it exists, a PERMISSION_DENIED error is returned.
            +   *
            +   * If the [Assistant][google.cloud.discoveryengine.v1beta.Assistant] to update
            +   * does not exist, a NOT_FOUND error is returned.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Assistant assistant = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The assistant. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Assistant getAssistant() { + return assistant_ == null + ? com.google.cloud.discoveryengine.v1beta.Assistant.getDefaultInstance() + : assistant_; + } + + /** + * + * + *
            +   * Required. The [Assistant][google.cloud.discoveryengine.v1beta.Assistant] to
            +   * update.
            +   *
            +   * The [Assistant][google.cloud.discoveryengine.v1beta.Assistant]'s `name`
            +   * field is used to identify the
            +   * [Assistant][google.cloud.discoveryengine.v1beta.Assistant] to update.
            +   * Format:
            +   * `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/assistants/{assistant}`
            +   *
            +   * If the caller does not have permission to update the
            +   * [Assistant][google.cloud.discoveryengine.v1beta.Assistant], regardless of
            +   * whether or not it exists, a PERMISSION_DENIED error is returned.
            +   *
            +   * If the [Assistant][google.cloud.discoveryengine.v1beta.Assistant] to update
            +   * does not exist, a NOT_FOUND error is returned.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Assistant assistant = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.AssistantOrBuilder getAssistantOrBuilder() { + return assistant_ == null + ? com.google.cloud.discoveryengine.v1beta.Assistant.getDefaultInstance() + : assistant_; + } + + public static final int UPDATE_MASK_FIELD_NUMBER = 2; + private com.google.protobuf.FieldMask updateMask_; + + /** + * + * + *
            +   * The list of fields to update.
            +   * 
            + * + * .google.protobuf.FieldMask update_mask = 2; + * + * @return Whether the updateMask field is set. + */ + @java.lang.Override + public boolean hasUpdateMask() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
            +   * The list of fields to update.
            +   * 
            + * + * .google.protobuf.FieldMask update_mask = 2; + * + * @return The updateMask. + */ + @java.lang.Override + public com.google.protobuf.FieldMask getUpdateMask() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + + /** + * + * + *
            +   * The list of fields to update.
            +   * 
            + * + * .google.protobuf.FieldMask update_mask = 2; + */ + @java.lang.Override + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + + 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, getAssistant()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(2, getUpdateMask()); + } + 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, getAssistant()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getUpdateMask()); + } + 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.discoveryengine.v1beta.UpdateAssistantRequest)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1beta.UpdateAssistantRequest other = + (com.google.cloud.discoveryengine.v1beta.UpdateAssistantRequest) obj; + + if (hasAssistant() != other.hasAssistant()) return false; + if (hasAssistant()) { + if (!getAssistant().equals(other.getAssistant())) return false; + } + if (hasUpdateMask() != other.hasUpdateMask()) return false; + if (hasUpdateMask()) { + if (!getUpdateMask().equals(other.getUpdateMask())) 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 (hasAssistant()) { + hash = (37 * hash) + ASSISTANT_FIELD_NUMBER; + hash = (53 * hash) + getAssistant().hashCode(); + } + if (hasUpdateMask()) { + hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; + hash = (53 * hash) + getUpdateMask().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1beta.UpdateAssistantRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.UpdateAssistantRequest 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.discoveryengine.v1beta.UpdateAssistantRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.UpdateAssistantRequest 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.discoveryengine.v1beta.UpdateAssistantRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.UpdateAssistantRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1beta.UpdateAssistantRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.UpdateAssistantRequest 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.discoveryengine.v1beta.UpdateAssistantRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.UpdateAssistantRequest 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.discoveryengine.v1beta.UpdateAssistantRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.UpdateAssistantRequest 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.discoveryengine.v1beta.UpdateAssistantRequest 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 the
            +   * [AssistantService.UpdateAssistant][google.cloud.discoveryengine.v1beta.AssistantService.UpdateAssistant]
            +   * method.
            +   * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.UpdateAssistantRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.UpdateAssistantRequest) + com.google.cloud.discoveryengine.v1beta.UpdateAssistantRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.AssistantServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_UpdateAssistantRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.AssistantServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_UpdateAssistantRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.UpdateAssistantRequest.class, + com.google.cloud.discoveryengine.v1beta.UpdateAssistantRequest.Builder.class); + } + + // Construct using com.google.cloud.discoveryengine.v1beta.UpdateAssistantRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetAssistantFieldBuilder(); + internalGetUpdateMaskFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + assistant_ = null; + if (assistantBuilder_ != null) { + assistantBuilder_.dispose(); + assistantBuilder_ = null; + } + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1beta.AssistantServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_UpdateAssistantRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.UpdateAssistantRequest + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1beta.UpdateAssistantRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.UpdateAssistantRequest build() { + com.google.cloud.discoveryengine.v1beta.UpdateAssistantRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.UpdateAssistantRequest buildPartial() { + com.google.cloud.discoveryengine.v1beta.UpdateAssistantRequest result = + new com.google.cloud.discoveryengine.v1beta.UpdateAssistantRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.discoveryengine.v1beta.UpdateAssistantRequest result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.assistant_ = assistantBuilder_ == null ? assistant_ : assistantBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.updateMask_ = updateMaskBuilder_ == null ? updateMask_ : updateMaskBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.discoveryengine.v1beta.UpdateAssistantRequest) { + return mergeFrom((com.google.cloud.discoveryengine.v1beta.UpdateAssistantRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.discoveryengine.v1beta.UpdateAssistantRequest other) { + if (other + == com.google.cloud.discoveryengine.v1beta.UpdateAssistantRequest.getDefaultInstance()) + return this; + if (other.hasAssistant()) { + mergeAssistant(other.getAssistant()); + } + if (other.hasUpdateMask()) { + mergeUpdateMask(other.getUpdateMask()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage( + internalGetAssistantFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage( + internalGetUpdateMaskFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.cloud.discoveryengine.v1beta.Assistant assistant_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.Assistant, + com.google.cloud.discoveryengine.v1beta.Assistant.Builder, + com.google.cloud.discoveryengine.v1beta.AssistantOrBuilder> + assistantBuilder_; + + /** + * + * + *
            +     * Required. The [Assistant][google.cloud.discoveryengine.v1beta.Assistant] to
            +     * update.
            +     *
            +     * The [Assistant][google.cloud.discoveryengine.v1beta.Assistant]'s `name`
            +     * field is used to identify the
            +     * [Assistant][google.cloud.discoveryengine.v1beta.Assistant] to update.
            +     * Format:
            +     * `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/assistants/{assistant}`
            +     *
            +     * If the caller does not have permission to update the
            +     * [Assistant][google.cloud.discoveryengine.v1beta.Assistant], regardless of
            +     * whether or not it exists, a PERMISSION_DENIED error is returned.
            +     *
            +     * If the [Assistant][google.cloud.discoveryengine.v1beta.Assistant] to update
            +     * does not exist, a NOT_FOUND error is returned.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Assistant assistant = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the assistant field is set. + */ + public boolean hasAssistant() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
            +     * Required. The [Assistant][google.cloud.discoveryengine.v1beta.Assistant] to
            +     * update.
            +     *
            +     * The [Assistant][google.cloud.discoveryengine.v1beta.Assistant]'s `name`
            +     * field is used to identify the
            +     * [Assistant][google.cloud.discoveryengine.v1beta.Assistant] to update.
            +     * Format:
            +     * `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/assistants/{assistant}`
            +     *
            +     * If the caller does not have permission to update the
            +     * [Assistant][google.cloud.discoveryengine.v1beta.Assistant], regardless of
            +     * whether or not it exists, a PERMISSION_DENIED error is returned.
            +     *
            +     * If the [Assistant][google.cloud.discoveryengine.v1beta.Assistant] to update
            +     * does not exist, a NOT_FOUND error is returned.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Assistant assistant = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The assistant. + */ + public com.google.cloud.discoveryengine.v1beta.Assistant getAssistant() { + if (assistantBuilder_ == null) { + return assistant_ == null + ? com.google.cloud.discoveryengine.v1beta.Assistant.getDefaultInstance() + : assistant_; + } else { + return assistantBuilder_.getMessage(); + } + } + + /** + * + * + *
            +     * Required. The [Assistant][google.cloud.discoveryengine.v1beta.Assistant] to
            +     * update.
            +     *
            +     * The [Assistant][google.cloud.discoveryengine.v1beta.Assistant]'s `name`
            +     * field is used to identify the
            +     * [Assistant][google.cloud.discoveryengine.v1beta.Assistant] to update.
            +     * Format:
            +     * `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/assistants/{assistant}`
            +     *
            +     * If the caller does not have permission to update the
            +     * [Assistant][google.cloud.discoveryengine.v1beta.Assistant], regardless of
            +     * whether or not it exists, a PERMISSION_DENIED error is returned.
            +     *
            +     * If the [Assistant][google.cloud.discoveryengine.v1beta.Assistant] to update
            +     * does not exist, a NOT_FOUND error is returned.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Assistant assistant = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setAssistant(com.google.cloud.discoveryengine.v1beta.Assistant value) { + if (assistantBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + assistant_ = value; + } else { + assistantBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Required. The [Assistant][google.cloud.discoveryengine.v1beta.Assistant] to
            +     * update.
            +     *
            +     * The [Assistant][google.cloud.discoveryengine.v1beta.Assistant]'s `name`
            +     * field is used to identify the
            +     * [Assistant][google.cloud.discoveryengine.v1beta.Assistant] to update.
            +     * Format:
            +     * `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/assistants/{assistant}`
            +     *
            +     * If the caller does not have permission to update the
            +     * [Assistant][google.cloud.discoveryengine.v1beta.Assistant], regardless of
            +     * whether or not it exists, a PERMISSION_DENIED error is returned.
            +     *
            +     * If the [Assistant][google.cloud.discoveryengine.v1beta.Assistant] to update
            +     * does not exist, a NOT_FOUND error is returned.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Assistant assistant = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setAssistant( + com.google.cloud.discoveryengine.v1beta.Assistant.Builder builderForValue) { + if (assistantBuilder_ == null) { + assistant_ = builderForValue.build(); + } else { + assistantBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Required. The [Assistant][google.cloud.discoveryengine.v1beta.Assistant] to
            +     * update.
            +     *
            +     * The [Assistant][google.cloud.discoveryengine.v1beta.Assistant]'s `name`
            +     * field is used to identify the
            +     * [Assistant][google.cloud.discoveryengine.v1beta.Assistant] to update.
            +     * Format:
            +     * `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/assistants/{assistant}`
            +     *
            +     * If the caller does not have permission to update the
            +     * [Assistant][google.cloud.discoveryengine.v1beta.Assistant], regardless of
            +     * whether or not it exists, a PERMISSION_DENIED error is returned.
            +     *
            +     * If the [Assistant][google.cloud.discoveryengine.v1beta.Assistant] to update
            +     * does not exist, a NOT_FOUND error is returned.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Assistant assistant = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeAssistant(com.google.cloud.discoveryengine.v1beta.Assistant value) { + if (assistantBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && assistant_ != null + && assistant_ + != com.google.cloud.discoveryengine.v1beta.Assistant.getDefaultInstance()) { + getAssistantBuilder().mergeFrom(value); + } else { + assistant_ = value; + } + } else { + assistantBuilder_.mergeFrom(value); + } + if (assistant_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + + /** + * + * + *
            +     * Required. The [Assistant][google.cloud.discoveryengine.v1beta.Assistant] to
            +     * update.
            +     *
            +     * The [Assistant][google.cloud.discoveryengine.v1beta.Assistant]'s `name`
            +     * field is used to identify the
            +     * [Assistant][google.cloud.discoveryengine.v1beta.Assistant] to update.
            +     * Format:
            +     * `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/assistants/{assistant}`
            +     *
            +     * If the caller does not have permission to update the
            +     * [Assistant][google.cloud.discoveryengine.v1beta.Assistant], regardless of
            +     * whether or not it exists, a PERMISSION_DENIED error is returned.
            +     *
            +     * If the [Assistant][google.cloud.discoveryengine.v1beta.Assistant] to update
            +     * does not exist, a NOT_FOUND error is returned.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Assistant assistant = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearAssistant() { + bitField0_ = (bitField0_ & ~0x00000001); + assistant_ = null; + if (assistantBuilder_ != null) { + assistantBuilder_.dispose(); + assistantBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
            +     * Required. The [Assistant][google.cloud.discoveryengine.v1beta.Assistant] to
            +     * update.
            +     *
            +     * The [Assistant][google.cloud.discoveryengine.v1beta.Assistant]'s `name`
            +     * field is used to identify the
            +     * [Assistant][google.cloud.discoveryengine.v1beta.Assistant] to update.
            +     * Format:
            +     * `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/assistants/{assistant}`
            +     *
            +     * If the caller does not have permission to update the
            +     * [Assistant][google.cloud.discoveryengine.v1beta.Assistant], regardless of
            +     * whether or not it exists, a PERMISSION_DENIED error is returned.
            +     *
            +     * If the [Assistant][google.cloud.discoveryengine.v1beta.Assistant] to update
            +     * does not exist, a NOT_FOUND error is returned.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Assistant assistant = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.discoveryengine.v1beta.Assistant.Builder getAssistantBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return internalGetAssistantFieldBuilder().getBuilder(); + } + + /** + * + * + *
            +     * Required. The [Assistant][google.cloud.discoveryengine.v1beta.Assistant] to
            +     * update.
            +     *
            +     * The [Assistant][google.cloud.discoveryengine.v1beta.Assistant]'s `name`
            +     * field is used to identify the
            +     * [Assistant][google.cloud.discoveryengine.v1beta.Assistant] to update.
            +     * Format:
            +     * `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/assistants/{assistant}`
            +     *
            +     * If the caller does not have permission to update the
            +     * [Assistant][google.cloud.discoveryengine.v1beta.Assistant], regardless of
            +     * whether or not it exists, a PERMISSION_DENIED error is returned.
            +     *
            +     * If the [Assistant][google.cloud.discoveryengine.v1beta.Assistant] to update
            +     * does not exist, a NOT_FOUND error is returned.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Assistant assistant = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.discoveryengine.v1beta.AssistantOrBuilder getAssistantOrBuilder() { + if (assistantBuilder_ != null) { + return assistantBuilder_.getMessageOrBuilder(); + } else { + return assistant_ == null + ? com.google.cloud.discoveryengine.v1beta.Assistant.getDefaultInstance() + : assistant_; + } + } + + /** + * + * + *
            +     * Required. The [Assistant][google.cloud.discoveryengine.v1beta.Assistant] to
            +     * update.
            +     *
            +     * The [Assistant][google.cloud.discoveryengine.v1beta.Assistant]'s `name`
            +     * field is used to identify the
            +     * [Assistant][google.cloud.discoveryengine.v1beta.Assistant] to update.
            +     * Format:
            +     * `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/assistants/{assistant}`
            +     *
            +     * If the caller does not have permission to update the
            +     * [Assistant][google.cloud.discoveryengine.v1beta.Assistant], regardless of
            +     * whether or not it exists, a PERMISSION_DENIED error is returned.
            +     *
            +     * If the [Assistant][google.cloud.discoveryengine.v1beta.Assistant] to update
            +     * does not exist, a NOT_FOUND error is returned.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Assistant assistant = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.Assistant, + com.google.cloud.discoveryengine.v1beta.Assistant.Builder, + com.google.cloud.discoveryengine.v1beta.AssistantOrBuilder> + internalGetAssistantFieldBuilder() { + if (assistantBuilder_ == null) { + assistantBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.Assistant, + com.google.cloud.discoveryengine.v1beta.Assistant.Builder, + com.google.cloud.discoveryengine.v1beta.AssistantOrBuilder>( + getAssistant(), getParentForChildren(), isClean()); + assistant_ = null; + } + return assistantBuilder_; + } + + private com.google.protobuf.FieldMask updateMask_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + updateMaskBuilder_; + + /** + * + * + *
            +     * The list of fields to update.
            +     * 
            + * + * .google.protobuf.FieldMask update_mask = 2; + * + * @return Whether the updateMask field is set. + */ + public boolean hasUpdateMask() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
            +     * The list of fields to update.
            +     * 
            + * + * .google.protobuf.FieldMask update_mask = 2; + * + * @return The updateMask. + */ + public com.google.protobuf.FieldMask getUpdateMask() { + if (updateMaskBuilder_ == null) { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } else { + return updateMaskBuilder_.getMessage(); + } + } + + /** + * + * + *
            +     * The list of fields to update.
            +     * 
            + * + * .google.protobuf.FieldMask update_mask = 2; + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateMask_ = value; + } else { + updateMaskBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
            +     * The list of fields to update.
            +     * 
            + * + * .google.protobuf.FieldMask update_mask = 2; + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForValue) { + if (updateMaskBuilder_ == null) { + updateMask_ = builderForValue.build(); + } else { + updateMaskBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
            +     * The list of fields to update.
            +     * 
            + * + * .google.protobuf.FieldMask update_mask = 2; + */ + public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && updateMask_ != null + && updateMask_ != com.google.protobuf.FieldMask.getDefaultInstance()) { + getUpdateMaskBuilder().mergeFrom(value); + } else { + updateMask_ = value; + } + } else { + updateMaskBuilder_.mergeFrom(value); + } + if (updateMask_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** + * + * + *
            +     * The list of fields to update.
            +     * 
            + * + * .google.protobuf.FieldMask update_mask = 2; + */ + public Builder clearUpdateMask() { + bitField0_ = (bitField0_ & ~0x00000002); + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
            +     * The list of fields to update.
            +     * 
            + * + * .google.protobuf.FieldMask update_mask = 2; + */ + public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return internalGetUpdateMaskFieldBuilder().getBuilder(); + } + + /** + * + * + *
            +     * The list of fields to update.
            +     * 
            + * + * .google.protobuf.FieldMask update_mask = 2; + */ + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + if (updateMaskBuilder_ != null) { + return updateMaskBuilder_.getMessageOrBuilder(); + } else { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } + } + + /** + * + * + *
            +     * The list of fields to update.
            +     * 
            + * + * .google.protobuf.FieldMask update_mask = 2; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + internalGetUpdateMaskFieldBuilder() { + if (updateMaskBuilder_ == null) { + updateMaskBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder>( + getUpdateMask(), getParentForChildren(), isClean()); + updateMask_ = null; + } + return updateMaskBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.UpdateAssistantRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.UpdateAssistantRequest) + private static final com.google.cloud.discoveryengine.v1beta.UpdateAssistantRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.discoveryengine.v1beta.UpdateAssistantRequest(); + } + + public static com.google.cloud.discoveryengine.v1beta.UpdateAssistantRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateAssistantRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.UpdateAssistantRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/UpdateAssistantRequestOrBuilder.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/UpdateAssistantRequestOrBuilder.java new file mode 100644 index 000000000000..a87e1413c621 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/UpdateAssistantRequestOrBuilder.java @@ -0,0 +1,150 @@ +/* + * 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/cloud/discoveryengine/v1beta/assistant_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.discoveryengine.v1beta; + +@com.google.protobuf.Generated +public interface UpdateAssistantRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.UpdateAssistantRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
            +   * Required. The [Assistant][google.cloud.discoveryengine.v1beta.Assistant] to
            +   * update.
            +   *
            +   * The [Assistant][google.cloud.discoveryengine.v1beta.Assistant]'s `name`
            +   * field is used to identify the
            +   * [Assistant][google.cloud.discoveryengine.v1beta.Assistant] to update.
            +   * Format:
            +   * `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/assistants/{assistant}`
            +   *
            +   * If the caller does not have permission to update the
            +   * [Assistant][google.cloud.discoveryengine.v1beta.Assistant], regardless of
            +   * whether or not it exists, a PERMISSION_DENIED error is returned.
            +   *
            +   * If the [Assistant][google.cloud.discoveryengine.v1beta.Assistant] to update
            +   * does not exist, a NOT_FOUND error is returned.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Assistant assistant = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the assistant field is set. + */ + boolean hasAssistant(); + + /** + * + * + *
            +   * Required. The [Assistant][google.cloud.discoveryengine.v1beta.Assistant] to
            +   * update.
            +   *
            +   * The [Assistant][google.cloud.discoveryengine.v1beta.Assistant]'s `name`
            +   * field is used to identify the
            +   * [Assistant][google.cloud.discoveryengine.v1beta.Assistant] to update.
            +   * Format:
            +   * `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/assistants/{assistant}`
            +   *
            +   * If the caller does not have permission to update the
            +   * [Assistant][google.cloud.discoveryengine.v1beta.Assistant], regardless of
            +   * whether or not it exists, a PERMISSION_DENIED error is returned.
            +   *
            +   * If the [Assistant][google.cloud.discoveryengine.v1beta.Assistant] to update
            +   * does not exist, a NOT_FOUND error is returned.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Assistant assistant = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The assistant. + */ + com.google.cloud.discoveryengine.v1beta.Assistant getAssistant(); + + /** + * + * + *
            +   * Required. The [Assistant][google.cloud.discoveryengine.v1beta.Assistant] to
            +   * update.
            +   *
            +   * The [Assistant][google.cloud.discoveryengine.v1beta.Assistant]'s `name`
            +   * field is used to identify the
            +   * [Assistant][google.cloud.discoveryengine.v1beta.Assistant] to update.
            +   * Format:
            +   * `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/assistants/{assistant}`
            +   *
            +   * If the caller does not have permission to update the
            +   * [Assistant][google.cloud.discoveryengine.v1beta.Assistant], regardless of
            +   * whether or not it exists, a PERMISSION_DENIED error is returned.
            +   *
            +   * If the [Assistant][google.cloud.discoveryengine.v1beta.Assistant] to update
            +   * does not exist, a NOT_FOUND error is returned.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Assistant assistant = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.discoveryengine.v1beta.AssistantOrBuilder getAssistantOrBuilder(); + + /** + * + * + *
            +   * The list of fields to update.
            +   * 
            + * + * .google.protobuf.FieldMask update_mask = 2; + * + * @return Whether the updateMask field is set. + */ + boolean hasUpdateMask(); + + /** + * + * + *
            +   * The list of fields to update.
            +   * 
            + * + * .google.protobuf.FieldMask update_mask = 2; + * + * @return The updateMask. + */ + com.google.protobuf.FieldMask getUpdateMask(); + + /** + * + * + *
            +   * The list of fields to update.
            +   * 
            + * + * .google.protobuf.FieldMask update_mask = 2; + */ + com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/UpdateCmekConfigMetadata.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/UpdateCmekConfigMetadata.java new file mode 100644 index 000000000000..e047d65a86d4 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/UpdateCmekConfigMetadata.java @@ -0,0 +1,997 @@ +/* + * 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/cloud/discoveryengine/v1beta/cmek_config_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.discoveryengine.v1beta; + +/** + * + * + *
            + * Metadata related to the progress of the
            + * [CmekConfigService.UpdateCmekConfig][google.cloud.discoveryengine.v1beta.CmekConfigService.UpdateCmekConfig]
            + * operation. This will be returned by the google.longrunning.Operation.metadata
            + * field.
            + * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.UpdateCmekConfigMetadata} + */ +@com.google.protobuf.Generated +public final class UpdateCmekConfigMetadata extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.UpdateCmekConfigMetadata) + UpdateCmekConfigMetadataOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "UpdateCmekConfigMetadata"); + } + + // Use UpdateCmekConfigMetadata.newBuilder() to construct. + private UpdateCmekConfigMetadata(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private UpdateCmekConfigMetadata() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.CmekConfigServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_UpdateCmekConfigMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.CmekConfigServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_UpdateCmekConfigMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.UpdateCmekConfigMetadata.class, + com.google.cloud.discoveryengine.v1beta.UpdateCmekConfigMetadata.Builder.class); + } + + private int bitField0_; + public static final int CREATE_TIME_FIELD_NUMBER = 1; + private com.google.protobuf.Timestamp createTime_; + + /** + * + * + *
            +   * Operation create time.
            +   * 
            + * + * .google.protobuf.Timestamp create_time = 1; + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
            +   * Operation create time.
            +   * 
            + * + * .google.protobuf.Timestamp create_time = 1; + * + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + /** + * + * + *
            +   * Operation create time.
            +   * 
            + * + * .google.protobuf.Timestamp create_time = 1; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp updateTime_; + + /** + * + * + *
            +   * Operation last update time. If the operation is done, this is also the
            +   * finish time.
            +   * 
            + * + * .google.protobuf.Timestamp update_time = 2; + * + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
            +   * Operation last update time. If the operation is done, this is also the
            +   * finish time.
            +   * 
            + * + * .google.protobuf.Timestamp update_time = 2; + * + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + /** + * + * + *
            +   * Operation last update time. If the operation is done, this is also the
            +   * finish time.
            +   * 
            + * + * .google.protobuf.Timestamp update_time = 2; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + 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, getCreateTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(2, getUpdateTime()); + } + 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, getCreateTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getUpdateTime()); + } + 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.discoveryengine.v1beta.UpdateCmekConfigMetadata)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1beta.UpdateCmekConfigMetadata other = + (com.google.cloud.discoveryengine.v1beta.UpdateCmekConfigMetadata) obj; + + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime().equals(other.getUpdateTime())) 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 (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1beta.UpdateCmekConfigMetadata parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.UpdateCmekConfigMetadata 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.discoveryengine.v1beta.UpdateCmekConfigMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.UpdateCmekConfigMetadata 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.discoveryengine.v1beta.UpdateCmekConfigMetadata parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.UpdateCmekConfigMetadata parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1beta.UpdateCmekConfigMetadata parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.UpdateCmekConfigMetadata 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.discoveryengine.v1beta.UpdateCmekConfigMetadata parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.UpdateCmekConfigMetadata 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.discoveryengine.v1beta.UpdateCmekConfigMetadata parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.UpdateCmekConfigMetadata 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.discoveryengine.v1beta.UpdateCmekConfigMetadata 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; + } + + /** + * + * + *
            +   * Metadata related to the progress of the
            +   * [CmekConfigService.UpdateCmekConfig][google.cloud.discoveryengine.v1beta.CmekConfigService.UpdateCmekConfig]
            +   * operation. This will be returned by the google.longrunning.Operation.metadata
            +   * field.
            +   * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.UpdateCmekConfigMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.UpdateCmekConfigMetadata) + com.google.cloud.discoveryengine.v1beta.UpdateCmekConfigMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.CmekConfigServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_UpdateCmekConfigMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.CmekConfigServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_UpdateCmekConfigMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.UpdateCmekConfigMetadata.class, + com.google.cloud.discoveryengine.v1beta.UpdateCmekConfigMetadata.Builder.class); + } + + // Construct using com.google.cloud.discoveryengine.v1beta.UpdateCmekConfigMetadata.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetCreateTimeFieldBuilder(); + internalGetUpdateTimeFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1beta.CmekConfigServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_UpdateCmekConfigMetadata_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.UpdateCmekConfigMetadata + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1beta.UpdateCmekConfigMetadata.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.UpdateCmekConfigMetadata build() { + com.google.cloud.discoveryengine.v1beta.UpdateCmekConfigMetadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.UpdateCmekConfigMetadata buildPartial() { + com.google.cloud.discoveryengine.v1beta.UpdateCmekConfigMetadata result = + new com.google.cloud.discoveryengine.v1beta.UpdateCmekConfigMetadata(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.discoveryengine.v1beta.UpdateCmekConfigMetadata result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.updateTime_ = updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.discoveryengine.v1beta.UpdateCmekConfigMetadata) { + return mergeFrom((com.google.cloud.discoveryengine.v1beta.UpdateCmekConfigMetadata) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1beta.UpdateCmekConfigMetadata other) { + if (other + == com.google.cloud.discoveryengine.v1beta.UpdateCmekConfigMetadata.getDefaultInstance()) + return this; + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage( + internalGetCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage( + internalGetUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + + /** + * + * + *
            +     * Operation create time.
            +     * 
            + * + * .google.protobuf.Timestamp create_time = 1; + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
            +     * Operation create time.
            +     * 
            + * + * .google.protobuf.Timestamp create_time = 1; + * + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
            +     * Operation create time.
            +     * 
            + * + * .google.protobuf.Timestamp create_time = 1; + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + } else { + createTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Operation create time.
            +     * 
            + * + * .google.protobuf.Timestamp create_time = 1; + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Operation create time.
            +     * 
            + * + * .google.protobuf.Timestamp create_time = 1; + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && createTime_ != null + && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); + } + if (createTime_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + + /** + * + * + *
            +     * Operation create time.
            +     * 
            + * + * .google.protobuf.Timestamp create_time = 1; + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000001); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
            +     * Operation create time.
            +     * 
            + * + * .google.protobuf.Timestamp create_time = 1; + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return internalGetCreateTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
            +     * Operation create time.
            +     * 
            + * + * .google.protobuf.Timestamp create_time = 1; + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } + + /** + * + * + *
            +     * Operation create time.
            +     * 
            + * + * .google.protobuf.Timestamp create_time = 1; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + internalGetCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp updateTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + updateTimeBuilder_; + + /** + * + * + *
            +     * Operation last update time. If the operation is done, this is also the
            +     * finish time.
            +     * 
            + * + * .google.protobuf.Timestamp update_time = 2; + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
            +     * Operation last update time. If the operation is done, this is also the
            +     * finish time.
            +     * 
            + * + * .google.protobuf.Timestamp update_time = 2; + * + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
            +     * Operation last update time. If the operation is done, this is also the
            +     * finish time.
            +     * 
            + * + * .google.protobuf.Timestamp update_time = 2; + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + } else { + updateTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Operation last update time. If the operation is done, this is also the
            +     * finish time.
            +     * 
            + * + * .google.protobuf.Timestamp update_time = 2; + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Operation last update time. If the operation is done, this is also the
            +     * finish time.
            +     * 
            + * + * .google.protobuf.Timestamp update_time = 2; + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && updateTime_ != null + && updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getUpdateTimeBuilder().mergeFrom(value); + } else { + updateTime_ = value; + } + } else { + updateTimeBuilder_.mergeFrom(value); + } + if (updateTime_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** + * + * + *
            +     * Operation last update time. If the operation is done, this is also the
            +     * finish time.
            +     * 
            + * + * .google.protobuf.Timestamp update_time = 2; + */ + public Builder clearUpdateTime() { + bitField0_ = (bitField0_ & ~0x00000002); + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
            +     * Operation last update time. If the operation is done, this is also the
            +     * finish time.
            +     * 
            + * + * .google.protobuf.Timestamp update_time = 2; + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return internalGetUpdateTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
            +     * Operation last update time. If the operation is done, this is also the
            +     * finish time.
            +     * 
            + * + * .google.protobuf.Timestamp update_time = 2; + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } + } + + /** + * + * + *
            +     * Operation last update time. If the operation is done, this is also the
            +     * finish time.
            +     * 
            + * + * .google.protobuf.Timestamp update_time = 2; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + internalGetUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getUpdateTime(), getParentForChildren(), isClean()); + updateTime_ = null; + } + return updateTimeBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.UpdateCmekConfigMetadata) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.UpdateCmekConfigMetadata) + private static final com.google.cloud.discoveryengine.v1beta.UpdateCmekConfigMetadata + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.discoveryengine.v1beta.UpdateCmekConfigMetadata(); + } + + public static com.google.cloud.discoveryengine.v1beta.UpdateCmekConfigMetadata + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateCmekConfigMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.UpdateCmekConfigMetadata + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/UpdateCmekConfigMetadataOrBuilder.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/UpdateCmekConfigMetadataOrBuilder.java new file mode 100644 index 000000000000..3511965f9e10 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/UpdateCmekConfigMetadataOrBuilder.java @@ -0,0 +1,105 @@ +/* + * 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/cloud/discoveryengine/v1beta/cmek_config_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.discoveryengine.v1beta; + +@com.google.protobuf.Generated +public interface UpdateCmekConfigMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.UpdateCmekConfigMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
            +   * Operation create time.
            +   * 
            + * + * .google.protobuf.Timestamp create_time = 1; + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + + /** + * + * + *
            +   * Operation create time.
            +   * 
            + * + * .google.protobuf.Timestamp create_time = 1; + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + + /** + * + * + *
            +   * Operation create time.
            +   * 
            + * + * .google.protobuf.Timestamp create_time = 1; + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
            +   * Operation last update time. If the operation is done, this is also the
            +   * finish time.
            +   * 
            + * + * .google.protobuf.Timestamp update_time = 2; + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + + /** + * + * + *
            +   * Operation last update time. If the operation is done, this is also the
            +   * finish time.
            +   * 
            + * + * .google.protobuf.Timestamp update_time = 2; + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + + /** + * + * + *
            +   * Operation last update time. If the operation is done, this is also the
            +   * finish time.
            +   * 
            + * + * .google.protobuf.Timestamp update_time = 2; + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/UpdateCmekConfigRequest.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/UpdateCmekConfigRequest.java new file mode 100644 index 000000000000..2dc72537ebc5 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/UpdateCmekConfigRequest.java @@ -0,0 +1,833 @@ +/* + * 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/cloud/discoveryengine/v1beta/cmek_config_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.discoveryengine.v1beta; + +/** + * + * + *
            + * Request message for UpdateCmekConfig method.
            + * rpc.
            + * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.UpdateCmekConfigRequest} + */ +@com.google.protobuf.Generated +public final class UpdateCmekConfigRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.UpdateCmekConfigRequest) + UpdateCmekConfigRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "UpdateCmekConfigRequest"); + } + + // Use UpdateCmekConfigRequest.newBuilder() to construct. + private UpdateCmekConfigRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private UpdateCmekConfigRequest() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.CmekConfigServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_UpdateCmekConfigRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.CmekConfigServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_UpdateCmekConfigRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.UpdateCmekConfigRequest.class, + com.google.cloud.discoveryengine.v1beta.UpdateCmekConfigRequest.Builder.class); + } + + private int bitField0_; + public static final int CONFIG_FIELD_NUMBER = 1; + private com.google.cloud.discoveryengine.v1beta.CmekConfig config_; + + /** + * + * + *
            +   * Required. The CmekConfig resource.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.CmekConfig config = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the config field is set. + */ + @java.lang.Override + public boolean hasConfig() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
            +   * Required. The CmekConfig resource.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.CmekConfig config = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The config. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.CmekConfig getConfig() { + return config_ == null + ? com.google.cloud.discoveryengine.v1beta.CmekConfig.getDefaultInstance() + : config_; + } + + /** + * + * + *
            +   * Required. The CmekConfig resource.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.CmekConfig config = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.CmekConfigOrBuilder getConfigOrBuilder() { + return config_ == null + ? com.google.cloud.discoveryengine.v1beta.CmekConfig.getDefaultInstance() + : config_; + } + + public static final int SET_DEFAULT_FIELD_NUMBER = 2; + private boolean setDefault_ = false; + + /** + * + * + *
            +   * Set the following CmekConfig as the default to be used for child
            +   * resources if one is not specified.
            +   * 
            + * + * bool set_default = 2; + * + * @return The setDefault. + */ + @java.lang.Override + public boolean getSetDefault() { + return setDefault_; + } + + 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, getConfig()); + } + if (setDefault_ != false) { + output.writeBool(2, setDefault_); + } + 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, getConfig()); + } + if (setDefault_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, setDefault_); + } + 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.discoveryengine.v1beta.UpdateCmekConfigRequest)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1beta.UpdateCmekConfigRequest other = + (com.google.cloud.discoveryengine.v1beta.UpdateCmekConfigRequest) obj; + + if (hasConfig() != other.hasConfig()) return false; + if (hasConfig()) { + if (!getConfig().equals(other.getConfig())) return false; + } + if (getSetDefault() != other.getSetDefault()) 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 (hasConfig()) { + hash = (37 * hash) + CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getConfig().hashCode(); + } + hash = (37 * hash) + SET_DEFAULT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getSetDefault()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1beta.UpdateCmekConfigRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.UpdateCmekConfigRequest 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.discoveryengine.v1beta.UpdateCmekConfigRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.UpdateCmekConfigRequest 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.discoveryengine.v1beta.UpdateCmekConfigRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.UpdateCmekConfigRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1beta.UpdateCmekConfigRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.UpdateCmekConfigRequest 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.discoveryengine.v1beta.UpdateCmekConfigRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.UpdateCmekConfigRequest 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.discoveryengine.v1beta.UpdateCmekConfigRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.UpdateCmekConfigRequest 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.discoveryengine.v1beta.UpdateCmekConfigRequest 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 UpdateCmekConfig method.
            +   * rpc.
            +   * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.UpdateCmekConfigRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.UpdateCmekConfigRequest) + com.google.cloud.discoveryengine.v1beta.UpdateCmekConfigRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.CmekConfigServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_UpdateCmekConfigRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.CmekConfigServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_UpdateCmekConfigRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.UpdateCmekConfigRequest.class, + com.google.cloud.discoveryengine.v1beta.UpdateCmekConfigRequest.Builder.class); + } + + // Construct using com.google.cloud.discoveryengine.v1beta.UpdateCmekConfigRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetConfigFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + config_ = null; + if (configBuilder_ != null) { + configBuilder_.dispose(); + configBuilder_ = null; + } + setDefault_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1beta.CmekConfigServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_UpdateCmekConfigRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.UpdateCmekConfigRequest + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1beta.UpdateCmekConfigRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.UpdateCmekConfigRequest build() { + com.google.cloud.discoveryengine.v1beta.UpdateCmekConfigRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.UpdateCmekConfigRequest buildPartial() { + com.google.cloud.discoveryengine.v1beta.UpdateCmekConfigRequest result = + new com.google.cloud.discoveryengine.v1beta.UpdateCmekConfigRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.discoveryengine.v1beta.UpdateCmekConfigRequest result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.config_ = configBuilder_ == null ? config_ : configBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.setDefault_ = setDefault_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.discoveryengine.v1beta.UpdateCmekConfigRequest) { + return mergeFrom((com.google.cloud.discoveryengine.v1beta.UpdateCmekConfigRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1beta.UpdateCmekConfigRequest other) { + if (other + == com.google.cloud.discoveryengine.v1beta.UpdateCmekConfigRequest.getDefaultInstance()) + return this; + if (other.hasConfig()) { + mergeConfig(other.getConfig()); + } + if (other.getSetDefault() != false) { + setSetDefault(other.getSetDefault()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(internalGetConfigFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + setDefault_ = input.readBool(); + bitField0_ |= 0x00000002; + break; + } // case 16 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.cloud.discoveryengine.v1beta.CmekConfig config_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.CmekConfig, + com.google.cloud.discoveryengine.v1beta.CmekConfig.Builder, + com.google.cloud.discoveryengine.v1beta.CmekConfigOrBuilder> + configBuilder_; + + /** + * + * + *
            +     * Required. The CmekConfig resource.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.CmekConfig config = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the config field is set. + */ + public boolean hasConfig() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
            +     * Required. The CmekConfig resource.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.CmekConfig config = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The config. + */ + public com.google.cloud.discoveryengine.v1beta.CmekConfig getConfig() { + if (configBuilder_ == null) { + return config_ == null + ? com.google.cloud.discoveryengine.v1beta.CmekConfig.getDefaultInstance() + : config_; + } else { + return configBuilder_.getMessage(); + } + } + + /** + * + * + *
            +     * Required. The CmekConfig resource.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.CmekConfig config = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setConfig(com.google.cloud.discoveryengine.v1beta.CmekConfig value) { + if (configBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + config_ = value; + } else { + configBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Required. The CmekConfig resource.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.CmekConfig config = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setConfig( + com.google.cloud.discoveryengine.v1beta.CmekConfig.Builder builderForValue) { + if (configBuilder_ == null) { + config_ = builderForValue.build(); + } else { + configBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Required. The CmekConfig resource.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.CmekConfig config = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeConfig(com.google.cloud.discoveryengine.v1beta.CmekConfig value) { + if (configBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && config_ != null + && config_ != com.google.cloud.discoveryengine.v1beta.CmekConfig.getDefaultInstance()) { + getConfigBuilder().mergeFrom(value); + } else { + config_ = value; + } + } else { + configBuilder_.mergeFrom(value); + } + if (config_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + + /** + * + * + *
            +     * Required. The CmekConfig resource.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.CmekConfig config = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearConfig() { + bitField0_ = (bitField0_ & ~0x00000001); + config_ = null; + if (configBuilder_ != null) { + configBuilder_.dispose(); + configBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
            +     * Required. The CmekConfig resource.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.CmekConfig config = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.discoveryengine.v1beta.CmekConfig.Builder getConfigBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return internalGetConfigFieldBuilder().getBuilder(); + } + + /** + * + * + *
            +     * Required. The CmekConfig resource.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.CmekConfig config = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.discoveryengine.v1beta.CmekConfigOrBuilder getConfigOrBuilder() { + if (configBuilder_ != null) { + return configBuilder_.getMessageOrBuilder(); + } else { + return config_ == null + ? com.google.cloud.discoveryengine.v1beta.CmekConfig.getDefaultInstance() + : config_; + } + } + + /** + * + * + *
            +     * Required. The CmekConfig resource.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.CmekConfig config = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.CmekConfig, + com.google.cloud.discoveryengine.v1beta.CmekConfig.Builder, + com.google.cloud.discoveryengine.v1beta.CmekConfigOrBuilder> + internalGetConfigFieldBuilder() { + if (configBuilder_ == null) { + configBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.CmekConfig, + com.google.cloud.discoveryengine.v1beta.CmekConfig.Builder, + com.google.cloud.discoveryengine.v1beta.CmekConfigOrBuilder>( + getConfig(), getParentForChildren(), isClean()); + config_ = null; + } + return configBuilder_; + } + + private boolean setDefault_; + + /** + * + * + *
            +     * Set the following CmekConfig as the default to be used for child
            +     * resources if one is not specified.
            +     * 
            + * + * bool set_default = 2; + * + * @return The setDefault. + */ + @java.lang.Override + public boolean getSetDefault() { + return setDefault_; + } + + /** + * + * + *
            +     * Set the following CmekConfig as the default to be used for child
            +     * resources if one is not specified.
            +     * 
            + * + * bool set_default = 2; + * + * @param value The setDefault to set. + * @return This builder for chaining. + */ + public Builder setSetDefault(boolean value) { + + setDefault_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Set the following CmekConfig as the default to be used for child
            +     * resources if one is not specified.
            +     * 
            + * + * bool set_default = 2; + * + * @return This builder for chaining. + */ + public Builder clearSetDefault() { + bitField0_ = (bitField0_ & ~0x00000002); + setDefault_ = false; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.UpdateCmekConfigRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.UpdateCmekConfigRequest) + private static final com.google.cloud.discoveryengine.v1beta.UpdateCmekConfigRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.discoveryengine.v1beta.UpdateCmekConfigRequest(); + } + + public static com.google.cloud.discoveryengine.v1beta.UpdateCmekConfigRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateCmekConfigRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.UpdateCmekConfigRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/UpdateCmekConfigRequestOrBuilder.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/UpdateCmekConfigRequestOrBuilder.java new file mode 100644 index 000000000000..dfbcaf9d033c --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/UpdateCmekConfigRequestOrBuilder.java @@ -0,0 +1,85 @@ +/* + * 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/cloud/discoveryengine/v1beta/cmek_config_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.discoveryengine.v1beta; + +@com.google.protobuf.Generated +public interface UpdateCmekConfigRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.UpdateCmekConfigRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
            +   * Required. The CmekConfig resource.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.CmekConfig config = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the config field is set. + */ + boolean hasConfig(); + + /** + * + * + *
            +   * Required. The CmekConfig resource.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.CmekConfig config = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The config. + */ + com.google.cloud.discoveryengine.v1beta.CmekConfig getConfig(); + + /** + * + * + *
            +   * Required. The CmekConfig resource.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.CmekConfig config = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.discoveryengine.v1beta.CmekConfigOrBuilder getConfigOrBuilder(); + + /** + * + * + *
            +   * Set the following CmekConfig as the default to be used for child
            +   * resources if one is not specified.
            +   * 
            + * + * bool set_default = 2; + * + * @return The setDefault. + */ + boolean getSetDefault(); +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/UpdateLicenseConfigRequest.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/UpdateLicenseConfigRequest.java new file mode 100644 index 000000000000..94b6a84c1a1f --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/UpdateLicenseConfigRequest.java @@ -0,0 +1,1116 @@ +/* + * 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/cloud/discoveryengine/v1beta/license_config_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.discoveryengine.v1beta; + +/** + * + * + *
            + * Request message for
            + * [LicenseConfigService.UpdateLicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfigService.UpdateLicenseConfig]
            + * method.
            + * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.UpdateLicenseConfigRequest} + */ +@com.google.protobuf.Generated +public final class UpdateLicenseConfigRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.UpdateLicenseConfigRequest) + UpdateLicenseConfigRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "UpdateLicenseConfigRequest"); + } + + // Use UpdateLicenseConfigRequest.newBuilder() to construct. + private UpdateLicenseConfigRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private UpdateLicenseConfigRequest() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.LicenseConfigServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_UpdateLicenseConfigRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.LicenseConfigServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_UpdateLicenseConfigRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.UpdateLicenseConfigRequest.class, + com.google.cloud.discoveryengine.v1beta.UpdateLicenseConfigRequest.Builder.class); + } + + private int bitField0_; + public static final int LICENSE_CONFIG_FIELD_NUMBER = 1; + private com.google.cloud.discoveryengine.v1beta.LicenseConfig licenseConfig_; + + /** + * + * + *
            +   * Required. The
            +   * [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig] to
            +   * update.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.LicenseConfig license_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the licenseConfig field is set. + */ + @java.lang.Override + public boolean hasLicenseConfig() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
            +   * Required. The
            +   * [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig] to
            +   * update.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.LicenseConfig license_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The licenseConfig. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.LicenseConfig getLicenseConfig() { + return licenseConfig_ == null + ? com.google.cloud.discoveryengine.v1beta.LicenseConfig.getDefaultInstance() + : licenseConfig_; + } + + /** + * + * + *
            +   * Required. The
            +   * [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig] to
            +   * update.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.LicenseConfig license_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.LicenseConfigOrBuilder + getLicenseConfigOrBuilder() { + return licenseConfig_ == null + ? com.google.cloud.discoveryengine.v1beta.LicenseConfig.getDefaultInstance() + : licenseConfig_; + } + + public static final int UPDATE_MASK_FIELD_NUMBER = 2; + private com.google.protobuf.FieldMask updateMask_; + + /** + * + * + *
            +   * Optional. Indicates which fields in the provided
            +   * [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig] to
            +   * update.
            +   *
            +   * If an unsupported or unknown field is provided, an INVALID_ARGUMENT error
            +   * is returned.
            +   * 
            + * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the updateMask field is set. + */ + @java.lang.Override + public boolean hasUpdateMask() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
            +   * Optional. Indicates which fields in the provided
            +   * [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig] to
            +   * update.
            +   *
            +   * If an unsupported or unknown field is provided, an INVALID_ARGUMENT error
            +   * is returned.
            +   * 
            + * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The updateMask. + */ + @java.lang.Override + public com.google.protobuf.FieldMask getUpdateMask() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + + /** + * + * + *
            +   * Optional. Indicates which fields in the provided
            +   * [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig] to
            +   * update.
            +   *
            +   * If an unsupported or unknown field is provided, an INVALID_ARGUMENT error
            +   * is returned.
            +   * 
            + * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + + 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, getLicenseConfig()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(2, getUpdateMask()); + } + 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, getLicenseConfig()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getUpdateMask()); + } + 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.discoveryengine.v1beta.UpdateLicenseConfigRequest)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1beta.UpdateLicenseConfigRequest other = + (com.google.cloud.discoveryengine.v1beta.UpdateLicenseConfigRequest) obj; + + if (hasLicenseConfig() != other.hasLicenseConfig()) return false; + if (hasLicenseConfig()) { + if (!getLicenseConfig().equals(other.getLicenseConfig())) return false; + } + if (hasUpdateMask() != other.hasUpdateMask()) return false; + if (hasUpdateMask()) { + if (!getUpdateMask().equals(other.getUpdateMask())) 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 (hasLicenseConfig()) { + hash = (37 * hash) + LICENSE_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getLicenseConfig().hashCode(); + } + if (hasUpdateMask()) { + hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; + hash = (53 * hash) + getUpdateMask().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1beta.UpdateLicenseConfigRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.UpdateLicenseConfigRequest 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.discoveryengine.v1beta.UpdateLicenseConfigRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.UpdateLicenseConfigRequest 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.discoveryengine.v1beta.UpdateLicenseConfigRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.UpdateLicenseConfigRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1beta.UpdateLicenseConfigRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.UpdateLicenseConfigRequest 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.discoveryengine.v1beta.UpdateLicenseConfigRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.UpdateLicenseConfigRequest + 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.discoveryengine.v1beta.UpdateLicenseConfigRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.UpdateLicenseConfigRequest 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.discoveryengine.v1beta.UpdateLicenseConfigRequest 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
            +   * [LicenseConfigService.UpdateLicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfigService.UpdateLicenseConfig]
            +   * method.
            +   * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.UpdateLicenseConfigRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.UpdateLicenseConfigRequest) + com.google.cloud.discoveryengine.v1beta.UpdateLicenseConfigRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.LicenseConfigServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_UpdateLicenseConfigRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.LicenseConfigServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_UpdateLicenseConfigRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.UpdateLicenseConfigRequest.class, + com.google.cloud.discoveryengine.v1beta.UpdateLicenseConfigRequest.Builder.class); + } + + // Construct using + // com.google.cloud.discoveryengine.v1beta.UpdateLicenseConfigRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetLicenseConfigFieldBuilder(); + internalGetUpdateMaskFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + licenseConfig_ = null; + if (licenseConfigBuilder_ != null) { + licenseConfigBuilder_.dispose(); + licenseConfigBuilder_ = null; + } + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1beta.LicenseConfigServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_UpdateLicenseConfigRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.UpdateLicenseConfigRequest + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1beta.UpdateLicenseConfigRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.UpdateLicenseConfigRequest build() { + com.google.cloud.discoveryengine.v1beta.UpdateLicenseConfigRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.UpdateLicenseConfigRequest buildPartial() { + com.google.cloud.discoveryengine.v1beta.UpdateLicenseConfigRequest result = + new com.google.cloud.discoveryengine.v1beta.UpdateLicenseConfigRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.discoveryengine.v1beta.UpdateLicenseConfigRequest result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.licenseConfig_ = + licenseConfigBuilder_ == null ? licenseConfig_ : licenseConfigBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.updateMask_ = updateMaskBuilder_ == null ? updateMask_ : updateMaskBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.discoveryengine.v1beta.UpdateLicenseConfigRequest) { + return mergeFrom( + (com.google.cloud.discoveryengine.v1beta.UpdateLicenseConfigRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1beta.UpdateLicenseConfigRequest other) { + if (other + == com.google.cloud.discoveryengine.v1beta.UpdateLicenseConfigRequest + .getDefaultInstance()) return this; + if (other.hasLicenseConfig()) { + mergeLicenseConfig(other.getLicenseConfig()); + } + if (other.hasUpdateMask()) { + mergeUpdateMask(other.getUpdateMask()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage( + internalGetLicenseConfigFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage( + internalGetUpdateMaskFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.cloud.discoveryengine.v1beta.LicenseConfig licenseConfig_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.LicenseConfig, + com.google.cloud.discoveryengine.v1beta.LicenseConfig.Builder, + com.google.cloud.discoveryengine.v1beta.LicenseConfigOrBuilder> + licenseConfigBuilder_; + + /** + * + * + *
            +     * Required. The
            +     * [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig] to
            +     * update.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.LicenseConfig license_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the licenseConfig field is set. + */ + public boolean hasLicenseConfig() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
            +     * Required. The
            +     * [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig] to
            +     * update.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.LicenseConfig license_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The licenseConfig. + */ + public com.google.cloud.discoveryengine.v1beta.LicenseConfig getLicenseConfig() { + if (licenseConfigBuilder_ == null) { + return licenseConfig_ == null + ? com.google.cloud.discoveryengine.v1beta.LicenseConfig.getDefaultInstance() + : licenseConfig_; + } else { + return licenseConfigBuilder_.getMessage(); + } + } + + /** + * + * + *
            +     * Required. The
            +     * [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig] to
            +     * update.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.LicenseConfig license_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setLicenseConfig(com.google.cloud.discoveryengine.v1beta.LicenseConfig value) { + if (licenseConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + licenseConfig_ = value; + } else { + licenseConfigBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Required. The
            +     * [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig] to
            +     * update.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.LicenseConfig license_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setLicenseConfig( + com.google.cloud.discoveryengine.v1beta.LicenseConfig.Builder builderForValue) { + if (licenseConfigBuilder_ == null) { + licenseConfig_ = builderForValue.build(); + } else { + licenseConfigBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Required. The
            +     * [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig] to
            +     * update.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.LicenseConfig license_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeLicenseConfig(com.google.cloud.discoveryengine.v1beta.LicenseConfig value) { + if (licenseConfigBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && licenseConfig_ != null + && licenseConfig_ + != com.google.cloud.discoveryengine.v1beta.LicenseConfig.getDefaultInstance()) { + getLicenseConfigBuilder().mergeFrom(value); + } else { + licenseConfig_ = value; + } + } else { + licenseConfigBuilder_.mergeFrom(value); + } + if (licenseConfig_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + + /** + * + * + *
            +     * Required. The
            +     * [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig] to
            +     * update.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.LicenseConfig license_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearLicenseConfig() { + bitField0_ = (bitField0_ & ~0x00000001); + licenseConfig_ = null; + if (licenseConfigBuilder_ != null) { + licenseConfigBuilder_.dispose(); + licenseConfigBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
            +     * Required. The
            +     * [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig] to
            +     * update.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.LicenseConfig license_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.discoveryengine.v1beta.LicenseConfig.Builder getLicenseConfigBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return internalGetLicenseConfigFieldBuilder().getBuilder(); + } + + /** + * + * + *
            +     * Required. The
            +     * [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig] to
            +     * update.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.LicenseConfig license_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.discoveryengine.v1beta.LicenseConfigOrBuilder + getLicenseConfigOrBuilder() { + if (licenseConfigBuilder_ != null) { + return licenseConfigBuilder_.getMessageOrBuilder(); + } else { + return licenseConfig_ == null + ? com.google.cloud.discoveryengine.v1beta.LicenseConfig.getDefaultInstance() + : licenseConfig_; + } + } + + /** + * + * + *
            +     * Required. The
            +     * [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig] to
            +     * update.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.LicenseConfig license_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.LicenseConfig, + com.google.cloud.discoveryengine.v1beta.LicenseConfig.Builder, + com.google.cloud.discoveryengine.v1beta.LicenseConfigOrBuilder> + internalGetLicenseConfigFieldBuilder() { + if (licenseConfigBuilder_ == null) { + licenseConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.LicenseConfig, + com.google.cloud.discoveryengine.v1beta.LicenseConfig.Builder, + com.google.cloud.discoveryengine.v1beta.LicenseConfigOrBuilder>( + getLicenseConfig(), getParentForChildren(), isClean()); + licenseConfig_ = null; + } + return licenseConfigBuilder_; + } + + private com.google.protobuf.FieldMask updateMask_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + updateMaskBuilder_; + + /** + * + * + *
            +     * Optional. Indicates which fields in the provided
            +     * [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig] to
            +     * update.
            +     *
            +     * If an unsupported or unknown field is provided, an INVALID_ARGUMENT error
            +     * is returned.
            +     * 
            + * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the updateMask field is set. + */ + public boolean hasUpdateMask() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
            +     * Optional. Indicates which fields in the provided
            +     * [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig] to
            +     * update.
            +     *
            +     * If an unsupported or unknown field is provided, an INVALID_ARGUMENT error
            +     * is returned.
            +     * 
            + * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The updateMask. + */ + public com.google.protobuf.FieldMask getUpdateMask() { + if (updateMaskBuilder_ == null) { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } else { + return updateMaskBuilder_.getMessage(); + } + } + + /** + * + * + *
            +     * Optional. Indicates which fields in the provided
            +     * [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig] to
            +     * update.
            +     *
            +     * If an unsupported or unknown field is provided, an INVALID_ARGUMENT error
            +     * is returned.
            +     * 
            + * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateMask_ = value; + } else { + updateMaskBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Optional. Indicates which fields in the provided
            +     * [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig] to
            +     * update.
            +     *
            +     * If an unsupported or unknown field is provided, an INVALID_ARGUMENT error
            +     * is returned.
            +     * 
            + * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForValue) { + if (updateMaskBuilder_ == null) { + updateMask_ = builderForValue.build(); + } else { + updateMaskBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Optional. Indicates which fields in the provided
            +     * [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig] to
            +     * update.
            +     *
            +     * If an unsupported or unknown field is provided, an INVALID_ARGUMENT error
            +     * is returned.
            +     * 
            + * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && updateMask_ != null + && updateMask_ != com.google.protobuf.FieldMask.getDefaultInstance()) { + getUpdateMaskBuilder().mergeFrom(value); + } else { + updateMask_ = value; + } + } else { + updateMaskBuilder_.mergeFrom(value); + } + if (updateMask_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** + * + * + *
            +     * Optional. Indicates which fields in the provided
            +     * [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig] to
            +     * update.
            +     *
            +     * If an unsupported or unknown field is provided, an INVALID_ARGUMENT error
            +     * is returned.
            +     * 
            + * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearUpdateMask() { + bitField0_ = (bitField0_ & ~0x00000002); + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
            +     * Optional. Indicates which fields in the provided
            +     * [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig] to
            +     * update.
            +     *
            +     * If an unsupported or unknown field is provided, an INVALID_ARGUMENT error
            +     * is returned.
            +     * 
            + * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return internalGetUpdateMaskFieldBuilder().getBuilder(); + } + + /** + * + * + *
            +     * Optional. Indicates which fields in the provided
            +     * [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig] to
            +     * update.
            +     *
            +     * If an unsupported or unknown field is provided, an INVALID_ARGUMENT error
            +     * is returned.
            +     * 
            + * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + if (updateMaskBuilder_ != null) { + return updateMaskBuilder_.getMessageOrBuilder(); + } else { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } + } + + /** + * + * + *
            +     * Optional. Indicates which fields in the provided
            +     * [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig] to
            +     * update.
            +     *
            +     * If an unsupported or unknown field is provided, an INVALID_ARGUMENT error
            +     * is returned.
            +     * 
            + * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + internalGetUpdateMaskFieldBuilder() { + if (updateMaskBuilder_ == null) { + updateMaskBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder>( + getUpdateMask(), getParentForChildren(), isClean()); + updateMask_ = null; + } + return updateMaskBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.UpdateLicenseConfigRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.UpdateLicenseConfigRequest) + private static final com.google.cloud.discoveryengine.v1beta.UpdateLicenseConfigRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.discoveryengine.v1beta.UpdateLicenseConfigRequest(); + } + + public static com.google.cloud.discoveryengine.v1beta.UpdateLicenseConfigRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateLicenseConfigRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.UpdateLicenseConfigRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/UpdateLicenseConfigRequestOrBuilder.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/UpdateLicenseConfigRequestOrBuilder.java new file mode 100644 index 000000000000..aafb595cea28 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/UpdateLicenseConfigRequestOrBuilder.java @@ -0,0 +1,132 @@ +/* + * 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/cloud/discoveryengine/v1beta/license_config_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.discoveryengine.v1beta; + +@com.google.protobuf.Generated +public interface UpdateLicenseConfigRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.UpdateLicenseConfigRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
            +   * Required. The
            +   * [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig] to
            +   * update.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.LicenseConfig license_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the licenseConfig field is set. + */ + boolean hasLicenseConfig(); + + /** + * + * + *
            +   * Required. The
            +   * [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig] to
            +   * update.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.LicenseConfig license_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The licenseConfig. + */ + com.google.cloud.discoveryengine.v1beta.LicenseConfig getLicenseConfig(); + + /** + * + * + *
            +   * Required. The
            +   * [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig] to
            +   * update.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.LicenseConfig license_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.discoveryengine.v1beta.LicenseConfigOrBuilder getLicenseConfigOrBuilder(); + + /** + * + * + *
            +   * Optional. Indicates which fields in the provided
            +   * [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig] to
            +   * update.
            +   *
            +   * If an unsupported or unknown field is provided, an INVALID_ARGUMENT error
            +   * is returned.
            +   * 
            + * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the updateMask field is set. + */ + boolean hasUpdateMask(); + + /** + * + * + *
            +   * Optional. Indicates which fields in the provided
            +   * [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig] to
            +   * update.
            +   *
            +   * If an unsupported or unknown field is provided, an INVALID_ARGUMENT error
            +   * is returned.
            +   * 
            + * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The updateMask. + */ + com.google.protobuf.FieldMask getUpdateMask(); + + /** + * + * + *
            +   * Optional. Indicates which fields in the provided
            +   * [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig] to
            +   * update.
            +   *
            +   * If an unsupported or unknown field is provided, an INVALID_ARGUMENT error
            +   * is returned.
            +   * 
            + * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/UpdateUserStoreRequest.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/UpdateUserStoreRequest.java new file mode 100644 index 000000000000..90c20ad97f8e --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/UpdateUserStoreRequest.java @@ -0,0 +1,1048 @@ +/* + * 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/cloud/discoveryengine/v1beta/user_store_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.discoveryengine.v1beta; + +/** + * + * + *
            + * Request message for
            + * [UserStoreService.UpdateUserStore][google.cloud.discoveryengine.v1beta.UserStoreService.UpdateUserStore]
            + * method.
            + * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.UpdateUserStoreRequest} + */ +@com.google.protobuf.Generated +public final class UpdateUserStoreRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.UpdateUserStoreRequest) + UpdateUserStoreRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "UpdateUserStoreRequest"); + } + + // Use UpdateUserStoreRequest.newBuilder() to construct. + private UpdateUserStoreRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private UpdateUserStoreRequest() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.UserStoreServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_UpdateUserStoreRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.UserStoreServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_UpdateUserStoreRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.UpdateUserStoreRequest.class, + com.google.cloud.discoveryengine.v1beta.UpdateUserStoreRequest.Builder.class); + } + + private int bitField0_; + public static final int USER_STORE_FIELD_NUMBER = 1; + private com.google.cloud.discoveryengine.v1beta.UserStore userStore_; + + /** + * + * + *
            +   * Required. The User Store to update.
            +   * Format:
            +   * `projects/{project}/locations/{location}/userStores/{user_store_id}`
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.UserStore user_store = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the userStore field is set. + */ + @java.lang.Override + public boolean hasUserStore() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
            +   * Required. The User Store to update.
            +   * Format:
            +   * `projects/{project}/locations/{location}/userStores/{user_store_id}`
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.UserStore user_store = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The userStore. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.UserStore getUserStore() { + return userStore_ == null + ? com.google.cloud.discoveryengine.v1beta.UserStore.getDefaultInstance() + : userStore_; + } + + /** + * + * + *
            +   * Required. The User Store to update.
            +   * Format:
            +   * `projects/{project}/locations/{location}/userStores/{user_store_id}`
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.UserStore user_store = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.UserStoreOrBuilder getUserStoreOrBuilder() { + return userStore_ == null + ? com.google.cloud.discoveryengine.v1beta.UserStore.getDefaultInstance() + : userStore_; + } + + public static final int UPDATE_MASK_FIELD_NUMBER = 2; + private com.google.protobuf.FieldMask updateMask_; + + /** + * + * + *
            +   * Optional. The list of fields to update.
            +   * 
            + * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the updateMask field is set. + */ + @java.lang.Override + public boolean hasUpdateMask() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
            +   * Optional. The list of fields to update.
            +   * 
            + * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The updateMask. + */ + @java.lang.Override + public com.google.protobuf.FieldMask getUpdateMask() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + + /** + * + * + *
            +   * Optional. The list of fields to update.
            +   * 
            + * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + + 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, getUserStore()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(2, getUpdateMask()); + } + 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, getUserStore()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getUpdateMask()); + } + 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.discoveryengine.v1beta.UpdateUserStoreRequest)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1beta.UpdateUserStoreRequest other = + (com.google.cloud.discoveryengine.v1beta.UpdateUserStoreRequest) obj; + + if (hasUserStore() != other.hasUserStore()) return false; + if (hasUserStore()) { + if (!getUserStore().equals(other.getUserStore())) return false; + } + if (hasUpdateMask() != other.hasUpdateMask()) return false; + if (hasUpdateMask()) { + if (!getUpdateMask().equals(other.getUpdateMask())) 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 (hasUserStore()) { + hash = (37 * hash) + USER_STORE_FIELD_NUMBER; + hash = (53 * hash) + getUserStore().hashCode(); + } + if (hasUpdateMask()) { + hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; + hash = (53 * hash) + getUpdateMask().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1beta.UpdateUserStoreRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.UpdateUserStoreRequest 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.discoveryengine.v1beta.UpdateUserStoreRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.UpdateUserStoreRequest 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.discoveryengine.v1beta.UpdateUserStoreRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.UpdateUserStoreRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1beta.UpdateUserStoreRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.UpdateUserStoreRequest 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.discoveryengine.v1beta.UpdateUserStoreRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.UpdateUserStoreRequest 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.discoveryengine.v1beta.UpdateUserStoreRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.UpdateUserStoreRequest 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.discoveryengine.v1beta.UpdateUserStoreRequest 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
            +   * [UserStoreService.UpdateUserStore][google.cloud.discoveryengine.v1beta.UserStoreService.UpdateUserStore]
            +   * method.
            +   * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.UpdateUserStoreRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.UpdateUserStoreRequest) + com.google.cloud.discoveryengine.v1beta.UpdateUserStoreRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.UserStoreServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_UpdateUserStoreRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.UserStoreServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_UpdateUserStoreRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.UpdateUserStoreRequest.class, + com.google.cloud.discoveryengine.v1beta.UpdateUserStoreRequest.Builder.class); + } + + // Construct using com.google.cloud.discoveryengine.v1beta.UpdateUserStoreRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetUserStoreFieldBuilder(); + internalGetUpdateMaskFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + userStore_ = null; + if (userStoreBuilder_ != null) { + userStoreBuilder_.dispose(); + userStoreBuilder_ = null; + } + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1beta.UserStoreServiceProto + .internal_static_google_cloud_discoveryengine_v1beta_UpdateUserStoreRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.UpdateUserStoreRequest + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1beta.UpdateUserStoreRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.UpdateUserStoreRequest build() { + com.google.cloud.discoveryengine.v1beta.UpdateUserStoreRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.UpdateUserStoreRequest buildPartial() { + com.google.cloud.discoveryengine.v1beta.UpdateUserStoreRequest result = + new com.google.cloud.discoveryengine.v1beta.UpdateUserStoreRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.discoveryengine.v1beta.UpdateUserStoreRequest result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.userStore_ = userStoreBuilder_ == null ? userStore_ : userStoreBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.updateMask_ = updateMaskBuilder_ == null ? updateMask_ : updateMaskBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.discoveryengine.v1beta.UpdateUserStoreRequest) { + return mergeFrom((com.google.cloud.discoveryengine.v1beta.UpdateUserStoreRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.discoveryengine.v1beta.UpdateUserStoreRequest other) { + if (other + == com.google.cloud.discoveryengine.v1beta.UpdateUserStoreRequest.getDefaultInstance()) + return this; + if (other.hasUserStore()) { + mergeUserStore(other.getUserStore()); + } + if (other.hasUpdateMask()) { + mergeUpdateMask(other.getUpdateMask()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage( + internalGetUserStoreFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage( + internalGetUpdateMaskFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.cloud.discoveryengine.v1beta.UserStore userStore_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.UserStore, + com.google.cloud.discoveryengine.v1beta.UserStore.Builder, + com.google.cloud.discoveryengine.v1beta.UserStoreOrBuilder> + userStoreBuilder_; + + /** + * + * + *
            +     * Required. The User Store to update.
            +     * Format:
            +     * `projects/{project}/locations/{location}/userStores/{user_store_id}`
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.UserStore user_store = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the userStore field is set. + */ + public boolean hasUserStore() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
            +     * Required. The User Store to update.
            +     * Format:
            +     * `projects/{project}/locations/{location}/userStores/{user_store_id}`
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.UserStore user_store = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The userStore. + */ + public com.google.cloud.discoveryengine.v1beta.UserStore getUserStore() { + if (userStoreBuilder_ == null) { + return userStore_ == null + ? com.google.cloud.discoveryengine.v1beta.UserStore.getDefaultInstance() + : userStore_; + } else { + return userStoreBuilder_.getMessage(); + } + } + + /** + * + * + *
            +     * Required. The User Store to update.
            +     * Format:
            +     * `projects/{project}/locations/{location}/userStores/{user_store_id}`
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.UserStore user_store = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setUserStore(com.google.cloud.discoveryengine.v1beta.UserStore value) { + if (userStoreBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + userStore_ = value; + } else { + userStoreBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Required. The User Store to update.
            +     * Format:
            +     * `projects/{project}/locations/{location}/userStores/{user_store_id}`
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.UserStore user_store = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setUserStore( + com.google.cloud.discoveryengine.v1beta.UserStore.Builder builderForValue) { + if (userStoreBuilder_ == null) { + userStore_ = builderForValue.build(); + } else { + userStoreBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Required. The User Store to update.
            +     * Format:
            +     * `projects/{project}/locations/{location}/userStores/{user_store_id}`
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.UserStore user_store = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeUserStore(com.google.cloud.discoveryengine.v1beta.UserStore value) { + if (userStoreBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && userStore_ != null + && userStore_ + != com.google.cloud.discoveryengine.v1beta.UserStore.getDefaultInstance()) { + getUserStoreBuilder().mergeFrom(value); + } else { + userStore_ = value; + } + } else { + userStoreBuilder_.mergeFrom(value); + } + if (userStore_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + + /** + * + * + *
            +     * Required. The User Store to update.
            +     * Format:
            +     * `projects/{project}/locations/{location}/userStores/{user_store_id}`
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.UserStore user_store = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearUserStore() { + bitField0_ = (bitField0_ & ~0x00000001); + userStore_ = null; + if (userStoreBuilder_ != null) { + userStoreBuilder_.dispose(); + userStoreBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
            +     * Required. The User Store to update.
            +     * Format:
            +     * `projects/{project}/locations/{location}/userStores/{user_store_id}`
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.UserStore user_store = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.discoveryengine.v1beta.UserStore.Builder getUserStoreBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return internalGetUserStoreFieldBuilder().getBuilder(); + } + + /** + * + * + *
            +     * Required. The User Store to update.
            +     * Format:
            +     * `projects/{project}/locations/{location}/userStores/{user_store_id}`
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.UserStore user_store = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.discoveryengine.v1beta.UserStoreOrBuilder getUserStoreOrBuilder() { + if (userStoreBuilder_ != null) { + return userStoreBuilder_.getMessageOrBuilder(); + } else { + return userStore_ == null + ? com.google.cloud.discoveryengine.v1beta.UserStore.getDefaultInstance() + : userStore_; + } + } + + /** + * + * + *
            +     * Required. The User Store to update.
            +     * Format:
            +     * `projects/{project}/locations/{location}/userStores/{user_store_id}`
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.UserStore user_store = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.UserStore, + com.google.cloud.discoveryengine.v1beta.UserStore.Builder, + com.google.cloud.discoveryengine.v1beta.UserStoreOrBuilder> + internalGetUserStoreFieldBuilder() { + if (userStoreBuilder_ == null) { + userStoreBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.UserStore, + com.google.cloud.discoveryengine.v1beta.UserStore.Builder, + com.google.cloud.discoveryengine.v1beta.UserStoreOrBuilder>( + getUserStore(), getParentForChildren(), isClean()); + userStore_ = null; + } + return userStoreBuilder_; + } + + private com.google.protobuf.FieldMask updateMask_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + updateMaskBuilder_; + + /** + * + * + *
            +     * Optional. The list of fields to update.
            +     * 
            + * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the updateMask field is set. + */ + public boolean hasUpdateMask() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
            +     * Optional. The list of fields to update.
            +     * 
            + * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The updateMask. + */ + public com.google.protobuf.FieldMask getUpdateMask() { + if (updateMaskBuilder_ == null) { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } else { + return updateMaskBuilder_.getMessage(); + } + } + + /** + * + * + *
            +     * Optional. The list of fields to update.
            +     * 
            + * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateMask_ = value; + } else { + updateMaskBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Optional. The list of fields to update.
            +     * 
            + * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForValue) { + if (updateMaskBuilder_ == null) { + updateMask_ = builderForValue.build(); + } else { + updateMaskBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Optional. The list of fields to update.
            +     * 
            + * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && updateMask_ != null + && updateMask_ != com.google.protobuf.FieldMask.getDefaultInstance()) { + getUpdateMaskBuilder().mergeFrom(value); + } else { + updateMask_ = value; + } + } else { + updateMaskBuilder_.mergeFrom(value); + } + if (updateMask_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** + * + * + *
            +     * Optional. The list of fields to update.
            +     * 
            + * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearUpdateMask() { + bitField0_ = (bitField0_ & ~0x00000002); + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
            +     * Optional. The list of fields to update.
            +     * 
            + * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return internalGetUpdateMaskFieldBuilder().getBuilder(); + } + + /** + * + * + *
            +     * Optional. The list of fields to update.
            +     * 
            + * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + if (updateMaskBuilder_ != null) { + return updateMaskBuilder_.getMessageOrBuilder(); + } else { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } + } + + /** + * + * + *
            +     * Optional. The list of fields to update.
            +     * 
            + * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + internalGetUpdateMaskFieldBuilder() { + if (updateMaskBuilder_ == null) { + updateMaskBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder>( + getUpdateMask(), getParentForChildren(), isClean()); + updateMask_ = null; + } + return updateMaskBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.UpdateUserStoreRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.UpdateUserStoreRequest) + private static final com.google.cloud.discoveryengine.v1beta.UpdateUserStoreRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.discoveryengine.v1beta.UpdateUserStoreRequest(); + } + + public static com.google.cloud.discoveryengine.v1beta.UpdateUserStoreRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateUserStoreRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.UpdateUserStoreRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/UpdateUserStoreRequestOrBuilder.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/UpdateUserStoreRequestOrBuilder.java new file mode 100644 index 000000000000..067284be9d6f --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/UpdateUserStoreRequestOrBuilder.java @@ -0,0 +1,117 @@ +/* + * 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/cloud/discoveryengine/v1beta/user_store_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.discoveryengine.v1beta; + +@com.google.protobuf.Generated +public interface UpdateUserStoreRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.UpdateUserStoreRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
            +   * Required. The User Store to update.
            +   * Format:
            +   * `projects/{project}/locations/{location}/userStores/{user_store_id}`
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.UserStore user_store = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the userStore field is set. + */ + boolean hasUserStore(); + + /** + * + * + *
            +   * Required. The User Store to update.
            +   * Format:
            +   * `projects/{project}/locations/{location}/userStores/{user_store_id}`
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.UserStore user_store = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The userStore. + */ + com.google.cloud.discoveryengine.v1beta.UserStore getUserStore(); + + /** + * + * + *
            +   * Required. The User Store to update.
            +   * Format:
            +   * `projects/{project}/locations/{location}/userStores/{user_store_id}`
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.UserStore user_store = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.discoveryengine.v1beta.UserStoreOrBuilder getUserStoreOrBuilder(); + + /** + * + * + *
            +   * Optional. The list of fields to update.
            +   * 
            + * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the updateMask field is set. + */ + boolean hasUpdateMask(); + + /** + * + * + *
            +   * Optional. The list of fields to update.
            +   * 
            + * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The updateMask. + */ + com.google.protobuf.FieldMask getUpdateMask(); + + /** + * + * + *
            +   * Optional. The list of fields to update.
            +   * 
            + * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/UserEvent.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/UserEvent.java index 39d1ec6dd03d..2d9a1a0a8cf2 100644 --- a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/UserEvent.java +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/UserEvent.java @@ -54,6 +54,7 @@ private UserEvent(com.google.protobuf.GeneratedMessage.Builder builder) { private UserEvent() { eventType_ = ""; + conversionType_ = ""; userPseudoId_ = ""; engine_ = ""; dataStore_ = ""; @@ -64,6 +65,7 @@ private UserEvent() { tagIds_ = com.google.protobuf.LazyStringArrayList.emptyList(); promotionIds_ = com.google.protobuf.LazyStringArrayList.emptyList(); panels_ = java.util.Collections.emptyList(); + entity_ = ""; } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @@ -112,7 +114,6 @@ protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldRefl * * `view-item-list`: View of a panel or ordered list of Documents. * * `view-home-page`: View of the home page. * * `view-category-page`: View of a category page, e.g. Home > Men > Jeans - * * `add-feedback`: Add a user feedback. * * Retail-related values: * @@ -123,6 +124,10 @@ protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldRefl * * * `media-play`: Start/resume watching a video, playing a song, etc. * * `media-complete`: Finished or stopped midway through a video, song, etc. + * + * Custom conversion value: + * + * * `conversion`: Customer defined conversion event. *
            * * string event_type = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -155,7 +160,6 @@ public java.lang.String getEventType() { * * `view-item-list`: View of a panel or ordered list of Documents. * * `view-home-page`: View of the home page. * * `view-category-page`: View of a category page, e.g. Home > Men > Jeans - * * `add-feedback`: Add a user feedback. * * Retail-related values: * @@ -166,6 +170,10 @@ public java.lang.String getEventType() { * * * `media-play`: Start/resume watching a video, playing a song, etc. * * `media-complete`: Finished or stopped midway through a video, song, etc. + * + * Custom conversion value: + * + * * `conversion`: Customer defined conversion event. *
            * * string event_type = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -185,6 +193,79 @@ public com.google.protobuf.ByteString getEventTypeBytes() { } } + public static final int CONVERSION_TYPE_FIELD_NUMBER = 21; + + @SuppressWarnings("serial") + private volatile java.lang.Object conversionType_ = ""; + + /** + * + * + *
            +   * Optional. Conversion type.
            +   *
            +   * Required if
            +   * [UserEvent.event_type][google.cloud.discoveryengine.v1beta.UserEvent.event_type]
            +   * is `conversion`. This is a customer-defined conversion name in lowercase
            +   * letters or numbers separated by "-", such as "watch", "good-visit" etc.
            +   *
            +   * Do not set the field if
            +   * [UserEvent.event_type][google.cloud.discoveryengine.v1beta.UserEvent.event_type]
            +   * is not `conversion`. This mixes the custom conversion event with predefined
            +   * events like `search`, `view-item` etc.
            +   * 
            + * + * string conversion_type = 21 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The conversionType. + */ + @java.lang.Override + public java.lang.String getConversionType() { + java.lang.Object ref = conversionType_; + 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(); + conversionType_ = s; + return s; + } + } + + /** + * + * + *
            +   * Optional. Conversion type.
            +   *
            +   * Required if
            +   * [UserEvent.event_type][google.cloud.discoveryengine.v1beta.UserEvent.event_type]
            +   * is `conversion`. This is a customer-defined conversion name in lowercase
            +   * letters or numbers separated by "-", such as "watch", "good-visit" etc.
            +   *
            +   * Do not set the field if
            +   * [UserEvent.event_type][google.cloud.discoveryengine.v1beta.UserEvent.event_type]
            +   * is not `conversion`. This mixes the custom conversion event with predefined
            +   * events like `search`, `view-item` etc.
            +   * 
            + * + * string conversion_type = 21 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for conversionType. + */ + @java.lang.Override + public com.google.protobuf.ByteString getConversionTypeBytes() { + java.lang.Object ref = conversionType_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + conversionType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + public static final int USER_PSEUDO_ID_FIELD_NUMBER = 2; @SuppressWarnings("serial") @@ -776,8 +857,9 @@ public com.google.protobuf.ByteString getAttributionTokenBytes() { * * *
            -   * The filter syntax consists of an expression language for constructing a
            -   * predicate from one or more fields of the documents being filtered.
            +   * Optional. The filter syntax consists of an expression language for
            +   * constructing a predicate from one or more fields of the documents being
            +   * filtered.
                *
                * One example is for `search` events, the associated
                * [SearchRequest][google.cloud.discoveryengine.v1beta.SearchRequest] may
            @@ -795,7 +877,7 @@ public com.google.protobuf.ByteString getAttributionTokenBytes() {
                * characters. Otherwise, an `INVALID_ARGUMENT` error is returned.
                * 
            * - * string filter = 9; + * string filter = 9 [(.google.api.field_behavior) = OPTIONAL]; * * @return The filter. */ @@ -816,8 +898,9 @@ public java.lang.String getFilter() { * * *
            -   * The filter syntax consists of an expression language for constructing a
            -   * predicate from one or more fields of the documents being filtered.
            +   * Optional. The filter syntax consists of an expression language for
            +   * constructing a predicate from one or more fields of the documents being
            +   * filtered.
                *
                * One example is for `search` events, the associated
                * [SearchRequest][google.cloud.discoveryengine.v1beta.SearchRequest] may
            @@ -835,7 +918,7 @@ public java.lang.String getFilter() {
                * characters. Otherwise, an `INVALID_ARGUMENT` error is returned.
                * 
            * - * string filter = 9; + * string filter = 9 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for filter. */ @@ -1767,6 +1850,126 @@ public com.google.cloud.discoveryengine.v1beta.PanelInfoOrBuilder getPanelsOrBui return panels_.get(index); } + public static final int FEEDBACK_FIELD_NUMBER = 23; + private com.google.cloud.discoveryengine.v1beta.Feedback feedback_; + + /** + * + * + *
            +   * Optional. This field is optional except for the `add-feedback` event types.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Feedback feedback = 23 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the feedback field is set. + */ + @java.lang.Override + public boolean hasFeedback() { + return ((bitField0_ & 0x00000100) != 0); + } + + /** + * + * + *
            +   * Optional. This field is optional except for the `add-feedback` event types.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Feedback feedback = 23 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The feedback. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.Feedback getFeedback() { + return feedback_ == null + ? com.google.cloud.discoveryengine.v1beta.Feedback.getDefaultInstance() + : feedback_; + } + + /** + * + * + *
            +   * Optional. This field is optional except for the `add-feedback` event types.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Feedback feedback = 23 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.FeedbackOrBuilder getFeedbackOrBuilder() { + return feedback_ == null + ? com.google.cloud.discoveryengine.v1beta.Feedback.getDefaultInstance() + : feedback_; + } + + public static final int ENTITY_FIELD_NUMBER = 25; + + @SuppressWarnings("serial") + private volatile java.lang.Object entity_ = ""; + + /** + * + * + *
            +   * Optional. Represents the entity for customers that may run multiple
            +   * different entities, domains, sites or regions, for example, `Google US`,
            +   * `Google Ads`, `Waymo`, `google.com`, `youtube.com`, etc. We recommend that
            +   * you set `entity` to get better per-entity search, completion, and
            +   * prediction results.
            +   * 
            + * + * string entity = 25 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The entity. + */ + @java.lang.Override + public java.lang.String getEntity() { + java.lang.Object ref = entity_; + 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(); + entity_ = s; + return s; + } + } + + /** + * + * + *
            +   * Optional. Represents the entity for customers that may run multiple
            +   * different entities, domains, sites or regions, for example, `Google US`,
            +   * `Google Ads`, `Waymo`, `google.com`, `youtube.com`, etc. We recommend that
            +   * you set `entity` to get better per-entity search, completion, and
            +   * prediction results.
            +   * 
            + * + * string entity = 25 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for entity. + */ + @java.lang.Override + public com.google.protobuf.ByteString getEntityBytes() { + java.lang.Object ref = entity_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + entity_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -1840,9 +2043,18 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessage.isStringEmpty(dataStore_)) { com.google.protobuf.GeneratedMessage.writeString(output, 20, dataStore_); } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(conversionType_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 21, conversionType_); + } for (int i = 0; i < panels_.size(); i++) { output.writeMessage(22, panels_.get(i)); } + if (((bitField0_ & 0x00000100) != 0)) { + output.writeMessage(23, getFeedback()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(entity_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 25, entity_); + } getUnknownFields().writeTo(output); } @@ -1932,9 +2144,18 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessage.isStringEmpty(dataStore_)) { size += com.google.protobuf.GeneratedMessage.computeStringSize(20, dataStore_); } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(conversionType_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(21, conversionType_); + } for (int i = 0; i < panels_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(22, panels_.get(i)); } + if (((bitField0_ & 0x00000100) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(23, getFeedback()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(entity_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(25, entity_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -1952,6 +2173,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.discoveryengine.v1beta.UserEvent) obj; if (!getEventType().equals(other.getEventType())) return false; + if (!getConversionType().equals(other.getConversionType())) return false; if (!getUserPseudoId().equals(other.getUserPseudoId())) return false; if (!getEngine().equals(other.getEngine())) return false; if (!getDataStore().equals(other.getDataStore())) return false; @@ -1996,6 +2218,11 @@ public boolean equals(final java.lang.Object obj) { if (!getMediaInfo().equals(other.getMediaInfo())) return false; } if (!getPanelsList().equals(other.getPanelsList())) return false; + if (hasFeedback() != other.hasFeedback()) return false; + if (hasFeedback()) { + if (!getFeedback().equals(other.getFeedback())) return false; + } + if (!getEntity().equals(other.getEntity())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -2009,6 +2236,8 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + EVENT_TYPE_FIELD_NUMBER; hash = (53 * hash) + getEventType().hashCode(); + hash = (37 * hash) + CONVERSION_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getConversionType().hashCode(); hash = (37 * hash) + USER_PSEUDO_ID_FIELD_NUMBER; hash = (53 * hash) + getUserPseudoId().hashCode(); hash = (37 * hash) + ENGINE_FIELD_NUMBER; @@ -2075,6 +2304,12 @@ public int hashCode() { hash = (37 * hash) + PANELS_FIELD_NUMBER; hash = (53 * hash) + getPanelsList().hashCode(); } + if (hasFeedback()) { + hash = (37 * hash) + FEEDBACK_FIELD_NUMBER; + hash = (53 * hash) + getFeedback().hashCode(); + } + hash = (37 * hash) + ENTITY_FIELD_NUMBER; + hash = (53 * hash) + getEntity().hashCode(); hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -2249,6 +2484,7 @@ private void maybeForceBuilderInitialization() { internalGetTransactionInfoFieldBuilder(); internalGetMediaInfoFieldBuilder(); internalGetPanelsFieldBuilder(); + internalGetFeedbackFieldBuilder(); } } @@ -2257,6 +2493,7 @@ public Builder clear() { super.clear(); bitField0_ = 0; eventType_ = ""; + conversionType_ = ""; userPseudoId_ = ""; engine_ = ""; dataStore_ = ""; @@ -2285,7 +2522,7 @@ public Builder clear() { documents_ = null; documentsBuilder_.clear(); } - bitField0_ = (bitField0_ & ~0x00000800); + bitField0_ = (bitField0_ & ~0x00001000); panel_ = null; if (panelBuilder_ != null) { panelBuilder_.dispose(); @@ -2320,7 +2557,13 @@ public Builder clear() { panels_ = null; panelsBuilder_.clear(); } - bitField0_ = (bitField0_ & ~0x00100000); + bitField0_ = (bitField0_ & ~0x00200000); + feedback_ = null; + if (feedbackBuilder_ != null) { + feedbackBuilder_.dispose(); + feedbackBuilder_ = null; + } + entity_ = ""; return this; } @@ -2359,18 +2602,18 @@ public com.google.cloud.discoveryengine.v1beta.UserEvent buildPartial() { private void buildPartialRepeatedFields( com.google.cloud.discoveryengine.v1beta.UserEvent result) { if (documentsBuilder_ == null) { - if (((bitField0_ & 0x00000800) != 0)) { + if (((bitField0_ & 0x00001000) != 0)) { documents_ = java.util.Collections.unmodifiableList(documents_); - bitField0_ = (bitField0_ & ~0x00000800); + bitField0_ = (bitField0_ & ~0x00001000); } result.documents_ = documents_; } else { result.documents_ = documentsBuilder_.build(); } if (panelsBuilder_ == null) { - if (((bitField0_ & 0x00100000) != 0)) { + if (((bitField0_ & 0x00200000) != 0)) { panels_ = java.util.Collections.unmodifiableList(panels_); - bitField0_ = (bitField0_ & ~0x00100000); + bitField0_ = (bitField0_ & ~0x00200000); } result.panels_ = panels_; } else { @@ -2384,73 +2627,83 @@ private void buildPartial0(com.google.cloud.discoveryengine.v1beta.UserEvent res result.eventType_ = eventType_; } if (((from_bitField0_ & 0x00000002) != 0)) { - result.userPseudoId_ = userPseudoId_; + result.conversionType_ = conversionType_; } if (((from_bitField0_ & 0x00000004) != 0)) { - result.engine_ = engine_; + result.userPseudoId_ = userPseudoId_; } if (((from_bitField0_ & 0x00000008) != 0)) { + result.engine_ = engine_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { result.dataStore_ = dataStore_; } int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000010) != 0)) { + if (((from_bitField0_ & 0x00000020) != 0)) { result.eventTime_ = eventTimeBuilder_ == null ? eventTime_ : eventTimeBuilder_.build(); to_bitField0_ |= 0x00000001; } - if (((from_bitField0_ & 0x00000020) != 0)) { + if (((from_bitField0_ & 0x00000040) != 0)) { result.userInfo_ = userInfoBuilder_ == null ? userInfo_ : userInfoBuilder_.build(); to_bitField0_ |= 0x00000002; } - if (((from_bitField0_ & 0x00000040) != 0)) { + if (((from_bitField0_ & 0x00000080) != 0)) { result.directUserRequest_ = directUserRequest_; } - if (((from_bitField0_ & 0x00000080) != 0)) { + if (((from_bitField0_ & 0x00000100) != 0)) { result.sessionId_ = sessionId_; } - if (((from_bitField0_ & 0x00000100) != 0)) { + if (((from_bitField0_ & 0x00000200) != 0)) { result.pageInfo_ = pageInfoBuilder_ == null ? pageInfo_ : pageInfoBuilder_.build(); to_bitField0_ |= 0x00000004; } - if (((from_bitField0_ & 0x00000200) != 0)) { + if (((from_bitField0_ & 0x00000400) != 0)) { result.attributionToken_ = attributionToken_; } - if (((from_bitField0_ & 0x00000400) != 0)) { + if (((from_bitField0_ & 0x00000800) != 0)) { result.filter_ = filter_; } - if (((from_bitField0_ & 0x00001000) != 0)) { + if (((from_bitField0_ & 0x00002000) != 0)) { result.panel_ = panelBuilder_ == null ? panel_ : panelBuilder_.build(); to_bitField0_ |= 0x00000008; } - if (((from_bitField0_ & 0x00002000) != 0)) { + if (((from_bitField0_ & 0x00004000) != 0)) { result.searchInfo_ = searchInfoBuilder_ == null ? searchInfo_ : searchInfoBuilder_.build(); to_bitField0_ |= 0x00000010; } - if (((from_bitField0_ & 0x00004000) != 0)) { + if (((from_bitField0_ & 0x00008000) != 0)) { result.completionInfo_ = completionInfoBuilder_ == null ? completionInfo_ : completionInfoBuilder_.build(); to_bitField0_ |= 0x00000020; } - if (((from_bitField0_ & 0x00008000) != 0)) { + if (((from_bitField0_ & 0x00010000) != 0)) { result.transactionInfo_ = transactionInfoBuilder_ == null ? transactionInfo_ : transactionInfoBuilder_.build(); to_bitField0_ |= 0x00000040; } - if (((from_bitField0_ & 0x00010000) != 0)) { + if (((from_bitField0_ & 0x00020000) != 0)) { tagIds_.makeImmutable(); result.tagIds_ = tagIds_; } - if (((from_bitField0_ & 0x00020000) != 0)) { + if (((from_bitField0_ & 0x00040000) != 0)) { promotionIds_.makeImmutable(); result.promotionIds_ = promotionIds_; } - if (((from_bitField0_ & 0x00040000) != 0)) { + if (((from_bitField0_ & 0x00080000) != 0)) { result.attributes_ = internalGetAttributes().build(AttributesDefaultEntryHolder.defaultEntry); } - if (((from_bitField0_ & 0x00080000) != 0)) { + if (((from_bitField0_ & 0x00100000) != 0)) { result.mediaInfo_ = mediaInfoBuilder_ == null ? mediaInfo_ : mediaInfoBuilder_.build(); to_bitField0_ |= 0x00000080; } + if (((from_bitField0_ & 0x00400000) != 0)) { + result.feedback_ = feedbackBuilder_ == null ? feedback_ : feedbackBuilder_.build(); + to_bitField0_ |= 0x00000100; + } + if (((from_bitField0_ & 0x00800000) != 0)) { + result.entity_ = entity_; + } result.bitField0_ |= to_bitField0_; } @@ -2472,19 +2725,24 @@ public Builder mergeFrom(com.google.cloud.discoveryengine.v1beta.UserEvent other bitField0_ |= 0x00000001; onChanged(); } + if (!other.getConversionType().isEmpty()) { + conversionType_ = other.conversionType_; + bitField0_ |= 0x00000002; + onChanged(); + } if (!other.getUserPseudoId().isEmpty()) { userPseudoId_ = other.userPseudoId_; - bitField0_ |= 0x00000002; + bitField0_ |= 0x00000004; onChanged(); } if (!other.getEngine().isEmpty()) { engine_ = other.engine_; - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000008; onChanged(); } if (!other.getDataStore().isEmpty()) { dataStore_ = other.dataStore_; - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000010; onChanged(); } if (other.hasEventTime()) { @@ -2498,7 +2756,7 @@ public Builder mergeFrom(com.google.cloud.discoveryengine.v1beta.UserEvent other } if (!other.getSessionId().isEmpty()) { sessionId_ = other.sessionId_; - bitField0_ |= 0x00000080; + bitField0_ |= 0x00000100; onChanged(); } if (other.hasPageInfo()) { @@ -2506,19 +2764,19 @@ public Builder mergeFrom(com.google.cloud.discoveryengine.v1beta.UserEvent other } if (!other.getAttributionToken().isEmpty()) { attributionToken_ = other.attributionToken_; - bitField0_ |= 0x00000200; + bitField0_ |= 0x00000400; onChanged(); } if (!other.getFilter().isEmpty()) { filter_ = other.filter_; - bitField0_ |= 0x00000400; + bitField0_ |= 0x00000800; onChanged(); } if (documentsBuilder_ == null) { if (!other.documents_.isEmpty()) { if (documents_.isEmpty()) { documents_ = other.documents_; - bitField0_ = (bitField0_ & ~0x00000800); + bitField0_ = (bitField0_ & ~0x00001000); } else { ensureDocumentsIsMutable(); documents_.addAll(other.documents_); @@ -2531,7 +2789,7 @@ public Builder mergeFrom(com.google.cloud.discoveryengine.v1beta.UserEvent other documentsBuilder_.dispose(); documentsBuilder_ = null; documents_ = other.documents_; - bitField0_ = (bitField0_ & ~0x00000800); + bitField0_ = (bitField0_ & ~0x00001000); documentsBuilder_ = com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? internalGetDocumentsFieldBuilder() @@ -2556,7 +2814,7 @@ public Builder mergeFrom(com.google.cloud.discoveryengine.v1beta.UserEvent other if (!other.tagIds_.isEmpty()) { if (tagIds_.isEmpty()) { tagIds_ = other.tagIds_; - bitField0_ |= 0x00010000; + bitField0_ |= 0x00020000; } else { ensureTagIdsIsMutable(); tagIds_.addAll(other.tagIds_); @@ -2566,7 +2824,7 @@ public Builder mergeFrom(com.google.cloud.discoveryengine.v1beta.UserEvent other if (!other.promotionIds_.isEmpty()) { if (promotionIds_.isEmpty()) { promotionIds_ = other.promotionIds_; - bitField0_ |= 0x00020000; + bitField0_ |= 0x00040000; } else { ensurePromotionIdsIsMutable(); promotionIds_.addAll(other.promotionIds_); @@ -2574,7 +2832,7 @@ public Builder mergeFrom(com.google.cloud.discoveryengine.v1beta.UserEvent other onChanged(); } internalGetMutableAttributes().mergeFrom(other.internalGetAttributes()); - bitField0_ |= 0x00040000; + bitField0_ |= 0x00080000; if (other.hasMediaInfo()) { mergeMediaInfo(other.getMediaInfo()); } @@ -2582,7 +2840,7 @@ public Builder mergeFrom(com.google.cloud.discoveryengine.v1beta.UserEvent other if (!other.panels_.isEmpty()) { if (panels_.isEmpty()) { panels_ = other.panels_; - bitField0_ = (bitField0_ & ~0x00100000); + bitField0_ = (bitField0_ & ~0x00200000); } else { ensurePanelsIsMutable(); panels_.addAll(other.panels_); @@ -2595,7 +2853,7 @@ public Builder mergeFrom(com.google.cloud.discoveryengine.v1beta.UserEvent other panelsBuilder_.dispose(); panelsBuilder_ = null; panels_ = other.panels_; - bitField0_ = (bitField0_ & ~0x00100000); + bitField0_ = (bitField0_ & ~0x00200000); panelsBuilder_ = com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? internalGetPanelsFieldBuilder() @@ -2605,6 +2863,14 @@ public Builder mergeFrom(com.google.cloud.discoveryengine.v1beta.UserEvent other } } } + if (other.hasFeedback()) { + mergeFeedback(other.getFeedback()); + } + if (!other.getEntity().isEmpty()) { + entity_ = other.entity_; + bitField0_ |= 0x00800000; + onChanged(); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -2640,52 +2906,52 @@ public Builder mergeFrom( case 18: { userPseudoId_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; + bitField0_ |= 0x00000004; break; } // case 18 case 26: { input.readMessage( internalGetEventTimeFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000010; + bitField0_ |= 0x00000020; break; } // case 26 case 34: { input.readMessage( internalGetUserInfoFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000020; + bitField0_ |= 0x00000040; break; } // case 34 case 40: { directUserRequest_ = input.readBool(); - bitField0_ |= 0x00000040; + bitField0_ |= 0x00000080; break; } // case 40 case 50: { sessionId_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000080; + bitField0_ |= 0x00000100; break; } // case 50 case 58: { input.readMessage( internalGetPageInfoFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000100; + bitField0_ |= 0x00000200; break; } // case 58 case 66: { attributionToken_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000200; + bitField0_ |= 0x00000400; break; } // case 66 case 74: { filter_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000400; + bitField0_ |= 0x00000800; break; } // case 74 case 82: @@ -2705,28 +2971,28 @@ public Builder mergeFrom( case 90: { input.readMessage(internalGetPanelFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00001000; + bitField0_ |= 0x00002000; break; } // case 90 case 98: { input.readMessage( internalGetSearchInfoFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00002000; + bitField0_ |= 0x00004000; break; } // case 98 case 106: { input.readMessage( internalGetCompletionInfoFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00004000; + bitField0_ |= 0x00008000; break; } // case 106 case 114: { input.readMessage( internalGetTransactionInfoFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00008000; + bitField0_ |= 0x00010000; break; } // case 114 case 122: @@ -2754,28 +3020,34 @@ public Builder mergeFrom( internalGetMutableAttributes() .ensureBuilderMap() .put(attributes__.getKey(), attributes__.getValue()); - bitField0_ |= 0x00040000; + bitField0_ |= 0x00080000; break; } // case 138 case 146: { input.readMessage( internalGetMediaInfoFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00080000; + bitField0_ |= 0x00100000; break; } // case 146 case 154: { engine_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000008; break; } // case 154 case 162: { dataStore_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000010; break; } // case 162 + case 170: + { + conversionType_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 170 case 178: { com.google.cloud.discoveryengine.v1beta.PanelInfo m = @@ -2790,6 +3062,19 @@ public Builder mergeFrom( } break; } // case 178 + case 186: + { + input.readMessage( + internalGetFeedbackFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00400000; + break; + } // case 186 + case 202: + { + entity_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00800000; + break; + } // case 202 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -2824,7 +3109,6 @@ public Builder mergeFrom( * * `view-item-list`: View of a panel or ordered list of Documents. * * `view-home-page`: View of the home page. * * `view-category-page`: View of a category page, e.g. Home > Men > Jeans - * * `add-feedback`: Add a user feedback. * * Retail-related values: * @@ -2835,6 +3119,10 @@ public Builder mergeFrom( * * * `media-play`: Start/resume watching a video, playing a song, etc. * * `media-complete`: Finished or stopped midway through a video, song, etc. + * + * Custom conversion value: + * + * * `conversion`: Customer defined conversion event. *
            * * string event_type = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -2866,7 +3154,6 @@ public java.lang.String getEventType() { * * `view-item-list`: View of a panel or ordered list of Documents. * * `view-home-page`: View of the home page. * * `view-category-page`: View of a category page, e.g. Home > Men > Jeans - * * `add-feedback`: Add a user feedback. * * Retail-related values: * @@ -2877,6 +3164,10 @@ public java.lang.String getEventType() { * * * `media-play`: Start/resume watching a video, playing a song, etc. * * `media-complete`: Finished or stopped midway through a video, song, etc. + * + * Custom conversion value: + * + * * `conversion`: Customer defined conversion event. *
            * * string event_type = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -2908,7 +3199,6 @@ public com.google.protobuf.ByteString getEventTypeBytes() { * * `view-item-list`: View of a panel or ordered list of Documents. * * `view-home-page`: View of the home page. * * `view-category-page`: View of a category page, e.g. Home > Men > Jeans - * * `add-feedback`: Add a user feedback. * * Retail-related values: * @@ -2919,6 +3209,10 @@ public com.google.protobuf.ByteString getEventTypeBytes() { * * * `media-play`: Start/resume watching a video, playing a song, etc. * * `media-complete`: Finished or stopped midway through a video, song, etc. + * + * Custom conversion value: + * + * * `conversion`: Customer defined conversion event. *
            * * string event_type = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -2949,7 +3243,6 @@ public Builder setEventType(java.lang.String value) { * * `view-item-list`: View of a panel or ordered list of Documents. * * `view-home-page`: View of the home page. * * `view-category-page`: View of a category page, e.g. Home > Men > Jeans - * * `add-feedback`: Add a user feedback. * * Retail-related values: * @@ -2960,6 +3253,10 @@ public Builder setEventType(java.lang.String value) { * * * `media-play`: Start/resume watching a video, playing a song, etc. * * `media-complete`: Finished or stopped midway through a video, song, etc. + * + * Custom conversion value: + * + * * `conversion`: Customer defined conversion event. *
            * * string event_type = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -2986,7 +3283,6 @@ public Builder clearEventType() { * * `view-item-list`: View of a panel or ordered list of Documents. * * `view-home-page`: View of the home page. * * `view-category-page`: View of a category page, e.g. Home > Men > Jeans - * * `add-feedback`: Add a user feedback. * * Retail-related values: * @@ -2997,6 +3293,10 @@ public Builder clearEventType() { * * * `media-play`: Start/resume watching a video, playing a song, etc. * * `media-complete`: Finished or stopped midway through a video, song, etc. + * + * Custom conversion value: + * + * * `conversion`: Customer defined conversion event. *
            * * string event_type = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -3015,34 +3315,195 @@ public Builder setEventTypeBytes(com.google.protobuf.ByteString value) { return this; } - private java.lang.Object userPseudoId_ = ""; + private java.lang.Object conversionType_ = ""; /** * * *
            -     * Required. A unique identifier for tracking visitors.
            +     * Optional. Conversion type.
                  *
            -     * For example, this could be implemented with an HTTP cookie, which should be
            -     * able to uniquely identify a visitor on a single device. This unique
            -     * identifier should not change if the visitor log in/out of the website.
            -     *
            -     * Do not set the field to the same fixed ID for different users. This mixes
            -     * the event history of those users together, which results in degraded model
            -     * quality.
            -     *
            -     * The field must be a UTF-8 encoded string with a length limit of 128
            -     * characters. Otherwise, an `INVALID_ARGUMENT` error is returned.
            +     * Required if
            +     * [UserEvent.event_type][google.cloud.discoveryengine.v1beta.UserEvent.event_type]
            +     * is `conversion`. This is a customer-defined conversion name in lowercase
            +     * letters or numbers separated by "-", such as "watch", "good-visit" etc.
                  *
            -     * The field should not contain PII or user-data. We recommend to use Google
            -     * Analytics [Client
            -     * ID](https://developers.google.com/analytics/devguides/collection/analyticsjs/field-reference#clientId)
            -     * for this field.
            +     * Do not set the field if
            +     * [UserEvent.event_type][google.cloud.discoveryengine.v1beta.UserEvent.event_type]
            +     * is not `conversion`. This mixes the custom conversion event with predefined
            +     * events like `search`, `view-item` etc.
                  * 
            * - * string user_pseudo_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * string conversion_type = 21 [(.google.api.field_behavior) = OPTIONAL]; * - * @return The userPseudoId. + * @return The conversionType. + */ + public java.lang.String getConversionType() { + java.lang.Object ref = conversionType_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + conversionType_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
            +     * Optional. Conversion type.
            +     *
            +     * Required if
            +     * [UserEvent.event_type][google.cloud.discoveryengine.v1beta.UserEvent.event_type]
            +     * is `conversion`. This is a customer-defined conversion name in lowercase
            +     * letters or numbers separated by "-", such as "watch", "good-visit" etc.
            +     *
            +     * Do not set the field if
            +     * [UserEvent.event_type][google.cloud.discoveryengine.v1beta.UserEvent.event_type]
            +     * is not `conversion`. This mixes the custom conversion event with predefined
            +     * events like `search`, `view-item` etc.
            +     * 
            + * + * string conversion_type = 21 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for conversionType. + */ + public com.google.protobuf.ByteString getConversionTypeBytes() { + java.lang.Object ref = conversionType_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + conversionType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
            +     * Optional. Conversion type.
            +     *
            +     * Required if
            +     * [UserEvent.event_type][google.cloud.discoveryengine.v1beta.UserEvent.event_type]
            +     * is `conversion`. This is a customer-defined conversion name in lowercase
            +     * letters or numbers separated by "-", such as "watch", "good-visit" etc.
            +     *
            +     * Do not set the field if
            +     * [UserEvent.event_type][google.cloud.discoveryengine.v1beta.UserEvent.event_type]
            +     * is not `conversion`. This mixes the custom conversion event with predefined
            +     * events like `search`, `view-item` etc.
            +     * 
            + * + * string conversion_type = 21 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The conversionType to set. + * @return This builder for chaining. + */ + public Builder setConversionType(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + conversionType_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Optional. Conversion type.
            +     *
            +     * Required if
            +     * [UserEvent.event_type][google.cloud.discoveryengine.v1beta.UserEvent.event_type]
            +     * is `conversion`. This is a customer-defined conversion name in lowercase
            +     * letters or numbers separated by "-", such as "watch", "good-visit" etc.
            +     *
            +     * Do not set the field if
            +     * [UserEvent.event_type][google.cloud.discoveryengine.v1beta.UserEvent.event_type]
            +     * is not `conversion`. This mixes the custom conversion event with predefined
            +     * events like `search`, `view-item` etc.
            +     * 
            + * + * string conversion_type = 21 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearConversionType() { + conversionType_ = getDefaultInstance().getConversionType(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
            +     * Optional. Conversion type.
            +     *
            +     * Required if
            +     * [UserEvent.event_type][google.cloud.discoveryengine.v1beta.UserEvent.event_type]
            +     * is `conversion`. This is a customer-defined conversion name in lowercase
            +     * letters or numbers separated by "-", such as "watch", "good-visit" etc.
            +     *
            +     * Do not set the field if
            +     * [UserEvent.event_type][google.cloud.discoveryengine.v1beta.UserEvent.event_type]
            +     * is not `conversion`. This mixes the custom conversion event with predefined
            +     * events like `search`, `view-item` etc.
            +     * 
            + * + * string conversion_type = 21 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for conversionType to set. + * @return This builder for chaining. + */ + public Builder setConversionTypeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + conversionType_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object userPseudoId_ = ""; + + /** + * + * + *
            +     * Required. A unique identifier for tracking visitors.
            +     *
            +     * For example, this could be implemented with an HTTP cookie, which should be
            +     * able to uniquely identify a visitor on a single device. This unique
            +     * identifier should not change if the visitor log in/out of the website.
            +     *
            +     * Do not set the field to the same fixed ID for different users. This mixes
            +     * the event history of those users together, which results in degraded model
            +     * quality.
            +     *
            +     * The field must be a UTF-8 encoded string with a length limit of 128
            +     * characters. Otherwise, an `INVALID_ARGUMENT` error is returned.
            +     *
            +     * The field should not contain PII or user-data. We recommend to use Google
            +     * Analytics [Client
            +     * ID](https://developers.google.com/analytics/devguides/collection/analyticsjs/field-reference#clientId)
            +     * for this field.
            +     * 
            + * + * string user_pseudo_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The userPseudoId. */ public java.lang.String getUserPseudoId() { java.lang.Object ref = userPseudoId_; @@ -3128,7 +3589,7 @@ public Builder setUserPseudoId(java.lang.String value) { throw new NullPointerException(); } userPseudoId_ = value; - bitField0_ |= 0x00000002; + bitField0_ |= 0x00000004; onChanged(); return this; } @@ -3162,7 +3623,7 @@ public Builder setUserPseudoId(java.lang.String value) { */ public Builder clearUserPseudoId() { userPseudoId_ = getDefaultInstance().getUserPseudoId(); - bitField0_ = (bitField0_ & ~0x00000002); + bitField0_ = (bitField0_ & ~0x00000004); onChanged(); return this; } @@ -3201,7 +3662,7 @@ public Builder setUserPseudoIdBytes(com.google.protobuf.ByteString value) { } checkByteStringIsUtf8(value); userPseudoId_ = value; - bitField0_ |= 0x00000002; + bitField0_ |= 0x00000004; onChanged(); return this; } @@ -3289,7 +3750,7 @@ public Builder setEngine(java.lang.String value) { throw new NullPointerException(); } engine_ = value; - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000008; onChanged(); return this; } @@ -3313,7 +3774,7 @@ public Builder setEngine(java.lang.String value) { */ public Builder clearEngine() { engine_ = getDefaultInstance().getEngine(); - bitField0_ = (bitField0_ & ~0x00000004); + bitField0_ = (bitField0_ & ~0x00000008); onChanged(); return this; } @@ -3342,7 +3803,7 @@ public Builder setEngineBytes(com.google.protobuf.ByteString value) { } checkByteStringIsUtf8(value); engine_ = value; - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000008; onChanged(); return this; } @@ -3439,7 +3900,7 @@ public Builder setDataStore(java.lang.String value) { throw new NullPointerException(); } dataStore_ = value; - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000010; onChanged(); return this; } @@ -3466,7 +3927,7 @@ public Builder setDataStore(java.lang.String value) { */ public Builder clearDataStore() { dataStore_ = getDefaultInstance().getDataStore(); - bitField0_ = (bitField0_ & ~0x00000008); + bitField0_ = (bitField0_ & ~0x00000010); onChanged(); return this; } @@ -3498,7 +3959,7 @@ public Builder setDataStoreBytes(com.google.protobuf.ByteString value) { } checkByteStringIsUtf8(value); dataStore_ = value; - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000010; onChanged(); return this; } @@ -3524,7 +3985,7 @@ public Builder setDataStoreBytes(com.google.protobuf.ByteString value) { * @return Whether the eventTime field is set. */ public boolean hasEventTime() { - return ((bitField0_ & 0x00000010) != 0); + return ((bitField0_ & 0x00000020) != 0); } /** @@ -3568,7 +4029,7 @@ public Builder setEventTime(com.google.protobuf.Timestamp value) { } else { eventTimeBuilder_.setMessage(value); } - bitField0_ |= 0x00000010; + bitField0_ |= 0x00000020; onChanged(); return this; } @@ -3590,7 +4051,7 @@ public Builder setEventTime(com.google.protobuf.Timestamp.Builder builderForValu } else { eventTimeBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00000010; + bitField0_ |= 0x00000020; onChanged(); return this; } @@ -3608,7 +4069,7 @@ public Builder setEventTime(com.google.protobuf.Timestamp.Builder builderForValu */ public Builder mergeEventTime(com.google.protobuf.Timestamp value) { if (eventTimeBuilder_ == null) { - if (((bitField0_ & 0x00000010) != 0) + if (((bitField0_ & 0x00000020) != 0) && eventTime_ != null && eventTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { getEventTimeBuilder().mergeFrom(value); @@ -3619,7 +4080,7 @@ public Builder mergeEventTime(com.google.protobuf.Timestamp value) { eventTimeBuilder_.mergeFrom(value); } if (eventTime_ != null) { - bitField0_ |= 0x00000010; + bitField0_ |= 0x00000020; onChanged(); } return this; @@ -3637,7 +4098,7 @@ public Builder mergeEventTime(com.google.protobuf.Timestamp value) { * .google.protobuf.Timestamp event_time = 3; */ public Builder clearEventTime() { - bitField0_ = (bitField0_ & ~0x00000010); + bitField0_ = (bitField0_ & ~0x00000020); eventTime_ = null; if (eventTimeBuilder_ != null) { eventTimeBuilder_.dispose(); @@ -3659,7 +4120,7 @@ public Builder clearEventTime() { * .google.protobuf.Timestamp event_time = 3; */ public com.google.protobuf.Timestamp.Builder getEventTimeBuilder() { - bitField0_ |= 0x00000010; + bitField0_ |= 0x00000020; onChanged(); return internalGetEventTimeFieldBuilder().getBuilder(); } @@ -3730,7 +4191,7 @@ public com.google.protobuf.TimestampOrBuilder getEventTimeOrBuilder() { * @return Whether the userInfo field is set. */ public boolean hasUserInfo() { - return ((bitField0_ & 0x00000020) != 0); + return ((bitField0_ & 0x00000040) != 0); } /** @@ -3772,7 +4233,7 @@ public Builder setUserInfo(com.google.cloud.discoveryengine.v1beta.UserInfo valu } else { userInfoBuilder_.setMessage(value); } - bitField0_ |= 0x00000020; + bitField0_ |= 0x00000040; onChanged(); return this; } @@ -3793,7 +4254,7 @@ public Builder setUserInfo( } else { userInfoBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00000020; + bitField0_ |= 0x00000040; onChanged(); return this; } @@ -3809,7 +4270,7 @@ public Builder setUserInfo( */ public Builder mergeUserInfo(com.google.cloud.discoveryengine.v1beta.UserInfo value) { if (userInfoBuilder_ == null) { - if (((bitField0_ & 0x00000020) != 0) + if (((bitField0_ & 0x00000040) != 0) && userInfo_ != null && userInfo_ != com.google.cloud.discoveryengine.v1beta.UserInfo.getDefaultInstance()) { getUserInfoBuilder().mergeFrom(value); @@ -3820,7 +4281,7 @@ public Builder mergeUserInfo(com.google.cloud.discoveryengine.v1beta.UserInfo va userInfoBuilder_.mergeFrom(value); } if (userInfo_ != null) { - bitField0_ |= 0x00000020; + bitField0_ |= 0x00000040; onChanged(); } return this; @@ -3836,7 +4297,7 @@ public Builder mergeUserInfo(com.google.cloud.discoveryengine.v1beta.UserInfo va * .google.cloud.discoveryengine.v1beta.UserInfo user_info = 4; */ public Builder clearUserInfo() { - bitField0_ = (bitField0_ & ~0x00000020); + bitField0_ = (bitField0_ & ~0x00000040); userInfo_ = null; if (userInfoBuilder_ != null) { userInfoBuilder_.dispose(); @@ -3856,7 +4317,7 @@ public Builder clearUserInfo() { * .google.cloud.discoveryengine.v1beta.UserInfo user_info = 4; */ public com.google.cloud.discoveryengine.v1beta.UserInfo.Builder getUserInfoBuilder() { - bitField0_ |= 0x00000020; + bitField0_ |= 0x00000040; onChanged(); return internalGetUserInfoFieldBuilder().getBuilder(); } @@ -3959,7 +4420,7 @@ public boolean getDirectUserRequest() { public Builder setDirectUserRequest(boolean value) { directUserRequest_ = value; - bitField0_ |= 0x00000040; + bitField0_ |= 0x00000080; onChanged(); return this; } @@ -3986,7 +4447,7 @@ public Builder setDirectUserRequest(boolean value) { * @return This builder for chaining. */ public Builder clearDirectUserRequest() { - bitField0_ = (bitField0_ & ~0x00000040); + bitField0_ = (bitField0_ & ~0x00000080); directUserRequest_ = false; onChanged(); return this; @@ -4084,7 +4545,7 @@ public Builder setSessionId(java.lang.String value) { throw new NullPointerException(); } sessionId_ = value; - bitField0_ |= 0x00000080; + bitField0_ |= 0x00000100; onChanged(); return this; } @@ -4111,7 +4572,7 @@ public Builder setSessionId(java.lang.String value) { */ public Builder clearSessionId() { sessionId_ = getDefaultInstance().getSessionId(); - bitField0_ = (bitField0_ & ~0x00000080); + bitField0_ = (bitField0_ & ~0x00000100); onChanged(); return this; } @@ -4143,7 +4604,7 @@ public Builder setSessionIdBytes(com.google.protobuf.ByteString value) { } checkByteStringIsUtf8(value); sessionId_ = value; - bitField0_ |= 0x00000080; + bitField0_ |= 0x00000100; onChanged(); return this; } @@ -4168,7 +4629,7 @@ public Builder setSessionIdBytes(com.google.protobuf.ByteString value) { * @return Whether the pageInfo field is set. */ public boolean hasPageInfo() { - return ((bitField0_ & 0x00000100) != 0); + return ((bitField0_ & 0x00000200) != 0); } /** @@ -4212,7 +4673,7 @@ public Builder setPageInfo(com.google.cloud.discoveryengine.v1beta.PageInfo valu } else { pageInfoBuilder_.setMessage(value); } - bitField0_ |= 0x00000100; + bitField0_ |= 0x00000200; onChanged(); return this; } @@ -4234,7 +4695,7 @@ public Builder setPageInfo( } else { pageInfoBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00000100; + bitField0_ |= 0x00000200; onChanged(); return this; } @@ -4251,7 +4712,7 @@ public Builder setPageInfo( */ public Builder mergePageInfo(com.google.cloud.discoveryengine.v1beta.PageInfo value) { if (pageInfoBuilder_ == null) { - if (((bitField0_ & 0x00000100) != 0) + if (((bitField0_ & 0x00000200) != 0) && pageInfo_ != null && pageInfo_ != com.google.cloud.discoveryengine.v1beta.PageInfo.getDefaultInstance()) { getPageInfoBuilder().mergeFrom(value); @@ -4262,7 +4723,7 @@ public Builder mergePageInfo(com.google.cloud.discoveryengine.v1beta.PageInfo va pageInfoBuilder_.mergeFrom(value); } if (pageInfo_ != null) { - bitField0_ |= 0x00000100; + bitField0_ |= 0x00000200; onChanged(); } return this; @@ -4279,7 +4740,7 @@ public Builder mergePageInfo(com.google.cloud.discoveryengine.v1beta.PageInfo va * .google.cloud.discoveryengine.v1beta.PageInfo page_info = 7; */ public Builder clearPageInfo() { - bitField0_ = (bitField0_ & ~0x00000100); + bitField0_ = (bitField0_ & ~0x00000200); pageInfo_ = null; if (pageInfoBuilder_ != null) { pageInfoBuilder_.dispose(); @@ -4300,7 +4761,7 @@ public Builder clearPageInfo() { * .google.cloud.discoveryengine.v1beta.PageInfo page_info = 7; */ public com.google.cloud.discoveryengine.v1beta.PageInfo.Builder getPageInfoBuilder() { - bitField0_ |= 0x00000100; + bitField0_ |= 0x00000200; onChanged(); return internalGetPageInfoFieldBuilder().getBuilder(); } @@ -4483,7 +4944,7 @@ public Builder setAttributionToken(java.lang.String value) { throw new NullPointerException(); } attributionToken_ = value; - bitField0_ |= 0x00000200; + bitField0_ |= 0x00000400; onChanged(); return this; } @@ -4523,7 +4984,7 @@ public Builder setAttributionToken(java.lang.String value) { */ public Builder clearAttributionToken() { attributionToken_ = getDefaultInstance().getAttributionToken(); - bitField0_ = (bitField0_ & ~0x00000200); + bitField0_ = (bitField0_ & ~0x00000400); onChanged(); return this; } @@ -4568,7 +5029,7 @@ public Builder setAttributionTokenBytes(com.google.protobuf.ByteString value) { } checkByteStringIsUtf8(value); attributionToken_ = value; - bitField0_ |= 0x00000200; + bitField0_ |= 0x00000400; onChanged(); return this; } @@ -4579,8 +5040,9 @@ public Builder setAttributionTokenBytes(com.google.protobuf.ByteString value) { * * *
            -     * The filter syntax consists of an expression language for constructing a
            -     * predicate from one or more fields of the documents being filtered.
            +     * Optional. The filter syntax consists of an expression language for
            +     * constructing a predicate from one or more fields of the documents being
            +     * filtered.
                  *
                  * One example is for `search` events, the associated
                  * [SearchRequest][google.cloud.discoveryengine.v1beta.SearchRequest] may
            @@ -4598,7 +5060,7 @@ public Builder setAttributionTokenBytes(com.google.protobuf.ByteString value) {
                  * characters. Otherwise, an `INVALID_ARGUMENT` error is returned.
                  * 
            * - * string filter = 9; + * string filter = 9 [(.google.api.field_behavior) = OPTIONAL]; * * @return The filter. */ @@ -4618,8 +5080,9 @@ public java.lang.String getFilter() { * * *
            -     * The filter syntax consists of an expression language for constructing a
            -     * predicate from one or more fields of the documents being filtered.
            +     * Optional. The filter syntax consists of an expression language for
            +     * constructing a predicate from one or more fields of the documents being
            +     * filtered.
                  *
                  * One example is for `search` events, the associated
                  * [SearchRequest][google.cloud.discoveryengine.v1beta.SearchRequest] may
            @@ -4637,7 +5100,7 @@ public java.lang.String getFilter() {
                  * characters. Otherwise, an `INVALID_ARGUMENT` error is returned.
                  * 
            * - * string filter = 9; + * string filter = 9 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for filter. */ @@ -4657,8 +5120,9 @@ public com.google.protobuf.ByteString getFilterBytes() { * * *
            -     * The filter syntax consists of an expression language for constructing a
            -     * predicate from one or more fields of the documents being filtered.
            +     * Optional. The filter syntax consists of an expression language for
            +     * constructing a predicate from one or more fields of the documents being
            +     * filtered.
                  *
                  * One example is for `search` events, the associated
                  * [SearchRequest][google.cloud.discoveryengine.v1beta.SearchRequest] may
            @@ -4676,7 +5140,7 @@ public com.google.protobuf.ByteString getFilterBytes() {
                  * characters. Otherwise, an `INVALID_ARGUMENT` error is returned.
                  * 
            * - * string filter = 9; + * string filter = 9 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The filter to set. * @return This builder for chaining. @@ -4686,7 +5150,7 @@ public Builder setFilter(java.lang.String value) { throw new NullPointerException(); } filter_ = value; - bitField0_ |= 0x00000400; + bitField0_ |= 0x00000800; onChanged(); return this; } @@ -4695,8 +5159,9 @@ public Builder setFilter(java.lang.String value) { * * *
            -     * The filter syntax consists of an expression language for constructing a
            -     * predicate from one or more fields of the documents being filtered.
            +     * Optional. The filter syntax consists of an expression language for
            +     * constructing a predicate from one or more fields of the documents being
            +     * filtered.
                  *
                  * One example is for `search` events, the associated
                  * [SearchRequest][google.cloud.discoveryengine.v1beta.SearchRequest] may
            @@ -4714,13 +5179,13 @@ public Builder setFilter(java.lang.String value) {
                  * characters. Otherwise, an `INVALID_ARGUMENT` error is returned.
                  * 
            * - * string filter = 9; + * string filter = 9 [(.google.api.field_behavior) = OPTIONAL]; * * @return This builder for chaining. */ public Builder clearFilter() { filter_ = getDefaultInstance().getFilter(); - bitField0_ = (bitField0_ & ~0x00000400); + bitField0_ = (bitField0_ & ~0x00000800); onChanged(); return this; } @@ -4729,8 +5194,9 @@ public Builder clearFilter() { * * *
            -     * The filter syntax consists of an expression language for constructing a
            -     * predicate from one or more fields of the documents being filtered.
            +     * Optional. The filter syntax consists of an expression language for
            +     * constructing a predicate from one or more fields of the documents being
            +     * filtered.
                  *
                  * One example is for `search` events, the associated
                  * [SearchRequest][google.cloud.discoveryengine.v1beta.SearchRequest] may
            @@ -4748,7 +5214,7 @@ public Builder clearFilter() {
                  * characters. Otherwise, an `INVALID_ARGUMENT` error is returned.
                  * 
            * - * string filter = 9; + * string filter = 9 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The bytes for filter to set. * @return This builder for chaining. @@ -4759,7 +5225,7 @@ public Builder setFilterBytes(com.google.protobuf.ByteString value) { } checkByteStringIsUtf8(value); filter_ = value; - bitField0_ |= 0x00000400; + bitField0_ |= 0x00000800; onChanged(); return this; } @@ -4768,11 +5234,11 @@ public Builder setFilterBytes(com.google.protobuf.ByteString value) { java.util.Collections.emptyList(); private void ensureDocumentsIsMutable() { - if (!((bitField0_ & 0x00000800) != 0)) { + if (!((bitField0_ & 0x00001000) != 0)) { documents_ = new java.util.ArrayList( documents_); - bitField0_ |= 0x00000800; + bitField0_ |= 0x00001000; } } @@ -5187,7 +5653,7 @@ public Builder addAllDocuments( public Builder clearDocuments() { if (documentsBuilder_ == null) { documents_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000800); + bitField0_ = (bitField0_ & ~0x00001000); onChanged(); } else { documentsBuilder_.clear(); @@ -5439,7 +5905,7 @@ public com.google.cloud.discoveryengine.v1beta.DocumentInfo.Builder addDocuments com.google.cloud.discoveryengine.v1beta.DocumentInfo, com.google.cloud.discoveryengine.v1beta.DocumentInfo.Builder, com.google.cloud.discoveryengine.v1beta.DocumentInfoOrBuilder>( - documents_, ((bitField0_ & 0x00000800) != 0), getParentForChildren(), isClean()); + documents_, ((bitField0_ & 0x00001000) != 0), getParentForChildren(), isClean()); documents_ = null; } return documentsBuilder_; @@ -5464,7 +5930,7 @@ public com.google.cloud.discoveryengine.v1beta.DocumentInfo.Builder addDocuments * @return Whether the panel field is set. */ public boolean hasPanel() { - return ((bitField0_ & 0x00001000) != 0); + return ((bitField0_ & 0x00002000) != 0); } /** @@ -5506,7 +5972,7 @@ public Builder setPanel(com.google.cloud.discoveryengine.v1beta.PanelInfo value) } else { panelBuilder_.setMessage(value); } - bitField0_ |= 0x00001000; + bitField0_ |= 0x00002000; onChanged(); return this; } @@ -5527,7 +5993,7 @@ public Builder setPanel( } else { panelBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00001000; + bitField0_ |= 0x00002000; onChanged(); return this; } @@ -5543,7 +6009,7 @@ public Builder setPanel( */ public Builder mergePanel(com.google.cloud.discoveryengine.v1beta.PanelInfo value) { if (panelBuilder_ == null) { - if (((bitField0_ & 0x00001000) != 0) + if (((bitField0_ & 0x00002000) != 0) && panel_ != null && panel_ != com.google.cloud.discoveryengine.v1beta.PanelInfo.getDefaultInstance()) { getPanelBuilder().mergeFrom(value); @@ -5554,7 +6020,7 @@ public Builder mergePanel(com.google.cloud.discoveryengine.v1beta.PanelInfo valu panelBuilder_.mergeFrom(value); } if (panel_ != null) { - bitField0_ |= 0x00001000; + bitField0_ |= 0x00002000; onChanged(); } return this; @@ -5570,7 +6036,7 @@ public Builder mergePanel(com.google.cloud.discoveryengine.v1beta.PanelInfo valu * .google.cloud.discoveryengine.v1beta.PanelInfo panel = 11; */ public Builder clearPanel() { - bitField0_ = (bitField0_ & ~0x00001000); + bitField0_ = (bitField0_ & ~0x00002000); panel_ = null; if (panelBuilder_ != null) { panelBuilder_.dispose(); @@ -5590,7 +6056,7 @@ public Builder clearPanel() { * .google.cloud.discoveryengine.v1beta.PanelInfo panel = 11; */ public com.google.cloud.discoveryengine.v1beta.PanelInfo.Builder getPanelBuilder() { - bitField0_ |= 0x00001000; + bitField0_ |= 0x00002000; onChanged(); return internalGetPanelFieldBuilder().getBuilder(); } @@ -5662,7 +6128,7 @@ public com.google.cloud.discoveryengine.v1beta.PanelInfoOrBuilder getPanelOrBuil * @return Whether the searchInfo field is set. */ public boolean hasSearchInfo() { - return ((bitField0_ & 0x00002000) != 0); + return ((bitField0_ & 0x00004000) != 0); } /** @@ -5710,7 +6176,7 @@ public Builder setSearchInfo(com.google.cloud.discoveryengine.v1beta.SearchInfo } else { searchInfoBuilder_.setMessage(value); } - bitField0_ |= 0x00002000; + bitField0_ |= 0x00004000; onChanged(); return this; } @@ -5734,7 +6200,7 @@ public Builder setSearchInfo( } else { searchInfoBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00002000; + bitField0_ |= 0x00004000; onChanged(); return this; } @@ -5753,7 +6219,7 @@ public Builder setSearchInfo( */ public Builder mergeSearchInfo(com.google.cloud.discoveryengine.v1beta.SearchInfo value) { if (searchInfoBuilder_ == null) { - if (((bitField0_ & 0x00002000) != 0) + if (((bitField0_ & 0x00004000) != 0) && searchInfo_ != null && searchInfo_ != com.google.cloud.discoveryengine.v1beta.SearchInfo.getDefaultInstance()) { @@ -5765,7 +6231,7 @@ public Builder mergeSearchInfo(com.google.cloud.discoveryengine.v1beta.SearchInf searchInfoBuilder_.mergeFrom(value); } if (searchInfo_ != null) { - bitField0_ |= 0x00002000; + bitField0_ |= 0x00004000; onChanged(); } return this; @@ -5784,7 +6250,7 @@ public Builder mergeSearchInfo(com.google.cloud.discoveryengine.v1beta.SearchInf * .google.cloud.discoveryengine.v1beta.SearchInfo search_info = 12; */ public Builder clearSearchInfo() { - bitField0_ = (bitField0_ & ~0x00002000); + bitField0_ = (bitField0_ & ~0x00004000); searchInfo_ = null; if (searchInfoBuilder_ != null) { searchInfoBuilder_.dispose(); @@ -5807,7 +6273,7 @@ public Builder clearSearchInfo() { * .google.cloud.discoveryengine.v1beta.SearchInfo search_info = 12; */ public com.google.cloud.discoveryengine.v1beta.SearchInfo.Builder getSearchInfoBuilder() { - bitField0_ |= 0x00002000; + bitField0_ |= 0x00004000; onChanged(); return internalGetSearchInfoFieldBuilder().getBuilder(); } @@ -5886,7 +6352,7 @@ public com.google.cloud.discoveryengine.v1beta.SearchInfoOrBuilder getSearchInfo * @return Whether the completionInfo field is set. */ public boolean hasCompletionInfo() { - return ((bitField0_ & 0x00004000) != 0); + return ((bitField0_ & 0x00008000) != 0); } /** @@ -5936,7 +6402,7 @@ public Builder setCompletionInfo(com.google.cloud.discoveryengine.v1beta.Complet } else { completionInfoBuilder_.setMessage(value); } - bitField0_ |= 0x00004000; + bitField0_ |= 0x00008000; onChanged(); return this; } @@ -5961,7 +6427,7 @@ public Builder setCompletionInfo( } else { completionInfoBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00004000; + bitField0_ |= 0x00008000; onChanged(); return this; } @@ -5982,7 +6448,7 @@ public Builder setCompletionInfo( public Builder mergeCompletionInfo( com.google.cloud.discoveryengine.v1beta.CompletionInfo value) { if (completionInfoBuilder_ == null) { - if (((bitField0_ & 0x00004000) != 0) + if (((bitField0_ & 0x00008000) != 0) && completionInfo_ != null && completionInfo_ != com.google.cloud.discoveryengine.v1beta.CompletionInfo.getDefaultInstance()) { @@ -5994,7 +6460,7 @@ public Builder mergeCompletionInfo( completionInfoBuilder_.mergeFrom(value); } if (completionInfo_ != null) { - bitField0_ |= 0x00004000; + bitField0_ |= 0x00008000; onChanged(); } return this; @@ -6014,7 +6480,7 @@ public Builder mergeCompletionInfo( * .google.cloud.discoveryengine.v1beta.CompletionInfo completion_info = 13; */ public Builder clearCompletionInfo() { - bitField0_ = (bitField0_ & ~0x00004000); + bitField0_ = (bitField0_ & ~0x00008000); completionInfo_ = null; if (completionInfoBuilder_ != null) { completionInfoBuilder_.dispose(); @@ -6039,7 +6505,7 @@ public Builder clearCompletionInfo() { */ public com.google.cloud.discoveryengine.v1beta.CompletionInfo.Builder getCompletionInfoBuilder() { - bitField0_ |= 0x00004000; + bitField0_ |= 0x00008000; onChanged(); return internalGetCompletionInfoFieldBuilder().getBuilder(); } @@ -6117,7 +6583,7 @@ public Builder clearCompletionInfo() { * @return Whether the transactionInfo field is set. */ public boolean hasTransactionInfo() { - return ((bitField0_ & 0x00008000) != 0); + return ((bitField0_ & 0x00010000) != 0); } /** @@ -6160,7 +6626,7 @@ public Builder setTransactionInfo( } else { transactionInfoBuilder_.setMessage(value); } - bitField0_ |= 0x00008000; + bitField0_ |= 0x00010000; onChanged(); return this; } @@ -6181,7 +6647,7 @@ public Builder setTransactionInfo( } else { transactionInfoBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00008000; + bitField0_ |= 0x00010000; onChanged(); return this; } @@ -6198,7 +6664,7 @@ public Builder setTransactionInfo( public Builder mergeTransactionInfo( com.google.cloud.discoveryengine.v1beta.TransactionInfo value) { if (transactionInfoBuilder_ == null) { - if (((bitField0_ & 0x00008000) != 0) + if (((bitField0_ & 0x00010000) != 0) && transactionInfo_ != null && transactionInfo_ != com.google.cloud.discoveryengine.v1beta.TransactionInfo.getDefaultInstance()) { @@ -6210,7 +6676,7 @@ public Builder mergeTransactionInfo( transactionInfoBuilder_.mergeFrom(value); } if (transactionInfo_ != null) { - bitField0_ |= 0x00008000; + bitField0_ |= 0x00010000; onChanged(); } return this; @@ -6226,7 +6692,7 @@ public Builder mergeTransactionInfo( * .google.cloud.discoveryengine.v1beta.TransactionInfo transaction_info = 14; */ public Builder clearTransactionInfo() { - bitField0_ = (bitField0_ & ~0x00008000); + bitField0_ = (bitField0_ & ~0x00010000); transactionInfo_ = null; if (transactionInfoBuilder_ != null) { transactionInfoBuilder_.dispose(); @@ -6247,7 +6713,7 @@ public Builder clearTransactionInfo() { */ public com.google.cloud.discoveryengine.v1beta.TransactionInfo.Builder getTransactionInfoBuilder() { - bitField0_ |= 0x00008000; + bitField0_ |= 0x00010000; onChanged(); return internalGetTransactionInfoFieldBuilder().getBuilder(); } @@ -6305,7 +6771,7 @@ private void ensureTagIdsIsMutable() { if (!tagIds_.isModifiable()) { tagIds_ = new com.google.protobuf.LazyStringArrayList(tagIds_); } - bitField0_ |= 0x00010000; + bitField0_ |= 0x00020000; } /** @@ -6400,7 +6866,7 @@ public Builder setTagIds(int index, java.lang.String value) { } ensureTagIdsIsMutable(); tagIds_.set(index, value); - bitField0_ |= 0x00010000; + bitField0_ |= 0x00020000; onChanged(); return this; } @@ -6425,7 +6891,7 @@ public Builder addTagIds(java.lang.String value) { } ensureTagIdsIsMutable(); tagIds_.add(value); - bitField0_ |= 0x00010000; + bitField0_ |= 0x00020000; onChanged(); return this; } @@ -6447,7 +6913,7 @@ public Builder addTagIds(java.lang.String value) { public Builder addAllTagIds(java.lang.Iterable values) { ensureTagIdsIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll(values, tagIds_); - bitField0_ |= 0x00010000; + bitField0_ |= 0x00020000; onChanged(); return this; } @@ -6467,7 +6933,7 @@ public Builder addAllTagIds(java.lang.Iterable values) { */ public Builder clearTagIds() { tagIds_ = com.google.protobuf.LazyStringArrayList.emptyList(); - bitField0_ = (bitField0_ & ~0x00010000); + bitField0_ = (bitField0_ & ~0x00020000); ; onChanged(); return this; @@ -6494,7 +6960,7 @@ public Builder addTagIdsBytes(com.google.protobuf.ByteString value) { checkByteStringIsUtf8(value); ensureTagIdsIsMutable(); tagIds_.add(value); - bitField0_ |= 0x00010000; + bitField0_ |= 0x00020000; onChanged(); return this; } @@ -6506,7 +6972,7 @@ private void ensurePromotionIdsIsMutable() { if (!promotionIds_.isModifiable()) { promotionIds_ = new com.google.protobuf.LazyStringArrayList(promotionIds_); } - bitField0_ |= 0x00020000; + bitField0_ |= 0x00040000; } /** @@ -6596,7 +7062,7 @@ public Builder setPromotionIds(int index, java.lang.String value) { } ensurePromotionIdsIsMutable(); promotionIds_.set(index, value); - bitField0_ |= 0x00020000; + bitField0_ |= 0x00040000; onChanged(); return this; } @@ -6620,7 +7086,7 @@ public Builder addPromotionIds(java.lang.String value) { } ensurePromotionIdsIsMutable(); promotionIds_.add(value); - bitField0_ |= 0x00020000; + bitField0_ |= 0x00040000; onChanged(); return this; } @@ -6641,7 +7107,7 @@ public Builder addPromotionIds(java.lang.String value) { public Builder addAllPromotionIds(java.lang.Iterable values) { ensurePromotionIdsIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll(values, promotionIds_); - bitField0_ |= 0x00020000; + bitField0_ |= 0x00040000; onChanged(); return this; } @@ -6660,7 +7126,7 @@ public Builder addAllPromotionIds(java.lang.Iterable values) { */ public Builder clearPromotionIds() { promotionIds_ = com.google.protobuf.LazyStringArrayList.emptyList(); - bitField0_ = (bitField0_ & ~0x00020000); + bitField0_ = (bitField0_ & ~0x00040000); ; onChanged(); return this; @@ -6686,7 +7152,7 @@ public Builder addPromotionIdsBytes(com.google.protobuf.ByteString value) { checkByteStringIsUtf8(value); ensurePromotionIdsIsMutable(); promotionIds_.add(value); - bitField0_ |= 0x00020000; + bitField0_ |= 0x00040000; onChanged(); return this; } @@ -6744,7 +7210,7 @@ public com.google.cloud.discoveryengine.v1beta.CustomAttribute build( if (attributes_ == null) { attributes_ = new com.google.protobuf.MapFieldBuilder<>(attributesConverter); } - bitField0_ |= 0x00040000; + bitField0_ |= 0x00080000; onChanged(); return attributes_; } @@ -6950,7 +7416,7 @@ public com.google.cloud.discoveryengine.v1beta.CustomAttribute getAttributesOrTh } public Builder clearAttributes() { - bitField0_ = (bitField0_ & ~0x00040000); + bitField0_ = (bitField0_ & ~0x00080000); internalGetMutableAttributes().clear(); return this; } @@ -7003,7 +7469,7 @@ public Builder removeAttributes(java.lang.String key) { @java.lang.Deprecated public java.util.Map getMutableAttributes() { - bitField0_ |= 0x00040000; + bitField0_ |= 0x00080000; return internalGetMutableAttributes().ensureMessageMap(); } @@ -7052,7 +7518,7 @@ public Builder putAttributes( throw new NullPointerException("map value"); } internalGetMutableAttributes().ensureBuilderMap().put(key, value); - bitField0_ |= 0x00040000; + bitField0_ |= 0x00080000; return this; } @@ -7103,7 +7569,7 @@ public Builder putAllAttributes( } } internalGetMutableAttributes().ensureBuilderMap().putAll(values); - bitField0_ |= 0x00040000; + bitField0_ |= 0x00080000; return this; } @@ -7179,7 +7645,7 @@ public Builder putAllAttributes( * @return Whether the mediaInfo field is set. */ public boolean hasMediaInfo() { - return ((bitField0_ & 0x00080000) != 0); + return ((bitField0_ & 0x00100000) != 0); } /** @@ -7221,7 +7687,7 @@ public Builder setMediaInfo(com.google.cloud.discoveryengine.v1beta.MediaInfo va } else { mediaInfoBuilder_.setMessage(value); } - bitField0_ |= 0x00080000; + bitField0_ |= 0x00100000; onChanged(); return this; } @@ -7242,7 +7708,7 @@ public Builder setMediaInfo( } else { mediaInfoBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00080000; + bitField0_ |= 0x00100000; onChanged(); return this; } @@ -7258,7 +7724,7 @@ public Builder setMediaInfo( */ public Builder mergeMediaInfo(com.google.cloud.discoveryengine.v1beta.MediaInfo value) { if (mediaInfoBuilder_ == null) { - if (((bitField0_ & 0x00080000) != 0) + if (((bitField0_ & 0x00100000) != 0) && mediaInfo_ != null && mediaInfo_ != com.google.cloud.discoveryengine.v1beta.MediaInfo.getDefaultInstance()) { @@ -7270,7 +7736,7 @@ public Builder mergeMediaInfo(com.google.cloud.discoveryengine.v1beta.MediaInfo mediaInfoBuilder_.mergeFrom(value); } if (mediaInfo_ != null) { - bitField0_ |= 0x00080000; + bitField0_ |= 0x00100000; onChanged(); } return this; @@ -7286,7 +7752,7 @@ public Builder mergeMediaInfo(com.google.cloud.discoveryengine.v1beta.MediaInfo * .google.cloud.discoveryengine.v1beta.MediaInfo media_info = 18; */ public Builder clearMediaInfo() { - bitField0_ = (bitField0_ & ~0x00080000); + bitField0_ = (bitField0_ & ~0x00100000); mediaInfo_ = null; if (mediaInfoBuilder_ != null) { mediaInfoBuilder_.dispose(); @@ -7306,7 +7772,7 @@ public Builder clearMediaInfo() { * .google.cloud.discoveryengine.v1beta.MediaInfo media_info = 18; */ public com.google.cloud.discoveryengine.v1beta.MediaInfo.Builder getMediaInfoBuilder() { - bitField0_ |= 0x00080000; + bitField0_ |= 0x00100000; onChanged(); return internalGetMediaInfoFieldBuilder().getBuilder(); } @@ -7360,10 +7826,10 @@ public com.google.cloud.discoveryengine.v1beta.MediaInfoOrBuilder getMediaInfoOr java.util.Collections.emptyList(); private void ensurePanelsIsMutable() { - if (!((bitField0_ & 0x00100000) != 0)) { + if (!((bitField0_ & 0x00200000) != 0)) { panels_ = new java.util.ArrayList(panels_); - bitField0_ |= 0x00100000; + bitField0_ |= 0x00200000; } } @@ -7622,7 +8088,7 @@ public Builder addAllPanels( public Builder clearPanels() { if (panelsBuilder_ == null) { panels_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00100000); + bitField0_ = (bitField0_ & ~0x00200000); onChanged(); } else { panelsBuilder_.clear(); @@ -7774,12 +8240,356 @@ public com.google.cloud.discoveryengine.v1beta.PanelInfo.Builder addPanelsBuilde com.google.cloud.discoveryengine.v1beta.PanelInfo, com.google.cloud.discoveryengine.v1beta.PanelInfo.Builder, com.google.cloud.discoveryengine.v1beta.PanelInfoOrBuilder>( - panels_, ((bitField0_ & 0x00100000) != 0), getParentForChildren(), isClean()); + panels_, ((bitField0_ & 0x00200000) != 0), getParentForChildren(), isClean()); panels_ = null; } return panelsBuilder_; } + private com.google.cloud.discoveryengine.v1beta.Feedback feedback_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.Feedback, + com.google.cloud.discoveryengine.v1beta.Feedback.Builder, + com.google.cloud.discoveryengine.v1beta.FeedbackOrBuilder> + feedbackBuilder_; + + /** + * + * + *
            +     * Optional. This field is optional except for the `add-feedback` event types.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Feedback feedback = 23 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the feedback field is set. + */ + public boolean hasFeedback() { + return ((bitField0_ & 0x00400000) != 0); + } + + /** + * + * + *
            +     * Optional. This field is optional except for the `add-feedback` event types.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Feedback feedback = 23 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The feedback. + */ + public com.google.cloud.discoveryengine.v1beta.Feedback getFeedback() { + if (feedbackBuilder_ == null) { + return feedback_ == null + ? com.google.cloud.discoveryengine.v1beta.Feedback.getDefaultInstance() + : feedback_; + } else { + return feedbackBuilder_.getMessage(); + } + } + + /** + * + * + *
            +     * Optional. This field is optional except for the `add-feedback` event types.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Feedback feedback = 23 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setFeedback(com.google.cloud.discoveryengine.v1beta.Feedback value) { + if (feedbackBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + feedback_ = value; + } else { + feedbackBuilder_.setMessage(value); + } + bitField0_ |= 0x00400000; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Optional. This field is optional except for the `add-feedback` event types.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Feedback feedback = 23 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setFeedback( + com.google.cloud.discoveryengine.v1beta.Feedback.Builder builderForValue) { + if (feedbackBuilder_ == null) { + feedback_ = builderForValue.build(); + } else { + feedbackBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00400000; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Optional. This field is optional except for the `add-feedback` event types.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Feedback feedback = 23 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeFeedback(com.google.cloud.discoveryengine.v1beta.Feedback value) { + if (feedbackBuilder_ == null) { + if (((bitField0_ & 0x00400000) != 0) + && feedback_ != null + && feedback_ != com.google.cloud.discoveryengine.v1beta.Feedback.getDefaultInstance()) { + getFeedbackBuilder().mergeFrom(value); + } else { + feedback_ = value; + } + } else { + feedbackBuilder_.mergeFrom(value); + } + if (feedback_ != null) { + bitField0_ |= 0x00400000; + onChanged(); + } + return this; + } + + /** + * + * + *
            +     * Optional. This field is optional except for the `add-feedback` event types.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Feedback feedback = 23 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearFeedback() { + bitField0_ = (bitField0_ & ~0x00400000); + feedback_ = null; + if (feedbackBuilder_ != null) { + feedbackBuilder_.dispose(); + feedbackBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
            +     * Optional. This field is optional except for the `add-feedback` event types.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Feedback feedback = 23 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.discoveryengine.v1beta.Feedback.Builder getFeedbackBuilder() { + bitField0_ |= 0x00400000; + onChanged(); + return internalGetFeedbackFieldBuilder().getBuilder(); + } + + /** + * + * + *
            +     * Optional. This field is optional except for the `add-feedback` event types.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Feedback feedback = 23 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.discoveryengine.v1beta.FeedbackOrBuilder getFeedbackOrBuilder() { + if (feedbackBuilder_ != null) { + return feedbackBuilder_.getMessageOrBuilder(); + } else { + return feedback_ == null + ? com.google.cloud.discoveryengine.v1beta.Feedback.getDefaultInstance() + : feedback_; + } + } + + /** + * + * + *
            +     * Optional. This field is optional except for the `add-feedback` event types.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Feedback feedback = 23 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.Feedback, + com.google.cloud.discoveryengine.v1beta.Feedback.Builder, + com.google.cloud.discoveryengine.v1beta.FeedbackOrBuilder> + internalGetFeedbackFieldBuilder() { + if (feedbackBuilder_ == null) { + feedbackBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.Feedback, + com.google.cloud.discoveryengine.v1beta.Feedback.Builder, + com.google.cloud.discoveryengine.v1beta.FeedbackOrBuilder>( + getFeedback(), getParentForChildren(), isClean()); + feedback_ = null; + } + return feedbackBuilder_; + } + + private java.lang.Object entity_ = ""; + + /** + * + * + *
            +     * Optional. Represents the entity for customers that may run multiple
            +     * different entities, domains, sites or regions, for example, `Google US`,
            +     * `Google Ads`, `Waymo`, `google.com`, `youtube.com`, etc. We recommend that
            +     * you set `entity` to get better per-entity search, completion, and
            +     * prediction results.
            +     * 
            + * + * string entity = 25 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The entity. + */ + public java.lang.String getEntity() { + java.lang.Object ref = entity_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + entity_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
            +     * Optional. Represents the entity for customers that may run multiple
            +     * different entities, domains, sites or regions, for example, `Google US`,
            +     * `Google Ads`, `Waymo`, `google.com`, `youtube.com`, etc. We recommend that
            +     * you set `entity` to get better per-entity search, completion, and
            +     * prediction results.
            +     * 
            + * + * string entity = 25 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for entity. + */ + public com.google.protobuf.ByteString getEntityBytes() { + java.lang.Object ref = entity_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + entity_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
            +     * Optional. Represents the entity for customers that may run multiple
            +     * different entities, domains, sites or regions, for example, `Google US`,
            +     * `Google Ads`, `Waymo`, `google.com`, `youtube.com`, etc. We recommend that
            +     * you set `entity` to get better per-entity search, completion, and
            +     * prediction results.
            +     * 
            + * + * string entity = 25 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The entity to set. + * @return This builder for chaining. + */ + public Builder setEntity(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + entity_ = value; + bitField0_ |= 0x00800000; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Optional. Represents the entity for customers that may run multiple
            +     * different entities, domains, sites or regions, for example, `Google US`,
            +     * `Google Ads`, `Waymo`, `google.com`, `youtube.com`, etc. We recommend that
            +     * you set `entity` to get better per-entity search, completion, and
            +     * prediction results.
            +     * 
            + * + * string entity = 25 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearEntity() { + entity_ = getDefaultInstance().getEntity(); + bitField0_ = (bitField0_ & ~0x00800000); + onChanged(); + return this; + } + + /** + * + * + *
            +     * Optional. Represents the entity for customers that may run multiple
            +     * different entities, domains, sites or regions, for example, `Google US`,
            +     * `Google Ads`, `Waymo`, `google.com`, `youtube.com`, etc. We recommend that
            +     * you set `entity` to get better per-entity search, completion, and
            +     * prediction results.
            +     * 
            + * + * string entity = 25 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for entity to set. + * @return This builder for chaining. + */ + public Builder setEntityBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + entity_ = value; + bitField0_ |= 0x00800000; + onChanged(); + return this; + } + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.UserEvent) } diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/UserEventOrBuilder.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/UserEventOrBuilder.java index a1a708eace6a..5d2eb84a5cc1 100644 --- a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/UserEventOrBuilder.java +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/UserEventOrBuilder.java @@ -39,7 +39,6 @@ public interface UserEventOrBuilder * * `view-item-list`: View of a panel or ordered list of Documents. * * `view-home-page`: View of the home page. * * `view-category-page`: View of a category page, e.g. Home > Men > Jeans - * * `add-feedback`: Add a user feedback. * * Retail-related values: * @@ -50,6 +49,10 @@ public interface UserEventOrBuilder * * * `media-play`: Start/resume watching a video, playing a song, etc. * * `media-complete`: Finished or stopped midway through a video, song, etc. + * + * Custom conversion value: + * + * * `conversion`: Customer defined conversion event. *
            * * string event_type = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -71,7 +74,6 @@ public interface UserEventOrBuilder * * `view-item-list`: View of a panel or ordered list of Documents. * * `view-home-page`: View of the home page. * * `view-category-page`: View of a category page, e.g. Home > Men > Jeans - * * `add-feedback`: Add a user feedback. * * Retail-related values: * @@ -82,6 +84,10 @@ public interface UserEventOrBuilder * * * `media-play`: Start/resume watching a video, playing a song, etc. * * `media-complete`: Finished or stopped midway through a video, song, etc. + * + * Custom conversion value: + * + * * `conversion`: Customer defined conversion event. *
            * * string event_type = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -90,6 +96,52 @@ public interface UserEventOrBuilder */ com.google.protobuf.ByteString getEventTypeBytes(); + /** + * + * + *
            +   * Optional. Conversion type.
            +   *
            +   * Required if
            +   * [UserEvent.event_type][google.cloud.discoveryengine.v1beta.UserEvent.event_type]
            +   * is `conversion`. This is a customer-defined conversion name in lowercase
            +   * letters or numbers separated by "-", such as "watch", "good-visit" etc.
            +   *
            +   * Do not set the field if
            +   * [UserEvent.event_type][google.cloud.discoveryengine.v1beta.UserEvent.event_type]
            +   * is not `conversion`. This mixes the custom conversion event with predefined
            +   * events like `search`, `view-item` etc.
            +   * 
            + * + * string conversion_type = 21 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The conversionType. + */ + java.lang.String getConversionType(); + + /** + * + * + *
            +   * Optional. Conversion type.
            +   *
            +   * Required if
            +   * [UserEvent.event_type][google.cloud.discoveryengine.v1beta.UserEvent.event_type]
            +   * is `conversion`. This is a customer-defined conversion name in lowercase
            +   * letters or numbers separated by "-", such as "watch", "good-visit" etc.
            +   *
            +   * Do not set the field if
            +   * [UserEvent.event_type][google.cloud.discoveryengine.v1beta.UserEvent.event_type]
            +   * is not `conversion`. This mixes the custom conversion event with predefined
            +   * events like `search`, `view-item` etc.
            +   * 
            + * + * string conversion_type = 21 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for conversionType. + */ + com.google.protobuf.ByteString getConversionTypeBytes(); + /** * * @@ -491,8 +543,9 @@ public interface UserEventOrBuilder * * *
            -   * The filter syntax consists of an expression language for constructing a
            -   * predicate from one or more fields of the documents being filtered.
            +   * Optional. The filter syntax consists of an expression language for
            +   * constructing a predicate from one or more fields of the documents being
            +   * filtered.
                *
                * One example is for `search` events, the associated
                * [SearchRequest][google.cloud.discoveryengine.v1beta.SearchRequest] may
            @@ -510,7 +563,7 @@ public interface UserEventOrBuilder
                * characters. Otherwise, an `INVALID_ARGUMENT` error is returned.
                * 
            * - * string filter = 9; + * string filter = 9 [(.google.api.field_behavior) = OPTIONAL]; * * @return The filter. */ @@ -520,8 +573,9 @@ public interface UserEventOrBuilder * * *
            -   * The filter syntax consists of an expression language for constructing a
            -   * predicate from one or more fields of the documents being filtered.
            +   * Optional. The filter syntax consists of an expression language for
            +   * constructing a predicate from one or more fields of the documents being
            +   * filtered.
                *
                * One example is for `search` events, the associated
                * [SearchRequest][google.cloud.discoveryengine.v1beta.SearchRequest] may
            @@ -539,7 +593,7 @@ public interface UserEventOrBuilder
                * characters. Otherwise, an `INVALID_ARGUMENT` error is returned.
                * 
            * - * string filter = 9; + * string filter = 9 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for filter. */ @@ -1278,4 +1332,81 @@ com.google.cloud.discoveryengine.v1beta.CustomAttribute getAttributesOrThrow( * */ com.google.cloud.discoveryengine.v1beta.PanelInfoOrBuilder getPanelsOrBuilder(int index); + + /** + * + * + *
            +   * Optional. This field is optional except for the `add-feedback` event types.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Feedback feedback = 23 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the feedback field is set. + */ + boolean hasFeedback(); + + /** + * + * + *
            +   * Optional. This field is optional except for the `add-feedback` event types.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Feedback feedback = 23 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The feedback. + */ + com.google.cloud.discoveryengine.v1beta.Feedback getFeedback(); + + /** + * + * + *
            +   * Optional. This field is optional except for the `add-feedback` event types.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.Feedback feedback = 23 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.discoveryengine.v1beta.FeedbackOrBuilder getFeedbackOrBuilder(); + + /** + * + * + *
            +   * Optional. Represents the entity for customers that may run multiple
            +   * different entities, domains, sites or regions, for example, `Google US`,
            +   * `Google Ads`, `Waymo`, `google.com`, `youtube.com`, etc. We recommend that
            +   * you set `entity` to get better per-entity search, completion, and
            +   * prediction results.
            +   * 
            + * + * string entity = 25 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The entity. + */ + java.lang.String getEntity(); + + /** + * + * + *
            +   * Optional. Represents the entity for customers that may run multiple
            +   * different entities, domains, sites or regions, for example, `Google US`,
            +   * `Google Ads`, `Waymo`, `google.com`, `youtube.com`, etc. We recommend that
            +   * you set `entity` to get better per-entity search, completion, and
            +   * prediction results.
            +   * 
            + * + * string entity = 25 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for entity. + */ + com.google.protobuf.ByteString getEntityBytes(); } diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/UserEventProto.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/UserEventProto.java index 996de52f0d97..ef33a5d42e15 100644 --- a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/UserEventProto.java +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/UserEventProto.java @@ -89,11 +89,12 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "4google/cloud/discoveryengine/v1beta/user_event.proto\022#google.cloud.discoveryen" + "gine.v1beta\032\037google/api/field_behavior.p" + "roto\032\031google/api/resource.proto\0320google/" - + "cloud/discoveryengine/v1beta/common.prot" - + "o\032\036google/protobuf/duration.proto\032\037google/protobuf/timestamp.proto\"\247" - + "\t\n" + + "cloud/discoveryengine/v1beta/common.proto\0322google/cloud/discoveryengine/v1beta/f" + + "eedback.proto\032\036google/protobuf/duration." + + "proto\032\037google/protobuf/timestamp.proto\"\245\n\n" + "\tUserEvent\022\027\n\n" - + "event_type\030\001 \001(\tB\003\340A\002\022\033\n" + + "event_type\030\001 \001(\tB\003\340A\002\022\034\n" + + "\017conversion_type\030\025 \001(\tB\003\340A\001\022\033\n" + "\016user_pseudo_id\030\002 \001(\tB\003\340A\002\022:\n" + "\006engine\030\023 \001(\tB*\372A\'\n" + "%discoveryengine.googleapis.com/Engine\022A\n\n" @@ -104,8 +105,8 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\023direct_user_request\030\005 \001(\010\022\022\n\n" + "session_id\030\006 \001(\t\022@\n" + "\tpage_info\030\007 \001(\0132-.google.cloud.discoveryengine.v1beta.PageInfo\022\031\n" - + "\021attribution_token\030\010 \001(\t\022\016\n" - + "\006filter\030\t \001(\t\022D\n" + + "\021attribution_token\030\010 \001(\t\022\023\n" + + "\006filter\030\t \001(\tB\003\340A\001\022D\n" + "\tdocuments\030\n" + " \003(\01321.google.cloud.discoveryengine.v1beta.DocumentInfo\022=\n" + "\005panel\030\013 \001(\0132..google.cloud.discoveryengine.v1beta.PanelInfo\022D\n" @@ -113,19 +114,22 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + " \001(\0132/.google.cloud.discoveryengine.v1beta.SearchInfo\022L\n" + "\017completion_info\030\r" + " \001(\01323.google.cloud.discoveryengine.v1beta.CompletionInfo\022N\n" - + "\020transaction_info\030\016 \001(\013" - + "24.google.cloud.discoveryengine.v1beta.TransactionInfo\022\017\n" + + "\020transaction_info\030\016" + + " \001(\01324.google.cloud.discoveryengine.v1beta.TransactionInfo\022\017\n" + "\007tag_ids\030\017 \003(\t\022\025\n\r" + "promotion_ids\030\020 \003(\t\022R\n\n" - + "attributes\030\021 \003(\0132>.goo" - + "gle.cloud.discoveryengine.v1beta.UserEvent.AttributesEntry\022B\n\n" + + "attributes\030\021 \003(" + + "\0132>.google.cloud.discoveryengine.v1beta.UserEvent.AttributesEntry\022B\n\n" + "media_info\030\022 \001(\0132..google.cloud.discoveryengine.v1beta.MediaInfo\022C\n" - + "\006panels\030\026" - + " \003(\0132..google.cloud.discoveryengine.v1beta.PanelInfoB\003\340A\001\032g\n" + + "\006panels\030\026 \003(\0132..google.c" + + "loud.discoveryengine.v1beta.PanelInfoB\003\340A\001\022D\n" + + "\010feedback\030\027" + + " \001(\0132-.google.cloud.discoveryengine.v1beta.FeedbackB\003\340A\001\022\023\n" + + "\006entity\030\031 \001(\tB\003\340A\001\032g\n" + "\017AttributesEntry\022\013\n" + "\003key\030\001 \001(\t\022C\n" - + "\005value\030\002 \001" - + "(\01324.google.cloud.discoveryengine.v1beta.CustomAttribute:\0028\001\"Y\n" + + "\005value\030\002 \001(\01324.google.cloud.disc" + + "overyengine.v1beta.CustomAttribute:\0028\001\"Y\n" + "\010PageInfo\022\023\n" + "\013pageview_id\030\001 \001(\t\022\025\n\r" + "page_category\030\002 \001(\t\022\013\n" @@ -149,7 +153,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\006_valueB\006\n" + "\004_taxB\007\n" + "\005_costB\021\n" - + "\017_discount_value\"\320\001\n" + + "\017_discount_value\"\211\002\n" + "\014DocumentInfo\022\014\n" + "\002id\030\001 \001(\tH\000\022<\n" + "\004name\030\002 \001(\tB,\372A)\n" @@ -157,9 +161,11 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\003uri\030\006 \001(\tH\000\022\025\n" + "\010quantity\030\003 \001(\005H\001\210\001\001\022\025\n\r" + "promotion_ids\030\004 \003(\t\022\023\n" - + "\006joined\030\005 \001(\010B\003\340A\003B\025\n" + + "\006joined\030\005 \001(\010B\003\340A\003\022\"\n" + + "\020conversion_value\030\007 \001(\002B\003\340A\001H\002\210\001\001B\025\n" + "\023document_descriptorB\013\n" - + "\t_quantity\"\337\001\n" + + "\t_quantityB\023\n" + + "\021_conversion_value\"\337\001\n" + "\tPanelInfo\022\025\n" + "\010panel_id\030\002 \001(\tB\003\340A\002\022\024\n" + "\014display_name\030\003 \001(\t\022\033\n" @@ -173,11 +179,12 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\027media_progress_duration\030\001 \001(\0132\031.google.protobuf.Duration\022&\n" + "\031media_progress_percentage\030\002 \001(\002H\000\210\001\001B\034\n" + "\032_media_progress_percentageB\225\002\n" - + "\'com.google.cloud.discoveryengine.v1betaB\016UserEventProtoP\001ZQ" - + "cloud.google.com/go/discoveryengine/apiv1beta/discoveryenginepb;discoveryenginep" - + "b\242\002\017DISCOVERYENGINE\252\002#Google.Cloud.Disco" - + "veryEngine.V1Beta\312\002#Google\\Cloud\\Discove" - + "ryEngine\\V1beta\352\002&Google::Cloud::DiscoveryEngine::V1betab\006proto3" + + "\'com.google.cloud.discoveryengine.v1betaB\016UserEventProtoP\001ZQcloud" + + ".google.com/go/discoveryengine/apiv1beta" + + "/discoveryenginepb;discoveryenginepb\242\002\017D" + + "ISCOVERYENGINE\252\002#Google.Cloud.DiscoveryE" + + "ngine.V1Beta\312\002#Google\\Cloud\\DiscoveryEng" + + "ine\\V1beta\352\002&Google::Cloud::DiscoveryEngine::V1betab\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -186,6 +193,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.api.FieldBehaviorProto.getDescriptor(), com.google.api.ResourceProto.getDescriptor(), com.google.cloud.discoveryengine.v1beta.CommonProto.getDescriptor(), + com.google.cloud.discoveryengine.v1beta.FeedbackProto.getDescriptor(), com.google.protobuf.DurationProto.getDescriptor(), com.google.protobuf.TimestampProto.getDescriptor(), }); @@ -196,6 +204,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { internal_static_google_cloud_discoveryengine_v1beta_UserEvent_descriptor, new java.lang.String[] { "EventType", + "ConversionType", "UserPseudoId", "Engine", "DataStore", @@ -216,6 +225,8 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Attributes", "MediaInfo", "Panels", + "Feedback", + "Entity", }); internal_static_google_cloud_discoveryengine_v1beta_UserEvent_AttributesEntry_descriptor = internal_static_google_cloud_discoveryengine_v1beta_UserEvent_descriptor.getNestedType(0); @@ -263,7 +274,14 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_cloud_discoveryengine_v1beta_DocumentInfo_descriptor, new java.lang.String[] { - "Id", "Name", "Uri", "Quantity", "PromotionIds", "Joined", "DocumentDescriptor", + "Id", + "Name", + "Uri", + "Quantity", + "PromotionIds", + "Joined", + "ConversionValue", + "DocumentDescriptor", }); internal_static_google_cloud_discoveryengine_v1beta_PanelInfo_descriptor = getDescriptor().getMessageType(6); @@ -285,6 +303,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.api.FieldBehaviorProto.getDescriptor(); com.google.api.ResourceProto.getDescriptor(); com.google.cloud.discoveryengine.v1beta.CommonProto.getDescriptor(); + com.google.cloud.discoveryengine.v1beta.FeedbackProto.getDescriptor(); com.google.protobuf.DurationProto.getDescriptor(); com.google.protobuf.TimestampProto.getDescriptor(); com.google.protobuf.ExtensionRegistry registry = diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/UserEventServiceProto.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/UserEventServiceProto.java index 1645fda600f5..e7bd108509f3 100644 --- a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/UserEventServiceProto.java +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/UserEventServiceProto.java @@ -80,7 +80,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\003uri\030\003 \001(\tH\000\210\001\001\022\020\n" + "\003ets\030\004 \001(\003H\001\210\001\001B\006\n" + "\004_uriB\006\n" - + "\004_ets2\374\014\n" + + "\004_ets2\373\016\n" + "\020UserEventService\022\204\003\n" + "\016WriteUserEvent\022:.google.cloud.discoveryengine.v1beta.WriteUserEventReque" + "st\032..google.cloud.discoveryengine.v1beta" @@ -102,22 +102,25 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + ".cloud.discoveryengine.v1beta.PurgeUserE" + "ventsMetadata\202\323\344\223\002\244\001\"E/v1beta/{parent=pr" + "ojects/*/locations/*/dataStores/*}/userEvents:purge:\001*ZX\"S/v1beta/{parent=projec" - + "ts/*/locations/*/collections/*/dataStores/*}/userEvents:purge:\001*\022\236\003\n" + + "ts/*/locations/*/collections/*/dataStores/*}/userEvents:purge:\001*\022\336\003\n" + "\020ImportUserEvents\022<.google.cloud.discoveryengine.v1b" - + "eta.ImportUserEventsRequest\032\035.google.longrunning.Operation\"\254\002\312A|\n" + + "eta.ImportUserEventsRequest\032\035.google.longrunning.Operation\"\354\002\312A|\n" + "\"9/v1beta/{parent=projects/*/location" + + "s/*}/userEvents:import:\001*\032\220\002\312A\036discovery" + + "engine.googleapis.com\322A\353\001https://www.goo" + + "gleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/discoveryengine." + + "assist.readwrite,https://www.googleapis.com/auth/discoveryengine.readwrite,https" + + "://www.googleapis.com/auth/discoveryengine.serving.readwriteB\234\002\n" + + "\'com.google.cloud.discoveryengine.v1betaB\025UserEventServi" + + "ceProtoP\001ZQcloud.google.com/go/discoveryengine/apiv1beta/discoveryenginepb;disco" + + "veryenginepb\242\002\017DISCOVERYENGINE\252\002#Google." + + "Cloud.DiscoveryEngine.V1Beta\312\002#Google\\Cl" + + "oud\\DiscoveryEngine\\V1beta\352\002&Google::Cloud::DiscoveryEngine::V1betab\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/UserInfo.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/UserInfo.java index c20e7611759d..05e6f3089e26 100644 --- a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/UserInfo.java +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/UserInfo.java @@ -54,6 +54,7 @@ private UserInfo(com.google.protobuf.GeneratedMessage.Builder builder) { private UserInfo() { userId_ = ""; userAgent_ = ""; + timeZone_ = ""; } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @@ -71,6 +72,1128 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { com.google.cloud.discoveryengine.v1beta.UserInfo.Builder.class); } + public interface PreciseLocationOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.UserInfo.PreciseLocation) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
            +     * Optional. Location represented by a latitude/longitude point.
            +     * 
            + * + * .google.type.LatLng point = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the point field is set. + */ + boolean hasPoint(); + + /** + * + * + *
            +     * Optional. Location represented by a latitude/longitude point.
            +     * 
            + * + * .google.type.LatLng point = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The point. + */ + com.google.type.LatLng getPoint(); + + /** + * + * + *
            +     * Optional. Location represented by a latitude/longitude point.
            +     * 
            + * + * .google.type.LatLng point = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + com.google.type.LatLngOrBuilder getPointOrBuilder(); + + /** + * + * + *
            +     * Optional. Location represented by a natural language address. Will
            +     * later be geocoded and converted to either a point or a polygon.
            +     * 
            + * + * string address = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the address field is set. + */ + boolean hasAddress(); + + /** + * + * + *
            +     * Optional. Location represented by a natural language address. Will
            +     * later be geocoded and converted to either a point or a polygon.
            +     * 
            + * + * string address = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The address. + */ + java.lang.String getAddress(); + + /** + * + * + *
            +     * Optional. Location represented by a natural language address. Will
            +     * later be geocoded and converted to either a point or a polygon.
            +     * 
            + * + * string address = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for address. + */ + com.google.protobuf.ByteString getAddressBytes(); + + com.google.cloud.discoveryengine.v1beta.UserInfo.PreciseLocation.LocationCase getLocationCase(); + } + + /** + * + * + *
            +   * Precise location info with multiple representation options.
            +   * Currently only latitude and longitude point is supported.
            +   * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.UserInfo.PreciseLocation} + */ + public static final class PreciseLocation extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.UserInfo.PreciseLocation) + PreciseLocationOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "PreciseLocation"); + } + + // Use PreciseLocation.newBuilder() to construct. + private PreciseLocation(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private PreciseLocation() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.CommonProto + .internal_static_google_cloud_discoveryengine_v1beta_UserInfo_PreciseLocation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.CommonProto + .internal_static_google_cloud_discoveryengine_v1beta_UserInfo_PreciseLocation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.UserInfo.PreciseLocation.class, + com.google.cloud.discoveryengine.v1beta.UserInfo.PreciseLocation.Builder.class); + } + + private int locationCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object location_; + + public enum LocationCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + POINT(1), + ADDRESS(2), + LOCATION_NOT_SET(0); + private final int value; + + private LocationCase(int value) { + this.value = value; + } + + /** + * @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 LocationCase valueOf(int value) { + return forNumber(value); + } + + public static LocationCase forNumber(int value) { + switch (value) { + case 1: + return POINT; + case 2: + return ADDRESS; + case 0: + return LOCATION_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public LocationCase getLocationCase() { + return LocationCase.forNumber(locationCase_); + } + + public static final int POINT_FIELD_NUMBER = 1; + + /** + * + * + *
            +     * Optional. Location represented by a latitude/longitude point.
            +     * 
            + * + * .google.type.LatLng point = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the point field is set. + */ + @java.lang.Override + public boolean hasPoint() { + return locationCase_ == 1; + } + + /** + * + * + *
            +     * Optional. Location represented by a latitude/longitude point.
            +     * 
            + * + * .google.type.LatLng point = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The point. + */ + @java.lang.Override + public com.google.type.LatLng getPoint() { + if (locationCase_ == 1) { + return (com.google.type.LatLng) location_; + } + return com.google.type.LatLng.getDefaultInstance(); + } + + /** + * + * + *
            +     * Optional. Location represented by a latitude/longitude point.
            +     * 
            + * + * .google.type.LatLng point = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public com.google.type.LatLngOrBuilder getPointOrBuilder() { + if (locationCase_ == 1) { + return (com.google.type.LatLng) location_; + } + return com.google.type.LatLng.getDefaultInstance(); + } + + public static final int ADDRESS_FIELD_NUMBER = 2; + + /** + * + * + *
            +     * Optional. Location represented by a natural language address. Will
            +     * later be geocoded and converted to either a point or a polygon.
            +     * 
            + * + * string address = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the address field is set. + */ + public boolean hasAddress() { + return locationCase_ == 2; + } + + /** + * + * + *
            +     * Optional. Location represented by a natural language address. Will
            +     * later be geocoded and converted to either a point or a polygon.
            +     * 
            + * + * string address = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The address. + */ + public java.lang.String getAddress() { + java.lang.Object ref = ""; + if (locationCase_ == 2) { + ref = location_; + } + 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(); + if (locationCase_ == 2) { + location_ = s; + } + return s; + } + } + + /** + * + * + *
            +     * Optional. Location represented by a natural language address. Will
            +     * later be geocoded and converted to either a point or a polygon.
            +     * 
            + * + * string address = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for address. + */ + public com.google.protobuf.ByteString getAddressBytes() { + java.lang.Object ref = ""; + if (locationCase_ == 2) { + ref = location_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (locationCase_ == 2) { + location_ = 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 { + if (locationCase_ == 1) { + output.writeMessage(1, (com.google.type.LatLng) location_); + } + if (locationCase_ == 2) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, location_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (locationCase_ == 1) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 1, (com.google.type.LatLng) location_); + } + if (locationCase_ == 2) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, location_); + } + 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.discoveryengine.v1beta.UserInfo.PreciseLocation)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1beta.UserInfo.PreciseLocation other = + (com.google.cloud.discoveryengine.v1beta.UserInfo.PreciseLocation) obj; + + if (!getLocationCase().equals(other.getLocationCase())) return false; + switch (locationCase_) { + case 1: + if (!getPoint().equals(other.getPoint())) return false; + break; + case 2: + if (!getAddress().equals(other.getAddress())) return false; + break; + case 0: + default: + } + 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(); + switch (locationCase_) { + case 1: + hash = (37 * hash) + POINT_FIELD_NUMBER; + hash = (53 * hash) + getPoint().hashCode(); + break; + case 2: + hash = (37 * hash) + ADDRESS_FIELD_NUMBER; + hash = (53 * hash) + getAddress().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1beta.UserInfo.PreciseLocation parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.UserInfo.PreciseLocation 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.discoveryengine.v1beta.UserInfo.PreciseLocation parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.UserInfo.PreciseLocation 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.discoveryengine.v1beta.UserInfo.PreciseLocation parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.UserInfo.PreciseLocation parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1beta.UserInfo.PreciseLocation parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.UserInfo.PreciseLocation 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.discoveryengine.v1beta.UserInfo.PreciseLocation + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.UserInfo.PreciseLocation + 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.discoveryengine.v1beta.UserInfo.PreciseLocation parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.UserInfo.PreciseLocation 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.discoveryengine.v1beta.UserInfo.PreciseLocation 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; + } + + /** + * + * + *
            +     * Precise location info with multiple representation options.
            +     * Currently only latitude and longitude point is supported.
            +     * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.UserInfo.PreciseLocation} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.UserInfo.PreciseLocation) + com.google.cloud.discoveryengine.v1beta.UserInfo.PreciseLocationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.CommonProto + .internal_static_google_cloud_discoveryengine_v1beta_UserInfo_PreciseLocation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.CommonProto + .internal_static_google_cloud_discoveryengine_v1beta_UserInfo_PreciseLocation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.UserInfo.PreciseLocation.class, + com.google.cloud.discoveryengine.v1beta.UserInfo.PreciseLocation.Builder.class); + } + + // Construct using + // com.google.cloud.discoveryengine.v1beta.UserInfo.PreciseLocation.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (pointBuilder_ != null) { + pointBuilder_.clear(); + } + locationCase_ = 0; + location_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1beta.CommonProto + .internal_static_google_cloud_discoveryengine_v1beta_UserInfo_PreciseLocation_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.UserInfo.PreciseLocation + getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1beta.UserInfo.PreciseLocation + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.UserInfo.PreciseLocation build() { + com.google.cloud.discoveryengine.v1beta.UserInfo.PreciseLocation result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.UserInfo.PreciseLocation buildPartial() { + com.google.cloud.discoveryengine.v1beta.UserInfo.PreciseLocation result = + new com.google.cloud.discoveryengine.v1beta.UserInfo.PreciseLocation(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.discoveryengine.v1beta.UserInfo.PreciseLocation result) { + int from_bitField0_ = bitField0_; + } + + private void buildPartialOneofs( + com.google.cloud.discoveryengine.v1beta.UserInfo.PreciseLocation result) { + result.locationCase_ = locationCase_; + result.location_ = this.location_; + if (locationCase_ == 1 && pointBuilder_ != null) { + result.location_ = pointBuilder_.build(); + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.discoveryengine.v1beta.UserInfo.PreciseLocation) { + return mergeFrom( + (com.google.cloud.discoveryengine.v1beta.UserInfo.PreciseLocation) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.discoveryengine.v1beta.UserInfo.PreciseLocation other) { + if (other + == com.google.cloud.discoveryengine.v1beta.UserInfo.PreciseLocation + .getDefaultInstance()) return this; + switch (other.getLocationCase()) { + case POINT: + { + mergePoint(other.getPoint()); + break; + } + case ADDRESS: + { + locationCase_ = 2; + location_ = other.location_; + onChanged(); + break; + } + case LOCATION_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(internalGetPointFieldBuilder().getBuilder(), extensionRegistry); + locationCase_ = 1; + break; + } // case 10 + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + locationCase_ = 2; + location_ = s; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int locationCase_ = 0; + private java.lang.Object location_; + + public LocationCase getLocationCase() { + return LocationCase.forNumber(locationCase_); + } + + public Builder clearLocation() { + locationCase_ = 0; + location_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private com.google.protobuf.SingleFieldBuilder< + com.google.type.LatLng, + com.google.type.LatLng.Builder, + com.google.type.LatLngOrBuilder> + pointBuilder_; + + /** + * + * + *
            +       * Optional. Location represented by a latitude/longitude point.
            +       * 
            + * + * .google.type.LatLng point = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the point field is set. + */ + @java.lang.Override + public boolean hasPoint() { + return locationCase_ == 1; + } + + /** + * + * + *
            +       * Optional. Location represented by a latitude/longitude point.
            +       * 
            + * + * .google.type.LatLng point = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The point. + */ + @java.lang.Override + public com.google.type.LatLng getPoint() { + if (pointBuilder_ == null) { + if (locationCase_ == 1) { + return (com.google.type.LatLng) location_; + } + return com.google.type.LatLng.getDefaultInstance(); + } else { + if (locationCase_ == 1) { + return pointBuilder_.getMessage(); + } + return com.google.type.LatLng.getDefaultInstance(); + } + } + + /** + * + * + *
            +       * Optional. Location represented by a latitude/longitude point.
            +       * 
            + * + * .google.type.LatLng point = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder setPoint(com.google.type.LatLng value) { + if (pointBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + location_ = value; + onChanged(); + } else { + pointBuilder_.setMessage(value); + } + locationCase_ = 1; + return this; + } + + /** + * + * + *
            +       * Optional. Location represented by a latitude/longitude point.
            +       * 
            + * + * .google.type.LatLng point = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder setPoint(com.google.type.LatLng.Builder builderForValue) { + if (pointBuilder_ == null) { + location_ = builderForValue.build(); + onChanged(); + } else { + pointBuilder_.setMessage(builderForValue.build()); + } + locationCase_ = 1; + return this; + } + + /** + * + * + *
            +       * Optional. Location represented by a latitude/longitude point.
            +       * 
            + * + * .google.type.LatLng point = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder mergePoint(com.google.type.LatLng value) { + if (pointBuilder_ == null) { + if (locationCase_ == 1 && location_ != com.google.type.LatLng.getDefaultInstance()) { + location_ = + com.google.type.LatLng.newBuilder((com.google.type.LatLng) location_) + .mergeFrom(value) + .buildPartial(); + } else { + location_ = value; + } + onChanged(); + } else { + if (locationCase_ == 1) { + pointBuilder_.mergeFrom(value); + } else { + pointBuilder_.setMessage(value); + } + } + locationCase_ = 1; + return this; + } + + /** + * + * + *
            +       * Optional. Location represented by a latitude/longitude point.
            +       * 
            + * + * .google.type.LatLng point = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder clearPoint() { + if (pointBuilder_ == null) { + if (locationCase_ == 1) { + locationCase_ = 0; + location_ = null; + onChanged(); + } + } else { + if (locationCase_ == 1) { + locationCase_ = 0; + location_ = null; + } + pointBuilder_.clear(); + } + return this; + } + + /** + * + * + *
            +       * Optional. Location represented by a latitude/longitude point.
            +       * 
            + * + * .google.type.LatLng point = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + public com.google.type.LatLng.Builder getPointBuilder() { + return internalGetPointFieldBuilder().getBuilder(); + } + + /** + * + * + *
            +       * Optional. Location represented by a latitude/longitude point.
            +       * 
            + * + * .google.type.LatLng point = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public com.google.type.LatLngOrBuilder getPointOrBuilder() { + if ((locationCase_ == 1) && (pointBuilder_ != null)) { + return pointBuilder_.getMessageOrBuilder(); + } else { + if (locationCase_ == 1) { + return (com.google.type.LatLng) location_; + } + return com.google.type.LatLng.getDefaultInstance(); + } + } + + /** + * + * + *
            +       * Optional. Location represented by a latitude/longitude point.
            +       * 
            + * + * .google.type.LatLng point = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.type.LatLng, + com.google.type.LatLng.Builder, + com.google.type.LatLngOrBuilder> + internalGetPointFieldBuilder() { + if (pointBuilder_ == null) { + if (!(locationCase_ == 1)) { + location_ = com.google.type.LatLng.getDefaultInstance(); + } + pointBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.type.LatLng, + com.google.type.LatLng.Builder, + com.google.type.LatLngOrBuilder>( + (com.google.type.LatLng) location_, getParentForChildren(), isClean()); + location_ = null; + } + locationCase_ = 1; + onChanged(); + return pointBuilder_; + } + + /** + * + * + *
            +       * Optional. Location represented by a natural language address. Will
            +       * later be geocoded and converted to either a point or a polygon.
            +       * 
            + * + * string address = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the address field is set. + */ + @java.lang.Override + public boolean hasAddress() { + return locationCase_ == 2; + } + + /** + * + * + *
            +       * Optional. Location represented by a natural language address. Will
            +       * later be geocoded and converted to either a point or a polygon.
            +       * 
            + * + * string address = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The address. + */ + @java.lang.Override + public java.lang.String getAddress() { + java.lang.Object ref = ""; + if (locationCase_ == 2) { + ref = location_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (locationCase_ == 2) { + location_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
            +       * Optional. Location represented by a natural language address. Will
            +       * later be geocoded and converted to either a point or a polygon.
            +       * 
            + * + * string address = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for address. + */ + @java.lang.Override + public com.google.protobuf.ByteString getAddressBytes() { + java.lang.Object ref = ""; + if (locationCase_ == 2) { + ref = location_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (locationCase_ == 2) { + location_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
            +       * Optional. Location represented by a natural language address. Will
            +       * later be geocoded and converted to either a point or a polygon.
            +       * 
            + * + * string address = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The address to set. + * @return This builder for chaining. + */ + public Builder setAddress(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + locationCase_ = 2; + location_ = value; + onChanged(); + return this; + } + + /** + * + * + *
            +       * Optional. Location represented by a natural language address. Will
            +       * later be geocoded and converted to either a point or a polygon.
            +       * 
            + * + * string address = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearAddress() { + if (locationCase_ == 2) { + locationCase_ = 0; + location_ = null; + onChanged(); + } + return this; + } + + /** + * + * + *
            +       * Optional. Location represented by a natural language address. Will
            +       * later be geocoded and converted to either a point or a polygon.
            +       * 
            + * + * string address = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for address to set. + * @return This builder for chaining. + */ + public Builder setAddressBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + locationCase_ = 2; + location_ = value; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.UserInfo.PreciseLocation) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.UserInfo.PreciseLocation) + private static final com.google.cloud.discoveryengine.v1beta.UserInfo.PreciseLocation + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.discoveryengine.v1beta.UserInfo.PreciseLocation(); + } + + public static com.google.cloud.discoveryengine.v1beta.UserInfo.PreciseLocation + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PreciseLocation parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.UserInfo.PreciseLocation + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int bitField0_; public static final int USER_ID_FIELD_NUMBER = 1; @SuppressWarnings("serial") @@ -91,6 +1214,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * The field must be a UTF-8 encoded string with a length limit of 128 * characters. Otherwise, an `INVALID_ARGUMENT` error is returned. + * + * Represents an opaque ID to the Search API. The Search API doesn't + * interpret the value in any way. This field is used to associate events + * with a user across sessions if the events are being uploaded. * * * string user_id = 1; @@ -125,6 +1252,10 @@ public java.lang.String getUserId() { * * The field must be a UTF-8 encoded string with a length limit of 128 * characters. Otherwise, an `INVALID_ARGUMENT` error is returned. + * + * Represents an opaque ID to the Search API. The Search API doesn't + * interpret the value in any way. This field is used to associate events + * with a user across sessions if the events are being uploaded. * * * string user_id = 1; @@ -168,53 +1299,172 @@ public com.google.protobuf.ByteString getUserIdBytes() { * * string user_agent = 2; * - * @return The userAgent. + * @return The userAgent. + */ + @java.lang.Override + public java.lang.String getUserAgent() { + java.lang.Object ref = userAgent_; + 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(); + userAgent_ = s; + return s; + } + } + + /** + * + * + *
            +   * User agent as included in the HTTP header.
            +   *
            +   * The field must be a UTF-8 encoded string with a length limit of 1,000
            +   * characters. Otherwise, an `INVALID_ARGUMENT` error is returned.
            +   *
            +   * This should not be set when using the client side event reporting with
            +   * GTM or JavaScript tag in
            +   * [UserEventService.CollectUserEvent][google.cloud.discoveryengine.v1beta.UserEventService.CollectUserEvent]
            +   * or if
            +   * [UserEvent.direct_user_request][google.cloud.discoveryengine.v1beta.UserEvent.direct_user_request]
            +   * is set.
            +   * 
            + * + * string user_agent = 2; + * + * @return The bytes for userAgent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getUserAgentBytes() { + java.lang.Object ref = userAgent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + userAgent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TIME_ZONE_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object timeZone_ = ""; + + /** + * + * + *
            +   * Optional. IANA time zone, e.g. Europe/Budapest.
            +   * 
            + * + * string time_zone = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The timeZone. + */ + @java.lang.Override + public java.lang.String getTimeZone() { + java.lang.Object ref = timeZone_; + 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(); + timeZone_ = s; + return s; + } + } + + /** + * + * + *
            +   * Optional. IANA time zone, e.g. Europe/Budapest.
            +   * 
            + * + * string time_zone = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for timeZone. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTimeZoneBytes() { + java.lang.Object ref = timeZone_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + timeZone_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PRECISE_LOCATION_FIELD_NUMBER = 4; + private com.google.cloud.discoveryengine.v1beta.UserInfo.PreciseLocation preciseLocation_; + + /** + * + * + *
            +   * Optional. Input only. Precise location of the user.
            +   * It is used in Custom Ranking to calculate the distance between the user and
            +   * the relevant documents.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.UserInfo.PreciseLocation precise_location = 4 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the preciseLocation field is set. */ @java.lang.Override - public java.lang.String getUserAgent() { - java.lang.Object ref = userAgent_; - 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(); - userAgent_ = s; - return s; - } + public boolean hasPreciseLocation() { + return ((bitField0_ & 0x00000001) != 0); } /** * * *
            -   * User agent as included in the HTTP header.
            +   * Optional. Input only. Precise location of the user.
            +   * It is used in Custom Ranking to calculate the distance between the user and
            +   * the relevant documents.
            +   * 
            * - * The field must be a UTF-8 encoded string with a length limit of 1,000 - * characters. Otherwise, an `INVALID_ARGUMENT` error is returned. + * + * .google.cloud.discoveryengine.v1beta.UserInfo.PreciseLocation precise_location = 4 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = OPTIONAL]; + * * - * This should not be set when using the client side event reporting with - * GTM or JavaScript tag in - * [UserEventService.CollectUserEvent][google.cloud.discoveryengine.v1beta.UserEventService.CollectUserEvent] - * or if - * [UserEvent.direct_user_request][google.cloud.discoveryengine.v1beta.UserEvent.direct_user_request] - * is set. - * + * @return The preciseLocation. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.UserInfo.PreciseLocation getPreciseLocation() { + return preciseLocation_ == null + ? com.google.cloud.discoveryengine.v1beta.UserInfo.PreciseLocation.getDefaultInstance() + : preciseLocation_; + } + + /** * - * string user_agent = 2; * - * @return The bytes for userAgent. + *
            +   * Optional. Input only. Precise location of the user.
            +   * It is used in Custom Ranking to calculate the distance between the user and
            +   * the relevant documents.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.UserInfo.PreciseLocation precise_location = 4 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = OPTIONAL]; + * */ @java.lang.Override - public com.google.protobuf.ByteString getUserAgentBytes() { - java.lang.Object ref = userAgent_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - userAgent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } + public com.google.cloud.discoveryengine.v1beta.UserInfo.PreciseLocationOrBuilder + getPreciseLocationOrBuilder() { + return preciseLocation_ == null + ? com.google.cloud.discoveryengine.v1beta.UserInfo.PreciseLocation.getDefaultInstance() + : preciseLocation_; } private byte memoizedIsInitialized = -1; @@ -237,6 +1487,12 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessage.isStringEmpty(userAgent_)) { com.google.protobuf.GeneratedMessage.writeString(output, 2, userAgent_); } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(timeZone_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, timeZone_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(4, getPreciseLocation()); + } getUnknownFields().writeTo(output); } @@ -252,6 +1508,12 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessage.isStringEmpty(userAgent_)) { size += com.google.protobuf.GeneratedMessage.computeStringSize(2, userAgent_); } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(timeZone_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, timeZone_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getPreciseLocation()); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -270,6 +1532,11 @@ public boolean equals(final java.lang.Object obj) { if (!getUserId().equals(other.getUserId())) return false; if (!getUserAgent().equals(other.getUserAgent())) return false; + if (!getTimeZone().equals(other.getTimeZone())) return false; + if (hasPreciseLocation() != other.hasPreciseLocation()) return false; + if (hasPreciseLocation()) { + if (!getPreciseLocation().equals(other.getPreciseLocation())) return false; + } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -285,6 +1552,12 @@ public int hashCode() { hash = (53 * hash) + getUserId().hashCode(); hash = (37 * hash) + USER_AGENT_FIELD_NUMBER; hash = (53 * hash) + getUserAgent().hashCode(); + hash = (37 * hash) + TIME_ZONE_FIELD_NUMBER; + hash = (53 * hash) + getTimeZone().hashCode(); + if (hasPreciseLocation()) { + hash = (37 * hash) + PRECISE_LOCATION_FIELD_NUMBER; + hash = (53 * hash) + getPreciseLocation().hashCode(); + } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -415,10 +1688,19 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.discoveryengine.v1beta.UserInfo.newBuilder() - private Builder() {} + private Builder() { + maybeForceBuilderInitialization(); + } private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetPreciseLocationFieldBuilder(); + } } @java.lang.Override @@ -427,6 +1709,12 @@ public Builder clear() { bitField0_ = 0; userId_ = ""; userAgent_ = ""; + timeZone_ = ""; + preciseLocation_ = null; + if (preciseLocationBuilder_ != null) { + preciseLocationBuilder_.dispose(); + preciseLocationBuilder_ = null; + } return this; } @@ -469,6 +1757,16 @@ private void buildPartial0(com.google.cloud.discoveryengine.v1beta.UserInfo resu if (((from_bitField0_ & 0x00000002) != 0)) { result.userAgent_ = userAgent_; } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.timeZone_ = timeZone_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000008) != 0)) { + result.preciseLocation_ = + preciseLocationBuilder_ == null ? preciseLocation_ : preciseLocationBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; } @java.lang.Override @@ -494,6 +1792,14 @@ public Builder mergeFrom(com.google.cloud.discoveryengine.v1beta.UserInfo other) bitField0_ |= 0x00000002; onChanged(); } + if (!other.getTimeZone().isEmpty()) { + timeZone_ = other.timeZone_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (other.hasPreciseLocation()) { + mergePreciseLocation(other.getPreciseLocation()); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -532,6 +1838,19 @@ public Builder mergeFrom( bitField0_ |= 0x00000002; break; } // case 18 + case 26: + { + timeZone_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + input.readMessage( + internalGetPreciseLocationFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 34 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -568,6 +1887,10 @@ public Builder mergeFrom( * * The field must be a UTF-8 encoded string with a length limit of 128 * characters. Otherwise, an `INVALID_ARGUMENT` error is returned. + * + * Represents an opaque ID to the Search API. The Search API doesn't + * interpret the value in any way. This field is used to associate events + * with a user across sessions if the events are being uploaded. * * * string user_id = 1; @@ -601,6 +1924,10 @@ public java.lang.String getUserId() { * * The field must be a UTF-8 encoded string with a length limit of 128 * characters. Otherwise, an `INVALID_ARGUMENT` error is returned. + * + * Represents an opaque ID to the Search API. The Search API doesn't + * interpret the value in any way. This field is used to associate events + * with a user across sessions if the events are being uploaded. * * * string user_id = 1; @@ -634,6 +1961,10 @@ public com.google.protobuf.ByteString getUserIdBytes() { * * The field must be a UTF-8 encoded string with a length limit of 128 * characters. Otherwise, an `INVALID_ARGUMENT` error is returned. + * + * Represents an opaque ID to the Search API. The Search API doesn't + * interpret the value in any way. This field is used to associate events + * with a user across sessions if the events are being uploaded. * * * string user_id = 1; @@ -666,6 +1997,10 @@ public Builder setUserId(java.lang.String value) { * * The field must be a UTF-8 encoded string with a length limit of 128 * characters. Otherwise, an `INVALID_ARGUMENT` error is returned. + * + * Represents an opaque ID to the Search API. The Search API doesn't + * interpret the value in any way. This field is used to associate events + * with a user across sessions if the events are being uploaded. * * * string user_id = 1; @@ -694,6 +2029,10 @@ public Builder clearUserId() { * * The field must be a UTF-8 encoded string with a length limit of 128 * characters. Otherwise, an `INVALID_ARGUMENT` error is returned. + * + * Represents an opaque ID to the Search API. The Search API doesn't + * interpret the value in any way. This field is used to associate events + * with a user across sessions if the events are being uploaded. * * * string user_id = 1; @@ -873,6 +2212,354 @@ public Builder setUserAgentBytes(com.google.protobuf.ByteString value) { return this; } + private java.lang.Object timeZone_ = ""; + + /** + * + * + *
            +     * Optional. IANA time zone, e.g. Europe/Budapest.
            +     * 
            + * + * string time_zone = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The timeZone. + */ + public java.lang.String getTimeZone() { + java.lang.Object ref = timeZone_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + timeZone_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
            +     * Optional. IANA time zone, e.g. Europe/Budapest.
            +     * 
            + * + * string time_zone = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for timeZone. + */ + public com.google.protobuf.ByteString getTimeZoneBytes() { + java.lang.Object ref = timeZone_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + timeZone_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
            +     * Optional. IANA time zone, e.g. Europe/Budapest.
            +     * 
            + * + * string time_zone = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The timeZone to set. + * @return This builder for chaining. + */ + public Builder setTimeZone(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + timeZone_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Optional. IANA time zone, e.g. Europe/Budapest.
            +     * 
            + * + * string time_zone = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearTimeZone() { + timeZone_ = getDefaultInstance().getTimeZone(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
            +     * Optional. IANA time zone, e.g. Europe/Budapest.
            +     * 
            + * + * string time_zone = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for timeZone to set. + * @return This builder for chaining. + */ + public Builder setTimeZoneBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + timeZone_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private com.google.cloud.discoveryengine.v1beta.UserInfo.PreciseLocation preciseLocation_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.UserInfo.PreciseLocation, + com.google.cloud.discoveryengine.v1beta.UserInfo.PreciseLocation.Builder, + com.google.cloud.discoveryengine.v1beta.UserInfo.PreciseLocationOrBuilder> + preciseLocationBuilder_; + + /** + * + * + *
            +     * Optional. Input only. Precise location of the user.
            +     * It is used in Custom Ranking to calculate the distance between the user and
            +     * the relevant documents.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.UserInfo.PreciseLocation precise_location = 4 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the preciseLocation field is set. + */ + public boolean hasPreciseLocation() { + return ((bitField0_ & 0x00000008) != 0); + } + + /** + * + * + *
            +     * Optional. Input only. Precise location of the user.
            +     * It is used in Custom Ranking to calculate the distance between the user and
            +     * the relevant documents.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.UserInfo.PreciseLocation precise_location = 4 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The preciseLocation. + */ + public com.google.cloud.discoveryengine.v1beta.UserInfo.PreciseLocation getPreciseLocation() { + if (preciseLocationBuilder_ == null) { + return preciseLocation_ == null + ? com.google.cloud.discoveryengine.v1beta.UserInfo.PreciseLocation.getDefaultInstance() + : preciseLocation_; + } else { + return preciseLocationBuilder_.getMessage(); + } + } + + /** + * + * + *
            +     * Optional. Input only. Precise location of the user.
            +     * It is used in Custom Ranking to calculate the distance between the user and
            +     * the relevant documents.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.UserInfo.PreciseLocation precise_location = 4 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setPreciseLocation( + com.google.cloud.discoveryengine.v1beta.UserInfo.PreciseLocation value) { + if (preciseLocationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + preciseLocation_ = value; + } else { + preciseLocationBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Optional. Input only. Precise location of the user.
            +     * It is used in Custom Ranking to calculate the distance between the user and
            +     * the relevant documents.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.UserInfo.PreciseLocation precise_location = 4 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setPreciseLocation( + com.google.cloud.discoveryengine.v1beta.UserInfo.PreciseLocation.Builder builderForValue) { + if (preciseLocationBuilder_ == null) { + preciseLocation_ = builderForValue.build(); + } else { + preciseLocationBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Optional. Input only. Precise location of the user.
            +     * It is used in Custom Ranking to calculate the distance between the user and
            +     * the relevant documents.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.UserInfo.PreciseLocation precise_location = 4 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergePreciseLocation( + com.google.cloud.discoveryengine.v1beta.UserInfo.PreciseLocation value) { + if (preciseLocationBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) + && preciseLocation_ != null + && preciseLocation_ + != com.google.cloud.discoveryengine.v1beta.UserInfo.PreciseLocation + .getDefaultInstance()) { + getPreciseLocationBuilder().mergeFrom(value); + } else { + preciseLocation_ = value; + } + } else { + preciseLocationBuilder_.mergeFrom(value); + } + if (preciseLocation_ != null) { + bitField0_ |= 0x00000008; + onChanged(); + } + return this; + } + + /** + * + * + *
            +     * Optional. Input only. Precise location of the user.
            +     * It is used in Custom Ranking to calculate the distance between the user and
            +     * the relevant documents.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.UserInfo.PreciseLocation precise_location = 4 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearPreciseLocation() { + bitField0_ = (bitField0_ & ~0x00000008); + preciseLocation_ = null; + if (preciseLocationBuilder_ != null) { + preciseLocationBuilder_.dispose(); + preciseLocationBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
            +     * Optional. Input only. Precise location of the user.
            +     * It is used in Custom Ranking to calculate the distance between the user and
            +     * the relevant documents.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.UserInfo.PreciseLocation precise_location = 4 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.discoveryengine.v1beta.UserInfo.PreciseLocation.Builder + getPreciseLocationBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return internalGetPreciseLocationFieldBuilder().getBuilder(); + } + + /** + * + * + *
            +     * Optional. Input only. Precise location of the user.
            +     * It is used in Custom Ranking to calculate the distance between the user and
            +     * the relevant documents.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.UserInfo.PreciseLocation precise_location = 4 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.discoveryengine.v1beta.UserInfo.PreciseLocationOrBuilder + getPreciseLocationOrBuilder() { + if (preciseLocationBuilder_ != null) { + return preciseLocationBuilder_.getMessageOrBuilder(); + } else { + return preciseLocation_ == null + ? com.google.cloud.discoveryengine.v1beta.UserInfo.PreciseLocation.getDefaultInstance() + : preciseLocation_; + } + } + + /** + * + * + *
            +     * Optional. Input only. Precise location of the user.
            +     * It is used in Custom Ranking to calculate the distance between the user and
            +     * the relevant documents.
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.UserInfo.PreciseLocation precise_location = 4 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.UserInfo.PreciseLocation, + com.google.cloud.discoveryengine.v1beta.UserInfo.PreciseLocation.Builder, + com.google.cloud.discoveryengine.v1beta.UserInfo.PreciseLocationOrBuilder> + internalGetPreciseLocationFieldBuilder() { + if (preciseLocationBuilder_ == null) { + preciseLocationBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.discoveryengine.v1beta.UserInfo.PreciseLocation, + com.google.cloud.discoveryengine.v1beta.UserInfo.PreciseLocation.Builder, + com.google.cloud.discoveryengine.v1beta.UserInfo.PreciseLocationOrBuilder>( + getPreciseLocation(), getParentForChildren(), isClean()); + preciseLocation_ = null; + } + return preciseLocationBuilder_; + } + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.UserInfo) } diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/UserInfoOrBuilder.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/UserInfoOrBuilder.java index 9b2340dd2a70..c8d521b3ef55 100644 --- a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/UserInfoOrBuilder.java +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/UserInfoOrBuilder.java @@ -41,6 +41,10 @@ public interface UserInfoOrBuilder * * The field must be a UTF-8 encoded string with a length limit of 128 * characters. Otherwise, an `INVALID_ARGUMENT` error is returned. + * + * Represents an opaque ID to the Search API. The Search API doesn't + * interpret the value in any way. This field is used to associate events + * with a user across sessions if the events are being uploaded. * * * string user_id = 1; @@ -64,6 +68,10 @@ public interface UserInfoOrBuilder * * The field must be a UTF-8 encoded string with a length limit of 128 * characters. Otherwise, an `INVALID_ARGUMENT` error is returned. + * + * Represents an opaque ID to the Search API. The Search API doesn't + * interpret the value in any way. This field is used to associate events + * with a user across sessions if the events are being uploaded. * * * string user_id = 1; @@ -117,4 +125,80 @@ public interface UserInfoOrBuilder * @return The bytes for userAgent. */ com.google.protobuf.ByteString getUserAgentBytes(); + + /** + * + * + *
            +   * Optional. IANA time zone, e.g. Europe/Budapest.
            +   * 
            + * + * string time_zone = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The timeZone. + */ + java.lang.String getTimeZone(); + + /** + * + * + *
            +   * Optional. IANA time zone, e.g. Europe/Budapest.
            +   * 
            + * + * string time_zone = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for timeZone. + */ + com.google.protobuf.ByteString getTimeZoneBytes(); + + /** + * + * + *
            +   * Optional. Input only. Precise location of the user.
            +   * It is used in Custom Ranking to calculate the distance between the user and
            +   * the relevant documents.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.UserInfo.PreciseLocation precise_location = 4 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the preciseLocation field is set. + */ + boolean hasPreciseLocation(); + + /** + * + * + *
            +   * Optional. Input only. Precise location of the user.
            +   * It is used in Custom Ranking to calculate the distance between the user and
            +   * the relevant documents.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.UserInfo.PreciseLocation precise_location = 4 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The preciseLocation. + */ + com.google.cloud.discoveryengine.v1beta.UserInfo.PreciseLocation getPreciseLocation(); + + /** + * + * + *
            +   * Optional. Input only. Precise location of the user.
            +   * It is used in Custom Ranking to calculate the distance between the user and
            +   * the relevant documents.
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.UserInfo.PreciseLocation precise_location = 4 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.discoveryengine.v1beta.UserInfo.PreciseLocationOrBuilder + getPreciseLocationOrBuilder(); } diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/UserLicense.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/UserLicense.java new file mode 100644 index 000000000000..793dba8624f9 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/UserLicense.java @@ -0,0 +1,2420 @@ +/* + * 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/cloud/discoveryengine/v1beta/user_license.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.discoveryengine.v1beta; + +/** + * + * + *
            + * User License information assigned by the admin.
            + * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.UserLicense} + */ +@com.google.protobuf.Generated +public final class UserLicense extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.UserLicense) + UserLicenseOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "UserLicense"); + } + + // Use UserLicense.newBuilder() to construct. + private UserLicense(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private UserLicense() { + userPrincipal_ = ""; + userProfile_ = ""; + licenseAssignmentState_ = 0; + licenseConfig_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.UserLicenseProto + .internal_static_google_cloud_discoveryengine_v1beta_UserLicense_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.UserLicenseProto + .internal_static_google_cloud_discoveryengine_v1beta_UserLicense_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.UserLicense.class, + com.google.cloud.discoveryengine.v1beta.UserLicense.Builder.class); + } + + /** + * + * + *
            +   * License assignment state enumeration.
            +   * 
            + * + * Protobuf enum {@code google.cloud.discoveryengine.v1beta.UserLicense.LicenseAssignmentState} + */ + public enum LicenseAssignmentState implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
            +     * Default value.
            +     * 
            + * + * LICENSE_ASSIGNMENT_STATE_UNSPECIFIED = 0; + */ + LICENSE_ASSIGNMENT_STATE_UNSPECIFIED(0), + /** + * + * + *
            +     * License assigned to the user.
            +     * 
            + * + * ASSIGNED = 1; + */ + ASSIGNED(1), + /** + * + * + *
            +     * No license assigned to the user.
            +     * Deprecated, translated to NO_LICENSE.
            +     * 
            + * + * UNASSIGNED = 2; + */ + UNASSIGNED(2), + /** + * + * + *
            +     * No license assigned to the user.
            +     * 
            + * + * NO_LICENSE = 3; + */ + NO_LICENSE(3), + /** + * + * + *
            +     * User attempted to login but no license assigned to the user.
            +     * This state is only used for no user first time login attempt but cannot
            +     * get license assigned.
            +     * Users already logged in but cannot get license assigned will be assigned
            +     * NO_LICENSE state(License could be unassigned by admin).
            +     * 
            + * + * NO_LICENSE_ATTEMPTED_LOGIN = 4; + */ + NO_LICENSE_ATTEMPTED_LOGIN(4), + /** + * + * + *
            +     * User is blocked from assigning a license.
            +     * 
            + * + * BLOCKED = 5; + */ + BLOCKED(5), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "LicenseAssignmentState"); + } + + /** + * + * + *
            +     * Default value.
            +     * 
            + * + * LICENSE_ASSIGNMENT_STATE_UNSPECIFIED = 0; + */ + public static final int LICENSE_ASSIGNMENT_STATE_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
            +     * License assigned to the user.
            +     * 
            + * + * ASSIGNED = 1; + */ + public static final int ASSIGNED_VALUE = 1; + + /** + * + * + *
            +     * No license assigned to the user.
            +     * Deprecated, translated to NO_LICENSE.
            +     * 
            + * + * UNASSIGNED = 2; + */ + public static final int UNASSIGNED_VALUE = 2; + + /** + * + * + *
            +     * No license assigned to the user.
            +     * 
            + * + * NO_LICENSE = 3; + */ + public static final int NO_LICENSE_VALUE = 3; + + /** + * + * + *
            +     * User attempted to login but no license assigned to the user.
            +     * This state is only used for no user first time login attempt but cannot
            +     * get license assigned.
            +     * Users already logged in but cannot get license assigned will be assigned
            +     * NO_LICENSE state(License could be unassigned by admin).
            +     * 
            + * + * NO_LICENSE_ATTEMPTED_LOGIN = 4; + */ + public static final int NO_LICENSE_ATTEMPTED_LOGIN_VALUE = 4; + + /** + * + * + *
            +     * User is blocked from assigning a license.
            +     * 
            + * + * BLOCKED = 5; + */ + public static final int BLOCKED_VALUE = 5; + + 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 LicenseAssignmentState 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 LicenseAssignmentState forNumber(int value) { + switch (value) { + case 0: + return LICENSE_ASSIGNMENT_STATE_UNSPECIFIED; + case 1: + return ASSIGNED; + case 2: + return UNASSIGNED; + case 3: + return NO_LICENSE; + case 4: + return NO_LICENSE_ATTEMPTED_LOGIN; + case 5: + return BLOCKED; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap + internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public LicenseAssignmentState findValueByNumber(int number) { + return LicenseAssignmentState.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.UserLicense.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final LicenseAssignmentState[] VALUES = values(); + + public static LicenseAssignmentState valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private LicenseAssignmentState(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.discoveryengine.v1beta.UserLicense.LicenseAssignmentState) + } + + private int bitField0_; + public static final int USER_PRINCIPAL_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object userPrincipal_ = ""; + + /** + * + * + *
            +   * Required. Immutable. The user principal of the User, could be email address
            +   * or other prinical identifier. This field is immutable. Admin assign
            +   * licenses based on the user principal.
            +   * 
            + * + * + * string user_principal = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED]; + * + * + * @return The userPrincipal. + */ + @java.lang.Override + public java.lang.String getUserPrincipal() { + java.lang.Object ref = userPrincipal_; + 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(); + userPrincipal_ = s; + return s; + } + } + + /** + * + * + *
            +   * Required. Immutable. The user principal of the User, could be email address
            +   * or other prinical identifier. This field is immutable. Admin assign
            +   * licenses based on the user principal.
            +   * 
            + * + * + * string user_principal = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED]; + * + * + * @return The bytes for userPrincipal. + */ + @java.lang.Override + public com.google.protobuf.ByteString getUserPrincipalBytes() { + java.lang.Object ref = userPrincipal_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + userPrincipal_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int USER_PROFILE_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object userProfile_ = ""; + + /** + * + * + *
            +   * Optional. The user profile.
            +   * We user user full name(First name + Last name) as user profile.
            +   * 
            + * + * string user_profile = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The userProfile. + */ + @java.lang.Override + public java.lang.String getUserProfile() { + java.lang.Object ref = userProfile_; + 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(); + userProfile_ = s; + return s; + } + } + + /** + * + * + *
            +   * Optional. The user profile.
            +   * We user user full name(First name + Last name) as user profile.
            +   * 
            + * + * string user_profile = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for userProfile. + */ + @java.lang.Override + public com.google.protobuf.ByteString getUserProfileBytes() { + java.lang.Object ref = userProfile_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + userProfile_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LICENSE_ASSIGNMENT_STATE_FIELD_NUMBER = 4; + private int licenseAssignmentState_ = 0; + + /** + * + * + *
            +   * Output only. License assignment state of the user.
            +   * If the user is assigned with a license config, the user login will be
            +   * assigned with the license;
            +   * If the user's license assignment state is unassigned or unspecified, no
            +   * license config will be associated to the user;
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.UserLicense.LicenseAssignmentState license_assignment_state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for licenseAssignmentState. + */ + @java.lang.Override + public int getLicenseAssignmentStateValue() { + return licenseAssignmentState_; + } + + /** + * + * + *
            +   * Output only. License assignment state of the user.
            +   * If the user is assigned with a license config, the user login will be
            +   * assigned with the license;
            +   * If the user's license assignment state is unassigned or unspecified, no
            +   * license config will be associated to the user;
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.UserLicense.LicenseAssignmentState license_assignment_state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The licenseAssignmentState. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.UserLicense.LicenseAssignmentState + getLicenseAssignmentState() { + com.google.cloud.discoveryengine.v1beta.UserLicense.LicenseAssignmentState result = + com.google.cloud.discoveryengine.v1beta.UserLicense.LicenseAssignmentState.forNumber( + licenseAssignmentState_); + return result == null + ? com.google.cloud.discoveryengine.v1beta.UserLicense.LicenseAssignmentState.UNRECOGNIZED + : result; + } + + public static final int LICENSE_CONFIG_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object licenseConfig_ = ""; + + /** + * + * + *
            +   * Optional. The full resource name of the Subscription(LicenseConfig)
            +   * assigned to the user.
            +   * 
            + * + * + * string license_config = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The licenseConfig. + */ + @java.lang.Override + public java.lang.String getLicenseConfig() { + java.lang.Object ref = licenseConfig_; + 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(); + licenseConfig_ = s; + return s; + } + } + + /** + * + * + *
            +   * Optional. The full resource name of the Subscription(LicenseConfig)
            +   * assigned to the user.
            +   * 
            + * + * + * string license_config = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for licenseConfig. + */ + @java.lang.Override + public com.google.protobuf.ByteString getLicenseConfigBytes() { + java.lang.Object ref = licenseConfig_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + licenseConfig_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CREATE_TIME_FIELD_NUMBER = 6; + private com.google.protobuf.Timestamp createTime_; + + /** + * + * + *
            +   * Output only. User created timestamp.
            +   * 
            + * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
            +   * Output only. User created timestamp.
            +   * 
            + * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + /** + * + * + *
            +   * Output only. User created timestamp.
            +   * 
            + * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 7; + private com.google.protobuf.Timestamp updateTime_; + + /** + * + * + *
            +   * Output only. User update timestamp.
            +   * 
            + * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
            +   * Output only. User update timestamp.
            +   * 
            + * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + /** + * + * + *
            +   * Output only. User update timestamp.
            +   * 
            + * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + public static final int LAST_LOGIN_TIME_FIELD_NUMBER = 8; + private com.google.protobuf.Timestamp lastLoginTime_; + + /** + * + * + *
            +   * Output only. User last logged in time.
            +   * If the user has not logged in yet, this field will be empty.
            +   * 
            + * + * + * .google.protobuf.Timestamp last_login_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the lastLoginTime field is set. + */ + @java.lang.Override + public boolean hasLastLoginTime() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
            +   * Output only. User last logged in time.
            +   * If the user has not logged in yet, this field will be empty.
            +   * 
            + * + * + * .google.protobuf.Timestamp last_login_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The lastLoginTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getLastLoginTime() { + return lastLoginTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : lastLoginTime_; + } + + /** + * + * + *
            +   * Output only. User last logged in time.
            +   * If the user has not logged in yet, this field will be empty.
            +   * 
            + * + * + * .google.protobuf.Timestamp last_login_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getLastLoginTimeOrBuilder() { + return lastLoginTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : lastLoginTime_; + } + + 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(userPrincipal_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, userPrincipal_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(userProfile_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, userProfile_); + } + if (licenseAssignmentState_ + != com.google.cloud.discoveryengine.v1beta.UserLicense.LicenseAssignmentState + .LICENSE_ASSIGNMENT_STATE_UNSPECIFIED + .getNumber()) { + output.writeEnum(4, licenseAssignmentState_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(licenseConfig_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 5, licenseConfig_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(6, getCreateTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(7, getUpdateTime()); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeMessage(8, getLastLoginTime()); + } + 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(userPrincipal_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, userPrincipal_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(userProfile_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, userProfile_); + } + if (licenseAssignmentState_ + != com.google.cloud.discoveryengine.v1beta.UserLicense.LicenseAssignmentState + .LICENSE_ASSIGNMENT_STATE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(4, licenseAssignmentState_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(licenseConfig_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(5, licenseConfig_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getCreateTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getUpdateTime()); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, getLastLoginTime()); + } + 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.discoveryengine.v1beta.UserLicense)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1beta.UserLicense other = + (com.google.cloud.discoveryengine.v1beta.UserLicense) obj; + + if (!getUserPrincipal().equals(other.getUserPrincipal())) return false; + if (!getUserProfile().equals(other.getUserProfile())) return false; + if (licenseAssignmentState_ != other.licenseAssignmentState_) return false; + if (!getLicenseConfig().equals(other.getLicenseConfig())) return false; + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime().equals(other.getUpdateTime())) return false; + } + if (hasLastLoginTime() != other.hasLastLoginTime()) return false; + if (hasLastLoginTime()) { + if (!getLastLoginTime().equals(other.getLastLoginTime())) 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) + USER_PRINCIPAL_FIELD_NUMBER; + hash = (53 * hash) + getUserPrincipal().hashCode(); + hash = (37 * hash) + USER_PROFILE_FIELD_NUMBER; + hash = (53 * hash) + getUserProfile().hashCode(); + hash = (37 * hash) + LICENSE_ASSIGNMENT_STATE_FIELD_NUMBER; + hash = (53 * hash) + licenseAssignmentState_; + hash = (37 * hash) + LICENSE_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getLicenseConfig().hashCode(); + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + if (hasLastLoginTime()) { + hash = (37 * hash) + LAST_LOGIN_TIME_FIELD_NUMBER; + hash = (53 * hash) + getLastLoginTime().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1beta.UserLicense parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.UserLicense 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.discoveryengine.v1beta.UserLicense parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.UserLicense 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.discoveryengine.v1beta.UserLicense parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.UserLicense parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1beta.UserLicense parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.UserLicense 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.discoveryengine.v1beta.UserLicense parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.UserLicense 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.discoveryengine.v1beta.UserLicense parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.UserLicense 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.discoveryengine.v1beta.UserLicense 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; + } + + /** + * + * + *
            +   * User License information assigned by the admin.
            +   * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.UserLicense} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.UserLicense) + com.google.cloud.discoveryengine.v1beta.UserLicenseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.UserLicenseProto + .internal_static_google_cloud_discoveryengine_v1beta_UserLicense_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.UserLicenseProto + .internal_static_google_cloud_discoveryengine_v1beta_UserLicense_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.UserLicense.class, + com.google.cloud.discoveryengine.v1beta.UserLicense.Builder.class); + } + + // Construct using com.google.cloud.discoveryengine.v1beta.UserLicense.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetCreateTimeFieldBuilder(); + internalGetUpdateTimeFieldBuilder(); + internalGetLastLoginTimeFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + userPrincipal_ = ""; + userProfile_ = ""; + licenseAssignmentState_ = 0; + licenseConfig_ = ""; + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + lastLoginTime_ = null; + if (lastLoginTimeBuilder_ != null) { + lastLoginTimeBuilder_.dispose(); + lastLoginTimeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1beta.UserLicenseProto + .internal_static_google_cloud_discoveryengine_v1beta_UserLicense_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.UserLicense getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1beta.UserLicense.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.UserLicense build() { + com.google.cloud.discoveryengine.v1beta.UserLicense result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.UserLicense buildPartial() { + com.google.cloud.discoveryengine.v1beta.UserLicense result = + new com.google.cloud.discoveryengine.v1beta.UserLicense(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.discoveryengine.v1beta.UserLicense result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.userPrincipal_ = userPrincipal_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.userProfile_ = userProfile_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.licenseAssignmentState_ = licenseAssignmentState_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.licenseConfig_ = licenseConfig_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000010) != 0)) { + result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.updateTime_ = updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.lastLoginTime_ = + lastLoginTimeBuilder_ == null ? lastLoginTime_ : lastLoginTimeBuilder_.build(); + to_bitField0_ |= 0x00000004; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.discoveryengine.v1beta.UserLicense) { + return mergeFrom((com.google.cloud.discoveryengine.v1beta.UserLicense) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.discoveryengine.v1beta.UserLicense other) { + if (other == com.google.cloud.discoveryengine.v1beta.UserLicense.getDefaultInstance()) + return this; + if (!other.getUserPrincipal().isEmpty()) { + userPrincipal_ = other.userPrincipal_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getUserProfile().isEmpty()) { + userProfile_ = other.userProfile_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.licenseAssignmentState_ != 0) { + setLicenseAssignmentStateValue(other.getLicenseAssignmentStateValue()); + } + if (!other.getLicenseConfig().isEmpty()) { + licenseConfig_ = other.licenseConfig_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + if (other.hasLastLoginTime()) { + mergeLastLoginTime(other.getLastLoginTime()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + userPrincipal_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 26: + { + userProfile_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 26 + case 32: + { + licenseAssignmentState_ = input.readEnum(); + bitField0_ |= 0x00000004; + break; + } // case 32 + case 42: + { + licenseConfig_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 42 + case 50: + { + input.readMessage( + internalGetCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 50 + case 58: + { + input.readMessage( + internalGetUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 58 + case 66: + { + input.readMessage( + internalGetLastLoginTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000040; + break; + } // case 66 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object userPrincipal_ = ""; + + /** + * + * + *
            +     * Required. Immutable. The user principal of the User, could be email address
            +     * or other prinical identifier. This field is immutable. Admin assign
            +     * licenses based on the user principal.
            +     * 
            + * + * + * string user_principal = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED]; + * + * + * @return The userPrincipal. + */ + public java.lang.String getUserPrincipal() { + java.lang.Object ref = userPrincipal_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + userPrincipal_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
            +     * Required. Immutable. The user principal of the User, could be email address
            +     * or other prinical identifier. This field is immutable. Admin assign
            +     * licenses based on the user principal.
            +     * 
            + * + * + * string user_principal = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED]; + * + * + * @return The bytes for userPrincipal. + */ + public com.google.protobuf.ByteString getUserPrincipalBytes() { + java.lang.Object ref = userPrincipal_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + userPrincipal_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
            +     * Required. Immutable. The user principal of the User, could be email address
            +     * or other prinical identifier. This field is immutable. Admin assign
            +     * licenses based on the user principal.
            +     * 
            + * + * + * string user_principal = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The userPrincipal to set. + * @return This builder for chaining. + */ + public Builder setUserPrincipal(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + userPrincipal_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Required. Immutable. The user principal of the User, could be email address
            +     * or other prinical identifier. This field is immutable. Admin assign
            +     * licenses based on the user principal.
            +     * 
            + * + * + * string user_principal = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED]; + * + * + * @return This builder for chaining. + */ + public Builder clearUserPrincipal() { + userPrincipal_ = getDefaultInstance().getUserPrincipal(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
            +     * Required. Immutable. The user principal of the User, could be email address
            +     * or other prinical identifier. This field is immutable. Admin assign
            +     * licenses based on the user principal.
            +     * 
            + * + * + * string user_principal = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The bytes for userPrincipal to set. + * @return This builder for chaining. + */ + public Builder setUserPrincipalBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + userPrincipal_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object userProfile_ = ""; + + /** + * + * + *
            +     * Optional. The user profile.
            +     * We user user full name(First name + Last name) as user profile.
            +     * 
            + * + * string user_profile = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The userProfile. + */ + public java.lang.String getUserProfile() { + java.lang.Object ref = userProfile_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + userProfile_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
            +     * Optional. The user profile.
            +     * We user user full name(First name + Last name) as user profile.
            +     * 
            + * + * string user_profile = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for userProfile. + */ + public com.google.protobuf.ByteString getUserProfileBytes() { + java.lang.Object ref = userProfile_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + userProfile_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
            +     * Optional. The user profile.
            +     * We user user full name(First name + Last name) as user profile.
            +     * 
            + * + * string user_profile = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The userProfile to set. + * @return This builder for chaining. + */ + public Builder setUserProfile(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + userProfile_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Optional. The user profile.
            +     * We user user full name(First name + Last name) as user profile.
            +     * 
            + * + * string user_profile = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearUserProfile() { + userProfile_ = getDefaultInstance().getUserProfile(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
            +     * Optional. The user profile.
            +     * We user user full name(First name + Last name) as user profile.
            +     * 
            + * + * string user_profile = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for userProfile to set. + * @return This builder for chaining. + */ + public Builder setUserProfileBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + userProfile_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private int licenseAssignmentState_ = 0; + + /** + * + * + *
            +     * Output only. License assignment state of the user.
            +     * If the user is assigned with a license config, the user login will be
            +     * assigned with the license;
            +     * If the user's license assignment state is unassigned or unspecified, no
            +     * license config will be associated to the user;
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.UserLicense.LicenseAssignmentState license_assignment_state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for licenseAssignmentState. + */ + @java.lang.Override + public int getLicenseAssignmentStateValue() { + return licenseAssignmentState_; + } + + /** + * + * + *
            +     * Output only. License assignment state of the user.
            +     * If the user is assigned with a license config, the user login will be
            +     * assigned with the license;
            +     * If the user's license assignment state is unassigned or unspecified, no
            +     * license config will be associated to the user;
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.UserLicense.LicenseAssignmentState license_assignment_state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The enum numeric value on the wire for licenseAssignmentState to set. + * @return This builder for chaining. + */ + public Builder setLicenseAssignmentStateValue(int value) { + licenseAssignmentState_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Output only. License assignment state of the user.
            +     * If the user is assigned with a license config, the user login will be
            +     * assigned with the license;
            +     * If the user's license assignment state is unassigned or unspecified, no
            +     * license config will be associated to the user;
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.UserLicense.LicenseAssignmentState license_assignment_state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The licenseAssignmentState. + */ + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.UserLicense.LicenseAssignmentState + getLicenseAssignmentState() { + com.google.cloud.discoveryengine.v1beta.UserLicense.LicenseAssignmentState result = + com.google.cloud.discoveryengine.v1beta.UserLicense.LicenseAssignmentState.forNumber( + licenseAssignmentState_); + return result == null + ? com.google.cloud.discoveryengine.v1beta.UserLicense.LicenseAssignmentState.UNRECOGNIZED + : result; + } + + /** + * + * + *
            +     * Output only. License assignment state of the user.
            +     * If the user is assigned with a license config, the user login will be
            +     * assigned with the license;
            +     * If the user's license assignment state is unassigned or unspecified, no
            +     * license config will be associated to the user;
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.UserLicense.LicenseAssignmentState license_assignment_state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The licenseAssignmentState to set. + * @return This builder for chaining. + */ + public Builder setLicenseAssignmentState( + com.google.cloud.discoveryengine.v1beta.UserLicense.LicenseAssignmentState value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000004; + licenseAssignmentState_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
            +     * Output only. License assignment state of the user.
            +     * If the user is assigned with a license config, the user login will be
            +     * assigned with the license;
            +     * If the user's license assignment state is unassigned or unspecified, no
            +     * license config will be associated to the user;
            +     * 
            + * + * + * .google.cloud.discoveryengine.v1beta.UserLicense.LicenseAssignmentState license_assignment_state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearLicenseAssignmentState() { + bitField0_ = (bitField0_ & ~0x00000004); + licenseAssignmentState_ = 0; + onChanged(); + return this; + } + + private java.lang.Object licenseConfig_ = ""; + + /** + * + * + *
            +     * Optional. The full resource name of the Subscription(LicenseConfig)
            +     * assigned to the user.
            +     * 
            + * + * + * string license_config = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The licenseConfig. + */ + public java.lang.String getLicenseConfig() { + java.lang.Object ref = licenseConfig_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + licenseConfig_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
            +     * Optional. The full resource name of the Subscription(LicenseConfig)
            +     * assigned to the user.
            +     * 
            + * + * + * string license_config = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for licenseConfig. + */ + public com.google.protobuf.ByteString getLicenseConfigBytes() { + java.lang.Object ref = licenseConfig_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + licenseConfig_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
            +     * Optional. The full resource name of the Subscription(LicenseConfig)
            +     * assigned to the user.
            +     * 
            + * + * + * string license_config = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param value The licenseConfig to set. + * @return This builder for chaining. + */ + public Builder setLicenseConfig(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + licenseConfig_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Optional. The full resource name of the Subscription(LicenseConfig)
            +     * assigned to the user.
            +     * 
            + * + * + * string license_config = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearLicenseConfig() { + licenseConfig_ = getDefaultInstance().getLicenseConfig(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + + /** + * + * + *
            +     * Optional. The full resource name of the Subscription(LicenseConfig)
            +     * assigned to the user.
            +     * 
            + * + * + * string license_config = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for licenseConfig to set. + * @return This builder for chaining. + */ + public Builder setLicenseConfigBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + licenseConfig_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + + /** + * + * + *
            +     * Output only. User created timestamp.
            +     * 
            + * + * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000010) != 0); + } + + /** + * + * + *
            +     * Output only. User created timestamp.
            +     * 
            + * + * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
            +     * Output only. User created timestamp.
            +     * 
            + * + * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + } else { + createTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Output only. User created timestamp.
            +     * 
            + * + * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Output only. User created timestamp.
            +     * 
            + * + * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) + && createTime_ != null + && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); + } + if (createTime_ != null) { + bitField0_ |= 0x00000010; + onChanged(); + } + return this; + } + + /** + * + * + *
            +     * Output only. User created timestamp.
            +     * 
            + * + * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000010); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
            +     * Output only. User created timestamp.
            +     * 
            + * + * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return internalGetCreateTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
            +     * Output only. User created timestamp.
            +     * 
            + * + * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } + + /** + * + * + *
            +     * Output only. User created timestamp.
            +     * 
            + * + * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + internalGetCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp updateTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + updateTimeBuilder_; + + /** + * + * + *
            +     * Output only. User update timestamp.
            +     * 
            + * + * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000020) != 0); + } + + /** + * + * + *
            +     * Output only. User update timestamp.
            +     * 
            + * + * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
            +     * Output only. User update timestamp.
            +     * 
            + * + * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + } else { + updateTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Output only. User update timestamp.
            +     * 
            + * + * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Output only. User update timestamp.
            +     * 
            + * + * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (((bitField0_ & 0x00000020) != 0) + && updateTime_ != null + && updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getUpdateTimeBuilder().mergeFrom(value); + } else { + updateTime_ = value; + } + } else { + updateTimeBuilder_.mergeFrom(value); + } + if (updateTime_ != null) { + bitField0_ |= 0x00000020; + onChanged(); + } + return this; + } + + /** + * + * + *
            +     * Output only. User update timestamp.
            +     * 
            + * + * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearUpdateTime() { + bitField0_ = (bitField0_ & ~0x00000020); + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
            +     * Output only. User update timestamp.
            +     * 
            + * + * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + bitField0_ |= 0x00000020; + onChanged(); + return internalGetUpdateTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
            +     * Output only. User update timestamp.
            +     * 
            + * + * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } + } + + /** + * + * + *
            +     * Output only. User update timestamp.
            +     * 
            + * + * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + internalGetUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getUpdateTime(), getParentForChildren(), isClean()); + updateTime_ = null; + } + return updateTimeBuilder_; + } + + private com.google.protobuf.Timestamp lastLoginTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + lastLoginTimeBuilder_; + + /** + * + * + *
            +     * Output only. User last logged in time.
            +     * If the user has not logged in yet, this field will be empty.
            +     * 
            + * + * + * .google.protobuf.Timestamp last_login_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the lastLoginTime field is set. + */ + public boolean hasLastLoginTime() { + return ((bitField0_ & 0x00000040) != 0); + } + + /** + * + * + *
            +     * Output only. User last logged in time.
            +     * If the user has not logged in yet, this field will be empty.
            +     * 
            + * + * + * .google.protobuf.Timestamp last_login_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The lastLoginTime. + */ + public com.google.protobuf.Timestamp getLastLoginTime() { + if (lastLoginTimeBuilder_ == null) { + return lastLoginTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : lastLoginTime_; + } else { + return lastLoginTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
            +     * Output only. User last logged in time.
            +     * If the user has not logged in yet, this field will be empty.
            +     * 
            + * + * + * .google.protobuf.Timestamp last_login_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setLastLoginTime(com.google.protobuf.Timestamp value) { + if (lastLoginTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + lastLoginTime_ = value; + } else { + lastLoginTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Output only. User last logged in time.
            +     * If the user has not logged in yet, this field will be empty.
            +     * 
            + * + * + * .google.protobuf.Timestamp last_login_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setLastLoginTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (lastLoginTimeBuilder_ == null) { + lastLoginTime_ = builderForValue.build(); + } else { + lastLoginTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Output only. User last logged in time.
            +     * If the user has not logged in yet, this field will be empty.
            +     * 
            + * + * + * .google.protobuf.Timestamp last_login_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeLastLoginTime(com.google.protobuf.Timestamp value) { + if (lastLoginTimeBuilder_ == null) { + if (((bitField0_ & 0x00000040) != 0) + && lastLoginTime_ != null + && lastLoginTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getLastLoginTimeBuilder().mergeFrom(value); + } else { + lastLoginTime_ = value; + } + } else { + lastLoginTimeBuilder_.mergeFrom(value); + } + if (lastLoginTime_ != null) { + bitField0_ |= 0x00000040; + onChanged(); + } + return this; + } + + /** + * + * + *
            +     * Output only. User last logged in time.
            +     * If the user has not logged in yet, this field will be empty.
            +     * 
            + * + * + * .google.protobuf.Timestamp last_login_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearLastLoginTime() { + bitField0_ = (bitField0_ & ~0x00000040); + lastLoginTime_ = null; + if (lastLoginTimeBuilder_ != null) { + lastLoginTimeBuilder_.dispose(); + lastLoginTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
            +     * Output only. User last logged in time.
            +     * If the user has not logged in yet, this field will be empty.
            +     * 
            + * + * + * .google.protobuf.Timestamp last_login_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getLastLoginTimeBuilder() { + bitField0_ |= 0x00000040; + onChanged(); + return internalGetLastLoginTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
            +     * Output only. User last logged in time.
            +     * If the user has not logged in yet, this field will be empty.
            +     * 
            + * + * + * .google.protobuf.Timestamp last_login_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getLastLoginTimeOrBuilder() { + if (lastLoginTimeBuilder_ != null) { + return lastLoginTimeBuilder_.getMessageOrBuilder(); + } else { + return lastLoginTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : lastLoginTime_; + } + } + + /** + * + * + *
            +     * Output only. User last logged in time.
            +     * If the user has not logged in yet, this field will be empty.
            +     * 
            + * + * + * .google.protobuf.Timestamp last_login_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + internalGetLastLoginTimeFieldBuilder() { + if (lastLoginTimeBuilder_ == null) { + lastLoginTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getLastLoginTime(), getParentForChildren(), isClean()); + lastLoginTime_ = null; + } + return lastLoginTimeBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.UserLicense) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.UserLicense) + private static final com.google.cloud.discoveryengine.v1beta.UserLicense DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.discoveryengine.v1beta.UserLicense(); + } + + public static com.google.cloud.discoveryengine.v1beta.UserLicense getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UserLicense parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.UserLicense getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/UserLicenseOrBuilder.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/UserLicenseOrBuilder.java new file mode 100644 index 000000000000..624570933ce5 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/UserLicenseOrBuilder.java @@ -0,0 +1,287 @@ +/* + * 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/cloud/discoveryengine/v1beta/user_license.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.discoveryengine.v1beta; + +@com.google.protobuf.Generated +public interface UserLicenseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.UserLicense) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
            +   * Required. Immutable. The user principal of the User, could be email address
            +   * or other prinical identifier. This field is immutable. Admin assign
            +   * licenses based on the user principal.
            +   * 
            + * + * + * string user_principal = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED]; + * + * + * @return The userPrincipal. + */ + java.lang.String getUserPrincipal(); + + /** + * + * + *
            +   * Required. Immutable. The user principal of the User, could be email address
            +   * or other prinical identifier. This field is immutable. Admin assign
            +   * licenses based on the user principal.
            +   * 
            + * + * + * string user_principal = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED]; + * + * + * @return The bytes for userPrincipal. + */ + com.google.protobuf.ByteString getUserPrincipalBytes(); + + /** + * + * + *
            +   * Optional. The user profile.
            +   * We user user full name(First name + Last name) as user profile.
            +   * 
            + * + * string user_profile = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The userProfile. + */ + java.lang.String getUserProfile(); + + /** + * + * + *
            +   * Optional. The user profile.
            +   * We user user full name(First name + Last name) as user profile.
            +   * 
            + * + * string user_profile = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for userProfile. + */ + com.google.protobuf.ByteString getUserProfileBytes(); + + /** + * + * + *
            +   * Output only. License assignment state of the user.
            +   * If the user is assigned with a license config, the user login will be
            +   * assigned with the license;
            +   * If the user's license assignment state is unassigned or unspecified, no
            +   * license config will be associated to the user;
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.UserLicense.LicenseAssignmentState license_assignment_state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for licenseAssignmentState. + */ + int getLicenseAssignmentStateValue(); + + /** + * + * + *
            +   * Output only. License assignment state of the user.
            +   * If the user is assigned with a license config, the user login will be
            +   * assigned with the license;
            +   * If the user's license assignment state is unassigned or unspecified, no
            +   * license config will be associated to the user;
            +   * 
            + * + * + * .google.cloud.discoveryengine.v1beta.UserLicense.LicenseAssignmentState license_assignment_state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The licenseAssignmentState. + */ + com.google.cloud.discoveryengine.v1beta.UserLicense.LicenseAssignmentState + getLicenseAssignmentState(); + + /** + * + * + *
            +   * Optional. The full resource name of the Subscription(LicenseConfig)
            +   * assigned to the user.
            +   * 
            + * + * + * string license_config = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The licenseConfig. + */ + java.lang.String getLicenseConfig(); + + /** + * + * + *
            +   * Optional. The full resource name of the Subscription(LicenseConfig)
            +   * assigned to the user.
            +   * 
            + * + * + * string license_config = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for licenseConfig. + */ + com.google.protobuf.ByteString getLicenseConfigBytes(); + + /** + * + * + *
            +   * Output only. User created timestamp.
            +   * 
            + * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + + /** + * + * + *
            +   * Output only. User created timestamp.
            +   * 
            + * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + + /** + * + * + *
            +   * Output only. User created timestamp.
            +   * 
            + * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
            +   * Output only. User update timestamp.
            +   * 
            + * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + + /** + * + * + *
            +   * Output only. User update timestamp.
            +   * 
            + * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + + /** + * + * + *
            +   * Output only. User update timestamp.
            +   * 
            + * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + /** + * + * + *
            +   * Output only. User last logged in time.
            +   * If the user has not logged in yet, this field will be empty.
            +   * 
            + * + * + * .google.protobuf.Timestamp last_login_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the lastLoginTime field is set. + */ + boolean hasLastLoginTime(); + + /** + * + * + *
            +   * Output only. User last logged in time.
            +   * If the user has not logged in yet, this field will be empty.
            +   * 
            + * + * + * .google.protobuf.Timestamp last_login_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The lastLoginTime. + */ + com.google.protobuf.Timestamp getLastLoginTime(); + + /** + * + * + *
            +   * Output only. User last logged in time.
            +   * If the user has not logged in yet, this field will be empty.
            +   * 
            + * + * + * .google.protobuf.Timestamp last_login_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getLastLoginTimeOrBuilder(); +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/UserLicenseProto.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/UserLicenseProto.java new file mode 100644 index 000000000000..2204c66fc9a3 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/UserLicenseProto.java @@ -0,0 +1,133 @@ +/* + * 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/cloud/discoveryengine/v1beta/user_license.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.discoveryengine.v1beta; + +@com.google.protobuf.Generated +public final class UserLicenseProto extends com.google.protobuf.GeneratedFile { + private UserLicenseProto() {} + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "UserLicenseProto"); + } + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1beta_UserLicense_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1beta_UserLicense_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1beta_LicenseConfigUsageStats_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1beta_LicenseConfigUsageStats_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n6google/cloud/discoveryengine/v1beta/us" + + "er_license.proto\022#google.cloud.discovery" + + "engine.v1beta\032\037google/api/field_behavior" + + ".proto\032\031google/api/resource.proto\032\037googl" + + "e/protobuf/timestamp.proto\"\314\004\n\013UserLicen" + + "se\022\036\n\016user_principal\030\001 \001(\tB\006\340A\005\340A\002\022\031\n\014us" + + "er_profile\030\003 \001(\tB\003\340A\001\022n\n\030license_assignm" + + "ent_state\030\004 \001(\0162G.google.cloud.discovery" + + "engine.v1beta.UserLicense.LicenseAssignm" + + "entStateB\003\340A\003\022L\n\016license_config\030\005 \001(\tB4\340" + + "A\001\372A.\n,discoveryengine.googleapis.com/Li" + + "censeConfig\0224\n\013create_time\030\006 \001(\0132\032.googl" + + "e.protobuf.TimestampB\003\340A\003\0224\n\013update_time" + + "\030\007 \001(\0132\032.google.protobuf.TimestampB\003\340A\003\022" + + "8\n\017last_login_time\030\010 \001(\0132\032.google.protob" + + "uf.TimestampB\003\340A\003\"\235\001\n\026LicenseAssignmentS" + + "tate\022(\n$LICENSE_ASSIGNMENT_STATE_UNSPECI" + + "FIED\020\000\022\014\n\010ASSIGNED\020\001\022\016\n\nUNASSIGNED\020\002\022\016\n\n" + + "NO_LICENSE\020\003\022\036\n\032NO_LICENSE_ATTEMPTED_LOG" + + "IN\020\004\022\013\n\007BLOCKED\020\005\"W\n\027LicenseConfigUsageS" + + "tats\022\033\n\016license_config\030\001 \001(\tB\003\340A\002\022\037\n\022use" + + "d_license_count\030\002 \001(\003B\003\340A\002B\227\002\n\'com.googl" + + "e.cloud.discoveryengine.v1betaB\020UserLice" + + "nseProtoP\001ZQcloud.google.com/go/discover" + + "yengine/apiv1beta/discoveryenginepb;disc" + + "overyenginepb\242\002\017DISCOVERYENGINE\252\002#Google" + + ".Cloud.DiscoveryEngine.V1Beta\312\002#Google\\C" + + "loud\\DiscoveryEngine\\V1beta\352\002&Google::Cl" + + "oud::DiscoveryEngine::V1betab\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.ResourceProto.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), + }); + internal_static_google_cloud_discoveryengine_v1beta_UserLicense_descriptor = + getDescriptor().getMessageType(0); + internal_static_google_cloud_discoveryengine_v1beta_UserLicense_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1beta_UserLicense_descriptor, + new java.lang.String[] { + "UserPrincipal", + "UserProfile", + "LicenseAssignmentState", + "LicenseConfig", + "CreateTime", + "UpdateTime", + "LastLoginTime", + }); + internal_static_google_cloud_discoveryengine_v1beta_LicenseConfigUsageStats_descriptor = + getDescriptor().getMessageType(1); + internal_static_google_cloud_discoveryengine_v1beta_LicenseConfigUsageStats_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1beta_LicenseConfigUsageStats_descriptor, + new java.lang.String[] { + "LicenseConfig", "UsedLicenseCount", + }); + descriptor.resolveAllFeaturesImmutable(); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.ResourceProto.resourceReference); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/UserLicenseServiceProto.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/UserLicenseServiceProto.java new file mode 100644 index 000000000000..95b6f45d0233 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/UserLicenseServiceProto.java @@ -0,0 +1,266 @@ +/* + * 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/cloud/discoveryengine/v1beta/user_license_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.discoveryengine.v1beta; + +@com.google.protobuf.Generated +public final class UserLicenseServiceProto extends com.google.protobuf.GeneratedFile { + private UserLicenseServiceProto() {} + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "UserLicenseServiceProto"); + } + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1beta_ListUserLicensesRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1beta_ListUserLicensesRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1beta_ListUserLicensesResponse_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1beta_ListUserLicensesResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1beta_ListLicenseConfigsUsageStatsRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1beta_ListLicenseConfigsUsageStatsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1beta_ListLicenseConfigsUsageStatsResponse_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1beta_ListLicenseConfigsUsageStatsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1beta_BatchUpdateUserLicensesRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1beta_BatchUpdateUserLicensesRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1beta_BatchUpdateUserLicensesRequest_InlineSource_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1beta_BatchUpdateUserLicensesRequest_InlineSource_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1beta_BatchUpdateUserLicensesMetadata_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1beta_BatchUpdateUserLicensesMetadata_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1beta_BatchUpdateUserLicensesResponse_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1beta_BatchUpdateUserLicensesResponse_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n>google/cloud/discoveryengine/v1beta/us" + + "er_license_service.proto\022#google.cloud.d" + + "iscoveryengine.v1beta\032\034google/api/annota" + + "tions.proto\032\027google/api/client.proto\032\037go" + + "ogle/api/field_behavior.proto\032\031google/ap" + + "i/resource.proto\0326google/cloud/discovery" + + "engine/v1beta/user_license.proto\032#google" + + "/longrunning/operations.proto\032 google/pr" + + "otobuf/field_mask.proto\032\037google/protobuf" + + "/timestamp.proto\032\027google/rpc/status.prot" + + "o\"\270\001\n\027ListUserLicensesRequest\022@\n\006parent\030" + + "\001 \001(\tB0\340A\002\372A*\n(discoveryengine.googleapi" + + "s.com/UserStore\022\026\n\tpage_size\030\002 \001(\005B\003\340A\001\022" + + "\027\n\npage_token\030\003 \001(\tB\003\340A\001\022\023\n\006filter\030\004 \001(\t" + + "B\003\340A\001\022\025\n\010order_by\030\005 \001(\tB\003\340A\001\"|\n\030ListUser" + + "LicensesResponse\022G\n\ruser_licenses\030\001 \003(\0132" + + "0.google.cloud.discoveryengine.v1beta.Us" + + "erLicense\022\027\n\017next_page_token\030\002 \001(\t\"g\n#Li" + + "stLicenseConfigsUsageStatsRequest\022@\n\006par" + + "ent\030\001 \001(\tB0\340A\002\372A*\n(discoveryengine.googl" + + "eapis.com/UserStore\"\210\001\n$ListLicenseConfi" + + "gsUsageStatsResponse\022`\n\032license_config_u" + + "sage_stats\030\001 \003(\0132<.google.cloud.discover" + + "yengine.v1beta.LicenseConfigUsageStats\"\232" + + "\003\n\036BatchUpdateUserLicensesRequest\022i\n\rinl" + + "ine_source\030\002 \001(\0132P.google.cloud.discover" + + "yengine.v1beta.BatchUpdateUserLicensesRe" + + "quest.InlineSourceH\000\022@\n\006parent\030\001 \001(\tB0\340A" + + "\002\372A*\n(discoveryengine.googleapis.com/Use" + + "rStore\022,\n\037delete_unassigned_user_license" + + "s\030\004 \001(\010B\003\340A\001\032\222\001\n\014InlineSource\022L\n\ruser_li" + + "censes\030\001 \003(\01320.google.cloud.discoveryeng" + + "ine.v1beta.UserLicenseB\003\340A\002\0224\n\013update_ma" + + "sk\030\002 \001(\0132\032.google.protobuf.FieldMaskB\003\340A" + + "\001B\010\n\006source\"\261\001\n\037BatchUpdateUserLicensesM" + + "etadata\022/\n\013create_time\030\001 \001(\0132\032.google.pr" + + "otobuf.Timestamp\022/\n\013update_time\030\002 \001(\0132\032." + + "google.protobuf.Timestamp\022\025\n\rsuccess_cou" + + "nt\030\003 \001(\003\022\025\n\rfailure_count\030\004 \001(\003\"\225\001\n\037Batc" + + "hUpdateUserLicensesResponse\022G\n\ruser_lice" + + "nses\030\001 \003(\01320.google.cloud.discoveryengin" + + "e.v1beta.UserLicense\022)\n\rerror_samples\030\002 " + + "\003(\0132\022.google.rpc.Status2\312\010\n\022UserLicenseS" + + "ervice\022\343\001\n\020ListUserLicenses\022<.google.clo" + + "ud.discoveryengine.v1beta.ListUserLicens" + + "esRequest\032=.google.cloud.discoveryengine" + + ".v1beta.ListUserLicensesResponse\"R\332A\006par" + + "ent\202\323\344\223\002C\022A/v1beta/{parent=projects/*/lo" + + "cations/*/userStores/*}/userLicenses\022\223\002\n" + + "\034ListLicenseConfigsUsageStats\022H.google.c" + + "loud.discoveryengine.v1beta.ListLicenseC" + + "onfigsUsageStatsRequest\032I.google.cloud.d" + + "iscoveryengine.v1beta.ListLicenseConfigs" + + "UsageStatsResponse\"^\332A\006parent\202\323\344\223\002O\022M/v1" + + "beta/{parent=projects/*/locations/*/user" + + "Stores/*}/licenseConfigsUsageStats\022\345\002\n\027B" + + "atchUpdateUserLicenses\022C.google.cloud.di" + + "scoveryengine.v1beta.BatchUpdateUserLice" + + "nsesRequest\032\035.google.longrunning.Operati" + + "on\"\345\001\312A\212\001\nCgoogle.cloud.discoveryengine." + + "v1beta.BatchUpdateUserLicensesResponse\022C" + + "google.cloud.discoveryengine.v1beta.Batc" + + "hUpdateUserLicensesMetadata\202\323\344\223\002Q\"L/v1be" + + "ta/{parent=projects/*/locations/*/userSt" + + "ores/*}:batchUpdateUserLicenses:\001*\032\317\001\312A\036" + + "discoveryengine.googleapis.com\322A\252\001https:" + + "//www.googleapis.com/auth/cloud-platform" + + ",https://www.googleapis.com/auth/discove" + + "ryengine.readwrite,https://www.googleapi" + + "s.com/auth/discoveryengine.serving.readw" + + "riteB\236\002\n\'com.google.cloud.discoveryengin" + + "e.v1betaB\027UserLicenseServiceProtoP\001ZQclo" + + "ud.google.com/go/discoveryengine/apiv1be" + + "ta/discoveryenginepb;discoveryenginepb\242\002" + + "\017DISCOVERYENGINE\252\002#Google.Cloud.Discover" + + "yEngine.V1Beta\312\002#Google\\Cloud\\DiscoveryE" + + "ngine\\V1beta\352\002&Google::Cloud::DiscoveryE" + + "ngine::V1betab\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.AnnotationsProto.getDescriptor(), + com.google.api.ClientProto.getDescriptor(), + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.ResourceProto.getDescriptor(), + com.google.cloud.discoveryengine.v1beta.UserLicenseProto.getDescriptor(), + com.google.longrunning.OperationsProto.getDescriptor(), + com.google.protobuf.FieldMaskProto.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), + com.google.rpc.StatusProto.getDescriptor(), + }); + internal_static_google_cloud_discoveryengine_v1beta_ListUserLicensesRequest_descriptor = + getDescriptor().getMessageType(0); + internal_static_google_cloud_discoveryengine_v1beta_ListUserLicensesRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1beta_ListUserLicensesRequest_descriptor, + new java.lang.String[] { + "Parent", "PageSize", "PageToken", "Filter", "OrderBy", + }); + internal_static_google_cloud_discoveryengine_v1beta_ListUserLicensesResponse_descriptor = + getDescriptor().getMessageType(1); + internal_static_google_cloud_discoveryengine_v1beta_ListUserLicensesResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1beta_ListUserLicensesResponse_descriptor, + new java.lang.String[] { + "UserLicenses", "NextPageToken", + }); + internal_static_google_cloud_discoveryengine_v1beta_ListLicenseConfigsUsageStatsRequest_descriptor = + getDescriptor().getMessageType(2); + internal_static_google_cloud_discoveryengine_v1beta_ListLicenseConfigsUsageStatsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1beta_ListLicenseConfigsUsageStatsRequest_descriptor, + new java.lang.String[] { + "Parent", + }); + internal_static_google_cloud_discoveryengine_v1beta_ListLicenseConfigsUsageStatsResponse_descriptor = + getDescriptor().getMessageType(3); + internal_static_google_cloud_discoveryengine_v1beta_ListLicenseConfigsUsageStatsResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1beta_ListLicenseConfigsUsageStatsResponse_descriptor, + new java.lang.String[] { + "LicenseConfigUsageStats", + }); + internal_static_google_cloud_discoveryengine_v1beta_BatchUpdateUserLicensesRequest_descriptor = + getDescriptor().getMessageType(4); + internal_static_google_cloud_discoveryengine_v1beta_BatchUpdateUserLicensesRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1beta_BatchUpdateUserLicensesRequest_descriptor, + new java.lang.String[] { + "InlineSource", "Parent", "DeleteUnassignedUserLicenses", "Source", + }); + internal_static_google_cloud_discoveryengine_v1beta_BatchUpdateUserLicensesRequest_InlineSource_descriptor = + internal_static_google_cloud_discoveryengine_v1beta_BatchUpdateUserLicensesRequest_descriptor + .getNestedType(0); + internal_static_google_cloud_discoveryengine_v1beta_BatchUpdateUserLicensesRequest_InlineSource_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1beta_BatchUpdateUserLicensesRequest_InlineSource_descriptor, + new java.lang.String[] { + "UserLicenses", "UpdateMask", + }); + internal_static_google_cloud_discoveryengine_v1beta_BatchUpdateUserLicensesMetadata_descriptor = + getDescriptor().getMessageType(5); + internal_static_google_cloud_discoveryengine_v1beta_BatchUpdateUserLicensesMetadata_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1beta_BatchUpdateUserLicensesMetadata_descriptor, + new java.lang.String[] { + "CreateTime", "UpdateTime", "SuccessCount", "FailureCount", + }); + internal_static_google_cloud_discoveryengine_v1beta_BatchUpdateUserLicensesResponse_descriptor = + getDescriptor().getMessageType(6); + internal_static_google_cloud_discoveryengine_v1beta_BatchUpdateUserLicensesResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1beta_BatchUpdateUserLicensesResponse_descriptor, + new java.lang.String[] { + "UserLicenses", "ErrorSamples", + }); + descriptor.resolveAllFeaturesImmutable(); + com.google.api.AnnotationsProto.getDescriptor(); + com.google.api.ClientProto.getDescriptor(); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + com.google.cloud.discoveryengine.v1beta.UserLicenseProto.getDescriptor(); + com.google.longrunning.OperationsProto.getDescriptor(); + com.google.protobuf.FieldMaskProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); + com.google.rpc.StatusProto.getDescriptor(); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.ClientProto.defaultHost); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.AnnotationsProto.http); + registry.add(com.google.api.ClientProto.methodSignature); + registry.add(com.google.api.ClientProto.oauthScopes); + registry.add(com.google.api.ResourceProto.resourceReference); + registry.add(com.google.longrunning.OperationsProto.operationInfo); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/UserStore.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/UserStore.java new file mode 100644 index 000000000000..caeba59c7bda --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/UserStore.java @@ -0,0 +1,1314 @@ +/* + * 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/cloud/discoveryengine/v1beta/user_store.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.discoveryengine.v1beta; + +/** + * + * + *
            + * Configures metadata that is used for End User entities.
            + * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.UserStore} + */ +@com.google.protobuf.Generated +public final class UserStore extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.discoveryengine.v1beta.UserStore) + UserStoreOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "UserStore"); + } + + // Use UserStore.newBuilder() to construct. + private UserStore(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private UserStore() { + name_ = ""; + displayName_ = ""; + defaultLicenseConfig_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.UserStoreProto + .internal_static_google_cloud_discoveryengine_v1beta_UserStore_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.UserStoreProto + .internal_static_google_cloud_discoveryengine_v1beta_UserStore_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.UserStore.class, + com.google.cloud.discoveryengine.v1beta.UserStore.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
            +   * Immutable. The full resource name of the User Store, in the format of
            +   * `projects/{project}/locations/{location}/userStores/{user_store}`.
            +   *
            +   * This field must be a UTF-8 encoded string with a length limit of 1024
            +   * characters.
            +   * 
            + * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + 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(); + name_ = s; + return s; + } + } + + /** + * + * + *
            +   * Immutable. The full resource name of the User Store, in the format of
            +   * `projects/{project}/locations/{location}/userStores/{user_store}`.
            +   *
            +   * This field must be a UTF-8 encoded string with a length limit of 1024
            +   * characters.
            +   * 
            + * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DISPLAY_NAME_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object displayName_ = ""; + + /** + * + * + *
            +   * The display name of the User Store.
            +   * 
            + * + * string display_name = 2; + * + * @return The displayName. + */ + @java.lang.Override + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + 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(); + displayName_ = s; + return s; + } + } + + /** + * + * + *
            +   * The display name of the User Store.
            +   * 
            + * + * string display_name = 2; + * + * @return The bytes for displayName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DEFAULT_LICENSE_CONFIG_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object defaultLicenseConfig_ = ""; + + /** + * + * + *
            +   * Optional. The default subscription
            +   * [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig] for the
            +   * UserStore, if
            +   * [UserStore.enable_license_auto_register][google.cloud.discoveryengine.v1beta.UserStore.enable_license_auto_register]
            +   * is true, new users will automatically register under the default
            +   * subscription.
            +   *
            +   * If default
            +   * [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig] doesn't
            +   * have remaining license seats left, new users will not be assigned with
            +   * license and will be blocked for Vertex AI Search features. This is used if
            +   * `license_assignment_tier_rules` is not configured.
            +   * 
            + * + * + * string default_license_config = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The defaultLicenseConfig. + */ + @java.lang.Override + public java.lang.String getDefaultLicenseConfig() { + java.lang.Object ref = defaultLicenseConfig_; + 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(); + defaultLicenseConfig_ = s; + return s; + } + } + + /** + * + * + *
            +   * Optional. The default subscription
            +   * [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig] for the
            +   * UserStore, if
            +   * [UserStore.enable_license_auto_register][google.cloud.discoveryengine.v1beta.UserStore.enable_license_auto_register]
            +   * is true, new users will automatically register under the default
            +   * subscription.
            +   *
            +   * If default
            +   * [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig] doesn't
            +   * have remaining license seats left, new users will not be assigned with
            +   * license and will be blocked for Vertex AI Search features. This is used if
            +   * `license_assignment_tier_rules` is not configured.
            +   * 
            + * + * + * string default_license_config = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for defaultLicenseConfig. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDefaultLicenseConfigBytes() { + java.lang.Object ref = defaultLicenseConfig_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + defaultLicenseConfig_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ENABLE_LICENSE_AUTO_REGISTER_FIELD_NUMBER = 6; + private boolean enableLicenseAutoRegister_ = false; + + /** + * + * + *
            +   * Optional. Whether to enable license auto register for users in this User
            +   * Store. If true, new users will automatically register under the default
            +   * license config as long as the default license config has seats left.
            +   * 
            + * + * bool enable_license_auto_register = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The enableLicenseAutoRegister. + */ + @java.lang.Override + public boolean getEnableLicenseAutoRegister() { + return enableLicenseAutoRegister_; + } + + public static final int ENABLE_EXPIRED_LICENSE_AUTO_UPDATE_FIELD_NUMBER = 7; + private boolean enableExpiredLicenseAutoUpdate_ = false; + + /** + * + * + *
            +   * Optional. Whether to enable license auto update for users in this User
            +   * Store. If true, users with expired licenses will automatically be updated
            +   * to use the default license config as long as the default license config has
            +   * seats left.
            +   * 
            + * + * bool enable_expired_license_auto_update = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enableExpiredLicenseAutoUpdate. + */ + @java.lang.Override + public boolean getEnableExpiredLicenseAutoUpdate() { + return enableExpiredLicenseAutoUpdate_; + } + + 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(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(displayName_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, displayName_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(defaultLicenseConfig_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 5, defaultLicenseConfig_); + } + if (enableLicenseAutoRegister_ != false) { + output.writeBool(6, enableLicenseAutoRegister_); + } + if (enableExpiredLicenseAutoUpdate_ != false) { + output.writeBool(7, enableExpiredLicenseAutoUpdate_); + } + 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(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(displayName_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, displayName_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(defaultLicenseConfig_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(5, defaultLicenseConfig_); + } + if (enableLicenseAutoRegister_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(6, enableLicenseAutoRegister_); + } + if (enableExpiredLicenseAutoUpdate_ != false) { + size += + com.google.protobuf.CodedOutputStream.computeBoolSize(7, enableExpiredLicenseAutoUpdate_); + } + 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.discoveryengine.v1beta.UserStore)) { + return super.equals(obj); + } + com.google.cloud.discoveryengine.v1beta.UserStore other = + (com.google.cloud.discoveryengine.v1beta.UserStore) obj; + + if (!getName().equals(other.getName())) return false; + if (!getDisplayName().equals(other.getDisplayName())) return false; + if (!getDefaultLicenseConfig().equals(other.getDefaultLicenseConfig())) return false; + if (getEnableLicenseAutoRegister() != other.getEnableLicenseAutoRegister()) return false; + if (getEnableExpiredLicenseAutoUpdate() != other.getEnableExpiredLicenseAutoUpdate()) + 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) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); + hash = (37 * hash) + DEFAULT_LICENSE_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getDefaultLicenseConfig().hashCode(); + hash = (37 * hash) + ENABLE_LICENSE_AUTO_REGISTER_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getEnableLicenseAutoRegister()); + hash = (37 * hash) + ENABLE_EXPIRED_LICENSE_AUTO_UPDATE_FIELD_NUMBER; + hash = + (53 * hash) + com.google.protobuf.Internal.hashBoolean(getEnableExpiredLicenseAutoUpdate()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.discoveryengine.v1beta.UserStore parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.UserStore 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.discoveryengine.v1beta.UserStore parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.UserStore 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.discoveryengine.v1beta.UserStore parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.discoveryengine.v1beta.UserStore parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.discoveryengine.v1beta.UserStore parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.UserStore 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.discoveryengine.v1beta.UserStore parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.UserStore 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.discoveryengine.v1beta.UserStore parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.discoveryengine.v1beta.UserStore 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.discoveryengine.v1beta.UserStore 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; + } + + /** + * + * + *
            +   * Configures metadata that is used for End User entities.
            +   * 
            + * + * Protobuf type {@code google.cloud.discoveryengine.v1beta.UserStore} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.discoveryengine.v1beta.UserStore) + com.google.cloud.discoveryengine.v1beta.UserStoreOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.discoveryengine.v1beta.UserStoreProto + .internal_static_google_cloud_discoveryengine_v1beta_UserStore_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.discoveryengine.v1beta.UserStoreProto + .internal_static_google_cloud_discoveryengine_v1beta_UserStore_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.discoveryengine.v1beta.UserStore.class, + com.google.cloud.discoveryengine.v1beta.UserStore.Builder.class); + } + + // Construct using com.google.cloud.discoveryengine.v1beta.UserStore.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + displayName_ = ""; + defaultLicenseConfig_ = ""; + enableLicenseAutoRegister_ = false; + enableExpiredLicenseAutoUpdate_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.discoveryengine.v1beta.UserStoreProto + .internal_static_google_cloud_discoveryengine_v1beta_UserStore_descriptor; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.UserStore getDefaultInstanceForType() { + return com.google.cloud.discoveryengine.v1beta.UserStore.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.UserStore build() { + com.google.cloud.discoveryengine.v1beta.UserStore result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.UserStore buildPartial() { + com.google.cloud.discoveryengine.v1beta.UserStore result = + new com.google.cloud.discoveryengine.v1beta.UserStore(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.discoveryengine.v1beta.UserStore result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.displayName_ = displayName_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.defaultLicenseConfig_ = defaultLicenseConfig_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.enableLicenseAutoRegister_ = enableLicenseAutoRegister_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.enableExpiredLicenseAutoUpdate_ = enableExpiredLicenseAutoUpdate_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.discoveryengine.v1beta.UserStore) { + return mergeFrom((com.google.cloud.discoveryengine.v1beta.UserStore) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.discoveryengine.v1beta.UserStore other) { + if (other == com.google.cloud.discoveryengine.v1beta.UserStore.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getDefaultLicenseConfig().isEmpty()) { + defaultLicenseConfig_ = other.defaultLicenseConfig_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (other.getEnableLicenseAutoRegister() != false) { + setEnableLicenseAutoRegister(other.getEnableLicenseAutoRegister()); + } + if (other.getEnableExpiredLicenseAutoUpdate() != false) { + setEnableExpiredLicenseAutoUpdate(other.getEnableExpiredLicenseAutoUpdate()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + displayName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 42: + { + defaultLicenseConfig_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 42 + case 48: + { + enableLicenseAutoRegister_ = input.readBool(); + bitField0_ |= 0x00000008; + break; + } // case 48 + case 56: + { + enableExpiredLicenseAutoUpdate_ = input.readBool(); + bitField0_ |= 0x00000010; + break; + } // case 56 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + + /** + * + * + *
            +     * Immutable. The full resource name of the User Store, in the format of
            +     * `projects/{project}/locations/{location}/userStores/{user_store}`.
            +     *
            +     * This field must be a UTF-8 encoded string with a length limit of 1024
            +     * characters.
            +     * 
            + * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
            +     * Immutable. The full resource name of the User Store, in the format of
            +     * `projects/{project}/locations/{location}/userStores/{user_store}`.
            +     *
            +     * This field must be a UTF-8 encoded string with a length limit of 1024
            +     * characters.
            +     * 
            + * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
            +     * Immutable. The full resource name of the User Store, in the format of
            +     * `projects/{project}/locations/{location}/userStores/{user_store}`.
            +     *
            +     * This field must be a UTF-8 encoded string with a length limit of 1024
            +     * characters.
            +     * 
            + * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Immutable. The full resource name of the User Store, in the format of
            +     * `projects/{project}/locations/{location}/userStores/{user_store}`.
            +     *
            +     * This field must be a UTF-8 encoded string with a length limit of 1024
            +     * characters.
            +     * 
            + * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
            +     * Immutable. The full resource name of the User Store, in the format of
            +     * `projects/{project}/locations/{location}/userStores/{user_store}`.
            +     *
            +     * This field must be a UTF-8 encoded string with a length limit of 1024
            +     * characters.
            +     * 
            + * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object displayName_ = ""; + + /** + * + * + *
            +     * The display name of the User Store.
            +     * 
            + * + * string display_name = 2; + * + * @return The displayName. + */ + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
            +     * The display name of the User Store.
            +     * 
            + * + * string display_name = 2; + * + * @return The bytes for displayName. + */ + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
            +     * The display name of the User Store.
            +     * 
            + * + * string display_name = 2; + * + * @param value The displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + displayName_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
            +     * The display name of the User Store.
            +     * 
            + * + * string display_name = 2; + * + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + displayName_ = getDefaultInstance().getDisplayName(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
            +     * The display name of the User Store.
            +     * 
            + * + * string display_name = 2; + * + * @param value The bytes for displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + displayName_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object defaultLicenseConfig_ = ""; + + /** + * + * + *
            +     * Optional. The default subscription
            +     * [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig] for the
            +     * UserStore, if
            +     * [UserStore.enable_license_auto_register][google.cloud.discoveryengine.v1beta.UserStore.enable_license_auto_register]
            +     * is true, new users will automatically register under the default
            +     * subscription.
            +     *
            +     * If default
            +     * [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig] doesn't
            +     * have remaining license seats left, new users will not be assigned with
            +     * license and will be blocked for Vertex AI Search features. This is used if
            +     * `license_assignment_tier_rules` is not configured.
            +     * 
            + * + * + * string default_license_config = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The defaultLicenseConfig. + */ + public java.lang.String getDefaultLicenseConfig() { + java.lang.Object ref = defaultLicenseConfig_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + defaultLicenseConfig_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
            +     * Optional. The default subscription
            +     * [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig] for the
            +     * UserStore, if
            +     * [UserStore.enable_license_auto_register][google.cloud.discoveryengine.v1beta.UserStore.enable_license_auto_register]
            +     * is true, new users will automatically register under the default
            +     * subscription.
            +     *
            +     * If default
            +     * [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig] doesn't
            +     * have remaining license seats left, new users will not be assigned with
            +     * license and will be blocked for Vertex AI Search features. This is used if
            +     * `license_assignment_tier_rules` is not configured.
            +     * 
            + * + * + * string default_license_config = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for defaultLicenseConfig. + */ + public com.google.protobuf.ByteString getDefaultLicenseConfigBytes() { + java.lang.Object ref = defaultLicenseConfig_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + defaultLicenseConfig_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
            +     * Optional. The default subscription
            +     * [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig] for the
            +     * UserStore, if
            +     * [UserStore.enable_license_auto_register][google.cloud.discoveryengine.v1beta.UserStore.enable_license_auto_register]
            +     * is true, new users will automatically register under the default
            +     * subscription.
            +     *
            +     * If default
            +     * [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig] doesn't
            +     * have remaining license seats left, new users will not be assigned with
            +     * license and will be blocked for Vertex AI Search features. This is used if
            +     * `license_assignment_tier_rules` is not configured.
            +     * 
            + * + * + * string default_license_config = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param value The defaultLicenseConfig to set. + * @return This builder for chaining. + */ + public Builder setDefaultLicenseConfig(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + defaultLicenseConfig_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Optional. The default subscription
            +     * [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig] for the
            +     * UserStore, if
            +     * [UserStore.enable_license_auto_register][google.cloud.discoveryengine.v1beta.UserStore.enable_license_auto_register]
            +     * is true, new users will automatically register under the default
            +     * subscription.
            +     *
            +     * If default
            +     * [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig] doesn't
            +     * have remaining license seats left, new users will not be assigned with
            +     * license and will be blocked for Vertex AI Search features. This is used if
            +     * `license_assignment_tier_rules` is not configured.
            +     * 
            + * + * + * string default_license_config = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearDefaultLicenseConfig() { + defaultLicenseConfig_ = getDefaultInstance().getDefaultLicenseConfig(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
            +     * Optional. The default subscription
            +     * [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig] for the
            +     * UserStore, if
            +     * [UserStore.enable_license_auto_register][google.cloud.discoveryengine.v1beta.UserStore.enable_license_auto_register]
            +     * is true, new users will automatically register under the default
            +     * subscription.
            +     *
            +     * If default
            +     * [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig] doesn't
            +     * have remaining license seats left, new users will not be assigned with
            +     * license and will be blocked for Vertex AI Search features. This is used if
            +     * `license_assignment_tier_rules` is not configured.
            +     * 
            + * + * + * string default_license_config = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for defaultLicenseConfig to set. + * @return This builder for chaining. + */ + public Builder setDefaultLicenseConfigBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + defaultLicenseConfig_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private boolean enableLicenseAutoRegister_; + + /** + * + * + *
            +     * Optional. Whether to enable license auto register for users in this User
            +     * Store. If true, new users will automatically register under the default
            +     * license config as long as the default license config has seats left.
            +     * 
            + * + * bool enable_license_auto_register = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The enableLicenseAutoRegister. + */ + @java.lang.Override + public boolean getEnableLicenseAutoRegister() { + return enableLicenseAutoRegister_; + } + + /** + * + * + *
            +     * Optional. Whether to enable license auto register for users in this User
            +     * Store. If true, new users will automatically register under the default
            +     * license config as long as the default license config has seats left.
            +     * 
            + * + * bool enable_license_auto_register = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The enableLicenseAutoRegister to set. + * @return This builder for chaining. + */ + public Builder setEnableLicenseAutoRegister(boolean value) { + + enableLicenseAutoRegister_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Optional. Whether to enable license auto register for users in this User
            +     * Store. If true, new users will automatically register under the default
            +     * license config as long as the default license config has seats left.
            +     * 
            + * + * bool enable_license_auto_register = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearEnableLicenseAutoRegister() { + bitField0_ = (bitField0_ & ~0x00000008); + enableLicenseAutoRegister_ = false; + onChanged(); + return this; + } + + private boolean enableExpiredLicenseAutoUpdate_; + + /** + * + * + *
            +     * Optional. Whether to enable license auto update for users in this User
            +     * Store. If true, users with expired licenses will automatically be updated
            +     * to use the default license config as long as the default license config has
            +     * seats left.
            +     * 
            + * + * bool enable_expired_license_auto_update = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enableExpiredLicenseAutoUpdate. + */ + @java.lang.Override + public boolean getEnableExpiredLicenseAutoUpdate() { + return enableExpiredLicenseAutoUpdate_; + } + + /** + * + * + *
            +     * Optional. Whether to enable license auto update for users in this User
            +     * Store. If true, users with expired licenses will automatically be updated
            +     * to use the default license config as long as the default license config has
            +     * seats left.
            +     * 
            + * + * bool enable_expired_license_auto_update = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The enableExpiredLicenseAutoUpdate to set. + * @return This builder for chaining. + */ + public Builder setEnableExpiredLicenseAutoUpdate(boolean value) { + + enableExpiredLicenseAutoUpdate_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Optional. Whether to enable license auto update for users in this User
            +     * Store. If true, users with expired licenses will automatically be updated
            +     * to use the default license config as long as the default license config has
            +     * seats left.
            +     * 
            + * + * bool enable_expired_license_auto_update = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearEnableExpiredLicenseAutoUpdate() { + bitField0_ = (bitField0_ & ~0x00000010); + enableExpiredLicenseAutoUpdate_ = false; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.discoveryengine.v1beta.UserStore) + } + + // @@protoc_insertion_point(class_scope:google.cloud.discoveryengine.v1beta.UserStore) + private static final com.google.cloud.discoveryengine.v1beta.UserStore DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.discoveryengine.v1beta.UserStore(); + } + + public static com.google.cloud.discoveryengine.v1beta.UserStore getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UserStore parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.discoveryengine.v1beta.UserStore getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/UserStoreName.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/UserStoreName.java new file mode 100644 index 000000000000..519934f7a2f1 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/UserStoreName.java @@ -0,0 +1,223 @@ +/* + * 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.discoveryengine.v1beta; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class UserStoreName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_USER_STORE = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/userStores/{user_store}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + private final String userStore; + + @Deprecated + protected UserStoreName() { + project = null; + location = null; + userStore = null; + } + + private UserStoreName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + userStore = Preconditions.checkNotNull(builder.getUserStore()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getUserStore() { + return userStore; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static UserStoreName of(String project, String location, String userStore) { + return newBuilder().setProject(project).setLocation(location).setUserStore(userStore).build(); + } + + public static String format(String project, String location, String userStore) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setUserStore(userStore) + .build() + .toString(); + } + + public static UserStoreName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_USER_STORE.validatedMatch( + formattedString, "UserStoreName.parse: formattedString not in valid format"); + return of(matchMap.get("project"), matchMap.get("location"), matchMap.get("user_store")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (UserStoreName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_USER_STORE.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (project != null) { + fieldMapBuilder.put("project", project); + } + if (location != null) { + fieldMapBuilder.put("location", location); + } + if (userStore != null) { + fieldMapBuilder.put("user_store", userStore); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_USER_STORE.instantiate( + "project", project, "location", location, "user_store", userStore); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null && getClass() == o.getClass()) { + UserStoreName that = ((UserStoreName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.userStore, that.userStore); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(location); + h *= 1000003; + h ^= Objects.hashCode(userStore); + return h; + } + + /** Builder for projects/{project}/locations/{location}/userStores/{user_store}. */ + public static class Builder { + private String project; + private String location; + private String userStore; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getUserStore() { + return userStore; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setUserStore(String userStore) { + this.userStore = userStore; + return this; + } + + private Builder(UserStoreName userStoreName) { + this.project = userStoreName.project; + this.location = userStoreName.location; + this.userStore = userStoreName.userStore; + } + + public UserStoreName build() { + return new UserStoreName(this); + } + } +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/UserStoreOrBuilder.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/UserStoreOrBuilder.java new file mode 100644 index 000000000000..ffb0646a8aad --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/UserStoreOrBuilder.java @@ -0,0 +1,172 @@ +/* + * 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/cloud/discoveryengine/v1beta/user_store.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.discoveryengine.v1beta; + +@com.google.protobuf.Generated +public interface UserStoreOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.discoveryengine.v1beta.UserStore) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
            +   * Immutable. The full resource name of the User Store, in the format of
            +   * `projects/{project}/locations/{location}/userStores/{user_store}`.
            +   *
            +   * This field must be a UTF-8 encoded string with a length limit of 1024
            +   * characters.
            +   * 
            + * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
            +   * Immutable. The full resource name of the User Store, in the format of
            +   * `projects/{project}/locations/{location}/userStores/{user_store}`.
            +   *
            +   * This field must be a UTF-8 encoded string with a length limit of 1024
            +   * characters.
            +   * 
            + * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
            +   * The display name of the User Store.
            +   * 
            + * + * string display_name = 2; + * + * @return The displayName. + */ + java.lang.String getDisplayName(); + + /** + * + * + *
            +   * The display name of the User Store.
            +   * 
            + * + * string display_name = 2; + * + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString getDisplayNameBytes(); + + /** + * + * + *
            +   * Optional. The default subscription
            +   * [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig] for the
            +   * UserStore, if
            +   * [UserStore.enable_license_auto_register][google.cloud.discoveryengine.v1beta.UserStore.enable_license_auto_register]
            +   * is true, new users will automatically register under the default
            +   * subscription.
            +   *
            +   * If default
            +   * [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig] doesn't
            +   * have remaining license seats left, new users will not be assigned with
            +   * license and will be blocked for Vertex AI Search features. This is used if
            +   * `license_assignment_tier_rules` is not configured.
            +   * 
            + * + * + * string default_license_config = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The defaultLicenseConfig. + */ + java.lang.String getDefaultLicenseConfig(); + + /** + * + * + *
            +   * Optional. The default subscription
            +   * [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig] for the
            +   * UserStore, if
            +   * [UserStore.enable_license_auto_register][google.cloud.discoveryengine.v1beta.UserStore.enable_license_auto_register]
            +   * is true, new users will automatically register under the default
            +   * subscription.
            +   *
            +   * If default
            +   * [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig] doesn't
            +   * have remaining license seats left, new users will not be assigned with
            +   * license and will be blocked for Vertex AI Search features. This is used if
            +   * `license_assignment_tier_rules` is not configured.
            +   * 
            + * + * + * string default_license_config = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for defaultLicenseConfig. + */ + com.google.protobuf.ByteString getDefaultLicenseConfigBytes(); + + /** + * + * + *
            +   * Optional. Whether to enable license auto register for users in this User
            +   * Store. If true, new users will automatically register under the default
            +   * license config as long as the default license config has seats left.
            +   * 
            + * + * bool enable_license_auto_register = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The enableLicenseAutoRegister. + */ + boolean getEnableLicenseAutoRegister(); + + /** + * + * + *
            +   * Optional. Whether to enable license auto update for users in this User
            +   * Store. If true, users with expired licenses will automatically be updated
            +   * to use the default license config as long as the default license config has
            +   * seats left.
            +   * 
            + * + * bool enable_expired_license_auto_update = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enableExpiredLicenseAutoUpdate. + */ + boolean getEnableExpiredLicenseAutoUpdate(); +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/UserStoreProto.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/UserStoreProto.java new file mode 100644 index 000000000000..acf0168b95b5 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/UserStoreProto.java @@ -0,0 +1,109 @@ +/* + * 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/cloud/discoveryengine/v1beta/user_store.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.discoveryengine.v1beta; + +@com.google.protobuf.Generated +public final class UserStoreProto extends com.google.protobuf.GeneratedFile { + private UserStoreProto() {} + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "UserStoreProto"); + } + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1beta_UserStore_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1beta_UserStore_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n4google/cloud/discoveryengine/v1beta/us" + + "er_store.proto\022#google.cloud.discoveryen" + + "gine.v1beta\032\037google/api/field_behavior.p" + + "roto\032\031google/api/resource.proto\"\326\002\n\tUser" + + "Store\022\021\n\004name\030\001 \001(\tB\003\340A\005\022\024\n\014display_name" + + "\030\002 \001(\t\022T\n\026default_license_config\030\005 \001(\tB4" + + "\340A\001\372A.\n,discoveryengine.googleapis.com/L" + + "icenseConfig\022)\n\034enable_license_auto_regi" + + "ster\030\006 \001(\010B\003\340A\001\022/\n\"enable_expired_licens" + + "e_auto_update\030\007 \001(\010B\003\340A\001:n\352Ak\n(discovery" + + "engine.googleapis.com/UserStore\022?project" + + "s/{project}/locations/{location}/userSto" + + "res/{user_store}B\225\002\n\'com.google.cloud.di" + + "scoveryengine.v1betaB\016UserStoreProtoP\001ZQ" + + "cloud.google.com/go/discoveryengine/apiv" + + "1beta/discoveryenginepb;discoveryenginep" + + "b\242\002\017DISCOVERYENGINE\252\002#Google.Cloud.Disco" + + "veryEngine.V1Beta\312\002#Google\\Cloud\\Discove" + + "ryEngine\\V1beta\352\002&Google::Cloud::Discove" + + "ryEngine::V1betab\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.ResourceProto.getDescriptor(), + }); + internal_static_google_cloud_discoveryengine_v1beta_UserStore_descriptor = + getDescriptor().getMessageType(0); + internal_static_google_cloud_discoveryengine_v1beta_UserStore_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1beta_UserStore_descriptor, + new java.lang.String[] { + "Name", + "DisplayName", + "DefaultLicenseConfig", + "EnableLicenseAutoRegister", + "EnableExpiredLicenseAutoUpdate", + }); + descriptor.resolveAllFeaturesImmutable(); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.ResourceProto.resource); + registry.add(com.google.api.ResourceProto.resourceReference); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/UserStoreServiceProto.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/UserStoreServiceProto.java new file mode 100644 index 000000000000..400c51c212d3 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/UserStoreServiceProto.java @@ -0,0 +1,146 @@ +/* + * 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/cloud/discoveryengine/v1beta/user_store_service.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.discoveryengine.v1beta; + +@com.google.protobuf.Generated +public final class UserStoreServiceProto extends com.google.protobuf.GeneratedFile { + private UserStoreServiceProto() {} + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "UserStoreServiceProto"); + } + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1beta_GetUserStoreRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1beta_GetUserStoreRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_discoveryengine_v1beta_UpdateUserStoreRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_discoveryengine_v1beta_UpdateUserStoreRequest_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n\n\004name\030\001 \001(\tB0\340A\002\372A*\n(discoveryen" + + "gine.googleapis.com/UserStore\"\227\001\n\026Update" + + "UserStoreRequest\022G\n\nuser_store\030\001 \001(\0132..g" + + "oogle.cloud.discoveryengine.v1beta.UserS" + + "toreB\003\340A\002\0224\n\013update_mask\030\002 \001(\0132\032.google." + + "protobuf.FieldMaskB\003\340A\0012\217\005\n\020UserStoreSer" + + "vice\022\273\001\n\014GetUserStore\0228.google.cloud.dis" + + "coveryengine.v1beta.GetUserStoreRequest\032" + + "..google.cloud.discoveryengine.v1beta.Us" + + "erStore\"A\332A\004name\202\323\344\223\0024\0222/v1beta/{name=pr" + + "ojects/*/locations/*/userStores/*}\022\352\001\n\017U" + + "pdateUserStore\022;.google.cloud.discoverye" + + "ngine.v1beta.UpdateUserStoreRequest\032..go" + + "ogle.cloud.discoveryengine.v1beta.UserSt" + + "ore\"j\332A\026user_store,update_mask\202\323\344\223\002K2=/v" + + "1beta/{user_store.name=projects/*/locati" + + "ons/*/userStores/*}:\nuser_store\032\317\001\312A\036dis" + + "coveryengine.googleapis.com\322A\252\001https://w" + + "ww.googleapis.com/auth/cloud-platform,ht" + + "tps://www.googleapis.com/auth/discoverye" + + "ngine.readwrite,https://www.googleapis.c" + + "om/auth/discoveryengine.serving.readwrit" + + "eB\234\002\n\'com.google.cloud.discoveryengine.v" + + "1betaB\025UserStoreServiceProtoP\001ZQcloud.go" + + "ogle.com/go/discoveryengine/apiv1beta/di" + + "scoveryenginepb;discoveryenginepb\242\002\017DISC" + + "OVERYENGINE\252\002#Google.Cloud.DiscoveryEngi" + + "ne.V1Beta\312\002#Google\\Cloud\\DiscoveryEngine" + + "\\V1beta\352\002&Google::Cloud::DiscoveryEngine" + + "::V1betab\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.AnnotationsProto.getDescriptor(), + com.google.api.ClientProto.getDescriptor(), + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.ResourceProto.getDescriptor(), + com.google.cloud.discoveryengine.v1beta.UserStoreProto.getDescriptor(), + com.google.protobuf.FieldMaskProto.getDescriptor(), + }); + internal_static_google_cloud_discoveryengine_v1beta_GetUserStoreRequest_descriptor = + getDescriptor().getMessageType(0); + internal_static_google_cloud_discoveryengine_v1beta_GetUserStoreRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1beta_GetUserStoreRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_discoveryengine_v1beta_UpdateUserStoreRequest_descriptor = + getDescriptor().getMessageType(1); + internal_static_google_cloud_discoveryengine_v1beta_UpdateUserStoreRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_discoveryengine_v1beta_UpdateUserStoreRequest_descriptor, + new java.lang.String[] { + "UserStore", "UpdateMask", + }); + descriptor.resolveAllFeaturesImmutable(); + com.google.api.AnnotationsProto.getDescriptor(); + com.google.api.ClientProto.getDescriptor(); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + com.google.cloud.discoveryengine.v1beta.UserStoreProto.getDescriptor(); + com.google.protobuf.FieldMaskProto.getDescriptor(); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.ClientProto.defaultHost); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.AnnotationsProto.http); + registry.add(com.google.api.ClientProto.methodSignature); + registry.add(com.google.api.ClientProto.oauthScopes); + registry.add(com.google.api.ResourceProto.resourceReference); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/WorkspaceConfig.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/WorkspaceConfig.java index 9d1dbe9eefa4..977d3f2c07b6 100644 --- a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/WorkspaceConfig.java +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/WorkspaceConfig.java @@ -163,6 +163,16 @@ public enum Type implements com.google.protobuf.ProtocolMessageEnum { * GOOGLE_KEEP = 7; */ GOOGLE_KEEP(7), + /** + * + * + *
            +     * Workspace Data Store contains People data
            +     * 
            + * + * GOOGLE_PEOPLE = 8; + */ + GOOGLE_PEOPLE(8), UNRECOGNIZED(-1), ; @@ -264,6 +274,17 @@ public enum Type implements com.google.protobuf.ProtocolMessageEnum { */ public static final int GOOGLE_KEEP_VALUE = 7; + /** + * + * + *
            +     * Workspace Data Store contains People data
            +     * 
            + * + * GOOGLE_PEOPLE = 8; + */ + public static final int GOOGLE_PEOPLE_VALUE = 8; + public final int getNumber() { if (this == UNRECOGNIZED) { throw new java.lang.IllegalArgumentException( @@ -304,6 +325,8 @@ public static Type forNumber(int value) { return GOOGLE_GROUPS; case 7: return GOOGLE_KEEP; + case 8: + return GOOGLE_PEOPLE; default: return null; } @@ -407,10 +430,12 @@ public com.google.cloud.discoveryengine.v1beta.WorkspaceConfig.Type getType() { * * *
            -   * Obfuscated Dasher customer ID.
            +   * Output only. Obfuscated Dasher customer ID. Derived by the server from
            +   * the project's GCP organization at data store creation time; any value
            +   * supplied in the request payload is ignored.
                * 
            * - * string dasher_customer_id = 2; + * string dasher_customer_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * @return The dasherCustomerId. */ @@ -431,10 +456,12 @@ public java.lang.String getDasherCustomerId() { * * *
            -   * Obfuscated Dasher customer ID.
            +   * Output only. Obfuscated Dasher customer ID. Derived by the server from
            +   * the project's GCP organization at data store creation time; any value
            +   * supplied in the request payload is ignored.
                * 
            * - * string dasher_customer_id = 2; + * string dasher_customer_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * @return The bytes for dasherCustomerId. */ @@ -1053,10 +1080,12 @@ public Builder clearType() { * * *
            -     * Obfuscated Dasher customer ID.
            +     * Output only. Obfuscated Dasher customer ID. Derived by the server from
            +     * the project's GCP organization at data store creation time; any value
            +     * supplied in the request payload is ignored.
                  * 
            * - * string dasher_customer_id = 2; + * string dasher_customer_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * @return The dasherCustomerId. */ @@ -1076,10 +1105,12 @@ public java.lang.String getDasherCustomerId() { * * *
            -     * Obfuscated Dasher customer ID.
            +     * Output only. Obfuscated Dasher customer ID. Derived by the server from
            +     * the project's GCP organization at data store creation time; any value
            +     * supplied in the request payload is ignored.
                  * 
            * - * string dasher_customer_id = 2; + * string dasher_customer_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * @return The bytes for dasherCustomerId. */ @@ -1099,10 +1130,12 @@ public com.google.protobuf.ByteString getDasherCustomerIdBytes() { * * *
            -     * Obfuscated Dasher customer ID.
            +     * Output only. Obfuscated Dasher customer ID. Derived by the server from
            +     * the project's GCP organization at data store creation time; any value
            +     * supplied in the request payload is ignored.
                  * 
            * - * string dasher_customer_id = 2; + * string dasher_customer_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * @param value The dasherCustomerId to set. * @return This builder for chaining. @@ -1121,10 +1154,12 @@ public Builder setDasherCustomerId(java.lang.String value) { * * *
            -     * Obfuscated Dasher customer ID.
            +     * Output only. Obfuscated Dasher customer ID. Derived by the server from
            +     * the project's GCP organization at data store creation time; any value
            +     * supplied in the request payload is ignored.
                  * 
            * - * string dasher_customer_id = 2; + * string dasher_customer_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * @return This builder for chaining. */ @@ -1139,10 +1174,12 @@ public Builder clearDasherCustomerId() { * * *
            -     * Obfuscated Dasher customer ID.
            +     * Output only. Obfuscated Dasher customer ID. Derived by the server from
            +     * the project's GCP organization at data store creation time; any value
            +     * supplied in the request payload is ignored.
                  * 
            * - * string dasher_customer_id = 2; + * string dasher_customer_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * @param value The bytes for dasherCustomerId to set. * @return This builder for chaining. diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/WorkspaceConfigOrBuilder.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/WorkspaceConfigOrBuilder.java index a1acd4c6afe5..242c8d3f95fa 100644 --- a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/WorkspaceConfigOrBuilder.java +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/WorkspaceConfigOrBuilder.java @@ -56,10 +56,12 @@ public interface WorkspaceConfigOrBuilder * * *
            -   * Obfuscated Dasher customer ID.
            +   * Output only. Obfuscated Dasher customer ID. Derived by the server from
            +   * the project's GCP organization at data store creation time; any value
            +   * supplied in the request payload is ignored.
                * 
            * - * string dasher_customer_id = 2; + * string dasher_customer_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * @return The dasherCustomerId. */ @@ -69,10 +71,12 @@ public interface WorkspaceConfigOrBuilder * * *
            -   * Obfuscated Dasher customer ID.
            +   * Output only. Obfuscated Dasher customer ID. Derived by the server from
            +   * the project's GCP organization at data store creation time; any value
            +   * supplied in the request payload is ignored.
                * 
            * - * string dasher_customer_id = 2; + * string dasher_customer_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * @return The bytes for dasherCustomerId. */ diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/WriteUserEventRequest.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/WriteUserEventRequest.java index 5bc5c7b5d80f..7e82eb0e484d 100644 --- a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/WriteUserEventRequest.java +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/WriteUserEventRequest.java @@ -85,11 +85,11 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * [DataStore][google.cloud.discoveryengine.v1beta.DataStore] level, the * format is: * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`. - * If the write user event action is applied in [Location][] level, for - * example, the event with - * [Document][google.cloud.discoveryengine.v1beta.Document] across multiple - * [DataStore][google.cloud.discoveryengine.v1beta.DataStore], the format is: - * `projects/{project}/locations/{location}`. + * If the write user event action is applied in + * [Location][google.cloud.location.Location] level, for example, the event + * with [Document][google.cloud.discoveryengine.v1beta.Document] across + * multiple [DataStore][google.cloud.discoveryengine.v1beta.DataStore], the + * format is: `projects/{project}/locations/{location}`. * * * @@ -120,11 +120,11 @@ public java.lang.String getParent() { * [DataStore][google.cloud.discoveryengine.v1beta.DataStore] level, the * format is: * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`. - * If the write user event action is applied in [Location][] level, for - * example, the event with - * [Document][google.cloud.discoveryengine.v1beta.Document] across multiple - * [DataStore][google.cloud.discoveryengine.v1beta.DataStore], the format is: - * `projects/{project}/locations/{location}`. + * If the write user event action is applied in + * [Location][google.cloud.location.Location] level, for example, the event + * with [Document][google.cloud.discoveryengine.v1beta.Document] across + * multiple [DataStore][google.cloud.discoveryengine.v1beta.DataStore], the + * format is: `projects/{project}/locations/{location}`. * * * @@ -616,11 +616,11 @@ public Builder mergeFrom( * [DataStore][google.cloud.discoveryengine.v1beta.DataStore] level, the * format is: * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`. - * If the write user event action is applied in [Location][] level, for - * example, the event with - * [Document][google.cloud.discoveryengine.v1beta.Document] across multiple - * [DataStore][google.cloud.discoveryengine.v1beta.DataStore], the format is: - * `projects/{project}/locations/{location}`. + * If the write user event action is applied in + * [Location][google.cloud.location.Location] level, for example, the event + * with [Document][google.cloud.discoveryengine.v1beta.Document] across + * multiple [DataStore][google.cloud.discoveryengine.v1beta.DataStore], the + * format is: `projects/{project}/locations/{location}`. * * * @@ -650,11 +650,11 @@ public java.lang.String getParent() { * [DataStore][google.cloud.discoveryengine.v1beta.DataStore] level, the * format is: * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`. - * If the write user event action is applied in [Location][] level, for - * example, the event with - * [Document][google.cloud.discoveryengine.v1beta.Document] across multiple - * [DataStore][google.cloud.discoveryengine.v1beta.DataStore], the format is: - * `projects/{project}/locations/{location}`. + * If the write user event action is applied in + * [Location][google.cloud.location.Location] level, for example, the event + * with [Document][google.cloud.discoveryengine.v1beta.Document] across + * multiple [DataStore][google.cloud.discoveryengine.v1beta.DataStore], the + * format is: `projects/{project}/locations/{location}`. * * * @@ -684,11 +684,11 @@ public com.google.protobuf.ByteString getParentBytes() { * [DataStore][google.cloud.discoveryengine.v1beta.DataStore] level, the * format is: * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`. - * If the write user event action is applied in [Location][] level, for - * example, the event with - * [Document][google.cloud.discoveryengine.v1beta.Document] across multiple - * [DataStore][google.cloud.discoveryengine.v1beta.DataStore], the format is: - * `projects/{project}/locations/{location}`. + * If the write user event action is applied in + * [Location][google.cloud.location.Location] level, for example, the event + * with [Document][google.cloud.discoveryengine.v1beta.Document] across + * multiple [DataStore][google.cloud.discoveryengine.v1beta.DataStore], the + * format is: `projects/{project}/locations/{location}`. * * * @@ -717,11 +717,11 @@ public Builder setParent(java.lang.String value) { * [DataStore][google.cloud.discoveryengine.v1beta.DataStore] level, the * format is: * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`. - * If the write user event action is applied in [Location][] level, for - * example, the event with - * [Document][google.cloud.discoveryengine.v1beta.Document] across multiple - * [DataStore][google.cloud.discoveryengine.v1beta.DataStore], the format is: - * `projects/{project}/locations/{location}`. + * If the write user event action is applied in + * [Location][google.cloud.location.Location] level, for example, the event + * with [Document][google.cloud.discoveryengine.v1beta.Document] across + * multiple [DataStore][google.cloud.discoveryengine.v1beta.DataStore], the + * format is: `projects/{project}/locations/{location}`. * * * @@ -746,11 +746,11 @@ public Builder clearParent() { * [DataStore][google.cloud.discoveryengine.v1beta.DataStore] level, the * format is: * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`. - * If the write user event action is applied in [Location][] level, for - * example, the event with - * [Document][google.cloud.discoveryengine.v1beta.Document] across multiple - * [DataStore][google.cloud.discoveryengine.v1beta.DataStore], the format is: - * `projects/{project}/locations/{location}`. + * If the write user event action is applied in + * [Location][google.cloud.location.Location] level, for example, the event + * with [Document][google.cloud.discoveryengine.v1beta.Document] across + * multiple [DataStore][google.cloud.discoveryengine.v1beta.DataStore], the + * format is: `projects/{project}/locations/{location}`. * * * diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/WriteUserEventRequestOrBuilder.java b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/WriteUserEventRequestOrBuilder.java index e97d2b866366..146f592b09e6 100644 --- a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/WriteUserEventRequestOrBuilder.java +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/java/com/google/cloud/discoveryengine/v1beta/WriteUserEventRequestOrBuilder.java @@ -35,11 +35,11 @@ public interface WriteUserEventRequestOrBuilder * [DataStore][google.cloud.discoveryengine.v1beta.DataStore] level, the * format is: * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`. - * If the write user event action is applied in [Location][] level, for - * example, the event with - * [Document][google.cloud.discoveryengine.v1beta.Document] across multiple - * [DataStore][google.cloud.discoveryengine.v1beta.DataStore], the format is: - * `projects/{project}/locations/{location}`. + * If the write user event action is applied in + * [Location][google.cloud.location.Location] level, for example, the event + * with [Document][google.cloud.discoveryengine.v1beta.Document] across + * multiple [DataStore][google.cloud.discoveryengine.v1beta.DataStore], the + * format is: `projects/{project}/locations/{location}`. * * * @@ -59,11 +59,11 @@ public interface WriteUserEventRequestOrBuilder * [DataStore][google.cloud.discoveryengine.v1beta.DataStore] level, the * format is: * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`. - * If the write user event action is applied in [Location][] level, for - * example, the event with - * [Document][google.cloud.discoveryengine.v1beta.Document] across multiple - * [DataStore][google.cloud.discoveryengine.v1beta.DataStore], the format is: - * `projects/{project}/locations/{location}`. + * If the write user event action is applied in + * [Location][google.cloud.location.Location] level, for example, the event + * with [Document][google.cloud.discoveryengine.v1beta.Document] across + * multiple [DataStore][google.cloud.discoveryengine.v1beta.DataStore], the + * format is: `projects/{project}/locations/{location}`. * * * diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/acl_config.proto b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/acl_config.proto new file mode 100644 index 000000000000..51408d323d1d --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/acl_config.proto @@ -0,0 +1,49 @@ +// 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 +// +// http://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. + +syntax = "proto3"; + +package google.cloud.discoveryengine.v1beta; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/discoveryengine/v1beta/common.proto"; + +option csharp_namespace = "Google.Cloud.DiscoveryEngine.V1Beta"; +option go_package = "cloud.google.com/go/discoveryengine/apiv1beta/discoveryenginepb;discoveryenginepb"; +option java_multiple_files = true; +option java_outer_classname = "AclConfigProto"; +option java_package = "com.google.cloud.discoveryengine.v1beta"; +option objc_class_prefix = "DISCOVERYENGINE"; +option php_namespace = "Google\\Cloud\\DiscoveryEngine\\V1beta"; +option ruby_package = "Google::Cloud::DiscoveryEngine::V1beta"; + +// Access Control Configuration. +message AclConfig { + option (google.api.resource) = { + type: "discoveryengine.googleapis.com/AclConfig" + pattern: "projects/{project}/locations/{location}/aclConfig" + }; + + // Immutable. The full resource name of the acl configuration. + // Format: + // `projects/{project}/locations/{location}/aclConfig`. + // + // This field must be a UTF-8 encoded string with a length limit of 1024 + // characters. + string name = 1 [(google.api.field_behavior) = IMMUTABLE]; + + // Identity provider config. + IdpConfig idp_config = 2; +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/acl_config_service.proto b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/acl_config_service.proto new file mode 100644 index 000000000000..1139678ec1f9 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/acl_config_service.proto @@ -0,0 +1,81 @@ +// 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 +// +// http://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. + +syntax = "proto3"; + +package google.cloud.discoveryengine.v1beta; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/discoveryengine/v1beta/acl_config.proto"; + +option csharp_namespace = "Google.Cloud.DiscoveryEngine.V1Beta"; +option go_package = "cloud.google.com/go/discoveryengine/apiv1beta/discoveryenginepb;discoveryenginepb"; +option java_multiple_files = true; +option java_outer_classname = "AclConfigServiceProto"; +option java_package = "com.google.cloud.discoveryengine.v1beta"; +option objc_class_prefix = "DISCOVERYENGINE"; +option php_namespace = "Google\\Cloud\\DiscoveryEngine\\V1beta"; +option ruby_package = "Google::Cloud::DiscoveryEngine::V1beta"; + +// Service for managing Acl Configuration. +service AclConfigService { + option (google.api.default_host) = "discoveryengine.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform," + "https://www.googleapis.com/auth/discoveryengine.readwrite," + "https://www.googleapis.com/auth/discoveryengine.serving.readwrite"; + + // Default ACL configuration for use in a location of a customer's project. + // Updates will only reflect to new data stores. Existing data stores will + // still use the old value. + rpc UpdateAclConfig(UpdateAclConfigRequest) returns (AclConfig) { + option (google.api.http) = { + patch: "/v1beta/{acl_config.name=projects/*/locations/*/aclConfig}" + body: "acl_config" + }; + } + + // Gets the [AclConfig][google.cloud.discoveryengine.v1beta.AclConfig]. + rpc GetAclConfig(GetAclConfigRequest) returns (AclConfig) { + option (google.api.http) = { + get: "/v1beta/{name=projects/*/locations/*/aclConfig}" + }; + option (google.api.method_signature) = "name"; + } +} + +// Request message for GetAclConfigRequest method. +message GetAclConfigRequest { + // Required. Resource name of + // [AclConfig][google.cloud.discoveryengine.v1beta.AclConfig], such as + // `projects/*/locations/*/aclConfig`. + // + // If the caller does not have permission to access the + // [AclConfig][google.cloud.discoveryengine.v1beta.AclConfig], regardless of + // whether or not it exists, a PERMISSION_DENIED error is returned. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "discoveryengine.googleapis.com/AclConfig" + } + ]; +} + +// Request message for UpdateAclConfig method. +message UpdateAclConfigRequest { + AclConfig acl_config = 1 [(google.api.field_behavior) = REQUIRED]; +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/agent_gateway_setting.proto b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/agent_gateway_setting.proto new file mode 100644 index 000000000000..77f396616007 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/agent_gateway_setting.proto @@ -0,0 +1,57 @@ +// 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 +// +// http://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. + +syntax = "proto3"; + +package google.cloud.discoveryengine.v1beta; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; + +option csharp_namespace = "Google.Cloud.DiscoveryEngine.V1Beta"; +option go_package = "cloud.google.com/go/discoveryengine/apiv1beta/discoveryenginepb;discoveryenginepb"; +option java_multiple_files = true; +option java_outer_classname = "AgentGatewaySettingProto"; +option java_package = "com.google.cloud.discoveryengine.v1beta"; +option objc_class_prefix = "DISCOVERYENGINE"; +option php_namespace = "Google\\Cloud\\DiscoveryEngine\\V1beta"; +option ruby_package = "Google::Cloud::DiscoveryEngine::V1beta"; + +// Agent Gateway setting, which may be attached to Gemini Enterprise resources +// for egress control of Gemini Enterprise agents to agents and tools outside of +// Gemini Enterprise. +message AgentGatewaySetting { + // Reference to an Agent Gateway resource. + message AgentGatewayReference { + // Required. Immutable. The resource name of the agent gateway. + // + // Expected format: + // `projects/{project_number}/locations/{location}/agentGateways/{agent_gateway}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "networkservices.googleapis.com/AgentGateway" + } + ]; + } + + // Optional. The default egress agent gateway to use, when this setting is + // applied to a Gemini Enterprise resource. + // + // The deployment mode must be GOOGLE_MANAGED, and the governed access path + // must be AGENT_TO_ANYWHERE. + AgentGatewayReference default_egress_agent_gateway = 1 + [(google.api.field_behavior) = OPTIONAL]; +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/answer.proto b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/answer.proto index 46947d61b04e..856d7b3df637 100644 --- a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/answer.proto +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/answer.proto @@ -1,4 +1,4 @@ -// Copyright 2025 Google LLC +// 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. @@ -18,6 +18,7 @@ package google.cloud.discoveryengine.v1beta; import "google/api/field_behavior.proto"; import "google/api/resource.proto"; +import "google/cloud/discoveryengine/v1beta/safety.proto"; import "google/protobuf/struct.proto"; import "google/protobuf/timestamp.proto"; @@ -42,10 +43,13 @@ message Answer { // Citation info for a segment. message Citation { // Index indicates the start of the segment, measured in bytes (UTF-8 - // unicode). + // unicode). If there are multi-byte characters,such as non-ASCII + // characters, the index measurement is longer than the string length. int64 start_index = 1; - // End of the attributed segment, exclusive. + // End of the attributed segment, exclusive. Measured in bytes (UTF-8 + // unicode). If there are multi-byte characters,such as non-ASCII + // characters, the index measurement is longer than the string length. int64 end_index = 2; // Citation sources for the attributed segment. @@ -58,6 +62,33 @@ message Answer { string reference_id = 1; } + // Grounding support for a claim in `answer_text`. + message GroundingSupport { + // Required. Index indicates the start of the claim, measured in bytes + // (UTF-8 unicode). + int64 start_index = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. End of the claim, exclusive. + int64 end_index = 2 [(google.api.field_behavior) = REQUIRED]; + + // A score in the range of [0, 1] describing how grounded is a specific + // claim by the references. + // Higher value means that the claim is better supported by the reference + // chunks. + optional double grounding_score = 3; + + // Indicates that this claim required grounding check. When the + // system decided this claim didn't require attribution/grounding check, + // this field is set to false. In that case, no grounding check was + // done for the claim and therefore `grounding_score`, `sources` is not + // returned. + optional bool grounding_check_required = 4; + + // Optional. Citation sources for the claim. + repeated CitationSource sources = 5 + [(google.api.field_behavior) = OPTIONAL]; + } + // Reference. message Reference { // Unstructured document information. @@ -76,6 +107,10 @@ message Answer { // the same query and chunk at any time due to a model retraining or // change in implementation. optional float relevance_score = 3; + + // Output only. Stores indexes of blobattachments linked to this chunk. + repeated int64 blob_attachment_indexes = 4 + [(google.api.field_behavior) = OUTPUT_ONLY]; } // Document resource name. @@ -137,6 +172,10 @@ message Answer { // Document metadata. DocumentMetadata document_metadata = 4; + + // Output only. Stores indexes of blobattachments linked to this chunk. + repeated int64 blob_attachment_indexes = 5 + [(google.api.field_behavior) = OUTPUT_ONLY]; } // Structured search information. @@ -148,6 +187,12 @@ message Answer { // Structured search data. google.protobuf.Struct struct_data = 2; + + // Output only. The title of the document. + string title = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The URI of the document. + string uri = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; } // Search result content. @@ -163,6 +208,39 @@ message Answer { } } + // Stores binarydata attached to text answer, e.g. image, video, audio, etc. + message BlobAttachment { + // The media type and data of the blob. + message Blob { + // Output only. The media type (MIME type) of the generated or retrieved + // data. + string mime_type = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Raw bytes. + bytes data = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + } + + // The source of the blob. + enum AttributionType { + // Unspecified attribution type. + ATTRIBUTION_TYPE_UNSPECIFIED = 0; + + // The attachment data is from the corpus. + CORPUS = 1; + + // The attachment data is generated by the model through code + // generation. + GENERATED = 2; + } + + // Output only. The mime type and data of the blob. + Blob data = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The attribution type of the blob. + AttributionType attribution_type = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; + } + // Step information. message Step { // Action. @@ -288,6 +366,9 @@ message Answer { // Non-answer-seeking query classification type, for no clear intent. NON_ANSWER_SEEKING_QUERY_V2 = 4; + + // User defined query classification type. + USER_DEFINED_CLASSIFICATION_QUERY = 5; } // Query classification type. @@ -314,6 +395,9 @@ message Answer { // Answer generation has succeeded. SUCCEEDED = 3; + + // Answer generation is currently in progress. + STREAMING = 4; } // An enum for answer skipped reasons. @@ -369,6 +453,20 @@ message Answer { // Google skips the answer if a well grounded answer was unable to be // generated. LOW_GROUNDED_ANSWER = 9; + + // The user defined query classification ignored case. + // + // Google skips the answer if the query is classified as a user defined + // query classification. + USER_DEFINED_CLASSIFICATION_QUERY_IGNORED = 10; + + // The unhelpful answer case. + // + // Google skips the answer if the answer is not helpful. This can be due to + // a variety of factors, including but not limited to: the query is not + // answerable, the answer is not relevant to the query, or the answer is + // not well-formatted. + UNHELPFUL_ANSWER = 11; } // Immutable. Fully qualified name @@ -381,12 +479,24 @@ message Answer { // The textual answer. string answer_text = 3; + // A score in the range of [0, 1] describing how grounded the answer is by the + // reference chunks. + optional double grounding_score = 12; + // Citations. repeated Citation citations = 4; + // Optional. Grounding supports. + repeated GroundingSupport grounding_supports = 13 + [(google.api.field_behavior) = OPTIONAL]; + // References. repeated Reference references = 5; + // Output only. List of blob attachments in the answer. + repeated BlobAttachment blob_attachments = 15 + [(google.api.field_behavior) = OUTPUT_ONLY]; + // Suggested related questions. repeated string related_questions = 6; @@ -407,4 +517,8 @@ message Answer { // Output only. Answer completed timestamp. google.protobuf.Timestamp complete_time = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. Safety ratings. + repeated SafetyRating safety_ratings = 14 + [(google.api.field_behavior) = OPTIONAL]; } diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/assist_answer.proto b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/assist_answer.proto new file mode 100644 index 000000000000..925213b7eaa5 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/assist_answer.proto @@ -0,0 +1,365 @@ +// 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 +// +// http://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. + +syntax = "proto3"; + +package google.cloud.discoveryengine.v1beta; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/discoveryengine/v1beta/grounded_generation_service.proto"; +import "google/protobuf/timestamp.proto"; +import "google/rpc/status.proto"; + +option csharp_namespace = "Google.Cloud.DiscoveryEngine.V1Beta"; +option go_package = "cloud.google.com/go/discoveryengine/apiv1beta/discoveryenginepb;discoveryenginepb"; +option java_multiple_files = true; +option java_outer_classname = "AssistAnswerProto"; +option java_package = "com.google.cloud.discoveryengine.v1beta"; +option objc_class_prefix = "DISCOVERYENGINE"; +option php_namespace = "Google\\Cloud\\DiscoveryEngine\\V1beta"; +option ruby_package = "Google::Cloud::DiscoveryEngine::V1beta"; + +// AssistAnswer resource, main part of +// [AssistResponse][google.cloud.discoveryengine.v1beta.AssistResponse]. +message AssistAnswer { + option (google.api.resource) = { + type: "discoveryengine.googleapis.com/AssistAnswer" + pattern: "projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/sessions/{session}/assistAnswers/{assist_answer}" + }; + + // One part of the multi-part response of the assist call. + message Reply { + // Alternatives for the assistant reply. + oneof reply { + // Possibly grounded response text or media from the assistant. + AssistantGroundedContent grounded_content = 1; + } + + // The time when the reply was created. + google.protobuf.Timestamp create_time = 14; + } + + // Customer policy enforcement results. Contains the results of the various + // policy checks, like the banned phrases or the Model Armor checks. + message CustomerPolicyEnforcementResult { + // Customer policy enforcement result for the banned phrase policy. + message BannedPhraseEnforcementResult { + // The banned phrases that were found in the query or the answer. + repeated string banned_phrases = 1; + } + + // Customer policy enforcement result for the Model Armor policy. + message ModelArmorEnforcementResult { + // The Model Armor policy result. + oneof result { + // The Model Armor violation that was found. + string model_armor_violation = 1; + + // The error returned by Model Armor if the policy enforcement failed + // for some reason. + google.rpc.Status error = 2; + } + } + + // Customer policy enforcement result for a single policy type. + message PolicyEnforcementResult { + // The policy type specific result. It can be either an error or a + // detailed information about the policy enforcement result. + oneof enforcement_result { + // The policy enforcement result for the banned phrase policy. + BannedPhraseEnforcementResult banned_phrase_enforcement_result = 3; + + // The policy enforcement result for the Model Armor policy. + ModelArmorEnforcementResult model_armor_enforcement_result = 4; + } + } + + // The verdict of the customer policy enforcement. + enum Verdict { + // Unknown value. + UNSPECIFIED = 0; + + // There was no policy violation. + ALLOW = 1; + + // Processing was blocked by the customer policy. + BLOCK = 2; + } + + // Final verdict of the customer policy enforcement. If only one policy + // blocked the processing, the verdict is BLOCK. + Verdict verdict = 1; + + // Customer policy enforcement results. + // Populated only if the assist call was skipped due to a policy + // violation. It contains results from those filters that blocked the + // processing of the query. + repeated PolicyEnforcementResult policy_results = 3; + } + + // State of the answer generation. + enum State { + // Unknown. + STATE_UNSPECIFIED = 0; + + // Assist operation is currently in progress. + IN_PROGRESS = 1; + + // Assist operation has failed. + FAILED = 2; + + // Assist operation has succeeded. + SUCCEEDED = 3; + + // Assist operation has been skipped. + SKIPPED = 4; + + // Assist operation has been cancelled (e.g. client closed the stream). + // May contain a partial response. + CANCELLED = 5; + } + + // Possible reasons for not answering an assist call. + enum AssistSkippedReason { + // Default value. Skip reason is not specified. + ASSIST_SKIPPED_REASON_UNSPECIFIED = 0; + + // The assistant ignored the query, because it did not appear to be + // answer-seeking. + NON_ASSIST_SEEKING_QUERY_IGNORED = 1; + + // The assistant ignored the query or refused to answer because of a + // customer policy violation (e.g., the query or the answer contained a + // banned phrase). + CUSTOMER_POLICY_VIOLATION = 2; + } + + // Immutable. Identifier. Resource name of the `AssistAnswer`. + // Format: + // `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/sessions/{session}/assistAnswers/{assist_answer}` + // + // This field must be a UTF-8 encoded string with a length limit of 1024 + // characters. + string name = 1 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.field_behavior) = IDENTIFIER + ]; + + // State of the answer generation. + State state = 2; + + // Replies of the assistant. + repeated Reply replies = 3; + + // Reasons for not answering the assist call. + repeated AssistSkippedReason assist_skipped_reasons = 5; + + // Optional. The field contains information about the various policy checks' + // results like the banned phrases or the Model Armor checks. This field is + // populated only if the assist call was skipped due to a policy violation. + CustomerPolicyEnforcementResult customer_policy_enforcement_result = 8 + [(google.api.field_behavior) = OPTIONAL]; +} + +// Multi-modal content. +message AssistantContent { + // Inline blob. + message Blob { + // Required. The media type (MIME type) of the generated data. + string mime_type = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. Raw bytes. + bytes data = 2 [(google.api.field_behavior) = REQUIRED]; + } + + // A file, e.g., an audio summary. + message File { + // Required. The media type (MIME type) of the file. + string mime_type = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The file ID. + string file_id = 2 [(google.api.field_behavior) = REQUIRED]; + } + + // Code generated by the model that is meant to be executed by the model. + message ExecutableCode { + // Required. The code content. Currently only supports Python. + string code = 2 [(google.api.field_behavior) = REQUIRED]; + } + + // Result of executing ExecutableCode. + message CodeExecutionResult { + // Enumeration of possible outcomes of the code execution. + enum Outcome { + // Unspecified status. This value should not be used. + OUTCOME_UNSPECIFIED = 0; + + // Code execution completed successfully. + OUTCOME_OK = 1; + + // Code execution finished but with a failure. `stderr` should contain the + // reason. + OUTCOME_FAILED = 2; + + // Code execution ran for too long, and was cancelled. There may or may + // not be a partial output present. + OUTCOME_DEADLINE_EXCEEDED = 3; + } + + // Required. Outcome of the code execution. + Outcome outcome = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Contains stdout when code execution is successful, stderr or + // other description otherwise. + string output = 2 [(google.api.field_behavior) = OPTIONAL]; + } + + // Contained data. + oneof data { + // Inline text. + string text = 2; + + // Inline binary data. + Blob inline_data = 3; + + // A file, e.g., an audio summary. + File file = 4; + + // Code generated by the model that is meant to be executed. + ExecutableCode executable_code = 7; + + // Result of executing an ExecutableCode. + CodeExecutionResult code_execution_result = 8; + } + + // The producer of the content. Can be "model" or "user". + string role = 1; + + // Optional. Indicates if the part is thought from the model. + bool thought = 6 [(google.api.field_behavior) = OPTIONAL]; +} + +// A piece of content and possibly its grounding information. +// +// Not all content needs grounding. Phrases like "Of course, I will gladly +// search it for you." do not need grounding. +message AssistantGroundedContent { + // Grounding details for text sources. + message TextGroundingMetadata { + // Grounding information for a segment of the text. + message Segment { + // Zero-based index indicating the start of the segment, measured in bytes + // of a UTF-8 string (i.e. characters encoded on multiple bytes have a + // length of more than one). + int64 start_index = 1; + + // End of the segment, exclusive. + int64 end_index = 2; + + // References for the segment. + repeated int32 reference_indices = 4; + + // Score for the segment. + float grounding_score = 5; + + // The text segment itself. + string text = 6; + } + + // Grounding information for a visual segment. + message VisualSegment { + // References for the visual segment. + repeated int32 reference_indices = 1; + + // The content id of the visual segment. In order to display the citation + // of the visual element, this content_id needs to match with the + // `grounded_content.content_metadata.content_id` field. + string content_id = 2; + } + + // Referenced content and related document metadata. + message Reference { + // Document metadata. + message DocumentMetadata { + // Language of the referenced content. For now, it is only used for + // code. + enum Language { + LANGUAGE_UNSPECIFIED = 0; + + PYTHON = 1; + + SQL = 2; + } + + Language language = 8; + + // Document resource name. + optional string document = 1 [(google.api.resource_reference) = { + type: "discoveryengine.googleapis.com/Document" + }]; + + // URI for the document. It may contain a URL that redirects to the + // actual website. + optional string uri = 2; + + // Title. + optional string title = 3; + + // Page identifier. + optional string page_identifier = 4; + + // Domain name from the document URI. Note that the `uri` field may + // contain a URL that redirects to the actual website, in which case + // this will contain the domain name of the target site. + optional string domain = 5; + + // The mime type of the document. + // https://www.iana.org/assignments/media-types/media-types.xhtml. + optional string mime_type = 7; + } + + // Referenced text content. + string content = 1; + + // Chunk of code snippet from the referenced document. + string code_snippet = 4; + + // Document metadata. + DocumentMetadata document_metadata = 2; + } + + // Grounding information for parts of the text. + repeated Segment segments = 4; + + // Grounding information for parts of the visual content. + repeated VisualSegment visual_segments = 6; + + // References for the grounded text. + repeated Reference references = 2; + } + + // Grounding metadata for various modals. It only supports text for now. + oneof metadata { + // Metadata for grounding based on text sources. + TextGroundingMetadata text_grounding_metadata = 3; + } + + // The content. + AssistantContent content = 1; + + // Source attribution of the generated content. See also + // https://cloud.google.com/vertex-ai/generative-ai/docs/learn/overview#citation_check + CitationMetadata citation_metadata = 5; +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/assistant.proto b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/assistant.proto new file mode 100644 index 000000000000..2d68eac4edef --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/assistant.proto @@ -0,0 +1,250 @@ +// 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 +// +// http://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. + +syntax = "proto3"; + +package google.cloud.discoveryengine.v1beta; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.DiscoveryEngine.V1Beta"; +option go_package = "cloud.google.com/go/discoveryengine/apiv1beta/discoveryenginepb;discoveryenginepb"; +option java_multiple_files = true; +option java_outer_classname = "AssistantProto"; +option java_package = "com.google.cloud.discoveryengine.v1beta"; +option objc_class_prefix = "DISCOVERYENGINE"; +option php_namespace = "Google\\Cloud\\DiscoveryEngine\\V1beta"; +option ruby_package = "Google::Cloud::DiscoveryEngine::V1beta"; + +// Discovery Engine Assistant resource. +message Assistant { + option (google.api.resource) = { + type: "discoveryengine.googleapis.com/Assistant" + pattern: "projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/assistants/{assistant}" + }; + + // Configuration for the generation of the assistant response. + message GenerationConfig { + // System instruction, also known as the prompt preamble for LLM calls. + message SystemInstruction { + // Optional. Additional system instruction that will be added to the + // default system instruction. + string additional_system_instruction = 2 + [(google.api.field_behavior) = OPTIONAL]; + } + + // Optional. The default model to use for assistant. + string default_model_id = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The list of models that are allowed to be used for assistant. + repeated string allowed_model_ids = 2 + [(google.api.field_behavior) = OPTIONAL]; + + // System instruction, also known as the prompt preamble for LLM calls. + // See also + // https://cloud.google.com/vertex-ai/generative-ai/docs/learn/prompts/system-instructions + SystemInstruction system_instruction = 3; + + // The default language to use for the generation of the assistant + // response. + // Use an ISO 639-1 language code such as `en`. + // If not specified, the language will be automatically detected. + string default_language = 4; + } + + // Information to identify a tool. + message ToolInfo { + // The name of the tool as defined by + // DataConnectorService.QueryAvailableActions. + // Note: it's using `action` in the DataConnectorService apis, but they are + // the same as the `tool` here. + string tool_name = 1; + + // The display name of the tool. + string tool_display_name = 2; + } + + // The enabled tools on a connector + message ToolList { + // The list of tools with corresponding tool information. + repeated ToolInfo tool_info = 1; + } + + // Customer-defined policy for the assistant. + message CustomerPolicy { + // Definition of a customer-defined banned phrase. A banned phrase is not + // allowed to appear in the user query or the LLM response, or else the + // answer will be refused. + message BannedPhrase { + // The matching method for the banned phrase. + enum BannedPhraseMatchType { + // Defaults to SIMPLE_STRING_MATCH. + BANNED_PHRASE_MATCH_TYPE_UNSPECIFIED = 0; + + // The banned phrase matches if it is found anywhere in the text as an + // exact substring. + SIMPLE_STRING_MATCH = 1; + + // Banned phrase only matches if the pattern found in the text is + // surrounded by word delimiters. The phrase itself may still contain + // word delimiters. + WORD_BOUNDARY_STRING_MATCH = 2; + } + + // Required. The raw string content to be banned. + string phrase = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Match type for the banned phrase. + BannedPhraseMatchType match_type = 2 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If true, diacritical marks (e.g., accents, umlauts) are + // ignored when matching banned phrases. For example, "cafe" would match + // "café". + bool ignore_diacritics = 3 [(google.api.field_behavior) = OPTIONAL]; + } + + // Configuration for customer defined Model Armor templates to be used for + // sanitizing user prompts and assistant responses. + message ModelArmorConfig { + // Determines the behavior when Model Armor fails to process a request. + enum FailureMode { + // Unspecified failure mode, default behavior is `FAIL_CLOSED`. + FAILURE_MODE_UNSPECIFIED = 0; + + // In case of a Model Armor processing failure, the request is allowed + // to proceed without any changes. + FAIL_OPEN = 1; + + // In case of a Model Armor processing failure, the request is rejected. + FAIL_CLOSED = 2; + } + + // Optional. The resource name of the Model Armor template for sanitizing + // user prompts. Format: + // `projects/{project}/locations/{location}/templates/{template_id}` + // + // If not specified, no sanitization will be applied to the user prompt. + string user_prompt_template = 1 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.resource_reference) = { + type: "modelarmor.googleapis.com/Template" + } + ]; + + // Optional. The resource name of the Model Armor template for sanitizing + // assistant responses. Format: + // `projects/{project}/locations/{location}/templates/{template_id}` + // + // If not specified, no sanitization will be applied to the assistant + // response. + string response_template = 2 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.resource_reference) = { + type: "modelarmor.googleapis.com/Template" + } + ]; + + // Optional. Defines the failure mode for Model Armor sanitization. + FailureMode failure_mode = 3 [(google.api.field_behavior) = OPTIONAL]; + } + + // Optional. List of banned phrases. + repeated BannedPhrase banned_phrases = 1 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Model Armor configuration to be used for sanitizing user + // prompts and assistant responses. + ModelArmorConfig model_armor_config = 2 + [(google.api.field_behavior) = OPTIONAL]; + } + + // The type of web grounding to use. + enum WebGroundingType { + // Default, unspecified setting. This is the same as disabled. + WEB_GROUNDING_TYPE_UNSPECIFIED = 0; + + // Web grounding is disabled. + WEB_GROUNDING_TYPE_DISABLED = 1; + + // Grounding with Google Search is enabled. + WEB_GROUNDING_TYPE_GOOGLE_SEARCH = 2; + + // Grounding with Enterprise Web Search is enabled. + WEB_GROUNDING_TYPE_ENTERPRISE_WEB_SEARCH = 3; + } + + // Immutable. Resource name of the assistant. + // Format: + // `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/assistants/{assistant}` + // + // It must be a UTF-8 encoded string with a length limit of 1024 characters. + string name = 1 [(google.api.field_behavior) = IMMUTABLE]; + + // Required. The assistant display name. + // + // It must be a UTF-8 encoded string with a length limit of 128 characters. + string display_name = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Description for additional information. Expected to be shown on + // the configuration UI, not to the users of the assistant. + string description = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Configuration for the generation of the assistant response. + GenerationConfig generation_config = 19 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The type of web grounding to use. + WebGroundingType web_grounding_type = 4 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. This field controls the default web grounding toggle for end + // users if `web_grounding_type` is set to `WEB_GROUNDING_TYPE_GOOGLE_SEARCH` + // or `WEB_GROUNDING_TYPE_ENTERPRISE_WEB_SEARCH`. By default, this field is + // set to false. If `web_grounding_type` is `WEB_GROUNDING_TYPE_GOOGLE_SEARCH` + // or `WEB_GROUNDING_TYPE_ENTERPRISE_WEB_SEARCH`, end users will have web + // grounding enabled by default on UI. If true, grounding toggle will be + // disabled by default on UI. End users can still enable web grounding in + // the UI if web grounding is enabled. + bool default_web_grounding_toggle_off = 22 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Note: not implemented yet. Use + // [enabled_actions][google.cloud.discoveryengine.v1beta.Assistant.enabled_actions] + // instead. The enabled tools on this assistant. The keys are connector name, + // for example + // "projects/{projectId}/locations/{locationId}/collections/{collectionId}/dataconnector + // The values consist of admin enabled tools towards the connector + // instance. Admin can selectively enable multiple tools on any of the + // connector instances that they created in the project. For example + // {"jira1ConnectorName": [(toolId1, "createTicket"), (toolId2, + // "transferTicket")], + // "gmail1ConnectorName": [(toolId3, "sendEmail"),..] } + map enabled_tools = 18 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Customer policy for the assistant. + CustomerPolicy customer_policy = 12 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. Represents the time when this Assistant was created. + google.protobuf.Timestamp create_time = 24 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Represents the time when this Assistant was most recently + // updated. + google.protobuf.Timestamp update_time = 25 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/assistant_service.proto b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/assistant_service.proto new file mode 100644 index 000000000000..526057c1cc23 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/assistant_service.proto @@ -0,0 +1,425 @@ +// 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 +// +// http://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. + +syntax = "proto3"; + +package google.cloud.discoveryengine.v1beta; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/discoveryengine/v1beta/assist_answer.proto"; +import "google/cloud/discoveryengine/v1beta/assistant.proto"; +import "google/cloud/discoveryengine/v1beta/search_service.proto"; +import "google/cloud/discoveryengine/v1beta/session.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/field_mask.proto"; + +option csharp_namespace = "Google.Cloud.DiscoveryEngine.V1Beta"; +option go_package = "cloud.google.com/go/discoveryengine/apiv1beta/discoveryenginepb;discoveryenginepb"; +option java_multiple_files = true; +option java_outer_classname = "AssistantServiceProto"; +option java_package = "com.google.cloud.discoveryengine.v1beta"; +option objc_class_prefix = "DISCOVERYENGINE"; +option php_namespace = "Google\\Cloud\\DiscoveryEngine\\V1beta"; +option ruby_package = "Google::Cloud::DiscoveryEngine::V1beta"; + +// Service for managing Assistant configuration and assisting users. +service AssistantService { + option (google.api.default_host) = "discoveryengine.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform," + "https://www.googleapis.com/auth/discoveryengine.assist.readwrite," + "https://www.googleapis.com/auth/discoveryengine.readwrite," + "https://www.googleapis.com/auth/discoveryengine.serving.readwrite"; + + // Assists the user with a query in a streaming fashion. + rpc StreamAssist(StreamAssistRequest) returns (stream StreamAssistResponse) { + option (google.api.http) = { + post: "/v1beta/{name=projects/*/locations/*/collections/*/engines/*/assistants/*}:streamAssist" + body: "*" + }; + } + + // Creates an [Assistant][google.cloud.discoveryengine.v1beta.Assistant]. + rpc CreateAssistant(CreateAssistantRequest) returns (Assistant) { + option (google.api.http) = { + post: "/v1beta/{parent=projects/*/locations/*/collections/*/engines/*}/assistants" + body: "assistant" + }; + } + + // Deletes an [Assistant][google.cloud.discoveryengine.v1beta.Assistant]. + rpc DeleteAssistant(DeleteAssistantRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1beta/{name=projects/*/locations/*/collections/*/engines/*/assistants/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Updates an [Assistant][google.cloud.discoveryengine.v1beta.Assistant] + rpc UpdateAssistant(UpdateAssistantRequest) returns (Assistant) { + option (google.api.http) = { + patch: "/v1beta/{assistant.name=projects/*/locations/*/collections/*/engines/*/assistants/*}" + body: "assistant" + }; + option (google.api.method_signature) = "assistant,update_mask"; + } + + // Gets an [Assistant][google.cloud.discoveryengine.v1beta.Assistant]. + rpc GetAssistant(GetAssistantRequest) returns (Assistant) { + option (google.api.http) = { + get: "/v1beta/{name=projects/*/locations/*/collections/*/engines/*/assistants/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists all [Assistant][google.cloud.discoveryengine.v1beta.Assistant]s under + // an [Engine][google.cloud.discoveryengine.v1beta.Engine]. + rpc ListAssistants(ListAssistantsRequest) returns (ListAssistantsResponse) { + option (google.api.http) = { + get: "/v1beta/{parent=projects/*/locations/*/collections/*/engines/*}/assistants" + }; + option (google.api.method_signature) = "parent"; + } +} + +// User metadata of the request. +message AssistUserMetadata { + // Optional. IANA time zone, e.g. Europe/Budapest. + string time_zone = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Preferred language to be used for answering if language detection + // fails. Also used as the language of error messages created by actions, + // regardless of language detection results. + string preferred_language_code = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// Request for the +// [AssistantService.StreamAssist][google.cloud.discoveryengine.v1beta.AssistantService.StreamAssist] +// method. +message StreamAssistRequest { + // Specification of tools that are used to serve the request. + message ToolsSpec { + // Specification of the Vertex AI Search tool. + message VertexAiSearchSpec { + // Optional. Specs defining + // [DataStore][google.cloud.discoveryengine.v1beta.DataStore]s to filter + // on in a search call and configurations for those data stores. This is + // only considered for + // [Engine][google.cloud.discoveryengine.v1beta.Engine]s with multiple + // data stores. + repeated SearchRequest.DataStoreSpec data_store_specs = 2 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The filter syntax consists of an expression language for + // constructing a predicate from one or more fields of the documents being + // filtered. Filter expression is case-sensitive. + // + // If this field is unrecognizable, an `INVALID_ARGUMENT` is returned. + // + // Filtering in Vertex AI Search is done by mapping the LHS filter key to + // a key property defined in the Vertex AI Search backend -- this mapping + // is defined by the customer in their schema. For example a media + // customer might have a field 'name' in their schema. In this case the + // filter would look like this: filter --> name:'ANY("king kong")' + // + // For more information about filtering including syntax and filter + // operators, see + // [Filter](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata) + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; + } + + // Specification of the web grounding tool. + message WebGroundingSpec {} + + // Specification of the image generation tool. + message ImageGenerationSpec {} + + // Specification of the video generation tool. + message VideoGenerationSpec {} + + // Optional. Specification of the Vertex AI Search tool. + VertexAiSearchSpec vertex_ai_search_spec = 1 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Specification of the web grounding tool. + // If field is present, enables grounding with web search. Works only if + // [Assistant.web_grounding_type][google.cloud.discoveryengine.v1beta.Assistant.web_grounding_type] + // is + // [WEB_GROUNDING_TYPE_GOOGLE_SEARCH][google.cloud.discoveryengine.v1beta.Assistant.WebGroundingType.WEB_GROUNDING_TYPE_GOOGLE_SEARCH] + // or + // [WEB_GROUNDING_TYPE_ENTERPRISE_WEB_SEARCH][google.cloud.discoveryengine.v1beta.Assistant.WebGroundingType.WEB_GROUNDING_TYPE_ENTERPRISE_WEB_SEARCH]. + WebGroundingSpec web_grounding_spec = 2 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Specification of the image generation tool. + ImageGenerationSpec image_generation_spec = 3 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Specification of the video generation tool. + VideoGenerationSpec video_generation_spec = 4 + [(google.api.field_behavior) = OPTIONAL]; + } + + // Assistant generation specification for the request. + // This allows to override the default generation configuration at the engine + // level. + message GenerationSpec { + // Optional. The Vertex AI model_id used for the generative model. If not + // set, the default Assistant model will be used. + string model_id = 1 [(google.api.field_behavior) = OPTIONAL]; + } + + // Required. The resource name of the + // [Assistant][google.cloud.discoveryengine.v1beta.Assistant]. Format: + // `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/assistants/{assistant}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "discoveryengine.googleapis.com/Assistant" + } + ]; + + // Optional. Current user query. + // + // Empty query is only supported if `file_ids` are provided. In this case, the + // answer will be generated based on those context files. + Query query = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The session to use for the request. If specified, the assistant + // has access to the session history, and the query and the answer are stored + // there. + // + // If `-` is specified as the session ID, or it is left empty, then a new + // session is created with an automatically generated ID. + // + // Format: + // `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/sessions/{session}` + string session = 3 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.resource_reference) = { + type: "discoveryengine.googleapis.com/Session" + } + ]; + + // Optional. Information about the user initiating the query. + AssistUserMetadata user_metadata = 6 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Specification of tools that are used to serve the request. + ToolsSpec tools_spec = 18 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Specification of the generation configuration for the request. + GenerationSpec generation_spec = 19 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response for the +// [AssistantService.StreamAssist][google.cloud.discoveryengine.v1beta.AssistantService.StreamAssist] +// method. +message StreamAssistResponse { + // Information about the session. + message SessionInfo { + // Name of the newly generated or continued session. + // + // Format: + // `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/sessions/{session}`. + string session = 1 [(google.api.resource_reference) = { + type: "discoveryengine.googleapis.com/Session" + }]; + } + + // Represents a skill used during the assist call. + message InvokedSkill { + // The resource name of the skill. + string name = 1; + + // The display name of the skill. + string display_name = 2; + } + + // Assist answer resource object containing parts of the assistant's final + // answer for the user's query. + // + // Not present if the current response doesn't add anything to previously + // sent + // [AssistAnswer.replies][google.cloud.discoveryengine.v1beta.AssistAnswer.replies]. + // + // Observe + // [AssistAnswer.state][google.cloud.discoveryengine.v1beta.AssistAnswer.state] + // to see if more parts are to be expected. While the state is `IN_PROGRESS`, + // the + // [AssistAnswer.replies][google.cloud.discoveryengine.v1beta.AssistAnswer.replies] + // field in each response will contain replies (reply fragments) to be + // appended to the ones received in previous responses. + // [AssistAnswer.name][google.cloud.discoveryengine.v1beta.AssistAnswer.name] + // won't be filled. + // + // If the state is `SUCCEEDED`, `FAILED` or `SKIPPED`, the response + // is the last response and + // [AssistAnswer.name][google.cloud.discoveryengine.v1beta.AssistAnswer.name] + // will have a value. + AssistAnswer answer = 1; + + // Session information. Only included in the final StreamAssistResponse of the + // response stream. + SessionInfo session_info = 2; + + // A global unique ID that identifies the current pair of request and stream + // of responses. Used for feedback and support. + string assist_token = 4; + + // The tool names of the tools that were invoked. + repeated string invocation_tools = 8; + + // The skills executed during the turn. + repeated InvokedSkill invoked_skills = 10; +} + +// Request for the +// [AssistantService.CreateAssistant][google.cloud.discoveryengine.v1beta.AssistantService.CreateAssistant] +// method. +message CreateAssistantRequest { + // Required. The parent resource name. + // Format: + // `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "discoveryengine.googleapis.com/Engine" + } + ]; + + // Required. The [Assistant][google.cloud.discoveryengine.v1beta.Assistant] to + // create. + Assistant assistant = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The ID to use for the + // [Assistant][google.cloud.discoveryengine.v1beta.Assistant], which will + // become the final component of the + // [Assistant][google.cloud.discoveryengine.v1beta.Assistant]'s resource name. + // + // This field must conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) + // with a length limit of 63 characters. + string assistant_id = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for the +// [AssistantService.DeleteAssistant][google.cloud.discoveryengine.v1beta.AssistantService.DeleteAssistant] +// method. +message DeleteAssistantRequest { + // Required. Resource name of + // [Assistant][google.cloud.discoveryengine.v1beta.Assistant]. Format: + // `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/assistants/{assistant}` + // + // If the caller does not have permission to delete the + // [Assistant][google.cloud.discoveryengine.v1beta.Assistant], regardless of + // whether or not it exists, a PERMISSION_DENIED error is returned. + // + // If the [Assistant][google.cloud.discoveryengine.v1beta.Assistant] to delete + // does not exist, a NOT_FOUND error is returned. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "discoveryengine.googleapis.com/Assistant" + } + ]; +} + +// Request message for the +// [AssistantService.GetAssistant][google.cloud.discoveryengine.v1beta.AssistantService.GetAssistant] +// method. +message GetAssistantRequest { + // Required. Resource name of + // [Assistant][google.cloud.discoveryengine.v1beta.Assistant]. Format: + // `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/assistants/{assistant}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "discoveryengine.googleapis.com/Assistant" + } + ]; +} + +// Request message for the +// [AssistantService.ListAssistants][google.cloud.discoveryengine.v1beta.AssistantService.ListAssistants] +// method. +message ListAssistantsRequest { + // Required. The parent resource name. + // Format: + // `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "discoveryengine.googleapis.com/Engine" + } + ]; + + // Maximum number of + // [Assistant][google.cloud.discoveryengine.v1beta.Assistant]s to return. If + // unspecified, defaults to 100. The maximum allowed value is 1000; anything + // above that will be coerced down to 1000. + int32 page_size = 2; + + // A page token + // [ListAssistantsResponse.next_page_token][google.cloud.discoveryengine.v1beta.ListAssistantsResponse.next_page_token], + // received from a previous + // [AssistantService.ListAssistants][google.cloud.discoveryengine.v1beta.AssistantService.ListAssistants] + // call. Provide this to retrieve the subsequent page. + // + // When paginating, all other parameters provided to + // [ListAssistants][google.cloud.discoveryengine.v1beta.AssistantService.ListAssistants] + // must match the call that provided the page token. + string page_token = 3; +} + +// Response message for the +// [AssistantService.ListAssistants][google.cloud.discoveryengine.v1beta.AssistantService.ListAssistants] +// method. +message ListAssistantsResponse { + // All the customer's + // [Assistant][google.cloud.discoveryengine.v1beta.Assistant]s. + repeated Assistant assistants = 1; + + // A token that can be sent as + // [ListAssistantsRequest.page_token][google.cloud.discoveryengine.v1beta.ListAssistantsRequest.page_token] + // to retrieve the next page. If this field is omitted, there are no + // subsequent pages. + string next_page_token = 2; +} + +// Request message for the +// [AssistantService.UpdateAssistant][google.cloud.discoveryengine.v1beta.AssistantService.UpdateAssistant] +// method. +message UpdateAssistantRequest { + // Required. The [Assistant][google.cloud.discoveryengine.v1beta.Assistant] to + // update. + // + // The [Assistant][google.cloud.discoveryengine.v1beta.Assistant]'s `name` + // field is used to identify the + // [Assistant][google.cloud.discoveryengine.v1beta.Assistant] to update. + // Format: + // `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/assistants/{assistant}` + // + // If the caller does not have permission to update the + // [Assistant][google.cloud.discoveryengine.v1beta.Assistant], regardless of + // whether or not it exists, a PERMISSION_DENIED error is returned. + // + // If the [Assistant][google.cloud.discoveryengine.v1beta.Assistant] to update + // does not exist, a NOT_FOUND error is returned. + Assistant assistant = 1 [(google.api.field_behavior) = REQUIRED]; + + // The list of fields to update. + google.protobuf.FieldMask update_mask = 2; +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/chunk.proto b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/chunk.proto index 6c7bac2f5765..47d609f22e4f 100644 --- a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/chunk.proto +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/chunk.proto @@ -1,4 +1,4 @@ -// Copyright 2025 Google LLC +// 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. @@ -47,6 +47,10 @@ message Chunk { // Title of the document. string title = 2; + // The mime type of the document. + // https://www.iana.org/assignments/media-types/media-types.xhtml. + string mime_type = 4; + // Data representation. // The structured JSON data for the document. It should conform to the // registered [Schema][google.cloud.discoveryengine.v1beta.Schema] or an @@ -82,6 +86,42 @@ message Chunk { repeated Chunk next_chunks = 2; } + // The structured content information. + message StructuredContent { + // Output only. The structure type of the structured content. + StructureType structure_type = 1 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The content of the structured content. + string content = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + } + + // The annotation metadata includes structured content in the current chunk. + message AnnotationMetadata { + // Output only. The structured content information. + StructuredContent structured_content = 1 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Image id is provided if the structured content is based on + // an image. + string image_id = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + } + + // Defines the types of the structured content that can be extracted. + enum StructureType { + // Default value. + STRUCTURE_TYPE_UNSPECIFIED = 0; + + // Shareholder structure. + SHAREHOLDER_STRUCTURE = 1; + + // Signature structure. + SIGNATURE_STRUCTURE = 2; + + // Checkbox structure. + CHECKBOX_STRUCTURE = 3; + } + // The full resource name of the chunk. // Format: // `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document_id}/chunks/{chunk_id}`. @@ -99,7 +139,8 @@ message Chunk { // Output only. Represents the relevance score based on similarity. // Higher score indicates higher chunk relevance. // The score is in range [-1.0, 1.0]. - // Only populated on [SearchService.SearchResponse][]. + // Only populated on + // [SearchResponse][google.cloud.discoveryengine.v1beta.SearchResponse]. optional double relevance_score = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; @@ -116,4 +157,20 @@ message Chunk { // Output only. Metadata of the current chunk. ChunkMetadata chunk_metadata = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Image Data URLs if the current chunk contains images. + // Data URLs are composed of four parts: a prefix (data:), a MIME type + // indicating the type of data, an optional base64 token if non-textual, + // and the data itself: + // data:[][;base64], + repeated string data_urls = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Annotation contents if the current chunk contains annotations. + repeated string annotation_contents = 11 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The annotation metadata includes structured content in the + // current chunk. + repeated AnnotationMetadata annotation_metadata = 12 + [(google.api.field_behavior) = OUTPUT_ONLY]; } diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/cmek_config_service.proto b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/cmek_config_service.proto new file mode 100644 index 000000000000..c362cc936deb --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/cmek_config_service.proto @@ -0,0 +1,314 @@ +// 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 +// +// http://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. + +syntax = "proto3"; + +package google.cloud.discoveryengine.v1beta; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/longrunning/operations.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.DiscoveryEngine.V1Beta"; +option go_package = "cloud.google.com/go/discoveryengine/apiv1beta/discoveryenginepb;discoveryenginepb"; +option java_multiple_files = true; +option java_outer_classname = "CmekConfigServiceProto"; +option java_package = "com.google.cloud.discoveryengine.v1beta"; +option objc_class_prefix = "DISCOVERYENGINE"; +option php_namespace = "Google\\Cloud\\DiscoveryEngine\\V1beta"; +option ruby_package = "Google::Cloud::DiscoveryEngine::V1beta"; + +// Service for managing CMEK related tasks +service CmekConfigService { + option (google.api.default_host) = "discoveryengine.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform," + "https://www.googleapis.com/auth/discoveryengine.readwrite," + "https://www.googleapis.com/auth/discoveryengine.serving.readwrite"; + + // Provisions a CMEK key for use in a location of a customer's project. + // This method will also conduct location validation on the provided + // cmekConfig to make sure the key is valid and can be used in the + // selected location. + rpc UpdateCmekConfig(UpdateCmekConfigRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1beta/{config.name=projects/*/locations/*/cmekConfig}" + body: "config" + additional_bindings { + patch: "/v1beta/{config.name=projects/*/locations/*/cmekConfigs/*}" + body: "config" + } + }; + option (google.api.method_signature) = "config"; + option (google.longrunning.operation_info) = { + response_type: "google.cloud.discoveryengine.v1beta.CmekConfig" + metadata_type: "google.cloud.discoveryengine.v1beta.UpdateCmekConfigMetadata" + }; + } + + // Gets the [CmekConfig][google.cloud.discoveryengine.v1beta.CmekConfig]. + rpc GetCmekConfig(GetCmekConfigRequest) returns (CmekConfig) { + option (google.api.http) = { + get: "/v1beta/{name=projects/*/locations/*/cmekConfig}" + additional_bindings { + get: "/v1beta/{name=projects/*/locations/*/cmekConfigs/*}" + } + }; + option (google.api.method_signature) = "name"; + } + + // Lists all the [CmekConfig][google.cloud.discoveryengine.v1beta.CmekConfig]s + // with the project. + rpc ListCmekConfigs(ListCmekConfigsRequest) + returns (ListCmekConfigsResponse) { + option (google.api.http) = { + get: "/v1beta/{parent=projects/*/locations/*}/cmekConfigs" + }; + option (google.api.method_signature) = "parent"; + } + + // De-provisions a CmekConfig. + rpc DeleteCmekConfig(DeleteCmekConfigRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1beta/{name=projects/*/locations/*/cmekConfigs/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "google.cloud.discoveryengine.v1beta.DeleteCmekConfigMetadata" + }; + } +} + +// Request message for UpdateCmekConfig method. +// rpc. +message UpdateCmekConfigRequest { + // Required. The CmekConfig resource. + CmekConfig config = 1 [(google.api.field_behavior) = REQUIRED]; + + // Set the following CmekConfig as the default to be used for child + // resources if one is not specified. + bool set_default = 2; +} + +// Request message for GetCmekConfigRequest method. +message GetCmekConfigRequest { + // Required. Resource name of + // [CmekConfig][google.cloud.discoveryengine.v1beta.CmekConfig], such as + // `projects/*/locations/*/cmekConfig` or + // `projects/*/locations/*/cmekConfigs/*`. + // + // If the caller does not have permission to access the + // [CmekConfig][google.cloud.discoveryengine.v1beta.CmekConfig], regardless of + // whether or not it exists, a PERMISSION_DENIED error is returned. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "discoveryengine.googleapis.com/CmekConfig" + } + ]; +} + +// Metadata for single-regional CMEKs. +message SingleRegionKey { + // Required. Single-regional kms key resource name which will be used to + // encrypt resources + // `projects/{project}/locations/{location}/keyRings/{keyRing}/cryptoKeys/{keyId}`. + string kms_key = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudkms.googleapis.com/CryptoKeys" + } + ]; +} + +// Configurations used to enable CMEK data encryption with Cloud KMS keys. +message CmekConfig { + option (google.api.resource) = { + type: "discoveryengine.googleapis.com/CmekConfig" + pattern: "projects/{project}/locations/{location}/cmekConfig" + pattern: "projects/{project}/locations/{location}/cmekConfigs/{cmek_config}" + plural: "cmekConfigs" + singular: "cmekConfig" + }; + + // States of the CmekConfig. + enum State { + // The CmekConfig state is unknown. + STATE_UNSPECIFIED = 0; + + // The CmekConfig is creating. + CREATING = 1; + + // The CmekConfig can be used with DataStores. + ACTIVE = 2; + + // The CmekConfig is unavailable, most likely due to the KMS Key being + // revoked. + KEY_ISSUE = 3; + + // The CmekConfig is deleting. + DELETING = 4; + + // The CmekConfig deletion process failed. + DELETE_FAILED = 7; + + // The CmekConfig is not usable, most likely due to some internal issue. + UNUSABLE = 5; + + // The KMS key version is being rotated. + ACTIVE_ROTATING = 6; + + // The KMS key is soft deleted. Some cleanup policy will eventually be + // applied. + DELETED = 8; + + // The KMS key is expired, meaning the key has been disabled for 30+ days. + // The customer can call DeleteCmekConfig to change the state to DELETED. + EXPIRED = 9; + } + + // States of NotebookLM. + enum NotebookLMState { + // The NotebookLM state is unknown. + NOTEBOOK_LM_STATE_UNSPECIFIED = 0; + + // The NotebookLM is not ready. + NOTEBOOK_LM_NOT_READY = 1; + + // The NotebookLM is ready to be used. + NOTEBOOK_LM_READY = 2; + + // The NotebookLM is not enabled. + NOTEBOOK_LM_NOT_ENABLED = 3; + } + + // Required. The name of the CmekConfig of the form + // `projects/{project}/locations/{location}/cmekConfig` or + // `projects/{project}/locations/{location}/cmekConfigs/{cmek_config}`. + string name = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. KMS key resource name which will be used to encrypt resources + // `projects/{project}/locations/{location}/keyRings/{keyRing}/cryptoKeys/{keyId}`. + string kms_key = 2 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudkms.googleapis.com/CryptoKeys" + } + ]; + + // Output only. KMS key version resource name which will be used to encrypt + // resources + // `/cryptoKeyVersions/{keyVersion}`. + string kms_key_version = 6 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "cloudkms.googleapis.com/CryptoKeyVersions" + } + ]; + + // Output only. The states of the CmekConfig. + State state = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The default CmekConfig for the Customer. + bool is_default = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The timestamp of the last key rotation. + int64 last_rotation_timestamp_micros = 5 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. Single-regional CMEKs that are required for some VAIS features. + repeated SingleRegionKey single_region_keys = 7 + [(google.api.field_behavior) = OPTIONAL]; + + // Output only. Whether the NotebookLM Corpus is ready to be used. + NotebookLMState notebooklm_state = 8 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Metadata related to the progress of the +// [CmekConfigService.UpdateCmekConfig][google.cloud.discoveryengine.v1beta.CmekConfigService.UpdateCmekConfig] +// operation. This will be returned by the google.longrunning.Operation.metadata +// field. +message UpdateCmekConfigMetadata { + // Operation create time. + google.protobuf.Timestamp create_time = 1; + + // Operation last update time. If the operation is done, this is also the + // finish time. + google.protobuf.Timestamp update_time = 2; +} + +// Request message for +// [CmekConfigService.ListCmekConfigs][google.cloud.discoveryengine.v1beta.CmekConfigService.ListCmekConfigs] +// method. +message ListCmekConfigsRequest { + // Required. The parent location resource name, such as + // `projects/{project}/locations/{location}`. + // + // If the caller does not have permission to list + // [CmekConfig][google.cloud.discoveryengine.v1beta.CmekConfig]s under this + // location, regardless of whether or not a CmekConfig exists, a + // PERMISSION_DENIED error is returned. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "discoveryengine.googleapis.com/Location" + } + ]; +} + +// Response message for +// [CmekConfigService.ListCmekConfigs][google.cloud.discoveryengine.v1beta.CmekConfigService.ListCmekConfigs] +// method. +message ListCmekConfigsResponse { + // All the customer's + // [CmekConfig][google.cloud.discoveryengine.v1beta.CmekConfig]s. + repeated CmekConfig cmek_configs = 1; +} + +// Request message for +// [CmekConfigService.DeleteCmekConfig][google.cloud.discoveryengine.v1beta.CmekConfigService.DeleteCmekConfig] +// method. +message DeleteCmekConfigRequest { + // Required. The resource name of the + // [CmekConfig][google.cloud.discoveryengine.v1beta.CmekConfig] to delete, + // such as + // `projects/{project}/locations/{location}/cmekConfigs/{cmek_config}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "discoveryengine.googleapis.com/CmekConfig" + } + ]; +} + +// Metadata related to the progress of the +// [CmekConfigService.DeleteCmekConfig][google.cloud.discoveryengine.v1beta.CmekConfigService.DeleteCmekConfig] +// operation. This will be returned by the google.longrunning.Operation.metadata +// field. +message DeleteCmekConfigMetadata { + // Operation create time. + google.protobuf.Timestamp create_time = 1; + + // Operation last update time. If the operation is done, this is also the + // finish time. + google.protobuf.Timestamp update_time = 2; +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/common.proto b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/common.proto index 142399662261..f7d6f30f6a2b 100644 --- a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/common.proto +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/common.proto @@ -1,4 +1,4 @@ -// Copyright 2025 Google LLC +// 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. @@ -16,7 +16,9 @@ syntax = "proto3"; package google.cloud.discoveryengine.v1beta; +import "google/api/field_behavior.proto"; import "google/api/resource.proto"; +import "google/type/latlng.proto"; option csharp_namespace = "Google.Cloud.DiscoveryEngine.V1Beta"; option go_package = "cloud.google.com/go/discoveryengine/apiv1beta/discoveryenginepb;discoveryenginepb"; @@ -49,6 +51,23 @@ option (google.api.resource_definition) = { pattern: "projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/completionConfig" pattern: "projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/completionConfig" }; +option (google.api.resource_definition) = { + type: "discoveryengine.googleapis.com/BillingAccountLicenseConfig" + pattern: "billingAccounts/{billing_account}/billingAccountLicenseConfigs/{billing_account_license_config}" +}; +option (google.api.resource_definition) = { + type: "networkservices.googleapis.com/AgentGateway" + pattern: "projects/{project}/locations/{location}/agentGateways/{agent_gateway}" +}; +option (google.api.resource_definition) = { + type: "modelarmor.googleapis.com/Template" + pattern: "projects/{project}/locations/{location}/templates/{template}" +}; +option (google.api.resource_definition) = { + type: "dlp.googleapis.com/ContentPolicy" + pattern: "organizations/{organization}/locations/{location}/contentPolicies/{content_policy}" + pattern: "projects/{project}/locations/{location}/contentPolicies/{content_policy}" +}; option (google.api.resource_definition) = { type: "healthcare.googleapis.com/FhirStore" pattern: "projects/{project}/locations/{location}/datasets/{dataset}/fhirStores/{fhir_store}" @@ -57,6 +76,14 @@ option (google.api.resource_definition) = { type: "healthcare.googleapis.com/FhirResource" pattern: "projects/{project}/locations/{location}/datasets/{dataset}/fhirStores/{fhir_store}/fhir/{resource_type}/{fhir_resource_id}" }; +option (google.api.resource_definition) = { + type: "cloudkms.googleapis.com/CryptoKeys" + pattern: "projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}" +}; +option (google.api.resource_definition) = { + type: "cloudkms.googleapis.com/CryptoKeyVersions" + pattern: "projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{crypto_key_version}" +}; // The industry vertical associated with the // [DataStore][google.cloud.discoveryengine.v1beta.DataStore]. @@ -93,6 +120,9 @@ enum SolutionType { // It's used for Generative chat engine only, the associated data stores // must enrolled with `SOLUTION_TYPE_CHAT` solution. SOLUTION_TYPE_GENERATIVE_CHAT = 4; + + // Used for AI Mode. + SOLUTION_TYPE_AI_MODE = 5; } // Defines a further subdivision of `SolutionType`. @@ -133,6 +163,71 @@ enum SearchAddOn { SEARCH_ADD_ON_LLM = 1; } +// Subscription tier information. +enum SubscriptionTier { + // Default value. + SUBSCRIPTION_TIER_UNSPECIFIED = 0; + + // Search tier. + // Search tier can access Vertex AI Search features and NotebookLM features. + SUBSCRIPTION_TIER_SEARCH = 1; + + // Gemini Enterprise Plus tier. + SUBSCRIPTION_TIER_SEARCH_AND_ASSISTANT = 2; + + // NotebookLM tier. + // NotebookLM is a subscription tier can only access NotebookLM features. + SUBSCRIPTION_TIER_NOTEBOOK_LM = 3; + + // Gemini Frontline worker tier. + SUBSCRIPTION_TIER_FRONTLINE_WORKER = 4; + + // Gemini Business Starter tier. + SUBSCRIPTION_TIER_AGENTSPACE_STARTER = 10; + + // Gemini Business tier. + SUBSCRIPTION_TIER_AGENTSPACE_BUSINESS = 6; + + // Gemini Enterprise Standard tier. + SUBSCRIPTION_TIER_ENTERPRISE = 7; + + // Gemini Enterprise Standard tier for emerging markets. + SUBSCRIPTION_TIER_ENTERPRISE_EMERGING = 15; + + // Gemini Enterprise EDU tier. + SUBSCRIPTION_TIER_EDU = 8; + + // Gemini Enterprise EDU Pro tier. + SUBSCRIPTION_TIER_EDU_PRO = 9; + + // Gemini Enterprise EDU tier for emerging market only. + SUBSCRIPTION_TIER_EDU_EMERGING = 11; + + // Gemini Enterprise EDU Pro tier for emerging market. + SUBSCRIPTION_TIER_EDU_PRO_EMERGING = 12; + + // Gemini Frontline Starter tier. + SUBSCRIPTION_TIER_FRONTLINE_STARTER = 13; +} + +// Subscription term. +enum SubscriptionTerm { + // Default value, do not use. + SUBSCRIPTION_TERM_UNSPECIFIED = 0; + + // 1 month. + SUBSCRIPTION_TERM_ONE_MONTH = 1; + + // 1 year. + SUBSCRIPTION_TERM_ONE_YEAR = 2; + + // 3 years. + SUBSCRIPTION_TERM_THREE_YEARS = 3; + + // Custom term. Must set the end_date. + SUBSCRIPTION_TERM_CUSTOM = 6; +} + // A floating point interval. message Interval { // The lower bound of the interval. If neither of the min fields are @@ -191,6 +286,19 @@ message CustomAttribute { // Information of an end user. message UserInfo { + // Precise location info with multiple representation options. + // Currently only latitude and longitude point is supported. + message PreciseLocation { + oneof location { + // Optional. Location represented by a latitude/longitude point. + google.type.LatLng point = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Location represented by a natural language address. Will + // later be geocoded and converted to either a point or a polygon. + string address = 2 [(google.api.field_behavior) = OPTIONAL]; + } + } + // Highly recommended for logged-in users. Unique identifier for logged-in // user, such as a user name. Don't set for anonymous users. // @@ -202,6 +310,10 @@ message UserInfo { // // The field must be a UTF-8 encoded string with a length limit of 128 // characters. Otherwise, an `INVALID_ARGUMENT` error is returned. + // + // Represents an opaque ID to the Search API. The Search API doesn't + // interpret the value in any way. This field is used to associate events + // with a user across sessions if the events are being uploaded. string user_id = 1; // User agent as included in the HTTP header. @@ -216,6 +328,17 @@ message UserInfo { // [UserEvent.direct_user_request][google.cloud.discoveryengine.v1beta.UserEvent.direct_user_request] // is set. string user_agent = 2; + + // Optional. IANA time zone, e.g. Europe/Budapest. + string time_zone = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Input only. Precise location of the user. + // It is used in Custom Ranking to calculate the distance between the user and + // the relevant documents. + PreciseLocation precise_location = 4 [ + (google.api.field_behavior) = INPUT_ONLY, + (google.api.field_behavior) = OPTIONAL + ]; } // Defines embedding config, used for bring your own embeddings feature. @@ -229,3 +352,116 @@ message DoubleList { // Double values. repeated double values = 1; } + +// Identity Provider Config. +message IdpConfig { + // Third party IDP Config. + message ExternalIdpConfig { + // Workforce pool name. + // Example: "locations/global/workforcePools/pool_id" + string workforce_pool_name = 1; + } + + // Identity Provider Type. + enum IdpType { + // Default value. ACL search not enabled. + IDP_TYPE_UNSPECIFIED = 0; + + // Google 1P provider. + GSUITE = 1; + + // Third party provider. + THIRD_PARTY = 2; + } + + // Identity provider type configured. + IdpType idp_type = 1; + + // External Identity provider config. + ExternalIdpConfig external_idp_config = 2; +} + +// Principal identifier of a user or a group. +message Principal { + // Union field principal. Principal can be a user or a group. + oneof principal { + // User identifier. + // For Google Workspace user account, user_id should be the google workspace + // user email. + // For non-google identity provider user account, user_id is the mapped user + // identifier configured during the workforcepool config. + string user_id = 1; + + // Group identifier. + // For Google Workspace user account, group_id should be the google + // workspace group email. + // For non-google identity provider user account, group_id is the mapped + // group identifier configured during the workforcepool config. + string group_id = 2; + + // For 3P application identities which are not present in the customer + // identity provider. + string external_entity_id = 3; + } +} + +// Config to data store for `HEALTHCARE_FHIR` vertical. +message HealthcareFhirConfig { + // Whether to enable configurable schema for `HEALTHCARE_FHIR` vertical. + // + // If set to `true`, the predefined healthcare fhir schema can be extended + // for more customized searching and filtering. + bool enable_configurable_schema = 1; + + // Whether to enable static indexing for `HEALTHCARE_FHIR` batch + // ingestion. + // + // If set to `true`, the batch ingestion will be processed in a static + // indexing mode which is slower but more capable of handling larger + // volume. + bool enable_static_indexing_for_batch_ingestion = 2; + + // Optional. Names of the Group resources to use as a basis for the initial + // patient filter, in format + // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/fhirStores/{fhir_store_id}/fhir/Group/{group_id}`. + // The filter group must be a FHIR resource name of + // type Group, and the filter will be constructed from the direct members of + // the group which are Patient resources. + repeated string initial_filter_groups = 4 + [(google.api.field_behavior) = OPTIONAL]; +} + +// Promotion proto includes uri and other helping information to display the +// promotion. +message SearchLinkPromotion { + // Required. The title of the promotion. + // Maximum length: 160 characters. + string title = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The URL for the page the user wants to promote. Must be set for + // site search. For other verticals, this is optional. + string uri = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The [Document][google.cloud.discoveryengine.v1beta.Document] the + // user wants to promote. For site search, leave unset and only populate uri. + // Can be set along with uri. + string document = 6 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.resource_reference) = { + type: "discoveryengine.googleapis.com/Document" + } + ]; + + // Optional. The promotion thumbnail image url. + string image_uri = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The Promotion description. + // Maximum length: 200 characters. + string description = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The enabled promotion will be returned for any serving configs + // associated with the parent of the control this promotion is attached to. + // + // This flag is used for basic site search only. + bool enabled = 5 [(google.api.field_behavior) = OPTIONAL]; +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/completion.proto b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/completion.proto index 9c95af52653c..568757abc418 100644 --- a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/completion.proto +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/completion.proto @@ -1,4 +1,4 @@ -// Copyright 2025 Google LLC +// 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. diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/completion_service.proto b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/completion_service.proto index b7b46168335c..2e41d822ea62 100644 --- a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/completion_service.proto +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/completion_service.proto @@ -1,4 +1,4 @@ -// Copyright 2025 Google LLC +// 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. @@ -40,7 +40,11 @@ option ruby_package = "Google::Cloud::DiscoveryEngine::V1beta"; service CompletionService { option (google.api.default_host) = "discoveryengine.googleapis.com"; option (google.api.oauth_scopes) = - "https://www.googleapis.com/auth/cloud-platform"; + "https://www.googleapis.com/auth/cloud-platform," + "https://www.googleapis.com/auth/cloud_search.query," + "https://www.googleapis.com/auth/discoveryengine.assist.readwrite," + "https://www.googleapis.com/auth/discoveryengine.readwrite," + "https://www.googleapis.com/auth/discoveryengine.serving.readwrite"; // Completes the specified user input with keyword suggestions. rpc CompleteQuery(CompleteQueryRequest) returns (CompleteQueryResponse) { @@ -144,6 +148,19 @@ service CompletionService { metadata_type: "google.cloud.discoveryengine.v1beta.PurgeCompletionSuggestionsMetadata" }; } + + // Removes the search history suggestion in an engine for a user. This will + // remove the suggestion from being returned in the + // [AdvancedCompleteQueryResponse.recent_search_suggestions][google.cloud.discoveryengine.v1beta.AdvancedCompleteQueryResponse.recent_search_suggestions] + // for this user. If the user searches the same suggestion again, the new + // history will override and suggest this suggestion again. + rpc RemoveSuggestion(RemoveSuggestionRequest) + returns (RemoveSuggestionResponse) { + option (google.api.http) = { + post: "/v1beta/{completion_config=projects/*/locations/*/collections/*/engines/*/completionConfig}:removeSuggestion" + body: "*" + }; + } } // Request message for @@ -183,10 +200,10 @@ message CompleteQueryRequest { // * `search-history` is the default model for site search dataStores. string query_model = 3; - // A unique identifier for tracking visitors. For example, this could be - // implemented with an HTTP cookie, which should be able to uniquely identify - // a visitor on a single device. This unique identifier should not change if - // the visitor logs in or out of the website. + // Optional. A unique identifier for tracking visitors. For example, this + // could be implemented with an HTTP cookie, which should be able to uniquely + // identify a visitor on a single device. This unique identifier should not + // change if the visitor logs in or out of the website. // // This field should NOT have a fixed value such as `unknown_visitor`. // @@ -197,7 +214,7 @@ message CompleteQueryRequest { // // The field must be a UTF-8 encoded string with a length limit of 128 // characters. Otherwise, an `INVALID_ARGUMENT` error is returned. - string user_pseudo_id = 4; + string user_pseudo_id = 4 [(google.api.field_behavior) = OPTIONAL]; // Indicates if tail suggestions should be returned if there are no // suggestions that match the full query. Even if set to true, if there are @@ -238,7 +255,8 @@ message CompleteQueryResponse { // method. // . message AdvancedCompleteQueryRequest { - // Specification to boost suggestions based on the condtion of the suggestion. + // Specification to boost suggestions based on the condition of the + // suggestion. message BoostSpec { // Boost applies to suggestions which match a condition. message ConditionBoostSpec { @@ -268,7 +286,7 @@ message AdvancedCompleteQueryRequest { } // Condition boost specifications. If a suggestion matches multiple - // conditions in the specifictions, boost values from these specifications + // conditions in the specifications, boost values from these specifications // are all applied and combined in a non-linear way. Maximum number of // specifications is 20. // @@ -276,6 +294,16 @@ message AdvancedCompleteQueryRequest { repeated ConditionBoostSpec condition_boost_specs = 1; } + // Specification of each suggestion type. + message SuggestionTypeSpec { + // Optional. Suggestion type. + SuggestionType suggestion_type = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Maximum number of suggestions to return for each suggestion + // type. + int32 max_suggestions = 2 [(google.api.field_behavior) = OPTIONAL]; + } + // Suggestion type to return. enum SuggestionType { // Default value. @@ -318,9 +346,9 @@ message AdvancedCompleteQueryRequest { // user's recently searched queries given the empty query. string query = 2 [(google.api.field_behavior) = REQUIRED]; - // Specifies the autocomplete data model. This overrides any model specified - // in the Configuration > Autocomplete section of the Cloud console. Currently - // supported values: + // Specifies the autocomplete query model, which only applies to the QUERY + // SuggestionType. This overrides any model specified in the Configuration > + // Autocomplete section of the Cloud console. Currently supported values: // // * `document` - Using suggestions generated from user-imported documents. // * `search-history` - Using suggestions generated from the past history of @@ -337,10 +365,10 @@ message AdvancedCompleteQueryRequest { // * `search-history` is the default model for site search dataStores. string query_model = 3; - // A unique identifier for tracking visitors. For example, this could be - // implemented with an HTTP cookie, which should be able to uniquely identify - // a visitor on a single device. This unique identifier should not change if - // the visitor logs in or out of the website. + // Optional. A unique identifier for tracking visitors. For example, this + // could be implemented with an HTTP cookie, which should be able to uniquely + // identify a visitor on a single device. This unique identifier should not + // change if the visitor logs in or out of the website. // // This field should NOT have a fixed value such as `unknown_visitor`. // @@ -350,7 +378,7 @@ message AdvancedCompleteQueryRequest { // [SearchRequest.user_pseudo_id][google.cloud.discoveryengine.v1beta.SearchRequest.user_pseudo_id]. // // The field must be a UTF-8 encoded string with a length limit of 128 - string user_pseudo_id = 4; + string user_pseudo_id = 4 [(google.api.field_behavior) = OPTIONAL]; // Optional. Information about the end user. // @@ -374,6 +402,13 @@ message AdvancedCompleteQueryRequest { // moment. repeated SuggestionType suggestion_types = 7 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Specification of each suggestion type. + repeated SuggestionTypeSpec suggestion_type_specs = 10 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Experiment ids for this request. + repeated string experiment_ids = 14 [(google.api.field_behavior) = OPTIONAL]; } // Response message for @@ -393,6 +428,9 @@ message AdvancedCompleteQueryResponse { // The name of the dataStore that this suggestion belongs to. repeated string data_store = 3; + + // The score of each suggestion. The score is in the range of [0, 1]. + double score = 4; } // Suggestions as people. @@ -423,6 +461,15 @@ message AdvancedCompleteQueryResponse { string data_store = 5 [(google.api.resource_reference) = { type: "discoveryengine.googleapis.com/DataStore" }]; + + // The score of each suggestion. The score is in the range of [0, 1]. + double score = 6; + + // The photo uri of the person suggestion. + string display_photo_uri = 7; + + // The destination uri of the person suggestion. + string destination_uri = 8; } // Suggestions as content. @@ -453,6 +500,15 @@ message AdvancedCompleteQueryResponse { string data_store = 5 [(google.api.resource_reference) = { type: "discoveryengine.googleapis.com/DataStore" }]; + + // The score of each suggestion. The score is in the range of [0, 1]. + double score = 6; + + // The icon uri of the content suggestion. + string icon_uri = 7; + + // The destination uri of the content suggestion. + string destination_uri = 8; } // Suggestions from recent search history. @@ -462,6 +518,9 @@ message AdvancedCompleteQueryResponse { // The time when this recent rearch happened. google.protobuf.Timestamp recent_search_time = 2; + + // The score of each suggestion. The score is in the range of [0, 1]. + double score = 3; } // Results of the matched query suggestions. The result list is ordered and @@ -486,3 +545,60 @@ message AdvancedCompleteQueryResponse { // ordered and the first result is the top suggestion. repeated RecentSearchSuggestion recent_search_suggestions = 5; } + +// Request message for +// [CompletionService.RemoveSuggestion][google.cloud.discoveryengine.v1beta.CompletionService.RemoveSuggestion] +// method. +message RemoveSuggestionRequest { + // The suggestion to be removed. + oneof suggestion { + // The search history suggestion to be removed. + string search_history_suggestion = 2; + + // Remove all search history suggestions for the user. + bool remove_all_search_history_suggestions = 6; + } + + // Required. The completion_config of the parent engine resource name for + // which the search history suggestion is to be removed, such as + // `projects/*/locations/global/collections/default_collection/engines/*/completionConfig`. + string completion_config = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "discoveryengine.googleapis.com/CompletionConfig" + } + ]; + + // Required. A unique identifier for tracking visitors. For example, this + // could be implemented with an HTTP cookie, which should be able to uniquely + // identify a visitor on a single device. This unique identifier should not + // change if the visitor logs in or out of the website. + // + // This field should NOT have a fixed value such as `unknown_visitor`. + // + // This should be the same identifier as + // [UserEvent.user_pseudo_id][google.cloud.discoveryengine.v1beta.UserEvent.user_pseudo_id] + // and + // [SearchRequest.user_pseudo_id][google.cloud.discoveryengine.v1beta.SearchRequest.user_pseudo_id]. + // + // The field must be a UTF-8 encoded string with a length limit of 128. + string user_pseudo_id = 3 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Information about the end user. + // + // This should be the same identifier information as + // [UserEvent.user_info][google.cloud.discoveryengine.v1beta.UserEvent.user_info] + // and + // [SearchRequest.user_info][google.cloud.discoveryengine.v1beta.SearchRequest.user_info]. + UserInfo user_info = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Required. Time at which the suggestion was removed. If not set, the current + // time will be used. + google.protobuf.Timestamp remove_time = 5 + [(google.api.field_behavior) = REQUIRED]; +} + +// Response message for +// [CompletionService.RemoveSuggestion][google.cloud.discoveryengine.v1beta.CompletionService.RemoveSuggestion] +// method. +message RemoveSuggestionResponse {} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/control.proto b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/control.proto index b6b8a142e0a7..8dfc735bfa23 100644 --- a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/control.proto +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/control.proto @@ -1,4 +1,4 @@ -// Copyright 2025 Google LLC +// 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. @@ -77,7 +77,7 @@ message Condition { // Optional. Query regex to match the whole search query. // Cannot be set when // [Condition.query_terms][google.cloud.discoveryengine.v1beta.Condition.query_terms] - // is set. This is currently supporting promotion use case. + // is set. Only supported for Basic Site Search promotion serving controls. string query_regex = 4 [(google.api.field_behavior) = OPTIONAL]; } @@ -95,9 +95,97 @@ message Control { // Adjusts order of products in returned list. message BoostAction { - // Required. Strength of the boost, which should be in [-1, 1]. Negative + // Specification for custom ranking based on customer specified attribute + // value. It provides more controls for customized ranking than the simple + // (condition, boost) combination above. + message InterpolationBoostSpec { + // The control points used to define the curve. The curve defined + // through these control points can only be monotonically increasing + // or decreasing(constant values are acceptable). + message ControlPoint { + // Optional. Can be one of: + // 1. The numerical field value. + // 2. The duration spec for freshness: + // The value must be formatted as an XSD `dayTimeDuration` value (a + // restricted subset of an ISO 8601 duration value). The pattern for + // this is: `[nD][T[nH][nM][nS]]`. + string attribute_value = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The value between -1 to 1 by which to boost the score if + // the attribute_value evaluates to the value specified above. + float boost_amount = 2 [(google.api.field_behavior) = OPTIONAL]; + } + + // The attribute(or function) for which the custom ranking is to be + // applied. + enum AttributeType { + // Unspecified AttributeType. + ATTRIBUTE_TYPE_UNSPECIFIED = 0; + + // The value of the numerical field will be used to dynamically update + // the boost amount. In this case, the attribute_value (the x value) + // of the control point will be the actual value of the numerical + // field for which the boost_amount is specified. + NUMERICAL = 1; + + // For the freshness use case the attribute value will be the duration + // between the current time and the date in the datetime field + // specified. The value must be formatted as an XSD `dayTimeDuration` + // value (a restricted subset of an ISO 8601 duration value). The + // pattern for this is: `[nD][T[nH][nM][nS]]`. + // For example, `5D`, `3DT12H30M`, `T24H`. + FRESHNESS = 2; + } + + // The interpolation type to be applied. Default will be linear + // (Piecewise Linear). + enum InterpolationType { + // Interpolation type is unspecified. In this case, it defaults to + // Linear. + INTERPOLATION_TYPE_UNSPECIFIED = 0; + + // Piecewise linear interpolation will be applied. + LINEAR = 1; + } + + // Optional. The name of the field whose value will be used to determine + // the boost amount. + string field_name = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The attribute type to be used to determine the boost amount. + // The attribute value can be derived from the field value of the + // specified field_name. In the case of numerical it is straightforward + // i.e. attribute_value = numerical_field_value. In the case of freshness + // however, attribute_value = (time.now() - datetime_field_value). + AttributeType attribute_type = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The interpolation type to be applied to connect the control + // points listed below. + InterpolationType interpolation_type = 3 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The control points used to define the curve. The monotonic + // function (defined through the interpolation_type above) passes through + // the control points listed here. + repeated ControlPoint control_points = 4 + [(google.api.field_behavior) = OPTIONAL]; + } + + // Constant value boost or custom ranking based boost specifications. + oneof boost_spec { + // Optional. Strength of the boost, which should be in [-1, 1]. Negative + // boost means demotion. Default is 0.0 (No-op). + float fixed_boost = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Complex specification for custom ranking based on customer + // defined attribute value. + InterpolationBoostSpec interpolation_boost_spec = 5 + [(google.api.field_behavior) = OPTIONAL]; + } + + // Strength of the boost, which should be in [-1, 1]. Negative // boost means demotion. Default is 0.0 (No-op). - float boost = 1 [(google.api.field_behavior) = REQUIRED]; + float boost = 1 [deprecated = true]; // Required. Specifies which products to apply the boost to. // @@ -164,9 +252,24 @@ message Control { repeated string synonyms = 1; } - // Actions are restricted by Vertical and Solution + // Promote certain links based on some trigger queries. // - // Required. + // Example: Promote shoe store link when searching for `shoe` keyword. + // The link can be outside of associated data store. + message PromoteAction { + // Required. Data store with which this promotion is attached to. + string data_store = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "discoveryengine.googleapis.com/DataStore" + } + ]; + + // Required. Promotion attached to this action. + SearchLinkPromotion search_link_promotion = 2 + [(google.api.field_behavior) = REQUIRED]; + } + oneof action { // Defines a boost-type control BoostAction boost_action = 6; @@ -180,6 +283,9 @@ message Control { // Treats a group of terms as synonyms of one another. SynonymsAction synonyms_action = 10; + + // Promote certain links based on predefined trigger queries. + PromoteAction promote_action = 15; } // Immutable. Fully qualified name diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/control_service.proto b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/control_service.proto index 3b18eac3908b..e77ff63beac4 100644 --- a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/control_service.proto +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/control_service.proto @@ -1,4 +1,4 @@ -// Copyright 2025 Google LLC +// 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. @@ -40,7 +40,9 @@ option ruby_package = "Google::Cloud::DiscoveryEngine::V1beta"; service ControlService { option (google.api.default_host) = "discoveryengine.googleapis.com"; option (google.api.oauth_scopes) = - "https://www.googleapis.com/auth/cloud-platform"; + "https://www.googleapis.com/auth/cloud-platform," + "https://www.googleapis.com/auth/discoveryengine.readwrite," + "https://www.googleapis.com/auth/discoveryengine.serving.readwrite"; // Creates a Control. // diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/conversation.proto b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/conversation.proto index b836980633e0..3edc6fab9734 100644 --- a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/conversation.proto +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/conversation.proto @@ -1,4 +1,4 @@ -// Copyright 2025 Google LLC +// 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. diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/conversational_search_service.proto b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/conversational_search_service.proto index 907421ba6110..ac60d09fc0b1 100644 --- a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/conversational_search_service.proto +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/conversational_search_service.proto @@ -1,4 +1,4 @@ -// Copyright 2025 Google LLC +// 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. @@ -22,6 +22,7 @@ import "google/api/field_behavior.proto"; import "google/api/resource.proto"; import "google/cloud/discoveryengine/v1beta/answer.proto"; import "google/cloud/discoveryengine/v1beta/conversation.proto"; +import "google/cloud/discoveryengine/v1beta/safety.proto"; import "google/cloud/discoveryengine/v1beta/search_service.proto"; import "google/cloud/discoveryengine/v1beta/session.proto"; import "google/protobuf/empty.proto"; @@ -40,7 +41,9 @@ option ruby_package = "Google::Cloud::DiscoveryEngine::V1beta"; service ConversationalSearchService { option (google.api.default_host) = "discoveryengine.googleapis.com"; option (google.api.oauth_scopes) = - "https://www.googleapis.com/auth/cloud-platform"; + "https://www.googleapis.com/auth/cloud-platform," + "https://www.googleapis.com/auth/discoveryengine.readwrite," + "https://www.googleapis.com/auth/discoveryengine.serving.readwrite"; // Converses a conversation. rpc ConverseConversation(ConverseConversationRequest) @@ -166,6 +169,29 @@ service ConversationalSearchService { }; } + // Answer query method (streaming). + // + // It takes one + // [AnswerQueryRequest][google.cloud.discoveryengine.v1beta.AnswerQueryRequest] + // and returns multiple + // [AnswerQueryResponse][google.cloud.discoveryengine.v1beta.AnswerQueryResponse] + // messages in a stream. + rpc StreamAnswerQuery(AnswerQueryRequest) + returns (stream AnswerQueryResponse) { + option (google.api.http) = { + post: "/v1beta/{serving_config=projects/*/locations/*/dataStores/*/servingConfigs/*}:streamAnswer" + body: "*" + additional_bindings { + post: "/v1beta/{serving_config=projects/*/locations/*/collections/*/dataStores/*/servingConfigs/*}:streamAnswer" + body: "*" + } + additional_bindings { + post: "/v1beta/{serving_config=projects/*/locations/*/collections/*/engines/*/servingConfigs/*}:streamAnswer" + body: "*" + } + }; + } + // Gets a Answer. rpc GetAnswer(GetAnswerRequest) returns (Answer) { option (google.api.http) = { @@ -473,10 +499,50 @@ message ListConversationsResponse { // method. message AnswerQueryRequest { // Safety specification. + // There are two use cases: + // 1. when only safety_spec.enable is set, the BLOCK_LOW_AND_ABOVE threshold + // will be applied for all categories. + // 2. when safety_spec.enable is set and some safety_settings are set, only + // specified safety_settings are applied. message SafetySpec { + // Safety settings. + message SafetySetting { + // Probability based thresholds levels for blocking. + enum HarmBlockThreshold { + // Unspecified harm block threshold. + HARM_BLOCK_THRESHOLD_UNSPECIFIED = 0; + + // Block low threshold and above (i.e. block more). + BLOCK_LOW_AND_ABOVE = 1; + + // Block medium threshold and above. + BLOCK_MEDIUM_AND_ABOVE = 2; + + // Block only high threshold (i.e. block less). + BLOCK_ONLY_HIGH = 3; + + // Block none. + BLOCK_NONE = 4; + + // Turn off the safety filter. + OFF = 5; + } + + // Required. Harm category. + HarmCategory category = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The harm block threshold. + HarmBlockThreshold threshold = 2 [(google.api.field_behavior) = REQUIRED]; + } + // Enable the safety filtering on the answer response. It is false by // default. bool enable = 1; + + // Optional. Safety settings. + // This settings are effective only when the safety_spec.enable is true. + repeated SafetySetting safety_settings = 2 + [(google.api.field_behavior) = OPTIONAL]; } // Related questions specification. @@ -527,6 +593,28 @@ message AnswerQueryRequest { string preamble = 1; } + // Multimodal specification: Will return an image from specified source. + // If multiple sources are specified, the pick is a quality based decision. + message MultimodalSpec { + // Specifies the image source. + enum ImageSource { + // Unspecified image source (multimodal feature is disabled by default). + IMAGE_SOURCE_UNSPECIFIED = 0; + + // Behavior when service determines the pick from all available sources. + ALL_AVAILABLE_SOURCES = 1; + + // Includes image from corpus in the answer. + CORPUS_IMAGE_ONLY = 2; + + // Triggers figure generation in the answer. + FIGURE_GENERATION_ONLY = 3; + } + + // Optional. Source of image returned in the answer. + ImageSource image_source = 3 [(google.api.field_behavior) = OPTIONAL]; + } + // Answer generation model specification. ModelSpec model_spec = 1; @@ -584,6 +672,9 @@ message AnswerQueryRequest { // messages instead. bool ignore_jail_breaking_query = 8 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Multimodal specification. + MultimodalSpec multimodal_spec = 9 [(google.api.field_behavior) = OPTIONAL]; } // Search specification. @@ -779,6 +870,9 @@ message AnswerQueryRequest { // Non-answer-seeking query classification type, for no clear intent. NON_ANSWER_SEEKING_QUERY_V2 = 4; + + // User defined query classification type. + USER_DEFINED_CLASSIFICATION_QUERY = 5; } // Enabled query classification types. @@ -787,6 +881,27 @@ message AnswerQueryRequest { // Query rephraser specification. message QueryRephraserSpec { + // Query Rephraser Model specification. + message ModelSpec { + // Query rephraser types. Currently only supports single-hop + // (max_rephrase_steps = 1) model selections. For multi-hop + // (max_rephrase_steps > 1), there is only one default model. + enum ModelType { + // Unspecified model type. + MODEL_TYPE_UNSPECIFIED = 0; + + // Small query rephraser model. Gemini 1.0 XS model. + SMALL = 1; + + // Large query rephraser model. Gemini 1.0 Pro model. + LARGE = 2; + } + + // Optional. Enabled query rephraser model type. If not set, it will use + // LARGE by default. + ModelType model_type = 1 [(google.api.field_behavior) = OPTIONAL]; + } + // Disable query rephraser. bool disable = 1; @@ -794,6 +909,9 @@ message AnswerQueryRequest { // The max number is 5 steps. // If not set or set to < 1, it will be set to 1 by default. int32 max_rephrase_steps = 2; + + // Optional. Query Rephraser Model specification. + ModelSpec model_spec = 3 [(google.api.field_behavior) = OPTIONAL]; } // Query classification specification. @@ -801,12 +919,54 @@ message AnswerQueryRequest { // Query rephraser specification. QueryRephraserSpec query_rephraser_spec = 2; + + // Optional. Whether to disable spell correction. + // The default value is `false`. + bool disable_spell_correction = 3 [(google.api.field_behavior) = OPTIONAL]; + } + + // End user specification. + message EndUserSpec { + // End user metadata. + message EndUserMetaData { + // Chunk information. + message ChunkInfo { + // Document metadata contains the information of the document of + // the current chunk. + message DocumentMetadata { + // Title of the document. + string title = 1; + } + + // Chunk textual content. It is limited to 8000 characters. + string content = 1; + + // Metadata of the document from the current chunk. + DocumentMetadata document_metadata = 2; + } + + // Search result content. + oneof content { + // Chunk information. + ChunkInfo chunk_info = 1; + } + } + + // Optional. End user metadata. + repeated EndUserMetaData end_user_metadata = 1 + [(google.api.field_behavior) = OPTIONAL]; } // Required. The resource name of the Search serving config, such as // `projects/*/locations/global/collections/default_collection/engines/*/servingConfigs/default_serving_config`, // or // `projects/*/locations/global/collections/default_collection/dataStores/*/servingConfigs/default_serving_config`. + // + // Or the resource name of the agent engine serving config, such as: + // `projects/*/locations/global/collections/default_collection/engines/*/servingConfigs/default_agent_answer`. + // (use when `enable_agent_invocation` set to true, and you have custom + // `AI_MODE` agent engine configured) + // // This field is used to identify the serving configuration name, set // of models used to make the search. string serving_config = 1 [ @@ -890,6 +1050,9 @@ message AnswerQueryRequest { // Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) // for more details. map user_labels = 13; + + // Optional. End user specification. + EndUserSpec end_user_spec = 14 [(google.api.field_behavior) = OPTIONAL]; } // Response message for @@ -941,6 +1104,14 @@ message CreateSessionRequest { // Required. The session to create. Session session = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The ID to use for the session, which will become the final + // component of the session's resource name. + // + // This value should be 1-63 characters, and valid characters + // are /[a-z0-9][a-z0-9-]{0,61}[a-z0-9]/. If not specified, a unique ID will + // be generated. + string session_id = 3 [(google.api.field_behavior) = OPTIONAL]; } // Request for UpdateSession method. @@ -1006,7 +1177,9 @@ message ListSessionsRequest { string page_token = 3; // A comma-separated list of fields to filter by, in EBNF grammar. + // // The supported fields are: + // // * `user_pseudo_id` // * `state` // * `display_name` @@ -1015,29 +1188,36 @@ message ListSessionsRequest { // * `labels` // * `create_time` // * `update_time` + // * `collaborative_project` // // Examples: - // "user_pseudo_id = some_id" - // "display_name = \"some_name\"" - // "starred = true" - // "is_pinned=true AND (NOT labels:hidden)" - // "create_time > \"1970-01-01T12:00:00Z\"" + // + // * `user_pseudo_id = some_id` + // * `display_name = "some_name"` + // * `starred = true` + // * `is_pinned=true AND (NOT labels:hidden)` + // * `create_time > "1970-01-01T12:00:00Z"` + // * `collaborative_project = + // "projects/123/locations/global/collections/default_collection/engines/" + // "default_engine/collaborative_projects/cp1"` string filter = 4; // A comma-separated list of fields to order by, sorted in ascending order. // Use "desc" after a field name for descending. + // // Supported fields: // // * `update_time` // * `create_time` // * `session_name` // * `is_pinned` + // * `display_name` // // Example: // - // * "update_time desc" - // * "create_time" - // * "is_pinned desc,update_time desc": list sessions by is_pinned first, then + // * `update_time desc` + // * `create_time` + // * `is_pinned desc,update_time desc`: list sessions by is_pinned first, then // by update_time. string order_by = 5; } diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/custom_tuning_model.proto b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/custom_tuning_model.proto index 94c65f9372dd..104326e66c49 100644 --- a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/custom_tuning_model.proto +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/custom_tuning_model.proto @@ -1,4 +1,4 @@ -// Copyright 2025 Google LLC +// 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. diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/data_store.proto b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/data_store.proto index 62a24bd224ee..cf25a454aab7 100644 --- a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/data_store.proto +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/data_store.proto @@ -1,4 +1,4 @@ -// Copyright 2025 Google LLC +// 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. @@ -18,6 +18,7 @@ package google.cloud.discoveryengine.v1beta; import "google/api/field_behavior.proto"; import "google/api/resource.proto"; +import "google/cloud/discoveryengine/v1beta/cmek_config_service.proto"; import "google/cloud/discoveryengine/v1beta/common.proto"; import "google/cloud/discoveryengine/v1beta/document_processing_config.proto"; import "google/cloud/discoveryengine/v1beta/schema.proto"; @@ -63,9 +64,109 @@ message DataStore { // Stores information regarding the serving configurations at DataStore level. message ServingConfigDataStore { - // If set true, the DataStore will not be available for serving search - // requests. - bool disabled_for_serving = 1; + // Optional. If set true, the DataStore will not be available for serving + // search requests. + bool disabled_for_serving = 1 [(google.api.field_behavior) = OPTIONAL]; + } + + // Stores information for federated search. + message FederatedSearchConfig { + // Stores information for connecting to AlloyDB. + message AlloyDbConfig { + // Configuration for connecting to AlloyDB. + message AlloyDbConnectionConfig { + // Auth mode. + enum AuthMode { + AUTH_MODE_UNSPECIFIED = 0; + + // Uses P4SA when VAIS talks to AlloyDB. + AUTH_MODE_SERVICE_ACCOUNT = 1; + + // Uses EUC when VAIS talks to AlloyDB. + AUTH_MODE_END_USER_ACCOUNT = 2; + } + + // Required. The AlloyDB instance to connect to. + string instance = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The AlloyDB database to connect to. + string database = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. Database user. + // + // If auth_mode = END_USER_ACCOUNT, it can be unset. In that case, + // the user will be inferred on the AlloyDB side, based on the + // authenticated user. + string user = 3 [(google.api.field_behavior) = REQUIRED]; + + // Required. Database password. + // + // If auth_mode = END_USER_ACCOUNT, it can be unset. In that case, + // the password will be inferred on the AlloyDB side, based on the + // authenticated user. + string password = 4 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Auth mode. + AuthMode auth_mode = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If true, enable PSVS for AlloyDB. + bool enable_psvs = 6 [(google.api.field_behavior) = OPTIONAL]; + } + + // Configuration for AlloyDB AI Natural Language. + message AlloyDbAiNaturalLanguageConfig { + // Optional. AlloyDb AI NL config id, i.e. the value that was used for + // calling `SELECT alloydb_ai_nl.g_create_configuration(...)`. Can be + // empty. + string nl_config_id = 1 [(google.api.field_behavior) = OPTIONAL]; + } + + // Required. Configuration for connecting to AlloyDB. + AlloyDbConnectionConfig alloydb_connection_config = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Optional. Configuration for Magic. + AlloyDbAiNaturalLanguageConfig alloydb_ai_nl_config = 2 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Fields to be returned in the search results. If empty, all + // fields will be returned. + repeated string returned_fields = 3 + [(google.api.field_behavior) = OPTIONAL]; + } + + // Stores information for third party applicationOAuth. + message ThirdPartyOauthConfig { + // Optional. The type of the application. E.g., "jira", "box", etc. + string app_name = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The instance name identifying the 3P app, e.g., + // "vaissptbots-my". This is different from the instance_uri which is the + // full URL of the 3P app e.g., "https://vaissptbots-my.sharepoint.com". + string instance_name = 2 [(google.api.field_behavior) = OPTIONAL]; + } + + // Config for connecting to NotebookLM Enterprise. + message NotebooklmConfig { + // Required. Search config name. + // + // Format: projects/*/locations/global/notebookLmSearchConfigs/* + string search_config = 1 [(google.api.field_behavior) = REQUIRED]; + } + + // Configuration for the data source this data store is connected to. + oneof data_source_config { + // AlloyDB config. If set, this DataStore is connected to AlloyDB. + AlloyDbConfig alloy_db_config = 1; + + // Third Party OAuth config. If set, this DataStore is connected to a + // third party application. + ThirdPartyOauthConfig third_party_oauth_config = 2; + + // NotebookLM config. If set, this DataStore is connected to + // NotebookLM Enterprise. + NotebooklmConfig notebooklm_config = 3; + } } // Content config of the data store. @@ -90,13 +191,29 @@ message DataStore { GOOGLE_WORKSPACE = 4; } - // Immutable. The full resource name of the data store. + // Configuration for configurable billing approach. + enum ConfigurableBillingApproach { + // Default value. For Spark and non-Spark non-configurable billing approach. + CONFIGURABLE_BILLING_APPROACH_UNSPECIFIED = 0; + + // Use the subscription base + overage billing for indexing core for non + // embedding storage. + CONFIGURABLE_SUBSCRIPTION_INDEXING_CORE = 1; + + // Use the consumption pay-as-you-go billing for embedding storage add-on. + CONFIGURABLE_CONSUMPTION_EMBEDDING = 2; + } + + // Immutable. Identifier. The full resource name of the data store. // Format: // `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`. // // This field must be a UTF-8 encoded string with a length limit of 1024 // characters. - string name = 1 [(google.api.field_behavior) = IMMUTABLE]; + string name = 1 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.field_behavior) = IDENTIFIER + ]; // Required. The data store display name. // @@ -117,7 +234,7 @@ message DataStore { repeated SolutionType solution_types = 5; // Output only. The id of the default - // [Schema][google.cloud.discoveryengine.v1beta.Schema] asscociated to this + // [Schema][google.cloud.discoveryengine.v1beta.Schema] associated to this // data store. string default_schema_id = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; @@ -131,6 +248,10 @@ message DataStore { google.protobuf.Timestamp create_time = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + // Optional. Configuration for advanced site search. + AdvancedSiteSearchConfig advanced_site_search_config = 12 + [(google.api.field_behavior) = OPTIONAL]; + // Language info for DataStore. LanguageInfo language_info = 14; @@ -139,10 +260,42 @@ message DataStore { natural_language_query_understanding_config = 34 [(google.api.field_behavior) = OPTIONAL]; + // Input only. The KMS key to be used to protect this DataStore at creation + // time. + // + // Must be set for requests that need to comply with CMEK Org Policy + // protections. + // + // If this field is set and processed successfully, the DataStore will be + // protected by the KMS key, as indicated in the cmek_config field. + string kms_key_name = 32 [(google.api.field_behavior) = INPUT_ONLY]; + + // Output only. CMEK-related information for the DataStore. + CmekConfig cmek_config = 18 [(google.api.field_behavior) = OUTPUT_ONLY]; + // Output only. Data size estimation for billing. BillingEstimation billing_estimation = 23 [(google.api.field_behavior) = OUTPUT_ONLY]; + // Immutable. Whether data in the + // [DataStore][google.cloud.discoveryengine.v1beta.DataStore] has ACL + // information. If set to `true`, the source data must have ACL. ACL will be + // ingested when data is ingested by + // [DocumentService.ImportDocuments][google.cloud.discoveryengine.v1beta.DocumentService.ImportDocuments] + // methods. + // + // When ACL is enabled for the + // [DataStore][google.cloud.discoveryengine.v1beta.DataStore], + // [Document][google.cloud.discoveryengine.v1beta.Document] can't be accessed + // by calling + // [DocumentService.GetDocument][google.cloud.discoveryengine.v1beta.DocumentService.GetDocument] + // or + // [DocumentService.ListDocuments][google.cloud.discoveryengine.v1beta.DocumentService.ListDocuments]. + // + // Currently ACL is only supported in `GENERIC` industry vertical with + // non-`PUBLIC_WEBSITE` content config. + bool acl_enabled = 24 [(google.api.field_behavior) = IMMUTABLE]; + // Config to store data store type configuration for workspace data. This // must be set when // [DataStore.content_config][google.cloud.discoveryengine.v1beta.DataStore.content_config] @@ -158,9 +311,12 @@ message DataStore { // provisioning it. If unset, a default vertical specialized schema will be // used. // - // This field is only used by [CreateDataStore][] API, and will be ignored if - // used in other APIs. This field will be omitted from all API responses - // including [CreateDataStore][] API. To retrieve a schema of a + // This field is only used by + // [CreateDataStore][google.cloud.discoveryengine.v1beta.DataStoreService.CreateDataStore] + // API, and will be ignored if used in other APIs. This field will be omitted + // from all API responses including + // [CreateDataStore][google.cloud.discoveryengine.v1beta.DataStoreService.CreateDataStore] + // API. To retrieve a schema of a // [DataStore][google.cloud.discoveryengine.v1beta.DataStore], use // [SchemaService.GetSchema][google.cloud.discoveryengine.v1beta.SchemaService.GetSchema] // API instead. @@ -170,9 +326,50 @@ message DataStore { // doc](https://cloud.google.com/generative-ai-app-builder/docs/provide-schema). Schema starting_schema = 28; + // Optional. Configuration for `HEALTHCARE_FHIR` vertical. + HealthcareFhirConfig healthcare_fhir_config = 29 + [(google.api.field_behavior) = OPTIONAL]; + // Optional. Stores serving config at DataStore level. ServingConfigDataStore serving_config_data_store = 30 [(google.api.field_behavior) = OPTIONAL]; + + // Immutable. The fully qualified resource name of the associated + // [IdentityMappingStore][google.cloud.discoveryengine.v1beta.IdentityMappingStore]. + // This field can only be set for acl_enabled DataStores with `THIRD_PARTY` or + // `GSUITE` IdP. Format: + // `projects/{project}/locations/{location}/identityMappingStores/{identity_mapping_store}`. + string identity_mapping_store = 31 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "discoveryengine.googleapis.com/IdentityMappingStore" + } + ]; + + // Optional. If set, this DataStore is an Infobot FAQ DataStore. + bool is_infobot_faq_data_store = 37 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If set, this DataStore is a federated search DataStore. + FederatedSearchConfig federated_search_config = 38 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Configuration for configurable billing approach. See + ConfigurableBillingApproach configurable_billing_approach = 45 + [(google.api.field_behavior) = OPTIONAL]; + + // Output only. The timestamp when configurable_billing_approach was last + // updated. + google.protobuf.Timestamp configurable_billing_approach_update_time = 46 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Configuration data for advance site search. +message AdvancedSiteSearchConfig { + // If set true, initial indexing is disabled for the DataStore. + optional bool disable_initial_index = 3; + + // If set true, automatic refresh is disabled for the DataStore. + optional bool disable_automatic_refresh = 4; } // Language info for DataStore. @@ -246,13 +443,18 @@ message WorkspaceConfig { // Workspace Data Store contains Keep data GOOGLE_KEEP = 7; + + // Workspace Data Store contains People data + GOOGLE_PEOPLE = 8; } // The Google Workspace data source. Type type = 1; - // Obfuscated Dasher customer ID. - string dasher_customer_id = 2; + // Output only. Obfuscated Dasher customer ID. Derived by the server from + // the project's GCP organization at data store creation time; any value + // supplied in the request payload is ignored. + string dasher_customer_id = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; // Optional. The super admin service account for the workspace that will be // used for access token generation. For now we only use it for Native Google diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/data_store_service.proto b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/data_store_service.proto index 6412b284866f..6279db1e9f17 100644 --- a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/data_store_service.proto +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/data_store_service.proto @@ -1,4 +1,4 @@ -// Copyright 2025 Google LLC +// 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. @@ -40,7 +40,9 @@ option ruby_package = "Google::Cloud::DiscoveryEngine::V1beta"; service DataStoreService { option (google.api.default_host) = "discoveryengine.googleapis.com"; option (google.api.oauth_scopes) = - "https://www.googleapis.com/auth/cloud-platform"; + "https://www.googleapis.com/auth/cloud-platform," + "https://www.googleapis.com/auth/discoveryengine.readwrite," + "https://www.googleapis.com/auth/discoveryengine.serving.readwrite"; // Creates a [DataStore][google.cloud.discoveryengine.v1beta.DataStore]. // @@ -123,6 +125,20 @@ service DataStoreService { // [DataStoreService.CreateDataStore][google.cloud.discoveryengine.v1beta.DataStoreService.CreateDataStore] // method. message CreateDataStoreRequest { + // CMEK options for the DataStore. Setting this field will override the + // default CmekConfig if one is set for the project. + oneof cmek_options { + // Resource name of the CmekConfig to use for protecting this DataStore. + string cmek_config_name = 5 [(google.api.resource_reference) = { + type: "discoveryengine.googleapis.com/CmekConfig" + }]; + + // DataStore without CMEK protections. If a default CmekConfig is set for + // the project, setting this field will override the default CmekConfig as + // well. + bool disable_cmek = 6; + } + // Required. The parent resource name, such as // `projects/{project}/locations/{location}/collections/{collection}`. string parent = 1 [ diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/document.proto b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/document.proto index 5a20ae76c243..6dc969f5eefb 100644 --- a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/document.proto +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/document.proto @@ -1,4 +1,4 @@ -// Copyright 2025 Google LLC +// 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. @@ -18,6 +18,7 @@ package google.cloud.discoveryengine.v1beta; import "google/api/field_behavior.proto"; import "google/api/resource.proto"; +import "google/cloud/discoveryengine/v1beta/common.proto"; import "google/protobuf/struct.proto"; import "google/protobuf/timestamp.proto"; import "google/rpc/status.proto"; @@ -42,6 +43,7 @@ message Document { // Unstructured data linked to this document. message Content { + // The content of the unstructured document. oneof content { // The content represented as a stream of bytes. The maximum length is // 1,000,000 bytes (1 MB / ~0.95 MiB). @@ -63,23 +65,116 @@ message Document { // // * `application/pdf` (PDF, only native PDFs are supported for now) // * `text/html` (HTML) + // * `text/plain` (TXT) + // * `application/xml` or `text/xml` (XML) + // * `application/json` (JSON) // * `application/vnd.openxmlformats-officedocument.wordprocessingml.document` (DOCX) // * `application/vnd.openxmlformats-officedocument.presentationml.presentation` (PPTX) - // * `text/plain` (TXT) + // * `application/vnd.openxmlformats-officedocument.spreadsheetml.sheet` + // (XLSX) + // * `application/vnd.ms-excel.sheet.macroenabled.12` (XLSM) + // + // The following types are supported only if layout parser is enabled in the + // data store: + // + // * `image/bmp` (BMP) + // * `image/gif` (GIF) + // * `image/jpeg` (JPEG) + // * `image/png` (PNG) + // * `image/tiff` (TIFF) // // See https://www.iana.org/assignments/media-types/media-types.xhtml. string mime_type = 1; } + // ACL Information of the Document. + message AclInfo { + // AclRestriction to model complex inheritance restrictions. + // + // Example: Modeling a "Both Permit" inheritance, where to access a + // child document, user needs to have access to parent document. + // + // Document Hierarchy - Space_S --> Page_P. + // + // Readers: + // Space_S: group_1, user_1 + // Page_P: group_2, group_3, user_2 + // + // Space_S ACL Restriction - + // { + // "acl_info": { + // "readers": [ + // { + // "principals": [ + // { + // "group_id": "group_1" + // }, + // { + // "user_id": "user_1" + // } + // ] + // } + // ] + // } + // } + // + // Page_P ACL Restriction. + // { + // "acl_info": { + // "readers": [ + // { + // "principals": [ + // { + // "group_id": "group_2" + // }, + // { + // "group_id": "group_3" + // }, + // { + // "user_id": "user_2" + // } + // ], + // }, + // { + // "principals": [ + // { + // "group_id": "group_1" + // }, + // { + // "user_id": "user_1" + // } + // ], + // } + // ] + // } + // } + message AccessRestriction { + // List of principals. + repeated Principal principals = 1; + + // All users within the Identity Provider. + bool idp_wide = 2; + } + + // Readers of the document. + repeated AccessRestriction readers = 1; + } + // Index status of the document. message IndexStatus { // The time when the document was indexed. // If this field is populated, it means the document has been indexed. + // While documents typically become searchable within seconds of indexing, + // it can sometimes take up to a few hours. google.protobuf.Timestamp index_time = 1; // A sample of errors encountered while indexing the document. // If this field is populated, the document is not indexed due to errors. repeated google.rpc.Status error_samples = 2; + + // Immutable. The message indicates the document index is in progress. + // If this field is populated, the document index is pending. + string pending_message = 3 [(google.api.field_behavior) = IMMUTABLE]; } // Data representation. One of @@ -109,15 +204,14 @@ message Document { // Immutable. The identifier of the document. // // Id should conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) - // standard with a length limit of 63 characters. + // standard with a length limit of 128 characters. string id = 2 [(google.api.field_behavior) = IMMUTABLE]; // The identifier of the schema located in the same data store. string schema_id = 3; - // The unstructured data linked to this document. Content must be set if this - // document is under a - // `CONTENT_REQUIRED` data store. + // The unstructured data linked to this document. Content can only be set + // and must be set if this document is under a `CONTENT_REQUIRED` data store. Content content = 10; // The identifier of the parent document. Currently supports at most two level @@ -132,11 +226,17 @@ message Document { google.protobuf.Struct derived_struct_data = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Output only. The last time the document was indexed. If this field is set, - // the document could be returned in search results. + // Access control information for the document. + AclInfo acl_info = 11; + + // Output only. The time when the document was last indexed. + // + // If this field is populated, it means the document has been indexed. + // While documents typically become searchable within seconds of indexing, + // it can sometimes take up to a few hours. // - // This field is OUTPUT_ONLY. If this field is not populated, it means the - // document has never been indexed. + // If this field is not populated, it means the document has never been + // indexed. google.protobuf.Timestamp index_time = 13 [(google.api.field_behavior) = OUTPUT_ONLY]; @@ -145,6 +245,7 @@ message Document { // * If document is indexed successfully, the index_time field is populated. // * Otherwise, if document is not indexed due to errors, the error_samples // field is populated. - // * Otherwise, index_status is unset. + // * Otherwise, if document's index is in progress, the pending_message field + // is populated. IndexStatus index_status = 15 [(google.api.field_behavior) = OUTPUT_ONLY]; } diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/document_processing_config.proto b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/document_processing_config.proto index fb8dbbfd191d..539f7e9e30e9 100644 --- a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/document_processing_config.proto +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/document_processing_config.proto @@ -1,4 +1,4 @@ -// Copyright 2025 Google LLC +// 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. @@ -82,7 +82,43 @@ message DocumentProcessingConfig { } // The layout parsing configurations for documents. - message LayoutParsingConfig {} + message LayoutParsingConfig { + // Optional. If true, the LLM based annotation is added to the table + // during parsing. + bool enable_table_annotation = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If true, the LLM based annotation is added to the image + // during parsing. + bool enable_image_annotation = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If true, the pdf layout will be refined using an LLM. + bool enable_llm_layout_parsing = 5 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Contains the required structure types to extract from the + // document. Supported values: + // + // * `shareholder-structure` + repeated string structured_content_types = 9 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. List of HTML elements to exclude from the parsed content. + repeated string exclude_html_elements = 10 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. List of HTML classes to exclude from the parsed content. + repeated string exclude_html_classes = 11 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. List of HTML ids to exclude from the parsed content. + repeated string exclude_html_ids = 12 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If true, the processed document will be made available for + // the GetProcessedDocument API. + bool enable_get_processed_document = 14 + [(google.api.field_behavior) = OPTIONAL]; + } // Configs for document processing types. oneof type_dedicated_config { diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/document_service.proto b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/document_service.proto index 989341f72842..9d621d5e112a 100644 --- a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/document_service.proto +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/document_service.proto @@ -1,4 +1,4 @@ -// Copyright 2025 Google LLC +// 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. @@ -43,7 +43,9 @@ option ruby_package = "Google::Cloud::DiscoveryEngine::V1beta"; service DocumentService { option (google.api.default_host) = "discoveryengine.googleapis.com"; option (google.api.oauth_scopes) = - "https://www.googleapis.com/auth/cloud-platform"; + "https://www.googleapis.com/auth/cloud-platform," + "https://www.googleapis.com/auth/discoveryengine.readwrite," + "https://www.googleapis.com/auth/discoveryengine.serving.readwrite"; // Gets a [Document][google.cloud.discoveryengine.v1beta.Document]. rpc GetDocument(GetDocumentRequest) returns (Document) { @@ -283,7 +285,7 @@ message CreateDocumentRequest { // Otherwise, an `ALREADY_EXISTS` error is returned. // // This field must conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) - // standard with a length limit of 63 characters. Otherwise, an + // standard with a length limit of 128 characters. Otherwise, an // `INVALID_ARGUMENT` error is returned. string document_id = 3 [(google.api.field_behavior) = REQUIRED]; } diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/engine.proto b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/engine.proto index 7342ee853a4e..226498437332 100644 --- a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/engine.proto +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/engine.proto @@ -1,4 +1,4 @@ -// Copyright 2025 Google LLC +// 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. @@ -18,7 +18,10 @@ package google.cloud.discoveryengine.v1beta; import "google/api/field_behavior.proto"; import "google/api/resource.proto"; +import "google/cloud/discoveryengine/v1beta/agent_gateway_setting.proto"; +import "google/cloud/discoveryengine/v1beta/cmek_config_service.proto"; import "google/cloud/discoveryengine/v1beta/common.proto"; +import "google/cloud/discoveryengine/v1beta/logging.proto"; import "google/protobuf/timestamp.proto"; option csharp_namespace = "Google.Cloud.DiscoveryEngine.V1Beta"; @@ -50,10 +53,130 @@ message Engine { // if not specified. SearchTier search_tier = 1; + // Optional. The required subscription tier of this engine. + // + // They cannot be modified after engine creation. If the required + // subscription tier is search, user with higher license tier like assist + // can still access the standalone app associated with this engine. + SubscriptionTier required_subscription_tier = 3 + [(google.api.field_behavior) = OPTIONAL]; + // The add-on that this search engine enables. repeated SearchAddOn search_add_ons = 2; } + // Additional config specs for a Media Recommendation engine. + message MediaRecommendationEngineConfig { + // Custom threshold for `cvr` optimization_objective. + message OptimizationObjectiveConfig { + // Required. The name of the field to target. Currently supported + // values: `watch-percentage`, `watch-time`. + string target_field = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The threshold to be applied to the target (e.g., 0.5). + float target_field_value_float = 2 + [(google.api.field_behavior) = REQUIRED]; + } + + // More feature configs of the selected engine type. + message EngineFeaturesConfig { + // Feature related configurations applied to a specific type of media + // recommendation engines. + oneof type_dedicated_config { + // Recommended for you engine feature config. + RecommendedForYouFeatureConfig recommended_for_you_config = 1; + + // Most popular engine feature config. + MostPopularFeatureConfig most_popular_config = 2; + } + } + + // Additional feature configurations for creating a `recommended-for-you` + // engine. + message RecommendedForYouFeatureConfig { + // The type of event with which the engine is queried at prediction time. + // If set to `generic`, only `view-item`, `media-play`,and + // `media-complete` will be used as `context-event` in engine training. If + // set to `view-home-page`, `view-home-page` will also be used as + // `context-events` in addition to `view-item`, `media-play`, and + // `media-complete`. Currently supported for the `recommended-for-you` + // engine. Currently supported values: `view-home-page`, `generic`. + string context_event_type = 1; + } + + // Feature configurations that are required for creating a Most Popular + // engine. + message MostPopularFeatureConfig { + // The time window of which the engine is queried at training and + // prediction time. Positive integers only. The value translates to the + // last X days of events. Currently required for the `most-popular-items` + // engine. + int64 time_window_days = 1; + } + + // The training state of the engine. + enum TrainingState { + // Unspecified training state. + TRAINING_STATE_UNSPECIFIED = 0; + + // The engine training is paused. + PAUSED = 1; + + // The engine is training. + TRAINING = 2; + } + + // Required. The type of engine. e.g., `recommended-for-you`. + // + // This field together with + // [optimization_objective][google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig.optimization_objective] + // describe engine metadata to use to control engine training and serving. + // + // Currently supported values: `recommended-for-you`, `others-you-may-like`, + // `more-like-this`, `most-popular-items`. + string type = 1 [(google.api.field_behavior) = REQUIRED]; + + // The optimization objective. e.g., `cvr`. + // + // This field together with + // [optimization_objective][google.cloud.discoveryengine.v1beta.Engine.MediaRecommendationEngineConfig.type] + // describe engine metadata to use to control engine training and serving. + // + // Currently supported + // values: `ctr`, `cvr`. + // + // If not specified, we choose default based on engine type. + // Default depends on type of recommendation: + // + // `recommended-for-you` => `ctr` + // + // `others-you-may-like` => `ctr` + string optimization_objective = 2; + + // Name and value of the custom threshold for cvr optimization_objective. + // For target_field `watch-time`, target_field_value must be an integer + // value indicating the media progress time in seconds between (0, 86400] + // (excludes 0, includes 86400) (e.g., 90). + // For target_field `watch-percentage`, the target_field_value must be a + // valid float value between (0, 1.0] (excludes 0, includes 1.0) (e.g., + // 0.5). + OptimizationObjectiveConfig optimization_objective_config = 3; + + // The training state that the engine is in (e.g. + // `TRAINING` or `PAUSED`). + // + // Since part of the cost of running the service + // is frequency of training - this can be used to determine when to train + // engine in order to control cost. If not specified: the default value for + // `CreateEngine` method is `TRAINING`. The default value for + // `UpdateEngine` method is to keep the state the same as before. + TrainingState training_state = 4; + + // Optional. Additional engine features config. + EngineFeaturesConfig engine_features_config = 5 + [(google.api.field_behavior) = OPTIONAL]; + } + // Configurations for a Chat Engine. message ChatEngineConfig { // Configurations for generating a Dialogflow agent. @@ -114,6 +237,20 @@ message Engine { // [ChatEngineMetadata.dialogflow_agent][google.cloud.discoveryengine.v1beta.Engine.ChatEngineMetadata.dialogflow_agent] // for actual agent association after Engine is created. string dialogflow_agent_to_link = 2; + + // Optional. If the flag set to true, we allow the agent and engine are in + // different locations, otherwise the agent and engine are required to be in + // the same location. The flag is set to false by default. + // + // Note that the `allow_cross_region` are one-time consumed by and + // passed to + // [EngineService.CreateEngine][google.cloud.discoveryengine.v1beta.EngineService.CreateEngine]. + // It means they cannot be retrieved using + // [EngineService.GetEngine][google.cloud.discoveryengine.v1beta.EngineService.GetEngine] + // or + // [EngineService.ListEngines][google.cloud.discoveryengine.v1beta.EngineService.ListEngines] + // API after engine creation. + bool allow_cross_region = 3 [(google.api.field_behavior) = OPTIONAL]; } // Common configurations for an Engine. @@ -123,6 +260,51 @@ message Engine { string company_name = 1; } + // Configuration message for the Knowledge Graph. + message KnowledgeGraphConfig { + // Feature config for the Knowledge Graph. + message FeatureConfig { + // Whether to disable the private KG query understanding for the engine. + // + // Defaults to false if not specified. + bool disable_private_kg_query_understanding = 1; + + // Whether to disable the private KG enrichment for the engine. + // + // Defaults to false if not specified. + bool disable_private_kg_enrichment = 2; + + // Whether to disable the private KG auto complete for the engine. + // + // Defaults to false if not specified. + bool disable_private_kg_auto_complete = 3; + + // Whether to disable the private KG for query UI chips. + // + // Defaults to false if not specified. + bool disable_private_kg_query_ui_chips = 4; + } + + // Whether to enable the Cloud Knowledge Graph for the engine. + // + // Defaults to false if not specified. + bool enable_cloud_knowledge_graph = 1; + + // Specify entity types to support. + repeated string cloud_knowledge_graph_types = 2; + + // Whether to enable the Private Knowledge Graph for the engine. + // + // Defaults to false if not specified. + bool enable_private_knowledge_graph = 3; + + // Specify entity types to support. + repeated string private_knowledge_graph_types = 4; + + // Optional. Feature config for the Knowledge Graph. + FeatureConfig feature_config = 5 [(google.api.field_behavior) = OPTIONAL]; + } + // Additional information of a Chat Engine. // Fields in this message are output only. message ChatEngineMetadata { @@ -134,6 +316,74 @@ message Engine { string dialogflow_agent = 1; } + // The app of the engine. + enum AppType { + // All non specified apps. + APP_TYPE_UNSPECIFIED = 0; + + // App type for intranet search and Agentspace. + APP_TYPE_INTRANET = 1; + } + + // The state of the feature for the engine. + enum FeatureState { + // The feature state is unspecified. + FEATURE_STATE_UNSPECIFIED = 0; + + // The feature is turned on to be accessible. + FEATURE_STATE_ON = 1; + + // The feature is turned off to be inaccessible. + FEATURE_STATE_OFF = 2; + } + + // Configuration for configurable billing approach. + enum ConfigurableBillingApproach { + // Default value. For Spark and non-Spark non-configurable billing approach. + // General pricing model. + CONFIGURABLE_BILLING_APPROACH_UNSPECIFIED = 0; + + // The billing approach follows configurations specified by customer. + CONFIGURABLE_BILLING_APPROACH_ENABLED = 1; + } + + // The status of the model for the engine. + enum ModelState { + // The model state is unspecified. + MODEL_STATE_UNSPECIFIED = 0; + + // The model is enabled by admin. + MODEL_ENABLED = 1; + + // The model is disabled by admin. + MODEL_DISABLED = 2; + } + + // Represents which marketplace agents are visible to any users in agent + // gallery. + enum MarketplaceAgentVisibility { + // Defaults to `MARKETPLACE_AGENT_VISIBILITY_UNSPECIFIED`. + MARKETPLACE_AGENT_VISIBILITY_UNSPECIFIED = 0; + + // Only agents that are currently available for use by the user are visible. + SHOW_AVAILABLE_AGENTS_ONLY = 1; + + // Show marketplace agents that the user does not yet have access to but + // are integrated into the engine. This level also includes all agents + // visible with `SHOW_AVAILABLE_AGENTS_ONLY`. + SHOW_AGENTS_ALREADY_INTEGRATED = 2; + + // Show all agents visible with `SHOW_AGENTS_ALREADY_INTEGRATED`, plus + // agents that have already been purchased by the project/organization, even + // if they are not currently integrated into the engine. + SHOW_AGENTS_ALREADY_PURCHASED = 3; + + // All agents in the marketplace are visible, regardless of access or + // purchase status. This level encompasses all agents shown in the previous + // levels. + SHOW_ALL_AGENTS = 4; + } + // Additional config specs that defines the behavior of the engine. oneof engine_config { // Configurations for the Chat Engine. Only applicable if @@ -147,6 +397,15 @@ message Engine { // is // [SOLUTION_TYPE_SEARCH][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_SEARCH]. SearchEngineConfig search_engine_config = 13; + + // Configurations for the Media Engine. Only applicable on the data + // stores with + // [solution_type][google.cloud.discoveryengine.v1beta.Engine.solution_type] + // [SOLUTION_TYPE_RECOMMENDATION][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_RECOMMENDATION] + // and + // [IndustryVertical.MEDIA][google.cloud.discoveryengine.v1beta.IndustryVertical.MEDIA] + // vertical. + MediaRecommendationEngineConfig media_recommendation_engine_config = 14; } // Engine metadata to monitor the status of the engine. @@ -160,7 +419,7 @@ message Engine { [(google.api.field_behavior) = OUTPUT_ONLY]; } - // Immutable. The fully qualified resource name of the engine. + // Immutable. Identifier. The fully qualified resource name of the engine. // // This field must be a UTF-8 encoded string with a length limit of 1024 // characters. @@ -169,7 +428,10 @@ message Engine { // `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}` // engine should be 1-63 characters, and valid characters are // /[a-z0-9][a-z0-9-_]*/. Otherwise, an INVALID_ARGUMENT error is returned. - string name = 1 [(google.api.field_behavior) = IMMUTABLE]; + string name = 1 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.field_behavior) = IDENTIFIER + ]; // Required. The display name of the engine. Should be human readable. UTF-8 // encoded string with limit of 1024 characters. @@ -183,7 +445,7 @@ message Engine { google.protobuf.Timestamp update_time = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The data stores associated with this engine. + // Optional. The data stores associated with this engine. // // For // [SOLUTION_TYPE_SEARCH][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_SEARCH] @@ -203,22 +465,112 @@ message Engine { // [CreateEngineRequest][google.cloud.discoveryengine.v1beta.CreateEngineRequest], // one DataStore id must be provided as the system will use it for necessary // initializations. - repeated string data_store_ids = 5; + repeated string data_store_ids = 5 [(google.api.field_behavior) = OPTIONAL]; // Required. The solutions of the engine. SolutionType solution_type = 6 [(google.api.field_behavior) = REQUIRED]; - // The industry vertical that the engine registers. + // Optional. The industry vertical that the engine registers. // The restriction of the Engine industry vertical is based on - // [DataStore][google.cloud.discoveryengine.v1beta.DataStore]: If unspecified, - // default to `GENERIC`. Vertical on Engine has to match vertical of the - // DataStore linked to the engine. - IndustryVertical industry_vertical = 16; + // [DataStore][google.cloud.discoveryengine.v1beta.DataStore]: Vertical on + // Engine has to match vertical of the DataStore linked to the engine. + IndustryVertical industry_vertical = 16 + [(google.api.field_behavior) = OPTIONAL]; // Common config spec that specifies the metadata of the engine. CommonConfig common_config = 15; + // Optional. Configurations for the Knowledge Graph. Only applicable if + // [solution_type][google.cloud.discoveryengine.v1beta.Engine.solution_type] + // is + // [SOLUTION_TYPE_SEARCH][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_SEARCH]. + KnowledgeGraphConfig knowledge_graph_config = 23 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Immutable. This the application type which this engine resource + // represents. NOTE: this is a new concept independ of existing industry + // vertical or solution type. + AppType app_type = 24 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.field_behavior) = IMMUTABLE + ]; + // Optional. Whether to disable analytics for searches performed on this // engine. bool disable_analytics = 26 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Feature config for the engine to opt in or opt out of features. + // Supported keys: + // + // * `*`: all features, if it's present, all other feature state settings are + // ignored. + // * `agent-gallery` + // * `no-code-agent-builder` + // * `prompt-gallery` + // * `model-selector` + // * `notebook-lm` + // * `people-search` + // * `people-search-org-chart` + // * `bi-directional-audio` + // * `feedback` + // * `session-sharing` + // * `personalization-memory` + // * `personalization-suggested-highlights` + // * `mobile-app-access` + // * `disable-agent-sharing` + // * `disable-image-generation` + // * `disable-video-generation` + // * `disable-onedrive-upload` + // * `disable-talk-to-content` + // * `disable-google-drive-upload` + // * `disable-welcome-emails` + // * `disable-canvas` + // * `disable-canvas-workspace` + // * `disable-skills` + // * `enable-end-user-sharing-with-groups` + // * `single-agent-orchestration` + // * `multi-agent-orchestration` + // * `cross-product-intelligence` + map features = 30 + [(google.api.field_behavior) = OPTIONAL]; + + // Output only. CMEK-related information for the Engine. + CmekConfig cmek_config = 32 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. Configuration for configurable billing approach. + ConfigurableBillingApproach configurable_billing_approach = 36 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Maps a model name to its specific configuration for this engine. + // This allows admin users to turn on/off individual models. This only stores + // models whose states are overridden by the admin. + // + // When the state is unspecified, or model_configs is empty for this + // model, the system will decide if this model should be available or not + // based on the default configuration. For example, a preview model + // should be disabled by default if the admin has not chosen to enable it. + map model_configs = 37 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Observability config for the engine. + ObservabilityConfig observability_config = 39 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Maps a connector ID (e.g., "hybrid-github", "shopify") to + // tenant-specific information required for that connector. The structure of + // the tenant information string is connector-dependent. + map connector_tenant_info = 42 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The agent gateway setting for the engine. + AgentGatewaySetting agent_gateway_setting = 43 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The visibility of marketplace agents in the agent gallery. + MarketplaceAgentVisibility marketplace_agent_visibility = 44 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The emails of the procurement contacts. + repeated string procurement_contact_emails = 45 + [(google.api.field_behavior) = OPTIONAL]; } diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/engine_service.proto b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/engine_service.proto index 45e5ed484b4a..ebcf79beb616 100644 --- a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/engine_service.proto +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/engine_service.proto @@ -1,4 +1,4 @@ -// Copyright 2025 Google LLC +// 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. @@ -21,6 +21,8 @@ import "google/api/client.proto"; import "google/api/field_behavior.proto"; import "google/api/resource.proto"; import "google/cloud/discoveryengine/v1beta/engine.proto"; +import "google/iam/v1/iam_policy.proto"; +import "google/iam/v1/policy.proto"; import "google/longrunning/operations.proto"; import "google/protobuf/empty.proto"; import "google/protobuf/field_mask.proto"; @@ -40,9 +42,11 @@ option ruby_package = "Google::Cloud::DiscoveryEngine::V1beta"; service EngineService { option (google.api.default_host) = "discoveryengine.googleapis.com"; option (google.api.oauth_scopes) = - "https://www.googleapis.com/auth/cloud-platform"; + "https://www.googleapis.com/auth/cloud-platform," + "https://www.googleapis.com/auth/discoveryengine.readwrite," + "https://www.googleapis.com/auth/discoveryengine.serving.readwrite"; - // Creates a [Engine][google.cloud.discoveryengine.v1beta.Engine]. + // Creates an [Engine][google.cloud.discoveryengine.v1beta.Engine]. rpc CreateEngine(CreateEngineRequest) returns (google.longrunning.Operation) { option (google.api.http) = { post: "/v1beta/{parent=projects/*/locations/*/collections/*}/engines" @@ -55,7 +59,7 @@ service EngineService { }; } - // Deletes a [Engine][google.cloud.discoveryengine.v1beta.Engine]. + // Deletes an [Engine][google.cloud.discoveryengine.v1beta.Engine]. rpc DeleteEngine(DeleteEngineRequest) returns (google.longrunning.Operation) { option (google.api.http) = { delete: "/v1beta/{name=projects/*/locations/*/collections/*/engines/*}" @@ -76,7 +80,7 @@ service EngineService { option (google.api.method_signature) = "engine,update_mask"; } - // Gets a [Engine][google.cloud.discoveryengine.v1beta.Engine]. + // Gets an [Engine][google.cloud.discoveryengine.v1beta.Engine]. rpc GetEngine(GetEngineRequest) returns (Engine) { option (google.api.http) = { get: "/v1beta/{name=projects/*/locations/*/collections/*/engines/*}" @@ -93,7 +97,8 @@ service EngineService { option (google.api.method_signature) = "parent"; } - // Pauses the training of an existing engine. Only applicable if + // Pauses the training of an existing + // [Engine][google.cloud.discoveryengine.v1beta.Engine]. Only applicable if // [SolutionType][google.cloud.discoveryengine.v1beta.SolutionType] is // [SOLUTION_TYPE_RECOMMENDATION][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_RECOMMENDATION]. rpc PauseEngine(PauseEngineRequest) returns (Engine) { @@ -104,7 +109,8 @@ service EngineService { option (google.api.method_signature) = "name"; } - // Resumes the training of an existing engine. Only applicable if + // Resumes the training of an existing + // [Engine][google.cloud.discoveryengine.v1beta.Engine]. Only applicable if // [SolutionType][google.cloud.discoveryengine.v1beta.SolutionType] is // [SOLUTION_TYPE_RECOMMENDATION][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_RECOMMENDATION]. rpc ResumeEngine(ResumeEngineRequest) returns (Engine) { @@ -115,7 +121,8 @@ service EngineService { option (google.api.method_signature) = "name"; } - // Tunes an existing engine. Only applicable if + // Tunes an existing [Engine][google.cloud.discoveryengine.v1beta.Engine]. + // Only applicable if // [SolutionType][google.cloud.discoveryengine.v1beta.SolutionType] is // [SOLUTION_TYPE_RECOMMENDATION][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_RECOMMENDATION]. rpc TuneEngine(TuneEngineRequest) returns (google.longrunning.Operation) { @@ -129,6 +136,40 @@ service EngineService { metadata_type: "TuneEngineMetadata" }; } + + // Gets the IAM access control policy for an + // [Engine][google.cloud.discoveryengine.v1beta.Engine]. A `NOT_FOUND` error + // is returned if the resource does not exist. An empty policy is returned if + // the resource exists but does not have a policy set on it. + rpc GetIamPolicy(google.iam.v1.GetIamPolicyRequest) + returns (google.iam.v1.Policy) { + option (google.api.http) = { + get: "/v1beta/{resource=projects/*/locations/*/collections/*/engines/*}:getIamPolicy" + }; + option (google.api.method_signature) = "resource"; + } + + // Sets the IAM access control policy for an + // [Engine][google.cloud.discoveryengine.v1beta.Engine]. A `NOT_FOUND` error + // is returned if the resource does not exist. + // + // **Important:** When setting a policy directly on an Engine resource, + // the only recommended roles in the bindings are: + // `roles/discoveryengine.admin`, + // `roles/discoveryengine.agentspaceAdmin`, + // `roles/discoveryengine.user`, + // `roles/discoveryengine.agentspaceUser`, + // `roles/discoveryengine.viewer`, + // `roles/discoveryengine.agentspaceViewer`. + // Attempting to grant any other role will result in a warning in logging. + rpc SetIamPolicy(google.iam.v1.SetIamPolicyRequest) + returns (google.iam.v1.Policy) { + option (google.api.http) = { + post: "/v1beta/{resource=projects/*/locations/*/collections/*/engines/*}:setIamPolicy" + body: "*" + }; + option (google.api.method_signature) = "resource,policy"; + } } // Request for diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/evaluation.proto b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/evaluation.proto index 67341c52e8fe..52270af4799c 100644 --- a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/evaluation.proto +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/evaluation.proto @@ -1,4 +1,4 @@ -// Copyright 2025 Google LLC +// 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. @@ -43,12 +43,12 @@ message Evaluation { message EvaluationSpec { // Describes the specification of the query set. message QuerySetSpec { - // Required. The full resource name of the + // Optional. The full resource name of the // [SampleQuerySet][google.cloud.discoveryengine.v1beta.SampleQuerySet] // used for the evaluation, in the format of // `projects/{project}/locations/{location}/sampleQuerySets/{sampleQuerySet}`. string sample_query_set = 1 [ - (google.api.field_behavior) = REQUIRED, + (google.api.field_behavior) = OPTIONAL, (google.api.resource_reference) = { type: "discoveryengine.googleapis.com/SampleQuerySet" } @@ -72,8 +72,8 @@ message Evaluation { SearchRequest search_request = 2 [(google.api.field_behavior) = REQUIRED]; } - // Required. The specification of the query set. - QuerySetSpec query_set_spec = 1 [(google.api.field_behavior) = REQUIRED]; + // Optional. The specification of the query set. + QuerySetSpec query_set_spec = 1 [(google.api.field_behavior) = OPTIONAL]; } // Describes the state of an evaluation. diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/evaluation_service.proto b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/evaluation_service.proto index 1aef90a0f775..63f43c2a2bfb 100644 --- a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/evaluation_service.proto +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/evaluation_service.proto @@ -1,4 +1,4 @@ -// Copyright 2025 Google LLC +// 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. @@ -38,7 +38,10 @@ option ruby_package = "Google::Cloud::DiscoveryEngine::V1beta"; service EvaluationService { option (google.api.default_host) = "discoveryengine.googleapis.com"; option (google.api.oauth_scopes) = - "https://www.googleapis.com/auth/cloud-platform"; + "https://www.googleapis.com/auth/cloud-platform," + "https://www.googleapis.com/auth/discoveryengine.assist.readwrite," + "https://www.googleapis.com/auth/discoveryengine.readwrite," + "https://www.googleapis.com/auth/discoveryengine.serving.readwrite"; // Gets a [Evaluation][google.cloud.discoveryengine.v1beta.Evaluation]. rpc GetEvaluation(GetEvaluationRequest) returns (Evaluation) { @@ -127,15 +130,15 @@ message ListEvaluationsRequest { } ]; - // Maximum number of + // Optional. Maximum number of // [Evaluation][google.cloud.discoveryengine.v1beta.Evaluation]s to return. If // unspecified, defaults to 100. The maximum allowed value is 1000. Values // above 1000 will be coerced to 1000. // // If this field is negative, an `INVALID_ARGUMENT` error is returned. - int32 page_size = 2; + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; - // A page token + // Optional. A page token // [ListEvaluationsResponse.next_page_token][google.cloud.discoveryengine.v1beta.ListEvaluationsResponse.next_page_token], // received from a previous // [EvaluationService.ListEvaluations][google.cloud.discoveryengine.v1beta.EvaluationService.ListEvaluations] @@ -145,7 +148,7 @@ message ListEvaluationsRequest { // [EvaluationService.ListEvaluations][google.cloud.discoveryengine.v1beta.EvaluationService.ListEvaluations] // must match the call that provided the page token. Otherwise, an // `INVALID_ARGUMENT` error is returned. - string page_token = 3; + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; } // Response message for @@ -192,9 +195,10 @@ message ListEvaluationResultsRequest { // Required. The evaluation resource name, such as // `projects/{project}/locations/{location}/evaluations/{evaluation}`. // - // If the caller does not have permission to list [EvaluationResult][] - // under this evaluation, regardless of whether or not this evaluation - // set exists, a `PERMISSION_DENIED` error is returned. + // If the caller does not have permission to list + // [ListEvaluationResultsResponse.EvaluationResult][google.cloud.discoveryengine.v1beta.ListEvaluationResultsResponse.EvaluationResult] + // under this evaluation, regardless of whether or not this evaluation set + // exists, a `PERMISSION_DENIED` error is returned. string evaluation = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -202,14 +206,15 @@ message ListEvaluationResultsRequest { } ]; - // Maximum number of [EvaluationResult][] to return. If unspecified, - // defaults to 100. The maximum allowed value is 1000. Values above 1000 will - // be coerced to 1000. + // Optional. Maximum number of + // [ListEvaluationResultsResponse.EvaluationResult][google.cloud.discoveryengine.v1beta.ListEvaluationResultsResponse.EvaluationResult] + // to return. If unspecified, defaults to 100. The maximum allowed value is + // 1000. Values above 1000 will be coerced to 1000. // // If this field is negative, an `INVALID_ARGUMENT` error is returned. - int32 page_size = 2; + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; - // A page token + // Optional. A page token // [ListEvaluationResultsResponse.next_page_token][google.cloud.discoveryengine.v1beta.ListEvaluationResultsResponse.next_page_token], // received from a previous // [EvaluationService.ListEvaluationResults][google.cloud.discoveryengine.v1beta.EvaluationService.ListEvaluationResults] @@ -219,7 +224,7 @@ message ListEvaluationResultsRequest { // [EvaluationService.ListEvaluationResults][google.cloud.discoveryengine.v1beta.EvaluationService.ListEvaluationResults] // must match the call that provided the page token. Otherwise, an // `INVALID_ARGUMENT` error is returned. - string page_token = 3; + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; } // Response message for @@ -240,8 +245,8 @@ message ListEvaluationResultsResponse { [(google.api.field_behavior) = OUTPUT_ONLY]; } - // The - // [EvaluationResult][google.cloud.discoveryengine.v1beta.ListEvaluationResultsResponse.EvaluationResult]s. + // The evaluation results for the + // [SampleQuery][google.cloud.discoveryengine.v1beta.SampleQuery]s. repeated EvaluationResult evaluation_results = 1; // A token that can be sent as diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/feedback.proto b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/feedback.proto new file mode 100644 index 000000000000..bea2400b8cbb --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/feedback.proto @@ -0,0 +1,144 @@ +// 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 +// +// http://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. + +syntax = "proto3"; + +package google.cloud.discoveryengine.v1beta; + +import "google/api/field_behavior.proto"; +import "google/cloud/discoveryengine/v1beta/session.proto"; + +option csharp_namespace = "Google.Cloud.DiscoveryEngine.V1Beta"; +option go_package = "cloud.google.com/go/discoveryengine/apiv1beta/discoveryenginepb;discoveryenginepb"; +option java_multiple_files = true; +option java_outer_classname = "FeedbackProto"; +option java_package = "com.google.cloud.discoveryengine.v1beta"; +option objc_class_prefix = "DISCOVERYENGINE"; +option php_namespace = "Google\\Cloud\\DiscoveryEngine\\V1beta"; +option ruby_package = "Google::Cloud::DiscoveryEngine::V1beta"; + +// Information about the user feedback. This information will be used for +// logging and metrics purpose. +message Feedback { + // The conversation information such as the question index and session name. + message ConversationInfo { + // The index of the user input within the conversation messages. + int32 question_index = 1; + + // Name of the newly generated or continued session. + string session = 2; + + // Required. The user's search query. + Query query = 3 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The token which could be used to fetch the assistant log. + string assist_token = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The token which could be used to fetch the answer log. + string answer_query_token = 5 [(google.api.field_behavior) = OPTIONAL]; + } + + // The type of the feedback user gives. + enum FeedbackType { + // Unspecified feedback type. + FEEDBACK_TYPE_UNSPECIFIED = 0; + + // The user gives a positive feedback. + LIKE = 1; + + // The user gives a negative feedback. + DISLIKE = 2; + } + + // The reason why user gives a negative feedback. + enum Reason { + // Unspecified reason. + REASON_UNSPECIFIED = 0; + + // The response is inaccurate. + INACCURATE_RESPONSE = 1; + + // The response is not relevant. + NOT_RELEVANT = 2; + + // The response is incomprehensive. + INCOMPREHENSIVE = 3; + + // The response is offensive or unsafe. + OFFENSIVE_OR_UNSAFE = 4; + + // The response is not well-formatted. + FORMAT_AND_STYLES = 6; + + // The response is not well-associated with the query. + BAD_CITATION = 7; + + // The expected canvas was not generated for the response. + CANVAS_NOT_GENERATED = 8; + + // The generated canvas is of bad quality (e.g. inaccurate, incomplete, + // poorly formatted). + CANVAS_QUALITY_BAD = 9; + + // Exporting the generated canvas failed (e.g. download or external + // export action did not complete successfully). + CANVAS_EXPORT_FAILED = 10; + } + + // Source of the feedback as per integration. + enum FeedbackSource { + // Unspecified feedback source. + FEEDBACK_SOURCE_UNSPECIFIED = 0; + + // Feedback source is Google Console. + GOOGLE_CONSOLE = 1; + + // Feedback source is Google Widget. + GOOGLE_WIDGET = 2; + + // Feedback source is Google Webapp. + GOOGLE_WEBAPP = 3; + + // Feedback source is Google AgentSpace Mobile app. + GOOGLE_AGENTSPACE_MOBILE = 4; + } + + // Required. Indicate whether the user gives a positive or negative feedback. + // If the user gives a negative feedback, there might be more feedback + // details. + FeedbackType feedback_type = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The reason if user gives a thumb down. + repeated Reason reasons = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The additional user comment of the feedback if user gives a thumb + // down. + string comment = 3 [(google.api.field_behavior) = OPTIONAL]; + + // The related conversation information when user gives feedback. + ConversationInfo conversation_info = 4; + + // The version of the LLM model that was used to generate the response. + string llm_model_version = 5; + + // Optional. The UI component the user feedback comes from, which could be + // GOOGLE_CONSOLE, GOOGLE_WIDGET, GOOGLE_WEBAPP. + FeedbackSource feedback_source = 6 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The version of the component that this report is being sent from. + string component_version = 7 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Whether the customer accepted data use terms. + bool data_terms_accepted = 8 [(google.api.field_behavior) = OPTIONAL]; +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/grounded_generation_service.proto b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/grounded_generation_service.proto index a54f9111d8b6..7726c28e8e73 100644 --- a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/grounded_generation_service.proto +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/grounded_generation_service.proto @@ -1,4 +1,4 @@ -// Copyright 2025 Google LLC +// 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. @@ -21,6 +21,7 @@ import "google/api/client.proto"; import "google/api/field_behavior.proto"; import "google/api/resource.proto"; import "google/cloud/discoveryengine/v1beta/grounding.proto"; +import "google/type/date.proto"; option csharp_namespace = "Google.Cloud.DiscoveryEngine.V1Beta"; option go_package = "cloud.google.com/go/discoveryengine/apiv1beta/discoveryenginepb;discoveryenginepb"; @@ -35,7 +36,9 @@ option ruby_package = "Google::Cloud::DiscoveryEngine::V1beta"; service GroundedGenerationService { option (google.api.default_host) = "discoveryengine.googleapis.com"; option (google.api.oauth_scopes) = - "https://www.googleapis.com/auth/cloud-platform"; + "https://www.googleapis.com/auth/cloud-platform," + "https://www.googleapis.com/auth/discoveryengine.readwrite," + "https://www.googleapis.com/auth/discoveryengine.serving.readwrite"; // Generates grounded content in a streaming fashion. rpc StreamGenerateGroundedContent(stream GenerateGroundedContentRequest) @@ -90,6 +93,21 @@ message GroundedGenerationContent { message GenerateGroundedContentRequest { // Content generation specification. message GenerationSpec { + // Setting for provisioned throughput. + enum ProvisionedThroughputSetting { + // Default value. If the user has remaining provisioned throughput, + // provisioned throughput will be used. Otherwise, pay as you go will be + // used. + PROVISIONED_THROUGHPUT_SETTING_UNSPECIFIED = 0; + + // Only use provisioned throughput. If the user has no remaining + // provisioned throughput, an error will be returned. + PROVISIONED_THROUGHPUT_ONLY = 1; + + // Disables provisioned throughput. + PAY_AS_YOU_GO_ONLY = 2; + } + // Specifies which Vertex model id to use for generation. string model_id = 3; @@ -109,11 +127,18 @@ message GenerateGroundedContentRequest { // If specified, custom value for frequency penalty will be used. optional float frequency_penalty = 8; + // If specified, custom value for the seed will be used. + optional int32 seed = 12; + // If specified, custom value for presence penalty will be used. optional float presence_penalty = 9; // If specified, custom value for max output tokens will be used. optional int32 max_output_tokens = 10; + + // Optional. Setting for provisioned throughput. + ProvisionedThroughputSetting provisioned_throughput_setting = 13 + [(google.api.field_behavior) = OPTIONAL]; } // Describes the options to customize dynamic retrieval. @@ -186,6 +211,27 @@ message GenerateGroundedContentRequest { // source. DynamicRetrievalConfiguration dynamic_retrieval_config = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. List of domains to be excluded from the search results. + repeated string exclude_domains = 5 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Sites with confidence level chosen & above this value will be + // blocked from the search results. + Citation.PhishBlockThreshold blocking_confidence = 6 + [(google.api.field_behavior) = OPTIONAL]; + } + + // Params for using enterprise web retrieval as grounding source. + message EnterpriseWebRetrievalSource { + // Optional. List of domains to be excluded from the search results. + repeated string exclude_domains = 1 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Sites with confidence level chosen & above this value will be + // blocked from the search results. + Citation.PhishBlockThreshold blocking_confidence = 2 + [(google.api.field_behavior) = OPTIONAL]; } // Sources. @@ -198,6 +244,9 @@ message GenerateGroundedContentRequest { // If set, grounding is performed with Google Search. GoogleSearchSource google_search_source = 3; + + // If set, grounding is performed with enterprise web retrieval. + EnterpriseWebRetrievalSource enterprise_web_retrieval_source = 8; } } @@ -346,6 +395,48 @@ message GenerateGroundedContentResponse { optional float support_score = 2; } + // Metadata about an image from the web search. + message ImageMetadata { + // Metadata about the website that the image is from. + message WebsiteInfo { + // The url of the website. + string uri = 1; + + // The title of the website. + string title = 2; + + // The display name of the website. + string site_display_name = 3; + } + + // Metadata about the image. + message Image { + // The url of the image. + string uri = 1; + + // The width of the image in pixels. + int32 width = 2; + + // The height of the image in pixels. + int32 height = 3; + } + + // Metadata about the full size image. + Image image = 1; + + // Metadata about the thumbnail. + Image thumbnail = 2; + + // The details about the website that the image is from. + WebsiteInfo source = 3; + } + + // Metadata about a video from the web search. + message VideoMetadata { + // The external id of the video. + string youtube_external_id = 1; + } + // Retrieval metadata to provide an understanding in the // retrieval steps performed by the model. There can be multiple such // messages which can correspond to different parts of the retrieval. This @@ -366,6 +457,12 @@ message GenerateGroundedContentResponse { // An support to a fact indicates that the claim is supported by // the fact. repeated GroundingSupport grounding_support = 2; + + // Images from the web search. + repeated ImageMetadata images = 9; + + // Videos from the web search. + repeated VideoMetadata videos = 11; } // Index of the candidate. @@ -393,6 +490,9 @@ message CheckGroundingSpec { // threshold may lead to more but somewhat weaker citations. If unset, the // threshold will default to 0.6. optional double citation_threshold = 1; + + // The control flag that enables claim-level grounding score in the response. + optional bool enable_claim_level_score = 4; } // Request message for @@ -451,11 +551,21 @@ message CheckGroundingResponse { // Text and citation info for a claim in the answer candidate. message Claim { // Position indicating the start of the claim in the answer candidate, - // measured in bytes. + // measured in bytes. Note that this is not measured in characters and, + // therefore, must be rendered in the user interface keeping in mind that + // some characters may take more than one byte. For example, + // if the claim text contains non-ASCII characters, the start and end + // positions vary when measured in characters + // (programming-language-dependent) and when measured in bytes + // (programming-language-independent). optional int32 start_pos = 1; // Position indicating the end of the claim in the answer candidate, - // exclusive. + // exclusive, in bytes. Note that this is not measured in characters and, + // therefore, must be rendered as such. For example, if the claim text + // contains non-ASCII characters, the start and end positions vary when + // measured in characters (programming-language-dependent) and when measured + // in bytes (programming-language-independent). optional int32 end_pos = 2; // Text for the claim in the answer candidate. Always provided regardless of @@ -473,12 +583,14 @@ message CheckGroundingResponse { // decided this claim doesn't require attribution/grounding check, this // field will be set to false. In that case, no grounding check was done for // the claim and therefore - // [citation_indices][google.cloud.discoveryengine.v1beta.CheckGroundingResponse.Claim.citation_indices], - // [anti_citation_indices][google.cloud.discoveryengine.v1beta.CheckGroundingResponse.Claim.anti_citation_indices], - // and - // [score][google.cloud.discoveryengine.v1beta.CheckGroundingResponse.Claim.score] + // [citation_indices][google.cloud.discoveryengine.v1beta.CheckGroundingResponse.Claim.citation_indices] // should not be returned. optional bool grounding_check_required = 6; + + // Confidence score for the claim in the answer candidate, in the range of + // [0, 1]. This is set only when + // `CheckGroundingRequest.grounding_spec.enable_claim_level_score` is true. + optional double score = 7; } // The support score for the input answer candidate. @@ -497,3 +609,58 @@ message CheckGroundingResponse { // Claim texts and citation info across all claims in the answer candidate. repeated Claim claims = 4; } + +// A collection of source attributions for a piece of content. +message CitationMetadata { + // Output only. List of citations. + repeated Citation citations = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Source attributions for content. +message Citation { + // These are available confidence level user can set to block malicious urls + // with chosen confidence and above. For understanding different confidence of + // webrisk, please refer to + // https://cloud.google.com/web-risk/docs/reference/rpc/google.cloud.webrisk.v1eap1#confidencelevel + enum PhishBlockThreshold { + // Defaults to unspecified. + PHISH_BLOCK_THRESHOLD_UNSPECIFIED = 0; + + // Blocks Low and above confidence URL that is risky. + BLOCK_LOW_AND_ABOVE = 30; + + // Blocks Medium and above confidence URL that is risky. + BLOCK_MEDIUM_AND_ABOVE = 40; + + // Blocks High and above confidence URL that is risky. + BLOCK_HIGH_AND_ABOVE = 50; + + // Blocks Higher and above confidence URL that is risky. + BLOCK_HIGHER_AND_ABOVE = 55; + + // Blocks Very high and above confidence URL that is risky. + BLOCK_VERY_HIGH_AND_ABOVE = 60; + + // Blocks Extremely high confidence URL that is risky. + BLOCK_ONLY_EXTREMELY_HIGH = 100; + } + + // Output only. Start index into the content. + int32 start_index = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. End index into the content. + int32 end_index = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Url reference of the attribution. + string uri = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Title of the attribution. + string title = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. License of the attribution. + string license = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Publication date of the attribution. + google.type.Date publication_date = 6 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/grounding.proto b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/grounding.proto index c0b4406b25ee..94e68aae5133 100644 --- a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/grounding.proto +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/grounding.proto @@ -1,4 +1,4 @@ -// Copyright 2025 Google LLC +// 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. @@ -67,4 +67,13 @@ message FactChunk { // More fine-grained information for the source reference. map source_metadata = 3; + + // The URI of the source. + string uri = 5; + + // The title of the source. + string title = 6; + + // The domain of the source. + string domain = 7; } diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/identity_mapping_store.proto b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/identity_mapping_store.proto new file mode 100644 index 000000000000..2d1a8162c6de --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/identity_mapping_store.proto @@ -0,0 +1,87 @@ +// 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 +// +// http://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. + +syntax = "proto3"; + +package google.cloud.discoveryengine.v1beta; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/discoveryengine/v1beta/cmek_config_service.proto"; + +option csharp_namespace = "Google.Cloud.DiscoveryEngine.V1Beta"; +option go_package = "cloud.google.com/go/discoveryengine/apiv1beta/discoveryenginepb;discoveryenginepb"; +option java_multiple_files = true; +option java_outer_classname = "IdentityMappingStoreProto"; +option java_package = "com.google.cloud.discoveryengine.v1beta"; +option objc_class_prefix = "DISCOVERYENGINE"; +option php_namespace = "Google\\Cloud\\DiscoveryEngine\\V1beta"; +option ruby_package = "Google::Cloud::DiscoveryEngine::V1beta"; + +// Identity Mapping Store which contains Identity Mapping Entries. +message IdentityMappingStore { + option (google.api.resource) = { + type: "discoveryengine.googleapis.com/IdentityMappingStore" + pattern: "projects/{project}/locations/{location}/identityMappingStores/{identity_mapping_store}" + }; + + // Immutable. The full resource name of the identity mapping store. + // Format: + // `projects/{project}/locations/{location}/identityMappingStores/{identity_mapping_store}`. + // This field must be a UTF-8 encoded string with a length limit of 1024 + // characters. + string name = 1 [(google.api.field_behavior) = IMMUTABLE]; + + // Input only. The KMS key to be used to protect this Identity Mapping Store + // at creation time. + // + // Must be set for requests that need to comply with CMEK Org Policy + // protections. + // + // If this field is set and processed successfully, the Identity Mapping Store + // will be protected by the KMS key, as indicated in the cmek_config field. + string kms_key_name = 3 [(google.api.field_behavior) = INPUT_ONLY]; + + // Output only. CMEK-related information for the Identity Mapping Store. + CmekConfig cmek_config = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Identity Mapping Entry that maps an external identity to an internal +// identity. +message IdentityMappingEntry { + // Union field identity_provider_id. Identity Provider id can be a user or a + // group. + oneof identity_provider_id { + // User identifier. + // For Google Workspace user account, user_id should be the google workspace + // user email. + // For non-google identity provider, user_id is the mapped user identifier + // configured during the workforcepool config. + string user_id = 2; + + // Group identifier. + // For Google Workspace user account, group_id should be the google + // workspace group email. + // For non-google identity provider, group_id is the mapped group identifier + // configured during the workforcepool config. + string group_id = 3; + } + + // Required. Identity outside the customer identity provider. + // The length limit of external identity will be of 100 characters. + string external_identity = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The name of the external identity. + string external_identity_name = 4 [(google.api.field_behavior) = OPTIONAL]; +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/identity_mapping_store_service.proto b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/identity_mapping_store_service.proto new file mode 100644 index 000000000000..fc468ce5aefa --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/identity_mapping_store_service.proto @@ -0,0 +1,378 @@ +// 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 +// +// http://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. + +syntax = "proto3"; + +package google.cloud.discoveryengine.v1beta; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/discoveryengine/v1beta/identity_mapping_store.proto"; +import "google/longrunning/operations.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/timestamp.proto"; +import "google/rpc/status.proto"; + +option csharp_namespace = "Google.Cloud.DiscoveryEngine.V1Beta"; +option go_package = "cloud.google.com/go/discoveryengine/apiv1beta/discoveryenginepb;discoveryenginepb"; +option java_multiple_files = true; +option java_outer_classname = "IdentityMappingStoreServiceProto"; +option java_package = "com.google.cloud.discoveryengine.v1beta"; +option objc_class_prefix = "DISCOVERYENGINE"; +option php_namespace = "Google\\Cloud\\DiscoveryEngine\\V1beta"; +option ruby_package = "Google::Cloud::DiscoveryEngine::V1beta"; + +// Service for managing Identity Mapping Stores. +service IdentityMappingStoreService { + option (google.api.default_host) = "discoveryengine.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform," + "https://www.googleapis.com/auth/discoveryengine.readwrite," + "https://www.googleapis.com/auth/discoveryengine.serving.readwrite"; + + // Creates a new Identity Mapping Store. + rpc CreateIdentityMappingStore(CreateIdentityMappingStoreRequest) + returns (IdentityMappingStore) { + option (google.api.http) = { + post: "/v1beta/{parent=projects/*/locations/*}/identityMappingStores" + body: "identity_mapping_store" + }; + option (google.api.method_signature) = + "parent,identity_mapping_store,identity_mapping_store_id"; + } + + // Gets the Identity Mapping Store. + rpc GetIdentityMappingStore(GetIdentityMappingStoreRequest) + returns (IdentityMappingStore) { + option (google.api.http) = { + get: "/v1beta/{name=projects/*/locations/*/identityMappingStores/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Deletes the Identity Mapping Store. + rpc DeleteIdentityMappingStore(DeleteIdentityMappingStoreRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1beta/{name=projects/*/locations/*/identityMappingStores/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "google.cloud.discoveryengine.v1beta.DeleteIdentityMappingStoreMetadata" + }; + } + + // Imports a list of Identity Mapping Entries to an Identity Mapping Store. + rpc ImportIdentityMappings(ImportIdentityMappingsRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1beta/{identity_mapping_store=projects/*/locations/*/identityMappingStores/*}:importIdentityMappings" + body: "*" + }; + option (google.longrunning.operation_info) = { + response_type: "google.cloud.discoveryengine.v1beta.ImportIdentityMappingsResponse" + metadata_type: "google.cloud.discoveryengine.v1beta.IdentityMappingEntryOperationMetadata" + }; + } + + // Purges specified or all Identity Mapping Entries from an Identity Mapping + // Store. + rpc PurgeIdentityMappings(PurgeIdentityMappingsRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1beta/{identity_mapping_store=projects/*/locations/*/identityMappingStores/*}:purgeIdentityMappings" + body: "*" + }; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "google.cloud.discoveryengine.v1beta.IdentityMappingEntryOperationMetadata" + }; + } + + // Lists Identity Mappings in an Identity Mapping Store. + rpc ListIdentityMappings(ListIdentityMappingsRequest) + returns (ListIdentityMappingsResponse) { + option (google.api.http) = { + get: "/v1beta/{identity_mapping_store=projects/*/locations/*/identityMappingStores/*}:listIdentityMappings" + }; + } + + // Lists all Identity Mapping Stores. + rpc ListIdentityMappingStores(ListIdentityMappingStoresRequest) + returns (ListIdentityMappingStoresResponse) { + option (google.api.http) = { + get: "/v1beta/{parent=projects/*/locations/*}/identityMappingStores" + }; + option (google.api.method_signature) = "parent"; + } +} + +// Request message for +// [IdentityMappingStoreService.CreateIdentityMappingStore][google.cloud.discoveryengine.v1beta.IdentityMappingStoreService.CreateIdentityMappingStore] +message CreateIdentityMappingStoreRequest { + // CMEK options for the Identity Mapping Store. Setting this field will + // override the default CmekConfig if one is set for the project. + oneof cmek_options { + // Resource name of the CmekConfig to use for protecting this Identity + // Mapping Store. + string cmek_config_name = 5 [(google.api.resource_reference) = { + type: "discoveryengine.googleapis.com/CmekConfig" + }]; + + // Identity Mapping Store without CMEK protections. If a default CmekConfig + // is set for the project, setting this field will override the default + // CmekConfig as well. + bool disable_cmek = 6; + } + + // Required. The parent collection resource name, such as + // `projects/{project}/locations/{location}`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "discoveryengine.googleapis.com/Location" + } + ]; + + // Required. The ID of the Identity Mapping Store to create. + // + // The ID must contain only letters (a-z, A-Z), numbers (0-9), underscores + // (_), and hyphens (-). The maximum length is 63 characters. + string identity_mapping_store_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The Identity Mapping Store to create. + IdentityMappingStore identity_mapping_store = 3 + [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for +// [IdentityMappingStoreService.GetIdentityMappingStore][google.cloud.discoveryengine.v1beta.IdentityMappingStoreService.GetIdentityMappingStore] +message GetIdentityMappingStoreRequest { + // Required. The name of the Identity Mapping Store to get. + // Format: + // `projects/{project}/locations/{location}/identityMappingStores/{identityMappingStore}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "discoveryengine.googleapis.com/IdentityMappingStore" + } + ]; +} + +// Request message for +// [IdentityMappingStoreService.DeleteIdentityMappingStore][google.cloud.discoveryengine.v1beta.IdentityMappingStoreService.DeleteIdentityMappingStore] +message DeleteIdentityMappingStoreRequest { + // Required. The name of the Identity Mapping Store to delete. + // Format: + // `projects/{project}/locations/{location}/identityMappingStores/{identityMappingStore}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "discoveryengine.googleapis.com/IdentityMappingStore" + } + ]; +} + +// Request message for +// [IdentityMappingStoreService.ImportIdentityMappings][google.cloud.discoveryengine.v1beta.IdentityMappingStoreService.ImportIdentityMappings] +message ImportIdentityMappingsRequest { + // The inline source to import identity mapping entries from. + message InlineSource { + // A maximum of 10000 entries can be imported at one time + repeated IdentityMappingEntry identity_mapping_entries = 1; + } + + // The source of the input. + oneof source { + // The inline source to import identity mapping entries from. + InlineSource inline_source = 2; + } + + // Required. The name of the Identity Mapping Store to import Identity Mapping + // Entries to. Format: + // `projects/{project}/locations/{location}/identityMappingStores/{identityMappingStore}` + string identity_mapping_store = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "discoveryengine.googleapis.com/IdentityMappingStore" + } + ]; +} + +// Response message for +// [IdentityMappingStoreService.ImportIdentityMappings][google.cloud.discoveryengine.v1beta.IdentityMappingStoreService.ImportIdentityMappings] +message ImportIdentityMappingsResponse { + // A sample of errors encountered while processing the request. + repeated google.rpc.Status error_samples = 1; +} + +// Request message for +// [IdentityMappingStoreService.PurgeIdentityMappings][google.cloud.discoveryengine.v1beta.IdentityMappingStoreService.PurgeIdentityMappings] +message PurgeIdentityMappingsRequest { + // The inline source to purge identity mapping entries from. + message InlineSource { + // A maximum of 10000 entries can be purged at one time + repeated IdentityMappingEntry identity_mapping_entries = 1; + } + + // The source of the input. + oneof source { + // The inline source to purge identity mapping entries from. + InlineSource inline_source = 2; + } + + // Required. The name of the Identity Mapping Store to purge Identity Mapping + // Entries from. Format: + // `projects/{project}/locations/{location}/identityMappingStores/{identityMappingStore}` + string identity_mapping_store = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "discoveryengine.googleapis.com/IdentityMappingStore" + } + ]; + + // Filter matching identity mappings to purge. + // The eligible field for filtering is: + // + // * `update_time`: in ISO 8601 "zulu" format. + // * `external_id` + // + // Examples: + // + // * Deleting all identity mappings updated in a time range: + // `update_time > "2012-04-23T18:25:43.511Z" AND update_time < + // "2012-04-23T18:30:43.511Z"` + // * Deleting all identity mappings for a given external_id: + // `external_id = "id1"` + // * Deleting all identity mappings inside an identity mapping store: + // `*` + // + // The filtering fields are assumed to have an implicit AND. + // Should not be used with source. An error will be thrown, if both are + // provided. + string filter = 3; + + // Actually performs the purge. If `force` is set to false, return the + // expected purge count without deleting any identity mappings. This field is + // only supported for purge with filter. For input source this field is + // ignored and data will be purged regardless of the value of this field. + optional bool force = 4; +} + +// Request message for +// [IdentityMappingStoreService.ListIdentityMappings][google.cloud.discoveryengine.v1beta.IdentityMappingStoreService.ListIdentityMappings] +message ListIdentityMappingsRequest { + // Required. The name of the Identity Mapping Store to list Identity Mapping + // Entries in. Format: + // `projects/{project}/locations/{location}/identityMappingStores/{identityMappingStore}` + string identity_mapping_store = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "discoveryengine.googleapis.com/IdentityMappingStore" + } + ]; + + // Maximum number of IdentityMappings to return. If unspecified, defaults + // to 2000. The maximum allowed value is 10000. Values above 10000 will be + // coerced to 10000. + int32 page_size = 2; + + // A page token, received from a previous `ListIdentityMappings` call. + // Provide this to retrieve the subsequent page. + // + // When paginating, all other parameters provided to + // `ListIdentityMappings` must match the call that provided the page + // token. + string page_token = 3; +} + +// Response message for +// [IdentityMappingStoreService.ListIdentityMappings][google.cloud.discoveryengine.v1beta.IdentityMappingStoreService.ListIdentityMappings] +message ListIdentityMappingsResponse { + // The Identity Mapping Entries. + repeated IdentityMappingEntry identity_mapping_entries = 1; + + // A token that can be sent as `page_token` to retrieve the next page. If this + // field is omitted, there are no subsequent pages. + string next_page_token = 2; +} + +// Request message for +// [IdentityMappingStoreService.ListIdentityMappingStores][google.cloud.discoveryengine.v1beta.IdentityMappingStoreService.ListIdentityMappingStores] +message ListIdentityMappingStoresRequest { + // Required. The parent of the Identity Mapping Stores to list. + // Format: + // `projects/{project}/locations/{location}`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "discoveryengine.googleapis.com/Location" + } + ]; + + // Maximum number of IdentityMappingStores to return. If unspecified, defaults + // to 100. The maximum allowed value is 1000. Values above 1000 will be + // coerced to 1000. + int32 page_size = 2; + + // A page token, received from a previous `ListIdentityMappingStores` call. + // Provide this to retrieve the subsequent page. + // + // When paginating, all other parameters provided to + // `ListIdentityMappingStores` must match the call that provided the page + // token. + string page_token = 3; +} + +// Response message for +// [IdentityMappingStoreService.ListIdentityMappingStores][google.cloud.discoveryengine.v1beta.IdentityMappingStoreService.ListIdentityMappingStores] +message ListIdentityMappingStoresResponse { + // The Identity Mapping Stores. + repeated IdentityMappingStore identity_mapping_stores = 1; + + // A token that can be sent as `page_token` to retrieve the next page. If this + // field is omitted, there are no subsequent pages. + string next_page_token = 2; +} + +// IdentityMappingEntry LongRunningOperation metadata for +// [IdentityMappingStoreService.ImportIdentityMappings][google.cloud.discoveryengine.v1beta.IdentityMappingStoreService.ImportIdentityMappings] +// and +// [IdentityMappingStoreService.PurgeIdentityMappings][google.cloud.discoveryengine.v1beta.IdentityMappingStoreService.PurgeIdentityMappings] +message IdentityMappingEntryOperationMetadata { + // The number of IdentityMappingEntries that were successfully processed. + int64 success_count = 1; + + // The number of IdentityMappingEntries that failed to be processed. + int64 failure_count = 2; + + // The total number of IdentityMappingEntries that were processed. + int64 total_count = 3; +} + +// Metadata related to the progress of the +// [IdentityMappingStoreService.DeleteIdentityMappingStore][google.cloud.discoveryengine.v1beta.IdentityMappingStoreService.DeleteIdentityMappingStore] +// operation. This will be returned by the google.longrunning.Operation.metadata +// field. +message DeleteIdentityMappingStoreMetadata { + // Operation create time. + google.protobuf.Timestamp create_time = 1; + + // Operation last update time. If the operation is done, this is also the + // finish time. + google.protobuf.Timestamp update_time = 2; +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/import_config.proto b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/import_config.proto index 271b22de0fc6..be3a52c7d187 100644 --- a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/import_config.proto +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/import_config.proto @@ -1,4 +1,4 @@ -// Copyright 2025 Google LLC +// 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. @@ -208,7 +208,7 @@ message BigtableOptions { // The type of values in a Bigtable column or column family. // The values are expected to be encoded using // [HBase - // Bytes.toBytes](https://hbase.apache.org/apidocs/org/apache/hadoop/hbase/util/Bytes.html) + // Bytes.toBytes](https://hbase.apache.org/1.4/apidocs/org/apache/hadoop/hbase/util/Bytes.html) // function when the encoding value is set to `BINARY`. enum Type { // The type is unspecified. @@ -298,6 +298,18 @@ message FhirStoreSource { // types](https://cloud.google.com/generative-ai-app-builder/docs/fhir-schema-reference#resource-level-specification). // Default to all supported FHIR resource types if empty. repeated string resource_types = 3; + + // Optional. Whether to update the DataStore schema to the latest predefined + // schema. + // + // If true, the DataStore schema will be updated to include any FHIR fields + // or resource types that have been added since the last import and + // corresponding FHIR resources will be imported from the FHIR store. + // + // Note this field cannot be used in conjunction with `resource_types`. It + // should be used after initial import. + bool update_from_latest_predefined_schema = 4 + [(google.api.field_behavior) = OPTIONAL]; } // Cloud SQL source import data from. @@ -460,9 +472,10 @@ message ImportUserEventsMetadata { // Operation create time. google.protobuf.Timestamp create_time = 1; - // Operation last update time. If the operation is done, this is also the - // finish time. - google.protobuf.Timestamp update_time = 2; + // Output only. Operation last update time. If the operation is done, this is + // also the finish time. + google.protobuf.Timestamp update_time = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Count of entries that were processed successfully. int64 success_count = 3; @@ -512,6 +525,9 @@ message ImportDocumentsRequest { // Calculates diff and replaces the entire document dataset. Existing // documents may be deleted if they are not present in the source location. + // When using this mode, there won't be any downtime on the dataset + // targeted. Any document that should remain unchanged or that should be + // updated will continue serving while the operation is running. FULL = 2; } @@ -626,9 +642,15 @@ message ImportDocumentsRequest { // must be `custom` or `csv`. Otherwise, an INVALID_ARGUMENT error is thrown. // * [SpannerSource][google.cloud.discoveryengine.v1beta.SpannerSource]. // * [CloudSqlSource][google.cloud.discoveryengine.v1beta.CloudSqlSource]. - // * [FirestoreSource][google.cloud.discoveryengine.v1beta.FirestoreSource]. // * [BigtableSource][google.cloud.discoveryengine.v1beta.BigtableSource]. string id_field = 9; + + // Optional. Whether to force refresh the unstructured content of the + // documents. + // + // If set to `true`, the content part of the documents will be refreshed + // regardless of the update status of the referencing content. + bool force_refresh_content = 16 [(google.api.field_behavior) = OPTIONAL]; } // Response of the diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/license_config.proto b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/license_config.proto new file mode 100644 index 000000000000..1cb193eefc54 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/license_config.proto @@ -0,0 +1,116 @@ +// 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 +// +// http://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. + +syntax = "proto3"; + +package google.cloud.discoveryengine.v1beta; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/discoveryengine/v1beta/common.proto"; +import "google/type/date.proto"; + +option csharp_namespace = "Google.Cloud.DiscoveryEngine.V1Beta"; +option go_package = "cloud.google.com/go/discoveryengine/apiv1beta/discoveryenginepb;discoveryenginepb"; +option java_multiple_files = true; +option java_outer_classname = "LicenseConfigProto"; +option java_package = "com.google.cloud.discoveryengine.v1beta"; +option objc_class_prefix = "DISCOVERYENGINE"; +option php_namespace = "Google\\Cloud\\DiscoveryEngine\\V1beta"; +option ruby_package = "Google::Cloud::DiscoveryEngine::V1beta"; + +// Information about users' licenses. +message LicenseConfig { + option (google.api.resource) = { + type: "discoveryengine.googleapis.com/LicenseConfig" + pattern: "projects/{project}/locations/{location}/licenseConfigs/{license_config}" + plural: "licenseConfigs" + singular: "licenseConfig" + }; + + // License config state enumeration. + enum State { + // Default value. The license config does not exist. + STATE_UNSPECIFIED = 0; + + // The license config is effective and being used. + ACTIVE = 1; + + // The license config has expired. + EXPIRED = 2; + + // The license config has not started yet, and its start date is in the + // future. + NOT_STARTED = 3; + + // This is when a sub license config has returned all its seats back to + // BillingAccountLicenseConfig that it belongs to. + // Similar to EXPIRED. + WITHDRAWN = 4; + + // The license config is terminated earlier than the expiration date and it + // is deactivating. The customer will still have access in this state. It + // will be converted to EXPIRED after the deactivating period ends (14 days) + // or when the end date is reached, whichever comes first. + DEACTIVATING = 5; + } + + // Immutable. Identifier. The fully qualified resource name of the license + // config. Format: + // `projects/{project}/locations/{location}/licenseConfigs/{license_config}` + string name = 1 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.field_behavior) = IDENTIFIER + ]; + + // Required. Number of licenses purchased. + int64 license_count = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. Subscription tier information for the license config. + SubscriptionTier subscription_tier = 3 + [(google.api.field_behavior) = REQUIRED]; + + // Output only. The state of the license config. + State state = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. Whether the license config should be auto renewed when it reaches + // the end date. + bool auto_renew = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Required. The start date. + google.type.Date start_date = 6 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The planed end date. + google.type.Date end_date = 7 [(google.api.field_behavior) = OPTIONAL]; + + // Required. Subscription term. + SubscriptionTerm subscription_term = 8 + [(google.api.field_behavior) = REQUIRED]; + + // Optional. Whether the license config is for free trial. + bool free_trial = 9 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. Whether the license config is for Gemini bundle. + bool gemini_bundle = 11 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Indication of whether the subscription is terminated earlier + // than the expiration date. This is usually terminated by pipeline once the + // subscription gets terminated from subsv3. + bool early_terminated = 12 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The date when the subscription is terminated earlier than the + // expiration date. + google.type.Date early_termination_date = 13 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/license_config_service.proto b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/license_config_service.proto new file mode 100644 index 000000000000..348a0e1b687e --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/license_config_service.proto @@ -0,0 +1,312 @@ +// 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 +// +// http://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. + +syntax = "proto3"; + +package google.cloud.discoveryengine.v1beta; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/discoveryengine/v1beta/license_config.proto"; +import "google/protobuf/field_mask.proto"; + +option csharp_namespace = "Google.Cloud.DiscoveryEngine.V1Beta"; +option go_package = "cloud.google.com/go/discoveryengine/apiv1beta/discoveryenginepb;discoveryenginepb"; +option java_multiple_files = true; +option java_outer_classname = "LicenseConfigServiceProto"; +option java_package = "com.google.cloud.discoveryengine.v1beta"; +option objc_class_prefix = "DISCOVERYENGINE"; +option php_namespace = "Google\\Cloud\\DiscoveryEngine\\V1beta"; +option ruby_package = "Google::Cloud::DiscoveryEngine::V1beta"; + +// Service for managing license config related resources. +service LicenseConfigService { + option (google.api.default_host) = "discoveryengine.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform," + "https://www.googleapis.com/auth/discoveryengine.readwrite," + "https://www.googleapis.com/auth/discoveryengine.serving.readwrite"; + + // Creates a + // [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig] This + // method should only be used for creating NotebookLm licenses or Gemini + // Enterprise free trial licenses. + rpc CreateLicenseConfig(CreateLicenseConfigRequest) returns (LicenseConfig) { + option (google.api.http) = { + post: "/v1beta/{parent=projects/*/locations/*}/licenseConfigs" + body: "license_config" + }; + option (google.api.method_signature) = + "parent,license_config,license_config_id"; + } + + // Updates the + // [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig] + rpc UpdateLicenseConfig(UpdateLicenseConfigRequest) returns (LicenseConfig) { + option (google.api.http) = { + patch: "/v1beta/{license_config.name=projects/*/locations/*/licenseConfigs/*}" + body: "license_config" + }; + option (google.api.method_signature) = "license_config,update_mask"; + } + + // Gets a [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig]. + rpc GetLicenseConfig(GetLicenseConfigRequest) returns (LicenseConfig) { + option (google.api.http) = { + get: "/v1beta/{name=projects/*/locations/*/licenseConfigs/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists all the + // [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig]s + // associated with the project. + rpc ListLicenseConfigs(ListLicenseConfigsRequest) + returns (ListLicenseConfigsResponse) { + option (google.api.http) = { + get: "/v1beta/{parent=projects/*/locations/*}/licenseConfigs" + }; + option (google.api.method_signature) = "parent"; + } + + // Distributes a + // [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig] from + // billing account level to project level. + rpc DistributeLicenseConfig(DistributeLicenseConfigRequest) + returns (DistributeLicenseConfigResponse) { + option (google.api.http) = { + post: "/v1beta/{billing_account_license_config=billingAccounts/*/billingAccountLicenseConfigs/*}:distributeLicenseConfig" + body: "*" + }; + option (google.api.method_signature) = + "billing_account_license_config,project_number,location,license_count,license_config_id"; + } + + // This method is called from the billing account side to retract the + // [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig] from the + // given project back to the billing account. + rpc RetractLicenseConfig(RetractLicenseConfigRequest) + returns (RetractLicenseConfigResponse) { + option (google.api.http) = { + post: "/v1beta/{billing_account_license_config=billingAccounts/*/billingAccountLicenseConfigs/*}:retractLicenseConfig" + body: "*" + }; + option (google.api.method_signature) = + "billing_account_license_config,license_config,full_retract,license_count"; + } +} + +// Request message for +// [LicenseConfigService.CreateLicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfigService.CreateLicenseConfig] +// method. +message CreateLicenseConfigRequest { + // Required. The parent resource name, such as + // `projects/{project}/locations/{location}`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "discoveryengine.googleapis.com/Location" + } + ]; + + // Required. The + // [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig] to + // create. + LicenseConfig license_config = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The ID to use for the + // [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig], which + // will become the final component of the + // [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig]'s + // resource name. We are using the tier (product edition) name as the license + // config id such as `search` or `search_and_assistant`. + string license_config_id = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// Request message for +// [LicenseConfigService.UpdateLicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfigService.UpdateLicenseConfig] +// method. +message UpdateLicenseConfigRequest { + // Required. The + // [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig] to + // update. + LicenseConfig license_config = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Indicates which fields in the provided + // [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig] to + // update. + // + // If an unsupported or unknown field is provided, an INVALID_ARGUMENT error + // is returned. + google.protobuf.FieldMask update_mask = 2 + [(google.api.field_behavior) = OPTIONAL]; +} + +// Request message for +// [LicenseConfigService.GetLicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfigService.GetLicenseConfig] +// method. +message GetLicenseConfigRequest { + // Required. Full resource name of + // [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig], such as + // `projects/{project}/locations/{location}/licenseConfigs/*`. + // + // If the caller does not have permission to access the + // [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig], + // regardless of whether or not it exists, a PERMISSION_DENIED error is + // returned. + // + // If the requested + // [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig] does not + // exist, a NOT_FOUND error is returned. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "discoveryengine.googleapis.com/LicenseConfig" + } + ]; +} + +// Request message for +// [LicenseConfigService.ListLicenseConfigs][google.cloud.discoveryengine.v1beta.LicenseConfigService.ListLicenseConfigs] +// method. +message ListLicenseConfigsRequest { + // Required. The parent branch resource name, such as + // `projects/{project}/locations/{location}`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "discoveryengine.googleapis.com/Location" + } + ]; + + // Optional. Not supported. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Not supported. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The filter to apply to the list results. + // + // The supported fields are: + // + // * `subscription_tier` + // * `state` + // + // Examples: + // + // * `subscription_tier=SUBSCRIPTION_TIER_SEARCH,state=ACTIVE` - Lists all + // active search license configs. + // * `state=ACTIVE` - Lists all active license configs. + // + // The filter string should be a comma-separated list of field=value pairs. + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response message for +// [LicenseConfigService.ListLicenseConfigs][google.cloud.discoveryengine.v1beta.LicenseConfigService.ListLicenseConfigs] +// method. +message ListLicenseConfigsResponse { + // All the customer's + // [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig]s. + repeated LicenseConfig license_configs = 1; + + // Not supported. + string next_page_token = 2; +} + +// Request message for +// [LicenseConfigService.DistributeLicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfigService.DistributeLicenseConfig] +// method. +message DistributeLicenseConfigRequest { + // Required. Full resource name of [BillingAccountLicenseConfig][]. + // + // Format: + // `billingAccounts/{billing_account}/billingAccountLicenseConfigs/{billing_account_license_config_id}`. + string billing_account_license_config = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "discoveryengine.googleapis.com/BillingAccountLicenseConfig" + } + ]; + + // Required. The target GCP project number to distribute the license config + // to. + int64 project_number = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The target GCP project region to distribute the license config + // to. + string location = 3 [(google.api.field_behavior) = REQUIRED]; + + // Required. The number of licenses to distribute. + int64 license_count = 4 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Distribute seats to this license config instead of creating a new + // one. If not specified, a new license config will be created from the + // billing account license config. + string license_config_id = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response message for +// [LicenseConfigService.DistributeLicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfigService.DistributeLicenseConfig] +// method. +message DistributeLicenseConfigResponse { + // The updated or created LicenseConfig. + LicenseConfig license_config = 1; +} + +// Request message for +// [LicenseConfigService.RetractLicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfigService.RetractLicenseConfig] +// method. +message RetractLicenseConfigRequest { + // Required. Full resource name of [BillingAccountLicenseConfig][]. + // + // Format: + // `billingAccounts/{billing_account}/billingAccountLicenseConfigs/{billing_account_license_config_id}`. + string billing_account_license_config = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "discoveryengine.googleapis.com/BillingAccountLicenseConfig" + } + ]; + + // Required. Full resource name of + // [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig]. + // + // Format: + // `projects/{project}/locations/{location}/licenseConfigs/{license_config_id}`. + string license_config = 2 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "discoveryengine.googleapis.com/LicenseConfig" + } + ]; + + // Optional. If set to true, retract the entire license config. Otherwise, + // retract the specified license count. + bool full_retract = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The number of licenses to retract. Only used when full_retract is + // false. + int64 license_count = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response message for +// [LicenseConfigService.RetractLicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfigService.RetractLicenseConfig] +// method. +message RetractLicenseConfigResponse { + // The updated LicenseConfig. + LicenseConfig license_config = 1; +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/logging.proto b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/logging.proto new file mode 100644 index 000000000000..3e709d0cd0d4 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/logging.proto @@ -0,0 +1,40 @@ +// 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 +// +// http://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. + +syntax = "proto3"; + +package google.cloud.discoveryengine.v1beta; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; + +option csharp_namespace = "Google.Cloud.DiscoveryEngine.V1Beta"; +option go_package = "cloud.google.com/go/discoveryengine/apiv1beta/discoveryenginepb;discoveryenginepb"; +option java_multiple_files = true; +option java_outer_classname = "LoggingProto"; +option java_package = "com.google.cloud.discoveryengine.v1beta"; +option objc_class_prefix = "DISCOVERYENGINE"; +option php_namespace = "Google\\Cloud\\DiscoveryEngine\\V1beta"; +option ruby_package = "Google::Cloud::DiscoveryEngine::V1beta"; + +// Observability config for a resource. +message ObservabilityConfig { + // Optional. Enables observability. If `false`, all other flags are ignored. + bool observability_enabled = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Enables sensitive logging. Sensitive logging includes customer + // core content (e.g. prompts, responses). If `false`, will sanitize all + // sensitive fields. + bool sensitive_logging_enabled = 2 [(google.api.field_behavior) = OPTIONAL]; +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/project.proto b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/project.proto index 09dcef77d83a..606f48e17088 100644 --- a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/project.proto +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/project.proto @@ -1,4 +1,4 @@ -// Copyright 2025 Google LLC +// 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. @@ -18,6 +18,7 @@ package google.cloud.discoveryengine.v1beta; import "google/api/field_behavior.proto"; import "google/api/resource.proto"; +import "google/cloud/discoveryengine/v1beta/logging.proto"; import "google/protobuf/timestamp.proto"; option csharp_namespace = "Google.Cloud.DiscoveryEngine.V1Beta"; @@ -80,6 +81,225 @@ message Project { google.protobuf.Timestamp decline_time = 6; } + // Customer provided configurations. + message CustomerProvidedConfig { + // Configuration for NotebookLM. + message NotebooklmConfig { + // Configuration for customer defined Model Armor templates to be used for + // sanitizing user prompts and LLM responses. + message ModelArmorConfig { + // Optional. The resource name of the Model Armor Template for + // sanitizing user prompts. Format: + // projects/{project}/locations/{location}/templates/{template_id} + // If not specified, no sanitization will be applied to the user prompt. + string user_prompt_template = 1 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.resource_reference) = { + type: "modelarmor.googleapis.com/Template" + } + ]; + + // Optional. The resource name of the Model Armor Template for + // sanitizing LLM responses. Format: + // projects/{project}/locations/{location}/templates/{template_id} + // If not specified, no sanitization will be applied to the LLM + // response. + string response_template = 2 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.resource_reference) = { + type: "modelarmor.googleapis.com/Template" + } + ]; + } + + // Data protection policy config for NotebookLM. + message DataProtectionPolicy { + // Specifies a Sensitive Data Protection + // (https://cloud.google.com/sensitive-data-protection/docs/sensitive-data-protection-overview) + // policy. + message SensitiveDataProtectionPolicy { + // Optional. The Sensitive Data Protection policy resource name. + string policy = 1 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.resource_reference) = { + type: "dlp.googleapis.com/ContentPolicy" + } + ]; + } + + // Optional. The sensitive data protection policy. + SensitiveDataProtectionPolicy sensitive_data_protection_policy = 1 + [(google.api.field_behavior) = OPTIONAL]; + } + + // Model Armor configuration to be used for sanitizing user prompts and + // LLM responses. + ModelArmorConfig model_armor_config = 1; + + // Optional. Whether to disable the notebook sharing feature for the + // project. Default to false if not specified. + bool opt_out_notebook_sharing = 2 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Specifies the data protection policy for NotebookLM. + DataProtectionPolicy data_protection_policy = 5 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Observability config for NotebookLM. + ObservabilityConfig observability_config = 6 + [(google.api.field_behavior) = OPTIONAL]; + } + + // Optional. Configuration for NotebookLM settings. + NotebooklmConfig notebooklm_config = 3 + [(google.api.field_behavior) = OPTIONAL]; + } + + // Represents the currently effective configurable billing parameters. + // These values are derived from the customer's subscription history stored + // internally and reflect the thresholds actively being used for billing + // purposes at the time of the GetProject call. This includes the start_time + // of the subscription and may differ from the values in + // `customer_provided_config` due to billing rules + // (e.g., scale-downs taking effect only at the start of a new month). + // We also include the update type to indicate the type of update performed on + // the configurable billing configuration in the UpdateProject operation. + message ConfigurableBillingStatus { + // Per-model Agent Search TPM subscription status. One entry per active + // `core_subscription.agent_search_token_subscriptions[*]` entry in the + // customer-provided config; populated by UpdateProject and GetProject. + // + // The lifecycle scalars on this message (`start_time`, `terminate_time`, + // `update_type`, `tpm_threshold_next_update_time`) are per (project, + // model_version) — siblings of the whole-relationship `start_time` / + // `terminate_time` / `update_type` on the enclosing + // ConfigurableBillingStatus, but scoped to this specific Agent Search + // TPM subscription instead of to the overall customer-configurable- + // pricing relationship. This per-instance granularity is intentional: + // the underlying SubV3 storage is per-(project, model_version), so + // each model has its own activation, termination, and deferred-update + // clock; surfacing that on the response gives customers the granularity + // they need to manage per-model commitments independently. QPM / + // IndexingCore differ — their storage is one row per (project, + // location), so their lifecycle is represented only by the whole- + // relationship scalars on ConfigurableBillingStatus. + message AgentSearchTokenSubscriptionStatus { + // Output only. The Gemini model version this status corresponds to. + // Matches CoreSubscription.AgentSearchTokenSubscription.model_version (a + // stable Gemini model version from the Gemini Enterprise Agent Platform + // model-versions registry; see + // https://docs.cloud.google.com/gemini-enterprise-agent-platform/models/model-versions#gemini-models). + string model_version = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The currently effective TPM threshold. Reflects scale-up + // immediately and scale-down at the next billing cycle, matching + // `effective_search_qpm_threshold` semantics. + int64 effective_tpm_threshold = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The earliest next update time for the TPM subscription + // threshold for this (project, model_version). Populated only after a + // successful update. + google.protobuf.Timestamp tpm_threshold_next_update_time = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. When this (project, model_version) Agent Search TPM + // subscription was first activated. Set once on first activation of this + // model version and never moved by subsequent threshold updates; on + // termination + re-activation a new value is recorded. Does NOT move + // the whole-relationship `start_time` on the enclosing + // ConfigurableBillingStatus, which continues to represent the first + // activation of the overall customer-configurable-pricing + // relationship. + google.protobuf.Timestamp start_time = 4 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. If set, the scheduled effective time at which this + // (project, model_version) Agent Search TPM subscription will terminate. + // Populated when the customer removes this entry from + // `core_subscription.agent_search_token_subscriptions[*]`. Does NOT move + // the whole-relationship `terminate_time` on the enclosing + // ConfigurableBillingStatus, which is populated only when the entire + // customer-configurable-pricing relationship is being torn down. + google.protobuf.Timestamp terminate_time = 5 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The type of the most recent update to this (project, + // model_version) subscription, as performed by the most recent + // UpdateProject call. `UPDATE_TYPE_UNSPECIFIED` indicates this + // model_version was not touched by the most recent UpdateProject (its + // `effective_tpm_threshold` reflects an earlier update). The + // whole-relationship `update_type` on the enclosing + // ConfigurableBillingStatus continues to summarize the direction of + // the most recent update across all surfaces in the project (QPM, + // IndexingCore, and Agent Search TPM together). + UpdateType update_type = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + } + + // The type of update performed on the configurable billing configuration. + enum UpdateType { + // Unspecified update type. + UPDATE_TYPE_UNSPECIFIED = 0; + + // Configurable billing was created/enabled. + CREATE = 1; + + // Configurable billing was deleted/disabled. + DELETE = 2; + + // Subscription was scaled up (thresholds increased). + SCALE_UP = 3; + + // Subscription was scaled down (thresholds decreased). + SCALE_DOWN = 4; + } + + // Optional. The currently effective Search QPM threshold in queries per + // minute. This is the threshold against which QPM usage is compared for + // overage calculations. + int64 effective_search_qpm_threshold = 1 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The currently effective Indexing Core threshold. + // This is the threshold against which Indexing Core usage is compared + // for overage calculations. + int64 effective_indexing_core_threshold = 2 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The start time of the currently active billing subscription. + google.protobuf.Timestamp start_time = 3 + [(google.api.field_behavior) = OPTIONAL]; + + // Output only. The latest terminate effective time of search qpm and + // indexing core subscriptions. + google.protobuf.Timestamp terminate_time = 4 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The earliest next update time for the search QPM + // subscription threshold. This is based on the next_update_time returned by + // the underlying Cloud Billing Subscription V3 API. This field is populated + // only if an update QPM subscription threshold request is succeeded. + google.protobuf.Timestamp search_qpm_threshold_next_update_time = 5 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The earliest next update time for the indexing core + // subscription threshold. This is based on the next_update_time returned by + // the underlying Cloud Billing Subscription V3 API. This field is populated + // only if an update indexing core subscription threshold + // request is succeeded. + google.protobuf.Timestamp indexing_core_threshold_next_update_time = 6 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The type of update performed in this operation. + // This field is populated in the response of UpdateProject. + UpdateType update_type = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Per-model Agent Search TPM subscription status. + repeated AgentSearchTokenSubscriptionStatus + agent_search_token_subscription_statuses = 8 + [(google.api.field_behavior) = OUTPUT_ONLY]; + } + // Output only. Full resource name of the project, for example // `projects/{project}`. // Note that when making requests, project number and project id are both @@ -100,4 +320,12 @@ message Project { // [ServiceTerms][google.cloud.discoveryengine.v1beta.Project.ServiceTerms]. map service_terms_map = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. Customer provided configurations. + CustomerProvidedConfig customer_provided_config = 6 + [(google.api.field_behavior) = OPTIONAL]; + + // Output only. The current status of the project's configurable billing. + ConfigurableBillingStatus configurable_billing_status = 10 + [(google.api.field_behavior) = OUTPUT_ONLY]; } diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/project_service.proto b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/project_service.proto index 02ed0539677c..3a504a551fad 100644 --- a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/project_service.proto +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/project_service.proto @@ -1,4 +1,4 @@ -// Copyright 2025 Google LLC +// 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. @@ -37,7 +37,9 @@ option ruby_package = "Google::Cloud::DiscoveryEngine::V1beta"; service ProjectService { option (google.api.default_host) = "discoveryengine.googleapis.com"; option (google.api.oauth_scopes) = - "https://www.googleapis.com/auth/cloud-platform"; + "https://www.googleapis.com/auth/cloud-platform," + "https://www.googleapis.com/auth/discoveryengine.readwrite," + "https://www.googleapis.com/auth/discoveryengine.serving.readwrite"; // Provisions the project resource. During the // process, related systems will get prepared and initialized. @@ -63,6 +65,18 @@ service ProjectService { // [ProjectService.ProvisionProject][google.cloud.discoveryengine.v1beta.ProjectService.ProvisionProject] // method. message ProvisionProjectRequest { + // Parameters for Agentspace. + message SaasParams { + // Optional. Set to `true` to specify that caller has read and would like to + // give consent to the [Terms for Agent Space quality of service]. + bool accept_biz_qos = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Indicates if the current request is for Biz edition (= true) or + // not + // (= false). + bool is_biz = 2 [(google.api.field_behavior) = OPTIONAL]; + } + // Required. Full resource name of a // [Project][google.cloud.discoveryengine.v1beta.Project], such as // `projects/{project_id_or_number}`. @@ -84,6 +98,9 @@ message ProvisionProjectRequest { // // Acceptable version is `2022-11-23`, and this may change over time. string data_use_terms_version = 3 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Parameters for Agentspace. + SaasParams saas_params = 4 [(google.api.field_behavior) = OPTIONAL]; } // Metadata associated with a project provision operation. diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/purge_config.proto b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/purge_config.proto index ef3947b2125b..257b2d9d4605 100644 --- a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/purge_config.proto +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/purge_config.proto @@ -1,4 +1,4 @@ -// Copyright 2025 Google LLC +// 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. @@ -55,16 +55,20 @@ message PurgeUserEventsRequest { // * `userId`: Double quoted string. Specifying this will delete all events // associated with a user. // + // Note: This API only supports purging a max range of 30 days. + // // Examples: // // * Deleting all events in a time range: // `eventTime > "2012-04-23T18:25:43.511Z" // eventTime < "2012-04-23T18:30:43.511Z"` - // * Deleting specific eventType: - // `eventType = "search"` - // * Deleting all events for a specific visitor: - // `userPseudoId = "visitor1024"` - // * Deleting all events inside a DataStore: + // * Deleting specific eventType in a time range: + // `eventTime > "2012-04-23T18:25:43.511Z" + // eventTime < "2012-04-23T18:30:43.511Z" eventType = "search"` + // * Deleting all events for a specific visitor in a time range: + // `eventTime > "2012-04-23T18:25:43.511Z" + // eventTime < "2012-04-23T18:30:43.511Z" userPseudoId = "visitor1024"` + // * Deleting the past 30 days of events inside a DataStore: // `*` // // The filtering fields are assumed to have an implicit AND. diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/rank_service.proto b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/rank_service.proto index 7bf07ed9084c..c2e3a9deb0d1 100644 --- a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/rank_service.proto +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/rank_service.proto @@ -1,4 +1,4 @@ -// Copyright 2025 Google LLC +// 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. @@ -34,7 +34,9 @@ option ruby_package = "Google::Cloud::DiscoveryEngine::V1beta"; service RankService { option (google.api.default_host) = "discoveryengine.googleapis.com"; option (google.api.oauth_scopes) = - "https://www.googleapis.com/auth/cloud-platform"; + "https://www.googleapis.com/auth/cloud-platform," + "https://www.googleapis.com/auth/discoveryengine.readwrite," + "https://www.googleapis.com/auth/discoveryengine.serving.readwrite"; // Ranks a list of text records based on the given input query. rpc Rank(RankRequest) returns (RankResponse) { @@ -67,6 +69,8 @@ message RankingRecord { string content = 3; // The score of this record based on the given query and selected model. + // The score will be rounded to 4 decimal places. If the score is close to 0, + // it will be rounded to 0.00001 to avoid returning unset. float score = 4; } @@ -85,7 +89,7 @@ message RankRequest { // The identifier of the model to use. It is one of: // - // * `semantic-ranker-512@latest`: Semantic ranking model with maxiumn input + // * `semantic-ranker-512@latest`: Semantic ranking model with maximum input // token size 512. // // It is set to `semantic-ranker-512@latest` by default if unspecified. @@ -98,7 +102,7 @@ message RankRequest { // The query to use. string query = 4; - // Required. A list of records to rank. At most 200 records to rank. + // Required. A list of records to rank. repeated RankingRecord records = 5 [(google.api.field_behavior) = REQUIRED]; // If true, the response will contain only record ID and score. By default, it diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/recommendation_service.proto b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/recommendation_service.proto index 18d66b659aae..26f2358fa4c1 100644 --- a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/recommendation_service.proto +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/recommendation_service.proto @@ -1,4 +1,4 @@ -// Copyright 2025 Google LLC +// 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. @@ -37,7 +37,9 @@ option ruby_package = "Google::Cloud::DiscoveryEngine::V1beta"; service RecommendationService { option (google.api.default_host) = "discoveryengine.googleapis.com"; option (google.api.oauth_scopes) = - "https://www.googleapis.com/auth/cloud-platform"; + "https://www.googleapis.com/auth/cloud-platform," + "https://www.googleapis.com/auth/discoveryengine.readwrite," + "https://www.googleapis.com/auth/discoveryengine.serving.readwrite"; // Makes a recommendation, which requires a contextual user event. rpc Recommend(RecommendRequest) returns (RecommendResponse) { @@ -116,9 +118,9 @@ message RecommendRequest { // attribute-based expressions are expected instead of the above described // tag-based syntax. Examples: // - // * (launguage: ANY("en", "es")) AND NOT (categories: ANY("Movie")) + // * (language: ANY("en", "es")) AND NOT (categories: ANY("Movie")) // * (available: true) AND - // (launguage: ANY("en", "es")) OR (categories: ANY("Movie")) + // (language: ANY("en", "es")) OR (categories: ANY("Movie")) // // If your filter blocks all results, the API returns generic // (unfiltered) popular Documents. If you only want results strictly matching diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/safety.proto b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/safety.proto new file mode 100644 index 000000000000..06b5fd065463 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/safety.proto @@ -0,0 +1,107 @@ +// 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 +// +// http://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. + +syntax = "proto3"; + +package google.cloud.discoveryengine.v1beta; + +import "google/api/field_behavior.proto"; + +option csharp_namespace = "Google.Cloud.DiscoveryEngine.V1Beta"; +option go_package = "cloud.google.com/go/discoveryengine/apiv1beta/discoveryenginepb;discoveryenginepb"; +option java_multiple_files = true; +option java_outer_classname = "SafetyProto"; +option java_package = "com.google.cloud.discoveryengine.v1beta"; +option objc_class_prefix = "DISCOVERYENGINE"; +option php_namespace = "Google\\Cloud\\DiscoveryEngine\\V1beta"; +option ruby_package = "Google::Cloud::DiscoveryEngine::V1beta"; + +// Harm categories that will block the content. +enum HarmCategory { + // The harm category is unspecified. + HARM_CATEGORY_UNSPECIFIED = 0; + + // The harm category is hate speech. + HARM_CATEGORY_HATE_SPEECH = 1; + + // The harm category is dangerous content. + HARM_CATEGORY_DANGEROUS_CONTENT = 2; + + // The harm category is harassment. + HARM_CATEGORY_HARASSMENT = 3; + + // The harm category is sexually explicit content. + HARM_CATEGORY_SEXUALLY_EXPLICIT = 4; + + // The harm category is civic integrity. + HARM_CATEGORY_CIVIC_INTEGRITY = 5; +} + +// Safety rating corresponding to the generated content. +message SafetyRating { + // Harm probability levels in the content. + enum HarmProbability { + // Harm probability unspecified. + HARM_PROBABILITY_UNSPECIFIED = 0; + + // Negligible level of harm. + NEGLIGIBLE = 1; + + // Low level of harm. + LOW = 2; + + // Medium level of harm. + MEDIUM = 3; + + // High level of harm. + HIGH = 4; + } + + // Harm severity levels. + enum HarmSeverity { + // Harm severity unspecified. + HARM_SEVERITY_UNSPECIFIED = 0; + + // Negligible level of harm severity. + HARM_SEVERITY_NEGLIGIBLE = 1; + + // Low level of harm severity. + HARM_SEVERITY_LOW = 2; + + // Medium level of harm severity. + HARM_SEVERITY_MEDIUM = 3; + + // High level of harm severity. + HARM_SEVERITY_HIGH = 4; + } + + // Output only. Harm category. + HarmCategory category = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Harm probability levels in the content. + HarmProbability probability = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Harm probability score. + float probability_score = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Harm severity levels in the content. + HarmSeverity severity = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Harm severity score. + float severity_score = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Indicates whether the content was filtered out because of this + // rating. + bool blocked = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/sample_query.proto b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/sample_query.proto index f166c4a6d3e2..2de515f09193 100644 --- a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/sample_query.proto +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/sample_query.proto @@ -1,4 +1,4 @@ -// Copyright 2025 Google LLC +// 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. diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/sample_query_service.proto b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/sample_query_service.proto index 248d099e206f..74f5660cc4ee 100644 --- a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/sample_query_service.proto +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/sample_query_service.proto @@ -1,4 +1,4 @@ -// Copyright 2025 Google LLC +// 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. @@ -40,7 +40,9 @@ option ruby_package = "Google::Cloud::DiscoveryEngine::V1beta"; service SampleQueryService { option (google.api.default_host) = "discoveryengine.googleapis.com"; option (google.api.oauth_scopes) = - "https://www.googleapis.com/auth/cloud-platform"; + "https://www.googleapis.com/auth/cloud-platform," + "https://www.googleapis.com/auth/discoveryengine.readwrite," + "https://www.googleapis.com/auth/discoveryengine.serving.readwrite"; // Gets a [SampleQuery][google.cloud.discoveryengine.v1beta.SampleQuery]. rpc GetSampleQuery(GetSampleQueryRequest) returns (SampleQuery) { diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/sample_query_set.proto b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/sample_query_set.proto index 730d14055326..9430835887dd 100644 --- a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/sample_query_set.proto +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/sample_query_set.proto @@ -1,4 +1,4 @@ -// Copyright 2025 Google LLC +// 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. diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/sample_query_set_service.proto b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/sample_query_set_service.proto index 24159782f418..87f3a640aa64 100644 --- a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/sample_query_set_service.proto +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/sample_query_set_service.proto @@ -1,4 +1,4 @@ -// Copyright 2025 Google LLC +// 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. @@ -38,7 +38,9 @@ option ruby_package = "Google::Cloud::DiscoveryEngine::V1beta"; service SampleQuerySetService { option (google.api.default_host) = "discoveryengine.googleapis.com"; option (google.api.oauth_scopes) = - "https://www.googleapis.com/auth/cloud-platform"; + "https://www.googleapis.com/auth/cloud-platform," + "https://www.googleapis.com/auth/discoveryengine.readwrite," + "https://www.googleapis.com/auth/discoveryengine.serving.readwrite"; // Gets a // [SampleQuerySet][google.cloud.discoveryengine.v1beta.SampleQuerySet]. diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/schema.proto b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/schema.proto index 53b972223eef..6733406be604 100644 --- a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/schema.proto +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/schema.proto @@ -1,4 +1,4 @@ -// Copyright 2025 Google LLC +// 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. diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/schema_service.proto b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/schema_service.proto index d9babb622d35..ad8f6abaefb1 100644 --- a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/schema_service.proto +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/schema_service.proto @@ -1,4 +1,4 @@ -// Copyright 2025 Google LLC +// 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. @@ -38,7 +38,9 @@ option ruby_package = "Google::Cloud::DiscoveryEngine::V1beta"; service SchemaService { option (google.api.default_host) = "discoveryengine.googleapis.com"; option (google.api.oauth_scopes) = - "https://www.googleapis.com/auth/cloud-platform"; + "https://www.googleapis.com/auth/cloud-platform," + "https://www.googleapis.com/auth/discoveryengine.readwrite," + "https://www.googleapis.com/auth/discoveryengine.serving.readwrite"; // Gets a [Schema][google.cloud.discoveryengine.v1beta.Schema]. rpc GetSchema(GetSchemaRequest) returns (Schema) { diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/search_service.proto b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/search_service.proto index 94c8f6bd18e6..8bbb6aa4353e 100644 --- a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/search_service.proto +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/search_service.proto @@ -1,4 +1,4 @@ -// Copyright 2025 Google LLC +// 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. @@ -38,7 +38,10 @@ option ruby_package = "Google::Cloud::DiscoveryEngine::V1beta"; service SearchService { option (google.api.default_host) = "discoveryengine.googleapis.com"; option (google.api.oauth_scopes) = - "https://www.googleapis.com/auth/cloud-platform"; + "https://www.googleapis.com/auth/cloud-platform," + "https://www.googleapis.com/auth/discoveryengine.assist.readwrite," + "https://www.googleapis.com/auth/discoveryengine.readwrite," + "https://www.googleapis.com/auth/discoveryengine.serving.readwrite"; // Performs a search. rpc Search(SearchRequest) returns (SearchResponse) { @@ -123,6 +126,20 @@ message SearchRequest { // For more information on boosting, see // [Boosting](https://cloud.google.com/generative-ai-app-builder/docs/boost-search-results) BoostSpec boost_spec = 6 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Custom search operators which if specified will be used to + // filter results from workspace data stores. For more information on custom + // search operators, see + // [SearchOperators](https://support.google.com/cloudsearch/answer/6172299). + string custom_search_operators = 7 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The maximum number of results to retrieve from this data store. + // If not specified, it will use the + // [SearchRequest.num_results_per_data_store][google.cloud.discoveryengine.v1beta.SearchRequest.num_results_per_data_store] + // if provided, otherwise there is no limit. If both this field and + // [SearchRequest.num_results_per_data_store][google.cloud.discoveryengine.v1beta.SearchRequest.num_results_per_data_store] + // are specified, this field will be used. + int32 num_results = 9 [(google.api.field_behavior) = OPTIONAL]; } // A facet specification to perform faceted search. @@ -200,7 +217,6 @@ message SearchRequest { // List of keys to exclude when faceting. // - // // By default, // [FacetKey.key][google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec.FacetKey.key] // is not excluded from the filter unless it is listed in this field. @@ -376,7 +392,7 @@ message SearchRequest { } // Condition boost specifications. If a document matches multiple conditions - // in the specifictions, boost scores from these specifications are all + // in the specifications, boost scores from these specifications are all // applied and combined in a non-linear way. Maximum number of // specifications is 20. repeated ConditionBoostSpec condition_boost_specs = 1; @@ -459,6 +475,31 @@ message SearchRequest { // A specification for configuring a summary returned in a search // response. message SummarySpec { + // Multimodal specification: Will return an image from specified source. + // If multiple sources are specified, the pick is a quality based + // decision. + message MultiModalSpec { + // Specifies the image source. + enum ImageSource { + // Unspecified image source (multimodal feature is disabled by + // default). + IMAGE_SOURCE_UNSPECIFIED = 0; + + // Behavior when service determines the pick from all available + // sources. + ALL_AVAILABLE_SOURCES = 1; + + // Includes image from corpus in the answer. + CORPUS_IMAGE_ONLY = 2; + + // Triggers figure generation in the answer. + FIGURE_GENERATION_ONLY = 3; + } + + // Optional. Source of image returned in the answer. + ImageSource image_source = 3 [(google.api.field_behavior) = OPTIONAL]; + } + // Specification of the prompt to use with the model. message ModelPromptSpec { // Text at the beginning of the prompt that instructs the assistant. @@ -560,6 +601,10 @@ message SearchRequest { bool ignore_jail_breaking_query = 10 [(google.api.field_behavior) = OPTIONAL]; + // Optional. Multimodal specification. + MultiModalSpec multimodal_spec = 11 + [(google.api.field_behavior) = OPTIONAL]; + // If specified, the spec will be used to modify the prompt provided to // the LLM. ModelPromptSpec model_prompt_spec = 5; @@ -663,7 +708,8 @@ message SearchRequest { DOCUMENTS = 1; // Returns chunks in the search result. Only available if the - // [DataStore.DocumentProcessingConfig.chunking_config][] is specified. + // [DocumentProcessingConfig.chunking_config][google.cloud.discoveryengine.v1beta.DocumentProcessingConfig.chunking_config] + // is specified. CHUNKS = 2; } @@ -712,7 +758,7 @@ message SearchRequest { message NaturalLanguageQueryUnderstandingSpec { // Enum describing under which condition filter extraction should occur. enum FilterExtractionCondition { - // Server behavior defaults to [Condition.DISABLED][]. + // Server behavior defaults to `DISABLED`. CONDITION_UNSPECIFIED = 0; // Disables NL filter extraction. @@ -722,17 +768,56 @@ message SearchRequest { ENABLED = 2; } + // Enum describing how extracted filters are applied to the search. + enum ExtractedFilterBehavior { + // `EXTRACTED_FILTER_BEHAVIOR_UNSPECIFIED` will use the default behavior + // for extracted filters. For single datastore search, the default is to + // apply as hard filters. For multi-datastore search, the default is to + // apply as soft boosts. + EXTRACTED_FILTER_BEHAVIOR_UNSPECIFIED = 0; + + // Applies all extracted filters as hard filters on the results. Results + // that do not pass the extracted filters will not be returned in the + // result set. + HARD_FILTER = 1; + + // Applies all extracted filters as soft boosts. Results that pass the + // filters will be boosted up to higher ranks in the result set. + SOFT_BOOST = 2; + } + // The condition under which filter extraction should occur. - // Default to [Condition.DISABLED][]. + // Server behavior defaults to `DISABLED`. FilterExtractionCondition filter_extraction_condition = 1; // Field names used for location-based filtering, where geolocation filters // are detected in natural language search queries. // Only valid when the FilterExtractionCondition is set to `ENABLED`. - // - // If this field is set, it overrides the field names set in - // [ServingConfig.geo_search_query_detection_field_names][google.cloud.discoveryengine.v1beta.ServingConfig.geo_search_query_detection_field_names]. repeated string geo_search_query_detection_field_names = 2; + + // Optional. Controls behavior of how extracted filters are applied to the + // search. The default behavior depends on the request. For single datastore + // structured search, the default is `HARD_FILTER`. For multi-datastore + // search, the default behavior is `SOFT_BOOST`. + // Location-based filters are always applied as hard filters, and the + // `SOFT_BOOST` setting will not affect them. + // This field is only used if + // [SearchRequest.NaturalLanguageQueryUnderstandingSpec.FilterExtractionCondition][google.cloud.discoveryengine.v1beta.SearchRequest.NaturalLanguageQueryUnderstandingSpec.FilterExtractionCondition] + // is set to + // [FilterExtractionCondition.ENABLED][google.cloud.discoveryengine.v1beta.SearchRequest.NaturalLanguageQueryUnderstandingSpec.FilterExtractionCondition.ENABLED]. + ExtractedFilterBehavior extracted_filter_behavior = 3 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Allowlist of fields that can be used for natural language + // filter extraction. By default, if this is unspecified, all indexable + // fields are eligible for natural language filter extraction (but are not + // guaranteed to be used). If any fields are specified in + // allowed_field_names, only the fields that are both marked as indexable in + // the schema and specified in the allowlist will be eligible for natural + // language filter extraction. Note: for multi-datastore search, this is not + // yet supported, and will be ignored. + repeated string allowed_field_names = 4 + [(google.api.field_behavior) = OPTIONAL]; } // Specification for search as you type in search requests. @@ -760,11 +845,61 @@ message SearchRequest { Condition condition = 1; } + // Specifies features for display, like match highlighting. + message DisplaySpec { + // Enum describing under which condition match highlighting should occur. + enum MatchHighlightingCondition { + // Server behavior is the same as `MATCH_HIGHLIGHTING_DISABLED`. + MATCH_HIGHLIGHTING_CONDITION_UNSPECIFIED = 0; + + // Disables match highlighting on all documents. + MATCH_HIGHLIGHTING_DISABLED = 1; + + // Enables match highlighting on all documents. + MATCH_HIGHLIGHTING_ENABLED = 2; + } + + // The condition under which match highlighting should occur. + MatchHighlightingCondition match_highlighting_condition = 1; + } + + // Specification for crowding. Crowding improves the diversity of search + // results by limiting the number of results that share the same field value. + // For example, crowding on the color field with a max_count of 3 and mode + // DROP_CROWDED_RESULTS will return at most 3 results with the same color + // across all pages. + message CrowdingSpec { + // Enum describing the mode to use for documents that are crowded away. + // They can be dropped or demoted to the later pages. + enum Mode { + // Unspecified crowding mode. In this case, server behavior defaults to + // [Mode.DROP_CROWDED_RESULTS][google.cloud.discoveryengine.v1beta.SearchRequest.CrowdingSpec.Mode.DROP_CROWDED_RESULTS]. + MODE_UNSPECIFIED = 0; + + // Drop crowded results. + DROP_CROWDED_RESULTS = 1; + + // Demote crowded results to the later pages. + DEMOTE_CROWDED_RESULTS_TO_END = 2; + } + + // The field to use for crowding. Documents can be crowded by a field in the + // [Document][google.cloud.discoveryengine.v1beta.Document] object. Crowding + // field is case sensitive. + string field = 1; + + // The maximum number of documents to keep per value of the field. Once + // there are at least max_count previous results which contain the same + // value for the given field (according to the order specified in + // `order_by`), later results with the same value are "crowded away". + // If not specified, the default value is 1. + int32 max_count = 2; + + // Mode to use for documents that are crowded away. + Mode mode = 3; + } + // Session specification. - // - // Multi-turn Search feature is currently at private GA stage. Please use - // v1alpha or v1beta version instead before we launch this feature to public - // GA. Or ask for allowlisting through Google Support team. message SessionSpec { // If set, the search result gets stored to the "turn" specified by this // query ID. @@ -796,13 +931,38 @@ message SearchRequest { // The number of top search results to persist. The persisted search results // can be used for the subsequent /answer api call. // - // This field is simliar to the `summary_result_count` field in + // This field is similar to the `summary_result_count` field in // [SearchRequest.ContentSearchSpec.SummarySpec.summary_result_count][google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec.summary_result_count]. // // At most 10 results for documents mode, or 50 for chunks mode. optional int32 search_result_persistence_count = 2; } + // Relevance filtering specification. + message RelevanceFilterSpec { + // Specification for relevance filtering on a specific sub-search. + message RelevanceThresholdSpec { + // Configures how the relevance threshold is determined. + oneof relevance_threshold_spec { + // Pre-defined relevance threshold for the sub-search. + RelevanceThreshold relevance_threshold = 1; + + // Custom relevance threshold for the sub-search. + // The value must be in [0.0, 1.0]. + float semantic_relevance_threshold = 2; + } + } + + // Optional. Relevance filtering threshold specification for keyword search. + RelevanceThresholdSpec keyword_search_threshold = 1 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Relevance filtering threshold specification for semantic + // search. + RelevanceThresholdSpec semantic_search_threshold = 2 + [(google.api.field_behavior) = OPTIONAL]; + } + // The specification for personalization. message PersonalizationSpec { // The personalization mode of each search request. @@ -824,6 +984,67 @@ message SearchRequest { Mode mode = 1; } + // The specification for returning the document relevance score. + message RelevanceScoreSpec { + // Optional. Whether to return the relevance score for search results. + // The higher the score, the more relevant the document is to the query. + bool return_relevance_score = 1 [(google.api.field_behavior) = OPTIONAL]; + } + + // SearchAddonSpec is used to disable add-ons for search as per new + // repricing model. By default if the SearchAddonSpec is not specified, we + // consider that the customer wants to enable them wherever applicable. + message SearchAddonSpec { + // Optional. If true, semantic add-on is disabled. Semantic add-on includes + // embeddings and jetstream. + bool disable_semantic_add_on = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If true, disables event re-ranking and personalization to + // optimize KPIs & personalize results. + bool disable_kpi_personalization_add_on = 2 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If true, generative answer add-on is disabled. Generative + // answer add-on includes natural language to filters and simple answers. + bool disable_generative_answer_add_on = 3 + [(google.api.field_behavior) = OPTIONAL]; + } + + // Configuration parameters for the Custom Ranking feature. + message CustomRankingParams { + // Optional. A list of ranking expressions (see `ranking_expression` for the + // syntax documentation) to evaluate. The evaluation results will be + // returned in + // `SearchResponse.SearchResult.rank_signals.precomputed_expression_values` + // field. + repeated string expressions_to_precompute = 1 + [(google.api.field_behavior) = OPTIONAL]; + } + + // The backend to use for the ranking expression evaluation. + enum RankingExpressionBackend { + // Default option for unspecified/unknown values. + RANKING_EXPRESSION_BACKEND_UNSPECIFIED = 0; + + // Deprecated: Use `RANK_BY_EMBEDDING` instead. + // Ranking by custom embedding model, the default way to evaluate the + // ranking expression. Legacy enum option, `RANK_BY_EMBEDDING` should be + // used instead. + BYOE = 1 [deprecated = true]; + + // Deprecated: Use `RANK_BY_FORMULA` instead. + // Ranking by custom formula. Legacy enum option, `RANK_BY_FORMULA` should + // be used instead. + CLEARBOX = 2 [deprecated = true]; + + // Ranking by custom embedding model, the default way to evaluate the + // ranking expression. + RANK_BY_EMBEDDING = 3; + + // Ranking by custom formula. + RANK_BY_FORMULA = 4; + } + // The relevance threshold of the search results. The higher relevance // threshold is, the higher relevant results are shown and the less number of // results are returned. @@ -870,6 +1091,25 @@ message SearchRequest { // Raw search query. string query = 3; + // Optional. The categories associated with a category page. Must be set for + // category navigation queries to achieve good search quality. The format + // should be the same as + // [PageInfo.page_category][google.cloud.discoveryengine.v1beta.PageInfo.page_category]. + // This field is the equivalent of the query for browse (navigation) queries. + // It's used by the browse model when the query is empty. + // + // If the field is empty, it will not be used by the browse model. + // If the field contains more than one element, only the first element will + // be used. + // + // To represent full path of a category, use '>' character to separate + // different hierarchies. If '>' is part of the category name, replace it with + // other character(s). + // For example, `Graphics Cards > RTX>4090 > Founders Edition` where "RTX > + // 4090" represents one level, can be rewritten as `Graphics Cards > RTX_4090 + // > Founders Edition` + repeated string page_categories = 63 [(google.api.field_behavior) = OPTIONAL]; + // Raw image query. ImageQuery image_query = 19; @@ -902,6 +1142,8 @@ message SearchRequest { // is unset. // // If this field is negative, an `INVALID_ARGUMENT` is returned. + // + // A large offset may be capped to a reasonable threshold. int32 offset = 6; // The maximum number of results to return for OneBox. @@ -909,12 +1151,22 @@ message SearchRequest { // Default number is 10. int32 one_box_page_size = 47; - // Specs defining dataStores to filter on in a search call and configurations - // for those dataStores. This is only considered for engines with multiple - // dataStores use case. For single dataStore within an engine, they should - // use the specs at the top level. + // Specifications that define the specific + // [DataStore][google.cloud.discoveryengine.v1beta.DataStore]s to be searched, + // along with configurations for those data stores. This is only considered + // for [Engine][google.cloud.discoveryengine.v1beta.Engine]s with multiple + // data stores. For engines with a single data store, the specs directly under + // [SearchRequest][google.cloud.discoveryengine.v1beta.SearchRequest] should + // be used. repeated DataStoreSpec data_store_specs = 32; + // Optional. The maximum number of results to retrieve from each data store. + // If not specified, it will use the + // [SearchRequest.DataStoreSpec.num_results][google.cloud.discoveryengine.v1beta.SearchRequest.DataStoreSpec.num_results] + // if provided, otherwise there is no limit. + int32 num_results_per_data_store = 65 + [(google.api.field_behavior) = OPTIONAL]; + // The filter syntax consists of an expression language for constructing a // predicate from one or more fields of the documents being filtered. Filter // expression is case-sensitive. @@ -961,7 +1213,7 @@ message SearchRequest { string order_by = 8; // Information about the end user. - // Highly recommended for analytics. + // Highly recommended for analytics and personalization. // [UserInfo.user_agent][google.cloud.discoveryengine.v1beta.UserInfo.user_agent] // is used to deduce `device_type` for analytics. UserInfo user_info = 21; @@ -1015,10 +1267,10 @@ message SearchRequest { // which spell correction takes effect. SpellCorrectionSpec spell_correction_spec = 14; - // A unique identifier for tracking visitors. For example, this could be - // implemented with an HTTP cookie, which should be able to uniquely identify - // a visitor on a single device. This unique identifier should not change if - // the visitor logs in or out of the website. + // Optional. A unique identifier for tracking visitors. For example, this + // could be implemented with an HTTP cookie, which should be able to uniquely + // identify a visitor on a single device. This unique identifier should not + // change if the visitor logs in or out of the website. // // This field should NOT have a fixed value such as `unknown_visitor`. // @@ -1029,7 +1281,7 @@ message SearchRequest { // // The field must be a UTF-8 encoded string with a length limit of 128 // characters. Otherwise, an `INVALID_ARGUMENT` error is returned. - string user_pseudo_id = 15; + string user_pseudo_id = 15 [(google.api.field_behavior) = OPTIONAL]; // A specification for configuring the behavior of content search. ContentSearchSpec content_search_spec = 24; @@ -1046,8 +1298,8 @@ message SearchRequest { // [ServingConfig.EmbeddingConfig.field_path][google.cloud.discoveryengine.v1beta.ServingConfig.embedding_config]. EmbeddingSpec embedding_spec = 23; - // The ranking expression controls the customized ranking on retrieval - // documents. This overrides + // Optional. The ranking expression controls the customized ranking on + // retrieval documents. This overrides // [ServingConfig.ranking_expression][google.cloud.discoveryengine.v1beta.ServingConfig.ranking_expression]. // The syntax and supported features depend on the // `ranking_expression_backend` value. If `ranking_expression_backend` is not @@ -1136,22 +1388,18 @@ message SearchRequest { // Google model to determine the keyword-based overlap between the query and // the document. // * `base_rank`: the default rank of the result - string ranking_expression = 26; - - // The backend to use for the ranking expression evaluation. - enum RankingExpressionBackend { - reserved 1, 2; - - // Default option for unspecified/unknown values. - RANKING_EXPRESSION_BACKEND_UNSPECIFIED = 0; - // Ranking by custom embedding model, the default way to evaluate the - // ranking expression. - RANK_BY_EMBEDDING = 3; - // Ranking by custom formula. - RANK_BY_FORMULA = 4; - } - - // The backend to use for the ranking expression evaluation. + // * `media_actor_match`: whether the media actor matches the query + // * `media_director_match`: whether the media director matches the query + // * `media_genre_match`: whether the media genre matches the query + // * `media_language_match`: whether the media language matches the query + // * `media_title_match`: whether the media title matches the query + // * `media_prefix_similarity_rank`: prefix similarity rank for media + // results + // * `media_semantic_similarity_rank`: semantic similarity rank for media + // results + string ranking_expression = 26 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The backend to use for the ranking expression evaluation. RankingExpressionBackend ranking_expression_backend = 53 [(google.api.field_behavior) = OPTIONAL]; @@ -1178,16 +1426,37 @@ message SearchRequest { // for more details. map user_labels = 22; + // Optional. Config for natural language query understanding capabilities, + // such as extracting structured field filters from the query. Refer to [this + // documentation](https://cloud.google.com/generative-ai-app-builder/docs/natural-language-queries) + // for more information. // If `naturalLanguageQueryUnderstandingSpec` is not specified, no additional // natural language query understanding will be done. NaturalLanguageQueryUnderstandingSpec - natural_language_query_understanding_spec = 28; + natural_language_query_understanding_spec = 28 + [(google.api.field_behavior) = OPTIONAL]; // Search as you type configuration. Only supported for the // [IndustryVertical.MEDIA][google.cloud.discoveryengine.v1beta.IndustryVertical.MEDIA] // vertical. SearchAsYouTypeSpec search_as_you_type_spec = 31; + // Optional. Config for display feature, like match highlighting on search + // results. + DisplaySpec display_spec = 38 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Crowding specifications for improving result diversity. + // If multiple CrowdingSpecs are specified, crowding will be evaluated on + // each unique combination of the `field` values, and max_count will be the + // maximum value of `max_count` across all CrowdingSpecs. + // For example, if the first CrowdingSpec has `field` = "color" and + // `max_count` = 3, and the second CrowdingSpec has `field` = "size" and + // `max_count` = 2, then after 3 documents that share the same color AND size + // have been returned, subsequent ones should be + // removed or demoted. + repeated CrowdingSpec crowding_specs = 40 + [(google.api.field_behavior) = OPTIONAL]; + // The session resource name. Optional. // // Session allows users to do multi-turn /search API calls or coordination @@ -1204,10 +1473,6 @@ message SearchRequest { // Call /answer API with the session ID generated in the first call. // Here, the answer generation happens in the context of the search // results from the first search call. - // - // Multi-turn Search feature is currently at private GA stage. Please use - // v1alpha or v1beta version instead before we launch this feature to public - // GA. Or ask for allowlisting through Google Support team. string session = 41 [(google.api.resource_reference) = { type: "discoveryengine.googleapis.com/Session" }]; @@ -1217,13 +1482,28 @@ message SearchRequest { // Can be used only when `session` is set. SessionSpec session_spec = 42; - // The relevance threshold of the search results. + // The global relevance threshold of the search results. // - // Default to Google defined threshold, leveraging a balance of + // Defaults to Google defined threshold, leveraging a balance of // precision and recall to deliver both highly accurate results and // comprehensive coverage of relevant information. + // + // If more granular relevance filtering is required, use the + // `relevance_filter_spec` instead. + // + // This feature is not supported for healthcare search. RelevanceThreshold relevance_threshold = 44; + // Optional. The granular relevance filtering specification. + // + // If not specified, the global `relevance_threshold` will be used for all + // sub-searches. If specified, this overrides the global + // `relevance_threshold` to use thresholds on a per sub-search basis. + // + // This feature is currently supported only for custom and site search. + RelevanceFilterSpec relevance_filter_spec = 86 + [(google.api.field_behavior) = OPTIONAL]; + // The specification for personalization. // // Notice that if both @@ -1235,6 +1515,28 @@ message SearchRequest { // overrides // [ServingConfig.personalization_spec][google.cloud.discoveryengine.v1beta.ServingConfig.personalization_spec]. PersonalizationSpec personalization_spec = 46; + + // Optional. The specification for returning the relevance score. + RelevanceScoreSpec relevance_score_spec = 52 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. SearchAddonSpec is used to disable add-ons for search as per new + // repricing model. + // This field is only supported for search requests. + SearchAddonSpec search_addon_spec = 62 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Optional configuration for the Custom Ranking feature. + CustomRankingParams custom_ranking_params = 64 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The entity for customers that may run multiple different + // entities, domains, sites or regions, for example, "Google US", "Google + // Ads", "Waymo", "google.com", "youtube.com", etc. If this is set, it should + // be exactly matched with + // [UserEvent.entity][google.cloud.discoveryengine.v1beta.UserEvent.entity] to + // get search results boosted by entity. + string entity = 66 [(google.api.field_behavior) = OPTIONAL]; } // Response message for @@ -1243,64 +1545,77 @@ message SearchRequest { message SearchResponse { // Represents the search results. message SearchResult { - // [Document.id][google.cloud.discoveryengine.v1beta.Document.id] of the - // searched [Document][google.cloud.discoveryengine.v1beta.Document]. - string id = 1; - - // The document data snippet in the search response. Only fields that are - // marked as `retrievable` are populated. - Document document = 2; - - // The chunk data in the search response if the - // [SearchRequest.ContentSearchSpec.search_result_mode][google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.search_result_mode] - // is set to - // [CHUNKS][google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SearchResultMode.CHUNKS]. - Chunk chunk = 18; - - // Google provided available scores. - map model_scores = 4; - // A set of ranking signals. message RankSignals { - reserved 5; + // Custom clearbox signal represented by name and value pair. + message CustomSignal { + // Optional. Name of the signal. + string name = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Float value representing the ranking signal (e.g. 1.25 for + // BM25). + float value = 2 [(google.api.field_behavior) = OPTIONAL]; + } - // Keyword matching adjustment. + // Optional. Keyword matching adjustment. optional float keyword_similarity_score = 1 [(google.api.field_behavior) = OPTIONAL]; - // Semantic relevance adjustment. + + // Optional. Semantic relevance adjustment. optional float relevance_score = 2 [(google.api.field_behavior) = OPTIONAL]; - // Semantic similarity adjustment. + + // Optional. Semantic similarity adjustment. optional float semantic_similarity_score = 3 [(google.api.field_behavior) = OPTIONAL]; - // Predicted conversion rate adjustment as a rank. + + // Optional. Predicted conversion rate adjustment as a rank. optional float pctr_rank = 4 [(google.api.field_behavior) = OPTIONAL]; - // Topicality adjustment as a rank. + + // Optional. Topicality adjustment as a rank. optional float topicality_rank = 6 [(google.api.field_behavior) = OPTIONAL]; - // Age of the document in hours. + + // Optional. Age of the document in hours. optional float document_age = 7 [(google.api.field_behavior) = OPTIONAL]; - // Combined custom boosts for a doc. + + // Optional. Combined custom boosts for a doc. optional float boosting_factor = 8 [(google.api.field_behavior) = OPTIONAL]; - // The default rank of the result. + // Optional. The default rank of the result. float default_rank = 32 [(google.api.field_behavior) = OPTIONAL]; - // Custom clearbox signal represented by name and value pair. - message CustomSignal { - // Name of the signal. - string name = 1 [(google.api.field_behavior) = OPTIONAL]; - // Float value representing the ranking signal (e.g. 1.25 for BM25). - float value = 2 [(google.api.field_behavior) = OPTIONAL]; - } - - // A list of custom clearbox signals. + // Optional. A list of custom clearbox signals. repeated CustomSignal custom_signals = 33 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A list of precomputed expression results for a given + // document, in the same order as requested in + // `SearchRequest.custom_ranking_params.expressions_to_precompute`. + repeated float precomputed_expression_values = 34 + [(google.api.field_behavior) = OPTIONAL]; } - // A set of ranking signals associated with the result. + // [Document.id][google.cloud.discoveryengine.v1beta.Document.id] of the + // searched [Document][google.cloud.discoveryengine.v1beta.Document]. + string id = 1; + + // The document data snippet in the search response. Only fields that are + // marked as `retrievable` are populated. + Document document = 2; + + // The chunk data in the search response if the + // [SearchRequest.ContentSearchSpec.search_result_mode][google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.search_result_mode] + // is set to + // [CHUNKS][google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SearchResultMode.CHUNKS]. + Chunk chunk = 18; + + // Output only. Google provided available scores. + map model_scores = 4 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. A set of ranking signals associated with the result. RankSignals rank_signals = 7 [(google.api.field_behavior) = OPTIONAL]; } @@ -1401,6 +1716,10 @@ message SearchResponse { // Page identifier. string page_identifier = 2; + + // Output only. Stores indexes of blobattachments linked to this chunk. + repeated int64 blob_attachment_indexes = 4 + [(google.api.field_behavior) = OUTPUT_ONLY]; } // Title of the document. @@ -1425,6 +1744,38 @@ message SearchResponse { repeated ChunkContent chunk_contents = 4; } + // Stores binarydata attached to text answer, e.g. image, video, audio, etc. + message BlobAttachment { + // Stores type and data of the blob. + message Blob { + // Output only. The media type (MIME type) of the generated data. + string mime_type = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Raw bytes. + bytes data = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + } + + // Defines the attribution type of the blob. + enum AttributionType { + // Unspecified attribution type. + ATTRIBUTION_TYPE_UNSPECIFIED = 0; + + // The attachment data is from the corpus. + CORPUS = 1; + + // The attachment data is generated by the model through code + // generation. + GENERATED = 2; + } + + // Output only. The blob data. + Blob data = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The attribution type of the blob. + AttributionType attribution_type = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; + } + // Summary with metadata information. message SummaryWithMetadata { // Summary text with no citation information. @@ -1435,6 +1786,10 @@ message SearchResponse { // Document References. repeated Reference references = 3; + + // Output only. Store multimodal data for answer enhancement. + repeated BlobAttachment blob_attachments = 4 + [(google.api.field_behavior) = OUTPUT_ONLY]; } // An Enum for summary-skipped reasons. @@ -1502,6 +1857,11 @@ message SearchResponse { // [SearchRequest.ContentSearchSpec.SummarySpec.ignore_non_answer_seeking_query] // is set to `true`. NON_SUMMARY_SEEKING_QUERY_IGNORED_V2 = 9; + + // The time out case. + // + // Google skips the summary if the time out. + TIME_OUT = 10; } // The summary content. @@ -1668,6 +2028,9 @@ message SearchResponse { // Rewritten input query minus the extracted filters. string rewritten_query = 2; + // The classified intents from the input query. + repeated string classified_intents = 5; + // The filters that were extracted from the input query represented in a // structured form. StructuredExtractedFilter structured_extracted_filter = 3; @@ -1718,6 +2081,18 @@ message SearchResponse { repeated SearchResult search_results = 2; } + // Semantic state of the search response. + enum SemanticState { + // Default value. Should not be used. + SEMANTIC_STATE_UNSPECIFIED = 0; + + // Semantic search was disabled for this search response. + DISABLED = 1; + + // Semantic search was enabled for this search response. + ENABLED = 2; + } + // A list of matched documents. The order represents the ranking. repeated SearchResult results = 1; @@ -1761,6 +2136,13 @@ message SearchResponse { // Otherwise the original query is used for search. string corrected_query = 7; + // Corrected query with low confidence, AKA did you mean query. + // Compared with corrected_query, this field is set when SpellCorrector + // returned a response, but FPR(full page replacement) is not triggered + // because the corrction is of low confidence(eg, reversed because there are + // matches of the original query in document corpus). + string suggested_query = 24; + // A summary as part of the search results. // This field is only returned if // [SearchRequest.ContentSearchSpec.summary_spec][google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.summary_spec] @@ -1775,9 +2157,11 @@ message SearchResponse { // Query expansion information for the returned results. QueryExpansionInfo query_expansion_info = 14; - // Natural language query understanding information for the returned results. + // Output only. Natural language query understanding information for the + // returned results. NaturalLanguageQueryUnderstandingInfo - natural_language_query_understanding_info = 15; + natural_language_query_understanding_info = 15 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Session information. // @@ -1789,4 +2173,10 @@ message SearchResponse { // A list of One Box results. There can be multiple One Box results of // different types. repeated OneBoxResult one_box_results = 20; + + // Promotions for site search. + repeated SearchLinkPromotion search_link_promotions = 23; + + // Output only. Indicates the semantic state of the search response. + SemanticState semantic_state = 36 [(google.api.field_behavior) = OUTPUT_ONLY]; } diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/search_tuning_service.proto b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/search_tuning_service.proto index 4f31a41e5115..527a79bcc2ab 100644 --- a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/search_tuning_service.proto +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/search_tuning_service.proto @@ -1,4 +1,4 @@ -// Copyright 2025 Google LLC +// 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. @@ -39,7 +39,9 @@ option ruby_package = "Google::Cloud::DiscoveryEngine::V1beta"; service SearchTuningService { option (google.api.default_host) = "discoveryengine.googleapis.com"; option (google.api.oauth_scopes) = - "https://www.googleapis.com/auth/cloud-platform"; + "https://www.googleapis.com/auth/cloud-platform," + "https://www.googleapis.com/auth/discoveryengine.readwrite," + "https://www.googleapis.com/auth/discoveryengine.serving.readwrite"; // Trains a custom model. rpc TrainCustomModel(TrainCustomModelRequest) diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/serving_config.proto b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/serving_config.proto index 738d67bbd620..209d921f9dbc 100644 --- a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/serving_config.proto +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/serving_config.proto @@ -1,4 +1,4 @@ -// Copyright 2025 Google LLC +// 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. @@ -170,9 +170,8 @@ message ServingConfig { // The ranking expression controls the customized ranking on retrieval // documents. To leverage this, document embedding is required. The ranking // expression setting in ServingConfig applies to all search requests served - // by the serving config. However, if - // [SearchRequest.ranking_expression][google.cloud.discoveryengine.v1beta.SearchRequest.ranking_expression] - // is specified, it overrides the ServingConfig ranking expression. + // by the serving config. However, if `SearchRequest.ranking_expression` is + // specified, it overrides the ServingConfig ranking expression. // // The ranking expression is a single function or multiple functions that are // joined by "+". @@ -274,6 +273,11 @@ message ServingConfig { // Maximum number of specifications is 100. repeated string ignore_control_ids = 19; + // Condition promote specifications. + // + // Maximum number of specifications is 100. + repeated string promote_control_ids = 26; + // The specification for personalization spec. // // Notice that if both @@ -285,4 +289,44 @@ message ServingConfig { // overrides // [ServingConfig.personalization_spec][google.cloud.discoveryengine.v1beta.ServingConfig.personalization_spec]. SearchRequest.PersonalizationSpec personalization_spec = 25; + + // Optional. The specification for answer generation. + AnswerGenerationSpec answer_generation_spec = 27 + [(google.api.field_behavior) = OPTIONAL]; +} + +// The specification for answer generation. +message AnswerGenerationSpec { + // The specification for user defined classifier. + message UserDefinedClassifierSpec { + // Optional. Whether or not to enable and include user defined classifier. + bool enable_user_defined_classifier = 1 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The preamble to be used for the user defined classifier. + string preamble = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The model id to be used for the user defined classifier. + string model_id = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The task marker to be used for the user defined classifier. + string task_marker = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The top-p value to be used for the user defined classifier. + double top_p = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The top-k value to be used for the user defined classifier. + int64 top_k = 6 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The temperature value to be used for the user defined + // classifier. + double temperature = 7 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The seed value to be used for the user defined classifier. + int32 seed = 8 [(google.api.field_behavior) = OPTIONAL]; + } + + // Optional. The specification for user specified classifier spec. + UserDefinedClassifierSpec user_defined_classifier_spec = 1 + [(google.api.field_behavior) = OPTIONAL]; } diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/serving_config_service.proto b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/serving_config_service.proto index 8cd3efefb2d1..c1ed948cbe6d 100644 --- a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/serving_config_service.proto +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/serving_config_service.proto @@ -1,4 +1,4 @@ -// Copyright 2025 Google LLC +// 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. @@ -21,6 +21,7 @@ import "google/api/client.proto"; import "google/api/field_behavior.proto"; import "google/api/resource.proto"; import "google/cloud/discoveryengine/v1beta/serving_config.proto"; +import "google/protobuf/empty.proto"; import "google/protobuf/field_mask.proto"; option csharp_namespace = "Google.Cloud.DiscoveryEngine.V1Beta"; @@ -37,7 +38,52 @@ option ruby_package = "Google::Cloud::DiscoveryEngine::V1beta"; service ServingConfigService { option (google.api.default_host) = "discoveryengine.googleapis.com"; option (google.api.oauth_scopes) = - "https://www.googleapis.com/auth/cloud-platform"; + "https://www.googleapis.com/auth/cloud-platform," + "https://www.googleapis.com/auth/discoveryengine.readwrite," + "https://www.googleapis.com/auth/discoveryengine.serving.readwrite"; + + // Creates a ServingConfig. + // + // Note: The Google Cloud console works only with the default serving config. + // Additional ServingConfigs can be created and managed only via the API. + // + // A maximum of 100 + // [ServingConfig][google.cloud.discoveryengine.v1beta.ServingConfig]s are + // allowed in an [Engine][google.cloud.discoveryengine.v1beta.Engine], + // otherwise a RESOURCE_EXHAUSTED error is returned. + rpc CreateServingConfig(CreateServingConfigRequest) returns (ServingConfig) { + option (google.api.http) = { + post: "/v1beta/{parent=projects/*/locations/*/dataStores/*}/servingConfigs" + body: "serving_config" + additional_bindings { + post: "/v1beta/{parent=projects/*/locations/*/collections/*/dataStores/*}/servingConfigs" + body: "serving_config" + } + additional_bindings { + post: "/v1beta/{parent=projects/*/locations/*/collections/*/engines/*}/servingConfigs" + body: "serving_config" + } + }; + option (google.api.method_signature) = + "parent,serving_config,serving_config_id"; + } + + // Deletes a ServingConfig. + // + // Returns a NOT_FOUND error if the ServingConfig does not exist. + rpc DeleteServingConfig(DeleteServingConfigRequest) + returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1beta/{name=projects/*/locations/*/dataStores/*/servingConfigs/*}" + additional_bindings { + delete: "/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/servingConfigs/*}" + } + additional_bindings { + delete: "/v1beta/{name=projects/*/locations/*/collections/*/engines/*/servingConfigs/*}" + } + }; + option (google.api.method_signature) = "name"; + } // Updates a ServingConfig. // @@ -90,6 +136,28 @@ service ServingConfigService { } } +// Request for CreateServingConfig method. +message CreateServingConfigRequest { + // Required. Full resource name of parent. Format: + // `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "discoveryengine.googleapis.com/ServingConfig" + } + ]; + + // Required. The ServingConfig to create. + ServingConfig serving_config = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The ID to use for the ServingConfig, which will become the final + // component of the ServingConfig's resource name. + // + // This value should be 4-63 characters, and valid characters + // are /[a-zA-Z0-9][a-zA-Z0-9_-]+/. + string serving_config_id = 3 [(google.api.field_behavior) = REQUIRED]; +} + // Request for UpdateServingConfig method. message UpdateServingConfigRequest { // Required. The ServingConfig to update. @@ -105,6 +173,18 @@ message UpdateServingConfigRequest { google.protobuf.FieldMask update_mask = 2; } +// Request for DeleteServingConfig method. +message DeleteServingConfigRequest { + // Required. The resource name of the ServingConfig to delete. Format: + // `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/servingConfigs/{serving_config_id}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "discoveryengine.googleapis.com/ServingConfig" + } + ]; +} + // Request for GetServingConfig method. message GetServingConfigRequest { // Required. The resource name of the ServingConfig to get. Format: diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/session.proto b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/session.proto index 98aa630f704c..267f1038c9ed 100644 --- a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/session.proto +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/session.proto @@ -1,4 +1,4 @@ -// Copyright 2025 Google LLC +// 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. @@ -19,6 +19,7 @@ package google.cloud.discoveryengine.v1beta; import "google/api/field_behavior.proto"; import "google/api/resource.proto"; import "google/cloud/discoveryengine/v1beta/answer.proto"; +import "google/cloud/discoveryengine/v1beta/assist_answer.proto"; import "google/protobuf/timestamp.proto"; option csharp_namespace = "Google.Cloud.DiscoveryEngine.V1Beta"; @@ -37,6 +38,7 @@ message Session { pattern: "projects/{project}/locations/{location}/dataStores/{data_store}/sessions/{session}" pattern: "projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/sessions/{session}" pattern: "projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/sessions/{session}" + pattern: "projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/collaborativeProjects/{collaborative_project}/sessions/{session}" plural: "sessions" singular: "session" }; @@ -67,12 +69,24 @@ message Session { // session. Answer detailed_answer = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; + // Output only. In + // [ConversationalSearchService.GetSession][google.cloud.discoveryengine.v1beta.ConversationalSearchService.GetSession] + // API, if + // [GetSessionRequest.include_answer_details][google.cloud.discoveryengine.v1beta.GetSessionRequest.include_answer_details] + // is set to true, this field will be populated when getting assistant + // session. + AssistAnswer detailed_assist_answer = 8 + [(google.api.field_behavior) = OUTPUT_ONLY]; + // Optional. Represents metadata related to the query config, for example // LLM model and version used, model parameters (temperature, grounding // parameters, etc.). The prefix "google." is reserved for Google-developed // functionality. map query_config = 16 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Indicates whether this turn is a live turn. + bool live = 20 [(google.api.field_behavior) = OPTIONAL]; } // Enumeration of the state of the session. @@ -103,6 +117,10 @@ message Session { // Turns. repeated Turn turns = 4; + // Optional. The labels for the session. + // Can be set as filter in ListSessionsRequest. + repeated string labels = 9 [(google.api.field_behavior) = OPTIONAL]; + // Output only. The time the session started. google.protobuf.Timestamp start_time = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; @@ -114,6 +132,13 @@ message Session { // Optional. Whether the session is pinned, pinned session will be displayed // on the top of the session list. bool is_pinned = 8 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. Full resource name of an in-progress AsyncAssist operation for + // this session, e.g. + // `projects/*/locations/*/collections/*/engines/*/sessions/*/operations/*`. + // Set when the operation starts and cleared when it finishes. + string pending_async_assist_operation_id = 22 + [(google.api.field_behavior) = OUTPUT_ONLY]; } // Defines a user inputed query. diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/session_service.proto b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/session_service.proto index c6530edef2ef..c53c73de4400 100644 --- a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/session_service.proto +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/session_service.proto @@ -1,4 +1,4 @@ -// Copyright 2025 Google LLC +// 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. @@ -37,7 +37,10 @@ option ruby_package = "Google::Cloud::DiscoveryEngine::V1beta"; service SessionService { option (google.api.default_host) = "discoveryengine.googleapis.com"; option (google.api.oauth_scopes) = - "https://www.googleapis.com/auth/cloud-platform"; + "https://www.googleapis.com/auth/cloud-platform," + "https://www.googleapis.com/auth/discoveryengine.assist.readwrite," + "https://www.googleapis.com/auth/discoveryengine.readwrite," + "https://www.googleapis.com/auth/discoveryengine.serving.readwrite"; // Creates a Session. // diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/site_search_engine.proto b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/site_search_engine.proto index aceb2b529edd..92c8e1d9a760 100644 --- a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/site_search_engine.proto +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/site_search_engine.proto @@ -1,4 +1,4 @@ -// Copyright 2025 Google LLC +// 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. @@ -100,6 +100,12 @@ message TargetSite { // 1. target site deleted if unindexing is successful; // 2. state reverts to SUCCEEDED if the unindexing fails. DELETING = 4; + + // The target site change is pending but cancellable. + CANCELLABLE = 5; + + // The target site change is cancelled. + CANCELLED = 6; } // Output only. The fully qualified resource name of the target site. @@ -118,13 +124,13 @@ message TargetSite { // excluded. Type type = 3; - // Input only. If set to false, a uri_pattern is generated to include all - // pages whose address contains the provided_uri_pattern. If set to true, an + // Immutable. If set to false, a uri_pattern is generated to include all pages + // whose address contains the provided_uri_pattern. If set to true, an // uri_pattern is generated to try to be an exact match of the // provided_uri_pattern or just the specific page if the provided_uri_pattern // is a specific one. provided_uri_pattern is always normalized to // generate the URI pattern to be used by the search engine. - bool exact_match = 6 [(google.api.field_behavior) = INPUT_ONLY]; + bool exact_match = 6 [(google.api.field_behavior) = IMMUTABLE]; // Output only. This is system-generated based on the provided_uri_pattern. string generated_uri_pattern = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/site_search_engine_service.proto b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/site_search_engine_service.proto index cd52cdb1f39d..a694625503ed 100644 --- a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/site_search_engine_service.proto +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/site_search_engine_service.proto @@ -1,4 +1,4 @@ -// Copyright 2025 Google LLC +// 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. @@ -38,7 +38,9 @@ option ruby_package = "Google::Cloud::DiscoveryEngine::V1beta"; service SiteSearchEngineService { option (google.api.default_host) = "discoveryengine.googleapis.com"; option (google.api.oauth_scopes) = - "https://www.googleapis.com/auth/cloud-platform"; + "https://www.googleapis.com/auth/cloud-platform," + "https://www.googleapis.com/auth/discoveryengine.readwrite," + "https://www.googleapis.com/auth/discoveryengine.serving.readwrite"; // Gets the // [SiteSearchEngine][google.cloud.discoveryengine.v1beta.SiteSearchEngine]. @@ -186,6 +188,9 @@ service SiteSearchEngineService { rpc FetchSitemaps(FetchSitemapsRequest) returns (FetchSitemapsResponse) { option (google.api.http) = { get: "/v1beta/{parent=projects/*/locations/*/dataStores/*/siteSearchEngine}/sitemaps:fetch" + additional_bindings { + get: "/v1beta/{parent=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine}/sitemaps:fetch" + } }; option (google.api.method_signature) = "parent"; } @@ -706,9 +711,7 @@ message RecrawlUrisRequest { // `site_search_engine`. repeated string uris = 2 [(google.api.field_behavior) = REQUIRED]; - // Optional. Full resource name of the [SiteCredential][], such as - // `projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/siteCredentials/*`. - // Only set to crawl private URIs. + // Optional. Credential id to use for crawling. string site_credential = 5 [(google.api.field_behavior) = OPTIONAL]; } @@ -774,6 +777,12 @@ message RecrawlUrisMetadata { // Total number of unique URIs in the request that have invalid format. int32 invalid_uris_count = 8; + // URIs that have no index meta tag. Sample limited to 1000. + repeated string noindex_uris = 11; + + // Total number of URIs that have no index meta tag. + int32 noindex_uris_count = 12; + // Unique URIs in the request that don't match any TargetSite in the // DataStore, only match TargetSites that haven't been fully indexed, or match // a TargetSite with type EXCLUDE. Sample limited to 1000. diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/user_event.proto b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/user_event.proto index 0c632cf92128..08b77cf1cb33 100644 --- a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/user_event.proto +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/user_event.proto @@ -1,4 +1,4 @@ -// Copyright 2025 Google LLC +// 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. @@ -19,6 +19,7 @@ package google.cloud.discoveryengine.v1beta; import "google/api/field_behavior.proto"; import "google/api/resource.proto"; import "google/cloud/discoveryengine/v1beta/common.proto"; +import "google/cloud/discoveryengine/v1beta/feedback.proto"; import "google/protobuf/duration.proto"; import "google/protobuf/timestamp.proto"; @@ -43,7 +44,6 @@ message UserEvent { // * `view-item-list`: View of a panel or ordered list of Documents. // * `view-home-page`: View of the home page. // * `view-category-page`: View of a category page, e.g. Home > Men > Jeans - // * `add-feedback`: Add a user feedback. // // Retail-related values: // @@ -54,8 +54,25 @@ message UserEvent { // // * `media-play`: Start/resume watching a video, playing a song, etc. // * `media-complete`: Finished or stopped midway through a video, song, etc. + // + // Custom conversion value: + // + // * `conversion`: Customer defined conversion event. string event_type = 1 [(google.api.field_behavior) = REQUIRED]; + // Optional. Conversion type. + // + // Required if + // [UserEvent.event_type][google.cloud.discoveryengine.v1beta.UserEvent.event_type] + // is `conversion`. This is a customer-defined conversion name in lowercase + // letters or numbers separated by "-", such as "watch", "good-visit" etc. + // + // Do not set the field if + // [UserEvent.event_type][google.cloud.discoveryengine.v1beta.UserEvent.event_type] + // is not `conversion`. This mixes the custom conversion event with predefined + // events like `search`, `view-item` etc. + string conversion_type = 21 [(google.api.field_behavior) = OPTIONAL]; + // Required. A unique identifier for tracking visitors. // // For example, this could be implemented with an HTTP cookie, which should be @@ -162,8 +179,9 @@ message UserEvent { // to this field. string attribution_token = 8; - // The filter syntax consists of an expression language for constructing a - // predicate from one or more fields of the documents being filtered. + // Optional. The filter syntax consists of an expression language for + // constructing a predicate from one or more fields of the documents being + // filtered. // // One example is for `search` events, the associated // [SearchRequest][google.cloud.discoveryengine.v1beta.SearchRequest] may @@ -179,7 +197,7 @@ message UserEvent { // // The value must be a UTF-8 encoded string with a length limit of 1,000 // characters. Otherwise, an `INVALID_ARGUMENT` error is returned. - string filter = 9; + string filter = 9 [(google.api.field_behavior) = OPTIONAL]; // List of [Document][google.cloud.discoveryengine.v1beta.Document]s // associated with this user event. @@ -263,6 +281,16 @@ message UserEvent { // Optional. List of panels associated with this event. // Used for page-level impression data. repeated PanelInfo panels = 22 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. This field is optional except for the `add-feedback` event types. + Feedback feedback = 23 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Represents the entity for customers that may run multiple + // different entities, domains, sites or regions, for example, `Google US`, + // `Google Ads`, `Waymo`, `google.com`, `youtube.com`, etc. We recommend that + // you set `entity` to get better per-entity search, completion, and + // prediction results. + string entity = 25 [(google.api.field_behavior) = OPTIONAL]; } // Detailed page information. @@ -465,6 +493,15 @@ message DocumentInfo { // Output only. Whether the referenced Document can be found in the data // store. bool joined = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. The conversion value associated with this Document. + // Must be set if + // [UserEvent.event_type][google.cloud.discoveryengine.v1beta.UserEvent.event_type] + // is "conversion". + // + // For example, a value of 1000 signifies that 1000 seconds were spent viewing + // a Document for the `watch` conversion type. + optional float conversion_value = 7 [(google.api.field_behavior) = OPTIONAL]; } // Detailed panel information associated with a user event. diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/user_event_service.proto b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/user_event_service.proto index 5243661b67a9..f50127ac5b1f 100644 --- a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/user_event_service.proto +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/user_event_service.proto @@ -1,4 +1,4 @@ -// Copyright 2025 Google LLC +// 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. @@ -39,7 +39,10 @@ option ruby_package = "Google::Cloud::DiscoveryEngine::V1beta"; service UserEventService { option (google.api.default_host) = "discoveryengine.googleapis.com"; option (google.api.oauth_scopes) = - "https://www.googleapis.com/auth/cloud-platform"; + "https://www.googleapis.com/auth/cloud-platform," + "https://www.googleapis.com/auth/discoveryengine.assist.readwrite," + "https://www.googleapis.com/auth/discoveryengine.readwrite," + "https://www.googleapis.com/auth/discoveryengine.serving.readwrite"; // Writes a single user event. rpc WriteUserEvent(WriteUserEventRequest) returns (UserEvent) { @@ -110,6 +113,10 @@ service UserEventService { post: "/v1beta/{parent=projects/*/locations/*/collections/*/dataStores/*}/userEvents:import" body: "*" } + additional_bindings { + post: "/v1beta/{parent=projects/*/locations/*}/userEvents:import" + body: "*" + } }; option (google.longrunning.operation_info) = { response_type: "google.cloud.discoveryengine.v1beta.ImportUserEventsResponse" @@ -125,11 +132,11 @@ message WriteUserEventRequest { // [DataStore][google.cloud.discoveryengine.v1beta.DataStore] level, the // format is: // `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`. - // If the write user event action is applied in [Location][] level, for - // example, the event with - // [Document][google.cloud.discoveryengine.v1beta.Document] across multiple - // [DataStore][google.cloud.discoveryengine.v1beta.DataStore], the format is: - // `projects/{project}/locations/{location}`. + // If the write user event action is applied in + // [Location][google.cloud.location.Location] level, for example, the event + // with [Document][google.cloud.discoveryengine.v1beta.Document] across + // multiple [DataStore][google.cloud.discoveryengine.v1beta.DataStore], the + // format is: `projects/{project}/locations/{location}`. string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -147,8 +154,16 @@ message WriteUserEventRequest { // Request message for CollectUserEvent method. message CollectUserEventRequest { - // Required. The parent DataStore resource name, such as + // Required. The parent resource name. + // If the collect user event action is applied in + // [DataStore][google.cloud.discoveryengine.v1beta.DataStore] level, the + // format is: // `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`. + // If the collect user event action is applied in + // [Location][google.cloud.location.Location] level, for example, the event + // with [Document][google.cloud.discoveryengine.v1beta.Document] across + // multiple [DataStore][google.cloud.discoveryengine.v1beta.DataStore], the + // format is: `projects/{project}/locations/{location}`. string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/user_license.proto b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/user_license.proto new file mode 100644 index 000000000000..02cd62b50a42 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/user_license.proto @@ -0,0 +1,110 @@ +// 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 +// +// http://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. + +syntax = "proto3"; + +package google.cloud.discoveryengine.v1beta; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.DiscoveryEngine.V1Beta"; +option go_package = "cloud.google.com/go/discoveryengine/apiv1beta/discoveryenginepb;discoveryenginepb"; +option java_multiple_files = true; +option java_outer_classname = "UserLicenseProto"; +option java_package = "com.google.cloud.discoveryengine.v1beta"; +option objc_class_prefix = "DISCOVERYENGINE"; +option php_namespace = "Google\\Cloud\\DiscoveryEngine\\V1beta"; +option ruby_package = "Google::Cloud::DiscoveryEngine::V1beta"; + +// User License information assigned by the admin. +message UserLicense { + // License assignment state enumeration. + enum LicenseAssignmentState { + // Default value. + LICENSE_ASSIGNMENT_STATE_UNSPECIFIED = 0; + + // License assigned to the user. + ASSIGNED = 1; + + // No license assigned to the user. + // Deprecated, translated to NO_LICENSE. + UNASSIGNED = 2; + + // No license assigned to the user. + NO_LICENSE = 3; + + // User attempted to login but no license assigned to the user. + // This state is only used for no user first time login attempt but cannot + // get license assigned. + // Users already logged in but cannot get license assigned will be assigned + // NO_LICENSE state(License could be unassigned by admin). + NO_LICENSE_ATTEMPTED_LOGIN = 4; + + // User is blocked from assigning a license. + BLOCKED = 5; + } + + // Required. Immutable. The user principal of the User, could be email address + // or other prinical identifier. This field is immutable. Admin assign + // licenses based on the user principal. + string user_principal = 1 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.field_behavior) = REQUIRED + ]; + + // Optional. The user profile. + // We user user full name(First name + Last name) as user profile. + string user_profile = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. License assignment state of the user. + // If the user is assigned with a license config, the user login will be + // assigned with the license; + // If the user's license assignment state is unassigned or unspecified, no + // license config will be associated to the user; + LicenseAssignmentState license_assignment_state = 4 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. The full resource name of the Subscription(LicenseConfig) + // assigned to the user. + string license_config = 5 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.resource_reference) = { + type: "discoveryengine.googleapis.com/LicenseConfig" + } + ]; + + // Output only. User created timestamp. + google.protobuf.Timestamp create_time = 6 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. User update timestamp. + google.protobuf.Timestamp update_time = 7 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. User last logged in time. + // If the user has not logged in yet, this field will be empty. + google.protobuf.Timestamp last_login_time = 8 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Stats about users' licenses. +message LicenseConfigUsageStats { + // Required. The LicenseConfig name. + string license_config = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The number of licenses used. + int64 used_license_count = 2 [(google.api.field_behavior) = REQUIRED]; +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/user_license_service.proto b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/user_license_service.proto new file mode 100644 index 000000000000..acd2c99d9a27 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/user_license_service.proto @@ -0,0 +1,252 @@ +// 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 +// +// http://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. + +syntax = "proto3"; + +package google.cloud.discoveryengine.v1beta; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/discoveryengine/v1beta/user_license.proto"; +import "google/longrunning/operations.proto"; +import "google/protobuf/field_mask.proto"; +import "google/protobuf/timestamp.proto"; +import "google/rpc/status.proto"; + +option csharp_namespace = "Google.Cloud.DiscoveryEngine.V1Beta"; +option go_package = "cloud.google.com/go/discoveryengine/apiv1beta/discoveryenginepb;discoveryenginepb"; +option java_multiple_files = true; +option java_outer_classname = "UserLicenseServiceProto"; +option java_package = "com.google.cloud.discoveryengine.v1beta"; +option objc_class_prefix = "DISCOVERYENGINE"; +option php_namespace = "Google\\Cloud\\DiscoveryEngine\\V1beta"; +option ruby_package = "Google::Cloud::DiscoveryEngine::V1beta"; + +// Service for managing User Licenses. +service UserLicenseService { + option (google.api.default_host) = "discoveryengine.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform," + "https://www.googleapis.com/auth/discoveryengine.readwrite," + "https://www.googleapis.com/auth/discoveryengine.serving.readwrite"; + + // Lists the User Licenses. + rpc ListUserLicenses(ListUserLicensesRequest) + returns (ListUserLicensesResponse) { + option (google.api.http) = { + get: "/v1beta/{parent=projects/*/locations/*/userStores/*}/userLicenses" + }; + option (google.api.method_signature) = "parent"; + } + + // Lists all the + // [LicenseConfigUsageStats][google.cloud.discoveryengine.v1beta.LicenseConfigUsageStats]s + // associated with the project. + rpc ListLicenseConfigsUsageStats(ListLicenseConfigsUsageStatsRequest) + returns (ListLicenseConfigsUsageStatsResponse) { + option (google.api.http) = { + get: "/v1beta/{parent=projects/*/locations/*/userStores/*}/licenseConfigsUsageStats" + }; + option (google.api.method_signature) = "parent"; + } + + // Updates the User License. + // This method is used for batch assign/unassign licenses to users. + rpc BatchUpdateUserLicenses(BatchUpdateUserLicensesRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1beta/{parent=projects/*/locations/*/userStores/*}:batchUpdateUserLicenses" + body: "*" + }; + option (google.longrunning.operation_info) = { + response_type: "google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesResponse" + metadata_type: "google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesMetadata" + }; + } +} + +// Request message for +// [UserLicenseService.ListUserLicenses][google.cloud.discoveryengine.v1beta.UserLicenseService.ListUserLicenses]. +message ListUserLicensesRequest { + // Required. The parent + // [UserStore][google.cloud.discoveryengine.v1beta.UserStore] resource name, + // format: + // `projects/{project}/locations/{location}/userStores/{user_store_id}`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "discoveryengine.googleapis.com/UserStore" + } + ]; + + // Optional. Requested page size. Server may return fewer items than + // requested. If unspecified, defaults to 10. The maximum value is 50; values + // above 50 will be coerced to 50. + // + // If this field is negative, an INVALID_ARGUMENT error is returned. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A page token, received from a previous `ListUserLicenses` call. + // Provide this to retrieve the subsequent page. + // + // When paginating, all other parameters provided to `ListUserLicenses` + // must match the call that provided the page token. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Filter for the list request. + // + // Supported fields: + // + // * `license_assignment_state` + // * `user_principal` + // * + // Examples: + // + // * `license_assignment_state = ASSIGNED` to list assigned user licenses. + // * `license_assignment_state = NO_LICENSE` to list not licensed users. + // * `license_assignment_state = NO_LICENSE_ATTEMPTED_LOGIN` to list users + // who attempted login but no license assigned. + // * `license_assignment_state != NO_LICENSE_ATTEMPTED_LOGIN` to filter + // out users who attempted login but no license assigned. + // * `user_principal = user1@example.com` to list user license for + // `user1@example.com`. + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The order in which the + // [UserLicense][google.cloud.discoveryengine.v1beta.UserLicense]s are listed. + // The value must be a comma-separated list of fields. Default sorting order + // is ascending. To specify descending order for a field, append a " desc" + // suffix. Redundant space characters in the syntax are insignificant. + // + // Supported fields (only `user_principal` is supported for now): + // + // * `user_principal` + // + // If not set, the default ordering is by `user_principal`. + // + // Examples: + // + // * `user_principal` to order by `user_principal` in ascending order. + // * `user_principal desc` to order by `user_principal` in descending order. + string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response message for +// [UserLicenseService.ListUserLicenses][google.cloud.discoveryengine.v1beta.UserLicenseService.ListUserLicenses]. +message ListUserLicensesResponse { + // All the customer's + // [UserLicense][google.cloud.discoveryengine.v1beta.UserLicense]s. + repeated UserLicense user_licenses = 1; + + // A token, which can be sent as `page_token` to retrieve the next page. If + // this field is omitted, there are no subsequent pages. + string next_page_token = 2; +} + +// Request message for +// [UserLicenseService.ListLicenseConfigsUsageStats][google.cloud.discoveryengine.v1beta.UserLicenseService.ListLicenseConfigsUsageStats] +// method. +message ListLicenseConfigsUsageStatsRequest { + // Required. The parent branch resource name, such as + // `projects/{project}/locations/{location}/userStores/{user_store_id}`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "discoveryengine.googleapis.com/UserStore" + } + ]; +} + +// Response message for +// [UserLicenseService.ListLicenseConfigsUsageStats][google.cloud.discoveryengine.v1beta.UserLicenseService.ListLicenseConfigsUsageStats] +// method. +message ListLicenseConfigsUsageStatsResponse { + // All the customer's + // [LicenseConfigUsageStats][google.cloud.discoveryengine.v1beta.LicenseConfigUsageStats]. + repeated LicenseConfigUsageStats license_config_usage_stats = 1; +} + +// Request message for +// [UserLicenseService.BatchUpdateUserLicenses][google.cloud.discoveryengine.v1beta.UserLicenseService.BatchUpdateUserLicenses] +// method. +message BatchUpdateUserLicensesRequest { + // The inline source for the input config for BatchUpdateUserLicenses + // method. + message InlineSource { + // Required. A list of user licenses to update. Each user license + // must have a valid + // [UserLicense.user_principal][google.cloud.discoveryengine.v1beta.UserLicense.user_principal]. + repeated UserLicense user_licenses = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Optional. The list of fields to update. + google.protobuf.FieldMask update_mask = 2 + [(google.api.field_behavior) = OPTIONAL]; + } + + // Required. The source of the input. + oneof source { + // The inline source for the input content for document embeddings. + InlineSource inline_source = 2; + } + + // Required. The parent + // [UserStore][google.cloud.discoveryengine.v1beta.UserStore] resource name, + // format: + // `projects/{project}/locations/{location}/userStores/{user_store_id}`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "discoveryengine.googleapis.com/UserStore" + } + ]; + + // Optional. If true, if user licenses removed associated license config, the + // user license will be deleted. By default which is false, the user license + // will be updated to unassigned state. + bool delete_unassigned_user_licenses = 4 + [(google.api.field_behavior) = OPTIONAL]; +} + +// Metadata related to the progress of the +// [UserLicenseService.BatchUpdateUserLicenses][google.cloud.discoveryengine.v1beta.UserLicenseService.BatchUpdateUserLicenses] +// operation. This will be returned by the google.longrunning.Operation.metadata +// field. +message BatchUpdateUserLicensesMetadata { + // Operation create time. + google.protobuf.Timestamp create_time = 1; + + // Operation last update time. If the operation is done, this is also the + // finish time. + google.protobuf.Timestamp update_time = 2; + + // Count of user licenses successfully updated. + int64 success_count = 3; + + // Count of user licenses that failed to be updated. + int64 failure_count = 4; +} + +// Response message for +// [UserLicenseService.BatchUpdateUserLicenses][google.cloud.discoveryengine.v1beta.UserLicenseService.BatchUpdateUserLicenses] +// method. +message BatchUpdateUserLicensesResponse { + // UserLicenses successfully updated. + repeated UserLicense user_licenses = 1; + + // A sample of errors encountered while processing the request. + repeated google.rpc.Status error_samples = 2; +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/user_store.proto b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/user_store.proto new file mode 100644 index 000000000000..29fae193265f --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/user_store.proto @@ -0,0 +1,79 @@ +// 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 +// +// http://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. + +syntax = "proto3"; + +package google.cloud.discoveryengine.v1beta; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; + +option csharp_namespace = "Google.Cloud.DiscoveryEngine.V1Beta"; +option go_package = "cloud.google.com/go/discoveryengine/apiv1beta/discoveryenginepb;discoveryenginepb"; +option java_multiple_files = true; +option java_outer_classname = "UserStoreProto"; +option java_package = "com.google.cloud.discoveryengine.v1beta"; +option objc_class_prefix = "DISCOVERYENGINE"; +option php_namespace = "Google\\Cloud\\DiscoveryEngine\\V1beta"; +option ruby_package = "Google::Cloud::DiscoveryEngine::V1beta"; + +// Configures metadata that is used for End User entities. +message UserStore { + option (google.api.resource) = { + type: "discoveryengine.googleapis.com/UserStore" + pattern: "projects/{project}/locations/{location}/userStores/{user_store}" + }; + + // Immutable. The full resource name of the User Store, in the format of + // `projects/{project}/locations/{location}/userStores/{user_store}`. + // + // This field must be a UTF-8 encoded string with a length limit of 1024 + // characters. + string name = 1 [(google.api.field_behavior) = IMMUTABLE]; + + // The display name of the User Store. + string display_name = 2; + + // Optional. The default subscription + // [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig] for the + // UserStore, if + // [UserStore.enable_license_auto_register][google.cloud.discoveryengine.v1beta.UserStore.enable_license_auto_register] + // is true, new users will automatically register under the default + // subscription. + // + // If default + // [LicenseConfig][google.cloud.discoveryengine.v1beta.LicenseConfig] doesn't + // have remaining license seats left, new users will not be assigned with + // license and will be blocked for Vertex AI Search features. This is used if + // `license_assignment_tier_rules` is not configured. + string default_license_config = 5 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.resource_reference) = { + type: "discoveryengine.googleapis.com/LicenseConfig" + } + ]; + + // Optional. Whether to enable license auto register for users in this User + // Store. If true, new users will automatically register under the default + // license config as long as the default license config has seats left. + bool enable_license_auto_register = 6 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Whether to enable license auto update for users in this User + // Store. If true, users with expired licenses will automatically be updated + // to use the default license config as long as the default license config has + // seats left. + bool enable_expired_license_auto_update = 7 + [(google.api.field_behavior) = OPTIONAL]; +} diff --git a/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/user_store_service.proto b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/user_store_service.proto new file mode 100644 index 000000000000..bb3736386c03 --- /dev/null +++ b/java-discoveryengine/proto-google-cloud-discoveryengine-v1beta/src/main/proto/google/cloud/discoveryengine/v1beta/user_store_service.proto @@ -0,0 +1,87 @@ +// 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 +// +// http://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. + +syntax = "proto3"; + +package google.cloud.discoveryengine.v1beta; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/discoveryengine/v1beta/user_store.proto"; +import "google/protobuf/field_mask.proto"; + +option csharp_namespace = "Google.Cloud.DiscoveryEngine.V1Beta"; +option go_package = "cloud.google.com/go/discoveryengine/apiv1beta/discoveryenginepb;discoveryenginepb"; +option java_multiple_files = true; +option java_outer_classname = "UserStoreServiceProto"; +option java_package = "com.google.cloud.discoveryengine.v1beta"; +option objc_class_prefix = "DISCOVERYENGINE"; +option php_namespace = "Google\\Cloud\\DiscoveryEngine\\V1beta"; +option ruby_package = "Google::Cloud::DiscoveryEngine::V1beta"; + +// Service for managing User Stores. +service UserStoreService { + option (google.api.default_host) = "discoveryengine.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform," + "https://www.googleapis.com/auth/discoveryengine.readwrite," + "https://www.googleapis.com/auth/discoveryengine.serving.readwrite"; + + // Gets the User Store. + rpc GetUserStore(GetUserStoreRequest) returns (UserStore) { + option (google.api.http) = { + get: "/v1beta/{name=projects/*/locations/*/userStores/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Updates the User Store. + rpc UpdateUserStore(UpdateUserStoreRequest) returns (UserStore) { + option (google.api.http) = { + patch: "/v1beta/{user_store.name=projects/*/locations/*/userStores/*}" + body: "user_store" + }; + option (google.api.method_signature) = "user_store,update_mask"; + } +} + +// Request message for +// [UserStoreService.GetUserStore][google.cloud.discoveryengine.v1beta.UserStoreService.GetUserStore] +message GetUserStoreRequest { + // Required. The name of the User Store to get. + // Format: + // `projects/{project}/locations/{location}/userStores/{user_store_id}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "discoveryengine.googleapis.com/UserStore" + } + ]; +} + +// Request message for +// [UserStoreService.UpdateUserStore][google.cloud.discoveryengine.v1beta.UserStoreService.UpdateUserStore] +// method. +message UpdateUserStoreRequest { + // Required. The User Store to update. + // Format: + // `projects/{project}/locations/{location}/userStores/{user_store_id}` + UserStore user_store = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The list of fields to update. + google.protobuf.FieldMask update_mask = 2 + [(google.api.field_behavior) = OPTIONAL]; +} diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/aclconfigservice/create/SyncCreateSetCredentialsProvider.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/aclconfigservice/create/SyncCreateSetCredentialsProvider.java new file mode 100644 index 000000000000..fb805f41c91a --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/aclconfigservice/create/SyncCreateSetCredentialsProvider.java @@ -0,0 +1,45 @@ +/* + * 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.discoveryengine.v1beta.samples; + +// [START discoveryengine_v1beta_generated_AclConfigService_Create_SetCredentialsProvider_sync] +import com.google.api.gax.core.FixedCredentialsProvider; +import com.google.cloud.discoveryengine.v1beta.AclConfigServiceClient; +import com.google.cloud.discoveryengine.v1beta.AclConfigServiceSettings; +import com.google.cloud.discoveryengine.v1beta.myCredentials; + +public class SyncCreateSetCredentialsProvider { + + public static void main(String[] args) throws Exception { + syncCreateSetCredentialsProvider(); + } + + public static void syncCreateSetCredentialsProvider() 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 + AclConfigServiceSettings aclConfigServiceSettings = + AclConfigServiceSettings.newBuilder() + .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) + .build(); + AclConfigServiceClient aclConfigServiceClient = + AclConfigServiceClient.create(aclConfigServiceSettings); + } +} +// [END discoveryengine_v1beta_generated_AclConfigService_Create_SetCredentialsProvider_sync] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/aclconfigservice/create/SyncCreateSetEndpoint.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/aclconfigservice/create/SyncCreateSetEndpoint.java new file mode 100644 index 000000000000..6f99ddc18d67 --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/aclconfigservice/create/SyncCreateSetEndpoint.java @@ -0,0 +1,42 @@ +/* + * 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.discoveryengine.v1beta.samples; + +// [START discoveryengine_v1beta_generated_AclConfigService_Create_SetEndpoint_sync] +import com.google.cloud.discoveryengine.v1beta.AclConfigServiceClient; +import com.google.cloud.discoveryengine.v1beta.AclConfigServiceSettings; +import com.google.cloud.discoveryengine.v1beta.myEndpoint; + +public class SyncCreateSetEndpoint { + + public static void main(String[] args) throws Exception { + syncCreateSetEndpoint(); + } + + public static void syncCreateSetEndpoint() 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 + AclConfigServiceSettings aclConfigServiceSettings = + AclConfigServiceSettings.newBuilder().setEndpoint(myEndpoint).build(); + AclConfigServiceClient aclConfigServiceClient = + AclConfigServiceClient.create(aclConfigServiceSettings); + } +} +// [END discoveryengine_v1beta_generated_AclConfigService_Create_SetEndpoint_sync] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/aclconfigservice/create/SyncCreateUseHttpJsonTransport.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/aclconfigservice/create/SyncCreateUseHttpJsonTransport.java new file mode 100644 index 000000000000..0a26b171fed0 --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/aclconfigservice/create/SyncCreateUseHttpJsonTransport.java @@ -0,0 +1,41 @@ +/* + * 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.discoveryengine.v1beta.samples; + +// [START discoveryengine_v1beta_generated_AclConfigService_Create_UseHttpJsonTransport_sync] +import com.google.cloud.discoveryengine.v1beta.AclConfigServiceClient; +import com.google.cloud.discoveryengine.v1beta.AclConfigServiceSettings; + +public class SyncCreateUseHttpJsonTransport { + + public static void main(String[] args) throws Exception { + syncCreateUseHttpJsonTransport(); + } + + public static void syncCreateUseHttpJsonTransport() 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 + AclConfigServiceSettings aclConfigServiceSettings = + AclConfigServiceSettings.newHttpJsonBuilder().build(); + AclConfigServiceClient aclConfigServiceClient = + AclConfigServiceClient.create(aclConfigServiceSettings); + } +} +// [END discoveryengine_v1beta_generated_AclConfigService_Create_UseHttpJsonTransport_sync] diff --git a/java-oracledatabase/samples/snippets/generated/com/google/cloud/oracledatabase/v1/oracledatabase/getgoldengateconnectiontype/SyncGetGoldengateConnectionTypeGoldengateconnectiontypename.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/aclconfigservice/getaclconfig/AsyncGetAclConfig.java similarity index 50% rename from java-oracledatabase/samples/snippets/generated/com/google/cloud/oracledatabase/v1/oracledatabase/getgoldengateconnectiontype/SyncGetGoldengateConnectionTypeGoldengateconnectiontypename.java rename to java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/aclconfigservice/getaclconfig/AsyncGetAclConfig.java index 11670afd3851..71e4e3e26cb0 100644 --- a/java-oracledatabase/samples/snippets/generated/com/google/cloud/oracledatabase/v1/oracledatabase/getgoldengateconnectiontype/SyncGetGoldengateConnectionTypeGoldengateconnectiontypename.java +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/aclconfigservice/getaclconfig/AsyncGetAclConfig.java @@ -14,32 +14,37 @@ * limitations under the License. */ -package com.google.cloud.oracledatabase.v1.samples; +package com.google.cloud.discoveryengine.v1beta.samples; -// [START oracledatabase_v1_generated_OracleDatabase_GetGoldengateConnectionType_Goldengateconnectiontypename_sync] -import com.google.cloud.oracledatabase.v1.GoldengateConnectionType; -import com.google.cloud.oracledatabase.v1.GoldengateConnectionTypeName; -import com.google.cloud.oracledatabase.v1.OracleDatabaseClient; +// [START discoveryengine_v1beta_generated_AclConfigService_GetAclConfig_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.discoveryengine.v1beta.AclConfig; +import com.google.cloud.discoveryengine.v1beta.AclConfigName; +import com.google.cloud.discoveryengine.v1beta.AclConfigServiceClient; +import com.google.cloud.discoveryengine.v1beta.GetAclConfigRequest; -public class SyncGetGoldengateConnectionTypeGoldengateconnectiontypename { +public class AsyncGetAclConfig { public static void main(String[] args) throws Exception { - syncGetGoldengateConnectionTypeGoldengateconnectiontypename(); + asyncGetAclConfig(); } - public static void syncGetGoldengateConnectionTypeGoldengateconnectiontypename() - throws Exception { + public static void asyncGetAclConfig() 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 (OracleDatabaseClient oracleDatabaseClient = OracleDatabaseClient.create()) { - GoldengateConnectionTypeName name = - GoldengateConnectionTypeName.of( - "[PROJECT]", "[LOCATION]", "[GOLDENGATE_CONNECTION_TYPE]"); - GoldengateConnectionType response = oracleDatabaseClient.getGoldengateConnectionType(name); + try (AclConfigServiceClient aclConfigServiceClient = AclConfigServiceClient.create()) { + GetAclConfigRequest request = + GetAclConfigRequest.newBuilder() + .setName(AclConfigName.of("[PROJECT]", "[LOCATION]").toString()) + .build(); + ApiFuture future = + aclConfigServiceClient.getAclConfigCallable().futureCall(request); + // Do something. + AclConfig response = future.get(); } } } -// [END oracledatabase_v1_generated_OracleDatabase_GetGoldengateConnectionType_Goldengateconnectiontypename_sync] +// [END discoveryengine_v1beta_generated_AclConfigService_GetAclConfig_async] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/aclconfigservice/getaclconfig/SyncGetAclConfig.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/aclconfigservice/getaclconfig/SyncGetAclConfig.java new file mode 100644 index 000000000000..f3c3a4d4c9f8 --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/aclconfigservice/getaclconfig/SyncGetAclConfig.java @@ -0,0 +1,46 @@ +/* + * 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.discoveryengine.v1beta.samples; + +// [START discoveryengine_v1beta_generated_AclConfigService_GetAclConfig_sync] +import com.google.cloud.discoveryengine.v1beta.AclConfig; +import com.google.cloud.discoveryengine.v1beta.AclConfigName; +import com.google.cloud.discoveryengine.v1beta.AclConfigServiceClient; +import com.google.cloud.discoveryengine.v1beta.GetAclConfigRequest; + +public class SyncGetAclConfig { + + public static void main(String[] args) throws Exception { + syncGetAclConfig(); + } + + public static void syncGetAclConfig() 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 (AclConfigServiceClient aclConfigServiceClient = AclConfigServiceClient.create()) { + GetAclConfigRequest request = + GetAclConfigRequest.newBuilder() + .setName(AclConfigName.of("[PROJECT]", "[LOCATION]").toString()) + .build(); + AclConfig response = aclConfigServiceClient.getAclConfig(request); + } + } +} +// [END discoveryengine_v1beta_generated_AclConfigService_GetAclConfig_sync] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/aclconfigservice/getaclconfig/SyncGetAclConfigAclconfigname.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/aclconfigservice/getaclconfig/SyncGetAclConfigAclconfigname.java new file mode 100644 index 000000000000..d15d84e5910e --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/aclconfigservice/getaclconfig/SyncGetAclConfigAclconfigname.java @@ -0,0 +1,42 @@ +/* + * 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.discoveryengine.v1beta.samples; + +// [START discoveryengine_v1beta_generated_AclConfigService_GetAclConfig_Aclconfigname_sync] +import com.google.cloud.discoveryengine.v1beta.AclConfig; +import com.google.cloud.discoveryengine.v1beta.AclConfigName; +import com.google.cloud.discoveryengine.v1beta.AclConfigServiceClient; + +public class SyncGetAclConfigAclconfigname { + + public static void main(String[] args) throws Exception { + syncGetAclConfigAclconfigname(); + } + + public static void syncGetAclConfigAclconfigname() 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 (AclConfigServiceClient aclConfigServiceClient = AclConfigServiceClient.create()) { + AclConfigName name = AclConfigName.of("[PROJECT]", "[LOCATION]"); + AclConfig response = aclConfigServiceClient.getAclConfig(name); + } + } +} +// [END discoveryengine_v1beta_generated_AclConfigService_GetAclConfig_Aclconfigname_sync] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/aclconfigservice/getaclconfig/SyncGetAclConfigString.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/aclconfigservice/getaclconfig/SyncGetAclConfigString.java new file mode 100644 index 000000000000..55e8b44bc789 --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/aclconfigservice/getaclconfig/SyncGetAclConfigString.java @@ -0,0 +1,42 @@ +/* + * 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.discoveryengine.v1beta.samples; + +// [START discoveryengine_v1beta_generated_AclConfigService_GetAclConfig_String_sync] +import com.google.cloud.discoveryengine.v1beta.AclConfig; +import com.google.cloud.discoveryengine.v1beta.AclConfigName; +import com.google.cloud.discoveryengine.v1beta.AclConfigServiceClient; + +public class SyncGetAclConfigString { + + public static void main(String[] args) throws Exception { + syncGetAclConfigString(); + } + + public static void syncGetAclConfigString() 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 (AclConfigServiceClient aclConfigServiceClient = AclConfigServiceClient.create()) { + String name = AclConfigName.of("[PROJECT]", "[LOCATION]").toString(); + AclConfig response = aclConfigServiceClient.getAclConfig(name); + } + } +} +// [END discoveryengine_v1beta_generated_AclConfigService_GetAclConfig_String_sync] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/aclconfigservice/updateaclconfig/AsyncUpdateAclConfig.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/aclconfigservice/updateaclconfig/AsyncUpdateAclConfig.java new file mode 100644 index 000000000000..c6945f9d4ef3 --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/aclconfigservice/updateaclconfig/AsyncUpdateAclConfig.java @@ -0,0 +1,47 @@ +/* + * 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.discoveryengine.v1beta.samples; + +// [START discoveryengine_v1beta_generated_AclConfigService_UpdateAclConfig_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.discoveryengine.v1beta.AclConfig; +import com.google.cloud.discoveryengine.v1beta.AclConfigServiceClient; +import com.google.cloud.discoveryengine.v1beta.UpdateAclConfigRequest; + +public class AsyncUpdateAclConfig { + + public static void main(String[] args) throws Exception { + asyncUpdateAclConfig(); + } + + public static void asyncUpdateAclConfig() 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 (AclConfigServiceClient aclConfigServiceClient = AclConfigServiceClient.create()) { + UpdateAclConfigRequest request = + UpdateAclConfigRequest.newBuilder().setAclConfig(AclConfig.newBuilder().build()).build(); + ApiFuture future = + aclConfigServiceClient.updateAclConfigCallable().futureCall(request); + // Do something. + AclConfig response = future.get(); + } + } +} +// [END discoveryengine_v1beta_generated_AclConfigService_UpdateAclConfig_async] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/aclconfigservice/updateaclconfig/SyncUpdateAclConfig.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/aclconfigservice/updateaclconfig/SyncUpdateAclConfig.java new file mode 100644 index 000000000000..af29f5bcc7a4 --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/aclconfigservice/updateaclconfig/SyncUpdateAclConfig.java @@ -0,0 +1,43 @@ +/* + * 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.discoveryengine.v1beta.samples; + +// [START discoveryengine_v1beta_generated_AclConfigService_UpdateAclConfig_sync] +import com.google.cloud.discoveryengine.v1beta.AclConfig; +import com.google.cloud.discoveryengine.v1beta.AclConfigServiceClient; +import com.google.cloud.discoveryengine.v1beta.UpdateAclConfigRequest; + +public class SyncUpdateAclConfig { + + public static void main(String[] args) throws Exception { + syncUpdateAclConfig(); + } + + public static void syncUpdateAclConfig() 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 (AclConfigServiceClient aclConfigServiceClient = AclConfigServiceClient.create()) { + UpdateAclConfigRequest request = + UpdateAclConfigRequest.newBuilder().setAclConfig(AclConfig.newBuilder().build()).build(); + AclConfig response = aclConfigServiceClient.updateAclConfig(request); + } + } +} +// [END discoveryengine_v1beta_generated_AclConfigService_UpdateAclConfig_sync] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/aclconfigservicesettings/updateaclconfig/SyncUpdateAclConfig.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/aclconfigservicesettings/updateaclconfig/SyncUpdateAclConfig.java new file mode 100644 index 000000000000..322965a74d1e --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/aclconfigservicesettings/updateaclconfig/SyncUpdateAclConfig.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.cloud.discoveryengine.v1beta.samples; + +// [START discoveryengine_v1beta_generated_AclConfigServiceSettings_UpdateAclConfig_sync] +import com.google.cloud.discoveryengine.v1beta.AclConfigServiceSettings; +import java.time.Duration; + +public class SyncUpdateAclConfig { + + public static void main(String[] args) throws Exception { + syncUpdateAclConfig(); + } + + public static void syncUpdateAclConfig() 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 + AclConfigServiceSettings.Builder aclConfigServiceSettingsBuilder = + AclConfigServiceSettings.newBuilder(); + aclConfigServiceSettingsBuilder + .updateAclConfigSettings() + .setRetrySettings( + aclConfigServiceSettingsBuilder + .updateAclConfigSettings() + .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()); + AclConfigServiceSettings aclConfigServiceSettings = aclConfigServiceSettingsBuilder.build(); + } +} +// [END discoveryengine_v1beta_generated_AclConfigServiceSettings_UpdateAclConfig_sync] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/assistantservice/create/SyncCreateSetCredentialsProvider.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/assistantservice/create/SyncCreateSetCredentialsProvider.java new file mode 100644 index 000000000000..daeeddcb5c28 --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/assistantservice/create/SyncCreateSetCredentialsProvider.java @@ -0,0 +1,45 @@ +/* + * 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.discoveryengine.v1beta.samples; + +// [START discoveryengine_v1beta_generated_AssistantService_Create_SetCredentialsProvider_sync] +import com.google.api.gax.core.FixedCredentialsProvider; +import com.google.cloud.discoveryengine.v1beta.AssistantServiceClient; +import com.google.cloud.discoveryengine.v1beta.AssistantServiceSettings; +import com.google.cloud.discoveryengine.v1beta.myCredentials; + +public class SyncCreateSetCredentialsProvider { + + public static void main(String[] args) throws Exception { + syncCreateSetCredentialsProvider(); + } + + public static void syncCreateSetCredentialsProvider() 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 + AssistantServiceSettings assistantServiceSettings = + AssistantServiceSettings.newBuilder() + .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) + .build(); + AssistantServiceClient assistantServiceClient = + AssistantServiceClient.create(assistantServiceSettings); + } +} +// [END discoveryengine_v1beta_generated_AssistantService_Create_SetCredentialsProvider_sync] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/assistantservice/create/SyncCreateSetEndpoint.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/assistantservice/create/SyncCreateSetEndpoint.java new file mode 100644 index 000000000000..29df326a40ae --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/assistantservice/create/SyncCreateSetEndpoint.java @@ -0,0 +1,42 @@ +/* + * 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.discoveryengine.v1beta.samples; + +// [START discoveryengine_v1beta_generated_AssistantService_Create_SetEndpoint_sync] +import com.google.cloud.discoveryengine.v1beta.AssistantServiceClient; +import com.google.cloud.discoveryengine.v1beta.AssistantServiceSettings; +import com.google.cloud.discoveryengine.v1beta.myEndpoint; + +public class SyncCreateSetEndpoint { + + public static void main(String[] args) throws Exception { + syncCreateSetEndpoint(); + } + + public static void syncCreateSetEndpoint() 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 + AssistantServiceSettings assistantServiceSettings = + AssistantServiceSettings.newBuilder().setEndpoint(myEndpoint).build(); + AssistantServiceClient assistantServiceClient = + AssistantServiceClient.create(assistantServiceSettings); + } +} +// [END discoveryengine_v1beta_generated_AssistantService_Create_SetEndpoint_sync] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/assistantservice/create/SyncCreateUseHttpJsonTransport.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/assistantservice/create/SyncCreateUseHttpJsonTransport.java new file mode 100644 index 000000000000..4e9387a34825 --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/assistantservice/create/SyncCreateUseHttpJsonTransport.java @@ -0,0 +1,41 @@ +/* + * 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.discoveryengine.v1beta.samples; + +// [START discoveryengine_v1beta_generated_AssistantService_Create_UseHttpJsonTransport_sync] +import com.google.cloud.discoveryengine.v1beta.AssistantServiceClient; +import com.google.cloud.discoveryengine.v1beta.AssistantServiceSettings; + +public class SyncCreateUseHttpJsonTransport { + + public static void main(String[] args) throws Exception { + syncCreateUseHttpJsonTransport(); + } + + public static void syncCreateUseHttpJsonTransport() 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 + AssistantServiceSettings assistantServiceSettings = + AssistantServiceSettings.newHttpJsonBuilder().build(); + AssistantServiceClient assistantServiceClient = + AssistantServiceClient.create(assistantServiceSettings); + } +} +// [END discoveryengine_v1beta_generated_AssistantService_Create_UseHttpJsonTransport_sync] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/assistantservice/createassistant/AsyncCreateAssistant.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/assistantservice/createassistant/AsyncCreateAssistant.java new file mode 100644 index 000000000000..8ed37aff4183 --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/assistantservice/createassistant/AsyncCreateAssistant.java @@ -0,0 +1,53 @@ +/* + * 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.discoveryengine.v1beta.samples; + +// [START discoveryengine_v1beta_generated_AssistantService_CreateAssistant_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.discoveryengine.v1beta.Assistant; +import com.google.cloud.discoveryengine.v1beta.AssistantServiceClient; +import com.google.cloud.discoveryengine.v1beta.CreateAssistantRequest; +import com.google.cloud.discoveryengine.v1beta.EngineName; + +public class AsyncCreateAssistant { + + public static void main(String[] args) throws Exception { + asyncCreateAssistant(); + } + + public static void asyncCreateAssistant() 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 (AssistantServiceClient assistantServiceClient = AssistantServiceClient.create()) { + CreateAssistantRequest request = + CreateAssistantRequest.newBuilder() + .setParent( + EngineName.of("[PROJECT]", "[LOCATION]", "[COLLECTION]", "[ENGINE]").toString()) + .setAssistant(Assistant.newBuilder().build()) + .setAssistantId("assistantId-324518759") + .build(); + ApiFuture future = + assistantServiceClient.createAssistantCallable().futureCall(request); + // Do something. + Assistant response = future.get(); + } + } +} +// [END discoveryengine_v1beta_generated_AssistantService_CreateAssistant_async] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/assistantservice/createassistant/SyncCreateAssistant.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/assistantservice/createassistant/SyncCreateAssistant.java new file mode 100644 index 000000000000..a2889b973de4 --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/assistantservice/createassistant/SyncCreateAssistant.java @@ -0,0 +1,49 @@ +/* + * 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.discoveryengine.v1beta.samples; + +// [START discoveryengine_v1beta_generated_AssistantService_CreateAssistant_sync] +import com.google.cloud.discoveryengine.v1beta.Assistant; +import com.google.cloud.discoveryengine.v1beta.AssistantServiceClient; +import com.google.cloud.discoveryengine.v1beta.CreateAssistantRequest; +import com.google.cloud.discoveryengine.v1beta.EngineName; + +public class SyncCreateAssistant { + + public static void main(String[] args) throws Exception { + syncCreateAssistant(); + } + + public static void syncCreateAssistant() 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 (AssistantServiceClient assistantServiceClient = AssistantServiceClient.create()) { + CreateAssistantRequest request = + CreateAssistantRequest.newBuilder() + .setParent( + EngineName.of("[PROJECT]", "[LOCATION]", "[COLLECTION]", "[ENGINE]").toString()) + .setAssistant(Assistant.newBuilder().build()) + .setAssistantId("assistantId-324518759") + .build(); + Assistant response = assistantServiceClient.createAssistant(request); + } + } +} +// [END discoveryengine_v1beta_generated_AssistantService_CreateAssistant_sync] diff --git a/java-oracledatabase/samples/snippets/generated/com/google/cloud/oracledatabase/v1/oracledatabase/getgoldengatedeploymenttype/SyncGetGoldengateDeploymentType.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/assistantservice/deleteassistant/AsyncDeleteAssistant.java similarity index 51% rename from java-oracledatabase/samples/snippets/generated/com/google/cloud/oracledatabase/v1/oracledatabase/getgoldengatedeploymenttype/SyncGetGoldengateDeploymentType.java rename to java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/assistantservice/deleteassistant/AsyncDeleteAssistant.java index 4dc15cadf59c..31a7339ec037 100644 --- a/java-oracledatabase/samples/snippets/generated/com/google/cloud/oracledatabase/v1/oracledatabase/getgoldengatedeploymenttype/SyncGetGoldengateDeploymentType.java +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/assistantservice/deleteassistant/AsyncDeleteAssistant.java @@ -14,36 +14,40 @@ * limitations under the License. */ -package com.google.cloud.oracledatabase.v1.samples; +package com.google.cloud.discoveryengine.v1beta.samples; -// [START oracledatabase_v1_generated_OracleDatabase_GetGoldengateDeploymentType_sync] -import com.google.cloud.oracledatabase.v1.GetGoldengateDeploymentTypeRequest; -import com.google.cloud.oracledatabase.v1.GoldengateDeploymentType; -import com.google.cloud.oracledatabase.v1.GoldengateDeploymentTypeName; -import com.google.cloud.oracledatabase.v1.OracleDatabaseClient; +// [START discoveryengine_v1beta_generated_AssistantService_DeleteAssistant_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.discoveryengine.v1beta.AssistantName; +import com.google.cloud.discoveryengine.v1beta.AssistantServiceClient; +import com.google.cloud.discoveryengine.v1beta.DeleteAssistantRequest; +import com.google.protobuf.Empty; -public class SyncGetGoldengateDeploymentType { +public class AsyncDeleteAssistant { public static void main(String[] args) throws Exception { - syncGetGoldengateDeploymentType(); + asyncDeleteAssistant(); } - public static void syncGetGoldengateDeploymentType() throws Exception { + public static void asyncDeleteAssistant() 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 (OracleDatabaseClient oracleDatabaseClient = OracleDatabaseClient.create()) { - GetGoldengateDeploymentTypeRequest request = - GetGoldengateDeploymentTypeRequest.newBuilder() + try (AssistantServiceClient assistantServiceClient = AssistantServiceClient.create()) { + DeleteAssistantRequest request = + DeleteAssistantRequest.newBuilder() .setName( - GoldengateDeploymentTypeName.of( - "[PROJECT]", "[LOCATION]", "[GOLDENGATE_DEPLOYMENT_TYPE]") + AssistantName.of( + "[PROJECT]", "[LOCATION]", "[COLLECTION]", "[ENGINE]", "[ASSISTANT]") .toString()) .build(); - GoldengateDeploymentType response = oracleDatabaseClient.getGoldengateDeploymentType(request); + ApiFuture future = + assistantServiceClient.deleteAssistantCallable().futureCall(request); + // Do something. + future.get(); } } } -// [END oracledatabase_v1_generated_OracleDatabase_GetGoldengateDeploymentType_sync] +// [END discoveryengine_v1beta_generated_AssistantService_DeleteAssistant_async] diff --git a/java-oracledatabase/samples/snippets/generated/com/google/cloud/oracledatabase/v1/oracledatabase/getgoldengateconnectiontype/SyncGetGoldengateConnectionType.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/assistantservice/deleteassistant/SyncDeleteAssistant.java similarity index 51% rename from java-oracledatabase/samples/snippets/generated/com/google/cloud/oracledatabase/v1/oracledatabase/getgoldengateconnectiontype/SyncGetGoldengateConnectionType.java rename to java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/assistantservice/deleteassistant/SyncDeleteAssistant.java index 529305f5b570..606dd0a14ca8 100644 --- a/java-oracledatabase/samples/snippets/generated/com/google/cloud/oracledatabase/v1/oracledatabase/getgoldengateconnectiontype/SyncGetGoldengateConnectionType.java +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/assistantservice/deleteassistant/SyncDeleteAssistant.java @@ -14,36 +14,36 @@ * limitations under the License. */ -package com.google.cloud.oracledatabase.v1.samples; +package com.google.cloud.discoveryengine.v1beta.samples; -// [START oracledatabase_v1_generated_OracleDatabase_GetGoldengateConnectionType_sync] -import com.google.cloud.oracledatabase.v1.GetGoldengateConnectionTypeRequest; -import com.google.cloud.oracledatabase.v1.GoldengateConnectionType; -import com.google.cloud.oracledatabase.v1.GoldengateConnectionTypeName; -import com.google.cloud.oracledatabase.v1.OracleDatabaseClient; +// [START discoveryengine_v1beta_generated_AssistantService_DeleteAssistant_sync] +import com.google.cloud.discoveryengine.v1beta.AssistantName; +import com.google.cloud.discoveryengine.v1beta.AssistantServiceClient; +import com.google.cloud.discoveryengine.v1beta.DeleteAssistantRequest; +import com.google.protobuf.Empty; -public class SyncGetGoldengateConnectionType { +public class SyncDeleteAssistant { public static void main(String[] args) throws Exception { - syncGetGoldengateConnectionType(); + syncDeleteAssistant(); } - public static void syncGetGoldengateConnectionType() throws Exception { + public static void syncDeleteAssistant() 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 (OracleDatabaseClient oracleDatabaseClient = OracleDatabaseClient.create()) { - GetGoldengateConnectionTypeRequest request = - GetGoldengateConnectionTypeRequest.newBuilder() + try (AssistantServiceClient assistantServiceClient = AssistantServiceClient.create()) { + DeleteAssistantRequest request = + DeleteAssistantRequest.newBuilder() .setName( - GoldengateConnectionTypeName.of( - "[PROJECT]", "[LOCATION]", "[GOLDENGATE_CONNECTION_TYPE]") + AssistantName.of( + "[PROJECT]", "[LOCATION]", "[COLLECTION]", "[ENGINE]", "[ASSISTANT]") .toString()) .build(); - GoldengateConnectionType response = oracleDatabaseClient.getGoldengateConnectionType(request); + assistantServiceClient.deleteAssistant(request); } } } -// [END oracledatabase_v1_generated_OracleDatabase_GetGoldengateConnectionType_sync] +// [END discoveryengine_v1beta_generated_AssistantService_DeleteAssistant_sync] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/assistantservice/deleteassistant/SyncDeleteAssistantAssistantname.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/assistantservice/deleteassistant/SyncDeleteAssistantAssistantname.java new file mode 100644 index 000000000000..f295c3d0dc36 --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/assistantservice/deleteassistant/SyncDeleteAssistantAssistantname.java @@ -0,0 +1,43 @@ +/* + * 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.discoveryengine.v1beta.samples; + +// [START discoveryengine_v1beta_generated_AssistantService_DeleteAssistant_Assistantname_sync] +import com.google.cloud.discoveryengine.v1beta.AssistantName; +import com.google.cloud.discoveryengine.v1beta.AssistantServiceClient; +import com.google.protobuf.Empty; + +public class SyncDeleteAssistantAssistantname { + + public static void main(String[] args) throws Exception { + syncDeleteAssistantAssistantname(); + } + + public static void syncDeleteAssistantAssistantname() 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 (AssistantServiceClient assistantServiceClient = AssistantServiceClient.create()) { + AssistantName name = + AssistantName.of("[PROJECT]", "[LOCATION]", "[COLLECTION]", "[ENGINE]", "[ASSISTANT]"); + assistantServiceClient.deleteAssistant(name); + } + } +} +// [END discoveryengine_v1beta_generated_AssistantService_DeleteAssistant_Assistantname_sync] diff --git a/java-oracledatabase/samples/snippets/generated/com/google/cloud/oracledatabase/v1/oracledatabase/getgoldengateconnectiontype/SyncGetGoldengateConnectionTypeString.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/assistantservice/deleteassistant/SyncDeleteAssistantString.java similarity index 55% rename from java-oracledatabase/samples/snippets/generated/com/google/cloud/oracledatabase/v1/oracledatabase/getgoldengateconnectiontype/SyncGetGoldengateConnectionTypeString.java rename to java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/assistantservice/deleteassistant/SyncDeleteAssistantString.java index 7451654f75dd..9991cd96f47d 100644 --- a/java-oracledatabase/samples/snippets/generated/com/google/cloud/oracledatabase/v1/oracledatabase/getgoldengateconnectiontype/SyncGetGoldengateConnectionTypeString.java +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/assistantservice/deleteassistant/SyncDeleteAssistantString.java @@ -14,31 +14,31 @@ * limitations under the License. */ -package com.google.cloud.oracledatabase.v1.samples; +package com.google.cloud.discoveryengine.v1beta.samples; -// [START oracledatabase_v1_generated_OracleDatabase_GetGoldengateConnectionType_String_sync] -import com.google.cloud.oracledatabase.v1.GoldengateConnectionType; -import com.google.cloud.oracledatabase.v1.GoldengateConnectionTypeName; -import com.google.cloud.oracledatabase.v1.OracleDatabaseClient; +// [START discoveryengine_v1beta_generated_AssistantService_DeleteAssistant_String_sync] +import com.google.cloud.discoveryengine.v1beta.AssistantName; +import com.google.cloud.discoveryengine.v1beta.AssistantServiceClient; +import com.google.protobuf.Empty; -public class SyncGetGoldengateConnectionTypeString { +public class SyncDeleteAssistantString { public static void main(String[] args) throws Exception { - syncGetGoldengateConnectionTypeString(); + syncDeleteAssistantString(); } - public static void syncGetGoldengateConnectionTypeString() throws Exception { + public static void syncDeleteAssistantString() 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 (OracleDatabaseClient oracleDatabaseClient = OracleDatabaseClient.create()) { + try (AssistantServiceClient assistantServiceClient = AssistantServiceClient.create()) { String name = - GoldengateConnectionTypeName.of("[PROJECT]", "[LOCATION]", "[GOLDENGATE_CONNECTION_TYPE]") + AssistantName.of("[PROJECT]", "[LOCATION]", "[COLLECTION]", "[ENGINE]", "[ASSISTANT]") .toString(); - GoldengateConnectionType response = oracleDatabaseClient.getGoldengateConnectionType(name); + assistantServiceClient.deleteAssistant(name); } } } -// [END oracledatabase_v1_generated_OracleDatabase_GetGoldengateConnectionType_String_sync] +// [END discoveryengine_v1beta_generated_AssistantService_DeleteAssistant_String_sync] diff --git a/java-oracledatabase/samples/snippets/generated/com/google/cloud/oracledatabase/v1/oracledatabase/getgoldengatedeploymenttype/AsyncGetGoldengateDeploymentType.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/assistantservice/getassistant/AsyncGetAssistant.java similarity index 50% rename from java-oracledatabase/samples/snippets/generated/com/google/cloud/oracledatabase/v1/oracledatabase/getgoldengatedeploymenttype/AsyncGetGoldengateDeploymentType.java rename to java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/assistantservice/getassistant/AsyncGetAssistant.java index ee51970a8cf1..de5bb6c33b9f 100644 --- a/java-oracledatabase/samples/snippets/generated/com/google/cloud/oracledatabase/v1/oracledatabase/getgoldengatedeploymenttype/AsyncGetGoldengateDeploymentType.java +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/assistantservice/getassistant/AsyncGetAssistant.java @@ -14,40 +14,40 @@ * limitations under the License. */ -package com.google.cloud.oracledatabase.v1.samples; +package com.google.cloud.discoveryengine.v1beta.samples; -// [START oracledatabase_v1_generated_OracleDatabase_GetGoldengateDeploymentType_async] +// [START discoveryengine_v1beta_generated_AssistantService_GetAssistant_async] import com.google.api.core.ApiFuture; -import com.google.cloud.oracledatabase.v1.GetGoldengateDeploymentTypeRequest; -import com.google.cloud.oracledatabase.v1.GoldengateDeploymentType; -import com.google.cloud.oracledatabase.v1.GoldengateDeploymentTypeName; -import com.google.cloud.oracledatabase.v1.OracleDatabaseClient; +import com.google.cloud.discoveryengine.v1beta.Assistant; +import com.google.cloud.discoveryengine.v1beta.AssistantName; +import com.google.cloud.discoveryengine.v1beta.AssistantServiceClient; +import com.google.cloud.discoveryengine.v1beta.GetAssistantRequest; -public class AsyncGetGoldengateDeploymentType { +public class AsyncGetAssistant { public static void main(String[] args) throws Exception { - asyncGetGoldengateDeploymentType(); + asyncGetAssistant(); } - public static void asyncGetGoldengateDeploymentType() throws Exception { + public static void asyncGetAssistant() 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 (OracleDatabaseClient oracleDatabaseClient = OracleDatabaseClient.create()) { - GetGoldengateDeploymentTypeRequest request = - GetGoldengateDeploymentTypeRequest.newBuilder() + try (AssistantServiceClient assistantServiceClient = AssistantServiceClient.create()) { + GetAssistantRequest request = + GetAssistantRequest.newBuilder() .setName( - GoldengateDeploymentTypeName.of( - "[PROJECT]", "[LOCATION]", "[GOLDENGATE_DEPLOYMENT_TYPE]") + AssistantName.of( + "[PROJECT]", "[LOCATION]", "[COLLECTION]", "[ENGINE]", "[ASSISTANT]") .toString()) .build(); - ApiFuture future = - oracleDatabaseClient.getGoldengateDeploymentTypeCallable().futureCall(request); + ApiFuture future = + assistantServiceClient.getAssistantCallable().futureCall(request); // Do something. - GoldengateDeploymentType response = future.get(); + Assistant response = future.get(); } } } -// [END oracledatabase_v1_generated_OracleDatabase_GetGoldengateDeploymentType_async] +// [END discoveryengine_v1beta_generated_AssistantService_GetAssistant_async] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/assistantservice/getassistant/SyncGetAssistant.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/assistantservice/getassistant/SyncGetAssistant.java new file mode 100644 index 000000000000..69640e794db6 --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/assistantservice/getassistant/SyncGetAssistant.java @@ -0,0 +1,49 @@ +/* + * 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.discoveryengine.v1beta.samples; + +// [START discoveryengine_v1beta_generated_AssistantService_GetAssistant_sync] +import com.google.cloud.discoveryengine.v1beta.Assistant; +import com.google.cloud.discoveryengine.v1beta.AssistantName; +import com.google.cloud.discoveryengine.v1beta.AssistantServiceClient; +import com.google.cloud.discoveryengine.v1beta.GetAssistantRequest; + +public class SyncGetAssistant { + + public static void main(String[] args) throws Exception { + syncGetAssistant(); + } + + public static void syncGetAssistant() 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 (AssistantServiceClient assistantServiceClient = AssistantServiceClient.create()) { + GetAssistantRequest request = + GetAssistantRequest.newBuilder() + .setName( + AssistantName.of( + "[PROJECT]", "[LOCATION]", "[COLLECTION]", "[ENGINE]", "[ASSISTANT]") + .toString()) + .build(); + Assistant response = assistantServiceClient.getAssistant(request); + } + } +} +// [END discoveryengine_v1beta_generated_AssistantService_GetAssistant_sync] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/assistantservice/getassistant/SyncGetAssistantAssistantname.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/assistantservice/getassistant/SyncGetAssistantAssistantname.java new file mode 100644 index 000000000000..240fbcaa9c9f --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/assistantservice/getassistant/SyncGetAssistantAssistantname.java @@ -0,0 +1,43 @@ +/* + * 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.discoveryengine.v1beta.samples; + +// [START discoveryengine_v1beta_generated_AssistantService_GetAssistant_Assistantname_sync] +import com.google.cloud.discoveryengine.v1beta.Assistant; +import com.google.cloud.discoveryengine.v1beta.AssistantName; +import com.google.cloud.discoveryengine.v1beta.AssistantServiceClient; + +public class SyncGetAssistantAssistantname { + + public static void main(String[] args) throws Exception { + syncGetAssistantAssistantname(); + } + + public static void syncGetAssistantAssistantname() 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 (AssistantServiceClient assistantServiceClient = AssistantServiceClient.create()) { + AssistantName name = + AssistantName.of("[PROJECT]", "[LOCATION]", "[COLLECTION]", "[ENGINE]", "[ASSISTANT]"); + Assistant response = assistantServiceClient.getAssistant(name); + } + } +} +// [END discoveryengine_v1beta_generated_AssistantService_GetAssistant_Assistantname_sync] diff --git a/java-oracledatabase/samples/snippets/generated/com/google/cloud/oracledatabase/v1/oracledatabase/getgoldengatedeploymenttype/SyncGetGoldengateDeploymentTypeString.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/assistantservice/getassistant/SyncGetAssistantString.java similarity index 55% rename from java-oracledatabase/samples/snippets/generated/com/google/cloud/oracledatabase/v1/oracledatabase/getgoldengatedeploymenttype/SyncGetGoldengateDeploymentTypeString.java rename to java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/assistantservice/getassistant/SyncGetAssistantString.java index 1e9473d9d9e2..04c2095df3cd 100644 --- a/java-oracledatabase/samples/snippets/generated/com/google/cloud/oracledatabase/v1/oracledatabase/getgoldengatedeploymenttype/SyncGetGoldengateDeploymentTypeString.java +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/assistantservice/getassistant/SyncGetAssistantString.java @@ -14,31 +14,31 @@ * limitations under the License. */ -package com.google.cloud.oracledatabase.v1.samples; +package com.google.cloud.discoveryengine.v1beta.samples; -// [START oracledatabase_v1_generated_OracleDatabase_GetGoldengateDeploymentType_String_sync] -import com.google.cloud.oracledatabase.v1.GoldengateDeploymentType; -import com.google.cloud.oracledatabase.v1.GoldengateDeploymentTypeName; -import com.google.cloud.oracledatabase.v1.OracleDatabaseClient; +// [START discoveryengine_v1beta_generated_AssistantService_GetAssistant_String_sync] +import com.google.cloud.discoveryengine.v1beta.Assistant; +import com.google.cloud.discoveryengine.v1beta.AssistantName; +import com.google.cloud.discoveryengine.v1beta.AssistantServiceClient; -public class SyncGetGoldengateDeploymentTypeString { +public class SyncGetAssistantString { public static void main(String[] args) throws Exception { - syncGetGoldengateDeploymentTypeString(); + syncGetAssistantString(); } - public static void syncGetGoldengateDeploymentTypeString() throws Exception { + public static void syncGetAssistantString() 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 (OracleDatabaseClient oracleDatabaseClient = OracleDatabaseClient.create()) { + try (AssistantServiceClient assistantServiceClient = AssistantServiceClient.create()) { String name = - GoldengateDeploymentTypeName.of("[PROJECT]", "[LOCATION]", "[GOLDENGATE_DEPLOYMENT_TYPE]") + AssistantName.of("[PROJECT]", "[LOCATION]", "[COLLECTION]", "[ENGINE]", "[ASSISTANT]") .toString(); - GoldengateDeploymentType response = oracleDatabaseClient.getGoldengateDeploymentType(name); + Assistant response = assistantServiceClient.getAssistant(name); } } } -// [END oracledatabase_v1_generated_OracleDatabase_GetGoldengateDeploymentType_String_sync] +// [END discoveryengine_v1beta_generated_AssistantService_GetAssistant_String_sync] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/assistantservice/listassistants/AsyncListAssistants.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/assistantservice/listassistants/AsyncListAssistants.java new file mode 100644 index 000000000000..7597a346f8c2 --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/assistantservice/listassistants/AsyncListAssistants.java @@ -0,0 +1,55 @@ +/* + * 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.discoveryengine.v1beta.samples; + +// [START discoveryengine_v1beta_generated_AssistantService_ListAssistants_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.discoveryengine.v1beta.Assistant; +import com.google.cloud.discoveryengine.v1beta.AssistantServiceClient; +import com.google.cloud.discoveryengine.v1beta.EngineName; +import com.google.cloud.discoveryengine.v1beta.ListAssistantsRequest; + +public class AsyncListAssistants { + + public static void main(String[] args) throws Exception { + asyncListAssistants(); + } + + public static void asyncListAssistants() 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 (AssistantServiceClient assistantServiceClient = AssistantServiceClient.create()) { + ListAssistantsRequest request = + ListAssistantsRequest.newBuilder() + .setParent( + EngineName.of("[PROJECT]", "[LOCATION]", "[COLLECTION]", "[ENGINE]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + ApiFuture future = + assistantServiceClient.listAssistantsPagedCallable().futureCall(request); + // Do something. + for (Assistant element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END discoveryengine_v1beta_generated_AssistantService_ListAssistants_async] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/assistantservice/listassistants/AsyncListAssistantsPaged.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/assistantservice/listassistants/AsyncListAssistantsPaged.java new file mode 100644 index 000000000000..dfcf8a7d5fb9 --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/assistantservice/listassistants/AsyncListAssistantsPaged.java @@ -0,0 +1,63 @@ +/* + * 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.discoveryengine.v1beta.samples; + +// [START discoveryengine_v1beta_generated_AssistantService_ListAssistants_Paged_async] +import com.google.cloud.discoveryengine.v1beta.Assistant; +import com.google.cloud.discoveryengine.v1beta.AssistantServiceClient; +import com.google.cloud.discoveryengine.v1beta.EngineName; +import com.google.cloud.discoveryengine.v1beta.ListAssistantsRequest; +import com.google.cloud.discoveryengine.v1beta.ListAssistantsResponse; +import com.google.common.base.Strings; + +public class AsyncListAssistantsPaged { + + public static void main(String[] args) throws Exception { + asyncListAssistantsPaged(); + } + + public static void asyncListAssistantsPaged() 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 (AssistantServiceClient assistantServiceClient = AssistantServiceClient.create()) { + ListAssistantsRequest request = + ListAssistantsRequest.newBuilder() + .setParent( + EngineName.of("[PROJECT]", "[LOCATION]", "[COLLECTION]", "[ENGINE]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + while (true) { + ListAssistantsResponse response = + assistantServiceClient.listAssistantsCallable().call(request); + for (Assistant element : response.getAssistantsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END discoveryengine_v1beta_generated_AssistantService_ListAssistants_Paged_async] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/assistantservice/listassistants/SyncListAssistants.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/assistantservice/listassistants/SyncListAssistants.java new file mode 100644 index 000000000000..0ad1085b94c4 --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/assistantservice/listassistants/SyncListAssistants.java @@ -0,0 +1,51 @@ +/* + * 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.discoveryengine.v1beta.samples; + +// [START discoveryengine_v1beta_generated_AssistantService_ListAssistants_sync] +import com.google.cloud.discoveryengine.v1beta.Assistant; +import com.google.cloud.discoveryengine.v1beta.AssistantServiceClient; +import com.google.cloud.discoveryengine.v1beta.EngineName; +import com.google.cloud.discoveryengine.v1beta.ListAssistantsRequest; + +public class SyncListAssistants { + + public static void main(String[] args) throws Exception { + syncListAssistants(); + } + + public static void syncListAssistants() 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 (AssistantServiceClient assistantServiceClient = AssistantServiceClient.create()) { + ListAssistantsRequest request = + ListAssistantsRequest.newBuilder() + .setParent( + EngineName.of("[PROJECT]", "[LOCATION]", "[COLLECTION]", "[ENGINE]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + for (Assistant element : assistantServiceClient.listAssistants(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END discoveryengine_v1beta_generated_AssistantService_ListAssistants_sync] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/assistantservice/listassistants/SyncListAssistantsEnginename.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/assistantservice/listassistants/SyncListAssistantsEnginename.java new file mode 100644 index 000000000000..efe36a97cc09 --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/assistantservice/listassistants/SyncListAssistantsEnginename.java @@ -0,0 +1,44 @@ +/* + * 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.discoveryengine.v1beta.samples; + +// [START discoveryengine_v1beta_generated_AssistantService_ListAssistants_Enginename_sync] +import com.google.cloud.discoveryengine.v1beta.Assistant; +import com.google.cloud.discoveryengine.v1beta.AssistantServiceClient; +import com.google.cloud.discoveryengine.v1beta.EngineName; + +public class SyncListAssistantsEnginename { + + public static void main(String[] args) throws Exception { + syncListAssistantsEnginename(); + } + + public static void syncListAssistantsEnginename() 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 (AssistantServiceClient assistantServiceClient = AssistantServiceClient.create()) { + EngineName parent = EngineName.of("[PROJECT]", "[LOCATION]", "[COLLECTION]", "[ENGINE]"); + for (Assistant element : assistantServiceClient.listAssistants(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END discoveryengine_v1beta_generated_AssistantService_ListAssistants_Enginename_sync] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/assistantservice/listassistants/SyncListAssistantsString.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/assistantservice/listassistants/SyncListAssistantsString.java new file mode 100644 index 000000000000..ccac5722b881 --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/assistantservice/listassistants/SyncListAssistantsString.java @@ -0,0 +1,45 @@ +/* + * 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.discoveryengine.v1beta.samples; + +// [START discoveryengine_v1beta_generated_AssistantService_ListAssistants_String_sync] +import com.google.cloud.discoveryengine.v1beta.Assistant; +import com.google.cloud.discoveryengine.v1beta.AssistantServiceClient; +import com.google.cloud.discoveryengine.v1beta.EngineName; + +public class SyncListAssistantsString { + + public static void main(String[] args) throws Exception { + syncListAssistantsString(); + } + + public static void syncListAssistantsString() 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 (AssistantServiceClient assistantServiceClient = AssistantServiceClient.create()) { + String parent = + EngineName.of("[PROJECT]", "[LOCATION]", "[COLLECTION]", "[ENGINE]").toString(); + for (Assistant element : assistantServiceClient.listAssistants(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END discoveryengine_v1beta_generated_AssistantService_ListAssistants_String_sync] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/assistantservice/streamassist/AsyncStreamAssist.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/assistantservice/streamassist/AsyncStreamAssist.java new file mode 100644 index 000000000000..0f185d7aabf7 --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/assistantservice/streamassist/AsyncStreamAssist.java @@ -0,0 +1,65 @@ +/* + * 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.discoveryengine.v1beta.samples; + +// [START discoveryengine_v1beta_generated_AssistantService_StreamAssist_async] +import com.google.api.gax.rpc.ServerStream; +import com.google.cloud.discoveryengine.v1beta.AssistUserMetadata; +import com.google.cloud.discoveryengine.v1beta.AssistantName; +import com.google.cloud.discoveryengine.v1beta.AssistantServiceClient; +import com.google.cloud.discoveryengine.v1beta.Query; +import com.google.cloud.discoveryengine.v1beta.SessionName; +import com.google.cloud.discoveryengine.v1beta.StreamAssistRequest; +import com.google.cloud.discoveryengine.v1beta.StreamAssistResponse; + +public class AsyncStreamAssist { + + public static void main(String[] args) throws Exception { + asyncStreamAssist(); + } + + public static void asyncStreamAssist() 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 (AssistantServiceClient assistantServiceClient = AssistantServiceClient.create()) { + StreamAssistRequest request = + StreamAssistRequest.newBuilder() + .setName( + AssistantName.of( + "[PROJECT]", "[LOCATION]", "[COLLECTION]", "[ENGINE]", "[ASSISTANT]") + .toString()) + .setQuery(Query.newBuilder().build()) + .setSession( + SessionName.ofProjectLocationDataStoreSessionName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[SESSION]") + .toString()) + .setUserMetadata(AssistUserMetadata.newBuilder().build()) + .setToolsSpec(StreamAssistRequest.ToolsSpec.newBuilder().build()) + .setGenerationSpec(StreamAssistRequest.GenerationSpec.newBuilder().build()) + .build(); + ServerStream stream = + assistantServiceClient.streamAssistCallable().call(request); + for (StreamAssistResponse response : stream) { + // Do something when a response is received. + } + } + } +} +// [END discoveryengine_v1beta_generated_AssistantService_StreamAssist_async] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/assistantservice/updateassistant/AsyncUpdateAssistant.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/assistantservice/updateassistant/AsyncUpdateAssistant.java new file mode 100644 index 000000000000..a613c34fb8e2 --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/assistantservice/updateassistant/AsyncUpdateAssistant.java @@ -0,0 +1,51 @@ +/* + * 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.discoveryengine.v1beta.samples; + +// [START discoveryengine_v1beta_generated_AssistantService_UpdateAssistant_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.discoveryengine.v1beta.Assistant; +import com.google.cloud.discoveryengine.v1beta.AssistantServiceClient; +import com.google.cloud.discoveryengine.v1beta.UpdateAssistantRequest; +import com.google.protobuf.FieldMask; + +public class AsyncUpdateAssistant { + + public static void main(String[] args) throws Exception { + asyncUpdateAssistant(); + } + + public static void asyncUpdateAssistant() 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 (AssistantServiceClient assistantServiceClient = AssistantServiceClient.create()) { + UpdateAssistantRequest request = + UpdateAssistantRequest.newBuilder() + .setAssistant(Assistant.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + ApiFuture future = + assistantServiceClient.updateAssistantCallable().futureCall(request); + // Do something. + Assistant response = future.get(); + } + } +} +// [END discoveryengine_v1beta_generated_AssistantService_UpdateAssistant_async] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/assistantservice/updateassistant/SyncUpdateAssistant.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/assistantservice/updateassistant/SyncUpdateAssistant.java new file mode 100644 index 000000000000..0544d256b837 --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/assistantservice/updateassistant/SyncUpdateAssistant.java @@ -0,0 +1,47 @@ +/* + * 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.discoveryengine.v1beta.samples; + +// [START discoveryengine_v1beta_generated_AssistantService_UpdateAssistant_sync] +import com.google.cloud.discoveryengine.v1beta.Assistant; +import com.google.cloud.discoveryengine.v1beta.AssistantServiceClient; +import com.google.cloud.discoveryengine.v1beta.UpdateAssistantRequest; +import com.google.protobuf.FieldMask; + +public class SyncUpdateAssistant { + + public static void main(String[] args) throws Exception { + syncUpdateAssistant(); + } + + public static void syncUpdateAssistant() 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 (AssistantServiceClient assistantServiceClient = AssistantServiceClient.create()) { + UpdateAssistantRequest request = + UpdateAssistantRequest.newBuilder() + .setAssistant(Assistant.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + Assistant response = assistantServiceClient.updateAssistant(request); + } + } +} +// [END discoveryengine_v1beta_generated_AssistantService_UpdateAssistant_sync] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/assistantservice/updateassistant/SyncUpdateAssistantAssistantFieldmask.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/assistantservice/updateassistant/SyncUpdateAssistantAssistantFieldmask.java new file mode 100644 index 000000000000..f1ebea59f7a2 --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/assistantservice/updateassistant/SyncUpdateAssistantAssistantFieldmask.java @@ -0,0 +1,43 @@ +/* + * 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.discoveryengine.v1beta.samples; + +// [START discoveryengine_v1beta_generated_AssistantService_UpdateAssistant_AssistantFieldmask_sync] +import com.google.cloud.discoveryengine.v1beta.Assistant; +import com.google.cloud.discoveryengine.v1beta.AssistantServiceClient; +import com.google.protobuf.FieldMask; + +public class SyncUpdateAssistantAssistantFieldmask { + + public static void main(String[] args) throws Exception { + syncUpdateAssistantAssistantFieldmask(); + } + + public static void syncUpdateAssistantAssistantFieldmask() 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 (AssistantServiceClient assistantServiceClient = AssistantServiceClient.create()) { + Assistant assistant = Assistant.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + Assistant response = assistantServiceClient.updateAssistant(assistant, updateMask); + } + } +} +// [END discoveryengine_v1beta_generated_AssistantService_UpdateAssistant_AssistantFieldmask_sync] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/assistantservicesettings/createassistant/SyncCreateAssistant.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/assistantservicesettings/createassistant/SyncCreateAssistant.java new file mode 100644 index 000000000000..857a62f9f2cb --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/assistantservicesettings/createassistant/SyncCreateAssistant.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.cloud.discoveryengine.v1beta.samples; + +// [START discoveryengine_v1beta_generated_AssistantServiceSettings_CreateAssistant_sync] +import com.google.cloud.discoveryengine.v1beta.AssistantServiceSettings; +import java.time.Duration; + +public class SyncCreateAssistant { + + public static void main(String[] args) throws Exception { + syncCreateAssistant(); + } + + public static void syncCreateAssistant() 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 + AssistantServiceSettings.Builder assistantServiceSettingsBuilder = + AssistantServiceSettings.newBuilder(); + assistantServiceSettingsBuilder + .createAssistantSettings() + .setRetrySettings( + assistantServiceSettingsBuilder + .createAssistantSettings() + .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()); + AssistantServiceSettings assistantServiceSettings = assistantServiceSettingsBuilder.build(); + } +} +// [END discoveryengine_v1beta_generated_AssistantServiceSettings_CreateAssistant_sync] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/cmekconfigservice/create/SyncCreateSetCredentialsProvider.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/cmekconfigservice/create/SyncCreateSetCredentialsProvider.java new file mode 100644 index 000000000000..b3fc774e9e0c --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/cmekconfigservice/create/SyncCreateSetCredentialsProvider.java @@ -0,0 +1,45 @@ +/* + * 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.discoveryengine.v1beta.samples; + +// [START discoveryengine_v1beta_generated_CmekConfigService_Create_SetCredentialsProvider_sync] +import com.google.api.gax.core.FixedCredentialsProvider; +import com.google.cloud.discoveryengine.v1beta.CmekConfigServiceClient; +import com.google.cloud.discoveryengine.v1beta.CmekConfigServiceSettings; +import com.google.cloud.discoveryengine.v1beta.myCredentials; + +public class SyncCreateSetCredentialsProvider { + + public static void main(String[] args) throws Exception { + syncCreateSetCredentialsProvider(); + } + + public static void syncCreateSetCredentialsProvider() 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 + CmekConfigServiceSettings cmekConfigServiceSettings = + CmekConfigServiceSettings.newBuilder() + .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) + .build(); + CmekConfigServiceClient cmekConfigServiceClient = + CmekConfigServiceClient.create(cmekConfigServiceSettings); + } +} +// [END discoveryengine_v1beta_generated_CmekConfigService_Create_SetCredentialsProvider_sync] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/cmekconfigservice/create/SyncCreateSetEndpoint.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/cmekconfigservice/create/SyncCreateSetEndpoint.java new file mode 100644 index 000000000000..2169e4d7ef2a --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/cmekconfigservice/create/SyncCreateSetEndpoint.java @@ -0,0 +1,42 @@ +/* + * 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.discoveryengine.v1beta.samples; + +// [START discoveryengine_v1beta_generated_CmekConfigService_Create_SetEndpoint_sync] +import com.google.cloud.discoveryengine.v1beta.CmekConfigServiceClient; +import com.google.cloud.discoveryengine.v1beta.CmekConfigServiceSettings; +import com.google.cloud.discoveryengine.v1beta.myEndpoint; + +public class SyncCreateSetEndpoint { + + public static void main(String[] args) throws Exception { + syncCreateSetEndpoint(); + } + + public static void syncCreateSetEndpoint() 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 + CmekConfigServiceSettings cmekConfigServiceSettings = + CmekConfigServiceSettings.newBuilder().setEndpoint(myEndpoint).build(); + CmekConfigServiceClient cmekConfigServiceClient = + CmekConfigServiceClient.create(cmekConfigServiceSettings); + } +} +// [END discoveryengine_v1beta_generated_CmekConfigService_Create_SetEndpoint_sync] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/cmekconfigservice/create/SyncCreateUseHttpJsonTransport.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/cmekconfigservice/create/SyncCreateUseHttpJsonTransport.java new file mode 100644 index 000000000000..e3044cd31497 --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/cmekconfigservice/create/SyncCreateUseHttpJsonTransport.java @@ -0,0 +1,41 @@ +/* + * 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.discoveryengine.v1beta.samples; + +// [START discoveryengine_v1beta_generated_CmekConfigService_Create_UseHttpJsonTransport_sync] +import com.google.cloud.discoveryengine.v1beta.CmekConfigServiceClient; +import com.google.cloud.discoveryengine.v1beta.CmekConfigServiceSettings; + +public class SyncCreateUseHttpJsonTransport { + + public static void main(String[] args) throws Exception { + syncCreateUseHttpJsonTransport(); + } + + public static void syncCreateUseHttpJsonTransport() 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 + CmekConfigServiceSettings cmekConfigServiceSettings = + CmekConfigServiceSettings.newHttpJsonBuilder().build(); + CmekConfigServiceClient cmekConfigServiceClient = + CmekConfigServiceClient.create(cmekConfigServiceSettings); + } +} +// [END discoveryengine_v1beta_generated_CmekConfigService_Create_UseHttpJsonTransport_sync] diff --git a/java-oracledatabase/samples/snippets/generated/com/google/cloud/oracledatabase/v1/oracledatabase/getgoldengateconnectiontype/AsyncGetGoldengateConnectionType.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/cmekconfigservice/deletecmekconfig/AsyncDeleteCmekConfig.java similarity index 50% rename from java-oracledatabase/samples/snippets/generated/com/google/cloud/oracledatabase/v1/oracledatabase/getgoldengateconnectiontype/AsyncGetGoldengateConnectionType.java rename to java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/cmekconfigservice/deletecmekconfig/AsyncDeleteCmekConfig.java index bb50b9bd79fc..9f0a85e8ba5f 100644 --- a/java-oracledatabase/samples/snippets/generated/com/google/cloud/oracledatabase/v1/oracledatabase/getgoldengateconnectiontype/AsyncGetGoldengateConnectionType.java +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/cmekconfigservice/deletecmekconfig/AsyncDeleteCmekConfig.java @@ -14,40 +14,40 @@ * limitations under the License. */ -package com.google.cloud.oracledatabase.v1.samples; +package com.google.cloud.discoveryengine.v1beta.samples; -// [START oracledatabase_v1_generated_OracleDatabase_GetGoldengateConnectionType_async] +// [START discoveryengine_v1beta_generated_CmekConfigService_DeleteCmekConfig_async] import com.google.api.core.ApiFuture; -import com.google.cloud.oracledatabase.v1.GetGoldengateConnectionTypeRequest; -import com.google.cloud.oracledatabase.v1.GoldengateConnectionType; -import com.google.cloud.oracledatabase.v1.GoldengateConnectionTypeName; -import com.google.cloud.oracledatabase.v1.OracleDatabaseClient; +import com.google.cloud.discoveryengine.v1beta.CmekConfigName; +import com.google.cloud.discoveryengine.v1beta.CmekConfigServiceClient; +import com.google.cloud.discoveryengine.v1beta.DeleteCmekConfigRequest; +import com.google.longrunning.Operation; -public class AsyncGetGoldengateConnectionType { +public class AsyncDeleteCmekConfig { public static void main(String[] args) throws Exception { - asyncGetGoldengateConnectionType(); + asyncDeleteCmekConfig(); } - public static void asyncGetGoldengateConnectionType() throws Exception { + public static void asyncDeleteCmekConfig() 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 (OracleDatabaseClient oracleDatabaseClient = OracleDatabaseClient.create()) { - GetGoldengateConnectionTypeRequest request = - GetGoldengateConnectionTypeRequest.newBuilder() + try (CmekConfigServiceClient cmekConfigServiceClient = CmekConfigServiceClient.create()) { + DeleteCmekConfigRequest request = + DeleteCmekConfigRequest.newBuilder() .setName( - GoldengateConnectionTypeName.of( - "[PROJECT]", "[LOCATION]", "[GOLDENGATE_CONNECTION_TYPE]") + CmekConfigName.ofProjectLocationCmekConfigName( + "[PROJECT]", "[LOCATION]", "[CMEK_CONFIG]") .toString()) .build(); - ApiFuture future = - oracleDatabaseClient.getGoldengateConnectionTypeCallable().futureCall(request); + ApiFuture future = + cmekConfigServiceClient.deleteCmekConfigCallable().futureCall(request); // Do something. - GoldengateConnectionType response = future.get(); + future.get(); } } } -// [END oracledatabase_v1_generated_OracleDatabase_GetGoldengateConnectionType_async] +// [END discoveryengine_v1beta_generated_CmekConfigService_DeleteCmekConfig_async] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/cmekconfigservice/deletecmekconfig/AsyncDeleteCmekConfigLRO.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/cmekconfigservice/deletecmekconfig/AsyncDeleteCmekConfigLRO.java new file mode 100644 index 000000000000..b33f75d34b59 --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/cmekconfigservice/deletecmekconfig/AsyncDeleteCmekConfigLRO.java @@ -0,0 +1,54 @@ +/* + * 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.discoveryengine.v1beta.samples; + +// [START discoveryengine_v1beta_generated_CmekConfigService_DeleteCmekConfig_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.discoveryengine.v1beta.CmekConfigName; +import com.google.cloud.discoveryengine.v1beta.CmekConfigServiceClient; +import com.google.cloud.discoveryengine.v1beta.DeleteCmekConfigMetadata; +import com.google.cloud.discoveryengine.v1beta.DeleteCmekConfigRequest; +import com.google.protobuf.Empty; + +public class AsyncDeleteCmekConfigLRO { + + public static void main(String[] args) throws Exception { + asyncDeleteCmekConfigLRO(); + } + + public static void asyncDeleteCmekConfigLRO() 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 (CmekConfigServiceClient cmekConfigServiceClient = CmekConfigServiceClient.create()) { + DeleteCmekConfigRequest request = + DeleteCmekConfigRequest.newBuilder() + .setName( + CmekConfigName.ofProjectLocationCmekConfigName( + "[PROJECT]", "[LOCATION]", "[CMEK_CONFIG]") + .toString()) + .build(); + OperationFuture future = + cmekConfigServiceClient.deleteCmekConfigOperationCallable().futureCall(request); + // Do something. + future.get(); + } + } +} +// [END discoveryengine_v1beta_generated_CmekConfigService_DeleteCmekConfig_LRO_async] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/cmekconfigservice/deletecmekconfig/SyncDeleteCmekConfig.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/cmekconfigservice/deletecmekconfig/SyncDeleteCmekConfig.java new file mode 100644 index 000000000000..268822e1197b --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/cmekconfigservice/deletecmekconfig/SyncDeleteCmekConfig.java @@ -0,0 +1,49 @@ +/* + * 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.discoveryengine.v1beta.samples; + +// [START discoveryengine_v1beta_generated_CmekConfigService_DeleteCmekConfig_sync] +import com.google.cloud.discoveryengine.v1beta.CmekConfigName; +import com.google.cloud.discoveryengine.v1beta.CmekConfigServiceClient; +import com.google.cloud.discoveryengine.v1beta.DeleteCmekConfigRequest; +import com.google.protobuf.Empty; + +public class SyncDeleteCmekConfig { + + public static void main(String[] args) throws Exception { + syncDeleteCmekConfig(); + } + + public static void syncDeleteCmekConfig() 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 (CmekConfigServiceClient cmekConfigServiceClient = CmekConfigServiceClient.create()) { + DeleteCmekConfigRequest request = + DeleteCmekConfigRequest.newBuilder() + .setName( + CmekConfigName.ofProjectLocationCmekConfigName( + "[PROJECT]", "[LOCATION]", "[CMEK_CONFIG]") + .toString()) + .build(); + cmekConfigServiceClient.deleteCmekConfigAsync(request).get(); + } + } +} +// [END discoveryengine_v1beta_generated_CmekConfigService_DeleteCmekConfig_sync] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/cmekconfigservice/deletecmekconfig/SyncDeleteCmekConfigCmekconfigname.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/cmekconfigservice/deletecmekconfig/SyncDeleteCmekConfigCmekconfigname.java new file mode 100644 index 000000000000..40bef4f894fe --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/cmekconfigservice/deletecmekconfig/SyncDeleteCmekConfigCmekconfigname.java @@ -0,0 +1,44 @@ +/* + * 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.discoveryengine.v1beta.samples; + +// [START discoveryengine_v1beta_generated_CmekConfigService_DeleteCmekConfig_Cmekconfigname_sync] +import com.google.cloud.discoveryengine.v1beta.CmekConfigName; +import com.google.cloud.discoveryengine.v1beta.CmekConfigServiceClient; +import com.google.protobuf.Empty; + +public class SyncDeleteCmekConfigCmekconfigname { + + public static void main(String[] args) throws Exception { + syncDeleteCmekConfigCmekconfigname(); + } + + public static void syncDeleteCmekConfigCmekconfigname() 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 (CmekConfigServiceClient cmekConfigServiceClient = CmekConfigServiceClient.create()) { + CmekConfigName name = + CmekConfigName.ofProjectLocationCmekConfigName( + "[PROJECT]", "[LOCATION]", "[CMEK_CONFIG]"); + cmekConfigServiceClient.deleteCmekConfigAsync(name).get(); + } + } +} +// [END discoveryengine_v1beta_generated_CmekConfigService_DeleteCmekConfig_Cmekconfigname_sync] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/cmekconfigservice/deletecmekconfig/SyncDeleteCmekConfigString.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/cmekconfigservice/deletecmekconfig/SyncDeleteCmekConfigString.java new file mode 100644 index 000000000000..a97f8d429eb6 --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/cmekconfigservice/deletecmekconfig/SyncDeleteCmekConfigString.java @@ -0,0 +1,42 @@ +/* + * 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.discoveryengine.v1beta.samples; + +// [START discoveryengine_v1beta_generated_CmekConfigService_DeleteCmekConfig_String_sync] +import com.google.cloud.discoveryengine.v1beta.CmekConfigName; +import com.google.cloud.discoveryengine.v1beta.CmekConfigServiceClient; +import com.google.protobuf.Empty; + +public class SyncDeleteCmekConfigString { + + public static void main(String[] args) throws Exception { + syncDeleteCmekConfigString(); + } + + public static void syncDeleteCmekConfigString() 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 (CmekConfigServiceClient cmekConfigServiceClient = CmekConfigServiceClient.create()) { + String name = CmekConfigName.ofProjectLocationName("[PROJECT]", "[LOCATION]").toString(); + cmekConfigServiceClient.deleteCmekConfigAsync(name).get(); + } + } +} +// [END discoveryengine_v1beta_generated_CmekConfigService_DeleteCmekConfig_String_sync] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/cmekconfigservice/getcmekconfig/AsyncGetCmekConfig.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/cmekconfigservice/getcmekconfig/AsyncGetCmekConfig.java new file mode 100644 index 000000000000..126eb3005af6 --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/cmekconfigservice/getcmekconfig/AsyncGetCmekConfig.java @@ -0,0 +1,50 @@ +/* + * 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.discoveryengine.v1beta.samples; + +// [START discoveryengine_v1beta_generated_CmekConfigService_GetCmekConfig_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.discoveryengine.v1beta.CmekConfig; +import com.google.cloud.discoveryengine.v1beta.CmekConfigName; +import com.google.cloud.discoveryengine.v1beta.CmekConfigServiceClient; +import com.google.cloud.discoveryengine.v1beta.GetCmekConfigRequest; + +public class AsyncGetCmekConfig { + + public static void main(String[] args) throws Exception { + asyncGetCmekConfig(); + } + + public static void asyncGetCmekConfig() 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 (CmekConfigServiceClient cmekConfigServiceClient = CmekConfigServiceClient.create()) { + GetCmekConfigRequest request = + GetCmekConfigRequest.newBuilder() + .setName(CmekConfigName.ofProjectLocationName("[PROJECT]", "[LOCATION]").toString()) + .build(); + ApiFuture future = + cmekConfigServiceClient.getCmekConfigCallable().futureCall(request); + // Do something. + CmekConfig response = future.get(); + } + } +} +// [END discoveryengine_v1beta_generated_CmekConfigService_GetCmekConfig_async] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/cmekconfigservice/getcmekconfig/SyncGetCmekConfig.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/cmekconfigservice/getcmekconfig/SyncGetCmekConfig.java new file mode 100644 index 000000000000..b4f0ce1d2bc0 --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/cmekconfigservice/getcmekconfig/SyncGetCmekConfig.java @@ -0,0 +1,46 @@ +/* + * 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.discoveryengine.v1beta.samples; + +// [START discoveryengine_v1beta_generated_CmekConfigService_GetCmekConfig_sync] +import com.google.cloud.discoveryengine.v1beta.CmekConfig; +import com.google.cloud.discoveryengine.v1beta.CmekConfigName; +import com.google.cloud.discoveryengine.v1beta.CmekConfigServiceClient; +import com.google.cloud.discoveryengine.v1beta.GetCmekConfigRequest; + +public class SyncGetCmekConfig { + + public static void main(String[] args) throws Exception { + syncGetCmekConfig(); + } + + public static void syncGetCmekConfig() 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 (CmekConfigServiceClient cmekConfigServiceClient = CmekConfigServiceClient.create()) { + GetCmekConfigRequest request = + GetCmekConfigRequest.newBuilder() + .setName(CmekConfigName.ofProjectLocationName("[PROJECT]", "[LOCATION]").toString()) + .build(); + CmekConfig response = cmekConfigServiceClient.getCmekConfig(request); + } + } +} +// [END discoveryengine_v1beta_generated_CmekConfigService_GetCmekConfig_sync] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/cmekconfigservice/getcmekconfig/SyncGetCmekConfigCmekconfigname.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/cmekconfigservice/getcmekconfig/SyncGetCmekConfigCmekconfigname.java new file mode 100644 index 000000000000..4283add320d3 --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/cmekconfigservice/getcmekconfig/SyncGetCmekConfigCmekconfigname.java @@ -0,0 +1,42 @@ +/* + * 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.discoveryengine.v1beta.samples; + +// [START discoveryengine_v1beta_generated_CmekConfigService_GetCmekConfig_Cmekconfigname_sync] +import com.google.cloud.discoveryengine.v1beta.CmekConfig; +import com.google.cloud.discoveryengine.v1beta.CmekConfigName; +import com.google.cloud.discoveryengine.v1beta.CmekConfigServiceClient; + +public class SyncGetCmekConfigCmekconfigname { + + public static void main(String[] args) throws Exception { + syncGetCmekConfigCmekconfigname(); + } + + public static void syncGetCmekConfigCmekconfigname() 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 (CmekConfigServiceClient cmekConfigServiceClient = CmekConfigServiceClient.create()) { + CmekConfigName name = CmekConfigName.ofProjectLocationName("[PROJECT]", "[LOCATION]"); + CmekConfig response = cmekConfigServiceClient.getCmekConfig(name); + } + } +} +// [END discoveryengine_v1beta_generated_CmekConfigService_GetCmekConfig_Cmekconfigname_sync] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/cmekconfigservice/getcmekconfig/SyncGetCmekConfigString.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/cmekconfigservice/getcmekconfig/SyncGetCmekConfigString.java new file mode 100644 index 000000000000..72a5d1a73ecb --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/cmekconfigservice/getcmekconfig/SyncGetCmekConfigString.java @@ -0,0 +1,42 @@ +/* + * 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.discoveryengine.v1beta.samples; + +// [START discoveryengine_v1beta_generated_CmekConfigService_GetCmekConfig_String_sync] +import com.google.cloud.discoveryengine.v1beta.CmekConfig; +import com.google.cloud.discoveryengine.v1beta.CmekConfigName; +import com.google.cloud.discoveryengine.v1beta.CmekConfigServiceClient; + +public class SyncGetCmekConfigString { + + public static void main(String[] args) throws Exception { + syncGetCmekConfigString(); + } + + public static void syncGetCmekConfigString() 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 (CmekConfigServiceClient cmekConfigServiceClient = CmekConfigServiceClient.create()) { + String name = CmekConfigName.ofProjectLocationName("[PROJECT]", "[LOCATION]").toString(); + CmekConfig response = cmekConfigServiceClient.getCmekConfig(name); + } + } +} +// [END discoveryengine_v1beta_generated_CmekConfigService_GetCmekConfig_String_sync] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/cmekconfigservice/listcmekconfigs/AsyncListCmekConfigs.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/cmekconfigservice/listcmekconfigs/AsyncListCmekConfigs.java new file mode 100644 index 000000000000..f62998b9ab14 --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/cmekconfigservice/listcmekconfigs/AsyncListCmekConfigs.java @@ -0,0 +1,50 @@ +/* + * 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.discoveryengine.v1beta.samples; + +// [START discoveryengine_v1beta_generated_CmekConfigService_ListCmekConfigs_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.discoveryengine.v1beta.CmekConfigServiceClient; +import com.google.cloud.discoveryengine.v1beta.ListCmekConfigsRequest; +import com.google.cloud.discoveryengine.v1beta.ListCmekConfigsResponse; +import com.google.cloud.discoveryengine.v1beta.LocationName; + +public class AsyncListCmekConfigs { + + public static void main(String[] args) throws Exception { + asyncListCmekConfigs(); + } + + public static void asyncListCmekConfigs() 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 (CmekConfigServiceClient cmekConfigServiceClient = CmekConfigServiceClient.create()) { + ListCmekConfigsRequest request = + ListCmekConfigsRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .build(); + ApiFuture future = + cmekConfigServiceClient.listCmekConfigsCallable().futureCall(request); + // Do something. + ListCmekConfigsResponse response = future.get(); + } + } +} +// [END discoveryengine_v1beta_generated_CmekConfigService_ListCmekConfigs_async] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/cmekconfigservice/listcmekconfigs/SyncListCmekConfigs.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/cmekconfigservice/listcmekconfigs/SyncListCmekConfigs.java new file mode 100644 index 000000000000..2a0eea47a8f3 --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/cmekconfigservice/listcmekconfigs/SyncListCmekConfigs.java @@ -0,0 +1,46 @@ +/* + * 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.discoveryengine.v1beta.samples; + +// [START discoveryengine_v1beta_generated_CmekConfigService_ListCmekConfigs_sync] +import com.google.cloud.discoveryengine.v1beta.CmekConfigServiceClient; +import com.google.cloud.discoveryengine.v1beta.ListCmekConfigsRequest; +import com.google.cloud.discoveryengine.v1beta.ListCmekConfigsResponse; +import com.google.cloud.discoveryengine.v1beta.LocationName; + +public class SyncListCmekConfigs { + + public static void main(String[] args) throws Exception { + syncListCmekConfigs(); + } + + public static void syncListCmekConfigs() 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 (CmekConfigServiceClient cmekConfigServiceClient = CmekConfigServiceClient.create()) { + ListCmekConfigsRequest request = + ListCmekConfigsRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .build(); + ListCmekConfigsResponse response = cmekConfigServiceClient.listCmekConfigs(request); + } + } +} +// [END discoveryengine_v1beta_generated_CmekConfigService_ListCmekConfigs_sync] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/cmekconfigservice/listcmekconfigs/SyncListCmekConfigsLocationname.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/cmekconfigservice/listcmekconfigs/SyncListCmekConfigsLocationname.java new file mode 100644 index 000000000000..c64b46ad1892 --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/cmekconfigservice/listcmekconfigs/SyncListCmekConfigsLocationname.java @@ -0,0 +1,42 @@ +/* + * 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.discoveryengine.v1beta.samples; + +// [START discoveryengine_v1beta_generated_CmekConfigService_ListCmekConfigs_Locationname_sync] +import com.google.cloud.discoveryengine.v1beta.CmekConfigServiceClient; +import com.google.cloud.discoveryengine.v1beta.ListCmekConfigsResponse; +import com.google.cloud.discoveryengine.v1beta.LocationName; + +public class SyncListCmekConfigsLocationname { + + public static void main(String[] args) throws Exception { + syncListCmekConfigsLocationname(); + } + + public static void syncListCmekConfigsLocationname() 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 (CmekConfigServiceClient cmekConfigServiceClient = CmekConfigServiceClient.create()) { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + ListCmekConfigsResponse response = cmekConfigServiceClient.listCmekConfigs(parent); + } + } +} +// [END discoveryengine_v1beta_generated_CmekConfigService_ListCmekConfigs_Locationname_sync] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/cmekconfigservice/listcmekconfigs/SyncListCmekConfigsString.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/cmekconfigservice/listcmekconfigs/SyncListCmekConfigsString.java new file mode 100644 index 000000000000..0b7d48496c9e --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/cmekconfigservice/listcmekconfigs/SyncListCmekConfigsString.java @@ -0,0 +1,42 @@ +/* + * 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.discoveryengine.v1beta.samples; + +// [START discoveryengine_v1beta_generated_CmekConfigService_ListCmekConfigs_String_sync] +import com.google.cloud.discoveryengine.v1beta.CmekConfigServiceClient; +import com.google.cloud.discoveryengine.v1beta.ListCmekConfigsResponse; +import com.google.cloud.discoveryengine.v1beta.LocationName; + +public class SyncListCmekConfigsString { + + public static void main(String[] args) throws Exception { + syncListCmekConfigsString(); + } + + public static void syncListCmekConfigsString() 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 (CmekConfigServiceClient cmekConfigServiceClient = CmekConfigServiceClient.create()) { + String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); + ListCmekConfigsResponse response = cmekConfigServiceClient.listCmekConfigs(parent); + } + } +} +// [END discoveryengine_v1beta_generated_CmekConfigService_ListCmekConfigs_String_sync] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/cmekconfigservice/updatecmekconfig/AsyncUpdateCmekConfig.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/cmekconfigservice/updatecmekconfig/AsyncUpdateCmekConfig.java new file mode 100644 index 000000000000..2eecf506de74 --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/cmekconfigservice/updatecmekconfig/AsyncUpdateCmekConfig.java @@ -0,0 +1,51 @@ +/* + * 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.discoveryengine.v1beta.samples; + +// [START discoveryengine_v1beta_generated_CmekConfigService_UpdateCmekConfig_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.discoveryengine.v1beta.CmekConfig; +import com.google.cloud.discoveryengine.v1beta.CmekConfigServiceClient; +import com.google.cloud.discoveryengine.v1beta.UpdateCmekConfigRequest; +import com.google.longrunning.Operation; + +public class AsyncUpdateCmekConfig { + + public static void main(String[] args) throws Exception { + asyncUpdateCmekConfig(); + } + + public static void asyncUpdateCmekConfig() 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 (CmekConfigServiceClient cmekConfigServiceClient = CmekConfigServiceClient.create()) { + UpdateCmekConfigRequest request = + UpdateCmekConfigRequest.newBuilder() + .setConfig(CmekConfig.newBuilder().build()) + .setSetDefault(true) + .build(); + ApiFuture future = + cmekConfigServiceClient.updateCmekConfigCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END discoveryengine_v1beta_generated_CmekConfigService_UpdateCmekConfig_async] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/cmekconfigservice/updatecmekconfig/AsyncUpdateCmekConfigLRO.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/cmekconfigservice/updatecmekconfig/AsyncUpdateCmekConfigLRO.java new file mode 100644 index 000000000000..46bc4d639c24 --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/cmekconfigservice/updatecmekconfig/AsyncUpdateCmekConfigLRO.java @@ -0,0 +1,51 @@ +/* + * 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.discoveryengine.v1beta.samples; + +// [START discoveryengine_v1beta_generated_CmekConfigService_UpdateCmekConfig_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.discoveryengine.v1beta.CmekConfig; +import com.google.cloud.discoveryengine.v1beta.CmekConfigServiceClient; +import com.google.cloud.discoveryengine.v1beta.UpdateCmekConfigMetadata; +import com.google.cloud.discoveryengine.v1beta.UpdateCmekConfigRequest; + +public class AsyncUpdateCmekConfigLRO { + + public static void main(String[] args) throws Exception { + asyncUpdateCmekConfigLRO(); + } + + public static void asyncUpdateCmekConfigLRO() 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 (CmekConfigServiceClient cmekConfigServiceClient = CmekConfigServiceClient.create()) { + UpdateCmekConfigRequest request = + UpdateCmekConfigRequest.newBuilder() + .setConfig(CmekConfig.newBuilder().build()) + .setSetDefault(true) + .build(); + OperationFuture future = + cmekConfigServiceClient.updateCmekConfigOperationCallable().futureCall(request); + // Do something. + CmekConfig response = future.get(); + } + } +} +// [END discoveryengine_v1beta_generated_CmekConfigService_UpdateCmekConfig_LRO_async] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/cmekconfigservice/updatecmekconfig/SyncUpdateCmekConfig.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/cmekconfigservice/updatecmekconfig/SyncUpdateCmekConfig.java new file mode 100644 index 000000000000..8b0fc95c9e06 --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/cmekconfigservice/updatecmekconfig/SyncUpdateCmekConfig.java @@ -0,0 +1,46 @@ +/* + * 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.discoveryengine.v1beta.samples; + +// [START discoveryengine_v1beta_generated_CmekConfigService_UpdateCmekConfig_sync] +import com.google.cloud.discoveryengine.v1beta.CmekConfig; +import com.google.cloud.discoveryengine.v1beta.CmekConfigServiceClient; +import com.google.cloud.discoveryengine.v1beta.UpdateCmekConfigRequest; + +public class SyncUpdateCmekConfig { + + public static void main(String[] args) throws Exception { + syncUpdateCmekConfig(); + } + + public static void syncUpdateCmekConfig() 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 (CmekConfigServiceClient cmekConfigServiceClient = CmekConfigServiceClient.create()) { + UpdateCmekConfigRequest request = + UpdateCmekConfigRequest.newBuilder() + .setConfig(CmekConfig.newBuilder().build()) + .setSetDefault(true) + .build(); + CmekConfig response = cmekConfigServiceClient.updateCmekConfigAsync(request).get(); + } + } +} +// [END discoveryengine_v1beta_generated_CmekConfigService_UpdateCmekConfig_sync] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/cmekconfigservice/updatecmekconfig/SyncUpdateCmekConfigCmekconfig.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/cmekconfigservice/updatecmekconfig/SyncUpdateCmekConfigCmekconfig.java new file mode 100644 index 000000000000..1e816bf3e084 --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/cmekconfigservice/updatecmekconfig/SyncUpdateCmekConfigCmekconfig.java @@ -0,0 +1,41 @@ +/* + * 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.discoveryengine.v1beta.samples; + +// [START discoveryengine_v1beta_generated_CmekConfigService_UpdateCmekConfig_Cmekconfig_sync] +import com.google.cloud.discoveryengine.v1beta.CmekConfig; +import com.google.cloud.discoveryengine.v1beta.CmekConfigServiceClient; + +public class SyncUpdateCmekConfigCmekconfig { + + public static void main(String[] args) throws Exception { + syncUpdateCmekConfigCmekconfig(); + } + + public static void syncUpdateCmekConfigCmekconfig() 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 (CmekConfigServiceClient cmekConfigServiceClient = CmekConfigServiceClient.create()) { + CmekConfig config = CmekConfig.newBuilder().build(); + CmekConfig response = cmekConfigServiceClient.updateCmekConfigAsync(config).get(); + } + } +} +// [END discoveryengine_v1beta_generated_CmekConfigService_UpdateCmekConfig_Cmekconfig_sync] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/cmekconfigservicesettings/getcmekconfig/SyncGetCmekConfig.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/cmekconfigservicesettings/getcmekconfig/SyncGetCmekConfig.java new file mode 100644 index 000000000000..378e8a1fa8c1 --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/cmekconfigservicesettings/getcmekconfig/SyncGetCmekConfig.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.cloud.discoveryengine.v1beta.samples; + +// [START discoveryengine_v1beta_generated_CmekConfigServiceSettings_GetCmekConfig_sync] +import com.google.cloud.discoveryengine.v1beta.CmekConfigServiceSettings; +import java.time.Duration; + +public class SyncGetCmekConfig { + + public static void main(String[] args) throws Exception { + syncGetCmekConfig(); + } + + public static void syncGetCmekConfig() 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 + CmekConfigServiceSettings.Builder cmekConfigServiceSettingsBuilder = + CmekConfigServiceSettings.newBuilder(); + cmekConfigServiceSettingsBuilder + .getCmekConfigSettings() + .setRetrySettings( + cmekConfigServiceSettingsBuilder + .getCmekConfigSettings() + .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()); + CmekConfigServiceSettings cmekConfigServiceSettings = cmekConfigServiceSettingsBuilder.build(); + } +} +// [END discoveryengine_v1beta_generated_CmekConfigServiceSettings_GetCmekConfig_sync] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/cmekconfigservicesettings/updatecmekconfig/SyncUpdateCmekConfig.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/cmekconfigservicesettings/updatecmekconfig/SyncUpdateCmekConfig.java new file mode 100644 index 000000000000..b97343edbf94 --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/cmekconfigservicesettings/updatecmekconfig/SyncUpdateCmekConfig.java @@ -0,0 +1,54 @@ +/* + * 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.discoveryengine.v1beta.samples; + +// [START discoveryengine_v1beta_generated_CmekConfigServiceSettings_UpdateCmekConfig_sync] +import com.google.api.gax.longrunning.OperationalTimedPollAlgorithm; +import com.google.api.gax.retrying.RetrySettings; +import com.google.api.gax.retrying.TimedRetryAlgorithm; +import com.google.cloud.discoveryengine.v1beta.CmekConfigServiceSettings; +import java.time.Duration; + +public class SyncUpdateCmekConfig { + + public static void main(String[] args) throws Exception { + syncUpdateCmekConfig(); + } + + public static void syncUpdateCmekConfig() 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 + CmekConfigServiceSettings.Builder cmekConfigServiceSettingsBuilder = + CmekConfigServiceSettings.newBuilder(); + TimedRetryAlgorithm timedRetryAlgorithm = + OperationalTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelayDuration(Duration.ofMillis(500)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelayDuration(Duration.ofMillis(5000)) + .setTotalTimeoutDuration(Duration.ofHours(24)) + .build()); + cmekConfigServiceSettingsBuilder + .createClusterOperationSettings() + .setPollingAlgorithm(timedRetryAlgorithm) + .build(); + } +} +// [END discoveryengine_v1beta_generated_CmekConfigServiceSettings_UpdateCmekConfig_sync] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/completionservice/advancedcompletequery/AsyncAdvancedCompleteQuery.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/completionservice/advancedcompletequery/AsyncAdvancedCompleteQuery.java index 53f762363d3e..0322cb99b45b 100644 --- a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/completionservice/advancedcompletequery/AsyncAdvancedCompleteQuery.java +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/completionservice/advancedcompletequery/AsyncAdvancedCompleteQuery.java @@ -51,6 +51,9 @@ public static void asyncAdvancedCompleteQuery() throws Exception { .setIncludeTailSuggestions(true) .setBoostSpec(AdvancedCompleteQueryRequest.BoostSpec.newBuilder().build()) .addAllSuggestionTypes(new ArrayList()) + .addAllSuggestionTypeSpecs( + new ArrayList()) + .addAllExperimentIds(new ArrayList()) .build(); ApiFuture future = completionServiceClient.advancedCompleteQueryCallable().futureCall(request); diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/completionservice/advancedcompletequery/SyncAdvancedCompleteQuery.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/completionservice/advancedcompletequery/SyncAdvancedCompleteQuery.java index a3d1cfa663be..38c3d4d1e723 100644 --- a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/completionservice/advancedcompletequery/SyncAdvancedCompleteQuery.java +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/completionservice/advancedcompletequery/SyncAdvancedCompleteQuery.java @@ -50,6 +50,9 @@ public static void syncAdvancedCompleteQuery() throws Exception { .setIncludeTailSuggestions(true) .setBoostSpec(AdvancedCompleteQueryRequest.BoostSpec.newBuilder().build()) .addAllSuggestionTypes(new ArrayList()) + .addAllSuggestionTypeSpecs( + new ArrayList()) + .addAllExperimentIds(new ArrayList()) .build(); AdvancedCompleteQueryResponse response = completionServiceClient.advancedCompleteQuery(request); diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/completionservice/removesuggestion/AsyncRemoveSuggestion.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/completionservice/removesuggestion/AsyncRemoveSuggestion.java new file mode 100644 index 000000000000..a37fbc263227 --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/completionservice/removesuggestion/AsyncRemoveSuggestion.java @@ -0,0 +1,58 @@ +/* + * 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.discoveryengine.v1beta.samples; + +// [START discoveryengine_v1beta_generated_CompletionService_RemoveSuggestion_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.discoveryengine.v1beta.CompletionConfigName; +import com.google.cloud.discoveryengine.v1beta.CompletionServiceClient; +import com.google.cloud.discoveryengine.v1beta.RemoveSuggestionRequest; +import com.google.cloud.discoveryengine.v1beta.RemoveSuggestionResponse; +import com.google.cloud.discoveryengine.v1beta.UserInfo; +import com.google.protobuf.Timestamp; + +public class AsyncRemoveSuggestion { + + public static void main(String[] args) throws Exception { + asyncRemoveSuggestion(); + } + + public static void asyncRemoveSuggestion() 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 (CompletionServiceClient completionServiceClient = CompletionServiceClient.create()) { + RemoveSuggestionRequest request = + RemoveSuggestionRequest.newBuilder() + .setCompletionConfig( + CompletionConfigName.ofProjectLocationCollectionEngineName( + "[PROJECT]", "[LOCATION]", "[COLLECTION]", "[ENGINE]") + .toString()) + .setUserPseudoId("userPseudoId-1155274652") + .setUserInfo(UserInfo.newBuilder().build()) + .setRemoveTime(Timestamp.newBuilder().build()) + .build(); + ApiFuture future = + completionServiceClient.removeSuggestionCallable().futureCall(request); + // Do something. + RemoveSuggestionResponse response = future.get(); + } + } +} +// [END discoveryengine_v1beta_generated_CompletionService_RemoveSuggestion_async] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/completionservice/removesuggestion/SyncRemoveSuggestion.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/completionservice/removesuggestion/SyncRemoveSuggestion.java new file mode 100644 index 000000000000..47ceb1dfd6ef --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/completionservice/removesuggestion/SyncRemoveSuggestion.java @@ -0,0 +1,54 @@ +/* + * 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.discoveryengine.v1beta.samples; + +// [START discoveryengine_v1beta_generated_CompletionService_RemoveSuggestion_sync] +import com.google.cloud.discoveryengine.v1beta.CompletionConfigName; +import com.google.cloud.discoveryengine.v1beta.CompletionServiceClient; +import com.google.cloud.discoveryengine.v1beta.RemoveSuggestionRequest; +import com.google.cloud.discoveryengine.v1beta.RemoveSuggestionResponse; +import com.google.cloud.discoveryengine.v1beta.UserInfo; +import com.google.protobuf.Timestamp; + +public class SyncRemoveSuggestion { + + public static void main(String[] args) throws Exception { + syncRemoveSuggestion(); + } + + public static void syncRemoveSuggestion() 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 (CompletionServiceClient completionServiceClient = CompletionServiceClient.create()) { + RemoveSuggestionRequest request = + RemoveSuggestionRequest.newBuilder() + .setCompletionConfig( + CompletionConfigName.ofProjectLocationCollectionEngineName( + "[PROJECT]", "[LOCATION]", "[COLLECTION]", "[ENGINE]") + .toString()) + .setUserPseudoId("userPseudoId-1155274652") + .setUserInfo(UserInfo.newBuilder().build()) + .setRemoveTime(Timestamp.newBuilder().build()) + .build(); + RemoveSuggestionResponse response = completionServiceClient.removeSuggestion(request); + } + } +} +// [END discoveryengine_v1beta_generated_CompletionService_RemoveSuggestion_sync] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/conversationalsearchservice/answerquery/AsyncAnswerQuery.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/conversationalsearchservice/answerquery/AsyncAnswerQuery.java index 59d8e5000806..c4e94ef464a8 100644 --- a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/conversationalsearchservice/answerquery/AsyncAnswerQuery.java +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/conversationalsearchservice/answerquery/AsyncAnswerQuery.java @@ -61,6 +61,7 @@ public static void asyncAnswerQuery() throws Exception { .setAsynchronousMode(true) .setUserPseudoId("userPseudoId-1155274652") .putAllUserLabels(new HashMap()) + .setEndUserSpec(AnswerQueryRequest.EndUserSpec.newBuilder().build()) .build(); ApiFuture future = conversationalSearchServiceClient.answerQueryCallable().futureCall(request); diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/conversationalsearchservice/answerquery/SyncAnswerQuery.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/conversationalsearchservice/answerquery/SyncAnswerQuery.java index f11e93cfbddf..e6b1405edb32 100644 --- a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/conversationalsearchservice/answerquery/SyncAnswerQuery.java +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/conversationalsearchservice/answerquery/SyncAnswerQuery.java @@ -60,6 +60,7 @@ public static void syncAnswerQuery() throws Exception { .setAsynchronousMode(true) .setUserPseudoId("userPseudoId-1155274652") .putAllUserLabels(new HashMap()) + .setEndUserSpec(AnswerQueryRequest.EndUserSpec.newBuilder().build()) .build(); AnswerQueryResponse response = conversationalSearchServiceClient.answerQuery(request); } diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/conversationalsearchservice/createsession/AsyncCreateSession.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/conversationalsearchservice/createsession/AsyncCreateSession.java index 484e62097645..2158b1a2d026 100644 --- a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/conversationalsearchservice/createsession/AsyncCreateSession.java +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/conversationalsearchservice/createsession/AsyncCreateSession.java @@ -44,6 +44,7 @@ public static void asyncCreateSession() throws Exception { "[PROJECT]", "[LOCATION]", "[DATA_STORE]") .toString()) .setSession(Session.newBuilder().build()) + .setSessionId("sessionId607796817") .build(); ApiFuture future = conversationalSearchServiceClient.createSessionCallable().futureCall(request); diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/conversationalsearchservice/createsession/SyncCreateSession.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/conversationalsearchservice/createsession/SyncCreateSession.java index 2a1a022d8338..a77d1aeca154 100644 --- a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/conversationalsearchservice/createsession/SyncCreateSession.java +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/conversationalsearchservice/createsession/SyncCreateSession.java @@ -43,6 +43,7 @@ public static void syncCreateSession() throws Exception { "[PROJECT]", "[LOCATION]", "[DATA_STORE]") .toString()) .setSession(Session.newBuilder().build()) + .setSessionId("sessionId607796817") .build(); Session response = conversationalSearchServiceClient.createSession(request); } diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/conversationalsearchservice/streamanswerquery/AsyncStreamAnswerQuery.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/conversationalsearchservice/streamanswerquery/AsyncStreamAnswerQuery.java new file mode 100644 index 000000000000..f2fba4eee7f3 --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/conversationalsearchservice/streamanswerquery/AsyncStreamAnswerQuery.java @@ -0,0 +1,74 @@ +/* + * 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.discoveryengine.v1beta.samples; + +// [START discoveryengine_v1beta_generated_ConversationalSearchService_StreamAnswerQuery_async] +import com.google.api.gax.rpc.ServerStream; +import com.google.cloud.discoveryengine.v1beta.AnswerQueryRequest; +import com.google.cloud.discoveryengine.v1beta.AnswerQueryResponse; +import com.google.cloud.discoveryengine.v1beta.ConversationalSearchServiceClient; +import com.google.cloud.discoveryengine.v1beta.Query; +import com.google.cloud.discoveryengine.v1beta.ServingConfigName; +import com.google.cloud.discoveryengine.v1beta.SessionName; +import java.util.HashMap; + +public class AsyncStreamAnswerQuery { + + public static void main(String[] args) throws Exception { + asyncStreamAnswerQuery(); + } + + public static void asyncStreamAnswerQuery() 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 (ConversationalSearchServiceClient conversationalSearchServiceClient = + ConversationalSearchServiceClient.create()) { + AnswerQueryRequest request = + AnswerQueryRequest.newBuilder() + .setServingConfig( + ServingConfigName.ofProjectLocationDataStoreServingConfigName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[SERVING_CONFIG]") + .toString()) + .setQuery(Query.newBuilder().build()) + .setSession( + SessionName.ofProjectLocationDataStoreSessionName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[SESSION]") + .toString()) + .setSafetySpec(AnswerQueryRequest.SafetySpec.newBuilder().build()) + .setRelatedQuestionsSpec(AnswerQueryRequest.RelatedQuestionsSpec.newBuilder().build()) + .setGroundingSpec(AnswerQueryRequest.GroundingSpec.newBuilder().build()) + .setAnswerGenerationSpec(AnswerQueryRequest.AnswerGenerationSpec.newBuilder().build()) + .setSearchSpec(AnswerQueryRequest.SearchSpec.newBuilder().build()) + .setQueryUnderstandingSpec( + AnswerQueryRequest.QueryUnderstandingSpec.newBuilder().build()) + .setAsynchronousMode(true) + .setUserPseudoId("userPseudoId-1155274652") + .putAllUserLabels(new HashMap()) + .setEndUserSpec(AnswerQueryRequest.EndUserSpec.newBuilder().build()) + .build(); + ServerStream stream = + conversationalSearchServiceClient.streamAnswerQueryCallable().call(request); + for (AnswerQueryResponse response : stream) { + // Do something when a response is received. + } + } + } +} +// [END discoveryengine_v1beta_generated_ConversationalSearchService_StreamAnswerQuery_async] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/documentservice/importdocuments/AsyncImportDocuments.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/documentservice/importdocuments/AsyncImportDocuments.java index 99b2ccc338e3..0870db908795 100644 --- a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/documentservice/importdocuments/AsyncImportDocuments.java +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/documentservice/importdocuments/AsyncImportDocuments.java @@ -48,6 +48,7 @@ public static void asyncImportDocuments() throws Exception { .setUpdateMask(FieldMask.newBuilder().build()) .setAutoGenerateIds(true) .setIdField("idField1629396127") + .setForceRefreshContent(true) .build(); ApiFuture future = documentServiceClient.importDocumentsCallable().futureCall(request); diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/documentservice/importdocuments/AsyncImportDocumentsLRO.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/documentservice/importdocuments/AsyncImportDocumentsLRO.java index 46de3704b7dc..abd556a19e4e 100644 --- a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/documentservice/importdocuments/AsyncImportDocumentsLRO.java +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/documentservice/importdocuments/AsyncImportDocumentsLRO.java @@ -49,6 +49,7 @@ public static void asyncImportDocumentsLRO() throws Exception { .setUpdateMask(FieldMask.newBuilder().build()) .setAutoGenerateIds(true) .setIdField("idField1629396127") + .setForceRefreshContent(true) .build(); OperationFuture future = documentServiceClient.importDocumentsOperationCallable().futureCall(request); diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/documentservice/importdocuments/SyncImportDocuments.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/documentservice/importdocuments/SyncImportDocuments.java index e69c03cd7d43..f17353be1418 100644 --- a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/documentservice/importdocuments/SyncImportDocuments.java +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/documentservice/importdocuments/SyncImportDocuments.java @@ -47,6 +47,7 @@ public static void syncImportDocuments() throws Exception { .setUpdateMask(FieldMask.newBuilder().build()) .setAutoGenerateIds(true) .setIdField("idField1629396127") + .setForceRefreshContent(true) .build(); ImportDocumentsResponse response = documentServiceClient.importDocumentsAsync(request).get(); } diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/engineservice/getiampolicy/AsyncGetIamPolicy.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/engineservice/getiampolicy/AsyncGetIamPolicy.java new file mode 100644 index 000000000000..41f860ec91f9 --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/engineservice/getiampolicy/AsyncGetIamPolicy.java @@ -0,0 +1,52 @@ +/* + * 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.discoveryengine.v1beta.samples; + +// [START discoveryengine_v1beta_generated_EngineService_GetIamPolicy_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.discoveryengine.v1beta.EngineName; +import com.google.cloud.discoveryengine.v1beta.EngineServiceClient; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.GetPolicyOptions; +import com.google.iam.v1.Policy; + +public class AsyncGetIamPolicy { + + public static void main(String[] args) throws Exception { + asyncGetIamPolicy(); + } + + public static void asyncGetIamPolicy() 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 (EngineServiceClient engineServiceClient = EngineServiceClient.create()) { + GetIamPolicyRequest request = + GetIamPolicyRequest.newBuilder() + .setResource( + EngineName.of("[PROJECT]", "[LOCATION]", "[COLLECTION]", "[ENGINE]").toString()) + .setOptions(GetPolicyOptions.newBuilder().build()) + .build(); + ApiFuture future = engineServiceClient.getIamPolicyCallable().futureCall(request); + // Do something. + Policy response = future.get(); + } + } +} +// [END discoveryengine_v1beta_generated_EngineService_GetIamPolicy_async] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/engineservice/getiampolicy/SyncGetIamPolicy.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/engineservice/getiampolicy/SyncGetIamPolicy.java new file mode 100644 index 000000000000..b11159120a6c --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/engineservice/getiampolicy/SyncGetIamPolicy.java @@ -0,0 +1,49 @@ +/* + * 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.discoveryengine.v1beta.samples; + +// [START discoveryengine_v1beta_generated_EngineService_GetIamPolicy_sync] +import com.google.cloud.discoveryengine.v1beta.EngineName; +import com.google.cloud.discoveryengine.v1beta.EngineServiceClient; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.GetPolicyOptions; +import com.google.iam.v1.Policy; + +public class SyncGetIamPolicy { + + public static void main(String[] args) throws Exception { + syncGetIamPolicy(); + } + + public static void syncGetIamPolicy() 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 (EngineServiceClient engineServiceClient = EngineServiceClient.create()) { + GetIamPolicyRequest request = + GetIamPolicyRequest.newBuilder() + .setResource( + EngineName.of("[PROJECT]", "[LOCATION]", "[COLLECTION]", "[ENGINE]").toString()) + .setOptions(GetPolicyOptions.newBuilder().build()) + .build(); + Policy response = engineServiceClient.getIamPolicy(request); + } + } +} +// [END discoveryengine_v1beta_generated_EngineService_GetIamPolicy_sync] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/engineservice/getiampolicy/SyncGetIamPolicyResourcename.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/engineservice/getiampolicy/SyncGetIamPolicyResourcename.java new file mode 100644 index 000000000000..b878a9d5b59a --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/engineservice/getiampolicy/SyncGetIamPolicyResourcename.java @@ -0,0 +1,43 @@ +/* + * 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.discoveryengine.v1beta.samples; + +// [START discoveryengine_v1beta_generated_EngineService_GetIamPolicy_Resourcename_sync] +import com.google.api.resourcenames.ResourceName; +import com.google.cloud.discoveryengine.v1beta.EngineName; +import com.google.cloud.discoveryengine.v1beta.EngineServiceClient; +import com.google.iam.v1.Policy; + +public class SyncGetIamPolicyResourcename { + + public static void main(String[] args) throws Exception { + syncGetIamPolicyResourcename(); + } + + public static void syncGetIamPolicyResourcename() 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 (EngineServiceClient engineServiceClient = EngineServiceClient.create()) { + ResourceName resource = EngineName.of("[PROJECT]", "[LOCATION]", "[COLLECTION]", "[ENGINE]"); + Policy response = engineServiceClient.getIamPolicy(resource); + } + } +} +// [END discoveryengine_v1beta_generated_EngineService_GetIamPolicy_Resourcename_sync] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/engineservice/getiampolicy/SyncGetIamPolicyString.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/engineservice/getiampolicy/SyncGetIamPolicyString.java new file mode 100644 index 000000000000..0dc0a2f62640 --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/engineservice/getiampolicy/SyncGetIamPolicyString.java @@ -0,0 +1,42 @@ +/* + * 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.discoveryengine.v1beta.samples; + +// [START discoveryengine_v1beta_generated_EngineService_GetIamPolicy_String_sync] +import com.google.cloud.discoveryengine.v1beta.AclConfigName; +import com.google.cloud.discoveryengine.v1beta.EngineServiceClient; +import com.google.iam.v1.Policy; + +public class SyncGetIamPolicyString { + + public static void main(String[] args) throws Exception { + syncGetIamPolicyString(); + } + + public static void syncGetIamPolicyString() 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 (EngineServiceClient engineServiceClient = EngineServiceClient.create()) { + String resource = AclConfigName.of("[PROJECT]", "[LOCATION]").toString(); + Policy response = engineServiceClient.getIamPolicy(resource); + } + } +} +// [END discoveryengine_v1beta_generated_EngineService_GetIamPolicy_String_sync] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/engineservice/setiampolicy/AsyncSetIamPolicy.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/engineservice/setiampolicy/AsyncSetIamPolicy.java new file mode 100644 index 000000000000..6a79e46efee0 --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/engineservice/setiampolicy/AsyncSetIamPolicy.java @@ -0,0 +1,53 @@ +/* + * 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.discoveryengine.v1beta.samples; + +// [START discoveryengine_v1beta_generated_EngineService_SetIamPolicy_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.discoveryengine.v1beta.EngineName; +import com.google.cloud.discoveryengine.v1beta.EngineServiceClient; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.protobuf.FieldMask; + +public class AsyncSetIamPolicy { + + public static void main(String[] args) throws Exception { + asyncSetIamPolicy(); + } + + public static void asyncSetIamPolicy() 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 (EngineServiceClient engineServiceClient = EngineServiceClient.create()) { + SetIamPolicyRequest request = + SetIamPolicyRequest.newBuilder() + .setResource( + EngineName.of("[PROJECT]", "[LOCATION]", "[COLLECTION]", "[ENGINE]").toString()) + .setPolicy(Policy.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + ApiFuture future = engineServiceClient.setIamPolicyCallable().futureCall(request); + // Do something. + Policy response = future.get(); + } + } +} +// [END discoveryengine_v1beta_generated_EngineService_SetIamPolicy_async] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/engineservice/setiampolicy/SyncSetIamPolicy.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/engineservice/setiampolicy/SyncSetIamPolicy.java new file mode 100644 index 000000000000..8fb14479e371 --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/engineservice/setiampolicy/SyncSetIamPolicy.java @@ -0,0 +1,50 @@ +/* + * 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.discoveryengine.v1beta.samples; + +// [START discoveryengine_v1beta_generated_EngineService_SetIamPolicy_sync] +import com.google.cloud.discoveryengine.v1beta.EngineName; +import com.google.cloud.discoveryengine.v1beta.EngineServiceClient; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.protobuf.FieldMask; + +public class SyncSetIamPolicy { + + public static void main(String[] args) throws Exception { + syncSetIamPolicy(); + } + + public static void syncSetIamPolicy() 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 (EngineServiceClient engineServiceClient = EngineServiceClient.create()) { + SetIamPolicyRequest request = + SetIamPolicyRequest.newBuilder() + .setResource( + EngineName.of("[PROJECT]", "[LOCATION]", "[COLLECTION]", "[ENGINE]").toString()) + .setPolicy(Policy.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + Policy response = engineServiceClient.setIamPolicy(request); + } + } +} +// [END discoveryengine_v1beta_generated_EngineService_SetIamPolicy_sync] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/engineservice/setiampolicy/SyncSetIamPolicyResourcenamePolicy.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/engineservice/setiampolicy/SyncSetIamPolicyResourcenamePolicy.java new file mode 100644 index 000000000000..bdd0191b513e --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/engineservice/setiampolicy/SyncSetIamPolicyResourcenamePolicy.java @@ -0,0 +1,44 @@ +/* + * 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.discoveryengine.v1beta.samples; + +// [START discoveryengine_v1beta_generated_EngineService_SetIamPolicy_ResourcenamePolicy_sync] +import com.google.api.resourcenames.ResourceName; +import com.google.cloud.discoveryengine.v1beta.EngineName; +import com.google.cloud.discoveryengine.v1beta.EngineServiceClient; +import com.google.iam.v1.Policy; + +public class SyncSetIamPolicyResourcenamePolicy { + + public static void main(String[] args) throws Exception { + syncSetIamPolicyResourcenamePolicy(); + } + + public static void syncSetIamPolicyResourcenamePolicy() 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 (EngineServiceClient engineServiceClient = EngineServiceClient.create()) { + ResourceName resource = EngineName.of("[PROJECT]", "[LOCATION]", "[COLLECTION]", "[ENGINE]"); + Policy policy = Policy.newBuilder().build(); + Policy response = engineServiceClient.setIamPolicy(resource, policy); + } + } +} +// [END discoveryengine_v1beta_generated_EngineService_SetIamPolicy_ResourcenamePolicy_sync] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/engineservice/setiampolicy/SyncSetIamPolicyStringPolicy.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/engineservice/setiampolicy/SyncSetIamPolicyStringPolicy.java new file mode 100644 index 000000000000..169d60a55516 --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/engineservice/setiampolicy/SyncSetIamPolicyStringPolicy.java @@ -0,0 +1,43 @@ +/* + * 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.discoveryengine.v1beta.samples; + +// [START discoveryengine_v1beta_generated_EngineService_SetIamPolicy_StringPolicy_sync] +import com.google.cloud.discoveryengine.v1beta.AclConfigName; +import com.google.cloud.discoveryengine.v1beta.EngineServiceClient; +import com.google.iam.v1.Policy; + +public class SyncSetIamPolicyStringPolicy { + + public static void main(String[] args) throws Exception { + syncSetIamPolicyStringPolicy(); + } + + public static void syncSetIamPolicyStringPolicy() 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 (EngineServiceClient engineServiceClient = EngineServiceClient.create()) { + String resource = AclConfigName.of("[PROJECT]", "[LOCATION]").toString(); + Policy policy = Policy.newBuilder().build(); + Policy response = engineServiceClient.setIamPolicy(resource, policy); + } + } +} +// [END discoveryengine_v1beta_generated_EngineService_SetIamPolicy_StringPolicy_sync] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/identitymappingstoreservice/create/SyncCreateSetCredentialsProvider.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/identitymappingstoreservice/create/SyncCreateSetCredentialsProvider.java new file mode 100644 index 000000000000..7d75e9f2b716 --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/identitymappingstoreservice/create/SyncCreateSetCredentialsProvider.java @@ -0,0 +1,45 @@ +/* + * 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.discoveryengine.v1beta.samples; + +// [START discoveryengine_v1beta_generated_IdentityMappingStoreService_Create_SetCredentialsProvider_sync] +import com.google.api.gax.core.FixedCredentialsProvider; +import com.google.cloud.discoveryengine.v1beta.IdentityMappingStoreServiceClient; +import com.google.cloud.discoveryengine.v1beta.IdentityMappingStoreServiceSettings; +import com.google.cloud.discoveryengine.v1beta.myCredentials; + +public class SyncCreateSetCredentialsProvider { + + public static void main(String[] args) throws Exception { + syncCreateSetCredentialsProvider(); + } + + public static void syncCreateSetCredentialsProvider() 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 + IdentityMappingStoreServiceSettings identityMappingStoreServiceSettings = + IdentityMappingStoreServiceSettings.newBuilder() + .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) + .build(); + IdentityMappingStoreServiceClient identityMappingStoreServiceClient = + IdentityMappingStoreServiceClient.create(identityMappingStoreServiceSettings); + } +} +// [END discoveryengine_v1beta_generated_IdentityMappingStoreService_Create_SetCredentialsProvider_sync] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/identitymappingstoreservice/create/SyncCreateSetEndpoint.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/identitymappingstoreservice/create/SyncCreateSetEndpoint.java new file mode 100644 index 000000000000..308fc8e39843 --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/identitymappingstoreservice/create/SyncCreateSetEndpoint.java @@ -0,0 +1,42 @@ +/* + * 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.discoveryengine.v1beta.samples; + +// [START discoveryengine_v1beta_generated_IdentityMappingStoreService_Create_SetEndpoint_sync] +import com.google.cloud.discoveryengine.v1beta.IdentityMappingStoreServiceClient; +import com.google.cloud.discoveryengine.v1beta.IdentityMappingStoreServiceSettings; +import com.google.cloud.discoveryengine.v1beta.myEndpoint; + +public class SyncCreateSetEndpoint { + + public static void main(String[] args) throws Exception { + syncCreateSetEndpoint(); + } + + public static void syncCreateSetEndpoint() 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 + IdentityMappingStoreServiceSettings identityMappingStoreServiceSettings = + IdentityMappingStoreServiceSettings.newBuilder().setEndpoint(myEndpoint).build(); + IdentityMappingStoreServiceClient identityMappingStoreServiceClient = + IdentityMappingStoreServiceClient.create(identityMappingStoreServiceSettings); + } +} +// [END discoveryengine_v1beta_generated_IdentityMappingStoreService_Create_SetEndpoint_sync] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/identitymappingstoreservice/create/SyncCreateUseHttpJsonTransport.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/identitymappingstoreservice/create/SyncCreateUseHttpJsonTransport.java new file mode 100644 index 000000000000..f70738807d6d --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/identitymappingstoreservice/create/SyncCreateUseHttpJsonTransport.java @@ -0,0 +1,41 @@ +/* + * 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.discoveryengine.v1beta.samples; + +// [START discoveryengine_v1beta_generated_IdentityMappingStoreService_Create_UseHttpJsonTransport_sync] +import com.google.cloud.discoveryengine.v1beta.IdentityMappingStoreServiceClient; +import com.google.cloud.discoveryengine.v1beta.IdentityMappingStoreServiceSettings; + +public class SyncCreateUseHttpJsonTransport { + + public static void main(String[] args) throws Exception { + syncCreateUseHttpJsonTransport(); + } + + public static void syncCreateUseHttpJsonTransport() 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 + IdentityMappingStoreServiceSettings identityMappingStoreServiceSettings = + IdentityMappingStoreServiceSettings.newHttpJsonBuilder().build(); + IdentityMappingStoreServiceClient identityMappingStoreServiceClient = + IdentityMappingStoreServiceClient.create(identityMappingStoreServiceSettings); + } +} +// [END discoveryengine_v1beta_generated_IdentityMappingStoreService_Create_UseHttpJsonTransport_sync] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/identitymappingstoreservice/createidentitymappingstore/AsyncCreateIdentityMappingStore.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/identitymappingstoreservice/createidentitymappingstore/AsyncCreateIdentityMappingStore.java new file mode 100644 index 000000000000..c23a2e853c75 --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/identitymappingstoreservice/createidentitymappingstore/AsyncCreateIdentityMappingStore.java @@ -0,0 +1,55 @@ +/* + * 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.discoveryengine.v1beta.samples; + +// [START discoveryengine_v1beta_generated_IdentityMappingStoreService_CreateIdentityMappingStore_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.discoveryengine.v1beta.CreateIdentityMappingStoreRequest; +import com.google.cloud.discoveryengine.v1beta.IdentityMappingStore; +import com.google.cloud.discoveryengine.v1beta.IdentityMappingStoreServiceClient; +import com.google.cloud.discoveryengine.v1beta.LocationName; + +public class AsyncCreateIdentityMappingStore { + + public static void main(String[] args) throws Exception { + asyncCreateIdentityMappingStore(); + } + + public static void asyncCreateIdentityMappingStore() 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 (IdentityMappingStoreServiceClient identityMappingStoreServiceClient = + IdentityMappingStoreServiceClient.create()) { + CreateIdentityMappingStoreRequest request = + CreateIdentityMappingStoreRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setIdentityMappingStoreId("identityMappingStoreId677904780") + .setIdentityMappingStore(IdentityMappingStore.newBuilder().build()) + .build(); + ApiFuture future = + identityMappingStoreServiceClient + .createIdentityMappingStoreCallable() + .futureCall(request); + // Do something. + IdentityMappingStore response = future.get(); + } + } +} +// [END discoveryengine_v1beta_generated_IdentityMappingStoreService_CreateIdentityMappingStore_async] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/identitymappingstoreservice/createidentitymappingstore/SyncCreateIdentityMappingStore.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/identitymappingstoreservice/createidentitymappingstore/SyncCreateIdentityMappingStore.java new file mode 100644 index 000000000000..9c97a1785476 --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/identitymappingstoreservice/createidentitymappingstore/SyncCreateIdentityMappingStore.java @@ -0,0 +1,50 @@ +/* + * 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.discoveryengine.v1beta.samples; + +// [START discoveryengine_v1beta_generated_IdentityMappingStoreService_CreateIdentityMappingStore_sync] +import com.google.cloud.discoveryengine.v1beta.CreateIdentityMappingStoreRequest; +import com.google.cloud.discoveryengine.v1beta.IdentityMappingStore; +import com.google.cloud.discoveryengine.v1beta.IdentityMappingStoreServiceClient; +import com.google.cloud.discoveryengine.v1beta.LocationName; + +public class SyncCreateIdentityMappingStore { + + public static void main(String[] args) throws Exception { + syncCreateIdentityMappingStore(); + } + + public static void syncCreateIdentityMappingStore() 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 (IdentityMappingStoreServiceClient identityMappingStoreServiceClient = + IdentityMappingStoreServiceClient.create()) { + CreateIdentityMappingStoreRequest request = + CreateIdentityMappingStoreRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setIdentityMappingStoreId("identityMappingStoreId677904780") + .setIdentityMappingStore(IdentityMappingStore.newBuilder().build()) + .build(); + IdentityMappingStore response = + identityMappingStoreServiceClient.createIdentityMappingStore(request); + } + } +} +// [END discoveryengine_v1beta_generated_IdentityMappingStoreService_CreateIdentityMappingStore_sync] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/identitymappingstoreservice/createidentitymappingstore/SyncCreateIdentityMappingStoreLocationnameIdentitymappingstoreString.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/identitymappingstoreservice/createidentitymappingstore/SyncCreateIdentityMappingStoreLocationnameIdentitymappingstoreString.java new file mode 100644 index 000000000000..d43c5ca4392a --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/identitymappingstoreservice/createidentitymappingstore/SyncCreateIdentityMappingStoreLocationnameIdentitymappingstoreString.java @@ -0,0 +1,48 @@ +/* + * 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.discoveryengine.v1beta.samples; + +// [START discoveryengine_v1beta_generated_IdentityMappingStoreService_CreateIdentityMappingStore_LocationnameIdentitymappingstoreString_sync] +import com.google.cloud.discoveryengine.v1beta.IdentityMappingStore; +import com.google.cloud.discoveryengine.v1beta.IdentityMappingStoreServiceClient; +import com.google.cloud.discoveryengine.v1beta.LocationName; + +public class SyncCreateIdentityMappingStoreLocationnameIdentitymappingstoreString { + + public static void main(String[] args) throws Exception { + syncCreateIdentityMappingStoreLocationnameIdentitymappingstoreString(); + } + + public static void syncCreateIdentityMappingStoreLocationnameIdentitymappingstoreString() + 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 (IdentityMappingStoreServiceClient identityMappingStoreServiceClient = + IdentityMappingStoreServiceClient.create()) { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + IdentityMappingStore identityMappingStore = IdentityMappingStore.newBuilder().build(); + String identityMappingStoreId = "identityMappingStoreId677904780"; + IdentityMappingStore response = + identityMappingStoreServiceClient.createIdentityMappingStore( + parent, identityMappingStore, identityMappingStoreId); + } + } +} +// [END discoveryengine_v1beta_generated_IdentityMappingStoreService_CreateIdentityMappingStore_LocationnameIdentitymappingstoreString_sync] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/identitymappingstoreservice/createidentitymappingstore/SyncCreateIdentityMappingStoreStringIdentitymappingstoreString.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/identitymappingstoreservice/createidentitymappingstore/SyncCreateIdentityMappingStoreStringIdentitymappingstoreString.java new file mode 100644 index 000000000000..f79a0a2a0603 --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/identitymappingstoreservice/createidentitymappingstore/SyncCreateIdentityMappingStoreStringIdentitymappingstoreString.java @@ -0,0 +1,48 @@ +/* + * 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.discoveryengine.v1beta.samples; + +// [START discoveryengine_v1beta_generated_IdentityMappingStoreService_CreateIdentityMappingStore_StringIdentitymappingstoreString_sync] +import com.google.cloud.discoveryengine.v1beta.IdentityMappingStore; +import com.google.cloud.discoveryengine.v1beta.IdentityMappingStoreServiceClient; +import com.google.cloud.discoveryengine.v1beta.LocationName; + +public class SyncCreateIdentityMappingStoreStringIdentitymappingstoreString { + + public static void main(String[] args) throws Exception { + syncCreateIdentityMappingStoreStringIdentitymappingstoreString(); + } + + public static void syncCreateIdentityMappingStoreStringIdentitymappingstoreString() + 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 (IdentityMappingStoreServiceClient identityMappingStoreServiceClient = + IdentityMappingStoreServiceClient.create()) { + String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); + IdentityMappingStore identityMappingStore = IdentityMappingStore.newBuilder().build(); + String identityMappingStoreId = "identityMappingStoreId677904780"; + IdentityMappingStore response = + identityMappingStoreServiceClient.createIdentityMappingStore( + parent, identityMappingStore, identityMappingStoreId); + } + } +} +// [END discoveryengine_v1beta_generated_IdentityMappingStoreService_CreateIdentityMappingStore_StringIdentitymappingstoreString_sync] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/identitymappingstoreservice/deleteidentitymappingstore/AsyncDeleteIdentityMappingStore.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/identitymappingstoreservice/deleteidentitymappingstore/AsyncDeleteIdentityMappingStore.java new file mode 100644 index 000000000000..9d363be866e3 --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/identitymappingstoreservice/deleteidentitymappingstore/AsyncDeleteIdentityMappingStore.java @@ -0,0 +1,55 @@ +/* + * 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.discoveryengine.v1beta.samples; + +// [START discoveryengine_v1beta_generated_IdentityMappingStoreService_DeleteIdentityMappingStore_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.discoveryengine.v1beta.DeleteIdentityMappingStoreRequest; +import com.google.cloud.discoveryengine.v1beta.IdentityMappingStoreName; +import com.google.cloud.discoveryengine.v1beta.IdentityMappingStoreServiceClient; +import com.google.longrunning.Operation; + +public class AsyncDeleteIdentityMappingStore { + + public static void main(String[] args) throws Exception { + asyncDeleteIdentityMappingStore(); + } + + public static void asyncDeleteIdentityMappingStore() 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 (IdentityMappingStoreServiceClient identityMappingStoreServiceClient = + IdentityMappingStoreServiceClient.create()) { + DeleteIdentityMappingStoreRequest request = + DeleteIdentityMappingStoreRequest.newBuilder() + .setName( + IdentityMappingStoreName.of("[PROJECT]", "[LOCATION]", "[IDENTITY_MAPPING_STORE]") + .toString()) + .build(); + ApiFuture future = + identityMappingStoreServiceClient + .deleteIdentityMappingStoreCallable() + .futureCall(request); + // Do something. + future.get(); + } + } +} +// [END discoveryengine_v1beta_generated_IdentityMappingStoreService_DeleteIdentityMappingStore_async] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/identitymappingstoreservice/deleteidentitymappingstore/AsyncDeleteIdentityMappingStoreLRO.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/identitymappingstoreservice/deleteidentitymappingstore/AsyncDeleteIdentityMappingStoreLRO.java new file mode 100644 index 000000000000..91bb0b9dfde4 --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/identitymappingstoreservice/deleteidentitymappingstore/AsyncDeleteIdentityMappingStoreLRO.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.cloud.discoveryengine.v1beta.samples; + +// [START discoveryengine_v1beta_generated_IdentityMappingStoreService_DeleteIdentityMappingStore_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.discoveryengine.v1beta.DeleteIdentityMappingStoreMetadata; +import com.google.cloud.discoveryengine.v1beta.DeleteIdentityMappingStoreRequest; +import com.google.cloud.discoveryengine.v1beta.IdentityMappingStoreName; +import com.google.cloud.discoveryengine.v1beta.IdentityMappingStoreServiceClient; +import com.google.protobuf.Empty; + +public class AsyncDeleteIdentityMappingStoreLRO { + + public static void main(String[] args) throws Exception { + asyncDeleteIdentityMappingStoreLRO(); + } + + public static void asyncDeleteIdentityMappingStoreLRO() 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 (IdentityMappingStoreServiceClient identityMappingStoreServiceClient = + IdentityMappingStoreServiceClient.create()) { + DeleteIdentityMappingStoreRequest request = + DeleteIdentityMappingStoreRequest.newBuilder() + .setName( + IdentityMappingStoreName.of("[PROJECT]", "[LOCATION]", "[IDENTITY_MAPPING_STORE]") + .toString()) + .build(); + OperationFuture future = + identityMappingStoreServiceClient + .deleteIdentityMappingStoreOperationCallable() + .futureCall(request); + // Do something. + future.get(); + } + } +} +// [END discoveryengine_v1beta_generated_IdentityMappingStoreService_DeleteIdentityMappingStore_LRO_async] diff --git a/java-oracledatabase/samples/snippets/generated/com/google/cloud/oracledatabase/v1/oracledatabase/getgoldengatedeploymentversion/SyncGetGoldengateDeploymentVersion.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/identitymappingstoreservice/deleteidentitymappingstore/SyncDeleteIdentityMappingStore.java similarity index 50% rename from java-oracledatabase/samples/snippets/generated/com/google/cloud/oracledatabase/v1/oracledatabase/getgoldengatedeploymentversion/SyncGetGoldengateDeploymentVersion.java rename to java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/identitymappingstoreservice/deleteidentitymappingstore/SyncDeleteIdentityMappingStore.java index 6469d93d5b76..a4fca773f9e0 100644 --- a/java-oracledatabase/samples/snippets/generated/com/google/cloud/oracledatabase/v1/oracledatabase/getgoldengatedeploymentversion/SyncGetGoldengateDeploymentVersion.java +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/identitymappingstoreservice/deleteidentitymappingstore/SyncDeleteIdentityMappingStore.java @@ -14,37 +14,36 @@ * limitations under the License. */ -package com.google.cloud.oracledatabase.v1.samples; +package com.google.cloud.discoveryengine.v1beta.samples; -// [START oracledatabase_v1_generated_OracleDatabase_GetGoldengateDeploymentVersion_sync] -import com.google.cloud.oracledatabase.v1.GetGoldengateDeploymentVersionRequest; -import com.google.cloud.oracledatabase.v1.GoldengateDeploymentVersion; -import com.google.cloud.oracledatabase.v1.GoldengateDeploymentVersionName; -import com.google.cloud.oracledatabase.v1.OracleDatabaseClient; +// [START discoveryengine_v1beta_generated_IdentityMappingStoreService_DeleteIdentityMappingStore_sync] +import com.google.cloud.discoveryengine.v1beta.DeleteIdentityMappingStoreRequest; +import com.google.cloud.discoveryengine.v1beta.IdentityMappingStoreName; +import com.google.cloud.discoveryengine.v1beta.IdentityMappingStoreServiceClient; +import com.google.protobuf.Empty; -public class SyncGetGoldengateDeploymentVersion { +public class SyncDeleteIdentityMappingStore { public static void main(String[] args) throws Exception { - syncGetGoldengateDeploymentVersion(); + syncDeleteIdentityMappingStore(); } - public static void syncGetGoldengateDeploymentVersion() throws Exception { + public static void syncDeleteIdentityMappingStore() 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 (OracleDatabaseClient oracleDatabaseClient = OracleDatabaseClient.create()) { - GetGoldengateDeploymentVersionRequest request = - GetGoldengateDeploymentVersionRequest.newBuilder() + try (IdentityMappingStoreServiceClient identityMappingStoreServiceClient = + IdentityMappingStoreServiceClient.create()) { + DeleteIdentityMappingStoreRequest request = + DeleteIdentityMappingStoreRequest.newBuilder() .setName( - GoldengateDeploymentVersionName.of( - "[PROJECT]", "[LOCATION]", "[GOLDENGATE_DEPLOYMENT_VERSION]") + IdentityMappingStoreName.of("[PROJECT]", "[LOCATION]", "[IDENTITY_MAPPING_STORE]") .toString()) .build(); - GoldengateDeploymentVersion response = - oracleDatabaseClient.getGoldengateDeploymentVersion(request); + identityMappingStoreServiceClient.deleteIdentityMappingStoreAsync(request).get(); } } } -// [END oracledatabase_v1_generated_OracleDatabase_GetGoldengateDeploymentVersion_sync] +// [END discoveryengine_v1beta_generated_IdentityMappingStoreService_DeleteIdentityMappingStore_sync] diff --git a/java-oracledatabase/samples/snippets/generated/com/google/cloud/oracledatabase/v1/oracledatabase/getgoldengatedeploymenttype/SyncGetGoldengateDeploymentTypeGoldengatedeploymenttypename.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/identitymappingstoreservice/deleteidentitymappingstore/SyncDeleteIdentityMappingStoreIdentitymappingstorename.java similarity index 50% rename from java-oracledatabase/samples/snippets/generated/com/google/cloud/oracledatabase/v1/oracledatabase/getgoldengatedeploymenttype/SyncGetGoldengateDeploymentTypeGoldengatedeploymenttypename.java rename to java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/identitymappingstoreservice/deleteidentitymappingstore/SyncDeleteIdentityMappingStoreIdentitymappingstorename.java index 207e809c3903..923e59f23675 100644 --- a/java-oracledatabase/samples/snippets/generated/com/google/cloud/oracledatabase/v1/oracledatabase/getgoldengatedeploymenttype/SyncGetGoldengateDeploymentTypeGoldengatedeploymenttypename.java +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/identitymappingstoreservice/deleteidentitymappingstore/SyncDeleteIdentityMappingStoreIdentitymappingstorename.java @@ -14,32 +14,31 @@ * limitations under the License. */ -package com.google.cloud.oracledatabase.v1.samples; +package com.google.cloud.discoveryengine.v1beta.samples; -// [START oracledatabase_v1_generated_OracleDatabase_GetGoldengateDeploymentType_Goldengatedeploymenttypename_sync] -import com.google.cloud.oracledatabase.v1.GoldengateDeploymentType; -import com.google.cloud.oracledatabase.v1.GoldengateDeploymentTypeName; -import com.google.cloud.oracledatabase.v1.OracleDatabaseClient; +// [START discoveryengine_v1beta_generated_IdentityMappingStoreService_DeleteIdentityMappingStore_Identitymappingstorename_sync] +import com.google.cloud.discoveryengine.v1beta.IdentityMappingStoreName; +import com.google.cloud.discoveryengine.v1beta.IdentityMappingStoreServiceClient; +import com.google.protobuf.Empty; -public class SyncGetGoldengateDeploymentTypeGoldengatedeploymenttypename { +public class SyncDeleteIdentityMappingStoreIdentitymappingstorename { public static void main(String[] args) throws Exception { - syncGetGoldengateDeploymentTypeGoldengatedeploymenttypename(); + syncDeleteIdentityMappingStoreIdentitymappingstorename(); } - public static void syncGetGoldengateDeploymentTypeGoldengatedeploymenttypename() - throws Exception { + public static void syncDeleteIdentityMappingStoreIdentitymappingstorename() 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 (OracleDatabaseClient oracleDatabaseClient = OracleDatabaseClient.create()) { - GoldengateDeploymentTypeName name = - GoldengateDeploymentTypeName.of( - "[PROJECT]", "[LOCATION]", "[GOLDENGATE_DEPLOYMENT_TYPE]"); - GoldengateDeploymentType response = oracleDatabaseClient.getGoldengateDeploymentType(name); + try (IdentityMappingStoreServiceClient identityMappingStoreServiceClient = + IdentityMappingStoreServiceClient.create()) { + IdentityMappingStoreName name = + IdentityMappingStoreName.of("[PROJECT]", "[LOCATION]", "[IDENTITY_MAPPING_STORE]"); + identityMappingStoreServiceClient.deleteIdentityMappingStoreAsync(name).get(); } } } -// [END oracledatabase_v1_generated_OracleDatabase_GetGoldengateDeploymentType_Goldengatedeploymenttypename_sync] +// [END discoveryengine_v1beta_generated_IdentityMappingStoreService_DeleteIdentityMappingStore_Identitymappingstorename_sync] diff --git a/java-oracledatabase/samples/snippets/generated/com/google/cloud/oracledatabase/v1/oracledatabase/getgoldengatedeploymentversion/SyncGetGoldengateDeploymentVersionString.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/identitymappingstoreservice/deleteidentitymappingstore/SyncDeleteIdentityMappingStoreString.java similarity index 54% rename from java-oracledatabase/samples/snippets/generated/com/google/cloud/oracledatabase/v1/oracledatabase/getgoldengatedeploymentversion/SyncGetGoldengateDeploymentVersionString.java rename to java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/identitymappingstoreservice/deleteidentitymappingstore/SyncDeleteIdentityMappingStoreString.java index fab25a9479af..7a1e534bd1ba 100644 --- a/java-oracledatabase/samples/snippets/generated/com/google/cloud/oracledatabase/v1/oracledatabase/getgoldengatedeploymentversion/SyncGetGoldengateDeploymentVersionString.java +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/identitymappingstoreservice/deleteidentitymappingstore/SyncDeleteIdentityMappingStoreString.java @@ -14,33 +14,32 @@ * limitations under the License. */ -package com.google.cloud.oracledatabase.v1.samples; +package com.google.cloud.discoveryengine.v1beta.samples; -// [START oracledatabase_v1_generated_OracleDatabase_GetGoldengateDeploymentVersion_String_sync] -import com.google.cloud.oracledatabase.v1.GoldengateDeploymentVersion; -import com.google.cloud.oracledatabase.v1.GoldengateDeploymentVersionName; -import com.google.cloud.oracledatabase.v1.OracleDatabaseClient; +// [START discoveryengine_v1beta_generated_IdentityMappingStoreService_DeleteIdentityMappingStore_String_sync] +import com.google.cloud.discoveryengine.v1beta.IdentityMappingStoreName; +import com.google.cloud.discoveryengine.v1beta.IdentityMappingStoreServiceClient; +import com.google.protobuf.Empty; -public class SyncGetGoldengateDeploymentVersionString { +public class SyncDeleteIdentityMappingStoreString { public static void main(String[] args) throws Exception { - syncGetGoldengateDeploymentVersionString(); + syncDeleteIdentityMappingStoreString(); } - public static void syncGetGoldengateDeploymentVersionString() throws Exception { + public static void syncDeleteIdentityMappingStoreString() 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 (OracleDatabaseClient oracleDatabaseClient = OracleDatabaseClient.create()) { + try (IdentityMappingStoreServiceClient identityMappingStoreServiceClient = + IdentityMappingStoreServiceClient.create()) { String name = - GoldengateDeploymentVersionName.of( - "[PROJECT]", "[LOCATION]", "[GOLDENGATE_DEPLOYMENT_VERSION]") + IdentityMappingStoreName.of("[PROJECT]", "[LOCATION]", "[IDENTITY_MAPPING_STORE]") .toString(); - GoldengateDeploymentVersion response = - oracleDatabaseClient.getGoldengateDeploymentVersion(name); + identityMappingStoreServiceClient.deleteIdentityMappingStoreAsync(name).get(); } } } -// [END oracledatabase_v1_generated_OracleDatabase_GetGoldengateDeploymentVersion_String_sync] +// [END discoveryengine_v1beta_generated_IdentityMappingStoreService_DeleteIdentityMappingStore_String_sync] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/identitymappingstoreservice/getidentitymappingstore/AsyncGetIdentityMappingStore.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/identitymappingstoreservice/getidentitymappingstore/AsyncGetIdentityMappingStore.java new file mode 100644 index 000000000000..3e8d63f528c0 --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/identitymappingstoreservice/getidentitymappingstore/AsyncGetIdentityMappingStore.java @@ -0,0 +1,53 @@ +/* + * 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.discoveryengine.v1beta.samples; + +// [START discoveryengine_v1beta_generated_IdentityMappingStoreService_GetIdentityMappingStore_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.discoveryengine.v1beta.GetIdentityMappingStoreRequest; +import com.google.cloud.discoveryengine.v1beta.IdentityMappingStore; +import com.google.cloud.discoveryengine.v1beta.IdentityMappingStoreName; +import com.google.cloud.discoveryengine.v1beta.IdentityMappingStoreServiceClient; + +public class AsyncGetIdentityMappingStore { + + public static void main(String[] args) throws Exception { + asyncGetIdentityMappingStore(); + } + + public static void asyncGetIdentityMappingStore() 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 (IdentityMappingStoreServiceClient identityMappingStoreServiceClient = + IdentityMappingStoreServiceClient.create()) { + GetIdentityMappingStoreRequest request = + GetIdentityMappingStoreRequest.newBuilder() + .setName( + IdentityMappingStoreName.of("[PROJECT]", "[LOCATION]", "[IDENTITY_MAPPING_STORE]") + .toString()) + .build(); + ApiFuture future = + identityMappingStoreServiceClient.getIdentityMappingStoreCallable().futureCall(request); + // Do something. + IdentityMappingStore response = future.get(); + } + } +} +// [END discoveryengine_v1beta_generated_IdentityMappingStoreService_GetIdentityMappingStore_async] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/identitymappingstoreservice/getidentitymappingstore/SyncGetIdentityMappingStore.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/identitymappingstoreservice/getidentitymappingstore/SyncGetIdentityMappingStore.java new file mode 100644 index 000000000000..130df833b217 --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/identitymappingstoreservice/getidentitymappingstore/SyncGetIdentityMappingStore.java @@ -0,0 +1,50 @@ +/* + * 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.discoveryengine.v1beta.samples; + +// [START discoveryengine_v1beta_generated_IdentityMappingStoreService_GetIdentityMappingStore_sync] +import com.google.cloud.discoveryengine.v1beta.GetIdentityMappingStoreRequest; +import com.google.cloud.discoveryengine.v1beta.IdentityMappingStore; +import com.google.cloud.discoveryengine.v1beta.IdentityMappingStoreName; +import com.google.cloud.discoveryengine.v1beta.IdentityMappingStoreServiceClient; + +public class SyncGetIdentityMappingStore { + + public static void main(String[] args) throws Exception { + syncGetIdentityMappingStore(); + } + + public static void syncGetIdentityMappingStore() 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 (IdentityMappingStoreServiceClient identityMappingStoreServiceClient = + IdentityMappingStoreServiceClient.create()) { + GetIdentityMappingStoreRequest request = + GetIdentityMappingStoreRequest.newBuilder() + .setName( + IdentityMappingStoreName.of("[PROJECT]", "[LOCATION]", "[IDENTITY_MAPPING_STORE]") + .toString()) + .build(); + IdentityMappingStore response = + identityMappingStoreServiceClient.getIdentityMappingStore(request); + } + } +} +// [END discoveryengine_v1beta_generated_IdentityMappingStoreService_GetIdentityMappingStore_sync] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/identitymappingstoreservice/getidentitymappingstore/SyncGetIdentityMappingStoreIdentitymappingstorename.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/identitymappingstoreservice/getidentitymappingstore/SyncGetIdentityMappingStoreIdentitymappingstorename.java new file mode 100644 index 000000000000..56b663d23701 --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/identitymappingstoreservice/getidentitymappingstore/SyncGetIdentityMappingStoreIdentitymappingstorename.java @@ -0,0 +1,45 @@ +/* + * 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.discoveryengine.v1beta.samples; + +// [START discoveryengine_v1beta_generated_IdentityMappingStoreService_GetIdentityMappingStore_Identitymappingstorename_sync] +import com.google.cloud.discoveryengine.v1beta.IdentityMappingStore; +import com.google.cloud.discoveryengine.v1beta.IdentityMappingStoreName; +import com.google.cloud.discoveryengine.v1beta.IdentityMappingStoreServiceClient; + +public class SyncGetIdentityMappingStoreIdentitymappingstorename { + + public static void main(String[] args) throws Exception { + syncGetIdentityMappingStoreIdentitymappingstorename(); + } + + public static void syncGetIdentityMappingStoreIdentitymappingstorename() 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 (IdentityMappingStoreServiceClient identityMappingStoreServiceClient = + IdentityMappingStoreServiceClient.create()) { + IdentityMappingStoreName name = + IdentityMappingStoreName.of("[PROJECT]", "[LOCATION]", "[IDENTITY_MAPPING_STORE]"); + IdentityMappingStore response = + identityMappingStoreServiceClient.getIdentityMappingStore(name); + } + } +} +// [END discoveryengine_v1beta_generated_IdentityMappingStoreService_GetIdentityMappingStore_Identitymappingstorename_sync] diff --git a/java-oracledatabase/samples/snippets/generated/com/google/cloud/oracledatabase/v1/oracledatabase/getgoldengatedeploymentenvironment/SyncGetGoldengateDeploymentEnvironmentString.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/identitymappingstoreservice/getidentitymappingstore/SyncGetIdentityMappingStoreString.java similarity index 52% rename from java-oracledatabase/samples/snippets/generated/com/google/cloud/oracledatabase/v1/oracledatabase/getgoldengatedeploymentenvironment/SyncGetGoldengateDeploymentEnvironmentString.java rename to java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/identitymappingstoreservice/getidentitymappingstore/SyncGetIdentityMappingStoreString.java index 1e0beac66d0d..ae880dc3f94c 100644 --- a/java-oracledatabase/samples/snippets/generated/com/google/cloud/oracledatabase/v1/oracledatabase/getgoldengatedeploymentenvironment/SyncGetGoldengateDeploymentEnvironmentString.java +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/identitymappingstoreservice/getidentitymappingstore/SyncGetIdentityMappingStoreString.java @@ -14,33 +14,33 @@ * limitations under the License. */ -package com.google.cloud.oracledatabase.v1.samples; +package com.google.cloud.discoveryengine.v1beta.samples; -// [START oracledatabase_v1_generated_OracleDatabase_GetGoldengateDeploymentEnvironment_String_sync] -import com.google.cloud.oracledatabase.v1.GoldengateDeploymentEnvironment; -import com.google.cloud.oracledatabase.v1.GoldengateDeploymentEnvironmentName; -import com.google.cloud.oracledatabase.v1.OracleDatabaseClient; +// [START discoveryengine_v1beta_generated_IdentityMappingStoreService_GetIdentityMappingStore_String_sync] +import com.google.cloud.discoveryengine.v1beta.IdentityMappingStore; +import com.google.cloud.discoveryengine.v1beta.IdentityMappingStoreName; +import com.google.cloud.discoveryengine.v1beta.IdentityMappingStoreServiceClient; -public class SyncGetGoldengateDeploymentEnvironmentString { +public class SyncGetIdentityMappingStoreString { public static void main(String[] args) throws Exception { - syncGetGoldengateDeploymentEnvironmentString(); + syncGetIdentityMappingStoreString(); } - public static void syncGetGoldengateDeploymentEnvironmentString() throws Exception { + public static void syncGetIdentityMappingStoreString() 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 (OracleDatabaseClient oracleDatabaseClient = OracleDatabaseClient.create()) { + try (IdentityMappingStoreServiceClient identityMappingStoreServiceClient = + IdentityMappingStoreServiceClient.create()) { String name = - GoldengateDeploymentEnvironmentName.of( - "[PROJECT]", "[LOCATION]", "[GOLDENGATE_DEPLOYMENT_ENVIRONMENT]") + IdentityMappingStoreName.of("[PROJECT]", "[LOCATION]", "[IDENTITY_MAPPING_STORE]") .toString(); - GoldengateDeploymentEnvironment response = - oracleDatabaseClient.getGoldengateDeploymentEnvironment(name); + IdentityMappingStore response = + identityMappingStoreServiceClient.getIdentityMappingStore(name); } } } -// [END oracledatabase_v1_generated_OracleDatabase_GetGoldengateDeploymentEnvironment_String_sync] +// [END discoveryengine_v1beta_generated_IdentityMappingStoreService_GetIdentityMappingStore_String_sync] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/identitymappingstoreservice/importidentitymappings/AsyncImportIdentityMappings.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/identitymappingstoreservice/importidentitymappings/AsyncImportIdentityMappings.java new file mode 100644 index 000000000000..86f9dc2ddd46 --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/identitymappingstoreservice/importidentitymappings/AsyncImportIdentityMappings.java @@ -0,0 +1,53 @@ +/* + * 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.discoveryengine.v1beta.samples; + +// [START discoveryengine_v1beta_generated_IdentityMappingStoreService_ImportIdentityMappings_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.discoveryengine.v1beta.IdentityMappingStoreName; +import com.google.cloud.discoveryengine.v1beta.IdentityMappingStoreServiceClient; +import com.google.cloud.discoveryengine.v1beta.ImportIdentityMappingsRequest; +import com.google.longrunning.Operation; + +public class AsyncImportIdentityMappings { + + public static void main(String[] args) throws Exception { + asyncImportIdentityMappings(); + } + + public static void asyncImportIdentityMappings() 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 (IdentityMappingStoreServiceClient identityMappingStoreServiceClient = + IdentityMappingStoreServiceClient.create()) { + ImportIdentityMappingsRequest request = + ImportIdentityMappingsRequest.newBuilder() + .setIdentityMappingStore( + IdentityMappingStoreName.of("[PROJECT]", "[LOCATION]", "[IDENTITY_MAPPING_STORE]") + .toString()) + .build(); + ApiFuture future = + identityMappingStoreServiceClient.importIdentityMappingsCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END discoveryengine_v1beta_generated_IdentityMappingStoreService_ImportIdentityMappings_async] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/identitymappingstoreservice/importidentitymappings/AsyncImportIdentityMappingsLRO.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/identitymappingstoreservice/importidentitymappings/AsyncImportIdentityMappingsLRO.java new file mode 100644 index 000000000000..b5779ed2ad36 --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/identitymappingstoreservice/importidentitymappings/AsyncImportIdentityMappingsLRO.java @@ -0,0 +1,57 @@ +/* + * 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.discoveryengine.v1beta.samples; + +// [START discoveryengine_v1beta_generated_IdentityMappingStoreService_ImportIdentityMappings_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.discoveryengine.v1beta.IdentityMappingEntryOperationMetadata; +import com.google.cloud.discoveryengine.v1beta.IdentityMappingStoreName; +import com.google.cloud.discoveryengine.v1beta.IdentityMappingStoreServiceClient; +import com.google.cloud.discoveryengine.v1beta.ImportIdentityMappingsRequest; +import com.google.cloud.discoveryengine.v1beta.ImportIdentityMappingsResponse; + +public class AsyncImportIdentityMappingsLRO { + + public static void main(String[] args) throws Exception { + asyncImportIdentityMappingsLRO(); + } + + public static void asyncImportIdentityMappingsLRO() 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 (IdentityMappingStoreServiceClient identityMappingStoreServiceClient = + IdentityMappingStoreServiceClient.create()) { + ImportIdentityMappingsRequest request = + ImportIdentityMappingsRequest.newBuilder() + .setIdentityMappingStore( + IdentityMappingStoreName.of("[PROJECT]", "[LOCATION]", "[IDENTITY_MAPPING_STORE]") + .toString()) + .build(); + OperationFuture + future = + identityMappingStoreServiceClient + .importIdentityMappingsOperationCallable() + .futureCall(request); + // Do something. + ImportIdentityMappingsResponse response = future.get(); + } + } +} +// [END discoveryengine_v1beta_generated_IdentityMappingStoreService_ImportIdentityMappings_LRO_async] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/identitymappingstoreservice/importidentitymappings/SyncImportIdentityMappings.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/identitymappingstoreservice/importidentitymappings/SyncImportIdentityMappings.java new file mode 100644 index 000000000000..b25bfecb434c --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/identitymappingstoreservice/importidentitymappings/SyncImportIdentityMappings.java @@ -0,0 +1,50 @@ +/* + * 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.discoveryengine.v1beta.samples; + +// [START discoveryengine_v1beta_generated_IdentityMappingStoreService_ImportIdentityMappings_sync] +import com.google.cloud.discoveryengine.v1beta.IdentityMappingStoreName; +import com.google.cloud.discoveryengine.v1beta.IdentityMappingStoreServiceClient; +import com.google.cloud.discoveryengine.v1beta.ImportIdentityMappingsRequest; +import com.google.cloud.discoveryengine.v1beta.ImportIdentityMappingsResponse; + +public class SyncImportIdentityMappings { + + public static void main(String[] args) throws Exception { + syncImportIdentityMappings(); + } + + public static void syncImportIdentityMappings() 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 (IdentityMappingStoreServiceClient identityMappingStoreServiceClient = + IdentityMappingStoreServiceClient.create()) { + ImportIdentityMappingsRequest request = + ImportIdentityMappingsRequest.newBuilder() + .setIdentityMappingStore( + IdentityMappingStoreName.of("[PROJECT]", "[LOCATION]", "[IDENTITY_MAPPING_STORE]") + .toString()) + .build(); + ImportIdentityMappingsResponse response = + identityMappingStoreServiceClient.importIdentityMappingsAsync(request).get(); + } + } +} +// [END discoveryengine_v1beta_generated_IdentityMappingStoreService_ImportIdentityMappings_sync] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/identitymappingstoreservice/listidentitymappings/AsyncListIdentityMappings.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/identitymappingstoreservice/listidentitymappings/AsyncListIdentityMappings.java new file mode 100644 index 000000000000..b3a397844347 --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/identitymappingstoreservice/listidentitymappings/AsyncListIdentityMappings.java @@ -0,0 +1,57 @@ +/* + * 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.discoveryengine.v1beta.samples; + +// [START discoveryengine_v1beta_generated_IdentityMappingStoreService_ListIdentityMappings_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.discoveryengine.v1beta.IdentityMappingEntry; +import com.google.cloud.discoveryengine.v1beta.IdentityMappingStoreName; +import com.google.cloud.discoveryengine.v1beta.IdentityMappingStoreServiceClient; +import com.google.cloud.discoveryengine.v1beta.ListIdentityMappingsRequest; + +public class AsyncListIdentityMappings { + + public static void main(String[] args) throws Exception { + asyncListIdentityMappings(); + } + + public static void asyncListIdentityMappings() 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 (IdentityMappingStoreServiceClient identityMappingStoreServiceClient = + IdentityMappingStoreServiceClient.create()) { + ListIdentityMappingsRequest request = + ListIdentityMappingsRequest.newBuilder() + .setIdentityMappingStore( + IdentityMappingStoreName.of("[PROJECT]", "[LOCATION]", "[IDENTITY_MAPPING_STORE]") + .toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + ApiFuture future = + identityMappingStoreServiceClient.listIdentityMappingsPagedCallable().futureCall(request); + // Do something. + for (IdentityMappingEntry element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END discoveryengine_v1beta_generated_IdentityMappingStoreService_ListIdentityMappings_async] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/identitymappingstoreservice/listidentitymappings/AsyncListIdentityMappingsPaged.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/identitymappingstoreservice/listidentitymappings/AsyncListIdentityMappingsPaged.java new file mode 100644 index 000000000000..3b2a75ee9ed1 --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/identitymappingstoreservice/listidentitymappings/AsyncListIdentityMappingsPaged.java @@ -0,0 +1,65 @@ +/* + * 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.discoveryengine.v1beta.samples; + +// [START discoveryengine_v1beta_generated_IdentityMappingStoreService_ListIdentityMappings_Paged_async] +import com.google.cloud.discoveryengine.v1beta.IdentityMappingEntry; +import com.google.cloud.discoveryengine.v1beta.IdentityMappingStoreName; +import com.google.cloud.discoveryengine.v1beta.IdentityMappingStoreServiceClient; +import com.google.cloud.discoveryengine.v1beta.ListIdentityMappingsRequest; +import com.google.cloud.discoveryengine.v1beta.ListIdentityMappingsResponse; +import com.google.common.base.Strings; + +public class AsyncListIdentityMappingsPaged { + + public static void main(String[] args) throws Exception { + asyncListIdentityMappingsPaged(); + } + + public static void asyncListIdentityMappingsPaged() 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 (IdentityMappingStoreServiceClient identityMappingStoreServiceClient = + IdentityMappingStoreServiceClient.create()) { + ListIdentityMappingsRequest request = + ListIdentityMappingsRequest.newBuilder() + .setIdentityMappingStore( + IdentityMappingStoreName.of("[PROJECT]", "[LOCATION]", "[IDENTITY_MAPPING_STORE]") + .toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + while (true) { + ListIdentityMappingsResponse response = + identityMappingStoreServiceClient.listIdentityMappingsCallable().call(request); + for (IdentityMappingEntry element : response.getIdentityMappingEntriesList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END discoveryengine_v1beta_generated_IdentityMappingStoreService_ListIdentityMappings_Paged_async] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/identitymappingstoreservice/listidentitymappings/SyncListIdentityMappings.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/identitymappingstoreservice/listidentitymappings/SyncListIdentityMappings.java new file mode 100644 index 000000000000..0af8920ea7a5 --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/identitymappingstoreservice/listidentitymappings/SyncListIdentityMappings.java @@ -0,0 +1,54 @@ +/* + * 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.discoveryengine.v1beta.samples; + +// [START discoveryengine_v1beta_generated_IdentityMappingStoreService_ListIdentityMappings_sync] +import com.google.cloud.discoveryengine.v1beta.IdentityMappingEntry; +import com.google.cloud.discoveryengine.v1beta.IdentityMappingStoreName; +import com.google.cloud.discoveryengine.v1beta.IdentityMappingStoreServiceClient; +import com.google.cloud.discoveryengine.v1beta.ListIdentityMappingsRequest; + +public class SyncListIdentityMappings { + + public static void main(String[] args) throws Exception { + syncListIdentityMappings(); + } + + public static void syncListIdentityMappings() 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 (IdentityMappingStoreServiceClient identityMappingStoreServiceClient = + IdentityMappingStoreServiceClient.create()) { + ListIdentityMappingsRequest request = + ListIdentityMappingsRequest.newBuilder() + .setIdentityMappingStore( + IdentityMappingStoreName.of("[PROJECT]", "[LOCATION]", "[IDENTITY_MAPPING_STORE]") + .toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + for (IdentityMappingEntry element : + identityMappingStoreServiceClient.listIdentityMappings(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END discoveryengine_v1beta_generated_IdentityMappingStoreService_ListIdentityMappings_sync] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/identitymappingstoreservice/listidentitymappingstores/AsyncListIdentityMappingStores.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/identitymappingstoreservice/listidentitymappingstores/AsyncListIdentityMappingStores.java new file mode 100644 index 000000000000..fce7363c5097 --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/identitymappingstoreservice/listidentitymappingstores/AsyncListIdentityMappingStores.java @@ -0,0 +1,57 @@ +/* + * 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.discoveryengine.v1beta.samples; + +// [START discoveryengine_v1beta_generated_IdentityMappingStoreService_ListIdentityMappingStores_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.discoveryengine.v1beta.IdentityMappingStore; +import com.google.cloud.discoveryengine.v1beta.IdentityMappingStoreServiceClient; +import com.google.cloud.discoveryengine.v1beta.ListIdentityMappingStoresRequest; +import com.google.cloud.discoveryengine.v1beta.LocationName; + +public class AsyncListIdentityMappingStores { + + public static void main(String[] args) throws Exception { + asyncListIdentityMappingStores(); + } + + public static void asyncListIdentityMappingStores() 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 (IdentityMappingStoreServiceClient identityMappingStoreServiceClient = + IdentityMappingStoreServiceClient.create()) { + ListIdentityMappingStoresRequest request = + ListIdentityMappingStoresRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + ApiFuture future = + identityMappingStoreServiceClient + .listIdentityMappingStoresPagedCallable() + .futureCall(request); + // Do something. + for (IdentityMappingStore element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END discoveryengine_v1beta_generated_IdentityMappingStoreService_ListIdentityMappingStores_async] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/identitymappingstoreservice/listidentitymappingstores/AsyncListIdentityMappingStoresPaged.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/identitymappingstoreservice/listidentitymappingstores/AsyncListIdentityMappingStoresPaged.java new file mode 100644 index 000000000000..5d430f2b4f2b --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/identitymappingstoreservice/listidentitymappingstores/AsyncListIdentityMappingStoresPaged.java @@ -0,0 +1,63 @@ +/* + * 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.discoveryengine.v1beta.samples; + +// [START discoveryengine_v1beta_generated_IdentityMappingStoreService_ListIdentityMappingStores_Paged_async] +import com.google.cloud.discoveryengine.v1beta.IdentityMappingStore; +import com.google.cloud.discoveryengine.v1beta.IdentityMappingStoreServiceClient; +import com.google.cloud.discoveryengine.v1beta.ListIdentityMappingStoresRequest; +import com.google.cloud.discoveryengine.v1beta.ListIdentityMappingStoresResponse; +import com.google.cloud.discoveryengine.v1beta.LocationName; +import com.google.common.base.Strings; + +public class AsyncListIdentityMappingStoresPaged { + + public static void main(String[] args) throws Exception { + asyncListIdentityMappingStoresPaged(); + } + + public static void asyncListIdentityMappingStoresPaged() 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 (IdentityMappingStoreServiceClient identityMappingStoreServiceClient = + IdentityMappingStoreServiceClient.create()) { + ListIdentityMappingStoresRequest request = + ListIdentityMappingStoresRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + while (true) { + ListIdentityMappingStoresResponse response = + identityMappingStoreServiceClient.listIdentityMappingStoresCallable().call(request); + for (IdentityMappingStore element : response.getIdentityMappingStoresList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END discoveryengine_v1beta_generated_IdentityMappingStoreService_ListIdentityMappingStores_Paged_async] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/identitymappingstoreservice/listidentitymappingstores/SyncListIdentityMappingStores.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/identitymappingstoreservice/listidentitymappingstores/SyncListIdentityMappingStores.java new file mode 100644 index 000000000000..00173728e3b5 --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/identitymappingstoreservice/listidentitymappingstores/SyncListIdentityMappingStores.java @@ -0,0 +1,52 @@ +/* + * 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.discoveryengine.v1beta.samples; + +// [START discoveryengine_v1beta_generated_IdentityMappingStoreService_ListIdentityMappingStores_sync] +import com.google.cloud.discoveryengine.v1beta.IdentityMappingStore; +import com.google.cloud.discoveryengine.v1beta.IdentityMappingStoreServiceClient; +import com.google.cloud.discoveryengine.v1beta.ListIdentityMappingStoresRequest; +import com.google.cloud.discoveryengine.v1beta.LocationName; + +public class SyncListIdentityMappingStores { + + public static void main(String[] args) throws Exception { + syncListIdentityMappingStores(); + } + + public static void syncListIdentityMappingStores() 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 (IdentityMappingStoreServiceClient identityMappingStoreServiceClient = + IdentityMappingStoreServiceClient.create()) { + ListIdentityMappingStoresRequest request = + ListIdentityMappingStoresRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + for (IdentityMappingStore element : + identityMappingStoreServiceClient.listIdentityMappingStores(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END discoveryengine_v1beta_generated_IdentityMappingStoreService_ListIdentityMappingStores_sync] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/identitymappingstoreservice/listidentitymappingstores/SyncListIdentityMappingStoresLocationname.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/identitymappingstoreservice/listidentitymappingstores/SyncListIdentityMappingStoresLocationname.java new file mode 100644 index 000000000000..5a9d08850429 --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/identitymappingstoreservice/listidentitymappingstores/SyncListIdentityMappingStoresLocationname.java @@ -0,0 +1,46 @@ +/* + * 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.discoveryengine.v1beta.samples; + +// [START discoveryengine_v1beta_generated_IdentityMappingStoreService_ListIdentityMappingStores_Locationname_sync] +import com.google.cloud.discoveryengine.v1beta.IdentityMappingStore; +import com.google.cloud.discoveryengine.v1beta.IdentityMappingStoreServiceClient; +import com.google.cloud.discoveryengine.v1beta.LocationName; + +public class SyncListIdentityMappingStoresLocationname { + + public static void main(String[] args) throws Exception { + syncListIdentityMappingStoresLocationname(); + } + + public static void syncListIdentityMappingStoresLocationname() 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 (IdentityMappingStoreServiceClient identityMappingStoreServiceClient = + IdentityMappingStoreServiceClient.create()) { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + for (IdentityMappingStore element : + identityMappingStoreServiceClient.listIdentityMappingStores(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END discoveryengine_v1beta_generated_IdentityMappingStoreService_ListIdentityMappingStores_Locationname_sync] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/identitymappingstoreservice/listidentitymappingstores/SyncListIdentityMappingStoresString.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/identitymappingstoreservice/listidentitymappingstores/SyncListIdentityMappingStoresString.java new file mode 100644 index 000000000000..2a921bba623e --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/identitymappingstoreservice/listidentitymappingstores/SyncListIdentityMappingStoresString.java @@ -0,0 +1,46 @@ +/* + * 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.discoveryengine.v1beta.samples; + +// [START discoveryengine_v1beta_generated_IdentityMappingStoreService_ListIdentityMappingStores_String_sync] +import com.google.cloud.discoveryengine.v1beta.IdentityMappingStore; +import com.google.cloud.discoveryengine.v1beta.IdentityMappingStoreServiceClient; +import com.google.cloud.discoveryengine.v1beta.LocationName; + +public class SyncListIdentityMappingStoresString { + + public static void main(String[] args) throws Exception { + syncListIdentityMappingStoresString(); + } + + public static void syncListIdentityMappingStoresString() 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 (IdentityMappingStoreServiceClient identityMappingStoreServiceClient = + IdentityMappingStoreServiceClient.create()) { + String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); + for (IdentityMappingStore element : + identityMappingStoreServiceClient.listIdentityMappingStores(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END discoveryengine_v1beta_generated_IdentityMappingStoreService_ListIdentityMappingStores_String_sync] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/identitymappingstoreservice/purgeidentitymappings/AsyncPurgeIdentityMappings.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/identitymappingstoreservice/purgeidentitymappings/AsyncPurgeIdentityMappings.java new file mode 100644 index 000000000000..9d1723456408 --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/identitymappingstoreservice/purgeidentitymappings/AsyncPurgeIdentityMappings.java @@ -0,0 +1,55 @@ +/* + * 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.discoveryengine.v1beta.samples; + +// [START discoveryengine_v1beta_generated_IdentityMappingStoreService_PurgeIdentityMappings_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.discoveryengine.v1beta.IdentityMappingStoreName; +import com.google.cloud.discoveryengine.v1beta.IdentityMappingStoreServiceClient; +import com.google.cloud.discoveryengine.v1beta.PurgeIdentityMappingsRequest; +import com.google.longrunning.Operation; + +public class AsyncPurgeIdentityMappings { + + public static void main(String[] args) throws Exception { + asyncPurgeIdentityMappings(); + } + + public static void asyncPurgeIdentityMappings() 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 (IdentityMappingStoreServiceClient identityMappingStoreServiceClient = + IdentityMappingStoreServiceClient.create()) { + PurgeIdentityMappingsRequest request = + PurgeIdentityMappingsRequest.newBuilder() + .setIdentityMappingStore( + IdentityMappingStoreName.of("[PROJECT]", "[LOCATION]", "[IDENTITY_MAPPING_STORE]") + .toString()) + .setFilter("filter-1274492040") + .setForce(true) + .build(); + ApiFuture future = + identityMappingStoreServiceClient.purgeIdentityMappingsCallable().futureCall(request); + // Do something. + future.get(); + } + } +} +// [END discoveryengine_v1beta_generated_IdentityMappingStoreService_PurgeIdentityMappings_async] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/identitymappingstoreservice/purgeidentitymappings/AsyncPurgeIdentityMappingsLRO.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/identitymappingstoreservice/purgeidentitymappings/AsyncPurgeIdentityMappingsLRO.java new file mode 100644 index 000000000000..e0e9a5df4904 --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/identitymappingstoreservice/purgeidentitymappings/AsyncPurgeIdentityMappingsLRO.java @@ -0,0 +1,58 @@ +/* + * 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.discoveryengine.v1beta.samples; + +// [START discoveryengine_v1beta_generated_IdentityMappingStoreService_PurgeIdentityMappings_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.discoveryengine.v1beta.IdentityMappingEntryOperationMetadata; +import com.google.cloud.discoveryengine.v1beta.IdentityMappingStoreName; +import com.google.cloud.discoveryengine.v1beta.IdentityMappingStoreServiceClient; +import com.google.cloud.discoveryengine.v1beta.PurgeIdentityMappingsRequest; +import com.google.protobuf.Empty; + +public class AsyncPurgeIdentityMappingsLRO { + + public static void main(String[] args) throws Exception { + asyncPurgeIdentityMappingsLRO(); + } + + public static void asyncPurgeIdentityMappingsLRO() 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 (IdentityMappingStoreServiceClient identityMappingStoreServiceClient = + IdentityMappingStoreServiceClient.create()) { + PurgeIdentityMappingsRequest request = + PurgeIdentityMappingsRequest.newBuilder() + .setIdentityMappingStore( + IdentityMappingStoreName.of("[PROJECT]", "[LOCATION]", "[IDENTITY_MAPPING_STORE]") + .toString()) + .setFilter("filter-1274492040") + .setForce(true) + .build(); + OperationFuture future = + identityMappingStoreServiceClient + .purgeIdentityMappingsOperationCallable() + .futureCall(request); + // Do something. + future.get(); + } + } +} +// [END discoveryengine_v1beta_generated_IdentityMappingStoreService_PurgeIdentityMappings_LRO_async] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/identitymappingstoreservice/purgeidentitymappings/SyncPurgeIdentityMappings.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/identitymappingstoreservice/purgeidentitymappings/SyncPurgeIdentityMappings.java new file mode 100644 index 000000000000..a46423e98c44 --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/identitymappingstoreservice/purgeidentitymappings/SyncPurgeIdentityMappings.java @@ -0,0 +1,51 @@ +/* + * 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.discoveryengine.v1beta.samples; + +// [START discoveryengine_v1beta_generated_IdentityMappingStoreService_PurgeIdentityMappings_sync] +import com.google.cloud.discoveryengine.v1beta.IdentityMappingStoreName; +import com.google.cloud.discoveryengine.v1beta.IdentityMappingStoreServiceClient; +import com.google.cloud.discoveryengine.v1beta.PurgeIdentityMappingsRequest; +import com.google.protobuf.Empty; + +public class SyncPurgeIdentityMappings { + + public static void main(String[] args) throws Exception { + syncPurgeIdentityMappings(); + } + + public static void syncPurgeIdentityMappings() 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 (IdentityMappingStoreServiceClient identityMappingStoreServiceClient = + IdentityMappingStoreServiceClient.create()) { + PurgeIdentityMappingsRequest request = + PurgeIdentityMappingsRequest.newBuilder() + .setIdentityMappingStore( + IdentityMappingStoreName.of("[PROJECT]", "[LOCATION]", "[IDENTITY_MAPPING_STORE]") + .toString()) + .setFilter("filter-1274492040") + .setForce(true) + .build(); + identityMappingStoreServiceClient.purgeIdentityMappingsAsync(request).get(); + } + } +} +// [END discoveryengine_v1beta_generated_IdentityMappingStoreService_PurgeIdentityMappings_sync] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/identitymappingstoreservicesettings/createidentitymappingstore/SyncCreateIdentityMappingStore.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/identitymappingstoreservicesettings/createidentitymappingstore/SyncCreateIdentityMappingStore.java new file mode 100644 index 000000000000..1de385be0be8 --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/identitymappingstoreservicesettings/createidentitymappingstore/SyncCreateIdentityMappingStore.java @@ -0,0 +1,57 @@ +/* + * 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.discoveryengine.v1beta.samples; + +// [START discoveryengine_v1beta_generated_IdentityMappingStoreServiceSettings_CreateIdentityMappingStore_sync] +import com.google.cloud.discoveryengine.v1beta.IdentityMappingStoreServiceSettings; +import java.time.Duration; + +public class SyncCreateIdentityMappingStore { + + public static void main(String[] args) throws Exception { + syncCreateIdentityMappingStore(); + } + + public static void syncCreateIdentityMappingStore() 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 + IdentityMappingStoreServiceSettings.Builder identityMappingStoreServiceSettingsBuilder = + IdentityMappingStoreServiceSettings.newBuilder(); + identityMappingStoreServiceSettingsBuilder + .createIdentityMappingStoreSettings() + .setRetrySettings( + identityMappingStoreServiceSettingsBuilder + .createIdentityMappingStoreSettings() + .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()); + IdentityMappingStoreServiceSettings identityMappingStoreServiceSettings = + identityMappingStoreServiceSettingsBuilder.build(); + } +} +// [END discoveryengine_v1beta_generated_IdentityMappingStoreServiceSettings_CreateIdentityMappingStore_sync] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/identitymappingstoreservicesettings/deleteidentitymappingstore/SyncDeleteIdentityMappingStore.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/identitymappingstoreservicesettings/deleteidentitymappingstore/SyncDeleteIdentityMappingStore.java new file mode 100644 index 000000000000..4317fe64324c --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/identitymappingstoreservicesettings/deleteidentitymappingstore/SyncDeleteIdentityMappingStore.java @@ -0,0 +1,54 @@ +/* + * 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.discoveryengine.v1beta.samples; + +// [START discoveryengine_v1beta_generated_IdentityMappingStoreServiceSettings_DeleteIdentityMappingStore_sync] +import com.google.api.gax.longrunning.OperationalTimedPollAlgorithm; +import com.google.api.gax.retrying.RetrySettings; +import com.google.api.gax.retrying.TimedRetryAlgorithm; +import com.google.cloud.discoveryengine.v1beta.IdentityMappingStoreServiceSettings; +import java.time.Duration; + +public class SyncDeleteIdentityMappingStore { + + public static void main(String[] args) throws Exception { + syncDeleteIdentityMappingStore(); + } + + public static void syncDeleteIdentityMappingStore() 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 + IdentityMappingStoreServiceSettings.Builder identityMappingStoreServiceSettingsBuilder = + IdentityMappingStoreServiceSettings.newBuilder(); + TimedRetryAlgorithm timedRetryAlgorithm = + OperationalTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelayDuration(Duration.ofMillis(500)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelayDuration(Duration.ofMillis(5000)) + .setTotalTimeoutDuration(Duration.ofHours(24)) + .build()); + identityMappingStoreServiceSettingsBuilder + .createClusterOperationSettings() + .setPollingAlgorithm(timedRetryAlgorithm) + .build(); + } +} +// [END discoveryengine_v1beta_generated_IdentityMappingStoreServiceSettings_DeleteIdentityMappingStore_sync] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/licenseconfigservice/create/SyncCreateSetCredentialsProvider.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/licenseconfigservice/create/SyncCreateSetCredentialsProvider.java new file mode 100644 index 000000000000..2f5c38f90438 --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/licenseconfigservice/create/SyncCreateSetCredentialsProvider.java @@ -0,0 +1,45 @@ +/* + * 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.discoveryengine.v1beta.samples; + +// [START discoveryengine_v1beta_generated_LicenseConfigService_Create_SetCredentialsProvider_sync] +import com.google.api.gax.core.FixedCredentialsProvider; +import com.google.cloud.discoveryengine.v1beta.LicenseConfigServiceClient; +import com.google.cloud.discoveryengine.v1beta.LicenseConfigServiceSettings; +import com.google.cloud.discoveryengine.v1beta.myCredentials; + +public class SyncCreateSetCredentialsProvider { + + public static void main(String[] args) throws Exception { + syncCreateSetCredentialsProvider(); + } + + public static void syncCreateSetCredentialsProvider() 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 + LicenseConfigServiceSettings licenseConfigServiceSettings = + LicenseConfigServiceSettings.newBuilder() + .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) + .build(); + LicenseConfigServiceClient licenseConfigServiceClient = + LicenseConfigServiceClient.create(licenseConfigServiceSettings); + } +} +// [END discoveryengine_v1beta_generated_LicenseConfigService_Create_SetCredentialsProvider_sync] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/licenseconfigservice/create/SyncCreateSetEndpoint.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/licenseconfigservice/create/SyncCreateSetEndpoint.java new file mode 100644 index 000000000000..11e1f9aede3c --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/licenseconfigservice/create/SyncCreateSetEndpoint.java @@ -0,0 +1,42 @@ +/* + * 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.discoveryengine.v1beta.samples; + +// [START discoveryengine_v1beta_generated_LicenseConfigService_Create_SetEndpoint_sync] +import com.google.cloud.discoveryengine.v1beta.LicenseConfigServiceClient; +import com.google.cloud.discoveryengine.v1beta.LicenseConfigServiceSettings; +import com.google.cloud.discoveryengine.v1beta.myEndpoint; + +public class SyncCreateSetEndpoint { + + public static void main(String[] args) throws Exception { + syncCreateSetEndpoint(); + } + + public static void syncCreateSetEndpoint() 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 + LicenseConfigServiceSettings licenseConfigServiceSettings = + LicenseConfigServiceSettings.newBuilder().setEndpoint(myEndpoint).build(); + LicenseConfigServiceClient licenseConfigServiceClient = + LicenseConfigServiceClient.create(licenseConfigServiceSettings); + } +} +// [END discoveryengine_v1beta_generated_LicenseConfigService_Create_SetEndpoint_sync] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/licenseconfigservice/create/SyncCreateUseHttpJsonTransport.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/licenseconfigservice/create/SyncCreateUseHttpJsonTransport.java new file mode 100644 index 000000000000..9acaef80a321 --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/licenseconfigservice/create/SyncCreateUseHttpJsonTransport.java @@ -0,0 +1,41 @@ +/* + * 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.discoveryengine.v1beta.samples; + +// [START discoveryengine_v1beta_generated_LicenseConfigService_Create_UseHttpJsonTransport_sync] +import com.google.cloud.discoveryengine.v1beta.LicenseConfigServiceClient; +import com.google.cloud.discoveryengine.v1beta.LicenseConfigServiceSettings; + +public class SyncCreateUseHttpJsonTransport { + + public static void main(String[] args) throws Exception { + syncCreateUseHttpJsonTransport(); + } + + public static void syncCreateUseHttpJsonTransport() 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 + LicenseConfigServiceSettings licenseConfigServiceSettings = + LicenseConfigServiceSettings.newHttpJsonBuilder().build(); + LicenseConfigServiceClient licenseConfigServiceClient = + LicenseConfigServiceClient.create(licenseConfigServiceSettings); + } +} +// [END discoveryengine_v1beta_generated_LicenseConfigService_Create_UseHttpJsonTransport_sync] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/licenseconfigservice/createlicenseconfig/AsyncCreateLicenseConfig.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/licenseconfigservice/createlicenseconfig/AsyncCreateLicenseConfig.java new file mode 100644 index 000000000000..b6f66a99593c --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/licenseconfigservice/createlicenseconfig/AsyncCreateLicenseConfig.java @@ -0,0 +1,53 @@ +/* + * 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.discoveryengine.v1beta.samples; + +// [START discoveryengine_v1beta_generated_LicenseConfigService_CreateLicenseConfig_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.discoveryengine.v1beta.CreateLicenseConfigRequest; +import com.google.cloud.discoveryengine.v1beta.LicenseConfig; +import com.google.cloud.discoveryengine.v1beta.LicenseConfigServiceClient; +import com.google.cloud.discoveryengine.v1beta.LocationName; + +public class AsyncCreateLicenseConfig { + + public static void main(String[] args) throws Exception { + asyncCreateLicenseConfig(); + } + + public static void asyncCreateLicenseConfig() 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 (LicenseConfigServiceClient licenseConfigServiceClient = + LicenseConfigServiceClient.create()) { + CreateLicenseConfigRequest request = + CreateLicenseConfigRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setLicenseConfig(LicenseConfig.newBuilder().build()) + .setLicenseConfigId("licenseConfigId-372057250") + .build(); + ApiFuture future = + licenseConfigServiceClient.createLicenseConfigCallable().futureCall(request); + // Do something. + LicenseConfig response = future.get(); + } + } +} +// [END discoveryengine_v1beta_generated_LicenseConfigService_CreateLicenseConfig_async] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/licenseconfigservice/createlicenseconfig/SyncCreateLicenseConfig.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/licenseconfigservice/createlicenseconfig/SyncCreateLicenseConfig.java new file mode 100644 index 000000000000..ac15df6cee43 --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/licenseconfigservice/createlicenseconfig/SyncCreateLicenseConfig.java @@ -0,0 +1,49 @@ +/* + * 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.discoveryengine.v1beta.samples; + +// [START discoveryengine_v1beta_generated_LicenseConfigService_CreateLicenseConfig_sync] +import com.google.cloud.discoveryengine.v1beta.CreateLicenseConfigRequest; +import com.google.cloud.discoveryengine.v1beta.LicenseConfig; +import com.google.cloud.discoveryengine.v1beta.LicenseConfigServiceClient; +import com.google.cloud.discoveryengine.v1beta.LocationName; + +public class SyncCreateLicenseConfig { + + public static void main(String[] args) throws Exception { + syncCreateLicenseConfig(); + } + + public static void syncCreateLicenseConfig() 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 (LicenseConfigServiceClient licenseConfigServiceClient = + LicenseConfigServiceClient.create()) { + CreateLicenseConfigRequest request = + CreateLicenseConfigRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setLicenseConfig(LicenseConfig.newBuilder().build()) + .setLicenseConfigId("licenseConfigId-372057250") + .build(); + LicenseConfig response = licenseConfigServiceClient.createLicenseConfig(request); + } + } +} +// [END discoveryengine_v1beta_generated_LicenseConfigService_CreateLicenseConfig_sync] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/licenseconfigservice/createlicenseconfig/SyncCreateLicenseConfigLocationnameLicenseconfigString.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/licenseconfigservice/createlicenseconfig/SyncCreateLicenseConfigLocationnameLicenseconfigString.java new file mode 100644 index 000000000000..72690ca9d9dc --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/licenseconfigservice/createlicenseconfig/SyncCreateLicenseConfigLocationnameLicenseconfigString.java @@ -0,0 +1,46 @@ +/* + * 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.discoveryengine.v1beta.samples; + +// [START discoveryengine_v1beta_generated_LicenseConfigService_CreateLicenseConfig_LocationnameLicenseconfigString_sync] +import com.google.cloud.discoveryengine.v1beta.LicenseConfig; +import com.google.cloud.discoveryengine.v1beta.LicenseConfigServiceClient; +import com.google.cloud.discoveryengine.v1beta.LocationName; + +public class SyncCreateLicenseConfigLocationnameLicenseconfigString { + + public static void main(String[] args) throws Exception { + syncCreateLicenseConfigLocationnameLicenseconfigString(); + } + + public static void syncCreateLicenseConfigLocationnameLicenseconfigString() 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 (LicenseConfigServiceClient licenseConfigServiceClient = + LicenseConfigServiceClient.create()) { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + LicenseConfig licenseConfig = LicenseConfig.newBuilder().build(); + String licenseConfigId = "licenseConfigId-372057250"; + LicenseConfig response = + licenseConfigServiceClient.createLicenseConfig(parent, licenseConfig, licenseConfigId); + } + } +} +// [END discoveryengine_v1beta_generated_LicenseConfigService_CreateLicenseConfig_LocationnameLicenseconfigString_sync] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/licenseconfigservice/createlicenseconfig/SyncCreateLicenseConfigStringLicenseconfigString.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/licenseconfigservice/createlicenseconfig/SyncCreateLicenseConfigStringLicenseconfigString.java new file mode 100644 index 000000000000..f79d72ee0210 --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/licenseconfigservice/createlicenseconfig/SyncCreateLicenseConfigStringLicenseconfigString.java @@ -0,0 +1,46 @@ +/* + * 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.discoveryengine.v1beta.samples; + +// [START discoveryengine_v1beta_generated_LicenseConfigService_CreateLicenseConfig_StringLicenseconfigString_sync] +import com.google.cloud.discoveryengine.v1beta.LicenseConfig; +import com.google.cloud.discoveryengine.v1beta.LicenseConfigServiceClient; +import com.google.cloud.discoveryengine.v1beta.LocationName; + +public class SyncCreateLicenseConfigStringLicenseconfigString { + + public static void main(String[] args) throws Exception { + syncCreateLicenseConfigStringLicenseconfigString(); + } + + public static void syncCreateLicenseConfigStringLicenseconfigString() 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 (LicenseConfigServiceClient licenseConfigServiceClient = + LicenseConfigServiceClient.create()) { + String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); + LicenseConfig licenseConfig = LicenseConfig.newBuilder().build(); + String licenseConfigId = "licenseConfigId-372057250"; + LicenseConfig response = + licenseConfigServiceClient.createLicenseConfig(parent, licenseConfig, licenseConfigId); + } + } +} +// [END discoveryengine_v1beta_generated_LicenseConfigService_CreateLicenseConfig_StringLicenseconfigString_sync] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/licenseconfigservice/distributelicenseconfig/AsyncDistributeLicenseConfig.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/licenseconfigservice/distributelicenseconfig/AsyncDistributeLicenseConfig.java new file mode 100644 index 000000000000..ebb8ad788516 --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/licenseconfigservice/distributelicenseconfig/AsyncDistributeLicenseConfig.java @@ -0,0 +1,58 @@ +/* + * 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.discoveryengine.v1beta.samples; + +// [START discoveryengine_v1beta_generated_LicenseConfigService_DistributeLicenseConfig_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.discoveryengine.v1beta.BillingAccountLicenseConfigName; +import com.google.cloud.discoveryengine.v1beta.DistributeLicenseConfigRequest; +import com.google.cloud.discoveryengine.v1beta.DistributeLicenseConfigResponse; +import com.google.cloud.discoveryengine.v1beta.LicenseConfigServiceClient; + +public class AsyncDistributeLicenseConfig { + + public static void main(String[] args) throws Exception { + asyncDistributeLicenseConfig(); + } + + public static void asyncDistributeLicenseConfig() 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 (LicenseConfigServiceClient licenseConfigServiceClient = + LicenseConfigServiceClient.create()) { + DistributeLicenseConfigRequest request = + DistributeLicenseConfigRequest.newBuilder() + .setBillingAccountLicenseConfig( + BillingAccountLicenseConfigName.of( + "[BILLING_ACCOUNT]", "[BILLING_ACCOUNT_LICENSE_CONFIG]") + .toString()) + .setProjectNumber(828084015) + .setLocation("location1901043637") + .setLicenseCount(-1565113455) + .setLicenseConfigId("licenseConfigId-372057250") + .build(); + ApiFuture future = + licenseConfigServiceClient.distributeLicenseConfigCallable().futureCall(request); + // Do something. + DistributeLicenseConfigResponse response = future.get(); + } + } +} +// [END discoveryengine_v1beta_generated_LicenseConfigService_DistributeLicenseConfig_async] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/licenseconfigservice/distributelicenseconfig/SyncDistributeLicenseConfig.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/licenseconfigservice/distributelicenseconfig/SyncDistributeLicenseConfig.java new file mode 100644 index 000000000000..8eef7a301f21 --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/licenseconfigservice/distributelicenseconfig/SyncDistributeLicenseConfig.java @@ -0,0 +1,55 @@ +/* + * 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.discoveryengine.v1beta.samples; + +// [START discoveryengine_v1beta_generated_LicenseConfigService_DistributeLicenseConfig_sync] +import com.google.cloud.discoveryengine.v1beta.BillingAccountLicenseConfigName; +import com.google.cloud.discoveryengine.v1beta.DistributeLicenseConfigRequest; +import com.google.cloud.discoveryengine.v1beta.DistributeLicenseConfigResponse; +import com.google.cloud.discoveryengine.v1beta.LicenseConfigServiceClient; + +public class SyncDistributeLicenseConfig { + + public static void main(String[] args) throws Exception { + syncDistributeLicenseConfig(); + } + + public static void syncDistributeLicenseConfig() 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 (LicenseConfigServiceClient licenseConfigServiceClient = + LicenseConfigServiceClient.create()) { + DistributeLicenseConfigRequest request = + DistributeLicenseConfigRequest.newBuilder() + .setBillingAccountLicenseConfig( + BillingAccountLicenseConfigName.of( + "[BILLING_ACCOUNT]", "[BILLING_ACCOUNT_LICENSE_CONFIG]") + .toString()) + .setProjectNumber(828084015) + .setLocation("location1901043637") + .setLicenseCount(-1565113455) + .setLicenseConfigId("licenseConfigId-372057250") + .build(); + DistributeLicenseConfigResponse response = + licenseConfigServiceClient.distributeLicenseConfig(request); + } + } +} +// [END discoveryengine_v1beta_generated_LicenseConfigService_DistributeLicenseConfig_sync] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/licenseconfigservice/distributelicenseconfig/SyncDistributeLicenseConfigBillingaccountlicenseconfignameLongStringLongString.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/licenseconfigservice/distributelicenseconfig/SyncDistributeLicenseConfigBillingaccountlicenseconfignameLongStringLongString.java new file mode 100644 index 000000000000..ca0b210444ed --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/licenseconfigservice/distributelicenseconfig/SyncDistributeLicenseConfigBillingaccountlicenseconfignameLongStringLongString.java @@ -0,0 +1,53 @@ +/* + * 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.discoveryengine.v1beta.samples; + +// [START discoveryengine_v1beta_generated_LicenseConfigService_DistributeLicenseConfig_BillingaccountlicenseconfignameLongStringLongString_sync] +import com.google.cloud.discoveryengine.v1beta.BillingAccountLicenseConfigName; +import com.google.cloud.discoveryengine.v1beta.DistributeLicenseConfigResponse; +import com.google.cloud.discoveryengine.v1beta.LicenseConfigServiceClient; + +public class SyncDistributeLicenseConfigBillingaccountlicenseconfignameLongStringLongString { + + public static void main(String[] args) throws Exception { + syncDistributeLicenseConfigBillingaccountlicenseconfignameLongStringLongString(); + } + + public static void + syncDistributeLicenseConfigBillingaccountlicenseconfignameLongStringLongString() + 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 (LicenseConfigServiceClient licenseConfigServiceClient = + LicenseConfigServiceClient.create()) { + BillingAccountLicenseConfigName billingAccountLicenseConfig = + BillingAccountLicenseConfigName.of( + "[BILLING_ACCOUNT]", "[BILLING_ACCOUNT_LICENSE_CONFIG]"); + long projectNumber = 828084015; + String location = "location1901043637"; + long licenseCount = -1565113455; + String licenseConfigId = "licenseConfigId-372057250"; + DistributeLicenseConfigResponse response = + licenseConfigServiceClient.distributeLicenseConfig( + billingAccountLicenseConfig, projectNumber, location, licenseCount, licenseConfigId); + } + } +} +// [END discoveryengine_v1beta_generated_LicenseConfigService_DistributeLicenseConfig_BillingaccountlicenseconfignameLongStringLongString_sync] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/licenseconfigservice/distributelicenseconfig/SyncDistributeLicenseConfigStringLongStringLongString.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/licenseconfigservice/distributelicenseconfig/SyncDistributeLicenseConfigStringLongStringLongString.java new file mode 100644 index 000000000000..3bddab240240 --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/licenseconfigservice/distributelicenseconfig/SyncDistributeLicenseConfigStringLongStringLongString.java @@ -0,0 +1,52 @@ +/* + * 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.discoveryengine.v1beta.samples; + +// [START discoveryengine_v1beta_generated_LicenseConfigService_DistributeLicenseConfig_StringLongStringLongString_sync] +import com.google.cloud.discoveryengine.v1beta.BillingAccountLicenseConfigName; +import com.google.cloud.discoveryengine.v1beta.DistributeLicenseConfigResponse; +import com.google.cloud.discoveryengine.v1beta.LicenseConfigServiceClient; + +public class SyncDistributeLicenseConfigStringLongStringLongString { + + public static void main(String[] args) throws Exception { + syncDistributeLicenseConfigStringLongStringLongString(); + } + + public static void syncDistributeLicenseConfigStringLongStringLongString() 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 (LicenseConfigServiceClient licenseConfigServiceClient = + LicenseConfigServiceClient.create()) { + String billingAccountLicenseConfig = + BillingAccountLicenseConfigName.of( + "[BILLING_ACCOUNT]", "[BILLING_ACCOUNT_LICENSE_CONFIG]") + .toString(); + long projectNumber = 828084015; + String location = "location1901043637"; + long licenseCount = -1565113455; + String licenseConfigId = "licenseConfigId-372057250"; + DistributeLicenseConfigResponse response = + licenseConfigServiceClient.distributeLicenseConfig( + billingAccountLicenseConfig, projectNumber, location, licenseCount, licenseConfigId); + } + } +} +// [END discoveryengine_v1beta_generated_LicenseConfigService_DistributeLicenseConfig_StringLongStringLongString_sync] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/licenseconfigservice/getlicenseconfig/AsyncGetLicenseConfig.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/licenseconfigservice/getlicenseconfig/AsyncGetLicenseConfig.java new file mode 100644 index 000000000000..45a3073a2a1d --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/licenseconfigservice/getlicenseconfig/AsyncGetLicenseConfig.java @@ -0,0 +1,52 @@ +/* + * 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.discoveryengine.v1beta.samples; + +// [START discoveryengine_v1beta_generated_LicenseConfigService_GetLicenseConfig_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.discoveryengine.v1beta.GetLicenseConfigRequest; +import com.google.cloud.discoveryengine.v1beta.LicenseConfig; +import com.google.cloud.discoveryengine.v1beta.LicenseConfigName; +import com.google.cloud.discoveryengine.v1beta.LicenseConfigServiceClient; + +public class AsyncGetLicenseConfig { + + public static void main(String[] args) throws Exception { + asyncGetLicenseConfig(); + } + + public static void asyncGetLicenseConfig() 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 (LicenseConfigServiceClient licenseConfigServiceClient = + LicenseConfigServiceClient.create()) { + GetLicenseConfigRequest request = + GetLicenseConfigRequest.newBuilder() + .setName( + LicenseConfigName.of("[PROJECT]", "[LOCATION]", "[LICENSE_CONFIG]").toString()) + .build(); + ApiFuture future = + licenseConfigServiceClient.getLicenseConfigCallable().futureCall(request); + // Do something. + LicenseConfig response = future.get(); + } + } +} +// [END discoveryengine_v1beta_generated_LicenseConfigService_GetLicenseConfig_async] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/licenseconfigservice/getlicenseconfig/SyncGetLicenseConfig.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/licenseconfigservice/getlicenseconfig/SyncGetLicenseConfig.java new file mode 100644 index 000000000000..7f668abdd711 --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/licenseconfigservice/getlicenseconfig/SyncGetLicenseConfig.java @@ -0,0 +1,48 @@ +/* + * 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.discoveryengine.v1beta.samples; + +// [START discoveryengine_v1beta_generated_LicenseConfigService_GetLicenseConfig_sync] +import com.google.cloud.discoveryengine.v1beta.GetLicenseConfigRequest; +import com.google.cloud.discoveryengine.v1beta.LicenseConfig; +import com.google.cloud.discoveryengine.v1beta.LicenseConfigName; +import com.google.cloud.discoveryengine.v1beta.LicenseConfigServiceClient; + +public class SyncGetLicenseConfig { + + public static void main(String[] args) throws Exception { + syncGetLicenseConfig(); + } + + public static void syncGetLicenseConfig() 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 (LicenseConfigServiceClient licenseConfigServiceClient = + LicenseConfigServiceClient.create()) { + GetLicenseConfigRequest request = + GetLicenseConfigRequest.newBuilder() + .setName( + LicenseConfigName.of("[PROJECT]", "[LOCATION]", "[LICENSE_CONFIG]").toString()) + .build(); + LicenseConfig response = licenseConfigServiceClient.getLicenseConfig(request); + } + } +} +// [END discoveryengine_v1beta_generated_LicenseConfigService_GetLicenseConfig_sync] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/licenseconfigservice/getlicenseconfig/SyncGetLicenseConfigLicenseconfigname.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/licenseconfigservice/getlicenseconfig/SyncGetLicenseConfigLicenseconfigname.java new file mode 100644 index 000000000000..4476a3350611 --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/licenseconfigservice/getlicenseconfig/SyncGetLicenseConfigLicenseconfigname.java @@ -0,0 +1,43 @@ +/* + * 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.discoveryengine.v1beta.samples; + +// [START discoveryengine_v1beta_generated_LicenseConfigService_GetLicenseConfig_Licenseconfigname_sync] +import com.google.cloud.discoveryengine.v1beta.LicenseConfig; +import com.google.cloud.discoveryengine.v1beta.LicenseConfigName; +import com.google.cloud.discoveryengine.v1beta.LicenseConfigServiceClient; + +public class SyncGetLicenseConfigLicenseconfigname { + + public static void main(String[] args) throws Exception { + syncGetLicenseConfigLicenseconfigname(); + } + + public static void syncGetLicenseConfigLicenseconfigname() 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 (LicenseConfigServiceClient licenseConfigServiceClient = + LicenseConfigServiceClient.create()) { + LicenseConfigName name = LicenseConfigName.of("[PROJECT]", "[LOCATION]", "[LICENSE_CONFIG]"); + LicenseConfig response = licenseConfigServiceClient.getLicenseConfig(name); + } + } +} +// [END discoveryengine_v1beta_generated_LicenseConfigService_GetLicenseConfig_Licenseconfigname_sync] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/licenseconfigservice/getlicenseconfig/SyncGetLicenseConfigString.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/licenseconfigservice/getlicenseconfig/SyncGetLicenseConfigString.java new file mode 100644 index 000000000000..d05b01a61dbc --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/licenseconfigservice/getlicenseconfig/SyncGetLicenseConfigString.java @@ -0,0 +1,43 @@ +/* + * 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.discoveryengine.v1beta.samples; + +// [START discoveryengine_v1beta_generated_LicenseConfigService_GetLicenseConfig_String_sync] +import com.google.cloud.discoveryengine.v1beta.LicenseConfig; +import com.google.cloud.discoveryengine.v1beta.LicenseConfigName; +import com.google.cloud.discoveryengine.v1beta.LicenseConfigServiceClient; + +public class SyncGetLicenseConfigString { + + public static void main(String[] args) throws Exception { + syncGetLicenseConfigString(); + } + + public static void syncGetLicenseConfigString() 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 (LicenseConfigServiceClient licenseConfigServiceClient = + LicenseConfigServiceClient.create()) { + String name = LicenseConfigName.of("[PROJECT]", "[LOCATION]", "[LICENSE_CONFIG]").toString(); + LicenseConfig response = licenseConfigServiceClient.getLicenseConfig(name); + } + } +} +// [END discoveryengine_v1beta_generated_LicenseConfigService_GetLicenseConfig_String_sync] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/licenseconfigservice/listlicenseconfigs/AsyncListLicenseConfigs.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/licenseconfigservice/listlicenseconfigs/AsyncListLicenseConfigs.java new file mode 100644 index 000000000000..edbae7632dcb --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/licenseconfigservice/listlicenseconfigs/AsyncListLicenseConfigs.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.cloud.discoveryengine.v1beta.samples; + +// [START discoveryengine_v1beta_generated_LicenseConfigService_ListLicenseConfigs_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.discoveryengine.v1beta.LicenseConfig; +import com.google.cloud.discoveryengine.v1beta.LicenseConfigServiceClient; +import com.google.cloud.discoveryengine.v1beta.ListLicenseConfigsRequest; +import com.google.cloud.discoveryengine.v1beta.LocationName; + +public class AsyncListLicenseConfigs { + + public static void main(String[] args) throws Exception { + asyncListLicenseConfigs(); + } + + public static void asyncListLicenseConfigs() 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 (LicenseConfigServiceClient licenseConfigServiceClient = + LicenseConfigServiceClient.create()) { + ListLicenseConfigsRequest request = + ListLicenseConfigsRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .build(); + ApiFuture future = + licenseConfigServiceClient.listLicenseConfigsPagedCallable().futureCall(request); + // Do something. + for (LicenseConfig element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END discoveryengine_v1beta_generated_LicenseConfigService_ListLicenseConfigs_async] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/licenseconfigservice/listlicenseconfigs/AsyncListLicenseConfigsPaged.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/licenseconfigservice/listlicenseconfigs/AsyncListLicenseConfigsPaged.java new file mode 100644 index 000000000000..3e8c3826f615 --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/licenseconfigservice/listlicenseconfigs/AsyncListLicenseConfigsPaged.java @@ -0,0 +1,64 @@ +/* + * 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.discoveryengine.v1beta.samples; + +// [START discoveryengine_v1beta_generated_LicenseConfigService_ListLicenseConfigs_Paged_async] +import com.google.cloud.discoveryengine.v1beta.LicenseConfig; +import com.google.cloud.discoveryengine.v1beta.LicenseConfigServiceClient; +import com.google.cloud.discoveryengine.v1beta.ListLicenseConfigsRequest; +import com.google.cloud.discoveryengine.v1beta.ListLicenseConfigsResponse; +import com.google.cloud.discoveryengine.v1beta.LocationName; +import com.google.common.base.Strings; + +public class AsyncListLicenseConfigsPaged { + + public static void main(String[] args) throws Exception { + asyncListLicenseConfigsPaged(); + } + + public static void asyncListLicenseConfigsPaged() 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 (LicenseConfigServiceClient licenseConfigServiceClient = + LicenseConfigServiceClient.create()) { + ListLicenseConfigsRequest request = + ListLicenseConfigsRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .build(); + while (true) { + ListLicenseConfigsResponse response = + licenseConfigServiceClient.listLicenseConfigsCallable().call(request); + for (LicenseConfig element : response.getLicenseConfigsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END discoveryengine_v1beta_generated_LicenseConfigService_ListLicenseConfigs_Paged_async] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/licenseconfigservice/listlicenseconfigs/SyncListLicenseConfigs.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/licenseconfigservice/listlicenseconfigs/SyncListLicenseConfigs.java new file mode 100644 index 000000000000..c5515f752c9c --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/licenseconfigservice/listlicenseconfigs/SyncListLicenseConfigs.java @@ -0,0 +1,53 @@ +/* + * 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.discoveryengine.v1beta.samples; + +// [START discoveryengine_v1beta_generated_LicenseConfigService_ListLicenseConfigs_sync] +import com.google.cloud.discoveryengine.v1beta.LicenseConfig; +import com.google.cloud.discoveryengine.v1beta.LicenseConfigServiceClient; +import com.google.cloud.discoveryengine.v1beta.ListLicenseConfigsRequest; +import com.google.cloud.discoveryengine.v1beta.LocationName; + +public class SyncListLicenseConfigs { + + public static void main(String[] args) throws Exception { + syncListLicenseConfigs(); + } + + public static void syncListLicenseConfigs() 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 (LicenseConfigServiceClient licenseConfigServiceClient = + LicenseConfigServiceClient.create()) { + ListLicenseConfigsRequest request = + ListLicenseConfigsRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .build(); + for (LicenseConfig element : + licenseConfigServiceClient.listLicenseConfigs(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END discoveryengine_v1beta_generated_LicenseConfigService_ListLicenseConfigs_sync] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/licenseconfigservice/listlicenseconfigs/SyncListLicenseConfigsLocationname.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/licenseconfigservice/listlicenseconfigs/SyncListLicenseConfigsLocationname.java new file mode 100644 index 000000000000..a70db07f71fb --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/licenseconfigservice/listlicenseconfigs/SyncListLicenseConfigsLocationname.java @@ -0,0 +1,46 @@ +/* + * 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.discoveryengine.v1beta.samples; + +// [START discoveryengine_v1beta_generated_LicenseConfigService_ListLicenseConfigs_Locationname_sync] +import com.google.cloud.discoveryengine.v1beta.LicenseConfig; +import com.google.cloud.discoveryengine.v1beta.LicenseConfigServiceClient; +import com.google.cloud.discoveryengine.v1beta.LocationName; + +public class SyncListLicenseConfigsLocationname { + + public static void main(String[] args) throws Exception { + syncListLicenseConfigsLocationname(); + } + + public static void syncListLicenseConfigsLocationname() 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 (LicenseConfigServiceClient licenseConfigServiceClient = + LicenseConfigServiceClient.create()) { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + for (LicenseConfig element : + licenseConfigServiceClient.listLicenseConfigs(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END discoveryengine_v1beta_generated_LicenseConfigService_ListLicenseConfigs_Locationname_sync] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/licenseconfigservice/listlicenseconfigs/SyncListLicenseConfigsString.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/licenseconfigservice/listlicenseconfigs/SyncListLicenseConfigsString.java new file mode 100644 index 000000000000..b2f2a8e73714 --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/licenseconfigservice/listlicenseconfigs/SyncListLicenseConfigsString.java @@ -0,0 +1,46 @@ +/* + * 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.discoveryengine.v1beta.samples; + +// [START discoveryengine_v1beta_generated_LicenseConfigService_ListLicenseConfigs_String_sync] +import com.google.cloud.discoveryengine.v1beta.LicenseConfig; +import com.google.cloud.discoveryengine.v1beta.LicenseConfigServiceClient; +import com.google.cloud.discoveryengine.v1beta.LocationName; + +public class SyncListLicenseConfigsString { + + public static void main(String[] args) throws Exception { + syncListLicenseConfigsString(); + } + + public static void syncListLicenseConfigsString() 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 (LicenseConfigServiceClient licenseConfigServiceClient = + LicenseConfigServiceClient.create()) { + String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); + for (LicenseConfig element : + licenseConfigServiceClient.listLicenseConfigs(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END discoveryengine_v1beta_generated_LicenseConfigService_ListLicenseConfigs_String_sync] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/licenseconfigservice/retractlicenseconfig/AsyncRetractLicenseConfig.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/licenseconfigservice/retractlicenseconfig/AsyncRetractLicenseConfig.java new file mode 100644 index 000000000000..e3e1f61f7fa2 --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/licenseconfigservice/retractlicenseconfig/AsyncRetractLicenseConfig.java @@ -0,0 +1,59 @@ +/* + * 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.discoveryengine.v1beta.samples; + +// [START discoveryengine_v1beta_generated_LicenseConfigService_RetractLicenseConfig_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.discoveryengine.v1beta.BillingAccountLicenseConfigName; +import com.google.cloud.discoveryengine.v1beta.LicenseConfigName; +import com.google.cloud.discoveryengine.v1beta.LicenseConfigServiceClient; +import com.google.cloud.discoveryengine.v1beta.RetractLicenseConfigRequest; +import com.google.cloud.discoveryengine.v1beta.RetractLicenseConfigResponse; + +public class AsyncRetractLicenseConfig { + + public static void main(String[] args) throws Exception { + asyncRetractLicenseConfig(); + } + + public static void asyncRetractLicenseConfig() 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 (LicenseConfigServiceClient licenseConfigServiceClient = + LicenseConfigServiceClient.create()) { + RetractLicenseConfigRequest request = + RetractLicenseConfigRequest.newBuilder() + .setBillingAccountLicenseConfig( + BillingAccountLicenseConfigName.of( + "[BILLING_ACCOUNT]", "[BILLING_ACCOUNT_LICENSE_CONFIG]") + .toString()) + .setLicenseConfig( + LicenseConfigName.of("[PROJECT]", "[LOCATION]", "[LICENSE_CONFIG]").toString()) + .setFullRetract(true) + .setLicenseCount(-1565113455) + .build(); + ApiFuture future = + licenseConfigServiceClient.retractLicenseConfigCallable().futureCall(request); + // Do something. + RetractLicenseConfigResponse response = future.get(); + } + } +} +// [END discoveryengine_v1beta_generated_LicenseConfigService_RetractLicenseConfig_async] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/licenseconfigservice/retractlicenseconfig/SyncRetractLicenseConfig.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/licenseconfigservice/retractlicenseconfig/SyncRetractLicenseConfig.java new file mode 100644 index 000000000000..fb73c60fe27a --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/licenseconfigservice/retractlicenseconfig/SyncRetractLicenseConfig.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.cloud.discoveryengine.v1beta.samples; + +// [START discoveryengine_v1beta_generated_LicenseConfigService_RetractLicenseConfig_sync] +import com.google.cloud.discoveryengine.v1beta.BillingAccountLicenseConfigName; +import com.google.cloud.discoveryengine.v1beta.LicenseConfigName; +import com.google.cloud.discoveryengine.v1beta.LicenseConfigServiceClient; +import com.google.cloud.discoveryengine.v1beta.RetractLicenseConfigRequest; +import com.google.cloud.discoveryengine.v1beta.RetractLicenseConfigResponse; + +public class SyncRetractLicenseConfig { + + public static void main(String[] args) throws Exception { + syncRetractLicenseConfig(); + } + + public static void syncRetractLicenseConfig() 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 (LicenseConfigServiceClient licenseConfigServiceClient = + LicenseConfigServiceClient.create()) { + RetractLicenseConfigRequest request = + RetractLicenseConfigRequest.newBuilder() + .setBillingAccountLicenseConfig( + BillingAccountLicenseConfigName.of( + "[BILLING_ACCOUNT]", "[BILLING_ACCOUNT_LICENSE_CONFIG]") + .toString()) + .setLicenseConfig( + LicenseConfigName.of("[PROJECT]", "[LOCATION]", "[LICENSE_CONFIG]").toString()) + .setFullRetract(true) + .setLicenseCount(-1565113455) + .build(); + RetractLicenseConfigResponse response = + licenseConfigServiceClient.retractLicenseConfig(request); + } + } +} +// [END discoveryengine_v1beta_generated_LicenseConfigService_RetractLicenseConfig_sync] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/licenseconfigservice/retractlicenseconfig/SyncRetractLicenseConfigBillingaccountlicenseconfignameLicenseconfignameBooleanLong.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/licenseconfigservice/retractlicenseconfig/SyncRetractLicenseConfigBillingaccountlicenseconfignameLicenseconfignameBooleanLong.java new file mode 100644 index 000000000000..09f2fd42abfd --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/licenseconfigservice/retractlicenseconfig/SyncRetractLicenseConfigBillingaccountlicenseconfignameLicenseconfignameBooleanLong.java @@ -0,0 +1,54 @@ +/* + * 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.discoveryengine.v1beta.samples; + +// [START discoveryengine_v1beta_generated_LicenseConfigService_RetractLicenseConfig_BillingaccountlicenseconfignameLicenseconfignameBooleanLong_sync] +import com.google.cloud.discoveryengine.v1beta.BillingAccountLicenseConfigName; +import com.google.cloud.discoveryengine.v1beta.LicenseConfigName; +import com.google.cloud.discoveryengine.v1beta.LicenseConfigServiceClient; +import com.google.cloud.discoveryengine.v1beta.RetractLicenseConfigResponse; + +public class SyncRetractLicenseConfigBillingaccountlicenseconfignameLicenseconfignameBooleanLong { + + public static void main(String[] args) throws Exception { + syncRetractLicenseConfigBillingaccountlicenseconfignameLicenseconfignameBooleanLong(); + } + + public static void + syncRetractLicenseConfigBillingaccountlicenseconfignameLicenseconfignameBooleanLong() + 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 (LicenseConfigServiceClient licenseConfigServiceClient = + LicenseConfigServiceClient.create()) { + BillingAccountLicenseConfigName billingAccountLicenseConfig = + BillingAccountLicenseConfigName.of( + "[BILLING_ACCOUNT]", "[BILLING_ACCOUNT_LICENSE_CONFIG]"); + LicenseConfigName licenseConfig = + LicenseConfigName.of("[PROJECT]", "[LOCATION]", "[LICENSE_CONFIG]"); + boolean fullRetract = true; + long licenseCount = -1565113455; + RetractLicenseConfigResponse response = + licenseConfigServiceClient.retractLicenseConfig( + billingAccountLicenseConfig, licenseConfig, fullRetract, licenseCount); + } + } +} +// [END discoveryengine_v1beta_generated_LicenseConfigService_RetractLicenseConfig_BillingaccountlicenseconfignameLicenseconfignameBooleanLong_sync] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/licenseconfigservice/retractlicenseconfig/SyncRetractLicenseConfigBillingaccountlicenseconfignameStringBooleanLong.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/licenseconfigservice/retractlicenseconfig/SyncRetractLicenseConfigBillingaccountlicenseconfignameStringBooleanLong.java new file mode 100644 index 000000000000..a791e05617c3 --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/licenseconfigservice/retractlicenseconfig/SyncRetractLicenseConfigBillingaccountlicenseconfignameStringBooleanLong.java @@ -0,0 +1,53 @@ +/* + * 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.discoveryengine.v1beta.samples; + +// [START discoveryengine_v1beta_generated_LicenseConfigService_RetractLicenseConfig_BillingaccountlicenseconfignameStringBooleanLong_sync] +import com.google.cloud.discoveryengine.v1beta.BillingAccountLicenseConfigName; +import com.google.cloud.discoveryengine.v1beta.LicenseConfigName; +import com.google.cloud.discoveryengine.v1beta.LicenseConfigServiceClient; +import com.google.cloud.discoveryengine.v1beta.RetractLicenseConfigResponse; + +public class SyncRetractLicenseConfigBillingaccountlicenseconfignameStringBooleanLong { + + public static void main(String[] args) throws Exception { + syncRetractLicenseConfigBillingaccountlicenseconfignameStringBooleanLong(); + } + + public static void syncRetractLicenseConfigBillingaccountlicenseconfignameStringBooleanLong() + 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 (LicenseConfigServiceClient licenseConfigServiceClient = + LicenseConfigServiceClient.create()) { + BillingAccountLicenseConfigName billingAccountLicenseConfig = + BillingAccountLicenseConfigName.of( + "[BILLING_ACCOUNT]", "[BILLING_ACCOUNT_LICENSE_CONFIG]"); + String licenseConfig = + LicenseConfigName.of("[PROJECT]", "[LOCATION]", "[LICENSE_CONFIG]").toString(); + boolean fullRetract = true; + long licenseCount = -1565113455; + RetractLicenseConfigResponse response = + licenseConfigServiceClient.retractLicenseConfig( + billingAccountLicenseConfig, licenseConfig, fullRetract, licenseCount); + } + } +} +// [END discoveryengine_v1beta_generated_LicenseConfigService_RetractLicenseConfig_BillingaccountlicenseconfignameStringBooleanLong_sync] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/licenseconfigservice/retractlicenseconfig/SyncRetractLicenseConfigStringLicenseconfignameBooleanLong.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/licenseconfigservice/retractlicenseconfig/SyncRetractLicenseConfigStringLicenseconfignameBooleanLong.java new file mode 100644 index 000000000000..5d554afca89b --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/licenseconfigservice/retractlicenseconfig/SyncRetractLicenseConfigStringLicenseconfignameBooleanLong.java @@ -0,0 +1,53 @@ +/* + * 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.discoveryengine.v1beta.samples; + +// [START discoveryengine_v1beta_generated_LicenseConfigService_RetractLicenseConfig_StringLicenseconfignameBooleanLong_sync] +import com.google.cloud.discoveryengine.v1beta.BillingAccountLicenseConfigName; +import com.google.cloud.discoveryengine.v1beta.LicenseConfigName; +import com.google.cloud.discoveryengine.v1beta.LicenseConfigServiceClient; +import com.google.cloud.discoveryengine.v1beta.RetractLicenseConfigResponse; + +public class SyncRetractLicenseConfigStringLicenseconfignameBooleanLong { + + public static void main(String[] args) throws Exception { + syncRetractLicenseConfigStringLicenseconfignameBooleanLong(); + } + + public static void syncRetractLicenseConfigStringLicenseconfignameBooleanLong() 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 (LicenseConfigServiceClient licenseConfigServiceClient = + LicenseConfigServiceClient.create()) { + String billingAccountLicenseConfig = + BillingAccountLicenseConfigName.of( + "[BILLING_ACCOUNT]", "[BILLING_ACCOUNT_LICENSE_CONFIG]") + .toString(); + LicenseConfigName licenseConfig = + LicenseConfigName.of("[PROJECT]", "[LOCATION]", "[LICENSE_CONFIG]"); + boolean fullRetract = true; + long licenseCount = -1565113455; + RetractLicenseConfigResponse response = + licenseConfigServiceClient.retractLicenseConfig( + billingAccountLicenseConfig, licenseConfig, fullRetract, licenseCount); + } + } +} +// [END discoveryengine_v1beta_generated_LicenseConfigService_RetractLicenseConfig_StringLicenseconfignameBooleanLong_sync] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/licenseconfigservice/retractlicenseconfig/SyncRetractLicenseConfigStringStringBooleanLong.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/licenseconfigservice/retractlicenseconfig/SyncRetractLicenseConfigStringStringBooleanLong.java new file mode 100644 index 000000000000..50cbd67a6302 --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/licenseconfigservice/retractlicenseconfig/SyncRetractLicenseConfigStringStringBooleanLong.java @@ -0,0 +1,53 @@ +/* + * 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.discoveryengine.v1beta.samples; + +// [START discoveryengine_v1beta_generated_LicenseConfigService_RetractLicenseConfig_StringStringBooleanLong_sync] +import com.google.cloud.discoveryengine.v1beta.BillingAccountLicenseConfigName; +import com.google.cloud.discoveryengine.v1beta.LicenseConfigName; +import com.google.cloud.discoveryengine.v1beta.LicenseConfigServiceClient; +import com.google.cloud.discoveryengine.v1beta.RetractLicenseConfigResponse; + +public class SyncRetractLicenseConfigStringStringBooleanLong { + + public static void main(String[] args) throws Exception { + syncRetractLicenseConfigStringStringBooleanLong(); + } + + public static void syncRetractLicenseConfigStringStringBooleanLong() 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 (LicenseConfigServiceClient licenseConfigServiceClient = + LicenseConfigServiceClient.create()) { + String billingAccountLicenseConfig = + BillingAccountLicenseConfigName.of( + "[BILLING_ACCOUNT]", "[BILLING_ACCOUNT_LICENSE_CONFIG]") + .toString(); + String licenseConfig = + LicenseConfigName.of("[PROJECT]", "[LOCATION]", "[LICENSE_CONFIG]").toString(); + boolean fullRetract = true; + long licenseCount = -1565113455; + RetractLicenseConfigResponse response = + licenseConfigServiceClient.retractLicenseConfig( + billingAccountLicenseConfig, licenseConfig, fullRetract, licenseCount); + } + } +} +// [END discoveryengine_v1beta_generated_LicenseConfigService_RetractLicenseConfig_StringStringBooleanLong_sync] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/licenseconfigservice/updatelicenseconfig/AsyncUpdateLicenseConfig.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/licenseconfigservice/updatelicenseconfig/AsyncUpdateLicenseConfig.java new file mode 100644 index 000000000000..5848cd6fb1dd --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/licenseconfigservice/updatelicenseconfig/AsyncUpdateLicenseConfig.java @@ -0,0 +1,52 @@ +/* + * 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.discoveryengine.v1beta.samples; + +// [START discoveryengine_v1beta_generated_LicenseConfigService_UpdateLicenseConfig_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.discoveryengine.v1beta.LicenseConfig; +import com.google.cloud.discoveryengine.v1beta.LicenseConfigServiceClient; +import com.google.cloud.discoveryengine.v1beta.UpdateLicenseConfigRequest; +import com.google.protobuf.FieldMask; + +public class AsyncUpdateLicenseConfig { + + public static void main(String[] args) throws Exception { + asyncUpdateLicenseConfig(); + } + + public static void asyncUpdateLicenseConfig() 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 (LicenseConfigServiceClient licenseConfigServiceClient = + LicenseConfigServiceClient.create()) { + UpdateLicenseConfigRequest request = + UpdateLicenseConfigRequest.newBuilder() + .setLicenseConfig(LicenseConfig.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + ApiFuture future = + licenseConfigServiceClient.updateLicenseConfigCallable().futureCall(request); + // Do something. + LicenseConfig response = future.get(); + } + } +} +// [END discoveryengine_v1beta_generated_LicenseConfigService_UpdateLicenseConfig_async] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/licenseconfigservice/updatelicenseconfig/SyncUpdateLicenseConfig.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/licenseconfigservice/updatelicenseconfig/SyncUpdateLicenseConfig.java new file mode 100644 index 000000000000..a2c3396f20e8 --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/licenseconfigservice/updatelicenseconfig/SyncUpdateLicenseConfig.java @@ -0,0 +1,48 @@ +/* + * 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.discoveryengine.v1beta.samples; + +// [START discoveryengine_v1beta_generated_LicenseConfigService_UpdateLicenseConfig_sync] +import com.google.cloud.discoveryengine.v1beta.LicenseConfig; +import com.google.cloud.discoveryengine.v1beta.LicenseConfigServiceClient; +import com.google.cloud.discoveryengine.v1beta.UpdateLicenseConfigRequest; +import com.google.protobuf.FieldMask; + +public class SyncUpdateLicenseConfig { + + public static void main(String[] args) throws Exception { + syncUpdateLicenseConfig(); + } + + public static void syncUpdateLicenseConfig() 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 (LicenseConfigServiceClient licenseConfigServiceClient = + LicenseConfigServiceClient.create()) { + UpdateLicenseConfigRequest request = + UpdateLicenseConfigRequest.newBuilder() + .setLicenseConfig(LicenseConfig.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + LicenseConfig response = licenseConfigServiceClient.updateLicenseConfig(request); + } + } +} +// [END discoveryengine_v1beta_generated_LicenseConfigService_UpdateLicenseConfig_sync] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/licenseconfigservice/updatelicenseconfig/SyncUpdateLicenseConfigLicenseconfigFieldmask.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/licenseconfigservice/updatelicenseconfig/SyncUpdateLicenseConfigLicenseconfigFieldmask.java new file mode 100644 index 000000000000..7682db97d445 --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/licenseconfigservice/updatelicenseconfig/SyncUpdateLicenseConfigLicenseconfigFieldmask.java @@ -0,0 +1,45 @@ +/* + * 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.discoveryengine.v1beta.samples; + +// [START discoveryengine_v1beta_generated_LicenseConfigService_UpdateLicenseConfig_LicenseconfigFieldmask_sync] +import com.google.cloud.discoveryengine.v1beta.LicenseConfig; +import com.google.cloud.discoveryengine.v1beta.LicenseConfigServiceClient; +import com.google.protobuf.FieldMask; + +public class SyncUpdateLicenseConfigLicenseconfigFieldmask { + + public static void main(String[] args) throws Exception { + syncUpdateLicenseConfigLicenseconfigFieldmask(); + } + + public static void syncUpdateLicenseConfigLicenseconfigFieldmask() 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 (LicenseConfigServiceClient licenseConfigServiceClient = + LicenseConfigServiceClient.create()) { + LicenseConfig licenseConfig = LicenseConfig.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + LicenseConfig response = + licenseConfigServiceClient.updateLicenseConfig(licenseConfig, updateMask); + } + } +} +// [END discoveryengine_v1beta_generated_LicenseConfigService_UpdateLicenseConfig_LicenseconfigFieldmask_sync] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/licenseconfigservicesettings/createlicenseconfig/SyncCreateLicenseConfig.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/licenseconfigservicesettings/createlicenseconfig/SyncCreateLicenseConfig.java new file mode 100644 index 000000000000..402a0f240bba --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/licenseconfigservicesettings/createlicenseconfig/SyncCreateLicenseConfig.java @@ -0,0 +1,57 @@ +/* + * 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.discoveryengine.v1beta.samples; + +// [START discoveryengine_v1beta_generated_LicenseConfigServiceSettings_CreateLicenseConfig_sync] +import com.google.cloud.discoveryengine.v1beta.LicenseConfigServiceSettings; +import java.time.Duration; + +public class SyncCreateLicenseConfig { + + public static void main(String[] args) throws Exception { + syncCreateLicenseConfig(); + } + + public static void syncCreateLicenseConfig() 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 + LicenseConfigServiceSettings.Builder licenseConfigServiceSettingsBuilder = + LicenseConfigServiceSettings.newBuilder(); + licenseConfigServiceSettingsBuilder + .createLicenseConfigSettings() + .setRetrySettings( + licenseConfigServiceSettingsBuilder + .createLicenseConfigSettings() + .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()); + LicenseConfigServiceSettings licenseConfigServiceSettings = + licenseConfigServiceSettingsBuilder.build(); + } +} +// [END discoveryengine_v1beta_generated_LicenseConfigServiceSettings_CreateLicenseConfig_sync] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/projectservice/provisionproject/AsyncProvisionProject.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/projectservice/provisionproject/AsyncProvisionProject.java index ae9ca277dd9c..8d2dbc486fd6 100644 --- a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/projectservice/provisionproject/AsyncProvisionProject.java +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/projectservice/provisionproject/AsyncProvisionProject.java @@ -41,6 +41,7 @@ public static void asyncProvisionProject() throws Exception { .setName(ProjectName.of("[PROJECT]").toString()) .setAcceptDataUseTerms(true) .setDataUseTermsVersion("dataUseTermsVersion-1913570450") + .setSaasParams(ProvisionProjectRequest.SaasParams.newBuilder().build()) .build(); ApiFuture future = projectServiceClient.provisionProjectCallable().futureCall(request); diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/projectservice/provisionproject/AsyncProvisionProjectLRO.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/projectservice/provisionproject/AsyncProvisionProjectLRO.java index 0f9240ea2292..289c6e39437d 100644 --- a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/projectservice/provisionproject/AsyncProvisionProjectLRO.java +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/projectservice/provisionproject/AsyncProvisionProjectLRO.java @@ -42,6 +42,7 @@ public static void asyncProvisionProjectLRO() throws Exception { .setName(ProjectName.of("[PROJECT]").toString()) .setAcceptDataUseTerms(true) .setDataUseTermsVersion("dataUseTermsVersion-1913570450") + .setSaasParams(ProvisionProjectRequest.SaasParams.newBuilder().build()) .build(); OperationFuture future = projectServiceClient.provisionProjectOperationCallable().futureCall(request); diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/projectservice/provisionproject/SyncProvisionProject.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/projectservice/provisionproject/SyncProvisionProject.java index 1b63d9785cb9..59f70629eea0 100644 --- a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/projectservice/provisionproject/SyncProvisionProject.java +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/projectservice/provisionproject/SyncProvisionProject.java @@ -40,6 +40,7 @@ public static void syncProvisionProject() throws Exception { .setName(ProjectName.of("[PROJECT]").toString()) .setAcceptDataUseTerms(true) .setDataUseTermsVersion("dataUseTermsVersion-1913570450") + .setSaasParams(ProvisionProjectRequest.SaasParams.newBuilder().build()) .build(); Project response = projectServiceClient.provisionProjectAsync(request).get(); } diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/searchservice/search/AsyncSearch.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/searchservice/search/AsyncSearch.java index 5dca37bb3d16..beae19d725fa 100644 --- a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/searchservice/search/AsyncSearch.java +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/searchservice/search/AsyncSearch.java @@ -53,12 +53,14 @@ public static void asyncSearch() throws Exception { "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[BRANCH]") .toString()) .setQuery("query107944136") + .addAllPageCategories(new ArrayList()) .setImageQuery(SearchRequest.ImageQuery.newBuilder().build()) .setPageSize(883849137) .setPageToken("pageToken873572522") .setOffset(-1019779949) .setOneBoxPageSize(1988477988) .addAllDataStoreSpecs(new ArrayList()) + .setNumResultsPerDataStore(397658288) .setFilter("filter-1274492040") .setCanonicalFilter("canonicalFilter-722283124") .setOrderBy("orderBy-1207110587") @@ -79,12 +81,19 @@ public static void asyncSearch() throws Exception { .setNaturalLanguageQueryUnderstandingSpec( SearchRequest.NaturalLanguageQueryUnderstandingSpec.newBuilder().build()) .setSearchAsYouTypeSpec(SearchRequest.SearchAsYouTypeSpec.newBuilder().build()) + .setDisplaySpec(SearchRequest.DisplaySpec.newBuilder().build()) + .addAllCrowdingSpecs(new ArrayList()) .setSession( SessionName.ofProjectLocationDataStoreSessionName( "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[SESSION]") .toString()) .setSessionSpec(SearchRequest.SessionSpec.newBuilder().build()) + .setRelevanceFilterSpec(SearchRequest.RelevanceFilterSpec.newBuilder().build()) .setPersonalizationSpec(SearchRequest.PersonalizationSpec.newBuilder().build()) + .setRelevanceScoreSpec(SearchRequest.RelevanceScoreSpec.newBuilder().build()) + .setSearchAddonSpec(SearchRequest.SearchAddonSpec.newBuilder().build()) + .setCustomRankingParams(SearchRequest.CustomRankingParams.newBuilder().build()) + .setEntity("entity-1298275357") .build(); ApiFuture future = searchServiceClient.searchPagedCallable().futureCall(request); diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/searchservice/search/AsyncSearchPaged.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/searchservice/search/AsyncSearchPaged.java index e651d7b8fd7a..d03615e88bfc 100644 --- a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/searchservice/search/AsyncSearchPaged.java +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/searchservice/search/AsyncSearchPaged.java @@ -53,12 +53,14 @@ public static void asyncSearchPaged() throws Exception { "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[BRANCH]") .toString()) .setQuery("query107944136") + .addAllPageCategories(new ArrayList()) .setImageQuery(SearchRequest.ImageQuery.newBuilder().build()) .setPageSize(883849137) .setPageToken("pageToken873572522") .setOffset(-1019779949) .setOneBoxPageSize(1988477988) .addAllDataStoreSpecs(new ArrayList()) + .setNumResultsPerDataStore(397658288) .setFilter("filter-1274492040") .setCanonicalFilter("canonicalFilter-722283124") .setOrderBy("orderBy-1207110587") @@ -79,12 +81,19 @@ public static void asyncSearchPaged() throws Exception { .setNaturalLanguageQueryUnderstandingSpec( SearchRequest.NaturalLanguageQueryUnderstandingSpec.newBuilder().build()) .setSearchAsYouTypeSpec(SearchRequest.SearchAsYouTypeSpec.newBuilder().build()) + .setDisplaySpec(SearchRequest.DisplaySpec.newBuilder().build()) + .addAllCrowdingSpecs(new ArrayList()) .setSession( SessionName.ofProjectLocationDataStoreSessionName( "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[SESSION]") .toString()) .setSessionSpec(SearchRequest.SessionSpec.newBuilder().build()) + .setRelevanceFilterSpec(SearchRequest.RelevanceFilterSpec.newBuilder().build()) .setPersonalizationSpec(SearchRequest.PersonalizationSpec.newBuilder().build()) + .setRelevanceScoreSpec(SearchRequest.RelevanceScoreSpec.newBuilder().build()) + .setSearchAddonSpec(SearchRequest.SearchAddonSpec.newBuilder().build()) + .setCustomRankingParams(SearchRequest.CustomRankingParams.newBuilder().build()) + .setEntity("entity-1298275357") .build(); while (true) { SearchResponse response = searchServiceClient.searchCallable().call(request); diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/searchservice/search/SyncSearch.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/searchservice/search/SyncSearch.java index f263acd6e250..73de6fa0e7f7 100644 --- a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/searchservice/search/SyncSearch.java +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/searchservice/search/SyncSearch.java @@ -52,12 +52,14 @@ public static void syncSearch() throws Exception { "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[BRANCH]") .toString()) .setQuery("query107944136") + .addAllPageCategories(new ArrayList()) .setImageQuery(SearchRequest.ImageQuery.newBuilder().build()) .setPageSize(883849137) .setPageToken("pageToken873572522") .setOffset(-1019779949) .setOneBoxPageSize(1988477988) .addAllDataStoreSpecs(new ArrayList()) + .setNumResultsPerDataStore(397658288) .setFilter("filter-1274492040") .setCanonicalFilter("canonicalFilter-722283124") .setOrderBy("orderBy-1207110587") @@ -78,12 +80,19 @@ public static void syncSearch() throws Exception { .setNaturalLanguageQueryUnderstandingSpec( SearchRequest.NaturalLanguageQueryUnderstandingSpec.newBuilder().build()) .setSearchAsYouTypeSpec(SearchRequest.SearchAsYouTypeSpec.newBuilder().build()) + .setDisplaySpec(SearchRequest.DisplaySpec.newBuilder().build()) + .addAllCrowdingSpecs(new ArrayList()) .setSession( SessionName.ofProjectLocationDataStoreSessionName( "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[SESSION]") .toString()) .setSessionSpec(SearchRequest.SessionSpec.newBuilder().build()) + .setRelevanceFilterSpec(SearchRequest.RelevanceFilterSpec.newBuilder().build()) .setPersonalizationSpec(SearchRequest.PersonalizationSpec.newBuilder().build()) + .setRelevanceScoreSpec(SearchRequest.RelevanceScoreSpec.newBuilder().build()) + .setSearchAddonSpec(SearchRequest.SearchAddonSpec.newBuilder().build()) + .setCustomRankingParams(SearchRequest.CustomRankingParams.newBuilder().build()) + .setEntity("entity-1298275357") .build(); for (SearchResponse.SearchResult element : searchServiceClient.search(request).iterateAll()) { // doThingsWith(element); diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/searchservice/searchlite/AsyncSearchLite.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/searchservice/searchlite/AsyncSearchLite.java index 85b9340cae3b..ea60a691c24b 100644 --- a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/searchservice/searchlite/AsyncSearchLite.java +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/searchservice/searchlite/AsyncSearchLite.java @@ -53,12 +53,14 @@ public static void asyncSearchLite() throws Exception { "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[BRANCH]") .toString()) .setQuery("query107944136") + .addAllPageCategories(new ArrayList()) .setImageQuery(SearchRequest.ImageQuery.newBuilder().build()) .setPageSize(883849137) .setPageToken("pageToken873572522") .setOffset(-1019779949) .setOneBoxPageSize(1988477988) .addAllDataStoreSpecs(new ArrayList()) + .setNumResultsPerDataStore(397658288) .setFilter("filter-1274492040") .setCanonicalFilter("canonicalFilter-722283124") .setOrderBy("orderBy-1207110587") @@ -79,12 +81,19 @@ public static void asyncSearchLite() throws Exception { .setNaturalLanguageQueryUnderstandingSpec( SearchRequest.NaturalLanguageQueryUnderstandingSpec.newBuilder().build()) .setSearchAsYouTypeSpec(SearchRequest.SearchAsYouTypeSpec.newBuilder().build()) + .setDisplaySpec(SearchRequest.DisplaySpec.newBuilder().build()) + .addAllCrowdingSpecs(new ArrayList()) .setSession( SessionName.ofProjectLocationDataStoreSessionName( "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[SESSION]") .toString()) .setSessionSpec(SearchRequest.SessionSpec.newBuilder().build()) + .setRelevanceFilterSpec(SearchRequest.RelevanceFilterSpec.newBuilder().build()) .setPersonalizationSpec(SearchRequest.PersonalizationSpec.newBuilder().build()) + .setRelevanceScoreSpec(SearchRequest.RelevanceScoreSpec.newBuilder().build()) + .setSearchAddonSpec(SearchRequest.SearchAddonSpec.newBuilder().build()) + .setCustomRankingParams(SearchRequest.CustomRankingParams.newBuilder().build()) + .setEntity("entity-1298275357") .build(); ApiFuture future = searchServiceClient.searchLitePagedCallable().futureCall(request); diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/searchservice/searchlite/AsyncSearchLitePaged.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/searchservice/searchlite/AsyncSearchLitePaged.java index 49cd3deb561c..49672ec3acb2 100644 --- a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/searchservice/searchlite/AsyncSearchLitePaged.java +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/searchservice/searchlite/AsyncSearchLitePaged.java @@ -53,12 +53,14 @@ public static void asyncSearchLitePaged() throws Exception { "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[BRANCH]") .toString()) .setQuery("query107944136") + .addAllPageCategories(new ArrayList()) .setImageQuery(SearchRequest.ImageQuery.newBuilder().build()) .setPageSize(883849137) .setPageToken("pageToken873572522") .setOffset(-1019779949) .setOneBoxPageSize(1988477988) .addAllDataStoreSpecs(new ArrayList()) + .setNumResultsPerDataStore(397658288) .setFilter("filter-1274492040") .setCanonicalFilter("canonicalFilter-722283124") .setOrderBy("orderBy-1207110587") @@ -79,12 +81,19 @@ public static void asyncSearchLitePaged() throws Exception { .setNaturalLanguageQueryUnderstandingSpec( SearchRequest.NaturalLanguageQueryUnderstandingSpec.newBuilder().build()) .setSearchAsYouTypeSpec(SearchRequest.SearchAsYouTypeSpec.newBuilder().build()) + .setDisplaySpec(SearchRequest.DisplaySpec.newBuilder().build()) + .addAllCrowdingSpecs(new ArrayList()) .setSession( SessionName.ofProjectLocationDataStoreSessionName( "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[SESSION]") .toString()) .setSessionSpec(SearchRequest.SessionSpec.newBuilder().build()) + .setRelevanceFilterSpec(SearchRequest.RelevanceFilterSpec.newBuilder().build()) .setPersonalizationSpec(SearchRequest.PersonalizationSpec.newBuilder().build()) + .setRelevanceScoreSpec(SearchRequest.RelevanceScoreSpec.newBuilder().build()) + .setSearchAddonSpec(SearchRequest.SearchAddonSpec.newBuilder().build()) + .setCustomRankingParams(SearchRequest.CustomRankingParams.newBuilder().build()) + .setEntity("entity-1298275357") .build(); while (true) { SearchResponse response = searchServiceClient.searchLiteCallable().call(request); diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/searchservice/searchlite/SyncSearchLite.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/searchservice/searchlite/SyncSearchLite.java index c8c64c98fef7..578a9ad38f0f 100644 --- a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/searchservice/searchlite/SyncSearchLite.java +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/searchservice/searchlite/SyncSearchLite.java @@ -52,12 +52,14 @@ public static void syncSearchLite() throws Exception { "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[BRANCH]") .toString()) .setQuery("query107944136") + .addAllPageCategories(new ArrayList()) .setImageQuery(SearchRequest.ImageQuery.newBuilder().build()) .setPageSize(883849137) .setPageToken("pageToken873572522") .setOffset(-1019779949) .setOneBoxPageSize(1988477988) .addAllDataStoreSpecs(new ArrayList()) + .setNumResultsPerDataStore(397658288) .setFilter("filter-1274492040") .setCanonicalFilter("canonicalFilter-722283124") .setOrderBy("orderBy-1207110587") @@ -78,12 +80,19 @@ public static void syncSearchLite() throws Exception { .setNaturalLanguageQueryUnderstandingSpec( SearchRequest.NaturalLanguageQueryUnderstandingSpec.newBuilder().build()) .setSearchAsYouTypeSpec(SearchRequest.SearchAsYouTypeSpec.newBuilder().build()) + .setDisplaySpec(SearchRequest.DisplaySpec.newBuilder().build()) + .addAllCrowdingSpecs(new ArrayList()) .setSession( SessionName.ofProjectLocationDataStoreSessionName( "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[SESSION]") .toString()) .setSessionSpec(SearchRequest.SessionSpec.newBuilder().build()) + .setRelevanceFilterSpec(SearchRequest.RelevanceFilterSpec.newBuilder().build()) .setPersonalizationSpec(SearchRequest.PersonalizationSpec.newBuilder().build()) + .setRelevanceScoreSpec(SearchRequest.RelevanceScoreSpec.newBuilder().build()) + .setSearchAddonSpec(SearchRequest.SearchAddonSpec.newBuilder().build()) + .setCustomRankingParams(SearchRequest.CustomRankingParams.newBuilder().build()) + .setEntity("entity-1298275357") .build(); for (SearchResponse.SearchResult element : searchServiceClient.searchLite(request).iterateAll()) { diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/servingconfigservice/createservingconfig/AsyncCreateServingConfig.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/servingconfigservice/createservingconfig/AsyncCreateServingConfig.java new file mode 100644 index 000000000000..cf7f1562743e --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/servingconfigservice/createservingconfig/AsyncCreateServingConfig.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.cloud.discoveryengine.v1beta.samples; + +// [START discoveryengine_v1beta_generated_ServingConfigService_CreateServingConfig_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.discoveryengine.v1beta.CreateServingConfigRequest; +import com.google.cloud.discoveryengine.v1beta.DataStoreName; +import com.google.cloud.discoveryengine.v1beta.ServingConfig; +import com.google.cloud.discoveryengine.v1beta.ServingConfigServiceClient; + +public class AsyncCreateServingConfig { + + public static void main(String[] args) throws Exception { + asyncCreateServingConfig(); + } + + public static void asyncCreateServingConfig() 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 (ServingConfigServiceClient servingConfigServiceClient = + ServingConfigServiceClient.create()) { + CreateServingConfigRequest request = + CreateServingConfigRequest.newBuilder() + .setParent( + DataStoreName.ofProjectLocationDataStoreName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]") + .toString()) + .setServingConfig(ServingConfig.newBuilder().build()) + .setServingConfigId("servingConfigId-831052759") + .build(); + ApiFuture future = + servingConfigServiceClient.createServingConfigCallable().futureCall(request); + // Do something. + ServingConfig response = future.get(); + } + } +} +// [END discoveryengine_v1beta_generated_ServingConfigService_CreateServingConfig_async] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/servingconfigservice/createservingconfig/SyncCreateServingConfig.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/servingconfigservice/createservingconfig/SyncCreateServingConfig.java new file mode 100644 index 000000000000..cc0cf4fb9d30 --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/servingconfigservice/createservingconfig/SyncCreateServingConfig.java @@ -0,0 +1,52 @@ +/* + * 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.discoveryengine.v1beta.samples; + +// [START discoveryengine_v1beta_generated_ServingConfigService_CreateServingConfig_sync] +import com.google.cloud.discoveryengine.v1beta.CreateServingConfigRequest; +import com.google.cloud.discoveryengine.v1beta.DataStoreName; +import com.google.cloud.discoveryengine.v1beta.ServingConfig; +import com.google.cloud.discoveryengine.v1beta.ServingConfigServiceClient; + +public class SyncCreateServingConfig { + + public static void main(String[] args) throws Exception { + syncCreateServingConfig(); + } + + public static void syncCreateServingConfig() 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 (ServingConfigServiceClient servingConfigServiceClient = + ServingConfigServiceClient.create()) { + CreateServingConfigRequest request = + CreateServingConfigRequest.newBuilder() + .setParent( + DataStoreName.ofProjectLocationDataStoreName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]") + .toString()) + .setServingConfig(ServingConfig.newBuilder().build()) + .setServingConfigId("servingConfigId-831052759") + .build(); + ServingConfig response = servingConfigServiceClient.createServingConfig(request); + } + } +} +// [END discoveryengine_v1beta_generated_ServingConfigService_CreateServingConfig_sync] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/servingconfigservice/createservingconfig/SyncCreateServingConfigDatastorenameServingconfigString.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/servingconfigservice/createservingconfig/SyncCreateServingConfigDatastorenameServingconfigString.java new file mode 100644 index 000000000000..6f10051a0f72 --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/servingconfigservice/createservingconfig/SyncCreateServingConfigDatastorenameServingconfigString.java @@ -0,0 +1,47 @@ +/* + * 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.discoveryengine.v1beta.samples; + +// [START discoveryengine_v1beta_generated_ServingConfigService_CreateServingConfig_DatastorenameServingconfigString_sync] +import com.google.cloud.discoveryengine.v1beta.DataStoreName; +import com.google.cloud.discoveryengine.v1beta.ServingConfig; +import com.google.cloud.discoveryengine.v1beta.ServingConfigServiceClient; + +public class SyncCreateServingConfigDatastorenameServingconfigString { + + public static void main(String[] args) throws Exception { + syncCreateServingConfigDatastorenameServingconfigString(); + } + + public static void syncCreateServingConfigDatastorenameServingconfigString() 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 (ServingConfigServiceClient servingConfigServiceClient = + ServingConfigServiceClient.create()) { + DataStoreName parent = + DataStoreName.ofProjectLocationDataStoreName("[PROJECT]", "[LOCATION]", "[DATA_STORE]"); + ServingConfig servingConfig = ServingConfig.newBuilder().build(); + String servingConfigId = "servingConfigId-831052759"; + ServingConfig response = + servingConfigServiceClient.createServingConfig(parent, servingConfig, servingConfigId); + } + } +} +// [END discoveryengine_v1beta_generated_ServingConfigService_CreateServingConfig_DatastorenameServingconfigString_sync] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/servingconfigservice/createservingconfig/SyncCreateServingConfigEnginenameServingconfigString.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/servingconfigservice/createservingconfig/SyncCreateServingConfigEnginenameServingconfigString.java new file mode 100644 index 000000000000..f19ee92d9088 --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/servingconfigservice/createservingconfig/SyncCreateServingConfigEnginenameServingconfigString.java @@ -0,0 +1,46 @@ +/* + * 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.discoveryengine.v1beta.samples; + +// [START discoveryengine_v1beta_generated_ServingConfigService_CreateServingConfig_EnginenameServingconfigString_sync] +import com.google.cloud.discoveryengine.v1beta.EngineName; +import com.google.cloud.discoveryengine.v1beta.ServingConfig; +import com.google.cloud.discoveryengine.v1beta.ServingConfigServiceClient; + +public class SyncCreateServingConfigEnginenameServingconfigString { + + public static void main(String[] args) throws Exception { + syncCreateServingConfigEnginenameServingconfigString(); + } + + public static void syncCreateServingConfigEnginenameServingconfigString() 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 (ServingConfigServiceClient servingConfigServiceClient = + ServingConfigServiceClient.create()) { + EngineName parent = EngineName.of("[PROJECT]", "[LOCATION]", "[COLLECTION]", "[ENGINE]"); + ServingConfig servingConfig = ServingConfig.newBuilder().build(); + String servingConfigId = "servingConfigId-831052759"; + ServingConfig response = + servingConfigServiceClient.createServingConfig(parent, servingConfig, servingConfigId); + } + } +} +// [END discoveryengine_v1beta_generated_ServingConfigService_CreateServingConfig_EnginenameServingconfigString_sync] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/servingconfigservice/createservingconfig/SyncCreateServingConfigStringServingconfigString.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/servingconfigservice/createservingconfig/SyncCreateServingConfigStringServingconfigString.java new file mode 100644 index 000000000000..df4bb904a0e4 --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/servingconfigservice/createservingconfig/SyncCreateServingConfigStringServingconfigString.java @@ -0,0 +1,48 @@ +/* + * 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.discoveryengine.v1beta.samples; + +// [START discoveryengine_v1beta_generated_ServingConfigService_CreateServingConfig_StringServingconfigString_sync] +import com.google.cloud.discoveryengine.v1beta.DataStoreName; +import com.google.cloud.discoveryengine.v1beta.ServingConfig; +import com.google.cloud.discoveryengine.v1beta.ServingConfigServiceClient; + +public class SyncCreateServingConfigStringServingconfigString { + + public static void main(String[] args) throws Exception { + syncCreateServingConfigStringServingconfigString(); + } + + public static void syncCreateServingConfigStringServingconfigString() 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 (ServingConfigServiceClient servingConfigServiceClient = + ServingConfigServiceClient.create()) { + String parent = + DataStoreName.ofProjectLocationDataStoreName("[PROJECT]", "[LOCATION]", "[DATA_STORE]") + .toString(); + ServingConfig servingConfig = ServingConfig.newBuilder().build(); + String servingConfigId = "servingConfigId-831052759"; + ServingConfig response = + servingConfigServiceClient.createServingConfig(parent, servingConfig, servingConfigId); + } + } +} +// [END discoveryengine_v1beta_generated_ServingConfigService_CreateServingConfig_StringServingconfigString_sync] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/servingconfigservice/deleteservingconfig/AsyncDeleteServingConfig.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/servingconfigservice/deleteservingconfig/AsyncDeleteServingConfig.java new file mode 100644 index 000000000000..4ea2b6564695 --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/servingconfigservice/deleteservingconfig/AsyncDeleteServingConfig.java @@ -0,0 +1,54 @@ +/* + * 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.discoveryengine.v1beta.samples; + +// [START discoveryengine_v1beta_generated_ServingConfigService_DeleteServingConfig_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.discoveryengine.v1beta.DeleteServingConfigRequest; +import com.google.cloud.discoveryengine.v1beta.ServingConfigName; +import com.google.cloud.discoveryengine.v1beta.ServingConfigServiceClient; +import com.google.protobuf.Empty; + +public class AsyncDeleteServingConfig { + + public static void main(String[] args) throws Exception { + asyncDeleteServingConfig(); + } + + public static void asyncDeleteServingConfig() 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 (ServingConfigServiceClient servingConfigServiceClient = + ServingConfigServiceClient.create()) { + DeleteServingConfigRequest request = + DeleteServingConfigRequest.newBuilder() + .setName( + ServingConfigName.ofProjectLocationDataStoreServingConfigName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[SERVING_CONFIG]") + .toString()) + .build(); + ApiFuture future = + servingConfigServiceClient.deleteServingConfigCallable().futureCall(request); + // Do something. + future.get(); + } + } +} +// [END discoveryengine_v1beta_generated_ServingConfigService_DeleteServingConfig_async] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/servingconfigservice/deleteservingconfig/SyncDeleteServingConfig.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/servingconfigservice/deleteservingconfig/SyncDeleteServingConfig.java new file mode 100644 index 000000000000..6b5a5ceeff1c --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/servingconfigservice/deleteservingconfig/SyncDeleteServingConfig.java @@ -0,0 +1,50 @@ +/* + * 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.discoveryengine.v1beta.samples; + +// [START discoveryengine_v1beta_generated_ServingConfigService_DeleteServingConfig_sync] +import com.google.cloud.discoveryengine.v1beta.DeleteServingConfigRequest; +import com.google.cloud.discoveryengine.v1beta.ServingConfigName; +import com.google.cloud.discoveryengine.v1beta.ServingConfigServiceClient; +import com.google.protobuf.Empty; + +public class SyncDeleteServingConfig { + + public static void main(String[] args) throws Exception { + syncDeleteServingConfig(); + } + + public static void syncDeleteServingConfig() 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 (ServingConfigServiceClient servingConfigServiceClient = + ServingConfigServiceClient.create()) { + DeleteServingConfigRequest request = + DeleteServingConfigRequest.newBuilder() + .setName( + ServingConfigName.ofProjectLocationDataStoreServingConfigName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[SERVING_CONFIG]") + .toString()) + .build(); + servingConfigServiceClient.deleteServingConfig(request); + } + } +} +// [END discoveryengine_v1beta_generated_ServingConfigService_DeleteServingConfig_sync] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/servingconfigservice/deleteservingconfig/SyncDeleteServingConfigServingconfigname.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/servingconfigservice/deleteservingconfig/SyncDeleteServingConfigServingconfigname.java new file mode 100644 index 000000000000..9353bc49920e --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/servingconfigservice/deleteservingconfig/SyncDeleteServingConfigServingconfigname.java @@ -0,0 +1,45 @@ +/* + * 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.discoveryengine.v1beta.samples; + +// [START discoveryengine_v1beta_generated_ServingConfigService_DeleteServingConfig_Servingconfigname_sync] +import com.google.cloud.discoveryengine.v1beta.ServingConfigName; +import com.google.cloud.discoveryengine.v1beta.ServingConfigServiceClient; +import com.google.protobuf.Empty; + +public class SyncDeleteServingConfigServingconfigname { + + public static void main(String[] args) throws Exception { + syncDeleteServingConfigServingconfigname(); + } + + public static void syncDeleteServingConfigServingconfigname() 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 (ServingConfigServiceClient servingConfigServiceClient = + ServingConfigServiceClient.create()) { + ServingConfigName name = + ServingConfigName.ofProjectLocationDataStoreServingConfigName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[SERVING_CONFIG]"); + servingConfigServiceClient.deleteServingConfig(name); + } + } +} +// [END discoveryengine_v1beta_generated_ServingConfigService_DeleteServingConfig_Servingconfigname_sync] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/servingconfigservice/deleteservingconfig/SyncDeleteServingConfigString.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/servingconfigservice/deleteservingconfig/SyncDeleteServingConfigString.java new file mode 100644 index 000000000000..9efad853929c --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/servingconfigservice/deleteservingconfig/SyncDeleteServingConfigString.java @@ -0,0 +1,46 @@ +/* + * 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.discoveryengine.v1beta.samples; + +// [START discoveryengine_v1beta_generated_ServingConfigService_DeleteServingConfig_String_sync] +import com.google.cloud.discoveryengine.v1beta.ServingConfigName; +import com.google.cloud.discoveryengine.v1beta.ServingConfigServiceClient; +import com.google.protobuf.Empty; + +public class SyncDeleteServingConfigString { + + public static void main(String[] args) throws Exception { + syncDeleteServingConfigString(); + } + + public static void syncDeleteServingConfigString() 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 (ServingConfigServiceClient servingConfigServiceClient = + ServingConfigServiceClient.create()) { + String name = + ServingConfigName.ofProjectLocationDataStoreServingConfigName( + "[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[SERVING_CONFIG]") + .toString(); + servingConfigServiceClient.deleteServingConfig(name); + } + } +} +// [END discoveryengine_v1beta_generated_ServingConfigService_DeleteServingConfig_String_sync] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/servingconfigservicesettings/updateservingconfig/SyncUpdateServingConfig.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/servingconfigservicesettings/createservingconfig/SyncCreateServingConfig.java similarity index 88% rename from java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/servingconfigservicesettings/updateservingconfig/SyncUpdateServingConfig.java rename to java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/servingconfigservicesettings/createservingconfig/SyncCreateServingConfig.java index 0df3a5b23bb7..ede2902cbc10 100644 --- a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/servingconfigservicesettings/updateservingconfig/SyncUpdateServingConfig.java +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/servingconfigservicesettings/createservingconfig/SyncCreateServingConfig.java @@ -16,17 +16,17 @@ package com.google.cloud.discoveryengine.v1beta.samples; -// [START discoveryengine_v1beta_generated_ServingConfigServiceSettings_UpdateServingConfig_sync] +// [START discoveryengine_v1beta_generated_ServingConfigServiceSettings_CreateServingConfig_sync] import com.google.cloud.discoveryengine.v1beta.ServingConfigServiceSettings; import java.time.Duration; -public class SyncUpdateServingConfig { +public class SyncCreateServingConfig { public static void main(String[] args) throws Exception { - syncUpdateServingConfig(); + syncCreateServingConfig(); } - public static void syncUpdateServingConfig() throws Exception { + public static void syncCreateServingConfig() 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. @@ -35,10 +35,10 @@ public static void syncUpdateServingConfig() throws Exception { ServingConfigServiceSettings.Builder servingConfigServiceSettingsBuilder = ServingConfigServiceSettings.newBuilder(); servingConfigServiceSettingsBuilder - .updateServingConfigSettings() + .createServingConfigSettings() .setRetrySettings( servingConfigServiceSettingsBuilder - .updateServingConfigSettings() + .createServingConfigSettings() .getRetrySettings() .toBuilder() .setInitialRetryDelayDuration(Duration.ofSeconds(1)) @@ -54,4 +54,4 @@ public static void syncUpdateServingConfig() throws Exception { servingConfigServiceSettingsBuilder.build(); } } -// [END discoveryengine_v1beta_generated_ServingConfigServiceSettings_UpdateServingConfig_sync] +// [END discoveryengine_v1beta_generated_ServingConfigServiceSettings_CreateServingConfig_sync] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/sessionservice/createsession/AsyncCreateSession.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/sessionservice/createsession/AsyncCreateSession.java index ee675b4a54da..c1cbd3106da9 100644 --- a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/sessionservice/createsession/AsyncCreateSession.java +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/sessionservice/createsession/AsyncCreateSession.java @@ -43,6 +43,7 @@ public static void asyncCreateSession() throws Exception { "[PROJECT]", "[LOCATION]", "[DATA_STORE]") .toString()) .setSession(Session.newBuilder().build()) + .setSessionId("sessionId607796817") .build(); ApiFuture future = sessionServiceClient.createSessionCallable().futureCall(request); // Do something. diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/sessionservice/createsession/SyncCreateSession.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/sessionservice/createsession/SyncCreateSession.java index 60885d59b787..6f657ff36dd8 100644 --- a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/sessionservice/createsession/SyncCreateSession.java +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/sessionservice/createsession/SyncCreateSession.java @@ -42,6 +42,7 @@ public static void syncCreateSession() throws Exception { "[PROJECT]", "[LOCATION]", "[DATA_STORE]") .toString()) .setSession(Session.newBuilder().build()) + .setSessionId("sessionId607796817") .build(); Session response = sessionServiceClient.createSession(request); } diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/stub/aclconfigservicestubsettings/updateaclconfig/SyncUpdateAclConfig.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/stub/aclconfigservicestubsettings/updateaclconfig/SyncUpdateAclConfig.java new file mode 100644 index 000000000000..c32cc5bbe5d5 --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/stub/aclconfigservicestubsettings/updateaclconfig/SyncUpdateAclConfig.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.cloud.discoveryengine.v1beta.stub.samples; + +// [START discoveryengine_v1beta_generated_AclConfigServiceStubSettings_UpdateAclConfig_sync] +import com.google.cloud.discoveryengine.v1beta.stub.AclConfigServiceStubSettings; +import java.time.Duration; + +public class SyncUpdateAclConfig { + + public static void main(String[] args) throws Exception { + syncUpdateAclConfig(); + } + + public static void syncUpdateAclConfig() 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 + AclConfigServiceStubSettings.Builder aclConfigServiceSettingsBuilder = + AclConfigServiceStubSettings.newBuilder(); + aclConfigServiceSettingsBuilder + .updateAclConfigSettings() + .setRetrySettings( + aclConfigServiceSettingsBuilder + .updateAclConfigSettings() + .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()); + AclConfigServiceStubSettings aclConfigServiceSettings = aclConfigServiceSettingsBuilder.build(); + } +} +// [END discoveryengine_v1beta_generated_AclConfigServiceStubSettings_UpdateAclConfig_sync] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/stub/assistantservicestubsettings/createassistant/SyncCreateAssistant.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/stub/assistantservicestubsettings/createassistant/SyncCreateAssistant.java new file mode 100644 index 000000000000..d824d5580cf8 --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/stub/assistantservicestubsettings/createassistant/SyncCreateAssistant.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.cloud.discoveryengine.v1beta.stub.samples; + +// [START discoveryengine_v1beta_generated_AssistantServiceStubSettings_CreateAssistant_sync] +import com.google.cloud.discoveryengine.v1beta.stub.AssistantServiceStubSettings; +import java.time.Duration; + +public class SyncCreateAssistant { + + public static void main(String[] args) throws Exception { + syncCreateAssistant(); + } + + public static void syncCreateAssistant() 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 + AssistantServiceStubSettings.Builder assistantServiceSettingsBuilder = + AssistantServiceStubSettings.newBuilder(); + assistantServiceSettingsBuilder + .createAssistantSettings() + .setRetrySettings( + assistantServiceSettingsBuilder + .createAssistantSettings() + .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()); + AssistantServiceStubSettings assistantServiceSettings = assistantServiceSettingsBuilder.build(); + } +} +// [END discoveryengine_v1beta_generated_AssistantServiceStubSettings_CreateAssistant_sync] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/stub/cmekconfigservicestubsettings/getcmekconfig/SyncGetCmekConfig.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/stub/cmekconfigservicestubsettings/getcmekconfig/SyncGetCmekConfig.java new file mode 100644 index 000000000000..4378e0eb39c7 --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/stub/cmekconfigservicestubsettings/getcmekconfig/SyncGetCmekConfig.java @@ -0,0 +1,57 @@ +/* + * 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.discoveryengine.v1beta.stub.samples; + +// [START discoveryengine_v1beta_generated_CmekConfigServiceStubSettings_GetCmekConfig_sync] +import com.google.cloud.discoveryengine.v1beta.stub.CmekConfigServiceStubSettings; +import java.time.Duration; + +public class SyncGetCmekConfig { + + public static void main(String[] args) throws Exception { + syncGetCmekConfig(); + } + + public static void syncGetCmekConfig() 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 + CmekConfigServiceStubSettings.Builder cmekConfigServiceSettingsBuilder = + CmekConfigServiceStubSettings.newBuilder(); + cmekConfigServiceSettingsBuilder + .getCmekConfigSettings() + .setRetrySettings( + cmekConfigServiceSettingsBuilder + .getCmekConfigSettings() + .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()); + CmekConfigServiceStubSettings cmekConfigServiceSettings = + cmekConfigServiceSettingsBuilder.build(); + } +} +// [END discoveryengine_v1beta_generated_CmekConfigServiceStubSettings_GetCmekConfig_sync] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/stub/cmekconfigservicestubsettings/updatecmekconfig/SyncUpdateCmekConfig.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/stub/cmekconfigservicestubsettings/updatecmekconfig/SyncUpdateCmekConfig.java new file mode 100644 index 000000000000..8f0419f598d3 --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/stub/cmekconfigservicestubsettings/updatecmekconfig/SyncUpdateCmekConfig.java @@ -0,0 +1,54 @@ +/* + * 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.discoveryengine.v1beta.stub.samples; + +// [START discoveryengine_v1beta_generated_CmekConfigServiceStubSettings_UpdateCmekConfig_sync] +import com.google.api.gax.longrunning.OperationalTimedPollAlgorithm; +import com.google.api.gax.retrying.RetrySettings; +import com.google.api.gax.retrying.TimedRetryAlgorithm; +import com.google.cloud.discoveryengine.v1beta.stub.CmekConfigServiceStubSettings; +import java.time.Duration; + +public class SyncUpdateCmekConfig { + + public static void main(String[] args) throws Exception { + syncUpdateCmekConfig(); + } + + public static void syncUpdateCmekConfig() 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 + CmekConfigServiceStubSettings.Builder cmekConfigServiceSettingsBuilder = + CmekConfigServiceStubSettings.newBuilder(); + TimedRetryAlgorithm timedRetryAlgorithm = + OperationalTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelayDuration(Duration.ofMillis(500)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelayDuration(Duration.ofMillis(5000)) + .setTotalTimeoutDuration(Duration.ofHours(24)) + .build()); + cmekConfigServiceSettingsBuilder + .createClusterOperationSettings() + .setPollingAlgorithm(timedRetryAlgorithm) + .build(); + } +} +// [END discoveryengine_v1beta_generated_CmekConfigServiceStubSettings_UpdateCmekConfig_sync] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/stub/identitymappingstoreservicestubsettings/createidentitymappingstore/SyncCreateIdentityMappingStore.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/stub/identitymappingstoreservicestubsettings/createidentitymappingstore/SyncCreateIdentityMappingStore.java new file mode 100644 index 000000000000..8eeb2a6ce718 --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/stub/identitymappingstoreservicestubsettings/createidentitymappingstore/SyncCreateIdentityMappingStore.java @@ -0,0 +1,57 @@ +/* + * 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.discoveryengine.v1beta.stub.samples; + +// [START discoveryengine_v1beta_generated_IdentityMappingStoreServiceStubSettings_CreateIdentityMappingStore_sync] +import com.google.cloud.discoveryengine.v1beta.stub.IdentityMappingStoreServiceStubSettings; +import java.time.Duration; + +public class SyncCreateIdentityMappingStore { + + public static void main(String[] args) throws Exception { + syncCreateIdentityMappingStore(); + } + + public static void syncCreateIdentityMappingStore() 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 + IdentityMappingStoreServiceStubSettings.Builder identityMappingStoreServiceSettingsBuilder = + IdentityMappingStoreServiceStubSettings.newBuilder(); + identityMappingStoreServiceSettingsBuilder + .createIdentityMappingStoreSettings() + .setRetrySettings( + identityMappingStoreServiceSettingsBuilder + .createIdentityMappingStoreSettings() + .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()); + IdentityMappingStoreServiceStubSettings identityMappingStoreServiceSettings = + identityMappingStoreServiceSettingsBuilder.build(); + } +} +// [END discoveryengine_v1beta_generated_IdentityMappingStoreServiceStubSettings_CreateIdentityMappingStore_sync] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/stub/identitymappingstoreservicestubsettings/deleteidentitymappingstore/SyncDeleteIdentityMappingStore.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/stub/identitymappingstoreservicestubsettings/deleteidentitymappingstore/SyncDeleteIdentityMappingStore.java new file mode 100644 index 000000000000..f2089c02cad7 --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/stub/identitymappingstoreservicestubsettings/deleteidentitymappingstore/SyncDeleteIdentityMappingStore.java @@ -0,0 +1,54 @@ +/* + * 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.discoveryengine.v1beta.stub.samples; + +// [START discoveryengine_v1beta_generated_IdentityMappingStoreServiceStubSettings_DeleteIdentityMappingStore_sync] +import com.google.api.gax.longrunning.OperationalTimedPollAlgorithm; +import com.google.api.gax.retrying.RetrySettings; +import com.google.api.gax.retrying.TimedRetryAlgorithm; +import com.google.cloud.discoveryengine.v1beta.stub.IdentityMappingStoreServiceStubSettings; +import java.time.Duration; + +public class SyncDeleteIdentityMappingStore { + + public static void main(String[] args) throws Exception { + syncDeleteIdentityMappingStore(); + } + + public static void syncDeleteIdentityMappingStore() 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 + IdentityMappingStoreServiceStubSettings.Builder identityMappingStoreServiceSettingsBuilder = + IdentityMappingStoreServiceStubSettings.newBuilder(); + TimedRetryAlgorithm timedRetryAlgorithm = + OperationalTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelayDuration(Duration.ofMillis(500)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelayDuration(Duration.ofMillis(5000)) + .setTotalTimeoutDuration(Duration.ofHours(24)) + .build()); + identityMappingStoreServiceSettingsBuilder + .createClusterOperationSettings() + .setPollingAlgorithm(timedRetryAlgorithm) + .build(); + } +} +// [END discoveryengine_v1beta_generated_IdentityMappingStoreServiceStubSettings_DeleteIdentityMappingStore_sync] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/stub/licenseconfigservicestubsettings/createlicenseconfig/SyncCreateLicenseConfig.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/stub/licenseconfigservicestubsettings/createlicenseconfig/SyncCreateLicenseConfig.java new file mode 100644 index 000000000000..63d391913f31 --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/stub/licenseconfigservicestubsettings/createlicenseconfig/SyncCreateLicenseConfig.java @@ -0,0 +1,57 @@ +/* + * 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.discoveryengine.v1beta.stub.samples; + +// [START discoveryengine_v1beta_generated_LicenseConfigServiceStubSettings_CreateLicenseConfig_sync] +import com.google.cloud.discoveryengine.v1beta.stub.LicenseConfigServiceStubSettings; +import java.time.Duration; + +public class SyncCreateLicenseConfig { + + public static void main(String[] args) throws Exception { + syncCreateLicenseConfig(); + } + + public static void syncCreateLicenseConfig() 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 + LicenseConfigServiceStubSettings.Builder licenseConfigServiceSettingsBuilder = + LicenseConfigServiceStubSettings.newBuilder(); + licenseConfigServiceSettingsBuilder + .createLicenseConfigSettings() + .setRetrySettings( + licenseConfigServiceSettingsBuilder + .createLicenseConfigSettings() + .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()); + LicenseConfigServiceStubSettings licenseConfigServiceSettings = + licenseConfigServiceSettingsBuilder.build(); + } +} +// [END discoveryengine_v1beta_generated_LicenseConfigServiceStubSettings_CreateLicenseConfig_sync] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/stub/servingconfigservicestubsettings/updateservingconfig/SyncUpdateServingConfig.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/stub/servingconfigservicestubsettings/createservingconfig/SyncCreateServingConfig.java similarity index 88% rename from java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/stub/servingconfigservicestubsettings/updateservingconfig/SyncUpdateServingConfig.java rename to java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/stub/servingconfigservicestubsettings/createservingconfig/SyncCreateServingConfig.java index 60f232e5a587..bf3999b9d257 100644 --- a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/stub/servingconfigservicestubsettings/updateservingconfig/SyncUpdateServingConfig.java +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/stub/servingconfigservicestubsettings/createservingconfig/SyncCreateServingConfig.java @@ -16,17 +16,17 @@ package com.google.cloud.discoveryengine.v1beta.stub.samples; -// [START discoveryengine_v1beta_generated_ServingConfigServiceStubSettings_UpdateServingConfig_sync] +// [START discoveryengine_v1beta_generated_ServingConfigServiceStubSettings_CreateServingConfig_sync] import com.google.cloud.discoveryengine.v1beta.stub.ServingConfigServiceStubSettings; import java.time.Duration; -public class SyncUpdateServingConfig { +public class SyncCreateServingConfig { public static void main(String[] args) throws Exception { - syncUpdateServingConfig(); + syncCreateServingConfig(); } - public static void syncUpdateServingConfig() throws Exception { + public static void syncCreateServingConfig() 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. @@ -35,10 +35,10 @@ public static void syncUpdateServingConfig() throws Exception { ServingConfigServiceStubSettings.Builder servingConfigServiceSettingsBuilder = ServingConfigServiceStubSettings.newBuilder(); servingConfigServiceSettingsBuilder - .updateServingConfigSettings() + .createServingConfigSettings() .setRetrySettings( servingConfigServiceSettingsBuilder - .updateServingConfigSettings() + .createServingConfigSettings() .getRetrySettings() .toBuilder() .setInitialRetryDelayDuration(Duration.ofSeconds(1)) @@ -54,4 +54,4 @@ public static void syncUpdateServingConfig() throws Exception { servingConfigServiceSettingsBuilder.build(); } } -// [END discoveryengine_v1beta_generated_ServingConfigServiceStubSettings_UpdateServingConfig_sync] +// [END discoveryengine_v1beta_generated_ServingConfigServiceStubSettings_CreateServingConfig_sync] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/stub/userlicenseservicestubsettings/batchupdateuserlicenses/SyncBatchUpdateUserLicenses.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/stub/userlicenseservicestubsettings/batchupdateuserlicenses/SyncBatchUpdateUserLicenses.java new file mode 100644 index 000000000000..f58f852b256b --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/stub/userlicenseservicestubsettings/batchupdateuserlicenses/SyncBatchUpdateUserLicenses.java @@ -0,0 +1,54 @@ +/* + * 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.discoveryengine.v1beta.stub.samples; + +// [START discoveryengine_v1beta_generated_UserLicenseServiceStubSettings_BatchUpdateUserLicenses_sync] +import com.google.api.gax.longrunning.OperationalTimedPollAlgorithm; +import com.google.api.gax.retrying.RetrySettings; +import com.google.api.gax.retrying.TimedRetryAlgorithm; +import com.google.cloud.discoveryengine.v1beta.stub.UserLicenseServiceStubSettings; +import java.time.Duration; + +public class SyncBatchUpdateUserLicenses { + + public static void main(String[] args) throws Exception { + syncBatchUpdateUserLicenses(); + } + + public static void syncBatchUpdateUserLicenses() 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 + UserLicenseServiceStubSettings.Builder userLicenseServiceSettingsBuilder = + UserLicenseServiceStubSettings.newBuilder(); + TimedRetryAlgorithm timedRetryAlgorithm = + OperationalTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelayDuration(Duration.ofMillis(500)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelayDuration(Duration.ofMillis(5000)) + .setTotalTimeoutDuration(Duration.ofHours(24)) + .build()); + userLicenseServiceSettingsBuilder + .createClusterOperationSettings() + .setPollingAlgorithm(timedRetryAlgorithm) + .build(); + } +} +// [END discoveryengine_v1beta_generated_UserLicenseServiceStubSettings_BatchUpdateUserLicenses_sync] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/stub/userlicenseservicestubsettings/listlicenseconfigsusagestats/SyncListLicenseConfigsUsageStats.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/stub/userlicenseservicestubsettings/listlicenseconfigsusagestats/SyncListLicenseConfigsUsageStats.java new file mode 100644 index 000000000000..fb491b9edc1c --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/stub/userlicenseservicestubsettings/listlicenseconfigsusagestats/SyncListLicenseConfigsUsageStats.java @@ -0,0 +1,57 @@ +/* + * 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.discoveryengine.v1beta.stub.samples; + +// [START discoveryengine_v1beta_generated_UserLicenseServiceStubSettings_ListLicenseConfigsUsageStats_sync] +import com.google.cloud.discoveryengine.v1beta.stub.UserLicenseServiceStubSettings; +import java.time.Duration; + +public class SyncListLicenseConfigsUsageStats { + + public static void main(String[] args) throws Exception { + syncListLicenseConfigsUsageStats(); + } + + public static void syncListLicenseConfigsUsageStats() 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 + UserLicenseServiceStubSettings.Builder userLicenseServiceSettingsBuilder = + UserLicenseServiceStubSettings.newBuilder(); + userLicenseServiceSettingsBuilder + .listLicenseConfigsUsageStatsSettings() + .setRetrySettings( + userLicenseServiceSettingsBuilder + .listLicenseConfigsUsageStatsSettings() + .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()); + UserLicenseServiceStubSettings userLicenseServiceSettings = + userLicenseServiceSettingsBuilder.build(); + } +} +// [END discoveryengine_v1beta_generated_UserLicenseServiceStubSettings_ListLicenseConfigsUsageStats_sync] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/stub/userstoreservicestubsettings/getuserstore/SyncGetUserStore.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/stub/userstoreservicestubsettings/getuserstore/SyncGetUserStore.java new file mode 100644 index 000000000000..c0b832d1fe64 --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/stub/userstoreservicestubsettings/getuserstore/SyncGetUserStore.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.cloud.discoveryengine.v1beta.stub.samples; + +// [START discoveryengine_v1beta_generated_UserStoreServiceStubSettings_GetUserStore_sync] +import com.google.cloud.discoveryengine.v1beta.stub.UserStoreServiceStubSettings; +import java.time.Duration; + +public class SyncGetUserStore { + + public static void main(String[] args) throws Exception { + syncGetUserStore(); + } + + public static void syncGetUserStore() 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 + UserStoreServiceStubSettings.Builder userStoreServiceSettingsBuilder = + UserStoreServiceStubSettings.newBuilder(); + userStoreServiceSettingsBuilder + .getUserStoreSettings() + .setRetrySettings( + userStoreServiceSettingsBuilder + .getUserStoreSettings() + .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()); + UserStoreServiceStubSettings userStoreServiceSettings = userStoreServiceSettingsBuilder.build(); + } +} +// [END discoveryengine_v1beta_generated_UserStoreServiceStubSettings_GetUserStore_sync] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/userlicenseservice/batchupdateuserlicenses/AsyncBatchUpdateUserLicenses.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/userlicenseservice/batchupdateuserlicenses/AsyncBatchUpdateUserLicenses.java new file mode 100644 index 000000000000..49620a04008e --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/userlicenseservice/batchupdateuserlicenses/AsyncBatchUpdateUserLicenses.java @@ -0,0 +1,51 @@ +/* + * 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.discoveryengine.v1beta.samples; + +// [START discoveryengine_v1beta_generated_UserLicenseService_BatchUpdateUserLicenses_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesRequest; +import com.google.cloud.discoveryengine.v1beta.UserLicenseServiceClient; +import com.google.cloud.discoveryengine.v1beta.UserStoreName; +import com.google.longrunning.Operation; + +public class AsyncBatchUpdateUserLicenses { + + public static void main(String[] args) throws Exception { + asyncBatchUpdateUserLicenses(); + } + + public static void asyncBatchUpdateUserLicenses() 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 (UserLicenseServiceClient userLicenseServiceClient = UserLicenseServiceClient.create()) { + BatchUpdateUserLicensesRequest request = + BatchUpdateUserLicensesRequest.newBuilder() + .setParent(UserStoreName.of("[PROJECT]", "[LOCATION]", "[USER_STORE]").toString()) + .setDeleteUnassignedUserLicenses(true) + .build(); + ApiFuture future = + userLicenseServiceClient.batchUpdateUserLicensesCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END discoveryengine_v1beta_generated_UserLicenseService_BatchUpdateUserLicenses_async] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/userlicenseservice/batchupdateuserlicenses/AsyncBatchUpdateUserLicensesLRO.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/userlicenseservice/batchupdateuserlicenses/AsyncBatchUpdateUserLicensesLRO.java new file mode 100644 index 000000000000..07cee045f73d --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/userlicenseservice/batchupdateuserlicenses/AsyncBatchUpdateUserLicensesLRO.java @@ -0,0 +1,52 @@ +/* + * 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.discoveryengine.v1beta.samples; + +// [START discoveryengine_v1beta_generated_UserLicenseService_BatchUpdateUserLicenses_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesMetadata; +import com.google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesRequest; +import com.google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesResponse; +import com.google.cloud.discoveryengine.v1beta.UserLicenseServiceClient; +import com.google.cloud.discoveryengine.v1beta.UserStoreName; + +public class AsyncBatchUpdateUserLicensesLRO { + + public static void main(String[] args) throws Exception { + asyncBatchUpdateUserLicensesLRO(); + } + + public static void asyncBatchUpdateUserLicensesLRO() 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 (UserLicenseServiceClient userLicenseServiceClient = UserLicenseServiceClient.create()) { + BatchUpdateUserLicensesRequest request = + BatchUpdateUserLicensesRequest.newBuilder() + .setParent(UserStoreName.of("[PROJECT]", "[LOCATION]", "[USER_STORE]").toString()) + .setDeleteUnassignedUserLicenses(true) + .build(); + OperationFuture future = + userLicenseServiceClient.batchUpdateUserLicensesOperationCallable().futureCall(request); + // Do something. + BatchUpdateUserLicensesResponse response = future.get(); + } + } +} +// [END discoveryengine_v1beta_generated_UserLicenseService_BatchUpdateUserLicenses_LRO_async] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/userlicenseservice/batchupdateuserlicenses/SyncBatchUpdateUserLicenses.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/userlicenseservice/batchupdateuserlicenses/SyncBatchUpdateUserLicenses.java new file mode 100644 index 000000000000..df624e5cc06c --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/userlicenseservice/batchupdateuserlicenses/SyncBatchUpdateUserLicenses.java @@ -0,0 +1,48 @@ +/* + * 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.discoveryengine.v1beta.samples; + +// [START discoveryengine_v1beta_generated_UserLicenseService_BatchUpdateUserLicenses_sync] +import com.google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesRequest; +import com.google.cloud.discoveryengine.v1beta.BatchUpdateUserLicensesResponse; +import com.google.cloud.discoveryengine.v1beta.UserLicenseServiceClient; +import com.google.cloud.discoveryengine.v1beta.UserStoreName; + +public class SyncBatchUpdateUserLicenses { + + public static void main(String[] args) throws Exception { + syncBatchUpdateUserLicenses(); + } + + public static void syncBatchUpdateUserLicenses() 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 (UserLicenseServiceClient userLicenseServiceClient = UserLicenseServiceClient.create()) { + BatchUpdateUserLicensesRequest request = + BatchUpdateUserLicensesRequest.newBuilder() + .setParent(UserStoreName.of("[PROJECT]", "[LOCATION]", "[USER_STORE]").toString()) + .setDeleteUnassignedUserLicenses(true) + .build(); + BatchUpdateUserLicensesResponse response = + userLicenseServiceClient.batchUpdateUserLicensesAsync(request).get(); + } + } +} +// [END discoveryengine_v1beta_generated_UserLicenseService_BatchUpdateUserLicenses_sync] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/userlicenseservice/create/SyncCreateSetCredentialsProvider.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/userlicenseservice/create/SyncCreateSetCredentialsProvider.java new file mode 100644 index 000000000000..a865e88770a0 --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/userlicenseservice/create/SyncCreateSetCredentialsProvider.java @@ -0,0 +1,45 @@ +/* + * 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.discoveryengine.v1beta.samples; + +// [START discoveryengine_v1beta_generated_UserLicenseService_Create_SetCredentialsProvider_sync] +import com.google.api.gax.core.FixedCredentialsProvider; +import com.google.cloud.discoveryengine.v1beta.UserLicenseServiceClient; +import com.google.cloud.discoveryengine.v1beta.UserLicenseServiceSettings; +import com.google.cloud.discoveryengine.v1beta.myCredentials; + +public class SyncCreateSetCredentialsProvider { + + public static void main(String[] args) throws Exception { + syncCreateSetCredentialsProvider(); + } + + public static void syncCreateSetCredentialsProvider() 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 + UserLicenseServiceSettings userLicenseServiceSettings = + UserLicenseServiceSettings.newBuilder() + .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) + .build(); + UserLicenseServiceClient userLicenseServiceClient = + UserLicenseServiceClient.create(userLicenseServiceSettings); + } +} +// [END discoveryengine_v1beta_generated_UserLicenseService_Create_SetCredentialsProvider_sync] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/userlicenseservice/create/SyncCreateSetEndpoint.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/userlicenseservice/create/SyncCreateSetEndpoint.java new file mode 100644 index 000000000000..fd47e7a1787e --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/userlicenseservice/create/SyncCreateSetEndpoint.java @@ -0,0 +1,42 @@ +/* + * 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.discoveryengine.v1beta.samples; + +// [START discoveryengine_v1beta_generated_UserLicenseService_Create_SetEndpoint_sync] +import com.google.cloud.discoveryengine.v1beta.UserLicenseServiceClient; +import com.google.cloud.discoveryengine.v1beta.UserLicenseServiceSettings; +import com.google.cloud.discoveryengine.v1beta.myEndpoint; + +public class SyncCreateSetEndpoint { + + public static void main(String[] args) throws Exception { + syncCreateSetEndpoint(); + } + + public static void syncCreateSetEndpoint() 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 + UserLicenseServiceSettings userLicenseServiceSettings = + UserLicenseServiceSettings.newBuilder().setEndpoint(myEndpoint).build(); + UserLicenseServiceClient userLicenseServiceClient = + UserLicenseServiceClient.create(userLicenseServiceSettings); + } +} +// [END discoveryengine_v1beta_generated_UserLicenseService_Create_SetEndpoint_sync] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/userlicenseservice/create/SyncCreateUseHttpJsonTransport.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/userlicenseservice/create/SyncCreateUseHttpJsonTransport.java new file mode 100644 index 000000000000..aad1c3e5eeac --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/userlicenseservice/create/SyncCreateUseHttpJsonTransport.java @@ -0,0 +1,41 @@ +/* + * 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.discoveryengine.v1beta.samples; + +// [START discoveryengine_v1beta_generated_UserLicenseService_Create_UseHttpJsonTransport_sync] +import com.google.cloud.discoveryengine.v1beta.UserLicenseServiceClient; +import com.google.cloud.discoveryengine.v1beta.UserLicenseServiceSettings; + +public class SyncCreateUseHttpJsonTransport { + + public static void main(String[] args) throws Exception { + syncCreateUseHttpJsonTransport(); + } + + public static void syncCreateUseHttpJsonTransport() 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 + UserLicenseServiceSettings userLicenseServiceSettings = + UserLicenseServiceSettings.newHttpJsonBuilder().build(); + UserLicenseServiceClient userLicenseServiceClient = + UserLicenseServiceClient.create(userLicenseServiceSettings); + } +} +// [END discoveryengine_v1beta_generated_UserLicenseService_Create_UseHttpJsonTransport_sync] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/userlicenseservice/listlicenseconfigsusagestats/AsyncListLicenseConfigsUsageStats.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/userlicenseservice/listlicenseconfigsusagestats/AsyncListLicenseConfigsUsageStats.java new file mode 100644 index 000000000000..ca96233d698a --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/userlicenseservice/listlicenseconfigsusagestats/AsyncListLicenseConfigsUsageStats.java @@ -0,0 +1,50 @@ +/* + * 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.discoveryengine.v1beta.samples; + +// [START discoveryengine_v1beta_generated_UserLicenseService_ListLicenseConfigsUsageStats_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.discoveryengine.v1beta.ListLicenseConfigsUsageStatsRequest; +import com.google.cloud.discoveryengine.v1beta.ListLicenseConfigsUsageStatsResponse; +import com.google.cloud.discoveryengine.v1beta.UserLicenseServiceClient; +import com.google.cloud.discoveryengine.v1beta.UserStoreName; + +public class AsyncListLicenseConfigsUsageStats { + + public static void main(String[] args) throws Exception { + asyncListLicenseConfigsUsageStats(); + } + + public static void asyncListLicenseConfigsUsageStats() 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 (UserLicenseServiceClient userLicenseServiceClient = UserLicenseServiceClient.create()) { + ListLicenseConfigsUsageStatsRequest request = + ListLicenseConfigsUsageStatsRequest.newBuilder() + .setParent(UserStoreName.of("[PROJECT]", "[LOCATION]", "[USER_STORE]").toString()) + .build(); + ApiFuture future = + userLicenseServiceClient.listLicenseConfigsUsageStatsCallable().futureCall(request); + // Do something. + ListLicenseConfigsUsageStatsResponse response = future.get(); + } + } +} +// [END discoveryengine_v1beta_generated_UserLicenseService_ListLicenseConfigsUsageStats_async] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/userlicenseservice/listlicenseconfigsusagestats/SyncListLicenseConfigsUsageStats.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/userlicenseservice/listlicenseconfigsusagestats/SyncListLicenseConfigsUsageStats.java new file mode 100644 index 000000000000..8e1b5f07d72e --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/userlicenseservice/listlicenseconfigsusagestats/SyncListLicenseConfigsUsageStats.java @@ -0,0 +1,47 @@ +/* + * 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.discoveryengine.v1beta.samples; + +// [START discoveryengine_v1beta_generated_UserLicenseService_ListLicenseConfigsUsageStats_sync] +import com.google.cloud.discoveryengine.v1beta.ListLicenseConfigsUsageStatsRequest; +import com.google.cloud.discoveryengine.v1beta.ListLicenseConfigsUsageStatsResponse; +import com.google.cloud.discoveryengine.v1beta.UserLicenseServiceClient; +import com.google.cloud.discoveryengine.v1beta.UserStoreName; + +public class SyncListLicenseConfigsUsageStats { + + public static void main(String[] args) throws Exception { + syncListLicenseConfigsUsageStats(); + } + + public static void syncListLicenseConfigsUsageStats() 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 (UserLicenseServiceClient userLicenseServiceClient = UserLicenseServiceClient.create()) { + ListLicenseConfigsUsageStatsRequest request = + ListLicenseConfigsUsageStatsRequest.newBuilder() + .setParent(UserStoreName.of("[PROJECT]", "[LOCATION]", "[USER_STORE]").toString()) + .build(); + ListLicenseConfigsUsageStatsResponse response = + userLicenseServiceClient.listLicenseConfigsUsageStats(request); + } + } +} +// [END discoveryengine_v1beta_generated_UserLicenseService_ListLicenseConfigsUsageStats_sync] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/userlicenseservice/listlicenseconfigsusagestats/SyncListLicenseConfigsUsageStatsString.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/userlicenseservice/listlicenseconfigsusagestats/SyncListLicenseConfigsUsageStatsString.java new file mode 100644 index 000000000000..1b180d7410f0 --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/userlicenseservice/listlicenseconfigsusagestats/SyncListLicenseConfigsUsageStatsString.java @@ -0,0 +1,43 @@ +/* + * 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.discoveryengine.v1beta.samples; + +// [START discoveryengine_v1beta_generated_UserLicenseService_ListLicenseConfigsUsageStats_String_sync] +import com.google.cloud.discoveryengine.v1beta.ListLicenseConfigsUsageStatsResponse; +import com.google.cloud.discoveryengine.v1beta.UserLicenseServiceClient; +import com.google.cloud.discoveryengine.v1beta.UserStoreName; + +public class SyncListLicenseConfigsUsageStatsString { + + public static void main(String[] args) throws Exception { + syncListLicenseConfigsUsageStatsString(); + } + + public static void syncListLicenseConfigsUsageStatsString() 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 (UserLicenseServiceClient userLicenseServiceClient = UserLicenseServiceClient.create()) { + String parent = UserStoreName.of("[PROJECT]", "[LOCATION]", "[USER_STORE]").toString(); + ListLicenseConfigsUsageStatsResponse response = + userLicenseServiceClient.listLicenseConfigsUsageStats(parent); + } + } +} +// [END discoveryengine_v1beta_generated_UserLicenseService_ListLicenseConfigsUsageStats_String_sync] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/userlicenseservice/listlicenseconfigsusagestats/SyncListLicenseConfigsUsageStatsUserstorename.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/userlicenseservice/listlicenseconfigsusagestats/SyncListLicenseConfigsUsageStatsUserstorename.java new file mode 100644 index 000000000000..faeaad3e7c70 --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/userlicenseservice/listlicenseconfigsusagestats/SyncListLicenseConfigsUsageStatsUserstorename.java @@ -0,0 +1,43 @@ +/* + * 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.discoveryengine.v1beta.samples; + +// [START discoveryengine_v1beta_generated_UserLicenseService_ListLicenseConfigsUsageStats_Userstorename_sync] +import com.google.cloud.discoveryengine.v1beta.ListLicenseConfigsUsageStatsResponse; +import com.google.cloud.discoveryengine.v1beta.UserLicenseServiceClient; +import com.google.cloud.discoveryengine.v1beta.UserStoreName; + +public class SyncListLicenseConfigsUsageStatsUserstorename { + + public static void main(String[] args) throws Exception { + syncListLicenseConfigsUsageStatsUserstorename(); + } + + public static void syncListLicenseConfigsUsageStatsUserstorename() 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 (UserLicenseServiceClient userLicenseServiceClient = UserLicenseServiceClient.create()) { + UserStoreName parent = UserStoreName.of("[PROJECT]", "[LOCATION]", "[USER_STORE]"); + ListLicenseConfigsUsageStatsResponse response = + userLicenseServiceClient.listLicenseConfigsUsageStats(parent); + } + } +} +// [END discoveryengine_v1beta_generated_UserLicenseService_ListLicenseConfigsUsageStats_Userstorename_sync] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/userlicenseservice/listuserlicenses/AsyncListUserLicenses.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/userlicenseservice/listuserlicenses/AsyncListUserLicenses.java new file mode 100644 index 000000000000..61d625cf096c --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/userlicenseservice/listuserlicenses/AsyncListUserLicenses.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.cloud.discoveryengine.v1beta.samples; + +// [START discoveryengine_v1beta_generated_UserLicenseService_ListUserLicenses_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.discoveryengine.v1beta.ListUserLicensesRequest; +import com.google.cloud.discoveryengine.v1beta.UserLicense; +import com.google.cloud.discoveryengine.v1beta.UserLicenseServiceClient; +import com.google.cloud.discoveryengine.v1beta.UserStoreName; + +public class AsyncListUserLicenses { + + public static void main(String[] args) throws Exception { + asyncListUserLicenses(); + } + + public static void asyncListUserLicenses() 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 (UserLicenseServiceClient userLicenseServiceClient = UserLicenseServiceClient.create()) { + ListUserLicensesRequest request = + ListUserLicensesRequest.newBuilder() + .setParent(UserStoreName.of("[PROJECT]", "[LOCATION]", "[USER_STORE]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + ApiFuture future = + userLicenseServiceClient.listUserLicensesPagedCallable().futureCall(request); + // Do something. + for (UserLicense element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END discoveryengine_v1beta_generated_UserLicenseService_ListUserLicenses_async] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/userlicenseservice/listuserlicenses/AsyncListUserLicensesPaged.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/userlicenseservice/listuserlicenses/AsyncListUserLicensesPaged.java new file mode 100644 index 000000000000..816b75f34924 --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/userlicenseservice/listuserlicenses/AsyncListUserLicensesPaged.java @@ -0,0 +1,64 @@ +/* + * 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.discoveryengine.v1beta.samples; + +// [START discoveryengine_v1beta_generated_UserLicenseService_ListUserLicenses_Paged_async] +import com.google.cloud.discoveryengine.v1beta.ListUserLicensesRequest; +import com.google.cloud.discoveryengine.v1beta.ListUserLicensesResponse; +import com.google.cloud.discoveryengine.v1beta.UserLicense; +import com.google.cloud.discoveryengine.v1beta.UserLicenseServiceClient; +import com.google.cloud.discoveryengine.v1beta.UserStoreName; +import com.google.common.base.Strings; + +public class AsyncListUserLicensesPaged { + + public static void main(String[] args) throws Exception { + asyncListUserLicensesPaged(); + } + + public static void asyncListUserLicensesPaged() 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 (UserLicenseServiceClient userLicenseServiceClient = UserLicenseServiceClient.create()) { + ListUserLicensesRequest request = + ListUserLicensesRequest.newBuilder() + .setParent(UserStoreName.of("[PROJECT]", "[LOCATION]", "[USER_STORE]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + while (true) { + ListUserLicensesResponse response = + userLicenseServiceClient.listUserLicensesCallable().call(request); + for (UserLicense element : response.getUserLicensesList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END discoveryengine_v1beta_generated_UserLicenseService_ListUserLicenses_Paged_async] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/userlicenseservice/listuserlicenses/SyncListUserLicenses.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/userlicenseservice/listuserlicenses/SyncListUserLicenses.java new file mode 100644 index 000000000000..27f710ac2c97 --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/userlicenseservice/listuserlicenses/SyncListUserLicenses.java @@ -0,0 +1,52 @@ +/* + * 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.discoveryengine.v1beta.samples; + +// [START discoveryengine_v1beta_generated_UserLicenseService_ListUserLicenses_sync] +import com.google.cloud.discoveryengine.v1beta.ListUserLicensesRequest; +import com.google.cloud.discoveryengine.v1beta.UserLicense; +import com.google.cloud.discoveryengine.v1beta.UserLicenseServiceClient; +import com.google.cloud.discoveryengine.v1beta.UserStoreName; + +public class SyncListUserLicenses { + + public static void main(String[] args) throws Exception { + syncListUserLicenses(); + } + + public static void syncListUserLicenses() 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 (UserLicenseServiceClient userLicenseServiceClient = UserLicenseServiceClient.create()) { + ListUserLicensesRequest request = + ListUserLicensesRequest.newBuilder() + .setParent(UserStoreName.of("[PROJECT]", "[LOCATION]", "[USER_STORE]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + for (UserLicense element : userLicenseServiceClient.listUserLicenses(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END discoveryengine_v1beta_generated_UserLicenseService_ListUserLicenses_sync] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/userlicenseservice/listuserlicenses/SyncListUserLicensesString.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/userlicenseservice/listuserlicenses/SyncListUserLicensesString.java new file mode 100644 index 000000000000..877bc32d5a42 --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/userlicenseservice/listuserlicenses/SyncListUserLicensesString.java @@ -0,0 +1,44 @@ +/* + * 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.discoveryengine.v1beta.samples; + +// [START discoveryengine_v1beta_generated_UserLicenseService_ListUserLicenses_String_sync] +import com.google.cloud.discoveryengine.v1beta.UserLicense; +import com.google.cloud.discoveryengine.v1beta.UserLicenseServiceClient; +import com.google.cloud.discoveryengine.v1beta.UserStoreName; + +public class SyncListUserLicensesString { + + public static void main(String[] args) throws Exception { + syncListUserLicensesString(); + } + + public static void syncListUserLicensesString() 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 (UserLicenseServiceClient userLicenseServiceClient = UserLicenseServiceClient.create()) { + String parent = UserStoreName.of("[PROJECT]", "[LOCATION]", "[USER_STORE]").toString(); + for (UserLicense element : userLicenseServiceClient.listUserLicenses(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END discoveryengine_v1beta_generated_UserLicenseService_ListUserLicenses_String_sync] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/userlicenseservice/listuserlicenses/SyncListUserLicensesUserstorename.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/userlicenseservice/listuserlicenses/SyncListUserLicensesUserstorename.java new file mode 100644 index 000000000000..3c7924ee4122 --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/userlicenseservice/listuserlicenses/SyncListUserLicensesUserstorename.java @@ -0,0 +1,44 @@ +/* + * 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.discoveryengine.v1beta.samples; + +// [START discoveryengine_v1beta_generated_UserLicenseService_ListUserLicenses_Userstorename_sync] +import com.google.cloud.discoveryengine.v1beta.UserLicense; +import com.google.cloud.discoveryengine.v1beta.UserLicenseServiceClient; +import com.google.cloud.discoveryengine.v1beta.UserStoreName; + +public class SyncListUserLicensesUserstorename { + + public static void main(String[] args) throws Exception { + syncListUserLicensesUserstorename(); + } + + public static void syncListUserLicensesUserstorename() 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 (UserLicenseServiceClient userLicenseServiceClient = UserLicenseServiceClient.create()) { + UserStoreName parent = UserStoreName.of("[PROJECT]", "[LOCATION]", "[USER_STORE]"); + for (UserLicense element : userLicenseServiceClient.listUserLicenses(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END discoveryengine_v1beta_generated_UserLicenseService_ListUserLicenses_Userstorename_sync] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/userlicenseservicesettings/batchupdateuserlicenses/SyncBatchUpdateUserLicenses.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/userlicenseservicesettings/batchupdateuserlicenses/SyncBatchUpdateUserLicenses.java new file mode 100644 index 000000000000..500d8b4ea60c --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/userlicenseservicesettings/batchupdateuserlicenses/SyncBatchUpdateUserLicenses.java @@ -0,0 +1,54 @@ +/* + * 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.discoveryengine.v1beta.samples; + +// [START discoveryengine_v1beta_generated_UserLicenseServiceSettings_BatchUpdateUserLicenses_sync] +import com.google.api.gax.longrunning.OperationalTimedPollAlgorithm; +import com.google.api.gax.retrying.RetrySettings; +import com.google.api.gax.retrying.TimedRetryAlgorithm; +import com.google.cloud.discoveryengine.v1beta.UserLicenseServiceSettings; +import java.time.Duration; + +public class SyncBatchUpdateUserLicenses { + + public static void main(String[] args) throws Exception { + syncBatchUpdateUserLicenses(); + } + + public static void syncBatchUpdateUserLicenses() 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 + UserLicenseServiceSettings.Builder userLicenseServiceSettingsBuilder = + UserLicenseServiceSettings.newBuilder(); + TimedRetryAlgorithm timedRetryAlgorithm = + OperationalTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelayDuration(Duration.ofMillis(500)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelayDuration(Duration.ofMillis(5000)) + .setTotalTimeoutDuration(Duration.ofHours(24)) + .build()); + userLicenseServiceSettingsBuilder + .createClusterOperationSettings() + .setPollingAlgorithm(timedRetryAlgorithm) + .build(); + } +} +// [END discoveryengine_v1beta_generated_UserLicenseServiceSettings_BatchUpdateUserLicenses_sync] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/userlicenseservicesettings/listlicenseconfigsusagestats/SyncListLicenseConfigsUsageStats.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/userlicenseservicesettings/listlicenseconfigsusagestats/SyncListLicenseConfigsUsageStats.java new file mode 100644 index 000000000000..6e4b17e5a87a --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/userlicenseservicesettings/listlicenseconfigsusagestats/SyncListLicenseConfigsUsageStats.java @@ -0,0 +1,57 @@ +/* + * 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.discoveryengine.v1beta.samples; + +// [START discoveryengine_v1beta_generated_UserLicenseServiceSettings_ListLicenseConfigsUsageStats_sync] +import com.google.cloud.discoveryengine.v1beta.UserLicenseServiceSettings; +import java.time.Duration; + +public class SyncListLicenseConfigsUsageStats { + + public static void main(String[] args) throws Exception { + syncListLicenseConfigsUsageStats(); + } + + public static void syncListLicenseConfigsUsageStats() 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 + UserLicenseServiceSettings.Builder userLicenseServiceSettingsBuilder = + UserLicenseServiceSettings.newBuilder(); + userLicenseServiceSettingsBuilder + .listLicenseConfigsUsageStatsSettings() + .setRetrySettings( + userLicenseServiceSettingsBuilder + .listLicenseConfigsUsageStatsSettings() + .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()); + UserLicenseServiceSettings userLicenseServiceSettings = + userLicenseServiceSettingsBuilder.build(); + } +} +// [END discoveryengine_v1beta_generated_UserLicenseServiceSettings_ListLicenseConfigsUsageStats_sync] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/userstoreservice/create/SyncCreateSetCredentialsProvider.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/userstoreservice/create/SyncCreateSetCredentialsProvider.java new file mode 100644 index 000000000000..5a34d241e101 --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/userstoreservice/create/SyncCreateSetCredentialsProvider.java @@ -0,0 +1,45 @@ +/* + * 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.discoveryengine.v1beta.samples; + +// [START discoveryengine_v1beta_generated_UserStoreService_Create_SetCredentialsProvider_sync] +import com.google.api.gax.core.FixedCredentialsProvider; +import com.google.cloud.discoveryengine.v1beta.UserStoreServiceClient; +import com.google.cloud.discoveryengine.v1beta.UserStoreServiceSettings; +import com.google.cloud.discoveryengine.v1beta.myCredentials; + +public class SyncCreateSetCredentialsProvider { + + public static void main(String[] args) throws Exception { + syncCreateSetCredentialsProvider(); + } + + public static void syncCreateSetCredentialsProvider() 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 + UserStoreServiceSettings userStoreServiceSettings = + UserStoreServiceSettings.newBuilder() + .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) + .build(); + UserStoreServiceClient userStoreServiceClient = + UserStoreServiceClient.create(userStoreServiceSettings); + } +} +// [END discoveryengine_v1beta_generated_UserStoreService_Create_SetCredentialsProvider_sync] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/userstoreservice/create/SyncCreateSetEndpoint.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/userstoreservice/create/SyncCreateSetEndpoint.java new file mode 100644 index 000000000000..d2d08e9d799d --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/userstoreservice/create/SyncCreateSetEndpoint.java @@ -0,0 +1,42 @@ +/* + * 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.discoveryengine.v1beta.samples; + +// [START discoveryengine_v1beta_generated_UserStoreService_Create_SetEndpoint_sync] +import com.google.cloud.discoveryengine.v1beta.UserStoreServiceClient; +import com.google.cloud.discoveryengine.v1beta.UserStoreServiceSettings; +import com.google.cloud.discoveryengine.v1beta.myEndpoint; + +public class SyncCreateSetEndpoint { + + public static void main(String[] args) throws Exception { + syncCreateSetEndpoint(); + } + + public static void syncCreateSetEndpoint() 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 + UserStoreServiceSettings userStoreServiceSettings = + UserStoreServiceSettings.newBuilder().setEndpoint(myEndpoint).build(); + UserStoreServiceClient userStoreServiceClient = + UserStoreServiceClient.create(userStoreServiceSettings); + } +} +// [END discoveryengine_v1beta_generated_UserStoreService_Create_SetEndpoint_sync] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/userstoreservice/create/SyncCreateUseHttpJsonTransport.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/userstoreservice/create/SyncCreateUseHttpJsonTransport.java new file mode 100644 index 000000000000..fbf4596d9900 --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/userstoreservice/create/SyncCreateUseHttpJsonTransport.java @@ -0,0 +1,41 @@ +/* + * 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.discoveryengine.v1beta.samples; + +// [START discoveryengine_v1beta_generated_UserStoreService_Create_UseHttpJsonTransport_sync] +import com.google.cloud.discoveryengine.v1beta.UserStoreServiceClient; +import com.google.cloud.discoveryengine.v1beta.UserStoreServiceSettings; + +public class SyncCreateUseHttpJsonTransport { + + public static void main(String[] args) throws Exception { + syncCreateUseHttpJsonTransport(); + } + + public static void syncCreateUseHttpJsonTransport() 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 + UserStoreServiceSettings userStoreServiceSettings = + UserStoreServiceSettings.newHttpJsonBuilder().build(); + UserStoreServiceClient userStoreServiceClient = + UserStoreServiceClient.create(userStoreServiceSettings); + } +} +// [END discoveryengine_v1beta_generated_UserStoreService_Create_UseHttpJsonTransport_sync] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/userstoreservice/getuserstore/AsyncGetUserStore.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/userstoreservice/getuserstore/AsyncGetUserStore.java new file mode 100644 index 000000000000..4d4f618af851 --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/userstoreservice/getuserstore/AsyncGetUserStore.java @@ -0,0 +1,50 @@ +/* + * 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.discoveryengine.v1beta.samples; + +// [START discoveryengine_v1beta_generated_UserStoreService_GetUserStore_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.discoveryengine.v1beta.GetUserStoreRequest; +import com.google.cloud.discoveryengine.v1beta.UserStore; +import com.google.cloud.discoveryengine.v1beta.UserStoreName; +import com.google.cloud.discoveryengine.v1beta.UserStoreServiceClient; + +public class AsyncGetUserStore { + + public static void main(String[] args) throws Exception { + asyncGetUserStore(); + } + + public static void asyncGetUserStore() 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 (UserStoreServiceClient userStoreServiceClient = UserStoreServiceClient.create()) { + GetUserStoreRequest request = + GetUserStoreRequest.newBuilder() + .setName(UserStoreName.of("[PROJECT]", "[LOCATION]", "[USER_STORE]").toString()) + .build(); + ApiFuture future = + userStoreServiceClient.getUserStoreCallable().futureCall(request); + // Do something. + UserStore response = future.get(); + } + } +} +// [END discoveryengine_v1beta_generated_UserStoreService_GetUserStore_async] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/userstoreservice/getuserstore/SyncGetUserStore.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/userstoreservice/getuserstore/SyncGetUserStore.java new file mode 100644 index 000000000000..e153490beb6c --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/userstoreservice/getuserstore/SyncGetUserStore.java @@ -0,0 +1,46 @@ +/* + * 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.discoveryengine.v1beta.samples; + +// [START discoveryengine_v1beta_generated_UserStoreService_GetUserStore_sync] +import com.google.cloud.discoveryengine.v1beta.GetUserStoreRequest; +import com.google.cloud.discoveryengine.v1beta.UserStore; +import com.google.cloud.discoveryengine.v1beta.UserStoreName; +import com.google.cloud.discoveryengine.v1beta.UserStoreServiceClient; + +public class SyncGetUserStore { + + public static void main(String[] args) throws Exception { + syncGetUserStore(); + } + + public static void syncGetUserStore() 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 (UserStoreServiceClient userStoreServiceClient = UserStoreServiceClient.create()) { + GetUserStoreRequest request = + GetUserStoreRequest.newBuilder() + .setName(UserStoreName.of("[PROJECT]", "[LOCATION]", "[USER_STORE]").toString()) + .build(); + UserStore response = userStoreServiceClient.getUserStore(request); + } + } +} +// [END discoveryengine_v1beta_generated_UserStoreService_GetUserStore_sync] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/userstoreservice/getuserstore/SyncGetUserStoreString.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/userstoreservice/getuserstore/SyncGetUserStoreString.java new file mode 100644 index 000000000000..5a4898fe3000 --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/userstoreservice/getuserstore/SyncGetUserStoreString.java @@ -0,0 +1,42 @@ +/* + * 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.discoveryengine.v1beta.samples; + +// [START discoveryengine_v1beta_generated_UserStoreService_GetUserStore_String_sync] +import com.google.cloud.discoveryengine.v1beta.UserStore; +import com.google.cloud.discoveryengine.v1beta.UserStoreName; +import com.google.cloud.discoveryengine.v1beta.UserStoreServiceClient; + +public class SyncGetUserStoreString { + + public static void main(String[] args) throws Exception { + syncGetUserStoreString(); + } + + public static void syncGetUserStoreString() 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 (UserStoreServiceClient userStoreServiceClient = UserStoreServiceClient.create()) { + String name = UserStoreName.of("[PROJECT]", "[LOCATION]", "[USER_STORE]").toString(); + UserStore response = userStoreServiceClient.getUserStore(name); + } + } +} +// [END discoveryengine_v1beta_generated_UserStoreService_GetUserStore_String_sync] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/userstoreservice/getuserstore/SyncGetUserStoreUserstorename.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/userstoreservice/getuserstore/SyncGetUserStoreUserstorename.java new file mode 100644 index 000000000000..9ae7c2eb3b70 --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/userstoreservice/getuserstore/SyncGetUserStoreUserstorename.java @@ -0,0 +1,42 @@ +/* + * 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.discoveryengine.v1beta.samples; + +// [START discoveryengine_v1beta_generated_UserStoreService_GetUserStore_Userstorename_sync] +import com.google.cloud.discoveryengine.v1beta.UserStore; +import com.google.cloud.discoveryengine.v1beta.UserStoreName; +import com.google.cloud.discoveryengine.v1beta.UserStoreServiceClient; + +public class SyncGetUserStoreUserstorename { + + public static void main(String[] args) throws Exception { + syncGetUserStoreUserstorename(); + } + + public static void syncGetUserStoreUserstorename() 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 (UserStoreServiceClient userStoreServiceClient = UserStoreServiceClient.create()) { + UserStoreName name = UserStoreName.of("[PROJECT]", "[LOCATION]", "[USER_STORE]"); + UserStore response = userStoreServiceClient.getUserStore(name); + } + } +} +// [END discoveryengine_v1beta_generated_UserStoreService_GetUserStore_Userstorename_sync] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/userstoreservice/updateuserstore/AsyncUpdateUserStore.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/userstoreservice/updateuserstore/AsyncUpdateUserStore.java new file mode 100644 index 000000000000..fa483d3320d4 --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/userstoreservice/updateuserstore/AsyncUpdateUserStore.java @@ -0,0 +1,51 @@ +/* + * 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.discoveryengine.v1beta.samples; + +// [START discoveryengine_v1beta_generated_UserStoreService_UpdateUserStore_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.discoveryengine.v1beta.UpdateUserStoreRequest; +import com.google.cloud.discoveryengine.v1beta.UserStore; +import com.google.cloud.discoveryengine.v1beta.UserStoreServiceClient; +import com.google.protobuf.FieldMask; + +public class AsyncUpdateUserStore { + + public static void main(String[] args) throws Exception { + asyncUpdateUserStore(); + } + + public static void asyncUpdateUserStore() 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 (UserStoreServiceClient userStoreServiceClient = UserStoreServiceClient.create()) { + UpdateUserStoreRequest request = + UpdateUserStoreRequest.newBuilder() + .setUserStore(UserStore.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + ApiFuture future = + userStoreServiceClient.updateUserStoreCallable().futureCall(request); + // Do something. + UserStore response = future.get(); + } + } +} +// [END discoveryengine_v1beta_generated_UserStoreService_UpdateUserStore_async] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/userstoreservice/updateuserstore/SyncUpdateUserStore.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/userstoreservice/updateuserstore/SyncUpdateUserStore.java new file mode 100644 index 000000000000..f7ebaf813753 --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/userstoreservice/updateuserstore/SyncUpdateUserStore.java @@ -0,0 +1,47 @@ +/* + * 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.discoveryengine.v1beta.samples; + +// [START discoveryengine_v1beta_generated_UserStoreService_UpdateUserStore_sync] +import com.google.cloud.discoveryengine.v1beta.UpdateUserStoreRequest; +import com.google.cloud.discoveryengine.v1beta.UserStore; +import com.google.cloud.discoveryengine.v1beta.UserStoreServiceClient; +import com.google.protobuf.FieldMask; + +public class SyncUpdateUserStore { + + public static void main(String[] args) throws Exception { + syncUpdateUserStore(); + } + + public static void syncUpdateUserStore() 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 (UserStoreServiceClient userStoreServiceClient = UserStoreServiceClient.create()) { + UpdateUserStoreRequest request = + UpdateUserStoreRequest.newBuilder() + .setUserStore(UserStore.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + UserStore response = userStoreServiceClient.updateUserStore(request); + } + } +} +// [END discoveryengine_v1beta_generated_UserStoreService_UpdateUserStore_sync] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/userstoreservice/updateuserstore/SyncUpdateUserStoreUserstoreFieldmask.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/userstoreservice/updateuserstore/SyncUpdateUserStoreUserstoreFieldmask.java new file mode 100644 index 000000000000..d4121088257c --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/userstoreservice/updateuserstore/SyncUpdateUserStoreUserstoreFieldmask.java @@ -0,0 +1,43 @@ +/* + * 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.discoveryengine.v1beta.samples; + +// [START discoveryengine_v1beta_generated_UserStoreService_UpdateUserStore_UserstoreFieldmask_sync] +import com.google.cloud.discoveryengine.v1beta.UserStore; +import com.google.cloud.discoveryengine.v1beta.UserStoreServiceClient; +import com.google.protobuf.FieldMask; + +public class SyncUpdateUserStoreUserstoreFieldmask { + + public static void main(String[] args) throws Exception { + syncUpdateUserStoreUserstoreFieldmask(); + } + + public static void syncUpdateUserStoreUserstoreFieldmask() 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 (UserStoreServiceClient userStoreServiceClient = UserStoreServiceClient.create()) { + UserStore userStore = UserStore.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + UserStore response = userStoreServiceClient.updateUserStore(userStore, updateMask); + } + } +} +// [END discoveryengine_v1beta_generated_UserStoreService_UpdateUserStore_UserstoreFieldmask_sync] diff --git a/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/userstoreservicesettings/getuserstore/SyncGetUserStore.java b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/userstoreservicesettings/getuserstore/SyncGetUserStore.java new file mode 100644 index 000000000000..fcc06e4f429e --- /dev/null +++ b/java-discoveryengine/samples/snippets/generated/com/google/cloud/discoveryengine/v1beta/userstoreservicesettings/getuserstore/SyncGetUserStore.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.cloud.discoveryengine.v1beta.samples; + +// [START discoveryengine_v1beta_generated_UserStoreServiceSettings_GetUserStore_sync] +import com.google.cloud.discoveryengine.v1beta.UserStoreServiceSettings; +import java.time.Duration; + +public class SyncGetUserStore { + + public static void main(String[] args) throws Exception { + syncGetUserStore(); + } + + public static void syncGetUserStore() 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 + UserStoreServiceSettings.Builder userStoreServiceSettingsBuilder = + UserStoreServiceSettings.newBuilder(); + userStoreServiceSettingsBuilder + .getUserStoreSettings() + .setRetrySettings( + userStoreServiceSettingsBuilder + .getUserStoreSettings() + .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()); + UserStoreServiceSettings userStoreServiceSettings = userStoreServiceSettingsBuilder.build(); + } +} +// [END discoveryengine_v1beta_generated_UserStoreServiceSettings_GetUserStore_sync] diff --git a/java-network-management/google-cloud-network-management/src/main/resources/META-INF/native-image/com.google.cloud.networkmanagement.v1beta1/reflect-config.json b/java-network-management/google-cloud-network-management/src/main/resources/META-INF/native-image/com.google.cloud.networkmanagement.v1beta1/reflect-config.json index 1a077bf395fe..ba4b53518b24 100644 --- a/java-network-management/google-cloud-network-management/src/main/resources/META-INF/native-image/com.google.cloud.networkmanagement.v1beta1/reflect-config.json +++ b/java-network-management/google-cloud-network-management/src/main/resources/META-INF/native-image/com.google.cloud.networkmanagement.v1beta1/reflect-config.json @@ -1637,6 +1637,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.networkmanagement.v1beta1.PrivateConnectionInfo", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkmanagement.v1beta1.PrivateConnectionInfo$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.networkmanagement.v1beta1.ProbingDetails", "queryAllDeclaredConstructors": true, diff --git a/java-network-management/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/DeliverInfo.java b/java-network-management/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/DeliverInfo.java index 66c143f20b4e..01990d9d22ba 100644 --- a/java-network-management/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/DeliverInfo.java +++ b/java-network-management/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/DeliverInfo.java @@ -288,6 +288,16 @@ public enum Target implements com.google.protobuf.ProtocolMessageEnum { * CLOUD_RUN_JOB = 20; */ CLOUD_RUN_JOB(20), + /** + * + * + *
            +     * Target is a DMS Private Connection. Used only for return traces.
            +     * 
            + * + * DMS_PRIVATE_CONNECTION = 21; + */ + DMS_PRIVATE_CONNECTION(21), UNRECOGNIZED(-1), ; @@ -524,6 +534,17 @@ public enum Target implements com.google.protobuf.ProtocolMessageEnum { */ public static final int CLOUD_RUN_JOB_VALUE = 20; + /** + * + * + *
            +     * Target is a DMS Private Connection. Used only for return traces.
            +     * 
            + * + * DMS_PRIVATE_CONNECTION = 21; + */ + public static final int DMS_PRIVATE_CONNECTION_VALUE = 21; + public final int getNumber() { if (this == UNRECOGNIZED) { throw new java.lang.IllegalArgumentException( @@ -588,6 +609,8 @@ public static Target forNumber(int value) { return GKE_POD; case 20: return CLOUD_RUN_JOB; + case 21: + return DMS_PRIVATE_CONNECTION; default: return null; } diff --git a/java-network-management/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/DropInfo.java b/java-network-management/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/DropInfo.java index 0340b767cd20..a07f99463a04 100644 --- a/java-network-management/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/DropInfo.java +++ b/java-network-management/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/DropInfo.java @@ -508,6 +508,16 @@ public enum Cause implements com.google.protobuf.ProtocolMessageEnum { * DROPPED_INSIDE_CLOUD_SQL_SERVICE = 19; */ DROPPED_INSIDE_CLOUD_SQL_SERVICE(19), + /** + * + * + *
            +     * Packet was dropped inside DMS Private Connection.
            +     * 
            + * + * DROPPED_INSIDE_DMS_PRIVATE_CONNECTION = 114; + */ + DROPPED_INSIDE_DMS_PRIVATE_CONNECTION(114), /** * * @@ -1246,6 +1256,17 @@ public enum Cause implements com.google.protobuf.ProtocolMessageEnum { * NO_VALID_ROUTE_FROM_GOOGLE_MANAGED_NETWORK_TO_DESTINATION = 110; */ NO_VALID_ROUTE_FROM_GOOGLE_MANAGED_NETWORK_TO_DESTINATION(110), + /** + * + * + *
            +     * Packet is dropped due to no running instance found for private
            +     * connection.
            +     * 
            + * + * PRIVATE_CONNECTION_NO_RUNNING_INSTANCE = 111; + */ + PRIVATE_CONNECTION_NO_RUNNING_INSTANCE(111), UNRECOGNIZED(-1), ; @@ -1720,6 +1741,17 @@ public enum Cause implements com.google.protobuf.ProtocolMessageEnum { */ public static final int DROPPED_INSIDE_CLOUD_SQL_SERVICE_VALUE = 19; + /** + * + * + *
            +     * Packet was dropped inside DMS Private Connection.
            +     * 
            + * + * DROPPED_INSIDE_DMS_PRIVATE_CONNECTION = 114; + */ + public static final int DROPPED_INSIDE_DMS_PRIVATE_CONNECTION_VALUE = 114; + /** * * @@ -2525,6 +2557,18 @@ public enum Cause implements com.google.protobuf.ProtocolMessageEnum { */ public static final int NO_VALID_ROUTE_FROM_GOOGLE_MANAGED_NETWORK_TO_DESTINATION_VALUE = 110; + /** + * + * + *
            +     * Packet is dropped due to no running instance found for private
            +     * connection.
            +     * 
            + * + * PRIVATE_CONNECTION_NO_RUNNING_INSTANCE = 111; + */ + public static final int PRIVATE_CONNECTION_NO_RUNNING_INSTANCE_VALUE = 111; + public final int getNumber() { if (this == UNRECOGNIZED) { throw new java.lang.IllegalArgumentException( @@ -2627,6 +2671,8 @@ public static Cause forNumber(int value) { return DROPPED_INSIDE_GKE_SERVICE; case 19: return DROPPED_INSIDE_CLOUD_SQL_SERVICE; + case 114: + return DROPPED_INSIDE_DMS_PRIVATE_CONNECTION; case 20: return GOOGLE_MANAGED_SERVICE_NO_PEERING; case 38: @@ -2761,6 +2807,8 @@ public static Cause forNumber(int value) { return GKE_NETWORK_POLICY; case 110: return NO_VALID_ROUTE_FROM_GOOGLE_MANAGED_NETWORK_TO_DESTINATION; + case 111: + return PRIVATE_CONNECTION_NO_RUNNING_INSTANCE; default: return null; } diff --git a/java-network-management/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/Endpoint.java b/java-network-management/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/Endpoint.java index 4d64d8330bee..535dc57e56ee 100644 --- a/java-network-management/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/Endpoint.java +++ b/java-network-management/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/Endpoint.java @@ -64,6 +64,7 @@ private Endpoint() { redisInstance_ = ""; redisCluster_ = ""; gkePod_ = ""; + dmsPrivateConnection_ = ""; cloudRunJob_ = ""; network_ = ""; networkType_ = 0; @@ -3438,6 +3439,65 @@ public com.google.protobuf.ByteString getGkePodBytes() { } } + public static final int DMS_PRIVATE_CONNECTION_FIELD_NUMBER = 22; + + @SuppressWarnings("serial") + private volatile java.lang.Object dmsPrivateConnection_ = ""; + + /** + * + * + *
            +   * A [DMS Private
            +   * Connection](https://docs.cloud.google.com/database-migration/docs/reference/rest/v1/projects.locations.privateConnections)
            +   * name format:
            +   * projects/{project}/locations/{location}/privateConnections/{privateConnection}.
            +   * 
            + * + * string dms_private_connection = 22; + * + * @return The dmsPrivateConnection. + */ + @java.lang.Override + public java.lang.String getDmsPrivateConnection() { + java.lang.Object ref = dmsPrivateConnection_; + 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(); + dmsPrivateConnection_ = s; + return s; + } + } + + /** + * + * + *
            +   * A [DMS Private
            +   * Connection](https://docs.cloud.google.com/database-migration/docs/reference/rest/v1/projects.locations.privateConnections)
            +   * name format:
            +   * projects/{project}/locations/{location}/privateConnections/{privateConnection}.
            +   * 
            + * + * string dms_private_connection = 22; + * + * @return The bytes for dmsPrivateConnection. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDmsPrivateConnectionBytes() { + java.lang.Object ref = dmsPrivateConnection_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + dmsPrivateConnection_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + public static final int CLOUD_FUNCTION_FIELD_NUMBER = 10; private com.google.cloud.networkmanagement.v1beta1.Endpoint.CloudFunctionEndpoint cloudFunction_; @@ -3933,6 +3993,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessage.isStringEmpty(gkePod_)) { com.google.protobuf.GeneratedMessage.writeString(output, 21, gkePod_); } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(dmsPrivateConnection_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 22, dmsPrivateConnection_); + } if (!com.google.protobuf.GeneratedMessage.isStringEmpty(cloudRunJob_)) { com.google.protobuf.GeneratedMessage.writeString(output, 24, cloudRunJob_); } @@ -4004,6 +4067,9 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessage.isStringEmpty(gkePod_)) { size += com.google.protobuf.GeneratedMessage.computeStringSize(21, gkePod_); } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(dmsPrivateConnection_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(22, dmsPrivateConnection_); + } if (!com.google.protobuf.GeneratedMessage.isStringEmpty(cloudRunJob_)) { size += com.google.protobuf.GeneratedMessage.computeStringSize(24, cloudRunJob_); } @@ -4045,6 +4111,7 @@ public boolean equals(final java.lang.Object obj) { if (!getRedisInstance().equals(other.getRedisInstance())) return false; if (!getRedisCluster().equals(other.getRedisCluster())) return false; if (!getGkePod().equals(other.getGkePod())) return false; + if (!getDmsPrivateConnection().equals(other.getDmsPrivateConnection())) return false; if (hasCloudFunction() != other.hasCloudFunction()) return false; if (hasCloudFunction()) { if (!getCloudFunction().equals(other.getCloudFunction())) return false; @@ -4104,6 +4171,8 @@ public int hashCode() { hash = (53 * hash) + getRedisCluster().hashCode(); hash = (37 * hash) + GKE_POD_FIELD_NUMBER; hash = (53 * hash) + getGkePod().hashCode(); + hash = (37 * hash) + DMS_PRIVATE_CONNECTION_FIELD_NUMBER; + hash = (53 * hash) + getDmsPrivateConnection().hashCode(); if (hasCloudFunction()) { hash = (37 * hash) + CLOUD_FUNCTION_FIELD_NUMBER; hash = (53 * hash) + getCloudFunction().hashCode(); @@ -4288,6 +4357,7 @@ public Builder clear() { redisInstance_ = ""; redisCluster_ = ""; gkePod_ = ""; + dmsPrivateConnection_ = ""; cloudFunction_ = null; if (cloudFunctionBuilder_ != null) { cloudFunctionBuilder_.dispose(); @@ -4387,30 +4457,33 @@ private void buildPartial0(com.google.cloud.networkmanagement.v1beta1.Endpoint r result.gkePod_ = gkePod_; } if (((from_bitField0_ & 0x00002000) != 0)) { + result.dmsPrivateConnection_ = dmsPrivateConnection_; + } + if (((from_bitField0_ & 0x00004000) != 0)) { result.cloudFunction_ = cloudFunctionBuilder_ == null ? cloudFunction_ : cloudFunctionBuilder_.build(); to_bitField0_ |= 0x00000008; } - if (((from_bitField0_ & 0x00004000) != 0)) { + if (((from_bitField0_ & 0x00008000) != 0)) { result.appEngineVersion_ = appEngineVersionBuilder_ == null ? appEngineVersion_ : appEngineVersionBuilder_.build(); to_bitField0_ |= 0x00000010; } - if (((from_bitField0_ & 0x00008000) != 0)) { + if (((from_bitField0_ & 0x00010000) != 0)) { result.cloudRunRevision_ = cloudRunRevisionBuilder_ == null ? cloudRunRevision_ : cloudRunRevisionBuilder_.build(); to_bitField0_ |= 0x00000020; } - if (((from_bitField0_ & 0x00010000) != 0)) { + if (((from_bitField0_ & 0x00020000) != 0)) { result.cloudRunJob_ = cloudRunJob_; } - if (((from_bitField0_ & 0x00020000) != 0)) { + if (((from_bitField0_ & 0x00040000) != 0)) { result.network_ = network_; } - if (((from_bitField0_ & 0x00040000) != 0)) { + if (((from_bitField0_ & 0x00080000) != 0)) { result.networkType_ = networkType_; } - if (((from_bitField0_ & 0x00080000) != 0)) { + if (((from_bitField0_ & 0x00100000) != 0)) { result.projectId_ = projectId_; } result.bitField0_ |= to_bitField0_; @@ -4488,6 +4561,11 @@ public Builder mergeFrom(com.google.cloud.networkmanagement.v1beta1.Endpoint oth bitField0_ |= 0x00001000; onChanged(); } + if (!other.getDmsPrivateConnection().isEmpty()) { + dmsPrivateConnection_ = other.dmsPrivateConnection_; + bitField0_ |= 0x00002000; + onChanged(); + } if (other.hasCloudFunction()) { mergeCloudFunction(other.getCloudFunction()); } @@ -4499,12 +4577,12 @@ public Builder mergeFrom(com.google.cloud.networkmanagement.v1beta1.Endpoint oth } if (!other.getCloudRunJob().isEmpty()) { cloudRunJob_ = other.cloudRunJob_; - bitField0_ |= 0x00010000; + bitField0_ |= 0x00020000; onChanged(); } if (!other.getNetwork().isEmpty()) { network_ = other.network_; - bitField0_ |= 0x00020000; + bitField0_ |= 0x00040000; onChanged(); } if (other.networkType_ != 0) { @@ -4512,7 +4590,7 @@ public Builder mergeFrom(com.google.cloud.networkmanagement.v1beta1.Endpoint oth } if (!other.getProjectId().isEmpty()) { projectId_ = other.projectId_; - bitField0_ |= 0x00080000; + bitField0_ |= 0x00100000; onChanged(); } this.mergeUnknownFields(other.getUnknownFields()); @@ -4562,19 +4640,19 @@ public Builder mergeFrom( case 34: { network_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00020000; + bitField0_ |= 0x00040000; break; } // case 34 case 40: { networkType_ = input.readEnum(); - bitField0_ |= 0x00040000; + bitField0_ |= 0x00080000; break; } // case 40 case 50: { projectId_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00080000; + bitField0_ |= 0x00100000; break; } // case 50 case 58: @@ -4593,21 +4671,21 @@ public Builder mergeFrom( { input.readMessage( internalGetCloudFunctionFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00002000; + bitField0_ |= 0x00004000; break; } // case 82 case 90: { input.readMessage( internalGetAppEngineVersionFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00004000; + bitField0_ |= 0x00008000; break; } // case 90 case 98: { input.readMessage( internalGetCloudRunRevisionFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00008000; + bitField0_ |= 0x00010000; break; } // case 98 case 106: @@ -4658,10 +4736,16 @@ public Builder mergeFrom( bitField0_ |= 0x00001000; break; } // case 170 + case 178: + { + dmsPrivateConnection_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00002000; + break; + } // case 178 case 194: { cloudRunJob_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00010000; + bitField0_ |= 0x00020000; break; } // case 194 default: @@ -6198,6 +6282,132 @@ public Builder setGkePodBytes(com.google.protobuf.ByteString value) { return this; } + private java.lang.Object dmsPrivateConnection_ = ""; + + /** + * + * + *
            +     * A [DMS Private
            +     * Connection](https://docs.cloud.google.com/database-migration/docs/reference/rest/v1/projects.locations.privateConnections)
            +     * name format:
            +     * projects/{project}/locations/{location}/privateConnections/{privateConnection}.
            +     * 
            + * + * string dms_private_connection = 22; + * + * @return The dmsPrivateConnection. + */ + public java.lang.String getDmsPrivateConnection() { + java.lang.Object ref = dmsPrivateConnection_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + dmsPrivateConnection_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
            +     * A [DMS Private
            +     * Connection](https://docs.cloud.google.com/database-migration/docs/reference/rest/v1/projects.locations.privateConnections)
            +     * name format:
            +     * projects/{project}/locations/{location}/privateConnections/{privateConnection}.
            +     * 
            + * + * string dms_private_connection = 22; + * + * @return The bytes for dmsPrivateConnection. + */ + public com.google.protobuf.ByteString getDmsPrivateConnectionBytes() { + java.lang.Object ref = dmsPrivateConnection_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + dmsPrivateConnection_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
            +     * A [DMS Private
            +     * Connection](https://docs.cloud.google.com/database-migration/docs/reference/rest/v1/projects.locations.privateConnections)
            +     * name format:
            +     * projects/{project}/locations/{location}/privateConnections/{privateConnection}.
            +     * 
            + * + * string dms_private_connection = 22; + * + * @param value The dmsPrivateConnection to set. + * @return This builder for chaining. + */ + public Builder setDmsPrivateConnection(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + dmsPrivateConnection_ = value; + bitField0_ |= 0x00002000; + onChanged(); + return this; + } + + /** + * + * + *
            +     * A [DMS Private
            +     * Connection](https://docs.cloud.google.com/database-migration/docs/reference/rest/v1/projects.locations.privateConnections)
            +     * name format:
            +     * projects/{project}/locations/{location}/privateConnections/{privateConnection}.
            +     * 
            + * + * string dms_private_connection = 22; + * + * @return This builder for chaining. + */ + public Builder clearDmsPrivateConnection() { + dmsPrivateConnection_ = getDefaultInstance().getDmsPrivateConnection(); + bitField0_ = (bitField0_ & ~0x00002000); + onChanged(); + return this; + } + + /** + * + * + *
            +     * A [DMS Private
            +     * Connection](https://docs.cloud.google.com/database-migration/docs/reference/rest/v1/projects.locations.privateConnections)
            +     * name format:
            +     * projects/{project}/locations/{location}/privateConnections/{privateConnection}.
            +     * 
            + * + * string dms_private_connection = 22; + * + * @param value The bytes for dmsPrivateConnection to set. + * @return This builder for chaining. + */ + public Builder setDmsPrivateConnectionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + dmsPrivateConnection_ = value; + bitField0_ |= 0x00002000; + onChanged(); + return this; + } + private com.google.cloud.networkmanagement.v1beta1.Endpoint.CloudFunctionEndpoint cloudFunction_; private com.google.protobuf.SingleFieldBuilder< @@ -6221,7 +6431,7 @@ public Builder setGkePodBytes(com.google.protobuf.ByteString value) { * @return Whether the cloudFunction field is set. */ public boolean hasCloudFunction() { - return ((bitField0_ & 0x00002000) != 0); + return ((bitField0_ & 0x00004000) != 0); } /** @@ -6272,7 +6482,7 @@ public Builder setCloudFunction( } else { cloudFunctionBuilder_.setMessage(value); } - bitField0_ |= 0x00002000; + bitField0_ |= 0x00004000; onChanged(); return this; } @@ -6297,7 +6507,7 @@ public Builder setCloudFunction( } else { cloudFunctionBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00002000; + bitField0_ |= 0x00004000; onChanged(); return this; } @@ -6317,7 +6527,7 @@ public Builder setCloudFunction( public Builder mergeCloudFunction( com.google.cloud.networkmanagement.v1beta1.Endpoint.CloudFunctionEndpoint value) { if (cloudFunctionBuilder_ == null) { - if (((bitField0_ & 0x00002000) != 0) + if (((bitField0_ & 0x00004000) != 0) && cloudFunction_ != null && cloudFunction_ != com.google.cloud.networkmanagement.v1beta1.Endpoint.CloudFunctionEndpoint @@ -6330,7 +6540,7 @@ public Builder mergeCloudFunction( cloudFunctionBuilder_.mergeFrom(value); } if (cloudFunction_ != null) { - bitField0_ |= 0x00002000; + bitField0_ |= 0x00004000; onChanged(); } return this; @@ -6349,7 +6559,7 @@ public Builder mergeCloudFunction( *
            */ public Builder clearCloudFunction() { - bitField0_ = (bitField0_ & ~0x00002000); + bitField0_ = (bitField0_ & ~0x00004000); cloudFunction_ = null; if (cloudFunctionBuilder_ != null) { cloudFunctionBuilder_.dispose(); @@ -6373,7 +6583,7 @@ public Builder clearCloudFunction() { */ public com.google.cloud.networkmanagement.v1beta1.Endpoint.CloudFunctionEndpoint.Builder getCloudFunctionBuilder() { - bitField0_ |= 0x00002000; + bitField0_ |= 0x00004000; onChanged(); return internalGetCloudFunctionFieldBuilder().getBuilder(); } @@ -6455,7 +6665,7 @@ public Builder clearCloudFunction() { * @return Whether the appEngineVersion field is set. */ public boolean hasAppEngineVersion() { - return ((bitField0_ & 0x00004000) != 0); + return ((bitField0_ & 0x00008000) != 0); } /** @@ -6508,7 +6718,7 @@ public Builder setAppEngineVersion( } else { appEngineVersionBuilder_.setMessage(value); } - bitField0_ |= 0x00004000; + bitField0_ |= 0x00008000; onChanged(); return this; } @@ -6534,7 +6744,7 @@ public Builder setAppEngineVersion( } else { appEngineVersionBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00004000; + bitField0_ |= 0x00008000; onChanged(); return this; } @@ -6555,7 +6765,7 @@ public Builder setAppEngineVersion( public Builder mergeAppEngineVersion( com.google.cloud.networkmanagement.v1beta1.Endpoint.AppEngineVersionEndpoint value) { if (appEngineVersionBuilder_ == null) { - if (((bitField0_ & 0x00004000) != 0) + if (((bitField0_ & 0x00008000) != 0) && appEngineVersion_ != null && appEngineVersion_ != com.google.cloud.networkmanagement.v1beta1.Endpoint.AppEngineVersionEndpoint @@ -6568,7 +6778,7 @@ public Builder mergeAppEngineVersion( appEngineVersionBuilder_.mergeFrom(value); } if (appEngineVersion_ != null) { - bitField0_ |= 0x00004000; + bitField0_ |= 0x00008000; onChanged(); } return this; @@ -6588,7 +6798,7 @@ public Builder mergeAppEngineVersion( *
            */ public Builder clearAppEngineVersion() { - bitField0_ = (bitField0_ & ~0x00004000); + bitField0_ = (bitField0_ & ~0x00008000); appEngineVersion_ = null; if (appEngineVersionBuilder_ != null) { appEngineVersionBuilder_.dispose(); @@ -6613,7 +6823,7 @@ public Builder clearAppEngineVersion() { */ public com.google.cloud.networkmanagement.v1beta1.Endpoint.AppEngineVersionEndpoint.Builder getAppEngineVersionBuilder() { - bitField0_ |= 0x00004000; + bitField0_ |= 0x00008000; onChanged(); return internalGetAppEngineVersionFieldBuilder().getBuilder(); } @@ -6699,7 +6909,7 @@ public Builder clearAppEngineVersion() { * @return Whether the cloudRunRevision field is set. */ public boolean hasCloudRunRevision() { - return ((bitField0_ & 0x00008000) != 0); + return ((bitField0_ & 0x00010000) != 0); } /** @@ -6752,7 +6962,7 @@ public Builder setCloudRunRevision( } else { cloudRunRevisionBuilder_.setMessage(value); } - bitField0_ |= 0x00008000; + bitField0_ |= 0x00010000; onChanged(); return this; } @@ -6778,7 +6988,7 @@ public Builder setCloudRunRevision( } else { cloudRunRevisionBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00008000; + bitField0_ |= 0x00010000; onChanged(); return this; } @@ -6799,7 +7009,7 @@ public Builder setCloudRunRevision( public Builder mergeCloudRunRevision( com.google.cloud.networkmanagement.v1beta1.Endpoint.CloudRunRevisionEndpoint value) { if (cloudRunRevisionBuilder_ == null) { - if (((bitField0_ & 0x00008000) != 0) + if (((bitField0_ & 0x00010000) != 0) && cloudRunRevision_ != null && cloudRunRevision_ != com.google.cloud.networkmanagement.v1beta1.Endpoint.CloudRunRevisionEndpoint @@ -6812,7 +7022,7 @@ public Builder mergeCloudRunRevision( cloudRunRevisionBuilder_.mergeFrom(value); } if (cloudRunRevision_ != null) { - bitField0_ |= 0x00008000; + bitField0_ |= 0x00010000; onChanged(); } return this; @@ -6832,7 +7042,7 @@ public Builder mergeCloudRunRevision( *
            */ public Builder clearCloudRunRevision() { - bitField0_ = (bitField0_ & ~0x00008000); + bitField0_ = (bitField0_ & ~0x00010000); cloudRunRevision_ = null; if (cloudRunRevisionBuilder_ != null) { cloudRunRevisionBuilder_.dispose(); @@ -6857,7 +7067,7 @@ public Builder clearCloudRunRevision() { */ public com.google.cloud.networkmanagement.v1beta1.Endpoint.CloudRunRevisionEndpoint.Builder getCloudRunRevisionBuilder() { - bitField0_ |= 0x00008000; + bitField0_ |= 0x00010000; onChanged(); return internalGetCloudRunRevisionFieldBuilder().getBuilder(); } @@ -6996,7 +7206,7 @@ public Builder setCloudRunJob(java.lang.String value) { throw new NullPointerException(); } cloudRunJob_ = value; - bitField0_ |= 0x00010000; + bitField0_ |= 0x00020000; onChanged(); return this; } @@ -7018,7 +7228,7 @@ public Builder setCloudRunJob(java.lang.String value) { */ public Builder clearCloudRunJob() { cloudRunJob_ = getDefaultInstance().getCloudRunJob(); - bitField0_ = (bitField0_ & ~0x00010000); + bitField0_ = (bitField0_ & ~0x00020000); onChanged(); return this; } @@ -7045,7 +7255,7 @@ public Builder setCloudRunJobBytes(com.google.protobuf.ByteString value) { } checkByteStringIsUtf8(value); cloudRunJob_ = value; - bitField0_ |= 0x00010000; + bitField0_ |= 0x00020000; onChanged(); return this; } @@ -7124,7 +7334,7 @@ public Builder setNetwork(java.lang.String value) { throw new NullPointerException(); } network_ = value; - bitField0_ |= 0x00020000; + bitField0_ |= 0x00040000; onChanged(); return this; } @@ -7145,7 +7355,7 @@ public Builder setNetwork(java.lang.String value) { */ public Builder clearNetwork() { network_ = getDefaultInstance().getNetwork(); - bitField0_ = (bitField0_ & ~0x00020000); + bitField0_ = (bitField0_ & ~0x00040000); onChanged(); return this; } @@ -7171,7 +7381,7 @@ public Builder setNetworkBytes(com.google.protobuf.ByteString value) { } checkByteStringIsUtf8(value); network_ = value; - bitField0_ |= 0x00020000; + bitField0_ |= 0x00040000; onChanged(); return this; } @@ -7210,7 +7420,7 @@ public int getNetworkTypeValue() { */ public Builder setNetworkTypeValue(int value) { networkType_ = value; - bitField0_ |= 0x00040000; + bitField0_ |= 0x00080000; onChanged(); return this; } @@ -7254,7 +7464,7 @@ public Builder setNetworkType( if (value == null) { throw new NullPointerException(); } - bitField0_ |= 0x00040000; + bitField0_ |= 0x00080000; networkType_ = value.getNumber(); onChanged(); return this; @@ -7273,7 +7483,7 @@ public Builder setNetworkType( * @return This builder for chaining. */ public Builder clearNetworkType() { - bitField0_ = (bitField0_ & ~0x00040000); + bitField0_ = (bitField0_ & ~0x00080000); networkType_ = 0; onChanged(); return this; @@ -7347,7 +7557,7 @@ public Builder setProjectId(java.lang.String value) { throw new NullPointerException(); } projectId_ = value; - bitField0_ |= 0x00080000; + bitField0_ |= 0x00100000; onChanged(); return this; } @@ -7366,7 +7576,7 @@ public Builder setProjectId(java.lang.String value) { */ public Builder clearProjectId() { projectId_ = getDefaultInstance().getProjectId(); - bitField0_ = (bitField0_ & ~0x00080000); + bitField0_ = (bitField0_ & ~0x00100000); onChanged(); return this; } @@ -7390,7 +7600,7 @@ public Builder setProjectIdBytes(com.google.protobuf.ByteString value) { } checkByteStringIsUtf8(value); projectId_ = value; - bitField0_ |= 0x00080000; + bitField0_ |= 0x00100000; onChanged(); return this; } diff --git a/java-network-management/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/EndpointOrBuilder.java b/java-network-management/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/EndpointOrBuilder.java index 0d024f9887f2..f81e928a30e6 100644 --- a/java-network-management/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/EndpointOrBuilder.java +++ b/java-network-management/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/EndpointOrBuilder.java @@ -436,6 +436,38 @@ public interface EndpointOrBuilder */ com.google.protobuf.ByteString getGkePodBytes(); + /** + * + * + *
            +   * A [DMS Private
            +   * Connection](https://docs.cloud.google.com/database-migration/docs/reference/rest/v1/projects.locations.privateConnections)
            +   * name format:
            +   * projects/{project}/locations/{location}/privateConnections/{privateConnection}.
            +   * 
            + * + * string dms_private_connection = 22; + * + * @return The dmsPrivateConnection. + */ + java.lang.String getDmsPrivateConnection(); + + /** + * + * + *
            +   * A [DMS Private
            +   * Connection](https://docs.cloud.google.com/database-migration/docs/reference/rest/v1/projects.locations.privateConnections)
            +   * name format:
            +   * projects/{project}/locations/{location}/privateConnections/{privateConnection}.
            +   * 
            + * + * string dms_private_connection = 22; + * + * @return The bytes for dmsPrivateConnection. + */ + com.google.protobuf.ByteString getDmsPrivateConnectionBytes(); + /** * * diff --git a/java-network-management/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/InstanceInfo.java b/java-network-management/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/InstanceInfo.java index 5205063ee1b3..dfbb82bbbf88 100644 --- a/java-network-management/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/InstanceInfo.java +++ b/java-network-management/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/InstanceInfo.java @@ -652,7 +652,7 @@ public com.google.protobuf.ByteString getNetworkTagsBytes(int index) { * string service_account = 8 [deprecated = true]; * * @deprecated google.cloud.networkmanagement.v1beta1.InstanceInfo.service_account is deprecated. - * See google/cloud/networkmanagement/v1beta1/trace.proto;l=420 + * See google/cloud/networkmanagement/v1beta1/trace.proto;l=426 * @return The serviceAccount. */ @java.lang.Override @@ -679,7 +679,7 @@ public java.lang.String getServiceAccount() { * string service_account = 8 [deprecated = true]; * * @deprecated google.cloud.networkmanagement.v1beta1.InstanceInfo.service_account is deprecated. - * See google/cloud/networkmanagement/v1beta1/trace.proto;l=420 + * See google/cloud/networkmanagement/v1beta1/trace.proto;l=426 * @return The bytes for serviceAccount. */ @java.lang.Override @@ -763,7 +763,7 @@ public com.google.protobuf.ByteString getPscNetworkAttachmentUriBytes() { * bool running = 10 [deprecated = true]; * * @deprecated google.cloud.networkmanagement.v1beta1.InstanceInfo.running is deprecated. See - * google/cloud/networkmanagement/v1beta1/trace.proto;l=427 + * google/cloud/networkmanagement/v1beta1/trace.proto;l=433 * @return The running. */ @java.lang.Override @@ -2237,7 +2237,7 @@ public Builder addNetworkTagsBytes(com.google.protobuf.ByteString value) { * string service_account = 8 [deprecated = true]; * * @deprecated google.cloud.networkmanagement.v1beta1.InstanceInfo.service_account is - * deprecated. See google/cloud/networkmanagement/v1beta1/trace.proto;l=420 + * deprecated. See google/cloud/networkmanagement/v1beta1/trace.proto;l=426 * @return The serviceAccount. */ @java.lang.Deprecated @@ -2263,7 +2263,7 @@ public java.lang.String getServiceAccount() { * string service_account = 8 [deprecated = true]; * * @deprecated google.cloud.networkmanagement.v1beta1.InstanceInfo.service_account is - * deprecated. See google/cloud/networkmanagement/v1beta1/trace.proto;l=420 + * deprecated. See google/cloud/networkmanagement/v1beta1/trace.proto;l=426 * @return The bytes for serviceAccount. */ @java.lang.Deprecated @@ -2289,7 +2289,7 @@ public com.google.protobuf.ByteString getServiceAccountBytes() { * string service_account = 8 [deprecated = true]; * * @deprecated google.cloud.networkmanagement.v1beta1.InstanceInfo.service_account is - * deprecated. See google/cloud/networkmanagement/v1beta1/trace.proto;l=420 + * deprecated. See google/cloud/networkmanagement/v1beta1/trace.proto;l=426 * @param value The serviceAccount to set. * @return This builder for chaining. */ @@ -2314,7 +2314,7 @@ public Builder setServiceAccount(java.lang.String value) { * string service_account = 8 [deprecated = true]; * * @deprecated google.cloud.networkmanagement.v1beta1.InstanceInfo.service_account is - * deprecated. See google/cloud/networkmanagement/v1beta1/trace.proto;l=420 + * deprecated. See google/cloud/networkmanagement/v1beta1/trace.proto;l=426 * @return This builder for chaining. */ @java.lang.Deprecated @@ -2335,7 +2335,7 @@ public Builder clearServiceAccount() { * string service_account = 8 [deprecated = true]; * * @deprecated google.cloud.networkmanagement.v1beta1.InstanceInfo.service_account is - * deprecated. See google/cloud/networkmanagement/v1beta1/trace.proto;l=420 + * deprecated. See google/cloud/networkmanagement/v1beta1/trace.proto;l=426 * @param value The bytes for serviceAccount to set. * @return This builder for chaining. */ @@ -2475,7 +2475,7 @@ public Builder setPscNetworkAttachmentUriBytes(com.google.protobuf.ByteString va * bool running = 10 [deprecated = true]; * * @deprecated google.cloud.networkmanagement.v1beta1.InstanceInfo.running is deprecated. See - * google/cloud/networkmanagement/v1beta1/trace.proto;l=427 + * google/cloud/networkmanagement/v1beta1/trace.proto;l=433 * @return The running. */ @java.lang.Override @@ -2495,7 +2495,7 @@ public boolean getRunning() { * bool running = 10 [deprecated = true]; * * @deprecated google.cloud.networkmanagement.v1beta1.InstanceInfo.running is deprecated. See - * google/cloud/networkmanagement/v1beta1/trace.proto;l=427 + * google/cloud/networkmanagement/v1beta1/trace.proto;l=433 * @param value The running to set. * @return This builder for chaining. */ @@ -2519,7 +2519,7 @@ public Builder setRunning(boolean value) { * bool running = 10 [deprecated = true]; * * @deprecated google.cloud.networkmanagement.v1beta1.InstanceInfo.running is deprecated. See - * google/cloud/networkmanagement/v1beta1/trace.proto;l=427 + * google/cloud/networkmanagement/v1beta1/trace.proto;l=433 * @return This builder for chaining. */ @java.lang.Deprecated diff --git a/java-network-management/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/InstanceInfoOrBuilder.java b/java-network-management/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/InstanceInfoOrBuilder.java index 05544d87209b..d77e541af946 100644 --- a/java-network-management/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/InstanceInfoOrBuilder.java +++ b/java-network-management/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/InstanceInfoOrBuilder.java @@ -246,7 +246,7 @@ public interface InstanceInfoOrBuilder * string service_account = 8 [deprecated = true]; * * @deprecated google.cloud.networkmanagement.v1beta1.InstanceInfo.service_account is deprecated. - * See google/cloud/networkmanagement/v1beta1/trace.proto;l=420 + * See google/cloud/networkmanagement/v1beta1/trace.proto;l=426 * @return The serviceAccount. */ @java.lang.Deprecated @@ -262,7 +262,7 @@ public interface InstanceInfoOrBuilder * string service_account = 8 [deprecated = true]; * * @deprecated google.cloud.networkmanagement.v1beta1.InstanceInfo.service_account is deprecated. - * See google/cloud/networkmanagement/v1beta1/trace.proto;l=420 + * See google/cloud/networkmanagement/v1beta1/trace.proto;l=426 * @return The bytes for serviceAccount. */ @java.lang.Deprecated @@ -305,7 +305,7 @@ public interface InstanceInfoOrBuilder * bool running = 10 [deprecated = true]; * * @deprecated google.cloud.networkmanagement.v1beta1.InstanceInfo.running is deprecated. See - * google/cloud/networkmanagement/v1beta1/trace.proto;l=427 + * google/cloud/networkmanagement/v1beta1/trace.proto;l=433 * @return The running. */ @java.lang.Deprecated diff --git a/java-network-management/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/LoadBalancerInfo.java b/java-network-management/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/LoadBalancerInfo.java index f230745f5086..c3970d34c1ad 100644 --- a/java-network-management/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/LoadBalancerInfo.java +++ b/java-network-management/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/LoadBalancerInfo.java @@ -572,7 +572,7 @@ public int getLoadBalancerTypeValue() { * string health_check_uri = 2 [deprecated = true]; * * @deprecated google.cloud.networkmanagement.v1beta1.LoadBalancerInfo.health_check_uri is - * deprecated. See google/cloud/networkmanagement/v1beta1/trace.proto;l=899 + * deprecated. See google/cloud/networkmanagement/v1beta1/trace.proto;l=905 * @return The healthCheckUri. */ @java.lang.Override @@ -601,7 +601,7 @@ public java.lang.String getHealthCheckUri() { * string health_check_uri = 2 [deprecated = true]; * * @deprecated google.cloud.networkmanagement.v1beta1.LoadBalancerInfo.health_check_uri is - * deprecated. See google/cloud/networkmanagement/v1beta1/trace.proto;l=899 + * deprecated. See google/cloud/networkmanagement/v1beta1/trace.proto;l=905 * @return The bytes for healthCheckUri. */ @java.lang.Override @@ -1381,7 +1381,7 @@ public Builder clearLoadBalancerType() { * string health_check_uri = 2 [deprecated = true]; * * @deprecated google.cloud.networkmanagement.v1beta1.LoadBalancerInfo.health_check_uri is - * deprecated. See google/cloud/networkmanagement/v1beta1/trace.proto;l=899 + * deprecated. See google/cloud/networkmanagement/v1beta1/trace.proto;l=905 * @return The healthCheckUri. */ @java.lang.Deprecated @@ -1409,7 +1409,7 @@ public java.lang.String getHealthCheckUri() { * string health_check_uri = 2 [deprecated = true]; * * @deprecated google.cloud.networkmanagement.v1beta1.LoadBalancerInfo.health_check_uri is - * deprecated. See google/cloud/networkmanagement/v1beta1/trace.proto;l=899 + * deprecated. See google/cloud/networkmanagement/v1beta1/trace.proto;l=905 * @return The bytes for healthCheckUri. */ @java.lang.Deprecated @@ -1437,7 +1437,7 @@ public com.google.protobuf.ByteString getHealthCheckUriBytes() { * string health_check_uri = 2 [deprecated = true]; * * @deprecated google.cloud.networkmanagement.v1beta1.LoadBalancerInfo.health_check_uri is - * deprecated. See google/cloud/networkmanagement/v1beta1/trace.proto;l=899 + * deprecated. See google/cloud/networkmanagement/v1beta1/trace.proto;l=905 * @param value The healthCheckUri to set. * @return This builder for chaining. */ @@ -1464,7 +1464,7 @@ public Builder setHealthCheckUri(java.lang.String value) { * string health_check_uri = 2 [deprecated = true]; * * @deprecated google.cloud.networkmanagement.v1beta1.LoadBalancerInfo.health_check_uri is - * deprecated. See google/cloud/networkmanagement/v1beta1/trace.proto;l=899 + * deprecated. See google/cloud/networkmanagement/v1beta1/trace.proto;l=905 * @return This builder for chaining. */ @java.lang.Deprecated @@ -1487,7 +1487,7 @@ public Builder clearHealthCheckUri() { * string health_check_uri = 2 [deprecated = true]; * * @deprecated google.cloud.networkmanagement.v1beta1.LoadBalancerInfo.health_check_uri is - * deprecated. See google/cloud/networkmanagement/v1beta1/trace.proto;l=899 + * deprecated. See google/cloud/networkmanagement/v1beta1/trace.proto;l=905 * @param value The bytes for healthCheckUri to set. * @return This builder for chaining. */ diff --git a/java-network-management/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/LoadBalancerInfoOrBuilder.java b/java-network-management/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/LoadBalancerInfoOrBuilder.java index 18c7c67a169a..df199a31ce58 100644 --- a/java-network-management/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/LoadBalancerInfoOrBuilder.java +++ b/java-network-management/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/LoadBalancerInfoOrBuilder.java @@ -69,7 +69,7 @@ public interface LoadBalancerInfoOrBuilder * string health_check_uri = 2 [deprecated = true]; * * @deprecated google.cloud.networkmanagement.v1beta1.LoadBalancerInfo.health_check_uri is - * deprecated. See google/cloud/networkmanagement/v1beta1/trace.proto;l=899 + * deprecated. See google/cloud/networkmanagement/v1beta1/trace.proto;l=905 * @return The healthCheckUri. */ @java.lang.Deprecated @@ -87,7 +87,7 @@ public interface LoadBalancerInfoOrBuilder * string health_check_uri = 2 [deprecated = true]; * * @deprecated google.cloud.networkmanagement.v1beta1.LoadBalancerInfo.health_check_uri is - * deprecated. See google/cloud/networkmanagement/v1beta1/trace.proto;l=899 + * deprecated. See google/cloud/networkmanagement/v1beta1/trace.proto;l=905 * @return The bytes for healthCheckUri. */ @java.lang.Deprecated diff --git a/java-network-management/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/PrivateConnectionInfo.java b/java-network-management/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/PrivateConnectionInfo.java new file mode 100644 index 000000000000..875a229a30fd --- /dev/null +++ b/java-network-management/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/PrivateConnectionInfo.java @@ -0,0 +1,611 @@ +/* + * 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/cloud/networkmanagement/v1beta1/trace.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkmanagement.v1beta1; + +/** + * + * + *
            + * For display only. Metadata associated with a Private Connection.
            + * 
            + * + * Protobuf type {@code google.cloud.networkmanagement.v1beta1.PrivateConnectionInfo} + */ +@com.google.protobuf.Generated +public final class PrivateConnectionInfo extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkmanagement.v1beta1.PrivateConnectionInfo) + PrivateConnectionInfoOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "PrivateConnectionInfo"); + } + + // Use PrivateConnectionInfo.newBuilder() to construct. + private PrivateConnectionInfo(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private PrivateConnectionInfo() { + uri_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkmanagement.v1beta1.TraceProto + .internal_static_google_cloud_networkmanagement_v1beta1_PrivateConnectionInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkmanagement.v1beta1.TraceProto + .internal_static_google_cloud_networkmanagement_v1beta1_PrivateConnectionInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkmanagement.v1beta1.PrivateConnectionInfo.class, + com.google.cloud.networkmanagement.v1beta1.PrivateConnectionInfo.Builder.class); + } + + public static final int URI_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object uri_ = ""; + + /** + * + * + *
            +   * URI of the Private Connection in format
            +   * "projects/{project_id}/locations/{location}/privateConnections/{private_connection_id}"
            +   * 
            + * + * string uri = 1; + * + * @return The uri. + */ + @java.lang.Override + public java.lang.String getUri() { + java.lang.Object ref = uri_; + 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(); + uri_ = s; + return s; + } + } + + /** + * + * + *
            +   * URI of the Private Connection in format
            +   * "projects/{project_id}/locations/{location}/privateConnections/{private_connection_id}"
            +   * 
            + * + * string uri = 1; + * + * @return The bytes for uri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getUriBytes() { + java.lang.Object ref = uri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uri_ = 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 { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(uri_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, uri_); + } + 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(uri_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, uri_); + } + 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.networkmanagement.v1beta1.PrivateConnectionInfo)) { + return super.equals(obj); + } + com.google.cloud.networkmanagement.v1beta1.PrivateConnectionInfo other = + (com.google.cloud.networkmanagement.v1beta1.PrivateConnectionInfo) obj; + + if (!getUri().equals(other.getUri())) 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) + URI_FIELD_NUMBER; + hash = (53 * hash) + getUri().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.networkmanagement.v1beta1.PrivateConnectionInfo parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkmanagement.v1beta1.PrivateConnectionInfo 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.networkmanagement.v1beta1.PrivateConnectionInfo parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkmanagement.v1beta1.PrivateConnectionInfo 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.networkmanagement.v1beta1.PrivateConnectionInfo parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkmanagement.v1beta1.PrivateConnectionInfo parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkmanagement.v1beta1.PrivateConnectionInfo parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkmanagement.v1beta1.PrivateConnectionInfo 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.networkmanagement.v1beta1.PrivateConnectionInfo parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkmanagement.v1beta1.PrivateConnectionInfo 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.networkmanagement.v1beta1.PrivateConnectionInfo parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkmanagement.v1beta1.PrivateConnectionInfo 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.networkmanagement.v1beta1.PrivateConnectionInfo 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; + } + + /** + * + * + *
            +   * For display only. Metadata associated with a Private Connection.
            +   * 
            + * + * Protobuf type {@code google.cloud.networkmanagement.v1beta1.PrivateConnectionInfo} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkmanagement.v1beta1.PrivateConnectionInfo) + com.google.cloud.networkmanagement.v1beta1.PrivateConnectionInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkmanagement.v1beta1.TraceProto + .internal_static_google_cloud_networkmanagement_v1beta1_PrivateConnectionInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkmanagement.v1beta1.TraceProto + .internal_static_google_cloud_networkmanagement_v1beta1_PrivateConnectionInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkmanagement.v1beta1.PrivateConnectionInfo.class, + com.google.cloud.networkmanagement.v1beta1.PrivateConnectionInfo.Builder.class); + } + + // Construct using com.google.cloud.networkmanagement.v1beta1.PrivateConnectionInfo.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + uri_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkmanagement.v1beta1.TraceProto + .internal_static_google_cloud_networkmanagement_v1beta1_PrivateConnectionInfo_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.PrivateConnectionInfo + getDefaultInstanceForType() { + return com.google.cloud.networkmanagement.v1beta1.PrivateConnectionInfo.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.PrivateConnectionInfo build() { + com.google.cloud.networkmanagement.v1beta1.PrivateConnectionInfo result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.PrivateConnectionInfo buildPartial() { + com.google.cloud.networkmanagement.v1beta1.PrivateConnectionInfo result = + new com.google.cloud.networkmanagement.v1beta1.PrivateConnectionInfo(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.networkmanagement.v1beta1.PrivateConnectionInfo result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.uri_ = uri_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.networkmanagement.v1beta1.PrivateConnectionInfo) { + return mergeFrom((com.google.cloud.networkmanagement.v1beta1.PrivateConnectionInfo) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.networkmanagement.v1beta1.PrivateConnectionInfo other) { + if (other + == com.google.cloud.networkmanagement.v1beta1.PrivateConnectionInfo.getDefaultInstance()) + return this; + if (!other.getUri().isEmpty()) { + uri_ = other.uri_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + uri_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object uri_ = ""; + + /** + * + * + *
            +     * URI of the Private Connection in format
            +     * "projects/{project_id}/locations/{location}/privateConnections/{private_connection_id}"
            +     * 
            + * + * string uri = 1; + * + * @return The uri. + */ + public java.lang.String getUri() { + java.lang.Object ref = uri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
            +     * URI of the Private Connection in format
            +     * "projects/{project_id}/locations/{location}/privateConnections/{private_connection_id}"
            +     * 
            + * + * string uri = 1; + * + * @return The bytes for uri. + */ + public com.google.protobuf.ByteString getUriBytes() { + java.lang.Object ref = uri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
            +     * URI of the Private Connection in format
            +     * "projects/{project_id}/locations/{location}/privateConnections/{private_connection_id}"
            +     * 
            + * + * string uri = 1; + * + * @param value The uri to set. + * @return This builder for chaining. + */ + public Builder setUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + uri_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
            +     * URI of the Private Connection in format
            +     * "projects/{project_id}/locations/{location}/privateConnections/{private_connection_id}"
            +     * 
            + * + * string uri = 1; + * + * @return This builder for chaining. + */ + public Builder clearUri() { + uri_ = getDefaultInstance().getUri(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
            +     * URI of the Private Connection in format
            +     * "projects/{project_id}/locations/{location}/privateConnections/{private_connection_id}"
            +     * 
            + * + * string uri = 1; + * + * @param value The bytes for uri to set. + * @return This builder for chaining. + */ + public Builder setUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + uri_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.networkmanagement.v1beta1.PrivateConnectionInfo) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkmanagement.v1beta1.PrivateConnectionInfo) + private static final com.google.cloud.networkmanagement.v1beta1.PrivateConnectionInfo + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.networkmanagement.v1beta1.PrivateConnectionInfo(); + } + + public static com.google.cloud.networkmanagement.v1beta1.PrivateConnectionInfo + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PrivateConnectionInfo parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.PrivateConnectionInfo + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-network-management/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/PrivateConnectionInfoOrBuilder.java b/java-network-management/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/PrivateConnectionInfoOrBuilder.java new file mode 100644 index 000000000000..b0f98856120d --- /dev/null +++ b/java-network-management/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/PrivateConnectionInfoOrBuilder.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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/networkmanagement/v1beta1/trace.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkmanagement.v1beta1; + +@com.google.protobuf.Generated +public interface PrivateConnectionInfoOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkmanagement.v1beta1.PrivateConnectionInfo) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
            +   * URI of the Private Connection in format
            +   * "projects/{project_id}/locations/{location}/privateConnections/{private_connection_id}"
            +   * 
            + * + * string uri = 1; + * + * @return The uri. + */ + java.lang.String getUri(); + + /** + * + * + *
            +   * URI of the Private Connection in format
            +   * "projects/{project_id}/locations/{location}/privateConnections/{private_connection_id}"
            +   * 
            + * + * string uri = 1; + * + * @return The bytes for uri. + */ + com.google.protobuf.ByteString getUriBytes(); +} diff --git a/java-network-management/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/RouteInfo.java b/java-network-management/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/RouteInfo.java index e91c143ebd2e..cc843d692f0b 100644 --- a/java-network-management/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/RouteInfo.java +++ b/java-network-management/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/RouteInfo.java @@ -1113,7 +1113,7 @@ public com.google.cloud.networkmanagement.v1beta1.RouteInfo.NextHopType getNextH * * * @deprecated google.cloud.networkmanagement.v1beta1.RouteInfo.route_scope is deprecated. See - * google/cloud/networkmanagement/v1beta1/trace.proto;l=684 + * google/cloud/networkmanagement/v1beta1/trace.proto;l=690 * @return The enum numeric value on the wire for routeScope. */ @java.lang.Override @@ -1135,7 +1135,7 @@ public int getRouteScopeValue() { * * * @deprecated google.cloud.networkmanagement.v1beta1.RouteInfo.route_scope is deprecated. See - * google/cloud/networkmanagement/v1beta1/trace.proto;l=684 + * google/cloud/networkmanagement/v1beta1/trace.proto;l=690 * @return The routeScope. */ @java.lang.Override @@ -1387,7 +1387,7 @@ public com.google.protobuf.ByteString getDestIpRangeBytes() { * string next_hop = 4 [deprecated = true]; * * @deprecated google.cloud.networkmanagement.v1beta1.RouteInfo.next_hop is deprecated. See - * google/cloud/networkmanagement/v1beta1/trace.proto;l=706 + * google/cloud/networkmanagement/v1beta1/trace.proto;l=712 * @return The nextHop. */ @java.lang.Override @@ -1416,7 +1416,7 @@ public java.lang.String getNextHop() { * string next_hop = 4 [deprecated = true]; * * @deprecated google.cloud.networkmanagement.v1beta1.RouteInfo.next_hop is deprecated. See - * google/cloud/networkmanagement/v1beta1/trace.proto;l=706 + * google/cloud/networkmanagement/v1beta1/trace.proto;l=712 * @return The bytes for nextHop. */ @java.lang.Override @@ -2065,7 +2065,7 @@ public com.google.protobuf.ByteString getAdvertisedRouteSourceRouterUriBytes() { * optional string advertised_route_next_hop_uri = 18 [deprecated = true]; * * @deprecated google.cloud.networkmanagement.v1beta1.RouteInfo.advertised_route_next_hop_uri is - * deprecated. See google/cloud/networkmanagement/v1beta1/trace.proto;l=746 + * deprecated. See google/cloud/networkmanagement/v1beta1/trace.proto;l=752 * @return Whether the advertisedRouteNextHopUri field is set. */ @java.lang.Override @@ -2088,7 +2088,7 @@ public boolean hasAdvertisedRouteNextHopUri() { * optional string advertised_route_next_hop_uri = 18 [deprecated = true]; * * @deprecated google.cloud.networkmanagement.v1beta1.RouteInfo.advertised_route_next_hop_uri is - * deprecated. See google/cloud/networkmanagement/v1beta1/trace.proto;l=746 + * deprecated. See google/cloud/networkmanagement/v1beta1/trace.proto;l=752 * @return The advertisedRouteNextHopUri. */ @java.lang.Override @@ -2119,7 +2119,7 @@ public java.lang.String getAdvertisedRouteNextHopUri() { * optional string advertised_route_next_hop_uri = 18 [deprecated = true]; * * @deprecated google.cloud.networkmanagement.v1beta1.RouteInfo.advertised_route_next_hop_uri is - * deprecated. See google/cloud/networkmanagement/v1beta1/trace.proto;l=746 + * deprecated. See google/cloud/networkmanagement/v1beta1/trace.proto;l=752 * @return The bytes for advertisedRouteNextHopUri. */ @java.lang.Override @@ -3576,7 +3576,7 @@ public Builder clearNextHopType() { * * * @deprecated google.cloud.networkmanagement.v1beta1.RouteInfo.route_scope is deprecated. See - * google/cloud/networkmanagement/v1beta1/trace.proto;l=684 + * google/cloud/networkmanagement/v1beta1/trace.proto;l=690 * @return The enum numeric value on the wire for routeScope. */ @java.lang.Override @@ -3598,7 +3598,7 @@ public int getRouteScopeValue() { * * * @deprecated google.cloud.networkmanagement.v1beta1.RouteInfo.route_scope is deprecated. See - * google/cloud/networkmanagement/v1beta1/trace.proto;l=684 + * google/cloud/networkmanagement/v1beta1/trace.proto;l=690 * @param value The enum numeric value on the wire for routeScope to set. * @return This builder for chaining. */ @@ -3623,7 +3623,7 @@ public Builder setRouteScopeValue(int value) { * * * @deprecated google.cloud.networkmanagement.v1beta1.RouteInfo.route_scope is deprecated. See - * google/cloud/networkmanagement/v1beta1/trace.proto;l=684 + * google/cloud/networkmanagement/v1beta1/trace.proto;l=690 * @return The routeScope. */ @java.lang.Override @@ -3649,7 +3649,7 @@ public com.google.cloud.networkmanagement.v1beta1.RouteInfo.RouteScope getRouteS * * * @deprecated google.cloud.networkmanagement.v1beta1.RouteInfo.route_scope is deprecated. See - * google/cloud/networkmanagement/v1beta1/trace.proto;l=684 + * google/cloud/networkmanagement/v1beta1/trace.proto;l=690 * @param value The routeScope to set. * @return This builder for chaining. */ @@ -3678,7 +3678,7 @@ public Builder setRouteScope( * * * @deprecated google.cloud.networkmanagement.v1beta1.RouteInfo.route_scope is deprecated. See - * google/cloud/networkmanagement/v1beta1/trace.proto;l=684 + * google/cloud/networkmanagement/v1beta1/trace.proto;l=690 * @return This builder for chaining. */ @java.lang.Deprecated @@ -4172,7 +4172,7 @@ public Builder setDestIpRangeBytes(com.google.protobuf.ByteString value) { * string next_hop = 4 [deprecated = true]; * * @deprecated google.cloud.networkmanagement.v1beta1.RouteInfo.next_hop is deprecated. See - * google/cloud/networkmanagement/v1beta1/trace.proto;l=706 + * google/cloud/networkmanagement/v1beta1/trace.proto;l=712 * @return The nextHop. */ @java.lang.Deprecated @@ -4200,7 +4200,7 @@ public java.lang.String getNextHop() { * string next_hop = 4 [deprecated = true]; * * @deprecated google.cloud.networkmanagement.v1beta1.RouteInfo.next_hop is deprecated. See - * google/cloud/networkmanagement/v1beta1/trace.proto;l=706 + * google/cloud/networkmanagement/v1beta1/trace.proto;l=712 * @return The bytes for nextHop. */ @java.lang.Deprecated @@ -4228,7 +4228,7 @@ public com.google.protobuf.ByteString getNextHopBytes() { * string next_hop = 4 [deprecated = true]; * * @deprecated google.cloud.networkmanagement.v1beta1.RouteInfo.next_hop is deprecated. See - * google/cloud/networkmanagement/v1beta1/trace.proto;l=706 + * google/cloud/networkmanagement/v1beta1/trace.proto;l=712 * @param value The nextHop to set. * @return This builder for chaining. */ @@ -4255,7 +4255,7 @@ public Builder setNextHop(java.lang.String value) { * string next_hop = 4 [deprecated = true]; * * @deprecated google.cloud.networkmanagement.v1beta1.RouteInfo.next_hop is deprecated. See - * google/cloud/networkmanagement/v1beta1/trace.proto;l=706 + * google/cloud/networkmanagement/v1beta1/trace.proto;l=712 * @return This builder for chaining. */ @java.lang.Deprecated @@ -4278,7 +4278,7 @@ public Builder clearNextHop() { * string next_hop = 4 [deprecated = true]; * * @deprecated google.cloud.networkmanagement.v1beta1.RouteInfo.next_hop is deprecated. See - * google/cloud/networkmanagement/v1beta1/trace.proto;l=706 + * google/cloud/networkmanagement/v1beta1/trace.proto;l=712 * @param value The bytes for nextHop to set. * @return This builder for chaining. */ @@ -5716,7 +5716,7 @@ public Builder setAdvertisedRouteSourceRouterUriBytes(com.google.protobuf.ByteSt * optional string advertised_route_next_hop_uri = 18 [deprecated = true]; * * @deprecated google.cloud.networkmanagement.v1beta1.RouteInfo.advertised_route_next_hop_uri is - * deprecated. See google/cloud/networkmanagement/v1beta1/trace.proto;l=746 + * deprecated. See google/cloud/networkmanagement/v1beta1/trace.proto;l=752 * @return Whether the advertisedRouteNextHopUri field is set. */ @java.lang.Deprecated @@ -5738,7 +5738,7 @@ public boolean hasAdvertisedRouteNextHopUri() { * optional string advertised_route_next_hop_uri = 18 [deprecated = true]; * * @deprecated google.cloud.networkmanagement.v1beta1.RouteInfo.advertised_route_next_hop_uri is - * deprecated. See google/cloud/networkmanagement/v1beta1/trace.proto;l=746 + * deprecated. See google/cloud/networkmanagement/v1beta1/trace.proto;l=752 * @return The advertisedRouteNextHopUri. */ @java.lang.Deprecated @@ -5768,7 +5768,7 @@ public java.lang.String getAdvertisedRouteNextHopUri() { * optional string advertised_route_next_hop_uri = 18 [deprecated = true]; * * @deprecated google.cloud.networkmanagement.v1beta1.RouteInfo.advertised_route_next_hop_uri is - * deprecated. See google/cloud/networkmanagement/v1beta1/trace.proto;l=746 + * deprecated. See google/cloud/networkmanagement/v1beta1/trace.proto;l=752 * @return The bytes for advertisedRouteNextHopUri. */ @java.lang.Deprecated @@ -5798,7 +5798,7 @@ public com.google.protobuf.ByteString getAdvertisedRouteNextHopUriBytes() { * optional string advertised_route_next_hop_uri = 18 [deprecated = true]; * * @deprecated google.cloud.networkmanagement.v1beta1.RouteInfo.advertised_route_next_hop_uri is - * deprecated. See google/cloud/networkmanagement/v1beta1/trace.proto;l=746 + * deprecated. See google/cloud/networkmanagement/v1beta1/trace.proto;l=752 * @param value The advertisedRouteNextHopUri to set. * @return This builder for chaining. */ @@ -5827,7 +5827,7 @@ public Builder setAdvertisedRouteNextHopUri(java.lang.String value) { * optional string advertised_route_next_hop_uri = 18 [deprecated = true]; * * @deprecated google.cloud.networkmanagement.v1beta1.RouteInfo.advertised_route_next_hop_uri is - * deprecated. See google/cloud/networkmanagement/v1beta1/trace.proto;l=746 + * deprecated. See google/cloud/networkmanagement/v1beta1/trace.proto;l=752 * @return This builder for chaining. */ @java.lang.Deprecated @@ -5852,7 +5852,7 @@ public Builder clearAdvertisedRouteNextHopUri() { * optional string advertised_route_next_hop_uri = 18 [deprecated = true]; * * @deprecated google.cloud.networkmanagement.v1beta1.RouteInfo.advertised_route_next_hop_uri is - * deprecated. See google/cloud/networkmanagement/v1beta1/trace.proto;l=746 + * deprecated. See google/cloud/networkmanagement/v1beta1/trace.proto;l=752 * @param value The bytes for advertisedRouteNextHopUri to set. * @return This builder for chaining. */ diff --git a/java-network-management/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/RouteInfoOrBuilder.java b/java-network-management/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/RouteInfoOrBuilder.java index 038c35620dd5..188ba364c879 100644 --- a/java-network-management/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/RouteInfoOrBuilder.java +++ b/java-network-management/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/RouteInfoOrBuilder.java @@ -91,7 +91,7 @@ public interface RouteInfoOrBuilder * * * @deprecated google.cloud.networkmanagement.v1beta1.RouteInfo.route_scope is deprecated. See - * google/cloud/networkmanagement/v1beta1/trace.proto;l=684 + * google/cloud/networkmanagement/v1beta1/trace.proto;l=690 * @return The enum numeric value on the wire for routeScope. */ @java.lang.Deprecated @@ -110,7 +110,7 @@ public interface RouteInfoOrBuilder * * * @deprecated google.cloud.networkmanagement.v1beta1.RouteInfo.route_scope is deprecated. See - * google/cloud/networkmanagement/v1beta1/trace.proto;l=684 + * google/cloud/networkmanagement/v1beta1/trace.proto;l=690 * @return The routeScope. */ @java.lang.Deprecated @@ -242,7 +242,7 @@ public interface RouteInfoOrBuilder * string next_hop = 4 [deprecated = true]; * * @deprecated google.cloud.networkmanagement.v1beta1.RouteInfo.next_hop is deprecated. See - * google/cloud/networkmanagement/v1beta1/trace.proto;l=706 + * google/cloud/networkmanagement/v1beta1/trace.proto;l=712 * @return The nextHop. */ @java.lang.Deprecated @@ -260,7 +260,7 @@ public interface RouteInfoOrBuilder * string next_hop = 4 [deprecated = true]; * * @deprecated google.cloud.networkmanagement.v1beta1.RouteInfo.next_hop is deprecated. See - * google/cloud/networkmanagement/v1beta1/trace.proto;l=706 + * google/cloud/networkmanagement/v1beta1/trace.proto;l=712 * @return The bytes for nextHop. */ @java.lang.Deprecated @@ -687,7 +687,7 @@ public interface RouteInfoOrBuilder * optional string advertised_route_next_hop_uri = 18 [deprecated = true]; * * @deprecated google.cloud.networkmanagement.v1beta1.RouteInfo.advertised_route_next_hop_uri is - * deprecated. See google/cloud/networkmanagement/v1beta1/trace.proto;l=746 + * deprecated. See google/cloud/networkmanagement/v1beta1/trace.proto;l=752 * @return Whether the advertisedRouteNextHopUri field is set. */ @java.lang.Deprecated @@ -707,7 +707,7 @@ public interface RouteInfoOrBuilder * optional string advertised_route_next_hop_uri = 18 [deprecated = true]; * * @deprecated google.cloud.networkmanagement.v1beta1.RouteInfo.advertised_route_next_hop_uri is - * deprecated. See google/cloud/networkmanagement/v1beta1/trace.proto;l=746 + * deprecated. See google/cloud/networkmanagement/v1beta1/trace.proto;l=752 * @return The advertisedRouteNextHopUri. */ @java.lang.Deprecated @@ -727,7 +727,7 @@ public interface RouteInfoOrBuilder * optional string advertised_route_next_hop_uri = 18 [deprecated = true]; * * @deprecated google.cloud.networkmanagement.v1beta1.RouteInfo.advertised_route_next_hop_uri is - * deprecated. See google/cloud/networkmanagement/v1beta1/trace.proto;l=746 + * deprecated. See google/cloud/networkmanagement/v1beta1/trace.proto;l=752 * @return The bytes for advertisedRouteNextHopUri. */ @java.lang.Deprecated diff --git a/java-network-management/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/Step.java b/java-network-management/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/Step.java index 32497c2b53d6..019f5e74ceab 100644 --- a/java-network-management/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/Step.java +++ b/java-network-management/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/Step.java @@ -274,6 +274,16 @@ public enum State implements com.google.protobuf.ProtocolMessageEnum { * START_FROM_SERVERLESS_NEG = 31; */ START_FROM_SERVERLESS_NEG(31), + /** + * + * + *
            +     * Initial state: packet originating from a DMS Private Connection.
            +     * 
            + * + * START_FROM_DMS_PRIVATE_CONNECTION = 48; + */ + START_FROM_DMS_PRIVATE_CONNECTION(48), /** * * @@ -812,6 +822,17 @@ public enum State implements com.google.protobuf.ProtocolMessageEnum { */ public static final int START_FROM_SERVERLESS_NEG_VALUE = 31; + /** + * + * + *
            +     * Initial state: packet originating from a DMS Private Connection.
            +     * 
            + * + * START_FROM_DMS_PRIVATE_CONNECTION = 48; + */ + public static final int START_FROM_DMS_PRIVATE_CONNECTION_VALUE = 48; + /** * * @@ -1216,6 +1237,8 @@ public static State forNumber(int value) { return START_FROM_PSC_PUBLISHED_SERVICE; case 31: return START_FROM_SERVERLESS_NEG; + case 48: + return START_FROM_DMS_PRIVATE_CONNECTION; case 4: return APPLY_INGRESS_FIREWALL_RULE; case 5: @@ -1376,6 +1399,7 @@ public enum StepInfoCase STORAGE_BUCKET(28), SERVERLESS_NEG(29), NGFW_PACKET_INSPECTION(42), + DMS_PRIVATE_CONNECTION(43), STEPINFO_NOT_SET(0); private final int value; @@ -1469,6 +1493,8 @@ public static StepInfoCase forNumber(int value) { return SERVERLESS_NEG; case 42: return NGFW_PACKET_INSPECTION; + case 43: + return DMS_PRIVATE_CONNECTION; case 0: return STEPINFO_NOT_SET; default: @@ -2628,7 +2654,7 @@ public com.google.cloud.networkmanagement.v1beta1.DropInfoOrBuilder getDropOrBui * * * @deprecated google.cloud.networkmanagement.v1beta1.Step.load_balancer is deprecated. See - * google/cloud/networkmanagement/v1beta1/trace.proto;l=319 + * google/cloud/networkmanagement/v1beta1/trace.proto;l=322 * @return Whether the loadBalancer field is set. */ @java.lang.Override @@ -2650,7 +2676,7 @@ public boolean hasLoadBalancer() { * * * @deprecated google.cloud.networkmanagement.v1beta1.Step.load_balancer is deprecated. See - * google/cloud/networkmanagement/v1beta1/trace.proto;l=319 + * google/cloud/networkmanagement/v1beta1/trace.proto;l=322 * @return The loadBalancer. */ @java.lang.Override @@ -3778,6 +3804,68 @@ public boolean hasNgfwPacketInspection() { return com.google.cloud.networkmanagement.v1beta1.NgfwPacketInspectionInfo.getDefaultInstance(); } + public static final int DMS_PRIVATE_CONNECTION_FIELD_NUMBER = 43; + + /** + * + * + *
            +   * Display information of a DMS Private Connection.
            +   * 
            + * + * + * .google.cloud.networkmanagement.v1beta1.PrivateConnectionInfo dms_private_connection = 43; + * + * + * @return Whether the dmsPrivateConnection field is set. + */ + @java.lang.Override + public boolean hasDmsPrivateConnection() { + return stepInfoCase_ == 43; + } + + /** + * + * + *
            +   * Display information of a DMS Private Connection.
            +   * 
            + * + * + * .google.cloud.networkmanagement.v1beta1.PrivateConnectionInfo dms_private_connection = 43; + * + * + * @return The dmsPrivateConnection. + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.PrivateConnectionInfo + getDmsPrivateConnection() { + if (stepInfoCase_ == 43) { + return (com.google.cloud.networkmanagement.v1beta1.PrivateConnectionInfo) stepInfo_; + } + return com.google.cloud.networkmanagement.v1beta1.PrivateConnectionInfo.getDefaultInstance(); + } + + /** + * + * + *
            +   * Display information of a DMS Private Connection.
            +   * 
            + * + * + * .google.cloud.networkmanagement.v1beta1.PrivateConnectionInfo dms_private_connection = 43; + * + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.PrivateConnectionInfoOrBuilder + getDmsPrivateConnectionOrBuilder() { + if (stepInfoCase_ == 43) { + return (com.google.cloud.networkmanagement.v1beta1.PrivateConnectionInfo) stepInfo_; + } + return com.google.cloud.networkmanagement.v1beta1.PrivateConnectionInfo.getDefaultInstance(); + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -3937,6 +4025,10 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io output.writeMessage( 42, (com.google.cloud.networkmanagement.v1beta1.NgfwPacketInspectionInfo) stepInfo_); } + if (stepInfoCase_ == 43) { + output.writeMessage( + 43, (com.google.cloud.networkmanagement.v1beta1.PrivateConnectionInfo) stepInfo_); + } if (stepInfoCase_ == 45) { output.writeMessage( 45, (com.google.cloud.networkmanagement.v1beta1.CloudRunJobInfo) stepInfo_); @@ -4148,6 +4240,11 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 42, (com.google.cloud.networkmanagement.v1beta1.NgfwPacketInspectionInfo) stepInfo_); } + if (stepInfoCase_ == 43) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 43, (com.google.cloud.networkmanagement.v1beta1.PrivateConnectionInfo) stepInfo_); + } if (stepInfoCase_ == 45) { size += com.google.protobuf.CodedOutputStream.computeMessageSize( @@ -4288,6 +4385,9 @@ public boolean equals(final java.lang.Object obj) { case 42: if (!getNgfwPacketInspection().equals(other.getNgfwPacketInspection())) return false; break; + case 43: + if (!getDmsPrivateConnection().equals(other.getDmsPrivateConnection())) return false; + break; case 0: default: } @@ -4459,6 +4559,10 @@ public int hashCode() { hash = (37 * hash) + NGFW_PACKET_INSPECTION_FIELD_NUMBER; hash = (53 * hash) + getNgfwPacketInspection().hashCode(); break; + case 43: + hash = (37 * hash) + DMS_PRIVATE_CONNECTION_FIELD_NUMBER; + hash = (53 * hash) + getDmsPrivateConnection().hashCode(); + break; case 0: default: } @@ -4719,6 +4823,9 @@ public Builder clear() { if (ngfwPacketInspectionBuilder_ != null) { ngfwPacketInspectionBuilder_.clear(); } + if (dmsPrivateConnectionBuilder_ != null) { + dmsPrivateConnectionBuilder_.clear(); + } stepInfoCase_ = 0; stepInfo_ = null; return this; @@ -4893,6 +5000,9 @@ private void buildPartialOneofs(com.google.cloud.networkmanagement.v1beta1.Step if (stepInfoCase_ == 42 && ngfwPacketInspectionBuilder_ != null) { result.stepInfo_ = ngfwPacketInspectionBuilder_.build(); } + if (stepInfoCase_ == 43 && dmsPrivateConnectionBuilder_ != null) { + result.stepInfo_ = dmsPrivateConnectionBuilder_.build(); + } } @java.lang.Override @@ -5110,6 +5220,11 @@ public Builder mergeFrom(com.google.cloud.networkmanagement.v1beta1.Step other) mergeNgfwPacketInspection(other.getNgfwPacketInspection()); break; } + case DMS_PRIVATE_CONNECTION: + { + mergeDmsPrivateConnection(other.getDmsPrivateConnection()); + break; + } case STEPINFO_NOT_SET: { break; @@ -5414,6 +5529,13 @@ public Builder mergeFrom( stepInfoCase_ = 42; break; } // case 338 + case 346: + { + input.readMessage( + internalGetDmsPrivateConnectionFieldBuilder().getBuilder(), extensionRegistry); + stepInfoCase_ = 43; + break; + } // case 346 case 362: { input.readMessage( @@ -9729,7 +9851,7 @@ public com.google.cloud.networkmanagement.v1beta1.DropInfoOrBuilder getDropOrBui * * * @deprecated google.cloud.networkmanagement.v1beta1.Step.load_balancer is deprecated. See - * google/cloud/networkmanagement/v1beta1/trace.proto;l=319 + * google/cloud/networkmanagement/v1beta1/trace.proto;l=322 * @return Whether the loadBalancer field is set. */ @java.lang.Override @@ -9751,7 +9873,7 @@ public boolean hasLoadBalancer() { * * * @deprecated google.cloud.networkmanagement.v1beta1.Step.load_balancer is deprecated. See - * google/cloud/networkmanagement/v1beta1/trace.proto;l=319 + * google/cloud/networkmanagement/v1beta1/trace.proto;l=322 * @return The loadBalancer. */ @java.lang.Override @@ -14398,6 +14520,253 @@ public Builder clearNgfwPacketInspection() { return ngfwPacketInspectionBuilder_; } + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.networkmanagement.v1beta1.PrivateConnectionInfo, + com.google.cloud.networkmanagement.v1beta1.PrivateConnectionInfo.Builder, + com.google.cloud.networkmanagement.v1beta1.PrivateConnectionInfoOrBuilder> + dmsPrivateConnectionBuilder_; + + /** + * + * + *
            +     * Display information of a DMS Private Connection.
            +     * 
            + * + * + * .google.cloud.networkmanagement.v1beta1.PrivateConnectionInfo dms_private_connection = 43; + * + * + * @return Whether the dmsPrivateConnection field is set. + */ + @java.lang.Override + public boolean hasDmsPrivateConnection() { + return stepInfoCase_ == 43; + } + + /** + * + * + *
            +     * Display information of a DMS Private Connection.
            +     * 
            + * + * + * .google.cloud.networkmanagement.v1beta1.PrivateConnectionInfo dms_private_connection = 43; + * + * + * @return The dmsPrivateConnection. + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.PrivateConnectionInfo + getDmsPrivateConnection() { + if (dmsPrivateConnectionBuilder_ == null) { + if (stepInfoCase_ == 43) { + return (com.google.cloud.networkmanagement.v1beta1.PrivateConnectionInfo) stepInfo_; + } + return com.google.cloud.networkmanagement.v1beta1.PrivateConnectionInfo + .getDefaultInstance(); + } else { + if (stepInfoCase_ == 43) { + return dmsPrivateConnectionBuilder_.getMessage(); + } + return com.google.cloud.networkmanagement.v1beta1.PrivateConnectionInfo + .getDefaultInstance(); + } + } + + /** + * + * + *
            +     * Display information of a DMS Private Connection.
            +     * 
            + * + * + * .google.cloud.networkmanagement.v1beta1.PrivateConnectionInfo dms_private_connection = 43; + * + */ + public Builder setDmsPrivateConnection( + com.google.cloud.networkmanagement.v1beta1.PrivateConnectionInfo value) { + if (dmsPrivateConnectionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + stepInfo_ = value; + onChanged(); + } else { + dmsPrivateConnectionBuilder_.setMessage(value); + } + stepInfoCase_ = 43; + return this; + } + + /** + * + * + *
            +     * Display information of a DMS Private Connection.
            +     * 
            + * + * + * .google.cloud.networkmanagement.v1beta1.PrivateConnectionInfo dms_private_connection = 43; + * + */ + public Builder setDmsPrivateConnection( + com.google.cloud.networkmanagement.v1beta1.PrivateConnectionInfo.Builder builderForValue) { + if (dmsPrivateConnectionBuilder_ == null) { + stepInfo_ = builderForValue.build(); + onChanged(); + } else { + dmsPrivateConnectionBuilder_.setMessage(builderForValue.build()); + } + stepInfoCase_ = 43; + return this; + } + + /** + * + * + *
            +     * Display information of a DMS Private Connection.
            +     * 
            + * + * + * .google.cloud.networkmanagement.v1beta1.PrivateConnectionInfo dms_private_connection = 43; + * + */ + public Builder mergeDmsPrivateConnection( + com.google.cloud.networkmanagement.v1beta1.PrivateConnectionInfo value) { + if (dmsPrivateConnectionBuilder_ == null) { + if (stepInfoCase_ == 43 + && stepInfo_ + != com.google.cloud.networkmanagement.v1beta1.PrivateConnectionInfo + .getDefaultInstance()) { + stepInfo_ = + com.google.cloud.networkmanagement.v1beta1.PrivateConnectionInfo.newBuilder( + (com.google.cloud.networkmanagement.v1beta1.PrivateConnectionInfo) stepInfo_) + .mergeFrom(value) + .buildPartial(); + } else { + stepInfo_ = value; + } + onChanged(); + } else { + if (stepInfoCase_ == 43) { + dmsPrivateConnectionBuilder_.mergeFrom(value); + } else { + dmsPrivateConnectionBuilder_.setMessage(value); + } + } + stepInfoCase_ = 43; + return this; + } + + /** + * + * + *
            +     * Display information of a DMS Private Connection.
            +     * 
            + * + * + * .google.cloud.networkmanagement.v1beta1.PrivateConnectionInfo dms_private_connection = 43; + * + */ + public Builder clearDmsPrivateConnection() { + if (dmsPrivateConnectionBuilder_ == null) { + if (stepInfoCase_ == 43) { + stepInfoCase_ = 0; + stepInfo_ = null; + onChanged(); + } + } else { + if (stepInfoCase_ == 43) { + stepInfoCase_ = 0; + stepInfo_ = null; + } + dmsPrivateConnectionBuilder_.clear(); + } + return this; + } + + /** + * + * + *
            +     * Display information of a DMS Private Connection.
            +     * 
            + * + * + * .google.cloud.networkmanagement.v1beta1.PrivateConnectionInfo dms_private_connection = 43; + * + */ + public com.google.cloud.networkmanagement.v1beta1.PrivateConnectionInfo.Builder + getDmsPrivateConnectionBuilder() { + return internalGetDmsPrivateConnectionFieldBuilder().getBuilder(); + } + + /** + * + * + *
            +     * Display information of a DMS Private Connection.
            +     * 
            + * + * + * .google.cloud.networkmanagement.v1beta1.PrivateConnectionInfo dms_private_connection = 43; + * + */ + @java.lang.Override + public com.google.cloud.networkmanagement.v1beta1.PrivateConnectionInfoOrBuilder + getDmsPrivateConnectionOrBuilder() { + if ((stepInfoCase_ == 43) && (dmsPrivateConnectionBuilder_ != null)) { + return dmsPrivateConnectionBuilder_.getMessageOrBuilder(); + } else { + if (stepInfoCase_ == 43) { + return (com.google.cloud.networkmanagement.v1beta1.PrivateConnectionInfo) stepInfo_; + } + return com.google.cloud.networkmanagement.v1beta1.PrivateConnectionInfo + .getDefaultInstance(); + } + } + + /** + * + * + *
            +     * Display information of a DMS Private Connection.
            +     * 
            + * + * + * .google.cloud.networkmanagement.v1beta1.PrivateConnectionInfo dms_private_connection = 43; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.networkmanagement.v1beta1.PrivateConnectionInfo, + com.google.cloud.networkmanagement.v1beta1.PrivateConnectionInfo.Builder, + com.google.cloud.networkmanagement.v1beta1.PrivateConnectionInfoOrBuilder> + internalGetDmsPrivateConnectionFieldBuilder() { + if (dmsPrivateConnectionBuilder_ == null) { + if (!(stepInfoCase_ == 43)) { + stepInfo_ = + com.google.cloud.networkmanagement.v1beta1.PrivateConnectionInfo.getDefaultInstance(); + } + dmsPrivateConnectionBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.networkmanagement.v1beta1.PrivateConnectionInfo, + com.google.cloud.networkmanagement.v1beta1.PrivateConnectionInfo.Builder, + com.google.cloud.networkmanagement.v1beta1.PrivateConnectionInfoOrBuilder>( + (com.google.cloud.networkmanagement.v1beta1.PrivateConnectionInfo) stepInfo_, + getParentForChildren(), + isClean()); + stepInfo_ = null; + } + stepInfoCase_ = 43; + onChanged(); + return dmsPrivateConnectionBuilder_; + } + // @@protoc_insertion_point(builder_scope:google.cloud.networkmanagement.v1beta1.Step) } diff --git a/java-network-management/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/StepOrBuilder.java b/java-network-management/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/StepOrBuilder.java index e70468bf03ea..c7a8de82d76c 100644 --- a/java-network-management/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/StepOrBuilder.java +++ b/java-network-management/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/StepOrBuilder.java @@ -792,7 +792,7 @@ public interface StepOrBuilder * * * @deprecated google.cloud.networkmanagement.v1beta1.Step.load_balancer is deprecated. See - * google/cloud/networkmanagement/v1beta1/trace.proto;l=319 + * google/cloud/networkmanagement/v1beta1/trace.proto;l=322 * @return Whether the loadBalancer field is set. */ @java.lang.Deprecated @@ -811,7 +811,7 @@ public interface StepOrBuilder * * * @deprecated google.cloud.networkmanagement.v1beta1.Step.load_balancer is deprecated. See - * google/cloud/networkmanagement/v1beta1/trace.proto;l=319 + * google/cloud/networkmanagement/v1beta1/trace.proto;l=322 * @return The loadBalancer. */ @java.lang.Deprecated @@ -1590,5 +1590,49 @@ public interface StepOrBuilder com.google.cloud.networkmanagement.v1beta1.NgfwPacketInspectionInfoOrBuilder getNgfwPacketInspectionOrBuilder(); + /** + * + * + *
            +   * Display information of a DMS Private Connection.
            +   * 
            + * + * + * .google.cloud.networkmanagement.v1beta1.PrivateConnectionInfo dms_private_connection = 43; + * + * + * @return Whether the dmsPrivateConnection field is set. + */ + boolean hasDmsPrivateConnection(); + + /** + * + * + *
            +   * Display information of a DMS Private Connection.
            +   * 
            + * + * + * .google.cloud.networkmanagement.v1beta1.PrivateConnectionInfo dms_private_connection = 43; + * + * + * @return The dmsPrivateConnection. + */ + com.google.cloud.networkmanagement.v1beta1.PrivateConnectionInfo getDmsPrivateConnection(); + + /** + * + * + *
            +   * Display information of a DMS Private Connection.
            +   * 
            + * + * + * .google.cloud.networkmanagement.v1beta1.PrivateConnectionInfo dms_private_connection = 43; + * + */ + com.google.cloud.networkmanagement.v1beta1.PrivateConnectionInfoOrBuilder + getDmsPrivateConnectionOrBuilder(); + com.google.cloud.networkmanagement.v1beta1.Step.StepInfoCase getStepInfoCase(); } diff --git a/java-network-management/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/TestOuterClass.java b/java-network-management/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/TestOuterClass.java index c3888d7a2f39..f77f7a862400 100644 --- a/java-network-management/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/TestOuterClass.java +++ b/java-network-management/proto-google-cloud-network-management-v1beta1/src/main/java/com/google/cloud/networkmanagement/v1beta1/TestOuterClass.java @@ -130,7 +130,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\003key\030\001 \001(\t\022\r\n" + "\005value\030\002 \001(\t:\0028\001:t\352Aq\n" + "1networkmanagement.googleapis.com/ConnectivityTest\022\n" + + "\006status\030\013" + + " \001(\0162;.google.cloud.networkmanagement.v1beta1.InstanceInfo.Status\">\n" + "\006Status\022\026\n" + "\022STATUS_UNSPECIFIED\020\000\022\013\n" + "\007RUNNING\020\001\022\017\n" @@ -383,11 +390,12 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\006policy\030\t \001(\t\022\022\n\n" + "policy_uri\030\013 \001(\t\022a\n" + "\022firewall_rule_type\030\n" - + " \001(\0162E.google.cloud.networkmanagement.v1beta1.FirewallInfo.FirewallRuleType\022\027\n" + + " \001(\0162E.google.cloud.netw" + + "orkmanagement.v1beta1.FirewallInfo.FirewallRuleType\022\027\n" + "\017policy_priority\030\014 \001(\005\022T\n" + "\013target_type\030\r" - + " \001(" - + "\0162?.google.cloud.networkmanagement.v1beta1.FirewallInfo.TargetType\"\274\003\n" + + " \001(\0162?.google.cloud.network" + + "management.v1beta1.FirewallInfo.TargetType\"\274\003\n" + "\020FirewallRuleType\022\"\n" + "\036FIREWALL_RULE_TYPE_UNSPECIFIED\020\000\022%\n" + "!HIERARCHICAL_FIREWALL_POLICY_RULE\020\001\022\025\n" @@ -406,12 +414,12 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\tINSTANCES\020\001\022\027\n" + "\023INTERNAL_MANAGED_LB\020\002\"\373\013\n" + "\tRouteInfo\022O\n\n" - + "route_type\030\010 \001(\0162;.google." - + "cloud.networkmanagement.v1beta1.RouteInfo.RouteType\022T\n\r" - + "next_hop_type\030\t \001(\0162=.goo" - + "gle.cloud.networkmanagement.v1beta1.RouteInfo.NextHopType\022U\n" - + "\013route_scope\030\016 \001(\0162<" - + ".google.cloud.networkmanagement.v1beta1.RouteInfo.RouteScopeB\002\030\001\022\024\n" + + "route_type\030\010" + + " \001(\0162;.google.cloud.networkmanagement.v1beta1.RouteInfo.RouteType\022T\n\r" + + "next_hop_type\030\t" + + " \001(\0162=.google.cloud.networkmanagement.v1beta1.RouteInfo.NextHopType\022U\n" + + "\013route_scope\030\016 \001(\0162<.google.cloud.networkman" + + "agement.v1beta1.RouteInfo.RouteScopeB\002\030\001\022\024\n" + "\014display_name\030\001 \001(\t\022\013\n" + "\003uri\030\002 \001(\t\022\016\n" + "\006region\030\023 \001(\t\022\025\n\r" @@ -473,8 +481,8 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\036_advertised_route_next_hop_uri\"\337\002\n" + "\021GoogleServiceInfo\022\021\n" + "\tsource_ip\030\001 \001(\t\022h\n" - + "\023google_service_type\030\002 \001(\0162K.google.cloud.networkmanagement.v1beta" - + "1.GoogleServiceInfo.GoogleServiceType\"\314\001\n" + + "\023google_service_type\030\002 \001(\0162K.google.cloud.networkm" + + "anagement.v1beta1.GoogleServiceInfo.GoogleServiceType\"\314\001\n" + "\021GoogleServiceType\022#\n" + "\037GOOGLE_SERVICE_TYPE_UNSPECIFIED\020\000\022\007\n" + "\003IAP\020\001\022$\n" @@ -498,13 +506,13 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + " \001(\t\022\035\n" + "\025psc_google_api_target\030\013 \001(\t\"\321\004\n" + "\020LoadBalancerInfo\022e\n" - + "\022load_balancer_type\030\001 \001(\0162I.google.cloud.networkmanagement." - + "v1beta1.LoadBalancerInfo.LoadBalancerType\022\034\n" + + "\022load_balancer_type\030\001 \001(\0162I.google.cloud.ne" + + "tworkmanagement.v1beta1.LoadBalancerInfo.LoadBalancerType\022\034\n" + "\020health_check_uri\030\002 \001(\tB\002\030\001\022M\n" - + "\010backends\030\003" - + " \003(\0132;.google.cloud.networkmanagement.v1beta1.LoadBalancerBackend\022Z\n" - + "\014backend_type\030\004 \001(\0162D.google.cloud.networkmanag" - + "ement.v1beta1.LoadBalancerInfo.BackendType\022\023\n" + + "\010backends\030\003 \003(\0132;.google.cloud" + + ".networkmanagement.v1beta1.LoadBalancerBackend\022Z\n" + + "\014backend_type\030\004 \001(\0162D.google.cl" + + "oud.networkmanagement.v1beta1.LoadBalancerInfo.BackendType\022\023\n" + "\013backend_uri\030\005 \001(\t\"\217\001\n" + "\020LoadBalancerType\022\"\n" + "\036LOAD_BALANCER_TYPE_UNSPECIFIED\020\000\022\024\n" @@ -521,8 +529,8 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\023LoadBalancerBackend\022\024\n" + "\014display_name\030\001 \001(\t\022\013\n" + "\003uri\030\002 \001(\t\022y\n" - + "\033health_check_firewall_state\030\003 \001(\0162T.google.cloud.networkmanageme" - + "nt.v1beta1.LoadBalancerBackend.HealthCheckFirewallState\022,\n" + + "\033health_check_firewall_state\030\003 \001(\0162T.google.cloud" + + ".networkmanagement.v1beta1.LoadBalancerBackend.HealthCheckFirewallState\022,\n" + "$health_check_allowing_firewall_rules\030\004 \003(\t\022,\n" + "$health_check_blocking_firewall_rules\030\005 \003(\t\"j\n" + "\030HealthCheckFirewallState\022+\n" @@ -549,8 +557,8 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\021source_gateway_ip\030\006 \001(\t\022\023\n" + "\013network_uri\030\007 \001(\t\022\016\n" + "\006region\030\010 \001(\t\022W\n" - + "\014routing_type\030\t \001(\0162A.go" - + "ogle.cloud.networkmanagement.v1beta1.VpnTunnelInfo.RoutingType\"[\n" + + "\014routing_type\030\t \001(\0162A.google.cloud.networkmanage" + + "ment.v1beta1.VpnTunnelInfo.RoutingType\"[\n" + "\013RoutingType\022\034\n" + "\030ROUTING_TYPE_UNSPECIFIED\020\000\022\017\n" + "\013ROUTE_BASED\020\001\022\020\n" @@ -562,8 +570,8 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\020interconnect_uri\030\003 \001(\t\022\016\n" + "\006region\030\004 \001(\t\022\030\n" + "\020cloud_router_uri\030\005 \001(\t\022U\n" - + "\004type\030\006 \001(\0162G.google.cloud.n" - + "etworkmanagement.v1beta1.InterconnectAttachmentInfo.Type\0222\n" + + "\004type\030\006 \001(\0162" + + "G.google.cloud.networkmanagement.v1beta1.InterconnectAttachmentInfo.Type\0222\n" + " l2_attachment_matched_ip_address\030\007 \001(" + "\tB\010\342\214\317\327\010\002\010\004\"`\n" + "\004Type\022\024\n" @@ -580,16 +588,16 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\020destination_port\030\005 \001(\005\022\032\n" + "\022source_network_uri\030\006 \001(\t\022\037\n" + "\027destination_network_uri\030\007 \001(\t\022\030\n" - + "\020source_agent_uri\030\010 \001(\t\"\361\006\n" + + "\020source_agent_uri\030\010 \001(\t\"\215\007\n" + "\013DeliverInfo\022J\n" - + "\006target\030\001" - + " \001(\0162:.google.cloud.networkmanagement.v1beta1.DeliverInfo.Target\022\024\n" + + "\006target\030\001 \001(\0162:.google.clou" + + "d.networkmanagement.v1beta1.DeliverInfo.Target\022\024\n" + "\014resource_uri\030\002 \001(\t\022\034\n\n" + "ip_address\030\003 \001(\tB\010\342\214\317\327\010\002\010\004\022\026\n" + "\016storage_bucket\030\004 \001(\t\022\035\n" + "\025psc_google_api_target\030\005 \001(\t\022b\n" - + "\023google_service_type\030\006 \001(\0162E.google.cloud.networkmanagement." - + "v1beta1.DeliverInfo.GoogleServiceType\"\227\003\n" + + "\023google_service_type\030\006 \001(\0162E.google.cloud.ne" + + "tworkmanagement.v1beta1.DeliverInfo.GoogleServiceType\"\263\003\n" + "\006Target\022\026\n" + "\022TARGET_UNSPECIFIED\020\000\022\014\n" + "\010INSTANCE\020\001\022\014\n" @@ -612,7 +620,8 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\016REDIS_INSTANCE\020\020\022\021\n\r" + "REDIS_CLUSTER\020\021\022\013\n" + "\007GKE_POD\020\023\022\021\n\r" - + "CLOUD_RUN_JOB\020\024\"\254\001\n" + + "CLOUD_RUN_JOB\020\024\022\032\n" + + "\026DMS_PRIVATE_CONNECTION\020\025\"\254\001\n" + "\021GoogleServiceType\022#\n" + "\037GOOGLE_SERVICE_TYPE_UNSPECIFIED\020\000\022\007\n" + "\003IAP\020\001\022$\n" @@ -621,8 +630,8 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\025PRIVATE_GOOGLE_ACCESS\020\004\022\031\n" + "\025SERVERLESS_VPC_ACCESS\020\005\"\216\003\n" + "\013ForwardInfo\022J\n" - + "\006target\030\001" - + " \001(\0162:.google.cloud.networkmanagement.v1beta1.ForwardInfo.Target\022\024\n" + + "\006target\030\001 \001(\0162:.google.cloud.networ" + + "kmanagement.v1beta1.ForwardInfo.Target\022\024\n" + "\014resource_uri\030\002 \001(\t\022\034\n\n" + "ip_address\030\003 \001(\tB\010\342\214\317\327\010\002\010\004\"\376\001\n" + "\006Target\022\026\n" @@ -690,7 +699,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + ")UNSUPPORTED_GOOGLE_MANAGED_PROJECT_CONFIG\020\037\022\033\n" + "\027NO_SERVERLESS_IP_RANGES\020%\022 \n" + "\034IP_VERSION_PROTOCOL_MISMATCH\020(\022%\n" - + "!GKE_POD_UNKNOWN_ENDPOINT_LOCATION\020)\"\323\"\n" + + "!GKE_POD_UNKNOWN_ENDPOINT_LOCATION\020)\"\252#\n" + "\010DropInfo\022E\n" + "\005cause\030\001" + " \001(\01626.google.cloud.networkmanagement.v1beta1.DropInfo.Cause\022\024\n" @@ -699,7 +708,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\016destination_ip\030\004 \001(\t\022\016\n" + "\006region\030\005 \001(\t\022\037\n" + "\027source_geolocation_code\030\006 \001(\t\022$\n" - + "\034destination_geolocation_code\030\007 \001(\t\"\347 \n" + + "\034destination_geolocation_code\030\007 \001(\t\"\276!\n" + "\005Cause\022\025\n" + "\021CAUSE_UNSPECIFIED\020\000\022\034\n" + "\030UNKNOWN_EXTERNAL_ADDRESS\020\001\022\031\n" @@ -741,7 +750,8 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\036GKE_MASTER_UNAUTHORIZED_ACCESS\020\020\022*\n" + "&CLOUD_SQL_INSTANCE_UNAUTHORIZED_ACCESS\020\021\022\036\n" + "\032DROPPED_INSIDE_GKE_SERVICE\020\022\022$\n" - + " DROPPED_INSIDE_CLOUD_SQL_SERVICE\020\023\022%\n" + + " DROPPED_INSIDE_CLOUD_SQL_SERVICE\020\023\022)\n" + + "%DROPPED_INSIDE_DMS_PRIVATE_CONNECTION\020r\022%\n" + "!GOOGLE_MANAGED_SERVICE_NO_PEERING\020\024\022*\n" + "&GOOGLE_MANAGED_SERVICE_NO_PSC_ENDPOINT\020&\022\034\n" + "\030GKE_PSC_ENDPOINT_MISSING\020$\022$\n" @@ -751,14 +761,14 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\032GKE_CONTROL_PLANE_NO_ROUTE\020 \022:\n" + "6CLOUD_SQL_INSTANCE_NOT_CONFIGURED_FOR_EXTERNAL_TRAFFIC\020!\0224\n" + "0PUBLIC_CLOUD_SQL_INSTANCE_TO_PRIVATE_DESTINATION\020\"\022\037\n" - + "\033CLOUD_SQL_INSTANCE_NO_ROUTE\020#\022 \n" + + "\033CLOUD_SQL_INSTA", + "NCE_NO_ROUTE\020#\022 \n" + "\034CLOUD_SQL_CONNECTOR_REQUIRED\020?\022\035\n" + "\031CLOUD_FUNCTION_NOT_ACTIVE\020\026\022\031\n" + "\025VPC_CONNECTOR_NOT_SET\020\027\022\035\n" + "\031VPC_CONNECTOR_NOT_RUNNING\020\030\022,\n" + "(VPC_CONNECTOR_SERVERLESS_TRAFFIC_BLOCKED\020<\022.\n" - + "*VPC_CONNECTOR_HEALTH", - "_CHECK_TRAFFIC_BLOCKED\020=\022#\n" + + "*VPC_CONNECTOR_HEALTH_CHECK_TRAFFIC_BLOCKED\020=\022#\n" + "\037FORWARDING_RULE_REGION_MISMATCH\020\031\022\037\n" + "\033PSC_CONNECTION_NOT_ACCEPTED\020\032\022-\n" + ")PSC_ENDPOINT_ACCESSED_FROM_PEERED_NETWORK\020)\022.\n" @@ -809,7 +819,8 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\035HYBRID_SUBNET_REGION_MISMATCH\020i\022\032\n" + "\026HYBRID_SUBNET_NO_ROUTE\020j\022\026\n" + "\022GKE_NETWORK_POLICY\020l\022=\n" - + "9NO_VALID_ROUTE_FROM_GOOGLE_MANAGED_NETWORK_TO_DESTINATION\020n\"\201\001\n\r" + + "9NO_VALID_ROUTE_FROM_GOOGLE_MANAGED_NETWORK_TO_DESTINATION\020n\022*\n" + + "&PRIVATE_CONNECTION_NO_RUNNING_INSTANCE\020o\"\201\001\n\r" + "GKEMasterInfo\022\023\n" + "\013cluster_uri\030\002 \001(\t\022\033\n" + "\023cluster_network_uri\030\004 \001(\t\022\023\n" @@ -821,8 +832,8 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "ip_address\030\002 \001(\tB\010\342\214\317\327\010\002\010\004\022\023\n" + "\013network_uri\030\003 \001(\t\"\304\003\n" + "\031IpMasqueradingSkippedInfo\022X\n" - + "\006reason\030\001 \001(\0162H" - + ".google.cloud.networkmanagement.v1beta1.IpMasqueradingSkippedInfo.Reason\022\034\n" + + "\006reason\030\001 \001(\0162H.google.cloud.networkmanageme" + + "nt.v1beta1.IpMasqueradingSkippedInfo.Reason\022\034\n" + "\024non_masquerade_range\030\002 \001(\t\"\256\002\n" + "\006Reason\022\026\n" + "\022REASON_UNSPECIFIED\020\000\0225\n" @@ -839,8 +850,8 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\tdirection\030\003 \001(\t\022\016\n" + "\006action\030\004 \001(\t\"\343\002\n" + "\033GkeNetworkPolicySkippedInfo\022Z\n" - + "\006reason\030\001 \001(\0162J.google.c" - + "loud.networkmanagement.v1beta1.GkeNetworkPolicySkippedInfo.Reason\"\347\001\n" + + "\006reason\030\001 \001(\016" + + "2J.google.cloud.networkmanagement.v1beta1.GkeNetworkPolicySkippedInfo.Reason\"\347\001\n" + "\006Reason\022\026\n" + "\022REASON_UNSPECIFIED\020\000\022\033\n" + "\027NETWORK_POLICY_DISABLED\020\001\022\037\n" @@ -920,8 +931,8 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "router_uri\030\014 \001(\t\022\030\n" + "\020nat_gateway_name\030\r" + " \001(\t\022c\n" - + "\026cloud_nat_gateway_type\030\016 \001(\0162C.google.c" - + "loud.networkmanagement.v1beta1.NatInfo.CloudNatGatewayType\"\231\001\n" + + "\026cloud_nat_gateway_type\030\016 \001(\016" + + "2C.google.cloud.networkmanagement.v1beta1.NatInfo.CloudNatGatewayType\"\231\001\n" + "\004Type\022\024\n" + "\020TYPE_UNSPECIFIED\020\000\022\030\n" + "\024INTERNAL_TO_EXTERNAL\020\001\022\030\n" @@ -960,9 +971,8 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\025psc_google_api_target\030\n" + " \001(\t\022\030\n" + "\020health_check_uri\030\006 \001(\t\022\221\001\n" - + "#health_check_firewalls_config_state\030\007 \001(\0162_." - + "google.cloud.networkmanagement.v1beta1.L" - + "oadBalancerBackendInfo.HealthCheckFirewallsConfigStateB\003\340A\003\"\315\001\n" + + "#health_check_firewalls_config_state\030\007 \001(\0162_.google.cloud.networkmanagemen" + + "t.v1beta1.LoadBalancerBackendInfo.HealthCheckFirewallsConfigStateB\003\340A\003\"\315\001\n" + "\037HealthCheckFirewallsConfigState\0223\n" + "/HEALTH_CHECK_FIREWALLS_CONFIG_STATE_UNSPECIFIED\020\000\022\030\n" + "\024FIREWALLS_CONFIGURED\020\001\022\"\n" @@ -974,7 +984,9 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\021ServerlessNegInfo\022\017\n" + "\007neg_uri\030\001 \001(\t\">\n" + "\030NgfwPacketInspectionInfo\022\"\n" - + "\032security_profile_group_uri\030\001 \001(\t*\366\002\n" + + "\032security_profile_group_uri\030\001 \001(\t\"$\n" + + "\025PrivateConnectionInfo\022\013\n" + + "\003uri\030\001 \001(\t*\366\002\n" + "\020LoadBalancerType\022\"\n" + "\036LOAD_BALANCER_TYPE_UNSPECIFIED\020\000\022 \n" + "\034HTTPS_ADVANCED_LOAD_BALANCER\020\001\022\027\n" @@ -989,10 +1001,11 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\036TCP_UDP_INTERNAL_LOAD_BALANCER\020\n" + "B\222\002\n" + "*com.google.cloud.networkmanagement.v1beta1B\n" - + "TraceProtoP\001ZXcloud.google.com/go/networkmanagem" - + "ent/apiv1beta1/networkmanagementpb;networkmanagementpb\252\002&Google.Cloud.NetworkMan" - + "agement.V1Beta1\312\002&Google\\Cloud\\NetworkMa" - + "nagement\\V1beta1\352\002)Google::Cloud::NetworkManagement::V1beta1b\006proto3" + + "TraceProtoP\001ZXcloud.google.com/go/networkmanagement/apiv1beta1/networkmanagemen" + + "tpb;networkmanagementpb\252\002&Google.Cloud.N" + + "etworkManagement.V1Beta1\312\002&Google\\Cloud\\" + + "NetworkManagement\\V1beta1\352\002)Google::Clou" + + "d::NetworkManagement::V1beta1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -1056,6 +1069,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "StorageBucket", "ServerlessNeg", "NgfwPacketInspection", + "DmsPrivateConnection", "StepInfo", }); internal_static_google_cloud_networkmanagement_v1beta1_InstanceInfo_descriptor = @@ -1490,6 +1504,14 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "SecurityProfileGroupUri", }); + internal_static_google_cloud_networkmanagement_v1beta1_PrivateConnectionInfo_descriptor = + getDescriptor().getMessageType(40); + internal_static_google_cloud_networkmanagement_v1beta1_PrivateConnectionInfo_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_networkmanagement_v1beta1_PrivateConnectionInfo_descriptor, + new java.lang.String[] { + "Uri", + }); descriptor.resolveAllFeaturesImmutable(); com.google.api.FieldBehaviorProto.getDescriptor(); com.google.api.FieldInfoProto.getDescriptor(); diff --git a/java-network-management/proto-google-cloud-network-management-v1beta1/src/main/proto/google/cloud/networkmanagement/v1beta1/connectivity_test.proto b/java-network-management/proto-google-cloud-network-management-v1beta1/src/main/proto/google/cloud/networkmanagement/v1beta1/connectivity_test.proto index 5b9a7c79836f..d37ae31ce350 100644 --- a/java-network-management/proto-google-cloud-network-management-v1beta1/src/main/proto/google/cloud/networkmanagement/v1beta1/connectivity_test.proto +++ b/java-network-management/proto-google-cloud-network-management-v1beta1/src/main/proto/google/cloud/networkmanagement/v1beta1/connectivity_test.proto @@ -253,6 +253,12 @@ message Endpoint { // URI. string gke_pod = 21; + // A [DMS Private + // Connection](https://docs.cloud.google.com/database-migration/docs/reference/rest/v1/projects.locations.privateConnections) + // name format: + // projects/{project}/locations/{location}/privateConnections/{privateConnection}. + string dms_private_connection = 22; + // A [Cloud Function](https://cloud.google.com/functions). Applicable only to // source endpoint. CloudFunctionEndpoint cloud_function = 10; diff --git a/java-network-management/proto-google-cloud-network-management-v1beta1/src/main/proto/google/cloud/networkmanagement/v1beta1/trace.proto b/java-network-management/proto-google-cloud-network-management-v1beta1/src/main/proto/google/cloud/networkmanagement/v1beta1/trace.proto index 06d681c6bcf2..efdcad7893cf 100644 --- a/java-network-management/proto-google-cloud-network-management-v1beta1/src/main/proto/google/cloud/networkmanagement/v1beta1/trace.proto +++ b/java-network-management/proto-google-cloud-network-management-v1beta1/src/main/proto/google/cloud/networkmanagement/v1beta1/trace.proto @@ -136,6 +136,9 @@ message Step { // The serverless_neg information is populated. START_FROM_SERVERLESS_NEG = 31; + // Initial state: packet originating from a DMS Private Connection. + START_FROM_DMS_PRIVATE_CONNECTION = 48; + // Config checking state: verify ingress firewall rule. APPLY_INGRESS_FIREWALL_RULE = 4; @@ -378,6 +381,9 @@ message Step { // Display information of a layer 7 packet inspection by the firewall. NgfwPacketInspectionInfo ngfw_packet_inspection = 42; + + // Display information of a DMS Private Connection. + PrivateConnectionInfo dms_private_connection = 43; } } @@ -1165,6 +1171,9 @@ message DeliverInfo { // Target is a Cloud Run Job. Used only for return traces. CLOUD_RUN_JOB = 20; + + // Target is a DMS Private Connection. Used only for return traces. + DMS_PRIVATE_CONNECTION = 21; } // Recognized type of a Google Service. @@ -1612,6 +1621,9 @@ message DropInfo { // Packet was dropped inside Cloud SQL Service. DROPPED_INSIDE_CLOUD_SQL_SERVICE = 19; + // Packet was dropped inside DMS Private Connection. + DROPPED_INSIDE_DMS_PRIVATE_CONNECTION = 114; + // Packet was dropped because there is no peering between the originating // network and the Google Managed Services Network. GOOGLE_MANAGED_SERVICE_NO_PEERING = 20; @@ -1880,6 +1892,10 @@ message DropInfo { // Packet is dropped because there is no valid matching route from the // network of the Google-managed service to the destination. NO_VALID_ROUTE_FROM_GOOGLE_MANAGED_NETWORK_TO_DESTINATION = 110; + + // Packet is dropped due to no running instance found for private + // connection. + PRIVATE_CONNECTION_NO_RUNNING_INSTANCE = 111; } // Cause that the packet is dropped. @@ -2456,3 +2472,10 @@ message NgfwPacketInspectionInfo { // inspection. string security_profile_group_uri = 1; } + +// For display only. Metadata associated with a Private Connection. +message PrivateConnectionInfo { + // URI of the Private Connection in format + // "projects/{project_id}/locations/{location}/privateConnections/{private_connection_id}" + string uri = 1; +} diff --git a/java-networkservices/google-cloud-networkservices/src/main/java/com/google/cloud/networkservices/v1/NetworkServicesClient.java b/java-networkservices/google-cloud-networkservices/src/main/java/com/google/cloud/networkservices/v1/NetworkServicesClient.java index b2f72bf1b0a3..00a59869cb0b 100644 --- a/java-networkservices/google-cloud-networkservices/src/main/java/com/google/cloud/networkservices/v1/NetworkServicesClient.java +++ b/java-networkservices/google-cloud-networkservices/src/main/java/com/google/cloud/networkservices/v1/NetworkServicesClient.java @@ -1217,6 +1217,104 @@ * * * + *

            ListAgentGateways + *

            Lists AgentGateways in a given project and location. + * + *

            Request object method variants only take one parameter, a request object, which must be constructed before the call.

            + *
              + *
            • listAgentGateways(ListAgentGatewaysRequest request) + *

            + *

            "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

            + *
              + *
            • listAgentGateways(LocationName parent) + *

            • listAgentGateways(String parent) + *

            + *

            Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

            + *
              + *
            • listAgentGatewaysPagedCallable() + *

            • listAgentGatewaysCallable() + *

            + * + * + * + *

            GetAgentGateway + *

            Gets details of a single AgentGateway. + * + *

            Request object method variants only take one parameter, a request object, which must be constructed before the call.

            + *
              + *
            • getAgentGateway(GetAgentGatewayRequest request) + *

            + *

            "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

            + *
              + *
            • getAgentGateway(AgentGatewayName name) + *

            • getAgentGateway(String name) + *

            + *

            Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

            + *
              + *
            • getAgentGatewayCallable() + *

            + * + * + * + *

            CreateAgentGateway + *

            Creates a new AgentGateway in a given project and location. + * + *

            Request object method variants only take one parameter, a request object, which must be constructed before the call.

            + *
              + *
            • createAgentGatewayAsync(CreateAgentGatewayRequest request) + *

            + *

            Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

            + *
              + *
            • createAgentGatewayAsync(LocationName parent, AgentGateway agentGateway, String agentGatewayId) + *

            • createAgentGatewayAsync(String parent, AgentGateway agentGateway, String agentGatewayId) + *

            + *

            Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

            + *
              + *
            • createAgentGatewayOperationCallable() + *

            • createAgentGatewayCallable() + *

            + * + * + * + *

            UpdateAgentGateway + *

            Updates the parameters of a single AgentGateway. + * + *

            Request object method variants only take one parameter, a request object, which must be constructed before the call.

            + *
              + *
            • updateAgentGatewayAsync(UpdateAgentGatewayRequest request) + *

            + *

            Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

            + *
              + *
            • updateAgentGatewayAsync(AgentGateway agentGateway, FieldMask updateMask) + *

            + *

            Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

            + *
              + *
            • updateAgentGatewayOperationCallable() + *

            • updateAgentGatewayCallable() + *

            + * + * + * + *

            DeleteAgentGateway + *

            Deletes a single AgentGateway. + * + *

            Request object method variants only take one parameter, a request object, which must be constructed before the call.

            + *
              + *
            • deleteAgentGatewayAsync(DeleteAgentGatewayRequest request) + *

            + *

            Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

            + *
              + *
            • deleteAgentGatewayAsync(AgentGatewayName name) + *

            • deleteAgentGatewayAsync(String name) + *

            + *

            Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

            + *
              + *
            • deleteAgentGatewayOperationCallable() + *

            • deleteAgentGatewayCallable() + *

            + * + * + * *

            ListLocations *

            Lists information about the supported locations for this service. * @@ -1444,7 +1542,7 @@ public final OperationsClient getHttpJsonOperationsClient() { * } * * @param parent Required. The project and location from which the EndpointPolicies should be - * listed, specified in the format `projects/*/locations/global`. + * listed, specified in the format `projects/*/locations/*`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListEndpointPoliciesPagedResponse listEndpointPolicies(LocationName parent) { @@ -1477,7 +1575,7 @@ public final ListEndpointPoliciesPagedResponse listEndpointPolicies(LocationName * } * * @param parent Required. The project and location from which the EndpointPolicies should be - * listed, specified in the format `projects/*/locations/global`. + * listed, specified in the format `projects/*/locations/*`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListEndpointPoliciesPagedResponse listEndpointPolicies(String parent) { @@ -1616,7 +1714,7 @@ public final ListEndpointPoliciesPagedResponse listEndpointPolicies( * } * * @param name Required. A name of the EndpointPolicy to get. Must be in the format - * `projects/*/locations/global/endpointPolicies/*`. + * `projects/*/locations/*/endpointPolicies/*`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final EndpointPolicy getEndpointPolicy(EndpointPolicyName name) { @@ -1647,7 +1745,7 @@ public final EndpointPolicy getEndpointPolicy(EndpointPolicyName name) { * } * * @param name Required. A name of the EndpointPolicy to get. Must be in the format - * `projects/*/locations/global/endpointPolicies/*`. + * `projects/*/locations/*/endpointPolicies/*`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final EndpointPolicy getEndpointPolicy(String name) { @@ -1737,7 +1835,7 @@ public final UnaryCallable getEndpoint * } * * @param parent Required. The parent resource of the EndpointPolicy. Must be in the format - * `projects/*/locations/global`. + * `projects/*/locations/*`. * @param endpointPolicy Required. EndpointPolicy resource to be created. * @param endpointPolicyId Required. Short name of the EndpointPolicy resource to be created. E.g. * "CustomECS". @@ -1778,7 +1876,7 @@ public final OperationFuture createEndpointPo * } * * @param parent Required. The parent resource of the EndpointPolicy. Must be in the format - * `projects/*/locations/global`. + * `projects/*/locations/*`. * @param endpointPolicy Required. EndpointPolicy resource to be created. * @param endpointPolicyId Required. Short name of the EndpointPolicy resource to be created. E.g. * "CustomECS". @@ -2035,7 +2133,7 @@ public final OperationFuture updateEndpointPo * } * * @param name Required. A name of the EndpointPolicy to delete. Must be in the format - * `projects/*/locations/global/endpointPolicies/*`. + * `projects/*/locations/*/endpointPolicies/*`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture deleteEndpointPolicyAsync( @@ -2067,7 +2165,7 @@ public final OperationFuture deleteEndpointPolicyAsync * } * * @param name Required. A name of the EndpointPolicy to delete. Must be in the format - * `projects/*/locations/global/endpointPolicies/*`. + * `projects/*/locations/*/endpointPolicies/*`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture deleteEndpointPolicyAsync(String name) { @@ -4246,7 +4344,7 @@ public final UnaryCallable deleteGatewayCallabl * } * * @param parent Required. The project and location from which the GrpcRoutes should be listed, - * specified in the format `projects/*/locations/global`. + * specified in the format `projects/*/locations/*`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListGrpcRoutesPagedResponse listGrpcRoutes(LocationName parent) { @@ -4278,7 +4376,7 @@ public final ListGrpcRoutesPagedResponse listGrpcRoutes(LocationName parent) { * } * * @param parent Required. The project and location from which the GrpcRoutes should be listed, - * specified in the format `projects/*/locations/global`. + * specified in the format `projects/*/locations/*`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListGrpcRoutesPagedResponse listGrpcRoutes(String parent) { @@ -4413,7 +4511,7 @@ public final ListGrpcRoutesPagedResponse listGrpcRoutes(ListGrpcRoutesRequest re * } * * @param name Required. A name of the GrpcRoute to get. Must be in the format - * `projects/*/locations/global/grpcRoutes/*`. + * `projects/*/locations/*/grpcRoutes/*`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final GrpcRoute getGrpcRoute(GrpcRouteName name) { @@ -4441,7 +4539,7 @@ public final GrpcRoute getGrpcRoute(GrpcRouteName name) { * } * * @param name Required. A name of the GrpcRoute to get. Must be in the format - * `projects/*/locations/global/grpcRoutes/*`. + * `projects/*/locations/*/grpcRoutes/*`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final GrpcRoute getGrpcRoute(String name) { @@ -4527,7 +4625,7 @@ public final UnaryCallable getGrpcRouteCallable( * } * * @param parent Required. The parent resource of the GrpcRoute. Must be in the format - * `projects/*/locations/global`. + * `projects/*/locations/*`. * @param grpcRoute Required. GrpcRoute resource to be created. * @param grpcRouteId Required. Short name of the GrpcRoute resource to be created. * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -4565,7 +4663,7 @@ public final OperationFuture createGrpcRouteAsync( * } * * @param parent Required. The parent resource of the GrpcRoute. Must be in the format - * `projects/*/locations/global`. + * `projects/*/locations/*`. * @param grpcRoute Required. GrpcRoute resource to be created. * @param grpcRouteId Required. Short name of the GrpcRoute resource to be created. * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -4817,7 +4915,7 @@ public final UnaryCallable updateGrpcRouteCal * } * * @param name Required. A name of the GrpcRoute to delete. Must be in the format - * `projects/*/locations/global/grpcRoutes/*`. + * `projects/*/locations/*/grpcRoutes/*`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture deleteGrpcRouteAsync(GrpcRouteName name) { @@ -4845,7 +4943,7 @@ public final OperationFuture deleteGrpcRouteAsync(Grpc * } * * @param name Required. A name of the GrpcRoute to delete. Must be in the format - * `projects/*/locations/global/grpcRoutes/*`. + * `projects/*/locations/*/grpcRoutes/*`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture deleteGrpcRouteAsync(String name) { @@ -4960,7 +5058,7 @@ public final UnaryCallable deleteGrpcRouteCal * } * * @param parent Required. The project and location from which the HttpRoutes should be listed, - * specified in the format `projects/*/locations/global`. + * specified in the format `projects/*/locations/*`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListHttpRoutesPagedResponse listHttpRoutes(LocationName parent) { @@ -4992,7 +5090,7 @@ public final ListHttpRoutesPagedResponse listHttpRoutes(LocationName parent) { * } * * @param parent Required. The project and location from which the HttpRoutes should be listed, - * specified in the format `projects/*/locations/global`. + * specified in the format `projects/*/locations/*`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListHttpRoutesPagedResponse listHttpRoutes(String parent) { @@ -5019,6 +5117,7 @@ public final ListHttpRoutesPagedResponse listHttpRoutes(String parent) { * .setPageSize(883849137) * .setPageToken("pageToken873572522") * .setReturnPartialSuccess(true) + * .setFilter("filter-1274492040") * .build(); * for (HttpRoute element : networkServicesClient.listHttpRoutes(request).iterateAll()) { * // doThingsWith(element); @@ -5052,6 +5151,7 @@ public final ListHttpRoutesPagedResponse listHttpRoutes(ListHttpRoutesRequest re * .setPageSize(883849137) * .setPageToken("pageToken873572522") * .setReturnPartialSuccess(true) + * .setFilter("filter-1274492040") * .build(); * ApiFuture future = * networkServicesClient.listHttpRoutesPagedCallable().futureCall(request); @@ -5086,6 +5186,7 @@ public final ListHttpRoutesPagedResponse listHttpRoutes(ListHttpRoutesRequest re * .setPageSize(883849137) * .setPageToken("pageToken873572522") * .setReturnPartialSuccess(true) + * .setFilter("filter-1274492040") * .build(); * while (true) { * ListHttpRoutesResponse response = @@ -5127,7 +5228,7 @@ public final ListHttpRoutesPagedResponse listHttpRoutes(ListHttpRoutesRequest re * } * * @param name Required. A name of the HttpRoute to get. Must be in the format - * `projects/*/locations/global/httpRoutes/*`. + * `projects/*/locations/*/httpRoutes/*`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final HttpRoute getHttpRoute(HttpRouteName name) { @@ -5155,7 +5256,7 @@ public final HttpRoute getHttpRoute(HttpRouteName name) { * } * * @param name Required. A name of the HttpRoute to get. Must be in the format - * `projects/*/locations/global/httpRoutes/*`. + * `projects/*/locations/*/httpRoutes/*`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final HttpRoute getHttpRoute(String name) { @@ -5241,7 +5342,7 @@ public final UnaryCallable getHttpRouteCallable( * } * * @param parent Required. The parent resource of the HttpRoute. Must be in the format - * `projects/*/locations/global`. + * `projects/*/locations/*`. * @param httpRoute Required. HttpRoute resource to be created. * @param httpRouteId Required. Short name of the HttpRoute resource to be created. * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -5279,7 +5380,7 @@ public final OperationFuture createHttpRouteAsync( * } * * @param parent Required. The parent resource of the HttpRoute. Must be in the format - * `projects/*/locations/global`. + * `projects/*/locations/*`. * @param httpRoute Required. HttpRoute resource to be created. * @param httpRouteId Required. Short name of the HttpRoute resource to be created. * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -5313,6 +5414,7 @@ public final OperationFuture createHttpRouteAsync( * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) * .setHttpRouteId("httpRouteId-2054835300") * .setHttpRoute(HttpRoute.newBuilder().build()) + * .setRequestId("requestId693933066") * .build(); * HttpRoute response = networkServicesClient.createHttpRouteAsync(request).get(); * } @@ -5344,6 +5446,7 @@ public final OperationFuture createHttpRouteAsync( * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) * .setHttpRouteId("httpRouteId-2054835300") * .setHttpRoute(HttpRoute.newBuilder().build()) + * .setRequestId("requestId693933066") * .build(); * OperationFuture future = * networkServicesClient.createHttpRouteOperationCallable().futureCall(request); @@ -5375,6 +5478,7 @@ public final OperationFuture createHttpRouteAsync( * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) * .setHttpRouteId("httpRouteId-2054835300") * .setHttpRoute(HttpRoute.newBuilder().build()) + * .setRequestId("requestId693933066") * .build(); * ApiFuture future = * networkServicesClient.createHttpRouteCallable().futureCall(request); @@ -5531,7 +5635,7 @@ public final UnaryCallable updateHttpRouteCal * } * * @param name Required. A name of the HttpRoute to delete. Must be in the format - * `projects/*/locations/global/httpRoutes/*`. + * `projects/*/locations/*/httpRoutes/*`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture deleteHttpRouteAsync(HttpRouteName name) { @@ -5559,7 +5663,7 @@ public final OperationFuture deleteHttpRouteAsync(Http * } * * @param name Required. A name of the HttpRoute to delete. Must be in the format - * `projects/*/locations/global/httpRoutes/*`. + * `projects/*/locations/*/httpRoutes/*`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture deleteHttpRouteAsync(String name) { @@ -5674,7 +5778,7 @@ public final UnaryCallable deleteHttpRouteCal * } * * @param parent Required. The project and location from which the TcpRoutes should be listed, - * specified in the format `projects/*/locations/global`. + * specified in the format `projects/*/locations/*`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListTcpRoutesPagedResponse listTcpRoutes(LocationName parent) { @@ -5706,7 +5810,7 @@ public final ListTcpRoutesPagedResponse listTcpRoutes(LocationName parent) { * } * * @param parent Required. The project and location from which the TcpRoutes should be listed, - * specified in the format `projects/*/locations/global`. + * specified in the format `projects/*/locations/*`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListTcpRoutesPagedResponse listTcpRoutes(String parent) { @@ -5840,7 +5944,7 @@ public final UnaryCallable listTcpR * } * * @param name Required. A name of the TcpRoute to get. Must be in the format - * `projects/*/locations/global/tcpRoutes/*`. + * `projects/*/locations/*/tcpRoutes/*`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final TcpRoute getTcpRoute(TcpRouteName name) { @@ -5868,7 +5972,7 @@ public final TcpRoute getTcpRoute(TcpRouteName name) { * } * * @param name Required. A name of the TcpRoute to get. Must be in the format - * `projects/*/locations/global/tcpRoutes/*`. + * `projects/*/locations/*/tcpRoutes/*`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final TcpRoute getTcpRoute(String name) { @@ -5953,7 +6057,7 @@ public final UnaryCallable getTcpRouteCallable() { * } * * @param parent Required. The parent resource of the TcpRoute. Must be in the format - * `projects/*/locations/global`. + * `projects/*/locations/*`. * @param tcpRoute Required. TcpRoute resource to be created. * @param tcpRouteId Required. Short name of the TcpRoute resource to be created. * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -5991,7 +6095,7 @@ public final OperationFuture createTcpRouteAsync( * } * * @param parent Required. The parent resource of the TcpRoute. Must be in the format - * `projects/*/locations/global`. + * `projects/*/locations/*`. * @param tcpRoute Required. TcpRoute resource to be created. * @param tcpRouteId Required. Short name of the TcpRoute resource to be created. * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -6240,7 +6344,7 @@ public final UnaryCallable updateTcpRouteCalla * } * * @param name Required. A name of the TcpRoute to delete. Must be in the format - * `projects/*/locations/global/tcpRoutes/*`. + * `projects/*/locations/*/tcpRoutes/*`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture deleteTcpRouteAsync(TcpRouteName name) { @@ -6268,7 +6372,7 @@ public final OperationFuture deleteTcpRouteAsync(TcpRo * } * * @param name Required. A name of the TcpRoute to delete. Must be in the format - * `projects/*/locations/global/tcpRoutes/*`. + * `projects/*/locations/*/tcpRoutes/*`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture deleteTcpRouteAsync(String name) { @@ -6383,7 +6487,7 @@ public final UnaryCallable deleteTcpRouteCalla * } * * @param parent Required. The project and location from which the TlsRoutes should be listed, - * specified in the format `projects/*/locations/global`. + * specified in the format `projects/*/locations/*`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListTlsRoutesPagedResponse listTlsRoutes(LocationName parent) { @@ -6415,7 +6519,7 @@ public final ListTlsRoutesPagedResponse listTlsRoutes(LocationName parent) { * } * * @param parent Required. The project and location from which the TlsRoutes should be listed, - * specified in the format `projects/*/locations/global`. + * specified in the format `projects/*/locations/*`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListTlsRoutesPagedResponse listTlsRoutes(String parent) { @@ -6549,7 +6653,7 @@ public final UnaryCallable listTlsR * } * * @param name Required. A name of the TlsRoute to get. Must be in the format - * `projects/*/locations/global/tlsRoutes/*`. + * `projects/*/locations/*/tlsRoutes/*`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final TlsRoute getTlsRoute(TlsRouteName name) { @@ -6577,7 +6681,7 @@ public final TlsRoute getTlsRoute(TlsRouteName name) { * } * * @param name Required. A name of the TlsRoute to get. Must be in the format - * `projects/*/locations/global/tlsRoutes/*`. + * `projects/*/locations/*/tlsRoutes/*`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final TlsRoute getTlsRoute(String name) { @@ -6662,7 +6766,7 @@ public final UnaryCallable getTlsRouteCallable() { * } * * @param parent Required. The parent resource of the TlsRoute. Must be in the format - * `projects/*/locations/global`. + * `projects/*/locations/*`. * @param tlsRoute Required. TlsRoute resource to be created. * @param tlsRouteId Required. Short name of the TlsRoute resource to be created. * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -6700,7 +6804,7 @@ public final OperationFuture createTlsRouteAsync( * } * * @param parent Required. The parent resource of the TlsRoute. Must be in the format - * `projects/*/locations/global`. + * `projects/*/locations/*`. * @param tlsRoute Required. TlsRoute resource to be created. * @param tlsRouteId Required. Short name of the TlsRoute resource to be created. * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -6949,7 +7053,7 @@ public final UnaryCallable updateTlsRouteCalla * } * * @param name Required. A name of the TlsRoute to delete. Must be in the format - * `projects/*/locations/global/tlsRoutes/*`. + * `projects/*/locations/*/tlsRoutes/*`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture deleteTlsRouteAsync(TlsRouteName name) { @@ -6977,7 +7081,7 @@ public final OperationFuture deleteTlsRouteAsync(TlsRo * } * * @param name Required. A name of the TlsRoute to delete. Must be in the format - * `projects/*/locations/global/tlsRoutes/*`. + * `projects/*/locations/*/tlsRoutes/*`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture deleteTlsRouteAsync(String name) { @@ -7831,7 +7935,7 @@ public final OperationFuture deleteServiceBindingAsync * } * * @param parent Required. The project and location from which the Meshes should be listed, - * specified in the format `projects/*/locations/global`. + * specified in the format `projects/*/locations/*`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListMeshesPagedResponse listMeshes(LocationName parent) { @@ -7861,7 +7965,7 @@ public final ListMeshesPagedResponse listMeshes(LocationName parent) { * } * * @param parent Required. The project and location from which the Meshes should be listed, - * specified in the format `projects/*/locations/global`. + * specified in the format `projects/*/locations/*`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListMeshesPagedResponse listMeshes(String parent) { @@ -7992,7 +8096,7 @@ public final UnaryCallable listMeshesCall * } * * @param name Required. A name of the Mesh to get. Must be in the format - * `projects/*/locations/global/meshes/*`. + * `projects/*/locations/*/meshes/*`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Mesh getMesh(MeshName name) { @@ -8020,7 +8124,7 @@ public final Mesh getMesh(MeshName name) { * } * * @param name Required. A name of the Mesh to get. Must be in the format - * `projects/*/locations/global/meshes/*`. + * `projects/*/locations/*/meshes/*`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Mesh getMesh(String name) { @@ -8104,7 +8208,7 @@ public final UnaryCallable getMeshCallable() { * } * * @param parent Required. The parent resource of the Mesh. Must be in the format - * `projects/*/locations/global`. + * `projects/*/locations/*`. * @param mesh Required. Mesh resource to be created. * @param meshId Required. Short name of the Mesh resource to be created. * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -8141,7 +8245,7 @@ public final OperationFuture createMeshAsync( * } * * @param parent Required. The parent resource of the Mesh. Must be in the format - * `projects/*/locations/global`. + * `projects/*/locations/*`. * @param mesh Required. Mesh resource to be created. * @param meshId Required. Short name of the Mesh resource to be created. * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -8382,7 +8486,7 @@ public final UnaryCallable updateMeshCallable() { * } * * @param name Required. A name of the Mesh to delete. Must be in the format - * `projects/*/locations/global/meshes/*`. + * `projects/*/locations/*/meshes/*`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture deleteMeshAsync(MeshName name) { @@ -8410,7 +8514,7 @@ public final OperationFuture deleteMeshAsync(MeshName * } * * @param name Required. A name of the Mesh to delete. Must be in the format - * `projects/*/locations/global/meshes/*`. + * `projects/*/locations/*/meshes/*`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final OperationFuture deleteMeshAsync(String name) { @@ -9835,7 +9939,7 @@ public final ListMeshRouteViewsPagedResponse listMeshRouteViews( // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Lists information about the supported locations for this service. + * Lists AgentGateways in a given project and location. * *

            Sample code: * @@ -9846,14 +9950,76 @@ public final ListMeshRouteViewsPagedResponse listMeshRouteViews( * // - 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 (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { - * ListLocationsRequest request = - * ListLocationsRequest.newBuilder() - * .setName("name3373707") - * .setFilter("filter-1274492040") + * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + * for (AgentGateway element : networkServicesClient.listAgentGateways(parent).iterateAll()) { + * // doThingsWith(element); + * } + * } + * } + * + * @param parent Required. The project and location from which the AgentGateways should be listed, + * specified in the format `projects/*/locations/*`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListAgentGatewaysPagedResponse listAgentGateways(LocationName parent) { + ListAgentGatewaysRequest request = + ListAgentGatewaysRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listAgentGateways(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists AgentGateways in a given project and location. + * + *

            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 (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
            +   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
            +   *   for (AgentGateway element : networkServicesClient.listAgentGateways(parent).iterateAll()) {
            +   *     // doThingsWith(element);
            +   *   }
            +   * }
            +   * }
            + * + * @param parent Required. The project and location from which the AgentGateways should be listed, + * specified in the format `projects/*/locations/*`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListAgentGatewaysPagedResponse listAgentGateways(String parent) { + ListAgentGatewaysRequest request = + ListAgentGatewaysRequest.newBuilder().setParent(parent).build(); + return listAgentGateways(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists AgentGateways in a given project and location. + * + *

            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 (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
            +   *   ListAgentGatewaysRequest request =
            +   *       ListAgentGatewaysRequest.newBuilder()
            +   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                *           .setPageSize(883849137)
                *           .setPageToken("pageToken873572522")
            +   *           .setReturnPartialSuccess(true)
                *           .build();
            -   *   for (Location element : networkServicesClient.listLocations(request).iterateAll()) {
            +   *   for (AgentGateway element : networkServicesClient.listAgentGateways(request).iterateAll()) {
                *     // doThingsWith(element);
                *   }
                * }
            @@ -9862,13 +10028,13 @@ public final ListMeshRouteViewsPagedResponse listMeshRouteViews(
                * @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 ListLocationsPagedResponse listLocations(ListLocationsRequest request) {
            -    return listLocationsPagedCallable().call(request);
            +  public final ListAgentGatewaysPagedResponse listAgentGateways(ListAgentGatewaysRequest request) {
            +    return listAgentGatewaysPagedCallable().call(request);
               }
             
               // AUTO-GENERATED DOCUMENTATION AND METHOD.
               /**
            -   * Lists information about the supported locations for this service.
            +   * Lists AgentGateways in a given project and location.
                *
                * 

            Sample code: * @@ -9879,30 +10045,30 @@ public final ListLocationsPagedResponse listLocations(ListLocationsRequest reque * // - 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 (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { - * ListLocationsRequest request = - * ListLocationsRequest.newBuilder() - * .setName("name3373707") - * .setFilter("filter-1274492040") + * ListAgentGatewaysRequest request = + * ListAgentGatewaysRequest.newBuilder() + * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) * .setPageSize(883849137) * .setPageToken("pageToken873572522") + * .setReturnPartialSuccess(true) * .build(); - * ApiFuture future = - * networkServicesClient.listLocationsPagedCallable().futureCall(request); + * ApiFuture future = + * networkServicesClient.listAgentGatewaysPagedCallable().futureCall(request); * // Do something. - * for (Location element : future.get().iterateAll()) { + * for (AgentGateway element : future.get().iterateAll()) { * // doThingsWith(element); * } * } * }

            */ - public final UnaryCallable - listLocationsPagedCallable() { - return stub.listLocationsPagedCallable(); + public final UnaryCallable + listAgentGatewaysPagedCallable() { + return stub.listAgentGatewaysPagedCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Lists information about the supported locations for this service. + * Lists AgentGateways in a given project and location. * *

            Sample code: * @@ -9913,17 +10079,17 @@ public final ListLocationsPagedResponse listLocations(ListLocationsRequest reque * // - 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 (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { - * ListLocationsRequest request = - * ListLocationsRequest.newBuilder() - * .setName("name3373707") - * .setFilter("filter-1274492040") + * ListAgentGatewaysRequest request = + * ListAgentGatewaysRequest.newBuilder() + * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) * .setPageSize(883849137) * .setPageToken("pageToken873572522") + * .setReturnPartialSuccess(true) * .build(); * while (true) { - * ListLocationsResponse response = - * networkServicesClient.listLocationsCallable().call(request); - * for (Location element : response.getLocationsList()) { + * ListAgentGatewaysResponse response = + * networkServicesClient.listAgentGatewaysCallable().call(request); + * for (AgentGateway element : response.getAgentGatewaysList()) { * // doThingsWith(element); * } * String nextPageToken = response.getNextPageToken(); @@ -9936,13 +10102,14 @@ public final ListLocationsPagedResponse listLocations(ListLocationsRequest reque * } * } */ - public final UnaryCallable listLocationsCallable() { - return stub.listLocationsCallable(); + public final UnaryCallable + listAgentGatewaysCallable() { + return stub.listAgentGatewaysCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Gets information about a location. + * Gets details of a single AgentGateway. * *

            Sample code: * @@ -9953,21 +10120,24 @@ public final UnaryCallable listLoca * // - 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 (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { - * GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); - * Location response = networkServicesClient.getLocation(request); + * AgentGatewayName name = AgentGatewayName.of("[PROJECT]", "[LOCATION]", "[AGENT_GATEWAY]"); + * AgentGateway response = networkServicesClient.getAgentGateway(name); * } * } * - * @param request The request object containing all of the parameters for the API call. + * @param name Required. A name of the AgentGateway to get. Must be in the format + * `projects/*/locations/*/agentGateways/*`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final Location getLocation(GetLocationRequest request) { - return getLocationCallable().call(request); + public final AgentGateway getAgentGateway(AgentGatewayName name) { + GetAgentGatewayRequest request = + GetAgentGatewayRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getAgentGateway(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Gets information about a location. + * Gets details of a single AgentGateway. * *

            Sample code: * @@ -9978,22 +10148,23 @@ public final Location getLocation(GetLocationRequest request) { * // - 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 (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { - * GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); - * ApiFuture future = networkServicesClient.getLocationCallable().futureCall(request); - * // Do something. - * Location response = future.get(); + * String name = AgentGatewayName.of("[PROJECT]", "[LOCATION]", "[AGENT_GATEWAY]").toString(); + * AgentGateway response = networkServicesClient.getAgentGateway(name); * } * } + * + * @param name Required. A name of the AgentGateway to get. Must be in the format + * `projects/*/locations/*/agentGateways/*`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final UnaryCallable getLocationCallable() { - return stub.getLocationCallable(); + public final AgentGateway getAgentGateway(String name) { + GetAgentGatewayRequest request = GetAgentGatewayRequest.newBuilder().setName(name).build(); + return getAgentGateway(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Sets the access control policy on the specified resource. Replacesany existing policy. - * - *

            Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`errors. + * Gets details of a single AgentGateway. * *

            Sample code: * @@ -10004,29 +10175,24 @@ public final UnaryCallable getLocationCallable() { * // - 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 (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { - * SetIamPolicyRequest request = - * SetIamPolicyRequest.newBuilder() - * .setResource( - * EndpointPolicyName.of("[PROJECT]", "[LOCATION]", "[ENDPOINT_POLICY]").toString()) - * .setPolicy(Policy.newBuilder().build()) - * .setUpdateMask(FieldMask.newBuilder().build()) + * GetAgentGatewayRequest request = + * GetAgentGatewayRequest.newBuilder() + * .setName(AgentGatewayName.of("[PROJECT]", "[LOCATION]", "[AGENT_GATEWAY]").toString()) * .build(); - * Policy response = networkServicesClient.setIamPolicy(request); + * AgentGateway response = networkServicesClient.getAgentGateway(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 Policy setIamPolicy(SetIamPolicyRequest request) { - return setIamPolicyCallable().call(request); + public final AgentGateway getAgentGateway(GetAgentGatewayRequest request) { + return getAgentGatewayCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Sets the access control policy on the specified resource. Replacesany existing policy. - * - *

            Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`errors. + * Gets details of a single AgentGateway. * *

            Sample code: * @@ -10037,27 +10203,24 @@ public final Policy setIamPolicy(SetIamPolicyRequest request) { * // - 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 (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { - * SetIamPolicyRequest request = - * SetIamPolicyRequest.newBuilder() - * .setResource( - * EndpointPolicyName.of("[PROJECT]", "[LOCATION]", "[ENDPOINT_POLICY]").toString()) - * .setPolicy(Policy.newBuilder().build()) - * .setUpdateMask(FieldMask.newBuilder().build()) + * GetAgentGatewayRequest request = + * GetAgentGatewayRequest.newBuilder() + * .setName(AgentGatewayName.of("[PROJECT]", "[LOCATION]", "[AGENT_GATEWAY]").toString()) * .build(); - * ApiFuture future = networkServicesClient.setIamPolicyCallable().futureCall(request); + * ApiFuture future = + * networkServicesClient.getAgentGatewayCallable().futureCall(request); * // Do something. - * Policy response = future.get(); + * AgentGateway response = future.get(); * } * } */ - public final UnaryCallable setIamPolicyCallable() { - return stub.setIamPolicyCallable(); + public final UnaryCallable getAgentGatewayCallable() { + return stub.getAgentGatewayCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Gets the access control policy for a resource. Returns an empty policyif the resource exists - * and does not have a policy set. + * Creates a new AgentGateway in a given project and location. * *

            Sample code: * @@ -10068,27 +10231,34 @@ public final UnaryCallable setIamPolicyCallable() { * // - 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 (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { - * GetIamPolicyRequest request = - * GetIamPolicyRequest.newBuilder() - * .setResource( - * EndpointPolicyName.of("[PROJECT]", "[LOCATION]", "[ENDPOINT_POLICY]").toString()) - * .setOptions(GetPolicyOptions.newBuilder().build()) - * .build(); - * Policy response = networkServicesClient.getIamPolicy(request); + * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + * AgentGateway agentGateway = AgentGateway.newBuilder().build(); + * String agentGatewayId = "agentGatewayId1729577210"; + * AgentGateway response = + * networkServicesClient.createAgentGatewayAsync(parent, agentGateway, agentGatewayId).get(); * } * } * - * @param request The request object containing all of the parameters for the API call. + * @param parent Required. The parent resource of the AgentGateway. Must be in the format + * `projects/*/locations/*`. + * @param agentGateway Required. AgentGateway resource to be created. + * @param agentGatewayId Required. Short name of the AgentGateway resource to be created. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final Policy getIamPolicy(GetIamPolicyRequest request) { - return getIamPolicyCallable().call(request); + public final OperationFuture createAgentGatewayAsync( + LocationName parent, AgentGateway agentGateway, String agentGatewayId) { + CreateAgentGatewayRequest request = + CreateAgentGatewayRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setAgentGateway(agentGateway) + .setAgentGatewayId(agentGatewayId) + .build(); + return createAgentGatewayAsync(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Gets the access control policy for a resource. Returns an empty policyif the resource exists - * and does not have a policy set. + * Creates a new AgentGateway in a given project and location. * *

            Sample code: * @@ -10099,30 +10269,687 @@ public final Policy getIamPolicy(GetIamPolicyRequest request) { * // - 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 (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { - * GetIamPolicyRequest request = - * GetIamPolicyRequest.newBuilder() - * .setResource( - * EndpointPolicyName.of("[PROJECT]", "[LOCATION]", "[ENDPOINT_POLICY]").toString()) - * .setOptions(GetPolicyOptions.newBuilder().build()) - * .build(); - * ApiFuture future = networkServicesClient.getIamPolicyCallable().futureCall(request); - * // Do something. - * Policy response = future.get(); + * String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); + * AgentGateway agentGateway = AgentGateway.newBuilder().build(); + * String agentGatewayId = "agentGatewayId1729577210"; + * AgentGateway response = + * networkServicesClient.createAgentGatewayAsync(parent, agentGateway, agentGatewayId).get(); * } * } + * + * @param parent Required. The parent resource of the AgentGateway. Must be in the format + * `projects/*/locations/*`. + * @param agentGateway Required. AgentGateway resource to be created. + * @param agentGatewayId Required. Short name of the AgentGateway resource to be created. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final UnaryCallable getIamPolicyCallable() { - return stub.getIamPolicyCallable(); + public final OperationFuture createAgentGatewayAsync( + String parent, AgentGateway agentGateway, String agentGatewayId) { + CreateAgentGatewayRequest request = + CreateAgentGatewayRequest.newBuilder() + .setParent(parent) + .setAgentGateway(agentGateway) + .setAgentGatewayId(agentGatewayId) + .build(); + return createAgentGatewayAsync(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Returns permissions that a caller has on the specified resource. If theresource does not exist, - * this will return an empty set ofpermissions, not a `NOT_FOUND` error. - * - *

            Note: This operation is designed to be used for buildingpermission-aware UIs and - * command-line tools, not for authorizationchecking. This operation may "fail open" without - * warning. + * Creates a new AgentGateway in a given project and location. + * + *

            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 (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
            +   *   CreateAgentGatewayRequest request =
            +   *       CreateAgentGatewayRequest.newBuilder()
            +   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
            +   *           .setAgentGatewayId("agentGatewayId1729577210")
            +   *           .setAgentGateway(AgentGateway.newBuilder().build())
            +   *           .build();
            +   *   AgentGateway response = networkServicesClient.createAgentGatewayAsync(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 createAgentGatewayAsync( + CreateAgentGatewayRequest request) { + return createAgentGatewayOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new AgentGateway in a given project and location. + * + *

            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 (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
            +   *   CreateAgentGatewayRequest request =
            +   *       CreateAgentGatewayRequest.newBuilder()
            +   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
            +   *           .setAgentGatewayId("agentGatewayId1729577210")
            +   *           .setAgentGateway(AgentGateway.newBuilder().build())
            +   *           .build();
            +   *   OperationFuture future =
            +   *       networkServicesClient.createAgentGatewayOperationCallable().futureCall(request);
            +   *   // Do something.
            +   *   AgentGateway response = future.get();
            +   * }
            +   * }
            + */ + public final OperationCallable + createAgentGatewayOperationCallable() { + return stub.createAgentGatewayOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new AgentGateway in a given project and location. + * + *

            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 (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
            +   *   CreateAgentGatewayRequest request =
            +   *       CreateAgentGatewayRequest.newBuilder()
            +   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
            +   *           .setAgentGatewayId("agentGatewayId1729577210")
            +   *           .setAgentGateway(AgentGateway.newBuilder().build())
            +   *           .build();
            +   *   ApiFuture future =
            +   *       networkServicesClient.createAgentGatewayCallable().futureCall(request);
            +   *   // Do something.
            +   *   Operation response = future.get();
            +   * }
            +   * }
            + */ + public final UnaryCallable createAgentGatewayCallable() { + return stub.createAgentGatewayCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the parameters of a single AgentGateway. + * + *

            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 (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
            +   *   AgentGateway agentGateway = AgentGateway.newBuilder().build();
            +   *   FieldMask updateMask = FieldMask.newBuilder().build();
            +   *   AgentGateway response =
            +   *       networkServicesClient.updateAgentGatewayAsync(agentGateway, updateMask).get();
            +   * }
            +   * }
            + * + * @param agentGateway Required. Updated AgentGateway resource. + * @param updateMask Optional. Field mask is used to specify the fields to be overwritten in the + * AgentGateway resource by the update. The fields specified in the update_mask are relative + * to the resource, not the full request. A field will be overwritten if it is in the mask. If + * the user does not provide a mask then all fields will be overwritten. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture updateAgentGatewayAsync( + AgentGateway agentGateway, FieldMask updateMask) { + UpdateAgentGatewayRequest request = + UpdateAgentGatewayRequest.newBuilder() + .setAgentGateway(agentGateway) + .setUpdateMask(updateMask) + .build(); + return updateAgentGatewayAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the parameters of a single AgentGateway. + * + *

            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 (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
            +   *   UpdateAgentGatewayRequest request =
            +   *       UpdateAgentGatewayRequest.newBuilder()
            +   *           .setUpdateMask(FieldMask.newBuilder().build())
            +   *           .setAgentGateway(AgentGateway.newBuilder().build())
            +   *           .build();
            +   *   AgentGateway response = networkServicesClient.updateAgentGatewayAsync(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 updateAgentGatewayAsync( + UpdateAgentGatewayRequest request) { + return updateAgentGatewayOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the parameters of a single AgentGateway. + * + *

            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 (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
            +   *   UpdateAgentGatewayRequest request =
            +   *       UpdateAgentGatewayRequest.newBuilder()
            +   *           .setUpdateMask(FieldMask.newBuilder().build())
            +   *           .setAgentGateway(AgentGateway.newBuilder().build())
            +   *           .build();
            +   *   OperationFuture future =
            +   *       networkServicesClient.updateAgentGatewayOperationCallable().futureCall(request);
            +   *   // Do something.
            +   *   AgentGateway response = future.get();
            +   * }
            +   * }
            + */ + public final OperationCallable + updateAgentGatewayOperationCallable() { + return stub.updateAgentGatewayOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the parameters of a single AgentGateway. + * + *

            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 (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
            +   *   UpdateAgentGatewayRequest request =
            +   *       UpdateAgentGatewayRequest.newBuilder()
            +   *           .setUpdateMask(FieldMask.newBuilder().build())
            +   *           .setAgentGateway(AgentGateway.newBuilder().build())
            +   *           .build();
            +   *   ApiFuture future =
            +   *       networkServicesClient.updateAgentGatewayCallable().futureCall(request);
            +   *   // Do something.
            +   *   Operation response = future.get();
            +   * }
            +   * }
            + */ + public final UnaryCallable updateAgentGatewayCallable() { + return stub.updateAgentGatewayCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single AgentGateway. + * + *

            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 (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
            +   *   AgentGatewayName name = AgentGatewayName.of("[PROJECT]", "[LOCATION]", "[AGENT_GATEWAY]");
            +   *   networkServicesClient.deleteAgentGatewayAsync(name).get();
            +   * }
            +   * }
            + * + * @param name Required. A name of the AgentGateway to delete. Must be in the format + * `projects/*/locations/*/agentGateways/*`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteAgentGatewayAsync( + AgentGatewayName name) { + DeleteAgentGatewayRequest request = + DeleteAgentGatewayRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return deleteAgentGatewayAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single AgentGateway. + * + *

            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 (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
            +   *   String name = AgentGatewayName.of("[PROJECT]", "[LOCATION]", "[AGENT_GATEWAY]").toString();
            +   *   networkServicesClient.deleteAgentGatewayAsync(name).get();
            +   * }
            +   * }
            + * + * @param name Required. A name of the AgentGateway to delete. Must be in the format + * `projects/*/locations/*/agentGateways/*`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteAgentGatewayAsync(String name) { + DeleteAgentGatewayRequest request = + DeleteAgentGatewayRequest.newBuilder().setName(name).build(); + return deleteAgentGatewayAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single AgentGateway. + * + *

            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 (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
            +   *   DeleteAgentGatewayRequest request =
            +   *       DeleteAgentGatewayRequest.newBuilder()
            +   *           .setName(AgentGatewayName.of("[PROJECT]", "[LOCATION]", "[AGENT_GATEWAY]").toString())
            +   *           .setEtag("etag3123477")
            +   *           .build();
            +   *   networkServicesClient.deleteAgentGatewayAsync(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 deleteAgentGatewayAsync( + DeleteAgentGatewayRequest request) { + return deleteAgentGatewayOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single AgentGateway. + * + *

            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 (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
            +   *   DeleteAgentGatewayRequest request =
            +   *       DeleteAgentGatewayRequest.newBuilder()
            +   *           .setName(AgentGatewayName.of("[PROJECT]", "[LOCATION]", "[AGENT_GATEWAY]").toString())
            +   *           .setEtag("etag3123477")
            +   *           .build();
            +   *   OperationFuture future =
            +   *       networkServicesClient.deleteAgentGatewayOperationCallable().futureCall(request);
            +   *   // Do something.
            +   *   future.get();
            +   * }
            +   * }
            + */ + public final OperationCallable + deleteAgentGatewayOperationCallable() { + return stub.deleteAgentGatewayOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a single AgentGateway. + * + *

            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 (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
            +   *   DeleteAgentGatewayRequest request =
            +   *       DeleteAgentGatewayRequest.newBuilder()
            +   *           .setName(AgentGatewayName.of("[PROJECT]", "[LOCATION]", "[AGENT_GATEWAY]").toString())
            +   *           .setEtag("etag3123477")
            +   *           .build();
            +   *   ApiFuture future =
            +   *       networkServicesClient.deleteAgentGatewayCallable().futureCall(request);
            +   *   // Do something.
            +   *   future.get();
            +   * }
            +   * }
            + */ + public final UnaryCallable deleteAgentGatewayCallable() { + return stub.deleteAgentGatewayCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists information about the supported locations for this service. + * + *

            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 (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
            +   *   ListLocationsRequest request =
            +   *       ListLocationsRequest.newBuilder()
            +   *           .setName("name3373707")
            +   *           .setFilter("filter-1274492040")
            +   *           .setPageSize(883849137)
            +   *           .setPageToken("pageToken873572522")
            +   *           .build();
            +   *   for (Location element : networkServicesClient.listLocations(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 ListLocationsPagedResponse listLocations(ListLocationsRequest request) { + return listLocationsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists information about the supported locations for this service. + * + *

            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 (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
            +   *   ListLocationsRequest request =
            +   *       ListLocationsRequest.newBuilder()
            +   *           .setName("name3373707")
            +   *           .setFilter("filter-1274492040")
            +   *           .setPageSize(883849137)
            +   *           .setPageToken("pageToken873572522")
            +   *           .build();
            +   *   ApiFuture future =
            +   *       networkServicesClient.listLocationsPagedCallable().futureCall(request);
            +   *   // Do something.
            +   *   for (Location element : future.get().iterateAll()) {
            +   *     // doThingsWith(element);
            +   *   }
            +   * }
            +   * }
            + */ + public final UnaryCallable + listLocationsPagedCallable() { + return stub.listLocationsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists information about the supported locations for this service. + * + *

            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 (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
            +   *   ListLocationsRequest request =
            +   *       ListLocationsRequest.newBuilder()
            +   *           .setName("name3373707")
            +   *           .setFilter("filter-1274492040")
            +   *           .setPageSize(883849137)
            +   *           .setPageToken("pageToken873572522")
            +   *           .build();
            +   *   while (true) {
            +   *     ListLocationsResponse response =
            +   *         networkServicesClient.listLocationsCallable().call(request);
            +   *     for (Location element : response.getLocationsList()) {
            +   *       // doThingsWith(element);
            +   *     }
            +   *     String nextPageToken = response.getNextPageToken();
            +   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
            +   *       request = request.toBuilder().setPageToken(nextPageToken).build();
            +   *     } else {
            +   *       break;
            +   *     }
            +   *   }
            +   * }
            +   * }
            + */ + public final UnaryCallable listLocationsCallable() { + return stub.listLocationsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets information about a location. + * + *

            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 (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
            +   *   GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
            +   *   Location response = networkServicesClient.getLocation(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 Location getLocation(GetLocationRequest request) { + return getLocationCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets information about a location. + * + *

            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 (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
            +   *   GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
            +   *   ApiFuture future = networkServicesClient.getLocationCallable().futureCall(request);
            +   *   // Do something.
            +   *   Location response = future.get();
            +   * }
            +   * }
            + */ + public final UnaryCallable getLocationCallable() { + return stub.getLocationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Sets the access control policy on the specified resource. Replacesany existing policy. + * + *

            Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`errors. + * + *

            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 (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
            +   *   SetIamPolicyRequest request =
            +   *       SetIamPolicyRequest.newBuilder()
            +   *           .setResource(
            +   *               EndpointPolicyName.of("[PROJECT]", "[LOCATION]", "[ENDPOINT_POLICY]").toString())
            +   *           .setPolicy(Policy.newBuilder().build())
            +   *           .setUpdateMask(FieldMask.newBuilder().build())
            +   *           .build();
            +   *   Policy response = networkServicesClient.setIamPolicy(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 Policy setIamPolicy(SetIamPolicyRequest request) { + return setIamPolicyCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Sets the access control policy on the specified resource. Replacesany existing policy. + * + *

            Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`errors. + * + *

            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 (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
            +   *   SetIamPolicyRequest request =
            +   *       SetIamPolicyRequest.newBuilder()
            +   *           .setResource(
            +   *               EndpointPolicyName.of("[PROJECT]", "[LOCATION]", "[ENDPOINT_POLICY]").toString())
            +   *           .setPolicy(Policy.newBuilder().build())
            +   *           .setUpdateMask(FieldMask.newBuilder().build())
            +   *           .build();
            +   *   ApiFuture future = networkServicesClient.setIamPolicyCallable().futureCall(request);
            +   *   // Do something.
            +   *   Policy response = future.get();
            +   * }
            +   * }
            + */ + public final UnaryCallable setIamPolicyCallable() { + return stub.setIamPolicyCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the access control policy for a resource. Returns an empty policyif the resource exists + * and does not have a policy set. + * + *

            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 (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
            +   *   GetIamPolicyRequest request =
            +   *       GetIamPolicyRequest.newBuilder()
            +   *           .setResource(
            +   *               EndpointPolicyName.of("[PROJECT]", "[LOCATION]", "[ENDPOINT_POLICY]").toString())
            +   *           .setOptions(GetPolicyOptions.newBuilder().build())
            +   *           .build();
            +   *   Policy response = networkServicesClient.getIamPolicy(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 Policy getIamPolicy(GetIamPolicyRequest request) { + return getIamPolicyCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the access control policy for a resource. Returns an empty policyif the resource exists + * and does not have a policy set. + * + *

            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 (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
            +   *   GetIamPolicyRequest request =
            +   *       GetIamPolicyRequest.newBuilder()
            +   *           .setResource(
            +   *               EndpointPolicyName.of("[PROJECT]", "[LOCATION]", "[ENDPOINT_POLICY]").toString())
            +   *           .setOptions(GetPolicyOptions.newBuilder().build())
            +   *           .build();
            +   *   ApiFuture future = networkServicesClient.getIamPolicyCallable().futureCall(request);
            +   *   // Do something.
            +   *   Policy response = future.get();
            +   * }
            +   * }
            + */ + public final UnaryCallable getIamPolicyCallable() { + return stub.getIamPolicyCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns permissions that a caller has on the specified resource. If theresource does not exist, + * this will return an empty set ofpermissions, not a `NOT_FOUND` error. + * + *

            Note: This operation is designed to be used for buildingpermission-aware UIs and + * command-line tools, not for authorizationchecking. This operation may "fail open" without + * warning. * *

            Sample code: * @@ -11249,6 +12076,86 @@ protected ListMeshRouteViewsFixedSizeCollection createCollection( } } + public static class ListAgentGatewaysPagedResponse + extends AbstractPagedListResponse< + ListAgentGatewaysRequest, + ListAgentGatewaysResponse, + AgentGateway, + ListAgentGatewaysPage, + ListAgentGatewaysFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListAgentGatewaysPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListAgentGatewaysPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListAgentGatewaysPagedResponse(ListAgentGatewaysPage page) { + super(page, ListAgentGatewaysFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListAgentGatewaysPage + extends AbstractPage< + ListAgentGatewaysRequest, + ListAgentGatewaysResponse, + AgentGateway, + ListAgentGatewaysPage> { + + private ListAgentGatewaysPage( + PageContext context, + ListAgentGatewaysResponse response) { + super(context, response); + } + + private static ListAgentGatewaysPage createEmptyPage() { + return new ListAgentGatewaysPage(null, null); + } + + @Override + protected ListAgentGatewaysPage createPage( + PageContext context, + ListAgentGatewaysResponse response) { + return new ListAgentGatewaysPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListAgentGatewaysFixedSizeCollection + extends AbstractFixedSizeCollection< + ListAgentGatewaysRequest, + ListAgentGatewaysResponse, + AgentGateway, + ListAgentGatewaysPage, + ListAgentGatewaysFixedSizeCollection> { + + private ListAgentGatewaysFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListAgentGatewaysFixedSizeCollection createEmptyCollection() { + return new ListAgentGatewaysFixedSizeCollection(null, 0); + } + + @Override + protected ListAgentGatewaysFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListAgentGatewaysFixedSizeCollection(pages, collectionSize); + } + } + public static class ListLocationsPagedResponse extends AbstractPagedListResponse< ListLocationsRequest, diff --git a/java-networkservices/google-cloud-networkservices/src/main/java/com/google/cloud/networkservices/v1/NetworkServicesSettings.java b/java-networkservices/google-cloud-networkservices/src/main/java/com/google/cloud/networkservices/v1/NetworkServicesSettings.java index a4a5becdfe4d..27e2743c5d9b 100644 --- a/java-networkservices/google-cloud-networkservices/src/main/java/com/google/cloud/networkservices/v1/NetworkServicesSettings.java +++ b/java-networkservices/google-cloud-networkservices/src/main/java/com/google/cloud/networkservices/v1/NetworkServicesSettings.java @@ -16,6 +16,7 @@ package com.google.cloud.networkservices.v1; +import static com.google.cloud.networkservices.v1.NetworkServicesClient.ListAgentGatewaysPagedResponse; import static com.google.cloud.networkservices.v1.NetworkServicesClient.ListEndpointPoliciesPagedResponse; import static com.google.cloud.networkservices.v1.NetworkServicesClient.ListGatewayRouteViewsPagedResponse; import static com.google.cloud.networkservices.v1.NetworkServicesClient.ListGatewaysPagedResponse; @@ -671,6 +672,51 @@ public UnaryCallSettings getMeshRouteVie return ((NetworkServicesStubSettings) getStubSettings()).listMeshRouteViewsSettings(); } + /** Returns the object with the settings used for calls to listAgentGateways. */ + public PagedCallSettings< + ListAgentGatewaysRequest, ListAgentGatewaysResponse, ListAgentGatewaysPagedResponse> + listAgentGatewaysSettings() { + return ((NetworkServicesStubSettings) getStubSettings()).listAgentGatewaysSettings(); + } + + /** Returns the object with the settings used for calls to getAgentGateway. */ + public UnaryCallSettings getAgentGatewaySettings() { + return ((NetworkServicesStubSettings) getStubSettings()).getAgentGatewaySettings(); + } + + /** Returns the object with the settings used for calls to createAgentGateway. */ + public UnaryCallSettings createAgentGatewaySettings() { + return ((NetworkServicesStubSettings) getStubSettings()).createAgentGatewaySettings(); + } + + /** Returns the object with the settings used for calls to createAgentGateway. */ + public OperationCallSettings + createAgentGatewayOperationSettings() { + return ((NetworkServicesStubSettings) getStubSettings()).createAgentGatewayOperationSettings(); + } + + /** Returns the object with the settings used for calls to updateAgentGateway. */ + public UnaryCallSettings updateAgentGatewaySettings() { + return ((NetworkServicesStubSettings) getStubSettings()).updateAgentGatewaySettings(); + } + + /** Returns the object with the settings used for calls to updateAgentGateway. */ + public OperationCallSettings + updateAgentGatewayOperationSettings() { + return ((NetworkServicesStubSettings) getStubSettings()).updateAgentGatewayOperationSettings(); + } + + /** Returns the object with the settings used for calls to deleteAgentGateway. */ + public UnaryCallSettings deleteAgentGatewaySettings() { + return ((NetworkServicesStubSettings) getStubSettings()).deleteAgentGatewaySettings(); + } + + /** Returns the object with the settings used for calls to deleteAgentGateway. */ + public OperationCallSettings + deleteAgentGatewayOperationSettings() { + return ((NetworkServicesStubSettings) getStubSettings()).deleteAgentGatewayOperationSettings(); + } + /** Returns the object with the settings used for calls to listLocations. */ public PagedCallSettings listLocationsSettings() { @@ -1354,6 +1400,55 @@ public UnaryCallSettings.Builder deleteMeshSetting return getStubSettingsBuilder().listMeshRouteViewsSettings(); } + /** Returns the builder for the settings used for calls to listAgentGateways. */ + public PagedCallSettings.Builder< + ListAgentGatewaysRequest, ListAgentGatewaysResponse, ListAgentGatewaysPagedResponse> + listAgentGatewaysSettings() { + return getStubSettingsBuilder().listAgentGatewaysSettings(); + } + + /** Returns the builder for the settings used for calls to getAgentGateway. */ + public UnaryCallSettings.Builder + getAgentGatewaySettings() { + return getStubSettingsBuilder().getAgentGatewaySettings(); + } + + /** Returns the builder for the settings used for calls to createAgentGateway. */ + public UnaryCallSettings.Builder + createAgentGatewaySettings() { + return getStubSettingsBuilder().createAgentGatewaySettings(); + } + + /** Returns the builder for the settings used for calls to createAgentGateway. */ + public OperationCallSettings.Builder + createAgentGatewayOperationSettings() { + return getStubSettingsBuilder().createAgentGatewayOperationSettings(); + } + + /** Returns the builder for the settings used for calls to updateAgentGateway. */ + public UnaryCallSettings.Builder + updateAgentGatewaySettings() { + return getStubSettingsBuilder().updateAgentGatewaySettings(); + } + + /** Returns the builder for the settings used for calls to updateAgentGateway. */ + public OperationCallSettings.Builder + updateAgentGatewayOperationSettings() { + return getStubSettingsBuilder().updateAgentGatewayOperationSettings(); + } + + /** Returns the builder for the settings used for calls to deleteAgentGateway. */ + public UnaryCallSettings.Builder + deleteAgentGatewaySettings() { + return getStubSettingsBuilder().deleteAgentGatewaySettings(); + } + + /** Returns the builder for the settings used for calls to deleteAgentGateway. */ + public OperationCallSettings.Builder + deleteAgentGatewayOperationSettings() { + return getStubSettingsBuilder().deleteAgentGatewayOperationSettings(); + } + /** Returns the builder for the settings used for calls to listLocations. */ public PagedCallSettings.Builder< ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> diff --git a/java-networkservices/google-cloud-networkservices/src/main/java/com/google/cloud/networkservices/v1/gapic_metadata.json b/java-networkservices/google-cloud-networkservices/src/main/java/com/google/cloud/networkservices/v1/gapic_metadata.json index 52d3ed7c7c54..8cc5cf055a66 100644 --- a/java-networkservices/google-cloud-networkservices/src/main/java/com/google/cloud/networkservices/v1/gapic_metadata.json +++ b/java-networkservices/google-cloud-networkservices/src/main/java/com/google/cloud/networkservices/v1/gapic_metadata.json @@ -94,6 +94,9 @@ "grpc": { "libraryClient": "NetworkServicesClient", "rpcs": { + "CreateAgentGateway": { + "methods": ["createAgentGatewayAsync", "createAgentGatewayAsync", "createAgentGatewayAsync", "createAgentGatewayOperationCallable", "createAgentGatewayCallable"] + }, "CreateEndpointPolicy": { "methods": ["createEndpointPolicyAsync", "createEndpointPolicyAsync", "createEndpointPolicyAsync", "createEndpointPolicyOperationCallable", "createEndpointPolicyCallable"] }, @@ -127,6 +130,9 @@ "CreateWasmPluginVersion": { "methods": ["createWasmPluginVersionAsync", "createWasmPluginVersionAsync", "createWasmPluginVersionAsync", "createWasmPluginVersionOperationCallable", "createWasmPluginVersionCallable"] }, + "DeleteAgentGateway": { + "methods": ["deleteAgentGatewayAsync", "deleteAgentGatewayAsync", "deleteAgentGatewayAsync", "deleteAgentGatewayOperationCallable", "deleteAgentGatewayCallable"] + }, "DeleteEndpointPolicy": { "methods": ["deleteEndpointPolicyAsync", "deleteEndpointPolicyAsync", "deleteEndpointPolicyAsync", "deleteEndpointPolicyOperationCallable", "deleteEndpointPolicyCallable"] }, @@ -160,6 +166,9 @@ "DeleteWasmPluginVersion": { "methods": ["deleteWasmPluginVersionAsync", "deleteWasmPluginVersionAsync", "deleteWasmPluginVersionAsync", "deleteWasmPluginVersionOperationCallable", "deleteWasmPluginVersionCallable"] }, + "GetAgentGateway": { + "methods": ["getAgentGateway", "getAgentGateway", "getAgentGateway", "getAgentGatewayCallable"] + }, "GetEndpointPolicy": { "methods": ["getEndpointPolicy", "getEndpointPolicy", "getEndpointPolicy", "getEndpointPolicyCallable"] }, @@ -205,6 +214,9 @@ "GetWasmPluginVersion": { "methods": ["getWasmPluginVersion", "getWasmPluginVersion", "getWasmPluginVersion", "getWasmPluginVersionCallable"] }, + "ListAgentGateways": { + "methods": ["listAgentGateways", "listAgentGateways", "listAgentGateways", "listAgentGatewaysPagedCallable", "listAgentGatewaysCallable"] + }, "ListEndpointPolicies": { "methods": ["listEndpointPolicies", "listEndpointPolicies", "listEndpointPolicies", "listEndpointPoliciesPagedCallable", "listEndpointPoliciesCallable"] }, @@ -253,6 +265,9 @@ "TestIamPermissions": { "methods": ["testIamPermissions", "testIamPermissionsCallable"] }, + "UpdateAgentGateway": { + "methods": ["updateAgentGatewayAsync", "updateAgentGatewayAsync", "updateAgentGatewayOperationCallable", "updateAgentGatewayCallable"] + }, "UpdateEndpointPolicy": { "methods": ["updateEndpointPolicyAsync", "updateEndpointPolicyAsync", "updateEndpointPolicyOperationCallable", "updateEndpointPolicyCallable"] }, diff --git a/java-networkservices/google-cloud-networkservices/src/main/java/com/google/cloud/networkservices/v1/stub/GrpcNetworkServicesStub.java b/java-networkservices/google-cloud-networkservices/src/main/java/com/google/cloud/networkservices/v1/stub/GrpcNetworkServicesStub.java index 892a8d6e9f85..7b15319ff5fc 100644 --- a/java-networkservices/google-cloud-networkservices/src/main/java/com/google/cloud/networkservices/v1/stub/GrpcNetworkServicesStub.java +++ b/java-networkservices/google-cloud-networkservices/src/main/java/com/google/cloud/networkservices/v1/stub/GrpcNetworkServicesStub.java @@ -16,6 +16,7 @@ package com.google.cloud.networkservices.v1.stub; +import static com.google.cloud.networkservices.v1.NetworkServicesClient.ListAgentGatewaysPagedResponse; import static com.google.cloud.networkservices.v1.NetworkServicesClient.ListEndpointPoliciesPagedResponse; import static com.google.cloud.networkservices.v1.NetworkServicesClient.ListGatewayRouteViewsPagedResponse; import static com.google.cloud.networkservices.v1.NetworkServicesClient.ListGatewaysPagedResponse; @@ -43,6 +44,8 @@ import com.google.cloud.location.ListLocationsRequest; import com.google.cloud.location.ListLocationsResponse; import com.google.cloud.location.Location; +import com.google.cloud.networkservices.v1.AgentGateway; +import com.google.cloud.networkservices.v1.CreateAgentGatewayRequest; import com.google.cloud.networkservices.v1.CreateEndpointPolicyRequest; import com.google.cloud.networkservices.v1.CreateGatewayRequest; import com.google.cloud.networkservices.v1.CreateGrpcRouteRequest; @@ -54,6 +57,7 @@ import com.google.cloud.networkservices.v1.CreateTlsRouteRequest; import com.google.cloud.networkservices.v1.CreateWasmPluginRequest; import com.google.cloud.networkservices.v1.CreateWasmPluginVersionRequest; +import com.google.cloud.networkservices.v1.DeleteAgentGatewayRequest; import com.google.cloud.networkservices.v1.DeleteEndpointPolicyRequest; import com.google.cloud.networkservices.v1.DeleteGatewayRequest; import com.google.cloud.networkservices.v1.DeleteGrpcRouteRequest; @@ -68,6 +72,7 @@ import com.google.cloud.networkservices.v1.EndpointPolicy; import com.google.cloud.networkservices.v1.Gateway; import com.google.cloud.networkservices.v1.GatewayRouteView; +import com.google.cloud.networkservices.v1.GetAgentGatewayRequest; import com.google.cloud.networkservices.v1.GetEndpointPolicyRequest; import com.google.cloud.networkservices.v1.GetGatewayRequest; import com.google.cloud.networkservices.v1.GetGatewayRouteViewRequest; @@ -83,6 +88,8 @@ import com.google.cloud.networkservices.v1.GetWasmPluginVersionRequest; import com.google.cloud.networkservices.v1.GrpcRoute; import com.google.cloud.networkservices.v1.HttpRoute; +import com.google.cloud.networkservices.v1.ListAgentGatewaysRequest; +import com.google.cloud.networkservices.v1.ListAgentGatewaysResponse; import com.google.cloud.networkservices.v1.ListEndpointPoliciesRequest; import com.google.cloud.networkservices.v1.ListEndpointPoliciesResponse; import com.google.cloud.networkservices.v1.ListGatewayRouteViewsRequest; @@ -116,6 +123,7 @@ import com.google.cloud.networkservices.v1.ServiceLbPolicy; import com.google.cloud.networkservices.v1.TcpRoute; import com.google.cloud.networkservices.v1.TlsRoute; +import com.google.cloud.networkservices.v1.UpdateAgentGatewayRequest; import com.google.cloud.networkservices.v1.UpdateEndpointPolicyRequest; import com.google.cloud.networkservices.v1.UpdateGatewayRequest; import com.google.cloud.networkservices.v1.UpdateGrpcRouteRequest; @@ -806,6 +814,66 @@ public class GrpcNetworkServicesStub extends NetworkServicesStub { .setSampledToLocalTracing(true) .build(); + private static final MethodDescriptor + listAgentGatewaysMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.networkservices.v1.NetworkServices/ListAgentGateways") + .setRequestMarshaller( + ProtoUtils.marshaller(ListAgentGatewaysRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListAgentGatewaysResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + getAgentGatewayMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.networkservices.v1.NetworkServices/GetAgentGateway") + .setRequestMarshaller( + ProtoUtils.marshaller(GetAgentGatewayRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(AgentGateway.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + createAgentGatewayMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.networkservices.v1.NetworkServices/CreateAgentGateway") + .setRequestMarshaller( + ProtoUtils.marshaller(CreateAgentGatewayRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + updateAgentGatewayMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.networkservices.v1.NetworkServices/UpdateAgentGateway") + .setRequestMarshaller( + ProtoUtils.marshaller(UpdateAgentGatewayRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + deleteAgentGatewayMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.networkservices.v1.NetworkServices/DeleteAgentGateway") + .setRequestMarshaller( + ProtoUtils.marshaller(DeleteAgentGatewayRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + private static final MethodDescriptor listLocationsMethodDescriptor = MethodDescriptor.newBuilder() @@ -1020,6 +1088,20 @@ public class GrpcNetworkServicesStub extends NetworkServicesStub { listMeshRouteViewsCallable; private final UnaryCallable listMeshRouteViewsPagedCallable; + private final UnaryCallable + listAgentGatewaysCallable; + private final UnaryCallable + listAgentGatewaysPagedCallable; + private final UnaryCallable getAgentGatewayCallable; + private final UnaryCallable createAgentGatewayCallable; + private final OperationCallable + createAgentGatewayOperationCallable; + private final UnaryCallable updateAgentGatewayCallable; + private final OperationCallable + updateAgentGatewayOperationCallable; + private final UnaryCallable deleteAgentGatewayCallable; + private final OperationCallable + deleteAgentGatewayOperationCallable; private final UnaryCallable listLocationsCallable; private final UnaryCallable listLocationsPagedCallable; @@ -1728,6 +1810,62 @@ protected GrpcNetworkServicesStub( }) .setResourceNameExtractor(request -> request.getParent()) .build(); + GrpcCallSettings + listAgentGatewaysTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listAgentGatewaysMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .build(); + GrpcCallSettings getAgentGatewayTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getAgentGatewayMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getName()) + .build(); + GrpcCallSettings createAgentGatewayTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createAgentGatewayMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .build(); + GrpcCallSettings updateAgentGatewayTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateAgentGatewayMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add( + "agent_gateway.name", String.valueOf(request.getAgentGateway().getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings deleteAgentGatewayTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteAgentGatewayMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getName()) + .build(); GrpcCallSettings listLocationsTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(listLocationsMethodDescriptor) @@ -2244,6 +2382,52 @@ protected GrpcNetworkServicesStub( listMeshRouteViewsTransportSettings, settings.listMeshRouteViewsSettings(), clientContext); + this.listAgentGatewaysCallable = + callableFactory.createUnaryCallable( + listAgentGatewaysTransportSettings, + settings.listAgentGatewaysSettings(), + clientContext); + this.listAgentGatewaysPagedCallable = + callableFactory.createPagedCallable( + listAgentGatewaysTransportSettings, + settings.listAgentGatewaysSettings(), + clientContext); + this.getAgentGatewayCallable = + callableFactory.createUnaryCallable( + getAgentGatewayTransportSettings, settings.getAgentGatewaySettings(), clientContext); + this.createAgentGatewayCallable = + callableFactory.createUnaryCallable( + createAgentGatewayTransportSettings, + settings.createAgentGatewaySettings(), + clientContext); + this.createAgentGatewayOperationCallable = + callableFactory.createOperationCallable( + createAgentGatewayTransportSettings, + settings.createAgentGatewayOperationSettings(), + clientContext, + operationsStub); + this.updateAgentGatewayCallable = + callableFactory.createUnaryCallable( + updateAgentGatewayTransportSettings, + settings.updateAgentGatewaySettings(), + clientContext); + this.updateAgentGatewayOperationCallable = + callableFactory.createOperationCallable( + updateAgentGatewayTransportSettings, + settings.updateAgentGatewayOperationSettings(), + clientContext, + operationsStub); + this.deleteAgentGatewayCallable = + callableFactory.createUnaryCallable( + deleteAgentGatewayTransportSettings, + settings.deleteAgentGatewaySettings(), + clientContext); + this.deleteAgentGatewayOperationCallable = + callableFactory.createOperationCallable( + deleteAgentGatewayTransportSettings, + settings.deleteAgentGatewayOperationSettings(), + clientContext, + operationsStub); this.listLocationsCallable = callableFactory.createUnaryCallable( listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); @@ -2840,6 +3024,56 @@ public UnaryCallable getMeshRouteViewCal return listMeshRouteViewsPagedCallable; } + @Override + public UnaryCallable + listAgentGatewaysCallable() { + return listAgentGatewaysCallable; + } + + @Override + public UnaryCallable + listAgentGatewaysPagedCallable() { + return listAgentGatewaysPagedCallable; + } + + @Override + public UnaryCallable getAgentGatewayCallable() { + return getAgentGatewayCallable; + } + + @Override + public UnaryCallable createAgentGatewayCallable() { + return createAgentGatewayCallable; + } + + @Override + public OperationCallable + createAgentGatewayOperationCallable() { + return createAgentGatewayOperationCallable; + } + + @Override + public UnaryCallable updateAgentGatewayCallable() { + return updateAgentGatewayCallable; + } + + @Override + public OperationCallable + updateAgentGatewayOperationCallable() { + return updateAgentGatewayOperationCallable; + } + + @Override + public UnaryCallable deleteAgentGatewayCallable() { + return deleteAgentGatewayCallable; + } + + @Override + public OperationCallable + deleteAgentGatewayOperationCallable() { + return deleteAgentGatewayOperationCallable; + } + @Override public UnaryCallable listLocationsCallable() { return listLocationsCallable; diff --git a/java-networkservices/google-cloud-networkservices/src/main/java/com/google/cloud/networkservices/v1/stub/HttpJsonNetworkServicesStub.java b/java-networkservices/google-cloud-networkservices/src/main/java/com/google/cloud/networkservices/v1/stub/HttpJsonNetworkServicesStub.java index 89b4b6814079..72e58e3add30 100644 --- a/java-networkservices/google-cloud-networkservices/src/main/java/com/google/cloud/networkservices/v1/stub/HttpJsonNetworkServicesStub.java +++ b/java-networkservices/google-cloud-networkservices/src/main/java/com/google/cloud/networkservices/v1/stub/HttpJsonNetworkServicesStub.java @@ -16,6 +16,7 @@ package com.google.cloud.networkservices.v1.stub; +import static com.google.cloud.networkservices.v1.NetworkServicesClient.ListAgentGatewaysPagedResponse; import static com.google.cloud.networkservices.v1.NetworkServicesClient.ListEndpointPoliciesPagedResponse; import static com.google.cloud.networkservices.v1.NetworkServicesClient.ListGatewayRouteViewsPagedResponse; import static com.google.cloud.networkservices.v1.NetworkServicesClient.ListGatewaysPagedResponse; @@ -51,6 +52,8 @@ import com.google.cloud.location.ListLocationsRequest; import com.google.cloud.location.ListLocationsResponse; import com.google.cloud.location.Location; +import com.google.cloud.networkservices.v1.AgentGateway; +import com.google.cloud.networkservices.v1.CreateAgentGatewayRequest; import com.google.cloud.networkservices.v1.CreateEndpointPolicyRequest; import com.google.cloud.networkservices.v1.CreateGatewayRequest; import com.google.cloud.networkservices.v1.CreateGrpcRouteRequest; @@ -62,6 +65,7 @@ import com.google.cloud.networkservices.v1.CreateTlsRouteRequest; import com.google.cloud.networkservices.v1.CreateWasmPluginRequest; import com.google.cloud.networkservices.v1.CreateWasmPluginVersionRequest; +import com.google.cloud.networkservices.v1.DeleteAgentGatewayRequest; import com.google.cloud.networkservices.v1.DeleteEndpointPolicyRequest; import com.google.cloud.networkservices.v1.DeleteGatewayRequest; import com.google.cloud.networkservices.v1.DeleteGrpcRouteRequest; @@ -76,6 +80,7 @@ import com.google.cloud.networkservices.v1.EndpointPolicy; import com.google.cloud.networkservices.v1.Gateway; import com.google.cloud.networkservices.v1.GatewayRouteView; +import com.google.cloud.networkservices.v1.GetAgentGatewayRequest; import com.google.cloud.networkservices.v1.GetEndpointPolicyRequest; import com.google.cloud.networkservices.v1.GetGatewayRequest; import com.google.cloud.networkservices.v1.GetGatewayRouteViewRequest; @@ -91,6 +96,8 @@ import com.google.cloud.networkservices.v1.GetWasmPluginVersionRequest; import com.google.cloud.networkservices.v1.GrpcRoute; import com.google.cloud.networkservices.v1.HttpRoute; +import com.google.cloud.networkservices.v1.ListAgentGatewaysRequest; +import com.google.cloud.networkservices.v1.ListAgentGatewaysResponse; import com.google.cloud.networkservices.v1.ListEndpointPoliciesRequest; import com.google.cloud.networkservices.v1.ListEndpointPoliciesResponse; import com.google.cloud.networkservices.v1.ListGatewayRouteViewsRequest; @@ -124,6 +131,7 @@ import com.google.cloud.networkservices.v1.ServiceLbPolicy; import com.google.cloud.networkservices.v1.TcpRoute; import com.google.cloud.networkservices.v1.TlsRoute; +import com.google.cloud.networkservices.v1.UpdateAgentGatewayRequest; import com.google.cloud.networkservices.v1.UpdateEndpointPolicyRequest; import com.google.cloud.networkservices.v1.UpdateGatewayRequest; import com.google.cloud.networkservices.v1.UpdateGrpcRouteRequest; @@ -175,6 +183,7 @@ public class HttpJsonNetworkServicesStub extends NetworkServicesStub { .add(Empty.getDescriptor()) .add(Gateway.getDescriptor()) .add(ServiceLbPolicy.getDescriptor()) + .add(AgentGateway.getDescriptor()) .add(GrpcRoute.getDescriptor()) .build(); @@ -1132,6 +1141,7 @@ public class HttpJsonNetworkServicesStub extends NetworkServicesStub { Map> fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "filter", request.getFilter()); serializer.putQueryParam(fields, "pageSize", request.getPageSize()); serializer.putQueryParam(fields, "pageToken", request.getPageToken()); serializer.putQueryParam( @@ -1206,6 +1216,7 @@ public class HttpJsonNetworkServicesStub extends NetworkServicesStub { ProtoRestSerializer.create(); serializer.putQueryParam( fields, "httpRouteId", request.getHttpRouteId()); + serializer.putQueryParam(fields, "requestId", request.getRequestId()); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); return fields; }) @@ -2419,6 +2430,204 @@ public class HttpJsonNetworkServicesStub extends NetworkServicesStub { .build()) .build(); + private static final ApiMethodDescriptor + listAgentGatewaysMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.networkservices.v1.NetworkServices/ListAgentGateways") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*/locations/*}/agentGateways", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "pageSize", request.getPageSize()); + serializer.putQueryParam(fields, "pageToken", request.getPageToken()); + serializer.putQueryParam( + fields, "returnPartialSuccess", request.getReturnPartialSuccess()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListAgentGatewaysResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + getAgentGatewayMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.networkservices.v1.NetworkServices/GetAgentGateway") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/agentGateways/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(AgentGateway.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + createAgentGatewayMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.networkservices.v1.NetworkServices/CreateAgentGateway") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*/locations/*}/agentGateways", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam( + fields, "agentGatewayId", request.getAgentGatewayId()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("agentGateway", request.getAgentGateway(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (CreateAgentGatewayRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + updateAgentGatewayMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.networkservices.v1.NetworkServices/UpdateAgentGateway") + .setHttpMethod("PATCH") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{agentGateway.name=projects/*/locations/*/agentGateways/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam( + fields, "agentGateway.name", request.getAgentGateway().getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "updateMask", request.getUpdateMask()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("agentGateway", request.getAgentGateway(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (UpdateAgentGatewayRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + deleteAgentGatewayMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.networkservices.v1.NetworkServices/DeleteAgentGateway") + .setHttpMethod("DELETE") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/agentGateways/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "etag", request.getEtag()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (DeleteAgentGatewayRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + private static final ApiMethodDescriptor listLocationsMethodDescriptor = ApiMethodDescriptor.newBuilder() @@ -2779,6 +2988,20 @@ public class HttpJsonNetworkServicesStub extends NetworkServicesStub { listMeshRouteViewsCallable; private final UnaryCallable listMeshRouteViewsPagedCallable; + private final UnaryCallable + listAgentGatewaysCallable; + private final UnaryCallable + listAgentGatewaysPagedCallable; + private final UnaryCallable getAgentGatewayCallable; + private final UnaryCallable createAgentGatewayCallable; + private final OperationCallable + createAgentGatewayOperationCallable; + private final UnaryCallable updateAgentGatewayCallable; + private final OperationCallable + updateAgentGatewayOperationCallable; + private final UnaryCallable deleteAgentGatewayCallable; + private final OperationCallable + deleteAgentGatewayOperationCallable; private final UnaryCallable listLocationsCallable; private final UnaryCallable listLocationsPagedCallable; @@ -3583,6 +3806,67 @@ protected HttpJsonNetworkServicesStub( }) .setResourceNameExtractor(request -> request.getParent()) .build(); + HttpJsonCallSettings + listAgentGatewaysTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(listAgentGatewaysMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .build(); + HttpJsonCallSettings getAgentGatewayTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getAgentGatewayMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getName()) + .build(); + HttpJsonCallSettings createAgentGatewayTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(createAgentGatewayMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .build(); + HttpJsonCallSettings updateAgentGatewayTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(updateAgentGatewayMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add( + "agent_gateway.name", String.valueOf(request.getAgentGateway().getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings deleteAgentGatewayTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(deleteAgentGatewayMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getName()) + .build(); HttpJsonCallSettings listLocationsTransportSettings = HttpJsonCallSettings.newBuilder() @@ -4105,6 +4389,52 @@ protected HttpJsonNetworkServicesStub( listMeshRouteViewsTransportSettings, settings.listMeshRouteViewsSettings(), clientContext); + this.listAgentGatewaysCallable = + callableFactory.createUnaryCallable( + listAgentGatewaysTransportSettings, + settings.listAgentGatewaysSettings(), + clientContext); + this.listAgentGatewaysPagedCallable = + callableFactory.createPagedCallable( + listAgentGatewaysTransportSettings, + settings.listAgentGatewaysSettings(), + clientContext); + this.getAgentGatewayCallable = + callableFactory.createUnaryCallable( + getAgentGatewayTransportSettings, settings.getAgentGatewaySettings(), clientContext); + this.createAgentGatewayCallable = + callableFactory.createUnaryCallable( + createAgentGatewayTransportSettings, + settings.createAgentGatewaySettings(), + clientContext); + this.createAgentGatewayOperationCallable = + callableFactory.createOperationCallable( + createAgentGatewayTransportSettings, + settings.createAgentGatewayOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.updateAgentGatewayCallable = + callableFactory.createUnaryCallable( + updateAgentGatewayTransportSettings, + settings.updateAgentGatewaySettings(), + clientContext); + this.updateAgentGatewayOperationCallable = + callableFactory.createOperationCallable( + updateAgentGatewayTransportSettings, + settings.updateAgentGatewayOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.deleteAgentGatewayCallable = + callableFactory.createUnaryCallable( + deleteAgentGatewayTransportSettings, + settings.deleteAgentGatewaySettings(), + clientContext); + this.deleteAgentGatewayOperationCallable = + callableFactory.createOperationCallable( + deleteAgentGatewayTransportSettings, + settings.deleteAgentGatewayOperationSettings(), + clientContext, + httpJsonOperationsStub); this.listLocationsCallable = callableFactory.createUnaryCallable( listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); @@ -4191,6 +4521,11 @@ public static List getMethodDescriptors() { methodDescriptors.add(getMeshRouteViewMethodDescriptor); methodDescriptors.add(listGatewayRouteViewsMethodDescriptor); methodDescriptors.add(listMeshRouteViewsMethodDescriptor); + methodDescriptors.add(listAgentGatewaysMethodDescriptor); + methodDescriptors.add(getAgentGatewayMethodDescriptor); + methodDescriptors.add(createAgentGatewayMethodDescriptor); + methodDescriptors.add(updateAgentGatewayMethodDescriptor); + methodDescriptors.add(deleteAgentGatewayMethodDescriptor); methodDescriptors.add(listLocationsMethodDescriptor); methodDescriptors.add(getLocationMethodDescriptor); methodDescriptors.add(setIamPolicyMethodDescriptor); @@ -4770,6 +5105,56 @@ public UnaryCallable getMeshRouteViewCal return listMeshRouteViewsPagedCallable; } + @Override + public UnaryCallable + listAgentGatewaysCallable() { + return listAgentGatewaysCallable; + } + + @Override + public UnaryCallable + listAgentGatewaysPagedCallable() { + return listAgentGatewaysPagedCallable; + } + + @Override + public UnaryCallable getAgentGatewayCallable() { + return getAgentGatewayCallable; + } + + @Override + public UnaryCallable createAgentGatewayCallable() { + return createAgentGatewayCallable; + } + + @Override + public OperationCallable + createAgentGatewayOperationCallable() { + return createAgentGatewayOperationCallable; + } + + @Override + public UnaryCallable updateAgentGatewayCallable() { + return updateAgentGatewayCallable; + } + + @Override + public OperationCallable + updateAgentGatewayOperationCallable() { + return updateAgentGatewayOperationCallable; + } + + @Override + public UnaryCallable deleteAgentGatewayCallable() { + return deleteAgentGatewayCallable; + } + + @Override + public OperationCallable + deleteAgentGatewayOperationCallable() { + return deleteAgentGatewayOperationCallable; + } + @Override public UnaryCallable listLocationsCallable() { return listLocationsCallable; diff --git a/java-networkservices/google-cloud-networkservices/src/main/java/com/google/cloud/networkservices/v1/stub/NetworkServicesStub.java b/java-networkservices/google-cloud-networkservices/src/main/java/com/google/cloud/networkservices/v1/stub/NetworkServicesStub.java index 081b43fe5e2a..2f9db30fa5d3 100644 --- a/java-networkservices/google-cloud-networkservices/src/main/java/com/google/cloud/networkservices/v1/stub/NetworkServicesStub.java +++ b/java-networkservices/google-cloud-networkservices/src/main/java/com/google/cloud/networkservices/v1/stub/NetworkServicesStub.java @@ -16,6 +16,7 @@ package com.google.cloud.networkservices.v1.stub; +import static com.google.cloud.networkservices.v1.NetworkServicesClient.ListAgentGatewaysPagedResponse; import static com.google.cloud.networkservices.v1.NetworkServicesClient.ListEndpointPoliciesPagedResponse; import static com.google.cloud.networkservices.v1.NetworkServicesClient.ListGatewayRouteViewsPagedResponse; import static com.google.cloud.networkservices.v1.NetworkServicesClient.ListGatewaysPagedResponse; @@ -38,6 +39,8 @@ import com.google.cloud.location.ListLocationsRequest; import com.google.cloud.location.ListLocationsResponse; import com.google.cloud.location.Location; +import com.google.cloud.networkservices.v1.AgentGateway; +import com.google.cloud.networkservices.v1.CreateAgentGatewayRequest; import com.google.cloud.networkservices.v1.CreateEndpointPolicyRequest; import com.google.cloud.networkservices.v1.CreateGatewayRequest; import com.google.cloud.networkservices.v1.CreateGrpcRouteRequest; @@ -49,6 +52,7 @@ import com.google.cloud.networkservices.v1.CreateTlsRouteRequest; import com.google.cloud.networkservices.v1.CreateWasmPluginRequest; import com.google.cloud.networkservices.v1.CreateWasmPluginVersionRequest; +import com.google.cloud.networkservices.v1.DeleteAgentGatewayRequest; import com.google.cloud.networkservices.v1.DeleteEndpointPolicyRequest; import com.google.cloud.networkservices.v1.DeleteGatewayRequest; import com.google.cloud.networkservices.v1.DeleteGrpcRouteRequest; @@ -63,6 +67,7 @@ import com.google.cloud.networkservices.v1.EndpointPolicy; import com.google.cloud.networkservices.v1.Gateway; import com.google.cloud.networkservices.v1.GatewayRouteView; +import com.google.cloud.networkservices.v1.GetAgentGatewayRequest; import com.google.cloud.networkservices.v1.GetEndpointPolicyRequest; import com.google.cloud.networkservices.v1.GetGatewayRequest; import com.google.cloud.networkservices.v1.GetGatewayRouteViewRequest; @@ -78,6 +83,8 @@ import com.google.cloud.networkservices.v1.GetWasmPluginVersionRequest; import com.google.cloud.networkservices.v1.GrpcRoute; import com.google.cloud.networkservices.v1.HttpRoute; +import com.google.cloud.networkservices.v1.ListAgentGatewaysRequest; +import com.google.cloud.networkservices.v1.ListAgentGatewaysResponse; import com.google.cloud.networkservices.v1.ListEndpointPoliciesRequest; import com.google.cloud.networkservices.v1.ListEndpointPoliciesResponse; import com.google.cloud.networkservices.v1.ListGatewayRouteViewsRequest; @@ -111,6 +118,7 @@ import com.google.cloud.networkservices.v1.ServiceLbPolicy; import com.google.cloud.networkservices.v1.TcpRoute; import com.google.cloud.networkservices.v1.TlsRoute; +import com.google.cloud.networkservices.v1.UpdateAgentGatewayRequest; import com.google.cloud.networkservices.v1.UpdateEndpointPolicyRequest; import com.google.cloud.networkservices.v1.UpdateGatewayRequest; import com.google.cloud.networkservices.v1.UpdateGrpcRouteRequest; @@ -628,6 +636,50 @@ public UnaryCallable getMeshRouteViewCal throw new UnsupportedOperationException("Not implemented: listMeshRouteViewsCallable()"); } + public UnaryCallable + listAgentGatewaysPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listAgentGatewaysPagedCallable()"); + } + + public UnaryCallable + listAgentGatewaysCallable() { + throw new UnsupportedOperationException("Not implemented: listAgentGatewaysCallable()"); + } + + public UnaryCallable getAgentGatewayCallable() { + throw new UnsupportedOperationException("Not implemented: getAgentGatewayCallable()"); + } + + public OperationCallable + createAgentGatewayOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: createAgentGatewayOperationCallable()"); + } + + public UnaryCallable createAgentGatewayCallable() { + throw new UnsupportedOperationException("Not implemented: createAgentGatewayCallable()"); + } + + public OperationCallable + updateAgentGatewayOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: updateAgentGatewayOperationCallable()"); + } + + public UnaryCallable updateAgentGatewayCallable() { + throw new UnsupportedOperationException("Not implemented: updateAgentGatewayCallable()"); + } + + public OperationCallable + deleteAgentGatewayOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: deleteAgentGatewayOperationCallable()"); + } + + public UnaryCallable deleteAgentGatewayCallable() { + throw new UnsupportedOperationException("Not implemented: deleteAgentGatewayCallable()"); + } + public UnaryCallable listLocationsPagedCallable() { throw new UnsupportedOperationException("Not implemented: listLocationsPagedCallable()"); diff --git a/java-networkservices/google-cloud-networkservices/src/main/java/com/google/cloud/networkservices/v1/stub/NetworkServicesStubSettings.java b/java-networkservices/google-cloud-networkservices/src/main/java/com/google/cloud/networkservices/v1/stub/NetworkServicesStubSettings.java index 1d0d4fd3d99b..b7fcf4a19ccf 100644 --- a/java-networkservices/google-cloud-networkservices/src/main/java/com/google/cloud/networkservices/v1/stub/NetworkServicesStubSettings.java +++ b/java-networkservices/google-cloud-networkservices/src/main/java/com/google/cloud/networkservices/v1/stub/NetworkServicesStubSettings.java @@ -16,6 +16,7 @@ package com.google.cloud.networkservices.v1.stub; +import static com.google.cloud.networkservices.v1.NetworkServicesClient.ListAgentGatewaysPagedResponse; import static com.google.cloud.networkservices.v1.NetworkServicesClient.ListEndpointPoliciesPagedResponse; import static com.google.cloud.networkservices.v1.NetworkServicesClient.ListGatewayRouteViewsPagedResponse; import static com.google.cloud.networkservices.v1.NetworkServicesClient.ListGatewaysPagedResponse; @@ -66,6 +67,8 @@ import com.google.cloud.location.ListLocationsRequest; import com.google.cloud.location.ListLocationsResponse; import com.google.cloud.location.Location; +import com.google.cloud.networkservices.v1.AgentGateway; +import com.google.cloud.networkservices.v1.CreateAgentGatewayRequest; import com.google.cloud.networkservices.v1.CreateEndpointPolicyRequest; import com.google.cloud.networkservices.v1.CreateGatewayRequest; import com.google.cloud.networkservices.v1.CreateGrpcRouteRequest; @@ -77,6 +80,7 @@ import com.google.cloud.networkservices.v1.CreateTlsRouteRequest; import com.google.cloud.networkservices.v1.CreateWasmPluginRequest; import com.google.cloud.networkservices.v1.CreateWasmPluginVersionRequest; +import com.google.cloud.networkservices.v1.DeleteAgentGatewayRequest; import com.google.cloud.networkservices.v1.DeleteEndpointPolicyRequest; import com.google.cloud.networkservices.v1.DeleteGatewayRequest; import com.google.cloud.networkservices.v1.DeleteGrpcRouteRequest; @@ -91,6 +95,7 @@ import com.google.cloud.networkservices.v1.EndpointPolicy; import com.google.cloud.networkservices.v1.Gateway; import com.google.cloud.networkservices.v1.GatewayRouteView; +import com.google.cloud.networkservices.v1.GetAgentGatewayRequest; import com.google.cloud.networkservices.v1.GetEndpointPolicyRequest; import com.google.cloud.networkservices.v1.GetGatewayRequest; import com.google.cloud.networkservices.v1.GetGatewayRouteViewRequest; @@ -106,6 +111,8 @@ import com.google.cloud.networkservices.v1.GetWasmPluginVersionRequest; import com.google.cloud.networkservices.v1.GrpcRoute; import com.google.cloud.networkservices.v1.HttpRoute; +import com.google.cloud.networkservices.v1.ListAgentGatewaysRequest; +import com.google.cloud.networkservices.v1.ListAgentGatewaysResponse; import com.google.cloud.networkservices.v1.ListEndpointPoliciesRequest; import com.google.cloud.networkservices.v1.ListEndpointPoliciesResponse; import com.google.cloud.networkservices.v1.ListGatewayRouteViewsRequest; @@ -139,6 +146,7 @@ import com.google.cloud.networkservices.v1.ServiceLbPolicy; import com.google.cloud.networkservices.v1.TcpRoute; import com.google.cloud.networkservices.v1.TlsRoute; +import com.google.cloud.networkservices.v1.UpdateAgentGatewayRequest; import com.google.cloud.networkservices.v1.UpdateEndpointPolicyRequest; import com.google.cloud.networkservices.v1.UpdateGatewayRequest; import com.google.cloud.networkservices.v1.UpdateGrpcRouteRequest; @@ -429,6 +437,19 @@ public class NetworkServicesStubSettings extends StubSettings listMeshRouteViewsSettings; + private final PagedCallSettings< + ListAgentGatewaysRequest, ListAgentGatewaysResponse, ListAgentGatewaysPagedResponse> + listAgentGatewaysSettings; + private final UnaryCallSettings getAgentGatewaySettings; + private final UnaryCallSettings createAgentGatewaySettings; + private final OperationCallSettings + createAgentGatewayOperationSettings; + private final UnaryCallSettings updateAgentGatewaySettings; + private final OperationCallSettings + updateAgentGatewayOperationSettings; + private final UnaryCallSettings deleteAgentGatewaySettings; + private final OperationCallSettings + deleteAgentGatewayOperationSettings; private final PagedCallSettings< ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> listLocationsSettings; @@ -914,6 +935,44 @@ public Iterable extractResources(ListMeshRouteViewsResponse paylo } }; + private static final PagedListDescriptor< + ListAgentGatewaysRequest, ListAgentGatewaysResponse, AgentGateway> + LIST_AGENT_GATEWAYS_PAGE_STR_DESC = + new PagedListDescriptor< + ListAgentGatewaysRequest, ListAgentGatewaysResponse, AgentGateway>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListAgentGatewaysRequest injectToken( + ListAgentGatewaysRequest payload, String token) { + return ListAgentGatewaysRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListAgentGatewaysRequest injectPageSize( + ListAgentGatewaysRequest payload, int pageSize) { + return ListAgentGatewaysRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListAgentGatewaysRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListAgentGatewaysResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListAgentGatewaysResponse payload) { + return payload.getAgentGatewaysList(); + } + }; + private static final PagedListDescriptor LIST_LOCATIONS_PAGE_STR_DESC = new PagedListDescriptor() { @@ -1207,6 +1266,27 @@ public ApiFuture getFuturePagedResponse( } }; + private static final PagedListResponseFactory< + ListAgentGatewaysRequest, ListAgentGatewaysResponse, ListAgentGatewaysPagedResponse> + LIST_AGENT_GATEWAYS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListAgentGatewaysRequest, + ListAgentGatewaysResponse, + ListAgentGatewaysPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListAgentGatewaysRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext + pageContext = + PageContext.create( + callable, LIST_AGENT_GATEWAYS_PAGE_STR_DESC, request, context); + return ListAgentGatewaysPagedResponse.createAsync(pageContext, futureResponse); + } + }; + private static final PagedListResponseFactory< ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> LIST_LOCATIONS_PAGE_STR_FACT = @@ -1744,6 +1824,51 @@ public UnaryCallSettings getMeshRouteVie return listMeshRouteViewsSettings; } + /** Returns the object with the settings used for calls to listAgentGateways. */ + public PagedCallSettings< + ListAgentGatewaysRequest, ListAgentGatewaysResponse, ListAgentGatewaysPagedResponse> + listAgentGatewaysSettings() { + return listAgentGatewaysSettings; + } + + /** Returns the object with the settings used for calls to getAgentGateway. */ + public UnaryCallSettings getAgentGatewaySettings() { + return getAgentGatewaySettings; + } + + /** Returns the object with the settings used for calls to createAgentGateway. */ + public UnaryCallSettings createAgentGatewaySettings() { + return createAgentGatewaySettings; + } + + /** Returns the object with the settings used for calls to createAgentGateway. */ + public OperationCallSettings + createAgentGatewayOperationSettings() { + return createAgentGatewayOperationSettings; + } + + /** Returns the object with the settings used for calls to updateAgentGateway. */ + public UnaryCallSettings updateAgentGatewaySettings() { + return updateAgentGatewaySettings; + } + + /** Returns the object with the settings used for calls to updateAgentGateway. */ + public OperationCallSettings + updateAgentGatewayOperationSettings() { + return updateAgentGatewayOperationSettings; + } + + /** Returns the object with the settings used for calls to deleteAgentGateway. */ + public UnaryCallSettings deleteAgentGatewaySettings() { + return deleteAgentGatewaySettings; + } + + /** Returns the object with the settings used for calls to deleteAgentGateway. */ + public OperationCallSettings + deleteAgentGatewayOperationSettings() { + return deleteAgentGatewayOperationSettings; + } + /** Returns the object with the settings used for calls to listLocations. */ public PagedCallSettings listLocationsSettings() { @@ -1983,6 +2108,17 @@ protected NetworkServicesStubSettings(Builder settingsBuilder) throws IOExceptio getMeshRouteViewSettings = settingsBuilder.getMeshRouteViewSettings().build(); listGatewayRouteViewsSettings = settingsBuilder.listGatewayRouteViewsSettings().build(); listMeshRouteViewsSettings = settingsBuilder.listMeshRouteViewsSettings().build(); + listAgentGatewaysSettings = settingsBuilder.listAgentGatewaysSettings().build(); + getAgentGatewaySettings = settingsBuilder.getAgentGatewaySettings().build(); + createAgentGatewaySettings = settingsBuilder.createAgentGatewaySettings().build(); + createAgentGatewayOperationSettings = + settingsBuilder.createAgentGatewayOperationSettings().build(); + updateAgentGatewaySettings = settingsBuilder.updateAgentGatewaySettings().build(); + updateAgentGatewayOperationSettings = + settingsBuilder.updateAgentGatewayOperationSettings().build(); + deleteAgentGatewaySettings = settingsBuilder.deleteAgentGatewaySettings().build(); + deleteAgentGatewayOperationSettings = + settingsBuilder.deleteAgentGatewayOperationSettings().build(); listLocationsSettings = settingsBuilder.listLocationsSettings().build(); getLocationSettings = settingsBuilder.getLocationSettings().build(); setIamPolicySettings = settingsBuilder.setIamPolicySettings().build(); @@ -2209,6 +2345,25 @@ public static class Builder extends StubSettings.Builder listMeshRouteViewsSettings; + private final PagedCallSettings.Builder< + ListAgentGatewaysRequest, ListAgentGatewaysResponse, ListAgentGatewaysPagedResponse> + listAgentGatewaysSettings; + private final UnaryCallSettings.Builder + getAgentGatewaySettings; + private final UnaryCallSettings.Builder + createAgentGatewaySettings; + private final OperationCallSettings.Builder< + CreateAgentGatewayRequest, AgentGateway, OperationMetadata> + createAgentGatewayOperationSettings; + private final UnaryCallSettings.Builder + updateAgentGatewaySettings; + private final OperationCallSettings.Builder< + UpdateAgentGatewayRequest, AgentGateway, OperationMetadata> + updateAgentGatewayOperationSettings; + private final UnaryCallSettings.Builder + deleteAgentGatewaySettings; + private final OperationCallSettings.Builder + deleteAgentGatewayOperationSettings; private final PagedCallSettings.Builder< ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> listLocationsSettings; @@ -2347,6 +2502,14 @@ protected Builder(ClientContext clientContext) { PagedCallSettings.newBuilder(LIST_GATEWAY_ROUTE_VIEWS_PAGE_STR_FACT); listMeshRouteViewsSettings = PagedCallSettings.newBuilder(LIST_MESH_ROUTE_VIEWS_PAGE_STR_FACT); + listAgentGatewaysSettings = PagedCallSettings.newBuilder(LIST_AGENT_GATEWAYS_PAGE_STR_FACT); + getAgentGatewaySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createAgentGatewaySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createAgentGatewayOperationSettings = OperationCallSettings.newBuilder(); + updateAgentGatewaySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updateAgentGatewayOperationSettings = OperationCallSettings.newBuilder(); + deleteAgentGatewaySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deleteAgentGatewayOperationSettings = OperationCallSettings.newBuilder(); listLocationsSettings = PagedCallSettings.newBuilder(LIST_LOCATIONS_PAGE_STR_FACT); getLocationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); setIamPolicySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); @@ -2413,6 +2576,11 @@ protected Builder(ClientContext clientContext) { getMeshRouteViewSettings, listGatewayRouteViewsSettings, listMeshRouteViewsSettings, + listAgentGatewaysSettings, + getAgentGatewaySettings, + createAgentGatewaySettings, + updateAgentGatewaySettings, + deleteAgentGatewaySettings, listLocationsSettings, getLocationSettings, setIamPolicySettings, @@ -2525,6 +2693,17 @@ protected Builder(NetworkServicesStubSettings settings) { getMeshRouteViewSettings = settings.getMeshRouteViewSettings.toBuilder(); listGatewayRouteViewsSettings = settings.listGatewayRouteViewsSettings.toBuilder(); listMeshRouteViewsSettings = settings.listMeshRouteViewsSettings.toBuilder(); + listAgentGatewaysSettings = settings.listAgentGatewaysSettings.toBuilder(); + getAgentGatewaySettings = settings.getAgentGatewaySettings.toBuilder(); + createAgentGatewaySettings = settings.createAgentGatewaySettings.toBuilder(); + createAgentGatewayOperationSettings = + settings.createAgentGatewayOperationSettings.toBuilder(); + updateAgentGatewaySettings = settings.updateAgentGatewaySettings.toBuilder(); + updateAgentGatewayOperationSettings = + settings.updateAgentGatewayOperationSettings.toBuilder(); + deleteAgentGatewaySettings = settings.deleteAgentGatewaySettings.toBuilder(); + deleteAgentGatewayOperationSettings = + settings.deleteAgentGatewayOperationSettings.toBuilder(); listLocationsSettings = settings.listLocationsSettings.toBuilder(); getLocationSettings = settings.getLocationSettings.toBuilder(); setIamPolicySettings = settings.setIamPolicySettings.toBuilder(); @@ -2591,6 +2770,11 @@ protected Builder(NetworkServicesStubSettings settings) { getMeshRouteViewSettings, listGatewayRouteViewsSettings, listMeshRouteViewsSettings, + listAgentGatewaysSettings, + getAgentGatewaySettings, + createAgentGatewaySettings, + updateAgentGatewaySettings, + deleteAgentGatewaySettings, listLocationsSettings, getLocationSettings, setIamPolicySettings, @@ -2913,6 +3097,31 @@ private static Builder initDefaults(Builder builder) { .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + builder + .listAgentGatewaysSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + + builder + .getAgentGatewaySettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + + builder + .createAgentGatewaySettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + + builder + .updateAgentGatewaySettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + + builder + .deleteAgentGatewaySettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + builder .listLocationsSettings() .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) @@ -3701,6 +3910,78 @@ private static Builder initDefaults(Builder builder) { .setTotalTimeoutDuration(Duration.ofMillis(300000L)) .build())); + builder + .createAgentGatewayOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(AgentGateway.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelayDuration(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelayDuration(Duration.ofMillis(45000L)) + .setInitialRpcTimeoutDuration(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeoutDuration(Duration.ZERO) + .setTotalTimeoutDuration(Duration.ofMillis(300000L)) + .build())); + + builder + .updateAgentGatewayOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(AgentGateway.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelayDuration(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelayDuration(Duration.ofMillis(45000L)) + .setInitialRpcTimeoutDuration(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeoutDuration(Duration.ZERO) + .setTotalTimeoutDuration(Duration.ofMillis(300000L)) + .build())); + + builder + .deleteAgentGatewayOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Empty.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelayDuration(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelayDuration(Duration.ofMillis(45000L)) + .setInitialRpcTimeoutDuration(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeoutDuration(Duration.ZERO) + .setTotalTimeoutDuration(Duration.ofMillis(300000L)) + .build())); + return builder; } @@ -4263,6 +4544,55 @@ public UnaryCallSettings.Builder deleteMeshSetting return listMeshRouteViewsSettings; } + /** Returns the builder for the settings used for calls to listAgentGateways. */ + public PagedCallSettings.Builder< + ListAgentGatewaysRequest, ListAgentGatewaysResponse, ListAgentGatewaysPagedResponse> + listAgentGatewaysSettings() { + return listAgentGatewaysSettings; + } + + /** Returns the builder for the settings used for calls to getAgentGateway. */ + public UnaryCallSettings.Builder + getAgentGatewaySettings() { + return getAgentGatewaySettings; + } + + /** Returns the builder for the settings used for calls to createAgentGateway. */ + public UnaryCallSettings.Builder + createAgentGatewaySettings() { + return createAgentGatewaySettings; + } + + /** Returns the builder for the settings used for calls to createAgentGateway. */ + public OperationCallSettings.Builder + createAgentGatewayOperationSettings() { + return createAgentGatewayOperationSettings; + } + + /** Returns the builder for the settings used for calls to updateAgentGateway. */ + public UnaryCallSettings.Builder + updateAgentGatewaySettings() { + return updateAgentGatewaySettings; + } + + /** Returns the builder for the settings used for calls to updateAgentGateway. */ + public OperationCallSettings.Builder + updateAgentGatewayOperationSettings() { + return updateAgentGatewayOperationSettings; + } + + /** Returns the builder for the settings used for calls to deleteAgentGateway. */ + public UnaryCallSettings.Builder + deleteAgentGatewaySettings() { + return deleteAgentGatewaySettings; + } + + /** Returns the builder for the settings used for calls to deleteAgentGateway. */ + public OperationCallSettings.Builder + deleteAgentGatewayOperationSettings() { + return deleteAgentGatewayOperationSettings; + } + /** Returns the builder for the settings used for calls to listLocations. */ public PagedCallSettings.Builder< ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> diff --git a/java-networkservices/google-cloud-networkservices/src/main/resources/META-INF/native-image/com.google.cloud.networkservices.v1/reflect-config.json b/java-networkservices/google-cloud-networkservices/src/main/resources/META-INF/native-image/com.google.cloud.networkservices.v1/reflect-config.json index a7bc72219571..76caf494c802 100644 --- a/java-networkservices/google-cloud-networkservices/src/main/resources/META-INF/native-image/com.google.cloud.networkservices.v1/reflect-config.json +++ b/java-networkservices/google-cloud-networkservices/src/main/resources/META-INF/native-image/com.google.cloud.networkservices.v1/reflect-config.json @@ -593,6 +593,168 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.networkservices.v1.AgentGateway", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkservices.v1.AgentGateway$AgentGatewayOutputCard", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkservices.v1.AgentGateway$AgentGatewayOutputCard$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkservices.v1.AgentGateway$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkservices.v1.AgentGateway$GoogleManaged", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkservices.v1.AgentGateway$GoogleManaged$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkservices.v1.AgentGateway$GoogleManaged$GovernedAccessPath", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkservices.v1.AgentGateway$NetworkConfig", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkservices.v1.AgentGateway$NetworkConfig$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkservices.v1.AgentGateway$NetworkConfig$DnsPeeringConfig", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkservices.v1.AgentGateway$NetworkConfig$DnsPeeringConfig$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkservices.v1.AgentGateway$NetworkConfig$Egress", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkservices.v1.AgentGateway$NetworkConfig$Egress$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkservices.v1.AgentGateway$NetworkConfig$Egress$TrustConfig", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkservices.v1.AgentGateway$NetworkConfig$Egress$TrustConfig$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkservices.v1.AgentGateway$Protocol", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkservices.v1.AgentGateway$SelfManaged", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkservices.v1.AgentGateway$SelfManaged$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.networkservices.v1.AuthzExtension", "queryAllDeclaredConstructors": true, @@ -611,6 +773,33 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.networkservices.v1.BodySendMode", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkservices.v1.CreateAgentGatewayRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkservices.v1.CreateAgentGatewayRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.networkservices.v1.CreateAuthzExtensionRequest", "queryAllDeclaredConstructors": true, @@ -881,6 +1070,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.networkservices.v1.DeleteAgentGatewayRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkservices.v1.DeleteAgentGatewayRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.networkservices.v1.DeleteAuthzExtensionRequest", "queryAllDeclaredConstructors": true, @@ -1376,6 +1583,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.networkservices.v1.GetAgentGatewayRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkservices.v1.GetAgentGatewayRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.networkservices.v1.GetAuthzExtensionRequest", "queryAllDeclaredConstructors": true, @@ -2321,6 +2546,42 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.networkservices.v1.ListAgentGatewaysRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkservices.v1.ListAgentGatewaysRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkservices.v1.ListAgentGatewaysResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkservices.v1.ListAgentGatewaysResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.networkservices.v1.ListAuthzExtensionsRequest", "queryAllDeclaredConstructors": true, @@ -3311,6 +3572,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.networkservices.v1.UpdateAgentGatewayRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.networkservices.v1.UpdateAgentGatewayRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.networkservices.v1.UpdateAuthzExtensionRequest", "queryAllDeclaredConstructors": true, diff --git a/java-networkservices/google-cloud-networkservices/src/test/java/com/google/cloud/networkservices/v1/DepServiceClientHttpJsonTest.java b/java-networkservices/google-cloud-networkservices/src/test/java/com/google/cloud/networkservices/v1/DepServiceClientHttpJsonTest.java index 046166836ff8..a3d839af83cd 100644 --- a/java-networkservices/google-cloud-networkservices/src/test/java/com/google/cloud/networkservices/v1/DepServiceClientHttpJsonTest.java +++ b/java-networkservices/google-cloud-networkservices/src/test/java/com/google/cloud/networkservices/v1/DepServiceClientHttpJsonTest.java @@ -1775,6 +1775,7 @@ public void getAuthzExtensionTest() throws Exception { .setFailOpen(true) .setMetadata(Struct.newBuilder().build()) .addAllForwardHeaders(new ArrayList()) + .addAllForwardAttributes(new ArrayList()) .setWireFormat(WireFormat.forNumber(0)) .build(); mockService.addResponse(expectedResponse); @@ -1833,6 +1834,7 @@ public void getAuthzExtensionTest2() throws Exception { .setFailOpen(true) .setMetadata(Struct.newBuilder().build()) .addAllForwardHeaders(new ArrayList()) + .addAllForwardAttributes(new ArrayList()) .setWireFormat(WireFormat.forNumber(0)) .build(); mockService.addResponse(expectedResponse); @@ -1892,6 +1894,7 @@ public void createAuthzExtensionTest() throws Exception { .setFailOpen(true) .setMetadata(Struct.newBuilder().build()) .addAllForwardHeaders(new ArrayList()) + .addAllForwardAttributes(new ArrayList()) .setWireFormat(WireFormat.forNumber(0)) .build(); Operation resultOperation = @@ -1959,6 +1962,7 @@ public void createAuthzExtensionTest2() throws Exception { .setFailOpen(true) .setMetadata(Struct.newBuilder().build()) .addAllForwardHeaders(new ArrayList()) + .addAllForwardAttributes(new ArrayList()) .setWireFormat(WireFormat.forNumber(0)) .build(); Operation resultOperation = @@ -2026,6 +2030,7 @@ public void updateAuthzExtensionTest() throws Exception { .setFailOpen(true) .setMetadata(Struct.newBuilder().build()) .addAllForwardHeaders(new ArrayList()) + .addAllForwardAttributes(new ArrayList()) .setWireFormat(WireFormat.forNumber(0)) .build(); Operation resultOperation = @@ -2051,6 +2056,7 @@ public void updateAuthzExtensionTest() throws Exception { .setFailOpen(true) .setMetadata(Struct.newBuilder().build()) .addAllForwardHeaders(new ArrayList()) + .addAllForwardAttributes(new ArrayList()) .setWireFormat(WireFormat.forNumber(0)) .build(); FieldMask updateMask = FieldMask.newBuilder().build(); @@ -2097,6 +2103,7 @@ public void updateAuthzExtensionExceptionTest() throws Exception { .setFailOpen(true) .setMetadata(Struct.newBuilder().build()) .addAllForwardHeaders(new ArrayList()) + .addAllForwardAttributes(new ArrayList()) .setWireFormat(WireFormat.forNumber(0)) .build(); FieldMask updateMask = FieldMask.newBuilder().build(); diff --git a/java-networkservices/google-cloud-networkservices/src/test/java/com/google/cloud/networkservices/v1/DepServiceClientTest.java b/java-networkservices/google-cloud-networkservices/src/test/java/com/google/cloud/networkservices/v1/DepServiceClientTest.java index 9658fb789687..09dacc1bc7d0 100644 --- a/java-networkservices/google-cloud-networkservices/src/test/java/com/google/cloud/networkservices/v1/DepServiceClientTest.java +++ b/java-networkservices/google-cloud-networkservices/src/test/java/com/google/cloud/networkservices/v1/DepServiceClientTest.java @@ -1607,6 +1607,7 @@ public void getAuthzExtensionTest() throws Exception { .setFailOpen(true) .setMetadata(Struct.newBuilder().build()) .addAllForwardHeaders(new ArrayList()) + .addAllForwardAttributes(new ArrayList()) .setWireFormat(WireFormat.forNumber(0)) .build(); mockDepService.addResponse(expectedResponse); @@ -1659,6 +1660,7 @@ public void getAuthzExtensionTest2() throws Exception { .setFailOpen(true) .setMetadata(Struct.newBuilder().build()) .addAllForwardHeaders(new ArrayList()) + .addAllForwardAttributes(new ArrayList()) .setWireFormat(WireFormat.forNumber(0)) .build(); mockDepService.addResponse(expectedResponse); @@ -1710,6 +1712,7 @@ public void createAuthzExtensionTest() throws Exception { .setFailOpen(true) .setMetadata(Struct.newBuilder().build()) .addAllForwardHeaders(new ArrayList()) + .addAllForwardAttributes(new ArrayList()) .setWireFormat(WireFormat.forNumber(0)) .build(); Operation resultOperation = @@ -1777,6 +1780,7 @@ public void createAuthzExtensionTest2() throws Exception { .setFailOpen(true) .setMetadata(Struct.newBuilder().build()) .addAllForwardHeaders(new ArrayList()) + .addAllForwardAttributes(new ArrayList()) .setWireFormat(WireFormat.forNumber(0)) .build(); Operation resultOperation = @@ -1844,6 +1848,7 @@ public void updateAuthzExtensionTest() throws Exception { .setFailOpen(true) .setMetadata(Struct.newBuilder().build()) .addAllForwardHeaders(new ArrayList()) + .addAllForwardAttributes(new ArrayList()) .setWireFormat(WireFormat.forNumber(0)) .build(); Operation resultOperation = diff --git a/java-networkservices/google-cloud-networkservices/src/test/java/com/google/cloud/networkservices/v1/MockNetworkServicesImpl.java b/java-networkservices/google-cloud-networkservices/src/test/java/com/google/cloud/networkservices/v1/MockNetworkServicesImpl.java index 06cd180267e1..2ffa2940dffe 100644 --- a/java-networkservices/google-cloud-networkservices/src/test/java/com/google/cloud/networkservices/v1/MockNetworkServicesImpl.java +++ b/java-networkservices/google-cloud-networkservices/src/test/java/com/google/cloud/networkservices/v1/MockNetworkServicesImpl.java @@ -1291,4 +1291,110 @@ public void listMeshRouteViews( Exception.class.getName()))); } } + + @Override + public void listAgentGateways( + ListAgentGatewaysRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListAgentGatewaysResponse) { + requests.add(request); + responseObserver.onNext(((ListAgentGatewaysResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListAgentGateways, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListAgentGatewaysResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getAgentGateway( + GetAgentGatewayRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof AgentGateway) { + requests.add(request); + responseObserver.onNext(((AgentGateway) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetAgentGateway, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + AgentGateway.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void createAgentGateway( + CreateAgentGatewayRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method CreateAgentGateway, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void updateAgentGateway( + UpdateAgentGatewayRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method UpdateAgentGateway, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void deleteAgentGateway( + DeleteAgentGatewayRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method DeleteAgentGateway, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } } diff --git a/java-networkservices/google-cloud-networkservices/src/test/java/com/google/cloud/networkservices/v1/NetworkServicesClientHttpJsonTest.java b/java-networkservices/google-cloud-networkservices/src/test/java/com/google/cloud/networkservices/v1/NetworkServicesClientHttpJsonTest.java index 3bafed144056..c6da7fb99e8c 100644 --- a/java-networkservices/google-cloud-networkservices/src/test/java/com/google/cloud/networkservices/v1/NetworkServicesClientHttpJsonTest.java +++ b/java-networkservices/google-cloud-networkservices/src/test/java/com/google/cloud/networkservices/v1/NetworkServicesClientHttpJsonTest.java @@ -16,6 +16,7 @@ package com.google.cloud.networkservices.v1; +import static com.google.cloud.networkservices.v1.NetworkServicesClient.ListAgentGatewaysPagedResponse; import static com.google.cloud.networkservices.v1.NetworkServicesClient.ListEndpointPoliciesPagedResponse; import static com.google.cloud.networkservices.v1.NetworkServicesClient.ListGatewayRouteViewsPagedResponse; import static com.google.cloud.networkservices.v1.NetworkServicesClient.ListGatewaysPagedResponse; @@ -1678,6 +1679,7 @@ public void getGatewayTest() throws Exception { .setDescription("description-1724546052") .addAllAddresses(new ArrayList()) .addAllPorts(new ArrayList()) + .setAllPorts(true) .setScope("scope109264468") .setServerTlsPolicy("serverTlsPolicy-1897015798") .addAllCertificateUrls(new ArrayList()) @@ -1685,6 +1687,7 @@ public void getGatewayTest() throws Exception { .setNetwork("network1843485230") .setSubnetwork("subnetwork-1302785042") .setEnvoyHeaders(EnvoyHeaders.forNumber(0)) + .setAllowGlobalAccess(true) .build(); mockService.addResponse(expectedResponse); @@ -1736,6 +1739,7 @@ public void getGatewayTest2() throws Exception { .setDescription("description-1724546052") .addAllAddresses(new ArrayList()) .addAllPorts(new ArrayList()) + .setAllPorts(true) .setScope("scope109264468") .setServerTlsPolicy("serverTlsPolicy-1897015798") .addAllCertificateUrls(new ArrayList()) @@ -1743,6 +1747,7 @@ public void getGatewayTest2() throws Exception { .setNetwork("network1843485230") .setSubnetwork("subnetwork-1302785042") .setEnvoyHeaders(EnvoyHeaders.forNumber(0)) + .setAllowGlobalAccess(true) .build(); mockService.addResponse(expectedResponse); @@ -1794,6 +1799,7 @@ public void createGatewayTest() throws Exception { .setDescription("description-1724546052") .addAllAddresses(new ArrayList()) .addAllPorts(new ArrayList()) + .setAllPorts(true) .setScope("scope109264468") .setServerTlsPolicy("serverTlsPolicy-1897015798") .addAllCertificateUrls(new ArrayList()) @@ -1801,6 +1807,7 @@ public void createGatewayTest() throws Exception { .setNetwork("network1843485230") .setSubnetwork("subnetwork-1302785042") .setEnvoyHeaders(EnvoyHeaders.forNumber(0)) + .setAllowGlobalAccess(true) .build(); Operation resultOperation = Operation.newBuilder() @@ -1861,6 +1868,7 @@ public void createGatewayTest2() throws Exception { .setDescription("description-1724546052") .addAllAddresses(new ArrayList()) .addAllPorts(new ArrayList()) + .setAllPorts(true) .setScope("scope109264468") .setServerTlsPolicy("serverTlsPolicy-1897015798") .addAllCertificateUrls(new ArrayList()) @@ -1868,6 +1876,7 @@ public void createGatewayTest2() throws Exception { .setNetwork("network1843485230") .setSubnetwork("subnetwork-1302785042") .setEnvoyHeaders(EnvoyHeaders.forNumber(0)) + .setAllowGlobalAccess(true) .build(); Operation resultOperation = Operation.newBuilder() @@ -1928,6 +1937,7 @@ public void updateGatewayTest() throws Exception { .setDescription("description-1724546052") .addAllAddresses(new ArrayList()) .addAllPorts(new ArrayList()) + .setAllPorts(true) .setScope("scope109264468") .setServerTlsPolicy("serverTlsPolicy-1897015798") .addAllCertificateUrls(new ArrayList()) @@ -1935,6 +1945,7 @@ public void updateGatewayTest() throws Exception { .setNetwork("network1843485230") .setSubnetwork("subnetwork-1302785042") .setEnvoyHeaders(EnvoyHeaders.forNumber(0)) + .setAllowGlobalAccess(true) .build(); Operation resultOperation = Operation.newBuilder() @@ -1954,6 +1965,7 @@ public void updateGatewayTest() throws Exception { .setDescription("description-1724546052") .addAllAddresses(new ArrayList()) .addAllPorts(new ArrayList()) + .setAllPorts(true) .setScope("scope109264468") .setServerTlsPolicy("serverTlsPolicy-1897015798") .addAllCertificateUrls(new ArrayList()) @@ -1961,6 +1973,7 @@ public void updateGatewayTest() throws Exception { .setNetwork("network1843485230") .setSubnetwork("subnetwork-1302785042") .setEnvoyHeaders(EnvoyHeaders.forNumber(0)) + .setAllowGlobalAccess(true) .build(); FieldMask updateMask = FieldMask.newBuilder().build(); @@ -2000,6 +2013,7 @@ public void updateGatewayExceptionTest() throws Exception { .setDescription("description-1724546052") .addAllAddresses(new ArrayList()) .addAllPorts(new ArrayList()) + .setAllPorts(true) .setScope("scope109264468") .setServerTlsPolicy("serverTlsPolicy-1897015798") .addAllCertificateUrls(new ArrayList()) @@ -2007,6 +2021,7 @@ public void updateGatewayExceptionTest() throws Exception { .setNetwork("network1843485230") .setSubnetwork("subnetwork-1302785042") .setEnvoyHeaders(EnvoyHeaders.forNumber(0)) + .setAllowGlobalAccess(true) .build(); FieldMask updateMask = FieldMask.newBuilder().build(); client.updateGatewayAsync(gateway, updateMask).get(); @@ -3722,6 +3737,7 @@ public void getTlsRouteTest() throws Exception { .addAllRules(new ArrayList()) .addAllMeshes(new ArrayList()) .addAllGateways(new ArrayList()) + .addAllTargetProxies(new ArrayList()) .putAllLabels(new HashMap()) .build(); mockService.addResponse(expectedResponse); @@ -3774,6 +3790,7 @@ public void getTlsRouteTest2() throws Exception { .addAllRules(new ArrayList()) .addAllMeshes(new ArrayList()) .addAllGateways(new ArrayList()) + .addAllTargetProxies(new ArrayList()) .putAllLabels(new HashMap()) .build(); mockService.addResponse(expectedResponse); @@ -3826,6 +3843,7 @@ public void createTlsRouteTest() throws Exception { .addAllRules(new ArrayList()) .addAllMeshes(new ArrayList()) .addAllGateways(new ArrayList()) + .addAllTargetProxies(new ArrayList()) .putAllLabels(new HashMap()) .build(); Operation resultOperation = @@ -3887,6 +3905,7 @@ public void createTlsRouteTest2() throws Exception { .addAllRules(new ArrayList()) .addAllMeshes(new ArrayList()) .addAllGateways(new ArrayList()) + .addAllTargetProxies(new ArrayList()) .putAllLabels(new HashMap()) .build(); Operation resultOperation = @@ -3948,6 +3967,7 @@ public void updateTlsRouteTest() throws Exception { .addAllRules(new ArrayList()) .addAllMeshes(new ArrayList()) .addAllGateways(new ArrayList()) + .addAllTargetProxies(new ArrayList()) .putAllLabels(new HashMap()) .build(); Operation resultOperation = @@ -3968,6 +3988,7 @@ public void updateTlsRouteTest() throws Exception { .addAllRules(new ArrayList()) .addAllMeshes(new ArrayList()) .addAllGateways(new ArrayList()) + .addAllTargetProxies(new ArrayList()) .putAllLabels(new HashMap()) .build(); FieldMask updateMask = FieldMask.newBuilder().build(); @@ -4008,6 +4029,7 @@ public void updateTlsRouteExceptionTest() throws Exception { .addAllRules(new ArrayList()) .addAllMeshes(new ArrayList()) .addAllGateways(new ArrayList()) + .addAllTargetProxies(new ArrayList()) .putAllLabels(new HashMap()) .build(); FieldMask updateMask = FieldMask.newBuilder().build(); @@ -6013,6 +6035,512 @@ public void listMeshRouteViewsExceptionTest2() throws Exception { } } + @Test + public void listAgentGatewaysTest() throws Exception { + AgentGateway responsesElement = AgentGateway.newBuilder().build(); + ListAgentGatewaysResponse expectedResponse = + ListAgentGatewaysResponse.newBuilder() + .setNextPageToken("") + .addAllAgentGateways(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListAgentGatewaysPagedResponse pagedListResponse = client.listAgentGateways(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getAgentGatewaysList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listAgentGatewaysExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.listAgentGateways(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listAgentGatewaysTest2() throws Exception { + AgentGateway responsesElement = AgentGateway.newBuilder().build(); + ListAgentGatewaysResponse expectedResponse = + ListAgentGatewaysResponse.newBuilder() + .setNextPageToken("") + .addAllAgentGateways(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-5833/locations/location-5833"; + + ListAgentGatewaysPagedResponse pagedListResponse = client.listAgentGateways(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getAgentGatewaysList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listAgentGatewaysExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-5833/locations/location-5833"; + client.listAgentGateways(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getAgentGatewayTest() throws Exception { + AgentGateway expectedResponse = + AgentGateway.newBuilder() + .setName(AgentGatewayName.of("[PROJECT]", "[LOCATION]", "[AGENT_GATEWAY]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setDescription("description-1724546052") + .setEtag("etag3123477") + .addAllProtocols(new ArrayList()) + .addAllRegistries(new ArrayList()) + .setNetworkConfig(AgentGateway.NetworkConfig.newBuilder().build()) + .setAgentGatewayCard(AgentGateway.AgentGatewayOutputCard.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + AgentGatewayName name = AgentGatewayName.of("[PROJECT]", "[LOCATION]", "[AGENT_GATEWAY]"); + + AgentGateway actualResponse = client.getAgentGateway(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getAgentGatewayExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + AgentGatewayName name = AgentGatewayName.of("[PROJECT]", "[LOCATION]", "[AGENT_GATEWAY]"); + client.getAgentGateway(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getAgentGatewayTest2() throws Exception { + AgentGateway expectedResponse = + AgentGateway.newBuilder() + .setName(AgentGatewayName.of("[PROJECT]", "[LOCATION]", "[AGENT_GATEWAY]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setDescription("description-1724546052") + .setEtag("etag3123477") + .addAllProtocols(new ArrayList()) + .addAllRegistries(new ArrayList()) + .setNetworkConfig(AgentGateway.NetworkConfig.newBuilder().build()) + .setAgentGatewayCard(AgentGateway.AgentGatewayOutputCard.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + String name = "projects/project-7322/locations/location-7322/agentGateways/agentGateway-7322"; + + AgentGateway actualResponse = client.getAgentGateway(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getAgentGatewayExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "projects/project-7322/locations/location-7322/agentGateways/agentGateway-7322"; + client.getAgentGateway(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createAgentGatewayTest() throws Exception { + AgentGateway expectedResponse = + AgentGateway.newBuilder() + .setName(AgentGatewayName.of("[PROJECT]", "[LOCATION]", "[AGENT_GATEWAY]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setDescription("description-1724546052") + .setEtag("etag3123477") + .addAllProtocols(new ArrayList()) + .addAllRegistries(new ArrayList()) + .setNetworkConfig(AgentGateway.NetworkConfig.newBuilder().build()) + .setAgentGatewayCard(AgentGateway.AgentGatewayOutputCard.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createAgentGatewayTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + AgentGateway agentGateway = AgentGateway.newBuilder().build(); + String agentGatewayId = "agentGatewayId1729577210"; + + AgentGateway actualResponse = + client.createAgentGatewayAsync(parent, agentGateway, agentGatewayId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createAgentGatewayExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + AgentGateway agentGateway = AgentGateway.newBuilder().build(); + String agentGatewayId = "agentGatewayId1729577210"; + client.createAgentGatewayAsync(parent, agentGateway, agentGatewayId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void createAgentGatewayTest2() throws Exception { + AgentGateway expectedResponse = + AgentGateway.newBuilder() + .setName(AgentGatewayName.of("[PROJECT]", "[LOCATION]", "[AGENT_GATEWAY]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setDescription("description-1724546052") + .setEtag("etag3123477") + .addAllProtocols(new ArrayList()) + .addAllRegistries(new ArrayList()) + .setNetworkConfig(AgentGateway.NetworkConfig.newBuilder().build()) + .setAgentGatewayCard(AgentGateway.AgentGatewayOutputCard.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createAgentGatewayTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String parent = "projects/project-5833/locations/location-5833"; + AgentGateway agentGateway = AgentGateway.newBuilder().build(); + String agentGatewayId = "agentGatewayId1729577210"; + + AgentGateway actualResponse = + client.createAgentGatewayAsync(parent, agentGateway, agentGatewayId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createAgentGatewayExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-5833/locations/location-5833"; + AgentGateway agentGateway = AgentGateway.newBuilder().build(); + String agentGatewayId = "agentGatewayId1729577210"; + client.createAgentGatewayAsync(parent, agentGateway, agentGatewayId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void updateAgentGatewayTest() throws Exception { + AgentGateway expectedResponse = + AgentGateway.newBuilder() + .setName(AgentGatewayName.of("[PROJECT]", "[LOCATION]", "[AGENT_GATEWAY]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setDescription("description-1724546052") + .setEtag("etag3123477") + .addAllProtocols(new ArrayList()) + .addAllRegistries(new ArrayList()) + .setNetworkConfig(AgentGateway.NetworkConfig.newBuilder().build()) + .setAgentGatewayCard(AgentGateway.AgentGatewayOutputCard.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("updateAgentGatewayTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + AgentGateway agentGateway = + AgentGateway.newBuilder() + .setName(AgentGatewayName.of("[PROJECT]", "[LOCATION]", "[AGENT_GATEWAY]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setDescription("description-1724546052") + .setEtag("etag3123477") + .addAllProtocols(new ArrayList()) + .addAllRegistries(new ArrayList()) + .setNetworkConfig(AgentGateway.NetworkConfig.newBuilder().build()) + .setAgentGatewayCard(AgentGateway.AgentGatewayOutputCard.newBuilder().build()) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + AgentGateway actualResponse = client.updateAgentGatewayAsync(agentGateway, updateMask).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void updateAgentGatewayExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + AgentGateway agentGateway = + AgentGateway.newBuilder() + .setName(AgentGatewayName.of("[PROJECT]", "[LOCATION]", "[AGENT_GATEWAY]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setDescription("description-1724546052") + .setEtag("etag3123477") + .addAllProtocols(new ArrayList()) + .addAllRegistries(new ArrayList()) + .setNetworkConfig(AgentGateway.NetworkConfig.newBuilder().build()) + .setAgentGatewayCard(AgentGateway.AgentGatewayOutputCard.newBuilder().build()) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateAgentGatewayAsync(agentGateway, updateMask).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void deleteAgentGatewayTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteAgentGatewayTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + AgentGatewayName name = AgentGatewayName.of("[PROJECT]", "[LOCATION]", "[AGENT_GATEWAY]"); + + client.deleteAgentGatewayAsync(name).get(); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deleteAgentGatewayExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + AgentGatewayName name = AgentGatewayName.of("[PROJECT]", "[LOCATION]", "[AGENT_GATEWAY]"); + client.deleteAgentGatewayAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void deleteAgentGatewayTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteAgentGatewayTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String name = "projects/project-7322/locations/location-7322/agentGateways/agentGateway-7322"; + + client.deleteAgentGatewayAsync(name).get(); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deleteAgentGatewayExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "projects/project-7322/locations/location-7322/agentGateways/agentGateway-7322"; + client.deleteAgentGatewayAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + @Test public void listLocationsTest() throws Exception { Location responsesElement = Location.newBuilder().build(); diff --git a/java-networkservices/google-cloud-networkservices/src/test/java/com/google/cloud/networkservices/v1/NetworkServicesClientTest.java b/java-networkservices/google-cloud-networkservices/src/test/java/com/google/cloud/networkservices/v1/NetworkServicesClientTest.java index 7ca5705d9539..4364ecd50977 100644 --- a/java-networkservices/google-cloud-networkservices/src/test/java/com/google/cloud/networkservices/v1/NetworkServicesClientTest.java +++ b/java-networkservices/google-cloud-networkservices/src/test/java/com/google/cloud/networkservices/v1/NetworkServicesClientTest.java @@ -16,6 +16,7 @@ package com.google.cloud.networkservices.v1; +import static com.google.cloud.networkservices.v1.NetworkServicesClient.ListAgentGatewaysPagedResponse; import static com.google.cloud.networkservices.v1.NetworkServicesClient.ListEndpointPoliciesPagedResponse; import static com.google.cloud.networkservices.v1.NetworkServicesClient.ListGatewayRouteViewsPagedResponse; import static com.google.cloud.networkservices.v1.NetworkServicesClient.ListGatewaysPagedResponse; @@ -1534,6 +1535,7 @@ public void getGatewayTest() throws Exception { .setDescription("description-1724546052") .addAllAddresses(new ArrayList()) .addAllPorts(new ArrayList()) + .setAllPorts(true) .setScope("scope109264468") .setServerTlsPolicy("serverTlsPolicy-1897015798") .addAllCertificateUrls(new ArrayList()) @@ -1541,6 +1543,7 @@ public void getGatewayTest() throws Exception { .setNetwork("network1843485230") .setSubnetwork("subnetwork-1302785042") .setEnvoyHeaders(EnvoyHeaders.forNumber(0)) + .setAllowGlobalAccess(true) .build(); mockNetworkServices.addResponse(expectedResponse); @@ -1586,6 +1589,7 @@ public void getGatewayTest2() throws Exception { .setDescription("description-1724546052") .addAllAddresses(new ArrayList()) .addAllPorts(new ArrayList()) + .setAllPorts(true) .setScope("scope109264468") .setServerTlsPolicy("serverTlsPolicy-1897015798") .addAllCertificateUrls(new ArrayList()) @@ -1593,6 +1597,7 @@ public void getGatewayTest2() throws Exception { .setNetwork("network1843485230") .setSubnetwork("subnetwork-1302785042") .setEnvoyHeaders(EnvoyHeaders.forNumber(0)) + .setAllowGlobalAccess(true) .build(); mockNetworkServices.addResponse(expectedResponse); @@ -1638,6 +1643,7 @@ public void createGatewayTest() throws Exception { .setDescription("description-1724546052") .addAllAddresses(new ArrayList()) .addAllPorts(new ArrayList()) + .setAllPorts(true) .setScope("scope109264468") .setServerTlsPolicy("serverTlsPolicy-1897015798") .addAllCertificateUrls(new ArrayList()) @@ -1645,6 +1651,7 @@ public void createGatewayTest() throws Exception { .setNetwork("network1843485230") .setSubnetwork("subnetwork-1302785042") .setEnvoyHeaders(EnvoyHeaders.forNumber(0)) + .setAllowGlobalAccess(true) .build(); Operation resultOperation = Operation.newBuilder() @@ -1704,6 +1711,7 @@ public void createGatewayTest2() throws Exception { .setDescription("description-1724546052") .addAllAddresses(new ArrayList()) .addAllPorts(new ArrayList()) + .setAllPorts(true) .setScope("scope109264468") .setServerTlsPolicy("serverTlsPolicy-1897015798") .addAllCertificateUrls(new ArrayList()) @@ -1711,6 +1719,7 @@ public void createGatewayTest2() throws Exception { .setNetwork("network1843485230") .setSubnetwork("subnetwork-1302785042") .setEnvoyHeaders(EnvoyHeaders.forNumber(0)) + .setAllowGlobalAccess(true) .build(); Operation resultOperation = Operation.newBuilder() @@ -1770,6 +1779,7 @@ public void updateGatewayTest() throws Exception { .setDescription("description-1724546052") .addAllAddresses(new ArrayList()) .addAllPorts(new ArrayList()) + .setAllPorts(true) .setScope("scope109264468") .setServerTlsPolicy("serverTlsPolicy-1897015798") .addAllCertificateUrls(new ArrayList()) @@ -1777,6 +1787,7 @@ public void updateGatewayTest() throws Exception { .setNetwork("network1843485230") .setSubnetwork("subnetwork-1302785042") .setEnvoyHeaders(EnvoyHeaders.forNumber(0)) + .setAllowGlobalAccess(true) .build(); Operation resultOperation = Operation.newBuilder() @@ -3338,6 +3349,7 @@ public void getTlsRouteTest() throws Exception { .addAllRules(new ArrayList()) .addAllMeshes(new ArrayList()) .addAllGateways(new ArrayList()) + .addAllTargetProxies(new ArrayList()) .putAllLabels(new HashMap()) .build(); mockNetworkServices.addResponse(expectedResponse); @@ -3384,6 +3396,7 @@ public void getTlsRouteTest2() throws Exception { .addAllRules(new ArrayList()) .addAllMeshes(new ArrayList()) .addAllGateways(new ArrayList()) + .addAllTargetProxies(new ArrayList()) .putAllLabels(new HashMap()) .build(); mockNetworkServices.addResponse(expectedResponse); @@ -3430,6 +3443,7 @@ public void createTlsRouteTest() throws Exception { .addAllRules(new ArrayList()) .addAllMeshes(new ArrayList()) .addAllGateways(new ArrayList()) + .addAllTargetProxies(new ArrayList()) .putAllLabels(new HashMap()) .build(); Operation resultOperation = @@ -3490,6 +3504,7 @@ public void createTlsRouteTest2() throws Exception { .addAllRules(new ArrayList()) .addAllMeshes(new ArrayList()) .addAllGateways(new ArrayList()) + .addAllTargetProxies(new ArrayList()) .putAllLabels(new HashMap()) .build(); Operation resultOperation = @@ -3550,6 +3565,7 @@ public void updateTlsRouteTest() throws Exception { .addAllRules(new ArrayList()) .addAllMeshes(new ArrayList()) .addAllGateways(new ArrayList()) + .addAllTargetProxies(new ArrayList()) .putAllLabels(new HashMap()) .build(); Operation resultOperation = @@ -5374,6 +5390,454 @@ public void listMeshRouteViewsExceptionTest2() throws Exception { } } + @Test + public void listAgentGatewaysTest() throws Exception { + AgentGateway responsesElement = AgentGateway.newBuilder().build(); + ListAgentGatewaysResponse expectedResponse = + ListAgentGatewaysResponse.newBuilder() + .setNextPageToken("") + .addAllAgentGateways(Arrays.asList(responsesElement)) + .build(); + mockNetworkServices.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListAgentGatewaysPagedResponse pagedListResponse = client.listAgentGateways(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getAgentGatewaysList().get(0), resources.get(0)); + + List actualRequests = mockNetworkServices.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListAgentGatewaysRequest actualRequest = ((ListAgentGatewaysRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listAgentGatewaysExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockNetworkServices.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.listAgentGateways(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listAgentGatewaysTest2() throws Exception { + AgentGateway responsesElement = AgentGateway.newBuilder().build(); + ListAgentGatewaysResponse expectedResponse = + ListAgentGatewaysResponse.newBuilder() + .setNextPageToken("") + .addAllAgentGateways(Arrays.asList(responsesElement)) + .build(); + mockNetworkServices.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListAgentGatewaysPagedResponse pagedListResponse = client.listAgentGateways(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getAgentGatewaysList().get(0), resources.get(0)); + + List actualRequests = mockNetworkServices.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListAgentGatewaysRequest actualRequest = ((ListAgentGatewaysRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listAgentGatewaysExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockNetworkServices.addException(exception); + + try { + String parent = "parent-995424086"; + client.listAgentGateways(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getAgentGatewayTest() throws Exception { + AgentGateway expectedResponse = + AgentGateway.newBuilder() + .setName(AgentGatewayName.of("[PROJECT]", "[LOCATION]", "[AGENT_GATEWAY]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setDescription("description-1724546052") + .setEtag("etag3123477") + .addAllProtocols(new ArrayList()) + .addAllRegistries(new ArrayList()) + .setNetworkConfig(AgentGateway.NetworkConfig.newBuilder().build()) + .setAgentGatewayCard(AgentGateway.AgentGatewayOutputCard.newBuilder().build()) + .build(); + mockNetworkServices.addResponse(expectedResponse); + + AgentGatewayName name = AgentGatewayName.of("[PROJECT]", "[LOCATION]", "[AGENT_GATEWAY]"); + + AgentGateway actualResponse = client.getAgentGateway(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockNetworkServices.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetAgentGatewayRequest actualRequest = ((GetAgentGatewayRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getAgentGatewayExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockNetworkServices.addException(exception); + + try { + AgentGatewayName name = AgentGatewayName.of("[PROJECT]", "[LOCATION]", "[AGENT_GATEWAY]"); + client.getAgentGateway(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getAgentGatewayTest2() throws Exception { + AgentGateway expectedResponse = + AgentGateway.newBuilder() + .setName(AgentGatewayName.of("[PROJECT]", "[LOCATION]", "[AGENT_GATEWAY]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setDescription("description-1724546052") + .setEtag("etag3123477") + .addAllProtocols(new ArrayList()) + .addAllRegistries(new ArrayList()) + .setNetworkConfig(AgentGateway.NetworkConfig.newBuilder().build()) + .setAgentGatewayCard(AgentGateway.AgentGatewayOutputCard.newBuilder().build()) + .build(); + mockNetworkServices.addResponse(expectedResponse); + + String name = "name3373707"; + + AgentGateway actualResponse = client.getAgentGateway(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockNetworkServices.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetAgentGatewayRequest actualRequest = ((GetAgentGatewayRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getAgentGatewayExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockNetworkServices.addException(exception); + + try { + String name = "name3373707"; + client.getAgentGateway(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createAgentGatewayTest() throws Exception { + AgentGateway expectedResponse = + AgentGateway.newBuilder() + .setName(AgentGatewayName.of("[PROJECT]", "[LOCATION]", "[AGENT_GATEWAY]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setDescription("description-1724546052") + .setEtag("etag3123477") + .addAllProtocols(new ArrayList()) + .addAllRegistries(new ArrayList()) + .setNetworkConfig(AgentGateway.NetworkConfig.newBuilder().build()) + .setAgentGatewayCard(AgentGateway.AgentGatewayOutputCard.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createAgentGatewayTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockNetworkServices.addResponse(resultOperation); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + AgentGateway agentGateway = AgentGateway.newBuilder().build(); + String agentGatewayId = "agentGatewayId1729577210"; + + AgentGateway actualResponse = + client.createAgentGatewayAsync(parent, agentGateway, agentGatewayId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockNetworkServices.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateAgentGatewayRequest actualRequest = ((CreateAgentGatewayRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(agentGateway, actualRequest.getAgentGateway()); + Assert.assertEquals(agentGatewayId, actualRequest.getAgentGatewayId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createAgentGatewayExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockNetworkServices.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + AgentGateway agentGateway = AgentGateway.newBuilder().build(); + String agentGatewayId = "agentGatewayId1729577210"; + client.createAgentGatewayAsync(parent, agentGateway, agentGatewayId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void createAgentGatewayTest2() throws Exception { + AgentGateway expectedResponse = + AgentGateway.newBuilder() + .setName(AgentGatewayName.of("[PROJECT]", "[LOCATION]", "[AGENT_GATEWAY]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setDescription("description-1724546052") + .setEtag("etag3123477") + .addAllProtocols(new ArrayList()) + .addAllRegistries(new ArrayList()) + .setNetworkConfig(AgentGateway.NetworkConfig.newBuilder().build()) + .setAgentGatewayCard(AgentGateway.AgentGatewayOutputCard.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createAgentGatewayTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockNetworkServices.addResponse(resultOperation); + + String parent = "parent-995424086"; + AgentGateway agentGateway = AgentGateway.newBuilder().build(); + String agentGatewayId = "agentGatewayId1729577210"; + + AgentGateway actualResponse = + client.createAgentGatewayAsync(parent, agentGateway, agentGatewayId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockNetworkServices.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateAgentGatewayRequest actualRequest = ((CreateAgentGatewayRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(agentGateway, actualRequest.getAgentGateway()); + Assert.assertEquals(agentGatewayId, actualRequest.getAgentGatewayId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createAgentGatewayExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockNetworkServices.addException(exception); + + try { + String parent = "parent-995424086"; + AgentGateway agentGateway = AgentGateway.newBuilder().build(); + String agentGatewayId = "agentGatewayId1729577210"; + client.createAgentGatewayAsync(parent, agentGateway, agentGatewayId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void updateAgentGatewayTest() throws Exception { + AgentGateway expectedResponse = + AgentGateway.newBuilder() + .setName(AgentGatewayName.of("[PROJECT]", "[LOCATION]", "[AGENT_GATEWAY]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .setDescription("description-1724546052") + .setEtag("etag3123477") + .addAllProtocols(new ArrayList()) + .addAllRegistries(new ArrayList()) + .setNetworkConfig(AgentGateway.NetworkConfig.newBuilder().build()) + .setAgentGatewayCard(AgentGateway.AgentGatewayOutputCard.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("updateAgentGatewayTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockNetworkServices.addResponse(resultOperation); + + AgentGateway agentGateway = AgentGateway.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + AgentGateway actualResponse = client.updateAgentGatewayAsync(agentGateway, updateMask).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockNetworkServices.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateAgentGatewayRequest actualRequest = ((UpdateAgentGatewayRequest) actualRequests.get(0)); + + Assert.assertEquals(agentGateway, actualRequest.getAgentGateway()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updateAgentGatewayExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockNetworkServices.addException(exception); + + try { + AgentGateway agentGateway = AgentGateway.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateAgentGatewayAsync(agentGateway, updateMask).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void deleteAgentGatewayTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteAgentGatewayTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockNetworkServices.addResponse(resultOperation); + + AgentGatewayName name = AgentGatewayName.of("[PROJECT]", "[LOCATION]", "[AGENT_GATEWAY]"); + + client.deleteAgentGatewayAsync(name).get(); + + List actualRequests = mockNetworkServices.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteAgentGatewayRequest actualRequest = ((DeleteAgentGatewayRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteAgentGatewayExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockNetworkServices.addException(exception); + + try { + AgentGatewayName name = AgentGatewayName.of("[PROJECT]", "[LOCATION]", "[AGENT_GATEWAY]"); + client.deleteAgentGatewayAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void deleteAgentGatewayTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteAgentGatewayTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockNetworkServices.addResponse(resultOperation); + + String name = "name3373707"; + + client.deleteAgentGatewayAsync(name).get(); + + List actualRequests = mockNetworkServices.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteAgentGatewayRequest actualRequest = ((DeleteAgentGatewayRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteAgentGatewayExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockNetworkServices.addException(exception); + + try { + String name = "name3373707"; + client.deleteAgentGatewayAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + @Test public void listLocationsTest() throws Exception { Location responsesElement = Location.newBuilder().build(); diff --git a/java-networkservices/grpc-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/NetworkServicesGrpc.java b/java-networkservices/grpc-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/NetworkServicesGrpc.java index 456fbecf0b9e..9f836c3575ec 100644 --- a/java-networkservices/grpc-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/NetworkServicesGrpc.java +++ b/java-networkservices/grpc-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/NetworkServicesGrpc.java @@ -2766,6 +2766,241 @@ private NetworkServicesGrpc() {} return getListMeshRouteViewsMethod; } + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.networkservices.v1.ListAgentGatewaysRequest, + com.google.cloud.networkservices.v1.ListAgentGatewaysResponse> + getListAgentGatewaysMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListAgentGateways", + requestType = com.google.cloud.networkservices.v1.ListAgentGatewaysRequest.class, + responseType = com.google.cloud.networkservices.v1.ListAgentGatewaysResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.networkservices.v1.ListAgentGatewaysRequest, + com.google.cloud.networkservices.v1.ListAgentGatewaysResponse> + getListAgentGatewaysMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.networkservices.v1.ListAgentGatewaysRequest, + com.google.cloud.networkservices.v1.ListAgentGatewaysResponse> + getListAgentGatewaysMethod; + if ((getListAgentGatewaysMethod = NetworkServicesGrpc.getListAgentGatewaysMethod) == null) { + synchronized (NetworkServicesGrpc.class) { + if ((getListAgentGatewaysMethod = NetworkServicesGrpc.getListAgentGatewaysMethod) == null) { + NetworkServicesGrpc.getListAgentGatewaysMethod = + getListAgentGatewaysMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListAgentGateways")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.networkservices.v1.ListAgentGatewaysRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.networkservices.v1.ListAgentGatewaysResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new NetworkServicesMethodDescriptorSupplier("ListAgentGateways")) + .build(); + } + } + } + return getListAgentGatewaysMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.networkservices.v1.GetAgentGatewayRequest, + com.google.cloud.networkservices.v1.AgentGateway> + getGetAgentGatewayMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetAgentGateway", + requestType = com.google.cloud.networkservices.v1.GetAgentGatewayRequest.class, + responseType = com.google.cloud.networkservices.v1.AgentGateway.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.networkservices.v1.GetAgentGatewayRequest, + com.google.cloud.networkservices.v1.AgentGateway> + getGetAgentGatewayMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.networkservices.v1.GetAgentGatewayRequest, + com.google.cloud.networkservices.v1.AgentGateway> + getGetAgentGatewayMethod; + if ((getGetAgentGatewayMethod = NetworkServicesGrpc.getGetAgentGatewayMethod) == null) { + synchronized (NetworkServicesGrpc.class) { + if ((getGetAgentGatewayMethod = NetworkServicesGrpc.getGetAgentGatewayMethod) == null) { + NetworkServicesGrpc.getGetAgentGatewayMethod = + getGetAgentGatewayMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetAgentGateway")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.networkservices.v1.GetAgentGatewayRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.networkservices.v1.AgentGateway + .getDefaultInstance())) + .setSchemaDescriptor( + new NetworkServicesMethodDescriptorSupplier("GetAgentGateway")) + .build(); + } + } + } + return getGetAgentGatewayMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.networkservices.v1.CreateAgentGatewayRequest, + com.google.longrunning.Operation> + getCreateAgentGatewayMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateAgentGateway", + requestType = com.google.cloud.networkservices.v1.CreateAgentGatewayRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.networkservices.v1.CreateAgentGatewayRequest, + com.google.longrunning.Operation> + getCreateAgentGatewayMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.networkservices.v1.CreateAgentGatewayRequest, + com.google.longrunning.Operation> + getCreateAgentGatewayMethod; + if ((getCreateAgentGatewayMethod = NetworkServicesGrpc.getCreateAgentGatewayMethod) == null) { + synchronized (NetworkServicesGrpc.class) { + if ((getCreateAgentGatewayMethod = NetworkServicesGrpc.getCreateAgentGatewayMethod) + == null) { + NetworkServicesGrpc.getCreateAgentGatewayMethod = + getCreateAgentGatewayMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateAgentGateway")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.networkservices.v1.CreateAgentGatewayRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new NetworkServicesMethodDescriptorSupplier("CreateAgentGateway")) + .build(); + } + } + } + return getCreateAgentGatewayMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.networkservices.v1.UpdateAgentGatewayRequest, + com.google.longrunning.Operation> + getUpdateAgentGatewayMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateAgentGateway", + requestType = com.google.cloud.networkservices.v1.UpdateAgentGatewayRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.networkservices.v1.UpdateAgentGatewayRequest, + com.google.longrunning.Operation> + getUpdateAgentGatewayMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.networkservices.v1.UpdateAgentGatewayRequest, + com.google.longrunning.Operation> + getUpdateAgentGatewayMethod; + if ((getUpdateAgentGatewayMethod = NetworkServicesGrpc.getUpdateAgentGatewayMethod) == null) { + synchronized (NetworkServicesGrpc.class) { + if ((getUpdateAgentGatewayMethod = NetworkServicesGrpc.getUpdateAgentGatewayMethod) + == null) { + NetworkServicesGrpc.getUpdateAgentGatewayMethod = + getUpdateAgentGatewayMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateAgentGateway")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.networkservices.v1.UpdateAgentGatewayRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new NetworkServicesMethodDescriptorSupplier("UpdateAgentGateway")) + .build(); + } + } + } + return getUpdateAgentGatewayMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.networkservices.v1.DeleteAgentGatewayRequest, + com.google.longrunning.Operation> + getDeleteAgentGatewayMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteAgentGateway", + requestType = com.google.cloud.networkservices.v1.DeleteAgentGatewayRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.networkservices.v1.DeleteAgentGatewayRequest, + com.google.longrunning.Operation> + getDeleteAgentGatewayMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.networkservices.v1.DeleteAgentGatewayRequest, + com.google.longrunning.Operation> + getDeleteAgentGatewayMethod; + if ((getDeleteAgentGatewayMethod = NetworkServicesGrpc.getDeleteAgentGatewayMethod) == null) { + synchronized (NetworkServicesGrpc.class) { + if ((getDeleteAgentGatewayMethod = NetworkServicesGrpc.getDeleteAgentGatewayMethod) + == null) { + NetworkServicesGrpc.getDeleteAgentGatewayMethod = + getDeleteAgentGatewayMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteAgentGateway")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.networkservices.v1.DeleteAgentGatewayRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new NetworkServicesMethodDescriptorSupplier("DeleteAgentGateway")) + .build(); + } + } + } + return getDeleteAgentGatewayMethod; + } + /** Creates a new async stub that supports all call types for the service */ public static NetworkServicesStub newStub(io.grpc.Channel channel) { io.grpc.stub.AbstractStub.StubFactory factory = @@ -3666,6 +3901,78 @@ default void listMeshRouteViews( io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( getListMeshRouteViewsMethod(), responseObserver); } + + /** + * + * + *

            +     * Lists AgentGateways in a given project and location.
            +     * 
            + */ + default void listAgentGateways( + com.google.cloud.networkservices.v1.ListAgentGatewaysRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListAgentGatewaysMethod(), responseObserver); + } + + /** + * + * + *
            +     * Gets details of a single AgentGateway.
            +     * 
            + */ + default void getAgentGateway( + com.google.cloud.networkservices.v1.GetAgentGatewayRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetAgentGatewayMethod(), responseObserver); + } + + /** + * + * + *
            +     * Creates a new AgentGateway in a given project and location.
            +     * 
            + */ + default void createAgentGateway( + com.google.cloud.networkservices.v1.CreateAgentGatewayRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getCreateAgentGatewayMethod(), responseObserver); + } + + /** + * + * + *
            +     * Updates the parameters of a single AgentGateway.
            +     * 
            + */ + default void updateAgentGateway( + com.google.cloud.networkservices.v1.UpdateAgentGatewayRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getUpdateAgentGatewayMethod(), responseObserver); + } + + /** + * + * + *
            +     * Deletes a single AgentGateway.
            +     * 
            + */ + default void deleteAgentGateway( + com.google.cloud.networkservices.v1.DeleteAgentGatewayRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getDeleteAgentGatewayMethod(), responseObserver); + } } /** @@ -4649,6 +4956,88 @@ public void listMeshRouteViews( request, responseObserver); } + + /** + * + * + *
            +     * Lists AgentGateways in a given project and location.
            +     * 
            + */ + public void listAgentGateways( + com.google.cloud.networkservices.v1.ListAgentGatewaysRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListAgentGatewaysMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
            +     * Gets details of a single AgentGateway.
            +     * 
            + */ + public void getAgentGateway( + com.google.cloud.networkservices.v1.GetAgentGatewayRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetAgentGatewayMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
            +     * Creates a new AgentGateway in a given project and location.
            +     * 
            + */ + public void createAgentGateway( + com.google.cloud.networkservices.v1.CreateAgentGatewayRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateAgentGatewayMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
            +     * Updates the parameters of a single AgentGateway.
            +     * 
            + */ + public void updateAgentGateway( + com.google.cloud.networkservices.v1.UpdateAgentGatewayRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdateAgentGatewayMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
            +     * Deletes a single AgentGateway.
            +     * 
            + */ + public void deleteAgentGateway( + com.google.cloud.networkservices.v1.DeleteAgentGatewayRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteAgentGatewayMethod(), getCallOptions()), + request, + responseObserver); + } } /** @@ -5486,6 +5875,76 @@ public com.google.cloud.networkservices.v1.ListMeshRouteViewsResponse listMeshRo return io.grpc.stub.ClientCalls.blockingV2UnaryCall( getChannel(), getListMeshRouteViewsMethod(), getCallOptions(), request); } + + /** + * + * + *
            +     * Lists AgentGateways in a given project and location.
            +     * 
            + */ + public com.google.cloud.networkservices.v1.ListAgentGatewaysResponse listAgentGateways( + com.google.cloud.networkservices.v1.ListAgentGatewaysRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getListAgentGatewaysMethod(), getCallOptions(), request); + } + + /** + * + * + *
            +     * Gets details of a single AgentGateway.
            +     * 
            + */ + public com.google.cloud.networkservices.v1.AgentGateway getAgentGateway( + com.google.cloud.networkservices.v1.GetAgentGatewayRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getGetAgentGatewayMethod(), getCallOptions(), request); + } + + /** + * + * + *
            +     * Creates a new AgentGateway in a given project and location.
            +     * 
            + */ + public com.google.longrunning.Operation createAgentGateway( + com.google.cloud.networkservices.v1.CreateAgentGatewayRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getCreateAgentGatewayMethod(), getCallOptions(), request); + } + + /** + * + * + *
            +     * Updates the parameters of a single AgentGateway.
            +     * 
            + */ + public com.google.longrunning.Operation updateAgentGateway( + com.google.cloud.networkservices.v1.UpdateAgentGatewayRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getUpdateAgentGatewayMethod(), getCallOptions(), request); + } + + /** + * + * + *
            +     * Deletes a single AgentGateway.
            +     * 
            + */ + public com.google.longrunning.Operation deleteAgentGateway( + com.google.cloud.networkservices.v1.DeleteAgentGatewayRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getDeleteAgentGatewayMethod(), getCallOptions(), request); + } } /** @@ -6265,6 +6724,71 @@ public com.google.cloud.networkservices.v1.ListMeshRouteViewsResponse listMeshRo return io.grpc.stub.ClientCalls.blockingUnaryCall( getChannel(), getListMeshRouteViewsMethod(), getCallOptions(), request); } + + /** + * + * + *
            +     * Lists AgentGateways in a given project and location.
            +     * 
            + */ + public com.google.cloud.networkservices.v1.ListAgentGatewaysResponse listAgentGateways( + com.google.cloud.networkservices.v1.ListAgentGatewaysRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListAgentGatewaysMethod(), getCallOptions(), request); + } + + /** + * + * + *
            +     * Gets details of a single AgentGateway.
            +     * 
            + */ + public com.google.cloud.networkservices.v1.AgentGateway getAgentGateway( + com.google.cloud.networkservices.v1.GetAgentGatewayRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetAgentGatewayMethod(), getCallOptions(), request); + } + + /** + * + * + *
            +     * Creates a new AgentGateway in a given project and location.
            +     * 
            + */ + public com.google.longrunning.Operation createAgentGateway( + com.google.cloud.networkservices.v1.CreateAgentGatewayRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateAgentGatewayMethod(), getCallOptions(), request); + } + + /** + * + * + *
            +     * Updates the parameters of a single AgentGateway.
            +     * 
            + */ + public com.google.longrunning.Operation updateAgentGateway( + com.google.cloud.networkservices.v1.UpdateAgentGatewayRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateAgentGatewayMethod(), getCallOptions(), request); + } + + /** + * + * + *
            +     * Deletes a single AgentGateway.
            +     * 
            + */ + public com.google.longrunning.Operation deleteAgentGateway( + com.google.cloud.networkservices.v1.DeleteAgentGatewayRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteAgentGatewayMethod(), getCallOptions(), request); + } } /** @@ -7087,6 +7611,73 @@ protected NetworkServicesFutureStub build( return io.grpc.stub.ClientCalls.futureUnaryCall( getChannel().newCall(getListMeshRouteViewsMethod(), getCallOptions()), request); } + + /** + * + * + *
            +     * Lists AgentGateways in a given project and location.
            +     * 
            + */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.networkservices.v1.ListAgentGatewaysResponse> + listAgentGateways(com.google.cloud.networkservices.v1.ListAgentGatewaysRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListAgentGatewaysMethod(), getCallOptions()), request); + } + + /** + * + * + *
            +     * Gets details of a single AgentGateway.
            +     * 
            + */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.networkservices.v1.AgentGateway> + getAgentGateway(com.google.cloud.networkservices.v1.GetAgentGatewayRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetAgentGatewayMethod(), getCallOptions()), request); + } + + /** + * + * + *
            +     * Creates a new AgentGateway in a given project and location.
            +     * 
            + */ + public com.google.common.util.concurrent.ListenableFuture + createAgentGateway(com.google.cloud.networkservices.v1.CreateAgentGatewayRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateAgentGatewayMethod(), getCallOptions()), request); + } + + /** + * + * + *
            +     * Updates the parameters of a single AgentGateway.
            +     * 
            + */ + public com.google.common.util.concurrent.ListenableFuture + updateAgentGateway(com.google.cloud.networkservices.v1.UpdateAgentGatewayRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdateAgentGatewayMethod(), getCallOptions()), request); + } + + /** + * + * + *
            +     * Deletes a single AgentGateway.
            +     * 
            + */ + public com.google.common.util.concurrent.ListenableFuture + deleteAgentGateway(com.google.cloud.networkservices.v1.DeleteAgentGatewayRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteAgentGatewayMethod(), getCallOptions()), request); + } } private static final int METHODID_LIST_ENDPOINT_POLICIES = 0; @@ -7147,6 +7738,11 @@ protected NetworkServicesFutureStub build( private static final int METHODID_GET_MESH_ROUTE_VIEW = 55; private static final int METHODID_LIST_GATEWAY_ROUTE_VIEWS = 56; private static final int METHODID_LIST_MESH_ROUTE_VIEWS = 57; + private static final int METHODID_LIST_AGENT_GATEWAYS = 58; + private static final int METHODID_GET_AGENT_GATEWAY = 59; + private static final int METHODID_CREATE_AGENT_GATEWAY = 60; + private static final int METHODID_UPDATE_AGENT_GATEWAY = 61; + private static final int METHODID_DELETE_AGENT_GATEWAY = 62; private static final class MethodHandlers implements io.grpc.stub.ServerCalls.UnaryMethod, @@ -7493,6 +8089,34 @@ public void invoke(Req request, io.grpc.stub.StreamObserver responseObserv com.google.cloud.networkservices.v1.ListMeshRouteViewsResponse>) responseObserver); break; + case METHODID_LIST_AGENT_GATEWAYS: + serviceImpl.listAgentGateways( + (com.google.cloud.networkservices.v1.ListAgentGatewaysRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.networkservices.v1.ListAgentGatewaysResponse>) + responseObserver); + break; + case METHODID_GET_AGENT_GATEWAY: + serviceImpl.getAgentGateway( + (com.google.cloud.networkservices.v1.GetAgentGatewayRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_CREATE_AGENT_GATEWAY: + serviceImpl.createAgentGateway( + (com.google.cloud.networkservices.v1.CreateAgentGatewayRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_UPDATE_AGENT_GATEWAY: + serviceImpl.updateAgentGateway( + (com.google.cloud.networkservices.v1.UpdateAgentGatewayRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_DELETE_AGENT_GATEWAY: + serviceImpl.deleteAgentGateway( + (com.google.cloud.networkservices.v1.DeleteAgentGatewayRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; default: throw new AssertionError(); } @@ -7883,6 +8507,38 @@ public static final io.grpc.ServerServiceDefinition bindService(AsyncService ser com.google.cloud.networkservices.v1.ListMeshRouteViewsRequest, com.google.cloud.networkservices.v1.ListMeshRouteViewsResponse>( service, METHODID_LIST_MESH_ROUTE_VIEWS))) + .addMethod( + getListAgentGatewaysMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.networkservices.v1.ListAgentGatewaysRequest, + com.google.cloud.networkservices.v1.ListAgentGatewaysResponse>( + service, METHODID_LIST_AGENT_GATEWAYS))) + .addMethod( + getGetAgentGatewayMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.networkservices.v1.GetAgentGatewayRequest, + com.google.cloud.networkservices.v1.AgentGateway>( + service, METHODID_GET_AGENT_GATEWAY))) + .addMethod( + getCreateAgentGatewayMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.networkservices.v1.CreateAgentGatewayRequest, + com.google.longrunning.Operation>(service, METHODID_CREATE_AGENT_GATEWAY))) + .addMethod( + getUpdateAgentGatewayMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.networkservices.v1.UpdateAgentGatewayRequest, + com.google.longrunning.Operation>(service, METHODID_UPDATE_AGENT_GATEWAY))) + .addMethod( + getDeleteAgentGatewayMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.networkservices.v1.DeleteAgentGatewayRequest, + com.google.longrunning.Operation>(service, METHODID_DELETE_AGENT_GATEWAY))) .build(); } @@ -7992,6 +8648,11 @@ public static io.grpc.ServiceDescriptor getServiceDescriptor() { .addMethod(getGetMeshRouteViewMethod()) .addMethod(getListGatewayRouteViewsMethod()) .addMethod(getListMeshRouteViewsMethod()) + .addMethod(getListAgentGatewaysMethod()) + .addMethod(getGetAgentGatewayMethod()) + .addMethod(getCreateAgentGatewayMethod()) + .addMethod(getUpdateAgentGatewayMethod()) + .addMethod(getDeleteAgentGatewayMethod()) .build(); } } diff --git a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/AgentGateway.java b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/AgentGateway.java new file mode 100644 index 000000000000..2d4aec8070b5 --- /dev/null +++ b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/AgentGateway.java @@ -0,0 +1,11323 @@ +/* + * 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/cloud/networkservices/v1/agent_gateway.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkservices.v1; + +/** + * + * + *
            + * AgentGateway represents the agent gateway resource.
            + * 
            + * + * Protobuf type {@code google.cloud.networkservices.v1.AgentGateway} + */ +@com.google.protobuf.Generated +public final class AgentGateway extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkservices.v1.AgentGateway) + AgentGatewayOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "AgentGateway"); + } + + // Use AgentGateway.newBuilder() to construct. + private AgentGateway(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private AgentGateway() { + name_ = ""; + description_ = ""; + etag_ = ""; + protocols_ = emptyIntList(); + registries_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkservices.v1.AgentGatewayProto + .internal_static_google_cloud_networkservices_v1_AgentGateway_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 4: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkservices.v1.AgentGatewayProto + .internal_static_google_cloud_networkservices_v1_AgentGateway_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkservices.v1.AgentGateway.class, + com.google.cloud.networkservices.v1.AgentGateway.Builder.class); + } + + /** + * + * + *
            +   * Enums of all supported protocols
            +   * 
            + * + * Protobuf enum {@code google.cloud.networkservices.v1.AgentGateway.Protocol} + */ + public enum Protocol implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
            +     * Unspecified protocol.
            +     * 
            + * + * PROTOCOL_UNSPECIFIED = 0; + */ + PROTOCOL_UNSPECIFIED(0), + /** + * + * + *
            +     * Message Control Plane protocol.
            +     * 
            + * + * MCP = 1; + */ + MCP(1), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Protocol"); + } + + /** + * + * + *
            +     * Unspecified protocol.
            +     * 
            + * + * PROTOCOL_UNSPECIFIED = 0; + */ + public static final int PROTOCOL_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
            +     * Message Control Plane protocol.
            +     * 
            + * + * MCP = 1; + */ + public static final int MCP_VALUE = 1; + + 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 Protocol 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 Protocol forNumber(int value) { + switch (value) { + case 0: + return PROTOCOL_UNSPECIFIED; + case 1: + return MCP; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public Protocol findValueByNumber(int number) { + return Protocol.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.networkservices.v1.AgentGateway.getDescriptor().getEnumTypes().get(0); + } + + private static final Protocol[] VALUES = values(); + + public static Protocol valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private Protocol(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.networkservices.v1.AgentGateway.Protocol) + } + + public interface GoogleManagedOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkservices.v1.AgentGateway.GoogleManaged) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
            +     * Optional. Operating Mode of Agent Gateway.
            +     * 
            + * + * + * .google.cloud.networkservices.v1.AgentGateway.GoogleManaged.GovernedAccessPath governed_access_path = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for governedAccessPath. + */ + int getGovernedAccessPathValue(); + + /** + * + * + *
            +     * Optional. Operating Mode of Agent Gateway.
            +     * 
            + * + * + * .google.cloud.networkservices.v1.AgentGateway.GoogleManaged.GovernedAccessPath governed_access_path = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The governedAccessPath. + */ + com.google.cloud.networkservices.v1.AgentGateway.GoogleManaged.GovernedAccessPath + getGovernedAccessPath(); + } + + /** + * + * + *
            +   * Configuration for Google Managed deployment mode.
            +   * Proxy is orchestrated and managed by GoogleCloud in a tenant project.
            +   * 
            + * + * Protobuf type {@code google.cloud.networkservices.v1.AgentGateway.GoogleManaged} + */ + public static final class GoogleManaged extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkservices.v1.AgentGateway.GoogleManaged) + GoogleManagedOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "GoogleManaged"); + } + + // Use GoogleManaged.newBuilder() to construct. + private GoogleManaged(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private GoogleManaged() { + governedAccessPath_ = 0; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkservices.v1.AgentGatewayProto + .internal_static_google_cloud_networkservices_v1_AgentGateway_GoogleManaged_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkservices.v1.AgentGatewayProto + .internal_static_google_cloud_networkservices_v1_AgentGateway_GoogleManaged_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkservices.v1.AgentGateway.GoogleManaged.class, + com.google.cloud.networkservices.v1.AgentGateway.GoogleManaged.Builder.class); + } + + /** + * + * + *
            +     * GovernedAccessPath defines the type of access to protect.
            +     * 
            + * + * Protobuf enum {@code + * google.cloud.networkservices.v1.AgentGateway.GoogleManaged.GovernedAccessPath} + */ + public enum GovernedAccessPath implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
            +       * Governed access path is not specified.
            +       * 
            + * + * GOVERNED_ACCESS_PATH_UNSPECIFIED = 0; + */ + GOVERNED_ACCESS_PATH_UNSPECIFIED(0), + /** + * + * + *
            +       * Govern agent conections to destinations.
            +       * 
            + * + * AGENT_TO_ANYWHERE = 1; + */ + AGENT_TO_ANYWHERE(1), + /** + * + * + *
            +       * Protect connection to Agent or Tool.
            +       * 
            + * + * CLIENT_TO_AGENT = 2; + */ + CLIENT_TO_AGENT(2), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "GovernedAccessPath"); + } + + /** + * + * + *
            +       * Governed access path is not specified.
            +       * 
            + * + * GOVERNED_ACCESS_PATH_UNSPECIFIED = 0; + */ + public static final int GOVERNED_ACCESS_PATH_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
            +       * Govern agent conections to destinations.
            +       * 
            + * + * AGENT_TO_ANYWHERE = 1; + */ + public static final int AGENT_TO_ANYWHERE_VALUE = 1; + + /** + * + * + *
            +       * Protect connection to Agent or Tool.
            +       * 
            + * + * CLIENT_TO_AGENT = 2; + */ + public static final int CLIENT_TO_AGENT_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 GovernedAccessPath 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 GovernedAccessPath forNumber(int value) { + switch (value) { + case 0: + return GOVERNED_ACCESS_PATH_UNSPECIFIED; + case 1: + return AGENT_TO_ANYWHERE; + case 2: + return CLIENT_TO_AGENT; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap + internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public GovernedAccessPath findValueByNumber(int number) { + return GovernedAccessPath.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.networkservices.v1.AgentGateway.GoogleManaged.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final GovernedAccessPath[] VALUES = values(); + + public static GovernedAccessPath valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private GovernedAccessPath(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.networkservices.v1.AgentGateway.GoogleManaged.GovernedAccessPath) + } + + public static final int GOVERNED_ACCESS_PATH_FIELD_NUMBER = 1; + private int governedAccessPath_ = 0; + + /** + * + * + *
            +     * Optional. Operating Mode of Agent Gateway.
            +     * 
            + * + * + * .google.cloud.networkservices.v1.AgentGateway.GoogleManaged.GovernedAccessPath governed_access_path = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for governedAccessPath. + */ + @java.lang.Override + public int getGovernedAccessPathValue() { + return governedAccessPath_; + } + + /** + * + * + *
            +     * Optional. Operating Mode of Agent Gateway.
            +     * 
            + * + * + * .google.cloud.networkservices.v1.AgentGateway.GoogleManaged.GovernedAccessPath governed_access_path = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The governedAccessPath. + */ + @java.lang.Override + public com.google.cloud.networkservices.v1.AgentGateway.GoogleManaged.GovernedAccessPath + getGovernedAccessPath() { + com.google.cloud.networkservices.v1.AgentGateway.GoogleManaged.GovernedAccessPath result = + com.google.cloud.networkservices.v1.AgentGateway.GoogleManaged.GovernedAccessPath + .forNumber(governedAccessPath_); + return result == null + ? com.google.cloud.networkservices.v1.AgentGateway.GoogleManaged.GovernedAccessPath + .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 (governedAccessPath_ + != com.google.cloud.networkservices.v1.AgentGateway.GoogleManaged.GovernedAccessPath + .GOVERNED_ACCESS_PATH_UNSPECIFIED + .getNumber()) { + output.writeEnum(1, governedAccessPath_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (governedAccessPath_ + != com.google.cloud.networkservices.v1.AgentGateway.GoogleManaged.GovernedAccessPath + .GOVERNED_ACCESS_PATH_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, governedAccessPath_); + } + 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.networkservices.v1.AgentGateway.GoogleManaged)) { + return super.equals(obj); + } + com.google.cloud.networkservices.v1.AgentGateway.GoogleManaged other = + (com.google.cloud.networkservices.v1.AgentGateway.GoogleManaged) obj; + + if (governedAccessPath_ != other.governedAccessPath_) 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) + GOVERNED_ACCESS_PATH_FIELD_NUMBER; + hash = (53 * hash) + governedAccessPath_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.networkservices.v1.AgentGateway.GoogleManaged parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkservices.v1.AgentGateway.GoogleManaged 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.networkservices.v1.AgentGateway.GoogleManaged parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkservices.v1.AgentGateway.GoogleManaged 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.networkservices.v1.AgentGateway.GoogleManaged parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkservices.v1.AgentGateway.GoogleManaged parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkservices.v1.AgentGateway.GoogleManaged parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkservices.v1.AgentGateway.GoogleManaged 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.networkservices.v1.AgentGateway.GoogleManaged parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkservices.v1.AgentGateway.GoogleManaged 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.networkservices.v1.AgentGateway.GoogleManaged parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkservices.v1.AgentGateway.GoogleManaged 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.networkservices.v1.AgentGateway.GoogleManaged 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; + } + + /** + * + * + *
            +     * Configuration for Google Managed deployment mode.
            +     * Proxy is orchestrated and managed by GoogleCloud in a tenant project.
            +     * 
            + * + * Protobuf type {@code google.cloud.networkservices.v1.AgentGateway.GoogleManaged} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkservices.v1.AgentGateway.GoogleManaged) + com.google.cloud.networkservices.v1.AgentGateway.GoogleManagedOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkservices.v1.AgentGatewayProto + .internal_static_google_cloud_networkservices_v1_AgentGateway_GoogleManaged_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkservices.v1.AgentGatewayProto + .internal_static_google_cloud_networkservices_v1_AgentGateway_GoogleManaged_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkservices.v1.AgentGateway.GoogleManaged.class, + com.google.cloud.networkservices.v1.AgentGateway.GoogleManaged.Builder.class); + } + + // Construct using com.google.cloud.networkservices.v1.AgentGateway.GoogleManaged.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + governedAccessPath_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkservices.v1.AgentGatewayProto + .internal_static_google_cloud_networkservices_v1_AgentGateway_GoogleManaged_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkservices.v1.AgentGateway.GoogleManaged + getDefaultInstanceForType() { + return com.google.cloud.networkservices.v1.AgentGateway.GoogleManaged.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkservices.v1.AgentGateway.GoogleManaged build() { + com.google.cloud.networkservices.v1.AgentGateway.GoogleManaged result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkservices.v1.AgentGateway.GoogleManaged buildPartial() { + com.google.cloud.networkservices.v1.AgentGateway.GoogleManaged result = + new com.google.cloud.networkservices.v1.AgentGateway.GoogleManaged(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.networkservices.v1.AgentGateway.GoogleManaged result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.governedAccessPath_ = governedAccessPath_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.networkservices.v1.AgentGateway.GoogleManaged) { + return mergeFrom((com.google.cloud.networkservices.v1.AgentGateway.GoogleManaged) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.networkservices.v1.AgentGateway.GoogleManaged other) { + if (other + == com.google.cloud.networkservices.v1.AgentGateway.GoogleManaged.getDefaultInstance()) + return this; + if (other.governedAccessPath_ != 0) { + setGovernedAccessPathValue(other.getGovernedAccessPathValue()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + governedAccessPath_ = input.readEnum(); + bitField0_ |= 0x00000001; + break; + } // case 8 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private int governedAccessPath_ = 0; + + /** + * + * + *
            +       * Optional. Operating Mode of Agent Gateway.
            +       * 
            + * + * + * .google.cloud.networkservices.v1.AgentGateway.GoogleManaged.GovernedAccessPath governed_access_path = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for governedAccessPath. + */ + @java.lang.Override + public int getGovernedAccessPathValue() { + return governedAccessPath_; + } + + /** + * + * + *
            +       * Optional. Operating Mode of Agent Gateway.
            +       * 
            + * + * + * .google.cloud.networkservices.v1.AgentGateway.GoogleManaged.GovernedAccessPath governed_access_path = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The enum numeric value on the wire for governedAccessPath to set. + * @return This builder for chaining. + */ + public Builder setGovernedAccessPathValue(int value) { + governedAccessPath_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
            +       * Optional. Operating Mode of Agent Gateway.
            +       * 
            + * + * + * .google.cloud.networkservices.v1.AgentGateway.GoogleManaged.GovernedAccessPath governed_access_path = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The governedAccessPath. + */ + @java.lang.Override + public com.google.cloud.networkservices.v1.AgentGateway.GoogleManaged.GovernedAccessPath + getGovernedAccessPath() { + com.google.cloud.networkservices.v1.AgentGateway.GoogleManaged.GovernedAccessPath result = + com.google.cloud.networkservices.v1.AgentGateway.GoogleManaged.GovernedAccessPath + .forNumber(governedAccessPath_); + return result == null + ? com.google.cloud.networkservices.v1.AgentGateway.GoogleManaged.GovernedAccessPath + .UNRECOGNIZED + : result; + } + + /** + * + * + *
            +       * Optional. Operating Mode of Agent Gateway.
            +       * 
            + * + * + * .google.cloud.networkservices.v1.AgentGateway.GoogleManaged.GovernedAccessPath governed_access_path = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The governedAccessPath to set. + * @return This builder for chaining. + */ + public Builder setGovernedAccessPath( + com.google.cloud.networkservices.v1.AgentGateway.GoogleManaged.GovernedAccessPath value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + governedAccessPath_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
            +       * Optional. Operating Mode of Agent Gateway.
            +       * 
            + * + * + * .google.cloud.networkservices.v1.AgentGateway.GoogleManaged.GovernedAccessPath governed_access_path = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearGovernedAccessPath() { + bitField0_ = (bitField0_ & ~0x00000001); + governedAccessPath_ = 0; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.networkservices.v1.AgentGateway.GoogleManaged) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkservices.v1.AgentGateway.GoogleManaged) + private static final com.google.cloud.networkservices.v1.AgentGateway.GoogleManaged + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.networkservices.v1.AgentGateway.GoogleManaged(); + } + + public static com.google.cloud.networkservices.v1.AgentGateway.GoogleManaged + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GoogleManaged parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.networkservices.v1.AgentGateway.GoogleManaged + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface SelfManagedOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkservices.v1.AgentGateway.SelfManaged) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
            +     * Optional. A supported Google Cloud networking proxy in the Project and
            +     * Location
            +     * 
            + * + * + * string resource_uri = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The resourceUri. + */ + java.lang.String getResourceUri(); + + /** + * + * + *
            +     * Optional. A supported Google Cloud networking proxy in the Project and
            +     * Location
            +     * 
            + * + * + * string resource_uri = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for resourceUri. + */ + com.google.protobuf.ByteString getResourceUriBytes(); + } + + /** + * + * + *
            +   * Configuration for Self Managed deployment mode.
            +   * Attach to existing Application Load Balancers or Secure Web Proxies.
            +   * 
            + * + * Protobuf type {@code google.cloud.networkservices.v1.AgentGateway.SelfManaged} + */ + public static final class SelfManaged extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkservices.v1.AgentGateway.SelfManaged) + SelfManagedOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "SelfManaged"); + } + + // Use SelfManaged.newBuilder() to construct. + private SelfManaged(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private SelfManaged() { + resourceUri_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkservices.v1.AgentGatewayProto + .internal_static_google_cloud_networkservices_v1_AgentGateway_SelfManaged_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkservices.v1.AgentGatewayProto + .internal_static_google_cloud_networkservices_v1_AgentGateway_SelfManaged_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkservices.v1.AgentGateway.SelfManaged.class, + com.google.cloud.networkservices.v1.AgentGateway.SelfManaged.Builder.class); + } + + public static final int RESOURCE_URI_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object resourceUri_ = ""; + + /** + * + * + *
            +     * Optional. A supported Google Cloud networking proxy in the Project and
            +     * Location
            +     * 
            + * + * + * string resource_uri = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The resourceUri. + */ + @java.lang.Override + public java.lang.String getResourceUri() { + java.lang.Object ref = resourceUri_; + 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(); + resourceUri_ = s; + return s; + } + } + + /** + * + * + *
            +     * Optional. A supported Google Cloud networking proxy in the Project and
            +     * Location
            +     * 
            + * + * + * string resource_uri = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for resourceUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getResourceUriBytes() { + java.lang.Object ref = resourceUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + resourceUri_ = 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 { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(resourceUri_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, resourceUri_); + } + 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(resourceUri_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, resourceUri_); + } + 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.networkservices.v1.AgentGateway.SelfManaged)) { + return super.equals(obj); + } + com.google.cloud.networkservices.v1.AgentGateway.SelfManaged other = + (com.google.cloud.networkservices.v1.AgentGateway.SelfManaged) obj; + + if (!getResourceUri().equals(other.getResourceUri())) 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) + RESOURCE_URI_FIELD_NUMBER; + hash = (53 * hash) + getResourceUri().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.networkservices.v1.AgentGateway.SelfManaged parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkservices.v1.AgentGateway.SelfManaged 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.networkservices.v1.AgentGateway.SelfManaged parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkservices.v1.AgentGateway.SelfManaged 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.networkservices.v1.AgentGateway.SelfManaged parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkservices.v1.AgentGateway.SelfManaged parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkservices.v1.AgentGateway.SelfManaged parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkservices.v1.AgentGateway.SelfManaged 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.networkservices.v1.AgentGateway.SelfManaged parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkservices.v1.AgentGateway.SelfManaged 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.networkservices.v1.AgentGateway.SelfManaged parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkservices.v1.AgentGateway.SelfManaged 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.networkservices.v1.AgentGateway.SelfManaged 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; + } + + /** + * + * + *
            +     * Configuration for Self Managed deployment mode.
            +     * Attach to existing Application Load Balancers or Secure Web Proxies.
            +     * 
            + * + * Protobuf type {@code google.cloud.networkservices.v1.AgentGateway.SelfManaged} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkservices.v1.AgentGateway.SelfManaged) + com.google.cloud.networkservices.v1.AgentGateway.SelfManagedOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkservices.v1.AgentGatewayProto + .internal_static_google_cloud_networkservices_v1_AgentGateway_SelfManaged_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkservices.v1.AgentGatewayProto + .internal_static_google_cloud_networkservices_v1_AgentGateway_SelfManaged_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkservices.v1.AgentGateway.SelfManaged.class, + com.google.cloud.networkservices.v1.AgentGateway.SelfManaged.Builder.class); + } + + // Construct using com.google.cloud.networkservices.v1.AgentGateway.SelfManaged.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + resourceUri_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkservices.v1.AgentGatewayProto + .internal_static_google_cloud_networkservices_v1_AgentGateway_SelfManaged_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkservices.v1.AgentGateway.SelfManaged + getDefaultInstanceForType() { + return com.google.cloud.networkservices.v1.AgentGateway.SelfManaged.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkservices.v1.AgentGateway.SelfManaged build() { + com.google.cloud.networkservices.v1.AgentGateway.SelfManaged result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkservices.v1.AgentGateway.SelfManaged buildPartial() { + com.google.cloud.networkservices.v1.AgentGateway.SelfManaged result = + new com.google.cloud.networkservices.v1.AgentGateway.SelfManaged(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.networkservices.v1.AgentGateway.SelfManaged result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.resourceUri_ = resourceUri_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.networkservices.v1.AgentGateway.SelfManaged) { + return mergeFrom((com.google.cloud.networkservices.v1.AgentGateway.SelfManaged) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.networkservices.v1.AgentGateway.SelfManaged other) { + if (other + == com.google.cloud.networkservices.v1.AgentGateway.SelfManaged.getDefaultInstance()) + return this; + if (!other.getResourceUri().isEmpty()) { + resourceUri_ = other.resourceUri_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + resourceUri_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object resourceUri_ = ""; + + /** + * + * + *
            +       * Optional. A supported Google Cloud networking proxy in the Project and
            +       * Location
            +       * 
            + * + * + * string resource_uri = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The resourceUri. + */ + public java.lang.String getResourceUri() { + java.lang.Object ref = resourceUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + resourceUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
            +       * Optional. A supported Google Cloud networking proxy in the Project and
            +       * Location
            +       * 
            + * + * + * string resource_uri = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for resourceUri. + */ + public com.google.protobuf.ByteString getResourceUriBytes() { + java.lang.Object ref = resourceUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + resourceUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
            +       * Optional. A supported Google Cloud networking proxy in the Project and
            +       * Location
            +       * 
            + * + * + * string resource_uri = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param value The resourceUri to set. + * @return This builder for chaining. + */ + public Builder setResourceUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + resourceUri_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
            +       * Optional. A supported Google Cloud networking proxy in the Project and
            +       * Location
            +       * 
            + * + * + * string resource_uri = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearResourceUri() { + resourceUri_ = getDefaultInstance().getResourceUri(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
            +       * Optional. A supported Google Cloud networking proxy in the Project and
            +       * Location
            +       * 
            + * + * + * string resource_uri = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for resourceUri to set. + * @return This builder for chaining. + */ + public Builder setResourceUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + resourceUri_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.networkservices.v1.AgentGateway.SelfManaged) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkservices.v1.AgentGateway.SelfManaged) + private static final com.google.cloud.networkservices.v1.AgentGateway.SelfManaged + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.networkservices.v1.AgentGateway.SelfManaged(); + } + + public static com.google.cloud.networkservices.v1.AgentGateway.SelfManaged + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SelfManaged parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.networkservices.v1.AgentGateway.SelfManaged + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface NetworkConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkservices.v1.AgentGateway.NetworkConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
            +     * Optional. Optional PSC-Interface network attachment for connectivity to
            +     * your private VPCs network.
            +     * 
            + * + * + * .google.cloud.networkservices.v1.AgentGateway.NetworkConfig.Egress egress = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the egress field is set. + */ + boolean hasEgress(); + + /** + * + * + *
            +     * Optional. Optional PSC-Interface network attachment for connectivity to
            +     * your private VPCs network.
            +     * 
            + * + * + * .google.cloud.networkservices.v1.AgentGateway.NetworkConfig.Egress egress = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The egress. + */ + com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig.Egress getEgress(); + + /** + * + * + *
            +     * Optional. Optional PSC-Interface network attachment for connectivity to
            +     * your private VPCs network.
            +     * 
            + * + * + * .google.cloud.networkservices.v1.AgentGateway.NetworkConfig.Egress egress = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig.EgressOrBuilder + getEgressOrBuilder(); + + /** + * + * + *
            +     * Optional. Optional DNS peering configuration for connectivity to your
            +     * private VPC network.
            +     * 
            + * + * + * .google.cloud.networkservices.v1.AgentGateway.NetworkConfig.DnsPeeringConfig dns_peering_config = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the dnsPeeringConfig field is set. + */ + boolean hasDnsPeeringConfig(); + + /** + * + * + *
            +     * Optional. Optional DNS peering configuration for connectivity to your
            +     * private VPC network.
            +     * 
            + * + * + * .google.cloud.networkservices.v1.AgentGateway.NetworkConfig.DnsPeeringConfig dns_peering_config = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The dnsPeeringConfig. + */ + com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig.DnsPeeringConfig + getDnsPeeringConfig(); + + /** + * + * + *
            +     * Optional. Optional DNS peering configuration for connectivity to your
            +     * private VPC network.
            +     * 
            + * + * + * .google.cloud.networkservices.v1.AgentGateway.NetworkConfig.DnsPeeringConfig dns_peering_config = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig.DnsPeeringConfigOrBuilder + getDnsPeeringConfigOrBuilder(); + } + + /** + * + * + *
            +   * NetworkConfig contains network configurations for the AgentGateway.
            +   * 
            + * + * Protobuf type {@code google.cloud.networkservices.v1.AgentGateway.NetworkConfig} + */ + public static final class NetworkConfig extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkservices.v1.AgentGateway.NetworkConfig) + NetworkConfigOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "NetworkConfig"); + } + + // Use NetworkConfig.newBuilder() to construct. + private NetworkConfig(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private NetworkConfig() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkservices.v1.AgentGatewayProto + .internal_static_google_cloud_networkservices_v1_AgentGateway_NetworkConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkservices.v1.AgentGatewayProto + .internal_static_google_cloud_networkservices_v1_AgentGateway_NetworkConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig.class, + com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig.Builder.class); + } + + public interface EgressOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkservices.v1.AgentGateway.NetworkConfig.Egress) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
            +       * Optional. The URI of the Network Attachment resource.
            +       * 
            + * + * string network_attachment = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The networkAttachment. + */ + java.lang.String getNetworkAttachment(); + + /** + * + * + *
            +       * Optional. The URI of the Network Attachment resource.
            +       * 
            + * + * string network_attachment = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for networkAttachment. + */ + com.google.protobuf.ByteString getNetworkAttachmentBytes(); + + /** + * + * + *
            +       * Optional. TrustConfig defines the trust configuration for egress.
            +       * 
            + * + * + * .google.cloud.networkservices.v1.AgentGateway.NetworkConfig.Egress.TrustConfig trust_config = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the trustConfig field is set. + */ + boolean hasTrustConfig(); + + /** + * + * + *
            +       * Optional. TrustConfig defines the trust configuration for egress.
            +       * 
            + * + * + * .google.cloud.networkservices.v1.AgentGateway.NetworkConfig.Egress.TrustConfig trust_config = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The trustConfig. + */ + com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig.Egress.TrustConfig + getTrustConfig(); + + /** + * + * + *
            +       * Optional. TrustConfig defines the trust configuration for egress.
            +       * 
            + * + * + * .google.cloud.networkservices.v1.AgentGateway.NetworkConfig.Egress.TrustConfig trust_config = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig.Egress.TrustConfigOrBuilder + getTrustConfigOrBuilder(); + } + + /** + * + * + *
            +     * Configuration for Egress
            +     * 
            + * + * Protobuf type {@code google.cloud.networkservices.v1.AgentGateway.NetworkConfig.Egress} + */ + public static final class Egress extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkservices.v1.AgentGateway.NetworkConfig.Egress) + EgressOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "Egress"); + } + + // Use Egress.newBuilder() to construct. + private Egress(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private Egress() { + networkAttachment_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkservices.v1.AgentGatewayProto + .internal_static_google_cloud_networkservices_v1_AgentGateway_NetworkConfig_Egress_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkservices.v1.AgentGatewayProto + .internal_static_google_cloud_networkservices_v1_AgentGateway_NetworkConfig_Egress_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig.Egress.class, + com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig.Egress.Builder + .class); + } + + public interface TrustConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkservices.v1.AgentGateway.NetworkConfig.Egress.TrustConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
            +         * Required. PEM encoded root certificates used to validate the identity
            +         * of the upstream servers/destinations during egress connections.
            +         * 
            + * + * repeated string pem_certificates = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return A list containing the pemCertificates. + */ + java.util.List getPemCertificatesList(); + + /** + * + * + *
            +         * Required. PEM encoded root certificates used to validate the identity
            +         * of the upstream servers/destinations during egress connections.
            +         * 
            + * + * repeated string pem_certificates = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The count of pemCertificates. + */ + int getPemCertificatesCount(); + + /** + * + * + *
            +         * Required. PEM encoded root certificates used to validate the identity
            +         * of the upstream servers/destinations during egress connections.
            +         * 
            + * + * repeated string pem_certificates = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param index The index of the element to return. + * @return The pemCertificates at the given index. + */ + java.lang.String getPemCertificates(int index); + + /** + * + * + *
            +         * Required. PEM encoded root certificates used to validate the identity
            +         * of the upstream servers/destinations during egress connections.
            +         * 
            + * + * repeated string pem_certificates = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param index The index of the value to return. + * @return The bytes of the pemCertificates at the given index. + */ + com.google.protobuf.ByteString getPemCertificatesBytes(int index); + } + + /** + * + * + *
            +       * TrustConfig defines the trust configuration for egress.
            +       * 
            + * + * Protobuf type {@code + * google.cloud.networkservices.v1.AgentGateway.NetworkConfig.Egress.TrustConfig} + */ + public static final class TrustConfig extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkservices.v1.AgentGateway.NetworkConfig.Egress.TrustConfig) + TrustConfigOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "TrustConfig"); + } + + // Use TrustConfig.newBuilder() to construct. + private TrustConfig(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private TrustConfig() { + pemCertificates_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkservices.v1.AgentGatewayProto + .internal_static_google_cloud_networkservices_v1_AgentGateway_NetworkConfig_Egress_TrustConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkservices.v1.AgentGatewayProto + .internal_static_google_cloud_networkservices_v1_AgentGateway_NetworkConfig_Egress_TrustConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig.Egress.TrustConfig + .class, + com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig.Egress.TrustConfig + .Builder.class); + } + + public static final int PEM_CERTIFICATES_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList pemCertificates_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + /** + * + * + *
            +         * Required. PEM encoded root certificates used to validate the identity
            +         * of the upstream servers/destinations during egress connections.
            +         * 
            + * + * repeated string pem_certificates = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return A list containing the pemCertificates. + */ + public com.google.protobuf.ProtocolStringList getPemCertificatesList() { + return pemCertificates_; + } + + /** + * + * + *
            +         * Required. PEM encoded root certificates used to validate the identity
            +         * of the upstream servers/destinations during egress connections.
            +         * 
            + * + * repeated string pem_certificates = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The count of pemCertificates. + */ + public int getPemCertificatesCount() { + return pemCertificates_.size(); + } + + /** + * + * + *
            +         * Required. PEM encoded root certificates used to validate the identity
            +         * of the upstream servers/destinations during egress connections.
            +         * 
            + * + * repeated string pem_certificates = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param index The index of the element to return. + * @return The pemCertificates at the given index. + */ + public java.lang.String getPemCertificates(int index) { + return pemCertificates_.get(index); + } + + /** + * + * + *
            +         * Required. PEM encoded root certificates used to validate the identity
            +         * of the upstream servers/destinations during egress connections.
            +         * 
            + * + * repeated string pem_certificates = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param index The index of the value to return. + * @return The bytes of the pemCertificates at the given index. + */ + public com.google.protobuf.ByteString getPemCertificatesBytes(int index) { + return pemCertificates_.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 { + for (int i = 0; i < pemCertificates_.size(); i++) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, pemCertificates_.getRaw(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + { + int dataSize = 0; + for (int i = 0; i < pemCertificates_.size(); i++) { + dataSize += computeStringSizeNoTag(pemCertificates_.getRaw(i)); + } + size += dataSize; + size += 1 * getPemCertificatesList().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.networkservices.v1.AgentGateway.NetworkConfig.Egress.TrustConfig)) { + return super.equals(obj); + } + com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig.Egress.TrustConfig other = + (com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig.Egress.TrustConfig) + obj; + + if (!getPemCertificatesList().equals(other.getPemCertificatesList())) 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 (getPemCertificatesCount() > 0) { + hash = (37 * hash) + PEM_CERTIFICATES_FIELD_NUMBER; + hash = (53 * hash) + getPemCertificatesList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig.Egress + .TrustConfig + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig.Egress + .TrustConfig + 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.networkservices.v1.AgentGateway.NetworkConfig.Egress + .TrustConfig + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig.Egress + .TrustConfig + 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.networkservices.v1.AgentGateway.NetworkConfig.Egress + .TrustConfig + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig.Egress + .TrustConfig + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig.Egress + .TrustConfig + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig.Egress + .TrustConfig + 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.networkservices.v1.AgentGateway.NetworkConfig.Egress + .TrustConfig + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig.Egress + .TrustConfig + 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.networkservices.v1.AgentGateway.NetworkConfig.Egress + .TrustConfig + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig.Egress + .TrustConfig + 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.networkservices.v1.AgentGateway.NetworkConfig.Egress.TrustConfig + 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; + } + + /** + * + * + *
            +         * TrustConfig defines the trust configuration for egress.
            +         * 
            + * + * Protobuf type {@code + * google.cloud.networkservices.v1.AgentGateway.NetworkConfig.Egress.TrustConfig} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkservices.v1.AgentGateway.NetworkConfig.Egress.TrustConfig) + com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig.Egress + .TrustConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkservices.v1.AgentGatewayProto + .internal_static_google_cloud_networkservices_v1_AgentGateway_NetworkConfig_Egress_TrustConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkservices.v1.AgentGatewayProto + .internal_static_google_cloud_networkservices_v1_AgentGateway_NetworkConfig_Egress_TrustConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig.Egress + .TrustConfig.class, + com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig.Egress + .TrustConfig.Builder.class); + } + + // Construct using + // com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig.Egress.TrustConfig.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + pemCertificates_ = com.google.protobuf.LazyStringArrayList.emptyList(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkservices.v1.AgentGatewayProto + .internal_static_google_cloud_networkservices_v1_AgentGateway_NetworkConfig_Egress_TrustConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig.Egress.TrustConfig + getDefaultInstanceForType() { + return com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig.Egress.TrustConfig + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig.Egress.TrustConfig + build() { + com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig.Egress.TrustConfig + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig.Egress.TrustConfig + buildPartial() { + com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig.Egress.TrustConfig + result = + new com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig.Egress + .TrustConfig(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig.Egress.TrustConfig + result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + pemCertificates_.makeImmutable(); + result.pemCertificates_ = pemCertificates_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig.Egress.TrustConfig) { + return mergeFrom( + (com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig.Egress + .TrustConfig) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig.Egress.TrustConfig + other) { + if (other + == com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig.Egress.TrustConfig + .getDefaultInstance()) return this; + if (!other.pemCertificates_.isEmpty()) { + if (pemCertificates_.isEmpty()) { + pemCertificates_ = other.pemCertificates_; + bitField0_ |= 0x00000001; + } else { + ensurePemCertificatesIsMutable(); + pemCertificates_.addAll(other.pemCertificates_); + } + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + ensurePemCertificatesIsMutable(); + pemCertificates_.add(s); + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.protobuf.LazyStringArrayList pemCertificates_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensurePemCertificatesIsMutable() { + if (!pemCertificates_.isModifiable()) { + pemCertificates_ = new com.google.protobuf.LazyStringArrayList(pemCertificates_); + } + bitField0_ |= 0x00000001; + } + + /** + * + * + *
            +           * Required. PEM encoded root certificates used to validate the identity
            +           * of the upstream servers/destinations during egress connections.
            +           * 
            + * + * repeated string pem_certificates = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return A list containing the pemCertificates. + */ + public com.google.protobuf.ProtocolStringList getPemCertificatesList() { + pemCertificates_.makeImmutable(); + return pemCertificates_; + } + + /** + * + * + *
            +           * Required. PEM encoded root certificates used to validate the identity
            +           * of the upstream servers/destinations during egress connections.
            +           * 
            + * + * repeated string pem_certificates = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The count of pemCertificates. + */ + public int getPemCertificatesCount() { + return pemCertificates_.size(); + } + + /** + * + * + *
            +           * Required. PEM encoded root certificates used to validate the identity
            +           * of the upstream servers/destinations during egress connections.
            +           * 
            + * + * repeated string pem_certificates = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param index The index of the element to return. + * @return The pemCertificates at the given index. + */ + public java.lang.String getPemCertificates(int index) { + return pemCertificates_.get(index); + } + + /** + * + * + *
            +           * Required. PEM encoded root certificates used to validate the identity
            +           * of the upstream servers/destinations during egress connections.
            +           * 
            + * + * repeated string pem_certificates = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param index The index of the value to return. + * @return The bytes of the pemCertificates at the given index. + */ + public com.google.protobuf.ByteString getPemCertificatesBytes(int index) { + return pemCertificates_.getByteString(index); + } + + /** + * + * + *
            +           * Required. PEM encoded root certificates used to validate the identity
            +           * of the upstream servers/destinations during egress connections.
            +           * 
            + * + * repeated string pem_certificates = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param index The index to set the value at. + * @param value The pemCertificates to set. + * @return This builder for chaining. + */ + public Builder setPemCertificates(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensurePemCertificatesIsMutable(); + pemCertificates_.set(index, value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
            +           * Required. PEM encoded root certificates used to validate the identity
            +           * of the upstream servers/destinations during egress connections.
            +           * 
            + * + * repeated string pem_certificates = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The pemCertificates to add. + * @return This builder for chaining. + */ + public Builder addPemCertificates(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensurePemCertificatesIsMutable(); + pemCertificates_.add(value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
            +           * Required. PEM encoded root certificates used to validate the identity
            +           * of the upstream servers/destinations during egress connections.
            +           * 
            + * + * repeated string pem_certificates = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param values The pemCertificates to add. + * @return This builder for chaining. + */ + public Builder addAllPemCertificates(java.lang.Iterable values) { + ensurePemCertificatesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, pemCertificates_); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
            +           * Required. PEM encoded root certificates used to validate the identity
            +           * of the upstream servers/destinations during egress connections.
            +           * 
            + * + * repeated string pem_certificates = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return This builder for chaining. + */ + public Builder clearPemCertificates() { + pemCertificates_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + ; + onChanged(); + return this; + } + + /** + * + * + *
            +           * Required. PEM encoded root certificates used to validate the identity
            +           * of the upstream servers/destinations during egress connections.
            +           * 
            + * + * repeated string pem_certificates = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The bytes of the pemCertificates to add. + * @return This builder for chaining. + */ + public Builder addPemCertificatesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensurePemCertificatesIsMutable(); + pemCertificates_.add(value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.networkservices.v1.AgentGateway.NetworkConfig.Egress.TrustConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkservices.v1.AgentGateway.NetworkConfig.Egress.TrustConfig) + private static final com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig.Egress + .TrustConfig + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig.Egress + .TrustConfig(); + } + + public static com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig.Egress + .TrustConfig + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TrustConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig.Egress.TrustConfig + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int bitField0_; + public static final int NETWORK_ATTACHMENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object networkAttachment_ = ""; + + /** + * + * + *
            +       * Optional. The URI of the Network Attachment resource.
            +       * 
            + * + * string network_attachment = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The networkAttachment. + */ + @java.lang.Override + public java.lang.String getNetworkAttachment() { + java.lang.Object ref = networkAttachment_; + 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(); + networkAttachment_ = s; + return s; + } + } + + /** + * + * + *
            +       * Optional. The URI of the Network Attachment resource.
            +       * 
            + * + * string network_attachment = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for networkAttachment. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNetworkAttachmentBytes() { + java.lang.Object ref = networkAttachment_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + networkAttachment_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TRUST_CONFIG_FIELD_NUMBER = 2; + private com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig.Egress.TrustConfig + trustConfig_; + + /** + * + * + *
            +       * Optional. TrustConfig defines the trust configuration for egress.
            +       * 
            + * + * + * .google.cloud.networkservices.v1.AgentGateway.NetworkConfig.Egress.TrustConfig trust_config = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the trustConfig field is set. + */ + @java.lang.Override + public boolean hasTrustConfig() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
            +       * Optional. TrustConfig defines the trust configuration for egress.
            +       * 
            + * + * + * .google.cloud.networkservices.v1.AgentGateway.NetworkConfig.Egress.TrustConfig trust_config = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The trustConfig. + */ + @java.lang.Override + public com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig.Egress.TrustConfig + getTrustConfig() { + return trustConfig_ == null + ? com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig.Egress.TrustConfig + .getDefaultInstance() + : trustConfig_; + } + + /** + * + * + *
            +       * Optional. TrustConfig defines the trust configuration for egress.
            +       * 
            + * + * + * .google.cloud.networkservices.v1.AgentGateway.NetworkConfig.Egress.TrustConfig trust_config = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig.Egress + .TrustConfigOrBuilder + getTrustConfigOrBuilder() { + return trustConfig_ == null + ? com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig.Egress.TrustConfig + .getDefaultInstance() + : trustConfig_; + } + + 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(networkAttachment_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, networkAttachment_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getTrustConfig()); + } + 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(networkAttachment_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, networkAttachment_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getTrustConfig()); + } + 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.networkservices.v1.AgentGateway.NetworkConfig.Egress)) { + return super.equals(obj); + } + com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig.Egress other = + (com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig.Egress) obj; + + if (!getNetworkAttachment().equals(other.getNetworkAttachment())) return false; + if (hasTrustConfig() != other.hasTrustConfig()) return false; + if (hasTrustConfig()) { + if (!getTrustConfig().equals(other.getTrustConfig())) 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) + NETWORK_ATTACHMENT_FIELD_NUMBER; + hash = (53 * hash) + getNetworkAttachment().hashCode(); + if (hasTrustConfig()) { + hash = (37 * hash) + TRUST_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getTrustConfig().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig.Egress parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig.Egress 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.networkservices.v1.AgentGateway.NetworkConfig.Egress parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig.Egress 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.networkservices.v1.AgentGateway.NetworkConfig.Egress parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig.Egress parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig.Egress parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig.Egress 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.networkservices.v1.AgentGateway.NetworkConfig.Egress + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig.Egress + 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.networkservices.v1.AgentGateway.NetworkConfig.Egress parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig.Egress 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.networkservices.v1.AgentGateway.NetworkConfig.Egress 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; + } + + /** + * + * + *
            +       * Configuration for Egress
            +       * 
            + * + * Protobuf type {@code google.cloud.networkservices.v1.AgentGateway.NetworkConfig.Egress} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkservices.v1.AgentGateway.NetworkConfig.Egress) + com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig.EgressOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkservices.v1.AgentGatewayProto + .internal_static_google_cloud_networkservices_v1_AgentGateway_NetworkConfig_Egress_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkservices.v1.AgentGatewayProto + .internal_static_google_cloud_networkservices_v1_AgentGateway_NetworkConfig_Egress_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig.Egress.class, + com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig.Egress.Builder + .class); + } + + // Construct using + // com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig.Egress.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetTrustConfigFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + networkAttachment_ = ""; + trustConfig_ = null; + if (trustConfigBuilder_ != null) { + trustConfigBuilder_.dispose(); + trustConfigBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkservices.v1.AgentGatewayProto + .internal_static_google_cloud_networkservices_v1_AgentGateway_NetworkConfig_Egress_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig.Egress + getDefaultInstanceForType() { + return com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig.Egress + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig.Egress build() { + com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig.Egress result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig.Egress + buildPartial() { + com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig.Egress result = + new com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig.Egress(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig.Egress result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.networkAttachment_ = networkAttachment_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.trustConfig_ = + trustConfigBuilder_ == null ? trustConfig_ : trustConfigBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig.Egress) { + return mergeFrom( + (com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig.Egress) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig.Egress other) { + if (other + == com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig.Egress + .getDefaultInstance()) return this; + if (!other.getNetworkAttachment().isEmpty()) { + networkAttachment_ = other.networkAttachment_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasTrustConfig()) { + mergeTrustConfig(other.getTrustConfig()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + networkAttachment_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage( + internalGetTrustConfigFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object networkAttachment_ = ""; + + /** + * + * + *
            +         * Optional. The URI of the Network Attachment resource.
            +         * 
            + * + * string network_attachment = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The networkAttachment. + */ + public java.lang.String getNetworkAttachment() { + java.lang.Object ref = networkAttachment_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + networkAttachment_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
            +         * Optional. The URI of the Network Attachment resource.
            +         * 
            + * + * string network_attachment = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for networkAttachment. + */ + public com.google.protobuf.ByteString getNetworkAttachmentBytes() { + java.lang.Object ref = networkAttachment_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + networkAttachment_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
            +         * Optional. The URI of the Network Attachment resource.
            +         * 
            + * + * string network_attachment = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The networkAttachment to set. + * @return This builder for chaining. + */ + public Builder setNetworkAttachment(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + networkAttachment_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
            +         * Optional. The URI of the Network Attachment resource.
            +         * 
            + * + * string network_attachment = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearNetworkAttachment() { + networkAttachment_ = getDefaultInstance().getNetworkAttachment(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
            +         * Optional. The URI of the Network Attachment resource.
            +         * 
            + * + * string network_attachment = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for networkAttachment to set. + * @return This builder for chaining. + */ + public Builder setNetworkAttachmentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + networkAttachment_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig.Egress.TrustConfig + trustConfig_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig.Egress.TrustConfig, + com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig.Egress.TrustConfig + .Builder, + com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig.Egress + .TrustConfigOrBuilder> + trustConfigBuilder_; + + /** + * + * + *
            +         * Optional. TrustConfig defines the trust configuration for egress.
            +         * 
            + * + * + * .google.cloud.networkservices.v1.AgentGateway.NetworkConfig.Egress.TrustConfig trust_config = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the trustConfig field is set. + */ + public boolean hasTrustConfig() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
            +         * Optional. TrustConfig defines the trust configuration for egress.
            +         * 
            + * + * + * .google.cloud.networkservices.v1.AgentGateway.NetworkConfig.Egress.TrustConfig trust_config = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The trustConfig. + */ + public com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig.Egress.TrustConfig + getTrustConfig() { + if (trustConfigBuilder_ == null) { + return trustConfig_ == null + ? com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig.Egress.TrustConfig + .getDefaultInstance() + : trustConfig_; + } else { + return trustConfigBuilder_.getMessage(); + } + } + + /** + * + * + *
            +         * Optional. TrustConfig defines the trust configuration for egress.
            +         * 
            + * + * + * .google.cloud.networkservices.v1.AgentGateway.NetworkConfig.Egress.TrustConfig trust_config = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setTrustConfig( + com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig.Egress.TrustConfig + value) { + if (trustConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + trustConfig_ = value; + } else { + trustConfigBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
            +         * Optional. TrustConfig defines the trust configuration for egress.
            +         * 
            + * + * + * .google.cloud.networkservices.v1.AgentGateway.NetworkConfig.Egress.TrustConfig trust_config = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setTrustConfig( + com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig.Egress.TrustConfig + .Builder + builderForValue) { + if (trustConfigBuilder_ == null) { + trustConfig_ = builderForValue.build(); + } else { + trustConfigBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
            +         * Optional. TrustConfig defines the trust configuration for egress.
            +         * 
            + * + * + * .google.cloud.networkservices.v1.AgentGateway.NetworkConfig.Egress.TrustConfig trust_config = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeTrustConfig( + com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig.Egress.TrustConfig + value) { + if (trustConfigBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && trustConfig_ != null + && trustConfig_ + != com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig.Egress + .TrustConfig.getDefaultInstance()) { + getTrustConfigBuilder().mergeFrom(value); + } else { + trustConfig_ = value; + } + } else { + trustConfigBuilder_.mergeFrom(value); + } + if (trustConfig_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** + * + * + *
            +         * Optional. TrustConfig defines the trust configuration for egress.
            +         * 
            + * + * + * .google.cloud.networkservices.v1.AgentGateway.NetworkConfig.Egress.TrustConfig trust_config = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearTrustConfig() { + bitField0_ = (bitField0_ & ~0x00000002); + trustConfig_ = null; + if (trustConfigBuilder_ != null) { + trustConfigBuilder_.dispose(); + trustConfigBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
            +         * Optional. TrustConfig defines the trust configuration for egress.
            +         * 
            + * + * + * .google.cloud.networkservices.v1.AgentGateway.NetworkConfig.Egress.TrustConfig trust_config = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig.Egress.TrustConfig + .Builder + getTrustConfigBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return internalGetTrustConfigFieldBuilder().getBuilder(); + } + + /** + * + * + *
            +         * Optional. TrustConfig defines the trust configuration for egress.
            +         * 
            + * + * + * .google.cloud.networkservices.v1.AgentGateway.NetworkConfig.Egress.TrustConfig trust_config = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig.Egress + .TrustConfigOrBuilder + getTrustConfigOrBuilder() { + if (trustConfigBuilder_ != null) { + return trustConfigBuilder_.getMessageOrBuilder(); + } else { + return trustConfig_ == null + ? com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig.Egress.TrustConfig + .getDefaultInstance() + : trustConfig_; + } + } + + /** + * + * + *
            +         * Optional. TrustConfig defines the trust configuration for egress.
            +         * 
            + * + * + * .google.cloud.networkservices.v1.AgentGateway.NetworkConfig.Egress.TrustConfig trust_config = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig.Egress.TrustConfig, + com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig.Egress.TrustConfig + .Builder, + com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig.Egress + .TrustConfigOrBuilder> + internalGetTrustConfigFieldBuilder() { + if (trustConfigBuilder_ == null) { + trustConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig.Egress + .TrustConfig, + com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig.Egress + .TrustConfig.Builder, + com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig.Egress + .TrustConfigOrBuilder>(getTrustConfig(), getParentForChildren(), isClean()); + trustConfig_ = null; + } + return trustConfigBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.networkservices.v1.AgentGateway.NetworkConfig.Egress) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkservices.v1.AgentGateway.NetworkConfig.Egress) + private static final com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig.Egress + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig.Egress(); + } + + public static com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig.Egress + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Egress parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig.Egress + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface DnsPeeringConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkservices.v1.AgentGateway.NetworkConfig.DnsPeeringConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
            +       * Required. Domain names for which DNS queries should be forwarded to the
            +       * target network.
            +       * 
            + * + * repeated string domains = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return A list containing the domains. + */ + java.util.List getDomainsList(); + + /** + * + * + *
            +       * Required. Domain names for which DNS queries should be forwarded to the
            +       * target network.
            +       * 
            + * + * repeated string domains = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The count of domains. + */ + int getDomainsCount(); + + /** + * + * + *
            +       * Required. Domain names for which DNS queries should be forwarded to the
            +       * target network.
            +       * 
            + * + * repeated string domains = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index of the element to return. + * @return The domains at the given index. + */ + java.lang.String getDomains(int index); + + /** + * + * + *
            +       * Required. Domain names for which DNS queries should be forwarded to the
            +       * target network.
            +       * 
            + * + * repeated string domains = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index of the value to return. + * @return The bytes of the domains at the given index. + */ + com.google.protobuf.ByteString getDomainsBytes(int index); + + /** + * + * + *
            +       * Required. Target project ID to which DNS queries should be forwarded
            +       * to. This can be the same project that contains the AgentGateway or a
            +       * different project.
            +       * 
            + * + * string target_project = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The targetProject. + */ + java.lang.String getTargetProject(); + + /** + * + * + *
            +       * Required. Target project ID to which DNS queries should be forwarded
            +       * to. This can be the same project that contains the AgentGateway or a
            +       * different project.
            +       * 
            + * + * string target_project = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for targetProject. + */ + com.google.protobuf.ByteString getTargetProjectBytes(); + + /** + * + * + *
            +       * Required. Target network in 'target project' to which DNS queries
            +       * should be forwarded to. Must be in format of
            +       * `projects/{project}/global/networks/{network}`.
            +       * 
            + * + * + * string target_network = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The targetNetwork. + */ + java.lang.String getTargetNetwork(); + + /** + * + * + *
            +       * Required. Target network in 'target project' to which DNS queries
            +       * should be forwarded to. Must be in format of
            +       * `projects/{project}/global/networks/{network}`.
            +       * 
            + * + * + * string target_network = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for targetNetwork. + */ + com.google.protobuf.ByteString getTargetNetworkBytes(); + } + + /** + * + * + *
            +     * DNS peering config for the user VPC network.
            +     * 
            + * + * Protobuf type {@code + * google.cloud.networkservices.v1.AgentGateway.NetworkConfig.DnsPeeringConfig} + */ + public static final class DnsPeeringConfig extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkservices.v1.AgentGateway.NetworkConfig.DnsPeeringConfig) + DnsPeeringConfigOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "DnsPeeringConfig"); + } + + // Use DnsPeeringConfig.newBuilder() to construct. + private DnsPeeringConfig(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private DnsPeeringConfig() { + domains_ = com.google.protobuf.LazyStringArrayList.emptyList(); + targetProject_ = ""; + targetNetwork_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkservices.v1.AgentGatewayProto + .internal_static_google_cloud_networkservices_v1_AgentGateway_NetworkConfig_DnsPeeringConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkservices.v1.AgentGatewayProto + .internal_static_google_cloud_networkservices_v1_AgentGateway_NetworkConfig_DnsPeeringConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig.DnsPeeringConfig + .class, + com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig.DnsPeeringConfig + .Builder.class); + } + + public static final int DOMAINS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList domains_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + /** + * + * + *
            +       * Required. Domain names for which DNS queries should be forwarded to the
            +       * target network.
            +       * 
            + * + * repeated string domains = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return A list containing the domains. + */ + public com.google.protobuf.ProtocolStringList getDomainsList() { + return domains_; + } + + /** + * + * + *
            +       * Required. Domain names for which DNS queries should be forwarded to the
            +       * target network.
            +       * 
            + * + * repeated string domains = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The count of domains. + */ + public int getDomainsCount() { + return domains_.size(); + } + + /** + * + * + *
            +       * Required. Domain names for which DNS queries should be forwarded to the
            +       * target network.
            +       * 
            + * + * repeated string domains = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index of the element to return. + * @return The domains at the given index. + */ + public java.lang.String getDomains(int index) { + return domains_.get(index); + } + + /** + * + * + *
            +       * Required. Domain names for which DNS queries should be forwarded to the
            +       * target network.
            +       * 
            + * + * repeated string domains = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index of the value to return. + * @return The bytes of the domains at the given index. + */ + public com.google.protobuf.ByteString getDomainsBytes(int index) { + return domains_.getByteString(index); + } + + public static final int TARGET_PROJECT_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object targetProject_ = ""; + + /** + * + * + *
            +       * Required. Target project ID to which DNS queries should be forwarded
            +       * to. This can be the same project that contains the AgentGateway or a
            +       * different project.
            +       * 
            + * + * string target_project = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The targetProject. + */ + @java.lang.Override + public java.lang.String getTargetProject() { + java.lang.Object ref = targetProject_; + 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(); + targetProject_ = s; + return s; + } + } + + /** + * + * + *
            +       * Required. Target project ID to which DNS queries should be forwarded
            +       * to. This can be the same project that contains the AgentGateway or a
            +       * different project.
            +       * 
            + * + * string target_project = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for targetProject. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTargetProjectBytes() { + java.lang.Object ref = targetProject_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + targetProject_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TARGET_NETWORK_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object targetNetwork_ = ""; + + /** + * + * + *
            +       * Required. Target network in 'target project' to which DNS queries
            +       * should be forwarded to. Must be in format of
            +       * `projects/{project}/global/networks/{network}`.
            +       * 
            + * + * + * string target_network = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The targetNetwork. + */ + @java.lang.Override + public java.lang.String getTargetNetwork() { + java.lang.Object ref = targetNetwork_; + 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(); + targetNetwork_ = s; + return s; + } + } + + /** + * + * + *
            +       * Required. Target network in 'target project' to which DNS queries
            +       * should be forwarded to. Must be in format of
            +       * `projects/{project}/global/networks/{network}`.
            +       * 
            + * + * + * string target_network = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for targetNetwork. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTargetNetworkBytes() { + java.lang.Object ref = targetNetwork_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + targetNetwork_ = 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 < domains_.size(); i++) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, domains_.getRaw(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(targetProject_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, targetProject_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(targetNetwork_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, targetNetwork_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + { + int dataSize = 0; + for (int i = 0; i < domains_.size(); i++) { + dataSize += computeStringSizeNoTag(domains_.getRaw(i)); + } + size += dataSize; + size += 1 * getDomainsList().size(); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(targetProject_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, targetProject_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(targetNetwork_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, targetNetwork_); + } + 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.networkservices.v1.AgentGateway.NetworkConfig.DnsPeeringConfig)) { + return super.equals(obj); + } + com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig.DnsPeeringConfig other = + (com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig.DnsPeeringConfig) obj; + + if (!getDomainsList().equals(other.getDomainsList())) return false; + if (!getTargetProject().equals(other.getTargetProject())) return false; + if (!getTargetNetwork().equals(other.getTargetNetwork())) 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 (getDomainsCount() > 0) { + hash = (37 * hash) + DOMAINS_FIELD_NUMBER; + hash = (53 * hash) + getDomainsList().hashCode(); + } + hash = (37 * hash) + TARGET_PROJECT_FIELD_NUMBER; + hash = (53 * hash) + getTargetProject().hashCode(); + hash = (37 * hash) + TARGET_NETWORK_FIELD_NUMBER; + hash = (53 * hash) + getTargetNetwork().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig.DnsPeeringConfig + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig.DnsPeeringConfig + 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.networkservices.v1.AgentGateway.NetworkConfig.DnsPeeringConfig + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig.DnsPeeringConfig + 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.networkservices.v1.AgentGateway.NetworkConfig.DnsPeeringConfig + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig.DnsPeeringConfig + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig.DnsPeeringConfig + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig.DnsPeeringConfig + 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.networkservices.v1.AgentGateway.NetworkConfig.DnsPeeringConfig + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig.DnsPeeringConfig + 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.networkservices.v1.AgentGateway.NetworkConfig.DnsPeeringConfig + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig.DnsPeeringConfig + 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.networkservices.v1.AgentGateway.NetworkConfig.DnsPeeringConfig + 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; + } + + /** + * + * + *
            +       * DNS peering config for the user VPC network.
            +       * 
            + * + * Protobuf type {@code + * google.cloud.networkservices.v1.AgentGateway.NetworkConfig.DnsPeeringConfig} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkservices.v1.AgentGateway.NetworkConfig.DnsPeeringConfig) + com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig.DnsPeeringConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkservices.v1.AgentGatewayProto + .internal_static_google_cloud_networkservices_v1_AgentGateway_NetworkConfig_DnsPeeringConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkservices.v1.AgentGatewayProto + .internal_static_google_cloud_networkservices_v1_AgentGateway_NetworkConfig_DnsPeeringConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig.DnsPeeringConfig + .class, + com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig.DnsPeeringConfig + .Builder.class); + } + + // Construct using + // com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig.DnsPeeringConfig.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + domains_ = com.google.protobuf.LazyStringArrayList.emptyList(); + targetProject_ = ""; + targetNetwork_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkservices.v1.AgentGatewayProto + .internal_static_google_cloud_networkservices_v1_AgentGateway_NetworkConfig_DnsPeeringConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig.DnsPeeringConfig + getDefaultInstanceForType() { + return com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig.DnsPeeringConfig + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig.DnsPeeringConfig + build() { + com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig.DnsPeeringConfig result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig.DnsPeeringConfig + buildPartial() { + com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig.DnsPeeringConfig result = + new com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig.DnsPeeringConfig( + this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig.DnsPeeringConfig + result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + domains_.makeImmutable(); + result.domains_ = domains_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.targetProject_ = targetProject_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.targetNetwork_ = targetNetwork_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig.DnsPeeringConfig) { + return mergeFrom( + (com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig.DnsPeeringConfig) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig.DnsPeeringConfig other) { + if (other + == com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig.DnsPeeringConfig + .getDefaultInstance()) return this; + if (!other.domains_.isEmpty()) { + if (domains_.isEmpty()) { + domains_ = other.domains_; + bitField0_ |= 0x00000001; + } else { + ensureDomainsIsMutable(); + domains_.addAll(other.domains_); + } + onChanged(); + } + if (!other.getTargetProject().isEmpty()) { + targetProject_ = other.targetProject_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getTargetNetwork().isEmpty()) { + targetNetwork_ = other.targetNetwork_; + bitField0_ |= 0x00000004; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureDomainsIsMutable(); + domains_.add(s); + break; + } // case 10 + case 18: + { + targetProject_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + targetNetwork_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.protobuf.LazyStringArrayList domains_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureDomainsIsMutable() { + if (!domains_.isModifiable()) { + domains_ = new com.google.protobuf.LazyStringArrayList(domains_); + } + bitField0_ |= 0x00000001; + } + + /** + * + * + *
            +         * Required. Domain names for which DNS queries should be forwarded to the
            +         * target network.
            +         * 
            + * + * repeated string domains = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return A list containing the domains. + */ + public com.google.protobuf.ProtocolStringList getDomainsList() { + domains_.makeImmutable(); + return domains_; + } + + /** + * + * + *
            +         * Required. Domain names for which DNS queries should be forwarded to the
            +         * target network.
            +         * 
            + * + * repeated string domains = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The count of domains. + */ + public int getDomainsCount() { + return domains_.size(); + } + + /** + * + * + *
            +         * Required. Domain names for which DNS queries should be forwarded to the
            +         * target network.
            +         * 
            + * + * repeated string domains = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index of the element to return. + * @return The domains at the given index. + */ + public java.lang.String getDomains(int index) { + return domains_.get(index); + } + + /** + * + * + *
            +         * Required. Domain names for which DNS queries should be forwarded to the
            +         * target network.
            +         * 
            + * + * repeated string domains = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index of the value to return. + * @return The bytes of the domains at the given index. + */ + public com.google.protobuf.ByteString getDomainsBytes(int index) { + return domains_.getByteString(index); + } + + /** + * + * + *
            +         * Required. Domain names for which DNS queries should be forwarded to the
            +         * target network.
            +         * 
            + * + * repeated string domains = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index to set the value at. + * @param value The domains to set. + * @return This builder for chaining. + */ + public Builder setDomains(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureDomainsIsMutable(); + domains_.set(index, value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
            +         * Required. Domain names for which DNS queries should be forwarded to the
            +         * target network.
            +         * 
            + * + * repeated string domains = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The domains to add. + * @return This builder for chaining. + */ + public Builder addDomains(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureDomainsIsMutable(); + domains_.add(value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
            +         * Required. Domain names for which DNS queries should be forwarded to the
            +         * target network.
            +         * 
            + * + * repeated string domains = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param values The domains to add. + * @return This builder for chaining. + */ + public Builder addAllDomains(java.lang.Iterable values) { + ensureDomainsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, domains_); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
            +         * Required. Domain names for which DNS queries should be forwarded to the
            +         * target network.
            +         * 
            + * + * repeated string domains = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearDomains() { + domains_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + ; + onChanged(); + return this; + } + + /** + * + * + *
            +         * Required. Domain names for which DNS queries should be forwarded to the
            +         * target network.
            +         * 
            + * + * repeated string domains = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes of the domains to add. + * @return This builder for chaining. + */ + public Builder addDomainsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureDomainsIsMutable(); + domains_.add(value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object targetProject_ = ""; + + /** + * + * + *
            +         * Required. Target project ID to which DNS queries should be forwarded
            +         * to. This can be the same project that contains the AgentGateway or a
            +         * different project.
            +         * 
            + * + * string target_project = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The targetProject. + */ + public java.lang.String getTargetProject() { + java.lang.Object ref = targetProject_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + targetProject_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
            +         * Required. Target project ID to which DNS queries should be forwarded
            +         * to. This can be the same project that contains the AgentGateway or a
            +         * different project.
            +         * 
            + * + * string target_project = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for targetProject. + */ + public com.google.protobuf.ByteString getTargetProjectBytes() { + java.lang.Object ref = targetProject_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + targetProject_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
            +         * Required. Target project ID to which DNS queries should be forwarded
            +         * to. This can be the same project that contains the AgentGateway or a
            +         * different project.
            +         * 
            + * + * string target_project = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The targetProject to set. + * @return This builder for chaining. + */ + public Builder setTargetProject(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + targetProject_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
            +         * Required. Target project ID to which DNS queries should be forwarded
            +         * to. This can be the same project that contains the AgentGateway or a
            +         * different project.
            +         * 
            + * + * string target_project = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearTargetProject() { + targetProject_ = getDefaultInstance().getTargetProject(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
            +         * Required. Target project ID to which DNS queries should be forwarded
            +         * to. This can be the same project that contains the AgentGateway or a
            +         * different project.
            +         * 
            + * + * string target_project = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for targetProject to set. + * @return This builder for chaining. + */ + public Builder setTargetProjectBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + targetProject_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object targetNetwork_ = ""; + + /** + * + * + *
            +         * Required. Target network in 'target project' to which DNS queries
            +         * should be forwarded to. Must be in format of
            +         * `projects/{project}/global/networks/{network}`.
            +         * 
            + * + * + * string target_network = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The targetNetwork. + */ + public java.lang.String getTargetNetwork() { + java.lang.Object ref = targetNetwork_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + targetNetwork_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
            +         * Required. Target network in 'target project' to which DNS queries
            +         * should be forwarded to. Must be in format of
            +         * `projects/{project}/global/networks/{network}`.
            +         * 
            + * + * + * string target_network = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for targetNetwork. + */ + public com.google.protobuf.ByteString getTargetNetworkBytes() { + java.lang.Object ref = targetNetwork_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + targetNetwork_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
            +         * Required. Target network in 'target project' to which DNS queries
            +         * should be forwarded to. Must be in format of
            +         * `projects/{project}/global/networks/{network}`.
            +         * 
            + * + * + * string target_network = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The targetNetwork to set. + * @return This builder for chaining. + */ + public Builder setTargetNetwork(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + targetNetwork_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
            +         * Required. Target network in 'target project' to which DNS queries
            +         * should be forwarded to. Must be in format of
            +         * `projects/{project}/global/networks/{network}`.
            +         * 
            + * + * + * string target_network = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearTargetNetwork() { + targetNetwork_ = getDefaultInstance().getTargetNetwork(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
            +         * Required. Target network in 'target project' to which DNS queries
            +         * should be forwarded to. Must be in format of
            +         * `projects/{project}/global/networks/{network}`.
            +         * 
            + * + * + * string target_network = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for targetNetwork to set. + * @return This builder for chaining. + */ + public Builder setTargetNetworkBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + targetNetwork_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.networkservices.v1.AgentGateway.NetworkConfig.DnsPeeringConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkservices.v1.AgentGateway.NetworkConfig.DnsPeeringConfig) + private static final com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig + .DnsPeeringConfig + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig.DnsPeeringConfig(); + } + + public static com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig.DnsPeeringConfig + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DnsPeeringConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig.DnsPeeringConfig + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int bitField0_; + public static final int EGRESS_FIELD_NUMBER = 1; + private com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig.Egress egress_; + + /** + * + * + *
            +     * Optional. Optional PSC-Interface network attachment for connectivity to
            +     * your private VPCs network.
            +     * 
            + * + * + * .google.cloud.networkservices.v1.AgentGateway.NetworkConfig.Egress egress = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the egress field is set. + */ + @java.lang.Override + public boolean hasEgress() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
            +     * Optional. Optional PSC-Interface network attachment for connectivity to
            +     * your private VPCs network.
            +     * 
            + * + * + * .google.cloud.networkservices.v1.AgentGateway.NetworkConfig.Egress egress = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The egress. + */ + @java.lang.Override + public com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig.Egress getEgress() { + return egress_ == null + ? com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig.Egress + .getDefaultInstance() + : egress_; + } + + /** + * + * + *
            +     * Optional. Optional PSC-Interface network attachment for connectivity to
            +     * your private VPCs network.
            +     * 
            + * + * + * .google.cloud.networkservices.v1.AgentGateway.NetworkConfig.Egress egress = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig.EgressOrBuilder + getEgressOrBuilder() { + return egress_ == null + ? com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig.Egress + .getDefaultInstance() + : egress_; + } + + public static final int DNS_PEERING_CONFIG_FIELD_NUMBER = 2; + private com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig.DnsPeeringConfig + dnsPeeringConfig_; + + /** + * + * + *
            +     * Optional. Optional DNS peering configuration for connectivity to your
            +     * private VPC network.
            +     * 
            + * + * + * .google.cloud.networkservices.v1.AgentGateway.NetworkConfig.DnsPeeringConfig dns_peering_config = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the dnsPeeringConfig field is set. + */ + @java.lang.Override + public boolean hasDnsPeeringConfig() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
            +     * Optional. Optional DNS peering configuration for connectivity to your
            +     * private VPC network.
            +     * 
            + * + * + * .google.cloud.networkservices.v1.AgentGateway.NetworkConfig.DnsPeeringConfig dns_peering_config = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The dnsPeeringConfig. + */ + @java.lang.Override + public com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig.DnsPeeringConfig + getDnsPeeringConfig() { + return dnsPeeringConfig_ == null + ? com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig.DnsPeeringConfig + .getDefaultInstance() + : dnsPeeringConfig_; + } + + /** + * + * + *
            +     * Optional. Optional DNS peering configuration for connectivity to your
            +     * private VPC network.
            +     * 
            + * + * + * .google.cloud.networkservices.v1.AgentGateway.NetworkConfig.DnsPeeringConfig dns_peering_config = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig.DnsPeeringConfigOrBuilder + getDnsPeeringConfigOrBuilder() { + return dnsPeeringConfig_ == null + ? com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig.DnsPeeringConfig + .getDefaultInstance() + : dnsPeeringConfig_; + } + + 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, getEgress()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(2, getDnsPeeringConfig()); + } + 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, getEgress()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getDnsPeeringConfig()); + } + 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.networkservices.v1.AgentGateway.NetworkConfig)) { + return super.equals(obj); + } + com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig other = + (com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig) obj; + + if (hasEgress() != other.hasEgress()) return false; + if (hasEgress()) { + if (!getEgress().equals(other.getEgress())) return false; + } + if (hasDnsPeeringConfig() != other.hasDnsPeeringConfig()) return false; + if (hasDnsPeeringConfig()) { + if (!getDnsPeeringConfig().equals(other.getDnsPeeringConfig())) 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 (hasEgress()) { + hash = (37 * hash) + EGRESS_FIELD_NUMBER; + hash = (53 * hash) + getEgress().hashCode(); + } + if (hasDnsPeeringConfig()) { + hash = (37 * hash) + DNS_PEERING_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getDnsPeeringConfig().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig 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.networkservices.v1.AgentGateway.NetworkConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig 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.networkservices.v1.AgentGateway.NetworkConfig parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig 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.networkservices.v1.AgentGateway.NetworkConfig parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig 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.networkservices.v1.AgentGateway.NetworkConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig 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.networkservices.v1.AgentGateway.NetworkConfig 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; + } + + /** + * + * + *
            +     * NetworkConfig contains network configurations for the AgentGateway.
            +     * 
            + * + * Protobuf type {@code google.cloud.networkservices.v1.AgentGateway.NetworkConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkservices.v1.AgentGateway.NetworkConfig) + com.google.cloud.networkservices.v1.AgentGateway.NetworkConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkservices.v1.AgentGatewayProto + .internal_static_google_cloud_networkservices_v1_AgentGateway_NetworkConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkservices.v1.AgentGatewayProto + .internal_static_google_cloud_networkservices_v1_AgentGateway_NetworkConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig.class, + com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig.Builder.class); + } + + // Construct using com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetEgressFieldBuilder(); + internalGetDnsPeeringConfigFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + egress_ = null; + if (egressBuilder_ != null) { + egressBuilder_.dispose(); + egressBuilder_ = null; + } + dnsPeeringConfig_ = null; + if (dnsPeeringConfigBuilder_ != null) { + dnsPeeringConfigBuilder_.dispose(); + dnsPeeringConfigBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkservices.v1.AgentGatewayProto + .internal_static_google_cloud_networkservices_v1_AgentGateway_NetworkConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig + getDefaultInstanceForType() { + return com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig build() { + com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig buildPartial() { + com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig result = + new com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.egress_ = egressBuilder_ == null ? egress_ : egressBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.dnsPeeringConfig_ = + dnsPeeringConfigBuilder_ == null + ? dnsPeeringConfig_ + : dnsPeeringConfigBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig) { + return mergeFrom((com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig other) { + if (other + == com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig.getDefaultInstance()) + return this; + if (other.hasEgress()) { + mergeEgress(other.getEgress()); + } + if (other.hasDnsPeeringConfig()) { + mergeDnsPeeringConfig(other.getDnsPeeringConfig()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage( + internalGetEgressFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage( + internalGetDnsPeeringConfigFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig.Egress egress_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig.Egress, + com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig.Egress.Builder, + com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig.EgressOrBuilder> + egressBuilder_; + + /** + * + * + *
            +       * Optional. Optional PSC-Interface network attachment for connectivity to
            +       * your private VPCs network.
            +       * 
            + * + * + * .google.cloud.networkservices.v1.AgentGateway.NetworkConfig.Egress egress = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the egress field is set. + */ + public boolean hasEgress() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
            +       * Optional. Optional PSC-Interface network attachment for connectivity to
            +       * your private VPCs network.
            +       * 
            + * + * + * .google.cloud.networkservices.v1.AgentGateway.NetworkConfig.Egress egress = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The egress. + */ + public com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig.Egress getEgress() { + if (egressBuilder_ == null) { + return egress_ == null + ? com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig.Egress + .getDefaultInstance() + : egress_; + } else { + return egressBuilder_.getMessage(); + } + } + + /** + * + * + *
            +       * Optional. Optional PSC-Interface network attachment for connectivity to
            +       * your private VPCs network.
            +       * 
            + * + * + * .google.cloud.networkservices.v1.AgentGateway.NetworkConfig.Egress egress = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setEgress( + com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig.Egress value) { + if (egressBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + egress_ = value; + } else { + egressBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
            +       * Optional. Optional PSC-Interface network attachment for connectivity to
            +       * your private VPCs network.
            +       * 
            + * + * + * .google.cloud.networkservices.v1.AgentGateway.NetworkConfig.Egress egress = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setEgress( + com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig.Egress.Builder + builderForValue) { + if (egressBuilder_ == null) { + egress_ = builderForValue.build(); + } else { + egressBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
            +       * Optional. Optional PSC-Interface network attachment for connectivity to
            +       * your private VPCs network.
            +       * 
            + * + * + * .google.cloud.networkservices.v1.AgentGateway.NetworkConfig.Egress egress = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeEgress( + com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig.Egress value) { + if (egressBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && egress_ != null + && egress_ + != com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig.Egress + .getDefaultInstance()) { + getEgressBuilder().mergeFrom(value); + } else { + egress_ = value; + } + } else { + egressBuilder_.mergeFrom(value); + } + if (egress_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + + /** + * + * + *
            +       * Optional. Optional PSC-Interface network attachment for connectivity to
            +       * your private VPCs network.
            +       * 
            + * + * + * .google.cloud.networkservices.v1.AgentGateway.NetworkConfig.Egress egress = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearEgress() { + bitField0_ = (bitField0_ & ~0x00000001); + egress_ = null; + if (egressBuilder_ != null) { + egressBuilder_.dispose(); + egressBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
            +       * Optional. Optional PSC-Interface network attachment for connectivity to
            +       * your private VPCs network.
            +       * 
            + * + * + * .google.cloud.networkservices.v1.AgentGateway.NetworkConfig.Egress egress = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig.Egress.Builder + getEgressBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return internalGetEgressFieldBuilder().getBuilder(); + } + + /** + * + * + *
            +       * Optional. Optional PSC-Interface network attachment for connectivity to
            +       * your private VPCs network.
            +       * 
            + * + * + * .google.cloud.networkservices.v1.AgentGateway.NetworkConfig.Egress egress = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig.EgressOrBuilder + getEgressOrBuilder() { + if (egressBuilder_ != null) { + return egressBuilder_.getMessageOrBuilder(); + } else { + return egress_ == null + ? com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig.Egress + .getDefaultInstance() + : egress_; + } + } + + /** + * + * + *
            +       * Optional. Optional PSC-Interface network attachment for connectivity to
            +       * your private VPCs network.
            +       * 
            + * + * + * .google.cloud.networkservices.v1.AgentGateway.NetworkConfig.Egress egress = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig.Egress, + com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig.Egress.Builder, + com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig.EgressOrBuilder> + internalGetEgressFieldBuilder() { + if (egressBuilder_ == null) { + egressBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig.Egress, + com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig.Egress.Builder, + com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig.EgressOrBuilder>( + getEgress(), getParentForChildren(), isClean()); + egress_ = null; + } + return egressBuilder_; + } + + private com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig.DnsPeeringConfig + dnsPeeringConfig_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig.DnsPeeringConfig, + com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig.DnsPeeringConfig + .Builder, + com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig + .DnsPeeringConfigOrBuilder> + dnsPeeringConfigBuilder_; + + /** + * + * + *
            +       * Optional. Optional DNS peering configuration for connectivity to your
            +       * private VPC network.
            +       * 
            + * + * + * .google.cloud.networkservices.v1.AgentGateway.NetworkConfig.DnsPeeringConfig dns_peering_config = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the dnsPeeringConfig field is set. + */ + public boolean hasDnsPeeringConfig() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
            +       * Optional. Optional DNS peering configuration for connectivity to your
            +       * private VPC network.
            +       * 
            + * + * + * .google.cloud.networkservices.v1.AgentGateway.NetworkConfig.DnsPeeringConfig dns_peering_config = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The dnsPeeringConfig. + */ + public com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig.DnsPeeringConfig + getDnsPeeringConfig() { + if (dnsPeeringConfigBuilder_ == null) { + return dnsPeeringConfig_ == null + ? com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig.DnsPeeringConfig + .getDefaultInstance() + : dnsPeeringConfig_; + } else { + return dnsPeeringConfigBuilder_.getMessage(); + } + } + + /** + * + * + *
            +       * Optional. Optional DNS peering configuration for connectivity to your
            +       * private VPC network.
            +       * 
            + * + * + * .google.cloud.networkservices.v1.AgentGateway.NetworkConfig.DnsPeeringConfig dns_peering_config = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setDnsPeeringConfig( + com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig.DnsPeeringConfig value) { + if (dnsPeeringConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + dnsPeeringConfig_ = value; + } else { + dnsPeeringConfigBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
            +       * Optional. Optional DNS peering configuration for connectivity to your
            +       * private VPC network.
            +       * 
            + * + * + * .google.cloud.networkservices.v1.AgentGateway.NetworkConfig.DnsPeeringConfig dns_peering_config = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setDnsPeeringConfig( + com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig.DnsPeeringConfig.Builder + builderForValue) { + if (dnsPeeringConfigBuilder_ == null) { + dnsPeeringConfig_ = builderForValue.build(); + } else { + dnsPeeringConfigBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
            +       * Optional. Optional DNS peering configuration for connectivity to your
            +       * private VPC network.
            +       * 
            + * + * + * .google.cloud.networkservices.v1.AgentGateway.NetworkConfig.DnsPeeringConfig dns_peering_config = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeDnsPeeringConfig( + com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig.DnsPeeringConfig value) { + if (dnsPeeringConfigBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && dnsPeeringConfig_ != null + && dnsPeeringConfig_ + != com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig.DnsPeeringConfig + .getDefaultInstance()) { + getDnsPeeringConfigBuilder().mergeFrom(value); + } else { + dnsPeeringConfig_ = value; + } + } else { + dnsPeeringConfigBuilder_.mergeFrom(value); + } + if (dnsPeeringConfig_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** + * + * + *
            +       * Optional. Optional DNS peering configuration for connectivity to your
            +       * private VPC network.
            +       * 
            + * + * + * .google.cloud.networkservices.v1.AgentGateway.NetworkConfig.DnsPeeringConfig dns_peering_config = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearDnsPeeringConfig() { + bitField0_ = (bitField0_ & ~0x00000002); + dnsPeeringConfig_ = null; + if (dnsPeeringConfigBuilder_ != null) { + dnsPeeringConfigBuilder_.dispose(); + dnsPeeringConfigBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
            +       * Optional. Optional DNS peering configuration for connectivity to your
            +       * private VPC network.
            +       * 
            + * + * + * .google.cloud.networkservices.v1.AgentGateway.NetworkConfig.DnsPeeringConfig dns_peering_config = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig.DnsPeeringConfig.Builder + getDnsPeeringConfigBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return internalGetDnsPeeringConfigFieldBuilder().getBuilder(); + } + + /** + * + * + *
            +       * Optional. Optional DNS peering configuration for connectivity to your
            +       * private VPC network.
            +       * 
            + * + * + * .google.cloud.networkservices.v1.AgentGateway.NetworkConfig.DnsPeeringConfig dns_peering_config = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig + .DnsPeeringConfigOrBuilder + getDnsPeeringConfigOrBuilder() { + if (dnsPeeringConfigBuilder_ != null) { + return dnsPeeringConfigBuilder_.getMessageOrBuilder(); + } else { + return dnsPeeringConfig_ == null + ? com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig.DnsPeeringConfig + .getDefaultInstance() + : dnsPeeringConfig_; + } + } + + /** + * + * + *
            +       * Optional. Optional DNS peering configuration for connectivity to your
            +       * private VPC network.
            +       * 
            + * + * + * .google.cloud.networkservices.v1.AgentGateway.NetworkConfig.DnsPeeringConfig dns_peering_config = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig.DnsPeeringConfig, + com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig.DnsPeeringConfig + .Builder, + com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig + .DnsPeeringConfigOrBuilder> + internalGetDnsPeeringConfigFieldBuilder() { + if (dnsPeeringConfigBuilder_ == null) { + dnsPeeringConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig.DnsPeeringConfig, + com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig.DnsPeeringConfig + .Builder, + com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig + .DnsPeeringConfigOrBuilder>( + getDnsPeeringConfig(), getParentForChildren(), isClean()); + dnsPeeringConfig_ = null; + } + return dnsPeeringConfigBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.networkservices.v1.AgentGateway.NetworkConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkservices.v1.AgentGateway.NetworkConfig) + private static final com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig(); + } + + public static com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public NetworkConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface AgentGatewayOutputCardOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkservices.v1.AgentGateway.AgentGatewayOutputCard) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
            +     * Output only. mTLS Endpoint associated with this AgentGateway
            +     * 
            + * + * string mtls_endpoint = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The mtlsEndpoint. + */ + java.lang.String getMtlsEndpoint(); + + /** + * + * + *
            +     * Output only. mTLS Endpoint associated with this AgentGateway
            +     * 
            + * + * string mtls_endpoint = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for mtlsEndpoint. + */ + com.google.protobuf.ByteString getMtlsEndpointBytes(); + + /** + * + * + *
            +     * Output only. Root Certificates for Agents to validate this AgentGateway
            +     * 
            + * + * repeated string root_certificates = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return A list containing the rootCertificates. + */ + java.util.List getRootCertificatesList(); + + /** + * + * + *
            +     * Output only. Root Certificates for Agents to validate this AgentGateway
            +     * 
            + * + * repeated string root_certificates = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The count of rootCertificates. + */ + int getRootCertificatesCount(); + + /** + * + * + *
            +     * Output only. Root Certificates for Agents to validate this AgentGateway
            +     * 
            + * + * repeated string root_certificates = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index of the element to return. + * @return The rootCertificates at the given index. + */ + java.lang.String getRootCertificates(int index); + + /** + * + * + *
            +     * Output only. Root Certificates for Agents to validate this AgentGateway
            +     * 
            + * + * repeated string root_certificates = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index of the value to return. + * @return The bytes of the rootCertificates at the given index. + */ + com.google.protobuf.ByteString getRootCertificatesBytes(int index); + + /** + * + * + *
            +     * Output only. Service Account used by Service Extensions to operate.
            +     * 
            + * + * + * string service_extensions_service_account = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The serviceExtensionsServiceAccount. + */ + java.lang.String getServiceExtensionsServiceAccount(); + + /** + * + * + *
            +     * Output only. Service Account used by Service Extensions to operate.
            +     * 
            + * + * + * string service_extensions_service_account = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The bytes for serviceExtensionsServiceAccount. + */ + com.google.protobuf.ByteString getServiceExtensionsServiceAccountBytes(); + } + + /** + * + * + *
            +   * AgentGatewayOutputCard contains informational output-only fields
            +   * 
            + * + * Protobuf type {@code google.cloud.networkservices.v1.AgentGateway.AgentGatewayOutputCard} + */ + public static final class AgentGatewayOutputCard extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkservices.v1.AgentGateway.AgentGatewayOutputCard) + AgentGatewayOutputCardOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "AgentGatewayOutputCard"); + } + + // Use AgentGatewayOutputCard.newBuilder() to construct. + private AgentGatewayOutputCard(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private AgentGatewayOutputCard() { + mtlsEndpoint_ = ""; + rootCertificates_ = com.google.protobuf.LazyStringArrayList.emptyList(); + serviceExtensionsServiceAccount_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkservices.v1.AgentGatewayProto + .internal_static_google_cloud_networkservices_v1_AgentGateway_AgentGatewayOutputCard_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkservices.v1.AgentGatewayProto + .internal_static_google_cloud_networkservices_v1_AgentGateway_AgentGatewayOutputCard_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkservices.v1.AgentGateway.AgentGatewayOutputCard.class, + com.google.cloud.networkservices.v1.AgentGateway.AgentGatewayOutputCard.Builder + .class); + } + + public static final int MTLS_ENDPOINT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object mtlsEndpoint_ = ""; + + /** + * + * + *
            +     * Output only. mTLS Endpoint associated with this AgentGateway
            +     * 
            + * + * string mtls_endpoint = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The mtlsEndpoint. + */ + @java.lang.Override + public java.lang.String getMtlsEndpoint() { + java.lang.Object ref = mtlsEndpoint_; + 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(); + mtlsEndpoint_ = s; + return s; + } + } + + /** + * + * + *
            +     * Output only. mTLS Endpoint associated with this AgentGateway
            +     * 
            + * + * string mtls_endpoint = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for mtlsEndpoint. + */ + @java.lang.Override + public com.google.protobuf.ByteString getMtlsEndpointBytes() { + java.lang.Object ref = mtlsEndpoint_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + mtlsEndpoint_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ROOT_CERTIFICATES_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList rootCertificates_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + /** + * + * + *
            +     * Output only. Root Certificates for Agents to validate this AgentGateway
            +     * 
            + * + * repeated string root_certificates = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return A list containing the rootCertificates. + */ + public com.google.protobuf.ProtocolStringList getRootCertificatesList() { + return rootCertificates_; + } + + /** + * + * + *
            +     * Output only. Root Certificates for Agents to validate this AgentGateway
            +     * 
            + * + * repeated string root_certificates = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The count of rootCertificates. + */ + public int getRootCertificatesCount() { + return rootCertificates_.size(); + } + + /** + * + * + *
            +     * Output only. Root Certificates for Agents to validate this AgentGateway
            +     * 
            + * + * repeated string root_certificates = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index of the element to return. + * @return The rootCertificates at the given index. + */ + public java.lang.String getRootCertificates(int index) { + return rootCertificates_.get(index); + } + + /** + * + * + *
            +     * Output only. Root Certificates for Agents to validate this AgentGateway
            +     * 
            + * + * repeated string root_certificates = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index of the value to return. + * @return The bytes of the rootCertificates at the given index. + */ + public com.google.protobuf.ByteString getRootCertificatesBytes(int index) { + return rootCertificates_.getByteString(index); + } + + public static final int SERVICE_EXTENSIONS_SERVICE_ACCOUNT_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object serviceExtensionsServiceAccount_ = ""; + + /** + * + * + *
            +     * Output only. Service Account used by Service Extensions to operate.
            +     * 
            + * + * + * string service_extensions_service_account = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The serviceExtensionsServiceAccount. + */ + @java.lang.Override + public java.lang.String getServiceExtensionsServiceAccount() { + java.lang.Object ref = serviceExtensionsServiceAccount_; + 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(); + serviceExtensionsServiceAccount_ = s; + return s; + } + } + + /** + * + * + *
            +     * Output only. Service Account used by Service Extensions to operate.
            +     * 
            + * + * + * string service_extensions_service_account = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The bytes for serviceExtensionsServiceAccount. + */ + @java.lang.Override + public com.google.protobuf.ByteString getServiceExtensionsServiceAccountBytes() { + java.lang.Object ref = serviceExtensionsServiceAccount_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + serviceExtensionsServiceAccount_ = 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 { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(mtlsEndpoint_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, mtlsEndpoint_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(serviceExtensionsServiceAccount_)) { + com.google.protobuf.GeneratedMessage.writeString( + output, 4, serviceExtensionsServiceAccount_); + } + for (int i = 0; i < rootCertificates_.size(); i++) { + com.google.protobuf.GeneratedMessage.writeString(output, 5, rootCertificates_.getRaw(i)); + } + 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(mtlsEndpoint_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, mtlsEndpoint_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(serviceExtensionsServiceAccount_)) { + size += + com.google.protobuf.GeneratedMessage.computeStringSize( + 4, serviceExtensionsServiceAccount_); + } + { + int dataSize = 0; + for (int i = 0; i < rootCertificates_.size(); i++) { + dataSize += computeStringSizeNoTag(rootCertificates_.getRaw(i)); + } + size += dataSize; + size += 1 * getRootCertificatesList().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.networkservices.v1.AgentGateway.AgentGatewayOutputCard)) { + return super.equals(obj); + } + com.google.cloud.networkservices.v1.AgentGateway.AgentGatewayOutputCard other = + (com.google.cloud.networkservices.v1.AgentGateway.AgentGatewayOutputCard) obj; + + if (!getMtlsEndpoint().equals(other.getMtlsEndpoint())) return false; + if (!getRootCertificatesList().equals(other.getRootCertificatesList())) return false; + if (!getServiceExtensionsServiceAccount().equals(other.getServiceExtensionsServiceAccount())) + 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) + MTLS_ENDPOINT_FIELD_NUMBER; + hash = (53 * hash) + getMtlsEndpoint().hashCode(); + if (getRootCertificatesCount() > 0) { + hash = (37 * hash) + ROOT_CERTIFICATES_FIELD_NUMBER; + hash = (53 * hash) + getRootCertificatesList().hashCode(); + } + hash = (37 * hash) + SERVICE_EXTENSIONS_SERVICE_ACCOUNT_FIELD_NUMBER; + hash = (53 * hash) + getServiceExtensionsServiceAccount().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.networkservices.v1.AgentGateway.AgentGatewayOutputCard parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkservices.v1.AgentGateway.AgentGatewayOutputCard 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.networkservices.v1.AgentGateway.AgentGatewayOutputCard parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkservices.v1.AgentGateway.AgentGatewayOutputCard 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.networkservices.v1.AgentGateway.AgentGatewayOutputCard parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkservices.v1.AgentGateway.AgentGatewayOutputCard parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkservices.v1.AgentGateway.AgentGatewayOutputCard parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkservices.v1.AgentGateway.AgentGatewayOutputCard 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.networkservices.v1.AgentGateway.AgentGatewayOutputCard + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkservices.v1.AgentGateway.AgentGatewayOutputCard + 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.networkservices.v1.AgentGateway.AgentGatewayOutputCard parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkservices.v1.AgentGateway.AgentGatewayOutputCard 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.networkservices.v1.AgentGateway.AgentGatewayOutputCard 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; + } + + /** + * + * + *
            +     * AgentGatewayOutputCard contains informational output-only fields
            +     * 
            + * + * Protobuf type {@code google.cloud.networkservices.v1.AgentGateway.AgentGatewayOutputCard} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkservices.v1.AgentGateway.AgentGatewayOutputCard) + com.google.cloud.networkservices.v1.AgentGateway.AgentGatewayOutputCardOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkservices.v1.AgentGatewayProto + .internal_static_google_cloud_networkservices_v1_AgentGateway_AgentGatewayOutputCard_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkservices.v1.AgentGatewayProto + .internal_static_google_cloud_networkservices_v1_AgentGateway_AgentGatewayOutputCard_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkservices.v1.AgentGateway.AgentGatewayOutputCard.class, + com.google.cloud.networkservices.v1.AgentGateway.AgentGatewayOutputCard.Builder + .class); + } + + // Construct using + // com.google.cloud.networkservices.v1.AgentGateway.AgentGatewayOutputCard.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + mtlsEndpoint_ = ""; + rootCertificates_ = com.google.protobuf.LazyStringArrayList.emptyList(); + serviceExtensionsServiceAccount_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkservices.v1.AgentGatewayProto + .internal_static_google_cloud_networkservices_v1_AgentGateway_AgentGatewayOutputCard_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkservices.v1.AgentGateway.AgentGatewayOutputCard + getDefaultInstanceForType() { + return com.google.cloud.networkservices.v1.AgentGateway.AgentGatewayOutputCard + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkservices.v1.AgentGateway.AgentGatewayOutputCard build() { + com.google.cloud.networkservices.v1.AgentGateway.AgentGatewayOutputCard result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkservices.v1.AgentGateway.AgentGatewayOutputCard + buildPartial() { + com.google.cloud.networkservices.v1.AgentGateway.AgentGatewayOutputCard result = + new com.google.cloud.networkservices.v1.AgentGateway.AgentGatewayOutputCard(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.networkservices.v1.AgentGateway.AgentGatewayOutputCard result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.mtlsEndpoint_ = mtlsEndpoint_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + rootCertificates_.makeImmutable(); + result.rootCertificates_ = rootCertificates_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.serviceExtensionsServiceAccount_ = serviceExtensionsServiceAccount_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.cloud.networkservices.v1.AgentGateway.AgentGatewayOutputCard) { + return mergeFrom( + (com.google.cloud.networkservices.v1.AgentGateway.AgentGatewayOutputCard) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.networkservices.v1.AgentGateway.AgentGatewayOutputCard other) { + if (other + == com.google.cloud.networkservices.v1.AgentGateway.AgentGatewayOutputCard + .getDefaultInstance()) return this; + if (!other.getMtlsEndpoint().isEmpty()) { + mtlsEndpoint_ = other.mtlsEndpoint_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.rootCertificates_.isEmpty()) { + if (rootCertificates_.isEmpty()) { + rootCertificates_ = other.rootCertificates_; + bitField0_ |= 0x00000002; + } else { + ensureRootCertificatesIsMutable(); + rootCertificates_.addAll(other.rootCertificates_); + } + onChanged(); + } + if (!other.getServiceExtensionsServiceAccount().isEmpty()) { + serviceExtensionsServiceAccount_ = other.serviceExtensionsServiceAccount_; + bitField0_ |= 0x00000004; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + mtlsEndpoint_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 34: + { + serviceExtensionsServiceAccount_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 34 + case 42: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureRootCertificatesIsMutable(); + rootCertificates_.add(s); + break; + } // case 42 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object mtlsEndpoint_ = ""; + + /** + * + * + *
            +       * Output only. mTLS Endpoint associated with this AgentGateway
            +       * 
            + * + * string mtls_endpoint = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The mtlsEndpoint. + */ + public java.lang.String getMtlsEndpoint() { + java.lang.Object ref = mtlsEndpoint_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + mtlsEndpoint_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
            +       * Output only. mTLS Endpoint associated with this AgentGateway
            +       * 
            + * + * string mtls_endpoint = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for mtlsEndpoint. + */ + public com.google.protobuf.ByteString getMtlsEndpointBytes() { + java.lang.Object ref = mtlsEndpoint_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + mtlsEndpoint_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
            +       * Output only. mTLS Endpoint associated with this AgentGateway
            +       * 
            + * + * string mtls_endpoint = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The mtlsEndpoint to set. + * @return This builder for chaining. + */ + public Builder setMtlsEndpoint(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + mtlsEndpoint_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
            +       * Output only. mTLS Endpoint associated with this AgentGateway
            +       * 
            + * + * string mtls_endpoint = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearMtlsEndpoint() { + mtlsEndpoint_ = getDefaultInstance().getMtlsEndpoint(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
            +       * Output only. mTLS Endpoint associated with this AgentGateway
            +       * 
            + * + * string mtls_endpoint = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for mtlsEndpoint to set. + * @return This builder for chaining. + */ + public Builder setMtlsEndpointBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + mtlsEndpoint_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList rootCertificates_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureRootCertificatesIsMutable() { + if (!rootCertificates_.isModifiable()) { + rootCertificates_ = new com.google.protobuf.LazyStringArrayList(rootCertificates_); + } + bitField0_ |= 0x00000002; + } + + /** + * + * + *
            +       * Output only. Root Certificates for Agents to validate this AgentGateway
            +       * 
            + * + * repeated string root_certificates = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return A list containing the rootCertificates. + */ + public com.google.protobuf.ProtocolStringList getRootCertificatesList() { + rootCertificates_.makeImmutable(); + return rootCertificates_; + } + + /** + * + * + *
            +       * Output only. Root Certificates for Agents to validate this AgentGateway
            +       * 
            + * + * repeated string root_certificates = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The count of rootCertificates. + */ + public int getRootCertificatesCount() { + return rootCertificates_.size(); + } + + /** + * + * + *
            +       * Output only. Root Certificates for Agents to validate this AgentGateway
            +       * 
            + * + * repeated string root_certificates = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index of the element to return. + * @return The rootCertificates at the given index. + */ + public java.lang.String getRootCertificates(int index) { + return rootCertificates_.get(index); + } + + /** + * + * + *
            +       * Output only. Root Certificates for Agents to validate this AgentGateway
            +       * 
            + * + * repeated string root_certificates = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index of the value to return. + * @return The bytes of the rootCertificates at the given index. + */ + public com.google.protobuf.ByteString getRootCertificatesBytes(int index) { + return rootCertificates_.getByteString(index); + } + + /** + * + * + *
            +       * Output only. Root Certificates for Agents to validate this AgentGateway
            +       * 
            + * + * repeated string root_certificates = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index to set the value at. + * @param value The rootCertificates to set. + * @return This builder for chaining. + */ + public Builder setRootCertificates(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureRootCertificatesIsMutable(); + rootCertificates_.set(index, value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
            +       * Output only. Root Certificates for Agents to validate this AgentGateway
            +       * 
            + * + * repeated string root_certificates = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The rootCertificates to add. + * @return This builder for chaining. + */ + public Builder addRootCertificates(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureRootCertificatesIsMutable(); + rootCertificates_.add(value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
            +       * Output only. Root Certificates for Agents to validate this AgentGateway
            +       * 
            + * + * repeated string root_certificates = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param values The rootCertificates to add. + * @return This builder for chaining. + */ + public Builder addAllRootCertificates(java.lang.Iterable values) { + ensureRootCertificatesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, rootCertificates_); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
            +       * Output only. Root Certificates for Agents to validate this AgentGateway
            +       * 
            + * + * repeated string root_certificates = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearRootCertificates() { + rootCertificates_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + ; + onChanged(); + return this; + } + + /** + * + * + *
            +       * Output only. Root Certificates for Agents to validate this AgentGateway
            +       * 
            + * + * repeated string root_certificates = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The bytes of the rootCertificates to add. + * @return This builder for chaining. + */ + public Builder addRootCertificatesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureRootCertificatesIsMutable(); + rootCertificates_.add(value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object serviceExtensionsServiceAccount_ = ""; + + /** + * + * + *
            +       * Output only. Service Account used by Service Extensions to operate.
            +       * 
            + * + * + * string service_extensions_service_account = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The serviceExtensionsServiceAccount. + */ + public java.lang.String getServiceExtensionsServiceAccount() { + java.lang.Object ref = serviceExtensionsServiceAccount_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + serviceExtensionsServiceAccount_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
            +       * Output only. Service Account used by Service Extensions to operate.
            +       * 
            + * + * + * string service_extensions_service_account = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The bytes for serviceExtensionsServiceAccount. + */ + public com.google.protobuf.ByteString getServiceExtensionsServiceAccountBytes() { + java.lang.Object ref = serviceExtensionsServiceAccount_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + serviceExtensionsServiceAccount_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
            +       * Output only. Service Account used by Service Extensions to operate.
            +       * 
            + * + * + * string service_extensions_service_account = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The serviceExtensionsServiceAccount to set. + * @return This builder for chaining. + */ + public Builder setServiceExtensionsServiceAccount(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + serviceExtensionsServiceAccount_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
            +       * Output only. Service Account used by Service Extensions to operate.
            +       * 
            + * + * + * string service_extensions_service_account = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearServiceExtensionsServiceAccount() { + serviceExtensionsServiceAccount_ = + getDefaultInstance().getServiceExtensionsServiceAccount(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
            +       * Output only. Service Account used by Service Extensions to operate.
            +       * 
            + * + * + * string service_extensions_service_account = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The bytes for serviceExtensionsServiceAccount to set. + * @return This builder for chaining. + */ + public Builder setServiceExtensionsServiceAccountBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + serviceExtensionsServiceAccount_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.networkservices.v1.AgentGateway.AgentGatewayOutputCard) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkservices.v1.AgentGateway.AgentGatewayOutputCard) + private static final com.google.cloud.networkservices.v1.AgentGateway.AgentGatewayOutputCard + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.networkservices.v1.AgentGateway.AgentGatewayOutputCard(); + } + + public static com.google.cloud.networkservices.v1.AgentGateway.AgentGatewayOutputCard + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AgentGatewayOutputCard parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.networkservices.v1.AgentGateway.AgentGatewayOutputCard + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int bitField0_; + private int deploymentModeCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object deploymentMode_; + + public enum DeploymentModeCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + GOOGLE_MANAGED(8), + SELF_MANAGED(9), + DEPLOYMENTMODE_NOT_SET(0); + private final int value; + + private DeploymentModeCase(int value) { + this.value = value; + } + + /** + * @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 DeploymentModeCase valueOf(int value) { + return forNumber(value); + } + + public static DeploymentModeCase forNumber(int value) { + switch (value) { + case 8: + return GOOGLE_MANAGED; + case 9: + return SELF_MANAGED; + case 0: + return DEPLOYMENTMODE_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public DeploymentModeCase getDeploymentModeCase() { + return DeploymentModeCase.forNumber(deploymentModeCase_); + } + + public static final int GOOGLE_MANAGED_FIELD_NUMBER = 8; + + /** + * + * + *
            +   * Optional. Proxy is orchestrated and managed by GoogleCloud in a tenant
            +   * project.
            +   * 
            + * + * + * .google.cloud.networkservices.v1.AgentGateway.GoogleManaged google_managed = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the googleManaged field is set. + */ + @java.lang.Override + public boolean hasGoogleManaged() { + return deploymentModeCase_ == 8; + } + + /** + * + * + *
            +   * Optional. Proxy is orchestrated and managed by GoogleCloud in a tenant
            +   * project.
            +   * 
            + * + * + * .google.cloud.networkservices.v1.AgentGateway.GoogleManaged google_managed = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The googleManaged. + */ + @java.lang.Override + public com.google.cloud.networkservices.v1.AgentGateway.GoogleManaged getGoogleManaged() { + if (deploymentModeCase_ == 8) { + return (com.google.cloud.networkservices.v1.AgentGateway.GoogleManaged) deploymentMode_; + } + return com.google.cloud.networkservices.v1.AgentGateway.GoogleManaged.getDefaultInstance(); + } + + /** + * + * + *
            +   * Optional. Proxy is orchestrated and managed by GoogleCloud in a tenant
            +   * project.
            +   * 
            + * + * + * .google.cloud.networkservices.v1.AgentGateway.GoogleManaged google_managed = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.networkservices.v1.AgentGateway.GoogleManagedOrBuilder + getGoogleManagedOrBuilder() { + if (deploymentModeCase_ == 8) { + return (com.google.cloud.networkservices.v1.AgentGateway.GoogleManaged) deploymentMode_; + } + return com.google.cloud.networkservices.v1.AgentGateway.GoogleManaged.getDefaultInstance(); + } + + public static final int SELF_MANAGED_FIELD_NUMBER = 9; + + /** + * + * + *
            +   * Optional. Attach to existing Application Load Balancers or Secure Web
            +   * Proxies.
            +   * 
            + * + * + * .google.cloud.networkservices.v1.AgentGateway.SelfManaged self_managed = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the selfManaged field is set. + */ + @java.lang.Override + public boolean hasSelfManaged() { + return deploymentModeCase_ == 9; + } + + /** + * + * + *
            +   * Optional. Attach to existing Application Load Balancers or Secure Web
            +   * Proxies.
            +   * 
            + * + * + * .google.cloud.networkservices.v1.AgentGateway.SelfManaged self_managed = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The selfManaged. + */ + @java.lang.Override + public com.google.cloud.networkservices.v1.AgentGateway.SelfManaged getSelfManaged() { + if (deploymentModeCase_ == 9) { + return (com.google.cloud.networkservices.v1.AgentGateway.SelfManaged) deploymentMode_; + } + return com.google.cloud.networkservices.v1.AgentGateway.SelfManaged.getDefaultInstance(); + } + + /** + * + * + *
            +   * Optional. Attach to existing Application Load Balancers or Secure Web
            +   * Proxies.
            +   * 
            + * + * + * .google.cloud.networkservices.v1.AgentGateway.SelfManaged self_managed = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.networkservices.v1.AgentGateway.SelfManagedOrBuilder + getSelfManagedOrBuilder() { + if (deploymentModeCase_ == 9) { + return (com.google.cloud.networkservices.v1.AgentGateway.SelfManaged) deploymentMode_; + } + return com.google.cloud.networkservices.v1.AgentGateway.SelfManaged.getDefaultInstance(); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
            +   * Identifier. Name of the AgentGateway resource. It matches pattern
            +   * `projects/*/locations/*/agentGateways/<agent_gateway>`.
            +   * 
            + * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + 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(); + name_ = s; + return s; + } + } + + /** + * + * + *
            +   * Identifier. Name of the AgentGateway resource. It matches pattern
            +   * `projects/*/locations/*/agentGateways/<agent_gateway>`.
            +   * 
            + * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CREATE_TIME_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp createTime_; + + /** + * + * + *
            +   * Output only. The timestamp when the resource was created.
            +   * 
            + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
            +   * Output only. The timestamp when the resource was created.
            +   * 
            + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + /** + * + * + *
            +   * Output only. The timestamp when the resource was created.
            +   * 
            + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 3; + private com.google.protobuf.Timestamp updateTime_; + + /** + * + * + *
            +   * Output only. The timestamp when the resource was updated.
            +   * 
            + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
            +   * Output only. The timestamp when the resource was updated.
            +   * 
            + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + /** + * + * + *
            +   * Output only. The timestamp when the resource was updated.
            +   * 
            + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + public static final int LABELS_FIELD_NUMBER = 4; + + private static final class LabelsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.networkservices.v1.AgentGatewayProto + .internal_static_google_cloud_networkservices_v1_AgentGateway_LabelsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + @SuppressWarnings("serial") + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + + /** + * + * + *
            +   * Optional. Set of label tags associated with the AgentGateway resource.
            +   * 
            + * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetLabels().getMap().containsKey(key); + } + + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + + /** + * + * + *
            +   * Optional. Set of label tags associated with the AgentGateway resource.
            +   * 
            + * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + + /** + * + * + *
            +   * Optional. Set of label tags associated with the AgentGateway resource.
            +   * 
            + * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public /* nullable */ java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + + /** + * + * + *
            +   * Optional. Set of label tags associated with the AgentGateway resource.
            +   * 
            + * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int DESCRIPTION_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object description_ = ""; + + /** + * + * + *
            +   * Optional. A free-text description of the resource. Max length 1024
            +   * characters.
            +   * 
            + * + * string description = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + java.lang.Object ref = description_; + 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(); + description_ = s; + return s; + } + } + + /** + * + * + *
            +   * Optional. A free-text description of the resource. Max length 1024
            +   * characters.
            +   * 
            + * + * string description = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ETAG_FIELD_NUMBER = 6; + + @SuppressWarnings("serial") + private volatile java.lang.Object etag_ = ""; + + /** + * + * + *
            +   * Optional. Etag of the resource.
            +   * If this is provided, it must match the server's etag. If the provided etag
            +   * does not match the server's etag, the request will fail with a 409 ABORTED
            +   * error.
            +   * 
            + * + * string etag = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The etag. + */ + @java.lang.Override + public java.lang.String getEtag() { + java.lang.Object ref = etag_; + 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(); + etag_ = s; + return s; + } + } + + /** + * + * + *
            +   * Optional. Etag of the resource.
            +   * If this is provided, it must match the server's etag. If the provided etag
            +   * does not match the server's etag, the request will fail with a 409 ABORTED
            +   * error.
            +   * 
            + * + * string etag = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for etag. + */ + @java.lang.Override + public com.google.protobuf.ByteString getEtagBytes() { + java.lang.Object ref = etag_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + etag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PROTOCOLS_FIELD_NUMBER = 12; + + @SuppressWarnings("serial") + private com.google.protobuf.Internal.IntList protocols_ = emptyIntList(); + + private static final com.google.protobuf.Internal.IntListAdapter.IntConverter< + com.google.cloud.networkservices.v1.AgentGateway.Protocol> + protocols_converter_ = + new com.google.protobuf.Internal.IntListAdapter.IntConverter< + com.google.cloud.networkservices.v1.AgentGateway.Protocol>() { + public com.google.cloud.networkservices.v1.AgentGateway.Protocol convert(int from) { + com.google.cloud.networkservices.v1.AgentGateway.Protocol result = + com.google.cloud.networkservices.v1.AgentGateway.Protocol.forNumber(from); + return result == null + ? com.google.cloud.networkservices.v1.AgentGateway.Protocol.UNRECOGNIZED + : result; + } + }; + + /** + * + * + *
            +   * Optional. Deprecated.
            +   * 
            + * + * + * repeated .google.cloud.networkservices.v1.AgentGateway.Protocol protocols = 12 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; + * + * + * @deprecated google.cloud.networkservices.v1.AgentGateway.protocols is deprecated. See + * google/cloud/networkservices/v1/agent_gateway.proto;l=183 + * @return A list containing the protocols. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.List + getProtocolsList() { + return new com.google.protobuf.Internal.IntListAdapter< + com.google.cloud.networkservices.v1.AgentGateway.Protocol>( + protocols_, protocols_converter_); + } + + /** + * + * + *
            +   * Optional. Deprecated.
            +   * 
            + * + * + * repeated .google.cloud.networkservices.v1.AgentGateway.Protocol protocols = 12 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; + * + * + * @deprecated google.cloud.networkservices.v1.AgentGateway.protocols is deprecated. See + * google/cloud/networkservices/v1/agent_gateway.proto;l=183 + * @return The count of protocols. + */ + @java.lang.Override + @java.lang.Deprecated + public int getProtocolsCount() { + return protocols_.size(); + } + + /** + * + * + *
            +   * Optional. Deprecated.
            +   * 
            + * + * + * repeated .google.cloud.networkservices.v1.AgentGateway.Protocol protocols = 12 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; + * + * + * @deprecated google.cloud.networkservices.v1.AgentGateway.protocols is deprecated. See + * google/cloud/networkservices/v1/agent_gateway.proto;l=183 + * @param index The index of the element to return. + * @return The protocols at the given index. + */ + @java.lang.Override + @java.lang.Deprecated + public com.google.cloud.networkservices.v1.AgentGateway.Protocol getProtocols(int index) { + return protocols_converter_.convert(protocols_.getInt(index)); + } + + /** + * + * + *
            +   * Optional. Deprecated.
            +   * 
            + * + * + * repeated .google.cloud.networkservices.v1.AgentGateway.Protocol protocols = 12 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; + * + * + * @deprecated google.cloud.networkservices.v1.AgentGateway.protocols is deprecated. See + * google/cloud/networkservices/v1/agent_gateway.proto;l=183 + * @return A list containing the enum numeric values on the wire for protocols. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.List getProtocolsValueList() { + return protocols_; + } + + /** + * + * + *
            +   * Optional. Deprecated.
            +   * 
            + * + * + * repeated .google.cloud.networkservices.v1.AgentGateway.Protocol protocols = 12 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; + * + * + * @deprecated google.cloud.networkservices.v1.AgentGateway.protocols is deprecated. See + * google/cloud/networkservices/v1/agent_gateway.proto;l=183 + * @param index The index of the value to return. + * @return The enum numeric value on the wire of protocols at the given index. + */ + @java.lang.Override + @java.lang.Deprecated + public int getProtocolsValue(int index) { + return protocols_.getInt(index); + } + + private int protocolsMemoizedSerializedSize; + + public static final int REGISTRIES_FIELD_NUMBER = 13; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList registries_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + /** + * + * + *
            +   * Optional. A list of Agent registries containing the agents, MCP servers and
            +   * tools governed by the Agent Gateway. Note: Currently limited to
            +   * project-scoped registries Must be of format
            +   * `//agentregistry.googleapis.com/projects/{project}/locations/{location}/
            +   * 
            + * + * repeated string registries = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the registries. + */ + public com.google.protobuf.ProtocolStringList getRegistriesList() { + return registries_; + } + + /** + * + * + *
            +   * Optional. A list of Agent registries containing the agents, MCP servers and
            +   * tools governed by the Agent Gateway. Note: Currently limited to
            +   * project-scoped registries Must be of format
            +   * `//agentregistry.googleapis.com/projects/{project}/locations/{location}/
            +   * 
            + * + * repeated string registries = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of registries. + */ + public int getRegistriesCount() { + return registries_.size(); + } + + /** + * + * + *
            +   * Optional. A list of Agent registries containing the agents, MCP servers and
            +   * tools governed by the Agent Gateway. Note: Currently limited to
            +   * project-scoped registries Must be of format
            +   * `//agentregistry.googleapis.com/projects/{project}/locations/{location}/
            +   * 
            + * + * repeated string registries = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The registries at the given index. + */ + public java.lang.String getRegistries(int index) { + return registries_.get(index); + } + + /** + * + * + *
            +   * Optional. A list of Agent registries containing the agents, MCP servers and
            +   * tools governed by the Agent Gateway. Note: Currently limited to
            +   * project-scoped registries Must be of format
            +   * `//agentregistry.googleapis.com/projects/{project}/locations/{location}/
            +   * 
            + * + * repeated string registries = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the registries at the given index. + */ + public com.google.protobuf.ByteString getRegistriesBytes(int index) { + return registries_.getByteString(index); + } + + public static final int NETWORK_CONFIG_FIELD_NUMBER = 10; + private com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig networkConfig_; + + /** + * + * + *
            +   * Optional. Network configuration for the AgentGateway.
            +   * 
            + * + * + * .google.cloud.networkservices.v1.AgentGateway.NetworkConfig network_config = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the networkConfig field is set. + */ + @java.lang.Override + public boolean hasNetworkConfig() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
            +   * Optional. Network configuration for the AgentGateway.
            +   * 
            + * + * + * .google.cloud.networkservices.v1.AgentGateway.NetworkConfig network_config = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The networkConfig. + */ + @java.lang.Override + public com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig getNetworkConfig() { + return networkConfig_ == null + ? com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig.getDefaultInstance() + : networkConfig_; + } + + /** + * + * + *
            +   * Optional. Network configuration for the AgentGateway.
            +   * 
            + * + * + * .google.cloud.networkservices.v1.AgentGateway.NetworkConfig network_config = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.networkservices.v1.AgentGateway.NetworkConfigOrBuilder + getNetworkConfigOrBuilder() { + return networkConfig_ == null + ? com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig.getDefaultInstance() + : networkConfig_; + } + + public static final int AGENT_GATEWAY_CARD_FIELD_NUMBER = 11; + private com.google.cloud.networkservices.v1.AgentGateway.AgentGatewayOutputCard agentGatewayCard_; + + /** + * + * + *
            +   * Output only. Field for populated AgentGateway card.
            +   * 
            + * + * + * .google.cloud.networkservices.v1.AgentGateway.AgentGatewayOutputCard agent_gateway_card = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the agentGatewayCard field is set. + */ + @java.lang.Override + public boolean hasAgentGatewayCard() { + return ((bitField0_ & 0x00000008) != 0); + } + + /** + * + * + *
            +   * Output only. Field for populated AgentGateway card.
            +   * 
            + * + * + * .google.cloud.networkservices.v1.AgentGateway.AgentGatewayOutputCard agent_gateway_card = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The agentGatewayCard. + */ + @java.lang.Override + public com.google.cloud.networkservices.v1.AgentGateway.AgentGatewayOutputCard + getAgentGatewayCard() { + return agentGatewayCard_ == null + ? com.google.cloud.networkservices.v1.AgentGateway.AgentGatewayOutputCard + .getDefaultInstance() + : agentGatewayCard_; + } + + /** + * + * + *
            +   * Output only. Field for populated AgentGateway card.
            +   * 
            + * + * + * .google.cloud.networkservices.v1.AgentGateway.AgentGatewayOutputCard agent_gateway_card = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.networkservices.v1.AgentGateway.AgentGatewayOutputCardOrBuilder + getAgentGatewayCardOrBuilder() { + return agentGatewayCard_ == null + ? com.google.cloud.networkservices.v1.AgentGateway.AgentGatewayOutputCard + .getDefaultInstance() + : agentGatewayCard_; + } + + 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 { + getSerializedSize(); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getCreateTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(3, getUpdateTime()); + } + com.google.protobuf.GeneratedMessage.serializeStringMapTo( + output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 4); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(description_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 5, description_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(etag_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 6, etag_); + } + if (deploymentModeCase_ == 8) { + output.writeMessage( + 8, (com.google.cloud.networkservices.v1.AgentGateway.GoogleManaged) deploymentMode_); + } + if (deploymentModeCase_ == 9) { + output.writeMessage( + 9, (com.google.cloud.networkservices.v1.AgentGateway.SelfManaged) deploymentMode_); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeMessage(10, getNetworkConfig()); + } + if (((bitField0_ & 0x00000008) != 0)) { + output.writeMessage(11, getAgentGatewayCard()); + } + if (getProtocolsList().size() > 0) { + output.writeUInt32NoTag(98); + output.writeUInt32NoTag(protocolsMemoizedSerializedSize); + } + for (int i = 0; i < protocols_.size(); i++) { + output.writeEnumNoTag(protocols_.getInt(i)); + } + for (int i = 0; i < registries_.size(); i++) { + com.google.protobuf.GeneratedMessage.writeString(output, 13, registries_.getRaw(i)); + } + 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(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getCreateTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getUpdateTime()); + } + for (java.util.Map.Entry entry : + internalGetLabels().getMap().entrySet()) { + com.google.protobuf.MapEntry labels__ = + LabelsDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, labels__); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(description_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(5, description_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(etag_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(6, etag_); + } + if (deploymentModeCase_ == 8) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 8, (com.google.cloud.networkservices.v1.AgentGateway.GoogleManaged) deploymentMode_); + } + if (deploymentModeCase_ == 9) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 9, (com.google.cloud.networkservices.v1.AgentGateway.SelfManaged) deploymentMode_); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(10, getNetworkConfig()); + } + if (((bitField0_ & 0x00000008) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(11, getAgentGatewayCard()); + } + { + int dataSize = 0; + for (int i = 0; i < protocols_.size(); i++) { + dataSize += + com.google.protobuf.CodedOutputStream.computeEnumSizeNoTag(protocols_.getInt(i)); + } + size += dataSize; + if (!getProtocolsList().isEmpty()) { + size += 1; + size += com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(dataSize); + } + protocolsMemoizedSerializedSize = dataSize; + } + { + int dataSize = 0; + for (int i = 0; i < registries_.size(); i++) { + dataSize += computeStringSizeNoTag(registries_.getRaw(i)); + } + size += dataSize; + size += 1 * getRegistriesList().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.networkservices.v1.AgentGateway)) { + return super.equals(obj); + } + com.google.cloud.networkservices.v1.AgentGateway other = + (com.google.cloud.networkservices.v1.AgentGateway) obj; + + if (!getName().equals(other.getName())) return false; + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime().equals(other.getUpdateTime())) return false; + } + if (!internalGetLabels().equals(other.internalGetLabels())) return false; + if (!getDescription().equals(other.getDescription())) return false; + if (!getEtag().equals(other.getEtag())) return false; + if (!protocols_.equals(other.protocols_)) return false; + if (!getRegistriesList().equals(other.getRegistriesList())) return false; + if (hasNetworkConfig() != other.hasNetworkConfig()) return false; + if (hasNetworkConfig()) { + if (!getNetworkConfig().equals(other.getNetworkConfig())) return false; + } + if (hasAgentGatewayCard() != other.hasAgentGatewayCard()) return false; + if (hasAgentGatewayCard()) { + if (!getAgentGatewayCard().equals(other.getAgentGatewayCard())) return false; + } + if (!getDeploymentModeCase().equals(other.getDeploymentModeCase())) return false; + switch (deploymentModeCase_) { + case 8: + if (!getGoogleManaged().equals(other.getGoogleManaged())) return false; + break; + case 9: + if (!getSelfManaged().equals(other.getSelfManaged())) return false; + break; + case 0: + default: + } + 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) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + if (!internalGetLabels().getMap().isEmpty()) { + hash = (37 * hash) + LABELS_FIELD_NUMBER; + hash = (53 * hash) + internalGetLabels().hashCode(); + } + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + hash = (37 * hash) + ETAG_FIELD_NUMBER; + hash = (53 * hash) + getEtag().hashCode(); + if (getProtocolsCount() > 0) { + hash = (37 * hash) + PROTOCOLS_FIELD_NUMBER; + hash = (53 * hash) + protocols_.hashCode(); + } + if (getRegistriesCount() > 0) { + hash = (37 * hash) + REGISTRIES_FIELD_NUMBER; + hash = (53 * hash) + getRegistriesList().hashCode(); + } + if (hasNetworkConfig()) { + hash = (37 * hash) + NETWORK_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getNetworkConfig().hashCode(); + } + if (hasAgentGatewayCard()) { + hash = (37 * hash) + AGENT_GATEWAY_CARD_FIELD_NUMBER; + hash = (53 * hash) + getAgentGatewayCard().hashCode(); + } + switch (deploymentModeCase_) { + case 8: + hash = (37 * hash) + GOOGLE_MANAGED_FIELD_NUMBER; + hash = (53 * hash) + getGoogleManaged().hashCode(); + break; + case 9: + hash = (37 * hash) + SELF_MANAGED_FIELD_NUMBER; + hash = (53 * hash) + getSelfManaged().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.networkservices.v1.AgentGateway parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkservices.v1.AgentGateway 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.networkservices.v1.AgentGateway parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkservices.v1.AgentGateway 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.networkservices.v1.AgentGateway parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkservices.v1.AgentGateway parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkservices.v1.AgentGateway parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkservices.v1.AgentGateway 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.networkservices.v1.AgentGateway parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkservices.v1.AgentGateway 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.networkservices.v1.AgentGateway parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkservices.v1.AgentGateway 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.networkservices.v1.AgentGateway 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; + } + + /** + * + * + *
            +   * AgentGateway represents the agent gateway resource.
            +   * 
            + * + * Protobuf type {@code google.cloud.networkservices.v1.AgentGateway} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkservices.v1.AgentGateway) + com.google.cloud.networkservices.v1.AgentGatewayOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkservices.v1.AgentGatewayProto + .internal_static_google_cloud_networkservices_v1_AgentGateway_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 4: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( + int number) { + switch (number) { + case 4: + return internalGetMutableLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkservices.v1.AgentGatewayProto + .internal_static_google_cloud_networkservices_v1_AgentGateway_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkservices.v1.AgentGateway.class, + com.google.cloud.networkservices.v1.AgentGateway.Builder.class); + } + + // Construct using com.google.cloud.networkservices.v1.AgentGateway.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetCreateTimeFieldBuilder(); + internalGetUpdateTimeFieldBuilder(); + internalGetNetworkConfigFieldBuilder(); + internalGetAgentGatewayCardFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (googleManagedBuilder_ != null) { + googleManagedBuilder_.clear(); + } + if (selfManagedBuilder_ != null) { + selfManagedBuilder_.clear(); + } + name_ = ""; + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + internalGetMutableLabels().clear(); + description_ = ""; + etag_ = ""; + protocols_ = emptyIntList(); + registries_ = com.google.protobuf.LazyStringArrayList.emptyList(); + networkConfig_ = null; + if (networkConfigBuilder_ != null) { + networkConfigBuilder_.dispose(); + networkConfigBuilder_ = null; + } + agentGatewayCard_ = null; + if (agentGatewayCardBuilder_ != null) { + agentGatewayCardBuilder_.dispose(); + agentGatewayCardBuilder_ = null; + } + deploymentModeCase_ = 0; + deploymentMode_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkservices.v1.AgentGatewayProto + .internal_static_google_cloud_networkservices_v1_AgentGateway_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkservices.v1.AgentGateway getDefaultInstanceForType() { + return com.google.cloud.networkservices.v1.AgentGateway.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkservices.v1.AgentGateway build() { + com.google.cloud.networkservices.v1.AgentGateway result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkservices.v1.AgentGateway buildPartial() { + com.google.cloud.networkservices.v1.AgentGateway result = + new com.google.cloud.networkservices.v1.AgentGateway(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.networkservices.v1.AgentGateway result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.name_ = name_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000008) != 0)) { + result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.updateTime_ = updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.labels_ = internalGetLabels(); + result.labels_.makeImmutable(); + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.description_ = description_; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.etag_ = etag_; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + protocols_.makeImmutable(); + result.protocols_ = protocols_; + } + if (((from_bitField0_ & 0x00000200) != 0)) { + registries_.makeImmutable(); + result.registries_ = registries_; + } + if (((from_bitField0_ & 0x00000400) != 0)) { + result.networkConfig_ = + networkConfigBuilder_ == null ? networkConfig_ : networkConfigBuilder_.build(); + to_bitField0_ |= 0x00000004; + } + if (((from_bitField0_ & 0x00000800) != 0)) { + result.agentGatewayCard_ = + agentGatewayCardBuilder_ == null ? agentGatewayCard_ : agentGatewayCardBuilder_.build(); + to_bitField0_ |= 0x00000008; + } + result.bitField0_ |= to_bitField0_; + } + + private void buildPartialOneofs(com.google.cloud.networkservices.v1.AgentGateway result) { + result.deploymentModeCase_ = deploymentModeCase_; + result.deploymentMode_ = this.deploymentMode_; + if (deploymentModeCase_ == 8 && googleManagedBuilder_ != null) { + result.deploymentMode_ = googleManagedBuilder_.build(); + } + if (deploymentModeCase_ == 9 && selfManagedBuilder_ != null) { + result.deploymentMode_ = selfManagedBuilder_.build(); + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.networkservices.v1.AgentGateway) { + return mergeFrom((com.google.cloud.networkservices.v1.AgentGateway) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.networkservices.v1.AgentGateway other) { + if (other == com.google.cloud.networkservices.v1.AgentGateway.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + internalGetMutableLabels().mergeFrom(other.internalGetLabels()); + bitField0_ |= 0x00000020; + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + bitField0_ |= 0x00000040; + onChanged(); + } + if (!other.getEtag().isEmpty()) { + etag_ = other.etag_; + bitField0_ |= 0x00000080; + onChanged(); + } + if (!other.protocols_.isEmpty()) { + if (protocols_.isEmpty()) { + protocols_ = other.protocols_; + protocols_.makeImmutable(); + bitField0_ |= 0x00000100; + } else { + ensureProtocolsIsMutable(); + protocols_.addAll(other.protocols_); + } + onChanged(); + } + if (!other.registries_.isEmpty()) { + if (registries_.isEmpty()) { + registries_ = other.registries_; + bitField0_ |= 0x00000200; + } else { + ensureRegistriesIsMutable(); + registries_.addAll(other.registries_); + } + onChanged(); + } + if (other.hasNetworkConfig()) { + mergeNetworkConfig(other.getNetworkConfig()); + } + if (other.hasAgentGatewayCard()) { + mergeAgentGatewayCard(other.getAgentGatewayCard()); + } + switch (other.getDeploymentModeCase()) { + case GOOGLE_MANAGED: + { + mergeGoogleManaged(other.getGoogleManaged()); + break; + } + case SELF_MANAGED: + { + mergeSelfManaged(other.getSelfManaged()); + break; + } + case DEPLOYMENTMODE_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 10 + case 18: + { + input.readMessage( + internalGetCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 18 + case 26: + { + input.readMessage( + internalGetUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 26 + case 34: + { + com.google.protobuf.MapEntry labels__ = + input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableLabels() + .getMutableMap() + .put(labels__.getKey(), labels__.getValue()); + bitField0_ |= 0x00000020; + break; + } // case 34 + case 42: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000040; + break; + } // case 42 + case 50: + { + etag_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000080; + break; + } // case 50 + case 66: + { + input.readMessage( + internalGetGoogleManagedFieldBuilder().getBuilder(), extensionRegistry); + deploymentModeCase_ = 8; + break; + } // case 66 + case 74: + { + input.readMessage( + internalGetSelfManagedFieldBuilder().getBuilder(), extensionRegistry); + deploymentModeCase_ = 9; + break; + } // case 74 + case 82: + { + input.readMessage( + internalGetNetworkConfigFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000400; + break; + } // case 82 + case 90: + { + input.readMessage( + internalGetAgentGatewayCardFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000800; + break; + } // case 90 + case 96: + { + int tmpRaw = input.readEnum(); + ensureProtocolsIsMutable(); + protocols_.addInt(tmpRaw); + break; + } // case 96 + case 98: + { + int length = input.readRawVarint32(); + int limit = input.pushLimit(length); + ensureProtocolsIsMutable(); + while (input.getBytesUntilLimit() > 0) { + protocols_.addInt(input.readEnum()); + } + input.popLimit(limit); + break; + } // case 98 + case 106: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureRegistriesIsMutable(); + registries_.add(s); + break; + } // case 106 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int deploymentModeCase_ = 0; + private java.lang.Object deploymentMode_; + + public DeploymentModeCase getDeploymentModeCase() { + return DeploymentModeCase.forNumber(deploymentModeCase_); + } + + public Builder clearDeploymentMode() { + deploymentModeCase_ = 0; + deploymentMode_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.networkservices.v1.AgentGateway.GoogleManaged, + com.google.cloud.networkservices.v1.AgentGateway.GoogleManaged.Builder, + com.google.cloud.networkservices.v1.AgentGateway.GoogleManagedOrBuilder> + googleManagedBuilder_; + + /** + * + * + *
            +     * Optional. Proxy is orchestrated and managed by GoogleCloud in a tenant
            +     * project.
            +     * 
            + * + * + * .google.cloud.networkservices.v1.AgentGateway.GoogleManaged google_managed = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the googleManaged field is set. + */ + @java.lang.Override + public boolean hasGoogleManaged() { + return deploymentModeCase_ == 8; + } + + /** + * + * + *
            +     * Optional. Proxy is orchestrated and managed by GoogleCloud in a tenant
            +     * project.
            +     * 
            + * + * + * .google.cloud.networkservices.v1.AgentGateway.GoogleManaged google_managed = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The googleManaged. + */ + @java.lang.Override + public com.google.cloud.networkservices.v1.AgentGateway.GoogleManaged getGoogleManaged() { + if (googleManagedBuilder_ == null) { + if (deploymentModeCase_ == 8) { + return (com.google.cloud.networkservices.v1.AgentGateway.GoogleManaged) deploymentMode_; + } + return com.google.cloud.networkservices.v1.AgentGateway.GoogleManaged.getDefaultInstance(); + } else { + if (deploymentModeCase_ == 8) { + return googleManagedBuilder_.getMessage(); + } + return com.google.cloud.networkservices.v1.AgentGateway.GoogleManaged.getDefaultInstance(); + } + } + + /** + * + * + *
            +     * Optional. Proxy is orchestrated and managed by GoogleCloud in a tenant
            +     * project.
            +     * 
            + * + * + * .google.cloud.networkservices.v1.AgentGateway.GoogleManaged google_managed = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setGoogleManaged( + com.google.cloud.networkservices.v1.AgentGateway.GoogleManaged value) { + if (googleManagedBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + deploymentMode_ = value; + onChanged(); + } else { + googleManagedBuilder_.setMessage(value); + } + deploymentModeCase_ = 8; + return this; + } + + /** + * + * + *
            +     * Optional. Proxy is orchestrated and managed by GoogleCloud in a tenant
            +     * project.
            +     * 
            + * + * + * .google.cloud.networkservices.v1.AgentGateway.GoogleManaged google_managed = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setGoogleManaged( + com.google.cloud.networkservices.v1.AgentGateway.GoogleManaged.Builder builderForValue) { + if (googleManagedBuilder_ == null) { + deploymentMode_ = builderForValue.build(); + onChanged(); + } else { + googleManagedBuilder_.setMessage(builderForValue.build()); + } + deploymentModeCase_ = 8; + return this; + } + + /** + * + * + *
            +     * Optional. Proxy is orchestrated and managed by GoogleCloud in a tenant
            +     * project.
            +     * 
            + * + * + * .google.cloud.networkservices.v1.AgentGateway.GoogleManaged google_managed = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeGoogleManaged( + com.google.cloud.networkservices.v1.AgentGateway.GoogleManaged value) { + if (googleManagedBuilder_ == null) { + if (deploymentModeCase_ == 8 + && deploymentMode_ + != com.google.cloud.networkservices.v1.AgentGateway.GoogleManaged + .getDefaultInstance()) { + deploymentMode_ = + com.google.cloud.networkservices.v1.AgentGateway.GoogleManaged.newBuilder( + (com.google.cloud.networkservices.v1.AgentGateway.GoogleManaged) + deploymentMode_) + .mergeFrom(value) + .buildPartial(); + } else { + deploymentMode_ = value; + } + onChanged(); + } else { + if (deploymentModeCase_ == 8) { + googleManagedBuilder_.mergeFrom(value); + } else { + googleManagedBuilder_.setMessage(value); + } + } + deploymentModeCase_ = 8; + return this; + } + + /** + * + * + *
            +     * Optional. Proxy is orchestrated and managed by GoogleCloud in a tenant
            +     * project.
            +     * 
            + * + * + * .google.cloud.networkservices.v1.AgentGateway.GoogleManaged google_managed = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearGoogleManaged() { + if (googleManagedBuilder_ == null) { + if (deploymentModeCase_ == 8) { + deploymentModeCase_ = 0; + deploymentMode_ = null; + onChanged(); + } + } else { + if (deploymentModeCase_ == 8) { + deploymentModeCase_ = 0; + deploymentMode_ = null; + } + googleManagedBuilder_.clear(); + } + return this; + } + + /** + * + * + *
            +     * Optional. Proxy is orchestrated and managed by GoogleCloud in a tenant
            +     * project.
            +     * 
            + * + * + * .google.cloud.networkservices.v1.AgentGateway.GoogleManaged google_managed = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.networkservices.v1.AgentGateway.GoogleManaged.Builder + getGoogleManagedBuilder() { + return internalGetGoogleManagedFieldBuilder().getBuilder(); + } + + /** + * + * + *
            +     * Optional. Proxy is orchestrated and managed by GoogleCloud in a tenant
            +     * project.
            +     * 
            + * + * + * .google.cloud.networkservices.v1.AgentGateway.GoogleManaged google_managed = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.networkservices.v1.AgentGateway.GoogleManagedOrBuilder + getGoogleManagedOrBuilder() { + if ((deploymentModeCase_ == 8) && (googleManagedBuilder_ != null)) { + return googleManagedBuilder_.getMessageOrBuilder(); + } else { + if (deploymentModeCase_ == 8) { + return (com.google.cloud.networkservices.v1.AgentGateway.GoogleManaged) deploymentMode_; + } + return com.google.cloud.networkservices.v1.AgentGateway.GoogleManaged.getDefaultInstance(); + } + } + + /** + * + * + *
            +     * Optional. Proxy is orchestrated and managed by GoogleCloud in a tenant
            +     * project.
            +     * 
            + * + * + * .google.cloud.networkservices.v1.AgentGateway.GoogleManaged google_managed = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.networkservices.v1.AgentGateway.GoogleManaged, + com.google.cloud.networkservices.v1.AgentGateway.GoogleManaged.Builder, + com.google.cloud.networkservices.v1.AgentGateway.GoogleManagedOrBuilder> + internalGetGoogleManagedFieldBuilder() { + if (googleManagedBuilder_ == null) { + if (!(deploymentModeCase_ == 8)) { + deploymentMode_ = + com.google.cloud.networkservices.v1.AgentGateway.GoogleManaged.getDefaultInstance(); + } + googleManagedBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.networkservices.v1.AgentGateway.GoogleManaged, + com.google.cloud.networkservices.v1.AgentGateway.GoogleManaged.Builder, + com.google.cloud.networkservices.v1.AgentGateway.GoogleManagedOrBuilder>( + (com.google.cloud.networkservices.v1.AgentGateway.GoogleManaged) deploymentMode_, + getParentForChildren(), + isClean()); + deploymentMode_ = null; + } + deploymentModeCase_ = 8; + onChanged(); + return googleManagedBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.networkservices.v1.AgentGateway.SelfManaged, + com.google.cloud.networkservices.v1.AgentGateway.SelfManaged.Builder, + com.google.cloud.networkservices.v1.AgentGateway.SelfManagedOrBuilder> + selfManagedBuilder_; + + /** + * + * + *
            +     * Optional. Attach to existing Application Load Balancers or Secure Web
            +     * Proxies.
            +     * 
            + * + * + * .google.cloud.networkservices.v1.AgentGateway.SelfManaged self_managed = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the selfManaged field is set. + */ + @java.lang.Override + public boolean hasSelfManaged() { + return deploymentModeCase_ == 9; + } + + /** + * + * + *
            +     * Optional. Attach to existing Application Load Balancers or Secure Web
            +     * Proxies.
            +     * 
            + * + * + * .google.cloud.networkservices.v1.AgentGateway.SelfManaged self_managed = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The selfManaged. + */ + @java.lang.Override + public com.google.cloud.networkservices.v1.AgentGateway.SelfManaged getSelfManaged() { + if (selfManagedBuilder_ == null) { + if (deploymentModeCase_ == 9) { + return (com.google.cloud.networkservices.v1.AgentGateway.SelfManaged) deploymentMode_; + } + return com.google.cloud.networkservices.v1.AgentGateway.SelfManaged.getDefaultInstance(); + } else { + if (deploymentModeCase_ == 9) { + return selfManagedBuilder_.getMessage(); + } + return com.google.cloud.networkservices.v1.AgentGateway.SelfManaged.getDefaultInstance(); + } + } + + /** + * + * + *
            +     * Optional. Attach to existing Application Load Balancers or Secure Web
            +     * Proxies.
            +     * 
            + * + * + * .google.cloud.networkservices.v1.AgentGateway.SelfManaged self_managed = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setSelfManaged( + com.google.cloud.networkservices.v1.AgentGateway.SelfManaged value) { + if (selfManagedBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + deploymentMode_ = value; + onChanged(); + } else { + selfManagedBuilder_.setMessage(value); + } + deploymentModeCase_ = 9; + return this; + } + + /** + * + * + *
            +     * Optional. Attach to existing Application Load Balancers or Secure Web
            +     * Proxies.
            +     * 
            + * + * + * .google.cloud.networkservices.v1.AgentGateway.SelfManaged self_managed = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setSelfManaged( + com.google.cloud.networkservices.v1.AgentGateway.SelfManaged.Builder builderForValue) { + if (selfManagedBuilder_ == null) { + deploymentMode_ = builderForValue.build(); + onChanged(); + } else { + selfManagedBuilder_.setMessage(builderForValue.build()); + } + deploymentModeCase_ = 9; + return this; + } + + /** + * + * + *
            +     * Optional. Attach to existing Application Load Balancers or Secure Web
            +     * Proxies.
            +     * 
            + * + * + * .google.cloud.networkservices.v1.AgentGateway.SelfManaged self_managed = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeSelfManaged( + com.google.cloud.networkservices.v1.AgentGateway.SelfManaged value) { + if (selfManagedBuilder_ == null) { + if (deploymentModeCase_ == 9 + && deploymentMode_ + != com.google.cloud.networkservices.v1.AgentGateway.SelfManaged + .getDefaultInstance()) { + deploymentMode_ = + com.google.cloud.networkservices.v1.AgentGateway.SelfManaged.newBuilder( + (com.google.cloud.networkservices.v1.AgentGateway.SelfManaged) + deploymentMode_) + .mergeFrom(value) + .buildPartial(); + } else { + deploymentMode_ = value; + } + onChanged(); + } else { + if (deploymentModeCase_ == 9) { + selfManagedBuilder_.mergeFrom(value); + } else { + selfManagedBuilder_.setMessage(value); + } + } + deploymentModeCase_ = 9; + return this; + } + + /** + * + * + *
            +     * Optional. Attach to existing Application Load Balancers or Secure Web
            +     * Proxies.
            +     * 
            + * + * + * .google.cloud.networkservices.v1.AgentGateway.SelfManaged self_managed = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearSelfManaged() { + if (selfManagedBuilder_ == null) { + if (deploymentModeCase_ == 9) { + deploymentModeCase_ = 0; + deploymentMode_ = null; + onChanged(); + } + } else { + if (deploymentModeCase_ == 9) { + deploymentModeCase_ = 0; + deploymentMode_ = null; + } + selfManagedBuilder_.clear(); + } + return this; + } + + /** + * + * + *
            +     * Optional. Attach to existing Application Load Balancers or Secure Web
            +     * Proxies.
            +     * 
            + * + * + * .google.cloud.networkservices.v1.AgentGateway.SelfManaged self_managed = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.networkservices.v1.AgentGateway.SelfManaged.Builder + getSelfManagedBuilder() { + return internalGetSelfManagedFieldBuilder().getBuilder(); + } + + /** + * + * + *
            +     * Optional. Attach to existing Application Load Balancers or Secure Web
            +     * Proxies.
            +     * 
            + * + * + * .google.cloud.networkservices.v1.AgentGateway.SelfManaged self_managed = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.networkservices.v1.AgentGateway.SelfManagedOrBuilder + getSelfManagedOrBuilder() { + if ((deploymentModeCase_ == 9) && (selfManagedBuilder_ != null)) { + return selfManagedBuilder_.getMessageOrBuilder(); + } else { + if (deploymentModeCase_ == 9) { + return (com.google.cloud.networkservices.v1.AgentGateway.SelfManaged) deploymentMode_; + } + return com.google.cloud.networkservices.v1.AgentGateway.SelfManaged.getDefaultInstance(); + } + } + + /** + * + * + *
            +     * Optional. Attach to existing Application Load Balancers or Secure Web
            +     * Proxies.
            +     * 
            + * + * + * .google.cloud.networkservices.v1.AgentGateway.SelfManaged self_managed = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.networkservices.v1.AgentGateway.SelfManaged, + com.google.cloud.networkservices.v1.AgentGateway.SelfManaged.Builder, + com.google.cloud.networkservices.v1.AgentGateway.SelfManagedOrBuilder> + internalGetSelfManagedFieldBuilder() { + if (selfManagedBuilder_ == null) { + if (!(deploymentModeCase_ == 9)) { + deploymentMode_ = + com.google.cloud.networkservices.v1.AgentGateway.SelfManaged.getDefaultInstance(); + } + selfManagedBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.networkservices.v1.AgentGateway.SelfManaged, + com.google.cloud.networkservices.v1.AgentGateway.SelfManaged.Builder, + com.google.cloud.networkservices.v1.AgentGateway.SelfManagedOrBuilder>( + (com.google.cloud.networkservices.v1.AgentGateway.SelfManaged) deploymentMode_, + getParentForChildren(), + isClean()); + deploymentMode_ = null; + } + deploymentModeCase_ = 9; + onChanged(); + return selfManagedBuilder_; + } + + private java.lang.Object name_ = ""; + + /** + * + * + *
            +     * Identifier. Name of the AgentGateway resource. It matches pattern
            +     * `projects/*/locations/*/agentGateways/<agent_gateway>`.
            +     * 
            + * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
            +     * Identifier. Name of the AgentGateway resource. It matches pattern
            +     * `projects/*/locations/*/agentGateways/<agent_gateway>`.
            +     * 
            + * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
            +     * Identifier. Name of the AgentGateway resource. It matches pattern
            +     * `projects/*/locations/*/agentGateways/<agent_gateway>`.
            +     * 
            + * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Identifier. Name of the AgentGateway resource. It matches pattern
            +     * `projects/*/locations/*/agentGateways/<agent_gateway>`.
            +     * 
            + * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
            +     * Identifier. Name of the AgentGateway resource. It matches pattern
            +     * `projects/*/locations/*/agentGateways/<agent_gateway>`.
            +     * 
            + * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + + /** + * + * + *
            +     * Output only. The timestamp when the resource was created.
            +     * 
            + * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000008) != 0); + } + + /** + * + * + *
            +     * Output only. The timestamp when the resource was created.
            +     * 
            + * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
            +     * Output only. The timestamp when the resource was created.
            +     * 
            + * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + } else { + createTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Output only. The timestamp when the resource was created.
            +     * 
            + * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Output only. The timestamp when the resource was created.
            +     * 
            + * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) + && createTime_ != null + && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); + } + if (createTime_ != null) { + bitField0_ |= 0x00000008; + onChanged(); + } + return this; + } + + /** + * + * + *
            +     * Output only. The timestamp when the resource was created.
            +     * 
            + * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000008); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
            +     * Output only. The timestamp when the resource was created.
            +     * 
            + * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return internalGetCreateTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
            +     * Output only. The timestamp when the resource was created.
            +     * 
            + * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } + + /** + * + * + *
            +     * Output only. The timestamp when the resource was created.
            +     * 
            + * + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + internalGetCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp updateTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + updateTimeBuilder_; + + /** + * + * + *
            +     * Output only. The timestamp when the resource was updated.
            +     * 
            + * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000010) != 0); + } + + /** + * + * + *
            +     * Output only. The timestamp when the resource was updated.
            +     * 
            + * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
            +     * Output only. The timestamp when the resource was updated.
            +     * 
            + * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + } else { + updateTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Output only. The timestamp when the resource was updated.
            +     * 
            + * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Output only. The timestamp when the resource was updated.
            +     * 
            + * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) + && updateTime_ != null + && updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getUpdateTimeBuilder().mergeFrom(value); + } else { + updateTime_ = value; + } + } else { + updateTimeBuilder_.mergeFrom(value); + } + if (updateTime_ != null) { + bitField0_ |= 0x00000010; + onChanged(); + } + return this; + } + + /** + * + * + *
            +     * Output only. The timestamp when the resource was updated.
            +     * 
            + * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearUpdateTime() { + bitField0_ = (bitField0_ & ~0x00000010); + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
            +     * Output only. The timestamp when the resource was updated.
            +     * 
            + * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return internalGetUpdateTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
            +     * Output only. The timestamp when the resource was updated.
            +     * 
            + * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } + } + + /** + * + * + *
            +     * Output only. The timestamp when the resource was updated.
            +     * 
            + * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + internalGetUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getUpdateTime(), getParentForChildren(), isClean()); + updateTime_ = null; + } + return updateTimeBuilder_; + } + + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + private com.google.protobuf.MapField + internalGetMutableLabels() { + if (labels_ == null) { + labels_ = com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); + } + if (!labels_.isMutable()) { + labels_ = labels_.copy(); + } + bitField0_ |= 0x00000020; + onChanged(); + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + + /** + * + * + *
            +     * Optional. Set of label tags associated with the AgentGateway resource.
            +     * 
            + * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetLabels().getMap().containsKey(key); + } + + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + + /** + * + * + *
            +     * Optional. Set of label tags associated with the AgentGateway resource.
            +     * 
            + * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + + /** + * + * + *
            +     * Optional. Set of label tags associated with the AgentGateway resource.
            +     * 
            + * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public /* nullable */ java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + + /** + * + * + *
            +     * Optional. Set of label tags associated with the AgentGateway resource.
            +     * 
            + * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearLabels() { + bitField0_ = (bitField0_ & ~0x00000020); + internalGetMutableLabels().getMutableMap().clear(); + return this; + } + + /** + * + * + *
            +     * Optional. Set of label tags associated with the AgentGateway resource.
            +     * 
            + * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder removeLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + internalGetMutableLabels().getMutableMap().remove(key); + return this; + } + + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableLabels() { + bitField0_ |= 0x00000020; + return internalGetMutableLabels().getMutableMap(); + } + + /** + * + * + *
            +     * Optional. Set of label tags associated with the AgentGateway resource.
            +     * 
            + * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder putLabels(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new NullPointerException("map key"); + } + if (value == null) { + throw new NullPointerException("map value"); + } + internalGetMutableLabels().getMutableMap().put(key, value); + bitField0_ |= 0x00000020; + return this; + } + + /** + * + * + *
            +     * Optional. Set of label tags associated with the AgentGateway resource.
            +     * 
            + * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder putAllLabels(java.util.Map values) { + internalGetMutableLabels().getMutableMap().putAll(values); + bitField0_ |= 0x00000020; + return this; + } + + private java.lang.Object description_ = ""; + + /** + * + * + *
            +     * Optional. A free-text description of the resource. Max length 1024
            +     * characters.
            +     * 
            + * + * string description = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The description. + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
            +     * Optional. A free-text description of the resource. Max length 1024
            +     * characters.
            +     * 
            + * + * string description = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for description. + */ + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
            +     * Optional. A free-text description of the resource. Max length 1024
            +     * characters.
            +     * 
            + * + * string description = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + description_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Optional. A free-text description of the resource. Max length 1024
            +     * characters.
            +     * 
            + * + * string description = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearDescription() { + description_ = getDefaultInstance().getDescription(); + bitField0_ = (bitField0_ & ~0x00000040); + onChanged(); + return this; + } + + /** + * + * + *
            +     * Optional. A free-text description of the resource. Max length 1024
            +     * characters.
            +     * 
            + * + * string description = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + description_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + private java.lang.Object etag_ = ""; + + /** + * + * + *
            +     * Optional. Etag of the resource.
            +     * If this is provided, it must match the server's etag. If the provided etag
            +     * does not match the server's etag, the request will fail with a 409 ABORTED
            +     * error.
            +     * 
            + * + * string etag = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The etag. + */ + public java.lang.String getEtag() { + java.lang.Object ref = etag_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + etag_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
            +     * Optional. Etag of the resource.
            +     * If this is provided, it must match the server's etag. If the provided etag
            +     * does not match the server's etag, the request will fail with a 409 ABORTED
            +     * error.
            +     * 
            + * + * string etag = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for etag. + */ + public com.google.protobuf.ByteString getEtagBytes() { + java.lang.Object ref = etag_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + etag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
            +     * Optional. Etag of the resource.
            +     * If this is provided, it must match the server's etag. If the provided etag
            +     * does not match the server's etag, the request will fail with a 409 ABORTED
            +     * error.
            +     * 
            + * + * string etag = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The etag to set. + * @return This builder for chaining. + */ + public Builder setEtag(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + etag_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Optional. Etag of the resource.
            +     * If this is provided, it must match the server's etag. If the provided etag
            +     * does not match the server's etag, the request will fail with a 409 ABORTED
            +     * error.
            +     * 
            + * + * string etag = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearEtag() { + etag_ = getDefaultInstance().getEtag(); + bitField0_ = (bitField0_ & ~0x00000080); + onChanged(); + return this; + } + + /** + * + * + *
            +     * Optional. Etag of the resource.
            +     * If this is provided, it must match the server's etag. If the provided etag
            +     * does not match the server's etag, the request will fail with a 409 ABORTED
            +     * error.
            +     * 
            + * + * string etag = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for etag to set. + * @return This builder for chaining. + */ + public Builder setEtagBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + etag_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + + private com.google.protobuf.Internal.IntList protocols_ = emptyIntList(); + + private void ensureProtocolsIsMutable() { + if (!protocols_.isModifiable()) { + protocols_ = makeMutableCopy(protocols_); + } + bitField0_ |= 0x00000100; + } + + /** + * + * + *
            +     * Optional. Deprecated.
            +     * 
            + * + * + * repeated .google.cloud.networkservices.v1.AgentGateway.Protocol protocols = 12 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; + * + * + * @deprecated google.cloud.networkservices.v1.AgentGateway.protocols is deprecated. See + * google/cloud/networkservices/v1/agent_gateway.proto;l=183 + * @return A list containing the protocols. + */ + @java.lang.Deprecated + public java.util.List + getProtocolsList() { + return new com.google.protobuf.Internal.IntListAdapter< + com.google.cloud.networkservices.v1.AgentGateway.Protocol>( + protocols_, protocols_converter_); + } + + /** + * + * + *
            +     * Optional. Deprecated.
            +     * 
            + * + * + * repeated .google.cloud.networkservices.v1.AgentGateway.Protocol protocols = 12 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; + * + * + * @deprecated google.cloud.networkservices.v1.AgentGateway.protocols is deprecated. See + * google/cloud/networkservices/v1/agent_gateway.proto;l=183 + * @return The count of protocols. + */ + @java.lang.Deprecated + public int getProtocolsCount() { + return protocols_.size(); + } + + /** + * + * + *
            +     * Optional. Deprecated.
            +     * 
            + * + * + * repeated .google.cloud.networkservices.v1.AgentGateway.Protocol protocols = 12 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; + * + * + * @deprecated google.cloud.networkservices.v1.AgentGateway.protocols is deprecated. See + * google/cloud/networkservices/v1/agent_gateway.proto;l=183 + * @param index The index of the element to return. + * @return The protocols at the given index. + */ + @java.lang.Deprecated + public com.google.cloud.networkservices.v1.AgentGateway.Protocol getProtocols(int index) { + return protocols_converter_.convert(protocols_.getInt(index)); + } + + /** + * + * + *
            +     * Optional. Deprecated.
            +     * 
            + * + * + * repeated .google.cloud.networkservices.v1.AgentGateway.Protocol protocols = 12 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; + * + * + * @deprecated google.cloud.networkservices.v1.AgentGateway.protocols is deprecated. See + * google/cloud/networkservices/v1/agent_gateway.proto;l=183 + * @param index The index to set the value at. + * @param value The protocols to set. + * @return This builder for chaining. + */ + @java.lang.Deprecated + public Builder setProtocols( + int index, com.google.cloud.networkservices.v1.AgentGateway.Protocol value) { + if (value == null) { + throw new NullPointerException(); + } + ensureProtocolsIsMutable(); + protocols_.setInt(index, value.getNumber()); + onChanged(); + return this; + } + + /** + * + * + *
            +     * Optional. Deprecated.
            +     * 
            + * + * + * repeated .google.cloud.networkservices.v1.AgentGateway.Protocol protocols = 12 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; + * + * + * @deprecated google.cloud.networkservices.v1.AgentGateway.protocols is deprecated. See + * google/cloud/networkservices/v1/agent_gateway.proto;l=183 + * @param value The protocols to add. + * @return This builder for chaining. + */ + @java.lang.Deprecated + public Builder addProtocols(com.google.cloud.networkservices.v1.AgentGateway.Protocol value) { + if (value == null) { + throw new NullPointerException(); + } + ensureProtocolsIsMutable(); + protocols_.addInt(value.getNumber()); + onChanged(); + return this; + } + + /** + * + * + *
            +     * Optional. Deprecated.
            +     * 
            + * + * + * repeated .google.cloud.networkservices.v1.AgentGateway.Protocol protocols = 12 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; + * + * + * @deprecated google.cloud.networkservices.v1.AgentGateway.protocols is deprecated. See + * google/cloud/networkservices/v1/agent_gateway.proto;l=183 + * @param values The protocols to add. + * @return This builder for chaining. + */ + @java.lang.Deprecated + public Builder addAllProtocols( + java.lang.Iterable + values) { + ensureProtocolsIsMutable(); + for (com.google.cloud.networkservices.v1.AgentGateway.Protocol value : values) { + protocols_.addInt(value.getNumber()); + } + onChanged(); + return this; + } + + /** + * + * + *
            +     * Optional. Deprecated.
            +     * 
            + * + * + * repeated .google.cloud.networkservices.v1.AgentGateway.Protocol protocols = 12 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; + * + * + * @deprecated google.cloud.networkservices.v1.AgentGateway.protocols is deprecated. See + * google/cloud/networkservices/v1/agent_gateway.proto;l=183 + * @return This builder for chaining. + */ + @java.lang.Deprecated + public Builder clearProtocols() { + protocols_ = emptyIntList(); + bitField0_ = (bitField0_ & ~0x00000100); + onChanged(); + return this; + } + + /** + * + * + *
            +     * Optional. Deprecated.
            +     * 
            + * + * + * repeated .google.cloud.networkservices.v1.AgentGateway.Protocol protocols = 12 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; + * + * + * @deprecated google.cloud.networkservices.v1.AgentGateway.protocols is deprecated. See + * google/cloud/networkservices/v1/agent_gateway.proto;l=183 + * @return A list containing the enum numeric values on the wire for protocols. + */ + @java.lang.Deprecated + public java.util.List getProtocolsValueList() { + protocols_.makeImmutable(); + return protocols_; + } + + /** + * + * + *
            +     * Optional. Deprecated.
            +     * 
            + * + * + * repeated .google.cloud.networkservices.v1.AgentGateway.Protocol protocols = 12 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; + * + * + * @deprecated google.cloud.networkservices.v1.AgentGateway.protocols is deprecated. See + * google/cloud/networkservices/v1/agent_gateway.proto;l=183 + * @param index The index of the value to return. + * @return The enum numeric value on the wire of protocols at the given index. + */ + @java.lang.Deprecated + public int getProtocolsValue(int index) { + return protocols_.getInt(index); + } + + /** + * + * + *
            +     * Optional. Deprecated.
            +     * 
            + * + * + * repeated .google.cloud.networkservices.v1.AgentGateway.Protocol protocols = 12 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; + * + * + * @deprecated google.cloud.networkservices.v1.AgentGateway.protocols is deprecated. See + * google/cloud/networkservices/v1/agent_gateway.proto;l=183 + * @param index The index to set the value at. + * @param value The enum numeric value on the wire for protocols to set. + * @return This builder for chaining. + */ + @java.lang.Deprecated + public Builder setProtocolsValue(int index, int value) { + ensureProtocolsIsMutable(); + protocols_.setInt(index, value); + onChanged(); + return this; + } + + /** + * + * + *
            +     * Optional. Deprecated.
            +     * 
            + * + * + * repeated .google.cloud.networkservices.v1.AgentGateway.Protocol protocols = 12 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; + * + * + * @deprecated google.cloud.networkservices.v1.AgentGateway.protocols is deprecated. See + * google/cloud/networkservices/v1/agent_gateway.proto;l=183 + * @param value The enum numeric value on the wire for protocols to add. + * @return This builder for chaining. + */ + @java.lang.Deprecated + public Builder addProtocolsValue(int value) { + ensureProtocolsIsMutable(); + protocols_.addInt(value); + onChanged(); + return this; + } + + /** + * + * + *
            +     * Optional. Deprecated.
            +     * 
            + * + * + * repeated .google.cloud.networkservices.v1.AgentGateway.Protocol protocols = 12 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; + * + * + * @deprecated google.cloud.networkservices.v1.AgentGateway.protocols is deprecated. See + * google/cloud/networkservices/v1/agent_gateway.proto;l=183 + * @param values The enum numeric values on the wire for protocols to add. + * @return This builder for chaining. + */ + @java.lang.Deprecated + public Builder addAllProtocolsValue(java.lang.Iterable values) { + ensureProtocolsIsMutable(); + for (int value : values) { + protocols_.addInt(value); + } + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList registries_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureRegistriesIsMutable() { + if (!registries_.isModifiable()) { + registries_ = new com.google.protobuf.LazyStringArrayList(registries_); + } + bitField0_ |= 0x00000200; + } + + /** + * + * + *
            +     * Optional. A list of Agent registries containing the agents, MCP servers and
            +     * tools governed by the Agent Gateway. Note: Currently limited to
            +     * project-scoped registries Must be of format
            +     * `//agentregistry.googleapis.com/projects/{project}/locations/{location}/
            +     * 
            + * + * repeated string registries = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the registries. + */ + public com.google.protobuf.ProtocolStringList getRegistriesList() { + registries_.makeImmutable(); + return registries_; + } + + /** + * + * + *
            +     * Optional. A list of Agent registries containing the agents, MCP servers and
            +     * tools governed by the Agent Gateway. Note: Currently limited to
            +     * project-scoped registries Must be of format
            +     * `//agentregistry.googleapis.com/projects/{project}/locations/{location}/
            +     * 
            + * + * repeated string registries = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of registries. + */ + public int getRegistriesCount() { + return registries_.size(); + } + + /** + * + * + *
            +     * Optional. A list of Agent registries containing the agents, MCP servers and
            +     * tools governed by the Agent Gateway. Note: Currently limited to
            +     * project-scoped registries Must be of format
            +     * `//agentregistry.googleapis.com/projects/{project}/locations/{location}/
            +     * 
            + * + * repeated string registries = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The registries at the given index. + */ + public java.lang.String getRegistries(int index) { + return registries_.get(index); + } + + /** + * + * + *
            +     * Optional. A list of Agent registries containing the agents, MCP servers and
            +     * tools governed by the Agent Gateway. Note: Currently limited to
            +     * project-scoped registries Must be of format
            +     * `//agentregistry.googleapis.com/projects/{project}/locations/{location}/
            +     * 
            + * + * repeated string registries = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the registries at the given index. + */ + public com.google.protobuf.ByteString getRegistriesBytes(int index) { + return registries_.getByteString(index); + } + + /** + * + * + *
            +     * Optional. A list of Agent registries containing the agents, MCP servers and
            +     * tools governed by the Agent Gateway. Note: Currently limited to
            +     * project-scoped registries Must be of format
            +     * `//agentregistry.googleapis.com/projects/{project}/locations/{location}/
            +     * 
            + * + * repeated string registries = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index to set the value at. + * @param value The registries to set. + * @return This builder for chaining. + */ + public Builder setRegistries(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureRegistriesIsMutable(); + registries_.set(index, value); + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Optional. A list of Agent registries containing the agents, MCP servers and
            +     * tools governed by the Agent Gateway. Note: Currently limited to
            +     * project-scoped registries Must be of format
            +     * `//agentregistry.googleapis.com/projects/{project}/locations/{location}/
            +     * 
            + * + * repeated string registries = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The registries to add. + * @return This builder for chaining. + */ + public Builder addRegistries(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureRegistriesIsMutable(); + registries_.add(value); + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Optional. A list of Agent registries containing the agents, MCP servers and
            +     * tools governed by the Agent Gateway. Note: Currently limited to
            +     * project-scoped registries Must be of format
            +     * `//agentregistry.googleapis.com/projects/{project}/locations/{location}/
            +     * 
            + * + * repeated string registries = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param values The registries to add. + * @return This builder for chaining. + */ + public Builder addAllRegistries(java.lang.Iterable values) { + ensureRegistriesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, registries_); + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Optional. A list of Agent registries containing the agents, MCP servers and
            +     * tools governed by the Agent Gateway. Note: Currently limited to
            +     * project-scoped registries Must be of format
            +     * `//agentregistry.googleapis.com/projects/{project}/locations/{location}/
            +     * 
            + * + * repeated string registries = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearRegistries() { + registries_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000200); + ; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Optional. A list of Agent registries containing the agents, MCP servers and
            +     * tools governed by the Agent Gateway. Note: Currently limited to
            +     * project-scoped registries Must be of format
            +     * `//agentregistry.googleapis.com/projects/{project}/locations/{location}/
            +     * 
            + * + * repeated string registries = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes of the registries to add. + * @return This builder for chaining. + */ + public Builder addRegistriesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureRegistriesIsMutable(); + registries_.add(value); + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + + private com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig networkConfig_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig, + com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig.Builder, + com.google.cloud.networkservices.v1.AgentGateway.NetworkConfigOrBuilder> + networkConfigBuilder_; + + /** + * + * + *
            +     * Optional. Network configuration for the AgentGateway.
            +     * 
            + * + * + * .google.cloud.networkservices.v1.AgentGateway.NetworkConfig network_config = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the networkConfig field is set. + */ + public boolean hasNetworkConfig() { + return ((bitField0_ & 0x00000400) != 0); + } + + /** + * + * + *
            +     * Optional. Network configuration for the AgentGateway.
            +     * 
            + * + * + * .google.cloud.networkservices.v1.AgentGateway.NetworkConfig network_config = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The networkConfig. + */ + public com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig getNetworkConfig() { + if (networkConfigBuilder_ == null) { + return networkConfig_ == null + ? com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig.getDefaultInstance() + : networkConfig_; + } else { + return networkConfigBuilder_.getMessage(); + } + } + + /** + * + * + *
            +     * Optional. Network configuration for the AgentGateway.
            +     * 
            + * + * + * .google.cloud.networkservices.v1.AgentGateway.NetworkConfig network_config = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setNetworkConfig( + com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig value) { + if (networkConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + networkConfig_ = value; + } else { + networkConfigBuilder_.setMessage(value); + } + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Optional. Network configuration for the AgentGateway.
            +     * 
            + * + * + * .google.cloud.networkservices.v1.AgentGateway.NetworkConfig network_config = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setNetworkConfig( + com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig.Builder builderForValue) { + if (networkConfigBuilder_ == null) { + networkConfig_ = builderForValue.build(); + } else { + networkConfigBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Optional. Network configuration for the AgentGateway.
            +     * 
            + * + * + * .google.cloud.networkservices.v1.AgentGateway.NetworkConfig network_config = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeNetworkConfig( + com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig value) { + if (networkConfigBuilder_ == null) { + if (((bitField0_ & 0x00000400) != 0) + && networkConfig_ != null + && networkConfig_ + != com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig + .getDefaultInstance()) { + getNetworkConfigBuilder().mergeFrom(value); + } else { + networkConfig_ = value; + } + } else { + networkConfigBuilder_.mergeFrom(value); + } + if (networkConfig_ != null) { + bitField0_ |= 0x00000400; + onChanged(); + } + return this; + } + + /** + * + * + *
            +     * Optional. Network configuration for the AgentGateway.
            +     * 
            + * + * + * .google.cloud.networkservices.v1.AgentGateway.NetworkConfig network_config = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearNetworkConfig() { + bitField0_ = (bitField0_ & ~0x00000400); + networkConfig_ = null; + if (networkConfigBuilder_ != null) { + networkConfigBuilder_.dispose(); + networkConfigBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
            +     * Optional. Network configuration for the AgentGateway.
            +     * 
            + * + * + * .google.cloud.networkservices.v1.AgentGateway.NetworkConfig network_config = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig.Builder + getNetworkConfigBuilder() { + bitField0_ |= 0x00000400; + onChanged(); + return internalGetNetworkConfigFieldBuilder().getBuilder(); + } + + /** + * + * + *
            +     * Optional. Network configuration for the AgentGateway.
            +     * 
            + * + * + * .google.cloud.networkservices.v1.AgentGateway.NetworkConfig network_config = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.networkservices.v1.AgentGateway.NetworkConfigOrBuilder + getNetworkConfigOrBuilder() { + if (networkConfigBuilder_ != null) { + return networkConfigBuilder_.getMessageOrBuilder(); + } else { + return networkConfig_ == null + ? com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig.getDefaultInstance() + : networkConfig_; + } + } + + /** + * + * + *
            +     * Optional. Network configuration for the AgentGateway.
            +     * 
            + * + * + * .google.cloud.networkservices.v1.AgentGateway.NetworkConfig network_config = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig, + com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig.Builder, + com.google.cloud.networkservices.v1.AgentGateway.NetworkConfigOrBuilder> + internalGetNetworkConfigFieldBuilder() { + if (networkConfigBuilder_ == null) { + networkConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig, + com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig.Builder, + com.google.cloud.networkservices.v1.AgentGateway.NetworkConfigOrBuilder>( + getNetworkConfig(), getParentForChildren(), isClean()); + networkConfig_ = null; + } + return networkConfigBuilder_; + } + + private com.google.cloud.networkservices.v1.AgentGateway.AgentGatewayOutputCard + agentGatewayCard_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.networkservices.v1.AgentGateway.AgentGatewayOutputCard, + com.google.cloud.networkservices.v1.AgentGateway.AgentGatewayOutputCard.Builder, + com.google.cloud.networkservices.v1.AgentGateway.AgentGatewayOutputCardOrBuilder> + agentGatewayCardBuilder_; + + /** + * + * + *
            +     * Output only. Field for populated AgentGateway card.
            +     * 
            + * + * + * .google.cloud.networkservices.v1.AgentGateway.AgentGatewayOutputCard agent_gateway_card = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the agentGatewayCard field is set. + */ + public boolean hasAgentGatewayCard() { + return ((bitField0_ & 0x00000800) != 0); + } + + /** + * + * + *
            +     * Output only. Field for populated AgentGateway card.
            +     * 
            + * + * + * .google.cloud.networkservices.v1.AgentGateway.AgentGatewayOutputCard agent_gateway_card = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The agentGatewayCard. + */ + public com.google.cloud.networkservices.v1.AgentGateway.AgentGatewayOutputCard + getAgentGatewayCard() { + if (agentGatewayCardBuilder_ == null) { + return agentGatewayCard_ == null + ? com.google.cloud.networkservices.v1.AgentGateway.AgentGatewayOutputCard + .getDefaultInstance() + : agentGatewayCard_; + } else { + return agentGatewayCardBuilder_.getMessage(); + } + } + + /** + * + * + *
            +     * Output only. Field for populated AgentGateway card.
            +     * 
            + * + * + * .google.cloud.networkservices.v1.AgentGateway.AgentGatewayOutputCard agent_gateway_card = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setAgentGatewayCard( + com.google.cloud.networkservices.v1.AgentGateway.AgentGatewayOutputCard value) { + if (agentGatewayCardBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + agentGatewayCard_ = value; + } else { + agentGatewayCardBuilder_.setMessage(value); + } + bitField0_ |= 0x00000800; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Output only. Field for populated AgentGateway card.
            +     * 
            + * + * + * .google.cloud.networkservices.v1.AgentGateway.AgentGatewayOutputCard agent_gateway_card = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setAgentGatewayCard( + com.google.cloud.networkservices.v1.AgentGateway.AgentGatewayOutputCard.Builder + builderForValue) { + if (agentGatewayCardBuilder_ == null) { + agentGatewayCard_ = builderForValue.build(); + } else { + agentGatewayCardBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000800; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Output only. Field for populated AgentGateway card.
            +     * 
            + * + * + * .google.cloud.networkservices.v1.AgentGateway.AgentGatewayOutputCard agent_gateway_card = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeAgentGatewayCard( + com.google.cloud.networkservices.v1.AgentGateway.AgentGatewayOutputCard value) { + if (agentGatewayCardBuilder_ == null) { + if (((bitField0_ & 0x00000800) != 0) + && agentGatewayCard_ != null + && agentGatewayCard_ + != com.google.cloud.networkservices.v1.AgentGateway.AgentGatewayOutputCard + .getDefaultInstance()) { + getAgentGatewayCardBuilder().mergeFrom(value); + } else { + agentGatewayCard_ = value; + } + } else { + agentGatewayCardBuilder_.mergeFrom(value); + } + if (agentGatewayCard_ != null) { + bitField0_ |= 0x00000800; + onChanged(); + } + return this; + } + + /** + * + * + *
            +     * Output only. Field for populated AgentGateway card.
            +     * 
            + * + * + * .google.cloud.networkservices.v1.AgentGateway.AgentGatewayOutputCard agent_gateway_card = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearAgentGatewayCard() { + bitField0_ = (bitField0_ & ~0x00000800); + agentGatewayCard_ = null; + if (agentGatewayCardBuilder_ != null) { + agentGatewayCardBuilder_.dispose(); + agentGatewayCardBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
            +     * Output only. Field for populated AgentGateway card.
            +     * 
            + * + * + * .google.cloud.networkservices.v1.AgentGateway.AgentGatewayOutputCard agent_gateway_card = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.networkservices.v1.AgentGateway.AgentGatewayOutputCard.Builder + getAgentGatewayCardBuilder() { + bitField0_ |= 0x00000800; + onChanged(); + return internalGetAgentGatewayCardFieldBuilder().getBuilder(); + } + + /** + * + * + *
            +     * Output only. Field for populated AgentGateway card.
            +     * 
            + * + * + * .google.cloud.networkservices.v1.AgentGateway.AgentGatewayOutputCard agent_gateway_card = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.networkservices.v1.AgentGateway.AgentGatewayOutputCardOrBuilder + getAgentGatewayCardOrBuilder() { + if (agentGatewayCardBuilder_ != null) { + return agentGatewayCardBuilder_.getMessageOrBuilder(); + } else { + return agentGatewayCard_ == null + ? com.google.cloud.networkservices.v1.AgentGateway.AgentGatewayOutputCard + .getDefaultInstance() + : agentGatewayCard_; + } + } + + /** + * + * + *
            +     * Output only. Field for populated AgentGateway card.
            +     * 
            + * + * + * .google.cloud.networkservices.v1.AgentGateway.AgentGatewayOutputCard agent_gateway_card = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.networkservices.v1.AgentGateway.AgentGatewayOutputCard, + com.google.cloud.networkservices.v1.AgentGateway.AgentGatewayOutputCard.Builder, + com.google.cloud.networkservices.v1.AgentGateway.AgentGatewayOutputCardOrBuilder> + internalGetAgentGatewayCardFieldBuilder() { + if (agentGatewayCardBuilder_ == null) { + agentGatewayCardBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.networkservices.v1.AgentGateway.AgentGatewayOutputCard, + com.google.cloud.networkservices.v1.AgentGateway.AgentGatewayOutputCard.Builder, + com.google.cloud.networkservices.v1.AgentGateway.AgentGatewayOutputCardOrBuilder>( + getAgentGatewayCard(), getParentForChildren(), isClean()); + agentGatewayCard_ = null; + } + return agentGatewayCardBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.networkservices.v1.AgentGateway) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkservices.v1.AgentGateway) + private static final com.google.cloud.networkservices.v1.AgentGateway DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.networkservices.v1.AgentGateway(); + } + + public static com.google.cloud.networkservices.v1.AgentGateway getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AgentGateway parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.networkservices.v1.AgentGateway getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/AgentGatewayName.java b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/AgentGatewayName.java new file mode 100644 index 000000000000..0b6b363c82e2 --- /dev/null +++ b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/AgentGatewayName.java @@ -0,0 +1,227 @@ +/* + * 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.networkservices.v1; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class AgentGatewayName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_AGENT_GATEWAY = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/agentGateways/{agent_gateway}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + private final String agentGateway; + + @Deprecated + protected AgentGatewayName() { + project = null; + location = null; + agentGateway = null; + } + + private AgentGatewayName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + agentGateway = Preconditions.checkNotNull(builder.getAgentGateway()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getAgentGateway() { + return agentGateway; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static AgentGatewayName of(String project, String location, String agentGateway) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setAgentGateway(agentGateway) + .build(); + } + + public static String format(String project, String location, String agentGateway) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setAgentGateway(agentGateway) + .build() + .toString(); + } + + public static AgentGatewayName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_AGENT_GATEWAY.validatedMatch( + formattedString, "AgentGatewayName.parse: formattedString not in valid format"); + return of(matchMap.get("project"), matchMap.get("location"), matchMap.get("agent_gateway")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (AgentGatewayName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_AGENT_GATEWAY.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (project != null) { + fieldMapBuilder.put("project", project); + } + if (location != null) { + fieldMapBuilder.put("location", location); + } + if (agentGateway != null) { + fieldMapBuilder.put("agent_gateway", agentGateway); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_AGENT_GATEWAY.instantiate( + "project", project, "location", location, "agent_gateway", agentGateway); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null && getClass() == o.getClass()) { + AgentGatewayName that = ((AgentGatewayName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.agentGateway, that.agentGateway); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(location); + h *= 1000003; + h ^= Objects.hashCode(agentGateway); + return h; + } + + /** Builder for projects/{project}/locations/{location}/agentGateways/{agent_gateway}. */ + public static class Builder { + private String project; + private String location; + private String agentGateway; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getAgentGateway() { + return agentGateway; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setAgentGateway(String agentGateway) { + this.agentGateway = agentGateway; + return this; + } + + private Builder(AgentGatewayName agentGatewayName) { + this.project = agentGatewayName.project; + this.location = agentGatewayName.location; + this.agentGateway = agentGatewayName.agentGateway; + } + + public AgentGatewayName build() { + return new AgentGatewayName(this); + } + } +} diff --git a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/AgentGatewayOrBuilder.java b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/AgentGatewayOrBuilder.java new file mode 100644 index 000000000000..cad10ef1832a --- /dev/null +++ b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/AgentGatewayOrBuilder.java @@ -0,0 +1,600 @@ +/* + * 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/cloud/networkservices/v1/agent_gateway.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkservices.v1; + +@com.google.protobuf.Generated +public interface AgentGatewayOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkservices.v1.AgentGateway) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
            +   * Optional. Proxy is orchestrated and managed by GoogleCloud in a tenant
            +   * project.
            +   * 
            + * + * + * .google.cloud.networkservices.v1.AgentGateway.GoogleManaged google_managed = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the googleManaged field is set. + */ + boolean hasGoogleManaged(); + + /** + * + * + *
            +   * Optional. Proxy is orchestrated and managed by GoogleCloud in a tenant
            +   * project.
            +   * 
            + * + * + * .google.cloud.networkservices.v1.AgentGateway.GoogleManaged google_managed = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The googleManaged. + */ + com.google.cloud.networkservices.v1.AgentGateway.GoogleManaged getGoogleManaged(); + + /** + * + * + *
            +   * Optional. Proxy is orchestrated and managed by GoogleCloud in a tenant
            +   * project.
            +   * 
            + * + * + * .google.cloud.networkservices.v1.AgentGateway.GoogleManaged google_managed = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.networkservices.v1.AgentGateway.GoogleManagedOrBuilder + getGoogleManagedOrBuilder(); + + /** + * + * + *
            +   * Optional. Attach to existing Application Load Balancers or Secure Web
            +   * Proxies.
            +   * 
            + * + * + * .google.cloud.networkservices.v1.AgentGateway.SelfManaged self_managed = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the selfManaged field is set. + */ + boolean hasSelfManaged(); + + /** + * + * + *
            +   * Optional. Attach to existing Application Load Balancers or Secure Web
            +   * Proxies.
            +   * 
            + * + * + * .google.cloud.networkservices.v1.AgentGateway.SelfManaged self_managed = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The selfManaged. + */ + com.google.cloud.networkservices.v1.AgentGateway.SelfManaged getSelfManaged(); + + /** + * + * + *
            +   * Optional. Attach to existing Application Load Balancers or Secure Web
            +   * Proxies.
            +   * 
            + * + * + * .google.cloud.networkservices.v1.AgentGateway.SelfManaged self_managed = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.networkservices.v1.AgentGateway.SelfManagedOrBuilder getSelfManagedOrBuilder(); + + /** + * + * + *
            +   * Identifier. Name of the AgentGateway resource. It matches pattern
            +   * `projects/*/locations/*/agentGateways/<agent_gateway>`.
            +   * 
            + * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
            +   * Identifier. Name of the AgentGateway resource. It matches pattern
            +   * `projects/*/locations/*/agentGateways/<agent_gateway>`.
            +   * 
            + * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
            +   * Output only. The timestamp when the resource was created.
            +   * 
            + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + + /** + * + * + *
            +   * Output only. The timestamp when the resource was created.
            +   * 
            + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + + /** + * + * + *
            +   * Output only. The timestamp when the resource was created.
            +   * 
            + * + * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
            +   * Output only. The timestamp when the resource was updated.
            +   * 
            + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + + /** + * + * + *
            +   * Output only. The timestamp when the resource was updated.
            +   * 
            + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + + /** + * + * + *
            +   * Output only. The timestamp when the resource was updated.
            +   * 
            + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + /** + * + * + *
            +   * Optional. Set of label tags associated with the AgentGateway resource.
            +   * 
            + * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + int getLabelsCount(); + + /** + * + * + *
            +   * Optional. Set of label tags associated with the AgentGateway resource.
            +   * 
            + * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + boolean containsLabels(java.lang.String key); + + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getLabels(); + + /** + * + * + *
            +   * Optional. Set of label tags associated with the AgentGateway resource.
            +   * 
            + * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + java.util.Map getLabelsMap(); + + /** + * + * + *
            +   * Optional. Set of label tags associated with the AgentGateway resource.
            +   * 
            + * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + /* nullable */ + java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue); + + /** + * + * + *
            +   * Optional. Set of label tags associated with the AgentGateway resource.
            +   * 
            + * + * map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + java.lang.String getLabelsOrThrow(java.lang.String key); + + /** + * + * + *
            +   * Optional. A free-text description of the resource. Max length 1024
            +   * characters.
            +   * 
            + * + * string description = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The description. + */ + java.lang.String getDescription(); + + /** + * + * + *
            +   * Optional. A free-text description of the resource. Max length 1024
            +   * characters.
            +   * 
            + * + * string description = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for description. + */ + com.google.protobuf.ByteString getDescriptionBytes(); + + /** + * + * + *
            +   * Optional. Etag of the resource.
            +   * If this is provided, it must match the server's etag. If the provided etag
            +   * does not match the server's etag, the request will fail with a 409 ABORTED
            +   * error.
            +   * 
            + * + * string etag = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The etag. + */ + java.lang.String getEtag(); + + /** + * + * + *
            +   * Optional. Etag of the resource.
            +   * If this is provided, it must match the server's etag. If the provided etag
            +   * does not match the server's etag, the request will fail with a 409 ABORTED
            +   * error.
            +   * 
            + * + * string etag = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for etag. + */ + com.google.protobuf.ByteString getEtagBytes(); + + /** + * + * + *
            +   * Optional. Deprecated.
            +   * 
            + * + * + * repeated .google.cloud.networkservices.v1.AgentGateway.Protocol protocols = 12 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; + * + * + * @deprecated google.cloud.networkservices.v1.AgentGateway.protocols is deprecated. See + * google/cloud/networkservices/v1/agent_gateway.proto;l=183 + * @return A list containing the protocols. + */ + @java.lang.Deprecated + java.util.List getProtocolsList(); + + /** + * + * + *
            +   * Optional. Deprecated.
            +   * 
            + * + * + * repeated .google.cloud.networkservices.v1.AgentGateway.Protocol protocols = 12 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; + * + * + * @deprecated google.cloud.networkservices.v1.AgentGateway.protocols is deprecated. See + * google/cloud/networkservices/v1/agent_gateway.proto;l=183 + * @return The count of protocols. + */ + @java.lang.Deprecated + int getProtocolsCount(); + + /** + * + * + *
            +   * Optional. Deprecated.
            +   * 
            + * + * + * repeated .google.cloud.networkservices.v1.AgentGateway.Protocol protocols = 12 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; + * + * + * @deprecated google.cloud.networkservices.v1.AgentGateway.protocols is deprecated. See + * google/cloud/networkservices/v1/agent_gateway.proto;l=183 + * @param index The index of the element to return. + * @return The protocols at the given index. + */ + @java.lang.Deprecated + com.google.cloud.networkservices.v1.AgentGateway.Protocol getProtocols(int index); + + /** + * + * + *
            +   * Optional. Deprecated.
            +   * 
            + * + * + * repeated .google.cloud.networkservices.v1.AgentGateway.Protocol protocols = 12 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; + * + * + * @deprecated google.cloud.networkservices.v1.AgentGateway.protocols is deprecated. See + * google/cloud/networkservices/v1/agent_gateway.proto;l=183 + * @return A list containing the enum numeric values on the wire for protocols. + */ + @java.lang.Deprecated + java.util.List getProtocolsValueList(); + + /** + * + * + *
            +   * Optional. Deprecated.
            +   * 
            + * + * + * repeated .google.cloud.networkservices.v1.AgentGateway.Protocol protocols = 12 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; + * + * + * @deprecated google.cloud.networkservices.v1.AgentGateway.protocols is deprecated. See + * google/cloud/networkservices/v1/agent_gateway.proto;l=183 + * @param index The index of the value to return. + * @return The enum numeric value on the wire of protocols at the given index. + */ + @java.lang.Deprecated + int getProtocolsValue(int index); + + /** + * + * + *
            +   * Optional. A list of Agent registries containing the agents, MCP servers and
            +   * tools governed by the Agent Gateway. Note: Currently limited to
            +   * project-scoped registries Must be of format
            +   * `//agentregistry.googleapis.com/projects/{project}/locations/{location}/
            +   * 
            + * + * repeated string registries = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the registries. + */ + java.util.List getRegistriesList(); + + /** + * + * + *
            +   * Optional. A list of Agent registries containing the agents, MCP servers and
            +   * tools governed by the Agent Gateway. Note: Currently limited to
            +   * project-scoped registries Must be of format
            +   * `//agentregistry.googleapis.com/projects/{project}/locations/{location}/
            +   * 
            + * + * repeated string registries = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of registries. + */ + int getRegistriesCount(); + + /** + * + * + *
            +   * Optional. A list of Agent registries containing the agents, MCP servers and
            +   * tools governed by the Agent Gateway. Note: Currently limited to
            +   * project-scoped registries Must be of format
            +   * `//agentregistry.googleapis.com/projects/{project}/locations/{location}/
            +   * 
            + * + * repeated string registries = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The registries at the given index. + */ + java.lang.String getRegistries(int index); + + /** + * + * + *
            +   * Optional. A list of Agent registries containing the agents, MCP servers and
            +   * tools governed by the Agent Gateway. Note: Currently limited to
            +   * project-scoped registries Must be of format
            +   * `//agentregistry.googleapis.com/projects/{project}/locations/{location}/
            +   * 
            + * + * repeated string registries = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the registries at the given index. + */ + com.google.protobuf.ByteString getRegistriesBytes(int index); + + /** + * + * + *
            +   * Optional. Network configuration for the AgentGateway.
            +   * 
            + * + * + * .google.cloud.networkservices.v1.AgentGateway.NetworkConfig network_config = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the networkConfig field is set. + */ + boolean hasNetworkConfig(); + + /** + * + * + *
            +   * Optional. Network configuration for the AgentGateway.
            +   * 
            + * + * + * .google.cloud.networkservices.v1.AgentGateway.NetworkConfig network_config = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The networkConfig. + */ + com.google.cloud.networkservices.v1.AgentGateway.NetworkConfig getNetworkConfig(); + + /** + * + * + *
            +   * Optional. Network configuration for the AgentGateway.
            +   * 
            + * + * + * .google.cloud.networkservices.v1.AgentGateway.NetworkConfig network_config = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.networkservices.v1.AgentGateway.NetworkConfigOrBuilder + getNetworkConfigOrBuilder(); + + /** + * + * + *
            +   * Output only. Field for populated AgentGateway card.
            +   * 
            + * + * + * .google.cloud.networkservices.v1.AgentGateway.AgentGatewayOutputCard agent_gateway_card = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the agentGatewayCard field is set. + */ + boolean hasAgentGatewayCard(); + + /** + * + * + *
            +   * Output only. Field for populated AgentGateway card.
            +   * 
            + * + * + * .google.cloud.networkservices.v1.AgentGateway.AgentGatewayOutputCard agent_gateway_card = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The agentGatewayCard. + */ + com.google.cloud.networkservices.v1.AgentGateway.AgentGatewayOutputCard getAgentGatewayCard(); + + /** + * + * + *
            +   * Output only. Field for populated AgentGateway card.
            +   * 
            + * + * + * .google.cloud.networkservices.v1.AgentGateway.AgentGatewayOutputCard agent_gateway_card = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.networkservices.v1.AgentGateway.AgentGatewayOutputCardOrBuilder + getAgentGatewayCardOrBuilder(); + + com.google.cloud.networkservices.v1.AgentGateway.DeploymentModeCase getDeploymentModeCase(); +} diff --git a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/AgentGatewayProto.java b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/AgentGatewayProto.java new file mode 100644 index 000000000000..85c61db3e80a --- /dev/null +++ b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/AgentGatewayProto.java @@ -0,0 +1,371 @@ +/* + * 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/cloud/networkservices/v1/agent_gateway.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkservices.v1; + +@com.google.protobuf.Generated +public final class AgentGatewayProto extends com.google.protobuf.GeneratedFile { + private AgentGatewayProto() {} + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "AgentGatewayProto"); + } + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkservices_v1_AgentGateway_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_networkservices_v1_AgentGateway_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkservices_v1_AgentGateway_GoogleManaged_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_networkservices_v1_AgentGateway_GoogleManaged_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkservices_v1_AgentGateway_SelfManaged_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_networkservices_v1_AgentGateway_SelfManaged_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkservices_v1_AgentGateway_NetworkConfig_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_networkservices_v1_AgentGateway_NetworkConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkservices_v1_AgentGateway_NetworkConfig_Egress_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_networkservices_v1_AgentGateway_NetworkConfig_Egress_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkservices_v1_AgentGateway_NetworkConfig_Egress_TrustConfig_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_networkservices_v1_AgentGateway_NetworkConfig_Egress_TrustConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkservices_v1_AgentGateway_NetworkConfig_DnsPeeringConfig_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_networkservices_v1_AgentGateway_NetworkConfig_DnsPeeringConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkservices_v1_AgentGateway_AgentGatewayOutputCard_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_networkservices_v1_AgentGateway_AgentGatewayOutputCard_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkservices_v1_AgentGateway_LabelsEntry_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_networkservices_v1_AgentGateway_LabelsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkservices_v1_ListAgentGatewaysRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_networkservices_v1_ListAgentGatewaysRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkservices_v1_ListAgentGatewaysResponse_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_networkservices_v1_ListAgentGatewaysResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkservices_v1_GetAgentGatewayRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_networkservices_v1_GetAgentGatewayRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkservices_v1_CreateAgentGatewayRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_networkservices_v1_CreateAgentGatewayRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkservices_v1_UpdateAgentGatewayRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_networkservices_v1_UpdateAgentGatewayRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_networkservices_v1_DeleteAgentGatewayRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_networkservices_v1_DeleteAgentGatewayRequest_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n" + + "3google/cloud/networkservices/v1/agent_gateway.proto\022\037google.cloud.networkservi" + + "ces.v1\032\037google/api/field_behavior.proto\032\031google/api/resource.proto\032" + + " google/protobuf/field_mask.proto\032\037google/protobuf/timestamp.proto\"\277\017\n" + + "\014AgentGateway\022Z\n" + + "\016google_managed\030\010 \001(\0132;.google.cloud.networkser" + + "vices.v1.AgentGateway.GoogleManagedB\003\340A\001H\000\022V\n" + + "\014self_managed\030\t \001(\01329.google.cloud." + + "networkservices.v1.AgentGateway.SelfManagedB\003\340A\001H\000\022\021\n" + + "\004name\030\001 \001(\tB\003\340A\010\0224\n" + + "\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\022N\n" + + "\006labels\030\004 \003(\01329.goog" + + "le.cloud.networkservices.v1.AgentGateway.LabelsEntryB\003\340A\001\022\030\n" + + "\013description\030\005 \001(\tB\003\340A\001\022\021\n" + + "\004etag\030\006 \001(\tB\003\340A\001\022P\n" + + "\tprotocols\030\014 \003(" + + "\01626.google.cloud.networkservices.v1.AgentGateway.ProtocolB\005\030\001\340A\001\022\027\n\n" + + "registries\030\r" + + " \003(\tB\003\340A\001\022X\n" + + "\016network_config\030\n" + + " \001(\0132;.goog" + + "le.cloud.networkservices.v1.AgentGateway.NetworkConfigB\003\340A\001\022e\n" + + "\022agent_gateway_card\030\013 \001(\0132D.google.cloud.networkservices.v" + + "1.AgentGateway.AgentGatewayOutputCardB\003\340A\003\032\352\001\n\r" + + "GoogleManaged\022q\n" + + "\024governed_access_path\030\001 \001(\0162N.google.cloud.networkservice" + + "s.v1.AgentGateway.GoogleManaged.GovernedAccessPathB\003\340A\001\"f\n" + + "\022GovernedAccessPath\022$\n" + + " GOVERNED_ACCESS_PATH_UNSPECIFIED\020\000\022\025\n" + + "\021AGENT_TO_ANYWHERE\020\001\022\023\n" + + "\017CLIENT_TO_AGENT\020\002\032.\n" + + "\013SelfManaged\022\037\n" + + "\014resource_uri\030\001 \001(\tB\t\340A\001\372A\003\n" + + "\001*\032\244\004\n\r" + + "NetworkConfig\022W\n" + + "\006egress\030\001 \001(" + + "\0132B.google.cloud.networkservices.v1.AgentGateway.NetworkConfig.EgressB\003\340A\001\022m\n" + + "\022dns_peering_config\030\002 \001(\0132L.google.cloud.ne" + + "tworkservices.v1.AgentGateway.NetworkConfig.DnsPeeringConfigB\003\340A\001\032\302\001\n" + + "\006Egress\022\037\n" + + "\022network_attachment\030\001 \001(\tB\003\340A\001\022i\n" + + "\014trust_config\030\002 \001(\0132N.google.cloud.networkservic" + + "es.v1.AgentGateway.NetworkConfig.Egress.TrustConfigB\003\340A\001\032,\n" + + "\013TrustConfig\022\035\n" + + "\020pem_certificates\030\001 \003(\tB\003\340A\002\032\205\001\n" + + "\020DnsPeeringConfig\022\024\n" + + "\007domains\030\001 \003(\tB\003\340A\002\022\033\n" + + "\016target_project\030\002 \001(\tB\003\340A\002\022>\n" + + "\016target_network\030\003 \001(\tB&\340A\002\372A \n" + + "\036compute.googleapis.com/Network\032\205\001\n" + + "\026AgentGatewayOutputCard\022\032\n\r" + + "mtls_endpoint\030\001 \001(\tB\003\340A\003\022\036\n" + + "\021root_certificates\030\005 \003(\tB\003\340A\003\022/\n" + + "\"service_extensions_service_account\030\004 \001(\tB\003\340A\003\032-\n" + + "\013LabelsEntry\022\013\n" + + "\003key\030\001 \001(\t\022\r\n" + + "\005value\030\002 \001(\t:\0028\001\"-\n" + + "\010Protocol\022\030\n" + + "\024PROTOCOL_UNSPECIFIED\020\000\022\007\n" + + "\003MCP\020\001:\225\001\352A\221\001\n" + + "+networkservices.googleapis.com/AgentGateway" + + "\022Eprojects/{project}/locations/{location}/agentGateways/{agent_gateway}*\r" + + "agentGateways2\014agentGatewayB\021\n" + + "\017deployment_mode\"\265\001\n" + + "\030ListAgentGatewaysRequest\022C\n" + + "\006parent\030\001 \001(" + + "\tB3\340A\002\372A-\022+networkservices.googleapis.com/AgentGateway\022\026\n" + + "\tpage_size\030\002 \001(\005B\003\340A\001\022\027\n\n" + + "page_token\030\003 \001(\tB\003\340A\001\022#\n" + + "\026return_partial_success\030\004 \001(\010B\003\340A\001\"\220\001\n" + + "\031ListAgentGatewaysResponse\022E\n" + + "\016agent_gateways\030\001 \003(\0132-." + + "google.cloud.networkservices.v1.AgentGateway\022\027\n" + + "\017next_page_token\030\002 \001(\t\022\023\n" + + "\013unreachable\030\003 \003(\t\"[\n" + + "\026GetAgentGatewayRequest\022A\n" + + "\004name\030\001 \001(\tB3\340A\002\372A-\n" + + "+networkservices.googleapis.com/AgentGateway\"\312\001\n" + + "\031CreateAgentGatewayRequest\022C\n" + + "\006parent\030\001 \001(\tB3\340A\002\372A-\022+n" + + "etworkservices.googleapis.com/AgentGateway\022\035\n" + + "\020agent_gateway_id\030\002 \001(\tB\003\340A\002\022I\n\r" + + "agent_gateway\030\003" + + " \001(\0132-.google.cloud.networkservices.v1.AgentGatewayB\003\340A\002\"\234\001\n" + + "\031UpdateAgentGatewayRequest\0224\n" + + "\013update_mask\030\001" + + " \001(\0132\032.google.protobuf.FieldMaskB\003\340A\001\022I\n\r" + + "agent_gateway\030\002" + + " \001(\0132-.google.cloud.networkservices.v1.AgentGatewayB\003\340A\002\"q\n" + + "\031DeleteAgentGatewayRequest\022A\n" + + "\004name\030\001 \001(\tB3\340A\002\372A-\n" + + "+networkservices.googleapis.com/AgentGateway\022\021\n" + + "\004etag\030\002 \001(\tB\003\340A\001B\362\001\n" + + "#com.google.cloud.networkservices.v1B\021AgentGatewayProt" + + "oP\001ZMcloud.google.com/go/networkservices/apiv1/networkservicespb;networkservices" + + "pb\252\002\037Google.Cloud.NetworkServices.V1\312\002\037G" + + "oogle\\Cloud\\NetworkServices\\V1\352\002\"Google:" + + ":Cloud::NetworkServices::V1b\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.ResourceProto.getDescriptor(), + com.google.protobuf.FieldMaskProto.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), + }); + internal_static_google_cloud_networkservices_v1_AgentGateway_descriptor = + getDescriptor().getMessageType(0); + internal_static_google_cloud_networkservices_v1_AgentGateway_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_networkservices_v1_AgentGateway_descriptor, + new java.lang.String[] { + "GoogleManaged", + "SelfManaged", + "Name", + "CreateTime", + "UpdateTime", + "Labels", + "Description", + "Etag", + "Protocols", + "Registries", + "NetworkConfig", + "AgentGatewayCard", + "DeploymentMode", + }); + internal_static_google_cloud_networkservices_v1_AgentGateway_GoogleManaged_descriptor = + internal_static_google_cloud_networkservices_v1_AgentGateway_descriptor.getNestedType(0); + internal_static_google_cloud_networkservices_v1_AgentGateway_GoogleManaged_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_networkservices_v1_AgentGateway_GoogleManaged_descriptor, + new java.lang.String[] { + "GovernedAccessPath", + }); + internal_static_google_cloud_networkservices_v1_AgentGateway_SelfManaged_descriptor = + internal_static_google_cloud_networkservices_v1_AgentGateway_descriptor.getNestedType(1); + internal_static_google_cloud_networkservices_v1_AgentGateway_SelfManaged_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_networkservices_v1_AgentGateway_SelfManaged_descriptor, + new java.lang.String[] { + "ResourceUri", + }); + internal_static_google_cloud_networkservices_v1_AgentGateway_NetworkConfig_descriptor = + internal_static_google_cloud_networkservices_v1_AgentGateway_descriptor.getNestedType(2); + internal_static_google_cloud_networkservices_v1_AgentGateway_NetworkConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_networkservices_v1_AgentGateway_NetworkConfig_descriptor, + new java.lang.String[] { + "Egress", "DnsPeeringConfig", + }); + internal_static_google_cloud_networkservices_v1_AgentGateway_NetworkConfig_Egress_descriptor = + internal_static_google_cloud_networkservices_v1_AgentGateway_NetworkConfig_descriptor + .getNestedType(0); + internal_static_google_cloud_networkservices_v1_AgentGateway_NetworkConfig_Egress_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_networkservices_v1_AgentGateway_NetworkConfig_Egress_descriptor, + new java.lang.String[] { + "NetworkAttachment", "TrustConfig", + }); + internal_static_google_cloud_networkservices_v1_AgentGateway_NetworkConfig_Egress_TrustConfig_descriptor = + internal_static_google_cloud_networkservices_v1_AgentGateway_NetworkConfig_Egress_descriptor + .getNestedType(0); + internal_static_google_cloud_networkservices_v1_AgentGateway_NetworkConfig_Egress_TrustConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_networkservices_v1_AgentGateway_NetworkConfig_Egress_TrustConfig_descriptor, + new java.lang.String[] { + "PemCertificates", + }); + internal_static_google_cloud_networkservices_v1_AgentGateway_NetworkConfig_DnsPeeringConfig_descriptor = + internal_static_google_cloud_networkservices_v1_AgentGateway_NetworkConfig_descriptor + .getNestedType(1); + internal_static_google_cloud_networkservices_v1_AgentGateway_NetworkConfig_DnsPeeringConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_networkservices_v1_AgentGateway_NetworkConfig_DnsPeeringConfig_descriptor, + new java.lang.String[] { + "Domains", "TargetProject", "TargetNetwork", + }); + internal_static_google_cloud_networkservices_v1_AgentGateway_AgentGatewayOutputCard_descriptor = + internal_static_google_cloud_networkservices_v1_AgentGateway_descriptor.getNestedType(3); + internal_static_google_cloud_networkservices_v1_AgentGateway_AgentGatewayOutputCard_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_networkservices_v1_AgentGateway_AgentGatewayOutputCard_descriptor, + new java.lang.String[] { + "MtlsEndpoint", "RootCertificates", "ServiceExtensionsServiceAccount", + }); + internal_static_google_cloud_networkservices_v1_AgentGateway_LabelsEntry_descriptor = + internal_static_google_cloud_networkservices_v1_AgentGateway_descriptor.getNestedType(4); + internal_static_google_cloud_networkservices_v1_AgentGateway_LabelsEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_networkservices_v1_AgentGateway_LabelsEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + internal_static_google_cloud_networkservices_v1_ListAgentGatewaysRequest_descriptor = + getDescriptor().getMessageType(1); + internal_static_google_cloud_networkservices_v1_ListAgentGatewaysRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_networkservices_v1_ListAgentGatewaysRequest_descriptor, + new java.lang.String[] { + "Parent", "PageSize", "PageToken", "ReturnPartialSuccess", + }); + internal_static_google_cloud_networkservices_v1_ListAgentGatewaysResponse_descriptor = + getDescriptor().getMessageType(2); + internal_static_google_cloud_networkservices_v1_ListAgentGatewaysResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_networkservices_v1_ListAgentGatewaysResponse_descriptor, + new java.lang.String[] { + "AgentGateways", "NextPageToken", "Unreachable", + }); + internal_static_google_cloud_networkservices_v1_GetAgentGatewayRequest_descriptor = + getDescriptor().getMessageType(3); + internal_static_google_cloud_networkservices_v1_GetAgentGatewayRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_networkservices_v1_GetAgentGatewayRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_networkservices_v1_CreateAgentGatewayRequest_descriptor = + getDescriptor().getMessageType(4); + internal_static_google_cloud_networkservices_v1_CreateAgentGatewayRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_networkservices_v1_CreateAgentGatewayRequest_descriptor, + new java.lang.String[] { + "Parent", "AgentGatewayId", "AgentGateway", + }); + internal_static_google_cloud_networkservices_v1_UpdateAgentGatewayRequest_descriptor = + getDescriptor().getMessageType(5); + internal_static_google_cloud_networkservices_v1_UpdateAgentGatewayRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_networkservices_v1_UpdateAgentGatewayRequest_descriptor, + new java.lang.String[] { + "UpdateMask", "AgentGateway", + }); + internal_static_google_cloud_networkservices_v1_DeleteAgentGatewayRequest_descriptor = + getDescriptor().getMessageType(6); + internal_static_google_cloud_networkservices_v1_DeleteAgentGatewayRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_networkservices_v1_DeleteAgentGatewayRequest_descriptor, + new java.lang.String[] { + "Name", "Etag", + }); + descriptor.resolveAllFeaturesImmutable(); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + com.google.protobuf.FieldMaskProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.ResourceProto.resource); + registry.add(com.google.api.ResourceProto.resourceReference); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/AuthzExtension.java b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/AuthzExtension.java index 17f74beb00ce..ba6dba9a0807 100644 --- a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/AuthzExtension.java +++ b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/AuthzExtension.java @@ -59,6 +59,7 @@ private AuthzExtension() { authority_ = ""; service_ = ""; forwardHeaders_ = com.google.protobuf.LazyStringArrayList.emptyList(); + forwardAttributes_ = com.google.protobuf.LazyStringArrayList.emptyList(); wireFormat_ = 0; } @@ -442,15 +443,16 @@ public java.lang.String getLabelsOrThrow(java.lang.String key) { * * *
            -   * Required. All backend services and forwarding rules referenced by this
            +   * Optional. All backend services and forwarding rules referenced by this
                * extension must share the same load balancing scheme. Supported values:
            -   * `INTERNAL_MANAGED`, `EXTERNAL_MANAGED`. For more information, refer to
            +   * `INTERNAL_MANAGED`, `EXTERNAL_MANAGED`. Can be omitted for AuthzExtensions
            +   * that do not reference a backend service. For more information, refer to
                * [Backend services
                * overview](https://cloud.google.com/load-balancing/docs/backend-service).
                * 
            * * - * .google.cloud.networkservices.v1.LoadBalancingScheme load_balancing_scheme = 6 [(.google.api.field_behavior) = REQUIRED]; + * .google.cloud.networkservices.v1.LoadBalancingScheme load_balancing_scheme = 6 [(.google.api.field_behavior) = OPTIONAL]; * * * @return The enum numeric value on the wire for loadBalancingScheme. @@ -464,15 +466,16 @@ public int getLoadBalancingSchemeValue() { * * *
            -   * Required. All backend services and forwarding rules referenced by this
            +   * Optional. All backend services and forwarding rules referenced by this
                * extension must share the same load balancing scheme. Supported values:
            -   * `INTERNAL_MANAGED`, `EXTERNAL_MANAGED`. For more information, refer to
            +   * `INTERNAL_MANAGED`, `EXTERNAL_MANAGED`. Can be omitted for AuthzExtensions
            +   * that do not reference a backend service. For more information, refer to
                * [Backend services
                * overview](https://cloud.google.com/load-balancing/docs/backend-service).
                * 
            * * - * .google.cloud.networkservices.v1.LoadBalancingScheme load_balancing_scheme = 6 [(.google.api.field_behavior) = REQUIRED]; + * .google.cloud.networkservices.v1.LoadBalancingScheme load_balancing_scheme = 6 [(.google.api.field_behavior) = OPTIONAL]; * * * @return The loadBalancingScheme. @@ -495,11 +498,12 @@ public com.google.cloud.networkservices.v1.LoadBalancingScheme getLoadBalancingS * * *
            -   * Required. The `:authority` header in the gRPC request sent from Envoy
            -   * to the extension service.
            +   * Optional. The `:authority` header in the gRPC request sent from Envoy to
            +   * the extension service. It is required when the `service` field points to a
            +   * backend service or a wasm plugin.
                * 
            * - * string authority = 7 [(.google.api.field_behavior) = REQUIRED]; + * string authority = 7 [(.google.api.field_behavior) = OPTIONAL]; * * @return The authority. */ @@ -520,11 +524,12 @@ public java.lang.String getAuthority() { * * *
            -   * Required. The `:authority` header in the gRPC request sent from Envoy
            -   * to the extension service.
            +   * Optional. The `:authority` header in the gRPC request sent from Envoy to
            +   * the extension service. It is required when the `service` field points to a
            +   * backend service or a wasm plugin.
                * 
            * - * string authority = 7 [(.google.api.field_behavior) = REQUIRED]; + * string authority = 7 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for authority. */ @@ -845,6 +850,106 @@ public com.google.protobuf.ByteString getForwardHeadersBytes(int index) { return forwardHeaders_.getByteString(index); } + public static final int FORWARD_ATTRIBUTES_FIELD_NUMBER = 13; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList forwardAttributes_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + /** + * + * + *
            +   * Optional. List of the Envoy attributes to forward to the extension server.
            +   * The attributes provided here are included as part of the
            +   * `ProcessingRequest.attributes` field (of type
            +   * `map<string, google.protobuf.Struct>`), where the keys are the attribute
            +   * names. Refer to the
            +   * [documentation](https://cloud.google.com/service-extensions/docs/cel-matcher-language-reference#attributes)
            +   * for the names of attributes that can be forwarded. If omitted, no
            +   * attributes are sent. Each element is a string indicating the
            +   * attribute name.
            +   * 
            + * + * repeated string forward_attributes = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the forwardAttributes. + */ + public com.google.protobuf.ProtocolStringList getForwardAttributesList() { + return forwardAttributes_; + } + + /** + * + * + *
            +   * Optional. List of the Envoy attributes to forward to the extension server.
            +   * The attributes provided here are included as part of the
            +   * `ProcessingRequest.attributes` field (of type
            +   * `map<string, google.protobuf.Struct>`), where the keys are the attribute
            +   * names. Refer to the
            +   * [documentation](https://cloud.google.com/service-extensions/docs/cel-matcher-language-reference#attributes)
            +   * for the names of attributes that can be forwarded. If omitted, no
            +   * attributes are sent. Each element is a string indicating the
            +   * attribute name.
            +   * 
            + * + * repeated string forward_attributes = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of forwardAttributes. + */ + public int getForwardAttributesCount() { + return forwardAttributes_.size(); + } + + /** + * + * + *
            +   * Optional. List of the Envoy attributes to forward to the extension server.
            +   * The attributes provided here are included as part of the
            +   * `ProcessingRequest.attributes` field (of type
            +   * `map<string, google.protobuf.Struct>`), where the keys are the attribute
            +   * names. Refer to the
            +   * [documentation](https://cloud.google.com/service-extensions/docs/cel-matcher-language-reference#attributes)
            +   * for the names of attributes that can be forwarded. If omitted, no
            +   * attributes are sent. Each element is a string indicating the
            +   * attribute name.
            +   * 
            + * + * repeated string forward_attributes = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The forwardAttributes at the given index. + */ + public java.lang.String getForwardAttributes(int index) { + return forwardAttributes_.get(index); + } + + /** + * + * + *
            +   * Optional. List of the Envoy attributes to forward to the extension server.
            +   * The attributes provided here are included as part of the
            +   * `ProcessingRequest.attributes` field (of type
            +   * `map<string, google.protobuf.Struct>`), where the keys are the attribute
            +   * names. Refer to the
            +   * [documentation](https://cloud.google.com/service-extensions/docs/cel-matcher-language-reference#attributes)
            +   * for the names of attributes that can be forwarded. If omitted, no
            +   * attributes are sent. Each element is a string indicating the
            +   * attribute name.
            +   * 
            + * + * repeated string forward_attributes = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the forwardAttributes at the given index. + */ + public com.google.protobuf.ByteString getForwardAttributesBytes(int index) { + return forwardAttributes_.getByteString(index); + } + public static final int WIRE_FORMAT_FIELD_NUMBER = 14; private int wireFormat_ = 0; @@ -853,7 +958,9 @@ public com.google.protobuf.ByteString getForwardHeadersBytes(int index) { * *
                * Optional. The format of communication supported by the callout extension.
            -   * If not specified, the default value `EXT_PROC_GRPC` is used.
            +   * This field is supported only for regional `AuthzExtension` resources. If
            +   * not specified, the default value `EXT_PROC_GRPC` is used. Global
            +   * `AuthzExtension` resources use the `EXT_PROC_GRPC` wire format.
                * 
            * * @@ -872,7 +979,9 @@ public int getWireFormatValue() { * *
                * Optional. The format of communication supported by the callout extension.
            -   * If not specified, the default value `EXT_PROC_GRPC` is used.
            +   * This field is supported only for regional `AuthzExtension` resources. If
            +   * not specified, the default value `EXT_PROC_GRPC` is used. Global
            +   * `AuthzExtension` resources use the `EXT_PROC_GRPC` wire format.
                * 
            * * @@ -939,6 +1048,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < forwardHeaders_.size(); i++) { com.google.protobuf.GeneratedMessage.writeString(output, 12, forwardHeaders_.getRaw(i)); } + for (int i = 0; i < forwardAttributes_.size(); i++) { + com.google.protobuf.GeneratedMessage.writeString(output, 13, forwardAttributes_.getRaw(i)); + } if (wireFormat_ != com.google.cloud.networkservices.v1.WireFormat.WIRE_FORMAT_UNSPECIFIED.getNumber()) { output.writeEnum(14, wireFormat_); @@ -1002,6 +1114,14 @@ public int getSerializedSize() { size += dataSize; size += 1 * getForwardHeadersList().size(); } + { + int dataSize = 0; + for (int i = 0; i < forwardAttributes_.size(); i++) { + dataSize += computeStringSizeNoTag(forwardAttributes_.getRaw(i)); + } + size += dataSize; + size += 1 * getForwardAttributesList().size(); + } if (wireFormat_ != com.google.cloud.networkservices.v1.WireFormat.WIRE_FORMAT_UNSPECIFIED.getNumber()) { size += com.google.protobuf.CodedOutputStream.computeEnumSize(14, wireFormat_); @@ -1046,6 +1166,7 @@ public boolean equals(final java.lang.Object obj) { if (!getMetadata().equals(other.getMetadata())) return false; } if (!getForwardHeadersList().equals(other.getForwardHeadersList())) return false; + if (!getForwardAttributesList().equals(other.getForwardAttributesList())) return false; if (wireFormat_ != other.wireFormat_) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; @@ -1094,6 +1215,10 @@ public int hashCode() { hash = (37 * hash) + FORWARD_HEADERS_FIELD_NUMBER; hash = (53 * hash) + getForwardHeadersList().hashCode(); } + if (getForwardAttributesCount() > 0) { + hash = (37 * hash) + FORWARD_ATTRIBUTES_FIELD_NUMBER; + hash = (53 * hash) + getForwardAttributesList().hashCode(); + } hash = (37 * hash) + WIRE_FORMAT_FIELD_NUMBER; hash = (53 * hash) + wireFormat_; hash = (29 * hash) + getUnknownFields().hashCode(); @@ -1299,6 +1424,7 @@ public Builder clear() { metadataBuilder_ = null; } forwardHeaders_ = com.google.protobuf.LazyStringArrayList.emptyList(); + forwardAttributes_ = com.google.protobuf.LazyStringArrayList.emptyList(); wireFormat_ = 0; return this; } @@ -1380,6 +1506,10 @@ private void buildPartial0(com.google.cloud.networkservices.v1.AuthzExtension re result.forwardHeaders_ = forwardHeaders_; } if (((from_bitField0_ & 0x00001000) != 0)) { + forwardAttributes_.makeImmutable(); + result.forwardAttributes_ = forwardAttributes_; + } + if (((from_bitField0_ & 0x00002000) != 0)) { result.wireFormat_ = wireFormat_; } result.bitField0_ |= to_bitField0_; @@ -1448,6 +1578,16 @@ public Builder mergeFrom(com.google.cloud.networkservices.v1.AuthzExtension othe } onChanged(); } + if (!other.forwardAttributes_.isEmpty()) { + if (forwardAttributes_.isEmpty()) { + forwardAttributes_ = other.forwardAttributes_; + bitField0_ |= 0x00001000; + } else { + ensureForwardAttributesIsMutable(); + forwardAttributes_.addAll(other.forwardAttributes_); + } + onChanged(); + } if (other.wireFormat_ != 0) { setWireFormatValue(other.getWireFormatValue()); } @@ -1559,10 +1699,17 @@ public Builder mergeFrom( forwardHeaders_.add(s); break; } // case 98 + case 106: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureForwardAttributesIsMutable(); + forwardAttributes_.add(s); + break; + } // case 106 case 112: { wireFormat_ = input.readEnum(); - bitField0_ |= 0x00001000; + bitField0_ |= 0x00002000; break; } // case 112 default: @@ -2463,15 +2610,16 @@ public Builder putAllLabels(java.util.Map va * * *
            -     * Required. All backend services and forwarding rules referenced by this
            +     * Optional. All backend services and forwarding rules referenced by this
                  * extension must share the same load balancing scheme. Supported values:
            -     * `INTERNAL_MANAGED`, `EXTERNAL_MANAGED`. For more information, refer to
            +     * `INTERNAL_MANAGED`, `EXTERNAL_MANAGED`. Can be omitted for AuthzExtensions
            +     * that do not reference a backend service. For more information, refer to
                  * [Backend services
                  * overview](https://cloud.google.com/load-balancing/docs/backend-service).
                  * 
            * * - * .google.cloud.networkservices.v1.LoadBalancingScheme load_balancing_scheme = 6 [(.google.api.field_behavior) = REQUIRED]; + * .google.cloud.networkservices.v1.LoadBalancingScheme load_balancing_scheme = 6 [(.google.api.field_behavior) = OPTIONAL]; * * * @return The enum numeric value on the wire for loadBalancingScheme. @@ -2485,15 +2633,16 @@ public int getLoadBalancingSchemeValue() { * * *
            -     * Required. All backend services and forwarding rules referenced by this
            +     * Optional. All backend services and forwarding rules referenced by this
                  * extension must share the same load balancing scheme. Supported values:
            -     * `INTERNAL_MANAGED`, `EXTERNAL_MANAGED`. For more information, refer to
            +     * `INTERNAL_MANAGED`, `EXTERNAL_MANAGED`. Can be omitted for AuthzExtensions
            +     * that do not reference a backend service. For more information, refer to
                  * [Backend services
                  * overview](https://cloud.google.com/load-balancing/docs/backend-service).
                  * 
            * * - * .google.cloud.networkservices.v1.LoadBalancingScheme load_balancing_scheme = 6 [(.google.api.field_behavior) = REQUIRED]; + * .google.cloud.networkservices.v1.LoadBalancingScheme load_balancing_scheme = 6 [(.google.api.field_behavior) = OPTIONAL]; * * * @param value The enum numeric value on the wire for loadBalancingScheme to set. @@ -2510,15 +2659,16 @@ public Builder setLoadBalancingSchemeValue(int value) { * * *
            -     * Required. All backend services and forwarding rules referenced by this
            +     * Optional. All backend services and forwarding rules referenced by this
                  * extension must share the same load balancing scheme. Supported values:
            -     * `INTERNAL_MANAGED`, `EXTERNAL_MANAGED`. For more information, refer to
            +     * `INTERNAL_MANAGED`, `EXTERNAL_MANAGED`. Can be omitted for AuthzExtensions
            +     * that do not reference a backend service. For more information, refer to
                  * [Backend services
                  * overview](https://cloud.google.com/load-balancing/docs/backend-service).
                  * 
            * * - * .google.cloud.networkservices.v1.LoadBalancingScheme load_balancing_scheme = 6 [(.google.api.field_behavior) = REQUIRED]; + * .google.cloud.networkservices.v1.LoadBalancingScheme load_balancing_scheme = 6 [(.google.api.field_behavior) = OPTIONAL]; * * * @return The loadBalancingScheme. @@ -2536,15 +2686,16 @@ public com.google.cloud.networkservices.v1.LoadBalancingScheme getLoadBalancingS * * *
            -     * Required. All backend services and forwarding rules referenced by this
            +     * Optional. All backend services and forwarding rules referenced by this
                  * extension must share the same load balancing scheme. Supported values:
            -     * `INTERNAL_MANAGED`, `EXTERNAL_MANAGED`. For more information, refer to
            +     * `INTERNAL_MANAGED`, `EXTERNAL_MANAGED`. Can be omitted for AuthzExtensions
            +     * that do not reference a backend service. For more information, refer to
                  * [Backend services
                  * overview](https://cloud.google.com/load-balancing/docs/backend-service).
                  * 
            * * - * .google.cloud.networkservices.v1.LoadBalancingScheme load_balancing_scheme = 6 [(.google.api.field_behavior) = REQUIRED]; + * .google.cloud.networkservices.v1.LoadBalancingScheme load_balancing_scheme = 6 [(.google.api.field_behavior) = OPTIONAL]; * * * @param value The loadBalancingScheme to set. @@ -2565,15 +2716,16 @@ public Builder setLoadBalancingScheme( * * *
            -     * Required. All backend services and forwarding rules referenced by this
            +     * Optional. All backend services and forwarding rules referenced by this
                  * extension must share the same load balancing scheme. Supported values:
            -     * `INTERNAL_MANAGED`, `EXTERNAL_MANAGED`. For more information, refer to
            +     * `INTERNAL_MANAGED`, `EXTERNAL_MANAGED`. Can be omitted for AuthzExtensions
            +     * that do not reference a backend service. For more information, refer to
                  * [Backend services
                  * overview](https://cloud.google.com/load-balancing/docs/backend-service).
                  * 
            * * - * .google.cloud.networkservices.v1.LoadBalancingScheme load_balancing_scheme = 6 [(.google.api.field_behavior) = REQUIRED]; + * .google.cloud.networkservices.v1.LoadBalancingScheme load_balancing_scheme = 6 [(.google.api.field_behavior) = OPTIONAL]; * * * @return This builder for chaining. @@ -2591,11 +2743,12 @@ public Builder clearLoadBalancingScheme() { * * *
            -     * Required. The `:authority` header in the gRPC request sent from Envoy
            -     * to the extension service.
            +     * Optional. The `:authority` header in the gRPC request sent from Envoy to
            +     * the extension service. It is required when the `service` field points to a
            +     * backend service or a wasm plugin.
                  * 
            * - * string authority = 7 [(.google.api.field_behavior) = REQUIRED]; + * string authority = 7 [(.google.api.field_behavior) = OPTIONAL]; * * @return The authority. */ @@ -2615,11 +2768,12 @@ public java.lang.String getAuthority() { * * *
            -     * Required. The `:authority` header in the gRPC request sent from Envoy
            -     * to the extension service.
            +     * Optional. The `:authority` header in the gRPC request sent from Envoy to
            +     * the extension service. It is required when the `service` field points to a
            +     * backend service or a wasm plugin.
                  * 
            * - * string authority = 7 [(.google.api.field_behavior) = REQUIRED]; + * string authority = 7 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for authority. */ @@ -2639,11 +2793,12 @@ public com.google.protobuf.ByteString getAuthorityBytes() { * * *
            -     * Required. The `:authority` header in the gRPC request sent from Envoy
            -     * to the extension service.
            +     * Optional. The `:authority` header in the gRPC request sent from Envoy to
            +     * the extension service. It is required when the `service` field points to a
            +     * backend service or a wasm plugin.
                  * 
            * - * string authority = 7 [(.google.api.field_behavior) = REQUIRED]; + * string authority = 7 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The authority to set. * @return This builder for chaining. @@ -2662,11 +2817,12 @@ public Builder setAuthority(java.lang.String value) { * * *
            -     * Required. The `:authority` header in the gRPC request sent from Envoy
            -     * to the extension service.
            +     * Optional. The `:authority` header in the gRPC request sent from Envoy to
            +     * the extension service. It is required when the `service` field points to a
            +     * backend service or a wasm plugin.
                  * 
            * - * string authority = 7 [(.google.api.field_behavior) = REQUIRED]; + * string authority = 7 [(.google.api.field_behavior) = OPTIONAL]; * * @return This builder for chaining. */ @@ -2681,11 +2837,12 @@ public Builder clearAuthority() { * * *
            -     * Required. The `:authority` header in the gRPC request sent from Envoy
            -     * to the extension service.
            +     * Optional. The `:authority` header in the gRPC request sent from Envoy to
            +     * the extension service. It is required when the `service` field points to a
            +     * backend service or a wasm plugin.
                  * 
            * - * string authority = 7 [(.google.api.field_behavior) = REQUIRED]; + * string authority = 7 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The bytes for authority to set. * @return This builder for chaining. @@ -3614,6 +3771,270 @@ public Builder addForwardHeadersBytes(com.google.protobuf.ByteString value) { return this; } + private com.google.protobuf.LazyStringArrayList forwardAttributes_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureForwardAttributesIsMutable() { + if (!forwardAttributes_.isModifiable()) { + forwardAttributes_ = new com.google.protobuf.LazyStringArrayList(forwardAttributes_); + } + bitField0_ |= 0x00001000; + } + + /** + * + * + *
            +     * Optional. List of the Envoy attributes to forward to the extension server.
            +     * The attributes provided here are included as part of the
            +     * `ProcessingRequest.attributes` field (of type
            +     * `map<string, google.protobuf.Struct>`), where the keys are the attribute
            +     * names. Refer to the
            +     * [documentation](https://cloud.google.com/service-extensions/docs/cel-matcher-language-reference#attributes)
            +     * for the names of attributes that can be forwarded. If omitted, no
            +     * attributes are sent. Each element is a string indicating the
            +     * attribute name.
            +     * 
            + * + * repeated string forward_attributes = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the forwardAttributes. + */ + public com.google.protobuf.ProtocolStringList getForwardAttributesList() { + forwardAttributes_.makeImmutable(); + return forwardAttributes_; + } + + /** + * + * + *
            +     * Optional. List of the Envoy attributes to forward to the extension server.
            +     * The attributes provided here are included as part of the
            +     * `ProcessingRequest.attributes` field (of type
            +     * `map<string, google.protobuf.Struct>`), where the keys are the attribute
            +     * names. Refer to the
            +     * [documentation](https://cloud.google.com/service-extensions/docs/cel-matcher-language-reference#attributes)
            +     * for the names of attributes that can be forwarded. If omitted, no
            +     * attributes are sent. Each element is a string indicating the
            +     * attribute name.
            +     * 
            + * + * repeated string forward_attributes = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The count of forwardAttributes. + */ + public int getForwardAttributesCount() { + return forwardAttributes_.size(); + } + + /** + * + * + *
            +     * Optional. List of the Envoy attributes to forward to the extension server.
            +     * The attributes provided here are included as part of the
            +     * `ProcessingRequest.attributes` field (of type
            +     * `map<string, google.protobuf.Struct>`), where the keys are the attribute
            +     * names. Refer to the
            +     * [documentation](https://cloud.google.com/service-extensions/docs/cel-matcher-language-reference#attributes)
            +     * for the names of attributes that can be forwarded. If omitted, no
            +     * attributes are sent. Each element is a string indicating the
            +     * attribute name.
            +     * 
            + * + * repeated string forward_attributes = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the element to return. + * @return The forwardAttributes at the given index. + */ + public java.lang.String getForwardAttributes(int index) { + return forwardAttributes_.get(index); + } + + /** + * + * + *
            +     * Optional. List of the Envoy attributes to forward to the extension server.
            +     * The attributes provided here are included as part of the
            +     * `ProcessingRequest.attributes` field (of type
            +     * `map<string, google.protobuf.Struct>`), where the keys are the attribute
            +     * names. Refer to the
            +     * [documentation](https://cloud.google.com/service-extensions/docs/cel-matcher-language-reference#attributes)
            +     * for the names of attributes that can be forwarded. If omitted, no
            +     * attributes are sent. Each element is a string indicating the
            +     * attribute name.
            +     * 
            + * + * repeated string forward_attributes = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the value to return. + * @return The bytes of the forwardAttributes at the given index. + */ + public com.google.protobuf.ByteString getForwardAttributesBytes(int index) { + return forwardAttributes_.getByteString(index); + } + + /** + * + * + *
            +     * Optional. List of the Envoy attributes to forward to the extension server.
            +     * The attributes provided here are included as part of the
            +     * `ProcessingRequest.attributes` field (of type
            +     * `map<string, google.protobuf.Struct>`), where the keys are the attribute
            +     * names. Refer to the
            +     * [documentation](https://cloud.google.com/service-extensions/docs/cel-matcher-language-reference#attributes)
            +     * for the names of attributes that can be forwarded. If omitted, no
            +     * attributes are sent. Each element is a string indicating the
            +     * attribute name.
            +     * 
            + * + * repeated string forward_attributes = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index to set the value at. + * @param value The forwardAttributes to set. + * @return This builder for chaining. + */ + public Builder setForwardAttributes(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureForwardAttributesIsMutable(); + forwardAttributes_.set(index, value); + bitField0_ |= 0x00001000; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Optional. List of the Envoy attributes to forward to the extension server.
            +     * The attributes provided here are included as part of the
            +     * `ProcessingRequest.attributes` field (of type
            +     * `map<string, google.protobuf.Struct>`), where the keys are the attribute
            +     * names. Refer to the
            +     * [documentation](https://cloud.google.com/service-extensions/docs/cel-matcher-language-reference#attributes)
            +     * for the names of attributes that can be forwarded. If omitted, no
            +     * attributes are sent. Each element is a string indicating the
            +     * attribute name.
            +     * 
            + * + * repeated string forward_attributes = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The forwardAttributes to add. + * @return This builder for chaining. + */ + public Builder addForwardAttributes(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureForwardAttributesIsMutable(); + forwardAttributes_.add(value); + bitField0_ |= 0x00001000; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Optional. List of the Envoy attributes to forward to the extension server.
            +     * The attributes provided here are included as part of the
            +     * `ProcessingRequest.attributes` field (of type
            +     * `map<string, google.protobuf.Struct>`), where the keys are the attribute
            +     * names. Refer to the
            +     * [documentation](https://cloud.google.com/service-extensions/docs/cel-matcher-language-reference#attributes)
            +     * for the names of attributes that can be forwarded. If omitted, no
            +     * attributes are sent. Each element is a string indicating the
            +     * attribute name.
            +     * 
            + * + * repeated string forward_attributes = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param values The forwardAttributes to add. + * @return This builder for chaining. + */ + public Builder addAllForwardAttributes(java.lang.Iterable values) { + ensureForwardAttributesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, forwardAttributes_); + bitField0_ |= 0x00001000; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Optional. List of the Envoy attributes to forward to the extension server.
            +     * The attributes provided here are included as part of the
            +     * `ProcessingRequest.attributes` field (of type
            +     * `map<string, google.protobuf.Struct>`), where the keys are the attribute
            +     * names. Refer to the
            +     * [documentation](https://cloud.google.com/service-extensions/docs/cel-matcher-language-reference#attributes)
            +     * for the names of attributes that can be forwarded. If omitted, no
            +     * attributes are sent. Each element is a string indicating the
            +     * attribute name.
            +     * 
            + * + * repeated string forward_attributes = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearForwardAttributes() { + forwardAttributes_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00001000); + ; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Optional. List of the Envoy attributes to forward to the extension server.
            +     * The attributes provided here are included as part of the
            +     * `ProcessingRequest.attributes` field (of type
            +     * `map<string, google.protobuf.Struct>`), where the keys are the attribute
            +     * names. Refer to the
            +     * [documentation](https://cloud.google.com/service-extensions/docs/cel-matcher-language-reference#attributes)
            +     * for the names of attributes that can be forwarded. If omitted, no
            +     * attributes are sent. Each element is a string indicating the
            +     * attribute name.
            +     * 
            + * + * repeated string forward_attributes = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The bytes of the forwardAttributes to add. + * @return This builder for chaining. + */ + public Builder addForwardAttributesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureForwardAttributesIsMutable(); + forwardAttributes_.add(value); + bitField0_ |= 0x00001000; + onChanged(); + return this; + } + private int wireFormat_ = 0; /** @@ -3621,7 +4042,9 @@ public Builder addForwardHeadersBytes(com.google.protobuf.ByteString value) { * *
                  * Optional. The format of communication supported by the callout extension.
            -     * If not specified, the default value `EXT_PROC_GRPC` is used.
            +     * This field is supported only for regional `AuthzExtension` resources. If
            +     * not specified, the default value `EXT_PROC_GRPC` is used. Global
            +     * `AuthzExtension` resources use the `EXT_PROC_GRPC` wire format.
                  * 
            * * @@ -3640,7 +4063,9 @@ public int getWireFormatValue() { * *
                  * Optional. The format of communication supported by the callout extension.
            -     * If not specified, the default value `EXT_PROC_GRPC` is used.
            +     * This field is supported only for regional `AuthzExtension` resources. If
            +     * not specified, the default value `EXT_PROC_GRPC` is used. Global
            +     * `AuthzExtension` resources use the `EXT_PROC_GRPC` wire format.
                  * 
            * * @@ -3652,7 +4077,7 @@ public int getWireFormatValue() { */ public Builder setWireFormatValue(int value) { wireFormat_ = value; - bitField0_ |= 0x00001000; + bitField0_ |= 0x00002000; onChanged(); return this; } @@ -3662,7 +4087,9 @@ public Builder setWireFormatValue(int value) { * *
                  * Optional. The format of communication supported by the callout extension.
            -     * If not specified, the default value `EXT_PROC_GRPC` is used.
            +     * This field is supported only for regional `AuthzExtension` resources. If
            +     * not specified, the default value `EXT_PROC_GRPC` is used. Global
            +     * `AuthzExtension` resources use the `EXT_PROC_GRPC` wire format.
                  * 
            * * @@ -3683,7 +4110,9 @@ public com.google.cloud.networkservices.v1.WireFormat getWireFormat() { * *
                  * Optional. The format of communication supported by the callout extension.
            -     * If not specified, the default value `EXT_PROC_GRPC` is used.
            +     * This field is supported only for regional `AuthzExtension` resources. If
            +     * not specified, the default value `EXT_PROC_GRPC` is used. Global
            +     * `AuthzExtension` resources use the `EXT_PROC_GRPC` wire format.
                  * 
            * * @@ -3697,7 +4126,7 @@ public Builder setWireFormat(com.google.cloud.networkservices.v1.WireFormat valu if (value == null) { throw new NullPointerException(); } - bitField0_ |= 0x00001000; + bitField0_ |= 0x00002000; wireFormat_ = value.getNumber(); onChanged(); return this; @@ -3708,7 +4137,9 @@ public Builder setWireFormat(com.google.cloud.networkservices.v1.WireFormat valu * *
                  * Optional. The format of communication supported by the callout extension.
            -     * If not specified, the default value `EXT_PROC_GRPC` is used.
            +     * This field is supported only for regional `AuthzExtension` resources. If
            +     * not specified, the default value `EXT_PROC_GRPC` is used. Global
            +     * `AuthzExtension` resources use the `EXT_PROC_GRPC` wire format.
                  * 
            * * @@ -3718,7 +4149,7 @@ public Builder setWireFormat(com.google.cloud.networkservices.v1.WireFormat valu * @return This builder for chaining. */ public Builder clearWireFormat() { - bitField0_ = (bitField0_ & ~0x00001000); + bitField0_ = (bitField0_ & ~0x00002000); wireFormat_ = 0; onChanged(); return this; diff --git a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/AuthzExtensionOrBuilder.java b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/AuthzExtensionOrBuilder.java index 6b7413d66b09..16c4490a8077 100644 --- a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/AuthzExtensionOrBuilder.java +++ b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/AuthzExtensionOrBuilder.java @@ -258,15 +258,16 @@ java.lang.String getLabelsOrDefault( * * *
            -   * Required. All backend services and forwarding rules referenced by this
            +   * Optional. All backend services and forwarding rules referenced by this
                * extension must share the same load balancing scheme. Supported values:
            -   * `INTERNAL_MANAGED`, `EXTERNAL_MANAGED`. For more information, refer to
            +   * `INTERNAL_MANAGED`, `EXTERNAL_MANAGED`. Can be omitted for AuthzExtensions
            +   * that do not reference a backend service. For more information, refer to
                * [Backend services
                * overview](https://cloud.google.com/load-balancing/docs/backend-service).
                * 
            * * - * .google.cloud.networkservices.v1.LoadBalancingScheme load_balancing_scheme = 6 [(.google.api.field_behavior) = REQUIRED]; + * .google.cloud.networkservices.v1.LoadBalancingScheme load_balancing_scheme = 6 [(.google.api.field_behavior) = OPTIONAL]; * * * @return The enum numeric value on the wire for loadBalancingScheme. @@ -277,15 +278,16 @@ java.lang.String getLabelsOrDefault( * * *
            -   * Required. All backend services and forwarding rules referenced by this
            +   * Optional. All backend services and forwarding rules referenced by this
                * extension must share the same load balancing scheme. Supported values:
            -   * `INTERNAL_MANAGED`, `EXTERNAL_MANAGED`. For more information, refer to
            +   * `INTERNAL_MANAGED`, `EXTERNAL_MANAGED`. Can be omitted for AuthzExtensions
            +   * that do not reference a backend service. For more information, refer to
                * [Backend services
                * overview](https://cloud.google.com/load-balancing/docs/backend-service).
                * 
            * * - * .google.cloud.networkservices.v1.LoadBalancingScheme load_balancing_scheme = 6 [(.google.api.field_behavior) = REQUIRED]; + * .google.cloud.networkservices.v1.LoadBalancingScheme load_balancing_scheme = 6 [(.google.api.field_behavior) = OPTIONAL]; * * * @return The loadBalancingScheme. @@ -296,11 +298,12 @@ java.lang.String getLabelsOrDefault( * * *
            -   * Required. The `:authority` header in the gRPC request sent from Envoy
            -   * to the extension service.
            +   * Optional. The `:authority` header in the gRPC request sent from Envoy to
            +   * the extension service. It is required when the `service` field points to a
            +   * backend service or a wasm plugin.
                * 
            * - * string authority = 7 [(.google.api.field_behavior) = REQUIRED]; + * string authority = 7 [(.google.api.field_behavior) = OPTIONAL]; * * @return The authority. */ @@ -310,11 +313,12 @@ java.lang.String getLabelsOrDefault( * * *
            -   * Required. The `:authority` header in the gRPC request sent from Envoy
            -   * to the extension service.
            +   * Optional. The `:authority` header in the gRPC request sent from Envoy to
            +   * the extension service. It is required when the `service` field points to a
            +   * backend service or a wasm plugin.
                * 
            * - * string authority = 7 [(.google.api.field_behavior) = REQUIRED]; + * string authority = 7 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for authority. */ @@ -553,12 +557,100 @@ java.lang.String getLabelsOrDefault( */ com.google.protobuf.ByteString getForwardHeadersBytes(int index); + /** + * + * + *
            +   * Optional. List of the Envoy attributes to forward to the extension server.
            +   * The attributes provided here are included as part of the
            +   * `ProcessingRequest.attributes` field (of type
            +   * `map<string, google.protobuf.Struct>`), where the keys are the attribute
            +   * names. Refer to the
            +   * [documentation](https://cloud.google.com/service-extensions/docs/cel-matcher-language-reference#attributes)
            +   * for the names of attributes that can be forwarded. If omitted, no
            +   * attributes are sent. Each element is a string indicating the
            +   * attribute name.
            +   * 
            + * + * repeated string forward_attributes = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the forwardAttributes. + */ + java.util.List getForwardAttributesList(); + + /** + * + * + *
            +   * Optional. List of the Envoy attributes to forward to the extension server.
            +   * The attributes provided here are included as part of the
            +   * `ProcessingRequest.attributes` field (of type
            +   * `map<string, google.protobuf.Struct>`), where the keys are the attribute
            +   * names. Refer to the
            +   * [documentation](https://cloud.google.com/service-extensions/docs/cel-matcher-language-reference#attributes)
            +   * for the names of attributes that can be forwarded. If omitted, no
            +   * attributes are sent. Each element is a string indicating the
            +   * attribute name.
            +   * 
            + * + * repeated string forward_attributes = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of forwardAttributes. + */ + int getForwardAttributesCount(); + + /** + * + * + *
            +   * Optional. List of the Envoy attributes to forward to the extension server.
            +   * The attributes provided here are included as part of the
            +   * `ProcessingRequest.attributes` field (of type
            +   * `map<string, google.protobuf.Struct>`), where the keys are the attribute
            +   * names. Refer to the
            +   * [documentation](https://cloud.google.com/service-extensions/docs/cel-matcher-language-reference#attributes)
            +   * for the names of attributes that can be forwarded. If omitted, no
            +   * attributes are sent. Each element is a string indicating the
            +   * attribute name.
            +   * 
            + * + * repeated string forward_attributes = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The forwardAttributes at the given index. + */ + java.lang.String getForwardAttributes(int index); + + /** + * + * + *
            +   * Optional. List of the Envoy attributes to forward to the extension server.
            +   * The attributes provided here are included as part of the
            +   * `ProcessingRequest.attributes` field (of type
            +   * `map<string, google.protobuf.Struct>`), where the keys are the attribute
            +   * names. Refer to the
            +   * [documentation](https://cloud.google.com/service-extensions/docs/cel-matcher-language-reference#attributes)
            +   * for the names of attributes that can be forwarded. If omitted, no
            +   * attributes are sent. Each element is a string indicating the
            +   * attribute name.
            +   * 
            + * + * repeated string forward_attributes = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the forwardAttributes at the given index. + */ + com.google.protobuf.ByteString getForwardAttributesBytes(int index); + /** * * *
                * Optional. The format of communication supported by the callout extension.
            -   * If not specified, the default value `EXT_PROC_GRPC` is used.
            +   * This field is supported only for regional `AuthzExtension` resources. If
            +   * not specified, the default value `EXT_PROC_GRPC` is used. Global
            +   * `AuthzExtension` resources use the `EXT_PROC_GRPC` wire format.
                * 
            * * @@ -574,7 +666,9 @@ java.lang.String getLabelsOrDefault( * *
                * Optional. The format of communication supported by the callout extension.
            -   * If not specified, the default value `EXT_PROC_GRPC` is used.
            +   * This field is supported only for regional `AuthzExtension` resources. If
            +   * not specified, the default value `EXT_PROC_GRPC` is used. Global
            +   * `AuthzExtension` resources use the `EXT_PROC_GRPC` wire format.
                * 
            * * diff --git a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/BodySendMode.java b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/BodySendMode.java new file mode 100644 index 000000000000..2921e568825d --- /dev/null +++ b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/BodySendMode.java @@ -0,0 +1,215 @@ +/* + * 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/cloud/networkservices/v1/dep.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkservices.v1; + +/** + * + * + *
            + * The send mode for body processing.
            + * 
            + * + * Protobuf enum {@code google.cloud.networkservices.v1.BodySendMode} + */ +@com.google.protobuf.Generated +public enum BodySendMode implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
            +   * Default value. Do not use.
            +   * 
            + * + * BODY_SEND_MODE_UNSPECIFIED = 0; + */ + BODY_SEND_MODE_UNSPECIFIED(0), + /** + * + * + *
            +   * Calls to the extension are executed in the streamed mode. Subsequent
            +   * chunks will be sent only after the previous chunks have been processed.
            +   *
            +   * The content of the body chunks is sent one way to the extension. Extension
            +   * may send modified chunks back.
            +   *
            +   * This is the default value if the processing mode is not specified.
            +   * 
            + * + * BODY_SEND_MODE_STREAMED = 1; + */ + BODY_SEND_MODE_STREAMED(1), + /** + * + * + *
            +   * Calls are executed in the full duplex mode. Subsequent chunks will be sent
            +   * for processing without waiting for the response for the previous chunk or
            +   * for the response for `REQUEST_HEADERS` event.
            +   *
            +   * Extension can freely modify or chunk the body contents. If the extension
            +   * doesn't send the body contents back, the next extension in the chain or the
            +   * upstream will receive an empty body.
            +   * 
            + * + * BODY_SEND_MODE_FULL_DUPLEX_STREAMED = 2; + */ + BODY_SEND_MODE_FULL_DUPLEX_STREAMED(2), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "BodySendMode"); + } + + /** + * + * + *
            +   * Default value. Do not use.
            +   * 
            + * + * BODY_SEND_MODE_UNSPECIFIED = 0; + */ + public static final int BODY_SEND_MODE_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
            +   * Calls to the extension are executed in the streamed mode. Subsequent
            +   * chunks will be sent only after the previous chunks have been processed.
            +   *
            +   * The content of the body chunks is sent one way to the extension. Extension
            +   * may send modified chunks back.
            +   *
            +   * This is the default value if the processing mode is not specified.
            +   * 
            + * + * BODY_SEND_MODE_STREAMED = 1; + */ + public static final int BODY_SEND_MODE_STREAMED_VALUE = 1; + + /** + * + * + *
            +   * Calls are executed in the full duplex mode. Subsequent chunks will be sent
            +   * for processing without waiting for the response for the previous chunk or
            +   * for the response for `REQUEST_HEADERS` event.
            +   *
            +   * Extension can freely modify or chunk the body contents. If the extension
            +   * doesn't send the body contents back, the next extension in the chain or the
            +   * upstream will receive an empty body.
            +   * 
            + * + * BODY_SEND_MODE_FULL_DUPLEX_STREAMED = 2; + */ + public static final int BODY_SEND_MODE_FULL_DUPLEX_STREAMED_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 BodySendMode 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 BodySendMode forNumber(int value) { + switch (value) { + case 0: + return BODY_SEND_MODE_UNSPECIFIED; + case 1: + return BODY_SEND_MODE_STREAMED; + case 2: + return BODY_SEND_MODE_FULL_DUPLEX_STREAMED; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public BodySendMode findValueByNumber(int number) { + return BodySendMode.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.networkservices.v1.DepProto.getDescriptor().getEnumTypes().get(3); + } + + private static final BodySendMode[] VALUES = values(); + + public static BodySendMode valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private BodySendMode(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.networkservices.v1.BodySendMode) +} diff --git a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/CreateAgentGatewayRequest.java b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/CreateAgentGatewayRequest.java new file mode 100644 index 000000000000..5a3ceb18fb3e --- /dev/null +++ b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/CreateAgentGatewayRequest.java @@ -0,0 +1,1130 @@ +/* + * 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/cloud/networkservices/v1/agent_gateway.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkservices.v1; + +/** + * + * + *
            + * Request used by the CreateAgentGateway method.
            + * 
            + * + * Protobuf type {@code google.cloud.networkservices.v1.CreateAgentGatewayRequest} + */ +@com.google.protobuf.Generated +public final class CreateAgentGatewayRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkservices.v1.CreateAgentGatewayRequest) + CreateAgentGatewayRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "CreateAgentGatewayRequest"); + } + + // Use CreateAgentGatewayRequest.newBuilder() to construct. + private CreateAgentGatewayRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private CreateAgentGatewayRequest() { + parent_ = ""; + agentGatewayId_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkservices.v1.AgentGatewayProto + .internal_static_google_cloud_networkservices_v1_CreateAgentGatewayRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkservices.v1.AgentGatewayProto + .internal_static_google_cloud_networkservices_v1_CreateAgentGatewayRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkservices.v1.CreateAgentGatewayRequest.class, + com.google.cloud.networkservices.v1.CreateAgentGatewayRequest.Builder.class); + } + + private int bitField0_; + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + + /** + * + * + *
            +   * Required. The parent resource of the AgentGateway. Must be in the
            +   * format `projects/*/locations/*`.
            +   * 
            + * + * + * 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 parent resource of the AgentGateway. Must be in the
            +   * format `projects/*/locations/*`.
            +   * 
            + * + * + * 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 AGENT_GATEWAY_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object agentGatewayId_ = ""; + + /** + * + * + *
            +   * Required. Short name of the AgentGateway resource to be created.
            +   * 
            + * + * string agent_gateway_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The agentGatewayId. + */ + @java.lang.Override + public java.lang.String getAgentGatewayId() { + java.lang.Object ref = agentGatewayId_; + 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(); + agentGatewayId_ = s; + return s; + } + } + + /** + * + * + *
            +   * Required. Short name of the AgentGateway resource to be created.
            +   * 
            + * + * string agent_gateway_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for agentGatewayId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getAgentGatewayIdBytes() { + java.lang.Object ref = agentGatewayId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + agentGatewayId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int AGENT_GATEWAY_FIELD_NUMBER = 3; + private com.google.cloud.networkservices.v1.AgentGateway agentGateway_; + + /** + * + * + *
            +   * Required. AgentGateway resource to be created.
            +   * 
            + * + * + * .google.cloud.networkservices.v1.AgentGateway agent_gateway = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the agentGateway field is set. + */ + @java.lang.Override + public boolean hasAgentGateway() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
            +   * Required. AgentGateway resource to be created.
            +   * 
            + * + * + * .google.cloud.networkservices.v1.AgentGateway agent_gateway = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The agentGateway. + */ + @java.lang.Override + public com.google.cloud.networkservices.v1.AgentGateway getAgentGateway() { + return agentGateway_ == null + ? com.google.cloud.networkservices.v1.AgentGateway.getDefaultInstance() + : agentGateway_; + } + + /** + * + * + *
            +   * Required. AgentGateway resource to be created.
            +   * 
            + * + * + * .google.cloud.networkservices.v1.AgentGateway agent_gateway = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.networkservices.v1.AgentGatewayOrBuilder getAgentGatewayOrBuilder() { + return agentGateway_ == null + ? com.google.cloud.networkservices.v1.AgentGateway.getDefaultInstance() + : agentGateway_; + } + + 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(agentGatewayId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, agentGatewayId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(3, getAgentGateway()); + } + 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(agentGatewayId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, agentGatewayId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getAgentGateway()); + } + 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.networkservices.v1.CreateAgentGatewayRequest)) { + return super.equals(obj); + } + com.google.cloud.networkservices.v1.CreateAgentGatewayRequest other = + (com.google.cloud.networkservices.v1.CreateAgentGatewayRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (!getAgentGatewayId().equals(other.getAgentGatewayId())) return false; + if (hasAgentGateway() != other.hasAgentGateway()) return false; + if (hasAgentGateway()) { + if (!getAgentGateway().equals(other.getAgentGateway())) 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) + AGENT_GATEWAY_ID_FIELD_NUMBER; + hash = (53 * hash) + getAgentGatewayId().hashCode(); + if (hasAgentGateway()) { + hash = (37 * hash) + AGENT_GATEWAY_FIELD_NUMBER; + hash = (53 * hash) + getAgentGateway().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.networkservices.v1.CreateAgentGatewayRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkservices.v1.CreateAgentGatewayRequest 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.networkservices.v1.CreateAgentGatewayRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkservices.v1.CreateAgentGatewayRequest 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.networkservices.v1.CreateAgentGatewayRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkservices.v1.CreateAgentGatewayRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkservices.v1.CreateAgentGatewayRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkservices.v1.CreateAgentGatewayRequest 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.networkservices.v1.CreateAgentGatewayRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkservices.v1.CreateAgentGatewayRequest 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.networkservices.v1.CreateAgentGatewayRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkservices.v1.CreateAgentGatewayRequest 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.networkservices.v1.CreateAgentGatewayRequest 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 used by the CreateAgentGateway method.
            +   * 
            + * + * Protobuf type {@code google.cloud.networkservices.v1.CreateAgentGatewayRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkservices.v1.CreateAgentGatewayRequest) + com.google.cloud.networkservices.v1.CreateAgentGatewayRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkservices.v1.AgentGatewayProto + .internal_static_google_cloud_networkservices_v1_CreateAgentGatewayRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkservices.v1.AgentGatewayProto + .internal_static_google_cloud_networkservices_v1_CreateAgentGatewayRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkservices.v1.CreateAgentGatewayRequest.class, + com.google.cloud.networkservices.v1.CreateAgentGatewayRequest.Builder.class); + } + + // Construct using com.google.cloud.networkservices.v1.CreateAgentGatewayRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetAgentGatewayFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + agentGatewayId_ = ""; + agentGateway_ = null; + if (agentGatewayBuilder_ != null) { + agentGatewayBuilder_.dispose(); + agentGatewayBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkservices.v1.AgentGatewayProto + .internal_static_google_cloud_networkservices_v1_CreateAgentGatewayRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkservices.v1.CreateAgentGatewayRequest + getDefaultInstanceForType() { + return com.google.cloud.networkservices.v1.CreateAgentGatewayRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkservices.v1.CreateAgentGatewayRequest build() { + com.google.cloud.networkservices.v1.CreateAgentGatewayRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkservices.v1.CreateAgentGatewayRequest buildPartial() { + com.google.cloud.networkservices.v1.CreateAgentGatewayRequest result = + new com.google.cloud.networkservices.v1.CreateAgentGatewayRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.networkservices.v1.CreateAgentGatewayRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.agentGatewayId_ = agentGatewayId_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.agentGateway_ = + agentGatewayBuilder_ == null ? agentGateway_ : agentGatewayBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.networkservices.v1.CreateAgentGatewayRequest) { + return mergeFrom((com.google.cloud.networkservices.v1.CreateAgentGatewayRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.networkservices.v1.CreateAgentGatewayRequest other) { + if (other + == com.google.cloud.networkservices.v1.CreateAgentGatewayRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getAgentGatewayId().isEmpty()) { + agentGatewayId_ = other.agentGatewayId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasAgentGateway()) { + mergeAgentGateway(other.getAgentGateway()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + agentGatewayId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage( + internalGetAgentGatewayFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + + /** + * + * + *
            +     * Required. The parent resource of the AgentGateway. Must be in the
            +     * format `projects/*/locations/*`.
            +     * 
            + * + * + * 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 parent resource of the AgentGateway. Must be in the
            +     * format `projects/*/locations/*`.
            +     * 
            + * + * + * 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 parent resource of the AgentGateway. Must be in the
            +     * format `projects/*/locations/*`.
            +     * 
            + * + * + * 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 parent resource of the AgentGateway. Must be in the
            +     * format `projects/*/locations/*`.
            +     * 
            + * + * + * 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 parent resource of the AgentGateway. Must be in the
            +     * format `projects/*/locations/*`.
            +     * 
            + * + * + * 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 agentGatewayId_ = ""; + + /** + * + * + *
            +     * Required. Short name of the AgentGateway resource to be created.
            +     * 
            + * + * string agent_gateway_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The agentGatewayId. + */ + public java.lang.String getAgentGatewayId() { + java.lang.Object ref = agentGatewayId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + agentGatewayId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
            +     * Required. Short name of the AgentGateway resource to be created.
            +     * 
            + * + * string agent_gateway_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for agentGatewayId. + */ + public com.google.protobuf.ByteString getAgentGatewayIdBytes() { + java.lang.Object ref = agentGatewayId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + agentGatewayId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
            +     * Required. Short name of the AgentGateway resource to be created.
            +     * 
            + * + * string agent_gateway_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The agentGatewayId to set. + * @return This builder for chaining. + */ + public Builder setAgentGatewayId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + agentGatewayId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Required. Short name of the AgentGateway resource to be created.
            +     * 
            + * + * string agent_gateway_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearAgentGatewayId() { + agentGatewayId_ = getDefaultInstance().getAgentGatewayId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
            +     * Required. Short name of the AgentGateway resource to be created.
            +     * 
            + * + * string agent_gateway_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for agentGatewayId to set. + * @return This builder for chaining. + */ + public Builder setAgentGatewayIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + agentGatewayId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.cloud.networkservices.v1.AgentGateway agentGateway_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.networkservices.v1.AgentGateway, + com.google.cloud.networkservices.v1.AgentGateway.Builder, + com.google.cloud.networkservices.v1.AgentGatewayOrBuilder> + agentGatewayBuilder_; + + /** + * + * + *
            +     * Required. AgentGateway resource to be created.
            +     * 
            + * + * + * .google.cloud.networkservices.v1.AgentGateway agent_gateway = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the agentGateway field is set. + */ + public boolean hasAgentGateway() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
            +     * Required. AgentGateway resource to be created.
            +     * 
            + * + * + * .google.cloud.networkservices.v1.AgentGateway agent_gateway = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The agentGateway. + */ + public com.google.cloud.networkservices.v1.AgentGateway getAgentGateway() { + if (agentGatewayBuilder_ == null) { + return agentGateway_ == null + ? com.google.cloud.networkservices.v1.AgentGateway.getDefaultInstance() + : agentGateway_; + } else { + return agentGatewayBuilder_.getMessage(); + } + } + + /** + * + * + *
            +     * Required. AgentGateway resource to be created.
            +     * 
            + * + * + * .google.cloud.networkservices.v1.AgentGateway agent_gateway = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setAgentGateway(com.google.cloud.networkservices.v1.AgentGateway value) { + if (agentGatewayBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + agentGateway_ = value; + } else { + agentGatewayBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Required. AgentGateway resource to be created.
            +     * 
            + * + * + * .google.cloud.networkservices.v1.AgentGateway agent_gateway = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setAgentGateway( + com.google.cloud.networkservices.v1.AgentGateway.Builder builderForValue) { + if (agentGatewayBuilder_ == null) { + agentGateway_ = builderForValue.build(); + } else { + agentGatewayBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Required. AgentGateway resource to be created.
            +     * 
            + * + * + * .google.cloud.networkservices.v1.AgentGateway agent_gateway = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeAgentGateway(com.google.cloud.networkservices.v1.AgentGateway value) { + if (agentGatewayBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && agentGateway_ != null + && agentGateway_ + != com.google.cloud.networkservices.v1.AgentGateway.getDefaultInstance()) { + getAgentGatewayBuilder().mergeFrom(value); + } else { + agentGateway_ = value; + } + } else { + agentGatewayBuilder_.mergeFrom(value); + } + if (agentGateway_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + + /** + * + * + *
            +     * Required. AgentGateway resource to be created.
            +     * 
            + * + * + * .google.cloud.networkservices.v1.AgentGateway agent_gateway = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearAgentGateway() { + bitField0_ = (bitField0_ & ~0x00000004); + agentGateway_ = null; + if (agentGatewayBuilder_ != null) { + agentGatewayBuilder_.dispose(); + agentGatewayBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
            +     * Required. AgentGateway resource to be created.
            +     * 
            + * + * + * .google.cloud.networkservices.v1.AgentGateway agent_gateway = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.networkservices.v1.AgentGateway.Builder getAgentGatewayBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return internalGetAgentGatewayFieldBuilder().getBuilder(); + } + + /** + * + * + *
            +     * Required. AgentGateway resource to be created.
            +     * 
            + * + * + * .google.cloud.networkservices.v1.AgentGateway agent_gateway = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.networkservices.v1.AgentGatewayOrBuilder getAgentGatewayOrBuilder() { + if (agentGatewayBuilder_ != null) { + return agentGatewayBuilder_.getMessageOrBuilder(); + } else { + return agentGateway_ == null + ? com.google.cloud.networkservices.v1.AgentGateway.getDefaultInstance() + : agentGateway_; + } + } + + /** + * + * + *
            +     * Required. AgentGateway resource to be created.
            +     * 
            + * + * + * .google.cloud.networkservices.v1.AgentGateway agent_gateway = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.networkservices.v1.AgentGateway, + com.google.cloud.networkservices.v1.AgentGateway.Builder, + com.google.cloud.networkservices.v1.AgentGatewayOrBuilder> + internalGetAgentGatewayFieldBuilder() { + if (agentGatewayBuilder_ == null) { + agentGatewayBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.networkservices.v1.AgentGateway, + com.google.cloud.networkservices.v1.AgentGateway.Builder, + com.google.cloud.networkservices.v1.AgentGatewayOrBuilder>( + getAgentGateway(), getParentForChildren(), isClean()); + agentGateway_ = null; + } + return agentGatewayBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.networkservices.v1.CreateAgentGatewayRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkservices.v1.CreateAgentGatewayRequest) + private static final com.google.cloud.networkservices.v1.CreateAgentGatewayRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.networkservices.v1.CreateAgentGatewayRequest(); + } + + public static com.google.cloud.networkservices.v1.CreateAgentGatewayRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateAgentGatewayRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.networkservices.v1.CreateAgentGatewayRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/CreateAgentGatewayRequestOrBuilder.java b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/CreateAgentGatewayRequestOrBuilder.java new file mode 100644 index 000000000000..ec01574b1645 --- /dev/null +++ b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/CreateAgentGatewayRequestOrBuilder.java @@ -0,0 +1,129 @@ +/* + * 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/cloud/networkservices/v1/agent_gateway.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkservices.v1; + +@com.google.protobuf.Generated +public interface CreateAgentGatewayRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkservices.v1.CreateAgentGatewayRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
            +   * Required. The parent resource of the AgentGateway. Must be in the
            +   * format `projects/*/locations/*`.
            +   * 
            + * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + + /** + * + * + *
            +   * Required. The parent resource of the AgentGateway. Must be in the
            +   * format `projects/*/locations/*`.
            +   * 
            + * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
            +   * Required. Short name of the AgentGateway resource to be created.
            +   * 
            + * + * string agent_gateway_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The agentGatewayId. + */ + java.lang.String getAgentGatewayId(); + + /** + * + * + *
            +   * Required. Short name of the AgentGateway resource to be created.
            +   * 
            + * + * string agent_gateway_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for agentGatewayId. + */ + com.google.protobuf.ByteString getAgentGatewayIdBytes(); + + /** + * + * + *
            +   * Required. AgentGateway resource to be created.
            +   * 
            + * + * + * .google.cloud.networkservices.v1.AgentGateway agent_gateway = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the agentGateway field is set. + */ + boolean hasAgentGateway(); + + /** + * + * + *
            +   * Required. AgentGateway resource to be created.
            +   * 
            + * + * + * .google.cloud.networkservices.v1.AgentGateway agent_gateway = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The agentGateway. + */ + com.google.cloud.networkservices.v1.AgentGateway getAgentGateway(); + + /** + * + * + *
            +   * Required. AgentGateway resource to be created.
            +   * 
            + * + * + * .google.cloud.networkservices.v1.AgentGateway agent_gateway = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.networkservices.v1.AgentGatewayOrBuilder getAgentGatewayOrBuilder(); +} diff --git a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/CreateEndpointPolicyRequest.java b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/CreateEndpointPolicyRequest.java index 31866f62b8aa..31a13b3604c7 100644 --- a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/CreateEndpointPolicyRequest.java +++ b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/CreateEndpointPolicyRequest.java @@ -82,7 +82,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * *
                * Required. The parent resource of the EndpointPolicy. Must be in the
            -   * format `projects/*/locations/global`.
            +   * format `projects/*/locations/*`.
                * 
            * * @@ -109,7 +109,7 @@ public java.lang.String getParent() { * *
                * Required. The parent resource of the EndpointPolicy. Must be in the
            -   * format `projects/*/locations/global`.
            +   * format `projects/*/locations/*`.
                * 
            * * @@ -636,7 +636,7 @@ public Builder mergeFrom( * *
                  * Required. The parent resource of the EndpointPolicy. Must be in the
            -     * format `projects/*/locations/global`.
            +     * format `projects/*/locations/*`.
                  * 
            * * @@ -662,7 +662,7 @@ public java.lang.String getParent() { * *
                  * Required. The parent resource of the EndpointPolicy. Must be in the
            -     * format `projects/*/locations/global`.
            +     * format `projects/*/locations/*`.
                  * 
            * * @@ -688,7 +688,7 @@ public com.google.protobuf.ByteString getParentBytes() { * *
                  * Required. The parent resource of the EndpointPolicy. Must be in the
            -     * format `projects/*/locations/global`.
            +     * format `projects/*/locations/*`.
                  * 
            * * @@ -713,7 +713,7 @@ public Builder setParent(java.lang.String value) { * *
                  * Required. The parent resource of the EndpointPolicy. Must be in the
            -     * format `projects/*/locations/global`.
            +     * format `projects/*/locations/*`.
                  * 
            * * @@ -734,7 +734,7 @@ public Builder clearParent() { * *
                  * Required. The parent resource of the EndpointPolicy. Must be in the
            -     * format `projects/*/locations/global`.
            +     * format `projects/*/locations/*`.
                  * 
            * * diff --git a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/CreateEndpointPolicyRequestOrBuilder.java b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/CreateEndpointPolicyRequestOrBuilder.java index c31930f424ac..8395f98e0f2c 100644 --- a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/CreateEndpointPolicyRequestOrBuilder.java +++ b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/CreateEndpointPolicyRequestOrBuilder.java @@ -31,7 +31,7 @@ public interface CreateEndpointPolicyRequestOrBuilder * *
                * Required. The parent resource of the EndpointPolicy. Must be in the
            -   * format `projects/*/locations/global`.
            +   * format `projects/*/locations/*`.
                * 
            * * @@ -47,7 +47,7 @@ public interface CreateEndpointPolicyRequestOrBuilder * *
                * Required. The parent resource of the EndpointPolicy. Must be in the
            -   * format `projects/*/locations/global`.
            +   * format `projects/*/locations/*`.
                * 
            * * diff --git a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/CreateGrpcRouteRequest.java b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/CreateGrpcRouteRequest.java index a41d42ccb494..ced95f41e54a 100644 --- a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/CreateGrpcRouteRequest.java +++ b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/CreateGrpcRouteRequest.java @@ -82,7 +82,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * *
                * Required. The parent resource of the GrpcRoute. Must be in the
            -   * format `projects/*/locations/global`.
            +   * format `projects/*/locations/*`.
                * 
            * * @@ -109,7 +109,7 @@ public java.lang.String getParent() { * *
                * Required. The parent resource of the GrpcRoute. Must be in the
            -   * format `projects/*/locations/global`.
            +   * format `projects/*/locations/*`.
                * 
            * * @@ -629,7 +629,7 @@ public Builder mergeFrom( * *
                  * Required. The parent resource of the GrpcRoute. Must be in the
            -     * format `projects/*/locations/global`.
            +     * format `projects/*/locations/*`.
                  * 
            * * @@ -655,7 +655,7 @@ public java.lang.String getParent() { * *
                  * Required. The parent resource of the GrpcRoute. Must be in the
            -     * format `projects/*/locations/global`.
            +     * format `projects/*/locations/*`.
                  * 
            * * @@ -681,7 +681,7 @@ public com.google.protobuf.ByteString getParentBytes() { * *
                  * Required. The parent resource of the GrpcRoute. Must be in the
            -     * format `projects/*/locations/global`.
            +     * format `projects/*/locations/*`.
                  * 
            * * @@ -706,7 +706,7 @@ public Builder setParent(java.lang.String value) { * *
                  * Required. The parent resource of the GrpcRoute. Must be in the
            -     * format `projects/*/locations/global`.
            +     * format `projects/*/locations/*`.
                  * 
            * * @@ -727,7 +727,7 @@ public Builder clearParent() { * *
                  * Required. The parent resource of the GrpcRoute. Must be in the
            -     * format `projects/*/locations/global`.
            +     * format `projects/*/locations/*`.
                  * 
            * * diff --git a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/CreateGrpcRouteRequestOrBuilder.java b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/CreateGrpcRouteRequestOrBuilder.java index 31a68a34d41f..0118d7a31eff 100644 --- a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/CreateGrpcRouteRequestOrBuilder.java +++ b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/CreateGrpcRouteRequestOrBuilder.java @@ -31,7 +31,7 @@ public interface CreateGrpcRouteRequestOrBuilder * *
                * Required. The parent resource of the GrpcRoute. Must be in the
            -   * format `projects/*/locations/global`.
            +   * format `projects/*/locations/*`.
                * 
            * * @@ -47,7 +47,7 @@ public interface CreateGrpcRouteRequestOrBuilder * *
                * Required. The parent resource of the GrpcRoute. Must be in the
            -   * format `projects/*/locations/global`.
            +   * format `projects/*/locations/*`.
                * 
            * * diff --git a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/CreateHttpRouteRequest.java b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/CreateHttpRouteRequest.java index 3f0187fc1ba2..02b8a27e019d 100644 --- a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/CreateHttpRouteRequest.java +++ b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/CreateHttpRouteRequest.java @@ -54,6 +54,7 @@ private CreateHttpRouteRequest(com.google.protobuf.GeneratedMessage.Builder b private CreateHttpRouteRequest() { parent_ = ""; httpRouteId_ = ""; + requestId_ = ""; } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @@ -82,7 +83,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * *
                * Required. The parent resource of the HttpRoute. Must be in the
            -   * format `projects/*/locations/global`.
            +   * format `projects/*/locations/*`.
                * 
            * * @@ -109,7 +110,7 @@ public java.lang.String getParent() { * *
                * Required. The parent resource of the HttpRoute. Must be in the
            -   * format `projects/*/locations/global`.
            +   * format `projects/*/locations/*`.
                * 
            * * @@ -243,6 +244,63 @@ public com.google.cloud.networkservices.v1.HttpRouteOrBuilder getHttpRouteOrBuil : httpRoute_; } + public static final int REQUEST_ID_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object requestId_ = ""; + + /** + * + * + *
            +   * Optional. Idempotent request UUID.
            +   * 
            + * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + 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(); + requestId_ = s; + return s; + } + } + + /** + * + * + *
            +   * Optional. Idempotent request UUID.
            +   * 
            + * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -266,6 +324,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(3, getHttpRoute()); } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(requestId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, requestId_); + } getUnknownFields().writeTo(output); } @@ -284,6 +345,9 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getHttpRoute()); } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(requestId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, requestId_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -306,6 +370,7 @@ public boolean equals(final java.lang.Object obj) { if (hasHttpRoute()) { if (!getHttpRoute().equals(other.getHttpRoute())) return false; } + if (!getRequestId().equals(other.getRequestId())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -325,6 +390,8 @@ public int hashCode() { hash = (37 * hash) + HTTP_ROUTE_FIELD_NUMBER; hash = (53 * hash) + getHttpRoute().hashCode(); } + hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -482,6 +549,7 @@ public Builder clear() { httpRouteBuilder_.dispose(); httpRouteBuilder_ = null; } + requestId_ = ""; return this; } @@ -529,6 +597,9 @@ private void buildPartial0(com.google.cloud.networkservices.v1.CreateHttpRouteRe result.httpRoute_ = httpRouteBuilder_ == null ? httpRoute_ : httpRouteBuilder_.build(); to_bitField0_ |= 0x00000001; } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.requestId_ = requestId_; + } result.bitField0_ |= to_bitField0_; } @@ -558,6 +629,11 @@ public Builder mergeFrom(com.google.cloud.networkservices.v1.CreateHttpRouteRequ if (other.hasHttpRoute()) { mergeHttpRoute(other.getHttpRoute()); } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + bitField0_ |= 0x00000008; + onChanged(); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -603,6 +679,12 @@ public Builder mergeFrom( bitField0_ |= 0x00000004; break; } // case 26 + case 34: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -629,7 +711,7 @@ public Builder mergeFrom( * *
                  * Required. The parent resource of the HttpRoute. Must be in the
            -     * format `projects/*/locations/global`.
            +     * format `projects/*/locations/*`.
                  * 
            * * @@ -655,7 +737,7 @@ public java.lang.String getParent() { * *
                  * Required. The parent resource of the HttpRoute. Must be in the
            -     * format `projects/*/locations/global`.
            +     * format `projects/*/locations/*`.
                  * 
            * * @@ -681,7 +763,7 @@ public com.google.protobuf.ByteString getParentBytes() { * *
                  * Required. The parent resource of the HttpRoute. Must be in the
            -     * format `projects/*/locations/global`.
            +     * format `projects/*/locations/*`.
                  * 
            * * @@ -706,7 +788,7 @@ public Builder setParent(java.lang.String value) { * *
                  * Required. The parent resource of the HttpRoute. Must be in the
            -     * format `projects/*/locations/global`.
            +     * format `projects/*/locations/*`.
                  * 
            * * @@ -727,7 +809,7 @@ public Builder clearParent() { * *
                  * Required. The parent resource of the HttpRoute. Must be in the
            -     * format `projects/*/locations/global`.
            +     * format `projects/*/locations/*`.
                  * 
            * * @@ -1072,6 +1154,127 @@ public com.google.cloud.networkservices.v1.HttpRouteOrBuilder getHttpRouteOrBuil return httpRouteBuilder_; } + private java.lang.Object requestId_ = ""; + + /** + * + * + *
            +     * Optional. Idempotent request UUID.
            +     * 
            + * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
            +     * Optional. Idempotent request UUID.
            +     * 
            + * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
            +     * Optional. Idempotent request UUID.
            +     * 
            + * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + requestId_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Optional. Idempotent request UUID.
            +     * 
            + * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearRequestId() { + requestId_ = getDefaultInstance().getRequestId(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + + /** + * + * + *
            +     * Optional. Idempotent request UUID.
            +     * 
            + * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + requestId_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + // @@protoc_insertion_point(builder_scope:google.cloud.networkservices.v1.CreateHttpRouteRequest) } diff --git a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/CreateHttpRouteRequestOrBuilder.java b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/CreateHttpRouteRequestOrBuilder.java index c9da7474f7f4..1dd2b8d3a1e0 100644 --- a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/CreateHttpRouteRequestOrBuilder.java +++ b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/CreateHttpRouteRequestOrBuilder.java @@ -31,7 +31,7 @@ public interface CreateHttpRouteRequestOrBuilder * *
                * Required. The parent resource of the HttpRoute. Must be in the
            -   * format `projects/*/locations/global`.
            +   * format `projects/*/locations/*`.
                * 
            * * @@ -47,7 +47,7 @@ public interface CreateHttpRouteRequestOrBuilder * *
                * Required. The parent resource of the HttpRoute. Must be in the
            -   * format `projects/*/locations/global`.
            +   * format `projects/*/locations/*`.
                * 
            * * @@ -126,4 +126,34 @@ public interface CreateHttpRouteRequestOrBuilder * */ com.google.cloud.networkservices.v1.HttpRouteOrBuilder getHttpRouteOrBuilder(); + + /** + * + * + *
            +   * Optional. Idempotent request UUID.
            +   * 
            + * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + java.lang.String getRequestId(); + + /** + * + * + *
            +   * Optional. Idempotent request UUID.
            +   * 
            + * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString getRequestIdBytes(); } diff --git a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/CreateMeshRequest.java b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/CreateMeshRequest.java index bbf3af16f126..dd55978913d0 100644 --- a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/CreateMeshRequest.java +++ b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/CreateMeshRequest.java @@ -82,7 +82,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * *
                * Required. The parent resource of the Mesh. Must be in the
            -   * format `projects/*/locations/global`.
            +   * format `projects/*/locations/*`.
                * 
            * * @@ -109,7 +109,7 @@ public java.lang.String getParent() { * *
                * Required. The parent resource of the Mesh. Must be in the
            -   * format `projects/*/locations/global`.
            +   * format `projects/*/locations/*`.
                * 
            * * @@ -621,7 +621,7 @@ public Builder mergeFrom( * *
                  * Required. The parent resource of the Mesh. Must be in the
            -     * format `projects/*/locations/global`.
            +     * format `projects/*/locations/*`.
                  * 
            * * @@ -647,7 +647,7 @@ public java.lang.String getParent() { * *
                  * Required. The parent resource of the Mesh. Must be in the
            -     * format `projects/*/locations/global`.
            +     * format `projects/*/locations/*`.
                  * 
            * * @@ -673,7 +673,7 @@ public com.google.protobuf.ByteString getParentBytes() { * *
                  * Required. The parent resource of the Mesh. Must be in the
            -     * format `projects/*/locations/global`.
            +     * format `projects/*/locations/*`.
                  * 
            * * @@ -698,7 +698,7 @@ public Builder setParent(java.lang.String value) { * *
                  * Required. The parent resource of the Mesh. Must be in the
            -     * format `projects/*/locations/global`.
            +     * format `projects/*/locations/*`.
                  * 
            * * @@ -719,7 +719,7 @@ public Builder clearParent() { * *
                  * Required. The parent resource of the Mesh. Must be in the
            -     * format `projects/*/locations/global`.
            +     * format `projects/*/locations/*`.
                  * 
            * * diff --git a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/CreateMeshRequestOrBuilder.java b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/CreateMeshRequestOrBuilder.java index 5db2c6c13be9..7c621163a795 100644 --- a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/CreateMeshRequestOrBuilder.java +++ b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/CreateMeshRequestOrBuilder.java @@ -31,7 +31,7 @@ public interface CreateMeshRequestOrBuilder * *
                * Required. The parent resource of the Mesh. Must be in the
            -   * format `projects/*/locations/global`.
            +   * format `projects/*/locations/*`.
                * 
            * * @@ -47,7 +47,7 @@ public interface CreateMeshRequestOrBuilder * *
                * Required. The parent resource of the Mesh. Must be in the
            -   * format `projects/*/locations/global`.
            +   * format `projects/*/locations/*`.
                * 
            * * diff --git a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/CreateTcpRouteRequest.java b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/CreateTcpRouteRequest.java index b2dedbdaf025..472ee833cb36 100644 --- a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/CreateTcpRouteRequest.java +++ b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/CreateTcpRouteRequest.java @@ -82,7 +82,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * *
                * Required. The parent resource of the TcpRoute. Must be in the
            -   * format `projects/*/locations/global`.
            +   * format `projects/*/locations/*`.
                * 
            * * @@ -109,7 +109,7 @@ public java.lang.String getParent() { * *
                * Required. The parent resource of the TcpRoute. Must be in the
            -   * format `projects/*/locations/global`.
            +   * format `projects/*/locations/*`.
                * 
            * * @@ -629,7 +629,7 @@ public Builder mergeFrom( * *
                  * Required. The parent resource of the TcpRoute. Must be in the
            -     * format `projects/*/locations/global`.
            +     * format `projects/*/locations/*`.
                  * 
            * * @@ -655,7 +655,7 @@ public java.lang.String getParent() { * *
                  * Required. The parent resource of the TcpRoute. Must be in the
            -     * format `projects/*/locations/global`.
            +     * format `projects/*/locations/*`.
                  * 
            * * @@ -681,7 +681,7 @@ public com.google.protobuf.ByteString getParentBytes() { * *
                  * Required. The parent resource of the TcpRoute. Must be in the
            -     * format `projects/*/locations/global`.
            +     * format `projects/*/locations/*`.
                  * 
            * * @@ -706,7 +706,7 @@ public Builder setParent(java.lang.String value) { * *
                  * Required. The parent resource of the TcpRoute. Must be in the
            -     * format `projects/*/locations/global`.
            +     * format `projects/*/locations/*`.
                  * 
            * * @@ -727,7 +727,7 @@ public Builder clearParent() { * *
                  * Required. The parent resource of the TcpRoute. Must be in the
            -     * format `projects/*/locations/global`.
            +     * format `projects/*/locations/*`.
                  * 
            * * diff --git a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/CreateTcpRouteRequestOrBuilder.java b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/CreateTcpRouteRequestOrBuilder.java index cb210410c1c7..431d04b8a464 100644 --- a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/CreateTcpRouteRequestOrBuilder.java +++ b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/CreateTcpRouteRequestOrBuilder.java @@ -31,7 +31,7 @@ public interface CreateTcpRouteRequestOrBuilder * *
                * Required. The parent resource of the TcpRoute. Must be in the
            -   * format `projects/*/locations/global`.
            +   * format `projects/*/locations/*`.
                * 
            * * @@ -47,7 +47,7 @@ public interface CreateTcpRouteRequestOrBuilder * *
                * Required. The parent resource of the TcpRoute. Must be in the
            -   * format `projects/*/locations/global`.
            +   * format `projects/*/locations/*`.
                * 
            * * diff --git a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/CreateTlsRouteRequest.java b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/CreateTlsRouteRequest.java index 8a42ab622c00..d8a56887cff6 100644 --- a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/CreateTlsRouteRequest.java +++ b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/CreateTlsRouteRequest.java @@ -82,7 +82,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * *
                * Required. The parent resource of the TlsRoute. Must be in the
            -   * format `projects/*/locations/global`.
            +   * format `projects/*/locations/*`.
                * 
            * * @@ -109,7 +109,7 @@ public java.lang.String getParent() { * *
                * Required. The parent resource of the TlsRoute. Must be in the
            -   * format `projects/*/locations/global`.
            +   * format `projects/*/locations/*`.
                * 
            * * @@ -629,7 +629,7 @@ public Builder mergeFrom( * *
                  * Required. The parent resource of the TlsRoute. Must be in the
            -     * format `projects/*/locations/global`.
            +     * format `projects/*/locations/*`.
                  * 
            * * @@ -655,7 +655,7 @@ public java.lang.String getParent() { * *
                  * Required. The parent resource of the TlsRoute. Must be in the
            -     * format `projects/*/locations/global`.
            +     * format `projects/*/locations/*`.
                  * 
            * * @@ -681,7 +681,7 @@ public com.google.protobuf.ByteString getParentBytes() { * *
                  * Required. The parent resource of the TlsRoute. Must be in the
            -     * format `projects/*/locations/global`.
            +     * format `projects/*/locations/*`.
                  * 
            * * @@ -706,7 +706,7 @@ public Builder setParent(java.lang.String value) { * *
                  * Required. The parent resource of the TlsRoute. Must be in the
            -     * format `projects/*/locations/global`.
            +     * format `projects/*/locations/*`.
                  * 
            * * @@ -727,7 +727,7 @@ public Builder clearParent() { * *
                  * Required. The parent resource of the TlsRoute. Must be in the
            -     * format `projects/*/locations/global`.
            +     * format `projects/*/locations/*`.
                  * 
            * * diff --git a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/CreateTlsRouteRequestOrBuilder.java b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/CreateTlsRouteRequestOrBuilder.java index d69e72f80d66..32121fbf389e 100644 --- a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/CreateTlsRouteRequestOrBuilder.java +++ b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/CreateTlsRouteRequestOrBuilder.java @@ -31,7 +31,7 @@ public interface CreateTlsRouteRequestOrBuilder * *
                * Required. The parent resource of the TlsRoute. Must be in the
            -   * format `projects/*/locations/global`.
            +   * format `projects/*/locations/*`.
                * 
            * * @@ -47,7 +47,7 @@ public interface CreateTlsRouteRequestOrBuilder * *
                * Required. The parent resource of the TlsRoute. Must be in the
            -   * format `projects/*/locations/global`.
            +   * format `projects/*/locations/*`.
                * 
            * * diff --git a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/DeleteAgentGatewayRequest.java b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/DeleteAgentGatewayRequest.java new file mode 100644 index 000000000000..174cc37ac3f7 --- /dev/null +++ b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/DeleteAgentGatewayRequest.java @@ -0,0 +1,811 @@ +/* + * 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/cloud/networkservices/v1/agent_gateway.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkservices.v1; + +/** + * + * + *
            + * Request used by the DeleteAgentGateway method.
            + * 
            + * + * Protobuf type {@code google.cloud.networkservices.v1.DeleteAgentGatewayRequest} + */ +@com.google.protobuf.Generated +public final class DeleteAgentGatewayRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkservices.v1.DeleteAgentGatewayRequest) + DeleteAgentGatewayRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "DeleteAgentGatewayRequest"); + } + + // Use DeleteAgentGatewayRequest.newBuilder() to construct. + private DeleteAgentGatewayRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private DeleteAgentGatewayRequest() { + name_ = ""; + etag_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkservices.v1.AgentGatewayProto + .internal_static_google_cloud_networkservices_v1_DeleteAgentGatewayRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkservices.v1.AgentGatewayProto + .internal_static_google_cloud_networkservices_v1_DeleteAgentGatewayRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkservices.v1.DeleteAgentGatewayRequest.class, + com.google.cloud.networkservices.v1.DeleteAgentGatewayRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
            +   * Required. A name of the AgentGateway to delete. Must be in the format
            +   * `projects/*/locations/*/agentGateways/*`.
            +   * 
            + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + 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(); + name_ = s; + return s; + } + } + + /** + * + * + *
            +   * Required. A name of the AgentGateway to delete. Must be in the format
            +   * `projects/*/locations/*/agentGateways/*`.
            +   * 
            + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ETAG_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object etag_ = ""; + + /** + * + * + *
            +   * Optional. The etag of the AgentGateway to delete.
            +   * 
            + * + * string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The etag. + */ + @java.lang.Override + public java.lang.String getEtag() { + java.lang.Object ref = etag_; + 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(); + etag_ = s; + return s; + } + } + + /** + * + * + *
            +   * Optional. The etag of the AgentGateway to delete.
            +   * 
            + * + * string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for etag. + */ + @java.lang.Override + public com.google.protobuf.ByteString getEtagBytes() { + java.lang.Object ref = etag_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + etag_ = 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 { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(etag_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, etag_); + } + 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(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(etag_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, etag_); + } + 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.networkservices.v1.DeleteAgentGatewayRequest)) { + return super.equals(obj); + } + com.google.cloud.networkservices.v1.DeleteAgentGatewayRequest other = + (com.google.cloud.networkservices.v1.DeleteAgentGatewayRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getEtag().equals(other.getEtag())) 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) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + ETAG_FIELD_NUMBER; + hash = (53 * hash) + getEtag().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.networkservices.v1.DeleteAgentGatewayRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkservices.v1.DeleteAgentGatewayRequest 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.networkservices.v1.DeleteAgentGatewayRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkservices.v1.DeleteAgentGatewayRequest 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.networkservices.v1.DeleteAgentGatewayRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkservices.v1.DeleteAgentGatewayRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkservices.v1.DeleteAgentGatewayRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkservices.v1.DeleteAgentGatewayRequest 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.networkservices.v1.DeleteAgentGatewayRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkservices.v1.DeleteAgentGatewayRequest 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.networkservices.v1.DeleteAgentGatewayRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkservices.v1.DeleteAgentGatewayRequest 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.networkservices.v1.DeleteAgentGatewayRequest 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 used by the DeleteAgentGateway method.
            +   * 
            + * + * Protobuf type {@code google.cloud.networkservices.v1.DeleteAgentGatewayRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkservices.v1.DeleteAgentGatewayRequest) + com.google.cloud.networkservices.v1.DeleteAgentGatewayRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkservices.v1.AgentGatewayProto + .internal_static_google_cloud_networkservices_v1_DeleteAgentGatewayRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkservices.v1.AgentGatewayProto + .internal_static_google_cloud_networkservices_v1_DeleteAgentGatewayRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkservices.v1.DeleteAgentGatewayRequest.class, + com.google.cloud.networkservices.v1.DeleteAgentGatewayRequest.Builder.class); + } + + // Construct using com.google.cloud.networkservices.v1.DeleteAgentGatewayRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + etag_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkservices.v1.AgentGatewayProto + .internal_static_google_cloud_networkservices_v1_DeleteAgentGatewayRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkservices.v1.DeleteAgentGatewayRequest + getDefaultInstanceForType() { + return com.google.cloud.networkservices.v1.DeleteAgentGatewayRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkservices.v1.DeleteAgentGatewayRequest build() { + com.google.cloud.networkservices.v1.DeleteAgentGatewayRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkservices.v1.DeleteAgentGatewayRequest buildPartial() { + com.google.cloud.networkservices.v1.DeleteAgentGatewayRequest result = + new com.google.cloud.networkservices.v1.DeleteAgentGatewayRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.networkservices.v1.DeleteAgentGatewayRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.etag_ = etag_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.networkservices.v1.DeleteAgentGatewayRequest) { + return mergeFrom((com.google.cloud.networkservices.v1.DeleteAgentGatewayRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.networkservices.v1.DeleteAgentGatewayRequest other) { + if (other + == com.google.cloud.networkservices.v1.DeleteAgentGatewayRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getEtag().isEmpty()) { + etag_ = other.etag_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + etag_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + + /** + * + * + *
            +     * Required. A name of the AgentGateway to delete. Must be in the format
            +     * `projects/*/locations/*/agentGateways/*`.
            +     * 
            + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
            +     * Required. A name of the AgentGateway to delete. Must be in the format
            +     * `projects/*/locations/*/agentGateways/*`.
            +     * 
            + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
            +     * Required. A name of the AgentGateway to delete. Must be in the format
            +     * `projects/*/locations/*/agentGateways/*`.
            +     * 
            + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Required. A name of the AgentGateway to delete. Must be in the format
            +     * `projects/*/locations/*/agentGateways/*`.
            +     * 
            + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
            +     * Required. A name of the AgentGateway to delete. Must be in the format
            +     * `projects/*/locations/*/agentGateways/*`.
            +     * 
            + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object etag_ = ""; + + /** + * + * + *
            +     * Optional. The etag of the AgentGateway to delete.
            +     * 
            + * + * string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The etag. + */ + public java.lang.String getEtag() { + java.lang.Object ref = etag_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + etag_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
            +     * Optional. The etag of the AgentGateway to delete.
            +     * 
            + * + * string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for etag. + */ + public com.google.protobuf.ByteString getEtagBytes() { + java.lang.Object ref = etag_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + etag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
            +     * Optional. The etag of the AgentGateway to delete.
            +     * 
            + * + * string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The etag to set. + * @return This builder for chaining. + */ + public Builder setEtag(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + etag_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Optional. The etag of the AgentGateway to delete.
            +     * 
            + * + * string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearEtag() { + etag_ = getDefaultInstance().getEtag(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
            +     * Optional. The etag of the AgentGateway to delete.
            +     * 
            + * + * string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for etag to set. + * @return This builder for chaining. + */ + public Builder setEtagBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + etag_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.networkservices.v1.DeleteAgentGatewayRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkservices.v1.DeleteAgentGatewayRequest) + private static final com.google.cloud.networkservices.v1.DeleteAgentGatewayRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.networkservices.v1.DeleteAgentGatewayRequest(); + } + + public static com.google.cloud.networkservices.v1.DeleteAgentGatewayRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteAgentGatewayRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.networkservices.v1.DeleteAgentGatewayRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/DeleteAgentGatewayRequestOrBuilder.java b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/DeleteAgentGatewayRequestOrBuilder.java new file mode 100644 index 000000000000..5119d4e12586 --- /dev/null +++ b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/DeleteAgentGatewayRequestOrBuilder.java @@ -0,0 +1,86 @@ +/* + * 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/cloud/networkservices/v1/agent_gateway.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkservices.v1; + +@com.google.protobuf.Generated +public interface DeleteAgentGatewayRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkservices.v1.DeleteAgentGatewayRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
            +   * Required. A name of the AgentGateway to delete. Must be in the format
            +   * `projects/*/locations/*/agentGateways/*`.
            +   * 
            + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
            +   * Required. A name of the AgentGateway to delete. Must be in the format
            +   * `projects/*/locations/*/agentGateways/*`.
            +   * 
            + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
            +   * Optional. The etag of the AgentGateway to delete.
            +   * 
            + * + * string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The etag. + */ + java.lang.String getEtag(); + + /** + * + * + *
            +   * Optional. The etag of the AgentGateway to delete.
            +   * 
            + * + * string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for etag. + */ + com.google.protobuf.ByteString getEtagBytes(); +} diff --git a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/DeleteEndpointPolicyRequest.java b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/DeleteEndpointPolicyRequest.java index e2673538464a..bacf1c833c0c 100644 --- a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/DeleteEndpointPolicyRequest.java +++ b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/DeleteEndpointPolicyRequest.java @@ -80,7 +80,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * *
                * Required. A name of the EndpointPolicy to delete. Must be in the format
            -   * `projects/*/locations/global/endpointPolicies/*`.
            +   * `projects/*/locations/*/endpointPolicies/*`.
                * 
            * * @@ -107,7 +107,7 @@ public java.lang.String getName() { * *
                * Required. A name of the EndpointPolicy to delete. Must be in the format
            -   * `projects/*/locations/global/endpointPolicies/*`.
            +   * `projects/*/locations/*/endpointPolicies/*`.
                * 
            * * @@ -451,7 +451,7 @@ public Builder mergeFrom( * *
                  * Required. A name of the EndpointPolicy to delete. Must be in the format
            -     * `projects/*/locations/global/endpointPolicies/*`.
            +     * `projects/*/locations/*/endpointPolicies/*`.
                  * 
            * * @@ -477,7 +477,7 @@ public java.lang.String getName() { * *
                  * Required. A name of the EndpointPolicy to delete. Must be in the format
            -     * `projects/*/locations/global/endpointPolicies/*`.
            +     * `projects/*/locations/*/endpointPolicies/*`.
                  * 
            * * @@ -503,7 +503,7 @@ public com.google.protobuf.ByteString getNameBytes() { * *
                  * Required. A name of the EndpointPolicy to delete. Must be in the format
            -     * `projects/*/locations/global/endpointPolicies/*`.
            +     * `projects/*/locations/*/endpointPolicies/*`.
                  * 
            * * @@ -528,7 +528,7 @@ public Builder setName(java.lang.String value) { * *
                  * Required. A name of the EndpointPolicy to delete. Must be in the format
            -     * `projects/*/locations/global/endpointPolicies/*`.
            +     * `projects/*/locations/*/endpointPolicies/*`.
                  * 
            * * @@ -549,7 +549,7 @@ public Builder clearName() { * *
                  * Required. A name of the EndpointPolicy to delete. Must be in the format
            -     * `projects/*/locations/global/endpointPolicies/*`.
            +     * `projects/*/locations/*/endpointPolicies/*`.
                  * 
            * * diff --git a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/DeleteEndpointPolicyRequestOrBuilder.java b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/DeleteEndpointPolicyRequestOrBuilder.java index 800d16723ea3..d4ce3616e417 100644 --- a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/DeleteEndpointPolicyRequestOrBuilder.java +++ b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/DeleteEndpointPolicyRequestOrBuilder.java @@ -31,7 +31,7 @@ public interface DeleteEndpointPolicyRequestOrBuilder * *
                * Required. A name of the EndpointPolicy to delete. Must be in the format
            -   * `projects/*/locations/global/endpointPolicies/*`.
            +   * `projects/*/locations/*/endpointPolicies/*`.
                * 
            * * @@ -47,7 +47,7 @@ public interface DeleteEndpointPolicyRequestOrBuilder * *
                * Required. A name of the EndpointPolicy to delete. Must be in the format
            -   * `projects/*/locations/global/endpointPolicies/*`.
            +   * `projects/*/locations/*/endpointPolicies/*`.
                * 
            * * diff --git a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/DeleteGrpcRouteRequest.java b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/DeleteGrpcRouteRequest.java index ef0f1ab086bb..112ce041847d 100644 --- a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/DeleteGrpcRouteRequest.java +++ b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/DeleteGrpcRouteRequest.java @@ -80,7 +80,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * *
                * Required. A name of the GrpcRoute to delete. Must be in the format
            -   * `projects/*/locations/global/grpcRoutes/*`.
            +   * `projects/*/locations/*/grpcRoutes/*`.
                * 
            * * @@ -107,7 +107,7 @@ public java.lang.String getName() { * *
                * Required. A name of the GrpcRoute to delete. Must be in the format
            -   * `projects/*/locations/global/grpcRoutes/*`.
            +   * `projects/*/locations/*/grpcRoutes/*`.
                * 
            * * @@ -447,7 +447,7 @@ public Builder mergeFrom( * *
                  * Required. A name of the GrpcRoute to delete. Must be in the format
            -     * `projects/*/locations/global/grpcRoutes/*`.
            +     * `projects/*/locations/*/grpcRoutes/*`.
                  * 
            * * @@ -473,7 +473,7 @@ public java.lang.String getName() { * *
                  * Required. A name of the GrpcRoute to delete. Must be in the format
            -     * `projects/*/locations/global/grpcRoutes/*`.
            +     * `projects/*/locations/*/grpcRoutes/*`.
                  * 
            * * @@ -499,7 +499,7 @@ public com.google.protobuf.ByteString getNameBytes() { * *
                  * Required. A name of the GrpcRoute to delete. Must be in the format
            -     * `projects/*/locations/global/grpcRoutes/*`.
            +     * `projects/*/locations/*/grpcRoutes/*`.
                  * 
            * * @@ -524,7 +524,7 @@ public Builder setName(java.lang.String value) { * *
                  * Required. A name of the GrpcRoute to delete. Must be in the format
            -     * `projects/*/locations/global/grpcRoutes/*`.
            +     * `projects/*/locations/*/grpcRoutes/*`.
                  * 
            * * @@ -545,7 +545,7 @@ public Builder clearName() { * *
                  * Required. A name of the GrpcRoute to delete. Must be in the format
            -     * `projects/*/locations/global/grpcRoutes/*`.
            +     * `projects/*/locations/*/grpcRoutes/*`.
                  * 
            * * diff --git a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/DeleteGrpcRouteRequestOrBuilder.java b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/DeleteGrpcRouteRequestOrBuilder.java index 4eba3d7f93fd..889eb0d5d841 100644 --- a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/DeleteGrpcRouteRequestOrBuilder.java +++ b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/DeleteGrpcRouteRequestOrBuilder.java @@ -31,7 +31,7 @@ public interface DeleteGrpcRouteRequestOrBuilder * *
                * Required. A name of the GrpcRoute to delete. Must be in the format
            -   * `projects/*/locations/global/grpcRoutes/*`.
            +   * `projects/*/locations/*/grpcRoutes/*`.
                * 
            * * @@ -47,7 +47,7 @@ public interface DeleteGrpcRouteRequestOrBuilder * *
                * Required. A name of the GrpcRoute to delete. Must be in the format
            -   * `projects/*/locations/global/grpcRoutes/*`.
            +   * `projects/*/locations/*/grpcRoutes/*`.
                * 
            * * diff --git a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/DeleteHttpRouteRequest.java b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/DeleteHttpRouteRequest.java index d758d89c0a55..859d313b2e4f 100644 --- a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/DeleteHttpRouteRequest.java +++ b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/DeleteHttpRouteRequest.java @@ -80,7 +80,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * *
                * Required. A name of the HttpRoute to delete. Must be in the format
            -   * `projects/*/locations/global/httpRoutes/*`.
            +   * `projects/*/locations/*/httpRoutes/*`.
                * 
            * * @@ -107,7 +107,7 @@ public java.lang.String getName() { * *
                * Required. A name of the HttpRoute to delete. Must be in the format
            -   * `projects/*/locations/global/httpRoutes/*`.
            +   * `projects/*/locations/*/httpRoutes/*`.
                * 
            * * @@ -447,7 +447,7 @@ public Builder mergeFrom( * *
                  * Required. A name of the HttpRoute to delete. Must be in the format
            -     * `projects/*/locations/global/httpRoutes/*`.
            +     * `projects/*/locations/*/httpRoutes/*`.
                  * 
            * * @@ -473,7 +473,7 @@ public java.lang.String getName() { * *
                  * Required. A name of the HttpRoute to delete. Must be in the format
            -     * `projects/*/locations/global/httpRoutes/*`.
            +     * `projects/*/locations/*/httpRoutes/*`.
                  * 
            * * @@ -499,7 +499,7 @@ public com.google.protobuf.ByteString getNameBytes() { * *
                  * Required. A name of the HttpRoute to delete. Must be in the format
            -     * `projects/*/locations/global/httpRoutes/*`.
            +     * `projects/*/locations/*/httpRoutes/*`.
                  * 
            * * @@ -524,7 +524,7 @@ public Builder setName(java.lang.String value) { * *
                  * Required. A name of the HttpRoute to delete. Must be in the format
            -     * `projects/*/locations/global/httpRoutes/*`.
            +     * `projects/*/locations/*/httpRoutes/*`.
                  * 
            * * @@ -545,7 +545,7 @@ public Builder clearName() { * *
                  * Required. A name of the HttpRoute to delete. Must be in the format
            -     * `projects/*/locations/global/httpRoutes/*`.
            +     * `projects/*/locations/*/httpRoutes/*`.
                  * 
            * * diff --git a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/DeleteHttpRouteRequestOrBuilder.java b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/DeleteHttpRouteRequestOrBuilder.java index 86eb5532a7e2..4d88ffc2f404 100644 --- a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/DeleteHttpRouteRequestOrBuilder.java +++ b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/DeleteHttpRouteRequestOrBuilder.java @@ -31,7 +31,7 @@ public interface DeleteHttpRouteRequestOrBuilder * *
                * Required. A name of the HttpRoute to delete. Must be in the format
            -   * `projects/*/locations/global/httpRoutes/*`.
            +   * `projects/*/locations/*/httpRoutes/*`.
                * 
            * * @@ -47,7 +47,7 @@ public interface DeleteHttpRouteRequestOrBuilder * *
                * Required. A name of the HttpRoute to delete. Must be in the format
            -   * `projects/*/locations/global/httpRoutes/*`.
            +   * `projects/*/locations/*/httpRoutes/*`.
                * 
            * * diff --git a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/DeleteMeshRequest.java b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/DeleteMeshRequest.java index 817bcf094bcf..e5a8607cd04f 100644 --- a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/DeleteMeshRequest.java +++ b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/DeleteMeshRequest.java @@ -80,7 +80,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * *
                * Required. A name of the Mesh to delete. Must be in the format
            -   * `projects/*/locations/global/meshes/*`.
            +   * `projects/*/locations/*/meshes/*`.
                * 
            * * @@ -107,7 +107,7 @@ public java.lang.String getName() { * *
                * Required. A name of the Mesh to delete. Must be in the format
            -   * `projects/*/locations/global/meshes/*`.
            +   * `projects/*/locations/*/meshes/*`.
                * 
            * * @@ -447,7 +447,7 @@ public Builder mergeFrom( * *
                  * Required. A name of the Mesh to delete. Must be in the format
            -     * `projects/*/locations/global/meshes/*`.
            +     * `projects/*/locations/*/meshes/*`.
                  * 
            * * @@ -473,7 +473,7 @@ public java.lang.String getName() { * *
                  * Required. A name of the Mesh to delete. Must be in the format
            -     * `projects/*/locations/global/meshes/*`.
            +     * `projects/*/locations/*/meshes/*`.
                  * 
            * * @@ -499,7 +499,7 @@ public com.google.protobuf.ByteString getNameBytes() { * *
                  * Required. A name of the Mesh to delete. Must be in the format
            -     * `projects/*/locations/global/meshes/*`.
            +     * `projects/*/locations/*/meshes/*`.
                  * 
            * * @@ -524,7 +524,7 @@ public Builder setName(java.lang.String value) { * *
                  * Required. A name of the Mesh to delete. Must be in the format
            -     * `projects/*/locations/global/meshes/*`.
            +     * `projects/*/locations/*/meshes/*`.
                  * 
            * * @@ -545,7 +545,7 @@ public Builder clearName() { * *
                  * Required. A name of the Mesh to delete. Must be in the format
            -     * `projects/*/locations/global/meshes/*`.
            +     * `projects/*/locations/*/meshes/*`.
                  * 
            * * diff --git a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/DeleteMeshRequestOrBuilder.java b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/DeleteMeshRequestOrBuilder.java index c5e09a3d178d..d23d45a8b796 100644 --- a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/DeleteMeshRequestOrBuilder.java +++ b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/DeleteMeshRequestOrBuilder.java @@ -31,7 +31,7 @@ public interface DeleteMeshRequestOrBuilder * *
                * Required. A name of the Mesh to delete. Must be in the format
            -   * `projects/*/locations/global/meshes/*`.
            +   * `projects/*/locations/*/meshes/*`.
                * 
            * * @@ -47,7 +47,7 @@ public interface DeleteMeshRequestOrBuilder * *
                * Required. A name of the Mesh to delete. Must be in the format
            -   * `projects/*/locations/global/meshes/*`.
            +   * `projects/*/locations/*/meshes/*`.
                * 
            * * diff --git a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/DeleteTcpRouteRequest.java b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/DeleteTcpRouteRequest.java index 1f3aa4e2ffe7..c33787b891d0 100644 --- a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/DeleteTcpRouteRequest.java +++ b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/DeleteTcpRouteRequest.java @@ -80,7 +80,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * *
                * Required. A name of the TcpRoute to delete. Must be in the format
            -   * `projects/*/locations/global/tcpRoutes/*`.
            +   * `projects/*/locations/*/tcpRoutes/*`.
                * 
            * * @@ -107,7 +107,7 @@ public java.lang.String getName() { * *
                * Required. A name of the TcpRoute to delete. Must be in the format
            -   * `projects/*/locations/global/tcpRoutes/*`.
            +   * `projects/*/locations/*/tcpRoutes/*`.
                * 
            * * @@ -447,7 +447,7 @@ public Builder mergeFrom( * *
                  * Required. A name of the TcpRoute to delete. Must be in the format
            -     * `projects/*/locations/global/tcpRoutes/*`.
            +     * `projects/*/locations/*/tcpRoutes/*`.
                  * 
            * * @@ -473,7 +473,7 @@ public java.lang.String getName() { * *
                  * Required. A name of the TcpRoute to delete. Must be in the format
            -     * `projects/*/locations/global/tcpRoutes/*`.
            +     * `projects/*/locations/*/tcpRoutes/*`.
                  * 
            * * @@ -499,7 +499,7 @@ public com.google.protobuf.ByteString getNameBytes() { * *
                  * Required. A name of the TcpRoute to delete. Must be in the format
            -     * `projects/*/locations/global/tcpRoutes/*`.
            +     * `projects/*/locations/*/tcpRoutes/*`.
                  * 
            * * @@ -524,7 +524,7 @@ public Builder setName(java.lang.String value) { * *
                  * Required. A name of the TcpRoute to delete. Must be in the format
            -     * `projects/*/locations/global/tcpRoutes/*`.
            +     * `projects/*/locations/*/tcpRoutes/*`.
                  * 
            * * @@ -545,7 +545,7 @@ public Builder clearName() { * *
                  * Required. A name of the TcpRoute to delete. Must be in the format
            -     * `projects/*/locations/global/tcpRoutes/*`.
            +     * `projects/*/locations/*/tcpRoutes/*`.
                  * 
            * * diff --git a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/DeleteTcpRouteRequestOrBuilder.java b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/DeleteTcpRouteRequestOrBuilder.java index 523432825425..876323c31342 100644 --- a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/DeleteTcpRouteRequestOrBuilder.java +++ b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/DeleteTcpRouteRequestOrBuilder.java @@ -31,7 +31,7 @@ public interface DeleteTcpRouteRequestOrBuilder * *
                * Required. A name of the TcpRoute to delete. Must be in the format
            -   * `projects/*/locations/global/tcpRoutes/*`.
            +   * `projects/*/locations/*/tcpRoutes/*`.
                * 
            * * @@ -47,7 +47,7 @@ public interface DeleteTcpRouteRequestOrBuilder * *
                * Required. A name of the TcpRoute to delete. Must be in the format
            -   * `projects/*/locations/global/tcpRoutes/*`.
            +   * `projects/*/locations/*/tcpRoutes/*`.
                * 
            * * diff --git a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/DeleteTlsRouteRequest.java b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/DeleteTlsRouteRequest.java index 03fbe2bdedc2..756a8f960938 100644 --- a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/DeleteTlsRouteRequest.java +++ b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/DeleteTlsRouteRequest.java @@ -80,7 +80,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * *
                * Required. A name of the TlsRoute to delete. Must be in the format
            -   * `projects/*/locations/global/tlsRoutes/*`.
            +   * `projects/*/locations/*/tlsRoutes/*`.
                * 
            * * @@ -107,7 +107,7 @@ public java.lang.String getName() { * *
                * Required. A name of the TlsRoute to delete. Must be in the format
            -   * `projects/*/locations/global/tlsRoutes/*`.
            +   * `projects/*/locations/*/tlsRoutes/*`.
                * 
            * * @@ -447,7 +447,7 @@ public Builder mergeFrom( * *
                  * Required. A name of the TlsRoute to delete. Must be in the format
            -     * `projects/*/locations/global/tlsRoutes/*`.
            +     * `projects/*/locations/*/tlsRoutes/*`.
                  * 
            * * @@ -473,7 +473,7 @@ public java.lang.String getName() { * *
                  * Required. A name of the TlsRoute to delete. Must be in the format
            -     * `projects/*/locations/global/tlsRoutes/*`.
            +     * `projects/*/locations/*/tlsRoutes/*`.
                  * 
            * * @@ -499,7 +499,7 @@ public com.google.protobuf.ByteString getNameBytes() { * *
                  * Required. A name of the TlsRoute to delete. Must be in the format
            -     * `projects/*/locations/global/tlsRoutes/*`.
            +     * `projects/*/locations/*/tlsRoutes/*`.
                  * 
            * * @@ -524,7 +524,7 @@ public Builder setName(java.lang.String value) { * *
                  * Required. A name of the TlsRoute to delete. Must be in the format
            -     * `projects/*/locations/global/tlsRoutes/*`.
            +     * `projects/*/locations/*/tlsRoutes/*`.
                  * 
            * * @@ -545,7 +545,7 @@ public Builder clearName() { * *
                  * Required. A name of the TlsRoute to delete. Must be in the format
            -     * `projects/*/locations/global/tlsRoutes/*`.
            +     * `projects/*/locations/*/tlsRoutes/*`.
                  * 
            * * diff --git a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/DeleteTlsRouteRequestOrBuilder.java b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/DeleteTlsRouteRequestOrBuilder.java index 40f3b90ea781..72efbb4328fe 100644 --- a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/DeleteTlsRouteRequestOrBuilder.java +++ b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/DeleteTlsRouteRequestOrBuilder.java @@ -31,7 +31,7 @@ public interface DeleteTlsRouteRequestOrBuilder * *
                * Required. A name of the TlsRoute to delete. Must be in the format
            -   * `projects/*/locations/global/tlsRoutes/*`.
            +   * `projects/*/locations/*/tlsRoutes/*`.
                * 
            * * @@ -47,7 +47,7 @@ public interface DeleteTlsRouteRequestOrBuilder * *
                * Required. A name of the TlsRoute to delete. Must be in the format
            -   * `projects/*/locations/global/tlsRoutes/*`.
            +   * `projects/*/locations/*/tlsRoutes/*`.
                * 
            * * diff --git a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/DepProto.java b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/DepProto.java index 2d17f57dc3ce..9b806b7cac5e 100644 --- a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/DepProto.java +++ b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/DepProto.java @@ -199,7 +199,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "unning/operations.proto\032\036google/protobuf" + "/duration.proto\032\033google/protobuf/empty.proto\032" + " google/protobuf/field_mask.proto\032\034" - + "google/protobuf/struct.proto\032\037google/protobuf/timestamp.proto\"\265\004\n" + + "google/protobuf/struct.proto\032\037google/protobuf/timestamp.proto\"\240\006\n" + "\016ExtensionChain\022\021\n" + "\004name\030\001 \001(\tB\003\340A\002\022\\\n" + "\017match_condition\030\002" @@ -207,69 +207,74 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "extensions\030\003" + " \003(\01329.google.cloud.networkservices.v1.ExtensionChain.ExtensionB\003\340A\002\032-\n" + "\016MatchCondition\022\033\n" - + "\016cel_expression\030\001 \001(\tB\003\340A\002\032\256\002\n" + + "\016cel_expression\030\001 \001(\tB\003\340A\002\032\231\004\n" + "\tExtension\022\021\n" - + "\004name\030\001 \001(\tB\003\340A\002\022\026\n" + + "\004name\030\001 \001(\tB\003\340A\001\022\026\n" + "\tauthority\030\002 \001(\tB\003\340A\001\022\024\n" + "\007service\030\003 \001(\tB\003\340A\002\022I\n" + "\020supported_events\030\004 \003(\0162*.google.c" + "loud.networkservices.v1.EventTypeB\003\340A\001\022/\n" + "\007timeout\030\005 \001(\0132\031.google.protobuf.DurationB\003\340A\001\022\026\n" + "\tfail_open\030\006 \001(\010B\003\340A\001\022\034\n" - + "\017forward_headers\030\007 \003(\tB\003\340A\001\022.\n" - + "\010metadata\030\t \001(\0132\027.google.protobuf.StructB\003\340A\001\"\345\005\n" + + "\017forward_headers\030\007 \003(\tB\003\340A\001\022\037\n" + + "\022forward_attributes\030\010 \003(\tB\003\340A\001\022.\n" + + "\010metadata\030\t \001(\0132\027.google.protobuf.StructB\003\340A\001\022R\n" + + "\026request_body_send_mode\030\016" + + " \001(\0162-.google.cloud.networkservices.v1.BodySendModeB\003\340A\001\022S\n" + + "\027response_body_send_mode\030\017" + + " \001(\0162-.google.cloud.networkservices.v1.BodySendModeB\003\340A\001\022\037\n" + + "\022observability_mode\030\020 \001(\010B\003\340A\001\"\345\005\n" + "\022LbTrafficExtension\022\024\n" + "\004name\030\001 \001(\tB\006\340A\002\340A\010\0224\n" + "\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\022\030\n" + "\013description\030\t \001(\tB\003\340A\001\022T\n" - + "\006labels\030\004 \003(\0132?.google.cloud." - + "networkservices.v1.LbTrafficExtension.LabelsEntryB\003\340A\001\022\035\n" + + "\006labels\030\004 \003(\0132?.google.cloud.netwo" + + "rkservices.v1.LbTrafficExtension.LabelsEntryB\003\340A\001\022\035\n" + "\020forwarding_rules\030\005 \003(\tB\003\340A\001\022N\n" - + "\020extension_chains\030\007 \003(\0132/.google" - + ".cloud.networkservices.v1.ExtensionChainB\003\340A\002\022X\n" - + "\025load_balancing_scheme\030\010 \001(\01624.g" - + "oogle.cloud.networkservices.v1.LoadBalancingSchemeB\003\340A\002\022.\n" + + "\020extension_chains\030\007 \003(\0132/.google.clou" + + "d.networkservices.v1.ExtensionChainB\003\340A\002\022X\n" + + "\025load_balancing_scheme\030\010 \001(\01624.google" + + ".cloud.networkservices.v1.LoadBalancingSchemeB\003\340A\002\022.\n" + "\010metadata\030\n" + " \001(\0132\027.google.protobuf.StructB\003\340A\001\032-\n" + "\013LabelsEntry\022\013\n" + "\003key\030\001 \001(\t\022\r\n" + "\005value\030\002 \001(\t:\0028\001:\264\001\352A\260\001\n" - + "1networkservices.googleapis.com/LbTrafficExtension\022Rprojects/{project}/locations/{" - + "location}/lbTrafficExtensions/{lb_traffi" - + "c_extension}*\023lbTrafficExtensions2\022lbTrafficExtension\"\310\001\n" + + "1networkservices.googleapis.com/LbTrafficExtens" + + "ion\022Rprojects/{project}/locations/{location}/lbTrafficExtensions/{lb_traffic_ext" + + "ension}*\023lbTrafficExtensions2\022lbTrafficExtension\"\310\001\n" + "\036ListLbTrafficExtensionsRequest\022I\n" - + "\006parent\030\001 \001(\tB9\340A\002\372A3\0221networ" - + "kservices.googleapis.com/LbTrafficExtension\022\026\n" + + "\006parent\030\001 \001(\tB9\340A\002\372A3\0221networkserv" + + "ices.googleapis.com/LbTrafficExtension\022\026\n" + "\tpage_size\030\002 \001(\005B\003\340A\001\022\027\n\n" + "page_token\030\003 \001(\tB\003\340A\001\022\023\n" + "\006filter\030\004 \001(\tB\003\340A\001\022\025\n" + "\010order_by\030\005 \001(\tB\003\340A\001\"\243\001\n" + "\037ListLbTrafficExtensionsResponse\022R\n" - + "\025lb_traffic_extensions\030\001 " - + "\003(\01323.google.cloud.networkservices.v1.LbTrafficExtension\022\027\n" + + "\025lb_traffic_extensions\030\001 \003(\01323" + + ".google.cloud.networkservices.v1.LbTrafficExtension\022\027\n" + "\017next_page_token\030\002 \001(\t\022\023\n" + "\013unreachable\030\003 \003(\t\"g\n" + "\034GetLbTrafficExtensionRequest\022G\n" + "\004name\030\001 \001(\tB9\340A\002\372A3\n" + "1networkservices.googleapis.com/LbTrafficExtension\"\213\002\n" + "\037CreateLbTrafficExtensionRequest\022I\n" - + "\006parent\030\001 \001(\tB9\340A\002\372A3\0221networkserv" - + "ices.googleapis.com/LbTrafficExtension\022$\n" + + "\006parent\030\001 \001(" + + "\tB9\340A\002\372A3\0221networkservices.googleapis.com/LbTrafficExtension\022$\n" + "\027lb_traffic_extension_id\030\002 \001(\tB\003\340A\002\022V\n" - + "\024lb_traffic_extension\030\003 \001(\01323.google.clou" - + "d.networkservices.v1.LbTrafficExtensionB\003\340A\002\022\037\n\n" + + "\024lb_traffic_extension\030\003 \001(\01323.google.cloud.net" + + "workservices.v1.LbTrafficExtensionB\003\340A\002\022\037\n\n" + "request_id\030\004 \001(\tB\013\340A\001\342\214\317\327\010\002\010\001\"\320\001\n" + "\037UpdateLbTrafficExtensionRequest\0224\n" + "\013update_mask\030\001 \001(\0132\032.google.protobuf.FieldMaskB\003\340A\001\022V\n" - + "\024lb_traffic_extension\030\002 \001(\01323." - + "google.cloud.networkservices.v1.LbTrafficExtensionB\003\340A\002\022\037\n\n" + + "\024lb_traffic_extension\030\002 \001(\01323.googl" + + "e.cloud.networkservices.v1.LbTrafficExtensionB\003\340A\002\022\037\n\n" + "request_id\030\003 \001(\tB\013\340A\001\342\214\317\327\010\002\010\001\"\213\001\n" + "\037DeleteLbTrafficExtensionRequest\022G\n" + "\004name\030\001 \001(\tB9\340A\002\372A3\n" - + "1networkservices.googleapis.com/LbTrafficExtension\022\037\n" - + "\n" + + "1networkservices.googleapis.com/LbTrafficExtension\022\037\n\n" + "request_id\030\002 \001(\tB\013\340A\001\342\214\317\327\010\002\010\001\"\327\005\n" + "\020LbRouteExtension\022\024\n" + "\004name\030\001 \001(\tB\006\340A\002\340A\010\0224\n" @@ -277,21 +282,21 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\013update_time\030\003" + " \001(\0132\032.google.protobuf.TimestampB\003\340A\003\022\030\n" + "\013description\030\t \001(\tB\003\340A\001\022R\n" - + "\006labels\030\004 \003(\0132=.google.cloud.n" - + "etworkservices.v1.LbRouteExtension.LabelsEntryB\003\340A\001\022\035\n" + + "\006labels\030\004 \003(\0132=.google.cloud.networ" + + "kservices.v1.LbRouteExtension.LabelsEntryB\003\340A\001\022\035\n" + "\020forwarding_rules\030\005 \003(\tB\003\340A\002\022N\n" - + "\020extension_chains\030\007 \003(\0132/.google.cl" - + "oud.networkservices.v1.ExtensionChainB\003\340A\002\022X\n" - + "\025load_balancing_scheme\030\010 \001(\01624.goog" - + "le.cloud.networkservices.v1.LoadBalancingSchemeB\003\340A\002\022.\n" + + "\020extension_chains\030\007" + + " \003(\0132/.google.cloud.networkservices.v1.ExtensionChainB\003\340A\002\022X\n" + + "\025load_balancing_scheme\030\010 \001(\01624.google.cl" + + "oud.networkservices.v1.LoadBalancingSchemeB\003\340A\002\022.\n" + "\010metadata\030\n" + " \001(\0132\027.google.protobuf.StructB\003\340A\001\032-\n" + "\013LabelsEntry\022\013\n" + "\003key\030\001 \001(\t\022\r\n" + "\005value\030\002 \001(\t:\0028\001:\252\001\352A\246\001\n" - + "/networkservices.googleapis.com/LbRouteExtens" - + "ion\022Nprojects/{project}/locations/{location}/lbRouteExtensions/{lb_route_extensi" - + "on}*\021lbRouteExtensions2\020lbRouteExtension\"\304\001\n" + + "/networkservices.googleapis.com/LbRouteExtension\022N" + + "projects/{project}/locations/{location}/" + + "lbRouteExtensions/{lb_route_extension}*\021lbRouteExtensions2\020lbRouteExtension\"\304\001\n" + "\034ListLbRouteExtensionsRequest\022G\n" + "\006parent\030\001 \001(" + "\tB7\340A\002\372A1\022/networkservices.googleapis.com/LbRouteExtension\022\026\n" @@ -308,16 +313,16 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\004name\030\001 \001(\tB7\340A\002\372A1\n" + "/networkservices.googleapis.com/LbRouteExtension\"\201\002\n" + "\035CreateLbRouteExtensionRequest\022G\n" - + "\006parent\030\001 \001(\tB7\340A\002\372A1\022/" - + "networkservices.googleapis.com/LbRouteExtension\022\"\n" + + "\006parent\030\001 \001(\tB7\340A\002\372A1\022/netwo" + + "rkservices.googleapis.com/LbRouteExtension\022\"\n" + "\025lb_route_extension_id\030\002 \001(\tB\003\340A\002\022R\n" - + "\022lb_route_extension\030\003 \001(\01321.google" - + ".cloud.networkservices.v1.LbRouteExtensionB\003\340A\002\022\037\n\n" + + "\022lb_route_extension\030\003 \001(\01321.google.clou" + + "d.networkservices.v1.LbRouteExtensionB\003\340A\002\022\037\n\n" + "request_id\030\004 \001(\tB\013\340A\001\342\214\317\327\010\002\010\001\"\312\001\n" + "\035UpdateLbRouteExtensionRequest\0224\n" + "\013update_mask\030\001 \001(\0132\032.google.protobuf.FieldMaskB\003\340A\001\022R\n" - + "\022lb_route_extension\030\002 \001(\01321.g" - + "oogle.cloud.networkservices.v1.LbRouteExtensionB\003\340A\002\022\037\n\n" + + "\022lb_route_extension\030\002 \001(\01321.google" + + ".cloud.networkservices.v1.LbRouteExtensionB\003\340A\002\022\037\n\n" + "request_id\030\003 \001(\tB\013\340A\001\342\214\317\327\010\002\010\001\"\207\001\n" + "\035DeleteLbRouteExtensionRequest\022E\n" + "\004name\030\001 \001(\tB7\340A\002\372A1\n" @@ -329,75 +334,76 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\013update_time\030\003" + " \001(\0132\032.google.protobuf.TimestampB\003\340A\003\022\030\n" + "\013description\030\t \001(\tB\003\340A\001\022Q\n" - + "\006labels\030\004 \003(\0132<.google.cloud.networkse" - + "rvices.v1.LbEdgeExtension.LabelsEntryB\003\340A\001\022\035\n" + + "\006labels\030\004" + + " \003(\0132<.google.cloud.networkservices.v1.LbEdgeExtension.LabelsEntryB\003\340A\001\022\035\n" + "\020forwarding_rules\030\005 \003(\tB\003\340A\002\022N\n" + "\020extension_chains\030\006" + " \003(\0132/.google.cloud.networkservices.v1.ExtensionChainB\003\340A\002\022X\n" - + "\025load_balancing_scheme\030\007 \001(\01624.google.cloud." - + "networkservices.v1.LoadBalancingSchemeB\003\340A\002\032-\n" + + "\025load_balancing_scheme\030\007 \001(\01624.google.cloud.netwo" + + "rkservices.v1.LoadBalancingSchemeB\003\340A\002\032-\n" + "\013LabelsEntry\022\013\n" + "\003key\030\001 \001(\t\022\r\n" + "\005value\030\002 \001(\t:\0028\001:\245\001\352A\241\001\n" - + ".networkservices.googleapis.com/LbEdgeExtension\022Lprojects/{pro" - + "ject}/locations/{location}/lbEdgeExtensi" - + "ons/{lb_edge_extension}*\020lbEdgeExtensions2\017lbEdgeExtension\"\302\001\n" + + ".networkservices.googleapis.com/LbEdgeExtension\022Lprojects/{project}" + + "/locations/{location}/lbEdgeExtensions/{" + + "lb_edge_extension}*\020lbEdgeExtensions2\017lbEdgeExtension\"\302\001\n" + "\033ListLbEdgeExtensionsRequest\022F\n" - + "\006parent\030\001 \001(\tB6\340A\002\372A0\022.netw" - + "orkservices.googleapis.com/LbEdgeExtension\022\026\n" + + "\006parent\030\001 \001(" + + "\tB6\340A\002\372A0\022.networkservices.googleapis.com/LbEdgeExtension\022\026\n" + "\tpage_size\030\002 \001(\005B\003\340A\001\022\027\n\n" + "page_token\030\003 \001(\tB\003\340A\001\022\023\n" + "\006filter\030\004 \001(\tB\003\340A\001\022\025\n" + "\010order_by\030\005 \001(\tB\003\340A\001\"\232\001\n" + "\034ListLbEdgeExtensionsResponse\022L\n" - + "\022lb_edge_extensions\030\001 \003(\01320.g" - + "oogle.cloud.networkservices.v1.LbEdgeExtension\022\027\n" + + "\022lb_edge_extensions\030\001 \003(\01320.google" + + ".cloud.networkservices.v1.LbEdgeExtension\022\027\n" + "\017next_page_token\030\002 \001(\t\022\023\n" + "\013unreachable\030\003 \003(\t\"a\n" + "\031GetLbEdgeExtensionRequest\022D\n" + "\004name\030\001 \001(\tB6\340A\002\372A0\n" + ".networkservices.googleapis.com/LbEdgeExtension\"\374\001\n" + "\034CreateLbEdgeExtensionRequest\022F\n" - + "\006parent\030\001 \001(\t" - + "B6\340A\002\372A0\022.networkservices.googleapis.com/LbEdgeExtension\022!\n" + + "\006parent\030\001 \001(\tB6\340A\002" + + "\372A0\022.networkservices.googleapis.com/LbEdgeExtension\022!\n" + "\024lb_edge_extension_id\030\002 \001(\tB\003\340A\002\022P\n" - + "\021lb_edge_extension\030\003 \001(\01320" - + ".google.cloud.networkservices.v1.LbEdgeExtensionB\003\340A\002\022\037\n\n" + + "\021lb_edge_extension\030\003 \001(\01320.goog" + + "le.cloud.networkservices.v1.LbEdgeExtensionB\003\340A\002\022\037\n\n" + "request_id\030\004 \001(\tB\013\340A\001\342\214\317\327\010\002\010\001\"\307\001\n" + "\034UpdateLbEdgeExtensionRequest\0224\n" + "\013update_mask\030\001 \001(\0132\032.google.protobuf.FieldMaskB\003\340A\001\022P\n" - + "\021lb_edge_extension\030\002 \001(\013" - + "20.google.cloud.networkservices.v1.LbEdgeExtensionB\003\340A\002\022\037\n\n" + + "\021lb_edge_extension\030\002 \001(\01320.go" + + "ogle.cloud.networkservices.v1.LbEdgeExtensionB\003\340A\002\022\037\n\n" + "request_id\030\003 \001(\tB\013\340A\001\342\214\317\327\010\002\010\001\"\205\001\n" + "\034DeleteLbEdgeExtensionRequest\022D\n" + "\004name\030\001 \001(\tB6\340A\002\372A0\n" + ".networkservices.googleapis.com/LbEdgeExtension\022\037\n\n" - + "request_id\030\002 \001(\tB\013\340A\001\342\214\317\327\010\002\010\001\"\265\006\n" + + "request_id\030\002 \001(\tB\013\340A\001\342\214\317\327\010\002\010\001\"\326\006\n" + "\016AuthzExtension\022\024\n" + "\004name\030\001 \001(\tB\006\340A\002\340A\010\0224\n" + "\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\022\030\n" + "\013description\030\004 \001(\tB\003\340A\001\022P\n" - + "\006labels\030\005 \003(\0132;.google.cloud.networkse" - + "rvices.v1.AuthzExtension.LabelsEntryB\003\340A\001\022X\n" - + "\025load_balancing_scheme\030\006 \001(\01624.googl" - + "e.cloud.networkservices.v1.LoadBalancingSchemeB\003\340A\002\022\026\n" - + "\tauthority\030\007 \001(\tB\003\340A\002\022\024\n" + + "\006labels\030\005" + + " \003(\0132;.google.cloud.networkservices.v1.AuthzExtension.LabelsEntryB\003\340A\001\022X\n" + + "\025load_balancing_scheme\030\006 \001(\01624.google.clo" + + "ud.networkservices.v1.LoadBalancingSchemeB\003\340A\001\022\026\n" + + "\tauthority\030\007 \001(\tB\003\340A\001\022\024\n" + "\007service\030\010 \001(\tB\003\340A\002\022/\n" + "\007timeout\030\t \001(\0132\031.google.protobuf.DurationB\003\340A\002\022\026\n" + "\tfail_open\030\n" + " \001(\010B\003\340A\001\022.\n" + "\010metadata\030\013 \001(\0132\027.google.protobuf.StructB\003\340A\001\022\034\n" - + "\017forward_headers\030\014 \003(\tB\003\340A\001\022E\n" - + "\013wire_format\030\016 \001(\0162+.google.c" - + "loud.networkservices.v1.WireFormatB\003\340A\001\032-\n" + + "\017forward_headers\030\014 \003(\tB\003\340A\001\022\037\n" + + "\022forward_attributes\030\r" + + " \003(\tB\003\340A\001\022E\n" + + "\013wire_format\030\016" + + " \001(\0162+.google.cloud.networkservices.v1.WireFormatB\003\340A\001\032-\n" + "\013LabelsEntry\022\013\n" + "\003key\030\001 \001(\t\022\r\n" + "\005value\030\002 \001(\t:\0028\001:\237\001\352A\233\001\n" - + "-networkservices.googleapis.com/AuthzExtension\022Iprojects/{project}" - + "/locations/{location}/authzExtensions/{a" - + "uthz_extension}*\017authzExtensions2\016authzExtension\"\300\001\n" + + "-networkservices.googleapis.com/AuthzExtension\022Iprojects/{project}/locations/{" + + "location}/authzExtensions/{authz_extension}*\017authzExtensions2\016authzExtension\"\300\001\n" + "\032ListAuthzExtensionsRequest\022E\n" + "\006parent\030\001 \001(" + "\tB5\340A\002\372A/\022-networkservices.googleapis.com/AuthzExtension\022\026\n" @@ -417,13 +423,13 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\006parent\030\001 \001(" + "\tB5\340A\002\372A/\022-networkservices.googleapis.com/AuthzExtension\022\037\n" + "\022authz_extension_id\030\002 \001(\tB\003\340A\002\022M\n" - + "\017authz_extension\030\003" - + " \001(\0132/.google.cloud.networkservices.v1.AuthzExtensionB\003\340A\002\022\037\n\n" + + "\017authz_extension\030\003 \001" + + "(\0132/.google.cloud.networkservices.v1.AuthzExtensionB\003\340A\002\022\037\n\n" + "request_id\030\004 \001(\tB\013\340A\001\342\214\317\327\010\002\010\001\"\303\001\n" + "\033UpdateAuthzExtensionRequest\0224\n" + "\013update_mask\030\001 \001(\0132\032.google.protobuf.FieldMaskB\003\340A\002\022M\n" - + "\017authz_extension\030\002" - + " \001(\0132/.google.cloud.networkservices.v1.AuthzExtensionB\003\340A\002\022\037\n\n" + + "\017authz_extension\030\002 \001(\013" + + "2/.google.cloud.networkservices.v1.AuthzExtensionB\003\340A\002\022\037\n\n" + "request_id\030\003 \001(\tB\013\340A\001\342\214\317\327\010\002\010\001\"\203\001\n" + "\033DeleteAuthzExtensionRequest\022C\n" + "\004name\030\001 \001(\tB5\340A\002\372A/\n" @@ -440,113 +446,117 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\023LoadBalancingScheme\022%\n" + "!LOAD_BALANCING_SCHEME_UNSPECIFIED\020\000\022\024\n" + "\020INTERNAL_MANAGED\020\001\022\024\n" - + "\020EXTERNAL_MANAGED\020\002*<\n\n" + + "\020EXTERNAL_MANAGED\020\002*P\n\n" + "WireFormat\022\033\n" + "\027WIRE_FORMAT_UNSPECIFIED\020\000\022\021\n\r" - + "EXT_PROC_GRPC\020\0012\371\'\n\n" + + "EXT_PROC_GRPC\020\001\022\022\n" + + "\016EXT_AUTHZ_GRPC\020\003*t\n" + + "\014BodySendMode\022\036\n" + + "\032BODY_SEND_MODE_UNSPECIFIED\020\000\022\033\n" + + "\027BODY_SEND_MODE_STREAMED\020\001\022\'\n" + + "#BODY_SEND_MODE_FULL_DUPLEX_STREAMED\020\0022\371\'\n\n" + "DepService\022\346\001\n" - + "\027ListLbTrafficExtensions\022?.google.cloud.networkservic" - + "es.v1.ListLbTrafficExtensionsRequest\032@.google.cloud.networkservices.v1.ListLbTra" - + "fficExtensionsResponse\"H\332A\006parent\202\323\344\223\0029\022" - + "7/v1/{parent=projects/*/locations/*}/lbTrafficExtensions\022\323\001\n" - + "\025GetLbTrafficExtension\022=.google.cloud.networkservices.v1.Get" - + "LbTrafficExtensionRequest\0323.google.cloud.networkservices.v1.LbTrafficExtension\"F" - + "\332A\004name\202\323\344\223\0029\0227/v1/{name=projects/*/locations/*/lbTrafficExtensions/*}\022\263\002\n" - + "\030CreateLbTrafficExtension\022@.google.cloud.netwo" - + "rkservices.v1.CreateLbTrafficExtensionRe" - + "quest\032\035.google.longrunning.Operation\"\265\001\312A\'\n" - + "\022LbTrafficExtension\022\021OperationMetadat" - + "a\332A3parent,lb_traffic_extension,lb_traff" - + "ic_extension_id\202\323\344\223\002O\"7/v1/{parent=proje" - + "cts/*/locations/*}/lbTrafficExtensions:\024lb_traffic_extension\022\265\002\n" - + "\030UpdateLbTrafficExtension\022@.google.cloud.networkservices" - + ".v1.UpdateLbTrafficExtensionRequest\032\035.google.longrunning.Operation\"\267\001\312A\'\n" - + "\022LbTrafficExtension\022\021OperationMetadata\332A lb_tra" - + "ffic_extension,update_mask\202\323\344\223\002d2L/v1/{l" - + "b_traffic_extension.name=projects/*/loca" - + "tions/*/lbTrafficExtensions/*}:\024lb_traffic_extension\022\360\001\n" - + "\030DeleteLbTrafficExtension\022@.google.cloud.networkservices.v1.Dele" - + "teLbTrafficExtensionRequest\032\035.google.longrunning.Operation\"s\312A*\n" - + "\025google.protobuf.Empty\022\021OperationMetadata\332A\004name\202\323\344\223\0029*7" - + "/v1/{name=projects/*/locations/*/lbTrafficExtensions/*}\022\336\001\n" - + "\025ListLbRouteExtensions\022=.google.cloud.networkservices.v1.List" - + "LbRouteExtensionsRequest\032>.google.cloud.networkservices.v1.ListLbRouteExtensions" - + "Response\"F\332A\006parent\202\323\344\223\0027\0225/v1/{parent=p" - + "rojects/*/locations/*}/lbRouteExtensions\022\313\001\n" - + "\023GetLbRouteExtension\022;.google.cloud.networkservices.v1.GetLbRouteExtensionRe" - + "quest\0321.google.cloud.networkservices.v1." - + "LbRouteExtension\"D\332A\004name\202\323\344\223\0027\0225/v1/{na" - + "me=projects/*/locations/*/lbRouteExtensions/*}\022\245\002\n" - + "\026CreateLbRouteExtension\022>.google.cloud.networkservices.v1.CreateLbRout" - + "eExtensionRequest\032\035.google.longrunning.Operation\"\253\001\312A%\n" - + "\020LbRouteExtension\022\021OperationMetadata\332A/parent,lb_route_extension," - + "lb_route_extension_id\202\323\344\223\002K\"5/v1/{parent" - + "=projects/*/locations/*}/lbRouteExtensions:\022lb_route_extension\022\247\002\n" - + "\026UpdateLbRouteExtension\022>.google.cloud.networkservices" - + ".v1.UpdateLbRouteExtensionRequest\032\035.google.longrunning.Operation\"\255\001\312A%\n" - + "\020LbRouteExtension\022\021OperationMetadata\332A\036lb_route_e" - + "xtension,update_mask\202\323\344\223\002^2H/v1/{lb_rout" - + "e_extension.name=projects/*/locations/*/" - + "lbRouteExtensions/*}:\022lb_route_extension\022\352\001\n" - + "\026DeleteLbRouteExtension\022>.google.cloud.networkservices.v1.DeleteLbRouteExten" - + "sionRequest\032\035.google.longrunning.Operation\"q\312A*\n" - + "\025google.protobuf.Empty\022\021Operatio" - + "nMetadata\332A\004name\202\323\344\223\0027*5/v1/{name=projec" - + "ts/*/locations/*/lbRouteExtensions/*}\022\332\001\n" - + "\024ListLbEdgeExtensions\022<.google.cloud.networkservices.v1.ListLbEdgeExtensionsReq" - + "uest\032=.google.cloud.networkservices.v1.L" - + "istLbEdgeExtensionsResponse\"E\332A\006parent\202\323" - + "\344\223\0026\0224/v1/{parent=projects/*/locations/*}/lbEdgeExtensions\022\307\001\n" - + "\022GetLbEdgeExtension\022:.google.cloud.networkservices.v1.GetL" - + "bEdgeExtensionRequest\0320.google.cloud.net" - + "workservices.v1.LbEdgeExtension\"C\332A\004name" - + "\202\323\344\223\0026\0224/v1/{name=projects/*/locations/*/lbEdgeExtensions/*}\022\236\002\n" - + "\025CreateLbEdgeExtension\022=.google.cloud.networkservices.v1" - + ".CreateLbEdgeExtensionRequest\032\035.google.longrunning.Operation\"\246\001\312A$\n" - + "\017LbEdgeExtension\022\021OperationMetadata\332A-parent,lb_edge_" - + "extension,lb_edge_extension_id\202\323\344\223\002I\"4/v" - + "1/{parent=projects/*/locations/*}/lbEdgeExtensions:\021lb_edge_extension\022\240\002\n" - + "\025UpdateLbEdgeExtension\022=.google.cloud.networkse" - + "rvices.v1.UpdateLbEdgeExtensionRequest\032\035.google.longrunning.Operation\"\250\001\312A$\n" - + "\017LbEdgeExtension\022\021OperationMetadata\332A\035lb_edg" - + "e_extension,update_mask\202\323\344\223\002[2F/v1/{lb_e" - + "dge_extension.name=projects/*/locations/" - + "*/lbEdgeExtensions/*}:\021lb_edge_extension\022\347\001\n" - + "\025DeleteLbEdgeExtension\022=.google.cloud.networkservices.v1.DeleteLbEdgeExtensi" - + "onRequest\032\035.google.longrunning.Operation\"p\312A*\n" - + "\025google.protobuf.Empty\022\021OperationM" - + "etadata\332A\004name\202\323\344\223\0026*4/v1/{name=projects/*/locations/*/lbEdgeExtensions/*}\022\326\001\n" - + "\023ListAuthzExtensions\022;.google.cloud.networ" - + "kservices.v1.ListAuthzExtensionsRequest\032<.google.cloud.networkservices.v1.ListAu" - + "thzExtensionsResponse\"D\332A\006parent\202\323\344\223\0025\0223" - + "/v1/{parent=projects/*/locations/*}/authzExtensions\022\303\001\n" - + "\021GetAuthzExtension\0229.google.cloud.networkservices.v1.GetAuthzExte" - + "nsionRequest\032/.google.cloud.networkservi" - + "ces.v1.AuthzExtension\"B\332A\004name\202\323\344\223\0025\0223/v" - + "1/{name=projects/*/locations/*/authzExtensions/*}\022\224\002\n" - + "\024CreateAuthzExtension\022<.google.cloud.networkservices.v1.CreateAuthz" - + "ExtensionRequest\032\035.google.longrunning.Operation\"\236\001\312A#\n" - + "\016AuthzExtension\022\021OperationMetadata\332A)parent,authz_extension,authz_" - + "extension_id\202\323\344\223\002F\"3/v1/{parent=projects" - + "/*/locations/*}/authzExtensions:\017authz_extension\022\226\002\n" - + "\024UpdateAuthzExtension\022<.google.cloud.networkservices.v1.UpdateAuthzE" - + "xtensionRequest\032\035.google.longrunning.Operation\"\240\001\312A#\n" - + "\016AuthzExtension\022\021OperationM" - + "etadata\332A\033authz_extension,update_mask\202\323\344" - + "\223\002V2C/v1/{authz_extension.name=projects/" - + "*/locations/*/authzExtensions/*}:\017authz_extension\022\344\001\n" - + "\024DeleteAuthzExtension\022<.google.cloud.networkservices.v1.DeleteAuthz" - + "ExtensionRequest\032\035.google.longrunning.Operation\"o\312A*\n" - + "\025google.protobuf.Empty\022\021Ope" - + "rationMetadata\332A\004name\202\323\344\223\0025*3/v1/{name=p" - + "rojects/*/locations/*/authzExtensions/*}" - + "\032R\312A\036networkservices.googleapis.com\322A.ht" - + "tps://www.googleapis.com/auth/cloud-platformB\351\001\n" - + "#com.google.cloud.networkservices.v1B\010DepProtoP\001ZMcloud.google.com/go/ne" - + "tworkservices/apiv1/networkservicespb;ne" - + "tworkservicespb\252\002\037Google.Cloud.NetworkSe" - + "rvices.V1\312\002\037Google\\Cloud\\NetworkServices" - + "\\V1\352\002\"Google::Cloud::NetworkServices::V1b\006proto3" + + "\027ListLbTrafficExtensions\022?.google.cloud.network" + + "services.v1.ListLbTrafficExtensionsRequest\032@.google.cloud.networkservices.v1.Lis" + + "tLbTrafficExtensionsResponse\"H\332A\006parent\202" + + "\323\344\223\0029\0227/v1/{parent=projects/*/locations/*}/lbTrafficExtensions\022\323\001\n" + + "\025GetLbTrafficExtension\022=.google.cloud.networkservices." + + "v1.GetLbTrafficExtensionRequest\0323.google.cloud.networkservices.v1.LbTrafficExten" + + "sion\"F\332A\004name\202\323\344\223\0029\0227/v1/{name=projects/*/locations/*/lbTrafficExtensions/*}\022\263\002\n" + + "\030CreateLbTrafficExtension\022@.google.cloud.networkservices.v1.CreateLbTrafficExten" + + "sionRequest\032\035.google.longrunning.Operation\"\265\001\312A\'\n" + + "\022LbTrafficExtension\022\021OperationMetadata\332A3parent,lb_traffic_extension,lb" + + "_traffic_extension_id\202\323\344\223\002O\"7/v1/{parent" + + "=projects/*/locations/*}/lbTrafficExtensions:\024lb_traffic_extension\022\265\002\n" + + "\030UpdateLbTrafficExtension\022@.google.cloud.networkse" + + "rvices.v1.UpdateLbTrafficExtensionRequest\032\035.google.longrunning.Operation\"\267\001\312A\'\n" + + "\022LbTrafficExtension\022\021OperationMetadata\332A " + + "lb_traffic_extension,update_mask\202\323\344\223\002d2L" + + "/v1/{lb_traffic_extension.name=projects/" + + "*/locations/*/lbTrafficExtensions/*}:\024lb_traffic_extension\022\360\001\n" + + "\030DeleteLbTrafficExtension\022@.google.cloud.networkservices.v" + + "1.DeleteLbTrafficExtensionRequest\032\035.google.longrunning.Operation\"s\312A*\n" + + "\025google.protobuf.Empty\022\021OperationMetadata\332A\004name\202\323" + + "\344\223\0029*7/v1/{name=projects/*/locations/*/lbTrafficExtensions/*}\022\336\001\n" + + "\025ListLbRouteExtensions\022=.google.cloud.networkservices.v" + + "1.ListLbRouteExtensionsRequest\032>.google.cloud.networkservices.v1.ListLbRouteExte" + + "nsionsResponse\"F\332A\006parent\202\323\344\223\0027\0225/v1/{pa" + + "rent=projects/*/locations/*}/lbRouteExtensions\022\313\001\n" + + "\023GetLbRouteExtension\022;.google.cloud.networkservices.v1.GetLbRouteExten" + + "sionRequest\0321.google.cloud.networkservic" + + "es.v1.LbRouteExtension\"D\332A\004name\202\323\344\223\0027\0225/" + + "v1/{name=projects/*/locations/*/lbRouteExtensions/*}\022\245\002\n" + + "\026CreateLbRouteExtension\022>.google.cloud.networkservices.v1.Create" + + "LbRouteExtensionRequest\032\035.google.longrunning.Operation\"\253\001\312A%\n" + + "\020LbRouteExtension\022\021OperationMetadata\332A/parent,lb_route_exte" + + "nsion,lb_route_extension_id\202\323\344\223\002K\"5/v1/{" + + "parent=projects/*/locations/*}/lbRouteExtensions:\022lb_route_extension\022\247\002\n" + + "\026UpdateLbRouteExtension\022>.google.cloud.networkse" + + "rvices.v1.UpdateLbRouteExtensionRequest\032\035.google.longrunning.Operation\"\255\001\312A%\n" + + "\020LbRouteExtension\022\021OperationMetadata\332A\036lb_r" + + "oute_extension,update_mask\202\323\344\223\002^2H/v1/{l" + + "b_route_extension.name=projects/*/locati" + + "ons/*/lbRouteExtensions/*}:\022lb_route_extension\022\352\001\n" + + "\026DeleteLbRouteExtension\022>.google.cloud.networkservices.v1.DeleteLbRout" + + "eExtensionRequest\032\035.google.longrunning.Operation\"q\312A*\n" + + "\025google.protobuf.Empty\022\021Op" + + "erationMetadata\332A\004name\202\323\344\223\0027*5/v1/{name=" + + "projects/*/locations/*/lbRouteExtensions/*}\022\332\001\n" + + "\024ListLbEdgeExtensions\022<.google.cloud.networkservices.v1.ListLbEdgeExtensi" + + "onsRequest\032=.google.cloud.networkservice" + + "s.v1.ListLbEdgeExtensionsResponse\"E\332A\006pa" + + "rent\202\323\344\223\0026\0224/v1/{parent=projects/*/locations/*}/lbEdgeExtensions\022\307\001\n" + + "\022GetLbEdgeExtension\022:.google.cloud.networkservices.v" + + "1.GetLbEdgeExtensionRequest\0320.google.clo" + + "ud.networkservices.v1.LbEdgeExtension\"C\332" + + "A\004name\202\323\344\223\0026\0224/v1/{name=projects/*/locations/*/lbEdgeExtensions/*}\022\236\002\n" + + "\025CreateLbEdgeExtension\022=.google.cloud.networkservi" + + "ces.v1.CreateLbEdgeExtensionRequest\032\035.google.longrunning.Operation\"\246\001\312A$\n" + + "\017LbEdgeExtension\022\021OperationMetadata\332A-parent,lb" + + "_edge_extension,lb_edge_extension_id\202\323\344\223" + + "\002I\"4/v1/{parent=projects/*/locations/*}/lbEdgeExtensions:\021lb_edge_extension\022\240\002\n" + + "\025UpdateLbEdgeExtension\022=.google.cloud.net" + + "workservices.v1.UpdateLbEdgeExtensionReq" + + "uest\032\035.google.longrunning.Operation\"\250\001\312A$\n" + + "\017LbEdgeExtension\022\021OperationMetadata\332A\035" + + "lb_edge_extension,update_mask\202\323\344\223\002[2F/v1" + + "/{lb_edge_extension.name=projects/*/loca" + + "tions/*/lbEdgeExtensions/*}:\021lb_edge_extension\022\347\001\n" + + "\025DeleteLbEdgeExtension\022=.google.cloud.networkservices.v1.DeleteLbEdgeE" + + "xtensionRequest\032\035.google.longrunning.Operation\"p\312A*\n" + + "\025google.protobuf.Empty\022\021Oper" + + "ationMetadata\332A\004name\202\323\344\223\0026*4/v1/{name=pr" + + "ojects/*/locations/*/lbEdgeExtensions/*}\022\326\001\n" + + "\023ListAuthzExtensions\022;.google.cloud.networkservices.v1.ListAuthzExtensionsRe" + + "quest\032<.google.cloud.networkservices.v1." + + "ListAuthzExtensionsResponse\"D\332A\006parent\202\323" + + "\344\223\0025\0223/v1/{parent=projects/*/locations/*}/authzExtensions\022\303\001\n" + + "\021GetAuthzExtension\0229.google.cloud.networkservices.v1.GetAut" + + "hzExtensionRequest\032/.google.cloud.networ" + + "kservices.v1.AuthzExtension\"B\332A\004name\202\323\344\223" + + "\0025\0223/v1/{name=projects/*/locations/*/authzExtensions/*}\022\224\002\n" + + "\024CreateAuthzExtension\022<.google.cloud.networkservices.v1.Creat" + + "eAuthzExtensionRequest\032\035.google.longrunning.Operation\"\236\001\312A#\n" + + "\016AuthzExtension\022\021OperationMetadata\332A)parent,authz_extension," + + "authz_extension_id\202\323\344\223\002F\"3/v1/{parent=pr" + + "ojects/*/locations/*}/authzExtensions:\017authz_extension\022\226\002\n" + + "\024UpdateAuthzExtension\022<.google.cloud.networkservices.v1.Update" + + "AuthzExtensionRequest\032\035.google.longrunning.Operation\"\240\001\312A#\n" + + "\016AuthzExtension\022\021OperationMetadata\332A\033authz_extension,update_m" + + "ask\202\323\344\223\002V2C/v1/{authz_extension.name=pro" + + "jects/*/locations/*/authzExtensions/*}:\017authz_extension\022\344\001\n" + + "\024DeleteAuthzExtension\022<.google.cloud.networkservices.v1.Delet" + + "eAuthzExtensionRequest\032\035.google.longrunning.Operation\"o\312A*\n" + + "\025google.protobuf.Empt" + + "y\022\021OperationMetadata\332A\004name\202\323\344\223\0025*3/v1/{" + + "name=projects/*/locations/*/authzExtensi" + + "ons/*}\032R\312A\036networkservices.googleapis.co" + + "m\322A.https://www.googleapis.com/auth/cloud-platformB\351\001\n" + + "#com.google.cloud.networkservices.v1B\010DepProtoP\001ZMcloud.google.com" + + "/go/networkservices/apiv1/networkservice" + + "spb;networkservicespb\252\002\037Google.Cloud.Net" + + "workServices.V1\312\002\037Google\\Cloud\\NetworkSe" + + "rvices\\V1\352\002\"Google::Cloud::NetworkServices::V1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -594,7 +604,11 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Timeout", "FailOpen", "ForwardHeaders", + "ForwardAttributes", "Metadata", + "RequestBodySendMode", + "ResponseBodySendMode", + "ObservabilityMode", }); internal_static_google_cloud_networkservices_v1_LbTrafficExtension_descriptor = getDescriptor().getMessageType(1); @@ -831,6 +845,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "FailOpen", "Metadata", "ForwardHeaders", + "ForwardAttributes", "WireFormat", }); internal_static_google_cloud_networkservices_v1_AuthzExtension_LabelsEntry_descriptor = diff --git a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/EndpointPolicy.java b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/EndpointPolicy.java index f7b35bf24392..0abfee0ddd5d 100644 --- a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/EndpointPolicy.java +++ b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/EndpointPolicy.java @@ -275,7 +275,7 @@ private EndpointPolicyType(int value) { * *
                * Identifier. Name of the EndpointPolicy resource. It matches pattern
            -   * `projects/{project}/locations/global/endpointPolicies/{endpoint_policy}`.
            +   * `projects/{project}/locations/*/endpointPolicies/{endpoint_policy}`.
                * 
            * * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; @@ -300,7 +300,7 @@ public java.lang.String getName() { * *
                * Identifier. Name of the EndpointPolicy resource. It matches pattern
            -   * `projects/{project}/locations/global/endpointPolicies/{endpoint_policy}`.
            +   * `projects/{project}/locations/*/endpointPolicies/{endpoint_policy}`.
                * 
            * * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; @@ -1609,7 +1609,7 @@ public Builder mergeFrom( * *
                  * Identifier. Name of the EndpointPolicy resource. It matches pattern
            -     * `projects/{project}/locations/global/endpointPolicies/{endpoint_policy}`.
            +     * `projects/{project}/locations/*/endpointPolicies/{endpoint_policy}`.
                  * 
            * * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; @@ -1633,7 +1633,7 @@ public java.lang.String getName() { * *
                  * Identifier. Name of the EndpointPolicy resource. It matches pattern
            -     * `projects/{project}/locations/global/endpointPolicies/{endpoint_policy}`.
            +     * `projects/{project}/locations/*/endpointPolicies/{endpoint_policy}`.
                  * 
            * * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; @@ -1657,7 +1657,7 @@ public com.google.protobuf.ByteString getNameBytes() { * *
                  * Identifier. Name of the EndpointPolicy resource. It matches pattern
            -     * `projects/{project}/locations/global/endpointPolicies/{endpoint_policy}`.
            +     * `projects/{project}/locations/*/endpointPolicies/{endpoint_policy}`.
                  * 
            * * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; @@ -1680,7 +1680,7 @@ public Builder setName(java.lang.String value) { * *
                  * Identifier. Name of the EndpointPolicy resource. It matches pattern
            -     * `projects/{project}/locations/global/endpointPolicies/{endpoint_policy}`.
            +     * `projects/{project}/locations/*/endpointPolicies/{endpoint_policy}`.
                  * 
            * * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; @@ -1699,7 +1699,7 @@ public Builder clearName() { * *
                  * Identifier. Name of the EndpointPolicy resource. It matches pattern
            -     * `projects/{project}/locations/global/endpointPolicies/{endpoint_policy}`.
            +     * `projects/{project}/locations/*/endpointPolicies/{endpoint_policy}`.
                  * 
            * * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; diff --git a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/EndpointPolicyOrBuilder.java b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/EndpointPolicyOrBuilder.java index 409b3746e0c3..f2aadc9d17cf 100644 --- a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/EndpointPolicyOrBuilder.java +++ b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/EndpointPolicyOrBuilder.java @@ -31,7 +31,7 @@ public interface EndpointPolicyOrBuilder * *
                * Identifier. Name of the EndpointPolicy resource. It matches pattern
            -   * `projects/{project}/locations/global/endpointPolicies/{endpoint_policy}`.
            +   * `projects/{project}/locations/*/endpointPolicies/{endpoint_policy}`.
                * 
            * * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; @@ -45,7 +45,7 @@ public interface EndpointPolicyOrBuilder * *
                * Identifier. Name of the EndpointPolicy resource. It matches pattern
            -   * `projects/{project}/locations/global/endpointPolicies/{endpoint_policy}`.
            +   * `projects/{project}/locations/*/endpointPolicies/{endpoint_policy}`.
                * 
            * * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; diff --git a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/EnvoyHeaders.java b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/EnvoyHeaders.java index 7398388981f0..d4d78f4ef64d 100644 --- a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/EnvoyHeaders.java +++ b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/EnvoyHeaders.java @@ -56,10 +56,10 @@ public enum EnvoyHeaders implements com.google.protobuf.ProtocolMessageEnum { * *
                * Envoy will insert default internal debug headers into upstream requests:
            -   * x-envoy-attempt-count
            -   * x-envoy-is-timeout-retry
            -   * x-envoy-expected-rq-timeout-ms
            -   * x-envoy-original-path
            +   * x-envoy-attempt-count,
            +   * x-envoy-is-timeout-retry,
            +   * x-envoy-expected-rq-timeout-ms,
            +   * x-envoy-original-path,
                * x-envoy-upstream-stream-duration-ms
                * 
            * @@ -106,10 +106,10 @@ public enum EnvoyHeaders implements com.google.protobuf.ProtocolMessageEnum { * *
                * Envoy will insert default internal debug headers into upstream requests:
            -   * x-envoy-attempt-count
            -   * x-envoy-is-timeout-retry
            -   * x-envoy-expected-rq-timeout-ms
            -   * x-envoy-original-path
            +   * x-envoy-attempt-count,
            +   * x-envoy-is-timeout-retry,
            +   * x-envoy-expected-rq-timeout-ms,
            +   * x-envoy-original-path,
                * x-envoy-upstream-stream-duration-ms
                * 
            * diff --git a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/ExtensionChain.java b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/ExtensionChain.java index 810a9c2448fd..6378da86ea58 100644 --- a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/ExtensionChain.java +++ b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/ExtensionChain.java @@ -736,15 +736,17 @@ public interface ExtensionOrBuilder * * *
            -     * Required. The name for this extension.
            +     * Optional. The name for this extension.
                  * The name is logged as part of the HTTP request logs.
                  * The name must conform with RFC-1034, is restricted to lower-cased
                  * letters, numbers and hyphens, and can have a maximum length of 63
                  * characters. Additionally, the first character must be a letter and the
                  * last a letter or a number.
            +     *
            +     * This field is required except for AuthzExtension.
                  * 
            * - * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * string name = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @return The name. */ @@ -754,15 +756,17 @@ public interface ExtensionOrBuilder * * *
            -     * Required. The name for this extension.
            +     * Optional. The name for this extension.
                  * The name is logged as part of the HTTP request logs.
                  * The name must conform with RFC-1034, is restricted to lower-cased
                  * letters, numbers and hyphens, and can have a maximum length of 63
                  * characters. Additionally, the first character must be a letter and the
                  * last a letter or a number.
            +     *
            +     * This field is required except for AuthzExtension.
                  * 
            * - * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * string name = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for name. */ @@ -886,6 +890,10 @@ public interface ExtensionOrBuilder * * For the `LbEdgeExtension` resource, this field is required and must only * contain `REQUEST_HEADERS` event. + * + * For the `AuthzExtension` resource, this field is optional. + * `REQUEST_HEADERS` is the only supported event. If unspecified, + * `REQUEST_HEADERS` event is assumed as supported. * * * @@ -910,6 +918,10 @@ public interface ExtensionOrBuilder * * For the `LbEdgeExtension` resource, this field is required and must only * contain `REQUEST_HEADERS` event. + * + * For the `AuthzExtension` resource, this field is optional. + * `REQUEST_HEADERS` is the only supported event. If unspecified, + * `REQUEST_HEADERS` event is assumed as supported. * * * @@ -934,6 +946,10 @@ public interface ExtensionOrBuilder * * For the `LbEdgeExtension` resource, this field is required and must only * contain `REQUEST_HEADERS` event. + * + * For the `AuthzExtension` resource, this field is optional. + * `REQUEST_HEADERS` is the only supported event. If unspecified, + * `REQUEST_HEADERS` event is assumed as supported. * * * @@ -959,6 +975,10 @@ public interface ExtensionOrBuilder * * For the `LbEdgeExtension` resource, this field is required and must only * contain `REQUEST_HEADERS` event. + * + * For the `AuthzExtension` resource, this field is optional. + * `REQUEST_HEADERS` is the only supported event. If unspecified, + * `REQUEST_HEADERS` event is assumed as supported. * * * @@ -983,6 +1003,10 @@ public interface ExtensionOrBuilder * * For the `LbEdgeExtension` resource, this field is required and must only * contain `REQUEST_HEADERS` event. + * + * For the `AuthzExtension` resource, this field is optional. + * `REQUEST_HEADERS` is the only supported event. If unspecified, + * `REQUEST_HEADERS` event is assumed as supported. * * * @@ -1134,6 +1158,96 @@ public interface ExtensionOrBuilder */ com.google.protobuf.ByteString getForwardHeadersBytes(int index); + /** + * + * + *
            +     * Optional. List of the Envoy attributes to forward to the extension
            +     * server. The attributes provided here are included as part of the
            +     * `ProcessingRequest.attributes` field (of type
            +     * `map<string, google.protobuf.Struct>`), where the keys are the attribute
            +     * names. Refer to the
            +     * [documentation](https://cloud.google.com/service-extensions/docs/cel-matcher-language-reference#attributes)
            +     * for the names of attributes that can be forwarded. If omitted, no
            +     * attributes are sent. Each element is a string indicating the
            +     * attribute name.
            +     * 
            + * + * repeated string forward_attributes = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the forwardAttributes. + */ + java.util.List getForwardAttributesList(); + + /** + * + * + *
            +     * Optional. List of the Envoy attributes to forward to the extension
            +     * server. The attributes provided here are included as part of the
            +     * `ProcessingRequest.attributes` field (of type
            +     * `map<string, google.protobuf.Struct>`), where the keys are the attribute
            +     * names. Refer to the
            +     * [documentation](https://cloud.google.com/service-extensions/docs/cel-matcher-language-reference#attributes)
            +     * for the names of attributes that can be forwarded. If omitted, no
            +     * attributes are sent. Each element is a string indicating the
            +     * attribute name.
            +     * 
            + * + * repeated string forward_attributes = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The count of forwardAttributes. + */ + int getForwardAttributesCount(); + + /** + * + * + *
            +     * Optional. List of the Envoy attributes to forward to the extension
            +     * server. The attributes provided here are included as part of the
            +     * `ProcessingRequest.attributes` field (of type
            +     * `map<string, google.protobuf.Struct>`), where the keys are the attribute
            +     * names. Refer to the
            +     * [documentation](https://cloud.google.com/service-extensions/docs/cel-matcher-language-reference#attributes)
            +     * for the names of attributes that can be forwarded. If omitted, no
            +     * attributes are sent. Each element is a string indicating the
            +     * attribute name.
            +     * 
            + * + * repeated string forward_attributes = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the element to return. + * @return The forwardAttributes at the given index. + */ + java.lang.String getForwardAttributes(int index); + + /** + * + * + *
            +     * Optional. List of the Envoy attributes to forward to the extension
            +     * server. The attributes provided here are included as part of the
            +     * `ProcessingRequest.attributes` field (of type
            +     * `map<string, google.protobuf.Struct>`), where the keys are the attribute
            +     * names. Refer to the
            +     * [documentation](https://cloud.google.com/service-extensions/docs/cel-matcher-language-reference#attributes)
            +     * for the names of attributes that can be forwarded. If omitted, no
            +     * attributes are sent. Each element is a string indicating the
            +     * attribute name.
            +     * 
            + * + * repeated string forward_attributes = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the value to return. + * @return The bytes of the forwardAttributes at the given index. + */ + com.google.protobuf.ByteString getForwardAttributesBytes(int index); + /** * * @@ -1142,7 +1256,10 @@ public interface ExtensionOrBuilder * `metadata_context` (of type `google.protobuf.Struct`) in the * `ProcessingRequest` message sent to the extension server. * - * The metadata is available under the namespace + * For `AuthzExtension` resources, the metadata is available under the + * namespace `com.google.authz_extension.<resource_name>`. + * For other types of extensions, the metadata is available under the + * namespace * `com.google.<extension_type>.<resource_name>.<extension_chain_name>.<extension_name>`. * For example: * `com.google.lb_traffic_extension.lbtrafficextension1.chain1.ext1`. @@ -1182,7 +1299,10 @@ public interface ExtensionOrBuilder * `metadata_context` (of type `google.protobuf.Struct`) in the * `ProcessingRequest` message sent to the extension server. * - * The metadata is available under the namespace + * For `AuthzExtension` resources, the metadata is available under the + * namespace `com.google.authz_extension.<resource_name>`. + * For other types of extensions, the metadata is available under the + * namespace * `com.google.<extension_type>.<resource_name>.<extension_chain_name>.<extension_name>`. * For example: * `com.google.lb_traffic_extension.lbtrafficextension1.chain1.ext1`. @@ -1222,7 +1342,10 @@ public interface ExtensionOrBuilder * `metadata_context` (of type `google.protobuf.Struct`) in the * `ProcessingRequest` message sent to the extension server. * - * The metadata is available under the namespace + * For `AuthzExtension` resources, the metadata is available under the + * namespace `com.google.authz_extension.<resource_name>`. + * For other types of extensions, the metadata is available under the + * namespace * `com.google.<extension_type>.<resource_name>.<extension_chain_name>.<extension_name>`. * For example: * `com.google.lb_traffic_extension.lbtrafficextension1.chain1.ext1`. @@ -1251,6 +1374,133 @@ public interface ExtensionOrBuilder * .google.protobuf.Struct metadata = 9 [(.google.api.field_behavior) = OPTIONAL]; */ com.google.protobuf.StructOrBuilder getMetadataOrBuilder(); + + /** + * + * + *
            +     * Optional. Configures the send mode for request body processing.
            +     *
            +     * The field can only be set if `supported_events` includes `REQUEST_BODY`.
            +     * If `supported_events` includes `REQUEST_BODY`,
            +     * but `request_body_send_mode` is unset, the default value `STREAMED` is
            +     * used.
            +     *
            +     * When this field is set to `FULL_DUPLEX_STREAMED`, `supported_events`
            +     * must include both `REQUEST_BODY` and `REQUEST_TRAILERS`.
            +     *
            +     * This field can be set only for `LbTrafficExtension` and
            +     * `LbRouteExtension` resources, and only when the `service` field of the
            +     * extension points to a `BackendService`. Only `FULL_DUPLEX_STREAMED` mode
            +     * is supported for `LbRouteExtension` resources.
            +     * 
            + * + * + * .google.cloud.networkservices.v1.BodySendMode request_body_send_mode = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for requestBodySendMode. + */ + int getRequestBodySendModeValue(); + + /** + * + * + *
            +     * Optional. Configures the send mode for request body processing.
            +     *
            +     * The field can only be set if `supported_events` includes `REQUEST_BODY`.
            +     * If `supported_events` includes `REQUEST_BODY`,
            +     * but `request_body_send_mode` is unset, the default value `STREAMED` is
            +     * used.
            +     *
            +     * When this field is set to `FULL_DUPLEX_STREAMED`, `supported_events`
            +     * must include both `REQUEST_BODY` and `REQUEST_TRAILERS`.
            +     *
            +     * This field can be set only for `LbTrafficExtension` and
            +     * `LbRouteExtension` resources, and only when the `service` field of the
            +     * extension points to a `BackendService`. Only `FULL_DUPLEX_STREAMED` mode
            +     * is supported for `LbRouteExtension` resources.
            +     * 
            + * + * + * .google.cloud.networkservices.v1.BodySendMode request_body_send_mode = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The requestBodySendMode. + */ + com.google.cloud.networkservices.v1.BodySendMode getRequestBodySendMode(); + + /** + * + * + *
            +     * Optional. Configures the send mode for response processing. If
            +     * unspecified, the default value `STREAMED` is used.
            +     *
            +     * The field can only be set if `supported_events` includes `RESPONSE_BODY`.
            +     * If `supported_events` includes `RESPONSE_BODY`, but
            +     * `response_body_send_mode` is unset, the default value `STREAMED` is used.
            +     *
            +     * When this field is set to `FULL_DUPLEX_STREAMED`, `supported_events`
            +     * must include both `RESPONSE_BODY` and `RESPONSE_TRAILERS`.
            +     *
            +     * This field can be set only for `LbTrafficExtension` resources, and only
            +     * when the `service` field of the extension points to a `BackendService`.
            +     * 
            + * + * + * .google.cloud.networkservices.v1.BodySendMode response_body_send_mode = 15 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for responseBodySendMode. + */ + int getResponseBodySendModeValue(); + + /** + * + * + *
            +     * Optional. Configures the send mode for response processing. If
            +     * unspecified, the default value `STREAMED` is used.
            +     *
            +     * The field can only be set if `supported_events` includes `RESPONSE_BODY`.
            +     * If `supported_events` includes `RESPONSE_BODY`, but
            +     * `response_body_send_mode` is unset, the default value `STREAMED` is used.
            +     *
            +     * When this field is set to `FULL_DUPLEX_STREAMED`, `supported_events`
            +     * must include both `RESPONSE_BODY` and `RESPONSE_TRAILERS`.
            +     *
            +     * This field can be set only for `LbTrafficExtension` resources, and only
            +     * when the `service` field of the extension points to a `BackendService`.
            +     * 
            + * + * + * .google.cloud.networkservices.v1.BodySendMode response_body_send_mode = 15 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The responseBodySendMode. + */ + com.google.cloud.networkservices.v1.BodySendMode getResponseBodySendMode(); + + /** + * + * + *
            +     * Optional. When set to `true`, the calls to the extension backend are
            +     * performed asynchronously, without pausing the processing of the ongoing
            +     * request. In this mode, only `STREAMED` (default) body processing is
            +     * supported. Responses, if any, are ignored.
            +     *
            +     * Supported by regional `LbTrafficExtension` and `LbRouteExtension`
            +     * resources.
            +     * 
            + * + * bool observability_mode = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The observabilityMode. + */ + boolean getObservabilityMode(); } /** @@ -1289,6 +1539,9 @@ private Extension() { service_ = ""; supportedEvents_ = emptyIntList(); forwardHeaders_ = com.google.protobuf.LazyStringArrayList.emptyList(); + forwardAttributes_ = com.google.protobuf.LazyStringArrayList.emptyList(); + requestBodySendMode_ = 0; + responseBodySendMode_ = 0; } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @@ -1316,15 +1569,17 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * *
            -     * Required. The name for this extension.
            +     * Optional. The name for this extension.
                  * The name is logged as part of the HTTP request logs.
                  * The name must conform with RFC-1034, is restricted to lower-cased
                  * letters, numbers and hyphens, and can have a maximum length of 63
                  * characters. Additionally, the first character must be a letter and the
                  * last a letter or a number.
            +     *
            +     * This field is required except for AuthzExtension.
                  * 
            * - * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * string name = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @return The name. */ @@ -1345,15 +1600,17 @@ public java.lang.String getName() { * * *
            -     * Required. The name for this extension.
            +     * Optional. The name for this extension.
                  * The name is logged as part of the HTTP request logs.
                  * The name must conform with RFC-1034, is restricted to lower-cased
                  * letters, numbers and hyphens, and can have a maximum length of 63
                  * characters. Additionally, the first character must be a letter and the
                  * last a letter or a number.
            +     *
            +     * This field is required except for AuthzExtension.
                  * 
            * - * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * string name = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for name. */ @@ -1561,6 +1818,10 @@ public com.google.cloud.networkservices.v1.EventType convert(int from) { * * For the `LbEdgeExtension` resource, this field is required and must only * contain `REQUEST_HEADERS` event. + * + * For the `AuthzExtension` resource, this field is optional. + * `REQUEST_HEADERS` is the only supported event. If unspecified, + * `REQUEST_HEADERS` event is assumed as supported. * * * @@ -1590,6 +1851,10 @@ public java.util.List getSupporte * * For the `LbEdgeExtension` resource, this field is required and must only * contain `REQUEST_HEADERS` event. + * + * For the `AuthzExtension` resource, this field is optional. + * `REQUEST_HEADERS` is the only supported event. If unspecified, + * `REQUEST_HEADERS` event is assumed as supported. * * * @@ -1617,6 +1882,10 @@ public int getSupportedEventsCount() { * * For the `LbEdgeExtension` resource, this field is required and must only * contain `REQUEST_HEADERS` event. + * + * For the `AuthzExtension` resource, this field is optional. + * `REQUEST_HEADERS` is the only supported event. If unspecified, + * `REQUEST_HEADERS` event is assumed as supported. * * * @@ -1645,6 +1914,10 @@ public com.google.cloud.networkservices.v1.EventType getSupportedEvents(int inde * * For the `LbEdgeExtension` resource, this field is required and must only * contain `REQUEST_HEADERS` event. + * + * For the `AuthzExtension` resource, this field is optional. + * `REQUEST_HEADERS` is the only supported event. If unspecified, + * `REQUEST_HEADERS` event is assumed as supported. * * * @@ -1672,6 +1945,10 @@ public java.util.List getSupportedEventsValueList() { * * For the `LbEdgeExtension` resource, this field is required and must only * contain `REQUEST_HEADERS` event. + * + * For the `AuthzExtension` resource, this field is optional. + * `REQUEST_HEADERS` is the only supported event. If unspecified, + * `REQUEST_HEADERS` event is assumed as supported. * * * @@ -1860,6 +2137,110 @@ public com.google.protobuf.ByteString getForwardHeadersBytes(int index) { return forwardHeaders_.getByteString(index); } + public static final int FORWARD_ATTRIBUTES_FIELD_NUMBER = 8; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList forwardAttributes_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + /** + * + * + *
            +     * Optional. List of the Envoy attributes to forward to the extension
            +     * server. The attributes provided here are included as part of the
            +     * `ProcessingRequest.attributes` field (of type
            +     * `map<string, google.protobuf.Struct>`), where the keys are the attribute
            +     * names. Refer to the
            +     * [documentation](https://cloud.google.com/service-extensions/docs/cel-matcher-language-reference#attributes)
            +     * for the names of attributes that can be forwarded. If omitted, no
            +     * attributes are sent. Each element is a string indicating the
            +     * attribute name.
            +     * 
            + * + * repeated string forward_attributes = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the forwardAttributes. + */ + public com.google.protobuf.ProtocolStringList getForwardAttributesList() { + return forwardAttributes_; + } + + /** + * + * + *
            +     * Optional. List of the Envoy attributes to forward to the extension
            +     * server. The attributes provided here are included as part of the
            +     * `ProcessingRequest.attributes` field (of type
            +     * `map<string, google.protobuf.Struct>`), where the keys are the attribute
            +     * names. Refer to the
            +     * [documentation](https://cloud.google.com/service-extensions/docs/cel-matcher-language-reference#attributes)
            +     * for the names of attributes that can be forwarded. If omitted, no
            +     * attributes are sent. Each element is a string indicating the
            +     * attribute name.
            +     * 
            + * + * repeated string forward_attributes = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The count of forwardAttributes. + */ + public int getForwardAttributesCount() { + return forwardAttributes_.size(); + } + + /** + * + * + *
            +     * Optional. List of the Envoy attributes to forward to the extension
            +     * server. The attributes provided here are included as part of the
            +     * `ProcessingRequest.attributes` field (of type
            +     * `map<string, google.protobuf.Struct>`), where the keys are the attribute
            +     * names. Refer to the
            +     * [documentation](https://cloud.google.com/service-extensions/docs/cel-matcher-language-reference#attributes)
            +     * for the names of attributes that can be forwarded. If omitted, no
            +     * attributes are sent. Each element is a string indicating the
            +     * attribute name.
            +     * 
            + * + * repeated string forward_attributes = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the element to return. + * @return The forwardAttributes at the given index. + */ + public java.lang.String getForwardAttributes(int index) { + return forwardAttributes_.get(index); + } + + /** + * + * + *
            +     * Optional. List of the Envoy attributes to forward to the extension
            +     * server. The attributes provided here are included as part of the
            +     * `ProcessingRequest.attributes` field (of type
            +     * `map<string, google.protobuf.Struct>`), where the keys are the attribute
            +     * names. Refer to the
            +     * [documentation](https://cloud.google.com/service-extensions/docs/cel-matcher-language-reference#attributes)
            +     * for the names of attributes that can be forwarded. If omitted, no
            +     * attributes are sent. Each element is a string indicating the
            +     * attribute name.
            +     * 
            + * + * repeated string forward_attributes = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the value to return. + * @return The bytes of the forwardAttributes at the given index. + */ + public com.google.protobuf.ByteString getForwardAttributesBytes(int index) { + return forwardAttributes_.getByteString(index); + } + public static final int METADATA_FIELD_NUMBER = 9; private com.google.protobuf.Struct metadata_; @@ -1871,7 +2252,10 @@ public com.google.protobuf.ByteString getForwardHeadersBytes(int index) { * `metadata_context` (of type `google.protobuf.Struct`) in the * `ProcessingRequest` message sent to the extension server. * - * The metadata is available under the namespace + * For `AuthzExtension` resources, the metadata is available under the + * namespace `com.google.authz_extension.<resource_name>`. + * For other types of extensions, the metadata is available under the + * namespace * `com.google.<extension_type>.<resource_name>.<extension_chain_name>.<extension_name>`. * For example: * `com.google.lb_traffic_extension.lbtrafficextension1.chain1.ext1`. @@ -1914,7 +2298,10 @@ public boolean hasMetadata() { * `metadata_context` (of type `google.protobuf.Struct`) in the * `ProcessingRequest` message sent to the extension server. * - * The metadata is available under the namespace + * For `AuthzExtension` resources, the metadata is available under the + * namespace `com.google.authz_extension.<resource_name>`. + * For other types of extensions, the metadata is available under the + * namespace * `com.google.<extension_type>.<resource_name>.<extension_chain_name>.<extension_name>`. * For example: * `com.google.lb_traffic_extension.lbtrafficextension1.chain1.ext1`. @@ -1957,7 +2344,10 @@ public com.google.protobuf.Struct getMetadata() { * `metadata_context` (of type `google.protobuf.Struct`) in the * `ProcessingRequest` message sent to the extension server. * - * The metadata is available under the namespace + * For `AuthzExtension` resources, the metadata is available under the + * namespace `com.google.authz_extension.<resource_name>`. + * For other types of extensions, the metadata is available under the + * namespace * `com.google.<extension_type>.<resource_name>.<extension_chain_name>.<extension_name>`. * For example: * `com.google.lb_traffic_extension.lbtrafficextension1.chain1.ext1`. @@ -1990,67 +2380,242 @@ public com.google.protobuf.StructOrBuilder getMetadataOrBuilder() { return metadata_ == null ? com.google.protobuf.Struct.getDefaultInstance() : metadata_; } - private byte memoizedIsInitialized = -1; + public static final int REQUEST_BODY_SEND_MODE_FIELD_NUMBER = 14; + private int requestBodySendMode_ = 0; + /** + * + * + *
            +     * Optional. Configures the send mode for request body processing.
            +     *
            +     * The field can only be set if `supported_events` includes `REQUEST_BODY`.
            +     * If `supported_events` includes `REQUEST_BODY`,
            +     * but `request_body_send_mode` is unset, the default value `STREAMED` is
            +     * used.
            +     *
            +     * When this field is set to `FULL_DUPLEX_STREAMED`, `supported_events`
            +     * must include both `REQUEST_BODY` and `REQUEST_TRAILERS`.
            +     *
            +     * This field can be set only for `LbTrafficExtension` and
            +     * `LbRouteExtension` resources, and only when the `service` field of the
            +     * extension points to a `BackendService`. Only `FULL_DUPLEX_STREAMED` mode
            +     * is supported for `LbRouteExtension` resources.
            +     * 
            + * + * + * .google.cloud.networkservices.v1.BodySendMode request_body_send_mode = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for requestBodySendMode. + */ @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; + public int getRequestBodySendModeValue() { + return requestBodySendMode_; } + /** + * + * + *
            +     * Optional. Configures the send mode for request body processing.
            +     *
            +     * The field can only be set if `supported_events` includes `REQUEST_BODY`.
            +     * If `supported_events` includes `REQUEST_BODY`,
            +     * but `request_body_send_mode` is unset, the default value `STREAMED` is
            +     * used.
            +     *
            +     * When this field is set to `FULL_DUPLEX_STREAMED`, `supported_events`
            +     * must include both `REQUEST_BODY` and `REQUEST_TRAILERS`.
            +     *
            +     * This field can be set only for `LbTrafficExtension` and
            +     * `LbRouteExtension` resources, and only when the `service` field of the
            +     * extension points to a `BackendService`. Only `FULL_DUPLEX_STREAMED` mode
            +     * is supported for `LbRouteExtension` resources.
            +     * 
            + * + * + * .google.cloud.networkservices.v1.BodySendMode request_body_send_mode = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The requestBodySendMode. + */ @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - getSerializedSize(); - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(authority_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 2, authority_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(service_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 3, service_); - } - if (getSupportedEventsList().size() > 0) { - output.writeUInt32NoTag(34); - output.writeUInt32NoTag(supportedEventsMemoizedSerializedSize); - } - for (int i = 0; i < supportedEvents_.size(); i++) { - output.writeEnumNoTag(supportedEvents_.getInt(i)); - } - if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(5, getTimeout()); - } - if (failOpen_ != false) { - output.writeBool(6, failOpen_); - } - for (int i = 0; i < forwardHeaders_.size(); i++) { - com.google.protobuf.GeneratedMessage.writeString(output, 7, forwardHeaders_.getRaw(i)); - } - if (((bitField0_ & 0x00000002) != 0)) { - output.writeMessage(9, getMetadata()); - } - getUnknownFields().writeTo(output); + public com.google.cloud.networkservices.v1.BodySendMode getRequestBodySendMode() { + com.google.cloud.networkservices.v1.BodySendMode result = + com.google.cloud.networkservices.v1.BodySendMode.forNumber(requestBodySendMode_); + return result == null + ? com.google.cloud.networkservices.v1.BodySendMode.UNRECOGNIZED + : result; } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; + public static final int RESPONSE_BODY_SEND_MODE_FIELD_NUMBER = 15; + private int responseBodySendMode_ = 0; - size = 0; - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(authority_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(2, authority_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(service_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(3, service_); - } + /** + * + * + *
            +     * Optional. Configures the send mode for response processing. If
            +     * unspecified, the default value `STREAMED` is used.
            +     *
            +     * The field can only be set if `supported_events` includes `RESPONSE_BODY`.
            +     * If `supported_events` includes `RESPONSE_BODY`, but
            +     * `response_body_send_mode` is unset, the default value `STREAMED` is used.
            +     *
            +     * When this field is set to `FULL_DUPLEX_STREAMED`, `supported_events`
            +     * must include both `RESPONSE_BODY` and `RESPONSE_TRAILERS`.
            +     *
            +     * This field can be set only for `LbTrafficExtension` resources, and only
            +     * when the `service` field of the extension points to a `BackendService`.
            +     * 
            + * + * + * .google.cloud.networkservices.v1.BodySendMode response_body_send_mode = 15 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for responseBodySendMode. + */ + @java.lang.Override + public int getResponseBodySendModeValue() { + return responseBodySendMode_; + } + + /** + * + * + *
            +     * Optional. Configures the send mode for response processing. If
            +     * unspecified, the default value `STREAMED` is used.
            +     *
            +     * The field can only be set if `supported_events` includes `RESPONSE_BODY`.
            +     * If `supported_events` includes `RESPONSE_BODY`, but
            +     * `response_body_send_mode` is unset, the default value `STREAMED` is used.
            +     *
            +     * When this field is set to `FULL_DUPLEX_STREAMED`, `supported_events`
            +     * must include both `RESPONSE_BODY` and `RESPONSE_TRAILERS`.
            +     *
            +     * This field can be set only for `LbTrafficExtension` resources, and only
            +     * when the `service` field of the extension points to a `BackendService`.
            +     * 
            + * + * + * .google.cloud.networkservices.v1.BodySendMode response_body_send_mode = 15 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The responseBodySendMode. + */ + @java.lang.Override + public com.google.cloud.networkservices.v1.BodySendMode getResponseBodySendMode() { + com.google.cloud.networkservices.v1.BodySendMode result = + com.google.cloud.networkservices.v1.BodySendMode.forNumber(responseBodySendMode_); + return result == null + ? com.google.cloud.networkservices.v1.BodySendMode.UNRECOGNIZED + : result; + } + + public static final int OBSERVABILITY_MODE_FIELD_NUMBER = 16; + private boolean observabilityMode_ = false; + + /** + * + * + *
            +     * Optional. When set to `true`, the calls to the extension backend are
            +     * performed asynchronously, without pausing the processing of the ongoing
            +     * request. In this mode, only `STREAMED` (default) body processing is
            +     * supported. Responses, if any, are ignored.
            +     *
            +     * Supported by regional `LbTrafficExtension` and `LbRouteExtension`
            +     * resources.
            +     * 
            + * + * bool observability_mode = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The observabilityMode. + */ + @java.lang.Override + public boolean getObservabilityMode() { + return observabilityMode_; + } + + 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 { + getSerializedSize(); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(authority_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, authority_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(service_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, service_); + } + if (getSupportedEventsList().size() > 0) { + output.writeUInt32NoTag(34); + output.writeUInt32NoTag(supportedEventsMemoizedSerializedSize); + } + for (int i = 0; i < supportedEvents_.size(); i++) { + output.writeEnumNoTag(supportedEvents_.getInt(i)); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(5, getTimeout()); + } + if (failOpen_ != false) { + output.writeBool(6, failOpen_); + } + for (int i = 0; i < forwardHeaders_.size(); i++) { + com.google.protobuf.GeneratedMessage.writeString(output, 7, forwardHeaders_.getRaw(i)); + } + for (int i = 0; i < forwardAttributes_.size(); i++) { + com.google.protobuf.GeneratedMessage.writeString(output, 8, forwardAttributes_.getRaw(i)); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(9, getMetadata()); + } + if (requestBodySendMode_ + != com.google.cloud.networkservices.v1.BodySendMode.BODY_SEND_MODE_UNSPECIFIED + .getNumber()) { + output.writeEnum(14, requestBodySendMode_); + } + if (responseBodySendMode_ + != com.google.cloud.networkservices.v1.BodySendMode.BODY_SEND_MODE_UNSPECIFIED + .getNumber()) { + output.writeEnum(15, responseBodySendMode_); + } + if (observabilityMode_ != false) { + output.writeBool(16, observabilityMode_); + } + 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(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(authority_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, authority_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(service_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, service_); + } { int dataSize = 0; for (int i = 0; i < supportedEvents_.size(); i++) { @@ -2079,9 +2644,30 @@ public int getSerializedSize() { size += dataSize; size += 1 * getForwardHeadersList().size(); } + { + int dataSize = 0; + for (int i = 0; i < forwardAttributes_.size(); i++) { + dataSize += computeStringSizeNoTag(forwardAttributes_.getRaw(i)); + } + size += dataSize; + size += 1 * getForwardAttributesList().size(); + } if (((bitField0_ & 0x00000002) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(9, getMetadata()); } + if (requestBodySendMode_ + != com.google.cloud.networkservices.v1.BodySendMode.BODY_SEND_MODE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(14, requestBodySendMode_); + } + if (responseBodySendMode_ + != com.google.cloud.networkservices.v1.BodySendMode.BODY_SEND_MODE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(15, responseBodySendMode_); + } + if (observabilityMode_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(16, observabilityMode_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -2108,10 +2694,14 @@ public boolean equals(final java.lang.Object obj) { } if (getFailOpen() != other.getFailOpen()) return false; if (!getForwardHeadersList().equals(other.getForwardHeadersList())) return false; + if (!getForwardAttributesList().equals(other.getForwardAttributesList())) return false; if (hasMetadata() != other.hasMetadata()) return false; if (hasMetadata()) { if (!getMetadata().equals(other.getMetadata())) return false; } + if (requestBodySendMode_ != other.requestBodySendMode_) return false; + if (responseBodySendMode_ != other.responseBodySendMode_) return false; + if (getObservabilityMode() != other.getObservabilityMode()) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -2143,10 +2733,20 @@ public int hashCode() { hash = (37 * hash) + FORWARD_HEADERS_FIELD_NUMBER; hash = (53 * hash) + getForwardHeadersList().hashCode(); } + if (getForwardAttributesCount() > 0) { + hash = (37 * hash) + FORWARD_ATTRIBUTES_FIELD_NUMBER; + hash = (53 * hash) + getForwardAttributesList().hashCode(); + } if (hasMetadata()) { hash = (37 * hash) + METADATA_FIELD_NUMBER; hash = (53 * hash) + getMetadata().hashCode(); } + hash = (37 * hash) + REQUEST_BODY_SEND_MODE_FIELD_NUMBER; + hash = (53 * hash) + requestBodySendMode_; + hash = (37 * hash) + RESPONSE_BODY_SEND_MODE_FIELD_NUMBER; + hash = (53 * hash) + responseBodySendMode_; + hash = (37 * hash) + OBSERVABILITY_MODE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getObservabilityMode()); hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -2309,11 +2909,15 @@ public Builder clear() { } failOpen_ = false; forwardHeaders_ = com.google.protobuf.LazyStringArrayList.emptyList(); + forwardAttributes_ = com.google.protobuf.LazyStringArrayList.emptyList(); metadata_ = null; if (metadataBuilder_ != null) { metadataBuilder_.dispose(); metadataBuilder_ = null; } + requestBodySendMode_ = 0; + responseBodySendMode_ = 0; + observabilityMode_ = false; return this; } @@ -2378,9 +2982,22 @@ private void buildPartial0( result.forwardHeaders_ = forwardHeaders_; } if (((from_bitField0_ & 0x00000080) != 0)) { + forwardAttributes_.makeImmutable(); + result.forwardAttributes_ = forwardAttributes_; + } + if (((from_bitField0_ & 0x00000100) != 0)) { result.metadata_ = metadataBuilder_ == null ? metadata_ : metadataBuilder_.build(); to_bitField0_ |= 0x00000002; } + if (((from_bitField0_ & 0x00000200) != 0)) { + result.requestBodySendMode_ = requestBodySendMode_; + } + if (((from_bitField0_ & 0x00000400) != 0)) { + result.responseBodySendMode_ = responseBodySendMode_; + } + if (((from_bitField0_ & 0x00000800) != 0)) { + result.observabilityMode_ = observabilityMode_; + } result.bitField0_ |= to_bitField0_; } @@ -2440,9 +3057,28 @@ public Builder mergeFrom(com.google.cloud.networkservices.v1.ExtensionChain.Exte } onChanged(); } + if (!other.forwardAttributes_.isEmpty()) { + if (forwardAttributes_.isEmpty()) { + forwardAttributes_ = other.forwardAttributes_; + bitField0_ |= 0x00000080; + } else { + ensureForwardAttributesIsMutable(); + forwardAttributes_.addAll(other.forwardAttributes_); + } + onChanged(); + } if (other.hasMetadata()) { mergeMetadata(other.getMetadata()); } + if (other.requestBodySendMode_ != 0) { + setRequestBodySendModeValue(other.getRequestBodySendModeValue()); + } + if (other.responseBodySendMode_ != 0) { + setResponseBodySendModeValue(other.getResponseBodySendModeValue()); + } + if (other.getObservabilityMode() != false) { + setObservabilityMode(other.getObservabilityMode()); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -2525,13 +3161,38 @@ public Builder mergeFrom( forwardHeaders_.add(s); break; } // case 58 + case 66: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureForwardAttributesIsMutable(); + forwardAttributes_.add(s); + break; + } // case 66 case 74: { input.readMessage( internalGetMetadataFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000080; + bitField0_ |= 0x00000100; break; } // case 74 + case 112: + { + requestBodySendMode_ = input.readEnum(); + bitField0_ |= 0x00000200; + break; + } // case 112 + case 120: + { + responseBodySendMode_ = input.readEnum(); + bitField0_ |= 0x00000400; + break; + } // case 120 + case 128: + { + observabilityMode_ = input.readBool(); + bitField0_ |= 0x00000800; + break; + } // case 128 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -2557,15 +3218,17 @@ public Builder mergeFrom( * * *
            -       * Required. The name for this extension.
            +       * Optional. The name for this extension.
                    * The name is logged as part of the HTTP request logs.
                    * The name must conform with RFC-1034, is restricted to lower-cased
                    * letters, numbers and hyphens, and can have a maximum length of 63
                    * characters. Additionally, the first character must be a letter and the
                    * last a letter or a number.
            +       *
            +       * This field is required except for AuthzExtension.
                    * 
            * - * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * string name = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @return The name. */ @@ -2585,15 +3248,17 @@ public java.lang.String getName() { * * *
            -       * Required. The name for this extension.
            +       * Optional. The name for this extension.
                    * The name is logged as part of the HTTP request logs.
                    * The name must conform with RFC-1034, is restricted to lower-cased
                    * letters, numbers and hyphens, and can have a maximum length of 63
                    * characters. Additionally, the first character must be a letter and the
                    * last a letter or a number.
            +       *
            +       * This field is required except for AuthzExtension.
                    * 
            * - * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * string name = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for name. */ @@ -2613,15 +3278,17 @@ public com.google.protobuf.ByteString getNameBytes() { * * *
            -       * Required. The name for this extension.
            +       * Optional. The name for this extension.
                    * The name is logged as part of the HTTP request logs.
                    * The name must conform with RFC-1034, is restricted to lower-cased
                    * letters, numbers and hyphens, and can have a maximum length of 63
                    * characters. Additionally, the first character must be a letter and the
                    * last a letter or a number.
            +       *
            +       * This field is required except for AuthzExtension.
                    * 
            * - * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * string name = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The name to set. * @return This builder for chaining. @@ -2640,15 +3307,17 @@ public Builder setName(java.lang.String value) { * * *
            -       * Required. The name for this extension.
            +       * Optional. The name for this extension.
                    * The name is logged as part of the HTTP request logs.
                    * The name must conform with RFC-1034, is restricted to lower-cased
                    * letters, numbers and hyphens, and can have a maximum length of 63
                    * characters. Additionally, the first character must be a letter and the
                    * last a letter or a number.
            +       *
            +       * This field is required except for AuthzExtension.
                    * 
            * - * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * string name = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @return This builder for chaining. */ @@ -2663,15 +3332,17 @@ public Builder clearName() { * * *
            -       * Required. The name for this extension.
            +       * Optional. The name for this extension.
                    * The name is logged as part of the HTTP request logs.
                    * The name must conform with RFC-1034, is restricted to lower-cased
                    * letters, numbers and hyphens, and can have a maximum length of 63
                    * characters. Additionally, the first character must be a letter and the
                    * last a letter or a number.
            +       *
            +       * This field is required except for AuthzExtension.
                    * 
            * - * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * string name = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The bytes for name to set. * @return This builder for chaining. @@ -3062,6 +3733,10 @@ private void ensureSupportedEventsIsMutable() { * * For the `LbEdgeExtension` resource, this field is required and must only * contain `REQUEST_HEADERS` event. + * + * For the `AuthzExtension` resource, this field is optional. + * `REQUEST_HEADERS` is the only supported event. If unspecified, + * `REQUEST_HEADERS` event is assumed as supported. * * * @@ -3091,6 +3766,10 @@ private void ensureSupportedEventsIsMutable() { * * For the `LbEdgeExtension` resource, this field is required and must only * contain `REQUEST_HEADERS` event. + * + * For the `AuthzExtension` resource, this field is optional. + * `REQUEST_HEADERS` is the only supported event. If unspecified, + * `REQUEST_HEADERS` event is assumed as supported. * * * @@ -3117,6 +3796,10 @@ public int getSupportedEventsCount() { * * For the `LbEdgeExtension` resource, this field is required and must only * contain `REQUEST_HEADERS` event. + * + * For the `AuthzExtension` resource, this field is optional. + * `REQUEST_HEADERS` is the only supported event. If unspecified, + * `REQUEST_HEADERS` event is assumed as supported. * * * @@ -3144,6 +3827,10 @@ public com.google.cloud.networkservices.v1.EventType getSupportedEvents(int inde * * For the `LbEdgeExtension` resource, this field is required and must only * contain `REQUEST_HEADERS` event. + * + * For the `AuthzExtension` resource, this field is optional. + * `REQUEST_HEADERS` is the only supported event. If unspecified, + * `REQUEST_HEADERS` event is assumed as supported. * * * @@ -3179,6 +3866,10 @@ public Builder setSupportedEvents( * * For the `LbEdgeExtension` resource, this field is required and must only * contain `REQUEST_HEADERS` event. + * + * For the `AuthzExtension` resource, this field is optional. + * `REQUEST_HEADERS` is the only supported event. If unspecified, + * `REQUEST_HEADERS` event is assumed as supported. * * * @@ -3212,6 +3903,10 @@ public Builder addSupportedEvents(com.google.cloud.networkservices.v1.EventType * * For the `LbEdgeExtension` resource, this field is required and must only * contain `REQUEST_HEADERS` event. + * + * For the `AuthzExtension` resource, this field is optional. + * `REQUEST_HEADERS` is the only supported event. If unspecified, + * `REQUEST_HEADERS` event is assumed as supported. * * * @@ -3245,6 +3940,10 @@ public Builder addAllSupportedEvents( * * For the `LbEdgeExtension` resource, this field is required and must only * contain `REQUEST_HEADERS` event. + * + * For the `AuthzExtension` resource, this field is optional. + * `REQUEST_HEADERS` is the only supported event. If unspecified, + * `REQUEST_HEADERS` event is assumed as supported. * * * @@ -3274,6 +3973,10 @@ public Builder clearSupportedEvents() { * * For the `LbEdgeExtension` resource, this field is required and must only * contain `REQUEST_HEADERS` event. + * + * For the `AuthzExtension` resource, this field is optional. + * `REQUEST_HEADERS` is the only supported event. If unspecified, + * `REQUEST_HEADERS` event is assumed as supported. * * * @@ -3301,6 +4004,10 @@ public java.util.List getSupportedEventsValueList() { * * For the `LbEdgeExtension` resource, this field is required and must only * contain `REQUEST_HEADERS` event. + * + * For the `AuthzExtension` resource, this field is optional. + * `REQUEST_HEADERS` is the only supported event. If unspecified, + * `REQUEST_HEADERS` event is assumed as supported. * * * @@ -3328,6 +4035,10 @@ public int getSupportedEventsValue(int index) { * * For the `LbEdgeExtension` resource, this field is required and must only * contain `REQUEST_HEADERS` event. + * + * For the `AuthzExtension` resource, this field is optional. + * `REQUEST_HEADERS` is the only supported event. If unspecified, + * `REQUEST_HEADERS` event is assumed as supported. * * * @@ -3359,6 +4070,10 @@ public Builder setSupportedEventsValue(int index, int value) { * * For the `LbEdgeExtension` resource, this field is required and must only * contain `REQUEST_HEADERS` event. + * + * For the `AuthzExtension` resource, this field is optional. + * `REQUEST_HEADERS` is the only supported event. If unspecified, + * `REQUEST_HEADERS` event is assumed as supported. * * * @@ -3389,6 +4104,10 @@ public Builder addSupportedEventsValue(int value) { * * For the `LbEdgeExtension` resource, this field is required and must only * contain `REQUEST_HEADERS` event. + * + * For the `AuthzExtension` resource, this field is optional. + * `REQUEST_HEADERS` is the only supported event. If unspecified, + * `REQUEST_HEADERS` event is assumed as supported. * * * @@ -3947,112 +4666,385 @@ public Builder addForwardHeadersBytes(com.google.protobuf.ByteString value) { return this; } - private com.google.protobuf.Struct metadata_; - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Struct, - com.google.protobuf.Struct.Builder, - com.google.protobuf.StructOrBuilder> - metadataBuilder_; + private com.google.protobuf.LazyStringArrayList forwardAttributes_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureForwardAttributesIsMutable() { + if (!forwardAttributes_.isModifiable()) { + forwardAttributes_ = new com.google.protobuf.LazyStringArrayList(forwardAttributes_); + } + bitField0_ |= 0x00000080; + } /** * * *
            -       * Optional. The metadata provided here is included as part of the
            -       * `metadata_context` (of type `google.protobuf.Struct`) in the
            -       * `ProcessingRequest` message sent to the extension server.
            -       *
            -       * The metadata is available under the namespace
            -       * `com.google.<extension_type>.<resource_name>.<extension_chain_name>.<extension_name>`.
            -       * For example:
            -       * `com.google.lb_traffic_extension.lbtrafficextension1.chain1.ext1`.
            -       *
            -       * The following variables are supported in the metadata:
            -       *
            -       * `{forwarding_rule_id}` - substituted with the forwarding rule's fully
            -       * qualified resource name.
            +       * Optional. List of the Envoy attributes to forward to the extension
            +       * server. The attributes provided here are included as part of the
            +       * `ProcessingRequest.attributes` field (of type
            +       * `map<string, google.protobuf.Struct>`), where the keys are the attribute
            +       * names. Refer to the
            +       * [documentation](https://cloud.google.com/service-extensions/docs/cel-matcher-language-reference#attributes)
            +       * for the names of attributes that can be forwarded. If omitted, no
            +       * attributes are sent. Each element is a string indicating the
            +       * attribute name.
            +       * 
            * - * This field must not be set for plugin extensions. Setting it results in - * a validation error. + * repeated string forward_attributes = 8 [(.google.api.field_behavior) = OPTIONAL]; + * * - * You can set metadata at either the resource level or the extension level. - * The extension level metadata is recommended because you can pass a - * different set of metadata through each extension to the backend. + * @return A list containing the forwardAttributes. + */ + public com.google.protobuf.ProtocolStringList getForwardAttributesList() { + forwardAttributes_.makeImmutable(); + return forwardAttributes_; + } + + /** * - * This field is subject to following limitations: * - * * The total size of the metadata must be less than 1KiB. - * * The total number of keys in the metadata must be less than 16. - * * The length of each key must be less than 64 characters. - * * The length of each value must be less than 1024 characters. - * * All values must be strings. + *
            +       * Optional. List of the Envoy attributes to forward to the extension
            +       * server. The attributes provided here are included as part of the
            +       * `ProcessingRequest.attributes` field (of type
            +       * `map<string, google.protobuf.Struct>`), where the keys are the attribute
            +       * names. Refer to the
            +       * [documentation](https://cloud.google.com/service-extensions/docs/cel-matcher-language-reference#attributes)
            +       * for the names of attributes that can be forwarded. If omitted, no
            +       * attributes are sent. Each element is a string indicating the
            +       * attribute name.
                    * 
            * - * .google.protobuf.Struct metadata = 9 [(.google.api.field_behavior) = OPTIONAL]; + * repeated string forward_attributes = 8 [(.google.api.field_behavior) = OPTIONAL]; * * - * @return Whether the metadata field is set. + * @return The count of forwardAttributes. */ - public boolean hasMetadata() { - return ((bitField0_ & 0x00000080) != 0); + public int getForwardAttributesCount() { + return forwardAttributes_.size(); } /** * * *
            -       * Optional. The metadata provided here is included as part of the
            -       * `metadata_context` (of type `google.protobuf.Struct`) in the
            -       * `ProcessingRequest` message sent to the extension server.
            +       * Optional. List of the Envoy attributes to forward to the extension
            +       * server. The attributes provided here are included as part of the
            +       * `ProcessingRequest.attributes` field (of type
            +       * `map<string, google.protobuf.Struct>`), where the keys are the attribute
            +       * names. Refer to the
            +       * [documentation](https://cloud.google.com/service-extensions/docs/cel-matcher-language-reference#attributes)
            +       * for the names of attributes that can be forwarded. If omitted, no
            +       * attributes are sent. Each element is a string indicating the
            +       * attribute name.
            +       * 
            * - * The metadata is available under the namespace - * `com.google.<extension_type>.<resource_name>.<extension_chain_name>.<extension_name>`. - * For example: - * `com.google.lb_traffic_extension.lbtrafficextension1.chain1.ext1`. + * repeated string forward_attributes = 8 [(.google.api.field_behavior) = OPTIONAL]; + * * - * The following variables are supported in the metadata: + * @param index The index of the element to return. + * @return The forwardAttributes at the given index. + */ + public java.lang.String getForwardAttributes(int index) { + return forwardAttributes_.get(index); + } + + /** * - * `{forwarding_rule_id}` - substituted with the forwarding rule's fully - * qualified resource name. * - * This field must not be set for plugin extensions. Setting it results in - * a validation error. + *
            +       * Optional. List of the Envoy attributes to forward to the extension
            +       * server. The attributes provided here are included as part of the
            +       * `ProcessingRequest.attributes` field (of type
            +       * `map<string, google.protobuf.Struct>`), where the keys are the attribute
            +       * names. Refer to the
            +       * [documentation](https://cloud.google.com/service-extensions/docs/cel-matcher-language-reference#attributes)
            +       * for the names of attributes that can be forwarded. If omitted, no
            +       * attributes are sent. Each element is a string indicating the
            +       * attribute name.
            +       * 
            * - * You can set metadata at either the resource level or the extension level. - * The extension level metadata is recommended because you can pass a - * different set of metadata through each extension to the backend. + * repeated string forward_attributes = 8 [(.google.api.field_behavior) = OPTIONAL]; + * * - * This field is subject to following limitations: + * @param index The index of the value to return. + * @return The bytes of the forwardAttributes at the given index. + */ + public com.google.protobuf.ByteString getForwardAttributesBytes(int index) { + return forwardAttributes_.getByteString(index); + } + + /** * - * * The total size of the metadata must be less than 1KiB. - * * The total number of keys in the metadata must be less than 16. - * * The length of each key must be less than 64 characters. - * * The length of each value must be less than 1024 characters. - * * All values must be strings. + * + *
            +       * Optional. List of the Envoy attributes to forward to the extension
            +       * server. The attributes provided here are included as part of the
            +       * `ProcessingRequest.attributes` field (of type
            +       * `map<string, google.protobuf.Struct>`), where the keys are the attribute
            +       * names. Refer to the
            +       * [documentation](https://cloud.google.com/service-extensions/docs/cel-matcher-language-reference#attributes)
            +       * for the names of attributes that can be forwarded. If omitted, no
            +       * attributes are sent. Each element is a string indicating the
            +       * attribute name.
                    * 
            * - * .google.protobuf.Struct metadata = 9 [(.google.api.field_behavior) = OPTIONAL]; + * repeated string forward_attributes = 8 [(.google.api.field_behavior) = OPTIONAL]; * * - * @return The metadata. + * @param index The index to set the value at. + * @param value The forwardAttributes to set. + * @return This builder for chaining. */ - public com.google.protobuf.Struct getMetadata() { - if (metadataBuilder_ == null) { - return metadata_ == null ? com.google.protobuf.Struct.getDefaultInstance() : metadata_; - } else { - return metadataBuilder_.getMessage(); + public Builder setForwardAttributes(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); } + ensureForwardAttributesIsMutable(); + forwardAttributes_.set(index, value); + bitField0_ |= 0x00000080; + onChanged(); + return this; } /** * * *
            -       * Optional. The metadata provided here is included as part of the
            -       * `metadata_context` (of type `google.protobuf.Struct`) in the
            -       * `ProcessingRequest` message sent to the extension server.
            +       * Optional. List of the Envoy attributes to forward to the extension
            +       * server. The attributes provided here are included as part of the
            +       * `ProcessingRequest.attributes` field (of type
            +       * `map<string, google.protobuf.Struct>`), where the keys are the attribute
            +       * names. Refer to the
            +       * [documentation](https://cloud.google.com/service-extensions/docs/cel-matcher-language-reference#attributes)
            +       * for the names of attributes that can be forwarded. If omitted, no
            +       * attributes are sent. Each element is a string indicating the
            +       * attribute name.
            +       * 
            * - * The metadata is available under the namespace + * repeated string forward_attributes = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The forwardAttributes to add. + * @return This builder for chaining. + */ + public Builder addForwardAttributes(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureForwardAttributesIsMutable(); + forwardAttributes_.add(value); + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + + /** + * + * + *
            +       * Optional. List of the Envoy attributes to forward to the extension
            +       * server. The attributes provided here are included as part of the
            +       * `ProcessingRequest.attributes` field (of type
            +       * `map<string, google.protobuf.Struct>`), where the keys are the attribute
            +       * names. Refer to the
            +       * [documentation](https://cloud.google.com/service-extensions/docs/cel-matcher-language-reference#attributes)
            +       * for the names of attributes that can be forwarded. If omitted, no
            +       * attributes are sent. Each element is a string indicating the
            +       * attribute name.
            +       * 
            + * + * repeated string forward_attributes = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param values The forwardAttributes to add. + * @return This builder for chaining. + */ + public Builder addAllForwardAttributes(java.lang.Iterable values) { + ensureForwardAttributesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, forwardAttributes_); + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + + /** + * + * + *
            +       * Optional. List of the Envoy attributes to forward to the extension
            +       * server. The attributes provided here are included as part of the
            +       * `ProcessingRequest.attributes` field (of type
            +       * `map<string, google.protobuf.Struct>`), where the keys are the attribute
            +       * names. Refer to the
            +       * [documentation](https://cloud.google.com/service-extensions/docs/cel-matcher-language-reference#attributes)
            +       * for the names of attributes that can be forwarded. If omitted, no
            +       * attributes are sent. Each element is a string indicating the
            +       * attribute name.
            +       * 
            + * + * repeated string forward_attributes = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearForwardAttributes() { + forwardAttributes_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000080); + ; + onChanged(); + return this; + } + + /** + * + * + *
            +       * Optional. List of the Envoy attributes to forward to the extension
            +       * server. The attributes provided here are included as part of the
            +       * `ProcessingRequest.attributes` field (of type
            +       * `map<string, google.protobuf.Struct>`), where the keys are the attribute
            +       * names. Refer to the
            +       * [documentation](https://cloud.google.com/service-extensions/docs/cel-matcher-language-reference#attributes)
            +       * for the names of attributes that can be forwarded. If omitted, no
            +       * attributes are sent. Each element is a string indicating the
            +       * attribute name.
            +       * 
            + * + * repeated string forward_attributes = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The bytes of the forwardAttributes to add. + * @return This builder for chaining. + */ + public Builder addForwardAttributesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureForwardAttributesIsMutable(); + forwardAttributes_.add(value); + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + + private com.google.protobuf.Struct metadata_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Struct, + com.google.protobuf.Struct.Builder, + com.google.protobuf.StructOrBuilder> + metadataBuilder_; + + /** + * + * + *
            +       * Optional. The metadata provided here is included as part of the
            +       * `metadata_context` (of type `google.protobuf.Struct`) in the
            +       * `ProcessingRequest` message sent to the extension server.
            +       *
            +       * For `AuthzExtension` resources, the metadata is available under the
            +       * namespace `com.google.authz_extension.<resource_name>`.
            +       * For other types of extensions, the metadata is available under the
            +       * namespace
            +       * `com.google.<extension_type>.<resource_name>.<extension_chain_name>.<extension_name>`.
            +       * For example:
            +       * `com.google.lb_traffic_extension.lbtrafficextension1.chain1.ext1`.
            +       *
            +       * The following variables are supported in the metadata:
            +       *
            +       * `{forwarding_rule_id}` - substituted with the forwarding rule's fully
            +       * qualified resource name.
            +       *
            +       * This field must not be set for plugin extensions. Setting it results in
            +       * a validation error.
            +       *
            +       * You can set metadata at either the resource level or the extension level.
            +       * The extension level metadata is recommended because you can pass a
            +       * different set of metadata through each extension to the backend.
            +       *
            +       * This field is subject to following limitations:
            +       *
            +       * * The total size of the metadata must be less than 1KiB.
            +       * * The total number of keys in the metadata must be less than 16.
            +       * * The length of each key must be less than 64 characters.
            +       * * The length of each value must be less than 1024 characters.
            +       * * All values must be strings.
            +       * 
            + * + * .google.protobuf.Struct metadata = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the metadata field is set. + */ + public boolean hasMetadata() { + return ((bitField0_ & 0x00000100) != 0); + } + + /** + * + * + *
            +       * Optional. The metadata provided here is included as part of the
            +       * `metadata_context` (of type `google.protobuf.Struct`) in the
            +       * `ProcessingRequest` message sent to the extension server.
            +       *
            +       * For `AuthzExtension` resources, the metadata is available under the
            +       * namespace `com.google.authz_extension.<resource_name>`.
            +       * For other types of extensions, the metadata is available under the
            +       * namespace
            +       * `com.google.<extension_type>.<resource_name>.<extension_chain_name>.<extension_name>`.
            +       * For example:
            +       * `com.google.lb_traffic_extension.lbtrafficextension1.chain1.ext1`.
            +       *
            +       * The following variables are supported in the metadata:
            +       *
            +       * `{forwarding_rule_id}` - substituted with the forwarding rule's fully
            +       * qualified resource name.
            +       *
            +       * This field must not be set for plugin extensions. Setting it results in
            +       * a validation error.
            +       *
            +       * You can set metadata at either the resource level or the extension level.
            +       * The extension level metadata is recommended because you can pass a
            +       * different set of metadata through each extension to the backend.
            +       *
            +       * This field is subject to following limitations:
            +       *
            +       * * The total size of the metadata must be less than 1KiB.
            +       * * The total number of keys in the metadata must be less than 16.
            +       * * The length of each key must be less than 64 characters.
            +       * * The length of each value must be less than 1024 characters.
            +       * * All values must be strings.
            +       * 
            + * + * .google.protobuf.Struct metadata = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The metadata. + */ + public com.google.protobuf.Struct getMetadata() { + if (metadataBuilder_ == null) { + return metadata_ == null ? com.google.protobuf.Struct.getDefaultInstance() : metadata_; + } else { + return metadataBuilder_.getMessage(); + } + } + + /** + * + * + *
            +       * Optional. The metadata provided here is included as part of the
            +       * `metadata_context` (of type `google.protobuf.Struct`) in the
            +       * `ProcessingRequest` message sent to the extension server.
            +       *
            +       * For `AuthzExtension` resources, the metadata is available under the
            +       * namespace `com.google.authz_extension.<resource_name>`.
            +       * For other types of extensions, the metadata is available under the
            +       * namespace
                    * `com.google.<extension_type>.<resource_name>.<extension_chain_name>.<extension_name>`.
                    * For example:
                    * `com.google.lb_traffic_extension.lbtrafficextension1.chain1.ext1`.
            @@ -4090,7 +5082,7 @@ public Builder setMetadata(com.google.protobuf.Struct value) {
                     } else {
                       metadataBuilder_.setMessage(value);
                     }
            -        bitField0_ |= 0x00000080;
            +        bitField0_ |= 0x00000100;
                     onChanged();
                     return this;
                   }
            @@ -4103,7 +5095,10 @@ public Builder setMetadata(com.google.protobuf.Struct value) {
                    * `metadata_context` (of type `google.protobuf.Struct`) in the
                    * `ProcessingRequest` message sent to the extension server.
                    *
            -       * The metadata is available under the namespace
            +       * For `AuthzExtension` resources, the metadata is available under the
            +       * namespace `com.google.authz_extension.<resource_name>`.
            +       * For other types of extensions, the metadata is available under the
            +       * namespace
                    * `com.google.<extension_type>.<resource_name>.<extension_chain_name>.<extension_name>`.
                    * For example:
                    * `com.google.lb_traffic_extension.lbtrafficextension1.chain1.ext1`.
            @@ -4138,7 +5133,7 @@ public Builder setMetadata(com.google.protobuf.Struct.Builder builderForValue) {
                     } else {
                       metadataBuilder_.setMessage(builderForValue.build());
                     }
            -        bitField0_ |= 0x00000080;
            +        bitField0_ |= 0x00000100;
                     onChanged();
                     return this;
                   }
            @@ -4151,7 +5146,10 @@ public Builder setMetadata(com.google.protobuf.Struct.Builder builderForValue) {
                    * `metadata_context` (of type `google.protobuf.Struct`) in the
                    * `ProcessingRequest` message sent to the extension server.
                    *
            -       * The metadata is available under the namespace
            +       * For `AuthzExtension` resources, the metadata is available under the
            +       * namespace `com.google.authz_extension.<resource_name>`.
            +       * For other types of extensions, the metadata is available under the
            +       * namespace
                    * `com.google.<extension_type>.<resource_name>.<extension_chain_name>.<extension_name>`.
                    * For example:
                    * `com.google.lb_traffic_extension.lbtrafficextension1.chain1.ext1`.
            @@ -4182,7 +5180,7 @@ public Builder setMetadata(com.google.protobuf.Struct.Builder builderForValue) {
                    */
                   public Builder mergeMetadata(com.google.protobuf.Struct value) {
                     if (metadataBuilder_ == null) {
            -          if (((bitField0_ & 0x00000080) != 0)
            +          if (((bitField0_ & 0x00000100) != 0)
                           && metadata_ != null
                           && metadata_ != com.google.protobuf.Struct.getDefaultInstance()) {
                         getMetadataBuilder().mergeFrom(value);
            @@ -4193,7 +5191,7 @@ public Builder mergeMetadata(com.google.protobuf.Struct value) {
                       metadataBuilder_.mergeFrom(value);
                     }
                     if (metadata_ != null) {
            -          bitField0_ |= 0x00000080;
            +          bitField0_ |= 0x00000100;
                       onChanged();
                     }
                     return this;
            @@ -4207,7 +5205,10 @@ public Builder mergeMetadata(com.google.protobuf.Struct value) {
                    * `metadata_context` (of type `google.protobuf.Struct`) in the
                    * `ProcessingRequest` message sent to the extension server.
                    *
            -       * The metadata is available under the namespace
            +       * For `AuthzExtension` resources, the metadata is available under the
            +       * namespace `com.google.authz_extension.<resource_name>`.
            +       * For other types of extensions, the metadata is available under the
            +       * namespace
                    * `com.google.<extension_type>.<resource_name>.<extension_chain_name>.<extension_name>`.
                    * For example:
                    * `com.google.lb_traffic_extension.lbtrafficextension1.chain1.ext1`.
            @@ -4237,7 +5238,7 @@ public Builder mergeMetadata(com.google.protobuf.Struct value) {
                    * 
                    */
                   public Builder clearMetadata() {
            -        bitField0_ = (bitField0_ & ~0x00000080);
            +        bitField0_ = (bitField0_ & ~0x00000100);
                     metadata_ = null;
                     if (metadataBuilder_ != null) {
                       metadataBuilder_.dispose();
            @@ -4255,7 +5256,10 @@ public Builder clearMetadata() {
                    * `metadata_context` (of type `google.protobuf.Struct`) in the
                    * `ProcessingRequest` message sent to the extension server.
                    *
            -       * The metadata is available under the namespace
            +       * For `AuthzExtension` resources, the metadata is available under the
            +       * namespace `com.google.authz_extension.<resource_name>`.
            +       * For other types of extensions, the metadata is available under the
            +       * namespace
                    * `com.google.<extension_type>.<resource_name>.<extension_chain_name>.<extension_name>`.
                    * For example:
                    * `com.google.lb_traffic_extension.lbtrafficextension1.chain1.ext1`.
            @@ -4285,7 +5289,7 @@ public Builder clearMetadata() {
                    * 
                    */
                   public com.google.protobuf.Struct.Builder getMetadataBuilder() {
            -        bitField0_ |= 0x00000080;
            +        bitField0_ |= 0x00000100;
                     onChanged();
                     return internalGetMetadataFieldBuilder().getBuilder();
                   }
            @@ -4298,7 +5302,10 @@ public com.google.protobuf.Struct.Builder getMetadataBuilder() {
                    * `metadata_context` (of type `google.protobuf.Struct`) in the
                    * `ProcessingRequest` message sent to the extension server.
                    *
            -       * The metadata is available under the namespace
            +       * For `AuthzExtension` resources, the metadata is available under the
            +       * namespace `com.google.authz_extension.<resource_name>`.
            +       * For other types of extensions, the metadata is available under the
            +       * namespace
                    * `com.google.<extension_type>.<resource_name>.<extension_chain_name>.<extension_name>`.
                    * For example:
                    * `com.google.lb_traffic_extension.lbtrafficextension1.chain1.ext1`.
            @@ -4343,7 +5350,10 @@ public com.google.protobuf.StructOrBuilder getMetadataOrBuilder() {
                    * `metadata_context` (of type `google.protobuf.Struct`) in the
                    * `ProcessingRequest` message sent to the extension server.
                    *
            -       * The metadata is available under the namespace
            +       * For `AuthzExtension` resources, the metadata is available under the
            +       * namespace `com.google.authz_extension.<resource_name>`.
            +       * For other types of extensions, the metadata is available under the
            +       * namespace
                    * `com.google.<extension_type>.<resource_name>.<extension_chain_name>.<extension_name>`.
                    * For example:
                    * `com.google.lb_traffic_extension.lbtrafficextension1.chain1.ext1`.
            @@ -4389,6 +5399,416 @@ public com.google.protobuf.StructOrBuilder getMetadataOrBuilder() {
                     return metadataBuilder_;
                   }
             
            +      private int requestBodySendMode_ = 0;
            +
            +      /**
            +       *
            +       *
            +       * 
            +       * Optional. Configures the send mode for request body processing.
            +       *
            +       * The field can only be set if `supported_events` includes `REQUEST_BODY`.
            +       * If `supported_events` includes `REQUEST_BODY`,
            +       * but `request_body_send_mode` is unset, the default value `STREAMED` is
            +       * used.
            +       *
            +       * When this field is set to `FULL_DUPLEX_STREAMED`, `supported_events`
            +       * must include both `REQUEST_BODY` and `REQUEST_TRAILERS`.
            +       *
            +       * This field can be set only for `LbTrafficExtension` and
            +       * `LbRouteExtension` resources, and only when the `service` field of the
            +       * extension points to a `BackendService`. Only `FULL_DUPLEX_STREAMED` mode
            +       * is supported for `LbRouteExtension` resources.
            +       * 
            + * + * + * .google.cloud.networkservices.v1.BodySendMode request_body_send_mode = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for requestBodySendMode. + */ + @java.lang.Override + public int getRequestBodySendModeValue() { + return requestBodySendMode_; + } + + /** + * + * + *
            +       * Optional. Configures the send mode for request body processing.
            +       *
            +       * The field can only be set if `supported_events` includes `REQUEST_BODY`.
            +       * If `supported_events` includes `REQUEST_BODY`,
            +       * but `request_body_send_mode` is unset, the default value `STREAMED` is
            +       * used.
            +       *
            +       * When this field is set to `FULL_DUPLEX_STREAMED`, `supported_events`
            +       * must include both `REQUEST_BODY` and `REQUEST_TRAILERS`.
            +       *
            +       * This field can be set only for `LbTrafficExtension` and
            +       * `LbRouteExtension` resources, and only when the `service` field of the
            +       * extension points to a `BackendService`. Only `FULL_DUPLEX_STREAMED` mode
            +       * is supported for `LbRouteExtension` resources.
            +       * 
            + * + * + * .google.cloud.networkservices.v1.BodySendMode request_body_send_mode = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The enum numeric value on the wire for requestBodySendMode to set. + * @return This builder for chaining. + */ + public Builder setRequestBodySendModeValue(int value) { + requestBodySendMode_ = value; + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + + /** + * + * + *
            +       * Optional. Configures the send mode for request body processing.
            +       *
            +       * The field can only be set if `supported_events` includes `REQUEST_BODY`.
            +       * If `supported_events` includes `REQUEST_BODY`,
            +       * but `request_body_send_mode` is unset, the default value `STREAMED` is
            +       * used.
            +       *
            +       * When this field is set to `FULL_DUPLEX_STREAMED`, `supported_events`
            +       * must include both `REQUEST_BODY` and `REQUEST_TRAILERS`.
            +       *
            +       * This field can be set only for `LbTrafficExtension` and
            +       * `LbRouteExtension` resources, and only when the `service` field of the
            +       * extension points to a `BackendService`. Only `FULL_DUPLEX_STREAMED` mode
            +       * is supported for `LbRouteExtension` resources.
            +       * 
            + * + * + * .google.cloud.networkservices.v1.BodySendMode request_body_send_mode = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The requestBodySendMode. + */ + @java.lang.Override + public com.google.cloud.networkservices.v1.BodySendMode getRequestBodySendMode() { + com.google.cloud.networkservices.v1.BodySendMode result = + com.google.cloud.networkservices.v1.BodySendMode.forNumber(requestBodySendMode_); + return result == null + ? com.google.cloud.networkservices.v1.BodySendMode.UNRECOGNIZED + : result; + } + + /** + * + * + *
            +       * Optional. Configures the send mode for request body processing.
            +       *
            +       * The field can only be set if `supported_events` includes `REQUEST_BODY`.
            +       * If `supported_events` includes `REQUEST_BODY`,
            +       * but `request_body_send_mode` is unset, the default value `STREAMED` is
            +       * used.
            +       *
            +       * When this field is set to `FULL_DUPLEX_STREAMED`, `supported_events`
            +       * must include both `REQUEST_BODY` and `REQUEST_TRAILERS`.
            +       *
            +       * This field can be set only for `LbTrafficExtension` and
            +       * `LbRouteExtension` resources, and only when the `service` field of the
            +       * extension points to a `BackendService`. Only `FULL_DUPLEX_STREAMED` mode
            +       * is supported for `LbRouteExtension` resources.
            +       * 
            + * + * + * .google.cloud.networkservices.v1.BodySendMode request_body_send_mode = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The requestBodySendMode to set. + * @return This builder for chaining. + */ + public Builder setRequestBodySendMode( + com.google.cloud.networkservices.v1.BodySendMode value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000200; + requestBodySendMode_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
            +       * Optional. Configures the send mode for request body processing.
            +       *
            +       * The field can only be set if `supported_events` includes `REQUEST_BODY`.
            +       * If `supported_events` includes `REQUEST_BODY`,
            +       * but `request_body_send_mode` is unset, the default value `STREAMED` is
            +       * used.
            +       *
            +       * When this field is set to `FULL_DUPLEX_STREAMED`, `supported_events`
            +       * must include both `REQUEST_BODY` and `REQUEST_TRAILERS`.
            +       *
            +       * This field can be set only for `LbTrafficExtension` and
            +       * `LbRouteExtension` resources, and only when the `service` field of the
            +       * extension points to a `BackendService`. Only `FULL_DUPLEX_STREAMED` mode
            +       * is supported for `LbRouteExtension` resources.
            +       * 
            + * + * + * .google.cloud.networkservices.v1.BodySendMode request_body_send_mode = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearRequestBodySendMode() { + bitField0_ = (bitField0_ & ~0x00000200); + requestBodySendMode_ = 0; + onChanged(); + return this; + } + + private int responseBodySendMode_ = 0; + + /** + * + * + *
            +       * Optional. Configures the send mode for response processing. If
            +       * unspecified, the default value `STREAMED` is used.
            +       *
            +       * The field can only be set if `supported_events` includes `RESPONSE_BODY`.
            +       * If `supported_events` includes `RESPONSE_BODY`, but
            +       * `response_body_send_mode` is unset, the default value `STREAMED` is used.
            +       *
            +       * When this field is set to `FULL_DUPLEX_STREAMED`, `supported_events`
            +       * must include both `RESPONSE_BODY` and `RESPONSE_TRAILERS`.
            +       *
            +       * This field can be set only for `LbTrafficExtension` resources, and only
            +       * when the `service` field of the extension points to a `BackendService`.
            +       * 
            + * + * + * .google.cloud.networkservices.v1.BodySendMode response_body_send_mode = 15 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for responseBodySendMode. + */ + @java.lang.Override + public int getResponseBodySendModeValue() { + return responseBodySendMode_; + } + + /** + * + * + *
            +       * Optional. Configures the send mode for response processing. If
            +       * unspecified, the default value `STREAMED` is used.
            +       *
            +       * The field can only be set if `supported_events` includes `RESPONSE_BODY`.
            +       * If `supported_events` includes `RESPONSE_BODY`, but
            +       * `response_body_send_mode` is unset, the default value `STREAMED` is used.
            +       *
            +       * When this field is set to `FULL_DUPLEX_STREAMED`, `supported_events`
            +       * must include both `RESPONSE_BODY` and `RESPONSE_TRAILERS`.
            +       *
            +       * This field can be set only for `LbTrafficExtension` resources, and only
            +       * when the `service` field of the extension points to a `BackendService`.
            +       * 
            + * + * + * .google.cloud.networkservices.v1.BodySendMode response_body_send_mode = 15 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The enum numeric value on the wire for responseBodySendMode to set. + * @return This builder for chaining. + */ + public Builder setResponseBodySendModeValue(int value) { + responseBodySendMode_ = value; + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + + /** + * + * + *
            +       * Optional. Configures the send mode for response processing. If
            +       * unspecified, the default value `STREAMED` is used.
            +       *
            +       * The field can only be set if `supported_events` includes `RESPONSE_BODY`.
            +       * If `supported_events` includes `RESPONSE_BODY`, but
            +       * `response_body_send_mode` is unset, the default value `STREAMED` is used.
            +       *
            +       * When this field is set to `FULL_DUPLEX_STREAMED`, `supported_events`
            +       * must include both `RESPONSE_BODY` and `RESPONSE_TRAILERS`.
            +       *
            +       * This field can be set only for `LbTrafficExtension` resources, and only
            +       * when the `service` field of the extension points to a `BackendService`.
            +       * 
            + * + * + * .google.cloud.networkservices.v1.BodySendMode response_body_send_mode = 15 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The responseBodySendMode. + */ + @java.lang.Override + public com.google.cloud.networkservices.v1.BodySendMode getResponseBodySendMode() { + com.google.cloud.networkservices.v1.BodySendMode result = + com.google.cloud.networkservices.v1.BodySendMode.forNumber(responseBodySendMode_); + return result == null + ? com.google.cloud.networkservices.v1.BodySendMode.UNRECOGNIZED + : result; + } + + /** + * + * + *
            +       * Optional. Configures the send mode for response processing. If
            +       * unspecified, the default value `STREAMED` is used.
            +       *
            +       * The field can only be set if `supported_events` includes `RESPONSE_BODY`.
            +       * If `supported_events` includes `RESPONSE_BODY`, but
            +       * `response_body_send_mode` is unset, the default value `STREAMED` is used.
            +       *
            +       * When this field is set to `FULL_DUPLEX_STREAMED`, `supported_events`
            +       * must include both `RESPONSE_BODY` and `RESPONSE_TRAILERS`.
            +       *
            +       * This field can be set only for `LbTrafficExtension` resources, and only
            +       * when the `service` field of the extension points to a `BackendService`.
            +       * 
            + * + * + * .google.cloud.networkservices.v1.BodySendMode response_body_send_mode = 15 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The responseBodySendMode to set. + * @return This builder for chaining. + */ + public Builder setResponseBodySendMode( + com.google.cloud.networkservices.v1.BodySendMode value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000400; + responseBodySendMode_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
            +       * Optional. Configures the send mode for response processing. If
            +       * unspecified, the default value `STREAMED` is used.
            +       *
            +       * The field can only be set if `supported_events` includes `RESPONSE_BODY`.
            +       * If `supported_events` includes `RESPONSE_BODY`, but
            +       * `response_body_send_mode` is unset, the default value `STREAMED` is used.
            +       *
            +       * When this field is set to `FULL_DUPLEX_STREAMED`, `supported_events`
            +       * must include both `RESPONSE_BODY` and `RESPONSE_TRAILERS`.
            +       *
            +       * This field can be set only for `LbTrafficExtension` resources, and only
            +       * when the `service` field of the extension points to a `BackendService`.
            +       * 
            + * + * + * .google.cloud.networkservices.v1.BodySendMode response_body_send_mode = 15 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearResponseBodySendMode() { + bitField0_ = (bitField0_ & ~0x00000400); + responseBodySendMode_ = 0; + onChanged(); + return this; + } + + private boolean observabilityMode_; + + /** + * + * + *
            +       * Optional. When set to `true`, the calls to the extension backend are
            +       * performed asynchronously, without pausing the processing of the ongoing
            +       * request. In this mode, only `STREAMED` (default) body processing is
            +       * supported. Responses, if any, are ignored.
            +       *
            +       * Supported by regional `LbTrafficExtension` and `LbRouteExtension`
            +       * resources.
            +       * 
            + * + * bool observability_mode = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The observabilityMode. + */ + @java.lang.Override + public boolean getObservabilityMode() { + return observabilityMode_; + } + + /** + * + * + *
            +       * Optional. When set to `true`, the calls to the extension backend are
            +       * performed asynchronously, without pausing the processing of the ongoing
            +       * request. In this mode, only `STREAMED` (default) body processing is
            +       * supported. Responses, if any, are ignored.
            +       *
            +       * Supported by regional `LbTrafficExtension` and `LbRouteExtension`
            +       * resources.
            +       * 
            + * + * bool observability_mode = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The observabilityMode to set. + * @return This builder for chaining. + */ + public Builder setObservabilityMode(boolean value) { + + observabilityMode_ = value; + bitField0_ |= 0x00000800; + onChanged(); + return this; + } + + /** + * + * + *
            +       * Optional. When set to `true`, the calls to the extension backend are
            +       * performed asynchronously, without pausing the processing of the ongoing
            +       * request. In this mode, only `STREAMED` (default) body processing is
            +       * supported. Responses, if any, are ignored.
            +       *
            +       * Supported by regional `LbTrafficExtension` and `LbRouteExtension`
            +       * resources.
            +       * 
            + * + * bool observability_mode = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearObservabilityMode() { + bitField0_ = (bitField0_ & ~0x00000800); + observabilityMode_ = false; + onChanged(); + return this; + } + // @@protoc_insertion_point(builder_scope:google.cloud.networkservices.v1.ExtensionChain.Extension) } diff --git a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/Gateway.java b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/Gateway.java index 5d59c2b2036d..7ed24ccea7cc 100644 --- a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/Gateway.java +++ b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/Gateway.java @@ -1128,7 +1128,7 @@ public com.google.protobuf.ByteString getAddressesBytes(int index) { *
                * Required. One or more port numbers (1-65535), on which the Gateway will
                * receive traffic. The proxy binds to the specified ports.
            -   * Gateways of type 'SECURE_WEB_GATEWAY' are limited to 1 port.
            +   * Gateways of type 'SECURE_WEB_GATEWAY' are limited to 5 ports.
                * Gateways of type 'OPEN_MESH' listen on 0.0.0.0 for IPv4 and :: for IPv6 and
                * support multiple ports.
                * 
            @@ -1148,7 +1148,7 @@ public java.util.List getPortsList() { *
                * Required. One or more port numbers (1-65535), on which the Gateway will
                * receive traffic. The proxy binds to the specified ports.
            -   * Gateways of type 'SECURE_WEB_GATEWAY' are limited to 1 port.
            +   * Gateways of type 'SECURE_WEB_GATEWAY' are limited to 5 ports.
                * Gateways of type 'OPEN_MESH' listen on 0.0.0.0 for IPv4 and :: for IPv6 and
                * support multiple ports.
                * 
            @@ -1167,7 +1167,7 @@ public int getPortsCount() { *
                * Required. One or more port numbers (1-65535), on which the Gateway will
                * receive traffic. The proxy binds to the specified ports.
            -   * Gateways of type 'SECURE_WEB_GATEWAY' are limited to 1 port.
            +   * Gateways of type 'SECURE_WEB_GATEWAY' are limited to 5 ports.
                * Gateways of type 'OPEN_MESH' listen on 0.0.0.0 for IPv4 and :: for IPv6 and
                * support multiple ports.
                * 
            @@ -1183,6 +1183,27 @@ public int getPorts(int index) { private int portsMemoizedSerializedSize = -1; + public static final int ALL_PORTS_FIELD_NUMBER = 34; + private boolean allPorts_ = false; + + /** + * + * + *
            +   * Optional. If true, the Gateway will listen on all ports. This is mutually
            +   * exclusive with the `ports` field. This field only applies to gateways of
            +   * type 'SECURE_WEB_GATEWAY'.
            +   * 
            + * + * bool all_ports = 34 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The allPorts. + */ + @java.lang.Override + public boolean getAllPorts() { + return allPorts_; + } + public static final int SCOPE_FIELD_NUMBER = 8; @SuppressWarnings("serial") @@ -1751,6 +1772,27 @@ public com.google.cloud.networkservices.v1.Gateway.RoutingMode getRoutingMode() : result; } + public static final int ALLOW_GLOBAL_ACCESS_FIELD_NUMBER = 33; + private boolean allowGlobalAccess_ = false; + + /** + * + * + *
            +   * Optional. If true, the gateway will allow traffic from clients outside of
            +   * the region where the gateway is located.
            +   * This field is configurable only for gateways of type SECURE_WEB_GATEWAY.
            +   * 
            + * + * bool allow_global_access = 33 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The allowGlobalAccess. + */ + @java.lang.Override + public boolean getAllowGlobalAccess() { + return allowGlobalAccess_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -1827,6 +1869,12 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io .getNumber()) { output.writeEnum(32, routingMode_); } + if (allowGlobalAccess_ != false) { + output.writeBool(33, allowGlobalAccess_); + } + if (allPorts_ != false) { + output.writeBool(34, allPorts_); + } getUnknownFields().writeTo(output); } @@ -1920,6 +1968,12 @@ public int getSerializedSize() { .getNumber()) { size += com.google.protobuf.CodedOutputStream.computeEnumSize(32, routingMode_); } + if (allowGlobalAccess_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(33, allowGlobalAccess_); + } + if (allPorts_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(34, allPorts_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -1951,6 +2005,7 @@ public boolean equals(final java.lang.Object obj) { if (type_ != other.type_) return false; if (!getAddressesList().equals(other.getAddressesList())) return false; if (!getPortsList().equals(other.getPortsList())) return false; + if (getAllPorts() != other.getAllPorts()) return false; if (!getScope().equals(other.getScope())) return false; if (!getServerTlsPolicy().equals(other.getServerTlsPolicy())) return false; if (!getCertificateUrlsList().equals(other.getCertificateUrlsList())) return false; @@ -1963,6 +2018,7 @@ public boolean equals(final java.lang.Object obj) { if (envoyHeaders_ != other.envoyHeaders_) return false; } if (routingMode_ != other.routingMode_) return false; + if (getAllowGlobalAccess() != other.getAllowGlobalAccess()) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -2002,6 +2058,8 @@ public int hashCode() { hash = (37 * hash) + PORTS_FIELD_NUMBER; hash = (53 * hash) + getPortsList().hashCode(); } + hash = (37 * hash) + ALL_PORTS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getAllPorts()); hash = (37 * hash) + SCOPE_FIELD_NUMBER; hash = (53 * hash) + getScope().hashCode(); hash = (37 * hash) + SERVER_TLS_POLICY_FIELD_NUMBER; @@ -2024,6 +2082,8 @@ public int hashCode() { } hash = (37 * hash) + ROUTING_MODE_FIELD_NUMBER; hash = (53 * hash) + routingMode_; + hash = (37 * hash) + ALLOW_GLOBAL_ACCESS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getAllowGlobalAccess()); hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -2216,6 +2276,7 @@ public Builder clear() { type_ = 0; addresses_ = com.google.protobuf.LazyStringArrayList.emptyList(); ports_ = emptyIntList(); + allPorts_ = false; scope_ = ""; serverTlsPolicy_ = ""; certificateUrls_ = com.google.protobuf.LazyStringArrayList.emptyList(); @@ -2225,6 +2286,7 @@ public Builder clear() { ipVersion_ = 0; envoyHeaders_ = 0; routingMode_ = 0; + allowGlobalAccess_ = false; return this; } @@ -2295,34 +2357,40 @@ private void buildPartial0(com.google.cloud.networkservices.v1.Gateway result) { result.ports_ = ports_; } if (((from_bitField0_ & 0x00000200) != 0)) { - result.scope_ = scope_; + result.allPorts_ = allPorts_; } if (((from_bitField0_ & 0x00000400) != 0)) { - result.serverTlsPolicy_ = serverTlsPolicy_; + result.scope_ = scope_; } if (((from_bitField0_ & 0x00000800) != 0)) { + result.serverTlsPolicy_ = serverTlsPolicy_; + } + if (((from_bitField0_ & 0x00001000) != 0)) { certificateUrls_.makeImmutable(); result.certificateUrls_ = certificateUrls_; } - if (((from_bitField0_ & 0x00001000) != 0)) { + if (((from_bitField0_ & 0x00002000) != 0)) { result.gatewaySecurityPolicy_ = gatewaySecurityPolicy_; } - if (((from_bitField0_ & 0x00002000) != 0)) { + if (((from_bitField0_ & 0x00004000) != 0)) { result.network_ = network_; } - if (((from_bitField0_ & 0x00004000) != 0)) { + if (((from_bitField0_ & 0x00008000) != 0)) { result.subnetwork_ = subnetwork_; } - if (((from_bitField0_ & 0x00008000) != 0)) { + if (((from_bitField0_ & 0x00010000) != 0)) { result.ipVersion_ = ipVersion_; } - if (((from_bitField0_ & 0x00010000) != 0)) { + if (((from_bitField0_ & 0x00020000) != 0)) { result.envoyHeaders_ = envoyHeaders_; to_bitField0_ |= 0x00000004; } - if (((from_bitField0_ & 0x00020000) != 0)) { + if (((from_bitField0_ & 0x00040000) != 0)) { result.routingMode_ = routingMode_; } + if (((from_bitField0_ & 0x00080000) != 0)) { + result.allowGlobalAccess_ = allowGlobalAccess_; + } result.bitField0_ |= to_bitField0_; } @@ -2385,20 +2453,23 @@ public Builder mergeFrom(com.google.cloud.networkservices.v1.Gateway other) { } onChanged(); } + if (other.getAllPorts() != false) { + setAllPorts(other.getAllPorts()); + } if (!other.getScope().isEmpty()) { scope_ = other.scope_; - bitField0_ |= 0x00000200; + bitField0_ |= 0x00000400; onChanged(); } if (!other.getServerTlsPolicy().isEmpty()) { serverTlsPolicy_ = other.serverTlsPolicy_; - bitField0_ |= 0x00000400; + bitField0_ |= 0x00000800; onChanged(); } if (!other.certificateUrls_.isEmpty()) { if (certificateUrls_.isEmpty()) { certificateUrls_ = other.certificateUrls_; - bitField0_ |= 0x00000800; + bitField0_ |= 0x00001000; } else { ensureCertificateUrlsIsMutable(); certificateUrls_.addAll(other.certificateUrls_); @@ -2407,17 +2478,17 @@ public Builder mergeFrom(com.google.cloud.networkservices.v1.Gateway other) { } if (!other.getGatewaySecurityPolicy().isEmpty()) { gatewaySecurityPolicy_ = other.gatewaySecurityPolicy_; - bitField0_ |= 0x00001000; + bitField0_ |= 0x00002000; onChanged(); } if (!other.getNetwork().isEmpty()) { network_ = other.network_; - bitField0_ |= 0x00002000; + bitField0_ |= 0x00004000; onChanged(); } if (!other.getSubnetwork().isEmpty()) { subnetwork_ = other.subnetwork_; - bitField0_ |= 0x00004000; + bitField0_ |= 0x00008000; onChanged(); } if (other.ipVersion_ != 0) { @@ -2429,6 +2500,9 @@ public Builder mergeFrom(com.google.cloud.networkservices.v1.Gateway other) { if (other.routingMode_ != 0) { setRoutingModeValue(other.getRoutingModeValue()); } + if (other.getAllowGlobalAccess() != false) { + setAllowGlobalAccess(other.getAllowGlobalAccess()); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -2509,13 +2583,13 @@ public Builder mergeFrom( case 66: { scope_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000200; + bitField0_ |= 0x00000400; break; } // case 66 case 74: { serverTlsPolicy_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000400; + bitField0_ |= 0x00000800; break; } // case 74 case 88: @@ -2552,39 +2626,51 @@ public Builder mergeFrom( case 130: { network_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00002000; + bitField0_ |= 0x00004000; break; } // case 130 case 138: { subnetwork_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00004000; + bitField0_ |= 0x00008000; break; } // case 138 case 146: { gatewaySecurityPolicy_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00001000; + bitField0_ |= 0x00002000; break; } // case 146 case 168: { ipVersion_ = input.readEnum(); - bitField0_ |= 0x00008000; + bitField0_ |= 0x00010000; break; } // case 168 case 224: { envoyHeaders_ = input.readEnum(); - bitField0_ |= 0x00010000; + bitField0_ |= 0x00020000; break; } // case 224 case 256: { routingMode_ = input.readEnum(); - bitField0_ |= 0x00020000; + bitField0_ |= 0x00040000; break; } // case 256 + case 264: + { + allowGlobalAccess_ = input.readBool(); + bitField0_ |= 0x00080000; + break; + } // case 264 + case 272: + { + allPorts_ = input.readBool(); + bitField0_ |= 0x00000200; + break; + } // case 272 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -3916,7 +4002,7 @@ private void ensurePortsIsMutable() { *
                  * Required. One or more port numbers (1-65535), on which the Gateway will
                  * receive traffic. The proxy binds to the specified ports.
            -     * Gateways of type 'SECURE_WEB_GATEWAY' are limited to 1 port.
            +     * Gateways of type 'SECURE_WEB_GATEWAY' are limited to 5 ports.
                  * Gateways of type 'OPEN_MESH' listen on 0.0.0.0 for IPv4 and :: for IPv6 and
                  * support multiple ports.
                  * 
            @@ -3936,7 +4022,7 @@ public java.util.List getPortsList() { *
                  * Required. One or more port numbers (1-65535), on which the Gateway will
                  * receive traffic. The proxy binds to the specified ports.
            -     * Gateways of type 'SECURE_WEB_GATEWAY' are limited to 1 port.
            +     * Gateways of type 'SECURE_WEB_GATEWAY' are limited to 5 ports.
                  * Gateways of type 'OPEN_MESH' listen on 0.0.0.0 for IPv4 and :: for IPv6 and
                  * support multiple ports.
                  * 
            @@ -3955,7 +4041,7 @@ public int getPortsCount() { *
                  * Required. One or more port numbers (1-65535), on which the Gateway will
                  * receive traffic. The proxy binds to the specified ports.
            -     * Gateways of type 'SECURE_WEB_GATEWAY' are limited to 1 port.
            +     * Gateways of type 'SECURE_WEB_GATEWAY' are limited to 5 ports.
                  * Gateways of type 'OPEN_MESH' listen on 0.0.0.0 for IPv4 and :: for IPv6 and
                  * support multiple ports.
                  * 
            @@ -3975,7 +4061,7 @@ public int getPorts(int index) { *
                  * Required. One or more port numbers (1-65535), on which the Gateway will
                  * receive traffic. The proxy binds to the specified ports.
            -     * Gateways of type 'SECURE_WEB_GATEWAY' are limited to 1 port.
            +     * Gateways of type 'SECURE_WEB_GATEWAY' are limited to 5 ports.
                  * Gateways of type 'OPEN_MESH' listen on 0.0.0.0 for IPv4 and :: for IPv6 and
                  * support multiple ports.
                  * 
            @@ -4001,7 +4087,7 @@ public Builder setPorts(int index, int value) { *
                  * Required. One or more port numbers (1-65535), on which the Gateway will
                  * receive traffic. The proxy binds to the specified ports.
            -     * Gateways of type 'SECURE_WEB_GATEWAY' are limited to 1 port.
            +     * Gateways of type 'SECURE_WEB_GATEWAY' are limited to 5 ports.
                  * Gateways of type 'OPEN_MESH' listen on 0.0.0.0 for IPv4 and :: for IPv6 and
                  * support multiple ports.
                  * 
            @@ -4026,7 +4112,7 @@ public Builder addPorts(int value) { *
                  * Required. One or more port numbers (1-65535), on which the Gateway will
                  * receive traffic. The proxy binds to the specified ports.
            -     * Gateways of type 'SECURE_WEB_GATEWAY' are limited to 1 port.
            +     * Gateways of type 'SECURE_WEB_GATEWAY' are limited to 5 ports.
                  * Gateways of type 'OPEN_MESH' listen on 0.0.0.0 for IPv4 and :: for IPv6 and
                  * support multiple ports.
                  * 
            @@ -4050,7 +4136,7 @@ public Builder addAllPorts(java.lang.Iterable value *
                  * Required. One or more port numbers (1-65535), on which the Gateway will
                  * receive traffic. The proxy binds to the specified ports.
            -     * Gateways of type 'SECURE_WEB_GATEWAY' are limited to 1 port.
            +     * Gateways of type 'SECURE_WEB_GATEWAY' are limited to 5 ports.
                  * Gateways of type 'OPEN_MESH' listen on 0.0.0.0 for IPv4 and :: for IPv6 and
                  * support multiple ports.
                  * 
            @@ -4066,6 +4152,68 @@ public Builder clearPorts() { return this; } + private boolean allPorts_; + + /** + * + * + *
            +     * Optional. If true, the Gateway will listen on all ports. This is mutually
            +     * exclusive with the `ports` field. This field only applies to gateways of
            +     * type 'SECURE_WEB_GATEWAY'.
            +     * 
            + * + * bool all_ports = 34 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The allPorts. + */ + @java.lang.Override + public boolean getAllPorts() { + return allPorts_; + } + + /** + * + * + *
            +     * Optional. If true, the Gateway will listen on all ports. This is mutually
            +     * exclusive with the `ports` field. This field only applies to gateways of
            +     * type 'SECURE_WEB_GATEWAY'.
            +     * 
            + * + * bool all_ports = 34 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The allPorts to set. + * @return This builder for chaining. + */ + public Builder setAllPorts(boolean value) { + + allPorts_ = value; + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Optional. If true, the Gateway will listen on all ports. This is mutually
            +     * exclusive with the `ports` field. This field only applies to gateways of
            +     * type 'SECURE_WEB_GATEWAY'.
            +     * 
            + * + * bool all_ports = 34 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearAllPorts() { + bitField0_ = (bitField0_ & ~0x00000200); + allPorts_ = false; + onChanged(); + return this; + } + private java.lang.Object scope_ = ""; /** @@ -4152,7 +4300,7 @@ public Builder setScope(java.lang.String value) { throw new NullPointerException(); } scope_ = value; - bitField0_ |= 0x00000200; + bitField0_ |= 0x00000400; onChanged(); return this; } @@ -4177,7 +4325,7 @@ public Builder setScope(java.lang.String value) { */ public Builder clearScope() { scope_ = getDefaultInstance().getScope(); - bitField0_ = (bitField0_ & ~0x00000200); + bitField0_ = (bitField0_ & ~0x00000400); onChanged(); return this; } @@ -4207,7 +4355,7 @@ public Builder setScopeBytes(com.google.protobuf.ByteString value) { } checkByteStringIsUtf8(value); scope_ = value; - bitField0_ |= 0x00000200; + bitField0_ |= 0x00000400; onChanged(); return this; } @@ -4286,7 +4434,7 @@ public Builder setServerTlsPolicy(java.lang.String value) { throw new NullPointerException(); } serverTlsPolicy_ = value; - bitField0_ |= 0x00000400; + bitField0_ |= 0x00000800; onChanged(); return this; } @@ -4307,7 +4455,7 @@ public Builder setServerTlsPolicy(java.lang.String value) { */ public Builder clearServerTlsPolicy() { serverTlsPolicy_ = getDefaultInstance().getServerTlsPolicy(); - bitField0_ = (bitField0_ & ~0x00000400); + bitField0_ = (bitField0_ & ~0x00000800); onChanged(); return this; } @@ -4333,7 +4481,7 @@ public Builder setServerTlsPolicyBytes(com.google.protobuf.ByteString value) { } checkByteStringIsUtf8(value); serverTlsPolicy_ = value; - bitField0_ |= 0x00000400; + bitField0_ |= 0x00000800; onChanged(); return this; } @@ -4345,7 +4493,7 @@ private void ensureCertificateUrlsIsMutable() { if (!certificateUrls_.isModifiable()) { certificateUrls_ = new com.google.protobuf.LazyStringArrayList(certificateUrls_); } - bitField0_ |= 0x00000800; + bitField0_ |= 0x00001000; } /** @@ -4450,7 +4598,7 @@ public Builder setCertificateUrls(int index, java.lang.String value) { } ensureCertificateUrlsIsMutable(); certificateUrls_.set(index, value); - bitField0_ |= 0x00000800; + bitField0_ |= 0x00001000; onChanged(); return this; } @@ -4477,7 +4625,7 @@ public Builder addCertificateUrls(java.lang.String value) { } ensureCertificateUrlsIsMutable(); certificateUrls_.add(value); - bitField0_ |= 0x00000800; + bitField0_ |= 0x00001000; onChanged(); return this; } @@ -4501,7 +4649,7 @@ public Builder addCertificateUrls(java.lang.String value) { public Builder addAllCertificateUrls(java.lang.Iterable values) { ensureCertificateUrlsIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll(values, certificateUrls_); - bitField0_ |= 0x00000800; + bitField0_ |= 0x00001000; onChanged(); return this; } @@ -4523,7 +4671,7 @@ public Builder addAllCertificateUrls(java.lang.Iterable values */ public Builder clearCertificateUrls() { certificateUrls_ = com.google.protobuf.LazyStringArrayList.emptyList(); - bitField0_ = (bitField0_ & ~0x00000800); + bitField0_ = (bitField0_ & ~0x00001000); ; onChanged(); return this; @@ -4552,7 +4700,7 @@ public Builder addCertificateUrlsBytes(com.google.protobuf.ByteString value) { checkByteStringIsUtf8(value); ensureCertificateUrlsIsMutable(); certificateUrls_.add(value); - bitField0_ |= 0x00000800; + bitField0_ |= 0x00001000; onChanged(); return this; } @@ -4649,7 +4797,7 @@ public Builder setGatewaySecurityPolicy(java.lang.String value) { throw new NullPointerException(); } gatewaySecurityPolicy_ = value; - bitField0_ |= 0x00001000; + bitField0_ |= 0x00002000; onChanged(); return this; } @@ -4676,7 +4824,7 @@ public Builder setGatewaySecurityPolicy(java.lang.String value) { */ public Builder clearGatewaySecurityPolicy() { gatewaySecurityPolicy_ = getDefaultInstance().getGatewaySecurityPolicy(); - bitField0_ = (bitField0_ & ~0x00001000); + bitField0_ = (bitField0_ & ~0x00002000); onChanged(); return this; } @@ -4708,7 +4856,7 @@ public Builder setGatewaySecurityPolicyBytes(com.google.protobuf.ByteString valu } checkByteStringIsUtf8(value); gatewaySecurityPolicy_ = value; - bitField0_ |= 0x00001000; + bitField0_ |= 0x00002000; onChanged(); return this; } @@ -4796,7 +4944,7 @@ public Builder setNetwork(java.lang.String value) { throw new NullPointerException(); } network_ = value; - bitField0_ |= 0x00002000; + bitField0_ |= 0x00004000; onChanged(); return this; } @@ -4820,7 +4968,7 @@ public Builder setNetwork(java.lang.String value) { */ public Builder clearNetwork() { network_ = getDefaultInstance().getNetwork(); - bitField0_ = (bitField0_ & ~0x00002000); + bitField0_ = (bitField0_ & ~0x00004000); onChanged(); return this; } @@ -4849,7 +4997,7 @@ public Builder setNetworkBytes(com.google.protobuf.ByteString value) { } checkByteStringIsUtf8(value); network_ = value; - bitField0_ |= 0x00002000; + bitField0_ |= 0x00004000; onChanged(); return this; } @@ -4937,7 +5085,7 @@ public Builder setSubnetwork(java.lang.String value) { throw new NullPointerException(); } subnetwork_ = value; - bitField0_ |= 0x00004000; + bitField0_ |= 0x00008000; onChanged(); return this; } @@ -4961,7 +5109,7 @@ public Builder setSubnetwork(java.lang.String value) { */ public Builder clearSubnetwork() { subnetwork_ = getDefaultInstance().getSubnetwork(); - bitField0_ = (bitField0_ & ~0x00004000); + bitField0_ = (bitField0_ & ~0x00008000); onChanged(); return this; } @@ -4990,7 +5138,7 @@ public Builder setSubnetworkBytes(com.google.protobuf.ByteString value) { } checkByteStringIsUtf8(value); subnetwork_ = value; - bitField0_ |= 0x00004000; + bitField0_ |= 0x00008000; onChanged(); return this; } @@ -5033,7 +5181,7 @@ public int getIpVersionValue() { */ public Builder setIpVersionValue(int value) { ipVersion_ = value; - bitField0_ |= 0x00008000; + bitField0_ |= 0x00010000; onChanged(); return this; } @@ -5080,7 +5228,7 @@ public Builder setIpVersion(com.google.cloud.networkservices.v1.Gateway.IpVersio if (value == null) { throw new NullPointerException(); } - bitField0_ |= 0x00008000; + bitField0_ |= 0x00010000; ipVersion_ = value.getNumber(); onChanged(); return this; @@ -5101,7 +5249,7 @@ public Builder setIpVersion(com.google.cloud.networkservices.v1.Gateway.IpVersio * @return This builder for chaining. */ public Builder clearIpVersion() { - bitField0_ = (bitField0_ & ~0x00008000); + bitField0_ = (bitField0_ & ~0x00010000); ipVersion_ = 0; onChanged(); return this; @@ -5126,7 +5274,7 @@ public Builder clearIpVersion() { */ @java.lang.Override public boolean hasEnvoyHeaders() { - return ((bitField0_ & 0x00010000) != 0); + return ((bitField0_ & 0x00020000) != 0); } /** @@ -5167,7 +5315,7 @@ public int getEnvoyHeadersValue() { */ public Builder setEnvoyHeadersValue(int value) { envoyHeaders_ = value; - bitField0_ |= 0x00010000; + bitField0_ |= 0x00020000; onChanged(); return this; } @@ -5216,7 +5364,7 @@ public Builder setEnvoyHeaders(com.google.cloud.networkservices.v1.EnvoyHeaders if (value == null) { throw new NullPointerException(); } - bitField0_ |= 0x00010000; + bitField0_ |= 0x00020000; envoyHeaders_ = value.getNumber(); onChanged(); return this; @@ -5238,7 +5386,7 @@ public Builder setEnvoyHeaders(com.google.cloud.networkservices.v1.EnvoyHeaders * @return This builder for chaining. */ public Builder clearEnvoyHeaders() { - bitField0_ = (bitField0_ & ~0x00010000); + bitField0_ = (bitField0_ & ~0x00020000); envoyHeaders_ = 0; onChanged(); return this; @@ -5284,7 +5432,7 @@ public int getRoutingModeValue() { */ public Builder setRoutingModeValue(int value) { routingMode_ = value; - bitField0_ |= 0x00020000; + bitField0_ |= 0x00040000; onChanged(); return this; } @@ -5333,7 +5481,7 @@ public Builder setRoutingMode(com.google.cloud.networkservices.v1.Gateway.Routin if (value == null) { throw new NullPointerException(); } - bitField0_ |= 0x00020000; + bitField0_ |= 0x00040000; routingMode_ = value.getNumber(); onChanged(); return this; @@ -5355,12 +5503,74 @@ public Builder setRoutingMode(com.google.cloud.networkservices.v1.Gateway.Routin * @return This builder for chaining. */ public Builder clearRoutingMode() { - bitField0_ = (bitField0_ & ~0x00020000); + bitField0_ = (bitField0_ & ~0x00040000); routingMode_ = 0; onChanged(); return this; } + private boolean allowGlobalAccess_; + + /** + * + * + *
            +     * Optional. If true, the gateway will allow traffic from clients outside of
            +     * the region where the gateway is located.
            +     * This field is configurable only for gateways of type SECURE_WEB_GATEWAY.
            +     * 
            + * + * bool allow_global_access = 33 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The allowGlobalAccess. + */ + @java.lang.Override + public boolean getAllowGlobalAccess() { + return allowGlobalAccess_; + } + + /** + * + * + *
            +     * Optional. If true, the gateway will allow traffic from clients outside of
            +     * the region where the gateway is located.
            +     * This field is configurable only for gateways of type SECURE_WEB_GATEWAY.
            +     * 
            + * + * bool allow_global_access = 33 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The allowGlobalAccess to set. + * @return This builder for chaining. + */ + public Builder setAllowGlobalAccess(boolean value) { + + allowGlobalAccess_ = value; + bitField0_ |= 0x00080000; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Optional. If true, the gateway will allow traffic from clients outside of
            +     * the region where the gateway is located.
            +     * This field is configurable only for gateways of type SECURE_WEB_GATEWAY.
            +     * 
            + * + * bool allow_global_access = 33 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearAllowGlobalAccess() { + bitField0_ = (bitField0_ & ~0x00080000); + allowGlobalAccess_ = false; + onChanged(); + return this; + } + // @@protoc_insertion_point(builder_scope:google.cloud.networkservices.v1.Gateway) } diff --git a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/GatewayOrBuilder.java b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/GatewayOrBuilder.java index 11b9f779a04d..1916794acbcb 100644 --- a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/GatewayOrBuilder.java +++ b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/GatewayOrBuilder.java @@ -371,7 +371,7 @@ java.lang.String getLabelsOrDefault( *
                * Required. One or more port numbers (1-65535), on which the Gateway will
                * receive traffic. The proxy binds to the specified ports.
            -   * Gateways of type 'SECURE_WEB_GATEWAY' are limited to 1 port.
            +   * Gateways of type 'SECURE_WEB_GATEWAY' are limited to 5 ports.
                * Gateways of type 'OPEN_MESH' listen on 0.0.0.0 for IPv4 and :: for IPv6 and
                * support multiple ports.
                * 
            @@ -388,7 +388,7 @@ java.lang.String getLabelsOrDefault( *
                * Required. One or more port numbers (1-65535), on which the Gateway will
                * receive traffic. The proxy binds to the specified ports.
            -   * Gateways of type 'SECURE_WEB_GATEWAY' are limited to 1 port.
            +   * Gateways of type 'SECURE_WEB_GATEWAY' are limited to 5 ports.
                * Gateways of type 'OPEN_MESH' listen on 0.0.0.0 for IPv4 and :: for IPv6 and
                * support multiple ports.
                * 
            @@ -405,7 +405,7 @@ java.lang.String getLabelsOrDefault( *
                * Required. One or more port numbers (1-65535), on which the Gateway will
                * receive traffic. The proxy binds to the specified ports.
            -   * Gateways of type 'SECURE_WEB_GATEWAY' are limited to 1 port.
            +   * Gateways of type 'SECURE_WEB_GATEWAY' are limited to 5 ports.
                * Gateways of type 'OPEN_MESH' listen on 0.0.0.0 for IPv4 and :: for IPv6 and
                * support multiple ports.
                * 
            @@ -417,6 +417,21 @@ java.lang.String getLabelsOrDefault( */ int getPorts(int index); + /** + * + * + *
            +   * Optional. If true, the Gateway will listen on all ports. This is mutually
            +   * exclusive with the `ports` field. This field only applies to gateways of
            +   * type 'SECURE_WEB_GATEWAY'.
            +   * 
            + * + * bool all_ports = 34 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The allPorts. + */ + boolean getAllPorts(); + /** * * @@ -795,4 +810,19 @@ java.lang.String getLabelsOrDefault( * @return The routingMode. */ com.google.cloud.networkservices.v1.Gateway.RoutingMode getRoutingMode(); + + /** + * + * + *
            +   * Optional. If true, the gateway will allow traffic from clients outside of
            +   * the region where the gateway is located.
            +   * This field is configurable only for gateways of type SECURE_WEB_GATEWAY.
            +   * 
            + * + * bool allow_global_access = 33 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The allowGlobalAccess. + */ + boolean getAllowGlobalAccess(); } diff --git a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/GatewayProto.java b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/GatewayProto.java index 38de6ef3c736..72c4ab748d8b 100644 --- a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/GatewayProto.java +++ b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/GatewayProto.java @@ -85,7 +85,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "-google/cloud/networkservices/v1/gateway.proto\022\037google.cloud.networkservices.v1" + "\032\037google/api/field_behavior.proto\032\031googl" + "e/api/resource.proto\032,google/cloud/networkservices/v1/common.proto\032 google/proto" - + "buf/field_mask.proto\032\037google/protobuf/timestamp.proto\"\204\013\n" + + "buf/field_mask.proto\032\037google/protobuf/timestamp.proto\"\276\013\n" + "\007Gateway\022\021\n" + "\004name\030\001 \001(\tB\003\340A\010\022\026\n" + "\tself_link\030\r" @@ -99,7 +99,8 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + " \001(\0162-.google.cloud.networkservices.v1.Gateway.TypeB\003\340A\005\0229\n" + "\taddresses\030\007 \003(\tB&\340A\001\372A \n" + "\036compute.googleapis.com/Address\022\022\n" - + "\005ports\030\013 \003(\005B\003\340A\002\022\022\n" + + "\005ports\030\013 \003(\005B\003\340A\002\022\026\n" + + "\tall_ports\030\" \001(\010B\003\340A\001\022\022\n" + "\005scope\030\010 \001(\tB\003\340A\001\022Q\n" + "\021server_tls_policy\030\t \001(\tB6\340A\001\372A0\n" + ".networksecurity.googleapis.com/ServerTlsPolicy\022O\n" @@ -111,12 +112,13 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\036compute.googleapis.com/Network\022=\n\n" + "subnetwork\030\021 \001(\tB)\340A\001\372A#\n" + "!compute.googleapis.com/Subnetwork\022K\n\n" - + "ip_version\030\025 \001(" - + "\01622.google.cloud.networkservices.v1.Gateway.IpVersionB\003\340A\001\022N\n\r" - + "envoy_headers\030\034 \001(" - + "\0162-.google.cloud.networkservices.v1.EnvoyHeadersB\003\340A\001H\000\210\001\001\022O\n" - + "\014routing_mode\030 \001(\016" - + "24.google.cloud.networkservices.v1.Gateway.RoutingModeB\003\340A\001\032-\n" + + "ip_version\030\025 \001(\01622.google.cloud" + + ".networkservices.v1.Gateway.IpVersionB\003\340A\001\022N\n\r" + + "envoy_headers\030\034 \001(\0162-.google.cloud" + + ".networkservices.v1.EnvoyHeadersB\003\340A\001H\000\210\001\001\022O\n" + + "\014routing_mode\030 \001(\01624.google.cloud." + + "networkservices.v1.Gateway.RoutingModeB\003\340A\001\022 \n" + + "\023allow_global_access\030! \001(\010B\003\340A\001\032-\n" + "\013LabelsEntry\022\013\n" + "\003key\030\001 \001(\t\022\r\n" + "\005value\030\002 \001(\t:\0028\001\"C\n" @@ -131,8 +133,8 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\013RoutingMode\022\031\n" + "\025EXPLICIT_ROUTING_MODE\020\000\022\031\n" + "\025NEXT_HOP_ROUTING_MODE\020\001:g\352Ad\n" - + "&networkservices.googleapis.com/Gateway\022:projects" - + "/{project}/locations/{location}/gateways/{gateway}B\020\n" + + "&networkservices.googleapis.com" + + "/Gateway\022:projects/{project}/locations/{location}/gateways/{gateway}B\020\n" + "\016_envoy_headers\"|\n" + "\023ListGatewaysRequest\022>\n" + "\006parent\030\001 \001(" @@ -150,31 +152,29 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\006parent\030\001 \001(" + "\tB.\340A\002\372A(\022&networkservices.googleapis.com/Gateway\022\027\n\n" + "gateway_id\030\002 \001(\tB\003\340A\002\022>\n" - + "\007gateway\030\003" - + " \001(\0132(.google.cloud.networkservices.v1.GatewayB\003\340A\002\"\214\001\n" + + "\007gateway\030\003 \001(\0132(." + + "google.cloud.networkservices.v1.GatewayB\003\340A\002\"\214\001\n" + "\024UpdateGatewayRequest\0224\n" + "\013update_mask\030\001 \001(\0132\032.google.protobuf.FieldMaskB\003\340A\001\022>\n" - + "\007gateway\030\002 \001" - + "(\0132(.google.cloud.networkservices.v1.GatewayB\003\340A\002\"T\n" + + "\007gateway\030\002" + + " \001(\0132(.google.cloud.networkservices.v1.GatewayB\003\340A\002\"T\n" + "\024DeleteGatewayRequest\022<\n" + "\004name\030\001 \001(\tB.\340A\002\372A(\n" + "&networkservices.googleapis.com/GatewayB\211\006\n" - + "#com.google.cloud.networkservices.v1B\014GatewayProtoP\001ZMcloud.g" - + "oogle.com/go/networkservices/apiv1/netwo" - + "rkservicespb;networkservicespb\252\002\037Google." - + "Cloud.NetworkServices.V1\312\002\037Google\\Cloud\\" - + "NetworkServices\\V1\352\002\"Google::Cloud::NetworkServices::V1\352A\221\001\n" - + "4networksecurity.googleapis.com/GatewaySecurityPolicy\022Yproje" - + "cts/{project}/locations/{location}/gatew" - + "aySecurityPolicies/{gateway_security_policy}\352Aa\n" - + "!compute.googleapis.com/Subnetwo" - + "rk\022 + * Request used by the GetAgentGateway method. + *
            + * + * Protobuf type {@code google.cloud.networkservices.v1.GetAgentGatewayRequest} + */ +@com.google.protobuf.Generated +public final class GetAgentGatewayRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkservices.v1.GetAgentGatewayRequest) + GetAgentGatewayRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "GetAgentGatewayRequest"); + } + + // Use GetAgentGatewayRequest.newBuilder() to construct. + private GetAgentGatewayRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private GetAgentGatewayRequest() { + name_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkservices.v1.AgentGatewayProto + .internal_static_google_cloud_networkservices_v1_GetAgentGatewayRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkservices.v1.AgentGatewayProto + .internal_static_google_cloud_networkservices_v1_GetAgentGatewayRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkservices.v1.GetAgentGatewayRequest.class, + com.google.cloud.networkservices.v1.GetAgentGatewayRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
            +   * Required. A name of the AgentGateway to get. Must be in the format
            +   * `projects/*/locations/*/agentGateways/*`.
            +   * 
            + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + 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(); + name_ = s; + return s; + } + } + + /** + * + * + *
            +   * Required. A name of the AgentGateway to get. Must be in the format
            +   * `projects/*/locations/*/agentGateways/*`.
            +   * 
            + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = 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 { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + 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(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + 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.networkservices.v1.GetAgentGatewayRequest)) { + return super.equals(obj); + } + com.google.cloud.networkservices.v1.GetAgentGatewayRequest other = + (com.google.cloud.networkservices.v1.GetAgentGatewayRequest) obj; + + if (!getName().equals(other.getName())) 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) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.networkservices.v1.GetAgentGatewayRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkservices.v1.GetAgentGatewayRequest 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.networkservices.v1.GetAgentGatewayRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkservices.v1.GetAgentGatewayRequest 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.networkservices.v1.GetAgentGatewayRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkservices.v1.GetAgentGatewayRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkservices.v1.GetAgentGatewayRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkservices.v1.GetAgentGatewayRequest 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.networkservices.v1.GetAgentGatewayRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkservices.v1.GetAgentGatewayRequest 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.networkservices.v1.GetAgentGatewayRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkservices.v1.GetAgentGatewayRequest 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.networkservices.v1.GetAgentGatewayRequest 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 used by the GetAgentGateway method.
            +   * 
            + * + * Protobuf type {@code google.cloud.networkservices.v1.GetAgentGatewayRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkservices.v1.GetAgentGatewayRequest) + com.google.cloud.networkservices.v1.GetAgentGatewayRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkservices.v1.AgentGatewayProto + .internal_static_google_cloud_networkservices_v1_GetAgentGatewayRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkservices.v1.AgentGatewayProto + .internal_static_google_cloud_networkservices_v1_GetAgentGatewayRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkservices.v1.GetAgentGatewayRequest.class, + com.google.cloud.networkservices.v1.GetAgentGatewayRequest.Builder.class); + } + + // Construct using com.google.cloud.networkservices.v1.GetAgentGatewayRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkservices.v1.AgentGatewayProto + .internal_static_google_cloud_networkservices_v1_GetAgentGatewayRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkservices.v1.GetAgentGatewayRequest getDefaultInstanceForType() { + return com.google.cloud.networkservices.v1.GetAgentGatewayRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkservices.v1.GetAgentGatewayRequest build() { + com.google.cloud.networkservices.v1.GetAgentGatewayRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkservices.v1.GetAgentGatewayRequest buildPartial() { + com.google.cloud.networkservices.v1.GetAgentGatewayRequest result = + new com.google.cloud.networkservices.v1.GetAgentGatewayRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.networkservices.v1.GetAgentGatewayRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.networkservices.v1.GetAgentGatewayRequest) { + return mergeFrom((com.google.cloud.networkservices.v1.GetAgentGatewayRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.networkservices.v1.GetAgentGatewayRequest other) { + if (other == com.google.cloud.networkservices.v1.GetAgentGatewayRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + + /** + * + * + *
            +     * Required. A name of the AgentGateway to get. Must be in the format
            +     * `projects/*/locations/*/agentGateways/*`.
            +     * 
            + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
            +     * Required. A name of the AgentGateway to get. Must be in the format
            +     * `projects/*/locations/*/agentGateways/*`.
            +     * 
            + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
            +     * Required. A name of the AgentGateway to get. Must be in the format
            +     * `projects/*/locations/*/agentGateways/*`.
            +     * 
            + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Required. A name of the AgentGateway to get. Must be in the format
            +     * `projects/*/locations/*/agentGateways/*`.
            +     * 
            + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
            +     * Required. A name of the AgentGateway to get. Must be in the format
            +     * `projects/*/locations/*/agentGateways/*`.
            +     * 
            + * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.networkservices.v1.GetAgentGatewayRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkservices.v1.GetAgentGatewayRequest) + private static final com.google.cloud.networkservices.v1.GetAgentGatewayRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.networkservices.v1.GetAgentGatewayRequest(); + } + + public static com.google.cloud.networkservices.v1.GetAgentGatewayRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetAgentGatewayRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.networkservices.v1.GetAgentGatewayRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-oracledatabase/proto-google-cloud-oracledatabase-v1/src/main/java/com/google/cloud/oracledatabase/v1/GetGoldengateDeploymentEnvironmentRequestOrBuilder.java b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/GetAgentGatewayRequestOrBuilder.java similarity index 66% rename from java-oracledatabase/proto-google-cloud-oracledatabase-v1/src/main/java/com/google/cloud/oracledatabase/v1/GetGoldengateDeploymentEnvironmentRequestOrBuilder.java rename to java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/GetAgentGatewayRequestOrBuilder.java index bdfa63154327..1bc9d23547cc 100644 --- a/java-oracledatabase/proto-google-cloud-oracledatabase-v1/src/main/java/com/google/cloud/oracledatabase/v1/GetGoldengateDeploymentEnvironmentRequestOrBuilder.java +++ b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/GetAgentGatewayRequestOrBuilder.java @@ -15,23 +15,23 @@ */ // Generated by the protocol buffer compiler. DO NOT EDIT! // NO CHECKED-IN PROTOBUF GENCODE -// source: google/cloud/oracledatabase/v1/goldengate_deployment_environment.proto +// source: google/cloud/networkservices/v1/agent_gateway.proto // Protobuf Java Version: 4.33.2 -package com.google.cloud.oracledatabase.v1; +package com.google.cloud.networkservices.v1; @com.google.protobuf.Generated -public interface GetGoldengateDeploymentEnvironmentRequestOrBuilder +public interface GetAgentGatewayRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.oracledatabase.v1.GetGoldengateDeploymentEnvironmentRequest) + // @@protoc_insertion_point(interface_extends:google.cloud.networkservices.v1.GetAgentGatewayRequest) com.google.protobuf.MessageOrBuilder { /** * * *
            -   * Required. Name of the resource with the format:
            -   * projects/{project}/locations/{location}/goldengateDeploymentEnvironments/{goldengate_deployment_environment}
            +   * Required. A name of the AgentGateway to get. Must be in the format
            +   * `projects/*/locations/*/agentGateways/*`.
                * 
            * * @@ -46,8 +46,8 @@ public interface GetGoldengateDeploymentEnvironmentRequestOrBuilder * * *
            -   * Required. Name of the resource with the format:
            -   * projects/{project}/locations/{location}/goldengateDeploymentEnvironments/{goldengate_deployment_environment}
            +   * Required. A name of the AgentGateway to get. Must be in the format
            +   * `projects/*/locations/*/agentGateways/*`.
                * 
            * * diff --git a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/GetEndpointPolicyRequest.java b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/GetEndpointPolicyRequest.java index 40a22f5b63ce..9237dcf24646 100644 --- a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/GetEndpointPolicyRequest.java +++ b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/GetEndpointPolicyRequest.java @@ -80,7 +80,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * *
                * Required. A name of the EndpointPolicy to get. Must be in the format
            -   * `projects/*/locations/global/endpointPolicies/*`.
            +   * `projects/*/locations/*/endpointPolicies/*`.
                * 
            * * @@ -107,7 +107,7 @@ public java.lang.String getName() { * *
                * Required. A name of the EndpointPolicy to get. Must be in the format
            -   * `projects/*/locations/global/endpointPolicies/*`.
            +   * `projects/*/locations/*/endpointPolicies/*`.
                * 
            * * @@ -450,7 +450,7 @@ public Builder mergeFrom( * *
                  * Required. A name of the EndpointPolicy to get. Must be in the format
            -     * `projects/*/locations/global/endpointPolicies/*`.
            +     * `projects/*/locations/*/endpointPolicies/*`.
                  * 
            * * @@ -476,7 +476,7 @@ public java.lang.String getName() { * *
                  * Required. A name of the EndpointPolicy to get. Must be in the format
            -     * `projects/*/locations/global/endpointPolicies/*`.
            +     * `projects/*/locations/*/endpointPolicies/*`.
                  * 
            * * @@ -502,7 +502,7 @@ public com.google.protobuf.ByteString getNameBytes() { * *
                  * Required. A name of the EndpointPolicy to get. Must be in the format
            -     * `projects/*/locations/global/endpointPolicies/*`.
            +     * `projects/*/locations/*/endpointPolicies/*`.
                  * 
            * * @@ -527,7 +527,7 @@ public Builder setName(java.lang.String value) { * *
                  * Required. A name of the EndpointPolicy to get. Must be in the format
            -     * `projects/*/locations/global/endpointPolicies/*`.
            +     * `projects/*/locations/*/endpointPolicies/*`.
                  * 
            * * @@ -548,7 +548,7 @@ public Builder clearName() { * *
                  * Required. A name of the EndpointPolicy to get. Must be in the format
            -     * `projects/*/locations/global/endpointPolicies/*`.
            +     * `projects/*/locations/*/endpointPolicies/*`.
                  * 
            * * diff --git a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/GetEndpointPolicyRequestOrBuilder.java b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/GetEndpointPolicyRequestOrBuilder.java index bf0cf41b605a..cd549dca8591 100644 --- a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/GetEndpointPolicyRequestOrBuilder.java +++ b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/GetEndpointPolicyRequestOrBuilder.java @@ -31,7 +31,7 @@ public interface GetEndpointPolicyRequestOrBuilder * *
                * Required. A name of the EndpointPolicy to get. Must be in the format
            -   * `projects/*/locations/global/endpointPolicies/*`.
            +   * `projects/*/locations/*/endpointPolicies/*`.
                * 
            * * @@ -47,7 +47,7 @@ public interface GetEndpointPolicyRequestOrBuilder * *
                * Required. A name of the EndpointPolicy to get. Must be in the format
            -   * `projects/*/locations/global/endpointPolicies/*`.
            +   * `projects/*/locations/*/endpointPolicies/*`.
                * 
            * * diff --git a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/GetGrpcRouteRequest.java b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/GetGrpcRouteRequest.java index cadb2cb34410..2ff32c84fd60 100644 --- a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/GetGrpcRouteRequest.java +++ b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/GetGrpcRouteRequest.java @@ -80,7 +80,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * *
                * Required. A name of the GrpcRoute to get. Must be in the format
            -   * `projects/*/locations/global/grpcRoutes/*`.
            +   * `projects/*/locations/*/grpcRoutes/*`.
                * 
            * * @@ -107,7 +107,7 @@ public java.lang.String getName() { * *
                * Required. A name of the GrpcRoute to get. Must be in the format
            -   * `projects/*/locations/global/grpcRoutes/*`.
            +   * `projects/*/locations/*/grpcRoutes/*`.
                * 
            * * @@ -447,7 +447,7 @@ public Builder mergeFrom( * *
                  * Required. A name of the GrpcRoute to get. Must be in the format
            -     * `projects/*/locations/global/grpcRoutes/*`.
            +     * `projects/*/locations/*/grpcRoutes/*`.
                  * 
            * * @@ -473,7 +473,7 @@ public java.lang.String getName() { * *
                  * Required. A name of the GrpcRoute to get. Must be in the format
            -     * `projects/*/locations/global/grpcRoutes/*`.
            +     * `projects/*/locations/*/grpcRoutes/*`.
                  * 
            * * @@ -499,7 +499,7 @@ public com.google.protobuf.ByteString getNameBytes() { * *
                  * Required. A name of the GrpcRoute to get. Must be in the format
            -     * `projects/*/locations/global/grpcRoutes/*`.
            +     * `projects/*/locations/*/grpcRoutes/*`.
                  * 
            * * @@ -524,7 +524,7 @@ public Builder setName(java.lang.String value) { * *
                  * Required. A name of the GrpcRoute to get. Must be in the format
            -     * `projects/*/locations/global/grpcRoutes/*`.
            +     * `projects/*/locations/*/grpcRoutes/*`.
                  * 
            * * @@ -545,7 +545,7 @@ public Builder clearName() { * *
                  * Required. A name of the GrpcRoute to get. Must be in the format
            -     * `projects/*/locations/global/grpcRoutes/*`.
            +     * `projects/*/locations/*/grpcRoutes/*`.
                  * 
            * * diff --git a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/GetGrpcRouteRequestOrBuilder.java b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/GetGrpcRouteRequestOrBuilder.java index 5f47ddf84c34..2ed70bc32597 100644 --- a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/GetGrpcRouteRequestOrBuilder.java +++ b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/GetGrpcRouteRequestOrBuilder.java @@ -31,7 +31,7 @@ public interface GetGrpcRouteRequestOrBuilder * *
                * Required. A name of the GrpcRoute to get. Must be in the format
            -   * `projects/*/locations/global/grpcRoutes/*`.
            +   * `projects/*/locations/*/grpcRoutes/*`.
                * 
            * * @@ -47,7 +47,7 @@ public interface GetGrpcRouteRequestOrBuilder * *
                * Required. A name of the GrpcRoute to get. Must be in the format
            -   * `projects/*/locations/global/grpcRoutes/*`.
            +   * `projects/*/locations/*/grpcRoutes/*`.
                * 
            * * diff --git a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/GetHttpRouteRequest.java b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/GetHttpRouteRequest.java index d93ff0b56b1b..7624dd4bce2f 100644 --- a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/GetHttpRouteRequest.java +++ b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/GetHttpRouteRequest.java @@ -80,7 +80,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * *
                * Required. A name of the HttpRoute to get. Must be in the format
            -   * `projects/*/locations/global/httpRoutes/*`.
            +   * `projects/*/locations/*/httpRoutes/*`.
                * 
            * * @@ -107,7 +107,7 @@ public java.lang.String getName() { * *
                * Required. A name of the HttpRoute to get. Must be in the format
            -   * `projects/*/locations/global/httpRoutes/*`.
            +   * `projects/*/locations/*/httpRoutes/*`.
                * 
            * * @@ -447,7 +447,7 @@ public Builder mergeFrom( * *
                  * Required. A name of the HttpRoute to get. Must be in the format
            -     * `projects/*/locations/global/httpRoutes/*`.
            +     * `projects/*/locations/*/httpRoutes/*`.
                  * 
            * * @@ -473,7 +473,7 @@ public java.lang.String getName() { * *
                  * Required. A name of the HttpRoute to get. Must be in the format
            -     * `projects/*/locations/global/httpRoutes/*`.
            +     * `projects/*/locations/*/httpRoutes/*`.
                  * 
            * * @@ -499,7 +499,7 @@ public com.google.protobuf.ByteString getNameBytes() { * *
                  * Required. A name of the HttpRoute to get. Must be in the format
            -     * `projects/*/locations/global/httpRoutes/*`.
            +     * `projects/*/locations/*/httpRoutes/*`.
                  * 
            * * @@ -524,7 +524,7 @@ public Builder setName(java.lang.String value) { * *
                  * Required. A name of the HttpRoute to get. Must be in the format
            -     * `projects/*/locations/global/httpRoutes/*`.
            +     * `projects/*/locations/*/httpRoutes/*`.
                  * 
            * * @@ -545,7 +545,7 @@ public Builder clearName() { * *
                  * Required. A name of the HttpRoute to get. Must be in the format
            -     * `projects/*/locations/global/httpRoutes/*`.
            +     * `projects/*/locations/*/httpRoutes/*`.
                  * 
            * * diff --git a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/GetHttpRouteRequestOrBuilder.java b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/GetHttpRouteRequestOrBuilder.java index a1994d052e2e..5088242c3a77 100644 --- a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/GetHttpRouteRequestOrBuilder.java +++ b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/GetHttpRouteRequestOrBuilder.java @@ -31,7 +31,7 @@ public interface GetHttpRouteRequestOrBuilder * *
                * Required. A name of the HttpRoute to get. Must be in the format
            -   * `projects/*/locations/global/httpRoutes/*`.
            +   * `projects/*/locations/*/httpRoutes/*`.
                * 
            * * @@ -47,7 +47,7 @@ public interface GetHttpRouteRequestOrBuilder * *
                * Required. A name of the HttpRoute to get. Must be in the format
            -   * `projects/*/locations/global/httpRoutes/*`.
            +   * `projects/*/locations/*/httpRoutes/*`.
                * 
            * * diff --git a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/GetMeshRequest.java b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/GetMeshRequest.java index 8ddf4e436504..23f92c271acc 100644 --- a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/GetMeshRequest.java +++ b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/GetMeshRequest.java @@ -80,7 +80,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * *
                * Required. A name of the Mesh to get. Must be in the format
            -   * `projects/*/locations/global/meshes/*`.
            +   * `projects/*/locations/*/meshes/*`.
                * 
            * * @@ -107,7 +107,7 @@ public java.lang.String getName() { * *
                * Required. A name of the Mesh to get. Must be in the format
            -   * `projects/*/locations/global/meshes/*`.
            +   * `projects/*/locations/*/meshes/*`.
                * 
            * * @@ -446,7 +446,7 @@ public Builder mergeFrom( * *
                  * Required. A name of the Mesh to get. Must be in the format
            -     * `projects/*/locations/global/meshes/*`.
            +     * `projects/*/locations/*/meshes/*`.
                  * 
            * * @@ -472,7 +472,7 @@ public java.lang.String getName() { * *
                  * Required. A name of the Mesh to get. Must be in the format
            -     * `projects/*/locations/global/meshes/*`.
            +     * `projects/*/locations/*/meshes/*`.
                  * 
            * * @@ -498,7 +498,7 @@ public com.google.protobuf.ByteString getNameBytes() { * *
                  * Required. A name of the Mesh to get. Must be in the format
            -     * `projects/*/locations/global/meshes/*`.
            +     * `projects/*/locations/*/meshes/*`.
                  * 
            * * @@ -523,7 +523,7 @@ public Builder setName(java.lang.String value) { * *
                  * Required. A name of the Mesh to get. Must be in the format
            -     * `projects/*/locations/global/meshes/*`.
            +     * `projects/*/locations/*/meshes/*`.
                  * 
            * * @@ -544,7 +544,7 @@ public Builder clearName() { * *
                  * Required. A name of the Mesh to get. Must be in the format
            -     * `projects/*/locations/global/meshes/*`.
            +     * `projects/*/locations/*/meshes/*`.
                  * 
            * * diff --git a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/GetMeshRequestOrBuilder.java b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/GetMeshRequestOrBuilder.java index e12ef37e28d4..e8e843e7134b 100644 --- a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/GetMeshRequestOrBuilder.java +++ b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/GetMeshRequestOrBuilder.java @@ -31,7 +31,7 @@ public interface GetMeshRequestOrBuilder * *
                * Required. A name of the Mesh to get. Must be in the format
            -   * `projects/*/locations/global/meshes/*`.
            +   * `projects/*/locations/*/meshes/*`.
                * 
            * * @@ -47,7 +47,7 @@ public interface GetMeshRequestOrBuilder * *
                * Required. A name of the Mesh to get. Must be in the format
            -   * `projects/*/locations/global/meshes/*`.
            +   * `projects/*/locations/*/meshes/*`.
                * 
            * * diff --git a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/GetTcpRouteRequest.java b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/GetTcpRouteRequest.java index 470d94197a2a..22529b67d26b 100644 --- a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/GetTcpRouteRequest.java +++ b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/GetTcpRouteRequest.java @@ -80,7 +80,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * *
                * Required. A name of the TcpRoute to get. Must be in the format
            -   * `projects/*/locations/global/tcpRoutes/*`.
            +   * `projects/*/locations/*/tcpRoutes/*`.
                * 
            * * @@ -107,7 +107,7 @@ public java.lang.String getName() { * *
                * Required. A name of the TcpRoute to get. Must be in the format
            -   * `projects/*/locations/global/tcpRoutes/*`.
            +   * `projects/*/locations/*/tcpRoutes/*`.
                * 
            * * @@ -447,7 +447,7 @@ public Builder mergeFrom( * *
                  * Required. A name of the TcpRoute to get. Must be in the format
            -     * `projects/*/locations/global/tcpRoutes/*`.
            +     * `projects/*/locations/*/tcpRoutes/*`.
                  * 
            * * @@ -473,7 +473,7 @@ public java.lang.String getName() { * *
                  * Required. A name of the TcpRoute to get. Must be in the format
            -     * `projects/*/locations/global/tcpRoutes/*`.
            +     * `projects/*/locations/*/tcpRoutes/*`.
                  * 
            * * @@ -499,7 +499,7 @@ public com.google.protobuf.ByteString getNameBytes() { * *
                  * Required. A name of the TcpRoute to get. Must be in the format
            -     * `projects/*/locations/global/tcpRoutes/*`.
            +     * `projects/*/locations/*/tcpRoutes/*`.
                  * 
            * * @@ -524,7 +524,7 @@ public Builder setName(java.lang.String value) { * *
                  * Required. A name of the TcpRoute to get. Must be in the format
            -     * `projects/*/locations/global/tcpRoutes/*`.
            +     * `projects/*/locations/*/tcpRoutes/*`.
                  * 
            * * @@ -545,7 +545,7 @@ public Builder clearName() { * *
                  * Required. A name of the TcpRoute to get. Must be in the format
            -     * `projects/*/locations/global/tcpRoutes/*`.
            +     * `projects/*/locations/*/tcpRoutes/*`.
                  * 
            * * diff --git a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/GetTcpRouteRequestOrBuilder.java b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/GetTcpRouteRequestOrBuilder.java index 30d2ca705923..e2a7d9b6e252 100644 --- a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/GetTcpRouteRequestOrBuilder.java +++ b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/GetTcpRouteRequestOrBuilder.java @@ -31,7 +31,7 @@ public interface GetTcpRouteRequestOrBuilder * *
                * Required. A name of the TcpRoute to get. Must be in the format
            -   * `projects/*/locations/global/tcpRoutes/*`.
            +   * `projects/*/locations/*/tcpRoutes/*`.
                * 
            * * @@ -47,7 +47,7 @@ public interface GetTcpRouteRequestOrBuilder * *
                * Required. A name of the TcpRoute to get. Must be in the format
            -   * `projects/*/locations/global/tcpRoutes/*`.
            +   * `projects/*/locations/*/tcpRoutes/*`.
                * 
            * * diff --git a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/GetTlsRouteRequest.java b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/GetTlsRouteRequest.java index f079560de704..f471fdc0632a 100644 --- a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/GetTlsRouteRequest.java +++ b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/GetTlsRouteRequest.java @@ -80,7 +80,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * *
                * Required. A name of the TlsRoute to get. Must be in the format
            -   * `projects/*/locations/global/tlsRoutes/*`.
            +   * `projects/*/locations/*/tlsRoutes/*`.
                * 
            * * @@ -107,7 +107,7 @@ public java.lang.String getName() { * *
                * Required. A name of the TlsRoute to get. Must be in the format
            -   * `projects/*/locations/global/tlsRoutes/*`.
            +   * `projects/*/locations/*/tlsRoutes/*`.
                * 
            * * @@ -447,7 +447,7 @@ public Builder mergeFrom( * *
                  * Required. A name of the TlsRoute to get. Must be in the format
            -     * `projects/*/locations/global/tlsRoutes/*`.
            +     * `projects/*/locations/*/tlsRoutes/*`.
                  * 
            * * @@ -473,7 +473,7 @@ public java.lang.String getName() { * *
                  * Required. A name of the TlsRoute to get. Must be in the format
            -     * `projects/*/locations/global/tlsRoutes/*`.
            +     * `projects/*/locations/*/tlsRoutes/*`.
                  * 
            * * @@ -499,7 +499,7 @@ public com.google.protobuf.ByteString getNameBytes() { * *
                  * Required. A name of the TlsRoute to get. Must be in the format
            -     * `projects/*/locations/global/tlsRoutes/*`.
            +     * `projects/*/locations/*/tlsRoutes/*`.
                  * 
            * * @@ -524,7 +524,7 @@ public Builder setName(java.lang.String value) { * *
                  * Required. A name of the TlsRoute to get. Must be in the format
            -     * `projects/*/locations/global/tlsRoutes/*`.
            +     * `projects/*/locations/*/tlsRoutes/*`.
                  * 
            * * @@ -545,7 +545,7 @@ public Builder clearName() { * *
                  * Required. A name of the TlsRoute to get. Must be in the format
            -     * `projects/*/locations/global/tlsRoutes/*`.
            +     * `projects/*/locations/*/tlsRoutes/*`.
                  * 
            * * diff --git a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/GetTlsRouteRequestOrBuilder.java b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/GetTlsRouteRequestOrBuilder.java index a984f11582c5..37d61cd06c05 100644 --- a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/GetTlsRouteRequestOrBuilder.java +++ b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/GetTlsRouteRequestOrBuilder.java @@ -31,7 +31,7 @@ public interface GetTlsRouteRequestOrBuilder * *
                * Required. A name of the TlsRoute to get. Must be in the format
            -   * `projects/*/locations/global/tlsRoutes/*`.
            +   * `projects/*/locations/*/tlsRoutes/*`.
                * 
            * * @@ -47,7 +47,7 @@ public interface GetTlsRouteRequestOrBuilder * *
                * Required. A name of the TlsRoute to get. Must be in the format
            -   * `projects/*/locations/global/tlsRoutes/*`.
            +   * `projects/*/locations/*/tlsRoutes/*`.
                * 
            * * diff --git a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/GrpcRoute.java b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/GrpcRoute.java index 7a531b52a8e1..3a9b3013dce6 100644 --- a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/GrpcRoute.java +++ b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/GrpcRoute.java @@ -14608,7 +14608,7 @@ public com.google.cloud.networkservices.v1.GrpcRoute.RouteRule getDefaultInstanc * *
                * Identifier. Name of the GrpcRoute resource. It matches pattern
            -   * `projects/*/locations/global/grpcRoutes/<grpc_route_name>`
            +   * `projects/*/locations/*/grpcRoutes/<grpc_route_name>`
                * 
            * * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; @@ -14633,7 +14633,7 @@ public java.lang.String getName() { * *
                * Identifier. Name of the GrpcRoute resource. It matches pattern
            -   * `projects/*/locations/global/grpcRoutes/<grpc_route_name>`
            +   * `projects/*/locations/*/grpcRoutes/<grpc_route_name>`
                * 
            * * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; @@ -15174,7 +15174,7 @@ public com.google.protobuf.ByteString getHostnamesBytes(int index) { * one of the routing rules to route the requests served by the mesh. * * Each mesh reference should match the pattern: - * `projects/*/locations/global/meshes/<mesh_name>` + * `projects/*/locations/*/meshes/<mesh_name>` * * * @@ -15195,7 +15195,7 @@ public com.google.protobuf.ProtocolStringList getMeshesList() { * one of the routing rules to route the requests served by the mesh. * * Each mesh reference should match the pattern: - * `projects/*/locations/global/meshes/<mesh_name>` + * `projects/*/locations/*/meshes/<mesh_name>` * * * @@ -15216,7 +15216,7 @@ public int getMeshesCount() { * one of the routing rules to route the requests served by the mesh. * * Each mesh reference should match the pattern: - * `projects/*/locations/global/meshes/<mesh_name>` + * `projects/*/locations/*/meshes/<mesh_name>` * * * @@ -15238,7 +15238,7 @@ public java.lang.String getMeshes(int index) { * one of the routing rules to route the requests served by the mesh. * * Each mesh reference should match the pattern: - * `projects/*/locations/global/meshes/<mesh_name>` + * `projects/*/locations/*/meshes/<mesh_name>` * * * @@ -15267,7 +15267,7 @@ public com.google.protobuf.ByteString getMeshesBytes(int index) { * gateway. * * Each gateway reference should match the pattern: - * `projects/*/locations/global/gateways/<gateway_name>` + * `projects/*/locations/*/gateways/<gateway_name>` * * * @@ -15289,7 +15289,7 @@ public com.google.protobuf.ProtocolStringList getGatewaysList() { * gateway. * * Each gateway reference should match the pattern: - * `projects/*/locations/global/gateways/<gateway_name>` + * `projects/*/locations/*/gateways/<gateway_name>` * * * @@ -15311,7 +15311,7 @@ public int getGatewaysCount() { * gateway. * * Each gateway reference should match the pattern: - * `projects/*/locations/global/gateways/<gateway_name>` + * `projects/*/locations/*/gateways/<gateway_name>` * * * @@ -15334,7 +15334,7 @@ public java.lang.String getGateways(int index) { * gateway. * * Each gateway reference should match the pattern: - * `projects/*/locations/global/gateways/<gateway_name>` + * `projects/*/locations/*/gateways/<gateway_name>` * * * @@ -16143,7 +16143,7 @@ public Builder mergeFrom( * *
                  * Identifier. Name of the GrpcRoute resource. It matches pattern
            -     * `projects/*/locations/global/grpcRoutes/<grpc_route_name>`
            +     * `projects/*/locations/*/grpcRoutes/<grpc_route_name>`
                  * 
            * * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; @@ -16167,7 +16167,7 @@ public java.lang.String getName() { * *
                  * Identifier. Name of the GrpcRoute resource. It matches pattern
            -     * `projects/*/locations/global/grpcRoutes/<grpc_route_name>`
            +     * `projects/*/locations/*/grpcRoutes/<grpc_route_name>`
                  * 
            * * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; @@ -16191,7 +16191,7 @@ public com.google.protobuf.ByteString getNameBytes() { * *
                  * Identifier. Name of the GrpcRoute resource. It matches pattern
            -     * `projects/*/locations/global/grpcRoutes/<grpc_route_name>`
            +     * `projects/*/locations/*/grpcRoutes/<grpc_route_name>`
                  * 
            * * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; @@ -16214,7 +16214,7 @@ public Builder setName(java.lang.String value) { * *
                  * Identifier. Name of the GrpcRoute resource. It matches pattern
            -     * `projects/*/locations/global/grpcRoutes/<grpc_route_name>`
            +     * `projects/*/locations/*/grpcRoutes/<grpc_route_name>`
                  * 
            * * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; @@ -16233,7 +16233,7 @@ public Builder clearName() { * *
                  * Identifier. Name of the GrpcRoute resource. It matches pattern
            -     * `projects/*/locations/global/grpcRoutes/<grpc_route_name>`
            +     * `projects/*/locations/*/grpcRoutes/<grpc_route_name>`
                  * 
            * * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; @@ -17546,7 +17546,7 @@ private void ensureMeshesIsMutable() { * one of the routing rules to route the requests served by the mesh. * * Each mesh reference should match the pattern: - * `projects/*/locations/global/meshes/<mesh_name>` + * `projects/*/locations/*/meshes/<mesh_name>` * * * @@ -17568,7 +17568,7 @@ public com.google.protobuf.ProtocolStringList getMeshesList() { * one of the routing rules to route the requests served by the mesh. * * Each mesh reference should match the pattern: - * `projects/*/locations/global/meshes/<mesh_name>` + * `projects/*/locations/*/meshes/<mesh_name>` * * * @@ -17589,7 +17589,7 @@ public int getMeshesCount() { * one of the routing rules to route the requests served by the mesh. * * Each mesh reference should match the pattern: - * `projects/*/locations/global/meshes/<mesh_name>` + * `projects/*/locations/*/meshes/<mesh_name>` * * * @@ -17611,7 +17611,7 @@ public java.lang.String getMeshes(int index) { * one of the routing rules to route the requests served by the mesh. * * Each mesh reference should match the pattern: - * `projects/*/locations/global/meshes/<mesh_name>` + * `projects/*/locations/*/meshes/<mesh_name>` * * * @@ -17633,7 +17633,7 @@ public com.google.protobuf.ByteString getMeshesBytes(int index) { * one of the routing rules to route the requests served by the mesh. * * Each mesh reference should match the pattern: - * `projects/*/locations/global/meshes/<mesh_name>` + * `projects/*/locations/*/meshes/<mesh_name>` * * * @@ -17663,7 +17663,7 @@ public Builder setMeshes(int index, java.lang.String value) { * one of the routing rules to route the requests served by the mesh. * * Each mesh reference should match the pattern: - * `projects/*/locations/global/meshes/<mesh_name>` + * `projects/*/locations/*/meshes/<mesh_name>` * * * @@ -17692,7 +17692,7 @@ public Builder addMeshes(java.lang.String value) { * one of the routing rules to route the requests served by the mesh. * * Each mesh reference should match the pattern: - * `projects/*/locations/global/meshes/<mesh_name>` + * `projects/*/locations/*/meshes/<mesh_name>` * * * @@ -17718,7 +17718,7 @@ public Builder addAllMeshes(java.lang.Iterable values) { * one of the routing rules to route the requests served by the mesh. * * Each mesh reference should match the pattern: - * `projects/*/locations/global/meshes/<mesh_name>` + * `projects/*/locations/*/meshes/<mesh_name>` * * * @@ -17743,7 +17743,7 @@ public Builder clearMeshes() { * one of the routing rules to route the requests served by the mesh. * * Each mesh reference should match the pattern: - * `projects/*/locations/global/meshes/<mesh_name>` + * `projects/*/locations/*/meshes/<mesh_name>` * * * @@ -17784,7 +17784,7 @@ private void ensureGatewaysIsMutable() { * gateway. * * Each gateway reference should match the pattern: - * `projects/*/locations/global/gateways/<gateway_name>` + * `projects/*/locations/*/gateways/<gateway_name>` * * * @@ -17807,7 +17807,7 @@ public com.google.protobuf.ProtocolStringList getGatewaysList() { * gateway. * * Each gateway reference should match the pattern: - * `projects/*/locations/global/gateways/<gateway_name>` + * `projects/*/locations/*/gateways/<gateway_name>` * * * @@ -17829,7 +17829,7 @@ public int getGatewaysCount() { * gateway. * * Each gateway reference should match the pattern: - * `projects/*/locations/global/gateways/<gateway_name>` + * `projects/*/locations/*/gateways/<gateway_name>` * * * @@ -17852,7 +17852,7 @@ public java.lang.String getGateways(int index) { * gateway. * * Each gateway reference should match the pattern: - * `projects/*/locations/global/gateways/<gateway_name>` + * `projects/*/locations/*/gateways/<gateway_name>` * * * @@ -17875,7 +17875,7 @@ public com.google.protobuf.ByteString getGatewaysBytes(int index) { * gateway. * * Each gateway reference should match the pattern: - * `projects/*/locations/global/gateways/<gateway_name>` + * `projects/*/locations/*/gateways/<gateway_name>` * * * @@ -17906,7 +17906,7 @@ public Builder setGateways(int index, java.lang.String value) { * gateway. * * Each gateway reference should match the pattern: - * `projects/*/locations/global/gateways/<gateway_name>` + * `projects/*/locations/*/gateways/<gateway_name>` * * * @@ -17936,7 +17936,7 @@ public Builder addGateways(java.lang.String value) { * gateway. * * Each gateway reference should match the pattern: - * `projects/*/locations/global/gateways/<gateway_name>` + * `projects/*/locations/*/gateways/<gateway_name>` * * * @@ -17963,7 +17963,7 @@ public Builder addAllGateways(java.lang.Iterable values) { * gateway. * * Each gateway reference should match the pattern: - * `projects/*/locations/global/gateways/<gateway_name>` + * `projects/*/locations/*/gateways/<gateway_name>` * * * @@ -17989,7 +17989,7 @@ public Builder clearGateways() { * gateway. * * Each gateway reference should match the pattern: - * `projects/*/locations/global/gateways/<gateway_name>` + * `projects/*/locations/*/gateways/<gateway_name>` * * * diff --git a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/GrpcRouteOrBuilder.java b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/GrpcRouteOrBuilder.java index eb6a751f7016..6fbac0dc15d9 100644 --- a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/GrpcRouteOrBuilder.java +++ b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/GrpcRouteOrBuilder.java @@ -31,7 +31,7 @@ public interface GrpcRouteOrBuilder * *
                * Identifier. Name of the GrpcRoute resource. It matches pattern
            -   * `projects/*/locations/global/grpcRoutes/<grpc_route_name>`
            +   * `projects/*/locations/*/grpcRoutes/<grpc_route_name>`
                * 
            * * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; @@ -45,7 +45,7 @@ public interface GrpcRouteOrBuilder * *
                * Identifier. Name of the GrpcRoute resource. It matches pattern
            -   * `projects/*/locations/global/grpcRoutes/<grpc_route_name>`
            +   * `projects/*/locations/*/grpcRoutes/<grpc_route_name>`
                * 
            * * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; @@ -433,7 +433,7 @@ java.lang.String getLabelsOrDefault( * one of the routing rules to route the requests served by the mesh. * * Each mesh reference should match the pattern: - * `projects/*/locations/global/meshes/<mesh_name>` + * `projects/*/locations/*/meshes/<mesh_name>` * * * @@ -452,7 +452,7 @@ java.lang.String getLabelsOrDefault( * one of the routing rules to route the requests served by the mesh. * * Each mesh reference should match the pattern: - * `projects/*/locations/global/meshes/<mesh_name>` + * `projects/*/locations/*/meshes/<mesh_name>` * * * @@ -471,7 +471,7 @@ java.lang.String getLabelsOrDefault( * one of the routing rules to route the requests served by the mesh. * * Each mesh reference should match the pattern: - * `projects/*/locations/global/meshes/<mesh_name>` + * `projects/*/locations/*/meshes/<mesh_name>` * * * @@ -491,7 +491,7 @@ java.lang.String getLabelsOrDefault( * one of the routing rules to route the requests served by the mesh. * * Each mesh reference should match the pattern: - * `projects/*/locations/global/meshes/<mesh_name>` + * `projects/*/locations/*/meshes/<mesh_name>` * * * @@ -512,7 +512,7 @@ java.lang.String getLabelsOrDefault( * gateway. * * Each gateway reference should match the pattern: - * `projects/*/locations/global/gateways/<gateway_name>` + * `projects/*/locations/*/gateways/<gateway_name>` * * * @@ -532,7 +532,7 @@ java.lang.String getLabelsOrDefault( * gateway. * * Each gateway reference should match the pattern: - * `projects/*/locations/global/gateways/<gateway_name>` + * `projects/*/locations/*/gateways/<gateway_name>` * * * @@ -552,7 +552,7 @@ java.lang.String getLabelsOrDefault( * gateway. * * Each gateway reference should match the pattern: - * `projects/*/locations/global/gateways/<gateway_name>` + * `projects/*/locations/*/gateways/<gateway_name>` * * * @@ -573,7 +573,7 @@ java.lang.String getLabelsOrDefault( * gateway. * * Each gateway reference should match the pattern: - * `projects/*/locations/global/gateways/<gateway_name>` + * `projects/*/locations/*/gateways/<gateway_name>` * * * diff --git a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/HttpRoute.java b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/HttpRoute.java index d2bdf838d59c..fbf60b664871 100644 --- a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/HttpRoute.java +++ b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/HttpRoute.java @@ -30393,7 +30393,7 @@ public com.google.cloud.networkservices.v1.HttpRoute.RouteRule getDefaultInstanc * *
                * Identifier. Name of the HttpRoute resource. It matches pattern
            -   * `projects/*/locations/global/httpRoutes/http_route_name>`.
            +   * `projects/*/locations/*/httpRoutes/http_route_name>`.
                * 
            * * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; @@ -30418,7 +30418,7 @@ public java.lang.String getName() { * *
                * Identifier. Name of the HttpRoute resource. It matches pattern
            -   * `projects/*/locations/global/httpRoutes/http_route_name>`.
            +   * `projects/*/locations/*/httpRoutes/http_route_name>`.
                * 
            * * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; @@ -30824,7 +30824,7 @@ public com.google.protobuf.ByteString getHostnamesBytes(int index) { * one of the routing rules to route the requests served by the mesh. * * Each mesh reference should match the pattern: - * `projects/*/locations/global/meshes/<mesh_name>` + * `projects/*/locations/*/meshes/<mesh_name>` * * The attached Mesh should be of a type SIDECAR * @@ -30847,7 +30847,7 @@ public com.google.protobuf.ProtocolStringList getMeshesList() { * one of the routing rules to route the requests served by the mesh. * * Each mesh reference should match the pattern: - * `projects/*/locations/global/meshes/<mesh_name>` + * `projects/*/locations/*/meshes/<mesh_name>` * * The attached Mesh should be of a type SIDECAR * @@ -30870,7 +30870,7 @@ public int getMeshesCount() { * one of the routing rules to route the requests served by the mesh. * * Each mesh reference should match the pattern: - * `projects/*/locations/global/meshes/<mesh_name>` + * `projects/*/locations/*/meshes/<mesh_name>` * * The attached Mesh should be of a type SIDECAR * @@ -30894,7 +30894,7 @@ public java.lang.String getMeshes(int index) { * one of the routing rules to route the requests served by the mesh. * * Each mesh reference should match the pattern: - * `projects/*/locations/global/meshes/<mesh_name>` + * `projects/*/locations/*/meshes/<mesh_name>` * * The attached Mesh should be of a type SIDECAR * @@ -30925,7 +30925,7 @@ public com.google.protobuf.ByteString getMeshesBytes(int index) { * gateway. * * Each gateway reference should match the pattern: - * `projects/*/locations/global/gateways/<gateway_name>` + * `projects/*/locations/*/gateways/<gateway_name>` * * * @@ -30947,7 +30947,7 @@ public com.google.protobuf.ProtocolStringList getGatewaysList() { * gateway. * * Each gateway reference should match the pattern: - * `projects/*/locations/global/gateways/<gateway_name>` + * `projects/*/locations/*/gateways/<gateway_name>` * * * @@ -30969,7 +30969,7 @@ public int getGatewaysCount() { * gateway. * * Each gateway reference should match the pattern: - * `projects/*/locations/global/gateways/<gateway_name>` + * `projects/*/locations/*/gateways/<gateway_name>` * * * @@ -30992,7 +30992,7 @@ public java.lang.String getGateways(int index) { * gateway. * * Each gateway reference should match the pattern: - * `projects/*/locations/global/gateways/<gateway_name>` + * `projects/*/locations/*/gateways/<gateway_name>` * * * @@ -31898,7 +31898,7 @@ public Builder mergeFrom( * *
                  * Identifier. Name of the HttpRoute resource. It matches pattern
            -     * `projects/*/locations/global/httpRoutes/http_route_name>`.
            +     * `projects/*/locations/*/httpRoutes/http_route_name>`.
                  * 
            * * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; @@ -31922,7 +31922,7 @@ public java.lang.String getName() { * *
                  * Identifier. Name of the HttpRoute resource. It matches pattern
            -     * `projects/*/locations/global/httpRoutes/http_route_name>`.
            +     * `projects/*/locations/*/httpRoutes/http_route_name>`.
                  * 
            * * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; @@ -31946,7 +31946,7 @@ public com.google.protobuf.ByteString getNameBytes() { * *
                  * Identifier. Name of the HttpRoute resource. It matches pattern
            -     * `projects/*/locations/global/httpRoutes/http_route_name>`.
            +     * `projects/*/locations/*/httpRoutes/http_route_name>`.
                  * 
            * * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; @@ -31969,7 +31969,7 @@ public Builder setName(java.lang.String value) { * *
                  * Identifier. Name of the HttpRoute resource. It matches pattern
            -     * `projects/*/locations/global/httpRoutes/http_route_name>`.
            +     * `projects/*/locations/*/httpRoutes/http_route_name>`.
                  * 
            * * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; @@ -31988,7 +31988,7 @@ public Builder clearName() { * *
                  * Identifier. Name of the HttpRoute resource. It matches pattern
            -     * `projects/*/locations/global/httpRoutes/http_route_name>`.
            +     * `projects/*/locations/*/httpRoutes/http_route_name>`.
                  * 
            * * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; @@ -33066,7 +33066,7 @@ private void ensureMeshesIsMutable() { * one of the routing rules to route the requests served by the mesh. * * Each mesh reference should match the pattern: - * `projects/*/locations/global/meshes/<mesh_name>` + * `projects/*/locations/*/meshes/<mesh_name>` * * The attached Mesh should be of a type SIDECAR * @@ -33090,7 +33090,7 @@ public com.google.protobuf.ProtocolStringList getMeshesList() { * one of the routing rules to route the requests served by the mesh. * * Each mesh reference should match the pattern: - * `projects/*/locations/global/meshes/<mesh_name>` + * `projects/*/locations/*/meshes/<mesh_name>` * * The attached Mesh should be of a type SIDECAR * @@ -33113,7 +33113,7 @@ public int getMeshesCount() { * one of the routing rules to route the requests served by the mesh. * * Each mesh reference should match the pattern: - * `projects/*/locations/global/meshes/<mesh_name>` + * `projects/*/locations/*/meshes/<mesh_name>` * * The attached Mesh should be of a type SIDECAR * @@ -33137,7 +33137,7 @@ public java.lang.String getMeshes(int index) { * one of the routing rules to route the requests served by the mesh. * * Each mesh reference should match the pattern: - * `projects/*/locations/global/meshes/<mesh_name>` + * `projects/*/locations/*/meshes/<mesh_name>` * * The attached Mesh should be of a type SIDECAR * @@ -33161,7 +33161,7 @@ public com.google.protobuf.ByteString getMeshesBytes(int index) { * one of the routing rules to route the requests served by the mesh. * * Each mesh reference should match the pattern: - * `projects/*/locations/global/meshes/<mesh_name>` + * `projects/*/locations/*/meshes/<mesh_name>` * * The attached Mesh should be of a type SIDECAR * @@ -33193,7 +33193,7 @@ public Builder setMeshes(int index, java.lang.String value) { * one of the routing rules to route the requests served by the mesh. * * Each mesh reference should match the pattern: - * `projects/*/locations/global/meshes/<mesh_name>` + * `projects/*/locations/*/meshes/<mesh_name>` * * The attached Mesh should be of a type SIDECAR * @@ -33224,7 +33224,7 @@ public Builder addMeshes(java.lang.String value) { * one of the routing rules to route the requests served by the mesh. * * Each mesh reference should match the pattern: - * `projects/*/locations/global/meshes/<mesh_name>` + * `projects/*/locations/*/meshes/<mesh_name>` * * The attached Mesh should be of a type SIDECAR * @@ -33252,7 +33252,7 @@ public Builder addAllMeshes(java.lang.Iterable values) { * one of the routing rules to route the requests served by the mesh. * * Each mesh reference should match the pattern: - * `projects/*/locations/global/meshes/<mesh_name>` + * `projects/*/locations/*/meshes/<mesh_name>` * * The attached Mesh should be of a type SIDECAR * @@ -33279,7 +33279,7 @@ public Builder clearMeshes() { * one of the routing rules to route the requests served by the mesh. * * Each mesh reference should match the pattern: - * `projects/*/locations/global/meshes/<mesh_name>` + * `projects/*/locations/*/meshes/<mesh_name>` * * The attached Mesh should be of a type SIDECAR * @@ -33322,7 +33322,7 @@ private void ensureGatewaysIsMutable() { * gateway. * * Each gateway reference should match the pattern: - * `projects/*/locations/global/gateways/<gateway_name>` + * `projects/*/locations/*/gateways/<gateway_name>` * * * @@ -33345,7 +33345,7 @@ public com.google.protobuf.ProtocolStringList getGatewaysList() { * gateway. * * Each gateway reference should match the pattern: - * `projects/*/locations/global/gateways/<gateway_name>` + * `projects/*/locations/*/gateways/<gateway_name>` * * * @@ -33367,7 +33367,7 @@ public int getGatewaysCount() { * gateway. * * Each gateway reference should match the pattern: - * `projects/*/locations/global/gateways/<gateway_name>` + * `projects/*/locations/*/gateways/<gateway_name>` * * * @@ -33390,7 +33390,7 @@ public java.lang.String getGateways(int index) { * gateway. * * Each gateway reference should match the pattern: - * `projects/*/locations/global/gateways/<gateway_name>` + * `projects/*/locations/*/gateways/<gateway_name>` * * * @@ -33413,7 +33413,7 @@ public com.google.protobuf.ByteString getGatewaysBytes(int index) { * gateway. * * Each gateway reference should match the pattern: - * `projects/*/locations/global/gateways/<gateway_name>` + * `projects/*/locations/*/gateways/<gateway_name>` * * * @@ -33444,7 +33444,7 @@ public Builder setGateways(int index, java.lang.String value) { * gateway. * * Each gateway reference should match the pattern: - * `projects/*/locations/global/gateways/<gateway_name>` + * `projects/*/locations/*/gateways/<gateway_name>` * * * @@ -33474,7 +33474,7 @@ public Builder addGateways(java.lang.String value) { * gateway. * * Each gateway reference should match the pattern: - * `projects/*/locations/global/gateways/<gateway_name>` + * `projects/*/locations/*/gateways/<gateway_name>` * * * @@ -33501,7 +33501,7 @@ public Builder addAllGateways(java.lang.Iterable values) { * gateway. * * Each gateway reference should match the pattern: - * `projects/*/locations/global/gateways/<gateway_name>` + * `projects/*/locations/*/gateways/<gateway_name>` * * * @@ -33527,7 +33527,7 @@ public Builder clearGateways() { * gateway. * * Each gateway reference should match the pattern: - * `projects/*/locations/global/gateways/<gateway_name>` + * `projects/*/locations/*/gateways/<gateway_name>` * * * diff --git a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/HttpRouteOrBuilder.java b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/HttpRouteOrBuilder.java index a1a302ab15a2..b8ea17a30587 100644 --- a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/HttpRouteOrBuilder.java +++ b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/HttpRouteOrBuilder.java @@ -31,7 +31,7 @@ public interface HttpRouteOrBuilder * *
                * Identifier. Name of the HttpRoute resource. It matches pattern
            -   * `projects/*/locations/global/httpRoutes/http_route_name>`.
            +   * `projects/*/locations/*/httpRoutes/http_route_name>`.
                * 
            * * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; @@ -45,7 +45,7 @@ public interface HttpRouteOrBuilder * *
                * Identifier. Name of the HttpRoute resource. It matches pattern
            -   * `projects/*/locations/global/httpRoutes/http_route_name>`.
            +   * `projects/*/locations/*/httpRoutes/http_route_name>`.
                * 
            * * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; @@ -342,7 +342,7 @@ public interface HttpRouteOrBuilder * one of the routing rules to route the requests served by the mesh. * * Each mesh reference should match the pattern: - * `projects/*/locations/global/meshes/<mesh_name>` + * `projects/*/locations/*/meshes/<mesh_name>` * * The attached Mesh should be of a type SIDECAR * @@ -363,7 +363,7 @@ public interface HttpRouteOrBuilder * one of the routing rules to route the requests served by the mesh. * * Each mesh reference should match the pattern: - * `projects/*/locations/global/meshes/<mesh_name>` + * `projects/*/locations/*/meshes/<mesh_name>` * * The attached Mesh should be of a type SIDECAR * @@ -384,7 +384,7 @@ public interface HttpRouteOrBuilder * one of the routing rules to route the requests served by the mesh. * * Each mesh reference should match the pattern: - * `projects/*/locations/global/meshes/<mesh_name>` + * `projects/*/locations/*/meshes/<mesh_name>` * * The attached Mesh should be of a type SIDECAR * @@ -406,7 +406,7 @@ public interface HttpRouteOrBuilder * one of the routing rules to route the requests served by the mesh. * * Each mesh reference should match the pattern: - * `projects/*/locations/global/meshes/<mesh_name>` + * `projects/*/locations/*/meshes/<mesh_name>` * * The attached Mesh should be of a type SIDECAR * @@ -429,7 +429,7 @@ public interface HttpRouteOrBuilder * gateway. * * Each gateway reference should match the pattern: - * `projects/*/locations/global/gateways/<gateway_name>` + * `projects/*/locations/*/gateways/<gateway_name>` * * * @@ -449,7 +449,7 @@ public interface HttpRouteOrBuilder * gateway. * * Each gateway reference should match the pattern: - * `projects/*/locations/global/gateways/<gateway_name>` + * `projects/*/locations/*/gateways/<gateway_name>` * * * @@ -469,7 +469,7 @@ public interface HttpRouteOrBuilder * gateway. * * Each gateway reference should match the pattern: - * `projects/*/locations/global/gateways/<gateway_name>` + * `projects/*/locations/*/gateways/<gateway_name>` * * * @@ -490,7 +490,7 @@ public interface HttpRouteOrBuilder * gateway. * * Each gateway reference should match the pattern: - * `projects/*/locations/global/gateways/<gateway_name>` + * `projects/*/locations/*/gateways/<gateway_name>` * * * diff --git a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/HttpRouteProto.java b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/HttpRouteProto.java index e569969565e7..2e4a04fcab27 100644 --- a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/HttpRouteProto.java +++ b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/HttpRouteProto.java @@ -163,8 +163,9 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { java.lang.String[] descriptorData = { "\n" + "0google/cloud/networkservices/v1/http_route.proto\022\037google.cloud.networkservices" - + ".v1\032\037google/api/field_behavior.proto\032\031go" - + "ogle/api/resource.proto\032\036google/protobuf/duration.proto\032" + + ".v1\032\037google/api/field_behavior.proto\032\033go" + + "ogle/api/field_info.proto\032\031google/api/re" + + "source.proto\032\036google/protobuf/duration.proto\032" + " google/protobuf/field_mask.proto\032\037google/protobuf/timestamp.proto\"\217$\n" + "\tHttpRoute\022\021\n" + "\004name\030\001 \001(\tB\003\340A\010\022\026\n" @@ -179,18 +180,18 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\010gateways\030\t \003(\tB.\340A\001\372A(\n" + "&networkservices.googleapis.com/Gateway\022K\n" + "\006labels\030\n" - + " \003(\013" - + "26.google.cloud.networkservices.v1.HttpRoute.LabelsEntryB\003\340A\001\022H\n" - + "\005rules\030\006 \003(\01324.g" - + "oogle.cloud.networkservices.v1.HttpRoute.RouteRuleB\003\340A\002\032\277\002\n" + + " \003(\01326.google.c" + + "loud.networkservices.v1.HttpRoute.LabelsEntryB\003\340A\001\022H\n" + + "\005rules\030\006 \003(\01324.google.cloud" + + ".networkservices.v1.HttpRoute.RouteRuleB\003\340A\002\032\277\002\n" + "\013HeaderMatch\022\025\n" + "\013exact_match\030\002 \001(\tH\000\022\025\n" + "\013regex_match\030\003 \001(\tH\000\022\026\n" + "\014prefix_match\030\004 \001(\tH\000\022\027\n\r" + "present_match\030\005 \001(\010H\000\022\026\n" + "\014suffix_match\030\006 \001(\tH\000\022Z\n" - + "\013range_match\030\007 \001(\0132C.google.cloud.networkservic" - + "es.v1.HttpRoute.HeaderMatch.IntegerRangeH\000\022\016\n" + + "\013range_match\030\007 \001(\013" + + "2C.google.cloud.networkservices.v1.HttpRoute.HeaderMatch.IntegerRangeH\000\022\016\n" + "\006header\030\001 \001(\t\022\024\n" + "\014invert_match\030\010 \001(\010\032*\n" + "\014IntegerRange\022\r\n" @@ -208,25 +209,25 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\014prefix_match\030\002 \001(\tH\000\022\025\n" + "\013regex_match\030\003 \001(\tH\000\022\023\n" + "\013ignore_case\030\004 \001(\010\022G\n" - + "\007headers\030\005 \003(\01326." - + "google.cloud.networkservices.v1.HttpRoute.HeaderMatch\022X\n" - + "\020query_parameters\030\006 \003(\0132" - + ">.google.cloud.networkservices.v1.HttpRoute.QueryParameterMatchB\013\n" + + "\007headers\030\005 \003(\01326.google.clou" + + "d.networkservices.v1.HttpRoute.HeaderMatch\022X\n" + + "\020query_parameters\030\006 \003(\0132>.google.cl" + + "oud.networkservices.v1.HttpRoute.QueryParameterMatchB\013\n" + "\tPathMatch\032\242\002\n" + "\013Destination\022@\n" + "\014service_name\030\001 \001(\tB*\372A\'\n" + "%compute.googleapis.com/BackendService\022\016\n" + "\006weight\030\002 \001(\005\022_\n" - + "\027request_header_modifier\030\003" - + " \001(\01329.google.cloud.networkservices.v1.HttpRoute.HeaderModifierB\003\340A\001\022`\n" - + "\030response_header_modifier\030\004 \001(\01329.google.cloud" - + ".networkservices.v1.HttpRoute.HeaderModifierB\003\340A\001\032\206\003\n" + + "\027request_header_modifier\030\003 \001(\01329.g" + + "oogle.cloud.networkservices.v1.HttpRoute.HeaderModifierB\003\340A\001\022`\n" + + "\030response_header_modifier\030\004 \001(\01329.google.cloud.networkser" + + "vices.v1.HttpRoute.HeaderModifierB\003\340A\001\032\206\003\n" + "\010Redirect\022\025\n\r" + "host_redirect\030\001 \001(\t\022\025\n\r" + "path_redirect\030\002 \001(\t\022\026\n" + "\016prefix_rewrite\030\003 \001(\t\022W\n\r" - + "response_code\030\004 \001(\0162@.go" - + "ogle.cloud.networkservices.v1.HttpRoute.Redirect.ResponseCode\022\026\n" + + "response_code\030\004 \001(\0162@.google.cloud." + + "networkservices.v1.HttpRoute.Redirect.ResponseCode\022\026\n" + "\016https_redirect\030\005 \001(\010\022\023\n" + "\013strip_query\030\006 \001(\010\022\025\n\r" + "port_redirect\030\007 \001(\005\"\226\001\n" @@ -238,10 +239,10 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\022TEMPORARY_REDIRECT\020\004\022\026\n" + "\022PERMANENT_REDIRECT\020\005\032\301\002\n" + "\024FaultInjectionPolicy\022T\n" - + "\005delay\030\001 \001" - + "(\0132E.google.cloud.networkservices.v1.HttpRoute.FaultInjectionPolicy.Delay\022T\n" - + "\005abort\030\002 \001(\0132E.google.cloud.networkservices." - + "v1.HttpRoute.FaultInjectionPolicy.Abort\032K\n" + + "\005delay\030\001 \001(\0132E.google" + + ".cloud.networkservices.v1.HttpRoute.FaultInjectionPolicy.Delay\022T\n" + + "\005abort\030\002 \001(\0132E." + + "google.cloud.networkservices.v1.HttpRoute.FaultInjectionPolicy.Abort\032K\n" + "\005Delay\022.\n" + "\013fixed_delay\030\001 \001(\0132\031.google.protobuf.Duration\022\022\n\n" + "percentage\030\002 \001(\005\0320\n" @@ -251,10 +252,10 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\035StatefulSessionAffinityPolicy\0222\n\n" + "cookie_ttl\030\001 \001(\0132\031.google.protobuf.DurationB\003\340A\002\032\232\002\n" + "\016HeaderModifier\022O\n" - + "\003set\030\001 " - + "\003(\0132B.google.cloud.networkservices.v1.HttpRoute.HeaderModifier.SetEntry\022O\n" - + "\003add\030\002" - + " \003(\0132B.google.cloud.networkservices.v1.HttpRoute.HeaderModifier.AddEntry\022\016\n" + + "\003set\030\001 \003(\0132B.googl" + + "e.cloud.networkservices.v1.HttpRoute.HeaderModifier.SetEntry\022O\n" + + "\003add\030\002 \003(\0132B.goog" + + "le.cloud.networkservices.v1.HttpRoute.HeaderModifier.AddEntry\022\016\n" + "\006remove\030\003 \003(\t\032*\n" + "\010SetEntry\022\013\n" + "\003key\030\001 \001(\t\022\r\n" @@ -270,8 +271,8 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\013num_retries\030\002 \001(\005\0222\n" + "\017per_try_timeout\030\003 \001(\0132\031.google.protobuf.Duration\032\177\n" + "\023RequestMirrorPolicy\022K\n" - + "\013destination\030\001 \001(\0132" - + "6.google.cloud.networkservices.v1.HttpRoute.Destination\022\033\n" + + "\013destination\030\001 \001(\01326.google.cl" + + "oud.networkservices.v1.HttpRoute.Destination\022\033\n" + "\016mirror_percent\030\002 \001(\002B\003\340A\001\032\305\001\n\n" + "CorsPolicy\022\025\n\r" + "allow_origins\030\001 \003(\t\022\034\n" @@ -288,48 +289,49 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\006status\030\001 \001(\005B\003\340A\002B\n\n" + "\010HttpBody\032\262\010\n" + "\013RouteAction\022L\n" - + "\014destinations\030\001 \003(\01326.googl" - + "e.cloud.networkservices.v1.HttpRoute.Destination\022E\n" - + "\010redirect\030\002 \001(\01323.google.clou" - + "d.networkservices.v1.HttpRoute.Redirect\022_\n" - + "\026fault_injection_policy\030\004 \001(\0132?.google" - + ".cloud.networkservices.v1.HttpRoute.FaultInjectionPolicy\022Z\n" - + "\027request_header_modifier\030\005" - + " \001(\01329.google.cloud.networkservices.v1.HttpRoute.HeaderModifier\022[\n" - + "\030response_header_modifier\030\006 \001(\01329.google.cloud.ne" - + "tworkservices.v1.HttpRoute.HeaderModifier\022J\n" + + "\014destinations\030\001" + + " \003(\01326.google.cloud.networkservices.v1.HttpRoute.Destination\022E\n" + + "\010redirect\030\002" + + " \001(\01323.google.cloud.networkservices.v1.HttpRoute.Redirect\022_\n" + + "\026fault_injection_policy\030\004 \001(\0132?.google.cloud.netw" + + "orkservices.v1.HttpRoute.FaultInjectionPolicy\022Z\n" + + "\027request_header_modifier\030\005 \001(\01329" + + ".google.cloud.networkservices.v1.HttpRoute.HeaderModifier\022[\n" + + "\030response_header_modifier\030\006" + + " \001(\01329.google.cloud.networkservices.v1.HttpRoute.HeaderModifier\022J\n" + "\013url_rewrite\030\007" + " \001(\01325.google.cloud.networkservices.v1.HttpRoute.URLRewrite\022*\n" + "\007timeout\030\010 \001(\0132\031.google.protobuf.Duration\022L\n" - + "\014retry_policy\030\t \001(\01326.google.cloud.n" - + "etworkservices.v1.HttpRoute.RetryPolicy\022]\n" + + "\014retry_policy\030\t" + + " \001(\01326.google.cloud.networkservices.v1.HttpRoute.RetryPolicy\022]\n" + "\025request_mirror_policy\030\n" + " \001(\0132>.google.cloud.networkservices.v1.HttpRoute.RequestMirrorPolicy\022J\n" - + "\013cors_policy\030\013 \001(\01325.go" - + "ogle.cloud.networkservices.v1.HttpRoute.CorsPolicy\022p\n" - + "\031stateful_session_affinity\030\014 \001(\0132H.google.cloud.networkservices.v1." - + "HttpRoute.StatefulSessionAffinityPolicyB\003\340A\001\022[\n" + + "\013cors_policy\030\013 \001(\01325.google.cloud." + + "networkservices.v1.HttpRoute.CorsPolicy\022p\n" + + "\031stateful_session_affinity\030\014 \001(\0132H.goo" + + "gle.cloud.networkservices.v1.HttpRoute.StatefulSessionAffinityPolicyB\003\340A\001\022[\n" + "\017direct_response\030\r" - + " \001(\0132=.google.c" - + "loud.networkservices.v1.HttpRoute.HttpDirectResponseB\003\340A\001\0224\n" + + " \001(\0132=.google.cloud.networ" + + "kservices.v1.HttpRoute.HttpDirectResponseB\003\340A\001\0224\n" + "\014idle_timeout\030\016" + " \001(\0132\031.google.protobuf.DurationB\003\340A\001\032\233\001\n" + "\tRouteRule\022F\n" + "\007matches\030\001" + " \003(\01325.google.cloud.networkservices.v1.HttpRoute.RouteMatch\022F\n" - + "\006action\030\002" - + " \001(\01326.google.cloud.networkservices.v1.HttpRoute.RouteAction\032-\n" + + "\006action\030\002 \001" + + "(\01326.google.cloud.networkservices.v1.HttpRoute.RouteAction\032-\n" + "\013LabelsEntry\022\013\n" + "\003key\030\001 \001(\t\022\r\n" + "\005value\030\002 \001(\t:\0028\001:n\352Ak\n" - + "(networkservices.googleapis.com/HttpRo" - + "ute\022?projects/{project}/locations/{location}/httpRoutes/{http_route}\"\245\001\n" + + "(networkservices.googleapis.com/HttpRoute\022?projec" + + "ts/{project}/locations/{location}/httpRoutes/{http_route}\"\272\001\n" + "\025ListHttpRoutesRequest\022@\n" - + "\006parent\030\001 \001(\tB0\340A\002\372A*\022(" - + "networkservices.googleapis.com/HttpRoute\022\021\n" + + "\006parent\030\001 \001(" + + "\tB0\340A\002\372A*\022(networkservices.googleapis.com/HttpRoute\022\021\n" + "\tpage_size\030\002 \001(\005\022\022\n\n" + "page_token\030\003 \001(\t\022#\n" - + "\026return_partial_success\030\004 \001(\010B\003\340A\001\"\207\001\n" + + "\026return_partial_success\030\004 \001(\010B\003\340A\001\022\023\n" + + "\006filter\030\005 \001(\tB\003\340A\001\"\207\001\n" + "\026ListHttpRoutesResponse\022?\n" + "\013http_routes\030\001" + " \003(\0132*.google.cloud.networkservices.v1.HttpRoute\022\027\n" @@ -337,32 +339,34 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\013unreachable\030\003 \003(\t\"U\n" + "\023GetHttpRouteRequest\022>\n" + "\004name\030\001 \001(\tB0\340A\002\372A*\n" - + "(networkservices.googleapis.com/HttpRoute\"\273\001\n" + + "(networkservices.googleapis.com/HttpRoute\"\334\001\n" + "\026CreateHttpRouteRequest\022@\n" - + "\006parent\030\001 \001(" - + "\tB0\340A\002\372A*\022(networkservices.googleapis.com/HttpRoute\022\032\n\r" + + "\006parent\030\001 \001(\tB0\340A\002\372" + + "A*\022(networkservices.googleapis.com/HttpRoute\022\032\n\r" + "http_route_id\030\002 \001(\tB\003\340A\002\022C\n\n" - + "http_route\030\003 \001" - + "(\0132*.google.cloud.networkservices.v1.HttpRouteB\003\340A\002\"\223\001\n" + + "http_route\030\003" + + " \001(\0132*.google.cloud.networkservices.v1.HttpRouteB\003\340A\002\022\037\n\n" + + "request_id\030\004 \001(\tB\013\340A\001\342\214\317\327\010\002\010\001\"\223\001\n" + "\026UpdateHttpRouteRequest\0224\n" + "\013update_mask\030\001" + " \001(\0132\032.google.protobuf.FieldMaskB\003\340A\001\022C\n\n" - + "http_route\030\002 \001(\0132*.googl" - + "e.cloud.networkservices.v1.HttpRouteB\003\340A\002\"X\n" + + "http_route\030\002 \001(\0132*.go" + + "ogle.cloud.networkservices.v1.HttpRouteB\003\340A\002\"X\n" + "\026DeleteHttpRouteRequest\022>\n" + "\004name\030\001 \001(\tB0\340A\002\372A*\n" + "(networkservices.googleapis.com/HttpRouteB\357\001\n" - + "#com.google.cloud.networkservices.v1B\016HttpRouteProtoP\001ZMcloud.goo" - + "gle.com/go/networkservices/apiv1/network" - + "servicespb;networkservicespb\252\002\037Google.Cl" - + "oud.NetworkServices.V1\312\002\037Google\\Cloud\\Ne" - + "tworkServices\\V1\352\002\"Google::Cloud::NetworkServices::V1b\006proto3" + + "#com.google.cloud.networkservices.v1B\016HttpRouteProtoP\001ZMcloud." + + "google.com/go/networkservices/apiv1/netw" + + "orkservicespb;networkservicespb\252\002\037Google" + + ".Cloud.NetworkServices.V1\312\002\037Google\\Cloud" + + "\\NetworkServices\\V1\352\002\"Google::Cloud::NetworkServices::V1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] { com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.FieldInfoProto.getDescriptor(), com.google.api.ResourceProto.getDescriptor(), com.google.protobuf.DurationProto.getDescriptor(), com.google.protobuf.FieldMaskProto.getDescriptor(), @@ -603,7 +607,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_cloud_networkservices_v1_ListHttpRoutesRequest_descriptor, new java.lang.String[] { - "Parent", "PageSize", "PageToken", "ReturnPartialSuccess", + "Parent", "PageSize", "PageToken", "ReturnPartialSuccess", "Filter", }); internal_static_google_cloud_networkservices_v1_ListHttpRoutesResponse_descriptor = getDescriptor().getMessageType(2); @@ -627,7 +631,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_cloud_networkservices_v1_CreateHttpRouteRequest_descriptor, new java.lang.String[] { - "Parent", "HttpRouteId", "HttpRoute", + "Parent", "HttpRouteId", "HttpRoute", "RequestId", }); internal_static_google_cloud_networkservices_v1_UpdateHttpRouteRequest_descriptor = getDescriptor().getMessageType(5); @@ -647,6 +651,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { }); descriptor.resolveAllFeaturesImmutable(); com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.FieldInfoProto.getDescriptor(); com.google.api.ResourceProto.getDescriptor(); com.google.protobuf.DurationProto.getDescriptor(); com.google.protobuf.FieldMaskProto.getDescriptor(); @@ -654,6 +659,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.protobuf.ExtensionRegistry registry = com.google.protobuf.ExtensionRegistry.newInstance(); registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.FieldInfoProto.fieldInfo); registry.add(com.google.api.ResourceProto.resource); registry.add(com.google.api.ResourceProto.resourceReference); com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( diff --git a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/ListAgentGatewaysRequest.java b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/ListAgentGatewaysRequest.java new file mode 100644 index 000000000000..d92ac404dd79 --- /dev/null +++ b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/ListAgentGatewaysRequest.java @@ -0,0 +1,1027 @@ +/* + * 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/cloud/networkservices/v1/agent_gateway.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkservices.v1; + +/** + * + * + *
            + * Request used with the ListAgentGateways method.
            + * 
            + * + * Protobuf type {@code google.cloud.networkservices.v1.ListAgentGatewaysRequest} + */ +@com.google.protobuf.Generated +public final class ListAgentGatewaysRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkservices.v1.ListAgentGatewaysRequest) + ListAgentGatewaysRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ListAgentGatewaysRequest"); + } + + // Use ListAgentGatewaysRequest.newBuilder() to construct. + private ListAgentGatewaysRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ListAgentGatewaysRequest() { + parent_ = ""; + pageToken_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkservices.v1.AgentGatewayProto + .internal_static_google_cloud_networkservices_v1_ListAgentGatewaysRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkservices.v1.AgentGatewayProto + .internal_static_google_cloud_networkservices_v1_ListAgentGatewaysRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkservices.v1.ListAgentGatewaysRequest.class, + com.google.cloud.networkservices.v1.ListAgentGatewaysRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + + /** + * + * + *
            +   * Required. The project and location from which the AgentGateways should be
            +   * listed, specified in the format `projects/*/locations/*`.
            +   * 
            + * + * + * 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 project and location from which the AgentGateways should be
            +   * listed, specified in the format `projects/*/locations/*`.
            +   * 
            + * + * + * 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 PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_ = 0; + + /** + * + * + *
            +   * Optional. Maximum number of AgentGateways to return per call.
            +   * 
            + * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object pageToken_ = ""; + + /** + * + * + *
            +   * Optional. The value returned by the last `ListAgentGatewaysResponse`
            +   * Indicates that this is a continuation of a prior `ListAgentGateways`
            +   * call, and that the system should return the next page of data.
            +   * 
            + * + * string page_token = 3 [(.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. The value returned by the last `ListAgentGatewaysResponse`
            +   * Indicates that this is a continuation of a prior `ListAgentGateways`
            +   * call, and that the system should return the next page of data.
            +   * 
            + * + * string page_token = 3 [(.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 RETURN_PARTIAL_SUCCESS_FIELD_NUMBER = 4; + private boolean returnPartialSuccess_ = false; + + /** + * + * + *
            +   * Optional. If true, allow partial responses for multi-regional Aggregated
            +   * List requests. Otherwise if one of the locations is down or unreachable,
            +   * the Aggregated List request will fail.
            +   * 
            + * + * bool return_partial_success = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The returnPartialSuccess. + */ + @java.lang.Override + public boolean getReturnPartialSuccess() { + return returnPartialSuccess_; + } + + 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 (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, pageToken_); + } + if (returnPartialSuccess_ != false) { + output.writeBool(4, returnPartialSuccess_); + } + 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 (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, pageToken_); + } + if (returnPartialSuccess_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(4, returnPartialSuccess_); + } + 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.networkservices.v1.ListAgentGatewaysRequest)) { + return super.equals(obj); + } + com.google.cloud.networkservices.v1.ListAgentGatewaysRequest other = + (com.google.cloud.networkservices.v1.ListAgentGatewaysRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (getReturnPartialSuccess() != other.getReturnPartialSuccess()) 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) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (37 * hash) + RETURN_PARTIAL_SUCCESS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getReturnPartialSuccess()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.networkservices.v1.ListAgentGatewaysRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkservices.v1.ListAgentGatewaysRequest 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.networkservices.v1.ListAgentGatewaysRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkservices.v1.ListAgentGatewaysRequest 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.networkservices.v1.ListAgentGatewaysRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkservices.v1.ListAgentGatewaysRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkservices.v1.ListAgentGatewaysRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkservices.v1.ListAgentGatewaysRequest 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.networkservices.v1.ListAgentGatewaysRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkservices.v1.ListAgentGatewaysRequest 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.networkservices.v1.ListAgentGatewaysRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkservices.v1.ListAgentGatewaysRequest 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.networkservices.v1.ListAgentGatewaysRequest 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 used with the ListAgentGateways method.
            +   * 
            + * + * Protobuf type {@code google.cloud.networkservices.v1.ListAgentGatewaysRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkservices.v1.ListAgentGatewaysRequest) + com.google.cloud.networkservices.v1.ListAgentGatewaysRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkservices.v1.AgentGatewayProto + .internal_static_google_cloud_networkservices_v1_ListAgentGatewaysRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkservices.v1.AgentGatewayProto + .internal_static_google_cloud_networkservices_v1_ListAgentGatewaysRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkservices.v1.ListAgentGatewaysRequest.class, + com.google.cloud.networkservices.v1.ListAgentGatewaysRequest.Builder.class); + } + + // Construct using com.google.cloud.networkservices.v1.ListAgentGatewaysRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + pageSize_ = 0; + pageToken_ = ""; + returnPartialSuccess_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkservices.v1.AgentGatewayProto + .internal_static_google_cloud_networkservices_v1_ListAgentGatewaysRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkservices.v1.ListAgentGatewaysRequest + getDefaultInstanceForType() { + return com.google.cloud.networkservices.v1.ListAgentGatewaysRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkservices.v1.ListAgentGatewaysRequest build() { + com.google.cloud.networkservices.v1.ListAgentGatewaysRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkservices.v1.ListAgentGatewaysRequest buildPartial() { + com.google.cloud.networkservices.v1.ListAgentGatewaysRequest result = + new com.google.cloud.networkservices.v1.ListAgentGatewaysRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.networkservices.v1.ListAgentGatewaysRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.pageSize_ = pageSize_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.pageToken_ = pageToken_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.returnPartialSuccess_ = returnPartialSuccess_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.networkservices.v1.ListAgentGatewaysRequest) { + return mergeFrom((com.google.cloud.networkservices.v1.ListAgentGatewaysRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.networkservices.v1.ListAgentGatewaysRequest other) { + if (other + == com.google.cloud.networkservices.v1.ListAgentGatewaysRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (other.getReturnPartialSuccess() != false) { + setReturnPartialSuccess(other.getReturnPartialSuccess()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + pageSize_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 32: + { + returnPartialSuccess_ = input.readBool(); + bitField0_ |= 0x00000008; + break; + } // case 32 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + + /** + * + * + *
            +     * Required. The project and location from which the AgentGateways should be
            +     * listed, specified in the format `projects/*/locations/*`.
            +     * 
            + * + * + * 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 project and location from which the AgentGateways should be
            +     * listed, specified in the format `projects/*/locations/*`.
            +     * 
            + * + * + * 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 project and location from which the AgentGateways should be
            +     * listed, specified in the format `projects/*/locations/*`.
            +     * 
            + * + * + * 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 project and location from which the AgentGateways should be
            +     * listed, specified in the format `projects/*/locations/*`.
            +     * 
            + * + * + * 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 project and location from which the AgentGateways should be
            +     * listed, specified in the format `projects/*/locations/*`.
            +     * 
            + * + * + * 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 int pageSize_; + + /** + * + * + *
            +     * Optional. Maximum number of AgentGateways to return per call.
            +     * 
            + * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + /** + * + * + *
            +     * Optional. Maximum number of AgentGateways to return per call.
            +     * 
            + * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Optional. Maximum number of AgentGateways to return per call.
            +     * 
            + * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + bitField0_ = (bitField0_ & ~0x00000002); + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + + /** + * + * + *
            +     * Optional. The value returned by the last `ListAgentGatewaysResponse`
            +     * Indicates that this is a continuation of a prior `ListAgentGateways`
            +     * call, and that the system should return the next page of data.
            +     * 
            + * + * string page_token = 3 [(.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. The value returned by the last `ListAgentGatewaysResponse`
            +     * Indicates that this is a continuation of a prior `ListAgentGateways`
            +     * call, and that the system should return the next page of data.
            +     * 
            + * + * string page_token = 3 [(.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. The value returned by the last `ListAgentGatewaysResponse`
            +     * Indicates that this is a continuation of a prior `ListAgentGateways`
            +     * call, and that the system should return the next page of data.
            +     * 
            + * + * string page_token = 3 [(.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_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Optional. The value returned by the last `ListAgentGatewaysResponse`
            +     * Indicates that this is a continuation of a prior `ListAgentGateways`
            +     * call, and that the system should return the next page of data.
            +     * 
            + * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + pageToken_ = getDefaultInstance().getPageToken(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
            +     * Optional. The value returned by the last `ListAgentGatewaysResponse`
            +     * Indicates that this is a continuation of a prior `ListAgentGateways`
            +     * call, and that the system should return the next page of data.
            +     * 
            + * + * string page_token = 3 [(.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_ |= 0x00000004; + onChanged(); + return this; + } + + private boolean returnPartialSuccess_; + + /** + * + * + *
            +     * Optional. If true, allow partial responses for multi-regional Aggregated
            +     * List requests. Otherwise if one of the locations is down or unreachable,
            +     * the Aggregated List request will fail.
            +     * 
            + * + * bool return_partial_success = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The returnPartialSuccess. + */ + @java.lang.Override + public boolean getReturnPartialSuccess() { + return returnPartialSuccess_; + } + + /** + * + * + *
            +     * Optional. If true, allow partial responses for multi-regional Aggregated
            +     * List requests. Otherwise if one of the locations is down or unreachable,
            +     * the Aggregated List request will fail.
            +     * 
            + * + * bool return_partial_success = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The returnPartialSuccess to set. + * @return This builder for chaining. + */ + public Builder setReturnPartialSuccess(boolean value) { + + returnPartialSuccess_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Optional. If true, allow partial responses for multi-regional Aggregated
            +     * List requests. Otherwise if one of the locations is down or unreachable,
            +     * the Aggregated List request will fail.
            +     * 
            + * + * bool return_partial_success = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearReturnPartialSuccess() { + bitField0_ = (bitField0_ & ~0x00000008); + returnPartialSuccess_ = false; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.networkservices.v1.ListAgentGatewaysRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkservices.v1.ListAgentGatewaysRequest) + private static final com.google.cloud.networkservices.v1.ListAgentGatewaysRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.networkservices.v1.ListAgentGatewaysRequest(); + } + + public static com.google.cloud.networkservices.v1.ListAgentGatewaysRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListAgentGatewaysRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.networkservices.v1.ListAgentGatewaysRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/ListAgentGatewaysRequestOrBuilder.java b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/ListAgentGatewaysRequestOrBuilder.java new file mode 100644 index 000000000000..7fe4843333a8 --- /dev/null +++ b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/ListAgentGatewaysRequestOrBuilder.java @@ -0,0 +1,118 @@ +/* + * 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/cloud/networkservices/v1/agent_gateway.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkservices.v1; + +@com.google.protobuf.Generated +public interface ListAgentGatewaysRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkservices.v1.ListAgentGatewaysRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
            +   * Required. The project and location from which the AgentGateways should be
            +   * listed, specified in the format `projects/*/locations/*`.
            +   * 
            + * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + + /** + * + * + *
            +   * Required. The project and location from which the AgentGateways should be
            +   * listed, specified in the format `projects/*/locations/*`.
            +   * 
            + * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
            +   * Optional. Maximum number of AgentGateways to return per call.
            +   * 
            + * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
            +   * Optional. The value returned by the last `ListAgentGatewaysResponse`
            +   * Indicates that this is a continuation of a prior `ListAgentGateways`
            +   * call, and that the system should return the next page of data.
            +   * 
            + * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + + /** + * + * + *
            +   * Optional. The value returned by the last `ListAgentGatewaysResponse`
            +   * Indicates that this is a continuation of a prior `ListAgentGateways`
            +   * call, and that the system should return the next page of data.
            +   * 
            + * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
            +   * Optional. If true, allow partial responses for multi-regional Aggregated
            +   * List requests. Otherwise if one of the locations is down or unreachable,
            +   * the Aggregated List request will fail.
            +   * 
            + * + * bool return_partial_success = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The returnPartialSuccess. + */ + boolean getReturnPartialSuccess(); +} diff --git a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/ListAgentGatewaysResponse.java b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/ListAgentGatewaysResponse.java new file mode 100644 index 000000000000..e24def5d77fd --- /dev/null +++ b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/ListAgentGatewaysResponse.java @@ -0,0 +1,1459 @@ +/* + * 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/cloud/networkservices/v1/agent_gateway.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkservices.v1; + +/** + * + * + *
            + * Response returned by the ListAgentGateways method.
            + * 
            + * + * Protobuf type {@code google.cloud.networkservices.v1.ListAgentGatewaysResponse} + */ +@com.google.protobuf.Generated +public final class ListAgentGatewaysResponse extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkservices.v1.ListAgentGatewaysResponse) + ListAgentGatewaysResponseOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ListAgentGatewaysResponse"); + } + + // Use ListAgentGatewaysResponse.newBuilder() to construct. + private ListAgentGatewaysResponse(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ListAgentGatewaysResponse() { + agentGateways_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + unreachable_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkservices.v1.AgentGatewayProto + .internal_static_google_cloud_networkservices_v1_ListAgentGatewaysResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkservices.v1.AgentGatewayProto + .internal_static_google_cloud_networkservices_v1_ListAgentGatewaysResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkservices.v1.ListAgentGatewaysResponse.class, + com.google.cloud.networkservices.v1.ListAgentGatewaysResponse.Builder.class); + } + + public static final int AGENT_GATEWAYS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List agentGateways_; + + /** + * + * + *
            +   * List of AgentGateway resources.
            +   * 
            + * + * repeated .google.cloud.networkservices.v1.AgentGateway agent_gateways = 1; + */ + @java.lang.Override + public java.util.List getAgentGatewaysList() { + return agentGateways_; + } + + /** + * + * + *
            +   * List of AgentGateway resources.
            +   * 
            + * + * repeated .google.cloud.networkservices.v1.AgentGateway agent_gateways = 1; + */ + @java.lang.Override + public java.util.List + getAgentGatewaysOrBuilderList() { + return agentGateways_; + } + + /** + * + * + *
            +   * List of AgentGateway resources.
            +   * 
            + * + * repeated .google.cloud.networkservices.v1.AgentGateway agent_gateways = 1; + */ + @java.lang.Override + public int getAgentGatewaysCount() { + return agentGateways_.size(); + } + + /** + * + * + *
            +   * List of AgentGateway resources.
            +   * 
            + * + * repeated .google.cloud.networkservices.v1.AgentGateway agent_gateways = 1; + */ + @java.lang.Override + public com.google.cloud.networkservices.v1.AgentGateway getAgentGateways(int index) { + return agentGateways_.get(index); + } + + /** + * + * + *
            +   * List of AgentGateway resources.
            +   * 
            + * + * repeated .google.cloud.networkservices.v1.AgentGateway agent_gateways = 1; + */ + @java.lang.Override + public com.google.cloud.networkservices.v1.AgentGatewayOrBuilder getAgentGatewaysOrBuilder( + int index) { + return agentGateways_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object nextPageToken_ = ""; + + /** + * + * + *
            +   * If there might be more results than those appearing in this response, then
            +   * `next_page_token` is included. To get the next set of results, call this
            +   * method again using the value of `next_page_token` as `page_token`.
            +   * 
            + * + * 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; + } + } + + /** + * + * + *
            +   * If there might be more results than those appearing in this response, then
            +   * `next_page_token` is included. To get the next set of results, call this
            +   * method again using the value of `next_page_token` as `page_token`.
            +   * 
            + * + * 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; + } + } + + public static final int UNREACHABLE_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList unreachable_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + /** + * + * + *
            +   * Unreachable resources. Populated when the request attempts to list all
            +   * resources across all supported locations, while some locations are
            +   * temporarily unavailable.
            +   * 
            + * + * repeated string unreachable = 3; + * + * @return A list containing the unreachable. + */ + public com.google.protobuf.ProtocolStringList getUnreachableList() { + return unreachable_; + } + + /** + * + * + *
            +   * Unreachable resources. Populated when the request attempts to list all
            +   * resources across all supported locations, while some locations are
            +   * temporarily unavailable.
            +   * 
            + * + * repeated string unreachable = 3; + * + * @return The count of unreachable. + */ + public int getUnreachableCount() { + return unreachable_.size(); + } + + /** + * + * + *
            +   * Unreachable resources. Populated when the request attempts to list all
            +   * resources across all supported locations, while some locations are
            +   * temporarily unavailable.
            +   * 
            + * + * repeated string unreachable = 3; + * + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + public java.lang.String getUnreachable(int index) { + return unreachable_.get(index); + } + + /** + * + * + *
            +   * Unreachable resources. Populated when the request attempts to list all
            +   * resources across all supported locations, while some locations are
            +   * temporarily unavailable.
            +   * 
            + * + * repeated string unreachable = 3; + * + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + public com.google.protobuf.ByteString getUnreachableBytes(int index) { + return unreachable_.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 { + for (int i = 0; i < agentGateways_.size(); i++) { + output.writeMessage(1, agentGateways_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, nextPageToken_); + } + for (int i = 0; i < unreachable_.size(); i++) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, unreachable_.getRaw(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < agentGateways_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, agentGateways_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, nextPageToken_); + } + { + int dataSize = 0; + for (int i = 0; i < unreachable_.size(); i++) { + dataSize += computeStringSizeNoTag(unreachable_.getRaw(i)); + } + size += dataSize; + size += 1 * getUnreachableList().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.networkservices.v1.ListAgentGatewaysResponse)) { + return super.equals(obj); + } + com.google.cloud.networkservices.v1.ListAgentGatewaysResponse other = + (com.google.cloud.networkservices.v1.ListAgentGatewaysResponse) obj; + + if (!getAgentGatewaysList().equals(other.getAgentGatewaysList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!getUnreachableList().equals(other.getUnreachableList())) 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 (getAgentGatewaysCount() > 0) { + hash = (37 * hash) + AGENT_GATEWAYS_FIELD_NUMBER; + hash = (53 * hash) + getAgentGatewaysList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + if (getUnreachableCount() > 0) { + hash = (37 * hash) + UNREACHABLE_FIELD_NUMBER; + hash = (53 * hash) + getUnreachableList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.networkservices.v1.ListAgentGatewaysResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkservices.v1.ListAgentGatewaysResponse 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.networkservices.v1.ListAgentGatewaysResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkservices.v1.ListAgentGatewaysResponse 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.networkservices.v1.ListAgentGatewaysResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkservices.v1.ListAgentGatewaysResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkservices.v1.ListAgentGatewaysResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkservices.v1.ListAgentGatewaysResponse 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.networkservices.v1.ListAgentGatewaysResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkservices.v1.ListAgentGatewaysResponse 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.networkservices.v1.ListAgentGatewaysResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkservices.v1.ListAgentGatewaysResponse 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.networkservices.v1.ListAgentGatewaysResponse 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 returned by the ListAgentGateways method.
            +   * 
            + * + * Protobuf type {@code google.cloud.networkservices.v1.ListAgentGatewaysResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkservices.v1.ListAgentGatewaysResponse) + com.google.cloud.networkservices.v1.ListAgentGatewaysResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkservices.v1.AgentGatewayProto + .internal_static_google_cloud_networkservices_v1_ListAgentGatewaysResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkservices.v1.AgentGatewayProto + .internal_static_google_cloud_networkservices_v1_ListAgentGatewaysResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkservices.v1.ListAgentGatewaysResponse.class, + com.google.cloud.networkservices.v1.ListAgentGatewaysResponse.Builder.class); + } + + // Construct using com.google.cloud.networkservices.v1.ListAgentGatewaysResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (agentGatewaysBuilder_ == null) { + agentGateways_ = java.util.Collections.emptyList(); + } else { + agentGateways_ = null; + agentGatewaysBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + nextPageToken_ = ""; + unreachable_ = com.google.protobuf.LazyStringArrayList.emptyList(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkservices.v1.AgentGatewayProto + .internal_static_google_cloud_networkservices_v1_ListAgentGatewaysResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkservices.v1.ListAgentGatewaysResponse + getDefaultInstanceForType() { + return com.google.cloud.networkservices.v1.ListAgentGatewaysResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkservices.v1.ListAgentGatewaysResponse build() { + com.google.cloud.networkservices.v1.ListAgentGatewaysResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkservices.v1.ListAgentGatewaysResponse buildPartial() { + com.google.cloud.networkservices.v1.ListAgentGatewaysResponse result = + new com.google.cloud.networkservices.v1.ListAgentGatewaysResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.networkservices.v1.ListAgentGatewaysResponse result) { + if (agentGatewaysBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + agentGateways_ = java.util.Collections.unmodifiableList(agentGateways_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.agentGateways_ = agentGateways_; + } else { + result.agentGateways_ = agentGatewaysBuilder_.build(); + } + } + + private void buildPartial0( + com.google.cloud.networkservices.v1.ListAgentGatewaysResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.nextPageToken_ = nextPageToken_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + unreachable_.makeImmutable(); + result.unreachable_ = unreachable_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.networkservices.v1.ListAgentGatewaysResponse) { + return mergeFrom((com.google.cloud.networkservices.v1.ListAgentGatewaysResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.networkservices.v1.ListAgentGatewaysResponse other) { + if (other + == com.google.cloud.networkservices.v1.ListAgentGatewaysResponse.getDefaultInstance()) + return this; + if (agentGatewaysBuilder_ == null) { + if (!other.agentGateways_.isEmpty()) { + if (agentGateways_.isEmpty()) { + agentGateways_ = other.agentGateways_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureAgentGatewaysIsMutable(); + agentGateways_.addAll(other.agentGateways_); + } + onChanged(); + } + } else { + if (!other.agentGateways_.isEmpty()) { + if (agentGatewaysBuilder_.isEmpty()) { + agentGatewaysBuilder_.dispose(); + agentGatewaysBuilder_ = null; + agentGateways_ = other.agentGateways_; + bitField0_ = (bitField0_ & ~0x00000001); + agentGatewaysBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetAgentGatewaysFieldBuilder() + : null; + } else { + agentGatewaysBuilder_.addAllMessages(other.agentGateways_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.unreachable_.isEmpty()) { + if (unreachable_.isEmpty()) { + unreachable_ = other.unreachable_; + bitField0_ |= 0x00000004; + } else { + ensureUnreachableIsMutable(); + unreachable_.addAll(other.unreachable_); + } + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.networkservices.v1.AgentGateway m = + input.readMessage( + com.google.cloud.networkservices.v1.AgentGateway.parser(), + extensionRegistry); + if (agentGatewaysBuilder_ == null) { + ensureAgentGatewaysIsMutable(); + agentGateways_.add(m); + } else { + agentGatewaysBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureUnreachableIsMutable(); + unreachable_.add(s); + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List agentGateways_ = + java.util.Collections.emptyList(); + + private void ensureAgentGatewaysIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + agentGateways_ = + new java.util.ArrayList( + agentGateways_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.networkservices.v1.AgentGateway, + com.google.cloud.networkservices.v1.AgentGateway.Builder, + com.google.cloud.networkservices.v1.AgentGatewayOrBuilder> + agentGatewaysBuilder_; + + /** + * + * + *
            +     * List of AgentGateway resources.
            +     * 
            + * + * repeated .google.cloud.networkservices.v1.AgentGateway agent_gateways = 1; + */ + public java.util.List getAgentGatewaysList() { + if (agentGatewaysBuilder_ == null) { + return java.util.Collections.unmodifiableList(agentGateways_); + } else { + return agentGatewaysBuilder_.getMessageList(); + } + } + + /** + * + * + *
            +     * List of AgentGateway resources.
            +     * 
            + * + * repeated .google.cloud.networkservices.v1.AgentGateway agent_gateways = 1; + */ + public int getAgentGatewaysCount() { + if (agentGatewaysBuilder_ == null) { + return agentGateways_.size(); + } else { + return agentGatewaysBuilder_.getCount(); + } + } + + /** + * + * + *
            +     * List of AgentGateway resources.
            +     * 
            + * + * repeated .google.cloud.networkservices.v1.AgentGateway agent_gateways = 1; + */ + public com.google.cloud.networkservices.v1.AgentGateway getAgentGateways(int index) { + if (agentGatewaysBuilder_ == null) { + return agentGateways_.get(index); + } else { + return agentGatewaysBuilder_.getMessage(index); + } + } + + /** + * + * + *
            +     * List of AgentGateway resources.
            +     * 
            + * + * repeated .google.cloud.networkservices.v1.AgentGateway agent_gateways = 1; + */ + public Builder setAgentGateways( + int index, com.google.cloud.networkservices.v1.AgentGateway value) { + if (agentGatewaysBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAgentGatewaysIsMutable(); + agentGateways_.set(index, value); + onChanged(); + } else { + agentGatewaysBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
            +     * List of AgentGateway resources.
            +     * 
            + * + * repeated .google.cloud.networkservices.v1.AgentGateway agent_gateways = 1; + */ + public Builder setAgentGateways( + int index, com.google.cloud.networkservices.v1.AgentGateway.Builder builderForValue) { + if (agentGatewaysBuilder_ == null) { + ensureAgentGatewaysIsMutable(); + agentGateways_.set(index, builderForValue.build()); + onChanged(); + } else { + agentGatewaysBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
            +     * List of AgentGateway resources.
            +     * 
            + * + * repeated .google.cloud.networkservices.v1.AgentGateway agent_gateways = 1; + */ + public Builder addAgentGateways(com.google.cloud.networkservices.v1.AgentGateway value) { + if (agentGatewaysBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAgentGatewaysIsMutable(); + agentGateways_.add(value); + onChanged(); + } else { + agentGatewaysBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
            +     * List of AgentGateway resources.
            +     * 
            + * + * repeated .google.cloud.networkservices.v1.AgentGateway agent_gateways = 1; + */ + public Builder addAgentGateways( + int index, com.google.cloud.networkservices.v1.AgentGateway value) { + if (agentGatewaysBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAgentGatewaysIsMutable(); + agentGateways_.add(index, value); + onChanged(); + } else { + agentGatewaysBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
            +     * List of AgentGateway resources.
            +     * 
            + * + * repeated .google.cloud.networkservices.v1.AgentGateway agent_gateways = 1; + */ + public Builder addAgentGateways( + com.google.cloud.networkservices.v1.AgentGateway.Builder builderForValue) { + if (agentGatewaysBuilder_ == null) { + ensureAgentGatewaysIsMutable(); + agentGateways_.add(builderForValue.build()); + onChanged(); + } else { + agentGatewaysBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
            +     * List of AgentGateway resources.
            +     * 
            + * + * repeated .google.cloud.networkservices.v1.AgentGateway agent_gateways = 1; + */ + public Builder addAgentGateways( + int index, com.google.cloud.networkservices.v1.AgentGateway.Builder builderForValue) { + if (agentGatewaysBuilder_ == null) { + ensureAgentGatewaysIsMutable(); + agentGateways_.add(index, builderForValue.build()); + onChanged(); + } else { + agentGatewaysBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
            +     * List of AgentGateway resources.
            +     * 
            + * + * repeated .google.cloud.networkservices.v1.AgentGateway agent_gateways = 1; + */ + public Builder addAllAgentGateways( + java.lang.Iterable values) { + if (agentGatewaysBuilder_ == null) { + ensureAgentGatewaysIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, agentGateways_); + onChanged(); + } else { + agentGatewaysBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
            +     * List of AgentGateway resources.
            +     * 
            + * + * repeated .google.cloud.networkservices.v1.AgentGateway agent_gateways = 1; + */ + public Builder clearAgentGateways() { + if (agentGatewaysBuilder_ == null) { + agentGateways_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + agentGatewaysBuilder_.clear(); + } + return this; + } + + /** + * + * + *
            +     * List of AgentGateway resources.
            +     * 
            + * + * repeated .google.cloud.networkservices.v1.AgentGateway agent_gateways = 1; + */ + public Builder removeAgentGateways(int index) { + if (agentGatewaysBuilder_ == null) { + ensureAgentGatewaysIsMutable(); + agentGateways_.remove(index); + onChanged(); + } else { + agentGatewaysBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
            +     * List of AgentGateway resources.
            +     * 
            + * + * repeated .google.cloud.networkservices.v1.AgentGateway agent_gateways = 1; + */ + public com.google.cloud.networkservices.v1.AgentGateway.Builder getAgentGatewaysBuilder( + int index) { + return internalGetAgentGatewaysFieldBuilder().getBuilder(index); + } + + /** + * + * + *
            +     * List of AgentGateway resources.
            +     * 
            + * + * repeated .google.cloud.networkservices.v1.AgentGateway agent_gateways = 1; + */ + public com.google.cloud.networkservices.v1.AgentGatewayOrBuilder getAgentGatewaysOrBuilder( + int index) { + if (agentGatewaysBuilder_ == null) { + return agentGateways_.get(index); + } else { + return agentGatewaysBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
            +     * List of AgentGateway resources.
            +     * 
            + * + * repeated .google.cloud.networkservices.v1.AgentGateway agent_gateways = 1; + */ + public java.util.List + getAgentGatewaysOrBuilderList() { + if (agentGatewaysBuilder_ != null) { + return agentGatewaysBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(agentGateways_); + } + } + + /** + * + * + *
            +     * List of AgentGateway resources.
            +     * 
            + * + * repeated .google.cloud.networkservices.v1.AgentGateway agent_gateways = 1; + */ + public com.google.cloud.networkservices.v1.AgentGateway.Builder addAgentGatewaysBuilder() { + return internalGetAgentGatewaysFieldBuilder() + .addBuilder(com.google.cloud.networkservices.v1.AgentGateway.getDefaultInstance()); + } + + /** + * + * + *
            +     * List of AgentGateway resources.
            +     * 
            + * + * repeated .google.cloud.networkservices.v1.AgentGateway agent_gateways = 1; + */ + public com.google.cloud.networkservices.v1.AgentGateway.Builder addAgentGatewaysBuilder( + int index) { + return internalGetAgentGatewaysFieldBuilder() + .addBuilder(index, com.google.cloud.networkservices.v1.AgentGateway.getDefaultInstance()); + } + + /** + * + * + *
            +     * List of AgentGateway resources.
            +     * 
            + * + * repeated .google.cloud.networkservices.v1.AgentGateway agent_gateways = 1; + */ + public java.util.List + getAgentGatewaysBuilderList() { + return internalGetAgentGatewaysFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.networkservices.v1.AgentGateway, + com.google.cloud.networkservices.v1.AgentGateway.Builder, + com.google.cloud.networkservices.v1.AgentGatewayOrBuilder> + internalGetAgentGatewaysFieldBuilder() { + if (agentGatewaysBuilder_ == null) { + agentGatewaysBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.networkservices.v1.AgentGateway, + com.google.cloud.networkservices.v1.AgentGateway.Builder, + com.google.cloud.networkservices.v1.AgentGatewayOrBuilder>( + agentGateways_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + agentGateways_ = null; + } + return agentGatewaysBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + + /** + * + * + *
            +     * If there might be more results than those appearing in this response, then
            +     * `next_page_token` is included. To get the next set of results, call this
            +     * method again using the value of `next_page_token` as `page_token`.
            +     * 
            + * + * 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; + } + } + + /** + * + * + *
            +     * If there might be more results than those appearing in this response, then
            +     * `next_page_token` is included. To get the next set of results, call this
            +     * method again using the value of `next_page_token` as `page_token`.
            +     * 
            + * + * 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; + } + } + + /** + * + * + *
            +     * If there might be more results than those appearing in this response, then
            +     * `next_page_token` is included. To get the next set of results, call this
            +     * method again using the value of `next_page_token` as `page_token`.
            +     * 
            + * + * 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; + } + + /** + * + * + *
            +     * If there might be more results than those appearing in this response, then
            +     * `next_page_token` is included. To get the next set of results, call this
            +     * method again using the value of `next_page_token` as `page_token`.
            +     * 
            + * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + nextPageToken_ = getDefaultInstance().getNextPageToken(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
            +     * If there might be more results than those appearing in this response, then
            +     * `next_page_token` is included. To get the next set of results, call this
            +     * method again using the value of `next_page_token` as `page_token`.
            +     * 
            + * + * 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; + } + + private com.google.protobuf.LazyStringArrayList unreachable_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureUnreachableIsMutable() { + if (!unreachable_.isModifiable()) { + unreachable_ = new com.google.protobuf.LazyStringArrayList(unreachable_); + } + bitField0_ |= 0x00000004; + } + + /** + * + * + *
            +     * Unreachable resources. Populated when the request attempts to list all
            +     * resources across all supported locations, while some locations are
            +     * temporarily unavailable.
            +     * 
            + * + * repeated string unreachable = 3; + * + * @return A list containing the unreachable. + */ + public com.google.protobuf.ProtocolStringList getUnreachableList() { + unreachable_.makeImmutable(); + return unreachable_; + } + + /** + * + * + *
            +     * Unreachable resources. Populated when the request attempts to list all
            +     * resources across all supported locations, while some locations are
            +     * temporarily unavailable.
            +     * 
            + * + * repeated string unreachable = 3; + * + * @return The count of unreachable. + */ + public int getUnreachableCount() { + return unreachable_.size(); + } + + /** + * + * + *
            +     * Unreachable resources. Populated when the request attempts to list all
            +     * resources across all supported locations, while some locations are
            +     * temporarily unavailable.
            +     * 
            + * + * repeated string unreachable = 3; + * + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + public java.lang.String getUnreachable(int index) { + return unreachable_.get(index); + } + + /** + * + * + *
            +     * Unreachable resources. Populated when the request attempts to list all
            +     * resources across all supported locations, while some locations are
            +     * temporarily unavailable.
            +     * 
            + * + * repeated string unreachable = 3; + * + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + public com.google.protobuf.ByteString getUnreachableBytes(int index) { + return unreachable_.getByteString(index); + } + + /** + * + * + *
            +     * Unreachable resources. Populated when the request attempts to list all
            +     * resources across all supported locations, while some locations are
            +     * temporarily unavailable.
            +     * 
            + * + * repeated string unreachable = 3; + * + * @param index The index to set the value at. + * @param value The unreachable to set. + * @return This builder for chaining. + */ + public Builder setUnreachable(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureUnreachableIsMutable(); + unreachable_.set(index, value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Unreachable resources. Populated when the request attempts to list all
            +     * resources across all supported locations, while some locations are
            +     * temporarily unavailable.
            +     * 
            + * + * repeated string unreachable = 3; + * + * @param value The unreachable to add. + * @return This builder for chaining. + */ + public Builder addUnreachable(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureUnreachableIsMutable(); + unreachable_.add(value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Unreachable resources. Populated when the request attempts to list all
            +     * resources across all supported locations, while some locations are
            +     * temporarily unavailable.
            +     * 
            + * + * repeated string unreachable = 3; + * + * @param values The unreachable to add. + * @return This builder for chaining. + */ + public Builder addAllUnreachable(java.lang.Iterable values) { + ensureUnreachableIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, unreachable_); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Unreachable resources. Populated when the request attempts to list all
            +     * resources across all supported locations, while some locations are
            +     * temporarily unavailable.
            +     * 
            + * + * repeated string unreachable = 3; + * + * @return This builder for chaining. + */ + public Builder clearUnreachable() { + unreachable_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + ; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Unreachable resources. Populated when the request attempts to list all
            +     * resources across all supported locations, while some locations are
            +     * temporarily unavailable.
            +     * 
            + * + * repeated string unreachable = 3; + * + * @param value The bytes of the unreachable to add. + * @return This builder for chaining. + */ + public Builder addUnreachableBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureUnreachableIsMutable(); + unreachable_.add(value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.networkservices.v1.ListAgentGatewaysResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkservices.v1.ListAgentGatewaysResponse) + private static final com.google.cloud.networkservices.v1.ListAgentGatewaysResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.networkservices.v1.ListAgentGatewaysResponse(); + } + + public static com.google.cloud.networkservices.v1.ListAgentGatewaysResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListAgentGatewaysResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.networkservices.v1.ListAgentGatewaysResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/ListAgentGatewaysResponseOrBuilder.java b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/ListAgentGatewaysResponseOrBuilder.java new file mode 100644 index 000000000000..b68ae93d3287 --- /dev/null +++ b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/ListAgentGatewaysResponseOrBuilder.java @@ -0,0 +1,176 @@ +/* + * 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/cloud/networkservices/v1/agent_gateway.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkservices.v1; + +@com.google.protobuf.Generated +public interface ListAgentGatewaysResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkservices.v1.ListAgentGatewaysResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
            +   * List of AgentGateway resources.
            +   * 
            + * + * repeated .google.cloud.networkservices.v1.AgentGateway agent_gateways = 1; + */ + java.util.List getAgentGatewaysList(); + + /** + * + * + *
            +   * List of AgentGateway resources.
            +   * 
            + * + * repeated .google.cloud.networkservices.v1.AgentGateway agent_gateways = 1; + */ + com.google.cloud.networkservices.v1.AgentGateway getAgentGateways(int index); + + /** + * + * + *
            +   * List of AgentGateway resources.
            +   * 
            + * + * repeated .google.cloud.networkservices.v1.AgentGateway agent_gateways = 1; + */ + int getAgentGatewaysCount(); + + /** + * + * + *
            +   * List of AgentGateway resources.
            +   * 
            + * + * repeated .google.cloud.networkservices.v1.AgentGateway agent_gateways = 1; + */ + java.util.List + getAgentGatewaysOrBuilderList(); + + /** + * + * + *
            +   * List of AgentGateway resources.
            +   * 
            + * + * repeated .google.cloud.networkservices.v1.AgentGateway agent_gateways = 1; + */ + com.google.cloud.networkservices.v1.AgentGatewayOrBuilder getAgentGatewaysOrBuilder(int index); + + /** + * + * + *
            +   * If there might be more results than those appearing in this response, then
            +   * `next_page_token` is included. To get the next set of results, call this
            +   * method again using the value of `next_page_token` as `page_token`.
            +   * 
            + * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + + /** + * + * + *
            +   * If there might be more results than those appearing in this response, then
            +   * `next_page_token` is included. To get the next set of results, call this
            +   * method again using the value of `next_page_token` as `page_token`.
            +   * 
            + * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); + + /** + * + * + *
            +   * Unreachable resources. Populated when the request attempts to list all
            +   * resources across all supported locations, while some locations are
            +   * temporarily unavailable.
            +   * 
            + * + * repeated string unreachable = 3; + * + * @return A list containing the unreachable. + */ + java.util.List getUnreachableList(); + + /** + * + * + *
            +   * Unreachable resources. Populated when the request attempts to list all
            +   * resources across all supported locations, while some locations are
            +   * temporarily unavailable.
            +   * 
            + * + * repeated string unreachable = 3; + * + * @return The count of unreachable. + */ + int getUnreachableCount(); + + /** + * + * + *
            +   * Unreachable resources. Populated when the request attempts to list all
            +   * resources across all supported locations, while some locations are
            +   * temporarily unavailable.
            +   * 
            + * + * repeated string unreachable = 3; + * + * @param index The index of the element to return. + * @return The unreachable at the given index. + */ + java.lang.String getUnreachable(int index); + + /** + * + * + *
            +   * Unreachable resources. Populated when the request attempts to list all
            +   * resources across all supported locations, while some locations are
            +   * temporarily unavailable.
            +   * 
            + * + * repeated string unreachable = 3; + * + * @param index The index of the value to return. + * @return The bytes of the unreachable at the given index. + */ + com.google.protobuf.ByteString getUnreachableBytes(int index); +} diff --git a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/ListEndpointPoliciesRequest.java b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/ListEndpointPoliciesRequest.java index ce96c6fc0dda..28bd8b190d9c 100644 --- a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/ListEndpointPoliciesRequest.java +++ b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/ListEndpointPoliciesRequest.java @@ -81,7 +81,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * *
                * Required. The project and location from which the EndpointPolicies should
            -   * be listed, specified in the format `projects/*/locations/global`.
            +   * be listed, specified in the format `projects/*/locations/*`.
                * 
            * * @@ -108,7 +108,7 @@ public java.lang.String getParent() { * *
                * Required. The project and location from which the EndpointPolicies should
            -   * be listed, specified in the format `projects/*/locations/global`.
            +   * be listed, specified in the format `projects/*/locations/*`.
                * 
            * * @@ -619,7 +619,7 @@ public Builder mergeFrom( * *
                  * Required. The project and location from which the EndpointPolicies should
            -     * be listed, specified in the format `projects/*/locations/global`.
            +     * be listed, specified in the format `projects/*/locations/*`.
                  * 
            * * @@ -645,7 +645,7 @@ public java.lang.String getParent() { * *
                  * Required. The project and location from which the EndpointPolicies should
            -     * be listed, specified in the format `projects/*/locations/global`.
            +     * be listed, specified in the format `projects/*/locations/*`.
                  * 
            * * @@ -671,7 +671,7 @@ public com.google.protobuf.ByteString getParentBytes() { * *
                  * Required. The project and location from which the EndpointPolicies should
            -     * be listed, specified in the format `projects/*/locations/global`.
            +     * be listed, specified in the format `projects/*/locations/*`.
                  * 
            * * @@ -696,7 +696,7 @@ public Builder setParent(java.lang.String value) { * *
                  * Required. The project and location from which the EndpointPolicies should
            -     * be listed, specified in the format `projects/*/locations/global`.
            +     * be listed, specified in the format `projects/*/locations/*`.
                  * 
            * * @@ -717,7 +717,7 @@ public Builder clearParent() { * *
                  * Required. The project and location from which the EndpointPolicies should
            -     * be listed, specified in the format `projects/*/locations/global`.
            +     * be listed, specified in the format `projects/*/locations/*`.
                  * 
            * * diff --git a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/ListEndpointPoliciesRequestOrBuilder.java b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/ListEndpointPoliciesRequestOrBuilder.java index c7c09bd927a7..20b7eb46b85f 100644 --- a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/ListEndpointPoliciesRequestOrBuilder.java +++ b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/ListEndpointPoliciesRequestOrBuilder.java @@ -31,7 +31,7 @@ public interface ListEndpointPoliciesRequestOrBuilder * *
                * Required. The project and location from which the EndpointPolicies should
            -   * be listed, specified in the format `projects/*/locations/global`.
            +   * be listed, specified in the format `projects/*/locations/*`.
                * 
            * * @@ -47,7 +47,7 @@ public interface ListEndpointPoliciesRequestOrBuilder * *
                * Required. The project and location from which the EndpointPolicies should
            -   * be listed, specified in the format `projects/*/locations/global`.
            +   * be listed, specified in the format `projects/*/locations/*`.
                * 
            * * diff --git a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/ListGrpcRoutesRequest.java b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/ListGrpcRoutesRequest.java index 494c2c083e91..ddea809cb92c 100644 --- a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/ListGrpcRoutesRequest.java +++ b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/ListGrpcRoutesRequest.java @@ -81,7 +81,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * *
                * Required. The project and location from which the GrpcRoutes should be
            -   * listed, specified in the format `projects/*/locations/global`.
            +   * listed, specified in the format `projects/*/locations/*`.
                * 
            * * @@ -108,7 +108,7 @@ public java.lang.String getParent() { * *
                * Required. The project and location from which the GrpcRoutes should be
            -   * listed, specified in the format `projects/*/locations/global`.
            +   * listed, specified in the format `projects/*/locations/*`.
                * 
            * * @@ -613,7 +613,7 @@ public Builder mergeFrom( * *
                  * Required. The project and location from which the GrpcRoutes should be
            -     * listed, specified in the format `projects/*/locations/global`.
            +     * listed, specified in the format `projects/*/locations/*`.
                  * 
            * * @@ -639,7 +639,7 @@ public java.lang.String getParent() { * *
                  * Required. The project and location from which the GrpcRoutes should be
            -     * listed, specified in the format `projects/*/locations/global`.
            +     * listed, specified in the format `projects/*/locations/*`.
                  * 
            * * @@ -665,7 +665,7 @@ public com.google.protobuf.ByteString getParentBytes() { * *
                  * Required. The project and location from which the GrpcRoutes should be
            -     * listed, specified in the format `projects/*/locations/global`.
            +     * listed, specified in the format `projects/*/locations/*`.
                  * 
            * * @@ -690,7 +690,7 @@ public Builder setParent(java.lang.String value) { * *
                  * Required. The project and location from which the GrpcRoutes should be
            -     * listed, specified in the format `projects/*/locations/global`.
            +     * listed, specified in the format `projects/*/locations/*`.
                  * 
            * * @@ -711,7 +711,7 @@ public Builder clearParent() { * *
                  * Required. The project and location from which the GrpcRoutes should be
            -     * listed, specified in the format `projects/*/locations/global`.
            +     * listed, specified in the format `projects/*/locations/*`.
                  * 
            * * diff --git a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/ListGrpcRoutesRequestOrBuilder.java b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/ListGrpcRoutesRequestOrBuilder.java index 2e0272dacf87..7e440e87d37f 100644 --- a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/ListGrpcRoutesRequestOrBuilder.java +++ b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/ListGrpcRoutesRequestOrBuilder.java @@ -31,7 +31,7 @@ public interface ListGrpcRoutesRequestOrBuilder * *
                * Required. The project and location from which the GrpcRoutes should be
            -   * listed, specified in the format `projects/*/locations/global`.
            +   * listed, specified in the format `projects/*/locations/*`.
                * 
            * * @@ -47,7 +47,7 @@ public interface ListGrpcRoutesRequestOrBuilder * *
                * Required. The project and location from which the GrpcRoutes should be
            -   * listed, specified in the format `projects/*/locations/global`.
            +   * listed, specified in the format `projects/*/locations/*`.
                * 
            * * diff --git a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/ListHttpRoutesRequest.java b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/ListHttpRoutesRequest.java index 6874393c82b3..c447ce91a541 100644 --- a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/ListHttpRoutesRequest.java +++ b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/ListHttpRoutesRequest.java @@ -54,6 +54,7 @@ private ListHttpRoutesRequest(com.google.protobuf.GeneratedMessage.Builder bu private ListHttpRoutesRequest() { parent_ = ""; pageToken_ = ""; + filter_ = ""; } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @@ -81,7 +82,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * *
                * Required. The project and location from which the HttpRoutes should be
            -   * listed, specified in the format `projects/*/locations/global`.
            +   * listed, specified in the format `projects/*/locations/*`.
                * 
            * * @@ -108,7 +109,7 @@ public java.lang.String getParent() { * *
                * Required. The project and location from which the HttpRoutes should be
            -   * listed, specified in the format `projects/*/locations/global`.
            +   * listed, specified in the format `projects/*/locations/*`.
                * 
            * * @@ -227,6 +228,59 @@ public boolean getReturnPartialSuccess() { return returnPartialSuccess_; } + public static final int FILTER_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object filter_ = ""; + + /** + * + * + *
            +   * Optional. Filter expression to restrict the list.
            +   * 
            + * + * string filter = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
            +   * Optional. Filter expression to restrict the list.
            +   * 
            + * + * string filter = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -253,6 +307,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (returnPartialSuccess_ != false) { output.writeBool(4, returnPartialSuccess_); } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(filter_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 5, filter_); + } getUnknownFields().writeTo(output); } @@ -274,6 +331,9 @@ public int getSerializedSize() { if (returnPartialSuccess_ != false) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(4, returnPartialSuccess_); } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(filter_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(5, filter_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -294,6 +354,7 @@ public boolean equals(final java.lang.Object obj) { if (getPageSize() != other.getPageSize()) return false; if (!getPageToken().equals(other.getPageToken())) return false; if (getReturnPartialSuccess() != other.getReturnPartialSuccess()) return false; + if (!getFilter().equals(other.getFilter())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -313,6 +374,8 @@ public int hashCode() { hash = (53 * hash) + getPageToken().hashCode(); hash = (37 * hash) + RETURN_PARTIAL_SUCCESS_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getReturnPartialSuccess()); + hash = (37 * hash) + FILTER_FIELD_NUMBER; + hash = (53 * hash) + getFilter().hashCode(); hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -458,6 +521,7 @@ public Builder clear() { pageSize_ = 0; pageToken_ = ""; returnPartialSuccess_ = false; + filter_ = ""; return this; } @@ -506,6 +570,9 @@ private void buildPartial0(com.google.cloud.networkservices.v1.ListHttpRoutesReq if (((from_bitField0_ & 0x00000008) != 0)) { result.returnPartialSuccess_ = returnPartialSuccess_; } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.filter_ = filter_; + } } @java.lang.Override @@ -537,6 +604,11 @@ public Builder mergeFrom(com.google.cloud.networkservices.v1.ListHttpRoutesReque if (other.getReturnPartialSuccess() != false) { setReturnPartialSuccess(other.getReturnPartialSuccess()); } + if (!other.getFilter().isEmpty()) { + filter_ = other.filter_; + bitField0_ |= 0x00000010; + onChanged(); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -587,6 +659,12 @@ public Builder mergeFrom( bitField0_ |= 0x00000008; break; } // case 32 + case 42: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -613,7 +691,7 @@ public Builder mergeFrom( * *
                  * Required. The project and location from which the HttpRoutes should be
            -     * listed, specified in the format `projects/*/locations/global`.
            +     * listed, specified in the format `projects/*/locations/*`.
                  * 
            * * @@ -639,7 +717,7 @@ public java.lang.String getParent() { * *
                  * Required. The project and location from which the HttpRoutes should be
            -     * listed, specified in the format `projects/*/locations/global`.
            +     * listed, specified in the format `projects/*/locations/*`.
                  * 
            * * @@ -665,7 +743,7 @@ public com.google.protobuf.ByteString getParentBytes() { * *
                  * Required. The project and location from which the HttpRoutes should be
            -     * listed, specified in the format `projects/*/locations/global`.
            +     * listed, specified in the format `projects/*/locations/*`.
                  * 
            * * @@ -690,7 +768,7 @@ public Builder setParent(java.lang.String value) { * *
                  * Required. The project and location from which the HttpRoutes should be
            -     * listed, specified in the format `projects/*/locations/global`.
            +     * listed, specified in the format `projects/*/locations/*`.
                  * 
            * * @@ -711,7 +789,7 @@ public Builder clearParent() { * *
                  * Required. The project and location from which the HttpRoutes should be
            -     * listed, specified in the format `projects/*/locations/global`.
            +     * listed, specified in the format `projects/*/locations/*`.
                  * 
            * * @@ -971,6 +1049,117 @@ public Builder clearReturnPartialSuccess() { return this; } + private java.lang.Object filter_ = ""; + + /** + * + * + *
            +     * Optional. Filter expression to restrict the list.
            +     * 
            + * + * string filter = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
            +     * Optional. Filter expression to restrict the list.
            +     * 
            + * + * string filter = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + + /** + * + * + *
            +     * Optional. Filter expression to restrict the list.
            +     * 
            + * + * string filter = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Optional. Filter expression to restrict the list.
            +     * 
            + * + * string filter = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearFilter() { + filter_ = getDefaultInstance().getFilter(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + + /** + * + * + *
            +     * Optional. Filter expression to restrict the list.
            +     * 
            + * + * string filter = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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_ |= 0x00000010; + onChanged(); + return this; + } + // @@protoc_insertion_point(builder_scope:google.cloud.networkservices.v1.ListHttpRoutesRequest) } diff --git a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/ListHttpRoutesRequestOrBuilder.java b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/ListHttpRoutesRequestOrBuilder.java index 655d09fc5cf2..767b1907f6ec 100644 --- a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/ListHttpRoutesRequestOrBuilder.java +++ b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/ListHttpRoutesRequestOrBuilder.java @@ -31,7 +31,7 @@ public interface ListHttpRoutesRequestOrBuilder * *
                * Required. The project and location from which the HttpRoutes should be
            -   * listed, specified in the format `projects/*/locations/global`.
            +   * listed, specified in the format `projects/*/locations/*`.
                * 
            * * @@ -47,7 +47,7 @@ public interface ListHttpRoutesRequestOrBuilder * *
                * Required. The project and location from which the HttpRoutes should be
            -   * listed, specified in the format `projects/*/locations/global`.
            +   * listed, specified in the format `projects/*/locations/*`.
                * 
            * * @@ -115,4 +115,30 @@ public interface ListHttpRoutesRequestOrBuilder * @return The returnPartialSuccess. */ boolean getReturnPartialSuccess(); + + /** + * + * + *
            +   * Optional. Filter expression to restrict the list.
            +   * 
            + * + * string filter = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The filter. + */ + java.lang.String getFilter(); + + /** + * + * + *
            +   * Optional. Filter expression to restrict the list.
            +   * 
            + * + * string filter = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for filter. + */ + com.google.protobuf.ByteString getFilterBytes(); } diff --git a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/ListMeshesRequest.java b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/ListMeshesRequest.java index 3cb0f17d2136..22d4c293acb4 100644 --- a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/ListMeshesRequest.java +++ b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/ListMeshesRequest.java @@ -81,7 +81,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * *
                * Required. The project and location from which the Meshes should be
            -   * listed, specified in the format `projects/*/locations/global`.
            +   * listed, specified in the format `projects/*/locations/*`.
                * 
            * * @@ -108,7 +108,7 @@ public java.lang.String getParent() { * *
                * Required. The project and location from which the Meshes should be
            -   * listed, specified in the format `projects/*/locations/global`.
            +   * listed, specified in the format `projects/*/locations/*`.
                * 
            * * @@ -613,7 +613,7 @@ public Builder mergeFrom( * *
                  * Required. The project and location from which the Meshes should be
            -     * listed, specified in the format `projects/*/locations/global`.
            +     * listed, specified in the format `projects/*/locations/*`.
                  * 
            * * @@ -639,7 +639,7 @@ public java.lang.String getParent() { * *
                  * Required. The project and location from which the Meshes should be
            -     * listed, specified in the format `projects/*/locations/global`.
            +     * listed, specified in the format `projects/*/locations/*`.
                  * 
            * * @@ -665,7 +665,7 @@ public com.google.protobuf.ByteString getParentBytes() { * *
                  * Required. The project and location from which the Meshes should be
            -     * listed, specified in the format `projects/*/locations/global`.
            +     * listed, specified in the format `projects/*/locations/*`.
                  * 
            * * @@ -690,7 +690,7 @@ public Builder setParent(java.lang.String value) { * *
                  * Required. The project and location from which the Meshes should be
            -     * listed, specified in the format `projects/*/locations/global`.
            +     * listed, specified in the format `projects/*/locations/*`.
                  * 
            * * @@ -711,7 +711,7 @@ public Builder clearParent() { * *
                  * Required. The project and location from which the Meshes should be
            -     * listed, specified in the format `projects/*/locations/global`.
            +     * listed, specified in the format `projects/*/locations/*`.
                  * 
            * * diff --git a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/ListMeshesRequestOrBuilder.java b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/ListMeshesRequestOrBuilder.java index 402caca8937b..364bc32dfad0 100644 --- a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/ListMeshesRequestOrBuilder.java +++ b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/ListMeshesRequestOrBuilder.java @@ -31,7 +31,7 @@ public interface ListMeshesRequestOrBuilder * *
                * Required. The project and location from which the Meshes should be
            -   * listed, specified in the format `projects/*/locations/global`.
            +   * listed, specified in the format `projects/*/locations/*`.
                * 
            * * @@ -47,7 +47,7 @@ public interface ListMeshesRequestOrBuilder * *
                * Required. The project and location from which the Meshes should be
            -   * listed, specified in the format `projects/*/locations/global`.
            +   * listed, specified in the format `projects/*/locations/*`.
                * 
            * * diff --git a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/ListTcpRoutesRequest.java b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/ListTcpRoutesRequest.java index 5616e6ff93d8..3e369e892abb 100644 --- a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/ListTcpRoutesRequest.java +++ b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/ListTcpRoutesRequest.java @@ -81,7 +81,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * *
                * Required. The project and location from which the TcpRoutes should be
            -   * listed, specified in the format `projects/*/locations/global`.
            +   * listed, specified in the format `projects/*/locations/*`.
                * 
            * * @@ -108,7 +108,7 @@ public java.lang.String getParent() { * *
                * Required. The project and location from which the TcpRoutes should be
            -   * listed, specified in the format `projects/*/locations/global`.
            +   * listed, specified in the format `projects/*/locations/*`.
                * 
            * * @@ -613,7 +613,7 @@ public Builder mergeFrom( * *
                  * Required. The project and location from which the TcpRoutes should be
            -     * listed, specified in the format `projects/*/locations/global`.
            +     * listed, specified in the format `projects/*/locations/*`.
                  * 
            * * @@ -639,7 +639,7 @@ public java.lang.String getParent() { * *
                  * Required. The project and location from which the TcpRoutes should be
            -     * listed, specified in the format `projects/*/locations/global`.
            +     * listed, specified in the format `projects/*/locations/*`.
                  * 
            * * @@ -665,7 +665,7 @@ public com.google.protobuf.ByteString getParentBytes() { * *
                  * Required. The project and location from which the TcpRoutes should be
            -     * listed, specified in the format `projects/*/locations/global`.
            +     * listed, specified in the format `projects/*/locations/*`.
                  * 
            * * @@ -690,7 +690,7 @@ public Builder setParent(java.lang.String value) { * *
                  * Required. The project and location from which the TcpRoutes should be
            -     * listed, specified in the format `projects/*/locations/global`.
            +     * listed, specified in the format `projects/*/locations/*`.
                  * 
            * * @@ -711,7 +711,7 @@ public Builder clearParent() { * *
                  * Required. The project and location from which the TcpRoutes should be
            -     * listed, specified in the format `projects/*/locations/global`.
            +     * listed, specified in the format `projects/*/locations/*`.
                  * 
            * * diff --git a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/ListTcpRoutesRequestOrBuilder.java b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/ListTcpRoutesRequestOrBuilder.java index c8bd0c12c2c4..ace6ee2e00a4 100644 --- a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/ListTcpRoutesRequestOrBuilder.java +++ b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/ListTcpRoutesRequestOrBuilder.java @@ -31,7 +31,7 @@ public interface ListTcpRoutesRequestOrBuilder * *
                * Required. The project and location from which the TcpRoutes should be
            -   * listed, specified in the format `projects/*/locations/global`.
            +   * listed, specified in the format `projects/*/locations/*`.
                * 
            * * @@ -47,7 +47,7 @@ public interface ListTcpRoutesRequestOrBuilder * *
                * Required. The project and location from which the TcpRoutes should be
            -   * listed, specified in the format `projects/*/locations/global`.
            +   * listed, specified in the format `projects/*/locations/*`.
                * 
            * * diff --git a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/ListTlsRoutesRequest.java b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/ListTlsRoutesRequest.java index dc282c7eeba8..d1e2965105e0 100644 --- a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/ListTlsRoutesRequest.java +++ b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/ListTlsRoutesRequest.java @@ -81,7 +81,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * *
                * Required. The project and location from which the TlsRoutes should be
            -   * listed, specified in the format `projects/*/locations/global`.
            +   * listed, specified in the format `projects/*/locations/*`.
                * 
            * * @@ -108,7 +108,7 @@ public java.lang.String getParent() { * *
                * Required. The project and location from which the TlsRoutes should be
            -   * listed, specified in the format `projects/*/locations/global`.
            +   * listed, specified in the format `projects/*/locations/*`.
                * 
            * * @@ -613,7 +613,7 @@ public Builder mergeFrom( * *
                  * Required. The project and location from which the TlsRoutes should be
            -     * listed, specified in the format `projects/*/locations/global`.
            +     * listed, specified in the format `projects/*/locations/*`.
                  * 
            * * @@ -639,7 +639,7 @@ public java.lang.String getParent() { * *
                  * Required. The project and location from which the TlsRoutes should be
            -     * listed, specified in the format `projects/*/locations/global`.
            +     * listed, specified in the format `projects/*/locations/*`.
                  * 
            * * @@ -665,7 +665,7 @@ public com.google.protobuf.ByteString getParentBytes() { * *
                  * Required. The project and location from which the TlsRoutes should be
            -     * listed, specified in the format `projects/*/locations/global`.
            +     * listed, specified in the format `projects/*/locations/*`.
                  * 
            * * @@ -690,7 +690,7 @@ public Builder setParent(java.lang.String value) { * *
                  * Required. The project and location from which the TlsRoutes should be
            -     * listed, specified in the format `projects/*/locations/global`.
            +     * listed, specified in the format `projects/*/locations/*`.
                  * 
            * * @@ -711,7 +711,7 @@ public Builder clearParent() { * *
                  * Required. The project and location from which the TlsRoutes should be
            -     * listed, specified in the format `projects/*/locations/global`.
            +     * listed, specified in the format `projects/*/locations/*`.
                  * 
            * * diff --git a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/ListTlsRoutesRequestOrBuilder.java b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/ListTlsRoutesRequestOrBuilder.java index 1b83bf6ee882..40b58a44a405 100644 --- a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/ListTlsRoutesRequestOrBuilder.java +++ b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/ListTlsRoutesRequestOrBuilder.java @@ -31,7 +31,7 @@ public interface ListTlsRoutesRequestOrBuilder * *
                * Required. The project and location from which the TlsRoutes should be
            -   * listed, specified in the format `projects/*/locations/global`.
            +   * listed, specified in the format `projects/*/locations/*`.
                * 
            * * @@ -47,7 +47,7 @@ public interface ListTlsRoutesRequestOrBuilder * *
                * Required. The project and location from which the TlsRoutes should be
            -   * listed, specified in the format `projects/*/locations/global`.
            +   * listed, specified in the format `projects/*/locations/*`.
                * 
            * * diff --git a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/Mesh.java b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/Mesh.java index 9e4b627828b9..68f17a6d25aa 100644 --- a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/Mesh.java +++ b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/Mesh.java @@ -98,7 +98,7 @@ protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldRefl * *
                * Identifier. Name of the Mesh resource. It matches pattern
            -   * `projects/*/locations/global/meshes/<mesh_name>`.
            +   * `projects/*/locations/*/meshes/<mesh_name>`.
                * 
            * * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; @@ -123,7 +123,7 @@ public java.lang.String getName() { * *
                * Identifier. Name of the Mesh resource. It matches pattern
            -   * `projects/*/locations/global/meshes/<mesh_name>`.
            +   * `projects/*/locations/*/meshes/<mesh_name>`.
                * 
            * * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; @@ -1102,7 +1102,7 @@ public Builder mergeFrom( * *
                  * Identifier. Name of the Mesh resource. It matches pattern
            -     * `projects/*/locations/global/meshes/<mesh_name>`.
            +     * `projects/*/locations/*/meshes/<mesh_name>`.
                  * 
            * * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; @@ -1126,7 +1126,7 @@ public java.lang.String getName() { * *
                  * Identifier. Name of the Mesh resource. It matches pattern
            -     * `projects/*/locations/global/meshes/<mesh_name>`.
            +     * `projects/*/locations/*/meshes/<mesh_name>`.
                  * 
            * * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; @@ -1150,7 +1150,7 @@ public com.google.protobuf.ByteString getNameBytes() { * *
                  * Identifier. Name of the Mesh resource. It matches pattern
            -     * `projects/*/locations/global/meshes/<mesh_name>`.
            +     * `projects/*/locations/*/meshes/<mesh_name>`.
                  * 
            * * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; @@ -1173,7 +1173,7 @@ public Builder setName(java.lang.String value) { * *
                  * Identifier. Name of the Mesh resource. It matches pattern
            -     * `projects/*/locations/global/meshes/<mesh_name>`.
            +     * `projects/*/locations/*/meshes/<mesh_name>`.
                  * 
            * * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; @@ -1192,7 +1192,7 @@ public Builder clearName() { * *
                  * Identifier. Name of the Mesh resource. It matches pattern
            -     * `projects/*/locations/global/meshes/<mesh_name>`.
            +     * `projects/*/locations/*/meshes/<mesh_name>`.
                  * 
            * * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; diff --git a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/MeshOrBuilder.java b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/MeshOrBuilder.java index 4be4f12e9592..47056573b397 100644 --- a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/MeshOrBuilder.java +++ b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/MeshOrBuilder.java @@ -31,7 +31,7 @@ public interface MeshOrBuilder * *
                * Identifier. Name of the Mesh resource. It matches pattern
            -   * `projects/*/locations/global/meshes/<mesh_name>`.
            +   * `projects/*/locations/*/meshes/<mesh_name>`.
                * 
            * * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; @@ -45,7 +45,7 @@ public interface MeshOrBuilder * *
                * Identifier. Name of the Mesh resource. It matches pattern
            -   * `projects/*/locations/global/meshes/<mesh_name>`.
            +   * `projects/*/locations/*/meshes/<mesh_name>`.
                * 
            * * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; diff --git a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/MeshProto.java b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/MeshProto.java index 2a321eb04acf..79adf4e4a5d8 100644 --- a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/MeshProto.java +++ b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/MeshProto.java @@ -87,7 +87,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "pi/resource.proto\032,google/cloud/networks" + "ervices/v1/common.proto\032 google/protobuf" + "/field_mask.proto\032\037google/protobuf/times" - + "tamp.proto\"\221\004\n\004Mesh\022\021\n\004name\030\001 \001(\tB\003\340A\010\022\026" + + "tamp.proto\"\237\004\n\004Mesh\022\021\n\004name\030\001 \001(\tB\003\340A\010\022\026" + "\n\tself_link\030\t \001(\tB\003\340A\003\0224\n\013create_time\030\002 " + "\001(\0132\032.google.protobuf.TimestampB\003\340A\003\0224\n\013" + "update_time\030\003 \001(\0132\032.google.protobuf.Time" @@ -97,38 +97,38 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "tion_port\030\010 \001(\005B\003\340A\001\022N\n\renvoy_headers\030\020 " + "\001(\0162-.google.cloud.networkservices.v1.En" + "voyHeadersB\003\340A\001H\000\210\001\001\032-\n\013LabelsEntry\022\013\n\003k" - + "ey\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001:_\352A\\\n#networ" + + "ey\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001:m\352Aj\n#networ" + "kservices.googleapis.com/Mesh\0225projects/" + "{project}/locations/{location}/meshes/{m" - + "esh}B\020\n\016_envoy_headers\"\234\001\n\021ListMeshesReq" - + "uest\022;\n\006parent\030\001 \001(\tB+\340A\002\372A%\022#networkser" - + "vices.googleapis.com/Mesh\022\021\n\tpage_size\030\002" - + " \001(\005\022\022\n\npage_token\030\003 \001(\t\022#\n\026return_parti" - + "al_success\030\004 \001(\010B\003\340A\001\"y\n\022ListMeshesRespo" - + "nse\0225\n\006meshes\030\001 \003(\0132%.google.cloud.netwo" - + "rkservices.v1.Mesh\022\027\n\017next_page_token\030\002 " - + "\001(\t\022\023\n\013unreachable\030\003 \003(\t\"K\n\016GetMeshReque" - + "st\0229\n\004name\030\001 \001(\tB+\340A\002\372A%\n#networkservice" - + "s.googleapis.com/Mesh\"\240\001\n\021CreateMeshRequ" - + "est\022;\n\006parent\030\001 \001(\tB+\340A\002\372A%\022#networkserv" - + "ices.googleapis.com/Mesh\022\024\n\007mesh_id\030\002 \001(" - + "\tB\003\340A\002\0228\n\004mesh\030\003 \001(\0132%.google.cloud.netw" - + "orkservices.v1.MeshB\003\340A\002\"\203\001\n\021UpdateMeshR" - + "equest\0224\n\013update_mask\030\001 \001(\0132\032.google.pro" - + "tobuf.FieldMaskB\003\340A\001\0228\n\004mesh\030\002 \001(\0132%.goo" - + "gle.cloud.networkservices.v1.MeshB\003\340A\002\"N" - + "\n\021DeleteMeshRequest\0229\n\004name\030\001 \001(\tB+\340A\002\372A" - + "%\n#networkservices.googleapis.com/MeshB\344" - + "\002\n#com.google.cloud.networkservices.v1B\t" - + "MeshProtoP\001ZMcloud.google.com/go/network" - + "services/apiv1/networkservicespb;network" - + "servicespb\252\002\037Google.Cloud.NetworkService" - + "s.V1\312\002\037Google\\Cloud\\NetworkServices\\V1\352\002" - + "\"Google::Cloud::NetworkServices::V1\352Aw\n(" - + "compute.googleapis.com/ServiceAttachment" - + "\022Kprojects/{project}/regions/{region}/se" - + "rviceAttachments/{service_attachment}b\006p" - + "roto3" + + "esh}*\006meshes2\004meshB\020\n\016_envoy_headers\"\234\001\n" + + "\021ListMeshesRequest\022;\n\006parent\030\001 \001(\tB+\340A\002\372" + + "A%\022#networkservices.googleapis.com/Mesh\022" + + "\021\n\tpage_size\030\002 \001(\005\022\022\n\npage_token\030\003 \001(\t\022#" + + "\n\026return_partial_success\030\004 \001(\010B\003\340A\001\"y\n\022L" + + "istMeshesResponse\0225\n\006meshes\030\001 \003(\0132%.goog" + + "le.cloud.networkservices.v1.Mesh\022\027\n\017next" + + "_page_token\030\002 \001(\t\022\023\n\013unreachable\030\003 \003(\t\"K" + + "\n\016GetMeshRequest\0229\n\004name\030\001 \001(\tB+\340A\002\372A%\n#" + + "networkservices.googleapis.com/Mesh\"\240\001\n\021" + + "CreateMeshRequest\022;\n\006parent\030\001 \001(\tB+\340A\002\372A" + + "%\022#networkservices.googleapis.com/Mesh\022\024" + + "\n\007mesh_id\030\002 \001(\tB\003\340A\002\0228\n\004mesh\030\003 \001(\0132%.goo" + + "gle.cloud.networkservices.v1.MeshB\003\340A\002\"\203" + + "\001\n\021UpdateMeshRequest\0224\n\013update_mask\030\001 \001(" + + "\0132\032.google.protobuf.FieldMaskB\003\340A\001\0228\n\004me" + + "sh\030\002 \001(\0132%.google.cloud.networkservices." + + "v1.MeshB\003\340A\002\"N\n\021DeleteMeshRequest\0229\n\004nam" + + "e\030\001 \001(\tB+\340A\002\372A%\n#networkservices.googlea" + + "pis.com/MeshB\344\002\n#com.google.cloud.networ" + + "kservices.v1B\tMeshProtoP\001ZMcloud.google." + + "com/go/networkservices/apiv1/networkserv" + + "icespb;networkservicespb\252\002\037Google.Cloud." + + "NetworkServices.V1\312\002\037Google\\Cloud\\Networ" + + "kServices\\V1\352\002\"Google::Cloud::NetworkSer" + + "vices::V1\352Aw\n(compute.googleapis.com/Ser" + + "viceAttachment\022Kprojects/{project}/regio" + + "ns/{region}/serviceAttachments/{service_" + + "attachment}b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( diff --git a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/NetworkServicesOuterClass.java b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/NetworkServicesOuterClass.java index fa24440605c5..3164597530d7 100644 --- a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/NetworkServicesOuterClass.java +++ b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/NetworkServicesOuterClass.java @@ -51,380 +51,413 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "\n6google/cloud/networkservices/v1/networ" + "k_services.proto\022\037google.cloud.networkse" + "rvices.v1\032\034google/api/annotations.proto\032" - + "\027google/api/client.proto\032,google/cloud/n" - + "etworkservices/v1/common.proto\0325google/c" - + "loud/networkservices/v1/endpoint_policy." - + "proto\0323google/cloud/networkservices/v1/e" - + "xtensibility.proto\032-google/cloud/network" - + "services/v1/gateway.proto\0320google/cloud/" - + "networkservices/v1/grpc_route.proto\0320goo" - + "gle/cloud/networkservices/v1/http_route." - + "proto\032*google/cloud/networkservices/v1/m" - + "esh.proto\0320google/cloud/networkservices/" - + "v1/route_view.proto\0325google/cloud/networ" - + "kservices/v1/service_binding.proto\0327goog" - + "le/cloud/networkservices/v1/service_lb_p" - + "olicy.proto\032/google/cloud/networkservice" - + "s/v1/tcp_route.proto\032/google/cloud/netwo" - + "rkservices/v1/tls_route.proto\032#google/lo" - + "ngrunning/operations.proto\032\033google/proto" - + "buf/empty.proto2\302m\n\017NetworkServices\022\332\001\n\024" - + "ListEndpointPolicies\022<.google.cloud.netw" - + "orkservices.v1.ListEndpointPoliciesReque" - + "st\032=.google.cloud.networkservices.v1.Lis" - + "tEndpointPoliciesResponse\"E\332A\006parent\202\323\344\223" - + "\0026\0224/v1/{parent=projects/*/locations/*}/" - + "endpointPolicies\022\304\001\n\021GetEndpointPolicy\0229" - + ".google.cloud.networkservices.v1.GetEndp" - + "ointPolicyRequest\032/.google.cloud.network" - + "services.v1.EndpointPolicy\"C\332A\004name\202\323\344\223\002" - + "6\0224/v1/{name=projects/*/locations/*/endp" - + "ointPolicies/*}\022\265\002\n\024CreateEndpointPolicy" - + "\022<.google.cloud.networkservices.v1.Creat" - + "eEndpointPolicyRequest\032\035.google.longrunn" - + "ing.Operation\"\277\001\312AC\n\016EndpointPolicy\0221goo" - + "gle.cloud.networkservices.v1.OperationMe" - + "tadata\332A)parent,endpoint_policy,endpoint" - + "_policy_id\202\323\344\223\002G\"4/v1/{parent=projects/*" - + "/locations/*}/endpointPolicies:\017endpoint" - + "_policy\022\267\002\n\024UpdateEndpointPolicy\022<.googl" - + "e.cloud.networkservices.v1.UpdateEndpoin" - + "tPolicyRequest\032\035.google.longrunning.Oper" - + "ation\"\301\001\312AC\n\016EndpointPolicy\0221google.clou" - + "d.networkservices.v1.OperationMetadata\332A" - + "\033endpoint_policy,update_mask\202\323\344\223\002W2D/v1/" - + "{endpoint_policy.name=projects/*/locatio" - + "ns/*/endpointPolicies/*}:\017endpoint_polic" - + "y\022\206\002\n\024DeleteEndpointPolicy\022<.google.clou" - + "d.networkservices.v1.DeleteEndpointPolic" - + "yRequest\032\035.google.longrunning.Operation\"" - + "\220\001\312AJ\n\025google.protobuf.Empty\0221google.clo" - + "ud.networkservices.v1.OperationMetadata\332" - + "A\004name\202\323\344\223\0026*4/v1/{name=projects/*/locat" - + "ions/*/endpointPolicies/*}\022\346\001\n\026ListWasmP" - + "luginVersions\022>.google.cloud.networkserv" - + "ices.v1.ListWasmPluginVersionsRequest\032?." - + "google.cloud.networkservices.v1.ListWasm" - + "PluginVersionsResponse\"K\332A\006parent\202\323\344\223\002<\022" - + ":/v1/{parent=projects/*/locations/*/wasm" - + "Plugins/*}/versions\022\323\001\n\024GetWasmPluginVer" - + "sion\022<.google.cloud.networkservices.v1.G" - + "etWasmPluginVersionRequest\0322.google.clou" - + "d.networkservices.v1.WasmPluginVersion\"I" - + "\332A\004name\202\323\344\223\002<\022:/v1/{name=projects/*/loca" - + "tions/*/wasmPlugins/*/versions/*}\022\320\002\n\027Cr" - + "eateWasmPluginVersion\022?.google.cloud.net" - + "workservices.v1.CreateWasmPluginVersionR" - + "equest\032\035.google.longrunning.Operation\"\324\001" - + "\312AF\n\021WasmPluginVersion\0221google.cloud.net" - + "workservices.v1.OperationMetadata\332A1pare" - + "nt,wasm_plugin_version,wasm_plugin_versi" - + "on_id\202\323\344\223\002Q\":/v1/{parent=projects/*/loca" - + "tions/*/wasmPlugins/*}/versions:\023wasm_pl" - + "ugin_version\022\222\002\n\027DeleteWasmPluginVersion" - + "\022?.google.cloud.networkservices.v1.Delet" - + "eWasmPluginVersionRequest\032\035.google.longr" - + "unning.Operation\"\226\001\312AJ\n\025google.protobuf." - + "Empty\0221google.cloud.networkservices.v1.O" - + "perationMetadata\332A\004name\202\323\344\223\002<*:/v1/{name" - + "=projects/*/locations/*/wasmPlugins/*/ve" - + "rsions/*}\022\306\001\n\017ListWasmPlugins\0227.google.c" - + "loud.networkservices.v1.ListWasmPluginsR" - + "equest\0328.google.cloud.networkservices.v1" - + ".ListWasmPluginsResponse\"@\332A\006parent\202\323\344\223\002" - + "1\022//v1/{parent=projects/*/locations/*}/w" - + "asmPlugins\022\263\001\n\rGetWasmPlugin\0225.google.cl" - + "oud.networkservices.v1.GetWasmPluginRequ" - + "est\032+.google.cloud.networkservices.v1.Wa" - + "smPlugin\">\332A\004name\202\323\344\223\0021\022//v1/{name=proje" - + "cts/*/locations/*/wasmPlugins/*}\022\230\002\n\020Cre" - + "ateWasmPlugin\0228.google.cloud.networkserv" - + "ices.v1.CreateWasmPluginRequest\032\035.google" - + ".longrunning.Operation\"\252\001\312A?\n\nWasmPlugin" + + "\027google/api/client.proto\0323google/cloud/n" + + "etworkservices/v1/agent_gateway.proto\032,g" + + "oogle/cloud/networkservices/v1/common.pr" + + "oto\0325google/cloud/networkservices/v1/end" + + "point_policy.proto\0323google/cloud/network" + + "services/v1/extensibility.proto\032-google/" + + "cloud/networkservices/v1/gateway.proto\0320" + + "google/cloud/networkservices/v1/grpc_rou" + + "te.proto\0320google/cloud/networkservices/v" + + "1/http_route.proto\032*google/cloud/network" + + "services/v1/mesh.proto\0320google/cloud/net" + + "workservices/v1/route_view.proto\0325google" + + "/cloud/networkservices/v1/service_bindin" + + "g.proto\0327google/cloud/networkservices/v1" + + "/service_lb_policy.proto\032/google/cloud/n" + + "etworkservices/v1/tcp_route.proto\032/googl" + + "e/cloud/networkservices/v1/tls_route.pro" + + "to\032#google/longrunning/operations.proto\032" + + "\033google/protobuf/empty.proto2\247w\n\017Network" + + "Services\022\332\001\n\024ListEndpointPolicies\022<.goog" + + "le.cloud.networkservices.v1.ListEndpoint" + + "PoliciesRequest\032=.google.cloud.networkse" + + "rvices.v1.ListEndpointPoliciesResponse\"E" + + "\332A\006parent\202\323\344\223\0026\0224/v1/{parent=projects/*/" + + "locations/*}/endpointPolicies\022\304\001\n\021GetEnd" + + "pointPolicy\0229.google.cloud.networkservic" + + "es.v1.GetEndpointPolicyRequest\032/.google." + + "cloud.networkservices.v1.EndpointPolicy\"" + + "C\332A\004name\202\323\344\223\0026\0224/v1/{name=projects/*/loc" + + "ations/*/endpointPolicies/*}\022\265\002\n\024CreateE" + + "ndpointPolicy\022<.google.cloud.networkserv" + + "ices.v1.CreateEndpointPolicyRequest\032\035.go" + + "ogle.longrunning.Operation\"\277\001\312AC\n\016Endpoi" + + "ntPolicy\0221google.cloud.networkservices.v" + + "1.OperationMetadata\332A)parent,endpoint_po" + + "licy,endpoint_policy_id\202\323\344\223\002G\"4/v1/{pare" + + "nt=projects/*/locations/*}/endpointPolic" + + "ies:\017endpoint_policy\022\267\002\n\024UpdateEndpointP" + + "olicy\022<.google.cloud.networkservices.v1." + + "UpdateEndpointPolicyRequest\032\035.google.lon" + + "grunning.Operation\"\301\001\312AC\n\016EndpointPolicy" + "\0221google.cloud.networkservices.v1.Operat" - + "ionMetadata\332A!parent,wasm_plugin,wasm_pl" - + "ugin_id\202\323\344\223\002>\"//v1/{parent=projects/*/lo" - + "cations/*}/wasmPlugins:\013wasm_plugin\022\232\002\n\020" - + "UpdateWasmPlugin\0228.google.cloud.networks" - + "ervices.v1.UpdateWasmPluginRequest\032\035.goo" - + "gle.longrunning.Operation\"\254\001\312A?\n\nWasmPlu" - + "gin\0221google.cloud.networkservices.v1.Ope" - + "rationMetadata\332A\027wasm_plugin,update_mask" - + "\202\323\344\223\002J2;/v1/{wasm_plugin.name=projects/*" - + "/locations/*/wasmPlugins/*}:\013wasm_plugin" - + "\022\371\001\n\020DeleteWasmPlugin\0228.google.cloud.net" - + "workservices.v1.DeleteWasmPluginRequest\032" - + "\035.google.longrunning.Operation\"\213\001\312AJ\n\025go" - + "ogle.protobuf.Empty\0221google.cloud.networ" - + "kservices.v1.OperationMetadata\332A\004name\202\323\344" - + "\223\0021*//v1/{name=projects/*/locations/*/wa" - + "smPlugins/*}\022\272\001\n\014ListGateways\0224.google.c" - + "loud.networkservices.v1.ListGatewaysRequ" - + "est\0325.google.cloud.networkservices.v1.Li" - + "stGatewaysResponse\"=\332A\006parent\202\323\344\223\002.\022,/v1" - + "/{parent=projects/*/locations/*}/gateway" - + "s\022\247\001\n\nGetGateway\0222.google.cloud.networks" - + "ervices.v1.GetGatewayRequest\032(.google.cl" - + "oud.networkservices.v1.Gateway\";\332A\004name\202" - + "\323\344\223\002.\022,/v1/{name=projects/*/locations/*/" - + "gateways/*}\022\200\002\n\rCreateGateway\0225.google.c" - + "loud.networkservices.v1.CreateGatewayReq" - + "uest\032\035.google.longrunning.Operation\"\230\001\312A" - + "<\n\007Gateway\0221google.cloud.networkservices" - + ".v1.OperationMetadata\332A\031parent,gateway,g" - + "ateway_id\202\323\344\223\0027\",/v1/{parent=projects/*/" - + "locations/*}/gateways:\007gateway\022\202\002\n\rUpdat" - + "eGateway\0225.google.cloud.networkservices." - + "v1.UpdateGatewayRequest\032\035.google.longrun" - + "ning.Operation\"\232\001\312A<\n\007Gateway\0221google.cl" - + "oud.networkservices.v1.OperationMetadata" - + "\332A\023gateway,update_mask\202\323\344\223\002?24/v1/{gatew" - + "ay.name=projects/*/locations/*/gateways/" - + "*}:\007gateway\022\360\001\n\rDeleteGateway\0225.google.c" - + "loud.networkservices.v1.DeleteGatewayReq" - + "uest\032\035.google.longrunning.Operation\"\210\001\312A" - + "J\n\025google.protobuf.Empty\0221google.cloud.n" - + "etworkservices.v1.OperationMetadata\332A\004na" - + "me\202\323\344\223\002.*,/v1/{name=projects/*/locations" - + "/*/gateways/*}\022\302\001\n\016ListGrpcRoutes\0226.goog" - + "le.cloud.networkservices.v1.ListGrpcRout" - + "esRequest\0327.google.cloud.networkservices" - + ".v1.ListGrpcRoutesResponse\"?\332A\006parent\202\323\344" - + "\223\0020\022./v1/{parent=projects/*/locations/*}" - + "/grpcRoutes\022\257\001\n\014GetGrpcRoute\0224.google.cl" - + "oud.networkservices.v1.GetGrpcRouteReque" - + "st\032*.google.cloud.networkservices.v1.Grp" - + "cRoute\"=\332A\004name\202\323\344\223\0020\022./v1/{name=project" - + "s/*/locations/*/grpcRoutes/*}\022\221\002\n\017Create" - + "GrpcRoute\0227.google.cloud.networkservices" - + ".v1.CreateGrpcRouteRequest\032\035.google.long" - + "running.Operation\"\245\001\312A>\n\tGrpcRoute\0221goog" - + "le.cloud.networkservices.v1.OperationMet" - + "adata\332A\037parent,grpc_route,grpc_route_id\202" - + "\323\344\223\002<\"./v1/{parent=projects/*/locations/" - + "*}/grpcRoutes:\ngrpc_route\022\223\002\n\017UpdateGrpc" - + "Route\0227.google.cloud.networkservices.v1." - + "UpdateGrpcRouteRequest\032\035.google.longrunn" - + "ing.Operation\"\247\001\312A>\n\tGrpcRoute\0221google.c" - + "loud.networkservices.v1.OperationMetadat" - + "a\332A\026grpc_route,update_mask\202\323\344\223\002G29/v1/{g" - + "rpc_route.name=projects/*/locations/*/gr" - + "pcRoutes/*}:\ngrpc_route\022\366\001\n\017DeleteGrpcRo" - + "ute\0227.google.cloud.networkservices.v1.De" - + "leteGrpcRouteRequest\032\035.google.longrunnin" - + "g.Operation\"\212\001\312AJ\n\025google.protobuf.Empty" - + "\0221google.cloud.networkservices.v1.Operat" - + "ionMetadata\332A\004name\202\323\344\223\0020*./v1/{name=proj" - + "ects/*/locations/*/grpcRoutes/*}\022\302\001\n\016Lis" - + "tHttpRoutes\0226.google.cloud.networkservic" - + "es.v1.ListHttpRoutesRequest\0327.google.clo" - + "ud.networkservices.v1.ListHttpRoutesResp" - + "onse\"?\332A\006parent\202\323\344\223\0020\022./v1/{parent=proje" - + "cts/*/locations/*}/httpRoutes\022\257\001\n\014GetHtt" - + "pRoute\0224.google.cloud.networkservices.v1" - + ".GetHttpRouteRequest\032*.google.cloud.netw" - + "orkservices.v1.HttpRoute\"=\332A\004name\202\323\344\223\0020\022" - + "./v1/{name=projects/*/locations/*/httpRo" - + "utes/*}\022\221\002\n\017CreateHttpRoute\0227.google.clo" - + "ud.networkservices.v1.CreateHttpRouteReq" - + "uest\032\035.google.longrunning.Operation\"\245\001\312A" - + ">\n\tHttpRoute\0221google.cloud.networkservic" - + "es.v1.OperationMetadata\332A\037parent,http_ro" - + "ute,http_route_id\202\323\344\223\002<\"./v1/{parent=pro" - + "jects/*/locations/*}/httpRoutes:\nhttp_ro" - + "ute\022\223\002\n\017UpdateHttpRoute\0227.google.cloud.n" - + "etworkservices.v1.UpdateHttpRouteRequest" - + "\032\035.google.longrunning.Operation\"\247\001\312A>\n\tH" - + "ttpRoute\0221google.cloud.networkservices.v" - + "1.OperationMetadata\332A\026http_route,update_" - + "mask\202\323\344\223\002G29/v1/{http_route.name=project" - + "s/*/locations/*/httpRoutes/*}:\nhttp_rout" - + "e\022\366\001\n\017DeleteHttpRoute\0227.google.cloud.net" - + "workservices.v1.DeleteHttpRouteRequest\032\035" - + ".google.longrunning.Operation\"\212\001\312AJ\n\025goo" + + "ionMetadata\332A\033endpoint_policy,update_mas" + + "k\202\323\344\223\002W2D/v1/{endpoint_policy.name=proje" + + "cts/*/locations/*/endpointPolicies/*}:\017e" + + "ndpoint_policy\022\206\002\n\024DeleteEndpointPolicy\022" + + "<.google.cloud.networkservices.v1.Delete" + + "EndpointPolicyRequest\032\035.google.longrunni" + + "ng.Operation\"\220\001\312AJ\n\025google.protobuf.Empt" + + "y\0221google.cloud.networkservices.v1.Opera" + + "tionMetadata\332A\004name\202\323\344\223\0026*4/v1/{name=pro" + + "jects/*/locations/*/endpointPolicies/*}\022" + + "\346\001\n\026ListWasmPluginVersions\022>.google.clou" + + "d.networkservices.v1.ListWasmPluginVersi" + + "onsRequest\032?.google.cloud.networkservice" + + "s.v1.ListWasmPluginVersionsResponse\"K\332A\006" + + "parent\202\323\344\223\002<\022:/v1/{parent=projects/*/loc" + + "ations/*/wasmPlugins/*}/versions\022\323\001\n\024Get" + + "WasmPluginVersion\022<.google.cloud.network" + + "services.v1.GetWasmPluginVersionRequest\032" + + "2.google.cloud.networkservices.v1.WasmPl" + + "uginVersion\"I\332A\004name\202\323\344\223\002<\022:/v1/{name=pr" + + "ojects/*/locations/*/wasmPlugins/*/versi" + + "ons/*}\022\320\002\n\027CreateWasmPluginVersion\022?.goo" + + "gle.cloud.networkservices.v1.CreateWasmP" + + "luginVersionRequest\032\035.google.longrunning" + + ".Operation\"\324\001\312AF\n\021WasmPluginVersion\0221goo" + + "gle.cloud.networkservices.v1.OperationMe" + + "tadata\332A1parent,wasm_plugin_version,wasm" + + "_plugin_version_id\202\323\344\223\002Q\":/v1/{parent=pr" + + "ojects/*/locations/*/wasmPlugins/*}/vers" + + "ions:\023wasm_plugin_version\022\222\002\n\027DeleteWasm" + + "PluginVersion\022?.google.cloud.networkserv" + + "ices.v1.DeleteWasmPluginVersionRequest\032\035" + + ".google.longrunning.Operation\"\226\001\312AJ\n\025goo" + "gle.protobuf.Empty\0221google.cloud.network" + "services.v1.OperationMetadata\332A\004name\202\323\344\223" - + "\0020*./v1/{name=projects/*/locations/*/htt" - + "pRoutes/*}\022\276\001\n\rListTcpRoutes\0225.google.cl" - + "oud.networkservices.v1.ListTcpRoutesRequ" - + "est\0326.google.cloud.networkservices.v1.Li" - + "stTcpRoutesResponse\">\332A\006parent\202\323\344\223\002/\022-/v" - + "1/{parent=projects/*/locations/*}/tcpRou" - + "tes\022\253\001\n\013GetTcpRoute\0223.google.cloud.netwo" - + "rkservices.v1.GetTcpRouteRequest\032).googl" - + "e.cloud.networkservices.v1.TcpRoute\"<\332A\004" - + "name\202\323\344\223\002/\022-/v1/{name=projects/*/locatio" - + "ns/*/tcpRoutes/*}\022\212\002\n\016CreateTcpRoute\0226.g" - + "oogle.cloud.networkservices.v1.CreateTcp" - + "RouteRequest\032\035.google.longrunning.Operat" - + "ion\"\240\001\312A=\n\010TcpRoute\0221google.cloud.networ" - + "kservices.v1.OperationMetadata\332A\035parent," - + "tcp_route,tcp_route_id\202\323\344\223\002:\"-/v1/{paren" - + "t=projects/*/locations/*}/tcpRoutes:\ttcp" - + "_route\022\214\002\n\016UpdateTcpRoute\0226.google.cloud" - + ".networkservices.v1.UpdateTcpRouteReques" - + "t\032\035.google.longrunning.Operation\"\242\001\312A=\n\010" - + "TcpRoute\0221google.cloud.networkservices.v" - + "1.OperationMetadata\332A\025tcp_route,update_m" - + "ask\202\323\344\223\002D27/v1/{tcp_route.name=projects/" - + "*/locations/*/tcpRoutes/*}:\ttcp_route\022\363\001" - + "\n\016DeleteTcpRoute\0226.google.cloud.networks" - + "ervices.v1.DeleteTcpRouteRequest\032\035.googl" - + "e.longrunning.Operation\"\211\001\312AJ\n\025google.pr" - + "otobuf.Empty\0221google.cloud.networkservic" - + "es.v1.OperationMetadata\332A\004name\202\323\344\223\002/*-/v" - + "1/{name=projects/*/locations/*/tcpRoutes" - + "/*}\022\276\001\n\rListTlsRoutes\0225.google.cloud.net" - + "workservices.v1.ListTlsRoutesRequest\0326.g" - + "oogle.cloud.networkservices.v1.ListTlsRo" - + "utesResponse\">\332A\006parent\202\323\344\223\002/\022-/v1/{pare" - + "nt=projects/*/locations/*}/tlsRoutes\022\253\001\n" - + "\013GetTlsRoute\0223.google.cloud.networkservi" - + "ces.v1.GetTlsRouteRequest\032).google.cloud" - + ".networkservices.v1.TlsRoute\"<\332A\004name\202\323\344" - + "\223\002/\022-/v1/{name=projects/*/locations/*/tl" - + "sRoutes/*}\022\212\002\n\016CreateTlsRoute\0226.google.c" - + "loud.networkservices.v1.CreateTlsRouteRe" - + "quest\032\035.google.longrunning.Operation\"\240\001\312" - + "A=\n\010TlsRoute\0221google.cloud.networkservic" - + "es.v1.OperationMetadata\332A\035parent,tls_rou" - + "te,tls_route_id\202\323\344\223\002:\"-/v1/{parent=proje" - + "cts/*/locations/*}/tlsRoutes:\ttls_route\022" - + "\214\002\n\016UpdateTlsRoute\0226.google.cloud.networ" - + "kservices.v1.UpdateTlsRouteRequest\032\035.goo" - + "gle.longrunning.Operation\"\242\001\312A=\n\010TlsRout" - + "e\0221google.cloud.networkservices.v1.Opera" - + "tionMetadata\332A\025tls_route,update_mask\202\323\344\223" - + "\002D27/v1/{tls_route.name=projects/*/locat" - + "ions/*/tlsRoutes/*}:\ttls_route\022\363\001\n\016Delet" - + "eTlsRoute\0226.google.cloud.networkservices" - + ".v1.DeleteTlsRouteRequest\032\035.google.longr" - + "unning.Operation\"\211\001\312AJ\n\025google.protobuf." - + "Empty\0221google.cloud.networkservices.v1.O" - + "perationMetadata\332A\004name\202\323\344\223\002/*-/v1/{name" - + "=projects/*/locations/*/tlsRoutes/*}\022\326\001\n" - + "\023ListServiceBindings\022;.google.cloud.netw" - + "orkservices.v1.ListServiceBindingsReques" - + "t\032<.google.cloud.networkservices.v1.List" - + "ServiceBindingsResponse\"D\332A\006parent\202\323\344\223\0025" - + "\0223/v1/{parent=projects/*/locations/*}/se" - + "rviceBindings\022\303\001\n\021GetServiceBinding\0229.go" - + "ogle.cloud.networkservices.v1.GetService" - + "BindingRequest\032/.google.cloud.networkser" - + "vices.v1.ServiceBinding\"B\332A\004name\202\323\344\223\0025\0223" - + "/v1/{name=projects/*/locations/*/service" - + "Bindings/*}\022\264\002\n\024CreateServiceBinding\022<.g" - + "oogle.cloud.networkservices.v1.CreateSer" - + "viceBindingRequest\032\035.google.longrunning." - + "Operation\"\276\001\312AC\n\016ServiceBinding\0221google." + + "\002<*:/v1/{name=projects/*/locations/*/was" + + "mPlugins/*/versions/*}\022\306\001\n\017ListWasmPlugi" + + "ns\0227.google.cloud.networkservices.v1.Lis" + + "tWasmPluginsRequest\0328.google.cloud.netwo" + + "rkservices.v1.ListWasmPluginsResponse\"@\332" + + "A\006parent\202\323\344\223\0021\022//v1/{parent=projects/*/l" + + "ocations/*}/wasmPlugins\022\263\001\n\rGetWasmPlugi" + + "n\0225.google.cloud.networkservices.v1.GetW" + + "asmPluginRequest\032+.google.cloud.networks" + + "ervices.v1.WasmPlugin\">\332A\004name\202\323\344\223\0021\022//v" + + "1/{name=projects/*/locations/*/wasmPlugi" + + "ns/*}\022\230\002\n\020CreateWasmPlugin\0228.google.clou" + + "d.networkservices.v1.CreateWasmPluginReq" + + "uest\032\035.google.longrunning.Operation\"\252\001\312A" + + "?\n\nWasmPlugin\0221google.cloud.networkservi" + + "ces.v1.OperationMetadata\332A!parent,wasm_p" + + "lugin,wasm_plugin_id\202\323\344\223\002>\"//v1/{parent=" + + "projects/*/locations/*}/wasmPlugins:\013was" + + "m_plugin\022\232\002\n\020UpdateWasmPlugin\0228.google.c" + + "loud.networkservices.v1.UpdateWasmPlugin" + + "Request\032\035.google.longrunning.Operation\"\254" + + "\001\312A?\n\nWasmPlugin\0221google.cloud.networkse" + + "rvices.v1.OperationMetadata\332A\027wasm_plugi" + + "n,update_mask\202\323\344\223\002J2;/v1/{wasm_plugin.na" + + "me=projects/*/locations/*/wasmPlugins/*}" + + ":\013wasm_plugin\022\371\001\n\020DeleteWasmPlugin\0228.goo" + + "gle.cloud.networkservices.v1.DeleteWasmP" + + "luginRequest\032\035.google.longrunning.Operat" + + "ion\"\213\001\312AJ\n\025google.protobuf.Empty\0221google" + + ".cloud.networkservices.v1.OperationMetad" + + "ata\332A\004name\202\323\344\223\0021*//v1/{name=projects/*/l" + + "ocations/*/wasmPlugins/*}\022\272\001\n\014ListGatewa" + + "ys\0224.google.cloud.networkservices.v1.Lis" + + "tGatewaysRequest\0325.google.cloud.networks" + + "ervices.v1.ListGatewaysResponse\"=\332A\006pare" + + "nt\202\323\344\223\002.\022,/v1/{parent=projects/*/locatio" + + "ns/*}/gateways\022\247\001\n\nGetGateway\0222.google.c" + + "loud.networkservices.v1.GetGatewayReques" + + "t\032(.google.cloud.networkservices.v1.Gate" + + "way\";\332A\004name\202\323\344\223\002.\022,/v1/{name=projects/*" + + "/locations/*/gateways/*}\022\200\002\n\rCreateGatew" + + "ay\0225.google.cloud.networkservices.v1.Cre" + + "ateGatewayRequest\032\035.google.longrunning.O" + + "peration\"\230\001\312A<\n\007Gateway\0221google.cloud.ne" + + "tworkservices.v1.OperationMetadata\332A\031par" + + "ent,gateway,gateway_id\202\323\344\223\0027\",/v1/{paren" + + "t=projects/*/locations/*}/gateways:\007gate" + + "way\022\202\002\n\rUpdateGateway\0225.google.cloud.net" + + "workservices.v1.UpdateGatewayRequest\032\035.g" + + "oogle.longrunning.Operation\"\232\001\312A<\n\007Gatew" + + "ay\0221google.cloud.networkservices.v1.Oper" + + "ationMetadata\332A\023gateway,update_mask\202\323\344\223\002" + + "?24/v1/{gateway.name=projects/*/location" + + "s/*/gateways/*}:\007gateway\022\360\001\n\rDeleteGatew" + + "ay\0225.google.cloud.networkservices.v1.Del" + + "eteGatewayRequest\032\035.google.longrunning.O" + + "peration\"\210\001\312AJ\n\025google.protobuf.Empty\0221g" + + "oogle.cloud.networkservices.v1.Operation" + + "Metadata\332A\004name\202\323\344\223\002.*,/v1/{name=project" + + "s/*/locations/*/gateways/*}\022\302\001\n\016ListGrpc" + + "Routes\0226.google.cloud.networkservices.v1" + + ".ListGrpcRoutesRequest\0327.google.cloud.ne" + + "tworkservices.v1.ListGrpcRoutesResponse\"" + + "?\332A\006parent\202\323\344\223\0020\022./v1/{parent=projects/*" + + "/locations/*}/grpcRoutes\022\257\001\n\014GetGrpcRout" + + "e\0224.google.cloud.networkservices.v1.GetG" + + "rpcRouteRequest\032*.google.cloud.networkse" + + "rvices.v1.GrpcRoute\"=\332A\004name\202\323\344\223\0020\022./v1/" + + "{name=projects/*/locations/*/grpcRoutes/" + + "*}\022\221\002\n\017CreateGrpcRoute\0227.google.cloud.ne" + + "tworkservices.v1.CreateGrpcRouteRequest\032" + + "\035.google.longrunning.Operation\"\245\001\312A>\n\tGr" + + "pcRoute\0221google.cloud.networkservices.v1" + + ".OperationMetadata\332A\037parent,grpc_route,g" + + "rpc_route_id\202\323\344\223\002<\"./v1/{parent=projects" + + "/*/locations/*}/grpcRoutes:\ngrpc_route\022\223" + + "\002\n\017UpdateGrpcRoute\0227.google.cloud.networ" + + "kservices.v1.UpdateGrpcRouteRequest\032\035.go" + + "ogle.longrunning.Operation\"\247\001\312A>\n\tGrpcRo" + + "ute\0221google.cloud.networkservices.v1.Ope" + + "rationMetadata\332A\026grpc_route,update_mask\202" + + "\323\344\223\002G29/v1/{grpc_route.name=projects/*/l" + + "ocations/*/grpcRoutes/*}:\ngrpc_route\022\366\001\n" + + "\017DeleteGrpcRoute\0227.google.cloud.networks" + + "ervices.v1.DeleteGrpcRouteRequest\032\035.goog" + + "le.longrunning.Operation\"\212\001\312AJ\n\025google.p" + + "rotobuf.Empty\0221google.cloud.networkservi" + + "ces.v1.OperationMetadata\332A\004name\202\323\344\223\0020*./" + + "v1/{name=projects/*/locations/*/grpcRout" + + "es/*}\022\302\001\n\016ListHttpRoutes\0226.google.cloud." + + "networkservices.v1.ListHttpRoutesRequest" + + "\0327.google.cloud.networkservices.v1.ListH" + + "ttpRoutesResponse\"?\332A\006parent\202\323\344\223\0020\022./v1/" + + "{parent=projects/*/locations/*}/httpRout" + + "es\022\257\001\n\014GetHttpRoute\0224.google.cloud.netwo" + + "rkservices.v1.GetHttpRouteRequest\032*.goog" + + "le.cloud.networkservices.v1.HttpRoute\"=\332" + + "A\004name\202\323\344\223\0020\022./v1/{name=projects/*/locat" + + "ions/*/httpRoutes/*}\022\221\002\n\017CreateHttpRoute" + + "\0227.google.cloud.networkservices.v1.Creat" + + "eHttpRouteRequest\032\035.google.longrunning.O" + + "peration\"\245\001\312A>\n\tHttpRoute\0221google.cloud." + + "networkservices.v1.OperationMetadata\332A\037p" + + "arent,http_route,http_route_id\202\323\344\223\002<\"./v" + + "1/{parent=projects/*/locations/*}/httpRo" + + "utes:\nhttp_route\022\223\002\n\017UpdateHttpRoute\0227.g" + + "oogle.cloud.networkservices.v1.UpdateHtt" + + "pRouteRequest\032\035.google.longrunning.Opera" + + "tion\"\247\001\312A>\n\tHttpRoute\0221google.cloud.netw" + + "orkservices.v1.OperationMetadata\332A\026http_" + + "route,update_mask\202\323\344\223\002G29/v1/{http_route" + + ".name=projects/*/locations/*/httpRoutes/" + + "*}:\nhttp_route\022\366\001\n\017DeleteHttpRoute\0227.goo" + + "gle.cloud.networkservices.v1.DeleteHttpR" + + "outeRequest\032\035.google.longrunning.Operati" + + "on\"\212\001\312AJ\n\025google.protobuf.Empty\0221google." + "cloud.networkservices.v1.OperationMetada" - + "ta\332A)parent,service_binding,service_bind" - + "ing_id\202\323\344\223\002F\"3/v1/{parent=projects/*/loc" - + "ations/*}/serviceBindings:\017service_bindi" - + "ng\022\266\002\n\024UpdateServiceBinding\022<.google.clo" - + "ud.networkservices.v1.UpdateServiceBindi" - + "ngRequest\032\035.google.longrunning.Operation" - + "\"\300\001\312AC\n\016ServiceBinding\0221google.cloud.net" - + "workservices.v1.OperationMetadata\332A\033serv" - + "ice_binding,update_mask\202\323\344\223\002V2C/v1/{serv" - + "ice_binding.name=projects/*/locations/*/" - + "serviceBindings/*}:\017service_binding\022\205\002\n\024" - + "DeleteServiceBinding\022<.google.cloud.netw" - + "orkservices.v1.DeleteServiceBindingReque" - + "st\032\035.google.longrunning.Operation\"\217\001\312AJ\n" - + "\025google.protobuf.Empty\0221google.cloud.net" - + "workservices.v1.OperationMetadata\332A\004name" - + "\202\323\344\223\0025*3/v1/{name=projects/*/locations/*" - + "/serviceBindings/*}\022\262\001\n\nListMeshes\0222.goo" - + "gle.cloud.networkservices.v1.ListMeshesR" - + "equest\0323.google.cloud.networkservices.v1" - + ".ListMeshesResponse\";\332A\006parent\202\323\344\223\002,\022*/v" - + "1/{parent=projects/*/locations/*}/meshes" - + "\022\234\001\n\007GetMesh\022/.google.cloud.networkservi" - + "ces.v1.GetMeshRequest\032%.google.cloud.net" - + "workservices.v1.Mesh\"9\332A\004name\202\323\344\223\002,\022*/v1" - + "/{name=projects/*/locations/*/meshes/*}\022" - + "\354\001\n\nCreateMesh\0222.google.cloud.networkser" - + "vices.v1.CreateMeshRequest\032\035.google.long" - + "running.Operation\"\212\001\312A9\n\004Mesh\0221google.cl" - + "oud.networkservices.v1.OperationMetadata" - + "\332A\023parent,mesh,mesh_id\202\323\344\223\0022\"*/v1/{paren" - + "t=projects/*/locations/*}/meshes:\004mesh\022\356" - + "\001\n\nUpdateMesh\0222.google.cloud.networkserv" - + "ices.v1.UpdateMeshRequest\032\035.google.longr" - + "unning.Operation\"\214\001\312A9\n\004Mesh\0221google.clo" - + "ud.networkservices.v1.OperationMetadata\332" - + "A\020mesh,update_mask\202\323\344\223\00272//v1/{mesh.name" - + "=projects/*/locations/*/meshes/*}:\004mesh\022" - + "\350\001\n\nDeleteMesh\0222.google.cloud.networkser" - + "vices.v1.DeleteMeshRequest\032\035.google.long" - + "running.Operation\"\206\001\312AJ\n\025google.protobuf" - + ".Empty\0221google.cloud.networkservices.v1." - + "OperationMetadata\332A\004name\202\323\344\223\002,**/v1/{nam" - + "e=projects/*/locations/*/meshes/*}\022\336\001\n\025L" - + "istServiceLbPolicies\022=.google.cloud.netw" - + "orkservices.v1.ListServiceLbPoliciesRequ" - + "est\032>.google.cloud.networkservices.v1.Li" - + "stServiceLbPoliciesResponse\"F\332A\006parent\202\323" - + "\344\223\0027\0225/v1/{parent=projects/*/locations/*" - + "}/serviceLbPolicies\022\310\001\n\022GetServiceLbPoli" - + "cy\022:.google.cloud.networkservices.v1.Get" - + "ServiceLbPolicyRequest\0320.google.cloud.ne" - + "tworkservices.v1.ServiceLbPolicy\"D\332A\004nam" - + "e\202\323\344\223\0027\0225/v1/{name=projects/*/locations/" - + "*/serviceLbPolicies/*}\022\277\002\n\025CreateService" - + "LbPolicy\022=.google.cloud.networkservices." - + "v1.CreateServiceLbPolicyRequest\032\035.google" - + ".longrunning.Operation\"\307\001\312AD\n\017ServiceLbP" - + "olicy\0221google.cloud.networkservices.v1.O" - + "perationMetadata\332A-parent,service_lb_pol" - + "icy,service_lb_policy_id\202\323\344\223\002J\"5/v1/{par" - + "ent=projects/*/locations/*}/serviceLbPol" - + "icies:\021service_lb_policy\022\301\002\n\025UpdateServi" - + "ceLbPolicy\022=.google.cloud.networkservice" - + "s.v1.UpdateServiceLbPolicyRequest\032\035.goog" - + "le.longrunning.Operation\"\311\001\312AD\n\017ServiceL" - + "bPolicy\0221google.cloud.networkservices.v1" - + ".OperationMetadata\332A\035service_lb_policy,u" - + "pdate_mask\202\323\344\223\002\\2G/v1/{service_lb_policy" - + ".name=projects/*/locations/*/serviceLbPo" - + "licies/*}:\021service_lb_policy\022\211\002\n\025DeleteS" - + "erviceLbPolicy\022=.google.cloud.networkser" - + "vices.v1.DeleteServiceLbPolicyRequest\032\035." - + "google.longrunning.Operation\"\221\001\312AJ\n\025goog" - + "le.protobuf.Empty\0221google.cloud.networks" - + "ervices.v1.OperationMetadata\332A\004name\202\323\344\223\002" - + "7*5/v1/{name=projects/*/locations/*/serv" - + "iceLbPolicies/*}\022\317\001\n\023GetGatewayRouteView" - + "\022;.google.cloud.networkservices.v1.GetGa" - + "tewayRouteViewRequest\0321.google.cloud.net" - + "workservices.v1.GatewayRouteView\"H\332A\004nam" - + "e\202\323\344\223\002;\0229/v1/{name=projects/*/locations/" - + "*/gateways/*/routeViews/*}\022\304\001\n\020GetMeshRo" - + "uteView\0228.google.cloud.networkservices.v" - + "1.GetMeshRouteViewRequest\032..google.cloud" - + ".networkservices.v1.MeshRouteView\"F\332A\004na" - + "me\202\323\344\223\0029\0227/v1/{name=projects/*/locations" - + "/*/meshes/*/routeViews/*}\022\342\001\n\025ListGatewa" - + "yRouteViews\022=.google.cloud.networkservic" - + "es.v1.ListGatewayRouteViewsRequest\032>.goo" - + "gle.cloud.networkservices.v1.ListGateway" - + "RouteViewsResponse\"J\332A\006parent\202\323\344\223\002;\0229/v1" - + "/{parent=projects/*/locations/*/gateways" - + "/*}/routeViews\022\327\001\n\022ListMeshRouteViews\022:." - + "google.cloud.networkservices.v1.ListMesh" - + "RouteViewsRequest\032;.google.cloud.network" - + "services.v1.ListMeshRouteViewsResponse\"H" - + "\332A\006parent\202\323\344\223\0029\0227/v1/{parent=projects/*/" - + "locations/*/meshes/*}/routeViews\032R\312A\036net" - + "workservices.googleapis.com\322A.https://ww" - + "w.googleapis.com/auth/cloud-platformB\337\001\n" - + "#com.google.cloud.networkservices.v1P\001ZM" - + "cloud.google.com/go/networkservices/apiv" - + "1/networkservicespb;networkservicespb\252\002\037" - + "Google.Cloud.NetworkServices.V1\312\002\037Google" - + "\\Cloud\\NetworkServices\\V1\352\002\"Google::Clou" - + "d::NetworkServices::V1b\006proto3" + + "ta\332A\004name\202\323\344\223\0020*./v1/{name=projects/*/lo" + + "cations/*/httpRoutes/*}\022\276\001\n\rListTcpRoute" + + "s\0225.google.cloud.networkservices.v1.List" + + "TcpRoutesRequest\0326.google.cloud.networks" + + "ervices.v1.ListTcpRoutesResponse\">\332A\006par" + + "ent\202\323\344\223\002/\022-/v1/{parent=projects/*/locati" + + "ons/*}/tcpRoutes\022\253\001\n\013GetTcpRoute\0223.googl" + + "e.cloud.networkservices.v1.GetTcpRouteRe" + + "quest\032).google.cloud.networkservices.v1." + + "TcpRoute\"<\332A\004name\202\323\344\223\002/\022-/v1/{name=proje" + + "cts/*/locations/*/tcpRoutes/*}\022\212\002\n\016Creat" + + "eTcpRoute\0226.google.cloud.networkservices" + + ".v1.CreateTcpRouteRequest\032\035.google.longr" + + "unning.Operation\"\240\001\312A=\n\010TcpRoute\0221google" + + ".cloud.networkservices.v1.OperationMetad" + + "ata\332A\035parent,tcp_route,tcp_route_id\202\323\344\223\002" + + ":\"-/v1/{parent=projects/*/locations/*}/t" + + "cpRoutes:\ttcp_route\022\214\002\n\016UpdateTcpRoute\0226" + + ".google.cloud.networkservices.v1.UpdateT" + + "cpRouteRequest\032\035.google.longrunning.Oper" + + "ation\"\242\001\312A=\n\010TcpRoute\0221google.cloud.netw" + + "orkservices.v1.OperationMetadata\332A\025tcp_r" + + "oute,update_mask\202\323\344\223\002D27/v1/{tcp_route.n" + + "ame=projects/*/locations/*/tcpRoutes/*}:" + + "\ttcp_route\022\363\001\n\016DeleteTcpRoute\0226.google.c" + + "loud.networkservices.v1.DeleteTcpRouteRe" + + "quest\032\035.google.longrunning.Operation\"\211\001\312" + + "AJ\n\025google.protobuf.Empty\0221google.cloud." + + "networkservices.v1.OperationMetadata\332A\004n" + + "ame\202\323\344\223\002/*-/v1/{name=projects/*/location" + + "s/*/tcpRoutes/*}\022\276\001\n\rListTlsRoutes\0225.goo" + + "gle.cloud.networkservices.v1.ListTlsRout" + + "esRequest\0326.google.cloud.networkservices" + + ".v1.ListTlsRoutesResponse\">\332A\006parent\202\323\344\223" + + "\002/\022-/v1/{parent=projects/*/locations/*}/" + + "tlsRoutes\022\253\001\n\013GetTlsRoute\0223.google.cloud" + + ".networkservices.v1.GetTlsRouteRequest\032)" + + ".google.cloud.networkservices.v1.TlsRout" + + "e\"<\332A\004name\202\323\344\223\002/\022-/v1/{name=projects/*/l" + + "ocations/*/tlsRoutes/*}\022\212\002\n\016CreateTlsRou" + + "te\0226.google.cloud.networkservices.v1.Cre" + + "ateTlsRouteRequest\032\035.google.longrunning." + + "Operation\"\240\001\312A=\n\010TlsRoute\0221google.cloud." + + "networkservices.v1.OperationMetadata\332A\035p" + + "arent,tls_route,tls_route_id\202\323\344\223\002:\"-/v1/" + + "{parent=projects/*/locations/*}/tlsRoute" + + "s:\ttls_route\022\214\002\n\016UpdateTlsRoute\0226.google" + + ".cloud.networkservices.v1.UpdateTlsRoute" + + "Request\032\035.google.longrunning.Operation\"\242" + + "\001\312A=\n\010TlsRoute\0221google.cloud.networkserv" + + "ices.v1.OperationMetadata\332A\025tls_route,up" + + "date_mask\202\323\344\223\002D27/v1/{tls_route.name=pro" + + "jects/*/locations/*/tlsRoutes/*}:\ttls_ro" + + "ute\022\363\001\n\016DeleteTlsRoute\0226.google.cloud.ne" + + "tworkservices.v1.DeleteTlsRouteRequest\032\035" + + ".google.longrunning.Operation\"\211\001\312AJ\n\025goo" + + "gle.protobuf.Empty\0221google.cloud.network" + + "services.v1.OperationMetadata\332A\004name\202\323\344\223" + + "\002/*-/v1/{name=projects/*/locations/*/tls" + + "Routes/*}\022\326\001\n\023ListServiceBindings\022;.goog" + + "le.cloud.networkservices.v1.ListServiceB" + + "indingsRequest\032<.google.cloud.networkser" + + "vices.v1.ListServiceBindingsResponse\"D\332A" + + "\006parent\202\323\344\223\0025\0223/v1/{parent=projects/*/lo" + + "cations/*}/serviceBindings\022\303\001\n\021GetServic" + + "eBinding\0229.google.cloud.networkservices." + + "v1.GetServiceBindingRequest\032/.google.clo" + + "ud.networkservices.v1.ServiceBinding\"B\332A" + + "\004name\202\323\344\223\0025\0223/v1/{name=projects/*/locati" + + "ons/*/serviceBindings/*}\022\264\002\n\024CreateServi" + + "ceBinding\022<.google.cloud.networkservices" + + ".v1.CreateServiceBindingRequest\032\035.google" + + ".longrunning.Operation\"\276\001\312AC\n\016ServiceBin" + + "ding\0221google.cloud.networkservices.v1.Op" + + "erationMetadata\332A)parent,service_binding" + + ",service_binding_id\202\323\344\223\002F\"3/v1/{parent=p" + + "rojects/*/locations/*}/serviceBindings:\017" + + "service_binding\022\266\002\n\024UpdateServiceBinding" + + "\022<.google.cloud.networkservices.v1.Updat" + + "eServiceBindingRequest\032\035.google.longrunn" + + "ing.Operation\"\300\001\312AC\n\016ServiceBinding\0221goo" + + "gle.cloud.networkservices.v1.OperationMe" + + "tadata\332A\033service_binding,update_mask\202\323\344\223" + + "\002V2C/v1/{service_binding.name=projects/*" + + "/locations/*/serviceBindings/*}:\017service" + + "_binding\022\205\002\n\024DeleteServiceBinding\022<.goog" + + "le.cloud.networkservices.v1.DeleteServic" + + "eBindingRequest\032\035.google.longrunning.Ope" + + "ration\"\217\001\312AJ\n\025google.protobuf.Empty\0221goo" + + "gle.cloud.networkservices.v1.OperationMe" + + "tadata\332A\004name\202\323\344\223\0025*3/v1/{name=projects/" + + "*/locations/*/serviceBindings/*}\022\262\001\n\nLis" + + "tMeshes\0222.google.cloud.networkservices.v" + + "1.ListMeshesRequest\0323.google.cloud.netwo" + + "rkservices.v1.ListMeshesResponse\";\332A\006par" + + "ent\202\323\344\223\002,\022*/v1/{parent=projects/*/locati" + + "ons/*}/meshes\022\234\001\n\007GetMesh\022/.google.cloud" + + ".networkservices.v1.GetMeshRequest\032%.goo" + + "gle.cloud.networkservices.v1.Mesh\"9\332A\004na" + + "me\202\323\344\223\002,\022*/v1/{name=projects/*/locations" + + "/*/meshes/*}\022\354\001\n\nCreateMesh\0222.google.clo" + + "ud.networkservices.v1.CreateMeshRequest\032" + + "\035.google.longrunning.Operation\"\212\001\312A9\n\004Me" + + "sh\0221google.cloud.networkservices.v1.Oper" + + "ationMetadata\332A\023parent,mesh,mesh_id\202\323\344\223\002" + + "2\"*/v1/{parent=projects/*/locations/*}/m" + + "eshes:\004mesh\022\356\001\n\nUpdateMesh\0222.google.clou" + + "d.networkservices.v1.UpdateMeshRequest\032\035" + + ".google.longrunning.Operation\"\214\001\312A9\n\004Mes" + + "h\0221google.cloud.networkservices.v1.Opera" + + "tionMetadata\332A\020mesh,update_mask\202\323\344\223\00272//" + + "v1/{mesh.name=projects/*/locations/*/mes" + + "hes/*}:\004mesh\022\350\001\n\nDeleteMesh\0222.google.clo" + + "ud.networkservices.v1.DeleteMeshRequest\032" + + "\035.google.longrunning.Operation\"\206\001\312AJ\n\025go" + + "ogle.protobuf.Empty\0221google.cloud.networ" + + "kservices.v1.OperationMetadata\332A\004name\202\323\344" + + "\223\002,**/v1/{name=projects/*/locations/*/me" + + "shes/*}\022\336\001\n\025ListServiceLbPolicies\022=.goog" + + "le.cloud.networkservices.v1.ListServiceL" + + "bPoliciesRequest\032>.google.cloud.networks" + + "ervices.v1.ListServiceLbPoliciesResponse" + + "\"F\332A\006parent\202\323\344\223\0027\0225/v1/{parent=projects/" + + "*/locations/*}/serviceLbPolicies\022\310\001\n\022Get" + + "ServiceLbPolicy\022:.google.cloud.networkse" + + "rvices.v1.GetServiceLbPolicyRequest\0320.go" + + "ogle.cloud.networkservices.v1.ServiceLbP" + + "olicy\"D\332A\004name\202\323\344\223\0027\0225/v1/{name=projects" + + "/*/locations/*/serviceLbPolicies/*}\022\277\002\n\025" + + "CreateServiceLbPolicy\022=.google.cloud.net" + + "workservices.v1.CreateServiceLbPolicyReq" + + "uest\032\035.google.longrunning.Operation\"\307\001\312A" + + "D\n\017ServiceLbPolicy\0221google.cloud.network" + + "services.v1.OperationMetadata\332A-parent,s" + + "ervice_lb_policy,service_lb_policy_id\202\323\344" + + "\223\002J\"5/v1/{parent=projects/*/locations/*}" + + "/serviceLbPolicies:\021service_lb_policy\022\301\002" + + "\n\025UpdateServiceLbPolicy\022=.google.cloud.n" + + "etworkservices.v1.UpdateServiceLbPolicyR" + + "equest\032\035.google.longrunning.Operation\"\311\001" + + "\312AD\n\017ServiceLbPolicy\0221google.cloud.netwo" + + "rkservices.v1.OperationMetadata\332A\035servic" + + "e_lb_policy,update_mask\202\323\344\223\002\\2G/v1/{serv" + + "ice_lb_policy.name=projects/*/locations/" + + "*/serviceLbPolicies/*}:\021service_lb_polic" + + "y\022\211\002\n\025DeleteServiceLbPolicy\022=.google.clo" + + "ud.networkservices.v1.DeleteServiceLbPol" + + "icyRequest\032\035.google.longrunning.Operatio" + + "n\"\221\001\312AJ\n\025google.protobuf.Empty\0221google.c" + + "loud.networkservices.v1.OperationMetadat" + + "a\332A\004name\202\323\344\223\0027*5/v1/{name=projects/*/loc" + + "ations/*/serviceLbPolicies/*}\022\317\001\n\023GetGat" + + "ewayRouteView\022;.google.cloud.networkserv" + + "ices.v1.GetGatewayRouteViewRequest\0321.goo" + + "gle.cloud.networkservices.v1.GatewayRout" + + "eView\"H\332A\004name\202\323\344\223\002;\0229/v1/{name=projects" + + "/*/locations/*/gateways/*/routeViews/*}\022" + + "\304\001\n\020GetMeshRouteView\0228.google.cloud.netw" + + "orkservices.v1.GetMeshRouteViewRequest\032." + + ".google.cloud.networkservices.v1.MeshRou" + + "teView\"F\332A\004name\202\323\344\223\0029\0227/v1/{name=project" + + "s/*/locations/*/meshes/*/routeViews/*}\022\342" + + "\001\n\025ListGatewayRouteViews\022=.google.cloud." + + "networkservices.v1.ListGatewayRouteViews" + + "Request\032>.google.cloud.networkservices.v" + + "1.ListGatewayRouteViewsResponse\"J\332A\006pare" + + "nt\202\323\344\223\002;\0229/v1/{parent=projects/*/locatio" + + "ns/*/gateways/*}/routeViews\022\327\001\n\022ListMesh" + + "RouteViews\022:.google.cloud.networkservice" + + "s.v1.ListMeshRouteViewsRequest\032;.google." + + "cloud.networkservices.v1.ListMeshRouteVi" + + "ewsResponse\"H\332A\006parent\202\323\344\223\0029\0227/v1/{paren" + + "t=projects/*/locations/*/meshes/*}/route" + + "Views\022\316\001\n\021ListAgentGateways\0229.google.clo" + + "ud.networkservices.v1.ListAgentGatewaysR" + + "equest\032:.google.cloud.networkservices.v1" + + ".ListAgentGatewaysResponse\"B\332A\006parent\202\323\344" + + "\223\0023\0221/v1/{parent=projects/*/locations/*}" + + "/agentGateways\022\273\001\n\017GetAgentGateway\0227.goo" + + "gle.cloud.networkservices.v1.GetAgentGat" + + "ewayRequest\032-.google.cloud.networkservic" + + "es.v1.AgentGateway\"@\332A\004name\202\323\344\223\0023\0221/v1/{" + + "name=projects/*/locations/*/agentGateway" + + "s/*}\022\246\002\n\022CreateAgentGateway\022:.google.clo" + + "ud.networkservices.v1.CreateAgentGateway" + + "Request\032\035.google.longrunning.Operation\"\264" + + "\001\312AA\n\014AgentGateway\0221google.cloud.network" + + "services.v1.OperationMetadata\332A%parent,a" + + "gent_gateway,agent_gateway_id\202\323\344\223\002B\"1/v1" + + "/{parent=projects/*/locations/*}/agentGa" + + "teways:\ragent_gateway\022\250\002\n\022UpdateAgentGat" + + "eway\022:.google.cloud.networkservices.v1.U" + + "pdateAgentGatewayRequest\032\035.google.longru" + + "nning.Operation\"\266\001\312AA\n\014AgentGateway\0221goo" + + "gle.cloud.networkservices.v1.OperationMe" + + "tadata\332A\031agent_gateway,update_mask\202\323\344\223\002P" + + "2?/v1/{agent_gateway.name=projects/*/loc" + + "ations/*/agentGateways/*}:\ragent_gateway" + + "\022\377\001\n\022DeleteAgentGateway\022:.google.cloud.n" + + "etworkservices.v1.DeleteAgentGatewayRequ" + + "est\032\035.google.longrunning.Operation\"\215\001\312AJ" + + "\n\025google.protobuf.Empty\0221google.cloud.ne" + + "tworkservices.v1.OperationMetadata\332A\004nam", + "e\202\323\344\223\0023*1/v1/{name=projects/*/locations/" + + "*/agentGateways/*}\032R\312A\036networkservices.g" + + "oogleapis.com\322A.https://www.googleapis.c" + + "om/auth/cloud-platformB\337\001\n#com.google.cl" + + "oud.networkservices.v1P\001ZMcloud.google.c" + + "om/go/networkservices/apiv1/networkservi" + + "cespb;networkservicespb\252\002\037Google.Cloud.N" + + "etworkServices.V1\312\002\037Google\\Cloud\\Network" + + "Services\\V1\352\002\"Google::Cloud::NetworkServ" + + "ices::V1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -432,6 +465,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.Descriptors.FileDescriptor[] { com.google.api.AnnotationsProto.getDescriptor(), com.google.api.ClientProto.getDescriptor(), + com.google.cloud.networkservices.v1.AgentGatewayProto.getDescriptor(), com.google.cloud.networkservices.v1.CommonProto.getDescriptor(), com.google.cloud.networkservices.v1.EndpointPolicyProto.getDescriptor(), com.google.cloud.networkservices.v1.ExtensibilityProto.getDescriptor(), @@ -450,6 +484,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { descriptor.resolveAllFeaturesImmutable(); com.google.api.AnnotationsProto.getDescriptor(); com.google.api.ClientProto.getDescriptor(); + com.google.cloud.networkservices.v1.AgentGatewayProto.getDescriptor(); com.google.cloud.networkservices.v1.CommonProto.getDescriptor(); com.google.cloud.networkservices.v1.EndpointPolicyProto.getDescriptor(); com.google.cloud.networkservices.v1.ExtensibilityProto.getDescriptor(); diff --git a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/ServiceBindingProto.java b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/ServiceBindingProto.java index cec38bf9a499..3a9d7ea332d9 100644 --- a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/ServiceBindingProto.java +++ b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/ServiceBindingProto.java @@ -81,64 +81,64 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { static { java.lang.String[] descriptorData = { - "\n" - + "5google/cloud/networkservices/v1/service_binding.proto\022\037google.cloud.networkser" - + "vices.v1\032\037google/api/field_behavior.proto\032\031google/api/resource.proto\032" - + " google/protobuf/field_mask.proto\032\037google/protobuf/timestamp.proto\"\210\004\n" - + "\016ServiceBinding\022\021\n" - + "\004name\030\001 \001(\tB\003\340A\010\022\030\n" - + "\013description\030\002 \001(\tB\003\340A\001\0224\n" - + "\013create_time\030\003 \001(\0132\032.google.protobuf.TimestampB\003\340A\003\0224\n" - + "\013update_time\030\004 \001(\0132\032.google.protobuf.TimestampB\003\340A\003\022B\n" - + "\007service\030\005 \001(\tB1\030\001\340A\001\372A)\n" - + "\'servicedirectory.googleapis.com/Service\022\031\n\n" - + "service_id\030\010 \001(\tB\005\030\001\340A\003\022P\n" - + "\006labels\030\007 \003(\0132;.google.cloud.networ" - + "kservices.v1.ServiceBinding.LabelsEntryB\003\340A\001\032-\n" - + "\013LabelsEntry\022\013\n" - + "\003key\030\001 \001(\t\022\r\n" - + "\005value\030\002 \001(\t:\0028\001:}\352Az\n" - + "-networkservices.googleapis.com/ServiceBinding\022Iprojects/{proje" - + "ct}/locations/{location}/serviceBindings/{service_binding}\"\212\001\n" - + "\032ListServiceBindingsRequest\022E\n" - + "\006parent\030\001 \001(\tB5\340A\002\372A/\022-netwo" - + "rkservices.googleapis.com/ServiceBinding\022\021\n" - + "\tpage_size\030\002 \001(\005\022\022\n\n" - + "page_token\030\003 \001(\t\"\226\001\n" - + "\033ListServiceBindingsResponse\022I\n" - + "\020service_bindings\030\001" - + " \003(\0132/.google.cloud.networkservices.v1.ServiceBinding\022\027\n" - + "\017next_page_token\030\002 \001(\t\022\023\n" - + "\013unreachable\030\003 \003(\t\"_\n" - + "\030GetServiceBindingRequest\022C\n" - + "\004name\030\001 \001(\tB5\340A\002\372A/\n" - + "-networkservices.googleapis.com/ServiceBinding\"\324\001\n" - + "\033CreateServiceBindingRequest\022E\n" - + "\006parent\030\001 \001(" - + "\tB5\340A\002\372A/\022-networkservices.googleapis.com/ServiceBinding\022\037\n" - + "\022service_binding_id\030\002 \001(\tB\003\340A\002\022M\n" - + "\017service_binding\030\003" - + " \001(\0132/.google.cloud.networkservices.v1.ServiceBindingB\003\340A\002\"\242\001\n" - + "\033UpdateServiceBindingRequest\0224\n" - + "\013update_mask\030\001 \001(\0132\032.google.protobuf.FieldMaskB\003\340A\001\022M\n" - + "\017service_binding\030\002" - + " \001(\0132/.google.cloud.networkservices.v1.ServiceBindingB\003\340A\002\"b\n" - + "\033DeleteServiceBindingRequest\022C\n" - + "\004name\030\001 \001(\tB5\340A\002\372A/\n" - + "-networkservices.googleapis.com/ServiceBindingB\363\002\n" - + "#com.google.cloud.networkservices.v1B\023ServiceBindingProtoP\001ZMcloud." - + "google.com/go/networkservices/apiv1/netw" - + "orkservicespb;networkservicespb\252\002\037Google" - + ".Cloud.NetworkServices.V1\312\002\037Google\\Cloud" - + "\\NetworkServices\\V1\352\002\"Google::Cloud::NetworkServices::V1\352A|\n" - + "\'servicedirectory.googleapis.com/Service\022Qprojects/{project}" - + "/locations/{location}/namespaces/{namespace}/services/{service}b\006proto3" + "\n5google/cloud/networkservices/v1/servic" + + "e_binding.proto\022\037google.cloud.networkser" + + "vices.v1\032\037google/api/field_behavior.prot" + + "o\032\033google/api/field_info.proto\032\031google/a" + + "pi/resource.proto\032 google/protobuf/field" + + "_mask.proto\032\037google/protobuf/timestamp.p" + + "roto\"\210\004\n\016ServiceBinding\022\021\n\004name\030\001 \001(\tB\003\340" + + "A\010\022\030\n\013description\030\002 \001(\tB\003\340A\001\0224\n\013create_t" + + "ime\030\003 \001(\0132\032.google.protobuf.TimestampB\003\340" + + "A\003\0224\n\013update_time\030\004 \001(\0132\032.google.protobu" + + "f.TimestampB\003\340A\003\022B\n\007service\030\005 \001(\tB1\030\001\340A\001" + + "\372A)\n\'servicedirectory.googleapis.com/Ser" + + "vice\022\031\n\nservice_id\030\010 \001(\tB\005\030\001\340A\003\022P\n\006label" + + "s\030\007 \003(\0132;.google.cloud.networkservices.v" + + "1.ServiceBinding.LabelsEntryB\003\340A\001\032-\n\013Lab" + + "elsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001" + + ":}\352Az\n-networkservices.googleapis.com/Se" + + "rviceBinding\022Iprojects/{project}/locatio" + + "ns/{location}/serviceBindings/{service_b" + + "inding}\"\212\001\n\032ListServiceBindingsRequest\022E" + + "\n\006parent\030\001 \001(\tB5\340A\002\372A/\022-networkservices." + + "googleapis.com/ServiceBinding\022\021\n\tpage_si" + + "ze\030\002 \001(\005\022\022\n\npage_token\030\003 \001(\t\"\226\001\n\033ListSer" + + "viceBindingsResponse\022I\n\020service_bindings" + + "\030\001 \003(\0132/.google.cloud.networkservices.v1" + + ".ServiceBinding\022\027\n\017next_page_token\030\002 \001(\t" + + "\022\023\n\013unreachable\030\003 \003(\t\"_\n\030GetServiceBindi" + + "ngRequest\022C\n\004name\030\001 \001(\tB5\340A\002\372A/\n-network" + + "services.googleapis.com/ServiceBinding\"\324" + + "\001\n\033CreateServiceBindingRequest\022E\n\006parent" + + "\030\001 \001(\tB5\340A\002\372A/\022-networkservices.googleap" + + "is.com/ServiceBinding\022\037\n\022service_binding" + + "_id\030\002 \001(\tB\003\340A\002\022M\n\017service_binding\030\003 \001(\0132" + + "/.google.cloud.networkservices.v1.Servic" + + "eBindingB\003\340A\002\"\242\001\n\033UpdateServiceBindingRe" + + "quest\0224\n\013update_mask\030\001 \001(\0132\032.google.prot" + + "obuf.FieldMaskB\003\340A\001\022M\n\017service_binding\030\002" + + " \001(\0132/.google.cloud.networkservices.v1.S" + + "erviceBindingB\003\340A\002\"b\n\033DeleteServiceBindi" + + "ngRequest\022C\n\004name\030\001 \001(\tB5\340A\002\372A/\n-network" + + "services.googleapis.com/ServiceBindingB\363" + + "\002\n#com.google.cloud.networkservices.v1B\023" + + "ServiceBindingProtoP\001ZMcloud.google.com/" + + "go/networkservices/apiv1/networkservices" + + "pb;networkservicespb\252\002\037Google.Cloud.Netw" + + "orkServices.V1\312\002\037Google\\Cloud\\NetworkSer" + + "vices\\V1\352\002\"Google::Cloud::NetworkService" + + "s::V1\352A|\n\'servicedirectory.googleapis.co" + + "m/Service\022Qprojects/{project}/locations/" + + "{location}/namespaces/{namespace}/servic" + + "es/{service}b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] { com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.FieldInfoProto.getDescriptor(), com.google.api.ResourceProto.getDescriptor(), com.google.protobuf.FieldMaskProto.getDescriptor(), com.google.protobuf.TimestampProto.getDescriptor(), @@ -209,6 +209,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { }); descriptor.resolveAllFeaturesImmutable(); com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.FieldInfoProto.getDescriptor(); com.google.api.ResourceProto.getDescriptor(); com.google.protobuf.FieldMaskProto.getDescriptor(); com.google.protobuf.TimestampProto.getDescriptor(); diff --git a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/TcpRoute.java b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/TcpRoute.java index 1c706c812a52..b4cdfd359f50 100644 --- a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/TcpRoute.java +++ b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/TcpRoute.java @@ -4913,7 +4913,7 @@ public com.google.protobuf.Parser getParserForType() { * *
                * Identifier. Name of the TcpRoute resource. It matches pattern
            -   * `projects/*/locations/global/tcpRoutes/tcp_route_name>`.
            +   * `projects/*/locations/*/tcpRoutes/tcp_route_name>`.
                * 
            * * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; @@ -4938,7 +4938,7 @@ public java.lang.String getName() { * *
                * Identifier. Name of the TcpRoute resource. It matches pattern
            -   * `projects/*/locations/global/tcpRoutes/tcp_route_name>`.
            +   * `projects/*/locations/*/tcpRoutes/tcp_route_name>`.
                * 
            * * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; @@ -5281,7 +5281,7 @@ public com.google.cloud.networkservices.v1.TcpRoute.RouteRuleOrBuilder getRulesO * one of the routing rules to route the requests served by the mesh. * * Each mesh reference should match the pattern: - * `projects/*/locations/global/meshes/<mesh_name>` + * `projects/*/locations/*/meshes/<mesh_name>` * * The attached Mesh should be of a type SIDECAR * @@ -5304,7 +5304,7 @@ public com.google.protobuf.ProtocolStringList getMeshesList() { * one of the routing rules to route the requests served by the mesh. * * Each mesh reference should match the pattern: - * `projects/*/locations/global/meshes/<mesh_name>` + * `projects/*/locations/*/meshes/<mesh_name>` * * The attached Mesh should be of a type SIDECAR * @@ -5327,7 +5327,7 @@ public int getMeshesCount() { * one of the routing rules to route the requests served by the mesh. * * Each mesh reference should match the pattern: - * `projects/*/locations/global/meshes/<mesh_name>` + * `projects/*/locations/*/meshes/<mesh_name>` * * The attached Mesh should be of a type SIDECAR * @@ -5351,7 +5351,7 @@ public java.lang.String getMeshes(int index) { * one of the routing rules to route the requests served by the mesh. * * Each mesh reference should match the pattern: - * `projects/*/locations/global/meshes/<mesh_name>` + * `projects/*/locations/*/meshes/<mesh_name>` * * The attached Mesh should be of a type SIDECAR * @@ -5381,7 +5381,7 @@ public com.google.protobuf.ByteString getMeshesBytes(int index) { * as one of the routing rules to route the requests served by the gateway. * * Each gateway reference should match the pattern: - * `projects/*/locations/global/gateways/<gateway_name>` + * `projects/*/locations/*/gateways/<gateway_name>` * * * @@ -5402,7 +5402,7 @@ public com.google.protobuf.ProtocolStringList getGatewaysList() { * as one of the routing rules to route the requests served by the gateway. * * Each gateway reference should match the pattern: - * `projects/*/locations/global/gateways/<gateway_name>` + * `projects/*/locations/*/gateways/<gateway_name>` * * * @@ -5423,7 +5423,7 @@ public int getGatewaysCount() { * as one of the routing rules to route the requests served by the gateway. * * Each gateway reference should match the pattern: - * `projects/*/locations/global/gateways/<gateway_name>` + * `projects/*/locations/*/gateways/<gateway_name>` * * * @@ -5445,7 +5445,7 @@ public java.lang.String getGateways(int index) { * as one of the routing rules to route the requests served by the gateway. * * Each gateway reference should match the pattern: - * `projects/*/locations/global/gateways/<gateway_name>` + * `projects/*/locations/*/gateways/<gateway_name>` * * * @@ -6216,7 +6216,7 @@ public Builder mergeFrom( * *
                  * Identifier. Name of the TcpRoute resource. It matches pattern
            -     * `projects/*/locations/global/tcpRoutes/tcp_route_name>`.
            +     * `projects/*/locations/*/tcpRoutes/tcp_route_name>`.
                  * 
            * * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; @@ -6240,7 +6240,7 @@ public java.lang.String getName() { * *
                  * Identifier. Name of the TcpRoute resource. It matches pattern
            -     * `projects/*/locations/global/tcpRoutes/tcp_route_name>`.
            +     * `projects/*/locations/*/tcpRoutes/tcp_route_name>`.
                  * 
            * * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; @@ -6264,7 +6264,7 @@ public com.google.protobuf.ByteString getNameBytes() { * *
                  * Identifier. Name of the TcpRoute resource. It matches pattern
            -     * `projects/*/locations/global/tcpRoutes/tcp_route_name>`.
            +     * `projects/*/locations/*/tcpRoutes/tcp_route_name>`.
                  * 
            * * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; @@ -6287,7 +6287,7 @@ public Builder setName(java.lang.String value) { * *
                  * Identifier. Name of the TcpRoute resource. It matches pattern
            -     * `projects/*/locations/global/tcpRoutes/tcp_route_name>`.
            +     * `projects/*/locations/*/tcpRoutes/tcp_route_name>`.
                  * 
            * * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; @@ -6306,7 +6306,7 @@ public Builder clearName() { * *
                  * Identifier. Name of the TcpRoute resource. It matches pattern
            -     * `projects/*/locations/global/tcpRoutes/tcp_route_name>`.
            +     * `projects/*/locations/*/tcpRoutes/tcp_route_name>`.
                  * 
            * * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; @@ -7441,7 +7441,7 @@ private void ensureMeshesIsMutable() { * one of the routing rules to route the requests served by the mesh. * * Each mesh reference should match the pattern: - * `projects/*/locations/global/meshes/<mesh_name>` + * `projects/*/locations/*/meshes/<mesh_name>` * * The attached Mesh should be of a type SIDECAR * @@ -7465,7 +7465,7 @@ public com.google.protobuf.ProtocolStringList getMeshesList() { * one of the routing rules to route the requests served by the mesh. * * Each mesh reference should match the pattern: - * `projects/*/locations/global/meshes/<mesh_name>` + * `projects/*/locations/*/meshes/<mesh_name>` * * The attached Mesh should be of a type SIDECAR * @@ -7488,7 +7488,7 @@ public int getMeshesCount() { * one of the routing rules to route the requests served by the mesh. * * Each mesh reference should match the pattern: - * `projects/*/locations/global/meshes/<mesh_name>` + * `projects/*/locations/*/meshes/<mesh_name>` * * The attached Mesh should be of a type SIDECAR * @@ -7512,7 +7512,7 @@ public java.lang.String getMeshes(int index) { * one of the routing rules to route the requests served by the mesh. * * Each mesh reference should match the pattern: - * `projects/*/locations/global/meshes/<mesh_name>` + * `projects/*/locations/*/meshes/<mesh_name>` * * The attached Mesh should be of a type SIDECAR * @@ -7536,7 +7536,7 @@ public com.google.protobuf.ByteString getMeshesBytes(int index) { * one of the routing rules to route the requests served by the mesh. * * Each mesh reference should match the pattern: - * `projects/*/locations/global/meshes/<mesh_name>` + * `projects/*/locations/*/meshes/<mesh_name>` * * The attached Mesh should be of a type SIDECAR * @@ -7568,7 +7568,7 @@ public Builder setMeshes(int index, java.lang.String value) { * one of the routing rules to route the requests served by the mesh. * * Each mesh reference should match the pattern: - * `projects/*/locations/global/meshes/<mesh_name>` + * `projects/*/locations/*/meshes/<mesh_name>` * * The attached Mesh should be of a type SIDECAR * @@ -7599,7 +7599,7 @@ public Builder addMeshes(java.lang.String value) { * one of the routing rules to route the requests served by the mesh. * * Each mesh reference should match the pattern: - * `projects/*/locations/global/meshes/<mesh_name>` + * `projects/*/locations/*/meshes/<mesh_name>` * * The attached Mesh should be of a type SIDECAR * @@ -7627,7 +7627,7 @@ public Builder addAllMeshes(java.lang.Iterable values) { * one of the routing rules to route the requests served by the mesh. * * Each mesh reference should match the pattern: - * `projects/*/locations/global/meshes/<mesh_name>` + * `projects/*/locations/*/meshes/<mesh_name>` * * The attached Mesh should be of a type SIDECAR * @@ -7654,7 +7654,7 @@ public Builder clearMeshes() { * one of the routing rules to route the requests served by the mesh. * * Each mesh reference should match the pattern: - * `projects/*/locations/global/meshes/<mesh_name>` + * `projects/*/locations/*/meshes/<mesh_name>` * * The attached Mesh should be of a type SIDECAR * @@ -7696,7 +7696,7 @@ private void ensureGatewaysIsMutable() { * as one of the routing rules to route the requests served by the gateway. * * Each gateway reference should match the pattern: - * `projects/*/locations/global/gateways/<gateway_name>` + * `projects/*/locations/*/gateways/<gateway_name>` * * * @@ -7718,7 +7718,7 @@ public com.google.protobuf.ProtocolStringList getGatewaysList() { * as one of the routing rules to route the requests served by the gateway. * * Each gateway reference should match the pattern: - * `projects/*/locations/global/gateways/<gateway_name>` + * `projects/*/locations/*/gateways/<gateway_name>` * * * @@ -7739,7 +7739,7 @@ public int getGatewaysCount() { * as one of the routing rules to route the requests served by the gateway. * * Each gateway reference should match the pattern: - * `projects/*/locations/global/gateways/<gateway_name>` + * `projects/*/locations/*/gateways/<gateway_name>` * * * @@ -7761,7 +7761,7 @@ public java.lang.String getGateways(int index) { * as one of the routing rules to route the requests served by the gateway. * * Each gateway reference should match the pattern: - * `projects/*/locations/global/gateways/<gateway_name>` + * `projects/*/locations/*/gateways/<gateway_name>` * * * @@ -7783,7 +7783,7 @@ public com.google.protobuf.ByteString getGatewaysBytes(int index) { * as one of the routing rules to route the requests served by the gateway. * * Each gateway reference should match the pattern: - * `projects/*/locations/global/gateways/<gateway_name>` + * `projects/*/locations/*/gateways/<gateway_name>` * * * @@ -7813,7 +7813,7 @@ public Builder setGateways(int index, java.lang.String value) { * as one of the routing rules to route the requests served by the gateway. * * Each gateway reference should match the pattern: - * `projects/*/locations/global/gateways/<gateway_name>` + * `projects/*/locations/*/gateways/<gateway_name>` * * * @@ -7842,7 +7842,7 @@ public Builder addGateways(java.lang.String value) { * as one of the routing rules to route the requests served by the gateway. * * Each gateway reference should match the pattern: - * `projects/*/locations/global/gateways/<gateway_name>` + * `projects/*/locations/*/gateways/<gateway_name>` * * * @@ -7868,7 +7868,7 @@ public Builder addAllGateways(java.lang.Iterable values) { * as one of the routing rules to route the requests served by the gateway. * * Each gateway reference should match the pattern: - * `projects/*/locations/global/gateways/<gateway_name>` + * `projects/*/locations/*/gateways/<gateway_name>` * * * @@ -7893,7 +7893,7 @@ public Builder clearGateways() { * as one of the routing rules to route the requests served by the gateway. * * Each gateway reference should match the pattern: - * `projects/*/locations/global/gateways/<gateway_name>` + * `projects/*/locations/*/gateways/<gateway_name>` * * * diff --git a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/TcpRouteOrBuilder.java b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/TcpRouteOrBuilder.java index 1f055fe7c403..cf011f99bdde 100644 --- a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/TcpRouteOrBuilder.java +++ b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/TcpRouteOrBuilder.java @@ -31,7 +31,7 @@ public interface TcpRouteOrBuilder * *
                * Identifier. Name of the TcpRoute resource. It matches pattern
            -   * `projects/*/locations/global/tcpRoutes/tcp_route_name>`.
            +   * `projects/*/locations/*/tcpRoutes/tcp_route_name>`.
                * 
            * * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; @@ -45,7 +45,7 @@ public interface TcpRouteOrBuilder * *
                * Identifier. Name of the TcpRoute resource. It matches pattern
            -   * `projects/*/locations/global/tcpRoutes/tcp_route_name>`.
            +   * `projects/*/locations/*/tcpRoutes/tcp_route_name>`.
                * 
            * * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; @@ -272,7 +272,7 @@ public interface TcpRouteOrBuilder * one of the routing rules to route the requests served by the mesh. * * Each mesh reference should match the pattern: - * `projects/*/locations/global/meshes/<mesh_name>` + * `projects/*/locations/*/meshes/<mesh_name>` * * The attached Mesh should be of a type SIDECAR * @@ -293,7 +293,7 @@ public interface TcpRouteOrBuilder * one of the routing rules to route the requests served by the mesh. * * Each mesh reference should match the pattern: - * `projects/*/locations/global/meshes/<mesh_name>` + * `projects/*/locations/*/meshes/<mesh_name>` * * The attached Mesh should be of a type SIDECAR * @@ -314,7 +314,7 @@ public interface TcpRouteOrBuilder * one of the routing rules to route the requests served by the mesh. * * Each mesh reference should match the pattern: - * `projects/*/locations/global/meshes/<mesh_name>` + * `projects/*/locations/*/meshes/<mesh_name>` * * The attached Mesh should be of a type SIDECAR * @@ -336,7 +336,7 @@ public interface TcpRouteOrBuilder * one of the routing rules to route the requests served by the mesh. * * Each mesh reference should match the pattern: - * `projects/*/locations/global/meshes/<mesh_name>` + * `projects/*/locations/*/meshes/<mesh_name>` * * The attached Mesh should be of a type SIDECAR * @@ -358,7 +358,7 @@ public interface TcpRouteOrBuilder * as one of the routing rules to route the requests served by the gateway. * * Each gateway reference should match the pattern: - * `projects/*/locations/global/gateways/<gateway_name>` + * `projects/*/locations/*/gateways/<gateway_name>` * * * @@ -377,7 +377,7 @@ public interface TcpRouteOrBuilder * as one of the routing rules to route the requests served by the gateway. * * Each gateway reference should match the pattern: - * `projects/*/locations/global/gateways/<gateway_name>` + * `projects/*/locations/*/gateways/<gateway_name>` * * * @@ -396,7 +396,7 @@ public interface TcpRouteOrBuilder * as one of the routing rules to route the requests served by the gateway. * * Each gateway reference should match the pattern: - * `projects/*/locations/global/gateways/<gateway_name>` + * `projects/*/locations/*/gateways/<gateway_name>` * * * @@ -416,7 +416,7 @@ public interface TcpRouteOrBuilder * as one of the routing rules to route the requests served by the gateway. * * Each gateway reference should match the pattern: - * `projects/*/locations/global/gateways/<gateway_name>` + * `projects/*/locations/*/gateways/<gateway_name>` * * * diff --git a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/TlsRoute.java b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/TlsRoute.java index 9b15665ac8ba..f0e55c059764 100644 --- a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/TlsRoute.java +++ b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/TlsRoute.java @@ -59,6 +59,7 @@ private TlsRoute() { rules_ = java.util.Collections.emptyList(); meshes_ = com.google.protobuf.LazyStringArrayList.emptyList(); gateways_ = com.google.protobuf.LazyStringArrayList.emptyList(); + targetProxies_ = com.google.protobuf.LazyStringArrayList.emptyList(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @@ -5057,7 +5058,7 @@ public com.google.protobuf.Parser getParserForType() { * *
                * Identifier. Name of the TlsRoute resource. It matches pattern
            -   * `projects/*/locations/global/tlsRoutes/tls_route_name>`.
            +   * `projects/*/locations/*/tlsRoutes/tls_route_name>`.
                * 
            * * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; @@ -5082,7 +5083,7 @@ public java.lang.String getName() { * *
                * Identifier. Name of the TlsRoute resource. It matches pattern
            -   * `projects/*/locations/global/tlsRoutes/tls_route_name>`.
            +   * `projects/*/locations/*/tlsRoutes/tls_route_name>`.
                * 
            * * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; @@ -5425,7 +5426,7 @@ public com.google.cloud.networkservices.v1.TlsRoute.RouteRuleOrBuilder getRulesO * one of the routing rules to route the requests served by the mesh. * * Each mesh reference should match the pattern: - * `projects/*/locations/global/meshes/<mesh_name>` + * `projects/*/locations/*/meshes/<mesh_name>` * * The attached Mesh should be of a type SIDECAR * @@ -5448,7 +5449,7 @@ public com.google.protobuf.ProtocolStringList getMeshesList() { * one of the routing rules to route the requests served by the mesh. * * Each mesh reference should match the pattern: - * `projects/*/locations/global/meshes/<mesh_name>` + * `projects/*/locations/*/meshes/<mesh_name>` * * The attached Mesh should be of a type SIDECAR * @@ -5471,7 +5472,7 @@ public int getMeshesCount() { * one of the routing rules to route the requests served by the mesh. * * Each mesh reference should match the pattern: - * `projects/*/locations/global/meshes/<mesh_name>` + * `projects/*/locations/*/meshes/<mesh_name>` * * The attached Mesh should be of a type SIDECAR * @@ -5495,7 +5496,7 @@ public java.lang.String getMeshes(int index) { * one of the routing rules to route the requests served by the mesh. * * Each mesh reference should match the pattern: - * `projects/*/locations/global/meshes/<mesh_name>` + * `projects/*/locations/*/meshes/<mesh_name>` * * The attached Mesh should be of a type SIDECAR * @@ -5525,7 +5526,7 @@ public com.google.protobuf.ByteString getMeshesBytes(int index) { * as one of the routing rules to route the requests served by the gateway. * * Each gateway reference should match the pattern: - * `projects/*/locations/global/gateways/<gateway_name>` + * `projects/*/locations/*/gateways/<gateway_name>` * * * @@ -5546,7 +5547,7 @@ public com.google.protobuf.ProtocolStringList getGatewaysList() { * as one of the routing rules to route the requests served by the gateway. * * Each gateway reference should match the pattern: - * `projects/*/locations/global/gateways/<gateway_name>` + * `projects/*/locations/*/gateways/<gateway_name>` * * * @@ -5567,7 +5568,7 @@ public int getGatewaysCount() { * as one of the routing rules to route the requests served by the gateway. * * Each gateway reference should match the pattern: - * `projects/*/locations/global/gateways/<gateway_name>` + * `projects/*/locations/*/gateways/<gateway_name>` * * * @@ -5589,7 +5590,7 @@ public java.lang.String getGateways(int index) { * as one of the routing rules to route the requests served by the gateway. * * Each gateway reference should match the pattern: - * `projects/*/locations/global/gateways/<gateway_name>` + * `projects/*/locations/*/gateways/<gateway_name>` * * * @@ -5603,6 +5604,102 @@ public com.google.protobuf.ByteString getGatewaysBytes(int index) { return gateways_.getByteString(index); } + public static final int TARGET_PROXIES_FIELD_NUMBER = 13; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList targetProxies_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + /** + * + * + *
            +   * Optional. TargetProxies defines a list of TargetTcpProxies this TlsRoute is
            +   * attached to, as one of the routing rules to route the requests served by
            +   * the TargetTcpProxy.
            +   *
            +   * Each TargetTcpProxy reference should match the pattern:
            +   * `projects/*/locations/*/targetTcpProxies/<target_tcp_proxy_name>`
            +   * 
            + * + * + * repeated string target_proxies = 13 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return A list containing the targetProxies. + */ + public com.google.protobuf.ProtocolStringList getTargetProxiesList() { + return targetProxies_; + } + + /** + * + * + *
            +   * Optional. TargetProxies defines a list of TargetTcpProxies this TlsRoute is
            +   * attached to, as one of the routing rules to route the requests served by
            +   * the TargetTcpProxy.
            +   *
            +   * Each TargetTcpProxy reference should match the pattern:
            +   * `projects/*/locations/*/targetTcpProxies/<target_tcp_proxy_name>`
            +   * 
            + * + * + * repeated string target_proxies = 13 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The count of targetProxies. + */ + public int getTargetProxiesCount() { + return targetProxies_.size(); + } + + /** + * + * + *
            +   * Optional. TargetProxies defines a list of TargetTcpProxies this TlsRoute is
            +   * attached to, as one of the routing rules to route the requests served by
            +   * the TargetTcpProxy.
            +   *
            +   * Each TargetTcpProxy reference should match the pattern:
            +   * `projects/*/locations/*/targetTcpProxies/<target_tcp_proxy_name>`
            +   * 
            + * + * + * repeated string target_proxies = 13 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the element to return. + * @return The targetProxies at the given index. + */ + public java.lang.String getTargetProxies(int index) { + return targetProxies_.get(index); + } + + /** + * + * + *
            +   * Optional. TargetProxies defines a list of TargetTcpProxies this TlsRoute is
            +   * attached to, as one of the routing rules to route the requests served by
            +   * the TargetTcpProxy.
            +   *
            +   * Each TargetTcpProxy reference should match the pattern:
            +   * `projects/*/locations/*/targetTcpProxies/<target_tcp_proxy_name>`
            +   * 
            + * + * + * repeated string target_proxies = 13 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the value to return. + * @return The bytes of the targetProxies at the given index. + */ + public com.google.protobuf.ByteString getTargetProxiesBytes(int index) { + return targetProxies_.getByteString(index); + } + public static final int LABELS_FIELD_NUMBER = 11; private static final class LabelsDefaultEntryHolder { @@ -5750,6 +5847,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io } com.google.protobuf.GeneratedMessage.serializeStringMapTo( output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 11); + for (int i = 0; i < targetProxies_.size(); i++) { + com.google.protobuf.GeneratedMessage.writeString(output, 13, targetProxies_.getRaw(i)); + } getUnknownFields().writeTo(output); } @@ -5803,6 +5903,14 @@ public int getSerializedSize() { .build(); size += com.google.protobuf.CodedOutputStream.computeMessageSize(11, labels__); } + { + int dataSize = 0; + for (int i = 0; i < targetProxies_.size(); i++) { + dataSize += computeStringSizeNoTag(targetProxies_.getRaw(i)); + } + size += dataSize; + size += 1 * getTargetProxiesList().size(); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -5833,6 +5941,7 @@ public boolean equals(final java.lang.Object obj) { if (!getRulesList().equals(other.getRulesList())) return false; if (!getMeshesList().equals(other.getMeshesList())) return false; if (!getGatewaysList().equals(other.getGatewaysList())) return false; + if (!getTargetProxiesList().equals(other.getTargetProxiesList())) return false; if (!internalGetLabels().equals(other.internalGetLabels())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; @@ -5871,6 +5980,10 @@ public int hashCode() { hash = (37 * hash) + GATEWAYS_FIELD_NUMBER; hash = (53 * hash) + getGatewaysList().hashCode(); } + if (getTargetProxiesCount() > 0) { + hash = (37 * hash) + TARGET_PROXIES_FIELD_NUMBER; + hash = (53 * hash) + getTargetProxiesList().hashCode(); + } if (!internalGetLabels().getMap().isEmpty()) { hash = (37 * hash) + LABELS_FIELD_NUMBER; hash = (53 * hash) + internalGetLabels().hashCode(); @@ -6071,6 +6184,7 @@ public Builder clear() { bitField0_ = (bitField0_ & ~0x00000020); meshes_ = com.google.protobuf.LazyStringArrayList.emptyList(); gateways_ = com.google.protobuf.LazyStringArrayList.emptyList(); + targetProxies_ = com.google.protobuf.LazyStringArrayList.emptyList(); internalGetMutableLabels().clear(); return this; } @@ -6148,6 +6262,10 @@ private void buildPartial0(com.google.cloud.networkservices.v1.TlsRoute result) result.gateways_ = gateways_; } if (((from_bitField0_ & 0x00000100) != 0)) { + targetProxies_.makeImmutable(); + result.targetProxies_ = targetProxies_; + } + if (((from_bitField0_ & 0x00000200) != 0)) { result.labels_ = internalGetLabels(); result.labels_.makeImmutable(); } @@ -6234,8 +6352,18 @@ public Builder mergeFrom(com.google.cloud.networkservices.v1.TlsRoute other) { } onChanged(); } + if (!other.targetProxies_.isEmpty()) { + if (targetProxies_.isEmpty()) { + targetProxies_ = other.targetProxies_; + bitField0_ |= 0x00000100; + } else { + ensureTargetProxiesIsMutable(); + targetProxies_.addAll(other.targetProxies_); + } + onChanged(); + } internalGetMutableLabels().mergeFrom(other.internalGetLabels()); - bitField0_ |= 0x00000100; + bitField0_ |= 0x00000200; this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -6331,9 +6459,16 @@ public Builder mergeFrom( internalGetMutableLabels() .getMutableMap() .put(labels__.getKey(), labels__.getValue()); - bitField0_ |= 0x00000100; + bitField0_ |= 0x00000200; break; } // case 90 + case 106: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureTargetProxiesIsMutable(); + targetProxies_.add(s); + break; + } // case 106 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -6360,7 +6495,7 @@ public Builder mergeFrom( * *
                  * Identifier. Name of the TlsRoute resource. It matches pattern
            -     * `projects/*/locations/global/tlsRoutes/tls_route_name>`.
            +     * `projects/*/locations/*/tlsRoutes/tls_route_name>`.
                  * 
            * * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; @@ -6384,7 +6519,7 @@ public java.lang.String getName() { * *
                  * Identifier. Name of the TlsRoute resource. It matches pattern
            -     * `projects/*/locations/global/tlsRoutes/tls_route_name>`.
            +     * `projects/*/locations/*/tlsRoutes/tls_route_name>`.
                  * 
            * * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; @@ -6408,7 +6543,7 @@ public com.google.protobuf.ByteString getNameBytes() { * *
                  * Identifier. Name of the TlsRoute resource. It matches pattern
            -     * `projects/*/locations/global/tlsRoutes/tls_route_name>`.
            +     * `projects/*/locations/*/tlsRoutes/tls_route_name>`.
                  * 
            * * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; @@ -6431,7 +6566,7 @@ public Builder setName(java.lang.String value) { * *
                  * Identifier. Name of the TlsRoute resource. It matches pattern
            -     * `projects/*/locations/global/tlsRoutes/tls_route_name>`.
            +     * `projects/*/locations/*/tlsRoutes/tls_route_name>`.
                  * 
            * * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; @@ -6450,7 +6585,7 @@ public Builder clearName() { * *
                  * Identifier. Name of the TlsRoute resource. It matches pattern
            -     * `projects/*/locations/global/tlsRoutes/tls_route_name>`.
            +     * `projects/*/locations/*/tlsRoutes/tls_route_name>`.
                  * 
            * * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; @@ -7585,7 +7720,7 @@ private void ensureMeshesIsMutable() { * one of the routing rules to route the requests served by the mesh. * * Each mesh reference should match the pattern: - * `projects/*/locations/global/meshes/<mesh_name>` + * `projects/*/locations/*/meshes/<mesh_name>` * * The attached Mesh should be of a type SIDECAR * @@ -7609,7 +7744,7 @@ public com.google.protobuf.ProtocolStringList getMeshesList() { * one of the routing rules to route the requests served by the mesh. * * Each mesh reference should match the pattern: - * `projects/*/locations/global/meshes/<mesh_name>` + * `projects/*/locations/*/meshes/<mesh_name>` * * The attached Mesh should be of a type SIDECAR * @@ -7632,7 +7767,7 @@ public int getMeshesCount() { * one of the routing rules to route the requests served by the mesh. * * Each mesh reference should match the pattern: - * `projects/*/locations/global/meshes/<mesh_name>` + * `projects/*/locations/*/meshes/<mesh_name>` * * The attached Mesh should be of a type SIDECAR * @@ -7656,7 +7791,7 @@ public java.lang.String getMeshes(int index) { * one of the routing rules to route the requests served by the mesh. * * Each mesh reference should match the pattern: - * `projects/*/locations/global/meshes/<mesh_name>` + * `projects/*/locations/*/meshes/<mesh_name>` * * The attached Mesh should be of a type SIDECAR * @@ -7680,7 +7815,7 @@ public com.google.protobuf.ByteString getMeshesBytes(int index) { * one of the routing rules to route the requests served by the mesh. * * Each mesh reference should match the pattern: - * `projects/*/locations/global/meshes/<mesh_name>` + * `projects/*/locations/*/meshes/<mesh_name>` * * The attached Mesh should be of a type SIDECAR * @@ -7712,7 +7847,7 @@ public Builder setMeshes(int index, java.lang.String value) { * one of the routing rules to route the requests served by the mesh. * * Each mesh reference should match the pattern: - * `projects/*/locations/global/meshes/<mesh_name>` + * `projects/*/locations/*/meshes/<mesh_name>` * * The attached Mesh should be of a type SIDECAR * @@ -7743,7 +7878,7 @@ public Builder addMeshes(java.lang.String value) { * one of the routing rules to route the requests served by the mesh. * * Each mesh reference should match the pattern: - * `projects/*/locations/global/meshes/<mesh_name>` + * `projects/*/locations/*/meshes/<mesh_name>` * * The attached Mesh should be of a type SIDECAR * @@ -7771,7 +7906,7 @@ public Builder addAllMeshes(java.lang.Iterable values) { * one of the routing rules to route the requests served by the mesh. * * Each mesh reference should match the pattern: - * `projects/*/locations/global/meshes/<mesh_name>` + * `projects/*/locations/*/meshes/<mesh_name>` * * The attached Mesh should be of a type SIDECAR * @@ -7798,7 +7933,7 @@ public Builder clearMeshes() { * one of the routing rules to route the requests served by the mesh. * * Each mesh reference should match the pattern: - * `projects/*/locations/global/meshes/<mesh_name>` + * `projects/*/locations/*/meshes/<mesh_name>` * * The attached Mesh should be of a type SIDECAR * @@ -7840,7 +7975,7 @@ private void ensureGatewaysIsMutable() { * as one of the routing rules to route the requests served by the gateway. * * Each gateway reference should match the pattern: - * `projects/*/locations/global/gateways/<gateway_name>` + * `projects/*/locations/*/gateways/<gateway_name>` * * * @@ -7862,7 +7997,7 @@ public com.google.protobuf.ProtocolStringList getGatewaysList() { * as one of the routing rules to route the requests served by the gateway. * * Each gateway reference should match the pattern: - * `projects/*/locations/global/gateways/<gateway_name>` + * `projects/*/locations/*/gateways/<gateway_name>` * * * @@ -7883,7 +8018,7 @@ public int getGatewaysCount() { * as one of the routing rules to route the requests served by the gateway. * * Each gateway reference should match the pattern: - * `projects/*/locations/global/gateways/<gateway_name>` + * `projects/*/locations/*/gateways/<gateway_name>` * * * @@ -7905,7 +8040,7 @@ public java.lang.String getGateways(int index) { * as one of the routing rules to route the requests served by the gateway. * * Each gateway reference should match the pattern: - * `projects/*/locations/global/gateways/<gateway_name>` + * `projects/*/locations/*/gateways/<gateway_name>` * * * @@ -7927,7 +8062,7 @@ public com.google.protobuf.ByteString getGatewaysBytes(int index) { * as one of the routing rules to route the requests served by the gateway. * * Each gateway reference should match the pattern: - * `projects/*/locations/global/gateways/<gateway_name>` + * `projects/*/locations/*/gateways/<gateway_name>` * * * @@ -7957,7 +8092,7 @@ public Builder setGateways(int index, java.lang.String value) { * as one of the routing rules to route the requests served by the gateway. * * Each gateway reference should match the pattern: - * `projects/*/locations/global/gateways/<gateway_name>` + * `projects/*/locations/*/gateways/<gateway_name>` * * * @@ -7986,7 +8121,7 @@ public Builder addGateways(java.lang.String value) { * as one of the routing rules to route the requests served by the gateway. * * Each gateway reference should match the pattern: - * `projects/*/locations/global/gateways/<gateway_name>` + * `projects/*/locations/*/gateways/<gateway_name>` * * * @@ -8012,7 +8147,7 @@ public Builder addAllGateways(java.lang.Iterable values) { * as one of the routing rules to route the requests served by the gateway. * * Each gateway reference should match the pattern: - * `projects/*/locations/global/gateways/<gateway_name>` + * `projects/*/locations/*/gateways/<gateway_name>` * * * @@ -8037,7 +8172,7 @@ public Builder clearGateways() { * as one of the routing rules to route the requests served by the gateway. * * Each gateway reference should match the pattern: - * `projects/*/locations/global/gateways/<gateway_name>` + * `projects/*/locations/*/gateways/<gateway_name>` * * * @@ -8059,6 +8194,252 @@ public Builder addGatewaysBytes(com.google.protobuf.ByteString value) { return this; } + private com.google.protobuf.LazyStringArrayList targetProxies_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureTargetProxiesIsMutable() { + if (!targetProxies_.isModifiable()) { + targetProxies_ = new com.google.protobuf.LazyStringArrayList(targetProxies_); + } + bitField0_ |= 0x00000100; + } + + /** + * + * + *
            +     * Optional. TargetProxies defines a list of TargetTcpProxies this TlsRoute is
            +     * attached to, as one of the routing rules to route the requests served by
            +     * the TargetTcpProxy.
            +     *
            +     * Each TargetTcpProxy reference should match the pattern:
            +     * `projects/*/locations/*/targetTcpProxies/<target_tcp_proxy_name>`
            +     * 
            + * + * + * repeated string target_proxies = 13 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return A list containing the targetProxies. + */ + public com.google.protobuf.ProtocolStringList getTargetProxiesList() { + targetProxies_.makeImmutable(); + return targetProxies_; + } + + /** + * + * + *
            +     * Optional. TargetProxies defines a list of TargetTcpProxies this TlsRoute is
            +     * attached to, as one of the routing rules to route the requests served by
            +     * the TargetTcpProxy.
            +     *
            +     * Each TargetTcpProxy reference should match the pattern:
            +     * `projects/*/locations/*/targetTcpProxies/<target_tcp_proxy_name>`
            +     * 
            + * + * + * repeated string target_proxies = 13 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The count of targetProxies. + */ + public int getTargetProxiesCount() { + return targetProxies_.size(); + } + + /** + * + * + *
            +     * Optional. TargetProxies defines a list of TargetTcpProxies this TlsRoute is
            +     * attached to, as one of the routing rules to route the requests served by
            +     * the TargetTcpProxy.
            +     *
            +     * Each TargetTcpProxy reference should match the pattern:
            +     * `projects/*/locations/*/targetTcpProxies/<target_tcp_proxy_name>`
            +     * 
            + * + * + * repeated string target_proxies = 13 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the element to return. + * @return The targetProxies at the given index. + */ + public java.lang.String getTargetProxies(int index) { + return targetProxies_.get(index); + } + + /** + * + * + *
            +     * Optional. TargetProxies defines a list of TargetTcpProxies this TlsRoute is
            +     * attached to, as one of the routing rules to route the requests served by
            +     * the TargetTcpProxy.
            +     *
            +     * Each TargetTcpProxy reference should match the pattern:
            +     * `projects/*/locations/*/targetTcpProxies/<target_tcp_proxy_name>`
            +     * 
            + * + * + * repeated string target_proxies = 13 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the value to return. + * @return The bytes of the targetProxies at the given index. + */ + public com.google.protobuf.ByteString getTargetProxiesBytes(int index) { + return targetProxies_.getByteString(index); + } + + /** + * + * + *
            +     * Optional. TargetProxies defines a list of TargetTcpProxies this TlsRoute is
            +     * attached to, as one of the routing rules to route the requests served by
            +     * the TargetTcpProxy.
            +     *
            +     * Each TargetTcpProxy reference should match the pattern:
            +     * `projects/*/locations/*/targetTcpProxies/<target_tcp_proxy_name>`
            +     * 
            + * + * + * repeated string target_proxies = 13 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param index The index to set the value at. + * @param value The targetProxies to set. + * @return This builder for chaining. + */ + public Builder setTargetProxies(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureTargetProxiesIsMutable(); + targetProxies_.set(index, value); + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Optional. TargetProxies defines a list of TargetTcpProxies this TlsRoute is
            +     * attached to, as one of the routing rules to route the requests served by
            +     * the TargetTcpProxy.
            +     *
            +     * Each TargetTcpProxy reference should match the pattern:
            +     * `projects/*/locations/*/targetTcpProxies/<target_tcp_proxy_name>`
            +     * 
            + * + * + * repeated string target_proxies = 13 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param value The targetProxies to add. + * @return This builder for chaining. + */ + public Builder addTargetProxies(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureTargetProxiesIsMutable(); + targetProxies_.add(value); + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Optional. TargetProxies defines a list of TargetTcpProxies this TlsRoute is
            +     * attached to, as one of the routing rules to route the requests served by
            +     * the TargetTcpProxy.
            +     *
            +     * Each TargetTcpProxy reference should match the pattern:
            +     * `projects/*/locations/*/targetTcpProxies/<target_tcp_proxy_name>`
            +     * 
            + * + * + * repeated string target_proxies = 13 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param values The targetProxies to add. + * @return This builder for chaining. + */ + public Builder addAllTargetProxies(java.lang.Iterable values) { + ensureTargetProxiesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, targetProxies_); + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Optional. TargetProxies defines a list of TargetTcpProxies this TlsRoute is
            +     * attached to, as one of the routing rules to route the requests served by
            +     * the TargetTcpProxy.
            +     *
            +     * Each TargetTcpProxy reference should match the pattern:
            +     * `projects/*/locations/*/targetTcpProxies/<target_tcp_proxy_name>`
            +     * 
            + * + * + * repeated string target_proxies = 13 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearTargetProxies() { + targetProxies_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000100); + ; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Optional. TargetProxies defines a list of TargetTcpProxies this TlsRoute is
            +     * attached to, as one of the routing rules to route the requests served by
            +     * the TargetTcpProxy.
            +     *
            +     * Each TargetTcpProxy reference should match the pattern:
            +     * `projects/*/locations/*/targetTcpProxies/<target_tcp_proxy_name>`
            +     * 
            + * + * + * repeated string target_proxies = 13 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes of the targetProxies to add. + * @return This builder for chaining. + */ + public Builder addTargetProxiesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureTargetProxiesIsMutable(); + targetProxies_.add(value); + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + private com.google.protobuf.MapField labels_; private com.google.protobuf.MapField internalGetLabels() { @@ -8076,7 +8457,7 @@ private com.google.protobuf.MapField interna if (!labels_.isMutable()) { labels_ = labels_.copy(); } - bitField0_ |= 0x00000100; + bitField0_ |= 0x00000200; onChanged(); return labels_; } @@ -8166,7 +8547,7 @@ public java.lang.String getLabelsOrThrow(java.lang.String key) { } public Builder clearLabels() { - bitField0_ = (bitField0_ & ~0x00000100); + bitField0_ = (bitField0_ & ~0x00000200); internalGetMutableLabels().getMutableMap().clear(); return this; } @@ -8191,7 +8572,7 @@ public Builder removeLabels(java.lang.String key) { /** Use alternate mutation accessors instead. */ @java.lang.Deprecated public java.util.Map getMutableLabels() { - bitField0_ |= 0x00000100; + bitField0_ |= 0x00000200; return internalGetMutableLabels().getMutableMap(); } @@ -8212,7 +8593,7 @@ public Builder putLabels(java.lang.String key, java.lang.String value) { throw new NullPointerException("map value"); } internalGetMutableLabels().getMutableMap().put(key, value); - bitField0_ |= 0x00000100; + bitField0_ |= 0x00000200; return this; } @@ -8227,7 +8608,7 @@ public Builder putLabels(java.lang.String key, java.lang.String value) { */ public Builder putAllLabels(java.util.Map values) { internalGetMutableLabels().getMutableMap().putAll(values); - bitField0_ |= 0x00000100; + bitField0_ |= 0x00000200; return this; } diff --git a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/TlsRouteOrBuilder.java b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/TlsRouteOrBuilder.java index e6e017e778e4..15d96782b1b7 100644 --- a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/TlsRouteOrBuilder.java +++ b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/TlsRouteOrBuilder.java @@ -31,7 +31,7 @@ public interface TlsRouteOrBuilder * *
                * Identifier. Name of the TlsRoute resource. It matches pattern
            -   * `projects/*/locations/global/tlsRoutes/tls_route_name>`.
            +   * `projects/*/locations/*/tlsRoutes/tls_route_name>`.
                * 
            * * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; @@ -45,7 +45,7 @@ public interface TlsRouteOrBuilder * *
                * Identifier. Name of the TlsRoute resource. It matches pattern
            -   * `projects/*/locations/global/tlsRoutes/tls_route_name>`.
            +   * `projects/*/locations/*/tlsRoutes/tls_route_name>`.
                * 
            * * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; @@ -272,7 +272,7 @@ public interface TlsRouteOrBuilder * one of the routing rules to route the requests served by the mesh. * * Each mesh reference should match the pattern: - * `projects/*/locations/global/meshes/<mesh_name>` + * `projects/*/locations/*/meshes/<mesh_name>` * * The attached Mesh should be of a type SIDECAR * @@ -293,7 +293,7 @@ public interface TlsRouteOrBuilder * one of the routing rules to route the requests served by the mesh. * * Each mesh reference should match the pattern: - * `projects/*/locations/global/meshes/<mesh_name>` + * `projects/*/locations/*/meshes/<mesh_name>` * * The attached Mesh should be of a type SIDECAR * @@ -314,7 +314,7 @@ public interface TlsRouteOrBuilder * one of the routing rules to route the requests served by the mesh. * * Each mesh reference should match the pattern: - * `projects/*/locations/global/meshes/<mesh_name>` + * `projects/*/locations/*/meshes/<mesh_name>` * * The attached Mesh should be of a type SIDECAR * @@ -336,7 +336,7 @@ public interface TlsRouteOrBuilder * one of the routing rules to route the requests served by the mesh. * * Each mesh reference should match the pattern: - * `projects/*/locations/global/meshes/<mesh_name>` + * `projects/*/locations/*/meshes/<mesh_name>` * * The attached Mesh should be of a type SIDECAR * @@ -358,7 +358,7 @@ public interface TlsRouteOrBuilder * as one of the routing rules to route the requests served by the gateway. * * Each gateway reference should match the pattern: - * `projects/*/locations/global/gateways/<gateway_name>` + * `projects/*/locations/*/gateways/<gateway_name>` * * * @@ -377,7 +377,7 @@ public interface TlsRouteOrBuilder * as one of the routing rules to route the requests served by the gateway. * * Each gateway reference should match the pattern: - * `projects/*/locations/global/gateways/<gateway_name>` + * `projects/*/locations/*/gateways/<gateway_name>` * * * @@ -396,7 +396,7 @@ public interface TlsRouteOrBuilder * as one of the routing rules to route the requests served by the gateway. * * Each gateway reference should match the pattern: - * `projects/*/locations/global/gateways/<gateway_name>` + * `projects/*/locations/*/gateways/<gateway_name>` * * * @@ -416,7 +416,7 @@ public interface TlsRouteOrBuilder * as one of the routing rules to route the requests served by the gateway. * * Each gateway reference should match the pattern: - * `projects/*/locations/global/gateways/<gateway_name>` + * `projects/*/locations/*/gateways/<gateway_name>` * * * @@ -428,6 +428,88 @@ public interface TlsRouteOrBuilder */ com.google.protobuf.ByteString getGatewaysBytes(int index); + /** + * + * + *
            +   * Optional. TargetProxies defines a list of TargetTcpProxies this TlsRoute is
            +   * attached to, as one of the routing rules to route the requests served by
            +   * the TargetTcpProxy.
            +   *
            +   * Each TargetTcpProxy reference should match the pattern:
            +   * `projects/*/locations/*/targetTcpProxies/<target_tcp_proxy_name>`
            +   * 
            + * + * + * repeated string target_proxies = 13 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return A list containing the targetProxies. + */ + java.util.List getTargetProxiesList(); + + /** + * + * + *
            +   * Optional. TargetProxies defines a list of TargetTcpProxies this TlsRoute is
            +   * attached to, as one of the routing rules to route the requests served by
            +   * the TargetTcpProxy.
            +   *
            +   * Each TargetTcpProxy reference should match the pattern:
            +   * `projects/*/locations/*/targetTcpProxies/<target_tcp_proxy_name>`
            +   * 
            + * + * + * repeated string target_proxies = 13 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The count of targetProxies. + */ + int getTargetProxiesCount(); + + /** + * + * + *
            +   * Optional. TargetProxies defines a list of TargetTcpProxies this TlsRoute is
            +   * attached to, as one of the routing rules to route the requests served by
            +   * the TargetTcpProxy.
            +   *
            +   * Each TargetTcpProxy reference should match the pattern:
            +   * `projects/*/locations/*/targetTcpProxies/<target_tcp_proxy_name>`
            +   * 
            + * + * + * repeated string target_proxies = 13 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the element to return. + * @return The targetProxies at the given index. + */ + java.lang.String getTargetProxies(int index); + + /** + * + * + *
            +   * Optional. TargetProxies defines a list of TargetTcpProxies this TlsRoute is
            +   * attached to, as one of the routing rules to route the requests served by
            +   * the TargetTcpProxy.
            +   *
            +   * Each TargetTcpProxy reference should match the pattern:
            +   * `projects/*/locations/*/targetTcpProxies/<target_tcp_proxy_name>`
            +   * 
            + * + * + * repeated string target_proxies = 13 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the value to return. + * @return The bytes of the targetProxies at the given index. + */ + com.google.protobuf.ByteString getTargetProxiesBytes(int index); + /** * * diff --git a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/TlsRouteProto.java b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/TlsRouteProto.java index beb1e0557acb..3b84dafb0b54 100644 --- a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/TlsRouteProto.java +++ b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/TlsRouteProto.java @@ -101,7 +101,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "/google/cloud/networkservices/v1/tls_route.proto\022\037google.cloud.networkservices." + "v1\032\037google/api/field_behavior.proto\032\031goo" + "gle/api/resource.proto\032\036google/protobuf/duration.proto\032" - + " google/protobuf/field_mask.proto\032\037google/protobuf/timestamp.proto\"\324\010\n" + + " google/protobuf/field_mask.proto\032\037google/protobuf/timestamp.proto\"\233\t\n" + "\010TlsRoute\022\021\n" + "\004name\030\001 \001(\tB\003\340A\010\022\026\n" + "\tself_link\030\010 \001(\tB\003\340A\003\0224\n" @@ -114,9 +114,12 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\006meshes\030\006 \003(\tB+\340A\001\372A%\n" + "#networkservices.googleapis.com/Mesh\022@\n" + "\010gateways\030\007 \003(\tB.\340A\001\372A(\n" - + "&networkservices.googleapis.com/Gateway\022J\n" - + "\006labels\030\013" - + " \003(\01325.google.cloud.networkservices.v1.TlsRoute.LabelsEntryB\003\340A\001\032\243\001\n" + + "&networkservices.googleapis.com/Gateway\022E\n" + + "\016target_proxies\030\r" + + " \003(\tB-\340A\001\372A\'\n" + + "%compute.googleapis.com/TargetTcpProxy\022J\n" + + "\006labels\030\013 \003(\01325" + + ".google.cloud.networkservices.v1.TlsRoute.LabelsEntryB\003\340A\001\032\243\001\n" + "\tRouteRule\022J\n" + "\007matches\030\001" + " \003(\01324.google.cloud.networkservices.v1.TlsRoute.RouteMatchB\003\340A\002\022J\n" @@ -126,8 +129,8 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\010sni_host\030\001 \003(\tB\003\340A\001\022\021\n" + "\004alpn\030\002 \003(\tB\003\340A\001\032\232\001\n" + "\013RouteAction\022U\n" - + "\014destinations\030\001" - + " \003(\0132:.google.cloud.networkservices.v1.TlsRoute.RouteDestinationB\003\340A\002\0224\n" + + "\014destinations\030\001 \003(\0132:" + + ".google.cloud.networkservices.v1.TlsRoute.RouteDestinationB\003\340A\002\0224\n" + "\014idle_timeout\030\004 \001(\0132\031.google.protobuf.DurationB\003\340A\001\032l\n" + "\020RouteDestination\022C\n" + "\014service_name\030\001 \001(\tB-\340A\002\372A\'\n" @@ -136,11 +139,11 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\013LabelsEntry\022\013\n" + "\003key\030\001 \001(\t\022\r\n" + "\005value\030\002 \001(\t:\0028\001:k\352Ah\n" - + "\'networkservices.googleapis.com" - + "/TlsRoute\022=projects/{project}/locations/{location}/tlsRoutes/{tls_route}\"\243\001\n" + + "\'networkservices.googleapis.com/TlsRoute" + + "\022=projects/{project}/locations/{location}/tlsRoutes/{tls_route}\"\243\001\n" + "\024ListTlsRoutesRequest\022?\n" - + "\006parent\030\001 \001(\tB/\340A\002\372A" - + ")\022\'networkservices.googleapis.com/TlsRoute\022\021\n" + + "\006parent\030\001 \001(" + + "\tB/\340A\002\372A)\022\'networkservices.googleapis.com/TlsRoute\022\021\n" + "\tpage_size\030\002 \001(\005\022\022\n\n" + "page_token\030\003 \001(\t\022#\n" + "\026return_partial_success\030\004 \001(\010B\003\340A\001\"\204\001\n" @@ -155,20 +158,22 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\006parent\030\001 \001(" + "\tB/\340A\002\372A)\022\'networkservices.googleapis.com/TlsRoute\022\031\n" + "\014tls_route_id\030\002 \001(\tB\003\340A\002\022A\n" - + "\ttls_route\030\003 \001(\0132).go" - + "ogle.cloud.networkservices.v1.TlsRouteB\003\340A\002\"\220\001\n" + + "\ttls_route\030\003" + + " \001(\0132).google.cloud.networkservices.v1.TlsRouteB\003\340A\002\"\220\001\n" + "\025UpdateTlsRouteRequest\0224\n" + "\013update_mask\030\001 \001(\0132\032.google.protobuf.FieldMaskB\003\340A\001\022A\n" + "\ttls_route\030\002" + " \001(\0132).google.cloud.networkservices.v1.TlsRouteB\003\340A\002\"V\n" + "\025DeleteTlsRouteRequest\022=\n" + "\004name\030\001 \001(\tB/\340A\002\372A)\n" - + "\'networkservices.googleapis.com/TlsRouteB\356\001\n" + + "\'networkservices.googleapis.com/TlsRouteB\345\002\n" + "#com.google.cloud.networkservices.v1B\r" - + "TlsRouteProtoP\001ZMcloud.google.com/go/networkservices/apiv1/networkservicespb;net" - + "workservicespb\252\002\037Google.Cloud.NetworkSer" - + "vices.V1\312\002\037Google\\Cloud\\NetworkServices\\" - + "V1\352\002\"Google::Cloud::NetworkServices::V1b\006proto3" + + "TlsRouteProtoP\001ZMcloud.google.com/go/networkservi" + + "ces/apiv1/networkservicespb;networkservi" + + "cespb\252\002\037Google.Cloud.NetworkServices.V1\312" + + "\002\037Google\\Cloud\\NetworkServices\\V1\352\002\"Google::Cloud::NetworkServices::V1\352At\n" + + "%compute.googleapis.com/TargetTcpProxy\022Kprojec" + + "ts/{project}/locations/{location}/targetTcpProxies/{target_tcp_proxy}b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -194,6 +199,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Rules", "Meshes", "Gateways", + "TargetProxies", "Labels", }); internal_static_google_cloud_networkservices_v1_TlsRoute_RouteRule_descriptor = @@ -294,6 +300,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.protobuf.ExtensionRegistry.newInstance(); registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); registry.add(com.google.api.ResourceProto.resource); + registry.add(com.google.api.ResourceProto.resourceDefinition); registry.add(com.google.api.ResourceProto.resourceReference); com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( descriptor, registry); diff --git a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/UpdateAgentGatewayRequest.java b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/UpdateAgentGatewayRequest.java new file mode 100644 index 000000000000..d3d2a485d325 --- /dev/null +++ b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/UpdateAgentGatewayRequest.java @@ -0,0 +1,1067 @@ +/* + * 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/cloud/networkservices/v1/agent_gateway.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkservices.v1; + +/** + * + * + *
            + * Request used by the UpdateAgentGateway method.
            + * 
            + * + * Protobuf type {@code google.cloud.networkservices.v1.UpdateAgentGatewayRequest} + */ +@com.google.protobuf.Generated +public final class UpdateAgentGatewayRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.networkservices.v1.UpdateAgentGatewayRequest) + UpdateAgentGatewayRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "UpdateAgentGatewayRequest"); + } + + // Use UpdateAgentGatewayRequest.newBuilder() to construct. + private UpdateAgentGatewayRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private UpdateAgentGatewayRequest() {} + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkservices.v1.AgentGatewayProto + .internal_static_google_cloud_networkservices_v1_UpdateAgentGatewayRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkservices.v1.AgentGatewayProto + .internal_static_google_cloud_networkservices_v1_UpdateAgentGatewayRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkservices.v1.UpdateAgentGatewayRequest.class, + com.google.cloud.networkservices.v1.UpdateAgentGatewayRequest.Builder.class); + } + + private int bitField0_; + public static final int UPDATE_MASK_FIELD_NUMBER = 1; + private com.google.protobuf.FieldMask updateMask_; + + /** + * + * + *
            +   * Optional. Field mask is used to specify the fields to be overwritten in the
            +   * AgentGateway resource by the update.
            +   * The fields specified in the update_mask are relative to the resource, not
            +   * the full request. A field will be overwritten if it is in the mask. If the
            +   * user does not provide a mask then all fields will be overwritten.
            +   * 
            + * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the updateMask field is set. + */ + @java.lang.Override + public boolean hasUpdateMask() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
            +   * Optional. Field mask is used to specify the fields to be overwritten in the
            +   * AgentGateway resource by the update.
            +   * The fields specified in the update_mask are relative to the resource, not
            +   * the full request. A field will be overwritten if it is in the mask. If the
            +   * user does not provide a mask then all fields will be overwritten.
            +   * 
            + * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The updateMask. + */ + @java.lang.Override + public com.google.protobuf.FieldMask getUpdateMask() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + + /** + * + * + *
            +   * Optional. Field mask is used to specify the fields to be overwritten in the
            +   * AgentGateway resource by the update.
            +   * The fields specified in the update_mask are relative to the resource, not
            +   * the full request. A field will be overwritten if it is in the mask. If the
            +   * user does not provide a mask then all fields will be overwritten.
            +   * 
            + * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + + public static final int AGENT_GATEWAY_FIELD_NUMBER = 2; + private com.google.cloud.networkservices.v1.AgentGateway agentGateway_; + + /** + * + * + *
            +   * Required. Updated AgentGateway resource.
            +   * 
            + * + * + * .google.cloud.networkservices.v1.AgentGateway agent_gateway = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the agentGateway field is set. + */ + @java.lang.Override + public boolean hasAgentGateway() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
            +   * Required. Updated AgentGateway resource.
            +   * 
            + * + * + * .google.cloud.networkservices.v1.AgentGateway agent_gateway = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The agentGateway. + */ + @java.lang.Override + public com.google.cloud.networkservices.v1.AgentGateway getAgentGateway() { + return agentGateway_ == null + ? com.google.cloud.networkservices.v1.AgentGateway.getDefaultInstance() + : agentGateway_; + } + + /** + * + * + *
            +   * Required. Updated AgentGateway resource.
            +   * 
            + * + * + * .google.cloud.networkservices.v1.AgentGateway agent_gateway = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.networkservices.v1.AgentGatewayOrBuilder getAgentGatewayOrBuilder() { + return agentGateway_ == null + ? com.google.cloud.networkservices.v1.AgentGateway.getDefaultInstance() + : agentGateway_; + } + + 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, getUpdateMask()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(2, getAgentGateway()); + } + 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, getUpdateMask()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getAgentGateway()); + } + 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.networkservices.v1.UpdateAgentGatewayRequest)) { + return super.equals(obj); + } + com.google.cloud.networkservices.v1.UpdateAgentGatewayRequest other = + (com.google.cloud.networkservices.v1.UpdateAgentGatewayRequest) obj; + + if (hasUpdateMask() != other.hasUpdateMask()) return false; + if (hasUpdateMask()) { + if (!getUpdateMask().equals(other.getUpdateMask())) return false; + } + if (hasAgentGateway() != other.hasAgentGateway()) return false; + if (hasAgentGateway()) { + if (!getAgentGateway().equals(other.getAgentGateway())) 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 (hasUpdateMask()) { + hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; + hash = (53 * hash) + getUpdateMask().hashCode(); + } + if (hasAgentGateway()) { + hash = (37 * hash) + AGENT_GATEWAY_FIELD_NUMBER; + hash = (53 * hash) + getAgentGateway().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.networkservices.v1.UpdateAgentGatewayRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkservices.v1.UpdateAgentGatewayRequest 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.networkservices.v1.UpdateAgentGatewayRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkservices.v1.UpdateAgentGatewayRequest 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.networkservices.v1.UpdateAgentGatewayRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.networkservices.v1.UpdateAgentGatewayRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.networkservices.v1.UpdateAgentGatewayRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkservices.v1.UpdateAgentGatewayRequest 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.networkservices.v1.UpdateAgentGatewayRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.networkservices.v1.UpdateAgentGatewayRequest 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.networkservices.v1.UpdateAgentGatewayRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.networkservices.v1.UpdateAgentGatewayRequest 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.networkservices.v1.UpdateAgentGatewayRequest 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 used by the UpdateAgentGateway method.
            +   * 
            + * + * Protobuf type {@code google.cloud.networkservices.v1.UpdateAgentGatewayRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.networkservices.v1.UpdateAgentGatewayRequest) + com.google.cloud.networkservices.v1.UpdateAgentGatewayRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.networkservices.v1.AgentGatewayProto + .internal_static_google_cloud_networkservices_v1_UpdateAgentGatewayRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.networkservices.v1.AgentGatewayProto + .internal_static_google_cloud_networkservices_v1_UpdateAgentGatewayRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.networkservices.v1.UpdateAgentGatewayRequest.class, + com.google.cloud.networkservices.v1.UpdateAgentGatewayRequest.Builder.class); + } + + // Construct using com.google.cloud.networkservices.v1.UpdateAgentGatewayRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetUpdateMaskFieldBuilder(); + internalGetAgentGatewayFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + agentGateway_ = null; + if (agentGatewayBuilder_ != null) { + agentGatewayBuilder_.dispose(); + agentGatewayBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.networkservices.v1.AgentGatewayProto + .internal_static_google_cloud_networkservices_v1_UpdateAgentGatewayRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.networkservices.v1.UpdateAgentGatewayRequest + getDefaultInstanceForType() { + return com.google.cloud.networkservices.v1.UpdateAgentGatewayRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.networkservices.v1.UpdateAgentGatewayRequest build() { + com.google.cloud.networkservices.v1.UpdateAgentGatewayRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.networkservices.v1.UpdateAgentGatewayRequest buildPartial() { + com.google.cloud.networkservices.v1.UpdateAgentGatewayRequest result = + new com.google.cloud.networkservices.v1.UpdateAgentGatewayRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.networkservices.v1.UpdateAgentGatewayRequest result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.updateMask_ = updateMaskBuilder_ == null ? updateMask_ : updateMaskBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.agentGateway_ = + agentGatewayBuilder_ == null ? agentGateway_ : agentGatewayBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.networkservices.v1.UpdateAgentGatewayRequest) { + return mergeFrom((com.google.cloud.networkservices.v1.UpdateAgentGatewayRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.networkservices.v1.UpdateAgentGatewayRequest other) { + if (other + == com.google.cloud.networkservices.v1.UpdateAgentGatewayRequest.getDefaultInstance()) + return this; + if (other.hasUpdateMask()) { + mergeUpdateMask(other.getUpdateMask()); + } + if (other.hasAgentGateway()) { + mergeAgentGateway(other.getAgentGateway()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage( + internalGetUpdateMaskFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage( + internalGetAgentGatewayFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.protobuf.FieldMask updateMask_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + updateMaskBuilder_; + + /** + * + * + *
            +     * Optional. Field mask is used to specify the fields to be overwritten in the
            +     * AgentGateway resource by the update.
            +     * The fields specified in the update_mask are relative to the resource, not
            +     * the full request. A field will be overwritten if it is in the mask. If the
            +     * user does not provide a mask then all fields will be overwritten.
            +     * 
            + * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the updateMask field is set. + */ + public boolean hasUpdateMask() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
            +     * Optional. Field mask is used to specify the fields to be overwritten in the
            +     * AgentGateway resource by the update.
            +     * The fields specified in the update_mask are relative to the resource, not
            +     * the full request. A field will be overwritten if it is in the mask. If the
            +     * user does not provide a mask then all fields will be overwritten.
            +     * 
            + * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The updateMask. + */ + public com.google.protobuf.FieldMask getUpdateMask() { + if (updateMaskBuilder_ == null) { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } else { + return updateMaskBuilder_.getMessage(); + } + } + + /** + * + * + *
            +     * Optional. Field mask is used to specify the fields to be overwritten in the
            +     * AgentGateway resource by the update.
            +     * The fields specified in the update_mask are relative to the resource, not
            +     * the full request. A field will be overwritten if it is in the mask. If the
            +     * user does not provide a mask then all fields will be overwritten.
            +     * 
            + * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateMask_ = value; + } else { + updateMaskBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Optional. Field mask is used to specify the fields to be overwritten in the
            +     * AgentGateway resource by the update.
            +     * The fields specified in the update_mask are relative to the resource, not
            +     * the full request. A field will be overwritten if it is in the mask. If the
            +     * user does not provide a mask then all fields will be overwritten.
            +     * 
            + * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForValue) { + if (updateMaskBuilder_ == null) { + updateMask_ = builderForValue.build(); + } else { + updateMaskBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Optional. Field mask is used to specify the fields to be overwritten in the
            +     * AgentGateway resource by the update.
            +     * The fields specified in the update_mask are relative to the resource, not
            +     * the full request. A field will be overwritten if it is in the mask. If the
            +     * user does not provide a mask then all fields will be overwritten.
            +     * 
            + * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && updateMask_ != null + && updateMask_ != com.google.protobuf.FieldMask.getDefaultInstance()) { + getUpdateMaskBuilder().mergeFrom(value); + } else { + updateMask_ = value; + } + } else { + updateMaskBuilder_.mergeFrom(value); + } + if (updateMask_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + + /** + * + * + *
            +     * Optional. Field mask is used to specify the fields to be overwritten in the
            +     * AgentGateway resource by the update.
            +     * The fields specified in the update_mask are relative to the resource, not
            +     * the full request. A field will be overwritten if it is in the mask. If the
            +     * user does not provide a mask then all fields will be overwritten.
            +     * 
            + * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearUpdateMask() { + bitField0_ = (bitField0_ & ~0x00000001); + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
            +     * Optional. Field mask is used to specify the fields to be overwritten in the
            +     * AgentGateway resource by the update.
            +     * The fields specified in the update_mask are relative to the resource, not
            +     * the full request. A field will be overwritten if it is in the mask. If the
            +     * user does not provide a mask then all fields will be overwritten.
            +     * 
            + * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return internalGetUpdateMaskFieldBuilder().getBuilder(); + } + + /** + * + * + *
            +     * Optional. Field mask is used to specify the fields to be overwritten in the
            +     * AgentGateway resource by the update.
            +     * The fields specified in the update_mask are relative to the resource, not
            +     * the full request. A field will be overwritten if it is in the mask. If the
            +     * user does not provide a mask then all fields will be overwritten.
            +     * 
            + * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + if (updateMaskBuilder_ != null) { + return updateMaskBuilder_.getMessageOrBuilder(); + } else { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } + } + + /** + * + * + *
            +     * Optional. Field mask is used to specify the fields to be overwritten in the
            +     * AgentGateway resource by the update.
            +     * The fields specified in the update_mask are relative to the resource, not
            +     * the full request. A field will be overwritten if it is in the mask. If the
            +     * user does not provide a mask then all fields will be overwritten.
            +     * 
            + * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + internalGetUpdateMaskFieldBuilder() { + if (updateMaskBuilder_ == null) { + updateMaskBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder>( + getUpdateMask(), getParentForChildren(), isClean()); + updateMask_ = null; + } + return updateMaskBuilder_; + } + + private com.google.cloud.networkservices.v1.AgentGateway agentGateway_; + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.networkservices.v1.AgentGateway, + com.google.cloud.networkservices.v1.AgentGateway.Builder, + com.google.cloud.networkservices.v1.AgentGatewayOrBuilder> + agentGatewayBuilder_; + + /** + * + * + *
            +     * Required. Updated AgentGateway resource.
            +     * 
            + * + * + * .google.cloud.networkservices.v1.AgentGateway agent_gateway = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the agentGateway field is set. + */ + public boolean hasAgentGateway() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
            +     * Required. Updated AgentGateway resource.
            +     * 
            + * + * + * .google.cloud.networkservices.v1.AgentGateway agent_gateway = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The agentGateway. + */ + public com.google.cloud.networkservices.v1.AgentGateway getAgentGateway() { + if (agentGatewayBuilder_ == null) { + return agentGateway_ == null + ? com.google.cloud.networkservices.v1.AgentGateway.getDefaultInstance() + : agentGateway_; + } else { + return agentGatewayBuilder_.getMessage(); + } + } + + /** + * + * + *
            +     * Required. Updated AgentGateway resource.
            +     * 
            + * + * + * .google.cloud.networkservices.v1.AgentGateway agent_gateway = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setAgentGateway(com.google.cloud.networkservices.v1.AgentGateway value) { + if (agentGatewayBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + agentGateway_ = value; + } else { + agentGatewayBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Required. Updated AgentGateway resource.
            +     * 
            + * + * + * .google.cloud.networkservices.v1.AgentGateway agent_gateway = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setAgentGateway( + com.google.cloud.networkservices.v1.AgentGateway.Builder builderForValue) { + if (agentGatewayBuilder_ == null) { + agentGateway_ = builderForValue.build(); + } else { + agentGatewayBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
            +     * Required. Updated AgentGateway resource.
            +     * 
            + * + * + * .google.cloud.networkservices.v1.AgentGateway agent_gateway = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeAgentGateway(com.google.cloud.networkservices.v1.AgentGateway value) { + if (agentGatewayBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && agentGateway_ != null + && agentGateway_ + != com.google.cloud.networkservices.v1.AgentGateway.getDefaultInstance()) { + getAgentGatewayBuilder().mergeFrom(value); + } else { + agentGateway_ = value; + } + } else { + agentGatewayBuilder_.mergeFrom(value); + } + if (agentGateway_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** + * + * + *
            +     * Required. Updated AgentGateway resource.
            +     * 
            + * + * + * .google.cloud.networkservices.v1.AgentGateway agent_gateway = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearAgentGateway() { + bitField0_ = (bitField0_ & ~0x00000002); + agentGateway_ = null; + if (agentGatewayBuilder_ != null) { + agentGatewayBuilder_.dispose(); + agentGatewayBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
            +     * Required. Updated AgentGateway resource.
            +     * 
            + * + * + * .google.cloud.networkservices.v1.AgentGateway agent_gateway = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.networkservices.v1.AgentGateway.Builder getAgentGatewayBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return internalGetAgentGatewayFieldBuilder().getBuilder(); + } + + /** + * + * + *
            +     * Required. Updated AgentGateway resource.
            +     * 
            + * + * + * .google.cloud.networkservices.v1.AgentGateway agent_gateway = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.networkservices.v1.AgentGatewayOrBuilder getAgentGatewayOrBuilder() { + if (agentGatewayBuilder_ != null) { + return agentGatewayBuilder_.getMessageOrBuilder(); + } else { + return agentGateway_ == null + ? com.google.cloud.networkservices.v1.AgentGateway.getDefaultInstance() + : agentGateway_; + } + } + + /** + * + * + *
            +     * Required. Updated AgentGateway resource.
            +     * 
            + * + * + * .google.cloud.networkservices.v1.AgentGateway agent_gateway = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.cloud.networkservices.v1.AgentGateway, + com.google.cloud.networkservices.v1.AgentGateway.Builder, + com.google.cloud.networkservices.v1.AgentGatewayOrBuilder> + internalGetAgentGatewayFieldBuilder() { + if (agentGatewayBuilder_ == null) { + agentGatewayBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.cloud.networkservices.v1.AgentGateway, + com.google.cloud.networkservices.v1.AgentGateway.Builder, + com.google.cloud.networkservices.v1.AgentGatewayOrBuilder>( + getAgentGateway(), getParentForChildren(), isClean()); + agentGateway_ = null; + } + return agentGatewayBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.networkservices.v1.UpdateAgentGatewayRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.networkservices.v1.UpdateAgentGatewayRequest) + private static final com.google.cloud.networkservices.v1.UpdateAgentGatewayRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.networkservices.v1.UpdateAgentGatewayRequest(); + } + + public static com.google.cloud.networkservices.v1.UpdateAgentGatewayRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateAgentGatewayRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.networkservices.v1.UpdateAgentGatewayRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/UpdateAgentGatewayRequestOrBuilder.java b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/UpdateAgentGatewayRequestOrBuilder.java new file mode 100644 index 000000000000..66efffa06353 --- /dev/null +++ b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/UpdateAgentGatewayRequestOrBuilder.java @@ -0,0 +1,123 @@ +/* + * 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/cloud/networkservices/v1/agent_gateway.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.networkservices.v1; + +@com.google.protobuf.Generated +public interface UpdateAgentGatewayRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.networkservices.v1.UpdateAgentGatewayRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
            +   * Optional. Field mask is used to specify the fields to be overwritten in the
            +   * AgentGateway resource by the update.
            +   * The fields specified in the update_mask are relative to the resource, not
            +   * the full request. A field will be overwritten if it is in the mask. If the
            +   * user does not provide a mask then all fields will be overwritten.
            +   * 
            + * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the updateMask field is set. + */ + boolean hasUpdateMask(); + + /** + * + * + *
            +   * Optional. Field mask is used to specify the fields to be overwritten in the
            +   * AgentGateway resource by the update.
            +   * The fields specified in the update_mask are relative to the resource, not
            +   * the full request. A field will be overwritten if it is in the mask. If the
            +   * user does not provide a mask then all fields will be overwritten.
            +   * 
            + * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The updateMask. + */ + com.google.protobuf.FieldMask getUpdateMask(); + + /** + * + * + *
            +   * Optional. Field mask is used to specify the fields to be overwritten in the
            +   * AgentGateway resource by the update.
            +   * The fields specified in the update_mask are relative to the resource, not
            +   * the full request. A field will be overwritten if it is in the mask. If the
            +   * user does not provide a mask then all fields will be overwritten.
            +   * 
            + * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); + + /** + * + * + *
            +   * Required. Updated AgentGateway resource.
            +   * 
            + * + * + * .google.cloud.networkservices.v1.AgentGateway agent_gateway = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the agentGateway field is set. + */ + boolean hasAgentGateway(); + + /** + * + * + *
            +   * Required. Updated AgentGateway resource.
            +   * 
            + * + * + * .google.cloud.networkservices.v1.AgentGateway agent_gateway = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The agentGateway. + */ + com.google.cloud.networkservices.v1.AgentGateway getAgentGateway(); + + /** + * + * + *
            +   * Required. Updated AgentGateway resource.
            +   * 
            + * + * + * .google.cloud.networkservices.v1.AgentGateway agent_gateway = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.networkservices.v1.AgentGatewayOrBuilder getAgentGatewayOrBuilder(); +} diff --git a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/WasmPlugin.java b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/WasmPlugin.java index 41cf43151333..9860c0ac8e02 100644 --- a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/WasmPlugin.java +++ b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/WasmPlugin.java @@ -133,10 +133,23 @@ public interface VersionDetailsOrBuilder *
                  * URI of the plugin configuration stored in the Artifact Registry.
                  * The configuration is provided to the plugin at runtime through
            -     * the `ON_CONFIGURE` callback. The container image must
            -     * contain only a single file with the name
            -     * `plugin.config`. When a new `WasmPluginVersion`
            -     * resource is created, the digest of the container image is saved in the
            +     * the `ON_CONFIGURE` callback.
            +     *
            +     * The URI can refer to one of the following repository formats:
            +     *
            +     * * Container images: the `plugin_config_uri` must point to a container
            +     * that contains a single file with the name `plugin.config`.
            +     * When a new `WasmPluginVersion` resource is created, the digest of the
            +     * image is saved in the `plugin_config_digest` field.
            +     * When pulling a container image from Artifact Registry, the digest
            +     * value is used instead of an image tag.
            +     *
            +     * * Generic artifacts: the `plugin_config_uri` must be in this format:
            +     * `projects/{project}/locations/{location}/repositories/{repository}/
            +     * genericArtifacts/{package}:{version}`.
            +     * The specified package and version must contain a file with the name
            +     * `plugin.config`. When a new `WasmPluginVersion` resource is
            +     * created, the checksum of the contents of the file is saved in the
                  * `plugin_config_digest` field.
                  * 
            * @@ -152,10 +165,23 @@ public interface VersionDetailsOrBuilder *
                  * URI of the plugin configuration stored in the Artifact Registry.
                  * The configuration is provided to the plugin at runtime through
            -     * the `ON_CONFIGURE` callback. The container image must
            -     * contain only a single file with the name
            -     * `plugin.config`. When a new `WasmPluginVersion`
            -     * resource is created, the digest of the container image is saved in the
            +     * the `ON_CONFIGURE` callback.
            +     *
            +     * The URI can refer to one of the following repository formats:
            +     *
            +     * * Container images: the `plugin_config_uri` must point to a container
            +     * that contains a single file with the name `plugin.config`.
            +     * When a new `WasmPluginVersion` resource is created, the digest of the
            +     * image is saved in the `plugin_config_digest` field.
            +     * When pulling a container image from Artifact Registry, the digest
            +     * value is used instead of an image tag.
            +     *
            +     * * Generic artifacts: the `plugin_config_uri` must be in this format:
            +     * `projects/{project}/locations/{location}/repositories/{repository}/
            +     * genericArtifacts/{package}:{version}`.
            +     * The specified package and version must contain a file with the name
            +     * `plugin.config`. When a new `WasmPluginVersion` resource is
            +     * created, the checksum of the contents of the file is saved in the
                  * `plugin_config_digest` field.
                  * 
            * @@ -171,10 +197,23 @@ public interface VersionDetailsOrBuilder *
                  * URI of the plugin configuration stored in the Artifact Registry.
                  * The configuration is provided to the plugin at runtime through
            -     * the `ON_CONFIGURE` callback. The container image must
            -     * contain only a single file with the name
            -     * `plugin.config`. When a new `WasmPluginVersion`
            -     * resource is created, the digest of the container image is saved in the
            +     * the `ON_CONFIGURE` callback.
            +     *
            +     * The URI can refer to one of the following repository formats:
            +     *
            +     * * Container images: the `plugin_config_uri` must point to a container
            +     * that contains a single file with the name `plugin.config`.
            +     * When a new `WasmPluginVersion` resource is created, the digest of the
            +     * image is saved in the `plugin_config_digest` field.
            +     * When pulling a container image from Artifact Registry, the digest
            +     * value is used instead of an image tag.
            +     *
            +     * * Generic artifacts: the `plugin_config_uri` must be in this format:
            +     * `projects/{project}/locations/{location}/repositories/{repository}/
            +     * genericArtifacts/{package}:{version}`.
            +     * The specified package and version must contain a file with the name
            +     * `plugin.config`. When a new `WasmPluginVersion` resource is
            +     * created, the checksum of the contents of the file is saved in the
                  * `plugin_config_digest` field.
                  * 
            * @@ -368,11 +407,25 @@ java.lang.String getLabelsOrDefault( * * *
            -     * Optional. URI of the container image containing the Wasm module, stored
            -     * in the Artifact Registry. The container image must contain only a single
            -     * file with the name `plugin.wasm`. When a new `WasmPluginVersion` resource
            -     * is created, the URI gets resolved to an image digest and saved in the
            -     * `image_digest` field.
            +     * Optional. URI of the image containing the Wasm module, stored in
            +     * Artifact Registry.
            +     *
            +     * The URI can refer to one of the following repository formats:
            +     *
            +     * * Container images: the `image_uri` must point to a container that
            +     * contains a single file with the name `plugin.wasm`.
            +     * When a new `WasmPluginVersion` resource is created, the digest of the
            +     * image is saved in the `image_digest` field.
            +     * When pulling a container image from Artifact Registry, the digest value
            +     * is used instead of an image tag.
            +     *
            +     * * Generic artifacts: the `image_uri` must be in this format:
            +     * `projects/{project}/locations/{location}/repositories/{repository}/
            +     * genericArtifacts/{package}:{version}`.
            +     * The specified package and version must contain a file with the name
            +     * `plugin.wasm`. When a new `WasmPluginVersion` resource is created, the
            +     * checksum of the contents of the file is saved in the `image_digest`
            +     * field.
                  * 
            * * string image_uri = 5 [(.google.api.field_behavior) = OPTIONAL]; @@ -385,11 +438,25 @@ java.lang.String getLabelsOrDefault( * * *
            -     * Optional. URI of the container image containing the Wasm module, stored
            -     * in the Artifact Registry. The container image must contain only a single
            -     * file with the name `plugin.wasm`. When a new `WasmPluginVersion` resource
            -     * is created, the URI gets resolved to an image digest and saved in the
            -     * `image_digest` field.
            +     * Optional. URI of the image containing the Wasm module, stored in
            +     * Artifact Registry.
            +     *
            +     * The URI can refer to one of the following repository formats:
            +     *
            +     * * Container images: the `image_uri` must point to a container that
            +     * contains a single file with the name `plugin.wasm`.
            +     * When a new `WasmPluginVersion` resource is created, the digest of the
            +     * image is saved in the `image_digest` field.
            +     * When pulling a container image from Artifact Registry, the digest value
            +     * is used instead of an image tag.
            +     *
            +     * * Generic artifacts: the `image_uri` must be in this format:
            +     * `projects/{project}/locations/{location}/repositories/{repository}/
            +     * genericArtifacts/{package}:{version}`.
            +     * The specified package and version must contain a file with the name
            +     * `plugin.wasm`. When a new `WasmPluginVersion` resource is created, the
            +     * checksum of the contents of the file is saved in the `image_digest`
            +     * field.
                  * 
            * * string image_uri = 5 [(.google.api.field_behavior) = OPTIONAL]; @@ -402,11 +469,12 @@ java.lang.String getLabelsOrDefault( * * *
            -     * Output only. The resolved digest for the image specified in `image`.
            -     * The digest is resolved during the creation of a
            -     * `WasmPluginVersion` resource.
            -     * This field holds the digest value regardless of whether a tag or
            -     * digest was originally specified in the `image` field.
            +     * Output only. This field holds the digest (usually checksum) value for the
            +     * plugin image. The value is calculated based on the `image_uri` field. If
            +     * the `image_uri` field refers to a container image, the digest value is
            +     * obtained from the container image. If the `image_uri` field refers to
            +     * a generic artifact, the digest value is calculated based on the
            +     * contents of the file.
                  * 
            * * string image_digest = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -419,11 +487,12 @@ java.lang.String getLabelsOrDefault( * * *
            -     * Output only. The resolved digest for the image specified in `image`.
            -     * The digest is resolved during the creation of a
            -     * `WasmPluginVersion` resource.
            -     * This field holds the digest value regardless of whether a tag or
            -     * digest was originally specified in the `image` field.
            +     * Output only. This field holds the digest (usually checksum) value for the
            +     * plugin image. The value is calculated based on the `image_uri` field. If
            +     * the `image_uri` field refers to a container image, the digest value is
            +     * obtained from the container image. If the `image_uri` field refers to
            +     * a generic artifact, the digest value is calculated based on the
            +     * contents of the file.
                  * 
            * * string image_digest = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -438,7 +507,7 @@ java.lang.String getLabelsOrDefault( *
                  * Output only. This field holds the digest (usually checksum) value for the
                  * plugin configuration. The value is calculated based on the contents of
            -     * the `plugin_config_data` field or the container image defined by the
            +     * `plugin_config_data` field or the image defined by the
                  * `plugin_config_uri` field.
                  * 
            * @@ -454,7 +523,7 @@ java.lang.String getLabelsOrDefault( *
                  * Output only. This field holds the digest (usually checksum) value for the
                  * plugin configuration. The value is calculated based on the contents of
            -     * the `plugin_config_data` field or the container image defined by the
            +     * `plugin_config_data` field or the image defined by the
                  * `plugin_config_uri` field.
                  * 
            * @@ -637,10 +706,23 @@ public com.google.protobuf.ByteString getPluginConfigData() { *
                  * URI of the plugin configuration stored in the Artifact Registry.
                  * The configuration is provided to the plugin at runtime through
            -     * the `ON_CONFIGURE` callback. The container image must
            -     * contain only a single file with the name
            -     * `plugin.config`. When a new `WasmPluginVersion`
            -     * resource is created, the digest of the container image is saved in the
            +     * the `ON_CONFIGURE` callback.
            +     *
            +     * The URI can refer to one of the following repository formats:
            +     *
            +     * * Container images: the `plugin_config_uri` must point to a container
            +     * that contains a single file with the name `plugin.config`.
            +     * When a new `WasmPluginVersion` resource is created, the digest of the
            +     * image is saved in the `plugin_config_digest` field.
            +     * When pulling a container image from Artifact Registry, the digest
            +     * value is used instead of an image tag.
            +     *
            +     * * Generic artifacts: the `plugin_config_uri` must be in this format:
            +     * `projects/{project}/locations/{location}/repositories/{repository}/
            +     * genericArtifacts/{package}:{version}`.
            +     * The specified package and version must contain a file with the name
            +     * `plugin.config`. When a new `WasmPluginVersion` resource is
            +     * created, the checksum of the contents of the file is saved in the
                  * `plugin_config_digest` field.
                  * 
            * @@ -658,10 +740,23 @@ public boolean hasPluginConfigUri() { *
                  * URI of the plugin configuration stored in the Artifact Registry.
                  * The configuration is provided to the plugin at runtime through
            -     * the `ON_CONFIGURE` callback. The container image must
            -     * contain only a single file with the name
            -     * `plugin.config`. When a new `WasmPluginVersion`
            -     * resource is created, the digest of the container image is saved in the
            +     * the `ON_CONFIGURE` callback.
            +     *
            +     * The URI can refer to one of the following repository formats:
            +     *
            +     * * Container images: the `plugin_config_uri` must point to a container
            +     * that contains a single file with the name `plugin.config`.
            +     * When a new `WasmPluginVersion` resource is created, the digest of the
            +     * image is saved in the `plugin_config_digest` field.
            +     * When pulling a container image from Artifact Registry, the digest
            +     * value is used instead of an image tag.
            +     *
            +     * * Generic artifacts: the `plugin_config_uri` must be in this format:
            +     * `projects/{project}/locations/{location}/repositories/{repository}/
            +     * genericArtifacts/{package}:{version}`.
            +     * The specified package and version must contain a file with the name
            +     * `plugin.config`. When a new `WasmPluginVersion` resource is
            +     * created, the checksum of the contents of the file is saved in the
                  * `plugin_config_digest` field.
                  * 
            * @@ -692,10 +787,23 @@ public java.lang.String getPluginConfigUri() { *
                  * URI of the plugin configuration stored in the Artifact Registry.
                  * The configuration is provided to the plugin at runtime through
            -     * the `ON_CONFIGURE` callback. The container image must
            -     * contain only a single file with the name
            -     * `plugin.config`. When a new `WasmPluginVersion`
            -     * resource is created, the digest of the container image is saved in the
            +     * the `ON_CONFIGURE` callback.
            +     *
            +     * The URI can refer to one of the following repository formats:
            +     *
            +     * * Container images: the `plugin_config_uri` must point to a container
            +     * that contains a single file with the name `plugin.config`.
            +     * When a new `WasmPluginVersion` resource is created, the digest of the
            +     * image is saved in the `plugin_config_digest` field.
            +     * When pulling a container image from Artifact Registry, the digest
            +     * value is used instead of an image tag.
            +     *
            +     * * Generic artifacts: the `plugin_config_uri` must be in this format:
            +     * `projects/{project}/locations/{location}/repositories/{repository}/
            +     * genericArtifacts/{package}:{version}`.
            +     * The specified package and version must contain a file with the name
            +     * `plugin.config`. When a new `WasmPluginVersion` resource is
            +     * created, the checksum of the contents of the file is saved in the
                  * `plugin_config_digest` field.
                  * 
            * @@ -1003,11 +1111,25 @@ public java.lang.String getLabelsOrThrow(java.lang.String key) { * * *
            -     * Optional. URI of the container image containing the Wasm module, stored
            -     * in the Artifact Registry. The container image must contain only a single
            -     * file with the name `plugin.wasm`. When a new `WasmPluginVersion` resource
            -     * is created, the URI gets resolved to an image digest and saved in the
            -     * `image_digest` field.
            +     * Optional. URI of the image containing the Wasm module, stored in
            +     * Artifact Registry.
            +     *
            +     * The URI can refer to one of the following repository formats:
            +     *
            +     * * Container images: the `image_uri` must point to a container that
            +     * contains a single file with the name `plugin.wasm`.
            +     * When a new `WasmPluginVersion` resource is created, the digest of the
            +     * image is saved in the `image_digest` field.
            +     * When pulling a container image from Artifact Registry, the digest value
            +     * is used instead of an image tag.
            +     *
            +     * * Generic artifacts: the `image_uri` must be in this format:
            +     * `projects/{project}/locations/{location}/repositories/{repository}/
            +     * genericArtifacts/{package}:{version}`.
            +     * The specified package and version must contain a file with the name
            +     * `plugin.wasm`. When a new `WasmPluginVersion` resource is created, the
            +     * checksum of the contents of the file is saved in the `image_digest`
            +     * field.
                  * 
            * * string image_uri = 5 [(.google.api.field_behavior) = OPTIONAL]; @@ -1031,11 +1153,25 @@ public java.lang.String getImageUri() { * * *
            -     * Optional. URI of the container image containing the Wasm module, stored
            -     * in the Artifact Registry. The container image must contain only a single
            -     * file with the name `plugin.wasm`. When a new `WasmPluginVersion` resource
            -     * is created, the URI gets resolved to an image digest and saved in the
            -     * `image_digest` field.
            +     * Optional. URI of the image containing the Wasm module, stored in
            +     * Artifact Registry.
            +     *
            +     * The URI can refer to one of the following repository formats:
            +     *
            +     * * Container images: the `image_uri` must point to a container that
            +     * contains a single file with the name `plugin.wasm`.
            +     * When a new `WasmPluginVersion` resource is created, the digest of the
            +     * image is saved in the `image_digest` field.
            +     * When pulling a container image from Artifact Registry, the digest value
            +     * is used instead of an image tag.
            +     *
            +     * * Generic artifacts: the `image_uri` must be in this format:
            +     * `projects/{project}/locations/{location}/repositories/{repository}/
            +     * genericArtifacts/{package}:{version}`.
            +     * The specified package and version must contain a file with the name
            +     * `plugin.wasm`. When a new `WasmPluginVersion` resource is created, the
            +     * checksum of the contents of the file is saved in the `image_digest`
            +     * field.
                  * 
            * * string image_uri = 5 [(.google.api.field_behavior) = OPTIONAL]; @@ -1064,11 +1200,12 @@ public com.google.protobuf.ByteString getImageUriBytes() { * * *
            -     * Output only. The resolved digest for the image specified in `image`.
            -     * The digest is resolved during the creation of a
            -     * `WasmPluginVersion` resource.
            -     * This field holds the digest value regardless of whether a tag or
            -     * digest was originally specified in the `image` field.
            +     * Output only. This field holds the digest (usually checksum) value for the
            +     * plugin image. The value is calculated based on the `image_uri` field. If
            +     * the `image_uri` field refers to a container image, the digest value is
            +     * obtained from the container image. If the `image_uri` field refers to
            +     * a generic artifact, the digest value is calculated based on the
            +     * contents of the file.
                  * 
            * * string image_digest = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -1092,11 +1229,12 @@ public java.lang.String getImageDigest() { * * *
            -     * Output only. The resolved digest for the image specified in `image`.
            -     * The digest is resolved during the creation of a
            -     * `WasmPluginVersion` resource.
            -     * This field holds the digest value regardless of whether a tag or
            -     * digest was originally specified in the `image` field.
            +     * Output only. This field holds the digest (usually checksum) value for the
            +     * plugin image. The value is calculated based on the `image_uri` field. If
            +     * the `image_uri` field refers to a container image, the digest value is
            +     * obtained from the container image. If the `image_uri` field refers to
            +     * a generic artifact, the digest value is calculated based on the
            +     * contents of the file.
                  * 
            * * string image_digest = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -1127,7 +1265,7 @@ public com.google.protobuf.ByteString getImageDigestBytes() { *
                  * Output only. This field holds the digest (usually checksum) value for the
                  * plugin configuration. The value is calculated based on the contents of
            -     * the `plugin_config_data` field or the container image defined by the
            +     * `plugin_config_data` field or the image defined by the
                  * `plugin_config_uri` field.
                  * 
            * @@ -1154,7 +1292,7 @@ public java.lang.String getPluginConfigDigest() { *
                  * Output only. This field holds the digest (usually checksum) value for the
                  * plugin configuration. The value is calculated based on the contents of
            -     * the `plugin_config_data` field or the container image defined by the
            +     * `plugin_config_data` field or the image defined by the
                  * `plugin_config_uri` field.
                  * 
            * @@ -1889,10 +2027,23 @@ public Builder clearPluginConfigData() { *
                    * URI of the plugin configuration stored in the Artifact Registry.
                    * The configuration is provided to the plugin at runtime through
            -       * the `ON_CONFIGURE` callback. The container image must
            -       * contain only a single file with the name
            -       * `plugin.config`. When a new `WasmPluginVersion`
            -       * resource is created, the digest of the container image is saved in the
            +       * the `ON_CONFIGURE` callback.
            +       *
            +       * The URI can refer to one of the following repository formats:
            +       *
            +       * * Container images: the `plugin_config_uri` must point to a container
            +       * that contains a single file with the name `plugin.config`.
            +       * When a new `WasmPluginVersion` resource is created, the digest of the
            +       * image is saved in the `plugin_config_digest` field.
            +       * When pulling a container image from Artifact Registry, the digest
            +       * value is used instead of an image tag.
            +       *
            +       * * Generic artifacts: the `plugin_config_uri` must be in this format:
            +       * `projects/{project}/locations/{location}/repositories/{repository}/
            +       * genericArtifacts/{package}:{version}`.
            +       * The specified package and version must contain a file with the name
            +       * `plugin.config`. When a new `WasmPluginVersion` resource is
            +       * created, the checksum of the contents of the file is saved in the
                    * `plugin_config_digest` field.
                    * 
            * @@ -1911,10 +2062,23 @@ public boolean hasPluginConfigUri() { *
                    * URI of the plugin configuration stored in the Artifact Registry.
                    * The configuration is provided to the plugin at runtime through
            -       * the `ON_CONFIGURE` callback. The container image must
            -       * contain only a single file with the name
            -       * `plugin.config`. When a new `WasmPluginVersion`
            -       * resource is created, the digest of the container image is saved in the
            +       * the `ON_CONFIGURE` callback.
            +       *
            +       * The URI can refer to one of the following repository formats:
            +       *
            +       * * Container images: the `plugin_config_uri` must point to a container
            +       * that contains a single file with the name `plugin.config`.
            +       * When a new `WasmPluginVersion` resource is created, the digest of the
            +       * image is saved in the `plugin_config_digest` field.
            +       * When pulling a container image from Artifact Registry, the digest
            +       * value is used instead of an image tag.
            +       *
            +       * * Generic artifacts: the `plugin_config_uri` must be in this format:
            +       * `projects/{project}/locations/{location}/repositories/{repository}/
            +       * genericArtifacts/{package}:{version}`.
            +       * The specified package and version must contain a file with the name
            +       * `plugin.config`. When a new `WasmPluginVersion` resource is
            +       * created, the checksum of the contents of the file is saved in the
                    * `plugin_config_digest` field.
                    * 
            * @@ -1946,10 +2110,23 @@ public java.lang.String getPluginConfigUri() { *
                    * URI of the plugin configuration stored in the Artifact Registry.
                    * The configuration is provided to the plugin at runtime through
            -       * the `ON_CONFIGURE` callback. The container image must
            -       * contain only a single file with the name
            -       * `plugin.config`. When a new `WasmPluginVersion`
            -       * resource is created, the digest of the container image is saved in the
            +       * the `ON_CONFIGURE` callback.
            +       *
            +       * The URI can refer to one of the following repository formats:
            +       *
            +       * * Container images: the `plugin_config_uri` must point to a container
            +       * that contains a single file with the name `plugin.config`.
            +       * When a new `WasmPluginVersion` resource is created, the digest of the
            +       * image is saved in the `plugin_config_digest` field.
            +       * When pulling a container image from Artifact Registry, the digest
            +       * value is used instead of an image tag.
            +       *
            +       * * Generic artifacts: the `plugin_config_uri` must be in this format:
            +       * `projects/{project}/locations/{location}/repositories/{repository}/
            +       * genericArtifacts/{package}:{version}`.
            +       * The specified package and version must contain a file with the name
            +       * `plugin.config`. When a new `WasmPluginVersion` resource is
            +       * created, the checksum of the contents of the file is saved in the
                    * `plugin_config_digest` field.
                    * 
            * @@ -1981,10 +2158,23 @@ public com.google.protobuf.ByteString getPluginConfigUriBytes() { *
                    * URI of the plugin configuration stored in the Artifact Registry.
                    * The configuration is provided to the plugin at runtime through
            -       * the `ON_CONFIGURE` callback. The container image must
            -       * contain only a single file with the name
            -       * `plugin.config`. When a new `WasmPluginVersion`
            -       * resource is created, the digest of the container image is saved in the
            +       * the `ON_CONFIGURE` callback.
            +       *
            +       * The URI can refer to one of the following repository formats:
            +       *
            +       * * Container images: the `plugin_config_uri` must point to a container
            +       * that contains a single file with the name `plugin.config`.
            +       * When a new `WasmPluginVersion` resource is created, the digest of the
            +       * image is saved in the `plugin_config_digest` field.
            +       * When pulling a container image from Artifact Registry, the digest
            +       * value is used instead of an image tag.
            +       *
            +       * * Generic artifacts: the `plugin_config_uri` must be in this format:
            +       * `projects/{project}/locations/{location}/repositories/{repository}/
            +       * genericArtifacts/{package}:{version}`.
            +       * The specified package and version must contain a file with the name
            +       * `plugin.config`. When a new `WasmPluginVersion` resource is
            +       * created, the checksum of the contents of the file is saved in the
                    * `plugin_config_digest` field.
                    * 
            * @@ -2009,10 +2199,23 @@ public Builder setPluginConfigUri(java.lang.String value) { *
                    * URI of the plugin configuration stored in the Artifact Registry.
                    * The configuration is provided to the plugin at runtime through
            -       * the `ON_CONFIGURE` callback. The container image must
            -       * contain only a single file with the name
            -       * `plugin.config`. When a new `WasmPluginVersion`
            -       * resource is created, the digest of the container image is saved in the
            +       * the `ON_CONFIGURE` callback.
            +       *
            +       * The URI can refer to one of the following repository formats:
            +       *
            +       * * Container images: the `plugin_config_uri` must point to a container
            +       * that contains a single file with the name `plugin.config`.
            +       * When a new `WasmPluginVersion` resource is created, the digest of the
            +       * image is saved in the `plugin_config_digest` field.
            +       * When pulling a container image from Artifact Registry, the digest
            +       * value is used instead of an image tag.
            +       *
            +       * * Generic artifacts: the `plugin_config_uri` must be in this format:
            +       * `projects/{project}/locations/{location}/repositories/{repository}/
            +       * genericArtifacts/{package}:{version}`.
            +       * The specified package and version must contain a file with the name
            +       * `plugin.config`. When a new `WasmPluginVersion` resource is
            +       * created, the checksum of the contents of the file is saved in the
                    * `plugin_config_digest` field.
                    * 
            * @@ -2035,10 +2238,23 @@ public Builder clearPluginConfigUri() { *
                    * URI of the plugin configuration stored in the Artifact Registry.
                    * The configuration is provided to the plugin at runtime through
            -       * the `ON_CONFIGURE` callback. The container image must
            -       * contain only a single file with the name
            -       * `plugin.config`. When a new `WasmPluginVersion`
            -       * resource is created, the digest of the container image is saved in the
            +       * the `ON_CONFIGURE` callback.
            +       *
            +       * The URI can refer to one of the following repository formats:
            +       *
            +       * * Container images: the `plugin_config_uri` must point to a container
            +       * that contains a single file with the name `plugin.config`.
            +       * When a new `WasmPluginVersion` resource is created, the digest of the
            +       * image is saved in the `plugin_config_digest` field.
            +       * When pulling a container image from Artifact Registry, the digest
            +       * value is used instead of an image tag.
            +       *
            +       * * Generic artifacts: the `plugin_config_uri` must be in this format:
            +       * `projects/{project}/locations/{location}/repositories/{repository}/
            +       * genericArtifacts/{package}:{version}`.
            +       * The specified package and version must contain a file with the name
            +       * `plugin.config`. When a new `WasmPluginVersion` resource is
            +       * created, the checksum of the contents of the file is saved in the
                    * `plugin_config_digest` field.
                    * 
            * @@ -2785,11 +3001,25 @@ public Builder putAllLabels(java.util.Map va * * *
            -       * Optional. URI of the container image containing the Wasm module, stored
            -       * in the Artifact Registry. The container image must contain only a single
            -       * file with the name `plugin.wasm`. When a new `WasmPluginVersion` resource
            -       * is created, the URI gets resolved to an image digest and saved in the
            -       * `image_digest` field.
            +       * Optional. URI of the image containing the Wasm module, stored in
            +       * Artifact Registry.
            +       *
            +       * The URI can refer to one of the following repository formats:
            +       *
            +       * * Container images: the `image_uri` must point to a container that
            +       * contains a single file with the name `plugin.wasm`.
            +       * When a new `WasmPluginVersion` resource is created, the digest of the
            +       * image is saved in the `image_digest` field.
            +       * When pulling a container image from Artifact Registry, the digest value
            +       * is used instead of an image tag.
            +       *
            +       * * Generic artifacts: the `image_uri` must be in this format:
            +       * `projects/{project}/locations/{location}/repositories/{repository}/
            +       * genericArtifacts/{package}:{version}`.
            +       * The specified package and version must contain a file with the name
            +       * `plugin.wasm`. When a new `WasmPluginVersion` resource is created, the
            +       * checksum of the contents of the file is saved in the `image_digest`
            +       * field.
                    * 
            * * string image_uri = 5 [(.google.api.field_behavior) = OPTIONAL]; @@ -2812,11 +3042,25 @@ public java.lang.String getImageUri() { * * *
            -       * Optional. URI of the container image containing the Wasm module, stored
            -       * in the Artifact Registry. The container image must contain only a single
            -       * file with the name `plugin.wasm`. When a new `WasmPluginVersion` resource
            -       * is created, the URI gets resolved to an image digest and saved in the
            -       * `image_digest` field.
            +       * Optional. URI of the image containing the Wasm module, stored in
            +       * Artifact Registry.
            +       *
            +       * The URI can refer to one of the following repository formats:
            +       *
            +       * * Container images: the `image_uri` must point to a container that
            +       * contains a single file with the name `plugin.wasm`.
            +       * When a new `WasmPluginVersion` resource is created, the digest of the
            +       * image is saved in the `image_digest` field.
            +       * When pulling a container image from Artifact Registry, the digest value
            +       * is used instead of an image tag.
            +       *
            +       * * Generic artifacts: the `image_uri` must be in this format:
            +       * `projects/{project}/locations/{location}/repositories/{repository}/
            +       * genericArtifacts/{package}:{version}`.
            +       * The specified package and version must contain a file with the name
            +       * `plugin.wasm`. When a new `WasmPluginVersion` resource is created, the
            +       * checksum of the contents of the file is saved in the `image_digest`
            +       * field.
                    * 
            * * string image_uri = 5 [(.google.api.field_behavior) = OPTIONAL]; @@ -2839,11 +3083,25 @@ public com.google.protobuf.ByteString getImageUriBytes() { * * *
            -       * Optional. URI of the container image containing the Wasm module, stored
            -       * in the Artifact Registry. The container image must contain only a single
            -       * file with the name `plugin.wasm`. When a new `WasmPluginVersion` resource
            -       * is created, the URI gets resolved to an image digest and saved in the
            -       * `image_digest` field.
            +       * Optional. URI of the image containing the Wasm module, stored in
            +       * Artifact Registry.
            +       *
            +       * The URI can refer to one of the following repository formats:
            +       *
            +       * * Container images: the `image_uri` must point to a container that
            +       * contains a single file with the name `plugin.wasm`.
            +       * When a new `WasmPluginVersion` resource is created, the digest of the
            +       * image is saved in the `image_digest` field.
            +       * When pulling a container image from Artifact Registry, the digest value
            +       * is used instead of an image tag.
            +       *
            +       * * Generic artifacts: the `image_uri` must be in this format:
            +       * `projects/{project}/locations/{location}/repositories/{repository}/
            +       * genericArtifacts/{package}:{version}`.
            +       * The specified package and version must contain a file with the name
            +       * `plugin.wasm`. When a new `WasmPluginVersion` resource is created, the
            +       * checksum of the contents of the file is saved in the `image_digest`
            +       * field.
                    * 
            * * string image_uri = 5 [(.google.api.field_behavior) = OPTIONAL]; @@ -2865,11 +3123,25 @@ public Builder setImageUri(java.lang.String value) { * * *
            -       * Optional. URI of the container image containing the Wasm module, stored
            -       * in the Artifact Registry. The container image must contain only a single
            -       * file with the name `plugin.wasm`. When a new `WasmPluginVersion` resource
            -       * is created, the URI gets resolved to an image digest and saved in the
            -       * `image_digest` field.
            +       * Optional. URI of the image containing the Wasm module, stored in
            +       * Artifact Registry.
            +       *
            +       * The URI can refer to one of the following repository formats:
            +       *
            +       * * Container images: the `image_uri` must point to a container that
            +       * contains a single file with the name `plugin.wasm`.
            +       * When a new `WasmPluginVersion` resource is created, the digest of the
            +       * image is saved in the `image_digest` field.
            +       * When pulling a container image from Artifact Registry, the digest value
            +       * is used instead of an image tag.
            +       *
            +       * * Generic artifacts: the `image_uri` must be in this format:
            +       * `projects/{project}/locations/{location}/repositories/{repository}/
            +       * genericArtifacts/{package}:{version}`.
            +       * The specified package and version must contain a file with the name
            +       * `plugin.wasm`. When a new `WasmPluginVersion` resource is created, the
            +       * checksum of the contents of the file is saved in the `image_digest`
            +       * field.
                    * 
            * * string image_uri = 5 [(.google.api.field_behavior) = OPTIONAL]; @@ -2887,11 +3159,25 @@ public Builder clearImageUri() { * * *
            -       * Optional. URI of the container image containing the Wasm module, stored
            -       * in the Artifact Registry. The container image must contain only a single
            -       * file with the name `plugin.wasm`. When a new `WasmPluginVersion` resource
            -       * is created, the URI gets resolved to an image digest and saved in the
            -       * `image_digest` field.
            +       * Optional. URI of the image containing the Wasm module, stored in
            +       * Artifact Registry.
            +       *
            +       * The URI can refer to one of the following repository formats:
            +       *
            +       * * Container images: the `image_uri` must point to a container that
            +       * contains a single file with the name `plugin.wasm`.
            +       * When a new `WasmPluginVersion` resource is created, the digest of the
            +       * image is saved in the `image_digest` field.
            +       * When pulling a container image from Artifact Registry, the digest value
            +       * is used instead of an image tag.
            +       *
            +       * * Generic artifacts: the `image_uri` must be in this format:
            +       * `projects/{project}/locations/{location}/repositories/{repository}/
            +       * genericArtifacts/{package}:{version}`.
            +       * The specified package and version must contain a file with the name
            +       * `plugin.wasm`. When a new `WasmPluginVersion` resource is created, the
            +       * checksum of the contents of the file is saved in the `image_digest`
            +       * field.
                    * 
            * * string image_uri = 5 [(.google.api.field_behavior) = OPTIONAL]; @@ -2916,11 +3202,12 @@ public Builder setImageUriBytes(com.google.protobuf.ByteString value) { * * *
            -       * Output only. The resolved digest for the image specified in `image`.
            -       * The digest is resolved during the creation of a
            -       * `WasmPluginVersion` resource.
            -       * This field holds the digest value regardless of whether a tag or
            -       * digest was originally specified in the `image` field.
            +       * Output only. This field holds the digest (usually checksum) value for the
            +       * plugin image. The value is calculated based on the `image_uri` field. If
            +       * the `image_uri` field refers to a container image, the digest value is
            +       * obtained from the container image. If the `image_uri` field refers to
            +       * a generic artifact, the digest value is calculated based on the
            +       * contents of the file.
                    * 
            * * string image_digest = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -2943,11 +3230,12 @@ public java.lang.String getImageDigest() { * * *
            -       * Output only. The resolved digest for the image specified in `image`.
            -       * The digest is resolved during the creation of a
            -       * `WasmPluginVersion` resource.
            -       * This field holds the digest value regardless of whether a tag or
            -       * digest was originally specified in the `image` field.
            +       * Output only. This field holds the digest (usually checksum) value for the
            +       * plugin image. The value is calculated based on the `image_uri` field. If
            +       * the `image_uri` field refers to a container image, the digest value is
            +       * obtained from the container image. If the `image_uri` field refers to
            +       * a generic artifact, the digest value is calculated based on the
            +       * contents of the file.
                    * 
            * * string image_digest = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -2970,11 +3258,12 @@ public com.google.protobuf.ByteString getImageDigestBytes() { * * *
            -       * Output only. The resolved digest for the image specified in `image`.
            -       * The digest is resolved during the creation of a
            -       * `WasmPluginVersion` resource.
            -       * This field holds the digest value regardless of whether a tag or
            -       * digest was originally specified in the `image` field.
            +       * Output only. This field holds the digest (usually checksum) value for the
            +       * plugin image. The value is calculated based on the `image_uri` field. If
            +       * the `image_uri` field refers to a container image, the digest value is
            +       * obtained from the container image. If the `image_uri` field refers to
            +       * a generic artifact, the digest value is calculated based on the
            +       * contents of the file.
                    * 
            * * string image_digest = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -2996,11 +3285,12 @@ public Builder setImageDigest(java.lang.String value) { * * *
            -       * Output only. The resolved digest for the image specified in `image`.
            -       * The digest is resolved during the creation of a
            -       * `WasmPluginVersion` resource.
            -       * This field holds the digest value regardless of whether a tag or
            -       * digest was originally specified in the `image` field.
            +       * Output only. This field holds the digest (usually checksum) value for the
            +       * plugin image. The value is calculated based on the `image_uri` field. If
            +       * the `image_uri` field refers to a container image, the digest value is
            +       * obtained from the container image. If the `image_uri` field refers to
            +       * a generic artifact, the digest value is calculated based on the
            +       * contents of the file.
                    * 
            * * string image_digest = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -3018,11 +3308,12 @@ public Builder clearImageDigest() { * * *
            -       * Output only. The resolved digest for the image specified in `image`.
            -       * The digest is resolved during the creation of a
            -       * `WasmPluginVersion` resource.
            -       * This field holds the digest value regardless of whether a tag or
            -       * digest was originally specified in the `image` field.
            +       * Output only. This field holds the digest (usually checksum) value for the
            +       * plugin image. The value is calculated based on the `image_uri` field. If
            +       * the `image_uri` field refers to a container image, the digest value is
            +       * obtained from the container image. If the `image_uri` field refers to
            +       * a generic artifact, the digest value is calculated based on the
            +       * contents of the file.
                    * 
            * * string image_digest = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -3049,7 +3340,7 @@ public Builder setImageDigestBytes(com.google.protobuf.ByteString value) { *
                    * Output only. This field holds the digest (usually checksum) value for the
                    * plugin configuration. The value is calculated based on the contents of
            -       * the `plugin_config_data` field or the container image defined by the
            +       * `plugin_config_data` field or the image defined by the
                    * `plugin_config_uri` field.
                    * 
            * @@ -3075,7 +3366,7 @@ public java.lang.String getPluginConfigDigest() { *
                    * Output only. This field holds the digest (usually checksum) value for the
                    * plugin configuration. The value is calculated based on the contents of
            -       * the `plugin_config_data` field or the container image defined by the
            +       * `plugin_config_data` field or the image defined by the
                    * `plugin_config_uri` field.
                    * 
            * @@ -3101,7 +3392,7 @@ public com.google.protobuf.ByteString getPluginConfigDigestBytes() { *
                    * Output only. This field holds the digest (usually checksum) value for the
                    * plugin configuration. The value is calculated based on the contents of
            -       * the `plugin_config_data` field or the container image defined by the
            +       * `plugin_config_data` field or the image defined by the
                    * `plugin_config_uri` field.
                    * 
            * @@ -3126,7 +3417,7 @@ public Builder setPluginConfigDigest(java.lang.String value) { *
                    * Output only. This field holds the digest (usually checksum) value for the
                    * plugin configuration. The value is calculated based on the contents of
            -       * the `plugin_config_data` field or the container image defined by the
            +       * `plugin_config_data` field or the image defined by the
                    * `plugin_config_uri` field.
                    * 
            * @@ -3147,7 +3438,7 @@ public Builder clearPluginConfigDigest() { *
                    * Output only. This field holds the digest (usually checksum) value for the
                    * plugin configuration. The value is calculated based on the contents of
            -       * the `plugin_config_data` field or the container image defined by the
            +       * `plugin_config_data` field or the image defined by the
                    * `plugin_config_uri` field.
                    * 
            * @@ -3268,9 +3559,9 @@ public interface LogConfigOrBuilder * * *
            -     * Non-empty default. Specificies the lowest level of the plugin logs that
            -     * are exported to Cloud Logging. This setting relates to the logs generated
            -     * by using logging statements in your Wasm code.
            +     * Non-empty default. Specifies the lowest level of the plugin logs that are
            +     * exported to Cloud Logging. This setting relates to the logs generated by
            +     * using logging statements in your Wasm code.
                  *
                  * This field is can be set only if logging is enabled for the plugin.
                  *
            @@ -3290,9 +3581,9 @@ public interface LogConfigOrBuilder
                  *
                  *
                  * 
            -     * Non-empty default. Specificies the lowest level of the plugin logs that
            -     * are exported to Cloud Logging. This setting relates to the logs generated
            -     * by using logging statements in your Wasm code.
            +     * Non-empty default. Specifies the lowest level of the plugin logs that are
            +     * exported to Cloud Logging. This setting relates to the logs generated by
            +     * using logging statements in your Wasm code.
                  *
                  * This field is can be set only if logging is enabled for the plugin.
                  *
            @@ -3680,9 +3971,9 @@ public float getSampleRate() {
                  *
                  *
                  * 
            -     * Non-empty default. Specificies the lowest level of the plugin logs that
            -     * are exported to Cloud Logging. This setting relates to the logs generated
            -     * by using logging statements in your Wasm code.
            +     * Non-empty default. Specifies the lowest level of the plugin logs that are
            +     * exported to Cloud Logging. This setting relates to the logs generated by
            +     * using logging statements in your Wasm code.
                  *
                  * This field is can be set only if logging is enabled for the plugin.
                  *
            @@ -3705,9 +3996,9 @@ public int getMinLogLevelValue() {
                  *
                  *
                  * 
            -     * Non-empty default. Specificies the lowest level of the plugin logs that
            -     * are exported to Cloud Logging. This setting relates to the logs generated
            -     * by using logging statements in your Wasm code.
            +     * Non-empty default. Specifies the lowest level of the plugin logs that are
            +     * exported to Cloud Logging. This setting relates to the logs generated by
            +     * using logging statements in your Wasm code.
                  *
                  * This field is can be set only if logging is enabled for the plugin.
                  *
            @@ -4241,9 +4532,9 @@ public Builder clearSampleRate() {
                    *
                    *
                    * 
            -       * Non-empty default. Specificies the lowest level of the plugin logs that
            -       * are exported to Cloud Logging. This setting relates to the logs generated
            -       * by using logging statements in your Wasm code.
            +       * Non-empty default. Specifies the lowest level of the plugin logs that are
            +       * exported to Cloud Logging. This setting relates to the logs generated by
            +       * using logging statements in your Wasm code.
                    *
                    * This field is can be set only if logging is enabled for the plugin.
                    *
            @@ -4266,9 +4557,9 @@ public int getMinLogLevelValue() {
                    *
                    *
                    * 
            -       * Non-empty default. Specificies the lowest level of the plugin logs that
            -       * are exported to Cloud Logging. This setting relates to the logs generated
            -       * by using logging statements in your Wasm code.
            +       * Non-empty default. Specifies the lowest level of the plugin logs that are
            +       * exported to Cloud Logging. This setting relates to the logs generated by
            +       * using logging statements in your Wasm code.
                    *
                    * This field is can be set only if logging is enabled for the plugin.
                    *
            @@ -4294,9 +4585,9 @@ public Builder setMinLogLevelValue(int value) {
                    *
                    *
                    * 
            -       * Non-empty default. Specificies the lowest level of the plugin logs that
            -       * are exported to Cloud Logging. This setting relates to the logs generated
            -       * by using logging statements in your Wasm code.
            +       * Non-empty default. Specifies the lowest level of the plugin logs that are
            +       * exported to Cloud Logging. This setting relates to the logs generated by
            +       * using logging statements in your Wasm code.
                    *
                    * This field is can be set only if logging is enabled for the plugin.
                    *
            @@ -4324,9 +4615,9 @@ public com.google.cloud.networkservices.v1.WasmPlugin.LogConfig.LogLevel getMinL
                    *
                    *
                    * 
            -       * Non-empty default. Specificies the lowest level of the plugin logs that
            -       * are exported to Cloud Logging. This setting relates to the logs generated
            -       * by using logging statements in your Wasm code.
            +       * Non-empty default. Specifies the lowest level of the plugin logs that are
            +       * exported to Cloud Logging. This setting relates to the logs generated by
            +       * using logging statements in your Wasm code.
                    *
                    * This field is can be set only if logging is enabled for the plugin.
                    *
            @@ -4356,9 +4647,9 @@ public Builder setMinLogLevel(
                    *
                    *
                    * 
            -       * Non-empty default. Specificies the lowest level of the plugin logs that
            -       * are exported to Cloud Logging. This setting relates to the logs generated
            -       * by using logging statements in your Wasm code.
            +       * Non-empty default. Specifies the lowest level of the plugin logs that are
            +       * exported to Cloud Logging. This setting relates to the logs generated by
            +       * using logging statements in your Wasm code.
                    *
                    * This field is can be set only if logging is enabled for the plugin.
                    *
            diff --git a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/WasmPluginVersion.java b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/WasmPluginVersion.java
            index d80fc9148d2a..303899749fd9 100644
            --- a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/WasmPluginVersion.java
            +++ b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/WasmPluginVersion.java
            @@ -191,10 +191,24 @@ public com.google.protobuf.ByteString getPluginConfigData() {
                * 
                * URI of the plugin configuration stored in the Artifact Registry.
                * The configuration is provided to the plugin at runtime through
            -   * the `ON_CONFIGURE` callback. The container image must contain
            -   * only a single file with the name `plugin.config`. When a
            -   * new `WasmPluginVersion` resource is created, the digest of the
            -   * container image is saved in the `plugin_config_digest` field.
            +   * the `ON_CONFIGURE` callback.
            +   *
            +   * The URI can refer to one of the following repository formats:
            +   *
            +   * * Container images: the `plugin_config_uri` must point to a container
            +   * that contains a single file with the name `plugin.config`.
            +   * When a new `WasmPluginVersion` resource is created, the digest of the
            +   * image is saved in the `plugin_config_digest` field.
            +   * When pulling a container image from Artifact Registry, the digest
            +   * value is used instead of an image tag.
            +   *
            +   * * Generic artifacts: the `plugin_config_uri` must be in this format:
            +   * `projects/{project}/locations/{location}/repositories/{repository}/
            +   * genericArtifacts/{package}:{version}`.
            +   * The specified package and version must contain a file with the name
            +   * `plugin.config`. When a new `WasmPluginVersion` resource is
            +   * created, the checksum of the contents of the file is saved in the
            +   * `plugin_config_digest` field.
                * 
            * * string plugin_config_uri = 13; @@ -211,10 +225,24 @@ public boolean hasPluginConfigUri() { *
                * URI of the plugin configuration stored in the Artifact Registry.
                * The configuration is provided to the plugin at runtime through
            -   * the `ON_CONFIGURE` callback. The container image must contain
            -   * only a single file with the name `plugin.config`. When a
            -   * new `WasmPluginVersion` resource is created, the digest of the
            -   * container image is saved in the `plugin_config_digest` field.
            +   * the `ON_CONFIGURE` callback.
            +   *
            +   * The URI can refer to one of the following repository formats:
            +   *
            +   * * Container images: the `plugin_config_uri` must point to a container
            +   * that contains a single file with the name `plugin.config`.
            +   * When a new `WasmPluginVersion` resource is created, the digest of the
            +   * image is saved in the `plugin_config_digest` field.
            +   * When pulling a container image from Artifact Registry, the digest
            +   * value is used instead of an image tag.
            +   *
            +   * * Generic artifacts: the `plugin_config_uri` must be in this format:
            +   * `projects/{project}/locations/{location}/repositories/{repository}/
            +   * genericArtifacts/{package}:{version}`.
            +   * The specified package and version must contain a file with the name
            +   * `plugin.config`. When a new `WasmPluginVersion` resource is
            +   * created, the checksum of the contents of the file is saved in the
            +   * `plugin_config_digest` field.
                * 
            * * string plugin_config_uri = 13; @@ -244,10 +272,24 @@ public java.lang.String getPluginConfigUri() { *
                * URI of the plugin configuration stored in the Artifact Registry.
                * The configuration is provided to the plugin at runtime through
            -   * the `ON_CONFIGURE` callback. The container image must contain
            -   * only a single file with the name `plugin.config`. When a
            -   * new `WasmPluginVersion` resource is created, the digest of the
            -   * container image is saved in the `plugin_config_digest` field.
            +   * the `ON_CONFIGURE` callback.
            +   *
            +   * The URI can refer to one of the following repository formats:
            +   *
            +   * * Container images: the `plugin_config_uri` must point to a container
            +   * that contains a single file with the name `plugin.config`.
            +   * When a new `WasmPluginVersion` resource is created, the digest of the
            +   * image is saved in the `plugin_config_digest` field.
            +   * When pulling a container image from Artifact Registry, the digest
            +   * value is used instead of an image tag.
            +   *
            +   * * Generic artifacts: the `plugin_config_uri` must be in this format:
            +   * `projects/{project}/locations/{location}/repositories/{repository}/
            +   * genericArtifacts/{package}:{version}`.
            +   * The specified package and version must contain a file with the name
            +   * `plugin.config`. When a new `WasmPluginVersion` resource is
            +   * created, the checksum of the contents of the file is saved in the
            +   * `plugin_config_digest` field.
                * 
            * * string plugin_config_uri = 13; @@ -605,12 +647,25 @@ public java.lang.String getLabelsOrThrow(java.lang.String key) { * * *
            -   * Optional. URI of the container image containing the plugin, stored in the
            +   * Optional. URI of the image containing the Wasm module, stored in
                * Artifact Registry.
            -   * When a new `WasmPluginVersion` resource is created, the digest
            -   * of the container image is saved in the `image_digest` field.
            -   * When downloading an image, the digest value is used instead of an
            -   * image tag.
            +   *
            +   * The URI can refer to one of the following repository formats:
            +   *
            +   * * Container images: the `image_uri` must point to a container that
            +   * contains a single file with the name `plugin.wasm`.
            +   * When a new `WasmPluginVersion` resource is created, the digest of the
            +   * image is saved in the `image_digest` field.
            +   * When pulling a container image from Artifact Registry, the digest value
            +   * is used instead of an image tag.
            +   *
            +   * * Generic artifacts: the `image_uri` must be in this format:
            +   * `projects/{project}/locations/{location}/repositories/{repository}/
            +   * genericArtifacts/{package}:{version}`.
            +   * The specified package and version must contain a file with the name
            +   * `plugin.wasm`. When a new `WasmPluginVersion` resource is created, the
            +   * checksum of the contents of the file is saved in the `image_digest`
            +   * field.
                * 
            * * string image_uri = 8 [(.google.api.field_behavior) = OPTIONAL]; @@ -634,12 +689,25 @@ public java.lang.String getImageUri() { * * *
            -   * Optional. URI of the container image containing the plugin, stored in the
            +   * Optional. URI of the image containing the Wasm module, stored in
                * Artifact Registry.
            -   * When a new `WasmPluginVersion` resource is created, the digest
            -   * of the container image is saved in the `image_digest` field.
            -   * When downloading an image, the digest value is used instead of an
            -   * image tag.
            +   *
            +   * The URI can refer to one of the following repository formats:
            +   *
            +   * * Container images: the `image_uri` must point to a container that
            +   * contains a single file with the name `plugin.wasm`.
            +   * When a new `WasmPluginVersion` resource is created, the digest of the
            +   * image is saved in the `image_digest` field.
            +   * When pulling a container image from Artifact Registry, the digest value
            +   * is used instead of an image tag.
            +   *
            +   * * Generic artifacts: the `image_uri` must be in this format:
            +   * `projects/{project}/locations/{location}/repositories/{repository}/
            +   * genericArtifacts/{package}:{version}`.
            +   * The specified package and version must contain a file with the name
            +   * `plugin.wasm`. When a new `WasmPluginVersion` resource is created, the
            +   * checksum of the contents of the file is saved in the `image_digest`
            +   * field.
                * 
            * * string image_uri = 8 [(.google.api.field_behavior) = OPTIONAL]; @@ -668,10 +736,12 @@ public com.google.protobuf.ByteString getImageUriBytes() { * * *
            -   * Output only. The resolved digest for the image specified in the `image`
            -   * field. The digest is resolved during the creation of `WasmPluginVersion`
            -   * resource. This field holds the digest value, regardless of whether a tag or
            -   * digest was originally specified in the `image` field.
            +   * Output only. This field holds the digest (usually checksum) value for the
            +   * plugin image. The value is calculated based on the `image_uri` field. If
            +   * the `image_uri` field refers to a container image, the digest value is
            +   * obtained from the container image. If the `image_uri` field refers to
            +   * a generic artifact, the digest value is calculated based on the
            +   * contents of the file.
                * 
            * * string image_digest = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -695,10 +765,12 @@ public java.lang.String getImageDigest() { * * *
            -   * Output only. The resolved digest for the image specified in the `image`
            -   * field. The digest is resolved during the creation of `WasmPluginVersion`
            -   * resource. This field holds the digest value, regardless of whether a tag or
            -   * digest was originally specified in the `image` field.
            +   * Output only. This field holds the digest (usually checksum) value for the
            +   * plugin image. The value is calculated based on the `image_uri` field. If
            +   * the `image_uri` field refers to a container image, the digest value is
            +   * obtained from the container image. If the `image_uri` field refers to
            +   * a generic artifact, the digest value is calculated based on the
            +   * contents of the file.
                * 
            * * string image_digest = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -729,8 +801,8 @@ public com.google.protobuf.ByteString getImageDigestBytes() { *
                * Output only. This field holds the digest (usually checksum) value for the
                * plugin configuration. The value is calculated based on the contents of
            -   * `plugin_config_data` or the container image defined by
            -   * the `plugin_config_uri` field.
            +   * `plugin_config_data` field or the image defined by the
            +   * `plugin_config_uri` field.
                * 
            * * string plugin_config_digest = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -756,8 +828,8 @@ public java.lang.String getPluginConfigDigest() { *
                * Output only. This field holds the digest (usually checksum) value for the
                * plugin configuration. The value is calculated based on the contents of
            -   * `plugin_config_data` or the container image defined by
            -   * the `plugin_config_uri` field.
            +   * `plugin_config_data` field or the image defined by the
            +   * `plugin_config_uri` field.
                * 
            * * string plugin_config_digest = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -1508,10 +1580,24 @@ public Builder clearPluginConfigData() { *
                  * URI of the plugin configuration stored in the Artifact Registry.
                  * The configuration is provided to the plugin at runtime through
            -     * the `ON_CONFIGURE` callback. The container image must contain
            -     * only a single file with the name `plugin.config`. When a
            -     * new `WasmPluginVersion` resource is created, the digest of the
            -     * container image is saved in the `plugin_config_digest` field.
            +     * the `ON_CONFIGURE` callback.
            +     *
            +     * The URI can refer to one of the following repository formats:
            +     *
            +     * * Container images: the `plugin_config_uri` must point to a container
            +     * that contains a single file with the name `plugin.config`.
            +     * When a new `WasmPluginVersion` resource is created, the digest of the
            +     * image is saved in the `plugin_config_digest` field.
            +     * When pulling a container image from Artifact Registry, the digest
            +     * value is used instead of an image tag.
            +     *
            +     * * Generic artifacts: the `plugin_config_uri` must be in this format:
            +     * `projects/{project}/locations/{location}/repositories/{repository}/
            +     * genericArtifacts/{package}:{version}`.
            +     * The specified package and version must contain a file with the name
            +     * `plugin.config`. When a new `WasmPluginVersion` resource is
            +     * created, the checksum of the contents of the file is saved in the
            +     * `plugin_config_digest` field.
                  * 
            * * string plugin_config_uri = 13; @@ -1529,10 +1615,24 @@ public boolean hasPluginConfigUri() { *
                  * URI of the plugin configuration stored in the Artifact Registry.
                  * The configuration is provided to the plugin at runtime through
            -     * the `ON_CONFIGURE` callback. The container image must contain
            -     * only a single file with the name `plugin.config`. When a
            -     * new `WasmPluginVersion` resource is created, the digest of the
            -     * container image is saved in the `plugin_config_digest` field.
            +     * the `ON_CONFIGURE` callback.
            +     *
            +     * The URI can refer to one of the following repository formats:
            +     *
            +     * * Container images: the `plugin_config_uri` must point to a container
            +     * that contains a single file with the name `plugin.config`.
            +     * When a new `WasmPluginVersion` resource is created, the digest of the
            +     * image is saved in the `plugin_config_digest` field.
            +     * When pulling a container image from Artifact Registry, the digest
            +     * value is used instead of an image tag.
            +     *
            +     * * Generic artifacts: the `plugin_config_uri` must be in this format:
            +     * `projects/{project}/locations/{location}/repositories/{repository}/
            +     * genericArtifacts/{package}:{version}`.
            +     * The specified package and version must contain a file with the name
            +     * `plugin.config`. When a new `WasmPluginVersion` resource is
            +     * created, the checksum of the contents of the file is saved in the
            +     * `plugin_config_digest` field.
                  * 
            * * string plugin_config_uri = 13; @@ -1563,10 +1663,24 @@ public java.lang.String getPluginConfigUri() { *
                  * URI of the plugin configuration stored in the Artifact Registry.
                  * The configuration is provided to the plugin at runtime through
            -     * the `ON_CONFIGURE` callback. The container image must contain
            -     * only a single file with the name `plugin.config`. When a
            -     * new `WasmPluginVersion` resource is created, the digest of the
            -     * container image is saved in the `plugin_config_digest` field.
            +     * the `ON_CONFIGURE` callback.
            +     *
            +     * The URI can refer to one of the following repository formats:
            +     *
            +     * * Container images: the `plugin_config_uri` must point to a container
            +     * that contains a single file with the name `plugin.config`.
            +     * When a new `WasmPluginVersion` resource is created, the digest of the
            +     * image is saved in the `plugin_config_digest` field.
            +     * When pulling a container image from Artifact Registry, the digest
            +     * value is used instead of an image tag.
            +     *
            +     * * Generic artifacts: the `plugin_config_uri` must be in this format:
            +     * `projects/{project}/locations/{location}/repositories/{repository}/
            +     * genericArtifacts/{package}:{version}`.
            +     * The specified package and version must contain a file with the name
            +     * `plugin.config`. When a new `WasmPluginVersion` resource is
            +     * created, the checksum of the contents of the file is saved in the
            +     * `plugin_config_digest` field.
                  * 
            * * string plugin_config_uri = 13; @@ -1597,10 +1711,24 @@ public com.google.protobuf.ByteString getPluginConfigUriBytes() { *
                  * URI of the plugin configuration stored in the Artifact Registry.
                  * The configuration is provided to the plugin at runtime through
            -     * the `ON_CONFIGURE` callback. The container image must contain
            -     * only a single file with the name `plugin.config`. When a
            -     * new `WasmPluginVersion` resource is created, the digest of the
            -     * container image is saved in the `plugin_config_digest` field.
            +     * the `ON_CONFIGURE` callback.
            +     *
            +     * The URI can refer to one of the following repository formats:
            +     *
            +     * * Container images: the `plugin_config_uri` must point to a container
            +     * that contains a single file with the name `plugin.config`.
            +     * When a new `WasmPluginVersion` resource is created, the digest of the
            +     * image is saved in the `plugin_config_digest` field.
            +     * When pulling a container image from Artifact Registry, the digest
            +     * value is used instead of an image tag.
            +     *
            +     * * Generic artifacts: the `plugin_config_uri` must be in this format:
            +     * `projects/{project}/locations/{location}/repositories/{repository}/
            +     * genericArtifacts/{package}:{version}`.
            +     * The specified package and version must contain a file with the name
            +     * `plugin.config`. When a new `WasmPluginVersion` resource is
            +     * created, the checksum of the contents of the file is saved in the
            +     * `plugin_config_digest` field.
                  * 
            * * string plugin_config_uri = 13; @@ -1624,10 +1752,24 @@ public Builder setPluginConfigUri(java.lang.String value) { *
                  * URI of the plugin configuration stored in the Artifact Registry.
                  * The configuration is provided to the plugin at runtime through
            -     * the `ON_CONFIGURE` callback. The container image must contain
            -     * only a single file with the name `plugin.config`. When a
            -     * new `WasmPluginVersion` resource is created, the digest of the
            -     * container image is saved in the `plugin_config_digest` field.
            +     * the `ON_CONFIGURE` callback.
            +     *
            +     * The URI can refer to one of the following repository formats:
            +     *
            +     * * Container images: the `plugin_config_uri` must point to a container
            +     * that contains a single file with the name `plugin.config`.
            +     * When a new `WasmPluginVersion` resource is created, the digest of the
            +     * image is saved in the `plugin_config_digest` field.
            +     * When pulling a container image from Artifact Registry, the digest
            +     * value is used instead of an image tag.
            +     *
            +     * * Generic artifacts: the `plugin_config_uri` must be in this format:
            +     * `projects/{project}/locations/{location}/repositories/{repository}/
            +     * genericArtifacts/{package}:{version}`.
            +     * The specified package and version must contain a file with the name
            +     * `plugin.config`. When a new `WasmPluginVersion` resource is
            +     * created, the checksum of the contents of the file is saved in the
            +     * `plugin_config_digest` field.
                  * 
            * * string plugin_config_uri = 13; @@ -1649,10 +1791,24 @@ public Builder clearPluginConfigUri() { *
                  * URI of the plugin configuration stored in the Artifact Registry.
                  * The configuration is provided to the plugin at runtime through
            -     * the `ON_CONFIGURE` callback. The container image must contain
            -     * only a single file with the name `plugin.config`. When a
            -     * new `WasmPluginVersion` resource is created, the digest of the
            -     * container image is saved in the `plugin_config_digest` field.
            +     * the `ON_CONFIGURE` callback.
            +     *
            +     * The URI can refer to one of the following repository formats:
            +     *
            +     * * Container images: the `plugin_config_uri` must point to a container
            +     * that contains a single file with the name `plugin.config`.
            +     * When a new `WasmPluginVersion` resource is created, the digest of the
            +     * image is saved in the `plugin_config_digest` field.
            +     * When pulling a container image from Artifact Registry, the digest
            +     * value is used instead of an image tag.
            +     *
            +     * * Generic artifacts: the `plugin_config_uri` must be in this format:
            +     * `projects/{project}/locations/{location}/repositories/{repository}/
            +     * genericArtifacts/{package}:{version}`.
            +     * The specified package and version must contain a file with the name
            +     * `plugin.config`. When a new `WasmPluginVersion` resource is
            +     * created, the checksum of the contents of the file is saved in the
            +     * `plugin_config_digest` field.
                  * 
            * * string plugin_config_uri = 13; @@ -2512,12 +2668,25 @@ public Builder putAllLabels(java.util.Map va * * *
            -     * Optional. URI of the container image containing the plugin, stored in the
            +     * Optional. URI of the image containing the Wasm module, stored in
                  * Artifact Registry.
            -     * When a new `WasmPluginVersion` resource is created, the digest
            -     * of the container image is saved in the `image_digest` field.
            -     * When downloading an image, the digest value is used instead of an
            -     * image tag.
            +     *
            +     * The URI can refer to one of the following repository formats:
            +     *
            +     * * Container images: the `image_uri` must point to a container that
            +     * contains a single file with the name `plugin.wasm`.
            +     * When a new `WasmPluginVersion` resource is created, the digest of the
            +     * image is saved in the `image_digest` field.
            +     * When pulling a container image from Artifact Registry, the digest value
            +     * is used instead of an image tag.
            +     *
            +     * * Generic artifacts: the `image_uri` must be in this format:
            +     * `projects/{project}/locations/{location}/repositories/{repository}/
            +     * genericArtifacts/{package}:{version}`.
            +     * The specified package and version must contain a file with the name
            +     * `plugin.wasm`. When a new `WasmPluginVersion` resource is created, the
            +     * checksum of the contents of the file is saved in the `image_digest`
            +     * field.
                  * 
            * * string image_uri = 8 [(.google.api.field_behavior) = OPTIONAL]; @@ -2540,12 +2709,25 @@ public java.lang.String getImageUri() { * * *
            -     * Optional. URI of the container image containing the plugin, stored in the
            +     * Optional. URI of the image containing the Wasm module, stored in
                  * Artifact Registry.
            -     * When a new `WasmPluginVersion` resource is created, the digest
            -     * of the container image is saved in the `image_digest` field.
            -     * When downloading an image, the digest value is used instead of an
            -     * image tag.
            +     *
            +     * The URI can refer to one of the following repository formats:
            +     *
            +     * * Container images: the `image_uri` must point to a container that
            +     * contains a single file with the name `plugin.wasm`.
            +     * When a new `WasmPluginVersion` resource is created, the digest of the
            +     * image is saved in the `image_digest` field.
            +     * When pulling a container image from Artifact Registry, the digest value
            +     * is used instead of an image tag.
            +     *
            +     * * Generic artifacts: the `image_uri` must be in this format:
            +     * `projects/{project}/locations/{location}/repositories/{repository}/
            +     * genericArtifacts/{package}:{version}`.
            +     * The specified package and version must contain a file with the name
            +     * `plugin.wasm`. When a new `WasmPluginVersion` resource is created, the
            +     * checksum of the contents of the file is saved in the `image_digest`
            +     * field.
                  * 
            * * string image_uri = 8 [(.google.api.field_behavior) = OPTIONAL]; @@ -2568,12 +2750,25 @@ public com.google.protobuf.ByteString getImageUriBytes() { * * *
            -     * Optional. URI of the container image containing the plugin, stored in the
            +     * Optional. URI of the image containing the Wasm module, stored in
                  * Artifact Registry.
            -     * When a new `WasmPluginVersion` resource is created, the digest
            -     * of the container image is saved in the `image_digest` field.
            -     * When downloading an image, the digest value is used instead of an
            -     * image tag.
            +     *
            +     * The URI can refer to one of the following repository formats:
            +     *
            +     * * Container images: the `image_uri` must point to a container that
            +     * contains a single file with the name `plugin.wasm`.
            +     * When a new `WasmPluginVersion` resource is created, the digest of the
            +     * image is saved in the `image_digest` field.
            +     * When pulling a container image from Artifact Registry, the digest value
            +     * is used instead of an image tag.
            +     *
            +     * * Generic artifacts: the `image_uri` must be in this format:
            +     * `projects/{project}/locations/{location}/repositories/{repository}/
            +     * genericArtifacts/{package}:{version}`.
            +     * The specified package and version must contain a file with the name
            +     * `plugin.wasm`. When a new `WasmPluginVersion` resource is created, the
            +     * checksum of the contents of the file is saved in the `image_digest`
            +     * field.
                  * 
            * * string image_uri = 8 [(.google.api.field_behavior) = OPTIONAL]; @@ -2595,12 +2790,25 @@ public Builder setImageUri(java.lang.String value) { * * *
            -     * Optional. URI of the container image containing the plugin, stored in the
            +     * Optional. URI of the image containing the Wasm module, stored in
                  * Artifact Registry.
            -     * When a new `WasmPluginVersion` resource is created, the digest
            -     * of the container image is saved in the `image_digest` field.
            -     * When downloading an image, the digest value is used instead of an
            -     * image tag.
            +     *
            +     * The URI can refer to one of the following repository formats:
            +     *
            +     * * Container images: the `image_uri` must point to a container that
            +     * contains a single file with the name `plugin.wasm`.
            +     * When a new `WasmPluginVersion` resource is created, the digest of the
            +     * image is saved in the `image_digest` field.
            +     * When pulling a container image from Artifact Registry, the digest value
            +     * is used instead of an image tag.
            +     *
            +     * * Generic artifacts: the `image_uri` must be in this format:
            +     * `projects/{project}/locations/{location}/repositories/{repository}/
            +     * genericArtifacts/{package}:{version}`.
            +     * The specified package and version must contain a file with the name
            +     * `plugin.wasm`. When a new `WasmPluginVersion` resource is created, the
            +     * checksum of the contents of the file is saved in the `image_digest`
            +     * field.
                  * 
            * * string image_uri = 8 [(.google.api.field_behavior) = OPTIONAL]; @@ -2618,12 +2826,25 @@ public Builder clearImageUri() { * * *
            -     * Optional. URI of the container image containing the plugin, stored in the
            +     * Optional. URI of the image containing the Wasm module, stored in
                  * Artifact Registry.
            -     * When a new `WasmPluginVersion` resource is created, the digest
            -     * of the container image is saved in the `image_digest` field.
            -     * When downloading an image, the digest value is used instead of an
            -     * image tag.
            +     *
            +     * The URI can refer to one of the following repository formats:
            +     *
            +     * * Container images: the `image_uri` must point to a container that
            +     * contains a single file with the name `plugin.wasm`.
            +     * When a new `WasmPluginVersion` resource is created, the digest of the
            +     * image is saved in the `image_digest` field.
            +     * When pulling a container image from Artifact Registry, the digest value
            +     * is used instead of an image tag.
            +     *
            +     * * Generic artifacts: the `image_uri` must be in this format:
            +     * `projects/{project}/locations/{location}/repositories/{repository}/
            +     * genericArtifacts/{package}:{version}`.
            +     * The specified package and version must contain a file with the name
            +     * `plugin.wasm`. When a new `WasmPluginVersion` resource is created, the
            +     * checksum of the contents of the file is saved in the `image_digest`
            +     * field.
                  * 
            * * string image_uri = 8 [(.google.api.field_behavior) = OPTIONAL]; @@ -2648,10 +2869,12 @@ public Builder setImageUriBytes(com.google.protobuf.ByteString value) { * * *
            -     * Output only. The resolved digest for the image specified in the `image`
            -     * field. The digest is resolved during the creation of `WasmPluginVersion`
            -     * resource. This field holds the digest value, regardless of whether a tag or
            -     * digest was originally specified in the `image` field.
            +     * Output only. This field holds the digest (usually checksum) value for the
            +     * plugin image. The value is calculated based on the `image_uri` field. If
            +     * the `image_uri` field refers to a container image, the digest value is
            +     * obtained from the container image. If the `image_uri` field refers to
            +     * a generic artifact, the digest value is calculated based on the
            +     * contents of the file.
                  * 
            * * string image_digest = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -2674,10 +2897,12 @@ public java.lang.String getImageDigest() { * * *
            -     * Output only. The resolved digest for the image specified in the `image`
            -     * field. The digest is resolved during the creation of `WasmPluginVersion`
            -     * resource. This field holds the digest value, regardless of whether a tag or
            -     * digest was originally specified in the `image` field.
            +     * Output only. This field holds the digest (usually checksum) value for the
            +     * plugin image. The value is calculated based on the `image_uri` field. If
            +     * the `image_uri` field refers to a container image, the digest value is
            +     * obtained from the container image. If the `image_uri` field refers to
            +     * a generic artifact, the digest value is calculated based on the
            +     * contents of the file.
                  * 
            * * string image_digest = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -2700,10 +2925,12 @@ public com.google.protobuf.ByteString getImageDigestBytes() { * * *
            -     * Output only. The resolved digest for the image specified in the `image`
            -     * field. The digest is resolved during the creation of `WasmPluginVersion`
            -     * resource. This field holds the digest value, regardless of whether a tag or
            -     * digest was originally specified in the `image` field.
            +     * Output only. This field holds the digest (usually checksum) value for the
            +     * plugin image. The value is calculated based on the `image_uri` field. If
            +     * the `image_uri` field refers to a container image, the digest value is
            +     * obtained from the container image. If the `image_uri` field refers to
            +     * a generic artifact, the digest value is calculated based on the
            +     * contents of the file.
                  * 
            * * string image_digest = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -2725,10 +2952,12 @@ public Builder setImageDigest(java.lang.String value) { * * *
            -     * Output only. The resolved digest for the image specified in the `image`
            -     * field. The digest is resolved during the creation of `WasmPluginVersion`
            -     * resource. This field holds the digest value, regardless of whether a tag or
            -     * digest was originally specified in the `image` field.
            +     * Output only. This field holds the digest (usually checksum) value for the
            +     * plugin image. The value is calculated based on the `image_uri` field. If
            +     * the `image_uri` field refers to a container image, the digest value is
            +     * obtained from the container image. If the `image_uri` field refers to
            +     * a generic artifact, the digest value is calculated based on the
            +     * contents of the file.
                  * 
            * * string image_digest = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -2746,10 +2975,12 @@ public Builder clearImageDigest() { * * *
            -     * Output only. The resolved digest for the image specified in the `image`
            -     * field. The digest is resolved during the creation of `WasmPluginVersion`
            -     * resource. This field holds the digest value, regardless of whether a tag or
            -     * digest was originally specified in the `image` field.
            +     * Output only. This field holds the digest (usually checksum) value for the
            +     * plugin image. The value is calculated based on the `image_uri` field. If
            +     * the `image_uri` field refers to a container image, the digest value is
            +     * obtained from the container image. If the `image_uri` field refers to
            +     * a generic artifact, the digest value is calculated based on the
            +     * contents of the file.
                  * 
            * * string image_digest = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -2776,8 +3007,8 @@ public Builder setImageDigestBytes(com.google.protobuf.ByteString value) { *
                  * Output only. This field holds the digest (usually checksum) value for the
                  * plugin configuration. The value is calculated based on the contents of
            -     * `plugin_config_data` or the container image defined by
            -     * the `plugin_config_uri` field.
            +     * `plugin_config_data` field or the image defined by the
            +     * `plugin_config_uri` field.
                  * 
            * * string plugin_config_digest = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -2802,8 +3033,8 @@ public java.lang.String getPluginConfigDigest() { *
                  * Output only. This field holds the digest (usually checksum) value for the
                  * plugin configuration. The value is calculated based on the contents of
            -     * `plugin_config_data` or the container image defined by
            -     * the `plugin_config_uri` field.
            +     * `plugin_config_data` field or the image defined by the
            +     * `plugin_config_uri` field.
                  * 
            * * string plugin_config_digest = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -2828,8 +3059,8 @@ public com.google.protobuf.ByteString getPluginConfigDigestBytes() { *
                  * Output only. This field holds the digest (usually checksum) value for the
                  * plugin configuration. The value is calculated based on the contents of
            -     * `plugin_config_data` or the container image defined by
            -     * the `plugin_config_uri` field.
            +     * `plugin_config_data` field or the image defined by the
            +     * `plugin_config_uri` field.
                  * 
            * * string plugin_config_digest = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -2853,8 +3084,8 @@ public Builder setPluginConfigDigest(java.lang.String value) { *
                  * Output only. This field holds the digest (usually checksum) value for the
                  * plugin configuration. The value is calculated based on the contents of
            -     * `plugin_config_data` or the container image defined by
            -     * the `plugin_config_uri` field.
            +     * `plugin_config_data` field or the image defined by the
            +     * `plugin_config_uri` field.
                  * 
            * * string plugin_config_digest = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -2874,8 +3105,8 @@ public Builder clearPluginConfigDigest() { *
                  * Output only. This field holds the digest (usually checksum) value for the
                  * plugin configuration. The value is calculated based on the contents of
            -     * `plugin_config_data` or the container image defined by
            -     * the `plugin_config_uri` field.
            +     * `plugin_config_data` field or the image defined by the
            +     * `plugin_config_uri` field.
                  * 
            * * string plugin_config_digest = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; diff --git a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/WasmPluginVersionOrBuilder.java b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/WasmPluginVersionOrBuilder.java index 431928fce2cf..53e036372d41 100644 --- a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/WasmPluginVersionOrBuilder.java +++ b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/WasmPluginVersionOrBuilder.java @@ -66,10 +66,24 @@ public interface WasmPluginVersionOrBuilder *
                * URI of the plugin configuration stored in the Artifact Registry.
                * The configuration is provided to the plugin at runtime through
            -   * the `ON_CONFIGURE` callback. The container image must contain
            -   * only a single file with the name `plugin.config`. When a
            -   * new `WasmPluginVersion` resource is created, the digest of the
            -   * container image is saved in the `plugin_config_digest` field.
            +   * the `ON_CONFIGURE` callback.
            +   *
            +   * The URI can refer to one of the following repository formats:
            +   *
            +   * * Container images: the `plugin_config_uri` must point to a container
            +   * that contains a single file with the name `plugin.config`.
            +   * When a new `WasmPluginVersion` resource is created, the digest of the
            +   * image is saved in the `plugin_config_digest` field.
            +   * When pulling a container image from Artifact Registry, the digest
            +   * value is used instead of an image tag.
            +   *
            +   * * Generic artifacts: the `plugin_config_uri` must be in this format:
            +   * `projects/{project}/locations/{location}/repositories/{repository}/
            +   * genericArtifacts/{package}:{version}`.
            +   * The specified package and version must contain a file with the name
            +   * `plugin.config`. When a new `WasmPluginVersion` resource is
            +   * created, the checksum of the contents of the file is saved in the
            +   * `plugin_config_digest` field.
                * 
            * * string plugin_config_uri = 13; @@ -84,10 +98,24 @@ public interface WasmPluginVersionOrBuilder *
                * URI of the plugin configuration stored in the Artifact Registry.
                * The configuration is provided to the plugin at runtime through
            -   * the `ON_CONFIGURE` callback. The container image must contain
            -   * only a single file with the name `plugin.config`. When a
            -   * new `WasmPluginVersion` resource is created, the digest of the
            -   * container image is saved in the `plugin_config_digest` field.
            +   * the `ON_CONFIGURE` callback.
            +   *
            +   * The URI can refer to one of the following repository formats:
            +   *
            +   * * Container images: the `plugin_config_uri` must point to a container
            +   * that contains a single file with the name `plugin.config`.
            +   * When a new `WasmPluginVersion` resource is created, the digest of the
            +   * image is saved in the `plugin_config_digest` field.
            +   * When pulling a container image from Artifact Registry, the digest
            +   * value is used instead of an image tag.
            +   *
            +   * * Generic artifacts: the `plugin_config_uri` must be in this format:
            +   * `projects/{project}/locations/{location}/repositories/{repository}/
            +   * genericArtifacts/{package}:{version}`.
            +   * The specified package and version must contain a file with the name
            +   * `plugin.config`. When a new `WasmPluginVersion` resource is
            +   * created, the checksum of the contents of the file is saved in the
            +   * `plugin_config_digest` field.
                * 
            * * string plugin_config_uri = 13; @@ -102,10 +130,24 @@ public interface WasmPluginVersionOrBuilder *
                * URI of the plugin configuration stored in the Artifact Registry.
                * The configuration is provided to the plugin at runtime through
            -   * the `ON_CONFIGURE` callback. The container image must contain
            -   * only a single file with the name `plugin.config`. When a
            -   * new `WasmPluginVersion` resource is created, the digest of the
            -   * container image is saved in the `plugin_config_digest` field.
            +   * the `ON_CONFIGURE` callback.
            +   *
            +   * The URI can refer to one of the following repository formats:
            +   *
            +   * * Container images: the `plugin_config_uri` must point to a container
            +   * that contains a single file with the name `plugin.config`.
            +   * When a new `WasmPluginVersion` resource is created, the digest of the
            +   * image is saved in the `plugin_config_digest` field.
            +   * When pulling a container image from Artifact Registry, the digest
            +   * value is used instead of an image tag.
            +   *
            +   * * Generic artifacts: the `plugin_config_uri` must be in this format:
            +   * `projects/{project}/locations/{location}/repositories/{repository}/
            +   * genericArtifacts/{package}:{version}`.
            +   * The specified package and version must contain a file with the name
            +   * `plugin.config`. When a new `WasmPluginVersion` resource is
            +   * created, the checksum of the contents of the file is saved in the
            +   * `plugin_config_digest` field.
                * 
            * * string plugin_config_uri = 13; @@ -322,12 +364,25 @@ java.lang.String getLabelsOrDefault( * * *
            -   * Optional. URI of the container image containing the plugin, stored in the
            +   * Optional. URI of the image containing the Wasm module, stored in
                * Artifact Registry.
            -   * When a new `WasmPluginVersion` resource is created, the digest
            -   * of the container image is saved in the `image_digest` field.
            -   * When downloading an image, the digest value is used instead of an
            -   * image tag.
            +   *
            +   * The URI can refer to one of the following repository formats:
            +   *
            +   * * Container images: the `image_uri` must point to a container that
            +   * contains a single file with the name `plugin.wasm`.
            +   * When a new `WasmPluginVersion` resource is created, the digest of the
            +   * image is saved in the `image_digest` field.
            +   * When pulling a container image from Artifact Registry, the digest value
            +   * is used instead of an image tag.
            +   *
            +   * * Generic artifacts: the `image_uri` must be in this format:
            +   * `projects/{project}/locations/{location}/repositories/{repository}/
            +   * genericArtifacts/{package}:{version}`.
            +   * The specified package and version must contain a file with the name
            +   * `plugin.wasm`. When a new `WasmPluginVersion` resource is created, the
            +   * checksum of the contents of the file is saved in the `image_digest`
            +   * field.
                * 
            * * string image_uri = 8 [(.google.api.field_behavior) = OPTIONAL]; @@ -340,12 +395,25 @@ java.lang.String getLabelsOrDefault( * * *
            -   * Optional. URI of the container image containing the plugin, stored in the
            +   * Optional. URI of the image containing the Wasm module, stored in
                * Artifact Registry.
            -   * When a new `WasmPluginVersion` resource is created, the digest
            -   * of the container image is saved in the `image_digest` field.
            -   * When downloading an image, the digest value is used instead of an
            -   * image tag.
            +   *
            +   * The URI can refer to one of the following repository formats:
            +   *
            +   * * Container images: the `image_uri` must point to a container that
            +   * contains a single file with the name `plugin.wasm`.
            +   * When a new `WasmPluginVersion` resource is created, the digest of the
            +   * image is saved in the `image_digest` field.
            +   * When pulling a container image from Artifact Registry, the digest value
            +   * is used instead of an image tag.
            +   *
            +   * * Generic artifacts: the `image_uri` must be in this format:
            +   * `projects/{project}/locations/{location}/repositories/{repository}/
            +   * genericArtifacts/{package}:{version}`.
            +   * The specified package and version must contain a file with the name
            +   * `plugin.wasm`. When a new `WasmPluginVersion` resource is created, the
            +   * checksum of the contents of the file is saved in the `image_digest`
            +   * field.
                * 
            * * string image_uri = 8 [(.google.api.field_behavior) = OPTIONAL]; @@ -358,10 +426,12 @@ java.lang.String getLabelsOrDefault( * * *
            -   * Output only. The resolved digest for the image specified in the `image`
            -   * field. The digest is resolved during the creation of `WasmPluginVersion`
            -   * resource. This field holds the digest value, regardless of whether a tag or
            -   * digest was originally specified in the `image` field.
            +   * Output only. This field holds the digest (usually checksum) value for the
            +   * plugin image. The value is calculated based on the `image_uri` field. If
            +   * the `image_uri` field refers to a container image, the digest value is
            +   * obtained from the container image. If the `image_uri` field refers to
            +   * a generic artifact, the digest value is calculated based on the
            +   * contents of the file.
                * 
            * * string image_digest = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -374,10 +444,12 @@ java.lang.String getLabelsOrDefault( * * *
            -   * Output only. The resolved digest for the image specified in the `image`
            -   * field. The digest is resolved during the creation of `WasmPluginVersion`
            -   * resource. This field holds the digest value, regardless of whether a tag or
            -   * digest was originally specified in the `image` field.
            +   * Output only. This field holds the digest (usually checksum) value for the
            +   * plugin image. The value is calculated based on the `image_uri` field. If
            +   * the `image_uri` field refers to a container image, the digest value is
            +   * obtained from the container image. If the `image_uri` field refers to
            +   * a generic artifact, the digest value is calculated based on the
            +   * contents of the file.
                * 
            * * string image_digest = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -392,8 +464,8 @@ java.lang.String getLabelsOrDefault( *
                * Output only. This field holds the digest (usually checksum) value for the
                * plugin configuration. The value is calculated based on the contents of
            -   * `plugin_config_data` or the container image defined by
            -   * the `plugin_config_uri` field.
            +   * `plugin_config_data` field or the image defined by the
            +   * `plugin_config_uri` field.
                * 
            * * string plugin_config_digest = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -408,8 +480,8 @@ java.lang.String getLabelsOrDefault( *
                * Output only. This field holds the digest (usually checksum) value for the
                * plugin configuration. The value is calculated based on the contents of
            -   * `plugin_config_data` or the container image defined by
            -   * the `plugin_config_uri` field.
            +   * `plugin_config_data` field or the image defined by the
            +   * `plugin_config_uri` field.
                * 
            * * string plugin_config_digest = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; diff --git a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/WireFormat.java b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/WireFormat.java index 015050f188e2..fcf4c95b5f51 100644 --- a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/WireFormat.java +++ b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/WireFormat.java @@ -55,6 +55,18 @@ public enum WireFormat implements com.google.protobuf.ProtocolMessageEnum { * EXT_PROC_GRPC = 1; */ EXT_PROC_GRPC(1), + /** + * + * + *
            +   * The extension service uses Envoy's `ext_authz` gRPC API. The backend
            +   * service for the extension must use HTTP2 or H2C as the protocol.
            +   * `EXT_AUTHZ_GRPC` is only supported for regional `AuthzExtension` resources.
            +   * 
            + * + * EXT_AUTHZ_GRPC = 3; + */ + EXT_AUTHZ_GRPC(3), UNRECOGNIZED(-1), ; @@ -94,6 +106,19 @@ public enum WireFormat implements com.google.protobuf.ProtocolMessageEnum { */ public static final int EXT_PROC_GRPC_VALUE = 1; + /** + * + * + *
            +   * The extension service uses Envoy's `ext_authz` gRPC API. The backend
            +   * service for the extension must use HTTP2 or H2C as the protocol.
            +   * `EXT_AUTHZ_GRPC` is only supported for regional `AuthzExtension` resources.
            +   * 
            + * + * EXT_AUTHZ_GRPC = 3; + */ + public static final int EXT_AUTHZ_GRPC_VALUE = 3; + public final int getNumber() { if (this == UNRECOGNIZED) { throw new java.lang.IllegalArgumentException( @@ -122,6 +147,8 @@ public static WireFormat forNumber(int value) { return WIRE_FORMAT_UNSPECIFIED; case 1: return EXT_PROC_GRPC; + case 3: + return EXT_AUTHZ_GRPC; default: return null; } diff --git a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/proto/google/cloud/networkservices/v1/agent_gateway.proto b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/proto/google/cloud/networkservices/v1/agent_gateway.proto new file mode 100644 index 000000000000..1ecb015e6553 --- /dev/null +++ b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/proto/google/cloud/networkservices/v1/agent_gateway.proto @@ -0,0 +1,299 @@ +// 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 +// +// http://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. + +syntax = "proto3"; + +package google.cloud.networkservices.v1; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/field_mask.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.NetworkServices.V1"; +option go_package = "cloud.google.com/go/networkservices/apiv1/networkservicespb;networkservicespb"; +option java_multiple_files = true; +option java_outer_classname = "AgentGatewayProto"; +option java_package = "com.google.cloud.networkservices.v1"; +option php_namespace = "Google\\Cloud\\NetworkServices\\V1"; +option ruby_package = "Google::Cloud::NetworkServices::V1"; + +// AgentGateway represents the agent gateway resource. +message AgentGateway { + option (google.api.resource) = { + type: "networkservices.googleapis.com/AgentGateway" + pattern: "projects/{project}/locations/{location}/agentGateways/{agent_gateway}" + plural: "agentGateways" + singular: "agentGateway" + }; + + // Configuration for Google Managed deployment mode. + // Proxy is orchestrated and managed by GoogleCloud in a tenant project. + message GoogleManaged { + // GovernedAccessPath defines the type of access to protect. + enum GovernedAccessPath { + // Governed access path is not specified. + GOVERNED_ACCESS_PATH_UNSPECIFIED = 0; + + // Govern agent conections to destinations. + AGENT_TO_ANYWHERE = 1; + + // Protect connection to Agent or Tool. + CLIENT_TO_AGENT = 2; + } + + // Optional. Operating Mode of Agent Gateway. + GovernedAccessPath governed_access_path = 1 + [(google.api.field_behavior) = OPTIONAL]; + } + + // Configuration for Self Managed deployment mode. + // Attach to existing Application Load Balancers or Secure Web Proxies. + message SelfManaged { + // Optional. A supported Google Cloud networking proxy in the Project and + // Location + string resource_uri = 1 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.resource_reference) = { type: "*" } + ]; + } + + // NetworkConfig contains network configurations for the AgentGateway. + message NetworkConfig { + // Configuration for Egress + message Egress { + // TrustConfig defines the trust configuration for egress. + message TrustConfig { + // Required. PEM encoded root certificates used to validate the identity + // of the upstream servers/destinations during egress connections. + repeated string pem_certificates = 1 + [(google.api.field_behavior) = REQUIRED]; + } + + // Optional. The URI of the Network Attachment resource. + string network_attachment = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. TrustConfig defines the trust configuration for egress. + TrustConfig trust_config = 2 [(google.api.field_behavior) = OPTIONAL]; + } + + // DNS peering config for the user VPC network. + message DnsPeeringConfig { + // Required. Domain names for which DNS queries should be forwarded to the + // target network. + repeated string domains = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. Target project ID to which DNS queries should be forwarded + // to. This can be the same project that contains the AgentGateway or a + // different project. + string target_project = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. Target network in 'target project' to which DNS queries + // should be forwarded to. Must be in format of + // `projects/{project}/global/networks/{network}`. + string target_network = 3 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "compute.googleapis.com/Network" + } + ]; + } + + // Optional. Optional PSC-Interface network attachment for connectivity to + // your private VPCs network. + Egress egress = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Optional DNS peering configuration for connectivity to your + // private VPC network. + DnsPeeringConfig dns_peering_config = 2 + [(google.api.field_behavior) = OPTIONAL]; + } + + // AgentGatewayOutputCard contains informational output-only fields + message AgentGatewayOutputCard { + // Output only. mTLS Endpoint associated with this AgentGateway + string mtls_endpoint = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Root Certificates for Agents to validate this AgentGateway + repeated string root_certificates = 5 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Service Account used by Service Extensions to operate. + string service_extensions_service_account = 4 + [(google.api.field_behavior) = OUTPUT_ONLY]; + } + + // Enums of all supported protocols + enum Protocol { + // Unspecified protocol. + PROTOCOL_UNSPECIFIED = 0; + + // Message Control Plane protocol. + MCP = 1; + } + + // Deployment mode of the network proxy. Exactly one of the fields in this + // `oneof` must be set. + oneof deployment_mode { + // Optional. Proxy is orchestrated and managed by GoogleCloud in a tenant + // project. + GoogleManaged google_managed = 8 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Attach to existing Application Load Balancers or Secure Web + // Proxies. + SelfManaged self_managed = 9 [(google.api.field_behavior) = OPTIONAL]; + } + + // Identifier. Name of the AgentGateway resource. It matches pattern + // `projects/*/locations/*/agentGateways/`. + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; + + // Output only. The timestamp when the resource was created. + google.protobuf.Timestamp create_time = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The timestamp when the resource was updated. + google.protobuf.Timestamp update_time = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. Set of label tags associated with the AgentGateway resource. + map labels = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A free-text description of the resource. Max length 1024 + // characters. + string description = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Etag of the resource. + // If this is provided, it must match the server's etag. If the provided etag + // does not match the server's etag, the request will fail with a 409 ABORTED + // error. + string etag = 6 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Deprecated. + repeated Protocol protocols = 12 + [deprecated = true, (google.api.field_behavior) = OPTIONAL]; + + // Optional. A list of Agent registries containing the agents, MCP servers and + // tools governed by the Agent Gateway. Note: Currently limited to + // project-scoped registries Must be of format + // `//agentregistry.googleapis.com/projects/{project}/locations/{location}/ + repeated string registries = 13 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Network configuration for the AgentGateway. + NetworkConfig network_config = 10 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. Field for populated AgentGateway card. + AgentGatewayOutputCard agent_gateway_card = 11 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Request used with the ListAgentGateways method. +message ListAgentGatewaysRequest { + // Required. The project and location from which the AgentGateways should be + // listed, specified in the format `projects/*/locations/*`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "networkservices.googleapis.com/AgentGateway" + } + ]; + + // Optional. Maximum number of AgentGateways to return per call. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The value returned by the last `ListAgentGatewaysResponse` + // Indicates that this is a continuation of a prior `ListAgentGateways` + // call, and that the system should return the next page of data. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If true, allow partial responses for multi-regional Aggregated + // List requests. Otherwise if one of the locations is down or unreachable, + // the Aggregated List request will fail. + bool return_partial_success = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response returned by the ListAgentGateways method. +message ListAgentGatewaysResponse { + // List of AgentGateway resources. + repeated AgentGateway agent_gateways = 1; + + // If there might be more results than those appearing in this response, then + // `next_page_token` is included. To get the next set of results, call this + // method again using the value of `next_page_token` as `page_token`. + string next_page_token = 2; + + // Unreachable resources. Populated when the request attempts to list all + // resources across all supported locations, while some locations are + // temporarily unavailable. + repeated string unreachable = 3; +} + +// Request used by the GetAgentGateway method. +message GetAgentGatewayRequest { + // Required. A name of the AgentGateway to get. Must be in the format + // `projects/*/locations/*/agentGateways/*`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "networkservices.googleapis.com/AgentGateway" + } + ]; +} + +// Request used by the CreateAgentGateway method. +message CreateAgentGatewayRequest { + // Required. The parent resource of the AgentGateway. Must be in the + // format `projects/*/locations/*`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "networkservices.googleapis.com/AgentGateway" + } + ]; + + // Required. Short name of the AgentGateway resource to be created. + string agent_gateway_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. AgentGateway resource to be created. + AgentGateway agent_gateway = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// Request used by the UpdateAgentGateway method. +message UpdateAgentGatewayRequest { + // Optional. Field mask is used to specify the fields to be overwritten in the + // AgentGateway resource by the update. + // The fields specified in the update_mask are relative to the resource, not + // the full request. A field will be overwritten if it is in the mask. If the + // user does not provide a mask then all fields will be overwritten. + google.protobuf.FieldMask update_mask = 1 + [(google.api.field_behavior) = OPTIONAL]; + + // Required. Updated AgentGateway resource. + AgentGateway agent_gateway = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Request used by the DeleteAgentGateway method. +message DeleteAgentGatewayRequest { + // Required. A name of the AgentGateway to delete. Must be in the format + // `projects/*/locations/*/agentGateways/*`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "networkservices.googleapis.com/AgentGateway" + } + ]; + + // Optional. The etag of the AgentGateway to delete. + string etag = 2 [(google.api.field_behavior) = OPTIONAL]; +} diff --git a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/proto/google/cloud/networkservices/v1/common.proto b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/proto/google/cloud/networkservices/v1/common.proto index cbc5a9d41f8c..27df8fa32e4b 100644 --- a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/proto/google/cloud/networkservices/v1/common.proto +++ b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/proto/google/cloud/networkservices/v1/common.proto @@ -1,4 +1,4 @@ -// Copyright 2025 Google LLC +// 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. @@ -36,10 +36,10 @@ enum EnvoyHeaders { NONE = 1; // Envoy will insert default internal debug headers into upstream requests: - // x-envoy-attempt-count - // x-envoy-is-timeout-retry - // x-envoy-expected-rq-timeout-ms - // x-envoy-original-path + // x-envoy-attempt-count, + // x-envoy-is-timeout-retry, + // x-envoy-expected-rq-timeout-ms, + // x-envoy-original-path, // x-envoy-upstream-stream-duration-ms DEBUG_HEADERS = 2; } diff --git a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/proto/google/cloud/networkservices/v1/dep.proto b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/proto/google/cloud/networkservices/v1/dep.proto index 1ec1ee251c01..1f23c6f4521e 100644 --- a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/proto/google/cloud/networkservices/v1/dep.proto +++ b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/proto/google/cloud/networkservices/v1/dep.proto @@ -1,4 +1,4 @@ -// Copyright 2025 Google LLC +// 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. @@ -342,6 +342,35 @@ enum WireFormat { // `supported_events` for a client request are sent as part of the same // gRPC stream. EXT_PROC_GRPC = 1; + + // The extension service uses Envoy's `ext_authz` gRPC API. The backend + // service for the extension must use HTTP2 or H2C as the protocol. + // `EXT_AUTHZ_GRPC` is only supported for regional `AuthzExtension` resources. + EXT_AUTHZ_GRPC = 3; +} + +// The send mode for body processing. +enum BodySendMode { + // Default value. Do not use. + BODY_SEND_MODE_UNSPECIFIED = 0; + + // Calls to the extension are executed in the streamed mode. Subsequent + // chunks will be sent only after the previous chunks have been processed. + // + // The content of the body chunks is sent one way to the extension. Extension + // may send modified chunks back. + // + // This is the default value if the processing mode is not specified. + BODY_SEND_MODE_STREAMED = 1; + + // Calls are executed in the full duplex mode. Subsequent chunks will be sent + // for processing without waiting for the response for the previous chunk or + // for the response for `REQUEST_HEADERS` event. + // + // Extension can freely modify or chunk the body contents. If the extension + // doesn't send the body contents back, the next extension in the chain or the + // upstream will receive an empty body. + BODY_SEND_MODE_FULL_DUPLEX_STREAMED = 2; } // A single extension chain wrapper that contains the match conditions and @@ -359,13 +388,15 @@ message ExtensionChain { // A single extension in the chain to execute for the matching request. message Extension { - // Required. The name for this extension. + // Optional. The name for this extension. // The name is logged as part of the HTTP request logs. // The name must conform with RFC-1034, is restricted to lower-cased // letters, numbers and hyphens, and can have a maximum length of 63 // characters. Additionally, the first character must be a letter and the // last a letter or a number. - string name = 1 [(google.api.field_behavior) = REQUIRED]; + // + // This field is required except for AuthzExtension. + string name = 1 [(google.api.field_behavior) = OPTIONAL]; // Optional. The `:authority` header in the gRPC request sent from Envoy // to the extension service. @@ -409,6 +440,10 @@ message ExtensionChain { // // For the `LbEdgeExtension` resource, this field is required and must only // contain `REQUEST_HEADERS` event. + // + // For the `AuthzExtension` resource, this field is optional. + // `REQUEST_HEADERS` is the only supported event. If unspecified, + // `REQUEST_HEADERS` event is assumed as supported. repeated EventType supported_events = 4 [(google.api.field_behavior) = OPTIONAL]; @@ -443,11 +478,26 @@ message ExtensionChain { repeated string forward_headers = 7 [(google.api.field_behavior) = OPTIONAL]; + // Optional. List of the Envoy attributes to forward to the extension + // server. The attributes provided here are included as part of the + // `ProcessingRequest.attributes` field (of type + // `map`), where the keys are the attribute + // names. Refer to the + // [documentation](https://cloud.google.com/service-extensions/docs/cel-matcher-language-reference#attributes) + // for the names of attributes that can be forwarded. If omitted, no + // attributes are sent. Each element is a string indicating the + // attribute name. + repeated string forward_attributes = 8 + [(google.api.field_behavior) = OPTIONAL]; + // Optional. The metadata provided here is included as part of the // `metadata_context` (of type `google.protobuf.Struct`) in the // `ProcessingRequest` message sent to the extension server. // - // The metadata is available under the namespace + // For `AuthzExtension` resources, the metadata is available under the + // namespace `com.google.authz_extension.`. + // For other types of extensions, the metadata is available under the + // namespace // `com.google....`. // For example: // `com.google.lb_traffic_extension.lbtrafficextension1.chain1.ext1`. @@ -473,6 +523,47 @@ message ExtensionChain { // * All values must be strings. google.protobuf.Struct metadata = 9 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Configures the send mode for request body processing. + // + // The field can only be set if `supported_events` includes `REQUEST_BODY`. + // If `supported_events` includes `REQUEST_BODY`, + // but `request_body_send_mode` is unset, the default value `STREAMED` is + // used. + // + // When this field is set to `FULL_DUPLEX_STREAMED`, `supported_events` + // must include both `REQUEST_BODY` and `REQUEST_TRAILERS`. + // + // This field can be set only for `LbTrafficExtension` and + // `LbRouteExtension` resources, and only when the `service` field of the + // extension points to a `BackendService`. Only `FULL_DUPLEX_STREAMED` mode + // is supported for `LbRouteExtension` resources. + BodySendMode request_body_send_mode = 14 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Configures the send mode for response processing. If + // unspecified, the default value `STREAMED` is used. + // + // The field can only be set if `supported_events` includes `RESPONSE_BODY`. + // If `supported_events` includes `RESPONSE_BODY`, but + // `response_body_send_mode` is unset, the default value `STREAMED` is used. + // + // When this field is set to `FULL_DUPLEX_STREAMED`, `supported_events` + // must include both `RESPONSE_BODY` and `RESPONSE_TRAILERS`. + // + // This field can be set only for `LbTrafficExtension` resources, and only + // when the `service` field of the extension points to a `BackendService`. + BodySendMode response_body_send_mode = 15 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. When set to `true`, the calls to the extension backend are + // performed asynchronously, without pausing the processing of the ongoing + // request. In this mode, only `STREAMED` (default) body processing is + // supported. Responses, if any, are ignored. + // + // Supported by regional `LbTrafficExtension` and `LbRouteExtension` + // resources. + bool observability_mode = 16 [(google.api.field_behavior) = OPTIONAL]; } // Required. The name for this extension chain. @@ -1208,17 +1299,19 @@ message AuthzExtension { // resources. map labels = 5 [(google.api.field_behavior) = OPTIONAL]; - // Required. All backend services and forwarding rules referenced by this + // Optional. All backend services and forwarding rules referenced by this // extension must share the same load balancing scheme. Supported values: - // `INTERNAL_MANAGED`, `EXTERNAL_MANAGED`. For more information, refer to + // `INTERNAL_MANAGED`, `EXTERNAL_MANAGED`. Can be omitted for AuthzExtensions + // that do not reference a backend service. For more information, refer to // [Backend services // overview](https://cloud.google.com/load-balancing/docs/backend-service). LoadBalancingScheme load_balancing_scheme = 6 - [(google.api.field_behavior) = REQUIRED]; + [(google.api.field_behavior) = OPTIONAL]; - // Required. The `:authority` header in the gRPC request sent from Envoy - // to the extension service. - string authority = 7 [(google.api.field_behavior) = REQUIRED]; + // Optional. The `:authority` header in the gRPC request sent from Envoy to + // the extension service. It is required when the `service` field points to a + // backend service or a wasm plugin. + string authority = 7 [(google.api.field_behavior) = OPTIONAL]; // Required. The reference to the service that runs the extension. // @@ -1268,8 +1361,22 @@ message AuthzExtension { // Each element is a string indicating the header name. repeated string forward_headers = 12 [(google.api.field_behavior) = OPTIONAL]; + // Optional. List of the Envoy attributes to forward to the extension server. + // The attributes provided here are included as part of the + // `ProcessingRequest.attributes` field (of type + // `map`), where the keys are the attribute + // names. Refer to the + // [documentation](https://cloud.google.com/service-extensions/docs/cel-matcher-language-reference#attributes) + // for the names of attributes that can be forwarded. If omitted, no + // attributes are sent. Each element is a string indicating the + // attribute name. + repeated string forward_attributes = 13 + [(google.api.field_behavior) = OPTIONAL]; + // Optional. The format of communication supported by the callout extension. - // If not specified, the default value `EXT_PROC_GRPC` is used. + // This field is supported only for regional `AuthzExtension` resources. If + // not specified, the default value `EXT_PROC_GRPC` is used. Global + // `AuthzExtension` resources use the `EXT_PROC_GRPC` wire format. WireFormat wire_format = 14 [(google.api.field_behavior) = OPTIONAL]; } diff --git a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/proto/google/cloud/networkservices/v1/endpoint_policy.proto b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/proto/google/cloud/networkservices/v1/endpoint_policy.proto index 411a4bc3cb63..7907b02f3381 100644 --- a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/proto/google/cloud/networkservices/v1/endpoint_policy.proto +++ b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/proto/google/cloud/networkservices/v1/endpoint_policy.proto @@ -1,4 +1,4 @@ -// Copyright 2025 Google LLC +// 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. @@ -65,7 +65,7 @@ message EndpointPolicy { } // Identifier. Name of the EndpointPolicy resource. It matches pattern - // `projects/{project}/locations/global/endpointPolicies/{endpoint_policy}`. + // `projects/{project}/locations/*/endpointPolicies/{endpoint_policy}`. string name = 1 [(google.api.field_behavior) = IDENTIFIER]; // Output only. The timestamp when the resource was created. @@ -138,7 +138,7 @@ message EndpointPolicy { // Request used with the ListEndpointPolicies method. message ListEndpointPoliciesRequest { // Required. The project and location from which the EndpointPolicies should - // be listed, specified in the format `projects/*/locations/global`. + // be listed, specified in the format `projects/*/locations/*`. string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -181,7 +181,7 @@ message ListEndpointPoliciesResponse { // Request used with the GetEndpointPolicy method. message GetEndpointPolicyRequest { // Required. A name of the EndpointPolicy to get. Must be in the format - // `projects/*/locations/global/endpointPolicies/*`. + // `projects/*/locations/*/endpointPolicies/*`. string name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -193,7 +193,7 @@ message GetEndpointPolicyRequest { // Request used with the CreateEndpointPolicy method. message CreateEndpointPolicyRequest { // Required. The parent resource of the EndpointPolicy. Must be in the - // format `projects/*/locations/global`. + // format `projects/*/locations/*`. string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -226,7 +226,7 @@ message UpdateEndpointPolicyRequest { // Request used with the DeleteEndpointPolicy method. message DeleteEndpointPolicyRequest { // Required. A name of the EndpointPolicy to delete. Must be in the format - // `projects/*/locations/global/endpointPolicies/*`. + // `projects/*/locations/*/endpointPolicies/*`. string name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { diff --git a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/proto/google/cloud/networkservices/v1/extensibility.proto b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/proto/google/cloud/networkservices/v1/extensibility.proto index 42fb82f24b53..e94cd57524e6 100644 --- a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/proto/google/cloud/networkservices/v1/extensibility.proto +++ b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/proto/google/cloud/networkservices/v1/extensibility.proto @@ -1,4 +1,4 @@ -// Copyright 2025 Google LLC +// 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. @@ -64,10 +64,23 @@ message WasmPlugin { // URI of the plugin configuration stored in the Artifact Registry. // The configuration is provided to the plugin at runtime through - // the `ON_CONFIGURE` callback. The container image must - // contain only a single file with the name - // `plugin.config`. When a new `WasmPluginVersion` - // resource is created, the digest of the container image is saved in the + // the `ON_CONFIGURE` callback. + // + // The URI can refer to one of the following repository formats: + // + // * Container images: the `plugin_config_uri` must point to a container + // that contains a single file with the name `plugin.config`. + // When a new `WasmPluginVersion` resource is created, the digest of the + // image is saved in the `plugin_config_digest` field. + // When pulling a container image from Artifact Registry, the digest + // value is used instead of an image tag. + // + // * Generic artifacts: the `plugin_config_uri` must be in this format: + // `projects/{project}/locations/{location}/repositories/{repository}/ + // genericArtifacts/{package}:{version}`. + // The specified package and version must contain a file with the name + // `plugin.config`. When a new `WasmPluginVersion` resource is + // created, the checksum of the contents of the file is saved in the // `plugin_config_digest` field. string plugin_config_uri = 10; } @@ -87,23 +100,38 @@ message WasmPlugin { // resource. map labels = 4 [(google.api.field_behavior) = OPTIONAL]; - // Optional. URI of the container image containing the Wasm module, stored - // in the Artifact Registry. The container image must contain only a single - // file with the name `plugin.wasm`. When a new `WasmPluginVersion` resource - // is created, the URI gets resolved to an image digest and saved in the - // `image_digest` field. + // Optional. URI of the image containing the Wasm module, stored in + // Artifact Registry. + // + // The URI can refer to one of the following repository formats: + // + // * Container images: the `image_uri` must point to a container that + // contains a single file with the name `plugin.wasm`. + // When a new `WasmPluginVersion` resource is created, the digest of the + // image is saved in the `image_digest` field. + // When pulling a container image from Artifact Registry, the digest value + // is used instead of an image tag. + // + // * Generic artifacts: the `image_uri` must be in this format: + // `projects/{project}/locations/{location}/repositories/{repository}/ + // genericArtifacts/{package}:{version}`. + // The specified package and version must contain a file with the name + // `plugin.wasm`. When a new `WasmPluginVersion` resource is created, the + // checksum of the contents of the file is saved in the `image_digest` + // field. string image_uri = 5 [(google.api.field_behavior) = OPTIONAL]; - // Output only. The resolved digest for the image specified in `image`. - // The digest is resolved during the creation of a - // `WasmPluginVersion` resource. - // This field holds the digest value regardless of whether a tag or - // digest was originally specified in the `image` field. + // Output only. This field holds the digest (usually checksum) value for the + // plugin image. The value is calculated based on the `image_uri` field. If + // the `image_uri` field refers to a container image, the digest value is + // obtained from the container image. If the `image_uri` field refers to + // a generic artifact, the digest value is calculated based on the + // contents of the file. string image_digest = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. This field holds the digest (usually checksum) value for the // plugin configuration. The value is calculated based on the contents of - // the `plugin_config_data` field or the container image defined by the + // `plugin_config_data` field or the image defined by the // `plugin_config_uri` field. string plugin_config_digest = 11 [(google.api.field_behavior) = OUTPUT_ONLY]; @@ -155,9 +183,9 @@ message WasmPlugin { // This field can be specified only if logging is enabled for this plugin. float sample_rate = 2 [(google.api.field_behavior) = NON_EMPTY_DEFAULT]; - // Non-empty default. Specificies the lowest level of the plugin logs that - // are exported to Cloud Logging. This setting relates to the logs generated - // by using logging statements in your Wasm code. + // Non-empty default. Specifies the lowest level of the plugin logs that are + // exported to Cloud Logging. This setting relates to the logs generated by + // using logging statements in your Wasm code. // // This field is can be set only if logging is enabled for the plugin. // @@ -251,10 +279,24 @@ message WasmPluginVersion { // URI of the plugin configuration stored in the Artifact Registry. // The configuration is provided to the plugin at runtime through - // the `ON_CONFIGURE` callback. The container image must contain - // only a single file with the name `plugin.config`. When a - // new `WasmPluginVersion` resource is created, the digest of the - // container image is saved in the `plugin_config_digest` field. + // the `ON_CONFIGURE` callback. + // + // The URI can refer to one of the following repository formats: + // + // * Container images: the `plugin_config_uri` must point to a container + // that contains a single file with the name `plugin.config`. + // When a new `WasmPluginVersion` resource is created, the digest of the + // image is saved in the `plugin_config_digest` field. + // When pulling a container image from Artifact Registry, the digest + // value is used instead of an image tag. + // + // * Generic artifacts: the `plugin_config_uri` must be in this format: + // `projects/{project}/locations/{location}/repositories/{repository}/ + // genericArtifacts/{package}:{version}`. + // The specified package and version must contain a file with the name + // `plugin.config`. When a new `WasmPluginVersion` resource is + // created, the checksum of the contents of the file is saved in the + // `plugin_config_digest` field. string plugin_config_uri = 13; } @@ -278,24 +320,39 @@ message WasmPluginVersion { // resource. map labels = 6 [(google.api.field_behavior) = OPTIONAL]; - // Optional. URI of the container image containing the plugin, stored in the + // Optional. URI of the image containing the Wasm module, stored in // Artifact Registry. - // When a new `WasmPluginVersion` resource is created, the digest - // of the container image is saved in the `image_digest` field. - // When downloading an image, the digest value is used instead of an - // image tag. + // + // The URI can refer to one of the following repository formats: + // + // * Container images: the `image_uri` must point to a container that + // contains a single file with the name `plugin.wasm`. + // When a new `WasmPluginVersion` resource is created, the digest of the + // image is saved in the `image_digest` field. + // When pulling a container image from Artifact Registry, the digest value + // is used instead of an image tag. + // + // * Generic artifacts: the `image_uri` must be in this format: + // `projects/{project}/locations/{location}/repositories/{repository}/ + // genericArtifacts/{package}:{version}`. + // The specified package and version must contain a file with the name + // `plugin.wasm`. When a new `WasmPluginVersion` resource is created, the + // checksum of the contents of the file is saved in the `image_digest` + // field. string image_uri = 8 [(google.api.field_behavior) = OPTIONAL]; - // Output only. The resolved digest for the image specified in the `image` - // field. The digest is resolved during the creation of `WasmPluginVersion` - // resource. This field holds the digest value, regardless of whether a tag or - // digest was originally specified in the `image` field. + // Output only. This field holds the digest (usually checksum) value for the + // plugin image. The value is calculated based on the `image_uri` field. If + // the `image_uri` field refers to a container image, the digest value is + // obtained from the container image. If the `image_uri` field refers to + // a generic artifact, the digest value is calculated based on the + // contents of the file. string image_digest = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. This field holds the digest (usually checksum) value for the // plugin configuration. The value is calculated based on the contents of - // `plugin_config_data` or the container image defined by - // the `plugin_config_uri` field. + // `plugin_config_data` field or the image defined by the + // `plugin_config_uri` field. string plugin_config_digest = 14 [(google.api.field_behavior) = OUTPUT_ONLY]; } diff --git a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/proto/google/cloud/networkservices/v1/gateway.proto b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/proto/google/cloud/networkservices/v1/gateway.proto index b8be0b522112..a2a94615c9cc 100644 --- a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/proto/google/cloud/networkservices/v1/gateway.proto +++ b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/proto/google/cloud/networkservices/v1/gateway.proto @@ -1,4 +1,4 @@ -// Copyright 2025 Google LLC +// 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. @@ -29,9 +29,6 @@ option java_outer_classname = "GatewayProto"; option java_package = "com.google.cloud.networkservices.v1"; option php_namespace = "Google\\Cloud\\NetworkServices\\V1"; option ruby_package = "Google::Cloud::NetworkServices::V1"; - -// Resource definitions uncouple the proto from the external API for client -// generation purposes. option (google.api.resource_definition) = { type: "networksecurity.googleapis.com/GatewaySecurityPolicy" pattern: "projects/{project}/locations/{location}/gatewaySecurityPolicies/{gateway_security_policy}" @@ -150,11 +147,16 @@ message Gateway { // Required. One or more port numbers (1-65535), on which the Gateway will // receive traffic. The proxy binds to the specified ports. - // Gateways of type 'SECURE_WEB_GATEWAY' are limited to 1 port. + // Gateways of type 'SECURE_WEB_GATEWAY' are limited to 5 ports. // Gateways of type 'OPEN_MESH' listen on 0.0.0.0 for IPv4 and :: for IPv6 and // support multiple ports. repeated int32 ports = 11 [(google.api.field_behavior) = REQUIRED]; + // Optional. If true, the Gateway will listen on all ports. This is mutually + // exclusive with the `ports` field. This field only applies to gateways of + // type 'SECURE_WEB_GATEWAY'. + bool all_ports = 34 [(google.api.field_behavior) = OPTIONAL]; + // Optional. Scope determines how configuration across multiple Gateway // instances are merged. The configuration for multiple Gateway instances with // the same scope will be merged as presented as a single configuration to the @@ -235,6 +237,11 @@ message Gateway { // This field is configurable only for gateways of type SECURE_WEB_GATEWAY. // This field is required for gateways of type SECURE_WEB_GATEWAY. RoutingMode routing_mode = 32 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If true, the gateway will allow traffic from clients outside of + // the region where the gateway is located. + // This field is configurable only for gateways of type SECURE_WEB_GATEWAY. + bool allow_global_access = 33 [(google.api.field_behavior) = OPTIONAL]; } // Request used with the ListGateways method. diff --git a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/proto/google/cloud/networkservices/v1/grpc_route.proto b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/proto/google/cloud/networkservices/v1/grpc_route.proto index da02e3663627..f88909554206 100644 --- a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/proto/google/cloud/networkservices/v1/grpc_route.proto +++ b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/proto/google/cloud/networkservices/v1/grpc_route.proto @@ -1,4 +1,4 @@ -// Copyright 2025 Google LLC +// 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. @@ -29,9 +29,6 @@ option java_outer_classname = "GrpcRouteProto"; option java_package = "com.google.cloud.networkservices.v1"; option php_namespace = "Google\\Cloud\\NetworkServices\\V1"; option ruby_package = "Google::Cloud::NetworkServices::V1"; - -// Resource definitions uncouple the proto from the external API for client -// generation purposes. option (google.api.resource_definition) = { type: "compute.googleapis.com/BackendService" pattern: "projects/{project}/locations/{location}/backendServices/{backend_service}" @@ -289,7 +286,7 @@ message GrpcRoute { } // Identifier. Name of the GrpcRoute resource. It matches pattern - // `projects/*/locations/global/grpcRoutes/` + // `projects/*/locations/*/grpcRoutes/` string name = 1 [(google.api.field_behavior) = IDENTIFIER]; // Output only. Server-defined URL of this resource @@ -347,7 +344,7 @@ message GrpcRoute { // one of the routing rules to route the requests served by the mesh. // // Each mesh reference should match the pattern: - // `projects/*/locations/global/meshes/` + // `projects/*/locations/*/meshes/` repeated string meshes = 9 [ (google.api.field_behavior) = OPTIONAL, (google.api.resource_reference) = { @@ -360,7 +357,7 @@ message GrpcRoute { // gateway. // // Each gateway reference should match the pattern: - // `projects/*/locations/global/gateways/` + // `projects/*/locations/*/gateways/` repeated string gateways = 10 [ (google.api.field_behavior) = OPTIONAL, (google.api.resource_reference) = { @@ -379,7 +376,7 @@ message GrpcRoute { // Request used with the ListGrpcRoutes method. message ListGrpcRoutesRequest { // Required. The project and location from which the GrpcRoutes should be - // listed, specified in the format `projects/*/locations/global`. + // listed, specified in the format `projects/*/locations/*`. string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -421,7 +418,7 @@ message ListGrpcRoutesResponse { // Request used by the GetGrpcRoute method. message GetGrpcRouteRequest { // Required. A name of the GrpcRoute to get. Must be in the format - // `projects/*/locations/global/grpcRoutes/*`. + // `projects/*/locations/*/grpcRoutes/*`. string name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -433,7 +430,7 @@ message GetGrpcRouteRequest { // Request used by the CreateGrpcRoute method. message CreateGrpcRouteRequest { // Required. The parent resource of the GrpcRoute. Must be in the - // format `projects/*/locations/global`. + // format `projects/*/locations/*`. string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -465,7 +462,7 @@ message UpdateGrpcRouteRequest { // Request used by the DeleteGrpcRoute method. message DeleteGrpcRouteRequest { // Required. A name of the GrpcRoute to delete. Must be in the format - // `projects/*/locations/global/grpcRoutes/*`. + // `projects/*/locations/*/grpcRoutes/*`. string name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { diff --git a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/proto/google/cloud/networkservices/v1/http_route.proto b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/proto/google/cloud/networkservices/v1/http_route.proto index e2b71cb45b12..888fec4d200a 100644 --- a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/proto/google/cloud/networkservices/v1/http_route.proto +++ b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/proto/google/cloud/networkservices/v1/http_route.proto @@ -1,4 +1,4 @@ -// Copyright 2025 Google LLC +// 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. @@ -17,6 +17,7 @@ syntax = "proto3"; package google.cloud.networkservices.v1; import "google/api/field_behavior.proto"; +import "google/api/field_info.proto"; import "google/api/resource.proto"; import "google/protobuf/duration.proto"; import "google/protobuf/field_mask.proto"; @@ -530,7 +531,7 @@ message HttpRoute { } // Identifier. Name of the HttpRoute resource. It matches pattern - // `projects/*/locations/global/httpRoutes/http_route_name>`. + // `projects/*/locations/*/httpRoutes/http_route_name>`. string name = 1 [(google.api.field_behavior) = IDENTIFIER]; // Output only. Server-defined URL of this resource @@ -578,7 +579,7 @@ message HttpRoute { // one of the routing rules to route the requests served by the mesh. // // Each mesh reference should match the pattern: - // `projects/*/locations/global/meshes/` + // `projects/*/locations/*/meshes/` // // The attached Mesh should be of a type SIDECAR repeated string meshes = 8 [ @@ -593,7 +594,7 @@ message HttpRoute { // gateway. // // Each gateway reference should match the pattern: - // `projects/*/locations/global/gateways/` + // `projects/*/locations/*/gateways/` repeated string gateways = 9 [ (google.api.field_behavior) = OPTIONAL, (google.api.resource_reference) = { @@ -613,7 +614,7 @@ message HttpRoute { // Request used with the ListHttpRoutes method. message ListHttpRoutesRequest { // Required. The project and location from which the HttpRoutes should be - // listed, specified in the format `projects/*/locations/global`. + // listed, specified in the format `projects/*/locations/*`. string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -633,6 +634,9 @@ message ListHttpRoutesRequest { // List requests. Otherwise if one of the locations is down or unreachable, // the Aggregated List request will fail. bool return_partial_success = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Filter expression to restrict the list. + string filter = 5 [(google.api.field_behavior) = OPTIONAL]; } // Response returned by the ListHttpRoutes method. @@ -655,7 +659,7 @@ message ListHttpRoutesResponse { // Request used by the GetHttpRoute method. message GetHttpRouteRequest { // Required. A name of the HttpRoute to get. Must be in the format - // `projects/*/locations/global/httpRoutes/*`. + // `projects/*/locations/*/httpRoutes/*`. string name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -667,7 +671,7 @@ message GetHttpRouteRequest { // Request used by the HttpRoute method. message CreateHttpRouteRequest { // Required. The parent resource of the HttpRoute. Must be in the - // format `projects/*/locations/global`. + // format `projects/*/locations/*`. string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -680,6 +684,12 @@ message CreateHttpRouteRequest { // Required. HttpRoute resource to be created. HttpRoute http_route = 3 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Idempotent request UUID. + string request_id = 4 [ + (google.api.field_info).format = UUID4, + (google.api.field_behavior) = OPTIONAL + ]; } // Request used by the UpdateHttpRoute method. @@ -699,7 +709,7 @@ message UpdateHttpRouteRequest { // Request used by the DeleteHttpRoute method. message DeleteHttpRouteRequest { // Required. A name of the HttpRoute to delete. Must be in the format - // `projects/*/locations/global/httpRoutes/*`. + // `projects/*/locations/*/httpRoutes/*`. string name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { diff --git a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/proto/google/cloud/networkservices/v1/mesh.proto b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/proto/google/cloud/networkservices/v1/mesh.proto index 421c49d7c826..b7df585568cc 100644 --- a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/proto/google/cloud/networkservices/v1/mesh.proto +++ b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/proto/google/cloud/networkservices/v1/mesh.proto @@ -1,4 +1,4 @@ -// Copyright 2025 Google LLC +// 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. @@ -41,10 +41,12 @@ message Mesh { option (google.api.resource) = { type: "networkservices.googleapis.com/Mesh" pattern: "projects/{project}/locations/{location}/meshes/{mesh}" + plural: "meshes" + singular: "mesh" }; // Identifier. Name of the Mesh resource. It matches pattern - // `projects/*/locations/global/meshes/`. + // `projects/*/locations/*/meshes/`. string name = 1 [(google.api.field_behavior) = IDENTIFIER]; // Output only. Server-defined URL of this resource @@ -83,7 +85,7 @@ message Mesh { // Request used with the ListMeshes method. message ListMeshesRequest { // Required. The project and location from which the Meshes should be - // listed, specified in the format `projects/*/locations/global`. + // listed, specified in the format `projects/*/locations/*`. string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -124,7 +126,7 @@ message ListMeshesResponse { // Request used by the GetMesh method. message GetMeshRequest { // Required. A name of the Mesh to get. Must be in the format - // `projects/*/locations/global/meshes/*`. + // `projects/*/locations/*/meshes/*`. string name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -136,7 +138,7 @@ message GetMeshRequest { // Request used by the CreateMesh method. message CreateMeshRequest { // Required. The parent resource of the Mesh. Must be in the - // format `projects/*/locations/global`. + // format `projects/*/locations/*`. string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -168,7 +170,7 @@ message UpdateMeshRequest { // Request used by the DeleteMesh method. message DeleteMeshRequest { // Required. A name of the Mesh to delete. Must be in the format - // `projects/*/locations/global/meshes/*`. + // `projects/*/locations/*/meshes/*`. string name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { diff --git a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/proto/google/cloud/networkservices/v1/network_services.proto b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/proto/google/cloud/networkservices/v1/network_services.proto index 16e08a4d2068..6aba43a35776 100644 --- a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/proto/google/cloud/networkservices/v1/network_services.proto +++ b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/proto/google/cloud/networkservices/v1/network_services.proto @@ -1,4 +1,4 @@ -// Copyright 2025 Google LLC +// 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. @@ -18,6 +18,7 @@ package google.cloud.networkservices.v1; import "google/api/annotations.proto"; import "google/api/client.proto"; +import "google/cloud/networkservices/v1/agent_gateway.proto"; import "google/cloud/networkservices/v1/common.proto"; import "google/cloud/networkservices/v1/endpoint_policy.proto"; import "google/cloud/networkservices/v1/extensibility.proto"; @@ -704,4 +705,63 @@ service NetworkServices { }; option (google.api.method_signature) = "parent"; } + + // Lists AgentGateways in a given project and location. + rpc ListAgentGateways(ListAgentGatewaysRequest) + returns (ListAgentGatewaysResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*}/agentGateways" + }; + option (google.api.method_signature) = "parent"; + } + + // Gets details of a single AgentGateway. + rpc GetAgentGateway(GetAgentGatewayRequest) returns (AgentGateway) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/agentGateways/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Creates a new AgentGateway in a given project and location. + rpc CreateAgentGateway(CreateAgentGatewayRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}/agentGateways" + body: "agent_gateway" + }; + option (google.api.method_signature) = + "parent,agent_gateway,agent_gateway_id"; + option (google.longrunning.operation_info) = { + response_type: "AgentGateway" + metadata_type: "google.cloud.networkservices.v1.OperationMetadata" + }; + } + + // Updates the parameters of a single AgentGateway. + rpc UpdateAgentGateway(UpdateAgentGatewayRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1/{agent_gateway.name=projects/*/locations/*/agentGateways/*}" + body: "agent_gateway" + }; + option (google.api.method_signature) = "agent_gateway,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "AgentGateway" + metadata_type: "google.cloud.networkservices.v1.OperationMetadata" + }; + } + + // Deletes a single AgentGateway. + rpc DeleteAgentGateway(DeleteAgentGatewayRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/agentGateways/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "google.cloud.networkservices.v1.OperationMetadata" + }; + } } diff --git a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/proto/google/cloud/networkservices/v1/service_binding.proto b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/proto/google/cloud/networkservices/v1/service_binding.proto index 654e1227e280..0d80fd958c4e 100644 --- a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/proto/google/cloud/networkservices/v1/service_binding.proto +++ b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/proto/google/cloud/networkservices/v1/service_binding.proto @@ -1,4 +1,4 @@ -// Copyright 2025 Google LLC +// 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. @@ -17,6 +17,7 @@ syntax = "proto3"; package google.cloud.networkservices.v1; import "google/api/field_behavior.proto"; +import "google/api/field_info.proto"; import "google/api/resource.proto"; import "google/protobuf/field_mask.proto"; import "google/protobuf/timestamp.proto"; @@ -28,7 +29,6 @@ option java_outer_classname = "ServiceBindingProto"; option java_package = "com.google.cloud.networkservices.v1"; option php_namespace = "Google\\Cloud\\NetworkServices\\V1"; option ruby_package = "Google::Cloud::NetworkServices::V1"; - option (google.api.resource_definition) = { type: "servicedirectory.googleapis.com/Service" pattern: "projects/{project}/locations/{location}/namespaces/{namespace}/services/{service}" diff --git a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/proto/google/cloud/networkservices/v1/service_lb_policy.proto b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/proto/google/cloud/networkservices/v1/service_lb_policy.proto index 9dbfab5f1e14..2a064e13c5e9 100644 --- a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/proto/google/cloud/networkservices/v1/service_lb_policy.proto +++ b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/proto/google/cloud/networkservices/v1/service_lb_policy.proto @@ -1,4 +1,4 @@ -// Copyright 2025 Google LLC +// 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. diff --git a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/proto/google/cloud/networkservices/v1/tcp_route.proto b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/proto/google/cloud/networkservices/v1/tcp_route.proto index d18a91617dea..26db57ff4d35 100644 --- a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/proto/google/cloud/networkservices/v1/tcp_route.proto +++ b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/proto/google/cloud/networkservices/v1/tcp_route.proto @@ -1,4 +1,4 @@ -// Copyright 2025 Google LLC +// 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. @@ -119,7 +119,7 @@ message TcpRoute { } // Identifier. Name of the TcpRoute resource. It matches pattern - // `projects/*/locations/global/tcpRoutes/tcp_route_name>`. + // `projects/*/locations/*/tcpRoutes/tcp_route_name>`. string name = 1 [(google.api.field_behavior) = IDENTIFIER]; // Output only. Server-defined URL of this resource @@ -146,7 +146,7 @@ message TcpRoute { // one of the routing rules to route the requests served by the mesh. // // Each mesh reference should match the pattern: - // `projects/*/locations/global/meshes/` + // `projects/*/locations/*/meshes/` // // The attached Mesh should be of a type SIDECAR repeated string meshes = 8 [ @@ -160,7 +160,7 @@ message TcpRoute { // as one of the routing rules to route the requests served by the gateway. // // Each gateway reference should match the pattern: - // `projects/*/locations/global/gateways/` + // `projects/*/locations/*/gateways/` repeated string gateways = 9 [ (google.api.field_behavior) = OPTIONAL, (google.api.resource_reference) = { @@ -175,7 +175,7 @@ message TcpRoute { // Request used with the ListTcpRoutes method. message ListTcpRoutesRequest { // Required. The project and location from which the TcpRoutes should be - // listed, specified in the format `projects/*/locations/global`. + // listed, specified in the format `projects/*/locations/*`. string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -217,7 +217,7 @@ message ListTcpRoutesResponse { // Request used by the GetTcpRoute method. message GetTcpRouteRequest { // Required. A name of the TcpRoute to get. Must be in the format - // `projects/*/locations/global/tcpRoutes/*`. + // `projects/*/locations/*/tcpRoutes/*`. string name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -229,7 +229,7 @@ message GetTcpRouteRequest { // Request used by the TcpRoute method. message CreateTcpRouteRequest { // Required. The parent resource of the TcpRoute. Must be in the - // format `projects/*/locations/global`. + // format `projects/*/locations/*`. string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -261,7 +261,7 @@ message UpdateTcpRouteRequest { // Request used by the DeleteTcpRoute method. message DeleteTcpRouteRequest { // Required. A name of the TcpRoute to delete. Must be in the format - // `projects/*/locations/global/tcpRoutes/*`. + // `projects/*/locations/*/tcpRoutes/*`. string name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { diff --git a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/proto/google/cloud/networkservices/v1/tls_route.proto b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/proto/google/cloud/networkservices/v1/tls_route.proto index e025db82d2c9..70a607183161 100644 --- a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/proto/google/cloud/networkservices/v1/tls_route.proto +++ b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/proto/google/cloud/networkservices/v1/tls_route.proto @@ -1,4 +1,4 @@ -// Copyright 2025 Google LLC +// 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. @@ -29,6 +29,10 @@ option java_outer_classname = "TlsRouteProto"; option java_package = "com.google.cloud.networkservices.v1"; option php_namespace = "Google\\Cloud\\NetworkServices\\V1"; option ruby_package = "Google::Cloud::NetworkServices::V1"; +option (google.api.resource_definition) = { + type: "compute.googleapis.com/TargetTcpProxy" + pattern: "projects/{project}/locations/{location}/targetTcpProxies/{target_tcp_proxy}" +}; // TlsRoute defines how traffic should be routed based on SNI and other matching // L3 attributes. @@ -104,7 +108,7 @@ message TlsRoute { } // Identifier. Name of the TlsRoute resource. It matches pattern - // `projects/*/locations/global/tlsRoutes/tls_route_name>`. + // `projects/*/locations/*/tlsRoutes/tls_route_name>`. string name = 1 [(google.api.field_behavior) = IDENTIFIER]; // Output only. Server-defined URL of this resource @@ -131,7 +135,7 @@ message TlsRoute { // one of the routing rules to route the requests served by the mesh. // // Each mesh reference should match the pattern: - // `projects/*/locations/global/meshes/` + // `projects/*/locations/*/meshes/` // // The attached Mesh should be of a type SIDECAR repeated string meshes = 6 [ @@ -145,7 +149,7 @@ message TlsRoute { // as one of the routing rules to route the requests served by the gateway. // // Each gateway reference should match the pattern: - // `projects/*/locations/global/gateways/` + // `projects/*/locations/*/gateways/` repeated string gateways = 7 [ (google.api.field_behavior) = OPTIONAL, (google.api.resource_reference) = { @@ -153,6 +157,19 @@ message TlsRoute { } ]; + // Optional. TargetProxies defines a list of TargetTcpProxies this TlsRoute is + // attached to, as one of the routing rules to route the requests served by + // the TargetTcpProxy. + // + // Each TargetTcpProxy reference should match the pattern: + // `projects/*/locations/*/targetTcpProxies/` + repeated string target_proxies = 13 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.resource_reference) = { + type: "compute.googleapis.com/TargetTcpProxy" + } + ]; + // Optional. Set of label tags associated with the TlsRoute resource. map labels = 11 [(google.api.field_behavior) = OPTIONAL]; } @@ -160,7 +177,7 @@ message TlsRoute { // Request used with the ListTlsRoutes method. message ListTlsRoutesRequest { // Required. The project and location from which the TlsRoutes should be - // listed, specified in the format `projects/*/locations/global`. + // listed, specified in the format `projects/*/locations/*`. string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -202,7 +219,7 @@ message ListTlsRoutesResponse { // Request used by the GetTlsRoute method. message GetTlsRouteRequest { // Required. A name of the TlsRoute to get. Must be in the format - // `projects/*/locations/global/tlsRoutes/*`. + // `projects/*/locations/*/tlsRoutes/*`. string name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -214,7 +231,7 @@ message GetTlsRouteRequest { // Request used by the TlsRoute method. message CreateTlsRouteRequest { // Required. The parent resource of the TlsRoute. Must be in the - // format `projects/*/locations/global`. + // format `projects/*/locations/*`. string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -246,7 +263,7 @@ message UpdateTlsRouteRequest { // Request used by the DeleteTlsRoute method. message DeleteTlsRouteRequest { // Required. A name of the TlsRoute to delete. Must be in the format - // `projects/*/locations/global/tlsRoutes/*`. + // `projects/*/locations/*/tlsRoutes/*`. string name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { diff --git a/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/createagentgateway/AsyncCreateAgentGateway.java b/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/createagentgateway/AsyncCreateAgentGateway.java new file mode 100644 index 000000000000..1f8e9e9f3efc --- /dev/null +++ b/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/createagentgateway/AsyncCreateAgentGateway.java @@ -0,0 +1,53 @@ +/* + * 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.networkservices.v1.samples; + +// [START networkservices_v1_generated_NetworkServices_CreateAgentGateway_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.networkservices.v1.AgentGateway; +import com.google.cloud.networkservices.v1.CreateAgentGatewayRequest; +import com.google.cloud.networkservices.v1.LocationName; +import com.google.cloud.networkservices.v1.NetworkServicesClient; +import com.google.longrunning.Operation; + +public class AsyncCreateAgentGateway { + + public static void main(String[] args) throws Exception { + asyncCreateAgentGateway(); + } + + public static void asyncCreateAgentGateway() 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 (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { + CreateAgentGatewayRequest request = + CreateAgentGatewayRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setAgentGatewayId("agentGatewayId1729577210") + .setAgentGateway(AgentGateway.newBuilder().build()) + .build(); + ApiFuture future = + networkServicesClient.createAgentGatewayCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END networkservices_v1_generated_NetworkServices_CreateAgentGateway_async] diff --git a/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/createagentgateway/AsyncCreateAgentGatewayLRO.java b/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/createagentgateway/AsyncCreateAgentGatewayLRO.java new file mode 100644 index 000000000000..38a4ac89ff2b --- /dev/null +++ b/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/createagentgateway/AsyncCreateAgentGatewayLRO.java @@ -0,0 +1,53 @@ +/* + * 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.networkservices.v1.samples; + +// [START networkservices_v1_generated_NetworkServices_CreateAgentGateway_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.networkservices.v1.AgentGateway; +import com.google.cloud.networkservices.v1.CreateAgentGatewayRequest; +import com.google.cloud.networkservices.v1.LocationName; +import com.google.cloud.networkservices.v1.NetworkServicesClient; +import com.google.cloud.networkservices.v1.OperationMetadata; + +public class AsyncCreateAgentGatewayLRO { + + public static void main(String[] args) throws Exception { + asyncCreateAgentGatewayLRO(); + } + + public static void asyncCreateAgentGatewayLRO() 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 (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { + CreateAgentGatewayRequest request = + CreateAgentGatewayRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setAgentGatewayId("agentGatewayId1729577210") + .setAgentGateway(AgentGateway.newBuilder().build()) + .build(); + OperationFuture future = + networkServicesClient.createAgentGatewayOperationCallable().futureCall(request); + // Do something. + AgentGateway response = future.get(); + } + } +} +// [END networkservices_v1_generated_NetworkServices_CreateAgentGateway_LRO_async] diff --git a/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/createagentgateway/SyncCreateAgentGateway.java b/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/createagentgateway/SyncCreateAgentGateway.java new file mode 100644 index 000000000000..85f80a743fcf --- /dev/null +++ b/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/createagentgateway/SyncCreateAgentGateway.java @@ -0,0 +1,48 @@ +/* + * 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.networkservices.v1.samples; + +// [START networkservices_v1_generated_NetworkServices_CreateAgentGateway_sync] +import com.google.cloud.networkservices.v1.AgentGateway; +import com.google.cloud.networkservices.v1.CreateAgentGatewayRequest; +import com.google.cloud.networkservices.v1.LocationName; +import com.google.cloud.networkservices.v1.NetworkServicesClient; + +public class SyncCreateAgentGateway { + + public static void main(String[] args) throws Exception { + syncCreateAgentGateway(); + } + + public static void syncCreateAgentGateway() 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 (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { + CreateAgentGatewayRequest request = + CreateAgentGatewayRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setAgentGatewayId("agentGatewayId1729577210") + .setAgentGateway(AgentGateway.newBuilder().build()) + .build(); + AgentGateway response = networkServicesClient.createAgentGatewayAsync(request).get(); + } + } +} +// [END networkservices_v1_generated_NetworkServices_CreateAgentGateway_sync] diff --git a/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/createagentgateway/SyncCreateAgentGatewayLocationnameAgentgatewayString.java b/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/createagentgateway/SyncCreateAgentGatewayLocationnameAgentgatewayString.java new file mode 100644 index 000000000000..454a60caba23 --- /dev/null +++ b/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/createagentgateway/SyncCreateAgentGatewayLocationnameAgentgatewayString.java @@ -0,0 +1,45 @@ +/* + * 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.networkservices.v1.samples; + +// [START networkservices_v1_generated_NetworkServices_CreateAgentGateway_LocationnameAgentgatewayString_sync] +import com.google.cloud.networkservices.v1.AgentGateway; +import com.google.cloud.networkservices.v1.LocationName; +import com.google.cloud.networkservices.v1.NetworkServicesClient; + +public class SyncCreateAgentGatewayLocationnameAgentgatewayString { + + public static void main(String[] args) throws Exception { + syncCreateAgentGatewayLocationnameAgentgatewayString(); + } + + public static void syncCreateAgentGatewayLocationnameAgentgatewayString() 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 (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + AgentGateway agentGateway = AgentGateway.newBuilder().build(); + String agentGatewayId = "agentGatewayId1729577210"; + AgentGateway response = + networkServicesClient.createAgentGatewayAsync(parent, agentGateway, agentGatewayId).get(); + } + } +} +// [END networkservices_v1_generated_NetworkServices_CreateAgentGateway_LocationnameAgentgatewayString_sync] diff --git a/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/createagentgateway/SyncCreateAgentGatewayStringAgentgatewayString.java b/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/createagentgateway/SyncCreateAgentGatewayStringAgentgatewayString.java new file mode 100644 index 000000000000..483c8b618451 --- /dev/null +++ b/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/createagentgateway/SyncCreateAgentGatewayStringAgentgatewayString.java @@ -0,0 +1,45 @@ +/* + * 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.networkservices.v1.samples; + +// [START networkservices_v1_generated_NetworkServices_CreateAgentGateway_StringAgentgatewayString_sync] +import com.google.cloud.networkservices.v1.AgentGateway; +import com.google.cloud.networkservices.v1.LocationName; +import com.google.cloud.networkservices.v1.NetworkServicesClient; + +public class SyncCreateAgentGatewayStringAgentgatewayString { + + public static void main(String[] args) throws Exception { + syncCreateAgentGatewayStringAgentgatewayString(); + } + + public static void syncCreateAgentGatewayStringAgentgatewayString() 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 (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { + String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); + AgentGateway agentGateway = AgentGateway.newBuilder().build(); + String agentGatewayId = "agentGatewayId1729577210"; + AgentGateway response = + networkServicesClient.createAgentGatewayAsync(parent, agentGateway, agentGatewayId).get(); + } + } +} +// [END networkservices_v1_generated_NetworkServices_CreateAgentGateway_StringAgentgatewayString_sync] diff --git a/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/createhttproute/AsyncCreateHttpRoute.java b/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/createhttproute/AsyncCreateHttpRoute.java index ee16a1bff6d1..45d17d925616 100644 --- a/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/createhttproute/AsyncCreateHttpRoute.java +++ b/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/createhttproute/AsyncCreateHttpRoute.java @@ -42,6 +42,7 @@ public static void asyncCreateHttpRoute() throws Exception { .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setHttpRouteId("httpRouteId-2054835300") .setHttpRoute(HttpRoute.newBuilder().build()) + .setRequestId("requestId693933066") .build(); ApiFuture future = networkServicesClient.createHttpRouteCallable().futureCall(request); diff --git a/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/createhttproute/AsyncCreateHttpRouteLRO.java b/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/createhttproute/AsyncCreateHttpRouteLRO.java index ccf5703d0005..acecb5ee4b0a 100644 --- a/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/createhttproute/AsyncCreateHttpRouteLRO.java +++ b/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/createhttproute/AsyncCreateHttpRouteLRO.java @@ -42,6 +42,7 @@ public static void asyncCreateHttpRouteLRO() throws Exception { .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setHttpRouteId("httpRouteId-2054835300") .setHttpRoute(HttpRoute.newBuilder().build()) + .setRequestId("requestId693933066") .build(); OperationFuture future = networkServicesClient.createHttpRouteOperationCallable().futureCall(request); diff --git a/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/createhttproute/SyncCreateHttpRoute.java b/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/createhttproute/SyncCreateHttpRoute.java index 1428b490aaad..1288b5d12086 100644 --- a/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/createhttproute/SyncCreateHttpRoute.java +++ b/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/createhttproute/SyncCreateHttpRoute.java @@ -40,6 +40,7 @@ public static void syncCreateHttpRoute() throws Exception { .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setHttpRouteId("httpRouteId-2054835300") .setHttpRoute(HttpRoute.newBuilder().build()) + .setRequestId("requestId693933066") .build(); HttpRoute response = networkServicesClient.createHttpRouteAsync(request).get(); } diff --git a/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/deleteagentgateway/AsyncDeleteAgentGateway.java b/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/deleteagentgateway/AsyncDeleteAgentGateway.java new file mode 100644 index 000000000000..0ac20ad05d80 --- /dev/null +++ b/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/deleteagentgateway/AsyncDeleteAgentGateway.java @@ -0,0 +1,51 @@ +/* + * 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.networkservices.v1.samples; + +// [START networkservices_v1_generated_NetworkServices_DeleteAgentGateway_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.networkservices.v1.AgentGatewayName; +import com.google.cloud.networkservices.v1.DeleteAgentGatewayRequest; +import com.google.cloud.networkservices.v1.NetworkServicesClient; +import com.google.longrunning.Operation; + +public class AsyncDeleteAgentGateway { + + public static void main(String[] args) throws Exception { + asyncDeleteAgentGateway(); + } + + public static void asyncDeleteAgentGateway() 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 (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { + DeleteAgentGatewayRequest request = + DeleteAgentGatewayRequest.newBuilder() + .setName(AgentGatewayName.of("[PROJECT]", "[LOCATION]", "[AGENT_GATEWAY]").toString()) + .setEtag("etag3123477") + .build(); + ApiFuture future = + networkServicesClient.deleteAgentGatewayCallable().futureCall(request); + // Do something. + future.get(); + } + } +} +// [END networkservices_v1_generated_NetworkServices_DeleteAgentGateway_async] diff --git a/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/deleteagentgateway/AsyncDeleteAgentGatewayLRO.java b/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/deleteagentgateway/AsyncDeleteAgentGatewayLRO.java new file mode 100644 index 000000000000..7b67c2d4b108 --- /dev/null +++ b/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/deleteagentgateway/AsyncDeleteAgentGatewayLRO.java @@ -0,0 +1,52 @@ +/* + * 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.networkservices.v1.samples; + +// [START networkservices_v1_generated_NetworkServices_DeleteAgentGateway_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.networkservices.v1.AgentGatewayName; +import com.google.cloud.networkservices.v1.DeleteAgentGatewayRequest; +import com.google.cloud.networkservices.v1.NetworkServicesClient; +import com.google.cloud.networkservices.v1.OperationMetadata; +import com.google.protobuf.Empty; + +public class AsyncDeleteAgentGatewayLRO { + + public static void main(String[] args) throws Exception { + asyncDeleteAgentGatewayLRO(); + } + + public static void asyncDeleteAgentGatewayLRO() 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 (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { + DeleteAgentGatewayRequest request = + DeleteAgentGatewayRequest.newBuilder() + .setName(AgentGatewayName.of("[PROJECT]", "[LOCATION]", "[AGENT_GATEWAY]").toString()) + .setEtag("etag3123477") + .build(); + OperationFuture future = + networkServicesClient.deleteAgentGatewayOperationCallable().futureCall(request); + // Do something. + future.get(); + } + } +} +// [END networkservices_v1_generated_NetworkServices_DeleteAgentGateway_LRO_async] diff --git a/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/deleteagentgateway/SyncDeleteAgentGateway.java b/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/deleteagentgateway/SyncDeleteAgentGateway.java new file mode 100644 index 000000000000..7b8ec96649de --- /dev/null +++ b/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/deleteagentgateway/SyncDeleteAgentGateway.java @@ -0,0 +1,47 @@ +/* + * 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.networkservices.v1.samples; + +// [START networkservices_v1_generated_NetworkServices_DeleteAgentGateway_sync] +import com.google.cloud.networkservices.v1.AgentGatewayName; +import com.google.cloud.networkservices.v1.DeleteAgentGatewayRequest; +import com.google.cloud.networkservices.v1.NetworkServicesClient; +import com.google.protobuf.Empty; + +public class SyncDeleteAgentGateway { + + public static void main(String[] args) throws Exception { + syncDeleteAgentGateway(); + } + + public static void syncDeleteAgentGateway() 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 (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { + DeleteAgentGatewayRequest request = + DeleteAgentGatewayRequest.newBuilder() + .setName(AgentGatewayName.of("[PROJECT]", "[LOCATION]", "[AGENT_GATEWAY]").toString()) + .setEtag("etag3123477") + .build(); + networkServicesClient.deleteAgentGatewayAsync(request).get(); + } + } +} +// [END networkservices_v1_generated_NetworkServices_DeleteAgentGateway_sync] diff --git a/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/deleteagentgateway/SyncDeleteAgentGatewayAgentgatewayname.java b/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/deleteagentgateway/SyncDeleteAgentGatewayAgentgatewayname.java new file mode 100644 index 000000000000..e9f599c12599 --- /dev/null +++ b/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/deleteagentgateway/SyncDeleteAgentGatewayAgentgatewayname.java @@ -0,0 +1,42 @@ +/* + * 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.networkservices.v1.samples; + +// [START networkservices_v1_generated_NetworkServices_DeleteAgentGateway_Agentgatewayname_sync] +import com.google.cloud.networkservices.v1.AgentGatewayName; +import com.google.cloud.networkservices.v1.NetworkServicesClient; +import com.google.protobuf.Empty; + +public class SyncDeleteAgentGatewayAgentgatewayname { + + public static void main(String[] args) throws Exception { + syncDeleteAgentGatewayAgentgatewayname(); + } + + public static void syncDeleteAgentGatewayAgentgatewayname() 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 (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { + AgentGatewayName name = AgentGatewayName.of("[PROJECT]", "[LOCATION]", "[AGENT_GATEWAY]"); + networkServicesClient.deleteAgentGatewayAsync(name).get(); + } + } +} +// [END networkservices_v1_generated_NetworkServices_DeleteAgentGateway_Agentgatewayname_sync] diff --git a/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/deleteagentgateway/SyncDeleteAgentGatewayString.java b/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/deleteagentgateway/SyncDeleteAgentGatewayString.java new file mode 100644 index 000000000000..b10d6fc37fd0 --- /dev/null +++ b/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/deleteagentgateway/SyncDeleteAgentGatewayString.java @@ -0,0 +1,42 @@ +/* + * 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.networkservices.v1.samples; + +// [START networkservices_v1_generated_NetworkServices_DeleteAgentGateway_String_sync] +import com.google.cloud.networkservices.v1.AgentGatewayName; +import com.google.cloud.networkservices.v1.NetworkServicesClient; +import com.google.protobuf.Empty; + +public class SyncDeleteAgentGatewayString { + + public static void main(String[] args) throws Exception { + syncDeleteAgentGatewayString(); + } + + public static void syncDeleteAgentGatewayString() 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 (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { + String name = AgentGatewayName.of("[PROJECT]", "[LOCATION]", "[AGENT_GATEWAY]").toString(); + networkServicesClient.deleteAgentGatewayAsync(name).get(); + } + } +} +// [END networkservices_v1_generated_NetworkServices_DeleteAgentGateway_String_sync] diff --git a/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/getagentgateway/AsyncGetAgentGateway.java b/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/getagentgateway/AsyncGetAgentGateway.java new file mode 100644 index 000000000000..56a87cc72e06 --- /dev/null +++ b/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/getagentgateway/AsyncGetAgentGateway.java @@ -0,0 +1,50 @@ +/* + * 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.networkservices.v1.samples; + +// [START networkservices_v1_generated_NetworkServices_GetAgentGateway_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.networkservices.v1.AgentGateway; +import com.google.cloud.networkservices.v1.AgentGatewayName; +import com.google.cloud.networkservices.v1.GetAgentGatewayRequest; +import com.google.cloud.networkservices.v1.NetworkServicesClient; + +public class AsyncGetAgentGateway { + + public static void main(String[] args) throws Exception { + asyncGetAgentGateway(); + } + + public static void asyncGetAgentGateway() 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 (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { + GetAgentGatewayRequest request = + GetAgentGatewayRequest.newBuilder() + .setName(AgentGatewayName.of("[PROJECT]", "[LOCATION]", "[AGENT_GATEWAY]").toString()) + .build(); + ApiFuture future = + networkServicesClient.getAgentGatewayCallable().futureCall(request); + // Do something. + AgentGateway response = future.get(); + } + } +} +// [END networkservices_v1_generated_NetworkServices_GetAgentGateway_async] diff --git a/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/getagentgateway/SyncGetAgentGateway.java b/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/getagentgateway/SyncGetAgentGateway.java new file mode 100644 index 000000000000..358e9ab0dd48 --- /dev/null +++ b/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/getagentgateway/SyncGetAgentGateway.java @@ -0,0 +1,46 @@ +/* + * 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.networkservices.v1.samples; + +// [START networkservices_v1_generated_NetworkServices_GetAgentGateway_sync] +import com.google.cloud.networkservices.v1.AgentGateway; +import com.google.cloud.networkservices.v1.AgentGatewayName; +import com.google.cloud.networkservices.v1.GetAgentGatewayRequest; +import com.google.cloud.networkservices.v1.NetworkServicesClient; + +public class SyncGetAgentGateway { + + public static void main(String[] args) throws Exception { + syncGetAgentGateway(); + } + + public static void syncGetAgentGateway() 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 (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { + GetAgentGatewayRequest request = + GetAgentGatewayRequest.newBuilder() + .setName(AgentGatewayName.of("[PROJECT]", "[LOCATION]", "[AGENT_GATEWAY]").toString()) + .build(); + AgentGateway response = networkServicesClient.getAgentGateway(request); + } + } +} +// [END networkservices_v1_generated_NetworkServices_GetAgentGateway_sync] diff --git a/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/getagentgateway/SyncGetAgentGatewayAgentgatewayname.java b/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/getagentgateway/SyncGetAgentGatewayAgentgatewayname.java new file mode 100644 index 000000000000..29f087160410 --- /dev/null +++ b/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/getagentgateway/SyncGetAgentGatewayAgentgatewayname.java @@ -0,0 +1,42 @@ +/* + * 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.networkservices.v1.samples; + +// [START networkservices_v1_generated_NetworkServices_GetAgentGateway_Agentgatewayname_sync] +import com.google.cloud.networkservices.v1.AgentGateway; +import com.google.cloud.networkservices.v1.AgentGatewayName; +import com.google.cloud.networkservices.v1.NetworkServicesClient; + +public class SyncGetAgentGatewayAgentgatewayname { + + public static void main(String[] args) throws Exception { + syncGetAgentGatewayAgentgatewayname(); + } + + public static void syncGetAgentGatewayAgentgatewayname() 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 (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { + AgentGatewayName name = AgentGatewayName.of("[PROJECT]", "[LOCATION]", "[AGENT_GATEWAY]"); + AgentGateway response = networkServicesClient.getAgentGateway(name); + } + } +} +// [END networkservices_v1_generated_NetworkServices_GetAgentGateway_Agentgatewayname_sync] diff --git a/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/getagentgateway/SyncGetAgentGatewayString.java b/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/getagentgateway/SyncGetAgentGatewayString.java new file mode 100644 index 000000000000..355b06ac84b6 --- /dev/null +++ b/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/getagentgateway/SyncGetAgentGatewayString.java @@ -0,0 +1,42 @@ +/* + * 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.networkservices.v1.samples; + +// [START networkservices_v1_generated_NetworkServices_GetAgentGateway_String_sync] +import com.google.cloud.networkservices.v1.AgentGateway; +import com.google.cloud.networkservices.v1.AgentGatewayName; +import com.google.cloud.networkservices.v1.NetworkServicesClient; + +public class SyncGetAgentGatewayString { + + public static void main(String[] args) throws Exception { + syncGetAgentGatewayString(); + } + + public static void syncGetAgentGatewayString() 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 (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { + String name = AgentGatewayName.of("[PROJECT]", "[LOCATION]", "[AGENT_GATEWAY]").toString(); + AgentGateway response = networkServicesClient.getAgentGateway(name); + } + } +} +// [END networkservices_v1_generated_NetworkServices_GetAgentGateway_String_sync] diff --git a/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/listagentgateways/AsyncListAgentGateways.java b/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/listagentgateways/AsyncListAgentGateways.java new file mode 100644 index 000000000000..512bfbbff4fe --- /dev/null +++ b/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/listagentgateways/AsyncListAgentGateways.java @@ -0,0 +1,55 @@ +/* + * 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.networkservices.v1.samples; + +// [START networkservices_v1_generated_NetworkServices_ListAgentGateways_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.networkservices.v1.AgentGateway; +import com.google.cloud.networkservices.v1.ListAgentGatewaysRequest; +import com.google.cloud.networkservices.v1.LocationName; +import com.google.cloud.networkservices.v1.NetworkServicesClient; + +public class AsyncListAgentGateways { + + public static void main(String[] args) throws Exception { + asyncListAgentGateways(); + } + + public static void asyncListAgentGateways() 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 (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { + ListAgentGatewaysRequest request = + ListAgentGatewaysRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setReturnPartialSuccess(true) + .build(); + ApiFuture future = + networkServicesClient.listAgentGatewaysPagedCallable().futureCall(request); + // Do something. + for (AgentGateway element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END networkservices_v1_generated_NetworkServices_ListAgentGateways_async] diff --git a/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/listagentgateways/AsyncListAgentGatewaysPaged.java b/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/listagentgateways/AsyncListAgentGatewaysPaged.java new file mode 100644 index 000000000000..dd1f16bb39d5 --- /dev/null +++ b/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/listagentgateways/AsyncListAgentGatewaysPaged.java @@ -0,0 +1,63 @@ +/* + * 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.networkservices.v1.samples; + +// [START networkservices_v1_generated_NetworkServices_ListAgentGateways_Paged_async] +import com.google.cloud.networkservices.v1.AgentGateway; +import com.google.cloud.networkservices.v1.ListAgentGatewaysRequest; +import com.google.cloud.networkservices.v1.ListAgentGatewaysResponse; +import com.google.cloud.networkservices.v1.LocationName; +import com.google.cloud.networkservices.v1.NetworkServicesClient; +import com.google.common.base.Strings; + +public class AsyncListAgentGatewaysPaged { + + public static void main(String[] args) throws Exception { + asyncListAgentGatewaysPaged(); + } + + public static void asyncListAgentGatewaysPaged() 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 (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { + ListAgentGatewaysRequest request = + ListAgentGatewaysRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setReturnPartialSuccess(true) + .build(); + while (true) { + ListAgentGatewaysResponse response = + networkServicesClient.listAgentGatewaysCallable().call(request); + for (AgentGateway element : response.getAgentGatewaysList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END networkservices_v1_generated_NetworkServices_ListAgentGateways_Paged_async] diff --git a/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/listagentgateways/SyncListAgentGateways.java b/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/listagentgateways/SyncListAgentGateways.java new file mode 100644 index 000000000000..62291d6069fc --- /dev/null +++ b/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/listagentgateways/SyncListAgentGateways.java @@ -0,0 +1,51 @@ +/* + * 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.networkservices.v1.samples; + +// [START networkservices_v1_generated_NetworkServices_ListAgentGateways_sync] +import com.google.cloud.networkservices.v1.AgentGateway; +import com.google.cloud.networkservices.v1.ListAgentGatewaysRequest; +import com.google.cloud.networkservices.v1.LocationName; +import com.google.cloud.networkservices.v1.NetworkServicesClient; + +public class SyncListAgentGateways { + + public static void main(String[] args) throws Exception { + syncListAgentGateways(); + } + + public static void syncListAgentGateways() 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 (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { + ListAgentGatewaysRequest request = + ListAgentGatewaysRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setReturnPartialSuccess(true) + .build(); + for (AgentGateway element : networkServicesClient.listAgentGateways(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END networkservices_v1_generated_NetworkServices_ListAgentGateways_sync] diff --git a/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/listagentgateways/SyncListAgentGatewaysLocationname.java b/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/listagentgateways/SyncListAgentGatewaysLocationname.java new file mode 100644 index 000000000000..69da93290799 --- /dev/null +++ b/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/listagentgateways/SyncListAgentGatewaysLocationname.java @@ -0,0 +1,44 @@ +/* + * 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.networkservices.v1.samples; + +// [START networkservices_v1_generated_NetworkServices_ListAgentGateways_Locationname_sync] +import com.google.cloud.networkservices.v1.AgentGateway; +import com.google.cloud.networkservices.v1.LocationName; +import com.google.cloud.networkservices.v1.NetworkServicesClient; + +public class SyncListAgentGatewaysLocationname { + + public static void main(String[] args) throws Exception { + syncListAgentGatewaysLocationname(); + } + + public static void syncListAgentGatewaysLocationname() 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 (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + for (AgentGateway element : networkServicesClient.listAgentGateways(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END networkservices_v1_generated_NetworkServices_ListAgentGateways_Locationname_sync] diff --git a/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/listagentgateways/SyncListAgentGatewaysString.java b/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/listagentgateways/SyncListAgentGatewaysString.java new file mode 100644 index 000000000000..0df13264f467 --- /dev/null +++ b/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/listagentgateways/SyncListAgentGatewaysString.java @@ -0,0 +1,44 @@ +/* + * 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.networkservices.v1.samples; + +// [START networkservices_v1_generated_NetworkServices_ListAgentGateways_String_sync] +import com.google.cloud.networkservices.v1.AgentGateway; +import com.google.cloud.networkservices.v1.LocationName; +import com.google.cloud.networkservices.v1.NetworkServicesClient; + +public class SyncListAgentGatewaysString { + + public static void main(String[] args) throws Exception { + syncListAgentGatewaysString(); + } + + public static void syncListAgentGatewaysString() 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 (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { + String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); + for (AgentGateway element : networkServicesClient.listAgentGateways(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END networkservices_v1_generated_NetworkServices_ListAgentGateways_String_sync] diff --git a/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/listhttproutes/AsyncListHttpRoutes.java b/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/listhttproutes/AsyncListHttpRoutes.java index b489be8914c3..a227984b759d 100644 --- a/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/listhttproutes/AsyncListHttpRoutes.java +++ b/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/listhttproutes/AsyncListHttpRoutes.java @@ -42,6 +42,7 @@ public static void asyncListHttpRoutes() throws Exception { .setPageSize(883849137) .setPageToken("pageToken873572522") .setReturnPartialSuccess(true) + .setFilter("filter-1274492040") .build(); ApiFuture future = networkServicesClient.listHttpRoutesPagedCallable().futureCall(request); diff --git a/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/listhttproutes/AsyncListHttpRoutesPaged.java b/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/listhttproutes/AsyncListHttpRoutesPaged.java index 4b86dcd81b5f..09976e4c63c6 100644 --- a/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/listhttproutes/AsyncListHttpRoutesPaged.java +++ b/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/listhttproutes/AsyncListHttpRoutesPaged.java @@ -43,6 +43,7 @@ public static void asyncListHttpRoutesPaged() throws Exception { .setPageSize(883849137) .setPageToken("pageToken873572522") .setReturnPartialSuccess(true) + .setFilter("filter-1274492040") .build(); while (true) { ListHttpRoutesResponse response = diff --git a/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/listhttproutes/SyncListHttpRoutes.java b/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/listhttproutes/SyncListHttpRoutes.java index 11ab24a5debb..62f8aeeb3a84 100644 --- a/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/listhttproutes/SyncListHttpRoutes.java +++ b/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/listhttproutes/SyncListHttpRoutes.java @@ -41,6 +41,7 @@ public static void syncListHttpRoutes() throws Exception { .setPageSize(883849137) .setPageToken("pageToken873572522") .setReturnPartialSuccess(true) + .setFilter("filter-1274492040") .build(); for (HttpRoute element : networkServicesClient.listHttpRoutes(request).iterateAll()) { // doThingsWith(element); diff --git a/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/updateagentgateway/AsyncUpdateAgentGateway.java b/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/updateagentgateway/AsyncUpdateAgentGateway.java new file mode 100644 index 000000000000..af79bf8acf53 --- /dev/null +++ b/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/updateagentgateway/AsyncUpdateAgentGateway.java @@ -0,0 +1,52 @@ +/* + * 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.networkservices.v1.samples; + +// [START networkservices_v1_generated_NetworkServices_UpdateAgentGateway_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.networkservices.v1.AgentGateway; +import com.google.cloud.networkservices.v1.NetworkServicesClient; +import com.google.cloud.networkservices.v1.UpdateAgentGatewayRequest; +import com.google.longrunning.Operation; +import com.google.protobuf.FieldMask; + +public class AsyncUpdateAgentGateway { + + public static void main(String[] args) throws Exception { + asyncUpdateAgentGateway(); + } + + public static void asyncUpdateAgentGateway() 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 (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { + UpdateAgentGatewayRequest request = + UpdateAgentGatewayRequest.newBuilder() + .setUpdateMask(FieldMask.newBuilder().build()) + .setAgentGateway(AgentGateway.newBuilder().build()) + .build(); + ApiFuture future = + networkServicesClient.updateAgentGatewayCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END networkservices_v1_generated_NetworkServices_UpdateAgentGateway_async] diff --git a/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/updateagentgateway/AsyncUpdateAgentGatewayLRO.java b/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/updateagentgateway/AsyncUpdateAgentGatewayLRO.java new file mode 100644 index 000000000000..157268641c80 --- /dev/null +++ b/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/updateagentgateway/AsyncUpdateAgentGatewayLRO.java @@ -0,0 +1,52 @@ +/* + * 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.networkservices.v1.samples; + +// [START networkservices_v1_generated_NetworkServices_UpdateAgentGateway_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.networkservices.v1.AgentGateway; +import com.google.cloud.networkservices.v1.NetworkServicesClient; +import com.google.cloud.networkservices.v1.OperationMetadata; +import com.google.cloud.networkservices.v1.UpdateAgentGatewayRequest; +import com.google.protobuf.FieldMask; + +public class AsyncUpdateAgentGatewayLRO { + + public static void main(String[] args) throws Exception { + asyncUpdateAgentGatewayLRO(); + } + + public static void asyncUpdateAgentGatewayLRO() 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 (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { + UpdateAgentGatewayRequest request = + UpdateAgentGatewayRequest.newBuilder() + .setUpdateMask(FieldMask.newBuilder().build()) + .setAgentGateway(AgentGateway.newBuilder().build()) + .build(); + OperationFuture future = + networkServicesClient.updateAgentGatewayOperationCallable().futureCall(request); + // Do something. + AgentGateway response = future.get(); + } + } +} +// [END networkservices_v1_generated_NetworkServices_UpdateAgentGateway_LRO_async] diff --git a/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/updateagentgateway/SyncUpdateAgentGateway.java b/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/updateagentgateway/SyncUpdateAgentGateway.java new file mode 100644 index 000000000000..1e69be1fe139 --- /dev/null +++ b/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/updateagentgateway/SyncUpdateAgentGateway.java @@ -0,0 +1,47 @@ +/* + * 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.networkservices.v1.samples; + +// [START networkservices_v1_generated_NetworkServices_UpdateAgentGateway_sync] +import com.google.cloud.networkservices.v1.AgentGateway; +import com.google.cloud.networkservices.v1.NetworkServicesClient; +import com.google.cloud.networkservices.v1.UpdateAgentGatewayRequest; +import com.google.protobuf.FieldMask; + +public class SyncUpdateAgentGateway { + + public static void main(String[] args) throws Exception { + syncUpdateAgentGateway(); + } + + public static void syncUpdateAgentGateway() 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 (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { + UpdateAgentGatewayRequest request = + UpdateAgentGatewayRequest.newBuilder() + .setUpdateMask(FieldMask.newBuilder().build()) + .setAgentGateway(AgentGateway.newBuilder().build()) + .build(); + AgentGateway response = networkServicesClient.updateAgentGatewayAsync(request).get(); + } + } +} +// [END networkservices_v1_generated_NetworkServices_UpdateAgentGateway_sync] diff --git a/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/updateagentgateway/SyncUpdateAgentGatewayAgentgatewayFieldmask.java b/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/updateagentgateway/SyncUpdateAgentGatewayAgentgatewayFieldmask.java new file mode 100644 index 000000000000..92785475c37b --- /dev/null +++ b/java-networkservices/samples/snippets/generated/com/google/cloud/networkservices/v1/networkservices/updateagentgateway/SyncUpdateAgentGatewayAgentgatewayFieldmask.java @@ -0,0 +1,44 @@ +/* + * 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.networkservices.v1.samples; + +// [START networkservices_v1_generated_NetworkServices_UpdateAgentGateway_AgentgatewayFieldmask_sync] +import com.google.cloud.networkservices.v1.AgentGateway; +import com.google.cloud.networkservices.v1.NetworkServicesClient; +import com.google.protobuf.FieldMask; + +public class SyncUpdateAgentGatewayAgentgatewayFieldmask { + + public static void main(String[] args) throws Exception { + syncUpdateAgentGatewayAgentgatewayFieldmask(); + } + + public static void syncUpdateAgentGatewayAgentgatewayFieldmask() 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 (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) { + AgentGateway agentGateway = AgentGateway.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + AgentGateway response = + networkServicesClient.updateAgentGatewayAsync(agentGateway, updateMask).get(); + } + } +} +// [END networkservices_v1_generated_NetworkServices_UpdateAgentGateway_AgentgatewayFieldmask_sync] diff --git a/java-oracledatabase/google-cloud-oracledatabase/src/main/java/com/google/cloud/oracledatabase/v1/OracleDatabaseClient.java b/java-oracledatabase/google-cloud-oracledatabase/src/main/java/com/google/cloud/oracledatabase/v1/OracleDatabaseClient.java index 9a6459cb2c43..d3422c24b82b 100644 --- a/java-oracledatabase/google-cloud-oracledatabase/src/main/java/com/google/cloud/oracledatabase/v1/OracleDatabaseClient.java +++ b/java-oracledatabase/google-cloud-oracledatabase/src/main/java/com/google/cloud/oracledatabase/v1/OracleDatabaseClient.java @@ -1387,25 +1387,6 @@ * * * - *

            GetGoldengateDeploymentVersion - *

            Gets details of a single GoldengateDeploymentVersion. - * - *

            Request object method variants only take one parameter, a request object, which must be constructed before the call.

            - *
              - *
            • getGoldengateDeploymentVersion(GetGoldengateDeploymentVersionRequest request) - *

            - *

            "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

            - *
              - *
            • getGoldengateDeploymentVersion(GoldengateDeploymentVersionName name) - *

            • getGoldengateDeploymentVersion(String name) - *

            - *

            Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

            - *
              - *
            • getGoldengateDeploymentVersionCallable() - *

            - * - * - * *

            ListGoldengateDeploymentVersions *

            Lists GoldengateDeploymentVersions in a given project and location. * @@ -1426,25 +1407,6 @@ * * * - *

            GetGoldengateDeploymentType - *

            Gets details of a single GoldenGateDeploymentType. - * - *

            Request object method variants only take one parameter, a request object, which must be constructed before the call.

            - *
              - *
            • getGoldengateDeploymentType(GetGoldengateDeploymentTypeRequest request) - *

            - *

            "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

            - *
              - *
            • getGoldengateDeploymentType(GoldengateDeploymentTypeName name) - *

            • getGoldengateDeploymentType(String name) - *

            - *

            Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

            - *
              - *
            • getGoldengateDeploymentTypeCallable() - *

            - * - * - * *

            ListGoldengateDeploymentTypes *

            Lists GoldenGateDeploymentTypes in a given project and location. * @@ -1465,25 +1427,6 @@ * * * - *

            GetGoldengateDeploymentEnvironment - *

            Gets details of a single GoldengateDeploymentEnvironment. - * - *

            Request object method variants only take one parameter, a request object, which must be constructed before the call.

            - *
              - *
            • getGoldengateDeploymentEnvironment(GetGoldengateDeploymentEnvironmentRequest request) - *

            - *

            "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

            - *
              - *
            • getGoldengateDeploymentEnvironment(GoldengateDeploymentEnvironmentName name) - *

            • getGoldengateDeploymentEnvironment(String name) - *

            - *

            Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

            - *
              - *
            • getGoldengateDeploymentEnvironmentCallable() - *

            - * - * - * *

            ListGoldengateDeploymentEnvironments *

            Lists GoldengateDeploymentEnvironments in a given project and location. * @@ -1504,25 +1447,6 @@ * * * - *

            GetGoldengateConnectionType - *

            Gets details of a single GoldengateConnectionType. - * - *

            Request object method variants only take one parameter, a request object, which must be constructed before the call.

            - *
              - *
            • getGoldengateConnectionType(GetGoldengateConnectionTypeRequest request) - *

            - *

            "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

            - *
              - *
            • getGoldengateConnectionType(GoldengateConnectionTypeName name) - *

            • getGoldengateConnectionType(String name) - *

            - *

            Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

            - *
              - *
            • getGoldengateConnectionTypeCallable() - *

            - * - * - * *

            ListGoldengateConnectionTypes *

            Lists GoldengateConnectionTypes in a given project and location. * @@ -12608,137 +12532,6 @@ public final OperationFuture deleteGoldengateConnectio return stub.deleteGoldengateConnectionCallable(); } - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets details of a single GoldengateDeploymentVersion. - * - *

            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 (OracleDatabaseClient oracleDatabaseClient = OracleDatabaseClient.create()) {
            -   *   GoldengateDeploymentVersionName name =
            -   *       GoldengateDeploymentVersionName.of(
            -   *           "[PROJECT]", "[LOCATION]", "[GOLDENGATE_DEPLOYMENT_VERSION]");
            -   *   GoldengateDeploymentVersion response =
            -   *       oracleDatabaseClient.getGoldengateDeploymentVersion(name);
            -   * }
            -   * }
            - * - * @param name Required. The name of the GoldengateDeploymentVersion to retrieve. Format: - * projects/{project}/locations/{location}/goldengateDeploymentVersions/{goldengate_deployment_version} - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final GoldengateDeploymentVersion getGoldengateDeploymentVersion( - GoldengateDeploymentVersionName name) { - GetGoldengateDeploymentVersionRequest request = - GetGoldengateDeploymentVersionRequest.newBuilder() - .setName(name == null ? null : name.toString()) - .build(); - return getGoldengateDeploymentVersion(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets details of a single GoldengateDeploymentVersion. - * - *

            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 (OracleDatabaseClient oracleDatabaseClient = OracleDatabaseClient.create()) {
            -   *   String name =
            -   *       GoldengateDeploymentVersionName.of(
            -   *               "[PROJECT]", "[LOCATION]", "[GOLDENGATE_DEPLOYMENT_VERSION]")
            -   *           .toString();
            -   *   GoldengateDeploymentVersion response =
            -   *       oracleDatabaseClient.getGoldengateDeploymentVersion(name);
            -   * }
            -   * }
            - * - * @param name Required. The name of the GoldengateDeploymentVersion to retrieve. Format: - * projects/{project}/locations/{location}/goldengateDeploymentVersions/{goldengate_deployment_version} - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final GoldengateDeploymentVersion getGoldengateDeploymentVersion(String name) { - GetGoldengateDeploymentVersionRequest request = - GetGoldengateDeploymentVersionRequest.newBuilder().setName(name).build(); - return getGoldengateDeploymentVersion(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets details of a single GoldengateDeploymentVersion. - * - *

            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 (OracleDatabaseClient oracleDatabaseClient = OracleDatabaseClient.create()) {
            -   *   GetGoldengateDeploymentVersionRequest request =
            -   *       GetGoldengateDeploymentVersionRequest.newBuilder()
            -   *           .setName(
            -   *               GoldengateDeploymentVersionName.of(
            -   *                       "[PROJECT]", "[LOCATION]", "[GOLDENGATE_DEPLOYMENT_VERSION]")
            -   *                   .toString())
            -   *           .build();
            -   *   GoldengateDeploymentVersion response =
            -   *       oracleDatabaseClient.getGoldengateDeploymentVersion(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 GoldengateDeploymentVersion getGoldengateDeploymentVersion( - GetGoldengateDeploymentVersionRequest request) { - return getGoldengateDeploymentVersionCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets details of a single GoldengateDeploymentVersion. - * - *

            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 (OracleDatabaseClient oracleDatabaseClient = OracleDatabaseClient.create()) {
            -   *   GetGoldengateDeploymentVersionRequest request =
            -   *       GetGoldengateDeploymentVersionRequest.newBuilder()
            -   *           .setName(
            -   *               GoldengateDeploymentVersionName.of(
            -   *                       "[PROJECT]", "[LOCATION]", "[GOLDENGATE_DEPLOYMENT_VERSION]")
            -   *                   .toString())
            -   *           .build();
            -   *   ApiFuture future =
            -   *       oracleDatabaseClient.getGoldengateDeploymentVersionCallable().futureCall(request);
            -   *   // Do something.
            -   *   GoldengateDeploymentVersion response = future.get();
            -   * }
            -   * }
            - */ - public final UnaryCallable - getGoldengateDeploymentVersionCallable() { - return stub.getGoldengateDeploymentVersionCallable(); - } - // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists GoldengateDeploymentVersions in a given project and location. @@ -12917,133 +12710,6 @@ public final ListGoldengateDeploymentVersionsPagedResponse listGoldengateDeploym return stub.listGoldengateDeploymentVersionsCallable(); } - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets details of a single GoldenGateDeploymentType. - * - *

            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 (OracleDatabaseClient oracleDatabaseClient = OracleDatabaseClient.create()) {
            -   *   GoldengateDeploymentTypeName name =
            -   *       GoldengateDeploymentTypeName.of(
            -   *           "[PROJECT]", "[LOCATION]", "[GOLDENGATE_DEPLOYMENT_TYPE]");
            -   *   GoldengateDeploymentType response = oracleDatabaseClient.getGoldengateDeploymentType(name);
            -   * }
            -   * }
            - * - * @param name Required. The name of the GoldengateDeploymentType to retrieve. Format: - * projects/{project}/locations/{location}/goldengateDeploymentTypes/{goldengate_deployment_type} - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final GoldengateDeploymentType getGoldengateDeploymentType( - GoldengateDeploymentTypeName name) { - GetGoldengateDeploymentTypeRequest request = - GetGoldengateDeploymentTypeRequest.newBuilder() - .setName(name == null ? null : name.toString()) - .build(); - return getGoldengateDeploymentType(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets details of a single GoldenGateDeploymentType. - * - *

            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 (OracleDatabaseClient oracleDatabaseClient = OracleDatabaseClient.create()) {
            -   *   String name =
            -   *       GoldengateDeploymentTypeName.of("[PROJECT]", "[LOCATION]", "[GOLDENGATE_DEPLOYMENT_TYPE]")
            -   *           .toString();
            -   *   GoldengateDeploymentType response = oracleDatabaseClient.getGoldengateDeploymentType(name);
            -   * }
            -   * }
            - * - * @param name Required. The name of the GoldengateDeploymentType to retrieve. Format: - * projects/{project}/locations/{location}/goldengateDeploymentTypes/{goldengate_deployment_type} - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final GoldengateDeploymentType getGoldengateDeploymentType(String name) { - GetGoldengateDeploymentTypeRequest request = - GetGoldengateDeploymentTypeRequest.newBuilder().setName(name).build(); - return getGoldengateDeploymentType(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets details of a single GoldenGateDeploymentType. - * - *

            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 (OracleDatabaseClient oracleDatabaseClient = OracleDatabaseClient.create()) {
            -   *   GetGoldengateDeploymentTypeRequest request =
            -   *       GetGoldengateDeploymentTypeRequest.newBuilder()
            -   *           .setName(
            -   *               GoldengateDeploymentTypeName.of(
            -   *                       "[PROJECT]", "[LOCATION]", "[GOLDENGATE_DEPLOYMENT_TYPE]")
            -   *                   .toString())
            -   *           .build();
            -   *   GoldengateDeploymentType response = oracleDatabaseClient.getGoldengateDeploymentType(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 GoldengateDeploymentType getGoldengateDeploymentType( - GetGoldengateDeploymentTypeRequest request) { - return getGoldengateDeploymentTypeCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets details of a single GoldenGateDeploymentType. - * - *

            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 (OracleDatabaseClient oracleDatabaseClient = OracleDatabaseClient.create()) {
            -   *   GetGoldengateDeploymentTypeRequest request =
            -   *       GetGoldengateDeploymentTypeRequest.newBuilder()
            -   *           .setName(
            -   *               GoldengateDeploymentTypeName.of(
            -   *                       "[PROJECT]", "[LOCATION]", "[GOLDENGATE_DEPLOYMENT_TYPE]")
            -   *                   .toString())
            -   *           .build();
            -   *   ApiFuture future =
            -   *       oracleDatabaseClient.getGoldengateDeploymentTypeCallable().futureCall(request);
            -   *   // Do something.
            -   *   GoldengateDeploymentType response = future.get();
            -   * }
            -   * }
            - */ - public final UnaryCallable - getGoldengateDeploymentTypeCallable() { - return stub.getGoldengateDeploymentTypeCallable(); - } - // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists GoldenGateDeploymentTypes in a given project and location. @@ -13223,138 +12889,6 @@ public final ListGoldengateDeploymentTypesPagedResponse listGoldengateDeployment return stub.listGoldengateDeploymentTypesCallable(); } - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets details of a single GoldengateDeploymentEnvironment. - * - *

            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 (OracleDatabaseClient oracleDatabaseClient = OracleDatabaseClient.create()) {
            -   *   GoldengateDeploymentEnvironmentName name =
            -   *       GoldengateDeploymentEnvironmentName.of(
            -   *           "[PROJECT]", "[LOCATION]", "[GOLDENGATE_DEPLOYMENT_ENVIRONMENT]");
            -   *   GoldengateDeploymentEnvironment response =
            -   *       oracleDatabaseClient.getGoldengateDeploymentEnvironment(name);
            -   * }
            -   * }
            - * - * @param name Required. Name of the resource with the format: - * projects/{project}/locations/{location}/goldengateDeploymentEnvironments/{goldengate_deployment_environment} - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final GoldengateDeploymentEnvironment getGoldengateDeploymentEnvironment( - GoldengateDeploymentEnvironmentName name) { - GetGoldengateDeploymentEnvironmentRequest request = - GetGoldengateDeploymentEnvironmentRequest.newBuilder() - .setName(name == null ? null : name.toString()) - .build(); - return getGoldengateDeploymentEnvironment(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets details of a single GoldengateDeploymentEnvironment. - * - *

            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 (OracleDatabaseClient oracleDatabaseClient = OracleDatabaseClient.create()) {
            -   *   String name =
            -   *       GoldengateDeploymentEnvironmentName.of(
            -   *               "[PROJECT]", "[LOCATION]", "[GOLDENGATE_DEPLOYMENT_ENVIRONMENT]")
            -   *           .toString();
            -   *   GoldengateDeploymentEnvironment response =
            -   *       oracleDatabaseClient.getGoldengateDeploymentEnvironment(name);
            -   * }
            -   * }
            - * - * @param name Required. Name of the resource with the format: - * projects/{project}/locations/{location}/goldengateDeploymentEnvironments/{goldengate_deployment_environment} - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final GoldengateDeploymentEnvironment getGoldengateDeploymentEnvironment(String name) { - GetGoldengateDeploymentEnvironmentRequest request = - GetGoldengateDeploymentEnvironmentRequest.newBuilder().setName(name).build(); - return getGoldengateDeploymentEnvironment(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets details of a single GoldengateDeploymentEnvironment. - * - *

            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 (OracleDatabaseClient oracleDatabaseClient = OracleDatabaseClient.create()) {
            -   *   GetGoldengateDeploymentEnvironmentRequest request =
            -   *       GetGoldengateDeploymentEnvironmentRequest.newBuilder()
            -   *           .setName(
            -   *               GoldengateDeploymentEnvironmentName.of(
            -   *                       "[PROJECT]", "[LOCATION]", "[GOLDENGATE_DEPLOYMENT_ENVIRONMENT]")
            -   *                   .toString())
            -   *           .build();
            -   *   GoldengateDeploymentEnvironment response =
            -   *       oracleDatabaseClient.getGoldengateDeploymentEnvironment(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 GoldengateDeploymentEnvironment getGoldengateDeploymentEnvironment( - GetGoldengateDeploymentEnvironmentRequest request) { - return getGoldengateDeploymentEnvironmentCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets details of a single GoldengateDeploymentEnvironment. - * - *

            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 (OracleDatabaseClient oracleDatabaseClient = OracleDatabaseClient.create()) {
            -   *   GetGoldengateDeploymentEnvironmentRequest request =
            -   *       GetGoldengateDeploymentEnvironmentRequest.newBuilder()
            -   *           .setName(
            -   *               GoldengateDeploymentEnvironmentName.of(
            -   *                       "[PROJECT]", "[LOCATION]", "[GOLDENGATE_DEPLOYMENT_ENVIRONMENT]")
            -   *                   .toString())
            -   *           .build();
            -   *   ApiFuture future =
            -   *       oracleDatabaseClient.getGoldengateDeploymentEnvironmentCallable().futureCall(request);
            -   *   // Do something.
            -   *   GoldengateDeploymentEnvironment response = future.get();
            -   * }
            -   * }
            - */ - public final UnaryCallable< - GetGoldengateDeploymentEnvironmentRequest, GoldengateDeploymentEnvironment> - getGoldengateDeploymentEnvironmentCallable() { - return stub.getGoldengateDeploymentEnvironmentCallable(); - } - // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists GoldengateDeploymentEnvironments in a given project and location. @@ -13534,133 +13068,6 @@ public final GoldengateDeploymentEnvironment getGoldengateDeploymentEnvironment( return stub.listGoldengateDeploymentEnvironmentsCallable(); } - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets details of a single GoldengateConnectionType. - * - *

            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 (OracleDatabaseClient oracleDatabaseClient = OracleDatabaseClient.create()) {
            -   *   GoldengateConnectionTypeName name =
            -   *       GoldengateConnectionTypeName.of(
            -   *           "[PROJECT]", "[LOCATION]", "[GOLDENGATE_CONNECTION_TYPE]");
            -   *   GoldengateConnectionType response = oracleDatabaseClient.getGoldengateConnectionType(name);
            -   * }
            -   * }
            - * - * @param name Required. Name of the resource in the format: - * projects/{project}/locations/{location}/goldengateConnectionTypes/{goldengate_connection_type} - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final GoldengateConnectionType getGoldengateConnectionType( - GoldengateConnectionTypeName name) { - GetGoldengateConnectionTypeRequest request = - GetGoldengateConnectionTypeRequest.newBuilder() - .setName(name == null ? null : name.toString()) - .build(); - return getGoldengateConnectionType(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets details of a single GoldengateConnectionType. - * - *

            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 (OracleDatabaseClient oracleDatabaseClient = OracleDatabaseClient.create()) {
            -   *   String name =
            -   *       GoldengateConnectionTypeName.of("[PROJECT]", "[LOCATION]", "[GOLDENGATE_CONNECTION_TYPE]")
            -   *           .toString();
            -   *   GoldengateConnectionType response = oracleDatabaseClient.getGoldengateConnectionType(name);
            -   * }
            -   * }
            - * - * @param name Required. Name of the resource in the format: - * projects/{project}/locations/{location}/goldengateConnectionTypes/{goldengate_connection_type} - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final GoldengateConnectionType getGoldengateConnectionType(String name) { - GetGoldengateConnectionTypeRequest request = - GetGoldengateConnectionTypeRequest.newBuilder().setName(name).build(); - return getGoldengateConnectionType(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets details of a single GoldengateConnectionType. - * - *

            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 (OracleDatabaseClient oracleDatabaseClient = OracleDatabaseClient.create()) {
            -   *   GetGoldengateConnectionTypeRequest request =
            -   *       GetGoldengateConnectionTypeRequest.newBuilder()
            -   *           .setName(
            -   *               GoldengateConnectionTypeName.of(
            -   *                       "[PROJECT]", "[LOCATION]", "[GOLDENGATE_CONNECTION_TYPE]")
            -   *                   .toString())
            -   *           .build();
            -   *   GoldengateConnectionType response = oracleDatabaseClient.getGoldengateConnectionType(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 GoldengateConnectionType getGoldengateConnectionType( - GetGoldengateConnectionTypeRequest request) { - return getGoldengateConnectionTypeCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets details of a single GoldengateConnectionType. - * - *

            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 (OracleDatabaseClient oracleDatabaseClient = OracleDatabaseClient.create()) {
            -   *   GetGoldengateConnectionTypeRequest request =
            -   *       GetGoldengateConnectionTypeRequest.newBuilder()
            -   *           .setName(
            -   *               GoldengateConnectionTypeName.of(
            -   *                       "[PROJECT]", "[LOCATION]", "[GOLDENGATE_CONNECTION_TYPE]")
            -   *                   .toString())
            -   *           .build();
            -   *   ApiFuture future =
            -   *       oracleDatabaseClient.getGoldengateConnectionTypeCallable().futureCall(request);
            -   *   // Do something.
            -   *   GoldengateConnectionType response = future.get();
            -   * }
            -   * }
            - */ - public final UnaryCallable - getGoldengateConnectionTypeCallable() { - return stub.getGoldengateConnectionTypeCallable(); - } - // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists GoldengateConnectionTypes in a given project and location. diff --git a/java-oracledatabase/google-cloud-oracledatabase/src/main/java/com/google/cloud/oracledatabase/v1/OracleDatabaseSettings.java b/java-oracledatabase/google-cloud-oracledatabase/src/main/java/com/google/cloud/oracledatabase/v1/OracleDatabaseSettings.java index 17606abcb2aa..a9fc48da78e3 100644 --- a/java-oracledatabase/google-cloud-oracledatabase/src/main/java/com/google/cloud/oracledatabase/v1/OracleDatabaseSettings.java +++ b/java-oracledatabase/google-cloud-oracledatabase/src/main/java/com/google/cloud/oracledatabase/v1/OracleDatabaseSettings.java @@ -796,13 +796,6 @@ public UnaryCallSettings deleteDbSystemSetting .deleteGoldengateConnectionOperationSettings(); } - /** Returns the object with the settings used for calls to getGoldengateDeploymentVersion. */ - public UnaryCallSettings - getGoldengateDeploymentVersionSettings() { - return ((OracleDatabaseStubSettings) getStubSettings()) - .getGoldengateDeploymentVersionSettings(); - } - /** Returns the object with the settings used for calls to listGoldengateDeploymentVersions. */ public PagedCallSettings< ListGoldengateDeploymentVersionsRequest, @@ -813,12 +806,6 @@ public UnaryCallSettings deleteDbSystemSetting .listGoldengateDeploymentVersionsSettings(); } - /** Returns the object with the settings used for calls to getGoldengateDeploymentType. */ - public UnaryCallSettings - getGoldengateDeploymentTypeSettings() { - return ((OracleDatabaseStubSettings) getStubSettings()).getGoldengateDeploymentTypeSettings(); - } - /** Returns the object with the settings used for calls to listGoldengateDeploymentTypes. */ public PagedCallSettings< ListGoldengateDeploymentTypesRequest, @@ -828,14 +815,6 @@ public UnaryCallSettings deleteDbSystemSetting return ((OracleDatabaseStubSettings) getStubSettings()).listGoldengateDeploymentTypesSettings(); } - /** Returns the object with the settings used for calls to getGoldengateDeploymentEnvironment. */ - public UnaryCallSettings< - GetGoldengateDeploymentEnvironmentRequest, GoldengateDeploymentEnvironment> - getGoldengateDeploymentEnvironmentSettings() { - return ((OracleDatabaseStubSettings) getStubSettings()) - .getGoldengateDeploymentEnvironmentSettings(); - } - /** * Returns the object with the settings used for calls to listGoldengateDeploymentEnvironments. */ @@ -848,12 +827,6 @@ public UnaryCallSettings deleteDbSystemSetting .listGoldengateDeploymentEnvironmentsSettings(); } - /** Returns the object with the settings used for calls to getGoldengateConnectionType. */ - public UnaryCallSettings - getGoldengateConnectionTypeSettings() { - return ((OracleDatabaseStubSettings) getStubSettings()).getGoldengateConnectionTypeSettings(); - } - /** Returns the object with the settings used for calls to listGoldengateConnectionTypes. */ public PagedCallSettings< ListGoldengateConnectionTypesRequest, @@ -1717,13 +1690,6 @@ public UnaryCallSettings.Builder deleteDbSyste return getStubSettingsBuilder().deleteGoldengateConnectionOperationSettings(); } - /** Returns the builder for the settings used for calls to getGoldengateDeploymentVersion. */ - public UnaryCallSettings.Builder< - GetGoldengateDeploymentVersionRequest, GoldengateDeploymentVersion> - getGoldengateDeploymentVersionSettings() { - return getStubSettingsBuilder().getGoldengateDeploymentVersionSettings(); - } - /** Returns the builder for the settings used for calls to listGoldengateDeploymentVersions. */ public PagedCallSettings.Builder< ListGoldengateDeploymentVersionsRequest, @@ -1733,12 +1699,6 @@ public UnaryCallSettings.Builder deleteDbSyste return getStubSettingsBuilder().listGoldengateDeploymentVersionsSettings(); } - /** Returns the builder for the settings used for calls to getGoldengateDeploymentType. */ - public UnaryCallSettings.Builder - getGoldengateDeploymentTypeSettings() { - return getStubSettingsBuilder().getGoldengateDeploymentTypeSettings(); - } - /** Returns the builder for the settings used for calls to listGoldengateDeploymentTypes. */ public PagedCallSettings.Builder< ListGoldengateDeploymentTypesRequest, @@ -1748,15 +1708,6 @@ public UnaryCallSettings.Builder deleteDbSyste return getStubSettingsBuilder().listGoldengateDeploymentTypesSettings(); } - /** - * Returns the builder for the settings used for calls to getGoldengateDeploymentEnvironment. - */ - public UnaryCallSettings.Builder< - GetGoldengateDeploymentEnvironmentRequest, GoldengateDeploymentEnvironment> - getGoldengateDeploymentEnvironmentSettings() { - return getStubSettingsBuilder().getGoldengateDeploymentEnvironmentSettings(); - } - /** * Returns the builder for the settings used for calls to listGoldengateDeploymentEnvironments. */ @@ -1768,12 +1719,6 @@ public UnaryCallSettings.Builder deleteDbSyste return getStubSettingsBuilder().listGoldengateDeploymentEnvironmentsSettings(); } - /** Returns the builder for the settings used for calls to getGoldengateConnectionType. */ - public UnaryCallSettings.Builder - getGoldengateConnectionTypeSettings() { - return getStubSettingsBuilder().getGoldengateConnectionTypeSettings(); - } - /** Returns the builder for the settings used for calls to listGoldengateConnectionTypes. */ public PagedCallSettings.Builder< ListGoldengateConnectionTypesRequest, diff --git a/java-oracledatabase/google-cloud-oracledatabase/src/main/java/com/google/cloud/oracledatabase/v1/gapic_metadata.json b/java-oracledatabase/google-cloud-oracledatabase/src/main/java/com/google/cloud/oracledatabase/v1/gapic_metadata.json index a87ef3e5cdea..0bf1c6a4f4d4 100644 --- a/java-oracledatabase/google-cloud-oracledatabase/src/main/java/com/google/cloud/oracledatabase/v1/gapic_metadata.json +++ b/java-oracledatabase/google-cloud-oracledatabase/src/main/java/com/google/cloud/oracledatabase/v1/gapic_metadata.json @@ -109,21 +109,9 @@ "GetGoldengateConnectionAssignment": { "methods": ["getGoldengateConnectionAssignment", "getGoldengateConnectionAssignment", "getGoldengateConnectionAssignment", "getGoldengateConnectionAssignmentCallable"] }, - "GetGoldengateConnectionType": { - "methods": ["getGoldengateConnectionType", "getGoldengateConnectionType", "getGoldengateConnectionType", "getGoldengateConnectionTypeCallable"] - }, "GetGoldengateDeployment": { "methods": ["getGoldengateDeployment", "getGoldengateDeployment", "getGoldengateDeployment", "getGoldengateDeploymentCallable"] }, - "GetGoldengateDeploymentEnvironment": { - "methods": ["getGoldengateDeploymentEnvironment", "getGoldengateDeploymentEnvironment", "getGoldengateDeploymentEnvironment", "getGoldengateDeploymentEnvironmentCallable"] - }, - "GetGoldengateDeploymentType": { - "methods": ["getGoldengateDeploymentType", "getGoldengateDeploymentType", "getGoldengateDeploymentType", "getGoldengateDeploymentTypeCallable"] - }, - "GetGoldengateDeploymentVersion": { - "methods": ["getGoldengateDeploymentVersion", "getGoldengateDeploymentVersion", "getGoldengateDeploymentVersion", "getGoldengateDeploymentVersionCallable"] - }, "GetLocation": { "methods": ["getLocation", "getLocationCallable"] }, diff --git a/java-oracledatabase/google-cloud-oracledatabase/src/main/java/com/google/cloud/oracledatabase/v1/stub/GrpcOracleDatabaseStub.java b/java-oracledatabase/google-cloud-oracledatabase/src/main/java/com/google/cloud/oracledatabase/v1/stub/GrpcOracleDatabaseStub.java index 0df21be070ad..7a5c437ec7f2 100644 --- a/java-oracledatabase/google-cloud-oracledatabase/src/main/java/com/google/cloud/oracledatabase/v1/stub/GrpcOracleDatabaseStub.java +++ b/java-oracledatabase/google-cloud-oracledatabase/src/main/java/com/google/cloud/oracledatabase/v1/stub/GrpcOracleDatabaseStub.java @@ -100,21 +100,13 @@ import com.google.cloud.oracledatabase.v1.GetExascaleDbStorageVaultRequest; import com.google.cloud.oracledatabase.v1.GetGoldengateConnectionAssignmentRequest; import com.google.cloud.oracledatabase.v1.GetGoldengateConnectionRequest; -import com.google.cloud.oracledatabase.v1.GetGoldengateConnectionTypeRequest; -import com.google.cloud.oracledatabase.v1.GetGoldengateDeploymentEnvironmentRequest; import com.google.cloud.oracledatabase.v1.GetGoldengateDeploymentRequest; -import com.google.cloud.oracledatabase.v1.GetGoldengateDeploymentTypeRequest; -import com.google.cloud.oracledatabase.v1.GetGoldengateDeploymentVersionRequest; import com.google.cloud.oracledatabase.v1.GetOdbNetworkRequest; import com.google.cloud.oracledatabase.v1.GetOdbSubnetRequest; import com.google.cloud.oracledatabase.v1.GetPluggableDatabaseRequest; import com.google.cloud.oracledatabase.v1.GoldengateConnection; import com.google.cloud.oracledatabase.v1.GoldengateConnectionAssignment; -import com.google.cloud.oracledatabase.v1.GoldengateConnectionType; import com.google.cloud.oracledatabase.v1.GoldengateDeployment; -import com.google.cloud.oracledatabase.v1.GoldengateDeploymentEnvironment; -import com.google.cloud.oracledatabase.v1.GoldengateDeploymentType; -import com.google.cloud.oracledatabase.v1.GoldengateDeploymentVersion; import com.google.cloud.oracledatabase.v1.ListAutonomousDatabaseBackupsRequest; import com.google.cloud.oracledatabase.v1.ListAutonomousDatabaseBackupsResponse; import com.google.cloud.oracledatabase.v1.ListAutonomousDatabaseCharacterSetsRequest; @@ -1038,21 +1030,6 @@ public class GrpcOracleDatabaseStub extends OracleDatabaseStub { .setSampledToLocalTracing(true) .build(); - private static final MethodDescriptor< - GetGoldengateDeploymentVersionRequest, GoldengateDeploymentVersion> - getGoldengateDeploymentVersionMethodDescriptor = - MethodDescriptor - .newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - "google.cloud.oracledatabase.v1.OracleDatabase/GetGoldengateDeploymentVersion") - .setRequestMarshaller( - ProtoUtils.marshaller(GetGoldengateDeploymentVersionRequest.getDefaultInstance())) - .setResponseMarshaller( - ProtoUtils.marshaller(GoldengateDeploymentVersion.getDefaultInstance())) - .setSampledToLocalTracing(true) - .build(); - private static final MethodDescriptor< ListGoldengateDeploymentVersionsRequest, ListGoldengateDeploymentVersionsResponse> listGoldengateDeploymentVersionsMethodDescriptor = @@ -1071,21 +1048,6 @@ public class GrpcOracleDatabaseStub extends OracleDatabaseStub { .setSampledToLocalTracing(true) .build(); - private static final MethodDescriptor< - GetGoldengateDeploymentTypeRequest, GoldengateDeploymentType> - getGoldengateDeploymentTypeMethodDescriptor = - MethodDescriptor - .newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - "google.cloud.oracledatabase.v1.OracleDatabase/GetGoldengateDeploymentType") - .setRequestMarshaller( - ProtoUtils.marshaller(GetGoldengateDeploymentTypeRequest.getDefaultInstance())) - .setResponseMarshaller( - ProtoUtils.marshaller(GoldengateDeploymentType.getDefaultInstance())) - .setSampledToLocalTracing(true) - .build(); - private static final MethodDescriptor< ListGoldengateDeploymentTypesRequest, ListGoldengateDeploymentTypesResponse> listGoldengateDeploymentTypesMethodDescriptor = @@ -1102,23 +1064,6 @@ public class GrpcOracleDatabaseStub extends OracleDatabaseStub { .setSampledToLocalTracing(true) .build(); - private static final MethodDescriptor< - GetGoldengateDeploymentEnvironmentRequest, GoldengateDeploymentEnvironment> - getGoldengateDeploymentEnvironmentMethodDescriptor = - MethodDescriptor - . - newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - "google.cloud.oracledatabase.v1.OracleDatabase/GetGoldengateDeploymentEnvironment") - .setRequestMarshaller( - ProtoUtils.marshaller( - GetGoldengateDeploymentEnvironmentRequest.getDefaultInstance())) - .setResponseMarshaller( - ProtoUtils.marshaller(GoldengateDeploymentEnvironment.getDefaultInstance())) - .setSampledToLocalTracing(true) - .build(); - private static final MethodDescriptor< ListGoldengateDeploymentEnvironmentsRequest, ListGoldengateDeploymentEnvironmentsResponse> listGoldengateDeploymentEnvironmentsMethodDescriptor = @@ -1138,21 +1083,6 @@ public class GrpcOracleDatabaseStub extends OracleDatabaseStub { .setSampledToLocalTracing(true) .build(); - private static final MethodDescriptor< - GetGoldengateConnectionTypeRequest, GoldengateConnectionType> - getGoldengateConnectionTypeMethodDescriptor = - MethodDescriptor - .newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - "google.cloud.oracledatabase.v1.OracleDatabase/GetGoldengateConnectionType") - .setRequestMarshaller( - ProtoUtils.marshaller(GetGoldengateConnectionTypeRequest.getDefaultInstance())) - .setResponseMarshaller( - ProtoUtils.marshaller(GoldengateConnectionType.getDefaultInstance())) - .setSampledToLocalTracing(true) - .build(); - private static final MethodDescriptor< ListGoldengateConnectionTypesRequest, ListGoldengateConnectionTypesResponse> listGoldengateConnectionTypesMethodDescriptor = @@ -1543,25 +1473,18 @@ public class GrpcOracleDatabaseStub extends OracleDatabaseStub { deleteGoldengateConnectionCallable; private final OperationCallable deleteGoldengateConnectionOperationCallable; - private final UnaryCallable - getGoldengateDeploymentVersionCallable; private final UnaryCallable< ListGoldengateDeploymentVersionsRequest, ListGoldengateDeploymentVersionsResponse> listGoldengateDeploymentVersionsCallable; private final UnaryCallable< ListGoldengateDeploymentVersionsRequest, ListGoldengateDeploymentVersionsPagedResponse> listGoldengateDeploymentVersionsPagedCallable; - private final UnaryCallable - getGoldengateDeploymentTypeCallable; private final UnaryCallable< ListGoldengateDeploymentTypesRequest, ListGoldengateDeploymentTypesResponse> listGoldengateDeploymentTypesCallable; private final UnaryCallable< ListGoldengateDeploymentTypesRequest, ListGoldengateDeploymentTypesPagedResponse> listGoldengateDeploymentTypesPagedCallable; - private final UnaryCallable< - GetGoldengateDeploymentEnvironmentRequest, GoldengateDeploymentEnvironment> - getGoldengateDeploymentEnvironmentCallable; private final UnaryCallable< ListGoldengateDeploymentEnvironmentsRequest, ListGoldengateDeploymentEnvironmentsResponse> listGoldengateDeploymentEnvironmentsCallable; @@ -1569,8 +1492,6 @@ public class GrpcOracleDatabaseStub extends OracleDatabaseStub { ListGoldengateDeploymentEnvironmentsRequest, ListGoldengateDeploymentEnvironmentsPagedResponse> listGoldengateDeploymentEnvironmentsPagedCallable; - private final UnaryCallable - getGoldengateConnectionTypeCallable; private final UnaryCallable< ListGoldengateConnectionTypesRequest, ListGoldengateConnectionTypesResponse> listGoldengateConnectionTypesCallable; @@ -2455,19 +2376,6 @@ protected GrpcOracleDatabaseStub( }) .setResourceNameExtractor(request -> request.getName()) .build(); - GrpcCallSettings - getGoldengateDeploymentVersionTransportSettings = - GrpcCallSettings - .newBuilder() - .setMethodDescriptor(getGoldengateDeploymentVersionMethodDescriptor) - .setParamsExtractor( - request -> { - RequestParamsBuilder builder = RequestParamsBuilder.create(); - builder.add("name", String.valueOf(request.getName())); - return builder.build(); - }) - .setResourceNameExtractor(request -> request.getName()) - .build(); GrpcCallSettings< ListGoldengateDeploymentVersionsRequest, ListGoldengateDeploymentVersionsResponse> listGoldengateDeploymentVersionsTransportSettings = @@ -2483,19 +2391,6 @@ protected GrpcOracleDatabaseStub( }) .setResourceNameExtractor(request -> request.getParent()) .build(); - GrpcCallSettings - getGoldengateDeploymentTypeTransportSettings = - GrpcCallSettings - .newBuilder() - .setMethodDescriptor(getGoldengateDeploymentTypeMethodDescriptor) - .setParamsExtractor( - request -> { - RequestParamsBuilder builder = RequestParamsBuilder.create(); - builder.add("name", String.valueOf(request.getName())); - return builder.build(); - }) - .setResourceNameExtractor(request -> request.getName()) - .build(); GrpcCallSettings listGoldengateDeploymentTypesTransportSettings = GrpcCallSettings @@ -2510,20 +2405,6 @@ protected GrpcOracleDatabaseStub( }) .setResourceNameExtractor(request -> request.getParent()) .build(); - GrpcCallSettings - getGoldengateDeploymentEnvironmentTransportSettings = - GrpcCallSettings - . - newBuilder() - .setMethodDescriptor(getGoldengateDeploymentEnvironmentMethodDescriptor) - .setParamsExtractor( - request -> { - RequestParamsBuilder builder = RequestParamsBuilder.create(); - builder.add("name", String.valueOf(request.getName())); - return builder.build(); - }) - .setResourceNameExtractor(request -> request.getName()) - .build(); GrpcCallSettings< ListGoldengateDeploymentEnvironmentsRequest, ListGoldengateDeploymentEnvironmentsResponse> @@ -2541,19 +2422,6 @@ protected GrpcOracleDatabaseStub( }) .setResourceNameExtractor(request -> request.getParent()) .build(); - GrpcCallSettings - getGoldengateConnectionTypeTransportSettings = - GrpcCallSettings - .newBuilder() - .setMethodDescriptor(getGoldengateConnectionTypeMethodDescriptor) - .setParamsExtractor( - request -> { - RequestParamsBuilder builder = RequestParamsBuilder.create(); - builder.add("name", String.valueOf(request.getName())); - return builder.build(); - }) - .setResourceNameExtractor(request -> request.getName()) - .build(); GrpcCallSettings listGoldengateConnectionTypesTransportSettings = GrpcCallSettings @@ -3258,11 +3126,6 @@ protected GrpcOracleDatabaseStub( settings.deleteGoldengateConnectionOperationSettings(), clientContext, operationsStub); - this.getGoldengateDeploymentVersionCallable = - callableFactory.createUnaryCallable( - getGoldengateDeploymentVersionTransportSettings, - settings.getGoldengateDeploymentVersionSettings(), - clientContext); this.listGoldengateDeploymentVersionsCallable = callableFactory.createUnaryCallable( listGoldengateDeploymentVersionsTransportSettings, @@ -3273,11 +3136,6 @@ protected GrpcOracleDatabaseStub( listGoldengateDeploymentVersionsTransportSettings, settings.listGoldengateDeploymentVersionsSettings(), clientContext); - this.getGoldengateDeploymentTypeCallable = - callableFactory.createUnaryCallable( - getGoldengateDeploymentTypeTransportSettings, - settings.getGoldengateDeploymentTypeSettings(), - clientContext); this.listGoldengateDeploymentTypesCallable = callableFactory.createUnaryCallable( listGoldengateDeploymentTypesTransportSettings, @@ -3288,11 +3146,6 @@ protected GrpcOracleDatabaseStub( listGoldengateDeploymentTypesTransportSettings, settings.listGoldengateDeploymentTypesSettings(), clientContext); - this.getGoldengateDeploymentEnvironmentCallable = - callableFactory.createUnaryCallable( - getGoldengateDeploymentEnvironmentTransportSettings, - settings.getGoldengateDeploymentEnvironmentSettings(), - clientContext); this.listGoldengateDeploymentEnvironmentsCallable = callableFactory.createUnaryCallable( listGoldengateDeploymentEnvironmentsTransportSettings, @@ -3303,11 +3156,6 @@ protected GrpcOracleDatabaseStub( listGoldengateDeploymentEnvironmentsTransportSettings, settings.listGoldengateDeploymentEnvironmentsSettings(), clientContext); - this.getGoldengateConnectionTypeCallable = - callableFactory.createUnaryCallable( - getGoldengateConnectionTypeTransportSettings, - settings.getGoldengateConnectionTypeSettings(), - clientContext); this.listGoldengateConnectionTypesCallable = callableFactory.createUnaryCallable( listGoldengateConnectionTypesTransportSettings, @@ -4098,12 +3946,6 @@ public UnaryCallable deleteDbSystemCallable() return deleteGoldengateConnectionOperationCallable; } - @Override - public UnaryCallable - getGoldengateDeploymentVersionCallable() { - return getGoldengateDeploymentVersionCallable; - } - @Override public UnaryCallable< ListGoldengateDeploymentVersionsRequest, ListGoldengateDeploymentVersionsResponse> @@ -4118,12 +3960,6 @@ public UnaryCallable deleteDbSystemCallable() return listGoldengateDeploymentVersionsPagedCallable; } - @Override - public UnaryCallable - getGoldengateDeploymentTypeCallable() { - return getGoldengateDeploymentTypeCallable; - } - @Override public UnaryCallable listGoldengateDeploymentTypesCallable() { @@ -4137,12 +3973,6 @@ public UnaryCallable deleteDbSystemCallable() return listGoldengateDeploymentTypesPagedCallable; } - @Override - public UnaryCallable - getGoldengateDeploymentEnvironmentCallable() { - return getGoldengateDeploymentEnvironmentCallable; - } - @Override public UnaryCallable< ListGoldengateDeploymentEnvironmentsRequest, ListGoldengateDeploymentEnvironmentsResponse> @@ -4158,12 +3988,6 @@ public UnaryCallable deleteDbSystemCallable() return listGoldengateDeploymentEnvironmentsPagedCallable; } - @Override - public UnaryCallable - getGoldengateConnectionTypeCallable() { - return getGoldengateConnectionTypeCallable; - } - @Override public UnaryCallable listGoldengateConnectionTypesCallable() { diff --git a/java-oracledatabase/google-cloud-oracledatabase/src/main/java/com/google/cloud/oracledatabase/v1/stub/HttpJsonOracleDatabaseStub.java b/java-oracledatabase/google-cloud-oracledatabase/src/main/java/com/google/cloud/oracledatabase/v1/stub/HttpJsonOracleDatabaseStub.java index ec09b65ef2d7..880d737009ce 100644 --- a/java-oracledatabase/google-cloud-oracledatabase/src/main/java/com/google/cloud/oracledatabase/v1/stub/HttpJsonOracleDatabaseStub.java +++ b/java-oracledatabase/google-cloud-oracledatabase/src/main/java/com/google/cloud/oracledatabase/v1/stub/HttpJsonOracleDatabaseStub.java @@ -108,21 +108,13 @@ import com.google.cloud.oracledatabase.v1.GetExascaleDbStorageVaultRequest; import com.google.cloud.oracledatabase.v1.GetGoldengateConnectionAssignmentRequest; import com.google.cloud.oracledatabase.v1.GetGoldengateConnectionRequest; -import com.google.cloud.oracledatabase.v1.GetGoldengateConnectionTypeRequest; -import com.google.cloud.oracledatabase.v1.GetGoldengateDeploymentEnvironmentRequest; import com.google.cloud.oracledatabase.v1.GetGoldengateDeploymentRequest; -import com.google.cloud.oracledatabase.v1.GetGoldengateDeploymentTypeRequest; -import com.google.cloud.oracledatabase.v1.GetGoldengateDeploymentVersionRequest; import com.google.cloud.oracledatabase.v1.GetOdbNetworkRequest; import com.google.cloud.oracledatabase.v1.GetOdbSubnetRequest; import com.google.cloud.oracledatabase.v1.GetPluggableDatabaseRequest; import com.google.cloud.oracledatabase.v1.GoldengateConnection; import com.google.cloud.oracledatabase.v1.GoldengateConnectionAssignment; -import com.google.cloud.oracledatabase.v1.GoldengateConnectionType; import com.google.cloud.oracledatabase.v1.GoldengateDeployment; -import com.google.cloud.oracledatabase.v1.GoldengateDeploymentEnvironment; -import com.google.cloud.oracledatabase.v1.GoldengateDeploymentType; -import com.google.cloud.oracledatabase.v1.GoldengateDeploymentVersion; import com.google.cloud.oracledatabase.v1.ListAutonomousDatabaseBackupsRequest; import com.google.cloud.oracledatabase.v1.ListAutonomousDatabaseBackupsResponse; import com.google.cloud.oracledatabase.v1.ListAutonomousDatabaseCharacterSetsRequest; @@ -2864,43 +2856,6 @@ public class HttpJsonOracleDatabaseStub extends OracleDatabaseStub { HttpJsonOperationSnapshot.create(response)) .build(); - private static final ApiMethodDescriptor< - GetGoldengateDeploymentVersionRequest, GoldengateDeploymentVersion> - getGoldengateDeploymentVersionMethodDescriptor = - ApiMethodDescriptor - .newBuilder() - .setFullMethodName( - "google.cloud.oracledatabase.v1.OracleDatabase/GetGoldengateDeploymentVersion") - .setHttpMethod("GET") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1/{name=projects/*/locations/*/goldengateDeploymentVersions/*}", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "name", request.getName()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); - return fields; - }) - .setRequestBodyExtractor(request -> null) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(GoldengateDeploymentVersion.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - private static final ApiMethodDescriptor< ListGoldengateDeploymentVersionsRequest, ListGoldengateDeploymentVersionsResponse> listGoldengateDeploymentVersionsMethodDescriptor = @@ -2943,43 +2898,6 @@ public class HttpJsonOracleDatabaseStub extends OracleDatabaseStub { .build()) .build(); - private static final ApiMethodDescriptor< - GetGoldengateDeploymentTypeRequest, GoldengateDeploymentType> - getGoldengateDeploymentTypeMethodDescriptor = - ApiMethodDescriptor - .newBuilder() - .setFullMethodName( - "google.cloud.oracledatabase.v1.OracleDatabase/GetGoldengateDeploymentType") - .setHttpMethod("GET") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1/{name=projects/*/locations/*/goldengateDeploymentTypes/*}", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "name", request.getName()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); - return fields; - }) - .setRequestBodyExtractor(request -> null) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(GoldengateDeploymentType.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - private static final ApiMethodDescriptor< ListGoldengateDeploymentTypesRequest, ListGoldengateDeploymentTypesResponse> listGoldengateDeploymentTypesMethodDescriptor = @@ -3023,45 +2941,6 @@ public class HttpJsonOracleDatabaseStub extends OracleDatabaseStub { .build()) .build(); - private static final ApiMethodDescriptor< - GetGoldengateDeploymentEnvironmentRequest, GoldengateDeploymentEnvironment> - getGoldengateDeploymentEnvironmentMethodDescriptor = - ApiMethodDescriptor - . - newBuilder() - .setFullMethodName( - "google.cloud.oracledatabase.v1.OracleDatabase/GetGoldengateDeploymentEnvironment") - .setHttpMethod("GET") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter - .newBuilder() - .setPath( - "/v1/{name=projects/*/locations/*/goldengateDeploymentEnvironments/*}", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer - serializer = ProtoRestSerializer.create(); - serializer.putPathParam(fields, "name", request.getName()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer - serializer = ProtoRestSerializer.create(); - serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); - return fields; - }) - .setRequestBodyExtractor(request -> null) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(GoldengateDeploymentEnvironment.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - private static final ApiMethodDescriptor< ListGoldengateDeploymentEnvironmentsRequest, ListGoldengateDeploymentEnvironmentsResponse> listGoldengateDeploymentEnvironmentsMethodDescriptor = @@ -3106,43 +2985,6 @@ public class HttpJsonOracleDatabaseStub extends OracleDatabaseStub { .build()) .build(); - private static final ApiMethodDescriptor< - GetGoldengateConnectionTypeRequest, GoldengateConnectionType> - getGoldengateConnectionTypeMethodDescriptor = - ApiMethodDescriptor - .newBuilder() - .setFullMethodName( - "google.cloud.oracledatabase.v1.OracleDatabase/GetGoldengateConnectionType") - .setHttpMethod("GET") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1/{name=projects/*/locations/*/goldengateConnectionTypes/*}", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "name", request.getName()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); - return fields; - }) - .setRequestBodyExtractor(request -> null) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(GoldengateConnectionType.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - private static final ApiMethodDescriptor< ListGoldengateConnectionTypesRequest, ListGoldengateConnectionTypesResponse> listGoldengateConnectionTypesMethodDescriptor = @@ -3795,25 +3637,18 @@ public class HttpJsonOracleDatabaseStub extends OracleDatabaseStub { deleteGoldengateConnectionCallable; private final OperationCallable deleteGoldengateConnectionOperationCallable; - private final UnaryCallable - getGoldengateDeploymentVersionCallable; private final UnaryCallable< ListGoldengateDeploymentVersionsRequest, ListGoldengateDeploymentVersionsResponse> listGoldengateDeploymentVersionsCallable; private final UnaryCallable< ListGoldengateDeploymentVersionsRequest, ListGoldengateDeploymentVersionsPagedResponse> listGoldengateDeploymentVersionsPagedCallable; - private final UnaryCallable - getGoldengateDeploymentTypeCallable; private final UnaryCallable< ListGoldengateDeploymentTypesRequest, ListGoldengateDeploymentTypesResponse> listGoldengateDeploymentTypesCallable; private final UnaryCallable< ListGoldengateDeploymentTypesRequest, ListGoldengateDeploymentTypesPagedResponse> listGoldengateDeploymentTypesPagedCallable; - private final UnaryCallable< - GetGoldengateDeploymentEnvironmentRequest, GoldengateDeploymentEnvironment> - getGoldengateDeploymentEnvironmentCallable; private final UnaryCallable< ListGoldengateDeploymentEnvironmentsRequest, ListGoldengateDeploymentEnvironmentsResponse> listGoldengateDeploymentEnvironmentsCallable; @@ -3821,8 +3656,6 @@ public class HttpJsonOracleDatabaseStub extends OracleDatabaseStub { ListGoldengateDeploymentEnvironmentsRequest, ListGoldengateDeploymentEnvironmentsPagedResponse> listGoldengateDeploymentEnvironmentsPagedCallable; - private final UnaryCallable - getGoldengateConnectionTypeCallable; private final UnaryCallable< ListGoldengateConnectionTypesRequest, ListGoldengateConnectionTypesResponse> listGoldengateConnectionTypesCallable; @@ -4813,20 +4646,6 @@ protected HttpJsonOracleDatabaseStub( }) .setResourceNameExtractor(request -> request.getName()) .build(); - HttpJsonCallSettings - getGoldengateDeploymentVersionTransportSettings = - HttpJsonCallSettings - .newBuilder() - .setMethodDescriptor(getGoldengateDeploymentVersionMethodDescriptor) - .setTypeRegistry(typeRegistry) - .setParamsExtractor( - request -> { - RequestParamsBuilder builder = RequestParamsBuilder.create(); - builder.add("name", String.valueOf(request.getName())); - return builder.build(); - }) - .setResourceNameExtractor(request -> request.getName()) - .build(); HttpJsonCallSettings< ListGoldengateDeploymentVersionsRequest, ListGoldengateDeploymentVersionsResponse> listGoldengateDeploymentVersionsTransportSettings = @@ -4843,20 +4662,6 @@ protected HttpJsonOracleDatabaseStub( }) .setResourceNameExtractor(request -> request.getParent()) .build(); - HttpJsonCallSettings - getGoldengateDeploymentTypeTransportSettings = - HttpJsonCallSettings - .newBuilder() - .setMethodDescriptor(getGoldengateDeploymentTypeMethodDescriptor) - .setTypeRegistry(typeRegistry) - .setParamsExtractor( - request -> { - RequestParamsBuilder builder = RequestParamsBuilder.create(); - builder.add("name", String.valueOf(request.getName())); - return builder.build(); - }) - .setResourceNameExtractor(request -> request.getName()) - .build(); HttpJsonCallSettings< ListGoldengateDeploymentTypesRequest, ListGoldengateDeploymentTypesResponse> listGoldengateDeploymentTypesTransportSettings = @@ -4873,21 +4678,6 @@ protected HttpJsonOracleDatabaseStub( }) .setResourceNameExtractor(request -> request.getParent()) .build(); - HttpJsonCallSettings - getGoldengateDeploymentEnvironmentTransportSettings = - HttpJsonCallSettings - . - newBuilder() - .setMethodDescriptor(getGoldengateDeploymentEnvironmentMethodDescriptor) - .setTypeRegistry(typeRegistry) - .setParamsExtractor( - request -> { - RequestParamsBuilder builder = RequestParamsBuilder.create(); - builder.add("name", String.valueOf(request.getName())); - return builder.build(); - }) - .setResourceNameExtractor(request -> request.getName()) - .build(); HttpJsonCallSettings< ListGoldengateDeploymentEnvironmentsRequest, ListGoldengateDeploymentEnvironmentsResponse> @@ -4906,20 +4696,6 @@ protected HttpJsonOracleDatabaseStub( }) .setResourceNameExtractor(request -> request.getParent()) .build(); - HttpJsonCallSettings - getGoldengateConnectionTypeTransportSettings = - HttpJsonCallSettings - .newBuilder() - .setMethodDescriptor(getGoldengateConnectionTypeMethodDescriptor) - .setTypeRegistry(typeRegistry) - .setParamsExtractor( - request -> { - RequestParamsBuilder builder = RequestParamsBuilder.create(); - builder.add("name", String.valueOf(request.getName())); - return builder.build(); - }) - .setResourceNameExtractor(request -> request.getName()) - .build(); HttpJsonCallSettings< ListGoldengateConnectionTypesRequest, ListGoldengateConnectionTypesResponse> listGoldengateConnectionTypesTransportSettings = @@ -5638,11 +5414,6 @@ protected HttpJsonOracleDatabaseStub( settings.deleteGoldengateConnectionOperationSettings(), clientContext, httpJsonOperationsStub); - this.getGoldengateDeploymentVersionCallable = - callableFactory.createUnaryCallable( - getGoldengateDeploymentVersionTransportSettings, - settings.getGoldengateDeploymentVersionSettings(), - clientContext); this.listGoldengateDeploymentVersionsCallable = callableFactory.createUnaryCallable( listGoldengateDeploymentVersionsTransportSettings, @@ -5653,11 +5424,6 @@ protected HttpJsonOracleDatabaseStub( listGoldengateDeploymentVersionsTransportSettings, settings.listGoldengateDeploymentVersionsSettings(), clientContext); - this.getGoldengateDeploymentTypeCallable = - callableFactory.createUnaryCallable( - getGoldengateDeploymentTypeTransportSettings, - settings.getGoldengateDeploymentTypeSettings(), - clientContext); this.listGoldengateDeploymentTypesCallable = callableFactory.createUnaryCallable( listGoldengateDeploymentTypesTransportSettings, @@ -5668,11 +5434,6 @@ protected HttpJsonOracleDatabaseStub( listGoldengateDeploymentTypesTransportSettings, settings.listGoldengateDeploymentTypesSettings(), clientContext); - this.getGoldengateDeploymentEnvironmentCallable = - callableFactory.createUnaryCallable( - getGoldengateDeploymentEnvironmentTransportSettings, - settings.getGoldengateDeploymentEnvironmentSettings(), - clientContext); this.listGoldengateDeploymentEnvironmentsCallable = callableFactory.createUnaryCallable( listGoldengateDeploymentEnvironmentsTransportSettings, @@ -5683,11 +5444,6 @@ protected HttpJsonOracleDatabaseStub( listGoldengateDeploymentEnvironmentsTransportSettings, settings.listGoldengateDeploymentEnvironmentsSettings(), clientContext); - this.getGoldengateConnectionTypeCallable = - callableFactory.createUnaryCallable( - getGoldengateConnectionTypeTransportSettings, - settings.getGoldengateConnectionTypeSettings(), - clientContext); this.listGoldengateConnectionTypesCallable = callableFactory.createUnaryCallable( listGoldengateConnectionTypesTransportSettings, @@ -5839,13 +5595,9 @@ public static List getMethodDescriptors() { methodDescriptors.add(getGoldengateConnectionMethodDescriptor); methodDescriptors.add(createGoldengateConnectionMethodDescriptor); methodDescriptors.add(deleteGoldengateConnectionMethodDescriptor); - methodDescriptors.add(getGoldengateDeploymentVersionMethodDescriptor); methodDescriptors.add(listGoldengateDeploymentVersionsMethodDescriptor); - methodDescriptors.add(getGoldengateDeploymentTypeMethodDescriptor); methodDescriptors.add(listGoldengateDeploymentTypesMethodDescriptor); - methodDescriptors.add(getGoldengateDeploymentEnvironmentMethodDescriptor); methodDescriptors.add(listGoldengateDeploymentEnvironmentsMethodDescriptor); - methodDescriptors.add(getGoldengateConnectionTypeMethodDescriptor); methodDescriptors.add(listGoldengateConnectionTypesMethodDescriptor); methodDescriptors.add(listDbVersionsMethodDescriptor); methodDescriptors.add(listDatabaseCharacterSetsMethodDescriptor); @@ -6567,12 +6319,6 @@ public UnaryCallable deleteDbSystemCallable() return deleteGoldengateConnectionOperationCallable; } - @Override - public UnaryCallable - getGoldengateDeploymentVersionCallable() { - return getGoldengateDeploymentVersionCallable; - } - @Override public UnaryCallable< ListGoldengateDeploymentVersionsRequest, ListGoldengateDeploymentVersionsResponse> @@ -6587,12 +6333,6 @@ public UnaryCallable deleteDbSystemCallable() return listGoldengateDeploymentVersionsPagedCallable; } - @Override - public UnaryCallable - getGoldengateDeploymentTypeCallable() { - return getGoldengateDeploymentTypeCallable; - } - @Override public UnaryCallable listGoldengateDeploymentTypesCallable() { @@ -6606,12 +6346,6 @@ public UnaryCallable deleteDbSystemCallable() return listGoldengateDeploymentTypesPagedCallable; } - @Override - public UnaryCallable - getGoldengateDeploymentEnvironmentCallable() { - return getGoldengateDeploymentEnvironmentCallable; - } - @Override public UnaryCallable< ListGoldengateDeploymentEnvironmentsRequest, ListGoldengateDeploymentEnvironmentsResponse> @@ -6627,12 +6361,6 @@ public UnaryCallable deleteDbSystemCallable() return listGoldengateDeploymentEnvironmentsPagedCallable; } - @Override - public UnaryCallable - getGoldengateConnectionTypeCallable() { - return getGoldengateConnectionTypeCallable; - } - @Override public UnaryCallable listGoldengateConnectionTypesCallable() { diff --git a/java-oracledatabase/google-cloud-oracledatabase/src/main/java/com/google/cloud/oracledatabase/v1/stub/OracleDatabaseStub.java b/java-oracledatabase/google-cloud-oracledatabase/src/main/java/com/google/cloud/oracledatabase/v1/stub/OracleDatabaseStub.java index 37d887385d5f..0a91648b63ac 100644 --- a/java-oracledatabase/google-cloud-oracledatabase/src/main/java/com/google/cloud/oracledatabase/v1/stub/OracleDatabaseStub.java +++ b/java-oracledatabase/google-cloud-oracledatabase/src/main/java/com/google/cloud/oracledatabase/v1/stub/OracleDatabaseStub.java @@ -95,21 +95,13 @@ import com.google.cloud.oracledatabase.v1.GetExascaleDbStorageVaultRequest; import com.google.cloud.oracledatabase.v1.GetGoldengateConnectionAssignmentRequest; import com.google.cloud.oracledatabase.v1.GetGoldengateConnectionRequest; -import com.google.cloud.oracledatabase.v1.GetGoldengateConnectionTypeRequest; -import com.google.cloud.oracledatabase.v1.GetGoldengateDeploymentEnvironmentRequest; import com.google.cloud.oracledatabase.v1.GetGoldengateDeploymentRequest; -import com.google.cloud.oracledatabase.v1.GetGoldengateDeploymentTypeRequest; -import com.google.cloud.oracledatabase.v1.GetGoldengateDeploymentVersionRequest; import com.google.cloud.oracledatabase.v1.GetOdbNetworkRequest; import com.google.cloud.oracledatabase.v1.GetOdbSubnetRequest; import com.google.cloud.oracledatabase.v1.GetPluggableDatabaseRequest; import com.google.cloud.oracledatabase.v1.GoldengateConnection; import com.google.cloud.oracledatabase.v1.GoldengateConnectionAssignment; -import com.google.cloud.oracledatabase.v1.GoldengateConnectionType; import com.google.cloud.oracledatabase.v1.GoldengateDeployment; -import com.google.cloud.oracledatabase.v1.GoldengateDeploymentEnvironment; -import com.google.cloud.oracledatabase.v1.GoldengateDeploymentType; -import com.google.cloud.oracledatabase.v1.GoldengateDeploymentVersion; import com.google.cloud.oracledatabase.v1.ListAutonomousDatabaseBackupsRequest; import com.google.cloud.oracledatabase.v1.ListAutonomousDatabaseBackupsResponse; import com.google.cloud.oracledatabase.v1.ListAutonomousDatabaseCharacterSetsRequest; @@ -844,12 +836,6 @@ public UnaryCallable deleteDbSystemCallable() "Not implemented: deleteGoldengateConnectionCallable()"); } - public UnaryCallable - getGoldengateDeploymentVersionCallable() { - throw new UnsupportedOperationException( - "Not implemented: getGoldengateDeploymentVersionCallable()"); - } - public UnaryCallable< ListGoldengateDeploymentVersionsRequest, ListGoldengateDeploymentVersionsPagedResponse> listGoldengateDeploymentVersionsPagedCallable() { @@ -864,12 +850,6 @@ public UnaryCallable deleteDbSystemCallable() "Not implemented: listGoldengateDeploymentVersionsCallable()"); } - public UnaryCallable - getGoldengateDeploymentTypeCallable() { - throw new UnsupportedOperationException( - "Not implemented: getGoldengateDeploymentTypeCallable()"); - } - public UnaryCallable< ListGoldengateDeploymentTypesRequest, ListGoldengateDeploymentTypesPagedResponse> listGoldengateDeploymentTypesPagedCallable() { @@ -883,12 +863,6 @@ public UnaryCallable deleteDbSystemCallable() "Not implemented: listGoldengateDeploymentTypesCallable()"); } - public UnaryCallable - getGoldengateDeploymentEnvironmentCallable() { - throw new UnsupportedOperationException( - "Not implemented: getGoldengateDeploymentEnvironmentCallable()"); - } - public UnaryCallable< ListGoldengateDeploymentEnvironmentsRequest, ListGoldengateDeploymentEnvironmentsPagedResponse> @@ -904,12 +878,6 @@ public UnaryCallable deleteDbSystemCallable() "Not implemented: listGoldengateDeploymentEnvironmentsCallable()"); } - public UnaryCallable - getGoldengateConnectionTypeCallable() { - throw new UnsupportedOperationException( - "Not implemented: getGoldengateConnectionTypeCallable()"); - } - public UnaryCallable< ListGoldengateConnectionTypesRequest, ListGoldengateConnectionTypesPagedResponse> listGoldengateConnectionTypesPagedCallable() { diff --git a/java-oracledatabase/google-cloud-oracledatabase/src/main/java/com/google/cloud/oracledatabase/v1/stub/OracleDatabaseStubSettings.java b/java-oracledatabase/google-cloud-oracledatabase/src/main/java/com/google/cloud/oracledatabase/v1/stub/OracleDatabaseStubSettings.java index 0663a6fa8a5d..463ae4ed964f 100644 --- a/java-oracledatabase/google-cloud-oracledatabase/src/main/java/com/google/cloud/oracledatabase/v1/stub/OracleDatabaseStubSettings.java +++ b/java-oracledatabase/google-cloud-oracledatabase/src/main/java/com/google/cloud/oracledatabase/v1/stub/OracleDatabaseStubSettings.java @@ -133,11 +133,7 @@ import com.google.cloud.oracledatabase.v1.GetExascaleDbStorageVaultRequest; import com.google.cloud.oracledatabase.v1.GetGoldengateConnectionAssignmentRequest; import com.google.cloud.oracledatabase.v1.GetGoldengateConnectionRequest; -import com.google.cloud.oracledatabase.v1.GetGoldengateConnectionTypeRequest; -import com.google.cloud.oracledatabase.v1.GetGoldengateDeploymentEnvironmentRequest; import com.google.cloud.oracledatabase.v1.GetGoldengateDeploymentRequest; -import com.google.cloud.oracledatabase.v1.GetGoldengateDeploymentTypeRequest; -import com.google.cloud.oracledatabase.v1.GetGoldengateDeploymentVersionRequest; import com.google.cloud.oracledatabase.v1.GetOdbNetworkRequest; import com.google.cloud.oracledatabase.v1.GetOdbSubnetRequest; import com.google.cloud.oracledatabase.v1.GetPluggableDatabaseRequest; @@ -564,31 +560,21 @@ public class OracleDatabaseStubSettings extends StubSettings deleteGoldengateConnectionOperationSettings; - private final UnaryCallSettings< - GetGoldengateDeploymentVersionRequest, GoldengateDeploymentVersion> - getGoldengateDeploymentVersionSettings; private final PagedCallSettings< ListGoldengateDeploymentVersionsRequest, ListGoldengateDeploymentVersionsResponse, ListGoldengateDeploymentVersionsPagedResponse> listGoldengateDeploymentVersionsSettings; - private final UnaryCallSettings - getGoldengateDeploymentTypeSettings; private final PagedCallSettings< ListGoldengateDeploymentTypesRequest, ListGoldengateDeploymentTypesResponse, ListGoldengateDeploymentTypesPagedResponse> listGoldengateDeploymentTypesSettings; - private final UnaryCallSettings< - GetGoldengateDeploymentEnvironmentRequest, GoldengateDeploymentEnvironment> - getGoldengateDeploymentEnvironmentSettings; private final PagedCallSettings< ListGoldengateDeploymentEnvironmentsRequest, ListGoldengateDeploymentEnvironmentsResponse, ListGoldengateDeploymentEnvironmentsPagedResponse> listGoldengateDeploymentEnvironmentsSettings; - private final UnaryCallSettings - getGoldengateConnectionTypeSettings; private final PagedCallSettings< ListGoldengateConnectionTypesRequest, ListGoldengateConnectionTypesResponse, @@ -3234,12 +3220,6 @@ public UnaryCallSettings deleteDbSystemSetting return deleteGoldengateConnectionOperationSettings; } - /** Returns the object with the settings used for calls to getGoldengateDeploymentVersion. */ - public UnaryCallSettings - getGoldengateDeploymentVersionSettings() { - return getGoldengateDeploymentVersionSettings; - } - /** Returns the object with the settings used for calls to listGoldengateDeploymentVersions. */ public PagedCallSettings< ListGoldengateDeploymentVersionsRequest, @@ -3249,12 +3229,6 @@ public UnaryCallSettings deleteDbSystemSetting return listGoldengateDeploymentVersionsSettings; } - /** Returns the object with the settings used for calls to getGoldengateDeploymentType. */ - public UnaryCallSettings - getGoldengateDeploymentTypeSettings() { - return getGoldengateDeploymentTypeSettings; - } - /** Returns the object with the settings used for calls to listGoldengateDeploymentTypes. */ public PagedCallSettings< ListGoldengateDeploymentTypesRequest, @@ -3264,13 +3238,6 @@ public UnaryCallSettings deleteDbSystemSetting return listGoldengateDeploymentTypesSettings; } - /** Returns the object with the settings used for calls to getGoldengateDeploymentEnvironment. */ - public UnaryCallSettings< - GetGoldengateDeploymentEnvironmentRequest, GoldengateDeploymentEnvironment> - getGoldengateDeploymentEnvironmentSettings() { - return getGoldengateDeploymentEnvironmentSettings; - } - /** * Returns the object with the settings used for calls to listGoldengateDeploymentEnvironments. */ @@ -3282,12 +3249,6 @@ public UnaryCallSettings deleteDbSystemSetting return listGoldengateDeploymentEnvironmentsSettings; } - /** Returns the object with the settings used for calls to getGoldengateConnectionType. */ - public UnaryCallSettings - getGoldengateConnectionTypeSettings() { - return getGoldengateConnectionTypeSettings; - } - /** Returns the object with the settings used for calls to listGoldengateConnectionTypes. */ public PagedCallSettings< ListGoldengateConnectionTypesRequest, @@ -3633,20 +3594,12 @@ protected OracleDatabaseStubSettings(Builder settingsBuilder) throws IOException settingsBuilder.deleteGoldengateConnectionSettings().build(); deleteGoldengateConnectionOperationSettings = settingsBuilder.deleteGoldengateConnectionOperationSettings().build(); - getGoldengateDeploymentVersionSettings = - settingsBuilder.getGoldengateDeploymentVersionSettings().build(); listGoldengateDeploymentVersionsSettings = settingsBuilder.listGoldengateDeploymentVersionsSettings().build(); - getGoldengateDeploymentTypeSettings = - settingsBuilder.getGoldengateDeploymentTypeSettings().build(); listGoldengateDeploymentTypesSettings = settingsBuilder.listGoldengateDeploymentTypesSettings().build(); - getGoldengateDeploymentEnvironmentSettings = - settingsBuilder.getGoldengateDeploymentEnvironmentSettings().build(); listGoldengateDeploymentEnvironmentsSettings = settingsBuilder.listGoldengateDeploymentEnvironmentsSettings().build(); - getGoldengateConnectionTypeSettings = - settingsBuilder.getGoldengateConnectionTypeSettings().build(); listGoldengateConnectionTypesSettings = settingsBuilder.listGoldengateConnectionTypesSettings().build(); listDbVersionsSettings = settingsBuilder.listDbVersionsSettings().build(); @@ -3947,33 +3900,21 @@ public static class Builder extends StubSettings.Builder deleteGoldengateConnectionOperationSettings; - private final UnaryCallSettings.Builder< - GetGoldengateDeploymentVersionRequest, GoldengateDeploymentVersion> - getGoldengateDeploymentVersionSettings; private final PagedCallSettings.Builder< ListGoldengateDeploymentVersionsRequest, ListGoldengateDeploymentVersionsResponse, ListGoldengateDeploymentVersionsPagedResponse> listGoldengateDeploymentVersionsSettings; - private final UnaryCallSettings.Builder< - GetGoldengateDeploymentTypeRequest, GoldengateDeploymentType> - getGoldengateDeploymentTypeSettings; private final PagedCallSettings.Builder< ListGoldengateDeploymentTypesRequest, ListGoldengateDeploymentTypesResponse, ListGoldengateDeploymentTypesPagedResponse> listGoldengateDeploymentTypesSettings; - private final UnaryCallSettings.Builder< - GetGoldengateDeploymentEnvironmentRequest, GoldengateDeploymentEnvironment> - getGoldengateDeploymentEnvironmentSettings; private final PagedCallSettings.Builder< ListGoldengateDeploymentEnvironmentsRequest, ListGoldengateDeploymentEnvironmentsResponse, ListGoldengateDeploymentEnvironmentsPagedResponse> listGoldengateDeploymentEnvironmentsSettings; - private final UnaryCallSettings.Builder< - GetGoldengateConnectionTypeRequest, GoldengateConnectionType> - getGoldengateConnectionTypeSettings; private final PagedCallSettings.Builder< ListGoldengateConnectionTypesRequest, ListGoldengateConnectionTypesResponse, @@ -4174,16 +4115,12 @@ protected Builder(ClientContext clientContext) { createGoldengateConnectionOperationSettings = OperationCallSettings.newBuilder(); deleteGoldengateConnectionSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); deleteGoldengateConnectionOperationSettings = OperationCallSettings.newBuilder(); - getGoldengateDeploymentVersionSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); listGoldengateDeploymentVersionsSettings = PagedCallSettings.newBuilder(LIST_GOLDENGATE_DEPLOYMENT_VERSIONS_PAGE_STR_FACT); - getGoldengateDeploymentTypeSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); listGoldengateDeploymentTypesSettings = PagedCallSettings.newBuilder(LIST_GOLDENGATE_DEPLOYMENT_TYPES_PAGE_STR_FACT); - getGoldengateDeploymentEnvironmentSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); listGoldengateDeploymentEnvironmentsSettings = PagedCallSettings.newBuilder(LIST_GOLDENGATE_DEPLOYMENT_ENVIRONMENTS_PAGE_STR_FACT); - getGoldengateConnectionTypeSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); listGoldengateConnectionTypesSettings = PagedCallSettings.newBuilder(LIST_GOLDENGATE_CONNECTION_TYPES_PAGE_STR_FACT); listDbVersionsSettings = PagedCallSettings.newBuilder(LIST_DB_VERSIONS_PAGE_STR_FACT); @@ -4270,13 +4207,9 @@ protected Builder(ClientContext clientContext) { getGoldengateConnectionSettings, createGoldengateConnectionSettings, deleteGoldengateConnectionSettings, - getGoldengateDeploymentVersionSettings, listGoldengateDeploymentVersionsSettings, - getGoldengateDeploymentTypeSettings, listGoldengateDeploymentTypesSettings, - getGoldengateDeploymentEnvironmentSettings, listGoldengateDeploymentEnvironmentsSettings, - getGoldengateConnectionTypeSettings, listGoldengateConnectionTypesSettings, listDbVersionsSettings, listDatabaseCharacterSetsSettings, @@ -4428,20 +4361,12 @@ protected Builder(OracleDatabaseStubSettings settings) { deleteGoldengateConnectionSettings = settings.deleteGoldengateConnectionSettings.toBuilder(); deleteGoldengateConnectionOperationSettings = settings.deleteGoldengateConnectionOperationSettings.toBuilder(); - getGoldengateDeploymentVersionSettings = - settings.getGoldengateDeploymentVersionSettings.toBuilder(); listGoldengateDeploymentVersionsSettings = settings.listGoldengateDeploymentVersionsSettings.toBuilder(); - getGoldengateDeploymentTypeSettings = - settings.getGoldengateDeploymentTypeSettings.toBuilder(); listGoldengateDeploymentTypesSettings = settings.listGoldengateDeploymentTypesSettings.toBuilder(); - getGoldengateDeploymentEnvironmentSettings = - settings.getGoldengateDeploymentEnvironmentSettings.toBuilder(); listGoldengateDeploymentEnvironmentsSettings = settings.listGoldengateDeploymentEnvironmentsSettings.toBuilder(); - getGoldengateConnectionTypeSettings = - settings.getGoldengateConnectionTypeSettings.toBuilder(); listGoldengateConnectionTypesSettings = settings.listGoldengateConnectionTypesSettings.toBuilder(); listDbVersionsSettings = settings.listDbVersionsSettings.toBuilder(); @@ -4531,13 +4456,9 @@ protected Builder(OracleDatabaseStubSettings settings) { getGoldengateConnectionSettings, createGoldengateConnectionSettings, deleteGoldengateConnectionSettings, - getGoldengateDeploymentVersionSettings, listGoldengateDeploymentVersionsSettings, - getGoldengateDeploymentTypeSettings, listGoldengateDeploymentTypesSettings, - getGoldengateDeploymentEnvironmentSettings, listGoldengateDeploymentEnvironmentsSettings, - getGoldengateConnectionTypeSettings, listGoldengateConnectionTypesSettings, listDbVersionsSettings, listDatabaseCharacterSetsSettings, @@ -4905,41 +4826,21 @@ private static Builder initDefaults(Builder builder) { .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); - builder - .getGoldengateDeploymentVersionSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); - builder .listGoldengateDeploymentVersionsSettings() .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); - builder - .getGoldengateDeploymentTypeSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); - builder .listGoldengateDeploymentTypesSettings() .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); - builder - .getGoldengateDeploymentEnvironmentSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); - builder .listGoldengateDeploymentEnvironmentsSettings() .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); - builder - .getGoldengateConnectionTypeSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); - builder .listGoldengateConnectionTypesSettings() .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) @@ -6468,13 +6369,6 @@ public UnaryCallSettings.Builder deleteDbSyste return deleteGoldengateConnectionOperationSettings; } - /** Returns the builder for the settings used for calls to getGoldengateDeploymentVersion. */ - public UnaryCallSettings.Builder< - GetGoldengateDeploymentVersionRequest, GoldengateDeploymentVersion> - getGoldengateDeploymentVersionSettings() { - return getGoldengateDeploymentVersionSettings; - } - /** Returns the builder for the settings used for calls to listGoldengateDeploymentVersions. */ public PagedCallSettings.Builder< ListGoldengateDeploymentVersionsRequest, @@ -6484,12 +6378,6 @@ public UnaryCallSettings.Builder deleteDbSyste return listGoldengateDeploymentVersionsSettings; } - /** Returns the builder for the settings used for calls to getGoldengateDeploymentType. */ - public UnaryCallSettings.Builder - getGoldengateDeploymentTypeSettings() { - return getGoldengateDeploymentTypeSettings; - } - /** Returns the builder for the settings used for calls to listGoldengateDeploymentTypes. */ public PagedCallSettings.Builder< ListGoldengateDeploymentTypesRequest, @@ -6499,15 +6387,6 @@ public UnaryCallSettings.Builder deleteDbSyste return listGoldengateDeploymentTypesSettings; } - /** - * Returns the builder for the settings used for calls to getGoldengateDeploymentEnvironment. - */ - public UnaryCallSettings.Builder< - GetGoldengateDeploymentEnvironmentRequest, GoldengateDeploymentEnvironment> - getGoldengateDeploymentEnvironmentSettings() { - return getGoldengateDeploymentEnvironmentSettings; - } - /** * Returns the builder for the settings used for calls to listGoldengateDeploymentEnvironments. */ @@ -6519,12 +6398,6 @@ public UnaryCallSettings.Builder deleteDbSyste return listGoldengateDeploymentEnvironmentsSettings; } - /** Returns the builder for the settings used for calls to getGoldengateConnectionType. */ - public UnaryCallSettings.Builder - getGoldengateConnectionTypeSettings() { - return getGoldengateConnectionTypeSettings; - } - /** Returns the builder for the settings used for calls to listGoldengateConnectionTypes. */ public PagedCallSettings.Builder< ListGoldengateConnectionTypesRequest, diff --git a/java-oracledatabase/google-cloud-oracledatabase/src/main/resources/META-INF/native-image/com.google.cloud.oracledatabase.v1/reflect-config.json b/java-oracledatabase/google-cloud-oracledatabase/src/main/resources/META-INF/native-image/com.google.cloud.oracledatabase.v1/reflect-config.json index 09b62a41d461..c910977dd7f2 100644 --- a/java-oracledatabase/google-cloud-oracledatabase/src/main/resources/META-INF/native-image/com.google.cloud.oracledatabase.v1/reflect-config.json +++ b/java-oracledatabase/google-cloud-oracledatabase/src/main/resources/META-INF/native-image/com.google.cloud.oracledatabase.v1/reflect-config.json @@ -2618,42 +2618,6 @@ "allDeclaredClasses": true, "allPublicClasses": true }, - { - "name": "com.google.cloud.oracledatabase.v1.GetGoldengateConnectionTypeRequest", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.oracledatabase.v1.GetGoldengateConnectionTypeRequest$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.oracledatabase.v1.GetGoldengateDeploymentEnvironmentRequest", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.oracledatabase.v1.GetGoldengateDeploymentEnvironmentRequest$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, { "name": "com.google.cloud.oracledatabase.v1.GetGoldengateDeploymentRequest", "queryAllDeclaredConstructors": true, @@ -2672,42 +2636,6 @@ "allDeclaredClasses": true, "allPublicClasses": true }, - { - "name": "com.google.cloud.oracledatabase.v1.GetGoldengateDeploymentTypeRequest", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.oracledatabase.v1.GetGoldengateDeploymentTypeRequest$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.oracledatabase.v1.GetGoldengateDeploymentVersionRequest", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.cloud.oracledatabase.v1.GetGoldengateDeploymentVersionRequest$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, { "name": "com.google.cloud.oracledatabase.v1.GetOdbNetworkRequest", "queryAllDeclaredConstructors": true, diff --git a/java-oracledatabase/google-cloud-oracledatabase/src/test/java/com/google/cloud/oracledatabase/v1/MockOracleDatabaseImpl.java b/java-oracledatabase/google-cloud-oracledatabase/src/test/java/com/google/cloud/oracledatabase/v1/MockOracleDatabaseImpl.java index 48727f874b20..90a35e28cda9 100644 --- a/java-oracledatabase/google-cloud-oracledatabase/src/test/java/com/google/cloud/oracledatabase/v1/MockOracleDatabaseImpl.java +++ b/java-oracledatabase/google-cloud-oracledatabase/src/test/java/com/google/cloud/oracledatabase/v1/MockOracleDatabaseImpl.java @@ -1505,29 +1505,6 @@ public void deleteGoldengateConnection( } } - @Override - public void getGoldengateDeploymentVersion( - GetGoldengateDeploymentVersionRequest request, - StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof GoldengateDeploymentVersion) { - requests.add(request); - responseObserver.onNext(((GoldengateDeploymentVersion) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method GetGoldengateDeploymentVersion," - + " expected %s or %s", - response == null ? "null" : response.getClass().getName(), - GoldengateDeploymentVersion.class.getName(), - Exception.class.getName()))); - } - } - @Override public void listGoldengateDeploymentVersions( ListGoldengateDeploymentVersionsRequest request, @@ -1551,29 +1528,6 @@ public void listGoldengateDeploymentVersions( } } - @Override - public void getGoldengateDeploymentType( - GetGoldengateDeploymentTypeRequest request, - StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof GoldengateDeploymentType) { - requests.add(request); - responseObserver.onNext(((GoldengateDeploymentType) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method GetGoldengateDeploymentType, expected" - + " %s or %s", - response == null ? "null" : response.getClass().getName(), - GoldengateDeploymentType.class.getName(), - Exception.class.getName()))); - } - } - @Override public void listGoldengateDeploymentTypes( ListGoldengateDeploymentTypesRequest request, @@ -1597,29 +1551,6 @@ public void listGoldengateDeploymentTypes( } } - @Override - public void getGoldengateDeploymentEnvironment( - GetGoldengateDeploymentEnvironmentRequest request, - StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof GoldengateDeploymentEnvironment) { - requests.add(request); - responseObserver.onNext(((GoldengateDeploymentEnvironment) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method GetGoldengateDeploymentEnvironment," - + " expected %s or %s", - response == null ? "null" : response.getClass().getName(), - GoldengateDeploymentEnvironment.class.getName(), - Exception.class.getName()))); - } - } - @Override public void listGoldengateDeploymentEnvironments( ListGoldengateDeploymentEnvironmentsRequest request, @@ -1643,29 +1574,6 @@ public void listGoldengateDeploymentEnvironments( } } - @Override - public void getGoldengateConnectionType( - GetGoldengateConnectionTypeRequest request, - StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof GoldengateConnectionType) { - requests.add(request); - responseObserver.onNext(((GoldengateConnectionType) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method GetGoldengateConnectionType, expected" - + " %s or %s", - response == null ? "null" : response.getClass().getName(), - GoldengateConnectionType.class.getName(), - Exception.class.getName()))); - } - } - @Override public void listGoldengateConnectionTypes( ListGoldengateConnectionTypesRequest request, diff --git a/java-oracledatabase/google-cloud-oracledatabase/src/test/java/com/google/cloud/oracledatabase/v1/OracleDatabaseClientHttpJsonTest.java b/java-oracledatabase/google-cloud-oracledatabase/src/test/java/com/google/cloud/oracledatabase/v1/OracleDatabaseClientHttpJsonTest.java index 471a8f4be4ca..7d4f200f4821 100644 --- a/java-oracledatabase/google-cloud-oracledatabase/src/test/java/com/google/cloud/oracledatabase/v1/OracleDatabaseClientHttpJsonTest.java +++ b/java-oracledatabase/google-cloud-oracledatabase/src/test/java/com/google/cloud/oracledatabase/v1/OracleDatabaseClientHttpJsonTest.java @@ -7946,110 +7946,6 @@ public void deleteGoldengateConnectionExceptionTest2() throws Exception { } } - @Test - public void getGoldengateDeploymentVersionTest() throws Exception { - GoldengateDeploymentVersion expectedResponse = - GoldengateDeploymentVersion.newBuilder() - .setName( - GoldengateDeploymentVersionName.of( - "[PROJECT]", "[LOCATION]", "[GOLDENGATE_DEPLOYMENT_VERSION]") - .toString()) - .setOcid("ocid3405295") - .setProperties(GoldengateDeploymentVersionProperties.newBuilder().build()) - .build(); - mockService.addResponse(expectedResponse); - - GoldengateDeploymentVersionName name = - GoldengateDeploymentVersionName.of( - "[PROJECT]", "[LOCATION]", "[GOLDENGATE_DEPLOYMENT_VERSION]"); - - GoldengateDeploymentVersion actualResponse = client.getGoldengateDeploymentVersion(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void getGoldengateDeploymentVersionExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - GoldengateDeploymentVersionName name = - GoldengateDeploymentVersionName.of( - "[PROJECT]", "[LOCATION]", "[GOLDENGATE_DEPLOYMENT_VERSION]"); - client.getGoldengateDeploymentVersion(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getGoldengateDeploymentVersionTest2() throws Exception { - GoldengateDeploymentVersion expectedResponse = - GoldengateDeploymentVersion.newBuilder() - .setName( - GoldengateDeploymentVersionName.of( - "[PROJECT]", "[LOCATION]", "[GOLDENGATE_DEPLOYMENT_VERSION]") - .toString()) - .setOcid("ocid3405295") - .setProperties(GoldengateDeploymentVersionProperties.newBuilder().build()) - .build(); - mockService.addResponse(expectedResponse); - - String name = - "projects/project-820/locations/location-820/goldengateDeploymentVersions/goldengateDeploymentVersion-820"; - - GoldengateDeploymentVersion actualResponse = client.getGoldengateDeploymentVersion(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void getGoldengateDeploymentVersionExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String name = - "projects/project-820/locations/location-820/goldengateDeploymentVersions/goldengateDeploymentVersion-820"; - client.getGoldengateDeploymentVersion(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - @Test public void listGoldengateDeploymentVersionsTest() throws Exception { GoldengateDeploymentVersion responsesElement = GoldengateDeploymentVersion.newBuilder().build(); @@ -8156,121 +8052,6 @@ public void listGoldengateDeploymentVersionsExceptionTest2() throws Exception { } } - @Test - public void getGoldengateDeploymentTypeTest() throws Exception { - GoldengateDeploymentType expectedResponse = - GoldengateDeploymentType.newBuilder() - .setName( - GoldengateDeploymentTypeName.of( - "[PROJECT]", "[LOCATION]", "[GOLDENGATE_DEPLOYMENT_TYPE]") - .toString()) - .addAllConnectionTypes(new ArrayList()) - .setDisplayName("displayName1714148973") - .setOggVersion("oggVersion-685279159") - .addAllSourceTechnologies(new ArrayList()) - .addAllSupportedCapabilities(new ArrayList()) - .setSupportedTechnologiesUrl("supportedTechnologiesUrl-159890473") - .addAllTargetTechnologies(new ArrayList()) - .setDefaultUsername("defaultUsername1732375095") - .build(); - mockService.addResponse(expectedResponse); - - GoldengateDeploymentTypeName name = - GoldengateDeploymentTypeName.of("[PROJECT]", "[LOCATION]", "[GOLDENGATE_DEPLOYMENT_TYPE]"); - - GoldengateDeploymentType actualResponse = client.getGoldengateDeploymentType(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void getGoldengateDeploymentTypeExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - GoldengateDeploymentTypeName name = - GoldengateDeploymentTypeName.of( - "[PROJECT]", "[LOCATION]", "[GOLDENGATE_DEPLOYMENT_TYPE]"); - client.getGoldengateDeploymentType(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getGoldengateDeploymentTypeTest2() throws Exception { - GoldengateDeploymentType expectedResponse = - GoldengateDeploymentType.newBuilder() - .setName( - GoldengateDeploymentTypeName.of( - "[PROJECT]", "[LOCATION]", "[GOLDENGATE_DEPLOYMENT_TYPE]") - .toString()) - .addAllConnectionTypes(new ArrayList()) - .setDisplayName("displayName1714148973") - .setOggVersion("oggVersion-685279159") - .addAllSourceTechnologies(new ArrayList()) - .addAllSupportedCapabilities(new ArrayList()) - .setSupportedTechnologiesUrl("supportedTechnologiesUrl-159890473") - .addAllTargetTechnologies(new ArrayList()) - .setDefaultUsername("defaultUsername1732375095") - .build(); - mockService.addResponse(expectedResponse); - - String name = - "projects/project-4950/locations/location-4950/goldengateDeploymentTypes/goldengateDeploymentType-4950"; - - GoldengateDeploymentType actualResponse = client.getGoldengateDeploymentType(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void getGoldengateDeploymentTypeExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String name = - "projects/project-4950/locations/location-4950/goldengateDeploymentTypes/goldengateDeploymentType-4950"; - client.getGoldengateDeploymentType(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - @Test public void listGoldengateDeploymentTypesTest() throws Exception { GoldengateDeploymentType responsesElement = GoldengateDeploymentType.newBuilder().build(); @@ -8375,124 +8156,6 @@ public void listGoldengateDeploymentTypesExceptionTest2() throws Exception { } } - @Test - public void getGoldengateDeploymentEnvironmentTest() throws Exception { - GoldengateDeploymentEnvironment expectedResponse = - GoldengateDeploymentEnvironment.newBuilder() - .setName( - GoldengateDeploymentEnvironmentName.of( - "[PROJECT]", "[LOCATION]", "[GOLDENGATE_DEPLOYMENT_ENVIRONMENT]") - .toString()) - .setDisplayName("displayName1714148973") - .setDefaultCpuCoreCount(731109668) - .setAutoScalingEnabled(true) - .setMaxCpuCoreCount(1499430817) - .setMemoryGbPerCpuCore(-1825740194) - .setMinCpuCoreCount(251380979) - .setNetworkBandwidthGbpsPerCpuCore(-1374535526) - .setStorageUsageLimitGbPerCpuCore(-1737003722) - .build(); - mockService.addResponse(expectedResponse); - - GoldengateDeploymentEnvironmentName name = - GoldengateDeploymentEnvironmentName.of( - "[PROJECT]", "[LOCATION]", "[GOLDENGATE_DEPLOYMENT_ENVIRONMENT]"); - - GoldengateDeploymentEnvironment actualResponse = - client.getGoldengateDeploymentEnvironment(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void getGoldengateDeploymentEnvironmentExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - GoldengateDeploymentEnvironmentName name = - GoldengateDeploymentEnvironmentName.of( - "[PROJECT]", "[LOCATION]", "[GOLDENGATE_DEPLOYMENT_ENVIRONMENT]"); - client.getGoldengateDeploymentEnvironment(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getGoldengateDeploymentEnvironmentTest2() throws Exception { - GoldengateDeploymentEnvironment expectedResponse = - GoldengateDeploymentEnvironment.newBuilder() - .setName( - GoldengateDeploymentEnvironmentName.of( - "[PROJECT]", "[LOCATION]", "[GOLDENGATE_DEPLOYMENT_ENVIRONMENT]") - .toString()) - .setDisplayName("displayName1714148973") - .setDefaultCpuCoreCount(731109668) - .setAutoScalingEnabled(true) - .setMaxCpuCoreCount(1499430817) - .setMemoryGbPerCpuCore(-1825740194) - .setMinCpuCoreCount(251380979) - .setNetworkBandwidthGbpsPerCpuCore(-1374535526) - .setStorageUsageLimitGbPerCpuCore(-1737003722) - .build(); - mockService.addResponse(expectedResponse); - - String name = - "projects/project-1463/locations/location-1463/goldengateDeploymentEnvironments/goldengateDeploymentEnvironment-1463"; - - GoldengateDeploymentEnvironment actualResponse = - client.getGoldengateDeploymentEnvironment(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void getGoldengateDeploymentEnvironmentExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String name = - "projects/project-1463/locations/location-1463/goldengateDeploymentEnvironments/goldengateDeploymentEnvironment-1463"; - client.getGoldengateDeploymentEnvironment(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - @Test public void listGoldengateDeploymentEnvironmentsTest() throws Exception { GoldengateDeploymentEnvironment responsesElement = @@ -8601,107 +8264,6 @@ public void listGoldengateDeploymentEnvironmentsExceptionTest2() throws Exceptio } } - @Test - public void getGoldengateConnectionTypeTest() throws Exception { - GoldengateConnectionType expectedResponse = - GoldengateConnectionType.newBuilder() - .setName( - GoldengateConnectionTypeName.of( - "[PROJECT]", "[LOCATION]", "[GOLDENGATE_CONNECTION_TYPE]") - .toString()) - .addAllTechnologyTypes(new ArrayList()) - .build(); - mockService.addResponse(expectedResponse); - - GoldengateConnectionTypeName name = - GoldengateConnectionTypeName.of("[PROJECT]", "[LOCATION]", "[GOLDENGATE_CONNECTION_TYPE]"); - - GoldengateConnectionType actualResponse = client.getGoldengateConnectionType(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void getGoldengateConnectionTypeExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - GoldengateConnectionTypeName name = - GoldengateConnectionTypeName.of( - "[PROJECT]", "[LOCATION]", "[GOLDENGATE_CONNECTION_TYPE]"); - client.getGoldengateConnectionType(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getGoldengateConnectionTypeTest2() throws Exception { - GoldengateConnectionType expectedResponse = - GoldengateConnectionType.newBuilder() - .setName( - GoldengateConnectionTypeName.of( - "[PROJECT]", "[LOCATION]", "[GOLDENGATE_CONNECTION_TYPE]") - .toString()) - .addAllTechnologyTypes(new ArrayList()) - .build(); - mockService.addResponse(expectedResponse); - - String name = - "projects/project-8771/locations/location-8771/goldengateConnectionTypes/goldengateConnectionType-8771"; - - GoldengateConnectionType actualResponse = client.getGoldengateConnectionType(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void getGoldengateConnectionTypeExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String name = - "projects/project-8771/locations/location-8771/goldengateConnectionTypes/goldengateConnectionType-8771"; - client.getGoldengateConnectionType(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - @Test public void listGoldengateConnectionTypesTest() throws Exception { GoldengateConnectionType responsesElement = GoldengateConnectionType.newBuilder().build(); diff --git a/java-oracledatabase/google-cloud-oracledatabase/src/test/java/com/google/cloud/oracledatabase/v1/OracleDatabaseClientTest.java b/java-oracledatabase/google-cloud-oracledatabase/src/test/java/com/google/cloud/oracledatabase/v1/OracleDatabaseClientTest.java index 1d2451deddb1..866c29d19bc9 100644 --- a/java-oracledatabase/google-cloud-oracledatabase/src/test/java/com/google/cloud/oracledatabase/v1/OracleDatabaseClientTest.java +++ b/java-oracledatabase/google-cloud-oracledatabase/src/test/java/com/google/cloud/oracledatabase/v1/OracleDatabaseClientTest.java @@ -7345,98 +7345,6 @@ public void deleteGoldengateConnectionExceptionTest2() throws Exception { } } - @Test - public void getGoldengateDeploymentVersionTest() throws Exception { - GoldengateDeploymentVersion expectedResponse = - GoldengateDeploymentVersion.newBuilder() - .setName( - GoldengateDeploymentVersionName.of( - "[PROJECT]", "[LOCATION]", "[GOLDENGATE_DEPLOYMENT_VERSION]") - .toString()) - .setOcid("ocid3405295") - .setProperties(GoldengateDeploymentVersionProperties.newBuilder().build()) - .build(); - mockOracleDatabase.addResponse(expectedResponse); - - GoldengateDeploymentVersionName name = - GoldengateDeploymentVersionName.of( - "[PROJECT]", "[LOCATION]", "[GOLDENGATE_DEPLOYMENT_VERSION]"); - - GoldengateDeploymentVersion actualResponse = client.getGoldengateDeploymentVersion(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockOracleDatabase.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - GetGoldengateDeploymentVersionRequest actualRequest = - ((GetGoldengateDeploymentVersionRequest) actualRequests.get(0)); - - Assert.assertEquals(name.toString(), actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void getGoldengateDeploymentVersionExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockOracleDatabase.addException(exception); - - try { - GoldengateDeploymentVersionName name = - GoldengateDeploymentVersionName.of( - "[PROJECT]", "[LOCATION]", "[GOLDENGATE_DEPLOYMENT_VERSION]"); - client.getGoldengateDeploymentVersion(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getGoldengateDeploymentVersionTest2() throws Exception { - GoldengateDeploymentVersion expectedResponse = - GoldengateDeploymentVersion.newBuilder() - .setName( - GoldengateDeploymentVersionName.of( - "[PROJECT]", "[LOCATION]", "[GOLDENGATE_DEPLOYMENT_VERSION]") - .toString()) - .setOcid("ocid3405295") - .setProperties(GoldengateDeploymentVersionProperties.newBuilder().build()) - .build(); - mockOracleDatabase.addResponse(expectedResponse); - - String name = "name3373707"; - - GoldengateDeploymentVersion actualResponse = client.getGoldengateDeploymentVersion(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockOracleDatabase.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - GetGoldengateDeploymentVersionRequest actualRequest = - ((GetGoldengateDeploymentVersionRequest) actualRequests.get(0)); - - Assert.assertEquals(name, actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void getGoldengateDeploymentVersionExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockOracleDatabase.addException(exception); - - try { - String name = "name3373707"; - client.getGoldengateDeploymentVersion(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - @Test public void listGoldengateDeploymentVersionsTest() throws Exception { GoldengateDeploymentVersion responsesElement = GoldengateDeploymentVersion.newBuilder().build(); @@ -7533,109 +7441,6 @@ public void listGoldengateDeploymentVersionsExceptionTest2() throws Exception { } } - @Test - public void getGoldengateDeploymentTypeTest() throws Exception { - GoldengateDeploymentType expectedResponse = - GoldengateDeploymentType.newBuilder() - .setName( - GoldengateDeploymentTypeName.of( - "[PROJECT]", "[LOCATION]", "[GOLDENGATE_DEPLOYMENT_TYPE]") - .toString()) - .addAllConnectionTypes(new ArrayList()) - .setDisplayName("displayName1714148973") - .setOggVersion("oggVersion-685279159") - .addAllSourceTechnologies(new ArrayList()) - .addAllSupportedCapabilities(new ArrayList()) - .setSupportedTechnologiesUrl("supportedTechnologiesUrl-159890473") - .addAllTargetTechnologies(new ArrayList()) - .setDefaultUsername("defaultUsername1732375095") - .build(); - mockOracleDatabase.addResponse(expectedResponse); - - GoldengateDeploymentTypeName name = - GoldengateDeploymentTypeName.of("[PROJECT]", "[LOCATION]", "[GOLDENGATE_DEPLOYMENT_TYPE]"); - - GoldengateDeploymentType actualResponse = client.getGoldengateDeploymentType(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockOracleDatabase.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - GetGoldengateDeploymentTypeRequest actualRequest = - ((GetGoldengateDeploymentTypeRequest) actualRequests.get(0)); - - Assert.assertEquals(name.toString(), actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void getGoldengateDeploymentTypeExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockOracleDatabase.addException(exception); - - try { - GoldengateDeploymentTypeName name = - GoldengateDeploymentTypeName.of( - "[PROJECT]", "[LOCATION]", "[GOLDENGATE_DEPLOYMENT_TYPE]"); - client.getGoldengateDeploymentType(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getGoldengateDeploymentTypeTest2() throws Exception { - GoldengateDeploymentType expectedResponse = - GoldengateDeploymentType.newBuilder() - .setName( - GoldengateDeploymentTypeName.of( - "[PROJECT]", "[LOCATION]", "[GOLDENGATE_DEPLOYMENT_TYPE]") - .toString()) - .addAllConnectionTypes(new ArrayList()) - .setDisplayName("displayName1714148973") - .setOggVersion("oggVersion-685279159") - .addAllSourceTechnologies(new ArrayList()) - .addAllSupportedCapabilities(new ArrayList()) - .setSupportedTechnologiesUrl("supportedTechnologiesUrl-159890473") - .addAllTargetTechnologies(new ArrayList()) - .setDefaultUsername("defaultUsername1732375095") - .build(); - mockOracleDatabase.addResponse(expectedResponse); - - String name = "name3373707"; - - GoldengateDeploymentType actualResponse = client.getGoldengateDeploymentType(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockOracleDatabase.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - GetGoldengateDeploymentTypeRequest actualRequest = - ((GetGoldengateDeploymentTypeRequest) actualRequests.get(0)); - - Assert.assertEquals(name, actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void getGoldengateDeploymentTypeExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockOracleDatabase.addException(exception); - - try { - String name = "name3373707"; - client.getGoldengateDeploymentType(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - @Test public void listGoldengateDeploymentTypesTest() throws Exception { GoldengateDeploymentType responsesElement = GoldengateDeploymentType.newBuilder().build(); @@ -7730,112 +7535,6 @@ public void listGoldengateDeploymentTypesExceptionTest2() throws Exception { } } - @Test - public void getGoldengateDeploymentEnvironmentTest() throws Exception { - GoldengateDeploymentEnvironment expectedResponse = - GoldengateDeploymentEnvironment.newBuilder() - .setName( - GoldengateDeploymentEnvironmentName.of( - "[PROJECT]", "[LOCATION]", "[GOLDENGATE_DEPLOYMENT_ENVIRONMENT]") - .toString()) - .setDisplayName("displayName1714148973") - .setDefaultCpuCoreCount(731109668) - .setAutoScalingEnabled(true) - .setMaxCpuCoreCount(1499430817) - .setMemoryGbPerCpuCore(-1825740194) - .setMinCpuCoreCount(251380979) - .setNetworkBandwidthGbpsPerCpuCore(-1374535526) - .setStorageUsageLimitGbPerCpuCore(-1737003722) - .build(); - mockOracleDatabase.addResponse(expectedResponse); - - GoldengateDeploymentEnvironmentName name = - GoldengateDeploymentEnvironmentName.of( - "[PROJECT]", "[LOCATION]", "[GOLDENGATE_DEPLOYMENT_ENVIRONMENT]"); - - GoldengateDeploymentEnvironment actualResponse = - client.getGoldengateDeploymentEnvironment(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockOracleDatabase.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - GetGoldengateDeploymentEnvironmentRequest actualRequest = - ((GetGoldengateDeploymentEnvironmentRequest) actualRequests.get(0)); - - Assert.assertEquals(name.toString(), actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void getGoldengateDeploymentEnvironmentExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockOracleDatabase.addException(exception); - - try { - GoldengateDeploymentEnvironmentName name = - GoldengateDeploymentEnvironmentName.of( - "[PROJECT]", "[LOCATION]", "[GOLDENGATE_DEPLOYMENT_ENVIRONMENT]"); - client.getGoldengateDeploymentEnvironment(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getGoldengateDeploymentEnvironmentTest2() throws Exception { - GoldengateDeploymentEnvironment expectedResponse = - GoldengateDeploymentEnvironment.newBuilder() - .setName( - GoldengateDeploymentEnvironmentName.of( - "[PROJECT]", "[LOCATION]", "[GOLDENGATE_DEPLOYMENT_ENVIRONMENT]") - .toString()) - .setDisplayName("displayName1714148973") - .setDefaultCpuCoreCount(731109668) - .setAutoScalingEnabled(true) - .setMaxCpuCoreCount(1499430817) - .setMemoryGbPerCpuCore(-1825740194) - .setMinCpuCoreCount(251380979) - .setNetworkBandwidthGbpsPerCpuCore(-1374535526) - .setStorageUsageLimitGbPerCpuCore(-1737003722) - .build(); - mockOracleDatabase.addResponse(expectedResponse); - - String name = "name3373707"; - - GoldengateDeploymentEnvironment actualResponse = - client.getGoldengateDeploymentEnvironment(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockOracleDatabase.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - GetGoldengateDeploymentEnvironmentRequest actualRequest = - ((GetGoldengateDeploymentEnvironmentRequest) actualRequests.get(0)); - - Assert.assertEquals(name, actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void getGoldengateDeploymentEnvironmentExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockOracleDatabase.addException(exception); - - try { - String name = "name3373707"; - client.getGoldengateDeploymentEnvironment(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - @Test public void listGoldengateDeploymentEnvironmentsTest() throws Exception { GoldengateDeploymentEnvironment responsesElement = @@ -7934,95 +7633,6 @@ public void listGoldengateDeploymentEnvironmentsExceptionTest2() throws Exceptio } } - @Test - public void getGoldengateConnectionTypeTest() throws Exception { - GoldengateConnectionType expectedResponse = - GoldengateConnectionType.newBuilder() - .setName( - GoldengateConnectionTypeName.of( - "[PROJECT]", "[LOCATION]", "[GOLDENGATE_CONNECTION_TYPE]") - .toString()) - .addAllTechnologyTypes(new ArrayList()) - .build(); - mockOracleDatabase.addResponse(expectedResponse); - - GoldengateConnectionTypeName name = - GoldengateConnectionTypeName.of("[PROJECT]", "[LOCATION]", "[GOLDENGATE_CONNECTION_TYPE]"); - - GoldengateConnectionType actualResponse = client.getGoldengateConnectionType(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockOracleDatabase.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - GetGoldengateConnectionTypeRequest actualRequest = - ((GetGoldengateConnectionTypeRequest) actualRequests.get(0)); - - Assert.assertEquals(name.toString(), actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void getGoldengateConnectionTypeExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockOracleDatabase.addException(exception); - - try { - GoldengateConnectionTypeName name = - GoldengateConnectionTypeName.of( - "[PROJECT]", "[LOCATION]", "[GOLDENGATE_CONNECTION_TYPE]"); - client.getGoldengateConnectionType(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getGoldengateConnectionTypeTest2() throws Exception { - GoldengateConnectionType expectedResponse = - GoldengateConnectionType.newBuilder() - .setName( - GoldengateConnectionTypeName.of( - "[PROJECT]", "[LOCATION]", "[GOLDENGATE_CONNECTION_TYPE]") - .toString()) - .addAllTechnologyTypes(new ArrayList()) - .build(); - mockOracleDatabase.addResponse(expectedResponse); - - String name = "name3373707"; - - GoldengateConnectionType actualResponse = client.getGoldengateConnectionType(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockOracleDatabase.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - GetGoldengateConnectionTypeRequest actualRequest = - ((GetGoldengateConnectionTypeRequest) actualRequests.get(0)); - - Assert.assertEquals(name, actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void getGoldengateConnectionTypeExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockOracleDatabase.addException(exception); - - try { - String name = "name3373707"; - client.getGoldengateConnectionType(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - @Test public void listGoldengateConnectionTypesTest() throws Exception { GoldengateConnectionType responsesElement = GoldengateConnectionType.newBuilder().build(); diff --git a/java-oracledatabase/grpc-google-cloud-oracledatabase-v1/src/main/java/com/google/cloud/oracledatabase/v1/OracleDatabaseGrpc.java b/java-oracledatabase/grpc-google-cloud-oracledatabase-v1/src/main/java/com/google/cloud/oracledatabase/v1/OracleDatabaseGrpc.java index d9e38bad2d32..6de5205f72cc 100644 --- a/java-oracledatabase/grpc-google-cloud-oracledatabase-v1/src/main/java/com/google/cloud/oracledatabase/v1/OracleDatabaseGrpc.java +++ b/java-oracledatabase/grpc-google-cloud-oracledatabase-v1/src/main/java/com/google/cloud/oracledatabase/v1/OracleDatabaseGrpc.java @@ -3308,59 +3308,6 @@ private OracleDatabaseGrpc() {} return getDeleteGoldengateConnectionMethod; } - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.oracledatabase.v1.GetGoldengateDeploymentVersionRequest, - com.google.cloud.oracledatabase.v1.GoldengateDeploymentVersion> - getGetGoldengateDeploymentVersionMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "GetGoldengateDeploymentVersion", - requestType = com.google.cloud.oracledatabase.v1.GetGoldengateDeploymentVersionRequest.class, - responseType = com.google.cloud.oracledatabase.v1.GoldengateDeploymentVersion.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.oracledatabase.v1.GetGoldengateDeploymentVersionRequest, - com.google.cloud.oracledatabase.v1.GoldengateDeploymentVersion> - getGetGoldengateDeploymentVersionMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.oracledatabase.v1.GetGoldengateDeploymentVersionRequest, - com.google.cloud.oracledatabase.v1.GoldengateDeploymentVersion> - getGetGoldengateDeploymentVersionMethod; - if ((getGetGoldengateDeploymentVersionMethod = - OracleDatabaseGrpc.getGetGoldengateDeploymentVersionMethod) - == null) { - synchronized (OracleDatabaseGrpc.class) { - if ((getGetGoldengateDeploymentVersionMethod = - OracleDatabaseGrpc.getGetGoldengateDeploymentVersionMethod) - == null) { - OracleDatabaseGrpc.getGetGoldengateDeploymentVersionMethod = - getGetGoldengateDeploymentVersionMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - generateFullMethodName(SERVICE_NAME, "GetGoldengateDeploymentVersion")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.oracledatabase.v1 - .GetGoldengateDeploymentVersionRequest.getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.oracledatabase.v1.GoldengateDeploymentVersion - .getDefaultInstance())) - .setSchemaDescriptor( - new OracleDatabaseMethodDescriptorSupplier( - "GetGoldengateDeploymentVersion")) - .build(); - } - } - } - return getGetGoldengateDeploymentVersionMethod; - } - private static volatile io.grpc.MethodDescriptor< com.google.cloud.oracledatabase.v1.ListGoldengateDeploymentVersionsRequest, com.google.cloud.oracledatabase.v1.ListGoldengateDeploymentVersionsResponse> @@ -3417,58 +3364,6 @@ private OracleDatabaseGrpc() {} return getListGoldengateDeploymentVersionsMethod; } - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.oracledatabase.v1.GetGoldengateDeploymentTypeRequest, - com.google.cloud.oracledatabase.v1.GoldengateDeploymentType> - getGetGoldengateDeploymentTypeMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "GetGoldengateDeploymentType", - requestType = com.google.cloud.oracledatabase.v1.GetGoldengateDeploymentTypeRequest.class, - responseType = com.google.cloud.oracledatabase.v1.GoldengateDeploymentType.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.oracledatabase.v1.GetGoldengateDeploymentTypeRequest, - com.google.cloud.oracledatabase.v1.GoldengateDeploymentType> - getGetGoldengateDeploymentTypeMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.oracledatabase.v1.GetGoldengateDeploymentTypeRequest, - com.google.cloud.oracledatabase.v1.GoldengateDeploymentType> - getGetGoldengateDeploymentTypeMethod; - if ((getGetGoldengateDeploymentTypeMethod = - OracleDatabaseGrpc.getGetGoldengateDeploymentTypeMethod) - == null) { - synchronized (OracleDatabaseGrpc.class) { - if ((getGetGoldengateDeploymentTypeMethod = - OracleDatabaseGrpc.getGetGoldengateDeploymentTypeMethod) - == null) { - OracleDatabaseGrpc.getGetGoldengateDeploymentTypeMethod = - getGetGoldengateDeploymentTypeMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - generateFullMethodName(SERVICE_NAME, "GetGoldengateDeploymentType")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.oracledatabase.v1.GetGoldengateDeploymentTypeRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.oracledatabase.v1.GoldengateDeploymentType - .getDefaultInstance())) - .setSchemaDescriptor( - new OracleDatabaseMethodDescriptorSupplier("GetGoldengateDeploymentType")) - .build(); - } - } - } - return getGetGoldengateDeploymentTypeMethod; - } - private static volatile io.grpc.MethodDescriptor< com.google.cloud.oracledatabase.v1.ListGoldengateDeploymentTypesRequest, com.google.cloud.oracledatabase.v1.ListGoldengateDeploymentTypesResponse> @@ -3522,62 +3417,6 @@ private OracleDatabaseGrpc() {} return getListGoldengateDeploymentTypesMethod; } - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.oracledatabase.v1.GetGoldengateDeploymentEnvironmentRequest, - com.google.cloud.oracledatabase.v1.GoldengateDeploymentEnvironment> - getGetGoldengateDeploymentEnvironmentMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "GetGoldengateDeploymentEnvironment", - requestType = - com.google.cloud.oracledatabase.v1.GetGoldengateDeploymentEnvironmentRequest.class, - responseType = com.google.cloud.oracledatabase.v1.GoldengateDeploymentEnvironment.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.oracledatabase.v1.GetGoldengateDeploymentEnvironmentRequest, - com.google.cloud.oracledatabase.v1.GoldengateDeploymentEnvironment> - getGetGoldengateDeploymentEnvironmentMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.oracledatabase.v1.GetGoldengateDeploymentEnvironmentRequest, - com.google.cloud.oracledatabase.v1.GoldengateDeploymentEnvironment> - getGetGoldengateDeploymentEnvironmentMethod; - if ((getGetGoldengateDeploymentEnvironmentMethod = - OracleDatabaseGrpc.getGetGoldengateDeploymentEnvironmentMethod) - == null) { - synchronized (OracleDatabaseGrpc.class) { - if ((getGetGoldengateDeploymentEnvironmentMethod = - OracleDatabaseGrpc.getGetGoldengateDeploymentEnvironmentMethod) - == null) { - OracleDatabaseGrpc.getGetGoldengateDeploymentEnvironmentMethod = - getGetGoldengateDeploymentEnvironmentMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - generateFullMethodName( - SERVICE_NAME, "GetGoldengateDeploymentEnvironment")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.oracledatabase.v1 - .GetGoldengateDeploymentEnvironmentRequest.getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.oracledatabase.v1.GoldengateDeploymentEnvironment - .getDefaultInstance())) - .setSchemaDescriptor( - new OracleDatabaseMethodDescriptorSupplier( - "GetGoldengateDeploymentEnvironment")) - .build(); - } - } - } - return getGetGoldengateDeploymentEnvironmentMethod; - } - private static volatile io.grpc.MethodDescriptor< com.google.cloud.oracledatabase.v1.ListGoldengateDeploymentEnvironmentsRequest, com.google.cloud.oracledatabase.v1.ListGoldengateDeploymentEnvironmentsResponse> @@ -3638,58 +3477,6 @@ private OracleDatabaseGrpc() {} return getListGoldengateDeploymentEnvironmentsMethod; } - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.oracledatabase.v1.GetGoldengateConnectionTypeRequest, - com.google.cloud.oracledatabase.v1.GoldengateConnectionType> - getGetGoldengateConnectionTypeMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "GetGoldengateConnectionType", - requestType = com.google.cloud.oracledatabase.v1.GetGoldengateConnectionTypeRequest.class, - responseType = com.google.cloud.oracledatabase.v1.GoldengateConnectionType.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.oracledatabase.v1.GetGoldengateConnectionTypeRequest, - com.google.cloud.oracledatabase.v1.GoldengateConnectionType> - getGetGoldengateConnectionTypeMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.oracledatabase.v1.GetGoldengateConnectionTypeRequest, - com.google.cloud.oracledatabase.v1.GoldengateConnectionType> - getGetGoldengateConnectionTypeMethod; - if ((getGetGoldengateConnectionTypeMethod = - OracleDatabaseGrpc.getGetGoldengateConnectionTypeMethod) - == null) { - synchronized (OracleDatabaseGrpc.class) { - if ((getGetGoldengateConnectionTypeMethod = - OracleDatabaseGrpc.getGetGoldengateConnectionTypeMethod) - == null) { - OracleDatabaseGrpc.getGetGoldengateConnectionTypeMethod = - getGetGoldengateConnectionTypeMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - generateFullMethodName(SERVICE_NAME, "GetGoldengateConnectionType")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.oracledatabase.v1.GetGoldengateConnectionTypeRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.oracledatabase.v1.GoldengateConnectionType - .getDefaultInstance())) - .setSchemaDescriptor( - new OracleDatabaseMethodDescriptorSupplier("GetGoldengateConnectionType")) - .build(); - } - } - } - return getGetGoldengateConnectionTypeMethod; - } - private static volatile io.grpc.MethodDescriptor< com.google.cloud.oracledatabase.v1.ListGoldengateConnectionTypesRequest, com.google.cloud.oracledatabase.v1.ListGoldengateConnectionTypesResponse> @@ -5165,21 +4952,6 @@ default void deleteGoldengateConnection( getDeleteGoldengateConnectionMethod(), responseObserver); } - /** - * - * - *
            -     * Gets details of a single GoldengateDeploymentVersion.
            -     * 
            - */ - default void getGoldengateDeploymentVersion( - com.google.cloud.oracledatabase.v1.GetGoldengateDeploymentVersionRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getGetGoldengateDeploymentVersionMethod(), responseObserver); - } - /** * * @@ -5196,21 +4968,6 @@ default void listGoldengateDeploymentVersions( getListGoldengateDeploymentVersionsMethod(), responseObserver); } - /** - * - * - *
            -     * Gets details of a single GoldenGateDeploymentType.
            -     * 
            - */ - default void getGoldengateDeploymentType( - com.google.cloud.oracledatabase.v1.GetGoldengateDeploymentTypeRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getGetGoldengateDeploymentTypeMethod(), responseObserver); - } - /** * * @@ -5227,22 +4984,6 @@ default void listGoldengateDeploymentTypes( getListGoldengateDeploymentTypesMethod(), responseObserver); } - /** - * - * - *
            -     * Gets details of a single GoldengateDeploymentEnvironment.
            -     * 
            - */ - default void getGoldengateDeploymentEnvironment( - com.google.cloud.oracledatabase.v1.GetGoldengateDeploymentEnvironmentRequest request, - io.grpc.stub.StreamObserver< - com.google.cloud.oracledatabase.v1.GoldengateDeploymentEnvironment> - responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getGetGoldengateDeploymentEnvironmentMethod(), responseObserver); - } - /** * * @@ -5259,21 +5000,6 @@ default void listGoldengateDeploymentEnvironments( getListGoldengateDeploymentEnvironmentsMethod(), responseObserver); } - /** - * - * - *
            -     * Gets details of a single GoldengateConnectionType.
            -     * 
            - */ - default void getGoldengateConnectionType( - com.google.cloud.oracledatabase.v1.GetGoldengateConnectionTypeRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getGetGoldengateConnectionTypeMethod(), responseObserver); - } - /** * * @@ -6543,23 +6269,6 @@ public void deleteGoldengateConnection( responseObserver); } - /** - * - * - *
            -     * Gets details of a single GoldengateDeploymentVersion.
            -     * 
            - */ - public void getGoldengateDeploymentVersion( - com.google.cloud.oracledatabase.v1.GetGoldengateDeploymentVersionRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getGetGoldengateDeploymentVersionMethod(), getCallOptions()), - request, - responseObserver); - } - /** * * @@ -6578,23 +6287,6 @@ public void listGoldengateDeploymentVersions( responseObserver); } - /** - * - * - *
            -     * Gets details of a single GoldenGateDeploymentType.
            -     * 
            - */ - public void getGoldengateDeploymentType( - com.google.cloud.oracledatabase.v1.GetGoldengateDeploymentTypeRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getGetGoldengateDeploymentTypeMethod(), getCallOptions()), - request, - responseObserver); - } - /** * * @@ -6613,24 +6305,6 @@ public void listGoldengateDeploymentTypes( responseObserver); } - /** - * - * - *
            -     * Gets details of a single GoldengateDeploymentEnvironment.
            -     * 
            - */ - public void getGoldengateDeploymentEnvironment( - com.google.cloud.oracledatabase.v1.GetGoldengateDeploymentEnvironmentRequest request, - io.grpc.stub.StreamObserver< - com.google.cloud.oracledatabase.v1.GoldengateDeploymentEnvironment> - responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getGetGoldengateDeploymentEnvironmentMethod(), getCallOptions()), - request, - responseObserver); - } - /** * * @@ -6649,23 +6323,6 @@ public void listGoldengateDeploymentEnvironments( responseObserver); } - /** - * - * - *
            -     * Gets details of a single GoldengateConnectionType.
            -     * 
            - */ - public void getGoldengateConnectionType( - com.google.cloud.oracledatabase.v1.GetGoldengateConnectionTypeRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getGetGoldengateConnectionTypeMethod(), getCallOptions()), - request, - responseObserver); - } - /** * * @@ -7771,21 +7428,6 @@ public com.google.longrunning.Operation deleteGoldengateConnection( getChannel(), getDeleteGoldengateConnectionMethod(), getCallOptions(), request); } - /** - * - * - *
            -     * Gets details of a single GoldengateDeploymentVersion.
            -     * 
            - */ - public com.google.cloud.oracledatabase.v1.GoldengateDeploymentVersion - getGoldengateDeploymentVersion( - com.google.cloud.oracledatabase.v1.GetGoldengateDeploymentVersionRequest request) - throws io.grpc.StatusException { - return io.grpc.stub.ClientCalls.blockingV2UnaryCall( - getChannel(), getGetGoldengateDeploymentVersionMethod(), getCallOptions(), request); - } - /** * * @@ -7801,20 +7443,6 @@ public com.google.longrunning.Operation deleteGoldengateConnection( getChannel(), getListGoldengateDeploymentVersionsMethod(), getCallOptions(), request); } - /** - * - * - *
            -     * Gets details of a single GoldenGateDeploymentType.
            -     * 
            - */ - public com.google.cloud.oracledatabase.v1.GoldengateDeploymentType getGoldengateDeploymentType( - com.google.cloud.oracledatabase.v1.GetGoldengateDeploymentTypeRequest request) - throws io.grpc.StatusException { - return io.grpc.stub.ClientCalls.blockingV2UnaryCall( - getChannel(), getGetGoldengateDeploymentTypeMethod(), getCallOptions(), request); - } - /** * * @@ -7830,21 +7458,6 @@ public com.google.cloud.oracledatabase.v1.GoldengateDeploymentType getGoldengate getChannel(), getListGoldengateDeploymentTypesMethod(), getCallOptions(), request); } - /** - * - * - *
            -     * Gets details of a single GoldengateDeploymentEnvironment.
            -     * 
            - */ - public com.google.cloud.oracledatabase.v1.GoldengateDeploymentEnvironment - getGoldengateDeploymentEnvironment( - com.google.cloud.oracledatabase.v1.GetGoldengateDeploymentEnvironmentRequest request) - throws io.grpc.StatusException { - return io.grpc.stub.ClientCalls.blockingV2UnaryCall( - getChannel(), getGetGoldengateDeploymentEnvironmentMethod(), getCallOptions(), request); - } - /** * * @@ -7860,20 +7473,6 @@ public com.google.cloud.oracledatabase.v1.GoldengateDeploymentType getGoldengate getChannel(), getListGoldengateDeploymentEnvironmentsMethod(), getCallOptions(), request); } - /** - * - * - *
            -     * Gets details of a single GoldengateConnectionType.
            -     * 
            - */ - public com.google.cloud.oracledatabase.v1.GoldengateConnectionType getGoldengateConnectionType( - com.google.cloud.oracledatabase.v1.GetGoldengateConnectionTypeRequest request) - throws io.grpc.StatusException { - return io.grpc.stub.ClientCalls.blockingV2UnaryCall( - getChannel(), getGetGoldengateConnectionTypeMethod(), getCallOptions(), request); - } - /** * * @@ -8891,20 +8490,6 @@ public com.google.longrunning.Operation deleteGoldengateConnection( getChannel(), getDeleteGoldengateConnectionMethod(), getCallOptions(), request); } - /** - * - * - *
            -     * Gets details of a single GoldengateDeploymentVersion.
            -     * 
            - */ - public com.google.cloud.oracledatabase.v1.GoldengateDeploymentVersion - getGoldengateDeploymentVersion( - com.google.cloud.oracledatabase.v1.GetGoldengateDeploymentVersionRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getGetGoldengateDeploymentVersionMethod(), getCallOptions(), request); - } - /** * * @@ -8919,19 +8504,6 @@ public com.google.longrunning.Operation deleteGoldengateConnection( getChannel(), getListGoldengateDeploymentVersionsMethod(), getCallOptions(), request); } - /** - * - * - *
            -     * Gets details of a single GoldenGateDeploymentType.
            -     * 
            - */ - public com.google.cloud.oracledatabase.v1.GoldengateDeploymentType getGoldengateDeploymentType( - com.google.cloud.oracledatabase.v1.GetGoldengateDeploymentTypeRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getGetGoldengateDeploymentTypeMethod(), getCallOptions(), request); - } - /** * * @@ -8946,20 +8518,6 @@ public com.google.cloud.oracledatabase.v1.GoldengateDeploymentType getGoldengate getChannel(), getListGoldengateDeploymentTypesMethod(), getCallOptions(), request); } - /** - * - * - *
            -     * Gets details of a single GoldengateDeploymentEnvironment.
            -     * 
            - */ - public com.google.cloud.oracledatabase.v1.GoldengateDeploymentEnvironment - getGoldengateDeploymentEnvironment( - com.google.cloud.oracledatabase.v1.GetGoldengateDeploymentEnvironmentRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getGetGoldengateDeploymentEnvironmentMethod(), getCallOptions(), request); - } - /** * * @@ -8975,19 +8533,6 @@ public com.google.cloud.oracledatabase.v1.GoldengateDeploymentType getGoldengate getChannel(), getListGoldengateDeploymentEnvironmentsMethod(), getCallOptions(), request); } - /** - * - * - *
            -     * Gets details of a single GoldengateConnectionType.
            -     * 
            - */ - public com.google.cloud.oracledatabase.v1.GoldengateConnectionType getGoldengateConnectionType( - com.google.cloud.oracledatabase.v1.GetGoldengateConnectionTypeRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getGetGoldengateConnectionTypeMethod(), getCallOptions(), request); - } - /** * * @@ -10072,22 +9617,6 @@ protected OracleDatabaseFutureStub build( getChannel().newCall(getDeleteGoldengateConnectionMethod(), getCallOptions()), request); } - /** - * - * - *
            -     * Gets details of a single GoldengateDeploymentVersion.
            -     * 
            - */ - public com.google.common.util.concurrent.ListenableFuture< - com.google.cloud.oracledatabase.v1.GoldengateDeploymentVersion> - getGoldengateDeploymentVersion( - com.google.cloud.oracledatabase.v1.GetGoldengateDeploymentVersionRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getGetGoldengateDeploymentVersionMethod(), getCallOptions()), - request); - } - /** * * @@ -10104,21 +9633,6 @@ protected OracleDatabaseFutureStub build( request); } - /** - * - * - *
            -     * Gets details of a single GoldenGateDeploymentType.
            -     * 
            - */ - public com.google.common.util.concurrent.ListenableFuture< - com.google.cloud.oracledatabase.v1.GoldengateDeploymentType> - getGoldengateDeploymentType( - com.google.cloud.oracledatabase.v1.GetGoldengateDeploymentTypeRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getGetGoldengateDeploymentTypeMethod(), getCallOptions()), request); - } - /** * * @@ -10135,22 +9649,6 @@ protected OracleDatabaseFutureStub build( request); } - /** - * - * - *
            -     * Gets details of a single GoldengateDeploymentEnvironment.
            -     * 
            - */ - public com.google.common.util.concurrent.ListenableFuture< - com.google.cloud.oracledatabase.v1.GoldengateDeploymentEnvironment> - getGoldengateDeploymentEnvironment( - com.google.cloud.oracledatabase.v1.GetGoldengateDeploymentEnvironmentRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getGetGoldengateDeploymentEnvironmentMethod(), getCallOptions()), - request); - } - /** * * @@ -10168,21 +9666,6 @@ protected OracleDatabaseFutureStub build( request); } - /** - * - * - *
            -     * Gets details of a single GoldengateConnectionType.
            -     * 
            - */ - public com.google.common.util.concurrent.ListenableFuture< - com.google.cloud.oracledatabase.v1.GoldengateConnectionType> - getGoldengateConnectionType( - com.google.cloud.oracledatabase.v1.GetGoldengateConnectionTypeRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getGetGoldengateConnectionTypeMethod(), getCallOptions()), request); - } - /** * * @@ -10376,21 +9859,17 @@ protected OracleDatabaseFutureStub build( private static final int METHODID_GET_GOLDENGATE_CONNECTION = 63; private static final int METHODID_CREATE_GOLDENGATE_CONNECTION = 64; private static final int METHODID_DELETE_GOLDENGATE_CONNECTION = 65; - private static final int METHODID_GET_GOLDENGATE_DEPLOYMENT_VERSION = 66; - private static final int METHODID_LIST_GOLDENGATE_DEPLOYMENT_VERSIONS = 67; - private static final int METHODID_GET_GOLDENGATE_DEPLOYMENT_TYPE = 68; - private static final int METHODID_LIST_GOLDENGATE_DEPLOYMENT_TYPES = 69; - private static final int METHODID_GET_GOLDENGATE_DEPLOYMENT_ENVIRONMENT = 70; - private static final int METHODID_LIST_GOLDENGATE_DEPLOYMENT_ENVIRONMENTS = 71; - private static final int METHODID_GET_GOLDENGATE_CONNECTION_TYPE = 72; - private static final int METHODID_LIST_GOLDENGATE_CONNECTION_TYPES = 73; - private static final int METHODID_LIST_DB_VERSIONS = 74; - private static final int METHODID_LIST_DATABASE_CHARACTER_SETS = 75; - private static final int METHODID_LIST_GOLDENGATE_CONNECTION_ASSIGNMENTS = 76; - private static final int METHODID_GET_GOLDENGATE_CONNECTION_ASSIGNMENT = 77; - private static final int METHODID_CREATE_GOLDENGATE_CONNECTION_ASSIGNMENT = 78; - private static final int METHODID_DELETE_GOLDENGATE_CONNECTION_ASSIGNMENT = 79; - private static final int METHODID_TEST_GOLDENGATE_CONNECTION_ASSIGNMENT = 80; + private static final int METHODID_LIST_GOLDENGATE_DEPLOYMENT_VERSIONS = 66; + private static final int METHODID_LIST_GOLDENGATE_DEPLOYMENT_TYPES = 67; + private static final int METHODID_LIST_GOLDENGATE_DEPLOYMENT_ENVIRONMENTS = 68; + private static final int METHODID_LIST_GOLDENGATE_CONNECTION_TYPES = 69; + private static final int METHODID_LIST_DB_VERSIONS = 70; + private static final int METHODID_LIST_DATABASE_CHARACTER_SETS = 71; + private static final int METHODID_LIST_GOLDENGATE_CONNECTION_ASSIGNMENTS = 72; + private static final int METHODID_GET_GOLDENGATE_CONNECTION_ASSIGNMENT = 73; + private static final int METHODID_CREATE_GOLDENGATE_CONNECTION_ASSIGNMENT = 74; + private static final int METHODID_DELETE_GOLDENGATE_CONNECTION_ASSIGNMENT = 75; + private static final int METHODID_TEST_GOLDENGATE_CONNECTION_ASSIGNMENT = 76; private static final class MethodHandlers implements io.grpc.stub.ServerCalls.UnaryMethod, @@ -10801,13 +10280,6 @@ public void invoke(Req request, io.grpc.stub.StreamObserver responseObserv (com.google.cloud.oracledatabase.v1.DeleteGoldengateConnectionRequest) request, (io.grpc.stub.StreamObserver) responseObserver); break; - case METHODID_GET_GOLDENGATE_DEPLOYMENT_VERSION: - serviceImpl.getGoldengateDeploymentVersion( - (com.google.cloud.oracledatabase.v1.GetGoldengateDeploymentVersionRequest) request, - (io.grpc.stub.StreamObserver< - com.google.cloud.oracledatabase.v1.GoldengateDeploymentVersion>) - responseObserver); - break; case METHODID_LIST_GOLDENGATE_DEPLOYMENT_VERSIONS: serviceImpl.listGoldengateDeploymentVersions( (com.google.cloud.oracledatabase.v1.ListGoldengateDeploymentVersionsRequest) request, @@ -10815,13 +10287,6 @@ public void invoke(Req request, io.grpc.stub.StreamObserver responseObserv com.google.cloud.oracledatabase.v1.ListGoldengateDeploymentVersionsResponse>) responseObserver); break; - case METHODID_GET_GOLDENGATE_DEPLOYMENT_TYPE: - serviceImpl.getGoldengateDeploymentType( - (com.google.cloud.oracledatabase.v1.GetGoldengateDeploymentTypeRequest) request, - (io.grpc.stub.StreamObserver< - com.google.cloud.oracledatabase.v1.GoldengateDeploymentType>) - responseObserver); - break; case METHODID_LIST_GOLDENGATE_DEPLOYMENT_TYPES: serviceImpl.listGoldengateDeploymentTypes( (com.google.cloud.oracledatabase.v1.ListGoldengateDeploymentTypesRequest) request, @@ -10829,14 +10294,6 @@ public void invoke(Req request, io.grpc.stub.StreamObserver responseObserv com.google.cloud.oracledatabase.v1.ListGoldengateDeploymentTypesResponse>) responseObserver); break; - case METHODID_GET_GOLDENGATE_DEPLOYMENT_ENVIRONMENT: - serviceImpl.getGoldengateDeploymentEnvironment( - (com.google.cloud.oracledatabase.v1.GetGoldengateDeploymentEnvironmentRequest) - request, - (io.grpc.stub.StreamObserver< - com.google.cloud.oracledatabase.v1.GoldengateDeploymentEnvironment>) - responseObserver); - break; case METHODID_LIST_GOLDENGATE_DEPLOYMENT_ENVIRONMENTS: serviceImpl.listGoldengateDeploymentEnvironments( (com.google.cloud.oracledatabase.v1.ListGoldengateDeploymentEnvironmentsRequest) @@ -10846,13 +10303,6 @@ public void invoke(Req request, io.grpc.stub.StreamObserver responseObserv .ListGoldengateDeploymentEnvironmentsResponse>) responseObserver); break; - case METHODID_GET_GOLDENGATE_CONNECTION_TYPE: - serviceImpl.getGoldengateConnectionType( - (com.google.cloud.oracledatabase.v1.GetGoldengateConnectionTypeRequest) request, - (io.grpc.stub.StreamObserver< - com.google.cloud.oracledatabase.v1.GoldengateConnectionType>) - responseObserver); - break; case METHODID_LIST_GOLDENGATE_CONNECTION_TYPES: serviceImpl.listGoldengateConnectionTypes( (com.google.cloud.oracledatabase.v1.ListGoldengateConnectionTypesRequest) request, @@ -11376,13 +10826,6 @@ public static final io.grpc.ServerServiceDefinition bindService(AsyncService ser com.google.cloud.oracledatabase.v1.DeleteGoldengateConnectionRequest, com.google.longrunning.Operation>( service, METHODID_DELETE_GOLDENGATE_CONNECTION))) - .addMethod( - getGetGoldengateDeploymentVersionMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.oracledatabase.v1.GetGoldengateDeploymentVersionRequest, - com.google.cloud.oracledatabase.v1.GoldengateDeploymentVersion>( - service, METHODID_GET_GOLDENGATE_DEPLOYMENT_VERSION))) .addMethod( getListGoldengateDeploymentVersionsMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall( @@ -11390,13 +10833,6 @@ public static final io.grpc.ServerServiceDefinition bindService(AsyncService ser com.google.cloud.oracledatabase.v1.ListGoldengateDeploymentVersionsRequest, com.google.cloud.oracledatabase.v1.ListGoldengateDeploymentVersionsResponse>( service, METHODID_LIST_GOLDENGATE_DEPLOYMENT_VERSIONS))) - .addMethod( - getGetGoldengateDeploymentTypeMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.oracledatabase.v1.GetGoldengateDeploymentTypeRequest, - com.google.cloud.oracledatabase.v1.GoldengateDeploymentType>( - service, METHODID_GET_GOLDENGATE_DEPLOYMENT_TYPE))) .addMethod( getListGoldengateDeploymentTypesMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall( @@ -11404,13 +10840,6 @@ public static final io.grpc.ServerServiceDefinition bindService(AsyncService ser com.google.cloud.oracledatabase.v1.ListGoldengateDeploymentTypesRequest, com.google.cloud.oracledatabase.v1.ListGoldengateDeploymentTypesResponse>( service, METHODID_LIST_GOLDENGATE_DEPLOYMENT_TYPES))) - .addMethod( - getGetGoldengateDeploymentEnvironmentMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.oracledatabase.v1.GetGoldengateDeploymentEnvironmentRequest, - com.google.cloud.oracledatabase.v1.GoldengateDeploymentEnvironment>( - service, METHODID_GET_GOLDENGATE_DEPLOYMENT_ENVIRONMENT))) .addMethod( getListGoldengateDeploymentEnvironmentsMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall( @@ -11419,13 +10848,6 @@ public static final io.grpc.ServerServiceDefinition bindService(AsyncService ser com.google.cloud.oracledatabase.v1 .ListGoldengateDeploymentEnvironmentsResponse>( service, METHODID_LIST_GOLDENGATE_DEPLOYMENT_ENVIRONMENTS))) - .addMethod( - getGetGoldengateConnectionTypeMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.oracledatabase.v1.GetGoldengateConnectionTypeRequest, - com.google.cloud.oracledatabase.v1.GoldengateConnectionType>( - service, METHODID_GET_GOLDENGATE_CONNECTION_TYPE))) .addMethod( getListGoldengateConnectionTypesMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall( @@ -11599,13 +11021,9 @@ public static io.grpc.ServiceDescriptor getServiceDescriptor() { .addMethod(getGetGoldengateConnectionMethod()) .addMethod(getCreateGoldengateConnectionMethod()) .addMethod(getDeleteGoldengateConnectionMethod()) - .addMethod(getGetGoldengateDeploymentVersionMethod()) .addMethod(getListGoldengateDeploymentVersionsMethod()) - .addMethod(getGetGoldengateDeploymentTypeMethod()) .addMethod(getListGoldengateDeploymentTypesMethod()) - .addMethod(getGetGoldengateDeploymentEnvironmentMethod()) .addMethod(getListGoldengateDeploymentEnvironmentsMethod()) - .addMethod(getGetGoldengateConnectionTypeMethod()) .addMethod(getListGoldengateConnectionTypesMethod()) .addMethod(getListDbVersionsMethod()) .addMethod(getListDatabaseCharacterSetsMethod()) diff --git a/java-oracledatabase/proto-google-cloud-oracledatabase-v1/src/main/java/com/google/cloud/oracledatabase/v1/GoldengateConnectionTypeProto.java b/java-oracledatabase/proto-google-cloud-oracledatabase-v1/src/main/java/com/google/cloud/oracledatabase/v1/GoldengateConnectionTypeProto.java index 18d259e838ce..50173ed17f61 100644 --- a/java-oracledatabase/proto-google-cloud-oracledatabase-v1/src/main/java/com/google/cloud/oracledatabase/v1/GoldengateConnectionTypeProto.java +++ b/java-oracledatabase/proto-google-cloud-oracledatabase-v1/src/main/java/com/google/cloud/oracledatabase/v1/GoldengateConnectionTypeProto.java @@ -44,10 +44,6 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_oracledatabase_v1_GoldengateConnectionType_descriptor; static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_cloud_oracledatabase_v1_GoldengateConnectionType_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_oracledatabase_v1_GetGoldengateConnectionTypeRequest_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_oracledatabase_v1_GetGoldengateConnectionTypeRequest_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_oracledatabase_v1_ListGoldengateConnectionTypesRequest_descriptor; static final com.google.protobuf.GeneratedMessage.FieldAccessorTable @@ -109,13 +105,10 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\007ICEBERG\020\035:\321\001\352A\315\001\n" + "6oracledatabase.googleapis.com/GoldengateConnectionType\022^projects" + "/{project}/locations/{location}/goldengateConnectionTypes/{goldengate_connection" - + "_type}*\031goldengateConnectionTypes2\030goldengateConnectionType\"r\n" - + "\"GetGoldengateConnectionTypeRequest\022L\n" - + "\004name\030\001 \001(\tB>\340A\002\372A8\n" - + "6oracledatabase.googleapis.com/GoldengateConnectionType\"\274\001\n" + + "_type}*\031goldengateConnectionTypes2\030goldengateConnectionType\"\274\001\n" + "$ListGoldengateConnectionTypesRequest\022N\n" - + "\006parent\030\001 \001(\tB>\340A\002\372A8" - + "\0226oracledatabase.googleapis.com/GoldengateConnectionType\022\026\n" + + "\006parent\030\001 \001(\tB>\340A" + + "\002\372A8\0226oracledatabase.googleapis.com/GoldengateConnectionType\022\026\n" + "\tpage_size\030\002 \001(\005B\003\340A\001\022\027\n\n" + "page_token\030\003 \001(\tB\003\340A\001\022\023\n" + "\006filter\030\004 \001(\tB\003\340A\001\"\271\001\n" @@ -124,11 +117,11 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + " \003(\01328.google.cloud.oracledatabase.v1.GoldengateConnectionType\022\027\n" + "\017next_page_token\030\002 \001(\t\022\030\n" + "\013unreachable\030\003 \003(\tB\003\340A\006B\367\001\n" - + "\"com.google.cloud.oracledatabase.v1B\035Golde" - + "ngateConnectionTypeProtoP\001ZJcloud.google.com/go/oracledatabase/apiv1/oracledatab" - + "asepb;oracledatabasepb\252\002\036Google.Cloud.Or" - + "acleDatabase.V1\312\002\036Google\\Cloud\\OracleDat" - + "abase\\V1\352\002!Google::Cloud::OracleDatabase::V1b\006proto3" + + "\"com.google.cloud.oracledatabase.v1B\035GoldengateConnectionTypeProtoP\001ZJcloud.go" + + "ogle.com/go/oracledatabase/apiv1/oracled" + + "atabasepb;oracledatabasepb\252\002\036Google.Clou" + + "d.OracleDatabase.V1\312\002\036Google\\Cloud\\Oracl" + + "eDatabase\\V1\352\002!Google::Cloud::OracleDatabase::V1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -145,16 +138,8 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "Name", "ConnectionType", "TechnologyTypes", }); - internal_static_google_cloud_oracledatabase_v1_GetGoldengateConnectionTypeRequest_descriptor = - getDescriptor().getMessageType(1); - internal_static_google_cloud_oracledatabase_v1_GetGoldengateConnectionTypeRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_cloud_oracledatabase_v1_GetGoldengateConnectionTypeRequest_descriptor, - new java.lang.String[] { - "Name", - }); internal_static_google_cloud_oracledatabase_v1_ListGoldengateConnectionTypesRequest_descriptor = - getDescriptor().getMessageType(2); + getDescriptor().getMessageType(1); internal_static_google_cloud_oracledatabase_v1_ListGoldengateConnectionTypesRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_cloud_oracledatabase_v1_ListGoldengateConnectionTypesRequest_descriptor, @@ -162,7 +147,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Parent", "PageSize", "PageToken", "Filter", }); internal_static_google_cloud_oracledatabase_v1_ListGoldengateConnectionTypesResponse_descriptor = - getDescriptor().getMessageType(3); + getDescriptor().getMessageType(2); internal_static_google_cloud_oracledatabase_v1_ListGoldengateConnectionTypesResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_cloud_oracledatabase_v1_ListGoldengateConnectionTypesResponse_descriptor, diff --git a/java-oracledatabase/proto-google-cloud-oracledatabase-v1/src/main/java/com/google/cloud/oracledatabase/v1/GoldengateDeploymentEnvironmentProto.java b/java-oracledatabase/proto-google-cloud-oracledatabase-v1/src/main/java/com/google/cloud/oracledatabase/v1/GoldengateDeploymentEnvironmentProto.java index ce6582d4bfdb..0b9181c0dd95 100644 --- a/java-oracledatabase/proto-google-cloud-oracledatabase-v1/src/main/java/com/google/cloud/oracledatabase/v1/GoldengateDeploymentEnvironmentProto.java +++ b/java-oracledatabase/proto-google-cloud-oracledatabase-v1/src/main/java/com/google/cloud/oracledatabase/v1/GoldengateDeploymentEnvironmentProto.java @@ -44,10 +44,6 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_oracledatabase_v1_GoldengateDeploymentEnvironment_descriptor; static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_cloud_oracledatabase_v1_GoldengateDeploymentEnvironment_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_oracledatabase_v1_GetGoldengateDeploymentEnvironmentRequest_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_oracledatabase_v1_GetGoldengateDeploymentEnvironmentRequest_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_oracledatabase_v1_ListGoldengateDeploymentEnvironmentsRequest_descriptor; static final com.google.protobuf.GeneratedMessage.FieldAccessorTable @@ -95,25 +91,22 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "=oracledatabase.googleapis.com/GoldengateDeployme" + "ntEnvironment\022lprojects/{project}/locations/{location}/goldengateDeploymentEnvir" + "onments/{goldengate_deployment_environment}*" - + " goldengateDeploymentEnvironments2\037goldengateDeploymentEnvironment\"\200\001\n" - + ")GetGoldengateDeploymentEnvironmentRequest\022S\n" - + "\004name\030\001 \001(\tBE\340A\002\372A?\n" - + "=oracledatabase.googleapis.com/GoldengateDeploymentEnvironment\"\265\001\n" + + " goldengateDeploymentEnvironments2\037goldengateDeploymentEnvironment\"\265\001\n" + "+ListGoldengateDeploymentEnvironmentsRequest\022U\n" - + "\006parent\030\001 \001(\tBE\340A\002\372A?\022=oracl" - + "edatabase.googleapis.com/GoldengateDeploymentEnvironment\022\026\n" + + "\006parent\030\001 \001(\tBE\340A\002\372A?\022=oracledatabase.g" + + "oogleapis.com/GoldengateDeploymentEnvironment\022\026\n" + "\tpage_size\030\002 \001(\005B\003\340A\001\022\027\n\n" + "page_token\030\003 \001(\tB\003\340A\001\"\316\001\n" + ",ListGoldengateDeploymentEnvironmentsResponse\022k\n" - + "\"goldengate_deployment_environments\030\001 \003(\0132?" - + ".google.cloud.oracledatabase.v1.GoldengateDeploymentEnvironment\022\027\n" + + "\"goldengate_deployment_environments\030\001 \003(\0132?.google.clo" + + "ud.oracledatabase.v1.GoldengateDeploymentEnvironment\022\027\n" + "\017next_page_token\030\002 \001(\t\022\030\n" + "\013unreachable\030\003 \003(\tB\003\340A\006B\376\001\n" - + "\"com.google.cloud.oracledatabase.v1B$GoldengateDeploymentEnvironmentProtoP\001ZJcloud" - + ".google.com/go/oracledatabase/apiv1/orac" - + "ledatabasepb;oracledatabasepb\252\002\036Google.C" - + "loud.OracleDatabase.V1\312\002\036Google\\Cloud\\Or" - + "acleDatabase\\V1\352\002!Google::Cloud::OracleDatabase::V1b\006proto3" + + "\"com.google.cloud.oracledatabase.v1B$GoldengateDeploy" + + "mentEnvironmentProtoP\001ZJcloud.google.com/go/oracledatabase/apiv1/oracledatabasep" + + "b;oracledatabasepb\252\002\036Google.Cloud.Oracle" + + "Database.V1\312\002\036Google\\Cloud\\OracleDatabas" + + "e\\V1\352\002!Google::Cloud::OracleDatabase::V1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -140,16 +133,8 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "NetworkBandwidthGbpsPerCpuCore", "StorageUsageLimitGbPerCpuCore", }); - internal_static_google_cloud_oracledatabase_v1_GetGoldengateDeploymentEnvironmentRequest_descriptor = - getDescriptor().getMessageType(1); - internal_static_google_cloud_oracledatabase_v1_GetGoldengateDeploymentEnvironmentRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_cloud_oracledatabase_v1_GetGoldengateDeploymentEnvironmentRequest_descriptor, - new java.lang.String[] { - "Name", - }); internal_static_google_cloud_oracledatabase_v1_ListGoldengateDeploymentEnvironmentsRequest_descriptor = - getDescriptor().getMessageType(2); + getDescriptor().getMessageType(1); internal_static_google_cloud_oracledatabase_v1_ListGoldengateDeploymentEnvironmentsRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_cloud_oracledatabase_v1_ListGoldengateDeploymentEnvironmentsRequest_descriptor, @@ -157,7 +142,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Parent", "PageSize", "PageToken", }); internal_static_google_cloud_oracledatabase_v1_ListGoldengateDeploymentEnvironmentsResponse_descriptor = - getDescriptor().getMessageType(3); + getDescriptor().getMessageType(2); internal_static_google_cloud_oracledatabase_v1_ListGoldengateDeploymentEnvironmentsResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_cloud_oracledatabase_v1_ListGoldengateDeploymentEnvironmentsResponse_descriptor, diff --git a/java-oracledatabase/proto-google-cloud-oracledatabase-v1/src/main/java/com/google/cloud/oracledatabase/v1/GoldengateDeploymentTypeProto.java b/java-oracledatabase/proto-google-cloud-oracledatabase-v1/src/main/java/com/google/cloud/oracledatabase/v1/GoldengateDeploymentTypeProto.java index ae02d6a61805..26382c2c1f3f 100644 --- a/java-oracledatabase/proto-google-cloud-oracledatabase-v1/src/main/java/com/google/cloud/oracledatabase/v1/GoldengateDeploymentTypeProto.java +++ b/java-oracledatabase/proto-google-cloud-oracledatabase-v1/src/main/java/com/google/cloud/oracledatabase/v1/GoldengateDeploymentTypeProto.java @@ -44,10 +44,6 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_oracledatabase_v1_GoldengateDeploymentType_descriptor; static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_cloud_oracledatabase_v1_GoldengateDeploymentType_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_oracledatabase_v1_GetGoldengateDeploymentTypeRequest_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_oracledatabase_v1_GetGoldengateDeploymentTypeRequest_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_oracledatabase_v1_ListGoldengateDeploymentTypesRequest_descriptor; static final com.google.protobuf.GeneratedMessage.FieldAccessorTable @@ -103,13 +99,10 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\030DATA_TRANSFORMS_CATEGORY\020\002:\321\001\352A\315\001\n" + "6oracledatabase.googleapis.com/GoldengateDeploymentType\022^projects/{project}/lo" + "cations/{location}/goldengateDeploymentTypes/{goldengate_deployment_type}*\031golde" - + "ngateDeploymentTypes2\030goldengateDeploymentType\"r\n" - + "\"GetGoldengateDeploymentTypeRequest\022L\n" - + "\004name\030\001 \001(\tB>\340A\002\372A8\n" - + "6oracledatabase.googleapis.com/GoldengateDeploymentType\"\323\001\n" + + "ngateDeploymentTypes2\030goldengateDeploymentType\"\323\001\n" + "$ListGoldengateDeploymentTypesRequest\022N\n" - + "\006parent\030\001 \001(\tB>\340A\002\372A8\0226oracledatab" - + "ase.googleapis.com/GoldengateDeploymentType\022\026\n" + + "\006parent\030\001 \001(\tB>\340A\002\372A8\0226oracled" + + "atabase.googleapis.com/GoldengateDeploymentType\022\026\n" + "\tpage_size\030\002 \001(\005B\003\340A\001\022\027\n\n" + "page_token\030\003 \001(\tB\003\340A\001\022\023\n" + "\006filter\030\004 \001(\tB\003\340A\001\022\025\n" @@ -119,11 +112,11 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + " \003(\01328.google.cloud.oracledatabase.v1.GoldengateDeploymentType\022\027\n" + "\017next_page_token\030\002 \001(\t\022\030\n" + "\013unreachable\030\003 \003(\tB\003\340A\006B\367\001\n" - + "\"com.google.cloud.oracledatabase.v1B\035GoldengateDeploymentTypeProtoP\001ZJcl" - + "oud.google.com/go/oracledatabase/apiv1/o" - + "racledatabasepb;oracledatabasepb\252\002\036Googl" - + "e.Cloud.OracleDatabase.V1\312\002\036Google\\Cloud" - + "\\OracleDatabase\\V1\352\002!Google::Cloud::OracleDatabase::V1b\006proto3" + + "\"com.google.cloud.oracledatabase.v1B\035GoldengateDeploymentTypeProtoP\001" + + "ZJcloud.google.com/go/oracledatabase/api" + + "v1/oracledatabasepb;oracledatabasepb\252\002\036G" + + "oogle.Cloud.OracleDatabase.V1\312\002\036Google\\C" + + "loud\\OracleDatabase\\V1\352\002!Google::Cloud::OracleDatabase::V1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -150,16 +143,8 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "TargetTechnologies", "DefaultUsername", }); - internal_static_google_cloud_oracledatabase_v1_GetGoldengateDeploymentTypeRequest_descriptor = - getDescriptor().getMessageType(1); - internal_static_google_cloud_oracledatabase_v1_GetGoldengateDeploymentTypeRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_cloud_oracledatabase_v1_GetGoldengateDeploymentTypeRequest_descriptor, - new java.lang.String[] { - "Name", - }); internal_static_google_cloud_oracledatabase_v1_ListGoldengateDeploymentTypesRequest_descriptor = - getDescriptor().getMessageType(2); + getDescriptor().getMessageType(1); internal_static_google_cloud_oracledatabase_v1_ListGoldengateDeploymentTypesRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_cloud_oracledatabase_v1_ListGoldengateDeploymentTypesRequest_descriptor, @@ -167,7 +152,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Parent", "PageSize", "PageToken", "Filter", "OrderBy", }); internal_static_google_cloud_oracledatabase_v1_ListGoldengateDeploymentTypesResponse_descriptor = - getDescriptor().getMessageType(3); + getDescriptor().getMessageType(2); internal_static_google_cloud_oracledatabase_v1_ListGoldengateDeploymentTypesResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_cloud_oracledatabase_v1_ListGoldengateDeploymentTypesResponse_descriptor, diff --git a/java-oracledatabase/proto-google-cloud-oracledatabase-v1/src/main/java/com/google/cloud/oracledatabase/v1/GoldengateDeploymentVersionProto.java b/java-oracledatabase/proto-google-cloud-oracledatabase-v1/src/main/java/com/google/cloud/oracledatabase/v1/GoldengateDeploymentVersionProto.java index f2c5def056b8..33180d1f7903 100644 --- a/java-oracledatabase/proto-google-cloud-oracledatabase-v1/src/main/java/com/google/cloud/oracledatabase/v1/GoldengateDeploymentVersionProto.java +++ b/java-oracledatabase/proto-google-cloud-oracledatabase-v1/src/main/java/com/google/cloud/oracledatabase/v1/GoldengateDeploymentVersionProto.java @@ -48,10 +48,6 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_oracledatabase_v1_GoldengateDeploymentVersionProperties_descriptor; static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_cloud_oracledatabase_v1_GoldengateDeploymentVersionProperties_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_oracledatabase_v1_GetGoldengateDeploymentVersionRequest_descriptor; - static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_google_cloud_oracledatabase_v1_GetGoldengateDeploymentVersionRequest_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_oracledatabase_v1_ListGoldengateDeploymentVersionsRequest_descriptor; static final com.google.protobuf.GeneratedMessage.FieldAccessorTable @@ -108,25 +104,22 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "#DEPLOYMENT_RELEASE_TYPE_UNSPECIFIED\020\000\022\t\n" + "\005MAJOR\020\001\022\n\n" + "\006BUNDLE\020\002\022\t\n" - + "\005MINOR\020\003\"x\n" - + "%GetGoldengateDeploymentVersionRequest\022O\n" - + "\004name\030\001 \001(\tBA\340A\002\372A;\n" - + "9oracledatabase.googleapis.com/GoldengateDeploymentVersion\"\302\001\n" + + "\005MINOR\020\003\"\302\001\n" + "\'ListGoldengateDeploymentVersionsRequest\022Q\n" - + "\006parent\030\001 \001(\tBA" - + "\340A\002\372A;\0229oracledatabase.googleapis.com/GoldengateDeploymentVersion\022\026\n" + + "\006parent\030\001 \001(\tBA\340A" + + "\002\372A;\0229oracledatabase.googleapis.com/GoldengateDeploymentVersion\022\026\n" + "\tpage_size\030\002 \001(\005B\003\340A\001\022\027\n\n" + "page_token\030\003 \001(\tB\003\340A\001\022\023\n" + "\006filter\030\004 \001(\tB\003\340A\001\"\302\001\n" + "(ListGoldengateDeploymentVersionsResponse\022c\n" - + "\036goldengate_deployment_versions\030\001 \003(\0132;.google.cloud.orac" - + "ledatabase.v1.GoldengateDeploymentVersion\022\027\n" + + "\036goldengate_deployment_versions\030\001 \003(\0132;.google.cloud.oracle" + + "database.v1.GoldengateDeploymentVersion\022\027\n" + "\017next_page_token\030\002 \001(\t\022\030\n" + "\013unreachable\030\003 \003(\tB\003\340A\006B\372\001\n" - + "\"com.google.cloud.oracledatabase.v1B GoldengateDeploymentVersion" - + "ProtoP\001ZJcloud.google.com/go/oracledatabase/apiv1/oracledatabasepb;oracledatabas" - + "epb\252\002\036Google.Cloud.OracleDatabase.V1\312\002\036G" - + "oogle\\Cloud\\OracleDatabase\\V1\352\002!Google::Cloud::OracleDatabase::V1b\006proto3" + + "\"com.google.cloud.oracledatabase.v1B GoldengateDeploymentVersionPr" + + "otoP\001ZJcloud.google.com/go/oracledatabase/apiv1/oracledatabasepb;oracledatabasep" + + "b\252\002\036Google.Cloud.OracleDatabase.V1\312\002\036Goo" + + "gle\\Cloud\\OracleDatabase\\V1\352\002!Google::Cloud::OracleDatabase::V1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -157,16 +150,8 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "ReleaseTime", "SupportEndTime", }); - internal_static_google_cloud_oracledatabase_v1_GetGoldengateDeploymentVersionRequest_descriptor = - getDescriptor().getMessageType(2); - internal_static_google_cloud_oracledatabase_v1_GetGoldengateDeploymentVersionRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_google_cloud_oracledatabase_v1_GetGoldengateDeploymentVersionRequest_descriptor, - new java.lang.String[] { - "Name", - }); internal_static_google_cloud_oracledatabase_v1_ListGoldengateDeploymentVersionsRequest_descriptor = - getDescriptor().getMessageType(3); + getDescriptor().getMessageType(2); internal_static_google_cloud_oracledatabase_v1_ListGoldengateDeploymentVersionsRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_cloud_oracledatabase_v1_ListGoldengateDeploymentVersionsRequest_descriptor, @@ -174,7 +159,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Parent", "PageSize", "PageToken", "Filter", }); internal_static_google_cloud_oracledatabase_v1_ListGoldengateDeploymentVersionsResponse_descriptor = - getDescriptor().getMessageType(4); + getDescriptor().getMessageType(3); internal_static_google_cloud_oracledatabase_v1_ListGoldengateDeploymentVersionsResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_cloud_oracledatabase_v1_ListGoldengateDeploymentVersionsResponse_descriptor, diff --git a/java-oracledatabase/proto-google-cloud-oracledatabase-v1/src/main/java/com/google/cloud/oracledatabase/v1/V1mainProto.java b/java-oracledatabase/proto-google-cloud-oracledatabase-v1/src/main/java/com/google/cloud/oracledatabase/v1/V1mainProto.java index 958b738b8694..41833a15f8b6 100644 --- a/java-oracledatabase/proto-google-cloud-oracledatabase-v1/src/main/java/com/google/cloud/oracledatabase/v1/V1mainProto.java +++ b/java-oracledatabase/proto-google-cloud-oracledatabase-v1/src/main/java/com/google/cloud/oracledatabase/v1/V1mainProto.java @@ -504,7 +504,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\004name\030\001 \001(\tB4\340A\002\372A.\n" + ",oracledatabase.googleapis.com/ExadbVmCluster\022\037\n\n" + "request_id\030\003 \001(\tB\013\340A\001\342\214\317\327\010\002\010\001\022\026\n" - + "\thostnames\030\004 \003(\tB\003\340A\0022\221\235\001\n" + + "\thostnames\030\004 \003(\tB\003\340A\0022\271\225\001\n" + "\016OracleDatabase\022\204\002\n" + "\037ListCloudExadataInfrastructures\022F.google.cloud.oracledatabase.v1.Lis" + "tCloudExadataInfrastructuresRequest\032G.google.cloud.oracledatabase.v1.ListCloudEx" @@ -866,122 +866,97 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "ng.Operation\"u\312A*\n\025google.protobuf.Empty" + "\022\021OperationMetadata\332A\004name\202\323\344\223\002;*9/v1/{n" + "ame=projects/*/locations/*/goldengateCon" - + "nections/*}\022\365\001\n\036GetGoldengateDeploymentV" - + "ersion\022E.google.cloud.oracledatabase.v1." - + "GetGoldengateDeploymentVersionRequest\032;." - + "google.cloud.oracledatabase.v1.Goldengat" - + "eDeploymentVersion\"O\332A\004name\202\323\344\223\002B\022@/v1/{" - + "name=projects/*/locations/*/goldengateDe" - + "ploymentVersions/*}\022\210\002\n ListGoldengateDe" - + "ploymentVersions\022G.google.cloud.oracleda" - + "tabase.v1.ListGoldengateDeploymentVersio" - + "nsRequest\032H.google.cloud.oracledatabase." - + "v1.ListGoldengateDeploymentVersionsRespo" - + "nse\"Q\332A\006parent\202\323\344\223\002B\022@/v1/{parent=projec" - + "ts/*/locations/*}/goldengateDeploymentVe" - + "rsions\022\351\001\n\033GetGoldengateDeploymentType\022B" - + ".google.cloud.oracledatabase.v1.GetGolde" - + "ngateDeploymentTypeRequest\0328.google.clou" - + "d.oracledatabase.v1.GoldengateDeployment" - + "Type\"L\332A\004name\202\323\344\223\002?\022=/v1/{name=projects/" - + "*/locations/*/goldengateDeploymentTypes/" - + "*}\022\374\001\n\035ListGoldengateDeploymentTypes\022D.g" - + "oogle.cloud.oracledatabase.v1.ListGolden" - + "gateDeploymentTypesRequest\032E.google.clou" - + "d.oracledatabase.v1.ListGoldengateDeploy" - + "mentTypesResponse\"N\332A\006parent\202\323\344\223\002?\022=/v1/" - + "{parent=projects/*/locations/*}/goldenga" - + "teDeploymentTypes\022\205\002\n\"GetGoldengateDeplo" - + "ymentEnvironment\022I.google.cloud.oracleda" - + "tabase.v1.GetGoldengateDeploymentEnviron" - + "mentRequest\032?.google.cloud.oracledatabas" - + "e.v1.GoldengateDeploymentEnvironment\"S\332A" - + "\004name\202\323\344\223\002F\022D/v1/{name=projects/*/locati" - + "ons/*/goldengateDeploymentEnvironments/*" - + "}\022\230\002\n$ListGoldengateDeploymentEnvironmen" - + "ts\022K.google.cloud.oracledatabase.v1.List" - + "GoldengateDeploymentEnvironmentsRequest\032" - + "L.google.cloud.oracledatabase.v1.ListGol" - + "dengateDeploymentEnvironmentsResponse\"U\332" - + "A\006parent\202\323\344\223\002F\022D/v1/{parent=projects/*/l" - + "ocations/*}/goldengateDeploymentEnvironm" - + "ents\022\351\001\n\033GetGoldengateConnectionType\022B.g" - + "oogle.cloud.oracledatabase.v1.GetGoldeng" - + "ateConnectionTypeRequest\0328.google.cloud." - + "oracledatabase.v1.GoldengateConnectionTy" - + "pe\"L\332A\004name\202\323\344\223\002?\022=/v1/{name=projects/*/" - + "locations/*/goldengateConnectionTypes/*}" - + "\022\374\001\n\035ListGoldengateConnectionTypes\022D.goo" - + "gle.cloud.oracledatabase.v1.ListGoldenga" - + "teConnectionTypesRequest\032E.google.cloud." - + "oracledatabase.v1.ListGoldengateConnecti" - + "onTypesResponse\"N\332A\006parent\202\323\344\223\002?\022=/v1/{p" - + "arent=projects/*/locations/*}/goldengate" - + "ConnectionTypes\022\300\001\n\016ListDbVersions\0225.goo" - + "gle.cloud.oracledatabase.v1.ListDbVersio" - + "nsRequest\0326.google.cloud.oracledatabase." - + "v1.ListDbVersionsResponse\"?\332A\006parent\202\323\344\223" - + "\0020\022./v1/{parent=projects/*/locations/*}/" - + "dbVersions\022\354\001\n\031ListDatabaseCharacterSets" - + "\022@.google.cloud.oracledatabase.v1.ListDa" - + "tabaseCharacterSetsRequest\032A.google.clou" - + "d.oracledatabase.v1.ListDatabaseCharacte" - + "rSetsResponse\"J\332A\006parent\202\323\344\223\002;\0229/v1/{par" - + "ent=projects/*/locations/*}/databaseChar" - + "acterSets\022\224\002\n#ListGoldengateConnectionAs" - + "signments\022J.google.cloud.oracledatabase." - + "v1.ListGoldengateConnectionAssignmentsRe" - + "quest\032K.google.cloud.oracledatabase.v1.L" - + "istGoldengateConnectionAssignmentsRespon" - + "se\"T\332A\006parent\202\323\344\223\002E\022C/v1/{parent=project" - + "s/*/locations/*}/goldengateConnectionAss" - + "ignments\022\201\002\n!GetGoldengateConnectionAssi" - + "gnment\022H.google.cloud.oracledatabase.v1." - + "GetGoldengateConnectionAssignmentRequest" - + "\032>.google.cloud.oracledatabase.v1.Golden" - + "gateConnectionAssignment\"R\332A\004name\202\323\344\223\002E\022" - + "C/v1/{name=projects/*/locations/*/golden" - + "gateConnectionAssignments/*}\022\206\003\n$CreateG" - + "oldengateConnectionAssignment\022K.google.c" - + "loud.oracledatabase.v1.CreateGoldengateC" - + "onnectionAssignmentRequest\032\035.google.long" - + "running.Operation\"\361\001\312A3\n\036GoldengateConne" - + "ctionAssignment\022\021OperationMetadata\332AKpar" - + "ent,goldengate_connection_assignment,gol" - + "dengate_connection_assignment_id\202\323\344\223\002g\"C" - + "/v1/{parent=projects/*/locations/*}/gold" - + "engateConnectionAssignments: goldengate_" - + "connection_assignment\022\223\002\n$DeleteGoldenga" - + "teConnectionAssignment\022K.google.cloud.or" - + "acledatabase.v1.DeleteGoldengateConnecti" - + "onAssignmentRequest\032\035.google.longrunning" - + ".Operation\"\177\312A*\n\025google.protobuf.Empty\022\021" - + "OperationMetadata\332A\004name\202\323\344\223\002E*C/v1/{nam" - + "e=projects/*/locations/*/goldengateConne" - + "ctionAssignments/*}\022\227\002\n\"TestGoldengateCo" - + "nnectionAssignment\022I.google.cloud.oracle" - + "database.v1.TestGoldengateConnectionAssi" - + "gnmentRequest\032J.google.cloud.oracledatab" - + "ase.v1.TestGoldengateConnectionAssignmen" - + "tResponse\"Z\332A\004name\202\323\344\223\002M\"H/v1/{name=proj" - + "ects/*/locations/*/goldengateConnectionA" - + "ssignments/*}:test:\001*\032Q\312A\035oracledatabase" - + ".googleapis.com\322A.https://www.googleapis" - + ".com/auth/cloud-platformB\237\004\n\"com.google." - + "cloud.oracledatabase.v1B\013V1mainProtoP\001ZJ" - + "cloud.google.com/go/oracledatabase/apiv1" - + "/oracledatabasepb;oracledatabasepb\252\002\036Goo" - + "gle.Cloud.OracleDatabase.V1\312\002\036Google\\Clo" - + "ud\\OracleDatabase\\V1\352\002!Google::Cloud::Or" - + "acleDatabase::V1\352AN\n\036compute.googleapis." - + "com/Network\022,projects/{project}/global/n" - + "etworks/{network}\352Ax\n!cloudkms.googleapi" - + "s.com/CryptoKey\022Sprojects/{project}/loca" - + "tions/{location}/keyRings/{key_ring}/cry" - + "ptoKeys/{crypto_key}\352Ak\n*secretmanager.g" - + "oogleapis.com/SecretVersion\022=projects/{p" - + "roject}/secrets/{secret}/versions/{secre" - + "t_version}b\006proto3" + + "nections/*}\022\210\002\n ListGoldengateDeployment" + + "Versions\022G.google.cloud.oracledatabase.v" + + "1.ListGoldengateDeploymentVersionsReques" + + "t\032H.google.cloud.oracledatabase.v1.ListG" + + "oldengateDeploymentVersionsResponse\"Q\332A\006" + + "parent\202\323\344\223\002B\022@/v1/{parent=projects/*/loc" + + "ations/*}/goldengateDeploymentVersions\022\374" + + "\001\n\035ListGoldengateDeploymentTypes\022D.googl" + + "e.cloud.oracledatabase.v1.ListGoldengate" + + "DeploymentTypesRequest\032E.google.cloud.or" + + "acledatabase.v1.ListGoldengateDeployment" + + "TypesResponse\"N\332A\006parent\202\323\344\223\002?\022=/v1/{par" + + "ent=projects/*/locations/*}/goldengateDe" + + "ploymentTypes\022\230\002\n$ListGoldengateDeployme" + + "ntEnvironments\022K.google.cloud.oracledata" + + "base.v1.ListGoldengateDeploymentEnvironm" + + "entsRequest\032L.google.cloud.oracledatabas" + + "e.v1.ListGoldengateDeploymentEnvironment" + + "sResponse\"U\332A\006parent\202\323\344\223\002F\022D/v1/{parent=" + + "projects/*/locations/*}/goldengateDeploy" + + "mentEnvironments\022\374\001\n\035ListGoldengateConne" + + "ctionTypes\022D.google.cloud.oracledatabase" + + ".v1.ListGoldengateConnectionTypesRequest" + + "\032E.google.cloud.oracledatabase.v1.ListGo" + + "ldengateConnectionTypesResponse\"N\332A\006pare" + + "nt\202\323\344\223\002?\022=/v1/{parent=projects/*/locatio" + + "ns/*}/goldengateConnectionTypes\022\300\001\n\016List" + + "DbVersions\0225.google.cloud.oracledatabase" + + ".v1.ListDbVersionsRequest\0326.google.cloud" + + ".oracledatabase.v1.ListDbVersionsRespons" + + "e\"?\332A\006parent\202\323\344\223\0020\022./v1/{parent=projects" + + "/*/locations/*}/dbVersions\022\354\001\n\031ListDatab" + + "aseCharacterSets\022@.google.cloud.oracleda" + + "tabase.v1.ListDatabaseCharacterSetsReque" + + "st\032A.google.cloud.oracledatabase.v1.List" + + "DatabaseCharacterSetsResponse\"J\332A\006parent" + + "\202\323\344\223\002;\0229/v1/{parent=projects/*/locations" + + "/*}/databaseCharacterSets\022\224\002\n#ListGolden" + + "gateConnectionAssignments\022J.google.cloud" + + ".oracledatabase.v1.ListGoldengateConnect" + + "ionAssignmentsRequest\032K.google.cloud.ora" + + "cledatabase.v1.ListGoldengateConnectionA" + + "ssignmentsResponse\"T\332A\006parent\202\323\344\223\002E\022C/v1" + + "/{parent=projects/*/locations/*}/goldeng" + + "ateConnectionAssignments\022\201\002\n!GetGoldenga" + + "teConnectionAssignment\022H.google.cloud.or" + + "acledatabase.v1.GetGoldengateConnectionA" + + "ssignmentRequest\032>.google.cloud.oracleda" + + "tabase.v1.GoldengateConnectionAssignment" + + "\"R\332A\004name\202\323\344\223\002E\022C/v1/{name=projects/*/lo" + + "cations/*/goldengateConnectionAssignment" + + "s/*}\022\206\003\n$CreateGoldengateConnectionAssig" + + "nment\022K.google.cloud.oracledatabase.v1.C" + + "reateGoldengateConnectionAssignmentReque" + + "st\032\035.google.longrunning.Operation\"\361\001\312A3\n" + + "\036GoldengateConnectionAssignment\022\021Operati" + + "onMetadata\332AKparent,goldengate_connectio" + + "n_assignment,goldengate_connection_assig" + + "nment_id\202\323\344\223\002g\"C/v1/{parent=projects/*/l" + + "ocations/*}/goldengateConnectionAssignme" + + "nts: goldengate_connection_assignment\022\223\002" + + "\n$DeleteGoldengateConnectionAssignment\022K" + + ".google.cloud.oracledatabase.v1.DeleteGo" + + "ldengateConnectionAssignmentRequest\032\035.go" + + "ogle.longrunning.Operation\"\177\312A*\n\025google." + + "protobuf.Empty\022\021OperationMetadata\332A\004name" + + "\202\323\344\223\002E*C/v1/{name=projects/*/locations/*" + + "/goldengateConnectionAssignments/*}\022\227\002\n\"" + + "TestGoldengateConnectionAssignment\022I.goo" + + "gle.cloud.oracledatabase.v1.TestGoldenga" + + "teConnectionAssignmentRequest\032J.google.c" + + "loud.oracledatabase.v1.TestGoldengateCon" + + "nectionAssignmentResponse\"Z\332A\004name\202\323\344\223\002M" + + "\"H/v1/{name=projects/*/locations/*/golde" + + "ngateConnectionAssignments/*}:test:\001*\032Q\312" + + "A\035oracledatabase.googleapis.com\322A.https:" + + "//www.googleapis.com/auth/cloud-platform" + + "B\237\004\n\"com.google.cloud.oracledatabase.v1B" + + "\013V1mainProtoP\001ZJcloud.google.com/go/orac" + + "ledatabase/apiv1/oracledatabasepb;oracle" + + "databasepb\252\002\036Google.Cloud.OracleDatabase" + + ".V1\312\002\036Google\\Cloud\\OracleDatabase\\V1\352\002!G" + + "oogle::Cloud::OracleDatabase::V1\352AN\n\036com" + + "pute.googleapis.com/Network\022,projects/{p" + + "roject}/global/networks/{network}\352Ax\n!cl" + + "oudkms.googleapis.com/CryptoKey\022Sproject" + + "s/{project}/locations/{location}/keyRing" + + "s/{key_ring}/cryptoKeys/{crypto_key}\352Ak\n" + + "*secretmanager.googleapis.com/SecretVers" + + "ion\022=projects/{project}/secrets/{secret}" + + "/versions/{secret_version}b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( diff --git a/java-oracledatabase/proto-google-cloud-oracledatabase-v1/src/main/proto/google/cloud/oracledatabase/v1/goldengate_connection_type.proto b/java-oracledatabase/proto-google-cloud-oracledatabase-v1/src/main/proto/google/cloud/oracledatabase/v1/goldengate_connection_type.proto index 32026bde31df..ccd471b867fb 100644 --- a/java-oracledatabase/proto-google-cloud-oracledatabase-v1/src/main/proto/google/cloud/oracledatabase/v1/goldengate_connection_type.proto +++ b/java-oracledatabase/proto-google-cloud-oracledatabase-v1/src/main/proto/google/cloud/oracledatabase/v1/goldengate_connection_type.proto @@ -145,18 +145,6 @@ message GoldengateConnectionType { [(google.api.field_behavior) = OUTPUT_ONLY]; } -// Message for getting a GoldengateConnectionType. -message GetGoldengateConnectionTypeRequest { - // Required. Name of the resource in the format: - // projects/{project}/locations/{location}/goldengateConnectionTypes/{goldengate_connection_type} - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "oracledatabase.googleapis.com/GoldengateConnectionType" - } - ]; -} - // Message for listing GoldengateConnectionTypes. message ListGoldengateConnectionTypesRequest { // Required. Parent value for ListGoldengateConnectionTypesRequest diff --git a/java-oracledatabase/proto-google-cloud-oracledatabase-v1/src/main/proto/google/cloud/oracledatabase/v1/goldengate_deployment_environment.proto b/java-oracledatabase/proto-google-cloud-oracledatabase-v1/src/main/proto/google/cloud/oracledatabase/v1/goldengate_deployment_environment.proto index a24de48defcc..6572768308f0 100644 --- a/java-oracledatabase/proto-google-cloud-oracledatabase-v1/src/main/proto/google/cloud/oracledatabase/v1/goldengate_deployment_environment.proto +++ b/java-oracledatabase/proto-google-cloud-oracledatabase-v1/src/main/proto/google/cloud/oracledatabase/v1/goldengate_deployment_environment.proto @@ -108,18 +108,6 @@ message GoldengateDeploymentEnvironment { [(google.api.field_behavior) = OUTPUT_ONLY]; } -// Message for getting a GoldengateDeploymentEnvironment. -message GetGoldengateDeploymentEnvironmentRequest { - // Required. Name of the resource with the format: - // projects/{project}/locations/{location}/goldengateDeploymentEnvironments/{goldengate_deployment_environment} - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "oracledatabase.googleapis.com/GoldengateDeploymentEnvironment" - } - ]; -} - // Message for listing GoldengateDeploymentEnvironments. message ListGoldengateDeploymentEnvironmentsRequest { // Required. The parent, which owns this collection of diff --git a/java-oracledatabase/proto-google-cloud-oracledatabase-v1/src/main/proto/google/cloud/oracledatabase/v1/goldengate_deployment_type.proto b/java-oracledatabase/proto-google-cloud-oracledatabase-v1/src/main/proto/google/cloud/oracledatabase/v1/goldengate_deployment_type.proto index 7a11a676194a..4e8ef5f20394 100644 --- a/java-oracledatabase/proto-google-cloud-oracledatabase-v1/src/main/proto/google/cloud/oracledatabase/v1/goldengate_deployment_type.proto +++ b/java-oracledatabase/proto-google-cloud-oracledatabase-v1/src/main/proto/google/cloud/oracledatabase/v1/goldengate_deployment_type.proto @@ -133,19 +133,6 @@ message GoldengateDeploymentType { string default_username = 11 [(google.api.field_behavior) = OUTPUT_ONLY]; } -// Message for getting a GoldengateDeploymentType. -message GetGoldengateDeploymentTypeRequest { - // Required. The name of the GoldengateDeploymentType to retrieve. - // Format: - // projects/{project}/locations/{location}/goldengateDeploymentTypes/{goldengate_deployment_type} - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "oracledatabase.googleapis.com/GoldengateDeploymentType" - } - ]; -} - // Message for listing GoldengateDeploymentTypes. message ListGoldengateDeploymentTypesRequest { // Required. The parent resource. diff --git a/java-oracledatabase/proto-google-cloud-oracledatabase-v1/src/main/proto/google/cloud/oracledatabase/v1/goldengate_deployment_version.proto b/java-oracledatabase/proto-google-cloud-oracledatabase-v1/src/main/proto/google/cloud/oracledatabase/v1/goldengate_deployment_version.proto index 6bb6e7f2a688..e25c0ebdcb67 100644 --- a/java-oracledatabase/proto-google-cloud-oracledatabase-v1/src/main/proto/google/cloud/oracledatabase/v1/goldengate_deployment_version.proto +++ b/java-oracledatabase/proto-google-cloud-oracledatabase-v1/src/main/proto/google/cloud/oracledatabase/v1/goldengate_deployment_version.proto @@ -133,19 +133,6 @@ message GoldengateDeploymentVersionProperties { [(google.api.field_behavior) = OUTPUT_ONLY]; } -// Message for getting a GoldengateDeploymentVersion. -message GetGoldengateDeploymentVersionRequest { - // Required. The name of the GoldengateDeploymentVersion to retrieve. - // Format: - // projects/{project}/locations/{location}/goldengateDeploymentVersions/{goldengate_deployment_version} - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "oracledatabase.googleapis.com/GoldengateDeploymentVersion" - } - ]; -} - // Message for listing GoldengateDeploymentVersions. message ListGoldengateDeploymentVersionsRequest { // Required. Parent value for ListGoldengateDeploymentVersionsRequest diff --git a/java-oracledatabase/proto-google-cloud-oracledatabase-v1/src/main/proto/google/cloud/oracledatabase/v1/oracledatabase.proto b/java-oracledatabase/proto-google-cloud-oracledatabase-v1/src/main/proto/google/cloud/oracledatabase/v1/oracledatabase.proto index 60a46557b034..1fb42987f3e7 100644 --- a/java-oracledatabase/proto-google-cloud-oracledatabase-v1/src/main/proto/google/cloud/oracledatabase/v1/oracledatabase.proto +++ b/java-oracledatabase/proto-google-cloud-oracledatabase-v1/src/main/proto/google/cloud/oracledatabase/v1/oracledatabase.proto @@ -831,15 +831,6 @@ service OracleDatabase { }; } - // Gets details of a single GoldengateDeploymentVersion. - rpc GetGoldengateDeploymentVersion(GetGoldengateDeploymentVersionRequest) - returns (GoldengateDeploymentVersion) { - option (google.api.http) = { - get: "/v1/{name=projects/*/locations/*/goldengateDeploymentVersions/*}" - }; - option (google.api.method_signature) = "name"; - } - // Lists GoldengateDeploymentVersions in a given project and location. rpc ListGoldengateDeploymentVersions(ListGoldengateDeploymentVersionsRequest) returns (ListGoldengateDeploymentVersionsResponse) { @@ -849,15 +840,6 @@ service OracleDatabase { option (google.api.method_signature) = "parent"; } - // Gets details of a single GoldenGateDeploymentType. - rpc GetGoldengateDeploymentType(GetGoldengateDeploymentTypeRequest) - returns (GoldengateDeploymentType) { - option (google.api.http) = { - get: "/v1/{name=projects/*/locations/*/goldengateDeploymentTypes/*}" - }; - option (google.api.method_signature) = "name"; - } - // Lists GoldenGateDeploymentTypes in a given project and location. rpc ListGoldengateDeploymentTypes(ListGoldengateDeploymentTypesRequest) returns (ListGoldengateDeploymentTypesResponse) { @@ -867,16 +849,6 @@ service OracleDatabase { option (google.api.method_signature) = "parent"; } - // Gets details of a single GoldengateDeploymentEnvironment. - rpc GetGoldengateDeploymentEnvironment( - GetGoldengateDeploymentEnvironmentRequest) - returns (GoldengateDeploymentEnvironment) { - option (google.api.http) = { - get: "/v1/{name=projects/*/locations/*/goldengateDeploymentEnvironments/*}" - }; - option (google.api.method_signature) = "name"; - } - // Lists GoldengateDeploymentEnvironments in a given project and location. rpc ListGoldengateDeploymentEnvironments( ListGoldengateDeploymentEnvironmentsRequest) @@ -887,15 +859,6 @@ service OracleDatabase { option (google.api.method_signature) = "parent"; } - // Gets details of a single GoldengateConnectionType. - rpc GetGoldengateConnectionType(GetGoldengateConnectionTypeRequest) - returns (GoldengateConnectionType) { - option (google.api.http) = { - get: "/v1/{name=projects/*/locations/*/goldengateConnectionTypes/*}" - }; - option (google.api.method_signature) = "name"; - } - // Lists GoldengateConnectionTypes in a given project and location. rpc ListGoldengateConnectionTypes(ListGoldengateConnectionTypesRequest) returns (ListGoldengateConnectionTypesResponse) { diff --git a/java-oracledatabase/samples/snippets/generated/com/google/cloud/oracledatabase/v1/oracledatabase/getgoldengatedeploymentenvironment/AsyncGetGoldengateDeploymentEnvironment.java b/java-oracledatabase/samples/snippets/generated/com/google/cloud/oracledatabase/v1/oracledatabase/getgoldengatedeploymentenvironment/AsyncGetGoldengateDeploymentEnvironment.java deleted file mode 100644 index ab354600dfc1..000000000000 --- a/java-oracledatabase/samples/snippets/generated/com/google/cloud/oracledatabase/v1/oracledatabase/getgoldengatedeploymentenvironment/AsyncGetGoldengateDeploymentEnvironment.java +++ /dev/null @@ -1,53 +0,0 @@ -/* - * 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.oracledatabase.v1.samples; - -// [START oracledatabase_v1_generated_OracleDatabase_GetGoldengateDeploymentEnvironment_async] -import com.google.api.core.ApiFuture; -import com.google.cloud.oracledatabase.v1.GetGoldengateDeploymentEnvironmentRequest; -import com.google.cloud.oracledatabase.v1.GoldengateDeploymentEnvironment; -import com.google.cloud.oracledatabase.v1.GoldengateDeploymentEnvironmentName; -import com.google.cloud.oracledatabase.v1.OracleDatabaseClient; - -public class AsyncGetGoldengateDeploymentEnvironment { - - public static void main(String[] args) throws Exception { - asyncGetGoldengateDeploymentEnvironment(); - } - - public static void asyncGetGoldengateDeploymentEnvironment() 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 (OracleDatabaseClient oracleDatabaseClient = OracleDatabaseClient.create()) { - GetGoldengateDeploymentEnvironmentRequest request = - GetGoldengateDeploymentEnvironmentRequest.newBuilder() - .setName( - GoldengateDeploymentEnvironmentName.of( - "[PROJECT]", "[LOCATION]", "[GOLDENGATE_DEPLOYMENT_ENVIRONMENT]") - .toString()) - .build(); - ApiFuture future = - oracleDatabaseClient.getGoldengateDeploymentEnvironmentCallable().futureCall(request); - // Do something. - GoldengateDeploymentEnvironment response = future.get(); - } - } -} -// [END oracledatabase_v1_generated_OracleDatabase_GetGoldengateDeploymentEnvironment_async] diff --git a/java-oracledatabase/samples/snippets/generated/com/google/cloud/oracledatabase/v1/oracledatabase/getgoldengatedeploymentenvironment/SyncGetGoldengateDeploymentEnvironment.java b/java-oracledatabase/samples/snippets/generated/com/google/cloud/oracledatabase/v1/oracledatabase/getgoldengatedeploymentenvironment/SyncGetGoldengateDeploymentEnvironment.java deleted file mode 100644 index 444c9be0766a..000000000000 --- a/java-oracledatabase/samples/snippets/generated/com/google/cloud/oracledatabase/v1/oracledatabase/getgoldengatedeploymentenvironment/SyncGetGoldengateDeploymentEnvironment.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * 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.oracledatabase.v1.samples; - -// [START oracledatabase_v1_generated_OracleDatabase_GetGoldengateDeploymentEnvironment_sync] -import com.google.cloud.oracledatabase.v1.GetGoldengateDeploymentEnvironmentRequest; -import com.google.cloud.oracledatabase.v1.GoldengateDeploymentEnvironment; -import com.google.cloud.oracledatabase.v1.GoldengateDeploymentEnvironmentName; -import com.google.cloud.oracledatabase.v1.OracleDatabaseClient; - -public class SyncGetGoldengateDeploymentEnvironment { - - public static void main(String[] args) throws Exception { - syncGetGoldengateDeploymentEnvironment(); - } - - public static void syncGetGoldengateDeploymentEnvironment() 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 (OracleDatabaseClient oracleDatabaseClient = OracleDatabaseClient.create()) { - GetGoldengateDeploymentEnvironmentRequest request = - GetGoldengateDeploymentEnvironmentRequest.newBuilder() - .setName( - GoldengateDeploymentEnvironmentName.of( - "[PROJECT]", "[LOCATION]", "[GOLDENGATE_DEPLOYMENT_ENVIRONMENT]") - .toString()) - .build(); - GoldengateDeploymentEnvironment response = - oracleDatabaseClient.getGoldengateDeploymentEnvironment(request); - } - } -} -// [END oracledatabase_v1_generated_OracleDatabase_GetGoldengateDeploymentEnvironment_sync] diff --git a/java-oracledatabase/samples/snippets/generated/com/google/cloud/oracledatabase/v1/oracledatabase/getgoldengatedeploymentenvironment/SyncGetGoldengateDeploymentEnvironmentGoldengatedeploymentenvironmentname.java b/java-oracledatabase/samples/snippets/generated/com/google/cloud/oracledatabase/v1/oracledatabase/getgoldengatedeploymentenvironment/SyncGetGoldengateDeploymentEnvironmentGoldengatedeploymentenvironmentname.java deleted file mode 100644 index bb10908507f9..000000000000 --- a/java-oracledatabase/samples/snippets/generated/com/google/cloud/oracledatabase/v1/oracledatabase/getgoldengatedeploymentenvironment/SyncGetGoldengateDeploymentEnvironmentGoldengatedeploymentenvironmentname.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * 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.oracledatabase.v1.samples; - -// [START oracledatabase_v1_generated_OracleDatabase_GetGoldengateDeploymentEnvironment_Goldengatedeploymentenvironmentname_sync] -import com.google.cloud.oracledatabase.v1.GoldengateDeploymentEnvironment; -import com.google.cloud.oracledatabase.v1.GoldengateDeploymentEnvironmentName; -import com.google.cloud.oracledatabase.v1.OracleDatabaseClient; - -public class SyncGetGoldengateDeploymentEnvironmentGoldengatedeploymentenvironmentname { - - public static void main(String[] args) throws Exception { - syncGetGoldengateDeploymentEnvironmentGoldengatedeploymentenvironmentname(); - } - - public static void syncGetGoldengateDeploymentEnvironmentGoldengatedeploymentenvironmentname() - 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 (OracleDatabaseClient oracleDatabaseClient = OracleDatabaseClient.create()) { - GoldengateDeploymentEnvironmentName name = - GoldengateDeploymentEnvironmentName.of( - "[PROJECT]", "[LOCATION]", "[GOLDENGATE_DEPLOYMENT_ENVIRONMENT]"); - GoldengateDeploymentEnvironment response = - oracleDatabaseClient.getGoldengateDeploymentEnvironment(name); - } - } -} -// [END oracledatabase_v1_generated_OracleDatabase_GetGoldengateDeploymentEnvironment_Goldengatedeploymentenvironmentname_sync] diff --git a/java-oracledatabase/samples/snippets/generated/com/google/cloud/oracledatabase/v1/oracledatabase/getgoldengatedeploymentversion/AsyncGetGoldengateDeploymentVersion.java b/java-oracledatabase/samples/snippets/generated/com/google/cloud/oracledatabase/v1/oracledatabase/getgoldengatedeploymentversion/AsyncGetGoldengateDeploymentVersion.java deleted file mode 100644 index cfafb044046e..000000000000 --- a/java-oracledatabase/samples/snippets/generated/com/google/cloud/oracledatabase/v1/oracledatabase/getgoldengatedeploymentversion/AsyncGetGoldengateDeploymentVersion.java +++ /dev/null @@ -1,53 +0,0 @@ -/* - * 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.oracledatabase.v1.samples; - -// [START oracledatabase_v1_generated_OracleDatabase_GetGoldengateDeploymentVersion_async] -import com.google.api.core.ApiFuture; -import com.google.cloud.oracledatabase.v1.GetGoldengateDeploymentVersionRequest; -import com.google.cloud.oracledatabase.v1.GoldengateDeploymentVersion; -import com.google.cloud.oracledatabase.v1.GoldengateDeploymentVersionName; -import com.google.cloud.oracledatabase.v1.OracleDatabaseClient; - -public class AsyncGetGoldengateDeploymentVersion { - - public static void main(String[] args) throws Exception { - asyncGetGoldengateDeploymentVersion(); - } - - public static void asyncGetGoldengateDeploymentVersion() 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 (OracleDatabaseClient oracleDatabaseClient = OracleDatabaseClient.create()) { - GetGoldengateDeploymentVersionRequest request = - GetGoldengateDeploymentVersionRequest.newBuilder() - .setName( - GoldengateDeploymentVersionName.of( - "[PROJECT]", "[LOCATION]", "[GOLDENGATE_DEPLOYMENT_VERSION]") - .toString()) - .build(); - ApiFuture future = - oracleDatabaseClient.getGoldengateDeploymentVersionCallable().futureCall(request); - // Do something. - GoldengateDeploymentVersion response = future.get(); - } - } -} -// [END oracledatabase_v1_generated_OracleDatabase_GetGoldengateDeploymentVersion_async] diff --git a/java-oracledatabase/samples/snippets/generated/com/google/cloud/oracledatabase/v1/oracledatabase/getgoldengatedeploymentversion/SyncGetGoldengateDeploymentVersionGoldengatedeploymentversionname.java b/java-oracledatabase/samples/snippets/generated/com/google/cloud/oracledatabase/v1/oracledatabase/getgoldengatedeploymentversion/SyncGetGoldengateDeploymentVersionGoldengatedeploymentversionname.java deleted file mode 100644 index c548851e6572..000000000000 --- a/java-oracledatabase/samples/snippets/generated/com/google/cloud/oracledatabase/v1/oracledatabase/getgoldengatedeploymentversion/SyncGetGoldengateDeploymentVersionGoldengatedeploymentversionname.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * 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.oracledatabase.v1.samples; - -// [START oracledatabase_v1_generated_OracleDatabase_GetGoldengateDeploymentVersion_Goldengatedeploymentversionname_sync] -import com.google.cloud.oracledatabase.v1.GoldengateDeploymentVersion; -import com.google.cloud.oracledatabase.v1.GoldengateDeploymentVersionName; -import com.google.cloud.oracledatabase.v1.OracleDatabaseClient; - -public class SyncGetGoldengateDeploymentVersionGoldengatedeploymentversionname { - - public static void main(String[] args) throws Exception { - syncGetGoldengateDeploymentVersionGoldengatedeploymentversionname(); - } - - public static void syncGetGoldengateDeploymentVersionGoldengatedeploymentversionname() - 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 (OracleDatabaseClient oracleDatabaseClient = OracleDatabaseClient.create()) { - GoldengateDeploymentVersionName name = - GoldengateDeploymentVersionName.of( - "[PROJECT]", "[LOCATION]", "[GOLDENGATE_DEPLOYMENT_VERSION]"); - GoldengateDeploymentVersion response = - oracleDatabaseClient.getGoldengateDeploymentVersion(name); - } - } -} -// [END oracledatabase_v1_generated_OracleDatabase_GetGoldengateDeploymentVersion_Goldengatedeploymentversionname_sync] diff --git a/librarian.yaml b/librarian.yaml index 6b0f23ce9960..709d89c4e5a0 100644 --- a/librarian.yaml +++ b/librarian.yaml @@ -16,8 +16,8 @@ version: v0.21.1-0.20260617000028-820646f3db93 repo: googleapis/google-cloud-java sources: googleapis: - commit: f7b17174725f43b5cb11b0b8c6bbad20a3dc5bd1 - sha256: e21b1ea623f68161e9c0c464ca9e9df53da80d7133244531aa97d1cfeb411ccc + commit: 7af3f2c7b8927cffb548fd2cf09b04c6371437ee + sha256: fb354b89774f4599bb3559d190fe54e51da76c6339c062900355c874b9defac5 showcase: commit: 328bec7ce4c1fb77c37fdf1868d0506bc02a70fc sha256: 8df187486e37edf5a78c1646c859c311bc452871b9ba4641d93149d3c53450a2